[cig-commits] commit: Initial import of 3.1.0

Mercurial hg at geodynamics.org
Fri Feb 25 14:09:57 PST 2011


changeset:   0:5eda1a3f24e8
user:        Walter Landry <wlandry at caltech.edu>
date:        Sat Jan 01 16:47:31 2011 -0800
files:       COPYING.LESSER COPYRIGHT INSTALL-NOTES Makefile.in RELEASE-NOTES config.suggest config/Makefile.config.in config/Makefile.config.install.in config/SAMRAI_config.h.in config/aclocal.m4 config/casc_ctime.m4 config/casc_cxx.m4 config/casc_fortran.m4 config/casc_hdf5.m4 config/casc_lang.m4 config/casc_libs_and_headers.m4 config/casc_misc.m4 config/casc_mpi.m4 config/casc_silo.m4 config/casc_valgind.m4 config/casc_xlc.m4 config/check_szlib.m4 config/config.guess config/config.sub config/install-sh config/preconf config/samrai-serpa-run.m4 config/samrai_timers.m4 config/serpa-run.in config/split-libs-string.m4 config/tarch configure configure.in docs/Doxyfile.in docs/Makefile.in docs/devDoxyfile.in docs/main.html docs/release/version-1.0.0 docs/release/version-1.0.1 docs/release/version-1.0.2 docs/release/version-1.0.3 docs/release/version-1.1.0 docs/release/version-1.2.0 docs/release/version-1.3.0 docs/release/version-1.4.0 docs/release/version-1.5.0 docs/release/version-2.0.0 docs/release/version-2.0.0-beta docs/release/version-2.1.0 docs/release/version-2.2.0 docs/release/version-2.2.1 docs/release/version-2.3.0 docs/release/version-2.4.0 docs/release/version-3.1.0-beta docs/samrai-dox/README docs/userdocs/FAC-Preconditioner.pdf docs/userdocs/Laplacian-ex.pdf docs/userdocs/Multiblock.pdf docs/userdocs/NonlinearSolver.pdf docs/userdocs/Poisson.pdf docs/userdocs/Regridding-RichardsonExtrapolation.pdf docs/userdocs/RestartRedistribute.txt docs/userdocs/Robin-Bc.pdf docs/userdocs/SAMRAI-overview.pdf docs/userdocs/Schedule-Boundary.pdf docs/userdocs/Timing-Instrumentation.pdf docs/userdocs/VisIt-writer-slides.pdf docs/userdocs/VisIt-writer.pdf docs/userdocs/Vizamrai-writer.pdf docs/userdocs/m4macros.txt docs/userdocs/userguide.pdf source/Makefile.in source/SAMRAI/Makefile.in source/SAMRAI/algs/HyperbolicLevelIntegrator.C source/SAMRAI/algs/HyperbolicLevelIntegrator.h source/SAMRAI/algs/HyperbolicPatchStrategy.C source/SAMRAI/algs/HyperbolicPatchStrategy.h source/SAMRAI/algs/ImplicitEquationStrategy.C source/SAMRAI/algs/ImplicitEquationStrategy.h source/SAMRAI/algs/ImplicitIntegrator.C source/SAMRAI/algs/ImplicitIntegrator.I source/SAMRAI/algs/ImplicitIntegrator.h source/SAMRAI/algs/Makefile.depend source/SAMRAI/algs/Makefile.in source/SAMRAI/algs/MblkPatchBoundaryNodeSum.C source/SAMRAI/algs/MblkPatchBoundaryNodeSum.h source/SAMRAI/algs/MethodOfLinesIntegrator.C source/SAMRAI/algs/MethodOfLinesIntegrator.h source/SAMRAI/algs/MethodOfLinesPatchStrategy.C source/SAMRAI/algs/MethodOfLinesPatchStrategy.h source/SAMRAI/algs/OuteredgeSumTransaction.C source/SAMRAI/algs/OuteredgeSumTransaction.h source/SAMRAI/algs/OuteredgeSumTransactionFactory.C source/SAMRAI/algs/OuteredgeSumTransactionFactory.h source/SAMRAI/algs/OuternodeSumTransaction.C source/SAMRAI/algs/OuternodeSumTransaction.h source/SAMRAI/algs/OuternodeSumTransactionFactory.C source/SAMRAI/algs/OuternodeSumTransactionFactory.h source/SAMRAI/algs/PatchBoundaryEdgeSum.C source/SAMRAI/algs/PatchBoundaryEdgeSum.h source/SAMRAI/algs/PatchBoundaryNodeSum.C source/SAMRAI/algs/PatchBoundaryNodeSum.h source/SAMRAI/algs/TimeRefinementIntegrator.C source/SAMRAI/algs/TimeRefinementIntegrator.I source/SAMRAI/algs/TimeRefinementIntegrator.h source/SAMRAI/algs/TimeRefinementLevelStrategy.C source/SAMRAI/algs/TimeRefinementLevelStrategy.h source/SAMRAI/algs/dox/manual.dox source/SAMRAI/algs/dox/manual_femutils.dox source/SAMRAI/algs/dox/manual_femutils_standard.dox source/SAMRAI/algs/dox/manual_hyperbolic.dox source/SAMRAI/algs/dox/manual_implicit.dox source/SAMRAI/algs/dox/manual_method_of_lines.dox source/SAMRAI/algs/dox/manual_time_refinement.dox source/SAMRAI/algs/fortran/Makefile.depend source/SAMRAI/algs/fortran/Makefile.in source/SAMRAI/algs/fortran/algs_nodeouternodeops2d.f source/SAMRAI/algs/fortran/algs_nodeouternodeops2d.m4 source/SAMRAI/algs/fortran/algs_nodeouternodeops3d.f source/SAMRAI/algs/fortran/algs_nodeouternodeops3d.m4 source/SAMRAI/algs/fortran/algs_upfluxsum1d.f source/SAMRAI/algs/fortran/algs_upfluxsum1d.m4 source/SAMRAI/algs/fortran/algs_upfluxsum2d.f source/SAMRAI/algs/fortran/algs_upfluxsum2d.m4 source/SAMRAI/algs/fortran/algs_upfluxsum3d.f source/SAMRAI/algs/fortran/algs_upfluxsum3d.m4 source/SAMRAI/appu/BoundaryNode.C source/SAMRAI/appu/BoundaryNode.h source/SAMRAI/appu/BoundaryUtilityStrategy.C source/SAMRAI/appu/BoundaryUtilityStrategy.h source/SAMRAI/appu/CartesianBoundaryDefines.h source/SAMRAI/appu/CartesianBoundaryUtilities2.C source/SAMRAI/appu/CartesianBoundaryUtilities2.h source/SAMRAI/appu/CartesianBoundaryUtilities3.C source/SAMRAI/appu/CartesianBoundaryUtilities3.h source/SAMRAI/appu/CubesPatchInterface.C source/SAMRAI/appu/CubesPatchInterface.h source/SAMRAI/appu/CutCell.C source/SAMRAI/appu/CutCell.h source/SAMRAI/appu/ElevenPatchInterface.C source/SAMRAI/appu/ElevenPatchInterface.h source/SAMRAI/appu/EmbeddedBoundaryDefines.h source/SAMRAI/appu/EmbeddedBoundaryGeometry.C source/SAMRAI/appu/EmbeddedBoundaryGeometry.h source/SAMRAI/appu/EmbeddedBoundaryShape.C source/SAMRAI/appu/EmbeddedBoundaryShape.h source/SAMRAI/appu/EmbeddedBoundaryShapePolygon.C source/SAMRAI/appu/EmbeddedBoundaryShapePolygon.I source/SAMRAI/appu/EmbeddedBoundaryShapePolygon.h source/SAMRAI/appu/EmbeddedBoundaryShapeSphere.C source/SAMRAI/appu/EmbeddedBoundaryShapeSphere.I source/SAMRAI/appu/EmbeddedBoundaryShapeSphere.h source/SAMRAI/appu/Makefile.depend source/SAMRAI/appu/Makefile.in source/SAMRAI/appu/VisDerivedDataStrategy.C source/SAMRAI/appu/VisDerivedDataStrategy.h source/SAMRAI/appu/VisItDataWriter.C source/SAMRAI/appu/VisItDataWriter.h source/SAMRAI/appu/VisMaterialsDataStrategy.C source/SAMRAI/appu/VisMaterialsDataStrategy.h source/SAMRAI/appu/dox/manual.dox source/SAMRAI/appu/dox/manual_boundary.dox source/SAMRAI/appu/dox/manual_embedded_boundary.dox source/SAMRAI/appu/dox/manual_plotting.dox source/SAMRAI/appu/fortran/Makefile.depend source/SAMRAI/appu/fortran/Makefile.in source/SAMRAI/appu/fortran/appu_cartbdry2d.f source/SAMRAI/appu/fortran/appu_cartbdry2d.m4 source/SAMRAI/appu/fortran/appu_cartbdry3d.f source/SAMRAI/appu/fortran/appu_cartbdry3d.m4 source/SAMRAI/appu/fortran/appu_cartbdryparams2d.i source/SAMRAI/appu/fortran/appu_cartbdryparams3d.i source/SAMRAI/appu/fortran/appu_cpdat2buf2d.f source/SAMRAI/appu/fortran/appu_cpdat2buf3d.f source/SAMRAI/appu/fortran/appu_ebdry2d.f source/SAMRAI/appu/fortran/appu_ebdry2d.m4 source/SAMRAI/appu/fortran/appu_ebdry3d.f source/SAMRAI/appu/fortran/appu_ebdry3d.m4 source/SAMRAI/appu/fortran/ebparams.i source/SAMRAI/geom/BlockGridGeometry.C source/SAMRAI/geom/BlockGridGeometry.I source/SAMRAI/geom/BlockGridGeometry.h source/SAMRAI/geom/CartesianCellComplexConservativeLinearRefine.C source/SAMRAI/geom/CartesianCellComplexConservativeLinearRefine.h source/SAMRAI/geom/CartesianCellComplexLinearRefine.C source/SAMRAI/geom/CartesianCellComplexLinearRefine.h source/SAMRAI/geom/CartesianCellComplexWeightedAverage.C source/SAMRAI/geom/CartesianCellComplexWeightedAverage.h source/SAMRAI/geom/CartesianCellDoubleConservativeLinearRefine.C source/SAMRAI/geom/CartesianCellDoubleConservativeLinearRefine.h source/SAMRAI/geom/CartesianCellDoubleLinearRefine.C source/SAMRAI/geom/CartesianCellDoubleLinearRefine.h source/SAMRAI/geom/CartesianCellDoubleWeightedAverage.C source/SAMRAI/geom/CartesianCellDoubleWeightedAverage.h source/SAMRAI/geom/CartesianCellFloatConservativeLinearRefine.C source/SAMRAI/geom/CartesianCellFloatConservativeLinearRefine.h source/SAMRAI/geom/CartesianCellFloatLinearRefine.C source/SAMRAI/geom/CartesianCellFloatLinearRefine.h source/SAMRAI/geom/CartesianCellFloatWeightedAverage.C source/SAMRAI/geom/CartesianCellFloatWeightedAverage.h source/SAMRAI/geom/CartesianEdgeComplexWeightedAverage.C source/SAMRAI/geom/CartesianEdgeComplexWeightedAverage.h source/SAMRAI/geom/CartesianEdgeDoubleConservativeLinearRefine.C source/SAMRAI/geom/CartesianEdgeDoubleConservativeLinearRefine.h source/SAMRAI/geom/CartesianEdgeDoubleWeightedAverage.C source/SAMRAI/geom/CartesianEdgeDoubleWeightedAverage.h source/SAMRAI/geom/CartesianEdgeFloatConservativeLinearRefine.C source/SAMRAI/geom/CartesianEdgeFloatConservativeLinearRefine.h source/SAMRAI/geom/CartesianEdgeFloatWeightedAverage.C source/SAMRAI/geom/CartesianEdgeFloatWeightedAverage.h source/SAMRAI/geom/CartesianFaceComplexWeightedAverage.C source/SAMRAI/geom/CartesianFaceComplexWeightedAverage.h source/SAMRAI/geom/CartesianFaceDoubleConservativeLinearRefine.C source/SAMRAI/geom/CartesianFaceDoubleConservativeLinearRefine.h source/SAMRAI/geom/CartesianFaceDoubleWeightedAverage.C source/SAMRAI/geom/CartesianFaceDoubleWeightedAverage.h source/SAMRAI/geom/CartesianFaceFloatConservativeLinearRefine.C source/SAMRAI/geom/CartesianFaceFloatConservativeLinearRefine.h source/SAMRAI/geom/CartesianFaceFloatWeightedAverage.C source/SAMRAI/geom/CartesianFaceFloatWeightedAverage.h source/SAMRAI/geom/CartesianGridGeometry.C source/SAMRAI/geom/CartesianGridGeometry.I source/SAMRAI/geom/CartesianGridGeometry.h source/SAMRAI/geom/CartesianNodeComplexLinearRefine.C source/SAMRAI/geom/CartesianNodeComplexLinearRefine.h source/SAMRAI/geom/CartesianNodeDoubleLinearRefine.C source/SAMRAI/geom/CartesianNodeDoubleLinearRefine.h source/SAMRAI/geom/CartesianNodeFloatLinearRefine.C source/SAMRAI/geom/CartesianNodeFloatLinearRefine.h source/SAMRAI/geom/CartesianOuterfaceComplexWeightedAverage.C source/SAMRAI/geom/CartesianOuterfaceComplexWeightedAverage.h source/SAMRAI/geom/CartesianOuterfaceDoubleWeightedAverage.C source/SAMRAI/geom/CartesianOuterfaceDoubleWeightedAverage.h source/SAMRAI/geom/CartesianOuterfaceFloatWeightedAverage.C source/SAMRAI/geom/CartesianOuterfaceFloatWeightedAverage.h source/SAMRAI/geom/CartesianOutersideDoubleWeightedAverage.C source/SAMRAI/geom/CartesianOutersideDoubleWeightedAverage.h source/SAMRAI/geom/CartesianPatchGeometry.C source/SAMRAI/geom/CartesianPatchGeometry.I source/SAMRAI/geom/CartesianPatchGeometry.h source/SAMRAI/geom/CartesianSideComplexWeightedAverage.C source/SAMRAI/geom/CartesianSideComplexWeightedAverage.h source/SAMRAI/geom/CartesianSideDoubleConservativeLinearRefine.C source/SAMRAI/geom/CartesianSideDoubleConservativeLinearRefine.h source/SAMRAI/geom/CartesianSideDoubleWeightedAverage.C source/SAMRAI/geom/CartesianSideDoubleWeightedAverage.h source/SAMRAI/geom/CartesianSideFloatConservativeLinearRefine.C source/SAMRAI/geom/CartesianSideFloatConservativeLinearRefine.h source/SAMRAI/geom/CartesianSideFloatWeightedAverage.C source/SAMRAI/geom/CartesianSideFloatWeightedAverage.h source/SAMRAI/geom/Makefile.depend source/SAMRAI/geom/Makefile.in source/SAMRAI/geom/SkeletonCoarsen.C source/SAMRAI/geom/SkeletonCoarsen.h source/SAMRAI/geom/SkeletonGridGeometry.C source/SAMRAI/geom/SkeletonGridGeometry.h source/SAMRAI/geom/SkeletonPatchGeometry.C source/SAMRAI/geom/SkeletonPatchGeometry.h source/SAMRAI/geom/SkeletonRefine.C source/SAMRAI/geom/SkeletonRefine.h source/SAMRAI/geom/dox/manual.dox source/SAMRAI/geom/dox/manual_cartesian.dox source/SAMRAI/geom/dox/manual_cartesian_grid_geom.dox source/SAMRAI/geom/dox/manual_cartesian_operators_cell.dox source/SAMRAI/geom/dox/manual_cartesian_operators_fortran.dox source/SAMRAI/geom/dox/manual_cartesian_patch_geom.dox source/SAMRAI/geom/dox/manual_multiblock.dox source/SAMRAI/geom/dox/manual_multiblock_grid_geom.dox source/SAMRAI/geom/dox/manual_multiblock_patch_geom.dox source/SAMRAI/geom/dox/manual_skeleton.dox source/SAMRAI/geom/dox/manual_skeleton_grid_geom.dox source/SAMRAI/geom/dox/manual_skeleton_operators.dox source/SAMRAI/geom/dox/manual_skeleton_patch_geom.dox source/SAMRAI/geom/fortran/Makefile.depend source/SAMRAI/geom/fortran/Makefile.in source/SAMRAI/geom/fortran/geom_cartcoarsen1d.f source/SAMRAI/geom/fortran/geom_cartcoarsen1d.m4 source/SAMRAI/geom/fortran/geom_cartcoarsen2d.f source/SAMRAI/geom/fortran/geom_cartcoarsen2d.m4 source/SAMRAI/geom/fortran/geom_cartcoarsen3d.f source/SAMRAI/geom/fortran/geom_cartcoarsen3d.m4 source/SAMRAI/geom/fortran/geom_cartrefine1d.f source/SAMRAI/geom/fortran/geom_cartrefine1d.m4 source/SAMRAI/geom/fortran/geom_cartrefine2d.f source/SAMRAI/geom/fortran/geom_cartrefine2d.m4 source/SAMRAI/geom/fortran/geom_cartrefine3d.f source/SAMRAI/geom/fortran/geom_cartrefine3d.m4 source/SAMRAI/geom/fortran/geom_m4cartcoarsenops1d.i source/SAMRAI/geom/fortran/geom_m4cartcoarsenops2d.i source/SAMRAI/geom/fortran/geom_m4cartcoarsenops3d.i source/SAMRAI/geom/fortran/geom_m4cartopstuff.i source/SAMRAI/geom/fortran/geom_m4cartrefineops1d.i source/SAMRAI/geom/fortran/geom_m4cartrefineops2d.i source/SAMRAI/geom/fortran/geom_m4cartrefineops3d.i source/SAMRAI/hier/BasePatchHierarchy.C source/SAMRAI/hier/BasePatchHierarchy.I source/SAMRAI/hier/BasePatchHierarchy.h source/SAMRAI/hier/BasePatchLevel.C source/SAMRAI/hier/BasePatchLevel.I source/SAMRAI/hier/BasePatchLevel.h source/SAMRAI/hier/BlockPatchGeometry.C source/SAMRAI/hier/BlockPatchGeometry.I source/SAMRAI/hier/BlockPatchGeometry.h source/SAMRAI/hier/BoundaryBox.C source/SAMRAI/hier/BoundaryBox.I source/SAMRAI/hier/BoundaryBox.h source/SAMRAI/hier/BoundaryBoxUtils.C source/SAMRAI/hier/BoundaryBoxUtils.h source/SAMRAI/hier/BoundaryLookupTable.C source/SAMRAI/hier/BoundaryLookupTable.I source/SAMRAI/hier/BoundaryLookupTable.h source/SAMRAI/hier/Box.C source/SAMRAI/hier/Box.I source/SAMRAI/hier/Box.h source/SAMRAI/hier/BoxArray.C source/SAMRAI/hier/BoxArray.I source/SAMRAI/hier/BoxArray.h source/SAMRAI/hier/BoxGeometry.C source/SAMRAI/hier/BoxGeometry.I source/SAMRAI/hier/BoxGeometry.h source/SAMRAI/hier/BoxGraphUtilities.C source/SAMRAI/hier/BoxGraphUtilities.h source/SAMRAI/hier/BoxIOUtility.C source/SAMRAI/hier/BoxIOUtility.h source/SAMRAI/hier/BoxList.C source/SAMRAI/hier/BoxList.I source/SAMRAI/hier/BoxList.h source/SAMRAI/hier/BoxOverlap.C source/SAMRAI/hier/BoxOverlap.I source/SAMRAI/hier/BoxOverlap.h source/SAMRAI/hier/BoxTree.C source/SAMRAI/hier/BoxTree.h source/SAMRAI/hier/BoxTreeNode.C source/SAMRAI/hier/BoxTreeNode.h source/SAMRAI/hier/BoxUtilities.C source/SAMRAI/hier/BoxUtilities.h source/SAMRAI/hier/CoarseFineBoundary.C source/SAMRAI/hier/CoarseFineBoundary.h source/SAMRAI/hier/ComponentSelector.C source/SAMRAI/hier/ComponentSelector.I source/SAMRAI/hier/ComponentSelector.h source/SAMRAI/hier/Connector.C source/SAMRAI/hier/Connector.I source/SAMRAI/hier/Connector.h source/SAMRAI/hier/ErrorCheckIntTypes.h source/SAMRAI/hier/GlobalId.C source/SAMRAI/hier/GlobalId.I source/SAMRAI/hier/GlobalId.h source/SAMRAI/hier/GridGeometry.C source/SAMRAI/hier/GridGeometry.I source/SAMRAI/hier/GridGeometry.h source/SAMRAI/hier/Index.C source/SAMRAI/hier/Index.I source/SAMRAI/hier/Index.h source/SAMRAI/hier/IntVector.C source/SAMRAI/hier/IntVector.I source/SAMRAI/hier/IntVector.h source/SAMRAI/hier/LocalId.C source/SAMRAI/hier/LocalId.I source/SAMRAI/hier/LocalId.h source/SAMRAI/hier/MBUtilities.C source/SAMRAI/hier/MBUtilities.h source/SAMRAI/hier/Makefile.depend source/SAMRAI/hier/Makefile.in source/SAMRAI/hier/MappedBox.C source/SAMRAI/hier/MappedBox.I source/SAMRAI/hier/MappedBox.h source/SAMRAI/hier/MappedBoxContainerUtils.C source/SAMRAI/hier/MappedBoxContainerUtils.I source/SAMRAI/hier/MappedBoxContainerUtils.h source/SAMRAI/hier/MappedBoxId.C source/SAMRAI/hier/MappedBoxId.I source/SAMRAI/hier/MappedBoxId.h source/SAMRAI/hier/MappedBoxLevel.C source/SAMRAI/hier/MappedBoxLevel.I source/SAMRAI/hier/MappedBoxLevel.h source/SAMRAI/hier/MappedBoxLevelConnectorUtils.C source/SAMRAI/hier/MappedBoxLevelConnectorUtils.I source/SAMRAI/hier/MappedBoxLevelConnectorUtils.h source/SAMRAI/hier/MappedBoxLevelHandle.C source/SAMRAI/hier/MappedBoxLevelHandle.h source/SAMRAI/hier/MappedBoxSet.C source/SAMRAI/hier/MappedBoxSet.I source/SAMRAI/hier/MappedBoxSet.h source/SAMRAI/hier/MappedBoxTree.C source/SAMRAI/hier/MappedBoxTree.h source/SAMRAI/hier/MappingConnectorAlgorithm.C source/SAMRAI/hier/MappingConnectorAlgorithm.h source/SAMRAI/hier/MultiblockDataTranslator.C source/SAMRAI/hier/MultiblockDataTranslator.h source/SAMRAI/hier/MultiblockGridGeometry.C source/SAMRAI/hier/MultiblockGridGeometry.I source/SAMRAI/hier/MultiblockGridGeometry.h source/SAMRAI/hier/MultiblockPatchHierarchy.C source/SAMRAI/hier/MultiblockPatchHierarchy.I source/SAMRAI/hier/MultiblockPatchHierarchy.h source/SAMRAI/hier/MultiblockPatchLevel.C source/SAMRAI/hier/MultiblockPatchLevel.I source/SAMRAI/hier/MultiblockPatchLevel.h source/SAMRAI/hier/MultiblockPatchLevelIterator.C source/SAMRAI/hier/MultiblockPatchLevelIterator.I source/SAMRAI/hier/MultiblockPatchLevelIterator.h source/SAMRAI/hier/NeighborhoodSet.C source/SAMRAI/hier/NeighborhoodSet.I source/SAMRAI/hier/NeighborhoodSet.h source/SAMRAI/hier/OverlapConnectorAlgorithm.C source/SAMRAI/hier/OverlapConnectorAlgorithm.h source/SAMRAI/hier/Patch.C source/SAMRAI/hier/Patch.I source/SAMRAI/hier/Patch.h source/SAMRAI/hier/PatchBoundaries.C source/SAMRAI/hier/PatchBoundaries.I source/SAMRAI/hier/PatchBoundaries.h source/SAMRAI/hier/PatchData.C source/SAMRAI/hier/PatchData.I source/SAMRAI/hier/PatchData.h source/SAMRAI/hier/PatchDataFactory.C source/SAMRAI/hier/PatchDataFactory.I source/SAMRAI/hier/PatchDataFactory.h source/SAMRAI/hier/PatchDescriptor.C source/SAMRAI/hier/PatchDescriptor.I source/SAMRAI/hier/PatchDescriptor.h source/SAMRAI/hier/PatchFactory.C source/SAMRAI/hier/PatchFactory.I source/SAMRAI/hier/PatchFactory.h source/SAMRAI/hier/PatchGeometry.C source/SAMRAI/hier/PatchGeometry.I source/SAMRAI/hier/PatchGeometry.h source/SAMRAI/hier/PatchHierarchy.C source/SAMRAI/hier/PatchHierarchy.I source/SAMRAI/hier/PatchHierarchy.h source/SAMRAI/hier/PatchLevel.C source/SAMRAI/hier/PatchLevel.I source/SAMRAI/hier/PatchLevel.h source/SAMRAI/hier/PatchLevelFactory.C source/SAMRAI/hier/PatchLevelFactory.I source/SAMRAI/hier/PatchLevelFactory.h source/SAMRAI/hier/PeriodicShiftCatalog.C source/SAMRAI/hier/PeriodicShiftCatalog.I source/SAMRAI/hier/PeriodicShiftCatalog.h source/SAMRAI/hier/PersistentOverlapConnectors.C source/SAMRAI/hier/PersistentOverlapConnectors.h source/SAMRAI/hier/ProcessorMapping.C source/SAMRAI/hier/ProcessorMapping.I source/SAMRAI/hier/ProcessorMapping.h source/SAMRAI/hier/RealMappedBoxConstIterator.C source/SAMRAI/hier/RealMappedBoxConstIterator.h source/SAMRAI/hier/Variable.C source/SAMRAI/hier/Variable.I source/SAMRAI/hier/Variable.h source/SAMRAI/hier/VariableContext.C source/SAMRAI/hier/VariableContext.I source/SAMRAI/hier/VariableContext.h source/SAMRAI/hier/VariableDatabase.C source/SAMRAI/hier/VariableDatabase.I source/SAMRAI/hier/VariableDatabase.h source/SAMRAI/hier/dox/manual.dox source/SAMRAI/hier/dox/manual_boxes.dox source/SAMRAI/hier/dox/manual_dlbg.dox source/SAMRAI/hier/dox/manual_multiblock.dox source/SAMRAI/hier/dox/manual_patches.dox source/SAMRAI/hier/dox/manual_variables.dox source/SAMRAI/mainpage.dox source/SAMRAI/math/ArrayDataBasicOps.C source/SAMRAI/math/ArrayDataBasicOps.h source/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C source/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h source/SAMRAI/math/ArrayDataNormOpsComplex.C source/SAMRAI/math/ArrayDataNormOpsComplex.h source/SAMRAI/math/ArrayDataNormOpsInteger.C source/SAMRAI/math/ArrayDataNormOpsInteger.h source/SAMRAI/math/ArrayDataNormOpsReal.C source/SAMRAI/math/ArrayDataNormOpsReal.h source/SAMRAI/math/HierarchyCellDataOpsComplex.C source/SAMRAI/math/HierarchyCellDataOpsComplex.h source/SAMRAI/math/HierarchyCellDataOpsInteger.C source/SAMRAI/math/HierarchyCellDataOpsInteger.h source/SAMRAI/math/HierarchyCellDataOpsReal.C source/SAMRAI/math/HierarchyCellDataOpsReal.h source/SAMRAI/math/HierarchyDataOpsComplex.C source/SAMRAI/math/HierarchyDataOpsComplex.h source/SAMRAI/math/HierarchyDataOpsInteger.C source/SAMRAI/math/HierarchyDataOpsInteger.h source/SAMRAI/math/HierarchyDataOpsManager.C source/SAMRAI/math/HierarchyDataOpsManager.h source/SAMRAI/math/HierarchyDataOpsReal.C source/SAMRAI/math/HierarchyDataOpsReal.h source/SAMRAI/math/HierarchyEdgeDataOpsComplex.C source/SAMRAI/math/HierarchyEdgeDataOpsComplex.h source/SAMRAI/math/HierarchyEdgeDataOpsInteger.C source/SAMRAI/math/HierarchyEdgeDataOpsInteger.h source/SAMRAI/math/HierarchyEdgeDataOpsReal.C source/SAMRAI/math/HierarchyEdgeDataOpsReal.h source/SAMRAI/math/HierarchyFaceDataOpsComplex.C source/SAMRAI/math/HierarchyFaceDataOpsComplex.h source/SAMRAI/math/HierarchyFaceDataOpsInteger.C source/SAMRAI/math/HierarchyFaceDataOpsInteger.h source/SAMRAI/math/HierarchyFaceDataOpsReal.C source/SAMRAI/math/HierarchyFaceDataOpsReal.h source/SAMRAI/math/HierarchyNodeDataOpsComplex.C source/SAMRAI/math/HierarchyNodeDataOpsComplex.h source/SAMRAI/math/HierarchyNodeDataOpsInteger.C source/SAMRAI/math/HierarchyNodeDataOpsInteger.h source/SAMRAI/math/HierarchyNodeDataOpsReal.C source/SAMRAI/math/HierarchyNodeDataOpsReal.h source/SAMRAI/math/HierarchySideDataOpsComplex.C source/SAMRAI/math/HierarchySideDataOpsComplex.h source/SAMRAI/math/HierarchySideDataOpsInteger.C source/SAMRAI/math/HierarchySideDataOpsInteger.h source/SAMRAI/math/HierarchySideDataOpsReal.C source/SAMRAI/math/HierarchySideDataOpsReal.h source/SAMRAI/math/Makefile.depend source/SAMRAI/math/Makefile.in source/SAMRAI/math/PatchCellDataBasicOps.C source/SAMRAI/math/PatchCellDataBasicOps.h source/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C source/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h source/SAMRAI/math/PatchCellDataNormOpsComplex.C source/SAMRAI/math/PatchCellDataNormOpsComplex.h source/SAMRAI/math/PatchCellDataNormOpsReal.C source/SAMRAI/math/PatchCellDataNormOpsReal.h source/SAMRAI/math/PatchCellDataOpsComplex.C source/SAMRAI/math/PatchCellDataOpsComplex.h source/SAMRAI/math/PatchCellDataOpsInteger.C source/SAMRAI/math/PatchCellDataOpsInteger.h source/SAMRAI/math/PatchCellDataOpsReal.C source/SAMRAI/math/PatchCellDataOpsReal.h source/SAMRAI/math/PatchEdgeDataBasicOps.C source/SAMRAI/math/PatchEdgeDataBasicOps.h source/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C source/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h source/SAMRAI/math/PatchEdgeDataNormOpsComplex.C source/SAMRAI/math/PatchEdgeDataNormOpsComplex.h source/SAMRAI/math/PatchEdgeDataNormOpsReal.C source/SAMRAI/math/PatchEdgeDataNormOpsReal.h source/SAMRAI/math/PatchEdgeDataOpsComplex.C source/SAMRAI/math/PatchEdgeDataOpsComplex.h source/SAMRAI/math/PatchEdgeDataOpsInteger.C source/SAMRAI/math/PatchEdgeDataOpsInteger.h source/SAMRAI/math/PatchEdgeDataOpsReal.C source/SAMRAI/math/PatchEdgeDataOpsReal.h source/SAMRAI/math/PatchFaceDataBasicOps.C source/SAMRAI/math/PatchFaceDataBasicOps.h source/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C source/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h source/SAMRAI/math/PatchFaceDataNormOpsComplex.C source/SAMRAI/math/PatchFaceDataNormOpsComplex.h source/SAMRAI/math/PatchFaceDataNormOpsReal.C source/SAMRAI/math/PatchFaceDataNormOpsReal.h source/SAMRAI/math/PatchFaceDataOpsComplex.C source/SAMRAI/math/PatchFaceDataOpsComplex.h source/SAMRAI/math/PatchFaceDataOpsInteger.C source/SAMRAI/math/PatchFaceDataOpsInteger.h source/SAMRAI/math/PatchFaceDataOpsReal.C source/SAMRAI/math/PatchFaceDataOpsReal.h source/SAMRAI/math/PatchNodeDataBasicOps.C source/SAMRAI/math/PatchNodeDataBasicOps.h source/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C source/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h source/SAMRAI/math/PatchNodeDataNormOpsComplex.C source/SAMRAI/math/PatchNodeDataNormOpsComplex.h source/SAMRAI/math/PatchNodeDataNormOpsReal.C source/SAMRAI/math/PatchNodeDataNormOpsReal.h source/SAMRAI/math/PatchNodeDataOpsComplex.C source/SAMRAI/math/PatchNodeDataOpsComplex.h source/SAMRAI/math/PatchNodeDataOpsInteger.C source/SAMRAI/math/PatchNodeDataOpsInteger.h source/SAMRAI/math/PatchNodeDataOpsReal.C source/SAMRAI/math/PatchNodeDataOpsReal.h source/SAMRAI/math/PatchSideDataBasicOps.C source/SAMRAI/math/PatchSideDataBasicOps.h source/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C source/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h source/SAMRAI/math/PatchSideDataNormOpsComplex.C source/SAMRAI/math/PatchSideDataNormOpsComplex.h source/SAMRAI/math/PatchSideDataNormOpsReal.C source/SAMRAI/math/PatchSideDataNormOpsReal.h source/SAMRAI/math/PatchSideDataOpsComplex.C source/SAMRAI/math/PatchSideDataOpsComplex.h source/SAMRAI/math/PatchSideDataOpsInteger.C source/SAMRAI/math/PatchSideDataOpsInteger.h source/SAMRAI/math/PatchSideDataOpsReal.C source/SAMRAI/math/PatchSideDataOpsReal.h source/SAMRAI/math/dox/manual.dox source/SAMRAI/math/dox/manual_array.dox source/SAMRAI/math/dox/manual_cell.dox source/SAMRAI/math/dox/manual_hierarchy.dox source/SAMRAI/mesh/BalanceUtilities.C source/SAMRAI/mesh/BalanceUtilities.h source/SAMRAI/mesh/BaseGriddingAlgorithm.C source/SAMRAI/mesh/BaseGriddingAlgorithm.h source/SAMRAI/mesh/BergerRigoutsos.C source/SAMRAI/mesh/BergerRigoutsos.h source/SAMRAI/mesh/BergerRigoutsosNode.C source/SAMRAI/mesh/BergerRigoutsosNode.h source/SAMRAI/mesh/BoxGeneratorStrategy.C source/SAMRAI/mesh/BoxGeneratorStrategy.h source/SAMRAI/mesh/ChopAndPackLoadBalancer.C source/SAMRAI/mesh/ChopAndPackLoadBalancer.h source/SAMRAI/mesh/GriddingAlgorithm.C source/SAMRAI/mesh/GriddingAlgorithm.I source/SAMRAI/mesh/GriddingAlgorithm.h source/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.C source/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h source/SAMRAI/mesh/LoadBalanceStrategy.C source/SAMRAI/mesh/LoadBalanceStrategy.h source/SAMRAI/mesh/Makefile.depend source/SAMRAI/mesh/Makefile.in source/SAMRAI/mesh/MultiblockGriddingAlgorithm.C source/SAMRAI/mesh/MultiblockGriddingAlgorithm.I source/SAMRAI/mesh/MultiblockGriddingAlgorithm.h source/SAMRAI/mesh/MultiblockGriddingTagger.C source/SAMRAI/mesh/MultiblockGriddingTagger.h source/SAMRAI/mesh/SpatialKey.C source/SAMRAI/mesh/SpatialKey.I source/SAMRAI/mesh/SpatialKey.h source/SAMRAI/mesh/StandardTagAndInitStrategy.C source/SAMRAI/mesh/StandardTagAndInitStrategy.h source/SAMRAI/mesh/StandardTagAndInitialize.C source/SAMRAI/mesh/StandardTagAndInitialize.I source/SAMRAI/mesh/StandardTagAndInitialize.h source/SAMRAI/mesh/StandardTagAndInitializeConnectorWidthRequestor.C source/SAMRAI/mesh/StandardTagAndInitializeConnectorWidthRequestor.h source/SAMRAI/mesh/TagAndInitializeStrategy.C source/SAMRAI/mesh/TagAndInitializeStrategy.h source/SAMRAI/mesh/TreeLoadBalancer.C source/SAMRAI/mesh/TreeLoadBalancer.I source/SAMRAI/mesh/TreeLoadBalancer.h source/SAMRAI/mesh/dox/manual.dox source/SAMRAI/mesh/dox/manual_clustering.dox source/SAMRAI/mesh/dox/manual_gridding.dox source/SAMRAI/mesh/dox/manual_load_balance.dox source/SAMRAI/mesh/dox/manual_multiblock.dox source/SAMRAI/mesh/fortran/Makefile.depend source/SAMRAI/mesh/fortran/Makefile.in source/SAMRAI/mesh/fortran/mesh_coarsentags1d.f source/SAMRAI/mesh/fortran/mesh_coarsentags1d.m4 source/SAMRAI/mesh/fortran/mesh_coarsentags2d.f source/SAMRAI/mesh/fortran/mesh_coarsentags2d.m4 source/SAMRAI/mesh/fortran/mesh_coarsentags3d.f source/SAMRAI/mesh/fortran/mesh_coarsentags3d.m4 source/SAMRAI/pdat/ArrayData.C source/SAMRAI/pdat/ArrayData.I source/SAMRAI/pdat/ArrayData.h source/SAMRAI/pdat/ArrayDataAccess.C source/SAMRAI/pdat/ArrayDataAccess.h source/SAMRAI/pdat/ArrayDataIterator.C source/SAMRAI/pdat/ArrayDataIterator.I source/SAMRAI/pdat/ArrayDataIterator.h source/SAMRAI/pdat/ArrayDataOperationUtilities.C source/SAMRAI/pdat/ArrayDataOperationUtilities.h source/SAMRAI/pdat/CellComplexConstantRefine.C source/SAMRAI/pdat/CellComplexConstantRefine.h source/SAMRAI/pdat/CellComplexLinearTimeInterpolateOp.C source/SAMRAI/pdat/CellComplexLinearTimeInterpolateOp.h source/SAMRAI/pdat/CellData.C source/SAMRAI/pdat/CellData.I source/SAMRAI/pdat/CellData.h source/SAMRAI/pdat/CellDataFactory.C source/SAMRAI/pdat/CellDataFactory.I source/SAMRAI/pdat/CellDataFactory.h source/SAMRAI/pdat/CellDoubleConstantRefine.C source/SAMRAI/pdat/CellDoubleConstantRefine.h source/SAMRAI/pdat/CellDoubleLinearTimeInterpolateOp.C source/SAMRAI/pdat/CellDoubleLinearTimeInterpolateOp.h source/SAMRAI/pdat/CellFloatConstantRefine.C source/SAMRAI/pdat/CellFloatConstantRefine.h source/SAMRAI/pdat/CellFloatLinearTimeInterpolateOp.C source/SAMRAI/pdat/CellFloatLinearTimeInterpolateOp.h source/SAMRAI/pdat/CellGeometry.C source/SAMRAI/pdat/CellGeometry.I source/SAMRAI/pdat/CellGeometry.h source/SAMRAI/pdat/CellIndex.C source/SAMRAI/pdat/CellIndex.I source/SAMRAI/pdat/CellIndex.h source/SAMRAI/pdat/CellIntegerConstantRefine.C source/SAMRAI/pdat/CellIntegerConstantRefine.h source/SAMRAI/pdat/CellIterator.C source/SAMRAI/pdat/CellIterator.I source/SAMRAI/pdat/CellIterator.h source/SAMRAI/pdat/CellOverlap.C source/SAMRAI/pdat/CellOverlap.I source/SAMRAI/pdat/CellOverlap.h source/SAMRAI/pdat/CellVariable.C source/SAMRAI/pdat/CellVariable.h source/SAMRAI/pdat/CopyOperation.C source/SAMRAI/pdat/CopyOperation.I source/SAMRAI/pdat/CopyOperation.h source/SAMRAI/pdat/EdgeComplexConstantRefine.C source/SAMRAI/pdat/EdgeComplexConstantRefine.h source/SAMRAI/pdat/EdgeComplexLinearTimeInterpolateOp.C source/SAMRAI/pdat/EdgeComplexLinearTimeInterpolateOp.h source/SAMRAI/pdat/EdgeData.C source/SAMRAI/pdat/EdgeData.I source/SAMRAI/pdat/EdgeData.h source/SAMRAI/pdat/EdgeDataFactory.C source/SAMRAI/pdat/EdgeDataFactory.I source/SAMRAI/pdat/EdgeDataFactory.h source/SAMRAI/pdat/EdgeDoubleConstantRefine.C source/SAMRAI/pdat/EdgeDoubleConstantRefine.h source/SAMRAI/pdat/EdgeDoubleLinearTimeInterpolateOp.C source/SAMRAI/pdat/EdgeDoubleLinearTimeInterpolateOp.h source/SAMRAI/pdat/EdgeFloatConstantRefine.C source/SAMRAI/pdat/EdgeFloatConstantRefine.h source/SAMRAI/pdat/EdgeFloatLinearTimeInterpolateOp.C source/SAMRAI/pdat/EdgeFloatLinearTimeInterpolateOp.h source/SAMRAI/pdat/EdgeGeometry.C source/SAMRAI/pdat/EdgeGeometry.I source/SAMRAI/pdat/EdgeGeometry.h source/SAMRAI/pdat/EdgeIndex.C source/SAMRAI/pdat/EdgeIndex.I source/SAMRAI/pdat/EdgeIndex.h source/SAMRAI/pdat/EdgeIntegerConstantRefine.C source/SAMRAI/pdat/EdgeIntegerConstantRefine.h source/SAMRAI/pdat/EdgeIterator.C source/SAMRAI/pdat/EdgeIterator.I source/SAMRAI/pdat/EdgeIterator.h source/SAMRAI/pdat/EdgeOverlap.C source/SAMRAI/pdat/EdgeOverlap.I source/SAMRAI/pdat/EdgeOverlap.h source/SAMRAI/pdat/EdgeVariable.C source/SAMRAI/pdat/EdgeVariable.h source/SAMRAI/pdat/FaceComplexConstantRefine.C source/SAMRAI/pdat/FaceComplexConstantRefine.h source/SAMRAI/pdat/FaceComplexLinearTimeInterpolateOp.C source/SAMRAI/pdat/FaceComplexLinearTimeInterpolateOp.h source/SAMRAI/pdat/FaceData.C source/SAMRAI/pdat/FaceData.I source/SAMRAI/pdat/FaceData.h source/SAMRAI/pdat/FaceDataFactory.C source/SAMRAI/pdat/FaceDataFactory.I source/SAMRAI/pdat/FaceDataFactory.h source/SAMRAI/pdat/FaceDoubleConstantRefine.C source/SAMRAI/pdat/FaceDoubleConstantRefine.h source/SAMRAI/pdat/FaceDoubleLinearTimeInterpolateOp.C source/SAMRAI/pdat/FaceDoubleLinearTimeInterpolateOp.h source/SAMRAI/pdat/FaceFloatConstantRefine.C source/SAMRAI/pdat/FaceFloatConstantRefine.h source/SAMRAI/pdat/FaceFloatLinearTimeInterpolateOp.C source/SAMRAI/pdat/FaceFloatLinearTimeInterpolateOp.h source/SAMRAI/pdat/FaceGeometry.C source/SAMRAI/pdat/FaceGeometry.I source/SAMRAI/pdat/FaceGeometry.h source/SAMRAI/pdat/FaceIndex.C source/SAMRAI/pdat/FaceIndex.I source/SAMRAI/pdat/FaceIndex.h source/SAMRAI/pdat/FaceIntegerConstantRefine.C source/SAMRAI/pdat/FaceIntegerConstantRefine.h source/SAMRAI/pdat/FaceIterator.C source/SAMRAI/pdat/FaceIterator.I source/SAMRAI/pdat/FaceIterator.h source/SAMRAI/pdat/FaceOverlap.C source/SAMRAI/pdat/FaceOverlap.I source/SAMRAI/pdat/FaceOverlap.h source/SAMRAI/pdat/FaceVariable.C source/SAMRAI/pdat/FaceVariable.h source/SAMRAI/pdat/FirstLayerCellNoCornersVariableFillPattern.C source/SAMRAI/pdat/FirstLayerCellNoCornersVariableFillPattern.h source/SAMRAI/pdat/FirstLayerCellVariableFillPattern.C source/SAMRAI/pdat/FirstLayerCellVariableFillPattern.h source/SAMRAI/pdat/FirstLayerNodeVariableFillPattern.C source/SAMRAI/pdat/FirstLayerNodeVariableFillPattern.h source/SAMRAI/pdat/IndexData.C source/SAMRAI/pdat/IndexData.I source/SAMRAI/pdat/IndexData.h source/SAMRAI/pdat/IndexDataFactory.C source/SAMRAI/pdat/IndexDataFactory.h source/SAMRAI/pdat/IndexVariable.C source/SAMRAI/pdat/IndexVariable.h source/SAMRAI/pdat/MBDataUtilities.C source/SAMRAI/pdat/MBDataUtilities.h source/SAMRAI/pdat/MDA_Access.h source/SAMRAI/pdat/Makefile.depend source/SAMRAI/pdat/Makefile.in source/SAMRAI/pdat/MultiblockCellDataTranslator.C source/SAMRAI/pdat/MultiblockCellDataTranslator.h source/SAMRAI/pdat/MultiblockEdgeDataTranslator.C source/SAMRAI/pdat/MultiblockEdgeDataTranslator.h source/SAMRAI/pdat/MultiblockFaceDataTranslator.C source/SAMRAI/pdat/MultiblockFaceDataTranslator.h source/SAMRAI/pdat/MultiblockNodeDataTranslator.C source/SAMRAI/pdat/MultiblockNodeDataTranslator.h source/SAMRAI/pdat/MultiblockSideDataTranslator.C source/SAMRAI/pdat/MultiblockSideDataTranslator.h source/SAMRAI/pdat/NodeComplexInjection.C source/SAMRAI/pdat/NodeComplexInjection.h source/SAMRAI/pdat/NodeComplexLinearTimeInterpolateOp.C source/SAMRAI/pdat/NodeComplexLinearTimeInterpolateOp.h source/SAMRAI/pdat/NodeData.C source/SAMRAI/pdat/NodeData.I source/SAMRAI/pdat/NodeData.h source/SAMRAI/pdat/NodeDataFactory.C source/SAMRAI/pdat/NodeDataFactory.I source/SAMRAI/pdat/NodeDataFactory.h source/SAMRAI/pdat/NodeDoubleInjection.C source/SAMRAI/pdat/NodeDoubleInjection.h source/SAMRAI/pdat/NodeDoubleLinearTimeInterpolateOp.C source/SAMRAI/pdat/NodeDoubleLinearTimeInterpolateOp.h source/SAMRAI/pdat/NodeFloatInjection.C source/SAMRAI/pdat/NodeFloatInjection.h source/SAMRAI/pdat/NodeFloatLinearTimeInterpolateOp.C source/SAMRAI/pdat/NodeFloatLinearTimeInterpolateOp.h source/SAMRAI/pdat/NodeGeometry.C source/SAMRAI/pdat/NodeGeometry.I source/SAMRAI/pdat/NodeGeometry.h source/SAMRAI/pdat/NodeIndex.C source/SAMRAI/pdat/NodeIndex.I source/SAMRAI/pdat/NodeIndex.h source/SAMRAI/pdat/NodeIntegerInjection.C source/SAMRAI/pdat/NodeIntegerInjection.h source/SAMRAI/pdat/NodeIterator.C source/SAMRAI/pdat/NodeIterator.I source/SAMRAI/pdat/NodeIterator.h source/SAMRAI/pdat/NodeOverlap.C source/SAMRAI/pdat/NodeOverlap.I source/SAMRAI/pdat/NodeOverlap.h source/SAMRAI/pdat/NodeVariable.C source/SAMRAI/pdat/NodeVariable.h source/SAMRAI/pdat/OuteredgeData.C source/SAMRAI/pdat/OuteredgeData.I source/SAMRAI/pdat/OuteredgeData.h source/SAMRAI/pdat/OuteredgeDataFactory.C source/SAMRAI/pdat/OuteredgeDataFactory.I source/SAMRAI/pdat/OuteredgeDataFactory.h source/SAMRAI/pdat/OuteredgeGeometry.C source/SAMRAI/pdat/OuteredgeGeometry.I source/SAMRAI/pdat/OuteredgeGeometry.h source/SAMRAI/pdat/OuteredgeVariable.C source/SAMRAI/pdat/OuteredgeVariable.h source/SAMRAI/pdat/OuterfaceComplexConstantRefine.C source/SAMRAI/pdat/OuterfaceComplexConstantRefine.h source/SAMRAI/pdat/OuterfaceComplexLinearTimeInterpolateOp.C source/SAMRAI/pdat/OuterfaceComplexLinearTimeInterpolateOp.h source/SAMRAI/pdat/OuterfaceData.C source/SAMRAI/pdat/OuterfaceData.I source/SAMRAI/pdat/OuterfaceData.h source/SAMRAI/pdat/OuterfaceDataFactory.C source/SAMRAI/pdat/OuterfaceDataFactory.I source/SAMRAI/pdat/OuterfaceDataFactory.h source/SAMRAI/pdat/OuterfaceDoubleConstantRefine.C source/SAMRAI/pdat/OuterfaceDoubleConstantRefine.h source/SAMRAI/pdat/OuterfaceDoubleLinearTimeInterpolateOp.C source/SAMRAI/pdat/OuterfaceDoubleLinearTimeInterpolateOp.h source/SAMRAI/pdat/OuterfaceFloatConstantRefine.C source/SAMRAI/pdat/OuterfaceFloatConstantRefine.h source/SAMRAI/pdat/OuterfaceFloatLinearTimeInterpolateOp.C source/SAMRAI/pdat/OuterfaceFloatLinearTimeInterpolateOp.h source/SAMRAI/pdat/OuterfaceGeometry.C source/SAMRAI/pdat/OuterfaceGeometry.I source/SAMRAI/pdat/OuterfaceGeometry.h source/SAMRAI/pdat/OuterfaceIntegerConstantRefine.C source/SAMRAI/pdat/OuterfaceIntegerConstantRefine.h source/SAMRAI/pdat/OuterfaceVariable.C source/SAMRAI/pdat/OuterfaceVariable.h source/SAMRAI/pdat/OuternodeData.C source/SAMRAI/pdat/OuternodeData.I source/SAMRAI/pdat/OuternodeData.h source/SAMRAI/pdat/OuternodeDataFactory.C source/SAMRAI/pdat/OuternodeDataFactory.I source/SAMRAI/pdat/OuternodeDataFactory.h source/SAMRAI/pdat/OuternodeDoubleConstantCoarsen.C source/SAMRAI/pdat/OuternodeDoubleConstantCoarsen.h source/SAMRAI/pdat/OuternodeGeometry.C source/SAMRAI/pdat/OuternodeGeometry.I source/SAMRAI/pdat/OuternodeGeometry.h source/SAMRAI/pdat/OuternodeVariable.C source/SAMRAI/pdat/OuternodeVariable.h source/SAMRAI/pdat/OutersideComplexLinearTimeInterpolateOp.C source/SAMRAI/pdat/OutersideComplexLinearTimeInterpolateOp.h source/SAMRAI/pdat/OutersideData.C source/SAMRAI/pdat/OutersideData.I source/SAMRAI/pdat/OutersideData.h source/SAMRAI/pdat/OutersideDataFactory.C source/SAMRAI/pdat/OutersideDataFactory.I source/SAMRAI/pdat/OutersideDataFactory.h source/SAMRAI/pdat/OutersideDoubleLinearTimeInterpolateOp.C source/SAMRAI/pdat/OutersideDoubleLinearTimeInterpolateOp.h source/SAMRAI/pdat/OutersideFloatLinearTimeInterpolateOp.C source/SAMRAI/pdat/OutersideFloatLinearTimeInterpolateOp.h source/SAMRAI/pdat/OutersideGeometry.C source/SAMRAI/pdat/OutersideGeometry.I source/SAMRAI/pdat/OutersideGeometry.h source/SAMRAI/pdat/OutersideVariable.C source/SAMRAI/pdat/OutersideVariable.h source/SAMRAI/pdat/SecondLayerNodeNoCornersVariableFillPattern.C source/SAMRAI/pdat/SecondLayerNodeNoCornersVariableFillPattern.h source/SAMRAI/pdat/SecondLayerNodeVariableFillPattern.C source/SAMRAI/pdat/SecondLayerNodeVariableFillPattern.h source/SAMRAI/pdat/SideComplexConstantRefine.C source/SAMRAI/pdat/SideComplexConstantRefine.h source/SAMRAI/pdat/SideComplexLinearTimeInterpolateOp.C source/SAMRAI/pdat/SideComplexLinearTimeInterpolateOp.h source/SAMRAI/pdat/SideData.C source/SAMRAI/pdat/SideData.I source/SAMRAI/pdat/SideData.h source/SAMRAI/pdat/SideDataFactory.C source/SAMRAI/pdat/SideDataFactory.I source/SAMRAI/pdat/SideDataFactory.h source/SAMRAI/pdat/SideDoubleConstantRefine.C source/SAMRAI/pdat/SideDoubleConstantRefine.h source/SAMRAI/pdat/SideDoubleLinearTimeInterpolateOp.C source/SAMRAI/pdat/SideDoubleLinearTimeInterpolateOp.h source/SAMRAI/pdat/SideFloatConstantRefine.C source/SAMRAI/pdat/SideFloatConstantRefine.h source/SAMRAI/pdat/SideFloatLinearTimeInterpolateOp.C source/SAMRAI/pdat/SideFloatLinearTimeInterpolateOp.h source/SAMRAI/pdat/SideGeometry.C source/SAMRAI/pdat/SideGeometry.I source/SAMRAI/pdat/SideGeometry.h source/SAMRAI/pdat/SideIndex.C source/SAMRAI/pdat/SideIndex.I source/SAMRAI/pdat/SideIndex.h source/SAMRAI/pdat/SideIntegerConstantRefine.C source/SAMRAI/pdat/SideIntegerConstantRefine.h source/SAMRAI/pdat/SideIterator.C source/SAMRAI/pdat/SideIterator.I source/SAMRAI/pdat/SideIterator.h source/SAMRAI/pdat/SideOverlap.C source/SAMRAI/pdat/SideOverlap.I source/SAMRAI/pdat/SideOverlap.h source/SAMRAI/pdat/SideVariable.C source/SAMRAI/pdat/SideVariable.h source/SAMRAI/pdat/SumOperation.C source/SAMRAI/pdat/SumOperation.I source/SAMRAI/pdat/SumOperation.h source/SAMRAI/pdat/dox/manual.dox source/SAMRAI/pdat/dox/manual_array.dox source/SAMRAI/pdat/dox/manual_boxgeometry.dox source/SAMRAI/pdat/dox/manual_cell.dox source/SAMRAI/pdat/dox/manual_edge.dox source/SAMRAI/pdat/dox/manual_face.dox source/SAMRAI/pdat/dox/manual_fortran.dox source/SAMRAI/pdat/dox/manual_index.dox source/SAMRAI/pdat/dox/manual_multiblock.dox source/SAMRAI/pdat/dox/manual_node.dox source/SAMRAI/pdat/dox/manual_operators.dox source/SAMRAI/pdat/dox/manual_operators_constant_cell.dox source/SAMRAI/pdat/dox/manual_operators_constant_fortran.dox source/SAMRAI/pdat/dox/manual_operators_constant_outernode.dox source/SAMRAI/pdat/dox/manual_operators_time_interpolate.dox source/SAMRAI/pdat/dox/manual_operators_time_interpolate_cell.dox source/SAMRAI/pdat/dox/manual_operators_time_interpolate_fortran.dox source/SAMRAI/pdat/dox/manual_outeredge.dox source/SAMRAI/pdat/dox/manual_outerface.dox source/SAMRAI/pdat/dox/manual_outernode.dox source/SAMRAI/pdat/dox/manual_outerside.dox source/SAMRAI/pdat/dox/manual_side.dox source/SAMRAI/pdat/fortran/Makefile.depend source/SAMRAI/pdat/fortran/Makefile.in source/SAMRAI/pdat/fortran/pdat_concoarsen1d.f source/SAMRAI/pdat/fortran/pdat_concoarsen1d.m4 source/SAMRAI/pdat/fortran/pdat_concoarsen2d.f source/SAMRAI/pdat/fortran/pdat_concoarsen2d.m4 source/SAMRAI/pdat/fortran/pdat_concoarsen3d.f source/SAMRAI/pdat/fortran/pdat_concoarsen3d.m4 source/SAMRAI/pdat/fortran/pdat_conrefine1d.f source/SAMRAI/pdat/fortran/pdat_conrefine1d.m4 source/SAMRAI/pdat/fortran/pdat_conrefine2d.f source/SAMRAI/pdat/fortran/pdat_conrefine2d.m4 source/SAMRAI/pdat/fortran/pdat_conrefine3d.f source/SAMRAI/pdat/fortran/pdat_conrefine3d.m4 source/SAMRAI/pdat/fortran/pdat_dbugfort1d.f source/SAMRAI/pdat/fortran/pdat_dbugfort1d.m4 source/SAMRAI/pdat/fortran/pdat_dbugfort2d.f source/SAMRAI/pdat/fortran/pdat_dbugfort2d.m4 source/SAMRAI/pdat/fortran/pdat_dbugfort3d.f source/SAMRAI/pdat/fortran/pdat_dbugfort3d.m4 source/SAMRAI/pdat/fortran/pdat_dbugstuff1d.i source/SAMRAI/pdat/fortran/pdat_dbugstuff2d.i source/SAMRAI/pdat/fortran/pdat_dbugstuff3d.i source/SAMRAI/pdat/fortran/pdat_lintimint1d.f source/SAMRAI/pdat/fortran/pdat_lintimint1d.m4 source/SAMRAI/pdat/fortran/pdat_lintimint2d.f source/SAMRAI/pdat/fortran/pdat_lintimint2d.m4 source/SAMRAI/pdat/fortran/pdat_lintimint3d.f source/SAMRAI/pdat/fortran/pdat_lintimint3d.m4 source/SAMRAI/pdat/fortran/pdat_m4arrdim1d.i source/SAMRAI/pdat/fortran/pdat_m4arrdim2d.i source/SAMRAI/pdat/fortran/pdat_m4arrdim3d.i source/SAMRAI/pdat/fortran/pdat_m4concoarsenops1d.i source/SAMRAI/pdat/fortran/pdat_m4concoarsenops2d.i source/SAMRAI/pdat/fortran/pdat_m4concoarsenops3d.i source/SAMRAI/pdat/fortran/pdat_m4conopstuff.i source/SAMRAI/pdat/fortran/pdat_m4conrefineops1d.i source/SAMRAI/pdat/fortran/pdat_m4conrefineops2d.i source/SAMRAI/pdat/fortran/pdat_m4conrefineops3d.i source/SAMRAI/pdat/fortran/pdat_m4lintimeintops1d.i source/SAMRAI/pdat/fortran/pdat_m4lintimeintops2d.i source/SAMRAI/pdat/fortran/pdat_m4lintimeintops3d.i source/SAMRAI/solv/CVODEAbstractFunctions.C source/SAMRAI/solv/CVODEAbstractFunctions.h source/SAMRAI/solv/CVODESolver.C source/SAMRAI/solv/CVODESolver.h source/SAMRAI/solv/CartesianRobinBcHelper.C source/SAMRAI/solv/CartesianRobinBcHelper.h source/SAMRAI/solv/CellPoissonFACOps.C source/SAMRAI/solv/CellPoissonFACOps.I source/SAMRAI/solv/CellPoissonFACOps.h source/SAMRAI/solv/CellPoissonFACSolver.C source/SAMRAI/solv/CellPoissonFACSolver.I source/SAMRAI/solv/CellPoissonFACSolver.h source/SAMRAI/solv/CellPoissonHypreSolver.C source/SAMRAI/solv/CellPoissonHypreSolver.I source/SAMRAI/solv/CellPoissonHypreSolver.h source/SAMRAI/solv/FACOperatorStrategy.C source/SAMRAI/solv/FACOperatorStrategy.h source/SAMRAI/solv/FACPreconditioner.C source/SAMRAI/solv/FACPreconditioner.I source/SAMRAI/solv/FACPreconditioner.h source/SAMRAI/solv/GhostCellRobinBcCoefs.C source/SAMRAI/solv/GhostCellRobinBcCoefs.h source/SAMRAI/solv/KINSOLAbstractFunctions.C source/SAMRAI/solv/KINSOLAbstractFunctions.h source/SAMRAI/solv/KINSOLSolver.C source/SAMRAI/solv/KINSOLSolver.h source/SAMRAI/solv/KINSOL_SAMRAIContext.C source/SAMRAI/solv/KINSOL_SAMRAIContext.h source/SAMRAI/solv/LocationIndexRobinBcCoefs.C source/SAMRAI/solv/LocationIndexRobinBcCoefs.h source/SAMRAI/solv/Makefile.depend source/SAMRAI/solv/Makefile.in source/SAMRAI/solv/NonlinearSolverStrategy.C source/SAMRAI/solv/NonlinearSolverStrategy.h source/SAMRAI/solv/PETScAbstractVectorReal.C source/SAMRAI/solv/PETScAbstractVectorReal.h source/SAMRAI/solv/PETSc_SAMRAIVectorReal.C source/SAMRAI/solv/PETSc_SAMRAIVectorReal.I source/SAMRAI/solv/PETSc_SAMRAIVectorReal.h source/SAMRAI/solv/PoissonSpecifications.C source/SAMRAI/solv/PoissonSpecifications.I source/SAMRAI/solv/PoissonSpecifications.h source/SAMRAI/solv/RobinBcCoefStrategy.C source/SAMRAI/solv/RobinBcCoefStrategy.h source/SAMRAI/solv/SAMRAIVectorReal.C source/SAMRAI/solv/SAMRAIVectorReal.I source/SAMRAI/solv/SAMRAIVectorReal.h source/SAMRAI/solv/SNESAbstractFunctions.C source/SAMRAI/solv/SNESAbstractFunctions.h source/SAMRAI/solv/SNES_SAMRAIContext.C source/SAMRAI/solv/SNES_SAMRAIContext.h source/SAMRAI/solv/SimpleCellRobinBcCoefs.C source/SAMRAI/solv/SimpleCellRobinBcCoefs.h source/SAMRAI/solv/SundialsAbstractVector.C source/SAMRAI/solv/SundialsAbstractVector.h source/SAMRAI/solv/Sundials_SAMRAIVector.C source/SAMRAI/solv/Sundials_SAMRAIVector.I source/SAMRAI/solv/Sundials_SAMRAIVector.h source/SAMRAI/solv/dox/manual.dox source/SAMRAI/solv/dox/manual_FAC.dox source/SAMRAI/solv/dox/manual_nonlinear.dox source/SAMRAI/solv/dox/manual_packages.dox source/SAMRAI/solv/dox/manual_packages_petsc.dox source/SAMRAI/solv/dox/manual_packages_sundials.dox source/SAMRAI/solv/dox/manual_packages_sundials_cvode.dox source/SAMRAI/solv/dox/manual_packages_sundials_kinsol.dox source/SAMRAI/solv/dox/manual_packages_sundials_vector.dox source/SAMRAI/solv/dox/manual_poisson.dox source/SAMRAI/solv/dox/manual_vectors.dox source/SAMRAI/solv/fortran/Makefile.depend source/SAMRAI/solv/fortran/Makefile.in source/SAMRAI/solv/fortran/solv_cartesianrobinbchelper2d.f source/SAMRAI/solv/fortran/solv_cartesianrobinbchelper3d.f source/SAMRAI/solv/fortran/solv_cellpoissonfacops2d.f source/SAMRAI/solv/fortran/solv_cellpoissonfacops3d.f source/SAMRAI/solv/fortran/solv_cellpoissonhypresolver2d.f source/SAMRAI/solv/fortran/solv_cellpoissonhypresolver3d.f source/SAMRAI/solv/nvector.h source/SAMRAI/solv/solv_NVector.C source/SAMRAI/solv/solv_NVector.h source/SAMRAI/tbox/Array.C source/SAMRAI/tbox/Array.I source/SAMRAI/tbox/Array.h source/SAMRAI/tbox/ArraySpecial.C source/SAMRAI/tbox/AsyncCommGroup.C source/SAMRAI/tbox/AsyncCommGroup.I source/SAMRAI/tbox/AsyncCommGroup.h source/SAMRAI/tbox/AsyncCommPeer.C source/SAMRAI/tbox/AsyncCommPeer.I source/SAMRAI/tbox/AsyncCommPeer.h source/SAMRAI/tbox/AsyncCommStage.C source/SAMRAI/tbox/AsyncCommStage.h source/SAMRAI/tbox/BalancedDepthFirstTree.C source/SAMRAI/tbox/BalancedDepthFirstTree.h source/SAMRAI/tbox/Clock.C source/SAMRAI/tbox/Clock.h source/SAMRAI/tbox/Complex.h source/SAMRAI/tbox/ConstPointer.C source/SAMRAI/tbox/ConstPointer.I source/SAMRAI/tbox/ConstPointer.h source/SAMRAI/tbox/ConstPointerBase.C source/SAMRAI/tbox/ConstPointerBase.I source/SAMRAI/tbox/ConstPointerBase.h source/SAMRAI/tbox/Database.C source/SAMRAI/tbox/Database.I source/SAMRAI/tbox/Database.h source/SAMRAI/tbox/DatabaseBox.C source/SAMRAI/tbox/DatabaseBox.I source/SAMRAI/tbox/DatabaseBox.h source/SAMRAI/tbox/DatabaseFactory.h source/SAMRAI/tbox/Database_template_methods.C source/SAMRAI/tbox/DescribedClass.C source/SAMRAI/tbox/DescribedClass.h source/SAMRAI/tbox/Dimension.C source/SAMRAI/tbox/Dimension.I source/SAMRAI/tbox/Dimension.h source/SAMRAI/tbox/Grammar.C source/SAMRAI/tbox/Grammar.h source/SAMRAI/tbox/Grammar.y source/SAMRAI/tbox/HDFDatabase.C source/SAMRAI/tbox/HDFDatabase.h source/SAMRAI/tbox/HDFDatabaseFactory.C source/SAMRAI/tbox/HDFDatabaseFactory.h source/SAMRAI/tbox/IEEE.C source/SAMRAI/tbox/IEEE.I source/SAMRAI/tbox/IEEE.h source/SAMRAI/tbox/IOStream.h source/SAMRAI/tbox/InputDatabase.h source/SAMRAI/tbox/InputManager.C source/SAMRAI/tbox/InputManager.h source/SAMRAI/tbox/List.C source/SAMRAI/tbox/List.I source/SAMRAI/tbox/List.h source/SAMRAI/tbox/Logger.C source/SAMRAI/tbox/Logger.h source/SAMRAI/tbox/Makefile.depend source/SAMRAI/tbox/Makefile.in source/SAMRAI/tbox/MathUtilities.C source/SAMRAI/tbox/MathUtilities.I source/SAMRAI/tbox/MathUtilities.h source/SAMRAI/tbox/MathUtilitiesSpecial.C source/SAMRAI/tbox/MemoryDatabase.C source/SAMRAI/tbox/MemoryDatabase.I source/SAMRAI/tbox/MemoryDatabase.h source/SAMRAI/tbox/MemoryDatabaseFactory.C source/SAMRAI/tbox/MemoryDatabaseFactory.h source/SAMRAI/tbox/MemoryUtilities.C source/SAMRAI/tbox/MemoryUtilities.h source/SAMRAI/tbox/MessageStream.C source/SAMRAI/tbox/MessageStream.I source/SAMRAI/tbox/MessageStream.h source/SAMRAI/tbox/MessageStream_template_methods.C source/SAMRAI/tbox/NullDatabase.C source/SAMRAI/tbox/NullDatabase.I source/SAMRAI/tbox/NullDatabase.h source/SAMRAI/tbox/PIO.C source/SAMRAI/tbox/PIO.h source/SAMRAI/tbox/ParallelBuffer.C source/SAMRAI/tbox/ParallelBuffer.h source/SAMRAI/tbox/Parser.C source/SAMRAI/tbox/Parser.I source/SAMRAI/tbox/Parser.h source/SAMRAI/tbox/Pointer.C source/SAMRAI/tbox/Pointer.I source/SAMRAI/tbox/Pointer.h source/SAMRAI/tbox/PointerBase.C source/SAMRAI/tbox/PointerBase.I source/SAMRAI/tbox/PointerBase.h source/SAMRAI/tbox/RankGroup.C source/SAMRAI/tbox/RankGroup.I source/SAMRAI/tbox/RankGroup.h source/SAMRAI/tbox/ReferenceCounter.C source/SAMRAI/tbox/ReferenceCounter.I source/SAMRAI/tbox/ReferenceCounter.h source/SAMRAI/tbox/RestartManager.C source/SAMRAI/tbox/RestartManager.I source/SAMRAI/tbox/RestartManager.h source/SAMRAI/tbox/SAMRAIManager.C source/SAMRAI/tbox/SAMRAIManager.h source/SAMRAI/tbox/SAMRAI_MPI.C source/SAMRAI/tbox/SAMRAI_MPI.I source/SAMRAI/tbox/SAMRAI_MPI.h source/SAMRAI/tbox/Scanner.C source/SAMRAI/tbox/Scanner.l source/SAMRAI/tbox/Schedule.C source/SAMRAI/tbox/Schedule.h source/SAMRAI/tbox/Serializable.h source/SAMRAI/tbox/SiloDatabase.C source/SAMRAI/tbox/SiloDatabase.h source/SAMRAI/tbox/SiloDatabaseFactory.C source/SAMRAI/tbox/SiloDatabaseFactory.h source/SAMRAI/tbox/StartupShutdownManager.C source/SAMRAI/tbox/StartupShutdownManager.h source/SAMRAI/tbox/StatTransaction.C source/SAMRAI/tbox/StatTransaction.h source/SAMRAI/tbox/Statistic.C source/SAMRAI/tbox/Statistic.I source/SAMRAI/tbox/Statistic.h source/SAMRAI/tbox/Statistician.C source/SAMRAI/tbox/Statistician.h source/SAMRAI/tbox/Timer.C source/SAMRAI/tbox/Timer.I source/SAMRAI/tbox/Timer.h source/SAMRAI/tbox/TimerManager.C source/SAMRAI/tbox/TimerManager.h source/SAMRAI/tbox/Tracer.C source/SAMRAI/tbox/Tracer.I source/SAMRAI/tbox/Tracer.h source/SAMRAI/tbox/Transaction.C source/SAMRAI/tbox/Transaction.h source/SAMRAI/tbox/Utilities.C source/SAMRAI/tbox/Utilities.h source/SAMRAI/tbox/dox/manual.dox source/SAMRAI/tbox/dox/manual_base.dox source/SAMRAI/tbox/dox/manual_database.dox source/SAMRAI/tbox/dox/manual_inputdb.dox source/SAMRAI/tbox/dox/manual_memory.dox source/SAMRAI/tbox/dox/manual_parallel.dox source/SAMRAI/tbox/dox/manual_restartdb.dox source/SAMRAI/tbox/dox/manual_stream.dox source/SAMRAI/tbox/dox/manual_timers.dox source/SAMRAI/tbox/genfiles.sh source/SAMRAI/tbox/grammer_fixup.pl source/SAMRAI/tbox/scanner_fixup.pl source/SAMRAI/tbox/vector.h source/SAMRAI/xfer/BoxGeometryVariableFillPattern.C source/SAMRAI/xfer/BoxGeometryVariableFillPattern.h source/SAMRAI/xfer/CoarsenAlgorithm.C source/SAMRAI/xfer/CoarsenAlgorithm.h source/SAMRAI/xfer/CoarsenClasses.C source/SAMRAI/xfer/CoarsenClasses.I source/SAMRAI/xfer/CoarsenClasses.h source/SAMRAI/xfer/CoarsenCopyTransaction.C source/SAMRAI/xfer/CoarsenCopyTransaction.h source/SAMRAI/xfer/CoarsenOperator.C source/SAMRAI/xfer/CoarsenOperator.h source/SAMRAI/xfer/CoarsenPatchStrategy.C source/SAMRAI/xfer/CoarsenPatchStrategy.h source/SAMRAI/xfer/CoarsenSchedule.C source/SAMRAI/xfer/CoarsenSchedule.h source/SAMRAI/xfer/CoarsenTransactionFactory.C source/SAMRAI/xfer/CoarsenTransactionFactory.h source/SAMRAI/xfer/Geometry.C source/SAMRAI/xfer/Geometry.h source/SAMRAI/xfer/Makefile.depend source/SAMRAI/xfer/Makefile.in source/SAMRAI/xfer/MultiblockCoarsenAlgorithm.C source/SAMRAI/xfer/MultiblockCoarsenAlgorithm.h source/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.C source/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h source/SAMRAI/xfer/MultiblockCoarsenSchedule.C source/SAMRAI/xfer/MultiblockCoarsenSchedule.h source/SAMRAI/xfer/MultiblockRefineAlgorithm.C source/SAMRAI/xfer/MultiblockRefineAlgorithm.h source/SAMRAI/xfer/MultiblockRefinePatchStrategy.C source/SAMRAI/xfer/MultiblockRefinePatchStrategy.h source/SAMRAI/xfer/MultiblockRefineSchedule.C source/SAMRAI/xfer/MultiblockRefineSchedule.h source/SAMRAI/xfer/PatchInteriorVariableFillPattern.C source/SAMRAI/xfer/PatchInteriorVariableFillPattern.h source/SAMRAI/xfer/PatchLevelBorderAndInteriorFillPattern.C source/SAMRAI/xfer/PatchLevelBorderAndInteriorFillPattern.I source/SAMRAI/xfer/PatchLevelBorderAndInteriorFillPattern.h source/SAMRAI/xfer/PatchLevelBorderFillPattern.C source/SAMRAI/xfer/PatchLevelBorderFillPattern.I source/SAMRAI/xfer/PatchLevelBorderFillPattern.h source/SAMRAI/xfer/PatchLevelEnhancedFillPattern.C source/SAMRAI/xfer/PatchLevelEnhancedFillPattern.I source/SAMRAI/xfer/PatchLevelEnhancedFillPattern.h source/SAMRAI/xfer/PatchLevelFillPattern.C source/SAMRAI/xfer/PatchLevelFillPattern.h source/SAMRAI/xfer/PatchLevelFullFillPattern.C source/SAMRAI/xfer/PatchLevelFullFillPattern.I source/SAMRAI/xfer/PatchLevelFullFillPattern.h source/SAMRAI/xfer/PatchLevelInteriorFillPattern.C source/SAMRAI/xfer/PatchLevelInteriorFillPattern.I source/SAMRAI/xfer/PatchLevelInteriorFillPattern.h source/SAMRAI/xfer/RefineAlgorithm.C source/SAMRAI/xfer/RefineAlgorithm.h source/SAMRAI/xfer/RefineClasses.C source/SAMRAI/xfer/RefineClasses.I source/SAMRAI/xfer/RefineClasses.h source/SAMRAI/xfer/RefineCopyTransaction.C source/SAMRAI/xfer/RefineCopyTransaction.h source/SAMRAI/xfer/RefineOperator.C source/SAMRAI/xfer/RefineOperator.h source/SAMRAI/xfer/RefinePatchStrategy.C source/SAMRAI/xfer/RefinePatchStrategy.h source/SAMRAI/xfer/RefineSchedule.C source/SAMRAI/xfer/RefineSchedule.h source/SAMRAI/xfer/RefineScheduleConnectorWidthRequestor.C source/SAMRAI/xfer/RefineScheduleConnectorWidthRequestor.h source/SAMRAI/xfer/RefineTimeTransaction.C source/SAMRAI/xfer/RefineTimeTransaction.h source/SAMRAI/xfer/RefineTransactionFactory.C source/SAMRAI/xfer/RefineTransactionFactory.h source/SAMRAI/xfer/StandardCoarsenTransactionFactory.C source/SAMRAI/xfer/StandardCoarsenTransactionFactory.h source/SAMRAI/xfer/StandardRefineTransactionFactory.C source/SAMRAI/xfer/StandardRefineTransactionFactory.h source/SAMRAI/xfer/TimeInterpolateOperator.C source/SAMRAI/xfer/TimeInterpolateOperator.h source/SAMRAI/xfer/VariableFillPattern.C source/SAMRAI/xfer/VariableFillPattern.h source/SAMRAI/xfer/dox/manual.dox source/SAMRAI/xfer/dox/manual_datamovers.dox source/SAMRAI/xfer/dox/manual_datamovers_standard.dox source/SAMRAI/xfer/dox/manual_multiblock.dox source/SAMRAI/xfer/dox/manual_operators.dox source/scripts/change_copyright source/scripts/cmp.pl source/scripts/copy-if-change source/scripts/create_configure source/scripts/cscope_create_database source/scripts/depend source/scripts/depend.pl source/scripts/indent.pl source/scripts/make-template.pl source/scripts/memcheck source/scripts/object.pl source/scripts/object.sh source/scripts/openmpi-valgrind.supp source/scripts/python.supp source/scripts/samrai.supp source/scripts/source_manipulation/findClassNames.pl source/scripts/source_manipulation/findHeaderFiles source/scripts/source_manipulation/findHeaderFiles.pl source/scripts/source_manipulation/headers.data source/scripts/source_manipulation/removeNameKeyword.pl source/scripts/source_manipulation/replaceIncludeGuards source/scripts/source_manipulation/replaceIncludeGuards.pl source/scripts/uncrustify.cfg source/scripts/update source/scripts/updateXd.pl source/test/FAC_adaptive/AdaptivePoisson.C source/test/FAC_adaptive/AdaptivePoisson.h source/test/FAC_adaptive/GaussianFcn.C source/test/FAC_adaptive/GaussianFcn.h source/test/FAC_adaptive/Makefile.depend source/test/FAC_adaptive/Makefile.in source/test/FAC_adaptive/PoissonGaussianDiffcoefSolution.C source/test/FAC_adaptive/PoissonGaussianDiffcoefSolution.h source/test/FAC_adaptive/PoissonGaussianSolution.C source/test/FAC_adaptive/PoissonGaussianSolution.h source/test/FAC_adaptive/PoissonMultigaussianSolution.C source/test/FAC_adaptive/PoissonMultigaussianSolution.h source/test/FAC_adaptive/PoissonPolynomialSolution.C source/test/FAC_adaptive/PoissonPolynomialSolution.h source/test/FAC_adaptive/PoissonSineSolution.C source/test/FAC_adaptive/PoissonSineSolution.h source/test/FAC_adaptive/QuarticFcn.C source/test/FAC_adaptive/QuarticFcn.h source/test/FAC_adaptive/README source/test/FAC_adaptive/SinusoidFcn.C source/test/FAC_adaptive/SinusoidFcn.h source/test/FAC_adaptive/get-input-filename.C source/test/FAC_adaptive/get-input-filename.h source/test/FAC_adaptive/main.C source/test/FAC_adaptive/patchFcns.C source/test/FAC_adaptive/patchFcns.h source/test/FAC_adaptive/printObject.C source/test/FAC_adaptive/printObject.h source/test/FAC_adaptive/setArrayData.C source/test/FAC_adaptive/setArrayData.h source/test/FAC_adaptive/test_inputs/allneumann.2d.input source/test/FAC_adaptive/test_inputs/allneumann.3d.input source/test/FAC_adaptive/test_inputs/complex.2d.input source/test/FAC_adaptive/test_inputs/default.2d.input source/test/FAC_adaptive/test_inputs/default.3d.input source/test/FAC_adaptive/test_inputs/gauss.2d.input source/test/FAC_adaptive/test_inputs/gauss.3d.input source/test/FAC_adaptive/test_inputs/periodic.2d.input source/test/FAC_adaptive/test_inputs/periodic.3d.input source/test/FAC_adaptive/test_inputs/ring_gauss.2d.input source/test/FAC_adaptive/test_inputs/simple.2d.input source/test/FAC_adaptive/test_inputs/simple_gauss.2d.input source/test/FAC_adaptive/test_inputs/simple_gauss.3d.input source/test/FAC_adaptive/test_inputs/varcoef.2d.input source/test/FAC_adaptive/test_inputs/varcoef.3d.input source/test/FAC_nonadaptive/FACPoisson.C source/test/FAC_nonadaptive/FACPoisson.h source/test/FAC_nonadaptive/Makefile.depend source/test/FAC_nonadaptive/Makefile.in source/test/FAC_nonadaptive/README source/test/FAC_nonadaptive/example_inputs/const_refine.2d.input source/test/FAC_nonadaptive/example_inputs/const_refine.3d.input source/test/FAC_nonadaptive/example_inputs/otherbc.2d.input source/test/FAC_nonadaptive/example_inputs/otherbc.3d.input source/test/FAC_nonadaptive/fortran/facpoisson2d.m4 source/test/FAC_nonadaptive/fortran/facpoisson3d.m4 source/test/FAC_nonadaptive/main.C source/test/FAC_nonadaptive/test_inputs/default.2d.input source/test/FAC_nonadaptive/test_inputs/default.3d.input source/test/Makefile.in source/test/MblkEuler/GeomUtilsAMR.h source/test/MblkEuler/Makefile.depend source/test/MblkEuler/Makefile.in source/test/MblkEuler/MblkEuler.C source/test/MblkEuler/MblkEuler.h source/test/MblkEuler/MblkEulerFort.h source/test/MblkEuler/MblkGeometry.C source/test/MblkEuler/MblkGeometry.h source/test/MblkEuler/MblkHyperbolicLevelIntegrator.C source/test/MblkEuler/MblkHyperbolicLevelIntegrator.h source/test/MblkEuler/MblkHyperbolicPatchStrategy.C source/test/MblkEuler/MblkHyperbolicPatchStrategy.h source/test/MblkEuler/Pointer-MblkHyperbolicLevelIntegrator.C source/test/MblkEuler/README source/test/MblkEuler/bc_common.f source/test/MblkEuler/boundaryconditions.f source/test/MblkEuler/example_inputs/cart_1blk.3d.input source/test/MblkEuler/example_inputs/cdw.3d.inc source/test/MblkEuler/example_inputs/cdw.3d.input source/test/MblkEuler/example_inputs/cdw.3d.mesh source/test/MblkEuler/example_inputs/octant_cart.3d.input source/test/MblkEuler/example_inputs/wedge_1blk.3d.input source/test/MblkEuler/main.C source/test/MblkEuler/skelbdry.f source/test/MblkEuler/test_inputs/octant_3blk.3d.input source/test/MblkEuler/upfluxsum.f source/test/MblkLinAdv/Makefile.depend source/test/MblkLinAdv/Makefile.in source/test/MblkLinAdv/MblkGeometry.C source/test/MblkLinAdv/MblkGeometry.h source/test/MblkLinAdv/MblkHyperbolicLevelIntegrator.C source/test/MblkLinAdv/MblkHyperbolicLevelIntegrator.h source/test/MblkLinAdv/MblkHyperbolicPatchStrategy.C source/test/MblkLinAdv/MblkHyperbolicPatchStrategy.h source/test/MblkLinAdv/MblkLinAdv.C source/test/MblkLinAdv/MblkLinAdv.h source/test/MblkLinAdv/MblkLinAdvFort.h source/test/MblkLinAdv/Pointer-MblkHyperbolicLevelIntegrator.C source/test/MblkLinAdv/Pointer-SkeletonCellDoubleConservativeLinearRefine.C source/test/MblkLinAdv/Pointer-SkeletonCellDoubleWeightedAverage.C source/test/MblkLinAdv/Pointer-SkeletonOutersideDoubleWeightedAverage.C source/test/MblkLinAdv/README source/test/MblkLinAdv/SkeletonBoundaryUtilities2.C source/test/MblkLinAdv/SkeletonBoundaryUtilities2.h source/test/MblkLinAdv/SkeletonBoundaryUtilities3.C source/test/MblkLinAdv/SkeletonBoundaryUtilities3.h source/test/MblkLinAdv/SkeletonCellDoubleConservativeLinearRefine.C source/test/MblkLinAdv/SkeletonCellDoubleConservativeLinearRefine.h source/test/MblkLinAdv/SkeletonCellDoubleWeightedAverage.C source/test/MblkLinAdv/SkeletonCellDoubleWeightedAverage.h source/test/MblkLinAdv/SkeletonOutersideDoubleWeightedAverage.C source/test/MblkLinAdv/SkeletonOutersideDoubleWeightedAverage.h source/test/MblkLinAdv/example_inputs/cart_1blk.3d.input source/test/MblkLinAdv/fortran/2d/skelbdry2d.m4 source/test/MblkLinAdv/fortran/2d/upfluxsum2d.m4 source/test/MblkLinAdv/fortran/3d/skelbdry3d.m4 source/test/MblkLinAdv/fortran/3d/upfluxsum3d.m4 source/test/MblkLinAdv/main.C source/test/MblkLinAdv/test_inputs/octant_3blk.3d.input source/test/MblkLinAdv/test_inputs/wedge_1blk.3d.input source/test/README source/test/applications/AutoTester.C source/test/applications/AutoTester.h source/test/applications/ConvDiff/ConvDiff.C source/test/applications/ConvDiff/ConvDiff.h source/test/applications/ConvDiff/ConvDiffFort.h source/test/applications/ConvDiff/MainRestartData.C source/test/applications/ConvDiff/MainRestartData.h source/test/applications/ConvDiff/Makefile.depend source/test/applications/ConvDiff/Makefile.in source/test/applications/ConvDiff/README source/test/applications/ConvDiff/example_inputs/heated_floor.2d.input source/test/applications/ConvDiff/example_inputs/sphere.2d.input source/test/applications/ConvDiff/example_inputs/sphere.3d.input source/test/applications/ConvDiff/fortran/compute_rhs2d.m4 source/test/applications/ConvDiff/fortran/compute_rhs3d.m4 source/test/applications/ConvDiff/fortran/const.i source/test/applications/ConvDiff/fortran/init2d.m4 source/test/applications/ConvDiff/fortran/init3d.m4 source/test/applications/ConvDiff/fortran/rkstep2d.m4 source/test/applications/ConvDiff/fortran/rkstep3d.m4 source/test/applications/ConvDiff/fortran/tag_cells2d.m4 source/test/applications/ConvDiff/fortran/tag_cells3d.m4 source/test/applications/ConvDiff/main.C source/test/applications/ConvDiff/test_inputs/test.2d.boxes.0000001.0000000 source/test/applications/ConvDiff/test_inputs/test.2d.boxes.0000002.0000000 source/test/applications/ConvDiff/test_inputs/test.2d.boxes.0000002.0000001 source/test/applications/ConvDiff/test_inputs/test.2d.input source/test/applications/ConvDiff/test_inputs/test.3d.boxes.0000001.0000000 source/test/applications/ConvDiff/test_inputs/test.3d.boxes.0000002.0000000 source/test/applications/ConvDiff/test_inputs/test.3d.boxes.0000002.0000001 source/test/applications/ConvDiff/test_inputs/test.3d.input source/test/applications/Euler/Euler.C source/test/applications/Euler/Euler.h source/test/applications/Euler/EulerFort.h source/test/applications/Euler/Makefile.depend source/test/applications/Euler/Makefile.in source/test/applications/Euler/README source/test/applications/Euler/README-test source/test/applications/Euler/RP_input/READ_ME source/test/applications/Euler/RP_input/RP-test1.data source/test/applications/Euler/RP_input/RP-test2X.data source/test/applications/Euler/RP_input/RP-test2Y.data source/test/applications/Euler/RP_input/RP-test2Z.data source/test/applications/Euler/RP_input/RP-test3.data source/test/applications/Euler/RP_input/RP-test4.data source/test/applications/Euler/RP_input/RP-test5X.data source/test/applications/Euler/RP_input/RP-test5Y.data source/test/applications/Euler/RP_input/RP-test5Z.data source/test/applications/Euler/RP_input/RP-test6X.data source/test/applications/Euler/RP_input/RP-test6Y.data source/test/applications/Euler/RP_input/RP-test6Z.data source/test/applications/Euler/RP_input/RP-test7X.data source/test/applications/Euler/RP_input/RP-test7Y.data source/test/applications/Euler/RP_input/RP-test7Z.data source/test/applications/Euler/RP_input/RP-testX-2d.input source/test/applications/Euler/RP_input/RP-testX-3d.input source/test/applications/Euler/RP_input/RP-testY-2d.input source/test/applications/Euler/RP_input/RP-testY-3d.input source/test/applications/Euler/RP_input/RP-testZ-3d.input source/test/applications/Euler/RP_input/plotRPdat.m source/test/applications/Euler/RP_input/plotRPexact.m source/test/applications/Euler/RP_input/prefun.m source/test/applications/Euler/RP_input/riemann.m source/test/applications/Euler/RP_input/sample.m source/test/applications/Euler/RP_input/startE.m source/test/applications/Euler/RP_test/testX-1-2d.input source/test/applications/Euler/RP_test/testX-1-2d_0050.correct source/test/applications/Euler/RP_test/testX-1-2d_0050.jpg source/test/applications/Euler/RP_test/testY-3-3d.input source/test/applications/Euler/RP_test/testY-3-3d_0075.correct source/test/applications/Euler/RP_test/testY-3-3d_0075.jpg source/test/applications/Euler/RP_test/testZ-6-3d.input source/test/applications/Euler/RP_test/testZ-6-3d_0060.correct source/test/applications/Euler/RP_test/testZ-6-3d_0060.jpg source/test/applications/Euler/example_inputs/box.3d.input source/test/applications/Euler/example_inputs/room.2d.input source/test/applications/Euler/example_inputs/room.3d.input source/test/applications/Euler/example_inputs/sphere_restart.2d.input source/test/applications/Euler/example_inputs/step.2d.input source/test/applications/Euler/example_inputs/step_5levels.2d.input source/test/applications/Euler/fortran/amrflaten2d.i source/test/applications/Euler/fortran/amrflaten3d.i source/test/applications/Euler/fortran/avgint2d.m4 source/test/applications/Euler/fortran/avgint3d.m4 source/test/applications/Euler/fortran/const.i source/test/applications/Euler/fortran/flaten1d2d.m4 source/test/applications/Euler/fortran/flaten1d3d.m4 source/test/applications/Euler/fortran/flaten2d.i source/test/applications/Euler/fortran/flaten3d.i source/test/applications/Euler/fortran/flux2d.m4 source/test/applications/Euler/fortran/flux3d.m4 source/test/applications/Euler/fortran/fluxcorner3d.m4 source/test/applications/Euler/fortran/gas1d_approxrp2d.i source/test/applications/Euler/fortran/gas1d_approxrp3d.i source/test/applications/Euler/fortran/gas1d_exactrp2d.i source/test/applications/Euler/fortran/gas1d_exactrp3d.i source/test/applications/Euler/fortran/grad2d.m4 source/test/applications/Euler/fortran/grad3d.m4 source/test/applications/Euler/fortran/init2d.m4 source/test/applications/Euler/fortran/init3d.m4 source/test/applications/Euler/fortran/m4flux2d.i source/test/applications/Euler/fortran/m4flux3d.i source/test/applications/Euler/fortran/m4fluxcorner3d.i source/test/applications/Euler/fortran/m4trace2d.i source/test/applications/Euler/fortran/m4trace3d.i source/test/applications/Euler/fortran/probparams.i source/test/applications/Euler/fortran/stable2d.m4 source/test/applications/Euler/fortran/stable3d.m4 source/test/applications/Euler/fortran/stufprobc.m4 source/test/applications/Euler/fortran/trace1d2d.m4 source/test/applications/Euler/fortran/trace1d3d.m4 source/test/applications/Euler/fortran/trace2d.m4 source/test/applications/Euler/fortran/trace3d.m4 source/test/applications/Euler/main.C source/test/applications/Euler/test_inputs/test-2d-re.input source/test/applications/Euler/test_inputs/test.2d.boxes.0000001.0000000 source/test/applications/Euler/test_inputs/test.2d.boxes.0000002.0000000 source/test/applications/Euler/test_inputs/test.2d.boxes.0000002.0000001 source/test/applications/Euler/test_inputs/test.2d.input source/test/applications/Euler/test_inputs/test.3d.boxes.0000001.0000000 source/test/applications/Euler/test_inputs/test.3d.boxes.0000002.0000000 source/test/applications/Euler/test_inputs/test.3d.boxes.0000002.0000001 source/test/applications/Euler/test_inputs/test.3d.input source/test/applications/Euler/test_inputs/test_restart.2d.boxes.0000001.0000000 source/test/applications/Euler/test_inputs/test_restart.2d.boxes.0000002.0000000 source/test/applications/Euler/test_inputs/test_restart.2d.boxes.0000002.0000001 source/test/applications/Euler/test_inputs/test_restart.2d.input source/test/applications/Euler/test_inputs/test_sync.2d.boxes.0000001.0000000 source/test/applications/Euler/test_inputs/test_sync.2d.boxes.0000002.0000000 source/test/applications/Euler/test_inputs/test_sync.2d.boxes.0000002.0000001 source/test/applications/Euler/test_inputs/test_sync.2d.input source/test/applications/Euler/test_inputs/test_sync.3d.boxes.0000001.0000000 source/test/applications/Euler/test_inputs/test_sync.3d.boxes.0000002.0000000 source/test/applications/Euler/test_inputs/test_sync.3d.boxes.0000002.0000001 source/test/applications/Euler/test_inputs/test_sync.3d.input source/test/applications/Euler/test_inputs/test_sync_restart.3d.boxes source/test/applications/Euler/test_inputs/test_sync_restart.3d.boxes.0000001.0000000 source/test/applications/Euler/test_inputs/test_sync_restart.3d.boxes.0000002.0000000 source/test/applications/Euler/test_inputs/test_sync_restart.3d.boxes.0000002.0000001 source/test/applications/Euler/test_inputs/test_sync_restart.3d.input source/test/applications/LinAdv/LinAdv.C source/test/applications/LinAdv/LinAdv.h source/test/applications/LinAdv/LinAdvFort.h source/test/applications/LinAdv/Makefile.depend source/test/applications/LinAdv/Makefile.in source/test/applications/LinAdv/README source/test/applications/LinAdv/example_inputs/sine_front.2d.input source/test/applications/LinAdv/example_inputs/sphere.2d.input source/test/applications/LinAdv/example_inputs/sphere.3d.input source/test/applications/LinAdv/example_inputs/sphere_4levels.2d.input source/test/applications/LinAdv/example_inputs/sphere_restart.2d.input source/test/applications/LinAdv/fortran/const.i source/test/applications/LinAdv/fortran/flux2d.m4 source/test/applications/LinAdv/fortran/flux3d.m4 source/test/applications/LinAdv/fortran/fluxcorner3d.i source/test/applications/LinAdv/fortran/fluxcorner3d.m4 source/test/applications/LinAdv/fortran/grad2d.m4 source/test/applications/LinAdv/fortran/grad3d.m4 source/test/applications/LinAdv/fortran/init2d.m4 source/test/applications/LinAdv/fortran/init3d.m4 source/test/applications/LinAdv/fortran/m3fluxjt3d.i source/test/applications/LinAdv/fortran/m4bdry3d.i source/test/applications/LinAdv/fortran/m4flux2d.i source/test/applications/LinAdv/fortran/m4flux3d.i source/test/applications/LinAdv/fortran/m4fluxcorner3d.i source/test/applications/LinAdv/fortran/m4trace2d.i source/test/applications/LinAdv/fortran/m4trace3d.i source/test/applications/LinAdv/fortran/probparams.i source/test/applications/LinAdv/fortran/stable2d.m4 source/test/applications/LinAdv/fortran/stable3d.m4 source/test/applications/LinAdv/fortran/stufprobc.m4 source/test/applications/LinAdv/fortran/trace1d.m4 source/test/applications/LinAdv/fortran/trace2d.m4 source/test/applications/LinAdv/fortran/trace3d.m4 source/test/applications/LinAdv/main.C source/test/applications/LinAdv/test_inputs/test.2d.boxes.0000001.0000000 source/test/applications/LinAdv/test_inputs/test.2d.boxes.0000002.0000000 source/test/applications/LinAdv/test_inputs/test.2d.boxes.0000002.0000001 source/test/applications/LinAdv/test_inputs/test.2d.input source/test/applications/LinAdv/test_inputs/test.3d.boxes.0000001.0000000 source/test/applications/LinAdv/test_inputs/test.3d.boxes.0000002.0000000 source/test/applications/LinAdv/test_inputs/test.3d.boxes.0000002.0000001 source/test/applications/LinAdv/test_inputs/test.3d.input source/test/applications/LinAdv/test_inputs/test_restart.2d.input source/test/applications/LinAdv/test_inputs/test_sync.2d.boxes.0000001.0000000 source/test/applications/LinAdv/test_inputs/test_sync.2d.boxes.0000002.0000000 source/test/applications/LinAdv/test_inputs/test_sync.2d.boxes.0000002.0000001 source/test/applications/LinAdv/test_inputs/test_sync.2d.input source/test/applications/LinAdv/test_inputs/test_sync.3d.boxes.0000001.0000000 source/test/applications/LinAdv/test_inputs/test_sync.3d.boxes.0000002.0000000 source/test/applications/LinAdv/test_inputs/test_sync.3d.boxes.0000002.0000001 source/test/applications/LinAdv/test_inputs/test_sync.3d.input source/test/applications/LinAdv/test_inputs/test_sync_restart.2d.boxes.0000001.0000000 source/test/applications/LinAdv/test_inputs/test_sync_restart.2d.boxes.0000002.0000000 source/test/applications/LinAdv/test_inputs/test_sync_restart.2d.boxes.0000002.0000001 source/test/applications/LinAdv/test_inputs/test_sync_restart.2d.input source/test/applications/Makefile.depend source/test/applications/Makefile.in source/test/async_comm/Makefile.depend source/test/async_comm/Makefile.in source/test/async_comm/main-async_comm.C source/test/async_comm/main-peer_comm.C source/test/async_comm/test_inputs/async.default.input source/test/async_comm/test_inputs/default.input source/test/async_comm/test_inputs/peer.default.input source/test/boundary/BoundaryDataTester.C source/test/boundary/BoundaryDataTester.h source/test/boundary/Makefile.depend source/test/boundary/Makefile.in source/test/boundary/README source/test/boundary/main.C source/test/boundary/test_inputs/dirichlet.2d.input source/test/boundary/test_inputs/dirichlet.3d.input source/test/boundary/test_inputs/flow.2d.input source/test/boundary/test_inputs/flow.3d.input source/test/boundary/test_inputs/neumann.2d.input source/test/boundary/test_inputs/neumann.3d.input source/test/boundary/test_inputs/periodic01.2d.input source/test/boundary/test_inputs/periodic010.3d.input source/test/boundary/test_inputs/periodic011.3d.input source/test/boundary/test_inputs/periodic11.2d.input source/test/boundary/test_inputs/periodic111.3d.input source/test/boundary/test_inputs/reflect.2d.input source/test/boundary/test_inputs/reflect.3d.input source/test/clustering/Makefile.in source/test/clustering/async_br/ABRTest.C source/test/clustering/async_br/ABRTest.h source/test/clustering/async_br/Makefile.depend source/test/clustering/async_br/Makefile.in source/test/clustering/async_br/SinusoidalFrontTagger.C source/test/clustering/async_br/SinusoidalFrontTagger.h source/test/clustering/async_br/get-input-filename.C source/test/clustering/async_br/get-input-filename.h source/test/clustering/async_br/main.C source/test/clustering/async_br/test_inputs/front.2d.input source/test/clustering/async_br/test_inputs/front.3d.input source/test/clustering/parallel_br/Makefile.in source/test/clustering/parallel_br/test_inputs/test.2d.boxes source/test/clustering/parallel_br/test_inputs/test.2d.inc source/test/clustering/parallel_br/test_inputs/test_1.input source/test/clustering/parallel_br/test_inputs/test_2.input source/test/clustering/parallel_br/test_inputs/test_3.input source/test/communication/CellDataTest.C source/test/communication/CellDataTest.h source/test/communication/CommTester.C source/test/communication/CommTester.h source/test/communication/EdgeDataTest.C source/test/communication/EdgeDataTest.h source/test/communication/FaceDataTest.C source/test/communication/FaceDataTest.h source/test/communication/Makefile.depend source/test/communication/Makefile.in source/test/communication/NodeDataTest.C source/test/communication/NodeDataTest.h source/test/communication/OuterfaceDataTest.C source/test/communication/OuterfaceDataTest.h source/test/communication/OuternodeDataTest.C source/test/communication/OuternodeDataTest.h source/test/communication/OutersideDataTest.C source/test/communication/OutersideDataTest.h source/test/communication/PatchDataTestStrategy.C source/test/communication/PatchDataTestStrategy.h source/test/communication/Pointer-CommTester.C source/test/communication/SideDataTest.C source/test/communication/SideDataTest.h source/test/communication/VisItDerivedData.C source/test/communication/VisItDerivedData.h source/test/communication/main.C source/test/communication/test_inputs/cell_coarsen.2d.input source/test/communication/test_inputs/cell_coarsen.3d.input source/test/communication/test_inputs/cell_ghostoverlap_a.2d.input source/test/communication/test_inputs/cell_ghostoverlap_b.3d.input source/test/communication/test_inputs/cell_periodic_a.2d.input source/test/communication/test_inputs/cell_periodic_a.3d.input source/test/communication/test_inputs/cell_periodic_b.2d.input source/test/communication/test_inputs/cell_periodic_b.3d.input source/test/communication/test_inputs/cell_periodic_c.2d.input source/test/communication/test_inputs/cell_periodic_c.3d.input source/test/communication/test_inputs/cell_refine_a.2d.input source/test/communication/test_inputs/cell_refine_a.3d.input source/test/communication/test_inputs/cell_refine_b.2d.input source/test/communication/test_inputs/cell_refine_b.3d.input source/test/communication/test_inputs/edge_coarsen.2d.input source/test/communication/test_inputs/edge_coarsen.3d.input source/test/communication/test_inputs/edge_refine_a.2d.input source/test/communication/test_inputs/edge_refine_a.3d.input source/test/communication/test_inputs/edge_refine_b.2d.input source/test/communication/test_inputs/edge_refine_b.3d.input source/test/communication/test_inputs/face_coarsen.2d.input source/test/communication/test_inputs/face_coarsen.3d.input source/test/communication/test_inputs/face_refine_a.2d.input source/test/communication/test_inputs/face_refine_a.3d.input source/test/communication/test_inputs/face_refine_b.2d.input source/test/communication/test_inputs/face_refine_b.3d.input source/test/communication/test_inputs/node_coarsen.2d.input source/test/communication/test_inputs/node_coarsen.3d.input source/test/communication/test_inputs/node_ghostoverlap_a.3d.input source/test/communication/test_inputs/node_ghostoverlap_b.2d.input source/test/communication/test_inputs/node_periodic_a.2d.input source/test/communication/test_inputs/node_periodic_a.3d.input source/test/communication/test_inputs/node_periodic_b.2d.input source/test/communication/test_inputs/node_periodic_b.3d.input source/test/communication/test_inputs/node_periodic_c.2d.input source/test/communication/test_inputs/node_periodic_c.3d.input source/test/communication/test_inputs/node_refine_a.2d.input source/test/communication/test_inputs/node_refine_a.3d.input source/test/communication/test_inputs/node_refine_b.2d.input source/test/communication/test_inputs/node_refine_b.3d.input source/test/communication/test_inputs/oface_coarsen.2d.input source/test/communication/test_inputs/oface_coarsen.3d.input source/test/communication/test_inputs/onode_coarsen.2d.input source/test/communication/test_inputs/onode_coarsen.3d.input source/test/communication/test_inputs/oside_coarsen.2d.input source/test/communication/test_inputs/oside_coarsen.3d.input source/test/communication/test_inputs/side_coarsen.2d.input source/test/communication/test_inputs/side_coarsen.3d.input source/test/communication/test_inputs/side_periodic_a.2d.input source/test/communication/test_inputs/side_periodic_a.3d.input source/test/communication/test_inputs/side_periodic_b.2d.input source/test/communication/test_inputs/side_periodic_b.3d.input source/test/communication/test_inputs/side_refine_a.2d.input source/test/communication/test_inputs/side_refine_a.3d.input source/test/communication/test_inputs/side_refine_b.2d.input source/test/communication/test_inputs/side_refine_b.3d.input source/test/dataaccess/Makefile.depend source/test/dataaccess/Makefile.in source/test/dataaccess/main.C source/test/dataaccess/test_inputs/default.2d.input source/test/dataaccess/test_inputs/default.3d.input source/test/dataops/Makefile.depend source/test/dataops/Makefile.in source/test/dataops/README source/test/dataops/SampleIndexData.C source/test/dataops/SampleIndexData.h source/test/dataops/cell_cplxtest.C source/test/dataops/cell_hierops.C source/test/dataops/cell_hiertest.C source/test/dataops/cell_patchtest.C source/test/dataops/edge_cplxtest.C source/test/dataops/edge_hiertest.C source/test/dataops/face_cplxtest.C source/test/dataops/face_hiertest.C source/test/dataops/indx_dataops.C source/test/dataops/node_cplxtest.C source/test/dataops/node_hierops.C source/test/dataops/node_hiertest.C source/test/dataops/side_cplxtest.C source/test/dataops/side_hiertest.C source/test/dimension/Makefile.depend source/test/dimension/Makefile.in source/test/dimension/main.C source/test/dlbg/DLBGTest.C source/test/dlbg/DLBGTest.h source/test/dlbg/Makefile.depend source/test/dlbg/Makefile.in source/test/dlbg/SinusoidalFrontTagger.C source/test/dlbg/SinusoidalFrontTagger.h source/test/dlbg/get-input-filename.C source/test/dlbg/get-input-filename.h source/test/dlbg/main.C source/test/dlbg/test_inputs/front.2d.input source/test/dlbg/test_inputs/front.3d.input source/test/dlbg/test_inputs/periodic.2d.input source/test/emb_bdry/Makefile.depend source/test/emb_bdry/Makefile.in source/test/emb_bdry/SampleApp.C source/test/emb_bdry/SampleApp.h source/test/emb_bdry/cubes/simple-box/box1.tri source/test/emb_bdry/cubes/simple-box/cubes-test.input source/test/emb_bdry/cubes/simple-box/input.c3d source/test/emb_bdry/cubes/slc/cubes-test.input source/test/emb_bdry/cubes/slc/input.c3d source/test/emb_bdry/cubes/slc/slc-rev.tri source/test/emb_bdry/cubes/three-plugs/cubes-test.input source/test/emb_bdry/cubes/three-plugs/input.c3d source/test/emb_bdry/cubes/three-plugs/three-plugs.tri source/test/emb_bdry/eleven/bn-test-11-2d.input source/test/emb_bdry/eleven/circle_r.3.gzxml source/test/emb_bdry/eleven/freeform.gzxml source/test/emb_bdry/eleven/polygon.gzxml source/test/emb_bdry/fortran2d.m4 source/test/emb_bdry/fortran3d.m4 source/test/emb_bdry/main.C source/test/emb_bdry/test_inputs/bn.2d.input source/test/emb_bdry/test_inputs/poly.2d.input source/test/emb_bdry/test_inputs/two_spheres.2d.input source/test/emb_bdry/test_inputs/vol.2d.input.notworking source/test/emb_bdry/test_inputs/vol.3d.input source/test/fill_pattern/Makefile.depend source/test/fill_pattern/Makefile.in source/test/fill_pattern/main-fill-pattern.C source/test/hierarchy/HierarchyTester.C source/test/hierarchy/HierarchyTester.h source/test/hierarchy/Makefile.depend source/test/hierarchy/Makefile.in source/test/hierarchy/main.C source/test/hierarchy/tbox_Pointer-HierarchyTester.C source/test/hierarchy/test_inputs/hierarchy_coarsen.3d.input source/test/hierarchy/test_inputs/hierarchy_coarsen2d.input source/test/hierarchy/test_inputs/hierarchy_refine.2d.input source/test/hierarchy/test_inputs/hierarchy_refine.3d.input source/test/hypre/HyprePoisson.C source/test/hypre/HyprePoisson.h source/test/hypre/Makefile.depend source/test/hypre/Makefile.in source/test/hypre/README source/test/hypre/fortran/hyprepoisson2d.m4 source/test/hypre/fortran/hyprepoisson3d.m4 source/test/hypre/main.C source/test/hypre/test_inputs/default.2d.input source/test/hypre/test_inputs/default.3d.input source/test/ieee/Makefile.depend source/test/ieee/Makefile.in source/test/ieee/ieee_test.C source/test/indexdata/Makefile.depend source/test/indexdata/Makefile.in source/test/indexdata/main.C source/test/inputdb/Makefile.depend source/test/inputdb/Makefile.in source/test/inputdb/README source/test/inputdb/errors.input source/test/inputdb/inputdb.C source/test/inputdb/inputdb.input source/test/logger/Makefile.depend source/test/logger/Makefile.in source/test/logger/defaultloggertest.C source/test/logger/userloggertest.C source/test/mblkcomm/CellMultiblockTest.C source/test/mblkcomm/CellMultiblockTest.h source/test/mblkcomm/EdgeMultiblockTest.C source/test/mblkcomm/EdgeMultiblockTest.h source/test/mblkcomm/FaceMultiblockTest.C source/test/mblkcomm/FaceMultiblockTest.h source/test/mblkcomm/Makefile.depend source/test/mblkcomm/Makefile.in source/test/mblkcomm/MultiblockTester.C source/test/mblkcomm/MultiblockTester.h source/test/mblkcomm/NodeMultiblockTest.C source/test/mblkcomm/NodeMultiblockTest.h source/test/mblkcomm/PatchMultiblockTestStrategy.C source/test/mblkcomm/PatchMultiblockTestStrategy.h source/test/mblkcomm/Pointer-MultiblockTester.C source/test/mblkcomm/SideMultiblockTest.C source/test/mblkcomm/SideMultiblockTest.h source/test/mblkcomm/main.C source/test/mblkcomm/test_inputs/cell-2d-4blk.input source/test/mblkcomm/test_inputs/cell-2d-5blk.input source/test/mblkcomm/test_inputs/cell-3d-5blk.input source/test/mblkcomm/test_inputs/cell-3d-full.input source/test/mblkcomm/test_inputs/cell-3d-half.input source/test/mblkcomm/test_inputs/cell-3d-oct.input source/test/mblkcomm/test_inputs/cell-3d-quad.input source/test/mblkcomm/test_inputs/cell.2d.input source/test/mblkcomm/test_inputs/cell.3d.input source/test/mblkcomm/test_inputs/edge-2d-5blk.input source/test/mblkcomm/test_inputs/edge-3d-5blk.input source/test/mblkcomm/test_inputs/edge.2d.input source/test/mblkcomm/test_inputs/edge.3d.input source/test/mblkcomm/test_inputs/face-2d-5blk.input source/test/mblkcomm/test_inputs/face-3d-5blk.input source/test/mblkcomm/test_inputs/face.2d.input source/test/mblkcomm/test_inputs/face.3d.input source/test/mblkcomm/test_inputs/node-2d-5blk.input source/test/mblkcomm/test_inputs/node-3d-5blk.input source/test/mblkcomm/test_inputs/node.2d.input source/test/mblkcomm/test_inputs/node.3d.input source/test/mblkcomm/test_inputs/side-2d-5blk.input source/test/mblkcomm/test_inputs/side-3d-5blk.input source/test/mblkcomm/test_inputs/side.2d.input source/test/mblkcomm/test_inputs/side.3d.input source/test/nonlinear/Makefile.depend source/test/nonlinear/Makefile.in source/test/nonlinear/ModifiedBratuFort.h source/test/nonlinear/ModifiedBratuProblem.C source/test/nonlinear/ModifiedBratuProblem.h source/test/nonlinear/README source/test/nonlinear/bratu-example.pdf source/test/nonlinear/fortran/FACjacobian1d.m4 source/test/nonlinear/fortran/FACjacobian2d.m4 source/test/nonlinear/fortran/FACjacobian3d.m4 source/test/nonlinear/fortran/adjcrsfineoffdiag1d.m4 source/test/nonlinear/fortran/bcFluxCopy1d.m4 source/test/nonlinear/fortran/bcFluxCopy2d.m4 source/test/nonlinear/fortran/bcFluxCopy3d.m4 source/test/nonlinear/fortran/bcFluxFix1d.m4 source/test/nonlinear/fortran/bcFluxFix2d.m4 source/test/nonlinear/fortran/bcFluxFix3d.m4 source/test/nonlinear/fortran/bratufunc1d.m4 source/test/nonlinear/fortran/bratufunc2d.m4 source/test/nonlinear/fortran/bratufunc3d.m4 source/test/nonlinear/fortran/err1d.m4 source/test/nonlinear/fortran/err2d.m4 source/test/nonlinear/fortran/err3d.m4 source/test/nonlinear/fortran/evalBratu1d.m4 source/test/nonlinear/fortran/evalBratu2d.m4 source/test/nonlinear/fortran/evalBratu3d.m4 source/test/nonlinear/fortran/evalDiffusionCoef1d.m4 source/test/nonlinear/fortran/evalDiffusionCoef2d.m4 source/test/nonlinear/fortran/evalDiffusionCoef3d.m4 source/test/nonlinear/fortran/evalExponential1d.m4 source/test/nonlinear/fortran/evalExponential2d.m4 source/test/nonlinear/fortran/evalExponential3d.m4 source/test/nonlinear/fortran/evalF1d.m4 source/test/nonlinear/fortran/evalF2d.m4 source/test/nonlinear/fortran/evalF3d.m4 source/test/nonlinear/fortran/evalFaceFluxes1d.m4 source/test/nonlinear/fortran/evalFaceFluxes2d.m4 source/test/nonlinear/fortran/evalFaceFluxes3d.m4 source/test/nonlinear/fortran/evalJv1d.m4 source/test/nonlinear/fortran/evalJv2d.m4 source/test/nonlinear/fortran/evalJv3d.m4 source/test/nonlinear/fortran/evalSource1d.m4 source/test/nonlinear/fortran/evalSource2d.m4 source/test/nonlinear/fortran/evalSource3d.m4 source/test/nonlinear/fortran/setbc1d.m4 source/test/nonlinear/fortran/setbc2d.m4 source/test/nonlinear/fortran/setbc3d.m4 source/test/nonlinear/main.C source/test/nonlinear/tbox_Pointer-CellPoissonFACSolver-NDIM.C source/test/nonlinear/tbox_Pointer-ModifiedBratuProblem.C source/test/nonlinear/test_inputs/kinsol.2d.input source/test/nonlinear/test_inputs/kinsol.3d.input source/test/nonlinear/test_inputs/petsc.2d.input source/test/nonlinear/test_inputs/petsc.3d.input source/test/patchbdrysum/HierSumTest.C source/test/patchbdrysum/HierSumTest.h source/test/patchbdrysum/Makefile.depend source/test/patchbdrysum/Makefile.in source/test/patchbdrysum/README source/test/patchbdrysum/edgeops2d.m4 source/test/patchbdrysum/edgeops3d.m4 source/test/patchbdrysum/example_inputs/1lev_edge.2d.input source/test/patchbdrysum/example_inputs/1lev_edge.3d.input source/test/patchbdrysum/example_inputs/2lev_edge.3d.input source/test/patchbdrysum/example_inputs/2lev_node.3d.input source/test/patchbdrysum/example_inputs/2lev_node_aligned_bdry.2d.input source/test/patchbdrysum/example_inputs/2lev_node_aligned_bdry.3d.input source/test/patchbdrysum/example_inputs/2lev_node_edge.2d.input source/test/patchbdrysum/main.C source/test/patchbdrysum/test_inputs/1lev_edge.2d.input source/test/patchbdrysum/test_inputs/1lev_edge.3d.input source/test/patchbdrysum/test_inputs/2lev_edge.3d.input source/test/patchbdrysum/test_inputs/2lev_node.3d.input source/test/patchbdrysum/test_inputs/2lev_node_aligned_bdry.2d.input source/test/patchbdrysum/test_inputs/2lev_node_aligned_bdry.3d.input source/test/patchbdrysum/test_inputs/2lev_node_edge.2d.input source/test/patchbdrysum/test_inputs/2lev_node_edge_perx.2d.input source/test/patchbdrysum/test_inputs/2lev_node_edge_perx.3d.input source/test/patchbdrysum/test_inputs/2lev_node_edge_perxy.2d.input source/test/patchbdrysum/test_inputs/2lev_node_edge_perxy.3d.input source/test/patchbdrysum/test_inputs/2lev_node_edge_perxyz.3d.input source/test/patchbdrysum/test_inputs/2lev_node_edge_perxz.3d.input source/test/patchbdrysum/test_inputs/2lev_node_edge_pery.2d.input source/test/patchbdrysum/test_inputs/2lev_node_edge_pery.3d.input source/test/patchbdrysum/test_inputs/2lev_node_edge_peryz.3d.input source/test/patchbdrysum/test_inputs/2lev_node_edge_perz.3d.input source/test/performance/Euler/Euler.C source/test/performance/Euler/Euler.h source/test/performance/Euler/EulerFort.h source/test/performance/Euler/Makefile.depend source/test/performance/Euler/Makefile.in source/test/performance/Euler/README source/test/performance/Euler/fortran/2d/avgint.m4 source/test/performance/Euler/fortran/2d/flaten1d.m4 source/test/performance/Euler/fortran/2d/flux.m4 source/test/performance/Euler/fortran/2d/grad.m4 source/test/performance/Euler/fortran/2d/init.m4 source/test/performance/Euler/fortran/2d/m4flux.i source/test/performance/Euler/fortran/2d/m4trace.i source/test/performance/Euler/fortran/2d/stable.m4 source/test/performance/Euler/fortran/2d/trace.m4 source/test/performance/Euler/fortran/2d/trace1d.m4 source/test/performance/Euler/fortran/3d/avgint.m4 source/test/performance/Euler/fortran/3d/flaten1d.m4 source/test/performance/Euler/fortran/3d/flux.m4 source/test/performance/Euler/fortran/3d/fluxcorner.m4 source/test/performance/Euler/fortran/3d/grad.m4 source/test/performance/Euler/fortran/3d/init.m4 source/test/performance/Euler/fortran/3d/m4flux.i source/test/performance/Euler/fortran/3d/m4fluxcorner.i source/test/performance/Euler/fortran/3d/m4trace.i source/test/performance/Euler/fortran/3d/stable.m4 source/test/performance/Euler/fortran/3d/trace.m4 source/test/performance/Euler/fortran/3d/trace1d.m4 source/test/performance/Euler/fortran/amrflaten.i source/test/performance/Euler/fortran/const.i source/test/performance/Euler/fortran/flaten.i source/test/performance/Euler/fortran/gas1d_approxrp.i source/test/performance/Euler/fortran/gas1d_exactrp.i source/test/performance/Euler/fortran/probparams.i source/test/performance/Euler/fortran/stufprobc.m4 source/test/performance/Euler/intToString.C source/test/performance/Euler/intToString.h source/test/performance/Euler/main.C source/test/performance/Euler/performance_inputs/mEuler/sphere-2l1x.input source/test/performance/Euler/performance_inputs/mEuler/sphere-2l2x.input source/test/performance/Euler/performance_inputs/mEuler/sphere-2l4x.input source/test/performance/Euler/performance_inputs/mEuler/sphere-2l8x.input source/test/performance/Euler/performance_inputs/mEuler/sphere-3l1x.input source/test/performance/Euler/performance_inputs/mEuler/sphere-3l2x.input source/test/performance/Euler/performance_inputs/mEuler/sphere-3l4x.input source/test/performance/Euler/performance_inputs/mEuler/sphere-3l8x.input source/test/performance/Euler/performance_inputs/mEuler/sphere-4l1x.input source/test/performance/Euler/performance_inputs/mEuler/sphere-4l2x.input source/test/performance/Euler/performance_inputs/mEuler/sphere-4l4x.input source/test/performance/Euler/performance_inputs/mEuler/sphere-4l8x.input source/test/performance/Euler/sample_inputs/box-3d.input source/test/performance/Euler/sample_inputs/room-2d.input source/test/performance/Euler/sample_inputs/room-3d.input source/test/performance/Euler/sample_inputs/sphere-2d-re.input source/test/performance/Euler/sample_inputs/step-2d-5levels.input source/test/performance/Euler/sample_inputs/step-2d.input source/test/performance/LinAdv/LinAdv.C source/test/performance/LinAdv/LinAdv.h source/test/performance/LinAdv/LinAdvFort.h source/test/performance/LinAdv/MDA_Access_instances.C source/test/performance/LinAdv/Makefile.depend source/test/performance/LinAdv/Makefile.in source/test/performance/LinAdv/README source/test/performance/LinAdv/SinusoidalFrontTagger.C source/test/performance/LinAdv/SinusoidalFrontTagger.h source/test/performance/LinAdv/fortran/2d/flux2d.m4 source/test/performance/LinAdv/fortran/2d/grad2d.m4 source/test/performance/LinAdv/fortran/2d/init2d.m4 source/test/performance/LinAdv/fortran/2d/m4flux2d.i source/test/performance/LinAdv/fortran/2d/m4trace2d.i source/test/performance/LinAdv/fortran/2d/stable2d.m4 source/test/performance/LinAdv/fortran/2d/stufprobc2d.m4 source/test/performance/LinAdv/fortran/2d/trace1d2d.m4 source/test/performance/LinAdv/fortran/2d/trace2d.m4 source/test/performance/LinAdv/fortran/3d/bdry3d.m4 source/test/performance/LinAdv/fortran/3d/flux3d.m4 source/test/performance/LinAdv/fortran/3d/fluxcorner3d.i source/test/performance/LinAdv/fortran/3d/fluxcorner3d.m4 source/test/performance/LinAdv/fortran/3d/grad3d.m4 source/test/performance/LinAdv/fortran/3d/init3d.m4 source/test/performance/LinAdv/fortran/3d/m4bdry3d.i source/test/performance/LinAdv/fortran/3d/m4flux3d.i source/test/performance/LinAdv/fortran/3d/m4fluxcorner3d.i source/test/performance/LinAdv/fortran/3d/m4fluxjt3d.i source/test/performance/LinAdv/fortran/3d/m4trace3d.i source/test/performance/LinAdv/fortran/3d/stable3d.m4 source/test/performance/LinAdv/fortran/3d/stufprobc3d.m4 source/test/performance/LinAdv/fortran/3d/trace1d3d.m4 source/test/performance/LinAdv/fortran/3d/trace3d.m4 source/test/performance/LinAdv/fortran/const.i source/test/performance/LinAdv/fortran/probparams.i source/test/performance/LinAdv/main.C source/test/performance/LinAdv/performance_inputs/domainexpansion.input source/test/performance/LinAdv/performance_inputs/domainexpansionb.input source/test/performance/LinAdv/performance_inputs/front.3d.input source/test/performance/LinAdv/performance_inputs/sine_front_bsyn.3d.input source/test/performance/LinAdv/performance_inputs/sine_front_orig.3d.input source/test/performance/LinAdv/sample_inputs/sine-front-2d.input source/test/performance/LinAdv/sample_inputs/sphere-2d-per-4levels.input source/test/performance/LinAdv/sample_inputs/sphere-2d-re.input source/test/performance/LinAdv/sample_inputs/sphere-2d.input source/test/performance/LinAdv/sample_inputs/sphere-3d.input source/test/performance/LoadBalancers/DerivedVisOwnerData.C source/test/performance/LoadBalancers/DerivedVisOwnerData.h source/test/performance/LoadBalancers/Makefile.depend source/test/performance/LoadBalancers/Makefile.in source/test/performance/LoadBalancers/cube_inputs/big_cube.2d.treelb.input source/test/performance/LoadBalancers/cube_inputs/big_cube.3d.caplb.input source/test/performance/LoadBalancers/cube_inputs/big_cube.3d.treelb.input source/test/performance/LoadBalancers/cube_inputs/huge_cube.2d.treelb.input source/test/performance/LoadBalancers/cube_inputs/huge_cube.3d.treelb.input source/test/performance/LoadBalancers/cube_inputs/med_cube.2d.caplb.input source/test/performance/LoadBalancers/cube_inputs/med_cube.2d.treelb.input source/test/performance/LoadBalancers/cube_inputs/med_cube.3d.caplb.input source/test/performance/LoadBalancers/cube_inputs/med_cube.3d.treelb.input source/test/performance/LoadBalancers/cube_inputs/small_cube.3d.caplb.input source/test/performance/LoadBalancers/cube_inputs/small_cube.3d.treelb.input source/test/performance/LoadBalancers/lb.C source/test/performance/LoadBalancers/sphere_inputs/README source/test/performance/LoadBalancers/sphere_inputs/big_sphere.2d.caplb.input source/test/performance/LoadBalancers/sphere_inputs/big_sphere.2d.treelb.input source/test/performance/LoadBalancers/sphere_inputs/huge_sphere.2d.caplb.input source/test/performance/LoadBalancers/sphere_inputs/med_sphere.2d.caplb.input source/test/performance/LoadBalancers/sphere_inputs/med_sphere.2d.treelb.input source/test/performance/LoadBalancers/sphere_inputs/small_sphere.3d.caplb.input source/test/performance/LoadBalancers/sphere_inputs/small_sphere.3d.treelb.input source/test/performance/LoadBalancers/sphere_inputs/tiny_sphere.2d.caplb.input source/test/performance/LoadBalancers/sphere_inputs/tiny_sphere.2d.treelb.input source/test/performance/LoadBalancers/test_inputs/plank.3d.treelb.input source/test/performance/LoadBalancers/test_inputs/rect.2d.treelb.input source/test/performance/LoadBalancers/test_inputs/rod.1d.treelb.input source/test/performance/LoadBalancers/test_inputs/rod.2d.treelb.input source/test/performance/LoadBalancers/test_inputs/small_cube.2d.caplb.input source/test/performance/LoadBalancers/test_inputs/small_cube.2d.treelb.input source/test/performance/LoadBalancers/test_inputs/small_cube.3d.treelb.input source/test/performance/LoadBalancers/test_inputs/small_sphere.2d.caplb.input source/test/performance/LoadBalancers/test_inputs/small_sphere.2d.treelb.input source/test/performance/Makefile.in source/test/performance/treesearch/Makefile.depend source/test/performance/treesearch/Makefile.in source/test/performance/treesearch/main.C source/test/performance/treesearch/test_inputs/default.2d.input source/test/performance/treesearch/test_inputs/default.3d.input source/test/pointer/Makefile.depend source/test/pointer/Makefile.in source/test/pointer/README source/test/pointer/main-pointer.C source/test/rank_group/Makefile.depend source/test/rank_group/Makefile.in source/test/rank_group/main.C source/test/rank_group/test_inputs/plank.3d.treelb.input source/test/rank_group/test_inputs/rect.2d.treelb.input source/test/rank_group/test_inputs/rod.1d.treelb.input source/test/rank_group/test_inputs/rod.2d.treelb.input source/test/rank_group/test_inputs/small_cube.2d.treelb.input source/test/rank_group/test_inputs/small_cube.3d.treelb.input source/test/rank_group/test_inputs/small_sphere.2d.treelb.input source/test/restartdb/Makefile.depend source/test/restartdb/Makefile.in source/test/restartdb/README source/test/restartdb/database_tests.C source/test/restartdb/database_tests.h source/test/restartdb/database_values.h source/test/restartdb/mainHDF5.C source/test/restartdb/mainHDF5AppFileOpen.C source/test/restartdb/mainMemory.C source/test/restartdb/mainSilo.C source/test/restartdb/mainSiloAppFileOpen.C source/test/samrai_mpi/Makefile.depend source/test/samrai_mpi/Makefile.in source/test/samrai_mpi/main-runtime-disabled.C source/test/samrai_mpi/main-runtime-off.C source/test/samrai_mpi/main-runtime-on.C source/test/samrai_mpi/mpi-interface-tests.C source/test/samrai_mpi/mpi-interface-tests.h source/test/sundials/CVODEModel.C source/test/sundials/CVODEModel.h source/test/sundials/FACjacobian2d.m4 source/test/sundials/FACjacobian3d.m4 source/test/sundials/Makefile.depend source/test/sundials/Makefile.in source/test/sundials/README source/test/sundials/example_inputs/cvode_dir.2d.input source/test/sundials/example_inputs/cvode_dir.3d.input source/test/sundials/example_inputs/cvode_neu.2d.input source/test/sundials/example_inputs/cvode_neu.3d.input source/test/sundials/main.C source/test/sundials/tbox_Pointer-CVODEModel.C source/test/sundials/test_inputs/cvode_dir.2d.input source/test/sundials/test_inputs/cvode_dir.3d.input source/test/sundials/test_inputs/cvode_neu.2d.input source/test/sundials/test_inputs/cvode_neu.3d.input source/test/testtools/testcount.sh source/test/timers/Foo.C source/test/timers/Foo.h source/test/timers/Makefile.depend source/test/timers/Makefile.in source/test/timers/README source/test/timers/README.example source/test/timers/example_inputs/example.input source/test/timers/main_example.C source/test/timers/main_stats.C source/test/timers/main_timer.C source/test/timers/test_inputs/test.input source/test/variables/Makefile.depend source/test/variables/Makefile.in source/test/variables/README source/test/variables/main-var_db.C source/test/vector/Makefile.depend source/test/vector/Makefile.in source/test/vector/README source/test/vector/kvtest.C source/test/vector/pvtest.C tools/Makefile.in tools/restart/Makefile.depend tools/restart/Makefile.in tools/restart/RedistributedRestartUtility.C tools/restart/RedistributedRestartUtility.h tools/restart/main.C tools/scripts/README tools/scripts/conversion2.0/README tools/scripts/conversion2.0/algs.classnames.data tools/scripts/conversion2.0/algs.data tools/scripts/conversion2.0/appu.classnames.data tools/scripts/conversion2.0/appu.data tools/scripts/conversion2.0/convert2.0 tools/scripts/conversion2.0/geom.classnames.data tools/scripts/conversion2.0/geom.data tools/scripts/conversion2.0/hier.classnames.data tools/scripts/conversion2.0/hier.data tools/scripts/conversion2.0/math.classnames.data tools/scripts/conversion2.0/math.data tools/scripts/conversion2.0/mblk.classnames.data tools/scripts/conversion2.0/mblk.data tools/scripts/conversion2.0/mesh.classnames.data tools/scripts/conversion2.0/mesh.data tools/scripts/conversion2.0/packagePrefixPrepend tools/scripts/conversion2.0/packagePrefixPrepend.pl tools/scripts/conversion2.0/pdat.classnames.data tools/scripts/conversion2.0/pdat.data tools/scripts/conversion2.0/renameXd.pl tools/scripts/conversion2.0/rename_tbox tools/scripts/conversion2.0/rename_tbox.pl tools/scripts/conversion2.0/solv.classnames.data tools/scripts/conversion2.0/solv.data tools/scripts/conversion2.0/tbox.classnames.data tools/scripts/conversion2.0/tbox.data tools/scripts/conversion2.0/tbox_classes.data tools/scripts/conversion2.0/xfer.classnames.data tools/scripts/conversion2.0/xfer.data tools/scripts/conversion2.3/README tools/scripts/conversion2.3/convert2.3 tools/scripts/conversion2.3/getNumberMethods.data tools/scripts/conversion2.3/renameGetNumberMethods.pl tools/scripts/conversion2.3/replaceIncludeGuards tools/scripts/conversion2.3/replaceIncludeGuards.pl tools/scripts/conversion3.0/SAMRAI_classes_templated_on_DIM_and_other.txt tools/scripts/conversion3.0/SAMRAI_classes_templated_on_DIM_only.txt tools/scripts/conversion3.0/convertIncludePaths tools/scripts/conversion3.0/convertIncludePaths.pl tools/scripts/conversion3.0/createDimClassData.pl tools/scripts/conversion3.0/removeTemplateOnDim tools/scripts/conversion3.0/removeTemplateOnDim.pl tools/scripts/insure++.psrc tools/scripts/vizamrai_cat.sh tools/scripts/vizamrai_multistep.pl
description:
Initial import of 3.1.0


diff -r 000000000000 -r 5eda1a3f24e8 COPYING.LESSER
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/COPYING.LESSER	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,339 @@
+OUR NOTICE AND TERMS AND CONDITIONS OF THE GNU GENERAL PUBLIC LICENSE
+
+Our Preamble Notice
+
+A. This notice is required to be provided under our contract with the U.S. 
+Department of Energy (DOE). This work was produced at the Lawrence Livermore 
+National Laboratory under Contract No. DE-AC52-07NA27344 with the DOE.
+
+B. Neither the United States Government nor Lawrence Livermore National 
+Security, LLC nor any of their employees, makes any warranty, express or 
+implied, or assumes any liability or responsibility for the accuracy, 
+completeness, or usefulness of any information, apparatus, product, or 
+process disclosed, or represents that its use would not infringe 
+privately-owned rights.
+
+C. Also, reference herein to any specific commercial products, process, or 
+services by trade name, trademark, manufacturer or otherwise does not
+necessarily constitute or imply its endorsement, recommendation, or favoring
+by the United States Government or Lawrence Livermore National Security, LLC. 
+The views and opinions of authors expressed herein do not necessarily state or 
+reflect those of the United States Government or Lawrence Livermore National
+Security, LLC, and shall not be used for advertising or product endorsement 
+purposes.
+
+The precise terms and conditions for copying, distribution and modification
+follows.
+
+GNU Lesser GPL terms and Conditions for Copying, Distribution, and Modification
+
+0. This License Agreement applies to any software library or other program 
+which contains a notice placed by the copyright holder or other authorized 
+party saying it may be distributed under the terms of this Lesser General
+Public License (also called "this License"). Each licensee is addressed as 
+"you".
+
+A "library" means a collection of software functions and/or data prepared so 
+as to be conveniently linked with application programs (which use some of 
+those functions and data) to form executables.
+
+The "Library", below, refers to any such software library or work which has 
+been distributed under these terms. A "work based on the Library" means either 
+the Library or any derivative work under copyright law: that is to say, a work 
+containing the Library or a portion of it, either verbatim or with 
+modifications and/or translated straightforwardly into another language. 
+(Hereinafter, translation is included without limitation in the term 
+"modification".)
+
+"Source code" for a work means the preferred form of the work for making
+modifications to it. For a library, complete source code means all the source
+code for all modules it contains, plus any associated interface definition 
+files, plus the scripts used to control compilation and installation of the 
+library.
+
+Activities other than copying, distribution and modification are not covered 
+by this License; they are outside its scope. The act of running a program 
+using the Library is not restricted, and output from such a program is covered
+only if its contents constitute a work based on the Library (independent of 
+the use of the Library in a tool for writing it). Whether that is true depends 
+on what the Library does and what the program that uses the Library does.
+
+1. You may copy and distribute verbatim copies of the Library's complete source
+code as you receive it, in any medium, provided that you conspicuously and 
+appropriately publish on each copy an appropriate copyright notice and 
+disclaimer of warranty; keep intact all the notices that refer to this License 
+and to the absence of any warranty; and distribute a copy of this License along with the Library.
+
+You may charge a fee for the physical act of transferring a copy, and you may 
+at your option offer warranty protection in exchange for a fee.
+
+2. You may modify your copy or copies of the Library or any portion of it,
+thus forming a work based on the Library, and copy and distribute such 
+modifications or work under the terms of Section 1 above, provided that you 
+also meet all of these conditions:
+
+a) The modified work must itself be a software library.
+
+b) You must cause the files modified to carry prominent notices stating that 
+you changed the files and the date of any change.
+
+c) You must cause the whole of the work to be licensed at no charge to all 
+third parties under the terms of this License.
+
+d) If a facility in the modified Library refers to a function or a table of 
+data to be supplied by an application program that uses the facility, other 
+than as an argument passed when the facility is invoked, then you must make a 
+good faith effort to ensure that, in the event an application does not supply 
+such function or table, the facility still operates, and performs whatever 
+part of its purpose remains meaningful.
+
+(For example, a function in a library to compute square roots has a purpose 
+that is entirely well-defined independent of the application. Therefore, 
+Subsection 2d requires that any application-supplied function or table used by 
+this function must be optional: if the application does not supply it, the 
+square root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If identifiable 
+sections of that work are not derived from the Library, and can be reasonably 
+considered independent and separate works in themselves, then this License, 
+and its terms, do not apply to those sections when you distribute them as 
+separate works. But when you distribute the same sections as part of a whole
+which is a work based on the Library, the distribution of the whole must be on 
+the terms of this License, whose permissions for other licensees extend to the 
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest your 
+rights to work written entirely by you; rather, the intent is to exercise the 
+right to control the distribution of derivative or collective works based on
+the Library.
+
+In addition, mere aggregation of another work not based on the Library with
+the Library (or with a work based on the Library) on a volume of a storage or 
+distribution medium does not bring the other work under the scope of this 
+License.
+
+3. You may opt to apply the terms of the ordinary GNU General Public License
+instead of this License to a given copy of the Library. To do this, you must 
+alter all the notices that refer to this License, so that they refer to the
+ordinary GNU General Public License, version 2, instead of to this License. 
+(If a newer version than version 2 of the ordinary GNU General Public License 
+has appeared, then you can specify that version instead if you wish.) Do not 
+make any other change in these notices.
+
+Once this change is made in a given copy, it is irreversible for that copy, so 
+the ordinary GNU General Public License applies to all subsequent copies and
+derivative works made from that copy.
+
+This option is useful when you wish to copy part of the code of the Library 
+into a program that is not a library.
+
+4. You may copy and distribute the Library (or a portion or derivative of it,
+under Section 2) in object code or executable form under the terms of Sections
+1 and 2 above provided that you accompany it with the complete corresponding 
+machine-readable source code, which must be distributed under the terms of 
+Sections 1 and 2 above on a medium customarily used for software interchange.
+
+If distribution of object code is made by offering access to copy from a 
+designated place, then offering equivalent access to copy the source code from 
+the same place satisfies the requirement to distribute the source code, even 
+though third parties are not compelled to copy the source along with the object
+code.
+
+5. A program that contains no derivative of any portion of the Library, but is 
+designed to work with the Library by being compiled or linked with it, is
+called a "work that uses the Library". Such a work, in isolation, is not a
+derivative work of the Library, and therefore falls outside the scope of this
+License.
+
+However, linking a "work that uses the Library" with the Library creates an 
+executable that is a derivative of the Library (because it contains portions 
+of the Library), rather than a "work that uses the library". The executable is
+therefore covered by this License. Section 6 states terms for distribution of
+such executables.
+
+When a "work that uses the Library" uses material from a header file that is 
+part of the Library, the object code for the work may be a derivative work of 
+the Library even though the source code is not. Whether this is true is 
+especially significant if the work can be linked without the Library, or if 
+the work is itself a library. The threshold for this to be true is not 
+precisely defined by law.
+
+If such an object file uses only numerical parameters, data structure layouts 
+and accessors, and small macros and small inline functions (ten lines or less 
+in length), then the use of the object file is unrestricted, regardless of 
+whether it is legally a derivative work. (Executables containing this object 
+code plus portions of the Library will still fall under section 6.)
+
+Otherwise, if the work is a derivative of the Library, you may distribute the
+object code for the work under the terms of Section 6. Any executables
+containing that work also fall under Section 6, whether or not they are linked 
+directly with the Library itself.
+
+6. As an exception to the Sections above, you may also combine or link a 
+"work that uses the Library" with the Library to produce a work containing
+portions of the Library, and distribute that work under terms of your choice,
+provided that the terms permit modification of the work for the customer's own 
+use and reverse engineering for debugging such modifications.
+
+You must give prominent notice with each copy of the work that the Library is
+used in it and that the Library and its use are covered by this License. You
+must supply a copy of this License. If the work during execution displays 
+copyright notices, you must include the copyright notice for the Library among 
+them, as well as a reference directing the user to the copy of this License.
+Also, you must do one of these things:
+
+a) Accompany the work with the complete corresponding machine-readable source 
+code for the Library including whatever changes were used in the work (which
+must be distributed under Sections 1 and 2 above); and, if the work is an
+executable liked with the Library, with the complete machine-readable "work 
+that uses the Library", as object code and/or source code, so that the user
+can modify the Library and then relink to produce a modified executable 
+containing the modified Library. (It is understood that the user who changes 
+the contents of definitions files in the Library will not necessarily be able 
+to recompile the application to use the modified definitions.)
+
+b) Use a suitable shared library mechanism for linking with the Library. A 
+suitable mechanism is one that (1) uses at run time a copy of the library 
+already present on the user's computer system, rather than copying library 
+functions into the executable, and (2) will operate properly with a modified 
+version of the library, if the user installs one, as long as the modified 
+version is interface-compatible with the version that the work was made with.
+
+c) Accompany the work with a written offer, valid for at least three years,
+to give the same user the materials specified in Subsection 6a, above, for a 
+charge no more than the cost of performing this distribution.
+
+d) If distribution of the work is made by offering access to copy from a 
+designated place, offer equivalent access to copy the above specified materials
+from the same place.
+
+e) Verify that the user has already received a copy of these materials or that
+you have already sent this user a copy.
+
+For an executable, the required form of the "work that uses the Library" must 
+include any data and utility programs needed for reproducing the executable 
+from it. However, as a special exception, the materials to be distributed need
+not include anything that is normally distributed (in either source or binary 
+form) with the major components (compiler, kernel, and so on) of the operating
+system on which the executable runs, unless that component itself accompanies
+the executable.
+
+It may happen that this requirement contradicts the license restrictions of 
+other propriety libraries that do not normally accompany the operating system.
+Such a contradiction means you cannot use both them and the Library together
+in an executable that you distribute.
+
+7. You may place library facilities that are a work based on the Library 
+side-by-side in a single library together with other library facilities not 
+covered by this License, and distribute such a combined library, provided that 
+the separate distribution of the work based on the Library and of the other
+library facilities is otherwise permitted, and provided that you do these two
+things:
+
+a) Accompany the combined library with a copy of the same work based on the 
+Library, uncombined with any other library facilities. This must be distributed
+under the terms of the Sections above.
+
+b) Give prominent notice with the combined library of the fact that part of it
+is a work based on the Library, and explaining where to find the accompanying
+uncombined form of the same work.
+
+1 You may not copy, modify, sublicense, link with, or distribute the Library 
+except as expressly provided under this License. Any attempt otherwise to copy,
+modify, sublicense, link with, or distribute the Library is void, and will
+automatically terminate your rights under this License. However, parties who
+have received copies, or rights, from you under this License will not have
+their licenses terminated so long as such parties remain in full compliance.
+
+2 You are not required to accept this License, since you have not signed it.
+However, nothing else grants you permission to modify or distribute the Library
+or its derivative works. These actions are prohibited by law if you do not 
+accept this License. Therefore, by modifying or distributing the Library (or
+any work based on the Library), you indicate your acceptance of this License 
+to do so, and all its terms and conditions for copying, distributing or 
+modifying the Library or works based on it.
+
+3 Each time you redistribute the Library (or any work based on the Library), 
+the recipient automatically receives a license from the original licensor to
+copy, distribute, link with or modify the Library subject to these terms and 
+conditions. You may not impose any further restrictions on the recipients' 
+exercise of the rights granted herein. You are not responsible for enforcing 
+compliance by third parties with this License.
+
+4 If, as a consequence of a court judgment or allegation of patent infringement
+or for any other reason (not limited to patent issues), conditions are imposed
+on you (whether by court order, agreement or otherwise) that contradict the
+conditions of this License, they do not excuse you from the conditions of this
+License. If you cannot distribute so as to satisfy simultaneously your 
+obligations under this License and any other pertinent obligations, then as a 
+consequence you may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by all
+those who receive copies directly or indirectly through you, then the only way
+you could satisfy both it and this License would be to refrain entirely from 
+distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply, and
+the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any patents or
+other property right claims or to contest validity of any such claims; this 
+section has the sole purpose of protecting the integrity of the free software 
+distribution system which is implemented by public license practices. Many
+people have made generous contributions to the wide range of software 
+distributed through that system in reliance on consistent application of that 
+system; it is up to the author/donor to decide if he or she is willing to 
+distribute software through any other system and a licensee cannot impose that
+choice.
+
+This section is intended to make thoroughly clear what is believed to be a
+consequence of the rest of this License.
+
+1 If the distribution and/or use of the Library is restricted in certain 
+countries either by patents or by copyrighted interfaces, the original 
+copyright holder who places the Library under this License may add an explicit
+geographical distribution limitation excluding those countries, so that 
+distribution is permitted only in or among countries not thus excluded. In 
+such case, this License incorporates the limitation as if written in the body
+of this License.
+
+13. The Free Software Foundation may publish revised and/or new versions of the
+Lesser General Public License from time to time. Such new versions will be
+similar in spirit to the present version, but may differ in detail to address
+new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library specifies
+a version number of this License which applies to it and "any later version",
+you have the option of following the terms and conditions either of that 
+version or of any later version published by the Free Software Foundation. If 
+the Library does not specify a license version number, you may choose any 
+version ever published by the Free Software Foundation.
+
+2 If you wish to incorporate parts of the Library into other free programs
+whose distribution conditions are incompatible with these, write to the author 
+to ask for permission. For software which is copyrighted by the Free Software 
+Foundation, write to the Free Software Foundation; we sometimes make exceptions
+for this. Our decision will be guided by the two goals of preserving the free
+status of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+NO WARRANTY
+1 BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE
+LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
+STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
+LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
+FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
+PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE,
+YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+2 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL 
+ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE 
+THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 
+GENERAL, SPECIAL, INCIDENTAL OR CONSQUENTIAL DAMAGES ARISING OUT OF THE USE OR 
+INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
+BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER
+OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+
diff -r 000000000000 -r 5eda1a3f24e8 COPYRIGHT
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/COPYRIGHT	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,29 @@
+COPYRIGHT
+
+The following copyright applies to each file in the SAMRAI distribution, unless
+otherwise stated in the file:
+
+Copyright (c) 1997-2010,  Lawrence Livermore National Security, LLC.
+Produced at the Lawrence Livermore National Laboratory.  Written by The SAMRAI
+Team <samrai at llnl.gov>. LLNL-CODE-434871.  All rights reserved. 
+
+This file is part of SAMRAI.  For details, see http://www.llnl.gov/CASC/samrai.
+
+Please also read COPYING.LESSER - Our Notice and GNU Lesser General Public
+License.
+
+SAMRAI is free software: you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation, either version 2.1 of the License dated February
+1999, or (at your option) any later version.
+
+SAMRAI is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with SAMRAI.  If not, write to the Free Software Foundation, Inc., 59
+Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+
diff -r 000000000000 -r 5eda1a3f24e8 INSTALL-NOTES
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/INSTALL-NOTES	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,515 @@
+****************************************************************************
+*  Copyright 1997-2010                                                     *
+*  Lawrence Livermore National Security, LLC.                            *
+*  All rights reserved.                                                    *
+****************************************************************************
+****************************************************************************
+*                                                                          *
+*     Structured Adaptive Mesh Refinement Applications Infrastructure      *
+*                   http://www.llnl.gov/CASC/SAMRAI                        *
+*                                                                          *
+****************************************************************************
+*    For installation help, see INSTALL-NOTES.                             *
+*    For release notes, see RELEASE-NOTES.                                 *
+*    For copyright information, see COPYRIGHT-STATEMENT.                   *
+*    For code and user documentation, see files in /docs directory         *
+*    For help and information about updates and releases, please send      *
+*        email to samrai at llnl.gov                                          *
+*    For reporting bugs and suggestions, internal CASC users please use    *
+*        the CASC bug tracking system at http://www-casc-llnl.gov/bugs/    *
+*        and external users please send email to samrai-bugs at llnl.gov      *
+*    For more information on SAMRAI see http://www.llnl.gov/CASC/SAMRAI/   *
+****************************************************************************
+****************************************************************************
+
+Overview
+--------
+
+This document describes the SAMRAI installation process.
+
+Documentation for the library can be found in the docs directory after
+you untar the distribution.  See the docs/main.html web page for pointers
+to other documents.
+
+Directory Structure
+-------------------
+
+We recommend the following directory structure:
+
+	SAMRAI-vX.Y.Z/
+		SAMRAI/
+		ARCH1-CXX1-OPTDEBUG1/
+			config/ lib/
+		ARCH2-CXX2-OPTDEBUG2/
+			config/ lib/
+		ARCH3-CXX3-OPTDEBUG3/
+			config/ lib/
+
+where SAMRAI/ is the SAMRAI source distribution and the other
+subdirectories contain library archives and configuration files
+for a particular architecture, compiler, and set of optimization
+flags.  For example,
+
+	SAMRAI-v2.1.0/
+		SAMRAI/
+		solaris-g++-debug/
+			config/ lib/
+		solaris-KCC-opt/
+			config/ lib/
+		rs6000-g++-optdebug/
+			config/ lib/
+
+The subdirectories config/, lib/, etc.,
+are created automatically by the SAMRAI installation procedure
+(configure).
+
+(1) Unpacking the Distribution
+------------------------------
+
+The SAMRAI source code is generally distributed as a gzipped tar file.
+SAMRAI version numbers are of the form X.Y.Z, where X is the major release
+number, Y is the minor release number, and Z is the bug fix patch number.
+To unpack the distribution as described above, do:
+
+	(a) mkdir SAMRAI-vX.Y.Z (substitue appropriate version numbers)
+	(b) cd SAMRAI-vX.Y.Z
+	(c) zcat ../SAMRAI-vX.Y.Z.tar | tar xfov -
+
+You may need to use the GNU tar (often named gtar) due to name length
+problems with some of the native tar implementations.
+
+Note that this assumes that the SAMRAI tar file is in the same directory
+as SAMRAI-v.X.Y.Z.  If this is not the case, you will need to change the
+path in the zcat to point to the SAMRAI tar file.
+
+After these steps, the directories should look as follows:
+
+	SAMRAI-vX.Y.Z/
+		SAMRAI/
+
+(2) Configuring Make Options
+----------------------------
+
+SAMRAI uses the GNU autoconfiguration toolkit.  The ``configure'' shell
+script attempts to guess correct values for various system-dependent features
+needed during the compilation.  These values are used to generate Makefiles
+in the SAMRAI subdirectories. 
+
+The object files for SAMRAI files are typically compiled into a separate
+directory from the SAMRAI source.  This approach facilitates building separate
+SAMRAI installations in the same directory structure (e.g., for an SGI or Sun
+that share a file system).  This object directory can be placed at the same
+level as the SAMRAI distribution:
+
+	SAMRAI-vX.Y.Z/
+		SAMRAI/
+		objs/
+
+where the directory name ``objs'' is arbitrary.  To configure SAMRAI for your
+architecture, do the following:
+
+	(a) mkdir objs
+	(b) cd objs
+	(c) sh ../SAMRAI/configure [options]
+
+where [options] are a set of optional flags to select different configuration
+options.   Use "../SAMRAI/configure --help" to get a list of all possible
+options and their explanations.  LLNL users may wish to use the
+"config.suggest" tool which provides a set of configure options that work on
+CASC and LC systems.  
+
+    LLNL Users:  
+	(a) sh ../SAMRAI/config.suggest         -- lists architectures on which
+						   we have configured.
+	(b) sh ../SAMRAI/config.suggest [arch]  -- prints configure options
+
+See the section "Configure Options" below for more details on supported 
+configuration options.  
+
+(3) Editing Options after Configuration
+---------------------------------------
+
+The configuration script will create a number of files in the ``objs'' object
+directory, including config, include, lib, and source directories.  The source
+directory contains Makefiles that will be used to compile the SAMRAI code.  The
+config and include subdirectories contain the following files:
+
+		objs/
+			config/
+				Makefile.config
+			include/
+				SAMRAI_config.h
+
+These two files contain the configuration information required for the SAMRAI
+build.  You may edit these files to fix options that were incorrectly set by
+the SAMRAI configuration script.  The Makefile.config file is included by every
+SAMRAI Makefile and contains definitions such as compilers and flags.  The
+SAMRAI_config.h file is a configuration file included by all C++ source files.
+It #defines certain macros (e.g., HAVE_MPI) that reflect the architecture and
+options specified to ``configure'' at configuration time.
+
+(4) Making the Libraries
+------------------------
+
+Change directory into ``objs'' and GNUmake (standard Unix make will
+NOT work) to build the libraries.  You may make the entire library or
+only those sections for a specified problem dimension.
+
+	(a) cd objs
+	(b) gmake library
+
+or
+
+	(a) cd objs
+	(b) gmake lib2d lib3d
+
+Get a cup of coffee.  Go watch ``The Simpsons.''  Compiling all of the
+SAMRAI distribution will take from twenty minutes to well over an hour, unless
+you have a more modern operating system and can take advantage of the
+parallelism in gmake.  Then building SAMRAI will build in significantly shorter
+amount of time.
+
+You may also re-make the archive via ``gmake archive'' or remove all object
+and library files via ``gmake clean''.
+
+(4) Making the tools
+------------------------
+
+The optional tools may be built using:
+
+    gmake tools
+
+This includes the restart-redistribute utility to convert a SAMRAI
+restart file to run on N processors to one compatible with running on
+M processors.
+
+
+(6) Installing the Libraries
+----------------------------
+
+After the libraries have been created, install the libraries and configuration
+files using:
+
+	(a) gmake install
+
+This will move files into the subdirectory specified by PREFIX in the
+configuration command.  The default behavior will place the installed
+code in a directory of the form ARCH-CXX-DEBUG (see above).  
+
+IMPORTANT NOTE:  When linking to an installed version of the library,
+it is not necessary to define SAMRAI or OBJECT in the user's
+Makefile because these are defined by the installed version of 
+Makefile.config file which should be included in the user's Makefile.
+However, for development work that links in the libraries from
+the ``objs'' directory, the user makefile must define SAMRAI to be the
+top of the SAMRAI source tree and OBJECT to be the ``objs'' directory.
+
+(6) Cleaning Up
+---------------
+
+After installing the libraries, you may remove the source and 
+object directory ``objs'' in which SAMRAI was compiled.  However, 
+it is recommended that you do not remove the SAMRAI source
+directory, since it contains source files for the debugger.
+
+
+Configure Options:
+-------------------
+
+Use the help message from the configure script:
+
+        ./configure --help 
+
+to list all available configuration options.  
+
+The default configuration builds support for SAMRAI datatypes based on
+bool, char, int, float, double, and dcomplex.
+
+Substitute the locations of the the various packages you wish to
+include.  SAMRAI optionally uses a number of specialized high-level
+libraries, such as HDF5, PETSc, Sundials, etc.  By default, these are
+disabled.  To use any of the libraries, you must know where they are
+installed on your particular system and use the appropriate configure
+flag to specify the location.
+
+For many, particularly users at LLNL, it may be easier to just use one of 
+the configurations tested by the development team.  To do this, use the 
+output of the ``config.suggest'' script as the argument to configure.
+This script translates a simple index string into configure options
+that are known to work (at the time of release).  To get help on using
+the "config.suggest" script, run it without any arguments.  The script
+"config.suggest" simply gives a suggestion.  You are ultimately
+responsible for looking at the options, understanding them and modifying
+them to suit your needs.  The script "config.suggest" does not show all
+possible configure options--use "configure --help" for that.
+
+	sh ../SAMRAI/config.suggest         -- lists architectures supported
+	sh ../SAMRAI/config.suggest [arch]  -- prints configure options
+
+The default settings used by config.suggest refer to locations on the
+LLNL systems where we have found them.  However, please note that these
+locations ARE subject to change and it is not feasible for us to keep up
+with those changes here.  If you are at LLNL, please check with the
+custodians of the libraries you would like to use.  They may provide
+precompiled installations you can use.
+
+Please note that the SAMRAI-PETSc vector interface was developed using
+PETSc version 2.3.3.  In order to use the PETSc library, version 2.3.3
+MUST be installed on your system.  SAMRAI is incompatible with prior
+(and possibly more recent) PETSc releases.  There is a tight coupling
+between SAMRAI and PETSc so other versions will potentially have
+interface changes that will break things.  In addition, note that
+PETSc uses the blas routines, so remember to use the blas option (see
+the --help message) if you will be linking to PETSc.
+
+For compilers FORTRAN, C, and C++, the list of default compilers is given in
+the order in which they are tried.  The first compiler to successfully create 
+and run a simple test is chosen.  If a different compiler is needed, it must be 
+specified on the configuration line using `--with-COMPILER[=compiler]`.
+
+The defaults for the command
+        sh ../SAMRAI/configure 
+ are:
+        --enable-debug
+        --disable-opt
+        --enable-vpath (except under IRIX64)
+        --disable-xargs
+        --with-MPI
+        --with-CC     (CC gcc cc)
+        --with-CXX    (mpKCC KCC g++)
+        --with-F77    (f77 g77 xlf f2c)
+        
+
+To change default settings, use the flags described above. For example:
+
+	sh ../SAMRAI/configure --with-CXX=g++
+
+	sh ../SAMRAI/configure --with-CXX=/usr/bin/CC --without-MPI
+
+	sh ../SAMRAI/configure --disable-debug --enable-opt --with-vampir
+
+	sh ../SAMRAI/configure --with-petsc=/usr/casc/petsc
+
+To link with the proper MPI libraries, make sure that your PATH environment
+variable includes the location of the C compiler script needed to correctly
+link with MPI (e.g., mpicc for MPICH).
+
+Note that some machines pre-define certain environment variables that will
+over-ride those in the script.  For example, IBM machines are prone to defining
+ARCH to be rs6k, whereas the configure script would have returned ARCH as
+rs6000.  These pre-defined environment variables may cause problems with the
+configuration script.
+
+Versions of libraries/tools used by the development team
+--------------------------------------------------------
+
+The following are the versions of libraries and tools we have used in
+the development of this release.  This list should not be considered
+as a requirement list (with the exception of PETSc), it is intended to
+provide information on versions we believe should be working.  Users
+who encounter problems compiling and linking and want to see if they
+are using a version significantly older or newer.  The versions listed
+are used in our regression test suite.
+
+NOTE: Because our visualization and restart capabilities are both dependent
+on HDF5, the configure script will stop if you do not specify an HDF5
+installation in the configure step.  You may still build the library
+without it by explicitly specifying "--without-hdf5" in the configure
+arguments.
+
+Tool 		Version(s)
+--------------  --------------------------------------  
+gcc		3.4.6, 4.1.2, 4.5.0
+
+ilx		6.0.0.3
+
+icc		9.1.045, 9.1.049, 11.1.059
+
+xlc	        v7.0, v9.0	
+
+pathscale	Does not currently work.  Core dumps and produces incorrect results.
+
+PGI             Does not currently work.
+
+HDF5		1.6.5, 1.8.5
+
+MPICH2          1.0.7    (MPICH1 is no longer supported and 
+	                  has bugs which will hang SAMRAI)
+
+OpenMPI	        1.2.8
+
+PETSc 	        2.3.3    (this version is required)
+
+Sundials        2.3.0
+
+hypre           2.2.0b, 2.6.0b
+
+Visit		1.8.0
+
+doxygen	        1.5.1
+
+graphviz	2.6
+
+
+Visualization Tools:
+--------------------
+
+SAMRAI uses the VisIt visualization system.  This replaces the
+vizamrai utility in previous releases.  VisIt binaries, source, and
+documentation are available at http://www.llnl.gov/visit.  You must
+compile with HDF in order to create VisIt output files.  See the
+SAMRAI/examples/Euler application for example of how to use the
+VisItDataWriter.
+
+Location users can find VisIt in /usr/apps/visit on CASC systems and
+/usr/gapps/ on LC systems.
+
+Performance Analysis Tools:
+---------------------------
+
+SAMRAI maintains links to the Tau and Vampir performance analysis tools.  
+Tau (Tuning and Analysis Utilities) is a freely available tool out of 
+the University of Oregon (http://www.cs.uoregon.edu/research/paracomp/tau)
+that is available on all CASC and LC platforms.  Vampir is a proprietary 
+tool available only on LC platforms (e.g. blue/frost, tc2k, gps).
+
+By default, SAMRAI is NOT configured with either tool.  To use the tools,
+you must use the --with-tau and/or --with-vampir configure options, discussed
+above.  
+
+Links to Tau and Vampir are maintained through the SAMRAI timers.  Hence, you
+must manually instrument your code with SAMRAI timers to use either tool. Tau
+provides a profile view of times on each processor so it is useful to identify
+load imbalances and distribution of computational workload.  Vampir provides
+the additional capability of building a trace of the applications method calls 
+and MPI communication pattern.  Although Vampir provides more information, it
+is more heavyweight than Tau because building the trace file can incur 
+significant computational overhead and the trace files often become quite 
+large.  Unlike Tau, Vampir is not available on all platforms.  We generally 
+recommend starting with Tau to glean baseline performance information and 
+use Vampir, if available, for more detailed analysis.
+
+Vampir may be invoked using the ``--with-vampir'' configure option. Vampir
+is only available on the ASCI IBM systems (blue, frost) and on LC Compaq
+machines (gps, tc2k).  It is not available on any of the CASC machines.
+Tau is available on a variety of machines and is invoked using the 
+``--with-tau=<tau-makefile>'' where the location of the Tau makefile 
+maintained on LLNL systems is as follows: 
+
+   i386-linux (casc linux):
+      (for standard timers only - no hardware counters or mem checking)
+         --with-tau=/usr/casc/samrai/tau/tau-2.13.5/i386_linux/lib/Makefile.tau-linuxtimers-mpi
+
+   IBM frost (blue won't work):
+      (for standard timers and mem tracking)
+         --with-tau=/usr/casc/samrai/tau/tau-2.12/rs6000/lib/Makefile.tau-mpi-kcc
+      (for hardware counters)
+         --with-tau=/usr/casc/samrai/tau/tau-2.12/rs6000/lib/Makefile.tau-multiplecounters-mpi-papi-kcc
+
+To view the profile files that Tau generates upon running the code, use
+the "jracy" tool located in <tau-dir>/bin/jracy, where <tau-dir> corresponds
+to the above tau directory locations (i.e. everything before /lib).
+
+See the document SAMRAI/docs/userdocs/TimerInstrumentation.pdf for more 
+information about use of Tau and Vampir.
+
+Documentation
+--------------------
+
+SAMRAI uses the Doxygen system for building code documentation.  The
+Graphviz is also utilized for building the inheritance/relationship
+diagrams within the documentation.
+
+Please note that older version of Doxygen will hang when building the
+documentation. The SAMRAI team is using the versions indicated above;
+if you are using older versions it may not work.
+
+Doxygen is available at:  http://www.stack.nl/~dimitri/doxygen
+Graphviz is available at: http://www.graphviz.org/
+
+****************************************************************************
+                            Platform notes
+****************************************************************************
+
+uP and IBM Power Systems
+------------------------
+
+On the Livermore Computing IBM Power Systems the configure script
+needs to be run with the "nopoe" command in order to correctly
+determine the compiler settings.  For example:
+
+nopoe  ../SAMRAI/configure `eval ../SAMRAI/config.suggest up_xlc` 
+
+The regression test suite needs to be run with the SHELL set to bash
+(or some other non-IBM sh shell).
+
+gmake SHELL=/usr/local/bin/bash checktest
+
+The default sh (/bin/sh) does not work with some of the scripting
+features being used.
+
+Apple Mac OS X
+--------------
+
+Note that this port has very little support by the LLNL SAMRAI team; we
+don't use Mac's.
+
+SAMRAI was compiled successfully on Leopard.  The GNU 4.3 compilers
+and HDF that are configured using the DarwinPorts port were used and
+Xcode 3.0 installed for MPI.  Note that the X code toolkit from Appple
+does not include fortran which is why an alternative compiler chain
+is used.
+
+For reference the following is the output of the "port installed" command 
+to show what development environemnt was used for the Mac.
+
+   > port installed
+     The following ports are currently installed:
+       emacs @22.2_0 (active)
+       expat @2.0.1_0 (active)
+       gawk @3.1.6_0 (active)
+       gcc43 @4.3.0_1 (active)
+       gettext @0.17_2
+       gettext @0.17_3 (active)
+       gmp @4.2.2_1 (active)
+       hdf5 @1.6.7_3 (active)
+       libiconv @1.12_0 (active)
+       mpfr @2.3.0_4+darwin_i386
+       mpfr @2.3.1_0+darwin_i386 (active)
+       ncurses @5.6_0 (active)
+       ncursesw @5.6_0+darwin_9
+       ncursesw @5.6_1 (active)
+       zlib @1.2.3_1 (active)
+  
+XCode version is:
+
+      > xcodebuild -version
+      Component versions: DevToolsCore-921.0; DevToolsSupport-893.0
+
+Configure was run using:
+
+          > eval ../SAMRAI/configure `../SAMRAI/config.suggest macosx_gnu`
+
+We also tested using the MPI compiler frontend wrapper with (note that
+the default XCode compilers must be overridden):
+
+   export CXX=g++-mp-4.3
+   export CC=gcc-mp-4.3
+   export F77=gfortran-mp-4.3
+   eval ../SAMRAI/configure \
+         --with-CXX=mpicxx \
+         --with-CC=mpicc \
+	 --with-F77=mpif77 \
+	 --with-hdf5=/opt/local \
+	 --with-parallel-run-bin=/usr/bin/mpirun
+
+
+****************************************************************************
+****************************************************************************
+*  Looking for list of configure options?  We have encapsulated this in    *
+*  the new ``config.suggest'' tool.                                        *
+*                                                                          *
+*  SEE DISCUSSION UNDER "CONFIGURE OPTIONS" AT LINE 216 ABOVE.             *
+****************************************************************************
+****************************************************************************
+
diff -r 000000000000 -r 5eda1a3f24e8 Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,271 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for the entire SAMRAI distribution 
+##
+#########################################################################
+
+default: library tools
+
+SAMRAI  = @top_srcdir@
+SUBDIR  = .
+SRCDIR  = @srcdir@
+OBJECT  = .
+
+include ./config/Makefile.config
+
+INCLUDE_SAM = @top_srcdir@/source/SAMRAI
+INSTALL	    = sh @srcdir@/config/install-sh
+INSTDIR	    = @INSTDIR@
+
+# SGS TODO These lists should be cleaned up
+#
+# List of packages to process. 
+# tbox is not included since all of it's object files go into libSAMRAI.a (.so)
+# 
+PACKAGES=appu algs solv geom mesh math pdat xfer hier tbox
+PACKAGES_R=tbox hier xfer pdat math mesh geom solv algs appu  
+
+#
+# List of all packages, including tbox
+#
+ALL_PACKAGES=appu algs solv geom mesh math pdat xfer hier tbox
+
+#
+# List of libraries that will be created.
+#
+LIBRARIES=appu algs solv geom mesh math pdat xfer hier tbox
+LIBRARIES_R=tbox hier xfer pdat math mesh geom solv algs appu
+
+#
+# Package to directory name mapping
+dir_appu=apputils
+export dir_appu
+dir_algs=algorithm
+export dir_algs
+dir_solv=solvers
+export dir_solv
+dir_geom=geometry
+export dir_geom
+dir_mesh=mesh
+export dir_mesh
+dir_math=mathops
+export dir_math
+dir_pdat=patchdata
+export dir_pdat
+dir_xfer=transfer
+export dir_xfer
+dir_hier=hierarchy
+export dir_hier
+dir_tbox=toolbox
+export dir_tbox
+
+# These targets are based on the current config chosen (standard, noxargs, 
+# or shared).
+library: Makefile
+	(cd source && $(MAKE) library) || exit 1
+	$(MAKE) archive_lib_$(SAMRAI_TARGET) || exit 1
+
+tools: forcetools library
+	@if test ! -d bin; then mkdir bin; fi
+	(cd tools && $(MAKE) $@) || exit 1
+
+# Since directory tools exists create a target that is not directory
+# so tools will evaluate
+forcetools:
+
+clean:
+	( cd source && $(MAKE) $@ ) || exit 1
+	( cd tools  && $(MAKE) $@ ) || exit 1
+	( cd source/test   && $(MAKE) $@ ) || exit 1
+	$(RM) lib/libSAMRAI*.a
+	$(RM) lib/libSAMRAI*.so
+	$(RM) bin/*
+
+# Clean out the test directory.
+cleantest:
+	cd source/test && $(MAKE) clean
+
+checkclean:
+	cd source/test && $(MAKE) clean
+
+# Build temporary files containing list of object files for each
+# library.
+archive_gather_obj_names: archive_remove_obj_names
+	@find source -name "*.o" -print | egrep -v "(test)" > obj.all
+	@cp obj.all obj.remain
+	@-for i in $(PACKAGES); \
+	do \
+	   grep $$i obj.remain >> obj.$$i; \
+	   grep -v $$i obj.remain > obj.tmp; \
+           mv obj.tmp obj.remain; \
+	done
+	@mv obj.remain obj.shouldbeempty 
+
+# Remove temporary lists of object files
+archive_remove_obj_names:
+	@for i in $(LIBRARIES); \
+	do \
+	   $(RM) obj.$$i; \
+	done
+	@$(RM) obj.all obj.all obj.shouldbeempty
+
+#=============================================================================
+# 
+# Static library with xargs targets
+#
+#=============================================================================
+
+
+archive_lib_standard:
+	@if test ! -d lib; then mkdir lib; fi
+	$(MAKE) archive_gather_obj_names
+	@for i in $(LIBRARIES); \
+	do \
+	   echo "Creating archive lib/libSAMRAI_$$i$(LIB_SUFFIX)"; \
+	   $(RM) lib/libSAMRAI_$$i$(LIB_SUFFIX); \
+	   cat obj.$$i | @XARGS@ @AR@ ru lib/libSAMRAI_$$i$(LIB_SUFFIX); \
+	done
+	$(MAKE) archive_remove_obj_names
+
+#=============================================================================
+# 
+# Static library without xargs targets
+#
+#=============================================================================
+archive_lib_noxargs:
+	@if test ! -d lib; then mkdir lib; fi
+	$(MAKE) archive_gather_obj_names
+	@for i in $(LIBRARIES); \
+	do \
+	   echo "Creating archive lib/libSAMRAI_$$i$(LIB_SUFFIX)"; \
+	   $(RM) lib/libSAMRAI_$$i$(LIB_SUFFIX); \
+	   @AR@ ru lib/libSAMRAI_$$i$(LIB_SUFFIX) `cat obj.$$i`; \
+	done
+	$(MAKE) archive_remove_obj_names
+
+#=============================================================================
+# 
+# Shared library targets
+#
+#=============================================================================
+archive_lib_shared:
+	@if test ! -d lib; then mkdir lib; fi
+	$(MAKE) archive_gather_obj_names
+	@LIBLIST=""; \
+	for i in $(LIBRARIES_R); \
+	do \
+	   echo "Creating archive lib/libSAMRAI_$$i$(LIB_SUFFIX)"; \
+	   $(RM) lib/libSAMRAI_$$i$(LIB_SUFFIX); \
+	   $(CXX) $(CXXLD_FLAGS) -o lib/libSAMRAI_$$i$(LIB_SUFFIX) `cat obj.$$i` -L./lib $$LIBLIST $(CXXLDLIBS); \
+	   LIBLIST="$$LIBLIST -lSAMRAI_$$i"; \
+	done
+	$(MAKE) archive_remove_obj_names
+
+install: library tools
+	$(INSTALL) -d -m 755 $(INSTDIR)/config
+	$(INSTALL) -d -m 755 $(INSTDIR)/lib
+	$(INSTALL) -d -m 755 $(INSTDIR)/bin
+	$(INSTALL) -d -m 755 $(INSTDIR)/include
+	$(INSTALL) -d -m 755 $(INSTDIR)/include/SAMRAI
+	$(INSTALL) -c -m 644 COPYRIGHT $(INSTDIR)
+	$(INSTALL) -c -m 644 config.status $(INSTDIR)/config
+	$(INSTALL) -c -m 644 config/Makefile.config $(INSTDIR)/config
+	cat config/Makefile.config.install >> $(INSTDIR)/config/Makefile.config 
+	$(INSTALL) -c -m 644 include/SAMRAI/SAMRAI_config.h $(INSTDIR)/include/SAMRAI/
+	@for i in $(ALL_PACKAGES); \
+	do \
+           $(INSTALL) -d -m 755 $(INSTDIR)/include/SAMRAI/$$i;                    \
+           for f in $(INCLUDE_SAM)/$$i/*.[hICi]; do                               \
+              $(INSTALL) -c -m 644 $$f $(INSTDIR)/include/SAMRAI/$$i;             \
+           done;                                                                  \
+           if test -d $(INCLUDE_SAM)/$$i/fortran; then                            \
+              for f in $(INCLUDE_SAM)/$$i/fortran/*.[i]; do		          \
+		if test -f $$f; then                                              \
+	           if ! test -d $(INSTDIR)/include/SAMRAI/$$i/fortran; then       \
+		      $(INSTALL) -d -m 755 $(INSTDIR)/include/SAMRAI/$$i/fortran; \
+	           fi;                                                            \
+	           $(INSTALL) -c -m 644 $$f $(INSTDIR)/include/SAMRAI/$$i/fortran;\
+		fi                                                                \
+	     done;                                                                \
+	   fi                                                           	  \
+	done
+	@if test -f lib/libSAMRAI_tbox.a; then                           \
+		for i in lib/libSAMRAI*.a; do				\
+		   $(INSTALL) -c -m 644 $$i $(INSTDIR)/lib;             \
+		done                                                    \
+	fi 
+	@if test -f lib/libSAMRAI_tbox.so; then                          \
+		for i in lib/libSAMRAI*.so; do				\
+		   $(INSTALL) -c -m 644 $$i $(INSTDIR)/lib;             \
+		done                                                    \
+	fi
+	@if test -f bin/restart-redistribute; then                       \
+		for i in bin/*; do               			\
+		   $(INSTALL) -c -m 755 $$i $(INSTDIR)/bin;             \
+		done                                                    \
+	fi
+
+# Rebuild config.status if configure changed.
+config.status: @top_srcdir@/configure
+	./config.status --recheck
+
+# Rules for making documentation from top level.
+dox redox devdox redevdox:
+	(cd docs && $(MAKE) $@)
+
+# Run the SAMRAI test suite
+check:
+	(cd source/test; $(MAKE) check)
+
+# Compile the SAMRAI test suite
+checkcompile:
+	(cd source/test; $(MAKE) checkcompile)
+
+# Run the SAMRAI test suite as it is run in autotests
+checktest:
+	(cd source/test; $(MAKE) checktest)
+
+memtest: 
+	rm -f ~/insure.out 
+	$(MAKE) checktest
+	@NUM_INSURE_RUNS=`grep "PROBLEM SUMMARY - by type" ~/insure.out| wc -l`;            \
+	NO_LEAKS=`grep "No leaks were found" ~/insure.out | wc -l`;                         \
+        NUM_INSURE_ERRORS=`grep TOTAL ~/insure.out | awk '{ sum += $$2}; END {print sum}'`; \
+	if test $$NO_LEAKS -ne $$NUM_INSURE_RUNS;                                           \
+	then                                                                                \
+	   echo "FAIL: Insure++ reported memory leaks";                                     \
+	else                                                                                \
+	   echo "PASSED: Insure++ reported no memory leaks";                                \
+	fi;                                                                                 \
+        if test "$$NUM_INSURE_ERRORS" -ne "0";                                              \
+	then                                                                                \
+	   echo "FAIL: Insure++ reported unexpected errors";                                \
+	else                                                                                \
+	   echo "PASSED: Insure++ reported no unexpected errors";                           \
+	fi                                                                      
+
+# Update copies/links in the include directory
+# Only needed if you modifiy SAMRAI files, normal
+# users don't need to do this.
+update:
+	(cd @top_srcdir@ && ./source/scripts/update)
+
+#
+# Run automatic indenter on SAMRAI source files.
+#
+indent:
+	(cd @top_srcdir@ && ./source/scripts/indent.pl)
+
+# Generate the automatically created files.
+# Only needed if you modifiy SAMRAI files, normal
+# users don't need to do this.
+genfiles: update indent
+	@-(cd @top_srcdir@; \
+	for i in `find . -name genfiles.sh`; \
+	do \
+		(cd `dirname $$i` && ./genfiles.sh) \
+	done)
diff -r 000000000000 -r 5eda1a3f24e8 RELEASE-NOTES
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RELEASE-NOTES	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,876 @@
+*****************************************************************************
+  Copyright 1997-2010
+  Lawrence Livermore National Security, LLC.
+  All rights reserved.
+*****************************************************************************
+
+                     Release Notes for SAMRAI v3.1 (beta)
+
+     (notes for previous releases may be found in /SAMRAI/docs/release)
+
+*****************************************************************************
+
+Please direct any questions related to these notes to the SAMRAI development
+team by sending email to samrai at llnl.gov.
+
+LLNL users can use the discussion groups on the LLNL Sourceforge site:
+
+https://sourceforge.llnl.gov/sf/discussion/do/listForums/projects.samrai/discussion
+
+*****************************************************************************
+
+Where to report Bugs
+--------------------
+
+If a bug is found in the SAMRAI library, we ask that you kindly report
+it to us so that we may fix it.  LLNL users may report bugs using the
+LLNL Sourceforge site if you have a sourceforge account:
+
+https://sourceforge.llnl.gov/sf/tracker/do/listTrackers/projects.samrai/tracker
+
+Bugs found by other users should send email to samrai-bugs at llnl.gov.
+
+*****************************************************************************
+
+----------------------------------------------------------------------------
+                Summary of what's new
+-----------------------------------------------------------------------------
+
+This section contains a summary of additions to SAMRAI.  More detailed
+descriptions of items in the following list are provided below.
+
+(1) Enhanced scalability.
+
+(2) Added PatchLevelFillPattern class
+
+(3) Added VariableFillPattern class
+
+(4) New configure options added for inlining and assertions checking
+
+(5) New configure options added for the zlib compression library.
+
+(6) Environment variable for forcing abort to be called on exit.
+
+(7) PatchHierarchy and MultiblockPatchHierarchy take input databases.
+
+(8) New configure option to disable SAMRAI timers (--disable-timers).
+-----------------------------------------------------------------------------
+                Summary of what's changed
+-----------------------------------------------------------------------------
+
+This section contains a summary of changes to SAMRAI.  More detailed
+descriptions of items in the following list are provided below.
+
+(1) Include file location changes and SAMRAI source directory restructuring.
+
+(2) Removed templating on Dimension.
+
+(3) Compiler support and library support.
+
+(4) Removed Vizamrai utility and writer.
+
+(5) LoadBalancer renamed to ChopAndPackLoadBalancer.
+
+(6) AsyncCommStage interface names changed for clarity.
+
+(7) set/getDefaultDepth method name changes in DataFactories.
+
+(8) Arena memory allocation classes removed.
+
+(9) Using parallel HDF5.
+
+(9) RefineOperator::refine() interface changed.
+
+(10) RefineOperator::refine() interface changed
+
+(11) Increased number of digits for processor, patch based names.
+
+(12) Template instantiation model changed to implicit and explicit
+     option removed.
+
+(13) Renamed getOneIntVector and getZeroIntVector.
+
+(14) XLF function names changed to no-underscore.
+
+(15) Inline control macros changed.
+
+(16) Implicit tbox::Pointer conversion not allowed.
+
+(17) Connectors and MappedBoxLevels initialization uses references.
+
+(18) Changes to data and accessors in MappedBoxLevel and Connector.
+
+(19) Changing neighbor set in Connectors must use specific methods.
+
+(20) Changed allocate interface to PatchDataFactory.
+
+(21) Changed names of overlap and mapping Connector utilty classes.
+
+(22) PatchLevel::Iterator now returns a Pointer<Patch> instead of
+     the patch number.
+
+(23) IntVector implicit conversion to raw int[] array removed.
+
+(24) SAMRAI timers now enforce ordering of start/stop methods.
+
+(25) AbstractStream and FileStream clases were removed, MessageStream 
+     interface changed.
+
+(26) SAMRAIManager initialize and finalize methods added.
+
+(27) tbox::ShutdownManager renamed to tbox::StartupShutdownManager.
+
+(28) Type names in SAMRAI_MPI have been capitalized.
+
+(28) SAMRAI now uses an exclusive MPI communicator by default.
+
+(29) SAMRAI_MPI interfaces have been expanded.
+
+(30) SAMRAI_MPI interfaces changed to avoid using static communicator.
+
+(31) Optional types no longer optional.
+
+(32) Dimension class no longer supports implicit conversion to an unsigned short.
+
+(33) Major changes in SAMRAI_MPI class, requiring users to change some
+     code.
+
+(34) Configuration changes for running on BG platform.
+
+(35) Each gridding algorithm is now tied to a specific hierarchy,
+     affecting public interfaces.
+
+(36) Some parameters and accessors in GriddingAlgorithm and
+     MultiblockGriddingAlgorithm input databases have been relocated
+     to the new PatchHierarchy and MultiblockPatchHierarchy input
+     databases, respectively.
+
+(37) VariableDatabase now has an added method to remove Variables from the
+     database.
+
+(38) Triple-option parameters in GriddingAlgorithm and 
+     MultiblockGriddingAlgorithm have been changed from char to string.
+
+(39) Nested enum type BoundaryDirection in BoundaryBox changed to
+     BoundaryOrientation 
+
+(40) Old, backward-compatible numbering scheme for the location index values
+     of 3D edge (codimension 2) BoundaryBox objects has been removed.
+
+(41) Patch number (and various ways to identify a local patch) has
+     been changed from an int to a LocalId.
+
+(42) Patch::getPatchNumber() has been renamed to Patch::getLocalId().
+
+(43) setCreateGhostOverlaps() has been removed from RefineAlgorithm.
+
+(44) It is no longer an error to give the clustering algorithm an initial
+     box that violates the min box size.
+
+(45) SAMRAI's license has been changed to LGPL.
+
+*****************************************************************************
+
+-----------------------------------------------------------------------------
+                Details about what's new
+-----------------------------------------------------------------------------
+
+(1) Enhanced scalability.
+
+Previous versions of SAMRAI stored a complete map of patches to owning
+processor in every MPI task.  This was not a scalable data
+representation.  This simple scheme was replaced with a distributed
+storage scheme where each MPI task only stores information needed for
+neighboring patches and processors.  Algorithms that previously
+unscalable (order number of MPI tasks) were restructured to scale more
+efficiently.
+
+(2 & 3) PatchLevelFillPattern and VariableFillPattern are new abstract base
+classes that allows users greater control of where data will be filled
+by RefineSchedule and CoarsenSchedle.
+
+ - PatchLevelFillPattern replaces string fill_pattern arguments that were
+available in some of the RefineAlgorithm::createSchedule() interfaces.
+Instead of those strings, users should pass in a pointer to a
+PatchLevelFillPattern object.  The current options are:
+
+PatchLevelFullFillPattern -- Fill all destination regions that can be filled.
+                             Equivalent to old "DEFAULT_FILL" option.
+PatchLevelInteriorFillPattern -- Fill interiors of destination level patches.
+                                 Equivalent to "FILL_INTERIORS_ONLY" option.
+PatchLevelBorderFillPattern -- Fill ghost regions outside of patch interiors--
+                               that is at physical and coarse-fine boundaries.
+                               Equivalent to "FILL_LEVEL_BORDERS_ONLY"
+PatchLevelBorderAndInteriorFillPattern -- Fill patch interiors as well as
+                                          ghost regions at physical and
+                                          coarse-fine boundaries.  Equivalent
+                                          to "FILL_LEVEL_BORDERS_AND_INTERIORS".
+
+There remain versions of RefineAlgorithm::createSchedule() which have no
+PatchLevelFillPattern argument.  These will invoke PatchLevelFullFillPattern
+by default.
+
+ - VariableFillPattern provides an interface that can be used to control
+where data will be filled on an item-by-item basis in a refine or coarsen
+schedule.  The object is given to the RefineAlgorithm or CoarsenAlgorithm
+as an argument to registerRefine or registerCoarsen.  If no argument is
+given, then BoxGeometryFillPattern is used by default.  BoxGeometryFillPattern
+preserves the existing behavior of computing full overlaps between source
+and destination levels.
+
+
+(4) New configure options added for inlining and assertions checking
+
+The configure script has options to control the use of inlining and
+assertion checking:
+
+--enable-inline
+--enable-check-assertions
+
+The default is to use inlining and no assertion checking.  Note that
+--enable-debug will turn off inlining and enable assertion checking to
+match previous debug behavior.
+
+(5) New configure options added for the zlib compression library.
+
+--with-zlib=DIR
+
+enables including building with the zlib compression library for when 
+HDF and SILO are built with it.  Default paths are /usr/local/ and /usr.
+The default is to build without zlib.
+
+(6) Environment variable for forcing abort to be called on exit.
+
+If the environment variable SAMRAI_ABORT_ON_ERROR is set a SAMRAI
+error will call "abort" rather than exit or MPI_Abort.  "abort" causes
+a core dump and is thus useful for debugging the location of an error. 
+
+NOTE: For MPI jobs this flag may cause the job to not cleanup correctly and
+leave processes running etc.
+
+(7) PatchHierarchy and MultiblockPatchHierarchy take input databases.
+
+PatchHierarchy's database should be used to set a number of parameters
+that used to be set in the GriddingAlgorithm.  In general, parameters
+describing the characteristics of the hierarchy (such as the max number
+of levels allowed, the refinement ratios, etc.) are now owned by the
+hierarchy.  Parameters describing how the mesh should be generated
+(such as the clustering efficiency and whether to skip certain
+steps in the standard mesh generation) remain in the GriddingAlgorithm.
+
+See source code docs in PatchHierarchy.h and GriddingAlgorithm.h
+for the current set of input parameters.
+
+MultiblockPatchHierarchy takes the number of block and a PatchHierarchy
+database that is used to build the PatchHierarchies.  These parameters
+have been removed from MultiblockGriddingAlgorithm.
+
+(8) New configure option to disable SAMRAI timers (--disable-timers).
+
+Timers will be overhauled in the future, but in the meantime, they can be
+disabled by using the "--disable-timers" option on the configure line.  In
+tests, this provides approximately a 2.5x speedup in raw timer execution.
+-----------------------------------------------------------------------------
+                Details about what's changed
+-----------------------------------------------------------------------------
+
+(1) Include file location changes and SAMRAI source directory restructuring.
+
+In order to avoid naming collisions with other packages, SAMRAI now
+uses a longer #include names for header files.  The names of the
+header files are now prefixed with a directory structure mirroring the
+namespace in which the classes appear.  This involves a bit more
+typing but should make conflicts very unlikely.  Several SAMRAI
+includes were very likely to cause conflicts (e.g. Grid, Box,
+Hierarchy, ProcessID etc).
+
+For example, previously you would use:
+
+#include "Variable.h"
+
+this is now replaced with a path prefix:
+
+#include "SAMRAI/hier/Variable.h"
+
+A perl script is provided which will search for #includes and replace
+the 2.x include with the new namespace include.
+
+It is a very good idea to make sure you have a backup of files before
+running the script in case something goes very wrong.  This script was
+used to convert the SAMRAI code base and some user applications but
+being a little paranoid is a good thing when it comes to automatic
+source code manipulation.
+
+IMPORTANT WARNING: This script looks for patterns of "#include
+<SAMRAI_header>" and replaces them.  If you have classes with the same
+name as SAMRAI classes this script will replace those includes as
+well.
+
+To invoke the script run with the directory to convert:
+
+<SAMRAI_INSTALL_DIR>/tools/scripts/conversion3.0/convertIncludePaths <directory to convert>
+
+The script will search the directory (and subdirectories) for C++
+source files and replace existing #includes with the path prefixed
+version.  Note that the script is NOT smart enough to distinguish
+SAMRAI header includes from other packages.  So if you are using
+another package that has .h file naming conflicts (uses the header
+file name as SAMRAI).  files the script will blindly think they are
+all SAMRAI headers.  For example if you are using a package that has a
+"Box.h" header file, the script will change the include to be
+"SAMRAI/hier/Box.h" since it assumes all "Box.h" includes refer to
+SAMRAI.
+
+For developers who frequently look at the SAMRIA source directory, you
+will also see some significant changes.  The includes directory that was
+in created in the compilation directory is no longer needed.  This
+removes the confusion of the links/copies that were being created.
+The source directory was also greatly simplified.  The subdirectory
+structure in each of the packages was removed so files for each
+package sit in the package directory in source/SAMRAI/<package>.  To
+find a class you only need to know it's package.
+
+(2) Removed templating on Dimension.
+
+Previous versions of SAMRAI used a template parameter to specify the
+problem dimension.  This presented serious limitations for codes that
+specify problem dimension in as an input parameter.  In order to
+better accommodate this usage pattern the templating on dimension was
+removed and replaced (when needed) with an additional dimension
+argument to the constructor.  Classes that do not require or could
+determine dimension from another constructor argument do not need a
+dimension.
+
+The dimension is represented as a Dimension object.  This is
+essentially just an integer but a class was used to enhance type
+safety.  The Dimension class will make it harder to accidentally use an
+integer when a dimension is required.
+
+This change also facilitates creating higher level SAMRAI classes that
+have two or more dimensions used within them.  Several LLNL codes plan
+to use this new flexibility.
+
+This change will frankly be painful.  A perl script is provided to
+help remove the templating on dimension.  This script will help but
+does not complete the process.  It replaces class names with the
+untemplated names but does not add the Dimension objects to the
+constructors as we don't know what the Dimension is.  You will need to
+supply a Dimension object to the constructors.  The compiler will
+issue an error if you forget to include one so it should be extremely
+hard to mess this conversion up (albeit extraordinarily boring).  In
+conversion done by the SAMRAI team IntVector was the most frequently
+constructed object needing a Dimension.
+
+Always make sure you have a backup before invoking this script.
+
+To invoke the script run with the directory to convert, as :
+
+<SAMRAI_INSTALL_DIR>/tools/scripts/conversion3.0/removeTemplateOnDim <directory to convert>
+
+(3) Compiler support and library support
+
+The compiler versions used in our regression testing have been
+updated. We no longer test with some older versions.  See INSTALL
+notes for a complete list of compilers tested.
+
+For Linux workstations we have moved to OpenMPI from MPICH.  OpenMPI
+seems to be in wider use in the various Linux distributions.
+
+(4) Removed Vizamrai utilty and writer.
+
+The Vizamrai visualization utility and data writer are no longer supported.  
+Use Visit as a replacement.
+
+
+(5) LoadBalancer renamed to ChopAndPackLoadBalancer.
+
+We now offer two native load balancers.  (The other is TreeLoadBalancer.)
+
+(6) AsyncCommStage interface names changed for clarity.
+
+We changed AsyncCommStage non-blocking communications requests from
+"outstanding" requests to "pending" requests to emphasize that these
+requests not merely allocated on the stage--they are actually in the
+middle of a non-blocking communication.  The AsyncCommStage is not likely
+to directly affect users.
+
+(7) set/getDefaultDepth method name changes in DataFactories.
+
+The DefaultDepth methods were changed for DataFactories.  The
+setDefaultDepth method was removed as setting the depth after factory
+construction is not supported.
+
+getDefaultDepth method was renamed to simply getDepth.
+
+(8) Arena memory allocation classes removed.
+
+The Arena and ArenaManager classes where removed since SAMRAI was not
+using these to do anything useful.  This changes several allocation
+interfaces in the code.  This effects PatchDataFactory, PatchData,
+Patch, PatchLevel, ArrayData, RefineTransactionFactory,
+CoarsentTransactionFactory and derived classes.
+
+To fix existing code simply remove any references to the Arena
+classes in the allocation interfaces.
+
+(9) Using parallel HDf5.
+
+We have begun using parallel HDf5 in some of our environments.  If you
+have an application that requires specifically either serial or parallel
+HDf5, keep in mind that SAMRAI should be able to work with both.  It is
+probably required that you configure SAMRAI with the version required
+by your application.
+
+(10) RefineOperator::refine() interface changed
+
+The Box argument "fine_box" in the refine() interfice has been changed to a
+BoxOverlap argument.  Whereas the old Box argument always was a cell-centered
+box, the BoxOverlap argument will contain boxes in the centering of the data
+to be refined.  In implementations of RefineOperator, the BoxOverlap argument
+should be cast to the appropriate concrete overlap class, and then the
+boxes contained in that overlap object will define the regions onto which data
+should be interpolated.
+
+(11) Increased number of digits for processor, patch based names.
+
+The restart filenames and other names using processor and patch
+numbers where changed to allow for more digits as soon to exist machines are
+larger that they would overflow the previous 5 digits being used.
+
+This means that some input and all old restarts will not be compatible
+between version 2.x and 3.x.
+
+(12) Template instantiation model changed to implicit and explicit
+     option removed.
+
+Previous versions of SAMRAI used the explicit template instantiation
+model.  This was changed due to the removal of the templating on
+dimension which significantly reduced the number of template classes in
+SAMRAI.  Also SAMRAI is increasingly using the STL and the explicit
+template instantiation was problematic on several compilers.
+
+The implicit template instantiation model is now required for SAMRAI.
+
+(13) Renamed getOneIntVector and getZeroIntVector.
+
+The methods to obtain a prebuilt vector of ones or zeros were renamed
+to getOne and getZero due to popular demand.
+
+(14) XLF function names changed to no-underscore.
+
+The name mangling for Fortran names under XLF have been changed to the
+XLF default with no trailing underscore.  This should make the SAMRAI
+compile more in line with normal XLF compiles.
+
+(15) Inline control macros changed.
+
+The macros used to control inline methods have changed to clean up the
+code a bit.  The old DEBUG_NO_INLINE macro was removed and replaced
+with SAMRAI_INLINE (to avoid double negatives) and the old method of
+doing a replacement of the "inline" reserved word was replaced with
+SAMRAI_INLINE_KEYWORD which is null or "inline" if inlining is
+requested.
+
+(16) Implicit tbox::Pointer conversion not allowed.
+
+Previous versions of the SAMRAI tbox::Pointer class allowed implicit
+conversions of raw C++ pointers to the reference counting
+tbox::Pointer.  This allows several uses that can (and did!) lead to
+bugs being introduced.  This "feature" is commonly considered a bad
+thing for smart pointers was removed.
+
+This change will frequently effect Pointer code like:
+
+tbox::Pointer<Foo> foo_ptr = new Foo();
+
+which now needs to be written:
+
+tbox::Pointer<Foo> foo_pt(new Foo());
+
+Which is better as it avoids a temporary construction.
+
+Also passing a raw pointer to a method that takes a tbox::Pointer will
+no longer work, a tbox::Pointer will have to provided.
+
+(17) Connectors and MappedBoxLevels initialization uses references.
+
+MappedBoxLevel and Connector initializations use references to receive
+MappedBoxSet and EdgeSet (respectively) instead of pointers to them.
+In GLOBALIZED mode, all MappedBoxes and EdgeSets are placed in a
+single container instead of one container for each process.  This
+removes the inherent unscalability of GLOBALIZED mode, though
+GLOBALIZED mode is still unscalable if the globalized data is
+unscalable.
+
+(18) Changes to data and accessors in MappedBoxLevel and Connector.
+
+Methods getMapedBoxes() and getEdges() now always return local data.
+To get global data in GLOBALIZED mode, use getGlobalMappedBoxes and
+getGlobalEdges.  To get data for a given process in GLOBALIZED mode,
+specify the process rank using getMappedBoxes(rank) and getEdges(rank).
+These versions return an iterator range instead of a separate
+container for the given rank.  Separate containers are no longer
+available but you can always initialize your own from the range.
+
+Accessors with default specified rank now only work to access local
+data.  Accessing remote data must use the GlobalId, which includes
+the processor rank.
+
+(19) Changing neighbor set in Connectors must use specific methods.
+
+You can no longer directly change the container of neighbors for a
+given MappedBox due to the potential for putting Connectors in an
+inconsistent state.  Instead, use insertNeighbors, eraseNeighbor,
+swapNeighbors and clearNeighbors.
+
+(20) Changed allocate interface to PatchDataFactory.
+
+PatchDataFactory previously defined two virtual allocate methods for
+allocating a PatchData.  The method taking a hier::Box was removed in
+favor of always using the allocate method taking a hier::Patch.  This
+may impact users who are creating their own PatchData types.  Simply
+remove the unneeded allocate(hier::Box &box) method from the factory.
+
+(21) Changed names of overlap and mapping Connector utilty classes.
+
+OverlapConnectorUtility is now OverlapConnectorAlgorithm.
+MappingConnectorUtility is now MappingConnectorAlgorithm.
+
+(21) PatchLevel::Iterator now returns a Pointer<Patch> instead of
+     the patch number.
+
+This change was motivated to allow for the design of a multiblock
+level iterator that can use the same kind of syntax.  We have almost
+complete backward compatibility (see below), although you should
+change your codes from
+  Pointer<Patch> patch = level->getPatch(patch_iterator());
+to
+  Pointer<Patch> patch = *patch_iterator;
+
+One possible failure mode caused by this change is if you have
+  int patch_number = patch_iterator();
+This will implicitly convert the Pointer<Patch> object to an int.
+You should make sure this is no longer done!
+
+To get the patch number from the iterator, use
+  int patch_number = patch_iterator->getPatchNumber();
+
+(23) IntVector implicit conversion to raw int[] array removed.
+
+Previous versions of IntVector had an implicit conversion to a raw
+int[] arrary.  This was dangerous and introduced several bugs.  In
+addition to being at odds with the STL library design.
+
+To get the address of the first element use the STL vector approach of
+taking the address of the first element:
+
+IntVector int_vector;
+int *ptr = &int_vector[0];
+
+Note that this should be done with caution due to dangling referencing
+issues may occur if the IntVector goes out of scope etc.
+
+(24) SAMRAI timers now enforce ordering of start/stop methods.
+
+The tbox::Timer class now enforces that stop must follow a start.
+This was to prevent errors from multiple calls to start followed by a
+stop.   Stop must also follow a start.
+
+Asserts will occur if the correct ordering is not done.
+
+(25) AbstractStream and FileStream clases were removed, MessageStream 
+     interface changed.
+
+The AbstractStream class was removed, replace this with the MessageSteam class.
+
+The FileStream class was removed, use standard C++ classes for I/O.
+
+The interface for MessageStream was changed to use template methods
+for each type rather than the explicitly named method for each type.
+
+For example :
+
+AbstractStream::sizeofBool becomes MessageStream::getSizeof<bool>
+
+(26) SAMRAIManager initialize and finalize methods added.
+
+In order to allow for SAMRAI to be exectued in a mode where multiple SAMRAI
+problems are solved per process the management of startup/shutdown was
+extended from two steps to three.   You need to add
+
+tbox::SAMRAIManager::initialize();
+
+before the tbox::SAMRAIManager::startup() call. and
+
+tbox::SAMRAIManager::finalize();
+
+after the tbox::SAMRAIManager::shutdown() call.
+
+The following method of running is now supported:
+
+tbox::SAMRAIManager::initialize();
+for(some number of times)
+{
+	tbox::SAMRAIManager::startup();
+	tbox::SAMRAIManager::shutdown();
+}
+tbox::SAMRAIManager::finalize();
+
+(27) tbox::ShutdownManager renamed to tbox::StartupShutdownManager.
+
+To support a more complete lifecycle for SAMRAI objects the shutdown
+manager was renamed to StartupShutdownManger.  The new lifecycle
+supports 4 phases, initialize, startup, shutdown, and finalize.
+Startup and shutdown may be called multiple times per run.
+Initialize/finalize are invoked only once per run.
+
+Registration with the StartupShutdownManger takes a
+AbstractHandler class which defines the callback API.  
+
+For convience a Handler class is supplied which provides an
+implementation of AbstractHandler.  Simply provide the callback
+methods to the constructor for Handler and the Handler class registers
+itself with the Manager during construction and calls the methods
+provided.  The priority of the handler must be provided to support
+correct ordering in the case of dependencies between handlers.
+
+Below is an example of creating a handler for the InputManager class:
+
+StartupShutdownManager::Handler InputManager::s_shutdown_handler(
+   0,
+   0,
+   InputManager::shutdownCallback,
+   0,
+   StartupShutdownManager::priorityInputManager);
+
+The handler is static so it is created at the start of the run (before
+main is invoked) and registers itself with the StartupShutdownManager.
+The shutdownCallback in InputManager is invoked as part of the
+SAMRAIManger::shutdown() method.  In this case only one callback is
+needed so the other callbacks are null (0).
+
+(28) Typenames in SAMRAI_MPI have been capitalized.
+
+To maintain uniformity with SAMRAI and similarity with MPI names,
+we made these textual changes changes:
+
+comm --> Comm
+request --> Request
+status --> Status
+
+(29) SAMRAI now uses an exclusive MPI communicator by default.
+
+SAMRAIManager::startup() takes an MPI communicator.  By default,
+SAMRAI makes a duplicate of this communicator for internal use.  This
+can be overridden using the startup() argument list.  The main SAMRAI
+communicator is accessible using
+tbox::SAMRAIManager::getSAMRAIWorldComm().  Various parts of SAMRAI
+may duplicate the main communicator for further isolation.
+
+(30) SAMRAI_MPI interfaces have been expanded.
+
+Previous versions of SAMRAI_MPI did not and could not support
+non-blocking calls.  SAMRAI_MPI now supports non-blocking calls, but
+this requires that high-level functionalities be reduced.  We added
+new SAMRAI_MPI methods that actually look a lot like native C MPI
+interfaces.  The primary difference is that the communicator is now a
+data member in the SAMRAI_MPI object.
+
+The old static SAMRAI_MPI methods are still available, but we discourage
+their use.
+
+(31) SAMRAI_MPI interfaces changed to avoid using static communicator.
+
+To prepare for increasing use of non-blocking calls,
+communication/computation overlap, future use of multiple
+communicators and multithread environments, SAMRAI_MPI's new wrappers
+methods do not use a single static communicator.  The prefered usage
+is to instantiate a SAMRAI_MPI objects, constructing it with the
+communicator you want to use.  Methods bound to the object will use
+the object's communicator.  If you omit the communicator, the object
+uses tbox::SAMRAIManager::getSAMRAIWorldComm(), the main SAMRAI
+communicator.  MPI Methods not associated with specific communicators
+are wrapped in SAMRAI_MPI's static methods (as before).
+
+The intention is to start using communicators closely associated with
+the context of the communication.  For example, communicating data on
+a level should use the communicator taken from the MappedBoxLevel
+associated with the data.  The main communicator should only be used
+in very general contexts, such as finalizing SAMRAI statistics and
+timers.
+
+Note that the SAMRAI_MPI objects are just wrappers, intended to absorb
+some repetitive code that tends to clutter things up.  They do not
+manage communicators.  Nor do they manage non-blocking calls.  You
+still need to know how do this yourself.
+
+(31) Optional types no longer optional.
+
+Previous versions of SAMRAI could be configured with support for bool,
+char, float, and dcomplex datatypes.  Due to the change in compilation
+model the optional types no longer signicantly impact library size or
+compile time so everything is compiled by default now.  This means the
+
+--enable-bool, --enable-char, --enable-float, and --enable-dcomplex 
+
+configure flags are no longer required or supported.  Simply remove
+them from your configure if you are using them.
+
+(32) Dimension class no longer supports implicit conversion to an unsigned short.
+
+At the request of users the Dimension class no longer supports
+implicit conversion to unsigned short value.  This improves type
+saftey.  The "getValue()" method returns the dimension as an unsigned
+short value and can be used in place of the implicit conversion.
+
+(33) Major changes in SAMRAI_MPI class, requiring users to change some
+     code.
+
+We changed the MPI communication wrappers in SAMRAI_MPI to extend its
+functionality.  The previous model of high-level methods did not was
+not easily extendable.  The new model is to use interfaces that
+resemble those defined by MPI.
+
+The static communication methods have been removed as have the static
+methods to set the static communicator.  You must now declare a
+SAMRAI_MPI object, constructing it with an MPI communicator.
+Communication methods associated with a communicator uses the one you
+passed in to the constructor.  Some MPI methods not associated with a
+communicator are implemented as SAMRAI_MPI static methods.
+
+By necessity, we did implement high-level versions of Allreduce,
+mainly to remove the cumbersome code required when max/min reductions
+also return the rank of the process owning the max/min value.
+
+There are 3 methods to choose from when initializing SAMRAI_MPI.  The
+first one also starts up MPI and cause MPI to be shut down when
+SAMRAI_MPI is finalized.  The second expects you to start up MPI and
+pass in a communicator (which SAMRAI will duplicate for exclusive
+internal use).  The third disables MPI (even when you configure with
+MPI) and runs SAMRAI in sequential mode.  Choose the initialization
+method that suits your application.
+
+(34) Configuration changes for running on BG platform. 
+
+The new mpxlC compiler (v9.0) has some issues as of this release, 
+producing ICE (internal compiler errors) when building certain features
+of SAMRAI.  Removing pragmas related to the xlC compiler provided a
+temporary work-around while IBM is addressing the problem.  The interim
+solution is to include the 
+
+--enable-bgl 
+
+option during configuration when
+configuring and building on the Blue Gene platforms.  This option is
+not expected to be a long-term available solution, as the compiler update
+from IBM is expected to solve the problem.
+
+(35) Each gridding algorithm is now tied to a specific hierarchy,
+     affecting public interfaces.
+
+Gridding algorithms have always typically worked on just one hierarchy,
+although the hierarchy is passed into the public interfaces.  With this
+change, the hierarchy is passed into the constructor and removed from
+the rest of the interfaces.
+
+This change applies to both single-block and multi-block versions of
+the hierarchy and gridding algorithm.
+
+(36) Some parameters and accessors in GriddingAlgorithm and
+     MultiblockGriddingAlgorithm input databases have been relocated
+     to the new PatchHierarchy and MultiblockPatchHierarchy input
+     databases, respectively.
+
+This is related to "what's new" item (7).  See that item for the
+explanation.  The input files in SAMRAI have been updated to relocate
+some GriddingAlgorithm/MultiblockGriddingAlgorithm parameters to the
+new PatchHierarchy/MultiblockPatchHierarchy input database.  Where
+applicacable, you should make similar changes to your input databases.
+
+(37) VariableDatabase now has an added method to remove Variables from the
+     database.
+
+The new method "removeVariable" allows a user to arbitrarily remove a Variable
+from the VariableDatabase at any time given the name of the variable.  The
+Variable name can be reused at any time afterwards without fear of name a
+name clash.  It should be noted that adding and removing Variables a lot will
+result in a fragmented variable array.  
+
+(38) Triple-option parameters in GriddingAlgorithm and MultiblockGriddingAlgorithm
+     have been changed from char to string.
+
+You need to change input databases so that parameters set to 'i', 'w' or 'e'
+are now set to strings "IGNORE", "WARN", and "ERROR", respectively.
+
+(39) Nested enum type BoundaryDirection in BoundaryBox changed to
+     BoundaryOrientation
+
+Name changed to reduce confusion with other uses of the term "direction".
+
+(40) Old, backward-compatible numbering scheme for the location index values
+of 3D edge (codimension 2) BoundaryBox objects has been removed.
+
+All location index values are now based on the values computed by
+BoundaryLookupTable.  The only valid numbering scheme is described below:
+
+               Location Index    Obsolete value
+               ==============    ==============
+x_lo, y_lo           0                  8
+x_hi, y_lo           1                  9
+x_lo, y_hi           2                 10
+x_hi, y_hi           3                 11
+x_lo, z_lo           4                  4
+x_hi, z_lo           5                  6
+x_lo, z_hi           6                  5
+x_hi, z_hi           7                  7
+y_lo, z_lo           8                  0
+y_hi, z_lo           9                  1
+y_lo, z_hi          10                  2
+y_hi, z_hi          11                  3 
+
+Any code that used 3d edge boundary boxes on physical or coarse-fine
+boundaries with the old numbering scheme will need to be adjusted to use
+the values in the left column.
+
+
+(41) Patch number (and various ways to identify a local patch) has
+changed from an int to a LocalId.
+
+Each Patch is now identified by a GlobalId and a LocalId that are the
+same as the MappedBox from which the Patch is built.  The LocalId is
+similar to the patch number in SAMRAI-2, and it is required to be
+locally unique but not globally unique.  Locally, the patch can be
+identified by the LocalId alone.  Globally, the patch can be
+identified by its GlobalId, which is a combination of the LocalId and
+the owner rank.
+
+PatchLevel::getPatch() has been changed from taking an int to taking a
+GlobalId or LocalId.
+
+(42) Patch::getPatchNumber() has been renamed to Patch::getLocalId().
+
+This is related to number 41.
+
+(43) setCreateGhostOverlaps() has been removed from RefineAlgorithm.
+
+The option to allow for overlaps for refinement to be created on physical
+boundary ghost regions has been removed.
+
+(44) It is no longer an error to give the clustering algorithm an initial
+     box that violates the min box size.
+
+The violation never did affect the clustering algorithm, but we considered it 
+an error anyway, to avoid confusion.  This has been replaced by a three-way 
+flag in BergerRigoutsos.  If check_min_box_size is set to "WARN", a warning 
+is issued, and the code goes on.  If it is set to "ERROR", the code aborts.  If
+it is set to "IGNORE", the code silently ignores the condition.  The default
+is set to "WARN", since this condition does not affect the clustering 
+algorithm.
+
+(45) SAMRAI's license has been changed to LGPL.
+
+In effort to provide more flexibility to SAMRAI and SAMRAI users, the license
+has been changed to the GNU Lesser GPL.  Please see LICENSE and COPYING.LESSER
+for details. 
+=============================================================================
+=============================================================================
diff -r 000000000000 -r 5eda1a3f24e8 config.suggest
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config.suggest	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,377 @@
+#!/bin/sh
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/config.suggest $
+## Package:     SAMRAI
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 4354 $
+## Modified:    $LastChangedDate: 2010-12-10 08:35:31 -0800 (Fri, 10 Dec 2010) $
+## Description: script to suggest ways to configure SAMRAI
+##
+
+# Note to SAMRAI developers:
+#
+#
+# This script lists known working configure options and associates
+# each configuration with an easy-to-remember index.  Its output can
+# be used as options to SAMRAI's configure script.
+#
+# To add an index, add another case in the case statement, but use the
+# following restrictions so that the help message works automatically:
+#
+# 1. Give your case an index name according to the naming convention.
+# 2. Insert your addition in alphabetical order by index name.
+# 3. Do not use * or | in the glob pattern.
+# 4. Follow the ) with # and a brief (one line) description of
+#    the index.  If you leave out the #, the case will be hidden from
+#    the help message.
+# 5. Add comment that you are maintaining the specific case you added,
+#    so that in case of an error, you can be notified.
+# 6. After adding a case, run this script without arguments to make
+#    sure the help message correctly lists your new addition.
+# 7. Try to list the configure options for each entry in the following order:
+#       C++ compiler       
+#       C compiler
+#       FORTRAN compiler
+#       compiler options
+#       HDF
+#       MPI
+#       Packages stuff (hypre, Sundials, etc.)
+#       SAMRAI specific options
+#
+
+
+if test "$1" = '-c'; then
+  shift;
+  dirname=`echo $0 | sed 's!/[^/]*$!!'`
+  if ! test -r "$dirname/configure"; then
+    echo "-c is given, but cannot read $dirname/configure."
+  fi
+  exec $0 "$@" | xargs $dirname/configure
+  # The above exec statement unexpecedly returns, maybe due to the |.
+  exit $?
+fi
+
+
+case $1 in
+
+#-----------------------------------------------------------------------------
+# LC machines
+#-----------------------------------------------------------------------------
+atlas_mpiicpc) # Atlas, using Intel MPI wrappers
+cat <<-EOF
+	--with-CXX=/usr/local/bin/mpiicpc
+	--with-CC=/usr/local/bin/mpiicc
+	--with-F77=/usr/local/bin/mpiifort
+	--with-silo=/usr/gapps/silo/4.6.2/chaos_4_x86_64_ib
+	--with-hdf5=/usr/local/tools/hdf5-intel-parallel-1.8.1
+	--with-zlib
+	--with-hypre=/usr/casc/aleamr/atlas-local/hypre-2.2.0b
+	--without-sundials
+	--without-petsc
+	--without-x
+	--enable-rpath=-Wl,-R
+EOF
+# Maintained by Brian Gunney
+;;
+
+atlas_mpipath) 
+# Atlas, using Pathscale MPI wrappers
+cat <<-EOF
+	--with-CXX=/usr/local/bin/mpipathCC
+	--with-CC=/usr/local/bin/mpipathcc
+	--with-F77=/usr/local/bin/mpipathf90
+	--with-silo=/usr/gapps/silo/4.6.2/chaos_4_x86_64_pathcc
+	--with-hdf5=/usr/local/tools/hdf5-pathscale-serial-1.8.1
+	--without-hypre
+	--without-sundials
+	--without-petsc
+	--without-x
+	--enable-rpath=-Wl,-R
+EOF
+# Maintained by Steven Smith
+;;
+
+
+atlas_mpipg) 
+# Atlas, using PGI MPI wrappers
+cat <<-EOF
+	--with-CXX=/usr/local/bin/mpipgCC
+	--with-CC=/usr/local/bin/mpipgcc
+	--with-F77=/usr/local/bin/mpipgf77
+	--with-silo=/usr/gapps/silo/4.6.2/chaos_4_x86_64_ib_pgcc
+	--with-hdf5=/usr/local/tools/hdf5-gnu-serial-1.8.1
+	--without-hypre
+	--without-sundials
+	--without-petsc
+	--without-x
+	--enable-rpath=-Wl,-R
+EOF
+# Maintained by Steven Smith
+;;
+
+dawn_mpixlcxx) # Dawn, using mpixlcxx
+cat <<-EOF
+	--with-CXX=mpixlcxx
+	--with-CC=mpixlc
+	--with-F77=mpif77
+	--with-hdf5=/usr/local/tools/hdf5/hdf5-1.8.1/parallel
+	--with-hypre=no
+	--without-sundials
+	--without-petsc
+	--without-x
+	--enable-rpath=no
+EOF
+# Maintained by Brian Gunney
+;;
+
+
+ubgl_mpcc) # BGL, using mpCC (may be outdated)
+cat <<-EOF
+	--with-CXX=mpCC
+	--with-CC=mpcc
+	--with-F77=mpxlf
+	--with-hdf5=/usr/local/tools/hdf5/hdf5-1.8.1/parallel
+	--with-hypre=no
+	--without-sundials
+	--without-petsc
+	--without-x
+	--enable-rpath=no
+   --enable-bgl
+EOF
+# Maintained by Brian Gunney
+;;
+
+ubgl_mpxlc) # uBGL, using mpxlC
+cat <<-EOF
+	--with-CXX=/usr/local/tools/compilers/ibm/mpxlC-9.0.0.3a
+   --with-CC=mpxlc
+	--with-F77=mpxlf
+	--with-hdf5=/usr/local/tools/hdf5/hdf5-1.8.1/parallel
+	--with-hypre=no
+	--without-sundials
+	--without-petsc
+	--without-x
+	--enable-rpath=no
+   --enable-bgl
+   --enable-test-nprocs=0,2
+EOF
+# Maintained by Brian Gunney and Susan Hazlett
+;;
+
+
+yana_mpiicpc) # Yana, Intel MPI wrapper script
+cat <<-EOF
+	--with-CXX=/usr/local/bin/mpiicpc
+	--with-CC=/usr/local/bin/mpiicc
+	--with-F77=/usr/local/bin/mpiifort
+	--with-silo=/usr/gapps/silo/4.6.2/chaos_4_x86_64_ib
+	--with-hdf5=/usr/local/tools/hdf5-intel-parallel-1.8.1
+	--with-zlib
+	--with-parallel-run-bin=/usr/local/bin/mpirun
+	--with-hypre=/usr/gapps/samrai/hypre/2.2.0b/chaos_4_x86_64
+	--without-sundials
+	--without-petsc
+	--without-x
+	--enable-rpath=-Wl,-R
+        --enable-test-nprocs="1,2" 
+	EOF
+# Maintained by Brian Gunney
+;;
+
+zeus_mpiicpc) # Zeus, Intel compilers with LLNL mpiicpc front ends
+cat <<-EOF
+	--with-CXX=/usr/local/bin/mpiicpc
+	--with-CC=/usr/local/bin/mpiicc
+	--with-F77=/usr/local/bin/mpiifort
+	--with-silo=/usr/gapps/silo/4.6.2/chaos_4_x86_64_ib
+	--with-hdf5=/usr/local/tools/hdf5-intel-parallel-1.8.1
+	--with-zlib
+	--with-hypre=/usr/casc/aleamr/hypre/chaos4_x86_64_ib/hypre-2.2.0b
+	--without-sundials
+	--without-petsc
+	--without-x
+	--enable-rpath=-Wl,-R
+	EOF
+# Maintained by Brian Gunney
+;;
+
+edge_gcc) # Edge with default GNU GCC compilers
+cat <<-EOF
+	--with-CXX=/usr/local/bin/g++
+	--with-CC=/usr/local/bin/gcc
+	--with-F77=/usr/local/bin/gfortran
+	--with-silo=/usr/gapps/silo/4.6.2/chaos_4_x86_64
+	--with-hdf5=/usr/gapps/silo/hdf5/1.8.4/chaos_4_x86_64
+	--with-szlib=/usr/gapps/silo/szip/2.1/chaos_4_x86_64
+	--with-zlib
+        --with-hypre=/usr/casc/samrai/hypre/2.6.0b.opt
+	EOF
+# Maintained by Steven Smith
+;;
+
+#-----------------------------------------------------------------------------
+# CASC machines
+#-----------------------------------------------------------------------------
+
+cygwin) 
+# Cygwin compile
+cat <<-EOF 
+	--with-CXX=mpicxx
+	--with-CC=mpicc
+	--with-F77=mpif77
+	--with-hdf5=/usr
+	--without-x
+EOF
+# Maintained by Steven Smith
+;;
+
+cygwin_ccache) 
+# Cygwin compile
+cat <<-EOF 
+	--with-CXX="ccache mpicxx"
+	--with-CC="ccache mpicc"
+	--with-F77=mpif77
+	--with-hdf5=/usr
+	--without-x
+EOF
+# Maintained by Steven Smith
+;;
+
+casc_rh5_gnu_x64) # CASC RedHat 5, default GNU compilers, x86_64
+cat <<-EOF
+	--with-CXX=g++
+	--with-CC=gcc
+	--with-F77=g77
+	--with-hdf5=/usr/casc/samrai/hdf5/1.8.4-1-serial-tux
+	--with-silo=/usr/casc/samrai/silo/4.7.2_rh5_x64
+	--with-mpi-include=/usr/apps/mpich2/1.1.1p1/include
+	--with-mpi-lib-dirs=/usr/apps/mpich2/1.1.1p1/lib
+	--with-mpi-libs="mpich"
+	--with-parallel-run-bin=/usr/apps/mpich2/1.1.1p1/bin/mpirun
+	--with-hypre=no
+	--with-petsc=no
+	--with-x
+   --enable-opt
+   --enable-inline
+EOF
+# Maintained by Susan Hazlett
+;;
+
+casc_rh5_icc_x64) # CASC RedHat 5, Intel v11.1 compilers, x86_64
+cat <<-EOF
+	--with-CXX="/nfs/apps/intel/11.1.059/bin/intel64/icpc -Kc++ -gcc-name=/usr/bin/gcc"
+	--with-CC="/nfs/apps/intel/11.1.059/bin/intel64/icc -gcc-name=/usr/bin/gcc"
+	--with-F77=/nfs/apps/intel/11.1.059/bin/intel64/ifort
+   --with-extra-ld-flags="-shared-intel"
+	--enable-rpath=-Wl,-R
+	--with-hdf5=/usr/casc/samrai/hdf5/1.8.4-1-serial-tux
+	--with-silo=/usr/casc/samrai/silo/4.7.2_rh5_x64
+	--with-mpi-include=/usr/apps/mpich2/1.1.1p1/include
+	--with-mpi-lib-dirs=/usr/apps/mpich2/1.1.1p1/lib
+	--with-mpi-libs="mpich"
+	--with-parallel-run-bin=/usr/apps/mpich2/1.1.1p1/bin/mpirun
+	--with-hypre=no
+	--without-petsc
+	--with-x
+EOF
+# Maintained by Susan Hazlett
+;;
+
+casc_rh5_gnu45_x64) # CASC RedHat 5, GNU-4.5.0 compilers, x86_64 
+cat <<-EOF 
+--with-CXX=/nfs/apps/gcc/4.5.0/bin/g++
+--with-CC=/nfs/apps/gcc/4.5.0/bin/gcc
+--with-F77=/nfs/apps/gcc/4.5.0/bin/gfortran
+--with-hdf5=/usr/casc/samrai/hdf5/1.8.4-1-serial-tux
+--with-silo=/usr/casc/samrai/silo/4.7.2_rh5_x64
+--with-mpi-include=/nfs/casc/samrai/openmpi/1.5-gcc-4.5.0.opt/include
+--with-mpi-lib-dirs=/nfs/casc/samrai/openmpi/1.5-gcc-4.5.0.opt/lib
+--with-parallel-run-bin=/nfs/casc/samrai/openmpi/1.5-gcc-4.5.0.opt/bin/mpirun
+--with-mpi-libs="mpi rt"
+--with-hypre=/usr/casc/samrai/hypre/2.6.0b.opt
+--with-petsc=/usr/casc/samrai/petsc/petsc-2.3.3-p11-rh5_x64
+--with-petsc-arch=linux_gcc_openmpi
+--with-lapack=/usr/casc/samrai/lapack/3.2.2-gcc.4.5.0
+--with-lapack-libs="-L/usr/casc/samrai/lapack/3.2.2-gcc.4.5.0/lib -llapack"
+--with-blas=/usr/casc/samrai/lapack/3.2.2-gcc.4.5.0
+--with-blas-libs="-L/usr/casc/samrai/lapack/3.2.2-gcc.4.5.0/lib -lf77blas -lcblas -latlas"
+--with-sundials=/usr/casc/samrai/sundials/sundials-2.3.0-rh5_x64
+--with-x 
+EOF
+# Maintained by Steven Smith
+;;
+
+#-----------------------------------------------------------------------------
+# Misc other machines
+#-----------------------------------------------------------------------------
+
+macosx_gnu) 
+# Apple Mac OS/X, gnu 4.2 compilers from DawrwinPorts
+cat <<-EOF
+	--with-CXX=g++-mp-4.3
+	--with-CC=gcc-mp-4.3
+	--with-F77=gfortran-mp-4.3
+	--with-hdf5=/opt/local 
+	--with-mpi-include=/usr/include 
+	--with-mpi-lib-dirs=/usr/lib 
+	--with-mpi-libs="mpi" 
+	--with-parallel-run-bin=/usr/bin/mpirun
+	EOF
+# Maintained by Steven Smith
+;;
+
+
+*) # Bad index or no index given, so provide help message.
+
+basename=`echo $0 | sed 's!.*/!!'`
+
+cat <<-EOF
+
+	Usage: $basename <config name> ...
+
+	This script suggests configure options for configuring SAMRAI
+	on platforms on which the SAMRAI team have some experience.
+
+	The output of this script, edited to suit your needs,
+	can be used as options for SAMRAI's configure script.
+	For example, you may want to add "--enable-opt --disable-debug"
+	for an optimized compile.  To remove packages you may not need,
+	say pvode, change "--with-pvode=/path/to/pvode" to "--without-pvode".
+	Any argument after <config name> is simply regurgitated.
+
+	For an explanation of the configure script options,
+	use configure's --help option.
+
+	Valid configuration names are:
+
+	EOF
+sed -e '/^[ 	]\{0,\}[-_a-zA-Z0-9]\{1,\}[ 	]\{0,\})[ 	]\{0,\}#/!d' -e 's/^[ 	]\{0,\}\([-_a-zA-Z0-9]\{1,\}\)[ 	]\{0,\})[ 	]\{0,\}#[ 	]\{0,\}\(.\{0,\}\)/\1	\2/' -e h -e 's/^[^	]\{0,\}	//' -e x -e 's/	.\{0,\}$//' -e ':a' -e 's/^.\{1,15\}$/ &/' -e 'ta' -e G -e 's/\n/ = /' $0
+cat <<-EOF
+
+	Hints:
+
+	Shortcut to avoid having to manually paste the output
+	when you want to use it without modification:
+
+	  $basename <config name> ... | xargs /path/to/SAMRAI/configure
+	or
+	  eval /path/to/SAMRAI/configure \`$basename <config name> ... \`
+
+	To remove line-breaks for command line editing (less readable):
+
+	echo \`$basename <config name> ... \`
+
+	EOF
+test $# = 0 && exit	# Normal exit if no index was given.
+exit 1	# Error exit if given bad index.
+;;
+
+
+esac
+
+# Regurgitate everything except the <config name> argument.
+shift
+echo "$@"
+
+# 
+
diff -r 000000000000 -r 5eda1a3f24e8 config/Makefile.config.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/Makefile.config.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,128 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   configuration makefile included by all SAMRAI makefiles 
+##
+#########################################################################
+
+ at TAU_INCLUDE@
+
+.SUFFIXES:
+.SUFFIXES: .o .F .f .c .C .cc
+
+DIM_OBJS = ${DIM_SRC:X.C=${NDIM}.o}
+
+#
+# The sed src_file finds the X.C file in the list of prerequisites. One would think
+# this would exist as a Makefile symbol but the "$<" symbol is only usable in
+# suffix rules. The sed rule extracts the .C filename.  This ONLY works
+# if the .C file is changed.  It will break if only the .I or .h files
+# change.  Thus is can be used for an intial build but does not
+# really work in a development environment.
+#
+#
+# Uncomment the following 4 lines for non GNU make compatiblity
+# ${DIM_OBJS} :
+# 	@src_file=`echo $? | sed  's/^\(.*\) \(.*X.C\) \(.*\)/\2/;s/^\(.*X.C\) \(.*\)/\1/'`; \
+# 	echo $(CXX) -DNDIM=${NDIM} $(CXXFLAGS) $(CPPFLAGS) -c  $$src_file -o $@; \
+# 	$(CXX) -DNDIM=${NDIM} $(CXXFLAGS) $(CPPFLAGS) -c  $$src_file -o $@
+
+# Comment out these 2 lines if using not using GNU make
+%${NDIM}.o : %X.C
+	$(CXX) -DNDIM=${NDIM} $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@
+
+.F.o:
+	$(F77) $(FFLAGS) -DNDIM=${NDIM} -c @SRCDIR_COMPILE_PREFIX@$< -o $@
+.f.o:
+	$(F77) $(FFLAGS) -c @SRCDIR_COMPILE_PREFIX@$< -o $@
+.c.o:
+	$(CC) $(CFLAGS) $(CPPFLAGS) -c @SRCDIR_COMPILE_PREFIX@$< -o $@
+.C.o:
+	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c @SRCDIR_COMPILE_PREFIX@$< -o $@
+.cc.o:
+	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c @SRCDIR_COMPILE_PREFIX@$< -o $@
+
+SHELL         = /bin/sh
+
+SAMRAI_TARGET=@SAMRAI_TARGET@
+
+INCLUDE_SAM   = $(SAMRAI)/source
+LIB_SAM       = $(OBJECT)/lib
+BIN_SAM       = $(OBJECT)/bin
+
+LIB_SUFFIX=@LIB_SUFFIX@
+
+LIBSAMRAI = \
+	$(LIB_SAM)/libSAMRAI_appu$(LIB_SUFFIX) \
+	$(LIB_SAM)/libSAMRAI_algs$(LIB_SUFFIX) \
+	$(LIB_SAM)/libSAMRAI_solv$(LIB_SUFFIX) \
+	$(LIB_SAM)/libSAMRAI_geom$(LIB_SUFFIX) \
+	$(LIB_SAM)/libSAMRAI_mesh$(LIB_SUFFIX) \
+	$(LIB_SAM)/libSAMRAI_math$(LIB_SUFFIX) \
+	$(LIB_SAM)/libSAMRAI_pdat$(LIB_SUFFIX) \
+	$(LIB_SAM)/libSAMRAI_xfer$(LIB_SUFFIX) \
+	$(LIB_SAM)/libSAMRAI_hier$(LIB_SUFFIX) \
+	$(LIB_SAM)/libSAMRAI_tbox$(LIB_SUFFIX)
+
+LIBSAMRAIDEPEND   = $(LIBSAMRAI)
+
+M4	      =	@M4@
+RM            = rm -fr
+CP            = cp
+TEE           = tee
+XARGS	      = @XARGS@
+
+F77           = @F77@
+FFLAGS        = @F77_FLAGS@ $(FFLAGS_EXTRA)
+
+CC            = @CC@
+CFLAGS        = @C_FLAGS@ $(CFLAGS_EXTRA)
+
+CXX           = @CXX@
+CXXFLAGS      =	@CXX_FLAGS@ $(CXXFLAGS_EXTRA)
+
+CPPFLAGS      = @CPPFLAGS@ -I. -I$(OBJECT)/include -I$(INCLUDE_SAM) @INC_PATH@ $(CPPFLAGS_EXTRA)
+
+AR	      = @AR@
+
+LDFLAGS       = @LD_FLAGS@ -L$(LIB_SAM) @LIB_PATH@ $(LDFLAGS_EXTRA)
+LDLIBS        = $(LDLIBS_EXTRA) @LIB_NAME@
+
+CXXLD_FLAGS   = -L$(LIB_SAM) @CXXLD_FLAGS@ @LIB_PATH@ $(LDFLAGS_EXTRA)
+CXXLDLIBS     = $(LDLIBS_EXTRA) @LIB_NAME@
+
+SAMRAI_M4_FLAGS = -DSAMRAI_FORTDIR=$(INCLUDE_SAM)/SAMRAI/pdat/fortran
+
+# Are object files dependent on template implementation files (.C)
+DEPENDS_ON_TEMPLATE_IMPLEMENTATION=@DEPENDS_ON_TEMPLATE_IMPLEMENTATION@
+
+# Should the special SAMRAI targets be included in the Makefile.config
+DEVELOPER_MAKEFILE=@DEVELOPER_MAKEFILE@
+
+######################################################################
+# Rules used in all directories.
+######################################################################
+
+SAMCLEAN=@$(RM) *.o *.ii *.int.c *.log *.log.* stamp-* core core.* stats -r ti_files ii_files \
+		*.valgrind
+
+# Used to control which types are created.
+# Default is double, integer, bool, float, complex, char
+SAMRAI_LIBRARY_TARGETS=libdefault
+
+######################################################################
+# Rules for SAMRAI developer builds only.
+# These may conflict with user Makefiles, leave them off by default.
+######################################################################
+
+ifeq (${DEVELOPER_MAKEFILE},yes)
+
+Makefile: $(SAMRAI)/$(SUBDIR)/Makefile.in  $(OBJECT)/config.status
+	cd $(OBJECT) && $(SHELL) ./config.status --file=$(SUBDIR)/$@
+
+endif
+
+
diff -r 000000000000 -r 5eda1a3f24e8 config/Makefile.config.install.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/Makefile.config.install.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,12 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   part of configuration makefile added for installations 
+##
+#########################################################################
+
+SAMRAI		= @INSTDIR@
+OBJECT		= @INSTDIR@
diff -r 000000000000 -r 5eda1a3f24e8 config/SAMRAI_config.h.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/SAMRAI_config.h.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,432 @@
+/* config/SAMRAI_config.h.in.  Generated from configure.in by autoheader.  */
+
+
+
+#ifndef INCLUDED_SAMRAI_CONFIG_H
+#define INCLUDED_SAMRAI_CONFIG_H
+
+#define SAMRAI_VERSION_MAJOR 3
+#define SAMRAI_VERSION_MINOR 0
+#define SAMRAI_VERSION_PATCHLEVEL 14
+
+
+/* Define if bool type is not properly supported */
+#undef BOOL_IS_BROKEN
+
+/* Define if std::fill_n returns void */
+#undef CASC_STD_FILL_N_RETURNS_VOID
+
+/* Define if DBL_MAX is not in float.h */
+#undef DBL_MAX_IS_BROKEN
+
+/* Define if DBL_SNAN is not in float.h */
+#undef DBL_SNAN_IS_BROKEN
+
+/* Enable assertion checking */
+#undef DEBUG_CHECK_ASSERTIONS
+
+/* Enable SAMRAI developer assertion checking */
+#undef DEBUG_CHECK_DEV_ASSERTIONS
+
+/* Enable assertion checking for dimensions */
+#undef DEBUG_CHECK_DIM_ASSERTIONS
+
+/* Initialize new memory to undefined values in debug mode */
+#undef DEBUG_INITIALIZE_UNDEFINED
+
+/* ENABLE_SAMRAI_TIMERS */
+#undef ENABLE_SAMRAI_TIMERS
+
+/* Define to dummy `main' function (if any) required to link to the Fortran
+   libraries. */
+#undef F77_DUMMY_MAIN
+
+/* Define to a macro mangling the given C identifier (in lower and upper
+   case), which must not contain underscores, for linking with Fortran. */
+#undef F77_FUNC
+
+/* As F77_FUNC, but for C identifiers containing underscores. */
+#undef F77_FUNC_
+
+/* Define if F77 and FC dummy `main' functions are identical. */
+#undef FC_DUMMY_MAIN_EQ_F77
+
+/* Define if FLT_MAX is not in float.h */
+#undef FLT_MAX_IS_BROKEN
+
+/* Define if FLT_SNAN is not in float.h */
+#undef FLT_SNAN_IS_BROKEN
+
+/* BLAS library is available so use it */
+#undef HAVE_BLAS
+
+/* HAVE_CMATH */
+#undef HAVE_CMATH
+
+/* HAVE_CMATH_ISNAN */
+#undef HAVE_CMATH_ISNAN
+
+/* HAVE_CTIME */
+#undef HAVE_CTIME
+
+/* Configured with Cubes library */
+#undef HAVE_CUBES
+
+/* Configured with Eleven library */
+#undef HAVE_ELEVEN
+
+/* HAVE_EXCEPTION_HANDLING */
+#undef HAVE_EXCEPTION_HANDLING
+
+/* HDF5 library is available so use it */
+#undef HAVE_HDF5
+
+/* HYPRE library is available so use it */
+#undef HAVE_HYPRE
+
+/* HAVE_INLINE_ISNAND */
+#undef HAVE_INLINE_ISNAND
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* HAVE_IOMANIP_LEFT */
+#undef HAVE_IOMANIP_LEFT
+
+/* HAVE_ISNAN */
+#undef HAVE_ISNAN
+
+/* HAVE_ISNAND */
+#undef HAVE_ISNAND
+
+/* HAVE_ISNAN_TEMPLATE */
+#undef HAVE_ISNAN_TEMPLATE
+
+/* HAVE_ISO_SSTREAM */
+#undef HAVE_ISO_SSTREAM
+
+/* LAPACK library is available so use it */
+#undef HAVE_LAPACK
+
+/* Define to 1 if you have the `z' library (-lz). */
+#undef HAVE_LIBZ
+
+/* Define if you have the 'mallinfo' function. */
+#undef HAVE_MALLINFO
+
+/* HAVE_MALLOC_H */
+#undef HAVE_MALLOC_H
+
+/* HAVE_MEMBER_FUNCTION_SPECIALIZATION */
+#undef HAVE_MEMBER_FUNCTION_SPECIALIZATION
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* MPI library is present */
+#undef HAVE_MPI
+
+/* HAVE_NAMESPACE */
+#undef HAVE_NAMESPACE
+
+/* HAVE_NEW_PLACEMENT_OPERATOR */
+#undef HAVE_NEW_PLACEMENT_OPERATOR
+
+/* PETSC library is available so use it */
+#undef HAVE_PETSC
+
+/* HAVE_PRAGMA_STATIC_DATA_SPECIALIZATION */
+#undef HAVE_PRAGMA_STATIC_DATA_SPECIALIZATION
+
+/* SILO library is available so use it */
+#undef HAVE_SILO
+
+/* HAVE_SSTREAM */
+#undef HAVE_SSTREAM
+
+/* HAVE_STANDARD_STATIC_DATA_SPECIALIZATION */
+#undef HAVE_STANDARD_STATIC_DATA_SPECIALIZATION
+
+/* HAVE_STATIC_DATA_INSTANTIATION */
+#undef HAVE_STATIC_DATA_INSTANTIATION
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if cpp supports the ANSI # stringizing operator. */
+#undef HAVE_STRINGIZE
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* HAVE_SUNDIALS */
+#undef HAVE_SUNDIALS
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/times.h> header file. */
+#undef HAVE_SYS_TIMES_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* HAVE_TAU */
+#undef HAVE_TAU
+
+/* HAVE_TEMPLATE_COMPLEX */
+#undef HAVE_TEMPLATE_COMPLEX
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* HAVE_VAMPIR */
+#undef HAVE_VAMPIR
+
+/* X11 library is present */
+#undef HAVE_X11
+
+/* "Compiling with XDR support" */
+#undef HAVE_XDR
+
+/* Define if the host system is Solaris */
+#undef HOST_OS_IS_SOLARIS
+
+/* Hypre library is configured for sequential mode */
+#undef HYPRE_SEQUENTIAL
+
+/* "Compiling without deprecated features" */
+#undef INCLUDE_DEPRECATED
+
+/* INCLUDE_TEMPLATE_IMPLEMENTATION */
+#undef INCLUDE_TEMPLATE_IMPLEMENTATION
+
+/* Header file for iomanip */
+#undef IOMANIP_HEADER_FILE
+
+/* The iomanip header file is broken */
+#undef IOMANIP_IS_BROKEN
+
+/* Header file for iostream */
+#undef IOSTREAM_HEADER_FILE
+
+/* The iostream header file is broken */
+#undef IOSTREAM_IS_BROKEN
+
+/* LACKS_CMATH */
+#undef LACKS_CMATH
+
+/* LACKS_CMATH_ISNAN */
+#undef LACKS_CMATH_ISNAN
+
+/* LACKS_CTIME */
+#undef LACKS_CTIME
+
+/* Configured without Cubes library */
+#undef LACKS_CUBES
+
+/* Configured without Eleven library */
+#undef LACKS_ELEVEN
+
+/* LACKS_EXCEPTION_HANDLING */
+#undef LACKS_EXCEPTION_HANDLING
+
+/* Hypre library is missing */
+#undef LACKS_HYPRE
+
+/* LACKS_INLINE_ISNAND */
+#undef LACKS_INLINE_ISNAND
+
+/* LACKS_IOMANIP_LEFT */
+#undef LACKS_IOMANIP_LEFT
+
+/* LACKS_ISNAN */
+#undef LACKS_ISNAN
+
+/* LACKS_ISNAND */
+#undef LACKS_ISNAND
+
+/* LACKS_ISNAN_TEMPLATE */
+#undef LACKS_ISNAN_TEMPLATE
+
+/* LACKS_MEMBER_FUNCTION_SPECIALIZATION */
+#undef LACKS_MEMBER_FUNCTION_SPECIALIZATION
+
+/* MPI library is missing */
+#undef LACKS_MPI
+
+/* LACKS_NAMESPACE */
+#undef LACKS_NAMESPACE
+
+/* LACKS_NEW_PLACEMENT_OPERATOR */
+#undef LACKS_NEW_PLACEMENT_OPERATOR
+
+/* LACKS_PRAGMA_STATIC_DATA_SPECIALIZATION */
+#undef LACKS_PRAGMA_STATIC_DATA_SPECIALIZATION
+
+/* LACKS_PROPER_XDR_HEADER */
+#undef LACKS_PROPER_XDR_HEADER
+
+/* LACKS_SSTREAM */
+#undef LACKS_SSTREAM
+
+/* LACKS_STANDARD_STATIC_DATA_SPECIALIZATION */
+#undef LACKS_STANDARD_STATIC_DATA_SPECIALIZATION
+
+/* LACKS_STATIC_DATA_INSTANTIATION */
+#undef LACKS_STATIC_DATA_INSTANTIATION
+
+/* LACKS_SUNDIALS */
+#undef LACKS_SUNDIALS
+
+/* LACKS_TAU */
+#undef LACKS_TAU
+
+/* LACKS_TEMPLATE_COMPLEX */
+#undef LACKS_TEMPLATE_COMPLEX
+
+/* LACKS_VAMPIR */
+#undef LACKS_VAMPIR
+
+/* X11 library is missing */
+#undef LACKS_X11
+
+/* LACK_ISO_SSTREAM */
+#undef LACK_ISO_SSTREAM
+
+/* Define if namespace is not properly supported */
+#undef NAMESPACE_IS_BROKEN
+
+/* Define if NAN is not in float.h */
+#undef NAN_IS_BROKEN
+
+/* The type ostringstream is broken */
+#undef OSTRINGSTREAM_TYPE_IS_BROKEN
+
+/* The type ostrstream is broken */
+#undef OSTRSTREAM_TYPE_IS_BROKEN
+
+/* Define to the address where bug reports for this package should be sent. */
+// Removed due to name conflict #undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+// Removed due to name conflict #undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+// Removed due to name conflict #undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+// Removed due to name conflict #undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+// Removed due to name conflict #undef PACKAGE_VERSION
+
+/* Define if restrict is not properly supported */
+#undef RESTRICT_IS_BROKEN
+
+/* Enable inlining of methods */
+#undef SAMRAI_INLINE
+
+/* Maximum dimension allowed */
+#undef SAMRAI_MAXIMUM_DIMENSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Header file for stl-sstream */
+#undef STL_SSTREAM_HEADER_FILE
+
+/* The stl-sstream header file is broken */
+#undef STL_SSTREAM_IS_BROKEN
+
+/* Define to 1 if the X Window System is missing or not being used. */
+#undef X_DISPLAY_MISSING
+
+/* Kludgey thing inserted by configure.in */
+#undef _POWER
+
+/* Configure for compiling on BGL family of machines */
+#undef __BGL_FAMILY__
+
+
+
+/*
+ * Prevent inclusion of mpi C++ bindings in mpi.h includes.
+ * This is done in here rather than SAMRAI_MPI.h since other
+ * files include MPI.h, such as PETSc and hypre.
+ */
+#ifndef MPI_NO_CPPBIND
+#define MPI_NO_CPPBIND
+#endif
+
+#ifndef MPICH_SKIP_MPICXX
+#define MPICH_SKIP_MPICXX
+#endif
+
+#ifndef OMPI_SKIP_MPICXX
+#define OMPI_SKIP_MPICXX
+#endif
+
+#ifdef SAMRAI_INLINE
+#define SAMRAI_INLINE_KEYWORD inline
+#else
+#define SAMRAI_INLINE_KEYWORD 
+#endif
+
+/********************************************************************/
+/********************* Hardwired defines ****************************/
+/********************************************************************/
+
+/*
+ * For codes transitioning between non-DLBG and DLBG versions of
+ * SAMRAI, define USING_SAMRAI_DLBG to differentiate the cases.
+ * The non-DLBG version of SAMRAI does not define this macro.
+ */
+// TODO this should be removed before release
+#ifndef USING_SAMRAI_DLBG
+#define USING_SAMRAI_DLBG
+#endif
+
+/*
+ * Some compilers require cmath to be included before the regular
+ * C math.h and stdlib.h headers are brought in, otherwise
+ * the compiler will get conflicting definitions for the functions.
+ */
+#if defined(__xlC__)
+#define REQUIRES_CMATH 1
+#endif
+
+#define STL_SSTREAM_HEADER_FILE <sstream>
+#define LACKS_STRSTREAM
+
+/*
+ * A few things for the MSVC++ version.
+ */
+#ifdef _MSC_VER
+
+/*
+ * Move this bad stuff to the utility class, not POSIX
+ */
+#define drand48() ((double)rand()/(double)RAND_MAX)
+/*
+ * This is not correct, the range is wrong, need to find
+ * a better solution
+ */
+#define mrand48() (rand())
+
+/*
+ * Some IEEE stuff is not under the normal names.
+ *
+ */
+#define isnan _isnan
+
+#endif
+
+#endif
+
diff -r 000000000000 -r 5eda1a3f24e8 config/aclocal.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/aclocal.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,5364 @@
+# generated automatically by aclocal 1.10 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006  Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+dnl File arg-with-environment.m4
+dnl Written by Brian T.N. Gunney
+dnl gunneyb at llnl.gov
+dnl $Id: arg-with-environment.m4 155 2007-05-14 22:09:31Z gunney $
+
+dnl IMPORTANT NOTE: This macro was originally written to
+dnl let configure macros check environments so that developers
+dnl can set up "make distcheck" to activate or deactivate
+dnl certain packages.  This is largely not needed anymore
+dnl because recent automake versions (1.5+, maybe?) allows
+dnl you to specify configure options for the distcheck rule.
+dnl
+dnl Therefore, you are encouraged to use the plain autoconf
+dnl macros (AC_ARC_WITH and AC_ARG_ENABLE).
+
+AC_DEFUN([BTNG_ARG_WITH_ENV_WRAPPER],[
+dnl This is a high-level macro similar to AC_ARG_WITH but it does
+dnl   a few extra things.
+dnl
+dnl It is meant for setting a shell variable using either the
+dnl   --with-feature configure flag or by setting a shell variable
+dnl   in the environment.  But its primary goal it to set or unset
+dnl   the shell variable (arg2).
+dnl
+dnl One of several things can happen to the shell variable
+dnl   when you use this macro, depending first on the configure
+dnl   option issued:
+dnl   |
+dnl   `-- no option given
+dnl   |   `-- leave shell variable alone, regardless of whether
+dnl   |       it is set (This is how you avoid
+dnl   |       having to use the configure option, such as in
+dnl   |       running the check rule by automake.)
+dnl   `-- with-feature=no or without-feature
+dnl   |   `-- unset shell variable, regardless of whether it is set
+dnl   `-- with-feature=string
+dnl   |   `-- set shell variable to the string
+dnl   `-- with-feature or with-feature=yes
+dnl       `-- if shell variable already set
+dnl       |   `-- leave it a lone
+dnl       `-- else if developer gave optional arg4
+dnl       |   `-- execute optional arg4 to set shell variable
+dnl       `-- else
+dnl           `-- set shell variable to blank
+dnl
+dnl One of two things can happen to the with_feature variable,
+dnl   assuming the developer does not change it using arg4.
+dnl   `-- no option given
+dnl       `-- with_feature is unset
+dnl   `-- one of the options referring to "feature" is given
+dnl       `-- with_feature is set
+dnl
+dnl In addition to running AC_ARG_WITH and caching the result, it:
+dnl   Allows the variable to be set by the environment.  This is
+dnl     for avoiding having to manually issue configure options
+dnl     or when manual configure options are not permissible, as
+dnl     in running "make check".  The environment variable is
+dnl     checked if the --with-something=something_else option
+dnl     is not given or given without the equal sign.
+dnl   Lets you specify command to run if --with-blah is issued
+dnl     without the equal sign or not issued at all.  In this
+dnl     case, the environment variable is consulted.  An unset
+dnl     environment variable is the same as --without-bla.  A set
+dnl     variable is the same as --with-blah=$value.  If $value is an
+dnl     empty string, runs optional command (arg5) to set it.
+dnl   Lets you specify command (arg4) to check the value chosen
+dnl     to make it is good, before caching it.
+dnl The arguments to this macro are:
+dnl   1: Name of what is being sought (the first argument in
+dnl     AC_ARG_WITH).
+dnl   2: Name of variable to set (also name of environment variable
+dnl      to look for if configure option is not issued).
+dnl   3(optional): Help message.  A generic message is provided if
+dnl     this argument is empty.
+dnl   4(optional): Commands to run if configure flag is not specific
+dnl     and environment variable is not set.  These commands are
+dnl     run if with_blah is "yes" or "".  They should set or unset
+dnl     the variable named in arg2, depending on what you want
+dnl     the default behavior to be in these cases.
+dnl   5(optional): Quality checking commands, to check if arg2 is good.
+dnl     This is run before caching result.  Generally, this would issue
+dnl     a warning or error as appropriate.  For example, if this macro
+dnl     is used to set the path to a program, you may want to check
+dnl     if that program exist and is executable.
+# Start macro BTNG_ARG_WITH_ENV_WRAPPER with args $1 and $2
+AC_CACHE_CHECK(for $1,btng_cv_prog_[]translit($1,-,_),[
+AC_ARG_WITH($1,
+ifelse($3,,[  --with-$1	Specify $1 (same as setting $2 in environment)],[$3]))
+# Set $2, using environment setting if available
+#   and if command line is ambiguous.
+case "$with_[]translit($1,-,_)" in
+  no[)]
+    # User explictly turned off $1.
+    # Ignore value of $2, even if set in the environment.
+    unset $2
+    ;;
+  yes|''[)]
+    # Flag unissued or ambiguously issued using --with-$1.
+    # Because the user did not explicitly turn if off,
+    # try to set $2.
+    # If environment variable $2 is available, use it.
+    # If not, try the user-supplied commands to set it.
+    if test -n "${$2}" ;  then
+      : Nothing to do here actually, because $2 is already in the environment.
+    else
+      ifelse($4,,:,$4)
+    fi
+    ;;
+  *)
+    # User issued a specific string using --with-$1=non-null-string.
+    # so that is used to set $2.
+    $2=$with_[]translit($1,-,_)
+    ;;
+esac
+dnl if test ! "${$2+set}" = set ; then
+dnl   # $2 is still unset, after processing --with-$1 flag,
+dnl   # and possibly using optional command to set it.
+dnl   # At this point, check to make sure it is not required.
+dnl   # if it is, then we have an error.
+dnl   case "$with_[]translit($1,-,_)" in
+dnl     no|'')
+dnl       : $2 is not set but it is ok because user did not
+dnl       : explicitly ask for it by issuing --with-$1=something.
+dnl       ;;
+dnl     *)
+dnl       # If user explicitly asked for $1 and we cannot find it[,]
+dnl       # that is an error
+dnl       AC_MSG_ERROR(cannot find appropriate value for $2)
+dnl       ;;
+dnl   esac
+dnl fi
+if test "${$2+set}" = set ; then
+  # This block executes the quality check commands, if any, for $2.
+  ifelse($5,,:,$5)
+fi
+# Cache the value if it was found.
+if test "${$2+set}" = set ; then
+  btng_cv_prog_[]translit($1,-,_)=${$2}
+fi
+])
+dnl This part runs if $2 should be set from cache.
+# Set $2 from cache.
+# $2 is not yet set if we grabbed it from cache.
+if test "${btng_cv_prog_[]translit($1,-,_)+set}" = set ; then
+  $2=$btng_cv_prog_[]translit($1,-,_)
+else
+  unset $2
+fi
+# End macro BTNG_ARG_WITH_ENV_WRAPPER with args $2 and $1
+])
+
+
+
+
+AC_DEFUN([BTNG_PATH_PROG],[
+dnl This is a high-level macro to find paths to certain programs.
+dnl In addition to (possibly) running AC_ARG_WITH and AC_PATH_PROG it:
+dnl   Allows the path to be set in an environment variable ($1),
+dnl     useful for setting configuration during "make check" and
+dnl     for avoiding manual configure options setting.
+dnl   Makes sure that the program is executable, if the user explicitly
+dnl     specified it.
+dnl The arguments are (similar to AC_PATH_PROG):
+dnl   1: Variable name to set to the path (used in BTNG_PATH_PROG).
+dnl   2: Name of program being sought (used in BTNG_PATH_PROG).
+dnl   3(optional): Commands to set $1 in case neither environment
+dnl      nor command line options are given.  Defaults to a call to
+dnl      AC_PATH_PROG($1,$2).
+dnl   4(optional): Quality check commands to make sure that a
+dnl      sufficiently good program is found.  Defaults to a simple
+dnl      check that the program is executable.
+BTNG_ARG_WITH_ENV_WRAPPER($2,$1,
+[[  --with-$2=PATH	Specify path to $2 program
+			(equivalent to setting $1 in environment)]]dnl
+,
+[
+dnl Commands to run if user was not specific.
+# Just set the variable to blank and check later.
+$1=
+],
+dnl Quality check commands.
+ifelse($4,,[
+  # if $1 is an absolute path, make sure it is executable.
+  if echo "${$1}" | grep '^/' > /dev/null && test ! -x "${$1}"; then
+    AC_MSG_WARN($2 program ${$1} is not executable.)
+  fi],$4)
+)dnl
+if test "${$1+set}" = set; then
+  ifelse($3,,[AC_PATH_PROG($1,$2)],$3)
+fi
+])
+
+
+
+
+AC_DEFUN([BTNG_ARG_WITH_PREFIX],[
+dnl This is a high-level macro to set the prefix for a
+dnl previously installed package.
+dnl The macro arguments are:
+dnl 1. package name
+dnl 2. variable to contain installation prefix.
+dnl 3(optional): Help message.  A generic message is provided if
+dnl   this argument is empty.
+dnl 4(optional): Commands to run if configure flag is not specific
+dnl   and environment variable is not set.  These commands are
+dnl   run if with_blah is "yes" or "".  They should set or unset
+dnl   the variable named in arg2, depending on what you want
+dnl   the defaul behavior to be in these cases.  The default is
+dnl   to exit with an error.
+# Start macro BTNG_ARG_WITH_PREFIX
+BTNG_ARG_WITH_ENV_WRAPPER($1,$2,
+ifelse([$3],,
+[[  --with-$1=PATH	Specify prefix where $1 is installed
+			(equivalent to setting $2 in the environment)]]
+,[[[$3]]]),
+ifelse([$4],,
+[[if test "${with_[]translit($1,-,_)}" = yes ; then
+  AC_MSG_ERROR([[If you specify --with-$1, you must give it the path as in --with-$1=/installation/path]])
+fi
+BTNG_AC_LOG(environment $2 not defined)
+]],[[[$4]]])
+)dnl
+# End macro BTNG_ARG_WITH_PREFIX
+])
+
+
+
+
+# ===========================================================================
+#           http://www.nongnu.org/autoconf-archive/check_zlib.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   CHECK_ZLIB()
+#
+# DESCRIPTION
+#
+#   This macro searches for an installed zlib library. If nothing was
+#   specified when calling configure, it searches first in /usr/local and
+#   then in /usr. If the --with-zlib=DIR is specified, it will try to find
+#   it in DIR/include/zlib.h and DIR/lib/libz.a. If --without-zlib is
+#   specified, the library is not searched at all.
+#
+#   If either the header file (zlib.h) or the library (libz) is not found,
+#   the configuration exits on error, asking for a valid zlib installation
+#   directory or --without-zlib.
+#
+#   The macro defines the symbol HAVE_LIBZ if the library is found. You
+#   should use autoheader to include a definition for this symbol in a
+#   config.h file. Sample usage in a C/C++ source is as follows:
+#
+#     #ifdef HAVE_LIBZ
+#     #include <zlib.h>
+#     #endif /* HAVE_LIBZ */
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Loic Dachary <loic at senga.org>
+#
+#   This program is free software; you can redistribute it and/or modify it
+#   under the terms of the GNU General Public License as published by the
+#   Free Software Foundation; either version 2 of the License, or (at your
+#   option) any later version.
+#
+#   This program is distributed in the hope that it will be useful, but
+#   WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+#   Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License along
+#   with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You
+#   need not follow the terms of the GNU General Public License when using
+#   or distributing such scripts, even though portions of the text of the
+#   Macro appear in them. The GNU General Public License (GPL) does govern
+#   all other use of the material that constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the Autoconf
+#   Macro released by the Autoconf Archive. When you make and distribute a
+#   modified version of the Autoconf Macro, you may extend this special
+#   exception to the GPL to apply to your modified version as well.
+
+AC_DEFUN([CHECK_ZLIB],
+#
+# DEFINES :
+#	        zlib_PREFIX
+#		zlib_INCLUDES
+#		zlib_LIBS
+#
+[AC_MSG_CHECKING(if zlib is wanted)
+AC_ARG_WITH(zlib,
+[  --with-zlib=DIR root directory path of zlib installation [DIR defaults to
+                    /usr/local or /usr if not found in /usr/local]
+  --without-zlib to disable zlib usage completely [the default]],
+[if test "$withval" != no ; then
+  AC_MSG_RESULT(yes)
+  if test "$withval" == yes ;
+  then
+     ZLIB_HOME=/usr/local
+  else
+     ZLIB_HOME="$withval"
+  fi
+  if test ! -d "$ZLIB_HOME"
+  then
+    AC_MSG_WARN([Sorry, $ZLIB_HOME does not exist, checking usual places])
+    ZLIB_HOME=/usr/local
+    if test ! -f "${ZLIB_HOME}/include/zlib.h"
+    then
+       ZLIB_HOME=/usr
+    fi
+  fi
+else
+  AC_MSG_RESULT(no)
+fi],
+  [AC_MSG_RESULT(no)]
+)
+
+
+#
+# Locate zlib, if wanted
+#
+if test -n "${ZLIB_HOME}"
+then
+        ZLIB_OLD_LDFLAGS=$LDFLAGS
+        ZLIB_OLD_CPPFLAGS=$LDFLAGS
+        LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
+        CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"
+        AC_LANG_SAVE
+        AC_LANG_C
+        AC_CHECK_LIB(z, inflateEnd, [zlib_cv_libz=yes], [zlib_cv_libz=no])
+        AC_CHECK_HEADER(zlib.h, [zlib_cv_zlib_h=yes], [zlib_cv_zlib_h=no])
+        AC_LANG_RESTORE
+        if test "$zlib_cv_libz" = "yes" -a "$zlib_cv_zlib_h" = "yes"
+        then
+	        zlib_PREFIX="${ZLIB_HOME}"
+		zlib_INCLUDES="-I${ZLIB_HOME}/include"
+		zlib_LIBS="-L${ZLIB_HOME}/lib -lz"
+                #
+                # If both library and header were found, use them
+                #
+                AC_CHECK_LIB(z, inflateEnd)
+                AC_MSG_CHECKING(zlib in ${ZLIB_HOME})
+                AC_MSG_RESULT(ok)
+        else
+                #
+                # If either header or library was not found, revert and bomb
+                #
+                AC_MSG_CHECKING(zlib in ${ZLIB_HOME})
+                LDFLAGS="$ZLIB_OLD_LDFLAGS"
+                CPPFLAGS="$ZLIB_OLD_CPPFLAGS"
+                AC_MSG_RESULT(failed)
+                AC_MSG_ERROR(either specify a valid zlib installation with --with-zlib=DIR or disable zlib usage with --without-zlib)
+        fi
+fi
+
+])
+
+dnl $Id: compiler-id.m4 155 2007-05-14 22:09:31Z gunney $
+
+dnl Determines which compiler is being used.
+dnl This check uses the compiler behavior when possible.
+dnl For some compiler, we resort to a best guess,
+dnl because we do not know a foolproof way to get the info.
+
+dnl Much of the information used here came from the very
+dnl helpful predef project (http://predef.sourceforge.net/).
+
+
+
+
+dnl Simple wrappers to allow using BTNG_INFO_CXX_ID_NAMES and
+dnl BTNG_INFO_CC_ID_NAMES without arguments.
+dnl The names CC_ID and CC_VERSION are used for the C compiler id and version.
+dnl The names CXX_ID and CXX_VERSION are used for the C++ compiler id and version.
+AC_DEFUN([BTNG_INFO_CXX_ID],[
+  BTNG_INFO_CXX_ID_NAMES(CXX_ID,CXX_VERSION)
+])
+AC_DEFUN([BTNG_INFO_CC_ID],[
+  BTNG_INFO_CC_ID_NAMES(CC_ID,CC_VERSION)
+])
+AC_DEFUN([BTNG_INFO_CC_CXX_ID],[
+  AC_REQUIRE([BTNG_INFO_CC_ID])
+  AC_REQUIRE([BTNG_INFO_CXX_ID])
+])
+
+
+dnl BTNG_INFO_CXX_ID and BTNG_INFO_C_ID determine which C or C++ compiler
+dnl is being used.
+# Set the variables CXX_ID or C_ID as follows:
+# Gnu		-> gnu
+# SUNWspro	-> sunpro
+# Dec		-> dec
+# KCC		-> kai
+# Intel		-> intel
+# SGI		-> sgi
+# IBM xlc	-> xlc
+
+
+AC_DEFUN([BTNG_INFO_CXX_ID_NAMES],
+dnl Arguments are:
+dnl 1. Name of variable to set to the ID string.
+dnl 2. Name of variable to set to the version number.
+[
+# Start macro BTNG_INFO_CXX_ID_NAMES
+  AC_REQUIRE([AC_PROG_CXXCPP])
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
+  BTNG_AC_LOG(CXXP is $CXX)
+  BTNG_AC_LOG(CXXCPP is $CXXCPP)
+
+  $1=unknown
+  $2=unknown
+
+dnl Do not change the following chain of if blocks into a case statement.
+dnl We may eventually have a compiler that must be tested in a different
+dnl method
+
+
+  # Check if it is a Sun compiler.
+  if test $$1 = unknown; then
+    BTNG_AC_LOG(checking if $CXX is sunpro)
+    AC_EGREP_CPP([^0x[0-9]+],__SUNPRO_CC,
+      $1=sunpro
+      # SUN compiler defines __SUNPRO_CC to the version number.
+      echo __SUNPRO_CC > conftest.C
+      $2=`${CXXCPP} conftest.C | sed -n 2p`
+      rm -f conftest.C
+    )
+  fi
+
+
+  # Check if it is a Intel compiler.
+  if test $$1 = unknown; then
+    BTNG_AC_LOG(checking if $CXX is intel)
+    AC_EGREP_CPP(^yes,
+#ifdef __INTEL_COMPILER
+yes;
+#endif
+,
+      $1=intel
+      # Intel compiler defines __INTEL_COMPILER to the version number.
+      echo __INTEL_COMPILER > conftest.C
+      $2=`${CXXCPP} conftest.C | sed -n 2p`
+      rm -f conftest.C
+    )
+  fi
+
+
+  # Check if it is a GNU compiler.
+  if test $$1 = unknown; then
+    BTNG_AC_LOG(checking if $CXX is gnu)
+    AC_EGREP_CPP(^yes,
+#ifdef __GNUC__
+yes;
+#endif
+,
+    $1=gnu
+    # GNU compilers output version number with option --version.
+    # Alternatively, it also defines the macros __GNUC__,
+    # GNUC_MINOR__ and __GNUC_PATCHLEVEL__
+    [[$2=`$CXX --version | sed -e 's/[^0-9]\{0,\}\([^ ]\{1,\}\).\{0,\}/\1/' -e 1q`]]
+    )
+  fi
+
+
+  # Check if it is a DEC compiler.
+  if test $$1 = unknown; then
+    BTNG_AC_LOG(checking if $CXX is dec)
+    AC_EGREP_CPP(^1,__DECCXX,
+      $1=dec
+      # DEC compiler defines __DECCXX_VER to the version number.
+      echo __DECCXX_VER > conftest.C
+      $2=`${CXXCPP} conftest.C | sed -n 2p`
+      rm -f conftest.C
+    )
+  fi
+
+
+  # Check if it is a KAI compiler.
+  if test $$1 = unknown; then
+    BTNG_AC_LOG(checking if $CXX is kai)
+    AC_EGREP_CPP(^1,__KCC,
+      $1=kai
+      # KCC compiler defines __KCC_VERSION to the version number.
+      echo __KCC_VERSION > conftest.C
+      $2=`${CXXCPP} conftest.C | sed -n 2p`
+      rm -f conftest.C
+    )
+  fi
+
+
+  # Check if it is a SGI compiler.
+  if test $$1 = unknown; then
+    BTNG_AC_LOG(checking if $CXX is sgi)
+    AC_EGREP_CPP(^1,__sgi,
+      $1=sgi
+      # SGI compiler defines _COMPILER_VERSION to the version number.
+      echo _COMPILER_VERSION > conftest.C
+      $2=`${CXXCPP} conftest.C | sed /^\\#/d`
+      rm -f conftest.C
+    )
+  fi
+
+
+  # Check if it is a IBM compiler.
+  if test $$1 = unknown; then
+    BTNG_AC_LOG(checking if $CXX is xlc)
+    AC_EGREP_CPP(^yes,
+#ifdef __xlC__
+yes;
+#endif
+,
+    $1=xlc
+    # IBM compiler defines __xlC__ to the version number.
+    echo __xlC__ > conftest.C
+    $2=`${CXXCPP} conftest.C | sed /^\\#/d`
+    rm -f conftest.C
+    )
+  fi
+
+
+  AC_LANG_RESTORE
+  BTNG_AC_LOG_VAR(CXX_ID CXX_VERSION)
+# End macro BTNG_INFO_CXX_ID_NAMES
+])
+
+
+
+
+
+AC_DEFUN([BTNG_INFO_CC_ID_NAMES],
+dnl Arguments are:
+dnl 1. Name of variable to set to the ID string.
+dnl 2. Name of variable to set to the version number.
+[
+# Start macro BTNG_INFO_CC_ID_NAMES
+  AC_REQUIRE([AC_PROG_CPP])
+  AC_LANG_SAVE
+  AC_LANG_C
+  BTNG_AC_LOG(CC is $CC)
+  BTNG_AC_LOG(CPP is $CPP)
+
+  $1=unknown
+  $2=unknown
+
+dnl Do not change the following chain of if blocks into a case statement.
+dnl We may eventually have a compiler that must be tested in a different
+dnl method
+
+
+  # Check if it is a Sun compiler.
+  if test $$1 = unknown; then
+    BTNG_AC_LOG(checking if $CC is sunpro)
+    AC_EGREP_CPP([^ 0x[0-9]+],__SUNPRO_C,
+      $1=sunpro
+      # SUN compiler defines __SUNPRO_C to the version number.
+      echo __SUNPRO_C > conftest.c
+      $2=`${CPP} ${CPPFLAGS} conftest.c | sed -n -e 's/^ //' -e 2p`
+      rm -f conftest.c
+    )
+  fi
+
+
+  # Check if it is a Intel compiler.
+  if test $$1 = unknown; then
+    BTNG_AC_LOG(checking if $CC is intel)
+    AC_EGREP_CPP(^yes,
+#ifdef __INTEL_COMPILER
+yes;
+#endif
+,
+      $1=intel
+      # Intel compiler defines __INTEL_COMPILER to the version number.
+      echo __INTEL_COMPILER > conftest.C
+      $2=`${CPP} conftest.C | sed -n 2p`
+      rm -f conftest.C
+    )
+  fi
+
+
+  # Check if it is a GNU compiler.
+  if test $$1 = unknown; then
+    BTNG_AC_LOG(checking if $CC is gnu)
+    AC_EGREP_CPP(^yes,
+#ifdef __GNUC__
+yes;
+#endif
+,
+    $1=gnu
+    [[$2=`$CC --version | sed -e 's/[^0-9]\{0,\}\([^ ]\{1,\}\).\{0,\}/\1/' -e 1q`]]
+    )
+  fi
+
+
+  # Check if it is a DEC compiler.
+  if test $$1 = unknown; then
+    BTNG_AC_LOG(checking if $CC is dec)
+    AC_EGREP_CPP(^ 1,__DECC,
+      $1=dec
+      # DEC compiler defines __DECC_VER to the version number.
+      echo __DECC_VER > conftest.c
+      $2=`${CPP} ${CPPFLAGS} conftest.c | sed -n -e 's/^ //' -e 2p`
+      rm -f conftest.c
+    )
+  fi
+
+
+  # Check if it is a KAI compiler.
+  if test $$1 = unknown; then
+    BTNG_AC_LOG(checking if $CC is kai)
+    AC_EGREP_CPP(^1,__KCC,
+      $1=kai
+      # KCC compiler defines __KCC_VERSION to the version number.
+      echo __KCC_VERSION > conftest.c
+      $2=`${CPP} ${CPPFLAGS} conftest.c | sed -n 2p`
+      rm -f conftest.c
+    )
+  fi
+
+
+  # Check if it is a SGI compiler.
+  if test $$1 = unknown; then
+    BTNG_AC_LOG(checking if $CC is sgi)
+    AC_EGREP_CPP(^1,__sgi,
+      $1=sgi
+      # SGI compiler defines _COMPILER_VERSION to the version number.
+      echo _COMPILER_VERSION > conftest.c
+      $2=`${CPP} ${CPPFLAGS} conftest.c | sed /^\\#/d`
+      rm -f conftest.c
+    )
+  fi
+
+
+  # Check if it is a IBM compiler.
+  if test $$1 = unknown; then
+    BTNG_AC_LOG(checking if $CC is xlc)
+    if echo "$host_os" | grep "aix" >/dev/null ; then
+      # The wretched IBM shell does not eval correctly,
+      # so we have to help it with a pre-eval eval statement.
+      ac_cpp=`eval "echo $ac_cpp"`
+      save_ac_cpp=$ac_cpp
+      BTNG_AC_LOG(ac_cpp is temporarily set to $ac_cpp)
+    else
+      save_ac_cpp=
+    fi
+    BTNG_AC_LOG(ac_cpp is $ac_cpp)
+    AC_EGREP_CPP(^yes,
+#ifdef __xlC__
+yes;
+#endif
+,
+    $1=xlc
+    # IBM compiler defines __xlC__ to the version number.
+    echo __xlC__ > conftest.C
+    $2=`${CPP} conftest.C | sed /^\\#/d`
+    rm -f conftest.C
+    )
+    test "$save_ac_cpp" && ac_cpp=$save_ac_cpp
+    BTNG_AC_LOG(ac_cpp is restored to $ac_cpp)
+  fi
+
+
+  AC_LANG_RESTORE
+  BTNG_AC_LOG_VAR(CC_ID CC_VERSION)
+# End macro BTNG_INFO_CC_ID_NAMES
+])
+
+dnl $Id: compiling-boolean.m4 155 2007-05-14 22:09:31Z gunney $
+
+
+AC_DEFUN([BTNG_TYPE_BOOL],[
+
+# Start macro BTNG_TYPE_BOOL
+
+AC_MSG_CHECKING(checking whether bool type is broken)
+
+AC_CACHE_VAL(btng_cv_type_bool_broken, [
+
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
+
+  AC_TRY_COMPILE(, bool b = true; ,
+    # bool is not broken.
+    btng_cv_type_bool_broken=no
+    ,
+    # bool is broken.
+    btng_cv_type_bool_broken=yes
+  )	dnl End AC_TRY_COMPILE call
+
+  AC_LANG_RESTORE
+
+])	dnl End AC_CACHE_VAL call
+
+AC_MSG_RESULT($btng_cv_type_bool_broken)
+
+if test "$btng_cv_type_bool_broken" = yes; then
+  AC_DEFINE([BOOL_IS_BROKEN],1,Define if bool type is not properly supported)
+fi
+
+
+# End macro BTNG_TYPE_BOOL
+
+])	dnl End of COMPILE_BOOLEAN_MACRO definition.
+
+dnl $Id: compiling-namespace.m4 155 2007-05-14 22:09:31Z gunney $
+
+
+
+AC_DEFUN([BTNG_TYPE_NAMESPACE],[
+
+# Start macro BTNG_TYPE_NAMESPACE
+
+AC_MSG_CHECKING(whether namespace is broken)
+
+AC_CACHE_VAL(btng_cv_type_namespace_broken, [
+
+  dnl AC_LANG_SAVE
+  dnl AC_LANG_CPLUSPLUS
+  AC_LANG_PUSH([C++])
+  AC_TRY_COMPILE(namespace test{ int i; }
+		, using namespace test;,
+    # namespace is not broken.
+    btng_cv_type_namespace_broken=no
+    ,
+    # namespace is broken.
+    btng_cv_type_namespace_broken=yes
+  )	dnl End AC_TRY_COMPILE call
+
+  AC_LANG_POP([C++])
+  dnl AC_LANG_RESTORE
+
+])	dnl End AC_CACHE_VAL call
+
+AC_MSG_RESULT($btng_cv_type_namespace_broken)
+
+if test "$btng_cv_type_namespace_broken" = yes; then
+  AC_DEFINE([NAMESPACE_IS_BROKEN],1,Define if namespace is not properly supported)
+fi
+
+
+# End macro BTNG_TYPE_NAMESPACE
+
+])	dnl End of BTNG_TYPE_NAMESPACE definition.
+
+AC_DEFUN([BTNG_AC_LOG],[echo "configure:__oline__:" $1 >&AC_FD_CC])
+
+AC_DEFUN([BTNG_AC_LOG_VAR],[
+dnl arg1 is list of variables to log.
+dnl arg2 (optional) is a label.
+dnl
+dnl This macro makes code that write out at configure time
+dnl label: x is '...'
+dnl if x is set and
+dnl label: x is unset
+dnl otherwise.
+define([btng_log_label],ifelse($2,,,[$2: ]))
+btng_log_vars="$1"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  BTNG_AC_LOG("btng_log_label$btng_log_vars_index is $btng_log_vars_value");
+dnl
+dnl This is a shorter version, but it does not work for some Bourne shells
+dnl due to misinterpretation of the multiple backslashes
+dnl BTNG_AC_LOG("btng_log_label$btng_log_vars_index is `eval if test \\\"\$\{$btng_log_vars_index+set\}\\\"\; then echo \\\""'"\$\{$btng_log_vars_index\}"'"\\\"\; else echo 'unset'\; fi`")
+done
+undefine([btng_log_label])
+])
+
+dnl $Id: support-blas.m4 155 2007-05-14 22:09:31Z gunney $
+
+AC_DEFUN([BTNG_VAR_SET_BLAS],[
+dnl Provides support for the blas library.
+dnl
+dnl Arguments are:
+dnl 1. Name of variable to set to path where blas are installed.
+dnl    Nothing is done if this variable is unset.
+dnl    If you only want to look in default locations, set it to blank.
+dnl 2. Name of the INCLUDES variable similar to the automake INCLUDES variable.
+dnl    This variable is modified ONLY if it is NOT set.
+dnl 3. Name of the LIBS variable similar to the automake LIBS variable.
+dnl    This variable is modified ONLY if it is NOT set.
+dnl
+dnl If arg1 is defined, assume that the user wants blas
+dnl support.  Do so by assigning arg2 and arg3 if they are not defined.
+dnl
+if test "${$1+set}" = set ; then
+  # Modify the output INCLUDES variable, if it is not set.
+  if test ! "${$2+set}" = set ; then
+    test -n "${$1}" && $2="-I${$1}/include"
+  fi
+  # Modify the output LIBS variable, if it is not set.
+  if test ! "${$3+set}" = set ; then
+    # Save LIBS for later recovery.
+    btng_save_LIBS="$LIBS";
+    # Extra libraries, if any, required by this check.
+    btng_extra_libs="$libz_LIBS -lm"
+    # If path is given, add path to extra flag for library search.
+    test -n "${$1}" && btng_extra_libs="-L${$1}/lib $btng_extra_libs"
+    # Look for library.
+    AC_SEARCH_LIBS([daxpy_],blas,[
+      BTNG_AC_LOG_VAR(LIBS,After finding blas flag)
+      # Action if found ...
+      # Extract modifications to LIB into library-specific LIBS variable.
+      $3=`echo " $LIBS" | sed "s! $btng_save_LIBS!!"`;
+      test -n "${$1}" && $3="-L${$1}/lib ${$3}"
+      BTNG_AC_LOG_VAR($3, Found blas library flag)
+      ],[
+      # Action if NOT found ...
+      BTNG_AC_LOG_VAR($3, Did not find blas library flag)
+      AC_MSG_WARN(
+[I could not systematically find the name of
+the blas library so I am using -lblas instead.])
+      $3="-lblas"
+      test -n "${$1}" &&	\
+	$3="-L${$1}/lib ${$3}"	# Add path flag to output variable.
+      ],[$btng_extra_libs])
+    LIBS="$btng_save_LIBS";	# Restore global-use variable.
+    unset btng_extra_libs
+    unset btng_save_LIBS
+  else
+    BTNG_AC_LOG(Not looking for blas because $3 is already set)
+  fi
+fi
+])dnl
+
+
+
+
+AC_DEFUN([BTNG_SUPPORT_BLAS],[
+dnl Support blas library by setting the variables
+dnl blas_PREFIX, blas_INCLUDES, and blas_LIBS.
+dnl Arg1: non-empty if you want the default to be on.
+dnl
+# Begin macro BTNG_SUPPORT_BLAS
+
+BTNG_ARG_WITH_ENV_WRAPPER(blas, blas_PREFIX,
+ifelse($1,,
+[  --with-blas[=PATH]
+			Use blas and optionally specify where
+			they are installed.],
+[  --without-blas	Do not use the blas library.]),
+if test "${with_blas+set}" = set; then
+  blas_PREFIX=
+else
+ifelse($1,,unset blas_PREFIX,blas_PREFIX=)
+fi
+)
+
+BTNG_ARG_WITH_PREFIX(blas-includes,blas_INCLUDES,
+[  --with-blas-includes=STRING
+			Specify the INCLUDES flags for blas.
+			If not specified, and --with-blas=PATH is,
+			this defaults to "-IPATH/include".])dnl
+
+BTNG_ARG_WITH_PREFIX(blas-libs,blas_LIBS,
+[  --with-blas-libs=STRING
+			Specify LIBS flags for blas.
+			If not specified, and --with-blas=PATH is,
+			this defaults to "-LPATH/lib -lblas".])dnl
+
+BTNG_VAR_SET_BLAS(blas_PREFIX,blas_INCLUDES,blas_LIBS)
+
+BTNG_AC_LOG_VAR(blas_PREFIX blas_INCLUDES blas_LIBS)
+# End macro BTNG_SUPPORT_BLAS
+])
+
+dnl Define macros for supporting HDF5.
+dnl $Id: support-dl.m4 155 2007-05-14 22:09:31Z gunney $
+
+AC_DEFUN([BTNG_VAR_SET_DL],[
+dnl Provides support for the dl (dynamic loading) library.
+dnl
+dnl Arguments are:
+dnl 1. Name of variable to set to path where dl are installed.
+dnl    Nothing is done if this variable is unset.
+dnl    If you only want to look in default locations, set it to blank.
+dnl 2. Name of the INCLUDES variable similar to the automake INCLUDES variable.
+dnl    This variable is modified ONLY if it is NOT set and the path
+dnl    is non-blank.
+dnl 3. Name of the LIBS variable similar to the automake LIBS variable.
+dnl    This variable is modified ONLY if it is NOT set.
+dnl    If the library cannot be found, this remains unset.
+dnl
+dnl If arg1 is defined, assume that the user wants dl support.
+dnl Do so by assigning arg2 and arg3 if they are not defined.
+dnl
+# Begin macro BTNG_VAR_SET_DL
+if test "${$1+set}" = set ; then
+  # Modify the output INCLUDES variable, if it is not set.
+  if test ! "${$2+set}" = set ; then
+    test -n "${$1}" && $2="-I${$1}/include"
+  fi
+  # Modify the output LIBS variable, if it is not set.
+  if test ! "${$3+set}" = set ; then
+    # Save LIBS for later recovery.
+    btng_save_LIBS="$LIBS";
+    # Extra libraries, if any, required by this check.
+    btng_extra_libs="$libz_LIBS -lm"
+    # If path is given, add path to extra flag for library search.
+    test -n "${$1}" && btng_extra_libs="-L${$1}/lib $btng_extra_libs"
+    # Look for library.
+    AC_SEARCH_LIBS([dlopen],dl,[
+      BTNG_AC_LOG_VAR(LIBS,After finding dl flag)
+      # Action if found ...
+      # Extract modifications to LIB into library-specific LIBS variable.
+      $3=`echo " $LIBS" | sed "s! $btng_save_LIBS!!"`;
+      test -n "${$1}" && $3="-L${$1}/lib ${$3}"
+      BTNG_AC_LOG_VAR($3, Found dl library flag)
+      ],[
+      # Action if NOT found ...
+      BTNG_AC_LOG_VAR($3, Did not find dl library flag)
+      ],[$btng_extra_libs])
+    LIBS="$btng_save_LIBS";	# Restore global-use variable.
+    unset btng_extra_libs
+    unset btng_save_LIBS
+  else
+    BTNG_AC_LOG(Not looking for dl because $3 is already set)
+  fi
+fi
+# End macro BTNG_VAR_SET_DL
+])dnl
+
+
+
+AC_DEFUN([BTNG_SUPPORT_DL],[
+dnl Support dl library by setting the variables
+dnl dl_PREFIX, dl_INCLUDES, and dl_LIBS.
+dnl Arg1: non-empty if you want the default to be on.
+dnl
+# Begin macro BTNG_SUPPORT_DL
+
+BTNG_ARG_WITH_ENV_WRAPPER(dl, dl_PREFIX,
+ifelse($1,,
+[  --with-dl[=PATH]
+			Use the dynamic loading library and optionally
+			specify where it is installed.],
+[  --without-dl		Do not use the dynamic loading library.]),
+ifelse($1,,unset dl_PREFIX; test "${with_dl+set}" = set && dl_PREFIX=,dl_PREFIX=))
+
+BTNG_ARG_WITH_PREFIX(dl-includes,dl_INCLUDES,
+[  --with-dl-includes=STRING
+			Specify the INCLUDES flags for dl.
+			If not specified, and --with-dl=PATH is,
+			this defaults to "-IPATH/include".])dnl
+
+BTNG_ARG_WITH_PREFIX(dl-libs,dl_LIBS,
+[  --with-dl-libs=STRING
+			Specify LIBS flags for dl.
+			If not specified, and --with-dl=PATH is,
+			this defaults to "-LPATH/lib -ldl".])dnl
+
+BTNG_VAR_SET_DL(dl_PREFIX,dl_INCLUDES,dl_LIBS)
+# End macro BTNG_SUPPORT_DL
+])
+
+dnl $Id: support-hypre.m4 369 2010-11-01 17:04:28Z smithsg $
+
+dnl Define macros for supporting HYPRE.
+
+
+AC_DEFUN([BTNG_SUPPORT_HYPRE],[
+dnl Support hypre libraries by setting the variables
+dnl hypre_PREFIX, hypre_INCLUDES, and hypre_LIBS.
+dnl Arg1: empty if you want the default to be off.
+dnl
+# Begin macro BTNG_SUPPORT_HYPRE
+BTNG_ARG_WITH_ENV_WRAPPER(hypre, hypre_PREFIX,
+ifelse($1,,
+[  --with-hypre[=PATH]	Use HYPRE and optionally specify where it is installed.],
+[  --without-hypre	Do not use the HYPRe library.]),
+ifelse($1,,if test "$with_hypre" = '' ; then unset hypre_PREFIX; else hypre_PREFIX=; fi, hypre_PREFIX=)
+)
+BTNG_VAR_SET_HYPRE(hypre_PREFIX,hypre_INCLUDES,hypre_LIBS)
+BTNG_AC_LOG_VAR(hypre_PREFIX hypre_INCLUDES hypre_LIBS)
+if test "${hypre_PREFIX+set}" = set; then
+  btng_save_cppflags=$CPPFLAGS
+
+  # Add hypre include flags to cpp so we can examine its header file.
+  CPPFLAGS="$hypre_INCLUDES $CPPFLAGS"
+  BTNG_AC_LOG_VAR(hypre_INCLUDES CPPFLAGS)
+
+  # Check if HYPRE header is ok.
+  AC_CHECK_HEADER(HYPRE_config.h,:,
+    [AC_MSG_ERROR(Problems checking HYPRE_config.h)])
+
+  # Check if HYPRE was compiled with parallelism.
+  AC_MSG_CHECKING(if hypre is serial or parallel)
+  AC_EGREP_CPP([^HYPRE_SEQUENTIAL_IS_DEFINED$], [
+#include <HYPRE_config.h>
+#ifdef HYPRE_SEQUENTIAL
+HYPRE_SEQUENTIAL_IS_DEFINED
+#endif
+    ],
+    hypre_PARALLELISM=serial,
+    hypre_PARALLELISM=parallel)
+  AC_MSG_RESULT($hypre_PARALLELISM)
+
+  # Reset cpp after checking hypre header file.
+  CPPFLAGS=$btng_save_cppflags
+  unset btng_save_cppflags
+
+  BTNG_AC_LOG_VAR(CPPFLAGS)
+  BTNG_AC_LOG_VAR(hypre_config_file hypre_PARALLELISM)
+fi
+# End macro BTNG_SUPPORT_HYPRE
+])
+
+
+AC_DEFUN([BTNG_VAR_SET_HYPRE],[
+dnl Provides support for the blas and lapack libraries.
+dnl
+dnl Arguments are:
+dnl 1. Name of variable to set to path where hypre is installed.
+dnl    Nothig is done if this variable is unset.
+dnl 2. Name of the INCLUDES variable similar to the automake INCLUDES variable.
+dnl    This variable is modified ONLY if it is NOT set.
+dnl 3. Name of the LIBS variable similar to the automake LIBS variable.
+dnl    This variable is modified ONLY if it is NOT set.
+dnl
+dnl If arg1 is defined, assume that the user wants blas and lapack
+dnl support.  Do so by assigning arg2 and arg3 if they are not defined.
+dnl
+# Begin macro BTNG_VAR_SET_HYPRE
+if test "${$1+set}" = set ; then
+  if test ! "${$2+set}" = set ; then
+    test -n "${$1}" && $2="-I${$1}/include"
+  fi
+  if test ! "${$3+set}" = set ; then
+    hypre_libs_found=
+    hypre_libs_test='-lHYPRE -lHYPRE_sstruct_ls -lHYPRE_sstruct_mv -lHYPRE_struct_ls -lHYPRE_struct_mv -lHYPRE_parcsr_ls -lHYPRE_DistributedMatrixPilutSolver -lHYPRE_ParaSails -lHYPRE_Euclid -lHYPRE_MatrixMatrix -lHYPRE_DistributedMatrix -lHYPRE_IJ_mv -lHYPRE_parcsr_mv -lHYPRE_seq_mv -lHYPRE_krylov -lHYPRE_utilities'
+    if test -n "${$1}" ; then
+      for i in $hypre_libs_test ; do
+	tmp_name=`echo $i | sed 's/^-l//'`
+        if test -f "${$1}/lib/lib${tmp_name}.a" || \
+          test -f "${$1}/lib/lib${tmp_name}.so"; then
+	  hypre_libs_found="$hypre_libs_found $i"
+        fi
+      done
+      $3="-L${$1}/lib ${hypre_libs_found}"
+    fi
+  fi
+fi
+# End macro BTNG_VAR_SET_HYPRE
+])dnl
+
+dnl $Id: support-ieee-float.m4 155 2007-05-14 22:09:31Z gunney $
+
+AC_DEFUN([BTNG_C_IEEE_FLOAT],[
+dnl Check on certain declarations in the float.h file:
+dnl FLT_SNAN DBL_SNAN
+dnl
+dnl ac_define ..._IS_BROKEN for symbols that are not defined.
+dnl
+# Begin macro BTNG_IEEE_FLOAT
+
+AC_LANG_C
+
+AC_EGREP_CPP([^nan is broken],
+[#include <float.h>
+#ifndef NAN
+nan is broken
+#endif],
+AC_DEFINE([NAN_IS_BROKEN],[1],[Define if NAN is not in float.h])
+BTNG_AC_LOG(["NAN is broken (not in float.h)"]),
+BTNG_AC_LOG(["NAN is ok (in float.h)"])
+)
+
+AC_EGREP_CPP([^flt snan is broken],
+[#include <float.h>
+#ifndef FLT_SNAN
+flt snan is broken
+#endif],
+AC_DEFINE([FLT_SNAN_IS_BROKEN],[1],[Define if FLT_SNAN is not in float.h])
+BTNG_AC_LOG(["FLT_NAN is broken (not in float.h)"]),
+BTNG_AC_LOG(["FLT_NAN is ok (in float.h)"])
+)
+
+AC_EGREP_CPP([^dbl snan is broken],
+[#include <float.h>
+#ifndef DBL_SNAN
+dbl snan is broken
+#endif],
+AC_DEFINE([DBL_SNAN_IS_BROKEN],[1],[Define if DBL_SNAN is not in float.h])
+BTNG_AC_LOG(["DBL_NAN is broken (not in float.h)"]),
+BTNG_AC_LOG(["DBL_NAN is ok (in float.h)"])
+)
+
+AC_EGREP_CPP([^flt snan is broken],
+[#include <float.h>
+#ifndef FLT_MAX
+flt snan is broken
+#endif],
+AC_DEFINE([FLT_MAX_IS_BROKEN],[1],[Define if FLT_MAX is not in float.h])
+BTNG_AC_LOG(["FLT_MAX is broken (not in float.h)"]),
+BTNG_AC_LOG(["FLT_MAX is ok (in float.h)"])
+)
+
+AC_EGREP_CPP([^dbl snan is broken],
+[#include <float.h>
+#ifndef DBL_MAX
+dbl snan is broken
+#endif],
+AC_DEFINE([DBL_MAX_IS_BROKEN],[1],[Define if DBL_MAX is not in float.h])
+BTNG_AC_LOG(["DBL_MAX is broken (not in float.h)"]),
+BTNG_AC_LOG(["DBL_MAX is ok (in float.h)"])
+)
+
+# End macro BTNG_IEEE_FLOAT
+])dnl
+
+dnl $Id: support-lapack.m4 155 2007-05-14 22:09:31Z gunney $
+
+AC_DEFUN([BTNG_VAR_SET_LAPACK],[
+dnl Provides support for the lapack library.
+dnl
+dnl Arguments are:
+dnl 1. Name of variable to set to path where lapack are installed.
+dnl    Nothig is done if this variable is unset.
+dnl 2. Name of the INCLUDES variable similar to the automake INCLUDES variable.
+dnl    This variable is modified ONLY if it is NOT set.
+dnl 3. Name of the LIBS variable similar to the automake LIBS variable.
+dnl    This variable is modified ONLY if it is NOT set.
+dnl
+dnl If arg1 is defined, assume that the user wants lapack
+dnl support.  Do so by assigning arg2 and arg3 if they are not defined.
+dnl
+if test "${$1+set}" = set ; then
+  # Modify the output INCLUDES variable, if it is not set.
+  if test ! "${$2+set}" = set ; then
+    test -n "${$1}" && $2="-I${$1}/include"
+  fi
+  # Modify the output LIBS variable, if it is not set.
+  if test ! "${$3+set}" = set ; then
+    # Save LIBS for later recovery.
+    btng_save_LIBS="$LIBS";
+    # Extra libraries, if any, required by this check.
+    btng_extra_libs="$libz_LIBS -lm"
+    # If path is given, add path to extra flag for library search.
+    test -n "${$1}" && btng_extra_libs="-L${$1}/lib $btng_extra_libs"
+    # Look for library.
+    AC_SEARCH_LIBS([xerbla_],lapack,[
+      BTNG_AC_LOG_VAR(LIBS,After finding lapack flag)
+      # Action if found ...
+      # Extract modifications to LIB into library-specific LIBS variable.
+      $3=`echo " $LIBS" | sed "s! $btng_save_LIBS!!"`;
+      test -n "${$1}" && $3="-L${$1}/lib ${$3}"
+      BTNG_AC_LOG_VAR($3, Found lapack library flag)
+      ],[
+      # Action if NOT found ...
+      BTNG_AC_LOG_VAR($3, Did not find lapack library flag)
+      AC_MSG_WARN(
+[I could not systematically find the name of
+the lapack library so I am using -llapack instead.])
+      $3="-llapack"
+      test -n "${$1}" &&	\
+	$3="-L${$1}/lib ${$3}"	# Add path flag to output variable.
+      ],[$btng_extra_libs])
+    LIBS="$btng_save_LIBS";	# Restore global-use variable.
+    unset btng_extra_libs
+    unset btng_save_LIBS
+  else
+    BTNG_AC_LOG(Not looking for lapack because $3 is already set)
+  fi
+fi
+])dnl
+
+
+
+
+AC_DEFUN([BTNG_SUPPORT_LAPACK],[
+dnl Support lapack library by setting the variables
+dnl lapack_PREFIX, lapack_INCLUDES, and lapack_LIBS.
+dnl Arg1: non-empty if you want the default to be on.
+dnl
+# Begin macro BTNG_SUPPORT_LAPACK
+
+BTNG_ARG_WITH_ENV_WRAPPER(lapack, lapack_PREFIX,
+ifelse($1,,
+[  --with-lapack[=PATH]
+			Use lapack and optionally specify where
+			they are installed.],
+[  --without-lapack	Do not use the lapack library.]),
+if test "${with_lapack+set}" = set; then
+  lapack_PREFIX=
+else
+ifelse($1,,unset lapack_PREFIX,lapack_PREFIX=)
+fi
+)
+
+BTNG_ARG_WITH_PREFIX(lapack-includes,lapack_INCLUDES,
+[  --with-lapack-includes=STRING
+			Specify the INCLUDES flags for lapack.
+			If not specified, and --with-lapack=PATH is,
+			this defaults to "-IPATH/include".])dnl
+
+BTNG_ARG_WITH_PREFIX(lapack-libs,lapack_LIBS,
+[  --with-lapack-libs=STRING
+			Specify LIBS flags for lapack.
+			If not specified, and --with-lapack=PATH is,
+			this defaults to "-LPATH/lib -llapack".])dnl
+
+BTNG_VAR_SET_LAPACK(lapack_PREFIX,lapack_INCLUDES,lapack_LIBS)
+
+BTNG_AC_LOG_VAR(lapack_PREFIX lapack_INCLUDES lapack_LIBS)
+# End macro BTNG_SUPPORT_LAPACK
+])
+
+dnl $Id: support-nsl.m4 155 2007-05-14 22:09:31Z gunney $
+
+AC_DEFUN([BTNG_VAR_SET_NSL],[
+dnl Provides support for the nsl library.
+dnl
+dnl Arguments are:
+dnl 1. Name of variable to set to path where nsl are installed.
+dnl    Nothing is done if this variable is unset.
+dnl    If you only want to look in default locations, set it to blank.
+dnl 2. Name of the INCLUDES variable similar to the automake INCLUDES variable.
+dnl    This variable is modified ONLY if it is NOT set and the path
+dnl    is non-blank.
+dnl 3. Name of the LIBS variable similar to the automake LIBS variable.
+dnl    This variable is modified ONLY if it is NOT set.
+dnl    If the library cannot be found, this remains unset.
+dnl
+dnl If arg1 is defined, assume that the user wants nsl support.
+dnl Do so by assigning arg2 and arg3 if they are not defined.
+dnl
+if test "${$1+set}" = set ; then
+  # Modify the output INCLUDES variable, if it is not set.
+  if test ! "${$2+set}" = set ; then
+    test -n "${$1}" && $2="-I${$1}/include"
+  fi
+  # Modify the output LIBS variable, if it is not set.
+  if test ! "${$3+set}" = set ; then
+    # Save LIBS for later recovery.
+    btng_save_LIBS="$LIBS";
+    # Extra libraries, if any, required by this check.
+    btng_extra_libs="$libz_LIBS -lm"
+    # If path is given, add path to extra flag for library search.
+    test -n "${$1}" && btng_extra_libs="-L${$1}/lib $btng_extra_libs"
+    # Look for library.
+    AC_SEARCH_LIBS([getnetname],nsl,[
+      BTNG_AC_LOG_VAR(LIBS,After finding nsl flag)
+      # Action if found ...
+      # Extract modifications to LIB into library-specific LIBS variable.
+      $3=`echo " $LIBS" | sed "s! $btng_save_LIBS!!"`;
+      test -n "${$1}" && $3="-L${$1}/lib ${$3}"
+      BTNG_AC_LOG_VAR($3, Found nsl library flag)
+      ],[
+      # Action if NOT found ...
+      BTNG_AC_LOG_VAR($3, Did not find nsl library flag)
+      ],[$btng_extra_libs])
+    LIBS="$btng_save_LIBS";	# Restore global-use variable.
+    unset btng_extra_libs
+    unset btng_save_LIBS
+  else
+    BTNG_AC_LOG(Not looking for nsl because $3 is already set)
+  fi
+fi
+])dnl
+
+
+
+AC_DEFUN([BTNG_SUPPORT_NSL],[
+dnl Support nsl library by setting the variables
+dnl nsl_PREFIX, nsl_INCLUDES, and nsl_LIBS.
+dnl Arg1: non-empty if you want the default to be on.
+dnl
+# Begin macro BTNG_SUPPORT_NSL
+
+BTNG_ARG_WITH_ENV_WRAPPER(nsl, nsl_PREFIX,
+ifelse($1,,
+[  --with-nsl[=PATH]
+			Use nsl and optionally specify where
+			it is installed.],
+[  --without-nsl	Do not use the nsl library.]),
+ifelse($1,,unset nsl_PREFIX; test "${with_nsl+set}" = set && nsl_PREFIX=,nsl_PREFIX=))
+BTNG_AC_LOG_VAR(nsl_PREFIX nsl_INCLUDES nsl_LIBS, before looking)
+
+BTNG_ARG_WITH_PREFIX(nsl-includes,nsl_INCLUDES,
+[  --with-nsl-includes=STRING
+			Specify the INCLUDES flags for nsl.
+			If not specified, and --with-nsl=PATH is,
+			this defaults to "-IPATH/include".])dnl
+
+BTNG_ARG_WITH_PREFIX(nsl-libs,nsl_LIBS,
+[  --with-nsl-libs=STRING
+			Specify LIBS flags for nsl.
+			If not specified, and --with-nsl=PATH is,
+			this defaults to "-LPATH/lib -lnsl".])dnl
+
+BTNG_VAR_SET_NSL(nsl_PREFIX,nsl_INCLUDES,nsl_LIBS)
+# End macro BTNG_SUPPORT_NSL
+])
+
+dnl $Id: support-petsc.m4 305 2007-12-04 17:03:07Z smithsg $
+
+AC_DEFUN([BTNG_SUPPORT_PETSC],[
+# Begin macro SUPPORT_PETSC
+dnl Support PETSC by setting PETSC_DIR, PETSC_ARCH,
+dnl petsc_INCLUDE and petsc_LIBS.
+dnl Also set PETSC_VERSION_MAJOR, PETSC_VERSION_MINOR and
+dnl PETSC_VERSION_SUBMINOR to indicate PETSc version.
+dnl
+dnl Support --with-petsc-optimize to use optimized PETSC library.
+dnl Support --with-petsc-mpiuni to use PETSC uniprocessor MPI library.
+dnl
+dnl Arg1: non-empty if you want the default to be on.
+dnl
+dnl This version supports PETSc-2.1.0 and later.
+
+# Set PETSC_DIR to the PETSC root directory.
+BTNG_ARG_WITH_PREFIX(petsc,PETSC_DIR,
+ifelse($1,,
+[[  --with-petsc=PATH	Support PETSc, and specify PETSC top-level directory.
+			Setting PETSC_DIR is equivalent to this.]],
+[  --without-petsc	Do not support PETSc.])
+,
+# User was not specific about specifying PETSc.
+ifelse($1,,
+# PETSc should be off by default.
+# So if user specified --with-petsc, it should include a path or it is an error.
+if test "${with_petsc+set}" = set ; then
+  # User specified --with-petsc ambiguously.
+  AC_MSG_ERROR([You must specify a path with --with-petsc=...])
+else
+  # User did not specify --with-petsc, so turn it off.
+  unset PETSC_DIR;
+fi
+,
+# PETSc should be on by default.
+# So require that user say where it is or turn it off.
+AC_MSG_ERROR([You must specify either --with-petsc=... or --without-petsc.])
+))
+
+# Set version numbers (PETSC_VERSION_...) for use by configure.
+# Users can directly access these from the PETSc header file.
+if test "${PETSC_DIR+set}" = set; then
+[
+PETSC_VERSION_MAJOR=`sed -e '/^[ \t]\{0,\}#define PETSC_VERSION_MAJOR/!d' -e 's/.\{0,\}[ \t]\{1,\}//' $PETSC_DIR/include/petscversion.h`
+PETSC_VERSION_MINOR=`sed -e '/^[ \t]\{0,\}#define PETSC_VERSION_MINOR/!d' -e 's/.\{0,\}[ \t]\{1,\}//' $PETSC_DIR/include/petscversion.h`
+PETSC_VERSION_SUBMINOR=`sed -e '/^[ \t]\{0,\}#define PETSC_VERSION_SUBMINOR/!d' -e 's/.\{0,\}[ \t]\{1,\}//' $PETSC_DIR/include/petscversion.h`
+]
+fi
+BTNG_AC_LOG_VAR(PETSC_VERSION_MAJOR PETSC_VERSION_MINOR PETSC_VERSION_SUBMINOR)
+
+# Set PETSC_ARCH.
+BTNG_ARG_WITH_PREFIX(petsc-arch,PETSC_ARCH,
+[  --with-petsc-arch=PETSC_ARCH
+			Specify the PETSC architecture.
+			If omitted, the output of the petscarch script
+			in the PETSc directory is used.])
+
+# Set PETSC_OPTIMIZE.
+BTNG_ARG_WITH_ENV_WRAPPER(petsc-optimize,PETSC_OPTIMIZE,
+[  --with-petsc-optimize
+			Use the optimized PETSC libraries],
+# By default, use the debug PETSC library.
+PETSC_OPTIMIZE=g
+BTNG_AC_LOG_VAR(with_petsc_optimize)
+test "$with_petsc_optimize" = yes && PETSC_OPTIMIZE=O
+)
+
+# Set PETSC_MPIUNI.
+BTNG_ARG_WITH_ENV_WRAPPER(petsc-mpiuni,PETSC_MPIUNI,
+[  --with-petsc-mpiuni	Use the PETSC uniprocessor MPI library],
+# By default, do not use the PETSC uniprocessor MPI library.
+unset PETSC_MPIUNI
+)
+
+# Set PETSC_LIBFILES
+unset PETSC_LIBFILES
+AC_ARG_WITH(petsc-libfiles,
+[  --with-petsc-libfiles
+			Specify explit PETSc library files instead
+			of -L and -l flags (may help some debuggers)],
+test "$with_petsc_libfiles" = yes && PETSC_LIBFILES=yes)
+
+
+if test "${PETSC_DIR+set}" = set; then
+  # Set up PETSC only if PETSC_DIR is defined.
+
+  if test ! -d "$PETSC_DIR"; then
+    AC_MSG_WARN([PETSC directory ($PETSC_DIR) does not look right])
+  fi
+  export PETSC_DIR
+  if test -z "$PETSC_ARCH"; then
+    if test -f "$PETSC_DIR/bmake/petscconf"; then
+	eval `grep PETSC_ARCH $PETSC_DIR/bmake/petscconf`
+    elif test -x "$PETSC_DIR/bin/petscarch"; then
+       PETSC_ARCH=`$PETSC_DIR/bin/petscarch`
+    else
+       AC_MSG_WARN([PETSC could not determine PETSC_ARCH])
+    fi    
+    export PETSC_ARCH
+  fi
+  BTNG_AC_LOG_VAR(PETSC_ARCH)
+  if test ! -d "$PETSC_DIR/bmake/$PETSC_ARCH"; then
+    AC_MSG_WARN([PETSC architecture ($PETSC_ARCH) does not look right])
+  fi
+  if test ! "$PETSC_OPTIMIZE" = g && test ! "$PETSC_OPTIMIZE" = O; then
+    AC_MSG_ERROR([PETSC optimize should be either g or O])
+  fi
+
+  petsc_INCLUDES="-I$PETSC_DIR/include -I$PETSC_DIR/bmake/$PETSC_ARCH"
+  petsc_INCLUDES="$petsc_INCLUDES -I$PETSC_DIR/src/vec"
+  # Currently, I'm not entirely sure why we have to explicitly specify
+  # the src/vec directory in the include path.  But there is at least
+  # one required file there that cannot be found in the include directory.
+
+# SGS Support latter version of PETSc
+# Try new structure and then old
+  if test -d "${PETSC_DIR}/lib/${PETSC_ARCH}"; then
+    petsc_LIBDIR="${PETSC_DIR}/lib/${PETSC_ARCH}"
+  elif  test -d "${PETSC_DIR}/lib/lib${PETSC_OPTIMIZE}/${PETSC_ARCH}"; then
+    petsc_LIBDIR="${PETSC_DIR}/lib/lib${PETSC_OPTIMIZE}/${PETSC_ARCH}"
+  else 
+    AC_MSG_WARN([PETSC lib directory does not look as expected])
+  fi
+
+
+  # Issue the -L flag if not specifying PETSc libraries by file names.
+  test ! "${PETSC_LIBFILES+set}" = set && petsc_LIBS="-L${petsc_LIBDIR}"
+
+  # Build up a list of PETSC library files.
+# SGS
+  petsc_libs_ls1=`cd ${petsc_LIBDIR} && echo lib*.*`
+
+  if test -n "$petsc_libs_ls1"; then
+    unset petsc_libs_ls
+    for i in $petsc_libs_ls1; do
+      j=`echo $i | sed -e 's/lib//' -e 's/\.a$//' -e 's/\.so$//'`
+      if echo "$petsc_libs_ls" | grep -v " $j " > /dev/null; then # Note padding!
+        petsc_libs_ls="$petsc_libs_ls $j ";	# Note space padding!
+      fi
+    done
+  fi
+  # Remove mpiuni from the list of PETSC libraries unless user asked for it.
+  if test ! "${PETSC_MPIUNI}" = yes; then
+    petsc_libs_ls=`echo "$petsc_libs_ls" | sed 's/ mpiuni //g'`
+  fi
+  # Move some low-level libraries to the end to ensure resolution
+  # for linkers that only make one pass.
+  for i in petscmat petscvec petsc; do
+    petsc_libs_ls=`echo "$petsc_libs_ls" | sed 's/\(.*\)\( \{0,1\}'"$i"'\{0,1\} \)\(.*\)/\1 \3 \2/g'`
+  done
+  # Build up petsc_LIBS string using library names.
+  BTNG_AC_LOG_VAR(petsc_libs_ls1 petsc_libs_ls)
+  if test -n "$petsc_libs_ls"; then
+    if test "${PETSC_LIBFILES+set}" = set; then
+      for i in $petsc_libs_ls; do
+# SGS
+        petsc_LIBS="$petsc_LIBS ${petsc_LIBDIR}/lib${i}.a"
+      done
+    else
+      for i in $petsc_libs_ls; do
+        petsc_LIBS="$petsc_LIBS -l$i"
+      done
+    fi
+  fi
+
+  BTNG_AC_LOG_VAR(PETSC_DIR petsc_INCLUDES petsc_LIBS PETSC_OPTIMIZE PETSC_MPIUNI)
+
+fi
+# End macro SUPPORT_PETSC
+])
+
+dnl $Id: support-restrict.m4 155 2007-05-14 22:09:31Z gunney $
+
+
+
+AC_DEFUN([BTNG_C_RESTRICT],[
+
+# Start macro BTNG_C_RESTRICT
+
+AC_MSG_CHECKING(checking whether restrict is broken)
+
+AC_CACHE_VAL(btng_cv_c_restrict_broken, [
+
+  AC_LANG_PUSH([C++])
+  AC_TRY_COMPILE([
+struct array_test {
+  double *ptr;
+  int i0;
+  array_test(double *p, int i);
+  double &value(int i) const;
+};
+array_test::array_test(double *p, int i) : ptr(p), i0(i) {}
+double &array_test::value(int i) __restrict__ const {
+  return ptr[i-i0];
+}
+    ],[
+double a[10];
+array_test at(a,20);
+at.value(5) = 5;
+    ],
+    # restrict is not broken.
+    btng_cv_c_restrict_broken=no
+    ,
+    # restrict is broken.
+    btng_cv_c_restrict_broken=yes
+  )	dnl End AC_TRY_COMPILE call
+
+  AC_LANG_POP([C++])
+
+])	dnl End AC_CACHE_VAL call
+
+AC_MSG_RESULT($btng_cv_c_restrict_broken)
+
+if test "$btng_cv_c_restrict_broken" = yes; then
+  AC_DEFINE([RESTRICT_IS_BROKEN],1,Define if restrict is not properly supported)
+fi
+
+
+# End macro BTNG_C_RESTRICT
+
+])	dnl End of BTNG_C_RESTRICT definition.
+
+dnl $Id: support-rpath.m4 333 2008-02-08 00:36:14Z smithsg $
+
+
+AC_DEFUN([BTNG_LIBS_ADD_RPATH],[
+# Begin macro BTNG_LIBS_ADD_RPATH
+dnl Support RPATH by going in a LIBS string and, for each -L flag,
+dnl add a flag immediately following it to set the RPATH, for
+dnl paths that contain shared libraries.
+dnl
+dnl arg1 is a LIBS string.
+dnl arg2 is the name of the variable to set to the new LIBS string.
+dnl arg3 is non-empty to use id of the C++ compiler instead of the C compiler.
+
+
+dnl Determine which compiler is being used, because
+dnl the syntax of the RPATH flag depends on the compiler.
+dnl Use the C++ compiler and assume the C compiler
+dnl is from the same family.
+AC_REQUIRE([BTNG_INFO_CC_CXX_ID])
+
+
+AC_ARG_ENABLE(rpath,
+[  --enable-rpath=SYNTAX	When linking add syntax for rpath for every
+			-L option that points to a directory with .so
+			files in it.  If SYNTAX is omitted, an attempt
+			is made to find out the correct rpath syntax for
+			the compiler being used.]
+,,enable_rpath=yes)
+
+if test "$enable_rpath" = yes; then
+  # Determine the proper rpath syntax.
+
+  AC_LANG_SAVE
+
+  ifelse([$3],,
+  AC_LANG_C
+  btng_rpath_compiler_id="$CC_ID",
+  AC_LANG_CPLUSPLUS
+  btng_rpath_compiler_id="$CXX_ID"
+  )
+
+
+  # Unset the rpath syntax variable so we can check on whether we
+  # found a way to set it.
+  unset btng_rpath_beginning;
+
+  # Determine, based on the compiler, the syntax for specifying RPATH.
+  # It should be of the form "$btng_rpath_beginning$the_path", where
+  # btng_rpath_beginning is the compiler-dependent part.
+  case "$btng_rpath_compiler_id" in
+    gnu)
+      # This compiler may use a variable rpath syntax because it may use
+      # the native loader.
+      BTNG_LIBS_FIND_RPATH(btng_rpath_beginning,
+	['---bogus-flag-meant-to-cause-error' '-Wl,-rpath ' '-Wl,-R' '-Wl,-R '])
+    ;;
+    intel)
+      # This compiler may use a variable rpath syntax because it may use
+      # the native loader.
+      BTNG_LIBS_FIND_RPATH(btng_rpath_beginning,
+	['---bogus-flag-meant-to-cause-error' '-Wl,-rpath ' '-Wl,-R' '-Wl,-R '])
+      if test "$btng_rpath_beginning" = "---bogus-flag-meant-to-cause-error"; then
+        # Do not rely on the compiler return value to test for syntax
+        # Guess the syntax assuming the native loader will be used.
+        case "$host_os" in
+          linux*) btng_rpath_beginning='-Wl,-rpath ' ;;
+          sun*|solaris*) btng_rpath_beginning='-R' ;;
+          osf*) btng_rpath_beginning='-rpath ' ;;
+          *) btng_rpath_beginning='' ;;
+        esac
+        AC_MSG_WARN(
+  [Your compiler ifelse($3,,$CC,$CXX) returns 0 even when it is
+  given a bogus flag.  Therefore, I cannot find the proper syntax
+  for the rpath for this compiler.  I have resorted to a guess that
+  may not be correct: '$btng_rpath_beginning'.
+  You can override this by using --enable-rpath=SYNTAX])
+      fi
+    ;;
+    sunpro)
+      # This compiler may use a variable rpath syntax.
+      BTNG_LIBS_FIND_RPATH(btng_rpath_beginning,['---bogus-flag-meant-to-cause-error' '-R' '-R '])
+    ;;
+    kai)
+      # The KAI compilers use the system native loader.
+      #
+      # On some platforms (PC/Linux at least), this compiler seems
+      # to return 0 even if it encounters error, thus it can return
+      # the first guess for the rpath syntax, even if the guess is
+      # wrong.  We try to catch this by making the first flag bogus.
+      # If the compiler accepts this flag (by returning 0), we know
+      # it is wrong and we resort to an alternative method for
+      # getting the rpath syntax.
+      BTNG_LIBS_FIND_RPATH(btng_rpath_beginning,
+	['---bogus-flag-meant-to-cause-error' '-R' '-R ' '-rpath ' '-Wl,-rpath ' '-Wl,-R' '-Wl,-R '])
+      if test "$btng_rpath_beginning" = "---bogus-flag-meant-to-cause-error"; then
+        # Do not rely on the compiler return value to test for syntax
+        # Guess the syntax assuming the native loader will be used.
+        case "$host_os" in
+          linux*) btng_rpath_beginning='-Wl,-rpath ' ;;
+          sun*|solaris*) btng_rpath_beginning='-R' ;;
+          osf*) btng_rpath_beginning='-rpath ' ;;
+          *) btng_rpath_beginning='' ;;
+        esac
+        AC_MSG_WARN(
+  [Your compiler ifelse($3,,$CC,$CXX) returns 0 even when it is
+  given a bogus flag.  Therefore, I cannot find the proper syntax
+  for the rpath for this compiler.  I have resorted to a guess that
+  may not be correct: '$btng_rpath_beginning'.
+  You can override this by using --enable-rpath=SYNTAX])
+      fi
+    ;;
+    *)
+      BTNG_LIBS_FIND_RPATH(btng_rpath_beginning)
+    ;;
+  esac
+  BTNG_AC_LOG_VAR(host_os CC_ID CXX_ID btng_rpath_compiler_id btng_rpath_beginning, forming rpaths)
+
+  AC_LANG_RESTORE
+
+  # It is valid to have btng_rpath_beginning be blank.
+  # but if it is unset, we could not find a way to set it.
+  if test ! "${btng_rpath_beginning+set}" = set; then
+    AC_MSG_WARN(I cannot find a working syntax for setting relocatable paths)
+  fi
+
+elif test ! "${enable_rpath}" = no; then
+
+  # User has provided the rpath syntax.
+  btng_rpath_beginning=$enable_rpath
+
+fi;	# End block determining the proper rpath syntax.
+
+
+# Use the rpath syntax.
+if test "${btng_rpath_beginning+set}" = set	\
+  && test -n "${btng_rpath_beginning}" ; then
+  # Add the RPATH flags only if we know the syntax for it,
+  # and if it is needed as indicated by a non-empty btng_rpath_beginning.
+
+  # Loop through the flags in $1, looking for the -L flag,
+  # and append RPATH flag to each one found, if the the
+  # path specified by the flag includes shared libraries.
+  for i in ${$1}; do
+    btng_new_$2="${btng_new_$2} ${i}"
+    btng_tmp_addl_string=`echo $i | sed 's/^-L//'`
+    test "$btng_tmp_addl_string" = "$i" && continue	# does not contain -L.
+    test -d "$btng_tmp_addl_string" || continue;	# directory nonexistent.
+    test "`echo $btng_tmp_addl_string/*.so`" = "$btng_tmp_addl_string/*.so" \
+      && continue;	# does not contain shared libraries.
+    echo "${btng_new_$2}"	\
+      | grep ".*${btng_rpath_beginning}[[ 	]]*${btng_tmp_addl_string}"	\
+      > /dev/null	\
+      && continue	# already contains the flag we want to add.
+    btng_new_$2="${btng_new_$2} ${btng_rpath_beginning}${btng_tmp_addl_string}"
+  done
+  $2="${btng_new_$2}"
+
+fi
+
+dnl Now, arg2 should be similar to arg1, but with the additional RPATH flags.
+
+# End macro BTNG_LIBS_ADD_RPATH
+])
+
+AC_DEFUN([BTNG_LIBS_FIND_RPATH],[
+# Begin macro BTNG_LIBS_FIND_RPATH
+dnl Find the correct rpath syntax from the list given in arg1.
+dnl arg1: variable to set to the syntax string
+dnl arg2: list of syntaxes to try;
+dnl   if blank, a large number of syntaxes will be tried.
+dnl
+dnl arg1 is list of possible rpath syntaxes to try.
+define(btng_possible_rpaths,dnl
+[ifelse($2,,['-R ' '-R' '-rpath ' '-Wl,-rpath ' '-Wl,-R ' '-Wl,-R'],[[$2]])])
+  btng_save_LIBS="$LIBS";
+  for i in btng_possible_rpaths; do
+    LIBS="${i}/usr/local"
+    AC_TRY_LINK(,,$1="$i", unset $1)
+    # Intel compiler does not fail on bad args but warning message is
+    # created. If warning is found in the log then continue searching
+    # for syntax as the current one is no good.  If warning is not
+    # found use return status of link attempt to determine if
+    # parameter was accepted by the compiler.
+    SEARCH=`echo "ignoring unknown option '${LIBS}'" | sed -e "s/---/-f-/"`
+    if ( grep "$SEARCH" config.log ) >/dev/null 2>&1
+    then 
+	:
+    else 
+        if test "${$1+set}" = set; then break; fi
+    fi
+  done
+  LIBS="$btng_save_LIBS"
+undefine([btng_possible_rpaths])
+# End macro BTNG_LIBS_FIND_RPATH
+])
+
+dnl Define macros for supporting z compression library.
+dnl $Id: support-spooles.m4 155 2007-05-14 22:09:31Z gunney $
+
+
+AC_DEFUN([BTNG_SUPPORT_SPOOLES],[
+dnl Support spooles library by setting the variables
+dnl spooles_PREFIX, spooles_INCLUDES, and spooles_LIBS.
+dnl Arg1: non-empty if you want the default to be on.
+dnl
+# Begin macro BTNG_SUPPORT_SPOOLES
+
+ifelse($1,,unset spooles_PREFIX,spooles_PREFIX=)
+
+AC_ARG_WITH(spooles,
+ifelse($1,,
+[  --with-spooles[=PATH]
+			Use spooles library and optionally specify where
+			it is installed.],
+[  --without-spooles	Do not use the spooles library.]),
+if test "${with_spooles+set}" = yes ; then
+  spooles_PREFIX=
+elif test "${with_spooles}" = no; then
+  unset spooles_PREFIX;
+else
+  spooles_PREFIX="${with_spooles}"
+fi
+)
+
+if test "${spooles_PREFIX+set}" = set; then
+  # Set spooles_LIBS and spooles_INCLUDE if they are not already set.
+  # Note that we expect library archives and headers to be
+  # directly under spooles_PREFIX rather than subdirectories
+  # lib and include of spooles_PREFIX.
+  if test ! "${spooles_LIBS+set}" = set; then
+    if test ! "${spooles_PREFIX}" = ''; then
+      spooles_LIBS="-L${spooles_PREFIX}"
+    fi
+    spooles_LIBS="${spooles_LIBS} -lspoolesMPI -lspooles"
+  fi
+  if test ! "${spooles_INCLUDES+set}" = set ; then
+    if test ! "${spooles_PREFIX}" = ''; then
+      spooles_INCLUDES="-I${spooles_PREFIX}"
+    fi
+  fi
+fi
+
+BTNG_AC_LOG_VAR(spooles_PREFIX spooles_LIBS spooles_INCLUDES)
+
+# End macro BTNG_SUPPORT_SPOOLES
+])
+
+dnl $Id: variable-header-filenames.m4 155 2007-05-14 22:09:31Z gunney $
+
+AC_DEFUN([BTNG_FIND_CORRECT_HEADER_FILENAME],[
+dnl There is no standard naming convention for STL header files.
+dnl This macro helps to pick the right name out of a list.
+dnl Arg1 is the variable to set to the found file name.
+dnl Arg2 is the list of file names to search
+dnl Arg3 are additional headers to include (for use by AC_TRY_COMPILE)
+dnl Arg4 is the code body to test if the included file works.
+# Start macro $0
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
+  $1=
+  AC_REQUIRE([BTNG_TYPE_NAMESPACE])
+  AC_REQUIRE([BTNG_TYPE_BOOL])
+  CPPFLAGS_SAVE=$CPPFLAGS
+  for file in $2; do
+    AC_CHECK_HEADER($file, btng_header_found=1, unset btng_header_found)
+    if test -n "$btng_header_found"; then
+      AC_MSG_CHECKING(whether $file is the header sought)
+      BTNG_AC_LOG(found header file $file)
+      CPPFLAGS="$CPPFLAGS_SAVE $CXX_OPTIONS"
+      AC_TRY_COMPILE(
+        [
+/* macro $0 checking for $file */
+#ifdef BOOL_IS_BROKEN
+typedef int bool;
+#define true 1
+#define false 0
+#endif
+	$3
+        #include <$file>
+#ifndef NAMESPACE_IS_BROKEN
+using namespace std;
+#endif
+],
+        $4,
+	AC_MSG_RESULT(yes)
+        $1="$file",
+	AC_MSG_RESULT(no)
+      )
+    fi
+    if test -n "${$1}"; then break; fi
+  done
+  AC_LANG_RESTORE
+  CPPFLAGS=$CPPFLAGS_SAVE
+# End macro $0
+])
+
+
+
+
+AC_DEFUN([BTNG_TREAT_VARIABLE_HEADER_FILENAME],[
+dnl BTNG_TREAT_VARIABLE_HEADER_FILENAME is a generic macro
+dnl used by (and using) other macros in this file.
+dnl It determines, from a given list, the correct name of
+dnl a header file required to compile a test code body.
+dnl It takes a list of possible of the header filenames.
+dnl It reports whether each header file is the one sought
+dnl until it finds the one that is.
+dnl If none of the header filenames work:
+dnl   It issues a warning.
+dnl   It defines a ...IS_BROKEN C macro saying so.
+dnl If it finds the first header filename that works:
+dnl   It assigns a variable (..._HEADER_FILE) to the
+dnl   correct filename and call AC_DEFINE for that variable.
+dnl Arguments are:
+dnl  1: a single name representing the header sought.
+dnl  2: a list of possible header filenames.
+dnl  3: other include lines (for use in AC_TRY_COMPILE).
+dnl  4: code to test if the header file is the one being sought.
+dnl
+# Start macro $0
+AC_CACHE_VAL(btng_cv_[]translit($1,[-],[_])[]_header_filename, [
+  AC_ARG_WITH($1-header-file,
+  [  --with-$1-header-file	Specify name of the $1 header file.],
+  btng_cv_[]translit($1,[-],[_])[]_header_filename=$with_[]translit($1,[-],[_])[]_header_file,
+  [BTNG_FIND_CORRECT_HEADER_FILENAME(btng_cv_[]translit($1,[-],[_])[]_header_filename,$2,[$3],[[$4]])]
+  )
+])	dnl End AC_CACHE_VAL call
+# We must be able to find the $1 header file or else.
+translit($1,[-a-z],[_A-Z])[]_HEADER_FILE="$btng_cv_[]translit($1,[-],[_])[]_header_filename"
+if test -z "$translit($1,[-a-z],[_A-Z])[]_HEADER_FILE"; then
+  translit($1,[-],[_])[]_header_is_broken=1
+  AC_MSG_WARN([cannot find a working $1 header file.
+      Names tried: $2
+      If you know the correct hame of this header file,
+      use the option --with-[]$1[]-header-file=FILENAME
+      with configure.])
+  AC_DEFINE(translit($1,[-a-z],[_A-Z])[]_IS_BROKEN,[1],[The $1 header file is broken])
+  BTNG_AC_LOG(header file $1 is broken)
+else
+  unset translit($1,[-],[_])[]_header_is_broken
+  AC_DEFINE_UNQUOTED(translit($1,[-a-z],[_A-Z])[]_HEADER_FILE,<$translit($1,[-a-z],[_A-Z])[]_HEADER_FILE>,
+    [Header file for $1])
+  BTNG_AC_LOG(header file $1 is ok)
+fi
+# End macro $0
+])	dnl end of BTNG_TREAT_VARIABLE_HEADER_FILENAME definition.
+
+
+
+dnl
+dnl These are some STL headers with uncertain names.
+dnl
+
+
+AC_DEFUN([BTNG_STL_STRING_HEADER_FILENAME],[
+# Start macro $0
+dnl dnl AC_MSG_CHECKING(name of the STL string header file)
+BTNG_TREAT_VARIABLE_HEADER_FILENAME([stl-string],
+  [string strings string.h strings.h string.hxx strings.hxx],,
+  [std::string s; s = "sample string";])
+# End macro $0
+])	dnl end of BTNG_STL_STRING_HEADER_FILENAME definition.
+
+
+AC_DEFUN([BTNG_STL_SET_HEADER_FILENAME],[
+# Start macro $0
+dnl AC_MSG_CHECKING(name of the STL set header file)
+BTNG_TREAT_VARIABLE_HEADER_FILENAME([stl-set], [set set.h set.hxx],,
+  [set<int> s; s.insert(1);])
+# End macro $0
+])	dnl end of BTNG_STL_SET_HEADER_FILENAME definition.
+
+
+AC_DEFUN([BTNG_STL_STACK_HEADER_FILENAME],[
+# Start macro $0
+dnl AC_MSG_CHECKING(name of the STL stack header file)
+AC_REQUIRE([BTNG_INFO_CXX_ID])
+AC_REQUIRE([BTNG_STL_LIST_HEADER_FILENAME])
+btng_stl_stack_test_body='[stack<int> s; s.push(1);]'
+# The Sun compiler version 5.2 does not treat default template
+# arguments correctly.  The STL standard states that for stack,
+# only the first argument is required but this Sun compiler
+# requires the second.
+if test "$CXX_ID" = "sunpro" && echo "$CXX_VERSION" | grep '^0x420' > /dev/null || test "$CXX_ID" = "sunpro" && echo "$CXX_VERSION" | grep '^0x520' > /dev/null ; then
+btng_stl_stack_test_body='[stack<int,list<int> > s; s.push(1);]'
+fi
+BTNG_TREAT_VARIABLE_HEADER_FILENAME([stl-stack], [stack stack.h stack.hxx],,
+  [$btng_stl_stack_test_body])
+# End macro $0
+])	dnl end of BTNG_STL_STACK_HEADER_FILENAME definition.
+
+
+AC_DEFUN([BTNG_STL_VECTOR_HEADER_FILENAME],[
+# Start macro $0
+BTNG_TREAT_VARIABLE_HEADER_FILENAME([stl-vector], [vector vector.h vector.hxx],,
+[vector<int> v; v.insert(v.begin(),1);
+vector<char> s; s.insert( s.end(), 10, '\0' );])
+# End macro $0
+])	dnl end of BTNG_STL_VECTOR_HEADER_FILENAME definition.
+
+
+AC_DEFUN([BTNG_STL_LIST_HEADER_FILENAME],[
+# Start macro $0
+dnl AC_MSG_CHECKING(name of the STL list header file)
+BTNG_TREAT_VARIABLE_HEADER_FILENAME([stl-list], [list list.h list.hxx],,
+  [list<int> v; v.insert(v.begin(),1);])
+# End macro $0
+])	dnl end of BTNG_STL_LIST_HEADER_FILENAME definition.
+
+
+AC_DEFUN([BTNG_STL_MAP_HEADER_FILENAME],[
+# Start macro $0
+dnl AC_MSG_CHECKING(name of the STL map header file)
+AC_REQUIRE([BTNG_INFO_CXX_ID])
+btng_stl_map_test_body='[map<int,int> v; v[0]=1;]'
+# The Sun compiler version 4.2 does not treat default template
+# arguments correctly.  The STL standard states that for map,
+# only the first two arguments are required but the Sun compiler
+# requires the third.
+test "$CXX_ID" = "sunpro" && echo "$CXX_VERSION" | grep '^0x420' > /dev/null && \
+btng_stl_map_test_body='[map<int,int,less<int> > v; v[0]=1;]'
+BTNG_TREAT_VARIABLE_HEADER_FILENAME([stl-map], [map map.h map.hxx],,
+  [$btng_stl_map_test_body])
+# End macro $0
+])	dnl end of BTNG_STL_MAP_HEADER_FILENAME definition.
+
+
+AC_DEFUN([BTNG_STL_ITERATOR_HEADER_FILENAME],[
+# Start macro $0
+dnl AC_MSG_CHECKING(name of the STL iterator header file)
+BTNG_TREAT_VARIABLE_HEADER_FILENAME([stl-iterator],
+  [iterator iterator.h iterator.hxx],,
+  [int a[10], size; size=distance(a,a+10);])
+dnl  [ostream_iterator<int> v(cout," ");])
+# End macro $0
+])	dnl end of BTNG_STL_ITERATOR_HEADER_FILENAME definition.
+
+
+AC_DEFUN([BTNG_STL_ALGO_HEADER_FILENAME],[
+# Start macro $0
+dnl AC_MSG_CHECKING(name of the STL algo header file)
+BTNG_TREAT_VARIABLE_HEADER_FILENAME([stl-algo],
+  [algo algorithm algo.h algorithm.h algo.hxx algorithm.hxx] ,,
+  [int n[10]; find(n,n+10,0);])
+# End macro $0
+])	dnl end of BTNG_STL_ALGO_HEADER_FILENAME definition.
+
+
+AC_DEFUN([BTNG_STL_FUNCTION_HEADER_FILENAME],[
+# Start macro $0
+dnl AC_MSG_CHECKING(name of the STL numeric header file)
+BTNG_TREAT_VARIABLE_HEADER_FILENAME([stl-function],
+  [function function.h function.hxx] ,,
+  [int a=1, b=2, c; plus<int> adder; c=adder(a,b);])
+# End macro $0
+])	dnl end of BTNG_STL_FUNCTION_HEADER_FILENAME definition.
+
+
+AC_DEFUN([BTNG_STL_NUMERIC_HEADER_FILENAME],[
+# Start macro $0
+dnl AC_MSG_CHECKING(name of the STL numeric header file)
+BTNG_TREAT_VARIABLE_HEADER_FILENAME([stl-numeric],
+  [numeric numeric.h numeric.hxx] ,,
+  [int n[10]; iota(n,n+10,0);])
+# End macro $0
+])	dnl end of BTNG_STL_NUMERIC_HEADER_FILENAME definition.
+
+
+AC_DEFUN([BTNG_STL_SSTREAM_HEADER_FILENAME],[
+# Start macro $0
+dnl AC_MSG_CHECKING(name of the STL string stream header file)
+btng_stl_sstream_test_body='/* New syntax */ istringstream ist("a string");'
+dnl We think that the sun 4.2 compiler does not support the syntax,
+dnl but we're not absolutely sure.
+test "$CXX_ID" = "sunpro" && echo "$CXX_VERSION" | grep '^0x420' > /dev/null && \
+btng_stl_sstream_test_body='/* Old syntax */ char i[[10]]; istrstream ist(i);'
+test "$CXX_ID" = "gnu" && echo "$CXX_VERSION" | grep '^2.95.2' > /dev/null && \
+btng_stl_sstream_test_body='/* Old syntax */ char i[[10]]; istrstream ist(i);'
+BTNG_TREAT_VARIABLE_HEADER_FILENAME([stl-sstream],
+  [sstream stringstream strstream sstream.h stringstream.h strstream.h sstream.hxx stringstream.hxx strstream.hxx] ,,
+  [$btng_stl_sstream_test_body] )
+# End macro $0
+])      dnl end of BTNG_STL_SSTREAM_HEADER_FILENAME definition.
+
+
+AC_DEFUN([BTNG_STL_MULTIMAP_HEADER_FILENAME],[
+# Start macro $0
+dnl AC_MSG_CHECKING(name of the STL multimap header file)
+AC_REQUIRE([BTNG_INFO_CXX_ID])
+btng_stl_multimap_test_body='[multimap<int,int > v; pair<const int,int> thePair(0,1); v.insert(thePair);]'
+test "$CXX_ID" = "sunpro" && echo "$CXX_VERSION" | grep '^0x420' > /dev/null && \
+btng_stl_multimap_test_body='[multimap<int,int,less<int> > v; pair<const int,int> thePair(0,1); v.insert(thePair);]'
+BTNG_TREAT_VARIABLE_HEADER_FILENAME([stl-multimap],
+    [multimap mmap multimap.h mmap.h multimap.hxx mmap.hxx map map.h map.hxx],,
+    [$btng_stl_multimap_test_body])
+# End macro $0
+])      dnl end of BTNG_STL_MULTIMAP_HEADER_FILENAME definition.
+
+
+AC_DEFUN([BTNG_STL_PAIR_HEADER_FILENAME],[
+# Start macro $0
+dnl AC_MSG_CHECKING(name of the STL pair header file)
+BTNG_TREAT_VARIABLE_HEADER_FILENAME([stl-pair], [pair pair.h pair.hxx],,
+  [pair<int,int> s(0,1);])
+# End macro $0
+])      dnl end of BTNG_STL_PAIR_HEADER_FILENAME definition.
+
+
+
+
+dnl
+dnl These are some stream-related headers with uncertain names.
+dnl
+
+
+AC_DEFUN([BTNG_IOSTREAM_HEADER_FILENAME],[
+# Start macro $0
+dnl AC_MSG_CHECKING(name of the iostream header file)
+BTNG_TREAT_VARIABLE_HEADER_FILENAME([iostream],
+  [iostream iostream.h iostream.hxx],,
+  [ostream &co=cout; // test ostream declaration
+   istream &ci=cin; // test istream declaration
+   cout<<"test"<<endl; // test extraction operator
+   ])
+# End macro $0
+])	dnl end of BTNG_IOSTREAM_HEADER_FILENAME definition.
+
+
+AC_DEFUN([BTNG_FSTREAM_HEADER_FILENAME],[
+# Start macro $0
+dnl AC_MSG_CHECKING(name of the fstream header file)
+BTNG_TREAT_VARIABLE_HEADER_FILENAME([fstream],
+  [fstream fstream.h fstream.hxx],,
+  [fstream iost("theStream",ios::app);])
+# End macro $0
+])	dnl end of BTNG_FSTREAM_HEADER_FILENAME definition.
+
+
+AC_DEFUN([BTNG_IOMANIP_HEADER_FILENAME],[
+# Start macro $0
+dnl AC_MSG_CHECKING(name of the iomanip header file)
+AC_REQUIRE([BTNG_IOSTREAM_HEADER_FILENAME])
+BTNG_TREAT_VARIABLE_HEADER_FILENAME([iomanip],
+  [iomanip iomanip.h iomanip.hxx],[#include IOSTREAM_HEADER_FILE],
+  [cout<<setw(13)<<endl;])
+# End macro $0
+])	dnl end of BTNG_IOMANIP_HEADER_FILENAME definition.
+
+
+dnl
+dnl Check whether the C++ compiler supports cmath
+dnl
+dnl Variable:	casc_cv_cxx_have_cmath = (yes|no)
+dnl Defines:	(HAVE|LACKS)_CTIME
+dnl
+
+AC_DEFUN([CASC_CXX_CTIME], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} supports cmath)
+
+   AC_CACHE_VAL(casc_cv_cxx_have_cmath, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+         AC_TRY_COMPILE([
+#include <ctime>
+void foo() {
+   char*   pzTime  = ctime( &amp;timeVal );
+}
+            ], [/* empty */],
+            casc_cv_cxx_have_cmath=yes,
+            casc_cv_cxx_have_cmath=no)
+      AC_LANG_RESTORE
+      ])
+
+   AC_MSG_RESULT($casc_cv_cxx_have_cmath)
+
+   if test "$casc_cv_cxx_have_cmath" = yes; then
+      AC_DEFINE([HAVE_CTIME],[1],[HAVE_CTIME])
+   else
+      AC_DEFINE([LACKS_CTIME],[1],[LACKS_CTIME])
+   fi
+])
+
+dnl
+dnl Check whether the C++ compiler supports sys/times.h
+dnl
+dnl Variable:	casc_cv_cxx_have_systimes = (yes|no)
+dnl Defines:	(HAVE|LACKS)_SYSTIMES
+dnl
+
+AC_DEFUN([CASC_CXX_SYSTIMES], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} supports sys/times.h)
+
+   AC_CACHE_VAL(casc_cv_cxx_have_systimes, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+         AC_TRY_COMPILE([
+#include <sys/times.h>
+void foo() {
+   char*   pzTime  = ctime( &amp;timeVal );
+}
+            ], [/* empty */],
+            casc_cv_cxx_have_systimes=yes,
+            casc_cv_cxx_have_systimes=no)
+         AC_LANG_RESTORE
+      ])
+
+   AC_MSG_RESULT($casc_cv_cxx_have_systimes)
+
+   if test "$casc_cv_cxx_have_systimes" = yes; then
+      AC_DEFINE([HAVE_SYSTIMES],[1],[HAVE_SYSTIMES])
+   else
+      AC_DEFINE([LACKS_SYSTIMES],[1],[LACKS_SYSTIMES])
+   fi
+])
+
+
+dnl
+dnl CASC C++ autoconf macros
+dnl
+dnl The following macros test various features of the C++ compiler, including:
+dnl
+dnl	- boolean types
+dnl	- namespace construct
+dnl	- template-based complex numbers
+dnl	- sstream.h header file with class ostringstream
+dnl	- new placement operator
+dnl	- explicit template instantiation
+dnl	- standard member function specialization
+dnl	- standard static data instantiation
+dnl	- standard static data specialization
+dnl	- static data specialization via pragmas
+dnl
+
+dnl
+dnl Check whether the C++ compiler supports the boolean built-in type.
+dnl
+dnl Variable:	casc_cv_cxx_have_bool = (yes|no)
+dnl Defines:	(HAVE|LACKS)_BOOL
+dnl
+
+AC_DEFUN([CASC_CXX_BOOL], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} supports bool)
+
+   AC_CACHE_VAL(casc_cv_cxx_have_bool, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([
+bool b = true;
+         ], [/* empty */],
+         casc_cv_cxx_have_bool=yes,
+         casc_cv_cxx_have_bool=no)
+      AC_LANG_RESTORE
+   ])
+   AC_MSG_RESULT($casc_cv_cxx_have_bool)
+
+   if test "$casc_cv_cxx_have_bool" = yes; then
+      AC_DEFINE([HAVE_BOOL],[1],[HAVE_BOOL])
+   else
+      AC_DEFINE([LACKS_BOOL],[1],[LACKS_BOOL])
+   fi
+])
+
+dnl
+dnl Check whether the C++ compiler supports the ANSI/ISO namespace construct.
+dnl
+dnl Variable:	casc_cv_cxx_have_namespace = (yes|no)
+dnl Defines:	(HAVE|LACKS)_NAMESPACE
+dnl
+
+AC_DEFUN([CASC_CXX_NAMESPACE], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} supports namespace)
+
+   AC_CACHE_VAL(casc_cv_cxx_have_namespace, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_LINK([
+namespace test {
+   int t();
+   int t() { return 0; } 
+}
+using namespace test;
+int foo() { int x = t(); x++; return x; }
+         ], [/* empty */],
+         casc_cv_cxx_have_namespace=yes,
+         casc_cv_cxx_have_namespace=no)
+      AC_LANG_RESTORE
+   ])
+   AC_MSG_RESULT($casc_cv_cxx_have_namespace)
+
+   if test "$casc_cv_cxx_have_namespace" = yes; then
+      AC_DEFINE([HAVE_NAMESPACE],[1],[HAVE_NAMESPACE])
+   else
+      AC_DEFINE([LACKS_NAMESPACE],[1],[LACKS_NAMESPACE])
+   fi
+])
+
+dnl
+dnl Check whether the C++ compiler supports cmath
+dnl
+dnl Variable:	casc_cv_cxx_have_cmath = (yes|no)
+dnl Defines:	(HAVE|LACKS)_CMATH
+dnl
+
+AC_DEFUN([CASC_CXX_CMATH], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} supports cmath)
+
+   AC_CACHE_VAL(casc_cv_cxx_have_cmath, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+         AC_TRY_COMPILE([
+#include <cmath>
+void foo() {
+   double temp = std::sin(0.0);
+}
+            ], [/* empty */],
+            casc_cv_cxx_have_cmath=yes,
+            casc_cv_cxx_have_cmath=no)
+         AC_LANG_RESTORE
+      ])
+
+   AC_MSG_RESULT($casc_cv_cxx_have_cmath)
+
+   if test "$casc_cv_cxx_have_cmath" = yes; then
+      AC_DEFINE([HAVE_CMATH],[1],[HAVE_CMATH])
+   else
+      AC_DEFINE([LACKS_CMATH],[1],[LACKS_CMATH])
+   fi
+])
+
+dnl
+dnl Check whether the C++ compiler supports template-based complex numbers.
+dnl
+dnl Variable:	casc_cv_cxx_have_template_comlex = (yes|no)
+dnl Defines:	(HAVE|LACKS)_TEMPLATE_COMPLEX
+dnl
+
+AC_DEFUN([CASC_CXX_TEMPLATE_COMPLEX], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} supports template-based complex numbers)
+
+   AC_CACHE_VAL(casc_cv_cxx_have_template_complex, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([
+#include <complex.h>
+void foo() {
+   complex<double> a(0.0, 1.0);
+}
+         ], [/* empty */],
+         casc_cv_cxx_have_template_complex=yes,
+         casc_cv_cxx_have_template_complex=no)
+      AC_LANG_RESTORE
+   ])
+
+   AC_MSG_RESULT($casc_cv_cxx_have_template_complex)
+
+   if test "$casc_cv_cxx_have_template_complex" = yes; then
+      AC_DEFINE([HAVE_TEMPLATE_COMPLEX],[1],[HAVE_TEMPLATE_COMPLEX])
+   else
+      AC_MSG_CHECKING(whether ${CXX} supports ISO template-based complex numbers)
+      AC_CACHE_VAL(casc_cv_cxx_have_template_complex_std, [
+         AC_LANG_SAVE
+         AC_LANG_CPLUSPLUS
+         AC_TRY_COMPILE([
+#include <complex>
+void foo() {
+   std::complex<double> a(0.0, 1.0);
+}
+            ], [/* empty */],
+            casc_cv_cxx_have_template_complex_std=yes,
+            casc_cv_cxx_have_template_complex_std=no)
+         AC_LANG_RESTORE
+      ])
+
+      AC_MSG_RESULT($casc_cv_cxx_have_template_complex_std)
+
+      if test "$casc_cv_cxx_have_template_complex_std" = yes; then
+         AC_DEFINE([HAVE_TEMPLATE_COMPLEX],[1],[HAVE_TEMPLATE_COMPLEX])
+      else
+         AC_DEFINE([LACKS_TEMPLATE_COMPLEX],[1],[LACKS_TEMPLATE_COMPLEX])
+      fi
+   fi
+])
+
+dnl
+dnl Check whether the C++ compiler supports sstream.h and class ostringstream.
+dnl
+dnl Variable:	casc_cv_cxx_have_sstream = (yes|no)
+dnl Defines:	(HAVE|LACKS)_SSTREAM
+dnl             NOTE: Also defines (HAVE|LACKS)_ISO_SSTREAM if compiler 
+dnl                   supports or does not support std ISO header file 
+dnl                   <sstream>.  This can be used determine a certain 
+dnl                   level of compiler support for std ISO header files. 
+dnl                   It is not intended to apply to all compilers.
+dnl
+
+AC_DEFUN([CASC_CXX_SSTREAM], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} supports sstream.h and class ostringstream)
+
+   AC_CACHE_VAL(casc_cv_cxx_have_sstream, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([
+#include <sstream.h>
+void foo() {
+//   char buffer[100];
+//   std::ostringstream os(buffer, 100);
+//   os << "hello, world...";
+   std::ostringstream out;
+   double f = 5.0;
+   int    g = 1;
+   out << "(" << f << "<some string>" << g << ")";
+}
+         ], [/* empty */],
+         casc_cv_cxx_have_sstream=yes,
+         casc_cv_cxx_have_sstream=no)
+      AC_LANG_RESTORE
+   ])
+
+   AC_MSG_RESULT($casc_cv_cxx_have_sstream)
+
+   if test "$casc_cv_cxx_have_sstream" = yes; then
+      AC_DEFINE([HAVE_SSTREAM],[1],[HAVE_SSTREAM])
+   else
+        AC_MSG_CHECKING(whether ${CXX} supports sstream and class ostringstream)
+	AC_CACHE_VAL(casc_cv_cxx_have_sstream_std, [
+        AC_LANG_SAVE
+        AC_LANG_CPLUSPLUS
+        AC_TRY_COMPILE([
+#include <sstream>
+void foo() {
+//   char buffer[100];
+//   std::ostringstream os(buffer, 100);
+//   os << "hello, world...";
+   std::ostringstream out;
+   double f = 5.0;
+   int    g = 1;
+   out << "(" << f << "<some string>" << g << ")";
+}
+         ], [/* empty */],
+        casc_cv_cxx_have_sstream_std=yes,
+        casc_cv_cxx_have_sstream_std=no)
+        AC_LANG_RESTORE
+        ])
+
+      AC_MSG_RESULT($casc_cv_cxx_have_sstream_std)
+
+      if test "$casc_cv_cxx_have_sstream_std" = yes; then
+         AC_DEFINE([HAVE_SSTREAM],[1],[HAVE_SSTREAM])
+         AC_DEFINE([HAVE_ISO_SSTREAM],[1],[HAVE_ISO_SSTREAM])
+      else
+         AC_DEFINE([LACKS_SSTREAM],[1],[LACKS_SSTREAM])
+         AC_DEFINE([LACK_ISO_SSTREAM],[1],[LACK_ISO_SSTREAM])
+      fi
+   fi
+])
+
+dnl
+dnl Check if left is supported
+dnl
+dnl Variable:	casc_cv_cxx_have_iomanip_left = (yes|no)
+dnl Defines:	(HAVE|LACKS)_IOMANIP_LEFT
+
+AC_DEFUN([CASC_CXX_IOMANIP_LEFT], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} defines the iomanip left operator)
+
+   AC_CACHE_VAL(casc_cv_cxx_have_iomanip_left, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_LINK([
+#include <iostream>
+#include <iomanip>
+using namespace std;
+
+void foo() 
+{
+   cout << left << 12.1;
+}
+         ], [/* empty */],
+         casc_cv_cxx_have_iomanip_left=yes,
+         casc_cv_cxx_have_iomanip_left=no)
+      AC_LANG_RESTORE
+   ])
+   AC_MSG_RESULT($casc_cv_cxx_have_iomanip_left)
+
+   if test "$casc_cv_cxx_have_iomanip_left" = yes; then
+      AC_DEFINE([HAVE_IOMANIP_LEFT],[1],[HAVE_IOMANIP_LEFT])
+   else
+      AC_DEFINE([LACKS_IOMANIP_LEFT],[1],[LACKS_IOMANIP_LEFT])
+   fi
+])
+
+
+dnl
+dnl Check whether the C++ compiler defines the new placement operator.
+dnl
+dnl Variable:	casc_cv_cxx_have_new_placement_operator = (yes|no)
+dnl Defines:	(HAVE|LACKS)_NEW_PLACEMENT_OPERATOR
+dnl
+
+AC_DEFUN([CASC_CXX_NEW_PLACEMENT_OPERATOR], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} defines the new placement operator)
+
+   AC_CACHE_VAL(casc_cv_cxx_have_new_placement_operator, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_LINK([
+#include <new>
+void trynew() {
+   void *ptr = 0;
+   double *data = new (ptr) double;
+}
+         ], [/* empty */],
+         casc_cv_cxx_have_new_placement_operator=yes,
+         casc_cv_cxx_have_new_placement_operator=no)
+      AC_LANG_RESTORE
+   ])
+
+   AC_MSG_RESULT($casc_cv_cxx_have_new_placement_operator)
+
+   if test "$casc_cv_cxx_have_new_placement_operator" = yes; then
+      AC_DEFINE([HAVE_NEW_PLACEMENT_OPERATOR],[1],[HAVE_NEW_PLACEMENT_OPERATOR])
+   else
+      AC_DEFINE([LACKS_NEW_PLACEMENT_OPERATOR],[1],[LACKS_NEW_PLACEMENT_OPERATOR])
+   fi
+])
+
+dnl
+dnl Check whether the C++ compiler supports explicit template instantiation.
+dnl
+dnl Variable:	casc_cv_cxx_have_explicit_template_instantiation = (yes|no)
+dnl Defines:	(HAVE|LACKS)_EXPLICIT_TEMPLATE_INSTANTIATION
+dnl
+dnl The explicit template instantiation syntax forces the compiler to
+dnl instantiate a template of the specified type.  For example,
+dnl
+dnl	template <class T> class Pointer {
+dnl	   public: T *value;
+dnl	};
+dnl	#ifndef LACKS_EXPLICIT_TEMPLATE_INSTANTIATION
+dnl	template class Pointer<int>;
+dnl	#endif
+dnl
+dnl will create the code for a Pointer of type int.  If this syntax is
+dnl not allowed, then the compiler must define some other mechanism for
+dnl automatically generating template code.
+dnl
+
+AC_DEFUN([CASC_CXX_EXPLICIT_TEMPLATE_INSTANTIATION], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} supports explicit template instantiation)
+   AC_CACHE_VAL(casc_cv_cxx_have_explicit_template_instantiation, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([
+template <class T> class Pointer { public: T *value; };
+template class Pointer<int>;
+         ], [/* empty */],
+         casc_cv_cxx_have_explicit_template_instantiation=yes,
+         casc_cv_cxx_have_explicit_template_instantiation=no)
+      AC_LANG_RESTORE
+   ])
+   AC_MSG_RESULT($casc_cv_cxx_have_explicit_template_instantiation)
+
+   if test "$casc_cv_cxx_have_explicit_template_instantiation" = yes; then
+      AC_DEFINE([HAVE_EXPLICIT_TEMPLATE_INSTANTIATION],[1],[HAVE_EXPLICIT_TEMPLATE_INSTANTIATION])
+   else
+      AC_DEFINE([LACKS_EXPLICIT_TEMPLATE_INSTANTIATION],[1],[LACKS_EXPLICIT_TEMPLATE_INSTANTIATION])
+   fi
+])
+
+dnl
+dnl Check whether the C++ compiler supports member function specialization.
+dnl
+dnl Variable:	casc_cv_cxx_have_member_function_specialization = (yes|no)
+dnl Defines:	(HAVE|LACKS)_MEMBER_FUNCTION_SPECIALIZATION
+dnl
+dnl The ANSI/ISO member function specialization syntax is used when defining
+dnl a specialized member function of a template class.  For example:
+dnl
+dnl	template <class T> class Pointer {
+dnl	   public: void foo();
+dnl	};
+dnl	#ifndef LACKS_MEMBER_FUNCTION_SPECIALIZATION
+dnl	template <>
+dnl	#endif
+dnl     void Pointer<int>::foo() { }
+dnl
+dnl will define the specialized version of Pointer<int>::foo().  Some
+dnl compilers such as GNU g++ cannot parse the template <> syntax.
+dnl
+
+AC_DEFUN([CASC_CXX_MEMBER_FUNCTION_SPECIALIZATION], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} supports member function specialization)
+   AC_CACHE_VAL(casc_cv_cxx_have_member_function_specialization, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([
+template <class T> class Pointer { public: void foo(); };
+template <> void Pointer<int>::foo();
+template <> void Pointer<int>::foo() { }
+         ], [/* empty */],
+         casc_cv_cxx_have_member_function_specialization=yes,
+         casc_cv_cxx_have_member_function_specialization=no)
+      AC_LANG_RESTORE
+   ])
+
+   dnl ASCI Red compiles but does not generate the code so manually
+   dnl set this
+   case $ARCH in
+      ipsc2)
+         casc_cv_cxx_have_member_function_specialization=no
+         ;;
+   esac
+
+   AC_MSG_RESULT($casc_cv_cxx_have_member_function_specialization)
+   if test "$casc_cv_cxx_have_member_function_specialization" = yes; then
+      AC_DEFINE([HAVE_MEMBER_FUNCTION_SPECIALIZATION],[1],[HAVE_MEMBER_FUNCTION_SPECIALIZATION])
+   else
+      AC_DEFINE([LACKS_MEMBER_FUNCTION_SPECIALIZATION],[1],[LACKS_MEMBER_FUNCTION_SPECIALIZATION])
+   fi
+
+])
+
+dnl
+dnl Check whether the C++ compiler supports static data instantiation.
+dnl
+dnl Variable:	casc_cv_cxx_have_static_data_instantiation = (yes|no)
+dnl Defines:	(HAVE|LACKS)_STATIC_DATA_INSTANTIATION
+dnl
+dnl The ANSI/ISO specifies that the default values of the static data members
+dnl of a template class may be defined as follows:
+dnl
+dnl	template <class T> class Pointer {
+dnl	   public: static T *s_test;
+dnl	};
+dnl	#ifndef LACKS_STATIC_DATA_INSTANTIATION
+dnl	template <class T> T* Pointer<T>::s_test = (T*) 0;
+dnl	#endif
+dnl
+dnl Some compilers such as GNU g++ cannot parse the generic static data member
+dnl instantiation syntax and require that static data members for type T be
+dnl explicitly specified to instantiate the data member.
+
+AC_DEFUN([CASC_CXX_STATIC_DATA_INSTANTIATION], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} supports static data instantiation)
+   AC_CACHE_VAL(casc_cv_cxx_have_static_data_instantiation, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([
+template <class T> class Pointer { public: void foo(); };
+template <> void Pointer<int>::foo() { }
+         ], [/* empty */],
+         casc_cv_cxx_have_static_data_instantiation=yes,
+         casc_cv_cxx_have_static_data_instantiation=no)
+      AC_LANG_RESTORE
+   ])
+   AC_MSG_RESULT($casc_cv_cxx_have_static_data_instantiation)
+   if test "$casc_cv_cxx_have_static_data_instantiation" = yes; then
+      AC_DEFINE([HAVE_STATIC_DATA_INSTANTIATION],[1],[HAVE_STATIC_DATA_INSTANTIATION])
+   else
+      AC_DEFINE([LACKS_STATIC_DATA_INSTANTIATION],[1],[LACKS_STATIC_DATA_INSTANTIATION])
+   fi
+])
+
+dnl
+dnl Check whether the C++ compiler supports standard static data specialization.
+dnl
+dnl Variable:	casc_cv_cxx_have_standard_static_data_specialization = (yes|no)
+dnl Defines:	(HAVE|LACKS)_STANDARD_STATIC_DATA_SPECIALIZATION
+dnl
+dnl The ANSI/ISO specifies that static data members of a template class may
+dnl be specialized as follows:
+dnl
+dnl	template <class T> class Pointer {
+dnl	   public: static T *s_test;
+dnl	};
+dnl	template <> int *Pointer<int>::s_test;
+dnl	template <> int *Pointer<int>::s_test = (int*) 0;
+dnl	template class Pointer<int>;
+dnl
+dnl Some compilers such as GNU g++ and older versions of KCC cannot parse
+dnl this syntax and use other methods (such as pragmas or different syntax).
+dnl
+
+AC_DEFUN([CASC_CXX_STANDARD_STATIC_DATA_SPECIALIZATION], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} supports standard static data specialization)
+   AC_CACHE_VAL(casc_cv_cxx_have_standard_static_data_specialization, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([
+template <class T> class Pointer { public: static T *s_test; };
+template <> int *Pointer<int>::s_test;
+int test() { Pointer<int> P; return(*P.s_test); }
+template <> int *Pointer<int>::s_test = (int*) 0;
+template class Pointer<int>;
+         ], [/* empty */],
+         casc_cv_cxx_have_standard_static_data_specialization=yes,
+         casc_cv_cxx_have_standard_static_data_specialization=no)
+      AC_LANG_RESTORE
+   ])
+   AC_MSG_RESULT($casc_cv_cxx_have_standard_static_data_specialization)
+   if test "$casc_cv_cxx_have_standard_static_data_specialization" = yes; then
+      AC_DEFINE([HAVE_STANDARD_STATIC_DATA_SPECIALIZATION],[1],[HAVE_STANDARD_STATIC_DATA_SPECIALIZATION])
+   else
+      AC_DEFINE([LACKS_STANDARD_STATIC_DATA_SPECIALIZATION],[1],[LACKS_STANDARD_STATIC_DATA_SPECIALIZATION])
+   fi
+])
+
+dnl
+dnl Check whether the C++ compiler supports pragma static data specialization.
+dnl
+dnl Variable:	casc_cv_cxx_have_pragma_static_data_specialization = (yes|no)
+dnl Defines:	(HAVE|LACKS)_PRAGMA_STATIC_DATA_SPECIALIZATION
+dnl
+dnl Some compilers support the specialization of a static data member of a
+dnl template class using the following syntax:
+dnl
+dnl	template <class T> class Pointer {
+dnl	   public: static T *s_test;
+dnl	};
+dnl	#pragma do_not_instantiate int *Pointer<int>::s_test
+dnl	template <> int *Pointer<int>::s_test = (int*) 0;
+dnl	template class Pointer<int>;
+dnl
+dnl This syntax is supported by older versions of KCC.  Note that this
+dnl macro should be used ONLY if the standard static data specialization
+dnl syntax fails.
+dnl
+
+AC_DEFUN([CASC_CXX_PRAGMA_STATIC_DATA_SPECIALIZATION], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} supports pragma static data specialization)
+   AC_CACHE_VAL(casc_cv_cxx_have_pragma_static_data_specialization, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([
+template <class T> class Pointer { public: static T *s_test; };
+#pragma do_not_instantiate int *Pointer<int>::s_test
+int test() { Pointer<int> P; return(*P.s_test); }
+template <> int *Pointer<int>::s_test = (int*) 0;
+template class Pointer<int>;
+         ], [/* empty */],
+         casc_cv_cxx_have_pragma_static_data_specialization=yes,
+         casc_cv_cxx_have_pragma_static_data_specialization=no)
+      AC_LANG_RESTORE
+   ])
+   AC_MSG_RESULT($casc_cv_cxx_have_pragma_static_data_specialization)
+   if test "$casc_cv_cxx_have_pragma_static_data_specialization" = yes; then
+      AC_DEFINE([HAVE_PRAGMA_STATIC_DATA_SPECIALIZATION],[1],[HAVE_PRAGMA_STATIC_DATA_SPECIALIZATION])
+   else
+      AC_DEFINE([LACKS_PRAGMA_STATIC_DATA_SPECIALIZATION],[1],[LACKS_PRAGMA_STATIC_DATA_SPECIALIZATION])
+   fi
+])
+
+dnl
+dnl Check whether the C++ compiler supports exception handling.
+dnl
+dnl Variable:	casc_cv_cxx_have_exception_handling = (yes|no)
+dnl Defines:	(HAVE|LACKS)_EXCEPTION_HANDLING
+dnl
+dnl Compilers that support exception handling will support the following  
+dnl operation: 
+dnl
+dnl static void byebye(int error) {
+dnl    fprintf(stderr, "floating point exception\n");   abort(); 
+dnl }
+dnl int main(int argc, char** argv) {
+dnl    unsigned short fpu_flags = _FPU_DEFAULT;
+dnl    fpu_flags &= ~_FPU_MASK_IM;  /* Execption on Invalid operation */
+dnl    fpu_flags &= ~_FPU_MASK_ZM;  /* Execption on Division by zero  */
+dnl    fpu_flags &= ~_FPU_MASK_OM;  /* Execption on Overflow */
+dnl    _FPU_SETCW(fpu_flags);
+dnl    signal(SIGFPE, byebye);  /* Invoke byebye when above occurs */
+dnl }
+dnl
+dnl
+AC_DEFUN([CASC_CXX_EXCEPTION_HANDLING], [
+    AC_REQUIRE([AC_PROG_CXX])
+    AC_MSG_CHECKING(whether ${CXX} supports exception handling)
+    AC_CACHE_VAL(casc_cv_cxx_have_exception_handling, [
+       AC_LANG_SAVE
+       AC_LANG_CPLUSPLUS
+       AC_TRY_COMPILE([
+#include <fpu_control.h>
+#include <signal.h>
+static void byebye(int error) { }
+void foo() {
+   unsigned short fpu_flags = _FPU_DEFAULT;
+   fpu_flags &= ~_FPU_MASK_IM;  /* Execption on Invalid operation */
+   fpu_flags &= ~_FPU_MASK_ZM;  /* Execption on Division by zero  */
+   fpu_flags &= ~_FPU_MASK_OM;  /* Execption on Overflow */
+   _FPU_SETCW(fpu_flags);
+   signal(SIGFPE, byebye);
+}
+         ], [/* empty */],
+         casc_cv_cxx_have_exception_handling=yes,
+         casc_cv_cxx_have_exception_handling=no)
+       AC_LANG_RESTORE
+    ])
+    AC_MSG_RESULT($casc_cv_cxx_have_exception_handling)
+    if test "$casc_cv_cxx_have_exception_handling" = yes; then
+       AC_DEFINE([HAVE_EXCEPTION_HANDLING],[1],[HAVE_EXCEPTION_HANDLING])
+    else
+       AC_DEFINE([LACKS_EXCEPTION_HANDLING],[1],[LACKS_EXCEPTION_HANDLING])
+    fi
+])
+
+
+dnl
+dnl Determines which form of isnan is present
+dnl 
+dnl Defines:	(HAVE|LACKS)_CMATH_ISNAN
+dnl             (HAVE|LACKS)_ISNAN
+dnl  	        (HAVE|LACKS)_ISNAND
+dnl  	        (HAVE|LACKS)_INLINE_ISNAND
+dnl
+dnl isnan is part of C99 spec and not necessarily available under
+dnl ISO C++.  Test for some other possible functions.
+dnl
+AC_DEFUN([CASC_CXX_ISNAN], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(checking for isnan in cmath)
+
+   AC_LANG_SAVE
+   AC_LANG_CPLUSPLUS
+   AC_TRY_COMPILE([ #include <cmath> ], 
+      [ int test = std::isnan(0.0); ],
+      casc_cv_cxx_have_isnan=yes,
+      casc_cv_cxx_have_isnan=no)
+   AC_LANG_RESTORE
+
+   AC_MSG_RESULT($casc_cv_cxx_have_isnan)
+
+   if test "$casc_cv_cxx_have_isnan" = yes; then
+      AC_DEFINE([HAVE_CMATH_ISNAN],[1],[HAVE_CMATH_ISNAN])
+   else
+      AC_DEFINE([LACKS_CMATH_ISNAN],[1],[LACKS_CMATH_ISNAN])
+
+      AC_MSG_CHECKING(checking for isnan in math.h)
+
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([#include <math.h>], 
+         [int test = isnan(0.0);],
+         casc_cv_cxx_have_isnan=yes,
+         casc_cv_cxx_have_isnan=no)
+      AC_LANG_RESTORE
+
+      AC_MSG_RESULT($casc_cv_cxx_have_isnan)
+
+      if test "$casc_cv_cxx_have_isnan" = yes; then
+         AC_DEFINE([HAVE_ISNAN],[1],[HAVE_ISNAN])
+      else
+         AC_DEFINE([LACKS_ISNAN],[1],[LACKS_ISNAN])
+
+         AC_MSG_CHECKING(checking for __isnand)
+
+         AC_LANG_SAVE
+         AC_LANG_CPLUSPLUS
+         AC_TRY_COMPILE([#include <math.h>],
+            [int test = __isnand(0.0);],
+            casc_cv_cxx_have_isnand=yes,
+            casc_cv_cxx_have_isnand=no)
+         AC_LANG_RESTORE
+  
+         AC_MSG_RESULT($casc_cv_cxx_have_isnand)
+         if test "$casc_cv_cxx_have_isnand" = yes; then
+            AC_DEFINE([HAVE_ISNAND],[1],[HAVE_ISNAND])
+         else
+            AC_DEFINE([LACKS_ISNAND],[1],[LACKS_ISNAND])
+
+            AC_MSG_CHECKING(checking for __inline_isnand)
+
+            AC_LANG_SAVE
+            AC_LANG_CPLUSPLUS
+            AC_TRY_COMPILE([#include <math.h>],
+                 [int test = __inline_isnand(0.0);],
+                casc_cv_cxx_have_inline_isnan=yes,
+                casc_cv_cxx_have_inline_isnan=no)
+              AC_LANG_RESTORE
+
+            AC_MSG_RESULT($casc_cv_cxx_have_inline_isnan)
+            if test "$casc_cv_cxx_have_inline_isnan" = yes; then
+               AC_DEFINE([HAVE_INLINE_ISNAND],[1],[HAVE_INLINE_ISNAND])
+            else
+               AC_DEFINE([LACKS_INLINE_ISNAND],[1],[LACKS_INLINE_ISNAND])
+           fi
+	fi
+      fi
+   fi
+])
+
+
+dnl
+dnl Check whether the GNU C++ compiler needs float NAN templates
+dnl
+dnl Variable:	casc_cv_cxx_have_isnan_template = (yes|no)
+dnl Defines:	(HAVE|LACKS)_ISNAN_TEMPLATE
+dnl
+
+AC_DEFUN([CASC_CXX_ISNAN_TEMPLATE], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} needs isnan templates)
+
+   AC_CACHE_VAL(casc_cv_cxx_have_isnan_template, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([
+
+#include <complex>
+
+template int __gnu_cxx::isnan<float>(float);
+template int __gnu_cxx::__capture_isnan<float>(float);
+         ], [/* empty */],
+         casc_cv_cxx_have_isnan_template=yes,
+         casc_cv_cxx_have_isnan_template=no)
+      AC_LANG_RESTORE
+   ])
+   AC_MSG_RESULT($casc_cv_cxx_have_isnan_template)
+
+   if test "$casc_cv_cxx_have_isnan_template" = yes; then
+      AC_DEFINE([HAVE_ISNAN_TEMPLATE],[1],[HAVE_ISNAN_TEMPLATE])
+   else
+      AC_DEFINE([LACKS_ISNAN_TEMPLATE],[1],[LACKS_ISNAN_TEMPLATE])
+   fi
+])
+
+dnl Define a macro for supporting HDF5
+
+AC_DEFUN([CASC_SUPPORT_HDF5],[
+
+# Begin CASC_SUPPORT_HDF5
+# Defines hdf5_PREFIX hdf5_INCLUDES and hdf5_LIBS if with-hdf5 is specified.
+AC_ARG_WITH(hdf5,
+[ --with-hdf5[=PATH]  Use HDF5 and optionally specify where HDF5 is installed.],
+, with_hdf5=no)
+
+case "$with_hdf5" in
+  no)
+    AC_MSG_NOTICE([configuring without HDF5 support])
+    : Do nothing
+  ;;
+  yes)
+    # HDF5 install path was not specified.
+    # Look in a couple of standard locations to probe if 
+    # HDF5 header files are there.
+    AC_MSG_CHECKING([for HDF5 installation])
+    for dir in /usr /usr/local; do
+      if test -f ${dir}/include/hdf5.h; then
+        hdf5_PREFIX=${dir}
+        break
+      fi
+    done
+    AC_MSG_RESULT([$hdf5_PREFIX])
+  ;;
+  *)
+    # HDF5 install path was specified.
+    AC_MSG_CHECKING([for HDF5 installation])
+
+    if test -f ${with_hdf5}/include/hdf5.h; then
+        hdf5_PREFIX=$with_hdf5
+        hdf5_INCLUDES="-I${hdf5_PREFIX}/include"
+        hdf5_LIBS="-L${hdf5_PREFIX}/lib -lhdf5"
+        AC_MSG_RESULT([$hdf5_PREFIX])
+    else
+        AC_MSG_RESULT([$hdf5_PREFIX])
+        AC_MSG_ERROR([HDF5 not found in $with_hdf5])
+    fi
+  ;;
+esac
+
+
+
+# Test compiling an HDF application
+
+# NOTE that AC_SEARCH_LIBS didn't work completely so
+# use a more complicated example program to see
+# if that will catch when HDF is not working.
+if test "${hdf5_PREFIX+set}" = set; then
+
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether HDF5 link works)
+   AC_LANG_PUSH(C++)
+   CASC_PUSH_COMPILER_STATE
+   # NOTE lib z and m were from BTNG macro.
+   LIBS="${LIBS} ${hdf5_LIBS} $zlib_LIBS $szlib_LIBS -lm "
+   CXXFLAGS="${CXXFLAGS} ${hdf5_INCLUDES}"
+   AC_LINK_IFELSE([
+      #include "hdf5.h"
+      #define FILE "file.h5"
+
+      int main() {
+
+         hid_t       file_id;   /* file identifier */
+         herr_t      status;
+
+         /* Create a new file using default properties. */
+         file_id = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+         /* Terminate access to the file. */
+         status = H5Fclose(file_id); 
+     }
+      ], 
+      casc_hdf5_compile=yes,
+      casc_hdf5_compile=no)
+   CASC_POP_COMPILER_STATE
+   AC_LANG_POP
+   AC_MSG_RESULT($casc_hdf5_compile)
+
+   if test "$casc_hdf5_compile" = no; then
+      AC_MSG_ERROR([HDF5 compile/link test failed])
+   fi
+fi
+
+# END CASC_SUPPORT_HDF5
+
+])dnl End definition of CASC_SUPPORT_HDF5
+
+
+
+
+dnl *********************************************************************
+dnl * CASC_ADD_LIB(LIBRARY, FUNCTION, DIRECTORY-LIST[, PREFIX[, 
+dnl *              ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]])
+dnl * checks first if LIBRARY is available on the linking search path and
+dnl * if FUNCTION can be linked with LIBRARY.  If so, -lLIBRARY is added
+dnl * to the variable [PREFIX]LIBS. (i.e., if prefix is LD, -llibrary is
+dnl * added to LDLIBS.)  If not, checks whitespace-separated
+dnl * DIRECTORY-LIST to see if LIBRARY exists in a specified directory and
+dnl * can be linked with FUNCTION.  If so, the first directory where
+dnl * linking is successful is added to the front of [PREFIX]LIBDIRS, and
+dnl * -lLIBRARY is added to the end of [PREFIX]LIBS.  If no prefix is
+dnl * specified, the directories and libraries are added to LIBS and
+dnl * LIBDIRS, respectively.  If the order of -l flags on the linking
+dnl * lines is important, CASC_ADD_LIB should be called for each library
+dnl * in the order they should appear on linking lines.  Mere existence of
+dnl * LIBRARY in the search path or in a specified directory can usually
+dnl * be determined by entering 'main' for FUNCTION.  Optional argument
+dnl * ACTION-IF-FOUND contains additional instructions to execute as soon
+dnl * as LIBRARY is found in any directory.  Optional argument
+dnl * ACTION-IF-NOT-FOUND contains instructions to execute if LIBRARY is
+dnl * not found anywhere.
+dnl **********************************************************************
+
+AC_DEFUN([CASC_ADD_LIB],
+[
+   # define some macros to hopefully improve readability
+   define([m_THESE_LIBS],[$4LIBS])
+   define([m_THESE_LIBDIRS],[$4LIBDIRS])
+
+   # check for the library from first argument.  If linking is successful
+   # the first time, the job is done, otherwise loop through DIRECTORY-LIST
+   AC_CHECK_LIB($1, $2, m_THESE_LIBS="$m_THESE_LIBS -l$1"
+                          casc_lib_found=yes 
+                          ifelse([$5], , , [$5]),
+
+      dnl * If library not found
+      for casc_lib_dir in $3; do
+
+         AC_CHECK_LIB($1, $2, 
+            m_THESE_LIBDIRS="-L$casc_lib_dir $m_THESE_LIBDIRS"
+            m_THESE_LIBS="$m_THESE_LIBS -l$1"
+            casc_lib_found=yes
+            ifelse([$5], , , [$5])
+            break
+            , ,
+            -L$casc_lib_dir $m_THESE_LIBDIRS $m_THESE_LIBS -l$1, no)
+      done
+      , $m_THESE_LIBDIRS $m_THESE_LIBS, no)  dnl * last two arguments for
+                                             dnl * first check
+
+   # ACTION-IF-NOT_FOUND for when the library is found nowhere
+   ifelse([$6], , ,
+      if test "$casc_lib_found" != "yes"; then
+         [$6]
+      fi
+   )
+
+   unset casc_lib_found
+
+   undefine([m_THESE_LIBS])
+   undefine([m_THESE_LIBDIRS])
+
+])dnl
+
+
+dnl ***********************************************************************
+dnl CASC_CHECK_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
+dnl              [, OTHER-LIBRARIES [, CACHE-CHOICE]]]])
+dnl * This is the same as AC_CHECK_LIB, except when it tests for LIBRARY
+dnl * it puts the flag -lLIBRARY after $LIBS and OTHER-LIBRARIES.  The Sun
+dnl * cc compiler does not search for LIBRARY in any directories specified
+dnl * by -L in OTHER-LIBRARIES when -lLIBRARY is listed first.  The
+dnl * functionality of this macro is the same as that of AC_CHECK_LIB in
+dnl * the Autoconf documentation.  
+dnl * CACHE-CHOICE [$6]added by N. Elliott, 6-24-98.  If CACHE-CHOICE is 'no',
+dnl * the results of this test are not cached.  CACHE-CHOICE should be
+dnl * used only when this test is called recursively.
+dnl *
+dnl * CASC_CHECK_LIB_OLD is an older version of this macro which doesn't
+dnl * seem to work with newer versions of autoconf
+dnl **********************************************************************
+
+AC_DEFUN([CASC_CHECK_LIB],
+[
+dnl AC_MSG_CHECKING([for $2 in -l$1])
+dnl Use a cache variable name containing both the library and function name,
+dnl because the test really is for library $1 defining function $2, not
+dnl just for library $1.  Separate tests with the same $1 and different $2s
+dnl may have different results.
+ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
+AC_CACHE_VAL(ac_cv_lib_$ac_lib_var,
+[ac_save_LIBS="$LIBS"
+LIBS="$5 $LIBS -l$1"
+AC_TRY_LINK(dnl
+ifelse(AC_LANG, [FORTRAN77], ,
+ifelse([$2], [main], , dnl Avoid conflicting decl of main.
+[/* Override any gcc2 internal prototype to avoid an error.  */
+]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
+extern "C"
+#endif
+])dnl
+[/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $2();
+])),
+            [$2()],
+            eval "ac_cv_lib_$ac_lib_var=yes",
+            eval "ac_cv_lib_$ac_lib_var=no")   
+LIBS="$ac_save_LIBS"
+])dnl 
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  :
+  dnl AC_MSG_RESULT(yes)
+  ifelse([$3], ,
+[changequote(, )dnl
+  ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+changequote([, ])dnl
+  AC_DEFINE_UNQUOTED($ac_tr_lib)
+  LIBS="-l$1 $LIBS" 
+], [$3])
+else
+ : 
+  dnl AC_MSG_RESULT(no)
+ifelse([$4], , , [
+ifelse([$6], no, unset ac_cv_lib_$ac_lib_var)  
+$4
+])dnl
+fi
+ifelse([$6], no, unset ac_cv_lib_$ac_lib_var)
+])dnl
+
+
+
+AC_DEFUN([CASC_CHECK_LIB_OLD],
+[AC_MSG_CHECKING([for -l$1])
+dnl Use a cache variable name containing both the library and function name,
+dnl because the test really is for library $1 defining function $2, not
+dnl just for library $1.  Separate tests with the same $1 and different $2s
+dnl may have different results.
+ac_lib_var=`echo $1['_']$2 | tr './+\055' '__p_'`
+AC_CACHE_VAL(ac_cv_lib_$ac_lib_var,
+[ac_save_LIBS="$LIBS"
+LIBS="$5 $LIBS -l$1"
+AC_TRY_LINK(dnl
+ifelse([$2], [main], , dnl Avoid conflicting decl of main.
+[/* Override any gcc2 internal prototype to avoid an error.  */
+]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus 
+extern "C"
+#endif
+])dnl
+[/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $2();
+]),
+            [$2()],
+            eval "ac_cv_lib_$ac_lib_var=yes",
+            eval "ac_cv_lib_$ac_lib_var=no")dnl
+LIBS="$ac_save_LIBS"
+])dnl
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  AC_MSG_RESULT(yes)  
+  ifelse([$3], ,
+[changequote(, )dnl
+  ac_tr_lib=HAVE_LIB`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+changequote([, ])dnl
+  AC_DEFINE_UNQUOTED($ac_tr_lib)
+  LIBS="-l$1 $LIBS"
+], [
+ifelse([$6], no, unset ac_cv_lib_$ac_lib_var)
+$3])
+else
+  AC_MSG_RESULT(no) 
+ifelse([$4], , , [
+ifelse([$6], no, unset ac_cv_lib_$ac_lib_var)
+$4
+])dnl
+fi
+ifelse([$6], no, unset ac_cv_lib_$ac_lib_var)
+])
+
+
+
+dnl *********************************************************************
+dnl * CASC_CHECK_HEADER(HEADER-FILE, DIRECTORY-LIST[, ACTION-IF-FOUND[,
+dnl *                   ACTION-IF-NOT-FOUND]])
+dnl * This macro is an alternative to AC_CHECK_HEADER.  It does
+dnl * essentially the same thing, but it allows the user to specify
+dnl * a directory list if HEADER-FILE can not be found in the current path
+dnl * for #includes, and it adds to the variable INCLUDES the first
+dnl * directory in DIRECTORY-LIST from where HEADER-FILE can be included.
+dnl *********************************************************************
+
+AC_DEFUN([CASC_CHECK_HEADER],
+[
+   dnl * loop through the directory list.  The first iteration leaves the
+   dnl * casc_dir variable empty to check if the header can be #included
+   dnl * without specifying a directory.
+   for casc_dir in '' $2 ; do
+      if test -n "$casc_dir"; then
+         casc_header=$casc_dir/$1
+      else
+         casc_header=$1
+      fi
+
+      dnl * Check for the header.  Add the necessary -I flag to INCLUDES
+      AC_CHECK_HEADER( $casc_header,
+         if test -n "$casc_dir"; then
+            INCLUDES="$INCLUDES -I$casc_dir"
+         fi
+         casc_header_found=yes
+         ifelse([$3], , , [$3])
+         break )
+
+   done
+
+   dnl * This takes care of the action if not found
+   ifelse([$4], , ,
+      if test "$casc_header_found" != "yes"; then
+         [$4]
+      fi
+   )
+
+   unset casc_header_found
+])dnl
+
+
+dnl **********************************************************************
+dnl * CASC_CREATE_PACKAGE_OPTION(PACKAGE-NAME[, DIR-LIST[, FILE]])
+dnl * This is a general macro that creates a configure command-line option
+dnl * called `--with-PACKAGE-NAME-dir' which will allow the user to
+dnl * specify the location of the installation of an outside software
+dnl * package, such as PETSc or ISIS++.  After a check to make sure the
+dnl * given directory is valid (see below for discussion of validity), the
+dnl * directory's path is stored in the shell variable PACKAGE-NAME_DIR.
+dnl * For example, to allow the user to specify the location of PETSc,
+dnl * place `CASC_CREATE_PACKAGE_OPTION(PETSC)' in configure.in.  Then the
+dnl * user, if configuring on the CASC Sun cluster, would type `configure
+dnl * --with-PETSC-dir=/home/casc/petsc', and the directory's path would
+dnl * be stored in PETSC_DIR.  With this macro, the user is also permitted
+dnl * to set the variable PACKAGE-NAME_DIR in the environment before
+dnl * running configure, but any choice made on the command line would
+dnl * override any preset values.  
+dnl *
+dnl * This macro takes an optional second argument, DIR-LIST, which is a
+dnl * whitespace-separated list of directories where the developer thinks
+dnl * PACKAGE-NAME might be installed.  If DIR-LIST is given, and the user
+dnl * does not use the `--with' option to give the location of
+dnl * PACKAGE-NAME (or if the directory given by the user does not exist),
+dnl * then configure will assign to PACKAGE-NAME_DIR the path of the first
+dnl * directory in DIR-LIST that is valid.
+dnl *
+dnl * Validity:  The optional third argument to this macro is FILE, which
+dnl * should be either the name of a file in the top directory of the
+dnl * package in question or the relative path of a file in a subdirectory
+dnl * of the package.  If the argument FILE is given, then configure will
+dnl * consider a user specified directory or a directory from DIR-LIST 
+dnl * valid only if FILE exists in the directory.  If this argument is not
+dnl * given, then configure will consider a directory valid simply if it
+dnl * is indeed a directory.  FILE should be a file with a unique name
+dnl * that can be expected to exist in the same location in any 
+dnl * installation of the package in question.  If you know of no such
+dnl * file, do not include a third argument when invoking this macro.
+dnl * 
+dnl * This macro also gives the user the command-line option
+dnl * `--without-PACKAGE-NAME-dir', which, when invoked, will leave the
+dnl * variable PACKAGE-NAME_DIR empty.  This option should be invoked when
+dnl * the user wants to exclude a package from the configuration.
+dnl * 
+dnl * NOTE:  Since PACKAGE-NAME is used as part of both a command-line
+dnl * option and a variable name, it MUST consist of only alphanumeric
+dnl * characters.  PACKAGE-NAME is only a label, so it need not conform to
+dnl * any existing directory or file name.  I would recommend that it be
+dnl * all caps, as it becomes part of the name of a variable that is
+dnl * substituted into the Makefile.
+dnl **********************************************************************
+
+AC_DEFUN([CASC_CREATE_PACKAGE_OPTION],
+[
+   AC_MSG_CHECKING([for $1 directory])
+
+   dnl * $1 stands for the PACKAGE-NAME.  If [$1]_DIR has been set in the
+   dnl * environment, give its value to casc_env_[$1]_dir, and clear
+   dnl * [$1]_DIR.  The environmental value will ultimately be reassigned
+   dnl * to [$1]_DIR if it is valid and no command-line options are able
+   dnl * to change [$1]_DIR to a valid directory.  The environmental value
+   dnl * will also be used even if it is invalid, if the command-line
+   dnl * options and the DIRECTORY-LIST are both unable to generate a
+   dnl * valid value.
+   casc_result=
+   casc_env_[$1]_dir=$[$1]_DIR
+   [$1]_DIR=
+
+   AC_ARG_WITH($1-dir, 
+[  --with-$1-dir=DIR    $1 is installed in directory DIR
+  --without-$1-dir     do not look for $1],
+
+               if test "$withval" = "no"; then
+                  casc_result="configuring without [$1]"
+                  [$1]_DIR=
+               fi
+               , )
+
+   dnl * If "--without-$1-dir" was given, then [$1]_DIR is left blank.
+   dnl * Otherwise there is the following procedure to try to give
+   dnl * [$1]_DIR a valid value:
+   dnl *
+   dnl * if "--with-$1-dir" was given
+   dnl *    if the argument to "--with-$1-dir" is valid
+   dnl *       assign the argument to [$1]_DIR
+   dnl *    endif
+   dnl * endif
+   dnl *
+   dnl * if a value for [$1]_DIR has not yet been found
+   dnl *    if [$1]_DIR from the environment exists and is valid
+   dnl *       assign the environmental value to [$1]_DIR
+   dnl *    endif
+   dnl * endif
+   dnl *
+   dnl * if [$1]_DIR still has no value
+   dnl *    if the macro was given a DIRECTORY-LIST argument
+   dnl *       for each directory in the list
+   dnl *          if the directory is valid
+   dnl *             assign the directory to [$1]_DIR
+   dnl *             break loop
+   dnl *          else
+   dnl *             continue loop
+   dnl *          endif
+   dnl *       end loop
+   dnl *       if [$1]_DIR still doesn't have a value
+   dnl *          casc_result="none"
+   dnl *       else
+   dnl *          casc_result=$[$1]_DIR
+   dnl *       endif
+   dnl *    else
+   dnl *       casc_result="none"
+   dnl *    endif
+   dnl * endif
+
+   if test "$with_[$1]_dir" != "no"; then
+
+      if test -d "$with_[$1]_dir"; then
+
+         ifelse([$3], , ,
+            if test -f $with_[$1]_dir/[$3]; then)
+
+               casc_result="$with_[$1]_dir"
+               [$1]_DIR="$casc_result"
+
+         ifelse([$3], , ,
+            fi)
+      fi
+
+      if test -z "$casc_result"; then
+
+         if test -d "$casc_env_[$1]_dir"; then
+
+            ifelse([$3], , ,
+               if test -f $casc_env_[$1]_dir/[$3]; then)
+
+                  casc_result="$casc_env_[$1]_dir"
+                  [$1]_DIR="$casc_result"
+
+            ifelse([$3], , ,
+               fi)
+         fi
+      fi
+
+
+
+      if test -z "$casc_result"; then
+         [$1]_DIR=
+   
+         ifelse([$2], ,
+            casc_result="none" ,
+
+            for casc_dir in $2; do
+
+               if test -d "$casc_dir"; then
+
+                  ifelse([$3], , ,
+                     if test -f $casc_dir/[$3]; then)
+
+                        $1_DIR=$casc_dir
+
+                        break
+
+                  ifelse([$3], , ,
+                     fi)
+               fi
+            done
+
+            if test -z "$[$1]_DIR"; then
+               casc_result="none"
+
+            else
+               casc_result="$[$1]_DIR"
+            fi
+         )
+      fi
+   fi
+
+   dnl * $casc_result either is a valid value for [$1]_DIR or "none".
+   dnl * if none, then assign the original environmental value of
+   dnl * [$1]_DIR, whatever it may be, to casc_result and [$1]_DIR.  If
+   dnl * there was no environmental value, then $casc_result remains
+   dnl * "none" and [$1]_DIR is left empty.
+
+   if test "$casc_result" = "none"; then
+
+      if test -n "$casc_env_[$1]_dir"; then
+
+         casc_result="$casc_env_[$1]_dir"
+         [$1]_DIR="$casc_result"
+      fi
+   fi
+
+   AC_MSG_RESULT($casc_result)
+   AC_SUBST([$1]_DIR)
+])
+
+
+dnl smr_ARG_WITHLIB from FVWM by S. Robbins 
+dnl Allow argument for optional libraries; wraps AC_ARG_WITH, to
+dnl provide a "--with-foo-lib" option in the configure script, where foo
+dnl is presumed to be a library name.  The argument given by the user
+dnl (i.e. "bar" in ./configure --with-foo-lib=bar) may be one of four 
+dnl things:
+dnl     * boolean (no, yes or blank): whether to use library or not
+dnl     * file: assumed to be the name of the library
+dnl     * directory: assumed to *contain* the library
+dnl     * a quoted, space-separated list of linker flags needed to link
+dnl       with this library.  (To be used if this library requires
+dnl       linker flags other than the normal `-L' and `-l' flags.)
+dnl 
+dnl The argument is sanity-checked.  If all is well, two variables are
+dnl set: "with_foo" (value is yes, no, or maybe), and "foo_LIBFLAGS" (value
+dnl is either blank, a file, -lfoo, '-L/some/dir -lfoo', or whatever 
+dnl linker flags the user gives). The idea is: the first tells you whether
+dnl the library is to be used or not (or the user didn't specify one way
+dnl or the other) and the second to put on the command line for linking
+dnl with the library.
+dnl
+dnl Usage:
+dnl smr_ARG_WITHLIB(name, libname, description)
+dnl 
+dnl name                name for --with argument ("foo" for libfoo)
+dnl libname             (optional) actual name of library,
+dnl                     if different from name
+dnl description         (optional) used to construct help string
+dnl 
+dnl Changes:  Changed some identifier names.
+dnl           --with-foo-library is now --with-foo-lib
+dnl           foo_LIBS is now foo_LIBFLAGS
+dnl           Fourth posibility for argument to --with-foo-lib added
+dnl           Documentation above changed to reflect these changes
+dnl           Noah Elliott, October 1998
+
+
+AC_DEFUN([CASC_SMR_ARG_WITHLIB],
+[
+   smr_ARG_WITHLIB([$1],[$2],[$3])
+])dnl
+
+AC_DEFUN([smr_ARG_WITHLIB], [
+
+ifelse($2, , smr_lib=[$1], smr_lib=[$2]) 
+    
+AC_ARG_WITH([$1]-lib,
+ifelse($3, ,
+[  --with-$1-lib[=PATH]       use $1 library], 
+[  --with-$1-lib[=PATH]       use $1 library ($3)]),
+[
+    if test "$withval" = yes; then
+        with_[$1]=yes
+        [$1]_LIBFLAGS="-l${smr_lib}"
+    elif test "$withval" = no; then
+        with_[$1]=no
+        [$1]_LIBFLAGS=
+    else
+        with_[$1]=yes
+        if test -f "$withval"; then
+            [$1]_LIBFLAGS=$withval
+        elif test -d "$withval"; then
+            [$1]_LIBFLAGS="-L$withval -l${smr_lib}"
+        else
+            case $withval in
+            -*)
+               [$1]_LIBFLAGS="$withval"
+            ;;
+            *)
+               AC_MSG_ERROR(
+                  [argument must be boolean, file, directory, or compiler flags]
+                           )
+            ;;
+            esac
+        fi
+    fi
+], [
+    with_[$1]=maybe
+    [$1]_LIBFLAGS="-l${smr_lib}"
+])])
+
+    
+dnl smr_ARG_WITHINCLUDES from FVWM by S. Robbins
+dnl Check if the include files for a library are accessible, and
+dnl define the variable "name_INCLUDE" with the proper "-I" flag for
+dnl the compiler.  The user has a chance to specify the includes
+dnl location, using "--with-foo-include".
+dnl 
+dnl This should be used *after* smr_ARG_WITHLIB *and* AC_CHECK_LIB are
+dnl successful.
+dnl 
+dnl Usage:
+dnl smr_ARG_WITHINCLUDES(name, header, extra-flags)
+dnl 
+dnl name                library name, MUST same as used with smr_ARG_WITHLIB
+dnl header              a header file required for using the lib
+dnl extra-flags         (optional) flags required when compiling the
+dnl                     header, typically more includes; for ex. X_CFLAGS
+dnl
+dnl Changes:  Changed some identifier names.
+dnl           --with-foo-includes is now --with-foo-include
+dnl           name_CFLAGS is now name_INCLUDE
+dnl           Documentation above changed to reflect these changes
+dnl           Noah Elliott, October 1998
+
+AC_DEFUN([CASC_SMR_ARG_WITHINCLUDES],
+[
+   smr_ARG_WITHINCLUDES([$1], [$2], [$3])
+])dnl
+
+AC_DEFUN([smr_ARG_WITHINCLUDES], [
+
+AC_ARG_WITH([$1]-include,
+[  --with-$1-include=DIR  set directory for $1 headers],
+[
+    if test -d "$withval"; then
+        [$1]_INCLUDE="-I${withval}"
+    else
+        AC_MSG_ERROR(argument must be a directory)
+    fi])
+
+dnl This bit of logic comes from autoconf's AC_PROG_CC macro.  We need
+dnl to put the given include directory into CPPFLAGS temporarily, but
+dnl then restore CPPFLAGS to its old value.
+dnl 
+smr_test_CPPFLAGS="${CPPFLAGS+set}"
+smr_save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS ${[$1]_CFLAGS}"
+
+    ifelse($3, , , CPPFLAGS="$CPPFLAGS [$3]")
+    AC_CHECK_HEADERS($2)
+   
+if test "$smr_test_CPPFLAGS" = set; then
+    CPPFLAGS=$smr_save_CPPFLAGS
+else
+    unset CPPFLAGS
+fi
+])
+    
+        
+dnl smr_CHECK_LIB from FVWM by S. Robbins
+dnl Probe for an optional library.  This macro creates both
+dnl --with-foo-lib and --with-foo-include options for the configure
+dnl script.  If --with-foo-lib is *not* specified, the default is to
+dnl probe for the library, and use it if found.
+dnl
+dnl Usage:
+dnl smr_CHECK_LIB(name, libname, desc, func, header, x-libs, x-flags)
+dnl 
+dnl name        name for --with options
+dnl libname     (optional) real name of library, if different from
+dnl             above
+dnl desc        (optional) short descr. of library, for help string
+dnl func        function of library, to probe for
+dnl header      (optional) header required for using library
+dnl x-libs      (optional) extra libraries, if needed to link with lib
+dnl x-flags     (optional) extra flags, if needed to include header files
+dnl
+dnl Changes:  identifier names and documentation modified to reflect
+dnl           changes to smr_ARG_WITHLIB and smr_ARG_WITHINCLUDES
+dnl           Noah Elliott, October 1998
+
+AC_DEFUN([CASC_SMR_CHECK_LIB],
+[
+   smr_CHECK_LIB([$1], [$2], [$3], [$4], [$5], [$6], [$7])
+])dnl
+
+AC_DEFUN([smr_CHECK_LIB],
+[   
+ifelse($2, , smr_lib=[$1], smr_lib=[$2])
+ifelse($5, , , smr_header=[$5])
+smr_ARG_WITHLIB($1,$2,$3)
+if test "$with_$1" != no; then
+    AC_CHECK_LIB($smr_lib, $4,
+        smr_havelib=yes, smr_havelib=no,
+        ifelse($6, , ${$1_LIBFLAGS}, [${$1_LIBFLAGS} $6]))
+    if test "$smr_havelib" = yes -a "$smr_header" != ""; then
+        smr_ARG_WITHINCLUDES($1, $smr_header, $7)
+        smr_safe=`echo "$smr_header" | sed 'y%./+-%__p_%'`
+        if eval "test \"`echo '$ac_cv_header_'$smr_safe`\" != yes"; then
+            smr_havelib=no
+        fi
+    fi
+    if test "$smr_havelib" = yes; then
+        AC_MSG_RESULT(Using $1 library)
+    else
+        $1_LIBFLAGS=
+        $1_INCLUDE=
+        if test "$with_$1" = maybe; then
+            AC_MSG_RESULT(Not using $1 library)
+        else
+            AC_MSG_WARN(Requested $1 library not found!)
+        fi
+    fi
+fi])
+
+
+dnl **********************************************************************
+dnl * CASC_CONFIG_OUTPUT_LIST(DIR-LIST[, OUTPUT-FILE])
+dnl *
+dnl * The intent of this macro is to make configure handle the possibility
+dnl * that a portion of the directory tree of a project may not be
+dnl * present.  This will modify the argument list of AC_OUTPUT to contain
+dnl * only output file names for which corresponding input files exist.
+dnl * If you are not concerned about the possible absence of the necessary
+dnl * input (.in) files, it is better to not use this macro and to
+dnl * explicitly list all of the output files in a call to AC_OUTPUT.
+dnl * Also, If you wish to create a file Foo from a file with a name
+dnl * other than Foo.in, this macro will not work, and you must use
+dnl * AC_OUTPUT.
+dnl *
+dnl * This macro checks for the existence of the file OUTPUT-FILE.in in
+dnl * each directory specified in the whitespace-separated DIR-LIST.  
+dnl * (Directories should be specified by relative path from the directory 
+dnl * containing configure.in.) If OUTPUT-FILE is not specified, the
+dnl * default is 'Makefile'.  For each directory that contains 
+dnl * OUTPUT-FILE.in, the relative path of OUTPUT-FILE is added to the 
+dnl * shell variable OUTPUT-FILE_list.  When AC_OUTPUT is called,
+dnl * '$OUTPUT-FILE_list' should be included in the argument list.  So if
+dnl * you have a directory tree and each subdirectory contains a 
+dnl * Makefile.in, DIR-LIST should be a list of every subdirectory and
+dnl * OUTPUT-FILE can be omitted, because 'Makefile' is the default.  When
+dnl * configure runs, it will check for the existence of a Makefile.in in
+dnl * each directory in DIR-LIST, and if so, the relative path of each
+dnl * intended Makefile will be added to the variable Makefile_list.
+dnl *
+dnl * This macro can be called multiple times, if there are files other
+dnl * than Makefile.in with a .in suffix other that are intended to be 
+dnl * processed by configure. 
+dnl *
+dnl * Example
+dnl *     If directories dir1 and dir2 both contain a file named Foo.in, 
+dnl *     and you wish to use configure to create a file named Foo in each
+dnl *     directory, then call 
+dnl *     CASC_CONFIG_OUTPUT_LIST(dir1 dir2, Foo)
+dnl *     If you also called this macro for Makefile as described above,
+dnl *     you should call
+dnl *     AC_OUTPUT($Makefile_list $Foo_list)
+dnl *     at the end of configure.in .
+dnl *********************************************************************
+
+
+AC_DEFUN([CASC_CONFIG_OUTPUT_LIST],
+[
+   dnl * m_OUTPUT_LIST is a macro to store the name of the variable
+   dnl * which will contain the list of output files
+   define([m_OUTPUT_LIST], ifelse([$2], , Makefile_list, [$2_list]))
+
+   if test -z "$srcdir"; then
+      srcdir=.
+   fi
+
+   dnl * use "Makefile" if second argument not given
+   if test -n "$2"; then
+      casc_output_file=$2
+   else   
+      casc_output_file=Makefile
+   fi   
+      
+   dnl * Add a file to the output list if its ".in" file exists.
+   for casc_dir in $1; do
+      if test -f $srcdir/$casc_dir/$casc_output_file.in; then
+         m_OUTPUT_LIST="$m_OUTPUT_LIST $casc_dir/$casc_output_file"
+      fi
+   done
+])dnl
+
+
+dnl **********************************************************************
+dnl * CASC_GUESS_ARCH
+dnl * Guesses a one-word name for the current architecture, unless ARCH
+dnl * has been preset.  This is an alternative to the built-in macro
+dnl * AC_CANONICAL_HOST, which gives a three-word name.  Uses the utility
+dnl * 'tarch', which is a Bourne shell script that should be in the same  
+dnl * directory as the configure script.  If tarch is not present or if it
+dnl * fails, ARCH is set to the value, if any, of shell variable HOSTTYPE,
+dnl * otherwise ARCH is set to "unknown".
+dnl **********************************************************************
+
+AC_DEFUN([CASC_GUESS_ARCH],
+[
+   AC_MSG_CHECKING(the architecture)
+
+   dnl * $ARCH could already be set in the environment or earlier in configure
+   dnl * Use the preset value if it exists, otherwise go throug the procedure
+   if test -z "$ARCH"; then
+
+      dnl * configure searches for the tool "tarch".  It should be in the
+      dnl * same directory as configure.in, but a couple of other places
+      dnl * will be checked.  casc_tarch stores a relative path for "tarch".
+      casc_tarch_dir=
+      for casc_dir in $srcdir $srcdir/.. $srcdir/../.. $srcdir/config; do
+         if test -f $casc_dir/tarch; then
+            casc_tarch_dir=$casc_dir
+            casc_tarch=$casc_tarch_dir/tarch
+            break
+         fi
+      done
+
+      dnl * if tarch was not found or doesn't work, try using env variable
+      dnl * $HOSTTYPE
+      if test -z "$casc_tarch_dir"; then
+         AC_MSG_WARN(cannot find tarch, using \$HOSTTYPE as the architecture)
+         ARCH=$HOSTTYPE
+      else
+         ARCH="`$casc_tarch`"
+
+         if test -z "$ARCH" || test "$ARCH" = "unknown"; then
+            ARCH=$HOSTTYPE
+         fi
+      fi
+
+      dnl * if $ARCH is still empty, give it the value "unknown".
+      if test -z "$ARCH"; then
+         ARCH=unknown
+         AC_MSG_WARN(architecture is unknown)
+      else
+         AC_MSG_RESULT($ARCH)
+      fi    
+   else
+      AC_MSG_RESULT($ARCH)
+   fi
+
+   AC_SUBST(ARCH)
+
+])dnl
+
+
+dnl **********************************************************************
+dnl * CASC_SET_SUFFIX_RULES is not like the other macros in aclocal.m4
+dnl * because it does not run any kind of test on the system on which it
+dnl * is running.  All it does is create several variables which contain
+dnl * the text of some simple implicit suffix rules that can be
+dnl * substituted into Makefile.in.  The suffix rules that come from the
+dnl * macro all deal with compiling a source file into an object file.  If
+dnl * this macro is called in configure.in, then if `@CRULE@' is placed in
+dnl * Makefile.in, the following will appear in the generated Makefile:
+dnl *
+dnl * .c.o:
+dnl *         @echo "Making (c) " $@ 
+dnl *         @${CC} -o $@ -c ${CFLAGS} $<	
+dnl *
+dnl * The following is a list of the variables created by this macro and
+dnl * the corresponding suffixes of the files that each implicit rule 
+dnl * deals with.
+dnl *
+dnl * CRULE       --   .c
+dnl * CXXRULE     --   .cxx
+dnl * CPPRULE     --   .cpp
+dnl * CCRULE      --   .cc
+dnl * CAPCRULE    --   .C
+dnl * F77RULE     --   .f
+dnl *
+dnl * There are four suffix rules for C++ files because of the different
+dnl * suffixes that can be used for C++.  Only use the one which
+dnl * corresponds to the suffix you use for your C++ files.
+dnl *
+dnl * The rules created by this macro require you to use the following
+dnl * conventions for Makefile variables:
+dnl *
+dnl * CC        = C compiler
+dnl * CXX       = C++ compiler
+dnl * F77       = Fortran 77 compiler
+dnl * CFLAGS    = C compiler flags
+dnl * CXXFLAGS  = C++ compiler flags
+dnl * FFLAGS    = Fortran 77 compiler flags
+dnl **********************************************************************
+
+AC_DEFUN([CASC_SET_SUFFIX_RULES],
+[
+   dnl * Things weren't working whenever "$@" showed up in the script, so
+   dnl * I made the symbol $at_sign to signify '@'
+   at_sign=@
+
+   dnl * All of the backslashes are used to handle the $'s and the
+   dnl * newlines which get passed through echo and sed.
+
+   CRULE=`echo ".c.o:\\\\
+\t at echo \"Making (c) \" \\$$at_sign \\\\
+\t@\\${CC} -o \\$$at_sign -c \\${CFLAGS} \$<"`
+
+   AC_SUBST(CRULE)
+
+   CXXRULE=`echo ".cxx.o:\\\\
+\t at echo \"Making (c++) \" \\$$at_sign \\\\
+\t@\\${CXX} -o \\$$at_sign -c \\${CXXFLAGS} \$<"`
+
+   AC_SUBST(CXXRULE)
+
+   CPPRULE=`echo ".cpp.o:\\\\
+\t at echo \"Making (c++) \" \\$$at_sign \\\\
+\t@\\${CXX} -o \\$$at_sign -c \\${CXXFLAGS} \$<"`
+
+   AC_SUBST(CPPRULE)
+
+   CCRULE=`echo ".cc.o:\\\\
+\t at echo \"Making (c++) \" \\$$at_sign \\\\
+\t@\\${CXX} -o \\$$at_sign -c \\${CXXFLAGS} \$<"`
+
+   AC_SUBST(CCRULE)
+
+   CAPCRULE=`echo ".C.o:\\\\
+\t at echo \"Making (c++) \" \\$$at_sign \\\\
+\t@\\${CXX} -o \\$$at_sign -c \\${CXXFLAGS} \$<"`
+
+   AC_SUBST(CAPCRULE)
+
+   F77RULE=`echo ".f.o:\\\\
+\t at echo \"Making (f) \" \\$$at_sign \\\\
+\t@\\${F77} -o \\$$at_sign -c \\${FFLAGS} \$<"`
+
+   AC_SUBST(F77RULE)
+
+])
+
+dnl Macro to save compiler state flags for invoking dnl compiler tests
+dnl NOTE that this is NOT currently a stack so can dnl only be called
+dnl in push/pop order.  push push pop pop dnl will fail
+AC_DEFUN([CASC_PUSH_COMPILER_STATE],[
+   casc_save_LIBS=$LIBS
+   casc_save_CXXFLAGS=$CXXFLAGS
+])
+
+dnl Macro to restore compiler state flags for invoking
+dnl compiler tests
+AC_DEFUN([CASC_POP_COMPILER_STATE],[
+   LIBS=$casc_save_LIBS
+   unset casc_save_LIBS
+   CXXFLAGS=$casc_save_CXXFLAGS
+   unset casc_save_CXXFLAGS
+])
+
+dnl ********************************************************************
+dnl * CASC_PROG_MPICC searches the PATH for an available MPI C compiler
+dnl * wraparound.  It assigns the name to MPICC.
+dnl ********************************************************************
+
+AC_DEFUN([CASC_PROG_MPICC],
+[
+   AC_CHECK_PROGS(MPICC, mpcc mpicc tmcc hcc)
+   test -z "$MPICC" && AC_MSG_ERROR([no acceptable mpicc found in \$PATH])
+])dnl
+
+
+dnl ********************************************************************
+dnl * CASC_PROG_MPICXX searches the PATH for an available MPI C++
+dnl * compiler wraparound.  It assigns the name to MPICXX.
+dnl ********************************************************************
+
+AC_DEFUN([CASC_PROG_MPICXX],
+[
+   AC_CHECK_PROGS(MPICXX, mpKCC mpCC mpig++ mpiCC hcp)
+   test -z "$MPICXX" && AC_MSG_ERROR([no acceptable mpic++ found in \$PATH])
+])dnl
+
+
+dnl **********************************************************************
+dnl * CASC_PROG_MPIF77 searches the PATH for an available MPI Fortran 77
+dnl * compiler wraparound.  It assigns the name to MPIF77.
+dnl **********************************************************************
+
+AC_DEFUN([CASC_PROG_MPIF77],
+[
+   AC_CHECK_PROGS(MPIF77, mpf77 mpxlf mpif77 mpixlf tmf77 hf77)
+   test -z "$MPIF77" && AC_MSG_ERROR([no acceptable mpif77 found in \$PATH])
+])dnl
+
+
+dnl ***********************************************************************
+dnl * CASC_CHECK_MPIF77_PP checks whether the preprocessor needs to
+dnl * be called before calling the compiler for Fortran files with
+dnl * preprocessor directives and MPI function calls.  If the preprocessor
+dnl * is necessary, MPIF77NEEDSPP is set to "yes", otherwise it is set to
+dnl * "no"
+dnl ***********************************************************************
+
+AC_DEFUN([CASC_CHECK_MPIF77_PP],
+[
+   AC_REQUIRE([CASC_PROG_MPIF77])
+
+   rm -f testppmp.o
+
+   AC_MSG_CHECKING(whether $FPP needs to be called before $MPIF77)
+
+   # This follows the same procedur as CASC_CHECK_F77_PP, except it tests
+   # $MPIF77 using a test program that includes MPI functions.
+
+   cat > testppmp.F <<EOF
+#define FOO 3
+	program testppmp
+	include 'mpif.h'
+	integer rank,size,mpierr,sum
+	call MPI_INIT(mpierr)
+	call MPI_COMM_SIZE(MPI_COMM_WORLD,size,mpierr)
+	call MPI_COMM_RANK(MPI_COMM_WORLD,rank,mpierr)
+#ifdef FORTRAN_NO_UNDERSCORE
+        sum = rank + size
+#else
+        sum = rank + rank
+#endif
+        call MPI_FINALIZE(mpierr)
+        end
+EOF
+
+   $MPIF77 -DBAR -c testppmp.F
+   if test -f testppmp.o; then
+      MPIF77NEEDSPP=no
+   else
+      MPIF77NEEDSPP=yes
+   fi
+
+   echo $MPIF77NEEDSPP
+   rm -f testppmp.o testppmp.F
+   AC_SUBST(MPIF77NEEDSPP)
+])dnl
+
+
+dnl *********************************************************************
+dnl * CASC_SET_MPI sets up the needed MPI library and directory flags.
+dnl * The location of the file mpi.h is put into the variable MPIINCLUDE
+dnl * as a -I flag.  The -l flags that specify the needed libraries and
+dnl * the -L flags that specify the paths of those libraries are placed in
+dnl * the variables MPILIBS and MPILIBDIRS, respectively.  To set the MPI
+dnl * libraries and directories manually, use the --with-mpi-include,
+dnl * --with-mpi-libs, and --with-mpi-lib-dirs command-line options when
+dnl * invoking configure.  Only one directory should be specified with
+dnl * --with-mpi-include, while any number of directories can be specified
+dnl * by --with-mpi-lib-dirs.  Any number of libraries can be specified
+dnl * with --with-mpi-libs, and the libraries must be referred to by their
+dnl * base names, so libmpi.a is just mpi.  It is adviseable to use all
+dnl * three --with flags whenever one is used, because it is likely that
+dnl * when one is chosen it will mess up the automatic choices for the
+dnl * other two.  If the architecture is unknown, or if the needed MPI
+dnl * settings for the current architecture are not known, then the naive
+dnl * settings of MPILIBS="-lmpi" and MPILIBDIRS="-L/usr/local/mpi/lib"
+dnl * are tested, and if they exist they are used, otherwise the MPILIB*
+dnl * variables are left blank.  In the case of rs6000, the variable
+dnl * MPIFLAGS is also set.
+dnl **********************************************************************
+
+AC_DEFUN([CASC_SET_MPI],
+        [
+
+   dnl * If called from within CASC_FIND_MPI, then the configure-line
+   dnl * options will already exist.  This ifdef creates them otherwise.
+   ifdef([AC_PROVIDE_CASC_FIND_MPI], ,
+      [AC_ARG_WITH(mpi-include, [  --with-mpi-include=DIR  mpi.h is in DIR],
+                  casc_mpi_include_dir=$withval)
+
+      AC_ARG_WITH(mpi-libs,
+[  --with-mpi-libs=LIBS    LIBS is space-separated list of library names
+                          needed for MPI, e.g. \"nsl socket mpi\"],
+                  casc_mpi_libs=$withval)
+
+      AC_ARG_WITH(mpi-lib-dirs,
+[  --with-mpi-lib-dirs=DIRS
+                          DIRS is space-separated list of directories
+                          containing the libraries specified by
+                          \`--with-mpi-libs', e.g \"/usr/lib /usr/local/mpi/lib\"],
+                  casc_mpi_lib_dirs=$withval)]
+   )
+
+   if test -z "$casc_mpi_libs"; then
+      AC_REQUIRE([CASC_GUESS_ARCH])
+
+      dnl * Set everything to known values
+      case $ARCH in
+
+         sun4 | solaris)
+            case $F77 in
+               *g77)
+                   if test -z "$casc_mpi_include_dir"; then
+                      casc_mpi_include_dir=/usr/local/mpi/lam/h
+                   fi
+
+                   if test -z "$casc_mpi_lib_dirs"; then
+                      casc_mpi_lib_dirs="/usr/local/mpi/lam/lib"
+                   fi
+
+                   casc_mpi_libs="socket mpi trillium args tstdio t";;
+
+               *)
+
+                  if test -z "$casc_mpi_include_dir"; then
+                     MPIINCLUDE="-I/usr/local/mpi/mpich/include \
+                                 -I/usr/local/mpi/mpich/lib/solaris/ch_p4"
+                  fi
+
+                  if test -z "$casc_mpi_lib_dirs"; then
+                     casc_mpi_lib_dirs="/usr/local/mpi/mpich/lib/solaris/ch_p4 \
+                                       /usr/lib"
+                  fi
+
+               casc_mpi_libs="nsl socket mpi";;
+               esac
+
+            if test -z "$MPIINCLUDE"; then
+               AC_CHECK_HEADER($casc_mpi_include_dir/mpi.h,
+                               MPIINCLUDE="-I$casc_mpi_include_dir")
+            fi
+         ;;
+
+         alpha)
+            if test -z "$casc_mpi_include_dir"; then
+               casc_mpi_include_dir=/usr/local/mpi/include
+            fi
+            AC_CHECK_HEADER($casc_mpi_include_dir/mpi.h,
+                               MPIINCLUDE="-I$casc_mpi_include_dir")
+
+            if test -z "$casc_mpi_lib_dirs"; then
+               casc_mpi_lib_dirs="/usr/local/mpi/lib/alpha/ch_shmem \
+                                  /usr/local/lib"
+            fi
+
+            casc_mpi_libs="mpich gs";;
+
+         rs6000)
+
+dnl            if test -z "$casc_mpi_include_dir"; then
+dnl               casc_mpi_include_dir=/usr/lpp/ppe.poe/include
+dnl            fi
+dnl            AC_CHECK_HEADER($casc_mpi_include_dir/mpi.h,
+dnl                               MPIINCLUDE="-I$casc_mpi_include_dir")
+
+dnl            if test -z "$casc_mpi_lib_dirs"; then
+dnl               casc_mpi_lib_dirs=/usr/lpp/ppe.poe/lib
+dnl            fi
+
+            casc_mpi_libs=mpi
+
+            MPIFLAGS="-binitfini:poe_remote_main";;
+
+         IRIX64 | iris4d)
+            if test -z "$casc_mpi_include_dir"; then
+               casc_mpi_include_dir=/usr/local/mpi/include
+            fi
+            AC_CHECK_HEADER($casc_mpi_include_dir/mpi.h,
+                               MPIINCLUDE="-I$casc_mpi_include_dir")
+
+            if test -z "$casc_mpi_lib_dirs"; then
+               casc_mpi_lib_dirs=/usr/local/mpi/lib/IRIX64/ch_p4
+            fi
+
+            casc_mpi_libs=mpi;;
+
+         *)
+AC_MSG_WARN([trying naive MPI settings - can use --with flags to change])
+            if test -z "$casc_mpi_include_dir"; then
+               casc_mpi_include_dir=/usr/local/mpi/include
+            fi
+            AC_CHECK_HEADER($casc_mpi_include_dir/mpi.h,
+                               MPIINCLUDE="-I$casc_mpi_include_dir")
+
+            if test -z "$casc_mpi_lib_dirs"; then
+               casc_mpi_lib_dirs=/usr/local/mpi/lib
+            fi
+            casc_mpi_libs=mpi ;;
+      esac
+
+      for casc_lib in $casc_mpi_libs; do
+         CASC_ADD_LIB($casc_lib, main, $casc_mpi_lib_dirs, MPI)
+      done
+
+   else
+      if test -n "$casc_mpi_include_dir"; then
+         MPIINCLUDE="-I$casc_mpi_include_dir"
+      else
+         MPIINCLUDE=
+      fi
+
+      if test -n "$casc_mpi_lib_dirs"; then
+         for casc_lib_dir in $casc_mpi_lib_dirs; do
+            MPILIBDIRS="-L$casc_lib_dir $MPILIBDIRS"
+         done
+      else
+         MPILIBDIRS=
+      fi
+
+      for casc_lib in $casc_mpi_libs; do
+         MPILIBS="$MPILIBS -l$casc_lib"
+      done
+   fi
+])dnl
+
+
+dnl ********************************************************************
+dnl * CASC_FIND_MPI will determine the libraries, directories, and other
+dnl * flags needed to compile and link programs with MPI function calls.
+dnl * This macro runs tests on the script found by the CASC_PROG_MPICC
+dnl * macro.  If there is no such mpicc-type script in the PATH and
+dnl * MPICC is not set manually, then this macro will not work.
+dnl *
+dnl * One may question why these settings would need to be determined if
+dnl * there already is mpicc available, and that is a valid question.  I
+dnl * can think of a couple of reasons one may want to use these settings
+dnl * rather than using mpicc directly.  First, these settings allow you
+dnl * to choose the C compiler you wish to use rather than using whatever
+dnl * compiler is written into mpicc.  Also, the settings determined by
+dnl * this macro should also work with C++ and Fortran compilers, so you
+dnl * won't need to have mpiCC and mpif77 alongside mpicc.  This is
+dnl * especially helpful on systems that don't have mpiCC.  The advantage
+dnl * of this macro over CASC_SET_MPI is that this one doesn't require
+dnl * a test of the machine type and thus will hopefully work on unknown
+dnl * architectures.  The main disadvantage is that it relies on mpicc.
+dnl *
+dnl * --with-mpi-include, --with-mpi-libs, and --with-mpi-lib-dirs can be
+dnl * used to manually override the automatic test, just as with
+dnl * CASC_SET_MPI.  If any one of these three options are used, the
+dnl * automatic test will not be run, so it is best to call all three
+dnl * whenever one is called.  In addition, the option --with-mpi-flags is
+dnl * available here to set any other flags that may be needed, but it
+dnl * does not override the automatic test.  Flags set by --with-mpi-flags
+dnl * will be added to the variable MPIFLAGS.  This way, if the macro, for
+dnl * whatever reason, leaves off a necessary flag, the flag can be added
+dnl * to MPIFLAGS without eliminating anything else.  The other variables
+dnl * set are MPIINCLUDE, MPILIBS, and MPILIBDIRS, just as in
+dnl * CASC_SET_MPI.  This macro also incorporates CASC_SET_MPI as a backup
+dnl * plan, where if there is no mpicc, it will use the settings
+dnl * determined by architecture name in CASC_SET_MPI
+dnl ********************************************************************
+
+AC_DEFUN([CASC_FIND_MPI],
+[
+
+   casc_find_mpi_cache_used=yes
+
+   AC_CACHE_VAL(casc_cv_mpi_include, casc_find_mpi_cache_used=no)
+   AC_CACHE_VAL(casc_cv_mpi_libs, casc_find_mpi_cache_used=no)
+   AC_CACHE_VAL(casc_cv_mpi_lib_dirs, casc_find_mpi_cache_used=no)
+   AC_CACHE_VAL(casc_cv_mpi_flags, casc_find_mpi_cache_used=no)
+
+   if test "$casc_find_mpi_cache_used" = "yes"; then
+      AC_MSG_CHECKING(for location of mpi.h)
+      MPIINCLUDE=$casc_cv_mpi_include
+      AC_MSG_RESULT("\(cached\) $MPIINCLUDE")
+
+      AC_MSG_CHECKING(for MPI library directories)
+      MPILIBDIRS=$casc_cv_mpi_lib_dirs
+      AC_MSG_RESULT("\(cached\) $MPILIBDIRS")
+
+      AC_MSG_CHECKING(for MPI libraries)
+      MPILIBS=$casc_cv_mpi_libs
+      AC_MSG_RESULT("\(cached\) $MPILIBS")
+
+      AC_MSG_CHECKING(for other MPI-related flags)
+      MPIFLAGS=$casc_cv_mpi_flags
+      AC_MSG_RESULT("\(cached\) $MPIFLAGS")
+   else
+
+
+      dnl * Set up user options.  If user uses any of the fist three options,
+      dnl * then automatic tests are not run.
+
+      casc_user_chose_mpi=no
+      AC_ARG_WITH(mpi-include, [  --with-mpi-include=DIR  mpi.h is in DIR],
+                  for mpi_dir in $withval; do
+                     MPIINCLUDE="$MPIINCLUDE -I$withval"
+                  done; casc_user_chose_mpi=yes)
+
+      AC_ARG_WITH(mpi-libs,
+[  --with-mpi-libs=LIBS    LIBS is space-separated list of library names
+                          needed for MPI, e.g. \"nsl socket mpi\"],
+                  for mpi_lib in $withval; do
+                     MPILIBS="$MPILIBS -l$mpi_lib"
+                  done; casc_user_chose_mpi=yes)
+
+
+      AC_ARG_WITH(mpi-lib-dirs,
+[  --with-mpi-lib-dirs=DIRS
+                          DIRS is space-separated list of directories
+                          containing the libraries specified by
+                          \`--with-mpi-libs', e.g \"/usr/lib /usr/local/mpi/lib\"],
+                  for mpi_lib_dir in $withval; do
+                     MPILIBDIRS="-L$mpi_lib_dir $MPILIBDIRS"
+                  done; casc_user_chose_mpi=yes)
+
+      dnl * --with-mpi-flags only adds to automatic selections,
+      dnl * does not override
+
+      AC_ARG_WITH(mpi-flags,
+[  --with-mpi-flags=FLAGS  FLAGS is space-separated list of whatever flags other
+                          than -l and -L are needed to link with mpi libraries],
+                          MPIFLAGS=$withval)
+
+
+      if test "$casc_user_chose_mpi" = "no"; then
+
+      dnl * Find an MPICC.  If there is none, call CASC_SET_MPI to choose MPI
+      dnl * settings based on architecture name.  If CASC_SET_MPI fails,
+      dnl * print warning message.  Manual MPI settings must be used.
+
+         AC_ARG_WITH(MPICC,
+[  --with-MPICC=ARG        ARG is mpicc or similar MPI C compiling tool],
+            MPICC=$withval,
+            [AC_CHECK_PROGS(MPICC, mpcc mpicc tmcc hcc)])
+
+         if test -z "$MPICC"; then
+            AC_MSG_WARN([no acceptable mpicc found in \$PATH])
+            CASC_SET_MPI
+            if test -z "$MPILIBS"; then
+             AC_MSG_WARN([MPI not found - must set manually using --with flags])
+            fi
+
+         dnl * When $MPICC is there, run the automatic test
+         dnl * here begins the hairy stuff
+
+         else
+
+            dnl changequote(, )dnl
+
+            dnl * Create a minimal MPI program.  It will be compiled using
+            dnl * $MPICC with verbose output.
+            cat > mpconftest.c << EOF
+#include "mpi.h"
+
+main(int argc, char **argv)
+{
+   int rank, size;
+   MPI_Init(&argc, &argv);
+   MPI_Comm_size(MPI_COMM_WORLD, &size);
+   MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+   MPI_Finalize();
+   return 0;
+}
+EOF
+
+            casc_mplibs=
+            casc_mplibdirs=
+            casc_flags=
+            casc_lmpi_exists=no
+
+            dnl * These are various ways to produce verbose output from $MPICC
+            dnl * All of their outputs are stuffed into variable
+            dnl * $casc_mpoutput
+
+            for casc_command in "$MPICC -show"\
+                                "$MPICC -v"\
+                                "$MPICC -#"\
+                                "$MPICC"; do
+
+               casc_this_output=`$casc_command mpconftest.c -o mpconftest 2>&1`
+
+               dnl * If $MPICC uses xlc, then commas must be removed from output
+               xlc_p=`echo $casc_this_output | grep xlcentry`
+               if test -n "$xlc_p"; then
+                  casc_this_output=`echo $casc_this_output | sed 's/,/ /g'`
+               fi
+
+               dnl * Turn on flag once -lmpi is found in output
+               lmpi_p=`echo $casc_this_output | grep "\-lmpi"`
+               if test -n "$lmpi_p"; then
+                  casc_lmpi_exists=yes
+               fi
+
+               casc_mpoutput="$casc_mpoutput $casc_this_output"
+               casc_this_output=
+
+            done
+
+            rm -rf mpconftest*
+
+            dnl * little test to identify $CC as IBM's xlc
+            echo "main() {}" > cc_conftest.c
+            cc_output=`${CC-cc} -v -o cc_conftest cc_conftest.c 2>&1`
+            xlc_p=`echo $cc_output | grep xlcentry`
+            if test -n "$xlc_p"; then
+               casc_compiler_is_xlc=yes
+            fi
+            rm -rf cc_conftest*
+
+            dnl * $MPICC might not produce '-lmpi', but we still need it.
+            dnl * Add -lmpi to $casc_mplibs if it was never found
+            if test "$casc_lmpi_exists" = "no"; then
+               casc_mplibs="-lmpi"
+            else
+               casc_mplibs=
+            fi
+
+            casc_want_arg=
+
+            dnl * Loop through every word in output to find possible flags.
+            dnl * If the word is the absolute path of a library, it is added
+            dnl * to $casc_flags.  Any "-llib", "-L/dir", "-R/dir" and
+            dnl * "-I/dir" is kept.  If '-l', '-L', '-R', '-I', '-u', or '-Y'
+            dnl * appears alone, then the next word is checked.  If the next
+            dnl * word is another flag beginning with '-', then the first
+            dnl * word is discarded.  If the next word is anything else, then
+            dnl * the two words are coupled in the $casc_arg variable.
+            dnl * "-binitfini:poe_remote_main" is a flag needed especially
+            dnl * for IBM MPI, and it is always kept if it is found.
+            dnl * Any other word is discarded.  Also, after a word is found
+            dnl * and kept once, it is discarded if it appears again
+
+            for casc_arg in $casc_mpoutput; do
+
+               casc_old_want_arg=$casc_want_arg
+               casc_want_arg=
+
+               if test -n "$casc_old_want_arg"; then
+                  case "$casc_arg" in
+                  [-*)]
+                     casc_old_want_arg=
+                  ;;
+                  esac
+               fi
+
+               case "$casc_old_want_arg" in
+               ['')]
+                  case $casc_arg in
+                  [/*.a)]
+                     exists=false
+                     for f in $casc_flags; do
+                        if test x$casc_arg = x$f; then
+                           exists=true
+                        fi
+                     done
+                     if $exists; then
+                        casc_arg=
+                     else
+                        casc_flags="$casc_flags $casc_arg"
+                     fi
+                  ;;
+                  [-binitfini:poe_remote_main)]
+                     exists=false
+                     for f in $casc_flags; do
+                        if test x$casc_arg = x$f; then
+                           exists=true
+                        fi
+                     done
+                     if $exists; then
+                        casc_arg=
+                     else
+                        casc_flags="$casc_flags $casc_arg"
+                     fi
+                  ;;
+                  [-lang*)]
+                     casc_arg=
+                  ;;
+                  [-[lLR])]
+                     casc_want_arg=$casc_arg
+                     casc_arg=
+                  ;;
+                  [-[lLR]*)]
+                     exists=false
+                     for f in $casc_flags; do
+                        if test x$casc_arg = x$f; then
+                           exists=true
+                        fi
+                     done
+                     if $exists; then
+                        casc_arg=
+                     else
+                       casc_flags="$casc_flags $casc_arg"
+                     fi
+                  ;;
+                 [-u)]
+                     casc_want_arg=$casc_arg
+                     casc_arg=
+                  ;;
+                  [-Y)]
+                     casc_want_arg=$casc_arg
+                     casc_arg=
+                  ;;
+                  [-I)]
+                     casc_want_arg=$casc_arg
+                     casc_arg=
+                  ;;
+                  [-I*)]
+                     exists=false
+                     for f in $casc_flags; do
+                        if test x$casc_arg = x$f; then
+                           exists=true
+                        fi
+                     done
+                     if $exists; then
+                        casc_arg=
+                     else
+                        casc_flags="$casc_flags $casc_arg"
+                     fi
+                  ;;
+                  [*)]
+                     casc_arg=
+                  ;;
+                  esac
+
+               ;;
+               [-[lLRI])]
+                  casc_arg="casc_old_want_arg $casc_arg"
+               ;;
+               [-u)]
+                  casc_arg="-u $casc_arg"
+               ;;
+               [-Y)]
+                  casc_arg=`echo $casc_arg | sed -e 's%^P,%%'`
+                  SAVE_IFS=$IFS
+                  IFS=:
+                  casc_list=
+                  for casc_elt in $casc_arg; do
+                     casc_list="$casc_list -L$casc_elt"
+                  done
+                  IFS=$SAVE_IFS
+                  casc_arg="$casc_list"
+               ;;
+               esac
+
+               dnl * Still inside the big for loop, we separate each flag
+               dnl * into includes, libdirs, libs, flags
+               if test -n "$casc_arg"; then
+                  case $casc_arg in
+                  [-I*)]
+
+                     dnl * if the directory given in this flag contains mpi.h
+                     dnl * then the flag is assigned to $MPIINCLUDE
+                     if test -z "$MPIINCLUDE"; then
+                        casc_cppflags="$casc_cppflags $casc_arg"
+                        casc_include_dir=`echo "$casc_arg" | sed 's/-I//g'`
+
+                        SAVE_CPPFLAGS="$CPPFLAGS"
+                        CPPFLAGS="$casc_cppflags"
+                        dnl changequote([, ])dnl
+
+                        unset ac_cv_header_mpi_h
+                        AC_CHECK_HEADER(mpi.h,
+                                        MPIINCLUDE="$casc_cppflags")
+
+                        dnl changequote(, )dnl
+                        CPPFLAGS="$SAVE_CPPFLAGS"
+
+                     else
+                        casc_arg=
+                     fi
+                  ;;
+                  [-[LR]*)]
+
+                     dnl * These are the lib directory flags
+                     casc_mplibdirs="$casc_mplibdirs $casc_arg"
+                  ;;
+                  [-l* | /*)]
+
+                     dnl * These are the libraries
+                     casc_mplibs="$casc_mplibs $casc_arg"
+                  ;;
+                  [-binitfini:poe_remote_main)]
+                     if test "$casc_compiler_is_xlc" = "yes"; then
+                        casc_mpflags="$casc_mpflags $casc_arg"
+                     fi
+                  ;;
+                  [*)]
+                     dnl * any other flag that has been kept goes here
+                     casc_mpflags="$casc_mpflags $casc_arg"
+                  ;;
+                  esac
+
+                  dnl * Upcoming test needs $LIBS to contain the flags
+                  dnl * we've found
+                  LIBS_SAVE=$LIBS
+                  LIBS="$MPIINCLUDE $casc_mpflags $casc_mplibdirs $casc_mplibs"
+
+                  if test -n "`echo $LIBS | grep '\-R/'`"; then
+                     LIBS=`echo $LIBS | sed 's/-R\//-R \//'`
+                  fi
+
+                  dnl changequote([, ])dnl
+
+
+                  dnl * Test to see if flags found up to this point are
+                  dnl * sufficient to compile and link test program.  If not,
+                  dnl * the loop keeps going to the next word
+                  AC_LANG_PUSH(C)
+                  AC_TRY_LINK(
+dnl                     ifelse(AC_LANG, [C++],
+
+dnl [#ifdef __cplusplus
+dnl extern "C"
+dnl #endif
+dnl ])dnl
+[#include "mpi.h"
+], [int rank, size;
+   int argc;
+   char **argv;
+   MPI_Init(&argc, &argv);
+   MPI_Comm_size(MPI_COMM_WORLD, &size);
+   MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+   MPI_Finalize();
+],
+                     casc_result=yes)
+                  AC_LANG_POP(C)
+                  LIBS=$LIBS_SAVE
+
+                  if test "$casc_result" = yes; then
+                     casc_result=
+                     break
+                  fi
+               fi
+            done
+
+            dnl * After loop is done, set variables to be substituted
+            MPILIBS=$casc_mplibs
+            MPILIBDIRS=$casc_mplibdirs
+            MPIFLAGS="$MPIFLAGS $casc_mpflags"
+
+            dnl * IBM MPI uses /usr/lpp/ppe.poe/libc.a instead of /lib/libc.a
+            dnl * so we need to make sure that -L/lib is not part of the
+            dnl * linking line when we use IBM MPI.  This only appears in
+            dnl * configure when CASC_FIND_MPI is called first.
+	    dnl            ifdef([AC_PROVIDE_CASC_FIND_F77LIBS],
+            dnl               if test -n "`echo $F77LIBFLAGS | grep '\-L/lib '`"; then
+            dnl                  if test -n "`echo $F77LIBFLAGS | grep xlf`"; then
+            dnl                     F77LIBFLAGS=`echo $F77LIBFLAGS | sed 's/-L\/lib //g'`
+            dnl                  fi
+            dnl               fi
+            dnl            )
+
+            if test -n "`echo $MPILIBS | grep pmpich`" &&
+               test -z "`echo $MPILIBS | grep pthread`"; then
+                  LIBS_SAVE=$LIBS
+                  LIBS="$MPIINCLUDE $MPIFLAGS $MPILIBDIRS $MPILIBS -lpthread"
+                  AC_LANG_PUSH(C)
+                  AC_TRY_LINK(
+dnl                     ifelse(AC_LANG, [C++],
+
+dnl [#ifdef __cplusplus
+dnl extern "C"
+dnl #endif
+dnl ])dnl
+[#include "mpi.h"
+], [int rank, size;
+   int argc;
+   char **argv;
+   MPI_Init(&argc, &argv);
+   MPI_Comm_size(MPI_COMM_WORLD, &size);
+   MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+   MPI_Finalize();
+],
+                     MPILIBS="$MPILIBS -lpthread")
+                  AC_LANG_POP(C)
+                  LIBS=$LIBS_SAVE
+            fi
+
+            AC_MSG_CHECKING(for MPI include directories)
+            AC_MSG_RESULT($MPIINCLUDE)
+            AC_MSG_CHECKING(for MPI library directories)
+            AC_MSG_RESULT($MPILIBDIRS)
+            AC_MSG_CHECKING(for MPI libraries)
+            AC_MSG_RESULT($MPILIBS)
+            AC_MSG_CHECKING(for other MPI-related flags)
+            AC_MSG_RESULT($MPIFLAGS)
+         fi
+      fi
+
+      AC_CACHE_VAL(casc_cv_mpi_include, casc_cv_mpi_include=$MPIINCLUDE)
+      AC_CACHE_VAL(casc_cv_mpi_lib_dirs, casc_cv_mpi_lib_dirs=$MPILIBDIRS)
+      AC_CACHE_VAL(casc_cv_mpi_libs, casc_cv_mpi_libs=$MPILIBS)
+      AC_CACHE_VAL(casc_cv_mpi_flags, casc_cv_mpi_flags=$MPIFLAGS)
+   fi
+
+   AC_SUBST(MPIINCLUDE)
+   AC_SUBST(MPILIBDIRS)
+   AC_SUBST(MPILIBS)
+   AC_SUBST(MPIFLAGS)
+
+])dnl
+
+dnl ********************************************************************
+dnl * CASC_FIND_MPI_ALPHA is a special case of CASC_FIND_MPI for the
+dnl * compass cluster.  The original CASC_FIND_MPI looks for existence
+dnl * of mpCC and mpiCC.  If the former is found it uses native (proprietary)
+dnl * mpi and if the latter is found, it uses mpich.  The DECs are a
+dnl * special case because mpCC does not exist and mpiCC does, but we want
+dnl * to use the native version by default.  Therefore, the original macro
+dnl * did not work for this case so I added this one to deal with it.
+dnl * AMW 9/00
+dnl ********************************************************************
+
+AC_DEFUN([CASC_FIND_MPI_ALPHA],
+[
+
+   casc_find_mpi_cache_used=yes
+
+   AC_CACHE_VAL(casc_cv_mpi_include, casc_find_mpi_cache_used=no)
+   AC_CACHE_VAL(casc_cv_mpi_libs, casc_find_mpi_cache_used=no)
+   AC_CACHE_VAL(casc_cv_mpi_lib_dirs, casc_find_mpi_cache_used=no)
+   AC_CACHE_VAL(casc_cv_mpi_flags, casc_find_mpi_cache_used=no)
+
+   if test "$casc_find_mpi_cache_used" = "yes"; then
+      AC_MSG_CHECKING(for location of mpi.h)
+      MPIINCLUDE=$casc_cv_mpi_include
+      AC_MSG_RESULT("\(cached\) $MPIINCLUDE")
+
+      AC_MSG_CHECKING(for MPI library directories)
+      MPILIBDIRS=$casc_cv_mpi_lib_dirs
+      AC_MSG_RESULT("\(cached\) $MPILIBDIRS")
+
+      AC_MSG_CHECKING(for MPI libraries)
+      MPILIBS=$casc_cv_mpi_libs
+      AC_MSG_RESULT("\(cached\) $MPILIBS")
+
+      AC_MSG_CHECKING(for other MPI-related flags)
+      MPIFLAGS=$casc_cv_mpi_flags
+      AC_MSG_RESULT("\(cached\) $MPIFLAGS")
+   else
+
+
+      dnl * Set up user options.  If user uses any of the fist three options,
+      dnl * then automatic tests are not run.
+
+      casc_user_chose_mpi=no
+      AC_ARG_WITH(mpi-include, [  --with-mpi-include=DIR  mpi.h is in DIR],
+                  for mpi_dir in $withval; do
+                     MPIINCLUDE="$MPIINCLUDE -I$withval"
+                  done; casc_user_chose_mpi=yes)
+
+      AC_ARG_WITH(mpi-libs,
+[  --with-mpi-libs=LIBS    LIBS is space-separated list of library names
+                          needed for MPI, e.g. \"nsl socket mpi\"],
+                  for mpi_lib in $withval; do
+                     MPILIBS="$MPILIBS -l$mpi_lib"
+                  done; casc_user_chose_mpi=yes)
+
+
+      AC_ARG_WITH(mpi-lib-dirs,
+[  --with-mpi-lib-dirs=DIRS
+                          DIRS is space-separated list of directories
+                          containing the libraries specified by
+                          \`--with-mpi-libs', e.g \"/usr/lib /usr/local/mpi/lib\"],
+                  for mpi_lib_dir in $withval; do
+                     MPILIBDIRS="-L$mpi_lib_dir $MPILIBDIRS"
+                  done; casc_user_chose_mpi=yes)
+
+      dnl * --with-mpi-flags only adds to automatic selections,
+      dnl * does not override
+
+      AC_ARG_WITH(mpi-flags,
+[  --with-mpi-flags=FLAGS  FLAGS is space-separated list of whatever flags other
+                          than -l and -L are needed to link with mpi libraries],
+                          MPIFLAGS=$withval)
+
+
+      if test "$casc_user_chose_mpi" = "no"; then
+
+         dnl * Set defaults for Compass cluster here.  This is the point where
+         dnl * we call CASC_SET_MPI in CASC_FIND_MPI macro.
+
+         casc_mpi_include_dir=
+         casc_mpi_lib_dirs=
+         casc_mpi_libs="mpi rt rpc gs pthread"
+
+         for casc_incl_dir in $casc_mpi_include_dir; do
+            MPIINCLUDE="-I$casc_incl_dir $MPIINCLUDE"
+         done
+         for casc_lib_dir in $casc_mpi_lib_dirs; do
+            MPILIBDIRS="-L$casc_lib_dir $MPILIBDIRS"
+         done
+         for casc_lib in $casc_mpi_libs; do
+            MPILIBS="$MPILIBS -l$casc_lib"
+         done
+      fi
+
+
+      AC_MSG_CHECKING(for MPI include directories)
+      AC_MSG_RESULT($MPIINCLUDE)
+      AC_MSG_CHECKING(for MPI library directories)
+      AC_MSG_RESULT($MPILIBDIRS)
+      AC_MSG_CHECKING(for MPI libraries)
+      AC_MSG_RESULT($MPILIBS)
+      AC_MSG_CHECKING(for other MPI-related flags)
+      AC_MSG_RESULT($MPIFLAGS)
+
+   fi
+
+])dnl
+
+
+
+dnl Define a macro for supporting SILO
+
+AC_DEFUN([CASC_SUPPORT_SILO],[
+
+# Begin CASC_SUPPORT_SILO
+# Defines silo_PREFIX silo_INCLUDES and silo_LIBS if with-silo is specified.
+AC_ARG_WITH(silo,
+[ --with-silo[=PATH]  Use SILO and optionally specify where SILO is installed.],
+, with_silo=no)
+
+case "$with_silo" in
+  no)
+    AC_MSG_NOTICE([configuring without SILO support])
+    : Do nothing
+  ;;
+  yes)
+    # SILO install path was not specified.
+    # Look in a couple of standard locations to probe if 
+    # SILO header files are there.
+    AC_MSG_CHECKING([for SILO installation])
+    for dir in /usr /usr/local; do
+      if test -f ${dir}/include/silo.h; then
+        silo_PREFIX=${dir}
+        break
+      fi
+    done
+    AC_MSG_RESULT([$silo_PREFIX])
+  ;;
+  *)
+    # SILO install path was specified.
+    AC_MSG_CHECKING([for SILO installation])
+    silo_PREFIX=$with_silo
+    silo_INCLUDES="-I${silo_PREFIX}/include"
+    if test -f ${silo_PREFIX}/include/silo.h; then
+        AC_MSG_RESULT([$silo_PREFIX])
+    else
+        AC_MSG_RESULT([$silo_PREFIX])
+        AC_MSG_ERROR([SILO not found in $with_silo])
+    fi
+  ;;
+esac
+
+# Determine which SILO library is built
+if test "${silo_PREFIX+set}" = set; then
+   AC_MSG_CHECKING([for SILO library])
+   if test -f ${silo_PREFIX}/lib/libsilo.a; then
+      silo_LIBS='-lsilo'
+      AC_MSG_RESULT([using $silo_LIBS])
+   elif test -f ${silo_PREFIX}/lib/libsiloh5.a; then
+      silo_LIBS='-lsiloh5'
+      AC_MSG_RESULT([using $silo_LIBS])
+   else
+      AC_MSG_RESULT([using $silo_LIBS])
+      AC_MSG_ERROR([Could not fine silo library in $silo_PREFIX])
+   fi
+
+   silo_LIBS="-L${silo_PREFIX}/lib ${silo_LIBS}"
+fi
+
+# END CASC_SUPPORT_SILO
+
+])dnl End definition of CASC_SUPPORT_SILO
+
+dnl Define a macro for supporting VALGRIND
+
+AC_DEFUN([CASC_SUPPORT_VALGRIND],[
+
+# Begin CASC_SUPPORT_VALGRIND
+# Defines valgrind_EXE
+AC_ARG_WITH(valgrind,
+[ --with-valgrind[=PATH]  Use VALGRIND and optionally specify where VALGRIND is installed.],
+, with_valgrind=no)
+
+case "$with_valgrind" in
+  no)
+    AC_MSG_NOTICE([configuring without VALGRIND support])
+    : Do nothing
+  ;;
+  yes)
+    # VALGRIND install path was not specified.
+    # Look in a couple of standard locations to probe if 
+    # VALGRIND header files are there.
+    AC_MSG_CHECKING([for VALGRIND installation])
+    for dir in /usr /usr/local; do
+      if test -f ${dir}/bin/valgrind; then
+        valgrind_PREFIX=${dir}
+        break
+      fi
+    done
+    AC_MSG_RESULT([$valgrind_PREFIX])
+  ;;
+  *)
+    # VALGRIND install path was specified.
+    AC_MSG_CHECKING([for VALGRIND installation])
+    valgrind_PREFIX=$with_valgrind
+    ;;
+esac
+
+if test "${valgrind_PREFIX+set}" = set 
+then
+   valgrind_EXE="${valgrind_PREFIX}/bin/valgrind"
+   if test -f ${valgrind_PREFIX}/bin/valgrind; then
+      AC_MSG_RESULT([$valgrind_PREFIX])
+   else
+      AC_MSG_RESULT([$valgrind_PREFIX])
+      AC_MSG_ERROR([VALGRIND not found in $with_valgrind])
+   fi
+fi
+
+# END CASC_SUPPORT_VALGRIND
+
+])dnl End definition of CASC_SUPPORT_VALGRIND
+
+dnl Define macros for supporting XLC 
+
+AC_DEFUN([CASC_CXX_STD_FILL_N_RETURNS_VOID],[
+
+# Begin CASC_CXX_STD_FILL_N_RETURNS_VOID
+# Defines CASC_STD_FILL_N_RETURNS_VOID
+
+# Check if std::fill_n returns a void, older XLC compilers do this.
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether std:fill_n returns void)
+   AC_LANG_PUSH(C++)
+   CASC_PUSH_COMPILER_STATE
+   AC_COMPILE_IFELSE([
+
+      #include <vector>
+
+      template void std::fill_n<unsigned int*, int, int>(unsigned int*, int, int const&);      
+
+      ], 
+      casc_std_fill_n_returns_void=yes,
+      casc_std_fill_n_returns_void=no)
+   CASC_POP_COMPILER_STATE
+   AC_LANG_POP
+   AC_MSG_RESULT($casc_std_fill_n_returns_void)
+
+   if test "$casc_std_fill_n_returns_void" = yes; then
+      AC_DEFINE([CASC_STD_FILL_N_RETURNS_VOID], 1, [Define if std::fill_n returns void])
+   fi
+
+
+# END CASC_CXX_STD_FILL_N_RETURNS_VOID
+
+])dnl End definition of CASC_CXX_STD_FILL_N_RETURNS_VOID
+
+
+
+
+
+
+dnl Define a macro for supporting generalized serial-parallel run.
+
+
+AC_DEFUN([SAMRAI_SERPA],[
+dnl Support a generalized way to run a program in serial or parallel mode.
+dnl (serpa is serial + parallel).
+dnl
+dnl Arg1: name (may include relative path) to give to shell script created.
+dnl   If omitted, the name will be serpa-run, in the top level directory.
+dnl
+dnl This macro brings out an automake bug.  See "IMPORTANT NOTE:" below
+dnl for comments and how to circumvent.
+
+# Begin macro $0
+
+
+# The generalized script needs to know about the system
+# so it can form the appropriate parallel run command line.
+AC_REQUIRE([AC_CANONICAL_TARGET])
+
+
+dnl The parallel run program (usually mpirun) is hardwired for now,
+dnl but it should be more flexible.
+dnl I plan to eventualy use the following variable,
+dnl but it is not currently used.
+AC_ARG_WITH(parallel-run-bin,[
+  --with-parallel-run-bin=STRING
+		Specify the parallel run binary (i.e., mpirun, dmpirun,
+		poe, etc) to be used in the serial-parallel run script.
+],[
+case "$with_parallel_run_bin" in
+  no)
+    # Set PARALLEL_RUN_BIN to blank to remove it from the serpa-run script.
+    PARALLEL_RUN_BIN=;;
+  yes)
+    # Unset the variable PARALLEL_RUN_BIN so it is guessed in the next step.
+    unset PARALLEL_RUN_BIN;
+    ;;
+  *)
+    # Set PARALLEL_RUN_BIN to user specification.
+    PARALLEL_RUN_BIN="$with_parallel_run_bin"
+    ;;
+esac
+BTNG_AC_LOG_VAR(with_parallel_run_bin PARALLEL_RUN_BIN target_os, with-parallel-run-bin given)
+
+],[
+unset PARALLEL_RUN_BIN;
+BTNG_AC_LOG_VAR(with_parallel_run_bin PARALLEL_RUN_BIN target_os, with-parallel-run-bin NOT given)
+])
+# If PARALLEL_RUN_BIN is unset, guess it.
+if test ! "${PARALLEL_RUN_BIN+set}" = set; then
+  case "$target_os" in
+    osf*) PARALLEL_RUN_BIN=dmpirun
+    ;;
+    *) PARALLEL_RUN_BIN=mpirun
+    ;;
+  esac
+  BTNG_AC_LOG_VAR(with_parallel_run_bin PARALLEL_RUN_BIN target_os, after setting PARALLEL_RUN_BIN)
+fi
+AC_SUBST(PARALLEL_RUN_BIN)
+
+
+define(btng_serpa_run_fn,ifelse($1,,serpa-run,$1))
+dnl Create serpa-run.in file (at autoconf time, before configure time)
+dnl File serpa-run.in will be used at configure time to create serpa-run
+dnl in the compile tree.
+syscmd([ file_name=']btng_serpa_run_fn[' cat <<'__EOM__'> ${file_name}.in
+#!/bin/sh
+
+# This script runs an executable program serially or in parallel.
+
+# The syntax for running programs in parallel differs from platform to platform,
+# software to software.  This script automatically uses the correct syntax for
+# the environments that it knows about.  For the environments it does not know,
+# it has a default that may work.
+
+# This script defines the set of tests to put the program through.
+# This set is parametrized by these variables:
+# nproc_list: space- or comma-separated list of number of processors to use.
+
+
+# The name and directory of this script
+# (Do not rely on existence of dirname and basename programs.)
+script_name=`echo ${0} | sed -e 's:.*/::'`;
+dir_name=`echo ${0} | sed -e 's:^\([^/]*\)$:./\1:' -e 's:/[^/]*$::'`;
+
+# Define a way to gracefully die from within this script.
+# The die function is similar to Perl's.
+# Arguments are: <exit_value> <exit_message>
+die () {
+    echo "ERROR_MESSAGE_FROM ${script_name}:"
+    if [ -n "${2}" ]; then echo "Error ${2}"; fi
+    if [ -n "${1}" ]; then exit ${1}; fi
+    exit 99
+}
+
+
+# When no argument is given, print the help message and exit.
+if [ "${1}" = '-h' ] || [ "${1}" = '--help' ] || [ ${#} -lt 2 ] ; then
+  cat <<-_EOF_
+	Usage: ${script_name} <list of nproc> <program name>
+
+	This is a generalized script to run a program in serial
+	and/or parallel.
+
+	The number of processors are given by <list of nproc>,
+	which must be a comma- or space-delimited list of integers.
+	Example: "${script_name} 1,2,5 parallel_program" runs
+	parallel_program 3 times with 1, 2 and 5 processors in turn.
+
+	The special case of number of processors = 0 means to run serially.
+	This differs from one processor in that one processor means to run
+	in parallel, but with one processor.
+
+	This script exits with an error if any instance of
+	running the program fails.
+
+	If SERPA_REDIRECT_OUTPUT_TO is defined in the environment,
+	standard output of the program is redirected there.
+	If SERPA_REDIRECT_ERRORS_TO is defined in the environment,
+	error output of the program is redirected there.
+	Outputs directly from THIS script are NOT affected
+	by these environment variables.
+
+	If SERPA_MAX_FAILS is defined, ${script_name} will
+	continue until that many failures before exiting.
+	The default is 1 failure (${script_name} exits on the
+	first failure).  The exit value will always be the
+	failure count.
+
+	When a serial run os made, if SERPA_PERFORMANCE_FILE
+	is defined and is the name of a file, that file is searched
+	for performance data.  The run is timed and the result
+	is compared to the performance data found.
+	_EOF_
+exit
+fi
+
+# How to invoke a GNU compatible time command
+if [ -z "${SERPA_GNUTIME}" ]; then
+    SERPA_GNUTIME=/usr/bin/time
+fi
+
+# Percent difference for performance comparisons
+if [ -z "${SERPA_DIFFERENCE}" ]; then
+    SERPA_DIFFERENCE=0.1
+fi
+
+
+# Check the redirection environment variables.
+# See the help message for how these are used.
+if [ -n "${SERPA_REDIRECT_OUTPUT_TO}" ]; then
+  output_redirection_string="1> ${SERPA_REDIRECT_OUTPUT_TO}"
+else
+  unset output_redirection_string
+fi
+if [ -n "${SERPA_REDIRECT_ERRORS_TO}" ]; then
+  errors_redirection_string="2> ${SERPA_REDIRECT_ERRORS_TO}"
+else
+  unset errors_redirection_string
+fi
+
+# Save the arguments for later reference.
+serpa_args="${@}"
+
+
+# Get the number of processors from the first argument of this script.
+nproc_list=${1}; shift;
+# We allow comma-delimited lists, so we now remove those commas.
+echo ${nproc_list} | grep '^[0-9 ,]\{1,\}$' > /dev/null	\
+  || die 1 "Invalid number of processors list '${nproc_list}'"
+nproc_list=`echo ${nproc_list} | sed 's/,/ /g'`
+
+# Get the program name from the next argument of this script.
+program=${1}; shift;
+test -x ${program} || die 1 "No execute permission on '${program}'"
+
+
+# Determine host name for use below.
+if [ ${?}{HOST} ]; then
+  HOST=`uname -n`
+  export HOST
+fi
+
+
+# Use additional_env to specify additional environments that
+# should be set before running.  Although you can, do not use
+# this to set environments for programs.  It is meant to be
+# environments for the parallel execution program such as
+# mpirun.
+additional_env=
+
+
+# Variables required for using parallelrun.  These may not be needed,
+# but if they are needed and unset, there will be an error.
+# Some of these strings are determined at configure time.
+parallelrun_prog="@PARALLEL_RUN_BIN@";	# Name of parallelrun program.
+
+
+# Determine what platform we are on.
+target_cpu=@target_cpu@
+target_os=@target_os@
+target_vendor=@target_vendor@
+
+
+# Determine the machine file name.
+serpa_machine_file='serpa.machines'
+
+
+# Define a function to run a program in parallel.
+# We have to do this because different environments require different syntaxes.
+# The function arguments are:
+#   program name
+#   number of processor
+#
+# We define the function in a big if-else statement based on the
+# target computer.  We assume that there is a one-to-one correspondence.
+# If there is not, there may have to be a nested if-structure.
+#
+if echo "${HOST}" | egrep '^(blue|frost)[0-9]' > /dev/null ; then
+
+  # For blue, a specific singleton platform.
+  run_multiproc () {
+    MP_RESD="YES"
+    MP_HOSTFILE=""
+    MP_EUILIB=us
+    MP_EUIDEVICE=css0
+    export MP_RESD MP_HOSTFILE MP_EUILIB MP_EUIDEVICE
+  # IBM shell functions eat their parameters after the first assignment
+  # from them so save the parameters first.
+    case "${HOST}" in
+      blue*) proc_per_node=4;;
+      frost*) proc_per_node=16;;
+    esac
+    program=${1}; nproc=${2}; shift 2
+    nodes=`expr 1 + \( ${nproc} - 1 \) / ${proc_per_node}`
+    com="${additional_env} ${parallelrun_prog} ${program}"
+    com="${com} -rmpool 0 -nodes ${nodes} -procs ${nproc} ${@}"
+    # com="${program} ${@} -procs ${nproc}"
+    echo ${com}
+    eval ${com} ${output_redirection_string} ${errors_redirection_string}
+    return ${?}
+  }
+
+elif echo "${HOST}" | grep '^tc2k' > /dev/null ; then
+
+  # For tc2k, a specific singleton platform (contributed by Brian Miller).
+  run_multiproc () {
+    program=${1}; nproc=${2}; shift 2
+    com="${additional_env} prun -n ${nproc} ${program} ${@}"
+    com="${program} ${@} -p ${nproc}"
+    echo ${com}
+    eval ${com} ${output_redirection_string} ${errors_redirection_string}
+    return ${?}
+  }
+
+elif echo "${HOST}" | egrep '^(mcr|pengra|thunder)[0-9]' > /dev/null ; then
+
+  # For LC Linux clusters using srun.
+  run_multiproc () {
+    program=${1}; nproc=${2}; shift 2
+    com="${additional_env} srun -n${nproc} -p pdebug ${program} ${@}"
+    echo ${com}
+    eval ${com} ${output_redirection_string} ${errors_redirection_string}
+    return ${?}
+  }
+
+elif echo "${target_os}" | grep '^osf'	> /dev/null ; then
+
+  # For Dec OSF.
+  run_multiproc () {
+    program=${1}; nproc=${2}; shift 2
+    com="${additional_env} dmpirun -np ${nproc} ${program} ${@}"
+    echo ${com}
+    eval ${com} ${output_redirection_string} ${errors_redirection_string}
+    return ${?}
+  }
+
+elif echo "${target_os}" | grep '^solaris' > /dev/null	\
+  || echo "${target_os}" | grep '^irix' > /dev/null	\
+  || echo "${target_os}" | grep '^linux' > /dev/null	\
+  ; then
+
+  # Most platforms fall into this case.
+  run_multiproc () {
+    program=${1}; nproc=${2}; shift 2
+    com="${additional_env} ${parallelrun_prog}"
+    com="${com} -machinefile ${dir_name}/${serpa_machine_file} -np ${nproc} ${program} ${@}"
+    echo ${com}
+    eval ${com} ${output_redirection_string} ${errors_redirection_string}
+    return ${?}
+  }
+
+else
+
+  # Simplest case.
+  # This is generic.  It may not work, but it is our best guess
+  # without knowledge of the system.
+  run_multiproc () {
+    program=${1}; nproc=${2}; shift 2
+    com="${additional_env} ${program} -np ${nproc} ${@}"
+    echo ${com}
+    eval ${com} ${output_redirection_string} ${errors_redirection_string}
+    return ${?}
+  }
+
+fi
+
+
+# Initialize the failure count.
+serpa_num_failures=0
+test -z "${SERPA_MAX_FAILS}" && SERPA_MAX_FAILS=1
+
+# Run the program.
+for nproc in ${nproc_list}; do
+  cat <<-_EOM_
+	${script_name}================================================
+	RUNNING: ${script_name} ${nproc} ${program} ${@}
+	${script_name}::::::::::::::::::::::::::::::::::::::::::::::::
+	_EOM_
+  if test "${nproc}" = 0 ; then
+    # Run serially.
+
+    # If performance file exists then with performance testing
+    # otherwise do a normal sequential run
+    if test "${SERPA_PERFORMANCE_FILE+set}" = set &&
+       test -f "${SERPA_PERFORMANCE_FILE}"; then
+
+	# Run with performance check. 
+	com="${additional_env} ${program} ${@}"
+	echo "${com}"
+	${SERPA_GNUTIME} -o $$.time -f "%e %t" ${com} \
+	    ${output_redirection_string} ${errors_redirection_string}
+	exit_value=${?}
+
+	# Parse temporary file to get recorded time/memory usage
+	read etime memory < $$.time
+	rm $$.time
+	
+	# Report the run time/memory usage 
+	echo "serpa-perf ${nproc} <${com}> ${etime} ${memory}"
+
+	# Check if time is out of bounds
+	search=`grep "serpa-perf ${nproc} <${com}>" ${SERPA_PERFORMANCE_FILE}`
+	if test "$?" = "0";then
+	    search=`echo $search | sed 's/.*>//'`
+	    read compare_time compare_memory <<EOF	    
+$search
+EOF
+        else
+	    compare_time=999999
+	    compare_memory=0
+	fi
+
+	difference=`bc -l <<EOF
+a=${etime}
+b=${compare_time}
+t=${SERPA_DIFFERENCE}
+d=a-b
+if ( d < 0 ) {
+	d = -d
+}
+p=d/b
+print (p < t), "\n"
+EOF`
+	if test "${difference}" = "1"; then
+	    echo "PERFORMANCE PASSED: target ${compare_time} (seconds) current ${etime} sec"
+	else
+	    echo "PERFORMANCE FAIL: target ${compare_time} (seconds) current ${etime}"
+	fi
+
+	# Currently don't do memory check since it is not reporting anything.
+
+    else
+	# Run without performance testing
+	com="${additional_env} ${program} ${@}"
+	echo "${com}"
+	eval ${com} ${output_redirection_string} ${errors_redirection_string}
+	exit_value=${?}
+    fi
+  else
+    # Because parallel runs sometimes fails due to problems unrelated
+    # to the program, we give it several tries before declaring failure.
+    if test -z "${SERPA_PARALLEL_TRIES}"; then SERPA_PARALLEL_TRIES=1; fi
+    c=1
+    while test ${c} -le ${SERPA_PARALLEL_TRIES} ; do
+      if test ${c} -gt 1 ; then
+        echo "possibly failed.  TRY number ${c}"
+      fi
+      run_multiproc ${program} ${nproc} "${@}"
+      exit_value=${?}
+      if [ ${exit_value} = 0 ]; then
+        break
+      fi
+      c=`expr ${c} + 1`
+    done
+  fi
+  # Report pass or fail.
+  # pf_string=FAILED; test "${exit_value}" = 0 && pf_string=PASSED
+  pf_string=FAILED; test "${exit_value}" = 0 && pf_string=COMPLETED
+  cat <<-_EOM_
+	${script_name}::::::::::::::::::::::::::::::::::::::::::::::::
+	${pf_string}: ${script_name} ${nproc} ${program} ${@}
+	${script_name}================================================
+	_EOM_
+  # Count failures and possibly exit.
+  if test ${exit_value} -ne 0 ; then
+    serpa_num_failures=`expr ${serpa_num_failures} + 1`;
+    if test ${serpa_num_failures} -eq ${SERPA_MAX_FAILS}; then
+      die 1 "FAIL running ${program} with ${nproc} processors"
+    fi
+  fi
+done
+
+if test ${serpa_num_failures} -eq 0; then
+  echo "${script_name} ${serpa_args} passed."
+else
+  echo "${script_name} ${serpa_args} had ${serpa_num_failures} failures."
+fi
+exit ${serpa_num_failures}
+
+# End of script.
+__EOM__
+])dnl End of macro to create serpa-run.in
+
+
+dnl Create the configured file from its .in version.
+dnl AC_CONFIG_FILES( btng_serpa_run_fn, chmod +x btng_serpa_run_fn )
+dnl IMPORTANT NOTE:
+dnl Using the defined symbol btng_serpa_run_fn in AC_CONFIG_FILES
+dnl causes automake to complain that btng_serpa_run_fn.in is not found.
+dnl Since that symbol is a defined m4 macro, this is an automake deficiency.
+dnl Until this is fixed, the above AC_CONFIG_FILES usage will not
+dnl work!  You must call AC_CONFIG_FILES with the actual names of
+dnl the file instead of the m4-defined symbol btng_serpa_run_fn.
+
+
+
+AC_CONFIG_COMMANDS([create-serpa-machine-file],[
+# Generate a machine file if needed.
+if test ! -r "$serpa_machine_file" ; then
+  # Set the serpa machine file name to be in the same directory as
+  # the serpa-run script.
+  btng_serpa_dir_name=`echo ']btng_serpa_run_fn[' | sed -e ['s:^\([^/]*\)$:./\1:'] -e ['s:/[^/]*$::']`;
+  btng_serpa_machine_file="${btng_serpa_dir_name}/serpa.machines"
+  hostname="`hostname`"
+  cat <<-__EOF__>"$btng_serpa_machine_file"
+	$hostname
+	$hostname
+	$hostname
+	$hostname
+	__EOF__
+fi
+],[
+dnl Settings to make before running the above.
+])
+
+
+# Add the serpa machine file to the clean list.
+btng_serpa_dir_name=`echo ']btng_serpa_run_fn[' | sed -e ['s:^\([^/]*\)$:./\1:'] -e ['s:/[^/]*$::']`;
+btng_serpa_machine_file="${btng_serpa_dir_name}/serpa.machines"
+DISTCLEANFILES="$DISTCLEANFILES ${btng_serpa_machine_file}"
+BTNG_AC_LOG_VAR(btng_serpa_machine_file DISTCLEANFILES, in support-serpa-run)
+
+
+undefine([btng_serpa_run_fn])
+
+
+# End macro $0
+])dnl End BTNG_SUPPORT_SERPA macro.
+
+dnl
+dnl  File:           $HeadURL$
+dnl  Package:        SAMRAI
+dnl  Copyright:      (c) 1997-2010 Lawrence Livermore National Security, LLC
+dnl  Date:           $Date$
+dnl  Revision:       $LastChangedRevision$
+dnl  Modified:       $LastChangedDate$ 
+dnl  Description:    Macro to control whether timers are compile into or
+dnl                  out of SAMRAI
+dnl               
+dnl                  Variable: samrai_enable_timers
+dnl                  DEFINES:  ENABLE_SAMRAI_TIMERS
+dnl
+
+AC_DEFUN_ONCE([SAMRAI_TIMERS],[
+
+# Begin SAMRAI_TIMERS
+# Defines ENABLE_SAMRAI_TIMERS if --enable-timers is specified.  This is
+# turned on by default 
+
+AC_MSG_CHECKING([if SAMRAI Timers are enabled])
+AC_ARG_ENABLE([timers],
+[AS_HELP_STRING([--disable-timers],
+   [Disable SAMRAI Timers.])],
+   [
+      if test "x$enableval" = "xno"; then
+         samrai_enable_timers="$enableval"
+      fi
+   ], [
+      samrai_enable_timers="yes"
+   ])
+
+dnl By default, the timers are enabled.  Explicitly disabling them
+dnl means that we will not compile the timers into the code.  All
+dnl timer calls will essentially be no-ops.
+dnl
+dnl However, if timers are enabled, we'll define this symbol and
+dnl timers will be built into the code. 
+
+AS_IF([test "x$samrai_enable_timers" = "xyes"], [
+   AC_DEFINE([ENABLE_SAMRAI_TIMERS],[1],[ENABLE_SAMRAI_TIMERS])
+])
+AC_MSG_RESULT([$samrai_enable_timers])
+]
+)
+
+AC_DEFUN([SAMRAI_SPLIT_LIBS_STRING],[
+dnl
+dnl Macro SAMRAI_SPLIT_LIBS_STRING
+dnl Written by Brian Gunney.
+dnl
+dnl This macro takes an automake-style LIBS string (arg1) and
+dnl splits it into the -L part (arg2, what SAMRAI usually calls
+dnl LIB_PATH) and -l part (arg3, what SAMRAI calls LIB_NAME).
+dnl The rest are also lumped into the LIB_NAME part, for lack
+dnl of generality in the SAMRAI distinction.
+dnl
+dnl I think the SAMRAI format is limitting because not all parts
+dnl if the LIBS strings can be recategorized into LIB_PATH and
+dnl LIB_NAME parts.  But this macro allows us to use macros that
+dnl conform to the standard automake format.  BTNG.
+dnl
+# Split $1 into the LIB_PATH part ($2) and the LIB_NAME part ($3)
+if test -n "${$1}"; then
+  for i in ${$1}; do
+    case "$i" in
+    -L*) $2="${$2} $i" ;;
+    *) $3="${$3} $i" ;;
+    esac
+  done
+fi
+])
+
diff -r 000000000000 -r 5eda1a3f24e8 config/casc_ctime.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/casc_ctime.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,68 @@
+dnl
+dnl Check whether the C++ compiler supports cmath
+dnl
+dnl Variable:	casc_cv_cxx_have_cmath = (yes|no)
+dnl Defines:	(HAVE|LACKS)_CTIME
+dnl
+
+AC_DEFUN([CASC_CXX_CTIME], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} supports cmath)
+
+   AC_CACHE_VAL(casc_cv_cxx_have_cmath, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+         AC_TRY_COMPILE([
+#include <ctime>
+void foo() {
+   char*   pzTime  = ctime( &amp;timeVal );
+}
+            ], [/* empty */],
+            casc_cv_cxx_have_cmath=yes,
+            casc_cv_cxx_have_cmath=no)
+      AC_LANG_RESTORE
+      ])
+
+   AC_MSG_RESULT($casc_cv_cxx_have_cmath)
+
+   if test "$casc_cv_cxx_have_cmath" = yes; then
+      AC_DEFINE([HAVE_CTIME],[1],[HAVE_CTIME])
+   else
+      AC_DEFINE([LACKS_CTIME],[1],[LACKS_CTIME])
+   fi
+])
+
+dnl
+dnl Check whether the C++ compiler supports sys/times.h
+dnl
+dnl Variable:	casc_cv_cxx_have_systimes = (yes|no)
+dnl Defines:	(HAVE|LACKS)_SYSTIMES
+dnl
+
+AC_DEFUN([CASC_CXX_SYSTIMES], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} supports sys/times.h)
+
+   AC_CACHE_VAL(casc_cv_cxx_have_systimes, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+         AC_TRY_COMPILE([
+#include <sys/times.h>
+void foo() {
+   char*   pzTime  = ctime( &amp;timeVal );
+}
+            ], [/* empty */],
+            casc_cv_cxx_have_systimes=yes,
+            casc_cv_cxx_have_systimes=no)
+         AC_LANG_RESTORE
+      ])
+
+   AC_MSG_RESULT($casc_cv_cxx_have_systimes)
+
+   if test "$casc_cv_cxx_have_systimes" = yes; then
+      AC_DEFINE([HAVE_SYSTIMES],[1],[HAVE_SYSTIMES])
+   else
+      AC_DEFINE([LACKS_SYSTIMES],[1],[LACKS_SYSTIMES])
+   fi
+])
+
diff -r 000000000000 -r 5eda1a3f24e8 config/casc_cxx.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/casc_cxx.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,720 @@
+dnl
+dnl CASC C++ autoconf macros
+dnl
+dnl The following macros test various features of the C++ compiler, including:
+dnl
+dnl	- boolean types
+dnl	- namespace construct
+dnl	- template-based complex numbers
+dnl	- sstream.h header file with class ostringstream
+dnl	- new placement operator
+dnl	- explicit template instantiation
+dnl	- standard member function specialization
+dnl	- standard static data instantiation
+dnl	- standard static data specialization
+dnl	- static data specialization via pragmas
+dnl
+
+dnl
+dnl Check whether the C++ compiler supports the boolean built-in type.
+dnl
+dnl Variable:	casc_cv_cxx_have_bool = (yes|no)
+dnl Defines:	(HAVE|LACKS)_BOOL
+dnl
+
+AC_DEFUN([CASC_CXX_BOOL], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} supports bool)
+
+   AC_CACHE_VAL(casc_cv_cxx_have_bool, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([
+bool b = true;
+         ], [/* empty */],
+         casc_cv_cxx_have_bool=yes,
+         casc_cv_cxx_have_bool=no)
+      AC_LANG_RESTORE
+   ])
+   AC_MSG_RESULT($casc_cv_cxx_have_bool)
+
+   if test "$casc_cv_cxx_have_bool" = yes; then
+      AC_DEFINE([HAVE_BOOL],[1],[HAVE_BOOL])
+   else
+      AC_DEFINE([LACKS_BOOL],[1],[LACKS_BOOL])
+   fi
+])
+
+dnl
+dnl Check whether the C++ compiler supports the ANSI/ISO namespace construct.
+dnl
+dnl Variable:	casc_cv_cxx_have_namespace = (yes|no)
+dnl Defines:	(HAVE|LACKS)_NAMESPACE
+dnl
+
+AC_DEFUN([CASC_CXX_NAMESPACE], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} supports namespace)
+
+   AC_CACHE_VAL(casc_cv_cxx_have_namespace, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_LINK([
+namespace test {
+   int t();
+   int t() { return 0; } 
+}
+using namespace test;
+int foo() { int x = t(); x++; return x; }
+         ], [/* empty */],
+         casc_cv_cxx_have_namespace=yes,
+         casc_cv_cxx_have_namespace=no)
+      AC_LANG_RESTORE
+   ])
+   AC_MSG_RESULT($casc_cv_cxx_have_namespace)
+
+   if test "$casc_cv_cxx_have_namespace" = yes; then
+      AC_DEFINE([HAVE_NAMESPACE],[1],[HAVE_NAMESPACE])
+   else
+      AC_DEFINE([LACKS_NAMESPACE],[1],[LACKS_NAMESPACE])
+   fi
+])
+
+dnl
+dnl Check whether the C++ compiler supports cmath
+dnl
+dnl Variable:	casc_cv_cxx_have_cmath = (yes|no)
+dnl Defines:	(HAVE|LACKS)_CMATH
+dnl
+
+AC_DEFUN([CASC_CXX_CMATH], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} supports cmath)
+
+   AC_CACHE_VAL(casc_cv_cxx_have_cmath, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+         AC_TRY_COMPILE([
+#include <cmath>
+void foo() {
+   double temp = std::sin(0.0);
+}
+            ], [/* empty */],
+            casc_cv_cxx_have_cmath=yes,
+            casc_cv_cxx_have_cmath=no)
+         AC_LANG_RESTORE
+      ])
+
+   AC_MSG_RESULT($casc_cv_cxx_have_cmath)
+
+   if test "$casc_cv_cxx_have_cmath" = yes; then
+      AC_DEFINE([HAVE_CMATH],[1],[HAVE_CMATH])
+   else
+      AC_DEFINE([LACKS_CMATH],[1],[LACKS_CMATH])
+   fi
+])
+
+dnl
+dnl Check whether the C++ compiler supports template-based complex numbers.
+dnl
+dnl Variable:	casc_cv_cxx_have_template_comlex = (yes|no)
+dnl Defines:	(HAVE|LACKS)_TEMPLATE_COMPLEX
+dnl
+
+AC_DEFUN([CASC_CXX_TEMPLATE_COMPLEX], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} supports template-based complex numbers)
+
+   AC_CACHE_VAL(casc_cv_cxx_have_template_complex, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([
+#include <complex.h>
+void foo() {
+   complex<double> a(0.0, 1.0);
+}
+         ], [/* empty */],
+         casc_cv_cxx_have_template_complex=yes,
+         casc_cv_cxx_have_template_complex=no)
+      AC_LANG_RESTORE
+   ])
+
+   AC_MSG_RESULT($casc_cv_cxx_have_template_complex)
+
+   if test "$casc_cv_cxx_have_template_complex" = yes; then
+      AC_DEFINE([HAVE_TEMPLATE_COMPLEX],[1],[HAVE_TEMPLATE_COMPLEX])
+   else
+      AC_MSG_CHECKING(whether ${CXX} supports ISO template-based complex numbers)
+      AC_CACHE_VAL(casc_cv_cxx_have_template_complex_std, [
+         AC_LANG_SAVE
+         AC_LANG_CPLUSPLUS
+         AC_TRY_COMPILE([
+#include <complex>
+void foo() {
+   std::complex<double> a(0.0, 1.0);
+}
+            ], [/* empty */],
+            casc_cv_cxx_have_template_complex_std=yes,
+            casc_cv_cxx_have_template_complex_std=no)
+         AC_LANG_RESTORE
+      ])
+
+      AC_MSG_RESULT($casc_cv_cxx_have_template_complex_std)
+
+      if test "$casc_cv_cxx_have_template_complex_std" = yes; then
+         AC_DEFINE([HAVE_TEMPLATE_COMPLEX],[1],[HAVE_TEMPLATE_COMPLEX])
+      else
+         AC_DEFINE([LACKS_TEMPLATE_COMPLEX],[1],[LACKS_TEMPLATE_COMPLEX])
+      fi
+   fi
+])
+
+dnl
+dnl Check whether the C++ compiler supports sstream.h and class ostringstream.
+dnl
+dnl Variable:	casc_cv_cxx_have_sstream = (yes|no)
+dnl Defines:	(HAVE|LACKS)_SSTREAM
+dnl             NOTE: Also defines (HAVE|LACKS)_ISO_SSTREAM if compiler 
+dnl                   supports or does not support std ISO header file 
+dnl                   <sstream>.  This can be used determine a certain 
+dnl                   level of compiler support for std ISO header files. 
+dnl                   It is not intended to apply to all compilers.
+dnl
+
+AC_DEFUN([CASC_CXX_SSTREAM], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} supports sstream.h and class ostringstream)
+
+   AC_CACHE_VAL(casc_cv_cxx_have_sstream, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([
+#include <sstream.h>
+void foo() {
+//   char buffer[100];
+//   std::ostringstream os(buffer, 100);
+//   os << "hello, world...";
+   std::ostringstream out;
+   double f = 5.0;
+   int    g = 1;
+   out << "(" << f << "<some string>" << g << ")";
+}
+         ], [/* empty */],
+         casc_cv_cxx_have_sstream=yes,
+         casc_cv_cxx_have_sstream=no)
+      AC_LANG_RESTORE
+   ])
+
+   AC_MSG_RESULT($casc_cv_cxx_have_sstream)
+
+   if test "$casc_cv_cxx_have_sstream" = yes; then
+      AC_DEFINE([HAVE_SSTREAM],[1],[HAVE_SSTREAM])
+   else
+        AC_MSG_CHECKING(whether ${CXX} supports sstream and class ostringstream)
+	AC_CACHE_VAL(casc_cv_cxx_have_sstream_std, [
+        AC_LANG_SAVE
+        AC_LANG_CPLUSPLUS
+        AC_TRY_COMPILE([
+#include <sstream>
+void foo() {
+//   char buffer[100];
+//   std::ostringstream os(buffer, 100);
+//   os << "hello, world...";
+   std::ostringstream out;
+   double f = 5.0;
+   int    g = 1;
+   out << "(" << f << "<some string>" << g << ")";
+}
+         ], [/* empty */],
+        casc_cv_cxx_have_sstream_std=yes,
+        casc_cv_cxx_have_sstream_std=no)
+        AC_LANG_RESTORE
+        ])
+
+      AC_MSG_RESULT($casc_cv_cxx_have_sstream_std)
+
+      if test "$casc_cv_cxx_have_sstream_std" = yes; then
+         AC_DEFINE([HAVE_SSTREAM],[1],[HAVE_SSTREAM])
+         AC_DEFINE([HAVE_ISO_SSTREAM],[1],[HAVE_ISO_SSTREAM])
+      else
+         AC_DEFINE([LACKS_SSTREAM],[1],[LACKS_SSTREAM])
+         AC_DEFINE([LACK_ISO_SSTREAM],[1],[LACK_ISO_SSTREAM])
+      fi
+   fi
+])
+
+dnl
+dnl Check if left is supported
+dnl
+dnl Variable:	casc_cv_cxx_have_iomanip_left = (yes|no)
+dnl Defines:	(HAVE|LACKS)_IOMANIP_LEFT
+
+AC_DEFUN([CASC_CXX_IOMANIP_LEFT], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} defines the iomanip left operator)
+
+   AC_CACHE_VAL(casc_cv_cxx_have_iomanip_left, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_LINK([
+#include <iostream>
+#include <iomanip>
+using namespace std;
+
+void foo() 
+{
+   cout << left << 12.1;
+}
+         ], [/* empty */],
+         casc_cv_cxx_have_iomanip_left=yes,
+         casc_cv_cxx_have_iomanip_left=no)
+      AC_LANG_RESTORE
+   ])
+   AC_MSG_RESULT($casc_cv_cxx_have_iomanip_left)
+
+   if test "$casc_cv_cxx_have_iomanip_left" = yes; then
+      AC_DEFINE([HAVE_IOMANIP_LEFT],[1],[HAVE_IOMANIP_LEFT])
+   else
+      AC_DEFINE([LACKS_IOMANIP_LEFT],[1],[LACKS_IOMANIP_LEFT])
+   fi
+])
+
+
+dnl
+dnl Check whether the C++ compiler defines the new placement operator.
+dnl
+dnl Variable:	casc_cv_cxx_have_new_placement_operator = (yes|no)
+dnl Defines:	(HAVE|LACKS)_NEW_PLACEMENT_OPERATOR
+dnl
+
+AC_DEFUN([CASC_CXX_NEW_PLACEMENT_OPERATOR], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} defines the new placement operator)
+
+   AC_CACHE_VAL(casc_cv_cxx_have_new_placement_operator, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_LINK([
+#include <new>
+void trynew() {
+   void *ptr = 0;
+   double *data = new (ptr) double;
+}
+         ], [/* empty */],
+         casc_cv_cxx_have_new_placement_operator=yes,
+         casc_cv_cxx_have_new_placement_operator=no)
+      AC_LANG_RESTORE
+   ])
+
+   AC_MSG_RESULT($casc_cv_cxx_have_new_placement_operator)
+
+   if test "$casc_cv_cxx_have_new_placement_operator" = yes; then
+      AC_DEFINE([HAVE_NEW_PLACEMENT_OPERATOR],[1],[HAVE_NEW_PLACEMENT_OPERATOR])
+   else
+      AC_DEFINE([LACKS_NEW_PLACEMENT_OPERATOR],[1],[LACKS_NEW_PLACEMENT_OPERATOR])
+   fi
+])
+
+dnl
+dnl Check whether the C++ compiler supports explicit template instantiation.
+dnl
+dnl Variable:	casc_cv_cxx_have_explicit_template_instantiation = (yes|no)
+dnl Defines:	(HAVE|LACKS)_EXPLICIT_TEMPLATE_INSTANTIATION
+dnl
+dnl The explicit template instantiation syntax forces the compiler to
+dnl instantiate a template of the specified type.  For example,
+dnl
+dnl	template <class T> class Pointer {
+dnl	   public: T *value;
+dnl	};
+dnl	#ifndef LACKS_EXPLICIT_TEMPLATE_INSTANTIATION
+dnl	template class Pointer<int>;
+dnl	#endif
+dnl
+dnl will create the code for a Pointer of type int.  If this syntax is
+dnl not allowed, then the compiler must define some other mechanism for
+dnl automatically generating template code.
+dnl
+
+AC_DEFUN([CASC_CXX_EXPLICIT_TEMPLATE_INSTANTIATION], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} supports explicit template instantiation)
+   AC_CACHE_VAL(casc_cv_cxx_have_explicit_template_instantiation, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([
+template <class T> class Pointer { public: T *value; };
+template class Pointer<int>;
+         ], [/* empty */],
+         casc_cv_cxx_have_explicit_template_instantiation=yes,
+         casc_cv_cxx_have_explicit_template_instantiation=no)
+      AC_LANG_RESTORE
+   ])
+   AC_MSG_RESULT($casc_cv_cxx_have_explicit_template_instantiation)
+
+   if test "$casc_cv_cxx_have_explicit_template_instantiation" = yes; then
+      AC_DEFINE([HAVE_EXPLICIT_TEMPLATE_INSTANTIATION],[1],[HAVE_EXPLICIT_TEMPLATE_INSTANTIATION])
+   else
+      AC_DEFINE([LACKS_EXPLICIT_TEMPLATE_INSTANTIATION],[1],[LACKS_EXPLICIT_TEMPLATE_INSTANTIATION])
+   fi
+])
+
+dnl
+dnl Check whether the C++ compiler supports member function specialization.
+dnl
+dnl Variable:	casc_cv_cxx_have_member_function_specialization = (yes|no)
+dnl Defines:	(HAVE|LACKS)_MEMBER_FUNCTION_SPECIALIZATION
+dnl
+dnl The ANSI/ISO member function specialization syntax is used when defining
+dnl a specialized member function of a template class.  For example:
+dnl
+dnl	template <class T> class Pointer {
+dnl	   public: void foo();
+dnl	};
+dnl	#ifndef LACKS_MEMBER_FUNCTION_SPECIALIZATION
+dnl	template <>
+dnl	#endif
+dnl     void Pointer<int>::foo() { }
+dnl
+dnl will define the specialized version of Pointer<int>::foo().  Some
+dnl compilers such as GNU g++ cannot parse the template <> syntax.
+dnl
+
+AC_DEFUN([CASC_CXX_MEMBER_FUNCTION_SPECIALIZATION], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} supports member function specialization)
+   AC_CACHE_VAL(casc_cv_cxx_have_member_function_specialization, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([
+template <class T> class Pointer { public: void foo(); };
+template <> void Pointer<int>::foo();
+template <> void Pointer<int>::foo() { }
+         ], [/* empty */],
+         casc_cv_cxx_have_member_function_specialization=yes,
+         casc_cv_cxx_have_member_function_specialization=no)
+      AC_LANG_RESTORE
+   ])
+
+   dnl ASCI Red compiles but does not generate the code so manually
+   dnl set this
+   case $ARCH in
+      ipsc2)
+         casc_cv_cxx_have_member_function_specialization=no
+         ;;
+   esac
+
+   AC_MSG_RESULT($casc_cv_cxx_have_member_function_specialization)
+   if test "$casc_cv_cxx_have_member_function_specialization" = yes; then
+      AC_DEFINE([HAVE_MEMBER_FUNCTION_SPECIALIZATION],[1],[HAVE_MEMBER_FUNCTION_SPECIALIZATION])
+   else
+      AC_DEFINE([LACKS_MEMBER_FUNCTION_SPECIALIZATION],[1],[LACKS_MEMBER_FUNCTION_SPECIALIZATION])
+   fi
+
+])
+
+dnl
+dnl Check whether the C++ compiler supports static data instantiation.
+dnl
+dnl Variable:	casc_cv_cxx_have_static_data_instantiation = (yes|no)
+dnl Defines:	(HAVE|LACKS)_STATIC_DATA_INSTANTIATION
+dnl
+dnl The ANSI/ISO specifies that the default values of the static data members
+dnl of a template class may be defined as follows:
+dnl
+dnl	template <class T> class Pointer {
+dnl	   public: static T *s_test;
+dnl	};
+dnl	#ifndef LACKS_STATIC_DATA_INSTANTIATION
+dnl	template <class T> T* Pointer<T>::s_test = (T*) 0;
+dnl	#endif
+dnl
+dnl Some compilers such as GNU g++ cannot parse the generic static data member
+dnl instantiation syntax and require that static data members for type T be
+dnl explicitly specified to instantiate the data member.
+
+AC_DEFUN([CASC_CXX_STATIC_DATA_INSTANTIATION], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} supports static data instantiation)
+   AC_CACHE_VAL(casc_cv_cxx_have_static_data_instantiation, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([
+template <class T> class Pointer { public: void foo(); };
+template <> void Pointer<int>::foo() { }
+         ], [/* empty */],
+         casc_cv_cxx_have_static_data_instantiation=yes,
+         casc_cv_cxx_have_static_data_instantiation=no)
+      AC_LANG_RESTORE
+   ])
+   AC_MSG_RESULT($casc_cv_cxx_have_static_data_instantiation)
+   if test "$casc_cv_cxx_have_static_data_instantiation" = yes; then
+      AC_DEFINE([HAVE_STATIC_DATA_INSTANTIATION],[1],[HAVE_STATIC_DATA_INSTANTIATION])
+   else
+      AC_DEFINE([LACKS_STATIC_DATA_INSTANTIATION],[1],[LACKS_STATIC_DATA_INSTANTIATION])
+   fi
+])
+
+dnl
+dnl Check whether the C++ compiler supports standard static data specialization.
+dnl
+dnl Variable:	casc_cv_cxx_have_standard_static_data_specialization = (yes|no)
+dnl Defines:	(HAVE|LACKS)_STANDARD_STATIC_DATA_SPECIALIZATION
+dnl
+dnl The ANSI/ISO specifies that static data members of a template class may
+dnl be specialized as follows:
+dnl
+dnl	template <class T> class Pointer {
+dnl	   public: static T *s_test;
+dnl	};
+dnl	template <> int *Pointer<int>::s_test;
+dnl	template <> int *Pointer<int>::s_test = (int*) 0;
+dnl	template class Pointer<int>;
+dnl
+dnl Some compilers such as GNU g++ and older versions of KCC cannot parse
+dnl this syntax and use other methods (such as pragmas or different syntax).
+dnl
+
+AC_DEFUN([CASC_CXX_STANDARD_STATIC_DATA_SPECIALIZATION], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} supports standard static data specialization)
+   AC_CACHE_VAL(casc_cv_cxx_have_standard_static_data_specialization, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([
+template <class T> class Pointer { public: static T *s_test; };
+template <> int *Pointer<int>::s_test;
+int test() { Pointer<int> P; return(*P.s_test); }
+template <> int *Pointer<int>::s_test = (int*) 0;
+template class Pointer<int>;
+         ], [/* empty */],
+         casc_cv_cxx_have_standard_static_data_specialization=yes,
+         casc_cv_cxx_have_standard_static_data_specialization=no)
+      AC_LANG_RESTORE
+   ])
+   AC_MSG_RESULT($casc_cv_cxx_have_standard_static_data_specialization)
+   if test "$casc_cv_cxx_have_standard_static_data_specialization" = yes; then
+      AC_DEFINE([HAVE_STANDARD_STATIC_DATA_SPECIALIZATION],[1],[HAVE_STANDARD_STATIC_DATA_SPECIALIZATION])
+   else
+      AC_DEFINE([LACKS_STANDARD_STATIC_DATA_SPECIALIZATION],[1],[LACKS_STANDARD_STATIC_DATA_SPECIALIZATION])
+   fi
+])
+
+dnl
+dnl Check whether the C++ compiler supports pragma static data specialization.
+dnl
+dnl Variable:	casc_cv_cxx_have_pragma_static_data_specialization = (yes|no)
+dnl Defines:	(HAVE|LACKS)_PRAGMA_STATIC_DATA_SPECIALIZATION
+dnl
+dnl Some compilers support the specialization of a static data member of a
+dnl template class using the following syntax:
+dnl
+dnl	template <class T> class Pointer {
+dnl	   public: static T *s_test;
+dnl	};
+dnl	#pragma do_not_instantiate int *Pointer<int>::s_test
+dnl	template <> int *Pointer<int>::s_test = (int*) 0;
+dnl	template class Pointer<int>;
+dnl
+dnl This syntax is supported by older versions of KCC.  Note that this
+dnl macro should be used ONLY if the standard static data specialization
+dnl syntax fails.
+dnl
+
+AC_DEFUN([CASC_CXX_PRAGMA_STATIC_DATA_SPECIALIZATION], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} supports pragma static data specialization)
+   AC_CACHE_VAL(casc_cv_cxx_have_pragma_static_data_specialization, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([
+template <class T> class Pointer { public: static T *s_test; };
+#pragma do_not_instantiate int *Pointer<int>::s_test
+int test() { Pointer<int> P; return(*P.s_test); }
+template <> int *Pointer<int>::s_test = (int*) 0;
+template class Pointer<int>;
+         ], [/* empty */],
+         casc_cv_cxx_have_pragma_static_data_specialization=yes,
+         casc_cv_cxx_have_pragma_static_data_specialization=no)
+      AC_LANG_RESTORE
+   ])
+   AC_MSG_RESULT($casc_cv_cxx_have_pragma_static_data_specialization)
+   if test "$casc_cv_cxx_have_pragma_static_data_specialization" = yes; then
+      AC_DEFINE([HAVE_PRAGMA_STATIC_DATA_SPECIALIZATION],[1],[HAVE_PRAGMA_STATIC_DATA_SPECIALIZATION])
+   else
+      AC_DEFINE([LACKS_PRAGMA_STATIC_DATA_SPECIALIZATION],[1],[LACKS_PRAGMA_STATIC_DATA_SPECIALIZATION])
+   fi
+])
+
+dnl
+dnl Check whether the C++ compiler supports exception handling.
+dnl
+dnl Variable:	casc_cv_cxx_have_exception_handling = (yes|no)
+dnl Defines:	(HAVE|LACKS)_EXCEPTION_HANDLING
+dnl
+dnl Compilers that support exception handling will support the following  
+dnl operation: 
+dnl
+dnl static void byebye(int error) {
+dnl    fprintf(stderr, "floating point exception\n");   abort(); 
+dnl }
+dnl int main(int argc, char** argv) {
+dnl    unsigned short fpu_flags = _FPU_DEFAULT;
+dnl    fpu_flags &= ~_FPU_MASK_IM;  /* Execption on Invalid operation */
+dnl    fpu_flags &= ~_FPU_MASK_ZM;  /* Execption on Division by zero  */
+dnl    fpu_flags &= ~_FPU_MASK_OM;  /* Execption on Overflow */
+dnl    _FPU_SETCW(fpu_flags);
+dnl    signal(SIGFPE, byebye);  /* Invoke byebye when above occurs */
+dnl }
+dnl
+dnl
+AC_DEFUN([CASC_CXX_EXCEPTION_HANDLING], [
+    AC_REQUIRE([AC_PROG_CXX])
+    AC_MSG_CHECKING(whether ${CXX} supports exception handling)
+    AC_CACHE_VAL(casc_cv_cxx_have_exception_handling, [
+       AC_LANG_SAVE
+       AC_LANG_CPLUSPLUS
+       AC_TRY_COMPILE([
+#include <fpu_control.h>
+#include <signal.h>
+static void byebye(int error) { }
+void foo() {
+   unsigned short fpu_flags = _FPU_DEFAULT;
+   fpu_flags &= ~_FPU_MASK_IM;  /* Execption on Invalid operation */
+   fpu_flags &= ~_FPU_MASK_ZM;  /* Execption on Division by zero  */
+   fpu_flags &= ~_FPU_MASK_OM;  /* Execption on Overflow */
+   _FPU_SETCW(fpu_flags);
+   signal(SIGFPE, byebye);
+}
+         ], [/* empty */],
+         casc_cv_cxx_have_exception_handling=yes,
+         casc_cv_cxx_have_exception_handling=no)
+       AC_LANG_RESTORE
+    ])
+    AC_MSG_RESULT($casc_cv_cxx_have_exception_handling)
+    if test "$casc_cv_cxx_have_exception_handling" = yes; then
+       AC_DEFINE([HAVE_EXCEPTION_HANDLING],[1],[HAVE_EXCEPTION_HANDLING])
+    else
+       AC_DEFINE([LACKS_EXCEPTION_HANDLING],[1],[LACKS_EXCEPTION_HANDLING])
+    fi
+])
+
+
+dnl
+dnl Determines which form of isnan is present
+dnl 
+dnl Defines:	(HAVE|LACKS)_CMATH_ISNAN
+dnl             (HAVE|LACKS)_ISNAN
+dnl  	        (HAVE|LACKS)_ISNAND
+dnl  	        (HAVE|LACKS)_INLINE_ISNAND
+dnl
+dnl isnan is part of C99 spec and not necessarily available under
+dnl ISO C++.  Test for some other possible functions.
+dnl
+AC_DEFUN([CASC_CXX_ISNAN], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(checking for isnan in cmath)
+
+   AC_LANG_SAVE
+   AC_LANG_CPLUSPLUS
+   AC_TRY_COMPILE([ #include <cmath> ], 
+      [ int test = std::isnan(0.0); ],
+      casc_cv_cxx_have_isnan=yes,
+      casc_cv_cxx_have_isnan=no)
+   AC_LANG_RESTORE
+
+   AC_MSG_RESULT($casc_cv_cxx_have_isnan)
+
+   if test "$casc_cv_cxx_have_isnan" = yes; then
+      AC_DEFINE([HAVE_CMATH_ISNAN],[1],[HAVE_CMATH_ISNAN])
+   else
+      AC_DEFINE([LACKS_CMATH_ISNAN],[1],[LACKS_CMATH_ISNAN])
+
+      AC_MSG_CHECKING(checking for isnan in math.h)
+
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([#include <math.h>], 
+         [int test = isnan(0.0);],
+         casc_cv_cxx_have_isnan=yes,
+         casc_cv_cxx_have_isnan=no)
+      AC_LANG_RESTORE
+
+      AC_MSG_RESULT($casc_cv_cxx_have_isnan)
+
+      if test "$casc_cv_cxx_have_isnan" = yes; then
+         AC_DEFINE([HAVE_ISNAN],[1],[HAVE_ISNAN])
+      else
+         AC_DEFINE([LACKS_ISNAN],[1],[LACKS_ISNAN])
+
+         AC_MSG_CHECKING(checking for __isnand)
+
+         AC_LANG_SAVE
+         AC_LANG_CPLUSPLUS
+         AC_TRY_COMPILE([#include <math.h>],
+            [int test = __isnand(0.0);],
+            casc_cv_cxx_have_isnand=yes,
+            casc_cv_cxx_have_isnand=no)
+         AC_LANG_RESTORE
+  
+         AC_MSG_RESULT($casc_cv_cxx_have_isnand)
+         if test "$casc_cv_cxx_have_isnand" = yes; then
+            AC_DEFINE([HAVE_ISNAND],[1],[HAVE_ISNAND])
+         else
+            AC_DEFINE([LACKS_ISNAND],[1],[LACKS_ISNAND])
+
+            AC_MSG_CHECKING(checking for __inline_isnand)
+
+            AC_LANG_SAVE
+            AC_LANG_CPLUSPLUS
+            AC_TRY_COMPILE([#include <math.h>],
+                 [int test = __inline_isnand(0.0);],
+                casc_cv_cxx_have_inline_isnan=yes,
+                casc_cv_cxx_have_inline_isnan=no)
+              AC_LANG_RESTORE
+
+            AC_MSG_RESULT($casc_cv_cxx_have_inline_isnan)
+            if test "$casc_cv_cxx_have_inline_isnan" = yes; then
+               AC_DEFINE([HAVE_INLINE_ISNAND],[1],[HAVE_INLINE_ISNAND])
+            else
+               AC_DEFINE([LACKS_INLINE_ISNAND],[1],[LACKS_INLINE_ISNAND])
+           fi
+	fi
+      fi
+   fi
+])
+
+
+dnl
+dnl Check whether the GNU C++ compiler needs float NAN templates
+dnl
+dnl Variable:	casc_cv_cxx_have_isnan_template = (yes|no)
+dnl Defines:	(HAVE|LACKS)_ISNAN_TEMPLATE
+dnl
+
+AC_DEFUN([CASC_CXX_ISNAN_TEMPLATE], [
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether ${CXX} needs isnan templates)
+
+   AC_CACHE_VAL(casc_cv_cxx_have_isnan_template, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([
+
+#include <complex>
+
+template int __gnu_cxx::isnan<float>(float);
+template int __gnu_cxx::__capture_isnan<float>(float);
+         ], [/* empty */],
+         casc_cv_cxx_have_isnan_template=yes,
+         casc_cv_cxx_have_isnan_template=no)
+      AC_LANG_RESTORE
+   ])
+   AC_MSG_RESULT($casc_cv_cxx_have_isnan_template)
+
+   if test "$casc_cv_cxx_have_isnan_template" = yes; then
+      AC_DEFINE([HAVE_ISNAN_TEMPLATE],[1],[HAVE_ISNAN_TEMPLATE])
+   else
+      AC_DEFINE([LACKS_ISNAN_TEMPLATE],[1],[LACKS_ISNAN_TEMPLATE])
+   fi
+])
diff -r 000000000000 -r 5eda1a3f24e8 config/casc_fortran.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/casc_fortran.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,641 @@
+
+dnl ******************************************************************
+dnl * CASC_PROG_F77 searches the PATH for an available Fortran 77
+dnl * compiler. It assigns the name of the compiler to F77.
+dnl ******************************************************************
+
+AC_DEFUN([CASC_PROG_F77],
+[
+   if test -z "$F77"; then
+      AC_CHECK_PROGS(F77, f77 g77 xlf cf77 if77 nf77)
+      test -z "$F77" && AC_MSG_ERROR([no acceptable f77 found in \$PATH])
+      FFLAGS="-g -O"
+      AC_SUBST(FFLAGS)
+   fi
+])dnl
+
+
+dnl **********************************************************************
+dnl * CASC_PROG_FPP searches the PATH for a preprocessor for Fortran files
+dnl * with preprocessor directives
+dnl **********************************************************************
+
+AC_DEFUN([CASC_PROG_FPP],
+[
+   AC_CHECK_PROGS(FPP, fpp cpp "$CC -E" "cc -E" "gcc -E")
+   test -z "$FPP" && AC_MSG_ERROR([no acceptable fpp found in \$PATH])
+])dnl
+
+
+dnl **********************************************************************
+dnl * CASC_CHECK_F77_PP checks whether the preprocessor needs to
+dnl * be called before calling the compiler for Fortran files with
+dnl * preprocessor directives.  If the preprocessor is necessary,
+dnl * F77NEEDSPP is set to "yes", otherwise it is set to "no"
+dnl **********************************************************************
+
+AC_DEFUN([CASC_CHECK_F77_PP],
+[
+   AC_REQUIRE([CASC_PROG_F77])
+
+   rm -f testpp.o
+
+   AC_MSG_CHECKING(whether $FPP needs to be called before $F77)
+
+   # This is a dumb little fortran program with C preprocessor calls
+   # It will compile only if $F77 has a built-in preprocessor
+
+   cat > testpp.F << EOF
+#define FOO 3
+	program testpp
+	integer num
+        integer sum
+        num = FOO
+#ifdef FOO
+        sum = num + num
+#else
+        sum = num + num + num
+#endif
+        end 
+EOF
+
+   # Compile the program and set $F77NEEDSPP appropriately
+   $F77 -DBAR -c testpp.F  > /dev/null 2>&1
+   if test -f testpp.o; then 
+      F77NEEDSPP=no 
+   else 
+      F77NEEDSPP=yes 
+   fi
+
+   AC_MSG_RESULT($F77NEEDSPP)
+   rm -f testpp.o testpp.F
+
+   AC_SUBST(F77NEEDSPP)
+])dnl
+
+
+
+dnl **********************************************************************
+dnl * CASC_CHECK_LIB_FORTRAN(LIBRARY, [, ACTION-IF-FOUND [,
+dnl *                        ACTION-IF-NOT-FOUND [, OTHER-LIBRARIEs]]])
+dnl * 
+dnl * Checks whether LIBRARY can be used to link a sample C function
+dnl * that contains a call to a sample Fortran 77 function. If linking
+dnl * is successful, ACTION-IF-FOUND is executed, otherwise
+dnl * ACTION-IF-NOT-FOUND is executed.  The default for ACTION-IF-FOUND is
+dnl * to add -lLIBRARY to $LIBS.  The default for ACTION-IF-NOT-FOUND is
+dnl * nothing.  OTHER-LIBRARIES can include the full names of libraries in
+dnl * the current directory, -l flags specifying other libraries, -L tags
+dnl * specifying the location of libraries (This macro may not check the
+dnl * same lib directories as would be checked by the linker by default on
+dnl * the command line.), and/or the names of object files, all separated
+dnl * by a space, whatever might be necessary for successful linkage.
+dnl **********************************************************************
+
+AC_DEFUN([CASC_CHECK_LIB_FORTRAN],
+[
+   # This macro needs a f77 compiler and knowledge of the name-mangling scheme
+   AC_REQUIRE([CASC_PROG_F77])
+   AC_REQUIRE([PAC_GET_FORTNAMES])
+
+   if test -z "$FORTRANNAMES" ; then
+      NAMESTYLE="FORTRANNOUNDERSCORE"
+   else
+      NAMESTYLE=$FORTRANNAMES
+   fi
+
+   # This is a little subroutine to be called later by a C main function
+   cat > testflib_.f << EOF
+        subroutine testflib(i)
+        integer i
+        print *, "This tests which libraries work"
+        return
+        end
+EOF
+
+   $F77 -c testflib_.f > /dev/null 2>&1
+
+   # Mangle testflib's name appropriatiately
+   case $NAMESTYLE in
+      FORTRANDOUBLEUNDERSCORE)
+         THIS_FUNCTION=testflib_;;
+
+      FORTRANUNDERSCORE)
+         THIS_FUNCTION=testflib_;;
+
+      FORTRANCAPS)
+         THIS_FUNCTION=TESTFLIB;;
+
+      FORTRANNOUNDERSCORE)
+         THIS_FUNCTION=testflib;;
+
+   esac
+
+   # Checks if the LIBRARY from the argument list can be used to link
+   # a C test program with testflib
+   AC_CHECK_LIB($1, $THIS_FUNCTION, $2, $3, testflib_.o $4)
+
+   rm -f testflib_.o testflib_.f
+
+])dnl
+
+
+dnl ********************************************************************* 
+dnl * CASC_SET_F77LIBS sets the necessary library flags for linking C and
+dnl * Fortran 77 codes with the C linker.  The necessary -l flags are put 
+dnl * into the variable F77LIBS, and the necessary -L flags are put into  
+dnl * the variable F77LIBDIRS.  This macro first checks to see if the
+dnl * shell variable $F77LIBS is already set.  If so, the preset value is
+dnl * used.  Otherwise this macro only works for known architectures.
+dnl *********************************************************************
+
+AC_DEFUN([CASC_SET_F77LIBS],
+[
+   AC_REQUIRE([CASC_GUESS_ARCH])
+   AC_REQUIRE([CASC_PROG_F77])
+
+   if test -z "$casc_f77_libs"; then
+      case $ARCH in 
+         sun4 | solaris)
+            case $F77 in
+               *g77)
+                   CASC_CHECK_LIB_FORTRAN(f2c,
+                                          F77LIBDIRS="-L/home/casc/g77/lib"
+                                          F77LIBS="-lf2c"
+                                          , ,
+                                          -L/home/casc/g77/lib -lf2c);;
+               *)
+                  CASC_CHECK_LIB_FORTRAN(sunmath,
+                                   F77LIBDIRS="-L/opt/SUNWspro/SC5.0/lib"
+                                   F77LIBS="-lF77 -lsunmath"
+                                   , ,
+                                   -L/opt/SUNWspro/SC5.0/lib -lF77 -lsunmath);;
+               esac
+         ;;
+         alpha)
+            CASC_CHECK_LIB_FORTRAN(for, F77LIBS="-lfor", , );;
+
+         rs6000)
+            CASC_CHECK_LIB_FORTRAN(xlf90, F77LIBS="-lxlf90", , );;
+
+         IRIX64 | iris4d)
+            CASC_CHECK_LIB_FORTRAN(I77, 
+                                  F77LIBS="-lF77 -lU77 -lI77 -lisam", ,
+                                  -lF77 -lU77 -lI77 -lisam);;
+
+         *)
+            AC_MSG_WARN(
+[unable to set F77LIBFLAGS.  They must be set as a shell variable or
+ with a command-line option])
+         ;;             
+
+      esac
+
+   else
+      if test -n "$casc_f77_lib_dirs"; then
+         for casc_lib_dir in $casc_f77_lib_dirs; do
+            F77LIBDIRS="-L$casc_lib_dir $F77LIBDIRS"       
+         done
+      fi
+
+      for casc_lib in $casc_f77_libs; do
+         F77LIBS="$F77LIBS -l$casc_lib"
+      done
+   fi
+
+   F77LIBFLAGS="$F77LIBDIRS $F77LIBS"
+])dnl
+
+
+dnl *********************************************************************
+dnl * CASC_FIND_F77LIBS may be a replacement for CASC_SET_F77LIBS.  This
+dnl * macro automatically finds the flags necessary to located the 
+dnl * libraries needed for a Fortran/C interface.  It is more robust than
+dnl * CASC_SET_F77LIBS, because it is not based on the architecture name.
+dnl * The test is performed directly on the Fortran compiler using the
+dnl * macro LF_FLIBS. When CASC_FIND_F77LIBS is included in configure.in,
+dnl * it will set the variable F77LIBFLAGS to be a list of flags, which 
+dnl * will probably be a set of -L, -R, -l, and -u flags, as well as
+dnl * perhaps the absolute paths of some libraries.  The drawback to this
+dnl * macro is that it will usually insert some flags (mostly -L flags) 
+dnl * that aren't needed, but hopefully they will be harmless.  I haven't
+dnl * seen the extra flags that are included by this macro break anything
+dnl * yet.  Hopefully more testing on more machines will give confidence
+dnl * that this really works and will be able to set up the Fortran links
+dnl * on an unknown system.  If this macro sets up nothing, then
+dnl * CASC_SET_F77LIBS is called as a backup
+dnl *********************************************************************
+
+AC_DEFUN([CASC_FIND_F77LIBS],
+[
+   AC_CACHE_CHECK([for Fortran libraries], casc_cv_f77flags,
+   [
+      if test -z "$F77LIBFLAGS"; then
+         dnl * LF_FLIBS creates variable $flibs_result containing a list of 
+         dnl * flags related to the Fortran compiler
+         LF_FLIBS
+         for casc_flag in $flibs_result; do
+
+            dnl * Here we sort the flags in $flibs_result
+            case $casc_flag in
+            [-l* | /*)]
+               casc_f77_libs="$casc_f77_libs $casc_flag"
+            ;;
+            [-L*)]
+               casc_f77_dirs="$casc_flag $casc_f77_dirs"
+            ;;
+            [*)]
+               casc_other_flags="$casc_other_flags $casc_flag"
+            ;;
+            esac
+         done
+
+         F77LIBFLAGS="$casc_other_flags $casc_f77_dirs"
+
+
+         if test -n "`echo $F77LIBFLAGS | grep '\-R/'`"; then
+            F77LIBFLAGS=`echo $F77LIBFLAGS | sed 's/-R\//-R \//'`
+         fi
+	 
+	 dnl Strip off quotes.  This was needed for mpi wrappers.
+         dnl This is potentially bad.
+         F77LIBFLAGS=`echo $F77LIBFLAGS | sed 's/\"//'`
+         casc_f77_libs=`echo $casc_f77_libs | sed 's/\"//'`
+
+         dnl * each -l flag is checked using CASC_CHECK_LIB_FORTRAN, until
+         dnl * successful linking of a test program is accomplished, at which
+         dnl * time the loop is broken.  If successful linking does not occur,
+         dnl * CASC_CHECK_LIB will check for the library's existence and add
+         dnl * to F77LIBFLAGS if it exists.  All libraries listed by explicit
+         dnl * path are added to F77LIBFLAGS
+         for casc_flag in $casc_f77_libs; do
+
+            case $casc_flag in
+
+            [/*)]
+               if test -f "$casc_flag"; then
+                  F77LIBFLAGS="$F77LIBFLAGS $casc_flag"
+               fi
+            ;;
+
+            [-l*)]
+
+               casc_lib_name=`echo "$casc_flag" | sed 's/-l//g'`
+               CASC_CHECK_LIB_FORTRAN($casc_lib_name,
+                  F77LIBFLAGS="$F77LIBFLAGS $casc_flag"
+                  casc_result=yes,
+                  F77LIBFLAGS="$F77LIBFLAGS $casc_flag",
+                  $F77LIBFLAGS)
+ 
+            if test "$casc_result" = yes; then 
+               casc_result=
+               break
+            fi
+            ;;
+         esac
+         done
+ 
+         # if this macro didn't work call CASC_SET_F77LIBS
+         if test -z "$F77LIBFLAGS"; then
+            CASC_SET_F77LIBS
+
+         fi        
+
+         dnl if PGI remove the include of the gcc libs, 
+         dnl causes problem with Intel compilers
+         if test -n "`echo $F77 | grep pgf77`"; then
+            F77LIBFLAGS=`echo $F77LIBFLAGS | sed 's/-lgcc//g'`
+         fi
+
+         dnl * On IBM don't use the links to poe library directories coming
+         dnl * out of the fortran compiler
+         if test -n "`echo $F77LIBFLAGS | grep xlf`"; then
+             F77LIBFLAGS=`echo $F77LIBFLAGS | sed 's/-L\/lib\/threads//g'`
+             F77LIBFLAGS=`echo $F77LIBFLAGS | sed 's/-L\/usr\/lpp\/ppe.poe\/lib\/threads//g'`
+             F77LIBFLAGS=`echo $F77LIBFLAGS | sed 's/-L\/usr\/lpp\/ppe.poe\/lib\/ip//g'`
+             F77LIBFLAGS=`echo $F77LIBFLAGS | sed 's/-L\/usr\/lpp\/ppe.poe\/lib//g'`
+             F77LIBFLAGS=`echo $F77LIBFLAGS | sed 's/-L\/usr\/lpp\/ppe.poe\/lib//g'`
+             F77LIBFLAGS=`echo $F77LIBFLAGS | sed 's/-lmpi_r//g'`
+             F77LIBFLAGS=`echo $F77LIBFLAGS | sed 's/-lvtd_r//g'`
+         fi
+      fi
+
+      casc_cv_f77flags=$F77LIBFLAGS
+   ])
+
+   dnl in case we are getting library flags from cached values
+   F77LIBFLAGS=$casc_cv_f77flags
+
+   AC_SUBST(F77LIBFLAGS)
+
+])dnl
+
+
+dnl * The following are macros copied from outside sources
+
+
+dnl ********************************************************************
+dnl * CASC_GET_FORTNAMES is a wrapper for the macro PAC_GET_FORTNAMES.
+dnl * The two can be used interchangeably.
+dnl *
+dnl * PAC_GET_FORTNAMES is distributed with mpich.  It checks what format
+dnl * is used to call Fortran subroutines in C functions.  This macro
+dnl * defines the shell variable $FORTRANNAMES and creates -D  
+dnl * preprocessor flags that tell what the Fortran name-mangling is.  The
+dnl * preprocessor macros defined are FORTRAN_DOUBLE_UNDERSCORE,
+dnl * FORTRAN_UNDERSCORE, FORTRAN_CAPS, and FORTRAN_NO_UNDERSCORE.  The
+dnl * possible values for FORTRANNAMES are the same words without
+dnl * underscores.
+dnl * 
+dnl * Changes:
+dnl *    AC_DEFINE lines to define preprocessor macros that are assigned
+dnl *    to DEFS added by Noah Elliott May 18, 1998
+dnl ********************************************************************
+
+AC_DEFUN([CASC_GET_FORTNAMES],
+[
+   PAC_GET_FORTNAMES
+])dnl
+
+AC_DEFUN([PAC_GET_FORTNAMES],[
+   # Check for strange behavior of Fortran.  For example, some FreeBSD
+   # systems use f2c to implement f77, and the version of f2c that they
+   # use generates TWO (!!!) trailing underscores 
+   # Currently, WDEF is not used but could be...
+   #
+   # Eventually, we want to be able to override the choices here and
+   # force a particular form.  This is particularly useful in systems
+   # where a Fortran compiler option is used to force a particular
+   # external name format (rs6000 xlf, for example).
+   cat > confftest.f <<EOF
+       subroutine mpir_init_fop( a )
+       integer a
+       a = 1
+       return
+       end
+EOF
+   $F77 $FFLAGS -c confftest.f > /dev/null 2>&1
+   if test ! -s confftest.o ; then
+        AC_MSG_ERROR([Unable to compile a Fortran test program])
+        NOF77=1
+        HAS_FORTRAN=0
+   elif test -z "$FORTRANNAMES" ; then
+    # We have to be careful here, since the name may occur in several  
+    # forms.  We try to handle this by testing for several forms
+    # directly.
+    if test $arch_CRAY ; then
+     # Cray doesn't accept -a ...
+     nameform1=`strings confftest.o | grep mpir_init_fop_  | head -1`
+     nameform2=`strings confftest.o | grep MPIR_INIT_FOP   | head -1`
+     nameform3=`strings confftest.o | grep mpir_init_fop   | head -1`
+     nameform4=`strings confftest.o | grep mpir_init_fop__ | head -1`
+    else
+     nameform1=`strings -a confftest.o | grep mpir_init_fop_  | head -1`
+     nameform2=`strings -a confftest.o | grep MPIR_INIT_FOP   | head -1`
+     nameform3=`strings -a confftest.o | grep mpir_init_fop   | head -1`
+     nameform4=`strings -a confftest.o | grep mpir_init_fop__ | head -1`
+    fi
+    /bin/rm -f confftest.f confftest.o
+    AC_MSG_CHECKING(Fortran external names)
+    if test -n "$nameform4" ; then
+        AC_DEFINE([FORTRAN_DOUBLE_UNDERSCORE],[1],[FORTRAN_DOUBLE_UNDERSCORE])
+        AC_MSG_RESULT(lowercase with one or two trailing underscores)
+        FORTRANNAMES="FORTRANDOUBLEUNDERSCORE"
+    elif test -n "$nameform1" ; then
+        # We don't set this in CFLAGS; it is a default case
+        AC_DEFINE([FORTRAN_UNDERSCORE],[1],[FORTRAN_UNDERSCORE])
+        AC_MSG_RESULT(lowercase with a trailing underscore)
+        FORTRANNAMES="FORTRANUNDERSCORE"
+    elif test -n "$nameform2" ; then
+        AC_DEFINE([FORTRAN_CAPS],[1],[FORTRAN_CAPS])
+        AC_MSG_RESULT(uppercase)
+        FORTRANNAMES="FORTRANCAPS"
+    elif test -n "$nameform3" ; then
+        AC_DEFINE([FORTRAN_NO_UNDERSCORE],[1],[FORTRAN_NO_UNDERSCORE])
+        AC_MSG_RESULT(lowercase)
+        FORTRANNAMES="FORTRANNOUNDERSCORE"
+    else
+        AC_MSG_RESULT(unknown)
+#       print_error "If you have problems linking, try using the -nof77 option"
+#        print_error "to configure and rebuild MPICH."
+        NOF77=1
+        HAS_FORTRAN=0
+    fi
+    fi
+    rm -f confftest.f confftest.o
+    if test -n "$FORTRANNAMES" ; then
+        WDEF="-D$FORTRANNAMES"
+    fi  
+    ])dnl
+
+
+dnl ****************************************************************
+dnl * LF_FLIBS was copied from E. Gkioulekas' autotools package for use in
+dnl * CASC_FIND_F77LIBS.  It's probably not good to be used all by itself.
+dnl * It uses the output the Fortran compiler gives when given a -v flag
+dnl * to produce a list of flags that the Fortran compiler uses.  From
+dnl * this list CASC_FIND_F77LIBS sets up the Fortran/C interface flags.
+dnl *
+dnl * Changes:
+dnl * AC_SUBST(FLIBS) suppressed by N. Elliott 7-10-98
+dnl *****************************************************************
+   
+AC_DEFUN([LF_FLIBS],[
+  dnl AC_MSG_CHECKING(for Fortran libraries)
+  dnl
+  dnl Write a minimal program and compile it with -v. I don't know
+  dnl what to do if your compiler doesn't have -v
+  dnl
+  dnl changequote(, )dnl
+  echo "      END" > conftest.f
+  foutput=`${F77-f77} -v -o conftest conftest.f 2>&1`
+  dnl
+  dnl The easiest thing to do for xlf output is to replace all the commas
+  dnl with spaces.  Try to only do that if the output is really from xlf,
+  dnl since doing that causes problems on other systems.
+  dnl
+  xlf_p=`echo $foutput | grep xlfentry`
+  if test -n "$xlf_p"; then
+    foutput=`echo $foutput | sed 's/,/ /g'`
+  fi
+  ifc_p=`echo $foutput | grep ifc`
+  ifort_p=`echo $foutput | grep ifort`
+  if test -n "$ifort_p" -o -n "$ifc_p"; then
+    foutput=`echo $foutput | sed 's/\\\/ \-u\/ \___get\/ /g'`
+  fi
+  dnl
+  ld_run_path=`echo $foutput | \
+
+    [sed -n -e 's/^.*LD_RUN_PATH *= *\([^ ]*\).*/\1/p'`]
+  dnl
+  dnl We are only supposed to find this on Solaris systems...
+  dnl Uh, the run path should be absolute, shouldn't it?
+  dnl
+  case "$ld_run_path" in
+
+    /*)
+
+      if test "$ac_cv_prog_gcc" = yes; then
+
+        ld_run_path="-Xlinker -R -Xlinker $ld_run_path"
+      else
+        ld_run_path="-R $ld_run_path"
+      fi
+    ;;
+
+    *)
+      ld_run_path=
+    ;;
+  esac
+
+  dnl
+  flibs=
+  lflags=
+  dnl
+  dnl If want_arg is set, we know we want the arg to be added to the list,
+  dnl so we don't have to examine it.
+  dnl
+  want_arg=
+  dnl
+  for arg in $foutput; do
+    old_want_arg=$want_arg
+    want_arg=
+  dnl
+  dnl None of the options that take arguments expect the argument to
+  dnl start with a -, so pretend we didn't see anything special.
+  dnl
+    if test -n "$old_want_arg"; then
+      case "$arg" in
+        -*)
+        old_want_arg=
+        ;;
+      esac
+    fi
+
+    case "$old_want_arg" in
+      '')
+        case $arg in
+        /*.a)
+          exists=false
+          for f in $lflags; do
+            if test x$arg = x$f; then
+              exists=true
+            fi
+          done
+          if $exists; then
+            arg=
+          else
+            lflags="$lflags $arg"
+          fi
+        ;;
+        -bI:*)
+          exists=false
+          for f in $lflags; do
+            if test x$arg = x$f; then
+              exists=true
+            fi
+          done
+          if $exists; then
+            arg=
+          else
+            if test "$ac_cv_prog_gcc" = yes; then
+              lflags="$lflags -Xlinker $arg"
+            else
+              lflags="$lflags $arg"
+            fi
+          fi
+        ;;
+        -lang* | -lcrt0.o | -lc )
+          arg=
+        ;;
+        [-[lLR])]
+          want_arg=$arg
+          arg=
+        ;;
+        [-[lLR]*)]
+          exists=false
+          for f in $lflags; do
+            if test x$arg = x$f; then
+              exists=true
+            fi
+          done
+          if $exists; then
+            arg=
+          else
+            case "$arg" in
+              -lkernel32)
+                case "$canonical_host_type" in
+                  *-*-cygwin32)
+                  ;;
+                  *)
+                    lflags="$lflags $arg"
+                  ;;
+                esac
+              ;;
+              -lm)
+              ;;
+              *)
+                lflags="$lflags $arg"
+              ;;
+            esac
+          fi
+        ;;
+        -u)
+          want_arg=$arg
+          arg=
+        ;;
+        -Y)
+          want_arg=$arg
+          arg=
+        ;;
+        *)
+          arg=
+        ;;
+        esac
+      ;;
+      [-[lLR])]
+        arg="$old_want_arg $arg"
+      ;;
+      -u)
+        arg="-u $arg"
+      ;;
+      -Y)
+
+  dnl
+  dnl Should probably try to ensure unique directory options here too.
+  dnl This probably only applies to Solaris systems, and then will only
+  dnl work with gcc...
+  dnl
+        arg=`echo $arg | sed -e 's%^P,%%'`
+        SAVE_IFS=$IFS
+        IFS=:
+        list=
+        for elt in $arg; do
+        list="$list -L$elt"
+        done
+        IFS=$SAVE_IFS
+        arg="$list"
+      ;;
+    esac
+  dnl
+
+    if test -n "$arg"; then
+      flibs="$flibs $arg"
+    fi
+  done
+  if test -n "$ld_run_path"; then
+    flibs_result="$ld_run_path $flibs"
+  else
+    flibs_result="$flibs"
+  fi
+  dnl changequote([, ])dnl
+  rm -f conftest.f conftest.o conftest
+  dnl
+  dnl Phew! Done! Now, output the result
+  dnl
+
+  FLIBS="$flibs_result"
+  dnl AC_MSG_RESULT([$FLIBS])
+dnl  AC_SUBST(FLIBS)
+])dnl
+
diff -r 000000000000 -r 5eda1a3f24e8 config/casc_hdf5.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/casc_hdf5.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,91 @@
+dnl Define a macro for supporting HDF5
+
+AC_DEFUN([CASC_SUPPORT_HDF5],[
+
+# Begin CASC_SUPPORT_HDF5
+# Defines hdf5_PREFIX hdf5_INCLUDES and hdf5_LIBS if with-hdf5 is specified.
+AC_ARG_WITH(hdf5,
+[ --with-hdf5[=PATH]  Use HDF5 and optionally specify where HDF5 is installed.],
+, with_hdf5=no)
+
+case "$with_hdf5" in
+  no)
+    AC_MSG_NOTICE([configuring without HDF5 support])
+    : Do nothing
+  ;;
+  yes)
+    # HDF5 install path was not specified.
+    # Look in a couple of standard locations to probe if 
+    # HDF5 header files are there.
+    AC_MSG_CHECKING([for HDF5 installation])
+    for dir in /usr /usr/local; do
+      if test -f ${dir}/include/hdf5.h; then
+        hdf5_PREFIX=${dir}
+        break
+      fi
+    done
+    AC_MSG_RESULT([$hdf5_PREFIX])
+  ;;
+  *)
+    # HDF5 install path was specified.
+    AC_MSG_CHECKING([for HDF5 installation])
+
+    if test -f ${with_hdf5}/include/hdf5.h; then
+        hdf5_PREFIX=$with_hdf5
+        hdf5_INCLUDES="-I${hdf5_PREFIX}/include"
+        hdf5_LIBS="-L${hdf5_PREFIX}/lib -lhdf5"
+        AC_MSG_RESULT([$hdf5_PREFIX])
+    else
+        AC_MSG_RESULT([$hdf5_PREFIX])
+        AC_MSG_ERROR([HDF5 not found in $with_hdf5])
+    fi
+  ;;
+esac
+
+
+
+# Test compiling an HDF application
+
+# NOTE that AC_SEARCH_LIBS didn't work completely so
+# use a more complicated example program to see
+# if that will catch when HDF is not working.
+if test "${hdf5_PREFIX+set}" = set; then
+
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether HDF5 link works)
+   AC_LANG_PUSH(C++)
+   CASC_PUSH_COMPILER_STATE
+   # NOTE lib z and m were from BTNG macro.
+   LIBS="${LIBS} ${hdf5_LIBS} $zlib_LIBS $szlib_LIBS -lm "
+   CXXFLAGS="${CXXFLAGS} ${hdf5_INCLUDES}"
+   AC_LINK_IFELSE([
+      #include "hdf5.h"
+      #define FILE "file.h5"
+
+      int main() {
+
+         hid_t       file_id;   /* file identifier */
+         herr_t      status;
+
+         /* Create a new file using default properties. */
+         file_id = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+         /* Terminate access to the file. */
+         status = H5Fclose(file_id); 
+     }
+      ], 
+      casc_hdf5_compile=yes,
+      casc_hdf5_compile=no)
+   CASC_POP_COMPILER_STATE
+   AC_LANG_POP
+   AC_MSG_RESULT($casc_hdf5_compile)
+
+   if test "$casc_hdf5_compile" = no; then
+      AC_MSG_ERROR([HDF5 compile/link test failed])
+   fi
+fi
+
+# END CASC_SUPPORT_HDF5
+
+])dnl End definition of CASC_SUPPORT_HDF5
+
diff -r 000000000000 -r 5eda1a3f24e8 config/casc_lang.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/casc_lang.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,59 @@
+dnl **********************************************************************
+dnl * CASC_LANG_MPISWITCH(LANG)
+dnl * 
+dnl * Causes tests that would have been performed on a conventional
+dnl * to be performed on the MPI wrapper version of that compiler.
+dnl * The only acceptable arguments are "CC", "CXX", and "F77".  For
+dnl * example, CASC_LANG_MPISWITCH(CXX) will temporarily set the variable
+dnl * CXX to be equal to the value of the variable MPICXX.  The effect of
+dnl * this macro is undone by the macro CASC_LANG_MPIUNSWITCH
+dnl *
+dnl * This macro is only for switching between the conventional compiler
+dnl * and the MPI compiler for the same language.  To switch between
+dnl * languages, see the builtin autoconf macros AC_LANG_C,
+dnl * AC_LANG_CPLUSPLUS, and other related macros
+dnl **********************************************************************
+
+AC_DEFUN([CASC_LANG_MPISWITCH],
+[
+   if "$1" = "CC"; then
+      CC_switch_save=$CC
+      CC=$MPICC
+   fi
+
+   if "$1" = "CXX"
+      CXX_switch_save=$CXX
+      CXX=$MPICXX
+   fi
+
+   if "$1" = "F77"
+      F77_switch_save=$F77
+      F77=$MPIF77
+   fi
+])dnl
+
+dnl *********************************************************************
+dnl * CASC_LANG_MPIUNSWITCH(LANG)
+dnl *
+dnl * Undoes the results of a previous call to CASC_LANG_MPISWITCH.
+dnl * The variable CC reverts to the value it had before 
+dnl * CASC_LANG_MPISWITCH was called.  This macro should not be called
+dnl * without a previous call to CASC_LANG_MPISWITCH with the same
+dnl * argument.  Again, the only acceptable arguments are "CC", "CXX", and
+dnl * "F77".
+dnl *********************************************************************
+
+AC_DEFUN([CASC_LANG_MPIUNSWITCH],
+[
+   if "$1" = "CC"; then
+      $CC=$CC_switch_save
+   fi
+
+   if "$1" = "CXX"
+      $CXX=$CXX_switch_save
+   fi
+
+   if "$1" = "F77"
+      $F77=F77_switch_save
+   fi
+])dnl
diff -r 000000000000 -r 5eda1a3f24e8 config/casc_libs_and_headers.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/casc_libs_and_headers.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,619 @@
+
+
+dnl *********************************************************************
+dnl * CASC_ADD_LIB(LIBRARY, FUNCTION, DIRECTORY-LIST[, PREFIX[, 
+dnl *              ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]])
+dnl * checks first if LIBRARY is available on the linking search path and
+dnl * if FUNCTION can be linked with LIBRARY.  If so, -lLIBRARY is added
+dnl * to the variable [PREFIX]LIBS. (i.e., if prefix is LD, -llibrary is
+dnl * added to LDLIBS.)  If not, checks whitespace-separated
+dnl * DIRECTORY-LIST to see if LIBRARY exists in a specified directory and
+dnl * can be linked with FUNCTION.  If so, the first directory where
+dnl * linking is successful is added to the front of [PREFIX]LIBDIRS, and
+dnl * -lLIBRARY is added to the end of [PREFIX]LIBS.  If no prefix is
+dnl * specified, the directories and libraries are added to LIBS and
+dnl * LIBDIRS, respectively.  If the order of -l flags on the linking
+dnl * lines is important, CASC_ADD_LIB should be called for each library
+dnl * in the order they should appear on linking lines.  Mere existence of
+dnl * LIBRARY in the search path or in a specified directory can usually
+dnl * be determined by entering 'main' for FUNCTION.  Optional argument
+dnl * ACTION-IF-FOUND contains additional instructions to execute as soon
+dnl * as LIBRARY is found in any directory.  Optional argument
+dnl * ACTION-IF-NOT-FOUND contains instructions to execute if LIBRARY is
+dnl * not found anywhere.
+dnl **********************************************************************
+
+AC_DEFUN([CASC_ADD_LIB],
+[
+   # define some macros to hopefully improve readability
+   define([m_THESE_LIBS],[$4LIBS])
+   define([m_THESE_LIBDIRS],[$4LIBDIRS])
+
+   # check for the library from first argument.  If linking is successful
+   # the first time, the job is done, otherwise loop through DIRECTORY-LIST
+   AC_CHECK_LIB($1, $2, m_THESE_LIBS="$m_THESE_LIBS -l$1"
+                          casc_lib_found=yes 
+                          ifelse([$5], , , [$5]),
+
+      dnl * If library not found
+      for casc_lib_dir in $3; do
+
+         AC_CHECK_LIB($1, $2, 
+            m_THESE_LIBDIRS="-L$casc_lib_dir $m_THESE_LIBDIRS"
+            m_THESE_LIBS="$m_THESE_LIBS -l$1"
+            casc_lib_found=yes
+            ifelse([$5], , , [$5])
+            break
+            , ,
+            -L$casc_lib_dir $m_THESE_LIBDIRS $m_THESE_LIBS -l$1, no)
+      done
+      , $m_THESE_LIBDIRS $m_THESE_LIBS, no)  dnl * last two arguments for
+                                             dnl * first check
+
+   # ACTION-IF-NOT_FOUND for when the library is found nowhere
+   ifelse([$6], , ,
+      if test "$casc_lib_found" != "yes"; then
+         [$6]
+      fi
+   )
+
+   unset casc_lib_found
+
+   undefine([m_THESE_LIBS])
+   undefine([m_THESE_LIBDIRS])
+
+])dnl
+
+
+dnl ***********************************************************************
+dnl CASC_CHECK_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
+dnl              [, OTHER-LIBRARIES [, CACHE-CHOICE]]]])
+dnl * This is the same as AC_CHECK_LIB, except when it tests for LIBRARY
+dnl * it puts the flag -lLIBRARY after $LIBS and OTHER-LIBRARIES.  The Sun
+dnl * cc compiler does not search for LIBRARY in any directories specified
+dnl * by -L in OTHER-LIBRARIES when -lLIBRARY is listed first.  The
+dnl * functionality of this macro is the same as that of AC_CHECK_LIB in
+dnl * the Autoconf documentation.  
+dnl * CACHE-CHOICE [$6]added by N. Elliott, 6-24-98.  If CACHE-CHOICE is 'no',
+dnl * the results of this test are not cached.  CACHE-CHOICE should be
+dnl * used only when this test is called recursively.
+dnl *
+dnl * CASC_CHECK_LIB_OLD is an older version of this macro which doesn't
+dnl * seem to work with newer versions of autoconf
+dnl **********************************************************************
+
+AC_DEFUN([CASC_CHECK_LIB],
+[
+dnl AC_MSG_CHECKING([for $2 in -l$1])
+dnl Use a cache variable name containing both the library and function name,
+dnl because the test really is for library $1 defining function $2, not
+dnl just for library $1.  Separate tests with the same $1 and different $2s
+dnl may have different results.
+ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
+AC_CACHE_VAL(ac_cv_lib_$ac_lib_var,
+[ac_save_LIBS="$LIBS"
+LIBS="$5 $LIBS -l$1"
+AC_TRY_LINK(dnl
+ifelse(AC_LANG, [FORTRAN77], ,
+ifelse([$2], [main], , dnl Avoid conflicting decl of main.
+[/* Override any gcc2 internal prototype to avoid an error.  */
+]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
+extern "C"
+#endif
+])dnl
+[/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $2();
+])),
+            [$2()],
+            eval "ac_cv_lib_$ac_lib_var=yes",
+            eval "ac_cv_lib_$ac_lib_var=no")   
+LIBS="$ac_save_LIBS"
+])dnl 
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  :
+  dnl AC_MSG_RESULT(yes)
+  ifelse([$3], ,
+[changequote(, )dnl
+  ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+changequote([, ])dnl
+  AC_DEFINE_UNQUOTED($ac_tr_lib)
+  LIBS="-l$1 $LIBS" 
+], [$3])
+else
+ : 
+  dnl AC_MSG_RESULT(no)
+ifelse([$4], , , [
+ifelse([$6], no, unset ac_cv_lib_$ac_lib_var)  
+$4
+])dnl
+fi
+ifelse([$6], no, unset ac_cv_lib_$ac_lib_var)
+])dnl
+
+
+
+AC_DEFUN([CASC_CHECK_LIB_OLD],
+[AC_MSG_CHECKING([for -l$1])
+dnl Use a cache variable name containing both the library and function name,
+dnl because the test really is for library $1 defining function $2, not
+dnl just for library $1.  Separate tests with the same $1 and different $2s
+dnl may have different results.
+ac_lib_var=`echo $1['_']$2 | tr './+\055' '__p_'`
+AC_CACHE_VAL(ac_cv_lib_$ac_lib_var,
+[ac_save_LIBS="$LIBS"
+LIBS="$5 $LIBS -l$1"
+AC_TRY_LINK(dnl
+ifelse([$2], [main], , dnl Avoid conflicting decl of main.
+[/* Override any gcc2 internal prototype to avoid an error.  */
+]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus 
+extern "C"
+#endif
+])dnl
+[/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $2();
+]),
+            [$2()],
+            eval "ac_cv_lib_$ac_lib_var=yes",
+            eval "ac_cv_lib_$ac_lib_var=no")dnl
+LIBS="$ac_save_LIBS"
+])dnl
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  AC_MSG_RESULT(yes)  
+  ifelse([$3], ,
+[changequote(, )dnl
+  ac_tr_lib=HAVE_LIB`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+changequote([, ])dnl
+  AC_DEFINE_UNQUOTED($ac_tr_lib)
+  LIBS="-l$1 $LIBS"
+], [
+ifelse([$6], no, unset ac_cv_lib_$ac_lib_var)
+$3])
+else
+  AC_MSG_RESULT(no) 
+ifelse([$4], , , [
+ifelse([$6], no, unset ac_cv_lib_$ac_lib_var)
+$4
+])dnl
+fi
+ifelse([$6], no, unset ac_cv_lib_$ac_lib_var)
+])
+
+
+
+dnl *********************************************************************
+dnl * CASC_CHECK_HEADER(HEADER-FILE, DIRECTORY-LIST[, ACTION-IF-FOUND[,
+dnl *                   ACTION-IF-NOT-FOUND]])
+dnl * This macro is an alternative to AC_CHECK_HEADER.  It does
+dnl * essentially the same thing, but it allows the user to specify
+dnl * a directory list if HEADER-FILE can not be found in the current path
+dnl * for #includes, and it adds to the variable INCLUDES the first
+dnl * directory in DIRECTORY-LIST from where HEADER-FILE can be included.
+dnl *********************************************************************
+
+AC_DEFUN([CASC_CHECK_HEADER],
+[
+   dnl * loop through the directory list.  The first iteration leaves the
+   dnl * casc_dir variable empty to check if the header can be #included
+   dnl * without specifying a directory.
+   for casc_dir in '' $2 ; do
+      if test -n "$casc_dir"; then
+         casc_header=$casc_dir/$1
+      else
+         casc_header=$1
+      fi
+
+      dnl * Check for the header.  Add the necessary -I flag to INCLUDES
+      AC_CHECK_HEADER( $casc_header,
+         if test -n "$casc_dir"; then
+            INCLUDES="$INCLUDES -I$casc_dir"
+         fi
+         casc_header_found=yes
+         ifelse([$3], , , [$3])
+         break )
+
+   done
+
+   dnl * This takes care of the action if not found
+   ifelse([$4], , ,
+      if test "$casc_header_found" != "yes"; then
+         [$4]
+      fi
+   )
+
+   unset casc_header_found
+])dnl
+
+
+dnl **********************************************************************
+dnl * CASC_CREATE_PACKAGE_OPTION(PACKAGE-NAME[, DIR-LIST[, FILE]])
+dnl * This is a general macro that creates a configure command-line option
+dnl * called `--with-PACKAGE-NAME-dir' which will allow the user to
+dnl * specify the location of the installation of an outside software
+dnl * package, such as PETSc or ISIS++.  After a check to make sure the
+dnl * given directory is valid (see below for discussion of validity), the
+dnl * directory's path is stored in the shell variable PACKAGE-NAME_DIR.
+dnl * For example, to allow the user to specify the location of PETSc,
+dnl * place `CASC_CREATE_PACKAGE_OPTION(PETSC)' in configure.in.  Then the
+dnl * user, if configuring on the CASC Sun cluster, would type `configure
+dnl * --with-PETSC-dir=/home/casc/petsc', and the directory's path would
+dnl * be stored in PETSC_DIR.  With this macro, the user is also permitted
+dnl * to set the variable PACKAGE-NAME_DIR in the environment before
+dnl * running configure, but any choice made on the command line would
+dnl * override any preset values.  
+dnl *
+dnl * This macro takes an optional second argument, DIR-LIST, which is a
+dnl * whitespace-separated list of directories where the developer thinks
+dnl * PACKAGE-NAME might be installed.  If DIR-LIST is given, and the user
+dnl * does not use the `--with' option to give the location of
+dnl * PACKAGE-NAME (or if the directory given by the user does not exist),
+dnl * then configure will assign to PACKAGE-NAME_DIR the path of the first
+dnl * directory in DIR-LIST that is valid.
+dnl *
+dnl * Validity:  The optional third argument to this macro is FILE, which
+dnl * should be either the name of a file in the top directory of the
+dnl * package in question or the relative path of a file in a subdirectory
+dnl * of the package.  If the argument FILE is given, then configure will
+dnl * consider a user specified directory or a directory from DIR-LIST 
+dnl * valid only if FILE exists in the directory.  If this argument is not
+dnl * given, then configure will consider a directory valid simply if it
+dnl * is indeed a directory.  FILE should be a file with a unique name
+dnl * that can be expected to exist in the same location in any 
+dnl * installation of the package in question.  If you know of no such
+dnl * file, do not include a third argument when invoking this macro.
+dnl * 
+dnl * This macro also gives the user the command-line option
+dnl * `--without-PACKAGE-NAME-dir', which, when invoked, will leave the
+dnl * variable PACKAGE-NAME_DIR empty.  This option should be invoked when
+dnl * the user wants to exclude a package from the configuration.
+dnl * 
+dnl * NOTE:  Since PACKAGE-NAME is used as part of both a command-line
+dnl * option and a variable name, it MUST consist of only alphanumeric
+dnl * characters.  PACKAGE-NAME is only a label, so it need not conform to
+dnl * any existing directory or file name.  I would recommend that it be
+dnl * all caps, as it becomes part of the name of a variable that is
+dnl * substituted into the Makefile.
+dnl **********************************************************************
+
+AC_DEFUN([CASC_CREATE_PACKAGE_OPTION],
+[
+   AC_MSG_CHECKING([for $1 directory])
+
+   dnl * $1 stands for the PACKAGE-NAME.  If [$1]_DIR has been set in the
+   dnl * environment, give its value to casc_env_[$1]_dir, and clear
+   dnl * [$1]_DIR.  The environmental value will ultimately be reassigned
+   dnl * to [$1]_DIR if it is valid and no command-line options are able
+   dnl * to change [$1]_DIR to a valid directory.  The environmental value
+   dnl * will also be used even if it is invalid, if the command-line
+   dnl * options and the DIRECTORY-LIST are both unable to generate a
+   dnl * valid value.
+   casc_result=
+   casc_env_[$1]_dir=$[$1]_DIR
+   [$1]_DIR=
+
+   AC_ARG_WITH($1-dir, 
+[  --with-$1-dir=DIR    $1 is installed in directory DIR
+  --without-$1-dir     do not look for $1],
+
+               if test "$withval" = "no"; then
+                  casc_result="configuring without [$1]"
+                  [$1]_DIR=
+               fi
+               , )
+
+   dnl * If "--without-$1-dir" was given, then [$1]_DIR is left blank.
+   dnl * Otherwise there is the following procedure to try to give
+   dnl * [$1]_DIR a valid value:
+   dnl *
+   dnl * if "--with-$1-dir" was given
+   dnl *    if the argument to "--with-$1-dir" is valid
+   dnl *       assign the argument to [$1]_DIR
+   dnl *    endif
+   dnl * endif
+   dnl *
+   dnl * if a value for [$1]_DIR has not yet been found
+   dnl *    if [$1]_DIR from the environment exists and is valid
+   dnl *       assign the environmental value to [$1]_DIR
+   dnl *    endif
+   dnl * endif
+   dnl *
+   dnl * if [$1]_DIR still has no value
+   dnl *    if the macro was given a DIRECTORY-LIST argument
+   dnl *       for each directory in the list
+   dnl *          if the directory is valid
+   dnl *             assign the directory to [$1]_DIR
+   dnl *             break loop
+   dnl *          else
+   dnl *             continue loop
+   dnl *          endif
+   dnl *       end loop
+   dnl *       if [$1]_DIR still doesn't have a value
+   dnl *          casc_result="none"
+   dnl *       else
+   dnl *          casc_result=$[$1]_DIR
+   dnl *       endif
+   dnl *    else
+   dnl *       casc_result="none"
+   dnl *    endif
+   dnl * endif
+
+   if test "$with_[$1]_dir" != "no"; then
+
+      if test -d "$with_[$1]_dir"; then
+
+         ifelse([$3], , ,
+            if test -f $with_[$1]_dir/[$3]; then)
+
+               casc_result="$with_[$1]_dir"
+               [$1]_DIR="$casc_result"
+
+         ifelse([$3], , ,
+            fi)
+      fi
+
+      if test -z "$casc_result"; then
+
+         if test -d "$casc_env_[$1]_dir"; then
+
+            ifelse([$3], , ,
+               if test -f $casc_env_[$1]_dir/[$3]; then)
+
+                  casc_result="$casc_env_[$1]_dir"
+                  [$1]_DIR="$casc_result"
+
+            ifelse([$3], , ,
+               fi)
+         fi
+      fi
+
+
+
+      if test -z "$casc_result"; then
+         [$1]_DIR=
+   
+         ifelse([$2], ,
+            casc_result="none" ,
+
+            for casc_dir in $2; do
+
+               if test -d "$casc_dir"; then
+
+                  ifelse([$3], , ,
+                     if test -f $casc_dir/[$3]; then)
+
+                        $1_DIR=$casc_dir
+
+                        break
+
+                  ifelse([$3], , ,
+                     fi)
+               fi
+            done
+
+            if test -z "$[$1]_DIR"; then
+               casc_result="none"
+
+            else
+               casc_result="$[$1]_DIR"
+            fi
+         )
+      fi
+   fi
+
+   dnl * $casc_result either is a valid value for [$1]_DIR or "none".
+   dnl * if none, then assign the original environmental value of
+   dnl * [$1]_DIR, whatever it may be, to casc_result and [$1]_DIR.  If
+   dnl * there was no environmental value, then $casc_result remains
+   dnl * "none" and [$1]_DIR is left empty.
+
+   if test "$casc_result" = "none"; then
+
+      if test -n "$casc_env_[$1]_dir"; then
+
+         casc_result="$casc_env_[$1]_dir"
+         [$1]_DIR="$casc_result"
+      fi
+   fi
+
+   AC_MSG_RESULT($casc_result)
+   AC_SUBST([$1]_DIR)
+])
+
+
+dnl smr_ARG_WITHLIB from FVWM by S. Robbins 
+dnl Allow argument for optional libraries; wraps AC_ARG_WITH, to
+dnl provide a "--with-foo-lib" option in the configure script, where foo
+dnl is presumed to be a library name.  The argument given by the user
+dnl (i.e. "bar" in ./configure --with-foo-lib=bar) may be one of four 
+dnl things:
+dnl     * boolean (no, yes or blank): whether to use library or not
+dnl     * file: assumed to be the name of the library
+dnl     * directory: assumed to *contain* the library
+dnl     * a quoted, space-separated list of linker flags needed to link
+dnl       with this library.  (To be used if this library requires
+dnl       linker flags other than the normal `-L' and `-l' flags.)
+dnl 
+dnl The argument is sanity-checked.  If all is well, two variables are
+dnl set: "with_foo" (value is yes, no, or maybe), and "foo_LIBFLAGS" (value
+dnl is either blank, a file, -lfoo, '-L/some/dir -lfoo', or whatever 
+dnl linker flags the user gives). The idea is: the first tells you whether
+dnl the library is to be used or not (or the user didn't specify one way
+dnl or the other) and the second to put on the command line for linking
+dnl with the library.
+dnl
+dnl Usage:
+dnl smr_ARG_WITHLIB(name, libname, description)
+dnl 
+dnl name                name for --with argument ("foo" for libfoo)
+dnl libname             (optional) actual name of library,
+dnl                     if different from name
+dnl description         (optional) used to construct help string
+dnl 
+dnl Changes:  Changed some identifier names.
+dnl           --with-foo-library is now --with-foo-lib
+dnl           foo_LIBS is now foo_LIBFLAGS
+dnl           Fourth posibility for argument to --with-foo-lib added
+dnl           Documentation above changed to reflect these changes
+dnl           Noah Elliott, October 1998
+
+
+AC_DEFUN([CASC_SMR_ARG_WITHLIB],
+[
+   smr_ARG_WITHLIB([$1],[$2],[$3])
+])dnl
+
+AC_DEFUN([smr_ARG_WITHLIB], [
+
+ifelse($2, , smr_lib=[$1], smr_lib=[$2]) 
+    
+AC_ARG_WITH([$1]-lib,
+ifelse($3, ,
+[  --with-$1-lib[=PATH]       use $1 library], 
+[  --with-$1-lib[=PATH]       use $1 library ($3)]),
+[
+    if test "$withval" = yes; then
+        with_[$1]=yes
+        [$1]_LIBFLAGS="-l${smr_lib}"
+    elif test "$withval" = no; then
+        with_[$1]=no
+        [$1]_LIBFLAGS=
+    else
+        with_[$1]=yes
+        if test -f "$withval"; then
+            [$1]_LIBFLAGS=$withval
+        elif test -d "$withval"; then
+            [$1]_LIBFLAGS="-L$withval -l${smr_lib}"
+        else
+            case $withval in
+            -*)
+               [$1]_LIBFLAGS="$withval"
+            ;;
+            *)
+               AC_MSG_ERROR(
+                  [argument must be boolean, file, directory, or compiler flags]
+                           )
+            ;;
+            esac
+        fi
+    fi
+], [
+    with_[$1]=maybe
+    [$1]_LIBFLAGS="-l${smr_lib}"
+])])
+
+    
+dnl smr_ARG_WITHINCLUDES from FVWM by S. Robbins
+dnl Check if the include files for a library are accessible, and
+dnl define the variable "name_INCLUDE" with the proper "-I" flag for
+dnl the compiler.  The user has a chance to specify the includes
+dnl location, using "--with-foo-include".
+dnl 
+dnl This should be used *after* smr_ARG_WITHLIB *and* AC_CHECK_LIB are
+dnl successful.
+dnl 
+dnl Usage:
+dnl smr_ARG_WITHINCLUDES(name, header, extra-flags)
+dnl 
+dnl name                library name, MUST same as used with smr_ARG_WITHLIB
+dnl header              a header file required for using the lib
+dnl extra-flags         (optional) flags required when compiling the
+dnl                     header, typically more includes; for ex. X_CFLAGS
+dnl
+dnl Changes:  Changed some identifier names.
+dnl           --with-foo-includes is now --with-foo-include
+dnl           name_CFLAGS is now name_INCLUDE
+dnl           Documentation above changed to reflect these changes
+dnl           Noah Elliott, October 1998
+
+AC_DEFUN([CASC_SMR_ARG_WITHINCLUDES],
+[
+   smr_ARG_WITHINCLUDES([$1], [$2], [$3])
+])dnl
+
+AC_DEFUN([smr_ARG_WITHINCLUDES], [
+
+AC_ARG_WITH([$1]-include,
+[  --with-$1-include=DIR  set directory for $1 headers],
+[
+    if test -d "$withval"; then
+        [$1]_INCLUDE="-I${withval}"
+    else
+        AC_MSG_ERROR(argument must be a directory)
+    fi])
+
+dnl This bit of logic comes from autoconf's AC_PROG_CC macro.  We need
+dnl to put the given include directory into CPPFLAGS temporarily, but
+dnl then restore CPPFLAGS to its old value.
+dnl 
+smr_test_CPPFLAGS="${CPPFLAGS+set}"
+smr_save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS ${[$1]_CFLAGS}"
+
+    ifelse($3, , , CPPFLAGS="$CPPFLAGS [$3]")
+    AC_CHECK_HEADERS($2)
+   
+if test "$smr_test_CPPFLAGS" = set; then
+    CPPFLAGS=$smr_save_CPPFLAGS
+else
+    unset CPPFLAGS
+fi
+])
+    
+        
+dnl smr_CHECK_LIB from FVWM by S. Robbins
+dnl Probe for an optional library.  This macro creates both
+dnl --with-foo-lib and --with-foo-include options for the configure
+dnl script.  If --with-foo-lib is *not* specified, the default is to
+dnl probe for the library, and use it if found.
+dnl
+dnl Usage:
+dnl smr_CHECK_LIB(name, libname, desc, func, header, x-libs, x-flags)
+dnl 
+dnl name        name for --with options
+dnl libname     (optional) real name of library, if different from
+dnl             above
+dnl desc        (optional) short descr. of library, for help string
+dnl func        function of library, to probe for
+dnl header      (optional) header required for using library
+dnl x-libs      (optional) extra libraries, if needed to link with lib
+dnl x-flags     (optional) extra flags, if needed to include header files
+dnl
+dnl Changes:  identifier names and documentation modified to reflect
+dnl           changes to smr_ARG_WITHLIB and smr_ARG_WITHINCLUDES
+dnl           Noah Elliott, October 1998
+
+AC_DEFUN([CASC_SMR_CHECK_LIB],
+[
+   smr_CHECK_LIB([$1], [$2], [$3], [$4], [$5], [$6], [$7])
+])dnl
+
+AC_DEFUN([smr_CHECK_LIB],
+[   
+ifelse($2, , smr_lib=[$1], smr_lib=[$2])
+ifelse($5, , , smr_header=[$5])
+smr_ARG_WITHLIB($1,$2,$3)
+if test "$with_$1" != no; then
+    AC_CHECK_LIB($smr_lib, $4,
+        smr_havelib=yes, smr_havelib=no,
+        ifelse($6, , ${$1_LIBFLAGS}, [${$1_LIBFLAGS} $6]))
+    if test "$smr_havelib" = yes -a "$smr_header" != ""; then
+        smr_ARG_WITHINCLUDES($1, $smr_header, $7)
+        smr_safe=`echo "$smr_header" | sed 'y%./+-%__p_%'`
+        if eval "test \"`echo '$ac_cv_header_'$smr_safe`\" != yes"; then
+            smr_havelib=no
+        fi
+    fi
+    if test "$smr_havelib" = yes; then
+        AC_MSG_RESULT(Using $1 library)
+    else
+        $1_LIBFLAGS=
+        $1_INCLUDE=
+        if test "$with_$1" = maybe; then
+            AC_MSG_RESULT(Not using $1 library)
+        else
+            AC_MSG_WARN(Requested $1 library not found!)
+        fi
+    fi
+fi])
diff -r 000000000000 -r 5eda1a3f24e8 config/casc_misc.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/casc_misc.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,235 @@
+
+dnl **********************************************************************
+dnl * CASC_CONFIG_OUTPUT_LIST(DIR-LIST[, OUTPUT-FILE])
+dnl *
+dnl * The intent of this macro is to make configure handle the possibility
+dnl * that a portion of the directory tree of a project may not be
+dnl * present.  This will modify the argument list of AC_OUTPUT to contain
+dnl * only output file names for which corresponding input files exist.
+dnl * If you are not concerned about the possible absence of the necessary
+dnl * input (.in) files, it is better to not use this macro and to
+dnl * explicitly list all of the output files in a call to AC_OUTPUT.
+dnl * Also, If you wish to create a file Foo from a file with a name
+dnl * other than Foo.in, this macro will not work, and you must use
+dnl * AC_OUTPUT.
+dnl *
+dnl * This macro checks for the existence of the file OUTPUT-FILE.in in
+dnl * each directory specified in the whitespace-separated DIR-LIST.  
+dnl * (Directories should be specified by relative path from the directory 
+dnl * containing configure.in.) If OUTPUT-FILE is not specified, the
+dnl * default is 'Makefile'.  For each directory that contains 
+dnl * OUTPUT-FILE.in, the relative path of OUTPUT-FILE is added to the 
+dnl * shell variable OUTPUT-FILE_list.  When AC_OUTPUT is called,
+dnl * '$OUTPUT-FILE_list' should be included in the argument list.  So if
+dnl * you have a directory tree and each subdirectory contains a 
+dnl * Makefile.in, DIR-LIST should be a list of every subdirectory and
+dnl * OUTPUT-FILE can be omitted, because 'Makefile' is the default.  When
+dnl * configure runs, it will check for the existence of a Makefile.in in
+dnl * each directory in DIR-LIST, and if so, the relative path of each
+dnl * intended Makefile will be added to the variable Makefile_list.
+dnl *
+dnl * This macro can be called multiple times, if there are files other
+dnl * than Makefile.in with a .in suffix other that are intended to be 
+dnl * processed by configure. 
+dnl *
+dnl * Example
+dnl *     If directories dir1 and dir2 both contain a file named Foo.in, 
+dnl *     and you wish to use configure to create a file named Foo in each
+dnl *     directory, then call 
+dnl *     CASC_CONFIG_OUTPUT_LIST(dir1 dir2, Foo)
+dnl *     If you also called this macro for Makefile as described above,
+dnl *     you should call
+dnl *     AC_OUTPUT($Makefile_list $Foo_list)
+dnl *     at the end of configure.in .
+dnl *********************************************************************
+
+
+AC_DEFUN([CASC_CONFIG_OUTPUT_LIST],
+[
+   dnl * m_OUTPUT_LIST is a macro to store the name of the variable
+   dnl * which will contain the list of output files
+   define([m_OUTPUT_LIST], ifelse([$2], , Makefile_list, [$2_list]))
+
+   if test -z "$srcdir"; then
+      srcdir=.
+   fi
+
+   dnl * use "Makefile" if second argument not given
+   if test -n "$2"; then
+      casc_output_file=$2
+   else   
+      casc_output_file=Makefile
+   fi   
+      
+   dnl * Add a file to the output list if its ".in" file exists.
+   for casc_dir in $1; do
+      if test -f $srcdir/$casc_dir/$casc_output_file.in; then
+         m_OUTPUT_LIST="$m_OUTPUT_LIST $casc_dir/$casc_output_file"
+      fi
+   done
+])dnl
+
+
+dnl **********************************************************************
+dnl * CASC_GUESS_ARCH
+dnl * Guesses a one-word name for the current architecture, unless ARCH
+dnl * has been preset.  This is an alternative to the built-in macro
+dnl * AC_CANONICAL_HOST, which gives a three-word name.  Uses the utility
+dnl * 'tarch', which is a Bourne shell script that should be in the same  
+dnl * directory as the configure script.  If tarch is not present or if it
+dnl * fails, ARCH is set to the value, if any, of shell variable HOSTTYPE,
+dnl * otherwise ARCH is set to "unknown".
+dnl **********************************************************************
+
+AC_DEFUN([CASC_GUESS_ARCH],
+[
+   AC_MSG_CHECKING(the architecture)
+
+   dnl * $ARCH could already be set in the environment or earlier in configure
+   dnl * Use the preset value if it exists, otherwise go throug the procedure
+   if test -z "$ARCH"; then
+
+      dnl * configure searches for the tool "tarch".  It should be in the
+      dnl * same directory as configure.in, but a couple of other places
+      dnl * will be checked.  casc_tarch stores a relative path for "tarch".
+      casc_tarch_dir=
+      for casc_dir in $srcdir $srcdir/.. $srcdir/../.. $srcdir/config; do
+         if test -f $casc_dir/tarch; then
+            casc_tarch_dir=$casc_dir
+            casc_tarch=$casc_tarch_dir/tarch
+            break
+         fi
+      done
+
+      dnl * if tarch was not found or doesn't work, try using env variable
+      dnl * $HOSTTYPE
+      if test -z "$casc_tarch_dir"; then
+         AC_MSG_WARN(cannot find tarch, using \$HOSTTYPE as the architecture)
+         ARCH=$HOSTTYPE
+      else
+         ARCH="`$casc_tarch`"
+
+         if test -z "$ARCH" || test "$ARCH" = "unknown"; then
+            ARCH=$HOSTTYPE
+         fi
+      fi
+
+      dnl * if $ARCH is still empty, give it the value "unknown".
+      if test -z "$ARCH"; then
+         ARCH=unknown
+         AC_MSG_WARN(architecture is unknown)
+      else
+         AC_MSG_RESULT($ARCH)
+      fi    
+   else
+      AC_MSG_RESULT($ARCH)
+   fi
+
+   AC_SUBST(ARCH)
+
+])dnl
+
+
+dnl **********************************************************************
+dnl * CASC_SET_SUFFIX_RULES is not like the other macros in aclocal.m4
+dnl * because it does not run any kind of test on the system on which it
+dnl * is running.  All it does is create several variables which contain
+dnl * the text of some simple implicit suffix rules that can be
+dnl * substituted into Makefile.in.  The suffix rules that come from the
+dnl * macro all deal with compiling a source file into an object file.  If
+dnl * this macro is called in configure.in, then if `@CRULE@' is placed in
+dnl * Makefile.in, the following will appear in the generated Makefile:
+dnl *
+dnl * .c.o:
+dnl *         @echo "Making (c) " $@ 
+dnl *         @${CC} -o $@ -c ${CFLAGS} $<	
+dnl *
+dnl * The following is a list of the variables created by this macro and
+dnl * the corresponding suffixes of the files that each implicit rule 
+dnl * deals with.
+dnl *
+dnl * CRULE       --   .c
+dnl * CXXRULE     --   .cxx
+dnl * CPPRULE     --   .cpp
+dnl * CCRULE      --   .cc
+dnl * CAPCRULE    --   .C
+dnl * F77RULE     --   .f
+dnl *
+dnl * There are four suffix rules for C++ files because of the different
+dnl * suffixes that can be used for C++.  Only use the one which
+dnl * corresponds to the suffix you use for your C++ files.
+dnl *
+dnl * The rules created by this macro require you to use the following
+dnl * conventions for Makefile variables:
+dnl *
+dnl * CC        = C compiler
+dnl * CXX       = C++ compiler
+dnl * F77       = Fortran 77 compiler
+dnl * CFLAGS    = C compiler flags
+dnl * CXXFLAGS  = C++ compiler flags
+dnl * FFLAGS    = Fortran 77 compiler flags
+dnl **********************************************************************
+
+AC_DEFUN([CASC_SET_SUFFIX_RULES],
+[
+   dnl * Things weren't working whenever "$@" showed up in the script, so
+   dnl * I made the symbol $at_sign to signify '@'
+   at_sign=@
+
+   dnl * All of the backslashes are used to handle the $'s and the
+   dnl * newlines which get passed through echo and sed.
+
+   CRULE=`echo ".c.o:\\\\
+\t at echo \"Making (c) \" \\$$at_sign \\\\
+\t@\\${CC} -o \\$$at_sign -c \\${CFLAGS} \$<"`
+
+   AC_SUBST(CRULE)
+
+   CXXRULE=`echo ".cxx.o:\\\\
+\t at echo \"Making (c++) \" \\$$at_sign \\\\
+\t@\\${CXX} -o \\$$at_sign -c \\${CXXFLAGS} \$<"`
+
+   AC_SUBST(CXXRULE)
+
+   CPPRULE=`echo ".cpp.o:\\\\
+\t at echo \"Making (c++) \" \\$$at_sign \\\\
+\t@\\${CXX} -o \\$$at_sign -c \\${CXXFLAGS} \$<"`
+
+   AC_SUBST(CPPRULE)
+
+   CCRULE=`echo ".cc.o:\\\\
+\t at echo \"Making (c++) \" \\$$at_sign \\\\
+\t@\\${CXX} -o \\$$at_sign -c \\${CXXFLAGS} \$<"`
+
+   AC_SUBST(CCRULE)
+
+   CAPCRULE=`echo ".C.o:\\\\
+\t at echo \"Making (c++) \" \\$$at_sign \\\\
+\t@\\${CXX} -o \\$$at_sign -c \\${CXXFLAGS} \$<"`
+
+   AC_SUBST(CAPCRULE)
+
+   F77RULE=`echo ".f.o:\\\\
+\t at echo \"Making (f) \" \\$$at_sign \\\\
+\t@\\${F77} -o \\$$at_sign -c \\${FFLAGS} \$<"`
+
+   AC_SUBST(F77RULE)
+
+])
+
+dnl Macro to save compiler state flags for invoking dnl compiler tests
+dnl NOTE that this is NOT currently a stack so can dnl only be called
+dnl in push/pop order.  push push pop pop dnl will fail
+AC_DEFUN([CASC_PUSH_COMPILER_STATE],[
+   casc_save_LIBS=$LIBS
+   casc_save_CXXFLAGS=$CXXFLAGS
+])
+
+dnl Macro to restore compiler state flags for invoking
+dnl compiler tests
+AC_DEFUN([CASC_POP_COMPILER_STATE],[
+   LIBS=$casc_save_LIBS
+   unset casc_save_LIBS
+   CXXFLAGS=$casc_save_CXXFLAGS
+   unset casc_save_CXXFLAGS
+])
\ No newline at end of file
diff -r 000000000000 -r 5eda1a3f24e8 config/casc_mpi.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/casc_mpi.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,842 @@
+
+dnl ********************************************************************
+dnl * CASC_PROG_MPICC searches the PATH for an available MPI C compiler
+dnl * wraparound.  It assigns the name to MPICC.
+dnl ********************************************************************
+
+AC_DEFUN([CASC_PROG_MPICC],
+[
+   AC_CHECK_PROGS(MPICC, mpcc mpicc tmcc hcc)
+   test -z "$MPICC" && AC_MSG_ERROR([no acceptable mpicc found in \$PATH])
+])dnl
+
+
+dnl ********************************************************************
+dnl * CASC_PROG_MPICXX searches the PATH for an available MPI C++
+dnl * compiler wraparound.  It assigns the name to MPICXX.
+dnl ********************************************************************
+
+AC_DEFUN([CASC_PROG_MPICXX],
+[
+   AC_CHECK_PROGS(MPICXX, mpKCC mpCC mpig++ mpiCC hcp)
+   test -z "$MPICXX" && AC_MSG_ERROR([no acceptable mpic++ found in \$PATH])
+])dnl
+
+
+dnl **********************************************************************
+dnl * CASC_PROG_MPIF77 searches the PATH for an available MPI Fortran 77
+dnl * compiler wraparound.  It assigns the name to MPIF77.
+dnl **********************************************************************
+
+AC_DEFUN([CASC_PROG_MPIF77],
+[
+   AC_CHECK_PROGS(MPIF77, mpf77 mpxlf mpif77 mpixlf tmf77 hf77)
+   test -z "$MPIF77" && AC_MSG_ERROR([no acceptable mpif77 found in \$PATH])
+])dnl
+
+
+dnl ***********************************************************************
+dnl * CASC_CHECK_MPIF77_PP checks whether the preprocessor needs to
+dnl * be called before calling the compiler for Fortran files with
+dnl * preprocessor directives and MPI function calls.  If the preprocessor
+dnl * is necessary, MPIF77NEEDSPP is set to "yes", otherwise it is set to
+dnl * "no"
+dnl ***********************************************************************
+
+AC_DEFUN([CASC_CHECK_MPIF77_PP],
+[
+   AC_REQUIRE([CASC_PROG_MPIF77])
+
+   rm -f testppmp.o
+
+   AC_MSG_CHECKING(whether $FPP needs to be called before $MPIF77)
+
+   # This follows the same procedur as CASC_CHECK_F77_PP, except it tests
+   # $MPIF77 using a test program that includes MPI functions.
+
+   cat > testppmp.F <<EOF
+#define FOO 3
+	program testppmp
+	include 'mpif.h'
+	integer rank,size,mpierr,sum
+	call MPI_INIT(mpierr)
+	call MPI_COMM_SIZE(MPI_COMM_WORLD,size,mpierr)
+	call MPI_COMM_RANK(MPI_COMM_WORLD,rank,mpierr)
+#ifdef FORTRAN_NO_UNDERSCORE
+        sum = rank + size
+#else
+        sum = rank + rank
+#endif
+        call MPI_FINALIZE(mpierr)
+        end
+EOF
+
+   $MPIF77 -DBAR -c testppmp.F
+   if test -f testppmp.o; then
+      MPIF77NEEDSPP=no
+   else
+      MPIF77NEEDSPP=yes
+   fi
+
+   echo $MPIF77NEEDSPP
+   rm -f testppmp.o testppmp.F
+   AC_SUBST(MPIF77NEEDSPP)
+])dnl
+
+
+dnl *********************************************************************
+dnl * CASC_SET_MPI sets up the needed MPI library and directory flags.
+dnl * The location of the file mpi.h is put into the variable MPIINCLUDE
+dnl * as a -I flag.  The -l flags that specify the needed libraries and
+dnl * the -L flags that specify the paths of those libraries are placed in
+dnl * the variables MPILIBS and MPILIBDIRS, respectively.  To set the MPI
+dnl * libraries and directories manually, use the --with-mpi-include,
+dnl * --with-mpi-libs, and --with-mpi-lib-dirs command-line options when
+dnl * invoking configure.  Only one directory should be specified with
+dnl * --with-mpi-include, while any number of directories can be specified
+dnl * by --with-mpi-lib-dirs.  Any number of libraries can be specified
+dnl * with --with-mpi-libs, and the libraries must be referred to by their
+dnl * base names, so libmpi.a is just mpi.  It is adviseable to use all
+dnl * three --with flags whenever one is used, because it is likely that
+dnl * when one is chosen it will mess up the automatic choices for the
+dnl * other two.  If the architecture is unknown, or if the needed MPI
+dnl * settings for the current architecture are not known, then the naive
+dnl * settings of MPILIBS="-lmpi" and MPILIBDIRS="-L/usr/local/mpi/lib"
+dnl * are tested, and if they exist they are used, otherwise the MPILIB*
+dnl * variables are left blank.  In the case of rs6000, the variable
+dnl * MPIFLAGS is also set.
+dnl **********************************************************************
+
+AC_DEFUN([CASC_SET_MPI],
+        [
+
+   dnl * If called from within CASC_FIND_MPI, then the configure-line
+   dnl * options will already exist.  This ifdef creates them otherwise.
+   ifdef([AC_PROVIDE_CASC_FIND_MPI], ,
+      [AC_ARG_WITH(mpi-include, [  --with-mpi-include=DIR  mpi.h is in DIR],
+                  casc_mpi_include_dir=$withval)
+
+      AC_ARG_WITH(mpi-libs,
+[  --with-mpi-libs=LIBS    LIBS is space-separated list of library names
+                          needed for MPI, e.g. \"nsl socket mpi\"],
+                  casc_mpi_libs=$withval)
+
+      AC_ARG_WITH(mpi-lib-dirs,
+[  --with-mpi-lib-dirs=DIRS
+                          DIRS is space-separated list of directories
+                          containing the libraries specified by
+                          \`--with-mpi-libs', e.g \"/usr/lib /usr/local/mpi/lib\"],
+                  casc_mpi_lib_dirs=$withval)]
+   )
+
+   if test -z "$casc_mpi_libs"; then
+      AC_REQUIRE([CASC_GUESS_ARCH])
+
+      dnl * Set everything to known values
+      case $ARCH in
+
+         sun4 | solaris)
+            case $F77 in
+               *g77)
+                   if test -z "$casc_mpi_include_dir"; then
+                      casc_mpi_include_dir=/usr/local/mpi/lam/h
+                   fi
+
+                   if test -z "$casc_mpi_lib_dirs"; then
+                      casc_mpi_lib_dirs="/usr/local/mpi/lam/lib"
+                   fi
+
+                   casc_mpi_libs="socket mpi trillium args tstdio t";;
+
+               *)
+
+                  if test -z "$casc_mpi_include_dir"; then
+                     MPIINCLUDE="-I/usr/local/mpi/mpich/include \
+                                 -I/usr/local/mpi/mpich/lib/solaris/ch_p4"
+                  fi
+
+                  if test -z "$casc_mpi_lib_dirs"; then
+                     casc_mpi_lib_dirs="/usr/local/mpi/mpich/lib/solaris/ch_p4 \
+                                       /usr/lib"
+                  fi
+
+               casc_mpi_libs="nsl socket mpi";;
+               esac
+
+            if test -z "$MPIINCLUDE"; then
+               AC_CHECK_HEADER($casc_mpi_include_dir/mpi.h,
+                               MPIINCLUDE="-I$casc_mpi_include_dir")
+            fi
+         ;;
+
+         alpha)
+            if test -z "$casc_mpi_include_dir"; then
+               casc_mpi_include_dir=/usr/local/mpi/include
+            fi
+            AC_CHECK_HEADER($casc_mpi_include_dir/mpi.h,
+                               MPIINCLUDE="-I$casc_mpi_include_dir")
+
+            if test -z "$casc_mpi_lib_dirs"; then
+               casc_mpi_lib_dirs="/usr/local/mpi/lib/alpha/ch_shmem \
+                                  /usr/local/lib"
+            fi
+
+            casc_mpi_libs="mpich gs";;
+
+         rs6000)
+
+dnl            if test -z "$casc_mpi_include_dir"; then
+dnl               casc_mpi_include_dir=/usr/lpp/ppe.poe/include
+dnl            fi
+dnl            AC_CHECK_HEADER($casc_mpi_include_dir/mpi.h,
+dnl                               MPIINCLUDE="-I$casc_mpi_include_dir")
+
+dnl            if test -z "$casc_mpi_lib_dirs"; then
+dnl               casc_mpi_lib_dirs=/usr/lpp/ppe.poe/lib
+dnl            fi
+
+            casc_mpi_libs=mpi
+
+            MPIFLAGS="-binitfini:poe_remote_main";;
+
+         IRIX64 | iris4d)
+            if test -z "$casc_mpi_include_dir"; then
+               casc_mpi_include_dir=/usr/local/mpi/include
+            fi
+            AC_CHECK_HEADER($casc_mpi_include_dir/mpi.h,
+                               MPIINCLUDE="-I$casc_mpi_include_dir")
+
+            if test -z "$casc_mpi_lib_dirs"; then
+               casc_mpi_lib_dirs=/usr/local/mpi/lib/IRIX64/ch_p4
+            fi
+
+            casc_mpi_libs=mpi;;
+
+         *)
+AC_MSG_WARN([trying naive MPI settings - can use --with flags to change])
+            if test -z "$casc_mpi_include_dir"; then
+               casc_mpi_include_dir=/usr/local/mpi/include
+            fi
+            AC_CHECK_HEADER($casc_mpi_include_dir/mpi.h,
+                               MPIINCLUDE="-I$casc_mpi_include_dir")
+
+            if test -z "$casc_mpi_lib_dirs"; then
+               casc_mpi_lib_dirs=/usr/local/mpi/lib
+            fi
+            casc_mpi_libs=mpi ;;
+      esac
+
+      for casc_lib in $casc_mpi_libs; do
+         CASC_ADD_LIB($casc_lib, main, $casc_mpi_lib_dirs, MPI)
+      done
+
+   else
+      if test -n "$casc_mpi_include_dir"; then
+         MPIINCLUDE="-I$casc_mpi_include_dir"
+      else
+         MPIINCLUDE=
+      fi
+
+      if test -n "$casc_mpi_lib_dirs"; then
+         for casc_lib_dir in $casc_mpi_lib_dirs; do
+            MPILIBDIRS="-L$casc_lib_dir $MPILIBDIRS"
+         done
+      else
+         MPILIBDIRS=
+      fi
+
+      for casc_lib in $casc_mpi_libs; do
+         MPILIBS="$MPILIBS -l$casc_lib"
+      done
+   fi
+])dnl
+
+
+dnl ********************************************************************
+dnl * CASC_FIND_MPI will determine the libraries, directories, and other
+dnl * flags needed to compile and link programs with MPI function calls.
+dnl * This macro runs tests on the script found by the CASC_PROG_MPICC
+dnl * macro.  If there is no such mpicc-type script in the PATH and
+dnl * MPICC is not set manually, then this macro will not work.
+dnl *
+dnl * One may question why these settings would need to be determined if
+dnl * there already is mpicc available, and that is a valid question.  I
+dnl * can think of a couple of reasons one may want to use these settings
+dnl * rather than using mpicc directly.  First, these settings allow you
+dnl * to choose the C compiler you wish to use rather than using whatever
+dnl * compiler is written into mpicc.  Also, the settings determined by
+dnl * this macro should also work with C++ and Fortran compilers, so you
+dnl * won't need to have mpiCC and mpif77 alongside mpicc.  This is
+dnl * especially helpful on systems that don't have mpiCC.  The advantage
+dnl * of this macro over CASC_SET_MPI is that this one doesn't require
+dnl * a test of the machine type and thus will hopefully work on unknown
+dnl * architectures.  The main disadvantage is that it relies on mpicc.
+dnl *
+dnl * --with-mpi-include, --with-mpi-libs, and --with-mpi-lib-dirs can be
+dnl * used to manually override the automatic test, just as with
+dnl * CASC_SET_MPI.  If any one of these three options are used, the
+dnl * automatic test will not be run, so it is best to call all three
+dnl * whenever one is called.  In addition, the option --with-mpi-flags is
+dnl * available here to set any other flags that may be needed, but it
+dnl * does not override the automatic test.  Flags set by --with-mpi-flags
+dnl * will be added to the variable MPIFLAGS.  This way, if the macro, for
+dnl * whatever reason, leaves off a necessary flag, the flag can be added
+dnl * to MPIFLAGS without eliminating anything else.  The other variables
+dnl * set are MPIINCLUDE, MPILIBS, and MPILIBDIRS, just as in
+dnl * CASC_SET_MPI.  This macro also incorporates CASC_SET_MPI as a backup
+dnl * plan, where if there is no mpicc, it will use the settings
+dnl * determined by architecture name in CASC_SET_MPI
+dnl ********************************************************************
+
+AC_DEFUN([CASC_FIND_MPI],
+[
+
+   casc_find_mpi_cache_used=yes
+
+   AC_CACHE_VAL(casc_cv_mpi_include, casc_find_mpi_cache_used=no)
+   AC_CACHE_VAL(casc_cv_mpi_libs, casc_find_mpi_cache_used=no)
+   AC_CACHE_VAL(casc_cv_mpi_lib_dirs, casc_find_mpi_cache_used=no)
+   AC_CACHE_VAL(casc_cv_mpi_flags, casc_find_mpi_cache_used=no)
+
+   if test "$casc_find_mpi_cache_used" = "yes"; then
+      AC_MSG_CHECKING(for location of mpi.h)
+      MPIINCLUDE=$casc_cv_mpi_include
+      AC_MSG_RESULT("\(cached\) $MPIINCLUDE")
+
+      AC_MSG_CHECKING(for MPI library directories)
+      MPILIBDIRS=$casc_cv_mpi_lib_dirs
+      AC_MSG_RESULT("\(cached\) $MPILIBDIRS")
+
+      AC_MSG_CHECKING(for MPI libraries)
+      MPILIBS=$casc_cv_mpi_libs
+      AC_MSG_RESULT("\(cached\) $MPILIBS")
+
+      AC_MSG_CHECKING(for other MPI-related flags)
+      MPIFLAGS=$casc_cv_mpi_flags
+      AC_MSG_RESULT("\(cached\) $MPIFLAGS")
+   else
+
+
+      dnl * Set up user options.  If user uses any of the fist three options,
+      dnl * then automatic tests are not run.
+
+      casc_user_chose_mpi=no
+      AC_ARG_WITH(mpi-include, [  --with-mpi-include=DIR  mpi.h is in DIR],
+                  for mpi_dir in $withval; do
+                     MPIINCLUDE="$MPIINCLUDE -I$withval"
+                  done; casc_user_chose_mpi=yes)
+
+      AC_ARG_WITH(mpi-libs,
+[  --with-mpi-libs=LIBS    LIBS is space-separated list of library names
+                          needed for MPI, e.g. \"nsl socket mpi\"],
+                  for mpi_lib in $withval; do
+                     MPILIBS="$MPILIBS -l$mpi_lib"
+                  done; casc_user_chose_mpi=yes)
+
+
+      AC_ARG_WITH(mpi-lib-dirs,
+[  --with-mpi-lib-dirs=DIRS
+                          DIRS is space-separated list of directories
+                          containing the libraries specified by
+                          \`--with-mpi-libs', e.g \"/usr/lib /usr/local/mpi/lib\"],
+                  for mpi_lib_dir in $withval; do
+                     MPILIBDIRS="-L$mpi_lib_dir $MPILIBDIRS"
+                  done; casc_user_chose_mpi=yes)
+
+      dnl * --with-mpi-flags only adds to automatic selections,
+      dnl * does not override
+
+      AC_ARG_WITH(mpi-flags,
+[  --with-mpi-flags=FLAGS  FLAGS is space-separated list of whatever flags other
+                          than -l and -L are needed to link with mpi libraries],
+                          MPIFLAGS=$withval)
+
+
+      if test "$casc_user_chose_mpi" = "no"; then
+
+      dnl * Find an MPICC.  If there is none, call CASC_SET_MPI to choose MPI
+      dnl * settings based on architecture name.  If CASC_SET_MPI fails,
+      dnl * print warning message.  Manual MPI settings must be used.
+
+         AC_ARG_WITH(MPICC,
+[  --with-MPICC=ARG        ARG is mpicc or similar MPI C compiling tool],
+            MPICC=$withval,
+            [AC_CHECK_PROGS(MPICC, mpcc mpicc tmcc hcc)])
+
+         if test -z "$MPICC"; then
+            AC_MSG_WARN([no acceptable mpicc found in \$PATH])
+            CASC_SET_MPI
+            if test -z "$MPILIBS"; then
+             AC_MSG_WARN([MPI not found - must set manually using --with flags])
+            fi
+
+         dnl * When $MPICC is there, run the automatic test
+         dnl * here begins the hairy stuff
+
+         else
+
+            dnl changequote(, )dnl
+
+            dnl * Create a minimal MPI program.  It will be compiled using
+            dnl * $MPICC with verbose output.
+            cat > mpconftest.c << EOF
+#include "mpi.h"
+
+main(int argc, char **argv)
+{
+   int rank, size;
+   MPI_Init(&argc, &argv);
+   MPI_Comm_size(MPI_COMM_WORLD, &size);
+   MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+   MPI_Finalize();
+   return 0;
+}
+EOF
+
+            casc_mplibs=
+            casc_mplibdirs=
+            casc_flags=
+            casc_lmpi_exists=no
+
+            dnl * These are various ways to produce verbose output from $MPICC
+            dnl * All of their outputs are stuffed into variable
+            dnl * $casc_mpoutput
+
+            for casc_command in "$MPICC -show"\
+                                "$MPICC -v"\
+                                "$MPICC -#"\
+                                "$MPICC"; do
+
+               casc_this_output=`$casc_command mpconftest.c -o mpconftest 2>&1`
+
+               dnl * If $MPICC uses xlc, then commas must be removed from output
+               xlc_p=`echo $casc_this_output | grep xlcentry`
+               if test -n "$xlc_p"; then
+                  casc_this_output=`echo $casc_this_output | sed 's/,/ /g'`
+               fi
+
+               dnl * Turn on flag once -lmpi is found in output
+               lmpi_p=`echo $casc_this_output | grep "\-lmpi"`
+               if test -n "$lmpi_p"; then
+                  casc_lmpi_exists=yes
+               fi
+
+               casc_mpoutput="$casc_mpoutput $casc_this_output"
+               casc_this_output=
+
+            done
+
+            rm -rf mpconftest*
+
+            dnl * little test to identify $CC as IBM's xlc
+            echo "main() {}" > cc_conftest.c
+            cc_output=`${CC-cc} -v -o cc_conftest cc_conftest.c 2>&1`
+            xlc_p=`echo $cc_output | grep xlcentry`
+            if test -n "$xlc_p"; then
+               casc_compiler_is_xlc=yes
+            fi
+            rm -rf cc_conftest*
+
+            dnl * $MPICC might not produce '-lmpi', but we still need it.
+            dnl * Add -lmpi to $casc_mplibs if it was never found
+            if test "$casc_lmpi_exists" = "no"; then
+               casc_mplibs="-lmpi"
+            else
+               casc_mplibs=
+            fi
+
+            casc_want_arg=
+
+            dnl * Loop through every word in output to find possible flags.
+            dnl * If the word is the absolute path of a library, it is added
+            dnl * to $casc_flags.  Any "-llib", "-L/dir", "-R/dir" and
+            dnl * "-I/dir" is kept.  If '-l', '-L', '-R', '-I', '-u', or '-Y'
+            dnl * appears alone, then the next word is checked.  If the next
+            dnl * word is another flag beginning with '-', then the first
+            dnl * word is discarded.  If the next word is anything else, then
+            dnl * the two words are coupled in the $casc_arg variable.
+            dnl * "-binitfini:poe_remote_main" is a flag needed especially
+            dnl * for IBM MPI, and it is always kept if it is found.
+            dnl * Any other word is discarded.  Also, after a word is found
+            dnl * and kept once, it is discarded if it appears again
+
+            for casc_arg in $casc_mpoutput; do
+
+               casc_old_want_arg=$casc_want_arg
+               casc_want_arg=
+
+               if test -n "$casc_old_want_arg"; then
+                  case "$casc_arg" in
+                  [-*)]
+                     casc_old_want_arg=
+                  ;;
+                  esac
+               fi
+
+               case "$casc_old_want_arg" in
+               ['')]
+                  case $casc_arg in
+                  [/*.a)]
+                     exists=false
+                     for f in $casc_flags; do
+                        if test x$casc_arg = x$f; then
+                           exists=true
+                        fi
+                     done
+                     if $exists; then
+                        casc_arg=
+                     else
+                        casc_flags="$casc_flags $casc_arg"
+                     fi
+                  ;;
+                  [-binitfini:poe_remote_main)]
+                     exists=false
+                     for f in $casc_flags; do
+                        if test x$casc_arg = x$f; then
+                           exists=true
+                        fi
+                     done
+                     if $exists; then
+                        casc_arg=
+                     else
+                        casc_flags="$casc_flags $casc_arg"
+                     fi
+                  ;;
+                  [-lang*)]
+                     casc_arg=
+                  ;;
+                  [-[lLR])]
+                     casc_want_arg=$casc_arg
+                     casc_arg=
+                  ;;
+                  [-[lLR]*)]
+                     exists=false
+                     for f in $casc_flags; do
+                        if test x$casc_arg = x$f; then
+                           exists=true
+                        fi
+                     done
+                     if $exists; then
+                        casc_arg=
+                     else
+                       casc_flags="$casc_flags $casc_arg"
+                     fi
+                  ;;
+                 [-u)]
+                     casc_want_arg=$casc_arg
+                     casc_arg=
+                  ;;
+                  [-Y)]
+                     casc_want_arg=$casc_arg
+                     casc_arg=
+                  ;;
+                  [-I)]
+                     casc_want_arg=$casc_arg
+                     casc_arg=
+                  ;;
+                  [-I*)]
+                     exists=false
+                     for f in $casc_flags; do
+                        if test x$casc_arg = x$f; then
+                           exists=true
+                        fi
+                     done
+                     if $exists; then
+                        casc_arg=
+                     else
+                        casc_flags="$casc_flags $casc_arg"
+                     fi
+                  ;;
+                  [*)]
+                     casc_arg=
+                  ;;
+                  esac
+
+               ;;
+               [-[lLRI])]
+                  casc_arg="casc_old_want_arg $casc_arg"
+               ;;
+               [-u)]
+                  casc_arg="-u $casc_arg"
+               ;;
+               [-Y)]
+                  casc_arg=`echo $casc_arg | sed -e 's%^P,%%'`
+                  SAVE_IFS=$IFS
+                  IFS=:
+                  casc_list=
+                  for casc_elt in $casc_arg; do
+                     casc_list="$casc_list -L$casc_elt"
+                  done
+                  IFS=$SAVE_IFS
+                  casc_arg="$casc_list"
+               ;;
+               esac
+
+               dnl * Still inside the big for loop, we separate each flag
+               dnl * into includes, libdirs, libs, flags
+               if test -n "$casc_arg"; then
+                  case $casc_arg in
+                  [-I*)]
+
+                     dnl * if the directory given in this flag contains mpi.h
+                     dnl * then the flag is assigned to $MPIINCLUDE
+                     if test -z "$MPIINCLUDE"; then
+                        casc_cppflags="$casc_cppflags $casc_arg"
+                        casc_include_dir=`echo "$casc_arg" | sed 's/-I//g'`
+
+                        SAVE_CPPFLAGS="$CPPFLAGS"
+                        CPPFLAGS="$casc_cppflags"
+                        dnl changequote([, ])dnl
+
+                        unset ac_cv_header_mpi_h
+                        AC_CHECK_HEADER(mpi.h,
+                                        MPIINCLUDE="$casc_cppflags")
+
+                        dnl changequote(, )dnl
+                        CPPFLAGS="$SAVE_CPPFLAGS"
+
+                     else
+                        casc_arg=
+                     fi
+                  ;;
+                  [-[LR]*)]
+
+                     dnl * These are the lib directory flags
+                     casc_mplibdirs="$casc_mplibdirs $casc_arg"
+                  ;;
+                  [-l* | /*)]
+
+                     dnl * These are the libraries
+                     casc_mplibs="$casc_mplibs $casc_arg"
+                  ;;
+                  [-binitfini:poe_remote_main)]
+                     if test "$casc_compiler_is_xlc" = "yes"; then
+                        casc_mpflags="$casc_mpflags $casc_arg"
+                     fi
+                  ;;
+                  [*)]
+                     dnl * any other flag that has been kept goes here
+                     casc_mpflags="$casc_mpflags $casc_arg"
+                  ;;
+                  esac
+
+                  dnl * Upcoming test needs $LIBS to contain the flags
+                  dnl * we've found
+                  LIBS_SAVE=$LIBS
+                  LIBS="$MPIINCLUDE $casc_mpflags $casc_mplibdirs $casc_mplibs"
+
+                  if test -n "`echo $LIBS | grep '\-R/'`"; then
+                     LIBS=`echo $LIBS | sed 's/-R\//-R \//'`
+                  fi
+
+                  dnl changequote([, ])dnl
+
+
+                  dnl * Test to see if flags found up to this point are
+                  dnl * sufficient to compile and link test program.  If not,
+                  dnl * the loop keeps going to the next word
+                  AC_LANG_PUSH(C)
+                  AC_TRY_LINK(
+dnl                     ifelse(AC_LANG, [C++],
+
+dnl [#ifdef __cplusplus
+dnl extern "C"
+dnl #endif
+dnl ])dnl
+[#include "mpi.h"
+], [int rank, size;
+   int argc;
+   char **argv;
+   MPI_Init(&argc, &argv);
+   MPI_Comm_size(MPI_COMM_WORLD, &size);
+   MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+   MPI_Finalize();
+],
+                     casc_result=yes)
+                  AC_LANG_POP(C)
+                  LIBS=$LIBS_SAVE
+
+                  if test "$casc_result" = yes; then
+                     casc_result=
+                     break
+                  fi
+               fi
+            done
+
+            dnl * After loop is done, set variables to be substituted
+            MPILIBS=$casc_mplibs
+            MPILIBDIRS=$casc_mplibdirs
+            MPIFLAGS="$MPIFLAGS $casc_mpflags"
+
+            dnl * IBM MPI uses /usr/lpp/ppe.poe/libc.a instead of /lib/libc.a
+            dnl * so we need to make sure that -L/lib is not part of the
+            dnl * linking line when we use IBM MPI.  This only appears in
+            dnl * configure when CASC_FIND_MPI is called first.
+	    dnl            ifdef([AC_PROVIDE_CASC_FIND_F77LIBS],
+            dnl               if test -n "`echo $F77LIBFLAGS | grep '\-L/lib '`"; then
+            dnl                  if test -n "`echo $F77LIBFLAGS | grep xlf`"; then
+            dnl                     F77LIBFLAGS=`echo $F77LIBFLAGS | sed 's/-L\/lib //g'`
+            dnl                  fi
+            dnl               fi
+            dnl            )
+
+            if test -n "`echo $MPILIBS | grep pmpich`" &&
+               test -z "`echo $MPILIBS | grep pthread`"; then
+                  LIBS_SAVE=$LIBS
+                  LIBS="$MPIINCLUDE $MPIFLAGS $MPILIBDIRS $MPILIBS -lpthread"
+                  AC_LANG_PUSH(C)
+                  AC_TRY_LINK(
+dnl                     ifelse(AC_LANG, [C++],
+
+dnl [#ifdef __cplusplus
+dnl extern "C"
+dnl #endif
+dnl ])dnl
+[#include "mpi.h"
+], [int rank, size;
+   int argc;
+   char **argv;
+   MPI_Init(&argc, &argv);
+   MPI_Comm_size(MPI_COMM_WORLD, &size);
+   MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+   MPI_Finalize();
+],
+                     MPILIBS="$MPILIBS -lpthread")
+                  AC_LANG_POP(C)
+                  LIBS=$LIBS_SAVE
+            fi
+
+            AC_MSG_CHECKING(for MPI include directories)
+            AC_MSG_RESULT($MPIINCLUDE)
+            AC_MSG_CHECKING(for MPI library directories)
+            AC_MSG_RESULT($MPILIBDIRS)
+            AC_MSG_CHECKING(for MPI libraries)
+            AC_MSG_RESULT($MPILIBS)
+            AC_MSG_CHECKING(for other MPI-related flags)
+            AC_MSG_RESULT($MPIFLAGS)
+         fi
+      fi
+
+      AC_CACHE_VAL(casc_cv_mpi_include, casc_cv_mpi_include=$MPIINCLUDE)
+      AC_CACHE_VAL(casc_cv_mpi_lib_dirs, casc_cv_mpi_lib_dirs=$MPILIBDIRS)
+      AC_CACHE_VAL(casc_cv_mpi_libs, casc_cv_mpi_libs=$MPILIBS)
+      AC_CACHE_VAL(casc_cv_mpi_flags, casc_cv_mpi_flags=$MPIFLAGS)
+   fi
+
+   AC_SUBST(MPIINCLUDE)
+   AC_SUBST(MPILIBDIRS)
+   AC_SUBST(MPILIBS)
+   AC_SUBST(MPIFLAGS)
+
+])dnl
+
+dnl ********************************************************************
+dnl * CASC_FIND_MPI_ALPHA is a special case of CASC_FIND_MPI for the
+dnl * compass cluster.  The original CASC_FIND_MPI looks for existence
+dnl * of mpCC and mpiCC.  If the former is found it uses native (proprietary)
+dnl * mpi and if the latter is found, it uses mpich.  The DECs are a
+dnl * special case because mpCC does not exist and mpiCC does, but we want
+dnl * to use the native version by default.  Therefore, the original macro
+dnl * did not work for this case so I added this one to deal with it.
+dnl * AMW 9/00
+dnl ********************************************************************
+
+AC_DEFUN([CASC_FIND_MPI_ALPHA],
+[
+
+   casc_find_mpi_cache_used=yes
+
+   AC_CACHE_VAL(casc_cv_mpi_include, casc_find_mpi_cache_used=no)
+   AC_CACHE_VAL(casc_cv_mpi_libs, casc_find_mpi_cache_used=no)
+   AC_CACHE_VAL(casc_cv_mpi_lib_dirs, casc_find_mpi_cache_used=no)
+   AC_CACHE_VAL(casc_cv_mpi_flags, casc_find_mpi_cache_used=no)
+
+   if test "$casc_find_mpi_cache_used" = "yes"; then
+      AC_MSG_CHECKING(for location of mpi.h)
+      MPIINCLUDE=$casc_cv_mpi_include
+      AC_MSG_RESULT("\(cached\) $MPIINCLUDE")
+
+      AC_MSG_CHECKING(for MPI library directories)
+      MPILIBDIRS=$casc_cv_mpi_lib_dirs
+      AC_MSG_RESULT("\(cached\) $MPILIBDIRS")
+
+      AC_MSG_CHECKING(for MPI libraries)
+      MPILIBS=$casc_cv_mpi_libs
+      AC_MSG_RESULT("\(cached\) $MPILIBS")
+
+      AC_MSG_CHECKING(for other MPI-related flags)
+      MPIFLAGS=$casc_cv_mpi_flags
+      AC_MSG_RESULT("\(cached\) $MPIFLAGS")
+   else
+
+
+      dnl * Set up user options.  If user uses any of the fist three options,
+      dnl * then automatic tests are not run.
+
+      casc_user_chose_mpi=no
+      AC_ARG_WITH(mpi-include, [  --with-mpi-include=DIR  mpi.h is in DIR],
+                  for mpi_dir in $withval; do
+                     MPIINCLUDE="$MPIINCLUDE -I$withval"
+                  done; casc_user_chose_mpi=yes)
+
+      AC_ARG_WITH(mpi-libs,
+[  --with-mpi-libs=LIBS    LIBS is space-separated list of library names
+                          needed for MPI, e.g. \"nsl socket mpi\"],
+                  for mpi_lib in $withval; do
+                     MPILIBS="$MPILIBS -l$mpi_lib"
+                  done; casc_user_chose_mpi=yes)
+
+
+      AC_ARG_WITH(mpi-lib-dirs,
+[  --with-mpi-lib-dirs=DIRS
+                          DIRS is space-separated list of directories
+                          containing the libraries specified by
+                          \`--with-mpi-libs', e.g \"/usr/lib /usr/local/mpi/lib\"],
+                  for mpi_lib_dir in $withval; do
+                     MPILIBDIRS="-L$mpi_lib_dir $MPILIBDIRS"
+                  done; casc_user_chose_mpi=yes)
+
+      dnl * --with-mpi-flags only adds to automatic selections,
+      dnl * does not override
+
+      AC_ARG_WITH(mpi-flags,
+[  --with-mpi-flags=FLAGS  FLAGS is space-separated list of whatever flags other
+                          than -l and -L are needed to link with mpi libraries],
+                          MPIFLAGS=$withval)
+
+
+      if test "$casc_user_chose_mpi" = "no"; then
+
+         dnl * Set defaults for Compass cluster here.  This is the point where
+         dnl * we call CASC_SET_MPI in CASC_FIND_MPI macro.
+
+         casc_mpi_include_dir=
+         casc_mpi_lib_dirs=
+         casc_mpi_libs="mpi rt rpc gs pthread"
+
+         for casc_incl_dir in $casc_mpi_include_dir; do
+            MPIINCLUDE="-I$casc_incl_dir $MPIINCLUDE"
+         done
+         for casc_lib_dir in $casc_mpi_lib_dirs; do
+            MPILIBDIRS="-L$casc_lib_dir $MPILIBDIRS"
+         done
+         for casc_lib in $casc_mpi_libs; do
+            MPILIBS="$MPILIBS -l$casc_lib"
+         done
+      fi
+
+
+      AC_MSG_CHECKING(for MPI include directories)
+      AC_MSG_RESULT($MPIINCLUDE)
+      AC_MSG_CHECKING(for MPI library directories)
+      AC_MSG_RESULT($MPILIBDIRS)
+      AC_MSG_CHECKING(for MPI libraries)
+      AC_MSG_RESULT($MPILIBS)
+      AC_MSG_CHECKING(for other MPI-related flags)
+      AC_MSG_RESULT($MPIFLAGS)
+
+   fi
+
+])dnl
+
+
diff -r 000000000000 -r 5eda1a3f24e8 config/casc_silo.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/casc_silo.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,62 @@
+dnl Define a macro for supporting SILO
+
+AC_DEFUN([CASC_SUPPORT_SILO],[
+
+# Begin CASC_SUPPORT_SILO
+# Defines silo_PREFIX silo_INCLUDES and silo_LIBS if with-silo is specified.
+AC_ARG_WITH(silo,
+[ --with-silo[=PATH]  Use SILO and optionally specify where SILO is installed.],
+, with_silo=no)
+
+case "$with_silo" in
+  no)
+    AC_MSG_NOTICE([configuring without SILO support])
+    : Do nothing
+  ;;
+  yes)
+    # SILO install path was not specified.
+    # Look in a couple of standard locations to probe if 
+    # SILO header files are there.
+    AC_MSG_CHECKING([for SILO installation])
+    for dir in /usr /usr/local; do
+      if test -f ${dir}/include/silo.h; then
+        silo_PREFIX=${dir}
+        break
+      fi
+    done
+    AC_MSG_RESULT([$silo_PREFIX])
+  ;;
+  *)
+    # SILO install path was specified.
+    AC_MSG_CHECKING([for SILO installation])
+    silo_PREFIX=$with_silo
+    silo_INCLUDES="-I${silo_PREFIX}/include"
+    if test -f ${silo_PREFIX}/include/silo.h; then
+        AC_MSG_RESULT([$silo_PREFIX])
+    else
+        AC_MSG_RESULT([$silo_PREFIX])
+        AC_MSG_ERROR([SILO not found in $with_silo])
+    fi
+  ;;
+esac
+
+# Determine which SILO library is built
+if test "${silo_PREFIX+set}" = set; then
+   AC_MSG_CHECKING([for SILO library])
+   if test -f ${silo_PREFIX}/lib/libsilo.a; then
+      silo_LIBS='-lsilo'
+      AC_MSG_RESULT([using $silo_LIBS])
+   elif test -f ${silo_PREFIX}/lib/libsiloh5.a; then
+      silo_LIBS='-lsiloh5'
+      AC_MSG_RESULT([using $silo_LIBS])
+   else
+      AC_MSG_RESULT([using $silo_LIBS])
+      AC_MSG_ERROR([Could not fine silo library in $silo_PREFIX])
+   fi
+
+   silo_LIBS="-L${silo_PREFIX}/lib ${silo_LIBS}"
+fi
+
+# END CASC_SUPPORT_SILO
+
+])dnl End definition of CASC_SUPPORT_SILO
diff -r 000000000000 -r 5eda1a3f24e8 config/casc_valgind.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/casc_valgind.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,49 @@
+dnl Define a macro for supporting VALGRIND
+
+AC_DEFUN([CASC_SUPPORT_VALGRIND],[
+
+# Begin CASC_SUPPORT_VALGRIND
+# Defines valgrind_EXE
+AC_ARG_WITH(valgrind,
+[ --with-valgrind[=PATH]  Use VALGRIND and optionally specify where VALGRIND is installed.],
+, with_valgrind=no)
+
+case "$with_valgrind" in
+  no)
+    AC_MSG_NOTICE([configuring without VALGRIND support])
+    : Do nothing
+  ;;
+  yes)
+    # VALGRIND install path was not specified.
+    # Look in a couple of standard locations to probe if 
+    # VALGRIND header files are there.
+    AC_MSG_CHECKING([for VALGRIND installation])
+    for dir in /usr /usr/local; do
+      if test -f ${dir}/bin/valgrind; then
+        valgrind_PREFIX=${dir}
+        break
+      fi
+    done
+    AC_MSG_RESULT([$valgrind_PREFIX])
+  ;;
+  *)
+    # VALGRIND install path was specified.
+    AC_MSG_CHECKING([for VALGRIND installation])
+    valgrind_PREFIX=$with_valgrind
+    ;;
+esac
+
+if test "${valgrind_PREFIX+set}" = set 
+then
+   valgrind_EXE="${valgrind_PREFIX}/bin/valgrind"
+   if test -f ${valgrind_PREFIX}/bin/valgrind; then
+      AC_MSG_RESULT([$valgrind_PREFIX])
+   else
+      AC_MSG_RESULT([$valgrind_PREFIX])
+      AC_MSG_ERROR([VALGRIND not found in $with_valgrind])
+   fi
+fi
+
+# END CASC_SUPPORT_VALGRIND
+
+])dnl End definition of CASC_SUPPORT_VALGRIND
diff -r 000000000000 -r 5eda1a3f24e8 config/casc_xlc.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/casc_xlc.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,38 @@
+dnl Define macros for supporting XLC 
+
+AC_DEFUN([CASC_CXX_STD_FILL_N_RETURNS_VOID],[
+
+# Begin CASC_CXX_STD_FILL_N_RETURNS_VOID
+# Defines CASC_STD_FILL_N_RETURNS_VOID
+
+# Check if std::fill_n returns a void, older XLC compilers do this.
+   AC_REQUIRE([AC_PROG_CXX])
+   AC_MSG_CHECKING(whether std:fill_n returns void)
+   AC_LANG_PUSH(C++)
+   CASC_PUSH_COMPILER_STATE
+   AC_COMPILE_IFELSE([
+
+      #include <vector>
+
+      template void std::fill_n<unsigned int*, int, int>(unsigned int*, int, int const&);      
+
+      ], 
+      casc_std_fill_n_returns_void=yes,
+      casc_std_fill_n_returns_void=no)
+   CASC_POP_COMPILER_STATE
+   AC_LANG_POP
+   AC_MSG_RESULT($casc_std_fill_n_returns_void)
+
+   if test "$casc_std_fill_n_returns_void" = yes; then
+      AC_DEFINE([CASC_STD_FILL_N_RETURNS_VOID], 1, [Define if std::fill_n returns void])
+   fi
+
+
+# END CASC_CXX_STD_FILL_N_RETURNS_VOID
+
+])dnl End definition of CASC_CXX_STD_FILL_N_RETURNS_VOID
+
+
+
+
+
diff -r 000000000000 -r 5eda1a3f24e8 config/check_szlib.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/check_szlib.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,98 @@
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   CHECK_SZLIB()
+#
+# DESCRIPTION
+#
+#   This macro searches for an installed szlib library. If nothing was
+#   specified when calling configure, it searches first in /usr/local and
+#   then in /usr. If the --with-szlib=DIR is specified, it will try to find
+#   it in DIR/include/szlib.h and DIR/lib/libsz.a. If --without-szlib is
+#   specified, the library is not searched at all.
+#
+#   If either the header file (szlib.h) or the library (libsz) is not found,
+#   the configuration exits on error, asking for a valid szlib installation
+#   directory or --without-szlib.
+#
+#   The macro defines the symbol HAVE_LIBSZ if the library is found. You
+#   should use autoheader to include a definition for this symbol in a
+#   config.h file. Sample usage in a C/C++ source is as follows:
+#
+#     #ifdef HAVE_LIBSZ
+#     #include <szlib.h>
+#     #endif /* HAVE_LIBSZ */
+#
+
+AC_DEFUN([CHECK_SZLIB],
+#
+# DEFINES :
+#	        szlib_PREFIX
+#		szlib_INCLUDES
+#		szlib_LIBS
+#
+[AC_MSG_CHECKING(if szlib is wanted)
+AC_ARG_WITH(szlib,
+[  --with-szlib=DIR root directory path of szlib installation [DIR defaults to
+                    /usr/local or /usr if not found in /usr/local]
+  --without-szlib to disable szlib usage completely [the default]],
+[if test "$withval" != no ; then
+  AC_MSG_RESULT(yes)
+  if test "$withval" == yes ;
+  then
+     SZLIB_HOME=/usr/local
+  else
+     SZLIB_HOME="$withval"
+  fi
+  if test ! -d "$SZLIB_HOME"
+  then
+    AC_MSG_WARN([Sorry, $SZLIB_HOME does not exist, checking usual places])
+    SZLIB_HOME=/usr/local
+    if test ! -f "${SZLIB_HOME}/include/szlib.h"
+    then
+       SZLIB_HOME=/usr
+    fi
+  fi
+else
+  AC_MSG_RESULT(no)
+fi])
+
+#
+# Locate szlib, if wanted
+#
+if test -n "${SZLIB_HOME}"
+then
+        SZLIB_OLD_LDFLAGS=$LDFLAGS
+        SZLIB_OLD_CPPFLAGS=$LDFLAGS
+        LDFLAGS="$LDFLAGS -L${SZLIB_HOME}/lib"
+        CPPFLAGS="$CPPFLAGS -I${SZLIB_HOME}/include"
+        AC_LANG_SAVE
+        AC_LANG_C
+        AC_CHECK_LIB(z, inflateEnd, [szlib_cv_libsz=yes], [szlib_cv_libsz=no])
+        AC_CHECK_HEADER(szlib.h, [szlib_cv_szlib_h=yes], [szlib_cv_szlib_h=no])
+        AC_LANG_RESTORE
+        if test "$szlib_cv_libsz" = "yes" -a "$szlib_cv_szlib_h" = "yes"
+        then
+	        szlib_PREFIX="${SZLIB_HOME}"
+		szlib_INCLUDES="-I${SZLIB_HOME}/include"
+		szlib_LIBS="-L${SZLIB_HOME}/lib -lsz"
+                #
+                # If both library and header were found, use them
+                #
+                AC_CHECK_LIB(z, inflateEnd)
+                AC_MSG_CHECKING(szlib in ${SZLIB_HOME})
+                AC_MSG_RESULT(ok)
+        else
+                #
+                # If either header or library was not found, revert and bomb
+                #
+                AC_MSG_CHECKING(szlib in ${SZLIB_HOME})
+                LDFLAGS="$SZLIB_OLD_LDFLAGS"
+                CPPFLAGS="$SZLIB_OLD_CPPFLAGS"
+                AC_MSG_RESULT(failed)
+                AC_MSG_ERROR(either specify a valid szlib installation with --with-szlib=DIR or disable szlib usage with --without-szlib)
+        fi
+fi
+
+])
diff -r 000000000000 -r 5eda1a3f24e8 config/config.guess
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/config.guess	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1388 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+timestamp='2003-05-09'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Per Bothner <per at bothner.com>.
+# Please send patches to <config-patches at gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+	for c in cc gcc c89 c99 ; do
+	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	if test x"$CC_FOR_BUILD" = x ; then
+	  CC_FOR_BUILD=no_compiler_found ;
+	fi
+	;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi at noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		eval $set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep __ELF__ >/dev/null
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+	        os=netbsd
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case "${UNAME_VERSION}" in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	echo "${machine}-${os}${release}"
+	exit 0 ;;
+    amiga:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    arc:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    hp300:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mac68k:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    macppc:OpenBSD:*:*)
+	echo powerpc-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvme68k:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvme88k:OpenBSD:*:*)
+	echo m88k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvmeppc:OpenBSD:*:*)
+	echo powerpc-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    pmax:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    sgi:OpenBSD:*:*)
+	echo mipseb-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    sun3:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    wgrisc:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    *:OpenBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    alpha:OSF1:*:*)
+	if test $UNAME_RELEASE = "V4.0"; then
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+	fi
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case "$ALPHA_CPU_TYPE" in
+	    "EV4 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE="alphaev5" ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE="alphaev56" ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE="alphapca56" ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE="alphapca57" ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE="alphaev6" ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE="alphaev67" ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE="alphaev69" ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE="alphaev7" ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE="alphaev79" ;;
+	esac
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	exit 0 ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit 0 ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit 0 ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-unknown-sysv4
+	exit 0;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit 0 ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
+	exit 0 ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit 0 ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit 0;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit 0;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit 0 ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit 0 ;;
+    DRS?6000:UNIX_SV:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) echo sparc-icl-nx7 && exit 0 ;;
+	esac ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    i86pc:SunOS:5.*:*)
+	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:*:*)
+	case "`/usr/bin/arch -k`" in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit 0 ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit 0 ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit 0 ;;
+    aushp:SunOS:*:*)
+	echo sparc-auspex-sunos${UNAME_RELEASE}
+	exit 0 ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit 0 ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit 0 ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit 0 ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit 0 ;;
+    powerpc:machten:*:*)
+	echo powerpc-apple-machten${UNAME_RELEASE}
+	exit 0 ;;
+    RISC*:Mach:*:*)
+	echo mips-dec-mach_bsd4.3
+	exit 0 ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit 0 ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit 0 ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit 0 ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c \
+	  && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+	  && exit 0
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit 0 ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit 0 ;;
+    Motorola:*:4.3:PL8-*)
+	echo powerpc-harris-powermax
+	exit 0 ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	echo powerpc-harris-powermax
+	exit 0 ;;
+    Night_Hawk:Power_UNIX:*:*)
+	echo powerpc-harris-powerunix
+	exit 0 ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit 0 ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit 0 ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit 0 ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	    else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
+	fi
+ 	exit 0 ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit 0 ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit 0 ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit 0 ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit 0 ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit 0 ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
+	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	echo i386-ibm-aix
+	exit 0 ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit 0 ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $set_cc_for_build
+		sed 's/^		//' << EOF >$dummy.c
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+		echo rs6000-ibm-aix3.2.5
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit 0 ;;
+    *:AIX:*:[45])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit 0 ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit 0 ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit 0 ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	exit 0 ;;                           # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit 0 ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit 0 ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit 0 ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit 0 ;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	case "${UNAME_MACHINE}" in
+	    9000/31? )            HP_ARCH=m68000 ;;
+	    9000/[34]?? )         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if [ -x /usr/bin/getconf ]; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                        esac ;;
+                    esac
+		fi
+		if [ "${HP_ARCH}" = "" ]; then
+		    eval $set_cc_for_build
+		    sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+              	{
+              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+              	case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+              	    switch (bits)
+              		{
+              		case 64: puts ("hppa2.0w"); break;
+              		case 32: puts ("hppa2.0n"); break;
+              		default: puts ("hppa2.0"); break;
+              		} break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+              	    puts ("hppa2.0"); break;
+              #endif
+              	default: puts ("hppa1.0"); break;
+              	}
+                  exit (0);
+              }
+EOF
+		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if [ ${HP_ARCH} = "hppa2.0w" ]
+	then
+	    # avoid double evaluation of $set_cc_for_build
+	    test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+	    then
+		HP_ARCH="hppa2.0w"
+	    else
+		HP_ARCH="hppa64"
+	    fi
+	fi
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit 0 ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit 0 ;;
+    3050*:HI-UX:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+	echo unknown-hitachi-hiuxwe2
+	exit 0 ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit 0 ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit 0 ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit 0 ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit 0 ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit 0 ;;
+    i*86:OSF1:*:*)
+	if [ -x /usr/sbin/sysversion ] ; then
+	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	else
+	    echo ${UNAME_MACHINE}-unknown-osf1
+	fi
+	exit 0 ;;
+    parisc*:Lites*:*:*)
+	echo hppa1.1-hp-lites
+	exit 0 ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	echo c1-convex-bsd
+        exit 0 ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+        exit 0 ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	echo c34-convex-bsd
+        exit 0 ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	echo c38-convex-bsd
+        exit 0 ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	echo c4-convex-bsd
+        exit 0 ;;
+    CRAY*Y-MP:*:*:*)
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*[A-Z]90:*:*:*)
+	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*TS:*:*:*)
+	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*T3E:*:*:*)
+	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*SV1:*:*:*)
+	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    *:UNICOS/mp:*:*)
+	echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 
+	exit 0 ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit 0 ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
+	# Determine whether the default compiler uses glibc.
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <features.h>
+	#if __GLIBC__ >= 2
+	LIBC=gnu
+	#else
+	LIBC=
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
+	exit 0 ;;
+    i*:CYGWIN*:*)
+	echo ${UNAME_MACHINE}-pc-cygwin
+	exit 0 ;;
+    i*:MINGW*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit 0 ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit 0 ;;
+    x86:Interix*:3*)
+	echo i586-pc-interix3
+	exit 0 ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+	echo i${UNAME_MACHINE}-pc-mks
+	exit 0 ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i586-pc-interix
+	exit 0 ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
+	exit 0 ;;
+    p*:CYGWIN*:*)
+	echo powerpcle-unknown-cygwin
+	exit 0 ;;
+    prep*:SunOS:5.*:*)
+	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    *:GNU:*:*)
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit 0 ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit 0 ;;
+    arm*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    mips:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips
+	#undef mipsel
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mipsel
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+	;;
+    mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips64
+	#undef mips64el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mips64el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips64
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+	;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-gnu
+	exit 0 ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-gnu
+	exit 0 ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	exit 0 ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
+	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
+	  *)    echo hppa-unknown-linux-gnu ;;
+	esac
+	exit 0 ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-gnu
+	exit 0 ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-ibm-linux
+	exit 0 ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    x86_64:Linux:*:*)
+	echo x86_64-unknown-linux-gnu
+	exit 0 ;;
+    i*86:Linux:*:*)
+	# The BFD linker knows what the default object file format is, so
+	# first see if it will tell us. cd to the root directory to prevent
+	# problems with other programs or directories called `ld' in the path.
+	# Set LC_ALL=C to ensure ld outputs messages in English.
+	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+			 | sed -ne '/supported targets:/!d
+				    s/[ 	][ 	]*/ /g
+				    s/.*supported targets: *//
+				    s/ .*//
+				    p'`
+        case "$ld_supported_targets" in
+	  elf32-i386)
+		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+		;;
+	  a.out-i386-linux)
+		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+		exit 0 ;;
+	  coff-i386)
+		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+		exit 0 ;;
+	  "")
+		# Either a pre-BFD a.out linker (linux-gnuoldld) or
+		# one that does not give us useful --help.
+		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+		exit 0 ;;
+	esac
+	# Determine whether the default compiler is a.out or elf
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <features.h>
+	#ifdef __ELF__
+	# ifdef __GLIBC__
+	#  if __GLIBC__ >= 2
+	LIBC=gnu
+	#  else
+	LIBC=gnulibc1
+	#  endif
+	# else
+	LIBC=gnulibc1
+	# endif
+	#else
+	#ifdef __INTEL_COMPILER
+	LIBC=gnu
+	#else
+	LIBC=gnuaout
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+	test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
+	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+	;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	echo i386-sequent-sysv4
+	exit 0 ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit 0 ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit 0 ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit 0 ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit 0 ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit 0 ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit 0 ;;
+    i*86:*:5:[78]*)
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit 0 ;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit 0 ;;
+    pc:*:*:*)
+	# Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+	echo i386-pc-msdosdjgpp
+        exit 0 ;;
+    Intel:Mach:3*:*)
+	echo i386-pc-mach3
+	exit 0 ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit 0 ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit 0 ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit 0 ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit 0 ;;
+    M680?0:D-NIX:5.3:*)
+	echo m68k-diab-dnix
+	exit 0 ;;
+    M68*:*:R3V[567]*:*)
+	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && echo i486-ncr-sysv4 && exit 0 ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit 0 ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    rs6000:LynxOS:2.*:*)
+	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    SM[BE]S:UNIX_SV:*:*)
+	echo mips-dde-sysv${UNAME_RELEASE}
+	exit 0 ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit 0 ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit 0 ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit 0 ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel at ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit 0 ;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes at openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	echo hppa1.1-stratus-sysv4
+	exit 0 ;;
+    *:*:*:FTX*)
+	# From seanf at swdc.stratus.com.
+	echo i860-stratus-sysv4
+	exit 0 ;;
+    *:VOS:*:*)
+	# From Paul.Green at stratus.com.
+	echo hppa1.1-stratus-vos
+	exit 0 ;;
+    mc68*:A/UX:*:*)
+	echo m68k-apple-aux${UNAME_RELEASE}
+	exit 0 ;;
+    news*:NEWS-OS:6*:*)
+	echo mips-sony-newsos6
+	exit 0 ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if [ -d /usr/nec ]; then
+	        echo mips-nec-sysv${UNAME_RELEASE}
+	else
+	        echo mips-unknown-sysv${UNAME_RELEASE}
+	fi
+        exit 0 ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit 0 ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit 0 ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit 0 ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit 0 ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit 0 ;;
+    *:Darwin:*:*)
+	case `uname -p` in
+	    *86) UNAME_PROCESSOR=i686 ;;
+	    powerpc) UNAME_PROCESSOR=powerpc ;;
+	esac
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	exit 0 ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	exit 0 ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit 0 ;;
+    NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit 0 ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit 0 ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit 0 ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit 0 ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-unknown-plan9
+	exit 0 ;;
+    *:TOPS-10:*:*)
+	echo pdp10-unknown-tops10
+	exit 0 ;;
+    *:TENEX:*:*)
+	echo pdp10-unknown-tenex
+	exit 0 ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit 0 ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit 0 ;;
+    *:TOPS-20:*:*)
+	echo pdp10-unknown-tops20
+	exit 0 ;;
+    *:ITS:*:*)
+	echo pdp10-unknown-its
+	exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+	  ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+	printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+	printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+	echo c1-convex-bsd
+	exit 0 ;;
+    c2*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit 0 ;;
+    c34*)
+	echo c34-convex-bsd
+	exit 0 ;;
+    c38*)
+	echo c38-convex-bsd
+	exit 0 ;;
+    c4*)
+	echo c4-convex-bsd
+	exit 0 ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+    ftp://ftp.gnu.org/pub/gnu/config/
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches at gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff -r 000000000000 -r 5eda1a3f24e8 config/config.sub
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/config.sub	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1492 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+timestamp='2003-05-09'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Please send patches to <config-patches at gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit 0;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple | -axis)
+		os=
+		basic_machine=$1
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+ 	-chorusrdb)
+ 		os=-chorusrdb
+		basic_machine=$1
+ 		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco5)
+		os=-sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*)
+		os=-lynxos
+		;;
+	-ptx*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		;;
+	-psos*)
+		os=-psos
+		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+	# Recognize the basic CPU types without company name.
+	# Some are omitted here because they have special meanings below.
+	1750a | 580 \
+	| a29k \
+	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+	| clipper \
+	| d10v | d30v | dlx | dsp16xx \
+	| fr30 | frv \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| i370 | i860 | i960 | ia64 \
+	| ip2k \
+	| m32r | m68000 | m68k | m88k | mcore \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64vr | mips64vrel \
+	| mips64orion | mips64orionel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| msp430 \
+	| ns16k | ns32k \
+	| openrisc | or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| pyramid \
+	| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+	| sh64 | sh64le \
+	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
+	| strongarm \
+	| tahoe | thumb | tic80 | tron \
+	| v850 | v850e \
+	| we32k \
+	| x86 | xscale | xstormy16 | xtensa \
+	| z8k)
+		basic_machine=$basic_machine-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12)
+		# Motorola 68HC11/12.
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	580-* \
+	| a29k-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+	| avr-* \
+	| bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+	| clipper-* | cydra-* \
+	| d10v-* | d30v-* | dlx-* \
+	| elxsi-* \
+	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| ip2k-* \
+	| m32r-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | mcore-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* \
+	| mips64vr5000-* | mips64vr5000el-* \
+	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa32r2-* | mipsisa32r2el-* \
+	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64sb1-* | mipsisa64sb1el-* \
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipstx39-* | mipstx39el-* \
+	| msp430-* \
+	| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| pyramid-* \
+	| romp-* | rs6000-* \
+	| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+	| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+	| tahoe-* | thumb-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tron-* \
+	| v850-* | v850e-* | vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
+	| xtensa-* \
+	| ymp-* \
+	| z8k-*)
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	386bsd)
+		basic_machine=i386-unknown
+		os=-bsd
+		;;
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	a29khif)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	adobe68k)
+		basic_machine=m68010-adobe
+		os=-scout
+		;;
+	alliant | fx80)
+		basic_machine=fx80-alliant
+		;;
+	altos | altos3068)
+		basic_machine=m68k-altos
+		;;
+	am29k)
+		basic_machine=a29k-none
+		os=-bsd
+		;;
+	amd64)
+		basic_machine=x86_64-pc
+		;;
+	amdahl)
+		basic_machine=580-amdahl
+		os=-sysv
+		;;
+	amiga | amiga-*)
+		basic_machine=m68k-unknown
+		;;
+	amigaos | amigados)
+		basic_machine=m68k-unknown
+		os=-amigaos
+		;;
+	amigaunix | amix)
+		basic_machine=m68k-unknown
+		os=-sysv4
+		;;
+	apollo68)
+		basic_machine=m68k-apollo
+		os=-sysv
+		;;
+	apollo68bsd)
+		basic_machine=m68k-apollo
+		os=-bsd
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	c90)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
+	convex-c1)
+		basic_machine=c1-convex
+		os=-bsd
+		;;
+	convex-c2)
+		basic_machine=c2-convex
+		os=-bsd
+		;;
+	convex-c32)
+		basic_machine=c32-convex
+		os=-bsd
+		;;
+	convex-c34)
+		basic_machine=c34-convex
+		os=-bsd
+		;;
+	convex-c38)
+		basic_machine=c38-convex
+		os=-bsd
+		;;
+	cray | j90)
+		basic_machine=j90-cray
+		os=-unicos
+		;;
+	crds | unos)
+		basic_machine=m68k-crds
+		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
+	da30 | da30-*)
+		basic_machine=m68k-da30
+		;;
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+		basic_machine=mips-dec
+		;;
+	decsystem10* | dec10*)
+		basic_machine=pdp10-dec
+		os=-tops10
+		;;
+	decsystem20* | dec20*)
+		basic_machine=pdp10-dec
+		os=-tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		basic_machine=m68k-motorola
+		;;
+	delta88)
+		basic_machine=m88k-motorola
+		os=-sysv3
+		;;
+	dpx20 | dpx20-*)
+		basic_machine=rs6000-bull
+		os=-bosx
+		;;
+	dpx2* | dpx2*-bull)
+		basic_machine=m68k-bull
+		os=-sysv3
+		;;
+	ebmon29k)
+		basic_machine=a29k-amd
+		os=-ebmon
+		;;
+	elxsi)
+		basic_machine=elxsi-elxsi
+		os=-bsd
+		;;
+	encore | umax | mmax)
+		basic_machine=ns32k-encore
+		;;
+	es1800 | OSE68k | ose68k | ose | OSE)
+		basic_machine=m68k-ericsson
+		os=-ose
+		;;
+	fx2800)
+		basic_machine=i860-alliant
+		;;
+	genix)
+		basic_machine=ns32k-ns
+		;;
+	gmicro)
+		basic_machine=tron-gmicro
+		os=-sysv
+		;;
+	go32)
+		basic_machine=i386-pc
+		os=-go32
+		;;
+	h3050r* | hiux*)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	h8300hms)
+		basic_machine=h8300-hitachi
+		os=-hms
+		;;
+	h8300xray)
+		basic_machine=h8300-hitachi
+		os=-xray
+		;;
+	h8500hms)
+		basic_machine=h8500-hitachi
+		os=-hms
+		;;
+	harris)
+		basic_machine=m88k-harris
+		os=-sysv3
+		;;
+	hp300-*)
+		basic_machine=m68k-hp
+		;;
+	hp300bsd)
+		basic_machine=m68k-hp
+		os=-bsd
+		;;
+	hp300hpux)
+		basic_machine=m68k-hp
+		os=-hpux
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		basic_machine=m68000-hp
+		;;
+	hp9k3[2-9][0-9])
+		basic_machine=m68k-hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hppa-next)
+		os=-nextstep3
+		;;
+	hppaosf)
+		basic_machine=hppa1.1-hp
+		os=-osf
+		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
+	i370-ibm* | ibm*)
+		basic_machine=i370-ibm
+		;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+	i*86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i*86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i*86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i*86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	i386mach)
+		basic_machine=i386-mach
+		os=-mach
+		;;
+	i386-vsta | vsta)
+		basic_machine=i386-unknown
+		os=-vsta
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+	mingw32)
+		basic_machine=i386-pc
+		os=-mingw32
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	mmix*)
+		basic_machine=mmix-knuth
+		os=-mmixware
+		;;
+	monitor)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
+	msdos)
+		basic_machine=i386-pc
+		os=-msdos
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	nv1)
+		basic_machine=nv1-cray
+		os=-unicosmp
+		;;
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	or32 | or32-*)
+		basic_machine=or32-unknown
+		os=-coff
+		;;
+	OSE68000 | ose68000)
+		basic_machine=m68000-ericsson
+		os=-ose
+		;;
+	os68k)
+		basic_machine=m68k-none
+		os=-os68k
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+	pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pentium | p5 | k5 | k6 | nexgen | viac3)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
+		basic_machine=i686-pc
+		;;
+	pentiumii | pentium2)
+		basic_machine=i686-pc
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumii-* | pentium2-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=power-ibm
+		;;
+	ppc)	basic_machine=powerpc-unknown
+		;;
+	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+		;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64)	basic_machine=powerpc64-unknown
+		;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+		;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rom68k)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	s390 | s390-*)
+		basic_machine=s390-ibm
+		;;
+	s390x | s390x-*)
+		basic_machine=s390x-ibm
+		;;
+	sa29200)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	sb1)
+		basic_machine=mipsisa64sb1-unknown
+		;;
+	sb1el)
+		basic_machine=mipsisa64sb1el-unknown
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sparclite-wrs | simso-wrs)
+		basic_machine=sparclite-wrs
+		os=-vxworks
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	st2000)
+		basic_machine=m68k-tandem
+		;;
+	stratus)
+		basic_machine=i860-stratus
+		os=-sysv4
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	sv1)
+		basic_machine=sv1-cray
+		os=-unicos
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	t3e)
+		basic_machine=alphaev5-cray
+		os=-unicos
+		;;
+	t90)
+		basic_machine=t90-cray
+		os=-unicos
+		;;
+        tic4x | c4x*)
+		basic_machine=tic4x-unknown
+		os=-coff
+		;;
+	tic54x | c54x*)
+		basic_machine=tic54x-unknown
+		os=-coff
+		;;
+	tic55x | c55x*)
+		basic_machine=tic55x-unknown
+		os=-coff
+		;;
+	tic6x | c6x*)
+		basic_machine=tic6x-unknown
+		os=-coff
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	toad1)
+		basic_machine=pdp10-xkl
+		os=-tops20
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	v810 | necv810)
+		basic_machine=v810-nec
+		os=-none
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+		basic_machine=f301-fujitsu
+		;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
+		basic_machine=sh-unknown
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparc | sparcv9 | sparcv9b)
+		basic_machine=sparc-sun
+		;;
+	cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	mac | mpw | mac-mpw)
+		basic_machine=m68k-apple
+		;;
+	pmac | pmac-mpw)
+		basic_machine=powerpc-apple
+		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+	# -solaris* is a basic system type, with this one exception.
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -chorusos* | -chorusrdb* \
+	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+	      | -powermax* | -dnix*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i*86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto-qnx*)
+		;;
+	-nto*)
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+		;;
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+		;;
+	-mac*)
+		os=`echo $os | sed -e 's|mac|macos|'`
+		;;
+	-linux*)
+		os=`echo $os | sed -e 's|linux|linux-gnu|'`
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-opened*)
+		os=-openedition
+		;;
+	-wince*)
+		os=-wince
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-utek*)
+		os=-bsd
+		;;
+	-dynix*)
+		os=-bsd
+		;;
+	-acis*)
+		os=-aos
+		;;
+	-atheos*)
+		os=-atheos
+		;;
+	-386bsd)
+		os=-bsd
+		;;
+	-ctix* | -uts*)
+		os=-sysv
+		;;
+	-nova*)
+		os=-rtmk-nova
+		;;
+	-ns2 )
+		os=-nextstep2
+		;;
+	-nsk*)
+		os=-nsk
+		;;
+	# Preserve the version number of sinix5.
+	-sinix5.*)
+		os=`echo $os | sed -e 's|sinix|sysv|'`
+		;;
+	-sinix*)
+		os=-sysv4
+		;;
+	-triton*)
+		os=-sysv3
+		;;
+	-oss*)
+		os=-sysv3
+		;;
+	-svr4)
+		os=-sysv4
+		;;
+	-svr3)
+		os=-sysv3
+		;;
+	-sysvr4)
+		os=-sysv4
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-ose*)
+		os=-ose
+		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+		os=-mint
+		;;
+	-aros*)
+		os=-aros
+		;;
+	-kaos*)
+		os=-kaos
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-rebel)
+		os=-linux
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=-tops20
+		;;
+	pdp11-*)
+		os=-none
+		;;
+	*-dec | vax-*)
+		os=-ultrix4.2
+		;;
+	m68*-apollo)
+		os=-domain
+		;;
+	i386-sun)
+		os=-sunos4.0.2
+		;;
+	m68000-sun)
+		os=-sunos3
+		# This also exists in the configure program, but was not the
+		# default.
+		# os=-sunos4
+		;;
+	m68*-cisco)
+		os=-aout
+		;;
+	mips*-cisco)
+		os=-elf
+		;;
+	mips*-*)
+		os=-elf
+		;;
+	or32-*)
+		os=-coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=-sysv3
+		;;
+	sparc-* | *-sun)
+		os=-sunos4.1.1
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-ibm)
+		os=-aix
+		;;
+	*-wec)
+		os=-proelf
+		;;
+	*-winbond)
+		os=-proelf
+		;;
+	*-oki)
+		os=-proelf
+		;;
+	*-hp)
+		os=-hpux
+		;;
+	*-hitachi)
+		os=-hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=-sysv
+		;;
+	*-cbm)
+		os=-amigaos
+		;;
+	*-dg)
+		os=-dgux
+		;;
+	*-dolphin)
+		os=-sysv3
+		;;
+	m68k-ccur)
+		os=-rtu
+		;;
+	m88k-omron*)
+		os=-luna
+		;;
+	*-next )
+		os=-nextstep
+		;;
+	*-sequent)
+		os=-ptx
+		;;
+	*-crds)
+		os=-unos
+		;;
+	*-ns)
+		os=-genix
+		;;
+	i370-*)
+		os=-mvs
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+	*-gould)
+		os=-sysv
+		;;
+	*-highlevel)
+		os=-bsd
+		;;
+	*-encore)
+		os=-bsd
+		;;
+	*-sgi)
+		os=-irix
+		;;
+	*-siemens)
+		os=-sysv4
+		;;
+	*-masscomp)
+		os=-rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=-uxpv
+		;;
+	*-rom68k)
+		os=-coff
+		;;
+	*-*bug)
+		os=-coff
+		;;
+	*-apple)
+		os=-macos
+		;;
+	*-atari*)
+		os=-mint
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $os in
+			-riscix*)
+				vendor=acorn
+				;;
+			-sunos*)
+				vendor=sun
+				;;
+			-aix*)
+				vendor=ibm
+				;;
+			-beos*)
+				vendor=be
+				;;
+			-hpux*)
+				vendor=hp
+				;;
+			-mpeix*)
+				vendor=hp
+				;;
+			-hiux*)
+				vendor=hitachi
+				;;
+			-unos*)
+				vendor=crds
+				;;
+			-dgux*)
+				vendor=dg
+				;;
+			-luna*)
+				vendor=omron
+				;;
+			-genix*)
+				vendor=ns
+				;;
+			-mvs* | -opened*)
+				vendor=ibm
+				;;
+			-ptx*)
+				vendor=sequent
+				;;
+			-vxsim* | -vxworks* | -windiss*)
+				vendor=wrs
+				;;
+			-aux*)
+				vendor=apple
+				;;
+			-hms*)
+				vendor=hitachi
+				;;
+			-mpw* | -macos*)
+				vendor=apple
+				;;
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+				vendor=atari
+				;;
+			-vos*)
+				vendor=stratus
+				;;
+		esac
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff -r 000000000000 -r 5eda1a3f24e8 config/install-sh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/install-sh	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,251 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission.  M.I.T. makes no representations about the
+# suitability of this software for any purpose.  It is provided "as is"
+# without express or implied warranty.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.  It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+    case $1 in
+	-c) instcmd="$cpprog"
+	    shift
+	    continue;;
+
+	-d) dir_arg=true
+	    shift
+	    continue;;
+
+	-m) chmodcmd="$chmodprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-o) chowncmd="$chownprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-g) chgrpcmd="$chgrpprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-s) stripcmd="$stripprog"
+	    shift
+	    continue;;
+
+	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
+	    shift
+	    continue;;
+
+	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+	    shift
+	    continue;;
+
+	*)  if [ x"$src" = x ]
+	    then
+		src=$1
+	    else
+		# this colon is to work around a 386BSD /bin/sh bug
+		:
+		dst=$1
+	    fi
+	    shift
+	    continue;;
+    esac
+done
+
+if [ x"$src" = x ]
+then
+	echo "install:	no input file specified"
+	exit 1
+else
+	true
+fi
+
+if [ x"$dir_arg" != x ]; then
+	dst=$src
+	src=""
+	
+	if [ -d $dst ]; then
+		instcmd=:
+		chmodcmd=""
+	else
+		instcmd=mkdir
+	fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad 
+# if $src (and thus $dsttmp) contains '*'.
+
+	if [ -f $src -o -d $src ]
+	then
+		true
+	else
+		echo "install:  $src does not exist"
+		exit 1
+	fi
+	
+	if [ x"$dst" = x ]
+	then
+		echo "install:	no destination specified"
+		exit 1
+	else
+		true
+	fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+	if [ -d $dst ]
+	then
+		dst="$dst"/`basename $src`
+	else
+		true
+	fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+#  this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='	
+'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+	pathcomp="${pathcomp}${1}"
+	shift
+
+	if [ ! -d "${pathcomp}" ] ;
+        then
+		$mkdirprog "${pathcomp}"
+	else
+		true
+	fi
+
+	pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+	$doit $instcmd $dst &&
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+	if [ x"$transformarg" = x ] 
+	then
+		dstfile=`basename $dst`
+	else
+		dstfile=`basename $dst $transformbasename | 
+			sed $transformarg`$transformbasename
+	fi
+
+# don't allow the sed command to completely eliminate the filename
+
+	if [ x"$dstfile" = x ] 
+	then
+		dstfile=`basename $dst`
+	else
+		true
+	fi
+
+# Make a temp file name in the proper directory.
+
+	dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+	$doit $instcmd $src $dsttmp &&
+
+	trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing.  If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+	$doit $rmcmd -f $dstdir/$dstfile &&
+	$doit $mvcmd $dsttmp $dstdir/$dstfile 
+
+fi &&
+
+
+exit 0
diff -r 000000000000 -r 5eda1a3f24e8 config/preconf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/preconf	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+# This is a short, non-critical script to issue the commands
+# for rebuilding the configure script.
+
+topdir="`echo $0 | sed 's:/[^/]\{1,\}$::'`/.."
+topdir="`echo $0 | sed -e 's:^[^/]\{1,\}$:./\&:' -e 's:/[^/]\{1,\}$::'`/.."
+
+
+set -x
+
+# Go to the top-level directory.
+cd "$topdir"
+
+# We don't always have to remove the cache, but I'm not sure when we
+# should so just remove it.
+rm -rf autom4te.cache
+
+# This generates the aclocal.m4 file.
+# aclocal grabs needed macros and put them in aclocal.m4.
+# Having aclocal.m4 allows one to regenerate configure after
+# a "minor change" without having to look for macros.
+# A minor change is one that does not require a new macro.
+test -r acmacros &&	\
+aclocal"$AUTOMAKE_VERSION" -I `pwd`/config -I `pwd`/acmacros --output=config/aclocal.m4
+
+# This generates config/SAMRAI_config.h.in
+# The file is generated based on the AH_TOP and AH_BOTTOM macros
+# and the numerous use of AC_DEFINE.
+#
+# We remove some macros because they conflict with other packages
+# using autoconf, and we don't use these macros anyway.
+autoheader"$AUTOCONF_VERSION" -I config
+sed -i -e 's/^\(#undef \(PACKAGE\|VERSION\)\)/\/\/ Removed due to name conflict \1/' config/SAMRAI_config.h.in
+
+# This generates configure
+autoconf"$AUTOCONF_VERSION" -I config || exit 1
diff -r 000000000000 -r 5eda1a3f24e8 config/samrai-serpa-run.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/samrai-serpa-run.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,470 @@
+dnl Define a macro for supporting generalized serial-parallel run.
+
+
+AC_DEFUN([SAMRAI_SERPA],[
+dnl Support a generalized way to run a program in serial or parallel mode.
+dnl (serpa is serial + parallel).
+dnl
+dnl Arg1: name (may include relative path) to give to shell script created.
+dnl   If omitted, the name will be serpa-run, in the top level directory.
+dnl
+dnl This macro brings out an automake bug.  See "IMPORTANT NOTE:" below
+dnl for comments and how to circumvent.
+
+# Begin macro $0
+
+
+# The generalized script needs to know about the system
+# so it can form the appropriate parallel run command line.
+AC_REQUIRE([AC_CANONICAL_TARGET])
+
+
+dnl The parallel run program (usually mpirun) is hardwired for now,
+dnl but it should be more flexible.
+dnl I plan to eventualy use the following variable,
+dnl but it is not currently used.
+AC_ARG_WITH(parallel-run-bin,[
+  --with-parallel-run-bin=STRING
+		Specify the parallel run binary (i.e., mpirun, dmpirun,
+		poe, etc) to be used in the serial-parallel run script.
+],[
+case "$with_parallel_run_bin" in
+  no)
+    # Set PARALLEL_RUN_BIN to blank to remove it from the serpa-run script.
+    PARALLEL_RUN_BIN=;;
+  yes)
+    # Unset the variable PARALLEL_RUN_BIN so it is guessed in the next step.
+    unset PARALLEL_RUN_BIN;
+    ;;
+  *)
+    # Set PARALLEL_RUN_BIN to user specification.
+    PARALLEL_RUN_BIN="$with_parallel_run_bin"
+    ;;
+esac
+BTNG_AC_LOG_VAR(with_parallel_run_bin PARALLEL_RUN_BIN target_os, with-parallel-run-bin given)
+
+],[
+unset PARALLEL_RUN_BIN;
+BTNG_AC_LOG_VAR(with_parallel_run_bin PARALLEL_RUN_BIN target_os, with-parallel-run-bin NOT given)
+])
+# If PARALLEL_RUN_BIN is unset, guess it.
+if test ! "${PARALLEL_RUN_BIN+set}" = set; then
+  case "$target_os" in
+    osf*) PARALLEL_RUN_BIN=dmpirun
+    ;;
+    *) PARALLEL_RUN_BIN=mpirun
+    ;;
+  esac
+  BTNG_AC_LOG_VAR(with_parallel_run_bin PARALLEL_RUN_BIN target_os, after setting PARALLEL_RUN_BIN)
+fi
+AC_SUBST(PARALLEL_RUN_BIN)
+
+
+define(btng_serpa_run_fn,ifelse($1,,serpa-run,$1))
+dnl Create serpa-run.in file (at autoconf time, before configure time)
+dnl File serpa-run.in will be used at configure time to create serpa-run
+dnl in the compile tree.
+syscmd([ file_name=']btng_serpa_run_fn[' cat <<'__EOM__'> ${file_name}.in
+#!/bin/sh
+
+# This script runs an executable program serially or in parallel.
+
+# The syntax for running programs in parallel differs from platform to platform,
+# software to software.  This script automatically uses the correct syntax for
+# the environments that it knows about.  For the environments it does not know,
+# it has a default that may work.
+
+# This script defines the set of tests to put the program through.
+# This set is parametrized by these variables:
+# nproc_list: space- or comma-separated list of number of processors to use.
+
+
+# The name and directory of this script
+# (Do not rely on existence of dirname and basename programs.)
+script_name=`echo ${0} | sed -e 's:.*/::'`;
+dir_name=`echo ${0} | sed -e 's:^\([^/]*\)$:./\1:' -e 's:/[^/]*$::'`;
+
+# Define a way to gracefully die from within this script.
+# The die function is similar to Perl's.
+# Arguments are: <exit_value> <exit_message>
+die () {
+    echo "ERROR_MESSAGE_FROM ${script_name}:"
+    if [ -n "${2}" ]; then echo "Error ${2}"; fi
+    if [ -n "${1}" ]; then exit ${1}; fi
+    exit 99
+}
+
+
+# When no argument is given, print the help message and exit.
+if [ "${1}" = '-h' ] || [ "${1}" = '--help' ] || [ ${#} -lt 2 ] ; then
+  cat <<-_EOF_
+	Usage: ${script_name} <list of nproc> <program name>
+
+	This is a generalized script to run a program in serial
+	and/or parallel.
+
+	The number of processors are given by <list of nproc>,
+	which must be a comma- or space-delimited list of integers.
+	Example: "${script_name} 1,2,5 parallel_program" runs
+	parallel_program 3 times with 1, 2 and 5 processors in turn.
+
+	The special case of number of processors = 0 means to run serially.
+	This differs from one processor in that one processor means to run
+	in parallel, but with one processor.
+
+	This script exits with an error if any instance of
+	running the program fails.
+
+	If SERPA_REDIRECT_OUTPUT_TO is defined in the environment,
+	standard output of the program is redirected there.
+	If SERPA_REDIRECT_ERRORS_TO is defined in the environment,
+	error output of the program is redirected there.
+	Outputs directly from THIS script are NOT affected
+	by these environment variables.
+
+	If SERPA_MAX_FAILS is defined, ${script_name} will
+	continue until that many failures before exiting.
+	The default is 1 failure (${script_name} exits on the
+	first failure).  The exit value will always be the
+	failure count.
+
+	When a serial run os made, if SERPA_PERFORMANCE_FILE
+	is defined and is the name of a file, that file is searched
+	for performance data.  The run is timed and the result
+	is compared to the performance data found.
+	_EOF_
+exit
+fi
+
+# How to invoke a GNU compatible time command
+if [ -z "${SERPA_GNUTIME}" ]; then
+    SERPA_GNUTIME=/usr/bin/time
+fi
+
+# Percent difference for performance comparisons
+if [ -z "${SERPA_DIFFERENCE}" ]; then
+    SERPA_DIFFERENCE=0.1
+fi
+
+
+# Check the redirection environment variables.
+# See the help message for how these are used.
+if [ -n "${SERPA_REDIRECT_OUTPUT_TO}" ]; then
+  output_redirection_string="1> ${SERPA_REDIRECT_OUTPUT_TO}"
+else
+  unset output_redirection_string
+fi
+if [ -n "${SERPA_REDIRECT_ERRORS_TO}" ]; then
+  errors_redirection_string="2> ${SERPA_REDIRECT_ERRORS_TO}"
+else
+  unset errors_redirection_string
+fi
+
+# Save the arguments for later reference.
+serpa_args="${@}"
+
+
+# Get the number of processors from the first argument of this script.
+nproc_list=${1}; shift;
+# We allow comma-delimited lists, so we now remove those commas.
+echo ${nproc_list} | grep '^[0-9 ,]\{1,\}$' > /dev/null	\
+  || die 1 "Invalid number of processors list '${nproc_list}'"
+nproc_list=`echo ${nproc_list} | sed 's/,/ /g'`
+
+# Get the program name from the next argument of this script.
+program=${1}; shift;
+test -x ${program} || die 1 "No execute permission on '${program}'"
+
+
+# Determine host name for use below.
+if [ ${?}{HOST} ]; then
+  HOST=`uname -n`
+  export HOST
+fi
+
+
+# Use additional_env to specify additional environments that
+# should be set before running.  Although you can, do not use
+# this to set environments for programs.  It is meant to be
+# environments for the parallel execution program such as
+# mpirun.
+additional_env=
+
+
+# Variables required for using parallelrun.  These may not be needed,
+# but if they are needed and unset, there will be an error.
+# Some of these strings are determined at configure time.
+parallelrun_prog="@PARALLEL_RUN_BIN@";	# Name of parallelrun program.
+
+
+# Determine what platform we are on.
+target_cpu=@target_cpu@
+target_os=@target_os@
+target_vendor=@target_vendor@
+
+
+# Determine the machine file name.
+serpa_machine_file='serpa.machines'
+
+
+# Define a function to run a program in parallel.
+# We have to do this because different environments require different syntaxes.
+# The function arguments are:
+#   program name
+#   number of processor
+#
+# We define the function in a big if-else statement based on the
+# target computer.  We assume that there is a one-to-one correspondence.
+# If there is not, there may have to be a nested if-structure.
+#
+if echo "${HOST}" | egrep '^(blue|frost)[0-9]' > /dev/null ; then
+
+  # For blue, a specific singleton platform.
+  run_multiproc () {
+    MP_RESD="YES"
+    MP_HOSTFILE=""
+    MP_EUILIB=us
+    MP_EUIDEVICE=css0
+    export MP_RESD MP_HOSTFILE MP_EUILIB MP_EUIDEVICE
+  # IBM shell functions eat their parameters after the first assignment
+  # from them so save the parameters first.
+    case "${HOST}" in
+      blue*) proc_per_node=4;;
+      frost*) proc_per_node=16;;
+    esac
+    program=${1}; nproc=${2}; shift 2
+    nodes=`expr 1 + \( ${nproc} - 1 \) / ${proc_per_node}`
+    com="${additional_env} ${parallelrun_prog} ${program}"
+    com="${com} -rmpool 0 -nodes ${nodes} -procs ${nproc} ${@}"
+    # com="${program} ${@} -procs ${nproc}"
+    echo ${com}
+    eval ${com} ${output_redirection_string} ${errors_redirection_string}
+    return ${?}
+  }
+
+elif echo "${HOST}" | grep '^tc2k' > /dev/null ; then
+
+  # For tc2k, a specific singleton platform (contributed by Brian Miller).
+  run_multiproc () {
+    program=${1}; nproc=${2}; shift 2
+    com="${additional_env} prun -n ${nproc} ${program} ${@}"
+    com="${program} ${@} -p ${nproc}"
+    echo ${com}
+    eval ${com} ${output_redirection_string} ${errors_redirection_string}
+    return ${?}
+  }
+
+elif echo "${HOST}" | egrep '^(mcr|pengra|thunder)[0-9]' > /dev/null ; then
+
+  # For LC Linux clusters using srun.
+  run_multiproc () {
+    program=${1}; nproc=${2}; shift 2
+    com="${additional_env} srun -n${nproc} -p pdebug ${program} ${@}"
+    echo ${com}
+    eval ${com} ${output_redirection_string} ${errors_redirection_string}
+    return ${?}
+  }
+
+elif echo "${target_os}" | grep '^osf'	> /dev/null ; then
+
+  # For Dec OSF.
+  run_multiproc () {
+    program=${1}; nproc=${2}; shift 2
+    com="${additional_env} dmpirun -np ${nproc} ${program} ${@}"
+    echo ${com}
+    eval ${com} ${output_redirection_string} ${errors_redirection_string}
+    return ${?}
+  }
+
+elif echo "${target_os}" | grep '^solaris' > /dev/null	\
+  || echo "${target_os}" | grep '^irix' > /dev/null	\
+  || echo "${target_os}" | grep '^linux' > /dev/null	\
+  ; then
+
+  # Most platforms fall into this case.
+  run_multiproc () {
+    program=${1}; nproc=${2}; shift 2
+    com="${additional_env} ${parallelrun_prog}"
+    com="${com} -machinefile ${dir_name}/${serpa_machine_file} -np ${nproc} ${program} ${@}"
+    echo ${com}
+    eval ${com} ${output_redirection_string} ${errors_redirection_string}
+    return ${?}
+  }
+
+else
+
+  # Simplest case.
+  # This is generic.  It may not work, but it is our best guess
+  # without knowledge of the system.
+  run_multiproc () {
+    program=${1}; nproc=${2}; shift 2
+    com="${additional_env} ${program} -np ${nproc} ${@}"
+    echo ${com}
+    eval ${com} ${output_redirection_string} ${errors_redirection_string}
+    return ${?}
+  }
+
+fi
+
+
+# Initialize the failure count.
+serpa_num_failures=0
+test -z "${SERPA_MAX_FAILS}" && SERPA_MAX_FAILS=1
+
+# Run the program.
+for nproc in ${nproc_list}; do
+  cat <<-_EOM_
+	${script_name}================================================
+	RUNNING: ${script_name} ${nproc} ${program} ${@}
+	${script_name}::::::::::::::::::::::::::::::::::::::::::::::::
+	_EOM_
+  if test "${nproc}" = 0 ; then
+    # Run serially.
+
+    # If performance file exists then with performance testing
+    # otherwise do a normal sequential run
+    if test "${SERPA_PERFORMANCE_FILE+set}" = set &&
+       test -f "${SERPA_PERFORMANCE_FILE}"; then
+
+	# Run with performance check. 
+	com="${additional_env} ${program} ${@}"
+	echo "${com}"
+	${SERPA_GNUTIME} -o $$.time -f "%e %t" ${com} \
+	    ${output_redirection_string} ${errors_redirection_string}
+	exit_value=${?}
+
+	# Parse temporary file to get recorded time/memory usage
+	read etime memory < $$.time
+	rm $$.time
+	
+	# Report the run time/memory usage 
+	echo "serpa-perf ${nproc} <${com}> ${etime} ${memory}"
+
+	# Check if time is out of bounds
+	search=`grep "serpa-perf ${nproc} <${com}>" ${SERPA_PERFORMANCE_FILE}`
+	if test "$?" = "0";then
+	    search=`echo $search | sed 's/.*>//'`
+	    read compare_time compare_memory <<EOF	    
+$search
+EOF
+        else
+	    compare_time=999999
+	    compare_memory=0
+	fi
+
+	difference=`bc -l <<EOF
+a=${etime}
+b=${compare_time}
+t=${SERPA_DIFFERENCE}
+d=a-b
+if ( d < 0 ) {
+	d = -d
+}
+p=d/b
+print (p < t), "\n"
+EOF`
+	if test "${difference}" = "1"; then
+	    echo "PERFORMANCE PASSED: target ${compare_time} (seconds) current ${etime} sec"
+	else
+	    echo "PERFORMANCE FAIL: target ${compare_time} (seconds) current ${etime}"
+	fi
+
+	# Currently don't do memory check since it is not reporting anything.
+
+    else
+	# Run without performance testing
+	com="${additional_env} ${program} ${@}"
+	echo "${com}"
+	eval ${com} ${output_redirection_string} ${errors_redirection_string}
+	exit_value=${?}
+    fi
+  else
+    # Because parallel runs sometimes fails due to problems unrelated
+    # to the program, we give it several tries before declaring failure.
+    if test -z "${SERPA_PARALLEL_TRIES}"; then SERPA_PARALLEL_TRIES=1; fi
+    c=1
+    while test ${c} -le ${SERPA_PARALLEL_TRIES} ; do
+      if test ${c} -gt 1 ; then
+        echo "possibly failed.  TRY number ${c}"
+      fi
+      run_multiproc ${program} ${nproc} "${@}"
+      exit_value=${?}
+      if [ ${exit_value} = 0 ]; then
+        break
+      fi
+      c=`expr ${c} + 1`
+    done
+  fi
+  # Report pass or fail.
+  # pf_string=FAILED; test "${exit_value}" = 0 && pf_string=PASSED
+  pf_string=FAILED; test "${exit_value}" = 0 && pf_string=COMPLETED
+  cat <<-_EOM_
+	${script_name}::::::::::::::::::::::::::::::::::::::::::::::::
+	${pf_string}: ${script_name} ${nproc} ${program} ${@}
+	${script_name}================================================
+	_EOM_
+  # Count failures and possibly exit.
+  if test ${exit_value} -ne 0 ; then
+    serpa_num_failures=`expr ${serpa_num_failures} + 1`;
+    if test ${serpa_num_failures} -eq ${SERPA_MAX_FAILS}; then
+      die 1 "FAIL running ${program} with ${nproc} processors"
+    fi
+  fi
+done
+
+if test ${serpa_num_failures} -eq 0; then
+  echo "${script_name} ${serpa_args} passed."
+else
+  echo "${script_name} ${serpa_args} had ${serpa_num_failures} failures."
+fi
+exit ${serpa_num_failures}
+
+# End of script.
+__EOM__
+])dnl End of macro to create serpa-run.in
+
+
+dnl Create the configured file from its .in version.
+dnl AC_CONFIG_FILES( btng_serpa_run_fn, chmod +x btng_serpa_run_fn )
+dnl IMPORTANT NOTE:
+dnl Using the defined symbol btng_serpa_run_fn in AC_CONFIG_FILES
+dnl causes automake to complain that btng_serpa_run_fn.in is not found.
+dnl Since that symbol is a defined m4 macro, this is an automake deficiency.
+dnl Until this is fixed, the above AC_CONFIG_FILES usage will not
+dnl work!  You must call AC_CONFIG_FILES with the actual names of
+dnl the file instead of the m4-defined symbol btng_serpa_run_fn.
+
+
+
+AC_CONFIG_COMMANDS([create-serpa-machine-file],[
+# Generate a machine file if needed.
+if test ! -r "$serpa_machine_file" ; then
+  # Set the serpa machine file name to be in the same directory as
+  # the serpa-run script.
+  btng_serpa_dir_name=`echo ']btng_serpa_run_fn[' | sed -e ['s:^\([^/]*\)$:./\1:'] -e ['s:/[^/]*$::']`;
+  btng_serpa_machine_file="${btng_serpa_dir_name}/serpa.machines"
+  hostname="`hostname`"
+  cat <<-__EOF__>"$btng_serpa_machine_file"
+	$hostname
+	$hostname
+	$hostname
+	$hostname
+	__EOF__
+fi
+],[
+dnl Settings to make before running the above.
+])
+
+
+# Add the serpa machine file to the clean list.
+btng_serpa_dir_name=`echo ']btng_serpa_run_fn[' | sed -e ['s:^\([^/]*\)$:./\1:'] -e ['s:/[^/]*$::']`;
+btng_serpa_machine_file="${btng_serpa_dir_name}/serpa.machines"
+DISTCLEANFILES="$DISTCLEANFILES ${btng_serpa_machine_file}"
+BTNG_AC_LOG_VAR(btng_serpa_machine_file DISTCLEANFILES, in support-serpa-run)
+
+
+undefine([btng_serpa_run_fn])
+
+
+# End macro $0
+])dnl End BTNG_SUPPORT_SERPA macro.
diff -r 000000000000 -r 5eda1a3f24e8 config/samrai_timers.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/samrai_timers.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,45 @@
+dnl
+dnl  File:           $HeadURL$
+dnl  Package:        SAMRAI
+dnl  Copyright:      (c) 1997-2010 Lawrence Livermore National Security, LLC
+dnl  Date:           $Date$
+dnl  Revision:       $LastChangedRevision$
+dnl  Modified:       $LastChangedDate$ 
+dnl  Description:    Macro to control whether timers are compile into or
+dnl                  out of SAMRAI
+dnl               
+dnl                  Variable: samrai_enable_timers
+dnl                  DEFINES:  ENABLE_SAMRAI_TIMERS
+dnl
+
+AC_DEFUN_ONCE([SAMRAI_TIMERS],[
+
+# Begin SAMRAI_TIMERS
+# Defines ENABLE_SAMRAI_TIMERS if --enable-timers is specified.  This is
+# turned on by default 
+
+AC_MSG_CHECKING([if SAMRAI Timers are enabled])
+AC_ARG_ENABLE([timers],
+[AS_HELP_STRING([--disable-timers],
+   [Disable SAMRAI Timers.])],
+   [
+      if test "x$enableval" = "xno"; then
+         samrai_enable_timers="$enableval"
+      fi
+   ], [
+      samrai_enable_timers="yes"
+   ])
+
+dnl By default, the timers are enabled.  Explicitly disabling them
+dnl means that we will not compile the timers into the code.  All
+dnl timer calls will essentially be no-ops.
+dnl
+dnl However, if timers are enabled, we'll define this symbol and
+dnl timers will be built into the code. 
+
+AS_IF([test "x$samrai_enable_timers" = "xyes"], [
+   AC_DEFINE([ENABLE_SAMRAI_TIMERS],[1],[ENABLE_SAMRAI_TIMERS])
+])
+AC_MSG_RESULT([$samrai_enable_timers])
+]
+)
diff -r 000000000000 -r 5eda1a3f24e8 config/serpa-run.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/serpa-run.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,376 @@
+#!/bin/sh
+
+# This script runs an executable program serially or in parallel.
+
+# The syntax for running programs in parallel differs from platform to platform,
+# software to software.  This script automatically uses the correct syntax for
+# the environments that it knows about.  For the environments it does not know,
+# it has a default that may work.
+
+# This script defines the set of tests to put the program through.
+# This set is parametrized by these variables:
+# nproc_list: space- or comma-separated list of number of processors to use.
+
+
+# The name and directory of this script
+# (Do not rely on existence of dirname and basename programs.)
+script_name=`echo ${0} | sed -e 's:.*/::'`;
+dir_name=`echo ${0} | sed -e 's:^\([^/]*\)$:./\1:' -e 's:/[^/]*$::'`;
+
+# Define a way to gracefully die from within this script.
+# The die function is similar to Perl's.
+# Arguments are: <exit_value> <exit_message>
+die () {
+    echo "ERROR_MESSAGE_FROM ${script_name}:"
+    if [ -n "${2}" ]; then echo "Error ${2}"; fi
+    if [ -n "${1}" ]; then exit ${1}; fi
+    exit 99
+}
+
+
+# When no argument is given, print the help message and exit.
+if [ "${1}" = '-h' ] || [ "${1}" = '--help' ] || [ ${#} -lt 2 ] ; then
+  cat <<-_EOF_
+	Usage: ${script_name} <list of nproc> <program name>
+
+	This is a generalized script to run a program in serial
+	and/or parallel.
+
+	The number of processors are given by <list of nproc>,
+	which must be a comma- or space-delimited list of integers.
+	Example: "${script_name} 1,2,5 parallel_program" runs
+	parallel_program 3 times with 1, 2 and 5 processors in turn.
+
+	The special case of number of processors = 0 means to run serially.
+	This differs from one processor in that one processor means to run
+	in parallel, but with one processor.
+
+	This script exits with an error if any instance of
+	running the program fails.
+
+	If SERPA_REDIRECT_OUTPUT_TO is defined in the environment,
+	standard output of the program is redirected there.
+	If SERPA_REDIRECT_ERRORS_TO is defined in the environment,
+	error output of the program is redirected there.
+	Outputs directly from THIS script are NOT affected
+	by these environment variables.
+
+	If SERPA_MAX_FAILS is defined, ${script_name} will
+	continue until that many failures before exiting.
+	The default is 1 failure (${script_name} exits on the
+	first failure).  The exit value will always be the
+	failure count.
+
+	When a serial run os made, if SERPA_PERFORMANCE_FILE
+	is defined and is the name of a file, that file is searched
+	for performance data.  The run is timed and the result
+	is compared to the performance data found.
+	_EOF_
+exit
+fi
+
+# How to invoke a GNU compatible time command
+if [ -z "${SERPA_GNUTIME}" ]; then
+    SERPA_GNUTIME=/usr/bin/time
+fi
+
+# Percent difference for performance comparisons
+if [ -z "${SERPA_DIFFERENCE}" ]; then
+    SERPA_DIFFERENCE=0.1
+fi
+
+
+# Check the redirection environment variables.
+# See the help message for how these are used.
+if [ -n "${SERPA_REDIRECT_OUTPUT_TO}" ]; then
+  output_redirection_string="1> ${SERPA_REDIRECT_OUTPUT_TO}"
+else
+  unset output_redirection_string
+fi
+if [ -n "${SERPA_REDIRECT_ERRORS_TO}" ]; then
+  errors_redirection_string="2> ${SERPA_REDIRECT_ERRORS_TO}"
+else
+  unset errors_redirection_string
+fi
+
+# Save the arguments for later reference.
+serpa_args="${@}"
+
+
+# Get the number of processors from the first argument of this script.
+nproc_list=${1}; shift;
+# We allow comma-delimited lists, so we now remove those commas.
+echo ${nproc_list} | grep '^[0-9 ,]\{1,\}$' > /dev/null	\
+  || die 1 "Invalid number of processors list '${nproc_list}'"
+nproc_list=`echo ${nproc_list} | sed 's/,/ /g'`
+
+# Get the program name from the next argument of this script.
+program=${1}; shift;
+test -x ${program} || die 1 "No execute permission on '${program}'"
+
+
+# Determine host name for use below.
+if [ ${?}{HOST} ]; then
+  HOST=`uname -n`
+  export HOST
+fi
+
+
+# Use additional_env to specify additional environments that
+# should be set before running.  Although you can, do not use
+# this to set environments for programs.  It is meant to be
+# environments for the parallel execution program such as
+# mpirun.
+additional_env=
+
+
+# Variables required for using parallelrun.  These may not be needed,
+# but if they are needed and unset, there will be an error.
+# Some of these strings are determined at configure time.
+parallelrun_prog="@PARALLEL_RUN_BIN@";	# Name of parallelrun program.
+
+
+# Determine what platform we are on.
+target_cpu=@target_cpu@
+target_os=@target_os@
+target_vendor=@target_vendor@
+
+
+# Determine the machine file name.
+serpa_machine_file='serpa.machines'
+
+# If valgrind is being used this will be executable to invoke
+SAMRAI_VALGRIND_EXE=@valgrind_EXE@
+if [ "$SAMRAI_VALGRIND_EXE" != "" ];  then
+   export SAMRAI_VALGRIND_EXE
+   SAMRAI_MEMCHECK_EXE=$dir_name/@top_srcdir@/source/scripts/memcheck
+fi
+
+# Define a function to run a program in parallel.
+# We have to do this because different environments require different syntaxes.
+# The function arguments are:
+#   program name
+#   number of processor
+#
+# We define the function in a big if-else statement based on the
+# target computer.  We assume that there is a one-to-one correspondence.
+# If there is not, there may have to be a nested if-structure.
+#
+if echo "${HOST}" | egrep '^(up)[0-9]' > /dev/null ; then
+
+  run_multiproc () {
+  # IBM shell functions eat their parameters after the first assignment
+  # from them so save the parameters first.
+    case "${HOST}" in
+      up*) proc_per_node=8;;
+    esac
+    export LDR_CNTRL="LARGE_PAGE_DATA=Y"
+    program=${1}; nproc=${2}; shift 2
+    nodes=`expr 1 + \( ${nproc} - 1 \) / ${proc_per_node}`
+    com="${additional_env} ${program} -nodes ${nodes} -procs ${nproc} ${@}"
+    echo ${com}
+    eval ${com} ${output_redirection_string} ${errors_redirection_string}
+    return ${?}
+  }
+
+elif echo "${HOST}" | grep '^tc2k' > /dev/null ; then
+
+  # For tc2k, a specific singleton platform (contributed by Brian Miller).
+  run_multiproc () {
+    program=${1}; nproc=${2}; shift 2
+    com="${additional_env} prun -n ${nproc} ${program} ${@}"
+    com="${program} ${@} -p ${nproc}"
+    echo ${com}
+    eval ${com} ${output_redirection_string} ${errors_redirection_string}
+    return ${?}
+  }
+
+elif echo "${HOST}" | egrep '^(atlas|zeus|alastor)[0-9]' > /dev/null ; then
+
+  # For LC Linux clusters using srun.
+  run_multiproc () {
+    program=${1}; nproc=${2}; shift 2
+    com="${additional_env} srun -n${nproc} ${program} ${@}"
+    echo ${com}
+    eval ${com} ${output_redirection_string} ${errors_redirection_string}
+    return ${?}
+  }
+
+elif echo "${HOSTNAME}" | egrep '^(ubgl|bgl|dawn|dawndev)[0-9]' > /dev/null ; then
+
+  # ubgl has a different way to use mpirun (contributed by Susan Hazlett)
+  run_multiproc() {
+    cwd=`pwd`
+    program=${1}; nproc=${2}; shift 2
+    if [ x"${@}" = x ] ; then
+      args=""
+    else
+      args="-args \"${@}\""
+    fi
+    com="mpirun -np ${nproc} -exe ${program} -cwd ${cwd} ${args}"
+    echo ${com}
+    eval ${com} ${output_redirection_string} ${errors_redirection_string}
+    return ${?}
+  }
+
+elif echo "${target_os}" | grep '^osf'	> /dev/null ; then
+
+  # For Dec OSF.
+  run_multiproc () {
+    program=${1}; nproc=${2}; shift 2
+    com="${additional_env} dmpirun -np ${nproc} ${program} ${@}"
+    echo ${com}
+    eval ${com} ${output_redirection_string} ${errors_redirection_string}
+    return ${?}
+  }
+
+elif echo "${target_os}" | grep '^solaris' > /dev/null	\
+  || echo "${target_os}" | grep '^irix' > /dev/null	\
+  || echo "${target_os}" | grep '^linux' > /dev/null	\
+  || echo "${target_os}" | grep '^darwin' > /dev/null	\
+  || echo "${target_os}" | grep '^cygwin' > /dev/null	\
+  ; then
+
+  # Most platforms fall into this case.
+  run_multiproc () {
+    program=${1}; nproc=${2}; shift 2
+    com="${additional_env} ${parallelrun_prog}"
+    if [ "$SAMRAI_VALGRIND_EXE" = "" ];  then
+	com="${com} -machinefile ${dir_name}/${serpa_machine_file} -np ${nproc} ${program} ${@}"
+    else
+	com="${com} -machinefile ${dir_name}/${serpa_machine_file} -np ${nproc} ${SAMRAI_MEMCHECK_EXE} ${program} ${@}"
+    fi
+    echo ${com}
+    eval ${com} ${output_redirection_string} ${errors_redirection_string}
+    return ${?}
+  }
+
+else
+
+  # Simplest case.
+  # This is generic.  It may not work, but it is our best guess
+  # without knowledge of the system.
+  run_multiproc () {
+    program=${1}; nproc=${2}; shift 2
+    com="${additional_env} ${program} -np ${nproc} ${@}"
+    echo ${com}
+    eval ${com} ${output_redirection_string} ${errors_redirection_string}
+    return ${?}
+  }
+
+fi
+
+
+# Initialize the failure count.
+serpa_num_failures=0
+test -z "${SERPA_MAX_FAILS}" && SERPA_MAX_FAILS=1
+
+# Run the program.
+for nproc in ${nproc_list}; do
+  cat <<-_EOM_
+	${script_name}================================================
+	RUNNING: ${script_name} ${nproc} ${program} ${@}
+	${script_name}::::::::::::::::::::::::::::::::::::::::::::::::
+	_EOM_
+  if test "${nproc}" = 0 ; then
+    # Run serially.
+
+    # If performance file exists then with performance testing
+    # otherwise do a normal sequential run
+    if test "${SERPA_PERFORMANCE_FILE+set}" = set &&
+       test -f "${SERPA_PERFORMANCE_FILE}"; then
+
+	# Run with performance check. 
+	com="${additional_env} ${program} ${@}"
+	echo "${com}"
+	${SERPA_GNUTIME} -o $$.time -f "%e %t" ${com} \
+	    ${output_redirection_string} ${errors_redirection_string}
+	exit_value=${?}
+
+	# Parse temporary file to get recorded time/memory usage
+	read etime memory < $$.time
+	rm $$.time
+	
+	# Report the run time/memory usage 
+	echo "serpa-perf ${nproc} <${com}> ${etime} ${memory}"
+
+	# Check if time is out of bounds
+	search=`grep "serpa-perf ${nproc} <${com}>" ${SERPA_PERFORMANCE_FILE}`
+	if test "$?" = "0";then
+	    search=`echo $search | sed 's/.*>//'`
+	    read compare_time compare_memory <<EOF	    
+$search
+EOF
+        else
+	    compare_time=999999
+	    compare_memory=0
+	fi
+
+	difference=`bc -l <<EOF
+a=${etime}
+b=${compare_time}
+t=${SERPA_DIFFERENCE}
+d=a-b
+if ( d < 0 ) {
+	d = -d
+}
+p=d/b
+print (p < t), "\n"
+EOF`
+	if test "${difference}" = "1"; then
+	    echo "PERFORMANCE PASSED: target ${compare_time} (seconds) current ${etime} sec"
+	else
+	    echo "PERFORMANCE FAIL: target ${compare_time} (seconds) current ${etime}"
+	fi
+
+	# Currently don't do memory check since it is not reporting anything.
+
+    else
+	# Run without performance testing
+	com="${additional_env} ${program} ${@}"
+	echo "${com}"
+	eval ${com} ${output_redirection_string} ${errors_redirection_string}
+	exit_value=${?}
+    fi
+  else
+    # Because parallel runs sometimes fails due to problems unrelated
+    # to the program, we give it several tries before declaring failure.
+    if test -z "${SERPA_PARALLEL_TRIES}"; then SERPA_PARALLEL_TRIES=1; fi
+    c=1
+    while test ${c} -le ${SERPA_PARALLEL_TRIES} ; do
+      if test ${c} -gt 1 ; then
+        echo "possibly failed.  TRY number ${c}"
+      fi
+      run_multiproc ${program} ${nproc} "${@}"
+      exit_value=${?}
+      if [ ${exit_value} = 0 ]; then
+        break
+      fi
+      c=`expr ${c} + 1`
+    done
+  fi
+  # Report pass or fail.
+  # pf_string=FAILED; test "${exit_value}" = 0 && pf_string=PASSED
+  pf_string=FAILED; test "${exit_value}" = 0 && pf_string=COMPLETED
+  cat <<-_EOM_
+	${script_name}::::::::::::::::::::::::::::::::::::::::::::::::
+	${pf_string}: ${script_name} ${nproc} ${program} ${@}
+	${script_name}================================================
+	_EOM_
+  # Count failures and possibly exit.
+  if test ${exit_value} -ne 0 ; then
+    serpa_num_failures=`expr ${serpa_num_failures} + 1`;
+    if test ${serpa_num_failures} -eq ${SERPA_MAX_FAILS}; then
+      die 1 "FAIL running ${program} with ${nproc} processors"
+    fi
+  fi
+done
+
+if test ${serpa_num_failures} -eq 0; then
+  echo "${script_name} ${serpa_args} passed."
+else
+  echo "${script_name} ${serpa_args} had ${serpa_num_failures} failures."
+fi
+exit ${serpa_num_failures}
+
+# End of script.
diff -r 000000000000 -r 5eda1a3f24e8 config/split-libs-string.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/split-libs-string.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,26 @@
+AC_DEFUN([SAMRAI_SPLIT_LIBS_STRING],[
+dnl
+dnl Macro SAMRAI_SPLIT_LIBS_STRING
+dnl Written by Brian Gunney.
+dnl
+dnl This macro takes an automake-style LIBS string (arg1) and
+dnl splits it into the -L part (arg2, what SAMRAI usually calls
+dnl LIB_PATH) and -l part (arg3, what SAMRAI calls LIB_NAME).
+dnl The rest are also lumped into the LIB_NAME part, for lack
+dnl of generality in the SAMRAI distinction.
+dnl
+dnl I think the SAMRAI format is limitting because not all parts
+dnl if the LIBS strings can be recategorized into LIB_PATH and
+dnl LIB_NAME parts.  But this macro allows us to use macros that
+dnl conform to the standard automake format.  BTNG.
+dnl
+# Split $1 into the LIB_PATH part ($2) and the LIB_NAME part ($3)
+if test -n "${$1}"; then
+  for i in ${$1}; do
+    case "$i" in
+    -L*) $2="${$2} $i" ;;
+    *) $3="${$3} $i" ;;
+    esac
+  done
+fi
+])
diff -r 000000000000 -r 5eda1a3f24e8 config/tarch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/tarch	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,123 @@
+#! /bin/sh
+# set -x
+#
+#  Returns the arch of the machine. This file is from MPICH.
+#
+# First, try some special cases:
+if [ -d "/dev/elan" ] ; then
+  FARCH="meiko"
+elif [ -f /usr/bin/uxpm ] && /usr/bin/uxpm ; then
+  FARCH="UXPM"
+elif [ -f /usr/bin/uxpv ] && /usr/bin/uxpv ; then
+  FARCH="uxpv"
+fi
+
+# Test if we are on the compile front end on ASCI Red
+if [ -d "/usr/local/intel/tflop" ] ; then
+    FARCH="ipsc2"
+fi
+
+if [ -n "$FARCH" ] ; then
+    echo $FARCH
+    exit 0
+fi
+
+#
+# Try to find uname
+for dir in /bin /usr/bin /usr/local/bin /Cygnus/cygwin-b20/H-i586-cygwin32/bin; do
+    if [ -x $dir/uname ] ; then
+	UNAME="$dir/uname"
+        break
+    fi
+done
+
+#
+# Get uname -s, uname -m, and arch values
+#
+if [ -n "$UNAME" ] ; then
+    ARCHLIST="`uname -s`"
+    ARCHLIST="$ARCHLIST `uname -m`"
+fi
+#
+# Get ARCH variable name
+if [ -n "$ARCH" ] ; then
+    ARCHLIST="$ARCHLIST $ARCH"
+fi
+
+#
+# Get arch command
+if [ -x /bin/arch ] ; then
+    ARCHLIST="$ARCHLIST `/bin/arch`"
+elif [ -x /usr/local/bin/arch ] ; then
+    ARCHLIST="$ARCHLIST `/usr/local/bin/arch`"
+fi
+#
+# GARCH is a guess if we don't find something better
+GARCH=
+# Now, weed through all of these values until we find something useful.
+for LARCH in $ARCHLIST ; do
+   # Remove blanks
+   LARCH=`echo $LARCH | sed 's/ //g'`
+   # Get the first 4 characters (you'd be surprised)
+   #   LARCH4=`expr "$LARCH" : "\(....\)"`
+   #   LARCH6=`expr "$LARCH" : "\(......\)"`
+   case $LARCH in
+        SUPER-UX) FARCH=SX4; break ;;
+        Darwin)   FARCH=Darwin; break ;;
+	AIX|RIOS) FARCH=rs6000; break ;;
+	HP-UX) 
+ 	if [ -a /dev/kmem ] ; then
+ 	    FARCH=hpux ;
+ 	else
+ 	    FARCH=sppux ;
+ 	fi
+        break ;;
+	IRIX64|IRIX) FARCH=$LARCH ; break ;;
+	Linux)  FARCH=LINUX ; break ;;
+	CYGWIN*) FARCH=CYGWIN; break;;
+	i586|i486|i86pc)
+	    GARCH=$LARCH ;;
+	sun4*)
+	Version=`$UNAME -r`
+        # In "improving" SunOS, the useful feature of "substr" was withdrawn 
+        # from expr.  Can't let the users have life too easy, can we?  This 
+        # means that we can't just use 
+        #   set MajorVersion = `expr substr $Version 1 1`
+        # because it won't work on Solaris systems.  The following should work
+        # on both:
+        MajorVersion=`expr "$Version" : "\(.\)"`
+        if [ "$MajorVersion" -ge 5 ] ; then
+            FARCH=solaris
+	else
+	    FARCH=sun4
+	fi
+	break ;;
+	hp9000*|hp7000*)
+ 	if [ -a /dev/kmem ] ; then
+ 	    FARCH=hpux ;
+ 	else
+ 	    FARCH=sppux ;
+ 	fi
+ 	break ;;
+	mips|dec-5000)   FARCH=dec5000 ; break ;;
+        IP12|iris-4d)    GARCH=IRIX ;;
+        cray|CRAY*)      GARCH=CRAY ;;
+        next)            FARCH=NeXT ; break ;;	
+	KSR1|KSR2)       FARCH=ksr ; break ;;	
+        FreeBSD)         FARCH=freebsd ; break ;;
+	i386)            GARCH=ipsc2 ;;
+	ULTRIX|RISC)     GARCH=dec5000 ;;
+   esac
+   LLARCH=$LARCH
+done
+if [ -z "$FARCH" ] ; then
+    FARCH=$GARCH
+    if [ -z "$FARCH" ] ; then
+	FARCH=$LLARCH
+    fi
+    if [ -z "$FARCH" ] ; then
+	FARCH=unknown
+    fi
+fi
+echo $FARCH
+exit 0
diff -r 000000000000 -r 5eda1a3f24e8 configure
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/configure	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,21761 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.63.
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+  if (eval ":") 2>/dev/null; then
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+
+  if test $as_have_required = yes &&	 (eval ":
+(as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+  as_lineno_1=\$LINENO
+  as_lineno_2=\$LINENO
+  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+  :
+else
+  as_candidate_shells=
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  case $as_dir in
+	 /*)
+	   for as_base in sh bash ksh sh5; do
+	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+	   done;;
+       esac
+done
+IFS=$as_save_IFS
+
+
+      for as_shell in $as_candidate_shells $SHELL; do
+	 # Try only shells that exist, to save several forks.
+	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		{ ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+_ASEOF
+}; then
+  CONFIG_SHELL=$as_shell
+	       as_have_required=yes
+	       if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+(as_func_return () {
+  (exit $1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+  break
+fi
+
+fi
+
+      done
+
+      if test "x$CONFIG_SHELL" != x; then
+  for as_var in BASH_ENV ENV
+	do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+	done
+	export CONFIG_SHELL
+	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+    if test $as_have_required = no; then
+  echo This script requires a shell more modern than all the
+      echo shells that I found on your system.  Please install a
+      echo modern shell, or manually run the script under such a
+      echo shell if you do have one.
+      { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+  echo No shell found that supports shell functions.
+  echo Please tell bug-autoconf at gnu.org about your system,
+  echo including any error possibly output before this message.
+  echo This can help us improve future autoconf versions.
+  echo Configuration will now proceed without shell functions.
+}
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
+  fi
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+	test -d "$1/.";
+      else
+	case $1 in
+	-*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+exec 7<&0 </dev/null 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="COPYRIGHT"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+LIB_NAME
+LIB_PATH
+INC_PATH
+SRCDIR_COMPILE_PREFIX
+LIB_SUFFIX
+CXXLD_FLAGS
+LD_FLAGS
+F77LIBFLAGS
+CXX_FLAGS
+C_FLAGS
+F77_FLAGS
+XARGS
+TAU_INCLUDE
+SAMRAI_TARGET
+INSTDIR
+TEST_NPROCS
+PARALLEL_RUN_BIN
+SUNDIALS_C_FILES
+CONFIGURED_WITH_MPI
+MPIFLAGS
+MPILIBS
+MPILIBDIRS
+MPIINCLUDE
+MPICC
+SAMRAI_PERL
+dox_output_dir
+DOT_PATH
+HAVE_DOT
+DOXYGEN_BIN
+valgrind_EXE
+X_EXTRA_LIBS
+X_LIBS
+X_PRE_LIBS
+X_CFLAGS
+XMKMF
+FLIBS
+ac_ct_F77
+FFLAGS
+F77
+DEVELOPER_MAKEFILE
+DEPENDS_ON_TEMPLATE_IMPLEMENTATION
+CXXCPP
+EGREP
+GREP
+CPP
+MKDIR_P
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+M4
+AR
+ac_ct_CC
+CFLAGS
+CC
+OBJEXT
+EXEEXT
+ac_ct_CXX
+CPPFLAGS
+LDFLAGS
+CXXFLAGS
+CXX
+ARCH
+target_os
+target_vendor
+target_cpu
+target
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_vpath
+enable_noxargs
+enable_shared
+enable_xdr
+enable_developer_makefile
+enable_check_assertions
+enable_check_developer_assertions
+enable_check_dim_assertions
+enable_bgl
+enable_inline
+with_CC
+with_CXX
+with_F77
+with_M4
+with_AR
+with_vampir
+with_tau
+enable_deprecated
+with_maxdim
+with_MPI
+with_HDF5
+with_PETSC
+with_extra_ld_flags
+enable_timers
+enable_opt
+enable_debug
+enable_fortran_mangling_override
+with_x
+with_valgrind
+with_doxygen
+with_dot_dir
+with_dox_output_dir
+with_perl
+with_iostream_header_file
+with_iomanip_header_file
+with_stl_sstream_header_file
+with_dl
+with_dl_includes
+with_dl_libs
+with_nsl
+with_nsl_includes
+with_nsl_libs
+with_blas
+with_blas_includes
+with_blas_libs
+with_lapack
+with_lapack_includes
+with_lapack_libs
+with_mpi
+with_mpi_include
+with_mpi_libs
+with_mpi_lib_dirs
+with_mpi_flags
+with_MPICC
+with_zlib
+with_hdf5
+with_silo
+with_hypre
+with_superlu_lib
+with_spooles
+with_petsc
+with_petsc_arch
+with_petsc_optimize
+with_petsc_mpiuni
+with_petsc_libfiles
+with_sundials
+with_cubes
+with_eleven
+enable_rpath
+with_parallel_run_bin
+enable_test_nprocs
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CXX
+CXXFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CCC
+CC
+CFLAGS
+CPP
+CXXCPP
+F77
+FFLAGS
+XMKMF'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *)	ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
+   { (exit 1); exit 1; }; }
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
+   { (exit 1); exit 1; }; }
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
+   { (exit 1); exit 1; }; }
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
+   { (exit 1); exit 1; }; }
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=no ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { $as_echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
+   { (exit 1); exit 1; }; } ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+  esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; }
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  { $as_echo "$as_me: error: working directory cannot be determined" >&2
+   { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
+   { (exit 1); exit 1; }; }
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_myself" : 'X\(//\)[^/]' \| \
+	 X"$as_myself" : 'X\(//\)$' \| \
+	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r "$srcdir/$ac_unique_file"; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
+   { (exit 1); exit 1; }; }
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --libdir=DIR            object code libraries [EPREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+
+X features:
+  --x-includes=DIR    X include files are in DIR
+  --x-libraries=DIR   X library files are in DIR
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+  --target=TARGET   configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-vpath          assume a working VPATH in make (default except on
+                          IRIX64)
+
+  --enable-noxargs        don't use xargs in build
+
+  --enable-shared         build shared libraries (default is disabled)
+
+  --enable-xdr            build with XDR libraries (default is disabled)
+  --enable-developer-makefile
+                          include extra targets in makefiles
+  --enable-check-assertions
+                          build with assertion checking on (default is
+                          disabled; is enabled for when debugging is enabled)
+  --enable-check-developer-assertions
+                          build with internal SAMRAI developer assertion
+                          checking on (default is disabled)
+  --enable-check-dim-assertions
+                          build with dimension assertion checking on (default
+                          is disabled; is enabled when debugging is enabled)
+  --enable-bgl            Identify this platform as one of the bgl family
+                          (default is disable)
+  --enable-inline         build with SAMRAI methods inlined (default is
+                          enabled; is disabled when debugging is enabled)
+  --enable-deprecated     build with deprecated features (default is enabled)
+  --disable-timers        Disable SAMRAI Timers.
+  --enable-opt=STRING     Set compiler optimization switches.
+  --enable-debug=STRING   Set compiler debug switches.
+  --enable-fortran-mangling-override
+                          Kludgey FORTRAN name mangling fix. Not for general
+                          use.
+  --enable-rpath=SYNTAX	When linking add syntax for rpath for every
+			-L option that points to a directory with .so
+			files in it.  If SYNTAX is omitted, an attempt
+			is made to find out the correct rpath syntax for
+			the compiler being used.
+
+  --enable-test-nprocs=LIST
+                          Specify number of processors to use when running
+                          tests. LIST is a comma delimited list of integers,
+                          with 0 meaning serial run. Default LIST is '0,2'.
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-CC=ARG           manually set C compiler to ARG
+
+  --with-CXX=ARG          manually set C++ compiler to ARG
+
+  --with-F77=ARG          manually set F77 to ARG
+
+  --with-M4=ARG           manually set M4 to ARG
+
+  --with-AR=ARG           manually set AR to ARG
+
+  --with-vampir=dir       compile with VAMPIR performance tracing
+
+  --with-tau=dir          compile with TAU performance tracing
+
+  --with-maxdim=ARG       manually set the maximum allowed dimension (default
+                          is 3)
+
+  --with-extra-ld-flags=STRING
+                          Specify additional flags for the loader.
+  --with-x                use the X Window System
+ --with-valgrind=PATH  Use VALGRIND and optionally specify where VALGRIND is installed.
+  --with-doxygen=PATH	Specify path to doxygen program
+			(equivalent to setting DOXYGEN_BIN in environment)
+  --with-dot-dir=DIR      Specify bin directory where dot binaries live.
+  --with-dox-output-dir=DIR
+                          Specify full where Doxygen documentation is
+                          generated. Default is the docs directory in the
+                          compile tree.
+  --with-perl=PATH	Specify path to perl program
+			(equivalent to setting SAMRAI_PERL in environment)
+  --with-iostream-header-file	Specify name of the iostream header file.
+  --with-iomanip-header-file	Specify name of the iomanip header file.
+  --with-stl-sstream-header-file	Specify name of the stl-sstream header file.
+  --without-dl		Do not use the dynamic loading library.
+  --with-dl-includes=STRING
+			Specify the INCLUDES flags for dl.
+			If not specified, and --with-dl=PATH is,
+			this defaults to "-IPATH/include".
+  --with-dl-libs=STRING
+			Specify LIBS flags for dl.
+			If not specified, and --with-dl=PATH is,
+			this defaults to "-LPATH/lib -ldl".
+  --without-nsl	Do not use the nsl library.
+  --with-nsl-includes=STRING
+			Specify the INCLUDES flags for nsl.
+			If not specified, and --with-nsl=PATH is,
+			this defaults to "-IPATH/include".
+  --with-nsl-libs=STRING
+			Specify LIBS flags for nsl.
+			If not specified, and --with-nsl=PATH is,
+			this defaults to "-LPATH/lib -lnsl".
+  --with-blas=PATH
+			Use blas and optionally specify where
+			they are installed.
+  --with-blas-includes=STRING
+			Specify the INCLUDES flags for blas.
+			If not specified, and --with-blas=PATH is,
+			this defaults to "-IPATH/include".
+  --with-blas-libs=STRING
+			Specify LIBS flags for blas.
+			If not specified, and --with-blas=PATH is,
+			this defaults to "-LPATH/lib -lblas".
+  --with-lapack=PATH
+			Use lapack and optionally specify where
+			they are installed.
+  --with-lapack-includes=STRING
+			Specify the INCLUDES flags for lapack.
+			If not specified, and --with-lapack=PATH is,
+			this defaults to "-IPATH/include".
+  --with-lapack-libs=STRING
+			Specify LIBS flags for lapack.
+			If not specified, and --with-lapack=PATH is,
+			this defaults to "-LPATH/lib -llapack".
+  --without-mpi           Compile without MPI library.
+  --with-mpi-include=DIR  mpi.h is in DIR
+  --with-mpi-libs=LIBS    LIBS is space-separated list of library names
+                          needed for MPI, e.g. \"nsl socket mpi\"
+  --with-mpi-lib-dirs=DIRS
+                          DIRS is space-separated list of directories
+                          containing the libraries specified by
+                          \`--with-mpi-libs', e.g \"/usr/lib /usr/local/mpi/lib\"
+  --with-mpi-flags=FLAGS  FLAGS is space-separated list of whatever flags other
+                          than -l and -L are needed to link with mpi libraries
+  --with-MPICC=ARG        ARG is mpicc or similar MPI C compiling tool
+  --with-zlib=DIR root directory path of zlib installation DIR defaults to
+                    /usr/local or /usr if not found in /usr/local
+  --without-zlib to disable zlib usage completely the default
+ --with-hdf5=PATH  Use HDF5 and optionally specify where HDF5 is installed.
+ --with-silo=PATH  Use SILO and optionally specify where SILO is installed.
+  --with-hypre=PATH	Use HYPRE and optionally specify where it is installed.
+  --with-superlu-lib=LIB  LIB is the library archive file for the SuperLU
+                          package.
+  --with-spooles=PATH
+			Use spooles library and optionally specify where
+			it is installed.
+  --with-petsc=PATH	Support PETSc, and specify PETSC top-level directory.
+			Setting PETSC_DIR is equivalent to this.
+
+  --with-petsc-arch=PETSC_ARCH
+			Specify the PETSC architecture.
+			If omitted, the output of the petscarch script
+			in the PETSc directory is used.
+  --with-petsc-optimize
+			Use the optimized PETSC libraries
+  --with-petsc-mpiuni	Use the PETSC uniprocessor MPI library
+  --with-petsc-libfiles
+			Specify explit PETSc library files instead
+			of -L and -l flags (may help some debuggers)
+  --with-sundials=PATH    Use the Sundials solver package and specify where it
+                          is.
+  --with-cubes=PATH       Use the CUBES package and specify where it is.
+  --with-eleven=PATH      Use the ELEVEN package and specify where it is.
+
+  --with-parallel-run-bin=STRING
+		Specify the parallel run binary (i.e., mpirun, dmpirun,
+		poe, etc) to be used in the serial-parallel run script.
+
+
+Some influential environment variables:
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  CPP         C preprocessor
+  CXXCPP      C++ preprocessor
+  F77         Fortran 77 compiler command
+  FFLAGS      Fortran 77 compiler flags
+  XMKMF       Path to xmkmf, Makefile generator for X Window System
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.63
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit
+fi
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.63.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  $as_echo "PATH: $as_dir"
+done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      ac_configure_args="$ac_configure_args '$ac_arg'"
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+	"s/'\''/'\''\\\\'\'''\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=\$$ac_var
+	case $ac_val in
+	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	$as_echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+  ac_site_file1=$CONFIG_SITE
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
+else
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+  test "x$ac_site_file" = xNONE && continue
+  if test -r "$ac_site_file"; then
+    { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	# differences in whitespace do not lead to failure.
+	ac_old_val_w=`echo x $ac_old_val`
+	ac_new_val_w=`echo x $ac_new_val`
+	if test "$ac_old_val_w" != "$ac_new_val_w"; then
+	  { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	  ac_cache_corrupted=:
+	else
+	  { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+	  eval $ac_var=\$ac_old_val
+	fi
+	{ $as_echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+	{ $as_echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
+$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ac_config_headers="$ac_config_headers include/SAMRAI/SAMRAI_config.h:config/SAMRAI_config.h.in"
+
+
+
+
+
+
+
+
+btng_log_vars="CONFIG_SHELL"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:2104:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+ac_aux_dir=
+for ac_dir in config "$srcdir"/config; do
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&5
+$as_echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+
+# Get system type.
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
+   { (exit 1); exit 1; }; }
+
+{ $as_echo "$as_me:$LINENO: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
+$as_echo "$as_me: error: invalid value of canonical build" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:$LINENO: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+$as_echo "$as_me: error: invalid value of canonical host" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:$LINENO: checking target system type" >&5
+$as_echo_n "checking target system type... " >&6; }
+if test "${ac_cv_target+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$target_alias" = x; then
+  ac_cv_target=$ac_cv_host
+else
+  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
+    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+$as_echo "$ac_cv_target" >&6; }
+case $ac_cv_target in
+*-*-*) ;;
+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
+$as_echo "$as_me: error: invalid value of canonical target" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
+target=$ac_cv_target
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_target
+shift
+target_cpu=$1
+target_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+target_os=$*
+IFS=$ac_save_IFS
+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+
+
+btng_log_vars="target_cpu target_vendor target_os"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:2278:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+case "$host_os" in
+  solaris*)
+
+cat >>confdefs.h <<\_ACEOF
+#define HOST_OS_IS_SOLARIS 1
+_ACEOF
+
+esac
+
+
+# Check whether --enable-vpath was given.
+if test "${enable_vpath+set}" = set; then
+  enableval=$enable_vpath;
+fi
+
+# Check whether --enable-noxargs was given.
+if test "${enable_noxargs+set}" = set; then
+  enableval=$enable_noxargs;
+fi
+
+# Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then
+  enableval=$enable_shared;
+fi
+
+# Check whether --enable-xdr was given.
+if test "${enable_xdr+set}" = set; then
+  enableval=$enable_xdr;
+else
+  enable_xdr="no"
+
+fi
+
+# Check whether --enable-developer_makefile was given.
+if test "${enable_developer_makefile+set}" = set; then
+  enableval=$enable_developer_makefile;
+else
+  enable_developer_makefile="no"
+
+fi
+
+# Check whether --enable-check_assertions was given.
+if test "${enable_check_assertions+set}" = set; then
+  enableval=$enable_check_assertions; user_specified_check_assertions="yes"
+else
+  enable_check_assertions="no"
+
+fi
+
+# Check whether --enable-check_developer_assertions was given.
+if test "${enable_check_developer_assertions+set}" = set; then
+  enableval=$enable_check_developer_assertions; user_specified_check_developer_assertions="yes"
+fi
+
+# Check whether --enable-check_dim_assertions was given.
+if test "${enable_check_dim_assertions+set}" = set; then
+  enableval=$enable_check_dim_assertions; user_specified_check_dim_assertions="yes"
+fi
+
+# Check whether --enable-bgl was given.
+if test "${enable_bgl+set}" = set; then
+  enableval=$enable_bgl; enable_bgl=$enableval
+else
+  enable_bgl=no
+
+fi
+
+# Check whether --enable-inline was given.
+if test "${enable_inline+set}" = set; then
+  enableval=$enable_inline; user_specified_inline="yes"
+else
+  enable_inline="yes"
+
+fi
+
+
+# Check whether --with-CC was given.
+if test "${with_CC+set}" = set; then
+  withval=$with_CC;
+fi
+
+
+# Check whether --with-CXX was given.
+if test "${with_CXX+set}" = set; then
+  withval=$with_CXX;
+fi
+
+
+# Check whether --with-F77 was given.
+if test "${with_F77+set}" = set; then
+  withval=$with_F77;
+fi
+
+
+# Check whether --with-M4 was given.
+if test "${with_M4+set}" = set; then
+  withval=$with_M4;
+fi
+
+
+# Check whether --with-AR was given.
+if test "${with_AR+set}" = set; then
+  withval=$with_AR;
+fi
+
+
+# Check whether --with-vampir was given.
+if test "${with_vampir+set}" = set; then
+  withval=$with_vampir;
+fi
+
+
+# Check whether --with-tau was given.
+if test "${with_tau+set}" = set; then
+  withval=$with_tau;
+fi
+
+# Check whether --enable-deprecated was given.
+if test "${enable_deprecated+set}" = set; then
+  enableval=$enable_deprecated;
+else
+  enable_deprecated="yes"
+
+fi
+
+
+# Check whether --with-maxdim was given.
+if test "${with_maxdim+set}" = set; then
+  withval=$with_maxdim;
+else
+  with_maxdim=3
+
+fi
+
+
+validint()
+{
+  # validate first field. Optionally test against min value $2 and/or
+  # max value $3: if you'd rather skip these tests, send "" as values.
+  # returns 1 for error, 0 for success.
+
+  number="$1";	    min="$2";	   max="$3"
+
+  if [ -z $number ] ; then
+    return 1
+  fi
+
+  if [ "${number%${number#?}}" = "-" ] ; then	# first char '-' ?
+    testvalue="${number#?}" 	# all but first character
+  else
+    testvalue="$number"
+  fi
+
+  nodigits="$(echo $testvalue | sed 's/[[:digit:]]//g')"
+
+  if [ ! -z $nodigits ] ; then
+    return 1
+  fi
+
+  if [ ! -z $min ] ; then
+    if [ "$number" -lt "$min" ] ; then
+       return 1
+    fi
+  fi
+  if [ ! -z $max ] ; then
+     if [ "$number" -gt "$max" ] ; then
+       return 1
+     fi
+  fi
+  return 0
+}
+
+if validint "$with_maxdim" "1" ""; then
+
+cat >>confdefs.h <<_ACEOF
+#define SAMRAI_MAXIMUM_DIMENSION $with_maxdim
+_ACEOF
+
+else
+   { { $as_echo "$as_me:$LINENO: error: dimension must be an integer greater than 0, not \"$with_maxdim\"" >&5
+$as_echo "$as_me: error: dimension must be an integer greater than 0, not \"$with_maxdim\"" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+# Check whether --with-MPI was given.
+if test "${with_MPI+set}" = set; then
+  withval=$with_MPI; { { $as_echo "$as_me:$LINENO: error: Obsolete option for MPI used!!
+You should use lower-case.  Do 'configure --help' for help." >&5
+$as_echo "$as_me: error: Obsolete option for MPI used!!
+You should use lower-case.  Do 'configure --help' for help." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+# Check whether --with-HDF5 was given.
+if test "${with_HDF5+set}" = set; then
+  withval=$with_HDF5; { { $as_echo "$as_me:$LINENO: error: Obsolete option for HDF5 used!!
+You should use lower-case.  Do 'configure --help' for help." >&5
+$as_echo "$as_me: error: Obsolete option for HDF5 used!!
+You should use lower-case.  Do 'configure --help' for help." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+# Check whether --with-PETSC was given.
+if test "${with_PETSC+set}" = set; then
+  withval=$with_PETSC; { { $as_echo "$as_me:$LINENO: error: Obsolete option for PETSC used!!
+You should use lower-case.  Do 'configure --help' for help." >&5
+$as_echo "$as_me: error: Obsolete option for PETSC used!!
+You should use lower-case.  Do 'configure --help' for help." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+
+
+C_FLAGS="$CFLAGS"
+CXX_FLAGS="$CXXFLAGS"
+F77_FLAGS="$FFLAGS"
+LD_FLAGS="$LDFLAGS"
+CXXLD_FLAGS="$LDFLAGS"
+CPP_FLAGS="$CPPFLAGS"
+
+INC_PATH=
+LIB_PATH=
+LIB_NAME=-lm
+
+LIBS="$LIBS -lm"
+
+LIB_SUFFIX=.a
+
+
+
+btng_log_vars="LD_LIBRARY_PATH"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:2525:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+
+
+   { $as_echo "$as_me:$LINENO: checking the architecture" >&5
+$as_echo_n "checking the architecture... " >&6; }
+
+         if test -z "$ARCH"; then
+
+                        casc_tarch_dir=
+      for casc_dir in $srcdir $srcdir/.. $srcdir/../.. $srcdir/config; do
+         if test -f $casc_dir/tarch; then
+            casc_tarch_dir=$casc_dir
+            casc_tarch=$casc_tarch_dir/tarch
+            break
+         fi
+      done
+
+                  if test -z "$casc_tarch_dir"; then
+         { $as_echo "$as_me:$LINENO: WARNING: cannot find tarch" >&5
+$as_echo "$as_me: WARNING: cannot find tarch" >&2;}
+         ARCH=$HOSTTYPE
+      else
+         ARCH="`$casc_tarch`"
+
+         if test -z "$ARCH" || test "$ARCH" = "unknown"; then
+            ARCH=$HOSTTYPE
+         fi
+      fi
+
+            if test -z "$ARCH"; then
+         ARCH=unknown
+         { $as_echo "$as_me:$LINENO: WARNING: architecture is unknown" >&5
+$as_echo "$as_me: WARNING: architecture is unknown" >&2;}
+      else
+         { $as_echo "$as_me:$LINENO: result: $ARCH" >&5
+$as_echo "$ARCH" >&6; }
+      fi
+   else
+      { $as_echo "$as_me:$LINENO: result: $ARCH" >&5
+$as_echo "$ARCH" >&6; }
+   fi
+
+
+
+
+
+
+btng_log_vars="ARCH"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:2584:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+
+if test -n "$with_CXX"; then
+   CXX=$with_CXX
+else
+   case "$host_os" in
+     linux*) CCC=" g++ ";;
+     solaris*) CCC=" g++ ";;
+     osf*) CCC=" g++ ";;
+     *) CCC=
+   esac
+fi
+
+
+btng_log_vars="with_CXX CXX CCC"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:2610:" "before running compiler search: $btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in $CCC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CXX+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { $as_echo "$as_me:$LINENO: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in $CCC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CXX" && break
+done
+
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CXX=$ac_ct_CXX
+  fi
+fi
+
+  fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5
+$as_echo_n "checking for C++ compiler default output file name... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { (ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+	then :; else
+	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	fi
+	# We set ac_cv_exeext here because the later test for it is not
+	# safe: cross compilers may not add the suffix if given an `-o'
+	# argument, so we may need to know it at that point already.
+	# Even if this section looks crufty: it has the advantage of
+	# actually working.
+	break;;
+    * )
+	break;;
+  esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+  ac_file=''
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+if test -z "$ac_file"; then
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: C++ compiler cannot create executables
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: C++ compiler cannot create executables
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
+$as_echo_n "checking whether the C++ compiler works... " >&6; }
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot run C++ compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+    fi
+  fi
+fi
+{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  break;;
+    * ) break;;
+  esac
+done
+else
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if test "${ac_cv_objext+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_compiler_gnu=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GXX=yes
+else
+  GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cxx_g=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	CXXFLAGS=""
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+	 CXXFLAGS="-g"
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cxx_g=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+btng_log_vars="with_CXX CXX CCC"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:3246:" "after running compiler search: $btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+
+if test -n "$with_CC"; then
+   CC=$with_CC
+else
+   ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_compiler_gnu=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_g=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	CFLAGS=""
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_g=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_c89=$ac_arg
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:$LINENO: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking for library containing strerror" >&5
+$as_echo_n "checking for library containing strerror... " >&6; }
+if test "${ac_cv_search_strerror+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char strerror ();
+int
+main ()
+{
+return strerror ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' cposix; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_strerror=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_strerror+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_strerror+set}" = set; then
+  :
+else
+  ac_cv_search_strerror=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
+$as_echo "$ac_cv_search_strerror" >&6; }
+ac_res=$ac_cv_search_strerror
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+
+
+
+# Check whether --with-extra-ld-flags was given.
+if test "${with_extra_ld_flags+set}" = set; then
+  withval=$with_extra_ld_flags;
+else
+  with_extra_ld_flags='no'
+fi
+
+case "$with_extra_ld_flags" in
+  no)
+    : No op
+  ;;
+  yes)
+    : No op
+  ;;
+  *)
+    LD_FLAGS="$LD_FLAGS $with_extra_ld_flags"
+  ;;
+esac
+
+
+
+for ac_prog in $with_AR ar
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AR+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AR="$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:$LINENO: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AR" && break
+done
+
+if test -z "$AR"; then
+   { { $as_echo "$as_me:$LINENO: error: ar archiver not found - specify with --with-m4=ARG" >&5
+$as_echo "$as_me: error: ar archiver not found - specify with --with-m4=ARG" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+for ac_prog in $with_M4 gm4 m4
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_M4+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$M4"; then
+  ac_cv_prog_M4="$M4" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_M4="$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+M4=$ac_cv_prog_M4
+if test -n "$M4"; then
+  { $as_echo "$as_me:$LINENO: result: $M4" >&5
+$as_echo "$M4" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$M4" && break
+done
+
+if test -z "$M4"; then
+   { { $as_echo "$as_me:$LINENO: error: m4 preprocessor not found - specify with --with-M4=ARG" >&5
+$as_echo "$as_me: error: m4 preprocessor not found - specify with --with-M4=ARG" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+	  if test $ac_prog = install &&
+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    rm -rf conftest.one conftest.two conftest.dir
+	    echo one > conftest.one
+	    echo two > conftest.two
+	    mkdir conftest.dir
+	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+	      test -s conftest.one && test -s conftest.two &&
+	      test -s conftest.dir/conftest.one &&
+	      test -s conftest.dir/conftest.two
+	    then
+	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	      break 3
+	    fi
+	  fi
+	fi
+      done
+    done
+    ;;
+esac
+
+done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+if test -z "$INSTALL"; then
+   { { $as_echo "$as_me:$LINENO: error: install not found" >&5
+$as_echo "$as_me: error: install not found" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+  if test "${ac_cv_path_mkdir+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in mkdir gmkdir; do
+	 for ac_exec_ext in '' $ac_executable_extensions; do
+	   { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+	     'mkdir (GNU coreutils) '* | \
+	     'mkdir (coreutils) '* | \
+	     'mkdir (fileutils) '4.1*)
+	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+	       break 3;;
+	   esac
+	 done
+       done
+done
+IFS=$as_save_IFS
+
+fi
+
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    test -d ./--version && rmdir ./--version
+    MKDIR_P="$ac_install_sh -d"
+  fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+if test -z "$MKDIR_P"; then
+   { { $as_echo "$as_me:$LINENO: error: mkdir not found" >&5
+$as_echo "$as_me: error: mkdir not found" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  # Broken: success on invalid input.
+continue
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  # Broken: success on invalid input.
+continue
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_GREP_found && break 3
+    done
+  done
+done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_EGREP_found && break 3
+    done
+  done
+done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+   fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+
+
+# Start macro BTNG_INFO_CC_ID_NAMES
+
+
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+  echo "configure:4682:" CC is $CC >&5
+  echo "configure:4683:" CPP is $CPP >&5
+
+  CC_ID=unknown
+  CC_VERSION=unknown
+
+
+
+  # Check if it is a Sun compiler.
+  if test $CC_ID = unknown; then
+    echo "configure:4692:" checking if $CC is sunpro >&5
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+__SUNPRO_C
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^ 0x[0-9]+" >/dev/null 2>&1; then
+  CC_ID=sunpro
+      # SUN compiler defines __SUNPRO_C to the version number.
+      echo __SUNPRO_C > conftest.c
+      CC_VERSION=`${CPP} ${CPPFLAGS} conftest.c | sed -n -e 's/^ //' -e 2p`
+      rm -f conftest.c
+
+fi
+rm -f conftest*
+
+  fi
+
+
+  # Check if it is a Intel compiler.
+  if test $CC_ID = unknown; then
+    echo "configure:4717:" checking if $CC is intel >&5
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __INTEL_COMPILER
+yes;
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^yes" >/dev/null 2>&1; then
+  CC_ID=intel
+      # Intel compiler defines __INTEL_COMPILER to the version number.
+      echo __INTEL_COMPILER > conftest.C
+      CC_VERSION=`${CPP} conftest.C | sed -n 2p`
+      rm -f conftest.C
+
+fi
+rm -f conftest*
+
+  fi
+
+
+  # Check if it is a GNU compiler.
+  if test $CC_ID = unknown; then
+    echo "configure:4745:" checking if $CC is gnu >&5
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __GNUC__
+yes;
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^yes" >/dev/null 2>&1; then
+  CC_ID=gnu
+    CC_VERSION=`$CC --version | sed -e 's/[^0-9]\{0,\}\([^ ]\{1,\}\).\{0,\}/\1/' -e 1q`
+
+fi
+rm -f conftest*
+
+  fi
+
+
+  # Check if it is a DEC compiler.
+  if test $CC_ID = unknown; then
+    echo "configure:4770:" checking if $CC is dec >&5
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+__DECC
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^ 1" >/dev/null 2>&1; then
+  CC_ID=dec
+      # DEC compiler defines __DECC_VER to the version number.
+      echo __DECC_VER > conftest.c
+      CC_VERSION=`${CPP} ${CPPFLAGS} conftest.c | sed -n -e 's/^ //' -e 2p`
+      rm -f conftest.c
+
+fi
+rm -f conftest*
+
+  fi
+
+
+  # Check if it is a KAI compiler.
+  if test $CC_ID = unknown; then
+    echo "configure:4795:" checking if $CC is kai >&5
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+__KCC
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^1" >/dev/null 2>&1; then
+  CC_ID=kai
+      # KCC compiler defines __KCC_VERSION to the version number.
+      echo __KCC_VERSION > conftest.c
+      CC_VERSION=`${CPP} ${CPPFLAGS} conftest.c | sed -n 2p`
+      rm -f conftest.c
+
+fi
+rm -f conftest*
+
+  fi
+
+
+  # Check if it is a SGI compiler.
+  if test $CC_ID = unknown; then
+    echo "configure:4820:" checking if $CC is sgi >&5
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+__sgi
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^1" >/dev/null 2>&1; then
+  CC_ID=sgi
+      # SGI compiler defines _COMPILER_VERSION to the version number.
+      echo _COMPILER_VERSION > conftest.c
+      CC_VERSION=`${CPP} ${CPPFLAGS} conftest.c | sed /^\\#/d`
+      rm -f conftest.c
+
+fi
+rm -f conftest*
+
+  fi
+
+
+  # Check if it is a IBM compiler.
+  if test $CC_ID = unknown; then
+    echo "configure:4845:" checking if $CC is xlc >&5
+    if echo "$host_os" | grep "aix" >/dev/null ; then
+      # The wretched IBM shell does not eval correctly,
+      # so we have to help it with a pre-eval eval statement.
+      ac_cpp=`eval "echo $ac_cpp"`
+      save_ac_cpp=$ac_cpp
+      echo "configure:4851:" ac_cpp is temporarily set to $ac_cpp >&5
+    else
+      save_ac_cpp=
+    fi
+    echo "configure:4855:" ac_cpp is $ac_cpp >&5
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __xlC__
+yes;
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^yes" >/dev/null 2>&1; then
+  CC_ID=xlc
+    # IBM compiler defines __xlC__ to the version number.
+    echo __xlC__ > conftest.C
+    CC_VERSION=`${CPP} conftest.C | sed /^\\#/d`
+    rm -f conftest.C
+
+fi
+rm -f conftest*
+
+    test "$save_ac_cpp" && ac_cpp=$save_ac_cpp
+    echo "configure:4879:" ac_cpp is restored to $ac_cpp >&5
+  fi
+
+
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+btng_log_vars="CC_ID CC_VERSION"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:4899:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+# End macro BTNG_INFO_CC_ID_NAMES
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+{ $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
+$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
+if test -z "$CXXCPP"; then
+  if test "${ac_cv_prog_CXXCPP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CXXCPP needs to be expanded
+    for CXXCPP in "$CXX -E" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  # Broken: success on invalid input.
+continue
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+  CXXCPP=$ac_cv_prog_CXXCPP
+else
+  ac_cv_prog_CXXCPP=$CXXCPP
+fi
+{ $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5
+$as_echo "$CXXCPP" >&6; }
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  # Broken: success on invalid input.
+continue
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+# Start macro BTNG_INFO_CXX_ID_NAMES
+
+
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+  echo "configure:5151:" CXXP is $CXX >&5
+  echo "configure:5152:" CXXCPP is $CXXCPP >&5
+
+  CXX_ID=unknown
+  CXX_VERSION=unknown
+
+
+
+  # Check if it is a Sun compiler.
+  if test $CXX_ID = unknown; then
+    echo "configure:5161:" checking if $CXX is sunpro >&5
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+__SUNPRO_CC
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^0x[0-9]+" >/dev/null 2>&1; then
+  CXX_ID=sunpro
+      # SUN compiler defines __SUNPRO_CC to the version number.
+      echo __SUNPRO_CC > conftest.C
+      CXX_VERSION=`${CXXCPP} conftest.C | sed -n 2p`
+      rm -f conftest.C
+
+fi
+rm -f conftest*
+
+  fi
+
+
+  # Check if it is a Intel compiler.
+  if test $CXX_ID = unknown; then
+    echo "configure:5186:" checking if $CXX is intel >&5
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __INTEL_COMPILER
+yes;
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^yes" >/dev/null 2>&1; then
+  CXX_ID=intel
+      # Intel compiler defines __INTEL_COMPILER to the version number.
+      echo __INTEL_COMPILER > conftest.C
+      CXX_VERSION=`${CXXCPP} conftest.C | sed -n 2p`
+      rm -f conftest.C
+
+fi
+rm -f conftest*
+
+  fi
+
+
+  # Check if it is a GNU compiler.
+  if test $CXX_ID = unknown; then
+    echo "configure:5214:" checking if $CXX is gnu >&5
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __GNUC__
+yes;
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^yes" >/dev/null 2>&1; then
+  CXX_ID=gnu
+    # GNU compilers output version number with option --version.
+    # Alternatively, it also defines the macros __GNUC__,
+    # GNUC_MINOR__ and __GNUC_PATCHLEVEL__
+    CXX_VERSION=`$CXX --version | sed -e 's/[^0-9]\{0,\}\([^ ]\{1,\}\).\{0,\}/\1/' -e 1q`
+
+fi
+rm -f conftest*
+
+  fi
+
+
+  # Check if it is a DEC compiler.
+  if test $CXX_ID = unknown; then
+    echo "configure:5242:" checking if $CXX is dec >&5
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+__DECCXX
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^1" >/dev/null 2>&1; then
+  CXX_ID=dec
+      # DEC compiler defines __DECCXX_VER to the version number.
+      echo __DECCXX_VER > conftest.C
+      CXX_VERSION=`${CXXCPP} conftest.C | sed -n 2p`
+      rm -f conftest.C
+
+fi
+rm -f conftest*
+
+  fi
+
+
+  # Check if it is a KAI compiler.
+  if test $CXX_ID = unknown; then
+    echo "configure:5267:" checking if $CXX is kai >&5
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+__KCC
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^1" >/dev/null 2>&1; then
+  CXX_ID=kai
+      # KCC compiler defines __KCC_VERSION to the version number.
+      echo __KCC_VERSION > conftest.C
+      CXX_VERSION=`${CXXCPP} conftest.C | sed -n 2p`
+      rm -f conftest.C
+
+fi
+rm -f conftest*
+
+  fi
+
+
+  # Check if it is a SGI compiler.
+  if test $CXX_ID = unknown; then
+    echo "configure:5292:" checking if $CXX is sgi >&5
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+__sgi
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^1" >/dev/null 2>&1; then
+  CXX_ID=sgi
+      # SGI compiler defines _COMPILER_VERSION to the version number.
+      echo _COMPILER_VERSION > conftest.C
+      CXX_VERSION=`${CXXCPP} conftest.C | sed /^\\#/d`
+      rm -f conftest.C
+
+fi
+rm -f conftest*
+
+  fi
+
+
+  # Check if it is a IBM compiler.
+  if test $CXX_ID = unknown; then
+    echo "configure:5317:" checking if $CXX is xlc >&5
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __xlC__
+yes;
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^yes" >/dev/null 2>&1; then
+  CXX_ID=xlc
+    # IBM compiler defines __xlC__ to the version number.
+    echo __xlC__ > conftest.C
+    CXX_VERSION=`${CXXCPP} conftest.C | sed /^\\#/d`
+    rm -f conftest.C
+
+fi
+rm -f conftest*
+
+  fi
+
+
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+btng_log_vars="CXX_ID CXX_VERSION"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:5359:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+# End macro BTNG_INFO_CXX_ID_NAMES
+
+
+
+
+
+
+# Warn user about unsupported compilers:
+case $CXX_ID in
+gnu|xlc|intel) ;;
+*)
+  { $as_echo "$as_me:$LINENO: WARNING:
+You are using a C++ compiler unsupported by SAMRAI
+You are on your own!
+" >&5
+$as_echo "$as_me: WARNING:
+You are using a C++ compiler unsupported by SAMRAI
+You are on your own!
+" >&2;}
+  ;;
+esac
+
+
+
+
+
+   { $as_echo "$as_me:$LINENO: checking whether ${CXX} supports namespace" >&5
+$as_echo_n "checking whether ${CXX} supports namespace... " >&6; }
+
+   if test "${casc_cv_cxx_have_namespace+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+namespace test {
+   int t();
+   int t() { return 0; }
+}
+using namespace test;
+int foo() { int x = t(); x++; return x; }
+
+int
+main ()
+{
+/* empty */
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  casc_cv_cxx_have_namespace=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	casc_cv_cxx_have_namespace=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+   { $as_echo "$as_me:$LINENO: result: $casc_cv_cxx_have_namespace" >&5
+$as_echo "$casc_cv_cxx_have_namespace" >&6; }
+
+   if test "$casc_cv_cxx_have_namespace" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_NAMESPACE 1
+_ACEOF
+
+   else
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_NAMESPACE 1
+_ACEOF
+
+   fi
+
+
+
+   { $as_echo "$as_me:$LINENO: checking whether ${CXX} supports template-based complex numbers" >&5
+$as_echo_n "checking whether ${CXX} supports template-based complex numbers... " >&6; }
+
+   if test "${casc_cv_cxx_have_template_complex+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <complex.h>
+void foo() {
+   complex<double> a(0.0, 1.0);
+}
+
+int
+main ()
+{
+/* empty */
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  casc_cv_cxx_have_template_complex=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	casc_cv_cxx_have_template_complex=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+
+   { $as_echo "$as_me:$LINENO: result: $casc_cv_cxx_have_template_complex" >&5
+$as_echo "$casc_cv_cxx_have_template_complex" >&6; }
+
+   if test "$casc_cv_cxx_have_template_complex" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TEMPLATE_COMPLEX 1
+_ACEOF
+
+   else
+      { $as_echo "$as_me:$LINENO: checking whether ${CXX} supports ISO template-based complex numbers" >&5
+$as_echo_n "checking whether ${CXX} supports ISO template-based complex numbers... " >&6; }
+      if test "${casc_cv_cxx_have_template_complex_std+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+         ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+         cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <complex>
+void foo() {
+   std::complex<double> a(0.0, 1.0);
+}
+
+int
+main ()
+{
+/* empty */
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  casc_cv_cxx_have_template_complex_std=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	casc_cv_cxx_have_template_complex_std=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+         ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+
+      { $as_echo "$as_me:$LINENO: result: $casc_cv_cxx_have_template_complex_std" >&5
+$as_echo "$casc_cv_cxx_have_template_complex_std" >&6; }
+
+      if test "$casc_cv_cxx_have_template_complex_std" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TEMPLATE_COMPLEX 1
+_ACEOF
+
+      else
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_TEMPLATE_COMPLEX 1
+_ACEOF
+
+      fi
+   fi
+
+
+
+   { $as_echo "$as_me:$LINENO: checking whether ${CXX} supports sstream.h and class ostringstream" >&5
+$as_echo_n "checking whether ${CXX} supports sstream.h and class ostringstream... " >&6; }
+
+   if test "${casc_cv_cxx_have_sstream+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <sstream.h>
+void foo() {
+//   char buffer[100];
+//   std::ostringstream os(buffer, 100);
+//   os << "hello, world...";
+   std::ostringstream out;
+   double f = 5.0;
+   int    g = 1;
+   out << "(" << f << "<some string>" << g << ")";
+}
+
+int
+main ()
+{
+/* empty */
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  casc_cv_cxx_have_sstream=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	casc_cv_cxx_have_sstream=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+
+   { $as_echo "$as_me:$LINENO: result: $casc_cv_cxx_have_sstream" >&5
+$as_echo "$casc_cv_cxx_have_sstream" >&6; }
+
+   if test "$casc_cv_cxx_have_sstream" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SSTREAM 1
+_ACEOF
+
+   else
+        { $as_echo "$as_me:$LINENO: checking whether ${CXX} supports sstream and class ostringstream" >&5
+$as_echo_n "checking whether ${CXX} supports sstream and class ostringstream... " >&6; }
+	if test "${casc_cv_cxx_have_sstream_std+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+        ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <sstream>
+void foo() {
+//   char buffer[100];
+//   std::ostringstream os(buffer, 100);
+//   os << "hello, world...";
+   std::ostringstream out;
+   double f = 5.0;
+   int    g = 1;
+   out << "(" << f << "<some string>" << g << ")";
+}
+
+int
+main ()
+{
+/* empty */
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  casc_cv_cxx_have_sstream_std=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	casc_cv_cxx_have_sstream_std=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+        ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+
+      { $as_echo "$as_me:$LINENO: result: $casc_cv_cxx_have_sstream_std" >&5
+$as_echo "$casc_cv_cxx_have_sstream_std" >&6; }
+
+      if test "$casc_cv_cxx_have_sstream_std" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SSTREAM 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISO_SSTREAM 1
+_ACEOF
+
+      else
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_SSTREAM 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define LACK_ISO_SSTREAM 1
+_ACEOF
+
+      fi
+   fi
+
+
+
+   { $as_echo "$as_me:$LINENO: checking whether ${CXX} defines the iomanip left operator" >&5
+$as_echo_n "checking whether ${CXX} defines the iomanip left operator... " >&6; }
+
+   if test "${casc_cv_cxx_have_iomanip_left+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <iostream>
+#include <iomanip>
+using namespace std;
+
+void foo()
+{
+   cout << left << 12.1;
+}
+
+int
+main ()
+{
+/* empty */
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  casc_cv_cxx_have_iomanip_left=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	casc_cv_cxx_have_iomanip_left=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+   { $as_echo "$as_me:$LINENO: result: $casc_cv_cxx_have_iomanip_left" >&5
+$as_echo "$casc_cv_cxx_have_iomanip_left" >&6; }
+
+   if test "$casc_cv_cxx_have_iomanip_left" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_IOMANIP_LEFT 1
+_ACEOF
+
+   else
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_IOMANIP_LEFT 1
+_ACEOF
+
+   fi
+
+
+
+   { $as_echo "$as_me:$LINENO: checking whether ${CXX} defines the new placement operator" >&5
+$as_echo_n "checking whether ${CXX} defines the new placement operator... " >&6; }
+
+   if test "${casc_cv_cxx_have_new_placement_operator+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <new>
+void trynew() {
+   void *ptr = 0;
+   double *data = new (ptr) double;
+}
+
+int
+main ()
+{
+/* empty */
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  casc_cv_cxx_have_new_placement_operator=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	casc_cv_cxx_have_new_placement_operator=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+
+   { $as_echo "$as_me:$LINENO: result: $casc_cv_cxx_have_new_placement_operator" >&5
+$as_echo "$casc_cv_cxx_have_new_placement_operator" >&6; }
+
+   if test "$casc_cv_cxx_have_new_placement_operator" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_NEW_PLACEMENT_OPERATOR 1
+_ACEOF
+
+   else
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_NEW_PLACEMENT_OPERATOR 1
+_ACEOF
+
+   fi
+
+
+
+   { $as_echo "$as_me:$LINENO: checking whether ${CXX} supports member function specialization" >&5
+$as_echo_n "checking whether ${CXX} supports member function specialization... " >&6; }
+   if test "${casc_cv_cxx_have_member_function_specialization+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+template <class T> class Pointer { public: void foo(); };
+template <> void Pointer<int>::foo();
+template <> void Pointer<int>::foo() { }
+
+int
+main ()
+{
+/* empty */
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  casc_cv_cxx_have_member_function_specialization=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	casc_cv_cxx_have_member_function_specialization=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+
+         case $ARCH in
+      ipsc2)
+         casc_cv_cxx_have_member_function_specialization=no
+         ;;
+   esac
+
+   { $as_echo "$as_me:$LINENO: result: $casc_cv_cxx_have_member_function_specialization" >&5
+$as_echo "$casc_cv_cxx_have_member_function_specialization" >&6; }
+   if test "$casc_cv_cxx_have_member_function_specialization" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MEMBER_FUNCTION_SPECIALIZATION 1
+_ACEOF
+
+   else
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_MEMBER_FUNCTION_SPECIALIZATION 1
+_ACEOF
+
+   fi
+
+
+
+
+   { $as_echo "$as_me:$LINENO: checking whether ${CXX} supports static data instantiation" >&5
+$as_echo_n "checking whether ${CXX} supports static data instantiation... " >&6; }
+   if test "${casc_cv_cxx_have_static_data_instantiation+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+template <class T> class Pointer { public: void foo(); };
+template <> void Pointer<int>::foo() { }
+
+int
+main ()
+{
+/* empty */
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  casc_cv_cxx_have_static_data_instantiation=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	casc_cv_cxx_have_static_data_instantiation=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+   { $as_echo "$as_me:$LINENO: result: $casc_cv_cxx_have_static_data_instantiation" >&5
+$as_echo "$casc_cv_cxx_have_static_data_instantiation" >&6; }
+   if test "$casc_cv_cxx_have_static_data_instantiation" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STATIC_DATA_INSTANTIATION 1
+_ACEOF
+
+   else
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_STATIC_DATA_INSTANTIATION 1
+_ACEOF
+
+   fi
+
+
+
+    { $as_echo "$as_me:$LINENO: checking whether ${CXX} supports exception handling" >&5
+$as_echo_n "checking whether ${CXX} supports exception handling... " >&6; }
+    if test "${casc_cv_cxx_have_exception_handling+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+       ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <fpu_control.h>
+#include <signal.h>
+static void byebye(int error) { }
+void foo() {
+   unsigned short fpu_flags = _FPU_DEFAULT;
+   fpu_flags &= ~_FPU_MASK_IM;  /* Execption on Invalid operation */
+   fpu_flags &= ~_FPU_MASK_ZM;  /* Execption on Division by zero  */
+   fpu_flags &= ~_FPU_MASK_OM;  /* Execption on Overflow */
+   _FPU_SETCW(fpu_flags);
+   signal(SIGFPE, byebye);
+}
+
+int
+main ()
+{
+/* empty */
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  casc_cv_cxx_have_exception_handling=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	casc_cv_cxx_have_exception_handling=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+    { $as_echo "$as_me:$LINENO: result: $casc_cv_cxx_have_exception_handling" >&5
+$as_echo "$casc_cv_cxx_have_exception_handling" >&6; }
+    if test "$casc_cv_cxx_have_exception_handling" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_EXCEPTION_HANDLING 1
+_ACEOF
+
+    else
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_EXCEPTION_HANDLING 1
+_ACEOF
+
+    fi
+
+
+
+   { $as_echo "$as_me:$LINENO: checking whether ${CXX} supports standard static data specialization" >&5
+$as_echo_n "checking whether ${CXX} supports standard static data specialization... " >&6; }
+   if test "${casc_cv_cxx_have_standard_static_data_specialization+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+template <class T> class Pointer { public: static T *s_test; };
+template <> int *Pointer<int>::s_test;
+int test() { Pointer<int> P; return(*P.s_test); }
+template <> int *Pointer<int>::s_test = (int*) 0;
+template class Pointer<int>;
+
+int
+main ()
+{
+/* empty */
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  casc_cv_cxx_have_standard_static_data_specialization=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	casc_cv_cxx_have_standard_static_data_specialization=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+   { $as_echo "$as_me:$LINENO: result: $casc_cv_cxx_have_standard_static_data_specialization" >&5
+$as_echo "$casc_cv_cxx_have_standard_static_data_specialization" >&6; }
+   if test "$casc_cv_cxx_have_standard_static_data_specialization" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STANDARD_STATIC_DATA_SPECIALIZATION 1
+_ACEOF
+
+   else
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_STANDARD_STATIC_DATA_SPECIALIZATION 1
+_ACEOF
+
+   fi
+
+if test "$casc_cv_cxx_have_standard_static_data_specialization" = "no"; then
+
+
+   { $as_echo "$as_me:$LINENO: checking whether ${CXX} supports pragma static data specialization" >&5
+$as_echo_n "checking whether ${CXX} supports pragma static data specialization... " >&6; }
+   if test "${casc_cv_cxx_have_pragma_static_data_specialization+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+template <class T> class Pointer { public: static T *s_test; };
+#pragma do_not_instantiate int *Pointer<int>::s_test
+int test() { Pointer<int> P; return(*P.s_test); }
+template <> int *Pointer<int>::s_test = (int*) 0;
+template class Pointer<int>;
+
+int
+main ()
+{
+/* empty */
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  casc_cv_cxx_have_pragma_static_data_specialization=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	casc_cv_cxx_have_pragma_static_data_specialization=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+   { $as_echo "$as_me:$LINENO: result: $casc_cv_cxx_have_pragma_static_data_specialization" >&5
+$as_echo "$casc_cv_cxx_have_pragma_static_data_specialization" >&6; }
+   if test "$casc_cv_cxx_have_pragma_static_data_specialization" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PRAGMA_STATIC_DATA_SPECIALIZATION 1
+_ACEOF
+
+   else
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_PRAGMA_STATIC_DATA_SPECIALIZATION 1
+_ACEOF
+
+   fi
+
+fi
+
+
+
+   { $as_echo "$as_me:$LINENO: checking whether ${CXX} supports cmath" >&5
+$as_echo_n "checking whether ${CXX} supports cmath... " >&6; }
+
+   if test "${casc_cv_cxx_have_cmath+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+         cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <cmath>
+void foo() {
+   double temp = std::sin(0.0);
+}
+
+int
+main ()
+{
+/* empty */
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  casc_cv_cxx_have_cmath=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	casc_cv_cxx_have_cmath=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+         ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+
+   { $as_echo "$as_me:$LINENO: result: $casc_cv_cxx_have_cmath" >&5
+$as_echo "$casc_cv_cxx_have_cmath" >&6; }
+
+   if test "$casc_cv_cxx_have_cmath" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CMATH 1
+_ACEOF
+
+   else
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_CMATH 1
+_ACEOF
+
+   fi
+
+
+
+
+   { $as_echo "$as_me:$LINENO: checking whether ${CXX} needs isnan templates" >&5
+$as_echo_n "checking whether ${CXX} needs isnan templates... " >&6; }
+
+   if test "${casc_cv_cxx_have_isnan_template+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+#include <complex>
+
+template int __gnu_cxx::isnan<float>(float);
+template int __gnu_cxx::__capture_isnan<float>(float);
+
+int
+main ()
+{
+/* empty */
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  casc_cv_cxx_have_isnan_template=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	casc_cv_cxx_have_isnan_template=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+   { $as_echo "$as_me:$LINENO: result: $casc_cv_cxx_have_isnan_template" >&5
+$as_echo "$casc_cv_cxx_have_isnan_template" >&6; }
+
+   if test "$casc_cv_cxx_have_isnan_template" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISNAN_TEMPLATE 1
+_ACEOF
+
+   else
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_ISNAN_TEMPLATE 1
+_ACEOF
+
+   fi
+
+
+
+
+# Begin CASC_CXX_STD_FILL_N_RETURNS_VOID
+# Defines CASC_STD_FILL_N_RETURNS_VOID
+
+# Check if std::fill_n returns a void, older XLC compilers do this.
+
+   { $as_echo "$as_me:$LINENO: checking whether std:fill_n returns void" >&5
+$as_echo_n "checking whether std:fill_n returns void... " >&6; }
+   ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+   casc_save_LIBS=$LIBS
+   casc_save_CXXFLAGS=$CXXFLAGS
+
+   cat >conftest.$ac_ext <<_ACEOF
+
+
+      #include <vector>
+
+      template void std::fill_n<unsigned int*, int, int>(unsigned int*, int, int const&);
+
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  casc_std_fill_n_returns_void=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	casc_std_fill_n_returns_void=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+   LIBS=$casc_save_LIBS
+   unset casc_save_LIBS
+   CXXFLAGS=$casc_save_CXXFLAGS
+   unset casc_save_CXXFLAGS
+
+   ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+   { $as_echo "$as_me:$LINENO: result: $casc_std_fill_n_returns_void" >&5
+$as_echo "$casc_std_fill_n_returns_void" >&6; }
+
+   if test "$casc_std_fill_n_returns_void" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define CASC_STD_FILL_N_RETURNS_VOID 1
+_ACEOF
+
+   fi
+
+
+# END CASC_CXX_STD_FILL_N_RETURNS_VOID
+
+
+
+
+
+   { $as_echo "$as_me:$LINENO: checking whether ${CXX} supports cmath" >&5
+$as_echo_n "checking whether ${CXX} supports cmath... " >&6; }
+
+   if test "${casc_cv_cxx_have_cmath+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+         cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <ctime>
+void foo() {
+   char*   pzTime  = ctime( &amp;timeVal );
+}
+
+int
+main ()
+{
+/* empty */
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  casc_cv_cxx_have_cmath=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	casc_cv_cxx_have_cmath=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+
+   { $as_echo "$as_me:$LINENO: result: $casc_cv_cxx_have_cmath" >&5
+$as_echo "$casc_cv_cxx_have_cmath" >&6; }
+
+   if test "$casc_cv_cxx_have_cmath" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CTIME 1
+_ACEOF
+
+   else
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_CTIME 1
+_ACEOF
+
+   fi
+
+{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_header_stdc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_header_stdc=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  eval "$as_ac_Header=yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+for ac_header in sys/times.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in unistd.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+# For insure add -Zsl option for linking
+case $CXX in
+   *insure*)
+            CXX_FLAGS="$CXX_FLAGS -Zsl"
+            LIB_NAME="$LIB_NAME -Zsl"
+            ;;
+esac
+
+case $CXX_ID in
+   gnu)
+      CXX_FLAGS="-Wall -Wextra -Wconversion $CXX_FLAGS"
+      case $ARCH in
+         IRIX64)
+            CXX_FLAGS="-mabi=64 $CXX_FLAGS"
+            ;;
+	 solaris)
+	    ;;
+	 CYGWIN)
+	    CXX_FLAGS="$CXX_FLAGS"
+	    ;;
+      esac
+      ;;
+   sunpro)
+      CXX_FLAGS="-qrtti=all $CXX_FLAGS"
+      case $ARCH in
+         solaris | sun4)
+            CXX_FLAGS="$CXX_FLAGS"
+            CXX_FLAGS="+p $CXX_FLAGS"
+            ;;
+      esac
+      ;;
+   xlc)
+      CXX_FLAGS="-qrtti -g $CXX_FLAGS"
+      ;;
+   intel)
+      # Ignore some Intel warnings that seem harmless and very hard to get rid of
+      CXX_FLAGS="$CXX_FLAGS -Wall -w1 -wd981 -wd383 -wd1418 -wd522"
+      ;;
+    insure)
+      case $ARCH in
+         solaris | sun4)
+            CXX_FLAGS="+p $CXX_FLAGS"
+            LIB_NAME="$LIB_NAME -Zsl"
+            ;;
+      esac
+      ;;
+    *)
+      ;;
+esac
+
+
+cat >>confdefs.h <<\_ACEOF
+#define INCLUDE_TEMPLATE_IMPLEMENTATION 1
+_ACEOF
+
+DEPENDS_ON_TEMPLATE_IMPLEMENTATION="yes"
+
+
+
+XARGS="xargs -n 150"
+SAMRAI_TARGET="standard"
+if test "$enable_noxargs" = "yes"; then
+   SAMRAI_TARGET="noxargs"
+fi
+
+if test "$enable_shared" = "yes"; then
+   SAMRAI_TARGET="shared"
+   case $ARCH in
+   Linux | LINUX | linux )
+      C_FLAGS="-fPIC $C_FLAGS"
+      CXX_FLAGS="-fPIC $CXX_FLAGS"
+      F77_FLAGS="-fPIC $F77_FLAGS"
+      CXXLD_FLAGS="-shared $LD_FLAGS"
+      LIB_SUFFIX=.so
+      ;;
+   rs6000)
+      CXXLD_FLAGS="-G $LD_FLAGS"
+      LD_FLAGS="$LD_FLAGS -binitfini:poe_remote_main"
+      LIB_SUFFIX=.so
+      ;;
+   *)
+      C_FLAGS="-KPIC $C_FLAGS"
+      CXX_FLAGS="-KPIC $CXX_FLAGS"
+      CXXLD_FLAGS="-shared $LD_FLAGS"
+      LIB_SUFFIX=.so
+      ;;
+   esac
+fi
+
+
+
+if test "$enable_developer_makefile" = "no"; then
+   DEVELOPER_MAKEFILE="no"
+else
+   DEVELOPER_MAKEFILE="yes"
+fi
+
+
+
+
+
+# Begin SAMRAI_TIMERS
+# Defines ENABLE_SAMRAI_TIMERS if --enable-timers is specified.  This is
+# turned on by default
+
+{ $as_echo "$as_me:$LINENO: checking if SAMRAI Timers are enabled" >&5
+$as_echo_n "checking if SAMRAI Timers are enabled... " >&6; }
+# Check whether --enable-timers was given.
+if test "${enable_timers+set}" = set; then
+  enableval=$enable_timers;
+      if test "x$enableval" = "xno"; then
+         samrai_enable_timers="$enableval"
+      fi
+
+else
+
+      samrai_enable_timers="yes"
+
+fi
+
+
+
+if test "x$samrai_enable_timers" = "xyes"; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_SAMRAI_TIMERS 1
+_ACEOF
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $samrai_enable_timers" >&5
+$as_echo "$samrai_enable_timers" >&6; }
+
+
+# Check whether --enable-opt was given.
+if test "${enable_opt+set}" = set; then
+  enableval=$enable_opt; case "$enable_opt" in
+   no) opt_switches= ;;
+   yes)
+                  user_specified_inline="yes"
+      case $CXX_ID in
+         gnu)   opt_switches="-O2" ;;
+         intel) opt_switches="-O3" ;;
+         sunpro)
+             case $ARCH in
+                solaris | sun4) opt_switches="-fast" ;;
+                *)              opt_switches="-O" ;;
+             esac ;;
+         xlc)   opt_switches="-O3" ;;
+         *)     opt_switches="-O" ;;
+      esac ;;
+   *) opt_switches="$enable_opt" ;;
+esac
+else
+  opt_switches=
+fi
+
+
+if test -n "$opt_switches" ; then
+   C_FLAGS="$opt_switches $C_FLAGS"
+   CXX_FLAGS="$opt_switches $CXX_FLAGS"
+   F77_FLAGS="$opt_switches $F77_FLAGS"
+fi
+
+# Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then
+  enableval=$enable_debug; case "$enable_debug" in
+   no) debug_switches= ;;
+   yes)
+      case $CXX_ID in
+         *)   debug_switches="-g" ;;
+      esac ;;
+   *) debug_switches="$enable_debug" ;;
+esac
+
+else
+  debug_switches=-g
+fi
+
+
+case "$enable_debug" in
+   no) ;;
+   *)
+   # Enable assertion checking and disable inlining when debugging is enabled if user
+   # does not override.
+   if test "$user_specified_check_assertions" != "yes"; then
+      enable_check_assertions="yes"
+   fi
+   if test "$user_specified_check_dim_assertions" != "yes"; then
+      enable_check_dim_assertions="yes"
+   fi
+   if test "$user_specified_inline" != "yes"; then
+      enable_inline="no"
+   fi
+
+cat >>confdefs.h <<\_ACEOF
+#define DEBUG_INITIALIZE_UNDEFINED 1
+_ACEOF
+
+esac
+
+if test "$enable_check_assertions" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DEBUG_CHECK_ASSERTIONS 1
+_ACEOF
+
+fi
+
+
+if test "$enable_check_developer_assertions" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DEBUG_CHECK_DEV_ASSERTIONS 1
+_ACEOF
+
+fi
+
+if test "$enable_check_dim_assertions" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DEBUG_CHECK_DIM_ASSERTIONS 1
+_ACEOF
+
+fi
+
+if test "$enable_bgl" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define __BGL_FAMILY__ 1
+_ACEOF
+
+fi
+
+if test "$enable_inline" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define SAMRAI_INLINE 1
+_ACEOF
+
+fi
+
+if test -n "$debug_switches" ; then
+   C_FLAGS="$debug_switches $C_FLAGS"
+   CXX_FLAGS="$debug_switches $CXX_FLAGS"
+   F77_FLAGS="$debug_switches $F77_FLAGS"
+fi
+
+
+
+btng_log_vars="debug_switches opt_switches"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:7653:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+
+
+if test -n "$with_F77"; then
+      if test -f $with_F77; then
+      F77=$with_F77
+   else
+      for ac_prog in $with_F77
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_F77+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$F77"; then
+  ac_cv_prog_F77="$F77" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_F77="$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+F77=$ac_cv_prog_F77
+if test -n "$F77"; then
+  { $as_echo "$as_me:$LINENO: result: $F77" >&5
+$as_echo "$F77" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$F77" && break
+done
+
+   fi
+else
+   if test -z "$F77"; then
+      for ac_prog in f77 g77 xlf f2c
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_F77+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$F77"; then
+  ac_cv_prog_F77="$F77" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_F77="$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+F77=$ac_cv_prog_F77
+if test -n "$F77"; then
+  { $as_echo "$as_me:$LINENO: result: $F77" >&5
+$as_echo "$F77" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$F77" && break
+done
+
+   else
+                  if test -f $F77; then
+	F77=$F77
+      else
+	for ac_prog in $F77
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_F77+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$F77"; then
+  ac_cv_prog_F77="$F77" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_F77="$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+F77=$ac_cv_prog_F77
+if test -n "$F77"; then
+  { $as_echo "$as_me:$LINENO: result: $F77" >&5
+$as_echo "$F77" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$F77" && break
+done
+
+      fi
+   fi
+fi
+
+test -z "$F77" && { { $as_echo "$as_me:$LINENO: error: no acceptable Fortran found in $PATH" >&5
+$as_echo "$as_me: error: no acceptable Fortran found in $PATH" >&2;}
+   { (exit 1); exit 1; }; }
+
+
+btng_log_vars="F77"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:7814:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+if test "$ac_cv_f77_compiler_gnu" = "yes"; then
+   F77_FLAGS="-Wall -Wimplicit -Wunused $F77_FLAGS"
+else
+   case $ARCH in
+      sun4 | solaris)
+         F77_FLAGS="-u $F77_FLAGS"
+         ;;
+      rs6000)
+         F77_FLAGS="-u $F77_FLAGS"
+         ;;
+      IRIX64)
+         F77_FLAGS="-64 $F77_FLAGS"
+         ;;
+   esac
+fi
+
+ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_F77+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$F77"; then
+  ac_cv_prog_F77="$F77" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+F77=$ac_cv_prog_F77
+if test -n "$F77"; then
+  { $as_echo "$as_me:$LINENO: result: $F77" >&5
+$as_echo "$F77" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$F77" && break
+  done
+fi
+if test -z "$F77"; then
+  ac_ct_F77=$F77
+  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_F77"; then
+  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_F77="$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_F77=$ac_cv_prog_ac_ct_F77
+if test -n "$ac_ct_F77"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
+$as_echo "$ac_ct_F77" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_F77" && break
+done
+
+  if test "x$ac_ct_F77" = x; then
+    F77=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    F77=$ac_ct_F77
+  fi
+fi
+
+
+# Provide some information about the compiler.
+$as_echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+rm -f a.out
+
+# If we don't use `.F' as extension, the preprocessor is not run on the
+# input file.  (Note that this only needs to work for GNU compilers.)
+ac_save_ext=$ac_ext
+ac_ext=F
+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
+$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; }
+if test "${ac_cv_f77_compiler_gnu+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+      program main
+#ifndef __GNUC__
+       choke me
+#endif
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_f77_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_compiler_gnu=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_f77_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
+$as_echo "$ac_cv_f77_compiler_gnu" >&6; }
+ac_ext=$ac_save_ext
+ac_test_FFLAGS=${FFLAGS+set}
+ac_save_FFLAGS=$FFLAGS
+FFLAGS=
+{ $as_echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
+$as_echo_n "checking whether $F77 accepts -g... " >&6; }
+if test "${ac_cv_prog_f77_g+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  FFLAGS=-g
+cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_f77_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_f77_g=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_prog_f77_g=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
+$as_echo "$ac_cv_prog_f77_g" >&6; }
+if test "$ac_test_FFLAGS" = set; then
+  FFLAGS=$ac_save_FFLAGS
+elif test $ac_cv_prog_f77_g = yes; then
+  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+    FFLAGS="-g -O2"
+  else
+    FFLAGS="-g"
+  fi
+else
+  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+    FFLAGS="-O2"
+  else
+    FFLAGS=
+  fi
+fi
+
+if test $ac_compiler_gnu = yes; then
+  G77=yes
+else
+  G77=
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+{ $as_echo "$as_me:$LINENO: checking how to get verbose linking output from $F77" >&5
+$as_echo_n "checking how to get verbose linking output from $F77... " >&6; }
+if test "${ac_cv_prog_f77_v+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_f77_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_f77_v=
+# Try some options frequently used verbose output
+for ac_verb in -v -verbose --verbose -V -\#\#\#; do
+  cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+
+# Compile and link our simple test program by passing a flag (argument
+# 1 to this macro) to the Fortran compiler in order to get
+# "verbose" output that we can then parse for the Fortran linker
+# flags.
+ac_save_FFLAGS=$FFLAGS
+FFLAGS="$FFLAGS $ac_verb"
+eval "set x $ac_link"
+shift
+$as_echo "$as_me:$LINENO: $*" >&5
+# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH,
+# LIBRARY_PATH; skip all such settings.
+ac_f77_v_output=`eval $ac_link 5>&1 2>&1 |
+  grep -v 'Driving:' | grep -v "^[_$as_cr_Letters][_$as_cr_alnum]*="`
+$as_echo "$ac_f77_v_output" >&5
+FFLAGS=$ac_save_FFLAGS
+
+rm -rf conftest*
+
+# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where
+# /foo, /bar, and /baz are search directories for the Fortran linker.
+# Here, we change these into -L/foo -L/bar -L/baz (and put it first):
+ac_f77_v_output="`echo $ac_f77_v_output |
+	grep 'LPATH is:' |
+	sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_f77_v_output"
+
+# FIXME: we keep getting bitten by quoted arguments; a more general fix
+#        that detects unbalanced quotes in FLIBS should be implemented
+#        and (ugh) tested at some point.
+case $ac_f77_v_output in
+  # If we are using xlf then replace all the commas with spaces.
+  *xlfentry*)
+    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/,/ /g'` ;;
+
+  # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted
+  # $LIBS confuse us, and the libraries appear later in the output anyway).
+  *mGLOB_options_string*)
+    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;;
+
+  # Portland Group compiler has singly- or doubly-quoted -cmdline argument
+  # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4.
+  # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2".
+  *-cmdline\ * | *-ignore\ * | *-def\ *)
+    ac_f77_v_output=`echo $ac_f77_v_output | sed "\
+        s/-cmdline  *'[^']*'/ /g; s/-cmdline  *\"[^\"]*\"/ /g
+        s/-ignore  *'[^']*'/ /g; s/-ignore  *\"[^\"]*\"/ /g
+        s/-def  *'[^']*'/ /g; s/-def  *\"[^\"]*\"/ /g"` ;;
+
+  # If we are using Cray Fortran then delete quotes.
+  *cft90*)
+    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"//g'` ;;
+esac
+
+
+  # look for -l* and *.a constructs in the output
+  for ac_arg in $ac_f77_v_output; do
+     case $ac_arg in
+        [\\/]*.a | ?:[\\/]*.a | -[lLRu]*)
+          ac_cv_prog_f77_v=$ac_verb
+          break 2 ;;
+     esac
+  done
+done
+if test -z "$ac_cv_prog_f77_v"; then
+   { $as_echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $F77" >&5
+$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;}
+fi
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ $as_echo "$as_me:$LINENO: WARNING: compilation failed" >&5
+$as_echo "$as_me: WARNING: compilation failed" >&2;}
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_f77_v" >&5
+$as_echo "$ac_cv_prog_f77_v" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for Fortran 77 libraries of $F77" >&5
+$as_echo_n "checking for Fortran 77 libraries of $F77... " >&6; }
+if test "${ac_cv_f77_libs+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$FLIBS" != "x"; then
+  ac_cv_f77_libs="$FLIBS" # Let the user override the test.
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+
+# Compile and link our simple test program by passing a flag (argument
+# 1 to this macro) to the Fortran compiler in order to get
+# "verbose" output that we can then parse for the Fortran linker
+# flags.
+ac_save_FFLAGS=$FFLAGS
+FFLAGS="$FFLAGS $ac_cv_prog_f77_v"
+eval "set x $ac_link"
+shift
+$as_echo "$as_me:$LINENO: $*" >&5
+# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH,
+# LIBRARY_PATH; skip all such settings.
+ac_f77_v_output=`eval $ac_link 5>&1 2>&1 |
+  grep -v 'Driving:' | grep -v "^[_$as_cr_Letters][_$as_cr_alnum]*="`
+$as_echo "$ac_f77_v_output" >&5
+FFLAGS=$ac_save_FFLAGS
+
+rm -rf conftest*
+
+# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where
+# /foo, /bar, and /baz are search directories for the Fortran linker.
+# Here, we change these into -L/foo -L/bar -L/baz (and put it first):
+ac_f77_v_output="`echo $ac_f77_v_output |
+	grep 'LPATH is:' |
+	sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_f77_v_output"
+
+# FIXME: we keep getting bitten by quoted arguments; a more general fix
+#        that detects unbalanced quotes in FLIBS should be implemented
+#        and (ugh) tested at some point.
+case $ac_f77_v_output in
+  # If we are using xlf then replace all the commas with spaces.
+  *xlfentry*)
+    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/,/ /g'` ;;
+
+  # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted
+  # $LIBS confuse us, and the libraries appear later in the output anyway).
+  *mGLOB_options_string*)
+    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;;
+
+  # Portland Group compiler has singly- or doubly-quoted -cmdline argument
+  # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4.
+  # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2".
+  *-cmdline\ * | *-ignore\ * | *-def\ *)
+    ac_f77_v_output=`echo $ac_f77_v_output | sed "\
+        s/-cmdline  *'[^']*'/ /g; s/-cmdline  *\"[^\"]*\"/ /g
+        s/-ignore  *'[^']*'/ /g; s/-ignore  *\"[^\"]*\"/ /g
+        s/-def  *'[^']*'/ /g; s/-def  *\"[^\"]*\"/ /g"` ;;
+
+  # If we are using Cray Fortran then delete quotes.
+  *cft90*)
+    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"//g'` ;;
+esac
+
+
+
+ac_cv_f77_libs=
+
+# Save positional arguments (if any)
+ac_save_positional="$@"
+
+set X $ac_f77_v_output
+while test $# != 1; do
+  shift
+  ac_arg=$1
+  case $ac_arg in
+        [\\/]*.a | ?:[\\/]*.a)
+            ac_exists=false
+  for ac_i in $ac_cv_f77_libs; do
+    if test x"$ac_arg" = x"$ac_i"; then
+      ac_exists=true
+      break
+    fi
+  done
+
+  if test x"$ac_exists" = xtrue; then
+  :
+else
+  ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
+fi
+
+          ;;
+        -bI:*)
+            ac_exists=false
+  for ac_i in $ac_cv_f77_libs; do
+    if test x"$ac_arg" = x"$ac_i"; then
+      ac_exists=true
+      break
+    fi
+  done
+
+  if test x"$ac_exists" = xtrue; then
+  :
+else
+  if test "$ac_compiler_gnu" = yes; then
+  for ac_link_opt in $ac_arg; do
+    ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt"
+  done
+else
+  ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
+fi
+fi
+
+          ;;
+          # Ignore these flags.
+        -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -LANG:=* | -LIST:* | -LNO:*)
+          ;;
+        -lkernel32)
+          test x"$CYGWIN" != xyes && ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
+          ;;
+        -[LRuYz])
+          # These flags, when seen by themselves, take an argument.
+          # We remove the space between option and argument and re-iterate
+          # unless we find an empty arg or a new option (starting with -)
+	  case $2 in
+	     "" | -*);;
+	     *)
+		ac_arg="$ac_arg$2"
+		shift; shift
+		set X $ac_arg "$@"
+		;;
+	  esac
+          ;;
+        -YP,*)
+          for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do
+              ac_exists=false
+  for ac_i in $ac_cv_f77_libs; do
+    if test x"$ac_j" = x"$ac_i"; then
+      ac_exists=true
+      break
+    fi
+  done
+
+  if test x"$ac_exists" = xtrue; then
+  :
+else
+  ac_arg="$ac_arg $ac_j"
+                               ac_cv_f77_libs="$ac_cv_f77_libs $ac_j"
+fi
+
+          done
+          ;;
+        -[lLR]*)
+            ac_exists=false
+  for ac_i in $ac_cv_f77_libs; do
+    if test x"$ac_arg" = x"$ac_i"; then
+      ac_exists=true
+      break
+    fi
+  done
+
+  if test x"$ac_exists" = xtrue; then
+  :
+else
+  ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
+fi
+
+          ;;
+	-zallextract*| -zdefaultextract)
+	  ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
+	  ;;
+          # Ignore everything else.
+  esac
+done
+# restore positional arguments
+set X $ac_save_positional; shift
+
+# We only consider "LD_RUN_PATH" on Solaris systems.  If this is seen,
+# then we insist that the "run path" must be an absolute path (i.e. it
+# must begin with a "/").
+case `(uname -sr) 2>/dev/null` in
+   "SunOS 5"*)
+      ac_ld_run_path=`$as_echo "$ac_f77_v_output" |
+                        sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'`
+      test "x$ac_ld_run_path" != x &&
+        if test "$ac_compiler_gnu" = yes; then
+  for ac_link_opt in $ac_ld_run_path; do
+    ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt"
+  done
+else
+  ac_cv_f77_libs="$ac_cv_f77_libs $ac_ld_run_path"
+fi
+      ;;
+esac
+fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x"
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_f77_libs" >&5
+$as_echo "$ac_cv_f77_libs" >&6; }
+FLIBS="$ac_cv_f77_libs"
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Split FLIBS into the LIB_PATH part (FLIBS_PATH) and the LIB_NAME part (FLIBS_NAME)
+if test -n "${FLIBS}"; then
+  for i in ${FLIBS}; do
+    case "$i" in
+    -L*) FLIBS_PATH="${FLIBS_PATH} $i" ;;
+    *) FLIBS_NAME="${FLIBS_NAME} $i" ;;
+    esac
+  done
+fi
+
+LIB_NAME="${LIB_NAME} ${FLIBS_NAME}"
+LIB_PATH="${LIB_PATH} ${FLIBS_PATH}"
+
+
+btng_log_vars="FLIBS FLIBS_PATH FLIBS_NAME"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:8456:" "after using ac_f77_library_ldflags: $btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+
+{ $as_echo "$as_me:$LINENO: checking for dummy main to link with Fortran 77 libraries" >&5
+$as_echo_n "checking for dummy main to link with Fortran 77 libraries... " >&6; }
+if test "${ac_cv_f77_dummy_main+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_f77_dm_save_LIBS=$LIBS
+ LIBS="$LIBS $FLIBS"
+ ac_fortran_dm_var=F77_DUMMY_MAIN
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ # First, try linking without a dummy main:
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_fortran_dummy_main=none
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_fortran_dummy_main=unknown
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+
+ if test $ac_cv_fortran_dummy_main = unknown; then
+   for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do
+     cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#define $ac_fortran_dm_var $ac_func
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_fortran_dummy_main=$ac_func; break
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+   done
+ fi
+ ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+ ac_cv_f77_dummy_main=$ac_cv_fortran_dummy_main
+ rm -rf conftest*
+ LIBS=$ac_f77_dm_save_LIBS
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_f77_dummy_main" >&5
+$as_echo "$ac_cv_f77_dummy_main" >&6; }
+F77_DUMMY_MAIN=$ac_cv_f77_dummy_main
+if test "$F77_DUMMY_MAIN" != unknown; then
+  if test $F77_DUMMY_MAIN != none; then
+
+cat >>confdefs.h <<_ACEOF
+#define F77_DUMMY_MAIN $F77_DUMMY_MAIN
+_ACEOF
+
+  if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define FC_DUMMY_MAIN_EQ_F77 1
+_ACEOF
+
+  fi
+fi
+else
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: linking to Fortran libraries from C fails
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: linking to Fortran libraries from C fails
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+{ $as_echo "$as_me:$LINENO: checking for Fortran 77 name-mangling scheme" >&5
+$as_echo_n "checking for Fortran 77 name-mangling scheme... " >&6; }
+if test "${ac_cv_f77_mangling+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+      subroutine foobar()
+      return
+      end
+      subroutine foo_bar()
+      return
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_f77_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  mv conftest.$ac_objext cfortran_test.$ac_objext
+
+  ac_save_LIBS=$LIBS
+  LIBS="cfortran_test.$ac_objext $LIBS $FLIBS"
+
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+  ac_success=no
+  for ac_foobar in foobar FOOBAR; do
+    for ac_underscore in "" "_"; do
+      ac_func="$ac_foobar$ac_underscore"
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_success=yes; break 2
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+    done
+  done
+  ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+
+  if test "$ac_success" = "yes"; then
+     case $ac_foobar in
+	foobar)
+	   ac_case=lower
+	   ac_foo_bar=foo_bar
+	   ;;
+	FOOBAR)
+	   ac_case=upper
+	   ac_foo_bar=FOO_BAR
+	   ;;
+     esac
+
+     ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+     ac_success_extra=no
+     for ac_extra in "" "_"; do
+	ac_func="$ac_foo_bar$ac_underscore$ac_extra"
+	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_success_extra=yes; break
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+     done
+     ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+
+     if test "$ac_success_extra" = "yes"; then
+	ac_cv_f77_mangling="$ac_case case"
+        if test -z "$ac_underscore"; then
+           ac_cv_f77_mangling="$ac_cv_f77_mangling, no underscore"
+	else
+           ac_cv_f77_mangling="$ac_cv_f77_mangling, underscore"
+        fi
+        if test -z "$ac_extra"; then
+           ac_cv_f77_mangling="$ac_cv_f77_mangling, no extra underscore"
+	else
+           ac_cv_f77_mangling="$ac_cv_f77_mangling, extra underscore"
+        fi
+      else
+	ac_cv_f77_mangling="unknown"
+      fi
+  else
+     ac_cv_f77_mangling="unknown"
+  fi
+
+  LIBS=$ac_save_LIBS
+  rm -rf conftest*
+  rm -f cfortran_test*
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compile a simple Fortran program
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compile a simple Fortran program
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_f77_mangling" >&5
+$as_echo "$ac_cv_f77_mangling" >&6; }
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+
+
+case $ac_cv_f77_mangling in
+  "lower case, no underscore, no extra underscore")
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC(name,NAME) name
+_ACEOF
+
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC_(name,NAME) name
+_ACEOF
+ ;;
+  "lower case, no underscore, extra underscore")
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC(name,NAME) name
+_ACEOF
+
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC_(name,NAME) name ## _
+_ACEOF
+ ;;
+  "lower case, underscore, no extra underscore")
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC(name,NAME) name ## _
+_ACEOF
+
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC_(name,NAME) name ## _
+_ACEOF
+ ;;
+  "lower case, underscore, extra underscore")
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC(name,NAME) name ## _
+_ACEOF
+
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC_(name,NAME) name ## __
+_ACEOF
+ ;;
+  "upper case, no underscore, no extra underscore")
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC(name,NAME) NAME
+_ACEOF
+
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC_(name,NAME) NAME
+_ACEOF
+ ;;
+  "upper case, no underscore, extra underscore")
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC(name,NAME) NAME
+_ACEOF
+
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC_(name,NAME) NAME ## _
+_ACEOF
+ ;;
+  "upper case, underscore, no extra underscore")
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC(name,NAME) NAME ## _
+_ACEOF
+
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC_(name,NAME) NAME ## _
+_ACEOF
+ ;;
+  "upper case, underscore, extra underscore")
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC(name,NAME) NAME ## _
+_ACEOF
+
+          cat >>confdefs.h <<\_ACEOF
+#define F77_FUNC_(name,NAME) NAME ## __
+_ACEOF
+ ;;
+  *)
+          { $as_echo "$as_me:$LINENO: WARNING: unknown Fortran name-mangling scheme" >&5
+$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;}
+          ;;
+esac
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:$LINENO: checking whether to kludge override fortran name mangling results" >&5
+$as_echo_n "checking whether to kludge override fortran name mangling results... " >&6; }
+# Check whether --enable-fortran-mangling-override was given.
+if test "${enable_fortran_mangling_override+set}" = set; then
+  enableval=$enable_fortran_mangling_override; case "$enable_fortran_mangling_override" in
+  yes)
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+  sed -e 's/^\(#define F77_FUNC.\{1,\}\)/\1 ## _/' confdefs.h > confdefs1.h
+  mv confdefs1.h confdefs.h
+esac
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+if test "${with_x+set}" = set; then
+   { $as_echo "$as_me:$LINENO: checking for X" >&5
+$as_echo_n "checking for X... " >&6; }
+
+
+# Check whether --with-x was given.
+if test "${with_x+set}" = set; then
+  withval=$with_x;
+fi
+
+# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
+if test "x$with_x" = xno; then
+  # The user explicitly disabled X.
+  have_x=disabled
+else
+  case $x_includes,$x_libraries in #(
+    *\'*) { { $as_echo "$as_me:$LINENO: error: cannot use X directory names containing '" >&5
+$as_echo "$as_me: error: cannot use X directory names containing '" >&2;}
+   { (exit 1); exit 1; }; };; #(
+    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  # One or both of the vars are not set, and there is no cached value.
+ac_x_includes=no ac_x_libraries=no
+rm -f -r conftest.dir
+if mkdir conftest.dir; then
+  cd conftest.dir
+  cat >Imakefile <<'_ACEOF'
+incroot:
+	@echo incroot='${INCROOT}'
+usrlibdir:
+	@echo usrlibdir='${USRLIBDIR}'
+libdir:
+	@echo libdir='${LIBDIR}'
+_ACEOF
+  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
+    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+    for ac_var in incroot usrlibdir libdir; do
+      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
+    done
+    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+    for ac_extension in a so sl dylib la dll; do
+      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
+	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
+	ac_im_usrlibdir=$ac_im_libdir; break
+      fi
+    done
+    # Screen out bogus values from the imake configuration.  They are
+    # bogus both because they are the default anyway, and because
+    # using them would break gcc on systems where it needs fixed includes.
+    case $ac_im_incroot in
+	/usr/include) ac_x_includes= ;;
+	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
+    esac
+    case $ac_im_usrlibdir in
+	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
+	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
+    esac
+  fi
+  cd ..
+  rm -f -r conftest.dir
+fi
+
+# Standard set of common directories for X headers.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+ac_x_header_dirs='
+/usr/X11/include
+/usr/X11R6/include
+/usr/X11R5/include
+/usr/X11R4/include
+
+/usr/include/X11
+/usr/include/X11R6
+/usr/include/X11R5
+/usr/include/X11R4
+
+/usr/local/X11/include
+/usr/local/X11R6/include
+/usr/local/X11R5/include
+/usr/local/X11R4/include
+
+/usr/local/include/X11
+/usr/local/include/X11R6
+/usr/local/include/X11R5
+/usr/local/include/X11R4
+
+/usr/X386/include
+/usr/x386/include
+/usr/XFree86/include/X11
+
+/usr/include
+/usr/local/include
+/usr/unsupported/include
+/usr/athena/include
+/usr/local/x11r5/include
+/usr/lpp/Xamples/include
+
+/usr/openwin/include
+/usr/openwin/share/include'
+
+if test "$ac_x_includes" = no; then
+  # Guess where to find include files, by looking for Xlib.h.
+  # First, try using that file with no special directory specified.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <X11/Xlib.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  # We can compile using X headers with no special include directory.
+ac_x_includes=
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  for ac_dir in $ac_x_header_dirs; do
+  if test -r "$ac_dir/X11/Xlib.h"; then
+    ac_x_includes=$ac_dir
+    break
+  fi
+done
+fi
+
+rm -f conftest.err conftest.$ac_ext
+fi # $ac_x_includes = no
+
+if test "$ac_x_libraries" = no; then
+  # Check for the libraries.
+  # See if we find them without any special options.
+  # Don't add to $LIBS permanently.
+  ac_save_LIBS=$LIBS
+  LIBS="-lX11 $LIBS"
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <X11/Xlib.h>
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+XrmInitialize ()
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  LIBS=$ac_save_LIBS
+# We can link X programs with no special library path.
+ac_x_libraries=
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	LIBS=$ac_save_LIBS
+for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
+do
+  # Don't even attempt the hair of trying to link an X program!
+  for ac_extension in a so sl dylib la dll; do
+    if test -r "$ac_dir/libX11.$ac_extension"; then
+      ac_x_libraries=$ac_dir
+      break 2
+    fi
+  done
+done
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi # $ac_x_libraries = no
+
+case $ac_x_includes,$ac_x_libraries in #(
+  no,* | *,no | *\'*)
+    # Didn't find X, or a directory has "'" in its name.
+    ac_cv_have_x="have_x=no";; #(
+  *)
+    # Record where we found X for the cache.
+    ac_cv_have_x="have_x=yes\
+	ac_x_includes='$ac_x_includes'\
+	ac_x_libraries='$ac_x_libraries'"
+esac
+fi
+;; #(
+    *) have_x=yes;;
+  esac
+  eval "$ac_cv_have_x"
+fi # $with_x != no
+
+if test "$have_x" != yes; then
+  { $as_echo "$as_me:$LINENO: result: $have_x" >&5
+$as_echo "$have_x" >&6; }
+  no_x=yes
+else
+  # If each of the values was on the command line, it overrides each guess.
+  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
+  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
+  # Update the cache value to reflect the command line values.
+  ac_cv_have_x="have_x=yes\
+	ac_x_includes='$x_includes'\
+	ac_x_libraries='$x_libraries'"
+  { $as_echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
+$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
+fi
+
+if test "$no_x" = yes; then
+  # Not all programs may use this symbol, but it does not hurt to define it.
+
+cat >>confdefs.h <<\_ACEOF
+#define X_DISPLAY_MISSING 1
+_ACEOF
+
+  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
+else
+  if test -n "$x_includes"; then
+    X_CFLAGS="$X_CFLAGS -I$x_includes"
+  fi
+
+  # It would also be nice to do this for all -L options, not just this one.
+  if test -n "$x_libraries"; then
+    X_LIBS="$X_LIBS -L$x_libraries"
+    # For Solaris; some versions of Sun CC require a space after -R and
+    # others require no space.  Words are not sufficient . . . .
+    { $as_echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
+$as_echo_n "checking whether -R must be followed by a space... " >&6; }
+    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
+    ac_xsave_c_werror_flag=$ac_c_werror_flag
+    ac_c_werror_flag=yes
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+       X_LIBS="$X_LIBS -R$x_libraries"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	LIBS="$ac_xsave_LIBS -R $x_libraries"
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+	  X_LIBS="$X_LIBS -R $x_libraries"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ $as_echo "$as_me:$LINENO: result: neither works" >&5
+$as_echo "neither works" >&6; }
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+    ac_c_werror_flag=$ac_xsave_c_werror_flag
+    LIBS=$ac_xsave_LIBS
+  fi
+
+  # Check for system-dependent libraries X programs must link with.
+  # Do this before checking for the system-independent R6 libraries
+  # (-lICE), since we may need -lsocket or whatever for X linking.
+
+  if test "$ISC" = yes; then
+    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
+  else
+    # Martyn Johnson says this is needed for Ultrix, if the X
+    # libraries were built with DECnet support.  And Karl Berry says
+    # the Alpha needs dnet_stub (dnet does not exist).
+    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char XOpenDisplay ();
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+return XOpenDisplay ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
+$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
+if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldnet  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dnet_ntoa ();
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+return dnet_ntoa ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_dnet_dnet_ntoa=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_dnet_dnet_ntoa=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
+$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
+if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
+fi
+
+    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+      { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
+$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
+if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldnet_stub  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dnet_ntoa ();
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+return dnet_ntoa ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_dnet_stub_dnet_ntoa=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_dnet_stub_dnet_ntoa=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
+$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
+if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
+fi
+
+    fi
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+    LIBS="$ac_xsave_LIBS"
+
+    # msh at cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
+    # to get the SysV transport functions.
+    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
+    # needs -lnsl.
+    # The nsl library prevents programs from opening the X display
+    # on Irix 5.2, according to T.E. Dickey.
+    # The functions gethostbyname, getservbyname, and inet_addr are
+    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
+    { $as_echo "$as_me:$LINENO: checking for gethostbyname" >&5
+$as_echo_n "checking for gethostbyname... " >&6; }
+if test "${ac_cv_func_gethostbyname+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define gethostbyname innocuous_gethostbyname
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char gethostbyname (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef gethostbyname
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_gethostbyname || defined __stub___gethostbyname
+choke me
+#endif
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+return gethostbyname ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_func_gethostbyname=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_func_gethostbyname=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
+$as_echo "$ac_cv_func_gethostbyname" >&6; }
+
+    if test $ac_cv_func_gethostbyname = no; then
+      { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
+$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
+if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+return gethostbyname ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_nsl_gethostbyname=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_nsl_gethostbyname=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
+$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
+if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
+fi
+
+      if test $ac_cv_lib_nsl_gethostbyname = no; then
+	{ $as_echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
+$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
+if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbsd  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+return gethostbyname ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_bsd_gethostbyname=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_bsd_gethostbyname=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
+$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
+if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
+fi
+
+      fi
+    fi
+
+    # lieder at skyler.mavd.honeywell.com says without -lsocket,
+    # socket/setsockopt and other routines are undefined under SCO ODT
+    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
+    # on later versions), says Simon Leinen: it contains gethostby*
+    # variants that don't use the name server (or something).  -lsocket
+    # must be given before -lnsl if both are needed.  We assume that
+    # if connect needs -lnsl, so does gethostbyname.
+    { $as_echo "$as_me:$LINENO: checking for connect" >&5
+$as_echo_n "checking for connect... " >&6; }
+if test "${ac_cv_func_connect+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define connect to an innocuous variant, in case <limits.h> declares connect.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define connect innocuous_connect
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char connect (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef connect
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char connect ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_connect || defined __stub___connect
+choke me
+#endif
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+return connect ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_func_connect=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_func_connect=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
+$as_echo "$ac_cv_func_connect" >&6; }
+
+    if test $ac_cv_func_connect = no; then
+      { $as_echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
+$as_echo_n "checking for connect in -lsocket... " >&6; }
+if test "${ac_cv_lib_socket_connect+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char connect ();
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+return connect ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_socket_connect=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_socket_connect=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
+$as_echo "$ac_cv_lib_socket_connect" >&6; }
+if test "x$ac_cv_lib_socket_connect" = x""yes; then
+  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
+fi
+
+    fi
+
+    # Guillermo Gomez says -lposix is necessary on A/UX.
+    { $as_echo "$as_me:$LINENO: checking for remove" >&5
+$as_echo_n "checking for remove... " >&6; }
+if test "${ac_cv_func_remove+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define remove to an innocuous variant, in case <limits.h> declares remove.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define remove innocuous_remove
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char remove (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef remove
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char remove ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_remove || defined __stub___remove
+choke me
+#endif
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+return remove ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_func_remove=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_func_remove=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
+$as_echo "$ac_cv_func_remove" >&6; }
+
+    if test $ac_cv_func_remove = no; then
+      { $as_echo "$as_me:$LINENO: checking for remove in -lposix" >&5
+$as_echo_n "checking for remove in -lposix... " >&6; }
+if test "${ac_cv_lib_posix_remove+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lposix  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char remove ();
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+return remove ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_posix_remove=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_posix_remove=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
+$as_echo "$ac_cv_lib_posix_remove" >&6; }
+if test "x$ac_cv_lib_posix_remove" = x""yes; then
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
+fi
+
+    fi
+
+    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+    { $as_echo "$as_me:$LINENO: checking for shmat" >&5
+$as_echo_n "checking for shmat... " >&6; }
+if test "${ac_cv_func_shmat+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define shmat innocuous_shmat
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shmat (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef shmat
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shmat ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_shmat || defined __stub___shmat
+choke me
+#endif
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+return shmat ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_func_shmat=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_func_shmat=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
+$as_echo "$ac_cv_func_shmat" >&6; }
+
+    if test $ac_cv_func_shmat = no; then
+      { $as_echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
+$as_echo_n "checking for shmat in -lipc... " >&6; }
+if test "${ac_cv_lib_ipc_shmat+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lipc  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shmat ();
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+return shmat ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_ipc_shmat=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_ipc_shmat=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
+$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
+if test "x$ac_cv_lib_ipc_shmat" = x""yes; then
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
+fi
+
+    fi
+  fi
+
+  # Check for libraries that X11R6 Xt/Xaw programs need.
+  ac_save_LDFLAGS=$LDFLAGS
+  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
+  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
+  # check for ICE first), but we must link in the order -lSM -lICE or
+  # we get undefined symbols.  So assume we have SM if we have ICE.
+  # These have to be linked with before -lX11, unlike the other
+  # libraries we check for below, so use a different variable.
+  # John Interrante, Karl Berry
+  { $as_echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
+$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
+if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lICE $X_EXTRA_LIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char IceConnectionNumber ();
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+return IceConnectionNumber ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_ICE_IceConnectionNumber=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_ICE_IceConnectionNumber=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
+$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
+if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then
+  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
+fi
+
+  LDFLAGS=$ac_save_LDFLAGS
+
+fi
+
+   if test "yes" = "$no_x"; then
+      { $as_echo "$as_me:$LINENO: NOTIFICATION: SAMRAI configured without the X11 library" >&5
+$as_echo "$as_me: NOTIFICATION: SAMRAI configured without the X11 library" >&6;}
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_X11 1
+_ACEOF
+
+   else
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_X11 1
+_ACEOF
+
+      if test -n "$x_includes"; then
+         INC_PATH="-I$x_includes $INC_PATH"
+      fi
+      # This is a hack, SAMRAI adds the shared library syntax later
+      X_LIBS=`echo $X_LIBS | sed 's/-R\//-L\//'`
+      x11_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
+
+# Split x11_LIBS into the LIB_PATH part (x11_LIB_PATH) and the LIB_NAME part (x11_LIB_NAME)
+if test -n "${x11_LIBS}"; then
+  for i in ${x11_LIBS}; do
+    case "$i" in
+    -L*) x11_LIB_PATH="${x11_LIB_PATH} $i" ;;
+    *) x11_LIB_NAME="${x11_LIB_NAME} $i" ;;
+    esac
+  done
+fi
+
+      LIB_PATH="$x11_LIB_PATH $LIB_PATH"
+      LIB_NAME="$x11_LIB_NAME $LIB_NAME"
+   fi
+else
+   { $as_echo "$as_me:$LINENO: NOTIFICATION: SAMRAI configured without the X11 library" >&5
+$as_echo "$as_me: NOTIFICATION: SAMRAI configured without the X11 library" >&6;}
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_X11 1
+_ACEOF
+
+fi
+
+
+case $ARCH in
+   IRIX64)
+      if test -z "$enable_vpath"; then
+         enable_vpath=no
+      fi
+      ;;
+   *)
+      if test -z "$enable_vpath"; then
+         enable_vpath=yes
+      fi
+      ;;
+esac
+
+if test "$enable_vpath" = "no"; then
+   SRCDIR_COMPILE_PREFIX="\$(SRCDIR)/"
+else
+   SRCDIR_COMPILE_PREFIX=""
+fi
+
+
+
+
+# Begin CASC_SUPPORT_VALGRIND
+# Defines valgrind_EXE
+
+# Check whether --with-valgrind was given.
+if test "${with_valgrind+set}" = set; then
+  withval=$with_valgrind;
+else
+  with_valgrind=no
+fi
+
+
+case "$with_valgrind" in
+  no)
+    { $as_echo "$as_me:$LINENO: configuring without VALGRIND support" >&5
+$as_echo "$as_me: configuring without VALGRIND support" >&6;}
+    : Do nothing
+  ;;
+  yes)
+    # VALGRIND install path was not specified.
+    # Look in a couple of standard locations to probe if
+    # VALGRIND header files are there.
+    { $as_echo "$as_me:$LINENO: checking for VALGRIND installation" >&5
+$as_echo_n "checking for VALGRIND installation... " >&6; }
+    for dir in /usr /usr/local; do
+      if test -f ${dir}/bin/valgrind; then
+        valgrind_PREFIX=${dir}
+        break
+      fi
+    done
+    { $as_echo "$as_me:$LINENO: result: $valgrind_PREFIX" >&5
+$as_echo "$valgrind_PREFIX" >&6; }
+  ;;
+  *)
+    # VALGRIND install path was specified.
+    { $as_echo "$as_me:$LINENO: checking for VALGRIND installation" >&5
+$as_echo_n "checking for VALGRIND installation... " >&6; }
+    valgrind_PREFIX=$with_valgrind
+    ;;
+esac
+
+if test "${valgrind_PREFIX+set}" = set
+then
+   valgrind_EXE="${valgrind_PREFIX}/bin/valgrind"
+   if test -f ${valgrind_PREFIX}/bin/valgrind; then
+      { $as_echo "$as_me:$LINENO: result: $valgrind_PREFIX" >&5
+$as_echo "$valgrind_PREFIX" >&6; }
+   else
+      { $as_echo "$as_me:$LINENO: result: $valgrind_PREFIX" >&5
+$as_echo "$valgrind_PREFIX" >&6; }
+      { { $as_echo "$as_me:$LINENO: error: VALGRIND not found in $with_valgrind" >&5
+$as_echo "$as_me: error: VALGRIND not found in $with_valgrind" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+fi
+
+# END CASC_SUPPORT_VALGRIND
+
+
+
+
+
+
+
+# Start macro BTNG_ARG_WITH_ENV_WRAPPER with args doxygen and DOXYGEN_BIN
+{ $as_echo "$as_me:$LINENO: checking for doxygen" >&5
+$as_echo_n "checking for doxygen... " >&6; }
+if test "${btng_cv_prog_doxygen+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+# Check whether --with-doxygen was given.
+if test "${with_doxygen+set}" = set; then
+  withval=$with_doxygen;
+fi
+
+# Set DOXYGEN_BIN, using environment setting if available
+#   and if command line is ambiguous.
+case "$with_doxygen" in
+  no)
+    # User explictly turned off doxygen.
+    # Ignore value of DOXYGEN_BIN, even if set in the environment.
+    unset DOXYGEN_BIN
+    ;;
+  yes|'')
+    # Flag unissued or ambiguously issued using --with-doxygen.
+    # Because the user did not explicitly turn if off,
+    # try to set DOXYGEN_BIN.
+    # If environment variable DOXYGEN_BIN is available, use it.
+    # If not, try the user-supplied commands to set it.
+    if test -n "${DOXYGEN_BIN}" ;  then
+      : Nothing to do here actually, because DOXYGEN_BIN is already in the environment.
+    else
+      # Just set the variable to blank and check later.
+DOXYGEN_BIN=
+
+    fi
+    ;;
+  *)
+    # User issued a specific string using --with-doxygen=non-null-string.
+    # so that is used to set DOXYGEN_BIN.
+    DOXYGEN_BIN=$with_doxygen
+    ;;
+esac
+if test "${DOXYGEN_BIN+set}" = set ; then
+  # This block executes the quality check commands, if any, for DOXYGEN_BIN.
+  # if DOXYGEN_BIN is an absolute path, make sure it is executable.
+  if echo "${DOXYGEN_BIN}" | grep '^/' > /dev/null && test ! -x "${DOXYGEN_BIN}"; then
+    { $as_echo "$as_me:$LINENO: WARNING: doxygen program ${DOXYGEN_BIN} is not executable." >&5
+$as_echo "$as_me: WARNING: doxygen program ${DOXYGEN_BIN} is not executable." >&2;}
+  fi
+
+fi
+# Cache the value if it was found.
+if test "${DOXYGEN_BIN+set}" = set ; then
+  btng_cv_prog_doxygen=${DOXYGEN_BIN}
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $btng_cv_prog_doxygen" >&5
+$as_echo "$btng_cv_prog_doxygen" >&6; }
+# Set DOXYGEN_BIN from cache.
+# DOXYGEN_BIN is not yet set if we grabbed it from cache.
+if test "${btng_cv_prog_doxygen+set}" = set ; then
+  DOXYGEN_BIN=$btng_cv_prog_doxygen
+else
+  unset DOXYGEN_BIN
+fi
+# End macro BTNG_ARG_WITH_ENV_WRAPPER with args DOXYGEN_BIN and doxygen
+if test "${DOXYGEN_BIN+set}" = set; then
+  # Extract the first word of "doxygen", so it can be a program name with args.
+set dummy doxygen; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_DOXYGEN_BIN+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $DOXYGEN_BIN in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_DOXYGEN_BIN="$DOXYGEN_BIN" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_DOXYGEN_BIN="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+DOXYGEN_BIN=$ac_cv_path_DOXYGEN_BIN
+if test -n "$DOXYGEN_BIN"; then
+  { $as_echo "$as_me:$LINENO: result: $DOXYGEN_BIN" >&5
+$as_echo "$DOXYGEN_BIN" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+
+
+
+btng_log_vars="DOXYGEN_BIN"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:10760:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+
+
+# Check whether --with-dot-dir was given.
+if test "${with_dot_dir+set}" = set; then
+  withval=$with_dot_dir;
+else
+  unset with_dot_dir
+fi
+
+if   test "${with_dot_dir}" = yes || test ! "${with_dot_dir+set}" = set; then
+  # Find dot path, and use if found
+  DOT_PATH=`which dot >& /dev/null`
+  if test -z "${DOT_PATH}"; then
+    unset DOT_PATH
+    HAVE_DOT=NO
+  else
+    DOT_PATH=`echo $DOT_PATH | sed 's!/[^/]\{1,\}$!!'`
+    HAVE_DOT=YES
+  fi
+elif test "${with_dot_dir}" = no; then
+  # Disable dot.
+  unset DOT_PATH
+  HAVE_DOT=NO
+else
+  # Make sure valid path is specified.  Enable dot.
+  if test ! -d ${with_dot_dir}; then
+     { $as_echo "$as_me:$LINENO: WARNING:
+Invalid path given for dot executable: ${with_dot_dir}.
+Path does not exist.
+You can expect doxygen documentation generation to not work properly.
+" >&5
+$as_echo "$as_me: WARNING:
+Invalid path given for dot executable: ${with_dot_dir}.
+Path does not exist.
+You can expect doxygen documentation generation to not work properly.
+" >&2;};
+  fi
+  DOT_PATH=${with_dot_dir}
+  HAVE_DOT=YES
+fi
+
+
+btng_log_vars="with_dot_dir HAVE_DOT DOT_PATH"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:10815:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+
+
+
+
+# Check whether --with-dox-output-dir was given.
+if test "${with_dox_output_dir+set}" = set; then
+  withval=$with_dox_output_dir;
+fi
+
+if test -n "$with_dox_output_dir"; then
+  if echo "$with_dox_output_dir" | grep -v '^/' ; then
+    { { $as_echo "$as_me:$LINENO: error: You must give a full path with --with-dox-output-dir=DIR" >&5
+$as_echo "$as_me: error: You must give a full path with --with-dox-output-dir=DIR" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+  dox_output_dir="$with_dox_output_dir"
+  # Make sure dox_output_dir ends with / so because the doxygen
+  # configuration files simply append a subdirectory name.
+  dox_output_dir="`echo $dox_output_dir | sed 's:\([^/]\)$:\1/:'`"
+fi
+
+
+
+
+
+# Start macro BTNG_ARG_WITH_ENV_WRAPPER with args perl and SAMRAI_PERL
+{ $as_echo "$as_me:$LINENO: checking for perl" >&5
+$as_echo_n "checking for perl... " >&6; }
+if test "${btng_cv_prog_perl+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+# Check whether --with-perl was given.
+if test "${with_perl+set}" = set; then
+  withval=$with_perl;
+fi
+
+# Set SAMRAI_PERL, using environment setting if available
+#   and if command line is ambiguous.
+case "$with_perl" in
+  no)
+    # User explictly turned off perl.
+    # Ignore value of SAMRAI_PERL, even if set in the environment.
+    unset SAMRAI_PERL
+    ;;
+  yes|'')
+    # Flag unissued or ambiguously issued using --with-perl.
+    # Because the user did not explicitly turn if off,
+    # try to set SAMRAI_PERL.
+    # If environment variable SAMRAI_PERL is available, use it.
+    # If not, try the user-supplied commands to set it.
+    if test -n "${SAMRAI_PERL}" ;  then
+      : Nothing to do here actually, because SAMRAI_PERL is already in the environment.
+    else
+      # Just set the variable to blank and check later.
+SAMRAI_PERL=
+
+    fi
+    ;;
+  *)
+    # User issued a specific string using --with-perl=non-null-string.
+    # so that is used to set SAMRAI_PERL.
+    SAMRAI_PERL=$with_perl
+    ;;
+esac
+if test "${SAMRAI_PERL+set}" = set ; then
+  # This block executes the quality check commands, if any, for SAMRAI_PERL.
+  # if SAMRAI_PERL is an absolute path, make sure it is executable.
+  if echo "${SAMRAI_PERL}" | grep '^/' > /dev/null && test ! -x "${SAMRAI_PERL}"; then
+    { $as_echo "$as_me:$LINENO: WARNING: perl program ${SAMRAI_PERL} is not executable." >&5
+$as_echo "$as_me: WARNING: perl program ${SAMRAI_PERL} is not executable." >&2;}
+  fi
+
+fi
+# Cache the value if it was found.
+if test "${SAMRAI_PERL+set}" = set ; then
+  btng_cv_prog_perl=${SAMRAI_PERL}
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $btng_cv_prog_perl" >&5
+$as_echo "$btng_cv_prog_perl" >&6; }
+# Set SAMRAI_PERL from cache.
+# SAMRAI_PERL is not yet set if we grabbed it from cache.
+if test "${btng_cv_prog_perl+set}" = set ; then
+  SAMRAI_PERL=$btng_cv_prog_perl
+else
+  unset SAMRAI_PERL
+fi
+# End macro BTNG_ARG_WITH_ENV_WRAPPER with args SAMRAI_PERL and perl
+if test "${SAMRAI_PERL+set}" = set; then
+  # Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_SAMRAI_PERL+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $SAMRAI_PERL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_SAMRAI_PERL="$SAMRAI_PERL" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_SAMRAI_PERL="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+SAMRAI_PERL=$ac_cv_path_SAMRAI_PERL
+if test -n "$SAMRAI_PERL"; then
+  { $as_echo "$as_me:$LINENO: result: $SAMRAI_PERL" >&5
+$as_echo "$SAMRAI_PERL" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+
+
+
+btng_log_vars="SAMRAI_PERL"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:10964:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+echo "configure:10969:" begin stringize >&5
+{ $as_echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
+$as_echo_n "checking for preprocessor stringizing operator... " >&6; }
+if test "${ac_cv_c_stringize+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#define x(y) #y
+
+char *s = x(teststring);
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "#teststring" >/dev/null 2>&1; then
+  ac_cv_c_stringize=no
+else
+  ac_cv_c_stringize=yes
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
+$as_echo "$ac_cv_c_stringize" >&6; }
+if test $ac_cv_c_stringize = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRINGIZE 1
+_ACEOF
+
+fi
+
+echo "configure:11004:" end stringize >&5
+
+
+
+# Start macro BTNG_C_RESTRICT
+
+{ $as_echo "$as_me:$LINENO: checking checking whether restrict is broken" >&5
+$as_echo_n "checking checking whether restrict is broken... " >&6; }
+
+if test "${btng_cv_c_restrict_broken+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+struct array_test {
+  double *ptr;
+  int i0;
+  array_test(double *p, int i);
+  double &value(int i) const;
+};
+array_test::array_test(double *p, int i) : ptr(p), i0(i) {}
+double &array_test::value(int i) __restrict__ const {
+  return ptr[i-i0];
+}
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+
+double a[10];
+array_test at(a,20);
+at.value(5) = 5;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  # restrict is not broken.
+    btng_cv_c_restrict_broken=no
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	# restrict is broken.
+    btng_cv_c_restrict_broken=yes
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $btng_cv_c_restrict_broken" >&5
+$as_echo "$btng_cv_c_restrict_broken" >&6; }
+
+if test "$btng_cv_c_restrict_broken" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define RESTRICT_IS_BROKEN 1
+_ACEOF
+
+fi
+
+
+# End macro BTNG_C_RESTRICT
+
+
+
+
+
+# Start macro BTNG_TYPE_NAMESPACE
+
+{ $as_echo "$as_me:$LINENO: checking whether namespace is broken" >&5
+$as_echo_n "checking whether namespace is broken... " >&6; }
+
+if test "${btng_cv_type_namespace_broken+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+namespace test{ int i; }
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+using namespace test;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  # namespace is not broken.
+    btng_cv_type_namespace_broken=no
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	# namespace is broken.
+    btng_cv_type_namespace_broken=yes
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $btng_cv_type_namespace_broken" >&5
+$as_echo "$btng_cv_type_namespace_broken" >&6; }
+
+if test "$btng_cv_type_namespace_broken" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define NAMESPACE_IS_BROKEN 1
+_ACEOF
+
+fi
+
+
+# End macro BTNG_TYPE_NAMESPACE
+
+
+
+
+# Start macro BTNG_TYPE_BOOL
+
+{ $as_echo "$as_me:$LINENO: checking checking whether bool type is broken" >&5
+$as_echo_n "checking checking whether bool type is broken... " >&6; }
+
+if test "${btng_cv_type_bool_broken+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+bool b = true;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  # bool is not broken.
+    btng_cv_type_bool_broken=no
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	# bool is broken.
+    btng_cv_type_bool_broken=yes
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $btng_cv_type_bool_broken" >&5
+$as_echo "$btng_cv_type_bool_broken" >&6; }
+
+if test "$btng_cv_type_bool_broken" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define BOOL_IS_BROKEN 1
+_ACEOF
+
+fi
+
+
+# End macro BTNG_TYPE_BOOL
+
+
+
+# Start macro BTNG_IOSTREAM_HEADER_FILENAME
+
+# Start macro BTNG_TREAT_VARIABLE_HEADER_FILENAME
+if test "${btng_cv_iostream_header_filename+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+# Check whether --with-iostream-header-file was given.
+if test "${with_iostream_header_file+set}" = set; then
+  withval=$with_iostream_header_file; btng_cv_iostream_header_filename=$with_iostream_header_file
+else
+
+# Start macro BTNG_FIND_CORRECT_HEADER_FILENAME
+
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+  btng_cv_iostream_header_filename=
+
+
+  CPPFLAGS_SAVE=$CPPFLAGS
+  for file in iostream iostream.h iostream.hxx; do
+    as_ac_Header=`$as_echo "ac_cv_header_$file" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $file" >&5
+$as_echo_n "checking for $file... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $file usability" >&5
+$as_echo_n "checking $file usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$file>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $file presence" >&5
+$as_echo_n "checking $file presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$file>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: $file: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $file: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $file: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $file: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $file: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $file: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $file:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $file:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $file: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $file: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $file:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $file:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $file: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $file: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $file: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $file: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $file" >&5
+$as_echo_n "checking for $file... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  btng_header_found=1
+else
+  unset btng_header_found
+fi
+
+
+    if test -n "$btng_header_found"; then
+      { $as_echo "$as_me:$LINENO: checking whether $file is the header sought" >&5
+$as_echo_n "checking whether $file is the header sought... " >&6; }
+      echo "configure:11487:" found header file $file >&5
+      CPPFLAGS="$CPPFLAGS_SAVE $CXX_OPTIONS"
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* macro BTNG_FIND_CORRECT_HEADER_FILENAME checking for $file */
+#ifdef BOOL_IS_BROKEN
+typedef int bool;
+#define true 1
+#define false 0
+#endif
+
+        #include <$file>
+#ifndef NAMESPACE_IS_BROKEN
+using namespace std;
+#endif
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+ostream &co=cout; // test ostream declaration
+   istream &ci=cin; // test istream declaration
+   cout<<"test"<<endl; // test extraction operator
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+        btng_cv_iostream_header_filename="$file"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test -n "${btng_cv_iostream_header_filename}"; then break; fi
+  done
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+  CPPFLAGS=$CPPFLAGS_SAVE
+# End macro BTNG_FIND_CORRECT_HEADER_FILENAME
+
+
+fi
+
+
+fi
+	# We must be able to find the iostream header file or else.
+IOSTREAM_HEADER_FILE="$btng_cv_iostream_header_filename"
+if test -z "$IOSTREAM_HEADER_FILE"; then
+  iostream_header_is_broken=1
+  { $as_echo "$as_me:$LINENO: WARNING: cannot find a working iostream header file.
+      Names tried: iostream iostream.h iostream.hxx
+      If you know the correct hame of this header file,
+      use the option --with-iostream-header-file=FILENAME
+      with configure." >&5
+$as_echo "$as_me: WARNING: cannot find a working iostream header file.
+      Names tried: iostream iostream.h iostream.hxx
+      If you know the correct hame of this header file,
+      use the option --with-iostream-header-file=FILENAME
+      with configure." >&2;}
+
+cat >>confdefs.h <<\_ACEOF
+#define IOSTREAM_IS_BROKEN 1
+_ACEOF
+
+  echo "configure:11594:" header file iostream is broken >&5
+else
+  unset iostream_header_is_broken
+
+cat >>confdefs.h <<_ACEOF
+#define IOSTREAM_HEADER_FILE <$IOSTREAM_HEADER_FILE>
+_ACEOF
+
+  echo "configure:11602:" header file iostream is ok >&5
+fi
+# End macro BTNG_TREAT_VARIABLE_HEADER_FILENAME
+
+# End macro BTNG_IOSTREAM_HEADER_FILENAME
+
+
+# Start macro BTNG_IOMANIP_HEADER_FILENAME
+
+
+# Start macro BTNG_TREAT_VARIABLE_HEADER_FILENAME
+if test "${btng_cv_iomanip_header_filename+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+# Check whether --with-iomanip-header-file was given.
+if test "${with_iomanip_header_file+set}" = set; then
+  withval=$with_iomanip_header_file; btng_cv_iomanip_header_filename=$with_iomanip_header_file
+else
+
+# Start macro BTNG_FIND_CORRECT_HEADER_FILENAME
+
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+  btng_cv_iomanip_header_filename=
+
+
+  CPPFLAGS_SAVE=$CPPFLAGS
+  for file in iomanip iomanip.h iomanip.hxx; do
+    as_ac_Header=`$as_echo "ac_cv_header_$file" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $file" >&5
+$as_echo_n "checking for $file... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $file usability" >&5
+$as_echo_n "checking $file usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$file>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $file presence" >&5
+$as_echo_n "checking $file presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$file>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: $file: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $file: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $file: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $file: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $file: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $file: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $file:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $file:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $file: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $file: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $file:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $file:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $file: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $file: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $file: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $file: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $file" >&5
+$as_echo_n "checking for $file... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  btng_header_found=1
+else
+  unset btng_header_found
+fi
+
+
+    if test -n "$btng_header_found"; then
+      { $as_echo "$as_me:$LINENO: checking whether $file is the header sought" >&5
+$as_echo_n "checking whether $file is the header sought... " >&6; }
+      echo "configure:11780:" found header file $file >&5
+      CPPFLAGS="$CPPFLAGS_SAVE $CXX_OPTIONS"
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* macro BTNG_FIND_CORRECT_HEADER_FILENAME checking for $file */
+#ifdef BOOL_IS_BROKEN
+typedef int bool;
+#define true 1
+#define false 0
+#endif
+	#include IOSTREAM_HEADER_FILE
+        #include <$file>
+#ifndef NAMESPACE_IS_BROKEN
+using namespace std;
+#endif
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+cout<<setw(13)<<endl;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+        btng_cv_iomanip_header_filename="$file"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test -n "${btng_cv_iomanip_header_filename}"; then break; fi
+  done
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+  CPPFLAGS=$CPPFLAGS_SAVE
+# End macro BTNG_FIND_CORRECT_HEADER_FILENAME
+
+
+fi
+
+
+fi
+	# We must be able to find the iomanip header file or else.
+IOMANIP_HEADER_FILE="$btng_cv_iomanip_header_filename"
+if test -z "$IOMANIP_HEADER_FILE"; then
+  iomanip_header_is_broken=1
+  { $as_echo "$as_me:$LINENO: WARNING: cannot find a working iomanip header file.
+      Names tried: iomanip iomanip.h iomanip.hxx
+      If you know the correct hame of this header file,
+      use the option --with-iomanip-header-file=FILENAME
+      with configure." >&5
+$as_echo "$as_me: WARNING: cannot find a working iomanip header file.
+      Names tried: iomanip iomanip.h iomanip.hxx
+      If you know the correct hame of this header file,
+      use the option --with-iomanip-header-file=FILENAME
+      with configure." >&2;}
+
+cat >>confdefs.h <<\_ACEOF
+#define IOMANIP_IS_BROKEN 1
+_ACEOF
+
+  echo "configure:11884:" header file iomanip is broken >&5
+else
+  unset iomanip_header_is_broken
+
+cat >>confdefs.h <<_ACEOF
+#define IOMANIP_HEADER_FILE <$IOMANIP_HEADER_FILE>
+_ACEOF
+
+  echo "configure:11892:" header file iomanip is ok >&5
+fi
+# End macro BTNG_TREAT_VARIABLE_HEADER_FILENAME
+
+# End macro BTNG_IOMANIP_HEADER_FILENAME
+
+
+
+# Start macro BTNG_IOSTREAM_HEADER_FILENAME
+
+# Start macro BTNG_TREAT_VARIABLE_HEADER_FILENAME
+if test "${btng_cv_iostream_header_filename+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+# Check whether --with-iostream-header-file was given.
+if test "${with_iostream_header_file+set}" = set; then
+  withval=$with_iostream_header_file; btng_cv_iostream_header_filename=$with_iostream_header_file
+else
+
+# Start macro BTNG_FIND_CORRECT_HEADER_FILENAME
+
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+  btng_cv_iostream_header_filename=
+
+
+  CPPFLAGS_SAVE=$CPPFLAGS
+  for file in iostream iostream.h iostream.hxx; do
+    as_ac_Header=`$as_echo "ac_cv_header_$file" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $file" >&5
+$as_echo_n "checking for $file... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $file usability" >&5
+$as_echo_n "checking $file usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$file>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $file presence" >&5
+$as_echo_n "checking $file presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$file>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: $file: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $file: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $file: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $file: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $file: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $file: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $file:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $file:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $file: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $file: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $file:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $file:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $file: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $file: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $file: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $file: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $file" >&5
+$as_echo_n "checking for $file... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  btng_header_found=1
+else
+  unset btng_header_found
+fi
+
+
+    if test -n "$btng_header_found"; then
+      { $as_echo "$as_me:$LINENO: checking whether $file is the header sought" >&5
+$as_echo_n "checking whether $file is the header sought... " >&6; }
+      echo "configure:12070:" found header file $file >&5
+      CPPFLAGS="$CPPFLAGS_SAVE $CXX_OPTIONS"
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* macro BTNG_FIND_CORRECT_HEADER_FILENAME checking for $file */
+#ifdef BOOL_IS_BROKEN
+typedef int bool;
+#define true 1
+#define false 0
+#endif
+
+        #include <$file>
+#ifndef NAMESPACE_IS_BROKEN
+using namespace std;
+#endif
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+ostream &co=cout; // test ostream declaration
+   istream &ci=cin; // test istream declaration
+   cout<<"test"<<endl; // test extraction operator
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+        btng_cv_iostream_header_filename="$file"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test -n "${btng_cv_iostream_header_filename}"; then break; fi
+  done
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+  CPPFLAGS=$CPPFLAGS_SAVE
+# End macro BTNG_FIND_CORRECT_HEADER_FILENAME
+
+
+fi
+
+
+fi
+	# We must be able to find the iostream header file or else.
+IOSTREAM_HEADER_FILE="$btng_cv_iostream_header_filename"
+if test -z "$IOSTREAM_HEADER_FILE"; then
+  iostream_header_is_broken=1
+  { $as_echo "$as_me:$LINENO: WARNING: cannot find a working iostream header file.
+      Names tried: iostream iostream.h iostream.hxx
+      If you know the correct hame of this header file,
+      use the option --with-iostream-header-file=FILENAME
+      with configure." >&5
+$as_echo "$as_me: WARNING: cannot find a working iostream header file.
+      Names tried: iostream iostream.h iostream.hxx
+      If you know the correct hame of this header file,
+      use the option --with-iostream-header-file=FILENAME
+      with configure." >&2;}
+
+cat >>confdefs.h <<\_ACEOF
+#define IOSTREAM_IS_BROKEN 1
+_ACEOF
+
+  echo "configure:12177:" header file iostream is broken >&5
+else
+  unset iostream_header_is_broken
+
+cat >>confdefs.h <<_ACEOF
+#define IOSTREAM_HEADER_FILE <$IOSTREAM_HEADER_FILE>
+_ACEOF
+
+  echo "configure:12185:" header file iostream is ok >&5
+fi
+# End macro BTNG_TREAT_VARIABLE_HEADER_FILENAME
+
+# End macro BTNG_IOSTREAM_HEADER_FILENAME
+
+
+
+# Start macro BTNG_STL_SSTREAM_HEADER_FILENAME
+btng_stl_sstream_test_body='/* New syntax */ istringstream ist("a string");'
+test "$CXX_ID" = "sunpro" && echo "$CXX_VERSION" | grep '^0x420' > /dev/null && \
+btng_stl_sstream_test_body='/* Old syntax */ char i[10]; istrstream ist(i);'
+test "$CXX_ID" = "gnu" && echo "$CXX_VERSION" | grep '^2.95.2' > /dev/null && \
+btng_stl_sstream_test_body='/* Old syntax */ char i[10]; istrstream ist(i);'
+
+# Start macro BTNG_TREAT_VARIABLE_HEADER_FILENAME
+if test "${btng_cv_stl_sstream_header_filename+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+# Check whether --with-stl-sstream-header-file was given.
+if test "${with_stl_sstream_header_file+set}" = set; then
+  withval=$with_stl_sstream_header_file; btng_cv_stl_sstream_header_filename=$with_stl_sstream_header_file
+else
+
+# Start macro BTNG_FIND_CORRECT_HEADER_FILENAME
+
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+  btng_cv_stl_sstream_header_filename=
+
+
+  CPPFLAGS_SAVE=$CPPFLAGS
+  for file in sstream stringstream strstream sstream.h stringstream.h strstream.h sstream.hxx stringstream.hxx strstream.hxx ; do
+    as_ac_Header=`$as_echo "ac_cv_header_$file" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $file" >&5
+$as_echo_n "checking for $file... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $file usability" >&5
+$as_echo_n "checking $file usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$file>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $file presence" >&5
+$as_echo_n "checking $file presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$file>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: $file: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $file: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $file: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $file: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $file: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $file: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $file:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $file:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $file: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $file: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $file:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $file:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $file: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $file: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $file: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $file: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $file" >&5
+$as_echo_n "checking for $file... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  btng_header_found=1
+else
+  unset btng_header_found
+fi
+
+
+    if test -n "$btng_header_found"; then
+      { $as_echo "$as_me:$LINENO: checking whether $file is the header sought" >&5
+$as_echo_n "checking whether $file is the header sought... " >&6; }
+      echo "configure:12368:" found header file $file >&5
+      CPPFLAGS="$CPPFLAGS_SAVE $CXX_OPTIONS"
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* macro BTNG_FIND_CORRECT_HEADER_FILENAME checking for $file */
+#ifdef BOOL_IS_BROKEN
+typedef int bool;
+#define true 1
+#define false 0
+#endif
+
+        #include <$file>
+#ifndef NAMESPACE_IS_BROKEN
+using namespace std;
+#endif
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+$btng_stl_sstream_test_body
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+        btng_cv_stl_sstream_header_filename="$file"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test -n "${btng_cv_stl_sstream_header_filename}"; then break; fi
+  done
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+  CPPFLAGS=$CPPFLAGS_SAVE
+# End macro BTNG_FIND_CORRECT_HEADER_FILENAME
+
+
+fi
+
+
+fi
+	# We must be able to find the stl-sstream header file or else.
+STL_SSTREAM_HEADER_FILE="$btng_cv_stl_sstream_header_filename"
+if test -z "$STL_SSTREAM_HEADER_FILE"; then
+  stl_sstream_header_is_broken=1
+  { $as_echo "$as_me:$LINENO: WARNING: cannot find a working stl-sstream header file.
+      Names tried: sstream stringstream strstream sstream.h stringstream.h strstream.h sstream.hxx stringstream.hxx strstream.hxx
+      If you know the correct hame of this header file,
+      use the option --with-stl-sstream-header-file=FILENAME
+      with configure." >&5
+$as_echo "$as_me: WARNING: cannot find a working stl-sstream header file.
+      Names tried: sstream stringstream strstream sstream.h stringstream.h strstream.h sstream.hxx stringstream.hxx strstream.hxx
+      If you know the correct hame of this header file,
+      use the option --with-stl-sstream-header-file=FILENAME
+      with configure." >&2;}
+
+cat >>confdefs.h <<\_ACEOF
+#define STL_SSTREAM_IS_BROKEN 1
+_ACEOF
+
+  echo "configure:12472:" header file stl-sstream is broken >&5
+else
+  unset stl_sstream_header_is_broken
+
+cat >>confdefs.h <<_ACEOF
+#define STL_SSTREAM_HEADER_FILE <$STL_SSTREAM_HEADER_FILE>
+_ACEOF
+
+  echo "configure:12480:" header file stl-sstream is ok >&5
+fi
+# End macro BTNG_TREAT_VARIABLE_HEADER_FILENAME
+
+# End macro BTNG_STL_SSTREAM_HEADER_FILENAME
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+
+# Start macro BTNG_TYPE_NAMESPACE
+
+{ $as_echo "$as_me:$LINENO: checking whether namespace is broken" >&5
+$as_echo_n "checking whether namespace is broken... " >&6; }
+
+if test "${btng_cv_type_namespace_broken+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+namespace test{ int i; }
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+using namespace test;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  # namespace is not broken.
+    btng_cv_type_namespace_broken=no
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	# namespace is broken.
+    btng_cv_type_namespace_broken=yes
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $btng_cv_type_namespace_broken" >&5
+$as_echo "$btng_cv_type_namespace_broken" >&6; }
+
+if test "$btng_cv_type_namespace_broken" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define NAMESPACE_IS_BROKEN 1
+_ACEOF
+
+fi
+
+
+# End macro BTNG_TYPE_NAMESPACE
+
+
+{ $as_echo "$as_me:$LINENO: checking type ostringstream" >&5
+$as_echo_n "checking type ostringstream... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include STL_SSTREAM_HEADER_FILE
+#ifndef NAMESPACE_IS_BROKEN
+using namespace std;
+#endif
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+ostringstream oss; oss << 10;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { $as_echo "$as_me:$LINENO: result: ok" >&5
+$as_echo "ok" >&6; }
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ $as_echo "$as_me:$LINENO: result: broken" >&5
+$as_echo "broken" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define OSTRINGSTREAM_TYPE_IS_BROKEN 1
+_ACEOF
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: checking type ostrstream" >&5
+$as_echo_n "checking type ostrstream... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include STL_SSTREAM_HEADER_FILE
+#ifndef NAMESPACE_IS_BROKEN
+using namespace std;
+#endif
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+ostrstream oss; oss << 10;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { $as_echo "$as_me:$LINENO: result: ok" >&5
+$as_echo "ok" >&6; }
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ $as_echo "$as_me:$LINENO: result: broken" >&5
+$as_echo "broken" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define OSTRSTREAM_TYPE_IS_BROKEN 1
+_ACEOF
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+if test "${ac_cv_header_malloc_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for malloc.h" >&5
+$as_echo_n "checking for malloc.h... " >&6; }
+if test "${ac_cv_header_malloc_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_malloc_h" >&5
+$as_echo "$ac_cv_header_malloc_h" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking malloc.h usability" >&5
+$as_echo_n "checking malloc.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <malloc.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking malloc.h presence" >&5
+$as_echo_n "checking malloc.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <malloc.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: malloc.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: malloc.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: malloc.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: malloc.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: malloc.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: malloc.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: malloc.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: malloc.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: malloc.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: malloc.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: malloc.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: malloc.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: malloc.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: malloc.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for malloc.h" >&5
+$as_echo_n "checking for malloc.h... " >&6; }
+if test "${ac_cv_header_malloc_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_malloc_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_malloc_h" >&5
+$as_echo "$ac_cv_header_malloc_h" >&6; }
+
+fi
+if test "x$ac_cv_header_malloc_h" = x""yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MALLOC_H 1
+_ACEOF
+
+
+fi
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for mallinfo" >&5
+$as_echo_n "checking for mallinfo... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <malloc.h>
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+void *x=mallinfo
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MALLINFO 1
+_ACEOF
+
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+
+   { $as_echo "$as_me:$LINENO: checking checking for isnan in cmath" >&5
+$as_echo_n "checking checking for isnan in cmath... " >&6; }
+
+
+   ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+ #include <cmath>
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+ int test = std::isnan(0.0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  casc_cv_cxx_have_isnan=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	casc_cv_cxx_have_isnan=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+   { $as_echo "$as_me:$LINENO: result: $casc_cv_cxx_have_isnan" >&5
+$as_echo "$casc_cv_cxx_have_isnan" >&6; }
+
+   if test "$casc_cv_cxx_have_isnan" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CMATH_ISNAN 1
+_ACEOF
+
+   else
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_CMATH_ISNAN 1
+_ACEOF
+
+
+      { $as_echo "$as_me:$LINENO: checking checking for isnan in math.h" >&5
+$as_echo_n "checking checking for isnan in math.h... " >&6; }
+
+
+      ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <math.h>
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+int test = isnan(0.0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  casc_cv_cxx_have_isnan=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	casc_cv_cxx_have_isnan=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+      { $as_echo "$as_me:$LINENO: result: $casc_cv_cxx_have_isnan" >&5
+$as_echo "$casc_cv_cxx_have_isnan" >&6; }
+
+      if test "$casc_cv_cxx_have_isnan" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISNAN 1
+_ACEOF
+
+      else
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_ISNAN 1
+_ACEOF
+
+
+         { $as_echo "$as_me:$LINENO: checking checking for __isnand" >&5
+$as_echo_n "checking checking for __isnand... " >&6; }
+
+
+         ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+         cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <math.h>
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+int test = __isnand(0.0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  casc_cv_cxx_have_isnand=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	casc_cv_cxx_have_isnand=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+         ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+         { $as_echo "$as_me:$LINENO: result: $casc_cv_cxx_have_isnand" >&5
+$as_echo "$casc_cv_cxx_have_isnand" >&6; }
+         if test "$casc_cv_cxx_have_isnand" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISNAND 1
+_ACEOF
+
+         else
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_ISNAND 1
+_ACEOF
+
+
+            { $as_echo "$as_me:$LINENO: checking checking for __inline_isnand" >&5
+$as_echo_n "checking checking for __inline_isnand... " >&6; }
+
+
+            ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+            cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <math.h>
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+int test = __inline_isnand(0.0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  casc_cv_cxx_have_inline_isnan=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	casc_cv_cxx_have_inline_isnan=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+              ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+            { $as_echo "$as_me:$LINENO: result: $casc_cv_cxx_have_inline_isnan" >&5
+$as_echo "$casc_cv_cxx_have_inline_isnan" >&6; }
+            if test "$casc_cv_cxx_have_inline_isnan" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INLINE_ISNAND 1
+_ACEOF
+
+            else
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_INLINE_ISNAND 1
+_ACEOF
+
+           fi
+	fi
+      fi
+   fi
+
+
+
+
+# Begin macro BTNG_SUPPORT_DL
+
+
+# Start macro BTNG_ARG_WITH_ENV_WRAPPER with args dl and dl_PREFIX
+{ $as_echo "$as_me:$LINENO: checking for dl" >&5
+$as_echo_n "checking for dl... " >&6; }
+if test "${btng_cv_prog_dl+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+# Check whether --with-dl was given.
+if test "${with_dl+set}" = set; then
+  withval=$with_dl;
+fi
+
+# Set dl_PREFIX, using environment setting if available
+#   and if command line is ambiguous.
+case "$with_dl" in
+  no)
+    # User explictly turned off dl.
+    # Ignore value of dl_PREFIX, even if set in the environment.
+    unset dl_PREFIX
+    ;;
+  yes|'')
+    # Flag unissued or ambiguously issued using --with-dl.
+    # Because the user did not explicitly turn if off,
+    # try to set dl_PREFIX.
+    # If environment variable dl_PREFIX is available, use it.
+    # If not, try the user-supplied commands to set it.
+    if test -n "${dl_PREFIX}" ;  then
+      : Nothing to do here actually, because dl_PREFIX is already in the environment.
+    else
+      dl_PREFIX=
+    fi
+    ;;
+  *)
+    # User issued a specific string using --with-dl=non-null-string.
+    # so that is used to set dl_PREFIX.
+    dl_PREFIX=$with_dl
+    ;;
+esac
+if test "${dl_PREFIX+set}" = set ; then
+  # This block executes the quality check commands, if any, for dl_PREFIX.
+  :
+fi
+# Cache the value if it was found.
+if test "${dl_PREFIX+set}" = set ; then
+  btng_cv_prog_dl=${dl_PREFIX}
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $btng_cv_prog_dl" >&5
+$as_echo "$btng_cv_prog_dl" >&6; }
+# Set dl_PREFIX from cache.
+# dl_PREFIX is not yet set if we grabbed it from cache.
+if test "${btng_cv_prog_dl+set}" = set ; then
+  dl_PREFIX=$btng_cv_prog_dl
+else
+  unset dl_PREFIX
+fi
+# End macro BTNG_ARG_WITH_ENV_WRAPPER with args dl_PREFIX and dl
+
+
+
+# Start macro BTNG_ARG_WITH_PREFIX
+
+# Start macro BTNG_ARG_WITH_ENV_WRAPPER with args dl-includes and dl_INCLUDES
+{ $as_echo "$as_me:$LINENO: checking for dl-includes" >&5
+$as_echo_n "checking for dl-includes... " >&6; }
+if test "${btng_cv_prog_dl_includes+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+# Check whether --with-dl-includes was given.
+if test "${with_dl_includes+set}" = set; then
+  withval=$with_dl_includes;
+fi
+
+# Set dl_INCLUDES, using environment setting if available
+#   and if command line is ambiguous.
+case "$with_dl_includes" in
+  no)
+    # User explictly turned off dl-includes.
+    # Ignore value of dl_INCLUDES, even if set in the environment.
+    unset dl_INCLUDES
+    ;;
+  yes|'')
+    # Flag unissued or ambiguously issued using --with-dl-includes.
+    # Because the user did not explicitly turn if off,
+    # try to set dl_INCLUDES.
+    # If environment variable dl_INCLUDES is available, use it.
+    # If not, try the user-supplied commands to set it.
+    if test -n "${dl_INCLUDES}" ;  then
+      : Nothing to do here actually, because dl_INCLUDES is already in the environment.
+    else
+      if test "${with_dl_includes}" = yes ; then
+  { { $as_echo "$as_me:$LINENO: error: If you specify --with-dl-includes, you must give it the path as in --with-dl-includes=/installation/path" >&5
+$as_echo "$as_me: error: If you specify --with-dl-includes, you must give it the path as in --with-dl-includes=/installation/path" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+echo "configure:13367:" environment dl_INCLUDES not defined >&5
+
+
+    fi
+    ;;
+  *)
+    # User issued a specific string using --with-dl-includes=non-null-string.
+    # so that is used to set dl_INCLUDES.
+    dl_INCLUDES=$with_dl_includes
+    ;;
+esac
+if test "${dl_INCLUDES+set}" = set ; then
+  # This block executes the quality check commands, if any, for dl_INCLUDES.
+  :
+fi
+# Cache the value if it was found.
+if test "${dl_INCLUDES+set}" = set ; then
+  btng_cv_prog_dl_includes=${dl_INCLUDES}
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $btng_cv_prog_dl_includes" >&5
+$as_echo "$btng_cv_prog_dl_includes" >&6; }
+# Set dl_INCLUDES from cache.
+# dl_INCLUDES is not yet set if we grabbed it from cache.
+if test "${btng_cv_prog_dl_includes+set}" = set ; then
+  dl_INCLUDES=$btng_cv_prog_dl_includes
+else
+  unset dl_INCLUDES
+fi
+# End macro BTNG_ARG_WITH_ENV_WRAPPER with args dl_INCLUDES and dl-includes
+# End macro BTNG_ARG_WITH_PREFIX
+
+
+# Start macro BTNG_ARG_WITH_PREFIX
+
+# Start macro BTNG_ARG_WITH_ENV_WRAPPER with args dl-libs and dl_LIBS
+{ $as_echo "$as_me:$LINENO: checking for dl-libs" >&5
+$as_echo_n "checking for dl-libs... " >&6; }
+if test "${btng_cv_prog_dl_libs+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+# Check whether --with-dl-libs was given.
+if test "${with_dl_libs+set}" = set; then
+  withval=$with_dl_libs;
+fi
+
+# Set dl_LIBS, using environment setting if available
+#   and if command line is ambiguous.
+case "$with_dl_libs" in
+  no)
+    # User explictly turned off dl-libs.
+    # Ignore value of dl_LIBS, even if set in the environment.
+    unset dl_LIBS
+    ;;
+  yes|'')
+    # Flag unissued or ambiguously issued using --with-dl-libs.
+    # Because the user did not explicitly turn if off,
+    # try to set dl_LIBS.
+    # If environment variable dl_LIBS is available, use it.
+    # If not, try the user-supplied commands to set it.
+    if test -n "${dl_LIBS}" ;  then
+      : Nothing to do here actually, because dl_LIBS is already in the environment.
+    else
+      if test "${with_dl_libs}" = yes ; then
+  { { $as_echo "$as_me:$LINENO: error: If you specify --with-dl-libs, you must give it the path as in --with-dl-libs=/installation/path" >&5
+$as_echo "$as_me: error: If you specify --with-dl-libs, you must give it the path as in --with-dl-libs=/installation/path" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+echo "configure:13438:" environment dl_LIBS not defined >&5
+
+
+    fi
+    ;;
+  *)
+    # User issued a specific string using --with-dl-libs=non-null-string.
+    # so that is used to set dl_LIBS.
+    dl_LIBS=$with_dl_libs
+    ;;
+esac
+if test "${dl_LIBS+set}" = set ; then
+  # This block executes the quality check commands, if any, for dl_LIBS.
+  :
+fi
+# Cache the value if it was found.
+if test "${dl_LIBS+set}" = set ; then
+  btng_cv_prog_dl_libs=${dl_LIBS}
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $btng_cv_prog_dl_libs" >&5
+$as_echo "$btng_cv_prog_dl_libs" >&6; }
+# Set dl_LIBS from cache.
+# dl_LIBS is not yet set if we grabbed it from cache.
+if test "${btng_cv_prog_dl_libs+set}" = set ; then
+  dl_LIBS=$btng_cv_prog_dl_libs
+else
+  unset dl_LIBS
+fi
+# End macro BTNG_ARG_WITH_ENV_WRAPPER with args dl_LIBS and dl-libs
+# End macro BTNG_ARG_WITH_PREFIX
+
+
+# Begin macro BTNG_VAR_SET_DL
+if test "${dl_PREFIX+set}" = set ; then
+  # Modify the output INCLUDES variable, if it is not set.
+  if test ! "${dl_INCLUDES+set}" = set ; then
+    test -n "${dl_PREFIX}" && dl_INCLUDES="-I${dl_PREFIX}/include"
+  fi
+  # Modify the output LIBS variable, if it is not set.
+  if test ! "${dl_LIBS+set}" = set ; then
+    # Save LIBS for later recovery.
+    btng_save_LIBS="$LIBS";
+    # Extra libraries, if any, required by this check.
+    btng_extra_libs="$libz_LIBS -lm"
+    # If path is given, add path to extra flag for library search.
+    test -n "${dl_PREFIX}" && btng_extra_libs="-L${dl_PREFIX}/lib $btng_extra_libs"
+    # Look for library.
+    { $as_echo "$as_me:$LINENO: checking for library containing dlopen" >&5
+$as_echo_n "checking for library containing dlopen... " >&6; }
+if test "${ac_cv_search_dlopen+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' dl; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib $btng_extra_libs $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_dlopen=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_dlopen+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_dlopen+set}" = set; then
+  :
+else
+  ac_cv_search_dlopen=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
+$as_echo "$ac_cv_search_dlopen" >&6; }
+ac_res=$ac_cv_search_dlopen
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+
+
+btng_log_vars="LIBS"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:13590:" "After finding dl flag: $btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+      # Action if found ...
+      # Extract modifications to LIB into library-specific LIBS variable.
+      dl_LIBS=`echo " $LIBS" | sed "s! $btng_save_LIBS!!"`;
+      test -n "${dl_PREFIX}" && dl_LIBS="-L${dl_PREFIX}/lib ${dl_LIBS}"
+
+
+btng_log_vars="dl_LIBS"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:13608:" "Found dl library flag: $btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+else
+
+      # Action if NOT found ...
+
+
+btng_log_vars="dl_LIBS"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:13626:" "Did not find dl library flag: $btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+fi
+
+    LIBS="$btng_save_LIBS";	# Restore global-use variable.
+    unset btng_extra_libs
+    unset btng_save_LIBS
+  else
+    echo "configure:13637:" Not looking for dl because dl_LIBS is already set >&5
+  fi
+fi
+# End macro BTNG_VAR_SET_DL
+
+# End macro BTNG_SUPPORT_DL
+
+if test "${dl_PREFIX+set}" = set; then
+  if echo $target_os | grep '^linux' > /dev/null \
+    && test ! "${dl_LIBS+set}" = set; then
+    { $as_echo "$as_me:$LINENO: WARNING:
+	The Linux dynamic loading library is not found.
+	This may cause problems with some libraries that use it.
+	In particular, we have seen that PETSc may use this library.
+    " >&5
+$as_echo "$as_me: WARNING:
+	The Linux dynamic loading library is not found.
+	This may cause problems with some libraries that use it.
+	In particular, we have seen that PETSc may use this library.
+    " >&2;}
+  fi
+  if test "${dl_LIBS}"; then
+    LIBS="$dl_LIBS $LIBS"
+
+# Split dl_LIBS into the LIB_PATH part (dl_LIB_PATH) and the LIB_NAME part (dl_LIB_NAME)
+if test -n "${dl_LIBS}"; then
+  for i in ${dl_LIBS}; do
+    case "$i" in
+    -L*) dl_LIB_PATH="${dl_LIB_PATH} $i" ;;
+    *) dl_LIB_NAME="${dl_LIB_NAME} $i" ;;
+    esac
+  done
+fi
+
+    LIB_PATH="$dl_LIB_PATH $LIB_PATH"
+    LIB_NAME="$dl_LIB_NAME $LIB_NAME"
+    INC_PATH="$dl_INCLUDES $INC_PATH"
+  fi
+fi
+
+
+
+ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+{ $as_echo "$as_me:$LINENO: checking how to get verbose linking output from $F77" >&5
+$as_echo_n "checking how to get verbose linking output from $F77... " >&6; }
+if test "${ac_cv_prog_f77_v+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_f77_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_f77_v=
+# Try some options frequently used verbose output
+for ac_verb in -v -verbose --verbose -V -\#\#\#; do
+  cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+
+# Compile and link our simple test program by passing a flag (argument
+# 1 to this macro) to the Fortran compiler in order to get
+# "verbose" output that we can then parse for the Fortran linker
+# flags.
+ac_save_FFLAGS=$FFLAGS
+FFLAGS="$FFLAGS $ac_verb"
+eval "set x $ac_link"
+shift
+$as_echo "$as_me:$LINENO: $*" >&5
+# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH,
+# LIBRARY_PATH; skip all such settings.
+ac_f77_v_output=`eval $ac_link 5>&1 2>&1 |
+  grep -v 'Driving:' | grep -v "^[_$as_cr_Letters][_$as_cr_alnum]*="`
+$as_echo "$ac_f77_v_output" >&5
+FFLAGS=$ac_save_FFLAGS
+
+rm -rf conftest*
+
+# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where
+# /foo, /bar, and /baz are search directories for the Fortran linker.
+# Here, we change these into -L/foo -L/bar -L/baz (and put it first):
+ac_f77_v_output="`echo $ac_f77_v_output |
+	grep 'LPATH is:' |
+	sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_f77_v_output"
+
+# FIXME: we keep getting bitten by quoted arguments; a more general fix
+#        that detects unbalanced quotes in FLIBS should be implemented
+#        and (ugh) tested at some point.
+case $ac_f77_v_output in
+  # If we are using xlf then replace all the commas with spaces.
+  *xlfentry*)
+    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/,/ /g'` ;;
+
+  # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted
+  # $LIBS confuse us, and the libraries appear later in the output anyway).
+  *mGLOB_options_string*)
+    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;;
+
+  # Portland Group compiler has singly- or doubly-quoted -cmdline argument
+  # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4.
+  # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2".
+  *-cmdline\ * | *-ignore\ * | *-def\ *)
+    ac_f77_v_output=`echo $ac_f77_v_output | sed "\
+        s/-cmdline  *'[^']*'/ /g; s/-cmdline  *\"[^\"]*\"/ /g
+        s/-ignore  *'[^']*'/ /g; s/-ignore  *\"[^\"]*\"/ /g
+        s/-def  *'[^']*'/ /g; s/-def  *\"[^\"]*\"/ /g"` ;;
+
+  # If we are using Cray Fortran then delete quotes.
+  *cft90*)
+    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"//g'` ;;
+esac
+
+
+  # look for -l* and *.a constructs in the output
+  for ac_arg in $ac_f77_v_output; do
+     case $ac_arg in
+        [\\/]*.a | ?:[\\/]*.a | -[lLRu]*)
+          ac_cv_prog_f77_v=$ac_verb
+          break 2 ;;
+     esac
+  done
+done
+if test -z "$ac_cv_prog_f77_v"; then
+   { $as_echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $F77" >&5
+$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;}
+fi
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ $as_echo "$as_me:$LINENO: WARNING: compilation failed" >&5
+$as_echo "$as_me: WARNING: compilation failed" >&2;}
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_f77_v" >&5
+$as_echo "$ac_cv_prog_f77_v" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for Fortran 77 libraries of $F77" >&5
+$as_echo_n "checking for Fortran 77 libraries of $F77... " >&6; }
+if test "${ac_cv_f77_libs+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$FLIBS" != "x"; then
+  ac_cv_f77_libs="$FLIBS" # Let the user override the test.
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+
+# Compile and link our simple test program by passing a flag (argument
+# 1 to this macro) to the Fortran compiler in order to get
+# "verbose" output that we can then parse for the Fortran linker
+# flags.
+ac_save_FFLAGS=$FFLAGS
+FFLAGS="$FFLAGS $ac_cv_prog_f77_v"
+eval "set x $ac_link"
+shift
+$as_echo "$as_me:$LINENO: $*" >&5
+# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH,
+# LIBRARY_PATH; skip all such settings.
+ac_f77_v_output=`eval $ac_link 5>&1 2>&1 |
+  grep -v 'Driving:' | grep -v "^[_$as_cr_Letters][_$as_cr_alnum]*="`
+$as_echo "$ac_f77_v_output" >&5
+FFLAGS=$ac_save_FFLAGS
+
+rm -rf conftest*
+
+# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where
+# /foo, /bar, and /baz are search directories for the Fortran linker.
+# Here, we change these into -L/foo -L/bar -L/baz (and put it first):
+ac_f77_v_output="`echo $ac_f77_v_output |
+	grep 'LPATH is:' |
+	sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_f77_v_output"
+
+# FIXME: we keep getting bitten by quoted arguments; a more general fix
+#        that detects unbalanced quotes in FLIBS should be implemented
+#        and (ugh) tested at some point.
+case $ac_f77_v_output in
+  # If we are using xlf then replace all the commas with spaces.
+  *xlfentry*)
+    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/,/ /g'` ;;
+
+  # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted
+  # $LIBS confuse us, and the libraries appear later in the output anyway).
+  *mGLOB_options_string*)
+    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;;
+
+  # Portland Group compiler has singly- or doubly-quoted -cmdline argument
+  # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4.
+  # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2".
+  *-cmdline\ * | *-ignore\ * | *-def\ *)
+    ac_f77_v_output=`echo $ac_f77_v_output | sed "\
+        s/-cmdline  *'[^']*'/ /g; s/-cmdline  *\"[^\"]*\"/ /g
+        s/-ignore  *'[^']*'/ /g; s/-ignore  *\"[^\"]*\"/ /g
+        s/-def  *'[^']*'/ /g; s/-def  *\"[^\"]*\"/ /g"` ;;
+
+  # If we are using Cray Fortran then delete quotes.
+  *cft90*)
+    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"//g'` ;;
+esac
+
+
+
+ac_cv_f77_libs=
+
+# Save positional arguments (if any)
+ac_save_positional="$@"
+
+set X $ac_f77_v_output
+while test $# != 1; do
+  shift
+  ac_arg=$1
+  case $ac_arg in
+        [\\/]*.a | ?:[\\/]*.a)
+            ac_exists=false
+  for ac_i in $ac_cv_f77_libs; do
+    if test x"$ac_arg" = x"$ac_i"; then
+      ac_exists=true
+      break
+    fi
+  done
+
+  if test x"$ac_exists" = xtrue; then
+  :
+else
+  ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
+fi
+
+          ;;
+        -bI:*)
+            ac_exists=false
+  for ac_i in $ac_cv_f77_libs; do
+    if test x"$ac_arg" = x"$ac_i"; then
+      ac_exists=true
+      break
+    fi
+  done
+
+  if test x"$ac_exists" = xtrue; then
+  :
+else
+  if test "$ac_compiler_gnu" = yes; then
+  for ac_link_opt in $ac_arg; do
+    ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt"
+  done
+else
+  ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
+fi
+fi
+
+          ;;
+          # Ignore these flags.
+        -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -LANG:=* | -LIST:* | -LNO:*)
+          ;;
+        -lkernel32)
+          test x"$CYGWIN" != xyes && ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
+          ;;
+        -[LRuYz])
+          # These flags, when seen by themselves, take an argument.
+          # We remove the space between option and argument and re-iterate
+          # unless we find an empty arg or a new option (starting with -)
+	  case $2 in
+	     "" | -*);;
+	     *)
+		ac_arg="$ac_arg$2"
+		shift; shift
+		set X $ac_arg "$@"
+		;;
+	  esac
+          ;;
+        -YP,*)
+          for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do
+              ac_exists=false
+  for ac_i in $ac_cv_f77_libs; do
+    if test x"$ac_j" = x"$ac_i"; then
+      ac_exists=true
+      break
+    fi
+  done
+
+  if test x"$ac_exists" = xtrue; then
+  :
+else
+  ac_arg="$ac_arg $ac_j"
+                               ac_cv_f77_libs="$ac_cv_f77_libs $ac_j"
+fi
+
+          done
+          ;;
+        -[lLR]*)
+            ac_exists=false
+  for ac_i in $ac_cv_f77_libs; do
+    if test x"$ac_arg" = x"$ac_i"; then
+      ac_exists=true
+      break
+    fi
+  done
+
+  if test x"$ac_exists" = xtrue; then
+  :
+else
+  ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
+fi
+
+          ;;
+	-zallextract*| -zdefaultextract)
+	  ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
+	  ;;
+          # Ignore everything else.
+  esac
+done
+# restore positional arguments
+set X $ac_save_positional; shift
+
+# We only consider "LD_RUN_PATH" on Solaris systems.  If this is seen,
+# then we insist that the "run path" must be an absolute path (i.e. it
+# must begin with a "/").
+case `(uname -sr) 2>/dev/null` in
+   "SunOS 5"*)
+      ac_ld_run_path=`$as_echo "$ac_f77_v_output" |
+                        sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'`
+      test "x$ac_ld_run_path" != x &&
+        if test "$ac_compiler_gnu" = yes; then
+  for ac_link_opt in $ac_ld_run_path; do
+    ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt"
+  done
+else
+  ac_cv_f77_libs="$ac_cv_f77_libs $ac_ld_run_path"
+fi
+      ;;
+esac
+fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x"
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_f77_libs" >&5
+$as_echo "$ac_cv_f77_libs" >&6; }
+FLIBS="$ac_cv_f77_libs"
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Split FLIBS into the LIB_PATH part (FLIBS_PATH) and the LIB_NAME part (FLIBS_NAME)
+if test -n "${FLIBS}"; then
+  for i in ${FLIBS}; do
+    case "$i" in
+    -L*) FLIBS_PATH="${FLIBS_PATH} $i" ;;
+    *) FLIBS_NAME="${FLIBS_NAME} $i" ;;
+    esac
+  done
+fi
+
+LIB_NAME="${LIB_NAME} ${FLIBS_NAME}"
+LIB_PATH="${LIB_PATH} ${FLIBS_PATH}"
+
+
+btng_log_vars="FLIBS FLIBS_PATH FLIBS_NAME"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:14033:" "after using ac_f77_library_ldflags: $btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+
+
+
+# Begin macro BTNG_SUPPORT_NSL
+
+
+# Start macro BTNG_ARG_WITH_ENV_WRAPPER with args nsl and nsl_PREFIX
+{ $as_echo "$as_me:$LINENO: checking for nsl" >&5
+$as_echo_n "checking for nsl... " >&6; }
+if test "${btng_cv_prog_nsl+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+# Check whether --with-nsl was given.
+if test "${with_nsl+set}" = set; then
+  withval=$with_nsl;
+fi
+
+# Set nsl_PREFIX, using environment setting if available
+#   and if command line is ambiguous.
+case "$with_nsl" in
+  no)
+    # User explictly turned off nsl.
+    # Ignore value of nsl_PREFIX, even if set in the environment.
+    unset nsl_PREFIX
+    ;;
+  yes|'')
+    # Flag unissued or ambiguously issued using --with-nsl.
+    # Because the user did not explicitly turn if off,
+    # try to set nsl_PREFIX.
+    # If environment variable nsl_PREFIX is available, use it.
+    # If not, try the user-supplied commands to set it.
+    if test -n "${nsl_PREFIX}" ;  then
+      : Nothing to do here actually, because nsl_PREFIX is already in the environment.
+    else
+      nsl_PREFIX=
+    fi
+    ;;
+  *)
+    # User issued a specific string using --with-nsl=non-null-string.
+    # so that is used to set nsl_PREFIX.
+    nsl_PREFIX=$with_nsl
+    ;;
+esac
+if test "${nsl_PREFIX+set}" = set ; then
+  # This block executes the quality check commands, if any, for nsl_PREFIX.
+  :
+fi
+# Cache the value if it was found.
+if test "${nsl_PREFIX+set}" = set ; then
+  btng_cv_prog_nsl=${nsl_PREFIX}
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $btng_cv_prog_nsl" >&5
+$as_echo "$btng_cv_prog_nsl" >&6; }
+# Set nsl_PREFIX from cache.
+# nsl_PREFIX is not yet set if we grabbed it from cache.
+if test "${btng_cv_prog_nsl+set}" = set ; then
+  nsl_PREFIX=$btng_cv_prog_nsl
+else
+  unset nsl_PREFIX
+fi
+# End macro BTNG_ARG_WITH_ENV_WRAPPER with args nsl_PREFIX and nsl
+
+
+
+btng_log_vars="nsl_PREFIX nsl_INCLUDES nsl_LIBS"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:14114:" "before looking: $btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+
+# Start macro BTNG_ARG_WITH_PREFIX
+
+# Start macro BTNG_ARG_WITH_ENV_WRAPPER with args nsl-includes and nsl_INCLUDES
+{ $as_echo "$as_me:$LINENO: checking for nsl-includes" >&5
+$as_echo_n "checking for nsl-includes... " >&6; }
+if test "${btng_cv_prog_nsl_includes+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+# Check whether --with-nsl-includes was given.
+if test "${with_nsl_includes+set}" = set; then
+  withval=$with_nsl_includes;
+fi
+
+# Set nsl_INCLUDES, using environment setting if available
+#   and if command line is ambiguous.
+case "$with_nsl_includes" in
+  no)
+    # User explictly turned off nsl-includes.
+    # Ignore value of nsl_INCLUDES, even if set in the environment.
+    unset nsl_INCLUDES
+    ;;
+  yes|'')
+    # Flag unissued or ambiguously issued using --with-nsl-includes.
+    # Because the user did not explicitly turn if off,
+    # try to set nsl_INCLUDES.
+    # If environment variable nsl_INCLUDES is available, use it.
+    # If not, try the user-supplied commands to set it.
+    if test -n "${nsl_INCLUDES}" ;  then
+      : Nothing to do here actually, because nsl_INCLUDES is already in the environment.
+    else
+      if test "${with_nsl_includes}" = yes ; then
+  { { $as_echo "$as_me:$LINENO: error: If you specify --with-nsl-includes, you must give it the path as in --with-nsl-includes=/installation/path" >&5
+$as_echo "$as_me: error: If you specify --with-nsl-includes, you must give it the path as in --with-nsl-includes=/installation/path" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+echo "configure:14157:" environment nsl_INCLUDES not defined >&5
+
+
+    fi
+    ;;
+  *)
+    # User issued a specific string using --with-nsl-includes=non-null-string.
+    # so that is used to set nsl_INCLUDES.
+    nsl_INCLUDES=$with_nsl_includes
+    ;;
+esac
+if test "${nsl_INCLUDES+set}" = set ; then
+  # This block executes the quality check commands, if any, for nsl_INCLUDES.
+  :
+fi
+# Cache the value if it was found.
+if test "${nsl_INCLUDES+set}" = set ; then
+  btng_cv_prog_nsl_includes=${nsl_INCLUDES}
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $btng_cv_prog_nsl_includes" >&5
+$as_echo "$btng_cv_prog_nsl_includes" >&6; }
+# Set nsl_INCLUDES from cache.
+# nsl_INCLUDES is not yet set if we grabbed it from cache.
+if test "${btng_cv_prog_nsl_includes+set}" = set ; then
+  nsl_INCLUDES=$btng_cv_prog_nsl_includes
+else
+  unset nsl_INCLUDES
+fi
+# End macro BTNG_ARG_WITH_ENV_WRAPPER with args nsl_INCLUDES and nsl-includes
+# End macro BTNG_ARG_WITH_PREFIX
+
+
+# Start macro BTNG_ARG_WITH_PREFIX
+
+# Start macro BTNG_ARG_WITH_ENV_WRAPPER with args nsl-libs and nsl_LIBS
+{ $as_echo "$as_me:$LINENO: checking for nsl-libs" >&5
+$as_echo_n "checking for nsl-libs... " >&6; }
+if test "${btng_cv_prog_nsl_libs+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+# Check whether --with-nsl-libs was given.
+if test "${with_nsl_libs+set}" = set; then
+  withval=$with_nsl_libs;
+fi
+
+# Set nsl_LIBS, using environment setting if available
+#   and if command line is ambiguous.
+case "$with_nsl_libs" in
+  no)
+    # User explictly turned off nsl-libs.
+    # Ignore value of nsl_LIBS, even if set in the environment.
+    unset nsl_LIBS
+    ;;
+  yes|'')
+    # Flag unissued or ambiguously issued using --with-nsl-libs.
+    # Because the user did not explicitly turn if off,
+    # try to set nsl_LIBS.
+    # If environment variable nsl_LIBS is available, use it.
+    # If not, try the user-supplied commands to set it.
+    if test -n "${nsl_LIBS}" ;  then
+      : Nothing to do here actually, because nsl_LIBS is already in the environment.
+    else
+      if test "${with_nsl_libs}" = yes ; then
+  { { $as_echo "$as_me:$LINENO: error: If you specify --with-nsl-libs, you must give it the path as in --with-nsl-libs=/installation/path" >&5
+$as_echo "$as_me: error: If you specify --with-nsl-libs, you must give it the path as in --with-nsl-libs=/installation/path" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+echo "configure:14228:" environment nsl_LIBS not defined >&5
+
+
+    fi
+    ;;
+  *)
+    # User issued a specific string using --with-nsl-libs=non-null-string.
+    # so that is used to set nsl_LIBS.
+    nsl_LIBS=$with_nsl_libs
+    ;;
+esac
+if test "${nsl_LIBS+set}" = set ; then
+  # This block executes the quality check commands, if any, for nsl_LIBS.
+  :
+fi
+# Cache the value if it was found.
+if test "${nsl_LIBS+set}" = set ; then
+  btng_cv_prog_nsl_libs=${nsl_LIBS}
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $btng_cv_prog_nsl_libs" >&5
+$as_echo "$btng_cv_prog_nsl_libs" >&6; }
+# Set nsl_LIBS from cache.
+# nsl_LIBS is not yet set if we grabbed it from cache.
+if test "${btng_cv_prog_nsl_libs+set}" = set ; then
+  nsl_LIBS=$btng_cv_prog_nsl_libs
+else
+  unset nsl_LIBS
+fi
+# End macro BTNG_ARG_WITH_ENV_WRAPPER with args nsl_LIBS and nsl-libs
+# End macro BTNG_ARG_WITH_PREFIX
+
+
+if test "${nsl_PREFIX+set}" = set ; then
+  # Modify the output INCLUDES variable, if it is not set.
+  if test ! "${nsl_INCLUDES+set}" = set ; then
+    test -n "${nsl_PREFIX}" && nsl_INCLUDES="-I${nsl_PREFIX}/include"
+  fi
+  # Modify the output LIBS variable, if it is not set.
+  if test ! "${nsl_LIBS+set}" = set ; then
+    # Save LIBS for later recovery.
+    btng_save_LIBS="$LIBS";
+    # Extra libraries, if any, required by this check.
+    btng_extra_libs="$libz_LIBS -lm"
+    # If path is given, add path to extra flag for library search.
+    test -n "${nsl_PREFIX}" && btng_extra_libs="-L${nsl_PREFIX}/lib $btng_extra_libs"
+    # Look for library.
+    { $as_echo "$as_me:$LINENO: checking for library containing getnetname" >&5
+$as_echo_n "checking for library containing getnetname... " >&6; }
+if test "${ac_cv_search_getnetname+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char getnetname ();
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+return getnetname ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' nsl; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib $btng_extra_libs $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_getnetname=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_getnetname+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_getnetname+set}" = set; then
+  :
+else
+  ac_cv_search_getnetname=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_getnetname" >&5
+$as_echo "$ac_cv_search_getnetname" >&6; }
+ac_res=$ac_cv_search_getnetname
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+
+
+btng_log_vars="LIBS"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:14379:" "After finding nsl flag: $btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+      # Action if found ...
+      # Extract modifications to LIB into library-specific LIBS variable.
+      nsl_LIBS=`echo " $LIBS" | sed "s! $btng_save_LIBS!!"`;
+      test -n "${nsl_PREFIX}" && nsl_LIBS="-L${nsl_PREFIX}/lib ${nsl_LIBS}"
+
+
+btng_log_vars="nsl_LIBS"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:14397:" "Found nsl library flag: $btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+else
+
+      # Action if NOT found ...
+
+
+btng_log_vars="nsl_LIBS"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:14415:" "Did not find nsl library flag: $btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+fi
+
+    LIBS="$btng_save_LIBS";	# Restore global-use variable.
+    unset btng_extra_libs
+    unset btng_save_LIBS
+  else
+    echo "configure:14426:" Not looking for nsl because nsl_LIBS is already set >&5
+  fi
+fi
+
+# End macro BTNG_SUPPORT_NSL
+
+if test "${nsl_PREFIX+set}" = set; then
+  LIBS="$nsl_LIBS $LIBS"
+
+# Split nsl_LIBS into the LIB_PATH part (nsl_LIB_PATH) and the LIB_NAME part (nsl_LIB_NAME)
+if test -n "${nsl_LIBS}"; then
+  for i in ${nsl_LIBS}; do
+    case "$i" in
+    -L*) nsl_LIB_PATH="${nsl_LIB_PATH} $i" ;;
+    *) nsl_LIB_NAME="${nsl_LIB_NAME} $i" ;;
+    esac
+  done
+fi
+
+  LIB_PATH="$nsl_LIB_PATH $LIB_PATH"
+  LIB_NAME="$nsl_LIB_NAME $LIB_NAME"
+  INC_PATH="$nsl_INCLUDES $INC_PATH"
+fi
+
+
+# Begin macro BTNG_SUPPORT_BLAS
+
+
+# Start macro BTNG_ARG_WITH_ENV_WRAPPER with args blas and blas_PREFIX
+{ $as_echo "$as_me:$LINENO: checking for blas" >&5
+$as_echo_n "checking for blas... " >&6; }
+if test "${btng_cv_prog_blas+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+# Check whether --with-blas was given.
+if test "${with_blas+set}" = set; then
+  withval=$with_blas;
+fi
+
+# Set blas_PREFIX, using environment setting if available
+#   and if command line is ambiguous.
+case "$with_blas" in
+  no)
+    # User explictly turned off blas.
+    # Ignore value of blas_PREFIX, even if set in the environment.
+    unset blas_PREFIX
+    ;;
+  yes|'')
+    # Flag unissued or ambiguously issued using --with-blas.
+    # Because the user did not explicitly turn if off,
+    # try to set blas_PREFIX.
+    # If environment variable blas_PREFIX is available, use it.
+    # If not, try the user-supplied commands to set it.
+    if test -n "${blas_PREFIX}" ;  then
+      : Nothing to do here actually, because blas_PREFIX is already in the environment.
+    else
+      if test "${with_blas+set}" = set; then
+  blas_PREFIX=
+else
+unset blas_PREFIX
+fi
+
+    fi
+    ;;
+  *)
+    # User issued a specific string using --with-blas=non-null-string.
+    # so that is used to set blas_PREFIX.
+    blas_PREFIX=$with_blas
+    ;;
+esac
+if test "${blas_PREFIX+set}" = set ; then
+  # This block executes the quality check commands, if any, for blas_PREFIX.
+  :
+fi
+# Cache the value if it was found.
+if test "${blas_PREFIX+set}" = set ; then
+  btng_cv_prog_blas=${blas_PREFIX}
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $btng_cv_prog_blas" >&5
+$as_echo "$btng_cv_prog_blas" >&6; }
+# Set blas_PREFIX from cache.
+# blas_PREFIX is not yet set if we grabbed it from cache.
+if test "${btng_cv_prog_blas+set}" = set ; then
+  blas_PREFIX=$btng_cv_prog_blas
+else
+  unset blas_PREFIX
+fi
+# End macro BTNG_ARG_WITH_ENV_WRAPPER with args blas_PREFIX and blas
+
+
+
+# Start macro BTNG_ARG_WITH_PREFIX
+
+# Start macro BTNG_ARG_WITH_ENV_WRAPPER with args blas-includes and blas_INCLUDES
+{ $as_echo "$as_me:$LINENO: checking for blas-includes" >&5
+$as_echo_n "checking for blas-includes... " >&6; }
+if test "${btng_cv_prog_blas_includes+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+# Check whether --with-blas-includes was given.
+if test "${with_blas_includes+set}" = set; then
+  withval=$with_blas_includes;
+fi
+
+# Set blas_INCLUDES, using environment setting if available
+#   and if command line is ambiguous.
+case "$with_blas_includes" in
+  no)
+    # User explictly turned off blas-includes.
+    # Ignore value of blas_INCLUDES, even if set in the environment.
+    unset blas_INCLUDES
+    ;;
+  yes|'')
+    # Flag unissued or ambiguously issued using --with-blas-includes.
+    # Because the user did not explicitly turn if off,
+    # try to set blas_INCLUDES.
+    # If environment variable blas_INCLUDES is available, use it.
+    # If not, try the user-supplied commands to set it.
+    if test -n "${blas_INCLUDES}" ;  then
+      : Nothing to do here actually, because blas_INCLUDES is already in the environment.
+    else
+      if test "${with_blas_includes}" = yes ; then
+  { { $as_echo "$as_me:$LINENO: error: If you specify --with-blas-includes, you must give it the path as in --with-blas-includes=/installation/path" >&5
+$as_echo "$as_me: error: If you specify --with-blas-includes, you must give it the path as in --with-blas-includes=/installation/path" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+echo "configure:14558:" environment blas_INCLUDES not defined >&5
+
+
+    fi
+    ;;
+  *)
+    # User issued a specific string using --with-blas-includes=non-null-string.
+    # so that is used to set blas_INCLUDES.
+    blas_INCLUDES=$with_blas_includes
+    ;;
+esac
+if test "${blas_INCLUDES+set}" = set ; then
+  # This block executes the quality check commands, if any, for blas_INCLUDES.
+  :
+fi
+# Cache the value if it was found.
+if test "${blas_INCLUDES+set}" = set ; then
+  btng_cv_prog_blas_includes=${blas_INCLUDES}
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $btng_cv_prog_blas_includes" >&5
+$as_echo "$btng_cv_prog_blas_includes" >&6; }
+# Set blas_INCLUDES from cache.
+# blas_INCLUDES is not yet set if we grabbed it from cache.
+if test "${btng_cv_prog_blas_includes+set}" = set ; then
+  blas_INCLUDES=$btng_cv_prog_blas_includes
+else
+  unset blas_INCLUDES
+fi
+# End macro BTNG_ARG_WITH_ENV_WRAPPER with args blas_INCLUDES and blas-includes
+# End macro BTNG_ARG_WITH_PREFIX
+
+
+# Start macro BTNG_ARG_WITH_PREFIX
+
+# Start macro BTNG_ARG_WITH_ENV_WRAPPER with args blas-libs and blas_LIBS
+{ $as_echo "$as_me:$LINENO: checking for blas-libs" >&5
+$as_echo_n "checking for blas-libs... " >&6; }
+if test "${btng_cv_prog_blas_libs+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+# Check whether --with-blas-libs was given.
+if test "${with_blas_libs+set}" = set; then
+  withval=$with_blas_libs;
+fi
+
+# Set blas_LIBS, using environment setting if available
+#   and if command line is ambiguous.
+case "$with_blas_libs" in
+  no)
+    # User explictly turned off blas-libs.
+    # Ignore value of blas_LIBS, even if set in the environment.
+    unset blas_LIBS
+    ;;
+  yes|'')
+    # Flag unissued or ambiguously issued using --with-blas-libs.
+    # Because the user did not explicitly turn if off,
+    # try to set blas_LIBS.
+    # If environment variable blas_LIBS is available, use it.
+    # If not, try the user-supplied commands to set it.
+    if test -n "${blas_LIBS}" ;  then
+      : Nothing to do here actually, because blas_LIBS is already in the environment.
+    else
+      if test "${with_blas_libs}" = yes ; then
+  { { $as_echo "$as_me:$LINENO: error: If you specify --with-blas-libs, you must give it the path as in --with-blas-libs=/installation/path" >&5
+$as_echo "$as_me: error: If you specify --with-blas-libs, you must give it the path as in --with-blas-libs=/installation/path" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+echo "configure:14629:" environment blas_LIBS not defined >&5
+
+
+    fi
+    ;;
+  *)
+    # User issued a specific string using --with-blas-libs=non-null-string.
+    # so that is used to set blas_LIBS.
+    blas_LIBS=$with_blas_libs
+    ;;
+esac
+if test "${blas_LIBS+set}" = set ; then
+  # This block executes the quality check commands, if any, for blas_LIBS.
+  :
+fi
+# Cache the value if it was found.
+if test "${blas_LIBS+set}" = set ; then
+  btng_cv_prog_blas_libs=${blas_LIBS}
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $btng_cv_prog_blas_libs" >&5
+$as_echo "$btng_cv_prog_blas_libs" >&6; }
+# Set blas_LIBS from cache.
+# blas_LIBS is not yet set if we grabbed it from cache.
+if test "${btng_cv_prog_blas_libs+set}" = set ; then
+  blas_LIBS=$btng_cv_prog_blas_libs
+else
+  unset blas_LIBS
+fi
+# End macro BTNG_ARG_WITH_ENV_WRAPPER with args blas_LIBS and blas-libs
+# End macro BTNG_ARG_WITH_PREFIX
+
+
+if test "${blas_PREFIX+set}" = set ; then
+  # Modify the output INCLUDES variable, if it is not set.
+  if test ! "${blas_INCLUDES+set}" = set ; then
+    test -n "${blas_PREFIX}" && blas_INCLUDES="-I${blas_PREFIX}/include"
+  fi
+  # Modify the output LIBS variable, if it is not set.
+  if test ! "${blas_LIBS+set}" = set ; then
+    # Save LIBS for later recovery.
+    btng_save_LIBS="$LIBS";
+    # Extra libraries, if any, required by this check.
+    btng_extra_libs="$libz_LIBS -lm"
+    # If path is given, add path to extra flag for library search.
+    test -n "${blas_PREFIX}" && btng_extra_libs="-L${blas_PREFIX}/lib $btng_extra_libs"
+    # Look for library.
+    { $as_echo "$as_me:$LINENO: checking for library containing daxpy_" >&5
+$as_echo_n "checking for library containing daxpy_... " >&6; }
+if test "${ac_cv_search_daxpy_+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char daxpy_ ();
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+return daxpy_ ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' blas; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib $btng_extra_libs $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_daxpy_=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_daxpy_+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_daxpy_+set}" = set; then
+  :
+else
+  ac_cv_search_daxpy_=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_daxpy_" >&5
+$as_echo "$ac_cv_search_daxpy_" >&6; }
+ac_res=$ac_cv_search_daxpy_
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+
+
+btng_log_vars="LIBS"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:14780:" "After finding blas flag: $btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+      # Action if found ...
+      # Extract modifications to LIB into library-specific LIBS variable.
+      blas_LIBS=`echo " $LIBS" | sed "s! $btng_save_LIBS!!"`;
+      test -n "${blas_PREFIX}" && blas_LIBS="-L${blas_PREFIX}/lib ${blas_LIBS}"
+
+
+btng_log_vars="blas_LIBS"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:14798:" "Found blas library flag: $btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+else
+
+      # Action if NOT found ...
+
+
+btng_log_vars="blas_LIBS"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:14816:" "Did not find blas library flag: $btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+      { $as_echo "$as_me:$LINENO: WARNING: I could not systematically find the name of
+the blas library so I am using -lblas instead." >&5
+$as_echo "$as_me: WARNING: I could not systematically find the name of
+the blas library so I am using -lblas instead." >&2;}
+      blas_LIBS="-lblas"
+      test -n "${blas_PREFIX}" &&	\
+	blas_LIBS="-L${blas_PREFIX}/lib ${blas_LIBS}"	# Add path flag to output variable.
+
+fi
+
+    LIBS="$btng_save_LIBS";	# Restore global-use variable.
+    unset btng_extra_libs
+    unset btng_save_LIBS
+  else
+    echo "configure:14834:" Not looking for blas because blas_LIBS is already set >&5
+  fi
+fi
+
+
+
+
+btng_log_vars="blas_PREFIX blas_INCLUDES blas_LIBS"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:14849:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+# End macro BTNG_SUPPORT_BLAS
+
+if test "${blas_PREFIX+set}" = set ||
+   test "${blas_INCLUDES+set}" = set ||
+   test "${blas_LIBS+set}" = set ; then
+
+# Split blas_LIBS into the LIB_PATH part (blas_LIB_PATH) and the LIB_NAME part (blas_LIB_NAME)
+if test -n "${blas_LIBS}"; then
+  for i in ${blas_LIBS}; do
+    case "$i" in
+    -L*) blas_LIB_PATH="${blas_LIB_PATH} $i" ;;
+    *) blas_LIB_NAME="${blas_LIB_NAME} $i" ;;
+    esac
+  done
+fi
+
+  LIB_PATH="$blas_LIB_PATH $LIB_PATH"
+  LIB_NAME="$blas_LIB_NAME $LIB_NAME"
+  INC_PATH="$blas_INCLUDES $INC_PATH"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BLAS 1
+_ACEOF
+
+fi
+
+
+btng_log_vars="blas_LIB_PATH blas_LIB_NAME LIB_PATH LIB_NAME"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:14888:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+
+# Begin macro BTNG_SUPPORT_LAPACK
+
+
+# Start macro BTNG_ARG_WITH_ENV_WRAPPER with args lapack and lapack_PREFIX
+{ $as_echo "$as_me:$LINENO: checking for lapack" >&5
+$as_echo_n "checking for lapack... " >&6; }
+if test "${btng_cv_prog_lapack+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+# Check whether --with-lapack was given.
+if test "${with_lapack+set}" = set; then
+  withval=$with_lapack;
+fi
+
+# Set lapack_PREFIX, using environment setting if available
+#   and if command line is ambiguous.
+case "$with_lapack" in
+  no)
+    # User explictly turned off lapack.
+    # Ignore value of lapack_PREFIX, even if set in the environment.
+    unset lapack_PREFIX
+    ;;
+  yes|'')
+    # Flag unissued or ambiguously issued using --with-lapack.
+    # Because the user did not explicitly turn if off,
+    # try to set lapack_PREFIX.
+    # If environment variable lapack_PREFIX is available, use it.
+    # If not, try the user-supplied commands to set it.
+    if test -n "${lapack_PREFIX}" ;  then
+      : Nothing to do here actually, because lapack_PREFIX is already in the environment.
+    else
+      if test "${with_lapack+set}" = set; then
+  lapack_PREFIX=
+else
+unset lapack_PREFIX
+fi
+
+    fi
+    ;;
+  *)
+    # User issued a specific string using --with-lapack=non-null-string.
+    # so that is used to set lapack_PREFIX.
+    lapack_PREFIX=$with_lapack
+    ;;
+esac
+if test "${lapack_PREFIX+set}" = set ; then
+  # This block executes the quality check commands, if any, for lapack_PREFIX.
+  :
+fi
+# Cache the value if it was found.
+if test "${lapack_PREFIX+set}" = set ; then
+  btng_cv_prog_lapack=${lapack_PREFIX}
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $btng_cv_prog_lapack" >&5
+$as_echo "$btng_cv_prog_lapack" >&6; }
+# Set lapack_PREFIX from cache.
+# lapack_PREFIX is not yet set if we grabbed it from cache.
+if test "${btng_cv_prog_lapack+set}" = set ; then
+  lapack_PREFIX=$btng_cv_prog_lapack
+else
+  unset lapack_PREFIX
+fi
+# End macro BTNG_ARG_WITH_ENV_WRAPPER with args lapack_PREFIX and lapack
+
+
+
+# Start macro BTNG_ARG_WITH_PREFIX
+
+# Start macro BTNG_ARG_WITH_ENV_WRAPPER with args lapack-includes and lapack_INCLUDES
+{ $as_echo "$as_me:$LINENO: checking for lapack-includes" >&5
+$as_echo_n "checking for lapack-includes... " >&6; }
+if test "${btng_cv_prog_lapack_includes+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+# Check whether --with-lapack-includes was given.
+if test "${with_lapack_includes+set}" = set; then
+  withval=$with_lapack_includes;
+fi
+
+# Set lapack_INCLUDES, using environment setting if available
+#   and if command line is ambiguous.
+case "$with_lapack_includes" in
+  no)
+    # User explictly turned off lapack-includes.
+    # Ignore value of lapack_INCLUDES, even if set in the environment.
+    unset lapack_INCLUDES
+    ;;
+  yes|'')
+    # Flag unissued or ambiguously issued using --with-lapack-includes.
+    # Because the user did not explicitly turn if off,
+    # try to set lapack_INCLUDES.
+    # If environment variable lapack_INCLUDES is available, use it.
+    # If not, try the user-supplied commands to set it.
+    if test -n "${lapack_INCLUDES}" ;  then
+      : Nothing to do here actually, because lapack_INCLUDES is already in the environment.
+    else
+      if test "${with_lapack_includes}" = yes ; then
+  { { $as_echo "$as_me:$LINENO: error: If you specify --with-lapack-includes, you must give it the path as in --with-lapack-includes=/installation/path" >&5
+$as_echo "$as_me: error: If you specify --with-lapack-includes, you must give it the path as in --with-lapack-includes=/installation/path" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+echo "configure:15001:" environment lapack_INCLUDES not defined >&5
+
+
+    fi
+    ;;
+  *)
+    # User issued a specific string using --with-lapack-includes=non-null-string.
+    # so that is used to set lapack_INCLUDES.
+    lapack_INCLUDES=$with_lapack_includes
+    ;;
+esac
+if test "${lapack_INCLUDES+set}" = set ; then
+  # This block executes the quality check commands, if any, for lapack_INCLUDES.
+  :
+fi
+# Cache the value if it was found.
+if test "${lapack_INCLUDES+set}" = set ; then
+  btng_cv_prog_lapack_includes=${lapack_INCLUDES}
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $btng_cv_prog_lapack_includes" >&5
+$as_echo "$btng_cv_prog_lapack_includes" >&6; }
+# Set lapack_INCLUDES from cache.
+# lapack_INCLUDES is not yet set if we grabbed it from cache.
+if test "${btng_cv_prog_lapack_includes+set}" = set ; then
+  lapack_INCLUDES=$btng_cv_prog_lapack_includes
+else
+  unset lapack_INCLUDES
+fi
+# End macro BTNG_ARG_WITH_ENV_WRAPPER with args lapack_INCLUDES and lapack-includes
+# End macro BTNG_ARG_WITH_PREFIX
+
+
+# Start macro BTNG_ARG_WITH_PREFIX
+
+# Start macro BTNG_ARG_WITH_ENV_WRAPPER with args lapack-libs and lapack_LIBS
+{ $as_echo "$as_me:$LINENO: checking for lapack-libs" >&5
+$as_echo_n "checking for lapack-libs... " >&6; }
+if test "${btng_cv_prog_lapack_libs+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+# Check whether --with-lapack-libs was given.
+if test "${with_lapack_libs+set}" = set; then
+  withval=$with_lapack_libs;
+fi
+
+# Set lapack_LIBS, using environment setting if available
+#   and if command line is ambiguous.
+case "$with_lapack_libs" in
+  no)
+    # User explictly turned off lapack-libs.
+    # Ignore value of lapack_LIBS, even if set in the environment.
+    unset lapack_LIBS
+    ;;
+  yes|'')
+    # Flag unissued or ambiguously issued using --with-lapack-libs.
+    # Because the user did not explicitly turn if off,
+    # try to set lapack_LIBS.
+    # If environment variable lapack_LIBS is available, use it.
+    # If not, try the user-supplied commands to set it.
+    if test -n "${lapack_LIBS}" ;  then
+      : Nothing to do here actually, because lapack_LIBS is already in the environment.
+    else
+      if test "${with_lapack_libs}" = yes ; then
+  { { $as_echo "$as_me:$LINENO: error: If you specify --with-lapack-libs, you must give it the path as in --with-lapack-libs=/installation/path" >&5
+$as_echo "$as_me: error: If you specify --with-lapack-libs, you must give it the path as in --with-lapack-libs=/installation/path" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+echo "configure:15072:" environment lapack_LIBS not defined >&5
+
+
+    fi
+    ;;
+  *)
+    # User issued a specific string using --with-lapack-libs=non-null-string.
+    # so that is used to set lapack_LIBS.
+    lapack_LIBS=$with_lapack_libs
+    ;;
+esac
+if test "${lapack_LIBS+set}" = set ; then
+  # This block executes the quality check commands, if any, for lapack_LIBS.
+  :
+fi
+# Cache the value if it was found.
+if test "${lapack_LIBS+set}" = set ; then
+  btng_cv_prog_lapack_libs=${lapack_LIBS}
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $btng_cv_prog_lapack_libs" >&5
+$as_echo "$btng_cv_prog_lapack_libs" >&6; }
+# Set lapack_LIBS from cache.
+# lapack_LIBS is not yet set if we grabbed it from cache.
+if test "${btng_cv_prog_lapack_libs+set}" = set ; then
+  lapack_LIBS=$btng_cv_prog_lapack_libs
+else
+  unset lapack_LIBS
+fi
+# End macro BTNG_ARG_WITH_ENV_WRAPPER with args lapack_LIBS and lapack-libs
+# End macro BTNG_ARG_WITH_PREFIX
+
+
+if test "${lapack_PREFIX+set}" = set ; then
+  # Modify the output INCLUDES variable, if it is not set.
+  if test ! "${lapack_INCLUDES+set}" = set ; then
+    test -n "${lapack_PREFIX}" && lapack_INCLUDES="-I${lapack_PREFIX}/include"
+  fi
+  # Modify the output LIBS variable, if it is not set.
+  if test ! "${lapack_LIBS+set}" = set ; then
+    # Save LIBS for later recovery.
+    btng_save_LIBS="$LIBS";
+    # Extra libraries, if any, required by this check.
+    btng_extra_libs="$libz_LIBS -lm"
+    # If path is given, add path to extra flag for library search.
+    test -n "${lapack_PREFIX}" && btng_extra_libs="-L${lapack_PREFIX}/lib $btng_extra_libs"
+    # Look for library.
+    { $as_echo "$as_me:$LINENO: checking for library containing xerbla_" >&5
+$as_echo_n "checking for library containing xerbla_... " >&6; }
+if test "${ac_cv_search_xerbla_+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char xerbla_ ();
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+return xerbla_ ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' lapack; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib $btng_extra_libs $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_xerbla_=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_xerbla_+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_xerbla_+set}" = set; then
+  :
+else
+  ac_cv_search_xerbla_=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_xerbla_" >&5
+$as_echo "$ac_cv_search_xerbla_" >&6; }
+ac_res=$ac_cv_search_xerbla_
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+
+
+btng_log_vars="LIBS"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:15223:" "After finding lapack flag: $btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+      # Action if found ...
+      # Extract modifications to LIB into library-specific LIBS variable.
+      lapack_LIBS=`echo " $LIBS" | sed "s! $btng_save_LIBS!!"`;
+      test -n "${lapack_PREFIX}" && lapack_LIBS="-L${lapack_PREFIX}/lib ${lapack_LIBS}"
+
+
+btng_log_vars="lapack_LIBS"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:15241:" "Found lapack library flag: $btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+else
+
+      # Action if NOT found ...
+
+
+btng_log_vars="lapack_LIBS"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:15259:" "Did not find lapack library flag: $btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+      { $as_echo "$as_me:$LINENO: WARNING: I could not systematically find the name of
+the lapack library so I am using -llapack instead." >&5
+$as_echo "$as_me: WARNING: I could not systematically find the name of
+the lapack library so I am using -llapack instead." >&2;}
+      lapack_LIBS="-llapack"
+      test -n "${lapack_PREFIX}" &&	\
+	lapack_LIBS="-L${lapack_PREFIX}/lib ${lapack_LIBS}"	# Add path flag to output variable.
+
+fi
+
+    LIBS="$btng_save_LIBS";	# Restore global-use variable.
+    unset btng_extra_libs
+    unset btng_save_LIBS
+  else
+    echo "configure:15277:" Not looking for lapack because lapack_LIBS is already set >&5
+  fi
+fi
+
+
+
+
+btng_log_vars="lapack_PREFIX lapack_INCLUDES lapack_LIBS"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:15292:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+# End macro BTNG_SUPPORT_LAPACK
+
+if test "${lapack_PREFIX+set}" = set ||
+   test "${lapack_INCLUDES+set}" = set ||
+   test "${lapack_LIBS+set}" = set ; then
+
+# Split lapack_LIBS into the LIB_PATH part (lapack_LIB_PATH) and the LIB_NAME part (lapack_LIB_NAME)
+if test -n "${lapack_LIBS}"; then
+  for i in ${lapack_LIBS}; do
+    case "$i" in
+    -L*) lapack_LIB_PATH="${lapack_LIB_PATH} $i" ;;
+    *) lapack_LIB_NAME="${lapack_LIB_NAME} $i" ;;
+    esac
+  done
+fi
+
+  LIB_PATH="$lapack_LIB_PATH $LIB_PATH"
+  LIB_NAME="$lapack_LIB_NAME $LIB_NAME"
+  INC_PATH="$lapack_INCLUDES $INC_PATH"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LAPACK 1
+_ACEOF
+
+fi
+
+
+btng_log_vars="lapack_LIB_PATH lapack_LIB_NAME LIB_PATH LIB_NAME"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:15331:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+
+
+# Check whether --with-mpi was given.
+if test "${with_mpi+set}" = set; then
+  withval=$with_mpi;
+fi
+
+if test "$with_mpi" = no; then
+   { $as_echo "$as_me:$LINENO: NOTIFICATION: SAMRAI configured without the MPI library" >&5
+$as_echo "$as_me: NOTIFICATION: SAMRAI configured without the MPI library" >&6;}
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_MPI 1
+_ACEOF
+
+else
+
+   case $ARCH in
+      alpha)
+
+
+   casc_find_mpi_cache_used=yes
+
+   if test "${casc_cv_mpi_include+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  casc_find_mpi_cache_used=no
+fi
+
+   if test "${casc_cv_mpi_libs+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  casc_find_mpi_cache_used=no
+fi
+
+   if test "${casc_cv_mpi_lib_dirs+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  casc_find_mpi_cache_used=no
+fi
+
+   if test "${casc_cv_mpi_flags+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  casc_find_mpi_cache_used=no
+fi
+
+
+   if test "$casc_find_mpi_cache_used" = "yes"; then
+      { $as_echo "$as_me:$LINENO: checking for location of mpi.h" >&5
+$as_echo_n "checking for location of mpi.h... " >&6; }
+      MPIINCLUDE=$casc_cv_mpi_include
+      { $as_echo "$as_me:$LINENO: result: \"\(cached\) $MPIINCLUDE\"" >&5
+$as_echo "\"\(cached\) $MPIINCLUDE\"" >&6; }
+
+      { $as_echo "$as_me:$LINENO: checking for MPI library directories" >&5
+$as_echo_n "checking for MPI library directories... " >&6; }
+      MPILIBDIRS=$casc_cv_mpi_lib_dirs
+      { $as_echo "$as_me:$LINENO: result: \"\(cached\) $MPILIBDIRS\"" >&5
+$as_echo "\"\(cached\) $MPILIBDIRS\"" >&6; }
+
+      { $as_echo "$as_me:$LINENO: checking for MPI libraries" >&5
+$as_echo_n "checking for MPI libraries... " >&6; }
+      MPILIBS=$casc_cv_mpi_libs
+      { $as_echo "$as_me:$LINENO: result: \"\(cached\) $MPILIBS\"" >&5
+$as_echo "\"\(cached\) $MPILIBS\"" >&6; }
+
+      { $as_echo "$as_me:$LINENO: checking for other MPI-related flags" >&5
+$as_echo_n "checking for other MPI-related flags... " >&6; }
+      MPIFLAGS=$casc_cv_mpi_flags
+      { $as_echo "$as_me:$LINENO: result: \"\(cached\) $MPIFLAGS\"" >&5
+$as_echo "\"\(cached\) $MPIFLAGS\"" >&6; }
+   else
+
+
+
+      casc_user_chose_mpi=no
+
+# Check whether --with-mpi-include was given.
+if test "${with_mpi_include+set}" = set; then
+  withval=$with_mpi_include; for mpi_dir in $withval; do
+                     MPIINCLUDE="$MPIINCLUDE -I$withval"
+                  done; casc_user_chose_mpi=yes
+fi
+
+
+
+# Check whether --with-mpi-libs was given.
+if test "${with_mpi_libs+set}" = set; then
+  withval=$with_mpi_libs; for mpi_lib in $withval; do
+                     MPILIBS="$MPILIBS -l$mpi_lib"
+                  done; casc_user_chose_mpi=yes
+fi
+
+
+
+
+# Check whether --with-mpi-lib-dirs was given.
+if test "${with_mpi_lib_dirs+set}" = set; then
+  withval=$with_mpi_lib_dirs; for mpi_lib_dir in $withval; do
+                     MPILIBDIRS="-L$mpi_lib_dir $MPILIBDIRS"
+                  done; casc_user_chose_mpi=yes
+fi
+
+
+
+
+# Check whether --with-mpi-flags was given.
+if test "${with_mpi_flags+set}" = set; then
+  withval=$with_mpi_flags; MPIFLAGS=$withval
+fi
+
+
+
+      if test "$casc_user_chose_mpi" = "no"; then
+
+
+         casc_mpi_include_dir=
+         casc_mpi_lib_dirs=
+         casc_mpi_libs="mpi rt rpc gs pthread"
+
+         for casc_incl_dir in $casc_mpi_include_dir; do
+            MPIINCLUDE="-I$casc_incl_dir $MPIINCLUDE"
+         done
+         for casc_lib_dir in $casc_mpi_lib_dirs; do
+            MPILIBDIRS="-L$casc_lib_dir $MPILIBDIRS"
+         done
+         for casc_lib in $casc_mpi_libs; do
+            MPILIBS="$MPILIBS -l$casc_lib"
+         done
+      fi
+
+
+      { $as_echo "$as_me:$LINENO: checking for MPI include directories" >&5
+$as_echo_n "checking for MPI include directories... " >&6; }
+      { $as_echo "$as_me:$LINENO: result: $MPIINCLUDE" >&5
+$as_echo "$MPIINCLUDE" >&6; }
+      { $as_echo "$as_me:$LINENO: checking for MPI library directories" >&5
+$as_echo_n "checking for MPI library directories... " >&6; }
+      { $as_echo "$as_me:$LINENO: result: $MPILIBDIRS" >&5
+$as_echo "$MPILIBDIRS" >&6; }
+      { $as_echo "$as_me:$LINENO: checking for MPI libraries" >&5
+$as_echo_n "checking for MPI libraries... " >&6; }
+      { $as_echo "$as_me:$LINENO: result: $MPILIBS" >&5
+$as_echo "$MPILIBS" >&6; }
+      { $as_echo "$as_me:$LINENO: checking for other MPI-related flags" >&5
+$as_echo_n "checking for other MPI-related flags... " >&6; }
+      { $as_echo "$as_me:$LINENO: result: $MPIFLAGS" >&5
+$as_echo "$MPIFLAGS" >&6; }
+
+   fi
+
+
+      ;;
+      *)
+
+
+   casc_find_mpi_cache_used=yes
+
+   if test "${casc_cv_mpi_include+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  casc_find_mpi_cache_used=no
+fi
+
+   if test "${casc_cv_mpi_libs+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  casc_find_mpi_cache_used=no
+fi
+
+   if test "${casc_cv_mpi_lib_dirs+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  casc_find_mpi_cache_used=no
+fi
+
+   if test "${casc_cv_mpi_flags+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  casc_find_mpi_cache_used=no
+fi
+
+
+   if test "$casc_find_mpi_cache_used" = "yes"; then
+      { $as_echo "$as_me:$LINENO: checking for location of mpi.h" >&5
+$as_echo_n "checking for location of mpi.h... " >&6; }
+      MPIINCLUDE=$casc_cv_mpi_include
+      { $as_echo "$as_me:$LINENO: result: \"\(cached\) $MPIINCLUDE\"" >&5
+$as_echo "\"\(cached\) $MPIINCLUDE\"" >&6; }
+
+      { $as_echo "$as_me:$LINENO: checking for MPI library directories" >&5
+$as_echo_n "checking for MPI library directories... " >&6; }
+      MPILIBDIRS=$casc_cv_mpi_lib_dirs
+      { $as_echo "$as_me:$LINENO: result: \"\(cached\) $MPILIBDIRS\"" >&5
+$as_echo "\"\(cached\) $MPILIBDIRS\"" >&6; }
+
+      { $as_echo "$as_me:$LINENO: checking for MPI libraries" >&5
+$as_echo_n "checking for MPI libraries... " >&6; }
+      MPILIBS=$casc_cv_mpi_libs
+      { $as_echo "$as_me:$LINENO: result: \"\(cached\) $MPILIBS\"" >&5
+$as_echo "\"\(cached\) $MPILIBS\"" >&6; }
+
+      { $as_echo "$as_me:$LINENO: checking for other MPI-related flags" >&5
+$as_echo_n "checking for other MPI-related flags... " >&6; }
+      MPIFLAGS=$casc_cv_mpi_flags
+      { $as_echo "$as_me:$LINENO: result: \"\(cached\) $MPIFLAGS\"" >&5
+$as_echo "\"\(cached\) $MPIFLAGS\"" >&6; }
+   else
+
+
+
+      casc_user_chose_mpi=no
+
+# Check whether --with-mpi-include was given.
+if test "${with_mpi_include+set}" = set; then
+  withval=$with_mpi_include; for mpi_dir in $withval; do
+                     MPIINCLUDE="$MPIINCLUDE -I$withval"
+                  done; casc_user_chose_mpi=yes
+fi
+
+
+
+# Check whether --with-mpi-libs was given.
+if test "${with_mpi_libs+set}" = set; then
+  withval=$with_mpi_libs; for mpi_lib in $withval; do
+                     MPILIBS="$MPILIBS -l$mpi_lib"
+                  done; casc_user_chose_mpi=yes
+fi
+
+
+
+
+# Check whether --with-mpi-lib-dirs was given.
+if test "${with_mpi_lib_dirs+set}" = set; then
+  withval=$with_mpi_lib_dirs; for mpi_lib_dir in $withval; do
+                     MPILIBDIRS="-L$mpi_lib_dir $MPILIBDIRS"
+                  done; casc_user_chose_mpi=yes
+fi
+
+
+
+
+# Check whether --with-mpi-flags was given.
+if test "${with_mpi_flags+set}" = set; then
+  withval=$with_mpi_flags; MPIFLAGS=$withval
+fi
+
+
+
+      if test "$casc_user_chose_mpi" = "no"; then
+
+
+
+# Check whether --with-MPICC was given.
+if test "${with_MPICC+set}" = set; then
+  withval=$with_MPICC; MPICC=$withval
+else
+  for ac_prog in mpcc mpicc tmcc hcc
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_MPICC+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$MPICC"; then
+  ac_cv_prog_MPICC="$MPICC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_MPICC="$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+MPICC=$ac_cv_prog_MPICC
+if test -n "$MPICC"; then
+  { $as_echo "$as_me:$LINENO: result: $MPICC" >&5
+$as_echo "$MPICC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$MPICC" && break
+done
+
+fi
+
+
+         if test -z "$MPICC"; then
+            { $as_echo "$as_me:$LINENO: WARNING: no acceptable mpicc found in \$PATH" >&5
+$as_echo "$as_me: WARNING: no acceptable mpicc found in \$PATH" >&2;}
+
+
+
+# Check whether --with-mpi-include was given.
+if test "${with_mpi_include+set}" = set; then
+  withval=$with_mpi_include; casc_mpi_include_dir=$withval
+fi
+
+
+
+# Check whether --with-mpi-libs was given.
+if test "${with_mpi_libs+set}" = set; then
+  withval=$with_mpi_libs; casc_mpi_libs=$withval
+fi
+
+
+
+# Check whether --with-mpi-lib-dirs was given.
+if test "${with_mpi_lib_dirs+set}" = set; then
+  withval=$with_mpi_lib_dirs; casc_mpi_lib_dirs=$withval
+fi
+
+
+
+   if test -z "$casc_mpi_libs"; then
+
+
+            case $ARCH in
+
+         sun4 | solaris)
+            case $F77 in
+               *g77)
+                   if test -z "$casc_mpi_include_dir"; then
+                      casc_mpi_include_dir=/usr/local/mpi/lam/h
+                   fi
+
+                   if test -z "$casc_mpi_lib_dirs"; then
+                      casc_mpi_lib_dirs="/usr/local/mpi/lam/lib"
+                   fi
+
+                   casc_mpi_libs="socket mpi trillium args tstdio t";;
+
+               *)
+
+                  if test -z "$casc_mpi_include_dir"; then
+                     MPIINCLUDE="-I/usr/local/mpi/mpich/include \
+                                 -I/usr/local/mpi/mpich/lib/solaris/ch_p4"
+                  fi
+
+                  if test -z "$casc_mpi_lib_dirs"; then
+                     casc_mpi_lib_dirs="/usr/local/mpi/mpich/lib/solaris/ch_p4 \
+                                       /usr/lib"
+                  fi
+
+               casc_mpi_libs="nsl socket mpi";;
+               esac
+
+            if test -z "$MPIINCLUDE"; then
+               as_ac_Header=`$as_echo "ac_cv_header_$casc_mpi_include_dir/mpi.h" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $casc_mpi_include_dir/mpi.h" >&5
+$as_echo_n "checking for $casc_mpi_include_dir/mpi.h... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $casc_mpi_include_dir/mpi.h usability" >&5
+$as_echo_n "checking $casc_mpi_include_dir/mpi.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$casc_mpi_include_dir/mpi.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $casc_mpi_include_dir/mpi.h presence" >&5
+$as_echo_n "checking $casc_mpi_include_dir/mpi.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$casc_mpi_include_dir/mpi.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $casc_mpi_include_dir/mpi.h" >&5
+$as_echo_n "checking for $casc_mpi_include_dir/mpi.h... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  MPIINCLUDE="-I$casc_mpi_include_dir"
+fi
+
+
+            fi
+         ;;
+
+         alpha)
+            if test -z "$casc_mpi_include_dir"; then
+               casc_mpi_include_dir=/usr/local/mpi/include
+            fi
+            as_ac_Header=`$as_echo "ac_cv_header_$casc_mpi_include_dir/mpi.h" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $casc_mpi_include_dir/mpi.h" >&5
+$as_echo_n "checking for $casc_mpi_include_dir/mpi.h... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $casc_mpi_include_dir/mpi.h usability" >&5
+$as_echo_n "checking $casc_mpi_include_dir/mpi.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$casc_mpi_include_dir/mpi.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $casc_mpi_include_dir/mpi.h presence" >&5
+$as_echo_n "checking $casc_mpi_include_dir/mpi.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$casc_mpi_include_dir/mpi.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $casc_mpi_include_dir/mpi.h" >&5
+$as_echo_n "checking for $casc_mpi_include_dir/mpi.h... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  MPIINCLUDE="-I$casc_mpi_include_dir"
+fi
+
+
+
+            if test -z "$casc_mpi_lib_dirs"; then
+               casc_mpi_lib_dirs="/usr/local/mpi/lib/alpha/ch_shmem \
+                                  /usr/local/lib"
+            fi
+
+            casc_mpi_libs="mpich gs";;
+
+         rs6000)
+
+
+
+            casc_mpi_libs=mpi
+
+            MPIFLAGS="-binitfini:poe_remote_main";;
+
+         IRIX64 | iris4d)
+            if test -z "$casc_mpi_include_dir"; then
+               casc_mpi_include_dir=/usr/local/mpi/include
+            fi
+            as_ac_Header=`$as_echo "ac_cv_header_$casc_mpi_include_dir/mpi.h" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $casc_mpi_include_dir/mpi.h" >&5
+$as_echo_n "checking for $casc_mpi_include_dir/mpi.h... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $casc_mpi_include_dir/mpi.h usability" >&5
+$as_echo_n "checking $casc_mpi_include_dir/mpi.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$casc_mpi_include_dir/mpi.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $casc_mpi_include_dir/mpi.h presence" >&5
+$as_echo_n "checking $casc_mpi_include_dir/mpi.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$casc_mpi_include_dir/mpi.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $casc_mpi_include_dir/mpi.h" >&5
+$as_echo_n "checking for $casc_mpi_include_dir/mpi.h... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  MPIINCLUDE="-I$casc_mpi_include_dir"
+fi
+
+
+
+            if test -z "$casc_mpi_lib_dirs"; then
+               casc_mpi_lib_dirs=/usr/local/mpi/lib/IRIX64/ch_p4
+            fi
+
+            casc_mpi_libs=mpi;;
+
+         *)
+{ $as_echo "$as_me:$LINENO: WARNING: trying naive MPI settings - can use --with flags to change" >&5
+$as_echo "$as_me: WARNING: trying naive MPI settings - can use --with flags to change" >&2;}
+            if test -z "$casc_mpi_include_dir"; then
+               casc_mpi_include_dir=/usr/local/mpi/include
+            fi
+            as_ac_Header=`$as_echo "ac_cv_header_$casc_mpi_include_dir/mpi.h" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $casc_mpi_include_dir/mpi.h" >&5
+$as_echo_n "checking for $casc_mpi_include_dir/mpi.h... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $casc_mpi_include_dir/mpi.h usability" >&5
+$as_echo_n "checking $casc_mpi_include_dir/mpi.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$casc_mpi_include_dir/mpi.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $casc_mpi_include_dir/mpi.h presence" >&5
+$as_echo_n "checking $casc_mpi_include_dir/mpi.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$casc_mpi_include_dir/mpi.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $casc_mpi_include_dir/mpi.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $casc_mpi_include_dir/mpi.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $casc_mpi_include_dir/mpi.h" >&5
+$as_echo_n "checking for $casc_mpi_include_dir/mpi.h... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  MPIINCLUDE="-I$casc_mpi_include_dir"
+fi
+
+
+
+            if test -z "$casc_mpi_lib_dirs"; then
+               casc_mpi_lib_dirs=/usr/local/mpi/lib
+            fi
+            casc_mpi_libs=mpi ;;
+      esac
+
+      for casc_lib in $casc_mpi_libs; do
+
+   # define some macros to hopefully improve readability
+
+
+
+   # check for the library from first argument.  If linking is successful
+   # the first time, the job is done, otherwise loop through DIRECTORY-LIST
+   as_ac_Lib=`$as_echo "ac_cv_lib_$casc_lib''_main" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for main in -l$casc_lib" >&5
+$as_echo_n "checking for main in -l$casc_lib... " >&6; }
+if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$casc_lib $MPILIBDIRS $MPILIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_Lib=yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "$as_ac_Lib=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+ac_res=`eval 'as_val=${'$as_ac_Lib'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_Lib'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  MPILIBS="$MPILIBS -l$casc_lib"
+                          casc_lib_found=yes
+
+else
+        for casc_lib_dir in $casc_mpi_lib_dirs; do
+
+         as_ac_Lib=`$as_echo "ac_cv_lib_$casc_lib''_main" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for main in -l$casc_lib" >&5
+$as_echo_n "checking for main in -l$casc_lib... " >&6; }
+if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$casc_lib -L$casc_lib_dir $MPILIBDIRS $MPILIBS -l$casc_lib $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_Lib=yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "$as_ac_Lib=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+ac_res=`eval 'as_val=${'$as_ac_Lib'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_Lib'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  MPILIBDIRS="-L$casc_lib_dir $MPILIBDIRS"
+            MPILIBS="$MPILIBS -l$casc_lib"
+            casc_lib_found=yes
+
+            break
+
+fi
+
+      done
+
+fi
+
+   # ACTION-IF-NOT_FOUND for when the library is found nowhere
+
+
+   unset casc_lib_found
+
+
+
+
+
+      done
+
+   else
+      if test -n "$casc_mpi_include_dir"; then
+         MPIINCLUDE="-I$casc_mpi_include_dir"
+      else
+         MPIINCLUDE=
+      fi
+
+      if test -n "$casc_mpi_lib_dirs"; then
+         for casc_lib_dir in $casc_mpi_lib_dirs; do
+            MPILIBDIRS="-L$casc_lib_dir $MPILIBDIRS"
+         done
+      else
+         MPILIBDIRS=
+      fi
+
+      for casc_lib in $casc_mpi_libs; do
+         MPILIBS="$MPILIBS -l$casc_lib"
+      done
+   fi
+
+            if test -z "$MPILIBS"; then
+             { $as_echo "$as_me:$LINENO: WARNING: MPI not found - must set manually using --with flags" >&5
+$as_echo "$as_me: WARNING: MPI not found - must set manually using --with flags" >&2;}
+            fi
+
+
+         else
+
+
+                                    cat > mpconftest.c << EOF
+#include "mpi.h"
+
+main(int argc, char **argv)
+{
+   int rank, size;
+   MPI_Init(&argc, &argv);
+   MPI_Comm_size(MPI_COMM_WORLD, &size);
+   MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+   MPI_Finalize();
+   return 0;
+}
+EOF
+
+            casc_mplibs=
+            casc_mplibdirs=
+            casc_flags=
+            casc_lmpi_exists=no
+
+
+            for casc_command in "$MPICC -show"\
+                                "$MPICC -v"\
+                                "$MPICC -#"\
+                                "$MPICC"; do
+
+               casc_this_output=`$casc_command mpconftest.c -o mpconftest 2>&1`
+
+                              xlc_p=`echo $casc_this_output | grep xlcentry`
+               if test -n "$xlc_p"; then
+                  casc_this_output=`echo $casc_this_output | sed 's/,/ /g'`
+               fi
+
+                              lmpi_p=`echo $casc_this_output | grep "\-lmpi"`
+               if test -n "$lmpi_p"; then
+                  casc_lmpi_exists=yes
+               fi
+
+               casc_mpoutput="$casc_mpoutput $casc_this_output"
+               casc_this_output=
+
+            done
+
+            rm -rf mpconftest*
+
+                        echo "main() {}" > cc_conftest.c
+            cc_output=`${CC-cc} -v -o cc_conftest cc_conftest.c 2>&1`
+            xlc_p=`echo $cc_output | grep xlcentry`
+            if test -n "$xlc_p"; then
+               casc_compiler_is_xlc=yes
+            fi
+            rm -rf cc_conftest*
+
+                                    if test "$casc_lmpi_exists" = "no"; then
+               casc_mplibs="-lmpi"
+            else
+               casc_mplibs=
+            fi
+
+            casc_want_arg=
+
+
+            for casc_arg in $casc_mpoutput; do
+
+               casc_old_want_arg=$casc_want_arg
+               casc_want_arg=
+
+               if test -n "$casc_old_want_arg"; then
+                  case "$casc_arg" in
+                  -*)
+                     casc_old_want_arg=
+                  ;;
+                  esac
+               fi
+
+               case "$casc_old_want_arg" in
+               '')
+                  case $casc_arg in
+                  /*.a)
+                     exists=false
+                     for f in $casc_flags; do
+                        if test x$casc_arg = x$f; then
+                           exists=true
+                        fi
+                     done
+                     if $exists; then
+                        casc_arg=
+                     else
+                        casc_flags="$casc_flags $casc_arg"
+                     fi
+                  ;;
+                  -binitfini:poe_remote_main)
+                     exists=false
+                     for f in $casc_flags; do
+                        if test x$casc_arg = x$f; then
+                           exists=true
+                        fi
+                     done
+                     if $exists; then
+                        casc_arg=
+                     else
+                        casc_flags="$casc_flags $casc_arg"
+                     fi
+                  ;;
+                  -lang*)
+                     casc_arg=
+                  ;;
+                  -[lLR])
+                     casc_want_arg=$casc_arg
+                     casc_arg=
+                  ;;
+                  -[lLR]*)
+                     exists=false
+                     for f in $casc_flags; do
+                        if test x$casc_arg = x$f; then
+                           exists=true
+                        fi
+                     done
+                     if $exists; then
+                        casc_arg=
+                     else
+                       casc_flags="$casc_flags $casc_arg"
+                     fi
+                  ;;
+                 -u)
+                     casc_want_arg=$casc_arg
+                     casc_arg=
+                  ;;
+                  -Y)
+                     casc_want_arg=$casc_arg
+                     casc_arg=
+                  ;;
+                  -I)
+                     casc_want_arg=$casc_arg
+                     casc_arg=
+                  ;;
+                  -I*)
+                     exists=false
+                     for f in $casc_flags; do
+                        if test x$casc_arg = x$f; then
+                           exists=true
+                        fi
+                     done
+                     if $exists; then
+                        casc_arg=
+                     else
+                        casc_flags="$casc_flags $casc_arg"
+                     fi
+                  ;;
+                  *)
+                     casc_arg=
+                  ;;
+                  esac
+
+               ;;
+               -[lLRI])
+                  casc_arg="casc_old_want_arg $casc_arg"
+               ;;
+               -u)
+                  casc_arg="-u $casc_arg"
+               ;;
+               -Y)
+                  casc_arg=`echo $casc_arg | sed -e 's%^P,%%'`
+                  SAVE_IFS=$IFS
+                  IFS=:
+                  casc_list=
+                  for casc_elt in $casc_arg; do
+                     casc_list="$casc_list -L$casc_elt"
+                  done
+                  IFS=$SAVE_IFS
+                  casc_arg="$casc_list"
+               ;;
+               esac
+
+                                             if test -n "$casc_arg"; then
+                  case $casc_arg in
+                  -I*)
+
+                                                               if test -z "$MPIINCLUDE"; then
+                        casc_cppflags="$casc_cppflags $casc_arg"
+                        casc_include_dir=`echo "$casc_arg" | sed 's/-I//g'`
+
+                        SAVE_CPPFLAGS="$CPPFLAGS"
+                        CPPFLAGS="$casc_cppflags"
+
+                        unset ac_cv_header_mpi_h
+                        if test "${ac_cv_header_mpi_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for mpi.h" >&5
+$as_echo_n "checking for mpi.h... " >&6; }
+if test "${ac_cv_header_mpi_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mpi_h" >&5
+$as_echo "$ac_cv_header_mpi_h" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking mpi.h usability" >&5
+$as_echo_n "checking mpi.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <mpi.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking mpi.h presence" >&5
+$as_echo_n "checking mpi.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <mpi.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: mpi.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: mpi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: mpi.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: mpi.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: mpi.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: mpi.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: mpi.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: mpi.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: mpi.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: mpi.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: mpi.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: mpi.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: mpi.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: mpi.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: mpi.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: mpi.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for mpi.h" >&5
+$as_echo_n "checking for mpi.h... " >&6; }
+if test "${ac_cv_header_mpi_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_mpi_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mpi_h" >&5
+$as_echo "$ac_cv_header_mpi_h" >&6; }
+
+fi
+if test "x$ac_cv_header_mpi_h" = x""yes; then
+  MPIINCLUDE="$casc_cppflags"
+fi
+
+
+
+                                                CPPFLAGS="$SAVE_CPPFLAGS"
+
+                     else
+                        casc_arg=
+                     fi
+                  ;;
+                  -[LR]*)
+
+                                          casc_mplibdirs="$casc_mplibdirs $casc_arg"
+                  ;;
+                  -l* | /*)
+
+                                          casc_mplibs="$casc_mplibs $casc_arg"
+                  ;;
+                  -binitfini:poe_remote_main)
+                     if test "$casc_compiler_is_xlc" = "yes"; then
+                        casc_mpflags="$casc_mpflags $casc_arg"
+                     fi
+                  ;;
+                  *)
+                                          casc_mpflags="$casc_mpflags $casc_arg"
+                  ;;
+                  esac
+
+                                                      LIBS_SAVE=$LIBS
+                  LIBS="$MPIINCLUDE $casc_mpflags $casc_mplibdirs $casc_mplibs"
+
+                  if test -n "`echo $LIBS | grep '\-R/'`"; then
+                     LIBS=`echo $LIBS | sed 's/-R\//-R \//'`
+                  fi
+
+
+
+                                                                        ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+                  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include "mpi.h"
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+int rank, size;
+   int argc;
+   char **argv;
+   MPI_Init(&argc, &argv);
+   MPI_Comm_size(MPI_COMM_WORLD, &size);
+   MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+   MPI_Finalize();
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  casc_result=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+                  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+                  LIBS=$LIBS_SAVE
+
+                  if test "$casc_result" = yes; then
+                     casc_result=
+                     break
+                  fi
+               fi
+            done
+
+                        MPILIBS=$casc_mplibs
+            MPILIBDIRS=$casc_mplibdirs
+            MPIFLAGS="$MPIFLAGS $casc_mpflags"
+
+
+            if test -n "`echo $MPILIBS | grep pmpich`" &&
+               test -z "`echo $MPILIBS | grep pthread`"; then
+                  LIBS_SAVE=$LIBS
+                  LIBS="$MPIINCLUDE $MPIFLAGS $MPILIBDIRS $MPILIBS -lpthread"
+                  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+                  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include "mpi.h"
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+int rank, size;
+   int argc;
+   char **argv;
+   MPI_Init(&argc, &argv);
+   MPI_Comm_size(MPI_COMM_WORLD, &size);
+   MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+   MPI_Finalize();
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  MPILIBS="$MPILIBS -lpthread"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+                  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+                  LIBS=$LIBS_SAVE
+            fi
+
+            { $as_echo "$as_me:$LINENO: checking for MPI include directories" >&5
+$as_echo_n "checking for MPI include directories... " >&6; }
+            { $as_echo "$as_me:$LINENO: result: $MPIINCLUDE" >&5
+$as_echo "$MPIINCLUDE" >&6; }
+            { $as_echo "$as_me:$LINENO: checking for MPI library directories" >&5
+$as_echo_n "checking for MPI library directories... " >&6; }
+            { $as_echo "$as_me:$LINENO: result: $MPILIBDIRS" >&5
+$as_echo "$MPILIBDIRS" >&6; }
+            { $as_echo "$as_me:$LINENO: checking for MPI libraries" >&5
+$as_echo_n "checking for MPI libraries... " >&6; }
+            { $as_echo "$as_me:$LINENO: result: $MPILIBS" >&5
+$as_echo "$MPILIBS" >&6; }
+            { $as_echo "$as_me:$LINENO: checking for other MPI-related flags" >&5
+$as_echo_n "checking for other MPI-related flags... " >&6; }
+            { $as_echo "$as_me:$LINENO: result: $MPIFLAGS" >&5
+$as_echo "$MPIFLAGS" >&6; }
+         fi
+      fi
+
+      if test "${casc_cv_mpi_include+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  casc_cv_mpi_include=$MPIINCLUDE
+fi
+
+      if test "${casc_cv_mpi_lib_dirs+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  casc_cv_mpi_lib_dirs=$MPILIBDIRS
+fi
+
+      if test "${casc_cv_mpi_libs+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  casc_cv_mpi_libs=$MPILIBS
+fi
+
+      if test "${casc_cv_mpi_flags+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  casc_cv_mpi_flags=$MPIFLAGS
+fi
+
+   fi
+
+
+
+
+
+
+
+      ;;
+   esac
+
+   if test -n "$MPIINCLUDE" -o -n "$MPILIBS" -o -n "$MPILIBDIRS"; then
+      with_mpi=yes
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MPI 1
+_ACEOF
+
+      INC_PATH="$MPIINCLUDE $INC_PATH"
+      LIB_NAME="$MPILIBS $LIB_NAME"
+      LIB_PATH="$MPILIBDIRS $LIB_PATH"
+
+
+btng_log_vars="MPIINCLUDE MPILIBS MPILIBDIRS"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:17113:" "After successfully finding MPI using casc_find_mpi: $btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+      CONFIGURED_WITH_MPI="with_mpi"
+
+   fi
+fi
+
+
+btng_log_vars="with_mpi"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:17131:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+#
+# DEFINES :
+#	        zlib_PREFIX
+#		zlib_INCLUDES
+#		zlib_LIBS
+#
+{ $as_echo "$as_me:$LINENO: checking if zlib is wanted" >&5
+$as_echo_n "checking if zlib is wanted... " >&6; }
+
+# Check whether --with-zlib was given.
+if test "${with_zlib+set}" = set; then
+  withval=$with_zlib; if test "$withval" != no ; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+  if test "$withval" == yes ;
+  then
+     ZLIB_HOME=/usr/local
+  else
+     ZLIB_HOME="$withval"
+  fi
+  if test ! -d "$ZLIB_HOME"
+  then
+    { $as_echo "$as_me:$LINENO: WARNING: Sorry, $ZLIB_HOME does not exist, checking usual places" >&5
+$as_echo "$as_me: WARNING: Sorry, $ZLIB_HOME does not exist, checking usual places" >&2;}
+    ZLIB_HOME=/usr/local
+    if test ! -f "${ZLIB_HOME}/include/zlib.h"
+    then
+       ZLIB_HOME=/usr
+    fi
+  fi
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+
+
+#
+# Locate zlib, if wanted
+#
+if test -n "${ZLIB_HOME}"
+then
+        ZLIB_OLD_LDFLAGS=$LDFLAGS
+        ZLIB_OLD_CPPFLAGS=$LDFLAGS
+        LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
+        CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"
+
+        ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+        { $as_echo "$as_me:$LINENO: checking for inflateEnd in -lz" >&5
+$as_echo_n "checking for inflateEnd in -lz... " >&6; }
+if test "${ac_cv_lib_z_inflateEnd+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inflateEnd ();
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+return inflateEnd ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_z_inflateEnd=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_z_inflateEnd=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateEnd" >&5
+$as_echo "$ac_cv_lib_z_inflateEnd" >&6; }
+if test "x$ac_cv_lib_z_inflateEnd" = x""yes; then
+  zlib_cv_libz=yes
+else
+  zlib_cv_libz=no
+fi
+
+        if test "${ac_cv_header_zlib_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
+$as_echo_n "checking for zlib.h... " >&6; }
+if test "${ac_cv_header_zlib_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
+$as_echo "$ac_cv_header_zlib_h" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking zlib.h usability" >&5
+$as_echo_n "checking zlib.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <zlib.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking zlib.h presence" >&5
+$as_echo_n "checking zlib.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <zlib.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
+$as_echo_n "checking for zlib.h... " >&6; }
+if test "${ac_cv_header_zlib_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_zlib_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
+$as_echo "$ac_cv_header_zlib_h" >&6; }
+
+fi
+if test "x$ac_cv_header_zlib_h" = x""yes; then
+  zlib_cv_zlib_h=yes
+else
+  zlib_cv_zlib_h=no
+fi
+
+
+        ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+        if test "$zlib_cv_libz" = "yes" -a "$zlib_cv_zlib_h" = "yes"
+        then
+	        zlib_PREFIX="${ZLIB_HOME}"
+		zlib_INCLUDES="-I${ZLIB_HOME}/include"
+		zlib_LIBS="-L${ZLIB_HOME}/lib -lz"
+                #
+                # If both library and header were found, use them
+                #
+
+{ $as_echo "$as_me:$LINENO: checking for inflateEnd in -lz" >&5
+$as_echo_n "checking for inflateEnd in -lz... " >&6; }
+if test "${ac_cv_lib_z_inflateEnd+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inflateEnd ();
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+return inflateEnd ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_z_inflateEnd=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_z_inflateEnd=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateEnd" >&5
+$as_echo "$ac_cv_lib_z_inflateEnd" >&6; }
+if test "x$ac_cv_lib_z_inflateEnd" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+  LIBS="-lz $LIBS"
+
+fi
+
+                { $as_echo "$as_me:$LINENO: checking zlib in ${ZLIB_HOME}" >&5
+$as_echo_n "checking zlib in ${ZLIB_HOME}... " >&6; }
+                { $as_echo "$as_me:$LINENO: result: ok" >&5
+$as_echo "ok" >&6; }
+        else
+                #
+                # If either header or library was not found, revert and bomb
+                #
+                { $as_echo "$as_me:$LINENO: checking zlib in ${ZLIB_HOME}" >&5
+$as_echo_n "checking zlib in ${ZLIB_HOME}... " >&6; }
+                LDFLAGS="$ZLIB_OLD_LDFLAGS"
+                CPPFLAGS="$ZLIB_OLD_CPPFLAGS"
+                { $as_echo "$as_me:$LINENO: result: failed" >&5
+$as_echo "failed" >&6; }
+                { { $as_echo "$as_me:$LINENO: error: either specify a valid zlib installation with --with-zlib=DIR or disable zlib usage with --without-zlib" >&5
+$as_echo "$as_me: error: either specify a valid zlib installation with --with-zlib=DIR or disable zlib usage with --without-zlib" >&2;}
+   { (exit 1); exit 1; }; }
+        fi
+fi
+
+
+
+# Split zlib_LIBS into the LIB_PATH part (zlib_LIB_PATH) and the LIB_NAME part (zlib_LIB_NAME)
+if test -n "${zlib_LIBS}"; then
+  for i in ${zlib_LIBS}; do
+    case "$i" in
+    -L*) zlib_LIB_PATH="${zlib_LIB_PATH} $i" ;;
+    *) zlib_LIB_NAME="${zlib_LIB_NAME} $i" ;;
+    esac
+  done
+fi
+
+LIB_PATH="$zlib_LIB_PATH $LIB_PATH"
+LIB_NAME="$zlib_LIB_NAME $LIB_NAME"
+INC_PATH="$zlib_INCLUDES $INC_PATH"
+
+
+
+# Begin CASC_SUPPORT_HDF5
+# Defines hdf5_PREFIX hdf5_INCLUDES and hdf5_LIBS if with-hdf5 is specified.
+
+# Check whether --with-hdf5 was given.
+if test "${with_hdf5+set}" = set; then
+  withval=$with_hdf5;
+else
+  with_hdf5=no
+fi
+
+
+case "$with_hdf5" in
+  no)
+    { $as_echo "$as_me:$LINENO: configuring without HDF5 support" >&5
+$as_echo "$as_me: configuring without HDF5 support" >&6;}
+    : Do nothing
+  ;;
+  yes)
+    # HDF5 install path was not specified.
+    # Look in a couple of standard locations to probe if
+    # HDF5 header files are there.
+    { $as_echo "$as_me:$LINENO: checking for HDF5 installation" >&5
+$as_echo_n "checking for HDF5 installation... " >&6; }
+    for dir in /usr /usr/local; do
+      if test -f ${dir}/include/hdf5.h; then
+        hdf5_PREFIX=${dir}
+        break
+      fi
+    done
+    { $as_echo "$as_me:$LINENO: result: $hdf5_PREFIX" >&5
+$as_echo "$hdf5_PREFIX" >&6; }
+  ;;
+  *)
+    # HDF5 install path was specified.
+    { $as_echo "$as_me:$LINENO: checking for HDF5 installation" >&5
+$as_echo_n "checking for HDF5 installation... " >&6; }
+
+    if test -f ${with_hdf5}/include/hdf5.h; then
+        hdf5_PREFIX=$with_hdf5
+        hdf5_INCLUDES="-I${hdf5_PREFIX}/include"
+        hdf5_LIBS="-L${hdf5_PREFIX}/lib -lhdf5"
+        { $as_echo "$as_me:$LINENO: result: $hdf5_PREFIX" >&5
+$as_echo "$hdf5_PREFIX" >&6; }
+    else
+        { $as_echo "$as_me:$LINENO: result: $hdf5_PREFIX" >&5
+$as_echo "$hdf5_PREFIX" >&6; }
+        { { $as_echo "$as_me:$LINENO: error: HDF5 not found in $with_hdf5" >&5
+$as_echo "$as_me: error: HDF5 not found in $with_hdf5" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  ;;
+esac
+
+
+
+# Test compiling an HDF application
+
+# NOTE that AC_SEARCH_LIBS didn't work completely so
+# use a more complicated example program to see
+# if that will catch when HDF is not working.
+if test "${hdf5_PREFIX+set}" = set; then
+
+
+   { $as_echo "$as_me:$LINENO: checking whether HDF5 link works" >&5
+$as_echo_n "checking whether HDF5 link works... " >&6; }
+   ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+   casc_save_LIBS=$LIBS
+   casc_save_CXXFLAGS=$CXXFLAGS
+
+   # NOTE lib z and m were from BTNG macro.
+   LIBS="${LIBS} ${hdf5_LIBS} $zlib_LIBS $szlib_LIBS -lm "
+   CXXFLAGS="${CXXFLAGS} ${hdf5_INCLUDES}"
+   cat >conftest.$ac_ext <<_ACEOF
+
+      #include "hdf5.h"
+      #define FILE "file.h5"
+
+      int main() {
+
+         hid_t       file_id;   /* file identifier */
+         herr_t      status;
+
+         /* Create a new file using default properties. */
+         file_id = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+         /* Terminate access to the file. */
+         status = H5Fclose(file_id);
+     }
+
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  casc_hdf5_compile=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	casc_hdf5_compile=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+
+   LIBS=$casc_save_LIBS
+   unset casc_save_LIBS
+   CXXFLAGS=$casc_save_CXXFLAGS
+   unset casc_save_CXXFLAGS
+
+   ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+   { $as_echo "$as_me:$LINENO: result: $casc_hdf5_compile" >&5
+$as_echo "$casc_hdf5_compile" >&6; }
+
+   if test "$casc_hdf5_compile" = no; then
+      { { $as_echo "$as_me:$LINENO: error: HDF5 compile/link test failed" >&5
+$as_echo "$as_me: error: HDF5 compile/link test failed" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+fi
+
+# END CASC_SUPPORT_HDF5
+
+
+if test "${hdf5_PREFIX+set}" = set; then
+
+# Split hdf5_LIBS into the LIB_PATH part (hdf5_LIB_PATH) and the LIB_NAME part (hdf5_LIB_NAME)
+if test -n "${hdf5_LIBS}"; then
+  for i in ${hdf5_LIBS}; do
+    case "$i" in
+    -L*) hdf5_LIB_PATH="${hdf5_LIB_PATH} $i" ;;
+    *) hdf5_LIB_NAME="${hdf5_LIB_NAME} $i" ;;
+    esac
+  done
+fi
+
+  LIB_PATH="$hdf5_LIB_PATH $LIB_PATH"
+  LIB_NAME="$hdf5_LIB_NAME $LIB_NAME"
+  INC_PATH="$hdf5_INCLUDES $INC_PATH"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_HDF5 1
+_ACEOF
+
+else
+  if test ! "$with_hdf5" = no; then
+   { { $as_echo "$as_me:$LINENO: error: HDF5 not found - either specify a valid location via --with-hdf5=PATH or if you do not have HDF5 use --without-hdf5.  Note: if you do not have HDF5 you will not be able to use SAMRAI's VisIt Data writer and the VisIt visualization package." >&5
+$as_echo "$as_me: error: HDF5 not found - either specify a valid location via --with-hdf5=PATH or if you do not have HDF5 use --without-hdf5.  Note: if you do not have HDF5 you will not be able to use SAMRAI's VisIt Data writer and the VisIt visualization package." >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+fi
+
+
+btng_log_vars="hdf5_INCLUDES INC_PATH hdf5_LIB_PATH hdf5_LIB_NAME LIB_PATH LIB_NAME"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:17732:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+
+
+# Begin CASC_SUPPORT_SILO
+# Defines silo_PREFIX silo_INCLUDES and silo_LIBS if with-silo is specified.
+
+# Check whether --with-silo was given.
+if test "${with_silo+set}" = set; then
+  withval=$with_silo;
+else
+  with_silo=no
+fi
+
+
+case "$with_silo" in
+  no)
+    { $as_echo "$as_me:$LINENO: configuring without SILO support" >&5
+$as_echo "$as_me: configuring without SILO support" >&6;}
+    : Do nothing
+  ;;
+  yes)
+    # SILO install path was not specified.
+    # Look in a couple of standard locations to probe if
+    # SILO header files are there.
+    { $as_echo "$as_me:$LINENO: checking for SILO installation" >&5
+$as_echo_n "checking for SILO installation... " >&6; }
+    for dir in /usr /usr/local; do
+      if test -f ${dir}/include/silo.h; then
+        silo_PREFIX=${dir}
+        break
+      fi
+    done
+    { $as_echo "$as_me:$LINENO: result: $silo_PREFIX" >&5
+$as_echo "$silo_PREFIX" >&6; }
+  ;;
+  *)
+    # SILO install path was specified.
+    { $as_echo "$as_me:$LINENO: checking for SILO installation" >&5
+$as_echo_n "checking for SILO installation... " >&6; }
+    silo_PREFIX=$with_silo
+    silo_INCLUDES="-I${silo_PREFIX}/include"
+    if test -f ${silo_PREFIX}/include/silo.h; then
+        { $as_echo "$as_me:$LINENO: result: $silo_PREFIX" >&5
+$as_echo "$silo_PREFIX" >&6; }
+    else
+        { $as_echo "$as_me:$LINENO: result: $silo_PREFIX" >&5
+$as_echo "$silo_PREFIX" >&6; }
+        { { $as_echo "$as_me:$LINENO: error: SILO not found in $with_silo" >&5
+$as_echo "$as_me: error: SILO not found in $with_silo" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  ;;
+esac
+
+# Determine which SILO library is built
+if test "${silo_PREFIX+set}" = set; then
+   { $as_echo "$as_me:$LINENO: checking for SILO library" >&5
+$as_echo_n "checking for SILO library... " >&6; }
+   if test -f ${silo_PREFIX}/lib/libsilo.a; then
+      silo_LIBS='-lsilo'
+      { $as_echo "$as_me:$LINENO: result: using $silo_LIBS" >&5
+$as_echo "using $silo_LIBS" >&6; }
+   elif test -f ${silo_PREFIX}/lib/libsiloh5.a; then
+      silo_LIBS='-lsiloh5'
+      { $as_echo "$as_me:$LINENO: result: using $silo_LIBS" >&5
+$as_echo "using $silo_LIBS" >&6; }
+   else
+      { $as_echo "$as_me:$LINENO: result: using $silo_LIBS" >&5
+$as_echo "using $silo_LIBS" >&6; }
+      { { $as_echo "$as_me:$LINENO: error: Could not fine silo library in $silo_PREFIX" >&5
+$as_echo "$as_me: error: Could not fine silo library in $silo_PREFIX" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+
+   silo_LIBS="-L${silo_PREFIX}/lib ${silo_LIBS}"
+fi
+
+# END CASC_SUPPORT_SILO
+
+
+if test "${silo_PREFIX+set}" = set; then
+
+# Split silo_LIBS into the LIB_PATH part (silo_LIB_PATH) and the LIB_NAME part (silo_LIB_NAME)
+if test -n "${silo_LIBS}"; then
+  for i in ${silo_LIBS}; do
+    case "$i" in
+    -L*) silo_LIB_PATH="${silo_LIB_PATH} $i" ;;
+    *) silo_LIB_NAME="${silo_LIB_NAME} $i" ;;
+    esac
+  done
+fi
+
+  LIB_PATH="$silo_LIB_PATH $LIB_PATH"
+  LIB_NAME="$silo_LIB_NAME $LIB_NAME"
+  INC_PATH="$silo_INCLUDES $INC_PATH"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SILO 1
+_ACEOF
+
+fi
+
+
+btng_log_vars="silo_INCLUDES INC_PATH silo_LIB_PATH silo_LIB_NAME LIB_PATH LIB_NAME"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:17847:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+
+# Begin macro BTNG_SUPPORT_HYPRE
+
+# Start macro BTNG_ARG_WITH_ENV_WRAPPER with args hypre and hypre_PREFIX
+{ $as_echo "$as_me:$LINENO: checking for hypre" >&5
+$as_echo_n "checking for hypre... " >&6; }
+if test "${btng_cv_prog_hypre+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+# Check whether --with-hypre was given.
+if test "${with_hypre+set}" = set; then
+  withval=$with_hypre;
+fi
+
+# Set hypre_PREFIX, using environment setting if available
+#   and if command line is ambiguous.
+case "$with_hypre" in
+  no)
+    # User explictly turned off hypre.
+    # Ignore value of hypre_PREFIX, even if set in the environment.
+    unset hypre_PREFIX
+    ;;
+  yes|'')
+    # Flag unissued or ambiguously issued using --with-hypre.
+    # Because the user did not explicitly turn if off,
+    # try to set hypre_PREFIX.
+    # If environment variable hypre_PREFIX is available, use it.
+    # If not, try the user-supplied commands to set it.
+    if test -n "${hypre_PREFIX}" ;  then
+      : Nothing to do here actually, because hypre_PREFIX is already in the environment.
+    else
+      if test "$with_hypre" = '' ; then unset hypre_PREFIX; else hypre_PREFIX=; fi
+
+    fi
+    ;;
+  *)
+    # User issued a specific string using --with-hypre=non-null-string.
+    # so that is used to set hypre_PREFIX.
+    hypre_PREFIX=$with_hypre
+    ;;
+esac
+if test "${hypre_PREFIX+set}" = set ; then
+  # This block executes the quality check commands, if any, for hypre_PREFIX.
+  :
+fi
+# Cache the value if it was found.
+if test "${hypre_PREFIX+set}" = set ; then
+  btng_cv_prog_hypre=${hypre_PREFIX}
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $btng_cv_prog_hypre" >&5
+$as_echo "$btng_cv_prog_hypre" >&6; }
+# Set hypre_PREFIX from cache.
+# hypre_PREFIX is not yet set if we grabbed it from cache.
+if test "${btng_cv_prog_hypre+set}" = set ; then
+  hypre_PREFIX=$btng_cv_prog_hypre
+else
+  unset hypre_PREFIX
+fi
+# End macro BTNG_ARG_WITH_ENV_WRAPPER with args hypre_PREFIX and hypre
+
+
+# Begin macro BTNG_VAR_SET_HYPRE
+if test "${hypre_PREFIX+set}" = set ; then
+  if test ! "${hypre_INCLUDES+set}" = set ; then
+    test -n "${hypre_PREFIX}" && hypre_INCLUDES="-I${hypre_PREFIX}/include"
+  fi
+  if test ! "${hypre_LIBS+set}" = set ; then
+    hypre_libs_found=
+    hypre_libs_test='-lHYPRE -lHYPRE_sstruct_ls -lHYPRE_sstruct_mv -lHYPRE_struct_ls -lHYPRE_struct_mv -lHYPRE_parcsr_ls -lHYPRE_DistributedMatrixPilutSolver -lHYPRE_ParaSails -lHYPRE_Euclid -lHYPRE_MatrixMatrix -lHYPRE_DistributedMatrix -lHYPRE_IJ_mv -lHYPRE_parcsr_mv -lHYPRE_seq_mv -lHYPRE_krylov -lHYPRE_utilities'
+    if test -n "${hypre_PREFIX}" ; then
+      for i in $hypre_libs_test ; do
+	tmp_name=`echo $i | sed 's/^-l//'`
+        if test -f "${hypre_PREFIX}/lib/lib${tmp_name}.a" || \
+          test -f "${hypre_PREFIX}/lib/lib${tmp_name}.so"; then
+	  hypre_libs_found="$hypre_libs_found $i"
+        fi
+      done
+      hypre_LIBS="-L${hypre_PREFIX}/lib ${hypre_libs_found}"
+    fi
+  fi
+fi
+# End macro BTNG_VAR_SET_HYPRE
+
+
+
+btng_log_vars="hypre_PREFIX hypre_INCLUDES hypre_LIBS"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:17949:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+if test "${hypre_PREFIX+set}" = set; then
+  btng_save_cppflags=$CPPFLAGS
+
+  # Add hypre include flags to cpp so we can examine its header file.
+  CPPFLAGS="$hypre_INCLUDES $CPPFLAGS"
+
+
+btng_log_vars="hypre_INCLUDES CPPFLAGS"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:17968:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+  # Check if HYPRE header is ok.
+  if test "${ac_cv_header_HYPRE_config_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for HYPRE_config.h" >&5
+$as_echo_n "checking for HYPRE_config.h... " >&6; }
+if test "${ac_cv_header_HYPRE_config_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_HYPRE_config_h" >&5
+$as_echo "$ac_cv_header_HYPRE_config_h" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking HYPRE_config.h usability" >&5
+$as_echo_n "checking HYPRE_config.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <HYPRE_config.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking HYPRE_config.h presence" >&5
+$as_echo_n "checking HYPRE_config.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <HYPRE_config.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: HYPRE_config.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: HYPRE_config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: HYPRE_config.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: HYPRE_config.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: HYPRE_config.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: HYPRE_config.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: HYPRE_config.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: HYPRE_config.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: HYPRE_config.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: HYPRE_config.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: HYPRE_config.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: HYPRE_config.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: HYPRE_config.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: HYPRE_config.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: HYPRE_config.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: HYPRE_config.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for HYPRE_config.h" >&5
+$as_echo_n "checking for HYPRE_config.h... " >&6; }
+if test "${ac_cv_header_HYPRE_config_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_HYPRE_config_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_HYPRE_config_h" >&5
+$as_echo "$ac_cv_header_HYPRE_config_h" >&6; }
+
+fi
+if test "x$ac_cv_header_HYPRE_config_h" = x""yes; then
+  :
+else
+  { { $as_echo "$as_me:$LINENO: error: Problems checking HYPRE_config.h" >&5
+$as_echo "$as_me: error: Problems checking HYPRE_config.h" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+
+  # Check if HYPRE was compiled with parallelism.
+  { $as_echo "$as_me:$LINENO: checking if hypre is serial or parallel" >&5
+$as_echo_n "checking if hypre is serial or parallel... " >&6; }
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <HYPRE_config.h>
+#ifdef HYPRE_SEQUENTIAL
+HYPRE_SEQUENTIAL_IS_DEFINED
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^HYPRE_SEQUENTIAL_IS_DEFINED$" >/dev/null 2>&1; then
+  hypre_PARALLELISM=serial
+else
+  hypre_PARALLELISM=parallel
+fi
+rm -f conftest*
+
+  { $as_echo "$as_me:$LINENO: result: $hypre_PARALLELISM" >&5
+$as_echo "$hypre_PARALLELISM" >&6; }
+
+  # Reset cpp after checking hypre header file.
+  CPPFLAGS=$btng_save_cppflags
+  unset btng_save_cppflags
+
+
+
+btng_log_vars="CPPFLAGS"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:18152:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+
+btng_log_vars="hypre_config_file hypre_PARALLELISM"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:18166:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+fi
+# End macro BTNG_SUPPORT_HYPRE
+
+if test "${hypre_PREFIX+set}" = set; then
+
+# Split hypre_LIBS into the LIB_PATH part (hypre_LIB_PATH) and the LIB_NAME part (hypre_LIB_NAME)
+if test -n "${hypre_LIBS}"; then
+  for i in ${hypre_LIBS}; do
+    case "$i" in
+    -L*) hypre_LIB_PATH="${hypre_LIB_PATH} $i" ;;
+    *) hypre_LIB_NAME="${hypre_LIB_NAME} $i" ;;
+    esac
+  done
+fi
+
+  LIB_PATH="$hypre_LIB_PATH $LIB_PATH"
+  LIB_NAME="$hypre_LIB_NAME $LIB_NAME"
+  INC_PATH="$hypre_INCLUDES $INC_PATH"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_HYPRE 1
+_ACEOF
+
+  { $as_echo "$as_me:$LINENO: checking whether HYPRE was compiled with MPI" >&5
+$as_echo_n "checking whether HYPRE was compiled with MPI... " >&6; }
+  # Check how HYPRe was compiled.
+
+
+btng_log_vars="hypre_PARALLELISM"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:18206:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+  if test "$hypre_PARALLELISM" = 'parallel'; then
+     { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+     if test "$with_mpi" = no ; then
+        { { $as_echo "$as_me:$LINENO: error: sequential SAMRAI cannot call parallel HYPRE" >&5
+$as_echo "$as_me: error: sequential SAMRAI cannot call parallel HYPRE" >&2;}
+   { (exit 1); exit 1; }; }
+     fi
+  elif test "$hypre_PARALLELISM" = 'serial'; then
+     { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HYPRE_SEQUENTIAL 1
+_ACEOF
+
+     if test "$with_mpi" != no ; then
+        { { $as_echo "$as_me:$LINENO: error: parallel SAMRAI cannot call sequential HYPRE" >&5
+$as_echo "$as_me: error: parallel SAMRAI cannot call sequential HYPRE" >&2;}
+   { (exit 1); exit 1; }; }
+     fi
+  else
+     { $as_echo "$as_me:$LINENO: WARNING: Cannot determine if hypre was compiled for serial or parallel" >&5
+$as_echo "$as_me: WARNING: Cannot determine if hypre was compiled for serial or parallel" >&2;}
+  fi
+else
+  { $as_echo "$as_me:$LINENO: NOTIFICATION: SAMRAI configured without the HYPRE library" >&5
+$as_echo "$as_me: NOTIFICATION: SAMRAI configured without the HYPRE library" >&6;}
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_HYPRE 1
+_ACEOF
+
+fi
+
+
+# Check whether --with-superlu-lib was given.
+if test "${with_superlu_lib+set}" = set; then
+  withval=$with_superlu_lib;
+else
+  with_superlu_lib='no'
+fi
+
+
+if test "${with_superlu_lib}" = yes; then
+  superlu_LIB=
+elif test "${with_superlu_lib}" = no; then
+  superlu_LIB=
+else
+  superlu_LIB="${with_superlu_lib}"
+fi
+LIB_NAME="$superlu_LIB $LIB_NAME"
+
+
+# Begin macro BTNG_SUPPORT_SPOOLES
+
+unset spooles_PREFIX
+
+
+# Check whether --with-spooles was given.
+if test "${with_spooles+set}" = set; then
+  withval=$with_spooles; if test "${with_spooles+set}" = yes ; then
+  spooles_PREFIX=
+elif test "${with_spooles}" = no; then
+  unset spooles_PREFIX;
+else
+  spooles_PREFIX="${with_spooles}"
+fi
+
+fi
+
+
+if test "${spooles_PREFIX+set}" = set; then
+  # Set spooles_LIBS and spooles_INCLUDE if they are not already set.
+  # Note that we expect library archives and headers to be
+  # directly under spooles_PREFIX rather than subdirectories
+  # lib and include of spooles_PREFIX.
+  if test ! "${spooles_LIBS+set}" = set; then
+    if test ! "${spooles_PREFIX}" = ''; then
+      spooles_LIBS="-L${spooles_PREFIX}"
+    fi
+    spooles_LIBS="${spooles_LIBS} -lspoolesMPI -lspooles"
+  fi
+  if test ! "${spooles_INCLUDES+set}" = set ; then
+    if test ! "${spooles_PREFIX}" = ''; then
+      spooles_INCLUDES="-I${spooles_PREFIX}"
+    fi
+  fi
+fi
+
+
+
+btng_log_vars="spooles_PREFIX spooles_LIBS spooles_INCLUDES"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:18310:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+# End macro BTNG_SUPPORT_SPOOLES
+
+if test "${spooles_PREFIX+set}" = set; then
+
+# Split spooles_LIBS into the LIB_PATH part (spooles_LIB_PATH) and the LIB_NAME part (spooles_LIB_NAME)
+if test -n "${spooles_LIBS}"; then
+  for i in ${spooles_LIBS}; do
+    case "$i" in
+    -L*) spooles_LIB_PATH="${spooles_LIB_PATH} $i" ;;
+    *) spooles_LIB_NAME="${spooles_LIB_NAME} $i" ;;
+    esac
+  done
+fi
+
+  LIB_PATH="$spooles_LIB_PATH $LIB_PATH"
+  LIB_NAME="$spooles_LIB_NAME $LIB_NAME"
+  INC_PATH="$spooles_INCLUDES $INC_PATH"
+fi
+
+
+# Begin macro SUPPORT_PETSC
+
+# Set PETSC_DIR to the PETSC root directory.
+
+# Start macro BTNG_ARG_WITH_PREFIX
+
+# Start macro BTNG_ARG_WITH_ENV_WRAPPER with args petsc and PETSC_DIR
+{ $as_echo "$as_me:$LINENO: checking for petsc" >&5
+$as_echo_n "checking for petsc... " >&6; }
+if test "${btng_cv_prog_petsc+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+# Check whether --with-petsc was given.
+if test "${with_petsc+set}" = set; then
+  withval=$with_petsc;
+fi
+
+# Set PETSC_DIR, using environment setting if available
+#   and if command line is ambiguous.
+case "$with_petsc" in
+  no)
+    # User explictly turned off petsc.
+    # Ignore value of PETSC_DIR, even if set in the environment.
+    unset PETSC_DIR
+    ;;
+  yes|'')
+    # Flag unissued or ambiguously issued using --with-petsc.
+    # Because the user did not explicitly turn if off,
+    # try to set PETSC_DIR.
+    # If environment variable PETSC_DIR is available, use it.
+    # If not, try the user-supplied commands to set it.
+    if test -n "${PETSC_DIR}" ;  then
+      : Nothing to do here actually, because PETSC_DIR is already in the environment.
+    else
+      # User was not specific about specifying PETSc.
+# PETSc should be off by default.
+# So if user specified --with-petsc, it should include a path or it is an error.
+if test "${with_petsc+set}" = set ; then
+  # User specified --with-petsc ambiguously.
+  { { $as_echo "$as_me:$LINENO: error: You must specify a path with --with-petsc=..." >&5
+$as_echo "$as_me: error: You must specify a path with --with-petsc=..." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  # User did not specify --with-petsc, so turn it off.
+  unset PETSC_DIR;
+fi
+
+
+    fi
+    ;;
+  *)
+    # User issued a specific string using --with-petsc=non-null-string.
+    # so that is used to set PETSC_DIR.
+    PETSC_DIR=$with_petsc
+    ;;
+esac
+if test "${PETSC_DIR+set}" = set ; then
+  # This block executes the quality check commands, if any, for PETSC_DIR.
+  :
+fi
+# Cache the value if it was found.
+if test "${PETSC_DIR+set}" = set ; then
+  btng_cv_prog_petsc=${PETSC_DIR}
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $btng_cv_prog_petsc" >&5
+$as_echo "$btng_cv_prog_petsc" >&6; }
+# Set PETSC_DIR from cache.
+# PETSC_DIR is not yet set if we grabbed it from cache.
+if test "${btng_cv_prog_petsc+set}" = set ; then
+  PETSC_DIR=$btng_cv_prog_petsc
+else
+  unset PETSC_DIR
+fi
+# End macro BTNG_ARG_WITH_ENV_WRAPPER with args PETSC_DIR and petsc
+# End macro BTNG_ARG_WITH_PREFIX
+
+
+# Set version numbers (PETSC_VERSION_...) for use by configure.
+# Users can directly access these from the PETSc header file.
+if test "${PETSC_DIR+set}" = set; then
+
+PETSC_VERSION_MAJOR=`sed -e '/^[ \t]\{0,\}#define PETSC_VERSION_MAJOR/!d' -e 's/.\{0,\}[ \t]\{1,\}//' $PETSC_DIR/include/petscversion.h`
+PETSC_VERSION_MINOR=`sed -e '/^[ \t]\{0,\}#define PETSC_VERSION_MINOR/!d' -e 's/.\{0,\}[ \t]\{1,\}//' $PETSC_DIR/include/petscversion.h`
+PETSC_VERSION_SUBMINOR=`sed -e '/^[ \t]\{0,\}#define PETSC_VERSION_SUBMINOR/!d' -e 's/.\{0,\}[ \t]\{1,\}//' $PETSC_DIR/include/petscversion.h`
+
+fi
+
+
+btng_log_vars="PETSC_VERSION_MAJOR PETSC_VERSION_MINOR PETSC_VERSION_SUBMINOR"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:18435:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+# Set PETSC_ARCH.
+
+# Start macro BTNG_ARG_WITH_PREFIX
+
+# Start macro BTNG_ARG_WITH_ENV_WRAPPER with args petsc-arch and PETSC_ARCH
+{ $as_echo "$as_me:$LINENO: checking for petsc-arch" >&5
+$as_echo_n "checking for petsc-arch... " >&6; }
+if test "${btng_cv_prog_petsc_arch+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+# Check whether --with-petsc-arch was given.
+if test "${with_petsc_arch+set}" = set; then
+  withval=$with_petsc_arch;
+fi
+
+# Set PETSC_ARCH, using environment setting if available
+#   and if command line is ambiguous.
+case "$with_petsc_arch" in
+  no)
+    # User explictly turned off petsc-arch.
+    # Ignore value of PETSC_ARCH, even if set in the environment.
+    unset PETSC_ARCH
+    ;;
+  yes|'')
+    # Flag unissued or ambiguously issued using --with-petsc-arch.
+    # Because the user did not explicitly turn if off,
+    # try to set PETSC_ARCH.
+    # If environment variable PETSC_ARCH is available, use it.
+    # If not, try the user-supplied commands to set it.
+    if test -n "${PETSC_ARCH}" ;  then
+      : Nothing to do here actually, because PETSC_ARCH is already in the environment.
+    else
+      if test "${with_petsc_arch}" = yes ; then
+  { { $as_echo "$as_me:$LINENO: error: If you specify --with-petsc-arch, you must give it the path as in --with-petsc-arch=/installation/path" >&5
+$as_echo "$as_me: error: If you specify --with-petsc-arch, you must give it the path as in --with-petsc-arch=/installation/path" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+echo "configure:18479:" environment PETSC_ARCH not defined >&5
+
+
+    fi
+    ;;
+  *)
+    # User issued a specific string using --with-petsc-arch=non-null-string.
+    # so that is used to set PETSC_ARCH.
+    PETSC_ARCH=$with_petsc_arch
+    ;;
+esac
+if test "${PETSC_ARCH+set}" = set ; then
+  # This block executes the quality check commands, if any, for PETSC_ARCH.
+  :
+fi
+# Cache the value if it was found.
+if test "${PETSC_ARCH+set}" = set ; then
+  btng_cv_prog_petsc_arch=${PETSC_ARCH}
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $btng_cv_prog_petsc_arch" >&5
+$as_echo "$btng_cv_prog_petsc_arch" >&6; }
+# Set PETSC_ARCH from cache.
+# PETSC_ARCH is not yet set if we grabbed it from cache.
+if test "${btng_cv_prog_petsc_arch+set}" = set ; then
+  PETSC_ARCH=$btng_cv_prog_petsc_arch
+else
+  unset PETSC_ARCH
+fi
+# End macro BTNG_ARG_WITH_ENV_WRAPPER with args PETSC_ARCH and petsc-arch
+# End macro BTNG_ARG_WITH_PREFIX
+
+
+# Set PETSC_OPTIMIZE.
+
+# Start macro BTNG_ARG_WITH_ENV_WRAPPER with args petsc-optimize and PETSC_OPTIMIZE
+{ $as_echo "$as_me:$LINENO: checking for petsc-optimize" >&5
+$as_echo_n "checking for petsc-optimize... " >&6; }
+if test "${btng_cv_prog_petsc_optimize+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+# Check whether --with-petsc-optimize was given.
+if test "${with_petsc_optimize+set}" = set; then
+  withval=$with_petsc_optimize;
+fi
+
+# Set PETSC_OPTIMIZE, using environment setting if available
+#   and if command line is ambiguous.
+case "$with_petsc_optimize" in
+  no)
+    # User explictly turned off petsc-optimize.
+    # Ignore value of PETSC_OPTIMIZE, even if set in the environment.
+    unset PETSC_OPTIMIZE
+    ;;
+  yes|'')
+    # Flag unissued or ambiguously issued using --with-petsc-optimize.
+    # Because the user did not explicitly turn if off,
+    # try to set PETSC_OPTIMIZE.
+    # If environment variable PETSC_OPTIMIZE is available, use it.
+    # If not, try the user-supplied commands to set it.
+    if test -n "${PETSC_OPTIMIZE}" ;  then
+      : Nothing to do here actually, because PETSC_OPTIMIZE is already in the environment.
+    else
+      # By default, use the debug PETSC library.
+PETSC_OPTIMIZE=g
+
+
+btng_log_vars="with_petsc_optimize"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:18557:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+test "$with_petsc_optimize" = yes && PETSC_OPTIMIZE=O
+
+    fi
+    ;;
+  *)
+    # User issued a specific string using --with-petsc-optimize=non-null-string.
+    # so that is used to set PETSC_OPTIMIZE.
+    PETSC_OPTIMIZE=$with_petsc_optimize
+    ;;
+esac
+if test "${PETSC_OPTIMIZE+set}" = set ; then
+  # This block executes the quality check commands, if any, for PETSC_OPTIMIZE.
+  :
+fi
+# Cache the value if it was found.
+if test "${PETSC_OPTIMIZE+set}" = set ; then
+  btng_cv_prog_petsc_optimize=${PETSC_OPTIMIZE}
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $btng_cv_prog_petsc_optimize" >&5
+$as_echo "$btng_cv_prog_petsc_optimize" >&6; }
+# Set PETSC_OPTIMIZE from cache.
+# PETSC_OPTIMIZE is not yet set if we grabbed it from cache.
+if test "${btng_cv_prog_petsc_optimize+set}" = set ; then
+  PETSC_OPTIMIZE=$btng_cv_prog_petsc_optimize
+else
+  unset PETSC_OPTIMIZE
+fi
+# End macro BTNG_ARG_WITH_ENV_WRAPPER with args PETSC_OPTIMIZE and petsc-optimize
+
+
+# Set PETSC_MPIUNI.
+
+# Start macro BTNG_ARG_WITH_ENV_WRAPPER with args petsc-mpiuni and PETSC_MPIUNI
+{ $as_echo "$as_me:$LINENO: checking for petsc-mpiuni" >&5
+$as_echo_n "checking for petsc-mpiuni... " >&6; }
+if test "${btng_cv_prog_petsc_mpiuni+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+# Check whether --with-petsc-mpiuni was given.
+if test "${with_petsc_mpiuni+set}" = set; then
+  withval=$with_petsc_mpiuni;
+fi
+
+# Set PETSC_MPIUNI, using environment setting if available
+#   and if command line is ambiguous.
+case "$with_petsc_mpiuni" in
+  no)
+    # User explictly turned off petsc-mpiuni.
+    # Ignore value of PETSC_MPIUNI, even if set in the environment.
+    unset PETSC_MPIUNI
+    ;;
+  yes|'')
+    # Flag unissued or ambiguously issued using --with-petsc-mpiuni.
+    # Because the user did not explicitly turn if off,
+    # try to set PETSC_MPIUNI.
+    # If environment variable PETSC_MPIUNI is available, use it.
+    # If not, try the user-supplied commands to set it.
+    if test -n "${PETSC_MPIUNI}" ;  then
+      : Nothing to do here actually, because PETSC_MPIUNI is already in the environment.
+    else
+      # By default, do not use the PETSC uniprocessor MPI library.
+unset PETSC_MPIUNI
+
+    fi
+    ;;
+  *)
+    # User issued a specific string using --with-petsc-mpiuni=non-null-string.
+    # so that is used to set PETSC_MPIUNI.
+    PETSC_MPIUNI=$with_petsc_mpiuni
+    ;;
+esac
+if test "${PETSC_MPIUNI+set}" = set ; then
+  # This block executes the quality check commands, if any, for PETSC_MPIUNI.
+  :
+fi
+# Cache the value if it was found.
+if test "${PETSC_MPIUNI+set}" = set ; then
+  btng_cv_prog_petsc_mpiuni=${PETSC_MPIUNI}
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $btng_cv_prog_petsc_mpiuni" >&5
+$as_echo "$btng_cv_prog_petsc_mpiuni" >&6; }
+# Set PETSC_MPIUNI from cache.
+# PETSC_MPIUNI is not yet set if we grabbed it from cache.
+if test "${btng_cv_prog_petsc_mpiuni+set}" = set ; then
+  PETSC_MPIUNI=$btng_cv_prog_petsc_mpiuni
+else
+  unset PETSC_MPIUNI
+fi
+# End macro BTNG_ARG_WITH_ENV_WRAPPER with args PETSC_MPIUNI and petsc-mpiuni
+
+
+# Set PETSC_LIBFILES
+unset PETSC_LIBFILES
+
+# Check whether --with-petsc-libfiles was given.
+if test "${with_petsc_libfiles+set}" = set; then
+  withval=$with_petsc_libfiles; test "$with_petsc_libfiles" = yes && PETSC_LIBFILES=yes
+fi
+
+
+
+if test "${PETSC_DIR+set}" = set; then
+  # Set up PETSC only if PETSC_DIR is defined.
+
+  if test ! -d "$PETSC_DIR"; then
+    { $as_echo "$as_me:$LINENO: WARNING: PETSC directory ($PETSC_DIR) does not look right" >&5
+$as_echo "$as_me: WARNING: PETSC directory ($PETSC_DIR) does not look right" >&2;}
+  fi
+  export PETSC_DIR
+  if test -z "$PETSC_ARCH"; then
+    if test -f "$PETSC_DIR/bmake/petscconf"; then
+	eval `grep PETSC_ARCH $PETSC_DIR/bmake/petscconf`
+    elif test -x "$PETSC_DIR/bin/petscarch"; then
+       PETSC_ARCH=`$PETSC_DIR/bin/petscarch`
+    else
+       { $as_echo "$as_me:$LINENO: WARNING: PETSC could not determine PETSC_ARCH" >&5
+$as_echo "$as_me: WARNING: PETSC could not determine PETSC_ARCH" >&2;}
+    fi
+    export PETSC_ARCH
+  fi
+
+
+btng_log_vars="PETSC_ARCH"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:18697:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+  if test ! -d "$PETSC_DIR/bmake/$PETSC_ARCH"; then
+    { $as_echo "$as_me:$LINENO: WARNING: PETSC architecture ($PETSC_ARCH) does not look right" >&5
+$as_echo "$as_me: WARNING: PETSC architecture ($PETSC_ARCH) does not look right" >&2;}
+  fi
+  if test ! "$PETSC_OPTIMIZE" = g && test ! "$PETSC_OPTIMIZE" = O; then
+    { { $as_echo "$as_me:$LINENO: error: PETSC optimize should be either g or O" >&5
+$as_echo "$as_me: error: PETSC optimize should be either g or O" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+
+  petsc_INCLUDES="-I$PETSC_DIR/include -I$PETSC_DIR/bmake/$PETSC_ARCH"
+  petsc_INCLUDES="$petsc_INCLUDES -I$PETSC_DIR/src/vec"
+  # Currently, I'm not entirely sure why we have to explicitly specify
+  # the src/vec directory in the include path.  But there is at least
+  # one required file there that cannot be found in the include directory.
+
+# SGS Support latter version of PETSc
+# Try new structure and then old
+  if test -d "${PETSC_DIR}/lib/${PETSC_ARCH}"; then
+    petsc_LIBDIR="${PETSC_DIR}/lib/${PETSC_ARCH}"
+  elif  test -d "${PETSC_DIR}/lib/lib${PETSC_OPTIMIZE}/${PETSC_ARCH}"; then
+    petsc_LIBDIR="${PETSC_DIR}/lib/lib${PETSC_OPTIMIZE}/${PETSC_ARCH}"
+  else
+    { $as_echo "$as_me:$LINENO: WARNING: PETSC lib directory does not look as expected" >&5
+$as_echo "$as_me: WARNING: PETSC lib directory does not look as expected" >&2;}
+  fi
+
+
+  # Issue the -L flag if not specifying PETSc libraries by file names.
+  test ! "${PETSC_LIBFILES+set}" = set && petsc_LIBS="-L${petsc_LIBDIR}"
+
+  # Build up a list of PETSC library files.
+# SGS
+  petsc_libs_ls1=`cd ${petsc_LIBDIR} && echo lib*.*`
+
+  if test -n "$petsc_libs_ls1"; then
+    unset petsc_libs_ls
+    for i in $petsc_libs_ls1; do
+      j=`echo $i | sed -e 's/lib//' -e 's/\.a$//' -e 's/\.so$//'`
+      if echo "$petsc_libs_ls" | grep -v " $j " > /dev/null; then # Note padding!
+        petsc_libs_ls="$petsc_libs_ls $j ";	# Note space padding!
+      fi
+    done
+  fi
+  # Remove mpiuni from the list of PETSC libraries unless user asked for it.
+  if test ! "${PETSC_MPIUNI}" = yes; then
+    petsc_libs_ls=`echo "$petsc_libs_ls" | sed 's/ mpiuni //g'`
+  fi
+  # Move some low-level libraries to the end to ensure resolution
+  # for linkers that only make one pass.
+  for i in petscmat petscvec petsc; do
+    petsc_libs_ls=`echo "$petsc_libs_ls" | sed 's/\(.*\)\( \{0,1\}'"$i"'\{0,1\} \)\(.*\)/\1 \3 \2/g'`
+  done
+  # Build up petsc_LIBS string using library names.
+
+
+btng_log_vars="petsc_libs_ls1 petsc_libs_ls"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:18765:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+  if test -n "$petsc_libs_ls"; then
+    if test "${PETSC_LIBFILES+set}" = set; then
+      for i in $petsc_libs_ls; do
+# SGS
+        petsc_LIBS="$petsc_LIBS ${petsc_LIBDIR}/lib${i}.a"
+      done
+    else
+      for i in $petsc_libs_ls; do
+        petsc_LIBS="$petsc_LIBS -l$i"
+      done
+    fi
+  fi
+
+
+
+btng_log_vars="PETSC_DIR petsc_INCLUDES petsc_LIBS PETSC_OPTIMIZE PETSC_MPIUNI"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:18792:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+fi
+# End macro SUPPORT_PETSC
+
+if test "${PETSC_DIR+set}" = set; then
+
+# Split petsc_LIBS into the LIB_PATH part (petsc_LIB_PATH) and the LIB_NAME part (petsc_LIB_NAME)
+if test -n "${petsc_LIBS}"; then
+  for i in ${petsc_LIBS}; do
+    case "$i" in
+    -L*) petsc_LIB_PATH="${petsc_LIB_PATH} $i" ;;
+    *) petsc_LIB_NAME="${petsc_LIB_NAME} $i" ;;
+    esac
+  done
+fi
+
+  LIB_PATH="$petsc_LIB_PATH $LIB_PATH"
+  LIB_NAME="$petsc_LIB_NAME $LIB_NAME"
+  INC_PATH="$petsc_INCLUDES $INC_PATH"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PETSC 1
+_ACEOF
+
+  if test $PETSC_VERSION_MAJOR -ne 2 || \
+     test $PETSC_VERSION_MINOR -ne 3 || \
+     test $PETSC_VERSION_SUBMINOR -ne 3 ; then
+     { $as_echo "$as_me:$LINENO: WARNING:
+SAMRAI requires PETSc-2.3.3.  You have specified version $PETSC_VERSION_MAJOR.$PETSC_VERSION_MINOR.$PETSC_VERSION_SUBMINOR
+which may not work properly!
+" >&5
+$as_echo "$as_me: WARNING:
+SAMRAI requires PETSc-2.3.3.  You have specified version $PETSC_VERSION_MAJOR.$PETSC_VERSION_MINOR.$PETSC_VERSION_SUBMINOR
+which may not work properly!
+" >&2;}
+  fi
+fi
+
+
+case $ARCH in
+   Linux | LINUX | linux | CYGWIN )
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_PROPER_XDR_HEADER 1
+_ACEOF
+
+      ;;
+   rs6000)
+
+cat >>confdefs.h <<\_ACEOF
+#define _POWER 1
+_ACEOF
+
+      ;;
+   *)
+      ;;
+esac
+
+if test "$enable_xdr" = "yes"; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_XDR 1
+_ACEOF
+
+
+
+   case $ARCH in
+      CYGWIN)
+         case $CXX in
+            *g++)
+	       LIB_NAME="$LIB_NAME -lrpc"
+              ;;
+         esac
+         ;;
+   esac
+fi
+
+if test "$enable_deprecated" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define INCLUDE_DEPRECATED 2
+_ACEOF
+
+else
+
+cat >>confdefs.h <<\_ACEOF
+#define INCLUDE_DEPRECATED 9999999
+_ACEOF
+
+fi
+
+
+
+# Check whether --with-sundials was given.
+if test "${with_sundials+set}" = set; then
+  withval=$with_sundials;
+else
+  with_sundials='no'
+fi
+
+
+if test "$with_sundials" = no; then
+   { $as_echo "$as_me:$LINENO: NOTIFICATION: SAMRAI configured without the Sundials library" >&5
+$as_echo "$as_me: NOTIFICATION: SAMRAI configured without the Sundials library" >&6;}
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_SUNDIALS 1
+_ACEOF
+
+else
+   sundials_dir="$with_sundials"
+   if test ! -d "$sundials_dir" ; then
+     { { $as_echo "$as_me:$LINENO: error: You MUST specify an existing path when using --with-sundials=PATH" >&5
+$as_echo "$as_me: error: You MUST specify an existing path when using --with-sundials=PATH" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SUNDIALS 1
+_ACEOF
+
+   LIB_PATH="$LIB_PATH -L$sundials_dir/lib"
+   LIB_NAME="$LIB_NAME -lsundials_cvode -lsundials_kinsol"
+   INC_PATH="-I$sundials_dir/include $INC_PATH"
+fi
+
+
+
+
+btng_log_vars="with_sundials sundials_dir"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:18934:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+
+
+# Check whether --with-cubes was given.
+if test "${with_cubes+set}" = set; then
+  withval=$with_cubes;
+else
+  with_cubes='no'
+fi
+
+
+CUBES_C_FILES="error_in_script.c"
+if test "$with_cubes" = no; then
+   { $as_echo "$as_me:$LINENO: NOTIFICATION: SAMRAI configured without the CUBES library" >&5
+$as_echo "$as_me: NOTIFICATION: SAMRAI configured without the CUBES library" >&6;}
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_CUBES 1
+_ACEOF
+
+else
+   cubes_dir="$with_cubes"
+   if test ! -d "$cubes_dir" ; then
+     { { $as_echo "$as_me:$LINENO: error: You MUST specify an existing path when using --with-cubes=PATH" >&5
+$as_echo "$as_me: error: You MUST specify an existing path when using --with-cubes=PATH" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CUBES 1
+_ACEOF
+
+   cubes_includes="-I${cubes_dir}/include -I${cubes_dir}/cart3d/include"
+   cubes_lib="-L${cubes_dir} -L${cubes_dir}/cart3d/lib"
+   INC_PATH="$cubes_includes $INC_PATH"
+   LIB_PATH="$cubes_lib $LIB_PATH"
+   LIB_NAME="${cubes_dir}/patchCubes_lib_LINUX.a ${cubes_dir}/cart3d/lib/arg.LINUX.a $LIB_NAME"
+fi
+
+
+btng_log_vars="with_cubes cubes_dir"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:18986:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+
+
+
+# Check whether --with-eleven was given.
+if test "${with_eleven+set}" = set; then
+  withval=$with_eleven;
+else
+  with_eleven='no'
+fi
+
+
+ELEVEN_C_FILES="error_in_script.c"
+if test "$with_eleven" = no; then
+   { $as_echo "$as_me:$LINENO: NOTIFICATION: SAMRAI configured without the ELEVEN library" >&5
+$as_echo "$as_me: NOTIFICATION: SAMRAI configured without the ELEVEN library" >&6;}
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_ELEVEN 1
+_ACEOF
+
+else
+   eleven_dir="$with_eleven"
+   if test ! -d "$eleven_dir" ; then
+     { { $as_echo "$as_me:$LINENO: error: You MUST specify an existing path when using --with-eleven=PATH" >&5
+$as_echo "$as_me: error: You MUST specify an existing path when using --with-eleven=PATH" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ELEVEN 1
+_ACEOF
+
+   eleven_includes="-I${eleven_dir}/common -I${eleven_dir}/mesh -I${eleven_dir}/dbase -I${eleven_dir}/dbase/gzstream -I${eleven_dir}/eleven/src -I${eleven_dir}/geom_util"
+   eleven_lib="-L${eleven_dir}/eleven/lib"
+   INC_PATH="$eleven_includes $INC_PATH"
+   LIB_PATH="$eleven_lib $LIB_PATH"
+   LIB_NAME="$LIB_NAME -l11g -lexpat"
+fi
+
+
+btng_log_vars="with_eleven eleven_dir"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:19039:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+
+
+# Check whether --with-cubes was given.
+if test "${with_cubes+set}" = set; then
+  withval=$with_cubes;
+else
+  with_cubes='no'
+fi
+
+
+CUBES_C_FILES="error_in_script.c"
+if test "$with_cubes" = no; then
+   { $as_echo "$as_me:$LINENO: NOTIFICATION: SAMRAI configured without the CUBES library" >&5
+$as_echo "$as_me: NOTIFICATION: SAMRAI configured without the CUBES library" >&6;}
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_CUBES 1
+_ACEOF
+
+else
+   cubes_dir="$with_cubes"
+   if test ! -d "$cubes_dir" ; then
+     { { $as_echo "$as_me:$LINENO: error: You MUST specify an existing path when using --with-cubes=PATH" >&5
+$as_echo "$as_me: error: You MUST specify an existing path when using --with-cubes=PATH" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CUBES 1
+_ACEOF
+
+   cubes_includes="-I${cubes_dir}/include -I${cubes_dir}/cart3d/include"
+   cubes_lib="-L${cubes_dir} -L${cubes_dir}/cart3d/lib"
+   INC_PATH="$cubes_includes $INC_PATH"
+   LIB_PATH="$cubes_lib $LIB_PATH"
+   LIB_NAME="${cubes_dir}/patchCubes_lib_LINUX.a ${cubes_dir}/cart3d/lib/arg.LINUX.a $LIB_NAME"
+fi
+
+
+btng_log_vars="with_cubes cubes_dir"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:19091:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+
+
+
+# Check whether --with-eleven was given.
+if test "${with_eleven+set}" = set; then
+  withval=$with_eleven;
+else
+  with_eleven='no'
+fi
+
+
+ELEVEN_C_FILES="error_in_script.c"
+if test "$with_eleven" = no; then
+   { $as_echo "$as_me:$LINENO: NOTIFICATION: SAMRAI configured without the ELEVEN library" >&5
+$as_echo "$as_me: NOTIFICATION: SAMRAI configured without the ELEVEN library" >&6;}
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_ELEVEN 1
+_ACEOF
+
+else
+   eleven_dir="$with_eleven"
+   if test ! -d "$eleven_dir" ; then
+     { { $as_echo "$as_me:$LINENO: error: You MUST specify an existing path when using --with-eleven=PATH" >&5
+$as_echo "$as_me: error: You MUST specify an existing path when using --with-eleven=PATH" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ELEVEN 1
+_ACEOF
+
+   eleven_includes="-I${eleven_dir}/common -I${eleven_dir}/mesh -I${eleven_dir}/dbase -I${eleven_dir}/dbase/gzstream -I${eleven_dir}/eleven/src -I${eleven_dir}/geom_util"
+   eleven_lib="-L${eleven_dir}/eleven/lib"
+   INC_PATH="$eleven_includes $INC_PATH"
+   LIB_PATH="$eleven_lib $LIB_PATH"
+   LIB_NAME="$LIB_NAME -l11g -lexpat"
+fi
+
+
+btng_log_vars="with_eleven eleven_dir"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:19144:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+
+if test -z "$with_vampir"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_VAMPIR 1
+_ACEOF
+
+else
+   if test "$with_vampir" = yes; then
+      { $as_echo "$as_me:$LINENO: checking for VAMPIR" >&5
+$as_echo_n "checking for VAMPIR... " >&6; }
+      vampir_dir=
+      for i in /usr/global/tools/kppp/aix_5_ll/default $with_vampir; do
+         if test -d $i -a -f $i/include/VT.h; then
+            vampir_dir=$i
+            break
+         fi
+      done
+   else
+      vampir_dir=$with_vampir
+   fi
+
+   if test -n "$vampir_dir"; then
+      { $as_echo "$as_me:$LINENO: result: $vampir_dir" >&5
+$as_echo "$vampir_dir" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_VAMPIR 1
+_ACEOF
+
+      with_vampir=yes
+
+      INC_PATH="-I$vampir_dir/include $INC_PATH"
+      LIB_PATH="-L$vampir_dir/lib $LIB_PATH"
+
+      case $ARCH in
+         alpha)
+            LIB_NAME="-lVT -lpmpi -lmld -lpthread -lm $LIB_NAME"
+            ;;
+         rs6000)
+            LIB_NAME="-lVT -lld -lm $LIB_NAME"
+            ;;
+         *)
+            ;;
+      esac
+   else
+      { $as_echo "$as_me:$LINENO: result: VAMPIR library not found" >&5
+$as_echo "VAMPIR library not found" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_VAMPIR 1
+_ACEOF
+
+      with_vampir=no
+   fi
+fi
+
+
+btng_log_vars="with_vampir vampir_dir "
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:19215:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+if test -z "$with_tau"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define LACKS_TAU 1
+_ACEOF
+
+else
+   { $as_echo "$as_me:$LINENO: checking for TAU" >&5
+$as_echo_n "checking for TAU... " >&6; }
+   { $as_echo "$as_me:$LINENO: result: $with_tau" >&5
+$as_echo "$with_tau" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TAU 1
+_ACEOF
+
+   TAU_INCLUDE="$with_tau"
+   INC_PATH="\$(TAU_INCLUDE) \$(TAU_DEFS) \$(TAU_MPI_INCLUDE) $INC_PATH"
+   case $ARCH in
+      Linux | LINUX | linux )
+         INC_PATH="$INC_PATH"
+         ;;
+   esac
+   LIB_NAME="\$(TAU_MPI_LIBS) \$(TAU_LIBS) $LIB_NAME"
+   { $as_echo "$as_me:$LINENO: result: including TAU makefile $TAU_INCLUDE" >&5
+$as_echo "including TAU makefile $TAU_INCLUDE" >&6; }
+   TAU_INCLUDE="include $TAU_INCLUDE"
+fi
+
+
+
+# Begin macro BTNG_IEEE_FLOAT
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <float.h>
+#ifndef NAN
+nan is broken
+#endif
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^nan is broken" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+#define NAN_IS_BROKEN 1
+_ACEOF
+
+echo "configure:19278:" "NAN is broken (not in float.h)" >&5
+else
+  echo "configure:19280:" "NAN is ok (in float.h)" >&5
+
+fi
+rm -f conftest*
+
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <float.h>
+#ifndef FLT_SNAN
+flt snan is broken
+#endif
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^flt snan is broken" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+#define FLT_SNAN_IS_BROKEN 1
+_ACEOF
+
+echo "configure:19304:" "FLT_NAN is broken (not in float.h)" >&5
+else
+  echo "configure:19306:" "FLT_NAN is ok (in float.h)" >&5
+
+fi
+rm -f conftest*
+
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <float.h>
+#ifndef DBL_SNAN
+dbl snan is broken
+#endif
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^dbl snan is broken" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DBL_SNAN_IS_BROKEN 1
+_ACEOF
+
+echo "configure:19330:" "DBL_NAN is broken (not in float.h)" >&5
+else
+  echo "configure:19332:" "DBL_NAN is ok (in float.h)" >&5
+
+fi
+rm -f conftest*
+
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <float.h>
+#ifndef FLT_MAX
+flt snan is broken
+#endif
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^flt snan is broken" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+#define FLT_MAX_IS_BROKEN 1
+_ACEOF
+
+echo "configure:19356:" "FLT_MAX is broken (not in float.h)" >&5
+else
+  echo "configure:19358:" "FLT_MAX is ok (in float.h)" >&5
+
+fi
+rm -f conftest*
+
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <float.h>
+#ifndef DBL_MAX
+dbl snan is broken
+#endif
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^dbl snan is broken" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+#define DBL_MAX_IS_BROKEN 1
+_ACEOF
+
+echo "configure:19382:" "DBL_MAX is broken (not in float.h)" >&5
+else
+  echo "configure:19384:" "DBL_MAX is ok (in float.h)" >&5
+
+fi
+rm -f conftest*
+
+
+# End macro BTNG_IEEE_FLOAT
+
+
+
+# If on the alpha, and the ots library exists, use it.
+# Libots is the Compiled Code Support Library used by Compaq.
+if echo "$host_cpu" | grep '^alpha' > /dev/null; then
+  for i in '' /usr /usr/local; do
+    if test -r "$i/lib/libots.a" || test -r "$i/lib/libots.so"; then
+      LIBS="$LIBS -lots"
+      LIB_NAME="$LIB_NAME -lots"
+      break
+    fi
+  done
+fi
+
+
+
+debug_ext=debug
+if test "$enable_opt" = "yes"; then
+   if test "$enable_debug" = "yes"; then
+      debug_ext=optdebug
+   else
+      debug_ext=opt
+   fi
+fi
+
+if test "$prefix" = "NONE"; then
+   dir_place_holder=`pwd`
+   cd $srcdir/..
+   prefix=`pwd`
+   cd $dir_place_holder
+fi
+
+INSTDIR=$prefix
+
+
+
+
+btng_log_vars="LIB_PATH"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:19437:" "before adding rpath syntax: $btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+# Begin macro BTNG_LIBS_ADD_RPATH
+
+
+
+
+
+# Check whether --enable-rpath was given.
+if test "${enable_rpath+set}" = set; then
+  enableval=$enable_rpath;
+else
+  enable_rpath=yes
+fi
+
+
+if test "$enable_rpath" = yes; then
+  # Determine the proper rpath syntax.
+
+
+
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+  btng_rpath_compiler_id="$CXX_ID"
+
+
+
+  # Unset the rpath syntax variable so we can check on whether we
+  # found a way to set it.
+  unset btng_rpath_beginning;
+
+  # Determine, based on the compiler, the syntax for specifying RPATH.
+  # It should be of the form "$btng_rpath_beginning$the_path", where
+  # btng_rpath_beginning is the compiler-dependent part.
+  case "$btng_rpath_compiler_id" in
+    gnu)
+      # This compiler may use a variable rpath syntax because it may use
+      # the native loader.
+
+# Begin macro BTNG_LIBS_FIND_RPATH
+
+  btng_save_LIBS="$LIBS";
+  for i in '---bogus-flag-meant-to-cause-error' '-Wl,-rpath ' '-Wl,-R' '-Wl,-R '; do
+    LIBS="${i}/usr/local"
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  btng_rpath_beginning="$i"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	unset btng_rpath_beginning
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+    # Intel compiler does not fail on bad args but warning message is
+    # created. If warning is found in the log then continue searching
+    # for syntax as the current one is no good.  If warning is not
+    # found use return status of link attempt to determine if
+    # parameter was accepted by the compiler.
+    SEARCH=`echo "ignoring unknown option '${LIBS}'" | sed -e "s/---/-f-/"`
+    if ( grep "$SEARCH" config.log ) >/dev/null 2>&1
+    then
+	:
+    else
+        if test "${btng_rpath_beginning+set}" = set; then break; fi
+    fi
+  done
+  LIBS="$btng_save_LIBS"
+
+# End macro BTNG_LIBS_FIND_RPATH
+
+    ;;
+    intel)
+      # This compiler may use a variable rpath syntax because it may use
+      # the native loader.
+
+# Begin macro BTNG_LIBS_FIND_RPATH
+
+  btng_save_LIBS="$LIBS";
+  for i in '---bogus-flag-meant-to-cause-error' '-Wl,-rpath ' '-Wl,-R' '-Wl,-R '; do
+    LIBS="${i}/usr/local"
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  btng_rpath_beginning="$i"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	unset btng_rpath_beginning
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+    # Intel compiler does not fail on bad args but warning message is
+    # created. If warning is found in the log then continue searching
+    # for syntax as the current one is no good.  If warning is not
+    # found use return status of link attempt to determine if
+    # parameter was accepted by the compiler.
+    SEARCH=`echo "ignoring unknown option '${LIBS}'" | sed -e "s/---/-f-/"`
+    if ( grep "$SEARCH" config.log ) >/dev/null 2>&1
+    then
+	:
+    else
+        if test "${btng_rpath_beginning+set}" = set; then break; fi
+    fi
+  done
+  LIBS="$btng_save_LIBS"
+
+# End macro BTNG_LIBS_FIND_RPATH
+
+      if test "$btng_rpath_beginning" = "---bogus-flag-meant-to-cause-error"; then
+        # Do not rely on the compiler return value to test for syntax
+        # Guess the syntax assuming the native loader will be used.
+        case "$host_os" in
+          linux*) btng_rpath_beginning='-Wl,-rpath ' ;;
+          sun*|solaris*) btng_rpath_beginning='-R' ;;
+          osf*) btng_rpath_beginning='-rpath ' ;;
+          *) btng_rpath_beginning='' ;;
+        esac
+        { $as_echo "$as_me:$LINENO: WARNING: Your compiler $CXX returns 0 even when it is
+  given a bogus flag.  Therefore, I cannot find the proper syntax
+  for the rpath for this compiler.  I have resorted to a guess that
+  may not be correct: '$btng_rpath_beginning'.
+  You can override this by using --enable-rpath=SYNTAX" >&5
+$as_echo "$as_me: WARNING: Your compiler $CXX returns 0 even when it is
+  given a bogus flag.  Therefore, I cannot find the proper syntax
+  for the rpath for this compiler.  I have resorted to a guess that
+  may not be correct: '$btng_rpath_beginning'.
+  You can override this by using --enable-rpath=SYNTAX" >&2;}
+      fi
+    ;;
+    sunpro)
+      # This compiler may use a variable rpath syntax.
+
+# Begin macro BTNG_LIBS_FIND_RPATH
+
+  btng_save_LIBS="$LIBS";
+  for i in '---bogus-flag-meant-to-cause-error' '-R' '-R '; do
+    LIBS="${i}/usr/local"
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  btng_rpath_beginning="$i"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	unset btng_rpath_beginning
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+    # Intel compiler does not fail on bad args but warning message is
+    # created. If warning is found in the log then continue searching
+    # for syntax as the current one is no good.  If warning is not
+    # found use return status of link attempt to determine if
+    # parameter was accepted by the compiler.
+    SEARCH=`echo "ignoring unknown option '${LIBS}'" | sed -e "s/---/-f-/"`
+    if ( grep "$SEARCH" config.log ) >/dev/null 2>&1
+    then
+	:
+    else
+        if test "${btng_rpath_beginning+set}" = set; then break; fi
+    fi
+  done
+  LIBS="$btng_save_LIBS"
+
+# End macro BTNG_LIBS_FIND_RPATH
+
+    ;;
+    kai)
+      # The KAI compilers use the system native loader.
+      #
+      # On some platforms (PC/Linux at least), this compiler seems
+      # to return 0 even if it encounters error, thus it can return
+      # the first guess for the rpath syntax, even if the guess is
+      # wrong.  We try to catch this by making the first flag bogus.
+      # If the compiler accepts this flag (by returning 0), we know
+      # it is wrong and we resort to an alternative method for
+      # getting the rpath syntax.
+
+# Begin macro BTNG_LIBS_FIND_RPATH
+
+  btng_save_LIBS="$LIBS";
+  for i in '---bogus-flag-meant-to-cause-error' '-R' '-R ' '-rpath ' '-Wl,-rpath ' '-Wl,-R' '-Wl,-R '; do
+    LIBS="${i}/usr/local"
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  btng_rpath_beginning="$i"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	unset btng_rpath_beginning
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+    # Intel compiler does not fail on bad args but warning message is
+    # created. If warning is found in the log then continue searching
+    # for syntax as the current one is no good.  If warning is not
+    # found use return status of link attempt to determine if
+    # parameter was accepted by the compiler.
+    SEARCH=`echo "ignoring unknown option '${LIBS}'" | sed -e "s/---/-f-/"`
+    if ( grep "$SEARCH" config.log ) >/dev/null 2>&1
+    then
+	:
+    else
+        if test "${btng_rpath_beginning+set}" = set; then break; fi
+    fi
+  done
+  LIBS="$btng_save_LIBS"
+
+# End macro BTNG_LIBS_FIND_RPATH
+
+      if test "$btng_rpath_beginning" = "---bogus-flag-meant-to-cause-error"; then
+        # Do not rely on the compiler return value to test for syntax
+        # Guess the syntax assuming the native loader will be used.
+        case "$host_os" in
+          linux*) btng_rpath_beginning='-Wl,-rpath ' ;;
+          sun*|solaris*) btng_rpath_beginning='-R' ;;
+          osf*) btng_rpath_beginning='-rpath ' ;;
+          *) btng_rpath_beginning='' ;;
+        esac
+        { $as_echo "$as_me:$LINENO: WARNING: Your compiler $CXX returns 0 even when it is
+  given a bogus flag.  Therefore, I cannot find the proper syntax
+  for the rpath for this compiler.  I have resorted to a guess that
+  may not be correct: '$btng_rpath_beginning'.
+  You can override this by using --enable-rpath=SYNTAX" >&5
+$as_echo "$as_me: WARNING: Your compiler $CXX returns 0 even when it is
+  given a bogus flag.  Therefore, I cannot find the proper syntax
+  for the rpath for this compiler.  I have resorted to a guess that
+  may not be correct: '$btng_rpath_beginning'.
+  You can override this by using --enable-rpath=SYNTAX" >&2;}
+      fi
+    ;;
+    *)
+
+# Begin macro BTNG_LIBS_FIND_RPATH
+
+  btng_save_LIBS="$LIBS";
+  for i in '-R ' '-R' '-rpath ' '-Wl,-rpath ' '-Wl,-R ' '-Wl,-R'; do
+    LIBS="${i}/usr/local"
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  btng_rpath_beginning="$i"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	unset btng_rpath_beginning
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+    # Intel compiler does not fail on bad args but warning message is
+    # created. If warning is found in the log then continue searching
+    # for syntax as the current one is no good.  If warning is not
+    # found use return status of link attempt to determine if
+    # parameter was accepted by the compiler.
+    SEARCH=`echo "ignoring unknown option '${LIBS}'" | sed -e "s/---/-f-/"`
+    if ( grep "$SEARCH" config.log ) >/dev/null 2>&1
+    then
+	:
+    else
+        if test "${btng_rpath_beginning+set}" = set; then break; fi
+    fi
+  done
+  LIBS="$btng_save_LIBS"
+
+# End macro BTNG_LIBS_FIND_RPATH
+
+    ;;
+  esac
+
+
+btng_log_vars="host_os CC_ID CXX_ID btng_rpath_compiler_id btng_rpath_beginning"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:19944:" "forming rpaths: $btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+  # It is valid to have btng_rpath_beginning be blank.
+  # but if it is unset, we could not find a way to set it.
+  if test ! "${btng_rpath_beginning+set}" = set; then
+    { $as_echo "$as_me:$LINENO: WARNING: I cannot find a working syntax for setting relocatable paths" >&5
+$as_echo "$as_me: WARNING: I cannot find a working syntax for setting relocatable paths" >&2;}
+  fi
+
+elif test ! "${enable_rpath}" = no; then
+
+  # User has provided the rpath syntax.
+  btng_rpath_beginning=$enable_rpath
+
+fi;	# End block determining the proper rpath syntax.
+
+
+# Use the rpath syntax.
+if test "${btng_rpath_beginning+set}" = set	\
+  && test -n "${btng_rpath_beginning}" ; then
+  # Add the RPATH flags only if we know the syntax for it,
+  # and if it is needed as indicated by a non-empty btng_rpath_beginning.
+
+  # Loop through the flags in LIB_PATH, looking for the -L flag,
+  # and append RPATH flag to each one found, if the the
+  # path specified by the flag includes shared libraries.
+  for i in ${LIB_PATH}; do
+    btng_new_LIB_PATH="${btng_new_LIB_PATH} ${i}"
+    btng_tmp_addl_string=`echo $i | sed 's/^-L//'`
+    test "$btng_tmp_addl_string" = "$i" && continue	# does not contain -L.
+    test -d "$btng_tmp_addl_string" || continue;	# directory nonexistent.
+    test "`echo $btng_tmp_addl_string/*.so`" = "$btng_tmp_addl_string/*.so" \
+      && continue;	# does not contain shared libraries.
+    echo "${btng_new_LIB_PATH}"	\
+      | grep ".*${btng_rpath_beginning}[ 	]*${btng_tmp_addl_string}"	\
+      > /dev/null	\
+      && continue	# already contains the flag we want to add.
+    btng_new_LIB_PATH="${btng_new_LIB_PATH} ${btng_rpath_beginning}${btng_tmp_addl_string}"
+  done
+  LIB_PATH="${btng_new_LIB_PATH}"
+
+fi
+
+
+# End macro BTNG_LIBS_ADD_RPATH
+
+
+
+btng_log_vars="LIB_PATH"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:20010:" "after adding rpath syntax: $btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+
+
+
+# Begin macro SAMRAI_SERPA
+
+
+# The generalized script needs to know about the system
+# so it can form the appropriate parallel run command line.
+
+
+
+
+# Check whether --with-parallel-run-bin was given.
+if test "${with_parallel_run_bin+set}" = set; then
+  withval=$with_parallel_run_bin;
+case "$with_parallel_run_bin" in
+  no)
+    # Set PARALLEL_RUN_BIN to blank to remove it from the serpa-run script.
+    PARALLEL_RUN_BIN=;;
+  yes)
+    # Unset the variable PARALLEL_RUN_BIN so it is guessed in the next step.
+    unset PARALLEL_RUN_BIN;
+    ;;
+  *)
+    # Set PARALLEL_RUN_BIN to user specification.
+    PARALLEL_RUN_BIN="$with_parallel_run_bin"
+    ;;
+esac
+
+
+btng_log_vars="with_parallel_run_bin PARALLEL_RUN_BIN target_os"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:20053:" "with-parallel-run-bin given: $btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+
+else
+
+unset PARALLEL_RUN_BIN;
+
+
+btng_log_vars="with_parallel_run_bin PARALLEL_RUN_BIN target_os"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:20072:" "with-parallel-run-bin NOT given: $btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+fi
+
+# If PARALLEL_RUN_BIN is unset, guess it.
+if test ! "${PARALLEL_RUN_BIN+set}" = set; then
+  case "$target_os" in
+    osf*) PARALLEL_RUN_BIN=dmpirun
+    ;;
+    *) PARALLEL_RUN_BIN=mpirun
+    ;;
+  esac
+
+
+btng_log_vars="with_parallel_run_bin PARALLEL_RUN_BIN target_os"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:20097:" "after setting PARALLEL_RUN_BIN: $btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+fi
+
+
+
+
+
+
+
+
+
+ac_config_commands="$ac_config_commands create-serpa-machine-file"
+
+
+
+# Add the serpa machine file to the clean list.
+btng_serpa_dir_name=`echo 'config/serpa-run' | sed -e 's:^\([^/]*\)$:./\1:' -e 's:/[^/]*$::'`;
+btng_serpa_machine_file="${btng_serpa_dir_name}/serpa.machines"
+DISTCLEANFILES="$DISTCLEANFILES ${btng_serpa_machine_file}"
+
+
+btng_log_vars="btng_serpa_machine_file DISTCLEANFILES"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:20129:" "in support-serpa-run: $btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+
+
+
+
+# End macro SAMRAI_SERPA
+
+ac_config_files="$ac_config_files config/serpa-run"
+
+
+
+
+# Check whether --enable-test-nprocs was given.
+if test "${enable_test_nprocs+set}" = set; then
+  enableval=$enable_test_nprocs;
+case "$enable_test_nprocs" in
+  yes|no)
+    { { $as_echo "$as_me:$LINENO: error: You must specify a list of processors for testing." >&5
+$as_echo "$as_me: error: You must specify a list of processors for testing." >&2;}
+   { (exit 1); exit 1; }; }
+  ;;
+  *) TEST_NPROCS=$enable_test_nprocs
+esac
+
+else
+  TEST_NPROCS='0,2'
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Link files for examples directory.
+
+
+if test `pwd` != `cd "$srcdir" && pwd`
+then
+
+
+
+test `pwd` = `cd "$srcdir" && pwd` && link_prefix='.unneeded_link.'
+ac_config_links="$ac_config_links source/test/applications/ConvDiff/${link_prefix}example_inputs:source/test/applications/ConvDiff/example_inputs source/test/applications/ConvDiff/${link_prefix}test_inputs:source/test/applications/ConvDiff/test_inputs source/test/applications/Euler/${link_prefix}example_inputs:source/test/applications/Euler/example_inputs source/test/applications/Euler/${link_prefix}test_inputs:source/test/applications/Euler/test_inputs source/test/applications/LinAdv/${link_prefix}example_inputs:source/test/applications/LinAdv/example_inputs source/test/applications/LinAdv/${link_prefix}test_inputs:source/test/applications/LinAdv/test_inputs source/test/async_comm/${link_prefix}test_inputs:source/test/async_comm/test_inputs source/test/boundary/${link_prefix}test_inputs:source/test/boundary/test_inputs source/test/clustering/async_br/${link_prefix}test_inputs:source/test/clustering/async_br/test_inputs source/test/clustering/parallel_br/${link_prefix}test_inputs:source/test/clustering/parallel_br/test_inputs source/test/communication/${link_prefix}test_inputs:source/test/communication/test_inputs source/test/dataaccess/${link_prefix}test_inputs:source/test/dataaccess/test_inputs source/test/dlbg/${link_prefix}test_inputs:source/test/dlbg/test_inputs source/test/emb_bdry/${link_prefix}test_inputs:source/test/emb_bdry/test_inputs source/test/FAC_adaptive/${link_prefix}test_inputs:source/test/FAC_adaptive/test_inputs source/test/FAC_nonadaptive/${link_prefix}example_inputs:source/test/FAC_nonadaptive/example_inputs source/test/FAC_nonadaptive/${link_prefix}test_inputs:source/test/FAC_nonadaptive/test_inputs source/test/hierarchy/${link_prefix}test_inputs:source/test/hierarchy/test_inputs source/test/hypre/${link_prefix}test_inputs:source/test/hypre/test_inputs source/test/mblkcomm/${link_prefix}test_inputs:source/test/mblkcomm/test_inputs source/test/MblkEuler/${link_prefix}example_inputs:source/test/MblkEuler/example_inputs source/test/MblkEuler/${link_prefix}test_inputs:source/test/MblkEuler/test_inputs source/test/MblkLinAdv/${link_prefix}example_inputs:source/test/MblkLinAdv/example_inputs source/test/MblkLinAdv/${link_prefix}test_inputs:source/test/MblkLinAdv/test_inputs source/test/nonlinear/${link_prefix}test_inputs:source/test/nonlinear/test_inputs source/test/patchbdrysum/${link_prefix}example_inputs:source/test/patchbdrysum/example_inputs source/test/patchbdrysum/${link_prefix}test_inputs:source/test/patchbdrysum/test_inputs source/test/performance/Euler/${link_prefix}performance_inputs:source/test/performance/Euler/performance_inputs source/test/performance/Euler/${link_prefix}sample_inputs:source/test/performance/Euler/sample_inputs source/test/performance/LinAdv/${link_prefix}performance_inputs:source/test/performance/LinAdv/performance_inputs source/test/performance/LinAdv/${link_prefix}sample_inputs:source/test/performance/LinAdv/sample_inputs source/test/performance/LoadBalancers/${link_prefix}cube_inputs:source/test/performance/LoadBalancers/cube_inputs source/test/performance/LoadBalancers/${link_prefix}sphere_inputs:source/test/performance/LoadBalancers/sphere_inputs source/test/performance/LoadBalancers/${link_prefix}test_inputs:source/test/performance/LoadBalancers/test_inputs source/test/performance/treesearch/${link_prefix}test_inputs:source/test/performance/treesearch/test_inputs source/test/rank_group/${link_prefix}test_inputs:source/test/rank_group/test_inputs source/test/sundials/${link_prefix}example_inputs:source/test/sundials/example_inputs source/test/sundials/${link_prefix}test_inputs:source/test/sundials/test_inputs source/test/timers/${link_prefix}example_inputs:source/test/timers/example_inputs source/test/timers/${link_prefix}test_inputs:source/test/timers/test_inputs"
+
+
+
+test `pwd` = `cd "$srcdir" && pwd` && link_prefix='.unneeded_link.'
+ac_config_links="$ac_config_links source/test/applications/Euler/${link_prefix}RP_test:source/test/applications/Euler/RP_test"
+
+
+fi
+
+
+
+
+subdirs="${subdirs} source"
+subdirs="${subdirs} source
+source/SAMRAI
+source/SAMRAI/algs
+source/SAMRAI/algs/fortran
+source/SAMRAI/appu
+source/SAMRAI/appu/fortran
+source/SAMRAI/geom
+source/SAMRAI/geom/fortran
+source/SAMRAI/hier
+source/SAMRAI/math
+source/SAMRAI/mesh
+source/SAMRAI/mesh/fortran
+source/SAMRAI/pdat
+source/SAMRAI/pdat/fortran
+source/SAMRAI/solv
+source/SAMRAI/solv/fortran
+source/SAMRAI/tbox
+source/SAMRAI/xfer
+source/test
+source/test/applications
+source/test/applications/ConvDiff
+source/test/applications/Euler
+source/test/applications/LinAdv
+source/test/async_comm
+source/test/boundary
+source/test/clustering
+source/test/clustering/async_br
+source/test/clustering/parallel_br
+source/test/communication
+source/test/dataaccess
+source/test/dataops
+source/test/dimension
+source/test/dlbg
+source/test/emb_bdry
+source/test/FAC_adaptive
+source/test/FAC_nonadaptive
+source/test/fill_pattern
+source/test/hierarchy
+source/test/hypre
+source/test/ieee
+source/test/indexdata
+source/test/inputdb
+source/test/logger
+source/test/mblkcomm
+source/test/MblkEuler
+source/test/MblkLinAdv
+source/test/nonlinear
+source/test/patchbdrysum
+source/test/performance
+source/test/performance/Euler
+source/test/performance/LinAdv
+source/test/performance/LoadBalancers
+source/test/performance/treesearch
+source/test/pointer
+source/test/rank_group
+source/test/restartdb
+source/test/samrai_mpi
+source/test/sundials
+source/test/timers
+source/test/variables
+source/test/vector
+tools
+tools/restart
+"
+
+unset makefiles
+for i in $subdirs; do makefiles="$makefiles $i/Makefile"; done
+
+
+btng_log_vars="makefiles"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:20300:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+
+
+btng_log_vars="subdirs"
+for btng_log_vars_index in $btng_log_vars ; do
+  eval "test \"\${${btng_log_vars_index}+set}\" = set"
+  if test $? = 0; then
+    btng_log_vars_value="'`eval echo \\${$btng_log_vars_index}`'";
+  else
+    btng_log_vars_value="unset";
+  fi
+  echo "configure:20314:" "$btng_log_vars_index is $btng_log_vars_value" >&5;
+done
+
+
+$MKDIR_P $subdirs
+
+ac_config_files="$ac_config_files Makefile config/Makefile.config config/Makefile.config.install docs/Makefile docs/Doxyfile docs/devDoxyfile ${makefiles}"
+
+ac_config_commands="$ac_config_commands default"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    test "x$cache_file" != "x/dev/null" &&
+      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+    cat confcache >$cache_file
+  else
+    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
+  fi
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+	test -d "$1/.";
+      else
+	case $1 in
+	-*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+
+# Save the log message, to keep $[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.63.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_links="$ac_config_links"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTION]... [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+  -q, --quiet, --silent
+                   do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+      --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+      --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration links:
+$config_links
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf at gnu.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.63,
+  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2008 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $as_echo "$ac_cs_version"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
+    ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    { $as_echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    $as_echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { $as_echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  shift
+  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+  CONFIG_SHELL='$SHELL'
+  export CONFIG_SHELL
+  exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+
+
+
+# Commands before creating links.
+link_prefix="${link_prefix}"
+
+
+# Commands before creating links.
+link_prefix="${link_prefix}"
+
+
+
+srcdir=$srcdir
+subdirs="$subdirs"
+sundials_dir=$sundials_dir
+if test ! `cd $srcdir && pwd -P` = `pwd -P`; then
+  source_tree_is_not_compile_tree=1
+fi
+
+
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "include/SAMRAI/SAMRAI_config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/SAMRAI/SAMRAI_config.h:config/SAMRAI_config.h.in" ;;
+    "create-serpa-machine-file") CONFIG_COMMANDS="$CONFIG_COMMANDS create-serpa-machine-file" ;;
+    "config/serpa-run") CONFIG_FILES="$CONFIG_FILES config/serpa-run" ;;
+    "source/test/applications/ConvDiff/${link_prefix}example_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/applications/ConvDiff/${link_prefix}example_inputs:source/test/applications/ConvDiff/example_inputs" ;;
+    "source/test/applications/ConvDiff/${link_prefix}test_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/applications/ConvDiff/${link_prefix}test_inputs:source/test/applications/ConvDiff/test_inputs" ;;
+    "source/test/applications/Euler/${link_prefix}example_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/applications/Euler/${link_prefix}example_inputs:source/test/applications/Euler/example_inputs" ;;
+    "source/test/applications/Euler/${link_prefix}test_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/applications/Euler/${link_prefix}test_inputs:source/test/applications/Euler/test_inputs" ;;
+    "source/test/applications/LinAdv/${link_prefix}example_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/applications/LinAdv/${link_prefix}example_inputs:source/test/applications/LinAdv/example_inputs" ;;
+    "source/test/applications/LinAdv/${link_prefix}test_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/applications/LinAdv/${link_prefix}test_inputs:source/test/applications/LinAdv/test_inputs" ;;
+    "source/test/async_comm/${link_prefix}test_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/async_comm/${link_prefix}test_inputs:source/test/async_comm/test_inputs" ;;
+    "source/test/boundary/${link_prefix}test_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/boundary/${link_prefix}test_inputs:source/test/boundary/test_inputs" ;;
+    "source/test/clustering/async_br/${link_prefix}test_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/clustering/async_br/${link_prefix}test_inputs:source/test/clustering/async_br/test_inputs" ;;
+    "source/test/clustering/parallel_br/${link_prefix}test_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/clustering/parallel_br/${link_prefix}test_inputs:source/test/clustering/parallel_br/test_inputs" ;;
+    "source/test/communication/${link_prefix}test_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/communication/${link_prefix}test_inputs:source/test/communication/test_inputs" ;;
+    "source/test/dataaccess/${link_prefix}test_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/dataaccess/${link_prefix}test_inputs:source/test/dataaccess/test_inputs" ;;
+    "source/test/dlbg/${link_prefix}test_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/dlbg/${link_prefix}test_inputs:source/test/dlbg/test_inputs" ;;
+    "source/test/emb_bdry/${link_prefix}test_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/emb_bdry/${link_prefix}test_inputs:source/test/emb_bdry/test_inputs" ;;
+    "source/test/FAC_adaptive/${link_prefix}test_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/FAC_adaptive/${link_prefix}test_inputs:source/test/FAC_adaptive/test_inputs" ;;
+    "source/test/FAC_nonadaptive/${link_prefix}example_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/FAC_nonadaptive/${link_prefix}example_inputs:source/test/FAC_nonadaptive/example_inputs" ;;
+    "source/test/FAC_nonadaptive/${link_prefix}test_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/FAC_nonadaptive/${link_prefix}test_inputs:source/test/FAC_nonadaptive/test_inputs" ;;
+    "source/test/hierarchy/${link_prefix}test_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/hierarchy/${link_prefix}test_inputs:source/test/hierarchy/test_inputs" ;;
+    "source/test/hypre/${link_prefix}test_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/hypre/${link_prefix}test_inputs:source/test/hypre/test_inputs" ;;
+    "source/test/mblkcomm/${link_prefix}test_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/mblkcomm/${link_prefix}test_inputs:source/test/mblkcomm/test_inputs" ;;
+    "source/test/MblkEuler/${link_prefix}example_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/MblkEuler/${link_prefix}example_inputs:source/test/MblkEuler/example_inputs" ;;
+    "source/test/MblkEuler/${link_prefix}test_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/MblkEuler/${link_prefix}test_inputs:source/test/MblkEuler/test_inputs" ;;
+    "source/test/MblkLinAdv/${link_prefix}example_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/MblkLinAdv/${link_prefix}example_inputs:source/test/MblkLinAdv/example_inputs" ;;
+    "source/test/MblkLinAdv/${link_prefix}test_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/MblkLinAdv/${link_prefix}test_inputs:source/test/MblkLinAdv/test_inputs" ;;
+    "source/test/nonlinear/${link_prefix}test_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/nonlinear/${link_prefix}test_inputs:source/test/nonlinear/test_inputs" ;;
+    "source/test/patchbdrysum/${link_prefix}example_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/patchbdrysum/${link_prefix}example_inputs:source/test/patchbdrysum/example_inputs" ;;
+    "source/test/patchbdrysum/${link_prefix}test_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/patchbdrysum/${link_prefix}test_inputs:source/test/patchbdrysum/test_inputs" ;;
+    "source/test/performance/Euler/${link_prefix}performance_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/performance/Euler/${link_prefix}performance_inputs:source/test/performance/Euler/performance_inputs" ;;
+    "source/test/performance/Euler/${link_prefix}sample_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/performance/Euler/${link_prefix}sample_inputs:source/test/performance/Euler/sample_inputs" ;;
+    "source/test/performance/LinAdv/${link_prefix}performance_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/performance/LinAdv/${link_prefix}performance_inputs:source/test/performance/LinAdv/performance_inputs" ;;
+    "source/test/performance/LinAdv/${link_prefix}sample_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/performance/LinAdv/${link_prefix}sample_inputs:source/test/performance/LinAdv/sample_inputs" ;;
+    "source/test/performance/LoadBalancers/${link_prefix}cube_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/performance/LoadBalancers/${link_prefix}cube_inputs:source/test/performance/LoadBalancers/cube_inputs" ;;
+    "source/test/performance/LoadBalancers/${link_prefix}sphere_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/performance/LoadBalancers/${link_prefix}sphere_inputs:source/test/performance/LoadBalancers/sphere_inputs" ;;
+    "source/test/performance/LoadBalancers/${link_prefix}test_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/performance/LoadBalancers/${link_prefix}test_inputs:source/test/performance/LoadBalancers/test_inputs" ;;
+    "source/test/performance/treesearch/${link_prefix}test_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/performance/treesearch/${link_prefix}test_inputs:source/test/performance/treesearch/test_inputs" ;;
+    "source/test/rank_group/${link_prefix}test_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/rank_group/${link_prefix}test_inputs:source/test/rank_group/test_inputs" ;;
+    "source/test/sundials/${link_prefix}example_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/sundials/${link_prefix}example_inputs:source/test/sundials/example_inputs" ;;
+    "source/test/sundials/${link_prefix}test_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/sundials/${link_prefix}test_inputs:source/test/sundials/test_inputs" ;;
+    "source/test/timers/${link_prefix}example_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/timers/${link_prefix}example_inputs:source/test/timers/example_inputs" ;;
+    "source/test/timers/${link_prefix}test_inputs") CONFIG_LINKS="$CONFIG_LINKS source/test/timers/${link_prefix}test_inputs:source/test/timers/test_inputs" ;;
+    "source/test/applications/Euler/${link_prefix}RP_test") CONFIG_LINKS="$CONFIG_LINKS source/test/applications/Euler/${link_prefix}RP_test:source/test/applications/Euler/RP_test" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "config/Makefile.config") CONFIG_FILES="$CONFIG_FILES config/Makefile.config" ;;
+    "config/Makefile.config.install") CONFIG_FILES="$CONFIG_FILES config/Makefile.config.install" ;;
+    "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
+    "docs/Doxyfile") CONFIG_FILES="$CONFIG_FILES docs/Doxyfile" ;;
+    "docs/devDoxyfile") CONFIG_FILES="$CONFIG_FILES docs/devDoxyfile" ;;
+    "${makefiles}") CONFIG_FILES="$CONFIG_FILES ${makefiles}" ;;
+    "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+
+  *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp=
+  trap 'exit_status=$?
+  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} ||
+{
+   $as_echo "$as_me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr='
'
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+  ac_cs_awk_cr='\\r'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  . ./conf$$subs.sh ||
+    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
+    break
+  elif $ac_last_try; then
+    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\).*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\).*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = ""
+
+}
+{
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+  cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+  || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
+$as_echo "$as_me: error: could not setup config files machinery" >&2;}
+   { (exit 1); exit 1; }; }
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[	 ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_t"; then
+    break
+  elif $ac_last_try; then
+    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any.  Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+  line = \$ 0
+  split(line, arg, " ")
+  if (arg[1] == "#") {
+    defundef = arg[2]
+    mac1 = arg[3]
+  } else {
+    defundef = substr(arg[1], 2)
+    mac1 = arg[2]
+  }
+  split(mac1, mac2, "(") #)
+  macro = mac2[1]
+  prefix = substr(line, 1, index(line, defundef) - 1)
+  if (D_is_set[macro]) {
+    # Preserve the white space surrounding the "#".
+    print prefix "define", macro P[macro] D[macro]
+    next
+  } else {
+    # Replace #undef with comments.  This is necessary, for example,
+    # in the case of _POSIX_SOURCE, which is predefined and required
+    # on some systems where configure will not decide to define it.
+    if (defundef == "undef") {
+      print "/*", prefix defundef, macro, "*/"
+      next
+    }
+  }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+  { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
+$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
+   { (exit 1); exit 1; }; }
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
+$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
+   { (exit 1); exit 1; }; };;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
+	 # because $ac_f cannot contain `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+   { (exit 1); exit 1; }; };;
+      esac
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      ac_file_inputs="$ac_file_inputs '$ac_f'"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input='Generated from '`
+	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+	`' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+    fi
+    # Neutralize special characters interpreted by sed in replacement strings.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$tmp/stdin" \
+      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+   { (exit 1); exit 1; }; } ;;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  { as_dir="$ac_dir"
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
+   { (exit 1); exit 1; }; }; }
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+ac_sed_dataroot='
+/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+    s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+   { (exit 1); exit 1; }; }
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&2;}
+
+  rm -f "$tmp/stdin"
+  case $ac_file in
+  -) cat "$tmp/out" && rm -f "$tmp/out";;
+  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+  esac \
+  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+   { (exit 1); exit 1; }; }
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+  if test x"$ac_file" != x-; then
+    {
+      $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+    } >"$tmp/config.h" \
+      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+   { (exit 1); exit 1; }; }
+    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+      { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      rm -f "$ac_file"
+      mv "$tmp/config.h" "$ac_file" \
+	|| { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  else
+    $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+      || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
+$as_echo "$as_me: error: could not create -" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+ ;;
+  :L)
+  #
+  # CONFIG_LINK
+  #
+
+  if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
+    :
+  else
+    # Prefer the file from the source tree if names are identical.
+    if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
+      ac_source=$srcdir/$ac_source
+    fi
+
+    { $as_echo "$as_me:$LINENO: linking $ac_source to $ac_file" >&5
+$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
+
+    if test ! -r "$ac_source"; then
+      { { $as_echo "$as_me:$LINENO: error: $ac_source: file not found" >&5
+$as_echo "$as_me: error: $ac_source: file not found" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+    rm -f "$ac_file"
+
+    # Try a relative symlink, then a hard link, then a copy.
+    case $srcdir in
+    [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
+	*) ac_rel_source=$ac_top_build_prefix$ac_source ;;
+    esac
+    ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
+      ln "$ac_source" "$ac_file" 2>/dev/null ||
+      cp -p "$ac_source" "$ac_file" ||
+      { { $as_echo "$as_me:$LINENO: error: cannot link or copy $ac_source to $ac_file" >&5
+$as_echo "$as_me: error: cannot link or copy $ac_source to $ac_file" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+ ;;
+  :C)  { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "create-serpa-machine-file":C)
+# Generate a machine file if needed.
+if test ! -r "$serpa_machine_file" ; then
+  # Set the serpa machine file name to be in the same directory as
+  # the serpa-run script.
+  btng_serpa_dir_name=`echo 'config/serpa-run' | sed -e 's:^\([^/]*\)$:./\1:' -e 's:/[^/]*$::'`;
+  btng_serpa_machine_file="${btng_serpa_dir_name}/serpa.machines"
+  hostname="`hostname`"
+  cat <<-__EOF__>"$btng_serpa_machine_file"
+	$hostname
+	$hostname
+	$hostname
+	$hostname
+	__EOF__
+fi
+ ;;
+    "config/serpa-run":F) chmod +x config/serpa-run  ;;
+    "default":C)
+
+rm -rf Templates.DB ti_files ii_files
+
+$MKDIR_P config include lib bin $subdirs
+
+if test `pwd` != `cd "$srcdir" && pwd`
+then
+     $INSTALL  $srcdir/COPYRIGHT COPYRIGHT
+     $INSTALL  $srcdir/RELEASE-NOTES RELEASE-NOTES
+     $INSTALL  $srcdir/INSTALL-NOTES INSTALL-NOTES
+     $MKDIR_P source/test/testtools
+     $INSTALL  $srcdir/source/test/testtools/* source/test/testtools
+     $INSTALL  $srcdir/source/test/inputdb/*.input  source/test/inputdb
+
+                                             readme='source/test/applications/ConvDiff/README
+source/test/applications/Euler/README
+source/test/applications/Euler/README-test
+source/test/applications/LinAdv/README
+source/test/boundary/README
+source/test/dataops/README
+source/test/FAC_adaptive/README
+source/test/FAC_nonadaptive/README
+source/test/hypre/README
+source/test/MblkEuler/README
+source/test/MblkLinAdv/README
+source/test/nonlinear/README
+source/test/patchbdrysum/README
+source/test/performance/Euler/README
+source/test/performance/LinAdv/README
+source/test/pointer/README
+source/test/README
+source/test/restartdb/README
+source/test/sundials/README
+source/test/timers/README
+source/test/timers/README.example
+source/test/variables/README
+source/test/vector/README
+'
+     for i in $readme; do
+     	 $INSTALL  $srcdir/$i $i
+     done
+fi
+ ;;
+
+  esac
+done # for ac_tag
+
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+  { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff -r 000000000000 -r 5eda1a3f24e8 configure.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/configure.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1721 @@
+dnl
+dnl File:        $HeadURL: file:///usr/casc/samrai/repository/SAMRAI/trunk/configure.in $ 
+dnl Package:     SAMRAI build system
+dnl Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+dnl Revision:    $LastChangedRevision: 4332 $
+dnl Modified:    $LastChangedDate: 2010-11-10 12:57:29 -0800 (Wed, 10 Nov 2010) $
+dnl Description: autoconfig configuration file
+dnl
+
+AC_INIT(COPYRIGHT)
+AC_CONFIG_HEADER(include/SAMRAI/SAMRAI_config.h:config/SAMRAI_config.h.in)
+dnl
+dnl Autoheader stuff
+AH_TOP([
+
+#ifndef INCLUDED_SAMRAI_CONFIG_H
+#define INCLUDED_SAMRAI_CONFIG_H
+
+#define SAMRAI_VERSION_MAJOR 3
+#define SAMRAI_VERSION_MINOR 0
+#define SAMRAI_VERSION_PATCHLEVEL 14
+])
+AH_BOTTOM([
+
+/*
+ * Prevent inclusion of mpi C++ bindings in mpi.h includes.
+ * This is done in here rather than SAMRAI_MPI.h since other
+ * files include MPI.h, such as PETSc and hypre.
+ */
+#ifndef MPI_NO_CPPBIND
+#define MPI_NO_CPPBIND
+#endif
+
+#ifndef MPICH_SKIP_MPICXX
+#define MPICH_SKIP_MPICXX
+#endif
+
+#ifndef OMPI_SKIP_MPICXX
+#define OMPI_SKIP_MPICXX
+#endif
+
+#ifdef SAMRAI_INLINE
+#define SAMRAI_INLINE_KEYWORD inline
+#else
+#define SAMRAI_INLINE_KEYWORD 
+#endif
+
+/********************************************************************/
+/********************* Hardwired defines ****************************/
+/********************************************************************/
+
+/*
+ * For codes transitioning between non-DLBG and DLBG versions of
+ * SAMRAI, define USING_SAMRAI_DLBG to differentiate the cases.
+ * The non-DLBG version of SAMRAI does not define this macro.
+ */
+// TODO this should be removed before release
+#ifndef USING_SAMRAI_DLBG
+#define USING_SAMRAI_DLBG
+#endif
+
+/*
+ * Some compilers require cmath to be included before the regular
+ * C math.h and stdlib.h headers are brought in, otherwise
+ * the compiler will get conflicting definitions for the functions.
+ */
+#if defined(__xlC__)
+#define REQUIRES_CMATH 1
+#endif
+
+#define STL_SSTREAM_HEADER_FILE <sstream>
+#define LACKS_STRSTREAM
+
+/*
+ * A few things for the MSVC++ version.
+ */
+#ifdef _MSC_VER
+
+/*
+ * Move this bad stuff to the utility class, not POSIX
+ */
+#define drand48() ((double)rand()/(double)RAND_MAX)
+/*
+ * This is not correct, the range is wrong, need to find
+ * a better solution
+ */
+#define mrand48() (rand())
+
+/*
+ * Some IEEE stuff is not under the normal names.
+ *
+ */
+#define isnan _isnan
+
+#endif
+
+#endif
+])
+
+BTNG_AC_LOG_VAR(CONFIG_SHELL)
+
+AC_CONFIG_AUX_DIR(config)
+
+# Get system type.
+AC_CANONICAL_SYSTEM
+BTNG_AC_LOG_VAR(target_cpu target_vendor target_os)
+
+dnl SAMRAI has some code specific for the Solaris operating system.
+dnl (This is independent of what compiler is being used).
+case "$host_os" in
+  solaris*)
+    AC_DEFINE(HOST_OS_IS_SOLARIS,1,Define if the host system is Solaris)
+esac
+
+dnl
+dnl Define the macros that will set up optional packages and features.
+dnl These macros will define shell variables that will be queried later
+dnl in the installation script.
+dnl
+
+AC_ARG_ENABLE([vpath],
+   [AS_HELP_STRING([--enable-vpath],
+      [assume a working VPATH in make (default except on IRIX64)])]
+   )
+AC_ARG_ENABLE([noxargs],
+   [AS_HELP_STRING([--enable-noxargs],
+      [don't use xargs in build])]
+   )
+AC_ARG_ENABLE([shared],
+   [AS_HELP_STRING([--enable-shared],
+      [build shared libraries (default is disabled)])]
+   )
+AC_ARG_ENABLE([xdr],
+   [AS_HELP_STRING([--enable-xdr],
+      [build with XDR libraries (default is disabled)])],
+   ,
+   [enable_xdr="no"]
+   )
+AC_ARG_ENABLE([developer_makefile],
+   [AS_HELP_STRING([--enable-developer-makefile],
+      [include extra targets in makefiles])],
+   ,
+   [enable_developer_makefile="no"]
+   )
+AC_ARG_ENABLE([check_assertions],
+   [AS_HELP_STRING([--enable-check-assertions],
+      [build with assertion checking on (default is disabled; is enabled for when debugging is enabled)])],
+   [user_specified_check_assertions="yes"],
+   [enable_check_assertions="no"]
+   )
+AC_ARG_ENABLE([check_developer_assertions],
+   [AS_HELP_STRING([--enable-check-developer-assertions],
+      [build with internal SAMRAI developer assertion checking on (default is disabled)])],
+   [user_specified_check_developer_assertions="yes"],
+   )
+AC_ARG_ENABLE([check_dim_assertions],
+   [AS_HELP_STRING([--enable-check-dim-assertions],
+      [build with dimension assertion checking on (default is disabled; is enabled when debugging is enabled)])],
+   [user_specified_check_dim_assertions="yes"],
+   )
+AC_ARG_ENABLE([bgl],
+   [AS_HELP_STRING([--enable-bgl],
+      [Identify this platform as one of the bgl family (default is disable)])],
+   [enable_bgl=$enableval],
+   [enable_bgl=no]
+   )
+AC_ARG_ENABLE([inline],
+   [AS_HELP_STRING([--enable-inline],
+      [build with SAMRAI methods inlined (default is enabled; is disabled when
+      debugging is enabled)])],
+   [user_specified_inline="yes"],
+   [enable_inline="yes"]
+   )
+AC_ARG_WITH([CC],
+   [AS_HELP_STRING([--with-CC=ARG],[manually set C compiler to ARG])]
+   )
+AC_ARG_WITH([CXX],
+   [AS_HELP_STRING([--with-CXX=ARG],[manually set C++ compiler to ARG])]
+   )
+AC_ARG_WITH([F77],
+   [AS_HELP_STRING([--with-F77=ARG],[manually set F77 to ARG])]
+   )
+AC_ARG_WITH([M4],
+   [AS_HELP_STRING([--with-M4=ARG],[manually set M4 to ARG])]
+   )
+AC_ARG_WITH([AR],
+   [AS_HELP_STRING([--with-AR=ARG],[manually set AR to ARG])]
+   )
+AC_ARG_WITH([vampir],
+   [AS_HELP_STRING([--with-vampir[=dir]],
+      [compile with VAMPIR performance tracing])]
+   )
+AC_ARG_WITH([tau],
+   [AS_HELP_STRING([--with-tau[=dir]],[compile with TAU performance tracing])]
+   )
+AC_ARG_ENABLE([deprecated],
+   [AS_HELP_STRING([--enable-deprecated],
+      [build with deprecated features (default is enabled)])],
+   ,
+   [enable_deprecated="yes"]
+   )
+AC_ARG_WITH([maxdim],
+   [AS_HELP_STRING([--with-maxdim=ARG],
+      [manually set the maximum allowed dimension (default is 3)])],
+   ,
+   [with_maxdim=3]
+   )
+
+dnl
+dnl Set the maximum dimension for this complitation
+dnl 
+[validint()
+{
+  # validate first field. Optionally test against min value $2 and/or 
+  # max value $3: if you'd rather skip these tests, send "" as values.
+  # returns 1 for error, 0 for success.
+
+  number="$1";	    min="$2";	   max="$3"
+
+  if [ -z $number ] ; then
+    return 1
+  fi
+  
+  if [ "${number%${number#?}}" = "-" ] ; then	# first char '-' ?
+    testvalue="${number#?}" 	# all but first character
+  else
+    testvalue="$number"
+  fi
+  
+  nodigits="$(echo $testvalue | sed 's/[[:digit:]]//g')"
+  
+  if [ ! -z $nodigits ] ; then
+    return 1
+  fi
+  
+  if [ ! -z $min ] ; then
+    if [ "$number" -lt "$min" ] ; then
+       return 1
+    fi
+  fi
+  if [ ! -z $max ] ; then
+     if [ "$number" -gt "$max" ] ; then
+       return 1
+     fi
+  fi
+  return 0
+}]
+
+if validint "$with_maxdim" "1" ""; then
+   AC_DEFINE_UNQUOTED([SAMRAI_MAXIMUM_DIMENSION], 
+                      [$with_maxdim], 
+                      [Maximum dimension allowed])
+else
+   AC_MSG_ERROR([dimension must be an integer greater than 0, not \"$with_maxdim\"])   
+fi
+
+dnl
+dnl Since we removed the all-CAPS options and replaced them with
+dnl lowercase options, some people still use the all-CAPS options
+dnl and get confused with the results (despite our best efforts to
+dnl document this change).  We now abort the configuration to save
+dnl these poor souls from themselves.
+dnl
+AC_ARG_WITH(MPI,, AC_MSG_ERROR([Obsolete option for MPI used!!
+You should use lower-case.  Do 'configure --help' for help.]))
+AC_ARG_WITH(HDF5,, AC_MSG_ERROR([Obsolete option for HDF5 used!!
+You should use lower-case.  Do 'configure --help' for help.]))
+AC_ARG_WITH(PETSC,, AC_MSG_ERROR([Obsolete option for PETSC used!!
+You should use lower-case.  Do 'configure --help' for help.]))
+
+
+dnl
+dnl Initialize common macros to empty strings
+dnl
+
+C_FLAGS="$CFLAGS"
+CXX_FLAGS="$CXXFLAGS"
+F77_FLAGS="$FFLAGS"
+LD_FLAGS="$LDFLAGS"
+CXXLD_FLAGS="$LDFLAGS"
+CPP_FLAGS="$CPPFLAGS"
+
+INC_PATH=
+LIB_PATH=
+LIB_NAME=-lm
+
+dnl LIBS is not used by SAMRAI's configure.in, but it is used by some
+dnl of the supporting macros.
+LIBS="$LIBS -lm"
+
+LIB_SUFFIX=.a
+
+dnl For debugging configure:
+dnl LD_LIBRARY_PATH influences the configuration tests,
+dnl so we want to know what it is.
+BTNG_AC_LOG_VAR(LD_LIBRARY_PATH)
+
+dnl
+dnl Guess the machine architecture and set the variable ARCH
+dnl
+
+CASC_GUESS_ARCH
+BTNG_AC_LOG_VAR(ARCH)
+
+dnl
+dnl Set up the C++ compiler.  
+dnl
+
+if test -n "$with_CXX"; then
+   CXX=$with_CXX
+else
+   case "$host_os" in
+     linux*) CCC=" g++ ";;
+     solaris*) CCC=" g++ ";;
+     osf*) CCC=" g++ ";;
+     *) CCC=
+   esac
+fi
+BTNG_AC_LOG_VAR(with_CXX CXX CCC, before running compiler search)
+AC_PROG_CXX($CCC)
+BTNG_AC_LOG_VAR(with_CXX CXX CCC, after running compiler search)
+
+dnl
+dnl Set up the C compiler.  This macro must come first and be followed
+dnl AC_ISC_POSIX before other compiler tests are run.  See the autoconfig
+dnl manual for details.
+dnl
+
+if test -n "$with_CC"; then
+   CC=$with_CC
+else
+   AC_PROG_CC
+fi
+
+AC_ISC_POSIX
+
+
+dnl
+dnl A way to manually add flags to the loader (ld) command.
+dnl
+AC_ARG_WITH([extra-ld-flags],
+[AS_HELP_STRING([--with-extra-ld-flags=STRING],
+   [Specify additional flags for the loader.])],
+,with_extra_ld_flags='no')
+case "$with_extra_ld_flags" in
+  no)
+    : No op
+  ;;
+  yes)
+    : No op
+  ;;
+  *)
+    LD_FLAGS="$LD_FLAGS $with_extra_ld_flags"
+  ;;
+esac
+
+
+dnl
+dnl Find ar for archiving
+dnl
+
+AC_CHECK_PROGS(AR, $with_AR ar,)
+if test -z "$AR"; then
+   AC_MSG_ERROR([ar archiver not found - specify with --with-m4=ARG])
+fi
+
+dnl
+dnl Find m4, preferably the GNU version.
+dnl
+
+AC_CHECK_PROGS(M4, $with_M4 gm4 m4,)
+if test -z "$M4"; then
+   AC_MSG_ERROR([m4 preprocessor not found - specify with --with-M4=ARG])
+fi
+
+
+dnl
+dnl Find install for installing 
+dnl
+
+AC_PROG_INSTALL
+if test -z "$INSTALL"; then
+   AC_MSG_ERROR([install not found])
+fi
+
+dnl
+dnl Find mkdir for creating directories
+dnl
+
+AC_PROG_MKDIR_P
+if test -z "$MKDIR_P"; then
+   AC_MSG_ERROR([mkdir not found])
+fi
+
+dnl
+dnl Determine what compilers are being used.
+dnl
+
+BTNG_INFO_CC_CXX_ID
+# Warn user about unsupported compilers:
+case $CXX_ID in
+gnu|xlc|intel) ;;
+*)
+  AC_MSG_WARN([
+You are using a C++ compiler unsupported by SAMRAI
+You are on your own!
+])
+  ;;
+esac
+
+dnl
+dnl Check various C++ compiler features.
+dnl
+
+
+CASC_CXX_NAMESPACE
+CASC_CXX_TEMPLATE_COMPLEX
+CASC_CXX_SSTREAM
+CASC_CXX_IOMANIP_LEFT
+CASC_CXX_NEW_PLACEMENT_OPERATOR
+CASC_CXX_MEMBER_FUNCTION_SPECIALIZATION
+CASC_CXX_STATIC_DATA_INSTANTIATION
+CASC_CXX_EXCEPTION_HANDLING
+CASC_CXX_STANDARD_STATIC_DATA_SPECIALIZATION
+if test "$casc_cv_cxx_have_standard_static_data_specialization" = "no"; then
+   CASC_CXX_PRAGMA_STATIC_DATA_SPECIALIZATION
+fi
+
+CASC_CXX_CMATH
+
+CASC_CXX_ISNAN_TEMPLATE
+
+CASC_CXX_STD_FILL_N_RETURNS_VOID
+
+CASC_CXX_CTIME
+AC_CHECK_HEADERS([sys/times.h])
+AC_CHECK_HEADERS([unistd.h])
+
+
+# For insure add -Zsl option for linking
+case $CXX in 
+   *insure*)
+            CXX_FLAGS="$CXX_FLAGS -Zsl"
+            LIB_NAME="$LIB_NAME -Zsl"
+            ;;
+esac
+
+case $CXX_ID in
+   gnu)
+      CXX_FLAGS="-Wall -Wextra -Wconversion $CXX_FLAGS"
+      case $ARCH in
+         IRIX64)
+            CXX_FLAGS="-mabi=64 $CXX_FLAGS"
+            ;;
+	 solaris)
+	    ;;
+	 CYGWIN)
+	    CXX_FLAGS="$CXX_FLAGS"
+	    ;;
+      esac
+      ;;
+   sunpro)
+      CXX_FLAGS="-qrtti=all $CXX_FLAGS"
+      case $ARCH in
+         solaris | sun4)
+            CXX_FLAGS="$CXX_FLAGS"
+            CXX_FLAGS="+p $CXX_FLAGS"
+            ;;
+      esac
+      ;;
+   xlc)
+      CXX_FLAGS="-qrtti -g $CXX_FLAGS"
+      ;;
+   intel)
+      # Ignore some Intel warnings that seem harmless and very hard to get rid of 	
+      CXX_FLAGS="$CXX_FLAGS -Wall -w1 -wd981 -wd383 -wd1418 -wd522"
+      ;;
+    insure)
+      case $ARCH in
+         solaris | sun4)
+            CXX_FLAGS="+p $CXX_FLAGS"
+            LIB_NAME="$LIB_NAME -Zsl"
+            ;;
+      esac
+      ;;
+    *)
+      ;;
+esac
+
+dnl
+dnl The standard requires that implementation be present when compiling a template.
+dnl
+AC_DEFINE([INCLUDE_TEMPLATE_IMPLEMENTATION],[1],[INCLUDE_TEMPLATE_IMPLEMENTATION])
+DEPENDS_ON_TEMPLATE_IMPLEMENTATION="yes"
+AC_SUBST(DEPENDS_ON_TEMPLATE_IMPLEMENTATION)
+
+dnl
+dnl Set the compile mode flag for the kind of target to build
+dnl
+
+XARGS="xargs -n 150"
+SAMRAI_TARGET="standard"
+if test "$enable_noxargs" = "yes"; then
+   SAMRAI_TARGET="noxargs"
+fi
+
+if test "$enable_shared" = "yes"; then
+   SAMRAI_TARGET="shared"
+   case $ARCH in
+   Linux | LINUX | linux )
+      C_FLAGS="-fPIC $C_FLAGS"
+      CXX_FLAGS="-fPIC $CXX_FLAGS"
+      F77_FLAGS="-fPIC $F77_FLAGS"
+      CXXLD_FLAGS="-shared $LD_FLAGS"
+      LIB_SUFFIX=.so
+      ;;
+   rs6000)
+      CXXLD_FLAGS="-G $LD_FLAGS"
+      LD_FLAGS="$LD_FLAGS -binitfini:poe_remote_main"
+      LIB_SUFFIX=.so
+      ;;
+   *)
+      C_FLAGS="-KPIC $C_FLAGS"
+      CXX_FLAGS="-KPIC $CXX_FLAGS"
+      CXXLD_FLAGS="-shared $LD_FLAGS"
+      LIB_SUFFIX=.so
+      ;;
+   esac
+fi
+
+
+
+dnl
+dnl Set the flag indicating if extra targets
+dnl should be included in the Makefile.
+dnl Normally used by developers but not users.
+dnl
+if test "$enable_developer_makefile" = "no"; then
+   DEVELOPER_MAKEFILE="no"
+else
+   DEVELOPER_MAKEFILE="yes"
+fi
+AC_SUBST(DEVELOPER_MAKEFILE)
+
+dnl
+dnl Define optimize and debug switches.
+dnl By default, set no optimization switches and set -g for debug switches.
+dnl
+
+SAMRAI_TIMERS
+AC_ARG_ENABLE([opt],
+   [AS_HELP_STRING([--enable-opt=STRING],
+      [Set compiler optimization switches.])],
+[case "$enable_opt" in
+   no) opt_switches= ;;
+   yes)
+      dnl by default we'll set user_specified_inline to yes here
+      dnl since enabling optimization also should enable inlining
+      user_specified_inline="yes"
+      case $CXX_ID in
+         gnu)   opt_switches="-O2" ;;
+         intel) opt_switches="-O3" ;;
+         sunpro)
+             case $ARCH in
+                solaris | sun4) opt_switches="-fast" ;;
+                *)              opt_switches="-O" ;;
+             esac ;;
+         xlc)   opt_switches="-O3" ;;
+         *)     opt_switches="-O" ;;
+      esac ;;
+   *) opt_switches="$enable_opt" ;;
+esac],
+opt_switches=)
+
+if test -n "$opt_switches" ; then
+   C_FLAGS="$opt_switches $C_FLAGS"
+   CXX_FLAGS="$opt_switches $CXX_FLAGS"
+   F77_FLAGS="$opt_switches $F77_FLAGS"
+fi
+
+AC_ARG_ENABLE([debug],
+[AS_HELP_STRING([--enable-debug=STRING],[Set compiler debug switches.])],
+[case "$enable_debug" in
+   no) debug_switches= ;;
+   yes)
+      case $CXX_ID in
+         *)   debug_switches="-g" ;;
+      esac ;;
+   *) debug_switches="$enable_debug" ;;
+esac
+],
+debug_switches=-g)
+
+case "$enable_debug" in
+   no) ;;
+   *)   
+   # Enable assertion checking and disable inlining when debugging is enabled if user
+   # does not override.
+   if test "$user_specified_check_assertions" != "yes"; then
+      enable_check_assertions="yes"
+   fi
+   if test "$user_specified_check_dim_assertions" != "yes"; then
+      enable_check_dim_assertions="yes"
+   fi
+   if test "$user_specified_inline" != "yes"; then
+      enable_inline="no"
+   fi    
+   AC_DEFINE([DEBUG_INITIALIZE_UNDEFINED],[1],[Initialize new memory to undefined values in debug mode])
+esac
+
+dnl
+dnl Check if compiling with assertions on
+dnl
+if test "$enable_check_assertions" = "yes"; then
+   AC_DEFINE([DEBUG_CHECK_ASSERTIONS],[1],[Enable assertion checking])
+fi
+
+
+dnl
+dnl Check if compiling with SAMRAI developer assertions on
+dnl
+if test "$enable_check_developer_assertions" = "yes"; then
+   AC_DEFINE([DEBUG_CHECK_DEV_ASSERTIONS],[1],[Enable SAMRAI developer assertion checking])
+fi
+
+dnl
+dnl Check if compiling with dimension assertions on
+dnl
+if test "$enable_check_dim_assertions" = "yes"; then
+   AC_DEFINE([DEBUG_CHECK_DIM_ASSERTIONS],[1],[Enable assertion checking for dimensions])
+fi
+
+dnl
+dnl Check if compiling on bgl family of machines
+dnl
+if test "$enable_bgl" = "yes"; then
+   AC_DEFINE([__BGL_FAMILY__],[1],[Configure for compiling on BGL family of
+   machines])
+fi
+
+dnl
+dnl Check if compiling with SAMRAI methods inlined 
+dnl
+if test "$enable_inline" = "yes"; then
+   AC_DEFINE([SAMRAI_INLINE],[1],[Enable inlining of methods])
+fi
+
+if test -n "$debug_switches" ; then
+   C_FLAGS="$debug_switches $C_FLAGS"
+   CXX_FLAGS="$debug_switches $CXX_FLAGS"
+   F77_FLAGS="$debug_switches $F77_FLAGS"
+fi
+
+BTNG_AC_LOG_VAR(debug_switches opt_switches)
+
+dnl
+dnl Set the optional classes to build
+dnl
+
+dnl
+dnl Set up the Fortran compiler.  Look for special Fortran compilers on
+dnl AIX machines.
+dnl
+
+if test -n "$with_F77"; then
+   dnl If user specifies full path then don't search in path
+   if test -f $with_F77; then
+      F77=$with_F77
+   else
+      AC_CHECK_PROGS(F77, $with_F77)
+   fi
+else
+   if test -z "$F77"; then
+      AC_CHECK_PROGS(F77, f77 g77 xlf f2c)
+   else
+      dnl If F77 was specified then see if it is a full path
+      dnl or just the prog name in users PATH
+      if test -f $F77; then
+	F77=$F77
+      else
+	AC_CHECK_PROGS(F77, $F77)
+      fi
+   fi
+fi
+
+test -z "$F77" && AC_MSG_ERROR([no acceptable Fortran found in $PATH])
+BTNG_AC_LOG_VAR(F77)
+
+if test "$ac_cv_prog_g77" = "yes"; then
+   F77_FLAGS="-Wall -Wimplicit -Wunused $F77_FLAGS"
+else
+   case $ARCH in
+      sun4 | solaris)
+         F77_FLAGS="-u $F77_FLAGS"
+         ;;
+      rs6000)
+         F77_FLAGS="-u $F77_FLAGS"
+         ;;
+      IRIX64)
+         F77_FLAGS="-64 $F77_FLAGS"
+         ;;
+   esac
+fi
+
+dnl dnl
+dnl dnl Set up the Fortran libraries.
+dnl dnl
+AC_F77_LIBRARY_LDFLAGS
+SAMRAI_SPLIT_LIBS_STRING(FLIBS,FLIBS_PATH,FLIBS_NAME)
+LIB_NAME="${LIB_NAME} ${FLIBS_NAME}"
+LIB_PATH="${LIB_PATH} ${FLIBS_PATH}"
+BTNG_AC_LOG_VAR([FLIBS FLIBS_PATH FLIBS_NAME], [after using ac_f77_library_ldflags])
+
+dnl
+dnl Find the correct way to mangle fortran function names
+dnl so they can be called from C.  Calling this macro puts
+dnl certain #define statements in the config.h file to choose
+dnl the correct mangling.
+dnl A fortran subroutine named dothis can be called from C using
+dnl    F77_FUNC(dothis,DOTHIS)
+dnl A fortran subroutine named do_this can be called from C using
+dnl    F77_FUNC_(do_this,DO_THIS)
+dnl
+AC_F77_WRAPPERS
+
+dnl
+dnl When user specifies, override the results from AC_F77_WRAPPERS.
+dnl This is a total kludge for fixing a problem on Purple.
+dnl It corrects the results of the name mangling test in
+dnl AC_F77_WRAPPERS, where the mangling results differs
+dnl depending on whether direct compiles or with intervening
+dnl library (.a) file.  This is a total kludge!!!! but it's
+dnl too hard to improve the test or fix the strange behavior.
+dnl
+AC_MSG_CHECKING(whether to kludge override fortran name mangling results)
+AC_ARG_ENABLE([fortran-mangling-override],
+[AS_HELP_STRING([--enable-fortran-mangling-override],
+          [Kludgey FORTRAN name mangling fix.  Not for general use.])],
+[case "$enable_fortran_mangling_override" in
+  [yes)]
+  AC_MSG_RESULT(yes)
+  sed -e ['s/^\(#define F77_FUNC.\{1,\}\)/\1 ## _/'] confdefs.h > confdefs1.h
+  mv confdefs1.h confdefs.h
+esac],
+AC_MSG_RESULT(no))
+
+dnl
+dnl Find the X11 include directory, library directory, and associated
+dnl libraries.
+dnl
+
+if test "${with_x+set}" = set; then
+   AC_PATH_XTRA
+   if test "yes" = "$no_x"; then
+      AC_MSG_NOTICE([NOTIFICATION: SAMRAI configured without the X11 library])
+      AC_DEFINE([LACKS_X11],[1],[X11 library is missing])
+   else
+      AC_DEFINE([HAVE_X11],[1],[X11 library is present])
+      if test -n "$x_includes"; then
+         INC_PATH="-I$x_includes $INC_PATH"
+      fi
+      # This is a hack, SAMRAI adds the shared library syntax later
+      X_LIBS=`echo $X_LIBS | sed 's/-R\//-L\//'`
+      x11_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
+      SAMRAI_SPLIT_LIBS_STRING(x11_LIBS,x11_LIB_PATH,x11_LIB_NAME)
+      LIB_PATH="$x11_LIB_PATH $LIB_PATH"
+      LIB_NAME="$x11_LIB_NAME $LIB_NAME"
+   fi
+else
+   AC_MSG_NOTICE([NOTIFICATION: SAMRAI configured without the X11 library])
+   AC_DEFINE([LACKS_X11],[1],[X11 library is missing])
+fi
+
+dnl
+dnl If vpath is working then we don't need to include SRCDIR
+dnl in the compiler invocation targets.  By default, we assume
+dnl that vpath works properly (except on IRIX64).  If this is
+dnl not the case, then the user must specify --disable-vpath
+dnl in the configuration.
+dnl
+
+case $ARCH in
+   IRIX64)
+      if test -z "$enable_vpath"; then
+         enable_vpath=no
+      fi
+      ;;
+   *)
+      if test -z "$enable_vpath"; then
+         enable_vpath=yes
+      fi
+      ;;
+esac
+
+if test "$enable_vpath" = "no"; then
+   SRCDIR_COMPILE_PREFIX="\$(SRCDIR)/"
+else
+   SRCDIR_COMPILE_PREFIX=""
+fi
+
+
+dnl
+dnl Valgrind
+dnl 
+CASC_SUPPORT_VALGRIND
+AC_SUBST(valgrind_EXE)
+
+dnl
+dnl Set DOXYGEN_BIN to the doxygen binary.
+dnl
+
+BTNG_PATH_PROG(DOXYGEN_BIN,doxygen)
+BTNG_AC_LOG_VAR(DOXYGEN_BIN)
+
+dnl
+dnl Set DOT_PATH to the directory of the dot binary, for use with doxygen.
+dnl
+
+AC_ARG_WITH([dot-dir],
+[AS_HELP_STRING([--with-dot-dir=DIR],
+   [Specify bin directory where dot binaries live.])],,
+unset with_dot_dir)
+if   test "${with_dot_dir}" = yes || test ! "${with_dot_dir+set}" = set; then
+  # Find dot path, and use if found
+  DOT_PATH=`which dot >& /dev/null`
+  if test -z "${DOT_PATH}"; then
+    unset DOT_PATH
+    HAVE_DOT=NO
+  else
+    [DOT_PATH=`echo $DOT_PATH | sed 's!/[^/]\{1,\}$!!']`
+    HAVE_DOT=YES
+  fi
+elif test "${with_dot_dir}" = no; then
+  # Disable dot.
+  unset DOT_PATH
+  HAVE_DOT=NO
+else
+  # Make sure valid path is specified.  Enable dot.
+  if test ! -d ${with_dot_dir}; then
+     AC_MSG_WARN([
+Invalid path given for dot executable: ${with_dot_dir}.
+Path does not exist.
+You can expect doxygen documentation generation to not work properly.
+]);
+  fi
+  DOT_PATH=${with_dot_dir}
+  HAVE_DOT=YES
+fi
+BTNG_AC_LOG_VAR(with_dot_dir HAVE_DOT DOT_PATH)
+AC_SUBST(HAVE_DOT)
+AC_SUBST(DOT_PATH)
+
+dnl BTNG_PATH_PROG(DOT_BIN,dot)
+dnl BTNG_AC_LOG_VAR(DOT_BIN)
+dnl AC_SUBST(DOT_BIN)
+dnl # Doxygen wants to know if we have the dot binary.
+dnl HAVE_DOT=NO;  test "${DOT_BIN+set}" = set && HAVE_DOT=YES
+dnl AC_SUBST(HAVE_DOT)
+
+dnl
+dnl Set the directory for doxygen documentation.
+dnl
+AC_ARG_WITH([dox-output-dir],
+[AS_HELP_STRING([--with-dox-output-dir=DIR],
+   [Specify full where Doxygen documentation is generated.  Default is the docs
+   directory in the compile tree.])])
+if test -n "$with_dox_output_dir"; then
+  if echo "$with_dox_output_dir" | grep -v '^/' ; then
+    AC_MSG_ERROR(You must give a full path with --with-dox-output-dir=DIR)
+  fi
+  dox_output_dir="$with_dox_output_dir"
+  # Make sure dox_output_dir ends with / so because the doxygen
+  # configuration files simply append a subdirectory name.
+  [dox_output_dir="`echo $dox_output_dir | sed 's:\([^/]\)$:\1/:'`"]
+fi
+AC_SUBST(dox_output_dir)
+
+dnl
+dnl Set SAMRAI_PERL to the perl binary for use in doxygen.
+dnl
+
+BTNG_PATH_PROG(SAMRAI_PERL,perl)
+BTNG_AC_LOG_VAR(SAMRAI_PERL)
+
+dnl
+dnl Whether restrict key word works.
+dnl
+BTNG_AC_LOG(begin stringize)
+AC_C_STRINGIZE
+BTNG_AC_LOG(end stringize)
+
+dnl
+dnl Whether restrict key word works.
+dnl
+BTNG_C_RESTRICT
+
+dnl
+dnl Look for the iomanip header file name.
+dnl
+BTNG_IOMANIP_HEADER_FILENAME
+
+dnl
+dnl Look for the iostream header file name.
+dnl
+BTNG_IOSTREAM_HEADER_FILENAME
+
+dnl
+dnl Look for the strstream header file name.
+dnl
+BTNG_STL_SSTREAM_HEADER_FILENAME
+dnl
+dnl Deal with broken ostringstream type.
+dnl Some platforms have ostringstream and some ostrstream.
+dnl We need to know which is broken.
+dnl
+AC_LANG_PUSH([C++])
+BTNG_TYPE_NAMESPACE
+AC_MSG_CHECKING(type ostringstream)
+AC_TRY_COMPILE([#include STL_SSTREAM_HEADER_FILE
+#ifndef NAMESPACE_IS_BROKEN
+using namespace std;
+#endif
+], [ostringstream oss; oss << 10;]
+,
+AC_MSG_RESULT(ok),
+AC_MSG_RESULT(broken)
+AC_DEFINE(OSTRINGSTREAM_TYPE_IS_BROKEN,1,The type ostringstream is broken)
+)
+AC_MSG_CHECKING(type ostrstream)
+AC_TRY_COMPILE([#include STL_SSTREAM_HEADER_FILE
+#ifndef NAMESPACE_IS_BROKEN
+using namespace std;
+#endif
+], [ostrstream oss; oss << 10;]
+,
+AC_MSG_RESULT(ok),
+AC_MSG_RESULT(broken)
+AC_DEFINE(OSTRSTREAM_TYPE_IS_BROKEN,1,The type ostrstream is broken)
+)
+AC_LANG_POP([C++])
+
+dnl
+dnl Check if malloc.h is present
+dnl
+AC_CHECK_HEADER(malloc.h,
+        AC_DEFINE([HAVE_MALLOC_H],[1],[HAVE_MALLOC_H])
+        )
+
+dnl
+dnl Checking for mallinfo
+dnl
+AC_MSG_CHECKING(for mallinfo)
+AC_TRY_COMPILE([#include <malloc.h>], void *x=mallinfo,
+  AC_DEFINE(HAVE_MALLINFO, 1, Define if you have the 'mallinfo' function.)
+  AC_MSG_RESULT(yes),
+  AC_MSG_RESULT(no)
+)
+
+CASC_CXX_ISNAN
+
+dnl
+dnl Set dl library on Linux.
+dnl Linux has a dynamic load library, and some software (PETSc-2.1.3
+dnl for example) require it.  When configuring on Linux, if the
+dnl dl library is found, use it.
+dnl
+
+BTNG_SUPPORT_DL(1)
+if test "${dl_PREFIX+set}" = set; then
+  if echo $target_os | grep '^linux' > /dev/null \
+    && test ! "${dl_LIBS+set}" = set; then
+    AC_MSG_WARN([
+	The Linux dynamic loading library is not found.
+	This may cause problems with some libraries that use it.
+	In particular, we have seen that PETSc may use this library.
+    ])
+  fi
+  if test "${dl_LIBS}"; then
+    LIBS="$dl_LIBS $LIBS"
+    SAMRAI_SPLIT_LIBS_STRING(dl_LIBS,dl_LIB_PATH,dl_LIB_NAME)
+    LIB_PATH="$dl_LIB_PATH $LIB_PATH"
+    LIB_NAME="$dl_LIB_NAME $LIB_NAME"
+    INC_PATH="$dl_INCLUDES $INC_PATH"
+  fi
+fi
+
+
+
+dnl dnl
+dnl dnl Set up the Fortran libraries.
+dnl dnl
+AC_F77_LIBRARY_LDFLAGS
+SAMRAI_SPLIT_LIBS_STRING(FLIBS,FLIBS_PATH,FLIBS_NAME)
+LIB_NAME="${LIB_NAME} ${FLIBS_NAME}"
+LIB_PATH="${LIB_PATH} ${FLIBS_PATH}"
+BTNG_AC_LOG_VAR([FLIBS FLIBS_PATH FLIBS_NAME], [after using ac_f77_library_ldflags])
+dnl dnl
+dnl dnl Set fortran library.
+dnl dnl
+dnl BTNG_AC_LOG_VAR(fortran_LIBS fortran_LIB_PATH fortran_LIB_NAME LIB_PATH LIB_NAME, before getting fortran libs)
+dnl BTNG_SUPPORT_FORTRAN_FROM_C(1)
+dnl if test -n "$fortran_LIBS" ; then
+dnl   LIBS="$LIBS $fortran_LIBS"
+dnl   SAMRAI_SPLIT_LIBS_STRING(fortran_LIBS,fortran_LIB_PATH,fortran_LIB_NAME)
+dnl   LIB_PATH="$fortran_LIB_PATH $LIB_PATH"
+dnl   LIB_NAME="$fortran_LIB_NAME $LIB_NAME"
+dnl fi
+dnl BTNG_AC_LOG_VAR(fortran_LIBS fortran_LIB_PATH fortran_LIB_NAME LIB_PATH LIB_NAME, after getting fortran libs)
+
+
+dnl
+dnl If the nsl library can be found, use it.
+dnl
+
+BTNG_SUPPORT_NSL(1)
+if test "${nsl_PREFIX+set}" = set; then
+  LIBS="$nsl_LIBS $LIBS"
+  SAMRAI_SPLIT_LIBS_STRING(nsl_LIBS,nsl_LIB_PATH,nsl_LIB_NAME)
+  LIB_PATH="$nsl_LIB_PATH $LIB_PATH"
+  LIB_NAME="$nsl_LIB_NAME $LIB_NAME"
+  INC_PATH="$nsl_INCLUDES $INC_PATH"
+fi
+
+dnl
+dnl Set variables for blas support
+dnl
+BTNG_SUPPORT_BLAS
+if test "${blas_PREFIX+set}" = set ||
+   test "${blas_INCLUDES+set}" = set ||
+   test "${blas_LIBS+set}" = set ; then
+  SAMRAI_SPLIT_LIBS_STRING(blas_LIBS,blas_LIB_PATH,blas_LIB_NAME)
+  LIB_PATH="$blas_LIB_PATH $LIB_PATH"
+  LIB_NAME="$blas_LIB_NAME $LIB_NAME"
+  INC_PATH="$blas_INCLUDES $INC_PATH"
+  AC_DEFINE(HAVE_BLAS,1,BLAS library is available so use it)
+fi
+BTNG_AC_LOG_VAR(blas_LIB_PATH blas_LIB_NAME LIB_PATH LIB_NAME)
+
+dnl
+dnl Set variables for lapack support
+dnl
+BTNG_SUPPORT_LAPACK
+if test "${lapack_PREFIX+set}" = set ||
+   test "${lapack_INCLUDES+set}" = set ||
+   test "${lapack_LIBS+set}" = set ; then
+  SAMRAI_SPLIT_LIBS_STRING(lapack_LIBS,lapack_LIB_PATH,lapack_LIB_NAME)
+  LIB_PATH="$lapack_LIB_PATH $LIB_PATH"
+  LIB_NAME="$lapack_LIB_NAME $LIB_NAME"
+  INC_PATH="$lapack_INCLUDES $INC_PATH"
+  AC_DEFINE(HAVE_LAPACK,1,LAPACK library is available so use it)
+fi
+BTNG_AC_LOG_VAR(lapack_LIB_PATH lapack_LIB_NAME LIB_PATH LIB_NAME)
+
+dnl
+dnl If MPI is requested, then determine the proper path using CASC_FIND_MPI.
+dnl Note:  I added CASC_FIND_MPI_ALPHA for special case with compass cluster.
+dnl For more information, see code comments for macro in casc_mpi.m4.  AMW 9/00
+dnl
+
+AC_ARG_WITH([mpi],
+   [AS_HELP_STRING([--without-mpi],[Compile without MPI library.])])
+if test "$with_mpi" = no; then
+   AC_MSG_NOTICE([NOTIFICATION: SAMRAI configured without the MPI library])
+   AC_DEFINE([LACKS_MPI],[1],[MPI library is missing])
+else
+
+   case $ARCH in
+      alpha)
+         CASC_FIND_MPI_ALPHA
+      ;;
+      *)
+         CASC_FIND_MPI
+      ;;
+   esac
+
+   if test -n "$MPIINCLUDE" -o -n "$MPILIBS" -o -n "$MPILIBDIRS"; then
+      with_mpi=yes
+      AC_DEFINE([HAVE_MPI],[1],[MPI library is present])
+      INC_PATH="$MPIINCLUDE $INC_PATH"
+      LIB_NAME="$MPILIBS $LIB_NAME"
+      LIB_PATH="$MPILIBDIRS $LIB_PATH"
+      BTNG_AC_LOG_VAR(MPIINCLUDE MPILIBS MPILIBDIRS, After successfully finding MPI using casc_find_mpi)
+      CONFIGURED_WITH_MPI="with_mpi"
+      AC_SUBST(CONFIGURED_WITH_MPI)
+   fi
+fi
+BTNG_AC_LOG_VAR(with_mpi)
+
+dnl
+dnl Support linking with Z lib if HDF requires it
+dnl
+CHECK_ZLIB()
+SAMRAI_SPLIT_LIBS_STRING(zlib_LIBS,zlib_LIB_PATH,zlib_LIB_NAME)
+LIB_PATH="$zlib_LIB_PATH $LIB_PATH"
+LIB_NAME="$zlib_LIB_NAME $LIB_NAME"
+INC_PATH="$zlib_INCLUDES $INC_PATH"
+
+dnl
+dnl Set variables for hdf5 support
+dnl
+CASC_SUPPORT_HDF5
+if test "${hdf5_PREFIX+set}" = set; then
+  SAMRAI_SPLIT_LIBS_STRING(hdf5_LIBS,hdf5_LIB_PATH,hdf5_LIB_NAME)
+  LIB_PATH="$hdf5_LIB_PATH $LIB_PATH"
+  LIB_NAME="$hdf5_LIB_NAME $LIB_NAME"
+  INC_PATH="$hdf5_INCLUDES $INC_PATH"
+  AC_DEFINE(HAVE_HDF5,1,HDF5 library is available so use it)
+else
+  if test ! "$with_hdf5" = no; then
+   AC_MSG_ERROR([HDF5 not found - either specify a valid location via --with-hdf5=PATH or if you do not have HDF5 use --without-hdf5.  Note: if you do not have HDF5 you will not be able to use SAMRAI's VisIt Data writer and the VisIt visualization package.])
+  fi
+fi
+BTNG_AC_LOG_VAR(
+[hdf5_INCLUDES INC_PATH hdf5_LIB_PATH hdf5_LIB_NAME LIB_PATH LIB_NAME])
+
+dnl
+dnl Silo support
+dnl
+CASC_SUPPORT_SILO
+if test "${silo_PREFIX+set}" = set; then
+  SAMRAI_SPLIT_LIBS_STRING(silo_LIBS,silo_LIB_PATH,silo_LIB_NAME)
+  LIB_PATH="$silo_LIB_PATH $LIB_PATH"
+  LIB_NAME="$silo_LIB_NAME $LIB_NAME"
+  INC_PATH="$silo_INCLUDES $INC_PATH"
+  AC_DEFINE([HAVE_SILO],[1],[SILO library is available so use it])
+fi
+BTNG_AC_LOG_VAR(
+[silo_INCLUDES INC_PATH silo_LIB_PATH silo_LIB_NAME LIB_PATH LIB_NAME])
+
+dnl
+dnl Set variables for hypre support.
+dnl
+BTNG_SUPPORT_HYPRE
+if test "${hypre_PREFIX+set}" = set; then
+  SAMRAI_SPLIT_LIBS_STRING(hypre_LIBS,hypre_LIB_PATH,hypre_LIB_NAME)
+  LIB_PATH="$hypre_LIB_PATH $LIB_PATH"
+  LIB_NAME="$hypre_LIB_NAME $LIB_NAME"
+  INC_PATH="$hypre_INCLUDES $INC_PATH"
+  AC_DEFINE(HAVE_HYPRE,1,HYPRE library is available so use it)
+  AC_MSG_CHECKING(whether HYPRE was compiled with MPI)
+  # Check how HYPRe was compiled.
+  BTNG_AC_LOG_VAR(hypre_PARALLELISM)
+  if test "$hypre_PARALLELISM" = 'parallel'; then
+     AC_MSG_RESULT(yes)
+     if test "$with_mpi" = no ; then
+        AC_MSG_ERROR(sequential SAMRAI cannot call parallel HYPRE)
+     fi
+  elif test "$hypre_PARALLELISM" = 'serial'; then
+     AC_MSG_RESULT(no)
+     AC_DEFINE([HYPRE_SEQUENTIAL],[1],[Hypre library is configured for sequential mode])
+     if test "$with_mpi" != no ; then
+        AC_MSG_ERROR(parallel SAMRAI cannot call sequential HYPRE)
+     fi
+  else
+     AC_MSG_WARN(Cannot determine if hypre was compiled for serial or parallel)
+  fi
+else
+  AC_MSG_NOTICE([NOTIFICATION: SAMRAI configured without the HYPRE library])
+  AC_DEFINE([LACKS_HYPRE],[1],[Hypre library is missing])
+fi
+
+dnl
+dnl Set variables for superlu support.
+dnl
+AC_ARG_WITH([superlu-lib],
+[AS_HELP_STRING([--with-superlu-lib=LIB],
+   [LIB is the library archive file for the SuperLU package.])],
+,with_superlu_lib='no')
+
+if test "${with_superlu_lib}" = yes; then
+  superlu_LIB=
+elif test "${with_superlu_lib}" = no; then
+  superlu_LIB=
+else
+  superlu_LIB="${with_superlu_lib}"
+fi
+LIB_NAME="$superlu_LIB $LIB_NAME"
+
+dnl
+dnl Set variables for spooles support.
+dnl
+BTNG_SUPPORT_SPOOLES
+if test "${spooles_PREFIX+set}" = set; then
+  SAMRAI_SPLIT_LIBS_STRING(spooles_LIBS,spooles_LIB_PATH,spooles_LIB_NAME)
+  LIB_PATH="$spooles_LIB_PATH $LIB_PATH"
+  LIB_NAME="$spooles_LIB_NAME $LIB_NAME"
+  INC_PATH="$spooles_INCLUDES $INC_PATH"
+fi
+
+dnl
+dnl Set variables for petsc support.
+dnl
+BTNG_SUPPORT_PETSC
+if test "${PETSC_DIR+set}" = set; then
+  SAMRAI_SPLIT_LIBS_STRING(petsc_LIBS,petsc_LIB_PATH,petsc_LIB_NAME)
+  LIB_PATH="$petsc_LIB_PATH $LIB_PATH"
+  LIB_NAME="$petsc_LIB_NAME $LIB_NAME"
+  INC_PATH="$petsc_INCLUDES $INC_PATH"
+  AC_DEFINE(HAVE_PETSC,1,PETSC library is available so use it)
+  if test $PETSC_VERSION_MAJOR -ne 2 || \
+     test $PETSC_VERSION_MINOR -ne 3 || \
+     test $PETSC_VERSION_SUBMINOR -ne 3 ; then
+     AC_MSG_WARN([
+SAMRAI requires PETSc-2.3.3.  You have specified version $PETSC_VERSION_MAJOR.$PETSC_VERSION_MINOR.$PETSC_VERSION_SUBMINOR
+which may not work properly!
+])
+  fi
+fi
+
+dnl
+dnl The following are hacks for specific architectures.  We are not proud
+dnl of these tests, and they should be changed to macros in the future.
+dnl
+dnl Check for broken XDR headers on linux and CYGWIN systems.
+dnl AIX requires both _ALL_SOURCE and _POWER for some system files.
+dnl
+
+case $ARCH in
+   Linux | LINUX | linux | CYGWIN )
+      AC_DEFINE([LACKS_PROPER_XDR_HEADER],[1],[LACKS_PROPER_XDR_HEADER])
+      ;;
+   rs6000)
+      dnl
+      dnl Defining ALL_SOURCE causes ASC Purple mpxlC and mpCC
+      dnl to complain that it is already defined as something else.
+      dnl I don't why it is required.  --BTNG
+      dnl AC_DEFINE([_ALL_SOURCE],[1],[Kludgey thing inserted by configure.in])
+      dnl
+      AC_DEFINE([_POWER],[1],[Kludgey thing inserted by configure.in])
+      ;;
+   *)
+      ;;
+esac
+
+dnl
+dnl Test if compiling with XDR support
+dnl
+if test "$enable_xdr" = "yes"; then
+
+   AC_DEFINE(HAVE_XDR,1,"Compiling with XDR support")
+
+   dnl
+   dnl For cygwin need to add rpc libraries to get XDR.
+   dnl
+
+   case $ARCH in
+      CYGWIN)
+         case $CXX in
+            *g++)
+	       LIB_NAME="$LIB_NAME -lrpc"
+              ;;
+         esac
+         ;;
+   esac
+fi
+
+dnl
+dnl Test if compiling with deprecated 
+dnl
+if test "$enable_deprecated" = "yes"; then
+   AC_DEFINE(INCLUDE_DEPRECATED,2,"Compiling with deprecated features")
+else
+   AC_DEFINE(INCLUDE_DEPRECATED,9999999,"Compiling without deprecated features")
+fi
+
+dnl
+dnl If Sundials is requested, then set up the Sundials libraries and include paths.
+dnl
+
+AC_ARG_WITH([sundials],
+[AS_HELP_STRING([--with-sundials=PATH],
+   [Use the Sundials solver package and specify where it is.])],
+,with_sundials='no')
+
+if test "$with_sundials" = no; then
+   AC_MSG_NOTICE([NOTIFICATION: SAMRAI configured without the Sundials library])
+   AC_DEFINE([LACKS_SUNDIALS],[1],[LACKS_SUNDIALS])
+else
+   sundials_dir="$with_sundials"
+   if test ! -d "$sundials_dir" ; then
+     AC_MSG_ERROR(
+       [You MUST specify an existing path when using --with-sundials=PATH])
+   fi
+   AC_DEFINE([HAVE_SUNDIALS],[1],[HAVE_SUNDIALS])
+   LIB_PATH="$LIB_PATH -L$sundials_dir/lib"
+   LIB_NAME="$LIB_NAME -lsundials_cvode -lsundials_kinsol"
+   INC_PATH="-I$sundials_dir/include $INC_PATH"
+fi
+AC_SUBST(SUNDIALS_C_FILES)
+
+BTNG_AC_LOG_VAR(with_sundials sundials_dir)
+
+dnl
+dnl If CUBES is requested, then set up the CUBES libraries and include paths.
+dnl
+
+AC_ARG_WITH([cubes],
+[AS_HELP_STRING([--with-cubes=PATH],
+   [Use the CUBES package and specify where it is.])],
+,with_cubes='no')
+
+CUBES_C_FILES="error_in_script.c"
+if test "$with_cubes" = no; then
+   AC_MSG_NOTICE([NOTIFICATION: SAMRAI configured without the CUBES library])
+   AC_DEFINE(LACKS_CUBES, [1], [Configured without Cubes library])
+else
+   cubes_dir="$with_cubes"
+   if test ! -d "$cubes_dir" ; then
+     AC_MSG_ERROR(
+       [You MUST specify an existing path when using --with-cubes=PATH])
+   fi
+   AC_DEFINE(HAVE_CUBES, [1], [Configured with Cubes library])
+   cubes_includes="-I${cubes_dir}/include -I${cubes_dir}/cart3d/include"
+   cubes_lib="-L${cubes_dir} -L${cubes_dir}/cart3d/lib"
+   INC_PATH="$cubes_includes $INC_PATH"
+   LIB_PATH="$cubes_lib $LIB_PATH"
+   LIB_NAME="${cubes_dir}/patchCubes_lib_LINUX.a ${cubes_dir}/cart3d/lib/arg.LINUX.a $LIB_NAME"
+fi
+BTNG_AC_LOG_VAR(with_cubes cubes_dir)
+
+
+dnl
+dnl If ELEVEN is requested, then set up the ELEVEN libraries and include paths.
+dnl
+
+AC_ARG_WITH([eleven],
+[AS_HELP_STRING([--with-eleven=PATH],
+   [Use the ELEVEN package and specify where it is.])],
+,with_eleven='no')
+
+ELEVEN_C_FILES="error_in_script.c"
+if test "$with_eleven" = no; then
+   AC_MSG_NOTICE([NOTIFICATION: SAMRAI configured without the ELEVEN library])
+   AC_DEFINE(LACKS_ELEVEN, [1], [Configured without Eleven library])
+else
+   eleven_dir="$with_eleven"
+   if test ! -d "$eleven_dir" ; then
+     AC_MSG_ERROR(
+       [You MUST specify an existing path when using --with-eleven=PATH])
+   fi
+   AC_DEFINE(HAVE_ELEVEN, [1], [Configured with Eleven library])
+   eleven_includes="-I${eleven_dir}/common -I${eleven_dir}/mesh -I${eleven_dir}/dbase -I${eleven_dir}/dbase/gzstream -I${eleven_dir}/eleven/src -I${eleven_dir}/geom_util"
+   eleven_lib="-L${eleven_dir}/eleven/lib"
+   INC_PATH="$eleven_includes $INC_PATH"
+   LIB_PATH="$eleven_lib $LIB_PATH"
+   LIB_NAME="$LIB_NAME -l11g -lexpat"
+fi
+BTNG_AC_LOG_VAR(with_eleven eleven_dir)
+
+
+dnl
+dnl If CUBES is requested, then set up the CUBES libraries and include paths.
+dnl
+AC_ARG_WITH([cubes],
+[AS_HELP_STRING([--with-cubes=PATH],
+   [Use the CUBES package and specify where it is.])],
+,with_cubes='no')
+
+CUBES_C_FILES="error_in_script.c"
+if test "$with_cubes" = no; then
+   AC_MSG_NOTICE([NOTIFICATION: SAMRAI configured without the CUBES library])
+   AC_DEFINE(LACKS_CUBES, [1], [Configured without Cubes library])
+else
+   cubes_dir="$with_cubes"
+   if test ! -d "$cubes_dir" ; then
+     AC_MSG_ERROR(
+       [You MUST specify an existing path when using --with-cubes=PATH])
+   fi
+   AC_DEFINE(HAVE_CUBES, [1], [Configured with Cubes library])
+   cubes_includes="-I${cubes_dir}/include -I${cubes_dir}/cart3d/include"
+   cubes_lib="-L${cubes_dir} -L${cubes_dir}/cart3d/lib"
+   INC_PATH="$cubes_includes $INC_PATH"
+   LIB_PATH="$cubes_lib $LIB_PATH"
+   LIB_NAME="${cubes_dir}/patchCubes_lib_LINUX.a ${cubes_dir}/cart3d/lib/arg.LINUX.a $LIB_NAME"
+fi
+BTNG_AC_LOG_VAR(with_cubes cubes_dir)
+
+
+dnl
+dnl If ELEVEN is requested, then set up the ELEVEN libraries and include paths.
+dnl
+
+AC_ARG_WITH([eleven],
+[AS_HELP_STRING([--with-eleven=PATH],
+   [Use the ELEVEN package and specify where it is.])],
+,with_eleven='no')
+
+ELEVEN_C_FILES="error_in_script.c"
+if test "$with_eleven" = no; then
+   AC_MSG_NOTICE([NOTIFICATION: SAMRAI configured without the ELEVEN library])
+   AC_DEFINE(LACKS_ELEVEN, [1], [Configured without Eleven library])
+else
+   eleven_dir="$with_eleven"
+   if test ! -d "$eleven_dir" ; then
+     AC_MSG_ERROR(
+       [You MUST specify an existing path when using --with-eleven=PATH])
+   fi
+   AC_DEFINE(HAVE_ELEVEN, [1], [Configured with Eleven library])
+   eleven_includes="-I${eleven_dir}/common -I${eleven_dir}/mesh -I${eleven_dir}/dbase -I${eleven_dir}/dbase/gzstream -I${eleven_dir}/eleven/src -I${eleven_dir}/geom_util"
+   eleven_lib="-L${eleven_dir}/eleven/lib"
+   INC_PATH="$eleven_includes $INC_PATH"
+   LIB_PATH="$eleven_lib $LIB_PATH"
+   LIB_NAME="$LIB_NAME -l11g -lexpat"
+fi
+BTNG_AC_LOG_VAR(with_eleven eleven_dir)
+
+
+dnl
+dnl If VAMPIR is requested, then set up the VAMPIR libraries and include paths.
+dnl
+if test -z "$with_vampir"; then
+   AC_DEFINE([LACKS_VAMPIR],[1],[LACKS_VAMPIR])
+else
+   if test "$with_vampir" = yes; then
+      AC_MSG_CHECKING(for VAMPIR)
+      vampir_dir=
+      for i in /usr/global/tools/kppp/aix_5_ll/default $with_vampir; do
+         if test -d $i -a -f $i/include/VT.h; then
+            vampir_dir=$i
+            break
+         fi
+      done
+   else
+      vampir_dir=$with_vampir
+   fi
+
+   if test -n "$vampir_dir"; then
+      AC_MSG_RESULT($vampir_dir)
+      AC_DEFINE([HAVE_VAMPIR],[1],[HAVE_VAMPIR])
+      with_vampir=yes
+
+      INC_PATH="-I$vampir_dir/include $INC_PATH"
+      LIB_PATH="-L$vampir_dir/lib $LIB_PATH"
+
+      case $ARCH in
+         alpha)
+            LIB_NAME="-lVT -lpmpi -lmld -lpthread -lm $LIB_NAME"
+            ;;
+         rs6000)
+            LIB_NAME="-lVT -lld -lm $LIB_NAME"
+            ;;
+         *)
+            ;;
+      esac
+   else
+      AC_MSG_RESULT(VAMPIR library not found)
+      AC_DEFINE([LACKS_VAMPIR],[1],[LACKS_VAMPIR])
+      with_vampir=no
+   fi
+fi
+BTNG_AC_LOG_VAR( with_vampir vampir_dir )
+
+dnl
+dnl If TAU is requested, setup the TAU included makefile, libraries,
+dnl and include paths.
+dnl
+if test -z "$with_tau"; then
+   AC_DEFINE([LACKS_TAU],[1],[LACKS_TAU])
+else
+   AC_MSG_CHECKING(for TAU)
+   AC_MSG_RESULT($with_tau)
+   AC_DEFINE([HAVE_TAU],[1],[HAVE_TAU])
+   TAU_INCLUDE="$with_tau"
+   INC_PATH="\$(TAU_INCLUDE) \$(TAU_DEFS) \$(TAU_MPI_INCLUDE) $INC_PATH"
+   case $ARCH in
+      Linux | LINUX | linux )
+         INC_PATH="$INC_PATH"
+         ;;
+   esac
+   LIB_NAME="\$(TAU_MPI_LIBS) \$(TAU_LIBS) $LIB_NAME"
+   AC_MSG_RESULT(including TAU makefile $TAU_INCLUDE)
+   TAU_INCLUDE="include $TAU_INCLUDE"
+fi
+
+
+dnl
+dnl Determine which IEEE-specified C macros are broken.
+dnl
+BTNG_C_IEEE_FLOAT
+
+
+# If on the alpha, and the ots library exists, use it.
+# Libots is the Compiled Code Support Library used by Compaq.
+if echo "$host_cpu" | grep '^alpha' > /dev/null; then
+  for i in '' /usr /usr/local; do
+    if test -r "$i/lib/libots.a" || test -r "$i/lib/libots.so"; then
+      LIBS="$LIBS -lots"
+      LIB_NAME="$LIB_NAME -lots"
+      break
+    fi
+  done
+fi
+
+
+dnl
+dnl Generate the installation directory for the SAMRAI libraries.  The
+dnl installation location is given by $prefix/ARCH-CXX-DEBUG, which ARCH
+dnl is the architecture name returned by tarch, CXX is the basename of the
+dnl compiler, and DEBUG is the debug status (debug, optdebug, or opt).
+dnl
+
+debug_ext=debug
+if test "$enable_opt" = "yes"; then
+   if test "$enable_debug" = "yes"; then
+      debug_ext=optdebug
+   else
+      debug_ext=opt
+   fi
+fi
+
+if test "$prefix" = "NONE"; then
+   dir_place_holder=`pwd`
+   cd $srcdir/..
+   prefix=`pwd`
+   cd $dir_place_holder
+fi
+
+INSTDIR=$prefix
+
+
+dnl
+dnl Support rpath syntax by adding it to the LIB_PATH variable.
+dnl
+BTNG_AC_LOG_VAR(LIB_PATH, before adding rpath syntax)
+BTNG_LIBS_ADD_RPATH(LIB_PATH,LIB_PATH,1)
+BTNG_AC_LOG_VAR(LIB_PATH, after adding rpath syntax)
+
+
+dnl
+dnl Support a generalized way to run serial and parallel programs.
+dnl This generates a file 'serpa-run' in the config directory.
+dnl Use serpa-run version modified by SAMRAI.
+dnl
+SAMRAI_SERPA(config/serpa-run)
+AC_CONFIG_FILES( config/serpa-run, chmod +x config/serpa-run )
+
+
+
+dnl
+dnl Specify how many processors to use in testing.
+dnl
+AC_ARG_ENABLE([test-nprocs],
+[AS_HELP_STRING([--enable-test-nprocs=LIST],[Specify number of processors to use
+when running tests.  LIST is a comma delimited list of integers, with 0 meaning
+serial run.  Default LIST is '0,2'.])],
+[
+case "$enable_test_nprocs" in
+  yes|no)
+    AC_MSG_ERROR(You must specify a list of processors for testing.)
+  ;;
+  *) TEST_NPROCS=$enable_test_nprocs
+esac
+],[TEST_NPROCS='0,2']
+)
+AC_SUBST(TEST_NPROCS)
+
+
+
+dnl
+dnl Make all of the macro substitutions for the generated output files
+dnl
+
+AC_SUBST(ARCH)
+AC_SUBST(INSTDIR)
+
+AC_SUBST(SAMRAI_TARGET)
+
+AC_SUBST(TAU_INCLUDE)
+
+AC_SUBST(M4)
+AC_SUBST(AR)
+AC_SUBST(XARGS)
+
+AC_SUBST(F77)
+AC_SUBST(F77_FLAGS)
+
+AC_SUBST(CC)
+AC_SUBST(C_FLAGS)
+
+AC_SUBST(CXX)
+AC_SUBST(CXX_FLAGS)
+
+AC_SUBST(F77LIBFLAGS)
+
+AC_SUBST(LD_FLAGS)
+AC_SUBST(CXXLD_FLAGS)
+
+AC_SUBST(LIB_SUFFIX)
+
+AC_SUBST(SRCDIR_COMPILE_PREFIX)
+AC_SUBST(INC_PATH)
+AC_SUBST(LIB_PATH)
+AC_SUBST(LIB_NAME)
+
+dnl Define a macro that links files from the compile tree to the source tree.
+dnl The links have the same name as the the target.  Nothing is done if 
+dnl compiling in the source directory.
+dnl 
+dnl Note: It would be "nicer" to have the some of the processing done below 
+dnl moved into this function but it didn't seem to work.
+AC_DEFUN([SAMRAI_LINK_FILES],[
+dnl This macro links files the way SAMRAI wants them linked.
+dnl arg1: list of file paths (relative to top) to be linked.
+test `pwd` = `cd "$srcdir" && pwd` && link_prefix='.unneeded_link.'
+AC_CONFIG_LINKS(
+esyscmd(echo "$1" | sed ['s|^\([ 	]\{0,\}\)\([^ 	]\{1,\}/\)\([^/ 	]\{1,\}\)\([ 	\n]\{0,\}\)$|\2\${link_prefix}\3:\2\3|g'])
+,,[
+# Commands before creating links.
+link_prefix="${link_prefix}"
+])dnl End call to AC_CONFIG_LINKS
+])dnl End definition of SAMRAI_LINK_FILES
+
+# Link files for examples directory.
+dnl Define standard exclude patterns so the find commands we use during
+dnl autoconf does not catch files that are not intended to be a part of the library.
+define(samrai_find_excludes,['!' '(' -path '*/CVS/*' -o -path '*/.svn/*' -o -name '*~' -o -name '#*#' \
+-o -name '*.bak' -o -name 'bak.*' -o -path '*/bak/*' -o -name '*.BAK' -o -name 'BAK.*' -o -path '*/BAK/*' \
+-o -name '*.tmp' -o -name 'tmp.*' -o -path '*/tmp/*' -o -name '*.TMP' -o -name 'TMP.*' -o -path '*/TMP/*' \
+-o -name '*.old' -o -name 'old.*' -o -path '*/old/*' -o -name '*.OLD' -o -name 'OLD.*' -o -path '*/OLD/*' \
+-o -name '*.new' -o -name 'new.*' -o -path '*/new/*' -o -name '*.NEW' -o -name 'NEW.*' -o -path '*/NEW/*' \
+-o -name '*.save' -o -name 'save.*' -o -path '*/save/*' -o -name '*.SAVE' -o -name 'SAVE.*' -o -path '*/SAVE/*' \
+')'])
+dnl We are using find to find the files, but they can be listed manually also.
+dnl And they don't have to all be in the same call to SAMRAI_LINK_FILES.
+dnl samrai_typical_example_files should try to find directories named
+dnl *input*, but not if it is a subdirectory of another directory
+dnl named *input*.  It should find certain files but, to avoid
+dnl redundancies and bad links, not if those files are under subdirectories
+dnl named *input*.  The reason for treating directories named *input*
+dnl specially is to reduce the exploding number of links to increasing
+dnl numbers of input files.
+
+dnl
+dnl Don't do links if compiling in the source directory
+dnl
+if test `pwd` != `cd "$srcdir" && pwd`
+then 
+
+     dnl
+     dnl Links for input files in test directory for input files.
+     dnl
+     define(samrai_test_inputs,[ '(' -type d -name '*inputs*' '!' -path '*/*inputs*/*' ')' ])
+     SAMRAI_LINK_FILES([ esyscmd(find source/test samrai_test_inputs | sort --ignore-case) ])
+
+     dnl
+     dnl Special directories in test that are not caught as part of the previous fined.
+     dnl 
+     SAMRAI_LINK_FILES([ source/test/applications/Euler/RP_test ])
+
+fi
+
+dnl Undefine the m4 symbols not needed anymore.
+dnl (Keep samrai_find_excludes in case it do more finds below.)
+undefine([samrai_test_inputs])
+
+dnl
+dnl Generate the output files.
+dnl
+
+dnl Find all Makefile.in and associated subdirectories.
+subdirs="${subdirs} source"
+subdirs="${subdirs} esyscmd(find source tools	samrai_find_excludes -name Makefile.in -print | sed 's%/Makefile.in$%%g' | sort --ignore-case)"
+
+unset makefiles
+for i in $subdirs; do makefiles="$makefiles $i/Makefile"; done
+BTNG_AC_LOG_VAR(makefiles)
+BTNG_AC_LOG_VAR(subdirs)
+$MKDIR_P $subdirs
+
+AC_OUTPUT([
+Makefile
+config/Makefile.config config/Makefile.config.install
+docs/Makefile docs/Doxyfile docs/devDoxyfile
+${makefiles}
+],[
+dnl These are the commands that will execute after the file generations.
+dnl They are run by the generated config.status script.
+
+rm -rf Templates.DB ti_files ii_files
+
+$MKDIR_P config include lib bin $subdirs
+
+dnl
+dnl Don't do installs if compiling in the source directory
+dnl
+if test `pwd` != `cd "$srcdir" && pwd`
+then 
+     $INSTALL  $srcdir/COPYRIGHT COPYRIGHT
+     $INSTALL  $srcdir/RELEASE-NOTES RELEASE-NOTES 
+     $INSTALL  $srcdir/INSTALL-NOTES INSTALL-NOTES 
+     $MKDIR_P source/test/testtools
+     $INSTALL  $srcdir/source/test/testtools/* source/test/testtools
+     $INSTALL  $srcdir/source/test/inputdb/*.input  source/test/inputdb
+
+     dnl
+     dnl Copy README files
+     dnl Run the find command where we run autoconf.  DO NOT run it where we configure.
+     dnl Of the multitude of systems where configure is run, there is sure to be some
+     dnl that do not support the features we require find to support (example: -path).
+     dnl
+     dnl Exclude files with *input* in path because they are already linked at the parent directory.
+     dnl
+     readme='esyscmd(find source samrai_find_excludes \! -path '*/*input*/*' -name "*README*" -print | sort --ignore-case)'
+     for i in $readme; do
+     	 $INSTALL  $srcdir/$i $i
+     done
+fi
+],
+[
+
+dnl These commands set the environment for commands executing
+dnl after file generations.
+srcdir=$srcdir
+subdirs="$subdirs"
+sundials_dir=$sundials_dir
+if test ! `cd $srcdir && pwd -P` = `pwd -P`; then
+  source_tree_is_not_compile_tree=1
+fi
+]
+
+)
diff -r 000000000000 -r 5eda1a3f24e8 docs/Doxyfile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/Doxyfile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1264 @@
+# Doxyfile 1.4.2
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = SAMRAI
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = 
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = @dox_output_dir at samrai-dox
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
+# 4096 sub-directories (in 2 levels) under the output directory of each output 
+# format and will distribute the generated files over these directories. 
+# Enabling this option can be useful when feeding doxygen a huge amount of 
+# source files, where putting all generated files in the same directory would 
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, 
+# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, 
+# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, 
+# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, 
+# Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE        = English
+
+# This tag can be used to specify the encoding used in the generated output. 
+# The encoding is not always determined by the language that is chosen, 
+# but also whether or not the output is meant for Windows or non-Windows users. 
+# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES 
+# forces the Windows encoding (this is the default for the Windows binary), 
+# whereas setting the tag to NO uses a Unix-style encoding (the default for 
+# all platforms other than Windows).
+
+USE_WINDOWS_ENCODING   = NO
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator 
+# that is used to form the text in various listings. Each string 
+# in this list, if found as the leading text of the brief description, will be 
+# stripped from the text and the result after processing the whole list, is 
+# used as the annotated text. Otherwise, the brief description is used as-is. 
+# If left blank, the following values are used ("$name" is automatically 
+# replaced with the name of the entity): "The $name class" "The $name widget" 
+# "The $name file" "is" "provides" "specifies" "contains" 
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       = 
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
+# inherited members of a class in the documentation of that class as if those 
+# members were ordinary class members. Constructors, destructors and assignment 
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user-defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. The tag can be used to show relative paths in the file list. 
+# If left blank the directory from which doxygen is run is used as the 
+# path to strip.
+
+STRIP_FROM_PATH        = @top_srcdir@
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
+# the path mentioned in the documentation of a class, which tells 
+# the reader which header file to include in order to use a class. 
+# If left blank only the name of the header file containing the class 
+# definition is used. Otherwise one should specify the include paths that 
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    = @top_srcdir@
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments will behave just like the Qt-style comments (thus requiring an 
+# explicit @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF      = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member 
+# documentation.
+
+DETAILS_AT_TOP         = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
+# a new page for each member. If set to NO, the documentation of a member will 
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 8
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user-defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = 
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
+# sources only. Doxygen will then generate output that is more tailored for C. 
+# For instance, some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources 
+# only. Doxygen will then generate output that is more tailored for Java. 
+# For instance, namespaces will be presented as packages, qualified scopes 
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
+# the same type (for instance a group of public functions) to be put as a 
+# subgroup of that type (e.g. under the Public Functions section). Set it to 
+# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local 
+# methods, which are defined in the implementation section but not in 
+# the interface are included in the documentation. 
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = YES
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these classes will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = YES
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower-case letters. If set to YES upper-case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put a list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = NO
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
+# brief documentation of file, namespace and class members alphabetically 
+# by member name. If set to NO (the default) the members will appear in 
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
+# sorted by fully-qualified names, including namespaces. If set to 
+# NO (the default), the class list will be sorted only by class name, 
+# not including the namespace part. 
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the 
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = YES
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consists of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+# If the sources in your project are distributed over multiple directories 
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
+# in the documentation. The default is YES.
+
+SHOW_DIRECTORIES       = NO
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
+# doxygen should invoke to get the current version for each file (typically from the 
+# version control system). Doxygen will invoke the program by executing (via 
+# popen()) the command <command> <input-file>, where <command> is the value of 
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
+# provided by doxygen. Whatever the progam writes to standard output 
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for 
+# functions that are documented, but have no documentation for their parameters 
+# or return value. If set to NO (the default) doxygen will only warn about 
+# wrong or incomplete parameter documentation, but not about the absence of 
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text. Optionally the format may contain 
+# $version, which will be replaced by the version of the file (if it could 
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = dox.warnings
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  = @top_srcdir@/source/SAMRAI/mainpage.dox \
+	                 @top_srcdir@/source/SAMRAI/tbox \
+                         @top_srcdir@/source/SAMRAI/hier \
+                         @top_srcdir@/source/SAMRAI/xfer \
+                         @top_srcdir@/source/SAMRAI/pdat \
+                         @top_srcdir@/source/SAMRAI/math \
+                         @top_srcdir@/source/SAMRAI/mesh \
+                         @top_srcdir@/source/SAMRAI/geom \
+                         @top_srcdir@/source/SAMRAI/solv \
+                         @top_srcdir@/source/SAMRAI/algs \
+                         @top_srcdir@/source/SAMRAI/appu \
+                         @top_srcdir@/source/SAMRAI/appu/CartesianBoundaryUtilities2.h \
+                         @top_srcdir@/source/SAMRAI/appu/CartesianBoundaryUtilities2.C \
+                         @top_srcdir@/source/SAMRAI/appu/CartesianBoundaryUtilities3.h \
+                         @top_srcdir@/source/SAMRAI/appu/CartesianBoundaryUtilities3.C
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm
+
+FILE_PATTERNS          = *.[ChIf] \
+                         *.dox
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
+# directories that are symbolic links (a Unix filesystem feature) are excluded 
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories. Note that the wildcards are matched 
+# against the file with absolute path, so to exclude all test directories 
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = *README* \
+                         Makefile* \
+                         *~ \
+                         *.old \
+                         *.dxx \
+                         *.m4 \
+                         */.svn/* \
+                         */.git/* \
+                         */OLD/* \
+                         */NEW/* \
+                         */BAK/* \
+                         */SAVE/* \
+                         */OBS/* \
+                         DescribedClass.[hCI] \
+			             */templates/* \
+			             */fortran/*
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = 
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
+# ignored.
+
+INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
+# basis.  Doxygen will compare the file name with each pattern and apply the 
+# filter if there is a match.  The filters are a list of the form: 
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
+# is applied to all files.
+
+FILTER_PATTERNS        = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources. 
+# Note: To get rid of all source code in the generated output, make sure also 
+# VERBATIM_HEADERS is set to NO.
+#
+# SAMRAI note: generating source pages is VERY time consuming.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = NO
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default) 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code 
+# will point to the HTML generated by the htags(1) tool instead of doxygen 
+# built-in source browser. The htags tool is part of GNU's global source 
+# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            = 
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = 
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet. Note that doxygen will try to copy 
+# the style sheet file to the HTML output directory, so don't put your own 
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        = 
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output directory.
+
+CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = YES
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = letter
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
+# include the index chapters (such as File Index, Compound Index, etc.) 
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimized for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = YES
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assignments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
+# dump the program listings (including syntax highlighting 
+# and cross-referencing information) to the XML output. Note that 
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = YES
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed. To prevent a macro definition from being 
+# undefined via #undef or recursively expanded use the := operator 
+# instead of the = operator.
+
+PREDEFINED             = NDIM=3 \
+                         HAVE_SUNDIALS \
+                         HAVE_HYPRE \
+                         HAVE_PETSC \
+                         HAVE_HDF5
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line, have an all uppercase name, and do not end with a semicolon. Such 
+# function macros are typically used for boiler-plate code, and will confuse 
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references   
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. 
+# Optionally an initial location of the external documentation 
+# can be added for each tagfile. The format of a tag file without 
+# this location is as follows: 
+#   TAGFILES = file1 file2 ... 
+# Adding location for the tag files is done as follows: 
+#   TAGFILES = file1=loc1 "file2 = loc2" ... 
+# where "loc1" and "loc2" can be relative or absolute paths or 
+# URLs. If a location is present for each tag, the installdox tool 
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen 
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = @dox_output_dir at samrai.tag
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = @SAMRAI_PERL@
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
+# or super classes. Setting the tag to NO turns the diagrams off. Note that 
+# this option is superseded by the HAVE_DOT option below. This is only a 
+# fallback. It is recommended to install and use dot, since it yields more 
+# powerful graphs.
+
+CLASS_DIAGRAMS         = YES
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = @HAVE_DOT@
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = NO
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
+# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# Language.
+
+UML_LOOK               = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = NO
+
+# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
+# generate a call dependency graph for every global function or class method. 
+# Note that enabling this option will significantly increase the time of a run. 
+# So in most cases it will be better to enable call graphs for selected 
+# functions only using the \callgraph command.
+
+CALL_GRAPH             = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = NO
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
+# then doxygen will show the dependencies a directory has on other directories 
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = NO
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               = @DOT_PATH@
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width 
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
+# this value, doxygen will try to truncate the graph, so that it fits within 
+# the specified constraint. Beware that most browsers cannot cope with very 
+# large images.
+
+MAX_DOT_GRAPH_WIDTH    = 1024
+
+# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height 
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
+# this value, doxygen will try to truncate the graph, so that it fits within 
+# the specified constraint. Beware that most browsers cannot cope with very 
+# large images.
+
+MAX_DOT_GRAPH_HEIGHT   = 1024
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
+# graphs generated by dot. A depth value of 3 means that only nodes reachable 
+# from the root by following a path via at most 3 edges will be shown. Nodes 
+# that lay further from the root node will be omitted. Note that setting this 
+# option to 1 or 2 may greatly reduce the computation time needed for large 
+# code bases. Also note that a graph may be further truncated if the graph's 
+# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH 
+# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), 
+# the graph is not depth-constrained.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
+# background. This is disabled by default, which results in a white background. 
+# Warning: Depending on the platform used, enabling this option may lead to 
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to 
+# read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
+# files in one run (i.e. multiple -o and -T options on the command line). This 
+# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermediate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine   
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be 
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE           = NO
diff -r 000000000000 -r 5eda1a3f24e8 docs/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,62 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for the entire SAMRAI distribution 
+##
+#########################################################################
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = ..
+subdir = docs
+VPATH = @srcdir@
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status --file=$(subdir)/$@
+
+Doxyfile: $(srcdir)/Doxyfile.in $(top_builddir)/config.status
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status --file=$(subdir)/$@
+dox: Doxyfile doxygenBinaryWarning
+	@mkdir -p @dox_output_dir at .
+	@DOXYGEN_BIN@ Doxyfile
+	@echo "# $@ was updated at `date` using this Doxyfile:" > $@
+	cat Doxyfile >> $@
+	cp @dox_output_dir at samrai.tag @dox_output_dir at samrai-dox/html/samrai.tag
+	@echo "Created documentation in @dox_output_dir@"
+redox:
+	rm -f dox && $(MAKE) dox
+
+devDoxyfile: $(srcdir)/devDoxyfile.in $(top_builddir)/config.status
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status --file=$(subdir)/$@
+devdox: devDoxyfile doxygenBinaryWarning
+	@mkdir -p @dox_output_dir at .
+	@DOXYGEN_BIN@ devDoxyfile
+	@echo "# $@ was updated at `date` using this Doxyfile:" > $@
+	cat devDoxyfile >> $@
+	cp @dox_output_dir at samrai-dev.tag @dox_output_dir at samrai-devdox/html/samrai.tag
+	@echo "Created documentation in @dox_output_dir@"
+redevdox:
+	rm -f devdox && $(MAKE) devdox
+
+grey-dox-bg:
+	@cd @dox_output_dir at .
+	@files="`echo samrai*dox/html/doxygen.css`"
+	@if test -n "$${files}"; then	\
+	  echo "Making html background grey"; \
+	  for i in $${files}; do	\
+	    echo 'body { background: #bbbbbb; }' >> $${i}	;\
+	  done	;\
+	fi
+
+doxygenBinaryWarning:
+	@if test -z "@DOXYGEN_BIN@"; then	\
+	  echo "Missing doxygen binary.  Please use --with-doxygen=PATH with configure." >&1	;\
+	  exit 1	;\
+	fi
+	@echo "Warning: try to use the most recent version of doxygen.  Older versions have been known to hang."
diff -r 000000000000 -r 5eda1a3f24e8 docs/devDoxyfile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/devDoxyfile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1264 @@
+# Doxyfile 1.4.2
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = SAMRAI
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = 
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = @dox_output_dir at samrai-devdox
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
+# 4096 sub-directories (in 2 levels) under the output directory of each output 
+# format and will distribute the generated files over these directories. 
+# Enabling this option can be useful when feeding doxygen a huge amount of 
+# source files, where putting all generated files in the same directory would 
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, 
+# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, 
+# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, 
+# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, 
+# Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE        = English
+
+# This tag can be used to specify the encoding used in the generated output. 
+# The encoding is not always determined by the language that is chosen, 
+# but also whether or not the output is meant for Windows or non-Windows users. 
+# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES 
+# forces the Windows encoding (this is the default for the Windows binary), 
+# whereas setting the tag to NO uses a Unix-style encoding (the default for 
+# all platforms other than Windows).
+
+USE_WINDOWS_ENCODING   = NO
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator 
+# that is used to form the text in various listings. Each string 
+# in this list, if found as the leading text of the brief description, will be 
+# stripped from the text and the result after processing the whole list, is 
+# used as the annotated text. Otherwise, the brief description is used as-is. 
+# If left blank, the following values are used ("$name" is automatically 
+# replaced with the name of the entity): "The $name class" "The $name widget" 
+# "The $name file" "is" "provides" "specifies" "contains" 
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       = 
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
+# inherited members of a class in the documentation of that class as if those 
+# members were ordinary class members. Constructors, destructors and assignment 
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user-defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. The tag can be used to show relative paths in the file list. 
+# If left blank the directory from which doxygen is run is used as the 
+# path to strip.
+
+STRIP_FROM_PATH        = @top_srcdir@
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
+# the path mentioned in the documentation of a class, which tells 
+# the reader which header file to include in order to use a class. 
+# If left blank only the name of the header file containing the class 
+# definition is used. Otherwise one should specify the include paths that 
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    = @top_srcdir@
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments will behave just like the Qt-style comments (thus requiring an 
+# explicit @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF      = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member 
+# documentation.
+
+DETAILS_AT_TOP         = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
+# a new page for each member. If set to NO, the documentation of a member will 
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 8
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user-defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = 
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
+# sources only. Doxygen will then generate output that is more tailored for C. 
+# For instance, some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources 
+# only. Doxygen will then generate output that is more tailored for Java. 
+# For instance, namespaces will be presented as packages, qualified scopes 
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
+# the same type (for instance a group of public functions) to be put as a 
+# subgroup of that type (e.g. under the Public Functions section). Set it to 
+# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = YES
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local 
+# methods, which are defined in the implementation section but not in 
+# the interface are included in the documentation. 
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these classes will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = YES
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower-case letters. If set to YES upper-case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put a list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = NO
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
+# brief documentation of file, namespace and class members alphabetically 
+# by member name. If set to NO (the default) the members will appear in 
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
+# sorted by fully-qualified names, including namespaces. If set to 
+# NO (the default), the class list will be sorted only by class name, 
+# not including the namespace part. 
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the 
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = YES
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consists of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+# If the sources in your project are distributed over multiple directories 
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
+# in the documentation. The default is YES.
+
+SHOW_DIRECTORIES       = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
+# doxygen should invoke to get the current version for each file (typically from the 
+# version control system). Doxygen will invoke the program by executing (via 
+# popen()) the command <command> <input-file>, where <command> is the value of 
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
+# provided by doxygen. Whatever the progam writes to standard output 
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for 
+# functions that are documented, but have no documentation for their parameters 
+# or return value. If set to NO (the default) doxygen will only warn about 
+# wrong or incomplete parameter documentation, but not about the absence of 
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text. Optionally the format may contain 
+# $version, which will be replaced by the version of the file (if it could 
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = devdox.warnings
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  = @top_srcdir@/source/SAMRAI/mainpage.dox \
+	                 @top_srcdir@/source/SAMRAI/tbox \
+                         @top_srcdir@/source/SAMRAI/hier \
+                         @top_srcdir@/source/SAMRAI/xfer \
+                         @top_srcdir@/source/SAMRAI/pdat \
+                         @top_srcdir@/source/SAMRAI/math \
+                         @top_srcdir@/source/SAMRAI/mesh \
+                         @top_srcdir@/source/SAMRAI/geom \
+                         @top_srcdir@/source/SAMRAI/solv \
+                         @top_srcdir@/source/SAMRAI/algs \
+                         @top_srcdir@/source/SAMRAI/appu \
+                         @top_srcdir@/source/SAMRAI/appu/CartesianBoundaryUtilities2.h \
+                         @top_srcdir@/source/SAMRAI/appu/CartesianBoundaryUtilities2.C \
+                         @top_srcdir@/source/SAMRAI/appu/CartesianBoundaryUtilities3.h \
+                         @top_srcdir@/source/SAMRAI/appu/CartesianBoundaryUtilities3.C
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm
+
+FILE_PATTERNS          = *.[ChIf] \
+                         *.dox
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
+# directories that are symbolic links (a Unix filesystem feature) are excluded 
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories. Note that the wildcards are matched 
+# against the file with absolute path, so to exclude all test directories 
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = *README* \
+                         Makefile* \
+                         *~ \
+                         *.old \
+                         *.dxx \
+                         *.m4 \
+                         */.svn/* \
+                         */.git/* \
+                         */OLD/* \
+                         */NEW/* \
+                         */BAK/* \
+                         */SAVE/* \
+                         */OBS/* \
+                         DescribedClass.[hCI] \
+			             */templates/* \
+			             */fortran/*
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = 
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
+# ignored.
+
+INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
+# basis.  Doxygen will compare the file name with each pattern and apply the 
+# filter if there is a match.  The filters are a list of the form: 
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
+# is applied to all files.
+
+FILTER_PATTERNS        = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources. 
+# Note: To get rid of all source code in the generated output, make sure also 
+# VERBATIM_HEADERS is set to NO.
+#
+# SAMRAI note: generating source pages is VERY time consuming.
+
+SOURCE_BROWSER         = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = NO
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default) 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code 
+# will point to the HTML generated by the htags(1) tool instead of doxygen 
+# built-in source browser. The htags tool is part of GNU's global source 
+# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            = 
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = 
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet. Note that doxygen will try to copy 
+# the style sheet file to the HTML output directory, so don't put your own 
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        = 
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output directory.
+
+CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = YES
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = letter
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
+# include the index chapters (such as File Index, Compound Index, etc.) 
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimized for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = YES
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assignments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
+# dump the program listings (including syntax highlighting 
+# and cross-referencing information) to the XML output. Note that 
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = YES
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed. To prevent a macro definition from being 
+# undefined via #undef or recursively expanded use the := operator 
+# instead of the = operator.
+
+PREDEFINED             = NDIM=3 \
+                         HAVE_HYPRE \
+                         HAVE_PETSC \
+                         HAVE_HDF5 \
+                         HAVE_SUNDIALS
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line, have an all uppercase name, and do not end with a semicolon. Such 
+# function macros are typically used for boiler-plate code, and will confuse 
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references   
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. 
+# Optionally an initial location of the external documentation 
+# can be added for each tagfile. The format of a tag file without 
+# this location is as follows: 
+#   TAGFILES = file1 file2 ... 
+# Adding location for the tag files is done as follows: 
+#   TAGFILES = file1=loc1 "file2 = loc2" ... 
+# where "loc1" and "loc2" can be relative or absolute paths or 
+# URLs. If a location is present for each tag, the installdox tool 
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen 
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = @dox_output_dir at samrai-dev.tag
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = @SAMRAI_PERL@
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
+# or super classes. Setting the tag to NO turns the diagrams off. Note that 
+# this option is superseded by the HAVE_DOT option below. This is only a 
+# fallback. It is recommended to install and use dot, since it yields more 
+# powerful graphs.
+
+CLASS_DIAGRAMS         = NO
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = @HAVE_DOT@
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
+# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# Language.
+
+UML_LOOK               = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = NO
+
+# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
+# generate a call dependency graph for every global function or class method. 
+# Note that enabling this option will significantly increase the time of a run. 
+# So in most cases it will be better to enable call graphs for selected 
+# functions only using the \callgraph command.
+
+CALL_GRAPH             = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
+# then doxygen will show the dependencies a directory has on other directories 
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               = @DOT_PATH@
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width 
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
+# this value, doxygen will try to truncate the graph, so that it fits within 
+# the specified constraint. Beware that most browsers cannot cope with very 
+# large images.
+
+MAX_DOT_GRAPH_WIDTH    = 1024
+
+# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height 
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
+# this value, doxygen will try to truncate the graph, so that it fits within 
+# the specified constraint. Beware that most browsers cannot cope with very 
+# large images.
+
+MAX_DOT_GRAPH_HEIGHT   = 1024
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
+# graphs generated by dot. A depth value of 3 means that only nodes reachable 
+# from the root by following a path via at most 3 edges will be shown. Nodes 
+# that lay further from the root node will be omitted. Note that setting this 
+# option to 1 or 2 may greatly reduce the computation time needed for large 
+# code bases. Also note that a graph may be further truncated if the graph's 
+# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH 
+# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), 
+# the graph is not depth-constrained.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
+# background. This is disabled by default, which results in a white background. 
+# Warning: Depending on the platform used, enabling this option may lead to 
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to 
+# read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
+# files in one run (i.e. multiple -o and -T options on the command line). This 
+# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermediate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine   
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be 
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE           = NO
diff -r 000000000000 -r 5eda1a3f24e8 docs/main.html
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/main.html	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,62 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <title>SAMRAI Documenation</title>
+      
+  <meta http-equiv="content-type"
+ content="text/html; charset=ISO-8859-1">
+</head>
+  <body>
+ 
+<div align="center"> 
+<h1>SAMRAI Documentaion</h1>
+ 
+<div align="left"><br>
+ 
+<h4><a href="userdocs/SAMRAI-overview-I.pdf">SAMRAI Overview</a></h4>
+ Introductory slide presentation.<br>
+ </div>
+ 
+<div align="left"> 
+<h4><a href="samrai-dox/html/main.html">Reference Manual</a></h4>
+ Documents the classes in the SAMRAI library.<br>
+ 
+<h4><big>Documents describing various code functionality in SAMRAI:</big></h4>
+<ul>
+  <li><a href="userdocs/FAC-Preconditioner.pdf">FAC Preconditioner</a>, <a
+ href="userdocs/Robin-Bc.pdf">Robin Boundary conditions</a> - use of FAC
+solver classes</li>
+  <li><a href="userdocs/Regridding-RichardsonExtrapolation.pdf">Regridding
+and Richardson Extrapolation</a> - describes how to manage refinement using
+either a gradient detectionn algorithm or Richardson extrapolation.</li>
+  <li><a href="userdocs/Schedule-Boundary.pdf">Communication Algorithms and
+Boundary conditions</a> - describes parallel AMR data communication support
+and how boundary conditions are invoked.</li>
+  <li><a href="userdocs/Timing-Instrumentation.pdf">Timing and Instrumentation</a>
+- describes the timing package to assist in performance analysis and to guide
+the user about which routines are incurring the largest percentage of computation
+time.</li>
+  <li><a href="userdocs/Vizamrai-writer.pdf">Vizamrai Writer</a>, <a
+ href="userdocs/VisIt-writer.pdf">VisIt Writer</a>, <a
+ href="userdocs/VisIt-writer-slides.pdf">VisIt Tutorial</a> - describes how
+to write data that may be postprocessed by the Vizamrai or VisIt tools.</li>
+  <li><a href="userdocs/m4macros.txt">M4 Macros for Fortran</a> - how to
+use SAMRAI m4 macros for accessing patch data in fortran<br>
+  </li>
+</ul>
+<big><b>Examples using SAMRAI for adaptive problems:</b></big><br>
+<ul>
+  <li><a href="userdocs/Laplacian-ex.pdf">Laplacian Example</a> - describes
+three different ways in which one may manipulate data on a SAMRAI patch.</li>
+  <li><a href="userdocs/Poisson.pdf">Poisson</a> - describes how to use the
+Poisson system solver in SAMRAI<br>
+  </li>
+</ul>
+ 
+<h4><br>
+</h4>
+</div>
+</div>
+<br>
+</body>
+</html>
diff -r 000000000000 -r 5eda1a3f24e8 docs/release/version-1.0.0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/release/version-1.0.0	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,450 @@
+*****************************************************************************
+				Release Notes
+*****************************************************************************
+
+NOTE:  These release notes are more descriptive and detailed than is usual
+       for software release notes.  The reason for this is that presently
+       complete documentation does not exist for most of the items listed.
+       Until sufficient user documentation becomes available, descriptions
+       such as those that follow will be part of SAMRAI release notes.
+
+Where to report Bugs
+--------------------
+
+If a bug is found in the SAMRAI library, we ask that you kindly report it
+to us so that we may fix it.  We will make every effort to fix bugs
+in a timely manner.  Depending on the severity or the complexity of the
+bug, we will either fix the bug for a subsequent library release or send
+a code fix to users so that their work is minimally interrupted.
+
+LLNL users should report bugs using the CASC bug tracking web pages:
+
+        http://apollo.llnl.gov:8080/bugs/
+
+Enter the bug into the appropriate are of the SAMRAI project section.
+
+Bugs found by other users should send email to samrai-bugs at llnl.gov.
+
+*****************************************************************************
+
+=============================================================================
+SAMRAI Release v1.0.0 
+=============================================================================
+
+What's New
+----------
+
+(0) Bug reporting
+
+Bugs found in SAMRAI should now be sent via email to samrai-bugs at llnl.gov.
+
+(1) Improved source code documentation
+
+SAMRAI documentation included with this release has been updated and 
+improved.  The portions of the source code documentation describing the
+organization and contents of SAMRAI "packages" has been rewritten.  Postscript
+and HTML forms of this documentation can been found in the directory 
+SAMRAI/source/docs/manual.  Also, all example programs found in 
+SAMRAI/source/applications and SAMRAI/source/test now include more 
+descriptive code documentation and README files describing compilation,
+use (input files, etc.), and output.
+
+
+(2) Input file database and parser capabilities
+
+SAMRAI now uses a hierarchical database keyword-value input file mechanism.  
+This replaces the old character string matching mechanism that was confusing 
+and difficult-to-use.  The new input file capabilities are used by all SAMRAI 
+library classes whose initialization depends on values that may be specified 
+in an input file.  The input file format is easily incorporated into 
+user-developed classes.  Also, the contents of an input database may be 
+printed along with a note about each key indicating whether the key came 
+from the input file and was used during the program execution, came from the 
+input file but was not used, or came from a default key value.
+
+The input mechanism supports input data of the following types:
+ 
+   bool: TRUE,FALSE
+   box: [(lower coord),(upper coord)]
+   char: '<character>'
+   complex: ( real , imag )
+   double, float:  standard representation for double/float.  A period
+                   may not start the double/float( use 0.8 instead of .8 ).
+   integer: standard integer representation
+   string: "<string>"
+   vectors, arrays, lists: other types separated by commas
+
+The input database mechanism also supports: 
+
+   - nesting of databases
+   - simple expression grammar for keyword assignment (e.g., standard algebraic
+     and logical expressions found in C, standard posix functions, etc.)
+   - inclusion of other input files using the standard C/C++ #include grammar
+   - use of standard C/C++ comments
+
+The basic form of an input file may look like:
+
+#include "another_input_file"
+
+Database_name {
+
+   keyword1 = value1
+   keyword2 = value2
+   sub_database1 {
+      keyword3 = value3
+      keyword4 = value4  
+   }
+}
+
+User documentation describing the use of the input database mechanism is
+forthcoming.  In the meantime, consult the input files provided for the 
+example application programs in the SAMRAI/source/applications subdirectories,
+or the input database test program in the SAMRAI/source/test/inputdb directory.
+
+
+(3) Parallel restart capabilities (using HDF5)
+
+SAMRAI now provides restart capabilities based on the HDF5 (Hierarchical 
+Data Format) data format.  The restart capability is used in all SAMRAI 
+library classes whose state must be saved in order to begin the program
+again at some point beyond initialization after it has been halted.  The 
+restart capabilities are easily incorporated into user-developed classes.
+
+Information for each restart point is typically organized into a collection
+of HDF5 restart files, one for each processor involved in the program run.
+Data is stored in a hierarchical fashion within each HDF5 file using the
+HDF5 data format.  This data can be viewed as standard text using the "h5dump"
+command that is provided as part of the HDF5 installation.
+
+The writing of restart files for an application is coordinated by a restart
+manager class.  The manager class orchestrates opening and closing the 
+database, stores data to be written out for restart, and writes out restart 
+data to the database.  Each object that writes data during restart must 
+be derived from the base class "tbox_Serializable". 
+
+User documentation describing the use of the restart database mechanism is
+forthcoming.  In the meantime, the example application programs in the
+SAMRAI/source/applications subdirectories provide a reasonably commented
+view of basic usage.  A particularly concise example can be seen by looking at
+the "mainRestartData" class in the SAMRAI/source/applications/HeatEqn directory.
+Also, a test program that illustrates basic use of the HDF5 database routines
+is located in the SAMRAI/source/test/HDF5 directory.
+
+
+**IMPORTANT NOTES REGARDING RESTART AND INPUT CAPABILITIES**
+
+   (a) Both the input database and restart database routines use the same 
+       interface, which is defined by the abstract base class "tbox_Database".  
+
+   (b) The HDF5 library must be installed in order to use the restart 
+       capabilities.  For more information about HDF5, please consult
+       http://hdf.ncsa.uiuc.edu/HDF5/.
+
+   (c) Each class that reads data from an input database and/or writes/reads 
+       from a restart database has been changed as follows:
+
+       (i) The constructor now takes arguments of one of the following forms:
+   
+           ClassName::ClassName(Pointer<Database> input_db,
+                                Pointer<Database> restart_db,
+                                other args...)
+
+           ClassName::ClassName(Pointer<Database> input_db,
+                                other args...)
+
+           ClassName::ClassName(Pointer<Database> restart_db,
+                                other args...)
+
+       (ii) The pointers for the input and restart databases must never be
+            null.  The user must pass in the appropriate input database
+            for initializing the object.  To ensure that the restart database
+            pointer is non-null, the restart_db argument should always be set 
+            similar to 
+
+               Pointer<Database> restart_db =
+                  RestartManager::getManager()->getRootDatabase()
+                                              ->getDatabase("restart_name");
+
+            where "restart_name" is the string registered with restart manager
+            for the ClassName object.  This will return the proper restart
+            database for the ClassName object if a restart file is specified
+            (and HDF5 is compiled with SAMRAI).  Otherwise, a pointer to a 
+            "tbox_NullDatabase" object that responds to all database methods, 
+            but does nothing, will be returned.  This organization avoids
+            the need for any tests within the library code for whether restart
+            files are to be written.  Everything is controlled from the main
+            program. 
+
+       (iii) Each constructor follows the same sequence of steps (note some 
+             steps may be absent depending on the class):
+
+                ClassName::ClassName( ... )
+                {
+                   // Step 1: initialize default values, if necessary  
+                   // Step 2: if (starting from restart) {
+                   //            read data from restart database
+                   //         }
+                   // Step 3: read values from input database, if necessary
+                   // Step 4: if (!starting from restart) {
+                   //            set values based on input data, if necessary
+                   //         }
+                }
+
+     (d) Each class that writes/reads data to/from a restart database is
+         derived from the base class "tbox_Serializable" so that the database
+         functions can be invoked from the restart manager.
+
+     (e) Files written in HDF5 format should be architecture independent.
+         However, we have experienced some problems with this functionality.  
+         At this point, restart files are NOT portable across machines of
+         different architecture. 
+
+
+(4) Basic timing capabilities 
+
+To provide diagnostic information of where execution time is spent, a timer 
+class has been added to SAMRAI.  The timers measure user, system, and 
+wallclock time.  A simple timer database manager class is also provided so
+that timers can be turned on or off from a main program and there is no need
+to place guards or conditionals around timers placed within the code.  
+Eventually, more functionality will be included within the timer classes
+to gather additional diagnostic information about performance.  Also, packages
+within the SAMRAI library (e.g., communication schedules) will be instrumented
+with the timers so that these routines may be analyzed more easily by users. 
+
+User documentation describing the use of the timers is forthcoming.  Meanwhile,
+see the example in SAMRAI/source/test/timers or the Euler and HeatEqn examples 
+in SAMRAI/source/applications. 
+
+
+(5) Non-uniform load balancing for patches
+
+SAMRAI now provides basic support for load balancing patches on a level where
+the workload distribution is non-uniform across the cells on the mesh.  
+The non-uniform load balancing routines are invoked through the same interface
+as the previously available uniform load balance routines.  The workload
+estimator uses values stored as arrays of cell-centered double values on the
+patch hierarchy.  These values are set based on workload estimates
+(e.g., time to update a cell) determined by a specific application.
+
+The non-uniform load balance routines were developed as part of a summer
+project by Scott Morris, a University of Utah undergraduate student, based
+on the needs of the C-SAFE project (i.e., the Univ. of Utah ASCI Alliance
+Project).  The routines should considered proto-type code as they are not yet
+in their final form.  They will be documented and made available in a more
+general form in a future release.  In addition, enhancements will be made
+to the algorithm, for example, to produce patches configured to better
+achieve spatial locality in their assignment to processors.
+
+
+(6) Redesign of variable database class
+
+The variable database class used for managing variables and data storage 
+within applications has been redesigned.  The new organization makes
+several of the function calls more clear and makes the treatment of 
+variables and variable "contexts" more uniform.  As a result of these
+changes, the manner in which application codes interact with the database
+has been simplified.  Also, the patch class now can access the variable
+database directly so that one may obtain a particular patch data object
+from any patch by making a call of the form:
+
+   patch->getPatchData(variable, context);
+
+User documentation describing the use of the variable database is forthcoming.
+Meanwhile, consult the documentation in the header file for the class 
+"hier_VariableDatabaseX".  The class header provides a concise description
+of usage of the database class.  An example program illustrating the use of all
+member functions of this class can be found in the SAMRAI/source/test/variables
+directory.  Also, see the examples in the SAMRAI/source/applications 
+subdirectories to see how usage at the application code level has changed.
+
+
+(7) Redesign of time integration and regridding classes
+
+The time refinement integrator, hyperbolic level integrator, and gridding
+algorithm and associated classes have been reworked.  This reorganization
+has made the class interfaces cleaner, so they should be easier to use and
+understand.  Also, the gridding algorithm and time refinement integrator are 
+completely decoupled now.  Thus, the gridding class can be used in a variety 
+of different algorithms (see item 10 in this list).  
+
+The code documentation for these classes has been updated to reflect the 
+changes.  Please consult the header file comments, or source code manual for 
+for more information.  User documentation describing the use of the algorithm 
+classes is forthcoming.  In the meantime, please see the main programs in 
+each of the sample applications in SAMRAI/source/applications.  These files
+contain descriptions of object creation and composition related to the use
+of the major SAMRAI algorithm classes used.
+
+
+(8) Abstract "Strategy" classes renamed
+
+The names of all SAMRAI classes that serve as abstract base classes for the
+strategy design pattern have been changed to include the word "Strategy"
+in the class name.  The intent of the name changes is to clearly identify
+the use of the strategy pattern within the library code.  All relevant class 
+header file documentation has been updated to include a description of the
+Client-Strategy-Concrete Strategy elements in use.  Thus, it is now easier 
+to understand the intended composition and use of such classes.  For more
+information about the Strategy design pattern, consult the book, "Design
+Patterns: Elements of Reusable Object-Oriented Software", Gamma, et al., 
+Addison-Wesley 1995.
+
+
+(9) Addition of method of lines integration classes
+
+A method of lines integration algorithm was added to facilitate solution of a
+system of ODEs of the form du/dt = F(u) on an adaptive mesh hierarchy.  The
+method implements an explicit time-stepping Runge-Kutta integration scheme. Like
+other algorithm classes in SAMRAI, the MethodOfLinesIntegrator class references
+a corresponding MethodOfLinesPatchStrategy class which defines the numerical 
+methods to be carried out on the patches.  Specifically, the patch strategy 
+class contains pure virtual methods which are defined by a patch strategy 
+implemented by the user.
+
+For further information on the MOLIntegrator and MOLPatchStrategy classes, see
+the DOC++ documentation or visit the files themselves in
+SAMRAI/source/algorithms/time_integration/method_of_lines.
+
+
+(10) New example codes
+
+Several new example codes have been introduced which demonstrate the use
+of various aspects of the SAMRAI library.  In the SAMRAI/source/test
+directory, examples have been added to demonstrate the following:
+
+   - HDF5 file reading and writing
+   - input database file usage
+   - basic usage of the AMR Poisson solver classes 
+   - usage of the timer classes
+   - usage of the variable database
+
+In the SAMRAI/source/applications, a heat equation sample application has been
+added to demonstrate use of the method of lines integration classes (item 10).
+
+The HeatEqn example is somewhat different from the Euler and Linear Advection 
+cases in that no time refinement is performed.  In both Euler and Linear 
+Advection, time advancement (and also re-gridding) is coordinated by the 
+TimeRefinementIntegrator class.  In the HeatEqn case, time-advancement and 
+re-gridding is coordinated from within the main program (i.e. the main.C file).
+The HeatEqn.C code is the user-defined patch strategy class in this example.
+
+For further information of the HeatEqn example, see the README in the 
+applications/HeatEqn directory.  
+
+
+(11) Euler gas dynamics numerical routines rewritten
+
+The flux calculation routines in the Euler example were rewritten so that they
+use less memory and increase performance.  A document describing in detail the
+organization of the flux routines is in preparation.  A preliminary version
+of the document is available upon request.
+
+
+(12) Execution on 1024 processors on all three ASCI platforms
+
+Prototype problems have now ben run on 1024 processors on each of the three 
+ASCI platforms (ASCI Red, ASCI Blue Pacific, ASCI Blue Mountain).  The 
+problems include the Euler and heat equation sample problems, and the 
+Poisson solver test problem on a locally refined patch hierarchy.  Some 
+scaling results have been produced on ASCI Blue Pacific for the Euler and
+heat equantion problems which demonstrate basic scaling of the SAMRAI
+library.  More studies will be done in the near future and the results will
+be made public.
+
+
+(13) Improved portability  
+
+Many enhancements have been made to make the automatic configuration process
+more "automatic" for library builds on various platforms.  See the accompanying
+installation notes for details.
+
+In addition the "m4" macros used in dimensioning arrays in Fortran numerical
+routines have been changed to eliminate the problem that some SGI Fortran
+compilers have with zero ghost cell widths.  Specifically, if zero ghost
+cell width is specified, "+0" and "-0" no longer appears in the array
+dimensioning of the compiled Fortran code.   Those of you who have seen
+this problem in the past know what this means.  Those of you who haven't
+don't need to worry about it.
+
+
+(14) MPI guards no longer needed in application code
+
+It is no longer necessary to guard MPI_Init and MPI_Finalize calls in
+application main programs.  These functions have been included in the 
+tbox_MPI class, which groups common MPI routines into one globally-accessible
+location.  Consult any of the sample applications (SAMRAI/source/applications)
+or test programs (SAMRAI/source/test) for usage.
+
+
+(15) Vizamrai visualization tool
+
+The data post-processing and animation tool "Vizamrai" is now part of the
+SAMRAI software library.  The tool provides basic visualization capabilities
+for two- and three-dimensional data sets defined on a structured AMR patch
+hierarchy such as that used in SAMRAI.  Vizamrai is based on the VTK library
+and provides a graphical user interface for manipulating images.  
+
+Vizamrai is located in the SAMRAI/tools directory.  The current release of 
+Vizamrai should be considered an alpha version of the software.  Please 
+direct questions about Vizamrai to Steve Smith at smith84 at llnl.gov. 
+
+-------------------------
+
+The description of the parallel I/O routines is included here for reference
+until more complete user documentation is available....
+
+Header file tbox_PIO.h (or PIO.h without the prefix) defines a parallel I/O
+controller class and three new I/O streams: pout, perr, and plog.  These three
+streams are of type ostream and are drop-in replacements for cout and cerr.
+
+Output to pout is redirected to cout on processor zero only and is also
+mirrored to the log file if logging is enabled (see below).  That is,
+
+		pout << "Hello, world!\n";
+
+will print "Hello, world!" on processor zero but nothing on the other
+processors.  Stream pout provides a convenient way to print output from
+processor zero without guarding every output statement.
+
+Output to perr is redirected to cerr from every processor.  A processor
+identifier is prepended to the output stream.  For example,
+
+		pout << "You messed up, you dufus!\n";
+
+on five processors would yield:
+
+P=00000: You messed up, you dufus!
+P=00001: You messed up, you dufus!
+P=00002: You messed up, you dufus!
+P=00003: You messed up, you dufus!
+P=00004: You messed up, you dufus!
+
+Stream plog writes output to a specified log file.  By default, logging is
+disabled.  To enable logging from node zero only, execute the following at
+the beginning of the application:
+
+int main(int argc, char** argv)
+{
+   MPI_Init(&argc, &argv);
+
+   SAMRAI_Manager::startup();
+   PIO::logOnlyNodeZero("logfile.log");
+   ...
+}
+
+All output from node zero to pout, perr, and plog will be mirrored to the
+specified log file.  To enable logging from every node, execute the following:
+
+int main(int argc, char** argv)
+{
+   MPI_Init(&argc, &argv);
+
+   SAMRAI_Manager::startup();
+   PIO::logAllNodes("logfile.log");
+   ...
+}
+
+Output to plog on every node will be redirected to log file logfile.log.XXXXX,
+where XXXXX is the processor number.
+
diff -r 000000000000 -r 5eda1a3f24e8 docs/release/version-1.0.1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/release/version-1.0.1	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,130 @@
+*****************************************************************************
+				Release Notes
+*****************************************************************************
+
+NOTE:  These release notes are more descriptive and detailed than is usual
+       for software release notes.  The reason for this is that presently
+       complete documentation does not exist for most of the items listed.
+       Until sufficient user documentation becomes available, descriptions
+       such as those that follow will be part of SAMRAI release notes.
+
+Where to report Bugs
+--------------------
+
+If a bug is found in the SAMRAI library, we ask that you kindly report it
+to us so that we may fix it.  We will make every effort to fix bugs
+in a timely manner.  Depending on the severity or the complexity of the
+bug, we will either fix the bug for a subsequent library release or send
+a code fix to users so that their work is minimally interrupted.
+
+LLNL users should report bugs using the CASC bug tracking web pages:
+
+        http://www-casc.llnl.gov/bugs/
+
+Enter the bug into the appropriate are of the SAMRAI project section.
+
+Bugs found by other users should send email to samrai-bugs at llnl.gov.
+
+*****************************************************************************
+
+=============================================================================
+SAMRAI Release v1.0.1
+=============================================================================
+
+What's Changed
+--------------
+
+(1) PETSc Update
+
+SAMRAI-PETSc vector interface updated to PETSc version 2.0.24
+
+The abstract PETSc vector interface classes in SAMRAI are now
+consistent with version 2.0.24 of the PETSc library.  In the future,
+interface code in the SAMRAI library will be kept current with the
+most recent release of the PETSc library.  For users of PETSc on ASCI
+Blue Pacific, please see the example configuration commands in the
+"INSTALL" file.
+
+You will need to get PETSc version 2.0.24 if you wish to compile 
+with PETSc.
+
+(2) API for Database classes changed
+
+The names for the get<TYPE>(key, default) methods that allow the user
+to specify a default value to be returned have been changed to
+getTYPEWithDefault(key, default) to avoid confusion in usage.  We no
+longer overload the get<TYPE> method name.  If you use the old methods
+you will need to change the name of the method which you are invoking.
+
+
+For example
+	bool amr_flag = inputdb -> getBool("UseAMR", TRUE);
+	
+would be replaced by 
+
+	bool amr_flag = inputdb -> getBoolWithDefault("UseAMR", TRUE);
+
+(3) Input Database Errors
+	
+Errors in the input database are now printed to the screen and show
+the line in which the parsing error occurred.  The full input database
+is sent to the plog file as well so you can see exactly what was being
+read in.  Previously the errors were a bit cryptic and the entire
+input database was sent to the screen which quickly caused errors to
+scroll by.
+
+
+What's New
+----------
+
+
+(1) New concrete PatchData types added:
+
+    Side-centered data
+    
+    The SideData type represents data on an AMR grid at the same physical
+    locations as the existing Face Data type.  Namely, side-centered data
+    on a patch is stored using NDIM arrays, each of which holds data for
+    cell faces whose normal lies in a single coordinate direction.  SideData
+    is different than FaceData in ordering of indices in the individual 
+    arrays.  Whereas, FaceData permuted the x,y, and z indices in each 
+    array, SideData does not.  So SideData can be accessed in terms of
+    an (x,y,z) triple (in 3d, 2d is similar) in each of the individual
+    arrays.  Consult the code documentation for usage and operators 
+    (e.g., coarsen, refine, and time interpolation) that are available
+    for SideData.
+
+    Edge-centered data
+    
+    The EdgeData type represents data on an AMR grid along the edges of
+    cells.  Like FaceData and SideData types, NDIM arrays are used for 
+    storage. In 1d, the storage is identical to FaceData and the values are
+    accessed in the same way.  In 2d, the data locations are identical
+    to the FaceData type.  However, the arrays are stored and accessed 
+    differently.  The first array holds the data corresponding to cell
+    edges with tangents in the x-direction, and the second array holds
+    the data corresponding to cell edges with tangents in the y-direction.
+    In 3d, the EdgeData type type defines values at the center of each edge
+    of a cell.  The first array holds values for edges tangent to the 
+    x-direction, the second array holds values for edges tangent to the 
+    y-direction, and the third array holds values for edges tangent to the 
+    z-direction.  Similar to FaceData, access to EdgeData uses permuted 
+    indexing so that the fastest direction in the array corresponds to the 
+    direction of edges for that array.  Consult the code documentation for 
+    usage and operators (e.g., coarsen, refine, and time interpolation) 
+    that are available for EdgeData.
+
+(2) Load balancing enhancements
+
+Additional methods have been added to the mesh_BalanceUtilities class.
+Most notably, a spatial bin packing routine that assigns boxes to
+processors in a way that exploits spatial locality has been added.
+This method creates a linear ordering of the boxes in space with the
+property that boxes spatially near each other are likely to be near
+each other in the linear ordering.  This capability can be used for
+either uniform or non-uniform load balancing via an input file key.
+Please consult the class documentation for usage.
+
+
+*****************************************************************************
+
diff -r 000000000000 -r 5eda1a3f24e8 docs/release/version-1.0.2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/release/version-1.0.2	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,332 @@
+*****************************************************************************
+				Release Notes
+*****************************************************************************
+
+NOTE:  These release notes are more descriptive and detailed than is usual
+       for software release notes.  The reason for this is that presently
+       complete documentation does not exist for most of the items listed.
+       Until sufficient user documentation becomes available, descriptions
+       such as those that follow will be part of SAMRAI release notes.
+
+Where to report Bugs
+--------------------
+
+If a bug is found in the SAMRAI library, we ask that you kindly report it
+to us so that we may fix it.  We will make every effort to fix bugs
+in a timely manner.  Depending on the severity or the complexity of the
+bug, we will either fix the bug for a subsequent library release or send
+a code fix to users so that their work is minimally interrupted.
+
+LLNL users should report bugs using the CASC bug tracking web pages:
+
+        http://www-casc.llnl.gov/bugs/
+
+Enter the bug into the appropriate are of the SAMRAI project section.
+
+Bugs found by other users should send email to samrai-bugs at llnl.gov.
+
+*****************************************************************************
+
+=============================================================================
+SAMRAI Release v1.0.2
+=============================================================================
+
+-----------------------------------------------------------------------------
+                             What's Changed
+-----------------------------------------------------------------------------
+
+(1) BoundaryBox class
+
+Previously the PatchGeometry stored an array of NDIM BoxArrays which
+stored boxes of width 1 immediately outside the physical domain
+boundary along the nodes (corners), edges, and faces of the domain.
+The user was required to call
+xfer_RefinePatchStrategy::reclassifyBoundaryBox on each boundary box
+to calculate two integer values associated with the box: "bdry_type"
+and "bside."  bdry_type told what type of intersection the boundary
+box had with the physical domain, that is whether it intersected the
+domain at a face, an edge, or a node.  bside indicated where the
+boundary box was located in relation to the current patch.  Each
+position above or below the patch in each coordinate direction had a
+unique integer index.  reclassifyBoundaryBox would also adjust the
+coordinates of a box if, for example, it was on the node or edge of a
+3d patch but was actually on the face of the physical domain.  The
+adjustment in this case would extend the box along the face to the
+edge of the ghost layer of the patch.
+
+Now, instead of creating an array of NDIM BoxArrays to contain the
+boundary boxes for each Patch, the GridGeometry creates objects of the
+new hier_BoundaryBox class to store boundary box information.  The
+BoundaryBox consists of a Box to store its location in index space, as
+well as two integer data members to store the BoundaryBox's boundary
+type and location index.  The location index is the new name for the
+"bside" described in the previous paragraph.  When the BoundaryBoxes
+are created, they are created to be of the correct boundary type, so
+that if, for example, they are on the face of the physical domain,
+they will be created with the face boundary type and will not need to
+be extended by a function such as reclassifyBoundaryBox.  The
+BoundaryBoxes will be stored by the PatchGeometry as an array of NDIM
+Array<BoundaryBox>'s (replacing NDIM BoxArrays).  Each
+Array<BoundaryBox> will store the BoundaryBoxes of a single boundary
+type.  The user should use PatchGeometry's getFaceBoundary,
+getEdgeBoundary, getNodeBoundary, or getCodimensionBoundary functions
+to access the Arrays of BoundaryBox.
+
+Along with the introduction of the BoundaryBox we have also introduced
+some new conventions associated with boundary boxes.  Boundary boxes
+on the corners of the domain should now be consider to be of boundary
+type "node," not "corner."  The definitions of the boundary types are
+as follows: a boundary box in any dimension that intersects the domain
+at only one point has the boundary type "node."  The integer value
+that represents the node type is equal to NDIM.  In 2D and 3d, a
+boundary box that intersects the domain along a one-dimensional edge
+has the boundary type "edge."  The edge type is represented by the
+integer value NDIM-1.  A 3D boundary box that intersects the domain
+along a two-dimensional face has the boundary type "face," represented
+by the integer value one.  The conventions for the integer values of
+the location index were already in the library, but they are now
+explicitly documented in the BoundaryBox header file.
+
+A document describing the use of BoundaryBox is located at
+docs/userdocs/boundaries.ps.
+
+(2) Minor modification to SAMRAI manager class
+
+The SAMRAI manager class which is used to control startup and shutdown
+processes by most programs that use SAMRAI has moved from the
+/source/samrai directory to the /source/toolbox/base directory.  Also,
+the class name has changed from `SAMRAI_Manager' to
+`tbox_SAMRAIManager'.  There is a noprefix header so that users can
+include the class with a statement such as `#include
+"SAMRAIManager.h"'.  The previous include file was named "SAMRAI.h".
+Thus, the only impact on library users is to replace the `#include
+"SAMRAI.h"' statement in their main program with the statement
+`#include "SAMRAIManager.h"' and refer to the class as `SAMRAIManager'
+instead of `SAMRAI_Manager'.
+
+(3) Library Breakup
+
+The library has been broken up into more library files (.a's) than in
+previous releases.  If you include the config/Makefile.config makefile
+in your makefile and use the $(LDLIBS) variable to get the SAMRAI
+libraries you need to change your Makefile.  There are now 4 library
+symbols defined to bring in the SAMRAI libraries.  You should use them
+in the following order $(LIBSAMRAI3D) $(LIBSAMRAI2D) $(LIBSAMRAI1D)
+$(LIBSAMRAI) $(LDLIBS) in your link line.
+
+  LDLIBS      - This contains the system, MPI, Fortran, C/C++ libraries 
+	that are used to build SAMRAI. 
+  LIBSAMRAI   - This contains the non-dimensional SAMRAI classes.  
+	All SAMRAI applications need these libraries. 
+  LIBSAMRAI1D - The dimensioned classes in SAMRAI.  You need to include 
+	the dimensions which you are using in your application. 
+  LIBSAMRIA2D 
+  LIBSAMRAI3D 
+
+(4) Simplification of Restart Setup  
+
+The library has been modified so that the user no longer has to be
+concerned with much fo the setup process for writing restart files.
+There are only three functions that the user need be aware of at the
+level of the main program: openRestartFile(), closeRestartFile(), and
+writeRestartFile().  (Note the change in the function name for writing
+restart files - OLD: writeToRestartFile() NEW: writeRestartFile()).
+There is no longer any need to register object with the
+RestartManager.  However, all the constructors for objects that can be
+initialized from restart have been changed.  The new arguments are
+(const string& object_name, Pointer<Database> input_database, . . .)
+instead of (Pointer<Database> input_database,
+Pointer<Database>restart_database, . . .).  The object handles the
+retrieval of its own data from the restart database and its own
+registration with the RestartManager using its object_name as a
+handle.  You will need to make the following changes to main.C: 
+
+	(1) Remove all registration of objects with the RestartManager
+	(2) change writeToRestartFile() to writeRestartFile()
+	(3) modify the constructors for all restartable objects.
+
+(5) Memory management of algorithm objects registered for restart
+
+In older versions of SAMRAI, the RestartManager handled the
+deallocation of memory used by objects registered for restart.  This
+has been changed so that the RestartManager does not deallocate any of
+the memory used by objects registered for restart. The user now has
+the responsibility of freeing this memory.  All objects that are
+allocated in the main code must be explicitly deleted (or smart point
+set to null) to avoid memory leaks.
+
+(6) Minor change to 2d plotting classes
+
+The apps_PlotLevel class has been factored into the apps_PlotBase
+class which handles all the X windows stuff and apps_HyperbolicPlot
+which handles when plotting should occur relative to the advance in
+the hyperbolic level integrator algorithm.  This was done to
+facilitate the construction of 2d plotting functionality for other
+algorithms (e.g. method of lines).  These changes require that main.C
+be changed for the LinAdv and Euler examples.  The only change is that
+apps_PlotLevel needs to be replaced by apps_HyperbolicPlot.  In the
+library, the only changes outside of the /source/application/support
+and the /include directories, is a minor modification to the
+/source/template/special directory. 
+
+(7) Use of timers in code has changed
+
+TimerDatabase has been removed and replaced with TimerManager.  This
+is to support some new features, including addition of input/restart
+functionality, and exclusive time capability.  The arusage() and
+getrusage() functions have been replaced with POSIX-compatable times()
+function to facilitate all platforms (we verified the two give almost
+identical results so this change should be transparant to users).  The
+preferred way of turning timers on/off is no longer through the
+TimerDatabase::getDatabase->addTimer(name) routine.  Instead, it is
+preferable to include timer names in the input file.  A
+TimerManager::getManager->addTimer(name) function does exist for any
+users that want to stick with the old functionality.  There are also
+some different print options now available.  For more information, see
+the discussion on timers below.
+
+-----------------------------------------------------------------------------
+                                   What's New 
+-----------------------------------------------------------------------------
+
+(1) Support for Sun's SunPRO C++ 5.0 compiler
+
+(2) 2D plotting for the Heat Equation sample application
+
+(3) Periodic Boundary Capabilities 
+
+This is input in the geometry input data file as "periodic_dimension =
+1,1,1" to specify that the domain is periodic in all 3 dimensions.
+The default is no periodicity in any of the dimensions if this field
+is ommitted from the input data file.  The following classes and
+functions have been modified to handle periodicity :
+	(1) geom_CartesianGridGeometry::getFromInput
+	(2) xfer_RefineSchedule::generateCommunicationSchedule  
+		computes source mask to properly shift unfilled boxes 
+		on the domain
+        (3) xfer_RefineSchedule::finishScheduleConstruction 
+		computes unfilled boxes based on the periodicity as
+		the function iterates through levels on the hierarchy
+	(4) hier_GridGeometry::initializePeriodicShift 
+		computes periodic shift based on the input boolean
+		(periodic_dimension) and number of cells in each dimension
+
+	(5) hier_GridGeometry::checkPeriodicValidity 
+		checks that the domain is periodic in each of the 
+		dimensions specified as periodic and write
+                error message and aborts if not valid.  
+
+There are also several simple test procedures to verify that the
+functionality is working.  These are contained in the
+test/communication directory in the form main_Xd#patch/level.
+
+(4) New Timer routines
+
+The TimerManager class replaces the old TimerDatabase class:
+
+The new class is much more powerful.  In addition to allowing entry of
+timers thru input and writing timer data to restart, the class
+coordinates tracking of nested timers so one can get statistics of
+exclusive time and a calling tree (referred to as concurrent timers).
+Use of the class is described below.
+
+Input and Restart:
+
+A TimerManager is created by calling the TimerManager::createManager()
+function. One can pass an input sub-database
+(e.g. input_db->getDatabase("TimerManager")) which contains true/false
+specifications for "maintain_exclusive_time" and
+"maintain_concurrent_time" along with a string list called
+"timer_list" which specifies the names of the timers to be used in the
+simulation.  The entries in "string_list" can be of the following
+format:
+
+	Package::*::*       - turns on all timers in Package 
+	Package::Class::*   - turns on all timers in Class 
+	*::Class::*         - '' 
+        Class::*            - '' 
+        Class               - '' 
+        Package::Class::method - turn on specific timer 
+        *::Class::method       - '' 
+        Class::method          - ''
+
+
+This allows the user to specify multiple timers to be turned on in a
+package or class thru the input file (details on how to name timers in
+the code so that the manager will properly parse the list are given in the following bullet).  When the code writes a restart file, the RestartManager will automatically write out the state of all the timers that were turned on.  When the case is restarted, timers will be initialized to their restart state, as long as they are still specified in the input file (that is, a timer is only restarted if it is entered in the input file, otherwise the restart state will be discarded).  To avoid using restarted timer values, simply call the tbox_TimerManager::getManager()->resetAllTimers() function.  
+
+Adding timers to code:  
+
+To allow the TimerManager to track timers of a certain package, or
+class, and subsequently give the option of turning on a set of timers
+via the input file, it is necessary to name the timers in the code
+with the format: package::class:method.  String entries can be lower
+or upper case, it does not matter.  The important thing is that two
+sets of "::" exist in the name to designate its package from class.
+Also, if the class is dimensional (i.e. class[1,2,3]), this should be
+specified in the timer name.  The parser will interpret an input file
+entry of "class::*" to mean either class1, class2 , or class3
+(i.e. all three will be turned on).  An input file entry of
+"class2::*" will be interpreted to only turn on timers in class2.
+Overall, use the following format to insert a timer into the code:
+
+	static tbox_Pointer<tbox_Timer> timer = 
+		TimerManager::getManager()->getTimer("pkg::classX::method"); 
+        timer->start(); 
+        ... 
+        timer->stop(); 
+                                   
+
+-----------------------------------------------------------------------------
+                                   Bug Fixes 
+-----------------------------------------------------------------------------
+
+(1) Fixed debug compiler flags on Blue Pacific to enable TotalView debugging. 
+
+(2) Added -fpermissive flag to gcc compiles to enable compling with
+latest gcc (2.95) on the Suns due to old style X11 header files
+
+(3) Fixed conservative linear refinement operator for edge data type. 
+
+(4) Modified box chopping algorithm in hier_BoxUtilities so that the
+user can exactly specify the size of the chopped boxes (i.e. by
+setting min and max box size to be equal).
+
+(5) Fixed the computation of bad cut points for 1D and at the boundaries of a box in 2/3D.  (hier_BoxUtilities) Fixed Heat Equation sample application so that it correctly runs from restart. 
+
+(6) Fixed minor bug in HDFDatabase which gave an assert error when
+reading/writing empty arrays.
+
+-----------------------------------------------------------------------------
+                                  Known Problems
+-----------------------------------------------------------------------------
+
+(1) When configuring the library build process, the Fortran compiler can be 
+    specified by using the environment variable F77 or the "--with-F77=" 
+    configuration option.  However, if the environment variable is used, 
+    it cannot contain a path due to the way configure is searching for the 
+    executable.  For example,
+
+       setenv F77 f77
+       ./configure
+
+       will work, while
+
+       setenv F77 /usr/local/bin/f77
+       ./configure
+
+       will fail.  
+
+    Until this is fixed, use 
+
+       ./configure --with-F77=/usr/local/bin/f77 
+
+    as a work-around.
+
+(2) When configuring on the local DECs (west, east), the HDF library must be
+    explicitly defined in order to pick up the most recent serial version of 
+    HDF.  The HDF parallel library cannot yet be used for AMR.  i.e.
+    
+       ./configure --with-HDF5=/usr/local/hdf5/hdf5-1.2.0/serial
+
+
diff -r 000000000000 -r 5eda1a3f24e8 docs/release/version-1.0.3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/release/version-1.0.3	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,355 @@
+*****************************************************************************
+				Release Notes
+*****************************************************************************
+
+NOTE:  These release notes are more descriptive and detailed than is usual
+       for software release notes.  The reason for this is that presently
+       complete documentation does not exist for most of the items listed.
+       Until sufficient user documentation becomes available, descriptions
+       such as those that follow will be part of SAMRAI release notes.
+
+Where to report Bugs
+--------------------
+
+If a bug is found in the SAMRAI library, we ask that you kindly report it
+to us so that we may fix it.  We will make every effort to fix bugs
+in a timely manner.  Depending on the severity or the complexity of the
+bug, we will either fix the bug for a subsequent library release or send
+a code fix to users so that their work is minimally interrupted.
+
+LLNL users should report bugs using the CASC bug tracking web pages:
+
+        http://www-casc.llnl.gov/bugs/
+
+Enter the bug into the appropriate are of the SAMRAI project section.
+
+Bugs found by other users should send email to samrai-bugs at llnl.gov.
+
+*****************************************************************************
+
+=============================================================================
+SAMRAI Release v1.0.3
+=============================================================================
+
+-----------------------------------------------------------------------------
+                             What's Changed
+-----------------------------------------------------------------------------
+
+(0) Parts of the SAMRAI library have been reorganized and two new "packages"
+have been created.  The changes were made to place certain classes in 
+locations that are more intuitive and to create a better balance among the
+different SAMRAI packages in terms of size.  The changes do not affect 
+the functionality of any of the classes involved.  For application developers 
+using the "noprefix" versions of class names, the noticeable changes are
+minimal.  Users employing full class names, including package prefixes, in 
+their development may be affected.  A summary of changes to the library 
+organization follows.  Please refer the SAMRAI source code documentation 
+for more details.
+
+   (0.1)   The AMR patch hierarchy construction and dynamic gridding classes
+           have been moved from source/algorithm/adaptive_meshing to
+           the directory source/mesh/gridding.  These classes are now part
+           of the "Mesh" package; thus they now have package prefix "mesh_".
+
+   (0.2)   A new "Solvers" package was created; the prefix is "solv_".  
+           This package contains support for linear and nonlinear solvers
+           on a structured AMR patch hierarchy.  
+
+   (0.3)  The PETSc abstract vector interface class is now part of the
+          "Solvers" package and have been moved from source/petsc to the 
+          directory source/solvers/packages/petsc.  Its name has changed 
+          from "petc_AbstractVectorReal" to "solv_PETScAbstractVectorReal". 
+
+   (0.4)  The KINSOL abstract vector interface classes and C++ wrappers are 
+          now part of the "Solvers" package package and have been moved from 
+          source/kinsol to the directory source/solvers/packages/kinsol.  
+          Some names have changed for organizational purposes.  Specifically, 
+          "kins_NonlinearSolver" and "kins_AbstractFunctions" are now 
+          "solv_KINSOLSolver" and "solv_KINSOLAbstractFunctions", 
+          respectively.  "kins_AbstractVector" is now 
+          "solv_KINSOLAbstractVector".
+
+   (0.5)  The SAMRAI vector classes are now part of the "Solvers" package.  
+          They have been moved from the directory source/algorithm/vectors/ 
+          to source/solvers/vectors and now have the package prefix "solv_".
+
+   (0.6)  The Poisson hierarchy solver based on the FAC algorithm and which 
+          uses hypre multigrid solvers as level solvers has been moved to 
+          the "Solvers" package from the "Algorithm" package.  Specifically, 
+          the contents of the directory source/algorithm/poisson_solver have 
+          been moved to source/solvers/FAC.  (Important note: These classes, 
+          while functional, are still under construction and should be used 
+          carefully).
+
+   (0.7)   A new "Mathematical Operations" package was created; the prefix 
+           is "math_".   The mathematical operations classes (arithmetic, 
+           dot products, norms, etc.) needed by the SAMRAI vector support 
+           and which can be applied to patch data on an AMR hierarchy 
+           comprise the contents of this package.   Formerly, these classes
+           were located in the directory source/algorithm/data_operations.
+           Now, they can be found in source/mathops.
+ 
+
+(1) Some functionality added to the Index patch data type.  The IndexData
+class stores and irregular index set in a List.  A method to check if a
+particular index is on the List was added.  There are now two iterators
+associated with IndexData.  IndexListIterator interates of the List that
+stores the irregular index set, and the IndexIterator iterates over the
+index space associated with the PatchData object.
+
+(2) Previous versions of SAMRAI used a home-grown runtime type checking
+system.  This has been replaced with the ISO standard RTTI system.
+You need to remove uses of the tbox_RTTI* macros from classes and change
+casts to use the dynamic_cast operator.  For example:
+
+	template <class TYPE>
+	int pdat_OutersideDataX<TYPE>::getDataStreamSize(
+	const hier_BoxOverlapX& overlap) const
+	{
+		tbox_ConstRef<pdat_SideOverlapX> t_overlap(overlap);
+
+		....
+
+becomes
+
+
+	template <class TYPE>
+	int pdat_OutersideDataX<TYPE>::getDataStreamSize(
+	   const hier_BoxOverlapX& overlap) const
+	{
+
+		const pdat_SideOverlapX *t_overlap = 
+		    dynamic_cast<const pdat_SideOverlapX *>(&overlap);
+
+	        ...
+
+The result of the dynamic_cast is NULL if the dynamic cast fails.
+
+(3) The ordering of the indices for the edge data type have been changed 
+so that they are unpermuted.  For example, given a box 
+[l0:u0,l1:u1,l2:u2] in 3d, the edge indices will run:
+
+edge_X [l0:u0,l1:u1+1,l2:u2+1]
+edge_Y [l0:u0+1,l1:u1,l2:u2+1]
+edge_Z [l0:u0+1,l1:u1+1,l2:u2]
+
+Previous versions of SAMRAI had the indices for the edge data type 
+permuted so that the edge indices for the same box would have been:
+
+edge_X [l0:u0,l1:u1+1,l2:u2+1]
+edge_Y [l1:u1,l2:u2+1:l0,u0+1]
+edge_Z [l2:u2,l0:u0+1,l1:u1+1]
+
+(4) The management of which patchdata in the PatchHierarchy are written
+out for restart purposes has been moved from the tbox_RestartManager
+to the hier_VariableDatabase class.  The changes in the methods used
+to register/unregister/etc. patchdata for restart are given by:
+
+hier_ComponentSelector hier_VariableDatabaseX::getPatchDataRestartTable()
+bool hier_VariableDatabaseX::isPatchDataRegisteredForRestart(int index)
+void hier_VariableDatabaseX::registerPatchDataForRestart(int index)
+void hier_VariableDatabaseX::unregisterPatchDataForRestart(int index)
+
+The old methods were
+
+tbox_BitVector tbox_RestartManager::getPatchDataRestartTable()
+bool tbox_RestartManager::getPatchDataRestartBit(int index)
+void tbox_RestartManager::setPatchDatRestartBit(int index)
+void tbox_RestartManager::clrPatchDataRestartBit(int index)
+
+(5) The ghost cell width argument for the concrete variable types has been 
+removed because it no longer needs ghost cell information (the specification
+of ghost cell width for patchdata was moved to the hier_VariableDatabase
+class long ago).  The old constructors look like:
+
+pdat_CellVariable(string name, int depth, hier_IntVector ghosts);
+pdat_NodeVariable(string name, int depth, hier_IntVector ghosts);
+
+The new constructors look like:
+
+pdat_CellVariable(string name, int depth);
+pdat_NodeVariable(string name, int depth, bool fine_boundary_represents_var);
+
+For more information about the new "fine_boundary_represents_var" 
+argument, see item (4) in the "What's New" section.
+
+(6) TimerManager's printTimerInformation() function, which prints the state
+of the timers at the end of a run, has been renamed 
+printProcessorTimerInformation().  The arguments are the same.
+
+Why the changed name?  It was not always clear to the users what information
+was being provided by this routine.  The original function printed timing 
+results from individual processors.  If a case was run on multiple processors 
+and the TimerManager->printTimerInformation() function was called,
+passing in plog as the output stream, timing information on each processor
+was written to the processor's log file. If pout was passed as the output 
+stream, it printed the results for processor 0 only.  It was confusing to
+some users exactly what information was being printed, so the name was 
+made more explicit.  The new name also differentiates the function from the
+new printSummedProcessorTimerInformation() and
+printMaxProcessorTimerInformation() functions, discussed under label (5)
+in the "What's new" section below.
+
+(7) To gain a minor increase in algorithmic flexibility an argument has 
+been added to the "advanceLevel()" routine declared in the abstract base
+class algs_TimeRefinementLevelIntegrator.  Specifically, a boolean called
+"last_step" was added to indicate when the advance is the last in the 
+current sequence on the given level before synchronization with the next
+coarser level will occur.  Users deriving from this class will need to 
+update their code to reflect this change.  This argument is ignored in the 
+algs_HyperbolicLevelIntegrator class, which requires no special treatment 
+in this case.
+
+(8) The class tbox_ThrowError has been removed.  Previously this class was
+used in some older parts of the library to report a message when an error
+occurred.  With the introduction of the "TBOX_ERROR/WARNING" macros available
+via the tbox_Utilities class, the old class was somewhat redundant.  Users 
+will not be affected by this change unless classes in their application 
+code inherited from the ThrowError class.  Similar functionality is retained
+by using the TBOX_ERROR macro.
+
+(9) All restartable objects in the SAMRAI library automatically remove
+themselves from the list of restart items when they are destroyed.  This
+takes care of the bug that arises when a restart file is written after
+a restartable object is destroyed. See item #6 in "What's New" for the 
+new tbox_RestartManager method that is used to remove objects from the 
+list of restart items.
+
+-----------------------------------------------------------------------------
+                               What's New 
+-----------------------------------------------------------------------------
+
+(1)  VAMPIR links enabled.  It is now possible to utilize the VAMPIR 
+     performance analysis toolkit for SAMRAI applications on blue pacific.
+     The VAMPIR tool provides a breakdown of the time taken in different
+     parts of the application, and provides details of communication
+     and load imbalance for parallel runs.  VAMPIR tracing is linked
+     with the timing utility in SAMRAI so existing timers will yeild
+     the information necessary for VAMPIR.  See the tutorial provided
+     in the "/docs" directory for information about using the tool.
+
+     To compile SAMRAI with VAMPIR on blue pacific, add "--with-VAMPIR" 
+     to the list of configure options.  VAMPIR can be used in either 
+     debug or optimized mode.
+   
+(2) The PatchHierarchy has been improved to allow the user to specify
+arbitrary patchdata to be written out to a database.  To write an 
+arbitrary set of patchdata to a database, use the 
+
+void hier_PatchHierarchy::putToDatabase( 
+   tbox_Pointer<tbox_Database> db, 
+   hier_ComponentSelector desired_patchdata_components)
+
+method, where the bits in the desired_patchdata_components argument are
+set to 1.  NOTE: This capability is independent of writing restart files.  
+To write specific patchdata for restart purposes, the desired patchdata 
+MUST be registered for restart with the hier_VariableDatabase.  This
+method is intended to be used for extracting data from a PatchHierarchy for
+purposes other than restart (e.g. visualization, error computations, etc.).
+
+(3) A few coarsening/refinement operators on cartesian grids have been 
+implemented for the side data type.  They are:
+
+    Complex - constant refine, weighted average coarsening
+    Double  - constant refine, conservative linear refine, 
+              weighted average coarsening
+    Float   - constant refine, conservative linear refine, 
+              weighted average coarsening
+    Integer - constant refine
+
+(4) We have added the capability for the user to specify whether coarse 
+or fine data should be the "true" representation of a variable at 
+coarse-fine interfaces (if any data points lie on the coarse-fine interface).
+The user specifies this property of the variable through a boolean passed into
+the constructor for the concrete Varible types.  For example,
+
+NodeVariable(string name,
+             int depth,
+             bool fine_boundary_represents_var);
+
+NOTES:  
+   (a) When fine_boundary_represents_var is true, fine data represents 
+the coarse-fine boundary; when fine_boundary_represents_var is false, 
+coarse data represents the coarse-fine boundary.  By default, the 
+fine_boundary_represents_var is true for all standard SAMRAI patchdata
+types.
+   (b) For those concrete data types that do not have any grid points
+on coarse-fine boundaries, specifying whether coarse or fine
+data should represent the variable at coarse-fine boundaries does not
+make sense.  For these data types (e.g. cell-centered and index data type), 
+the constructor does not have the fine_boundary_represents_var argument.
+
+(5) For each timer, the summed times on all processors can be printed by
+calling the TimerManager's printSummedProcessorTimerInformation() function.
+The maximum wallclock time, and the processor that it occurred on, is output
+by calling TimerManager's printMaxProcessorTimerInformation() function.
+
+Timer information can now be printed in format: time (percentage total%) thru
+the function registerMainTimer() added to TimerManager.  The function
+works as follows:  
+
+   1.  Create a timer, with whatever name you choose, to be the so-called 
+       "main" timer.  Typically, this will be the first timer started and
+       the last timer stopped.  Register this timer with the TimerManager
+       class via TimerManager->registerMainTimer(timer_pointer).
+   2.  When the print routine is called, TimerManager checks to see if a
+       main timer has been registered.  If not, it outputs timer data in the
+       same format as earlier versions.  If so, it will output timer data
+       in the following format:
+
+          main       user: 80.0 (100%)  sys: 2.8 (100%)  wall: 80.3 (100%)
+          mytimer    user: 56.0 (70%)  sys: 0.56 (20%)  wall: 57.8 (72%)
+
+       where the times for "mytimer" are compared to the registered main 
+       timer ("main" in this case) to determine the percentages.  
+
+(5) The SkeletonGridGeometry and SkeletonPatchGeometry are classes which
+provide the bare minimum concrete implementation of the geometry virtual base
+classes.  They provide no information about how the index space represents
+physical space.  These classes were added because of the need of a particular
+application to manage its own mapping between index space and physical space. 
+
+(6) The tbox_RestartManager class has been augmented with a new method to
+remove objects from the list of items to be written to the restart file.
+The name of the method is unregisterRestartItem(const &string name).  It 
+removes the item with the specified name from the restart list.  This 
+functionality is added so that users can destroy restartable objects 
+without worrying that the RestartManager will need the object at some 
+later point in time.  Typically, the unregisterRestartItem() method
+is invoked in the destructor of a serializable object.
+
+-----------------------------------------------------------------------------
+                               Bug Fixes 
+-----------------------------------------------------------------------------
+
+(1) In the algs_HyperbolicLevelIntegrator class, the synchronizeNewLevels()
+method has been fixed so that it produces a hierarchy that is initialized 
+with a consistent representation of conserved quantities.
+
+(2) In the algs_TimeRefinementIntegrator class, the initializeHierarchy()
+method has been fixes so that the hierarchy data is synchronized after
+the data has been initialized.
+
+(3) Specifying "NO_COARSEN" for the coarsen operation no longer results
+in copying of bogus data to the destination.  It now correctly does 
+nothing to the existing data.
+
+(4) The postprocessRefine routine in Euler is no longer commented out.  
+Some indexing problems in the conservative interpolation routines for 
+velocity and pressure were fixed so that they are functioning properly.
+
+(5) The GriddingAlgorithm class now requires all patches on the coarsest
+level to be larger than the maximum of the maximum ghost cell width and the
+user-provided minimum patch size.  Previously this was only enforced on the
+finer levels.
+
+(6) A bug found in the classes which implement the Berger-Rigoutsos clustering
+algorithm was fixed.  The potential for a segmentation fault in applying the
+Laplacian test to the one-dimensional tag histogram data if a box is too
+short along one side has been removed.
+
+
+-----------------------------------------------------------------------------
+                             Known Problems
+-----------------------------------------------------------------------------
+
diff -r 000000000000 -r 5eda1a3f24e8 docs/release/version-1.1.0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/release/version-1.1.0	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,551 @@
+*****************************************************************************
+                     Release Notes for SAMRAI v1.1
+     (notes for previous releases may be found in /SAMRAI/docs/release)
+*****************************************************************************
+
+NOTE:  These release notes are more descriptive and detailed than is usual
+       for software release notes.  The reason for this is that presently
+       complete documentation does not exist for most of the items listed.
+       Until sufficient user documentation becomes available, descriptions
+       such as those that follow will be part of SAMRAI release notes.
+
+Please direct any questions related to these notes to the SAMRAI development
+team by sending email to samrai at llnl.gov.
+
+*****************************************************************************
+*****************************************************************************
+NOTE that there are a few new user documents in the SAMRAI/docs directory.
+*****************************************************************************
+*****************************************************************************
+
+Where to report Bugs
+--------------------
+
+If a bug is found in the SAMRAI library, we ask that you kindly report it
+to us so that we may fix it.  We will make every effort to fix bugs
+in a timely manner.  Depending on the severity or the complexity of the
+bug, we will either fix the bug for a subsequent library release or send
+a code fix to users so that their work is minimally interrupted.
+
+LLNL users should report bugs using the CASC bug tracking web pages:
+
+        http://www-casc.llnl.gov/bugs/
+
+Enter the bug into the appropriate are of the SAMRAI project section.
+
+Bugs found by other users should send email to samrai-bugs at llnl.gov.
+
+*****************************************************************************
+
+-----------------------------------------------------------------------------
+                    Summary of what's changed
+-----------------------------------------------------------------------------
+
+This section contains a summary of changes to SAMRAI.  More detailed 
+descriptions of items in the following list are provided below.
+
+(0) Several optimizations have been attempted in the creation of refine 
+    schedules that should improve performance on large numbers of 
+    processors.  While we have not yet done a detailed analysis of the
+    impact of these changes on performance, we would appreciate any users
+    reporting any changes to execution timings that they observe.
+
+(1) Several class names and class implementations in the "Mesh" package
+    have changed to enable the addition of Richardson extrapolation 
+    error estimation.  See "what's new" also.
+
+(2) The "const" qualifier has been removed from the declaration of pure
+    virtual functions that define interfaces for user-routines used in
+    data transfer and intergation operations.
+
+(3) Changes have been made to the interface for user-supplied physical 
+    boundary conditions to make implementation more flexible and easier for
+    users.
+
+(4) A function has been added to the interface for user-supplied refinement
+    operations that allows one to specify the stencil width of the operation.
+
+(5) Routines have been added to the patch, patch level, and grid geometry
+    classes to get more information about the relationship between a patch
+    and the physical domain boundary.
+
+(6) Functions for setting/getting patch level number information have been
+    added to the patch class.
+
+(7) Print routines have been added to box list and box array container classes. 
+
+(8) Higher-level "restartable" SAMRAI objects are now more flexible as the
+    user can explicitly control which objects will write information to
+    restart files.
+
+(9) The patch hierarchy class been improved to allow users to explicitly
+    specify which patch data objects will be read in from restart.
+
+(10) The restart manager class no longer allows multiple objects with the 
+     same object name to be registered for restart.  
+
+(11) The interface to the timer manager has been simplified.  Changes 
+     affect the "main timer" concept and the print routines.
+
+(12) Timers in some of the main algorithm classes have been regorganized.
+
+(13) More complete and descriptive documentation is included in the various
+     patch data classes.
+    
+(14) Side-centered patch data classes have been enhanced so that one can 
+     now use them to manage data for cell sides associated with a single
+     coordinate direction only.  
+
+(15) The (admittedly) clumsy sharing of "variable-context" information
+     between the hyperbolic level integration class and the user-defined 
+     concrete patch strategy class that supplies numerical kernels on patches
+     has been removed.
+
+(16) The conservativeDifferenceOnPatch(...) function in the hyperbolic
+     patch strategy interface has an extra argument to distinguish more
+     clearly between conservative differencing during regular integration
+     steps and during level synchronization.
+
+(17) The directory structure for the KINSOL interface code has been changed
+     to accomodate the addition of PVODE interface code and the fact that the
+     vector kernel used for these two solver packages is the same. 
+
+(18) The classes supporting the HYPRE poisson solver have been reorganized to
+     decouple distinct parts of the algorithm.
+
+(19) The geom_CartesianUserDefinedCoarsenOperatorX class has been moved to
+     the transfer package and renamed to xfer_UserDefinedCoarsenOperatorX 
+     since it is independent of the coordinate system geometry.
+
+(20) SAMRAI now supports HDF5 1.4.1.  Note that releases of HDF5 beyond 
+     version 1.2.1 have different behavior when writing out zero length 
+     arrays.  
+
+(21) The "index" patch data iterator has been simplified.
+
+(22) The configure script will invoke the Compaq version of MPI by default
+     on the LLNL Compass and Tera clusters (including tc2k).
+
+
+-----------------------------------------------------------------------------
+                         Summary of what's new
+-----------------------------------------------------------------------------
+
+This section contains a summary of additions to SAMRAI.  More detailed 
+descriptions of items in the following list are provided below.
+
+(1) Richardson extrapolation error estimation has been added for time- 
+    dependent problems. 
+
+(2) A new class called hier_BoundingBoxListX has been added to provide
+    a small set of "smart" boxlist operations for computing information
+    about the location of a set of boxes with respect to another collection
+    of boxes.
+
+(3) A PVODE solver interface has been added to the solvers package.
+
+
+-----------------------------------------------------------------------------
+-----------------------------------------------------------------------------
+-----------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------
+                    Details about what's changed
+-----------------------------------------------------------------------------
+
+(1) Several class names and class implementations in the "Mesh" package
+    have changed to enable the addition of Richardson extrapolation
+    error estimation.  
+
+    The class mesh_LevelGriddingStrategyX, which used to serve as the 
+    interface between the gridding algorithm and user-supplied operations,
+    was replaced by the class mesh_TagAndInitializeStrategyX.  This name 
+    change better reflects its role as an interface for tagging cells to
+    refine and data initialization operations.  
+
+    The class mesh_GradientDetectorAlgorithmX, which provided a basic 
+    gradient detector implementation, was replaced with the class
+    mesh_StandardTagAndInitializeX.  This new class provides the Richardson
+    extrapolation procedures and routines for refining regions specified by
+    collections of boxes, in addition to the basic gradient detector 
+    implementation.  The associated class that interfaces with user routines
+    is called mesh_StandardTagAndInitStrategyX.  The class 
+    mesh_GradientDetectorStrategyX has been removed.
+
+    See the "what's new" section for more information.  Also, the document 
+    SAMRAI/docs/RichExtrap.pdf provides more information on these changes and 
+    how to use the new Richardson extrapolation routines.  Also, included is 
+    a description of the steps needed to quickly change your code to use 
+    the gradient detector functionality prior to this release.
+
+(2) The "const" qualifier has been removed from the declaration of pure
+    virtual functions that define interfaces for user-routines used in
+    data transfer and intergation operations.
+
+    The user routines affected are those related to the interfaces 
+    xfer_RefinePatchStrategyX, xfer_CoarsenPatchStrategyX, and
+    algs_HyperbolicPatchStrategyX.  This change eliminates limitations
+    in these interfaces that prevent users from changing the state of
+    their derived classes in their routines.  To update your code for
+    this change, simply remove the "const" from the porper member functions
+    in the header files and source files of the classes that your derive 
+    from these interfaces.
+   
+(3) Changes have been made to the interface for user-supplied physical
+    boundary conditions for flexibility and to make such boundary conditions
+    easier to implement in user code.
+
+    Specifically, the virtual function setPhysicalBoundaryConditions() in the
+    xfer_RefineStrategyX interface class now has the ghost cell width to 
+    fill as an argument.  The addition of this argument is motivated by the
+    need for increased flexibility in boundary condition implementation and
+    to avoid unecessary data movement during interlevel data transfers. 
+
+    When writing boundary routines the user should use the same "scratch"
+    data components as specified when registered with the refine algorithm 
+    (as before).  However, now the user knows the ghost cell width to fill 
+    (less than or equal to the scratch ghost width).  In many cases, users 
+    may ignore this argument and make no changes to their current boundary 
+    routines.  That is, filling the full ghost cell width will have no 
+    detrimental effect; however, some of the boundary values may be ignored
+    during interlevel data transfers.   The new ghost width argument must 
+    be obeyed when boundary values depend on data on the domain interior,
+    such as during extrapolation.  If the ghost width is ignored in this case,
+    arithmetic exceptions may result as valid interior data is only guaranteed 
+    for the ghost width coming through the argument list.
+
+    Also, a function has been added to the patch geometry class to compute
+    the physical boundary box region to fill.   For example, to fill all
+    face boundary regions for a patch, one would loop over the face boundary 
+    boxes and for each obtain the boundary region to fill:
+
+       Box fill_box = patch_geom->
+                      getBoundaryFillBox(<BoundaryBox face_bdry>,
+                                         <Box patch_interior>,
+                                         <IntVector ghost_width_to_fill>);
+
+    Then, "fill_box" describes the corresponding boundary region to fill.
+    This new function eliminates the need for the user to perform box
+    manipulation to determine the correct boundary region to fill given
+    a boundary box and a patch in the domain.  See the Euler, LinAdv 
+    example applications for more details on how this is used.
+
+(4) A function has been added to the interface for user-supplied refinement
+    operations that allows one to specify the stencil width of the operation.
+ 
+    The function getRefineOpStencilWidth() has been added to the interface
+    defined by the base class xfer_RefinePatchStrategyX.  Users who provide
+    their own data refinement operations using that interface should 
+    provide the maximum stsncil width of their operations via that function.
+    There was no way to communicate this to the refine schedule in previous
+    SAMRAI versions and this is needed for correctness.
+    
+(5) Routines have been added to the patch, patch level, and grid geometry
+    classes to get more information about the relationship between a patch
+    and the physical domain boundary.
+
+    The functions getTouchesRegularBoundary() and getTouchesPeriodicBoundary() 
+    have been added to the hier_PatchX class, and 
+    patchTouchesRegularBoundary(int) and patchTouchesPeriodicBoundary(int) 
+    have been added to the hier_PatchLevelX class.  Each function returns a 
+    boolean value indicating whether the patch touches a "regular" (i.e., 
+    non-periodic) or a periodic boundary, respectively.  The patch level 
+    functions accept an integer argument for the number of the particular 
+    patch on the level for which such information is desired.
+
+(6) Functions for setting/getting patch level number information have been
+    added to the patch class.  
+
+    The level number of the patch level on which a patch resides is now 
+    directly accessible from the patch and can be manipulated.  For most
+    cases, this is set automatically when a new level is created.
+
+(7) Print routines have been added to box list and box array container classes.  
+    Use them to print a box collection rather than iterating though the 
+    collection manually.
+
+(8) Higher-level "restartable" SAMRAI objects are now more flexible as the
+    user can explicitly control which objects will write information to
+    restart files.
+
+    A boolean argument has been added to the constructor of classes, such as
+    those that provide high-level integration and gridding operations, to 
+    determines whether the object will write its state to restart files 
+    during program execution.  The argument is given a default value (true) 
+    that tells the constructor to register the object for restart using the 
+    object name passed to the constructor.  This is the behavior previously 
+    provided by the library.  Now, by passing in a boolean value of false as 
+    the last constructor argument, users can turn off restart functionality 
+    for the object.   To use restart capabilities as in previous versions of 
+    SAMRAI, no changes need to be made to user code.
+
+(9) The patch hierarchy class been improved to allow users to explicitly
+    specify which patch data objects will be read in from restart.
+
+    To read in a set of patch data objects from a database, pass a "component
+    selector" to the getFromDatabase() method in the hier_PatchHierarchyX
+    class.   Then, those patch data entries corresponding to bits that are
+    set in the component selector will be read from the database.  Also,
+    an integer argument can be used to limit the number of patch levels
+    that are read in.  It has a default value of -1 which indicates that all
+    levels in the database should be read in.  Note that a warning message 
+    will be generated in the log file if some desired patch data components 
+    do not exist in the database.
+
+(10) The restart manager class no longer allows multiple objects with the 
+     same object name to be registered for restart.  
+
+    The fact that multiple objects with the name could be registered 
+    previously caused problems when trying to retrieve the proper restart
+    data.  Now, If one attempts to register to objects with the same object 
+    name for restart, the restart manager will abort with an error message.
+    Note that users have full control over the names of objects used in 
+    the restart files by passing in a name string to the class constructor.
+
+(11) The interface to the timer manager has been simplified.  Changes
+     affect the "main timer" concept and the print routines.
+
+    The registerMainTimer() function has been removed from the timer
+    manager.  It has been replaced with a more automated approach where 
+    the "main" timer is started when the timer manager is created and 
+    stopped when the timer state is output.  
+
+    The various print options printTimerInformation(), 
+    printProcessorTimerInformation(), and printSummedTimerInformation() 
+    have been replaced with a single function print(), with different
+    print request options supplied through the input file.  Print options
+    include total time, exclusive time, wall time, user time, system time, 
+    including the processor with maximum time and time summed across all
+    processors.  See the discussion under the "TimerManager" input section in
+    /SAMRAI/source/applications/Euler/README for details on how to invoke
+    the various print options.  See the main.C file in the same directory
+    for an example of how to output timer results.
+
+(12) Timers in some of the main algorithm classes have been regorganized.
+
+     A document in the SAMRAI/docs/userdocs/timers directory describes
+     the timers that may be invoked by users and how to use them.
+
+(13) More complete and descriptive documentation is included in the various
+     patch data classes.
+
+     Each patch data, patch data factory, and variable class header file
+     now contain more descriptive documentation detailing the storage and
+     indexing conventions of data type.  Hopefully, this will eliminate
+     confusion and make the different data types easier to use. 
+    
+(14) Side-centered patch data classes have been enhanced so that one can
+     now use them to manage data for cell sides associated with a single
+     coordinate direction only.
+
+    Previously, side data was allocated over each box region using NDIM arrays, 
+    each of which holds values for sides having the same normal vector.  
+    Now, in addition to this standard case, one can create a side variable 
+    or a side patch data object that allocates and manages only one array 
+    holding values for cell sides with normal vector in only one direction.
+
+    For example, to create a three-dimensional side variable with double
+    values allocated for sides in the 1 (or y) coordinate direction:
+
+       SideVariable3<double> side_var(<name string>, <int depth>,
+                                      <bool fine_values_represent boundary>,
+                                      <int direction = 1>);
+
+    To create a similar side variable for all directions, one only needs to
+    specify the name and the depth as before:
+
+       SideVariable3<double> side_var(<name string>, <int depth>);
+
+    One can also create a side patch data object directly to manage side
+    values for a single direction.  For
+
+       SideData3<double> side_data(<Box box>, <int depth>, <IntVector ghosts>,
+                                   <IntVector directions = (0,1,0));
+
+    To create a similar side patch data object for all directions, one only
+    needs to specify the box, depth, and ghost cell width as before:
+
+       SideData3<double> side_data(<Box box>, <int depth>, <IntVector ghosts>);
+
+    SideVariable, SideData, and SideDataFactory classes are all equipped with
+    a member function
+
+       const IntVector& getDirectionVector() const
+
+    that returns a const reference to the integer vector describing which
+    coordinate directions have data associated with the particular
+    side variable/data/factory object.
+
+    To reiterate: these changes are transparent for users accustomed to the
+    original implementation in which side data was managed for all cell side.
+    That is, no user code changes are necessary when using side data in the
+    the standard fashion.
+
+(15) The (admittedly) clumsy sharing of "variable-context" information
+     between the hyperbolic level integration class and the user-defined
+     concrete patch strategy class that supplies numerical kernels on patches
+     has been removed.
+
+    Recall that the hyperbolic integrator manipulates variable storage for 
+    the user code, which simply needs to pull the proper data off the patches.  
+    It is cleaner and less confusing (hopefully) to have the integrator set 
+    the variable context for the user routines.  As a result, variable contexts 
+    are no longer passed through the function calls declared in the 
+    algs_HyperbolicPatchStrategyX interface.  Also, the hyperbolic example 
+    codes (Euler and LinAdv) no longer contain VariableContext data members.  
+    For example, to retrieve the proper "density" data in an Euler class member 
+    function, one will see that this is now done as follows:
+
+       Pointer< CellData<double> > density  =
+          patch.getPatchData(d_density, getDataContext());
+
+    The "getDataContext()" function implemented in the patch strategy base 
+    class simply returns the context set by the integrator.  Then, all 
+    concrete concrete subclass routines access each patch data object 
+    in a uniform manner and no hidden assumptions are made about the 
+    proper variable context to use in a given situation.  Further, we note
+    that users still have full access to all variable and context information
+    via the variable database singleton object.
+
+(16) The conservativeDifferenceOnPatch(...) function in the hyperbolic
+     patch strategy interface has an extra argument to distinguish more
+     clearly between conservative differencing during regular integration
+     steps and during level synchronization.
+
+    A boolean argument has been added to the virtual function 
+    conservativeDifferenceOnPatch(...) in the algs_HyperbolicPatchStrategyX
+    interface.  The argument is "true" when the routine is called during 
+    level synchronization, and is "false" otherwise (i.e., during a 
+    regular advance of the solution).  This was added so that user code
+    could treat these two cases differently when necessary.
+
+(17) The directory structure for the KINSOL interface code has been changed
+     to accomodate the addition of PVODE interface code and the fact that the
+     vector kernel used for these two solver packages is the same.
+
+    The old KINSOL directory was:
+
+       SAMRAI/source/solvers/packages/kinsol
+
+    The new KINSOL directory is:
+
+       SAMRAI/source/solvers/packages/pvode_trio/kinsol
+
+    Also, the KINSOL vectors have all been renamed to PVodeTrio vectors
+    as follows:
+
+       KINSOLAbstractVector  -->  PVodeTrioAbstractVector
+       KINSOL_SAMRAIVector   -->  PVodeTrio_SAMRAIVector
+       KINSOL_SAMRAIVector1  -->  PVodeTrio_SAMRAIVector1
+       KINSOL_SAMRAIVector2  -->  PVodeTrio_SAMRAIVector2
+       KINSOL_SAMRAIVector3  -->  PVodeTrio_SAMRAIVector3
+
+(18) The classes supporting the HYPRE poisson solver have been reorganized to
+     decouple distinct parts of the algorithm.
+
+    The constructor of Poisson hierarchy solver now requires a Poisson level
+    solver object derived from the solv_PoissonLevelStrategyX abstract base
+    class.  The level solver object provides the level-solver algorithm in 
+    use.  Currently, the only concrete implementation available is 
+    solv_PoissonHYPRESolverX.  For example, to use hier_PoissonHierarchySolverX,
+    a solv_PoissonHYPRESolverX object should be created and passed into the 
+    constructor of the hierarchy solver.
+
+(19) The geom_CartesianUserDefinedCoarsenOperatorX class has been moved to
+     the transfer package and renamed to xfer_UserDefinedCoarsenOperatorX
+     since it is independent of the coordinate system geometry.
+
+    This class serves as a place holder to distinguish between the case of a 
+    "NO_REFINE" operation and a user-supplied coarsen operation.  This 
+    operator class is necessary to produce the correct behavior for coarsen 
+    operations in some rare circumstances (probably unknown to most users!).  
+    Typical users need not concern themselves with these details and so this 
+    change should have no impact on their use of SAMRAI.
+
+(20) SAMRAI now supports HDF5 1.4.1.  Note that releases of HDF5 beyond
+     version 1.2.1 have different behavior when writing out zero length
+     arrays.  The new version of HDF on the casc cluster may be set by
+     using --with-HDF5=/home/casc/HDF5/hdf5-1.4.1 during the configure. We
+     have observed at least one degenerate case with the new version which
+     has not been completely resolved so the configured default is still
+     v 1.2.0 on the CASC cluster and LC machines.  
+
+    Also, HDF5 versions prior to 1.2.1 would create an empty HDF database
+    entry when passing an aray of length zero.  Subsequent versions do 
+    not write anything.  Developers should be aware of this when writing 
+    code to save/restore restart files and avoid saving empty arrays to
+    maintain portability.
+
+(21) The "index" patch data iterator has been simplified.
+
+    To reduce confusion regarding the use of the index patch data type,
+    the iterator has been changed.  Now, the pdat_IndexIteratorX iterates
+    through the list that contains the irregular index set.  To step through
+    the index set of a box region containing index data one whould use the
+    hier_BoxX::Iterator.  This change eliminates a rdundant class. 
+
+
+-----------------------------------------------------------------------------
+                    Details about what's new
+-----------------------------------------------------------------------------
+
+(1) Richardson extrapolation error estimation has been added for time- 
+    dependent problems. 
+
+    Class name changes are described in item number (1) above.  The 
+    document /SAMRAI/docs/RichExtrap.pdf describes in detail how to 
+    use the new Richardson extrapolation functionality and how to modify
+    existing code to use a gradient detector.
+
+(2) A new class called hier_BoundingBoxListX has been added to provide
+    a small set of "smart" boxlist operations for computing information
+    about the location of a set of boxes with respect to another collection
+    of boxes.
+
+    For example, this class can be used to avoid excessive box intersection 
+    and set subtraction operations by limiting those operations in cases 
+    when the bounding box of the box list is limited to a small portion 
+    of the domain.  This class was built to facilitate some optimizations
+    in the communication schedule construction operations, but users may find
+    it helpful in other circumstances as well.
+
+(3) A PVODE solver interface has been added to the solvers package.
+
+    The PVODE solver code is located in the directoty
+    SAMRAI/source/solvers/packages/pvode_trio/pvode.  Its use is 
+    analogous to the use of the KINSOL interface.  See the comments in
+    the PVODESolver.h header file for more details.   Like KINSOL, the 
+    PVODE interface uses the PVodeTrio vectors: PVodeTrioAbstractVector, 
+    PVodeTrio_SAMRAIVector, PVodeTrio_SAMRAIVector1, PVodeTrio_SAMRAIVector2,
+    and PVodeTrio_SAMRAIVector3.
+
+-----------------------------------------------------------------------------
+                             Major Bug Fixes 
+-----------------------------------------------------------------------------
+
+(1) The installation process for the SAMRAI library has been fixed and 
+improved.  It used to be necessary to keep a copy of the source tree
+around to make the header files available.  The header files are now
+copied over to the installation directory.  In addition, an application 
+developer no longer needs to define SAMRAI or OBJECT in his/her Makefile
+when linking to the installed version of the SAMRAI library because these
+are appropriately defined in the Makefile.config file which must be
+included in the user Makefile to define compiler options, library archive
+names, etc. 
+
+(2) Several bugs have been fixed in the communication schedules that 
+caused problems for complicated and periodic domains.  
+
+-----------------------------------------------------------------------------
+                                  Known Problems
+-----------------------------------------------------------------------------
+
+1) RedHat 7.0
+
+	This release has a couple of problems with some system header
+	files.  Depending on what patches and GCC you are using, SAMRAI
+	may not compile.  We may be able to provide workarounds if you
+	you need them.  We have not tried RedHat 7.1.
+
+=============================================================================
+=============================================================================
diff -r 000000000000 -r 5eda1a3f24e8 docs/release/version-1.2.0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/release/version-1.2.0	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,604 @@
+*****************************************************************************
+                     Release Notes for SAMRAI v1.2
+     (notes for previous releases may be found in /SAMRAI/docs/release)
+*****************************************************************************
+
+NOTE:  These release notes are more descriptive and detailed than is usual
+       for software release notes.  The reason for this is that presently
+       complete documentation does not exist for most of the items listed.
+       Until sufficient user documentation becomes available, descriptions
+       such as those that follow will be part of SAMRAI release notes.
+
+Please direct any questions related to these notes to the SAMRAI development
+team by sending email to samrai at llnl.gov.
+
+*****************************************************************************
+*****************************************************************************
+
+Where to report Bugs
+--------------------
+
+If a bug is found in the SAMRAI library, we ask that you kindly report it
+to us so that we may fix it.  We will make every effort to fix bugs
+in a timely manner.  Depending on the severity or the complexity of the
+bug, we will either fix the bug for a subsequent library release or send
+a code fix to users so that their work is minimally interrupted.
+
+LLNL users should report bugs using the CASC bug tracking web pages:
+
+        http://www-casc.llnl.gov/bugs/
+
+Enter the bug into the appropriate are of the SAMRAI project section.
+
+Bugs found by other users should send email to samrai-bugs at llnl.gov.
+
+*****************************************************************************
+
+-----------------------------------------------------------------------------
+                    Summary of what's changed
+-----------------------------------------------------------------------------
+
+This section contains a summary of changes to SAMRAI.  More detailed 
+descriptions of items in the following list are provided below.
+
+(1) Constant spatial refinement and coarsening operators have been changed
+so that the class names no longer contain the word "Cartesian". 
+
+(2) The variable database has been enhanced to allow mapping patch data 
+indices to variables without considering variable contexts.  There are
+also additional functions to add, clone, and delete descriptor indices.
+
+(3) The index integer has been removed as an argument to the constructor 
+for the variable context class.
+
+(4) Several minor changes have been made to the SAMRAI vector class for
+efficiency and to interact with the variable database directly when adding
+components, cloning and freeing vectors.
+
+(5) The plotting classes have been renamed.
+
+(6) The default C compiler has changed when using the KAI KCC compiler.
+
+(7) The registerModelVariables() method has been removed from TimeRefinement
+LevelStrategy and HyperbolicLevelIntegrator and replaced with a method called
+initializeLevelIntegrator(). The argument list has also changed.
+
+(8) A number of changes were made to the TagAndInitializeStrategy and 
+StandardTagAndInitialize classes to add functionality for re-gridding 
+operations.
+
+(9) Some changes in the transfer package have been made to avoid redundant
+calculation of overlaps between patches.
+
+(10) The functions in the HDF5 database class to check whether a key exists
+in the database and to get all keys in the database were previously broken.
+They are now all fixed.  This may affect user code that relied on the 
+broken behavior of preceding versions of SAMRAI.
+
+(11) The use of the coarsen patch strategy in the creation and usage of 
+coarsen communication schedules has changed slightly to be consistent 
+with similar recent changes in the refine communication schedules.
+
+(12) Several flags were removed from the default KCC configuration to
+enhance efficiency and portability.  As a result, however, the *.o object
+files and *.a libraries will NOT be compatible with those from previous
+releases.  Also, removal of the flags causes purify to mistakenly identify
+a number of mismatched memory calls when used with KCC.
+
+(13) The location of the latest bug-fixed installation of the libraries
+has been moved from /home/casc/software/samrai to /usr/casc/samrai.  
+
+(14) The hier_PatchHierarchy::getRatioToCoarser() method was removed.  
+
+(15) Several changes to algs_HyperbolicLevelIntegrator() to support
+applications that require three time levels.
+
+(16) Minor changes in use of tbox_IEEE::getSignalingNan() method.
+
+(17) A boolean argument was added the pure virtual function getLevelDt()
+in the abstract base class algs_TimeRefinementLevelStrategyX to indicate
+whether this routine is called at the initial simulation time. 
+
+(18) Some changes were made to interface class algs_HyperbolicPatchStrategyX.
+
+(19) The "tag value" argument has been removed from gridding routines that
+call user code and user-supplied overloaded virtual functions.
+
+(20) "Noprefix" headers for the Array, Boolean, IEEE, List, MPI, and String
+classes have been removed.
+
+(21) X11 plotting libraries are not included by default.
+
+
+-----------------------------------------------------------------------------
+                         Summary of what's new
+-----------------------------------------------------------------------------
+
+This section contains a summary of additions to SAMRAI.  More detailed 
+descriptions of items in the following list are provided below.
+
+(1) Richardson extrapolation enhanced to support refinement ratios of 3
+and interfaces to regridding classes cleaned up.
+
+(2) Combinations of tagging methods (e.g. gradient detector, Richardson
+extrapolation, and static refine boxes) may be specified in the 
+StandardTagAndInitialize class. 
+
+(3) SAMRAI code that interfaces with the PETSc library has been updated to
+be consistent with the most current version of PETSc; i.e., 2.1.0.  The new
+version is being linked to by default.
+
+(4) Limited support for building as a shared library.
+
+(5) An installation of the latest bug-fixed version of the latest release 
+on compass/tera, blue, and casc cluster is maintained in /usr/casc/samrai.
+
+(6) Support for generating source code documentation using Doxygen.
+
+(7) Added support for setting signaling NaN on IBM, compaq platforms. Also
+added new functions for setting values to NaN and checking if they are NaN.
+
+(8) Some new classes were added to make generation of Vizamrai plot files
+much easier for users.
+
+(9) Gradient detection routines in Euler/LinAdv examples were enhanced to
+allow multiple tagging options on different levels and at different times.
+
+(10) Smart pointers have been added for several algorithm classes.
+
+(11) New user documents added.
+
+
+-----------------------------------------------------------------------------
+-----------------------------------------------------------------------------
+-----------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------
+                    Details about what's changed
+-----------------------------------------------------------------------------
+
+(1) Constant spatial refinement and coarsening operators have been changed
+so that the class names no longer contain the word "Cartesian".  Also, these
+operator classes have been moved from the Cartesian geometry directories to
+the directory SAMRAI/source/geometry/generic_ops/constant.  The linear
+time interpolation operators have been moved to the directory 
+SAMRAI/source/geometry/generic_ops/time_interpolate.  Since these operators 
+do not depend on the specific properties of a mesh, they can be used with
+any geometry type.  Thus, there dependence on Cartesian geometry has been 
+eliminated.
+
+(2) The variable database has been enhanced to allow mapping patch data 
+indices to variables without considering variable contexts.  There are
+also additional functions to add, clone, and delete descriptor indices.
+Printing the contents of the database now indicates when data indices have
+been cloned and from which pre-existing components.  The new functions are: 
+registerClonedPatchDataIndex(), registerPatchDataIndex(),
+removePatchDataIndex(), and checkVariablePatchDataIndex().  The function
+registerClonedPatchDataIndex() will generate a new patch descriptor index 
+given a variable and a currently valid patch descriptor index.  The new
+variable-descriptor index pair will be added to the database.  The function
+registerPatchDataIndex() will add an existing variable-descriptor index pair 
+to the database.  The function removePatchDataIndex() will remove an existing
+patch descriptor index from the database and free the index in the patch
+descriptor.  The function checkVariablePatchDataIndex() will check the
+type of a variable against the type of a given patch descriptor index.  This
+function can be used regardless of whether the given variable or index are
+known to the database.
+
+(3) The index integer has been removed as an argument to the constructor 
+for the variable context class.  The variable context class now maintains 
+a static instance counter which assigns a unique integer identifier to 
+each context object.  Thus, it is no longer possible to have two contexts
+with the same index.  However, two contexts with the same name is allowed
+if they are not generated by the variable database.
+
+(4) Several minor changes have been made to the SAMRAI vector class for
+efficiency and to interact with the variable database directly when adding
+components, cloning and freeing vectors.  Specifically, all SAMRAI vector
+objects now share the objects that perform mathematical operations on the
+vector data rather than each vector maintaining its own set of operations.
+Also, vector creation, cloning, and freeing now uses the variable database 
+to maintain information about the mapping between vector component variables
+and the associated patch descriptor indices.  
+    
+(5) The plotting classes have been renamed to reflect the fact that they
+are 2D classes.  If you use any of the plotting classes you will need to
+change the class names and the include file names.
+
+ New name			Old name
+plot_HyperbolicPlot2            plot_HyperbolicPlot
+plot_PlotBase2                  plot_PlotBase
+plot_XWindow2                   plot_XWindow
+plot_MOLPlot2			plot_MOLPlot
+
+The plotting classes are now in a separate libraries libSAMRAI2d_plot.a 
+and libSAMRAI3d_plot.a.  If users use the LIBSAMRAI2D and LIBSAMRAI3D
+symbols from Makefile.config they should not need to change their makefiles, 
+otherwise you will need to add these to your link line.
+
+(6)  When using KCC as a compiler for C++ the default C compiler was changed
+to be the "cc" script in the KCC directory.  This should keep things
+more consistent and improve chances that C++ and C will link together
+correctly.  This should not impact the SAMRAI library itself since it does
+not use any C code but if you are using the SAMRAI makefiles this
+might change your compiler if you have some C code in your application.
+The previous default was to search for a compiler (gcc, cc).  You 
+can override the new behavior by using the --with-CC= option to configure,
+in which case the compiler you specify will be used.
+
+(7) The pure virtual function registerModelVariables() method in 
+TimeRefinementLevelStrategy was eliminated because its argument list did
+not support the needs of the Richardson extrapolation procedure. Since 
+the argument list had to change, we decided to also rename this pure virtual 
+method to better reflect its role.  The following are the old and new
+names and argument lists:
+
+Old:
+algs_TimeRefinementLevelStrategy::registerModelVariables(
+   const int max_levels,
+   const bool regrid_uses_time_integration) = 0;	
+
+New:
+algs_TimeRefinementLevelStrategy::initializeLevelIntegrator(
+   const algs_TimeRefinementIntegrator* tri,
+   const Pointer<mesh_GriddingAlgorithm> gridding_alg) = 0;
+
+A concrete implementation of this method is supplied in the 
+HyperbolicLevelIntegrator.  
+
+(8) In the last released SAMRAI version (v1.1.0), two new classes were
+introduced in the mesh package:  TagAndInitializeStrategy and 
+StandardTagAndInitialize.  These classes provided functionality for
+re-gridding using Richardson extrapolation as well as static refine
+box regions provided in the input file. However, the classes 
+lacked the capability to perform Richardson extrapolation with a 
+refinement ratio of 3 between levels, or the capability to mix static
+refine boxes with a cell tagging procedure like the gradient detector
+or Richardson extrapolation.  A number of changes were made to these
+classes to add these capabilities.   Existing interfaces between
+the level integrator and patch routines have not changed.  
+
+The main change the user will experience results from a change to 
+the constructor of StandardTagAndInitialize.  Previously, there were
+two constructors for this class; one supplied the tagging
+method by a string, the other provided tagging parameters through 
+input.  
+
+old:
+      Pointer<StandardTagAndInitStrategy> integrator = ...
+      StandardTagAndInitialize("object name",
+                               integrator,
+                               "GRADIENT_DETECTOR");
+      -or-
+      StandardTagAndInitialize("object name",
+                               Pointer<Database>,
+                               integrator);
+
+The new version of the class uses a single constructor, with the input
+database as an optional argument:
+
+new:
+      StandardTagAndInitialize("object name",
+                               integrator,
+                               Pointer<Database>); <-- optional
+                             
+If no input database is provided, the gradient detector is used.  
+Otherwise, tagging will be performed based on values provided in the
+input.
+
+(9) All of the operations registered with a particular coarsen or refine
+algorithm will be grouped in equivalence classes according to the data
+type and ghost cell width of the data that is to be transfered.  All 
+operations which use data of the same type and ghost cell width will be 
+grouped together, so that only one calculation of box overlaps is needed 
+for each group.  There are no changes to interfaces of classes involved.
+
+(10) The functions in the HDF5 database class to check whether a key exists
+in the database and to get all keys in the database were previously broken.
+They are now all fixed.   For more details, see item #1 in major bug fixes
+below.
+
+(11) The use of the coarsen patch strategy in the creation and usage of 
+coarsen communication schedules has changed slightly to be consistent 
+with similar recent changes in the refine communication schedules.
+Specifically, the coarsen patch strategy is passed to the coarsen algorithm
+when creating the schedule via the createSchedule() function and this 
+patch strategy will be used in any subsequent coarsenData() calls.  
+Previously, the patch strategy was passed into the coarsenData() routine.
+
+(12) A number of flags supplied to the KCC compiler through the SAMRAI
+configure had been depricated.  In addition, the "--no_exceptions" flag 
+prevented links to other libraries that were compiled with KCC without 
+the flag.  Consequently, we removed the  --for_init_diff_warning,
+--new_for_init, and --no_exceptions flags from the configure. 
+Comparison of library code compiled with and without these options
+reveal no detrimental effect on performance, and removal of --no_exceptions
+allows SAMRAI to be linked to other libraries such as babel and tau.
+
+Unfortunately, purify does not work well with exception handling and,
+consequently, it will tag a number of mismatched memory accesses
+when the --no_exceptions flag is not supplied.  These will not show up under
+g++ and also will not show up if --no_exceptions is supplied.  If you need 
+to purify using KCC, ADD the flag to the CXXFLAGS in Makefile.config: i.e.,
+
+   CXXFLAGS      = ... --no_exceptions ...
+
+and recompile.  Note that code compiled with the --no_exceptions flag will
+NOT link with code compiled without the flag, so it is necessary to 
+recompile the entire library.
+
+(13) When we have released versions of SAMRAI in the past, we put a 
+copy of the source and a compiled library (for the casc cluster)
+in /home/casc/software.  We experienced some problems with this 
+approach; we could not easily update the source with bug-fixes as
+users found them in the new release, users wanted compiled versions
+for more that just one architecture, and the compiled versions
+became out of date as compilers were upgraded over time.  To address
+these problems, we have adopted a new policy for users in CASC
+who wish to link to SAMRAI.  We will maintain at /usr/casc/samrai
+in the directory "SAMRAI-vX.X.X-fixes" (where X.X.X refers to the 
+release number) the source and installed versions of the library for
+solaris, alpha, and aix.  As bugs for the release are reported and 
+fixed, the source and compiled versions will be updated. 
+
+We will continue to put a copy of the source in /home/casc/software/samrai
+for each release but will not keep the compiled library there.
+
+(14) The correctness of hier_PatchHierarchy::getRatioToCoarser() 
+in previous versions was questionable.  The same functionality
+is available through methods in the hier_PatchLevel class:
+
+   hier_PatchLevel::getRatioToCoarserLevel()
+   hier_PatchLevel::getRatioToCoarserLevel()
+
+Consequently, we removed the method to avoid potential errors.
+
+(15) A number of changes were made to the HyperbolicLevelIntegrator
+class to support applications that require three time levels and
+Richardson extrapolation.  In addition to the change in the 
+registerModelVariables() method, described above in (7), the following
+changes were made to algs_HyperbolicLevelIntegratorX.C.sed:
+   
+   line 193-194: change to signaling NaN call
+   line 319:     maintain "old" time variables (in addn to "new" 
+                 and "current")
+   line 360-366: mod to reset "old" time data to "current"
+   line 491:     removed call to resetTimeDependentData from 
+                 the applyGradientDetector() method.  This is now
+                 taken care of by the TimeRefinementIntegrator.
+   line 637-660: replaced registerModelVariables() function with 
+                 initializeLevelIntegrator().  Some addnl code to 
+                 set the number of time data levels.
+   line 811:     removed "registerTimeRefinementIntegrator" method.
+   line 1194,1275,1324: patch strategy removed from argument list to 
+                        coarsenData() operation. 
+   line 1272,1318: patch strategy added to argument list for
+                   constructing schedule. 
+   line 1341-1400: a number of changes to resetTimeDependentData() method
+                   to handle 3 time data levels.
+   line 1606:      Further mods to handle 3 time data levels.
+
+
+(16) The tbox_IEEE::getSignalingNaN() methods were modified so that 
+instead of setting a supplied value to NaN, they instead return the
+signaling NaN value.  A new function setNaN() was added to perform
+the operation to set a supplied value to NaN.  The following summarizes
+the differences:  
+
+old:
+   tbox_IEEE::getSignalingNaN(double* d);  -- sets d = NaN 
+   tbox_IEEE::getSignalingNaN(float* f);   -- sets f = NaN
+
+new:
+   double d = tbox_IEEE::getSignalingNan();       -- returns NaN
+   float  f = tbox_IEEE::getSignalingFloatNan();  -- returns NaN
+   tbox_IEEE::setNaN(double* d);                  -- sets d = NaN
+   tbox_IEEE::setNaN(float* f);                   -- sets f = NaN
+   
+A number of new methods were also added.  See (7) in "what's new" below.
+
+(17) A boolean argument was added the pure virtual function getLevelDt()
+in the abstract base class algs_TimeRefinementLevelStrategyX to indicate
+whether this routine is called at the initial simulation time.  This flag 
+gives a bit more flexibility to the user when computing the timestep for 
+a level in the hierarchy.
+
+(18) Some changes were made to interface class algs_HyperbolicPatchStrategyX.
+New arguments appear in several pure virtual functions.  Specifically, 
+arguments indicating the level number of the patch and in some cases a 
+boolean flag indicating whether the routine is called at the initiali 
+simulation time have been added to the following routines: 
+computeStableDtOnPatch(), computeFluxesOnPatch(), 
+conservativeDifferenceOnPatch().
+
+Also, two functions have been added called preprocessAdvanceLevelState()
+and postprocessAdvanceLevelState().  These are optional user routines in
+that they are virtual and not pure virtual.  The "preprocess" routine
+allows a user to process any application-specific patch strategy data 
+BEFORE patches are advanced on the given level.  It is called after patch 
+boundary data is filled (i.e., ghosts) and before computeFluxesOnPatch(). 
+The "postprocess" routine allows a user to process any application-specific 
+patch strategy data AFTER patches are advanced on the given level.  It is 
+called after conservativeDifferenceOnPatch() is called and before 
+computeStableDtOnPatch().   One way in which these routines may be used is
+to compute timestep information (e.g., characteristic speeds) during the 
+flux computation and avoid potential recomputation of the same information in
+the computeStableDtOnPatch() routine.  For example, a user may keep an
+array of wave speed and/or dt information (one array entry for each level 
+in the computation) in his patch strategy class.  In the "preprocess" routine,
+this data can be initialized for the given level before it is advanced.  Then,
+in the computeFluxesOnPatch() or conservativeDifferenceOnPatch() functions
+this data can be updated for the local patches.  Next, in the "postprocess"
+routine, the user can perform a collective communication operation to 
+synchronize this information among all processors.  Finally, the user can
+use this information to return the proper time increment in the 
+computeStableDtOnPatch() routine without performing any extraneous operations. 
+
+These changes do not reflect any significant change to functionality of
+concrete user classes derived from this base class.  Rather, they provide
+additional flexibility for users by providing more detailed information about
+the state of the integration algorithm when the routines are called.
+
+(19) The "tag value" argument has been removed from gridding routines that
+call user code and user-supplied overloaded virtual functions.  This argument 
+indicated the integer value to which the cell-centered tag array entries were 
+to be set to produce refined cells.  Since this really isn't necessary and to 
+make the user interface simpler, the argument has been removed.  Now, users 
+are expected to set the integer tag values to "one" in cells where refinement 
+is desired and to "zero" where no refinement is to occur. 
+
+(20) "Noprefix" headers for the Array, Boolean, IEEE, List, MPI, and String
+classes have been removed.  This was done to avoid potential naming conflicts
+when linking against other libraries.  To use these classes, one must either
+include the "prefix version" of these classes (tbox_Array, tbox_Boolean,
+tbox_IEEE, tbox_List, tbox_MPI, and tbox_String), or typdef the names 
+explicitly.
+
+
+(21) X11 plotting libraries are not included by default.  To compile the plotting libraries you need to use the "--with-x" to the configure options.
+
+-----------------------------------------------------------------------------
+                    Details about what's new
+-----------------------------------------------------------------------------
+
+(1) The previous release provided support for performing Richardson
+extrapolation on a hierarchy for which the refinement ratio between
+all levels was a factor of two.  This release adds support for
+refinement ratios that are a factor of three.  Some minor changes 
+were made to the HyperbolicLevelIntegrator but the majority of changes 
+were to the StandardTagAndInitialize class.  Minor changes have been made to
+to interfaces to the level integrator for algorithmic flexibility during
+regridding operations.
+
+(2) The previous release (v1.1) added capability to perform Richardson
+extrapolation and to define static refine regions where refinement   
+is added. However, one had to use these methods exclusively.  It is
+now possible to set a combination of cell-tagging methods.  See the document 
+/docs/userdocs/RichExtrap.pdf for a summary of the various functions.
+
+(3) SAMRAI code that interfaces with the PETSc library has been updated to
+be consistent with the most current version of PETSc; i.e., 2.1.0.  In 
+particular, the SAMRAI-PETSc vector interface classes no longer work with
+any previous version of PETSc.  Thus, to build SAMRAI, either turn off
+PETSc at configuration, or use the latest version of PETSc.  If you are 
+linking to the SAMRAI libraries you will need to make sure you
+are getting version 2.1.0 of PETSc.  Users using the SAMRAI Makefile.config
+to get compile/link options do not need to worry about this.
+
+(4) Limited support for building as a shared library.  The "--enable-shared"
+option has been added to the configure script.  This should be considered
+beta and only users who like to go up creeks without paddles should try
+this option.  It currently is known to work only with KCC under Solaris.
+
+(5)  In /usr/casc/samrai/SAMRAI-vX.X.X-fixes (where X.X.X refers to the 
+release number) we will maintain installed versions of the bug-fixed 
+version of the library for solaris, alpha, and aix.
+
+(6)  The documentation distributed with SAMRAI is generated by Doc++,
+but there is new support for generating source code documentation using
+Doxygen.  To generate Doxygen documentation (after configuring), go to
+the docs directory and type "make dox".  To start using the generated
+documentation, browse the docs/doxygen/html/indec.html file.  Documentation
+generated with Doxygen is not as polished as the distributed documentation
+(this will probably be changed in the future).  However, much of the
+Doxygen documentation flaws are only cosmetic and it provides significantly
+greater cross-referencing than does the Doc++ documentation.  At minimum,
+the doxygen program (http://www.doxygen.org) and Perl must be available
+to generate the Doxygen documentation.  In addition having the "dot"
+program will allow you to generate nice dependency diagrams, but it is
+not required.  See "configure --help" for options to allow you to specify
+these programs, if they are in your PATH.
+
+(7) Signaling NaN's should now work on IBM, compaq platforms. In addition,
+the following new methods were added to the tbox_IEEE class: 
+   
+   tbox_IEEE::initializeArray(Array<double>& d);    --  d[n] = NaN
+   tbox_IEEE::initializeArray(Array<float>& f);     --  f[n] = NaN
+   bool tbox_IEEE::isNaN(double d);  -- is d = NaN?
+   bool tbox_IEEE::isNaN(float f);   -- is f = NaN?
+
+(8) Some new classes were added to make generation of Vizamrai plot files
+much easier for users.  Previously, users had to supply all routines for
+generating these files, including those that compute regions on each level to 
+plot and those that write all information to Vizamrai files.  Unfortunately,
+this resulted in each user application code including hundreds of lines of 
+code that were the same as that appearing in other applications.  Now, the
+majority of these Vizamrai data file generation operations are taken care
+of automatically, with minimal interaction with user code.  
+
+The new classes appear in the "Plotting" package and are named
+plot_CartesianVizamraiDataWriterX and plot_VizamraiDerivedDataStrategyX.
+Vizamrai supports cell-centered mesh data.  These classes support 
+cell-centered data where the underlying data type is either double, 
+float, or int.  Two kinds of data quantities are supported.  The first is 
+data that resides on an AMR patch hierarchy when a data file is generated.  
+The second is "derived" data that can be computed using data on an AMR patch 
+hierarchy.  The first data type requires no user intervention when generating 
+a plot file.  The second type, or "derived" data, requires that a user 
+implement a concrete class derived from the plot_VizamraiDerivedDataStrategyX 
+abstract interface.  In an overloaded function of that class, a user generates 
+the "derived" data quantity and writes it to a specified file stream.
+
+Before a Vizamrai data writer object can be used to generate Vizamrai
+data files, it must first be constructed and initialized.  Initialization
+involves things like setting information about the levels in the AMR
+hierarchy that will be plotted, setting the type of the data to write
+out (e.g., double or float), setting the directory into which plot
+files are written, and registering variable quantities to send
+to the plot file.  After initialization, the object can be used to
+generate a series of data files during the execution of a simulation
+code.  Some flexibility is allowed to change the parameters of the 
+visualization files while the code is executing.  For more detailed 
+information, and examples of how to use the new classes, please consult
+the document in the SAMRAI/docs directory.
+
+(9) The gradient detection routines in the Euler/LinAdv examples were 
+upgraded to allow users to specify multiple tagging options.  In addition,
+the various options can be specified to occur on different levels and 
+over different time periods of the simulation.  See the README in 
+the Euler or LinAdv examples for a description of the input.  
+
+(10) Smart pointers have been added for several algorithm classes.  
+Specifically, smart pointers now exist for the HyperbolicLevelIntegrator,
+TimeRefinementLevelStrategy, and StandardTagAndInitiStrategy classes.
+These are used in the sample applications and make memory management
+easier.
+
+(11) New user documents added.  These include a document discussing the
+regridding classes and providing a detailed description of the use of
+Richardson extrapolation, a document describing the use of the new Vizamrai
+data writer, and the first part of a detailed SAMRAI introduction and 
+tutorial series of presentations that Rich Hornung is putting together.
+These presentations include a lot of material based on questions, confusion
+that users have had.  Additional parts will be made available to users as 
+they are completed.  All these documents can be found in SAMRAI/docs/userdocs.
+
+-----------------------------------------------------------------------------
+                             Major Bug Fixes 
+-----------------------------------------------------------------------------
+
+(1) All errors in the HDF5 database class have been fixed.  Now, one can
+query a database at anytime, whether reading or writing, for all the 
+keys in the database, or whether a particular key exists.  These queries
+will be entirely consistent with the actual contents of the HDF5 database
+and are no longer dependent on internal state of the SAMRAI HDF5 database
+wrapper class.  Note that this may affect user code that relied on the 
+broken behavior of preceding versions of SAMRAI.  For example, if one
+set array sizes based on the number of keys in main HDF5 database, then
+these operations should be double-checked as the HDF5 database capabilities
+now correctly provide this information. 
+
+(2) 
+
+
+-----------------------------------------------------------------------------
+                                  Known Problems
+-----------------------------------------------------------------------------
+
+(1) Linux: We have seen repeatable but reare problems linking programs.
+The loader (ld) either core dumps or hangs.  This happens to two of the
+examples, but it does not appear to be affecting much else.  We are not
+sure what the problem is at this time.
+
+=============================================================================
+=============================================================================
diff -r 000000000000 -r 5eda1a3f24e8 docs/release/version-1.3.0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/release/version-1.3.0	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,467 @@
+*****************************************************************************
+  Copyright 1997-2003                                                    
+  Lawrence Livermore National Security, LLC.                            
+  All rights reserved.                                                    
+*****************************************************************************
+*****************************************************************************
+
+                     Release Notes for SAMRAI v1.3.0
+     (notes for previous releases may be found in /SAMRAI/docs/release)
+*****************************************************************************
+
+NOTE:  These release notes are more descriptive and detailed than is usual
+       for software release notes.  The reason for this is that presently
+       complete documentation does not exist for most of the items listed.
+       Until sufficient user documentation becomes available, descriptions
+       such as those that follow will be part of SAMRAI release notes.
+
+Please direct any questions related to these notes to the SAMRAI development
+team by sending email to samrai at llnl.gov.
+
+*****************************************************************************
+*****************************************************************************
+
+Where to report Bugs
+--------------------
+
+If a bug is found in the SAMRAI library, we ask that you kindly report it
+to us so that we may fix it.  We will make every effort to fix bugs
+in a timely manner.  Depending on the severity or the complexity of the
+bug, we will either fix the bug for a subsequent library release or send
+a code fix to users so that their work is minimally interrupted.
+
+LLNL users should report bugs using the CASC bug tracking web pages:
+
+        http://www-casc.llnl.gov/bugs/
+
+Enter the bug into the appropriate are of the SAMRAI project section.
+
+Bugs found by other users should send email to samrai-bugs at llnl.gov.
+
+*****************************************************************************
+
+-----------------------------------------------------------------------------
+                    Summary of what's changed
+-----------------------------------------------------------------------------
+
+This section contains a summary of changes to SAMRAI.  More detailed 
+descriptions of items in the following list are provided below.
+
+(1) Minor changes to HyperbolicLevelIntegrator class for added flexibility.
+
+(2) The Vizamrai plot file data write class has been enhanced to allow 
+a plot quantitiy to live at different patch data indices on different levels.
+
+(3) Minor changes to method names in IEEE class.
+
+(4) Some basic parallel support classes for communication schedules and
+message streams have been moved around and renamed.
+
+(5) Operators in the geometry package (geom_*ConstantRefineOp*
+and geom_*LinearTimeInterpolateOp*) were moved to the patchdata package
+to avoid dependencies that arose in the library link.  
+
+(6) Synchronized time integration has been added to the
+TimeRefinementIntegrator.
+
+(7) Templated data types used in the index patch data now require an
+additional copy function, and function to write and and retrive data to
+and from the restart database.
+
+(8) The level number information in the Patch and PatchLevel classes has 
+changed so that know about their relationship to other levels in a hierarchy.
+
+(9) As a result of (8), the level number argument has been removed from
+several interfaces to user patch routines.
+
+(10) The default behavior of StandardTagAndInitialize has been modified
+to apply NO tagging if no input file entry is supplied (formerly, it 
+applied gradient detector if no input was provided).
+
+(11) The "Plotting" package has been removed and its contents have 
+been added to the new "Application Utilities" package.
+
+(12) Doc++ is no longer the official documentation generator for SAMRAI.
+Doxygen is.  The code documentation is now in a separate tarball.
+
+(13) The set of applications in SAMRAI/source/applications has moved to 
+a new examples directory in SAMRAI/examples. 
+
+----------------------------------------------------------------------------
+                         Summary of what's new
+-----------------------------------------------------------------------------
+
+This section contains a summary of additions to SAMRAI.  More detailed 
+descriptions of items in the following list are provided below.
+
+(1) Example implementation of C boundary conditions in the ConvDiff example 
+    application.
+
+(2) Performance visualization using the Tau package from the University
+    of Oregon.
+
+(3) New support for generating run-time statistics in parallel has been added. 
+
+(4) New iterator associated with pdat_ArrayData class.
+
+(5) Some enhancements to Uniform and NonUniform load balance classes.  
+
+(6) A new package "Application Utilities" has been added. 
+
+(7) New support for solving linear systems using FAC.
+
+(8) A new "examples" directory has been added.
+
+(9) A more efficient implementation of generating communication 
+    schedules has been added to the xfer_RefineSchedule class.
+
+(10) A more efficient implementation of the Berger-Rigoutsos clustering
+     algorithm has been added to the mesh_BergerRigoutsos class.
+
+-----------------------------------------------------------------------------
+-----------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------
+                    Details about what's changed
+-----------------------------------------------------------------------------
+
+(1) Minor changes to HyperbolicLevelIntegrator class for added flexibility.
+In particular, all private data members have been changed to protected to 
+facilitate specialization of the member functions via inheritance.  Also,
+utility functions have been added that return variable context objects used
+by the integrator.  Thus, the plot context argument was removed from the
+registerModelVariables() function in the hyperbolic patch strategy class.
+See the Euler example application code for more details.
+
+(2) The Vizamrai plot file data write class has been enhanced to allow  
+a plot quantitiy to live at different patch data indices on different levels.
+Calling the member function resetLevelPlotVariable() in the Cartesian
+Vizamrai data write class redefines the patch data index for a given 
+variable on a given level.  Before this function is called, the variable 
+must be registered using the registerPlotVariable() function as before.
+For more information, see the plot_CartesianVizamraiDataWriterX class 
+header file or the Vizamrai-writer.pdf document in the SAMRAI/docs/userdocs
+directory.
+
+(3) The method tbox_IEEE::initializeArray() has been changed to 
+tbox_IEEE::initializeArrayToSignalingNaN() in order to be more explicit about
+its function.
+
+(4) Some basic parallel support classes for communication schedules and
+message streams have been moved around and renamed.  Two new subdirectories
+"parallel" and "stream" have been created in the toolbox package.  The 
+schedule and transaction classes that were previously in the transfer package
+have been moved to the parallel subdirectory.  The tbox_MPI class has also
+been moved there from the toolbox/base directory.  The AbstractStream class
+that previously existed in the hierarchy package and the file, message, and
+XDR stream classes that previously existed in the transfer package are now
+located in the stream subdirectory.  This new organization does not violate
+any of the package dependencies and increases the flexibility of using these
+classes in the SAMRAI library.  Most users need not concern themselves
+with these changes.
+
+(5) Mesh-independent operators have been moved from the geometry package
+to the patch data package, resulting in changes to the class and file names.  
+These operators, which were formerly in a directory "generic_ops" in the
+geometry package, are distinct in that they do not depend on the mesh 
+configuration and may therefore be used inside various algorithms used 
+for meshing that apply independent of the type of mesh used.  By being 
+included with the geometry package, a dependency was introduced between 
+the mesh package and the geometry package.  This broke the package 
+dependency framework used in SAMRAI and caused problems at link time.  We 
+moved the two mesh-independent operators - constant refine and linear time 
+interpolation - out of the "generic_ops" directory in the geometry package 
+and into the "operators" directory in patchdata.  Class names have changed 
+to reflect the new package.  Specifically, all files named 
+"geom_<type>ConstantRefineOp*d" and "geom_<type>LinearTimeInterpolateOp*d" 
+(where <type> indicates a combination of centering and data type e.g. 
+CellDouble) have been prepended with "pdat_*" in place of "geom_*".
+
+(6) Synchronized time integration has been added to
+algs_TimeRefinementIntegrator.  With this mode of time integration, each
+level of the hierarchy is advanced by the same timestep, which is the
+smallest timestep calculated on all of levels.  The regular time refinement
+mode, with subcycling on finer levels remains.  The mode that
+algs_TimeRefinementIntegrator will use is determined by the level_integrator
+argument in the constructor.  level_integrator is of type
+algs_TimeRefinementLevelStrategy, which now has the pure virtual boolean
+method usingRefinedTimestepping(), which now must be defined in the integrator
+classes that are derived from this strategy.  algs_HyperbolicLevelIntegrator
+is an instantiation of algs_TimeRefinementLevelStrategy, and has been
+modified to work with either mode of time refinement, determined by an
+optional boolean argument in the constructor, which will determine the
+return value of usingRefinedTimestepping().  It defaults to the already-
+existing form of time refinement.  User-defined level integrators
+derived from algs_TimeRefinementLevelStrategy will need to have
+usingRefinedTimestepping() added, but will not need to work with both
+modes of time refinement, unless desired by the user.
+
+(7) The templated type used in index patch data already must have several
+functions, described in SAMRAI/source/patchdata/index/README, and now
+must add the function copySourceItem.  This function takes a source item of
+the templated type, the Index where the item is located, and an offset
+IntVector that describes a periodic shift.  In the new function the source
+item will be copied to a new destination item, but if the templated type
+contains data that depends on the location of the item, and the offset is
+nonzero, then the new function should adjust the data to the location of the
+destination item, which is the location of the source item plus the offset.
+The Database functions take an index argument and a database argument.  The
+put function should write the data contained in the templated item at the
+index location to the database, and the get function should retrieve the
+data from the database and append it to the IndexData object.  The put and
+get functions can be made blank placeholders if there is no need to save
+the IndexData in restart files.
+
+(8) The level number information in the Patch and PatchLevel classes has 
+changed so that know about their relationship to other levels in a hierarchy.
+The level class now has three pieces of information that provide users
+with information in this regard, the level number, the next coarser hierarchy
+level number, and a boolean value indicating whether the level is in a 
+hierarchy.  
+
+The level number returned by the Level::getLevelNumber() function (and set by 
+Level::setLevelNumber()) is the number of the level in a hierarchy, or the 
+number of a hierarchy level matching the index space of the level.  If the 
+level does not align with the index space of a level in the hierarchy, 
+then the value is -1.  When the level is in a hierarchy, the return value 
+is the number of the level in the hierarchy. 
+
+The level number returned by the Level::getNextCoarserHierarchyLevelNumber() 
+function (and set by Level::setNextCoarserHierarchyLevelNumber()) is the 
+number of the the next coarser level in a hierarchy for the purposes of data 
+interpolation from coarser levels.  If the level is in a hierarchy, then 
+this value is Level::getLevelNumber() - 1.   
+
+The function Level::inHierarchy() returns true when the level resides in 
+a hierarchy and false otherwise.
+
+Similarly, the Patch class has methods inHierarchy() and getPatchLevelNumber()
+that return the value for the associated function of the level that owns
+the patch.
+
+These functions are helpful to users who need to understand how a level 
+relates to the rest of the hierarchy, especially when the level is some
+temporary level used to communicate data on the hierarchy.
+
+(9) As a result of (8), the level number argument has been removed from
+several interfaces to user patch routines.  
+
+The level number argument has been removed from the following 
+HyperbolicPatchStrategy functions:
+
+   initializeDataOnPatch()
+   computeStableDtOnPatch()
+   computeFluxesOnPatch()
+   conservativeDifferenceOnPatch()
+   tagGradientDetectorCells()
+
+The level can be obtained using patch.getPatchLevelNumber() for user
+implementations of these routines.  The level number has been preserved
+for the routine tagRichardsonExtrapolationCells().  See the linear 
+advection and Euler example problems for details.
+
+The level number argument has been replaced with a pointer to the level
+for  the following HyperbolicPatchStrategy functions:
+
+   preprocessAdvanceLevelData()
+   postprocessAdvanceLevelData()
+
+See (8) above for more information about how to see how the level to
+be advanced relates to others in the hierarchy.
+
+The level number argument has been removed from the function 
+VizamraiDerivedDataStrategy::writeDerivedDataToStream().
+
+(10) In previous versions of SAMRAI, the StandardTagAndInitialize class
+automatically applied gradient detector as the default cell tagging criteria 
+if users did not supply an input file entry.  This was done primarily
+to preserve the functionality of the former GradientDetector class, which
+StandardTagAndInitialize replaced and which did not require an input file
+entry.  As users have adopted StandardTagAndInitialize, cases have arisen
+where a user wishes to turn off all tagging.  Rather than supplying a way
+for the user to turn off the default tagging criteria, we decided a better 
+solution is to make no tagging the default case and allow users to 
+turn on whatever criteria they wish through input.  Hence, if no 
+"tagging_method" input entry is supplied to the StandardTagAndInitialize 
+class, no tagging will be performed.  A warning is output to the log file 
+in this case.
+
+(11) The "Plotting" package has been removed and its contents have 
+been added to the new "Application Utilities" package.  The X windows
+utilities and Vizamrai file writer classes can now be found in that new
+package.
+
+(12) SAMRAI source code documentation is now done using Doxygen instead of
+Doc++.  Doxygen has many features not supported by Doc++, such as better
+cross referencing, provision for application documentation to link to
+library documentation and greater flexibility.  The generated documentation
+is so big that it is no longer shipped with the SAMRAI source code.
+It has been taken out and placed in its own package which can be found
+where the SAMRAI source code is placed.  If you prefer,
+you can regenerate the documentation any time by making "dox" in the docs
+subdirectory.  Regenerating the documentation requires that you have
+Doxygen (http://www.doxygen.org/) installed.  See configure's help message
+for optional flags affecting the generation of Doxygen documentation.
+
+(13) The location of some example applications problems in 
+SAMRAI/source/applications was somewhat confusing because users had
+to go into the SAMRAI source directory to locate them.  Also, the
+source code and executable were in different locations;  the
+applications were compiled in an "objects" directory while the
+source code was located in the SAMRAI source. We decided to add a new
+directory called "examples" (i.e. SAMRAI/examples) where we put
+all example applications and any new examples as they are developed.
+The three applications formerly in SAMRAI/source/applications - Euler, 
+LinAdv, and ConvDiff - are now located in SAMRAI/examples.  
+-----------------------------------------------------------------------------
+                    Details about what's new
+-----------------------------------------------------------------------------
+
+(1) An example implementation of boundary conditions implemented in C is  
+provided in the ConvDiff example application.  Fortran implementations of  
+the BCs still exist and are the default.  Functionality of the C and Fortran
+methods is identical.  The C implementation is provided as an example for 
+users who wish to use C instead of Fortran. To enable C boundary conditions,
+set -DCBOUNDARIES in the CPPFLAGS_EXTRA in the Makefile for the application.
+
+(2) The Tuning and Analysis Utilities (TAU) package out of the University
+of Oregon (http://www.acl.lanl.gov/tau/) provides the capability   
+to visualize application performance.  This is particularly useful for
+parallel runs because it can clearly indicate areas of load imbalance
+or high communication overhead.  It has been integrated with the
+SAMRAI timers. Thus, an application that already uses timers requires
+only two steps to utilize Tau; 1) add the "--with-TAU=.." argument to the 
+SAMRAI configure line, and 2) add two lines to your main().  A full description 
+of the use of Tau and the type of information it provides is included in 
+the document SAMRAI/docs/userdocs/Timing-Instrumentation.pdf.  Please 
+direct any questions or comments to samrai at llnl.gov.
+
+(3) New support for generating run-time statistics in parallel has been added. 
+The support for statistics is complementary to the timers in the library.
+While timers can be used to record execution timing information for portions
+of code, the statistics can be used to record information about the problem
+being run, such as the number of mesh cells on a hierarchy level, the number 
+of particles on a patch or processor, the total mass on a processor, etc.
+The statistic classes can be used to record any information on a processor-by-
+processor or patch-by-patch basis in parallel.  Then, a statistician tool
+is provided to gather the distributed information to processor zero where
+it can be queried, written to a file, etc.  See the tbox_Statistic and
+tbox_Statistician classes in the toolbox package for more information.
+
+
+(4) Class pdat_ArrayDataIterator has been added to provide a C++ iterator to
+move through pdat_ArrayData objects.  Like other iterators in SAMRAI,
+a typedef has been created so that it can be referred to by the name
+pdat_ArrayDataX<TYPE>::Iterator rather than the explicit class name.
+
+(5) A more efficient scheme has been added to the UniformLoadBalance class
+for the case where the domain can be represented as a single box. The 
+class used to automatically assign the number of processors in each direction 
+to be the sqare root (cube root in 3D) of the total number of processors if 
+no processor decomposition was specified in the input.  This caused 
+inefficiencies on skewed domains.  The new algorithm breaks up the domain 
+according to the dimensions of the box. For example, with a domain of 10x40 
+on 4 processors, the old algorithm divided the domain into 2x2 processors 
+generating 4 patches of size 5x20.  The new algorithm divides the domain 
+into 1x4 processors, generating 4 patches of size 10x10.  The 
+NonUniformLoadBalance class was modified to enforce the same constraints as
+the UniformLoadBalance class and allow one to set a "weight" value as a 
+data member on the hierarchy.  Hence, it is now capable of running non-uniform
+problems.
+ 
+(6) A new package "Application Utilities" has been added. This package
+contains the X window plotting tools and the Vizamrai data file 
+generation support, which were previously housed in the "Plotting"
+package.  The "Plotting" package has been removed.  The new 
+Application Utilities package also contains some facilities for
+implementing physical boundary conditions.  The classes make it much 
+easier to process input and implement simple boundary conditions like 
+FLOW, REFLECT, DIRICHLET, and NEUMANN.   An example program illustrating
+the use of the boundary utilities is located in the new SAMRAI/examples
+directory.  The example application codes also provide illustrations of
+how these new capabilities can be used. 
+
+(7) New support for linear solves using the FAC algorithm.  See the classes
+solv_FACPreconditionerX and solv_FACOperatorStrategyX for details.
+
+(8) We have added a new directory SAMRAI/examples which contains example
+applications.  Unlike the the former applications directory (i.e. 
+SAMRAI/source/applications) the examples directory contains source code
+and Makefiles in the same location.  Currently, the examples directory 
+contains various cases that were formerly in SAMRAI/source/applications
+and SAMRAI/source/test.  New examples will be added to this directory
+as they are developed, in future releases.
+
+(9) A new more efficient implementation of generating communication 
+schedules has been added to the xfer_RefineSchedule class.  The new
+algorithm uses a graph that is constructed between the boxes of 
+the two levels in which a schedule is being constructed. We have tested
+this on our example problems and on benchmark cases up to 512 processors.
+However, as with any new algorithm, user cases may expose bugs that we
+did not catch.  If at any point during a run the following error message 
+is printed:
+
+   SAMRAI internal error ...
+   in xfer_RefineScheduleX::finishScheduleConstruction() -- 
+   No coarser levels...could not fill from coarser.
+
+it could be due to a problem with the new RefineSchedule formulation.  It
+is possible to revert to the old communication schedules by doing the 
+following:
+
+   1.  Add this entry to your input file:
+       SAMRAIManager {
+          use_new_comm_sched = FALSE
+       }
+
+   2.  In your main program, add the line 
+          SAMRAIManager::getFromInput(input_db); 
+       where "input_db" is the main input file that contains the 
+       SAMRAIManager entry.
+
+If you find this error, please report it to samrai at llnl.gov so we can
+address the problem.
+
+(10) A more efficient implementation of the Berger-Rigoutsos clustering
+     algorithm has been added to the mesh_BergerRigoutsos class.  
+     We have tested this on our example problems and on benchmark cases 
+     up to 512 processors.  However, as with any new algorithm, user cases 
+     may expose bugs that we did not catch.  If a bug is suspected, 
+     we recommend you restart the problem after reverting to the 
+     old implementation.  It is possible to revert to the old clustering 
+     algorithm by doing the following:
+
+   1.  Add this entry to your input file:
+       SAMRAIManager {
+          use_old_method_for_clustering = TRUE
+       }
+
+   2.  In your main program, add the line
+          SAMRAIManager::getFromInput(input_db);
+       where "input_db" is the main input file that contains the
+       SAMRAIManager entry.
+
+If your symptoms change after making this reversion, please report the
+details to samrai at llnl.gov so we can address the problem.
+Please note that the old clustering algorithm is always used when 
+programs are executed with a single MPI process.
+
+-----------------------------------------------------------------------------
+                             Major Bug Fixes 
+-----------------------------------------------------------------------------
+
+(1) 
+
+(2) 
+
+(3)
+
+
+-----------------------------------------------------------------------------
+                                  Known Problems
+-----------------------------------------------------------------------------
+
+(1) 
+
+=============================================================================
+=============================================================================
diff -r 000000000000 -r 5eda1a3f24e8 docs/release/version-1.4.0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/release/version-1.4.0	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,483 @@
+*****************************************************************************
+  Copyright 1997-2010                                                    
+  Lawrence Livermore National Security, LLC.                            
+  All rights reserved.                                                    
+*****************************************************************************
+*****************************************************************************
+
+                     Release Notes for SAMRAI v1.4.0
+     (notes for previous releases may be found in /SAMRAI/docs/release)
+*****************************************************************************
+
+NOTE:  These release notes are more descriptive and detailed than is usual
+       for software release notes.  The reason for this is that presently
+       complete documentation does not exist for most of the items listed.
+       Until sufficient user documentation becomes available, descriptions
+       such as those that follow will be part of SAMRAI release notes.
+
+Please direct any questions related to these notes to the SAMRAI development
+team by sending email to samrai at llnl.gov.
+
+*****************************************************************************
+*****************************************************************************
+
+Where to report Bugs
+--------------------
+
+If a bug is found in the SAMRAI library, we ask that you kindly report it
+to us so that we may fix it.  We will make every effort to fix bugs
+in a timely manner.  Depending on the severity or the complexity of the
+bug, we will either fix the bug for a subsequent library release or send
+a code fix to users so that their work is minimally interrupted.
+
+LLNL users should report bugs using the CASC bug tracking web pages:
+
+        http://www-casc.llnl.gov/bugs/
+
+Enter the bug into the appropriate area of the SAMRAI project section.
+
+Bugs found by other users should send email to samrai-bugs at llnl.gov.
+
+*****************************************************************************
+
+-----------------------------------------------------------------------------
+                    Summary of what's changed
+-----------------------------------------------------------------------------
+
+This section contains a summary of changes to SAMRAI.  More detailed 
+descriptions of items in the following list are provided below.
+
+(1) GNU C++ 3.2 and 3.3 support was added.
+
+(2) The configure script no longer looks for the KCC compiler by default.  
+It must be explicitly specified in the configure as "--with-CXX=KCC".
+
+(3) Minor changes to case of configure options to make them consistent
+(e.g. --with-TAU is now --with-tau)
+
+(4) To accommodate the new Vizamrai vector plotting capabilities 
+(see what's new below), the registration routines in the Vizamrai data 
+writer class have changed. 
+
+(5) The implementation of hier_PatchLevelX::Iterator was changed to
+improve efficiency.
+
+(6) A floating point precision argument was added to print routines for
+all array-based patch data types.
+
+(7) A floating point precision argument was added to print routines for
+statistic and statistician.
+
+(8) All input entries supplied to the "SAMRAIManager {...}" input section 
+should now be supplied by the "GlobalInputs{...}" input entry.  The 
+SAMRAIManager::getFromInput() is no longer needed. 
+
+(9) Copy operations were filled in outerface and outerside data to copy from 
+side to outerside and face to outerface directly.
+
+(10) The interfaces of two methods in the HyperbolicLevelIntegrator class
+have changed:  getLevelDt() and initializeLevelIntegrator().
+
+(11) Additional arguments were added to the interfaces of three methods 
+of the GriddingAlgorithm: makeFinerLevel(), regridAllFinerLevels(), and 
+regridFinerLevel().   
+
+(12) Changes were made to the mesh_TagAndInitializeStrategy and 
+mesh_StandardTagAndInitialize classes to incorporate dynamic refinement
+based on user-specified boxes (see item 5 in what's new below) and to 
+fix some problems in the Richardson extrapolation algorithm. 
+
+(13) Made changes to SAMRAIVectorReal math operations to extend to ghost
+cells: the bool interior_only argument is added to many operations,
+defaulting to false (the old behavior).
+
+(14) Modified the VizamraiDerivedDataStrategy to support both
+Vizamrai and VisIt data formats.  See item 7 under what's new.
+
+(15) The constructors for the Euler, LinAdv, and ConvDiff example
+applications have been modified.  They no longer take a CartesianVizamraiDataWriter
+object as an argument.  Rather, users explicitly register either a Vizamrai
+and/or VisIt data writer so that either package, or both, may be
+used to write visualization data. 
+
+(16) Support for PETSc-2.1.6.  Interoperation with older PETSc versions
+may or may not work.
+
+
+
+----------------------------------------------------------------------------
+                         Summary of what's new
+-----------------------------------------------------------------------------
+
+This section contains a summary of additions to SAMRAI.  More detailed 
+descriptions of items in the following list are provided below.
+
+(1) Vector data can be written to visualization files.
+
+(2) Some new methods were added to the solv_PoissonHierarchySolver and 
+solv_PoissonHYPRESolver classes.
+
+(3) For consistency with the xfer_RefinePatchStrategyX class, the pure virtual
+function getCoarsenOpStencilWidth() was added to the xfer_CoarsenPatchStrategyX
+class.
+
+(4) Routines have been added to the refine algorithm/schedule classes and the
+coarsen algorithm/schedule classes that allow one to reset the data transfer
+transactions in a previously created schedule to operate on different patch
+data objects without recomputing the communication schedules.
+
+(5) The capability for the user to specify dynamic refinement with
+prescribed boxes was added. A new input format is required for this 
+added capability - see the mesh_TagAndInitializeStrategyX.h for a 
+description and example of the new format.  Although users are encouraged 
+to start using the new format, the old input format for static refine boxes 
+is also supported.
+
+(6) New cell-centered Poisson solvers are in sources/solvers/poisson.
+These use second-order, central-differences and support Robin boundary
+conditions which can be specialized to Neumann and Dirichlet bc's.
+The multi-level solver uses the FAC algorithm in sources/solvers/FAC.
+Users are encouraged to use these solvers instead of older ones in
+source/solvers/OLD.FAC.  In the next release, the solvers in OLD.FAC
+will be removed!
+
+(7) Support for the VisIt visualization package has been added 
+through the VisItDataWriter class.  Use of this class is very similar
+to the CartesianVizamraiDataWriter.
+
+(8) Basic communication functionality for multiblock domains has been added
+for 2D problems only.
+
+(9) Uniform and nonuniform load balance capabilities have been rewritten.
+
+-----------------------------------------------------------------------------
+-----------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------
+                    Details about what's changed
+-----------------------------------------------------------------------------
+
+(1) GNU C++ 3.2 and 3.3 support was added.  Some minor fixes where needed to 
+suppress warning messages and complex template functions where not being 
+instantiated.
+
+(2) 
+
+(3)
+
+(4) To accommodate the new Vizamrai vector plotting capabilities, the
+registration routines in the Vizamrai data writer class have changed.
+The current set of routines are registerPlotScalar()/registerPlotVector()
+and registerDerivedPlotScalar()/registerDerivedPlotVector() for scalar/vector
+regular and derived plot quantities, respectively.   Registration of 
+plot quantities is essentially the same as before except that the new 
+function names must be used.  
+
+The argument list for the user-supplied function writeDerivedDataToStream()
+has changed to accommodate vector data (see appu_VizamraiDerivedDataStrategyX 
+class header documentation).  Users wishing to write out their own scalar 
+quantities can proceed as before.  When writing derived vector data, 
+each vector component must be written out separately on the box region; 
+e.g., all component zero values on the box, then all component one values 
+on the box, and so on.
+
+See the document Vizamrai-writer.pdf in the SAMRAI/docs/userdocs directory
+for more details.  Also, consult the Euler sample application where total 
+momentum has been added as a plot quantity to illustrate the generation of a 
+derived vector quantity.  
+
+(5)
+
+(6) A floating point precision argument was added to print routines for
+all array-based patch data types.  If no argument is provided to the print 
+calls, the default setting is in effect.  This is 12 decimal places for
+double and complex types and 6 decimal places for float types.  The argument
+is ignored for other types.
+
+(7) A floating point precision argument was added to print routines for
+statistic and statistician.  If no argument is provided to the print
+calls, the default setting is in effect which is is 12 decimal places.
+
+(8) In versions 1.3.1 and before, users could supply certain globally
+applicable inputs to the SAMRAIManager by adding a "SAMRAIManager{...}"
+entry to their input file, and adding SAMRAIManager::getFromInput()
+to their main code.  We made some changes to eliminate the 2nd step by
+moving the functionality to the InputManager.  Since it was 
+counter-intuitive to have InputManager read SAMRAIManager input,
+we changed the lookup name to "GlobalInputs".  The only change the user 
+must should see is it will be necessary to replace any instances of 
+"SAMRAIManager{...}" input entries in input files from v1.3.1 and before
+with "GlobalInputs{...}". The names of the input entries inside the
+GlobalInputs{} database will be the same as the former SAMRAIManager{}.
+
+(9)
+
+(10) The HyperbolicLevelIntegrator::getLevelDt() method no longer takes 
+"recompute_dt" as one of its arguments.  In versions 1.3.1 and before,
+this flag could be set false and the dt would be accessed from the 
+TimeRefinementIntegrator.  We removed the pointer to the TRI from the
+HLI because it created strange dependencies.  With this change, the
+initializeLevelIntegrator() method no longer takes a 
+pointer to the time refinement integrator as one of its arguments.
+
+(11) Additional arguments were added to the interfaces of three methods 
+of the GriddingAlgorithm: makeFinerLevel(), regridAllFinerLevels(), and 
+regridFinerLevel().  The added arguments supply time information that
+is used in the Richardson extrapolation algorithm and the defaulted
+arguments can be ignored if not using this algorithm.
+
+(12) A number of changes were made to the mesh_TagAndInitializeStrategy 
+and mesh_StandardTagAndInitialize classes.  First, static refine box 
+specification was moved from StandardTagAndInitialize to the 
+TagAndInitializeStrategy.  Support for dynamic refinement with user-specified 
+boxes was added.  See item 5 in what's new above for more information.  
+Second, the interfaces to tagCellsForRefinement() and 
+preprocessErrorEstimation() were modified to add the "regrid_start_time" 
+argument.  This is used for only Richardson extrapolation and is defaulted 
+zero for cases where Richardson extrapolation is not used.  
+
+(13)
+
+(14) The VizamraiDerivedDataStrategy class was renamed to 
+"VisDerivedDataStrategy" so that it may support both Vizamrai
+and VisIt data formats.  Within this class, the method name
+"writeDerivedDataToStream()" was also changed.  Instead of 
+writing to a stream (which was not a recognized format in VisIt), 
+it now packs data to a double buffer (*dbuffer). To avoid confusion,
+the method name was changed to "packDerivedDataIntoDoubleBuffer()".
+Also, the return type was changed from void to bool; the boolean
+return value specifies whether derived data exists on the patch
+or not, providing the capability to write out data on selected
+patches.
+
+The functionality of the new method is largely the same.  Generally,
+the way this method was used in the past was 1) create a temporary 
+double or float buffer, 2) fill the buffer with data, 3) pack the 
+buffer into the stream.  The new functionality eliminates steps 1 
+and 3. It operates only on double data so the user does not have 
+to determine which type to write to. Also, it supports both
+the CartesianVizamraiDataWriter and the VisItDataWriter classes
+so the user does not have to inheret from two classes and supply 
+two different methods. See the SAMRAI/examples/Euler case for an 
+example implementation. 
+
+(15) The constructors for the Euler, LinAdv, and ConvDiff example
+applications have been modified.  They no longer take a CartesianVizamraiDataWriter
+object as an argument.  The reason for this modification is that we've
+added support for VisIt (see item 7) and we wanted to provide the
+capability for users to use either Vizamrai, VisIt, or both to the
+applications codes.  Thus, instead of passing in a writer to the
+application, we added the methods "registerVizamraiDataWriter()" 
+and "registerVisItDataWriter()" which allow the user to register
+the data writer(s) they would like to used.  The old functionality:
+
+   Euler* euler = new Euler(name, input_db, viz_writer);
+
+which passed in a CartesianVizamraiDataWriter object to the 
+constructor can be duplicated by simply registering the viz writer
+after the object is constructed:
+
+   Euler* euler = new Euler(name, input_db);
+   euler->registerVizamraiDataWriter(viz_writer);
+
+If you prefer to use VisIt, simply register a VisItDataWriter object
+instead.  You can also register both, in which case both Vizamrai
+and VisIt data will be written.  See the SAMRAI/examples/Euler 
+application for example usage. 
+
+(16) Support for PETSc-2.1.6.  Interoperation with older PETSc versions
+may or may not work.  To enable interoperation with PETSc's SNES
+class, PETSc-2.1.6 is required.  Older PETSc versions may work but
+are not guaranteed and not supported.  (The SNES class from older
+versions definitely will NOT work.)
+
+
+-----------------------------------------------------------------------------
+-----------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------
+                    Details about what's new
+-----------------------------------------------------------------------------
+
+(1) Vectors data can be written to visualization files.  The SAMRAI
+viz writer class has a new method call (registerPlotVector) which adds
+a vector quantity, it looks just like the existing method call but you
+don't specify the depth.  As an example you used to have to do this:
+
+d_viz_writer->registerPlotVariable("X Velocity",
+                                    vardb->mapVariableAndContextToIndex(
+                                    d_velocity, d_plot_context),
+                                    0);
+d_viz_writer->registerPlotVariable("Y Velocity",
+                                    vardb->mapVariableAndContextToIndex(
+                                    d_velocity, d_plot_context),
+                                    1);
+
+Now you can do this:
+
+d_viz_writer->registerPlotVector("Velocity",
+                                  vardb->mapVariableAndContextToIndex(
+                                  d_velocity, d_plot_context));
+
+This will write out all of the components of the velocity.  Vector data
+can be viewed using the Vizamrai tool in two different ways, either as 
+individual scalar components (as before) or as a vector field.  See the
+Vizamrai interface for more information.
+
+(2) The following new methods were added to the PoissonHierarchySolver 
+class:
+       double solv_PoissonHierarchySolver::getConvergenceError()
+       double solv_PoissonHierarchySolver::getConvergenceRate()
+
+to return the convergence error and rate of the solve.  The following
+new methods were added to the PoissonHYPRESolver to allow the user
+to set the number of pre and post relax steps for the HYPRE solve:
+
+       void solv_PoissonHYPRESolver::setNumPreRelaxSteps(int steps)
+       void solv_PoissonHYPRESolver::setNumPostRelaxSteps(int steps)
+       int  solv_PoissonHYPRESolver::getNumPreRelaxSteps()
+       int  solv_PoissonHYPRESolver::getNumPostRelaxSteps()
+
+If these methods are not called, one pre and post relax step is used, 
+which is the default behavior from previous SAMRAI versions. Also,
+to assist in debugging the HYPRE solves, the following method was
+added: 
+
+       void solv_PoissonHYPRESolver::setPrintSolverInfo(bool print)
+
+If "print" is true, it invokes HYPRE's print methods to dump matrix
+and right-hand-side information to file.  See the header comments
+for more information. 
+
+(3) For consistency with the xfer_RefinePatchStrategyX class, the pure virtual
+function getCoarsenOpStencilWidth() was added to the xfer_CoarsenPatchStrategyX
+class.  The returned hier_IntVectorX indicates the maximum stencil width of the 
+user-defined coarsen operations implemented by the class derived from 
+xfer_CoarsenPatchStrategyX.
+
+(4) Routines have been added to the refine algorithm/schedule classes and the
+coarsen algorithm/schedule classes that allow one to reset the data transfer
+transactions in a previously created schedule to operate on different patch
+data objects without recomputing the communication schedules.  This functionality
+is particularly useful for making multiple data communication operations much more
+efficient when similar data is moved during each communication phase since the
+data communication dependencies in the schedule do not have to be recomputed.
+
+An example of how this functionality is used with refine algorithms/schedules
+is as follows (coarsen algorithm/schedule functionality is similar):
+
+   // Create refine algorithm object
+   xfer_RefineAlgorithm my_algorithm;
+
+   // Register some data transfer operations with the algorithm
+   my_algorithm.registerRefine(my_dst0, my_src0, my_scratch0, my_refop0);
+   my_algorithm.registerRefine(my_dst1, my_src1, my_scratch1, my_refop1); 
+   // etc....
+
+   // Create communication schedule
+   tbox_Pointer<xfer_RefineSchedule> my_schedule = my_algorithm.createSchedule(...);
+
+   // Move data with the schedule
+   my_schedule->fillData(...);
+
+
+   // Standard usage of refine algorithm/schedule classes is illustrated up
+   // to this point.  Now suppose that we want to perform similar data 
+   // communication operations on a different set of patch data components
+   // where the operations have identical data communication patters as before.
+   // Instead of creating a new refine schedule that would only differ from
+   // my_schedule in the specific patch data components that are treated,
+   // we can now simply reconfigure the existing schedule with a new set of
+   // operations as follows:
+
+   // Create a new refine algorithm object
+   xfer_RefineAlgorithm my_new_algorithm;
+   
+   // Register a set of data transfer operations with the new algorithm.
+   // Note that these registrations must be performed in the same order
+   // as before and each registration call must involve patch data and
+   // refine operator objects that have identical structure as the previous
+   // sequence of registrations (i.e., same patch data type, same ghost cell
+   // widths, same operator stencil widths, etc.).
+   my_new_algorithm.registerRefine(my_new_dst0, my_new_src0, 
+                                   my_new_scratch0, my_new_refop0);
+   my_new_algorithm.registerRefine(my_new_dst1, my_new_src1, 
+                                   my_new_scratch1, my_new_refop1);
+   // etc....
+
+   // Reconfigure the existing schedule for the new operations
+   my_new_algorithm.resetSchedule(my_schedule);
+
+   // Move the new data with the schedule
+   my_schedule->fillData(...);
+
+   // To reset the schedule to its original state, simply reconfigure it again...
+   my_algorithm.resetSchedule(my_schedule);
+
+(6) There a new Poisson level solver (solv_CellPoissonHypreSolverX),
+a new Poisson multi-level solver (solv_CellPoissonFACSolverX) and a
+new class (solv_RobinBcCoefStrategyX) to support boundary conditions
+for these solvers and to help maintain consistency between the solvers
+when they work together.
+
+Both solvers solve the general equation
+     div(D * grad(u)) + C*u = f
+where u, f and C are cell-centered data, and D is side-centered data.
+In addition, C and D may also be set to constants.
+
+The level solver uses hypre to solve the linear system.
+The multi-level solver uses the FAC algorithm.  Both are documented
+in the docs/userdocs directory.
+
+These solvers superceed the solvers in OLD.FAC, whose use is now
+discouraged.
+
+(7) Support for VisIt data has been added through the 
+VisItDataWriter class.  This class supports a number of new features,
+including node-centered data, moving node (i.e. ALE) data, data
+defined only on specific patches, and parallelism in visualization
+postprocessing.  Use of the VisIt data writer is very similar to the
+CartesianVizamraiDataWriter.  See the document 
+SAMRAI/docs/userdocs/visit-writer.pdf for more information about
+the VisitDataWriter.  Also, the Euler, LinAdv, and ConvDiff applications
+codes have been modified to use the Vizamrai and/or VisIt data 
+writers.  See the source code in these applications for example
+usage.
+
+(8) 2D Multiblock communication functionality has been added in a new package
+with classes having the prefix "mblk."  This is still in a very preliminary
+stage of development and may not yet be useful for significant problems.
+
+(9) Uniform and nonuniform load balance capabilities have been rewritten.
+The changes enhance the performance of these routines and also increase 
+flexibility of use.  For example, one can now choose a different load balancing 
+scheme for each level in an AMR hierarchy.  Please see the documentation for 
+the load balance classes for more details.
+
+
+-----------------------------------------------------------------------------
+                             Major Bug Fixes 
+-----------------------------------------------------------------------------
+
+(1) Fix to communication schedule construction.  There was a bug in    
+the more efficient schedule construction algorithms, released in v1.3.1,
+which caused problems when patches of the same level were closer in 
+proximity to one another than their ghost fill width.  This should now
+be fixed.
+
+(2) Fix to synchronized time stepping.  The synchronized time-stepping 
+algorithm was not properly updating solutions on coarser grid levels, and
+could cause memory allocation problems. The algorithm was re-structured to
+avoid this problem.
+
+(3)
+
+
+-----------------------------------------------------------------------------
+                                  Known Problems
+-----------------------------------------------------------------------------
+
+(1) 
+
+=============================================================================
+=============================================================================
diff -r 000000000000 -r 5eda1a3f24e8 docs/release/version-1.5.0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/release/version-1.5.0	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,309 @@
+*****************************************************************************
+  Copyright 1997-2010                                                    
+  Lawrence Livermore National Security, LLC.                            
+  All rights reserved.                                                    
+*****************************************************************************
+*****************************************************************************
+
+                     Release Notes for SAMRAI v1.5.0
+     (notes for previous releases may be found in /SAMRAI/docs/release)
+*****************************************************************************
+
+NOTE:  These release notes are more descriptive and detailed than is usual
+       for software release notes.  The reason for this is that presently
+       complete documentation does not exist for most of the items listed.
+       Until sufficient user documentation becomes available, descriptions
+       such as those that follow will be part of SAMRAI release notes.
+
+Please direct any questions related to these notes to the SAMRAI development
+team by sending email to samrai at llnl.gov.
+
+*****************************************************************************
+*****************************************************************************
+
+Where to report Bugs
+--------------------
+
+If a bug is found in the SAMRAI library, we ask that you kindly report it
+to us so that we may fix it.  We will make every effort to fix bugs
+in a timely manner.  Depending on the severity or the complexity of the
+bug, we will either fix the bug for a subsequent library release or send
+a code fix to users so that their work is minimally interrupted.
+
+LLNL users should report bugs using the CASC bug tracking web pages:
+
+        http://www-casc.llnl.gov/bugs/
+
+Enter the bug into the appropriate area of the SAMRAI project section.
+
+Bugs found by other users should send email to samrai-bugs at llnl.gov.
+
+*****************************************************************************
+
+-----------------------------------------------------------------------------
+                Summary of what's changed
+-----------------------------------------------------------------------------
+
+This section contains a summary of changes to SAMRAI.  More detailed 
+descriptions of items in the following list are provided below.
+
+(1) tbox_Boolean.h is deprecated.
+
+(2) Use of ISO/ANSI standard header files.
+
+(3) Default to homogeneous message passing.
+
+(4) Configure defaults to building only double and int patch datatypes.
+
+(5) VisItWriter went through a rewrite to fix bugs and add functionality.
+
+
+----------------------------------------------------------------------------
+                Summary of what's new
+-----------------------------------------------------------------------------
+
+This section contains a summary of additions to SAMRAI.  More detailed 
+descriptions of items in the following list are provided below.
+
+(1) Outernode data is supported.
+
+(2) New utility subpackage femutils in the solver package, handling
+some operations used in finite-element solvers.
+
+(3) Two new pure virtual methods were added to the hier_VariableX and 
+hier_PatchDataFactoryX base classes, fineBoundaryRepresentsVariable() and
+dataLivesOnPatchBorder().  
+
+-----------------------------------------------------------------------------
+-----------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------
+                Details about what's changed
+-----------------------------------------------------------------------------
+
+(1) tbox_Boolean.h is deprecated.
+
+Since SAMRAI is moving toward supporting only ISO C++ standard
+compliant compilers the tbox_Bool header file and home grown bool
+implementation have been removed.  Users should remove #includes of
+tbox_Bool.h from their code.  The bool type is a standard C++ type so
+no include is necessary.
+
+(2) Use of ISO/ANSI standard header files.
+
+We now support only the standard ISO/ANSI header files (the non ".h"
+files; <string> rather than <string.h>).
+
+If you use the older ".h" files, you may encounter problems caused by
+mixing the new and old include files in the same compile.  GNU C++ will
+warn you that you are using a deprecated header file.  To get rid of
+the warning, just use the ISO/ANSI header files (non ".h" versions).
+
+(3) Default to homogeneous message passing.
+
+In previous versions of SAMRAI we defaulted to doing data conversion
+when doing message passing on parallel machines.  Since most users are
+working on homogeneous machines this introduced a little extra overhead
+that was not necessary.  The default is changed to passing data
+without conversions.
+
+If you are using a heterogeneous machine (e.g. running a 2 processor job on a
+networked Sun Workstation and an Intel Linux PC) you must set a
+flag to convert data when passing messages:
+
+tbox_MessageStream::s_use_xdr_translation = true;
+
+If you do not do this, the values in your variables will rapidly
+become corrupted.
+
+This does not effect file output, which is always stored in a platform
+independent format.
+
+(4) Configure defaults to building only double and int patch datatypes.
+
+In previous releases SAMRAI would build patch datatypes to support
+bool, char, double, dcomplex, float and int.  Since most users deal
+with only a small subset of these types the library was larger than
+needed.  With the new configure options double and int are built by
+default.  You must configure with --enable-<typename> to add bool,
+char, dcomplex, or float to the build.
+
+E.G. configure --enable-float --enable-dcomplex <other configure options>
+
+would add float and double complex types to the build.
+
+WARNING: If you run configure twice in the same directory with
+different types enabled/disabled, you need to do a make clean.  If you
+do not do this the old types will still be included in the library.
+
+(5) VisItWriter went through a rewrite to fix bugs and add functionality.
+
+
+5.1) To reduce the size of the class and eliminate duplicate code, we replaced
+individual register methods for scalar, vector, and tensor data with a 
+single method, supplying "SCALAR", "VECTOR", and "TENSOR" as an argument.
+
+   registerPlotQuantity(...,"SCALAR",...)  replaces registerPlotScalar(...)
+   registerPlotQuantity(...,"VECTOR",...)  replaces registerPlotVector(...)
+   registerPlotQuantity(...,"TENSOR",...)  replaces registerPlotTensor(...)
+
+similarly,
+
+   registerDerivedPlotQuantity()  replaces registerDerivedPlotScalar(),
+                                           registerDerivedPlotVector(),
+                                           registerDerivedPlotTensor()
+
+and 
+
+   resetLevelPlotQuantity()  replaces resetLevelPlotScalar(),
+                                      resetLevelPlotVector(),
+                                      resetLevelPlotTensor()
+
+
+5.2) We replaced the boolean "omit_ghost_data" argument in the registration
+methods with an IntVector "plot_nghosts" argument to allow the user to supply
+the ghost cell width they would like plotted.  Also, the default behavior
+was changed;  previously, "omit_ghost_data" was defaulted false so unless
+the user specified otherwise, ghost data was always plotted for a variable 
+with ghosts.  The new default behavior is to set the "plot_nghosts" argument
+to IntVector(0) so no ghosts are plotted.  The user may of course override
+this in order to see ghosts.
+
+   example:
+      OLD:
+        int start_depth_index = 0;
+        bool omit_ghost_data = true; // do not plot ghost data
+        viz_writer->registerPlotScalar("U", patch_data_id,
+                                       start_depth_index,
+                                       omit_ghost_data);
+
+      NEW:
+        IntVector plot_nghosts = IntVector(1);  // plot one ghost cell
+        viz_writer->registerPlotQuantity("U", "SCALAR", patch_data_id,
+                                       start_depth_index,
+                                       scale_factor,
+                                       plot_nghosts);
+
+5.3) We added the capability to prescribe the preferred centering for 
+non-standard datatypes.  That is, if a user supplies a new datatype they
+can specify the centering to be either CELL or NODE based.  As long as their
+supplied copy() methods can properly convert to cell or node data, VisIt
+can plot it.
+
+   example (user-defined data located on CELLs):
+      int start_depth_index = 0;
+      double scale_factor = 1.0;
+      IntVector nghosts = IntVector(0);
+      viz_writer->registerPlotQuantity("CELL_BASED_USER_DEFINED_DATA", 
+                                       "SCALAR", patch_data_id,
+                                       start_depth_index,
+                                       scale_factor,
+                                       nghosts,
+                                       "CELL");
+
+5.4) For cases with non-cartesian (i.e. stretched, curvilinear, deformed) 
+grids we added a method that allows the user to register a single patch data
+index with depth NDIM.  Previously, the user had to make NDIM calls to the
+method "registerNodeCoordinate()".  The same functionality exists in the
+new method called "registerSingleNodeCoordinate()":
+
+
+   example:
+     OLD:
+        for (int i = 0; i < NDIM; i++) { 
+           registerNodeCoordinate(i, patch_data_id, i, scale_factor);
+        }        
+   
+     NEW:
+        registerNodeCoordinates(patch_data_id);
+      -or-
+        for (int i = 0; i < NDIM; i++) { 
+           registerSingleNodeCoordinate(i, patch_data_id, i, scale_factor);
+        }   
+ 
+5.5) The names of the return value from the appu_VisMaterialsDataStrategyX 
+class were changed to avoid conflicts with #defines in user codes.  
+
+     OLD:
+         VisMaterialsDataStrategy::ALL_ONES
+         VisMaterialsDataStrategy::ALL_ZEROS
+         VisMaterialsDataStrategy::SOME
+
+     NEW:
+         VisMaterialsDataStrategy::VISIT_ALLONE
+         VisMaterialsDataStrategy::VISIT_ALLZERO
+         VisMaterialsDataStrategy::VISIT_MIXED
+
+5.6) Because it was error prone, we got rid of the materials state variable
+and species state variable interfaces.  These will be added back in v2.0
+once they have been fully debugged.
+
+
+
+
+-----------------------------------------------------------------------------
+-----------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------
+                Details about what's new
+-----------------------------------------------------------------------------
+
+(1) Outernode patch data is supported.
+
+It refers to the nodes on the boundary of a patch.  Like outernode
+and outerside classes, it supports only zero ghost cell widths.
+Copies between outernode and node types are supported.  Data is stored
+in several rectangular arrays corresponding to the 2*NDIM sides
+of a patch.  Each node on the patch boundary is represented in
+exactly one of the rectangular arrays.
+
+(2) New utility subpackage femutils in the solver package, handling
+some operations used in finite-element solvers.
+
+The femutils subpackage currently contains classes for performing
+outernode sum operations on a single level.  In the future, it will
+probably support outernode sum operations between adjacent levels.
+At this point, the classes in this package is undergoing active
+development and may end up being redesigned.
+
+(3) Two new pure virtual methods were added to the hier_VariableX and 
+hier_PatchDataFactoryX base classes, fineBoundaryRepresentsVariable() and
+dataLivesOnPatchBorder().  
+
+Each of these functions returns a boolean value.  These functions must be 
+implemented by any concrete variable and data factory classes.  Previously, 
+the fineBoundaryRepresentsVariable() function in the variable base class 
+was only virtual and returned a default value of true.  Typical usage is to
+set the return values in the variable constructor and pass the values to return
+to the patch data factory when the variable creates the factory.   The reason
+for the addition of these functions is to eliminate the requirement that variables
+be registered with the hier_VariableDatabaseX class in order to use the SAMRAI
+communication algorithms and schedules.
+
+-----------------------------------------------------------------------------
+                Major Bug Fixes 
+-----------------------------------------------------------------------------
+
+(1) Shared library option fixed for Linux.
+
+The --enabled-shared configure option to build shared libraries was
+not working.  It should work for now work for Linux systems using G++.
+
+(2) Several fixes were made to the communication schedules and data overlap 
+computations to eliminate problems with non-cell data, such as node, face, etc.  
+Bug #552 reported by gunney at llnl.gov was fixed
+Bug #565 reported by hornung at llnl.gov was fixed
+Bug #565 reported by smith84 at llnl.gov was fixed
+Bug #571 reported by anderson110 at llnl.gov was fixed
+Bug #573 reported by smith84 at llnl.gov was fixed
+
+
+
+-----------------------------------------------------------------------------
+                Known Problems
+-----------------------------------------------------------------------------
+
+(1) 
+
+=============================================================================
+=============================================================================
diff -r 000000000000 -r 5eda1a3f24e8 docs/release/version-2.0.0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/release/version-2.0.0	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,737 @@
+*****************************************************************************
+  Copyright 1997-2010                                                    
+  Lawrence Livermore National Security, LLC.                            
+  All rights reserved.                                                    
+*****************************************************************************
+*****************************************************************************
+
+                     Release Notes for SAMRAI v2.0.0
+     (notes for previous releases may be found in /SAMRAI/docs/release)
+*****************************************************************************
+
+NOTE:  These release notes are more descriptive and detailed than is usual
+       for software release notes.  The reason for this is that presently
+       complete documentation does not exist for most of the items listed.
+       Until sufficient user documentation becomes available, descriptions
+       such as those that follow will be part of SAMRAI release notes.
+
+Please direct any questions related to these notes to the SAMRAI development
+team by sending email to samrai at llnl.gov.
+
+*****************************************************************************
+*****************************************************************************
+
+Where to report Bugs
+--------------------
+
+If a bug is found in the SAMRAI library, we ask that you kindly report it
+to us so that we may fix it.  We will make every effort to fix bugs
+in a timely manner.  Depending on the severity or the complexity of the
+bug, we will either fix the bug for a subsequent library release or send
+a code fix to users so that their work is minimally interrupted.
+
+LLNL users should report bugs using the CASC bug tracking web pages:
+
+        http://www-casc.llnl.gov/bugs/
+
+Enter the bug into the appropriate area of the SAMRAI project section.
+
+Bugs found by other users should send email to samrai-bugs at llnl.gov.
+
+*****************************************************************************
+
+-----------------------------------------------------------------------------
+                Summary of what's changed
+-----------------------------------------------------------------------------
+
+This section contains a summary of changes to SAMRAI.  More detailed 
+descriptions of items in the following list are provided below.
+
+(0) Major API changes, classes templated on dimension and packages
+are in namespaces.
+
+(1) Change in link symbols LIBSAMRAI and LIBSAMRAIXD in the
+makefile Makefile.config and addition of LIBSAMRAIDEPEND.
+
+(2) Remove obsolete FAC Poisson solver in SAMRAI/source/solvers/OLD.FAC solver.
+
+(3) ShutdownRegistry API changed to include a priority.
+
+(4) Memory leak fixes.
+
+(5) The name of the PatchLevel::coarsenPatchLevel() method has been changed
+to PatchLevel::setCoarsenPatchLevel() for clarity, and an related method
+PatchLevel::setRefinedPatchLevel() was added to support the refine/coarsen
+patch hierarchy operations described in item (2) in "what's new".
+
+(6) For clarity and to support new functionality, the pure virtual methods in
+the GridGeometry base class have changed.
+
+(7) String.h removed.
+
+(8) Visit data writer failure to properly close HDF files fixed.
+
+(9) Sun IEEE floating point changes.
+
+(10) Make install destination directory changed.
+
+(11) Heterogeneous computer cluster support is disabled by default.
+
+(12) Setting obscure SAMRAI internal options via input values using the "GlobalInputs" 
+input database has been disabled.
+
+(13) Residual norm in CellPoissonHypreSolver has been changed to
+relative residual norm for clarity.
+
+(14) FAC solver parameters for coarse solver adopted more consistent naming
+convention.
+
+(15) GNUMake required for build.
+
+(16) Errors have been fixed in the SAMRAI-overview.pdf file in the docs/userdocs
+directory.  Also, some new information has been added describing the usage of the
+SAMRAI VariableDatabase class.
+
+----------------------------------------------------------------------------
+                Summary of what's new
+-----------------------------------------------------------------------------
+
+This section contains a summary of additions to SAMRAI.  More detailed 
+descriptions of items in the following list are provided below.
+
+(1) BasePatchHierarchy and BasePatchLevel abstract base classes added
+to be parent classes for original PatchHierarchy and PatchLevel as well
+as multiblock hierarchy and level classes.  Similar BaseGriddingAlgorithm
+class also added
+
+(2) Methods added to create a refined or coarsened version of an existing 
+patch hierarchy.
+
+(3) The construction of BoundaryBox now uses a singleton class called
+BoundaryLookupTable which was necessary to make SAMRAI capable of handling
+spatial dimensions greater than 3.  This caused a change to the ordering
+of the location indices for 3D BoundaryBox objects of codimension 2.  Users
+are now given the option of using the old ordering for backward compatibility
+or using the new ordering.
+
+(4) STL classes are now used by the SAMRAI library.  We take explicit
+steps to instantiate them because SAMRAI compiles without implicit
+template instantation.
+
+(5) Functions added to the SAMRAIManager utility class to allow the number of
+patch data components supported by the component selector bit vectors and patch
+descriptor to be increased/decreased as needed.  The new functions are:
+tbox::SAMRAIManager::setMaxNumberPatchDataEntries() and
+tbox::SAMRAIManager::getMaxNumberPatchDataEntries().  See the SAMRAIManager 
+class documentation for details.
+
+(6) Several new classes have been added to support individual patch data 
+components to be defined on subsets of patches in an AMR patch hierarchy,
+so called "locally-active" patch data.  In the hierarchy package, the new 
+classes are: LocallyActiveVariableDatabase and LocallyActiveDataPatchLevelManager.
+The LocallyActiveVariableDatabase is a Singleton class derived from the VariableDatabase
+Singleton class.  This class operates similarly to the standard variable database, but 
+provides a reduced set of variable registration and variable-patch data index mapping
+functionality.  The LocallyActiveVariableDatabase provides access to locally-active
+patch level manager objects which allow one to define on which patches on a level that
+individual patch data components are active.  The manager class provides patch level
+iterators that iterate over patches on which individual patch data components are active.
+The manager class can also be used independently of the locally-active variable database.
+Coarsen/Refine communication algorithm and schedule classes have been added to the transfer
+package to support communication operations for locally-active patch data.  Their usage
+and functionality are similar to the standard SAMRAI communication algorithm and schedule
+classes.
+
+-----------------------------------------------------------------------------
+-----------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------
+                Details about what's changed
+-----------------------------------------------------------------------------
+
+(0) Major API changes, classes templated on dimension and packages
+are in namespaces.
+
+[This information is also in the tools/scripts/conversion2.0/README file.]
+
+*****************************************************************************
+	           Converting from SAMRAI 1.x to 2.0
+*****************************************************************************
+
+*****************************************************************************
+	           Introduction to the 2.0 API changes.
+*****************************************************************************
+
+The SAMRAI API has changed dramatically in the 2.0 release.  This will
+require you to make a large number of changes to your code, but the
+changes are fairly trivial in nature so the process is relatively easy
+but time consuming.  We have provided automated scripts to ease the
+conversion process.  The script will not make all required changes,
+but should significantly reduce the time to convert codes.
+
+The change should not introduce hidden errors, since it involves class
+name changes.  If something is not correct it will not compile so any
+errors should be reasonably transparent.
+
+We made every effort to figure out a way to provide backward
+compatibility header files; however, we could not find a method to do
+this.
+
+The first significant change involves how we partition the class
+names.  In the 1.x release API we used a name prefix on the class
+names (e.g. tbox_Array) to avoid name conflicts.  The 2.0 version uses
+the C++ standardized namespace technology to partition the packages
+(e.g. SAMRAI::tbox::Array). If you are not familiar with namespaces
+you may want to look at your favorite C++ book.
+
+The second major change involves the way we handle dimensioned
+classes.  In previous releases of SAMRAI there was a different class
+for each dimension (e.g. hier_Box1, hier_Box2, and hier_Box3).  Due to
+user requests for higher dimensions we now template on the dimension
+(e.g. SAMRAI::hier::Box<int DIM>). [NOTE: Not all of SAMRAI is
+currently working for DIM>3, if you try to use a class we have not
+converted you should receive a compiler or runtime error]
+
+The third major change from the 1.x API is a reduction in the
+number of "styles" of headers included in SAMRAI.  We had three
+distinct ways of accessing the classes in SAMRAI.  These have been
+reduced to a single include method.
+
+
+*****************************************************************************
+	           What does the new API look like?
+*****************************************************************************
+
+Here are examples of the three "styles" of headers the 1.x API
+supported and how the new 2.0 code looks:
+
+
+Style 1) Dimensioned classes with package names.
+
+----------------------------------------------------------
+#include "hier_IntVector1.h"
+#include "hier_IntVector2.h"
+#include "pdat_CellData2.h"
+
+int main()
+{
+    hier_IntVector1                 vector_a;
+    hier_IntVector2                 vector_b;
+    pdat_CellData2<double>          data;
+}
+---------------------------------------------------------- 
+
+Style 2) Dimensioned classes without package names.
+
+----------------------------------------------------------
+#include "IntVector1.h"
+#include "IntVector2.h"
+#include "CellData2.h"
+
+int main()
+{
+    IntVector1                vector_a;
+    IntVector2                vector_b
+    CellData2<double>         data;
+}
+----------------------------------------------------------
+
+Styles (1) and (2) can be written using qualified names:
+
+----------------------------------------------------------
+#include "IntVector.h"
+#include "CellData.h"
+
+
+int main()
+{
+    // Class names no longer contain the dimension, classes
+    // are templated on the dimension.
+    SAMRAI::hier::IntVector<1>              vector_a;
+    SAMRAI::hier::IntVector<2>              vector_b
+    SAMARAI::pdat::CellData<2,double>       data;
+}
+---------------------------------------------------------- 
+
+You can use the C++ "using namespace" to avoid 
+qualifying the names.
+
+----------------------------------------------------------
+#include "IntVector.h"
+#include "CellData.h"
+
+using namespace SAMRAI;
+using namespace hier;
+using namespace pdat;
+
+int main()
+{
+    // Class names no longer contain the dimension, classes
+    // are templated on the dimension.
+    IntVector<1>              vector_a;
+    IntVector<2>              vector_b
+    CellData<2,double>        data;
+}
+---------------------------------------------------------- 
+
+
+Style 3) Non-dimensioned classes without package names.
+
+Note the dimension comes from the compile time definition of NDIM in
+both cases.  To get a 2D version of the code you used -DNDIM=2 on
+the compile line.
+
+----------------------------------------------------------
+#include "IntVector.h"
+#include "CellData.h"
+
+int main()
+{
+    IntVector                vector;
+    CellData<double> data;
+}
+----------------------------------------------------------
+
+The new method is similar, but you will see the "NDIM" symbol in your
+code instead hiding it in the header files.
+
+----------------------------------------------------------
+#include "IntVector.h"
+#include "CellData.h"
+using namespace SAMRAI;
+
+int main()
+{
+    hier::IntVector<NDIM>             vector;
+    pdat::CellData<NDIM, double>      data;
+}
+----------------------------------------------------------
+
+Note here we only use a "using namespace" to bring in the SAMRAI
+namespace and retain the namespace qualifiers for each of the package
+names.
+
+*****************************************************************************
+	How do I convert my code?
+*****************************************************************************
+
+You can make the code changes manually.  This requires changing:
+
+a) Remove package prefixes (if needed) from included headers.
+   Toolbox headers are located in a subdirectory of include to 
+   help avoid name collisions (e.g. #include "tbox/Utility.h").
+
+b) Add package namespace qualifiers or "using namespace" statements 
+   to class names.
+
+c) Add templating to classes that currently end in a dimension.
+
+
+We have provided a set of scripts to help automate the conversion
+process.  The scripts are not perfect and some editing is usually
+required but they help with the drudgery.  
+
+Make sure you have a backup of your code in case the conversion
+process fails.
+
+Run the SAMRAI/tools/scripts/conversion2.0/convert2.0 at the root of
+your source directory.  This should convert #include statements and
+rename classes that are templated.
+
+If you use the non-prefix header files (and thus non-prefix class
+names) you have three options.
+
+First, you can run the "packagePrefixPrepend" script to insert the
+package namespace into each class use.  For example IntVector would be
+replace with hier::IntVector.
+
+The second option is for you to manually add "using namespace"
+statements to your code.  You can do this by determining which
+packages you use and adding a "using namespace PACKAGE" for each one.
+
+The last alternative is a variation of the second, put a using
+namespace for all packages in your code and then remove the ones that
+cause an error during compilation (you can't have a "using namespace"
+for a package you don't actually use).  This is a little crude but
+depending on how familiar you are with the packages this might be
+easier than the second option.  Here is a complete list of all
+packages in SAMRAI:
+
+using namespace SAMRAI;
+using namespace tbox;
+using namespace hier;
+using namespace xfer;
+using namespace pdat;
+using namespace math;
+using namespace mesh;
+using namespace mblk;
+using namespace geom;
+using namespace solv;
+using namespace algs;
+using namespace appu;
+
+Issues using the scripts:
+
+(a) Please backup your files!
+
+We have run the scripts on several codes without harm but you don't
+want to be the person to find a serious bug in the scripts without
+having a backup.
+
+(b) Input file naming changes.
+
+Some input parameters use class names in them, the scripts do not make
+changes in input files.  You will need to change the input files that
+have references to packages.  E.G.
+
+algs_GriddingAlgorithm becomes algs::GriddingAlgorithm
+algs_HyperbolicLevelIntegrator becomes algs::HyperbolicLevelIntegrator
+
+are the most common changes needed.
+
+*****************************************************************************
+                 End Converting from SAMRAI 1.x to 2.0
+*****************************************************************************
+
+(1) Change in link symbols LIBSAMRAI and LIBSAMRAIXD in the
+makefile Makefile.config and addition of LIBSAMRAIDEPEND.
+
+If you are linking with SAMRAI using the provided Makefile.config 
+macros you will need to change the symbol used for the dependency target 
+for SAMRAI.
+
+If you are doing something similar to:
+
+main2d:	$(CXX_OBJS) $(F2D_OBJS) $(LIBSAMRAI)
+		$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) $(F2D_OBJS)	\
+		$(LIBSAMRAI2D) $(LIBSAMRAI) $(LDLIBS) -o main2d
+
+you will need change the $(LIBSSAMRAI) macro to $(LIBSAMRAIDEPEND) in
+the dependency list:
+
+main2d:	$(CXX_OBJS) $(F2D_OBJS) $(LIBSAMRAIDEPEND)
+		$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) $(F2D_OBJS)	\
+		$(LIBSAMRAI2D) $(LIBSAMRAI) $(LDLIBS) -o main2d
+
+Internally the library symbols for SAMRAI are now defined as -lSAMRAI and 
+-L is used to set the path to the library directory.
+
+This change was needed to improve the ability to build SAMRAI as a set 
+of shared libraries.
+
+(2) As stated in the RELEASE file of versions 1.4 and 1.5, the obsolete
+FAC Poisson solver in SAMRAI/source/solvers/OLD.FAC is now removed.
+This version tightly coupled the FAC cycling code with the
+Poisson-specific code.  The FAC code has been abstracted out, placed
+in SAMRAI/source/solvers/FAC and made more general.  Poisson-specific
+code and cell-centered Poisson solvers using HYPRE and FAC now exists
+in SAMRAI/source/solvers/poisson.
+
+(3) ShutdownRegistry API changed to include a priority.
+
+The registerShutdownRoutine now takes a priority to enable some control
+over the order of shutdowns.  Some services have dependencies between 
+them and shutting down services in an arbitrary ordering is not
+advisable.  The priority is between 0 and 254 with higher numbers
+being shutdown first.  Users are reserved priorities 254 to 127; all
+SAMRAI services will use 126-0.
+
+The old method was:
+
+   static void registerShutdownRoutine(void (*callback)());
+
+The new method is:
+
+   static void registerShutdownRoutine(void (*callback)(),
+                                       unsigned char priority);
+
+Bugzilla # 596.
+
+(4) Memory leak fixes.
+
+SAMRAI was leaking a small amount of memory (~200KB in the LinAdv example 
+problem) due to some incorrect shutdown of services.  This was a constant 
+sized leak (did not grow with problem size or length of run).
+
+Bugzilla # 598
+
+(5)
+
+(6) For clarity and to support new functionality, the pure virtual
+methods in the GridGeometry base class have changed.  The various
+versions of the previous pure virtual method setPatchGeometry() have
+been removed and their functionality has been moved from concrete grid
+geometry classes to the GridGeometry base class.  The new pure virtual
+methods in Grid Geometry are makeRefinedGridGeometry(),
+makeCoarsenedGridGeometry(), and setGeometryDataOnPatch().  The first
+two methods are required to create refined/coarsened versions of a
+concrete Grid Geometry object to support the nwe functionality to
+create refined and coarsened versions of an existing patch hierarchy
+(item (2) in "what's new").  The third method computes grid data
+specific to a coordinate system for a patch and assigns a new concrete
+patch geometry object to a patch upon creation.
+
+(7) The file String.h removed. Users should use the standard string
+header file.
+
+(8) Visit data writer failure to properly close HDF files fixed.
+
+The Visit writer was not correctly closing the HDF files.  If a SAMRAI
+application stopped prematurely (e.g. core dump), the HDF files may
+not have been written correctly to disk.
+
+(9) Sun IEEE floating point changes.
+
+A user supplied patch was applied for the IEEE floating point handling
+routines.
+
+(10) Make install destination directory changed.
+
+Previous verions of SAMRAI created intermediate directories when doing
+a "make install".  This feature was removed. For example when doing a
+configure with a prefix option "--prefix=/usr/local/SAMRAI", the
+actual install directory would be something like
+"/usr/local/SAMRAI/Linux-gcc-opt".  The new "make install" does not
+append the "Linux-gcc-opt" subdirectory.  This is more consitent with
+other packages.
+
+(11) Heterogeneous computer cluster support is disabled by default.
+
+By heterogeneous clusters we mean running SAMRAI in parallel across
+machines of different IEEE floating point representations (like big
+ended and little ended storage).  Since we not not aware of any SAMRAI
+user doing this we have made this support an optional configure flag.
+If you are using a heterogeneous cluster you need to add the
+"--enable-xdr" flag on your configure line.
+
+As a reminder, you also need to set 
+
+tbox_MessageStream::useXDR(true);
+
+in your application code (this change was introduced in release 1.5.0 see
+the release notes in docs/release/version-1.5.0)
+
+(12) Setting obscure SAMRAI internal options via input values using
+the "GlobalInputs" input database has been disabled.
+
+SAMRAI internal options can still be set by a user by calling an
+appropriate static class member function.  A user wishing to control
+an option via input must manage this on his/her own since the
+GlobalInputs input database has been removed.  SAMRAI internal options
+that may be set using the following static member function calls.
+Information about valid options and what each option does may be found
+in the appropriate class header file.
+
+o Set whether exit or abort is called when running a single processor job:
+
+tbox::SAMRAI_MPI::setCallAbortInSerialInsteadOfExit(bool);
+
+o Setting algorithm for box intersection operations in communication schedules:
+
+xfer::RefineSchedule<NDIM>::setScheduleGenerationMethod(const string& method);
+xfer::CoarsenSchedule<NDIM>::setScheduleGenerationMethod(const string& method);
+
+o Setting algorithm for reducing tags in clustering process:
+
+mesh::BergerRigoutsos<NDIM>::setClusteringOption(const string& method);
+
+(13) Residual norm in CellPoissonHypreSolver has been changed to
+relative residual norm for clarity.  You should change input parameters
+from "residual_tol" to "relative_residual_tol".  The accessor method
+getResidualNorm should be replaced with getRelativeResidualNorm.
+
+(14) All input parameters for FAC solvers' coarse level solver now start
+with 'coarse_solver...', whereas there was previously no consistency between
+the various classes that implement the FAC solver.  You may have to check
+your input files.  Change all parameters starting with "coarsest_..."
+or "coarse_level...", etc. to "coarse_solver...".
+
+(15) GNUMake required for build
+
+Standard make is no longer supported by the SAMRAI build system, GNUMake is 
+required.
+
+-----------------------------------------------------------------------------
+-----------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------
+                Details about what's new
+-----------------------------------------------------------------------------
+
+(1) BasePatchHierarchy and BasePatchLevel abstract base classes added
+to be parent classes for original PatchHierarchy and PatchLevel as well
+as multiblock hierarchy and level classes.  Similar BaseGriddingAlgorithm
+class also added.
+
+The functionalities of PatchHierarchy, PatchLevel, and GriddingAlgorithm are
+not changed, but the usage of these classes is changed in some circumstances.
+Notably, the interface for PatchHierarchy::getPatchLevel() is changed to
+conform with the BasePatchHierarchy interface, so that it now returns a
+pointer to BasePatchLevel.  Lines of code such as:
+
+   Pointer< PatchLevel<NDIM> > level_zero = hierarchy->getPatchLevel(0);
+
+do not need to be changed.  The pointer to BasePatchLevel returned by
+getPatchLevel() is cast to a pointer to PatchLevel.  However, statements such
+as:
+
+   BoxArray<NDIM> boxes = hierarchy->getPatchLevel(0)->getBoxes();
+
+will no longer compile, because BasePatchHierarchy has no getBoxes() method.
+
+Code such as this should be changed to first cast the pointer to the
+desired PatchLevel type, then call getBoxes().
+
+   Pointer< PatchLevel<NDIM> > level_zero = hierarchy->getPatchLevel(0);
+   BoxArray<NDIM> boxes = level->getBoxes();
+
+IMPORTANT:  Pure virtual function interfaces in TimeRefinementLevelStrategy,
+StandardTagAndInitStrategy, and TagAndInitializeStrategy have been changed
+to use these new abstract base classes.  Any existing user-defined classes that
+are derived from these listed strategy classes must be modified to match the
+new interfaces.
+
+When these functions are changed in the user-defined classes, it will often
+be necessary to add code to cast a passed-in pointer to a base class to the
+desired concrete version of the class.  For example, if class Foo in a user's
+code inherits from TimeRefinementLevelStrategy, then Foo must contain
+an implementation of TimeRefinementLevelStrategy::getLevelDt(), which would
+look something like
+
+double Foo::getLevelDt(const tbox::Pointer< hier::BasePatchLevel<NDIM> > level,
+                       const double dt_time,
+                       const bool initial_time)
+{
+   tbox::Pointer< hier::PatchLevel<NDIM> > patch_level = level;
+
+   . . . 
+
+   for (hier::PatchLevel<NDIM>::Iterator p(patch_level); p; p++) {
+      tbox::Pointer< hier::Patch<NDIM> > patch = patch_level->getPatch(p());
+
+      . . .
+
+   }
+
+   . . . 
+}
+
+Here the casting is done at the beginning of the function, and then the
+pointer 'patch_level' can be used as a usual pointer to PatchLevel.  The
+casting is necessary in the this example because the patch level iterator
+does not work with a pointer to BasePatchLevel, nor does BasePatchLevel
+contain a getPatch() member function.
+
+(2) Methods added to create a refined or coarsened version of an
+existing patch hierarchy.  These methods are in the PatchHierarchy
+class and are named makeRefinedPatchHierarchy() and
+makeCoarsenedPatchHierarchy(), respectively.  Each method accept an
+IntVector argument with strictly positive entries and returns a copy
+of the original patch hierarchy object with each patch level refined
+or coarsened by that ratio.  The new hierarchy will cover the same
+physical space as the original hierarchy and will have the same number
+of levels and same mapping of patches to processors on each level.
+However, the index space of each level will be refined or by the
+specified ratio.  Note that these operation do not allocate patch data
+on the new hierarchy so this must be done by the user before any data
+operations can be performed on the new hierarchy.
+
+(3) The construction of BoundaryBox now uses a singleton class called
+BoundaryLookupTable which was necessary to make SAMRAI capable of handling
+spatial dimensions greater than 3.  This caused a change to the ordering
+of the location indices for 3D BoundaryBox objects of codimension 2.  Users
+are now given the option of using the old ordering for backward compatibility
+or using the new ordering.
+
+The original ordering, existing in versions 1.4.0 and before, was
+
+    edge (codimension 2):
+    y_lo, z_lo: 0
+    y_hi, z_lo: 1
+    y_lo, z_hi: 2
+    y_hi, z_hi: 3
+    x_lo, z_lo: 4
+    x_lo, z_hi: 5
+    x_hi, z_lo: 6
+    x_hi, z_hi: 7
+    x_lo, y_lo: 8
+    x_hi, y_lo: 9
+    x_lo, y_hi: 10
+    x_hi, y_hi: 11
+
+The new ordering is
+
+    edge (codimension 2):
+    x_lo, y_lo: 0
+    x_hi, y_lo: 1
+    x_lo, y_hi: 2
+    x_hi, y_hi: 3
+    x_lo, z_lo: 4
+    x_lo, z_lo: 5
+    x_hi, z_hi: 6
+    x_hi, z_hi: 7
+    y_lo, z_lo: 8
+    y_hi, z_lo: 9
+    y_lo, z_hi: 10
+    y_hi, z_hi: 11
+
+To choose the ordering that is desired, a boolean input keyword
+'use_original_location_indices' is available in both CartesianGridGeometry
+and SkeletonGridGeometry.  If set to TRUE the original ordering will be used,
+and if FALSE, the new ordering is used.  The keyword is optional and will
+default to TRUE if not included in input.  The keyword is irrelevant in
+dimensions other than 3.
+
+Alternatively, the static function
+BoundaryLookupTable::setsetUsingOriginalLocations(bool) is available to
+choose one of the two options.  This is the method to use if the user's code
+uses neither the skeleton nor Cartesian grid geometry classes from SAMRAI.
+This function need be only called once, assuming the user does not desire to
+switch between the two ordering schemes in a single run.
+
+(4) STL classes are now used by the SAMRAI library.  We take explicit
+steps to instantiate them because SAMRAI compiles without implicit
+template instantation.  Users may need to understand how this works
+because it *MAY* affect users on systems where SAMRAI has not been ported.
+
+We use STL classes minimally, where SAMRAI does not support the same
+functionality.  To avoid long link times, SAMRAI is compiled with
+implicit template instantiations disabled.  So, templates used by the SAMRAI
+library must be explicitly instantiated.  Common templating is instantiated
+by auto-generated files under the "templates/automatic*" subdirectories
+of each package.  Special templates, including STL templates are
+instantiated by codes in the "templates/special" subdirectories.
+STL templates are instantiated in "templates/special/stl-*.C", where
+"*" refers to a class (or basic type) used as the template arguments.
+STL's of basic types are in the "toolbox/templates/special" while
+SAMRAI-defined classes go in the package of the most dependent class.
+
+Why do you need to know this?  Because explicit template instantiation
+is not recursive.  It may be necessary to instantiate templates that
+are not directly used (because they are used indirectly, by another
+template class or function).  Missing symbols (often with unfamiliar
+names) at link time may indicate this need.  Because indirectly used
+templates are implementation-dependent, there is no a priori way to
+know what they are.  If you see missing symbols that may be indirectly
+used templates, you have to add explicit template instantiation code
+to one or more "*/templates/special" subdirectories.  See the comments
+in "source/toolbox/templates/special/stl-FundamentalTypes.C" for more
+details.
+
+(5)
+
+-----------------------------------------------------------------------------
+                Major Bug Fixes 
+-----------------------------------------------------------------------------
+
+(1) Several errors were corrected in routines for coarsening non-cell-centered
+data between levels in a patch hierarchy involving periodic boundaries.
+
+-----------------------------------------------------------------------------
+                Known Problems
+-----------------------------------------------------------------------------
+
+(1) 
+
+=============================================================================
+=============================================================================
diff -r 000000000000 -r 5eda1a3f24e8 docs/release/version-2.0.0-beta
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/release/version-2.0.0-beta	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,711 @@
+*****************************************************************************
+  Copyright 1997-2010                                                    
+  Lawrence Livermore National Security, LLC.                            
+  All rights reserved.                                                    
+*****************************************************************************
+*****************************************************************************
+
+                     Release Notes for SAMRAI v2.0.0.beta
+     (notes for previous releases may be found in /SAMRAI/docs/release)
+*****************************************************************************
+
+NOTE:  These release notes are more descriptive and detailed than is usual
+       for software release notes.  The reason for this is that presently
+       complete documentation does not exist for most of the items listed.
+       Until sufficient user documentation becomes available, descriptions
+       such as those that follow will be part of SAMRAI release notes.
+
+Please direct any questions related to these notes to the SAMRAI development
+team by sending email to samrai at llnl.gov.
+
+*****************************************************************************
+*****************************************************************************
+
+Where to report Bugs
+--------------------
+
+If a bug is found in the SAMRAI library, we ask that you kindly report it
+to us so that we may fix it.  We will make every effort to fix bugs
+in a timely manner.  Depending on the severity or the complexity of the
+bug, we will either fix the bug for a subsequent library release or send
+a code fix to users so that their work is minimally interrupted.
+
+LLNL users should report bugs using the CASC bug tracking web pages:
+
+        http://www-casc.llnl.gov/bugs/
+
+Enter the bug into the appropriate area of the SAMRAI project section.
+
+Bugs found by other users should send email to samrai-bugs at llnl.gov.
+
+*****************************************************************************
+
+-----------------------------------------------------------------------------
+                Summary of what's changed
+-----------------------------------------------------------------------------
+
+This section contains a summary of changes to SAMRAI.  More detailed 
+descriptions of items in the following list are provided below.
+
+(0) Major API changes, classes templated on dimension and packages
+are in namespaces.
+
+(1) Change in link symbols LIBSAMRAI and LIBSAMRAIXD in the
+makefile Makefile.config and addition of LIBSAMRAIDEPEND.
+
+(2) Remove obsolete FAC Poisson solver in SAMRAI/source/solvers/OLD.FAC solver.
+
+(3) ShutdownRegistry API changed to include a priority.
+
+(4) Memory leak fixes.
+
+(5) The name of the PatchLevel::coarsenPatchLevel() method has been changed
+to PatchLevel::setCoarsenPatchLevel() for clarity, and an related method
+PatchLevel::setRefinedPatchLevel() was added to support the refine/coarsen
+patch hierarchy operations described in item (2) in "what's new".
+
+(6) For clarity and to support new functionality, the pure virtual methods in
+the GridGeometry base class have changed.
+
+(7) String.h removed.
+
+(8) Visit data writer failure to properly close HDF files fixed.
+
+(9) Sun IEEE floating point changes.
+
+(10) Make install destination directory changed.
+
+(11) Heterogeneous computer cluster support is disabled by default.
+
+(12) Setting obscure SAMRAI internal options via input values using the "GlobalInputs" 
+input database has been disabled.
+
+(13) Residual norm in CellPoissonHypreSolver has been changed to
+relative residual norm for clarity.
+
+(14) FAC solver parameters for coarse solver adopted more consistent naming
+convention.
+
+(15) GNUMake required for build
+
+----------------------------------------------------------------------------
+                Summary of what's new
+-----------------------------------------------------------------------------
+
+This section contains a summary of additions to SAMRAI.  More detailed 
+descriptions of items in the following list are provided below.
+
+(1) BasePatchHierarchy and BasePatchLevel abstract base classes added
+to be parent classes for original PatchHierarchy and PatchLevel as well
+as multiblock hierarchy and level classes.  Similar BaseGriddingAlgorithm
+class also added
+
+(2) Methods added to create a refined or coarsened version of an existing 
+patch hierarchy.
+
+(3) The construction of BoundaryBox now uses a singleton class called
+BoundaryLookupTable which was necessary to make SAMRAI capable of handling
+spatial dimensions greater than 3.  This caused a change to the ordering
+of the location indices for 3D BoundaryBox objects of codimension 2.  Users
+are now given the option of using the old ordering for backward compatibility
+or using the new ordering.
+
+(4) STL classes are now used by the SAMRAI library.  We take explicit
+steps to instantiate them because SAMRAI compiles without implicit
+template instantation.
+
+(5)
+
+-----------------------------------------------------------------------------
+-----------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------
+                Details about what's changed
+-----------------------------------------------------------------------------
+
+(0) Major API changes, classes templated on dimension and packages
+are in namespaces.
+
+[This information is also in the tools/scripts/conversion2.0/README file.]
+
+*****************************************************************************
+	           Converting from SAMRAI 1.x to 2.0
+*****************************************************************************
+
+*****************************************************************************
+	           Introduction to the 2.0 API changes.
+*****************************************************************************
+
+The SAMRAI API has changed dramatically in the 2.0 release.  This will
+require you to make a large number of changes to your code, but the
+changes are fairly trivial in nature so the process is relatively easy
+but time consuming.  We have provided automated scripts to ease the
+conversion process.  The script will not make all required changes,
+but should significantly reduce the time to convert codes.
+
+The change should not introduce hidden errors, since it involves class
+name changes.  If something is not correct it will not compile so any
+errors should be reasonably transparent.
+
+We made every effort to figure out a way to provide backward
+compatibility header files; however, we could not find a method to do
+this.
+
+The first significant change involves how we partition the class
+names.  In the 1.x release API we used a name prefix on the class
+names (e.g. tbox_Array) to avoid name conflicts.  The 2.0 version uses
+the C++ standardized namespace technology to partition the packages
+(e.g. SAMRAI::tbox::Array). If you are not familiar with namespaces
+you may want to look at your favorite C++ book.
+
+The second major change involves the way we handle dimensioned
+classes.  In previous releases of SAMRAI there was a different class
+for each dimension (e.g. hier_Box1, hier_Box2, and hier_Box3).  Due to
+user requests for higher dimensions we now template on the dimension
+(e.g. SAMRAI::hier::Box<int DIM>). [NOTE: Not all of SAMRAI is
+currently working for DIM>3, if you try to use a class we have not
+converted you should receive a compiler or runtime error]
+
+The third major change from In the 1.x API is a reduction in the
+number of "styles" of headers included in SAMRAI.  We had three
+distinct ways of accessing the classes in SAMRAI.  These have been
+reduced to a single include method.
+
+
+*****************************************************************************
+	           What does the new API look like?
+*****************************************************************************
+
+Here are examples of the three "styles" of headers the 1.x API
+supported and how the new 2.0 code looks:
+
+
+Style 1) Dimensioned classes with package names.
+
+----------------------------------------------------------
+#include "hier_IntVector1.h"
+#include "hier_IntVector2.h"
+#include "pdat_CellData2.h"
+
+int main()
+{
+    hier_IntVector1                 vector_a;
+    hier_IntVector2                 vector_b;
+    pdat_CellData2<double>          data;
+}
+---------------------------------------------------------- 
+
+Style 2) Dimensioned classes without package names.
+
+----------------------------------------------------------
+#include "IntVector1.h"
+#include "IntVector2.h"
+#include "CellData2.h"
+
+int main()
+{
+    IntVector1                vector_a;
+    IntVector2                vector_b
+    CellData2<double>         data;
+}
+----------------------------------------------------------
+
+Styles (1) and (2) can be written using qualified names:
+
+----------------------------------------------------------
+#include "IntVector.h"
+#include "CellData.h"
+
+
+int main()
+{
+    // Class names no longer contain the dimension, classes
+    // are templated on the dimension.
+    SAMRAI::hier::IntVector<1>              vector_a;
+    SAMRAI::hier::IntVector<2>              vector_b
+    SAMARAI::pdat::CellData<2,double>       data;
+}
+---------------------------------------------------------- 
+
+You can use the C++ "using namespace" to avoid 
+qualifying the names.
+
+----------------------------------------------------------
+#include "IntVector.h"
+#include "CellData.h"
+
+using namespace SAMRAI;
+using namespace hier;
+using namespace pdat;
+
+int main()
+{
+    // Class names no longer contain the dimension, classes
+    // are templated on the dimension.
+    IntVector<1>              vector_a;
+    IntVector<2>              vector_b
+    CellData<2,double>        data;
+}
+---------------------------------------------------------- 
+
+
+Style 3) Non-dimensioned classes without package names.
+
+Note the dimension comes from the compile time definition of NDIM in
+both cases.  To get a 2D version of the code you used -DNDIM=2 on
+the compile line.
+
+----------------------------------------------------------
+#include "IntVector.h"
+#include "CellData.h"
+
+int main()
+{
+    IntVector                vector;
+    CellData<double> data;
+}
+----------------------------------------------------------
+
+The new method is similar, but you will see the "NDIM" symbol in your
+code instead hiding it in the header files.
+
+----------------------------------------------------------
+#include "IntVector.h"
+#include "CellData.h"
+using namespace SAMRAI;
+
+int main()
+{
+    hier::IntVector<NDIM>             vector;
+    pdat::CellData<NDIM, double>      data;
+}
+----------------------------------------------------------
+
+Note here we only use a "using namespace" to bring in the SAMRAI
+namespace and retain the namespace qualifiers for each of the package
+names.
+
+*****************************************************************************
+	How do I convert my code?
+*****************************************************************************
+
+You can make the code changes manually.  This requires changing:
+
+a) Remove package prefixes (if needed) from included headers.
+   Toolbox headers are located in a subdirectory of include to 
+   help avoid name collisions (e.g. #include "tbox/Utility.h").
+
+b) Add package namespace qualifiers or "using namespace" statements 
+   to class names.
+
+c) Add templating to classes that currently end in a dimension.
+
+
+We have provided a set of scripts to help automate the conversion
+process.  The scripts are not perfect and some editing is usually
+required but they help with the drudgery.  
+
+Make sure you have a backup of your code in case the conversion
+process fails.
+
+Run the SAMRAI/tools/scripts/conversion2.0/convert2.0 at the root of
+your source directory.  This should convert #include statements and
+rename classes that are templated.
+
+If you use the non-prefix header files (and thus non-prefix class
+names) you have three options.
+
+First, you can run the "packagePrefixPrepend" script to insert the
+package namespace into each class use.  For example IntVector would be
+replace with hier::IntVector.
+
+The second option is for you to manually add "using namespace"
+statements to your code.  You can do this by determining which
+packages you use and adding a "using namespace PACKAGE" for each one.
+
+The last alternative is a variation of the second, put a using
+namespace for all packages in your code and then remove the ones that
+cause an error during compilation (you can't have a "using namespace"
+for a package you don't actually use).  This is a little crude but
+depending on how familiar you are with the packages this might be
+easier than the second option.  Here is a complete list of all
+packages in SAMRAI:
+
+using namespace SAMRAI;
+using namespace tbox;
+using namespace hier;
+using namespace xfer;
+using namespace pdat;
+using namespace math;
+using namespace mesh;
+using namespace mblk;
+using namespace geom;
+using namespace solv;
+using namespace algs;
+using namespace appu;
+
+Issues using the scripts:
+
+(a) Please backup your files!
+
+We have run the scripts on several codes without harm but you don't
+want to be the person to find a serious bug in the scripts without
+having a backup.
+
+(b) Input file naming changes.
+
+Some input parameters use class names in them, the scripts do not make
+changes in input files.  You will need to change the input files that
+have references to packages.  E.G.
+
+algs_GriddingAlgorithm becomes algs::GriddingAlgorithm
+algs_HyperbolicLevelIntegrator becomes algs::HyperbolicLevelIntegrator
+
+are the most common changes needed.
+
+*****************************************************************************
+                 End Converting from SAMRAI 1.x to 2.0
+*****************************************************************************
+
+(1) Change in link symbols LIBSAMRAI and LIBSAMRAIXD in the
+makefile Makefile.config and addition of LIBSAMRAIDEPEND.
+
+If you are linking with SAMRAI using the provided Makefile.config 
+macros you will need to change the symbol used for the dependency target 
+for SAMRAI.
+
+If you are doing something similar to:
+
+main2d:	$(CXX_OBJS) $(F2D_OBJS) $(LIBSAMRAI)
+		$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) $(F2D_OBJS)	\
+		$(LIBSAMRAI2D) $(LIBSAMRAI) $(LDLIBS) -o main2d
+
+you will need change the $(LIBSSAMRAI) macro to $(LIBSAMRAIDEPEND) in
+the dependency list:
+
+main2d:	$(CXX_OBJS) $(F2D_OBJS) $(LIBSAMRAIDEPEND)
+		$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) $(F2D_OBJS)	\
+		$(LIBSAMRAI2D) $(LIBSAMRAI) $(LDLIBS) -o main2d
+
+Internally the library symbols for SAMRAI are now defined as -lSAMRAI and 
+-L is used to set the path to the library directory.
+
+This change was needed to improve the ability to build SAMRAI as a set 
+of shared libraries.
+
+(2) As stated in the RELEASE file of versions 1.4 and 1.5, the obsolete
+FAC Poisson solver in SAMRAI/source/solvers/OLD.FAC is now removed.
+This version tightly coupled the FAC cycling code with the
+Poisson-specific code.  The FAC code has been abstracted out, placed
+in SAMRAI/source/solvers/FAC and made more general.  Poisson-specific
+code and cell-centered Poisson solvers using HYPRE and FAC now exists
+in SAMRAI/source/solvers/poisson.
+
+(3) ShutdownRegistry API changed to include a priority.
+
+The registerShutdownRoutine now takes a priority to enable some control
+over the order of shutdowns.  Some services have dependencies between 
+them and shutting down services in an arbitrary ordering is not
+advisable.  The priority is between 0 and 254 with higher numbers
+being shutdown first.  Users are reserved priorities 254 to 127; all
+SAMRAI services will use 126-0.
+
+The old method was:
+
+   static void registerShutdownRoutine(void (*callback)());
+
+The new method is:
+
+   static void registerShutdownRoutine(void (*callback)(),
+                                       unsigned char priority);
+
+Bugzilla # 596.
+
+(4) Memory leak fixes.
+
+SAMRAI was leaking a small amount of memory (~200KB in the LinAdv example 
+problem) due to some incorrect shutdown of services.  This was a constant 
+sized leak (did not grow with problem size or length of run).
+
+Bugzilla # 598
+
+(5)
+
+(6) For clarity and to support new functionality, the pure virtual
+methods in the GridGeometry base class have changed.  The various
+versions of the previous pure virtual method setPatchGeometry() have
+been removed and their functionality has been moved from concrete grid
+geometry classes to the GridGeometry base class.  The new pure virtual
+methods in Grid Geometry are makeRefinedGridGeometry(),
+makeCoarsenedGridGeometry(), and setGeometryDataOnPatch().  The first
+two methods are required to create refined/coarsened versions of a
+concrete Grid Geometry object to support the nwe functionality to
+create refined and coarsened versions of an existing patch hierarchy
+(item (2) in "what's new").  The third method computes grid data
+specific to a coordinate system for a patch and assigns a new concrete
+patch geometry object to a patch upon creation.
+
+(7) The file String.h removed. Users should use the standard string
+header file.
+
+(8) Visit data writer failure to properly close HDF files fixed.
+
+The Visit writer was not correctly closing the HDF files.  If a SAMRAI
+application stopped prematurely (e.g. core dump), the HDF files may
+not have been written correctly to disk.
+
+(9) Sun IEEE floating point changes.
+
+A user supplied patch was applied for the IEEE floating point handling
+routines.
+
+(10) Make install destination directory changed.
+
+Previous verions of SAMRAI created intermediate directories when doing
+a "make install".  This feature was removed. For example when doing a
+configure with a prefix option "--prefix=/usr/local/SAMRAI", the
+actual install directory would be something like
+"/usr/local/SAMRAI/Linux-gcc-opt".  The new "make install" does not
+append the "Linux-gcc-opt" subdirectory.  This is more consitent with
+other packages.
+
+(11) Heterogeneous computer cluster support is disabled by default.
+
+By heterogeneous clusters we mean running SAMRAI in parallel across
+machines of different IEEE floating point representations (like big
+ended and little ended storage).  Since we not not aware of any SAMRAI
+user doing this we have made this support an optional configure flag.
+If you are using a heterogeneous cluster you need to add the
+"--enable-xdr" flag on your configure line.
+
+As a reminder, you also need to set 
+
+tbox_MessageStream::useXDR(true);
+
+in your application code (this change was introduced in release 1.5.0 see
+the release notes in docs/release/version-1.5.0)
+
+(12) Setting obscure SAMRAI internal options via input values using
+the "GlobalInputs" input database has been disabled.
+
+SAMRAI internal options can still be set by a user by calling an
+appropriate static class member function.  A user wishing to control
+an option via input must manage this on his/her own since the
+GlobalInputs input database has been removed.  SAMRAI internal options
+that may be set using the following static member function calls.
+Information about valid options and what each option does may be found
+in the appropriate class header file.
+
+o Set whether exit or abort is called when running a single processor job:
+
+tbox::SAMRAI_MPI::setCallAbortInSerialInsteadOfExit(bool);
+
+o Setting algorithm for box intersection operations in communication schedules:
+
+xfer::RefineSchedule<NDIM>::setScheduleGenerationMethod(const string& method);
+xfer::CoarsenSchedule<NDIM>::setScheduleGenerationMethod(const string& method);
+
+o Setting algorithm for reducing tags in clustering process:
+
+mesh::BergerRigoutsos<NDIM>::setClusteringOption(const string& method);
+
+(13) Residual norm in CellPoissonHypreSolver has been changed to
+relative residual norm for clarity.  You should change input parameters
+from "residual_tol" to "relative_residual_tol".  The accessor method
+getResidualNorm should be replaced with getRelativeResidualNorm.
+
+(14) All input parameters for FAC solvers' coarse level solver now start
+with 'coarse_solver...', whereas there was previously no consistency between
+the various classes that implement the FAC solver.  You may have to check
+your input files.  Change all parameters starting with "coarsest_..."
+or "coarse_level...", etc. to "coarse_solver...".
+
+(15) GNUMake required for build
+
+Standard make is no longer supported by the SAMRAI build system, GNUMake is 
+required.
+
+-----------------------------------------------------------------------------
+-----------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------
+                Details about what's new
+-----------------------------------------------------------------------------
+
+(1) BasePatchHierarchy and BasePatchLevel abstract base classes added
+to be parent classes for original PatchHierarchy and PatchLevel as well
+as multiblock hierarchy and level classes.  Similar BaseGriddingAlgorithm
+class also added.
+
+The functionalities of PatchHierarchy, PatchLevel, and GriddingAlgorithm are
+not changed, but the usage of these classes is changed in some circumstances.
+Notably, the interface for PatchHierarchy::getPatchLevel() is changed to
+conform with the BasePatchHierarchy interface, so that it now returns a
+pointer to BasePatchLevel.  Lines of code such as:
+
+   Pointer< PatchLevel<NDIM> > level_zero = hierarchy->getPatchLevel(0);
+
+do not need to be changed.  The pointer to BasePatchLevel returned by
+getPatchLevel() is cast to a pointer to PatchLevel.  However, statements such
+as:
+
+   BoxArray<NDIM> boxes = hierarchy->getPatchLevel(0)->getBoxes();
+
+will no longer compile, because BasePatchHierarchy has no getBoxes() method.
+
+Code such as this should be changed to first cast the pointer to the
+desired PatchLevel type, then call getBoxes().
+
+   Pointer< PatchLevel<NDIM> > level_zero = hierarchy->getPatchLevel(0);
+   BoxArray<NDIM> boxes = level->getBoxes();
+
+IMPORTANT:  Pure virtual function interfaces in TimeRefinementLevelStrategy,
+StandardTagAndInitStrategy, and TagAndInitializeStrategy have been changed
+to use these new abstract base classes.  Any existing user-defined classes that
+are derived from these listed strategy classes must be modified to match the
+new interfaces.
+
+When these functions are changed in the user-defined classes, it will often
+be necessary to add code to cast a passed-in pointer to a base class to the
+desired concrete version of the class.  For example, if class Foo in a user's
+code inherits from TimeRefinementLevelStrategy, then Foo must contain
+an implementation of TimeRefinementLevelStrategy::getLevelDt(), which would
+look something like
+
+double Foo::getLevelDt(const tbox::Pointer< hier::BasePatchLevel<NDIM> > level,
+                       const double dt_time,
+                       const bool initial_time)
+{
+   tbox::Pointer< hier::PatchLevel<NDIM> > patch_level = level;
+
+   . . . 
+
+   for (hier::PatchLevel<NDIM>::Iterator p(patch_level); p; p++) {
+      tbox::Pointer< hier::Patch<NDIM> > patch = patch_level->getPatch(p());
+
+      . . .
+
+   }
+
+   . . . 
+}
+
+Here the casting is done at the beginning of the function, and then the
+pointer 'patch_level' can be used as a usual pointer to PatchLevel.  The
+casting is necessary in the this example because the patch level iterator
+does not work with a pointer to BasePatchLevel, nor does BasePatchLevel
+contain a getPatch() member function.
+
+(2) Methods added to create a refined or coarsened version of an
+existing patch hierarchy.  These methods are in the PatchHierarchy
+class and are named makeRefinedPatchHierarchy() and
+makeCoarsenedPatchHierarchy(), respectively.  Each method accept an
+IntVector argument with strictly positive entries and returns a copy
+of the original patch hierarchy object with each patch level refined
+or coarsened by that ratio.  The new hierarchy will cover the same
+physical space as the original hierarchy and will have the same number
+of levels and same mapping of patches to processors on each level.
+However, the index space of each level will be refined or by the
+specified ratio.  Note that these operation do not allocate patch data
+on the new hierarchy so this must be done by the user before any data
+operations can be performed on the new hierarchy.
+
+(3) The construction of BoundaryBox now uses a singleton class called
+BoundaryLookupTable which was necessary to make SAMRAI capable of handling
+spatial dimensions greater than 3.  This caused a change to the ordering
+of the location indices for 3D BoundaryBox objects of codimension 2.  Users
+are now given the option of using the old ordering for backward compatibility
+or using the new ordering.
+
+The original ordering, existing in versions 1.4.0 and before, was
+
+    edge (codimension 2):
+    y_lo, z_lo: 0
+    y_hi, z_lo: 1
+    y_lo, z_hi: 2
+    y_hi, z_hi: 3
+    x_lo, z_lo: 4
+    x_lo, z_hi: 5
+    x_hi, z_lo: 6
+    x_hi, z_hi: 7
+    x_lo, y_lo: 8
+    x_hi, y_lo: 9
+    x_lo, y_hi: 10
+    x_hi, y_hi: 11
+
+The new ordering is
+
+    edge (codimension 2):
+    x_lo, y_lo: 0
+    x_hi, y_lo: 1
+    x_lo, y_hi: 2
+    x_hi, y_hi: 3
+    x_lo, z_lo: 4
+    x_lo, z_lo: 5
+    x_hi, z_hi: 6
+    x_hi, z_hi: 7
+    y_lo, z_lo: 8
+    y_hi, z_lo: 9
+    y_lo, z_hi: 10
+    y_hi, z_hi: 11
+
+To choose the ordering that is desired, a boolean input keyword
+'use_original_location_indices' is available in both CartesianGridGeometry
+and SkeletonGridGeometry.  If set to TRUE the original ordering will be used,
+and if FALSE, the new ordering is used.  The keyword is optional and will
+default to TRUE if not included in input.  The keyword is irrelevant in
+dimensions other than 3.
+
+Alternatively, the static function
+BoundaryLookupTable::setsetUsingOriginalLocations(bool) is available to
+choose one of the two options.  This is the method to use if the user's code
+uses neither the skeleton nor Cartesian grid geometry classes from SAMRAI.
+This function need be only called once, assuming the user does not desire to
+switch between the two ordering schemes in a single run.
+
+(4) STL classes are now used by the SAMRAI library.  We take explicit
+steps to instantiate them because SAMRAI compiles without implicit
+template instantation.  Users may need to understand how this works
+because it *MAY* affect users on systems where SAMRAI has not been ported.
+
+We use STL classes minimally, where SAMRAI does not support the same
+functionality.  To avoid long link times, SAMRAI is compiled with
+implicit template instantiations disabled.  So, templates used by the SAMRAI
+library must be explicitly instantiated.  Common templating is instantiated
+by auto-generated files under the "templates/automatic*" subdirectories
+of each package.  Special templates, including STL templates are
+instantiated by codes in the "templates/special" subdirectories.
+STL templates are instantiated in "templates/special/stl-*.C", where
+"*" refers to a class (or basic type) used as the template arguments.
+STL's of basic types are in the "toolbox/templates/special" while
+SAMRAI-defined classes go in the package of the most dependent class.
+
+Why do you need to know this?  Because explicit template instantiation
+is not recursive.  It may be necessary to instantiate templates that
+are not directly used (because they are used indirectly, by another
+template class or function).  Missing symbols (often with unfamiliar
+names) at link time may indicate this need.  Because indirectly used
+templates are implementation-dependent, there is no a priori way to
+know what they are.  If you see missing symbols that may be indirectly
+used templates, you have to add explicit template instantiation code
+to one or more "*/templates/special" subdirectories.  See the comments
+in "source/toolbox/templates/special/stl-FundamentalTypes.C" for more
+details.
+
+(5)
+
+-----------------------------------------------------------------------------
+                Major Bug Fixes 
+-----------------------------------------------------------------------------
+
+(1) Several errors were corrected in routines for coarsening non-cell-centered
+data between levels in a patch hierarchy involving periodic boundaries.
+
+-----------------------------------------------------------------------------
+                Known Problems
+-----------------------------------------------------------------------------
+
+(1) 
+
+=============================================================================
+=============================================================================
diff -r 000000000000 -r 5eda1a3f24e8 docs/release/version-2.1.0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/release/version-2.1.0	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,156 @@
+*****************************************************************************
+  Copyright 1997-2010                                                    
+  Lawrence Livermore National Security, LLC.                            
+  All rights reserved.                                                    
+*****************************************************************************
+*****************************************************************************
+
+                     Release Notes for SAMRAI v2.1.0
+     (notes for previous releases may be found in /SAMRAI/docs/release)
+*****************************************************************************
+
+NOTE:  These release notes are more descriptive and detailed than is usual
+       for software release notes.  The reason for this is that presently
+       complete documentation does not exist for most of the items listed.
+       Until sufficient user documentation becomes available, descriptions
+       such as those that follow will be part of SAMRAI release notes.
+
+Please direct any questions related to these notes to the SAMRAI development
+team by sending email to samrai at llnl.gov.
+
+*****************************************************************************
+*****************************************************************************
+
+Where to report Bugs
+--------------------
+
+If a bug is found in the SAMRAI library, we ask that you kindly report it
+to us so that we may fix it.  We will make every effort to fix bugs
+in a timely manner.  Depending on the severity or the complexity of the
+bug, we will either fix the bug for a subsequent library release or send
+a code fix to users so that their work is minimally interrupted.
+
+LLNL users should report bugs using the CASC bug tracking web pages:
+
+        http://www-casc.llnl.gov/bugs/
+
+Enter the bug into the appropriate area of the SAMRAI project section.
+
+Bugs found by other users should send email to samrai-bugs at llnl.gov.
+
+*****************************************************************************
+
+-----------------------------------------------------------------------------
+                Summary of what's changed
+-----------------------------------------------------------------------------
+
+This section contains a summary of changes to SAMRAI.  More detailed 
+descriptions of items in the following list are provided below.
+
+(1) The hypre library has changed slightly, affecting SAMRAI's cell-centered
+Poisson solver codes.  Our solvers require hypre-1.9.0b or later.
+
+(2) The "femutils"  directory was moved from the solvers package to the
+algorithms package.  Any instances of patch boundary sum objects
+must be declared in the algs namespace.
+
+(3) Support for time interpolation in communication schedules that treat 
+locally-active patch data has been added.  As a result the interfaces and
+usage of the locally-active patch data communication algorithms and schedules
+is essentially the same as in the standard case, where patch data lives on
+all patches in an AMR patch hierarchy.
+
+----------------------------------------------------------------------------
+                Summary of what's new
+-----------------------------------------------------------------------------
+
+This section contains a summary of additions to SAMRAI.  More detailed 
+descriptions of items in the following list are provided below.
+
+(1) New classes added to the multiblock package
+
+(2) Added support for embedded and immersed boundary applications.
+
+(3) Added option to set summary filename in VisItDataWriter.
+
+(4) restart-redistribute tool added to allow for restart on arbirtrary
+    numbers of processors.
+
+-----------------------------------------------------------------------------
+-----------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------
+                Details about what's changed
+-----------------------------------------------------------------------------
+
+(1) Older versions of hypre required that we specify periodic boundary
+conditions using boolean flags.  This interface has been changed, now
+requiring the periodic shifts instead.  The cell-centered Poisson solver
+in SAMRAI has been changed to conform to this new interface.  Unfortunately,
+it makes our solver incompatible with older versions of hypre.  We have
+tested with hypre-1.9.0b and we recommend that you upgrade to this version
+if you wish to use hypre.
+
+(2) The "femutils"  directory was moved from the solvers package to the
+algorithms package.  Any instances of patch boundary sum objects
+must be declared in the algs namespace. For example, the reference for
+PatchBoundaryNodeSum is now in the "algs" rather than "solv" namespace:
+   OLD:  solv::PatchBoundaryNodeSum<NDIM>
+   NEW:  algs::PatchBoundaryNodeSum<NDIM>
+
+
+-----------------------------------------------------------------------------
+-----------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------
+                Details about what's new
+-----------------------------------------------------------------------------
+
+(1) Some new classes were added to the multiblock package, including 
+MultiblockRefinePatchStrategy and  MultiblockCoarsenPatchStrategy. A number
+of other design changes were also made to more easily support multiblock
+applications.
+
+(2) Support for embedded and immersed boundary applications was added 
+to the apputils package, in the directory apputils/embedded_boundary.
+The class EmbeddedBoundaryGeometry manages construction and data manipulation
+of embedded boundaries on a Cartesian mesh. See header comments for details
+of the ways in which these classes may be used.  We also added links
+to outside packages - Cart3D and Eleven/Overture - for complex geometry
+grid generation.  These classes are currently empty due to licensing issues,
+but feel free to send a message to samrai at llnl.gov if you are interested
+in using them and we may be able to work around the license restrictions.
+
+(3) By default the summary file written by the VisItDataWriter was 
+hardwired to be called "summary.samrai".  Some users expressed the desire
+to change its name so we added a new method VisItDataWriter::setSummaryFilename()
+that allows the user to change the name of the file. To identify the 
+samrai file to VisIt, the filename must still end in ".samrai" (so the
+actual filename will be <filename>.samrai, where <filename> is what
+you supply).
+
+(4) The restart-redistribute tool has been created to allow for restarted
+runs on an arbitrary number of processors.  Ordinarily, SAMRAI's restart
+files require all restarted runs use the same number of processors as the run
+that created the restart dump.  This tool processes a restart directory and
+creates a new set of restart files for use on a different number of processors.
+See the README in the tools/restart directory for instructions on the
+building and usage of this tool.
+
+
+-----------------------------------------------------------------------------
+                Major Bug Fixes 
+-----------------------------------------------------------------------------
+
+(1) Problems with communication of "edge" patch data on a periodic domain
+have been fixed.  In particular, this fixes a problem with the patch boundary
+node sum utilities. 
+
+-----------------------------------------------------------------------------
+                Known Problems
+-----------------------------------------------------------------------------
+
+(1) 
+
+=============================================================================
+=============================================================================
diff -r 000000000000 -r 5eda1a3f24e8 docs/release/version-2.2.0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/release/version-2.2.0	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,327 @@
+*****************************************************************************
+  Copyright 1997-2010
+  Lawrence Livermore National Security, LLC.
+  All rights reserved.
+*****************************************************************************
+*****************************************************************************
+
+                     Release Notes for SAMRAI v2.2.0
+     (notes for previous releases may be found in /SAMRAI/docs/release)
+*****************************************************************************
+
+NOTE:  These release notes are more descriptive and detailed than is usual
+       for software release notes.  The reason for this is that presently
+       complete documentation does not exist for most of the items listed.
+       Until sufficient user documentation becomes available, descriptions
+       such as those that follow will be part of SAMRAI release notes.
+
+Please direct any questions related to these notes to the SAMRAI development
+team by sending email to samrai at llnl.gov.
+
+LLNL users can use the discussion groups on the LLNL Sourceforge site:
+
+https://sourceforge.llnl.gov/sf/discussion/do/listForums/projects.samrai/discussion
+
+*****************************************************************************
+*****************************************************************************
+
+Where to report Bugs
+--------------------
+
+If a bug is found in the SAMRAI library, we ask that you kindly report it
+to us so that we may fix it.  We will make every effort to fix bugs
+in a timely manner.  Depending on the severity or the complexity of the
+bug, we will either fix the bug for a subsequent library release or send
+a code fix to users so that their work is minimally interrupted.
+
+LLNL users may report bugs using the LLNL Sourceforge site if 
+you have a sourceforge account:
+
+https://sourceforge.llnl.gov/sf/tracker/do/listTrackers/projects.samrai/tracker
+
+Bugs found by other users should send email to samrai-bugs at llnl.gov.
+
+*****************************************************************************
+
+-----------------------------------------------------------------------------
+                Summary of what's changed
+-----------------------------------------------------------------------------
+
+This section contains a summary of changes to SAMRAI.  More detailed
+descriptions of items in the following list are provided below.
+
+(1) Change interface for Robin boundary condition of Poisson equation solvers.
+
+(2) Patch boundary sum algorithm performance improved.
+
+(3) Outeredge patch data type has been rebuilt.
+
+(4) Header file documentation for all standard SAMRAI patch data types
+has been improved.
+
+(5) Redundant operations in the tbox::Utilities class for accessing
+    POSIX constants that were also provided by tbox::MathUtilities class
+    have been removed from tbox::utilities.  However, signaling NaN's may
+    still be accessed using either the tbox::MathUtilities or tbox::IEEE class.
+
+(6) Assertion handling has changed for more graceful exit in parallel.
+
+(7) The name of the SAMRAI MPI utility class has been changed from
+tbox::MPI to tbox::SAMRAI_MPI.
+
+(8) Added warning about using older versions of doxygen.
+
+(9) Added support for GNU 4.2.1 compiler suite.
+
+(10) Tested against hypre release 2.2.0b.
+
+(11) SAMRAI team is using Insure++ release 7.1.0.  SAMRAI will not
+     compile correctly with Insure++ 7.0.X releases due to bug in support
+     of C++ complex datatypes.
+
+(12) Removed "using namespace" statements from SAMRAI library code.
+     Users may need to include this now, primarily "using namespace std".
+
+
+(13) Building of restart-redistribute utility is part of standard build.
+
+(14) SAMRAI was updated to use the version 2.3.3 of PETSC.  Earlier 
+     versions are no longer supported.
+
+(15) SAMRAI was updated to use the version 2.3.0 of Sundials.  Earlier 
+     versions are no longer supported.
+
+(16) Changes to PatchDataFactory API to allow for multiple inheritance.
+
+(17) Removed "undefined" type from MathUtilities and replaced uses with
+	SignalingNaN.
+
+(18) PatchDataFactory::allocate() is now overloaded with a version that accepts
+     a patch as an argument instead of a box.
+
+(19) All multiblock-related classes have been moved out of the multiblock
+     package and into other packages according to their functionality.
+     
+----------------------------------------------------------------------------
+                Summary of what's new
+-----------------------------------------------------------------------------
+
+This section contains a summary of additions to SAMRAI.  More detailed
+descriptions of items in the following list are provided below.
+
+(1) Functionality has been added to manually set the number of
+timer objects used in the code.
+
+(2) Functionality has been added to manually set the number of
+statistic objects used in the code.
+
+-----------------------------------------------------------------------------
+-----------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------
+                Details about what's changed
+-----------------------------------------------------------------------------
+
+(1) Change interface for Robin boundary condition of Poisson equations.
+We need to specify 3 coefficients instead of 2 (2 coefficient interface)
+has too many limitations.  The old interface assumed that the Robin BC
+was governed by the equation  a*u + (1-a)du/dn = g, where a is in [0,1].
+The new interface assumes the equation a*u + b*du/dn = g.  You must supply
+the additional coefficient b.  The new interface also makes it clear that
+the units of the coefficient a and b are different.
+
+(2) Patch boundary sum algorithm performance improved by eliminating
+excessive temporary data storage and extra data copy operations.
+
+(3) Outeredge patch data type has been rebuilt to accommodate fixes to
+patch boundary sum performance issues and so that data layout is
+consistent across all spatial dimensions.  See outeredge data header
+files for details.
+
+(4) Header file documentation for all standard SAMRAI patch data types
+has been improved.  Documentation for variable, patch data, box geometry
+classes has been clearer (with details filled in as appropriate) and
+has been made consistent across all data types.  Most of these changes
+address questions raised by various users.
+
+(5) Redundant operations in the tbox::Utilities class for accessing POSIX
+constants that were also provided by tbox::MathUtilities class have been
+removed from tbox::Utilities.  This is largely for consistency and to remove
+(potentially) conflicting redundant implementations.  However, signaling
+NaN's may still be accessed using either the tbox::MathUtilities or
+tbox::IEEE class.  Operations in tbox::MathUtilities are templated on the
+data type whereas operations in tbox::IEEE use operator overloading to
+resolve type information.
+
+(6) Assertion handling has changed for more graceful exit in parallel.
+All instances of calls to the standard library "assert()" function have
+been removed from the code. They have been replaced with a macro
+"TBOX_ASSERT" which issues a similar error message to the assert()
+function and calls the SAMRAI_MPI::abort() routine for proper program
+shutdown in parallel.  The TBOX_ASSERT macro may be called by user
+code just like other SAMRAI macros TBOX_ERROR, TBOX_WARNING, etc.
+
+(7) The name of the SAMRAI MPI utility class has been changed from
+tbox::MPI to tbox::SAMRAI_MPI.  This prevents naming conflicts with
+file systems that are case insensitive.
+
+(8) Using older versions of doxygen is generally not advised.
+We have seen older versions doxygen hang.  Try to use the latest
+version available.  If doxygen generation takes more than 2 hours
+with reasonable disk access speed, it is likely to be hung.
+
+(9) Minor changes to fix problems encountered when compiling with GNU
+4.2.1 compiler suite.  The most significant changes are due to the
+compiler being more sensitive to const methods and properly declaring
+them to be const in derived classes.  This was a problem with classes
+inheriting from VisMaterialsDataStrategy and VisDerivedDataStrategy.
+
+(10) SAMRAI is being tested with hypre release 2.2.0b.
+
+(11) Config.suggest script modified to use Insure++ release 7.1.0.
+Previous releases of Insure++ had problems with C++ Complex datatypes.
+Removed several minor memory leaks.  Updated included psrc file to
+suppress warnings and memory leaks that occur in libraries SAMRAI
+uses.
+
+(12) The "using namespace" statements where removed from SAMRAI
+library code.  This was causing problems for some users and is poor
+library design.  If users were relying on these statements (primarily
+"using namespace std;") compiling errors may occur for standard C++
+classes like "string" "ostream" etc.  To fix these errors simply
+include a "using namespace std;" in the users code.
+
+(13) The "restart-redistribute" utility is now part of the standard
+SAMRAI build process.  This utility allows restart files to be
+redistributed to a different number of processors.  Use this utility
+if you wish to take a run done on say 16 processors and restart it on
+32 processors.  The utility is located in the bin directory.
+Documentation for running the utility is found in:
+docs/userdocs/RestartRedistribute.txt.
+
+(14) SAMRAI was updated to use the version 2.3.3 of PETSc.  Earlier 
+     versions are no longer supported.  Several interfaces where
+     updated to match the PETCc interface changes:
+	
+	SNES_SAMRAIContext
+
+		Input file options for gmres_orthogonalization_algorithm have
+		changed, see header file for more information.
+			
+		getSLESSolver method was removed since SLES was
+		removed from PETSc interfaces, use KSP solver object
+                instead.
+
+	PETSc_SAMRAIVectorReal
+
+		constructor takes an MPI Communicator.
+
+	PETScAbstractVectorReal
+
+		constructor takes an MPI Communicator.
+
+		private methods changed to match PETSc vector
+		interface, should not impact user code.
+
+(15) SAMRAI was updated to use the version 2.3.0 of Sundials.  Earlier 
+     versions are no longer supported.
+   
+This release of SAMRAI replaces the KINSOL and PVODE solver libraries
+with the Sundials library.  The old PVODE package has been
+reintegrated with CVODE and both packages are now both part of a
+larger solver package called Sundials.
+
+The SAMRAI configure options have been changed to assume that the
+entire Sundials package is installed (not just individual KINSOL or
+CVODE packages).  Use the "--with-sundials=PATH" option to specify the
+path to the Sundials package when configuring SAMRAI to enable both
+KINSOL and CVODE.
+
+User code using the old KINSOL and PVODE packages will require some
+classname changes and argument list changes.  The interfaces to KINSOL
+and CVODE have been updated to reflect changes in the Sundials API.
+The PVODE classes have been renamed to use the CVODE prefix.  See the
+solvers package documentation for more information on the API.
+
+(16) Changes to PatchDataFactory API to allow for multiple inheritance.
+
+To enable better support for runtime determination of data dimension
+the PatchDataFactory API was modified to allow for multiple inheritance
+from 2 or more dimensions.
+
+Users implementing a PatchData will need to change the Factory
+implementations.  The ghost cell width variable is was moved from the
+derived classes to the PatchDataFactory class.  The
+setDefaultGhostCellWidth method was removed and setting functionality
+was moved into the constructor and cloneFactory methods.  The
+PatchDataFactory constructor and cloneFactory method now have an
+additional argument of type "const IntVector<DIM>" to specify the
+ghost cell width of objects built by the factory.  The
+getDefaultGhostCellWidth method was renamed to be getGhostCellWidth.
+
+(17) Removed "undefined" type from MathUtilities and replaced uses with
+	SignalingNaN.
+
+There were two nearly identical values in MathUtilities, SignalingNaN
+and Undefined.  There was no clear purpose to having both so Undefined
+was removed from the library.
+
+(18) PatchDataFactory::allocate() is now overloaded with a version that accepts
+     a patch as an argument instead of a box.
+
+This change will allow users who create their own derived patch data types to
+access information stored in the Patch class during the allocation of
+PatchData.  For example, one could retrieve the pointer to the PatchGeometry
+object associated with the patch, in order to get information on physical
+boundary conditions.
+
+The previous allocate() interface, with a Box as an argument, remains, but all 
+user-created derived patch data types will require an implementation of this
+pure virtual interface.
+
+(19) All multiblock-related classes have been moved out of the multiblock
+     package and into other packages according to their functionality.
+
+For example, class MultiblockPatchHierarchy is now in the hierarchy package,
+so that it is in the same package as its counterpart class PatchHierarchy.
+Similarly, MultiblockGriddingAlgorithm is now in the mesh package.
+
+This means that the namespace 'mblk' no longer exists, as all multiblock
+classes now are contained in the namespace of the package where they are
+located.
+
+-----------------------------------------------------------------------------
+-----------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------
+                Details about what's new
+-----------------------------------------------------------------------------
+
+(1) Functionality has been added to manually increase the number of
+timer objects used in the code.  This can be done by calling the appropriate
+function in the SAMRAIManager class.  See header file for more information.
+
+(2) Functionality has been added to manually set the number of
+statistic objects used in the code.  This can be done by calling the appropriate
+function in the SAMRAIManager class.  See header file for more information.
+
+-----------------------------------------------------------------------------
+                Major Bug Fixes
+-----------------------------------------------------------------------------
+
+(1) Fixed interface declarations for printClassData methods.  They should
+all be declared virtual and most were not.
+
+(2) Visit datawriter was not correctly computing min/max values.
+
+(3) Fixed bugs in restart-redistribute tool related to path and filename
+    handling.
+
+-----------------------------------------------------------------------------
+                Known Problems
+-----------------------------------------------------------------------------
+
+(1) 
+
+=============================================================================
+=============================================================================
diff -r 000000000000 -r 5eda1a3f24e8 docs/release/version-2.2.1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/release/version-2.2.1	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,158 @@
+*****************************************************************************
+  Copyright 1997-2010
+  Lawrence Livermore National Security, LLC.
+  All rights reserved.
+*****************************************************************************
+*****************************************************************************
+
+                     Release Notes for SAMRAI v2.2.1
+     (notes for previous releases may be found in /SAMRAI/docs/release)
+*****************************************************************************
+
+NOTE:  These release notes are more descriptive and detailed than is usual
+       for software release notes.  The reason for this is that presently
+       complete documentation does not exist for most of the items listed.
+       Until sufficient user documentation becomes available, descriptions
+       such as those that follow will be part of SAMRAI release notes.
+
+Please direct any questions related to these notes to the SAMRAI development
+team by sending email to samrai at llnl.gov.
+
+LLNL users can use the discussion groups on the LLNL Sourceforge site:
+
+https://sourceforge.llnl.gov/sf/discussion/do/listForums/projects.samrai/discussion
+
+*****************************************************************************
+*****************************************************************************
+
+Where to report Bugs
+--------------------
+
+If a bug is found in the SAMRAI library, we ask that you kindly report it
+to us so that we may fix it.  We will make every effort to fix bugs
+in a timely manner.  Depending on the severity or the complexity of the
+bug, we will either fix the bug for a subsequent library release or send
+a code fix to users so that their work is minimally interrupted.
+
+LLNL users may report bugs using the LLNL Sourceforge site if 
+you have a sourceforge account:
+
+https://sourceforge.llnl.gov/sf/tracker/do/listTrackers/projects.samrai/tracker
+
+Bugs found by other users should send email to samrai-bugs at llnl.gov.
+
+*****************************************************************************
+
+-----------------------------------------------------------------------------
+                Summary of what's changed
+-----------------------------------------------------------------------------
+
+This section contains a summary of changes to SAMRAI.  More detailed
+descriptions of items in the following list are provided below.
+
+(1) The fill_time argument was removed from the interface for
+RobinBcCoefStrategy::setBCCoefs(). 
+ 
+(2) The VisItDataWriter was modified to allow for the writing of data in
+VisIt's sparse volume fraction format for mixed cells. 
+
+(3) Added tolerance for LoadBalancer.
+
+(4) Added LC "uP" machine to supported configurations.
+
+(5) Added limited Mac OS X support.
+
+(6) Bug fixes
+ 
+----------------------------------------------------------------------------
+                Summary of what's new
+-----------------------------------------------------------------------------
+
+This section contains a summary of additions to SAMRAI.  More detailed
+descriptions of items in the following list are provided below.
+
+(1) 
+
+-----------------------------------------------------------------------------
+-----------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------
+                Details about what's changed
+-----------------------------------------------------------------------------
+
+(1) The fill_time argument was removed from the interface for
+RobinBcCoefStrategy::setBcCoefs().  As this is a pure virtual function,
+several classes in source/solvers/poisson that inherit from
+RobinBcCoefStrategy inherited this change in their implementations of
+setBcCoefs().
+
+(2) The VisItDataWriter was modified to allow for the writing of data in
+VisIt's sparse volume fraction format for mixed cells.  This means that
+it is now possible to write data for cells that contain mixed materials
+so that the state of each material can be represented separately within
+a cell when viewed through VisIt.  VisIt versions 1.7.1 and later are
+capable of reading files that are dumped using this functionality.
+
+(3) A tolerance value was added to the LoadBalancer to allow a user
+settable tolerance in the comparisons of the computed box workload to
+computed ideal workload.  This enables addition control over when boxes
+are split.  Previously a box was split when
+
+( box_workload <= ideal_workload )
+
+which results in boxes being chopped up even when very near the ideal
+workload, the tolerance value is used to allow for some user specified
+deviation from the ideal workload:
+
+( box_workload <= ( (1. + workload_tolerance) * ideal_workload ) )
+
+a workload_tolerance of 0.0 (the default) retains the previous
+behavior.  
+
+The workload tolerance can be changed by setting the
+"workload_tolerance" in the LoadBalancer input.
+
+artf7699
+
+(4) Minor changes where made to fix compilation and linking issues
+with the IBM xlc compilers for the Livermore Computing "uP" machine.
+
+artf7701
+
+(5) Fixed problems identified by Kevin Chu when compiling on Mac OS X.
+Configure scripts should better identify OS X and fixed several small
+code issues.
+
+NOTE: The SAMRAI team has limited access to a Mac so this port has
+very limited support from our team.  We do try to encorporate user
+supplied fixes for bugs and porting issues.
+
+artf7714
+
+(6) The following additional bug fixes from sourceforge were fixed:
+
+Restart-redistribute utilty caused a compilation error when compiling without HDF.  artf7667
+
+Guards for inline control where incorrect and caused problem when users were including SAMRAI files.  artf7690
+
+Intel remark messages were showing potential problems when compiling.
+Examined and fixed or ignored serious problems.  Some remarks are
+being ignored since they are not problems. artf7680
+
+----------------------------------------------------------------------------
+-----------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------
+                Details about what's new
+-----------------------------------------------------------------------------
+
+(1) 
+
+-----------------------------------------------------------------------------
+                Known Problems
+-----------------------------------------------------------------------------
+
+(1) 
+
+=============================================================================
+=============================================================================
diff -r 000000000000 -r 5eda1a3f24e8 docs/release/version-2.3.0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/release/version-2.3.0	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,417 @@
+*****************************************************************************
+  Copyright 1997-2010
+  Lawrence Livermore National Security, LLC.
+  All rights reserved.
+*****************************************************************************
+
+                     Release Notes for SAMRAI v2.3.0
+
+     (notes for previous releases may be found in /SAMRAI/docs/release)
+
+*****************************************************************************
+
+NOTE:  These release notes are more descriptive and detailed than is usual
+       for software release notes.  The reason for this is that presently
+       complete documentation does not exist for most of the items listed.
+       Until sufficient user documentation becomes available, descriptions
+       such as those that follow will be part of SAMRAI release notes.
+
+Please direct any questions related to these notes to the SAMRAI development
+team by sending email to samrai at llnl.gov.
+
+LLNL users can use the discussion groups on the LLNL Sourceforge site:
+
+https://sourceforge.llnl.gov/sf/discussion/do/listForums/projects.samrai/discussion
+
+*****************************************************************************
+
+Where to report Bugs
+--------------------
+
+If a bug is found in the SAMRAI library, we ask that you kindly report it
+to us so that we may fix it.  We will make every effort to fix bugs
+in a timely manner.  Depending on the severity or the complexity of the
+bug, we will either fix the bug for a subsequent library release or send
+a code fix to users so that their work is minimally interrupted.
+
+LLNL users may report bugs using the LLNL Sourceforge site if 
+you have a sourceforge account:
+
+https://sourceforge.llnl.gov/sf/tracker/do/listTrackers/projects.samrai/tracker
+
+Bugs found by other users should send email to samrai-bugs at llnl.gov.
+
+*****************************************************************************
+
+----------------------------------------------------------------------------
+                Summary of what's new
+-----------------------------------------------------------------------------
+
+This section contains a summary of additions to SAMRAI.  More detailed
+descriptions of items in the following list are provided below.
+
+(1) User control over SAMRAI logging via a new Logger class.
+
+(2) Round method added to MathUtilities class.
+
+(3) Query function that tells location of BoundaryBox added
+
+(4) Capability for user to manually set decomposition and load balance of
+    coarsest level in a hierarchy 
+
+(5) Additional options for writing SAMRAI restart files.
+
+(6) Configure option for deprecated features.
+
+-----------------------------------------------------------------------------
+                Summary of what's changed
+-----------------------------------------------------------------------------
+
+This section contains a summary of changes to SAMRAI.  More detailed
+descriptions of items in the following list are provided below.
+
+(1) Building with/without extra types working again.
+
+(2) Fixed bug in KINSOL wrapper when setting MaxKrylovDimension.
+
+(3) Improved template instantiation for STL classes.
+
+(4) KAI KCC compiler code removed.
+
+(5) configure and standard environment variables
+
+(6) Intel icc rpath configure improved
+
+(7) Improved MS VC++ support.
+
+(8) Compiling in source directory.
+
+(9) Calculation of timer overhead values
+
+(10) Nonlinear example code was not working with KINSOL and regridding.
+
+(11) KINSOL initialize method interface change.
+
+(12) PETSC differencing parameter strategy default set to WP
+
+(13) Array constructor interface no longer takes optional is_standard_type flag.
+
+(14) "getNumber" methods renamed to "getNumberOf"
+
+(15) Make tools is separated from library build
+
+(16) Added index operator[] to BoxArray class.
+
+(17) PatchGeometry API for getting patch boundaries changed to
+     get*Boundaries from get*Boundary.
+
+(18) Gridding algorithm ratio_to_coarser input will fill in missing 
+     values.
+
+*****************************************************************************
+
+-----------------------------------------------------------------------------
+                Details about what's new
+-----------------------------------------------------------------------------
+
+(1) User control over SAMRAI logging.
+
+Two new classes have been introduced to enable user control over the
+logging of SAMRAI messages.  This should allow for better integration
+to applications.
+
+The tbox::Logger is a singleton class with methods to log messages.
+All SAMRAI log messages are sent to this class (e.g. logWarning()
+method ).  tbox::Logger delegates the mechanism of logging to the
+Logger::Appender class.  Default implementations of this class are
+provided to replicate previous behavior of logging to the plog stream.
+
+The user may supply Logger::Appender implementations to direct SAMRAI
+messages to a different destination, most commonly an application
+specific logging mechanism.  See the
+source/test/logger/userloggertest.C file for a simple example and the
+Logger documentation for API information.
+
+NOTE: The logging API in tbox::Utilities was removed.  If this was
+being used the logging methods in the tbox::Logger class should be
+used instead.  If the TBOX_ABORT and TBOX_WARNING macros are being
+used, no changes are required.
+
+
+(2) Round method added to MathUtilities class.
+
+For portability a round method was added to the MathUtilities class
+since cmath does not yet have a round method.
+
+(3) Query function that tells location of BoundaryBox added
+
+BoundaryBox::getBoundaryDirection enables the querying of a BoundaryBox
+to determine whether the boundary box is above or below a patch in a given
+coordinate direction.  It returns the enumerated type 'BoundaryDirection' which
+can have the value 'LOWER', 'MIDDLE', or 'UPPER'.
+
+
+(4) Capability for user to manually set decomposition and load balance of
+coarsest level in a hierarchy
+
+TimeRefinementIntegrator::initializeHierarchy now has optional arguments with
+which a user can specify the decomposition and load balance of the coarsest
+level of the new hierarchy.  The arguments are a BoxArray that specifies the
+box decomposition of the level, and a ProcessorMapping that maps each box in
+the decomposition to a processor.
+
+(5) Additional options for writing SAMRAI restart files.
+
+API's are supplied for writing SAMRAI restart files to a SILO file and
+options have been added to enable writing SAMRAI restart information
+to a file (SILO/HDF) supplied by the application.  This will enable a
+SAMRAI application to store the SAMRAI specific restart data to the
+applications existing file rather than creating a separate one.
+
+See docs/userdocs/userguide.pdf for more information.
+
+(6) Configure option for deprecated features.
+
+The configure script option "--enable-deprecated" and
+"--disable-deprecated" may be used to include/exclude deprecated
+features from the build.  Deprecated features will be removed from
+future SAMRAI releases; the most frequent deprecation is removal of a
+method from a class.
+
+The default is to enable deprecated features for backwards compatibility.
+
+-----------------------------------------------------------------------------
+                Details about what's changed
+-----------------------------------------------------------------------------
+
+(1) Building with/without extra types working again.
+
+The SAMRAI configure script takes optional arguments to build the
+template types on bool, char, float, and dcomplex:
+
+  --enable-char           build char patch datatypes
+  --enable-float          build float patch datatypes
+  --enable-bool           build boolean patch datatypes
+  --enable-dcomplex       build double complex patch datatypes
+
+This feature was broken in previous releases and all the types were
+built regardless of what was specified on the configure line. These
+types are no longer built by default, the --enable flag for that type
+is required.
+
+The number of object files when building the default configuration was
+reduced to 1544 from 2240 and the libraries were reduced to 147MB from
+177MB (under Linux GNU 4.2.2).
+
+(2) Fixed bug in KINSOL wrapper when setting MaxKrylovDimension.
+
+Was setting setMaxIterations(d_max_krylov_dimension) when this should
+have been setMaxKrylovDimension(d_max_krylov_dimension).
+
+art7816  
+
+(3) Improved template instantiation for STL classes.
+
+Since SAMRAI is normally compiled using explicit template
+instantiation, the instantiation of the STL classes caused an
+explosion of templates that were required by STL.  To address this
+issue the toolbox/templates/special directory is now compiled with
+implicit template instantiation.  This should eliminate a number of
+problems with unresolved symbols when compiling the library.
+
+The SAMRAI team is currently evaluating the explicit template
+instantiation decision.  When this decision was originally made the
+difference in compilation times was over 30 minutes.  With faster
+machines and better compilers this is not as significant a problem.
+
+(4) KAI KCC compiler code removed.
+
+The old KAI KCC support was stripped from the configure scripts and
+other files.  KCC had not been supported for some time by SAMRAI and
+all references to it have been or will removed.
+
+(5) configure and standard environment variables
+
+Several users reported problems with configure and standard configure
+environment variables (e.g. CFLAGS etc).  The SAMRAI configure script
+was not including these in the Makefile.config.  The Makefile.config
+should now include the flags mentioned in configure --help notes and
+use them during the compilation of the library.
+
+(6) Intel icc rpath configure improved
+
+Intel compilation detection of shared library path syntax was improved
+in autoconf.  The previous configure script was not able to determine
+the syntax for including a shared library directory in the link line
+(e.g. -rpath, -R etc).  This was improved so users should not have to
+manually specify the syntax on the configure line in most cases.  This
+was specific to the Intel icc compiler.
+
+(7) Improved MS VC++ support.
+
+Minor changes to code were made to enable compiling with Microsoft
+Visual Studio 2008.  This is based on user submitted patches and is
+not tested by the SAMRAI team.
+
+(8) Compiling in source directory.
+
+Configuring and compiling in the source directory should work again.
+This is not the recommended compilation model, we suggest creating an
+object directory and configuring/compiling in it.
+
+(9) Calculation of timer overhead values.
+
+The timer overhead values were hard-coded and not correct on most
+machines; these values are now being computed at runtime.
+
+(10) Nonlinear example code was not working with KINSOL and regridding.
+
+The nonlinear example code had a problem with some smart pointer
+manipulation which was causing a bug when regridding was turned on and
+KINSOL was being used.
+
+(11) KINSOL initialize method interface change.
+
+This change only effects KINSOL users who are setting one of the
+scaling vectors.
+
+The KINSOL initialize method previously took a single argument and the
+solution and residual scaling vectors were set using additional "set"
+methods.  This was replaced with a single initialize method that has
+two optional arguments for setting the scaling vectors.
+
+So the following three methods:
+
+void initialize(SundialsAbstractVector* solution);
+
+void setSolutionScaleVector(SundialsAbstractVector* uscale);
+
+void setResidualScaleVector(SundialsAbstractVector* fscale);
+
+are replaced with a single initialize method of:
+
+void initialize(SundialsAbstractVector* solution, 
+     SundialsAbstractVector* uscale = NULL, 
+     SundialsAbstractVector* fscale = NULL); 
+
+(12) PETSc differencing parameter strategy default set to WP
+
+Previous releases used the value "default" as the default value for
+the differencing parameter strategy, this was changed to be the PETSc
+value of MATMFFD_WP to match current PETSc API.  This can be set to
+MATMFFD_DS via the setDifferencingParameterMethod method of
+SNES_SAMRAIContext.  See PETSc documentation for more information on
+these options.
+
+This should not change the behavior but should remove a warning
+message being generated by PETSc.
+
+(13) Array constructor interface no longer takes optional is_standard_type flag.
+
+The Array constructors previously had an optional flag to signal if
+the templated type was one of the standard (builtin) types.  The
+mechanism to determine if the templated type is a standard type was
+moved inside the Array class and this flag is no longer supported.
+
+art7725
+
+(14) "getNumber" methods renamed to "getNumberOf"
+
+Users reported naming differences in the methods that return the
+number of something.  Both "getNumber" and "getNumberOf" were used.
+The method names were changed to be "getNumberOf".
+
+A conversion script "convert2.3" in tools/scripts/conversion2.3 will
+do a text replacement of the names on a source code tree.  See the
+README in the conversion2.3 directory for more information.
+
+The following names were changed:
+
+getNumberBlocks
+getNumberBoundaryNodes
+getNumberEquivalenceClasses
+getNumberItems
+getNumberItemsInEquivalenceClass
+getNumberIterations
+getNumberLevels
+getNumberNearestNeighborNodes
+getNumberNeighbors
+getNumberOutsideNeighborNodes
+getNumberRegisteredPatchDataIndices
+getNumberRegisteredVariableContexts
+getNumberRegisteredVariables
+
+art8253
+
+(15) Make tools is separated from library build.
+
+The SAMRAI tools are built using 
+
+make tools
+
+instead of building automatically built with the library.  This is
+currently only used to build the restart-redistribute utility.
+
+(16) Added index operator[] to BoxArray class
+
+The BoxArray class was using getBox() and operator "()" as operator to index.  The more
+familiar "[]" operator was added.
+
+E.G.
+BoxArray<2> boxes;
+boxes[0] = box;
+
+Is more array like than the previous:
+
+boxes(0) = box;
+
+getBox() and operator() are deprecated and will be removed.
+
+
+(17) PatchGeometry API for getting patch boundaries changed to
+     get*Boundaries from get*Boundary.
+
+SAMRAI does not have a consistent naming convention for boundary
+information.  Various classes use Boundaries, Boundary, and/or
+BoundaryBoxes for the same notion of a set of BoundaryBox that
+describe a boundary.
+
+PatchGeometry's API was change from get*Boundary methods to
+get*Boundaries method to match other classes (e.g. CoarseFineBoundary)
+as a minor step towards increasing the consistency of the names.  This
+is only a partial fix for a larger naming problem.
+
+(18) Gridding algorithm ratio_to_coarser input will fill in missing 
+     values.
+
+The array of level values for ratio_to_coarser will use the finest
+value supplied for levels that are finer in the same manner as the
+other gridding algorithm input.
+
+For example:
+
+   max_levels = 3         // Maximum number of levels in hierarchy.
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 4 , 4
+      // all finer levels will use same values as level_0...
+   }
+
+
+Is the same as:
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 4 , 4
+      level_2 = 4 , 4
+   }
+
+*****************************************************************************
+
+-----------------------------------------------------------------------------
+                Known Problems
+-----------------------------------------------------------------------------
+
+(1) 
+
+=============================================================================
+=============================================================================
diff -r 000000000000 -r 5eda1a3f24e8 docs/release/version-2.4.0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/release/version-2.4.0	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,209 @@
+*****************************************************************************
+  Copyright 1997-2010
+  Lawrence Livermore National Security, LLC.
+  All rights reserved.
+*****************************************************************************
+
+                     Release Notes for SAMRAI v2.4.0
+
+     (notes for previous releases may be found in /SAMRAI/docs/release)
+
+*****************************************************************************
+
+NOTE:  These release notes are more descriptive and detailed than is usual
+       for software release notes.  The reason for this is that presently
+       complete documentation does not exist for most of the items listed.
+       Until sufficient user documentation becomes available, descriptions
+       such as those that follow will be part of SAMRAI release notes.
+
+Please direct any questions related to these notes to the SAMRAI development
+team by sending email to samrai at llnl.gov.
+
+LLNL users can use the discussion groups on the LLNL Sourceforge site:
+
+https://sourceforge.llnl.gov/sf/discussion/do/listForums/projects.samrai/discussion
+
+*****************************************************************************
+
+Where to report Bugs
+--------------------
+
+If a bug is found in the SAMRAI library, we ask that you kindly report it
+to us so that we may fix it.  We will make every effort to fix bugs
+in a timely manner.  Depending on the severity or the complexity of the
+bug, we will either fix the bug for a subsequent library release or send
+a code fix to users so that their work is minimally interrupted.
+
+LLNL users may report bugs using the LLNL Sourceforge site if 
+you have a sourceforge account:
+
+https://sourceforge.llnl.gov/sf/tracker/do/listTrackers/projects.samrai/tracker
+
+Bugs found by other users should send email to samrai-bugs at llnl.gov.
+
+*****************************************************************************
+
+----------------------------------------------------------------------------
+                Summary of what's new
+-----------------------------------------------------------------------------
+
+This section contains a summary of additions to SAMRAI.  More detailed
+descriptions of items in the following list are provided below.
+
+(1) 'allow_patches_smaller_than_minimum_size_to_prevent_overlaps' flag added
+to GriddingAlgorithm.
+
+(2) 'check_overlapping_patches' flag added to GriddingAlgorithm.
+
+
+-----------------------------------------------------------------------------
+                Summary of what's changed
+-----------------------------------------------------------------------------
+
+This section contains a summary of changes to SAMRAI.  More detailed
+descriptions of items in the following list are provided below.
+
+(1) Improved support for implicit template instantiation
+
+(2) Added support for current HDF releases.
+
+(3) Removed fixed number of timers and statistics.
+
+(4) IndexData underwent a significant rewrite.
+
+(5) Configure scripts improved.
+
+(6) 'resolve_nonnesting_tags' input flag in GriddingAlgorithm changed.
+
+(7) extra behavior of 'allow_patches_smaller_than_ghostwidth" flag in
+GriddingAlgorithm removed.
+
+*****************************************************************************
+
+-----------------------------------------------------------------------------
+                Details about what's new
+-----------------------------------------------------------------------------
+
+(1) 'allow_patches_smaller_than_minimum_size_to_prevent_overlaps' flag added
+to GriddingAlgorithm.
+
+When this flag is set to false, the default value, patches created for a
+new level are grown to enforce the minimum patch size.  This sometimes causes
+there to be patches on a level that overlap in index space.  For users who
+want to prevent this kind of overlap, this flag should be set to true.  Users
+who used the flag 'allow_patches_smaller_than_ghostwidth' to prevent overlaps
+should now use this flag instead.
+
+(2) 'check_overlapping_patches' flag added to GriddingAlgorithm.
+
+This flag can cause the checking of a newly-created level for any overlapping
+patches.  The user can select 'i' (ignore), the default value, to skip the
+check completely, 'w' (warn) to check for overlapping patches and output a
+warning if any exist, or 'e' (error) to stop the run with an error if any
+exist.  The check can be expensive, so the 'w' and 'e' options are
+recommended only for debugging in applications that need to prevent overlaps.
+
+-----------------------------------------------------------------------------
+                Details about what's changed
+-----------------------------------------------------------------------------
+
+(1) Improved support for implicit template instantiation
+
+Previous releases of SAMRAI had a configure option to optionally use
+an implicit instantiation model when compiling via the
+
+   --enable-implicit-template-instantiation
+
+flag.  The support was incomplete as SAMRAI compiled files with
+explicit instantiated statements for all the templates.  Thus the
+library was much larger than strictly necessary.  With implicit
+compilation the compiler is responsible for doing the instantiations
+so SAMRAI's manual explicit statements are redundant.
+
+The make system was changed so that when the implicit compilation mode
+is used the explicit instantiation statements are bypassed (basically
+the "templates" directories are ignored).   
+
+This results in dramatic smaller SAMRAI libraries and reduced build
+times for the library.  Note that with implicit template instantiation
+there is a potential for increased application compilation times
+(since the templates are built when the application needs them by the
+compiler).
+
+In testing the SAMRAI team has found that some platforms/compilers
+actually achieve better overall compilation times with the implicit
+mode.  On a local IBM PowerPC machine using XLC we have observed a 50%
+reduction in building the example codes.  When using GCC on a desktop
+machine the application compile times increased by a factor of 3 when
+using the implicit compilation mode.
+
+(2) Added support for current HDF releases.
+
+HDF versions 1.8.x changed the API.  The SAMRAI HDF classes now
+support the 1.6.x and 1.8.x API's.  Most of the testing and running is
+currently still done with HDF 1.6.x
+
+(3) Removed fixed number of timers and statistics.
+
+Previous versions allocated a fixed number of timers and statistics.
+This limitation was removed and the TimerManager and Statistician
+singletons can handle any number of timers (subject to memory
+limitations).
+
+The API for SAMRAIManager was changed to remove the following methods
+(which are no longer needed):
+
+getMaxNumberTimers();
+setMaxNumberTimers(int maxnum);
+getMaxNumberStatistics();
+setMaxNumberStatistics(int maxnum);
+
+(4) IndexData underwent a significant rewrite.
+
+IndexData, IndexVariable, and IndexDataFactory types are now have a
+template parameter for the BoxGeometry being used.  Previously
+IndexData was hard-coded for cell centered data only.  To recreate old
+behavior simply add pdat::CellGeometry<DIM> to the template
+parameters list.
+
+The performance of IndexData for several operations was improved.
+Removal of items was particularly poor requiring an O(N) where N is
+number of items stored.  These were fixed to be O(1).  Other
+operations were also optimized to improve performance by a
+factor of 2-3.
+
+The API was extended to include new methods for insertion of items
+that will improve performance in specific use cases.  See
+documentation for IndexData replaceAddItem and addItemPointer for
+additional information.
+
+(5) Configure scripts improved.
+
+The autoconf configure scripts were improved, primarily in adding
+better Fortran name mangling support.
+
+(6) 'resolve_nonnesting_tags' input flag in GriddingAlgorithm changed
+
+The input flag 'resolve_nonnesting_tags' in GriddingAlgorithm has been
+changed to 'check_nonrefined_tags'.  If the tagging operation creates a tag
+that violates the nesting requirements, its location in index space
+will not be refined when creating a finer level.  This flag allows the
+user to determine what to do when this occurs, whether to ignore the tag
+completely, output a warning, or stop execution of the run with an error
+message.
+
+(7) extra behavior of 'allow_patches_smaller_than_ghostwidth" flag in
+GriddingAlgorithm removed.
+
+Previously, this flag, when set to true, allowed the minimum patch size to
+be smaller than the maximum ghost width of the problem, and it also
+suppressed the strict enforcement of the minimum patch size.  Now, it only
+has the first effect, allowing a user to specify a minimum patch size
+smaller than the maximum ghost width.  Users who used this flag to prevent
+patches on a level from overlapping should no use the flag
+'allow_patches_smaller_than_minimum_size_to_prevent_overlaps'. (See "What's
+New".)
+ 
+
+=============================================================================
+=============================================================================
diff -r 000000000000 -r 5eda1a3f24e8 docs/release/version-3.1.0-beta
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/release/version-3.1.0-beta	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,856 @@
+*****************************************************************************
+  Copyright 1997-2010
+  Lawrence Livermore National Security, LLC.
+  All rights reserved.
+*****************************************************************************
+
+                     Release Notes for SAMRAI v3.1.0-beta
+
+     (notes for previous releases may be found in /SAMRAI/docs/release)
+
+*****************************************************************************
+
+Please direct any questions related to these notes to the SAMRAI development
+team by sending email to samrai at llnl.gov.
+
+LLNL users can use the discussion groups on the LLNL Sourceforge site:
+
+https://sourceforge.llnl.gov/sf/discussion/do/listForums/projects.samrai/discussion
+
+*****************************************************************************
+
+Where to report Bugs
+--------------------
+
+If a bug is found in the SAMRAI library, we ask that you kindly report
+it to us so that we may fix it.  LLNL users may report bugs using the
+LLNL Sourceforge site if you have a sourceforge account:
+
+https://sourceforge.llnl.gov/sf/tracker/do/listTrackers/projects.samrai/tracker
+
+Bugs found by other users should send email to samrai-bugs at llnl.gov.
+
+*****************************************************************************
+
+----------------------------------------------------------------------------
+                Summary of what's new
+-----------------------------------------------------------------------------
+
+This section contains a summary of additions to SAMRAI.  More detailed
+descriptions of items in the following list are provided below.
+
+(1) Enhanced scalability.
+
+(2) Added PatchLevelFillPattern class
+
+(3) Added VariableFillPattern class
+
+(4) New configure options added for inlining and assertions checking
+
+(5) New configure options added for the zlib compression library.
+
+(6) Environment variable for forcing abort to be called on exit.
+
+(7) PatchHierarchy and MultiblockPatchHierarchy take input databases.
+
+(8) New configure option to disable SAMRAI timers (--disable-timers).
+-----------------------------------------------------------------------------
+                Summary of what's changed
+-----------------------------------------------------------------------------
+
+This section contains a summary of changes to SAMRAI.  More detailed
+descriptions of items in the following list are provided below.
+
+(1) Include file location changes and SAMRAI source directory restructuring.
+
+(2) Removed templating on Dimension.
+
+(3) Compiler support and library support.
+
+(4) Removed Vizamrai utility and writer.
+
+(5) LoadBalancer renamed to ChopAndPackLoadBalancer.
+
+(6) AsyncCommStage interface names changed for clarity.
+
+(7) set/getDefaultDepth method name changes in DataFactories.
+
+(8) Arena memory allocation classes removed.
+
+(9) Using parallel HDF5.
+
+(9) RefineOperator::refine() interface changed.
+
+(10) RefineOperator::refine() interface changed
+
+(11) Increased number of digits for processor, patch based names.
+
+(12) Template instantiation model changed to implicit and explicit
+     option removed.
+
+(13) Renamed getOneIntVector and getZeroIntVector.
+
+(14) XLF function names changed to no-underscore.
+
+(15) Inline control macros changed.
+
+(16) Implicit tbox::Pointer conversion not allowed.
+
+(17) Connectors and MappedBoxLevels initialization uses references.
+
+(18) Changes to data and accessors in MappedBoxLevel and Connector.
+
+(19) Changing neighbor set in Connectors must use specific methods.
+
+(20) Changed allocate interface to PatchDataFactory.
+
+(21) Changed names of overlap and mapping Connector utilty classes.
+
+(22) PatchLevel::Iterator now returns a Pointer<Patch> instead of
+     the patch number.
+
+(23) IntVector implicit conversion to raw int[] array removed.
+
+(24) SAMRAI timers now enforce ordering of start/stop methods.
+
+(25) AbstractStream and FileStream clases were removed, MessageStream 
+     interface changed.
+
+(26) SAMRAIManager initialize and finalize methods added.
+
+(27) tbox::ShutdownManager renamed to tbox::StartupShutdownManager.
+
+(28) Type names in SAMRAI_MPI have been capitalized.
+
+(28) SAMRAI now uses an exclusive MPI communicator by default.
+
+(29) SAMRAI_MPI interfaces have been expanded.
+
+(30) SAMRAI_MPI interfaces changed to avoid using static communicator.
+
+(31) Optional types no longer optional.
+
+(32) Dimension class no longer supports implicit conversion to an unsigned short.
+
+(33) Major changes in SAMRAI_MPI class, requiring users to change some
+     code.
+
+(34) Configuration changes for running on BG platform.
+
+(35) Each gridding algorithm is now tied to a specific hierarchy,
+     affecting public interfaces.
+
+(36) Some parameters and accessors in GriddingAlgorithm and
+     MultiblockGriddingAlgorithm input databases have been relocated
+     to the new PatchHierarchy and MultiblockPatchHierarchy input
+     databases, respectively.
+
+(37) VariableDatabase now has an added method to remove Variables from the
+     database.
+
+(38) Triple-option parameters in GriddingAlgorithm and MultiblockGriddingAlgorithm
+     have been changed from char to string.
+
+(39) Nested enum type BoundaryDirection in BoundaryBox changed to
+     BoundaryOrientation 
+
+(40) Old, backward-compatible numbering scheme for the location index values
+of 3D edge (codimension 2) BoundaryBox objects has been removed.
+
+(41) Patch number (and various ways to identify a local patch) has
+been changed from an int to a LocalId.
+
+(42) Patch::getPatchNumber() has been renamed to Patch::getLocalId().
+
+(43) setCreateGhostOverlaps() has been removed from RefineAlgorithm.
+
+*****************************************************************************
+
+-----------------------------------------------------------------------------
+                Details about what's new
+-----------------------------------------------------------------------------
+
+(1) Enhanced scalability.
+
+Previous versions of SAMRAI stored a complete map of patches to owning
+processor in every MPI task.  This was not a scalable data
+representation.  This simple scheme was replaced with a distributed
+storage scheme where each MPI task only stores information needed for
+neighboring patches and processors.  Algorithms that previously
+unscalable (order number of MPI tasks) were restructured to scale more
+efficiently.
+
+(2 & 3) PatchLevelFillPattern and VariableFillPattern are new abstract base
+classes that allows users greater control of where data will be filled
+by RefineSchedule and CoarsenSchedle.
+
+ - PatchLevelFillPattern replaces string fill_pattern arguments that were
+available in some of the RefineAlgorithm::createSchedule() interfaces.
+Instead of those strings, users should pass in a pointer to a
+PatchLevelFillPattern object.  The current options are:
+
+PatchLevelFullFillPattern -- Fill all destination regions that can be filled.
+                             Equivalent to old "DEFAULT_FILL" option.
+PatchLevelInteriorFillPattern -- Fill interiors of destination level patches.
+                                 Equivalent to "FILL_INTERIORS_ONLY" option.
+PatchLevelBorderFillPattern -- Fill ghost regions outside of patch interiors--
+                               that is at physical and coarse-fine boundaries.
+                               Equivalent to "FILL_LEVEL_BORDERS_ONLY"
+PatchLevelBorderAndInteriorFillPattern -- Fill patch interiors as well as
+                                          ghost regions at physical and
+                                          coarse-fine boundaries.  Equivalent
+                                          to "FILL_LEVEL_BORDERS_AND_INTERIORS".
+
+There remain versions of RefineAlgorithm::createSchedule() which have no
+PatchLevelFillPattern argument.  These will invoke PatchLevelFullFillPattern
+by default.
+
+ - VariableFillPattern provides an interface that can be used to control
+where data will be filled on an item-by-item basis in a refine or coarsen
+schedule.  The object is given to the RefineAlgorithm or CoarsenAlgorithm
+as an argument to registerRefine or registerCoarsen.  If no argument is
+given, then BoxGeometryFillPattern is used by default.  BoxGeometryFillPattern
+preserves the existing behavior of computing full overlaps between source
+and destination levels.
+
+
+(4) New configure options added for inlining and assertions checking
+
+The configure script has options to control the use of inlining and
+assertion checking:
+
+--enable-inline
+--enable-check-assertions
+
+The default is to use inlining and no assertion checking.  Note that
+--enable-debug will turn off inlining and enable assertion checking to
+match previous debug behavior.
+
+(5) New configure options added for the zlib compression library.
+
+--with-zlib=DIR
+
+enables including building with the zlib compression library for when 
+HDF and SILO are built with it.  Default paths are /usr/local/ and /usr.
+The default is to build without zlib.
+
+(6) Environment variable for forcing abort to be called on exit.
+
+If the environment variable SAMRAI_ABORT_ON_ERROR is set a SAMRAI
+error will call "abort" rather than exit or MPI_Abort.  "abort" causes
+a core dump and is thus useful for debugging the location of an error. 
+
+NOTE: For MPI jobs this flag may cause the job to not cleanup correctly and
+leave processes running etc.
+
+(7) PatchHierarchy and MultiblockPatchHierarchy take input databases.
+
+PatchHierarchy's database should be used to set a number of parameters
+that used to be set in the GriddingAlgorithm.  In general, parameters
+describing the characteristics of the hierarchy (such as the max number
+of levels allowed, the refinement ratios, etc.) are now owned by the
+hierarchy.  Parameters describing how the mesh should be generated
+(such as the clustering efficiency and whether to skip certain
+steps in the standard mesh generation) remain in the GriddingAlgorithm.
+
+See source code docs in PatchHierarchy.h and GriddingAlgorithm.h
+for the current set of input parameters.
+
+MultiblockPatchHierarchy takes the number of block and a PatchHierarchy
+database that is used to build the PatchHierarchies.  These parameters
+have been removed from MultiblockGriddingAlgorithm.
+
+(8) New configure option to disable SAMRAI timers (--disable-timers).
+
+Timers will be overhauled in the future, but in the meantime, they can be
+disabled by using the "--disable-timers" option on the configure line.  In
+tests, this provides approximately a 2.5x speedup in raw timer execution.
+-----------------------------------------------------------------------------
+                Details about what's changed
+-----------------------------------------------------------------------------
+
+(1) Include file location changes and SAMRAI source directory restructuring.
+
+In order to avoid naming collisions with other packages, SAMRAI now
+uses a longer #include names for header files.  The names of the
+header files are now prefixed with a directory structure mirroring the
+namespace in which the classes appear.  This involves a bit more
+typing but should make conflicts very unlikely.  Several SAMRAI
+includes were very likely to cause conflicts (e.g. Grid, Box,
+Hierarchy, ProcessID etc).
+
+For example, previously you would use:
+
+#include "Variable.h"
+
+this is now replaced with a path prefix:
+
+#include "SAMRAI/hier/Variable.h"
+
+A perl script is provided which will search for #includes and replace
+the 2.x include with the new namespace include.
+
+It is a very good idea to make sure you have a backup of files before
+running the script in case something goes very wrong.  This script was
+used to convert the SAMRAI code base and some user applications but
+being a little paranoid is a good thing when it comes to automatic
+source code manipulation.
+
+IMPORTANT WARNING: This script looks for patterns of "#include
+<SAMRAI_header>" and replaces them.  If you have classes with the same
+name as SAMRAI classes this script will replace those includes as
+well.
+
+To invoke the script run with the directory to convert:
+
+<SAMRAI_INSTALL_DIR>/tools/scripts/conversion3.0/convertIncludePaths <directory to convert>
+
+The script will search the directory (and subdirectories) for C++
+source files and replace existing #includes with the path prefixed
+version.  Note that the script is NOT smart enough to distinguish
+SAMRAI header includes from other packages.  So if you are using
+another package that has .h file naming conflicts (uses the header
+file name as SAMRAI).  files the script will blindly think they are
+all SAMRAI headers.  For example if you are using a package that has a
+"Box.h" header file, the script will change the include to be
+"SAMRAI/hier/Box.h" since it assumes all "Box.h" includes refer to
+SAMRAI.
+
+For developers who frequently look at the SAMRIA source directory, you
+will also see some significant changes.  The includes directory that was
+in created in the compilation directory is no longer needed.  This
+removes the confusion of the links/copies that were being created.
+The source directory was also greatly simplified.  The subdirectory
+structure in each of the packages was removed so files for each
+package sit in the package directory in source/SAMRAI/<package>.  To
+find a class you only need to know it's package.
+
+(2) Removed templating on Dimension.
+
+Previous versions of SAMRAI used a template parameter to specify the
+problem dimension.  This presented serious limitations for codes that
+specify problem dimension in as an input parameter.  In order to
+better accommodate this usage pattern the templating on dimension was
+removed and replaced (when needed) with an additional dimension
+argument to the constructor.  Classes that do not require or could
+determine dimension from another constructor argument do not need a
+dimension.
+
+The dimension is represented as a Dimension object.  This is
+essentially just an integer but a class was used to enhance type
+safety.  The Dimension class will make it harder to accidentally use an
+integer when a dimension is required.
+
+This change also facilitates creating higher level SAMRAI classes that
+have two or more dimensions used within them.  Several LLNL codes plan
+to use this new flexibility.
+
+This change will frankly be painful.  A perl script is provided to
+help remove the templating on dimension.  This script will help but
+does not complete the process.  It replaces class names with the
+untemplated names but does not add the Dimension objects to the
+constructors as we don't know what the Dimension is.  You will need to
+supply a Dimension object to the constructors.  The compiler will
+issue an error if you forget to include one so it should be extremely
+hard to mess this conversion up (albeit extraordinarily boring).  In
+conversion done by the SAMRAI team IntVector was the most frequently
+constructed object needing a Dimension.
+
+Always make sure you have a backup before invoking this script.
+
+To invoke the script run with the directory to convert, as :
+
+<SAMRAI_INSTALL_DIR>/tools/scripts/conversion3.0/removeTemplateOnDim <directory to convert>
+
+(3) Compiler support and library support
+
+The compiler versions used in our regression testing have been
+updated. We no longer test with some older versions.  See INSTALL
+notes for a complete list of compilers tested.
+
+For Linux workstations we have moved to OpenMPI from MPICH.  OpenMPI
+seems to be in wider use in the various Linux distributions.
+
+(4) Removed Vizamrai utilty and writer.
+
+The Vizamrai visualization utility and data writer are no longer supported.  
+Use Visit as a replacement.
+
+
+(5) LoadBalancer renamed to ChopAndPackLoadBalancer.
+
+We now offer two native load balancers.  (The other is TreeLoadBalancer.)
+
+(6) AsyncCommStage interface names changed for clarity.
+
+We changed AsyncCommStage non-blocking communications requests from
+"outstanding" requests to "pending" requests to emphasize that these
+requests not merely allocated on the stage--they are actually in the
+middle of a non-blocking communication.  The AsyncCommStage is not likely
+to directly affect users.
+
+(7) set/getDefaultDepth method name changes in DataFactories.
+
+The DefaultDepth methods were changed for DataFactories.  The
+setDefaultDepth method was removed as setting the depth after factory
+construction is not supported.
+
+getDefaultDepth method was renamed to simply getDepth.
+
+(8) Arena memory allocation classes removed.
+
+The Arena and ArenaManager classes where removed since SAMRAI was not
+using these to do anything useful.  This changes several allocation
+interfaces in the code.  This effects PatchDataFactory, PatchData,
+Patch, PatchLevel, ArrayData, RefineTransactionFactory,
+CoarsentTransactionFactory and derived classes.
+
+To fix existing code simply remove any references to the Arena
+classes in the allocation interfaces.
+
+(9) Using parallel HDf5.
+
+We have begun using parallel HDf5 in some of our environments.  If you
+have an application that requires specifically either serial or parallel
+HDf5, keep in mind that SAMRAI should be able to work with both.  It is
+probably required that you configure SAMRAI with the version required
+by your application.
+
+(10) RefineOperator::refine() interface changed
+
+The Box argument "fine_box" in the refine() interfice has been changed to a
+BoxOverlap argument.  Whereas the old Box argument always was a cell-centered
+box, the BoxOverlap argument will contain boxes in the centering of the data
+to be refined.  In implementations of RefineOperator, the BoxOverlap argument
+should be cast to the appropriate concrete overlap class, and then the
+boxes contained in that overlap object will define the regions onto which data
+should be interpolated.
+
+(11) Increased number of digits for processor, patch based names.
+
+The restart filenames and other names using processor and patch
+numbers where changed to allow for more digits as soon to exist machines are
+larger that they would overflow the previous 5 digits being used.
+
+This means that some input and all old restarts will not be compatible
+between version 2.x and 3.x.
+
+(12) Template instantiation model changed to implicit and explicit
+     option removed.
+
+Previous versions of SAMRAI used the explicit template instantiation
+model.  This was changed due to the removal of the templating on
+dimension which significantly reduced the number of template classes in
+SAMRAI.  Also SAMRAI is increasingly using the STL and the explicit
+template instantiation was problematic on several compilers.
+
+The implicit template instantiation model is now required for SAMRAI.
+
+(13) Renamed getOneIntVector and getZeroIntVector.
+
+The methods to obtain a prebuilt vector of ones or zeros were renamed
+to getOne and getZero due to popular demand.
+
+(14) XLF function names changed to no-underscore.
+
+The name mangling for Fortran names under XLF have been changed to the
+XLF default with no trailing underscore.  This should make the SAMRAI
+compile more in line with normal XLF compiles.
+
+(15) Inline control macros changed.
+
+The macros used to control inline methods have changed to clean up the
+code a bit.  The old DEBUG_NO_INLINE macro was removed and replaced
+with SAMRAI_INLINE (to avoid double negatives) and the old method of
+doing a replacement of the "inline" reserved word was replaced with
+SAMRAI_INLINE_KEYWORD which is null or "inline" if inlining is
+requested.
+
+(16) Implicit tbox::Pointer conversion not allowed.
+
+Previous versions of the SAMRAI tbox::Pointer class allowed implicit
+conversions of raw C++ pointers to the reference counting
+tbox::Pointer.  This allows several uses that can (and did!) lead to
+bugs being introduced.  This "feature" is commonly considered a bad
+thing for smart pointers was removed.
+
+This change will frequently effect Pointer code like:
+
+tbox::Pointer<Foo> foo_ptr = new Foo();
+
+which now needs to be written:
+
+tbox::Pointer<Foo> foo_pt(new Foo());
+
+Which is better as it avoids a temporary construction.
+
+Also passing a raw pointer to a method that takes a tbox::Pointer will
+no longer work, a tbox::Pointer will have to provided.
+
+(17) Connectors and MappedBoxLevels initialization uses references.
+
+MappedBoxLevel and Connector initializations use references to receive
+MappedBoxSet and EdgeSet (respectively) instead of pointers to them.
+In GLOBALIZED mode, all MappedBoxes and EdgeSets are placed in a
+single container instead of one container for each process.  This
+removes the inherent unscalability of GLOBALIZED mode, though
+GLOBALIZED mode is still unscalable if the globalized data is
+unscalable.
+
+(18) Changes to data and accessors in MappedBoxLevel and Connector.
+
+Methods getMapedBoxes() and getEdges() now always return local data.
+To get global data in GLOBALIZED mode, use getGlobalMappedBoxes and
+getGlobalEdges.  To get data for a given process in GLOBALIZED mode,
+specify the process rank using getMappedBoxes(rank) and getEdges(rank).
+These versions return an iterator range instead of a separate
+container for the given rank.  Separate containers are no longer
+available but you can always initialize your own from the range.
+
+Accessors with default specified rank now only work to access local
+data.  Accessing remote data must use the GlobalId, which includes
+the processor rank.
+
+(19) Changing neighbor set in Connectors must use specific methods.
+
+You can no longer directly change the container of neighbors for a
+given MappedBox due to the potential for putting Connectors in an
+inconsistent state.  Instead, use insertNeighbors, eraseNeighbor,
+swapNeighbors and clearNeighbors.
+
+(20) Changed allocate interface to PatchDataFactory.
+
+PatchDataFactory previously defined two virtual allocate methods for
+allocating a PatchData.  The method taking a hier::Box was removed in
+favor of always using the allocate method taking a hier::Patch.  This
+may impact users who are creating their own PatchData types.  Simply
+remove the unneeded allocate(hier::Box &box) method from the factory.
+
+(21) Changed names of overlap and mapping Connector utilty classes.
+
+OverlapConnectorUtility is now OverlapConnectorAlgorithm.
+MappingConnectorUtility is now MappingConnectorAlgorithm.
+
+(21) PatchLevel::Iterator now returns a Pointer<Patch> instead of
+     the patch number.
+
+This change was motivated to allow for the design of a multiblock
+level iterator that can use the same kind of syntax.  We have almost
+complete backward compatibility (see below), although you should
+change your codes from
+  Pointer<Patch> patch = level->getPatch(patch_iterator());
+to
+  Pointer<Patch> patch = *patch_iterator;
+
+One possible failure mode caused by this change is if you have
+  int patch_number = patch_iterator();
+This will implicitly convert the Pointer<Patch> object to an int.
+You should make sure this is no longer done!
+
+To get the patch number from the iterator, use
+  int patch_number = patch_iterator->getPatchNumber();
+
+(23) IntVector implicit conversion to raw int[] array removed.
+
+Previous versions of IntVector had an implicit conversion to a raw
+int[] arrary.  This was dangerous and introduced several bugs.  In
+addition to being at odds with the STL library design.
+
+To get the address of the first element use the STL vector approach of
+taking the address of the first element:
+
+IntVector int_vector;
+int *ptr = &int_vector[0];
+
+Note that this should be done with caution due to dangling referencing
+issues may occur if the IntVector goes out of scope etc.
+
+(24) SAMRAI timers now enforce ordering of start/stop methods.
+
+The tbox::Timer class now enforces that stop must follow a start.
+This was to prevent errors from multiple calls to start followed by a
+stop.   Stop must also follow a start.
+
+Asserts will occur if the correct ordering is not done.
+
+(25) AbstractStream and FileStream clases were removed, MessageStream 
+     interface changed.
+
+The AbstractStream class was removed, replace this with the MessageSteam class.
+
+The FileStream class was removed, use standard C++ classes for I/O.
+
+The interface for MessageStream was changed to use template methods
+for each type rather than the explicitly named method for each type.
+
+For example :
+
+AbstractStream::sizeofBool becomes MessageStream::getSizeof<bool>
+
+(26) SAMRAIManager initialize and finalize methods added.
+
+In order to allow for SAMRAI to be exectued in a mode where multiple SAMRAI
+problems are solved per process the management of startup/shutdown was
+extended from two steps to three.   You need to add
+
+tbox::SAMRAIManager::initialize();
+
+before the tbox::SAMRAIManager::startup() call. and
+
+tbox::SAMRAIManager::finalize();
+
+after the tbox::SAMRAIManager::shutdown() call.
+
+The following method of running is now supported:
+
+tbox::SAMRAIManager::initialize();
+for(some number of times)
+{
+	tbox::SAMRAIManager::startup();
+	tbox::SAMRAIManager::shutdown();
+}
+tbox::SAMRAIManager::finalize();
+
+(27) tbox::ShutdownManager renamed to tbox::StartupShutdownManager.
+
+To support a more complete lifecycle for SAMRAI objects the shutdown
+manager was renamed to StartupShutdownManger.  The new lifecycle
+supports 4 phases, initialize, startup, shutdown, and finalize.
+Startup and shutdown may be called multiple times per run.
+Initialize/finalize are invoked only once per run.
+
+Registration with the StartupShutdownManger takes a
+AbstractHandler class which defines the callback API.  
+
+For convience a Handler class is supplied which provides an
+implementation of AbstractHandler.  Simply provide the callback
+methods to the constructor for Handler and the Handler class registers
+itself with the Manager during construction and calls the methods
+provided.  The priority of the handler must be provided to support
+correct ordering in the case of dependencies between handlers.
+
+Below is an example of creating a handler for the InputManager class:
+
+StartupShutdownManager::Handler InputManager::s_shutdown_handler(
+   0,
+   0,
+   InputManager::shutdownCallback,
+   0,
+   StartupShutdownManager::priorityInputManager);
+
+The handler is static so it is created at the start of the run (before
+main is invoked) and registers itself with the StartupShutdownManager.
+The shutdownCallback in InputManager is invoked as part of the
+SAMRAIManger::shutdown() method.  In this case only one callback is
+needed so the other callbacks are null (0).
+
+(28) Typenames in SAMRAI_MPI have been capitalized.
+
+To maintain uniformity with SAMRAI and similarity with MPI names,
+we made these textual changes changes:
+
+comm --> Comm
+request --> Request
+status --> Status
+
+(29) SAMRAI now uses an exclusive MPI communicator by default.
+
+SAMRAIManager::startup() takes an MPI communicator.  By default,
+SAMRAI makes a duplicate of this communicator for internal use.  This
+can be overridden using the startup() argument list.  The main SAMRAI
+communicator is accessible using
+tbox::SAMRAIManager::getSAMRAIWorldComm().  Various parts of SAMRAI
+may duplicate the main communicator for further isolation.
+
+(30) SAMRAI_MPI interfaces have been expanded.
+
+Previous versions of SAMRAI_MPI did not and could not support
+non-blocking calls.  SAMRAI_MPI now supports non-blocking calls, but
+this requires that high-level functionalities be reduced.  We added
+new SAMRAI_MPI methods that actually look a lot like native C MPI
+interfaces.  The primary difference is that the communicator is now a
+data member in the SAMRAI_MPI object.
+
+The old static SAMRAI_MPI methods are still available, but we discourage
+their use.
+
+(31) SAMRAI_MPI interfaces changed to avoid using static communicator.
+
+To prepare for increasing use of non-blocking calls,
+communication/computation overlap, future use of multiple
+communicators and multithread environments, SAMRAI_MPI's new wrappers
+methods do not use a single static communicator.  The prefered usage
+is to instantiate a SAMRAI_MPI objects, constructing it with the
+communicator you want to use.  Methods bound to the object will use
+the object's communicator.  If you omit the communicator, the object
+uses tbox::SAMRAIManager::getSAMRAIWorldComm(), the main SAMRAI
+communicator.  MPI Methods not associated with specific communicators
+are wrapped in SAMRAI_MPI's static methods (as before).
+
+The intention is to start using communicators closely associated with
+the context of the communication.  For example, communicating data on
+a level should use the communicator taken from the MappedBoxLevel
+associated with the data.  The main communicator should only be used
+in very general contexts, such as finalizing SAMRAI statistics and
+timers.
+
+Note that the SAMRAI_MPI objects are just wrappers, intended to absorb
+some repetitive code that tends to clutter things up.  They do not
+manage communicators.  Nor do they manage non-blocking calls.  You
+still need to know how do this yourself.
+
+(31) Optional types no longer optional.
+
+Previous versions of SAMRAI could be configured with support for bool,
+char, float, and dcomplex datatypes.  Due to the change in compilation
+model the optional types no longer signicantly impact library size or
+compile time so everything is compiled by default now.  This means the
+
+--enable-bool, --enable-char, --enable-float, and --enable-dcomplex 
+
+configure flags are no longer required or supported.  Simply remove
+them from your configure if you are using them.
+
+(32) Dimension class no longer supports implicit conversion to an unsigned short.
+
+At the request of users the Dimension class no longer supports
+implicit conversion to unsigned short value.  This improves type
+saftey.  The "getValue()" method returns the dimension as an unsigned
+short value and can be used in place of the implicit conversion.
+
+(33) Major changes in SAMRAI_MPI class, requiring users to change some
+     code.
+
+We changed the MPI communication wrappers in SAMRAI_MPI to extend its
+functionality.  The previous model of high-level methods did not was
+not easily extendable.  The new model is to use interfaces that
+resemble those defined by MPI.
+
+The static communication methods have been removed as have the static
+methods to set the static communicator.  You must now declare a
+SAMRAI_MPI object, constructing it with an MPI communicator.
+Communication methods associated with a communicator uses the one you
+passed in to the constructor.  Some MPI methods not associated with a
+communicator are implemented as SAMRAI_MPI static methods.
+
+By necessity, we did implement high-level versions of Allreduce,
+mainly to remove the cumbersome code required when max/min reductions
+also return the rank of the process owning the max/min value.
+
+There are 3 methods to choose from when initializing SAMRAI_MPI.  The
+first one also starts up MPI and cause MPI to be shut down when
+SAMRAI_MPI is finalized.  The second expects you to start up MPI and
+pass in a communicator (which SAMRAI will duplicate for exclusive
+internal use).  The third disables MPI (even when you configure with
+MPI) and runs SAMRAI in sequential mode.  Choose the initialization
+method that suits your application.
+
+(34) Configuration changes for running on BG platform. 
+
+The new mpxlC compiler (v9.0) has some issues as of this release, 
+producing ICE (internal compiler errors) when building certain features
+of SAMRAI.  Removing pragmas related to the xlC compiler provided a
+temporary work-around while IBM is addressing the problem.  The interim
+solution is to include the 
+
+--enable-bgl 
+
+option during configuration when
+configuring and building on the Blue Gene platforms.  This option is
+not expected to be a long-term available solution, as the compiler update
+from IBM is expected to solve the problem.
+
+(35) Each gridding algorithm is now tied to a specific hierarchy,
+     affecting public interfaces.
+
+Gridding algorithms have always typically worked on just one hierarchy,
+although the hierarchy is passed into the public interfaces.  With this
+change, the hierarchy is passed into the constructor and removed from
+the rest of the interfaces.
+
+This change applies to both single-block and multi-block versions of
+the hierarchy and gridding algorithm.
+
+(36) Some parameters and accessors in GriddingAlgorithm and
+     MultiblockGriddingAlgorithm input databases have been relocated
+     to the new PatchHierarchy and MultiblockPatchHierarchy input
+     databases, respectively.
+
+This is related to "what's new" item (7).  See that item for the
+explanation.  The input files in SAMRAI have been updated to relocate
+some GriddingAlgorithm/MultiblockGriddingAlgorithm parameters to the
+new PatchHierarchy/MultiblockPatchHierarchy input database.  Where
+applicacable, you should make similar changes to your input databases.
+
+(37) VariableDatabase now has an added method to remove Variables from the
+     database.
+
+The new method "removeVariable" allows a user to arbitrarily remove a Variable
+from the VariableDatabase at any time given the name of the variable.  The
+Variable name can be reused at any time afterwards without fear of name a
+name clash.  It should be noted that adding and removing Variables a lot will
+result in a fragmented variable array.  
+
+(38) Triple-option parameters in GriddingAlgorithm and MultiblockGriddingAlgorithm
+     have been changed from char to string.
+
+You need to change input databases so that parameters set to 'i', 'w' or 'e'
+are now set to strings "IGNORE", "WARN", and "ERROR", respectively.
+
+(39) Nested enum type BoundaryDirection in BoundaryBox changed to
+     BoundaryOrientation
+
+Name changed to reduce confusion with other uses of the term "direction".
+
+(40) Old, backward-compatible numbering scheme for the location index values
+of 3D edge (codimension 2) BoundaryBox objects has been removed.
+
+All location index values are now based on the values computed by
+BoundaryLookupTable.  The only valid numbering scheme is described below:
+
+               Location Index    Obsolete value
+               ==============    ==============
+x_lo, y_lo           0                  8
+x_hi, y_lo           1                  9
+x_lo, y_hi           2                 10
+x_hi, y_hi           3                 11
+x_lo, z_lo           4                  4
+x_hi, z_lo           5                  6
+x_lo, z_hi           6                  5
+x_hi, z_hi           7                  7
+y_lo, z_lo           8                  0
+y_hi, z_lo           9                  1
+y_lo, z_hi          10                  2
+y_hi, z_hi          11                  3 
+
+Any code that used 3d edge boundary boxes on physical or coarse-fine
+boundaries with the old numbering scheme will need to be adjusted to use
+the values in the left column.
+
+
+(41) Patch number (and various ways to identify a local patch) has
+changed from an int to a LocalId.
+
+Each Patch is now identified by a GlobalId and a LocalId that are the
+same as the MappedBox from which the Patch is built.  The LocalId is
+similar to the patch number in SAMRAI-2, and it is required to be
+locally unique but not globally unique.  Locally, the patch can be
+identified by the LocalId alone.  Globally, the patch can be
+identified by its GlobalId, which is a combination of the LocalId and
+the owner rank.
+
+PatchLevel::getPatch() has been changed from taking an int to taking a
+GlobalId or LocalId.
+
+(42) Patch::getPatchNumber() has been renamed to Patch::getLocalId().
+
+This is related to number 41.
+
+(43) setCreateGhostOverlaps() has been removed from RefineAlgorithm.
+
+The option to allow for overlaps for refinement to be created on physical
+boundary ghost regions has been removed.
+
+
+=============================================================================
+=============================================================================
diff -r 000000000000 -r 5eda1a3f24e8 docs/samrai-dox/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/samrai-dox/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,5 @@
+This is the SAMRAI Reference Manual.
+
+To look at this documentation bring up the "html/main.html" file in your
+favorite web browser.
+
diff -r 000000000000 -r 5eda1a3f24e8 docs/userdocs/FAC-Preconditioner.pdf
Binary file docs/userdocs/FAC-Preconditioner.pdf has changed
diff -r 000000000000 -r 5eda1a3f24e8 docs/userdocs/Laplacian-ex.pdf
Binary file docs/userdocs/Laplacian-ex.pdf has changed
diff -r 000000000000 -r 5eda1a3f24e8 docs/userdocs/Multiblock.pdf
Binary file docs/userdocs/Multiblock.pdf has changed
diff -r 000000000000 -r 5eda1a3f24e8 docs/userdocs/NonlinearSolver.pdf
Binary file docs/userdocs/NonlinearSolver.pdf has changed
diff -r 000000000000 -r 5eda1a3f24e8 docs/userdocs/Poisson.pdf
Binary file docs/userdocs/Poisson.pdf has changed
diff -r 000000000000 -r 5eda1a3f24e8 docs/userdocs/Regridding-RichardsonExtrapolation.pdf
Binary file docs/userdocs/Regridding-RichardsonExtrapolation.pdf has changed
diff -r 000000000000 -r 5eda1a3f24e8 docs/userdocs/RestartRedistribute.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/userdocs/RestartRedistribute.txt	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,70 @@
+RESTART-REDISTRIBUTE TOOL
+
+The restart-redistribute tool is a tool allows a SAMRAI user to take
+restart files that came from a run on a certain number of processors and
+create a new set of restart files which can be used to launch a restarted
+run on a different number of processors.
+
+SAMRAI's restart mechanism works by having each processor write a single
+restart file for each restart dump.  The ordinary usage of these restart files
+requires that a restarted run be launched on exactly the same number of
+processors as was used on the run that created the restart files.  The
+restart-redistribute tool is only to be used when a restarted run on a
+different number of processors is desired.
+
+The tool is located in the bin directory at the root of the top level
+SAMRAI directory or the installation directory.
+
+To use the tool, one must first have a set of restart files that was dumped
+from a run of a SAMRAI-based application.  The restart files will be in a
+directory tree that looks something like:
+
+restart-dir/restore.00005/nodes.00008/proc.00000
+                                     /proc.00001
+                                     /proc.00002
+                                     /proc.00003
+                                     /proc.00004
+                                     /proc.00005
+                                     /proc.00006
+                                     /proc.00007
+
+'restart-dir' is the directory containing all of the restart dumps.
+The name of this directory is specified in the input file for the
+application.  'restart-dir' contains a set of subdirectories with
+names in the format of 'restore.DDDDD',where the DDDDD is a a 5-digit
+integer that identifies the timestep of the dump. The 'restore.DDDDD'
+subdirectory contains a subdirectory 'nodes.NNNNN', where NNNNN is a 5
+digit integer that specifies the number of processors on which the
+application ran.  The 'nodes.NNNNN' subdirectory then contains the set
+of HDF files containing the restart data.  The HDF files are named
+with the format 'proc.PPPPP', where PPPPP is a 5-digit integer that
+indicates the MPI rank of the the processor that wrote the file.
+
+NOTE: If there is more than one 'nodes.NNNNN' subdirectory the
+resdistribute utility will fail.
+
+The usage of the restart redistribute tool is:
+
+restart-redistribute INPUT-DIR OUTPUT-DIR TIMESTEP NUM_PROCS_IN NUM_PROCS_OUT
+
+INPUT-DIR        - the directory containing the restart dumps from a run
+
+OUTPUT-DIR       - the name of the directory to contain new restart files
+
+TIMESTEP         - integer identifier of the timestep of the restart 
+		   to be redistributed.
+
+NUM_PROCS_OUT    - the number of processors desired for a new restarted
+                   run of the application.
+
+To run the tool on the example given above to redistribute 8 processor restart files to a 16 processor restart file, one would use:
+
+restart-redistribute restart-dir new-restart-dir 5 16
+
+The resulting restart files could then be used to restart the run on
+16 procsessors.
+
+NOTE: The restart-redistribute utility is compiled using the compiler
+and compile options of the node processors.  For machines where the
+host and node are different things means the utilty must be run on the
+node processors (e.g. in a batch file).
diff -r 000000000000 -r 5eda1a3f24e8 docs/userdocs/Robin-Bc.pdf
Binary file docs/userdocs/Robin-Bc.pdf has changed
diff -r 000000000000 -r 5eda1a3f24e8 docs/userdocs/SAMRAI-overview.pdf
Binary file docs/userdocs/SAMRAI-overview.pdf has changed
diff -r 000000000000 -r 5eda1a3f24e8 docs/userdocs/Schedule-Boundary.pdf
Binary file docs/userdocs/Schedule-Boundary.pdf has changed
diff -r 000000000000 -r 5eda1a3f24e8 docs/userdocs/Timing-Instrumentation.pdf
Binary file docs/userdocs/Timing-Instrumentation.pdf has changed
diff -r 000000000000 -r 5eda1a3f24e8 docs/userdocs/VisIt-writer-slides.pdf
Binary file docs/userdocs/VisIt-writer-slides.pdf has changed
diff -r 000000000000 -r 5eda1a3f24e8 docs/userdocs/VisIt-writer.pdf
Binary file docs/userdocs/VisIt-writer.pdf has changed
diff -r 000000000000 -r 5eda1a3f24e8 docs/userdocs/Vizamrai-writer.pdf
Binary file docs/userdocs/Vizamrai-writer.pdf has changed
diff -r 000000000000 -r 5eda1a3f24e8 docs/userdocs/m4macros.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/userdocs/m4macros.txt	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,312 @@
+SAMRAI's m4 macros
+
+
+Users of SAMRAI often find it useful to write the numerical kernels of their
+applications in FORTRAN subroutines.  The patch data arrays can be passed into
+the subroutines, where the user can then operate on the numerical data.
+As a convenience SAMRAI provides a set of m4 macros that can be used for
+declaring the size and dimension of patch data arrays inside of the FORTRAN
+subroutines.  It is left to the user's discretion to choose whether or not to
+use these macros, as a user can still choose to explicitly declare the size
+and dimension of arrays.
+
+Each of SAMRAI's patch data types (cell, node, edge, etc.) is mapped to AMR
+index space in a different way.  Thus the patch data arrays in the FORTRAN
+subroutines will have to be declared to the correct size for each data type.
+For example, node-centered data on a particular patch will have one more
+element in each coordinate direction than cell-centered data on the same.
+Additionally, some data might be passed into the FORTRAN subroutines with
+ghost cell data included, while other data do not require any ghost cell data.
+The m4 macros provide a convenient method to declare FORTRAN arrays that
+correspond to different patch data types and ghost cell widths.
+
+Consider the following example, adapted from the SAMRAI's linear advection
+example application.  The ifirst and ilast integers give the upper and lower
+bounds of the patch in each coordinate direction.  uval is a 3D cell-centered
+data array, while flux0, flux1, and flux2 are the three 3D face-centered data
+arrays associated with a FaceData object.  For the cell-centered array, the
+macro CELL3d is used.  The arguments are the variable names, without the
+numerical suffixes, used for the bounds of the patch, followed by the ghost
+cell width for the array.  For face-centered data, the arguments for the macros
+are the same.  Since face-centered data is stored in separate arrays that
+each store data on faces with a normal in a single coordinate direction, the
+numerical suffixes on the FACE3d macros indicate which coordinate direction
+is normal to each array.
+
+      subroutine consdiff(ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  dx,
+     &  flux0,flux1,flux2,
+     &  advecspeed,uval)
+      integer ifirst0, ilast0,ifirst1, ilast1,ifirst2,ilast2
+      double precision dx(0:2)
+      double precision
+     &     flux0(FACE3d0(ifirst,ilast,0)),
+     &     flux1(FACE3d1(ifirst,ilast,0)),
+     &     flux2(FACE3d2(ifirst,ilast,0)),
+     &     advecspeed(0:2),
+     &     uval(CELL3d(ifirst,ilast,4))
+
+When the above is processed by m4, the output will be the following.  Note
+that the ghost cell width for the cell-centered data is subtracted from the
+lower array bounds and added to the upper array bounds.  Also note that 
+for the face-centered arrays, the indices are permuted as required by the
+face data type, and that the first dimension of each array is increased in
+size by 1, which is also necessary for the face type.
+
+      subroutine consdiff(ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  dx,
+     &  flux0,flux1,flux2,
+     &  advecspeed,uval)
+      integer ifirst0, ilast0,ifirst1, ilast1,ifirst2,ilast2
+      double precision dx(0:2)
+      double precision
+     &     flux0(ifirst0:ilast0+1,
+     &          ifirst1:ilast1,
+     &          ifirst2:ilast2),
+     &     flux1(ifirst1:ilast1+1,
+     &          ifirst2:ilast2,
+     &          ifirst0:ilast0),
+     &     flux2(ifirst2:ilast2+1,
+     &          ifirst0:ilast0,
+     &          ifirst1:ilast1),
+     &     advecspeed(0:2),
+     &     uval(ifirst0-4:ilast0+4,
+     &          ifirst1-4:ilast1+4,
+     &          ifirst2-4:ilast2+4)
+
+If the ghost cell width is unknown or is not uniform in each direction, the
+ghost cell widths can be passed in as arguments of the FORTRAN subroutine.
+A separate argument must be passed into the subroutine for each direction.
+In the above example, if integer arguments "ughost0,ughost1,ughost2" were
+added to the argument list, the m4 macros for the "uval" array could be
+used as follows:
+
+     &     uval(CELL3d(ifirst,ilast,ughost))
+
+which expands to
+
+     &     uval(ifirst0-ughost0:ilast0+ughost0,
+     &          ifirst1-ughost1:ilast1+ughost1,
+     &          ifirst2-ughost2:ilast2+ughost2)
+
+
+If a patch data array is associated with a variable that has a depth greater
+than 1, then this also needs to be included in the declarations of arrays.
+From the above example, if uval had depth 3, then the usage of the macro would
+be
+
+      double precision
+     &     uval(CELL3d(ifirst,ilast,4),3)
+
+which would expand to
+
+      double precision
+     &     uval(ifirst0-4:ilast0+4,
+     &          ifirst1-4:ilast1+4,
+     &          ifirst2-4:ilast2+4,3)
+
+When using these macros in application code, the code should be written in
+a file with a .m4 suffix.  Other than the lines that use the macros, the
+remainder of the file can be written using regular FORTRAN code, and the file
+will have to be processed by m4 to produce a FORTRAN file.  The m4 file should
+include the file where the macros are defined (located in
+SAMRAI/source/patchdata/fortran) using m4's include syntax:
+
+include(filename)
+
+To produce the FORTRAN file, run the m4 processor and direct output to a
+FORTRAN file.  For example:
+
+m4 appcode.m4 > appcode.f
+
+Some machines might have GNU's version of the m4 processor, called gm4.
+
+
+The following lists each macro that is available, an example of its usage,
+and the FORTRAN code that results when the macro is expanded.  A ghost cell
+width of 2 is used in each of these examples.
+
+1d:
+         CELL1d
+         cellvar(CELL1d(ifirst,ilast,2))
+         cellvar(ifirst0-2:ilast0+2)
+
+         FACE1d
+         facevar(FACE1d(ifirst,ilast,2))
+         facevar(ifirst0-2:ilast0+1+2)
+
+         SIDE1d
+         sidevar(SIDE1d(ifirst,ilast,2))
+         sidevar(ifirst0-2:ilast0+1+2)
+
+         NODE1d
+         nodevar(NODE1d(ifirst,ilast,2))
+         nodevar(ifirst0-2:ilast0+1+2)
+
+         EDGE1d
+         edgevar(EDGE1d(ifirst,ilast,2))
+         edgevar(ifirst0-2:ilast0+2)
+
+         OUTERFACE1d
+         ofacevar(OUTERFACE1d(ifirst,ilast,2))
+         ofacevar(1)
+
+         OUTERSIDE1d
+         osidevar(OUTERSIDE1d(ifirst,ilast,2))
+         osidevar(1)
+
+
+2d:
+         CELL2d
+         cellvar(CELL2d(ifirst,ilast,2))
+         cellvar(ifirst0-2:ilast0+2,
+     &          ifirst1-2:ilast1+2)
+
+         FACE2d0
+         facevar0(FACE2d0(ifirst,ilast,2))
+         facevar0(ifirst0-2:ilast0+1+2,
+     &          ifirst1-2:ilast1+2)
+
+         FACE2d1
+         facevar1(FACE2d1(ifirst,ilast,2))
+         facevar1(ifirst1-2:ilast1+1+2,
+     &          ifirst0-2:ilast0+2)
+
+         SIDE2d0
+         sidevar0(SIDE2d0(ifirst,ilast,2))
+         sidevar0(ifirst0-2:ilast0+1+2,
+     &          ifirst1-2:ilast1+2)
+
+         SIDE2d1
+         sidevar1(SIDE2d1(ifirst,ilast,2))
+         sidevar1(ifirst0-2:ilast0+2,
+     &          ifirst1-2:ilast1+1+2)
+
+         NODE2d
+         nodevar(NODE2d(ifirst,ilast,2))
+         nodevar(ifirst0-2:ilast0+1+2,
+     &          ifirst1-2:ilast1+1+2)
+
+         EDGE2d0
+         edgevar0(EDGE2d0(ifirst,ilast,2))
+         edgevar0(ifirst0-2:ilast0+2,
+     &          ifirst1-2:ilast1+1+2)
+
+         EDGE2d1
+         edgevar1(EDGE2d1(ifirst,ilast,2))
+         edgevar1(ifirst0-2:ilast0+1+2,
+     &          ifirst1-2:ilast1+2)
+
+         OUTERFACE2d0
+         ofacevar0(OUTERFACE2d0(ifirst,ilast,2))
+         ofacevar0(ifirst1-2:ilast1+2)
+
+         OUTERFACE2d1
+         ofacevar1(OUTERFACE2d1(ifirst,ilast,2))
+         ofacevar1(ifirst0-2:ilast0+2)
+
+         OUTERSIDE2d0
+         osidevar0(OUTERSIDE2d0(ifirst,ilast,2))
+         osidevar0(ifirst1-2:ilast1+2)
+
+         OUTERSIDE2d1
+         osidevar1(OUTERSIDE2d1(ifirst,ilast,2))
+         osidevar1(ifirst0-2:ilast0+2)
+
+
+3d:
+         CELL3d
+         cellvar(CELL3d(ifirst,ilast,2))
+         cellvar(ifirst0-2:ilast0+2,
+     &          ifirst1-2:ilast1+2,
+     &          ifirst2-2:ilast2+2)
+
+         FACE3d0
+         facevar0(FACE3d0(ifirst,ilast,2))
+         facevar0(ifirst0-2:ilast0+1+2,
+     &          ifirst1-2:ilast1+2,
+     &          ifirst2-2:ilast2+2)
+
+         FACE3d1
+         facevar1(FACE3d1(ifirst,ilast,2))
+         facevar1(ifirst1-2:ilast1+1+2,
+     &          ifirst2-2:ilast2+2,
+     &          ifirst0-2:ilast0+2)
+
+         FACE3d2
+         facevar2(FACE3d2(ifirst,ilast,2))
+         facevar2(ifirst2-2:ilast2+1+2,
+     &          ifirst0-2:ilast0+2,
+     &          ifirst1-2:ilast1+2)
+
+         SIDE3d0
+         sidevar0(SIDE3d0(ifirst,ilast,2))
+         sidevar0(ifirst0-2:ilast0+1+2,
+     &          ifirst1-2:ilast1+2,
+     &          ifirst2-2:ilast2+2)
+
+         SIDE3d1
+         sidevar1(SIDE3d1(ifirst,ilast,2))
+         sidevar1(ifirst0-2:ilast0+2,
+     &          ifirst1-2:ilast1+1+2,
+     &          ifirst2-2:ilast2+2)
+
+         SIDE3d2
+         sidevar2(SIDE3d2(ifirst,ilast,2))
+         sidevar2(ifirst0-2:ilast0+2,
+     &          ifirst1-2:ilast1+2,
+     &          ifirst2-2:ilast2+1+2)
+
+         NODE3d
+         nodevar(NODE3d(ifirst,ilast,2))
+         nodevar(ifirst0-2:ilast0+1+2,
+     &          ifirst1-2:ilast1+1+2,
+     &          ifirst2-2:ilast2+1+2)
+
+         EDGE3d0
+         edgevar0(EDGE3d0(ifirst,ilast,2))
+         edgevar0(ifirst0-2:ilast0+2,
+     &          ifirst1-2:ilast1+1+2,
+     &          ifirst2-2:ilast2+1+2)
+
+         EDGE3d1
+         edgevar1(EDGE3d1(ifirst,ilast,2))
+         edgevar1(ifirst0-2:ilast0+1+2,
+     &          ifirst1-2:ilast1+2,
+     &          ifirst2-2:ilast2+1+2)
+
+         EDGE3d2
+         edgevar2(EDGE3d2(ifirst,ilast,2))
+         edgevar2(ifirst0-2:ilast0+1+2,
+     &          ifirst1-2:ilast1+1+2,
+     &          ifirst2-2:ilast2+2)
+
+         OUTERFACE3d0
+         ofacevar0(OUTERFACE3d0(ifirst,ilast,2))
+         ofacevar0(ifirst1-2:ilast1+2,
+     &          ifirst2-2:ilast2+2)
+
+         OUTERFACE3d1
+         ofacevar1(OUTERFACE3d1(ifirst,ilast,2))
+         ofacevar1(ifirst2-2:ilast2+2,
+     &          ifirst0-2:ilast0+2)
+
+         OUTERFACE3d2
+         ofacevar2(OUTERFACE3d2(ifirst,ilast,2))
+         ofacevar2(ifirst0-2:ilast0+2,
+     &          ifirst1-2:ilast1+2)
+
+         OUTERSIDE3d0
+         osidevar0(OUTERSIDE3d0(ifirst,ilast,2))
+         osidevar0(ifirst1-2:ilast1+2,
+     &          ifirst2-2:ilast2+2)
+
+         OUTERSIDE3d1
+         osidevar1(OUTERSIDE3d1(ifirst,ilast,2))
+         osidevar1(ifirst0-2:ilast0+2,
+     &          ifirst2-2:ilast2+2)
+
+         OUTERSIDE3d2
+         osidevar2(OUTERSIDE3d2(ifirst,ilast,2))
+         osidevar2(ifirst0-2:ilast0+2,
+     &          ifirst1-2:ilast1+2)
diff -r 000000000000 -r 5eda1a3f24e8 docs/userdocs/userguide.pdf
Binary file docs/userdocs/userguide.pdf has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,26 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for the entire SAMRAI distribution 
+##
+#########################################################################
+
+SAMRAI	      =	@top_srcdir@
+SRCDIR	      =	@srcdir@
+SUBDIR        = source
+OBJECT        = ..
+
+default: library
+
+include $(OBJECT)/config/Makefile.config
+
+SUBDIRS = SAMRAI
+
+library:
+	for DIR in $(SUBDIRS); do if test -d $$DIR; then (cd $$DIR && $(MAKE) $@) ; fi || exit 1; done
+clean:
+	for DIR in $(SUBDIRS); do if test -d $$DIR; then (cd $$DIR && $(MAKE) $@) ; fi || exit 1; done
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,26 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for the entire SAMRAI distribution 
+##
+#########################################################################
+
+SAMRAI	      =	@top_srcdir@
+SRCDIR	      =	@srcdir@
+SUBDIR        = source/SAMRAI
+OBJECT        = ../..
+
+default: library
+
+include $(OBJECT)/config/Makefile.config
+
+SUBDIRS = tbox hier xfer pdat math mesh geom solv algs appu
+
+library:
+	for DIR in $(SUBDIRS); do if test -d $$DIR; then (cd $$DIR && $(MAKE) $@) ; fi || exit 1; done
+clean:
+	for DIR in $(SUBDIRS); do if test -d $$DIR; then (cd $$DIR && $(MAKE) $@) ; fi || exit 1; done
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/HyperbolicLevelIntegrator.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/HyperbolicLevelIntegrator.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,2885 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Integration routines for single level in AMR hierarchy
+ *                (basic hyperbolic systems) 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_HyperbolicLevelIntegrator_C
+#define included_algs_HyperbolicLevelIntegrator_C
+
+#include "SAMRAI/algs/HyperbolicLevelIntegrator.h"
+
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceDataFactory.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/pdat/OuterfaceData.h"
+#include "SAMRAI/pdat/OuterfaceVariable.h"
+#include "SAMRAI/pdat/OutersideData.h"
+#include "SAMRAI/pdat/OutersideVariable.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/SideDataFactory.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/xfer/CoarsenSchedule.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/hier/PatchDataFactory.h"
+#include "SAMRAI/hier/OverlapConnectorAlgorithm.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#include <cstdlib>
+#include <fstream>
+#include <string>
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN 77 routines used in flux            *
+ * synchronization process between hierarchy levels.                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in upfluxsum1d.m4:
+void F77_FUNC(upfluxsum1d, UPFLUXSUM1D) (const int &, const int &,
+   const int &,
+   const int &,
+   const double *, double *);
+// in upfluxsum2d.m4:
+void F77_FUNC(upfluxsumface2d0, UPFLUXSUMFACE2D0) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double *, double *);
+void F77_FUNC(upfluxsumface2d1, UPFLUXSUMFACE2D1) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double *, double *);
+void F77_FUNC(upfluxsumside2d0, UPFLUXSUMSIDE2D0) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double *, double *);
+void F77_FUNC(upfluxsumside2d1, UPFLUXSUMSIDE2D1) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double *, double *);
+// in upfluxsum3d.m4:
+void F77_FUNC(upfluxsumface3d0, UPFLUXSUMFACE3D0) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &,
+   const double *, double *);
+void F77_FUNC(upfluxsumface3d1, UPFLUXSUMFACE3D1) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &,
+   const double *, double *);
+void F77_FUNC(upfluxsumface3d2, UPFLUXSUMFACE3D2) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &,
+   const double *, double *);
+void F77_FUNC(upfluxsumside3d0, UPFLUXSUMSIDE3D0) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &,
+   const double *, double *);
+void F77_FUNC(upfluxsumside3d1, UPFLUXSUMSIDE3D1) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &,
+   const double *, double *);
+void F77_FUNC(upfluxsumside3d2, UPFLUXSUMSIDE3D2) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &,
+   const double *, double *);
+}
+
+#define ALGS_HYPERBOLIC_LEVEL_INTEGRATOR_VERSION (3)
+
+namespace SAMRAI {
+namespace algs {
+
+bool HyperbolicLevelIntegrator::s_barrier_after_error_bdry_fill_comm = true;
+
+tbox::StartupShutdownManager::Handler
+HyperbolicLevelIntegrator::s_initialize_handler(
+   HyperbolicLevelIntegrator::initializeCallback,
+   0,
+   0,
+   HyperbolicLevelIntegrator::finalizeCallback,
+   tbox::StartupShutdownManager::priorityTimers);
+
+/*
+ * Timers interspersed throughout the class.
+ */
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_advance_bdry_fill_comm;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_error_bdry_fill_create;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_error_bdry_fill_comm;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_mpi_reductions;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_initialize_level_data;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_init_level_create_sched;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_init_level_fill_data;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_init_level_fill_interior;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_advance_bdry_fill_create;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_new_advance_bdry_fill_create;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_apply_gradient_detector;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_tag_cells;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_coarsen_rich_extrap;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_get_level_dt;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_get_level_dt_sync;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_advance_level;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_new_advance_bdry_fill_comm;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_patch_num_kernel;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_advance_level_sync;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_std_level_sync;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_sync_new_levels;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_barrier_after_error_bdry_fill_comm;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_sync_initial_comm;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_sync_initial_create;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_coarsen_fluxsum_create;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_coarsen_fluxsum_comm;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_coarsen_sync_create;
+tbox::Pointer<tbox::Timer> HyperbolicLevelIntegrator::t_coarsen_sync_comm;
+
+#ifdef HLI_RECORD_STATS
+/*
+ * Statistics on number of cells and patches generated.
+ */
+tbox::Array<tbox::Pointer<tbox::Statistic> > HyperbolicLevelIntegrator::s_boxes_stat;
+tbox::Array<tbox::Pointer<tbox::Statistic> > HyperbolicLevelIntegrator::s_cells_stat;
+tbox::Array<tbox::Pointer<tbox::Statistic> > HyperbolicLevelIntegrator::s_timestamp_stat;
+#endif
+
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * This constructor sets the HyperbolicPatchStrategy pointer and   *
+ * initializes integration parameters to default values.  Communication  *
+ * algorithms are created here too.  Other data members are read in     *
+ * from the input database or from the restart database corresponding    *
+ * to the specified object_name.                                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+HyperbolicLevelIntegrator::HyperbolicLevelIntegrator(
+   const std::string& object_name,
+   tbox::Pointer<tbox::Database> input_db,
+   HyperbolicPatchStrategy* patch_strategy,
+   bool register_for_restart,
+   bool use_time_refinement):
+   d_dim(patch_strategy->getDim())
+{
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!input_db.isNull());
+   TBOX_ASSERT(patch_strategy != ((HyperbolicPatchStrategy *)NULL));
+
+   d_object_name = object_name;
+   d_use_time_refinement = use_time_refinement;
+   d_registered_for_restart = register_for_restart;
+
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->
+      registerRestartItem(d_object_name, this);
+   }
+
+   d_patch_strategy = patch_strategy;
+
+   /*
+    * Default parameter values.
+    */
+   d_number_time_data_levels = 2;
+
+   d_flux_is_face = true;
+   d_flux_face_registered = false;
+   d_flux_side_registered = false;
+
+   d_have_flux_on_level_zero = false;
+
+   d_lag_dt_computation = true;
+   d_use_ghosts_for_dt = false;
+   d_distinguish_mpi_reduction_costs = false;
+
+   d_cfl = tbox::MathUtilities<double>::getSignalingNaN();
+   d_cfl_init = tbox::MathUtilities<double>::getSignalingNaN();
+
+   /*
+    * Communication algorithms.
+    */
+   d_bdry_fill_advance = new xfer::RefineAlgorithm(d_dim);
+   d_bdry_fill_advance_new = new xfer::RefineAlgorithm(d_dim);
+   d_bdry_fill_advance_old = new xfer::RefineAlgorithm(d_dim);
+   d_fill_new_level = new xfer::RefineAlgorithm(d_dim);
+   d_coarsen_fluxsum = new xfer::CoarsenAlgorithm(d_dim);
+   d_coarsen_sync_data = new xfer::CoarsenAlgorithm(d_dim);
+   d_sync_initial_data = new xfer::CoarsenAlgorithm(d_dim);
+
+   d_coarsen_rich_extrap_init = new xfer::CoarsenAlgorithm(d_dim);
+   d_coarsen_rich_extrap_final = new xfer::CoarsenAlgorithm(d_dim);
+
+   /*
+    * hier::Variable contexts used in algorithm.  Note that "OLD" context
+    * is only created and used in the case of Richardson extrapolation
+    * and a refinement ratio of 3 (see registerModelVariables()).
+    */
+   d_scratch = hier::VariableDatabase::getDatabase()->getContext("SCRATCH");
+   d_current = hier::VariableDatabase::getDatabase()->getContext("CURRENT");
+   d_new = hier::VariableDatabase::getDatabase()->getContext("NEW");
+
+   d_plot_context = d_current;
+
+   /*
+    * Initialize object with data read from the input and restart databases.
+    */
+
+   bool from_restart = tbox::RestartManager::getManager()->isFromRestart();
+   if (from_restart && d_registered_for_restart) {
+      getFromRestart();
+   }
+   getFromInput(input_db, from_restart);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destructor tells the tbox::RestartManager to remove this object from   *
+ * the list of restart items.                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+HyperbolicLevelIntegrator::~HyperbolicLevelIntegrator()
+{
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->unregisterRestartItem(d_object_name);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialize integration data on all patches on level.  This process    *
+ * is used at the start of the simulation to set the initial hierarchy   *
+ * data and after adaptive regridding.  In the second case, the old      *
+ * level pointer points to the level that existed in the hierarchy       *
+ * before regridding.  This pointer may be null, in which case it is     *
+ * ignored.  If it is non-null, then data is copied from the old level   *
+ * to the new level before the old level is discarded.                   *
+ *                                                                       *
+ * Note that we also allocate flux storage for the coarsest AMR          *
+ * hierarchy level here (i.e., level 0).  The time step sequence on      *
+ * level 0 is dictated by the user code; so to avoid any memory          *
+ * management errors, flux storage on level 0 persists as long as the    *
+ * level does.
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HyperbolicLevelIntegrator::initializeLevelData(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const double init_data_time,
+   const bool can_be_refined,
+   const bool initial_time,
+   const tbox::Pointer<hier::BasePatchLevel> old_level,
+   const bool allocate_data)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= hierarchy->getFinestLevelNumber()));
+   if (!(old_level.isNull())) {
+      TBOX_ASSERT(level_number == old_level->getLevelNumber());
+   }
+   TBOX_ASSERT(!(hierarchy->getPatchLevel(level_number)).isNull());
+#endif
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *hierarchy);
+
+   tbox::Pointer<hier::PatchLevel> level(
+      hierarchy->getPatchLevel(level_number));
+
+   const tbox::SAMRAI_MPI &mpi(level->getMappedBoxLevel()->getMPI());
+   mpi.Barrier();
+   t_initialize_level_data->start();
+
+   /*
+    * Allocate storage needed to initialize level and fill data
+    * from coarser levels in AMR hierarchy, potentially. Since
+    * time gets set when we allocate data, re-stamp it to current
+    * time if we don't need to allocate.
+    */
+   if (allocate_data) {
+      level->allocatePatchData(d_new_patch_init_data, init_data_time);
+      level->allocatePatchData(d_old_time_dep_data, init_data_time);
+   } else {
+      level->setTime(init_data_time, d_new_patch_init_data);
+   }
+
+   /*
+    * Create schedules for filling new level and fill data.
+    */
+   level->getMappedBoxLevel()->getMPI().Barrier();
+
+   if ((level_number > 0) || !old_level.isNull()) {
+      t_init_level_create_sched->start();
+
+      const tbox::Pointer<hier::PatchHierarchy> patch_hierarchy(hierarchy);
+      tbox::Pointer<xfer::RefineSchedule> sched(
+         d_fill_new_level->createSchedule(level,
+            old_level,
+            level_number - 1,
+            hierarchy,
+            d_patch_strategy));
+      mpi.Barrier();
+      t_init_level_create_sched->stop();
+
+      d_patch_strategy->setDataContext(d_scratch);
+
+      t_init_level_fill_data->start();
+      sched->fillData(init_data_time);
+      mpi.Barrier();
+      t_init_level_fill_data->stop();
+
+      d_patch_strategy->clearDataContext();
+   }
+
+   if ((d_number_time_data_levels == 3) && can_be_refined) {
+
+      hier::VariableDatabase* variable_db =
+         hier::VariableDatabase::getDatabase();
+
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> patch(*ip);
+
+         tbox::List<tbox::Pointer<hier::Variable> >::Iterator
+         time_dep_var = d_time_dep_variables.listStart();
+         while (time_dep_var) {
+            int old_indx =
+               variable_db->mapVariableAndContextToIndex(time_dep_var(),
+                  d_old);
+            int cur_indx =
+               variable_db->mapVariableAndContextToIndex(time_dep_var(),
+                  d_current);
+
+            patch->setPatchData(old_indx, patch->getPatchData(cur_indx));
+
+            time_dep_var++;
+         }
+
+      }
+
+   }
+
+   mpi.Barrier();
+   t_init_level_fill_interior->start();
+   /*
+    * Initialize data on patch interiors.
+    */
+   d_patch_strategy->setDataContext(d_current);
+   for (hier::PatchLevel::Iterator p(level); p; p++) {
+      tbox::Pointer<hier::Patch> patch(*p);
+
+      patch->allocatePatchData(d_temp_var_scratch_data, init_data_time);
+
+      d_patch_strategy->initializeDataOnPatch(*patch,
+         init_data_time,
+         initial_time);
+
+      patch->deallocatePatchData(d_temp_var_scratch_data);
+   }
+   d_patch_strategy->clearDataContext();
+   mpi.Barrier();
+   t_init_level_fill_interior->stop();
+
+   t_initialize_level_data->stop();
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Reset hierarchy configuration information where the range of new      *
+ * hierarchy levels is specified.   The information updated involves     *
+ * the cached communication schedules maintained by the algorithm.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HyperbolicLevelIntegrator::resetHierarchyConfiguration(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level)
+{
+   NULL_USE(finest_level);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (coarsest_level <= finest_level)
+      && (finest_level <= hierarchy->getFinestLevelNumber()));
+   for (int ln0 = 0; ln0 <= finest_level; ln0++) {
+      TBOX_ASSERT(!(hierarchy->getPatchLevel(ln0)).isNull());
+   }
+#endif
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *hierarchy);
+
+   int finest_hiera_level = hierarchy->getFinestLevelNumber();
+
+   d_bdry_sched_advance.resizeArray(finest_hiera_level + 1);
+   d_bdry_sched_advance_new.resizeArray(finest_hiera_level + 1);
+
+   const tbox::Pointer<hier::PatchHierarchy> patch_hierarchy(hierarchy);
+
+   for (int ln = coarsest_level; ln <= finest_hiera_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level(hierarchy->getPatchLevel(ln));
+
+      t_advance_bdry_fill_create->start();
+      /*
+       * Activating this reveals a bug at step 34 in Euler, room-2d, 2-proc.
+       * Truncated message.  Do the connectors used for schedule
+       * generation agree on transposes?
+       *
+       * Serial run ok.
+       */
+      d_bdry_sched_advance[ln] =
+         d_bdry_fill_advance->createSchedule(
+            level,
+            ln - 1,
+            hierarchy,
+            d_patch_strategy);
+      t_advance_bdry_fill_create->stop();
+
+      if (!d_lag_dt_computation && d_use_ghosts_for_dt) {
+         t_new_advance_bdry_fill_create->start();
+         d_bdry_sched_advance_new[ln] =
+            d_bdry_fill_advance_new->createSchedule(
+               level,
+               ln - 1,
+               hierarchy,
+               d_patch_strategy);
+         t_new_advance_bdry_fill_create->stop();
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Call patch routines to tag cells near large gradients.                *
+ * These cells will be refined.                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HyperbolicLevelIntegrator::applyGradientDetector(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const double error_data_time,
+   const int tag_index,
+   const bool initial_time,
+   const bool uses_richardson_extrapolation_too)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= hierarchy->getFinestLevelNumber()));
+   TBOX_ASSERT(!(hierarchy->getPatchLevel(level_number)).isNull());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *hierarchy);
+
+   t_apply_gradient_detector->start();
+
+   tbox::Pointer<hier::PatchLevel> level(
+      hierarchy->getPatchLevel(level_number));
+
+   level->allocatePatchData(d_saved_var_scratch_data, error_data_time);
+
+   d_patch_strategy->setDataContext(d_scratch);
+
+   const tbox::SAMRAI_MPI &mpi(level->getMappedBoxLevel()->getMPI());
+
+   t_error_bdry_fill_comm->start();
+   d_bdry_sched_advance[level_number]->fillData(error_data_time);
+   if (s_barrier_after_error_bdry_fill_comm) {
+      t_barrier_after_error_bdry_fill_comm->start();
+      mpi.Barrier();
+      t_barrier_after_error_bdry_fill_comm->stop();
+   }
+   t_error_bdry_fill_comm->stop();
+
+   t_tag_cells->start();
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch(*ip);
+      d_patch_strategy->
+      tagGradientDetectorCells(*patch,
+         error_data_time,
+         initial_time,
+         tag_index,
+         uses_richardson_extrapolation_too);
+   }
+   t_tag_cells->stop();
+
+   d_patch_strategy->clearDataContext();
+
+   level->deallocatePatchData(d_saved_var_scratch_data);
+
+   t_apply_gradient_detector->stop();
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The Richardson extrapolation algorithm requires a coarsened version   *
+ * of the level on which error estiamtion is performed.  This routine    *
+ * is used to coarsen data from a level in the AMR hierarchy to some     *
+ * coarsened version of it.  Note that this routine will be called twice *
+ * The init_coarse_level boolean argument indicates whether data is    *
+ * set on the coarse level by coarsening the "old" time level solution   *
+ * or by coarsening the "new" solution on the fine level (i.e., after    *
+ * it has been advanced).                                                *
+ *                                                                       *
+ * The contexts used for coarsening old data depends on the number of    *
+ * time levels.  We always want to use data at the oldest time on the    *
+ * fine level, coarsened to the CURRENT context on the coarse level.     *
+ * Thus, if the problem uses two time levels, we coarsen data from       *
+ * CURRENT on fine level (since CURRENT is the oldest time maintained)   *
+ * to CURRENT on the coarse level.  If the problem uses three time       *
+ * levels, we coarsen from OLD on the fine level (since OLD is the       *
+ * time maintained) to CURRENT on the coarse level.                      *
+ *                                                                       *
+ * When the boolean is false, indicating we are operating at the new     *
+ * time, we coarsen the time advanced solution at the NEW context on     *
+ * the fine level to the NEW context on the coarse level so that they    *
+ * may be compared later.                                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HyperbolicLevelIntegrator::coarsenDataForRichardsonExtrapolation(
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int level_number,
+   const tbox::Pointer<hier::PatchLevel> coarse_level,
+   const double coarsen_data_time,
+   const bool before_advance)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= hierarchy->getFinestLevelNumber()));
+   TBOX_ASSERT(!(hierarchy->getPatchLevel(level_number)).isNull());
+   TBOX_ASSERT(!coarse_level.isNull());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim, *hierarchy, *coarse_level);
+
+   t_coarsen_rich_extrap->start();
+
+   const hier::IntVector& zero_vector(hier::IntVector::getZero(d_dim));
+
+   tbox::Pointer<hier::PatchLevel> hier_level(
+      hierarchy->getPatchLevel(level_number));
+
+   hier::IntVector coarsen_ratio(d_dim);
+   if (coarse_level->getRatioToLevelZero() < zero_vector) {
+      if (hier_level->getRatioToLevelZero() < zero_vector) {
+         coarsen_ratio = coarse_level->getRatioToLevelZero()
+            / hier_level->getRatioToLevelZero();
+         TBOX_ASSERT(
+            coarsen_ratio * hier_level->getRatioToLevelZero() ==
+            coarse_level->getRatioToLevelZero());
+      } else {
+         coarsen_ratio = -coarse_level->getRatioToLevelZero()
+            / hier_level->getRatioToLevelZero();
+         TBOX_ASSERT(
+            -coarsen_ratio * hier_level->getRatioToLevelZero() ==
+            coarse_level->getRatioToLevelZero());
+      }
+   } else {
+      coarsen_ratio = hier_level->getRatioToLevelZero()
+         / coarse_level->getRatioToLevelZero();
+      TBOX_ASSERT(
+         coarsen_ratio * coarse_level->getRatioToLevelZero() ==
+         hier_level->getRatioToLevelZero());
+   }
+
+#if 1
+   /*
+    * Compute the gcw needed for Connectors.  The peer GCW for
+    * coarse<==>fine can be equivalent to the GCW for fine<==>fine in
+    * the hierarcy, because the coarse level is just the coarsened fine
+    * level.  We just have to convert the GCW to the correct refinement
+    * ratio before initializing the Connectors.
+    */
+   const hier::IntVector peer_gcw =
+      hierarchy->getRequiredConnectorWidth(
+         level_number,
+         level_number);
+
+   coarse_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+   findOrCreateConnector(
+      *hier_level->getMappedBoxLevel(),
+      hier::IntVector::ceiling(peer_gcw, coarsen_ratio));
+   hier_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+   findOrCreateConnector(
+      *coarse_level->getMappedBoxLevel(),
+      peer_gcw);
+#endif
+
+   if (before_advance) {
+
+      coarse_level->allocatePatchData(d_new_patch_init_data,
+         coarsen_data_time);
+
+      if (d_number_time_data_levels == 3) {
+         d_patch_strategy->setDataContext(d_old);
+      } else {
+         d_patch_strategy->setDataContext(d_current);
+      }
+
+      d_coarsen_rich_extrap_init->
+      createSchedule(coarse_level,
+         hier_level,
+         d_patch_strategy)->coarsenData();
+
+      d_patch_strategy->clearDataContext();
+
+   } else {
+
+      coarse_level->allocatePatchData(d_new_time_dep_data,
+         coarsen_data_time);
+
+      d_patch_strategy->setDataContext(d_new);
+
+      d_coarsen_rich_extrap_final->
+      createSchedule(coarse_level,
+         hier_level,
+         d_patch_strategy)->coarsenData();
+
+      d_patch_strategy->clearDataContext();
+
+   }
+
+   t_coarsen_rich_extrap->stop();
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Call patch routines to tag cells for refinement using Richardson      *
+ * extrapolation.    Richardson extrapolation requires two copies of     *
+ * the solution to compare.  The NEW context holds the solution          *
+ * computed on the fine level and coarsened, whereas the CURRENT         *
+ * context holds the solution integrated on the coarse level after       *
+ * coarsening the initial data from the fine level.                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HyperbolicLevelIntegrator::applyRichardsonExtrapolation(
+   const tbox::Pointer<hier::PatchLevel> level,
+   const double error_data_time,
+   const int tag_index,
+   const double deltat,
+   const int error_coarsen_ratio,
+   const bool initial_time,
+   const bool uses_gradient_detector_too)
+{
+   TBOX_ASSERT(!level.isNull());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *level);
+
+   /*
+    * Compare solutions computed on level (stored in NEW context) and on
+    * the coarser level (stored in CURR context) on the patches of the
+    * coarser level.  The patch strategy implements the compare operations
+    * performed on each patch.
+    */
+
+   int error_level_number =
+      level->getLevelNumber() + 2;
+
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch(*ip);
+
+      d_patch_strategy->
+      tagRichardsonExtrapolationCells(*patch,
+         error_level_number,
+         d_new,                                     //  finer context
+         d_current,                                 //  coarser context
+         error_data_time,
+         deltat,
+         error_coarsen_ratio,
+         initial_time,
+         tag_index,
+         uses_gradient_detector_too);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialize level integrator by:                                       *
+ *                                                                       *
+ *   (1) Setting the number of time data levels based on needs of        *
+ *       the gridding algorithm                                          *
+ *   (2) Invoking variable registration in patch strategy.               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HyperbolicLevelIntegrator::initializeLevelIntegrator(
+   tbox::Pointer<mesh::BaseGriddingAlgorithm> base_gridding_alg)
+{
+   d_gridding_alg = base_gridding_alg;
+
+   TBOX_ASSERT(!d_gridding_alg.isNull());
+
+   d_number_time_data_levels = 2;
+
+   if ((d_gridding_alg->getTagAndInitializeStrategy()->getErrorCoarsenRatio() < 1) ||
+       (d_gridding_alg->getTagAndInitializeStrategy()->getErrorCoarsenRatio() > 3)) {
+      TBOX_ERROR("HyperbolicLevelIntegrator::initializeLevelIntegrator "
+         << "error...\n" << "   object name = " << d_object_name
+         << "   gridding algorithm has bad error coarsen ratio" << std::endl);
+   }
+
+   if ((d_gridding_alg->errorEstimationUsesTimeIntegration()) &&
+       (d_gridding_alg->getTagAndInitializeStrategy()->getErrorCoarsenRatio() == 3)) {
+      d_number_time_data_levels = 3;
+      d_old = hier::VariableDatabase::getDatabase()->getContext("OLD");
+   }
+
+   d_patch_strategy->registerModelVariables(this);
+
+   d_patch_strategy->setupLoadBalancer(this,
+      d_gridding_alg.getPointer());
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Invoke dt calculation routines in patch strategy and take a min       *
+ * over all patches on the level.  The result will be the max of the     *
+ * next timestep on the level. If the boolean recompute_dt is true,      *
+ * the max timestep on the level will be computed.  If it is false,      *
+ * the method will simply access the latest dt stored in the time        *
+ * refinement integrator.                                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double HyperbolicLevelIntegrator::getLevelDt(
+   const tbox::Pointer<hier::BasePatchLevel> level,
+   const double dt_time,
+   const bool initial_time)
+{
+   TBOX_ASSERT(!level.isNull());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *level);
+
+   tbox::Pointer<hier::PatchLevel> patch_level(level);
+
+   const tbox::SAMRAI_MPI &mpi(patch_level->getMappedBoxLevel()->getMPI());
+
+   t_get_level_dt->start();
+
+   double dt = tbox::MathUtilities<double>::getMax();
+
+   if (!d_use_ghosts_for_dt) {
+
+      //tbox::plog << "!use ghosts for dt" << std::endl;
+
+      d_patch_strategy->setDataContext(d_current);
+      for (hier::PatchLevel::Iterator p(patch_level); p; p++) {
+         tbox::Pointer<hier::Patch> patch = *p;
+
+         patch->allocatePatchData(d_temp_var_scratch_data, dt_time);
+
+         double patch_dt;
+         patch_dt = d_patch_strategy->
+            computeStableDtOnPatch(*patch,
+               initial_time,
+               dt_time);
+
+         dt = tbox::MathUtilities<double>::Min(dt, patch_dt);
+         //tbox::plog.precision(12);
+         //tbox::plog << "Level " << patch_level->getLevelNumber()
+         //           << " Patch " << p()
+         //           << " box " << patch->getBox()
+         //           << " has patch_dt " << patch_dt
+         //           << " dt " << dt
+         //           << std::endl;
+
+         patch->deallocatePatchData(d_temp_var_scratch_data);
+      }
+
+      d_patch_strategy->clearDataContext();
+
+   } else {
+
+      //tbox::plog << "use ghosts for dt" << std::endl;
+
+      patch_level->allocatePatchData(d_saved_var_scratch_data, dt_time);
+
+      d_patch_strategy->setDataContext(d_scratch);
+
+      t_advance_bdry_fill_comm->start();
+      d_bdry_sched_advance[patch_level->getLevelNumber()]->fillData(dt_time);
+      t_advance_bdry_fill_comm->stop();
+
+      for (hier::PatchLevel::Iterator ip(patch_level); ip; ip++) {
+         tbox::Pointer<hier::Patch> patch = *ip;
+
+         patch->allocatePatchData(d_temp_var_scratch_data, dt_time);
+
+         double patch_dt;
+         patch_dt = d_patch_strategy->
+            computeStableDtOnPatch(*patch,
+               initial_time,
+               dt_time);
+
+         dt = tbox::MathUtilities<double>::Min(dt, patch_dt);
+         //tbox::plog.precision(12);
+         //tbox::plog << "Level " << patch_level->getLevelNumber()
+         //           << " Patch " << ip()
+         //           << " box " << patch->getBox()
+         //           << " has patch_dt " << patch_dt
+         //           << " dt " << dt
+         //           << std::endl;
+
+         patch->deallocatePatchData(d_temp_var_scratch_data);
+      }
+
+      d_patch_strategy->clearDataContext();
+
+      /*
+       * Copy data from scratch to current and de-allocate scratch storage.
+       * This may be excessive here, but seems necessary if the
+       * computation of dt affects the state of the problem solution.
+       * Also, this getLevelDt() routine is called at initialization only
+       * in most cases.
+       */
+
+      copyTimeDependentData(patch_level, d_scratch, d_current);
+
+      patch_level->deallocatePatchData(d_saved_var_scratch_data);
+   }
+
+   t_get_level_dt_sync->start();
+
+   if (d_distinguish_mpi_reduction_costs) {
+      mpi.Barrier();
+      t_get_level_dt_sync->stop();
+      t_mpi_reductions->start();
+   }
+
+   /*
+    * The level time increment is a global min over all patches.
+    */
+
+   double global_dt = dt;
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&global_dt, 1, MPI_MIN);
+   }
+   global_dt *= tbox::MathUtilities<double>::Min(d_cfl_init, d_cfl);
+
+   if (d_distinguish_mpi_reduction_costs) {
+      t_mpi_reductions->stop();
+   } else {
+      t_get_level_dt_sync->stop();
+   }
+
+   t_get_level_dt->stop();
+
+   return global_dt;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * For the standard explicit integration algorithm for hyperbolic        *
+ * conservation laws, the fine time increment is the coarse increment    *
+ * divided by the maximum mesh ratio (independent of level number).      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double HyperbolicLevelIntegrator::getMaxFinerLevelDt(
+   const int finer_level_number,
+   const double coarse_dt,
+   const hier::IntVector& ratio)
+{
+   NULL_USE(finer_level_number);
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, ratio);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   for (int id = 0; id < d_dim.getValue(); id++) {
+      TBOX_ASSERT(ratio(id) > 0);
+   }
+#endif
+   return coarse_dt / double(ratio.max());
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Integrate data on all patches in patch level from current time        *
+ * to new time (new_time) using a single time step.  Before the advance  *
+ * can occur, proper ghost cell information is obtained for all patches  *
+ * on the level.  Then, local patches are advanced sequentially in the   *
+ * loop over patches.  The details of the routine are as follows:        *
+ *                                                                       *
+ *  0) Allocate storage for new time level data. Also, allocate          *
+ *     necessary FLUX and flux integral storage if needed                *
+ *     (i.e., if regrid_advance is false, first_step is true, and        *
+ *     coarser or finer level than current level exists in hierarchy.)   *
+ *                                                                       *
+ *  1) Scratch space is filled so that, for each patch, interior data    *
+ *     and ghost cell bdry data correspond to specified time.            *
+ *                                                                       *
+ *  1a) Call user routines to pre-process advance data, if needed.       *
+ *                                                                       *
+ *  2) Compute explicit fluxes in scratch space using data on            *
+ *     patch + ghosts at given time.                                     *
+ *                                                                       *
+ *  3) Apply conservative difference in scratch space to advance patch   *
+ *     interior data to time = new_time.                                 *
+ *                                                                       *
+ *  3a) Call user routines to post-process advance data, if needed.      *
+ *                                                                       *
+ *  4) Compute next stable time increment for subsequent level advances: *
+ *                                                                       *
+ *     4a) If (d_lag_dt_computation == true) {                           *
+ *            DO NOT RECOMPUTE characteristic data after advancing       *
+ *            data on patch. Use characteristic data corresponding       *
+ *            to current time level, computed prior to flux computation, *
+ *            in dt calculation.                                         *
+ *            If (d_use_ghosts_for_dt == true)                           *
+ *               - Compute dt using data on patch+ghosts at time.        *
+ *            Else                                                       *
+ *               - Compute dt using data on patch interior ONLY.         *
+ *         }                                                             *
+ *                                                                       *
+ *     4b) Copy data from scratch space patch interior to new data       *
+ *         storage for patch (i.e., at time = new_time).                 *
+ *                                                                       *
+ *     4a) If (d_lag_dt_computation == false) {                          *
+ *            RECOMPUTE characteristic data after advancing data on      *
+ *            patch. Use characteristic data corresponding to new time   *
+ *            level in dt calculation.                                   *
+ *            If (d_use_ghosts_for_dt == true)                           *
+ *               - Refill scratch space with new interior patch data     *
+ *                 and ghost cell bdry data correspond to new time.      *
+ *                 (NOTE: This requires a new boundary schedule.)        *
+ *               - Compute dt using data on patch+ghosts at new_time.    *
+ *            Else                                                       *
+ *               - Compute dt using data on patch interior ONLY.         *
+ *                 (using patch interior data at new_time)               *
+ *         }                                                             *
+ *                                                                       *
+ *  5) If (ln > 0), update flux integrals by adding patch bdry FLUXes    *
+ *     to flux sums.                                                     *
+ *                                                                       *
+ * Important Notes:                                                      *
+ *    1) In order to advance finer levels (if they exist), both old      *
+ *       and new data for each patch on the level must be maintained.    *
+ *    2) If the timestep is the first in the timestep loop on the level  *
+ *       (indicated by first_step), then time interpolation is           *
+ *       is unnecessary to fill ghost cells from the next coarser level. *
+ *    3) The new dt is not calculated if regrid_advance is true.         *
+ *       If this is the case, it is assumed that the results of the      *
+ *       advance and the timestep calculation will be discarded          *
+ *       (e.g., during regridding, or initialization).  Also, allocation *
+ *       and post-processing of FLUX/flux integral data is not performed *
+ *       in this case.                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double HyperbolicLevelIntegrator::advanceLevel(
+   const tbox::Pointer<hier::BasePatchLevel> level,
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const double current_time,
+   const double new_time,
+   const bool first_step,
+   const bool last_step,
+   const bool regrid_advance)
+{
+   TBOX_ASSERT(!level.isNull());
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT(current_time <= new_time);
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim, *level, *hierarchy);
+
+   tbox::Pointer<hier::PatchHierarchy> patch_hierarchy = hierarchy;
+   tbox::Pointer<hier::PatchLevel> patch_level = level;
+
+// HLI_RECORD_STATS is defined in HyperbolicLevelIntegrator.h
+#ifdef HLI_RECORD_STATS
+   recordStatistics(*patch_level, current_time);
+#endif
+
+   t_advance_level->start();
+
+   const int level_number = patch_level->getLevelNumber();
+   const double dt = new_time - current_time;
+
+   /*
+    * (1) Allocate data needed for advancing level.
+    * (2) Generate temporary communication schedule to fill ghost
+    *     cells, if needed.
+    * (3) Fill ghost cell data.
+    * (4) Process flux storage before the advance.
+    */
+
+   patch_level->allocatePatchData(d_new_time_dep_data, new_time);
+   patch_level->allocatePatchData(d_saved_var_scratch_data, current_time);
+
+   tbox::Pointer<xfer::RefineSchedule> fill_schedule;
+   if (!patch_level->inHierarchy()) {
+      t_error_bdry_fill_create->start();
+
+      const hier::OverlapConnectorAlgorithm oca;
+
+      const int coarser_ln = patch_level->getLevelNumber() + 1;
+
+      if (coarser_ln < 0) {
+
+         // Don't use coarser level in boundary fill.
+
+         if (d_number_time_data_levels == 3) {
+            fill_schedule = d_bdry_fill_advance_old->
+               createSchedule(patch_level,
+                  coarser_ln,
+                  hierarchy,
+                  d_patch_strategy);
+         } else {
+            fill_schedule = d_bdry_fill_advance->
+               createSchedule(patch_level,
+                  coarser_ln,
+                  hierarchy,
+                  d_patch_strategy);
+         }
+      } else {
+
+         // Use coarser level in boundary fill.
+
+         if (d_number_time_data_levels == 3) {
+            fill_schedule = d_bdry_fill_advance_old->
+               createSchedule(patch_level,
+                  coarser_ln,
+                  hierarchy,
+                  d_patch_strategy);
+         } else {
+            fill_schedule = d_bdry_fill_advance->
+               createSchedule(patch_level,
+                  coarser_ln,
+                  hierarchy,
+                  d_patch_strategy);
+         }
+      }
+      t_error_bdry_fill_create->stop();
+   } else {
+      fill_schedule = d_bdry_sched_advance[level_number];
+   }
+
+   d_patch_strategy->setDataContext(d_scratch);
+   if (regrid_advance) {
+      t_error_bdry_fill_comm->start();
+   } else {
+      t_advance_bdry_fill_comm->start();
+   }
+   fill_schedule->fillData(current_time);
+   if (regrid_advance) {
+      t_error_bdry_fill_comm->stop();
+   } else {
+      t_advance_bdry_fill_comm->stop();
+   }
+
+   d_patch_strategy->clearDataContext();
+   fill_schedule.setNull();
+
+   preprocessFluxData(patch_level,
+      current_time,
+      new_time,
+      regrid_advance,
+      first_step,
+      last_step);
+
+   /*
+    * (5) Call user-routine to pre-process state data, if needed.
+    * (6) Advance solution on all level patches (scratch storage).
+    * (7) Copy new solution to from scratch to new storage.
+    * (8) Call user-routine to post-process state data, if needed.
+    */
+   t_patch_num_kernel->start();
+   d_patch_strategy->preprocessAdvanceLevelState(patch_level,
+      current_time,
+      dt,
+      first_step,
+      last_step,
+      regrid_advance);
+   t_patch_num_kernel->stop();
+
+   d_patch_strategy->setDataContext(d_scratch);
+   for (hier::PatchLevel::Iterator ip(patch_level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      patch->allocatePatchData(d_temp_var_scratch_data, current_time);
+
+      t_patch_num_kernel->start();
+      d_patch_strategy->computeFluxesOnPatch(*patch,
+         current_time,
+         dt);
+      t_patch_num_kernel->stop();
+
+      bool at_syncronization = false;
+
+      t_patch_num_kernel->start();
+      d_patch_strategy->conservativeDifferenceOnPatch(*patch,
+         current_time,
+         dt,
+         at_syncronization);
+      t_patch_num_kernel->stop();
+
+      patch->deallocatePatchData(d_temp_var_scratch_data);
+   }
+   d_patch_strategy->clearDataContext();
+
+   patch_level->setTime(new_time, d_saved_var_scratch_data);
+   patch_level->setTime(new_time, d_flux_var_data);
+
+   copyTimeDependentData(patch_level, d_scratch, d_new);
+
+   t_patch_num_kernel->start();
+   d_patch_strategy->postprocessAdvanceLevelState(patch_level,
+      current_time,
+      dt,
+      first_step,
+      last_step,
+      regrid_advance);
+   t_patch_num_kernel->stop();
+
+   /*
+    * (9) If the level advance is for regridding, we compute the next timestep:
+    *
+    * (a) If the dt computation is lagged (i.e., we use pre-advance data
+    *     to compute timestep), we reset scratch space on patch interiors
+    *     if needed.  Then, we set the strategy context to current or scratch
+    *     depending on whether ghost values are used to compute dt.
+    * (b) If the dt computation is not lagged (i.e., we use advanced data
+    *     to compute timestep), we refill scratch space, including ghost
+    *     data with new solution values if needed.  Then, we set the strategy
+    *     context to new or scratch depending on whether ghost values are
+    *     used to compute dt.
+    * (c) Then, we loop over patches and compute the dt on each patch.
+    */
+
+   double dt_next = tbox::MathUtilities<double>::getMax();
+
+   if (!regrid_advance) {
+
+      if (d_lag_dt_computation) {
+
+         if (d_use_ghosts_for_dt) {
+            d_patch_strategy->setDataContext(d_scratch);
+            copyTimeDependentData(patch_level, d_current, d_scratch);
+         } else {
+            d_patch_strategy->setDataContext(d_current);
+         }
+      } else {
+
+         if (d_use_ghosts_for_dt) {
+
+            if (d_bdry_sched_advance_new[level_number].isNull()) {
+               TBOX_ERROR(
+                  d_object_name << ":  "
+                  <<
+                  "Attempt to fill new ghost data for timestep"
+                  <<
+                  "computation, but schedule not defined." << std::endl);
+            }
+
+            d_patch_strategy->setDataContext(d_scratch);
+            t_new_advance_bdry_fill_comm->start();
+            d_bdry_sched_advance_new[level_number]->fillData(new_time);
+            t_new_advance_bdry_fill_comm->stop();
+
+         } else {
+            d_patch_strategy->setDataContext(d_new);
+         }
+
+      }
+
+      for (hier::PatchLevel::Iterator ip(patch_level); ip; ip++) {
+         tbox::Pointer<hier::Patch> patch = *ip;
+
+         patch->allocatePatchData(d_temp_var_scratch_data, new_time);
+         // "false" argument indicates "initial_time" is false.
+         t_patch_num_kernel->start();
+         double patch_dt =
+            d_patch_strategy->computeStableDtOnPatch(*patch,
+               false,
+               new_time);
+         t_patch_num_kernel->stop();
+
+         dt_next = tbox::MathUtilities<double>::Min(dt_next, patch_dt);
+
+         patch->deallocatePatchData(d_temp_var_scratch_data);
+
+      }
+      d_patch_strategy->clearDataContext();
+
+   } // !regrid_advance
+
+   patch_level->deallocatePatchData(d_saved_var_scratch_data);
+
+   postprocessFluxData(patch_level,
+      regrid_advance,
+      first_step,
+      last_step);
+
+   t_advance_level->stop();
+
+   t_advance_level_sync->start();
+
+   if (d_distinguish_mpi_reduction_costs) {
+      patch_hierarchy->getDomainMappedBoxLevel().getMPI().Barrier();
+      t_advance_level_sync->stop();
+      t_mpi_reductions->start();
+   }
+
+   double next_dt = dt_next;
+   const tbox::SAMRAI_MPI& mpi(patch_hierarchy->getDomainMappedBoxLevel().getMPI());
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&next_dt, 1, MPI_MIN);
+   }
+   next_dt *= d_cfl;
+
+   if (d_distinguish_mpi_reduction_costs) {
+      t_mpi_reductions->stop();
+   } else {
+      t_advance_level_sync->stop();
+   }
+
+   return next_dt;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Synchronize data between patch levels according to the standard       *
+ * hyperbolic flux correction algorithm.                                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HyperbolicLevelIntegrator::standardLevelSynchronization(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level,
+   const double sync_time,
+   const double old_time)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *hierarchy);
+
+   tbox::Array<double> old_times(finest_level - coarsest_level + 1);
+   for (int i = coarsest_level; i <= finest_level; i++) {
+      old_times[i] = old_time;
+   }
+   standardLevelSynchronization(hierarchy, coarsest_level, finest_level,
+      sync_time, old_times);
+}
+
+void HyperbolicLevelIntegrator::standardLevelSynchronization(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level,
+   const double sync_time,
+   const tbox::Array<double>& old_times)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (coarsest_level < finest_level)
+      && (finest_level <= hierarchy->getFinestLevelNumber()));
+   TBOX_ASSERT(old_times.getSize() >= finest_level);
+   for (int ln = coarsest_level; ln < finest_level; ln++) {
+      TBOX_ASSERT(!(hierarchy->getPatchLevel(ln)).isNull());
+      TBOX_ASSERT(sync_time >= old_times[ln]);
+   }
+   TBOX_ASSERT(!(hierarchy->getPatchLevel(finest_level)).isNull());
+#endif
+   t_std_level_sync->start();
+
+   for (int fine_ln = finest_level; fine_ln > coarsest_level; fine_ln--) {
+      const int coarse_ln = fine_ln - 1;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(sync_time >= old_times[coarse_ln]);
+#endif
+
+      tbox::Pointer<hier::PatchLevel>
+      fine_level = hierarchy->getPatchLevel(fine_ln);
+      tbox::Pointer<hier::PatchLevel>
+      coarse_level = hierarchy->getPatchLevel(coarse_ln);
+
+      const tbox::Pointer<hier::PatchHierarchy>
+      patch_hierarchy = hierarchy;
+
+      synchronizeLevelWithCoarser(fine_level,
+         coarse_level,
+         sync_time,
+         old_times[coarse_ln]);
+
+      fine_level->deallocatePatchData(d_fluxsum_data);
+      fine_level->deallocatePatchData(d_flux_var_data);
+
+      if (coarse_ln > coarsest_level) {
+         coarse_level->deallocatePatchData(d_flux_var_data);
+      } else {
+         if (coarsest_level == 0) {
+            coarse_level->deallocatePatchData(d_flux_var_data);
+            d_have_flux_on_level_zero = false;
+         }
+      }
+
+   }
+
+   t_std_level_sync->stop();
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Coarsen current solution data from finest hierarchy level specified   *
+ * down through the coarsest hierarchy level specified, if initial_time  *
+ * is true (i.e., hierarchy is being constructed at initial simulation   *
+ * time).  After data is coarsened, the user's initialization routine    *
+ * is called to reset data (as needed by the application) before         *
+ * that solution is further coarsened to the next coarser level in the   *
+ * hierarchy.  If initial_time is false, then this routine does nothing  *
+ * In that case, interpolation of data from coarser levels is sufficient *
+ * to set data on new levels in the hierarchy during regridding.         *
+ *                                                                       *
+ * NOTE: The fact that this routine does nothing when called at any      *
+ *       time later than when the AMR hierarchy is constructed initially *
+ *        may need to change at some point based on application needs.   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HyperbolicLevelIntegrator::synchronizeNewLevels(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level,
+   const double sync_time,
+   const bool initial_time)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (coarsest_level < finest_level)
+      && (finest_level <= hierarchy->getFinestLevelNumber()));
+   for (int ln = coarsest_level; ln <= finest_level; ln++) {
+      TBOX_ASSERT(!(hierarchy->getPatchLevel(ln)).isNull());
+   }
+#endif
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *hierarchy);
+
+   tbox::Pointer<hier::PatchHierarchy> patch_hierarchy = hierarchy;
+
+   t_sync_new_levels->start();
+
+   if (initial_time) {
+
+      d_patch_strategy->setDataContext(d_current);
+
+      for (int fine_ln = finest_level; fine_ln > coarsest_level; fine_ln--) {
+         const int coarse_ln = fine_ln - 1;
+
+         tbox::Pointer<hier::PatchLevel> fine_level =
+            hierarchy->getPatchLevel(fine_ln);
+
+         tbox::Pointer<hier::PatchLevel> coarse_level =
+            hierarchy->getPatchLevel(coarse_ln);
+
+         t_sync_initial_create->start();
+         tbox::Pointer<xfer::CoarsenSchedule> sched =
+            d_sync_initial_data->createSchedule(coarse_level,
+               fine_level,
+               d_patch_strategy);
+         t_sync_initial_create->stop();
+
+         t_sync_initial_comm->start();
+         sched->coarsenData();
+         t_sync_initial_comm->stop();
+
+         for (hier::PatchLevel::Iterator p(coarse_level); p; p++) {
+            tbox::Pointer<hier::Patch> patch = *p;
+
+            patch->allocatePatchData(d_temp_var_scratch_data, sync_time);
+
+            d_patch_strategy->initializeDataOnPatch(*patch,
+               sync_time,
+               initial_time);
+            patch->deallocatePatchData(d_temp_var_scratch_data);
+         }
+      }
+
+      d_patch_strategy->clearDataContext();
+
+   } // if (initial_time)
+
+   t_sync_new_levels->stop();
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Synchronize data between coarse and fine patch levels according to    *
+ * the standard hyperbolic flux correction algorithm.  The steps of      *
+ * the algorithm are:                                                    *
+ *                                                                       *
+ *    (1) Replace coarse time-space flux integrals at coarse-fine        *
+ *        boundaries with time-space flux integrals computed on fine     *
+ *        level.                                                         *
+ *    (2) Repeat conservative difference on coarse level with corrected  *
+ *        fluxes.                                                        *
+ *    (3) Conservatively coarsen solution on interior of fine level to   *
+ *        coarse level.                                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HyperbolicLevelIntegrator::synchronizeLevelWithCoarser(
+   const tbox::Pointer<hier::PatchLevel> fine_level,
+   const tbox::Pointer<hier::PatchLevel> coarse_level,
+   const double sync_time,
+   const double coarse_sim_time)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!fine_level.isNull());
+   TBOX_ASSERT(!coarse_level.isNull());
+   TBOX_ASSERT(coarse_level->getLevelNumber() ==
+      (fine_level->getLevelNumber() - 1));
+#endif
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim, *fine_level, *coarse_level);
+
+   /*
+    * Coarsen flux integrals around fine patch boundaries to coarser level
+    * and replace coarse flux information where appropriate.  NULL patch
+    * model is passed in to avoid over complicating coarsen process;
+    * i.e. patch model is not needed in coarsening of flux integrals.
+    */
+
+   t_coarsen_fluxsum_create->start();
+   tbox::Pointer<xfer::CoarsenSchedule> sched =
+      d_coarsen_fluxsum->createSchedule(
+         coarse_level,
+         fine_level,
+         NULL);
+   t_coarsen_fluxsum_create->stop();
+
+   t_coarsen_fluxsum_comm->start();
+   sched->coarsenData();
+   t_coarsen_fluxsum_comm->stop();
+
+   /*
+    * Repeat conservative difference on coarser level.
+    */
+   coarse_level->allocatePatchData(d_saved_var_scratch_data, coarse_sim_time);
+   coarse_level->setTime(coarse_sim_time, d_flux_var_data);
+
+   d_patch_strategy->setDataContext(d_scratch);
+   t_advance_bdry_fill_comm->start();
+   d_bdry_sched_advance[coarse_level->getLevelNumber()]->
+   fillData(coarse_sim_time);
+   t_advance_bdry_fill_comm->stop();
+
+   const double reflux_dt = sync_time - coarse_sim_time;
+
+   for (hier::PatchLevel::Iterator ip(coarse_level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      patch->allocatePatchData(d_temp_var_scratch_data, coarse_sim_time);
+
+      bool at_syncronization = true;
+      d_patch_strategy->conservativeDifferenceOnPatch(*patch,
+         coarse_sim_time,
+         reflux_dt,
+         at_syncronization);
+      patch->deallocatePatchData(d_temp_var_scratch_data);
+   }
+
+   d_patch_strategy->clearDataContext();
+
+   copyTimeDependentData(coarse_level, d_scratch, d_new);
+
+   coarse_level->deallocatePatchData(d_saved_var_scratch_data);
+
+   /*
+    * Coarsen time-dependent data from fine patch interiors to coarse patches.
+    */
+
+   t_coarsen_sync_create->start();
+   sched = d_coarsen_sync_data->createSchedule(
+         coarse_level,
+         fine_level,
+         d_patch_strategy);
+   t_coarsen_sync_create->stop();
+
+   d_patch_strategy->setDataContext(d_new);
+
+   t_coarsen_sync_comm->start();
+   sched->coarsenData();
+   t_coarsen_sync_comm->stop();
+
+   d_patch_strategy->clearDataContext();
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Reset time-dependent data on patch level by replacing current data    *
+ * with new.  The boolean argument is used for odd refinement ratios     *
+ * (in particular 3 used in certain applications).                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HyperbolicLevelIntegrator::resetTimeDependentData(
+   const tbox::Pointer<hier::BasePatchLevel> level,
+   const double new_time,
+   const bool can_be_refined)
+{
+   TBOX_ASSERT(!level.isNull());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *level);
+
+   tbox::Pointer<hier::PatchLevel> patch_level = level;
+
+   hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+
+   double cur_time = 0.;
+   for (hier::PatchLevel::Iterator ip(patch_level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      tbox::List<tbox::Pointer<hier::Variable> >::Iterator
+      time_dep_var = d_time_dep_variables.listStart();
+      while (time_dep_var) {
+
+         int cur_indx =
+            variable_db->mapVariableAndContextToIndex(time_dep_var(),
+               d_current);
+         int new_indx =
+            variable_db->mapVariableAndContextToIndex(time_dep_var(),
+               d_new);
+
+         cur_time = patch->getPatchData(cur_indx)->getTime();
+
+         if (can_be_refined && d_number_time_data_levels == 3) {
+
+            int old_indx =
+               variable_db->mapVariableAndContextToIndex(time_dep_var(),
+                  d_old);
+
+            patch->setPatchData(old_indx, patch->getPatchData(cur_indx));
+
+            patch->setPatchData(cur_indx, patch->getPatchData(new_indx));
+
+         } else {
+
+            if (d_number_time_data_levels == 3) {
+
+               int old_indx =
+                  variable_db->mapVariableAndContextToIndex(time_dep_var(),
+                     d_old);
+
+               patch->setPatchData(old_indx, patch->getPatchData(cur_indx));
+
+            }
+
+            patch->setPatchData(cur_indx, patch->getPatchData(new_indx));
+
+         }
+
+         patch->deallocatePatchData(new_indx);
+
+         time_dep_var++;
+
+      }
+
+   }
+
+   patch_level->setTime(new_time, d_new_patch_init_data);
+
+   if (d_number_time_data_levels == 3) {
+      patch_level->setTime(cur_time, d_old_time_dep_data);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Discard new data on level.  This is used primarily to reset patch     *
+ * data after error estimation (e.g., Richardson extrapolation.)         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HyperbolicLevelIntegrator::resetDataToPreadvanceState(
+   const tbox::Pointer<hier::BasePatchLevel> level)
+{
+   TBOX_ASSERT(!level.isNull());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *level);
+
+   /*
+    * De-allocate new context
+    */
+   level->deallocatePatchData(d_new_time_dep_data);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register given variable with algorithm according to specified         *
+ * algorithm role (i.e., HYP_VAR_TYPE).  Assignment of descriptor        *
+ * indices to variable lists, component selectors, and communication     *
+ * algorithms takes place here.  The different cases are:                *
+ *                                                                       *
+ * TIME_DEP:                                                             *
+ *            The number of factories depends on the number of time      *
+ *            levels of data that must be stored on patches to satisfy   *
+ *            regridding reqs.  Currently, there are two possibilities:  *
+ *                                                                       *
+ *            (1) If the coarsen ratios between levels are even, the     *
+ *                error coarsening ratio will be two and so only two     *
+ *                time levels of data must be maintained on every level  *
+ *                but the finest as usual.                               *
+ *                                                                       *
+ *            (2) If the coarsen ratios between levels are three, and    *
+ *                time integration is used during regridding (e.g., Rich-*
+ *                ardson extrapolation), then three time levels of data  *
+ *                must be maintained on every level but the finest so    *
+ *                that error estimation can be executed properly.        *
+ *                                                                       *
+ *            In case (1), three factories are needed:                   *
+ *                         SCRATCH, CURRENT, NEW.                        *
+ *            In case (2), four factories are needed:                    *
+ *                         SCRATCH, OLD, CURRENT, NEW.                   *
+ *                                                                       *
+ *            SCRATCH index is added to d_saved_var_scratch_data.        *
+ *            CURRENT index is added to d_new_patch_init_data.           *
+ *            NEW index is added to d_new_time_dep_data.                 *
+ *                                                                       *
+ * INPUT:                                                                *
+ *            Only one time level of data is maintained and once values  *
+ *            are set on patches, they do not change in time.            *
+ *                                                                       *
+ *            Two factories are needed: SCRATCH, CURRENT.                *
+ *                                                                       *
+ *            SCRATCH index is added to d_saved_var_scratch_data.        *
+ *            CURRENT index is added to d_new_patch_init_data.           *
+ *                                                                       *
+ * NO_FILL:                                                              *
+ *            Only one time level of data is stored and no scratch space *
+ *            is used.  Data may be set and manipulated at will in user  *
+ *            routines.  Data (including ghost values) is never touched  *
+ *            outside of user routines.                                  *
+ *                                                                       *
+ *            Two factories are needed: CURRENT, SCRATCH.                *
+ *                                                                       *
+ *            CURRENT index is added to d_new_patch_init_data.           *
+ *            SCRATCH index is needed only for temporary work space to   *
+ *            fill new patch levels.                                     *
+ *                                                                       *
+ * FLUX:                                                                 *
+ *            One factory is needed: SCRATCH.                            *
+ *                                                                       *
+ *            SCRATCH index is added to d_flux_var_data.                 *
+ *                                                                       *
+ *            Additionally, a variable for flux integral data is created *
+ *            for each FLUX variable. It has a single factory, SCRATCH,  *
+ *            which is added to d_fluxsum_data.                          *
+ *                                                                       *
+ * TEMPORARY:                                                            *
+ *            One factory needed: SCRATCH.                               *
+ *            SCRATCH index is added to d_temp_var_scratch_data.         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HyperbolicLevelIntegrator::registerVariable(
+   const tbox::Pointer<hier::Variable> var,
+   const hier::IntVector ghosts,
+   const HYP_VAR_TYPE h_v_type,
+   const tbox::Pointer<xfer::Geometry> transfer_geom,
+   const std::string& coarsen_name,
+   const std::string& refine_name)
+{
+
+   const tbox::Dimension dim(ghosts.getDim());
+
+   TBOX_ASSERT(!var.isNull());
+   TBOX_ASSERT(!transfer_geom.isNull());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, *var);
+
+   hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+
+   const hier::IntVector& zero_ghosts(hier::IntVector::getZero(dim));
+
+   d_all_variables.appendItem(var);
+
+   switch (h_v_type) {
+
+      case TIME_DEP: {
+
+         d_time_dep_variables.appendItem(var);
+
+         int cur_id = variable_db->registerVariableAndContext(var,
+               d_current,
+               zero_ghosts);
+         int new_id = variable_db->registerVariableAndContext(var,
+               d_new,
+               zero_ghosts);
+         int scr_id = variable_db->registerVariableAndContext(var,
+               d_scratch,
+               ghosts);
+
+         d_saved_var_scratch_data.setFlag(scr_id);
+
+         d_new_patch_init_data.setFlag(cur_id);
+
+         d_new_time_dep_data.setFlag(new_id);
+
+         /*
+          * Register variable and context needed for restart.
+          */
+         hier::VariableDatabase::getDatabase()->
+         registerPatchDataForRestart(cur_id);
+
+         /*
+          * Set boundary fill schedules for time-dependent variable.
+          * If time interpolation operator is non-NULL, regular advance
+          * bdry fill algorithm will time interpolate between current and
+          * new data on coarser levels, and fill from current data on
+          * same level.  New advance bdry fill algorithm will time interpolate
+          * between current and new data on coarser levels, and fill from new
+          * data on same level.  If time interpolation operator is NULL,
+          * regular and new bdry fill algorithms will use current and new
+          * data, respectively.
+          */
+
+         tbox::Pointer<xfer::RefineOperator> refine_op =
+            transfer_geom->lookupRefineOperator(var, refine_name);
+
+         tbox::Pointer<xfer::TimeInterpolateOperator> time_int =
+            transfer_geom->lookupTimeInterpolateOperator(var);
+
+         d_bdry_fill_advance->registerRefine(
+            scr_id, cur_id, cur_id, new_id, scr_id, refine_op, time_int);
+         d_bdry_fill_advance_new->registerRefine(
+            scr_id, new_id, cur_id, new_id, scr_id, refine_op, time_int);
+         d_fill_new_level->registerRefine(
+            cur_id, cur_id, cur_id, new_id, scr_id, refine_op, time_int);
+
+         /*
+          * For data synchronization between levels, the coarsen algorithm
+          * will coarsen new data on finer level to new data on coarser.
+          * Recall that coarser level data pointers will not be reset until
+          * after synchronization so we always coarsen to new
+          * (see synchronizeLevelWithCoarser routine).
+          */
+
+         tbox::Pointer<xfer::CoarsenOperator> coarsen_op =
+            transfer_geom->lookupCoarsenOperator(var, coarsen_name);
+
+         d_coarsen_sync_data->registerCoarsen(new_id, new_id, coarsen_op);
+
+         d_sync_initial_data->registerCoarsen(cur_id, cur_id, coarsen_op);
+
+         /*
+          * Coarsen operations used in Richardson extrapolation.  The init
+          * initializes data on coarser level, before the coarse level
+          * advance.  If two time levels are used, coarsening occurs between
+          * the CURRENT context on both levels.  If three levels are used,
+          * coarsening occurs between the OLD context on the fine level and
+          * the CURRENT context on the coarse level.  The final coarsen
+          * algorithm coarsens data after it has been advanced on the fine
+          * level to the NEW context on the coarser level.
+          */
+
+         if (d_number_time_data_levels == 3) {
+
+            int old_id = variable_db->registerVariableAndContext(var,
+                  d_old,
+                  zero_ghosts);
+            d_old_time_dep_data.setFlag(old_id);
+
+            d_bdry_fill_advance_old->registerRefine(
+               scr_id, cur_id, old_id, new_id, scr_id, refine_op, time_int);
+
+            d_coarsen_rich_extrap_init->
+            registerCoarsen(cur_id, old_id, coarsen_op);
+
+         } else {
+
+            d_coarsen_rich_extrap_init->
+            registerCoarsen(cur_id, cur_id, coarsen_op);
+         }
+
+         d_coarsen_rich_extrap_final->
+         registerCoarsen(new_id, new_id, coarsen_op);
+
+         break;
+      }
+
+      case INPUT: {
+
+         int cur_id = variable_db->registerVariableAndContext(var,
+               d_current,
+               zero_ghosts);
+         int scr_id = variable_db->registerVariableAndContext(var,
+               d_scratch,
+               ghosts);
+
+         d_saved_var_scratch_data.setFlag(scr_id);
+
+         d_new_patch_init_data.setFlag(cur_id);
+
+         /*
+          * Register variable and context needed for restart.
+          */
+         hier::VariableDatabase::getDatabase()->
+         registerPatchDataForRestart(cur_id);
+
+         /*
+          * Bdry algorithms for input variables will fill from current only.
+          */
+         tbox::Pointer<xfer::RefineOperator> refine_op =
+            transfer_geom->lookupRefineOperator(var, refine_name);
+
+         d_bdry_fill_advance->registerRefine(
+            scr_id, cur_id, scr_id, refine_op);
+         d_bdry_fill_advance_new->registerRefine(
+            scr_id, cur_id, scr_id, refine_op);
+         d_fill_new_level->registerRefine(
+            cur_id, cur_id, scr_id, refine_op);
+
+         /*
+          * At initialization, it may be necessary to coarsen INPUT data
+          * up through the hierarchy so that all levels are consistent.
+          */
+
+         tbox::Pointer<xfer::CoarsenOperator> coarsen_op =
+            transfer_geom->lookupCoarsenOperator(var, coarsen_name);
+
+         d_sync_initial_data->registerCoarsen(cur_id, cur_id, coarsen_op);
+
+         /*
+          * Coarsen operation for setting initial data on coarser level
+          * in the Richardson extrapolation algorithm.
+          */
+
+         d_coarsen_rich_extrap_init->
+         registerCoarsen(cur_id, cur_id, coarsen_op);
+
+         break;
+      }
+
+      case NO_FILL: {
+
+         int cur_id = variable_db->registerVariableAndContext(var,
+               d_current,
+               ghosts);
+
+         int scr_id = variable_db->registerVariableAndContext(var,
+               d_scratch,
+               ghosts);
+
+         d_new_patch_init_data.setFlag(cur_id);
+
+         /*
+          * Register variable and context needed for restart.
+          */
+         hier::VariableDatabase::getDatabase()->
+         registerPatchDataForRestart(cur_id);
+
+         tbox::Pointer<xfer::RefineOperator> refine_op =
+            transfer_geom->lookupRefineOperator(var, refine_name);
+
+         d_fill_new_level->registerRefine(
+            cur_id, cur_id, scr_id, refine_op);
+
+         /*
+          * Coarsen operation for setting initial data on coarser level
+          * in the Richardson extrapolation algorithm.
+          */
+
+         tbox::Pointer<xfer::CoarsenOperator> coarsen_op =
+            transfer_geom->lookupCoarsenOperator(var, coarsen_name);
+
+         d_coarsen_rich_extrap_init->
+         registerCoarsen(cur_id, cur_id, coarsen_op);
+
+         break;
+      }
+
+      case FLUX: {
+
+         /*
+          * Note that we force all flux variables to hold double precision
+          * data and be face- or side-centered.  Also, for each flux variable,
+          * a corresponding "fluxsum" variable is created to manage
+          * synchronization of data betweeen patch levels in the hierarchy.
+          */
+         const tbox::Pointer<pdat::FaceVariable<double> > face_var(var);
+         const tbox::Pointer<pdat::SideVariable<double> > side_var(var);
+
+         if (!(face_var.isNull())) {
+            if (d_flux_side_registered) {
+               TBOX_ERROR(
+                  d_object_name << ":  "
+                  <<
+                  "Attempt to register FaceVariable when "
+                  << "SideVariable already registered."
+                  << std::endl);
+            }
+
+            d_flux_is_face = true;
+
+         } else if (!(side_var.isNull())) {
+            if (d_flux_face_registered) {
+               TBOX_ERROR(
+                  d_object_name << ":  "
+                  <<
+                  "Attempt to register SideVariable when "
+                  << "FaceVariable already registered."
+                  << std::endl);
+            }
+
+            d_flux_is_face = false;
+
+         } else {
+            TBOX_ERROR(
+               d_object_name << ":  "
+               <<
+               "Flux is neither face- or side-centered." << std::endl);
+         }
+
+         d_flux_variables.appendItem(var);
+
+         int scr_id = variable_db->registerVariableAndContext(var,
+               d_scratch,
+               ghosts);
+
+         d_flux_var_data.setFlag(scr_id);
+
+         std::string var_name = var->getName();
+         std::string fs_suffix = "_fluxsum";
+         std::string fsum_name = var_name;
+         fsum_name += fs_suffix;
+
+         tbox::Pointer<hier::Variable> fluxsum;
+
+         if (d_flux_is_face) {
+            fluxsum = new pdat::OuterfaceVariable<double>(
+                  dim,
+                  fsum_name,
+                  ((tbox::Pointer<pdat::FaceDataFactory<double> >)
+                   var->getPatchDataFactory())->getDepth());
+            d_flux_face_registered = true;
+         } else {
+            fluxsum = new pdat::OutersideVariable<double>(
+                  dim,
+                  fsum_name,
+                  ((tbox::Pointer<pdat::SideDataFactory<double> >)
+                   var->getPatchDataFactory())->getDepth());
+            d_flux_side_registered = true;
+         }
+
+         d_fluxsum_variables.appendItem(fluxsum);
+
+         int fs_id = variable_db->registerVariableAndContext(fluxsum,
+               d_scratch,
+               zero_ghosts);
+
+         d_fluxsum_data.setFlag(fs_id);
+
+         tbox::Pointer<xfer::CoarsenOperator> coarsen_op =
+            transfer_geom->lookupCoarsenOperator(fluxsum, coarsen_name);
+
+         d_coarsen_fluxsum->registerCoarsen(scr_id, fs_id, coarsen_op);
+
+         break;
+      }
+
+      case TEMPORARY: {
+
+         int scr_id = variable_db->registerVariableAndContext(var,
+               d_scratch,
+               ghosts);
+
+         d_temp_var_scratch_data.setFlag(scr_id);
+
+         break;
+      }
+
+      default: {
+
+         TBOX_ERROR(
+            d_object_name << ":  "
+            << "unknown HYP_VAR_TYPE = " << h_v_type
+            << std::endl);
+
+      }
+
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Process FLUX and FLUX INTEGRAL data before integration on the level.  *
+ *                                                                       *
+ * We allocate FLUX storage if appropriate.                              *
+ *                                                                       *
+ * If the advance is not temporary, we also zero out the FLUX INTEGRALS  *
+ * on the first step of any level finer than level zero.                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HyperbolicLevelIntegrator::preprocessFluxData(
+   const tbox::Pointer<hier::PatchLevel> level,
+   const double cur_time,
+   const double new_time,
+   const bool regrid_advance,
+   const bool first_step,
+   const bool last_step)
+{
+   NULL_USE(last_step);
+   NULL_USE(cur_time);
+
+   TBOX_ASSERT(!level.isNull());
+   TBOX_ASSERT(cur_time <= new_time);
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *level);
+
+   hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+
+   const int level_number = level->getLevelNumber();
+
+   if (!regrid_advance) {
+      if (((level_number > 0) && first_step) ||
+          ((level_number == 0) && !d_have_flux_on_level_zero)) {
+         level->allocatePatchData(d_flux_var_data, new_time);
+         if (level_number == 0) {
+            d_have_flux_on_level_zero = true;
+         }
+      }
+   } else {
+      if (first_step) {
+         level->allocatePatchData(d_flux_var_data, new_time);
+      }
+   }
+
+   if (!regrid_advance && (level_number > 0)) {
+
+      if (first_step) {
+
+         level->allocatePatchData(d_fluxsum_data, new_time);
+
+         for (hier::PatchLevel::Iterator p(level); p; p++) {
+            tbox::Pointer<hier::Patch> patch = *p;
+
+            tbox::List<tbox::Pointer<hier::Variable> >::Iterator
+            fs_var = d_fluxsum_variables.listStart();
+
+            while (fs_var) {
+               int fsum_id =
+                  variable_db->mapVariableAndContextToIndex(fs_var(),
+                     d_scratch);
+
+               if (d_flux_is_face) {
+                  tbox::Pointer<pdat::OuterfaceData<double> > fsum_data =
+                     patch->getPatchData(fsum_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+                  TBOX_ASSERT(!(fsum_data.isNull()));
+#endif
+                  fsum_data->fillAll(0.0);
+               } else {
+                  tbox::Pointer<pdat::OutersideData<double> > fsum_data =
+                     patch->getPatchData(fsum_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+                  TBOX_ASSERT(!(fsum_data.isNull()));
+#endif
+                  fsum_data->fillAll(0.0);
+               }
+
+               fs_var++;
+            }
+         }
+
+      } else {
+         level->setTime(new_time, d_fluxsum_data);
+      }
+
+   } // if ( !regrid_advance && (level_number > 0) )
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Process FLUX and FLUX INTEGRAL data after advancing the solution on   *
+ * the level.  During normal integration steps, the flux integrals are   *
+ * updated for subsequent synchronization by adding FLUX values to       *
+ * flux integrals.                                                       *
+ *                                                                       *
+ * If the advance is not temporary (regular integration step):           *
+ * 1) If the level is the finest in the hierarchy, FLUX data is          *
+ *    deallocated.  It is not used during synchronization, and is only   *
+ *    maintained if needed for the advance.                              *
+ *                                                                       *
+ * 2) If the level is not the coarsest in the hierarchy, update the      *
+ *    flux integrals for later synchronization by adding FLUX values to  *
+ *    flux integrals.                                                    *
+ *                                                                       *
+ * If the advance is temporary, deallocate the flux data if first step.  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HyperbolicLevelIntegrator::postprocessFluxData(
+   const tbox::Pointer<hier::PatchLevel> level,
+   const bool regrid_advance,
+   const bool first_step,
+   const bool last_step)
+{
+   NULL_USE(last_step);
+
+   TBOX_ASSERT(!level.isNull());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *level);
+
+   if (d_dim > tbox::Dimension(3)) {
+      TBOX_ERROR(
+         "HyperbolicLevelIntegrator::postprocessFluxData : DIM > 3 not implemented");
+   }
+
+   if (regrid_advance && first_step) {
+      level->deallocatePatchData(d_flux_var_data);
+   }
+
+   if (!regrid_advance && (level->getLevelNumber() > 0)) {
+
+      for (hier::PatchLevel::Iterator p(level); p; p++) {
+         tbox::Pointer<hier::Patch> patch = *p;
+
+         tbox::List<tbox::Pointer<hier::Variable> >::Iterator
+         flux_var = d_flux_variables.listStart();
+         tbox::List<tbox::Pointer<hier::Variable> >::Iterator
+         fluxsum_var = d_fluxsum_variables.listStart();
+
+         const hier::Index& ilo = patch->getBox().lower();
+         const hier::Index& ihi = patch->getBox().upper();
+
+         while (flux_var) {
+
+            tbox::Pointer<hier::PatchData> flux_data =
+               patch->getPatchData(flux_var(), d_scratch);
+            tbox::Pointer<hier::PatchData> fsum_data =
+               patch->getPatchData(fluxsum_var(), d_scratch);
+
+            tbox::Pointer<pdat::FaceData<double> > fflux_data;
+            tbox::Pointer<pdat::OuterfaceData<double> > ffsum_data;
+
+            tbox::Pointer<pdat::SideData<double> > sflux_data;
+            tbox::Pointer<pdat::OutersideData<double> > sfsum_data;
+
+            int ddepth;
+            hier::IntVector flux_ghosts(d_dim);
+
+            if (d_flux_is_face) {
+               fflux_data = flux_data;
+               ffsum_data = fsum_data;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+               TBOX_ASSERT(!(fflux_data.isNull()) && !(ffsum_data.isNull()));
+               TBOX_ASSERT(fflux_data->getDepth() == ffsum_data->getDepth());
+#endif
+               ddepth = fflux_data->getDepth();
+               flux_ghosts = fflux_data->getGhostCellWidth();
+            } else {
+               sflux_data = flux_data;
+               sfsum_data = fsum_data;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+               TBOX_ASSERT(!(sflux_data.isNull()) && !(sfsum_data.isNull()));
+               TBOX_ASSERT(sflux_data->getDepth() == sfsum_data->getDepth());
+#endif
+               ddepth = sflux_data->getDepth();
+               flux_ghosts = sflux_data->getGhostCellWidth();
+            }
+
+            for (int d = 0; d < ddepth; d++) {
+               // loop over lower and upper parts of outer face/side arrays
+               for (int ifs = 0; ifs < 2; ifs++) {
+                  if (d_dim == tbox::Dimension(1)) {
+                     F77_FUNC(upfluxsum1d, UPFLUXSUM1D) (ilo(0), ihi(0),
+                        flux_ghosts(0),
+                        ifs,
+                        fflux_data->getPointer(0, d),
+                        ffsum_data->getPointer(0, ifs, d));
+                  } else {
+
+                     if (d_flux_is_face) {
+                        if (d_dim == tbox::Dimension(2)) {
+                           F77_FUNC(upfluxsumface2d0, UPFLUXSUMFACE2D0) (ilo(0),
+                              ilo(1), ihi(0), ihi(1),
+                              flux_ghosts(0),
+                              flux_ghosts(1),
+                              ifs,
+                              fflux_data->getPointer(0, d),
+                              ffsum_data->getPointer(0, ifs, d));
+                           F77_FUNC(upfluxsumface2d1, UPFLUXSUMFACE2D1) (ilo(0),
+                              ilo(1), ihi(0), ihi(1),
+                              flux_ghosts(0),
+                              flux_ghosts(1),
+                              ifs,
+                              fflux_data->getPointer(1, d),
+                              ffsum_data->getPointer(1, ifs, d));
+                        }
+
+                        if (d_dim == tbox::Dimension(3)) {
+                           F77_FUNC(upfluxsumface3d0, UPFLUXSUMFACE3D0) (ilo(0),
+                              ilo(1), ilo(2),
+                              ihi(0), ihi(1), ihi(2),
+                              flux_ghosts(0),
+                              flux_ghosts(1),
+                              flux_ghosts(2),
+                              ifs,
+                              fflux_data->getPointer(0, d),
+                              ffsum_data->getPointer(0, ifs, d));
+                           F77_FUNC(upfluxsumface3d1, UPFLUXSUMFACE3D1) (ilo(0),
+                              ilo(1), ilo(2),
+                              ihi(0), ihi(1), ihi(2),
+                              flux_ghosts(0),
+                              flux_ghosts(1),
+                              flux_ghosts(2),
+                              ifs,
+                              fflux_data->getPointer(1, d),
+                              ffsum_data->getPointer(1, ifs, d));
+                           F77_FUNC(upfluxsumface3d2, UPFLUXSUMFACE3D2) (ilo(0),
+                              ilo(1), ilo(2),
+                              ihi(0), ihi(1), ihi(2),
+                              flux_ghosts(0),
+                              flux_ghosts(1),
+                              flux_ghosts(2),
+                              ifs,
+                              fflux_data->getPointer(2, d),
+                              ffsum_data->getPointer(2, ifs, d));
+                        }
+                     } else {
+                        if (d_dim == tbox::Dimension(2)) {
+                           F77_FUNC(upfluxsumside2d0, UPFLUXSUMSIDE2D0) (ilo(0),
+                              ilo(1), ihi(0), ihi(1),
+                              flux_ghosts(0),
+                              flux_ghosts(1),
+                              ifs,
+                              sflux_data->getPointer(0, d),
+                              sfsum_data->getPointer(0, ifs, d));
+                           F77_FUNC(upfluxsumside2d1, UPFLUXSUMSIDE2D1) (ilo(0),
+                              ilo(1), ihi(0), ihi(1),
+                              flux_ghosts(0),
+                              flux_ghosts(1),
+                              ifs,
+                              sflux_data->getPointer(1, d),
+                              sfsum_data->getPointer(1, ifs, d));
+                        }
+                        if (d_dim == tbox::Dimension(3)) {
+                           F77_FUNC(upfluxsumside3d0, UPFLUXSUMSIDE3D0) (ilo(0),
+                              ilo(1), ilo(2),
+                              ihi(0), ihi(1), ihi(2),
+                              flux_ghosts(0),
+                              flux_ghosts(1),
+                              flux_ghosts(2),
+                              ifs,
+                              sflux_data->getPointer(0, d),
+                              sfsum_data->getPointer(0, ifs, d));
+                           F77_FUNC(upfluxsumside3d1, UPFLUXSUMSIDE3D1) (ilo(0),
+                              ilo(1), ilo(2),
+                              ihi(0), ihi(1), ihi(2),
+                              flux_ghosts(0),
+                              flux_ghosts(1),
+                              flux_ghosts(2),
+                              ifs,
+                              sflux_data->getPointer(1, d),
+                              sfsum_data->getPointer(1, ifs, d));
+                           F77_FUNC(upfluxsumside3d2, UPFLUXSUMSIDE3D2) (ilo(0),
+                              ilo(1), ilo(2),
+                              ihi(0), ihi(1), ihi(2),
+                              flux_ghosts(0),
+                              flux_ghosts(1),
+                              flux_ghosts(2),
+                              ifs,
+                              sflux_data->getPointer(2, d),
+                              sfsum_data->getPointer(2, ifs, d));
+                        }
+                     }  // if face operations vs. side operations
+                  }
+               }  // loop over lower and upper sides/faces
+            }  // loop over depth
+
+            flux_var++;
+            fluxsum_var++;
+
+         }  // loop over flux variables
+
+      }  // loop over patches
+
+   }  // if !regrid_advance and level number > 0 ....
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Copy time-dependent data from source to destination on level.         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HyperbolicLevelIntegrator::copyTimeDependentData(
+   const tbox::Pointer<hier::PatchLevel> level,
+   const tbox::Pointer<hier::VariableContext> src_context,
+   const tbox::Pointer<hier::VariableContext> dst_context)
+{
+   TBOX_ASSERT(!level.isNull());
+   TBOX_ASSERT(!src_context.isNull());
+   TBOX_ASSERT(!src_context.isNull());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *level);
+
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      tbox::List<tbox::Pointer<hier::Variable> >::Iterator
+      time_dep_var = d_time_dep_variables.listStart();
+      while (time_dep_var) {
+         tbox::Pointer<hier::PatchData> src_data =
+            patch->getPatchData(time_dep_var(), src_context);
+         tbox::Pointer<hier::PatchData> dst_data =
+            patch->getPatchData(time_dep_var(), dst_context);
+
+         dst_data->copy(*src_data);
+         time_dep_var++;
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+void HyperbolicLevelIntegrator::recordStatistics(
+   const hier::PatchLevel& patch_level,
+   double current_time)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, patch_level);
+
+   const int ln = patch_level.getLevelNumber();
+
+   if (ln >= s_boxes_stat.size()) {
+      s_boxes_stat.resizeArray(ln + 1);
+      s_cells_stat.resizeArray(ln + 1);
+      s_timestamp_stat.resizeArray(ln + 1);
+   }
+
+   if (ln >= 0 /* Don't record work on non-hierarchy levels */) {
+
+      if (s_boxes_stat[ln].isNull()) {
+         std::string lnstr = tbox::Utilities::intToString(ln, 1);
+         s_boxes_stat[ln] =
+            tbox::Statistician::getStatistician()->
+            getStatistic(std::string("HLI_BoxesL") + lnstr, "PROC_STAT");
+         s_cells_stat[ln] =
+            tbox::Statistician::getStatistician()->
+            getStatistic(std::string("HLI_CellsL") + lnstr, "PROC_STAT");
+         s_timestamp_stat[ln] =
+            tbox::Statistician::getStatistician()->
+            getStatistic(std::string("HLI_TimeL") + lnstr, "PROC_STAT");
+      }
+
+      double level_gridcells = 0.;
+      double level_local_patches = 0.;
+      for (hier::PatchLevel::Iterator ip(patch_level); ip; ip++) {
+         tbox::Pointer<hier::Patch> patch = *ip;
+         level_gridcells += patch->getBox().size();
+         level_local_patches += 1.0;
+      }
+
+      s_boxes_stat[ln]->recordProcStat(level_local_patches);
+      s_cells_stat[ln]->recordProcStat(level_gridcells);
+      s_timestamp_stat[ln]->recordProcStat(current_time);
+
+   }
+}
+
+/*
+ *************************************************************************
+ * Write out gridding statistics collected by advanceLevel               *
+ *************************************************************************
+ */
+void HyperbolicLevelIntegrator::printStatistics(
+   std::ostream& s) const
+{
+   /*
+    * Output statistics.
+    */
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   // Collect statistic on mesh size.
+   tbox::Statistician* statn = tbox::Statistician::getStatistician();
+
+   statn->finalize(false);
+   // statn->printLocalStatData(s);
+   if (mpi.getRank() == 0) {
+      // statn->printAllGlobalStatData(s);
+      double n_cell_updates = 0; // Number of cell updates.
+      double n_patch_updates = 0; // Number of patch updates.
+      for (int ln = 0; ln < s_cells_stat.size(); ++ln) {
+         tbox::Statistic& cstat = *s_cells_stat[ln];
+         tbox::Statistic& bstat = *s_boxes_stat[ln];
+         tbox::Statistic& tstat = *s_timestamp_stat[ln];
+         s << "statistic " << cstat.getName() << ":" << std::endl;
+         if (0) {
+            s << "Global: \n";
+            statn->printGlobalProcStatDataFormatted(cstat.getInstanceId(), s);
+         }
+         s
+         <<
+         " Seq#  SimTime       C-Sum      C-Avg      C-Min   ->    C-Max  C-NormDiff  B-Sum B-Avg B-Min -> B-Max B-NormDiff C/B-Avg\n";
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1572)
+#endif
+         for (int sn = 0; sn < cstat.getStatSequenceLength(); ++sn) {
+            const double csum = statn->getGlobalProcStatSum(cstat.getInstanceId(
+                     ), sn);
+            const double cmax = statn->getGlobalProcStatMax(cstat.getInstanceId(
+                     ), sn);
+            const double cmin = statn->getGlobalProcStatMin(cstat.getInstanceId(
+                     ), sn);
+            const double cdiffnorm = cmax != 0 ? 1.0 - cmin / cmax : 0;
+            const double bsum = statn->getGlobalProcStatSum(bstat.getInstanceId(
+                     ), sn);
+            const double bmax = statn->getGlobalProcStatMax(bstat.getInstanceId(
+                     ), sn);
+            const double bmin = statn->getGlobalProcStatMin(bstat.getInstanceId(
+                     ), sn);
+            const double bdiffnorm = bmax != 0 ? 1.0 - bmin / bmax : 0;
+            const double stime = statn->getGlobalProcStatMin(
+                  tstat.getInstanceId(),
+                  sn);
+            s << std::setw(3) << sn << "  "
+              << std::scientific << std::setprecision(6) << std::setw(12)
+              << stime
+              << " "
+              << std::fixed << std::setprecision(0)
+              << std::setw(10) << csum << " "
+              << std::setw(10) << csum / mpi.getSize() << " "
+              << std::setw(10) << cmin << " -> "
+              << std::setw(10) << cmax
+              << "  " << std::setw(4) << std::setprecision(4) << cdiffnorm
+              << "  "
+              << std::fixed << std::setprecision(0)
+              << std::setw(6) << bsum << " "
+              << std::setw(5) << bsum / mpi.getSize() << " "
+              << std::setw(5) << bmin << "  ->"
+              << std::setw(5) << bmax
+              << "   " << std::setw(4) << std::setprecision(4) << bdiffnorm
+              << std::setw(10) << std::setprecision(0)
+              << (bsum != 0 ? csum / bsum : 0)
+              << std::endl;
+            n_cell_updates += csum;
+            n_patch_updates += bsum;
+         }
+      }
+      s << "Total number of cell updates: " << n_cell_updates
+        << " (" << double(n_cell_updates) / mpi.getSize()
+        << "/proc)"
+        << std::endl;
+      s << "Total number of boxe updates: " << n_patch_updates
+        << " (" << double(n_patch_updates) / mpi.getSize()
+        << "/proc)"
+        << std::endl;
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print all class data for HyperbolicLevelIntegrator object.      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HyperbolicLevelIntegrator::printClassData(
+   std::ostream& os) const
+{
+   os << "\nHyperbolicLevelIntegrator::printClassData..." << std::endl;
+   os << "HyperbolicLevelIntegrator: this = "
+      << (HyperbolicLevelIntegrator *)this << std::endl;
+   os << "d_object_name = " << d_object_name << std::endl;
+   os << "d_cfl = " << d_cfl << "\n"
+      << "d_cfl_init = " << d_cfl_init << std::endl;
+   os << "d_lag_dt_computation = " << d_lag_dt_computation << "\n"
+      << "d_use_ghosts_for_dt = "
+      << d_use_ghosts_for_dt << std::endl;
+   os << "d_patch_strategy = "
+      << (HyperbolicPatchStrategy *)d_patch_strategy << std::endl;
+   os
+   <<
+   "NOTE: Not printing variable arrays, ComponentSelectors, communication schedules, etc."
+   << std::endl;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Writes out the class version number, d_cfl, d_cfl_init,              *
+ * d_lag_dt_computation, and d_use_ghosts_for_dt to the database.	*
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HyperbolicLevelIntegrator::putToDatabase(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   db->putInteger("ALGS_HYPERBOLIC_LEVEL_INTEGRATOR_VERSION",
+      ALGS_HYPERBOLIC_LEVEL_INTEGRATOR_VERSION);
+
+   db->putDouble("d_cfl", d_cfl);
+   db->putDouble("d_cfl_init", d_cfl_init);
+   db->putBool("d_lag_dt_computation", d_lag_dt_computation);
+   db->putBool("d_use_ghosts_for_dt", d_use_ghosts_for_dt);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Reads in cfl, cfl_init, lag_dt_computation, and                      *
+ * use_ghosts_to_compute_dt from the input database.                    *
+ * Note all restart values are overriden with values from the input	*
+ * database.								*
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HyperbolicLevelIntegrator::getFromInput(
+   tbox::Pointer<tbox::Database> db,
+   bool is_from_restart)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   if (db->keyExists("cfl")) {
+      d_cfl = db->getDouble("cfl");
+   } else {
+      if (!is_from_restart) {
+         d_cfl = db->getDoubleWithDefault("cfl", d_cfl);
+      }
+   }
+
+   if (db->keyExists("cfl_init")) {
+      d_cfl_init = db->getDouble("cfl_init");
+   } else {
+      if (!is_from_restart) {
+         d_cfl_init = db->getDoubleWithDefault("cfl_init", d_cfl_init);
+      }
+   }
+
+   if (db->keyExists("lag_dt_computation")) {
+      d_lag_dt_computation = db->getBool("lag_dt_computation");
+   } else {
+      if (!is_from_restart) {
+         d_lag_dt_computation =
+            db->getBoolWithDefault("lag_dt_computation",
+               d_lag_dt_computation);
+      }
+   }
+
+   if (db->keyExists("use_ghosts_to_compute_dt")) {
+      d_use_ghosts_for_dt = db->getBool("use_ghosts_to_compute_dt");
+   } else {
+      if (!is_from_restart) {
+         d_use_ghosts_for_dt =
+            db->getBoolWithDefault("use_ghosts_for_dt",
+               d_use_ghosts_for_dt);
+         TBOX_WARNING(
+            d_object_name << ":  "
+            <<
+            "Key data `use_ghosts_to_compute_dt' not found in input."
+            << "  Using default value "
+            << d_use_ghosts_for_dt << std::endl);
+      }
+   }
+
+   if (db->keyExists("distinguish_mpi_reduction_costs")) {
+      d_distinguish_mpi_reduction_costs =
+         db->getBool("distinguish_mpi_reduction_costs");
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * First, gets the database corresponding to the object_name from the    *
+ * restart file.   If this database exists, this method checks to make   *
+ * sure that the version number of the class matches the version number  *
+ * of the restart file.  If they match, then d_cfl, d_cfl_init,          *
+ * d_lag_dt_computation, and d_use_ghosts_to_compute_dt are read from    *
+ * restart database.                                                    *
+ * Note all restart values can be overriden with values from the input	*
+ * database.								*
+ *                                                                       *
+ *************************************************************************
+ */
+void HyperbolicLevelIntegrator::getFromRestart()
+{
+
+   tbox::Pointer<tbox::Database> root_db =
+      tbox::RestartManager::getManager()->getRootDatabase();
+
+   tbox::Pointer<tbox::Database> db;
+   if (root_db->isDatabase(d_object_name)) {
+      db = root_db->getDatabase(d_object_name);
+   } else {
+      TBOX_ERROR("Restart database corresponding to "
+         << d_object_name << " not found in restart file" << std::endl);
+   }
+
+   int ver = db->getInteger("ALGS_HYPERBOLIC_LEVEL_INTEGRATOR_VERSION");
+   if (ver != ALGS_HYPERBOLIC_LEVEL_INTEGRATOR_VERSION) {
+      TBOX_ERROR(d_object_name << ":  "
+                               << "Restart file version different "
+                               << "than class version." << std::endl);
+   }
+
+   d_cfl = db->getDouble("d_cfl");
+   d_cfl_init = db->getDouble("d_cfl_init");
+   d_lag_dt_computation = db->getBool("d_lag_dt_computation");
+   d_use_ghosts_for_dt = db->getBool("d_use_ghosts_for_dt");
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Utility routines to retrieve variable contexts used by integrator.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::VariableContext>
+HyperbolicLevelIntegrator::getCurrentContext() const
+{
+   return d_current;
+}
+
+tbox::Pointer<hier::VariableContext>
+HyperbolicLevelIntegrator::getNewContext() const
+{
+   return d_new;
+}
+
+tbox::Pointer<hier::VariableContext>
+HyperbolicLevelIntegrator::getOldContext() const
+{
+   return d_old;
+}
+
+tbox::Pointer<hier::VariableContext>
+HyperbolicLevelIntegrator::getScratchContext() const
+{
+   return d_scratch;
+}
+
+tbox::Pointer<hier::VariableContext>
+HyperbolicLevelIntegrator::getPlotContext() const
+{
+   return d_plot_context;
+}
+
+bool
+HyperbolicLevelIntegrator::usingRefinedTimestepping() const
+{
+   return d_use_time_refinement;
+}
+
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void HyperbolicLevelIntegrator::initializeCallback()
+{
+   /*
+    * Timers:  one for each of the communication algorithms ("create"
+    * indicates schedule creation, "comm" indicates communication)
+    */
+   t_advance_bdry_fill_comm = tbox::TimerManager::getManager()->
+      getTimer("algs::HyperbolicLevelIntegrator::advance_bdry_fill_comm");
+   t_error_bdry_fill_create = tbox::TimerManager::getManager()->
+      getTimer("algs::HyperbolicLevelIntegrator::error_bdry_fill_create");
+   t_error_bdry_fill_comm = tbox::TimerManager::getManager()->
+      getTimer("algs::HyperbolicLevelIntegrator::error_bdry_fill_comm");
+   t_barrier_after_error_bdry_fill_comm = tbox::TimerManager::getManager()->
+      getTimer(
+         "algs::HyperbolicLevelIntegrator::barrier_after_error_bdry_fill_comm");
+   t_mpi_reductions = tbox::TimerManager::getManager()->
+      getTimer("algs::HyperbolicLevelIntegrator::mpi_reductions");
+   t_initialize_level_data = tbox::TimerManager::getManager()->
+      getTimer("algs::HyperbolicLevelIntegrator::initializeLevelData()");
+   t_init_level_create_sched = tbox::TimerManager::getManager()->
+      getTimer(
+         "algs::HyperbolicLevelIntegrator::initializeLevelData()_createSched");
+   t_init_level_fill_data = tbox::TimerManager::getManager()->
+      getTimer(
+         "algs::HyperbolicLevelIntegrator::initializeLevelData()_fillData");
+   t_init_level_fill_interior = tbox::TimerManager::getManager()->
+      getTimer(
+         "algs::HyperbolicLevelIntegrator::initializeLevelData()_fill_interior");
+   t_advance_bdry_fill_create = tbox::TimerManager::getManager()->
+      getTimer("algs::HyperbolicLevelIntegrator::advance_bdry_fill_create");
+   t_new_advance_bdry_fill_create = tbox::TimerManager::getManager()->
+      getTimer("algs::HyperbolicLevelIntegrator::new_advance_bdry_fill_create");
+   t_apply_gradient_detector = tbox::TimerManager::getManager()->
+      getTimer("algs::HyperbolicLevelIntegrator::applyGradientDetector()");
+   t_tag_cells = tbox::TimerManager::getManager()->
+      getTimer("algs::HyperbolicLevelIntegrator::tag_cells");
+   t_coarsen_rich_extrap = tbox::TimerManager::getManager()->
+      getTimer("algs::HyperbolicLevelIntegrator::coarsen_rich_extrap");
+   t_get_level_dt = tbox::TimerManager::getManager()->
+      getTimer("algs::HyperbolicLevelIntegrator::getLevelDt()");
+   t_get_level_dt_sync = tbox::TimerManager::getManager()->
+      getTimer("algs::HyperbolicLevelIntegrator::getLevelDt()_sync");
+   t_advance_level = tbox::TimerManager::getManager()->
+      getTimer("algs::HyperbolicLevelIntegrator::advanceLevel()");
+   t_new_advance_bdry_fill_comm = tbox::TimerManager::getManager()->
+      getTimer("algs::HyperbolicLevelIntegrator::new_advance_bdry_fill_comm");
+   t_patch_num_kernel = tbox::TimerManager::getManager()->
+      getTimer("algs::HyperbolicLevelIntegrator::patch_numerical_kernels");
+   t_advance_level_sync = tbox::TimerManager::getManager()->
+      getTimer("algs::HyperbolicLevelIntegrator::advanceLevel()_sync");
+   t_std_level_sync = tbox::TimerManager::getManager()->
+      getTimer(
+         "algs::HyperbolicLevelIntegrator::standardLevelSynchronization()");
+   t_sync_new_levels = tbox::TimerManager::getManager()->
+      getTimer("algs::HyperbolicLevelIntegrator::synchronizeNewLevels()");
+   t_sync_initial_create = tbox::TimerManager::getManager()->
+      getTimer("algs::HyperbolicLevelIntegrator::sync_initial_create");
+   t_sync_initial_comm = tbox::TimerManager::getManager()->
+      getTimer("algs::HyperbolicLevelIntegrator::sync_initial_comm");
+   t_coarsen_fluxsum_create = tbox::TimerManager::getManager()->
+      getTimer("algs::HyperbolicLevelIntegrator::coarsen_fluxsum_create");
+   t_coarsen_fluxsum_comm = tbox::TimerManager::getManager()->
+      getTimer("algs::HyperbolicLevelIntegrator::coarsen_fluxsum_comm");
+   t_coarsen_sync_create = tbox::TimerManager::getManager()->
+      getTimer("algs::HyperbolicLevelIntegrator::coarsen_sync_create");
+   t_coarsen_sync_comm = tbox::TimerManager::getManager()->
+      getTimer("algs::HyperbolicLevelIntegrator::coarsen_sync_comm");
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void HyperbolicLevelIntegrator::finalizeCallback()
+{
+   t_advance_bdry_fill_comm.setNull();
+   t_error_bdry_fill_create.setNull();
+   t_error_bdry_fill_comm.setNull();
+   t_barrier_after_error_bdry_fill_comm.setNull();
+   t_mpi_reductions.setNull();
+   t_initialize_level_data.setNull();
+   t_init_level_create_sched.setNull();
+   t_init_level_fill_data.setNull();
+   t_init_level_fill_interior.setNull();
+   t_advance_bdry_fill_create.setNull();
+   t_new_advance_bdry_fill_create.setNull();
+   t_apply_gradient_detector.setNull();
+   t_tag_cells.setNull();
+   t_coarsen_rich_extrap.setNull();
+   t_get_level_dt.setNull();
+   t_get_level_dt_sync.setNull();
+   t_advance_level.setNull();
+   t_new_advance_bdry_fill_comm.setNull();
+   t_patch_num_kernel.setNull();
+   t_advance_level_sync.setNull();
+   t_std_level_sync.setNull();
+   t_sync_new_levels.setNull();
+   t_sync_initial_create.setNull();
+   t_sync_initial_comm.setNull();
+   t_coarsen_fluxsum_create.setNull();
+   t_coarsen_fluxsum_comm.setNull();
+   t_coarsen_sync_create.setNull();
+   t_coarsen_sync_comm.setNull();
+
+   
+#ifdef HLI_RECORD_STATS
+   /*
+    * Statistics on number of cells and patches generated.
+    */
+   s_boxes_stat.clear();
+   s_cells_stat.clear();
+   s_timestamp_stat.clear();
+#endif
+
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/HyperbolicLevelIntegrator.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/HyperbolicLevelIntegrator.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1107 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Integration routines for single level in AMR hierarchy
+ *                (basic hyperbolic systems) 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_HyperbolicLevelIntegrator
+#define included_algs_HyperbolicLevelIntegrator
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/algs/HyperbolicPatchStrategy.h"
+#include "SAMRAI/algs/HyperbolicPatchStrategy.h"
+#include "SAMRAI/algs/TimeRefinementLevelStrategy.h"
+#include "SAMRAI/hier/ComponentSelector.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/mesh/GriddingAlgorithm.h"
+#include "SAMRAI/mesh/StandardTagAndInitStrategy.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/List.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Serializable.h"
+#include "SAMRAI/xfer/CoarsenAlgorithm.h"
+#include "SAMRAI/xfer/Geometry.h"
+#include "SAMRAI/xfer/RefineAlgorithm.h"
+#include "SAMRAI/xfer/RefineSchedule.h"
+#include "SAMRAI/tbox/Timer.h"
+
+#define HLI_RECORD_STATS
+// #undef DGA_RECORD_STATS
+
+#ifdef HLI_RECORD_STATS
+#include "SAMRAI/tbox/Statistic.h"
+#include "SAMRAI/tbox/Statistician.h"
+#endif
+
+#include <iostream>
+#include <string>
+
+namespace SAMRAI {
+namespace algs {
+
+/**
+ * Class HyperbolicLevelIntegrator provides routines needed to
+ * integrate a system of hyperbolic conservation laws on a structured
+ * AMR patch hierarchy using local time refinement.  The routines include
+ * initializing a level, advance a level, and synchronize levels in a
+ * time-dependent AMR application.  The AMR timestepping algorithm that
+ * cycles through the patch levels and calls these routines is provided by
+ * the TimeRefinementIntegrator class.  Together, that hierarchy
+ * integration class and this single level integration class produce the
+ * common AMR algorithm due to Berger, Colella and Oliger
+ * (see e.g., Berger and Colella, J. Comp. Phys. (82)1:64-84, 1989).
+ * The operations performed on single patches on each level are implemented
+ * in the user-defined, problem-specific class derived from the abstract
+ * base class HyperbolicPatchStrategy.
+ *
+ * It is important to note that the variable contexts used by the concrete
+ * patch strategy subclass must be consistent with those defined in this
+ * class which manages the data for the variables.
+ *
+ * This class is derived from the abstract base class
+ * TimeRefinementLevelStrategy, which defines routines needed by
+ * the time refinement integrator.  There is an argument in the constructor
+ * that determines whether this class will be used by the time
+ * refinement integrator for refined timestepping or synchronized
+ * timestepping.  The routines overloaded in
+ * TimeRefinementLevelStrategy are: initializeLevelIntegrator(),
+ * getLevelDt(), getMaxFinerLevelDt(), advanceLevel(),
+ * standardLevelSynchronization(), synchronizeNewLevels(),
+ * resetTimeDependentData(), and resetDataToPreadvanceState().
+ * This class is also derived from mesh::StandardTagAndInitStrategy,
+ * which defines routines needed by the gridding algorithm classes.  The
+ * routines overloaded in mesh::StandardTagAndInitStrategy are:
+ * initializeLevelData(), resetHierarchyConfiguration(),
+ * applyGradientDetector(), applyRichardsonExtrapolation(), and
+ * coarsenDataForRichardsonExtrapolation().
+ *
+ * An object of this class requires numerous parameters to be read from
+ * input.  Also, data must be written to and read from files for restart.
+ * The input and restart data are summarized as follows.
+ *
+ * Required input keys and data types: NONE
+ *
+ * Optional input keys, data types, and defaults:
+ *
+ *
+ *
+ *
+ *    - \b    cfl
+ *       double value for the CFL factor used for timestep selection
+ *       (dt used = CFL * max dt).  If no input value is given, a default
+ *       value of 0.9 is used.
+ *
+ *    - \b    cfl_init
+ *       double value for CFL factor used for initial timestep.
+ *       If no input value is given, a default value of 0.9 is used.
+ *
+ *    - \b    lag_dt_computation
+ *       boolean value indicating whether dt is based on current
+ *       solution or solution from previous step (possible optimization
+ *       in communication for characteristic analysis).  If no input
+ *       value is given, a default value of TRUE is used.
+ *
+ *
+ *    - \b    use_ghosts_to_compute_dt
+ *       boolean value indicating whether ghost data must be filled before
+ *       timestep is computed on each patch (possible communication
+ *       optimization).  if no input value is given, a default value
+ *       of TRUE is used.
+ *
+ *    - \b    distinguish_mpi_reduction_costs
+ *       boolean specifying whether to separate reduction costs in tbox::MPI
+ *       from costs of load imbalances.  By specifying it true, a
+ *       barrier is put in place before the reduction call, so an extra
+ *       operation is incurred.  For this reason, it is defaulted FALSE.
+ *
+ *
+ *
+ *
+ *
+ * Note that when continuing from restart, the input values in the
+ * input file override all values read in from the restart database.
+ *
+ * A sample input file entry might look like:
+ *
+ * \verbatim
+ *
+ *    cfl = 0.9
+ *    cfl_init = 0.9
+ *    lag_dt_computation = FALSE
+ *    use_ghosts_to_compute_dt = TRUE
+ *    distinguish_mpi_reduction_costs = TRUE
+ *
+ * \endverbatim
+ *
+ * @see algs::TimeRefinementIntegrator
+ * @see mesh::StandardTagAndInitStrategy
+ * @see algs::HyperbolicPatchStrategy
+ */
+
+class HyperbolicLevelIntegrator:
+   public TimeRefinementLevelStrategy,
+   public mesh::StandardTagAndInitStrategy,
+   public tbox::Serializable
+{
+public:
+   /**
+    * Enumerated type for the different ways in which variable storage
+    * can be manipulated by the level integration algorithm.
+    * See registerVariable(...) function for more details.
+    *
+    *
+    *
+    * - \b TIME_DEP      {Data that changes in time and needs more than one
+    *                      time level to be stored.}
+    * - \b INPUT          {Data that is set once and do not change during
+    *                      the ghosts are never re-filled outside of
+    *                      user-defined routines.}
+    * - \b FLUX           {Face-centered double values used in conservative
+    *                      difference and synchronization (i.e., refluxing)
+    *                      process.  A corresponding variable to store flux
+    *                      integral information is created for each FLUX
+    *                      variable.}
+    * - \b TEMPORARY      {Accessory values intended to live only for
+    *                      computation on a single patch (i.e., they cannot
+    *                      be assumed to exist between patch routine function
+    *                      calls.)}
+    *
+    *
+    *
+    */
+   enum HYP_VAR_TYPE { TIME_DEP = 0,
+                       INPUT = 1,
+                       NO_FILL = 2,
+                       FLUX = 3,
+                       TEMPORARY = 4 };
+
+   /**
+    * Constructor for HyperbolicLevelIntegrator initializes
+    * integration parameters to default values and constructs standard
+    * communication algorithms.  Other data members are read in from
+    * the specified input database or the restart database corresponding
+    * to the specified object_name.  The constructor also registers
+    * this object for restart using the specified object name when
+    * the boolean argument is true.  Whether object will write its state to
+    * restart files during program execution is determined by this argument.
+    * Note that it has a default state of true.  This class is used by
+    * the time refinement integrator for refined timestepping when the
+    * use_time_refinement argument is true, and for synchronized
+    * timestepping when the boolean is false.
+    *
+    * When assertion checking is active, passing in any null pointer
+    * or an empty string will result in an unrecoverable assertion.
+    */
+   HyperbolicLevelIntegrator(
+      const std::string& object_name,
+      tbox::Pointer<tbox::Database> input_db,
+      HyperbolicPatchStrategy* patch_strategy,
+      bool register_for_restart = true,
+      bool use_time_refinement = true);
+
+   /**
+    * The destructor for HyperbolicLevelIntegrator unregisters
+    * the integrator object with the restart manager when so registered.
+    */
+   virtual ~HyperbolicLevelIntegrator();
+
+   /**
+    * Initialize level integrator by by setting the number of time levels
+    * of data needed based on specifications of the gridding algorithm.
+    *
+    * This routine also invokes variable registration in the patch strategy.
+    *
+    * Assertion checking will throw unrecoverable assertions if either
+    * pointer is null.
+    */
+   virtual void
+   initializeLevelIntegrator(
+      tbox::Pointer<mesh::BaseGriddingAlgorithm> base_gridding_alg);
+
+   /**
+    * Determine time increment to advance data on level and return that
+    * value.  The double dt_time argument is the simulation time when
+    * the routine is called.  The initial_time boolean is true if this
+    * routine is called during hierarchy initialization (i.e., at the
+    * initial simulation time).  Otherwise, it is false.  The
+    * recompute_dt option specifies whether to compute the timestep using
+    * the current level data or to return the value stored by the time
+    * integrator. The default true setting means the timestep will be
+    * computed if no value is supplied.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the level pointer is null.
+    */
+   virtual double
+   getLevelDt(
+      const tbox::Pointer<hier::BasePatchLevel> level,
+      const double dt_time,
+      const bool initial_time);
+
+   /**
+    * Return the maximum allowable time increment for the level with
+    * the specified level number based on the time increment for the
+    * next coarser level and the mesh refinement ratio between the two
+    * levels.  For the common explicit integration methods for hyperbolic
+    * conservation laws (constrained by a CFL limit), the fine time increment
+    * is typically the coarse increment divided by the refinement ratio.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the ratio vector is not acceptable (i.e., all values > 0).
+    */
+   virtual double
+   getMaxFinerLevelDt(
+      const int finer_level_number,
+      const double coarse_dt,
+      const hier::IntVector& ratio_to_coarser);
+
+   /**
+    * Integrate data on all patches on the given patch level from current
+    * time (current_time) to new time (new_time).  This routine is used
+    * to advance the solution on each level in the hierarchy and during
+    * time-dependent regridding procedures, such as Richardson extrapolation.
+    * The boolean arguments are used to determine the state of the algorithm
+    * and the data when the advance routine is called.   The first_step
+    * and last_step indicate whether the step is the first or last in the
+    * current timestep sequence on the level.  Typically, the current timestep
+    * sequence means each step on the level between advance steps on a
+    * coarser level in the hierarchy, if one exists.  The regrid_advance
+    * value is true when the advance is called as part of a time-dependent
+    * regridding procedure.  Usually when this happens, the results of the
+    * colution advance will be discarded.  So, for example, when this is true
+    * flux information is not maintained and flux integrals are not updated.
+    * The final boolean argument indicates whether or not the level resides
+    * in the hierarchy.  For example, during time-dependent regridding, such
+    * as Richardson extrapolation, a temporary level that is not in the
+    * hierarchy is created and advanced.  Then, a communication schedule
+    * must be generated for the level before the advance begins.
+    *
+    * This routine is called at two different points during time integration:
+    * during the regular time advance sequence, and possibly at the initial
+    * simulation time.  The second call advances the solution on a coarser
+    * level ahead in time to provide time-dependent boundary values for some
+    * finer level when time-dependent regridding is used.  In the first case,
+    * the values of the boolean flags are:
+    *
+    *
+    *
+    *    - \b  first_step
+    *        = true for first step in level time step sequence; else, false.
+    *    - \b  last_step
+    *        = true for last step in level time step sequence; else, false.
+    *    - \b  regrid_advance
+    *        = false.
+    *
+    *
+    *
+    * In the second case, the values of the boolean flags are:
+    *
+    *
+    *
+    *    - \b  first_step
+    *        = true.
+    *    - \b  last_step
+    *        = false.
+    *    - \b  regrid_advance
+    *        = true.
+    *
+    *
+    *
+    *
+    * When time-dependent regridding (i.e., Richardson extrapolation) is
+    * used, the routine is called from two different points in addition to
+    * those described above: to advance a temporary level that is coarser
+    * than the hierarchy level on which error estimation is performed, and
+    * to advance the hierarchy level itself.  In the first case, the values of
+    * the boolean flags are:
+    *
+    *
+    *
+    *    - \b  first_step
+    *        = true.
+    *    - \b  last_step
+    *        = true.
+    *    - \b  regrid_advance
+    *        = true.
+    *
+    *
+    *
+    * In the second case, the values of the boolean flags are:
+    *
+    *
+    *
+    *    - \b  first_step
+    *      (when regridding during time integration sequence)
+    *        = true when the level is not coarsest level to synchronize
+    *          immediately before the regridding process; else, false.
+    *      (when generating initial hierarchy construction)
+    *        = true, even though there may be multiple advance steps.
+    *    - \b  last_step
+    *        = true when the advance is the last in the Richardson
+    *          extrapolation step sequence; else false.
+    *    - \b  regrid_advance
+    *        = true.
+    *
+    *
+    *
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if either the level or hierarchy pointer is null, or the
+    * new time is not greater than the given time.
+    */
+
+   virtual double
+   advanceLevel(
+      const tbox::Pointer<hier::BasePatchLevel> level,
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const double current_time,
+      const double new_time,
+      const bool first_step,
+      const bool last_step,
+      const bool regrid_advance = false);
+
+   /**
+    * Synchronize data between given patch levels in patch hierarchy
+    * according to the standard hyperbolic AMR flux correction algorithm.
+    * This routine synchronizes data between two levels at a time from
+    * the level with index finest_level down to the level with index
+    * coarsest_level.  The array of old time values are used in the
+    * re-integration of the time-dependent data.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the hierarchy pointer is null, the level numbers do
+    * not properly match existing levels in the hierarchy (either
+    * coarsest_level > finest_level or some level is null), or
+    * all of the old time values are less than the value of sync_time.
+    */
+   virtual void
+   standardLevelSynchronization(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level,
+      const double sync_time,
+      const tbox::Array<double>& old_times);
+
+   /**
+    * This overloaded version of standardLevelSynchronization implements
+    * a routine used for synchronized timestepping.  Only a single
+    * value for the old time is needed, since all levels would have the
+    * same old time.
+    */
+   virtual void
+   standardLevelSynchronization(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level,
+      const double sync_time,
+      const double old_time);
+
+   /**
+    * Coarsen current solution data from finest hierarchy level specified
+    * down through the coarsest hierarchy level specified, if initial_time
+    * is true.  In this case, the hierarchy is being constructed at the
+    * initial simulation time,  After data is coarsened, the application-
+    * specific initialization routine is called to set data before that
+    * solution is further coarsened to the next coarser level in the
+    * hierarchy.  This operation makes the solution consistent between
+    * coarser levels and finer levels that did not exist when the coarse
+    * levels where created and initialized originally.
+    *
+    * When initial_time is false, this routine does nothing since the
+    * standard hyperbolic AMR algorithm for conservation laws requires
+    * no data synchronization after regridding beyond interpolation of
+    * data from coarser levels in the hierarchy in some conservative fashion.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the hierarchy pointer is null, the level numbers do
+    * not properly match existing levels in the hierarchy (either
+    * coarsest_level > finest_level or some level is null).
+    */
+   virtual void
+   synchronizeNewLevels(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level,
+      const double sync_time,
+      const bool initial_time);
+
+   /**
+    * Resets time-dependent data storage and update time for patch level.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the level pointer is null.
+    */
+   virtual void
+   resetTimeDependentData(
+      const tbox::Pointer<hier::BasePatchLevel> level,
+      const double new_time,
+      const bool can_be_refined);
+
+   /**
+    * Deallocate all new simulation data on the given level.  This may
+    * be necessary during regridding, or setting up levels initially.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the level pointer is null.
+    */
+   virtual void
+   resetDataToPreadvanceState(
+      const tbox::Pointer<hier::BasePatchLevel> level);
+
+   /**
+    * Initialize data on a new level after it is inserted into an AMR patch
+    * hierarchy by the gridding algorithm.  The level number indicates
+    * that of the new level.  The old_level pointer corresponds to
+    * the level that resided in the hierarchy before the level with the
+    * specified number was introduced.  If the pointer is null, there was
+    * no level in the hierarchy prior to the call and the level data is set
+    * based on the user routines and the simulation time.  Otherwise, the
+    * specified level replaces the old level and the new level receives data
+    * from the old level appropriately before it is destroyed.
+    *
+    * Typically, when data is set, it is interpolated from coarser levels
+    * in the hierarchy.  If the data is to be set, the level number must
+    * match that of the old level, if non-null.  If the old level is
+    * non-null, then data is copied from the old level to the new level
+    * on regions of intersection between those levels before interpolation
+    * occurs.  Then, user-supplied patch routines are called to further
+    * initialize the data if needed.  The boolean argument initial_time
+    * is passed into the user's routines.
+    *
+    * The boolean argument initial_time indicates whether the level is
+    * being introduced for the first time (i.e., at initialization time),
+    * or after some regrid process during the calculation beyond the initial
+    * hierarchy construction.  This information is provided since the
+    * initialization of the data on a patch may be different in each of those
+    * circumstances.  The can_be_refined boolean argument indicates whether
+    * the level is the finest level allowed in the hierarchy.  This may or
+    * may not affect the data initialization process depending on the problem.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the hierarchy pointer is null, the level number does
+    * not match any level in the hierarchy, or the old level number
+    * does not match the level number (if the old level pointer is non-null).
+    */
+   virtual void
+   initializeLevelData(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double init_data_time,
+      const bool can_be_refined,
+      const bool initial_time,
+      const tbox::Pointer<hier::BasePatchLevel> old_level =
+         tbox::Pointer<hier::BasePatchLevel>(NULL),
+      const bool allocate_data = true);
+
+#if !defined(__xlC__)
+   using mesh::StandardTagAndInitStrategy::initializeLevelData;
+#endif
+
+   /**
+    * Reset cached communication schedules after the hierarchy has changed
+    * (due to regidding, for example) and the data has been initialized on
+    * the new levels.  The intent is that the cost of data movement on the
+    * hierarchy will be amortized across multiple communication cycles,
+    * if possible.  The level numbers indicate the range of levels in the
+    * hierarchy that have changed.  However, this routine updates
+    * communication schedules every level finer than and including that
+    * indexed by the coarsest level number given.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the hierarchy pointer is null, any pointer to a level
+    * in the hierarchy that is coarser than the finest level is null,
+    * or the given level numbers not specified properly; e.g.,
+    * coarsest_level > finest_level.
+    */
+   virtual void
+   resetHierarchyConfiguration(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level);
+
+   /**
+    * Set integer tags to "one" in cells where refinement of the given
+    * level should occur according to some user-supplied gradient criteria.
+    * The double time argument is the regrid time.  The integer "tag_index"
+    * argument is the patch descriptor index of the cell-centered integer tag
+    * array on each patch in the hierarchy.  The boolean argument
+    * initial_time indicates whether the level is being subject to refinement
+    * at the initial simulation time.  If it is false, then the error
+    * estimation process is being invoked at some later time after the AMR
+    * hierarchy was initially constructed.  The boolean argument
+    * uses_richardson_extrapolation_too is true when Richardson
+    * extrapolation error estimation is used in addition to the gradient
+    * detector, and false otherwise.  This argument helps the user to
+    * manage multiple regridding criteria.   This information is passed along
+    * to the user's patch tagging routines since the application of the
+    * gradient detector may be different in each case.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the hierarchy pointer is null or the level number does
+    * not match any existing level in the hierarchy.
+    */
+   virtual void
+   applyGradientDetector(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double error_data_time,
+      const int tag_index,
+      const bool initial_time,
+      const bool uses_richardson_extrapolation_too);
+
+   /**
+    * Set integer tags to "one" where refinement onf the given
+    * level should occur according to some user-supplied Richardson
+    * extrapolation criteria.  The "error_data_time" argument is the
+    * regrid time.  The "deltat" argument is the time increment to advance
+    * the solution on the level to be refined.  Note that that level is
+    * finer than the level in the argument list, in general.  The
+    * ratio between the argument level and the actual hierarchy level
+    * is given by the integer "coarsen ratio".
+    *
+    * The integer "tag_index" argument is the patch descriptor index of
+    * the cell-centered integer tag array on each patch in the hierarchy.
+    *
+    * The boolean argument initial_time indicates whether the level is being
+    * subject to refinement at the initial simulation time.  If it is false,
+    * then the error estimation process is being invoked at some later time
+    * after the AMR hierarchy was initially constructed.  Typically, this
+    * information is passed to the user's patch tagging routines since the
+    * application of the Richardson extrapolation process may be different
+    * in each case.
+    *
+    * The boolean uses_gradient_detector_too is true when a gradient
+    * detector procedure is used in addition to Richardson extrapolation,
+    * and false otherwise.  This argument helps the user to manage multiple
+    * regridding criteria.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the level pointer is null.
+    */
+   virtual void
+   applyRichardsonExtrapolation(
+      const tbox::Pointer<hier::PatchLevel> level,
+      const double error_data_time,
+      const int tag_index,
+      const double deltat,
+      const int error_coarsen_ratio,
+      const bool initial_time,
+      const bool uses_gradient_detector_too);
+
+   /**
+    * Coarsen solution data from level to coarse_level for Richardson
+    * extrapolation.  Note that this routine will be called twice during
+    * the Richardson extrapolation error estimation process.  The
+    * before_advance boolean argument indicates whether data is
+    * set on the coarse level by coarsening the "old" time level solution
+    * (i.e., before it has been advanced) or by coarsening the "new"
+    * solution on the fine level (i.e., after it has been advanced).
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if either level pointer is null.
+    */
+   virtual void
+   coarsenDataForRichardsonExtrapolation(
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int level_number,
+      const tbox::Pointer<hier::PatchLevel> coarse_level,
+      const double coarsen_data_time,
+      const bool before_advance);
+
+   /**
+    * Register a variable with the hyperbolic integration algorithm.  The
+    * variable type must be one of the options defined by the enumerated
+    * type defined above.  Typically, this routine is called from the
+    * hyperbolic patch model when the variable registration process is
+    * invoked by calling the function initializeLevelIntegrator() above.
+    * In fact, that function should be called before this routine is called.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the variable pointer or geometry pointer is null.
+    */
+   virtual void
+   registerVariable(
+      const tbox::Pointer<hier::Variable> var,
+      const hier::IntVector ghosts,
+      const HYP_VAR_TYPE h_v_type,
+      const tbox::Pointer<xfer::Geometry> transfer_geom,
+      const std::string& coarsen_name = std::string(),
+      const std::string& refine_name = std::string());
+
+   /**
+    * Print class data representation for hyperbolic level integrator object.
+    * This is done automatically, when an unrecoverable run-time assertion
+    * is thrown within some member function of this class.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os) const;
+
+   /**
+    * Write out object state to the given database.
+    *
+    * When assertion checking is active, database point must be non-null.
+    */
+   virtual void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> db);
+
+   /**
+    * Return pointer to "current" variable context used by integrator.
+    * Current data corresponds to state data at the beginning of a
+    * timestep, or when a new level is initialized.
+    */
+   tbox::Pointer<hier::VariableContext>
+   getCurrentContext() const;
+
+   /**
+    * Return pointer to "new" variable context used by integrator.
+    * New data corresponds to advanced state data at the end of a timestep.
+    * The data is one timestep later than the "current" data.
+    */
+   tbox::Pointer<hier::VariableContext>
+   getNewContext() const;
+
+   /**
+    * Return pointer to "old" variable context used by integrator.
+    * Old data corresponds to an extra time level of state data used
+    * for Richardson extrapolation error estimation.  The data is
+    * one timestep earlier than the "current" data.
+    *
+    * Note that only in certain cases when using time-dependent error
+    * estimation, such as Richardson extrapolation, is the returned
+    * pointer will non-null.  See contructor for more information.
+    */
+   tbox::Pointer<hier::VariableContext>
+   getOldContext() const;
+
+   /**
+    * Return pointer to "scratch" variable context used by integrator.
+    * Scratch data typically corresponds to storage that user-routines
+    * in the concrete HyperbolicPatchStrategy object manipulate;
+    * in particular, scratch data contains ghost cells.
+    */
+   tbox::Pointer<hier::VariableContext>
+   getScratchContext() const;
+
+   /**
+    * Return pointer to variable context used for plotting.  This
+    * context corresponds to the data storage that should be written
+    * to plot files.  Typically, this is the same as the "current" context.
+    */
+   tbox::Pointer<hier::VariableContext>
+   getPlotContext() const;
+
+   /**
+    * Return true if this class has been constructed to use refined
+    * timestepping and false if it has been constructed to use
+    * synchronized timestepping.
+    */
+   bool
+   usingRefinedTimestepping() const;
+
+   /*
+    * Write out statistics recorded on numbers of cells and patches generated.
+    */
+   void
+   printStatistics(
+      std::ostream& s = tbox::plog) const;
+
+protected:
+   /**
+    * Read input values, indicated above, from given database.  The boolean
+    * argument is_from_restart should be set to true if the simulation
+    * is beginning from restart.  Otherwise it should be set to false.
+    *
+    * When assertion checking is active, the database pointer must be non-null.
+    */
+   virtual void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db,
+      bool is_from_restart);
+
+   /**
+    * Read object state from the restart file and initialize class
+    * data members.  The database from which the restart data is read is
+    * determined by the object_name specified in the constructor.
+    *
+    * Unrecoverable Errors:
+    *
+    *
+    *
+    *
+    *    -
+    *        The database corresponding to object_name is not found
+    *        in the restart file.
+    *
+    *    -
+    *        The class version number and restart version number do not
+    *        match.
+    *
+    *
+    *
+    *
+    *
+    */
+   virtual void
+   getFromRestart();
+
+   /*
+    * Pre-process flux storage before advancing solution on level from
+    * cur_time to new_time.  The boolean flags are used to determine
+    * how flux and flux integral storage is allocated and initialized.
+    * These are needed since the advanceLevel() routine is used for
+    * both level integration and time-dependent error estimation.
+    *
+    * When assertion checking is active, the level and schedule pointers
+    * must be non-null and the current time must be less than the new time.
+    */
+   virtual void
+   preprocessFluxData(
+      const tbox::Pointer<hier::PatchLevel> level,
+      const double cur_time,
+      const double new_time,
+      const bool regrid_advance,
+      const bool first_step,
+      const bool last_step);
+
+   /*
+    * Post-process flux storage after advancing solution on level.
+    * The boolean flag is used to determine how flux and flux integral
+    * storage is copied and de-allocated. This is needed since the
+    * advanceLevel() routine is used for both level integration and
+    * time-dependent error estimation.
+    *
+    * When assertion checking is active, the level pointer must be non-null.
+    */
+   virtual void
+   postprocessFluxData(
+      const tbox::Pointer<hier::PatchLevel> level,
+      const bool regrid_advance,
+      const bool first_step,
+      const bool last_step);
+
+   /*
+    * Copy time-dependent data from source space to destination space.
+    *
+    * When assertion checking is active, the level and context pointers
+    * must be non-null.
+    */
+   virtual void
+   copyTimeDependentData(
+      const tbox::Pointer<hier::PatchLevel> level,
+      const tbox::Pointer<hier::VariableContext> src_context,
+      const tbox::Pointer<hier::VariableContext> dst_context);
+
+   /**
+    * Apply the standard AMR hyperbolic flux synchronization process preserve
+    * conservation properties in the solution between the fine level and the
+    * coarse level.  The sync_time argument indicates the time at which
+    * the solution on the two levels is being synchronized.  The variable
+    * coarse_sim_time indicates the previous simulation time on the
+    * coarse level (recall the conservative difference will be repeated on the
+    * coarse level during the synchronization process).  After the
+    * synchronization, the flux and flux integral data storage is reset on
+    * the levels.
+    *
+    * When assertion checking is turned on, an unrecoverable assertion
+    * will result if either level pointer is null, the levels are not
+    * consecutive in the AMR hierarchy, or the coarse sim time is not
+    * less than the sync time.
+    */
+   virtual void
+   synchronizeLevelWithCoarser(
+      const tbox::Pointer<hier::PatchLevel> fine,
+      const tbox::Pointer<hier::PatchLevel> coarse,
+      const double sync_time,
+      const double coarse_sim_time);
+
+private:
+   /*
+    * Record statistics on how many patches and cells were generated.
+    */
+   void
+   recordStatistics(
+      const hier::PatchLevel& patch_level,
+      double current_time);
+
+   /*
+    * Dimension of the problem.
+    */
+   const tbox::Dimension d_dim;
+
+   /*
+    * The patch strategy supplies the application-specific operations
+    * needed to treat data on patches in the AMR hierarchy.
+    */
+   HyperbolicPatchStrategy* d_patch_strategy;
+
+   /*
+    * The gridding algorithm is used to generate some DLBG data for
+    * levels not on a hiearchy.
+    */
+   tbox::Pointer<mesh::GriddingAlgorithm> d_gridding_alg;
+
+   /*
+    * The object name is used as a handle to databases stored in
+    * restart files and for error reporting purposes.  The boolean
+    * is used to control restart file writing operations.
+    */
+   std::string d_object_name;
+   bool d_use_time_refinement;
+   bool d_registered_for_restart;
+
+   /*
+    * Courant-Friedrichs-Levy parameters for time increment selection.
+    */
+   double d_cfl;
+   double d_cfl_init;
+
+   /*
+    * Boolean flags for algorithm variations during time integration.
+    *
+    * d_lag_dt_computation indicates when time increment is computed for
+    *                      next step on a level.  A value of true means
+    *                      that the current solution values will be used to
+    *                      compute dt.  A value of false means that dt will
+    *                      be computed after the current solution is advanced
+    *                      and the new solution is used to compute dt. The
+    *                      default value is true.
+    *
+    * d_use_ghosts_for_dt  indicates whether the time increment computation
+    *                      on a patch requires ghost cell data (e.g., if
+    *                      boundary conditions are needed).  This value must
+    *                      be consistent with the numerical routines used
+    *                      in the hyperbolic patch strategy object to
+    *                      calculate the time step size.  The default is true.
+    */
+   bool d_lag_dt_computation;
+   bool d_use_ghosts_for_dt;
+
+   /*
+    * Boolean flags for indicated whether face or side data types are
+    * used for fluxes (choice is determined by numerical routines in
+    * hyperbolic patch model).
+    */
+   bool d_flux_is_face;
+   bool d_flux_face_registered;
+   bool d_flux_side_registered;
+
+/*
+ * The following communication algorithms and schedules are created and
+ * maintained to manage inter-patch communication during AMR integration.
+ * The algorithms are created in the class constructor.  They are initialized
+ * when variables are "registered" are registered with the integrator.
+ */
+
+   /*
+    * The "advance" schedule is used prior to advancing a level and
+    * prior to computing dt at initialization. It must be reset each
+    * time a level is regridded. All ghosts are filled with TIME_DEP
+    * and INPUT data at specified time. TIME_DEP data in patch interiors
+    * will be filled with CURRENT_VAR values.
+    */
+   tbox::Pointer<xfer::RefineAlgorithm> d_bdry_fill_advance;
+   tbox::Array<tbox::Pointer<xfer::RefineSchedule> > d_bdry_sched_advance;
+
+   /*
+    * The "advance new" schedule can be used twice during a time integration
+    * cycle. The first is when ghost cell data is required during the
+    * conservative difference process (i.e., d_use_ghosts_for_cons_diff
+    * is true).  If this is the case, ghosts must be refilled before the
+    * conservative difference on a coarser level during the refluxing
+    * process can take place.  See synchronizeLevelWithCoarser in class
+    * HyperbolicLevelIntegrator second occurs when the dt calculation is
+    * not lagged and the physical boundary conditions are needed to compute dt
+    * (i.e., (!d_lag_dt_computation && d_use_ghosts_for_dt_computation)
+    * is true).  In either case, all ghosts are filled with TIME_DEP and INPUT
+    * data at specified time.  TIME_DEP data in patch interiors will be filled
+    * with values corresponding to NEW descriptor indices.  See notes
+    * accompanying HyperbolicLevelIntegrator::advanceLevel.
+    */
+   tbox::Pointer<xfer::RefineAlgorithm> d_bdry_fill_advance_new;
+   tbox::Array<tbox::Pointer<xfer::RefineSchedule> >
+   d_bdry_sched_advance_new;
+
+   /*
+    * The "advance old" algorithm is used to fill ghosts using time
+    * interpolated data from OLD_VAR and NEW_VAR on the coarser hierarchy
+    * level.  It is currently only used for advancing data on a temporary
+    * level during the Richardson extrapolation algorithm. Use of OLD_VAR
+    * data is required only when three time levels are used
+    * (i.e. d_number_time_data_levels=3).
+    */
+   tbox::Pointer<xfer::RefineAlgorithm> d_bdry_fill_advance_old;
+
+   /*
+    * Coarsen algorithms for conservative data synchronization
+    * (e.g., flux correction or refluxing).
+    */
+   tbox::Pointer<xfer::CoarsenAlgorithm> d_coarsen_fluxsum;
+   tbox::Pointer<xfer::CoarsenAlgorithm> d_coarsen_sync_data;
+   tbox::Pointer<xfer::CoarsenAlgorithm> d_sync_initial_data;
+
+   /*
+    * Coarsen algorithms for Richardson extrapolation.
+    */
+   tbox::Pointer<xfer::CoarsenAlgorithm> d_coarsen_rich_extrap_init;
+   tbox::Pointer<xfer::CoarsenAlgorithm> d_coarsen_rich_extrap_final;
+
+   /*
+    * Algorithm for filling a new patch level in the hierarchy.
+    */
+   tbox::Pointer<xfer::RefineAlgorithm> d_fill_new_level;
+
+   /*
+    * Number of levels of time-dependent data that must be maintained
+    * on each patch level.  This value is used to coordinate the needs
+    * of the time integration and the regridding process with the
+    * patch data types and descriptor indices.
+    */
+   int d_number_time_data_levels;
+
+   /*
+    * hier::Variable contexts and lists of variables used for data management.
+    * The contexts are set in the constructor.   Note that they must
+    * be consistent with those defined by the concrete subclass of
+    * the HyperbolicPatchStrategy object.  The variable lists
+    * and component selectors are set in the registerVariable() function.
+    */
+
+   tbox::Pointer<hier::VariableContext> d_scratch;
+   tbox::Pointer<hier::VariableContext> d_current;
+   tbox::Pointer<hier::VariableContext> d_new;
+   tbox::Pointer<hier::VariableContext> d_old;
+   tbox::Pointer<hier::VariableContext> d_plot_context;
+
+   tbox::List<tbox::Pointer<hier::Variable> > d_all_variables;
+   tbox::List<tbox::Pointer<hier::Variable> > d_time_dep_variables;
+   tbox::List<tbox::Pointer<hier::Variable> > d_flux_variables;
+   tbox::List<tbox::Pointer<hier::Variable> > d_fluxsum_variables;
+
+   /*
+    * SCRATCH descriptor indices for (non-TEMPORARY) variables
+    * (i.e., TIME_DEP, INPUT, FLUX). Note that these are used
+    * to create scratch space before ghost cells are filled
+    * on level prior to advancing the data.
+    */
+   hier::ComponentSelector d_saved_var_scratch_data;
+
+   /*
+    * SCRATCH descriptor indices for TEMPORARY variables.  Note that
+    * these are used to create scratch space on a patch-by-patch basis.
+    */
+   hier::ComponentSelector d_temp_var_scratch_data;
+
+   /*
+    * CURRENT descriptor indices for TIME_DEP, INPUT, NO_FILL
+    * variables.  Note that these are used to create storage for quantities
+    * when new patches are made (e.g., during hierachy initialization,
+    * before error estimation during regridding, after regridding new
+    * patch levels, etc.).
+    */
+   hier::ComponentSelector d_new_patch_init_data;
+
+   /*
+    * NEW descriptor indices for TIME_DEP variables.  Note that these
+    * are used to create space for new data before patch level is advanced.
+    */
+   hier::ComponentSelector d_new_time_dep_data;
+
+   /*
+    * Descriptor indices for FLUX quantities and integrals of fluxes
+    * (used to accumulate flux information around fine patch boundaries).
+    * Also, a boolean flag to track flux storage on level 0.
+    */
+   hier::ComponentSelector d_flux_var_data;
+   hier::ComponentSelector d_fluxsum_data;
+   bool d_have_flux_on_level_zero;
+
+   /*
+    * OLD descriptor indices for TIME_DEP variables.  Note that
+    * these are used only when three time levels of data are used.
+    */
+   hier::ComponentSelector d_old_time_dep_data;
+
+   /*
+    * Option to distinguish tbox::MPI reduction costs from load imbalances
+    * when doing performance timings.
+    */
+   bool d_distinguish_mpi_reduction_costs;
+
+   static bool s_barrier_after_error_bdry_fill_comm;
+
+   /*
+    * Timers interspersed throughout the class.
+    */
+   static tbox::Pointer<tbox::Timer> t_advance_bdry_fill_comm;
+   static tbox::Pointer<tbox::Timer> t_error_bdry_fill_create;
+   static tbox::Pointer<tbox::Timer> t_error_bdry_fill_comm;
+   static tbox::Pointer<tbox::Timer> t_mpi_reductions;
+   static tbox::Pointer<tbox::Timer> t_initialize_level_data;
+   static tbox::Pointer<tbox::Timer> t_init_level_create_sched;
+   static tbox::Pointer<tbox::Timer> t_init_level_fill_data;
+   static tbox::Pointer<tbox::Timer> t_init_level_fill_interior;
+   static tbox::Pointer<tbox::Timer> t_advance_bdry_fill_create;
+   static tbox::Pointer<tbox::Timer> t_new_advance_bdry_fill_create;
+   static tbox::Pointer<tbox::Timer> t_apply_gradient_detector;
+   static tbox::Pointer<tbox::Timer> t_tag_cells;
+   static tbox::Pointer<tbox::Timer> t_coarsen_rich_extrap;
+   static tbox::Pointer<tbox::Timer> t_get_level_dt;
+   static tbox::Pointer<tbox::Timer> t_get_level_dt_sync;
+   static tbox::Pointer<tbox::Timer> t_advance_level;
+   static tbox::Pointer<tbox::Timer> t_new_advance_bdry_fill_comm;
+   static tbox::Pointer<tbox::Timer> t_patch_num_kernel;
+   static tbox::Pointer<tbox::Timer> t_advance_level_sync;
+   static tbox::Pointer<tbox::Timer> t_std_level_sync;
+   static tbox::Pointer<tbox::Timer> t_sync_new_levels;
+   static tbox::Pointer<tbox::Timer> t_barrier_after_error_bdry_fill_comm;
+   static tbox::Pointer<tbox::Timer> t_sync_initial_comm;
+   static tbox::Pointer<tbox::Timer> t_sync_initial_create;
+   static tbox::Pointer<tbox::Timer> t_coarsen_fluxsum_create;
+   static tbox::Pointer<tbox::Timer> t_coarsen_fluxsum_comm;
+   static tbox::Pointer<tbox::Timer> t_coarsen_sync_create;
+   static tbox::Pointer<tbox::Timer> t_coarsen_sync_comm;
+
+#ifdef HLI_RECORD_STATS
+   /*
+    * Statistics on number of cells and patches generated.
+    */
+   static tbox::Array<tbox::Pointer<tbox::Statistic> > s_boxes_stat;
+   static tbox::Array<tbox::Pointer<tbox::Statistic> > s_cells_stat;
+   static tbox::Array<tbox::Pointer<tbox::Statistic> > s_timestamp_stat;
+#endif
+
+   /*!
+    * @brief Initialize static objects and register shutdown routine.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   initializeCallback();
+
+   /*!
+    * @brief Method registered with ShutdownRegister to cleanup statics.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   finalizeCallback();
+
+   /* 
+    * Static initialization and cleanup handler.
+    */
+   static tbox::StartupShutdownManager::Handler
+   s_initialize_handler;
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/HyperbolicPatchStrategy.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/HyperbolicPatchStrategy.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,209 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to patch routines for hyperbolic integration scheme. 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_HyperbolicPatchStrategy_C
+#define included_algs_HyperbolicPatchStrategy_C
+
+#include "SAMRAI/algs/HyperbolicPatchStrategy.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace algs {
+
+HyperbolicPatchStrategy::HyperbolicPatchStrategy(
+   const tbox::Dimension& dim):
+   xfer::RefinePatchStrategy(dim),
+   xfer::CoarsenPatchStrategy(dim),
+   d_dim(dim),
+   d_data_context(0)
+{
+}
+
+HyperbolicPatchStrategy::~HyperbolicPatchStrategy()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default virtual function implementations.                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HyperbolicPatchStrategy::tagGradientDetectorCells(
+   hier::Patch& patch,
+   const double regrid_time,
+   const bool initial_error,
+   const int tag_index,
+   const bool uses_richardson_extrapolation_too)
+{
+   NULL_USE(patch);
+   NULL_USE(regrid_time);
+   NULL_USE(initial_error);
+   NULL_USE(tag_index);
+   NULL_USE(uses_richardson_extrapolation_too);
+   TBOX_WARNING("HyperbolicPatchStrategy::tagGradientDetectorCells()"
+      << "\nNo class supplies a concrete implementation for "
+      << "\nthis method.  The default abstract method (which "
+      << "\ndoes no cell tagging) is executed" << std::endl);
+}
+
+void HyperbolicPatchStrategy::tagRichardsonExtrapolationCells(
+   hier::Patch& patch,
+   const int error_level_number,
+   const tbox::Pointer<hier::VariableContext> coarsened_fine,
+   const tbox::Pointer<hier::VariableContext> advanced_coarse,
+   const double regrid_time,
+   const double deltat,
+   const int error_coarsen_ratio,
+   const bool initial_error,
+   const int tag_index,
+   const bool uses_gradient_detector_too)
+{
+   NULL_USE(patch);
+   NULL_USE(error_level_number);
+   NULL_USE(coarsened_fine);
+   NULL_USE(advanced_coarse);
+   NULL_USE(regrid_time);
+   NULL_USE(deltat);
+   NULL_USE(error_coarsen_ratio);
+   NULL_USE(initial_error);
+   NULL_USE(tag_index);
+   NULL_USE(uses_gradient_detector_too);
+   TBOX_WARNING("HyperbolicPatchStrategy::tagRichardsonExtrapolationCells()"
+      << "\nNo class supplies a concrete implementation for "
+      << "\nthis method.  The default abstract method (which "
+      << "\ndoes no cell tagging) is executed" << std::endl);
+}
+
+void HyperbolicPatchStrategy::setupLoadBalancer(
+   HyperbolicLevelIntegrator* integrator,
+   mesh::GriddingAlgorithm* gridding_algorithm)
+{
+   NULL_USE(integrator);
+   NULL_USE(gridding_algorithm);
+}
+
+void HyperbolicPatchStrategy::preprocessAdvanceLevelState(
+   const tbox::Pointer<hier::PatchLevel>& level,
+   double current_time,
+   double dt,
+   bool first_step,
+   bool last_step,
+   bool regrid_advance)
+{
+   NULL_USE(level);
+   NULL_USE(current_time);
+   NULL_USE(dt);
+   NULL_USE(first_step);
+   NULL_USE(last_step);
+   NULL_USE(regrid_advance);
+}
+
+void HyperbolicPatchStrategy::postprocessAdvanceLevelState(
+   const tbox::Pointer<hier::PatchLevel>& level,
+   double current_time,
+   double dt,
+   bool first_step,
+   bool last_step,
+   bool regrid_advance)
+{
+   NULL_USE(level);
+   NULL_USE(current_time);
+   NULL_USE(dt);
+   NULL_USE(first_step);
+   NULL_USE(last_step);
+   NULL_USE(regrid_advance);
+}
+
+hier::IntVector HyperbolicPatchStrategy::getRefineOpStencilWidth() const
+{
+   return hier::IntVector::getZero(d_dim);
+}
+
+void HyperbolicPatchStrategy::preprocessRefine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio)
+{
+   NULL_USE(fine);
+   NULL_USE(coarse);
+   NULL_USE(fine_box);
+   NULL_USE(ratio);
+}
+
+void HyperbolicPatchStrategy::postprocessRefine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio)
+{
+   NULL_USE(fine);
+   NULL_USE(coarse);
+   NULL_USE(fine_box);
+   NULL_USE(ratio);
+}
+
+hier::IntVector HyperbolicPatchStrategy::getCoarsenOpStencilWidth() const
+{
+   return hier::IntVector::getZero(d_dim);
+}
+
+void HyperbolicPatchStrategy::preprocessCoarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio)
+{
+   NULL_USE(coarse);
+   NULL_USE(fine);
+   NULL_USE(coarse_box);
+   NULL_USE(ratio);
+}
+
+void HyperbolicPatchStrategy::postprocessCoarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio)
+{
+   NULL_USE(coarse);
+   NULL_USE(fine);
+   NULL_USE(coarse_box);
+   NULL_USE(ratio);
+}
+
+tbox::Pointer<hier::VariableContext> HyperbolicPatchStrategy::getDataContext()
+const
+{
+   return d_data_context;
+}
+
+void HyperbolicPatchStrategy::setDataContext(
+   tbox::Pointer<hier::VariableContext> context)
+{
+   d_data_context = context;
+}
+
+void HyperbolicPatchStrategy::clearDataContext()
+{
+   d_data_context.setNull();
+}
+
+const tbox::Dimension& HyperbolicPatchStrategy::getDim() const {
+   return d_dim;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/HyperbolicPatchStrategy.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/HyperbolicPatchStrategy.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,467 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to patch routines for hyperbolic integration scheme. 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_HyperbolicPatchStrategy
+#define included_algs_HyperbolicPatchStrategy
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/xfer/RefinePatchStrategy.h"
+#include "SAMRAI/xfer/CoarsenPatchStrategy.h"
+#include "SAMRAI/mesh/GriddingAlgorithm.h"
+
+namespace SAMRAI {
+namespace algs {
+
+class HyperbolicLevelIntegrator;
+
+/**
+ * Class HyperbolicPatchStrategy is an abstract base class defining the
+ * interface between an HyperbolicLevelIntegrator object and operations
+ * applied to a single patch in a structured AMR hierarchy.   The operations
+ * include patch initialization, dt calculation, flux computation,
+ * conservative differencing, and error estimation.  This class is derived
+ * from the xfer::RefinePatchStrategy and xfer::CoarsenPatchStrategy
+ * abstract base classes.   These base classes provide the interface for
+ * user-defined interlevel data refining and coarsening operations and the
+ * specification of physical boundary conditions.  The functions
+ * setPhysicalBoundaryConditions(), and pre/postprocessRefine() are
+ * overloaded from the class xfer::RefinePatchStrategy.  The operations
+ * pre/postprocessCoarsen() are overloaded from xfer::CoarsenPatchStrategy.
+ * The pre/postprocessCoarsen/Refine() operations are given empty
+ * implementations here so that the user does not need to proovide them if
+ * the operations are not needed.
+ *
+ * It is important to recognize that for the concrete patch strategy subclass
+ * and the HyperbolicLevelIntegrator to work together, the concrete
+ * strategy must know which patch data to operate on.  The patch data storage
+ * is manipulated by the level integrator.  The set/clearDataContext() methods
+ * allow the integrator to inform the patch strategy of the correct data
+ * context.  The concrete patch strategy subclass can access the appropriate
+ * context via the getDataContext() method.
+ *
+ * @see algs::HyperbolicLevelIntegrator
+ * @see xfer::RefinePatchStrategy
+ * @see xfer::CoarsenPatchStrategy
+ */
+
+class HyperbolicPatchStrategy:
+   public xfer::RefinePatchStrategy,
+   public xfer::CoarsenPatchStrategy
+{
+public:
+   /**
+    * Blank constructor for HyperbolicPatchStrategy.
+    */
+   HyperbolicPatchStrategy(
+      const tbox::Dimension& dim);
+
+   /**
+    * Virtual destructor for HyperbolicPatchStrategy.
+    */
+   virtual ~HyperbolicPatchStrategy();
+
+   /**
+    * Register specific variables needed in the numerical routines with the
+    * hyperbolic level integrator using the registerVariable() function in that
+    * class.  The integrator manipulates storage for the data and this
+    * registration defines the way in which data for each quantity will
+    * be manipulated on the patches.  Typically, the derived data quantities
+    * for plotting are registered with a visualization data writer in this
+    * routine as well, since the hyperbolic level integrator provides the
+    * variable context for plotting (i.e., which data is available when a
+    * plot file is generated).  The integrator pointer cannot be null in
+    * most cases.
+    *
+    * The gridding algorithm pointer is provided so that patch data objects
+    * may be registered with the load balancer object (owned by the gridding
+    * algorithm) for non-uniform load balancing, if needed.
+    */
+   virtual void
+   registerModelVariables(
+      HyperbolicLevelIntegrator* integrator) = 0;
+
+   /**
+    * Set up parameters in the load balancer object (owned by the gridding
+    * algorithm) if needed.  This function is called immediately after the
+    * registerModelVariables() function is called.  The hyperbolic level
+    * integrator pointer is provided so that the integrator can be used
+    * to manage data for the load balancer if needed (e.g., when using
+    * non-uniform load balancing).
+    *
+    * Note that this function is not pure virtual. It is given a
+    * dummy implementation here so that users may ignore it when
+    * inheriting from this class.
+    */
+   virtual void
+   setupLoadBalancer(
+      HyperbolicLevelIntegrator* integrator,
+      mesh::GriddingAlgorithm* gridding_algorithm);
+
+   /**
+    * Set the initial data on a patch interior only.  Note that no ghost cells
+    * need to be set in this routine regardless of whether the patch data
+    * corresponding to the context requires ghost cells.  The data_time
+    * is the simulation time when the routine is called.  The boolean
+    * initial_time is true if the routine is called at the initial time
+    * when the hierarchy is initially constructed, otherwise it is false.
+    */
+   virtual void
+   initializeDataOnPatch(
+      hier::Patch& patch,
+      const double data_time,
+      const bool initial_time) = 0;
+
+   /**
+    * Compute the stable time increment for a patch on the level with the
+    * given number.  The boolean flag initial_time is true if the routine
+    * is called at the initial simulation time; otherwise it is false.
+    * The double argument dt_time is the simulation time.
+    */
+   virtual double
+   computeStableDtOnPatch(
+      hier::Patch& patch,
+      const bool initial_time,
+      const double dt_time) = 0;
+
+   /**
+    * Compute TIME INTEGRALS of fluxes to be used in conservative difference
+    * for patch integration.  That is, it is assumed that this numerical
+    * routine will compute the fluxes corresponding to the cell faces
+    * multiplied by the time increment.  Typically, the numerical flux is
+    * the normal flux at the cell face.  The flux integrals will be used in
+    * the conservative difference that updates the conserved quantities.
+    *
+    * Note that the numerical routines in this method generally require
+    * ghost cells.  Ghost cells data is filled before this routine is called.
+    */
+   virtual void
+   computeFluxesOnPatch(
+      hier::Patch& patch,
+      const double time,
+      const double dt) = 0;
+
+   /**
+    * Update patch data with a conservative difference (approximating
+    * the divergence theorem) using the flux integrals computed in
+    * computeFluxesOnPatch() routine.  The boolean flag is true when this
+    * routine is called during a flux synchronization step.   Otherwise,
+    * it is false.  Note that the computeFluxesOnPatch() routine computes
+    * TIME INTEGRALs of the numerical fluxes (e.g., they have been multiplied
+    * by dt).  So the conservative difference routine should be consistent
+    * with this.
+    */
+   virtual void
+   conservativeDifferenceOnPatch(
+      hier::Patch& patch,
+      const double time,
+      const double dt,
+      bool at_syncronization) = 0;
+
+   /**
+    * This is an optional routine for user to process any application-specific
+    * patch strategy data BEFORE patches are advanced on the given level.
+    * This routine is called after patch boundary data is filled
+    * (i.e., ghosts) and before computeFluxesOnPatch().  The arguments are:
+    * level -- level that will be advanced, current_time -- current
+    * integration time, dt -- current time increment, first_step -- boolean
+    * flag that is true if advance is first in time step sequence on level
+    * (i.e., previous advance step was on another level, false otherwise,
+    * last_step -- boolean flag that is true if advance is last in time step
+    * sequence on level (i.e., synchronization with coarser level will occur
+    * immediately after this advance), regrid_advance -- boolean flag that
+    * is true if the advance is during a regridding phase (i.e., the advance
+    * is not used to integrate data on the hierarchy) in which case the
+    * results of the advance will be discarded.
+    *
+    * Note that when this routine is called, the scratch data is filled on
+    * all patches (i.e., ghost cells) and that data is the same as the
+    * current level data on all patch interiors.  That is, both scratch and
+    * current data correspond to current_time.
+    *
+    * Note that this function is not pure virtual. It is given a
+    * dummy implementation here so that users may ignore it when
+    * inheriting from this class.
+    */
+   virtual void
+   preprocessAdvanceLevelState(
+      const tbox::Pointer<hier::PatchLevel>& level,
+      double current_time,
+      double dt,
+      bool first_step,
+      bool last_step,
+      bool regrid_advance);
+
+   /**
+    * This is an optional routine for user to process any application-specific
+    * patch strategy data AFTER patches are advanced on the given level.
+    * This routine is called after conservativeDifferenceOnPatch() is called
+    * and before computeStableDtOnPatch().  The arguments are:
+    * level -- level that will be advanced, current_time -- current
+    * integration time, dt -- current time increment, first_step -- boolean
+    * flag that is true if advance is first in time step sequence on level
+    * (i.e., previous advance step was on another level, false otherwise,
+    * last_step -- boolean flag that is true if advance is last in time step
+    * sequence on level (i.e., synchronization with coarser
+    * level will occur immediately after this advance), regrid_advance --
+    * boolean flag that is true if the advance is during a regridding phase
+    * (i.e., the advance is not used to integrate data on the hierarchy) in
+    * which case the results of the advance will be discarded.
+    *
+    * Note that when this routine is called, the scratch data is filled on
+    * all patches (i.e., ghost cells) and that data is the same as the
+    * new level data on all patch interiors.  That is, both scratch and
+    * new data correspond to current_time + dt on patch interiors.
+    * The current data and ghost values correspond to the current_time.
+    *
+    * Note that this function is not pure virtual. It is given a
+    * dummy implementation here so that users may ignore it when
+    * inheriting from this class.
+    */
+   virtual void
+   postprocessAdvanceLevelState(
+      const tbox::Pointer<hier::PatchLevel>& level,
+      double current_time,
+      double dt,
+      bool first_step,
+      bool last_step,
+      bool regrid_advance);
+
+   /**
+    * Tag cells on the given patch that require refinement based on
+    * application-specific numerical quantities.  The tag index argument
+    * indicates the index of the tag data on the patch data array.  The
+    * boolean argument initial_error is true if tagging is being done at the
+    * initial simulation time; otherwise, it is false.  The other boolean
+    * flag uses_richardson_extrapolation_too is true when Richardson
+    * extrapolation is used in addition to the gradient detector.  This flag
+    * helps users manage multiple regridding criteria.
+    *
+    * Note that this function is not pure virtual. It is given a
+    * dummy implementation here so that users may ignore it when
+    * inheriting from this class.
+    */
+   virtual void
+   tagGradientDetectorCells(
+      hier::Patch& patch,
+      const double regrid_time,
+      const bool initial_error,
+      const int tag_index,
+      const bool uses_richardson_extrapolation_too);
+
+   /**
+    * Tag cells based from differences computed in the Richardson
+    * extrapolation.  The Richardson
+    * extrapolation algorithm creates a coarsened version of some hierarchy
+    * patch level and advances data in time on both the coarsened patch
+    * level and the hierarchy level. This routine takes the data resulting
+    * from the advance on both the coarse and fine levels, compares them, and
+    * tags cells according to the difference.
+    * \verbatim
+    *              (2)
+    *      n+1 ^------->x finish      (1) advanced_coarse
+    *          |        ^             (2) coarsened_fine
+    *  time  n -        |
+    *          ^        |(1)
+    *          |        |
+    *          <--------o start
+    *        fine     coarse
+    * \endverbatim
+    *
+    * The patch supplied to this routine is on the coarsened level.  However,
+    * the error_level_number corresponds to the actual hierarchy level
+    * from which it was coarsened.   Data resides on this patch in two
+    * contexts - ``advanced_coarse'' and ``coarsened_fine''.  Advanced
+    * coarse is data advanced on the coarsened version of the level, while
+    * coarsened fine is the data advanced on the fine level and then
+    * coarsened to the coarse level.  The regrid time and the time increment
+    * are given for the actual hierarchy level.  The error coarsen ratio
+    * argument is the ratio between the index spaces on the hierarchy level
+    * and the coarsened hierarchy level.  The boolean flag ``initial_error''
+    * is true when the error estimation is performed at the initial simulation
+    * time; i.e., when the hierarchy levels are being constructed for the first
+    * time.  The tag index argument is the index of the tag data on the patch
+    * data array.  The other boolean flag uses_gradient_detector_too is
+    * true when a gradient detector scheme is used in addition to Richardson
+    * extrapolation.  This flag helps users manage multiple regridding
+    * criteria.
+    *
+    * Note that this function is not pure virtual. It is given a
+    * dummy implementation here so that users may ignore it when
+    * inheriting from this class.
+    */
+   virtual void
+   tagRichardsonExtrapolationCells(
+      hier::Patch& patch,
+      const int error_level_number,
+      const tbox::Pointer<hier::VariableContext> coarsened_fine,
+      const tbox::Pointer<hier::VariableContext> advanced_coarse,
+      const double regrid_time,
+      const double deltat,
+      const int error_coarsen_ratio,
+      const bool initial_error,
+      const int tag_index,
+      const bool uses_gradient_detector_too);
+
+   /**
+    * Set user-defined boundary conditions at the physical domain boundary.
+    */
+   virtual void
+   setPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const double fill_time,
+      const hier::IntVector& ghost_width_to_fill) = 0;
+
+   /**
+    * Return maximum stencil width needed for user-defined
+    * data interpolation operations.  Default is to return
+    * zero, assuming no user-defined operations provided.
+    *
+    * Note that this function is not pure virtual. It is given a
+    * dummy implementation here so that users may ignore it when
+    * inheriting from this class.
+    */
+   virtual hier::IntVector
+   getRefineOpStencilWidth() const;
+
+   /**
+    * Pre- and post-processing routines for implementing user-defined
+    * spatial interpolation routines applied to variables.  The
+    * interpolation routines are used in the hyperbolic AMR algorithm
+    * for filling patch ghost cells before advancing data on a level
+    * and after regridding a level to fill portions of the new level
+    * from some coarser level.  These routines are called automatically
+    * from within patch boundary filling schedules; thus, some concrete
+    * function matching these signatures must be provided in the user's
+    * patch routines.  However, the routines only need to perform some
+    * operations when "USER_DEFINED_REFINE" is given as the interpolation
+    * method for some variable when the patch routines register variables
+    * with the hyperbolic level integration algorithm, typically.  If the
+    * user does not provide operations that refine such variables in either
+    * of these routines, then they will not be refined.
+    *
+    * The order in which these operations are used in each patch
+    * boundary filling schedule is:
+    *
+    * - \b (1) {Call user's preprocessRefine() routine.}
+    * - \b (2) {Refine all variables with standard interpolation operators.}
+    * - \b (3) {Call user's postprocessRefine() routine.}
+    *
+    * Note that these functions are not pure virtual. They are given
+    * dummy implementations here so that users may ignore them when
+    * inheriting from this class.
+    */
+   virtual void
+   preprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio);
+
+   ///
+   virtual void
+   postprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio);
+
+   /**
+    * Return maximum stencil width needed for user-defined
+    * data coarsen operations.  Default is to return
+    * zero, assuming no user-defined operations provided.
+    *
+    * Note that this function is not pure virtual. It is given a
+    * dummy implementation here so that users may ignore it when
+    * inheriting from this class.
+    */
+   virtual hier::IntVector
+   getCoarsenOpStencilWidth() const;
+
+   /**
+    * Pre- and post-processing routines for implementing user-defined
+    * spatial coarsening routines applied to variables.  The coarsening
+    * routines are used in the hyperbolic AMR algorithm synchronizing
+    * coarse and fine levels when they have been integrated to the same
+    * point.  These routines are called automatically from within the
+    * data synchronization coarsen schedules; thus, some concrete
+    * function matching these signatures must be provided in the user's
+    * patch routines.  However, the routines only need to perform some
+    * operations when "USER_DEFINED_COARSEN" is given as the coarsening
+    * method for some variable when the patch routines register variables
+    * with the hyperbolic level integration algorithm, typically.  If the
+    * user does not provide operations that coarsen such variables in either
+    * of these routines, then they will not be coarsened.
+    *
+    * The order in which these operations are used in each coarsening
+    * schedule is:
+    *
+    * - \b (1) {Call user's preprocessCoarsen() routine.}
+    * - \b (2) {Coarsen all variables with standard coarsening operators.}
+    * - \b (3) {Call user's postprocessCoarsen() routine.}
+    *
+    * Note that these functions are not pure virtual. They are given
+    * dummy implementations here so that users may ignore them when
+    * inheriting from this class.
+    */
+   virtual void
+   preprocessCoarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio);
+
+   ///
+   virtual void
+   postprocessCoarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio);
+
+   /**
+    * Return pointer to patch data context.
+    */
+   tbox::Pointer<hier::VariableContext>
+   getDataContext() const;
+
+   /**
+    * The hyperbolic integrator controls the context for the data to be used
+    * in the numerical routines implemented in the concrete patch strategy.
+    * The setDataContext() allows the integrator to set the context for
+    * data on a patch on which to operate.
+    */
+   void
+   setDataContext(
+      tbox::Pointer<hier::VariableContext> context);
+
+   /**
+    * The clearDataContext() routine resets the data context to be null.
+    */
+   void
+   clearDataContext();
+
+   const tbox::Dimension&
+   getDim() const;
+
+private:
+   const tbox::Dimension d_dim;
+
+   tbox::Pointer<hier::VariableContext> d_data_context;
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/ImplicitEquationStrategy.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/ImplicitEquationStrategy.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,29 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface between implicit integrator and equations to solve. 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_ImplicitEquationStrategy_C
+#define included_algs_ImplicitEquationStrategy_C
+
+#include "SAMRAI/algs/ImplicitEquationStrategy.h"
+
+namespace SAMRAI {
+namespace algs {
+
+ImplicitEquationStrategy::ImplicitEquationStrategy()
+{
+}
+
+ImplicitEquationStrategy::~ImplicitEquationStrategy()
+{
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/ImplicitEquationStrategy.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/ImplicitEquationStrategy.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,126 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface between implicit integrator and equations to solve. 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_ImplicitEquationStrategy
+#define included_algs_ImplicitEquationStrategy
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/solv/SAMRAIVectorReal.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace algs {
+
+/*!
+ * @brief @b Abstract base class defining the interface between
+ * ImplicitIntegrator object and routines
+ * specific to the system of equations to be solved.
+ *
+ * This is an @b abstract base class defining the interface between
+ * ImplicitIntegrator object and routines
+ * specific to the system of equations to be solved.  These methods include
+ * defining the components which comprise the state of the nonlinear solution
+ * vector, computing time increments used in the implicit integration process,
+ * testing whether a newly computed solution is acceptable, etc.  The
+ * interface follows the Strategy design pattern.  The methods declared
+ * in the interface are provided in a user-supplied concrete equation class
+ * derived from this base class.
+ *
+ * @see algs::ImplicitIntegrator
+ */
+class ImplicitEquationStrategy
+{
+public:
+   /**
+    * Empty constructor for ImplicitEquationStrategy.
+    */
+   ImplicitEquationStrategy();
+
+   /**
+    * Empty destructor for ImplicitEquationStrategy
+    */
+   virtual ~ImplicitEquationStrategy();
+
+   /**
+    * Add components to the solution vector to define the state of the
+    * solution for the implicit time integrator.
+    */
+   virtual void
+   setupSolutionVector(
+      tbox::Pointer<solv::SAMRAIVectorReal<double> > solution) = 0;
+
+   /**
+    * Return time increment for advancing the solution at the first timestep.
+    */
+   virtual double
+   getInitialDt() = 0;
+
+   /**
+    * Return time increment for next solution advance based on the
+    * arguments provided.  The boolean argument good_solution is the
+    * return value from the checkNewSolution() routine.  It should be
+    * assumed that that routine is invoked prior to a call to this function.
+    * The integer argument solver_retcode is the return code generated
+    * by the nonlinear solver package that computed the solution.  It is
+    * the responsibility of the subclass of this base class to interpret
+    * the arguments properly when determining the time step.
+    */
+   virtual double
+   getNextDt(
+      const bool good_solution,
+      const int solver_retcode) = 0;
+
+   /**
+    * Set initial guess for time advanced solution vector.  The first_step
+    * is true if the subsequent time advance is the first in the simulation,
+    * or if it immediately follows a regridding of the patch hierarchy.  In
+    * either case, extrapolation of the solution may not be possible since
+    * there may be no old solution to use.  Otherwise, first_step is false.
+    * The current_time argument is the current solution time.  The
+    * current_dt and old_dt arguments represent the time increments
+    * used in the cuurent and previous advances, respectively.  Thus, the
+    * new integration time to which we will attempt to advance the solution
+    * will be current_time + current_dt.
+    */
+   virtual void
+   setInitialGuess(
+      const bool first_step,
+      const double current_time,
+      const double current_dt,
+      const double old_dt) = 0;
+
+   /**
+    * Return true if the most recently computed time advanced solution
+    * is acceptable.  Otherwise, return false.  The integer argument
+    * is the return code generated by the nonlinear solver package
+    * that computed the solution.  It is the responsibility of the
+    * subclass of this base class to interpret that return code properly.
+    */
+   virtual bool
+   checkNewSolution(
+      const int solver_retcode) = 0;
+
+   /**
+    * Assuming that an acceptable time advanced solution has been found,
+    * update the state of the solution (e.g., reset solution pointers)
+    * and all dependent variables.  The argument is the integration time
+    * to which the new solution corresponds.
+    */
+   virtual void
+   updateSolution(
+      const double new_time) = 0;
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/ImplicitIntegrator.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/ImplicitIntegrator.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,449 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Implicit time integration manager class for nonlinear problems. 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_ImplicitIntegrator_C
+#define included_algs_ImplicitIntegrator_C
+
+#include "SAMRAI/algs/ImplicitIntegrator.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fstream>
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#define ALGS_IMPLICIT_INTEGRATOR_VERSION (1)
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/algs/ImplicitIntegrator.I"
+#endif
+
+namespace SAMRAI {
+namespace algs {
+
+// using namespace std;
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor and destructor for ImplicitIntegrator.  The         *
+ * constructor sets default values for data members, then overrides      *
+ * them with values read from input or restart.  The destructor does     *
+ * nothing interesting.                                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+ImplicitIntegrator::ImplicitIntegrator(
+   const std::string& object_name,
+   tbox::Pointer<tbox::Database> input_db,
+   ImplicitEquationStrategy* implicit_equations,
+   solv::NonlinearSolverStrategy* nonlinear_solver,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!input_db.isNull());
+   TBOX_ASSERT(implicit_equations != ((ImplicitEquationStrategy *)NULL));
+   TBOX_ASSERT(nonlinear_solver != ((solv::NonlinearSolverStrategy *)NULL));
+   TBOX_ASSERT(!hierarchy.isNull());
+
+   d_object_name = object_name;
+   d_implicit_equations = implicit_equations;
+   d_nonlinear_solver = nonlinear_solver;
+   d_patch_hierarchy = hierarchy;
+
+   d_solution_vector.setNull();
+
+   d_initial_time =
+      d_final_time =
+         d_current_time =
+            d_current_dt =
+               d_old_dt = tbox::MathUtilities<double>::getSignalingNaN();
+
+   d_integrator_step = 0;
+   d_max_integrator_steps = 0;
+
+   d_finest_level = -1;
+
+   /*
+    * Initialize object with data read from input and restart databases.
+    */
+
+   bool is_from_restart = tbox::RestartManager::getManager()->isFromRestart();
+   if (is_from_restart) {
+      getFromRestart();
+   }
+
+   getFromInput(input_db);
+
+   d_current_dt = d_implicit_equations->getInitialDt();
+   d_old_dt = 0.0;
+   d_current_time = d_initial_time;
+
+}
+
+ImplicitIntegrator::~ImplicitIntegrator()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialize integrator and nonlinear solver:                           *
+ *                                                                       *
+ * (1) Create vector containing solution state advanced in time.         *
+ *                                                                       *
+ * (2) Equation class registers data components with solution vector.    *
+ *                                                                       *
+ * (3) Initialize nonlinear solver.                                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ImplicitIntegrator::initialize()
+{
+   d_finest_level = d_patch_hierarchy->getFinestLevelNumber();
+
+   d_solution_vector = new solv::SAMRAIVectorReal<double>("solution_vector",
+                                                          d_patch_hierarchy,
+                                                          0, d_finest_level);
+
+   d_implicit_equations->setupSolutionVector(d_solution_vector);
+
+   if (d_solution_vector->getNumberOfComponents() == 0) {
+      TBOX_ERROR("Solution vector has zero components.");
+   }
+
+   d_nonlinear_solver->initialize(d_solution_vector);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Integrate solution through given time increment:                      *
+ *                                                                       *
+ * (1) If number of levels in hierarchy has changed since last advance   *
+ *     due to regridding, the range of levels in the vectors is reset.   *
+ *                                                                       *
+ * (2) Construct initial guess at new solution by extrapolation.         *
+ *                                                                       *
+ * (3) Call the equation advance set up routine.                         *
+ *                                                                       *
+ * (4) Compute the new solution using the nonlinear solver.              *
+ *                                                                       *
+ * (5) Return integer return code define by nonlinear solver.            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int ImplicitIntegrator::advanceSolution(
+   const double dt,
+   const bool first_step)
+{
+   int retcode = tbox::MathUtilities<int>::getMax();
+
+   if (stepsRemaining() && (d_current_time < d_final_time)) {
+
+      d_current_dt = dt;
+
+      const int finest_now = d_patch_hierarchy->getFinestLevelNumber();
+
+      if (first_step && (finest_now != d_finest_level)) {
+
+         d_finest_level = finest_now;
+
+         d_solution_vector->resetLevels(0, d_finest_level);
+
+         d_nonlinear_solver->initialize(d_solution_vector);
+
+      }
+
+      d_implicit_equations->setInitialGuess(first_step,
+         d_current_time,
+         d_current_dt,
+         d_old_dt);
+
+      retcode = d_nonlinear_solver->solve();
+
+   }
+
+   return retcode;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Get next dt from user-supplied equation class.  Timestep selection    *
+ * is generally based on whether the nonlinear solution iteration        *
+ * converged and, if so, whether the solution meets some user-defined    *
+ * criteria.  It is assumed that, before this routine is called, the     *
+ * routine checkNewSolution() has been called.  The boolean argument     *
+ * is the return value from that call.  The integer argument is          *
+ * that which is returned by the particular nonlinear solver package     *
+ * that generated the solution.                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double ImplicitIntegrator::getNextDt(
+   const bool good_solution,
+   const int solver_retcode)
+{
+   double dt_next = d_implicit_equations->getNextDt(good_solution,
+         solver_retcode);
+
+   double global_dt_next = dt_next;
+   const tbox::SAMRAI_MPI& mpi(d_patch_hierarchy->getDomainMappedBoxLevel().getMPI());
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&global_dt_next, 1, MPI_MIN);
+   }
+
+   global_dt_next =
+      tbox::MathUtilities<double>::Min(global_dt_next,
+         d_final_time - d_current_time);
+
+   return global_dt_next;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Check whether time advanced solution is acceptable.  Note that the    *
+ * user-supplied solution checking routine must interpret the integer    *
+ * return code generated by the nonlinear solver correctly.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool ImplicitIntegrator::checkNewSolution(
+   const int solver_retcode) const
+{
+   bool good_solution =
+      d_implicit_equations->checkNewSolution(solver_retcode);
+
+   int good = (good_solution ? 1 : 0);
+   int global_good = good;
+   const tbox::SAMRAI_MPI& mpi(d_patch_hierarchy->getDomainMappedBoxLevel().getMPI());
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&global_good, 1, MPI_MIN);
+   }
+
+   return global_good == 0 ? false : true;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Assuming an acceptable time advanced solution is found, update        *
+ * solution quantities and time information state of integrator.         *
+ * Return the current simulation time.                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double ImplicitIntegrator::updateSolution()
+{
+   d_current_time += d_current_dt;
+   d_old_dt = d_current_dt;
+   d_integrator_step++;
+
+   d_implicit_equations->updateSolution(d_current_time);
+
+   return d_current_time;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * If simulation is not from restart, read data from input database.     *
+ * Otherwise, override restart values for a subset of the data members   *
+ * with those found in input.                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ImplicitIntegrator::getFromInput(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   if (tbox::RestartManager::getManager()->isFromRestart()) {
+
+      if (db->keyExists("final_time")) {
+         d_final_time = db->getDouble("final_time");
+         if (d_final_time < d_initial_time) {
+            TBOX_ERROR(d_object_name << " -- Error in input data "
+                                     << "final_time < initial_time.");
+         }
+      }
+
+      if (db->keyExists("max_integrator_steps")) {
+         d_max_integrator_steps = db->getInteger("max_integrator_steps");
+         if (d_max_integrator_steps < 0) {
+            TBOX_ERROR(d_object_name << " -- Error in input data "
+                                     << "max_integrator_steps < 0.");
+         } else {
+            if (d_max_integrator_steps < d_integrator_step) {
+               TBOX_ERROR(
+                  d_object_name << " -- Error in input data "
+                  <<
+                  "max_integrator_steps < current integrator step.");
+            }
+         }
+
+      }
+
+   } else {
+
+      if (db->keyExists("initial_time")) {
+         d_initial_time = db->getDouble("initial_time");
+      } else {
+         TBOX_ERROR(d_object_name << " -- Key data `initial_time'"
+                                  << " missing in input.");
+      }
+
+      if (db->keyExists("final_time")) {
+         d_final_time = db->getDouble("final_time");
+         if (d_final_time < d_initial_time) {
+            TBOX_ERROR(d_object_name << " -- Error in input data "
+                                     << "final_time < initial_time.");
+         }
+      } else {
+         TBOX_ERROR(d_object_name << " -- Key data `final_time'"
+                                  << " missing in input.");
+      }
+
+      if (db->keyExists("max_integrator_steps")) {
+         d_max_integrator_steps = db->getInteger("max_integrator_steps");
+         if (d_max_integrator_steps < 0) {
+            TBOX_ERROR(d_object_name << " -- Error in input data "
+                                     << "max_integrator_steps < 0.");
+         }
+      } else {
+         TBOX_ERROR(d_object_name << " -- Key data `max_integrator_steps'"
+                                  << " missing in input.");
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Write out class version number and data members to database.          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ImplicitIntegrator::putToDatabase(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   db->putInteger("ALGS_IMPLICIT_INTEGRATOR_VERSION",
+      ALGS_IMPLICIT_INTEGRATOR_VERSION);
+
+   db->putDouble("d_initial_time", d_initial_time);
+   db->putDouble("d_final_time", d_final_time);
+   db->putDouble("d_current_time", d_current_time);
+   db->putDouble("d_current_dt", d_current_dt);
+   db->putDouble("d_old_dt", d_old_dt);
+
+   db->putInteger("d_integrator_step", d_integrator_step);
+   db->putInteger("d_max_integrator_steps", d_max_integrator_steps);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Check to make sure that the version number of the class is that same  *
+ * as the version number in the restart file.  If these values are equal *
+ * then read values for data members from the restart file.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ImplicitIntegrator::getFromRestart()
+{
+
+   tbox::Pointer<tbox::Database> root_db =
+      tbox::RestartManager::getManager()->getRootDatabase();
+
+   tbox::Pointer<tbox::Database> db;
+   if (root_db->isDatabase(d_object_name)) {
+      db = root_db->getDatabase(d_object_name);
+   } else {
+      TBOX_ERROR("Restart database corresponding to "
+         << d_object_name << " not found in restart file");
+   }
+
+   int ver = db->getInteger("ALGS_IMPLICIT_INTEGRATOR_VERSION");
+   if (ver != ALGS_IMPLICIT_INTEGRATOR_VERSION) {
+      TBOX_ERROR(d_object_name << ":  "
+                               << "Restart file version different "
+                               << "than class version.");
+   }
+
+   d_initial_time = db->getDouble("d_initial_time");
+   d_final_time = db->getDouble("d_final_time");
+   d_current_time = db->getDouble("d_current_time");
+   d_current_dt = db->getDouble("d_current_dt");
+   d_old_dt = db->getDouble("d_old_dt");
+
+   d_integrator_step = db->getInteger("d_integrator_step");
+   d_max_integrator_steps = db->getInteger("d_max_integrator_steps");
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print class data members to given output stream.                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ImplicitIntegrator::printClassData(
+   std::ostream& os) const
+{
+   os << "\nImplicitIntegrator::printClassData..." << std::endl;
+   os << "ImplicitIntegrator: this = "
+      << (ImplicitIntegrator *)this << std::endl;
+   os << "d_object_name = " << d_object_name << std::endl;
+   os << "d_implicit_equations = "
+      << (ImplicitEquationStrategy *)d_implicit_equations << std::endl;
+   os << "d_nonlinear_solver = "
+      << (solv::NonlinearSolverStrategy *)d_nonlinear_solver << std::endl;
+   os << "d_patch_hierarchy = "
+      << (hier::PatchHierarchy *)d_patch_hierarchy << std::endl;
+   os << "d_solution_vector = "
+      << (solv::SAMRAIVectorReal<double> *)d_solution_vector << std::endl;
+
+   os << "d_finest_level = " << d_finest_level << std::endl;
+   os << "d_initial_time = " << d_initial_time << std::endl;
+   os << "d_final_time = " << d_final_time << std::endl;
+   os << "d_current_time = " << d_current_time << std::endl;
+   os << "d_current_dt = " << d_current_dt << std::endl;
+   os << "d_old_dt = " << d_old_dt << std::endl;
+   os << "d_integrator_step = " << d_integrator_step << std::endl;
+   os << "d_max_integrator_steps = " << d_max_integrator_steps << std::endl;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/ImplicitIntegrator.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/ImplicitIntegrator.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,57 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Implicit time integration manager class for nonlinear problems. 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace algs {
+
+SAMRAI_INLINE_KEYWORD
+double ImplicitIntegrator::getCurrentDt() const
+{
+   return d_current_dt;
+}
+
+SAMRAI_INLINE_KEYWORD
+double ImplicitIntegrator::getInitialTime() const
+{
+   return d_initial_time;
+}
+
+SAMRAI_INLINE_KEYWORD
+double ImplicitIntegrator::getFinalTime() const
+{
+   return d_final_time;
+}
+
+SAMRAI_INLINE_KEYWORD
+double ImplicitIntegrator::getCurrentTime() const
+{
+   return d_current_time;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool ImplicitIntegrator::stepsRemaining() const
+{
+   return d_integrator_step < d_max_integrator_steps;
+}
+
+SAMRAI_INLINE_KEYWORD
+int ImplicitIntegrator::getIntegratorStep() const
+{
+   return d_integrator_step;
+}
+
+SAMRAI_INLINE_KEYWORD
+int ImplicitIntegrator::getMaxIntegratorSteps() const
+{
+   return d_max_integrator_steps;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/ImplicitIntegrator.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/ImplicitIntegrator.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,301 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Implicit time integration manager class. 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_ImplicitIntegrator
+#define included_algs_ImplicitIntegrator
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Serializable.h"
+#include "SAMRAI/algs/ImplicitEquationStrategy.h"
+#include "SAMRAI/solv/NonlinearSolverStrategy.h"
+#include "SAMRAI/solv/SAMRAIVectorReal.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/tbox/InputDatabase.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Serializable.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace algs {
+
+/*!
+ * @brief Manage implicit time integration over an AMR patch hierarchy.
+ *
+ * Class ImplicitIntegrator manages implicit time integration
+ * over an AMR patch hierarchy.  It maintains references
+ * to ImplicitEquationStrategy and solv::NonlinearSolverStrategy
+ * objects, which provide operations describing the implicit equations
+ * and solving the problem at each time step, respectively.
+ * When a time step is performed, data on all levels is integrated through
+ * the same time increment.
+ *
+ * Initialization of an ImplicitIntegrator object is performed via a
+ * combination of default parameters and values read from input.  Data
+ * read from input is summarized as follows:
+ *
+ * Required input keys and data types:
+ * @param initial_time double value for the initial simulation time.
+ * @param final_time double value for the final simulation time.
+ * @param max_integrator_steps integer value for the maximum number
+ * of timesteps allowed.
+ *
+ * All input data items described above, except for initial_time,
+ * may be overwritten by new input values when continuing from restart.
+ *
+ * A sample input file entry might look like:
+ *
+ * @code
+ * initial_time = 0.0
+ * final_time   = 1.0
+ * max_integrator_steps = 100
+ * @endcode
+ *
+ * @see algs::ImplicitEquationStrategy
+ * @see solv::NonlinearSolverStrategy
+ */
+class ImplicitIntegrator:
+   public tbox::Serializable
+{
+public:
+   /**
+    * The constructor for ImplicitIntegrator initializes the
+    * default state of the integrator.  The integrator is configured with
+    * the concrete strategy objects in the argument list that provide
+    * operations related to the nonlinear solver and implicit equations
+    * to solve.  Data members are initialized from the input and restart
+    * databases.
+    *
+    * Note that no vectors are created in the constructor.  Vectors are
+    * created and the nonlinear solver is initialized in the initialize()
+    * member function.
+    *
+    * If assertion checking is turned on, an unrecoverable assertion will
+    * result if any of the database, strategy, or hierarchy pointers is
+    * null.  Assertions may also be thrown if any checks for consistency
+    * among input parameters fail.
+    */
+   ImplicitIntegrator(
+      const std::string& object_name,
+      tbox::Pointer<tbox::Database> input_db,
+      ImplicitEquationStrategy* implicit_equations,
+      solv::NonlinearSolverStrategy* nonlinear_solver,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+   /**
+    * Empty destructor for ImplicitIntegrator
+    */
+   virtual ~ImplicitIntegrator();
+
+   /**
+    * Initialize state of time integrator.  This includes creating
+    * solution vector and initializing solver components.
+    */
+   void
+   initialize();
+
+   /*!
+    * @brief Integrate entire patch hierarchy through the
+    * specified time increment.
+    *
+    * Integrate entire patch hierarchy through the specified time
+    * increment.  The time advance assumes the use of a nonlinear
+    * solver to implicitly integrate the discrete equations.  The integer
+    * return value is the return code generated by the particular solver
+    * package in use.  It is the user's responsibility to interpret this
+    * code in a manner consistent with the solver she is using.
+    *
+    * The boolean first_step argument is true when this is the very
+    * first call to the advance function or if the call occurs immediately
+    * after the hierarchy has changed due to regridding.  Otherwise it is
+    * false.  Note that, when the argument is true, the use of extrapolation
+    * to construct the initial guess for the advanced solution may not be
+    * possible.
+    *
+    *
+    * @param dt Time step size
+    * @param first_step Whether this is the first step after grid change
+    *
+    * @return value is the return code generated by the particular solver
+    * package in use
+    */
+   int
+   advanceSolution(
+      const double dt,
+      const bool first_step);
+
+   /**
+    * Return time increment for next solution advance.  Timestep selection
+    * is generally based on whether the nonlinear solution iteration
+    * converged and, if so, whether the solution meets some user-defined
+    * criteria.  This routine assumes that, before it is called, the
+    * routine checkNewSolution() was called.  The boolean argument is the
+    * return value from that call.  The integer argument is the return code
+    * generated by the nonlinear solver package that computed the solution.
+    */
+   double
+   getNextDt(
+      const bool good_solution,
+      const int solver_retcode);
+
+   /**
+    * Check time advanced solution to determine whether it is acceptable.
+    * Return true if the solution is acceptable; return false otherwise.
+    * The integer argument is the return code generated by the call to the
+    * nonlinear solver "solve" routine.   The meaning of this value depends
+    * on the particular nonlinear solver in use and must be intepreted
+    * properly by the user-supplied solution checking routine.
+    */
+   bool
+   checkNewSolution(
+      const int solver_retcode) const;
+
+   /**
+    * Update solution (e.g., reset pointers for solution data, update
+    * dependent variables, etc.) after time advance.  It is assumed that
+    * when this routine is invoked, an acceptable new solution has been
+    * computed.  The double return value is the simulation time corresponding
+    * to the advanced solution.
+    */
+   double
+   updateSolution();
+
+   /**
+    * Return initial integration time.
+    */
+   double
+   getInitialTime() const;
+
+   /**
+    * Return final integration time.
+    */
+   double
+   getFinalTime() const;
+
+   /**
+    * Return current integration time.
+    */
+   double
+   getCurrentTime() const;
+
+   /**
+    * Return current timestep.
+    */
+   double
+   getCurrentDt() const;
+
+   /**
+    * Return current integration step number.
+    */
+   int
+   getIntegratorStep() const;
+
+   /**
+    * Return maximum number of integration steps.
+    */
+   int
+   getMaxIntegratorSteps() const;
+
+   /**
+    * Return true if the number of integration steps performed by the
+    * integrator has not reached the specified maximum; return false
+    * otherwise.
+    */
+   bool
+   stepsRemaining() const;
+
+   /**
+    * Print out all members of integrator instance to given output stream.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os) const;
+
+   /**
+    * Write out state of object to given database.
+    *
+    * When assertion checking is active, the database pointer must be non-null.
+    */
+   void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> db);
+
+private:
+   /*
+    * Read input data from specified database and initialize class members.
+    * If run is from restart, a subset of the restart values may be replaced
+    * with those read from input.
+    *
+    * When assertion checking is active, the database pointer must be non-null.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db);
+
+   /*
+    * Read object state from restart database and initialize class members.
+    * Check that class and restart version numbers are the same.
+    */
+   void
+   getFromRestart();
+
+   /*
+    * String used to identify specific class instantiation.
+    */
+   std::string d_object_name;
+
+   /*
+    * Pointers to implicit equation and solver strategy objects and patch
+    * hierarchy.  The strategies provide nonlinear equation and solver
+    * routines for treating the nonlinear problem on the hierarchy.
+    */
+   ImplicitEquationStrategy* d_implicit_equations;
+   solv::NonlinearSolverStrategy* d_nonlinear_solver;
+   tbox::Pointer<hier::PatchHierarchy> d_patch_hierarchy;
+
+   int d_finest_level;
+
+   /*
+    * Solution vector advanced during the time integration process.
+    */
+   tbox::Pointer<solv::SAMRAIVectorReal<double> > d_solution_vector;
+
+   /*
+    * Data members representing integrator times, time increments,
+    * and step count information.
+    */
+   double d_initial_time;
+   double d_final_time;
+   double d_current_time;
+
+   double d_current_dt;
+   double d_old_dt;
+
+   int d_integrator_step;
+   int d_max_integrator_steps;
+
+   // The following are not implemented:
+   ImplicitIntegrator(
+      const ImplicitIntegrator&);
+   void
+   operator = (
+      const ImplicitIntegrator&);
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/algs/ImplicitIntegrator.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,2934 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=HyperbolicLevelIntegrator.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/HyperbolicLevelIntegrator.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/HyperbolicPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementLevelStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/OverlapConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	HyperbolicLevelIntegrator.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=HyperbolicPatchStrategy.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/HyperbolicPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	HyperbolicPatchStrategy.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=ImplicitEquationStrategy.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/ImplicitEquationStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	ImplicitEquationStrategy.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=ImplicitIntegrator.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/ImplicitEquationStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/ImplicitIntegrator.I			\
+	$(INCLUDE_SAM)/SAMRAI/algs/ImplicitIntegrator.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/NonlinearSolverStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h ImplicitIntegrator.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
+FILE_4=MblkPatchBoundaryNodeSum.o
+DEPENDS_4:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/MblkPatchBoundaryNodeSum.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/OuternodeSumTransactionFactory.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/CoarseFineBoundary.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDoubleConstantCoarsen.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	MblkPatchBoundaryNodeSum.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_4 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_4:X.o=${NDIM}.o}: ${DEPENDS_4}
+
+FILE_5=MethodOfLinesIntegrator.o
+DEPENDS_5:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/MethodOfLinesIntegrator.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/MethodOfLinesPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	MethodOfLinesIntegrator.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_5 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_5:X.o=${NDIM}.o}: ${DEPENDS_5}
+
+FILE_6=MethodOfLinesPatchStrategy.o
+DEPENDS_6:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/MethodOfLinesPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	MethodOfLinesPatchStrategy.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_6 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_6:X.o=${NDIM}.o}: ${DEPENDS_6}
+
+FILE_7=OuteredgeSumTransaction.o
+DEPENDS_7:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/OuteredgeSumTransaction.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	OuteredgeSumTransaction.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_7 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_7:X.o=${NDIM}.o}: ${DEPENDS_7}
+
+FILE_8=OuteredgeSumTransactionFactory.o
+DEPENDS_8:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/OuteredgeSumTransaction.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/OuteredgeSumTransactionFactory.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	OuteredgeSumTransactionFactory.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_8 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_8:X.o=${NDIM}.o}: ${DEPENDS_8}
+
+FILE_9=OuternodeSumTransaction.o
+DEPENDS_9:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/OuternodeSumTransaction.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	OuternodeSumTransaction.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_9 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_9:X.o=${NDIM}.o}: ${DEPENDS_9}
+
+FILE_10=OuternodeSumTransactionFactory.o
+DEPENDS_10:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/OuternodeSumTransaction.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/OuternodeSumTransactionFactory.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	OuternodeSumTransactionFactory.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_10 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_10:X.o=${NDIM}.o}: ${DEPENDS_10}
+
+FILE_11=PatchBoundaryEdgeSum.o
+DEPENDS_11:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/OuteredgeSumTransactionFactory.h	\
+	$(INCLUDE_SAM)/SAMRAI/algs/PatchBoundaryEdgeSum.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	PatchBoundaryEdgeSum.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_11 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_11:X.o=${NDIM}.o}: ${DEPENDS_11}
+
+FILE_12=PatchBoundaryNodeSum.o
+DEPENDS_12:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/OuternodeSumTransactionFactory.h	\
+	$(INCLUDE_SAM)/SAMRAI/algs/PatchBoundaryNodeSum.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/CoarseFineBoundary.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/OverlapConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDoubleConstantCoarsen.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	PatchBoundaryNodeSum.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_12 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_12:X.o=${NDIM}.o}: ${DEPENDS_12}
+
+FILE_13=TimeRefinementIntegrator.o
+DEPENDS_13:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementIntegrator.I		\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementIntegrator.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementLevelStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	TimeRefinementIntegrator.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_13 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_13:X.o=${NDIM}.o}: ${DEPENDS_13}
+
+FILE_14=TimeRefinementLevelStrategy.o
+DEPENDS_14:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementLevelStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	TimeRefinementLevelStrategy.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_14 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_14:X.o=${NDIM}.o}: ${DEPENDS_14}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,46 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   primary makefile for compiling the SAMRAI algs package 
+##
+#########################################################################
+
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/SAMRAI/algs
+VPATH         = @srcdir@
+OBJECT        = ../../..
+
+default: library
+
+include $(OBJECT)/config/Makefile.config
+
+SUBDIRS = fortran
+
+OBJS = 		\
+	TimeRefinementIntegrator.o \
+	TimeRefinementLevelStrategy.o \
+	HyperbolicPatchStrategy.o \
+	HyperbolicLevelIntegrator.o \
+	ImplicitEquationStrategy.o \
+	ImplicitIntegrator.o \
+	MethodOfLinesIntegrator.o \
+	MethodOfLinesPatchStrategy.o \
+	OuternodeSumTransaction.o \
+	OuternodeSumTransactionFactory.o \
+	PatchBoundaryNodeSum.o \
+	OuteredgeSumTransaction.o \
+	OuteredgeSumTransactionFactory.o \
+	PatchBoundaryEdgeSum.o
+
+library: $(OBJS)
+	for DIR in $(SUBDIRS); do if test -d $$DIR; then (cd $$DIR && $(MAKE) $@) ; fi || exit 1; done
+clean:
+	$(SAMCLEAN)
+	for DIR in $(SUBDIRS); do if test -d $$DIR; then (cd $$DIR && $(MAKE) $@) ; fi || exit 1; done
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/MblkPatchBoundaryNodeSum.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/MblkPatchBoundaryNodeSum.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,503 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Routines for summing node data at patch boundaries 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_MblkPatchBoundaryNodeSum_C
+#define included_algs_MblkPatchBoundaryNodeSum_C
+
+#include "SAMRAI/algs/MblkPatchBoundaryNodeSum.h"
+
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeDataFactory.h"
+#include "SAMRAI/pdat/NodeGeometry.h"
+#include "SAMRAI/pdat/OuternodeData.h"
+#include "SAMRAI/pdat/OuternodeDoubleConstantCoarsen.h"
+#include "SAMRAI/algs/OuternodeSumTransactionFactory.h"
+#include "SAMRAI/xfer/CoarsenAlgorithm.h"
+#include "SAMRAI/xfer/MultiblockRefineAlgorithm.h"
+#include "SAMRAI/xfer/RefineAlgorithm.h"
+#include "SAMRAI/xfer/RefinePatchStrategy.h"
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN 77 routines used to sum node and    *
+ * outernode data.                                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+namespace SAMRAI {
+namespace algs {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialize the static data members.                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int MblkPatchBoundaryNodeSum::s_instance_counter = 0;
+
+tbox::Array<tbox::Array<int> >
+MblkPatchBoundaryNodeSum::s_onode_src_id_array =
+   tbox::Array<tbox::Array<int> >(0);
+tbox::Array<tbox::Array<int> >
+MblkPatchBoundaryNodeSum::s_onode_dst_id_array =
+   tbox::Array<tbox::Array<int> >(0);
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor patch boundary node sum objects initializes data members  *
+ * to default (undefined) states.                                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+MblkPatchBoundaryNodeSum::MblkPatchBoundaryNodeSum(
+   const std::string& object_name,
+   tbox::Pointer<hier::MultiblockPatchHierarchy> hierarchy)
+{
+   TBOX_ASSERT(!object_name.empty());
+
+   d_object_name = object_name;
+   d_setup_called = false;
+
+   d_num_reg_sum = 0;
+
+   d_level.setNull();
+   d_hierarchy = hierarchy;
+   d_coarsest_level = -1;
+   d_finest_level = -1;
+
+   d_level_setup_called = false;
+   d_hierarchy_setup_called = false;
+
+   d_sum_transaction_factory = new algs::OuternodeSumTransactionFactory();
+
+   s_instance_counter++;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destructor removes temporary outernode patch data ids from            *
+ * variable database, if defined.                                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+MblkPatchBoundaryNodeSum::~MblkPatchBoundaryNodeSum()
+{
+
+   s_instance_counter--;
+   if (s_instance_counter == 0) {
+      const int arr_length_depth = s_onode_src_id_array.size();
+
+      for (int id = 0; id < arr_length_depth; id++) {
+         const int arr_length_nvar = s_onode_src_id_array[id].size();
+
+         for (int iv = 0; iv < arr_length_nvar; iv++) {
+
+            if (s_onode_src_id_array[id][iv] >= 0) {
+               hier::VariableDatabase::getDatabase()->
+               removeInternalSAMRAIVariablePatchDataIndex(
+                  s_onode_src_id_array[id][iv]);
+            }
+            if (s_onode_dst_id_array[id][iv] >= 0) {
+               hier::VariableDatabase::getDatabase()->
+               removeInternalSAMRAIVariablePatchDataIndex(
+                  s_onode_dst_id_array[id][iv]);
+            }
+
+            s_onode_src_id_array[id].resizeArray(0);
+            s_onode_dst_id_array[id].resizeArray(0);
+
+         }
+
+      }
+
+      s_onode_src_id_array.resizeArray(0);
+      s_onode_dst_id_array.resizeArray(0);
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register node patch data index for summation.                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkPatchBoundaryNodeSum::registerSum(
+   int node_data_id)
+{
+
+   if (d_setup_called) {
+      TBOX_ERROR("MblkPatchBoundaryNodeSum::register error..."
+         << "\nobject named " << d_object_name
+         << "\nCannot call registerSum with this MblkPatchBoundaryNodeSum"
+         << "\nobject since it has already been used to create communication"
+         << "\nschedules; i.e., setupSum() has been called."
+         << std::endl);
+   }
+
+   if (node_data_id < 0) {
+      TBOX_ERROR("MblkPatchBoundaryNodeSum register error..."
+         << "\nobject named " << d_object_name
+         << "\n node_data_id = " << node_data_id
+         << " is an invalid patch data identifier." << std::endl);
+   }
+
+   hier::VariableDatabase* var_db = hier::VariableDatabase::getDatabase();
+
+   tbox::Pointer<pdat::NodeDataFactory<double> > node_factory =
+      var_db->getPatchDescriptor()->getPatchDataFactory(node_data_id);
+
+   if (node_factory.isNull()) {
+
+      TBOX_ERROR("MblkPatchBoundaryNodeSum register error..."
+         << "\nobject named " << d_object_name
+         << "\n node_data_id = " << node_data_id
+         << " does not correspond to node data of type double." << std::endl);
+
+   } else {
+
+      static std::string tmp_onode_src_variable_name(
+         "MblkPatchBoundaryNodeSum__internal-onode-src");
+      static std::string tmp_onode_dst_variable_name(
+         "MblkPatchBoundaryNodeSum__internal-onode-dst");
+
+      const int reg_sum_id = d_num_reg_sum;
+
+      d_num_reg_sum++;
+
+      d_user_node_data_id.resizeArray(d_num_reg_sum);
+      d_user_node_data_id[reg_sum_id] = ID_UNDEFINED;
+      d_user_node_depth.resizeArray(d_num_reg_sum);
+      d_user_node_depth[reg_sum_id] = ID_UNDEFINED;
+      d_tmp_onode_src_variable.resizeArray(d_num_reg_sum);
+      d_tmp_onode_dst_variable.resizeArray(d_num_reg_sum);
+      d_onode_src_id.resizeArray(d_num_reg_sum);
+      d_onode_src_id[reg_sum_id] = ID_UNDEFINED;
+      d_onode_dst_id.resizeArray(d_num_reg_sum);
+      d_onode_dst_id[reg_sum_id] = ID_UNDEFINED;
+
+      const int data_depth = node_factory->getDefaultDepth();
+      const int array_by_depth_size = data_depth + 1;
+
+      if (d_num_registered_data_by_depth.size() < array_by_depth_size) {
+         const int old_size = d_num_registered_data_by_depth.size();
+         const int new_size = array_by_depth_size;
+
+         d_num_registered_data_by_depth.resizeArray(new_size);
+         for (int i = old_size; i < new_size; i++) {
+            d_num_registered_data_by_depth[i] = 0;
+         }
+      }
+
+      const int data_depth_id = d_num_registered_data_by_depth[data_depth];
+      const int num_data_at_depth = data_depth_id + 1;
+
+      if (s_onode_src_id_array.size() < array_by_depth_size) {
+         s_onode_src_id_array.resizeArray(array_by_depth_size);
+         s_onode_dst_id_array.resizeArray(array_by_depth_size);
+      }
+
+      if (s_onode_src_id_array[data_depth].size() < num_data_at_depth) {
+         const int old_size = s_onode_src_id_array[data_depth].size();
+         const int new_size = num_data_at_depth;
+
+         s_onode_src_id_array[data_depth].resizeArray(new_size);
+         s_onode_dst_id_array[data_depth].resizeArray(new_size);
+         for (int i = old_size; i < new_size; i++) {
+            s_onode_src_id_array[data_depth][i] = ID_UNDEFINED;
+            s_onode_dst_id_array[data_depth][i] = ID_UNDEFINED;
+         }
+      }
+
+      std::string var_suffix = tbox::Utilities::intToString(data_depth_id, 4)
+         + "__depth=" + tbox::Utilities::intToString(data_depth);
+
+      std::string tonode_src_var_name = tmp_onode_src_variable_name
+         + var_suffix;
+
+      d_tmp_onode_src_variable[reg_sum_id] = var_db->getVariable(
+            tonode_src_var_name);
+      if (d_tmp_onode_src_variable[reg_sum_id].isNull()) {
+         d_tmp_onode_src_variable[reg_sum_id] =
+            new pdat::OuternodeVariable<double>(tonode_src_var_name, data_depth);
+      }
+
+      std::string tonode_dst_var_name = tmp_onode_dst_variable_name
+         + var_suffix;
+      d_tmp_onode_dst_variable[reg_sum_id] = var_db->getVariable(
+            tonode_dst_var_name);
+      if (d_tmp_onode_dst_variable[reg_sum_id].isNull()) {
+         d_tmp_onode_dst_variable[reg_sum_id] =
+            new pdat::OuternodeVariable<double>(tonode_dst_var_name, data_depth);
+      }
+
+      if (s_onode_src_id_array[data_depth][data_depth_id] < 0) {
+         s_onode_src_id_array[data_depth][data_depth_id] =
+            var_db->registerInternalSAMRAIVariable(
+               d_tmp_onode_src_variable[reg_sum_id],
+               hier::IntVector(0));
+      }
+      if (s_onode_dst_id_array[data_depth][data_depth_id] < 0) {
+         s_onode_dst_id_array[data_depth][data_depth_id] =
+            var_db->registerInternalSAMRAIVariable(
+               d_tmp_onode_dst_variable[reg_sum_id],
+               hier::IntVector(0));
+      }
+
+      d_user_node_data_id[reg_sum_id] = node_data_id;
+      d_user_node_depth[reg_sum_id] = data_depth;
+
+      d_num_registered_data_by_depth[data_depth] = num_data_at_depth;
+
+      d_onode_src_id[reg_sum_id] =
+         s_onode_src_id_array[data_depth][data_depth_id];
+      d_onode_dst_id[reg_sum_id] =
+         s_onode_dst_id_array[data_depth][data_depth_id];
+
+      d_onode_src_data_set.setFlag(d_onode_src_id[reg_sum_id]);
+      d_onode_dst_data_set.setFlag(d_onode_dst_id[reg_sum_id]);
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set up schedule to sum node data around patch boundaries              *
+ * on a single level.                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkPatchBoundaryNodeSum::setupSum(
+   tbox::Pointer<hier::MultiblockPatchLevel> level)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!level.isNull());
+#endif
+
+   if (d_hierarchy_setup_called) {
+
+      TBOX_ERROR("MblkPatchBoundaryNodeSum::setupSum error...\n"
+         << " object named " << d_object_name
+         << " already initialized via setupSum() for hierarchy" << std::endl);
+
+   } else {
+
+      d_setup_called = true;
+      d_level_setup_called = true;
+
+      d_level = level;
+
+      d_single_level_sum_schedule.resizeArray(1);
+
+      // Communication algorithm for summing outernode values on a level
+      tbox::Pointer<xfer::RefineAlgorithm> single_level_sum_algorithm =
+         new xfer::RefineAlgorithm();
+
+      for (int i = 0; i < d_num_reg_sum; i++) {
+         single_level_sum_algorithm->registerRefine(
+            d_onode_dst_id[i],  // dst data
+            d_onode_src_id[i],  // src data
+            d_onode_dst_id[i],  // scratch data
+            (xfer::RefineOperator *)NULL);
+      }
+
+      xfer::MultiblockRefineAlgorithm mblk_sum_algorithm(
+         single_level_sum_algorithm, d_hierarchy);
+
+      d_single_level_sum_schedule[0] =
+         mblk_sum_algorithm.createSchedule(
+            d_level,
+            (xfer::MultiblockRefinePatchStrategy *)NULL,
+            d_sum_transaction_factory);
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Perform patch boundary node sum across single level or multiple       *
+ * hierarchy levels depending on how object was initialized.  In the     *
+ * single level case, values at shared nodes are summed.  In the         *
+ * multiple-level case, the algorithm involves the following steps:      *
+ *                                                                       *
+ *    1) Sum values at shared nodes on each level.                       *
+ *    2) Set node values at coarse-fine boundary on each finer level     *
+ *       to sum of fine level values and coarse level values at all      *
+ *       nodes that are shared between the coarse and fine level.        *
+ *                                                                       *
+ *       2a) Copy coarser level node values to finer level (outer)node   *
+ *           values at nodes on boundary of patches on a temporary       *
+ *           level that represents the finer level coarsened to the      *
+ *           index space of the coarser level.                           *
+ *       2b) Sum (outer)node values at patch boundaries on finer level   *
+ *           and (outer)node values at patch boundaries on coarsened     *
+ *           finer level and set values on finer level to sum.  Note     *
+ *           that the hanging nodes on the finer level may be treated    *
+ *           at this point if specified to do so by the user.            *
+ *                                                                       *
+ *    3) Inject (outer)node values around each finer level patch         *
+ *       boundary to corresponding node values on each coarser level.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkPatchBoundaryNodeSum::computeSum(
+   const bool fill_hanging_nodes) const
+{
+   NULL_USE(fill_hanging_nodes);
+
+   if (d_level_setup_called) {
+
+      d_level->allocatePatchData(d_onode_src_data_set);
+      d_level->allocatePatchData(d_onode_dst_data_set);
+
+      doLevelSum(d_level);
+
+      d_level->deallocatePatchData(d_onode_src_data_set);
+      d_level->deallocatePatchData(d_onode_dst_data_set);
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private member function that performs node sum across single level.   *
+ *                                                                       *
+ * 1. Copy node data to local outernode data.                            *
+ * 2. Transfer and sum outernode data.                                   *
+ * 3. Copy outernode data back to node data.                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkPatchBoundaryNodeSum::doLevelSum(
+   tbox::Pointer<hier::MultiblockPatchLevel> level) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!level.isNull());
+#endif
+
+   copyNodeToOuternodeOnLevel(level,
+      d_user_node_data_id,
+      d_onode_src_id);
+
+   int schedule_level_number = 0;
+   if (!d_level_setup_called) {
+      schedule_level_number =
+         tbox::MathUtilities<int>::Max(0, level->getLevelNumber());
+   }
+   d_single_level_sum_schedule[schedule_level_number]->fillData(0.0, false);
+
+   copyOuternodeToNodeOnLevel(level,
+      d_onode_dst_id,
+      d_user_node_data_id);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private member functions to copy between node and outernode data      *
+ * over an entire level.                                                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkPatchBoundaryNodeSum::copyNodeToOuternodeOnLevel(
+   tbox::Pointer<hier::MultiblockPatchLevel> level,
+   const tbox::Array<int>& node_data_id,
+   const tbox::Array<int>& onode_data_id) const
+{
+   TBOX_ASSERT(!level.isNull());
+   TBOX_ASSERT(node_data_id.size() == onode_data_id.size());
+
+   for (int bn = 0; bn < level->getNumberOfBlocks(); bn++) {
+      tbox::Pointer<hier::PatchLevel> patch_level =
+         level->getPatchLevelForBlock(bn);
+
+      if (!(patch_level.isNull())) {
+
+         for (hier::PatchLevel::Iterator ip(patch_level);
+              ip; ip++) {
+            tbox::Pointer<hier::Patch> patch =
+               patch_level->getPatch(ip());
+
+            for (int i = 0; i < node_data_id.size(); i++) {
+               tbox::Pointer<pdat::NodeData<double> > node_data =
+                  patch->getPatchData(node_data_id[i]);
+               tbox::Pointer<pdat::OuternodeData<double> > onode_data =
+                  patch->getPatchData(onode_data_id[i]);
+
+               onode_data->copy(*node_data);
+            }
+         }
+      }
+   }
+}
+
+void MblkPatchBoundaryNodeSum::copyOuternodeToNodeOnLevel(
+   tbox::Pointer<hier::MultiblockPatchLevel> level,
+   const tbox::Array<int>& onode_data_id,
+   const tbox::Array<int>& node_data_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!level.isNull());
+   TBOX_ASSERT(node_data_id.size() == onode_data_id.size());
+#endif
+
+   for (int bn = 0; bn < level->getNumberOfBlocks(); bn++) {
+      tbox::Pointer<hier::PatchLevel> patch_level =
+         level->getPatchLevelForBlock(bn);
+
+      if (!(patch_level.isNull())) {
+
+         for (hier::PatchLevel::Iterator ip(patch_level);
+              ip; ip++) {
+            tbox::Pointer<hier::Patch> patch =
+               patch_level->getPatch(ip());
+
+            for (int i = 0; i < node_data_id.size(); i++) {
+               tbox::Pointer<pdat::OuternodeData<double> > onode_data =
+                  patch->getPatchData(onode_data_id[i]);
+               tbox::Pointer<pdat::NodeData<double> > node_data =
+                  patch->getPatchData(node_data_id[i]);
+
+               onode_data->copy2(*node_data);
+            }
+         }
+      }
+   }
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/MblkPatchBoundaryNodeSum.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/MblkPatchBoundaryNodeSum.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,242 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Routines for summing node data at patch boundaries 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_MblkPatchBoundaryNodeSum
+#define included_algs_MblkPatchBoundaryNodeSum
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/ComponentSelector.h"
+#include "SAMRAI/hier/CoarseFineBoundary.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/MultiblockPatchHierarchy.h"
+#include "SAMRAI/hier/MultiblockPatchLevel.h"
+#include "SAMRAI/xfer/MultiblockRefineSchedule.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "SAMRAI/pdat/OuternodeVariable.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/xfer/CoarsenSchedule.h"
+#include "SAMRAI/xfer/RefineSchedule.h"
+#include "SAMRAI/xfer/RefineTransactionFactory.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace algs {
+
+/*!
+ *  @brief Class MblkPatchBoundaryNodeSum provides operations for summing node data
+ *  values at nodes that are shared by multiple patches on a single level or across
+ *  multiple hierarchy levels.
+ *
+ *  Usage of a patch boundry node sum involves the following sequence of steps:
+ *
+ *  -# Construct a patch boundry node sum object.  For example,
+ *     \verbatim
+ *         MblkPatchBoundaryNodeSum my_node_sum("My Node Sum");
+ *     \endverbatim
+ *  -# Register node data quantities to sum.  For example,
+ *     \verbatim
+ *         my_node_sum.registerSum(node_data_id1);
+ *         my_node_sum.registerSum(node_data_id2);
+ *         etc...
+ *     \endverbatim
+ *  -# Setup the sum operations for either single level or a range of levels
+ *     in a patch hierarchy.  For example,
+ *     \verbatim
+ *         my_node_sum.setupSum(level);    // single level
+ *         -- or --
+ *         my_node_sum.setupSum(hierarchy, coarsest_ln, finest_ln);  // multiple levels
+ *     \endverbatim
+ *  -# Execute the sum operation.  For example,
+ *     \verbatim
+ *         my_node_sum.computeSum()
+ *     \endverbatim
+ *
+ *  The result of these operations is that each node patch data value associated
+ *  with the registered ids at patch boundaries, on either the single level or
+ *  range of hierarchy levels, is replaced by the sum of all data values at the node.
+ *
+ *  Note that only one of the setupSum() functions may be called once a
+ *  MblkPatchBoundaryNodeSum object is created.
+ */
+
+class MblkPatchBoundaryNodeSum
+{
+public:
+   /*!
+    *  @brief Constructor initializes object to default (mostly undefined)
+    *  state.
+    *
+    *  @param object_name const std::string reference for name of object used
+    *  in error reporting.  When assertion checking is on, the string
+    *  cannot be empty.
+    *  @param hierarchy the hierarchy.
+    */
+   MblkPatchBoundaryNodeSum(
+      const std::string& object_name,
+      tbox::Pointer<hier::MultiblockPatchHierarchy> hierarchy);
+
+   /*!
+    *  @brief Destructor for the schedule releases all internal storage.
+    */
+   ~MblkPatchBoundaryNodeSum();
+
+   /*!
+    *  @brief Register node data with given patch data identifier for summing.
+    *
+    *  @param node_data_id  integer patch data index for node data to sum
+    *
+    *  The node data id must be a valid patch data id (>=0) and must
+    *  correspond to node-centered double data.  If not, an error will result.
+    */
+   void
+   registerSum(
+      int node_data_id);
+
+   /*!
+    *  @brief Set up summation operations for node data across shared nodes
+    *         on a single level.
+    *
+    *  If the other setupSum() function for a range of hierarchy levels has
+    *  been called previously for this object, an error will result.
+    *
+    *  @param level         pointer to level on which to perform node sum
+    *
+    *  When assertion checking is active, the level pointer cannot be null.
+    */
+   void
+   setupSum(
+      tbox::Pointer<hier::MultiblockPatchLevel> level);
+
+   /*!
+    *  @brief Compute sum of node values at each shared node and replace
+    *         each such node value with the corresponding sum.
+    *
+    *  At the end of this method, all values at shared node locations on
+    *  patch boundaries (on levels indicated by the call to one of the
+    *  setupSum() routines) will have the same value.
+    *
+    *  When the setupSum() method taking a range of patch levels in a
+    *  hierarchy is called, this method will compute the sum of nodal
+    *  quantities at all the specified patch boundaries.  For nodes at a
+    *  coarse-fine boundary, nodal sums will only be performed where the
+    *  coarse and fine nodes overlap.  A node on a fine level that is not
+    *  also a node on the next coarser level (a so-called "hanging node")
+    *  will not be summed.
+    *
+    *  The boolean "fill_hanging_nodes" argument specifies whether the
+    *  the hanging nodes should be filled using linearly interpolated values
+    *  from neighboring non-hanging nodes (i.e. those that overlap nodes on
+    *  a coarse level). The correct steps required to deal with hanging
+    *  nodes is algorithm dependent so, if left unspecified, values at the
+    *  hanging nodes will not be adjusted.  However, because many algorithms
+    *  average hanging nodes we provide the capability to do it here.  Note that
+    *  the hanging node interpolation provided does not take into consideration
+    *  the spatial location of the nodes.  So the interpolation may not be
+    *  correct for coordinate systems other than standard Cartesian grid geometry.
+    *
+    *  @param fill_hanging_nodes Optional boolean value specifying whether hanging
+    *         node values should be set to values interpolated from neighboring
+    *         non-hanging node values.  The default is false.
+    */
+   void
+   computeSum(
+      const bool fill_hanging_nodes = false) const;
+
+private:
+   /*
+    * Private member function to perform node sum across single level --
+    * called from computeSum().
+    */
+   void
+   doLevelSum(
+      tbox::Pointer<hier::MultiblockPatchLevel> level) const;
+
+   /*
+    * Private member function to copy node data to outernode data
+    * on all patches on a level.
+    */
+   void
+   copyNodeToOuternodeOnLevel(
+      tbox::Pointer<hier::MultiblockPatchLevel> level,
+      const tbox::Array<int>& node_data_id,
+      const tbox::Array<int>& onode_data_id) const;
+
+   /*
+    * Private member function to copy outernode data to node data
+    * on all patches on a level.
+    */
+   void
+   copyOuternodeToNodeOnLevel(
+      tbox::Pointer<hier::MultiblockPatchLevel> level,
+      const tbox::Array<int>& onode_data_id,
+      const tbox::Array<int>& node_data_id) const;
+
+   /*
+    * Static members for managing shared temporary data among multiple
+    * MblkPatchBoundaryNodeSum objects.
+    */
+   static int s_instance_counter;
+   // These arrays are indexed [data depth][number of variables with depth]
+   static tbox::Array<tbox::Array<int> > s_onode_src_id_array;
+   static tbox::Array<tbox::Array<int> > s_onode_dst_id_array;
+
+   enum PATCH_BDRY_NODE_SUM_DATA_ID { ID_UNDEFINED = -1 };
+
+   std::string d_object_name;
+   bool d_setup_called;
+
+   int d_num_reg_sum;
+
+   // These arrays are indexed [variable registration sequence number]
+   tbox::Array<int> d_user_node_data_id;
+   tbox::Array<int> d_user_node_depth;
+
+   // These arrays are indexed [data depth]
+   tbox::Array<int> d_num_registered_data_by_depth;
+
+   /*
+    * Node-centered variables and patch data indices used as internal work quantities.
+    */
+   // These arrays are indexed [variable registration sequence number]
+   tbox::Array<tbox::Pointer<hier::Variable> > d_tmp_onode_src_variable;
+   tbox::Array<tbox::Pointer<hier::Variable> > d_tmp_onode_dst_variable;
+
+   // These arrays are indexed [variable registration sequence number]
+   tbox::Array<int> d_onode_src_id;
+   tbox::Array<int> d_onode_dst_id;
+
+   /*
+    * Sets of indices for temporary variables to expedite allocation/deallocation.
+    */
+   hier::ComponentSelector d_onode_src_data_set;
+   hier::ComponentSelector d_onode_dst_data_set;
+
+   tbox::Pointer<hier::MultiblockPatchLevel> d_level;
+
+   tbox::Pointer<hier::MultiblockPatchHierarchy> d_hierarchy;
+   int d_coarsest_level;
+   int d_finest_level;
+
+   bool d_level_setup_called;
+   bool d_hierarchy_setup_called;
+
+   tbox::Pointer<xfer::RefineTransactionFactory> d_sum_transaction_factory;
+
+   tbox::Array<tbox::Pointer<xfer::MultiblockRefineSchedule> >
+   d_single_level_sum_schedule;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/MethodOfLinesIntegrator.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/MethodOfLinesIntegrator.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,921 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Basic method-of-lines time integration algorithm 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_MethodOfLinesIntegrator_C
+#define included_algs_MethodOfLinesIntegrator_C
+
+#include "SAMRAI/algs/MethodOfLinesIntegrator.h"
+
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#include <cstdlib>
+#include <fstream>
+
+#define ALGS_METHOD_OF_LINES_INTEGRATOR_VERSION (2)
+
+namespace SAMRAI {
+namespace algs {
+
+/*
+ *************************************************************************
+ *									*
+ * The constructor and destructor for MethodOfLinesIntegrator.     *
+ *									*
+ *************************************************************************
+ */
+
+MethodOfLinesIntegrator::MethodOfLinesIntegrator(
+   const std::string& object_name,
+   tbox::Pointer<tbox::Database> input_db,
+   MethodOfLinesPatchStrategy* patch_strategy,
+   bool register_for_restart)
+{
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!input_db.isNull());
+   TBOX_ASSERT(patch_strategy != ((MethodOfLinesPatchStrategy *)NULL));
+
+   const tbox::Dimension dim(patch_strategy->getDim());
+
+   d_object_name = object_name;
+   d_registered_for_restart = register_for_restart;
+
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->
+      registerRestartItem(d_object_name, this);
+   }
+
+   d_patch_strategy = patch_strategy;
+
+   /*
+    * Communication algorithms.
+    */
+   d_bdry_fill_advance = new xfer::RefineAlgorithm(dim);
+   d_fill_after_regrid = new xfer::RefineAlgorithm(dim);
+   d_fill_before_tagging = new xfer::RefineAlgorithm(dim);
+   d_coarsen_algorithm = new xfer::CoarsenAlgorithm(dim);
+
+   /*
+    * hier::Variable contexts used in algorithm.
+    */
+   d_current = hier::VariableDatabase::getDatabase()->getContext("CURRENT");
+   d_scratch = hier::VariableDatabase::getDatabase()->getContext("SCRATCH");
+   d_patch_strategy->setInteriorContext(d_current);
+   d_patch_strategy->setInteriorWithGhostsContext(d_scratch);
+
+   /*
+    * Set default to third-order SSP Runge-Kutta method.
+    */
+   d_order = 3;
+   d_alpha_1.resizeArray(d_order);
+   d_alpha_1[0] = 1.0;
+   d_alpha_1[1] = 0.75;
+   d_alpha_1[2] = 1.0 / 3.0;
+   d_alpha_2.resizeArray(d_order);
+   d_alpha_2[0] = 0.0;
+   d_alpha_2[1] = 0.25;
+   d_alpha_2[2] = 2.0 / 3.0;
+   d_beta.resizeArray(d_order);
+   d_beta[0] = 1.0;
+   d_beta[1] = 0.25;
+   d_beta[2] = 2.0 / 3.0;
+
+   /*
+    * Initialize object with data read from input and restart databases.
+    */
+   bool is_from_restart = tbox::RestartManager::getManager()->isFromRestart();
+   if (is_from_restart && d_registered_for_restart) {
+      getFromRestart();
+   }
+
+   getFromInput(input_db, is_from_restart);
+
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Destructor tells tbox::RestartManager to remove this object from the   *
+ * list of restart items.                                                *
+ *									*
+ *************************************************************************
+ */
+
+MethodOfLinesIntegrator::~MethodOfLinesIntegrator()
+{
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->unregisterRestartItem(d_object_name);
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ *
+ * Initialize integrator by:
+ *
+ *
+ *
+ *   (1) Setting the number of time data levels based on needs of
+ *
+ *       the gridding algorithm
+ *
+ *   (2) Invoking variable registration in patch strategy.
+ *
+ *
+ *
+ *************************************************************************
+ */
+
+void MethodOfLinesIntegrator::initializeIntegrator(
+   tbox::Pointer<mesh::GriddingAlgorithm> gridding_alg)
+{
+   NULL_USE(gridding_alg);
+   TBOX_ASSERT(!gridding_alg.isNull());
+
+   /*
+    * We may eventually need support for three (or more) time
+    * levels, information which may be accessed from the
+    * gridding algorithm.  Since we don't yet support this,
+    * this method simply registers variables with the integrator.
+    */
+
+   /*
+    * Call variable registration in patch strategy.
+    */
+   d_patch_strategy->registerModelVariables(this);
+}
+/*
+ *************************************************************************
+ *									*
+ * Calculate the stable time increment by taking the minimum over        *
+ * all patches on all levels in the hierarchy.                           *
+ *									*
+ *************************************************************************
+ */
+
+double MethodOfLinesIntegrator::getTimestep(
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const double time) const
+{
+   TBOX_ASSERT(!(hierarchy.isNull()));
+
+   double dt = tbox::MathUtilities<double>::getMax();
+   const int nlevels = hierarchy->getNumberOfLevels();
+
+   for (int l = 0; l < nlevels; l++) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->
+         getPatchLevel(l);
+
+      TBOX_ASSERT(!(level.isNull()));
+
+      for (hier::PatchLevel::Iterator p(level); p; p++) {
+
+         tbox::Pointer<hier::Patch> patch = *p;
+
+         const double dt_patch = d_patch_strategy->
+            computeStableDtOnPatch(*patch,
+               time);
+         if (dt_patch < dt) dt = dt_patch;
+      }
+   }
+
+   const tbox::SAMRAI_MPI& mpi(hierarchy->getDomainMappedBoxLevel().getMPI());
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&dt, 1, MPI_MIN);
+   }
+
+   return dt;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Advance the solution through the specified time increment using the   *
+ * general RK algorithm.  Each of the following steps is performed over  *
+ * all hierarchy levels.                                                 *
+ *                                                                       *
+ * (1) Copy solution values from current context to scratch context.     *
+ *                                                                       *
+ * (2) RK multistep loop for d(U)/dt = F(U):                             *
+ *                                                                       *
+ *    do i = 1, order                                                    *
+ *       U_i = U_n + alpha_i * dt/(order) * F(U_i)                       *
+ *    end do                                                             *
+ *                                                                       *
+ * (3) Copy last update of scratch solution to current context.          *
+ *                                                                       *
+ * Note that each update is performed by the concrete patch strategy     *
+ * in which the numerical routines are defined.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MethodOfLinesIntegrator::advanceHierarchy(
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const double time,
+   const double dt)
+{
+   TBOX_ASSERT(!(hierarchy.isNull()));
+
+   /*
+    * Stamp data on all levels to current simulation time.
+    */
+   const int nlevels = hierarchy->getNumberOfLevels();
+
+   for (int ln = 0; ln < nlevels; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+
+      TBOX_ASSERT(!(level.isNull()));
+
+      level->setTime(time, d_current_data);
+      level->setTime(time, d_scratch_data);
+      level->setTime(time, d_rhs_data);
+
+      /*
+       * Allocate memory for U_scratch and rhs data
+       */
+      level->allocatePatchData(d_scratch_data, time);
+      level->allocatePatchData(d_rhs_data, time);
+
+      copyCurrentToScratch(level);
+   }
+
+   /*
+    * Loop through Runge-Kutta steps
+    */
+   for (int rkstep = 0; rkstep < d_order; rkstep++) {
+
+      /*
+       * Loop through levels in the patch hierarchy and advance data on
+       * each level by a single RK step.
+       */
+      for (int ln = 0; ln < nlevels; ln++) {
+
+         /*
+          * Fill ghost cells of all patches in level
+          */
+         d_bdry_sched_advance[ln]->fillData(time);
+
+         /*
+          * Loop through patches in current level and "singleStep" on each
+          * patch.
+          */
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+
+         TBOX_ASSERT(!(level.isNull()));
+
+         for (hier::PatchLevel::Iterator p(level); p; p++) {
+
+            tbox::Pointer<hier::Patch> patch = *p;
+            d_patch_strategy->singleStep(*patch,
+               dt,
+               d_alpha_1[rkstep],
+               d_alpha_2[rkstep],
+               d_beta[rkstep]);
+
+         }  // patch loop
+
+         if (ln > 0) {
+            d_coarsen_schedule[ln]->coarsenData();
+         }
+
+      }  // levels loop
+
+   }  // rksteps loop
+
+   for (int ln = 0; ln < nlevels; ln++) {
+      copyScratchToCurrent(hierarchy->getPatchLevel(ln));
+
+      /*
+       * update timestamp to time after advance
+       */
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+      level->setTime(time + dt, d_current_data);
+   }
+
+   /*
+    * dallocate U_scratch and rhs data
+    */
+   for (int ln = 0; ln < nlevels; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+      level->deallocatePatchData(d_scratch_data);
+      level->deallocatePatchData(d_rhs_data);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register the variables with the method of lines solution algorithm    *
+ * according to specified algorithm role (i.e., MOL_VAR_TYPE).           *
+ *                                                                       *
+ *       du/dt = F(u)                                                    *
+ *           u  - defined as "solution"                                  *
+ *         F(u) - defined as "right-hand-side"                           *
+ *                                                                       *
+ * Assignment of descriptor indices to variable lists, component         *
+ * selectors, and communication  algorithms takes place here.            *
+ *                                                                       *
+ * The different cases are:                                              *
+ *                                                                       *
+ * SOLN:                                                                 *
+ *            One time level of data is maintained for the current       *
+ *            solution and a "scratch" copy is used during the update    *
+ *            process.                                                   *
+ *                                                                       *
+ *            Two factories are needed: SCRATCH, CURRENT.                *
+ *                                                                       *
+ *            SCRATCH index is added to d_scratch_data.                  *
+ *            CURRENT index is added to d_current_data.                  *
+ *                                                                       *
+ * RHS:                                                                  *
+ *            Only one time level of data is stored and no scratch space *
+ *            is used.  Data may be set and manipulated at will in user  *
+ *            routines.  Data (including ghost values) is never touched  *
+ *            outside of user routines.                                  *
+ *                                                                       *
+ *            One factory needed: CURRENT.                               *
+ *                                                                       *
+ *            CURRENT index is added to d_current_data.                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MethodOfLinesIntegrator::registerVariable(
+   const tbox::Pointer<hier::Variable> variable,
+   const hier::IntVector& ghosts,
+   const MOL_VAR_TYPE m_v_type,
+   const tbox::Pointer<xfer::Geometry>& transfer_geom,
+   const std::string& coarsen_name,
+   const std::string& refine_name)
+{
+   TBOX_ASSERT(!(variable.isNull()));
+   TBOX_ASSERT(!(transfer_geom.isNull()));
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*variable, ghosts);
+
+   tbox::Dimension dim(ghosts.getDim());
+
+   hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+
+   switch (m_v_type) {
+
+      case SOLN: {
+         /*
+          * Associate the current and scratch contexts with the variable in the
+          * database and get the patch data identifiers.  The flag arrays will
+          * be used to manage the allocation and deallocation of current and
+          * scratch data.
+          */
+         d_soln_variables.appendItem(variable);
+
+         const hier::IntVector no_ghosts(dim, 0);
+
+         const int current = variable_db->registerVariableAndContext(variable,
+               d_current,
+               no_ghosts);
+
+         const int scratch = variable_db->registerVariableAndContext(variable,
+               d_scratch,
+               ghosts);
+
+         d_current_data.setFlag(current);
+
+         d_scratch_data.setFlag(scratch);
+
+         /*
+          * Register variable and context needed for restart.
+          */
+         hier::VariableDatabase::getDatabase()->
+         registerPatchDataForRestart(current);
+
+         /*
+          * Ask the geometry for the appropriate refinement operator and register
+          * that operator and the variables with the communication algorithms.
+          * Two different communication algorithms are required by the RK method.
+          * The Fillghosts algorithm is called during the normal Runge-Kutta time
+          * stepping and fills the ghost cells of the scratch variables.  The regrid
+          * algorithm is called after regrid and fills the current data on the new
+          * level.
+          */
+
+         tbox::Pointer<xfer::RefineOperator> refine_operator =
+            transfer_geom->lookupRefineOperator(variable, refine_name);
+
+         //  Fill ghosts for a variable using always the "scratch" context
+         d_bdry_fill_advance->registerRefine(
+            scratch,    // destination
+            scratch,    // source
+            scratch,    // temporary work space
+            refine_operator);
+
+         //  After regrid, use "current" context to communicate information
+         //  to updated patches.  Use "scratch" as the temporary storage.
+         d_fill_after_regrid->registerRefine(
+            current,    // destination
+            current,    // source
+            scratch,    // temporary work space
+            refine_operator);
+
+         //  Before tagging error cells, copy data in current context to
+         //  scratch context.  Note that this operation is not a simple
+         //  copy - it also requires filling of ghost cells.  This is why
+         //  it is designated as a refine operation.
+         d_fill_before_tagging->registerRefine(
+            scratch,    // destination
+            current,    // source
+            scratch,    // temporary work space
+            refine_operator);
+
+         tbox::Pointer<xfer::CoarsenOperator> coarsen_operator =
+            transfer_geom->lookupCoarsenOperator(variable, coarsen_name);
+
+         //  Coarsen solution between levels during RK process so that
+         //  coarser levels see the fine solution during integration.
+         d_coarsen_algorithm->registerCoarsen(scratch,
+            scratch,
+            coarsen_operator);
+
+         break;
+      }
+
+      case RHS: {
+         /*
+          * Associate the current context with the RHS variable in the
+          * database.  The d_rhs_data component selector will be used to allocate and
+          * de-allocate rhs data.
+          * NOTE:  The d_rhs_data component selector was added 3/23/00 to facilitate
+          * allocation and de-allocation of rhs data for restarts.
+          */
+         d_rhs_variables.appendItem(variable);
+
+         const int current = variable_db->registerVariableAndContext(variable,
+               d_current,
+               ghosts);
+
+         d_rhs_data.setFlag(current);
+
+         break;
+      }
+
+      default: {
+
+         TBOX_ERROR(d_object_name << ":  "
+                                  << "unknown MOL_VAR_TYPE = " << m_v_type);
+
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Allocate data for new level in hierarchy and initialize that data.    *
+ * If the new level replaces a pre-existing level in the hierarchy,      *
+ * data is copied from that level to the new level on their intersection.*
+ * Other data on the new level is set by interpolating from coarser      *
+ * levels in the hierarchy.  Then, user-defined initialization routines  *
+ * are called.                                                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MethodOfLinesIntegrator::initializeLevelData(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const double time,
+   const bool can_be_refined,
+   const bool initial_time,
+   const tbox::Pointer<hier::BasePatchLevel> old_level,
+   const bool allocate_data)
+{
+   NULL_USE(can_be_refined);
+   NULL_USE(allocate_data);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(hierarchy.isNull()));
+   TBOX_ASSERT(!(hierarchy->getPatchLevel(level_number).isNull()));
+   TBOX_ASSERT(level_number >= 0);
+   if (!(old_level.isNull())) {
+      TBOX_ASSERT(level_number == old_level->getLevelNumber());
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*hierarchy, *old_level);
+   }
+#endif
+
+   tbox::Pointer<hier::PatchLevel> level =
+      hierarchy->getPatchLevel(level_number);
+
+   /*
+    * Allocate storage needed to initialize level and fill data from
+    * coarser levels in AMR hierarchy.
+    */
+   level->allocatePatchData(d_current_data, time);
+   level->allocatePatchData(d_scratch_data, time);
+
+   if ((level_number > 0) || !old_level.isNull()) {
+      const tbox::Pointer<hier::PatchHierarchy> patch_hierarchy = hierarchy;
+      d_fill_after_regrid->createSchedule(
+         level,
+         old_level,
+         level_number - 1,
+         hierarchy,
+         d_patch_strategy)->fillData(time);
+   }
+
+   level->deallocatePatchData(d_scratch_data);
+
+   /*
+    * Initialize current data for new level.
+    */
+   for (hier::PatchLevel::Iterator p(level); p; p++) {
+      tbox::Pointer<hier::Patch> patch = *p;
+
+      d_patch_strategy->initializeDataOnPatch(*patch,
+         time,
+         initial_time);
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Re-generate communication schedule after changes to the specified     *
+ * range of levels in the hierarchy.                                     *
+ *									*
+ *************************************************************************
+ */
+void MethodOfLinesIntegrator::resetHierarchyConfiguration(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level)
+{
+   NULL_USE(finest_level);
+
+   TBOX_ASSERT(!(hierarchy.isNull()));
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (coarsest_level <= finest_level)
+      && (finest_level <= hierarchy->getFinestLevelNumber()));
+
+   int finest_hiera_level = hierarchy->getFinestLevelNumber();
+
+   const tbox::Pointer<hier::PatchHierarchy> patch_hierarchy = hierarchy;
+
+   //  If we have added or removed a level, resize the schedule arrays
+   d_bdry_sched_advance.resizeArray(finest_hiera_level + 1);
+   d_coarsen_schedule.resizeArray(finest_hiera_level + 1);
+
+   //  Build coarsen and refine communication schedules.
+   for (int ln = coarsest_level; ln <= finest_hiera_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+
+      TBOX_ASSERT(!(level.isNull()));
+
+      d_bdry_sched_advance[ln] =
+         d_bdry_fill_advance->createSchedule(
+            level,
+            ln - 1,
+            hierarchy,
+            d_patch_strategy);
+
+      // coarsen schedule only for levels > 0
+      if (ln > 0) {
+         tbox::Pointer<hier::PatchLevel> coarser_level =
+            hierarchy->getPatchLevel(ln - 1);
+         d_coarsen_schedule[ln] =
+            d_coarsen_algorithm->createSchedule(
+               coarser_level,
+               level,
+               NULL);
+      }
+
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Fill ghost cells for patches on level and call application-specific   *
+ * cell tagging routines.                                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MethodOfLinesIntegrator::applyGradientDetector(
+   tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int ln,
+   const double time,
+   const int tag_index,
+   const bool initial_time,
+   const bool uses_richardson_extrapolation_too)
+{
+   TBOX_ASSERT(!(hierarchy.isNull()));
+   TBOX_ASSERT(!(hierarchy->getPatchLevel(ln).isNull()));
+
+   tbox::Pointer<hier::PatchLevel> level =
+      hierarchy->getPatchLevel(ln);
+
+   level->allocatePatchData(d_scratch_data, time);
+
+   /*
+    * Transfer information from the "current" context to the "scratch"
+    * context, on the current level. Note that ghosts will be filled
+    * in this process.  We create and apply the schedule at the same
+    * time because this routine is only called during
+    * a regrid step, and the changing grid system means the schedule will
+    * change since the last time it was called.
+    */
+   const tbox::Pointer<hier::PatchHierarchy> patch_hierarchy = hierarchy;
+   d_fill_before_tagging->createSchedule(level,
+      level,
+      ln - 1,
+      hierarchy,
+      d_patch_strategy)->fillData(time);
+
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      d_patch_strategy->
+      tagGradientDetectorCells(*patch,
+         time,
+         initial_time,
+         tag_index,
+         uses_richardson_extrapolation_too);
+   }
+
+   level->deallocatePatchData(d_scratch_data);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Writes the class version number, order, and				*
+ * alpha array to the database.						*
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MethodOfLinesIntegrator::putToDatabase(
+   tbox::Pointer<tbox::Database> db)
+{
+   TBOX_ASSERT(!db.isNull());
+
+   db->putInteger("ALGS_METHOD_OF_LINES_INTEGRATOR_VERSION",
+      ALGS_METHOD_OF_LINES_INTEGRATOR_VERSION);
+
+   db->putInteger("d_order", d_order);
+   db->putDoubleArray("d_alpha_1", d_alpha_1);
+   db->putDoubleArray("d_alpha_2", d_alpha_2);
+   db->putDoubleArray("d_beta", d_beta);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Reads in paramemters from the database overriding any values		*
+ * read in from the restart database. Also checks to make sure that	*
+ * number of alpha values specified equals order of Runga-Kutta scheme.	*
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MethodOfLinesIntegrator::getFromInput(
+   tbox::Pointer<tbox::Database> input_db,
+   bool is_from_restart)
+{
+   TBOX_ASSERT(!input_db.isNull());
+
+   if (is_from_restart) {
+
+      if (input_db->keyExists("order")) {
+         d_order = input_db->getInteger("order");
+         if (d_order < 0) {
+            TBOX_ERROR(
+               d_object_name << ":  "
+               <<
+               "Negative `order' value specified in input.");
+         }
+
+      }
+
+   } else {
+
+      d_order = input_db->getIntegerWithDefault("order", d_order);
+
+      if (input_db->keyExists("alpha_1")) {
+         d_alpha_1 = input_db->getDoubleArray("alpha_1");
+      } else {
+         TBOX_WARNING(
+            d_object_name << ":  "
+            <<
+            "Key data `alpha_1' not found in input.  "
+            <<
+            "Using default values.  See class header.");
+      }
+
+      if (input_db->keyExists("alpha_2")) {
+         d_alpha_2 = input_db->getDoubleArray("alpha_2");
+      } else {
+         TBOX_WARNING(
+            d_object_name << ":  "
+            <<
+            "Key data `alpha_2' not found in input.  "
+            <<
+            "Using default values.  See class header.");
+      }
+
+      if (input_db->keyExists("beta")) {
+         d_beta = input_db->getDoubleArray("beta");
+      } else {
+         TBOX_WARNING(
+            d_object_name << ":  "
+            << "Key data `beta' not found in input.  "
+            <<
+            "Using default values.  See class header.");
+      }
+
+   }
+
+   if (d_alpha_1.getSize() != d_alpha_2.getSize() ||
+       d_alpha_2.getSize() != d_beta.getSize()) {
+      TBOX_ERROR(
+         d_object_name << ":  "
+         <<
+         "The number of alpha_1, alpha_2, and beta values "
+         << "specified in input is not consistent");
+   }
+
+   if (d_alpha_1.getSize() != d_order) {
+      TBOX_WARNING(
+         d_object_name << ":  "
+         <<
+         "The number of alpha values specified in input "
+         << "does not equal the Runga-Kutta order");
+      d_order = d_alpha_1.getSize();
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Checks that class and restart file version numbers are equal.  If so, *
+ * reads in d_order and d_alpha from the database.  Also, does a        *
+ * consistency check to make sure that the number of alpha values       *
+ * specified equals the order of the Runga-Kutta scheme.			*
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MethodOfLinesIntegrator::getFromRestart()
+{
+
+   tbox::Pointer<tbox::Database> root_db =
+      tbox::RestartManager::getManager()->getRootDatabase();
+
+   tbox::Pointer<tbox::Database> restart_db;
+   if (root_db->isDatabase(d_object_name)) {
+      restart_db = root_db->getDatabase(d_object_name);
+   } else {
+      TBOX_ERROR("Restart database corresponding to "
+         << d_object_name << " not found in restart file.");
+   }
+
+   int ver = restart_db->getInteger("ALGS_METHOD_OF_LINES_INTEGRATOR_VERSION");
+   if (ver != ALGS_METHOD_OF_LINES_INTEGRATOR_VERSION) {
+      TBOX_ERROR(
+         d_object_name << ":  "
+         <<
+         "Restart file version different than class version.");
+   }
+
+   d_order = restart_db->getInteger("d_order");
+   d_alpha_1 = restart_db->getDoubleArray("d_alpha_1");
+   d_alpha_2 = restart_db->getDoubleArray("d_alpha_2");
+   d_beta = restart_db->getDoubleArray("d_beta");
+
+   if (d_alpha_1.getSize() != d_order) {
+      TBOX_ERROR(
+         d_object_name << ":  "
+         <<
+         "The number of alpha values read from restart "
+         << "does not equal the Runga-Kutta order");
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Copy all solution data from current context to scratch context.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MethodOfLinesIntegrator::copyCurrentToScratch(
+   const tbox::Pointer<hier::PatchLevel> level) const
+{
+   TBOX_ASSERT(!(level.isNull()));
+
+   for (hier::PatchLevel::Iterator p(level); p; p++) {
+      tbox::Pointer<hier::Patch> patch = *p;
+
+      tbox::List<tbox::Pointer<hier::Variable> >::Iterator
+      soln_var = d_soln_variables.listStart();
+      while (soln_var) {
+
+         tbox::Pointer<hier::PatchData> src_data =
+            patch->getPatchData(soln_var(), d_current);
+
+         tbox::Pointer<hier::PatchData> dst_data =
+            patch->getPatchData(soln_var(), d_scratch);
+
+         dst_data->copy(*src_data);
+         soln_var++;
+
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Copy all solution data from scratch context to current context.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MethodOfLinesIntegrator::copyScratchToCurrent(
+   const tbox::Pointer<hier::PatchLevel> level) const
+{
+   TBOX_ASSERT(!(level.isNull()));
+
+   for (hier::PatchLevel::Iterator p(level); p; p++) {
+      tbox::Pointer<hier::Patch> patch = *p;
+
+      tbox::List<tbox::Pointer<hier::Variable> >::Iterator
+      soln_var = d_soln_variables.listStart();
+      while (soln_var) {
+
+         tbox::Pointer<hier::PatchData> src_data =
+            patch->getPatchData(soln_var(), d_scratch);
+
+         tbox::Pointer<hier::PatchData> dst_data =
+            patch->getPatchData(soln_var(), d_current);
+
+         dst_data->copy(*src_data);
+         soln_var++;
+
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print all class data members for MethodOfLinesIntegrator object.*
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MethodOfLinesIntegrator::printClassData(
+   std::ostream& os) const
+{
+   os << "\nMethodOfLinesIntegrator::printClassData..." << std::endl;
+   os << "\nMethodOfLinesIntegrator: this = "
+      << (MethodOfLinesIntegrator *)this << std::endl;
+   os << "d_object_name = " << d_object_name << std::endl;
+   os << "d_order = " << d_order << std::endl;
+
+   for (int j = 0; j < d_order; j++) {
+      os << "d_alpha_1[" << j << "] = " << d_alpha_1[j] << std::endl;
+      os << "d_alpha_2[" << j << "] = " << d_alpha_2[j] << std::endl;
+      os << "d_beta[" << j << "] = " << d_beta[j] << std::endl;
+   }
+
+   os << "d_patch_strategy = "
+      << (MethodOfLinesPatchStrategy *)d_patch_strategy << std::endl;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/MethodOfLinesIntegrator.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/MethodOfLinesIntegrator.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,428 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Basic method-of-lines time integration algorithm 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_MethodOfLinesIntegrator
+#define included_algs_MethodOfLinesIntegrator
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/xfer/CoarsenAlgorithm.h"
+#include "SAMRAI/xfer/CoarsenSchedule.h"
+#include "SAMRAI/hier/ComponentSelector.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/xfer/Geometry.h"
+#include "SAMRAI/mesh/GriddingAlgorithm.h"
+#include "SAMRAI/tbox/List.h"
+#include "SAMRAI/algs/MethodOfLinesPatchStrategy.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/xfer/RefineAlgorithm.h"
+#include "SAMRAI/xfer/RefineSchedule.h"
+#include "SAMRAI/tbox/Serializable.h"
+#include "SAMRAI/mesh/StandardTagAndInitStrategy.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/hier/VariableContext.h"
+
+#include <iostream>
+#include <string>
+
+namespace SAMRAI {
+namespace algs {
+
+/*!
+ * \brief Class MethodOfLinesIntegrator implements a spatially
+ * adaptive version of the Strong Stability Preserving (SSP) Runge-Kutta
+ * time integration algorithm.
+ *
+ * The original non-adaptive version of the algorithm is described in
+ * S. Gottlieb, C.W. Shu, E. Tadmor, SIAM Review, Vol. 43, No. 1, pp. 89-112.
+ * The advanceHierarchy() method integrates all levels of an AMR hierarchy
+ * through a specified timestep.  See this method for details of the
+ * time-stepping process.  Application-specific numerical routines that
+ * are necessary for these operations are provided by the
+ * MethodOfLinesPatchStrategy data member.  The collaboration between
+ * this class and the patch strategy follows the the Strategy design pattern.
+ * A concrete patch strategy object is derived from the base class to
+ * provide those routines for a specific problem.
+ *
+ * This class is derived from the mesh::StandardTagAndInitStrategy abstract
+ * base class which defines an interface for routines required by the
+ * dynamic adaptive mesh refinement routines in the mesh::GriddingAlgorithm
+ * class.  This collaboration also follows the Strategy design pattern.
+ *
+ * Initialization of an MethodOfLinesIntegrator object is performed
+ * by first setting default values, then reading from input.  All input
+ * values may override values read from restart.  Data read from input is
+ * summarized as follows:
+ *
+ * Required input keys and data types: NONE
+ *
+ * Optional input keys, data types, and defaults:
+ *
+ *    - \b    order
+ *       integer value specifying order of Runge-Kutta scheme.  If no input
+ *       value is given, third order (i.e. order = 3) is used.
+ *
+ *    - \b    alpha_1
+ *    - \b    alpha_2
+ *    - \b    beta
+ *       arrays of double values (length = order) specifying the coeffients
+ *       used in the multi-step Strong Stability Preserving (SSP) Runge-Kutta
+ *       algorithm.  If no input is supplied, the default alpha_1, alpha_2,
+ *       and beta values are automatically set to correspond to the
+ *       specified order.
+ *
+ *
+ * The following represents a sample input entry:
+ *
+ * \verbatim
+ *  MethodOfLinesIntegrator{
+ *     order                 = 3
+ *     alpha_1               = 1., 0.75, 0.33333
+ *     alpha_2               = 0., 0.25, 0.66666
+ *     beta                  = 1., 0.25, 0.66666
+ *  }
+ *  \endverbatim
+ *
+ * @see mesh::StandardTagAndInitStrategy
+ */
+
+class MethodOfLinesIntegrator:
+   public tbox::Serializable,
+   public mesh::StandardTagAndInitStrategy
+{
+public:
+   /*!
+    * Enumerated type for the different categories of variable
+    * quantities allowed by the method of lines integration algorithm.
+    * See registerVariable(...) function for more details.
+    *
+    * - \b SOLN           {Solution quantity for time-dependent ODE problem
+    *                      solved by RK time-stepping algorithm.}
+    * - \b RHS            {Right-hand-side of ODE problem solved;
+    *                      i.e., du/dt = RHS.}
+    *
+    *
+    *
+    */
+   enum MOL_VAR_TYPE { SOLN = 0,
+                       RHS = 1 };
+
+   /*!
+    * The constructor for MethodOfLinesIntegrator configures the method
+    * of lines integration algorithm with the concrete patch strategy object
+    * (containing problem-specific numerical routines) and initializes
+    * integration algorithm parameters provided in the specified input
+    * database and in the restart database corresponding to the
+    * specified object_name.  The constructor also registers this object
+    * for restart using the specified object name when the boolean
+    * argument is true.  Whether object will write its state to
+    * restart files during program execution is determined by this argument.
+    * Note that it has a default state of true.
+    *
+    * When assertion checking is active, passing in any null pointer
+    * or an empty std::string will result in an unrecoverable assertion.
+    */
+   MethodOfLinesIntegrator(
+      const std::string& object_name,
+      tbox::Pointer<tbox::Database> input_db,
+      MethodOfLinesPatchStrategy* patch_strategy,
+      bool register_for_restart = true);
+
+   /*!
+    * The destructor for MethodOfLinesIntegrator unregisters
+    * the integrator object with the restart manager when so registered.
+    */
+   virtual ~MethodOfLinesIntegrator();
+
+   /*!
+    * Initialize integrator by setting the number of time levels
+    * of data needed based on specifications of the gridding algorithm.
+    *
+    * This routine also invokes variable registration in the patch strategy.
+    */
+   void
+   initializeIntegrator(
+      tbox::Pointer<mesh::GriddingAlgorithm> gridding_alg);
+
+   /*!
+    * Return a suitable time increment over which to integrate the ODE
+    * problem.  A minimum is taken over the increment computed on
+    * each patch in the hierarchy.
+    */
+   double
+   getTimestep(
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const double time) const;
+
+   /*!
+    * Advance the solution through the specified dt, which is assumed
+    * for the problem and state of the solution.  Advances all patches
+    * in the hierarchy passed in.
+    */
+   void
+   advanceHierarchy(
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const double time,
+      const double dt);
+
+   /*!
+    * Register variable quantity defined in the patch strategy with the
+    * method of lines integrator which manipulates its storage.
+    */
+   void
+   registerVariable(
+      const tbox::Pointer<hier::Variable> variable,
+      const hier::IntVector& ghosts,
+      const MOL_VAR_TYPE m_v_type,
+      const tbox::Pointer<xfer::Geometry>& transfer_geom,
+      const std::string& coarsen_name = std::string(),
+      const std::string& refine_name = std::string());
+
+   /*!
+    * Print all data members of MethodOfLinesIntegrator object.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os) const;
+
+   /*!
+    * Initialize data on a new level after it is inserted into an AMR patch
+    * hierarchy by the gridding algorithm.  The level number indicates
+    * that of the new level.  The old_level pointer corresponds to
+    * the level that resided in the hierarchy before the level with the
+    * specified number was introduced.  If the pointer is NULL, there was
+    * no level in the hierarchy prior to the call and the level data is set
+    * based on the user routines and the simulation time.  Otherwise, the
+    * specified level replaces the old level and the new level receives data
+    * from the old level appropriately before it is destroyed.
+    *
+    * Typically, when data is set, it is interpolated from coarser levels
+    * in the hierarchy.  If the data is to be set, the level number must
+    * match that of the old level, if non-NULL.  If the old level is
+    * non-NULL, then data is copied from the old level to the new level
+    * on regions of intersection between those levels before interpolation
+    * occurs.  Then, user-supplied patch routines are called to further
+    * initialize the data if needed.  The boolean argument after_regrid
+    * is passed into the user's routines.
+    *
+    * The boolean argument initial_time indicates whether the integration
+    * time corresponds to the initial simulation time.  If true, the level
+    * should be initialized with initial simulation values.  Otherwise, it
+    * should be assumed that the simulation time is at some point after the
+    * start of the simulation.  This information is provided since the
+    * initialization of the data on a patch may be different in each of those
+    * circumstances.  The can_be_refined boolean argument indicates whether
+    * the level is the finest allowable level in the hierarchy.
+    *
+    * Note: This function is overloaded from the base class
+    *       mesh::StandardTagAndInitStrategy.
+    */
+   void
+   initializeLevelData(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double init_time,
+      const bool can_be_refined,
+      const bool initial_time,
+      const tbox::Pointer<hier::BasePatchLevel> old_level =
+         tbox::Pointer<hier::BasePatchLevel>(NULL),
+      const bool allocate_data = true);
+
+#if !defined(__xlC__)
+   using mesh::StandardTagAndInitStrategy::initializeLevelData;
+#endif
+
+   /*!
+    * Reset cached communication schedules after the hierarchy has changed
+    * (due to regridding, for example) and the data has been initialized on
+    * the new levels.  The intent is that the cost of data movement on the
+    * hierarchy will be amortized across multiple communication cycles,
+    * if possible.  Note, that whenever this routine is called, communication
+    * schedules are updated for every level finer than and including that
+    * indexed by coarsest_level.
+    *
+    * Note: This function is overloaded from the base class
+    *       mesh::StandardTagAndInitStrategy.
+    */
+   void
+   resetHierarchyConfiguration(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level);
+
+   /*!
+    * Set integer tags to "one" on the given level where refinement
+    * of that level should occur using the user-supplied gradient detector.
+    * The boolean argument initial_time is true when the level is being
+    * subject to error estimation at initialization time.  If it is false,
+    * the error estimation process is being invoked at some later time
+    * after the AMR hierarchy was initially constructed.  The boolean argument
+    * uses_richardson_extrapolation_too is true when Richardson
+    * extrapolation error estimation is used in addition to the gradient
+    * detector, and false otherwise.  This argument helps the user to
+    * manage multiple regridding criteria.  This information
+    * is passed along to the user's patch data tagging routines since the
+    * application of the error estimator may be different in each of those
+    * circumstances.
+    *
+    * Note: This function is overloaded from the base class
+    *       mesh::StandardTagAndInitStrategy.
+    */
+   virtual void
+   applyGradientDetector(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double time,
+      const int tag_index,
+      const bool initial_time,
+      const bool uses_richardson_extrapolation_too);
+
+   /*!
+    * Writes object state out to the given database.
+    *
+    * When assertion checking is enabled, the database pointer must be non-null.
+    */
+   void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> db);
+
+private:
+   /*
+    * Copy all solution data from current context to scratch context.
+    */
+   void
+   copyCurrentToScratch(
+      const tbox::Pointer<hier::PatchLevel> level) const;
+
+   /*
+    * Copy all solution data from scratch context to current context.
+    */
+   void
+   copyScratchToCurrent(
+      const tbox::Pointer<hier::PatchLevel> level) const;
+
+   /*
+    * Reads in parameters from the input database.  All
+    * values from the input file take precedence over values from the
+    * restart file.
+    *
+    * When assertion checking enabled: db must not be a non-NULL pointer.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db,
+      bool is_from_restart);
+
+   /*
+    * Read object state from the restart file and initialize class data
+    * members.  The database from which the restart data is read is
+    * determined by the object_name specified in the constructor.
+    *
+    * Unrecoverable Errors:
+    *
+    *    -The database corresponding to object_name is not found
+    *     in the restart file.
+    *
+    *    -The class version number and restart version number do not
+    *     match.
+    *
+    *    -Data is missing from the restart database or is inconsistent.
+    *
+    */
+   void
+   getFromRestart();
+
+   /*
+    * The object name is used as a handle to the database stored in
+    * restart files and for error reporting purposes.  The boolean
+    * is used to control restart file writing operations.
+    */
+   std::string d_object_name;
+   bool d_registered_for_restart;
+
+   /*
+    * Order of the Runge-Kutta method, and array of alpha values used in
+    * updating solution during multi-step process.
+    */
+   int d_order;
+   tbox::Array<double> d_alpha_1;
+   tbox::Array<double> d_alpha_2;
+   tbox::Array<double> d_beta;
+
+   /*
+    * A pointer to the method of lines patch model that will perform
+    * the patch-based numerical operations.
+    */
+   MethodOfLinesPatchStrategy* d_patch_strategy;
+
+   /*
+    * The communication algorithms and schedules are created and
+    * maintained to manage inter-patch communication during AMR integration.
+    * The algorithms are created in the class constructor.  They are
+    * initialized when variables are registered with the integrator.
+    */
+
+   /*
+    * The "advance" schedule is used prior to advancing a level and
+    * prior to computing dt at initialization.  It must be reset each
+    * time a level is regridded.  All ghosts are filled with current
+    * data at specified time.
+    */
+   tbox::Pointer<xfer::RefineAlgorithm> d_bdry_fill_advance;
+   tbox::Array<tbox::Pointer<xfer::RefineSchedule> > d_bdry_sched_advance;
+
+   /*
+    * Algorithm for transferring data from coarse patch to fine patch
+    * after a regrid.
+    */
+   tbox::Pointer<xfer::RefineAlgorithm> d_fill_after_regrid;
+
+   /*
+    * Algorithm for copying data from current context to scratch context,
+    * on the same level.
+    */
+   tbox::Pointer<xfer::RefineAlgorithm> d_fill_before_tagging;
+
+   /*
+    * Algorithm and communication schedule for transferring data from
+    * fine to coarse grid.
+    */
+   tbox::Pointer<xfer::CoarsenAlgorithm> d_coarsen_algorithm;
+   tbox::Array<tbox::Pointer<xfer::CoarsenSchedule> > d_coarsen_schedule;
+
+   /*
+    * This algorithm has two variable contexts.  The current context is the
+    * solution state at the current simulation time.  These data values do
+    * not need ghost cells.  The scratch context is the temporary solution
+    * state during the time integration process.  These variables will require
+    * ghost cell widths that depend on the spatial discretization.
+    */
+   tbox::Pointer<hier::VariableContext> d_current;
+   tbox::Pointer<hier::VariableContext> d_scratch;
+
+   tbox::List<tbox::Pointer<hier::Variable> > d_soln_variables;
+   tbox::List<tbox::Pointer<hier::Variable> > d_rhs_variables;
+
+   /*
+    * The component selectors for current and scratch are used by the
+    * algorithm to collectively allocate/deallocate data for variables.
+    */
+   hier::ComponentSelector d_current_data;
+   hier::ComponentSelector d_scratch_data;
+   hier::ComponentSelector d_rhs_data;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/MethodOfLinesPatchStrategy.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/MethodOfLinesPatchStrategy.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,46 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to application-specific patch functions to support
+ *                MethodOfLines integration algorithm 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_MethodOfLinesPatchStrategy_C
+#define included_algs_MethodOfLinesPatchStrategy_C
+
+#include "SAMRAI/algs/MethodOfLinesPatchStrategy.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+namespace SAMRAI {
+namespace algs {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Note: hier::Variable contexts should be consistent with those in            *
+ *       MethodOfLinesIntegrator class.                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+MethodOfLinesPatchStrategy::MethodOfLinesPatchStrategy(
+   const tbox::Dimension& dim):
+   xfer::RefinePatchStrategy(dim),
+   xfer::CoarsenPatchStrategy(dim),
+   d_dim(dim)
+{
+   d_interior_with_ghosts.setNull();
+   d_interior.setNull();
+}
+
+MethodOfLinesPatchStrategy::~MethodOfLinesPatchStrategy()
+{
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/MethodOfLinesPatchStrategy.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/MethodOfLinesPatchStrategy.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,314 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to application-specific patch functions in support
+ *                Method of Lines integration algorithm 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_MethodOfLinesPatchStrategy
+#define included_algs_MethodOfLinesPatchStrategy
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/xfer/CoarsenPatchStrategy.h"
+#include "SAMRAI/xfer/RefinePatchStrategy.h"
+
+namespace SAMRAI {
+namespace algs {
+
+class MethodOfLinesIntegrator;
+
+/**
+ * Class MethodOfLinesPatchStrategy is an abstract type defining the
+ * interface for operations invoked during the integration routines defined
+ * in the MethodOfLinesIntegrator class.  This class is derived from
+ * the xfer::RefinePatchStrategy and xfer::CoarsenPatchStrategy abstract
+ * base classes.  These base classes define the interfaces for user-defined
+ * interlevel data refining and coarsening operations and the specification
+ * of physical boundary conditions.
+ *
+ * @see algs::MethodOfLinesIntegrator
+ * @see xfer::RefinePatchStrategy
+ * @see xfer::CoarsenPatchStrategy
+ */
+
+class MethodOfLinesPatchStrategy:
+   public xfer::RefinePatchStrategy,
+   public xfer::CoarsenPatchStrategy
+{
+public:
+   /*!
+    * Blank constructor for MethodOfLinesPatchStrategy.
+    */
+   MethodOfLinesPatchStrategy(
+      const tbox::Dimension& dim);
+
+   /*!
+    * Virtual destructor for MethodOfLinesPatchStrategy.
+    */
+   virtual ~MethodOfLinesPatchStrategy() = 0;
+
+   /*!
+    * Register variables specific to the problem to be solved with the
+    * integrator using the registerVariable function.  This
+    * defines the way data for each quantity will be manipulated on the
+    * patches.  For more information, refer to
+    * MethodOfLinesIntegrator::registerVariable.
+    */
+   virtual void
+   registerModelVariables(
+      MethodOfLinesIntegrator* integrator) = 0;
+
+   /*!
+    * Set the initial data on a patch interior (i.e., NO GHOST CELLS).
+    * Setting "initial_time" true will initialize data at time. Setting it
+    * false will interpolate data from the appropriate coarser patch.
+    */
+   virtual void
+   initializeDataOnPatch(
+      hier::Patch& patch,
+      const double time,
+      const bool initial_time) const = 0;
+
+   /*!
+    * Compute the stable time increment for a patch.
+    */
+   virtual double
+   computeStableDtOnPatch(
+      hier::Patch& patch,
+      const double time) const = 0;
+
+   /*!
+    * Advance a single Runge Kutta step.
+    *
+    * @param patch patch that RK step is being applied
+    * @param dt    timestep
+    * @param alpha_1 first coefficient applied in the RK step
+    * @param alpha_2 second coefficient
+    * @param beta    third coefficient
+    */
+   virtual void
+   singleStep(
+      hier::Patch& patch,
+      const double dt,
+      const double alpha_1,
+      const double alpha_2,
+      const double beta) const = 0;
+
+   /*!
+    * Using a user-specified gradient detection scheme, determine cells which
+    * have high gradients and, consequently, should be refined.
+    */
+   virtual void tagGradientDetectorCells(
+      hier::Patch& patch,
+      const double regrid_time,
+      const bool initial_error,
+      const int tag_index,
+      const bool uses_richardson_extrapolation_too)
+   {
+      NULL_USE(patch);
+      NULL_USE(regrid_time);
+      NULL_USE(initial_error);
+      NULL_USE(tag_index);
+      NULL_USE(uses_richardson_extrapolation_too);
+   }
+
+   /*!
+    * Set user-defined boundary conditions at the physical domain boundary.
+    */
+   virtual void
+   setPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const double fill_time,
+      const hier::IntVector& ghost_width_to_fill) = 0;
+
+   /*!
+    * Return maximum stencil width needed for user-defined
+    * data interpolation operations.  Default is to return
+    * zero, assuming no user-defined operations provided.
+    */
+   virtual hier::IntVector getRefineOpStencilWidth() const
+   {
+      return hier::IntVector::getZero(d_dim);
+   }
+
+   /*!
+    * Pre- and post-processing routines for implementing user-defined
+    * spatial interpolation routines applied to variables.  The
+    * interpolation routines are used in the MOL AMR algorithm
+    * for filling patch ghost cells before advancing data on a level
+    * and after regridding a level to fill portions of the new level
+    * from some coarser level.  These routines are called automatically
+    * from within patch boundary filling schedules; thus, some concrete
+    * function matching these signatures must be provided in the user's
+    * patch model.  However, the routines only need to perform some
+    * operations when "USER_DEFINED_REFINE" is given as the interpolation
+    * method for some variable when the patch model registers variables
+    * with the MOL integration algorithm, typically.  If the
+    * user does not provide operations that refine such variables in either
+    * of these routines, then they will not be refined.
+    *
+    * The order in which these operations are used in each patch
+    * boundary filling schedule is:
+    *
+    * - \b (1) {Call user's preprocessRefine() routine.}
+    * - \b (2) {Refine all variables with standard interpolation operators.}
+    * - \b (3) {Call user's postprocessRefine() routine.}
+    *
+    *
+    * Also, user routines that implement these functions must use
+    * data corresponding to the d_scratch context on both coarse and
+    * fine patches.
+    */
+   virtual void preprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio)
+   {
+      NULL_USE(fine);
+      NULL_USE(coarse);
+      NULL_USE(fine_box);
+      NULL_USE(ratio);
+   }
+
+   ///
+   virtual void postprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio)
+   {
+      NULL_USE(fine);
+      NULL_USE(coarse);
+      NULL_USE(fine_box);
+      NULL_USE(ratio);
+   }
+
+   /*!
+    * Return maximum stencil width needed for user-defined
+    * data coarsen operations.  Default is to return
+    * zero, assuming no user-defined operations provided.
+    */
+   virtual hier::IntVector getCoarsenOpStencilWidth() const
+   {
+      return hier::IntVector::getZero(d_dim);
+   }
+
+   /*!
+    * Pre- and post-processing routines for implementing user-defined
+    * spatial coarsening routines applied to variables.  The coarsening
+    * routines are used in the MOL AMR algorithm synchronizing
+    * coarse and fine levels when they have been integrated to the same
+    * point.  These routines are called automatically from within the
+    * data synchronization coarsen schedules; thus, some concrete
+    * function matching these signatures must be provided in the user's
+    * patch model.  However, the routines only need to perform some
+    * operations when "USER_DEFINED_COARSEN" is given as the coarsening
+    * method for some variable when the patch model registers variables
+    * with the MOL level integration algorithm, typically.  If the
+    * user does not provide operations that coarsen such variables in either
+    * of these routines, then they will not be coarsened.
+    *
+    * The order in which these operations are used in each coarsening
+    * schedule is:
+    *
+    * - \b (1) {Call user's preprocessCoarsen() routine.}
+    * - \b (2) {Coarsen all variables with standard coarsening operators.}
+    * - \b (3) {Call user's postprocessCoarsen() routine.}
+    *
+    *
+    * Also, user routines that implement these functions must use
+    * corresponding to the d_new context on both coarse and fine patches
+    * for time-dependent quantities.
+    */
+   virtual void preprocessCoarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio)
+   {
+      NULL_USE(fine);
+      NULL_USE(coarse);
+      NULL_USE(coarse_box);
+      NULL_USE(ratio);
+   }
+
+   ///
+   virtual void postprocessCoarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio)
+   {
+      NULL_USE(fine);
+      NULL_USE(coarse);
+      NULL_USE(coarse_box);
+      NULL_USE(ratio);
+   }
+
+   /*!
+    * The method of lines integrator controls the context for the data to
+    * be used in the numerical routines implemented in the concrete patch
+    * strategy. These accessor methods allow the patch strategy to access
+    * the particular data contexts used in the integrator.
+    *
+    * Return pointer to data context with ghost cells.
+    */
+   tbox::Pointer<hier::VariableContext> getInteriorWithGhostsContext() const
+   {
+      return d_interior_with_ghosts;
+   }
+
+   /*!
+    * Return pointer to data context with NO ghosts.
+    */
+   tbox::Pointer<hier::VariableContext> getInteriorContext() const
+   {
+      return d_interior;
+   }
+
+   /*!
+    * Set pointer to data context with ghosts.
+    */
+   void setInteriorWithGhostsContext(
+      tbox::Pointer<hier::VariableContext> context)
+   {
+      d_interior_with_ghosts = context;
+   }
+
+   /*!
+    * Set pointer to data context with NO ghosts.
+    */
+   void setInteriorContext(
+      tbox::Pointer<hier::VariableContext> context)
+   {
+      d_interior = context;
+   }
+
+   const tbox::Dimension& getDim() const {
+      return d_dim;
+   }
+
+private:
+   const tbox::Dimension d_dim;
+
+   tbox::Pointer<hier::VariableContext> d_interior_with_ghosts;
+   tbox::Pointer<hier::VariableContext> d_interior;
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/OuteredgeSumTransaction.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/OuteredgeSumTransaction.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,248 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Communication transaction for summing outeredge data 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_OuteredgeSumTransaction_C
+#define included_algs_OuteredgeSumTransaction_C
+
+#include "SAMRAI/algs/OuteredgeSumTransaction.h"
+
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/math/ArrayDataBasicOps.h"
+#include "SAMRAI/pdat/EdgeGeometry.h"
+#include "SAMRAI/pdat/OuteredgeData.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace algs {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialization, set/unset functions for static array of refine items. *
+ *                                                                       *
+ *************************************************************************
+ */
+
+const xfer::RefineClasses::Data **
+OuteredgeSumTransaction::s_refine_items =
+   (const xfer::RefineClasses::Data **)NULL;
+int OuteredgeSumTransaction::s_num_refine_items = 0;
+
+void OuteredgeSumTransaction::setRefineItems(
+   const xfer::RefineClasses::Data** refine_items,
+   int num_refine_items)
+{
+   TBOX_ASSERT(refine_items != (const xfer::RefineClasses::Data **)NULL);
+   TBOX_ASSERT(num_refine_items >= 0);
+
+   s_refine_items = refine_items;
+   s_num_refine_items = num_refine_items;
+}
+
+void OuteredgeSumTransaction::unsetRefineItems()
+{
+   s_refine_items = (const xfer::RefineClasses::Data **)NULL;
+   s_num_refine_items = 0;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor sets state of transaction.                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+OuteredgeSumTransaction::OuteredgeSumTransaction(
+   tbox::Pointer<hier::PatchLevel> dst_level,
+   tbox::Pointer<hier::PatchLevel> src_level,
+   tbox::Pointer<hier::BoxOverlap> overlap,
+   const hier::MappedBox& dst_node,
+   const hier::MappedBox& src_node,
+   int refine_item_id):
+   d_dst_level(dst_level),
+   d_src_level(src_level),
+   d_overlap(overlap),
+   d_dst_node(dst_node),
+   d_src_node(src_node),
+   d_refine_item_id(refine_item_id),
+   d_incoming_bytes(0),
+   d_outgoing_bytes(0)
+{
+   TBOX_ASSERT(!dst_level.isNull());
+   TBOX_ASSERT(!src_level.isNull());
+   TBOX_ASSERT(!overlap.isNull());
+   TBOX_ASSERT(dst_node.getLocalId() >= 0);
+   TBOX_ASSERT(src_node.getLocalId() >= 0);
+   TBOX_ASSERT(refine_item_id >= 0);
+   // Note: s_num_refine_items cannot be used at this point!
+
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst_level, *src_level, dst_node, src_node);
+}
+
+OuteredgeSumTransaction::~OuteredgeSumTransaction()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Functions overridden in tbox::Transaction base class.                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool
+OuteredgeSumTransaction::canEstimateIncomingMessageSize()
+{
+   bool can_estimate = false;
+   if (d_src_node.getOwnerRank() == d_src_level->getMappedBoxLevel()->getMPI().getRank()) {
+      can_estimate =
+         d_src_level->getPatch(d_src_node.getLocalId())
+         ->getPatchData(s_refine_items[d_refine_item_id]->
+            d_src)
+         ->canEstimateStreamSizeFromBox();
+   } else {
+      can_estimate =
+         d_dst_level->getPatch(d_dst_node.getLocalId())
+         ->getPatchData(s_refine_items[d_refine_item_id]->
+            d_scratch)
+         ->canEstimateStreamSizeFromBox();
+   }
+   return can_estimate;
+}
+
+size_t
+OuteredgeSumTransaction::computeIncomingMessageSize()
+{
+   d_incoming_bytes =
+      d_dst_level->getPatch(d_dst_node.getLocalId())
+      ->getPatchData(s_refine_items[d_refine_item_id]->
+         d_scratch)
+      ->getDataStreamSize(*d_overlap);
+   return d_incoming_bytes;
+}
+
+size_t
+OuteredgeSumTransaction::computeOutgoingMessageSize()
+{
+   d_outgoing_bytes =
+      d_src_level->getPatch(d_src_node.getLocalId())
+      ->getPatchData(s_refine_items[d_refine_item_id]->
+         d_src)
+      ->getDataStreamSize(*d_overlap);
+   return d_outgoing_bytes;
+}
+
+int
+OuteredgeSumTransaction::getSourceProcessor()
+{
+   return d_src_node.getOwnerRank();
+}
+
+int
+OuteredgeSumTransaction::getDestinationProcessor()
+{
+   return d_dst_node.getOwnerRank();
+}
+
+void
+OuteredgeSumTransaction::packStream(
+   tbox::MessageStream& stream)
+{
+   d_src_level->getPatch(d_src_node.getLocalId())
+   ->getPatchData(s_refine_items[d_refine_item_id]->
+      d_src)
+   ->packStream(stream, *d_overlap);
+}
+
+void
+OuteredgeSumTransaction::unpackStream(
+   tbox::MessageStream& stream)
+{
+   tbox::Pointer<pdat::OuteredgeData<double> > oedge_dst_data =
+      d_dst_level->getPatch(d_dst_node.getLocalId())->
+      getPatchData(s_refine_items[d_refine_item_id]->d_scratch);
+   TBOX_ASSERT(!oedge_dst_data.isNull());
+
+   oedge_dst_data->unpackStreamAndSum(stream, *d_overlap);
+}
+
+void
+OuteredgeSumTransaction::copyLocalData()
+{
+   tbox::Pointer<pdat::OuteredgeData<double> > oedge_dst_data =
+      d_dst_level->getPatch(d_dst_node.getLocalId())->
+      getPatchData(s_refine_items[d_refine_item_id]->d_scratch);
+   TBOX_ASSERT(!oedge_dst_data.isNull());
+
+   tbox::Pointer<pdat::OuteredgeData<double> > oedge_src_data =
+      d_src_level->getPatch(d_src_node.getLocalId())->
+      getPatchData(s_refine_items[d_refine_item_id]->d_src);
+   TBOX_ASSERT(!oedge_src_data.isNull());
+
+   oedge_dst_data->sum(*oedge_src_data, *d_overlap);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Function to print state of transaction.                               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+OuteredgeSumTransaction::printClassData(
+   std::ostream& stream) const
+{
+   stream << "Outeredge Sum Transaction" << std::endl;
+   stream << "   refine item array:        "
+          << (xfer::RefineClasses::Data **)s_refine_items
+          << std::endl;
+   stream << "   num refine items:       " << s_num_refine_items << std::endl;
+   stream << "   destination node:       " << d_dst_node << std::endl;
+   stream << "   source node:            " << d_src_node << std::endl;
+   stream << "   refine item id:         " << d_refine_item_id << std::endl;
+   stream << "   destination patch data: "
+   << s_refine_items[d_refine_item_id]->d_scratch << std::endl;
+   stream << "   source patch data:      "
+   << s_refine_items[d_refine_item_id]->d_src << std::endl;
+   stream << "   incoming bytes:         " << d_incoming_bytes << std::endl;
+   stream << "   outgoing bytes:         " << d_outgoing_bytes << std::endl;
+   stream << "   destination level:           "
+          << (hier::PatchLevel *)d_src_level << std::endl;
+   stream << "   source level:           "
+          << (hier::PatchLevel *)d_src_level << std::endl;
+   stream << "   overlap:                " << std::endl;
+   d_overlap->print(stream);
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/OuteredgeSumTransaction.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/OuteredgeSumTransaction.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,190 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Communication transaction for summing outeredge data 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_OuteredgeSumTransaction
+#define included_algs_OuteredgeSumTransaction
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/pdat/OuteredgeData.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Transaction.h"
+#include "SAMRAI/xfer/RefineClasses.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace algs {
+
+/*!
+ * @brief Class OuteredgeSumTransaction represents a single outeredge data sum
+ * communication transaction between two processors or a local data sum for refine schedules.
+ * Note that to there is an implicit hand-shaking between objects of this class and
+ * the xfer::RefineSchedule object that constructs them.  Following the refine
+ * schedule implementation, the source patch data index for a transaction always refers
+ * to the source data and the destination patch data index for a transaction is always
+ * the scratch data, all as defined in the xfer::RefineClasses class.
+ *
+ * @see xfer::RefineSchedule
+ * @see xfer::RefineClasses
+ * @see tbox::Schedule
+ * @see tbox::Transaction
+ */
+
+class OuteredgeSumTransaction:public tbox::Transaction
+{
+public:
+   /*!
+    * Static member function to set the array of refine class data items that
+    * is shared by all object instances of this sum transaction class during
+    * data transfers.  The array must be set before any transactions are executed.
+    * The array is set in the RefineSchedule class.
+    */
+   static void
+   setRefineItems(
+      const xfer::RefineClasses::Data** refine_items,
+      int num_refine_items);
+
+   /*!
+    * Static member function to unset the array of refine class data items that
+    * is shared by all object instances of this sum transaction class during
+    * data transfers.  The unset function is used to prevent erroneous execution
+    * of different schedules.  The array is unset in the RefineSchedule class.
+    */
+   static void
+   unsetRefineItems();
+
+   /*!
+    * Construct a transaction with the specified source and destination
+    * levels, patches, and patch data components found in the refine class
+    * item with the given id owned by the calling refine schedule.  In
+    * general, this constructor is called by a xfer::RefineSchedule
+    * object for each data transaction (specifically summing outeredge
+    * data) that must occur.  This transaction will be responsible for one
+    * of the following: (1) a local data copy and sum, or (2) packing a
+    * message stream with source patch data, or (3) unpacking and summing
+    * destination patch data from a message stream.
+    *
+    * @param dst_level        tbox::Pointer to destination patch level.
+    * @param src_level        tbox::Pointer to source patch level.
+    * @param overlap          tbox::Pointer to overlap region between patches.
+    * @param dst_patch        Integer index of destination patch in
+    *                         destination
+    *                         patch level.
+    * @param src_patch        Integer index of source patch in source patch
+    *                         level.
+    * @param refine_item_id   Integer id of refine data item owned by refine
+    *                         schedule.
+    *
+    * When assertion checking is active, an assertion will result if any of the pointer
+    * arguments is null, or if any of the integer arguments is invalid (i.e., < 0).
+    */
+   OuteredgeSumTransaction(
+      tbox::Pointer<hier::PatchLevel> dst_level,
+      tbox::Pointer<hier::PatchLevel> src_level,
+      tbox::Pointer<hier::BoxOverlap> overlap,
+      const hier::MappedBox& dst_node,
+      const hier::MappedBox& src_node,
+      int refine_item_id);
+
+   /*!
+    * The virtual destructor for the copy transaction releases all
+    * memory associated with the transaction.
+    */
+   virtual ~OuteredgeSumTransaction();
+
+   /*!
+    * Return a boolean indicating whether this transaction can estimate
+    * the size of an incoming message.  If this is false, then a different
+    * communication protocol kicks in and the message size is transmitted
+    * between edges.
+    */
+   virtual bool
+   canEstimateIncomingMessageSize();
+
+   /*!
+    * Return the integer buffer space (in bytes) needed for the incoming
+    * message. This routine is only called if the transaction can estimate the
+    * size of the incoming message.  See canEstimateIncomingMessageSize().
+    */
+   virtual size_t
+   computeIncomingMessageSize();
+
+   /*!
+    * Return the integer buffer space (in bytes) needed for the outgoing message.
+    */
+   virtual size_t
+   computeOutgoingMessageSize();
+
+   /*!
+    * Return the sending processor number for the communications transaction.
+    */
+   virtual int
+   getSourceProcessor();
+
+   /*!
+    * Return the receiving processor number for the communications transaction.
+    */
+   virtual int
+   getDestinationProcessor();
+
+   /*!
+    * Pack the transaction data into the message stream.
+    */
+   virtual void
+   packStream(
+      tbox::MessageStream& stream);
+
+   /*!
+    * Unpack the transaction data from the message stream.
+    */
+   virtual void
+   unpackStream(
+      tbox::MessageStream& stream);
+
+   /*!
+    * Perform the local data copy for the transaction.
+    */
+   virtual void
+   copyLocalData();
+
+   /*!
+    * Print out transaction information.
+    */
+   virtual void
+   printClassData(
+      std::ostream& stream) const;
+
+private:
+   OuteredgeSumTransaction(
+      const OuteredgeSumTransaction&);                      // not implemented
+   void
+   operator = (
+      const OuteredgeSumTransaction&);             // not implemented
+
+   static const xfer::RefineClasses::Data** s_refine_items;
+   static int s_num_refine_items;
+
+   tbox::Pointer<hier::PatchLevel> d_dst_level;
+   tbox::Pointer<hier::PatchLevel> d_src_level;
+   tbox::Pointer<hier::BoxOverlap> d_overlap;
+   hier::MappedBox d_dst_node;
+   hier::MappedBox d_src_node;
+   int d_refine_item_id;
+   int d_incoming_bytes;
+   int d_outgoing_bytes;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/OuteredgeSumTransactionFactory.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/OuteredgeSumTransactionFactory.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,149 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory for creating outeredge sum transaction objects 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_OuteredgeSumTransactionFactory_C
+#define included_algs_OuteredgeSumTransactionFactory_C
+
+#include "SAMRAI/algs/OuteredgeSumTransactionFactory.h"
+#include "SAMRAI/algs/OuteredgeSumTransaction.h"
+
+namespace SAMRAI {
+namespace algs {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default constructor and destructor.                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+OuteredgeSumTransactionFactory::OuteredgeSumTransactionFactory()
+{
+}
+
+OuteredgeSumTransactionFactory::~OuteredgeSumTransactionFactory()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set/unset information for transactions managed by this factory class. *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void OuteredgeSumTransactionFactory::setRefineItems(
+   const xfer::RefineClasses::Data** refine_items,
+   int num_refine_items)
+{
+   algs::OuteredgeSumTransaction::setRefineItems(refine_items,
+      num_refine_items);
+   d_refine_items = refine_items;
+   d_number_refine_items = num_refine_items;
+}
+
+void OuteredgeSumTransactionFactory::unsetRefineItems()
+{
+   algs::OuteredgeSumTransaction::unsetRefineItems();
+   d_refine_items = (const xfer::RefineClasses::Data **)NULL;
+   d_number_refine_items = 0;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Allocate outeredge sum transaction object.                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<tbox::Transaction>
+OuteredgeSumTransactionFactory::allocate(
+   tbox::Pointer<hier::PatchLevel> dst_level,
+   tbox::Pointer<hier::PatchLevel> src_level,
+   tbox::Pointer<hier::BoxOverlap> overlap,
+   const hier::MappedBox& dst_node,
+   const hier::MappedBox& src_node,
+   int ritem_id,
+   const hier::Box& box,
+   bool use_time_interpolation) const
+{
+   NULL_USE(box);
+   NULL_USE(use_time_interpolation);
+
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst_level, *src_level, dst_node, src_node);
+
+   OuteredgeSumTransaction* transaction =
+      new OuteredgeSumTransaction(dst_level,
+         src_level,
+         overlap,
+         dst_node,
+         src_node,
+         ritem_id);
+   return tbox::Pointer<tbox::Transaction>(transaction);
+}
+
+tbox::Pointer<tbox::Transaction>
+OuteredgeSumTransactionFactory::allocate(
+   tbox::Pointer<hier::PatchLevel> dst_level,
+   tbox::Pointer<hier::PatchLevel> src_level,
+   tbox::Pointer<hier::BoxOverlap> overlap,
+   const hier::MappedBox& dst_node,
+   const hier::MappedBox& src_node,
+   int ritem_id) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst_level, *src_level, dst_node, src_node);
+
+   return allocate(dst_level,
+      src_level,
+      overlap,
+      dst_node,
+      src_node,
+      ritem_id,
+      hier::Box::getEmptyBox(dst_level->getDim()),
+      false);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialize (to 0.0) scratch storage for sum transactions.             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void OuteredgeSumTransactionFactory::preprocessScratchSpace(
+   tbox::Pointer<hier::PatchLevel> level,
+   double fill_time,
+   const hier::ComponentSelector& preprocess_vector) const
+{
+   NULL_USE(fill_time);
+   TBOX_ASSERT(!level.isNull());
+
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      const int ncomponents = preprocess_vector.getSize();
+      for (int n = 0; n < ncomponents; ++n) {
+         if (preprocess_vector.isSet(n)) {
+            tbox::Pointer<pdat::OuteredgeData<double> > oedge_data =
+               patch->getPatchData(n);
+            oedge_data->fillAll(0.0);
+         }
+      }
+
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/OuteredgeSumTransactionFactory.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/OuteredgeSumTransactionFactory.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,134 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory for creating outeredge sum transaction objects 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_OuteredgeSumTransactionFactory
+#define included_algs_OuteredgeSumTransactionFactory
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/hier/ComponentSelector.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/xfer/RefineClasses.h"
+#include "SAMRAI/xfer/RefineTransactionFactory.h"
+
+namespace SAMRAI {
+namespace algs {
+
+/*!
+ * @brief Concrete subclass of the xfer::RefineTransactionFactory base class that
+ * allocates outeredge sum transaction objects for a xfer::RefineSchedule object.
+ *
+ * @see xfer::RefineTransactionFactory
+ * @see xfer::OuteredgeSumTransaction
+ */
+
+class OuteredgeSumTransactionFactory:public xfer::RefineTransactionFactory
+{
+public:
+   /*!
+    * @brief Default constructor.
+    */
+   OuteredgeSumTransactionFactory();
+
+   /*!
+    * @brief Virtual destructor for base class.
+    */
+   virtual ~OuteredgeSumTransactionFactory();
+
+   /*!
+    * @brief Set the array of xfer::RefineClass<DIM>::Data items used by the transactions.
+    */
+   void
+   setRefineItems(
+      const xfer::RefineClasses::Data** refine_items,
+      int num_refine_items);
+
+   /*!
+    * @brief Clear the array of xfer::RefineClass<DIM>::Data items used by the transactions.
+    */
+   void
+   unsetRefineItems();
+
+   /*!
+    * @brief Allocate an OuteredgeSumTransaction object.
+    *
+    * @param dst_level      tbox::Pointer to destination patch level.
+    * @param src_level      tbox::Pointer to source patch level.
+    * @param overlap        tbox::Pointer to overlap region between patches.
+    * @param dst_patch_id   Integer index of destination patch in destination
+    *                       patch level.
+    * @param src_patch_id   Integer index of source patch in source patch level.
+    * @param ritem_id       Integer index of xfer::RefineClass<DIM>::Data item
+    *                       associated with transaction.
+    * @param box            Optional const reference to box defining region of
+    *                       refine transaction.  Use next method if not required.
+    * @param use_time_interpolation  Optional boolean flag indicating whether the
+    *                       refine transaction involves time interpolation.
+    *                       Default is false.
+    */
+   tbox::Pointer<tbox::Transaction>
+   allocate(
+      tbox::Pointer<hier::PatchLevel> dst_level,
+      tbox::Pointer<hier::PatchLevel> src_level,
+      tbox::Pointer<hier::BoxOverlap> overlap,
+      const hier::MappedBox& dst_node,
+      const hier::MappedBox& src_node,
+      int ritem_id,
+      const hier::Box& box,
+      bool use_time_interpolation = false) const;
+
+   /*!
+    * @brief Allocate an OuteredgeSumTransaction object.
+    *
+    * Same as previous allocate routine but with default empty box and no
+    * timer interpolation.
+    */
+   tbox::Pointer<tbox::Transaction>
+   allocate(
+      tbox::Pointer<hier::PatchLevel> dst_level,
+      tbox::Pointer<hier::PatchLevel> src_level,
+      tbox::Pointer<hier::BoxOverlap> overlap,
+      const hier::MappedBox& dst_node,
+      const hier::MappedBox& src_node,
+      int ritem_id) const;
+
+   /*!
+    * @brief Function to initialize scratch space data for the sum transactions
+    * (patch data components indicated by the component selector) to zero.
+    *
+    * @param level        tbox::Pointer to patch level holding scratch data.
+    * @param fill_time    Double value of simulation time at which preprocess
+    *                     operation is called.
+    * @param preprocess_vector Const reference to hier::ComponentSelector indicating
+    *                     patch data array indices of scratch patch data objects
+    *                     to preprocess.
+    */
+   void
+   preprocessScratchSpace(
+      tbox::Pointer<hier::PatchLevel> level,
+      double fill_time,
+      const hier::ComponentSelector& preprocess_vector) const;
+
+private:
+   // The following two functions are not implemented
+   OuteredgeSumTransactionFactory(
+      const OuteredgeSumTransactionFactory&);
+   void
+   operator = (
+      const OuteredgeSumTransactionFactory&);
+
+   const xfer::RefineClasses::Data** d_refine_items;
+   int d_number_refine_items;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/OuternodeSumTransaction.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/OuternodeSumTransaction.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,248 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Communication transaction for summing outernode data 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_OuternodeSumTransaction_C
+#define included_algs_OuternodeSumTransaction_C
+
+#include "SAMRAI/algs/OuternodeSumTransaction.h"
+
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/math/ArrayDataBasicOps.h"
+#include "SAMRAI/pdat/NodeGeometry.h"
+#include "SAMRAI/pdat/OuternodeData.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace algs {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialization, set/unset functions for static array of refine items. *
+ *                                                                       *
+ *************************************************************************
+ */
+
+const xfer::RefineClasses::Data **
+OuternodeSumTransaction::s_refine_items =
+   (const xfer::RefineClasses::Data **)NULL;
+int OuternodeSumTransaction::s_num_refine_items = 0;
+
+void OuternodeSumTransaction::setRefineItems(
+   const xfer::RefineClasses::Data** refine_items,
+   int num_refine_items)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(refine_items != (const xfer::RefineClasses::Data **)NULL);
+   TBOX_ASSERT(num_refine_items >= 0);
+#endif
+   s_refine_items = refine_items;
+   s_num_refine_items = num_refine_items;
+}
+
+void OuternodeSumTransaction::unsetRefineItems()
+{
+   s_refine_items = (const xfer::RefineClasses::Data **)NULL;
+   s_num_refine_items = 0;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor sets state of transaction.                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+OuternodeSumTransaction::OuternodeSumTransaction(
+   tbox::Pointer<hier::PatchLevel> dst_level,
+   tbox::Pointer<hier::PatchLevel> src_level,
+   tbox::Pointer<hier::BoxOverlap> overlap,
+   const hier::MappedBox& dst_node,
+   const hier::MappedBox& src_node,
+   int refine_item_id):
+   d_dst_level(dst_level),
+   d_src_level(src_level),
+   d_overlap(overlap),
+   d_dst_node(dst_node),
+   d_src_node(src_node),
+   d_refine_item_id(refine_item_id),
+   d_incoming_bytes(0),
+   d_outgoing_bytes(0)
+{
+   TBOX_ASSERT(!dst_level.isNull());
+   TBOX_ASSERT(!src_level.isNull());
+   TBOX_ASSERT(!overlap.isNull());
+   TBOX_ASSERT(dst_node.getLocalId() >= 0);
+   TBOX_ASSERT(src_node.getLocalId() >= 0);
+   TBOX_ASSERT(refine_item_id >= 0);
+   // Note: s_num_refine_items cannot be used at this point!
+
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst_level, *src_level, dst_node, src_node);
+}
+
+OuternodeSumTransaction::~OuternodeSumTransaction()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Functions overridden in tbox::Transaction base class.                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool
+OuternodeSumTransaction::canEstimateIncomingMessageSize()
+{
+   bool can_estimate = false;
+   if (getSourceProcessor() == d_src_level->getMappedBoxLevel()->getMPI().getRank()) {
+      can_estimate =
+         d_src_level->getPatch(d_src_node.getLocalId())
+         ->getPatchData(s_refine_items[d_refine_item_id]->
+            d_src)
+         ->canEstimateStreamSizeFromBox();
+   } else {
+      can_estimate =
+         d_dst_level->getPatch(d_dst_node.getLocalId())
+         ->getPatchData(s_refine_items[d_refine_item_id]->
+            d_scratch)
+         ->canEstimateStreamSizeFromBox();
+   }
+   return can_estimate;
+}
+
+size_t
+OuternodeSumTransaction::computeIncomingMessageSize()
+{
+   d_incoming_bytes =
+      d_dst_level->getPatch(d_dst_node.getLocalId())
+      ->getPatchData(s_refine_items[d_refine_item_id]->
+         d_scratch)
+      ->getDataStreamSize(*d_overlap);
+   return d_incoming_bytes;
+}
+
+size_t
+OuternodeSumTransaction::computeOutgoingMessageSize()
+{
+   d_outgoing_bytes =
+      d_src_level->getPatch(d_src_node.getLocalId())
+      ->getPatchData(s_refine_items[d_refine_item_id]->
+         d_src)
+      ->getDataStreamSize(*d_overlap);
+   return d_outgoing_bytes;
+}
+
+int
+OuternodeSumTransaction::getSourceProcessor()
+{
+   return d_src_node.getOwnerRank();
+}
+
+int
+OuternodeSumTransaction::getDestinationProcessor()
+{
+   return d_dst_node.getOwnerRank();
+}
+
+void
+OuternodeSumTransaction::packStream(
+   tbox::MessageStream& stream)
+{
+   d_src_level->getPatch(d_src_node.getLocalId())
+   ->getPatchData(s_refine_items[d_refine_item_id]->
+      d_src)
+   ->packStream(stream, *d_overlap);
+}
+
+void
+OuternodeSumTransaction::unpackStream(
+   tbox::MessageStream& stream)
+{
+   tbox::Pointer<pdat::OuternodeData<double> > onode_dst_data =
+      d_dst_level->getPatch(d_dst_node.getLocalId())->
+      getPatchData(s_refine_items[d_refine_item_id]->d_scratch);
+   TBOX_ASSERT(!onode_dst_data.isNull());
+
+   onode_dst_data->unpackStreamAndSum(stream, *d_overlap);
+}
+
+void
+OuternodeSumTransaction::copyLocalData()
+{
+   tbox::Pointer<pdat::OuternodeData<double> > onode_dst_data =
+      d_dst_level->getPatch(d_dst_node.getLocalId())->
+      getPatchData(s_refine_items[d_refine_item_id]->d_scratch);
+   TBOX_ASSERT(!onode_dst_data.isNull());
+
+   tbox::Pointer<pdat::OuternodeData<double> > onode_src_data =
+      d_src_level->getPatch(d_src_node.getLocalId())->
+      getPatchData(s_refine_items[d_refine_item_id]->d_src);
+   TBOX_ASSERT(!onode_src_data.isNull());
+
+   onode_dst_data->sum(*onode_src_data, *d_overlap);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Function to print state of transaction.                               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void OuternodeSumTransaction::printClassData(
+   std::ostream& stream) const
+{
+   stream << "Outernode Sum Transaction" << std::endl;
+   stream << "   refine item array:        "
+          << (xfer::RefineClasses::Data **)s_refine_items
+          << std::endl;
+   stream << "   num refine items:      " << s_num_refine_items << std::endl;
+   stream << "   destination node:       " << d_dst_node << std::endl;
+   stream << "   source node:            " << d_src_node << std::endl;
+   stream << "   refine item id:         " << d_refine_item_id << std::endl;
+   stream << "   destination patch data: "
+   << s_refine_items[d_refine_item_id]->d_scratch << std::endl;
+   stream << "   source patch data:      "
+   << s_refine_items[d_refine_item_id]->d_src << std::endl;
+   stream << "   incoming bytes:         " << d_incoming_bytes << std::endl;
+   stream << "   outgoing bytes:         " << d_outgoing_bytes << std::endl;
+   stream << "   destination level:           "
+          << (hier::PatchLevel *)d_src_level << std::endl;
+   stream << "   source level:           "
+          << (hier::PatchLevel *)d_src_level << std::endl;
+   stream << "   overlap:                " << std::endl;
+   d_overlap->print(stream);
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/OuternodeSumTransaction.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/OuternodeSumTransaction.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,187 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Communication transaction for summing outernode data 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_OuternodeSumTransaction
+#define included_algs_OuternodeSumTransaction
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/pdat/OuternodeData.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Transaction.h"
+#include "SAMRAI/xfer/RefineClasses.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace algs {
+
+/*!
+ * @brief Class OuternodeSumTransaction represents a single outernode data sum
+ * communication transaction between two processors or a local data sum for refine schedules.
+ * Note that to there is an implicit hand-shaking between objects of this class and
+ * the xfer::RefineSchedule object that constructs them.  Following the refine
+ * schedule implementation, the source patch data index for a transaction always refers
+ * to the source data and the destination patch data index for a transaction is always
+ * the scratch data, all as defined in the xfer::RefineClasses class.
+ *
+ * @see xfer::RefineSchedule
+ * @see xfer::RefineClasses
+ * @see tbox::Schedule
+ * @see tbox::Transaction
+ */
+
+class OuternodeSumTransaction:public tbox::Transaction
+{
+public:
+   /*!
+    * Static member function to set the array of refine class data items that
+    * is shared by all object instances of this sum transaction class during
+    * data transfers.  The array must be set before any transactions are executed.
+    * The array is set in the xfer::RefineSchedule class.
+    */
+   static void
+   setRefineItems(
+      const xfer::RefineClasses::Data** refine_items,
+      int num_refine_items);
+
+   /*!
+    * Static member function to unset the array of refine class data items that
+    * is shared by all object instances of this sum transaction class during
+    * data transfers.  The unset function is used to prevent erroneous execution
+    * of different schedules.  The array is unset in the RefineSchedule class.
+    */
+   static void
+   unsetRefineItems();
+
+   /*!
+    * Construct a transaction with the specified source and destination
+    * levels, patches, and patch data components found in the refine class
+    * item with the given id owned by the calling refine schedule.  In
+    * general, this constructor is called by a xfer::RefineSchedule
+    * object for each data transaction (specifically summing outernode
+    * data) that must occur.  This transaction will be responsible for one
+    * of the following: (1) a local data copy and sum, or (2) packing a
+    * message stream with source patch data, or (3) unpacking and summing
+    * destination patch data from a message stream.
+    *
+    * @param dst_level        Pointer to destination patch level.
+    * @param src_level        Pointer to source patch level.
+    * @param overlap          Pointer to overlap region between patches.
+    * @param dst_patch        Integer index of destination patch in destination
+    *                         patch level.
+    * @param src_patch        Integer index of source patch in source patch level.
+    * @param refine_item_id   Integer id of refine data item owned by refine schedule.
+    *
+    * When assertion checking is active, an assertion will result if any of the pointer
+    * arguments is null, or if any of the integer arguments is invalid (i.e., < 0).
+    */
+   OuternodeSumTransaction(
+      tbox::Pointer<hier::PatchLevel> dst_level,
+      tbox::Pointer<hier::PatchLevel> src_level,
+      tbox::Pointer<hier::BoxOverlap> overlap,
+      const hier::MappedBox& dst_node,
+      const hier::MappedBox& src_node,
+      int refine_item_id);
+
+   /*!
+    * The virtual destructor for the copy transaction releases all
+    * memory associated with the transaction.
+    */
+   virtual ~OuternodeSumTransaction();
+
+   /*!
+    * Return a boolean indicating whether this transaction can estimate
+    * the size of an incoming message.  If this is false, then a different
+    * communication protocol kicks in and the message size is transmitted
+    * between nodes.
+    */
+   virtual bool
+   canEstimateIncomingMessageSize();
+
+   /*!
+    * Return the integer buffer space (in bytes) needed for the incoming message.
+    * This routine is only called if the transaction can estimate the
+    * size of the incoming message.  See canEstimateIncomingMessageSize().
+    */
+   virtual size_t
+   computeIncomingMessageSize();
+
+   /*!
+    * Return the integer buffer space (in bytes) needed for the outgoing message.
+    */
+   virtual size_t
+   computeOutgoingMessageSize();
+
+   /*!
+    * Return the sending processor number for the communications transaction.
+    */
+   virtual int
+   getSourceProcessor();
+
+   /*!
+    * Return the receiving processor number for the communications transaction.
+    */
+   virtual int
+   getDestinationProcessor();
+
+   /*!
+    * Pack the transaction data into the message stream.
+    */
+   virtual void
+   packStream(
+      tbox::MessageStream& stream);
+
+   /*!
+    * Unpack the transaction data from the message stream.
+    */
+   virtual void
+   unpackStream(
+      tbox::MessageStream& stream);
+
+   /*!
+    * Perform the local data copy for the transaction.
+    */
+   virtual void
+   copyLocalData();
+
+   /*!
+    * Print out transaction information.
+    */
+   virtual void
+   printClassData(
+      std::ostream& stream) const;
+
+private:
+   OuternodeSumTransaction(
+      const OuternodeSumTransaction&);                      // not implemented
+   void
+   operator = (
+      const OuternodeSumTransaction&);             // not implemented
+
+   static const xfer::RefineClasses::Data** s_refine_items;
+   static int s_num_refine_items;
+
+   tbox::Pointer<hier::PatchLevel> d_dst_level;
+   tbox::Pointer<hier::PatchLevel> d_src_level;
+   tbox::Pointer<hier::BoxOverlap> d_overlap;
+   hier::MappedBox d_dst_node;
+   hier::MappedBox d_src_node;
+   int d_refine_item_id;
+   int d_incoming_bytes;
+   int d_outgoing_bytes;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/OuternodeSumTransactionFactory.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/OuternodeSumTransactionFactory.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,149 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory for creating outernode sum transaction objects 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_OuternodeSumTransactionFactory_C
+#define included_algs_OuternodeSumTransactionFactory_C
+
+#include "SAMRAI/algs/OuternodeSumTransactionFactory.h"
+#include "SAMRAI/algs/OuternodeSumTransaction.h"
+
+namespace SAMRAI {
+namespace algs {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default constructor and destructor.                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+OuternodeSumTransactionFactory::OuternodeSumTransactionFactory()
+{
+}
+
+OuternodeSumTransactionFactory::~OuternodeSumTransactionFactory()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set/unset information for transactions managed by this factory class. *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void OuternodeSumTransactionFactory::setRefineItems(
+   const xfer::RefineClasses::Data** refine_items,
+   int num_refine_items)
+{
+   algs::OuternodeSumTransaction::setRefineItems(refine_items,
+      num_refine_items);
+   d_refine_items = refine_items;
+   d_number_refine_items = num_refine_items;
+}
+
+void OuternodeSumTransactionFactory::unsetRefineItems()
+{
+   OuternodeSumTransaction::unsetRefineItems();
+   d_refine_items = (const xfer::RefineClasses::Data **)NULL;
+   d_number_refine_items = 0;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Allocate outernode sum transaction object.                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<tbox::Transaction>
+OuternodeSumTransactionFactory::allocate(
+   tbox::Pointer<hier::PatchLevel> dst_level,
+   tbox::Pointer<hier::PatchLevel> src_level,
+   tbox::Pointer<hier::BoxOverlap> overlap,
+   const hier::MappedBox& dst_node,
+   const hier::MappedBox& src_node,
+   int ritem_id,
+   const hier::Box& box,
+   bool use_time_interpolation) const
+{
+   NULL_USE(box);
+   NULL_USE(use_time_interpolation);
+
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst_level, *src_level, dst_node, src_node);
+
+   OuternodeSumTransaction* transaction =
+      new OuternodeSumTransaction(dst_level,
+         src_level,
+         overlap,
+         dst_node,
+         src_node,
+         ritem_id);
+   return tbox::Pointer<tbox::Transaction>(transaction);
+}
+
+tbox::Pointer<tbox::Transaction>
+OuternodeSumTransactionFactory::allocate(
+   tbox::Pointer<hier::PatchLevel> dst_level,
+   tbox::Pointer<hier::PatchLevel> src_level,
+   tbox::Pointer<hier::BoxOverlap> overlap,
+   const hier::MappedBox& dst_node,
+   const hier::MappedBox& src_node,
+   int ritem_id) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst_level, *src_level, dst_node, src_node);
+
+   return allocate(dst_level,
+      src_level,
+      overlap,
+      dst_node,
+      src_node,
+      ritem_id,
+      hier::Box(dst_level->getDim()),
+      false);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialize (to 0.0) scratch storage for sum transactions.             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void OuternodeSumTransactionFactory::preprocessScratchSpace(
+   tbox::Pointer<hier::PatchLevel> level,
+   double fill_time,
+   const hier::ComponentSelector& preprocess_vector) const
+{
+   NULL_USE(fill_time);
+   TBOX_ASSERT(!level.isNull());
+
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      const int ncomponents = preprocess_vector.getSize();
+      for (int n = 0; n < ncomponents; ++n) {
+         if (preprocess_vector.isSet(n)) {
+            tbox::Pointer<pdat::OuternodeData<double> > onode_data =
+               patch->getPatchData(n);
+            onode_data->fillAll(0.0);
+         }
+      }
+
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/OuternodeSumTransactionFactory.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/OuternodeSumTransactionFactory.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,137 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory for creating outernode sum transaction objects 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_OuternodeSumTransactionFactory
+#define included_algs_OuternodeSumTransactionFactory
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/ComponentSelector.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/xfer/RefineClasses.h"
+#include "SAMRAI/xfer/RefineTransactionFactory.h"
+
+namespace SAMRAI {
+namespace algs {
+
+/*!
+ * @brief Concrete subclass of the xfer::RefineTransactionFactory base class that
+ * allocates transaction outernode sum objects for a xfer::RefineSchedule object.
+ *
+ * @see xfer::RefineTransactionFactory
+ * @see xfer::OuternodeSumTransaction
+ */
+
+class OuternodeSumTransactionFactory:public xfer::RefineTransactionFactory
+{
+public:
+   /*!
+    * @brief Default constructor.
+    */
+   OuternodeSumTransactionFactory();
+
+   /*!
+    * @brief Virtual destructor for base class.
+    */
+   virtual ~OuternodeSumTransactionFactory();
+
+   /*!
+    * @brief Set the array of xfer::RefineClass<DIM>::Data items used by the transactions.
+    */
+   void
+   setRefineItems(
+      const xfer::RefineClasses::Data** refine_items,
+      int num_refine_items);
+
+   /*!
+    * @brief Clear the array of xfer::RefineClass<DIM>::Data items used by the transactions.
+    */
+   void
+   unsetRefineItems();
+
+   /*!
+    * @brief Allocate an OuternodeSumTransaction object.
+    *
+    * @param dst_level      tbox::Pointer to destination patch level.
+    * @param src_level      tbox::Pointer to source patch level.
+    * @param overlap        tbox::Pointer to overlap region between patches.
+    * @param dst_patch_id   Integer index of destination patch in destination
+    *                       patch level.
+    * @param src_patch_id   Integer index of source patch in source patch level.
+    * @param ritem_id       Integer index of xfer::RefineClass<DIM>::Data item
+    *                       associated with transaction.
+    * @param box            Const reference to box defining region of
+    *                       refine transaction.  Use following allocate method
+    *                       if not needed.
+    * @param use_time_interpolation  Optional boolean flag indicating whether the
+    *                       refine transaction involves time interpolation.
+    *                       Default is false.
+    */
+   tbox::Pointer<tbox::Transaction>
+   allocate(
+      tbox::Pointer<hier::PatchLevel> dst_level,
+      tbox::Pointer<hier::PatchLevel> src_level,
+      tbox::Pointer<hier::BoxOverlap> overlap,
+      const hier::MappedBox& dst_node,
+      const hier::MappedBox& src_node,
+      int ritem_id,
+      const hier::Box& box,
+      bool use_time_interpolation = false) const;
+
+   /*!
+    * @brief Allocate an OuternodeSumTransaction object.
+    *
+    * Same as previous allocate routine but with default empty box and no
+    * timer interpolation.
+    */
+   tbox::Pointer<tbox::Transaction>
+   allocate(
+      tbox::Pointer<hier::PatchLevel> dst_level,
+      tbox::Pointer<hier::PatchLevel> src_level,
+      tbox::Pointer<hier::BoxOverlap> overlap,
+      const hier::MappedBox& dst_node,
+      const hier::MappedBox& src_node,
+      int ritem_id) const;
+
+   /*!
+    * @brief Function to initialize scratch space data for the sum transactions
+    * (patch data components indicated by the component selector) to zero.
+    *
+    * @param level        tbox::Pointer to patch level holding scratch data.
+    * @param fill_time    Double value of simulation time at which preprocess
+    *                     operation is called.
+    * @param preprocess_vector Const reference to hier::ComponentSelector indicating
+    *                     patch data array indices of scratch patch data objects
+    *                     to preprocess.
+    */
+   void
+   preprocessScratchSpace(
+      tbox::Pointer<hier::PatchLevel> level,
+      double fill_time,
+      const hier::ComponentSelector& preprocess_vector) const;
+
+private:
+   // The following two functions are not implemented
+   OuternodeSumTransactionFactory(
+      const OuternodeSumTransactionFactory&);
+   void
+   operator = (
+      const OuternodeSumTransactionFactory&);
+
+   const xfer::RefineClasses::Data** d_refine_items;
+   int d_number_refine_items;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/PatchBoundaryEdgeSum.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/PatchBoundaryEdgeSum.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,407 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Routines for summing edge data at patch boundaries 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_PatchBoundaryEdgeSum_C
+#define included_algs_PatchBoundaryEdgeSum_C
+
+#include "SAMRAI/algs/PatchBoundaryEdgeSum.h"
+
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/pdat/EdgeDataFactory.h"
+#include "SAMRAI/pdat/OuteredgeData.h"
+#include "SAMRAI/algs/OuteredgeSumTransactionFactory.h"
+#include "SAMRAI/xfer/RefineAlgorithm.h"
+#include "SAMRAI/xfer/RefinePatchStrategy.h"
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace algs {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialize the static data members.                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int PatchBoundaryEdgeSum::s_instance_counter = 0;
+
+tbox::Array<tbox::Array<int> >
+PatchBoundaryEdgeSum::s_oedge_src_id_array =
+   tbox::Array<tbox::Array<int> >(0);
+tbox::Array<tbox::Array<int> >
+PatchBoundaryEdgeSum::s_oedge_dst_id_array =
+   tbox::Array<tbox::Array<int> >(0);
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Static functions to determine number of patch data slots needed       *
+ * for PatchBoundaryEdgeSum objects.                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int
+PatchBoundaryEdgeSum::getNumSharedPatchDataSlots(
+   int max_variables_to_register)
+{
+   // edge boundary sum requires two internal outeredge variables
+   // (source and destination) for each registered variable.
+
+   return 2 * max_variables_to_register;
+}
+
+int
+PatchBoundaryEdgeSum::getNumUniquePatchDataSlots(
+   int max_variables_to_register)
+{
+   NULL_USE(max_variables_to_register);
+   // all patch data slots used by edge boundary sum are static
+   // and shared among all objects.
+
+   return 0;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor patch boundary edge sum objects initializes data members  *
+ * to default (undefined) states.                                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+PatchBoundaryEdgeSum::PatchBoundaryEdgeSum(
+   const std::string& object_name)
+{
+   TBOX_ASSERT(!object_name.empty());
+
+   d_object_name = object_name;
+   d_setup_called = false;
+
+   d_num_reg_sum = 0;
+
+   d_level.setNull();
+
+   d_sum_transaction_factory = new OuteredgeSumTransactionFactory();
+
+   s_instance_counter++;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destructor removes temporary outeredge patch data ids from            *
+ * variable database, if defined.                                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+PatchBoundaryEdgeSum::~PatchBoundaryEdgeSum()
+{
+
+   s_instance_counter--;
+   if (s_instance_counter == 0) {
+      const int arr_length_depth = s_oedge_src_id_array.size();
+      for (int id = 0; id < arr_length_depth; id++) {
+         const int arr_length_nvar = s_oedge_src_id_array[id].size();
+
+         for (int iv = 0; iv < arr_length_nvar; iv++) {
+
+            if (s_oedge_src_id_array[id][iv] >= 0) {
+               hier::VariableDatabase::getDatabase()->
+               removeInternalSAMRAIVariablePatchDataIndex(
+                  s_oedge_src_id_array[id][iv]);
+            }
+            if (s_oedge_dst_id_array[id][iv] >= 0) {
+               hier::VariableDatabase::getDatabase()->
+               removeInternalSAMRAIVariablePatchDataIndex(
+                  s_oedge_dst_id_array[id][iv]);
+            }
+
+            s_oedge_src_id_array[id].resizeArray(0);
+            s_oedge_dst_id_array[id].resizeArray(0);
+
+         }
+      }
+
+      s_oedge_src_id_array.resizeArray(0);
+      s_oedge_dst_id_array.resizeArray(0);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register edge patch data index for summation.                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchBoundaryEdgeSum::registerSum(
+   int edge_data_id)
+{
+   if (d_setup_called) {
+      TBOX_ERROR("PatchBoundaryEdgeSum::register error..."
+         << "\nobject named " << d_object_name
+         << "\nCannot call registerSum with this PatchBoundaryEdgeSum"
+         << "\nobject since it has already been used to create communication"
+         << "\nschedules; i.e., setupSum() has been called."
+         << std::endl);
+   }
+
+   if (edge_data_id < 0) {
+      TBOX_ERROR("PatchBoundaryEdgeSum register error..."
+         << "\nobject named " << d_object_name
+         << "\n edge_data_id = " << edge_data_id
+         << " is an invalid patch data identifier." << std::endl);
+   }
+
+   hier::VariableDatabase* var_db = hier::VariableDatabase::getDatabase();
+
+   tbox::Pointer<pdat::EdgeDataFactory<double> > edge_factory =
+      var_db->getPatchDescriptor()->getPatchDataFactory(edge_data_id);
+
+   if (edge_factory.isNull()) {
+
+      TBOX_ERROR("PatchBoundaryEdgeSum register error..."
+         << "\nobject named " << d_object_name
+         << "\n edge_data_id = " << edge_data_id
+         << " does not correspond to edge data of type double." << std::endl);
+
+   } else {
+
+      const tbox::Dimension& dim(edge_factory->getDim());
+
+      static std::string tmp_oedge_src_variable_name(
+         "PatchBoundaryEdgeSum__internal-oedge-src");
+      static std::string tmp_oedge_dst_variable_name(
+         "PatchBoundaryEdgeSum__internal-oedge-dst");
+
+      const int reg_sum_id = d_num_reg_sum;
+
+      d_num_reg_sum++;
+
+      d_user_edge_data_id.resizeArray(d_num_reg_sum);
+      d_user_edge_data_id[reg_sum_id] = ID_UNDEFINED;
+      d_user_edge_depth.resizeArray(d_num_reg_sum);
+      d_user_edge_depth[reg_sum_id] = ID_UNDEFINED;
+      d_tmp_oedge_src_variable.resizeArray(d_num_reg_sum);
+      d_tmp_oedge_dst_variable.resizeArray(d_num_reg_sum);
+      d_oedge_src_id.resizeArray(d_num_reg_sum);
+      d_oedge_src_id[reg_sum_id] = ID_UNDEFINED;
+      d_oedge_dst_id.resizeArray(d_num_reg_sum);
+      d_oedge_dst_id[reg_sum_id] = ID_UNDEFINED;
+
+      const int data_depth = edge_factory->getDepth();
+      const int array_by_depth_size = data_depth + 1;
+
+      if (d_num_registered_data_by_depth.size() < array_by_depth_size) {
+         const int old_size = d_num_registered_data_by_depth.size();
+         const int new_size = array_by_depth_size;
+
+         d_num_registered_data_by_depth.resizeArray(new_size);
+         for (int i = old_size; i < new_size; i++) {
+            d_num_registered_data_by_depth[i] = 0;
+         }
+      }
+
+      const int data_depth_id = d_num_registered_data_by_depth[data_depth];
+      const int num_data_at_depth = data_depth_id + 1;
+
+      if (s_oedge_src_id_array.size() < array_by_depth_size) {
+         s_oedge_src_id_array.resizeArray(array_by_depth_size);
+         s_oedge_dst_id_array.resizeArray(array_by_depth_size);
+      }
+
+      if (s_oedge_src_id_array[data_depth].size() < num_data_at_depth) {
+         const int old_size = s_oedge_src_id_array[data_depth].size();
+         const int new_size = num_data_at_depth;
+
+         s_oedge_src_id_array[data_depth].resizeArray(new_size);
+         s_oedge_dst_id_array[data_depth].resizeArray(new_size);
+         for (int i = old_size; i < new_size; i++) {
+            s_oedge_src_id_array[data_depth][i] = ID_UNDEFINED;
+            s_oedge_dst_id_array[data_depth][i] = ID_UNDEFINED;
+         }
+      }
+
+      std::string var_suffix = tbox::Utilities::intToString(data_depth_id, 4)
+         + "__depth=" + tbox::Utilities::intToString(data_depth);
+
+      std::string toedge_src_var_name = tmp_oedge_src_variable_name
+         + var_suffix;
+      d_tmp_oedge_src_variable[reg_sum_id] = var_db->getVariable(
+            toedge_src_var_name);
+      if (d_tmp_oedge_src_variable[reg_sum_id].isNull()) {
+         d_tmp_oedge_src_variable[reg_sum_id] =
+            new pdat::OuteredgeVariable<double>(dim,
+                                                toedge_src_var_name,
+                                                data_depth);
+      }
+
+      std::string toedge_dst_var_name = tmp_oedge_dst_variable_name
+         + var_suffix;
+      d_tmp_oedge_dst_variable[reg_sum_id] = var_db->getVariable(
+            toedge_dst_var_name);
+      if (d_tmp_oedge_dst_variable[reg_sum_id].isNull()) {
+         d_tmp_oedge_dst_variable[reg_sum_id] =
+            new pdat::OuteredgeVariable<double>(dim,
+                                                toedge_dst_var_name,
+                                                data_depth);
+      }
+
+      if (s_oedge_src_id_array[data_depth][data_depth_id] < 0) {
+         s_oedge_src_id_array[data_depth][data_depth_id] =
+            var_db->registerInternalSAMRAIVariable(
+               d_tmp_oedge_src_variable[reg_sum_id],
+               hier::IntVector::getZero(dim));
+      }
+      if (s_oedge_dst_id_array[data_depth][data_depth_id] < 0) {
+         s_oedge_dst_id_array[data_depth][data_depth_id] =
+            var_db->registerInternalSAMRAIVariable(
+               d_tmp_oedge_dst_variable[reg_sum_id],
+               hier::IntVector::getZero(dim));
+      }
+
+      d_user_edge_data_id[reg_sum_id] = edge_data_id;
+      d_user_edge_depth[reg_sum_id] = data_depth;
+
+      d_num_registered_data_by_depth[data_depth] = num_data_at_depth;
+
+      d_oedge_src_id[reg_sum_id] =
+         s_oedge_src_id_array[data_depth][data_depth_id];
+      d_oedge_dst_id[reg_sum_id] =
+         s_oedge_dst_id_array[data_depth][data_depth_id];
+
+      d_oedge_src_data_set.setFlag(d_oedge_src_id[reg_sum_id]);
+      d_oedge_dst_data_set.setFlag(d_oedge_dst_id[reg_sum_id]);
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set up schedule to sum edge data around patch boundaries              *
+ * on a single level.                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchBoundaryEdgeSum::setupSum(
+   tbox::Pointer<hier::PatchLevel> level)
+{
+   TBOX_ASSERT(!level.isNull());
+
+   const tbox::Dimension& dim(level->getDim());
+
+   d_setup_called = true;
+
+   d_level = level;
+
+   // Communication algorithm for summing outeredge values on a level
+   xfer::RefineAlgorithm single_level_sum_algorithm(dim);
+
+   for (int i = 0; i < d_num_reg_sum; i++) {
+      single_level_sum_algorithm.registerRefine(d_oedge_dst_id[i],  // dst data
+         d_oedge_src_id[i],                                         // src data
+         d_oedge_dst_id[i],                                         // scratch data
+         tbox::Pointer<SAMRAI::xfer::RefineOperator>(NULL));
+   }
+
+   d_single_level_sum_schedule =
+      single_level_sum_algorithm.createSchedule(
+         d_level,
+         (xfer::RefinePatchStrategy *)NULL,
+         d_sum_transaction_factory);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Perform patch boundary edge sum across single level or multiple       *
+ * hierarchy levels depending on how object was initialized.             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchBoundaryEdgeSum::computeSum() const
+{
+   d_level->allocatePatchData(d_oedge_src_data_set);
+   d_level->allocatePatchData(d_oedge_dst_data_set);
+
+   doLevelSum(d_level);
+
+   d_level->deallocatePatchData(d_oedge_src_data_set);
+   d_level->deallocatePatchData(d_oedge_dst_data_set);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private member function that performs edge sum across single level.   *
+ *                                                                       *
+ * 1. Copy edge data to local outeredge data.                            *
+ * 2. Transfer and sum outeredge data.                                   *
+ * 3. Copy outeredge data back to edge data.                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchBoundaryEdgeSum::doLevelSum(
+   tbox::Pointer<hier::PatchLevel> level) const
+{
+   TBOX_ASSERT(!level.isNull());
+
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      for (int i = 0; i < d_user_edge_data_id.size(); i++) {
+         tbox::Pointer<pdat::EdgeData<double> > edge_data =
+            patch->getPatchData(d_user_edge_data_id[i]);
+         tbox::Pointer<pdat::OuteredgeData<double> > oedge_data =
+            patch->getPatchData(d_oedge_src_id[i]);
+
+         oedge_data->copy(*edge_data);
+
+      }
+   }
+
+   d_single_level_sum_schedule->fillData(0.0, false);
+
+   for (hier::PatchLevel::Iterator ip2(level); ip2; ip2++) {
+      tbox::Pointer<hier::Patch> patch = *ip2;
+
+      for (int i = 0; i < d_user_edge_data_id.size(); i++) {
+         tbox::Pointer<pdat::EdgeData<double> > edge_data =
+            patch->getPatchData(d_user_edge_data_id[i]);
+         tbox::Pointer<pdat::OuteredgeData<double> > oedge_data =
+            patch->getPatchData(d_oedge_dst_id[i]);
+
+         oedge_data->copy2(*edge_data);
+
+      }
+   }
+
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/PatchBoundaryEdgeSum.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/PatchBoundaryEdgeSum.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,207 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Routines for summing edge data at patch boundaries 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_PatchBoundaryEdgeSum
+#define included_algs_PatchBoundaryEdgeSum
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/pdat/EdgeVariable.h"
+#include "SAMRAI/pdat/OuteredgeVariable.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/xfer/RefineSchedule.h"
+#include "SAMRAI/xfer/RefineTransactionFactory.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace algs {
+
+/*!
+ *  @brief Class PatchBoundaryEdgeSum provides operations summing edge data
+ *  values at edges that are shared by multiple patches on a single level.
+ *  Note that this utility only works on a SINGLE patch level, not on a multiple
+ *  levels in an AMR patch hierarchy like the PatchBoundaryNodeSum class.   Unlike
+ *  node data, edge data at coarse-fine boundaries are not co-located, so the sum
+ *  operation is not clearly defined.
+ *
+ *  Usage of a patch boundry edge sum involves the following sequence of steps:
+ *
+ *  -# Construct a patch boundry edge sum object.  For example,
+ *     \verbatim
+ *         PatchBoundaryEdgeSum my_edge_sum("My Edge Sum");
+ *     \endverbatim
+ *  -# Register edge data quantities to sum.  For example,
+ *     \verbatim
+ *         my_edge_sum.registerSum(edge_data_id1);
+ *         my_edge_sum.registerSum(edge_data_id2);
+ *         etc...
+ *     \endverbatim
+ *  -# Setup the sum operations for a single level.  For example,
+ *     \verbatim
+ *         my_edge_sum.setupSum(level);
+ *     \endverbatim
+ *  -# Execute the sum operation.  For example,
+ *     \verbatim
+ *         my_edge_sum.computeSum()
+ *     \endverbatim
+ *
+ *  The result of these operations is that each edge patch data value associated
+ *  with the registered ids at patch boundaries on the level is replaced by the
+ *  sum of all data values at the edge.
+ */
+
+class PatchBoundaryEdgeSum
+{
+public:
+   /*!
+    *  @brief Static function used to predetermine number of patch data
+    *         slots ahared among all PatchBoundaryEdgeSum
+    *         objects (i.e., static members).  To get a correct count,
+    *         this routine should only be called once.
+    *
+    *  @return integer number of internal patch data slots required
+    *          to perform sum.
+    *  @param max_variables_to_register integer value indicating
+    *          maximum number of patch data ids that will be registered
+    *          with edge sum objects.
+    */
+   static int
+   getNumSharedPatchDataSlots(
+      int max_variables_to_register);
+
+   /*!
+    *  @brief Static function used to predetermine number of patch data
+    *         slots unique to each PatchBoundaryEdgeSum
+    *         object (i.e., non-static members).  To get a correct count,
+    *         this routine should be called exactly once for each object
+    *         that will be constructed.
+    *
+    *  @return integer number of internal patch data slots required
+    *          to perform sum.
+    *  @param max_variables_to_register integer value indicating
+    *          maximum number of patch data ids that will be registered
+    *          with edge sum objects.
+    */
+   static int
+   getNumUniquePatchDataSlots(
+      int max_variables_to_register);
+
+   /*!
+    *  @brief Constructor initializes object to default (mostly undefined)
+    *  state.
+    *
+    *  @param object_name const std::string reference for name of object used
+    *  in error reporting.  When assertion checking is on, the string
+    *  cannot be empty.
+    */
+   PatchBoundaryEdgeSum(
+      const std::string& object_name);
+
+   /*!
+    *  @brief Destructor for the schedule releases all internal storage.
+    */
+   ~PatchBoundaryEdgeSum();
+
+   /*!
+    *  @brief Register edge data with given patch data identifier for summing.
+    *
+    *  @param edge_data_id  integer patch data index for edge data to sum
+    *
+    *  The edge data id must be a valid patch data id (>=0) and must
+    *  correspond to edge-centered double data.  If not, an error will result.
+    */
+   void
+   registerSum(
+      int edge_data_id);
+
+   /*!
+    *  @brief Set up summation operations for edge data across shared edges
+    *         on a single level.
+    *
+    *  @param level         pointer to level on which to perform edge sum
+    *
+    *  When assertion checking is active, the level pointer cannot be null.
+    */
+   void
+   setupSum(
+      tbox::Pointer<hier::PatchLevel> level);
+
+   /*!
+    *  @brief Compute sum of edge values at each shared edge and replace
+    *         each such edge value with the corresponding sum.
+    *
+    *  At the end of this method, all values at shared edge locations on
+    *  patch boundaries will have the same value.
+    */
+   void
+   computeSum() const;
+
+private:
+   /*
+    * Private member function to perform edge sum across single level --
+    * called from computeSum()
+    */
+   void
+   doLevelSum(
+      tbox::Pointer<hier::PatchLevel> level) const;
+
+   /*
+    * Static members for managing shared temporary data among multiple
+    * PatchBoundaryEdgeSum objects.
+    */
+   static int s_instance_counter;
+   // These arrays are indexed [data depth][number of variables with depth]
+   static tbox::Array<tbox::Array<int> > s_oedge_src_id_array;
+   static tbox::Array<tbox::Array<int> > s_oedge_dst_id_array;
+
+   enum PATCH_BDRY_EDGE_SUM_DATA_ID { ID_UNDEFINED = -1 };
+
+   std::string d_object_name;
+   bool d_setup_called;
+
+   int d_num_reg_sum;
+
+   // These arrays are indexed [variable registration sequence number]
+   tbox::Array<int> d_user_edge_data_id;
+   tbox::Array<int> d_user_edge_depth;
+
+   // These arrays are indexed [data depth]
+   tbox::Array<int> d_num_registered_data_by_depth;
+
+   /*
+    * Edge-centered variables and patch data indices used as internal work quantities.
+    */
+   // These arrays are indexed [variable registration sequence number]
+   tbox::Array<tbox::Pointer<hier::Variable> > d_tmp_oedge_src_variable;
+   tbox::Array<tbox::Pointer<hier::Variable> > d_tmp_oedge_dst_variable;
+
+   // These arrays are indexed [variable registration sequence number]
+   tbox::Array<int> d_oedge_src_id;
+   tbox::Array<int> d_oedge_dst_id;
+
+   /*
+    * Sets of indices for temporary variables to expedite allocation/deallocation.
+    */
+   hier::ComponentSelector d_oedge_src_data_set;
+   hier::ComponentSelector d_oedge_dst_data_set;
+
+   tbox::Pointer<hier::PatchLevel> d_level;
+
+   tbox::Pointer<xfer::RefineTransactionFactory> d_sum_transaction_factory;
+
+   tbox::Pointer<xfer::RefineSchedule> d_single_level_sum_schedule;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/PatchBoundaryNodeSum.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/PatchBoundaryNodeSum.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1136 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Routines for summing node data at patch boundaries 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_PatchBoundaryNodeSum_C
+#define included_algs_PatchBoundaryNodeSum_C
+
+#include "SAMRAI/algs/PatchBoundaryNodeSum.h"
+
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeDataFactory.h"
+#include "SAMRAI/pdat/NodeGeometry.h"
+#include "SAMRAI/pdat/OuternodeData.h"
+#include "SAMRAI/pdat/OuternodeDoubleConstantCoarsen.h"
+#include "SAMRAI/algs/OuternodeSumTransactionFactory.h"
+#include "SAMRAI/xfer/CoarsenAlgorithm.h"
+#include "SAMRAI/hier/OverlapConnectorAlgorithm.h"
+#include "SAMRAI/xfer/RefineAlgorithm.h"
+#include "SAMRAI/xfer/RefinePatchStrategy.h"
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN 77 routines used to sum node and    *
+ * outernode data.                                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in algs_nodeouternodeops2d.f:
+void F77_FUNC(nodeouternodesum2d, NODEOUTERNODESUM2D) (
+   const int &, const int &,   // fine patch lo
+   const int &, const int &,   // fine patch hi
+   const int &, const int &,   // coarse patch lo
+   const int &, const int &,   // coarse patch hi
+   const int *,                // ratio vector
+   const int &,                // data depth
+   const int &, const int &,   // node data gcw
+   double *,                   // node array
+   const double *, const double *,   // onode arrays
+   const double *, const double *);
+
+void F77_FUNC(nodehangnodeinterp2d, NODEHANGNODEINTERP2D) (
+   const int &, const int &,  // fine patch lo
+   const int &, const int &,  // fine patch hi
+   const int &, const int &,  // coarse patch lo
+   const int &, const int &,  // coarse patch hi
+   const int &, const int &,  // bbox lo
+   const int &, const int &,  // bbox hi
+   const int &,               // bbox location
+   const int *,               // ratio vector
+   const int &,               // data depth
+   const int &, const int &,  // node data gcw
+   double *);                 // node array
+
+// in algs_nodeouternodeops3d.f:
+void F77_FUNC(nodeouternodesum3d, NODEOUTERNODESUM3D) (
+   const int &, const int &, const int &, // fine patch lo
+   const int &, const int &, const int &, // fine patch hi
+   const int &, const int &, const int &, // coarse patch lo
+   const int &, const int &, const int &, // coarse patch hi
+   const int *,                           // ratio vector
+   const int &,                           // data depth
+   const int &, const int &, const int &, // node data gcw
+   double *,                              // node array
+   const double *, const double *,        // onode arrays
+   const double *, const double *,
+   const double *, const double *);
+
+void F77_FUNC(nodehangnodeinterp3d, NODEHANGNODEINTERP3D) (
+   const int &, const int &, const int &, // fine patch lo
+   const int &, const int &, const int &, // fine patch hi
+   const int &, const int &, const int &, // coarse patch lo
+   const int &, const int &, const int &, // coarse patch hi
+   const int &, const int &, const int &, // bbox lo
+   const int &, const int &, const int &, // bbox hi
+   const int &,                           // bbox location
+   const int *,                           // ratio vector
+   const int &,                           // data depth
+   const int &, const int &, const int &, // node data gcw
+   double *);                             // node array
+}
+
+namespace SAMRAI {
+namespace algs {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialize the static data members.                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int PatchBoundaryNodeSum::s_instance_counter = 0;
+
+tbox::Array<tbox::Array<int> >
+PatchBoundaryNodeSum::s_onode_src_id_array =
+   tbox::Array<tbox::Array<int> >(0);
+tbox::Array<tbox::Array<int> >
+PatchBoundaryNodeSum::s_onode_dst_id_array =
+   tbox::Array<tbox::Array<int> >(0);
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Static functions to determine number of patch data slots needed       *
+ * for PatchBoundaryNodeSum objects.                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int
+PatchBoundaryNodeSum::getNumSharedPatchDataSlots(
+   int max_variables_to_register)
+{
+   // node boundary sum requires two internal outernode variables
+   // (source and destination) for each registered variable.
+
+   return 2 * max_variables_to_register;
+}
+
+int
+PatchBoundaryNodeSum::getNumUniquePatchDataSlots(
+   int max_variables_to_register)
+{
+   NULL_USE(max_variables_to_register);
+   // all patch data slots used by node boundary sum are static
+   // and shared among all objects.
+
+   return 0;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor patch boundary node sum objects initializes data members  *
+ * to default (undefined) states.                                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+PatchBoundaryNodeSum::PatchBoundaryNodeSum(
+   const std::string& object_name)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!object_name.empty());
+#endif
+
+   d_object_name = object_name;
+   d_setup_called = false;
+
+   d_num_reg_sum = 0;
+
+   d_level.setNull();
+   d_hierarchy.setNull();
+   d_coarsest_level = -1;
+   d_finest_level = -1;
+
+   d_level_setup_called = false;
+   d_hierarchy_setup_called = false;
+
+   d_sum_transaction_factory = new OuternodeSumTransactionFactory();
+
+   s_instance_counter++;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destructor removes temporary outernode patch data ids from            *
+ * variable database, if defined.                                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+PatchBoundaryNodeSum::~PatchBoundaryNodeSum()
+{
+
+   s_instance_counter--;
+   if (s_instance_counter == 0) {
+      const int arr_length_depth = s_onode_src_id_array.size();
+
+      for (int id = 0; id < arr_length_depth; id++) {
+         const int arr_length_nvar = s_onode_src_id_array[id].size();
+
+         for (int iv = 0; iv < arr_length_nvar; iv++) {
+
+            if (s_onode_src_id_array[id][iv] >= 0) {
+               hier::VariableDatabase::getDatabase()->
+               removeInternalSAMRAIVariablePatchDataIndex(
+                  s_onode_src_id_array[id][iv]);
+            }
+            if (s_onode_dst_id_array[id][iv] >= 0) {
+               hier::VariableDatabase::getDatabase()->
+               removeInternalSAMRAIVariablePatchDataIndex(
+                  s_onode_dst_id_array[id][iv]);
+            }
+
+            s_onode_src_id_array[id].resizeArray(0);
+            s_onode_dst_id_array[id].resizeArray(0);
+
+         }
+
+      }
+
+      s_onode_src_id_array.resizeArray(0);
+      s_onode_dst_id_array.resizeArray(0);
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register node patch data index for summation.                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchBoundaryNodeSum::registerSum(
+   int node_data_id)
+{
+
+   if (d_setup_called) {
+      TBOX_ERROR("PatchBoundaryNodeSum::register error..."
+         << "\nobject named " << d_object_name
+         << "\nCannot call registerSum with this PatchBoundaryNodeSum"
+         << "\nobject since it has already been used to create communication"
+         << "\nschedules; i.e., setupSum() has been called."
+         << std::endl);
+   }
+
+   if (node_data_id < 0) {
+      TBOX_ERROR("PatchBoundaryNodeSum register error..."
+         << "\nobject named " << d_object_name
+         << "\n node_data_id = " << node_data_id
+         << " is an invalid patch data identifier." << std::endl);
+   }
+
+   hier::VariableDatabase* var_db = hier::VariableDatabase::getDatabase();
+
+   tbox::Pointer<pdat::NodeDataFactory<double> > node_factory =
+      var_db->getPatchDescriptor()->getPatchDataFactory(node_data_id);
+
+   if (node_factory.isNull()) {
+
+      TBOX_ERROR("PatchBoundaryNodeSum register error..."
+         << "\nobject named " << d_object_name
+         << "\n node_data_id = " << node_data_id
+         << " does not correspond to node data of type double." << std::endl);
+
+   } else {
+
+      const tbox::Dimension& dim(node_factory->getDim());
+
+      static std::string tmp_onode_src_variable_name(
+         "PatchBoundaryNodeSum__internal-onode-src");
+      static std::string tmp_onode_dst_variable_name(
+         "PatchBoundaryNodeSum__internal-onode-dst");
+
+      const int reg_sum_id = d_num_reg_sum;
+
+      d_num_reg_sum++;
+
+      d_user_node_data_id.resizeArray(d_num_reg_sum);
+      d_user_node_data_id[reg_sum_id] = ID_UNDEFINED;
+      d_user_node_depth.resizeArray(d_num_reg_sum);
+      d_user_node_depth[reg_sum_id] = ID_UNDEFINED;
+      d_tmp_onode_src_variable.resizeArray(d_num_reg_sum);
+      d_tmp_onode_dst_variable.resizeArray(d_num_reg_sum);
+      d_onode_src_id.resizeArray(d_num_reg_sum);
+      d_onode_src_id[reg_sum_id] = ID_UNDEFINED;
+      d_onode_dst_id.resizeArray(d_num_reg_sum);
+      d_onode_dst_id[reg_sum_id] = ID_UNDEFINED;
+
+      const int data_depth = node_factory->getDepth();
+      const int array_by_depth_size = data_depth + 1;
+
+      if (d_num_registered_data_by_depth.size() < array_by_depth_size) {
+         const int old_size = d_num_registered_data_by_depth.size();
+         const int new_size = array_by_depth_size;
+
+         d_num_registered_data_by_depth.resizeArray(new_size);
+         for (int i = old_size; i < new_size; i++) {
+            d_num_registered_data_by_depth[i] = 0;
+         }
+      }
+
+      const int data_depth_id = d_num_registered_data_by_depth[data_depth];
+      const int num_data_at_depth = data_depth_id + 1;
+
+      if (s_onode_src_id_array.size() < array_by_depth_size) {
+         s_onode_src_id_array.resizeArray(array_by_depth_size);
+         s_onode_dst_id_array.resizeArray(array_by_depth_size);
+      }
+
+      if (s_onode_src_id_array[data_depth].size() < num_data_at_depth) {
+         const int old_size = s_onode_src_id_array[data_depth].size();
+         const int new_size = num_data_at_depth;
+
+         s_onode_src_id_array[data_depth].resizeArray(new_size);
+         s_onode_dst_id_array[data_depth].resizeArray(new_size);
+         for (int i = old_size; i < new_size; i++) {
+            s_onode_src_id_array[data_depth][i] = ID_UNDEFINED;
+            s_onode_dst_id_array[data_depth][i] = ID_UNDEFINED;
+         }
+      }
+
+      std::string var_suffix = tbox::Utilities::intToString(data_depth_id, 4)
+         + "__depth=" + tbox::Utilities::intToString(data_depth);
+
+      std::string tonode_src_var_name = tmp_onode_src_variable_name
+         + var_suffix;
+      d_tmp_onode_src_variable[reg_sum_id] = var_db->getVariable(
+            tonode_src_var_name);
+      if (d_tmp_onode_src_variable[reg_sum_id].isNull()) {
+         d_tmp_onode_src_variable[reg_sum_id] =
+            new pdat::OuternodeVariable<double>(dim,
+                                                tonode_src_var_name,
+                                                data_depth);
+      }
+
+      std::string tonode_dst_var_name = tmp_onode_dst_variable_name
+         + var_suffix;
+      d_tmp_onode_dst_variable[reg_sum_id] = var_db->getVariable(
+            tonode_dst_var_name);
+      if (d_tmp_onode_dst_variable[reg_sum_id].isNull()) {
+         d_tmp_onode_dst_variable[reg_sum_id] =
+            new pdat::OuternodeVariable<double>(dim,
+                                                tonode_dst_var_name,
+                                                data_depth);
+      }
+
+      if (s_onode_src_id_array[data_depth][data_depth_id] < 0) {
+         s_onode_src_id_array[data_depth][data_depth_id] =
+            var_db->registerInternalSAMRAIVariable(
+               d_tmp_onode_src_variable[reg_sum_id],
+               hier::IntVector::getZero(dim));
+      }
+      if (s_onode_dst_id_array[data_depth][data_depth_id] < 0) {
+         s_onode_dst_id_array[data_depth][data_depth_id] =
+            var_db->registerInternalSAMRAIVariable(
+               d_tmp_onode_dst_variable[reg_sum_id],
+               hier::IntVector::getZero(dim));
+      }
+
+      d_user_node_data_id[reg_sum_id] = node_data_id;
+      d_user_node_depth[reg_sum_id] = data_depth;
+
+      d_num_registered_data_by_depth[data_depth] = num_data_at_depth;
+
+      d_onode_src_id[reg_sum_id] =
+         s_onode_src_id_array[data_depth][data_depth_id];
+      d_onode_dst_id[reg_sum_id] =
+         s_onode_dst_id_array[data_depth][data_depth_id];
+
+      d_onode_src_data_set.setFlag(d_onode_src_id[reg_sum_id]);
+      d_onode_dst_data_set.setFlag(d_onode_dst_id[reg_sum_id]);
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set up schedule to sum node data around patch boundaries              *
+ * on a single level.                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchBoundaryNodeSum::setupSum(
+   tbox::Pointer<hier::PatchLevel> level)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!level.isNull());
+#endif
+
+   const tbox::Dimension& dim(level->getDim());
+
+   if (d_hierarchy_setup_called) {
+
+      TBOX_ERROR("PatchBoundaryNodeSum::setupSum error...\n"
+         << " object named " << d_object_name
+         << " already initialized via setupSum() for hierarchy" << std::endl);
+
+   } else {
+
+      d_setup_called = true;
+      d_level_setup_called = true;
+
+      d_level = level;
+
+      d_single_level_sum_schedule.resizeArray(1);
+
+      // Communication algorithm for summing outernode values on a level
+      xfer::RefineAlgorithm single_level_sum_algorithm(dim);
+
+      for (int i = 0; i < d_num_reg_sum; i++) {
+         single_level_sum_algorithm.registerRefine(d_onode_dst_id[i],  // dst data
+            d_onode_src_id[i],                                         // src data
+            d_onode_dst_id[i],                                         // scratch data
+            tbox::Pointer<SAMRAI::xfer::VariableFillPattern>(NULL));
+      }
+
+      d_single_level_sum_schedule[0] =
+         single_level_sum_algorithm.createSchedule(
+            d_level,
+            (xfer::RefinePatchStrategy *)NULL,
+            d_sum_transaction_factory);
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set up schedule to sum node data around patch boundaries              *
+ * for set of consecutive hierarchy levels.                              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchBoundaryNodeSum::setupSum(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (finest_level >= coarsest_level)
+      && (finest_level <= hierarchy->getFinestLevelNumber()));
+
+   const tbox::Dimension& dim(hierarchy->getDim());
+
+   if (d_level_setup_called) {
+
+      TBOX_ERROR("PatchBoundaryNodeSum::setupSum error...\n"
+         << " object named " << d_object_name
+         << " already initialized via setupSum() for single level" << std::endl);
+
+   } else {
+
+      d_setup_called = true;
+      d_hierarchy_setup_called = true;
+
+      d_hierarchy = hierarchy;
+      d_coarsest_level = coarsest_level;
+      d_finest_level = finest_level;
+
+      const int num_levels = d_finest_level + 1;
+
+      d_single_level_sum_schedule.resizeArray(num_levels);
+      d_cfbdry_copy_schedule.resizeArray(num_levels);
+      d_sync_coarsen_schedule.resizeArray(num_levels);
+      d_cfbdry_tmp_level.resizeArray(num_levels);
+
+      d_coarse_fine_boundary.resizeArray(num_levels);
+
+      // Communication algorithm for summing outernode values on each level
+      xfer::RefineAlgorithm single_level_sum_algorithm(dim);
+
+      // Communication algorithm for copying node values on each coarser
+      // level to outernode values on coarsened version of patches on
+      // next finer level
+      xfer::RefineAlgorithm cfbdry_copy_algorithm(dim);
+
+      // Communication algorithm for coarsening outernode values on
+      // each finer level to node data on next coarser level
+      xfer::CoarsenAlgorithm sync_coarsen_algorithm(dim, false);
+      tbox::Pointer<pdat::OuternodeDoubleConstantCoarsen> coarsen_op(
+         new pdat::OuternodeDoubleConstantCoarsen(dim));
+
+      for (int i = 0; i < d_num_reg_sum; i++) {
+         single_level_sum_algorithm.registerRefine(d_onode_dst_id[i],  // dst data
+            d_onode_src_id[i],                                         // src data
+            d_onode_dst_id[i],                                         // scratch data
+            tbox::Pointer<SAMRAI::xfer::RefineOperator>(NULL));
+
+         cfbdry_copy_algorithm.registerRefine(d_onode_dst_id[i],      // dst data
+            d_user_node_data_id[i],                                   // src data
+            d_onode_dst_id[i],                                        // scratch data
+            tbox::Pointer<SAMRAI::xfer::RefineOperator>(NULL));
+
+         sync_coarsen_algorithm.registerCoarsen(d_user_node_data_id[i], // dst data
+            d_onode_dst_id[i],                                          // src data
+            coarsen_op);
+      }
+
+      tbox::Pointer<hier::PatchLevel> coarsest_level_loop =
+         d_hierarchy->getPatchLevel(d_coarsest_level);
+
+      tbox::Pointer<hier::PatchLevel> hier_level =
+         d_hierarchy->getPatchLevel(0);
+
+      d_single_level_sum_schedule[d_coarsest_level] =
+         single_level_sum_algorithm.createSchedule(
+            coarsest_level_loop,
+            (xfer::RefinePatchStrategy *)NULL,
+            d_sum_transaction_factory);
+
+      for (int ln = d_coarsest_level + 1; ln <= d_finest_level; ln++) {
+
+         const int crse_level_num = ln - 1;
+         const int fine_level_num = ln;
+
+         tbox::Pointer<hier::PatchLevel> crse_level =
+            d_hierarchy->getPatchLevel(crse_level_num);
+         tbox::Pointer<hier::PatchLevel> fine_level =
+            d_hierarchy->getPatchLevel(fine_level_num);
+
+         d_single_level_sum_schedule[fine_level_num] =
+            single_level_sum_algorithm.createSchedule(
+               fine_level,
+               (xfer::RefinePatchStrategy *)NULL,
+               d_sum_transaction_factory);
+
+         d_cfbdry_tmp_level[fine_level_num] = new hier::PatchLevel(dim);
+         d_cfbdry_tmp_level[fine_level_num]->
+         setCoarsenedPatchLevel(fine_level,
+            fine_level->getRatioToCoarserLevel());
+         hier::IntVector crse_tmp_gcw =
+            d_hierarchy->getConnector(crse_level_num,
+               fine_level_num).getConnectorWidth();
+         // Create persistent overlap Connectors for use in schedule construction.
+         // FIXME: There are faster ways to get these edges.  BTNG.
+         d_cfbdry_tmp_level[fine_level_num]->getMappedBoxLevel()->
+         getPersistentOverlapConnectors().createConnector(
+            *crse_level->getMappedBoxLevel(),
+            crse_tmp_gcw);
+         crse_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+         createConnector(
+            *d_cfbdry_tmp_level[fine_level_num]->getMappedBoxLevel(),
+            crse_tmp_gcw);
+         const hier::Connector& crse_to_domain =
+            d_cfbdry_tmp_level[fine_level_num]->getMappedBoxLevel()->
+            getPersistentOverlapConnectors().createConnector(
+               d_hierarchy->getDomainMappedBoxLevel(),
+               hier::IntVector::getZero(dim));
+         const hier::Connector& crse_to_crse =
+            d_cfbdry_tmp_level[fine_level_num]->getMappedBoxLevel()->
+            getPersistentOverlapConnectors().createConnector(
+               *d_cfbdry_tmp_level[fine_level_num]->getMappedBoxLevel(),
+               hier::IntVector::getOne(dim));
+
+         d_cfbdry_copy_schedule[fine_level_num] =
+            cfbdry_copy_algorithm.createSchedule(
+               d_cfbdry_tmp_level[fine_level_num],     // dst level
+               crse_level);                            // src level
+
+         d_sync_coarsen_schedule[fine_level_num] =
+            sync_coarsen_algorithm.createSchedule(
+               crse_level,                             // dst level
+               fine_level);                            // src level
+
+         d_coarse_fine_boundary[fine_level_num] =
+            new hier::CoarseFineBoundary(
+               *(d_cfbdry_tmp_level[fine_level_num]),
+                  crse_to_domain,
+                  crse_to_crse,
+                  hier::IntVector::getOne(dim));
+#if 1
+         tbox::plog << "PatchBoundaryNodeSum::d_coarse_fine_boundary["
+                    << fine_level_num << "]:" << std::endl;
+         d_coarse_fine_boundary[fine_level_num]->printClassData(tbox::plog);
+#endif
+
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Perform patch boundary node sum across single level or multiple       *
+ * hierarchy levels depending on how object was initialized.  In the     *
+ * single level case, values at shared nodes are summed.  In the         *
+ * multiple-level case, the algorithm involves the following steps:      *
+ *                                                                       *
+ *    1) Sum values at shared nodes on each level.                       *
+ *    2) Set node values at coarse-fine boundary on each finer level     *
+ *       to sum of fine level values and coarse level values at all      *
+ *       nodes that are shared between the coarse and fine level.        *
+ *                                                                       *
+ *       2a) Copy coarser level node values to finer level (outer)node   *
+ *           values at nodes on boundary of patches on a temporary       *
+ *           level that represents the finer level coarsened to the      *
+ *           index space of the coarser level.                           *
+ *       2b) Sum (outer)node values at patch boundaries on finer level   *
+ *           and (outer)node values at patch boundaries on coarsened     *
+ *           finer level and set values on finer level to sum.  Note     *
+ *           that the hanging nodes on the finer level may be treated    *
+ *           at this point if specified to do so by the user.            *
+ *                                                                       *
+ *    3) Inject (outer)node values around each finer level patch         *
+ *       boundary to corresponding node values on each coarser level.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchBoundaryNodeSum::computeSum(
+   const bool fill_hanging_nodes) const
+{
+
+   if (d_level_setup_called) {
+
+      d_level->allocatePatchData(d_onode_src_data_set);
+      d_level->allocatePatchData(d_onode_dst_data_set);
+
+      doLevelSum(d_level);
+
+      d_level->deallocatePatchData(d_onode_src_data_set);
+      d_level->deallocatePatchData(d_onode_dst_data_set);
+
+   } else {  // assume d_hierarchy_setup_called
+
+      int ln;
+
+      for (ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+
+         tbox::Pointer<hier::PatchLevel> level =
+            d_hierarchy->getPatchLevel(ln);
+
+         level->allocatePatchData(d_onode_src_data_set);
+         level->allocatePatchData(d_onode_dst_data_set);
+
+         doLevelSum(level);
+
+      }
+
+      for (ln = d_coarsest_level + 1; ln <= d_finest_level; ln++) {
+
+         tbox::Pointer<hier::PatchLevel> level =
+            d_hierarchy->getPatchLevel(ln);
+
+         d_cfbdry_tmp_level[ln]->allocatePatchData(d_onode_dst_data_set);
+
+         d_cfbdry_copy_schedule[ln]->fillData(0.0, false);
+
+         doLocalCoarseFineBoundarySum(level,
+            d_cfbdry_tmp_level[ln],
+            d_user_node_data_id,
+            d_onode_dst_id,
+            fill_hanging_nodes);
+
+         d_cfbdry_tmp_level[ln]->deallocatePatchData(d_onode_dst_data_set);
+
+      }
+
+      for (ln = d_finest_level; ln > d_coarsest_level; ln--) {
+
+         tbox::Pointer<hier::PatchLevel> level =
+            d_hierarchy->getPatchLevel(ln);
+
+         copyNodeToOuternodeOnLevel(level,
+            d_user_node_data_id,
+            d_onode_dst_id);
+
+         d_sync_coarsen_schedule[ln]->coarsenData();
+
+         level->deallocatePatchData(d_onode_src_data_set);
+         level->deallocatePatchData(d_onode_dst_data_set);
+
+      }
+
+      d_hierarchy->getPatchLevel(d_coarsest_level)->
+      deallocatePatchData(d_onode_src_data_set);
+      d_hierarchy->getPatchLevel(d_coarsest_level)->
+      deallocatePatchData(d_onode_dst_data_set);
+
+   }  // if d_hierarchy_setup_called
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private member function that performs node sum across single level.   *
+ *                                                                       *
+ * 1. Copy node data to local outernode data.                            *
+ * 2. Transfer and sum outernode data.                                   *
+ * 3. Copy outernode data back to node data.                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchBoundaryNodeSum::doLevelSum(
+   tbox::Pointer<hier::PatchLevel> level) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!level.isNull());
+#endif
+
+   copyNodeToOuternodeOnLevel(level,
+      d_user_node_data_id,
+      d_onode_src_id);
+
+   int schedule_level_number = 0;
+   if (!d_level_setup_called) {
+      schedule_level_number =
+         tbox::MathUtilities<int>::Max(0, level->getLevelNumber());
+   }
+   d_single_level_sum_schedule[schedule_level_number]->fillData(0.0, false);
+
+   copyOuternodeToNodeOnLevel(level,
+      d_onode_dst_id,
+      d_user_node_data_id);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private member function to set node node data on a fine level at a    *
+ * coarse-fine boundary to the sum of the node values and the associated *
+ * outernode values on a coarsened version of the fine level.            *
+ *                                                                       *
+ * TODO: This function needs more detailed explanations.  BTNG           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchBoundaryNodeSum::doLocalCoarseFineBoundarySum(
+   tbox::Pointer<hier::PatchLevel> fine_level,
+   tbox::Pointer<hier::PatchLevel> coarsened_fine_level,
+   const tbox::Array<int>& node_data_id,
+   const tbox::Array<int>& onode_data_id,
+   bool fill_hanging_nodes) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!fine_level.isNull());
+   TBOX_ASSERT(!coarsened_fine_level.isNull());
+   TBOX_ASSERT(node_data_id.size() == onode_data_id.size());
+   for (int i = 0; i < node_data_id.size(); i++) {
+      TBOX_ASSERT(fine_level->checkAllocated(node_data_id[i]));
+      TBOX_ASSERT(coarsened_fine_level->checkAllocated(onode_data_id[i]));
+   }
+#endif
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*fine_level, *coarsened_fine_level);
+
+   const tbox::Dimension& dim(fine_level->getDim());
+
+   const hier::IntVector& ratio(fine_level->getRatioToCoarserLevel());
+   const int level_number(fine_level->getLevelNumber());
+
+   for (hier::PatchLevel::Iterator ip(fine_level); ip; ip++) {
+
+      const tbox::Array<hier::BoundaryBox>& pboundaries =
+         d_coarse_fine_boundary[level_number]->getBoundaries(ip->getGlobalId(), 1);
+      const int num_bdry_boxes = pboundaries.getSize();
+
+      if (num_bdry_boxes > 0) {
+
+         tbox::Pointer<hier::Patch> fpatch = *ip;
+         tbox::Pointer<hier::Patch> cfpatch =
+            coarsened_fine_level->getPatch(fpatch->getGlobalId());
+
+         const hier::Index& filo = fpatch->getBox().lower();
+         const hier::Index& fihi = fpatch->getBox().upper();
+         const hier::Index& cilo = cfpatch->getBox().lower();
+         const hier::Index& cihi = cfpatch->getBox().upper();
+
+         for (int i = 0; i < node_data_id.size(); i++) {
+
+            tbox::Pointer<pdat::NodeData<double> > node_data =
+               fpatch->getPatchData(node_data_id[i]);
+            tbox::Pointer<pdat::OuternodeData<double> > onode_data =
+               cfpatch->getPatchData(onode_data_id[i]);
+
+            const hier::IntVector& node_gcw(node_data->getGhostCellWidth());
+
+            pdat::OuternodeData<double> tmp_onode_data(
+               cfpatch->getBox(), onode_data->getDepth());
+            tmp_onode_data.fillAll(0.0);
+
+            // Copy "coarse" node values on coarse-fine boundary to
+            // temporary outernode data arrays.
+            for (int ibb0 = 0; ibb0 < num_bdry_boxes; ibb0++) {
+
+               const hier::BoundaryBox& bbox = pboundaries[ibb0];
+               const int bbox_loc = bbox.getLocationIndex();
+
+               hier::Box node_bbox =
+                  pdat::NodeGeometry::toNodeBox(bbox.getBox());
+
+               switch (bbox_loc) {
+
+                  case 0: {
+
+                     pdat::ArrayData<double>& tmp_onode_data_side_00 =
+                        tmp_onode_data.getArrayData(0, 0);
+                     if (tmp_onode_data_side_00.isInitialized()) {
+                        tmp_onode_data_side_00.
+                        copy(onode_data->getArrayData(0, 0), node_bbox);
+                     }
+                     pdat::ArrayData<double>& tmp_onode_data_side_10 =
+                        tmp_onode_data.getArrayData(1, 0);
+                     if (tmp_onode_data_side_10.isInitialized()) {
+                        tmp_onode_data_side_10.
+                        copy(onode_data->getArrayData(1, 0), node_bbox);
+                     }
+                     pdat::ArrayData<double>& tmp_onode_data_side_11 =
+                        tmp_onode_data.getArrayData(1, 1);
+                     if (tmp_onode_data_side_11.isInitialized()) {
+                        tmp_onode_data_side_11.
+                        copy(onode_data->getArrayData(1, 1), node_bbox);
+                     }
+
+                     if ((dim == tbox::Dimension(3))) {
+                        pdat::ArrayData<double>& tmp_onode_data_side_20 =
+                           tmp_onode_data.getArrayData(2, 0);
+                        if (tmp_onode_data_side_20.isInitialized()) {
+                           tmp_onode_data_side_20.
+                           copy(onode_data->getArrayData(2, 0), node_bbox);
+                        }
+                        pdat::ArrayData<double>& tmp_onode_data_side_21 =
+                           tmp_onode_data.getArrayData(2, 1);
+                        if (tmp_onode_data_side_21.isInitialized()) {
+                           tmp_onode_data_side_21.
+                           copy(onode_data->getArrayData(2, 1), node_bbox);
+                        }
+                     }
+                     break;
+                  }  // case 0
+
+                  case 1: {
+                     pdat::ArrayData<double>& tmp_onode_data_side_01 =
+                        tmp_onode_data.getArrayData(0, 1);
+                     if (tmp_onode_data_side_01.isInitialized()) {
+                        tmp_onode_data_side_01.
+                        copy(onode_data->getArrayData(0, 1), node_bbox);
+                     }
+                     pdat::ArrayData<double>& tmp_onode_data_side_10 =
+                        tmp_onode_data.getArrayData(1, 0);
+                     if (tmp_onode_data_side_10.isInitialized()) {
+                        tmp_onode_data_side_10.
+                        copy(onode_data->getArrayData(1, 0), node_bbox);
+                     }
+                     pdat::ArrayData<double>& tmp_onode_data_side_11 =
+                        tmp_onode_data.getArrayData(1, 1);
+                     if (tmp_onode_data_side_11.isInitialized()) {
+                        tmp_onode_data_side_11.
+                        copy(onode_data->getArrayData(1, 1), node_bbox);
+                     }
+
+                     if ((dim == tbox::Dimension(3))) {
+                        pdat::ArrayData<double>& tmp_onode_data_side_20 =
+                           tmp_onode_data.getArrayData(2, 0);
+                        if (tmp_onode_data_side_20.isInitialized()) {
+                           tmp_onode_data_side_20.
+                           copy(onode_data->getArrayData(2, 0), node_bbox);
+                        }
+                        pdat::ArrayData<double>& tmp_onode_data_side_21 =
+                           tmp_onode_data.getArrayData(2, 1);
+                        if (tmp_onode_data_side_21.isInitialized()) {
+                           tmp_onode_data_side_21.
+                           copy(onode_data->getArrayData(2, 1), node_bbox);
+                        }
+                     }
+                     break;
+                  } // case 1
+
+                  case 2: {
+                     pdat::ArrayData<double>& tmp_onode_data_side_10 =
+                        tmp_onode_data.getArrayData(1, 0);
+                     if (tmp_onode_data_side_10.isInitialized()) {
+                        tmp_onode_data_side_10.
+                        copy(onode_data->getArrayData(1, 0), node_bbox);
+                     }
+
+                     if ((dim == tbox::Dimension(3))) {
+                        pdat::ArrayData<double>& tmp_onode_data_side_20 =
+                           tmp_onode_data.getArrayData(2, 0);
+                        if (tmp_onode_data_side_20.isInitialized()) {
+                           tmp_onode_data_side_20.
+                           copy(onode_data->getArrayData(2, 0), node_bbox);
+                        }
+                        pdat::ArrayData<double>& tmp_onode_data_side_21 =
+                           tmp_onode_data.getArrayData(2, 1);
+                        if (tmp_onode_data_side_21.isInitialized()) {
+                           tmp_onode_data_side_21.
+                           copy(onode_data->getArrayData(2, 1), node_bbox);
+                        }
+                     }
+                     break;
+                  }  // case 2
+
+                  case 3: {
+                     pdat::ArrayData<double>& tmp_onode_data_side_11 =
+                        tmp_onode_data.getArrayData(1, 1);
+                     if (tmp_onode_data_side_11.isInitialized()) {
+                        tmp_onode_data_side_11.
+                        copy(onode_data->getArrayData(1, 1), node_bbox);
+                     }
+
+                     if ((dim == tbox::Dimension(3))) {
+                        pdat::ArrayData<double>& tmp_onode_data_side_20 =
+                           tmp_onode_data.getArrayData(2, 0);
+                        if (tmp_onode_data_side_20.isInitialized()) {
+                           tmp_onode_data_side_20.
+                           copy(onode_data->getArrayData(2, 0), node_bbox);
+                        }
+                        pdat::ArrayData<double>& tmp_onode_data_side_21 =
+                           tmp_onode_data.getArrayData(2, 1);
+                        if (tmp_onode_data_side_21.isInitialized()) {
+                           tmp_onode_data_side_21.
+                           copy(onode_data->getArrayData(2, 1), node_bbox);
+                        }
+                     }
+                     break;
+                  }  // case 3
+
+                  case 4: {
+                     if ((dim == tbox::Dimension(3))) {
+                        pdat::ArrayData<double>& tmp_onode_data_side_20 =
+                           tmp_onode_data.getArrayData(2, 0);
+                        if (tmp_onode_data_side_20.isInitialized()) {
+                           tmp_onode_data_side_20.
+                           copy(onode_data->getArrayData(2, 0), node_bbox);
+                        }
+                     }
+                     break;
+                  }  // case 4
+
+                  case 5: {
+                     if ((dim == tbox::Dimension(3))) {
+                        pdat::ArrayData<double>& tmp_onode_data_side_21 =
+                           tmp_onode_data.getArrayData(2, 1);
+                        if (tmp_onode_data_side_21.isInitialized()) {
+                           tmp_onode_data_side_21.
+                           copy(onode_data->getArrayData(2, 1), node_bbox);
+                        }
+                     }
+                     break;
+                  }  // case 5
+
+                  default: {
+                     TBOX_ERROR("PatchBoundaryNodeSum::computeSum error...\n"
+                        << " object named " << d_object_name
+                        << "\n unrecognized coarse-fine boundary box location "
+                        << bbox_loc << std::endl);
+                  }
+
+               }  // switch(box_loc)
+
+            } // for (int ibb0 ...  iterate over coarse-fine boundary box regions
+
+            // Sum "coarse" node values on coarse-fine boundary.
+
+            if ((dim == tbox::Dimension(2))) {
+
+               if (tmp_onode_data.getArrayData(0, 0).isInitialized() &&
+                   tmp_onode_data.getArrayData(0, 1).isInitialized() &&
+                   tmp_onode_data.getArrayData(1, 0).isInitialized() &&
+                   tmp_onode_data.getArrayData(1, 1).isInitialized()) {
+
+                  F77_FUNC(nodeouternodesum2d, NODEOUTERNODESUM2D) (
+                     filo(0), filo(1),
+                     fihi(0), fihi(1),
+                     cilo(0), cilo(1),
+                     cihi(0), cihi(1),
+                     &ratio[0],
+                     node_data->getDepth(),
+                     node_gcw(0), node_gcw(1),
+                     node_data->getPointer(),     // node data dst
+                     tmp_onode_data.getPointer(0, 0), // x lower src
+                     tmp_onode_data.getPointer(0, 1), // x upper src
+                     tmp_onode_data.getPointer(1, 0), // y lower src
+                     tmp_onode_data.getPointer(1, 1)); // y upper src
+               }
+
+            } // (dim == tbox::Dimension(2))
+
+            if ((dim == tbox::Dimension(3))) {
+
+               if (tmp_onode_data.getArrayData(0, 0).isInitialized() &&
+                   tmp_onode_data.getArrayData(0, 1).isInitialized() &&
+                   tmp_onode_data.getArrayData(1, 0).isInitialized() &&
+                   tmp_onode_data.getArrayData(1, 1).isInitialized() &&
+                   tmp_onode_data.getArrayData(2, 0).isInitialized() &&
+                   tmp_onode_data.getArrayData(2, 1).isInitialized()) {
+
+                  F77_FUNC(nodeouternodesum3d, NODEOUTERNODESUM3D) (
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     &ratio[0],
+                     node_data->getDepth(),
+                     node_gcw(0), node_gcw(1), node_gcw(2),
+                     node_data->getPointer(),     // node data dst
+                     tmp_onode_data.getPointer(0, 0), // x lower src
+                     tmp_onode_data.getPointer(0, 1), // x upper src
+                     tmp_onode_data.getPointer(1, 0), // y lower src
+                     tmp_onode_data.getPointer(1, 1), // y upper src
+                     tmp_onode_data.getPointer(2, 0), // z lower src
+                     tmp_onode_data.getPointer(2, 1)); // z upper src
+               }
+
+            } // (dim == tbox::Dimension(3))
+
+            // If desired, fill "hanging" nodes on fine patch by
+            // linear interpolation between "coarse" nodes on
+            // coarse-fine boundary.
+            if (fill_hanging_nodes) {
+
+               for (int ibb1 = 0; ibb1 < num_bdry_boxes; ibb1++) {
+
+                  const hier::BoundaryBox& bbox = pboundaries[ibb1];
+                  const hier::Index& bboxilo = bbox.getBox().lower();
+                  const hier::Index& bboxihi = bbox.getBox().upper();
+
+                  const int bbox_loc = bbox.getLocationIndex();
+
+                  if ((dim == tbox::Dimension(2))) {
+                     F77_FUNC(nodehangnodeinterp2d, NODEHANGNODEINTERP2D) (
+                        filo(0), filo(1),
+                        fihi(0), fihi(1),
+                        cilo(0), cilo(1),
+                        cihi(0), cihi(1),
+                        bboxilo(0), bboxilo(1),
+                        bboxihi(0), bboxihi(1),
+                        bbox_loc,
+                        &ratio[0],
+                        node_data->getDepth(),
+                        node_gcw(0), node_gcw(1),
+                        node_data->getPointer());
+                  }
+
+                  if ((dim == tbox::Dimension(3))) {
+                     F77_FUNC(nodehangnodeinterp3d, NODEHANGNODEINTERP3D) (
+                        filo(0), filo(1), filo(2),
+                        fihi(0), fihi(1), fihi(2),
+                        cilo(0), cilo(1), cilo(2),
+                        cihi(0), cihi(1), cihi(2),
+                        bboxilo(0), bboxilo(1), bboxilo(2),
+                        bboxihi(0), bboxihi(1), bboxihi(2),
+                        bbox_loc,
+                        &ratio[0],
+                        node_data->getDepth(),
+                        node_gcw(0), node_gcw(1), node_gcw(2),
+                        node_data->getPointer());
+                  }
+
+               } // iterate over coarse-fine boundary box regions
+
+            } // if fill hanging nodes
+
+         }  //  for (int i ...  iterate over node data
+
+      }  // if (num_bdry_boxes > 0) .... if patch lies on coarse-fine boundary
+
+   } // iterate over fine level patches
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private member functions to copy between node and outernode data      *
+ * over an entire level.                                                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchBoundaryNodeSum::copyNodeToOuternodeOnLevel(
+   tbox::Pointer<hier::PatchLevel> level,
+   const tbox::Array<int>& node_data_id,
+   const tbox::Array<int>& onode_data_id) const
+{
+   TBOX_ASSERT(!level.isNull());
+   TBOX_ASSERT(node_data_id.size() == onode_data_id.size());
+
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      for (int i = 0; i < node_data_id.size(); i++) {
+         tbox::Pointer<pdat::NodeData<double> > node_data =
+            patch->getPatchData(node_data_id[i]);
+         tbox::Pointer<pdat::OuternodeData<double> > onode_data =
+            patch->getPatchData(onode_data_id[i]);
+
+         onode_data->copy(*node_data);
+      }
+   }
+
+}
+
+void PatchBoundaryNodeSum::copyOuternodeToNodeOnLevel(
+   tbox::Pointer<hier::PatchLevel> level,
+   const tbox::Array<int>& onode_data_id,
+   const tbox::Array<int>& node_data_id) const
+{
+   TBOX_ASSERT(!level.isNull());
+   TBOX_ASSERT(node_data_id.size() == onode_data_id.size());
+
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      for (int i = 0; i < node_data_id.size(); i++) {
+         tbox::Pointer<pdat::OuternodeData<double> > onode_data =
+            patch->getPatchData(onode_data_id[i]);
+         tbox::Pointer<pdat::NodeData<double> > node_data =
+            patch->getPatchData(node_data_id[i]);
+
+         onode_data->copy2(*node_data);
+      }
+   }
+
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/PatchBoundaryNodeSum.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/PatchBoundaryNodeSum.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,309 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Routines for summing node data at patch boundaries 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_PatchBoundaryNodeSum
+#define included_algs_PatchBoundaryNodeSum
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/ComponentSelector.h"
+#include "SAMRAI/hier/CoarseFineBoundary.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "SAMRAI/pdat/OuternodeVariable.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/xfer/CoarsenSchedule.h"
+#include "SAMRAI/xfer/RefineSchedule.h"
+#include "SAMRAI/xfer/RefineTransactionFactory.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace algs {
+
+/*!
+ *  @brief Class PatchBoundaryNodeSum provides operations for summing node data
+ *  values at nodes that are shared by multiple patches on a single level or across
+ *  multiple hierarchy levels.
+ *
+ *  Usage of a patch boundry node sum involves the following sequence of steps:
+ *
+ *  -# Construct a patch boundry node sum object.  For example,
+ *     \verbatim
+ *         PatchBoundaryNodeSum my_node_sum("My Node Sum");
+ *     \endverbatim
+ *  -# Register node data quantities to sum.  For example,
+ *     \verbatim
+ *         my_node_sum.registerSum(node_data_id1);
+ *         my_node_sum.registerSum(node_data_id2);
+ *         etc...
+ *     \endverbatim
+ *  -# Setup the sum operations for either single level or a range of levels
+ *     in a patch hierarchy.  For example,
+ *     \verbatim
+ *         my_node_sum.setupSum(level);    // single level
+ *         -- or --
+ *         my_node_sum.setupSum(hierarchy, coarsest_ln, finest_ln);  // multiple levels
+ *     \endverbatim
+ *  -# Execute the sum operation.  For example,
+ *     \verbatim
+ *         my_node_sum.computeSum()
+ *     \endverbatim
+ *
+ *  The result of these operations is that each node patch data value associated
+ *  with the registered ids at patch boundaries, on either the single level or
+ *  range of hierarchy levels, is replaced by the sum of all data values at the node.
+ *
+ *  Note that only one of the setupSum() functions may be called once a
+ *  PatchBoundaryNodeSum object is created.
+ */
+
+class PatchBoundaryNodeSum
+{
+public:
+   /*!
+    *  @brief Static function used to predetermine number of patch data
+    *         slots ahared among all PatchBoundaryNodeSum
+    *         objects (i.e., static members).  To get a correct count,
+    *         this routine should only be called once.
+    *
+    *  @return integer number of internal patch data slots required
+    *          to perform sum.
+    *  @param max_variables_to_register integer value indicating
+    *          maximum number of patch data ids that will be registered
+    *          with node sum objects.TO
+    */
+   static int
+   getNumSharedPatchDataSlots(
+      int max_variables_to_register);
+
+   /*!
+    *  @brief Static function used to predetermine number of patch data
+    *         slots unique to each PatchBoundaryNodeSum
+    *         object (i.e., non-static members).  To get a correct count,
+    *         this routine should be called exactly once for each object
+    *         that will be constructed.
+    *
+    *  @return integer number of internal patch data slots required
+    *          to perform sum.
+    *  @param max_variables_to_register integer value indicating
+    *          maximum number of patch data ids that will be registered
+    *          with node sum objects.
+    */
+   static int
+   getNumUniquePatchDataSlots(
+      int max_variables_to_register);
+
+   /*!
+    *  @brief Constructor initializes object to default (mostly undefined)
+    *  state.
+    *
+    *  @param object_name const std::string reference for name of object used
+    *  in error reporting.  When assertion checking is on, the string
+    *  cannot be empty.
+    */
+   PatchBoundaryNodeSum(
+      const std::string& object_name);
+
+   /*!
+    *  @brief Destructor for the schedule releases all internal storage.
+    */
+   ~PatchBoundaryNodeSum();
+
+   /*!
+    *  @brief Register node data with given patch data identifier for summing.
+    *
+    *  @param node_data_id  integer patch data index for node data to sum
+    *
+    *  The node data id must be a valid patch data id (>=0) and must
+    *  correspond to node-centered double data.  If not, an error will result.
+    */
+   void
+   registerSum(
+      int node_data_id);
+
+   /*!
+    *  @brief Set up summation operations for node data across shared nodes
+    *         on a single level.
+    *
+    *  If the other setupSum() function for a range of hierarchy levels has
+    *  been called previously for this object, an error will result.
+    *
+    *  @param level         pointer to level on which to perform node sum
+    *
+    *  When assertion checking is active, the level pointer cannot be null.
+    */
+   void
+   setupSum(
+      tbox::Pointer<hier::PatchLevel> level);
+
+   /*!
+    *  @brief Set up for summation operations for node data at shared nodes
+    *         across a range of hierarchy levels.
+    *
+    *  If the other setupSum() function for a single level has been called
+    *  previously for this object, an error will result.
+    *
+    *  @param hierarchy      pointer to hierarchy on which to perform node sum
+    *  @param coarsest_level coarsest level number for node sum
+    *  @param finest_level   finest level number for node sum
+    *
+    *  When assertion checking is active, the hierarchy pointer cannot be null,
+    *  and the range of levels must be valid.
+    */
+   void
+   setupSum(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level);
+
+   /*!
+    *  @brief Compute sum of node values at each shared node and replace
+    *         each such node value with the corresponding sum.
+    *
+    *  At the end of this method, all values at shared node locations on
+    *  patch boundaries (on levels indicated by the call to one of the
+    *  setupSum() routines) will have the same value.
+    *
+    *  When the setupSum() method taking a range of patch levels in a
+    *  hierarchy is called, this method will compute the sum of nodal
+    *  quantities at all the specified patch boundaries.  For nodes at a
+    *  coarse-fine boundary, nodal sums will only be performed where the
+    *  coarse and fine nodes overlap.  A node on a fine level that is not
+    *  also a node on the next coarser level (a so-called "hanging node")
+    *  will not be summed.
+    *
+    *  The boolean "fill_hanging_nodes" argument specifies whether the
+    *  the hanging nodes should be filled using linearly interpolated values
+    *  from neighboring non-hanging nodes (i.e. those that overlap nodes on
+    *  a coarse level). The correct steps required to deal with hanging
+    *  nodes is algorithm dependent so, if left unspecified, values at the
+    *  hanging nodes will not be adjusted.  However, because many algorithms
+    *  average hanging nodes we provide the capability to do it here.  Note that
+    *  the hanging node interpolation provided does not take into consideration
+    *  the spatial location of the nodes.  So the interpolation may not be
+    *  correct for coordinate systems other than standard Cartesian grid geometry.
+    *
+    *  @param fill_hanging_nodes Optional boolean value specifying whether hanging
+    *         node values should be set to values interpolated from neighboring
+    *         non-hanging node values.  The default is false.
+    */
+   void
+   computeSum(
+      const bool fill_hanging_nodes = false) const;
+
+private:
+   /*
+    * Private member function to perform node sum across single level --
+    * called from computeSum().
+    */
+   void
+   doLevelSum(
+      tbox::Pointer<hier::PatchLevel> level) const;
+
+   /*
+    * Private member function to set node node data on a fine level at a
+    * coarse-fine boundary to the sum of the node values and the associated
+    * outernode values on a coarsened version of the fine level.
+    */
+   void
+   doLocalCoarseFineBoundarySum(
+      tbox::Pointer<hier::PatchLevel> fine_level,
+      tbox::Pointer<hier::PatchLevel> coarsened_fine_level,
+      const tbox::Array<int>& node_data_id,
+      const tbox::Array<int>& onode_data_id,
+      bool fill_hanging_nodes) const;
+
+   /*
+    * Private member function to copy node data to outernode data
+    * on all patches on a level.
+    */
+   void
+   copyNodeToOuternodeOnLevel(
+      tbox::Pointer<hier::PatchLevel> level,
+      const tbox::Array<int>& node_data_id,
+      const tbox::Array<int>& onode_data_id) const;
+
+   /*
+    * Private member function to copy outernode data to node data
+    * on all patches on a level.
+    */
+   void
+   copyOuternodeToNodeOnLevel(
+      tbox::Pointer<hier::PatchLevel> level,
+      const tbox::Array<int>& onode_data_id,
+      const tbox::Array<int>& node_data_id) const;
+
+   /*
+    * Static members for managing shared temporary data among multiple
+    * PatchBoundaryNodeSum objects.
+    */
+   static int s_instance_counter;
+   // These arrays are indexed [data depth][number of variables with depth]
+   static tbox::Array<tbox::Array<int> > s_onode_src_id_array;
+   static tbox::Array<tbox::Array<int> > s_onode_dst_id_array;
+
+   enum PATCH_BDRY_NODE_SUM_DATA_ID { ID_UNDEFINED = -1 };
+
+   std::string d_object_name;
+   bool d_setup_called;
+
+   int d_num_reg_sum;
+
+   // These arrays are indexed [variable registration sequence number]
+   tbox::Array<int> d_user_node_data_id;
+   tbox::Array<int> d_user_node_depth;
+
+   // These arrays are indexed [data depth]
+   tbox::Array<int> d_num_registered_data_by_depth;
+
+   /*
+    * Node-centered variables and patch data indices used as internal work quantities.
+    */
+   // These arrays are indexed [variable registration sequence number]
+   tbox::Array<tbox::Pointer<hier::Variable> > d_tmp_onode_src_variable;
+   tbox::Array<tbox::Pointer<hier::Variable> > d_tmp_onode_dst_variable;
+
+   // These arrays are indexed [variable registration sequence number]
+   tbox::Array<int> d_onode_src_id;
+   tbox::Array<int> d_onode_dst_id;
+
+   /*
+    * Sets of indices for temporary variables to expedite allocation/deallocation.
+    */
+   hier::ComponentSelector d_onode_src_data_set;
+   hier::ComponentSelector d_onode_dst_data_set;
+
+   tbox::Pointer<hier::PatchLevel> d_level;
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+   int d_coarsest_level;
+   int d_finest_level;
+
+   bool d_level_setup_called;
+   bool d_hierarchy_setup_called;
+
+   tbox::Pointer<xfer::RefineTransactionFactory> d_sum_transaction_factory;
+
+   tbox::Array<tbox::Pointer<xfer::RefineSchedule> >
+   d_single_level_sum_schedule;
+   tbox::Array<tbox::Pointer<xfer::RefineSchedule> > d_cfbdry_copy_schedule;
+   tbox::Array<tbox::Pointer<xfer::CoarsenSchedule> > d_sync_coarsen_schedule;
+
+   tbox::Array<tbox::Pointer<hier::PatchLevel> > d_cfbdry_tmp_level;
+
+   tbox::Array<tbox::Pointer<hier::CoarseFineBoundary> > d_coarse_fine_boundary;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/TimeRefinementIntegrator.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/TimeRefinementIntegrator.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1735 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Time integration manager for AMR with local time stepping. 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_TimeRefinementIntegrator_C
+#define included_algs_TimeRefinementIntegrator_C
+
+#include "SAMRAI/algs/TimeRefinementIntegrator.h"
+
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#include <cstdlib>
+#include <fstream>
+
+// #define DEBUG_TIMES
+
+#define ALGS_TIME_REFINEMENT_INTEGRATOR_VERSION (2)
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/algs/TimeRefinementIntegrator.I"
+#endif
+
+namespace SAMRAI {
+namespace algs {
+
+tbox::StartupShutdownManager::Handler
+TimeRefinementIntegrator::s_initialize_handler(
+   TimeRefinementIntegrator::initializeCallback,
+   0,
+   0,
+   TimeRefinementIntegrator::finalizeCallback,
+   tbox::StartupShutdownManager::priorityTimers);
+
+/*
+ * tbox::Timer objects for performance measurement.
+ */
+tbox::Pointer<tbox::Timer> TimeRefinementIntegrator::t_initialize_hier;
+tbox::Pointer<tbox::Timer> TimeRefinementIntegrator::t_advance_hier;
+tbox::Pointer<tbox::Timer> TimeRefinementIntegrator::t_advance_level;
+
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The constructor for TimeRefinementIntegrator checks for valid   *
+ * input data, initializes time stepping data to undefined values,       *
+ * and forces certain parameters in the level strategy, regridding       *
+ * algorithm to be consistent with this object's data members.  This     *
+ * constructor also invokes the variable registration process in the     *
+ * level strategy object.                                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+TimeRefinementIntegrator::TimeRefinementIntegrator(
+   const std::string& object_name,
+   tbox::Pointer<tbox::Database> input_db,
+   tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   tbox::Pointer<TimeRefinementLevelStrategy> level_integrator,
+   tbox::Pointer<mesh::BaseGriddingAlgorithm> gridding_algorithm,
+   bool register_for_restart):
+   d_barrier_and_time(false)
+{
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!input_db.isNull());
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT(level_integrator != ((TimeRefinementLevelStrategy *)NULL));
+   TBOX_ASSERT(!gridding_algorithm.isNull());
+
+   d_object_name = object_name;
+   d_registered_for_restart = register_for_restart;
+
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->
+      registerRestartItem(d_object_name, this);
+   }
+
+   d_patch_hierarchy = hierarchy;
+   d_refine_level_integrator = level_integrator;
+   d_gridding_algorithm = gridding_algorithm;
+
+   d_use_refined_timestepping = level_integrator->usingRefinedTimestepping();
+
+   /*
+    * Set default values for debugging.
+    */
+
+   d_start_time = tbox::MathUtilities<double>::getSignalingNaN();
+   d_end_time = tbox::MathUtilities<double>::getSignalingNaN();
+   d_integrator_time = tbox::MathUtilities<double>::getSignalingNaN();
+   d_integrator_step = tbox::MathUtilities<int>::getMax();
+   d_grow_dt = 1.0;
+   d_max_integrator_steps = tbox::MathUtilities<int>::getMax();
+
+   const int max_levels = d_patch_hierarchy->getMaxNumberOfLevels();
+
+   d_regrid_interval.resizeArray(max_levels);
+
+   d_level_old_old_time.resizeArray(max_levels);
+   d_level_old_time.resizeArray(max_levels);
+   d_level_sim_time.resizeArray(max_levels);
+   d_dt_max_level.resizeArray(max_levels);
+   d_dt_actual_level.resizeArray(max_levels);
+   d_step_level.resizeArray(max_levels);
+   d_max_steps_level.resizeArray(max_levels);
+
+   int level_number;
+
+   for (level_number = 0; level_number < max_levels; level_number++) {
+      d_regrid_interval[level_number] = tbox::MathUtilities<int>::getMax();
+      d_level_old_old_time[level_number] =
+         tbox::MathUtilities<double>::getSignalingNaN();
+      d_level_old_time[level_number] =
+         tbox::MathUtilities<double>::getSignalingNaN();
+      d_level_sim_time[level_number] =
+         tbox::MathUtilities<double>::getSignalingNaN();
+      d_dt_max_level[level_number] =
+         tbox::MathUtilities<double>::getSignalingNaN();
+      d_dt_actual_level[level_number] =
+         tbox::MathUtilities<double>::getSignalingNaN();
+      d_step_level[level_number] = tbox::MathUtilities<int>::getMax();
+      d_max_steps_level[level_number] = tbox::MathUtilities<int>::getMax();
+   }
+
+   /*
+    * Set regrid interval data based on ratios between levels or input value.
+    */
+
+   if (d_use_refined_timestepping) {
+      if (max_levels > 1) {
+
+         for (level_number = 1; level_number < max_levels; level_number++) {
+            const hier::IntVector ratio(d_patch_hierarchy->
+                                        getRatioToCoarserLevel(level_number));
+
+            if (((ratio.max() % 2) == 0) || (ratio.max() == 1)) {
+               d_regrid_interval[level_number] = 2;
+            } else {
+               if ((ratio.max() % 3) == 0) {
+                  d_regrid_interval[level_number] = 3;
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ":  "
+                     <<
+                     " integrator cannot set regrid interval"
+                     <<
+                     " based on ratios between levels.");
+               }
+            }
+         }
+
+         d_regrid_interval[0] = d_regrid_interval[1];
+
+      } else {
+         for (level_number = 0; level_number < max_levels; level_number++) {
+            d_regrid_interval[level_number] = 1;
+         }
+      }
+   } else {
+      int regrid_interval =
+         input_db->getIntegerWithDefault("regrid_interval", 1);
+
+      setRegridInterval(regrid_interval);
+   }
+
+   /*
+    * Initialize this time refinement integration object with data read
+    * from input and restart databases.
+    */
+   bool is_from_restart = tbox::RestartManager::getManager()->isFromRestart();
+   if (is_from_restart && d_registered_for_restart) {
+      getFromRestart();
+   }
+   getFromInput(input_db, is_from_restart);
+
+   /*
+    * Initialize remaining integrator data members.
+    */
+
+   d_just_regridded = false;
+
+   if (!is_from_restart) {
+      d_integrator_time = d_start_time;
+      d_integrator_step = 0;
+      d_last_finest_level = 0;
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destructor tells tbox::RestartManager to remove this object from the   *
+ * list of restart items.                                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+TimeRefinementIntegrator::~TimeRefinementIntegrator()
+{
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->unregisterRestartItem(d_object_name);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create patch level and patches for coarsest level in AMR hierarchy    *
+ * at initial simulation time.  Then, set time stepping data and set     *
+ * initial patch data on the coarsest level.  The actual level data      *
+ * initialization process is invoked by the recursive private member     *
+ * function initialize().  This function will create and initialize      *
+ * successively finer hierarchy levels until either the maximum number   *
+ * allowable level is reached or no further refinement is needed.        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double TimeRefinementIntegrator::initializeHierarchy(
+   const hier::MappedBoxLevel& override_mapped_box_level)
+{
+
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*d_patch_hierarchy, override_mapped_box_level);
+
+   if (d_barrier_and_time) {
+      t_initialize_hier->barrierAndStart();
+   }
+
+   d_refine_level_integrator->initializeLevelIntegrator(d_gridding_algorithm);
+
+   if (tbox::RestartManager::getManager()->isFromRestart()) {
+
+      d_patch_hierarchy->getFromRestart();
+
+      d_gridding_algorithm->
+      getTagAndInitializeStrategy()->
+      resetHierarchyConfiguration(d_patch_hierarchy,
+         0,
+         d_patch_hierarchy->
+         getFinestLevelNumber());
+
+   } else {
+
+      d_gridding_algorithm->makeCoarsestLevel(
+         d_start_time,
+         override_mapped_box_level);
+
+      if (d_use_refined_timestepping) {
+         initializeRefinedTimesteppingLevelData(0);
+      } else {
+         initializeSynchronizedTimesteppingLevelData(0);
+      }
+
+      /*
+       * After data on each level is initialized at simulation start time,
+       * coarser levels are synchronized with finer levels that didn't exist
+       * when the coarser level initial data was set.  This synchronization
+       * process is defined by the integration algorithm.
+       */
+      if (d_patch_hierarchy->getFinestLevelNumber() > 0) {
+         // "true" argument: const bool initial_time = true;
+         d_refine_level_integrator->synchronizeNewLevels(d_patch_hierarchy,
+            0,
+            d_patch_hierarchy->
+            getFinestLevelNumber(),
+            d_start_time,
+            true);
+      }
+   }
+
+   if (d_barrier_and_time) {
+      t_initialize_hier->stop();
+   }
+
+   return d_dt_max_level[0];
+
+}
+
+double TimeRefinementIntegrator::initializeHierarchy()
+{
+   return initializeHierarchy(
+      hier::MappedBoxLevel(d_patch_hierarchy->getDim()));
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Advance all levels in hierarchy through specified time interval dt    *
+ * by invoking the recursive timestepping process at the coarsest        *
+ * hierarchy level (level 0).  If synchronized timestepping is used,     *
+ * then loop through each level advance and then synchronize all levels. *
+ * The return value is the proper time increment for a subsequent        *
+ * advance of level 0.                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double TimeRefinementIntegrator::advanceHierarchy(
+   const double dt,
+   const bool rebalance_coarsest)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(dt >= 0.0);
+#endif
+
+   if (d_barrier_and_time) {
+      t_advance_hier->barrierAndStart();
+   }
+
+   d_level_sim_time[0] = d_integrator_time;
+
+   if (rebalance_coarsest) {
+      d_gridding_algorithm->makeCoarsestLevel(
+         d_level_sim_time[0]);
+   }
+
+   double dt_new;
+
+   if (!d_use_refined_timestepping) {
+
+      dt_new = advanceForSynchronizedTimestepping(d_level_sim_time[0] + dt);
+
+      if (d_integrator_time + dt_new > d_end_time) {
+         dt_new = d_end_time - d_integrator_time;
+      }
+
+   } else {
+      advanceRecursivelyForRefinedTimestepping(0, d_level_sim_time[0] + dt);
+      d_integrator_time += dt;
+      dt_new = tbox::MathUtilities<double>::Min(d_dt_actual_level[0],
+            d_end_time - d_integrator_time);
+   }
+
+   if (d_barrier_and_time) {
+      t_advance_hier->stop();
+   }
+
+   return dt_new;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialize data on given level.  Then, invoke regridding and          *
+ * recursively initialize finer levels, if necessary.  The coarsest      *
+ * level (i.e., level 0) is created by initializeHierarchy().  Each      *
+ * finer level is constructed by calls this function.  The gridding      *
+ * algorithm data member build finer each level and its patches.         *
+ *                                                                       *
+ * This function assumes that the patch level and patches exist before   *
+ * it is called.  Upon leaving this routine, initial data is set         *
+ * according to the methods in the level integration routines, which     *
+ * are generally invoked from the gridding algorithm class.  Also,       *
+ * basic time increment data is set for each level.                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+TimeRefinementIntegrator::initializeRefinedTimesteppingLevelData(
+   const int level_number)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((level_number >= 0) &&
+      (level_number <= d_patch_hierarchy->getFinestLevelNumber()));
+#endif
+
+   const tbox::Pointer<hier::BasePatchLevel>
+   patch_level = d_patch_hierarchy->getPatchLevel(level_number);
+
+   /*
+    * Initialize step count and start time for current level.
+    * Then, query level strategy for proper time step.
+    */
+
+   d_step_level[level_number] = 0;
+   d_max_steps_level[level_number] = 1;
+   d_level_sim_time[level_number] = d_start_time;
+
+   bool initial_time = true;
+   double dt_level;
+
+   dt_level = d_refine_level_integrator->getLevelDt(patch_level,
+         d_level_sim_time[level_number],
+         initial_time);
+
+   /*
+    * If a coarser level exists, we require that the time increment on
+    * the current level be consistent with the needs of the numerical
+    * integration algorithm (i.e., the level strategy).  Futhermore,
+    * if the current level can be refined and the level is not the coarsest
+    * in the hierarchy, we require that the time increment be adjusted so
+    * that the number of steps taken on the level before synchronization
+    * with the next coarser level is an integer multiple of the grid
+    * refinement ratio between the two levels.
+    */
+
+   if (level_number > 0) {
+      dt_level = tbox::MathUtilities<double>::Min(dt_level,
+            d_refine_level_integrator->getMaxFinerLevelDt(
+               level_number,
+               d_dt_actual_level[level_number - 1],
+               d_patch_hierarchy->
+               getRatioToCoarserLevel(level_number)));
+   }
+
+   d_dt_max_level[level_number] = d_dt_actual_level[level_number] = dt_level;
+
+   /*
+    * Create a finer level if appropriate.
+    */
+
+   if (d_patch_hierarchy->levelCanBeRefined(level_number)) {
+
+      int buffer;
+      if (d_gridding_algorithm->errorEstimationUsesTimeIntegration()) {
+         buffer = d_regrid_interval[level_number];
+      } else {
+         buffer = d_tag_buffer[level_number];
+      }
+
+      double regrid_start_time =
+         d_level_sim_time[level_number] - d_dt_actual_level[level_number];
+      // "true" argument: const bool initial_time = true;
+      d_gridding_algorithm->makeFinerLevel(
+         d_level_sim_time[level_number],
+         true,
+         buffer,
+         regrid_start_time);
+
+      /*
+       * If new finer level is made, data on its patches is initialized.
+       * Also, if new level can be refined and time integration is used
+       * during regridding process, data on the current level is advanced
+       * through a single time increment to provide boundary data for the
+       * regridding process on finer levels.
+       */
+
+      if (d_patch_hierarchy->finerLevelExists(level_number)) {
+
+         /*
+          * If time integration is used in the refinement process and
+          * the newly created finer level can be further refined,
+          * data is advanced on the current level through one time
+          * increment to provide time interpolated boundary data for
+          * regridding on the finer level.
+          */
+         if (d_patch_hierarchy->levelCanBeRefined(level_number + 1) &&
+             d_gridding_algorithm->errorEstimationUsesTimeIntegration()) {
+
+            if (d_barrier_and_time) {
+               t_advance_level->barrierAndStart();
+            }
+            // "false" argument: bool last_step = false;
+            // "true" argument: bool regrid_advance = true;
+            d_refine_level_integrator->
+            advanceLevel(patch_level,
+               d_patch_hierarchy,
+               d_level_sim_time[level_number],
+               d_level_sim_time[level_number]
+               + d_dt_actual_level[level_number],
+               firstLevelStep(level_number),
+               false,
+               true);
+            if (d_barrier_and_time) {
+               t_advance_level->stop();
+            }
+         }
+
+         /*
+          * RECURSIVE invocation of initialization on next finer level.
+          */
+
+         initializeRefinedTimesteppingLevelData(level_number + 1);
+
+         /*
+          * If current level patch data was advanced above, all new
+          * data is discarded so that advance routines all start with the
+          * same patch data on each level, and because AMR synchronization
+          * may require a different initial time increment size.
+          */
+
+         if (d_patch_hierarchy->levelCanBeRefined(level_number + 1) &&
+             d_gridding_algorithm->errorEstimationUsesTimeIntegration()) {
+            d_refine_level_integrator->
+            resetDataToPreadvanceState(patch_level);
+         }
+      }
+   }
+}
+
+void
+TimeRefinementIntegrator::initializeSynchronizedTimesteppingLevelData(
+   const int level_number)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((level_number >= 0) &&
+      (level_number <= d_patch_hierarchy->getFinestLevelNumber()));
+#endif
+
+   const tbox::Pointer<hier::BasePatchLevel>
+   patch_level = d_patch_hierarchy->getPatchLevel(level_number);
+
+   /*
+    * Initialize step count and start time for current level.
+    * Then, query level strategy for proper time step.
+    */
+
+   d_step_level[level_number] = 0;
+   d_max_steps_level[level_number] = 1;
+   d_level_sim_time[level_number] = d_start_time;
+   d_level_old_time[level_number] = d_start_time;
+
+   bool initial_time = true;
+   double dt_level;
+
+   dt_level = d_refine_level_integrator->getLevelDt(patch_level,
+         d_level_sim_time[level_number],
+         initial_time);
+
+   if (level_number == 0) {
+      d_dt = dt_level;
+   } else {
+      d_dt = tbox::MathUtilities<double>::Min(d_dt, dt_level);
+   }
+   d_dt_max_level[level_number] = d_dt_actual_level[level_number] = d_dt;
+
+   for (int i = 0; i < level_number; i++) {
+      if (d_dt_max_level[i] > d_dt_max_level[level_number]) {
+         d_dt_max_level[i] = d_dt_actual_level[i] =
+               d_dt_max_level[level_number];
+      }
+   }
+
+   /*
+    * Create a finer level if appropriate.
+    */
+
+   if (d_patch_hierarchy->levelCanBeRefined(level_number)) {
+
+      int buffer;
+      if (d_gridding_algorithm->errorEstimationUsesTimeIntegration()) {
+         buffer = d_regrid_interval[level_number];
+      } else {
+         buffer = d_tag_buffer[level_number];
+      }
+
+      double regrid_start_time =
+         d_level_sim_time[level_number] - d_dt_actual_level[level_number];
+      // "true" argument: const bool initial_time = true;
+      d_gridding_algorithm->makeFinerLevel(
+         d_level_sim_time[level_number],
+         true,
+         buffer,
+         regrid_start_time);
+
+      /*
+       * If new finer level is made, data on its patches is initialized.
+       * Also, if new level can be refined and time integration is used
+       * during regridding process, data on the current level is advanced
+       * through a single time increment to provide boundary data for the
+       * regridding process on finer levels.
+       */
+
+      if (d_patch_hierarchy->finerLevelExists(level_number)) {
+
+         /*
+          * If time integration is used in the refinement process and
+          * the newly created finer level can be further refined,
+          * data is advanced on the current level through one time
+          * increment to provide time interpolated boundary data for
+          * regridding on the finer level.
+          */
+         if (d_patch_hierarchy->levelCanBeRefined(level_number + 1) &&
+             d_gridding_algorithm->errorEstimationUsesTimeIntegration()) {
+
+            if (d_barrier_and_time) {
+               t_advance_level->barrierAndStart();
+            }
+            // "false" argument: bool last_step = false;
+            // "true" argument: bool regrid_advance = true;
+            d_refine_level_integrator->
+            advanceLevel(patch_level,
+               d_patch_hierarchy,
+               d_level_sim_time[level_number],
+               d_level_sim_time[level_number]
+               + d_dt_actual_level[level_number],
+               firstLevelStep(level_number),
+               false,
+               true);
+
+            if (d_barrier_and_time) {
+               t_advance_level->stop();
+            }
+         }
+
+         /*
+          * RECURSIVE invocation of initialization on next finer level.
+          */
+
+         initializeSynchronizedTimesteppingLevelData(level_number + 1);
+
+         /*
+          * If current level patch data was advanced above, all new
+          * data is discarded so that advance routines all start with the
+          * same patch data on each level, and because AMR synchronization
+          * may require a different initial time increment size.
+          */
+         if (d_patch_hierarchy->levelCanBeRefined(level_number + 1) &&
+             d_gridding_algorithm->errorEstimationUsesTimeIntegration()) {
+            d_refine_level_integrator->
+            resetDataToPreadvanceState(patch_level);
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Advance data on level to specified time.  Then, advance each finer    *
+ * hierarchy level to the same end time using recursive function calls.  *
+ * It is assumed that when this function is called, only the data needed *
+ * for initialization exists on the level.  Also, the solutions on       *
+ * specified level and all finer levels are synchronized at the the      *
+ * current simulation time on level level_number-1.  The integration     *
+ * process implemented in this function is outlined as follows:          *
+ *                                                                       *
+ *    1) Initialize timestep count, simulation time, time step increment *
+ *       for level level_number.                                         *
+ *    2) Adjust time first time increment if necessary and estimate      *
+ *       number of timesteps required to advance the level to end time.  *
+ *    3) Iterate over sequence of timesteps for level level_number:      *
+ *       a) Set end time for current step, record current time for       *
+ *          synchronization.                                             *
+ *       b) Advance solution on level using given time increment.        *
+ *          Note that the level strategy performs the advance.           *
+ *       c) Increment step count information.                            *
+ *       d) If finer level exists, advance finer level to end time of    *
+ *          most recent time step using recursive function call.         *
+ *       e) Synchronize data between levels as necessary.  Note that     *
+ *          new solution on level level_number as well as each finer     *
+ *          level corresponds to the same time.  Also, synchronization   *
+ *          involves several levels, typically, including all levels     *
+ *          finer than level_number, level level_number itself, and the  *
+ *          possibly level level_number-1.  Which levels synchronize     *
+ *          here depends on when regridding occurs.  Note that the       *
+ *          level strategy performs the data synchronization.            *
+ *       f) Increment the simulation time and determine the size of the  *
+ *          next timestep for the level and estimate the number of       *
+ *          timesteps needed to advance the level to end time.           *
+ *       g) If appropriate, regrid all finer levels.                     *
+ *          Note that the gridding algorithm regrids the mesh.           *
+ *       h) Synchronize all levels involved in the regridding process,   *
+ *          if it occurred.  The sync is performed by level strategy.    *
+ *       i) If regridding did not occur, then reset current and new      *
+ *          solution data on the level.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void TimeRefinementIntegrator::advanceRecursivelyForRefinedTimestepping(
+   const int level_number,
+   const double end_time)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((level_number >= 0) &&
+      (level_number <= d_patch_hierarchy->getFinestLevelNumber()));
+   TBOX_ASSERT(end_time >= d_integrator_time);
+#endif
+
+   const tbox::Pointer<hier::BasePatchLevel>
+   patch_level = d_patch_hierarchy->getPatchLevel(level_number);
+
+   /*
+    * Initialize step count, start time for current level.
+    * Determine time remaining on level and, if necessary, set
+    * the max time increment for the level.
+    */
+
+   d_step_level[level_number] = 0;
+   d_max_steps_level[level_number] = 1;
+   double time_remaining = 0.0;
+
+   if (level_number > 0) {
+      d_level_sim_time[level_number] = d_level_sim_time[level_number - 1];
+      time_remaining = end_time - d_level_sim_time[level_number];
+
+      /*
+       * If this level was created during last regrid, compute max time
+       * increment for level.
+       */
+
+      if (d_last_finest_level < level_number) {
+         d_dt_max_level[level_number] =
+            tbox::MathUtilities<double>::Min(
+               d_dt_actual_level[level_number - 1],
+               d_refine_level_integrator->getMaxFinerLevelDt(
+                  level_number,
+                  d_dt_actual_level[level_number - 1],
+                  d_patch_hierarchy->
+                  getRatioToCoarserLevel(level_number)));
+
+         if (d_patch_hierarchy->levelCanBeRefined(level_number)) {
+            d_dt_max_level[level_number] =
+               tbox::MathUtilities<double>::Min(d_dt_max_level[level_number],
+                  time_remaining
+                  / double(d_regrid_interval[level_number]));
+         }
+         d_last_finest_level = level_number;
+      }
+
+   } else {
+      time_remaining = end_time - d_level_sim_time[level_number];
+   }
+
+   /*
+    * Determine time increment for first step in integration sequence,
+    * and estimate the number of steps before synchronization with the
+    * next coarser level occurs.
+    */
+
+   bool sync_after_step =
+      findNextDtAndStepsRemaining(level_number,
+         time_remaining,
+         d_dt_max_level[level_number]);
+
+   /*
+    * Loop over a dynamically determined sequence of timesteps on the
+    * current level (level_number).  Note that if level is coarsest in
+    * AMR hierarchy, we must determine whether there will only be a
+    * single advance step before the function returns.
+    */
+
+   double new_level_time, dt_new;
+   while (!lastLevelStep(level_number)) {
+
+      /*
+       * Determine new time after this step, set old time for synchronization.
+       */
+
+      new_level_time = (sync_after_step ? end_time
+                        : d_level_sim_time[level_number]
+                        + d_dt_actual_level[level_number]);
+      d_level_old_old_time[level_number] = d_level_old_time[level_number];
+      d_level_old_time[level_number] = d_level_sim_time[level_number];
+      d_just_regridded = false;
+
+#ifdef DEBUG_TIMES
+      tbox::plog << "\nAdvancing level number = " << level_number << std::endl;
+      tbox::plog << "step number = " << d_step_level[level_number] << std::endl;
+      tbox::plog << "max steps = " << d_max_steps_level[level_number]
+      << std::endl;
+      tbox::plog << "current time = " << d_level_sim_time[level_number]
+      << std::endl;
+      tbox::plog << "dt used = " << d_dt_actual_level[level_number]
+      << std::endl;
+      tbox::plog << "new level time = " << new_level_time << std::endl;
+      tbox::plog << "dt max = " << d_dt_max_level[level_number] << std::endl;
+      tbox::plog << "end time = " << end_time << std::endl;
+      tbox::plog << "sync_after_step = " << sync_after_step << std::endl;
+#endif
+
+      /*
+       * Advance level from current simulation time to new_level_time
+       * using a single time advance step.  Note that the level strategy
+       * returns the next time increment for the level.  Also, we keep both
+       * new and previous data on level so that time interpolation can be
+       * used to set boundary conditions for finer levels and for proper
+       * data synchronization once all finer levels have been advanced.
+       */
+
+      if (d_barrier_and_time) {
+         t_advance_level->barrierAndStart();
+      }
+      // "sync_after_step" is same as "last_step" in level strategy.
+      dt_new = d_refine_level_integrator->advanceLevel(patch_level,
+            d_patch_hierarchy,
+            d_level_sim_time[level_number],
+            new_level_time,
+            firstLevelStep(level_number),
+            sync_after_step);
+
+      if (d_barrier_and_time) {
+         t_advance_level->stop();
+      }
+
+      /*
+       * Update step count information.  Then, advance all finer levels.
+       */
+
+      if (level_number == 0) d_integrator_step++;
+      d_step_level[level_number]++;
+
+      if (d_patch_hierarchy->finerLevelExists(level_number)) {
+         advanceRecursivelyForRefinedTimestepping(level_number + 1,
+            new_level_time);
+      }
+
+      /*
+       * Synchronize data between levels in the hierarchy as necessary.
+       * Note that this process synchronizes data between this level,
+       * several finer levels, and the next coarser level, potentially.
+       */
+
+      int coarsest_sync_level = -1;
+      int finest_level_number = d_patch_hierarchy->getFinestLevelNumber();
+
+      if (atRegridPoint(level_number)) {
+
+         if (!lastLevelStep(level_number)
+             || !coarserLevelRegridsToo(level_number)) {
+
+            coarsest_sync_level = (((level_number > 0)
+                                    && lastLevelStep(level_number))
+                                   ? level_number - 1 : level_number);
+
+            if (coarsest_sync_level < finest_level_number) {
+#ifdef DEBUG_TIMES
+               tbox::plog << "\nSynchronizing levels " << coarsest_sync_level
+                          << " to "
+                          << finest_level_number << std::endl;
+#endif
+               d_refine_level_integrator->
+               standardLevelSynchronization(d_patch_hierarchy,
+                  coarsest_sync_level,
+                  finest_level_number,
+                  new_level_time,
+                  d_level_old_time);
+            }
+
+         }
+
+      } else {
+
+         if (level_number < finest_level_number) {
+            if ((!lastLevelStep(level_number)
+                 || (level_number == 0)) && !d_just_regridded) {
+#ifdef DEBUG_TIMES
+               tbox::plog << "\nSynchronizing levels " << level_number
+                          << " to "
+                          << finest_level_number << std::endl;
+#endif
+               d_refine_level_integrator->
+               standardLevelSynchronization(d_patch_hierarchy,
+                  level_number,
+                  finest_level_number,
+                  new_level_time,
+                  d_level_old_time);
+
+               d_refine_level_integrator->
+               resetTimeDependentData(d_patch_hierarchy->
+                  getPatchLevel(finest_level_number),
+                  new_level_time,
+                  d_patch_hierarchy->
+                  levelCanBeRefined(finest_level_number));
+            }
+         }
+
+      }
+
+      /*
+       * Update level simulation time and time remaining until
+       * synchronization with next coarser level.  Then, adjust
+       * time increment and step sequence for current level.
+       */
+
+      d_level_sim_time[level_number] = new_level_time;
+      time_remaining = end_time - new_level_time;
+
+      sync_after_step = findNextDtAndStepsRemaining(level_number,
+            time_remaining,
+            dt_new);
+
+      /*
+       * All finer levels are synchronized with this level now.
+       * If appropriate, we regrid finer levels and re-synchronize
+       * levels as needed.  Otherwise, we reset time-dependent data and
+       * re-synchronize levels as needed.  Note that the regridding
+       * process resets the data on each level involved in the regridding.
+       */
+
+      if (atRegridPoint(level_number)) {
+
+         if (!lastLevelStep(level_number)
+             || !coarserLevelRegridsToo(level_number)) {
+#ifdef DEBUG_TIMES
+            tbox::plog << "\nRegridding from level number = "
+                       << level_number << std::endl;
+#endif
+            /*
+             * Reset time dependent data.  If the gridding algorithm uses
+             * time integration for error estimation, it will have already
+             * reset time dependent data on all levels regridded, so
+             * only reset data on levels that are not regridded.  If the
+             * gridding algorithm does not used time integration, reset data
+             * on all levels.
+             */
+            if (d_gridding_algorithm->errorEstimationUsesTimeIntegration()) {
+               if (!d_patch_hierarchy->
+                   levelCanBeRefined(finest_level_number)) {
+                  d_refine_level_integrator->resetTimeDependentData(
+                     d_patch_hierarchy->getPatchLevel(finest_level_number),
+                     new_level_time,
+                     d_patch_hierarchy->
+                     levelCanBeRefined(finest_level_number));
+               }
+            } else {
+               for (int ln = level_number; ln <= finest_level_number; ln++) {
+                  d_refine_level_integrator->resetTimeDependentData(
+                     d_patch_hierarchy->getPatchLevel(ln),
+                     d_level_sim_time[ln],
+                     d_patch_hierarchy->levelCanBeRefined(ln));
+               }
+            }
+
+            d_last_finest_level = finest_level_number;
+
+            /*
+             * Regrid finer levels.  If the error estimation procedure
+             * uses time integration (e.g. Richardson extrapolation) then
+             * we must supply the oldest time at which data is stored.
+             *
+             * If the error coarsen ratio is two, data will be stored
+             * from the previous timestep (at d_level_old_time).  If the
+             * error coarsen ratio is three, data will be stored
+             * from two previous timesteps (at d_level_old_old_time).
+             *
+             * If we are not using time integration, the oldest time
+             * information should not be used, so it is set to NaNs
+             * to throw an assertion if it is accessed.
+             */
+
+            tbox::Array<double> regrid_start_time;
+            if (!d_gridding_algorithm->errorEstimationUsesTimeIntegration()) {
+
+               int max_levels = d_patch_hierarchy->getMaxNumberOfLevels();
+               regrid_start_time.resizeArray(max_levels);
+               for (int i = 0; i < regrid_start_time.getSize(); i++) {
+                  regrid_start_time[i] = 0.;
+               }
+
+            } else {
+
+               if (d_gridding_algorithm->getTagAndInitializeStrategy()->getErrorCoarsenRatio() == 2) {
+                  regrid_start_time = d_level_old_time;
+               } else if (d_gridding_algorithm->getTagAndInitializeStrategy()->getErrorCoarsenRatio() == 3) {
+                  regrid_start_time = d_level_old_old_time;
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": the supplied gridding "
+                     <<
+                     "algorithm uses an error coarsen ratio of "
+                     << d_gridding_algorithm->
+                     getTagAndInitializeStrategy()->getErrorCoarsenRatio()
+                     <<
+                     " which is not supported in this class"
+                     << std::endl);
+               }
+
+            }
+
+            d_gridding_algorithm->
+            regridAllFinerLevels(
+               level_number,
+               d_level_sim_time[level_number],
+               d_tag_buffer,
+               regrid_start_time,
+               (coarsest_sync_level >= level_number));
+
+            d_just_regridded = true;
+
+            if (level_number < d_patch_hierarchy->getFinestLevelNumber()) {
+#ifdef DEBUG_TIMES
+               tbox::plog << "\nSynchronizing levels after regrid : "
+                          << level_number << " to "
+                          << d_patch_hierarchy->getFinestLevelNumber()
+                          << std::endl;
+#endif
+
+               // "false" argument: const bool initial_time = false;
+               d_refine_level_integrator->
+               synchronizeNewLevels(d_patch_hierarchy,
+                  level_number,
+                  d_patch_hierarchy->getFinestLevelNumber(),
+                  d_level_sim_time[level_number],
+                  false);
+            }
+
+         }
+
+      } else {
+
+         if (!lastLevelStep(level_number) || (level_number == 0)) {
+            d_refine_level_integrator->resetTimeDependentData(
+               patch_level,
+               d_level_sim_time[level_number],
+               d_patch_hierarchy->
+               levelCanBeRefined(level_number));
+         }
+
+         if (d_just_regridded) {
+#ifdef DEBUG_TIMES
+            tbox::plog << "\nSynchronizing levels after regrid : "
+                       << level_number << " to "
+                       << d_patch_hierarchy->getFinestLevelNumber()
+                       << std::endl;
+#endif
+            // "false" argument: const bool initial_time = false;
+            d_refine_level_integrator->
+            synchronizeNewLevels(d_patch_hierarchy,
+               level_number,
+               d_patch_hierarchy->getFinestLevelNumber(),
+               d_level_sim_time[level_number],
+               false);
+         }
+
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Advance data on all hierarchy levels through specified time increment *
+ * using the same timesteps on each level.  Synchronization and          *
+ * regridding are performed as needed.                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double TimeRefinementIntegrator::advanceForSynchronizedTimestepping(
+   const double end_time)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(end_time >= d_integrator_time);
+#endif
+
+   double dt = end_time - d_integrator_time;
+
+   int finest_level_number = d_patch_hierarchy->getFinestLevelNumber();
+   double dt_new = tbox::MathUtilities<double>::getMax();
+
+   int level_num;
+   for (level_num = 0; level_num <= finest_level_number; level_num++) {
+
+      tbox::Pointer<hier::BasePatchLevel> patch_level =
+         d_patch_hierarchy->getPatchLevel(level_num);
+
+      d_step_level[level_num] = 1;
+      d_max_steps_level[level_num] = 1;
+      d_dt_max_level[level_num] = dt;
+      d_level_sim_time[level_num] = d_integrator_time;
+
+#ifdef DEBUG_TIMES
+      tbox::plog << "\nAdvancing level number = " << level_num << std::endl;
+      tbox::plog << "step number = " << d_step_level[level_num] << std::endl;
+      tbox::plog << "max steps = " << d_max_steps_level[level_num] << std::endl;
+      tbox::plog << "current time = " << d_integrator_time << std::endl;
+      tbox::plog << "dt used = " << dt << std::endl;
+      tbox::plog << "new level time = " << d_integrator_time + dt << std::endl;
+#endif
+
+      if (d_barrier_and_time) {
+         t_advance_level->barrierAndStart();
+      }
+      // "true" argument: bool first_step = true;
+      // "false" argument: bool last_step = false;
+      double dt_next_level =
+         d_refine_level_integrator->advanceLevel(patch_level,
+            d_patch_hierarchy,
+            d_integrator_time,
+            d_integrator_time + dt,
+            true,
+            false);
+
+      if (d_barrier_and_time) {
+         t_advance_level->stop();
+      }
+
+      dt_new = tbox::MathUtilities<double>::Min(dt_new, dt_next_level);
+   }
+
+   dt_new = tbox::MathUtilities<double>::Min(dt_new, d_grow_dt * dt);
+
+   for (level_num = 0; level_num <= finest_level_number; level_num++) {
+      d_dt_max_level[level_num] = d_dt_actual_level[level_num] = dt_new;
+   }
+
+   d_integrator_time += dt;
+   d_integrator_step++;
+
+   int coarse_level_number = 0;
+
+   if (finest_level_number > 0) {
+
+#ifdef DEBUG_TIMES
+      tbox::plog << "\nSynchronizing levels " << coarse_level_number
+                 << " to " << finest_level_number << std::endl;
+#endif
+
+      d_refine_level_integrator->standardLevelSynchronization(
+         d_patch_hierarchy,
+         0,
+         finest_level_number,
+         d_integrator_time,
+         d_integrator_time - dt);
+   }
+
+   /*
+    * Store the time from the previous step(s) in the "old_time"
+    * array.  This information may be used during the re-gridding
+    * process, if time integration is used during error estimation.
+    */
+   for (level_num = 0; level_num <= finest_level_number; level_num++) {
+      d_level_old_old_time[level_num] = d_level_old_time[level_num];
+      d_level_old_time[level_num] = d_level_sim_time[level_num];
+   }
+
+   /*
+    * Are we ready to re-grid??
+    */
+   bool regrid_now = (d_integrator_step % d_regrid_interval[0] == 0);
+
+   if (!regrid_now) {
+
+      /*
+       * We are not re-gridding, so all we need to do is simply
+       * reset the time dependent data on all the levels to
+       * prepare for the next advance.
+       */
+      for (int ln = 0; ln <= finest_level_number; ln++) {
+         d_refine_level_integrator->resetTimeDependentData(
+            d_patch_hierarchy->getPatchLevel(ln),
+            d_integrator_time,
+            d_patch_hierarchy->levelCanBeRefined(ln));
+      }
+
+   } else {
+
+      /*
+       * We are re-gridding.  Reset the time dependent data.  If
+       * the error estimation procedure does NOT use time
+       * integration (e.g. gradient detection) then simply go
+       * through all levels of the hierarchy and reset.
+       *
+       * If the error estimation does use time integration
+       * (e.g. Richardson extrapolation) the time dependent
+       * data will be accessed during the tagging phase.
+       * Hence, we only reset time dependent data on levels
+       * that are not tagged (i.e. the finest level) and
+       * defer resetting time dependent data on levels that
+       * are tagged to the level integrator performing the
+       * re-gridding operations. NOTE:  One should assure
+       * this is properly done in the level integrator.
+       */
+
+      if (d_gridding_algorithm->errorEstimationUsesTimeIntegration()) {
+         if (!d_patch_hierarchy->
+             levelCanBeRefined(finest_level_number)) {
+            d_refine_level_integrator->resetTimeDependentData(
+               d_patch_hierarchy->getPatchLevel(finest_level_number),
+               d_integrator_time,
+               d_patch_hierarchy->
+               levelCanBeRefined(finest_level_number));
+         }
+      } else {
+         for (int ln = 0; ln <= finest_level_number; ln++) {
+            d_refine_level_integrator->resetTimeDependentData(
+               d_patch_hierarchy->getPatchLevel(ln),
+               d_integrator_time,
+               d_patch_hierarchy->levelCanBeRefined(ln));
+         }
+      }
+
+      /*
+       * Regrid all levels, from coarsest to finest.  If the error
+       * estimation procedure uses time integration (e.g. Richardson
+       * extrapolation) then we must supply the oldest time at which
+       * data is stored.
+       *
+       * If the error coarsen ratio is two, data will be stored
+       * from the previous timestep (at d_level_old_time).  If the
+       * error coarsen ratio is three, data will be stored
+       * from two previous timesteps (at d_level_old_old_time).
+       *
+       * If we are not using time integration, the oldest time
+       * information should not be used, so it is set to NaNs
+       * to throw an assertion if it is accessed.
+       */
+
+      tbox::Array<double> regrid_start_time;
+      if (!d_gridding_algorithm->errorEstimationUsesTimeIntegration()) {
+
+         int max_levels = d_patch_hierarchy->getMaxNumberOfLevels();
+         regrid_start_time.resizeArray(max_levels);
+         for (int i = 0; i < regrid_start_time.getSize(); i++) {
+            regrid_start_time[i] = 0.;
+         }
+
+      } else {
+
+         if (d_gridding_algorithm->getTagAndInitializeStrategy()->getErrorCoarsenRatio() == 2) {
+            regrid_start_time = d_level_old_time;
+         } else if (d_gridding_algorithm->getTagAndInitializeStrategy()->getErrorCoarsenRatio() == 3) {
+            regrid_start_time = d_level_old_old_time;
+         } else {
+            TBOX_ERROR(
+               d_object_name << ": the supplied gridding "
+               <<
+               "algorithm uses an error coarsen ratio of "
+               << d_gridding_algorithm->
+               getTagAndInitializeStrategy()->getErrorCoarsenRatio()
+               << " which is not supported in this class"
+               << std::endl);
+         }
+
+      }
+
+      d_gridding_algorithm->
+      regridAllFinerLevels(
+         coarse_level_number,
+         d_integrator_time,
+         d_tag_buffer,
+         regrid_start_time);
+
+      /*
+       * Synchronize data on new levels.
+       */
+      if (d_patch_hierarchy->getFinestLevelNumber() > 0) {
+
+#ifdef DEBUG_TIMES
+         tbox::plog << "\nSynchronizing levels after regrid : "
+                    << coarse_level_number << " to "
+                    << d_patch_hierarchy->getFinestLevelNumber() << std::endl;
+#endif
+         const bool initial_time = false;
+         d_refine_level_integrator->synchronizeNewLevels(
+            d_patch_hierarchy,
+            coarse_level_number,
+            d_patch_hierarchy->getFinestLevelNumber(),
+            d_integrator_time,
+            initial_time);
+      }
+
+   }
+
+   return dt_new;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute time step data for given level and estimate the number of     *
+ * time steps needed in current step sequence on that level.  The        *
+ * boolean return value indicates whether the next step taken will       *
+ * be the last in the step sequence on the level.  The outline of the    *
+ * procedure is as follows:                                              *
+ *                                                                       *
+ *    1) Determine maximum time increment allowed, permitting time step  *
+ *       growth if appropriate.                                          *
+ *    2) If time steps remain in current step sequence:                  *
+ *       a) Estimate the number of timesteps left in the sequence based  *
+ *          on the time remaining.                                       *
+ *       b) Possibly increase the number of time steps remaining so      *
+ *          that total step count remains consistent with regridding     *
+ *          sequence.  Note that the total number of steps must be an    *
+ *          integer multiple of the regrid interval for the level.       *
+ *       c) Compute time increment by dividing number of steps left      *
+ *          into remaining time.                                         *
+ *    3) If no steps remain on the level in the current sequence, the    *
+ *       next time increment is set to the current maximum increment.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool TimeRefinementIntegrator::findNextDtAndStepsRemaining(
+   const int level_number,
+   const double time_remaining,
+   const double dt_bound)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((level_number >= 0) &&
+      (level_number <= d_patch_hierarchy->getFinestLevelNumber()));
+   TBOX_ASSERT(time_remaining >= 0.0);
+   TBOX_ASSERT(dt_bound >= 0.0);
+#endif
+
+   /*
+    * Grow time increment from previous if possible, but time step size
+    * cannot be greater than dt_bound. also, we cannot take any more
+    * steps if we have exceeded number allowable.
+    */
+
+   d_dt_max_level[level_number] =
+      tbox::MathUtilities<double>::Min(dt_bound,
+         d_dt_max_level[level_number] * d_grow_dt);
+
+   if (d_step_level[level_number] < d_max_steps_level[level_number]) {
+
+      /*
+       * If we have not exceeded the max number of steps, the max number
+       * of steps can be adjusted according to the amount of time remaining
+       * of the level.
+       */
+
+      int number_steps_remaining =
+         int(time_remaining / d_dt_max_level[level_number]);
+
+      double dt_temp =
+         d_dt_max_level[level_number] * double(number_steps_remaining);
+
+      if (time_remaining - dt_temp >
+          sqrt(tbox::MathUtilities<double>::getEpsilon()) * time_remaining) {
+         number_steps_remaining++;
+      }
+
+      d_max_steps_level[level_number] =
+         d_step_level[level_number] + number_steps_remaining;
+
+      /*
+       * If we are not on the coarsest hierarchy level, there must be
+       * an integer multiple of the regrid interval of steps in the
+       * step sequence.
+       */
+
+      if (level_number > 0
+          && d_patch_hierarchy->levelCanBeRefined(level_number)) {
+
+         d_max_steps_level[level_number] =
+            tbox::MathUtilities<int>::Max(d_max_steps_level[level_number],
+               d_regrid_interval[level_number]);
+
+         int number_regrids =
+            d_max_steps_level[level_number] / d_regrid_interval[level_number];
+
+         if (d_max_steps_level[level_number]
+             % d_regrid_interval[level_number]) number_regrids++;
+
+         d_max_steps_level[level_number] =
+            number_regrids * d_regrid_interval[level_number];
+
+      }
+
+      if (d_step_level[level_number] >= d_max_steps_level[level_number]) {
+         TBOX_ERROR(
+            d_object_name << ":  "
+            <<
+            "no steps left to divide remaining time ...\n"
+            << "level_number = " << level_number
+            << std::endl
+            << "time_remaining = " << time_remaining
+            << "\ndt_bound = " << dt_bound
+            << "\nnumber_steps_remaining = "
+            << number_steps_remaining
+            << std::endl);
+      }
+
+      /*
+       * Adjust current time increment so that amount of time remaining
+       * on the level is divided approximately evenly among the time
+       * steps remaining.
+       */
+
+      d_dt_actual_level[level_number] =
+         time_remaining / double(d_max_steps_level[level_number]
+                                 - d_step_level[level_number]);
+
+   } else {
+      d_dt_actual_level[level_number] = d_dt_max_level[level_number];
+   }
+
+   return (d_max_steps_level[level_number]
+           - d_step_level[level_number]) <= 1;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true if the level can be remeshed at the current step.         *
+ * regrid step interval.  Otherwise, return false.                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool TimeRefinementIntegrator::atRegridPoint(
+   const int level_number) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((level_number >= 0) &&
+      (level_number <= d_patch_hierarchy->getFinestLevelNumber()));
+#endif
+
+   int step_number = ((level_number == 0) ? d_integrator_step
+                      : d_step_level[level_number]);
+
+   return (step_number > 0)
+          && d_patch_hierarchy->levelCanBeRefined(level_number)
+          && (step_number % d_regrid_interval[level_number] == 0);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true if the specified level can be regridded and the the next  *
+ * coarser level can be regridded too.  Otherwise, false is returned.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool TimeRefinementIntegrator::coarserLevelRegridsToo(
+   const int level_number) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((level_number >= 0) &&
+      (level_number <= d_patch_hierarchy->getFinestLevelNumber()));
+#endif
+   return (level_number > 0) ? atRegridPoint(level_number - 1) : false;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print all data member for TimeRefinementIntegrator object.            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void TimeRefinementIntegrator::printClassData(
+   std::ostream& os) const
+{
+   os << "\nTimeRefinementIntegrator::printClassData..." << std::endl;
+   os << "\nTimeRefinementIntegrator: this = "
+      << (TimeRefinementIntegrator *)this << std::endl;
+   os << "d_object_name = " << d_object_name << std::endl;
+   os << "d_integrator_time = " << d_integrator_time << "\n"
+      << "d_start_time = " << d_start_time << "\n"
+      << "d_end_time = " << d_end_time << "\n"
+      << "d_integrator_step = " << d_integrator_step << "\n"
+      << "d_max_integrator_steps = " << d_max_integrator_steps << "\n"
+      << "d_grow_dt = " << d_grow_dt << std::endl;
+   os << "d_just_regridded = " << d_just_regridded << std::endl;
+   os << "d_last_finest_level = " << d_last_finest_level << std::endl;
+   os << "d_patch_hierarchy = " << d_patch_hierarchy.getPointer() << std::endl;
+   os << "d_refine_level_integrator = "
+      << (TimeRefinementLevelStrategy *)d_refine_level_integrator << std::endl;
+   os << "d_gridding_algorithm = "
+      << (mesh::BaseGriddingAlgorithm *)d_gridding_algorithm << std::endl;
+
+   const int max_levels = d_patch_hierarchy->getMaxNumberOfLevels();
+   for (int level_number = 0; level_number < max_levels; level_number++) {
+      printDataForLevel(os, level_number);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print all level-specific data for TimeRefinementIntegrator object.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void TimeRefinementIntegrator::printDataForLevel(
+   std::ostream& os,
+   const int level_number) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((level_number >= 0) &&
+      (level_number <= d_patch_hierarchy->getFinestLevelNumber()));
+#endif
+   os << "\nTimeRefinementIntegrator::printDataForLevel..." << std::endl;
+   os << "\nd_level_sim_time[" << level_number << "] = "
+   << d_level_sim_time[level_number] << std::endl;
+   os << "\nd_level_old_time[" << level_number << "] = "
+   << d_level_old_time[level_number] << std::endl;
+   os << "\nd_level_old_old_time[" << level_number << "] = "
+   << d_level_old_old_time[level_number] << std::endl;
+   os << "\nd_dt_max_level[" << level_number << "] = "
+   << d_dt_max_level[level_number] << std::endl;
+   os << "\nd_dt_actual_level[" << level_number << "] = "
+   << d_dt_actual_level[level_number] << std::endl;
+   os << "\nd_step_level[" << level_number << "] = "
+   << d_step_level[level_number] << std::endl;
+   os << "\nd_max_steps_level[" << level_number << "] = "
+   << d_max_steps_level[level_number] << std::endl;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Write the class version number and data members to database object.   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void TimeRefinementIntegrator::putToDatabase(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   db->putInteger("ALGS_TIME_REFINEMENT_INTEGRATOR_VERSION",
+      ALGS_TIME_REFINEMENT_INTEGRATOR_VERSION);
+
+   db->putDouble("d_start_time", d_start_time);
+   db->putDouble("d_end_time", d_end_time);
+   db->putDouble("d_grow_dt", d_grow_dt);
+   db->putInteger("d_max_integrator_steps", d_max_integrator_steps);
+   db->putIntegerArray("d_regrid_interval", d_regrid_interval);
+   db->putIntegerArray("d_tag_buffer", d_tag_buffer);
+   db->putDouble("d_integrator_time", d_integrator_time);
+   db->putInteger("d_integrator_step", d_integrator_step);
+   db->putInteger("d_last_finest_level", d_last_finest_level);
+   db->putDoubleArray("d_dt_max_level", d_dt_max_level);
+   db->putDoubleArray("d_dt_actual_level", d_dt_actual_level);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * If simulation is not from restart, read in all data members from      *
+ * the input database.  Otherwise, only override end_time, grow_dt       *
+ * max_integrator_steps, and tag_buffer from the input database.		*
+ *                                                                       *
+ *************************************************************************
+ */
+
+void TimeRefinementIntegrator::getFromInput(
+   tbox::Pointer<tbox::Database> db,
+   bool is_from_restart)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   if (is_from_restart) {
+      if (db->keyExists("end_time")) {
+         d_end_time = db->getDouble("end_time");
+      }
+
+      if (db->keyExists("grow_dt")) {
+         d_grow_dt = db->getDouble("grow_dt");
+      }
+
+      if (db->keyExists("max_integrator_steps")) {
+         d_max_integrator_steps = db->getInteger("max_integrator_steps");
+      }
+
+      if (db->keyExists("tag_buffer")) {
+         tbox::Array<int> temp_tag_buffer = db->getIntegerArray("tag_buffer");
+         if (temp_tag_buffer.getSize() <
+             (d_patch_hierarchy->getMaxNumberOfLevels() - 1)) {
+            int tsize = temp_tag_buffer.getSize();
+            temp_tag_buffer.resizeArray(
+               d_patch_hierarchy->getMaxNumberOfLevels() - 1);
+            for (int i = tsize;
+                 i < temp_tag_buffer.getSize(); i++) {
+               temp_tag_buffer[i] = temp_tag_buffer[tsize - 1];
+            }
+         }
+         d_tag_buffer = temp_tag_buffer;
+      }
+
+   } else {
+
+      /*
+       * If not from restart, read in all data members from input database.
+       */
+
+      if (db->keyExists("start_time")) {
+         d_start_time = db->getDouble("start_time");
+      } else {
+         TBOX_ERROR(
+            d_object_name << ":  "
+            <<
+            "Key data `start_time' not found in input.");
+      }
+
+      if (db->keyExists("end_time")) {
+         d_end_time = db->getDouble("end_time");
+      } else {
+         TBOX_ERROR(d_object_name << ":  "
+                                  << "Key data `end_time' not found in input.");
+      }
+
+      if (db->keyExists("grow_dt")) {
+         d_grow_dt = db->getDouble("grow_dt");
+      } else {
+         TBOX_ERROR(d_object_name << ":  "
+                                  << "Key data `grow_dt' not found in input.");
+      }
+
+      if (db->keyExists("max_integrator_steps")) {
+         d_max_integrator_steps = db->getInteger("max_integrator_steps");
+      } else {
+         TBOX_ERROR(
+            d_object_name << ":  "
+            <<
+            "Key data `max_integrator_steps' not found in input.");
+      }
+
+      if (db->keyExists("tag_buffer")) {
+         d_tag_buffer = db->getIntegerArray("tag_buffer");
+         if (d_tag_buffer.getSize() <
+             (d_patch_hierarchy->getMaxNumberOfLevels() - 1)) {
+            int tsize = d_tag_buffer.getSize();
+            d_tag_buffer.resizeArray(
+               d_patch_hierarchy->getMaxNumberOfLevels() - 1);
+            for (int i = tsize;
+                 i < d_patch_hierarchy->getMaxNumberOfLevels() - 1; i++) {
+               d_tag_buffer[i] = d_tag_buffer[tsize - 1];
+            }
+         }
+      } else {
+         int level_number;
+
+         d_tag_buffer.resizeArray(d_patch_hierarchy->getMaxNumberOfLevels());
+         for (level_number = 0;
+              level_number < d_patch_hierarchy->getMaxNumberOfLevels();
+              level_number++) {
+            d_tag_buffer[level_number] = d_regrid_interval[level_number];
+         }
+
+         TBOX_WARNING(
+            d_object_name << ":  "
+            <<
+            "Key data `tag_buffer' not found in input.  "
+            <<
+            "Default values used.  See class header for details.");
+      }
+
+      d_barrier_and_time =
+         db->getBoolWithDefault("barrier_and_time", d_barrier_and_time);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Gets the database in the restart root database that corresponds to    *
+ * the object name.  This method then checks to make sure that the class *
+ * version number and the restart version number are the same.  If they  *
+ * are, then reads in the objects data members from the restart          *
+ * database.                                                             *
+ *                                                                       *
+ * Data read from restart database: d_start_time, d_end_time, d_grow_dt, *
+ * d_max_integrator_step, d_regrid_interval, d_tag_buffer,               *
+ * d_integrator_step, d_dt_max_level, d_dt_actual_level.                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void TimeRefinementIntegrator::getFromRestart()
+{
+
+   tbox::Pointer<tbox::Database> restart_db =
+      tbox::RestartManager::getManager()->getRootDatabase();
+
+   tbox::Pointer<tbox::Database> db;
+   if (restart_db->isDatabase(d_object_name)) {
+      db = restart_db->getDatabase(d_object_name);
+   } else {
+      TBOX_ERROR("Restart database corresponding to "
+         << d_object_name << " not found in restart file.");
+   }
+
+   int ver = db->getInteger("ALGS_TIME_REFINEMENT_INTEGRATOR_VERSION");
+   if (ver != ALGS_TIME_REFINEMENT_INTEGRATOR_VERSION) {
+      TBOX_ERROR(
+         d_object_name << ":  "
+         <<
+         "Restart file version different than class version.");
+   }
+
+   d_start_time = db->getDouble("d_start_time");
+   d_end_time = db->getDouble("d_end_time");
+   d_grow_dt = db->getDouble("d_grow_dt");
+   d_max_integrator_steps = db->getInteger("d_max_integrator_steps");
+   d_regrid_interval = db->getIntegerArray("d_regrid_interval");
+   d_tag_buffer = db->getIntegerArray("d_tag_buffer");
+   d_integrator_time = db->getDouble("d_integrator_time");
+   d_integrator_step = db->getInteger("d_integrator_step");
+   d_last_finest_level = db->getInteger("d_last_finest_level");
+   d_dt_max_level = db->getDoubleArray("d_dt_max_level");
+   d_dt_actual_level = db->getDoubleArray("d_dt_actual_level");
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void TimeRefinementIntegrator::initializeCallback()
+{
+   t_initialize_hier = tbox::TimerManager::getManager()->
+      getTimer("algs::TimeRefinementIntegrator::initializeHierarchy()");
+   t_advance_hier = tbox::TimerManager::getManager()->
+      getTimer("algs::TimeRefinementIntegrator::advanceHierarchy()");
+   t_advance_level = tbox::TimerManager::getManager()->
+      getTimer("algs::TimeRefinementIntegrator::advance_level");
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void TimeRefinementIntegrator::finalizeCallback()
+{
+   t_initialize_hier.setNull();
+   t_advance_hier.setNull();
+   t_advance_level.setNull();
+}
+
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/TimeRefinementIntegrator.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/TimeRefinementIntegrator.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,173 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Time integration manager for AMR with local time stepping. 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace algs {
+
+SAMRAI_INLINE_KEYWORD
+double TimeRefinementIntegrator::getIntegratorTime() const
+{
+   return d_integrator_time;
+}
+
+SAMRAI_INLINE_KEYWORD
+double TimeRefinementIntegrator::getStartTime() const
+{
+   return d_start_time;
+}
+
+SAMRAI_INLINE_KEYWORD
+double TimeRefinementIntegrator::getEndTime() const
+{
+   return d_end_time;
+}
+
+SAMRAI_INLINE_KEYWORD
+int TimeRefinementIntegrator::getIntegratorStep() const
+{
+   return d_integrator_step;
+}
+
+SAMRAI_INLINE_KEYWORD
+int TimeRefinementIntegrator::getMaxIntegratorSteps() const
+{
+   return d_max_integrator_steps;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool TimeRefinementIntegrator::stepsRemaining(
+   const int level_number) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((level_number >= 0) &&
+      (level_number <= d_patch_hierarchy->getFinestLevelNumber()));
+#endif
+   return d_step_level[level_number] < d_max_steps_level[level_number];
+}
+
+SAMRAI_INLINE_KEYWORD
+bool TimeRefinementIntegrator::stepsRemaining() const
+{
+   return d_integrator_step < d_max_integrator_steps;
+}
+
+SAMRAI_INLINE_KEYWORD
+double TimeRefinementIntegrator::getLevelDtActual(
+   const int level_number) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((level_number >= 0) &&
+      (level_number <= d_patch_hierarchy->getFinestLevelNumber()));
+#endif
+   return d_dt_actual_level[level_number];
+}
+
+SAMRAI_INLINE_KEYWORD
+double TimeRefinementIntegrator::getLevelDtMax(
+   const int level_number) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((level_number >= 0) &&
+      (level_number <= d_patch_hierarchy->getFinestLevelNumber()));
+#endif
+   return d_dt_max_level[level_number];
+}
+
+SAMRAI_INLINE_KEYWORD
+double TimeRefinementIntegrator::getLevelSimTime(
+   const int level_number) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((level_number >= 0) &&
+      (level_number <= d_patch_hierarchy->getFinestLevelNumber()));
+#endif
+   return d_level_sim_time[level_number];
+}
+
+SAMRAI_INLINE_KEYWORD
+int TimeRefinementIntegrator::getLevelStep(
+   const int level_number) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((level_number >= 0) &&
+      (level_number <= d_patch_hierarchy->getFinestLevelNumber()));
+#endif
+   return d_step_level[level_number];
+}
+
+SAMRAI_INLINE_KEYWORD
+int TimeRefinementIntegrator::getLevelMaxSteps(
+   const int level_number) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((level_number >= 0) &&
+      (level_number <= d_patch_hierarchy->getFinestLevelNumber()));
+#endif
+   return d_max_steps_level[level_number];
+}
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Pointer<hier::BasePatchHierarchy>
+TimeRefinementIntegrator::getPatchHierarchy() const
+{
+   return d_patch_hierarchy;
+}
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<TimeRefinementLevelStrategy>
+TimeRefinementIntegrator::getLevelIntegrator() const
+{
+   return d_refine_level_integrator;
+}
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<mesh::BaseGriddingAlgorithm>
+TimeRefinementIntegrator::getGriddingAlgorithm() const
+{
+   return d_gridding_algorithm;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool TimeRefinementIntegrator::firstLevelStep(
+   const int level_number) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((level_number >= 0) &&
+      (level_number <= d_patch_hierarchy->getFinestLevelNumber()));
+#endif
+   return d_step_level[level_number] <= 0;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool TimeRefinementIntegrator::lastLevelStep(
+   const int level_number) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((level_number >= 0) &&
+      (level_number <= d_patch_hierarchy->getFinestLevelNumber()));
+#endif
+   return d_step_level[level_number] >= d_max_steps_level[level_number];
+}
+
+SAMRAI_INLINE_KEYWORD
+void TimeRefinementIntegrator::setRegridInterval(
+   const int regrid_interval)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_use_refined_timestepping);
+#endif
+
+   for (int i = 0; i < d_regrid_interval.getSize(); i++) {
+      d_regrid_interval[i] = regrid_interval;
+   }
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/TimeRefinementIntegrator.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/TimeRefinementIntegrator.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,639 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Time integration manager for AMR with local time stepping. 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_TimeRefinementIntegrator
+#define included_algs_TimeRefinementIntegrator
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/algs/TimeRefinementLevelStrategy.h"
+#include "SAMRAI/mesh/BaseGriddingAlgorithm.h"
+#include "SAMRAI/hier/BasePatchHierarchy.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Serializable.h"
+#include "SAMRAI/tbox/Timer.h"
+
+#include <string>
+#include <iostream>
+
+namespace SAMRAI {
+namespace algs {
+
+/**
+ * Class TimeRefinementIntegrator manages time integration over an
+ * AMR patch hierarchy using local time refinement for finer hierarchy levels.
+ * This class orchestrates hierarchy construction, data advancement and
+ * synchronization, and the dynamic grid refinement processes.  The basic
+ * ideas behind these algorithms are described in several sources on
+ * structured adaptive mesh refinement.  See Berger and Colella, J. Comp.
+ * Phys. (82)1:64-84, 1989 for an introduction to algorithm.  See Trangenstein,
+ * SIAM J. Sci. Comput. 16(4):819-839, 1995, or Hornung, PhD thesis, Dept.
+ * of Mathematics, Duke University, 1994 for further discussion.
+ *
+ * This class can be used in two different modes:  refined timestepping,
+ * which divides they hierarchy's timestep into smaller timesteps on finer
+ * levels, or synchronized timestepping, which advances all levels in a
+ * hierarchy by the same timestep.  The mode that is used is determined
+ * by querying the level integrator that is passed into the constructor.
+ * One and only one mode can be used for each instantiation of
+ * this class.
+ *
+ * The algorithm requires that integration steps on different levels are
+ * interleaved since the time increment used on each level is determined
+ * by the spatial resolution of the mesh on that level (e.g., CFL condition).
+ * Generally, when using refined timestepping, coarser levels use larger time
+ * increments than finer levels.  Thus, data must be synchronized between
+ * levels and the dynamic regridding process must be coordinated with
+ * the time stepping sequence.
+ *
+ * The routines in this class are implemented in a manner that is generic
+ * with respect to the details of the level integration and regridding
+ * methods, and the discrete equations being solved.  Thus, the class may
+ * be employed for a variety of applications.  Upon construction, an object
+ * of this class is configured with routines suitable for a given problem.
+ * The TimeRefinementLevelStrategy data member supplies routines
+ * for advancing levels and synchronizing data on different levels during
+ * time integration.  The mesh::BaseGriddingAlgorithm data member provides
+ * operations that construct and dynamically reconfigure the patch hierarchy.
+ * The collaboration between this class and each of those objects follows
+ * the Strategy design pattern.
+ *
+ * Initialization begins by setting data on the coarsest AMR hierarchy
+ * level.  Then, each successively finer level is created and initialized
+ * after invoking the regridding procedures on the most recently initialized
+ * level.  This process is performed until either a maximum number of levels
+ * is reached or no further refinement is needed.
+ *
+ * Time integration is performed by invoking a recursive advance procedure on
+ * the coarsest AMR hierarchy level.  On a level, data is integrated to
+ * a given point using a sequence of integration steps, where the size of
+ * each time increment depends on the problem being solved.  After each
+ * step on a level, the next finer level (if it exists) is integrated to
+ * the same time using a sequence of time steps appropriate for the level.
+ * This class may dynamically adjust the time step sequence used on each
+ * level during the data advance process depending on requirements of the
+ * integrator and information about stable time step size.  Dynamic
+ * mesh regridding is invoked during the integration process so that
+ * time integration, data synchronization, and mesh movement are coordinated
+ * properly.
+ *
+ * An object of this class requires numerous parameters to be read from
+ * input.  Also, data must be written to and read from files for restart.
+ * The input data are summarized as follows.
+ *
+ * Required input keys and data types:
+ *
+ *    - \b    start_time
+ *        double value representing the start time for the simulation.
+ *
+ *    - \b    end_time
+ *        double value representing the end time for the simulation.
+ *
+ *    - \b    grow_dt
+ *        double value representing the maximum factor by which each
+ *        succesive time increment may grow (typically >= 1.0).
+ *
+ *    - \b    max_integrator_steps
+ *        integer value representing the maximum number of timesteps
+ *        performed on the coarsest hierarchy level during the simulation.
+ *
+ *
+ * Optional input keys, data types, and defaults:
+ *
+ *    - \b    tag_buffer
+ *       array of integer values (one for each level that may be refined)
+ *       representing the number of cells by which tagged cells are buffered
+ *       before clustering into boxes.  If no input is given, a default value
+ *       equal to the number of steps taken on the level before the next
+ *       regrid is used.
+ *
+ *
+ * Note that the input values for end_time, grow_dt, max_integrator_step,
+ * and tag_buffer override values read in from restart.
+ *
+ * A sample input file entry might look like:
+ *
+ * \verbatim
+ *
+ *    start_time            = 0.e0      // initial simulation time
+ *    end_time              = 10.e0     // final simulation time
+ *    grow_dt               = 1.1e0     // growth factor for timesteps
+ *    max_integrator_steps  = 50        // max number of simulation timesteps
+ *    tag_buffer            = 1,1,1,1   // a max of 4 finer levels in hierarchy
+ *
+ * \endverbatim
+ *
+ * When running in synchronized timestepping mode, an additional input
+ * key 'regrid_interval' can be added to specify the number of timesteps
+ * between each regrid of the hierarchy.
+ *
+ * @see algs::TimeRefinementLevelStrategy
+ * @see mesh::BaseGriddingAlgorithm
+ */
+
+class TimeRefinementIntegrator:
+   public virtual tbox::DescribedClass,
+   public tbox::Serializable
+{
+public:
+   /**
+    * The constructor for TimeRefinementIntegrator initializes the
+    * time stepping parameters needed to integrate the levels in the AMR
+    * hierarchy.   Some data is set to default values; others are read
+    * from the specified input database and the restart database
+    * corresponding to the specified object_name.  Consult top of
+    * this header file for further details.  The constructor also
+    * registers this object for restart using the specified object name
+    * when the boolean argument is true.  Whether object will write its state to
+    * restart files during program execution is determined by this argument.
+    * Note that it has a default state of true.
+    *
+    * Note that this object also invokes the variable creation and
+    * registration process in the level strategy.
+    *
+    * If assertion checking is turned on, an unrecoverable assertion will
+    * result if any of the input database, patch hierarchy,
+    * level strategy, or regridding algorithm pointers is null.  Assertions
+    * may also be thrown if any checks for consistency between parameters
+    * in the gridding algorithm, level strategy, and this object fail.
+    */
+   TimeRefinementIntegrator(
+      const std::string& object_name,
+      tbox::Pointer<tbox::Database> input_db,
+      tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      tbox::Pointer<TimeRefinementLevelStrategy> level_integrator,
+      tbox::Pointer<mesh::BaseGriddingAlgorithm> gridding_algorithm,
+      bool register_for_restart = true);
+
+   /**
+    * The destructor for TimeRefinementIntegrator unregisters
+    * the integrator object with the restart manager when so registered.
+    */
+   ~TimeRefinementIntegrator();
+
+   /*!
+    * Set AMR patch hierarchy configuration and data at start of simulation.
+    * If the run is begun from a restart file, the hierarchy and data
+    * are read from the hierarchy database.  Otherwise, the hierarchy
+    * and data are initialized by the gridding algorithm data member.
+    * In this case, the coarsest level is constructed and initialized.
+    * Then, error estimation is performed to determine if and where it
+    * should be refined.  Successively finer levels are created and
+    * initialized until the maximum allowable number of levels is achieved
+    * or no further refinement is needed.  The double return value is the
+    * time increment for the first data advance step on the coarsest
+    * hierarchy level (i.e., level 0).
+    *
+    * This function assumes that the hierarchy exists, but that it contains
+    * no patch levels, when it is called.  On return from this function, the
+    * initial hierarchy configuration and simulation data is set properly for
+    * the advanceHierarchy() function to be called.  In particular, on each
+    * level constructed only the data needed for initialization exists.
+    *
+    * When assertion checking is active, the hierachy database pointer
+    * must be non-null.
+    *
+    * The optional argument is only to be used for a special case
+    * where the user wishes to manually specify a decomposition for
+    * the coarsest level of the hierarchy.  The MappedBoxLevel
+    * argument must be a decomposition of the the coarsest level, and
+    * must exactly fill the index space of the physical domain of the
+    * hierarchy.  If omitted or given an uninitialized
+    * mapped_box_level, the standard decomposition method is used.
+    *
+    * @param override_mapped_box_level mapped_box_level representing a decomposition of level
+    *                       zero of the hierarchy.  If non is required use the overloaded
+    *                       intializeHierarchy that does not require this argument.
+    */
+   double
+   initializeHierarchy(
+      const hier::MappedBoxLevel& override_mapped_box_level);
+
+   /**
+    * Set AMR patch hierarchy configuration and data at start of
+    * simulation.  See previous method for more information.  This
+    * initialize does not require a level zero decomposition.
+    */
+   double
+   initializeHierarchy();
+
+   /**
+    * Advance each level in the hierarchy through the given time increment
+    * and return an appropriate time increment for subsequent advances of the
+    * coarsest hierarchy level (level 0).  The boolean argument indicates
+    * whether the coarsest hierarchy level (i.e., level 0) should be load
+    * balanced before the levels are advanced.  In general, the problem
+    * domain (determined by the union of patches on level 0) does not change
+    * once set.  However, the boolean flag here allows one to reconfigure
+    * the patches on the coarsest level which constitute this union.  This
+    * may be required depending on a dynamic change of the work load.
+    * By default, the level will not be subject to load balancing.
+    *
+    * This function assumes that all data on each level in the hierarchy
+    * has been set and that only the data need for initialization exists
+    * on each level (as opposed to both current and new data, for example).
+    * Upon return from this function, the simulation data on each hierarchy
+    * levels is advanced through the time increment dt.  In addition, data on
+    * all hierarchy levels has been synchronized so that it is consistent at
+    * the new simulation time (where this synchronization process is defined
+    * by the level strategy).  Thus, the data is set properly for any
+    * subsequent calls to this function.
+    */
+   double
+   advanceHierarchy(
+      const double dt,
+      const bool rebalance_coarsest = false);
+
+   /**
+    * Return true if the current step count for the level indicates
+    * that regridding should occur.  In particular, true is returned
+    * if both the level allows refinement and the step count is an
+    * integer multiple of the regrid step interval.
+    * Otherwise, false is returned.
+    */
+   bool
+   atRegridPoint(
+      const int level_number) const;
+
+   /**
+    * Return current integration time for coarsest hierarchy level.
+    */
+   double
+   getIntegratorTime() const;
+
+   /**
+    * Return initial integration time.
+    */
+   double
+   getStartTime() const;
+
+   /**
+    * Return final integration time.
+    */
+   double
+   getEndTime() const;
+
+   /**
+    * Return integration step count for entire hierarchy
+    * (i.e., number of steps taken by the coarsest level).
+    */
+   int
+   getIntegratorStep() const;
+
+   /**
+    * Return maximum number of integration steps allowed for entire
+    * hierarchy (i.e., steps allowed on coarsest level).
+    */
+   int
+   getMaxIntegratorSteps() const;
+
+   /**
+    * Return true if any steps remain in current step sequence on level
+    * (i.e., before it will synchronize with some coarser level).
+    * Return false otherwise.
+    */
+   bool
+   stepsRemaining(
+      const int level_number) const;
+
+   /**
+    * Return true if any integration steps remain, false otherwise.
+    */
+   bool
+   stepsRemaining() const;
+
+   /**
+    * Return current time increment used to advance level.
+    */
+   double
+   getLevelDtActual(
+      const int level_number) const;
+
+   /**
+    * Return maximum time increment currently allowed on level.
+    */
+   double
+   getLevelDtMax(
+      const int level_number) const;
+
+   /**
+    * Return current simulation time for level.
+    */
+   double
+   getLevelSimTime(
+      const int level_number) const;
+
+   /**
+    * Return step count for current integration sequence on level.
+    */
+   int
+   getLevelStep(
+      const int level_number) const;
+
+   /**
+    * Return maximum number of time steps allowed on level in
+    * current integration step sequence.
+    */
+   int
+   getLevelMaxSteps(
+      const int level_number) const;
+
+   /**
+    * Return const pointer to patch hierarchy managed by integrator.
+    */
+   const tbox::Pointer<hier::BasePatchHierarchy>
+   getPatchHierarchy() const;
+
+   /**
+    * Return pointer to level integrator.
+    */
+   tbox::Pointer<TimeRefinementLevelStrategy>
+   getLevelIntegrator() const;
+
+   /**
+    * Return pointer to gridding algorithm object.
+    */
+   tbox::Pointer<mesh::BaseGriddingAlgorithm>
+   getGriddingAlgorithm() const;
+
+   /**
+    * Return true if current step on level is first in current step
+    * sequence; otherwise return false.
+    */
+   bool
+   firstLevelStep(
+      const int level_number) const;
+
+   /**
+    * Return true if current step on level is last in current step
+    * sequence; otherwise return false.
+    */
+   bool
+   lastLevelStep(
+      const int level_number) const;
+
+   /**
+    * set the regrid interval to a new value.  This may only be used
+    * when using synchronized timestepping.
+    */
+   void
+   setRegridInterval(
+      const int regrid_interval);
+
+   /**
+    * Print data representation of this object to given output stream.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os) const;
+
+   /**
+    * Print time stepping data for a single level to given output stream.
+    */
+   void
+   printDataForLevel(
+      std::ostream& os,
+      const int level_number) const;
+
+   /**
+    * Write object state out to the given database.
+    *
+    * When assertion checking is active, the database pointer must be non-null.
+    */
+   void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> db);
+
+
+private:
+   /*
+    * Initialize data on given level.  If the level can be refined, a problem-
+    * dependent error estimation procedure is invoked to determine whether
+    * further refinement is needed.  If a new level is created, this function
+    * is called recursively to initialize the next finest level.
+    */
+   void
+   initializeRefinedTimesteppingLevelData(
+      const int level_number);
+   void
+   initializeSynchronizedTimesteppingLevelData(
+      const int level_number);
+
+   /*
+    * Advance the data on the level to the specified time using a dynamically
+    * adjusted sequence of time increments.  If any finer levels exist
+    * in the hierarchy when this function is called or are generated during
+    * the regridding process, they will be advanced to the specified time
+    * as well.  This function is recursive.  After a single timestep is
+    * performed on each level, all finer levels are advanced to the new
+    * integration time before another timestep is taken on the original level.
+    */
+   void
+   advanceRecursivelyForRefinedTimestepping(
+      const int level_number,
+      const double end_time);
+
+   double
+   advanceForSynchronizedTimestepping(
+      const double dt);
+
+   /*
+    * Determine the next stable time increment (dt) and adjust the step
+    * sequence if necessary for the given level.  The computed dt will
+    * be less than or equal to the specified bound and the time remaining.
+    * In adjusting the step sequence, an attempt is made to partition the
+    * remaining time interval into a sequence of equal time increments.
+    * However, the total number of time steps in the sequence for the
+    * level must satisfy any constraints placed on it by the regridding
+    * procedure.
+    */
+   bool
+   findNextDtAndStepsRemaining(
+      const int level_number,
+      const double time_remaining,
+      const double dt_bound);
+
+   /*
+    * Return true if the this level can be regridded at the current step
+    * and the next coarser level can be regridded too.  Otherwise,
+    * false is returned.
+    */
+   bool
+   coarserLevelRegridsToo(
+      const int level_number) const;
+
+   /*
+    * Read input data from specified database and initialize class members.
+    * The argument is_from_restart should be set to true if the simulation
+    * is from restart.  Otherwise, it should be set to false.
+    *
+    * If the simulation is not from restart, read in start_time, end_time,
+    * grow_dt, max_integrator_step, and possibly tag_buffer
+    * from the database.
+    *
+    * If the simulation is from restart, then only read in end_time,
+    * grow_dt, max_integrator_step and tag_buffer if they are
+    * found in the input database.
+    *
+    * When assertion checking is active, the databse pointer must be non-null.
+    */
+   virtual void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db,
+      bool is_from_restart);
+
+   /*
+    * Read object state from the restart file and initialize class data
+    * members.  The database from which the restart data is read is
+    * determined by the object_name specified in the constructor.
+    *
+    * Unrecoverable Errors:
+    *
+    *    -The database corresponding to object_name is not found
+    *     in the restart file.
+    *
+    *    -The class version number and restart version number do not
+    *     match.
+    *
+    */
+   virtual void
+   getFromRestart();
+
+   /*
+    * The object name is used as a handle to databases stored in
+    * restart files and for error reporting purposes.  The boolean
+    * is used to control restart file writing operations.
+    */
+   std::string d_object_name;
+   bool d_registered_for_restart;
+
+   /*
+    * Pointers to the patch hierarchy, level integration and gridding
+    * algorithm objects associated with this time integration object.
+    * The level integrator defines operations for advancing data on
+    * individual levels in the AMR patch hierarchy.  The gridding algorithm
+    * provides grid generation and regridding routines for the AMR hierarchy.
+    */
+   tbox::Pointer<hier::BasePatchHierarchy> d_patch_hierarchy;
+   tbox::Pointer<TimeRefinementLevelStrategy> d_refine_level_integrator;
+   tbox::Pointer<mesh::BaseGriddingAlgorithm> d_gridding_algorithm;
+
+   /*
+    */
+   bool d_use_refined_timestepping;
+
+   /*
+    * Integrator data read from input or set at initialization.
+    */
+   double d_start_time;
+   double d_end_time;
+   double d_grow_dt;
+   int d_max_integrator_steps;
+
+   /*
+    * The regrid interval indicates the number of integration steps taken
+    * on a level between successive invocations of the regridding process
+    * on that level.  In general, this class enforces the constraint that
+    * each synchronization time between two successive hierarchy levels
+    * will always be a potential regrid point for the coarser of the two
+    * levels.  Specifically, it sets the regrid interval for each level
+    * to be the greatest common divisor between the entries in the grid
+    * refinement ratio vector between the level and the next coarsest level
+    * in the hierarchy.  The regrid interval for level 0 is set equal to
+    * that for level 1.  In the future, users may be able to specify
+    * this value in the input file.
+    */
+   tbox::Array<int> d_regrid_interval;
+
+   /*
+    * The tag buffer indicates the number of cells on each level by which
+    * tagged cells will be buffered after they have selected for refinement.
+    * These values are passed into the gridding algorithm routines during
+    * hierarchy construction and regridding.  The tag buffer helps to
+    * guarantee that refined cells near important features in the solution
+    * will remain refined until the level is regridded next.
+    *
+    * Important note: these values may be specified in the input file.
+    * If not, default values are set based on the regrid intervals.
+    * However, if the user attempts to specify these values, care must
+    * be taken to assure that improper tag buffering will not degrade the
+    * calculation.
+    */
+   tbox::Array<int> d_tag_buffer;
+
+   /*
+    * Integrator data that evolves during time integration and maintains
+    * the state of the timestep sequence over the levels in the AMR hierarchy.
+    */
+   double d_integrator_time;
+   int d_integrator_step;
+   bool d_just_regridded;
+   int d_last_finest_level;
+   tbox::Array<double> d_level_old_old_time;
+   tbox::Array<double> d_level_old_time;
+   tbox::Array<double> d_level_sim_time;
+   tbox::Array<double> d_dt_max_level;
+   tbox::Array<double> d_dt_actual_level;
+   tbox::Array<int> d_step_level;
+   tbox::Array<int> d_max_steps_level;
+
+   double d_dt;
+
+   bool d_barrier_and_time;
+
+   /*
+    * tbox::Timer objects for performance measurement.
+    */
+   static tbox::Pointer<tbox::Timer> t_initialize_hier;
+   static tbox::Pointer<tbox::Timer> t_advance_hier;
+   static tbox::Pointer<tbox::Timer> t_advance_level;
+
+   // The following are not implemented:
+   TimeRefinementIntegrator(
+      const TimeRefinementIntegrator&);
+   void
+   operator = (
+      const TimeRefinementIntegrator&);
+
+
+   /*!
+    * @brief Initialize static objects and register shutdown routine.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   initializeCallback();
+
+   /*!
+    * @brief Method registered with ShutdownRegister to cleanup statics.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   finalizeCallback();
+
+   /* 
+    * Static initialization and cleanup handler.
+    */
+
+   static tbox::StartupShutdownManager::Handler
+   s_initialize_handler;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/algs/TimeRefinementIntegrator.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/TimeRefinementLevelStrategy.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/TimeRefinementLevelStrategy.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,37 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to level routines for time-refinement integrator. 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_TimeRefinementLevelStrategy_C
+#define included_algs_TimeRefinementLevelStrategy_C
+
+#include "SAMRAI/algs/TimeRefinementLevelStrategy.h"
+
+namespace SAMRAI {
+namespace algs {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor and destructor for TimeRefinementLevelStrategy.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+TimeRefinementLevelStrategy::TimeRefinementLevelStrategy()
+{
+}
+
+TimeRefinementLevelStrategy::~TimeRefinementLevelStrategy()
+{
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/TimeRefinementLevelStrategy.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/TimeRefinementLevelStrategy.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,324 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to level routines for time-refinement integrator. 
+ *
+ ************************************************************************/
+
+#ifndef included_algs_TimeRefinementLevelStrategy
+#define included_algs_TimeRefinementLevelStrategy
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/BasePatchHierarchy.h"
+#include "SAMRAI/hier/BasePatchLevel.h"
+#include "SAMRAI/mesh/BaseGriddingAlgorithm.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace algs {
+
+/**
+ * Class TimeRefinementLevelStrategy is an abstract base class that
+ * defines the interface to level integration and synchronization routines
+ * needed by the hierarchy integration class TimeRefinementIntegrator.
+ * In particular, this class insulates the hierarchy integrator from the
+ * routines that manipulate data on the hierarchy levels in a problem-specific
+ * fashion.  When the AMR hierarchy integration and regridding sequence
+ * provided by the class TimeRefinementIntegrator are appropriate
+ * for some computational problem, a subclass of this base class can be
+ * used to provide the necessary operations to the hierarchy integrator.
+ * That is, a TimeRefinementIntegrator object may be configured with
+ * a concrete implementation of this base class by passing the concrete
+ * object into the to the time refinement integrator constructor.
+ *
+ * Three functions in this class are defined as virtual rather than
+ * pure virtual, and default implementations are provided.  This is
+ * done to allow for an implementation of this strategy class that is used
+ * by the time refinement integrator only for refined timestepping or only
+ * for synchronized timestepping.  If an implementation is only used for
+ * refined timestepping, getMaxLevelDt() and one version of
+ * standardLevelSynchronization() must be overloaded in the concrete class.
+ * If an implementation is only used for synchronized timestepping,
+ * the other version of standardLevelSynchronization must be overloaded.
+ * If an implementation supports both refined and synchronized timestepping,
+ * all three virtual functions must be overloaded.
+ *
+ * @see algs::TimeRefinementIntegrator
+ */
+
+class TimeRefinementLevelStrategy:
+   public virtual tbox::DescribedClass
+{
+public:
+   /**
+    * Default constructor for TimeRefinementLevelStrategy.
+    */
+   TimeRefinementLevelStrategy();
+
+   /**
+    * Virtual destructor for TimeRefinementLevelStrategy.
+    */
+   virtual ~TimeRefinementLevelStrategy();
+
+   /**
+    * Initialize the state of the integrator that performs time
+    * advances on the levels of the hierarchy.  Typically, this
+    * involves setting up information, such as communication algorithms,
+    * to manage variable storage. The pointer to the gridding algorithm
+    * is provided so that the integrator may access information about
+    * regridding procedures or the structure the hierarchy, which is not
+    * yet created.
+    */
+   virtual void
+   initializeLevelIntegrator(
+      tbox::Pointer<mesh::BaseGriddingAlgorithm> gridding_alg) = 0;
+
+   /**
+    * Return appropriate time increment for given level in the patch
+    * hierarchy.  This routine is called during the initial
+    * generation of the AMR patch hierarchy and possibly during regridding
+    * if time regridding uses a time advance.  It should be assumed that
+    * the only data that exists on the level when this routine is called
+    * is that which is needed to initialize the level.  The initial_time
+    * boolean flag is true if this routine is called at the initial
+    * simulation time (i.e., when hierarchy is generated for first time);
+    * otherwise (e.g., at an advance step) it is false.
+    *
+    * The recompute_dt option specifies whether to compute
+    * the timestep using the current level data or to return the value
+    * stored by the time integrator. The default true setting means
+    * the timestep will be computed if no value is supplied.
+    */
+   virtual double
+   getLevelDt(
+      const tbox::Pointer<hier::BasePatchLevel> level,
+      const double dt_time,
+      const bool initial_time) = 0;
+
+   /**
+    * Return the maximum allowable time increment for level in the hierarchy
+    * with the given level number.  The point of this routine is to determine
+    * the increment for that level based on the current time increment used
+    * on the next coarser level.  The coarse dt is the current time step
+    * size for the next coarser level.  The ratio is the mesh refinement
+    * ratio between the two levels.
+    *
+    * This is defined as a virtual function, and it is only used by the
+    * time refinement integrator for refined timestepping.  It should be
+    * overloaded in any concrete implementation of this class that is
+    * used for refined timestepping, but need not be overloaded in
+    * an implementation that is used only for synchronized timestepping.
+    */
+   virtual double
+   getMaxFinerLevelDt(
+      const int finer_level_number,
+      const double coarse_dt,
+      const hier::IntVector& ratio) {
+
+      NULL_USE(finer_level_number);
+      NULL_USE(coarse_dt);
+      NULL_USE(ratio);
+
+      return 0.0;
+   }
+
+   /**
+    * Advance data on all patches on specified patch level from current time
+    * (current_time) to new time (new_time).   The boolean value first_step
+    * indicates whether the advance step is the first in a time sequence
+    * on the level.  The boolean value last_step indicates whether the
+    * advance step is the last in a time sequence on the level.   Usually,
+    * the timestep sequence refers to the steps taken to advance the solution
+    * through the time interval of the most recent advance on the next coarser
+    * level, if such a level exists.  The boolean regrid_advance is false
+    * when the advance is part of the actual hierarchy integration process
+    * and true when the advance is called during time-dependent regridding
+    * (e.g., when using Richardson extrapolation).  The default value is false.
+    * The last boolean argument is true when the level is in the hierarchy,
+    * and false otherwise.  The default value is true.  Usually, this value
+    * is false only during time-dependent regridding operations performed
+    * on some temporary level; thus, a schedule must be generated for the
+    * level before the advance can occur, for example.
+    *
+    * When this function is called, the level data required to begin the
+    * advance must be allocated and be defined appropriately.  Typically,
+    * this is equivalent to what is needed to initialize a new level after
+    * regridding.  Upon exiting this routine, both current and new data may
+    * exist on the level.  This data is needed until level synchronization
+    * occurs, in general. Current and new data may be reset by calling
+    * the member function resetTimeDependentData().
+    *
+    * This routine is called from two different points within the
+    * TimeRefinementIntegrator class: during the regular time
+    * advance sequence, and at the initial simulation time.  The second
+    * call is made to advance the solution on a coarser level ahead in time to
+    * provide time-dependent boundary values for some finer level when
+    * time-dependent regridding is used.  In the first case, the values of
+    * the boolean flags are:
+    *
+    *
+    *
+    *    - \b  first_step
+    *        = true for first step in level time step sequence; else, false.
+    *    - \b  last_step
+    *        = true for last step in level time step sequence; else, false.
+    *    - \b  regrid_advance
+    *        = false.
+    *
+    *
+    *
+    * In the second case, the values of the boolean flags are:
+    *
+    *
+    *
+    *    - \b  first_step
+    *        = true.
+    *    - \b  last_step
+    *        = false.
+    *    - \b  regrid_advance
+    *        = true.
+    *
+    *
+    *
+    */
+   virtual double
+   advanceLevel(
+      const tbox::Pointer<hier::BasePatchLevel> level,
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const double current_time,
+      const double new_time,
+      const bool first_step,
+      const bool last_step,
+      const bool regrid_advance = false) = 0;
+
+   /**
+    * Synchronize data on specified patch levels in AMR hierarchy at the
+    * given synchronization time.  The array of time values provides the
+    * previous integration time for each level involved in the synchronization.
+    * In other words, (sync_time - old_times[ln]) is the most recent time
+    * increment used to advance data on level ln.  These times are used when
+    * the synchronization process requires re-integration of the data.  Note
+    * that other synchronization routines are defined below for other points
+    * in the hierarchy integration sequence.
+    *
+    * When this routine is called, both current and new data may exist on each
+    * level involved in the synchronization.  The new data on each level
+    * corresponds to the synchronization time.   Each entry in the array
+    * of time values specifies the time to which the current data on each
+    * level corresponds.  It is assumed that this routine will reset the
+    * synchronized data on each level so that only the current data will
+    * exist on each level when done.
+    *
+    * Note that this routine is distinct from the synchronizeNewLevels()
+    * function below.  This routine is used to synchronize levels during
+    * the time integration process.  The other routine is used to synchronize
+    * new levels in the hierarchy, either at initialization time or after
+    * regridding.
+    *
+    * This function must be overloaded in a concrete implementation
+    * that is used by the time refinement integrator for refined
+    * timestepping
+    */
+   virtual void
+   standardLevelSynchronization(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level,
+      const double sync_time,
+      const tbox::Array<double>& old_times) {
+
+      NULL_USE(hierarchy);
+      NULL_USE(coarsest_level);
+      NULL_USE(finest_level);
+      NULL_USE(sync_time);
+      NULL_USE(old_times);
+   }
+
+   /**
+    * This version of standardLevelSynchronization must be overloaded
+    * for implementations that support synchronized timestepping.
+    * The interface is the same as the other version of this function,
+    * except for the old_time argument.  In synchronized timestepping
+    * all levels advance the same timestep, so only a single old time
+    * is required, rather than an array.
+    */
+   virtual void
+   standardLevelSynchronization(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level,
+      const double sync_time,
+      const double old_time) {
+
+      NULL_USE(hierarchy);
+      NULL_USE(coarsest_level);
+      NULL_USE(finest_level);
+      NULL_USE(sync_time);
+      NULL_USE(old_time);
+   }
+
+   /**
+    * Synchronize specified levels after regridding has occurred or during
+    * initial construction of the AMR patch hierarchy.  Note that this
+    * synchronization may be different than the standard time-dependent
+    * synchronization (above in standardLevelSynchronization()) depending
+    * on the level integration algorithm.
+    *
+    * Before this routine is called, all time-dependent data on all levels
+    * involved in the synchronization has been reset.  Thus, this routine
+    * must only synchronize the current data on each level.  On return from
+    * this function, only the current data on each level must be present.
+    */
+   virtual void
+   synchronizeNewLevels(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level,
+      const double sync_time,
+      const bool initial_time) = 0;
+
+   /**
+    * Reset time-dependent data storage for the specified patch level.  This
+    * routine is called when the current level data is no longer needed
+    * and it is appropriate to replace the current data with the new data
+    * on the level, if such data exists.
+    */
+   virtual void
+   resetTimeDependentData(
+      const tbox::Pointer<hier::BasePatchLevel> level,
+      const double new_time,
+      const bool can_be_refined) = 0;
+
+   /**
+    * Reset data on the patch level to state before time advance.
+    * This is needed whenever the solution on a level is advanced beyond
+    * the new time on a level.  For example, during time-dependent regridding
+    * (Richardson extrapolation) or initialization, it is necessary to
+    * do such an advance.  This routine is called to discard the new solution
+    * data so that subsequent calls to advance are provided proper data at the
+    * correct time.
+    */
+   virtual void
+   resetDataToPreadvanceState(
+      const tbox::Pointer<hier::BasePatchLevel> level) = 0;
+
+   /**
+    * Return true if the implementation of this class is constructed
+    * to use refined timestepping, and false otherwise.
+    */
+   virtual bool
+   usingRefinedTimestepping() const = 0;
+
+private:
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/dox/manual.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/dox/manual.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,29 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace algs {
+
+/*!
+  @page package_algorithm The Algorithm Package
+ 
+  The Algorithm package contains classes that are useful for composing 
+  structured AMR solution algorithms at a high-level.  Algorithm support
+  is divided into these categories:
+  -# @ref package_algorithm_time_refinement "time integration over AMR patch hierarchy using local time refinement"
+  -# @ref package_algorithm_method_of_lines "time integration over AMR patch hierarchy using method of lines"
+  -# @ref package_algorithm_hyperbolic "explicit hydrodynamics over levels in AMR patch hierarchy (i.e., hyperbolic conservation laws)"
+  -# @ref package_algorithm_implicit "implicit time-integration over AMR patch hierarchy"
+  -# @ref package_algorithm_femutils "utilities useful for finite element computations on an AMR patch hierarchy"
+ 
+  All class names in the Algorithm package are in the namespace SAMRAI::algs.
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/dox/manual_femutils.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/dox/manual_femutils.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,29 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace algs {
+
+/*!
+  @page package_algorithm_femutils Rudimentary Support for Finite Element Operations on SAMR Meshes
+ 
+  The Algorithm package contains some basic functionality for summing node and edge data quantities 
+  at shared points between neighboring patches.  Such operations are commonly found in finite element
+  computations.  For example, when applying finite element integration that take contributions from 
+  each element to a node or edge, one can divide the problem into patches, do operations on each
+  patch, and then accumulate the neighboring patch contributions by employing a patch boundary node 
+  or edge sum. These classes are partitioned into two categories:
+
+  -# @ref package_algorithm_femutils_standard "operations applicable when all simulation data live on all patches on the patch levels involved"
+  -# @ref package_algorithm_femutils_locallyactive "operations applicable when simulation data live on subsets of patches on the patch levels involved, so-called 'locally-active' data"
+
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/dox/manual_femutils_standard.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/dox/manual_femutils_standard.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,29 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace algs {
+
+/*!
+  @page package_algorithm_femutils_standard Standard Data Summation Operations
+
+  These classes provide basic operations for summing data across patches at 
+  shared grid points. They apply when simulation data is defined on all patches
+  of the patch levels involved.
+  
+  - SAMRAI::algs::PatchBoundaryNodeSum
+  - SAMRAI::algs::PatchBoundaryEdgeSum
+  - SAMRAI::algs::OuternodeSumTransaction
+  - SAMRAI::algs::OuteredgeSumTransaction
+  - SAMRAI::algs::OuternodeSumTransactionFactory
+  - SAMRAI::algs::OuteredgeSumTransactionFactory
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/dox/manual_hyperbolic.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/dox/manual_hyperbolic.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,32 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace algs {
+
+/*!
+  @page package_algorithm_hyperbolic Hyperbolic Conservation Law Integration
+
+  These classes provide algorithmic components that apply to a system of 
+  hyperbolic conservation laws that is integrated using explicit 
+  time-stepping.  In particular, these classes provide specific operations 
+  invoked from within the time-dependent hierarchy integration and 
+  adaptive gridding classes which are also part of the Algorithm package.
+  The hyperbolic integrator class is coupled to the hierarchy time 
+  integration and adaptive gridding routines via the Strategy design pattern.  
+  An abstract base class that defines the interface to application-specific 
+  numerical routines for single patches is also provided here.  The 
+  hyperbolic integrator and the application routines are also coupled 
+  using the Strategy pattern.
+  - SAMRAI::algs::HyperbolicLevelIntegrator
+  - SAMRAI::algs::HyperbolicPatchStrategy
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/dox/manual_implicit.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/dox/manual_implicit.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace algs {
+
+/*!
+  @page package_algorithm_implicit Implicit time-marching algorithms
+
+  The implicit time-marching algorithm is implemented in the
+  implicit integrator class.
+  Operations specific to a specific problem are delegated
+  to the implicit equation strategy implementation provided by the user.
+  - SAMRAI::algs::ImplicitIntegrator
+  - SAMRAI::algs::ImplicitEquationStrategy
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/dox/manual_method_of_lines.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/dox/manual_method_of_lines.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,43 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace algs {
+
+/*!
+  @page package_algorithm_method_of_lines Time Integration with Method of Lines
+
+  This algorithm supports time-integration of a system of ODEs defined on
+  a hierarchy using a Strong Stability Preserving Runge-Kutta scheme.  
+  Unlike the time-refinement algorithm, this method does not
+  perform different time-stepping at each level. Rather, it integrates
+  all patches in the AMR hierarchy through the same time increment.
+
+  The routine that integrates the quantities on all patches by a specified
+  timestep is @b advanceHierarchy.  It implements Runge-Kutta
+  integration with information passed between hierarchy levels at each
+  Runge-Kutta step.  The user can choose the order of time-accuracy of 
+  the Runge-Kutta integrator and can supply the necessary array of increments
+  for each sub-step.  The timestep is determined through a 
+  Courant-Friedrichs-Lewy (CFL) condition.  The patch with the minimum 
+  timestep based on this condition defines the timestep used for integration 
+  of the entire hierarchy. 
+
+  The method is implemented using the Strategy object-oriented design pattern 
+  in which the integrator provides the algorithm and the strategy provides a 
+  set of virtual functions that plug into the integrator class.  The user can 
+  interact with the class by explicitly defining the virtual functions 
+  contained in the strategy.  See the Convection Diffusion example for 
+  a demonstration on use of these classes.
+  - SAMRAI::algs::MethodOfLinesIntegrator
+  - SAMRAI::algs::MethodOfLinesPatchStrategy
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/dox/manual_time_refinement.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/dox/manual_time_refinement.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,50 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace algs {
+
+/*!
+  @page package_algorithm_time_refinement Time Integration with Local Time Refinement
+
+  These classes provide algorithm support for problems that utilize local
+  time-refinement during time integration on an AMR hierarchy.  The 
+  integration algorithm uses smaller time increments to advance the
+  data on finer AMR patch hierarchy levels than those timesteps used
+  on coarser levels.  In doing so, the time stepping sequences on different
+  levels are interleaved.  The time-refinement integration class orchestrates 
+  hierarchy construction, data advancement and synchronization, and dynamic 
+  grid refinement processes for such problems.  
+
+  The basic AMR algorithm is attributed to Berger, Oliger, and Colella 
+  (see e.g., J. Comp. Phys. (82)1:64-84, 1989) and was motivated by the 
+  application of explicit time-integration methods to shock hydrodynamics 
+  problems on a structured AMR hierarchy.  The algorithm requires that 
+  integration steps on different levels are interleaved since the time 
+  increment used on each level is determined by the spatial resolution 
+  of the mesh on that level (e.g., CFL condition).  Generally, coarser 
+  levels use larger time increments than finer levels.  Thus, data must 
+  be synchronized between levels and the dynamic regridding process must 
+  be coordinated with the time stepping sequence.
+
+  We have made some enhancements to the original algorithm to make it more
+  general and we have implemented it in such a way that it may be applied to 
+  a broader class of problems.  The time refinement integration class is 
+  coupled to procedures for integrating the data and regridding hierarchy 
+  levels that may be application-specific using the Strategy object-oriented 
+  design pattern.  Regridding routines are provided by the gridding algorithm 
+  class provided elsewhere in the <EM>algorithms</EM> package.  An interface to 
+  specific solution methods for manipulating patch data is provided in the 
+  time refinement level strategy class.
+  - SAMRAI::algs::TimeRefinementIntegrator
+  - SAMRAI::algs::TimeRefinementLevelStrategy
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/fortran/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/fortran/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,71 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=algs_nodeouternodeops2d.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	algs_nodeouternodeops2d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=algs_nodeouternodeops3d.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	algs_nodeouternodeops3d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=algs_upfluxsum1d.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h algs_upfluxsum1d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=algs_upfluxsum2d.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h algs_upfluxsum2d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
+FILE_4=algs_upfluxsum3d.o
+DEPENDS_4:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h algs_upfluxsum3d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_4 +=\
+	
+endif
+
+${FILE_4:X.o=${NDIM}.o}: ${DEPENDS_4}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/fortran/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/fortran/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,29 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for fortran files for algs directory 
+##
+#########################################################################
+
+SAMRAI	      =	@top_srcdir@
+SRCDIR	      =	@srcdir@
+SUBDIR        = source/SAMRAI/algs/fortran
+VPATH	      =	@srcdir@
+OBJECT        = ../../../..
+
+OBJS= 	 algs_upfluxsum1d.o algs_upfluxsum2d.o algs_upfluxsum3d.o\
+	algs_nodeouternodeops2d.o algs_nodeouternodeops3d.o\
+
+default: library
+
+include $(OBJECT)/config/Makefile.config
+
+library: $(OBJS)
+
+clean:
+	$(SAMCLEAN)
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/fortran/algs_nodeouternodeops2d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/fortran/algs_nodeouternodeops2d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,231 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/algs/fortran/algs_nodeouternodeops2d.m4 $
+c  Package:     SAMRAI algs
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    
+c  Modified:    
+c  Description:    F77 routines for summing outernode data with
+c                  other node or outernode data
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim2d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 2d arrays in FORTRAN routines.
+c
+
+
+
+c
+c***********************************************************************
+c Sum node data on fine patch with outernode data on coarse patch
+c and store back in node data on fine patch.
+c i.e. fine_node_data += coarse_outernode_data
+c***********************************************************************
+c
+      subroutine nodeouternodesum2d(
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,
+     &  depth,
+     &  ngc0,ngc1,
+     &  fnode,
+     &  couternodelower0,couternodeupper0,
+     &  couternodelower1,couternodeupper1)
+c***********************************************************************
+      implicit none
+
+      integer
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1
+      integer ratio(0:2-1), depth
+      integer ngc0,ngc1
+      double precision
+     &  fnode(filo0-ngc0:fihi0+1+ngc0,
+     &          filo1-ngc1:fihi1+1+ngc1,depth),
+     &  couternodelower0(cilo1+1:cihi1,depth),
+     &  couternodeupper0(cilo1+1:cihi1,depth),
+     &  couternodelower1(cilo0:cihi0+1,depth),
+     &  couternodeupper1(cilo0:cihi0+1,depth)
+      integer ic0,if0,ic1,if1,id
+      integer cilo0_loop,cilo1_loop,cihi0_loop,cihi1_loop
+c
+c***********************************************************************
+c
+
+c sum along XLOWER side
+      cilo1_loop=cilo1+1
+      cihi1_loop=cihi1
+
+      if0=cilo0*ratio(0)
+      do id = 1, depth
+         do ic1=cilo1_loop,cihi1_loop
+            if1=ic1*ratio(1)
+            fnode(if0,if1,id) = fnode(if0,if1,id) + 
+     &                          couternodelower0(ic1,id)
+         enddo
+      enddo
+
+c sum along XUPPER side
+      cilo1_loop=cilo1+1
+      cihi1_loop=cihi1
+
+      if0=(cihi0+1)*ratio(0)
+      do id = 1, depth
+         do ic1=cilo1_loop,cihi1_loop
+            if1=ic1*ratio(1)
+            fnode(if0,if1,id) = fnode(if0,if1,id) + 
+     &                          couternodeupper0(ic1,id)
+         enddo
+      enddo
+
+c sum along YLOWER side
+      cilo0_loop=cilo0
+      cihi0_loop=cihi0+1
+
+      if1=cilo1*ratio(1)
+      do id = 1, depth
+         do ic0=cilo0_loop,cihi0_loop
+            if0=ic0*ratio(0)
+            fnode(if0,if1,id) = fnode(if0,if1,id) + 
+     &                          couternodelower1(ic0,id)
+         enddo
+      enddo
+
+c sum along YUPPER side
+      cilo0_loop=cilo0
+      cihi0_loop=cihi0+1
+
+      if1=(cihi1+1)*ratio(1)
+      do id = 1, depth
+         do ic0=cilo0_loop,cihi0_loop
+            if0=ic0*ratio(0)
+            fnode(if0,if1,id) = fnode(if0,if1,id) + 
+     &                          couternodeupper1(ic0,id)
+         enddo
+      enddo
+
+c
+      return
+      end
+
+c
+c***********************************************************************
+c Fill hanging nodes on fine patch (i.e. those nodes that do not overlap
+c a coarse level node) along patch boundary by interpolation from 
+c appropriate neighboring coarse nodes
+c***********************************************************************
+c
+      subroutine nodehangnodeinterp2d(
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  bboxilo0,bboxilo1,bboxihi0,bboxihi1,
+     &  bboxloc,
+     &  ratio,
+     &  depth,
+     &  ngc0,ngc1,
+     &  fnode)
+c***********************************************************************
+      implicit none
+
+      integer XLOWER,XUPPER,YLOWER,YUPPER
+      parameter (XLOWER=0)
+      parameter (XUPPER=1)
+      parameter (YLOWER=2)
+      parameter (YUPPER=3)
+
+      double precision one
+      parameter (one=1.0d0)
+c***********************************************************************
+c
+      integer
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1
+      integer bboxilo0,bboxilo1,bboxihi0,bboxihi1,bboxloc
+      integer ratio(0:2-1),depth
+      integer ngc0,ngc1
+      double precision
+     &  fnode(filo0-ngc0:fihi0+1+ngc0,
+     &          filo1-ngc1:fihi1+1+ngc1,depth)
+      integer ic0,if0,ir0,ic1,if1,ir1,id
+      integer cilo0_loop,cilo1_loop,cihi0_loop,cihi1_loop
+      double precision dratio0,dratio1,x0,x1
+c
+c***********************************************************************
+c
+      dratio0 = dble(ratio(0))
+      dratio1 = dble(ratio(1))
+
+      cilo0_loop=max(cilo0, bboxilo0)
+      cihi0_loop=min(cihi0, bboxihi0)
+      cilo1_loop=max(cilo1, bboxilo1)
+      cihi1_loop=min(cihi1, bboxihi1)
+c
+c***********************************************************************
+c 
+      if (bboxloc.eq.XLOWER) then
+
+         if0=cilo0*ratio(0)
+      do id = 1, depth
+         do ic1=cilo1_loop,cihi1_loop
+            if1=ic1*ratio(1)
+            do ir1=1,ratio(1)-1
+               x1 = dble(ir1)/dratio1
+               fnode(if0,if1+ir1,id) =
+     &            fnode(if0,if1,id) * (one - x1) +
+     &            fnode(if0,if1+ratio(1),id) * x1
+            enddo
+         enddo
+      enddo
+
+      else if (bboxloc.eq.XUPPER) then
+ 
+         if0=(cihi0+1)*ratio(0)
+      do id = 1, depth
+         do ic1=cilo1_loop,cihi1_loop
+            if1=ic1*ratio(1)
+            do ir1=1,ratio(1)-1
+               x1 = dble(ir1)/dratio1
+               fnode(if0,if1+ir1,id) =
+     &            fnode(if0,if1,id) * (one - x1) +
+     &            fnode(if0,if1+ratio(1),id) * x1
+            enddo
+         enddo
+      enddo
+
+      else if (bboxloc.eq.YLOWER) then
+      
+         if1=cilo1*ratio(1)
+      do id = 1, depth
+         do ic0=cilo0_loop,cihi0_loop
+            if0=ic0*ratio(0)
+            do ir0=1,ratio(0)-1
+               x0 = dble(ir0)/dratio0
+               fnode(if0+ir0,if1,id) =
+     &            fnode(if0,if1,id) * (one - x0) +
+     &            fnode(if0+ratio(0),if1,id) * x0
+            enddo
+         enddo
+      enddo
+
+      else if (bboxloc.eq.YUPPER) then
+
+         if1=(cihi1+1)*ratio(1)
+      do id = 1, depth
+         do ic0=cilo0_loop,cihi0_loop
+            if0=ic0*ratio(0)
+            do ir0=1,ratio(0)-1
+               x0 = dble(ir0)/dratio0
+               fnode(if0+ir0,if1,id) =
+     &            fnode(if0,if1,id) * (one - x0) +
+     &            fnode(if0+ratio(0),if1,id) * x0
+            enddo
+         enddo
+      enddo
+  
+      endif
+c
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/fortran/algs_nodeouternodeops2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/fortran/algs_nodeouternodeops2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,182 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/algs/fortran/algs_nodeouternodeops2d.m4 $
+c  Package:     SAMRAI algs
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    
+c  Modified:    
+c  Description:    F77 routines for summing outernode data with
+c                  other node or outernode data
+c
+define(NDIM,2)dnl
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+define(do_cfsum_along_patch_side,`dnl
+      do id = 1, depth
+         do ic$1=cilo$1_loop,cihi$1_loop
+            if$1=ic$1*ratio($1)
+            fnode(if0,if1,id) = fnode(if0,if1,id) + 
+     &                          couternode$2(ic$1,id)
+         enddo
+      enddo
+')dnl
+
+define(do_hanging_node_interpolation,`dnl
+      do id = 1, depth
+         do ic$1=cilo$1_loop,cihi$1_loop
+            if$1=ic$1*ratio($1)
+            do ir$1=1,ratio($1)-1
+               x$1 = dble(ir$1)/dratio$1
+               fnode($2,id) =
+     &            fnode(if0,if1,id) * (one - x$1) +
+     &            fnode($3,id) * x$1
+            enddo
+         enddo
+      enddo
+')dnl
+
+c
+c***********************************************************************
+c Sum node data on fine patch with outernode data on coarse patch
+c and store back in node data on fine patch.
+c i.e. fine_node_data += coarse_outernode_data
+c***********************************************************************
+c
+      subroutine nodeouternodesum2d(
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,
+     &  depth,
+     &  ngc0,ngc1,
+     &  fnode,
+     &  couternodelower0,couternodeupper0,
+     &  couternodelower1,couternodeupper1)
+c***********************************************************************
+      implicit none
+
+      integer
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1
+      integer ratio(0:NDIM-1), depth
+      integer ngc0,ngc1
+      double precision
+     &  fnode(NODE2dVECG(filo,fihi,ngc),depth),
+     &  couternodelower0(OUTERNODE2d0(cilo,cihi,0),depth),
+     &  couternodeupper0(OUTERNODE2d0(cilo,cihi,0),depth),
+     &  couternodelower1(OUTERNODE2d1(cilo,cihi,0),depth),
+     &  couternodeupper1(OUTERNODE2d1(cilo,cihi,0),depth)
+      integer ic0,if0,ic1,if1,id
+      integer cilo0_loop,cilo1_loop,cihi0_loop,cihi1_loop
+c
+c***********************************************************************
+c
+
+c sum along XLOWER side
+      cilo1_loop=cilo1+1
+      cihi1_loop=cihi1
+
+      if0=cilo0*ratio(0)
+do_cfsum_along_patch_side(1,`lower0')dnl
+
+c sum along XUPPER side
+      cilo1_loop=cilo1+1
+      cihi1_loop=cihi1
+
+      if0=(cihi0+1)*ratio(0)
+do_cfsum_along_patch_side(1,`upper0')dnl
+
+c sum along YLOWER side
+      cilo0_loop=cilo0
+      cihi0_loop=cihi0+1
+
+      if1=cilo1*ratio(1)
+do_cfsum_along_patch_side(0,`lower1')dnl
+
+c sum along YUPPER side
+      cilo0_loop=cilo0
+      cihi0_loop=cihi0+1
+
+      if1=(cihi1+1)*ratio(1)
+do_cfsum_along_patch_side(0,`upper1')dnl
+
+c
+      return
+      end
+
+c
+c***********************************************************************
+c Fill hanging nodes on fine patch (i.e. those nodes that do not overlap
+c a coarse level node) along patch boundary by interpolation from 
+c appropriate neighboring coarse nodes
+c***********************************************************************
+c
+      subroutine nodehangnodeinterp2d(
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  bboxilo0,bboxilo1,bboxihi0,bboxihi1,
+     &  bboxloc,
+     &  ratio,
+     &  depth,
+     &  ngc0,ngc1,
+     &  fnode)
+c***********************************************************************
+      implicit none
+
+      integer XLOWER,XUPPER,YLOWER,YUPPER
+      parameter (XLOWER=0)
+      parameter (XUPPER=1)
+      parameter (YLOWER=2)
+      parameter (YUPPER=3)
+
+      double precision one
+      parameter (one=1.0d0)
+c***********************************************************************
+c
+      integer
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1
+      integer bboxilo0,bboxilo1,bboxihi0,bboxihi1,bboxloc
+      integer ratio(0:NDIM-1),depth
+      integer ngc0,ngc1
+      double precision
+     &  fnode(NODE2dVECG(filo,fihi,ngc),depth)
+      integer ic0,if0,ir0,ic1,if1,ir1,id
+      integer cilo0_loop,cilo1_loop,cihi0_loop,cihi1_loop
+      double precision dratio0,dratio1,x0,x1
+c
+c***********************************************************************
+c
+      dratio0 = dble(ratio(0))
+      dratio1 = dble(ratio(1))
+
+      cilo0_loop=max(cilo0, bboxilo0)
+      cihi0_loop=min(cihi0, bboxihi0)
+      cilo1_loop=max(cilo1, bboxilo1)
+      cihi1_loop=min(cihi1, bboxihi1)
+c
+c***********************************************************************
+c 
+      if (bboxloc.eq.XLOWER) then
+
+         if0=cilo0*ratio(0)
+do_hanging_node_interpolation(1,`if0,if1+ir1',`if0,if1+ratio(1)')dnl
+
+      else if (bboxloc.eq.XUPPER) then
+ 
+         if0=(cihi0+1)*ratio(0)
+do_hanging_node_interpolation(1,`if0,if1+ir1',`if0,if1+ratio(1)')dnl
+
+      else if (bboxloc.eq.YLOWER) then
+      
+         if1=cilo1*ratio(1)
+do_hanging_node_interpolation(0,`if0+ir0,if1',`if0+ratio(0),if1')dnl
+
+      else if (bboxloc.eq.YUPPER) then
+
+         if1=(cihi1+1)*ratio(1)
+do_hanging_node_interpolation(0,`if0+ir0,if1',`if0+ratio(0),if1')dnl
+  
+      endif
+c
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/fortran/algs_nodeouternodeops3d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/fortran/algs_nodeouternodeops3d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,620 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/algs/fortran/algs_nodeouternodeops3d.m4 $
+c  Package:     SAMRAI algs
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    
+c  Modified:    
+c  Description:    F77 routines for summing outernode data with
+c                  other node or outernode data
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim3d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 3d arrays in FORTRAN routines.
+c
+
+
+
+
+
+
+
+
+
+c
+c***********************************************************************
+c Sum node data on fine patch with outernode data on coarse patch
+c and store back in node data on fine patch.
+c i.e. fine_node_data += coarse_outernode_data
+c***********************************************************************
+c
+      subroutine nodeouternodesum3d(
+     &  filo0,filo1,filo2,
+     &  fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,
+     &  cihi0,cihi1,cihi2,
+     &  ratio,
+     &  depth,
+     &  ngc0,ngc1,ngc2,
+     &  fnode,
+     &  couternodelower0,couternodeupper0,
+     &  couternodelower1,couternodeupper1,
+     &  couternodelower2,couternodeupper2)
+c***********************************************************************
+      implicit none
+
+      integer
+     &  filo0,filo1,filo2,
+     &  fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,
+     &  cihi0,cihi1,cihi2
+      integer ratio(0:3-1),depth
+      integer ngc0,ngc1,ngc2
+      double precision
+     &  fnode(filo0-ngc0:fihi0+1+ngc0,
+     &          filo1-ngc1:fihi1+1+ngc1,
+     &          filo2-ngc2:fihi2+1+ngc2,depth),
+     &  couternodelower0(cilo1+1:cihi1,
+     &          cilo2+1:cihi2,depth),
+     &  couternodeupper0(cilo1+1:cihi1,
+     &          cilo2+1:cihi2,depth),
+     &  couternodelower1(cilo0:cihi0+1,
+     &          cilo2+1:cihi2,depth),
+     &  couternodeupper1(cilo0:cihi0+1,
+     &          cilo2+1:cihi2,depth),
+     &  couternodelower2(cilo0:cihi0+1,
+     &          cilo1:cihi1+1,depth),
+     &  couternodeupper2(cilo0:cihi0+1,
+     &          cilo1:cihi1+1,depth)
+      integer ic0,if0,ic1,if1,ic2,if2,id
+      integer cilo0_loop,cilo1_loop,cilo2_loop,
+     &        cihi0_loop,cihi1_loop,cihi2_loop
+c
+c***********************************************************************
+c 
+
+c sum along XLOWER face
+      cilo1_loop=cilo1+1
+      cihi1_loop=cihi1
+      cilo2_loop=cilo2+1
+      cihi2_loop=cihi2
+
+      if0=cilo0*ratio(0)
+      do id = 1, depth
+         do ic2=cilo2_loop,cihi2_loop
+            if2=ic2*ratio(2)
+            do ic1=cilo1_loop,cihi1_loop
+               if1=ic1*ratio(1)
+               fnode(if0,if1,if2,id) = fnode(if0,if1,if2,id) +
+     &                                 couternodelower0(ic1,ic2,id)
+            enddo
+         enddo
+      enddo
+
+c sum along XUPPER face
+      cilo1_loop=cilo1+1
+      cihi1_loop=cihi1
+      cilo2_loop=cilo2+1
+      cihi2_loop=cihi2
+
+      if0=(cihi0+1)*ratio(0)
+      do id = 1, depth
+         do ic2=cilo2_loop,cihi2_loop
+            if2=ic2*ratio(2)
+            do ic1=cilo1_loop,cihi1_loop
+               if1=ic1*ratio(1)
+               fnode(if0,if1,if2,id) = fnode(if0,if1,if2,id) +
+     &                                 couternodeupper0(ic1,ic2,id)
+            enddo
+         enddo
+      enddo
+
+c sum along YLOWER face
+      cilo0_loop=cilo0
+      cihi0_loop=cihi0+1
+      cilo2_loop=cilo2+1
+      cihi2_loop=cihi2
+
+      if1=cilo1*ratio(1)
+      do id = 1, depth
+         do ic2=cilo2_loop,cihi2_loop
+            if2=ic2*ratio(2)
+            do ic0=cilo0_loop,cihi0_loop
+               if0=ic0*ratio(0)
+               fnode(if0,if1,if2,id) = fnode(if0,if1,if2,id) +
+     &                                 couternodelower1(ic0,ic2,id)
+            enddo
+         enddo
+      enddo
+
+c sum along YUPPER face
+      cilo0_loop=cilo0
+      cihi0_loop=cihi0+1
+      cilo2_loop=cilo2+1
+      cihi2_loop=cihi2
+
+      if1=(cihi1+1)*ratio(1)
+      do id = 1, depth
+         do ic2=cilo2_loop,cihi2_loop
+            if2=ic2*ratio(2)
+            do ic0=cilo0_loop,cihi0_loop
+               if0=ic0*ratio(0)
+               fnode(if0,if1,if2,id) = fnode(if0,if1,if2,id) +
+     &                                 couternodeupper1(ic0,ic2,id)
+            enddo
+         enddo
+      enddo
+
+c sum along ZLOWER face
+      cilo0_loop=cilo0
+      cihi0_loop=cihi0+1
+      cilo1_loop=cilo1
+      cihi1_loop=cihi1+1
+
+      if2=cilo2*ratio(2)
+      do id = 1, depth
+         do ic1=cilo1_loop,cihi1_loop
+            if1=ic1*ratio(1)
+            do ic0=cilo0_loop,cihi0_loop
+               if0=ic0*ratio(0)
+               fnode(if0,if1,if2,id) = fnode(if0,if1,if2,id) +
+     &                                 couternodelower2(ic0,ic1,id)
+            enddo
+         enddo
+      enddo
+
+c sum along ZUPPER face
+      cilo0_loop=cilo0
+      cihi0_loop=cihi0+1
+      cilo1_loop=cilo1
+      cihi1_loop=cihi1+1
+
+      if2=(cihi2+1)*ratio(2)
+      do id = 1, depth
+         do ic1=cilo1_loop,cihi1_loop
+            if1=ic1*ratio(1)
+            do ic0=cilo0_loop,cihi0_loop
+               if0=ic0*ratio(0)
+               fnode(if0,if1,if2,id) = fnode(if0,if1,if2,id) +
+     &                                 couternodeupper2(ic0,ic1,id)
+            enddo
+         enddo
+      enddo
+
+c
+      return
+      end
+c
+
+c
+c***********************************************************************
+c Fill hanging nodes on fine patch (i.e. those nodes that do not overlap
+c a coarse level node) along patch boundary by interpolation from
+c appropriate neighboring coarse nodes.
+c***********************************************************************
+c
+      subroutine nodehangnodeinterp3d(
+     &  filo0,filo1,filo2,
+     &  fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,
+     &  cihi0,cihi1,cihi2,
+     &  bboxilo0,bboxilo1,bboxilo2,
+     &  bboxihi0,bboxihi1,bboxihi2,
+     &  bboxloc,
+     &  ratio,
+     &  depth,
+     &  ngc0,ngc1,ngc2,
+     &  fnode)
+c***********************************************************************
+      implicit none
+
+      integer XLOWER,XUPPER,YLOWER,YUPPER,ZLOWER,ZUPPER
+      parameter (XLOWER=0)
+      parameter (XUPPER=1)
+      parameter (YLOWER=2)
+      parameter (YUPPER=3)
+      parameter (ZLOWER=4)
+      parameter (ZUPPER=5)
+
+      double precision one
+      parameter (one=1.0d0)
+
+c***********************************************************************
+      integer
+     &  filo0,filo1,filo2,
+     &  fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,
+     &  cihi0,cihi1,cihi2
+      integer
+     &  bboxilo0,bboxilo1,bboxilo2,
+     &  bboxihi0,bboxihi1,bboxihi2,
+     &  bboxloc
+      integer ratio(0:3-1),depth
+      integer ngc0,ngc1,ngc2
+      double precision
+     &  fnode(filo0-ngc0:fihi0+1+ngc0,
+     &          filo1-ngc1:fihi1+1+ngc1,
+     &          filo2-ngc2:fihi2+1+ngc2,depth)
+      integer ic0,if0,ir0,ic1,if1,ir1,ic2,if2,ir2,id
+      integer iflower0,iflower1,iflower2,ifupper0,ifupper1,ifupper2
+      integer cilo0_loop,cilo1_loop,cilo2_loop,
+     &        cihi0_loop,cihi1_loop,cihi2_loop
+      double precision dratio0,dratio1,dratio2,x0,x1,x2
+c
+c***********************************************************************
+c
+
+      dratio0 = dble(ratio(0))
+      dratio1 = dble(ratio(1))
+      dratio2 = dble(ratio(2))
+
+      cilo0_loop=max(cilo0, bboxilo0)
+      cihi0_loop=min(cihi0, bboxihi0)
+      cilo1_loop=max(cilo1, bboxilo1)
+      cihi1_loop=min(cihi1, bboxihi1)
+      cilo2_loop=max(cilo2, bboxilo2)
+      cihi2_loop=min(cihi2, bboxihi2)
+
+      if (bboxloc.eq.XLOWER) then
+      
+         if0=cilo0*ratio(0)
+
+         do id = 1, depth
+
+c interpolate nodes along lines in y-direction
+         do ic1=cilo1_loop,cihi1_loop
+            iflower1=ic1*ratio(1)
+            ifupper1=iflower1+ratio(1)
+            do ir1=1,ratio(1)-1
+               x1 = dble(ir1)/dratio1
+               do ic2=cilo2_loop,cihi2_loop+1
+                  if2=ic2*ratio(2)
+                  fnode(if0,iflower1+ir1,if2,id) =
+     &               fnode(if0,ifupper1,if2,id) * x1
+     &           +   fnode(if0,iflower1,if2,id) * (one-x1)
+               enddo
+            enddo
+         enddo
+
+c interpolate nodes along lines in z-direction
+         do ic2=cilo2_loop,cihi2_loop
+            iflower2=ic2*ratio(2)
+            ifupper2=iflower2+ratio(2)
+            do ir2=1,ratio(2)-1
+               x2 = dble(ir2)/dratio2
+               do ic1=cilo1_loop,cihi1_loop+1
+                  if1=ic1*ratio(1)
+                  fnode(if0,if1,iflower2+ir2,id) =
+     &               fnode(if0,if1,ifupper2,id) * x2
+     &           +   fnode(if0,if1,iflower2,id) * (one-x2)
+               enddo
+            enddo
+         enddo
+
+c interpolate face nodes in coarse cell interiors
+         do ic2=cilo2_loop,cihi2_loop
+            iflower2=ic2*ratio(2)
+            ifupper2=iflower2+ratio(2)
+            do ir2=1,ratio(2)-1
+               x2 = dble(ir2)/dratio2
+               do ic1=cilo1_loop,cihi1_loop
+                  iflower1=ic1*ratio(1)
+                  ifupper1=iflower1+ratio(1)
+                  do ir1=1,ratio(1)-1
+                     x1 = dble(ir1)/dratio1
+                     fnode(if0,iflower1+ir1,iflower2+ir2,id) =
+     &               (fnode(if0,iflower1,iflower2,id) * (one-x1) +
+     &                fnode(if0,ifupper1,iflower2,id) * x1) * (one-x2) +
+     &               (fnode(if0,iflower1,ifupper2,id) * (one-x1) +
+     &                fnode(if0,ifupper1,ifupper2,id) * x1) * x2
+                  enddo
+               enddo
+            enddo
+         enddo
+
+         enddo
+
+      else if (bboxloc.eq.XUPPER) then
+
+         if0=(cihi0+1)*ratio(0)
+
+         do id = 1, depth
+
+c interpolate nodes along lines in y-direction
+         do ic1=cilo1_loop,cihi1_loop
+            iflower1=ic1*ratio(1)
+            ifupper1=iflower1+ratio(1)
+            do ir1=1,ratio(1)-1
+               x1 = dble(ir1)/dratio1
+               do ic2=cilo2_loop,cihi2_loop+1
+                  if2=ic2*ratio(2)
+                  fnode(if0,iflower1+ir1,if2,id) =
+     &               fnode(if0,ifupper1,if2,id) * x1
+     &           +   fnode(if0,iflower1,if2,id) * (one-x1)
+               enddo
+            enddo
+         enddo
+
+c interpolate nodes along lines in z-direction
+         do ic2=cilo2_loop,cihi2_loop
+            iflower2=ic2*ratio(2)
+            ifupper2=iflower2+ratio(2)
+            do ir2=1,ratio(2)-1
+               x2 = dble(ir2)/dratio2
+               do ic1=cilo1_loop,cihi1_loop+1
+                  if1=ic1*ratio(1)
+                  fnode(if0,if1,iflower2+ir2,id) =
+     &               fnode(if0,if1,ifupper2,id) * x2
+     &           +   fnode(if0,if1,iflower2,id) * (one-x2)
+               enddo
+            enddo
+         enddo
+
+c interpolate face nodes in coarse cell interiors
+         do ic2=cilo2_loop,cihi2_loop
+            iflower2=ic2*ratio(2)
+            ifupper2=iflower2+ratio(2)
+            do ir2=1,ratio(2)-1
+               x2 = dble(ir2)/dratio2
+               do ic1=cilo1_loop,cihi1_loop
+                  iflower1=ic1*ratio(1)
+                  ifupper1=iflower1+ratio(1)
+                  do ir1=1,ratio(1)-1
+                     x1 = dble(ir1)/dratio1
+                     fnode(if0,iflower1+ir1,iflower2+ir2,id) =
+     &               (fnode(if0,iflower1,iflower2,id) * (one-x1) +
+     &                fnode(if0,ifupper1,iflower2,id) * x1) * (one-x2) +
+     &               (fnode(if0,iflower1,ifupper2,id) * (one-x1) +
+     &                fnode(if0,ifupper1,ifupper2,id) * x1) * x2
+                  enddo
+               enddo
+            enddo
+         enddo
+
+         enddo
+
+      else if (bboxloc.eq.YLOWER) then
+
+         if1=cilo1*ratio(1)
+
+         do id = 1, depth
+
+c interpolate nodes along lines in x-direction
+         do ic2=cilo2_loop,cihi2_loop+1
+            if2=ic2*ratio(2)
+            do ic0=cilo0_loop,cihi0_loop
+               iflower0=ic0*ratio(0)
+               ifupper0=iflower0+ratio(0)
+               do ir0=1,ratio(0)-1
+                  x0 = dble(ir0)/dratio0
+                  fnode(iflower0+ir0,if1,if2,id) =
+     &               fnode(ifupper0,if1,if2,id) * x0
+     &           +   fnode(iflower0,if1,if2,id) * (one-x0)
+               enddo
+            enddo
+         enddo
+
+c interpolate nodes along lines in z-direction
+         do ic2=cilo2_loop,cihi2_loop
+            iflower2=ic2*ratio(2)
+            ifupper2=iflower2+ratio(2)
+            do ir2=1,ratio(2)-1
+               x2 = dble(ir2)/dratio2
+               do ic0=cilo0_loop,cihi0_loop+1
+                  if0=ic0*ratio(0)
+                  fnode(if0,if1,iflower2+ir2,id) =
+     &               fnode(if0,if1,ifupper2,id) * x2
+     &           +   fnode(if0,if1,iflower2,id) * (one-x2)
+               enddo
+            enddo
+         enddo
+
+c interpolate face nodes in coarse cell interiors
+         do ic2=cilo2_loop,cihi2_loop
+            iflower2=ic2*ratio(2)
+            ifupper2=iflower2+ratio(2)
+            do ir2=1,ratio(2)-1
+               x2 = dble(ir2)/dratio2
+               do ic0=cilo0_loop,cihi0_loop
+                  iflower0=ic0*ratio(0)
+                  ifupper0=iflower0+ratio(0)
+                  do ir0=1,ratio(0)-1
+                     x0 = dble(ir0)/dratio0
+                     fnode(iflower0+ir0,if1,iflower2+ir2,id) =
+     &               (fnode(iflower0,if1,iflower2,id) * (one-x0) +
+     &                fnode(ifupper0,if1,iflower2,id) * x0) * (one-x2) +
+     &               (fnode(iflower0,if1,ifupper2,id) * (one-x0) +
+     &                fnode(ifupper0,if1,ifupper2,id) * x0) * x2
+                  enddo
+               enddo
+            enddo
+         enddo
+
+         enddo
+
+      else if (bboxloc.eq.YUPPER) then
+
+         if1=(cihi1+1)*ratio(1)
+   
+         do id = 1, depth
+
+c interpolate nodes along lines in x-direction
+         do ic2=cilo2_loop,cihi2_loop+1
+            if2=ic2*ratio(2)
+            do ic0=cilo0_loop,cihi0_loop
+               iflower0=ic0*ratio(0)
+               ifupper0=iflower0+ratio(0)
+               do ir0=1,ratio(0)-1
+                  x0 = dble(ir0)/dratio0
+                  fnode(iflower0+ir0,if1,if2,id) =
+     &               fnode(ifupper0,if1,if2,id) * x0
+     &           +   fnode(iflower0,if1,if2,id) * (one-x0)
+               enddo
+            enddo
+         enddo
+
+c interpolate nodes along lines in z-direction
+         do ic2=cilo2_loop,cihi2_loop
+            iflower2=ic2*ratio(2)
+            ifupper2=iflower2+ratio(2)
+            do ir2=1,ratio(2)-1
+               x2 = dble(ir2)/dratio2
+               do ic0=cilo0_loop,cihi0_loop+1
+                  if0=ic0*ratio(0)
+                  fnode(if0,if1,iflower2+ir2,id) =
+     &               fnode(if0,if1,ifupper2,id) * x2
+     &           +   fnode(if0,if1,iflower2,id) * (one-x2)
+               enddo
+            enddo
+         enddo
+
+c interpolate face nodes in coarse cell interiors
+         do ic2=cilo2_loop,cihi2_loop
+            iflower2=ic2*ratio(2)
+            ifupper2=iflower2+ratio(2)
+            do ir2=1,ratio(2)-1
+               x2 = dble(ir2)/dratio2
+               do ic0=cilo0_loop,cihi0_loop
+                  iflower0=ic0*ratio(0)
+                  ifupper0=iflower0+ratio(0)
+                  do ir0=1,ratio(0)-1
+                     x0 = dble(ir0)/dratio0
+                     fnode(iflower0+ir0,if1,iflower2+ir2,id) =
+     &               (fnode(iflower0,if1,iflower2,id) * (one-x0) +
+     &                fnode(ifupper0,if1,iflower2,id) * x0) * (one-x2) +
+     &               (fnode(iflower0,if1,ifupper2,id) * (one-x0) +
+     &                fnode(ifupper0,if1,ifupper2,id) * x0) * x2
+                  enddo
+               enddo
+            enddo
+         enddo
+
+         enddo
+
+      else if (bboxloc.eq.ZLOWER) then
+
+         if2=cilo2*ratio(2)
+
+         do id = 1, depth
+
+c interpolate nodes along lines in x-direction
+         do ic1=cilo1_loop,cihi1_loop+1
+            if1=ic1*ratio(1)
+            do ic0=cilo0_loop,cihi0_loop
+               iflower0=ic0*ratio(0)
+               ifupper0=iflower0+ratio(0)
+               do ir0=1,ratio(0)-1
+                  x0 = dble(ir0)/dratio0
+                  fnode(iflower0+ir0,if1,if2,id) =
+     &               fnode(ifupper0,if1,if2,id) * x0
+     &           +   fnode(iflower0,if1,if2,id) * (one-x0)
+               enddo
+            enddo
+         enddo
+
+c interpolate nodes along lines in y-direction
+         do ic1=cilo1_loop,cihi1_loop
+            iflower1=ic1*ratio(1)
+            ifupper1=iflower1+ratio(1)
+            do ir1=1,ratio(1)-1
+               x1 = dble(ir1)/dratio1
+               do ic0=cilo0_loop,cihi0_loop+1
+                  if0=ic0*ratio(0)
+                  fnode(if0,iflower1+ir1,if2,id) =
+     &               fnode(if0,ifupper1,if2,id) * x1
+     &           +   fnode(if0,iflower1,if2,id) * (one-x1)
+               enddo
+            enddo
+         enddo
+
+c interpolate face nodes in coarse cell interiors
+         do ic1=cilo1_loop,cihi1_loop
+            iflower1=ic1*ratio(1)
+            ifupper1=iflower1+ratio(1)
+            do ir1=1,ratio(1)-1
+               x1 = dble(ir1)/dratio1
+               do ic0=cilo0_loop,cihi0_loop
+                  iflower0=ic0*ratio(0)
+                  ifupper0=iflower0+ratio(0)
+                  do ir0=1,ratio(0)-1
+                     x0 = dble(ir0)/dratio0
+                     fnode(iflower0+ir0,iflower1+ir1,if2,id) =
+     &               (fnode(iflower0,iflower1,if2,id) * (one-x0) +
+     &                fnode(ifupper0,iflower1,if2,id) * x0) * (one-x1) +
+     &               (fnode(iflower0,ifupper1,if2,id) * (one-x0) +
+     &                fnode(ifupper0,ifupper1,if2,id) * x0) * x1
+                  enddo
+               enddo
+            enddo
+         enddo
+
+         enddo
+
+      else if (bboxloc.eq.ZUPPER) then
+
+         if2=(cihi2+1)*ratio(2)
+
+         do id = 1, depth
+
+c interpolate nodes along lines in x-direction
+         do ic1=cilo1_loop,cihi1_loop+1
+            if1=ic1*ratio(1)
+            do ic0=cilo0_loop,cihi0_loop
+               iflower0=ic0*ratio(0)
+               ifupper0=iflower0+ratio(0)
+               do ir0=1,ratio(0)-1
+                  x0 = dble(ir0)/dratio0
+                  fnode(iflower0+ir0,if1,if2,id) =
+     &               fnode(ifupper0,if1,if2,id) * x0
+     &           +   fnode(iflower0,if1,if2,id) * (one-x0)
+               enddo
+            enddo
+         enddo
+
+c interpolate nodes along lines in y-direction
+         do ic1=cilo1_loop,cihi1_loop
+            iflower1=ic1*ratio(1)
+            ifupper1=iflower1+ratio(1)
+            do ir1=1,ratio(1)-1
+               x1 = dble(ir1)/dratio1
+               do ic0=cilo0_loop,cihi0_loop+1
+                  if0=ic0*ratio(0)
+                  fnode(if0,iflower1+ir1,if2,id) =
+     &               fnode(if0,ifupper1,if2,id) * x1
+     &           +   fnode(if0,iflower1,if2,id) * (one-x1)
+               enddo
+            enddo
+         enddo
+
+c interpolate face nodes in coarse cell interiors
+         do ic1=cilo1_loop,cihi1_loop
+            iflower1=ic1*ratio(1)
+            ifupper1=iflower1+ratio(1)
+            do ir1=1,ratio(1)-1
+               x1 = dble(ir1)/dratio1
+               do ic0=cilo0_loop,cihi0_loop
+                  iflower0=ic0*ratio(0)
+                  ifupper0=iflower0+ratio(0)
+                  do ir0=1,ratio(0)-1
+                     x0 = dble(ir0)/dratio0
+                     fnode(iflower0+ir0,iflower1+ir1,if2,id) =
+     &               (fnode(iflower0,iflower1,if2,id) * (one-x0) +
+     &                fnode(ifupper0,iflower1,if2,id) * x0) * (one-x1) +
+     &               (fnode(iflower0,ifupper1,if2,id) * (one-x0) +
+     &                fnode(ifupper0,ifupper1,if2,id) * x0) * x1
+                  enddo
+               enddo
+            enddo
+         enddo
+
+         enddo
+
+      endif
+c
+      return
+      end
+c
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/fortran/algs_nodeouternodeops3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/fortran/algs_nodeouternodeops3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,401 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/algs/fortran/algs_nodeouternodeops3d.m4 $
+c  Package:     SAMRAI algs
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    
+c  Modified:    
+c  Description:    F77 routines for summing outernode data with
+c                  other node or outernode data
+c
+define(NDIM,3)dnl
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+define(do_cfsum_along_patch_face,`dnl
+      do id = 1, depth
+         do ic$2=cilo$2_loop,cihi$2_loop
+            if$2=ic$2*ratio($2)
+            do ic$1=cilo$1_loop,cihi$1_loop
+               if$1=ic$1*ratio($1)
+               fnode(if0,if1,if2,id) = fnode(if0,if1,if2,id) +
+     &                                 couternode$3(ic$1,ic$2,id)
+            enddo
+         enddo
+      enddo
+')dnl
+
+define(interp_interior_loop_begin,`dnl
+         do ic$2=cilo$2_loop,cihi$2_loop
+            iflower$2=ic$2*ratio($2)
+            ifupper$2=iflower$2+ratio($2)
+            do ir$2=1,ratio($2)-1
+               x$2 = dble(ir$2)/dratio$2
+               do ic$1=cilo$1_loop,cihi$1_loop
+                  iflower$1=ic$1*ratio($1)
+                  ifupper$1=iflower$1+ratio($1)
+                  do ir$1=1,ratio($1)-1
+                     x$1 = dble(ir$1)/dratio$1
+')dnl
+define(interp_interior_loop_end,`dnl
+                  enddo
+               enddo
+            enddo
+         enddo
+')dnl
+
+define(do_interp_interior0,`dnl
+interp_interior_loop_begin(1,2)dnl
+                     fnode(if0,iflower1+ir1,iflower2+ir2,id) =
+     &               (fnode(if0,iflower1,iflower2,id) * (one-x1) +
+     &                fnode(if0,ifupper1,iflower2,id) * x1) * (one-x2) +
+     &               (fnode(if0,iflower1,ifupper2,id) * (one-x1) +
+     &                fnode(if0,ifupper1,ifupper2,id) * x1) * x2
+interp_interior_loop_end()dnl
+')dnl
+
+define(do_interp_interior1,`dnl
+interp_interior_loop_begin(0,2)dnl
+                     fnode(iflower0+ir0,if1,iflower2+ir2,id) =
+     &               (fnode(iflower0,if1,iflower2,id) * (one-x0) +
+     &                fnode(ifupper0,if1,iflower2,id) * x0) * (one-x2) +
+     &               (fnode(iflower0,if1,ifupper2,id) * (one-x0) +
+     &                fnode(ifupper0,if1,ifupper2,id) * x0) * x2
+interp_interior_loop_end()dnl
+')dnl
+
+define(do_interp_interior2,`dnl
+interp_interior_loop_begin(0,1)dnl
+                     fnode(iflower0+ir0,iflower1+ir1,if2,id) =
+     &               (fnode(iflower0,iflower1,if2,id) * (one-x0) +
+     &                fnode(ifupper0,iflower1,if2,id) * x0) * (one-x1) +
+     &               (fnode(iflower0,ifupper1,if2,id) * (one-x0) +
+     &                fnode(ifupper0,ifupper1,if2,id) * x0) * x1
+interp_interior_loop_end()dnl
+')dnl
+
+define(do_interp_lines0,`dnl
+         do ic$1=cilo$1_loop,cihi$1_loop+1
+            if$1=ic$1*ratio($1)
+            do ic0=cilo0_loop,cihi0_loop
+               iflower0=ic0*ratio(0)
+               ifupper0=iflower0+ratio(0)
+               do ir0=1,ratio(0)-1
+                  x0 = dble(ir0)/dratio0
+                  fnode(iflower0+ir0,if1,if2,id) =
+     &               fnode(ifupper0,if1,if2,id) * x0
+     &           +   fnode(iflower0,if1,if2,id) * (one-x0)
+               enddo
+            enddo
+         enddo
+')dnl
+
+define(do_interp_lines1,`dnl
+         do ic1=cilo1_loop,cihi1_loop
+            iflower1=ic1*ratio(1)
+            ifupper1=iflower1+ratio(1)
+            do ir1=1,ratio(1)-1
+               x1 = dble(ir1)/dratio1
+               do ic$1=cilo$1_loop,cihi$1_loop+1
+                  if$1=ic$1*ratio($1)
+                  fnode(if0,iflower1+ir1,if2,id) =
+     &               fnode(if0,ifupper1,if2,id) * x1
+     &           +   fnode(if0,iflower1,if2,id) * (one-x1)
+               enddo
+            enddo
+         enddo
+')dnl
+
+define(do_interp_lines2,`dnl
+         do ic2=cilo2_loop,cihi2_loop
+            iflower2=ic2*ratio(2)
+            ifupper2=iflower2+ratio(2)
+            do ir2=1,ratio(2)-1
+               x2 = dble(ir2)/dratio2
+               do ic$1=cilo$1_loop,cihi$1_loop+1
+                  if$1=ic$1*ratio($1)
+                  fnode(if0,if1,iflower2+ir2,id) =
+     &               fnode(if0,if1,ifupper2,id) * x2
+     &           +   fnode(if0,if1,iflower2,id) * (one-x2)
+               enddo
+            enddo
+         enddo
+')dnl
+
+c
+c***********************************************************************
+c Sum node data on fine patch with outernode data on coarse patch
+c and store back in node data on fine patch.
+c i.e. fine_node_data += coarse_outernode_data
+c***********************************************************************
+c
+      subroutine nodeouternodesum3d(
+     &  filo0,filo1,filo2,
+     &  fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,
+     &  cihi0,cihi1,cihi2,
+     &  ratio,
+     &  depth,
+     &  ngc0,ngc1,ngc2,
+     &  fnode,
+     &  couternodelower0,couternodeupper0,
+     &  couternodelower1,couternodeupper1,
+     &  couternodelower2,couternodeupper2)
+c***********************************************************************
+      implicit none
+
+      integer
+     &  filo0,filo1,filo2,
+     &  fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,
+     &  cihi0,cihi1,cihi2
+      integer ratio(0:NDIM-1),depth
+      integer ngc0,ngc1,ngc2
+      double precision
+     &  fnode(NODE3dVECG(filo,fihi,ngc),depth),
+     &  couternodelower0(OUTERNODE3d0(cilo,cihi,0),depth),
+     &  couternodeupper0(OUTERNODE3d0(cilo,cihi,0),depth),
+     &  couternodelower1(OUTERNODE3d1(cilo,cihi,0),depth),
+     &  couternodeupper1(OUTERNODE3d1(cilo,cihi,0),depth),
+     &  couternodelower2(OUTERNODE3d2(cilo,cihi,0),depth),
+     &  couternodeupper2(OUTERNODE3d2(cilo,cihi,0),depth)
+      integer ic0,if0,ic1,if1,ic2,if2,id
+      integer cilo0_loop,cilo1_loop,cilo2_loop,
+     &        cihi0_loop,cihi1_loop,cihi2_loop
+c
+c***********************************************************************
+c 
+
+c sum along XLOWER face
+      cilo1_loop=cilo1+1
+      cihi1_loop=cihi1
+      cilo2_loop=cilo2+1
+      cihi2_loop=cihi2
+
+      if0=cilo0*ratio(0)
+do_cfsum_along_patch_face(1,2,`lower0')dnl
+
+c sum along XUPPER face
+      cilo1_loop=cilo1+1
+      cihi1_loop=cihi1
+      cilo2_loop=cilo2+1
+      cihi2_loop=cihi2
+
+      if0=(cihi0+1)*ratio(0)
+do_cfsum_along_patch_face(1,2,`upper0')dnl
+
+c sum along YLOWER face
+      cilo0_loop=cilo0
+      cihi0_loop=cihi0+1
+      cilo2_loop=cilo2+1
+      cihi2_loop=cihi2
+
+      if1=cilo1*ratio(1)
+do_cfsum_along_patch_face(0,2,`lower1')dnl
+
+c sum along YUPPER face
+      cilo0_loop=cilo0
+      cihi0_loop=cihi0+1
+      cilo2_loop=cilo2+1
+      cihi2_loop=cihi2
+
+      if1=(cihi1+1)*ratio(1)
+do_cfsum_along_patch_face(0,2,`upper1')dnl
+
+c sum along ZLOWER face
+      cilo0_loop=cilo0
+      cihi0_loop=cihi0+1
+      cilo1_loop=cilo1
+      cihi1_loop=cihi1+1
+
+      if2=cilo2*ratio(2)
+do_cfsum_along_patch_face(0,1,`lower2')dnl
+
+c sum along ZUPPER face
+      cilo0_loop=cilo0
+      cihi0_loop=cihi0+1
+      cilo1_loop=cilo1
+      cihi1_loop=cihi1+1
+
+      if2=(cihi2+1)*ratio(2)
+do_cfsum_along_patch_face(0,1,`upper2')dnl
+
+c
+      return
+      end
+c
+
+c
+c***********************************************************************
+c Fill hanging nodes on fine patch (i.e. those nodes that do not overlap
+c a coarse level node) along patch boundary by interpolation from
+c appropriate neighboring coarse nodes.
+c***********************************************************************
+c
+      subroutine nodehangnodeinterp3d(
+     &  filo0,filo1,filo2,
+     &  fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,
+     &  cihi0,cihi1,cihi2,
+     &  bboxilo0,bboxilo1,bboxilo2,
+     &  bboxihi0,bboxihi1,bboxihi2,
+     &  bboxloc,
+     &  ratio,
+     &  depth,
+     &  ngc0,ngc1,ngc2,
+     &  fnode)
+c***********************************************************************
+      implicit none
+
+      integer XLOWER,XUPPER,YLOWER,YUPPER,ZLOWER,ZUPPER
+      parameter (XLOWER=0)
+      parameter (XUPPER=1)
+      parameter (YLOWER=2)
+      parameter (YUPPER=3)
+      parameter (ZLOWER=4)
+      parameter (ZUPPER=5)
+
+      double precision one
+      parameter (one=1.0d0)
+
+c***********************************************************************
+      integer
+     &  filo0,filo1,filo2,
+     &  fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,
+     &  cihi0,cihi1,cihi2
+      integer
+     &  bboxilo0,bboxilo1,bboxilo2,
+     &  bboxihi0,bboxihi1,bboxihi2,
+     &  bboxloc
+      integer ratio(0:NDIM-1),depth
+      integer ngc0,ngc1,ngc2
+      double precision
+     &  fnode(NODE3dVECG(filo,fihi,ngc),depth)
+      integer ic0,if0,ir0,ic1,if1,ir1,ic2,if2,ir2,id
+      integer iflower0,iflower1,iflower2,ifupper0,ifupper1,ifupper2
+      integer cilo0_loop,cilo1_loop,cilo2_loop,
+     &        cihi0_loop,cihi1_loop,cihi2_loop
+      double precision dratio0,dratio1,dratio2,x0,x1,x2
+c
+c***********************************************************************
+c
+
+      dratio0 = dble(ratio(0))
+      dratio1 = dble(ratio(1))
+      dratio2 = dble(ratio(2))
+
+      cilo0_loop=max(cilo0, bboxilo0)
+      cihi0_loop=min(cihi0, bboxihi0)
+      cilo1_loop=max(cilo1, bboxilo1)
+      cihi1_loop=min(cihi1, bboxihi1)
+      cilo2_loop=max(cilo2, bboxilo2)
+      cihi2_loop=min(cihi2, bboxihi2)
+
+      if (bboxloc.eq.XLOWER) then
+      
+         if0=cilo0*ratio(0)
+
+         do id = 1, depth
+
+c interpolate nodes along lines in y-direction
+do_interp_lines1(2)dnl
+
+c interpolate nodes along lines in z-direction
+do_interp_lines2(1)dnl
+
+c interpolate face nodes in coarse cell interiors
+do_interp_interior0()dnl
+
+         enddo
+
+      else if (bboxloc.eq.XUPPER) then
+
+         if0=(cihi0+1)*ratio(0)
+
+         do id = 1, depth
+
+c interpolate nodes along lines in y-direction
+do_interp_lines1(2)dnl
+
+c interpolate nodes along lines in z-direction
+do_interp_lines2(1)dnl
+
+c interpolate face nodes in coarse cell interiors
+do_interp_interior0()dnl
+
+         enddo
+
+      else if (bboxloc.eq.YLOWER) then
+
+         if1=cilo1*ratio(1)
+
+         do id = 1, depth
+
+c interpolate nodes along lines in x-direction
+do_interp_lines0(2)dnl
+
+c interpolate nodes along lines in z-direction
+do_interp_lines2(0)dnl
+
+c interpolate face nodes in coarse cell interiors
+do_interp_interior1()dnl
+
+         enddo
+
+      else if (bboxloc.eq.YUPPER) then
+
+         if1=(cihi1+1)*ratio(1)
+   
+         do id = 1, depth
+
+c interpolate nodes along lines in x-direction
+do_interp_lines0(2)dnl
+
+c interpolate nodes along lines in z-direction
+do_interp_lines2(0)dnl
+
+c interpolate face nodes in coarse cell interiors
+do_interp_interior1()dnl
+
+         enddo
+
+      else if (bboxloc.eq.ZLOWER) then
+
+         if2=cilo2*ratio(2)
+
+         do id = 1, depth
+
+c interpolate nodes along lines in x-direction
+do_interp_lines0(1)dnl
+
+c interpolate nodes along lines in y-direction
+do_interp_lines1(0)dnl
+
+c interpolate face nodes in coarse cell interiors
+do_interp_interior2()dnl
+
+         enddo
+
+      else if (bboxloc.eq.ZUPPER) then
+
+         if2=(cihi2+1)*ratio(2)
+
+         do id = 1, depth
+
+c interpolate nodes along lines in x-direction
+do_interp_lines0(1)dnl
+
+c interpolate nodes along lines in y-direction
+do_interp_lines1(0)dnl
+
+c interpolate face nodes in coarse cell interiors
+do_interp_interior2()dnl
+
+         enddo
+
+      endif
+c
+      return
+      end
+c
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/fortran/algs_upfluxsum1d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/fortran/algs_upfluxsum1d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,50 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/algs/fortran/algs_upfluxsum1d.m4 $
+c  Package:     SAMRAI algorithms
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: F77 routines for updating 1d flux sums from fluxes.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim1d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 1d arrays in FORTRAN routines.
+c
+c
+c***********************************************************************
+c Add flux integrals to fluxsums
+c***********************************************************************
+c
+      subroutine upfluxsum1d(
+     &  ilo0,ihi0,
+     &  flxgc0,
+     &  iface,
+     &  flux,fluxsum)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ilo0,ihi0,
+     &  flxgc0,
+     &  iface
+      double precision
+     &  flux(ilo0-flxgc0:ihi0+1+flxgc0),
+     &  fluxsum(1)
+      integer ie0
+c
+c***********************************************************************
+c
+      if (iface.eq.0) then
+        ie0 = ilo0
+      else
+        ie0 = ihi0+1
+      endif 
+ 
+      fluxsum(1)=fluxsum(1)+flux(ie0)
+c
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/fortran/algs_upfluxsum1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/fortran/algs_upfluxsum1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,45 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/algs/fortran/algs_upfluxsum1d.m4 $
+c  Package:     SAMRAI algorithms
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: F77 routines for updating 1d flux sums from fluxes.
+c
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim1d.i)dnl
+c
+c***********************************************************************
+c Add flux integrals to fluxsums
+c***********************************************************************
+c
+      subroutine upfluxsum1d(
+     &  ilo0,ihi0,
+     &  flxgc0,
+     &  iface,
+     &  flux,fluxsum)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ilo0,ihi0,
+     &  flxgc0,
+     &  iface
+      REAL
+     &  flux(FACE1dVECG(ilo,ihi,flxgc)),
+     &  fluxsum(OUTERFACE1d(ilo,ihi,0))
+      integer ie0
+c
+c***********************************************************************
+c
+      if (iface.eq.0) then
+        ie0 = ilo0
+      else
+        ie0 = ihi0+1
+      endif 
+ 
+      fluxsum(1)=fluxsum(1)+flux(ie0)
+c
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/fortran/algs_upfluxsum2d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/fortran/algs_upfluxsum2d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,153 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/algs/fortran/algs_upfluxsum2d.m4 $
+c  Package:     SAMRAI algorithms
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: F77 routines for updating 2d flux sums from fluxes.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim2d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 2d arrays in FORTRAN routines.
+c
+c
+c***********************************************************************
+c Add flux integrals to fluxsums
+c***********************************************************************
+c
+      subroutine upfluxsumface2d0(
+     &  ilo0,ilo1,ihi0,ihi1,
+     &  flxgc0,flxgc1,
+     &  iface,
+     &  flux,fluxsum)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ilo0,ilo1,ihi0,ihi1,
+     &  flxgc0,flxgc1,
+     &  iface
+      double precision
+     &  flux(ilo0-flxgc0:ihi0+1+flxgc0,
+     &          ilo1-flxgc1:ihi1+flxgc1),
+     &  fluxsum(ilo1:ihi1)
+      integer ie0,ic1
+c
+c***********************************************************************
+c
+      if (iface.eq.0) then
+        ie0 = ilo0
+      else 
+        ie0 = ihi0+1
+      endif 
+ 
+      do ic1=ilo1,ihi1
+         fluxsum(ic1)=fluxsum(ic1)+flux(ie0,ic1)
+      enddo
+c
+      return
+      end
+c
+      subroutine upfluxsumface2d1(
+     &  ilo0,ilo1,ihi0,ihi1,
+     &  flxgc0,flxgc1,
+     &  iface,
+     &  flux,fluxsum)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ilo0,ilo1,ihi0,ihi1,
+     &  flxgc0,flxgc1,
+     &  iface
+      double precision
+     &  flux(ilo1-flxgc1:ihi1+1+flxgc1,
+     &          ilo0-flxgc0:ihi0+flxgc0),
+     &  fluxsum(ilo0:ihi0)
+      integer ie1,ic0
+c
+c***********************************************************************
+c
+      if (iface.eq.0) then
+        ie1 = ilo1
+      else 
+        ie1 = ihi1+1
+      endif 
+ 
+      do ic0=ilo0,ihi0
+         fluxsum(ic0)=fluxsum(ic0)+flux(ie1,ic0)
+      enddo
+c
+      return
+      end
+c
+      subroutine upfluxsumside2d0(
+     &  ilo0,ilo1,ihi0,ihi1,
+     &  flxgc0,flxgc1,
+     &  iface,
+     &  flux,fluxsum)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ilo0,ilo1,ihi0,ihi1,
+     &  flxgc0,flxgc1,
+     &  iface
+      double precision
+     &  flux(ilo0-flxgc0:ihi0+1+flxgc0,
+     &          ilo1-flxgc1:ihi1+flxgc1),
+     &  fluxsum(ilo1:ihi1)
+      integer ic0,ic1
+c
+c***********************************************************************
+c
+      if (iface.eq.0) then
+        ic0 = ilo0
+      else 
+        ic0 = ihi0+1
+      endif 
+ 
+      do ic1=ilo1,ihi1
+         fluxsum(ic1)=fluxsum(ic1)+flux(ic0,ic1)
+      enddo
+c
+      return
+      end
+c
+      subroutine upfluxsumside2d1(
+     &  ilo0,ilo1,ihi0,ihi1,
+     &  flxgc0,flxgc1,
+     &  iface,
+     &  flux,fluxsum)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ilo0,ilo1,ihi0,ihi1,
+     &  flxgc0,flxgc1,
+     &  iface
+      double precision
+     &  flux(ilo0-flxgc0:ihi0+flxgc0,
+     &          ilo1-flxgc1:ihi1+1+flxgc1),
+     &  fluxsum(ilo0:ihi0)
+      integer ic1,ic0
+c
+c***********************************************************************
+c
+      if (iface.eq.0) then
+        ic1 = ilo1
+      else 
+        ic1 = ihi1+1
+      endif 
+ 
+      do ic0=ilo0,ihi0
+         fluxsum(ic0)=fluxsum(ic0)+flux(ic0,ic1)
+      enddo
+c
+      return
+      end
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/fortran/algs_upfluxsum2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/fortran/algs_upfluxsum2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,90 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/algs/fortran/algs_upfluxsum2d.m4 $
+c  Package:     SAMRAI algorithms
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: F77 routines for updating 2d flux sums from fluxes.
+c
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+c
+c***********************************************************************
+c Add flux integrals to fluxsums
+c***********************************************************************
+c
+define(upfluxsumface_case_2d,`dnl
+      subroutine upfluxsumface2d$1(
+     &  ilo0,ilo1,ihi0,ihi1,
+     &  flxgc0,flxgc1,
+     &  iface,
+     &  flux,fluxsum)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ilo0,ilo1,ihi0,ihi1,
+     &  flxgc0,flxgc1,
+     &  iface
+      REAL
+     &  flux(FACE2d$1VECG(ilo,ihi,flxgc)),
+     &  fluxsum(OUTERFACE2d$1(ilo,ihi,0))
+      integer ie$1,ic$2
+c
+c***********************************************************************
+c
+      if (iface.eq.0) then
+        ie$1 = ilo$1
+      else 
+        ie$1 = ihi$1+1
+      endif 
+ 
+      do ic$2=ilo$2,ihi$2
+         fluxsum(ic$2)=fluxsum(ic$2)+flux(ie$1,ic$2)
+      enddo
+c
+      return
+      end
+')dnl
+define(upfluxsumside_case_2d,`dnl
+      subroutine upfluxsumside2d$1(
+     &  ilo0,ilo1,ihi0,ihi1,
+     &  flxgc0,flxgc1,
+     &  iface,
+     &  flux,fluxsum)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ilo0,ilo1,ihi0,ihi1,
+     &  flxgc0,flxgc1,
+     &  iface
+      REAL
+     &  flux(SIDE2d$1VECG(ilo,ihi,flxgc)),
+     &  fluxsum(OUTERFACE2d$1(ilo,ihi,0))
+      integer ic$1,ic$2
+c
+c***********************************************************************
+c
+      if (iface.eq.0) then
+        ic$1 = ilo$1
+      else 
+        ic$1 = ihi$1+1
+      endif 
+ 
+      do ic$2=ilo$2,ihi$2
+         fluxsum(ic$2)=fluxsum(ic$2)+flux(ic0,ic1)
+      enddo
+c
+      return
+      end
+')dnl
+upfluxsumface_case_2d(0,1)dnl
+c
+upfluxsumface_case_2d(1,0)dnl
+c
+upfluxsumside_case_2d(0,1)dnl
+c
+upfluxsumside_case_2d(1,0)dnl
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/fortran/algs_upfluxsum3d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/fortran/algs_upfluxsum3d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,244 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/algs/fortran/algs_upfluxsum3d.m4 $
+c  Package:     SAMRAI algorithms
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: F77 routines for updating 3d flux sums from fluxes.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim3d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 3d arrays in FORTRAN routines.
+c
+c
+c***********************************************************************
+c Add flux integrals to fluxsums
+c***********************************************************************
+c
+c
+c
+      subroutine upfluxsumface3d0(
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iface,
+     &  flux,fluxsum)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iface
+      double precision
+     &  flux(ilo0-flxgc0:ihi0+1+flxgc0,
+     &          ilo1-flxgc1:ihi1+flxgc1,
+     &          ilo2-flxgc2:ihi2+flxgc2),
+     &  fluxsum(ilo1:ihi1,
+     &          ilo2:ihi2)
+      integer ie0,ic1,ic2
+c
+c***********************************************************************
+c
+      if (iface.eq.0) then
+        ie0 = ilo0
+      else
+        ie0 = ihi0+1
+      endif 
+ 
+      do ic2=ilo2,ihi2
+         do ic1=ilo1,ihi1
+            fluxsum(ic1,ic2)=fluxsum(ic1,ic2)+flux(ie0,ic1,ic2)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine upfluxsumface3d1(
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iface,
+     &  flux,fluxsum)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iface
+      double precision
+     &  flux(ilo1-flxgc1:ihi1+1+flxgc1,
+     &          ilo2-flxgc2:ihi2+flxgc2,
+     &          ilo0-flxgc0:ihi0+flxgc0),
+     &  fluxsum(ilo2:ihi2,
+     &          ilo0:ihi0)
+      integer ie1,ic2,ic0
+c
+c***********************************************************************
+c
+      if (iface.eq.0) then
+        ie1 = ilo1
+      else
+        ie1 = ihi1+1
+      endif 
+ 
+      do ic0=ilo0,ihi0
+         do ic2=ilo2,ihi2
+            fluxsum(ic2,ic0)=fluxsum(ic2,ic0)+flux(ie1,ic2,ic0)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine upfluxsumface3d2(
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iface,
+     &  flux,fluxsum)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iface
+      double precision
+     &  flux(ilo2-flxgc2:ihi2+1+flxgc2,
+     &          ilo0-flxgc0:ihi0+flxgc0,
+     &          ilo1-flxgc1:ihi1+flxgc1),
+     &  fluxsum(ilo0:ihi0,
+     &          ilo1:ihi1)
+      integer ie2,ic0,ic1
+c
+c***********************************************************************
+c
+      if (iface.eq.0) then
+        ie2 = ilo2
+      else
+        ie2 = ihi2+1
+      endif 
+ 
+      do ic1=ilo1,ihi1
+         do ic0=ilo0,ihi0
+            fluxsum(ic0,ic1)=fluxsum(ic0,ic1)+flux(ie2,ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine upfluxsumside3d0(
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iside,
+     &  flux,fluxsum)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iside
+      double precision
+     &  flux(ilo0-flxgc0:ihi0+1+flxgc0,
+     &          ilo1-flxgc1:ihi1+flxgc1,
+     &          ilo2-flxgc2:ihi2+flxgc2),
+     &  fluxsum(ilo1:ihi1,
+     &          ilo2:ihi2)
+      integer ic0,ic1,ic2
+c
+c***********************************************************************
+c
+      if (iside.eq.0) then
+        ic0 = ilo0
+      else
+        ic0 = ihi0+1
+      endif 
+ 
+      do ic2=ilo2,ihi2
+         do ic1=ilo1,ihi1
+            fluxsum(ic1,ic2)=fluxsum(ic1,ic2)+flux(ic0,ic1,ic2)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine upfluxsumside3d1(
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iside,
+     &  flux,fluxsum)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iside
+      double precision
+     &  flux(ilo0-flxgc0:ihi0+flxgc0,
+     &          ilo1-flxgc1:ihi1+1+flxgc1,
+     &          ilo2-flxgc2:ihi2+flxgc2),
+     &  fluxsum(ilo0:ihi0,
+     &          ilo2:ihi2)
+      integer ic1,ic0,ic2
+c
+c***********************************************************************
+c
+      if (iside.eq.0) then
+        ic1 = ilo1
+      else
+        ic1 = ihi1+1
+      endif 
+ 
+      do ic2=ilo2,ihi2
+         do ic0=ilo0,ihi0
+            fluxsum(ic0,ic2)=fluxsum(ic0,ic2)+flux(ic0,ic1,ic2)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine upfluxsumside3d2(
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iside,
+     &  flux,fluxsum)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iside
+      double precision
+     &  flux(ilo0-flxgc0:ihi0+flxgc0,
+     &          ilo1-flxgc1:ihi1+flxgc1,
+     &          ilo2-flxgc2:ihi2+1+flxgc2),
+     &  fluxsum(ilo0:ihi0,
+     &          ilo1:ihi1)
+      integer ic2,ic0,ic1
+c
+c***********************************************************************
+c
+      if (iside.eq.0) then
+        ic2 = ilo2
+      else
+        ic2 = ihi2+1
+      endif 
+ 
+      do ic1=ilo1,ihi1
+         do ic0=ilo0,ihi0
+            fluxsum(ic0,ic1)=fluxsum(ic0,ic1)+flux(ic0,ic1,ic2)
+         enddo
+      enddo
+c
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/algs/fortran/algs_upfluxsum3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/algs/fortran/algs_upfluxsum3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,99 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/algs/fortran/algs_upfluxsum3d.m4 $
+c  Package:     SAMRAI algorithms
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: F77 routines for updating 3d flux sums from fluxes.
+c
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+c
+c***********************************************************************
+c Add flux integrals to fluxsums
+c***********************************************************************
+c
+define(upfluxsumface_case_3d,`dnl
+      subroutine upfluxsumface3d$1(
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iface,
+     &  flux,fluxsum)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iface
+      REAL
+     &  flux(FACE3d$1VECG(ilo,ihi,flxgc)),
+     &  fluxsum(OUTERFACE3d$1(ilo,ihi,0))
+      integer ie$1,ic$2,ic$3
+c
+c***********************************************************************
+c
+      if (iface.eq.0) then
+        ie$1 = ilo$1
+      else
+        ie$1 = ihi$1+1
+      endif 
+ 
+      do ic$3=ilo$3,ihi$3
+         do ic$2=ilo$2,ihi$2
+            fluxsum(ic$2,ic$3)=fluxsum(ic$2,ic$3)+flux(ie$1,ic$2,ic$3)
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+c
+define(upfluxsumside_case_3d,`dnl
+      subroutine upfluxsumside3d$1(
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iside,
+     &  flux,fluxsum)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iside
+      REAL
+     &  flux(SIDE3d$1VECG(ilo,ihi,flxgc)),
+     &  fluxsum(OUTERSIDE3d$1(ilo,ihi,0))
+      integer ic$1,ic$2,ic$3
+c
+c***********************************************************************
+c
+      if (iside.eq.0) then
+        ic$1 = ilo$1
+      else
+        ic$1 = ihi$1+1
+      endif 
+ 
+      do ic$3=ilo$3,ihi$3
+         do ic$2=ilo$2,ihi$2
+            fluxsum(ic$2,ic$3)=fluxsum(ic$2,ic$3)+flux(ic0,ic1,ic2)
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+upfluxsumface_case_3d(0,1,2)dnl
+c
+upfluxsumface_case_3d(1,2,0)dnl
+c
+upfluxsumface_case_3d(2,0,1)dnl
+c
+upfluxsumside_case_3d(0,1,2)dnl
+c
+upfluxsumside_case_3d(1,0,2)dnl
+c
+upfluxsumside_case_3d(2,0,1)dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/BoundaryNode.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/BoundaryNode.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,669 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Boundary node struct for embedded boundary implementations. 
+ *
+ ************************************************************************/
+
+#ifndef included_appu_BoundaryNode_C
+#define included_appu_BoundaryNode_C
+
+#include "SAMRAI/appu/BoundaryNode.h"
+
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/appu/EmbeddedBoundaryDefines.h"
+#include "SAMRAI/tbox/IOStream.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#define BOUNDARYNODE_VERSION 1
+#define BOUNDARYNODE_LOC_UNDEFINED -99999
+
+namespace SAMRAI {
+namespace appu {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialization for static data members.                               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double BoundaryNode::s_on_boundary_threshold = 1.e-6;
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Static function to set static data members.                           *
+ *                                                                       *
+ *************************************************************************
+ */
+void
+BoundaryNode::setOnBoundaryThreshold(
+   const double th)
+{
+   s_on_boundary_threshold = th;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default Constructor                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+BoundaryNode::BoundaryNode(
+   const tbox::Dimension& dim):
+   d_index(dim)
+{
+   hier::Index dummy(dim, BOUNDARYNODE_LOC_UNDEFINED);
+   hier::IntVector loc(dim, 0);
+   d_index = pdat::NodeIndex(dummy, loc);
+   initializeBoundaryNodeData();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Construct a boundary cell, given the cell index.
+ *                                                                       *
+ *************************************************************************
+ */
+
+BoundaryNode::BoundaryNode(
+   const pdat::NodeIndex& in):
+   d_index(in)
+{
+   initializeBoundaryNodeData();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Copy Constructor                                                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+BoundaryNode::BoundaryNode(
+   const appu::BoundaryNode& bdry_node):
+   d_index(bdry_node.d_index)
+{
+   copyBoundaryNodeData(bdry_node);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Assignment operator                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+BoundaryNode& BoundaryNode::operator = (
+   const appu::BoundaryNode& bdry_node)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_index, bdry_node.d_index);
+
+   d_index = bdry_node.d_index;
+   copyBoundaryNodeData(bdry_node);
+   return *this;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destructor
+ *                                                                       *
+ *************************************************************************
+ */
+
+BoundaryNode::~BoundaryNode()
+{
+}
+
+/*
+ *************************************************************************
+ *
+ *  Return cell index
+ *                                                                       *
+ *************************************************************************
+ */
+pdat::NodeIndex
+BoundaryNode::getIndex() const
+{
+   return d_index;
+}
+
+/*
+ *************************************************************************
+ *
+ *  Return whether the node is on the physical boundary of the shape.
+ *                                                                       *
+ *************************************************************************
+ */
+bool
+BoundaryNode::getNodeOnBoundary() const
+{
+   return d_on_boundary;
+}
+
+/*
+ *************************************************************************
+ *
+ *  Return number of nearest neighbors
+ *                                                                       *
+ *************************************************************************
+ */
+int
+BoundaryNode::getNumberOfNearestNeighborNodes() const
+{
+   return d_num_nearest_neighbors;
+}
+
+/*
+ *************************************************************************
+ *
+ *  Return number of nearest neighbors
+ *                                                                       *
+ *************************************************************************
+ */
+int
+BoundaryNode::getNumberOfOutsideNeighborNodes() const
+{
+   return d_num_outside_neighbors;
+}
+
+/*
+ *************************************************************************
+ *
+ *  Return array of nearest neighbors
+ *                                                                       *
+ *************************************************************************
+ */
+tbox::Array<pdat::NodeIndex>
+BoundaryNode::getNearestNeighborNodes() const
+{
+   return d_nearest_neighbors;
+}
+
+/*
+ *************************************************************************
+ *
+ *  Return particular nearest neighbor
+ *                                                                       *
+ *************************************************************************
+ */
+pdat::NodeIndex
+BoundaryNode::getNearestNeighborNode(
+   const int i) const
+{
+   TBOX_ASSERT(i < d_num_nearest_neighbors);
+
+   return d_nearest_neighbors[i];
+}
+
+/*
+ *************************************************************************
+ *
+ *  Return location of closest boundary point
+ *                                                                       *
+ *************************************************************************
+ */
+const double *
+BoundaryNode::getClosestBoundaryPoint() const
+{
+   return d_closest_boundary_point;
+}
+
+double
+BoundaryNode::getClosestBoundaryPoint(
+   const int i) const
+{
+   TBOX_ASSERT(i < d_index.getDim().getValue());
+
+   return d_closest_boundary_point[i];
+}
+
+/*
+ *************************************************************************
+ *
+ *  Return the distance & normal vector to the embedded boundary
+ *                                                                       *
+ *************************************************************************
+ */
+
+double
+BoundaryNode::getDistanceToBoundary() const
+{
+   if (d_distance_to_boundary < 0.) {
+      TBOX_ERROR("BoundaryNode::getDistanceToBoundary()"
+         << "\nYou must first set the distance before accessing it."
+         << "\nCall 'setDistanceToBoundary(patch)'." << std::endl);
+   }
+   return d_distance_to_boundary;
+}
+
+const double *
+BoundaryNode::getNormalToBoundary() const
+{
+   if (d_distance_to_boundary < 0.) {
+      TBOX_ERROR("BoundaryNode::getNormalToBoundary()"
+         << "\nYou must first set the normal before accessing it."
+         << "\nCall 'setNormalToBoundary(patch)'." << std::endl);
+   }
+   return d_normal_to_boundary;
+}
+
+double
+BoundaryNode::getNormalToBoundary(
+   const int i) const
+{
+   if (d_distance_to_boundary < 0.) {
+      TBOX_ERROR("BoundaryNode::getNormalToBoundary()"
+         << "\nYou must first set the normal before accessing it."
+         << "\nEither call 'setNormalToBoundary(patch)' or"
+         << "\nuse the method 'getNormalToBoundary(patch)'."
+         << std::endl);
+   }
+   return d_normal_to_boundary[i];
+}
+
+/*
+ *************************************************************************
+ *
+ * Set whether the node is on the embedded boundary.
+ *                                                                       *
+ *************************************************************************
+ */
+void
+BoundaryNode::setNodeOnBoundary()
+{
+   d_on_boundary = true;
+}
+
+/*
+ *************************************************************************
+ *
+ *  Compute the number of outside neighbors to the boundary node.
+ *                                                                       *
+ *************************************************************************
+ */
+void
+BoundaryNode::setNumOutsideNeighborNodes(
+   tbox::Pointer<pdat::NodeData<int> >& node_flag,
+   hier::Index& cut_cell_index)
+{
+   NULL_USE(cut_cell_index);
+
+   TBOX_DIM_ASSERT_CHECK_ARGS3(d_index, *node_flag, cut_cell_index);
+
+   const tbox::Dimension dim(d_index.getDim());
+
+   /*
+    * Form a 2-cell box with the boundary node at the center.  Look for
+    * neighboring nodes that are OUTSIDE.
+    */
+   hier::Index lo(dim);
+   hier::Index hi(dim);
+   for (int i = 0; i < dim.getValue(); i++) {
+      lo(i) = d_index(i) - 1;
+      hi(i) = d_index(i);
+   }
+   hier::Box two_cell_bn_box(lo, hi);
+
+   d_num_outside_neighbors = 0;
+   for (pdat::NodeIterator on(two_cell_bn_box);
+        on; on++) {
+      pdat::NodeIndex outside_node = on();
+      if ((*node_flag)(outside_node) == EmbeddedBoundaryDefines::OUTSIDE) {
+         d_num_outside_neighbors++;
+      }
+      if (d_num_outside_neighbors >= dim.getValue() * 4) {
+         TBOX_ERROR("BoundaryNode::calculateBoundaryNodeInfo()"
+            << "\nMore than 2*DIM outside neighbors were found!"
+            << std::endl);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ *  Set nearest neighbor node
+ *                                                                       *
+ *************************************************************************
+ */
+void
+BoundaryNode::setNearestNeighborNode(
+   pdat::NodeIndex& index)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_index, index);
+
+   /*
+    * We assume the number of nearest neighbor nodes is DIM, but allow
+    * for there to be more.  Reset the size of the array accordingly.
+    */
+   if (d_num_nearest_neighbors < index.getDim().getValue()) {
+      d_nearest_neighbors[d_num_nearest_neighbors] = index;
+      d_num_nearest_neighbors++;
+   } else {
+      TBOX_ERROR("BoundaryNode: There have already been "
+         << d_num_nearest_neighbors
+         << "\nregistered with boundary node: "
+         << d_index << std::endl);
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ *  Compute the set of nearest neighbor nodes, given the patch and
+ *  flag array index.
+ *                                                                       *
+ *************************************************************************
+ */
+void
+BoundaryNode::setNearestNeighborNodes(
+   tbox::Pointer<pdat::NodeData<int> >& node_flag,
+   hier::Index& cut_cell_index)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(d_index, *node_flag, cut_cell_index);
+
+   const tbox::Dimension dim(d_index.getDim());
+
+   int n;
+
+   if (d_num_outside_neighbors < 0) {
+      setNumOutsideNeighborNodes(node_flag,
+         cut_cell_index);
+   }
+
+   /*
+    * There should be at least DIM outside neighbors.  If not, we have
+    * some sort of convex shaped boundary.
+    */
+   if (d_num_outside_neighbors < dim.getValue()) {
+      TBOX_ERROR("BoundaryNode::setNearestNeighborNodes()"
+         << "\nLess than DIM outside neighbors were found."
+         << "\nCannot compute nearest neighbor nodes with fewer"
+         << "\nthan DIM outside neighbors." << std::endl);
+   }
+
+   /*
+    * Form a 2-cell box with the boundary node at the center.  Look for
+    * neighboring nodes that are OUTSIDE.
+    */
+   hier::Index lo(dim);
+   hier::Index hi(dim);
+   for (int i = 0; i < dim.getValue(); i++) {
+      lo(i) = d_index(i) - 1;
+      hi(i) = d_index(i);
+   }
+   hier::Box two_cell_bn_box(lo, hi);
+
+   /*
+    * Compute outside neighbors array.
+    */
+   tbox::Array<pdat::NodeIndex> outside_neighbors(dim.getValue() * 4, pdat::NodeIndex(dim));
+   int num_outside_neighbors = 0;
+   for (pdat::NodeIterator on(two_cell_bn_box);
+        on; on++) {
+      pdat::NodeIndex outside_node = on();
+      if ((*node_flag)(outside_node) == EmbeddedBoundaryDefines::OUTSIDE) {
+         outside_neighbors[num_outside_neighbors] = outside_node;
+         num_outside_neighbors++;
+      }
+      if (num_outside_neighbors >= dim.getValue() * 4) {
+         TBOX_ERROR("BoundaryNode::setNearestNeighborNodes()"
+            << "\nMore than 2*DIM outside neighbors were found!"
+            << std::endl);
+      }
+   }
+
+   if (num_outside_neighbors != d_num_outside_neighbors) {
+      TBOX_ERROR("BoundaryNode::setNearestNeighborNodes()"
+         << "\nThe number of outside neighbors computed does not"
+         << "\ncorrespond with d_num_outside_neighbors.  There"
+         << "\nis a bug." << std::endl);
+   }
+
+   /*
+    * From the array of outside neighbors, determine the DIM
+    * outside neighbors that are nearest to bn.  If there are
+    * only DIM outside neighbors found, just use those.  Otherwise,
+    * find those closest to bn.
+    */
+   d_num_nearest_neighbors = 0;
+   if (d_num_outside_neighbors == dim.getValue()) {
+      for (int i = 0; i < dim.getValue(); i++) {
+         pdat::NodeIndex neighbor = outside_neighbors[i];
+         setNearestNeighborNode(neighbor);
+      }
+   } else {
+      double dist = 0.;
+      // find distance == 1 cases
+      for (n = 0; n < num_outside_neighbors; n++) {
+         dist = 0.;
+         hier::Index diff_index(dim, 0);
+         for (int i = 0; i < dim.getValue(); i++) {
+            diff_index(i) = d_index(i) - outside_neighbors[n](i);
+            dist += (double)diff_index(i) * (double)diff_index(i);
+         }
+         if (tbox::MathUtilities<double>::equalEps(dist, 1.0)) {
+            setNearestNeighborNode(outside_neighbors[n]);
+         }
+         if (d_num_nearest_neighbors == dim.getValue())
+            break;
+      }
+
+      if (d_num_nearest_neighbors < dim.getValue()) {
+         // if they are greater than distance == 1, it doesn't
+         // matter which one we pick.
+         for (n = 0; n < num_outside_neighbors; n++) {
+            dist = 0.;
+            hier::Index diff_index(dim, 0);
+            for (int i = 0; i < dim.getValue(); i++) {
+               diff_index(i) = d_index(i)
+                  - outside_neighbors[n](i);
+               dist += (double)diff_index(i) * (double)diff_index(i);
+            }
+            if (dist > 1.0) {
+               setNearestNeighborNode(outside_neighbors[n]);
+            }
+            if (d_num_nearest_neighbors == dim.getValue()) break;
+         }
+      }
+
+      if (d_num_nearest_neighbors < dim.getValue()) {
+         TBOX_ERROR("BoundaryNode::setNearestNeighborNodes()"
+            << "\nDid not find DIM nearest neighbors!"
+            << std::endl);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ *  Set location of closest boundary point
+ *                                                                       *
+ *************************************************************************
+ */
+void
+BoundaryNode::setClosestBoundaryPoint(
+   const double* location)
+{
+   for (int i = 0; i < d_index.getDim().getValue(); i++) {
+      d_closest_boundary_point[i] = location[i];
+   }
+}
+
+void
+BoundaryNode::setClosestBoundaryPoint(
+   const double location,
+   const int i)
+{
+   TBOX_ASSERT(i < d_index.getDim().getValue());
+
+   d_closest_boundary_point[i] = location;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set distance and normal to boundary.
+ *                                                                       *
+ *************************************************************************
+ */
+void
+BoundaryNode::setDistanceToBoundary(
+   tbox::Pointer<hier::Patch>& patch)
+{
+   TBOX_ASSERT(!patch.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_index, *patch);
+
+   if (d_distance_to_boundary < 0.) {
+      const tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+         patch->getPatchGeometry();
+      const double* dx = pgeom->getDx();
+      const double* xlo = pgeom->getXLower();
+      const hier::Index ifirst = patch->getBox().lower();
+
+      double node_loc[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      double offset;
+      double dist = 0.;
+      double distsq = 0.;
+
+      for (int i = 0; i < d_index.getDim().getValue(); i++) {
+         offset = (double)(d_index(i) - ifirst(i));
+         node_loc[i] = xlo[i] + offset * dx[i];
+         dist = node_loc[i] - d_closest_boundary_point[i];
+         distsq += dist * dist;
+      }
+
+      d_distance_to_boundary = sqrt(distsq);
+
+      if (d_distance_to_boundary < s_on_boundary_threshold) {
+         d_on_boundary = true;
+      }
+   }
+}
+
+void
+BoundaryNode::setDistanceToBoundary(
+   const double dist)
+{
+   d_distance_to_boundary = dist;
+}
+
+void
+BoundaryNode::setNormalToBoundary(
+   tbox::Pointer<hier::Patch>& patch)
+{
+   TBOX_ASSERT(!patch.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_index, *patch);
+
+   if (d_distance_to_boundary < 0.) {
+      setDistanceToBoundary(patch);
+   }
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+      patch->getPatchGeometry();
+   const double* dx = pgeom->getDx();
+   const double* xlo = pgeom->getXLower();
+   const hier::Index ifirst = patch->getBox().lower();
+
+   double node_loc[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   double offset;
+   double xdist;
+
+   for (int i = 0; i < d_index.getDim().getValue(); i++) {
+      offset = (double)(d_index(i) - ifirst(i));
+      node_loc[i] = xlo[i] + offset * dx[i];
+      xdist = d_closest_boundary_point[i] - node_loc[i];
+      d_normal_to_boundary[i] = xdist / d_distance_to_boundary;
+   }
+}
+
+void
+BoundaryNode::setNormalToBoundary(
+   const double* normal)
+{
+   for (int i = 0; i < d_index.getDim().getValue(); i++) {
+      d_normal_to_boundary[i] = normal[i];
+   }
+}
+
+void
+BoundaryNode::setNormalToBoundary(
+   const double normal,
+   const int i)
+{
+   d_normal_to_boundary[i] = normal;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialize data in a new boundary node
+ *                                                                       *
+ *************************************************************************
+ */
+void
+BoundaryNode::initializeBoundaryNodeData()
+{
+   const tbox::Dimension& dim(d_index.getDim());
+
+   d_num_nearest_neighbors = -1;
+   d_num_outside_neighbors = -1;
+   d_nearest_neighbors.resizeArray(dim.getValue(), pdat::NodeIndex(dim));
+   for (int i = 0; i < dim.getValue(); i++) {
+      d_closest_boundary_point[i] = BOUNDARYNODE_LOC_UNDEFINED;
+      d_normal_to_boundary[i] = BOUNDARYNODE_LOC_UNDEFINED;
+   }
+   d_distance_to_boundary = BOUNDARYNODE_LOC_UNDEFINED;
+   d_on_boundary = false;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Copy data from supplied boundary node                                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+BoundaryNode::copyBoundaryNodeData(
+   const appu::BoundaryNode& bdry_node)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_index, bdry_node.d_index);
+
+   const tbox::Dimension dim(d_index.getDim());
+
+   d_on_boundary = bdry_node.d_on_boundary;
+   d_num_nearest_neighbors = bdry_node.d_num_nearest_neighbors;
+   d_num_outside_neighbors = bdry_node.d_num_outside_neighbors;
+   d_nearest_neighbors.resizeArray(d_num_nearest_neighbors, pdat::NodeIndex(dim));
+
+   int i;
+   for (i = 0; i < d_num_nearest_neighbors; i++) {
+      d_nearest_neighbors[i] = bdry_node.d_nearest_neighbors[i];
+   }
+   for (i = 0; i < dim.getValue(); i++) {
+      d_closest_boundary_point[i] = bdry_node.d_closest_boundary_point[i];
+      d_normal_to_boundary[i] = bdry_node.d_normal_to_boundary[i];
+   }
+   d_distance_to_boundary = bdry_node.d_distance_to_boundary;
+
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/BoundaryNode.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/BoundaryNode.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,281 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Boundary node class for embedded boundary implementations 
+ *
+ ************************************************************************/
+
+#ifndef included_appu_BoundaryNode
+#define included_appu_BoundaryNode
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/NodeIndex.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/IOStream.h"
+
+namespace SAMRAI {
+namespace appu {
+
+/*!
+ * @brief The BoundaryNode struct holds data and methods to define a boundary
+ * node (i.e. the first node inside the boundary) on an irregular boundary.
+ * An array of boundary nodes is maintained by each "CutCell" object,
+ * if the appropriate functions are called to enable boundary node storage.
+ * For more information, see the CutCell class documentation.
+ *
+ * Information maintained by the struct includes the following:
+ *
+ *     - INDEX                 - node index (i,j,k) of the boundary node
+ *     - NEAREST_NBR[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]      - indices (i,j,k) of the nearest neighbor
+ *                             nodes that are OUTSIDE the boundary.
+ *
+ * @see appu::CutCell
+ */
+
+class BoundaryNode
+{
+public:
+   /*!
+    * Set threshold for determining whether a node is on the boundary
+    * (if not set, the default is 1.e-6).
+    */
+   static void
+   setOnBoundaryThreshold(
+      const double th);
+
+   /*!
+    * Create a new ``empty'' BoundaryNode.
+    */
+   BoundaryNode(
+      const tbox::Dimension& dim);
+
+   /*!
+    * Create a new cut cell with specified node index.
+    */
+   BoundaryNode(
+      const pdat::NodeIndex& in);
+
+   /*!
+    * The copy constructor copies the data of the argument cell.
+    */
+   BoundaryNode(
+      const appu::BoundaryNode& bdry_node);
+
+   /*!
+    * The assignment operator copies the data of the argument cell.
+    */
+   BoundaryNode&
+   operator = (
+      const appu::BoundaryNode& bdry_node);
+
+   /*!
+    * The destructor for BoundaryNode.
+    */
+   ~BoundaryNode();
+
+   /*!
+    * Returns the index (i,j,k) of the node.
+    */
+   pdat::NodeIndex
+   getIndex() const;
+
+   /*!
+    * Returns whether the boundary node is on the embedded boundary.
+    */
+   bool
+   getNodeOnBoundary() const;
+
+   /*!
+    * Return the number of nearest neighbor nodes.
+    */
+   int
+   getNumberOfNearestNeighborNodes() const;
+
+   /*!
+    * Return the number of outside neighbor nodes.
+    */
+   int
+   getNumberOfOutsideNeighborNodes() const;
+
+   /*!
+    * Returns the array of nearest neighbor nodes.
+    */
+   tbox::Array<pdat::NodeIndex>
+   getNearestNeighborNodes() const;
+
+   /*!
+    * Returns the designated neighbor node.
+    */
+   pdat::NodeIndex
+   getNearestNeighborNode(
+      const int i) const;
+
+   /*!
+    * Returns the location of the closest point on the boundary to
+    * the node.
+    */
+   const double *
+   getClosestBoundaryPoint() const;
+
+   /*!
+    * Returns the ith element of the location of the closest point on
+    * the boundary to the node.
+    */
+   double
+   getClosestBoundaryPoint(
+      const int i) const;
+
+   /*!
+    * Returns the distance to the embedded boundary.
+    */
+   double
+   getDistanceToBoundary() const;
+
+   /*!
+    * Returns the normal vector to the boundary.
+    */
+   const double *
+   getNormalToBoundary() const;
+
+   /*!
+    * Returns the ith component of the normal vector to the boundary.
+    */
+   double
+   getNormalToBoundary(
+      const int i) const;
+
+   /*!
+    * Returns whether the boundary node is on the embedded boundary.
+    */
+   void
+   setNodeOnBoundary();
+
+   /*!
+    * Set the number of outside neighbor nodes for the boundary node.
+    */
+   void
+   setNumOutsideNeighborNodes(
+      tbox::Pointer<pdat::NodeData<int> >& node_flag,
+      hier::Index& cut_cell_index);
+
+   /*!
+    * Sets the nearest neighbor node.
+    */
+   void
+   setNearestNeighborNode(
+      pdat::NodeIndex& index);
+
+   /*!
+    * Set the nearest neighbor nodes for the boundary node.
+    */
+   void
+   setNearestNeighborNodes(
+      tbox::Pointer<pdat::NodeData<int> >& node_flag,
+      hier::Index& cut_cell_index);
+
+   /*!
+    * Sets the location of the closest point on the b oundary to the node.
+    */
+   void
+   setClosestBoundaryPoint(
+      const double* location);
+
+   /*!
+    * Sets the ith element of the location of the closest point on the
+    * boundary to the node.
+    */
+   void
+   setClosestBoundaryPoint(
+      const double location,
+      const int i);
+
+   /*!
+    * Sets the distance to the embedded boundary. If the patch
+    * is provided as an argument, and the distance will be computed.
+    * Otherwise, it will be set to the supplied value.
+    */
+   void
+   setDistanceToBoundary(
+      tbox::Pointer<hier::Patch>& patch);
+
+   void
+   setDistanceToBoundary(
+      const double dist);
+
+   /*!
+    * Sets the normal vector to the embedded boundary. If the patch
+    * is provided as an argument, and the normal will be computed.
+    * Otherwise, it will be set to the supplied value.
+    */
+   void
+   setNormalToBoundary(
+      tbox::Pointer<hier::Patch>& patch);
+
+   void
+   setNormalToBoundary(
+      const double* normal);
+
+   void
+   setNormalToBoundary(
+      const double normal,
+      const int i);
+
+private:
+   /*
+    * Initialize data in a new boundary node.
+    */
+   void
+   initializeBoundaryNodeData();
+
+   /*
+    * Copy data from supplied boundary node.
+    */
+   void
+   copyBoundaryNodeData(
+      const appu::BoundaryNode& bdry_node);
+
+   /*
+    * Threshold used to determine whether a node is on the boundary
+    */
+   static double s_on_boundary_threshold;
+
+   /*
+    * Index of BoundaryNode
+    */
+   pdat::NodeIndex d_index;
+
+   /*
+    * Number of nearest and outside neighbor nodes
+    */
+   int d_num_nearest_neighbors;
+   int d_num_outside_neighbors;
+
+   /*
+    * Array of nearest neighbor nodes.
+    */
+   tbox::Array<pdat::NodeIndex> d_nearest_neighbors;
+
+   /*
+    * Location of closest boundary point, along with distance
+    * and normal.
+    */
+   double d_closest_boundary_point[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   double d_distance_to_boundary;
+   double d_normal_to_boundary[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   /*
+    * Boolean specifying whether the boundary node is actually ON the
+    * embedded_boundary.
+    */
+   bool d_on_boundary;
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/BoundaryUtilityStrategy.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/BoundaryUtilityStrategy.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,26 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface for processing user-defined boundary data in
+ *                CartesianBoundaryUtilities classes 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/appu/BoundaryUtilityStrategy.h"
+
+namespace SAMRAI {
+namespace appu {
+
+BoundaryUtilityStrategy::BoundaryUtilityStrategy()
+{
+}
+
+BoundaryUtilityStrategy::~BoundaryUtilityStrategy()
+{
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/BoundaryUtilityStrategy.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/BoundaryUtilityStrategy.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,106 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface for processing user-defined boundary data in
+ *                CartesianBoundaryUtilities classes 
+ *
+ ************************************************************************/
+
+#ifndef included_appu_BoundaryUtilityStrategy
+#define included_appu_BoundaryUtilityStrategy
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace appu {
+
+/*!
+ * @brief Class BoundaryUtilityStrategy is an abstract base
+ * class that declares an interface that allows application code to
+ * read problem-specific boundary data when using the SAMRAI boundary
+ * utilities.  Currently, there are two virtual member functions defined.
+ * One allows users to read problem-specific DIRICHLET boundary values
+ * from an input database; the other does the same for NEUMANN boundary
+ * values.  More virtual functions may be added in the future
+ * as additional boundary conditions are supported.
+ *
+ * See the include file BoundaryDefines.h for integer constant
+ * definitions that apply for the various boundary types, locations,
+ * and boundary conditions.
+ *
+ * @see appu::CartesianBoundaryUtilities2
+ * @see appu::CartesianBoundaryUtilities3
+ */
+
+class BoundaryUtilityStrategy
+{
+public:
+   /*!
+    * The default constructor for BoundaryUtilityStrategy does nothing
+    * interesting.
+    */
+   BoundaryUtilityStrategy();
+
+   /*!
+    * The destructor for BoundaryUtilityStrategy does nothing
+    * interesting.
+    */
+   virtual ~BoundaryUtilityStrategy();
+
+   /*!
+    * Read DIRICHLET boundary state values for an edge (in 2d) or a face
+    * (in 3d) from a given database.  This virtual function is given a
+    * blank implementation here to avoid the need for users to do the same
+    * if they do not need this functionality.
+    *
+    * @param db      Input database from which to read boundary values.
+    * @param db_name Name of input database (e.g., for error reporting).
+    * @param bdry_location_index Integer index for location of edge (in 2d)
+    *                            or face (in 3d) boundary.
+    */
+   virtual void readDirichletBoundaryDataEntry(
+      tbox::Pointer<tbox::Database> db,
+      std::string& db_name,
+      int bdry_location_index)
+   {
+      NULL_USE(db);
+      NULL_USE(db_name);
+      NULL_USE(bdry_location_index);
+   }
+
+   /*!
+    * Read NEUMANN boundary state values for an edge (in 2d) or a face
+    * (in 3d) from a given database.  This virtual function is given a
+    * blank implementation here to avoid the need for users to do the same
+    * if they do not need this functionality.
+    *
+    * @param db      Input database from which to read boundary values.
+    * @param db_name Name of input database (e.g., for error reporting).
+    * @param bdry_location_index Integer index for location of edge (in 2d)
+    *                            or face (in 3d) boundary.
+    */
+   virtual void readNeumannBoundaryDataEntry(
+      tbox::Pointer<tbox::Database> db,
+      std::string& db_name,
+      int bdry_location_index)
+   {
+      NULL_USE(db);
+      NULL_USE(db_name);
+      NULL_USE(bdry_location_index);
+   }
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/CartesianBoundaryDefines.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/CartesianBoundaryDefines.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,154 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Defines for boundary condition integer constants 
+ *
+ ************************************************************************/
+
+#ifndef included_appu_CartesianBoundaryDefines
+#define included_appu_CartesianBoundaryDefines
+
+/*
+ * Definitions for boundary types in 1d, 2d, and 3d:
+ */
+
+//@{
+//! @name Definitions for boundary types in 1d, 2d, and 3d:
+#define FACE3D_BDRY_TYPE (1)
+#define EDGE3D_BDRY_TYPE (2)
+#define NODE3D_BDRY_TYPE (3)
+
+#define EDGE2D_BDRY_TYPE (1)
+#define NODE2D_BDRY_TYPE (2)
+
+#define NODE1D_BDRY_TYPE (1)
+//@}
+
+/*
+ * Definitions for boundary array sizes in 1d, 2d, or 3d:
+ */
+
+//@{
+//! @name Definitions for boundary array sizes in 1d, 2d, or 3d:
+#define NUM_1D_NODES (2)
+
+#define NUM_2D_EDGES (4)
+#define NUM_2D_NODES (4)
+
+#define NUM_3D_FACES (6)
+#define NUM_3D_EDGES (12)
+#define NUM_3D_NODES (8)
+//@}
+
+/*
+ * Definitions for Face, Edge, and Node boundary locations:
+ *
+ * Note that these definitions are used only for:
+ * - Node boundary locations in 1d (XLO, XHI only), or
+ * - Edge boundary locations in 2d (XLO, XHI, YLO, YHI only), or
+ * - Face boundary locations in 3d.
+ */
+
+//@{
+//! @name Definitions for Face, Edge, and Node boundary locations (see source code for more information):
+#define XLO (0)
+#define XHI (1)
+#define YLO (2)
+#define YHI (3)
+#define ZLO (4)
+#define ZHI (5)
+//@}
+
+/*
+ * Definitions for Node boundary locations in 2d:
+ */
+
+//@{
+//! @name Definitions for Node boundary locations in 2d:
+#define XLO_YLO_2D (0)
+#define XHI_YLO_2D (1)
+#define XLO_YHI_2D (2)
+#define XHI_YHI_2D (3)
+//@}
+
+/*
+ * Definitions for Edge boundary locations in 3d:
+ */
+
+//@{
+//! @name Definitions for Edge boundary locations in 3d:
+#define XLO_YLO_3D (0)
+#define XHI_YLO_3D (1)
+#define XLO_YHI_3D (2)
+#define XHI_YHI_3D (3)
+#define XLO_ZLO_3D (4)
+#define XHI_ZLO_3D (5)
+#define XLO_ZHI_3D (6)
+#define XHI_ZHI_3D (7)
+#define YLO_ZLO_3D (8)
+#define YHI_ZLO_3D (9)
+#define YLO_ZHI_3D (10)
+#define YHI_ZHI_3D (11)
+//@}
+
+/*
+ * Definitions for Node boundary locations in 3d:
+ */
+
+//@{
+//! @name Definitions for Node boundary locations in 3d:
+#define XLO_YLO_ZLO (0)
+#define XHI_YLO_ZLO (1)
+#define XLO_YHI_ZLO (2)
+#define XHI_YHI_ZLO (3)
+#define XLO_YLO_ZHI (4)
+#define XHI_YLO_ZHI (5)
+#define XLO_YHI_ZHI (6)
+#define XHI_YHI_ZHI (7)
+//@}
+
+/*
+ * Definitions for Face, Edge, and Node boundary conditions:
+ *
+ * Note that these definitions are used only for:
+ * - Node boundary conditions in 1d, or
+ * - Edge boundary conditions in 2d, or
+ * - Face boundary conditions in 3d.
+ */
+
+//@{
+//! @name Definitions for Face, Edge, and Node boundary conditions (see source code for more information):
+#define FLOW_BC (90)
+#define REFLECT_BC (91)
+#define DIRICHLET_BC (92)
+#define NEUMANN_BC (93)
+//@}
+
+/*
+ * Definitions for Edge and Node boundary conditions:
+ *
+ * Note that the following definitions are used only for:
+ * - Node boundary conditions in 2d (X and Y cases only), or
+ * - Edge and Node boundary conditions in 3d.
+ */
+
+//@{
+//! @name Definitions for Edge and Node boundary conditions (see source code for more information):
+#define XFLOW_BC (900)
+#define YFLOW_BC (901)
+#define ZFLOW_BC (902)
+#define XREFLECT_BC (910)
+#define YREFLECT_BC (911)
+#define ZREFLECT_BC (912)
+#define XDIRICHLET_BC (920)
+#define YDIRICHLET_BC (921)
+#define ZDIRICHLET_BC (922)
+#define XNEUMANN_BC (930)
+#define YNEUMANN_BC (931)
+#define ZNEUMANN_BC (932)
+//@}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/CartesianBoundaryUtilities2.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/CartesianBoundaryUtilities2.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,920 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility routines for manipulating 2D Cartesian boundary data 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/appu/CartesianBoundaryUtilities2.h"
+
+#include "SAMRAI/appu/CartesianBoundaryDefines.h"
+
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN 77 routines used in                 *
+ * boundary condition implementation.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+extern "C" {
+
+// Disable Intel warnings about extern declarations in C file
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+void F77_FUNC(stufcartbdryloc2d, STUFCARTBDRYLOC2D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &);
+
+void F77_FUNC(stufcartbdrycond2d, STUFCARTBDRYCOND2D) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &);
+
+void F77_FUNC(getcartedgebdry2d, GETCARTEDGEBDRY2D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double *,
+   const int &,
+   const int &,
+   const double *,
+   double *,
+   const int &);
+
+void F77_FUNC(getcartnodebdry2d, GETCARTNODEBDRY2D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double *,
+   const int &,
+   const int &,
+   const double *,
+   double *,
+   const int &);
+
+}
+
+namespace SAMRAI {
+namespace appu {
+
+bool CartesianBoundaryUtilities2::s_fortran_constants_stuffed = false;
+
+/*
+ * This function reads 2D boundary data from given input database.
+ * The integer boundary condition types are placed in the integer
+ * arrays supplied by the caller (typically, the concrete BoundaryStrategy
+ * provided).  When DIRICHLET or NEUMANN conditions are specified, control
+ * is passed to the BoundaryStrategy to read the boundary state data
+ * specific to the problem.
+ *
+ * Errors will be reported and the program will abort whenever necessary
+ * boundary condition information is missing in the input database, or
+ * when the data read in is either unknown or inconsistent.  The periodic
+ * domain information is used to determine which boundary edges or
+ * node entries are not required from input.  Error checking requires
+ * that node boundary conditions are consistent with those
+ * specified for the edges.
+ *
+ * Arguments are:
+ *    bdry_strategy .... object that reads DIRICHLET or NEUMANN data
+ *    bdry_db .......... input database containing all boundary data
+ *    edge_conds ....... array into which integer boundary conditions
+ *                       for edges are read
+ *    node_conds ....... array into which integer boundary conditions
+ *                       for nodes are read
+ *    periodic ......... integer vector specifying which coordinate
+ *                       directions are periodic (value returned from
+ *                       GridGeometry2::getPeriodicShift())
+ */
+
+void CartesianBoundaryUtilities2::readBoundaryInput(
+   BoundaryUtilityStrategy* bdry_strategy,
+   tbox::Pointer<tbox::Database> bdry_db,
+   tbox::Array<int>& edge_conds,
+   tbox::Array<int>& node_conds,
+   const hier::IntVector& periodic)
+
+{
+   TBOX_DIM_ASSERT(periodic.getDim() == tbox::Dimension(2));
+   TBOX_ASSERT(bdry_strategy != (BoundaryUtilityStrategy *)NULL);
+   TBOX_ASSERT(!bdry_db.isNull());
+   TBOX_ASSERT(edge_conds.getSize() == NUM_2D_EDGES);
+   TBOX_ASSERT(node_conds.getSize() == NUM_2D_NODES);
+
+   if (!s_fortran_constants_stuffed) {
+      stuff2dBdryFortConst();
+   }
+
+   read2dBdryEdges(bdry_strategy,
+      bdry_db,
+      edge_conds,
+      periodic);
+
+   read2dBdryNodes(bdry_db,
+      edge_conds,
+      node_conds,
+      periodic);
+
+}
+
+/*
+ * Function to fill edge boundary values.
+ *
+ * Arguments are:
+ *    varname .............. name of variable (for error reporting)
+ *    vardata .............. cell-centered patch data object to check
+ *    patch ................ patch on which data object lives
+ *    ghost_width_to_fill .. width of ghost region to fill
+ *    bdry_edge_conds ...... array of boundary conditions for patch edges
+ *    bdry_edge_values ..... array of boundary values for edges
+ *                           (this must be consistent with boundary
+ *                           condition types)
+ */
+
+void CartesianBoundaryUtilities2::fillEdgeBoundaryData(
+   const std::string& varname,
+   tbox::Pointer<pdat::CellData<double> >& vardata,
+   const hier::Patch& patch,
+   const hier::IntVector& ghost_fill_width,
+   const tbox::Array<int>& bdry_edge_conds,
+   const tbox::Array<double>& bdry_edge_values)
+{
+   TBOX_ASSERT(!varname.empty());
+   TBOX_ASSERT(!vardata.isNull());
+   TBOX_ASSERT(bdry_edge_conds.getSize() == NUM_2D_EDGES);
+   TBOX_ASSERT(bdry_edge_values.getSize() == NUM_2D_EDGES * (vardata->getDepth()));
+
+   TBOX_DIM_ASSERT(ghost_fill_width.getDim() == tbox::Dimension(2));
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*vardata, patch, ghost_fill_width);
+
+   NULL_USE(varname);
+
+   if (!s_fortran_constants_stuffed) {
+      stuff2dBdryFortConst();
+   }
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+      patch.getPatchGeometry();
+   const double* dx = pgeom->getDx();
+
+   const hier::Box& interior(patch.getBox());
+   const hier::Index& ifirst(interior.lower());
+   const hier::Index& ilast(interior.upper());
+
+   const hier::IntVector& ghost_cells(vardata->getGhostCellWidth());
+
+   hier::IntVector gcw_to_fill(hier::IntVector::min(ghost_cells,
+                                  ghost_fill_width));
+
+   const tbox::Array<hier::BoundaryBox>& edge_bdry =
+      pgeom->getCodimensionBoundaries(EDGE2D_BDRY_TYPE);
+   for (int i = 0; i < edge_bdry.getSize(); i++) {
+
+      TBOX_ASSERT(edge_bdry[i].getBoundaryType() == EDGE2D_BDRY_TYPE);
+
+      int bedge_loc = edge_bdry[i].getLocationIndex();
+
+      hier::Box fill_box(pgeom->getBoundaryFillBox(edge_bdry[i],
+                            interior,
+                            gcw_to_fill));
+      const hier::Index& ibeg(fill_box.lower());
+      const hier::Index& iend(fill_box.upper());
+
+      F77_FUNC(getcartedgebdry2d, GETCARTEDGEBDRY2D) (ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ibeg(0), iend(0),
+         ibeg(1), iend(1),
+         ghost_cells(0), ghost_cells(1),
+         dx,
+         bedge_loc,
+         bdry_edge_conds[bedge_loc],
+         bdry_edge_values.getPointer(),
+         vardata->getPointer(),
+         vardata->getDepth());
+
+   }
+
+}
+
+/*
+ * Function to fill node boundary values.
+ *
+ * Arguments are:
+ *    varname .............. name of variable (for error reporting)
+ *    vardata .............. cell-centered patch data object to check
+ *    patch ................ patch on which data object lives
+ *    ghost_width_to_fill .. width of ghost region to fill
+ *    bdry_node_conds ...... array of boundary conditions for patch nodes
+ *    bdry_edge_values ..... array of boundary values for edges
+ *                           (this must be consistent with boundary
+ *                           condition types)
+ */
+
+void CartesianBoundaryUtilities2::fillNodeBoundaryData(
+   const std::string& varname,
+   tbox::Pointer<pdat::CellData<double> >& vardata,
+   const hier::Patch& patch,
+   const hier::IntVector& ghost_fill_width,
+   const tbox::Array<int>& bdry_node_conds,
+   const tbox::Array<double>& bdry_edge_values)
+{
+   TBOX_ASSERT(!varname.empty());
+   TBOX_ASSERT(!vardata.isNull());
+   TBOX_ASSERT(bdry_node_conds.getSize() == NUM_2D_NODES);
+   TBOX_ASSERT(bdry_edge_values.getSize() == NUM_2D_EDGES * (vardata->getDepth()));
+
+   TBOX_DIM_ASSERT(ghost_fill_width.getDim() == tbox::Dimension(2));
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*vardata, patch, ghost_fill_width);
+
+   NULL_USE(varname);
+
+   if (!s_fortran_constants_stuffed) {
+      stuff2dBdryFortConst();
+   }
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+      patch.getPatchGeometry();
+   const double* dx = pgeom->getDx();
+
+   const hier::Box& interior(patch.getBox());
+   const hier::Index& ifirst(interior.lower());
+   const hier::Index& ilast(interior.upper());
+
+   const hier::IntVector& ghost_cells = vardata->getGhostCellWidth();
+
+   hier::IntVector gcw_to_fill = hier::IntVector::min(ghost_cells,
+         ghost_fill_width);
+
+   const tbox::Array<hier::BoundaryBox>& node_bdry =
+      pgeom->getCodimensionBoundaries(NODE2D_BDRY_TYPE);
+   for (int i = 0; i < node_bdry.getSize(); i++) {
+
+      TBOX_ASSERT(node_bdry[i].getBoundaryType() == NODE2D_BDRY_TYPE);
+
+      int bnode_loc = node_bdry[i].getLocationIndex();
+
+      hier::Box fill_box(pgeom->getBoundaryFillBox(node_bdry[i],
+                            interior,
+                            gcw_to_fill));
+      const hier::Index& ibeg(fill_box.lower());
+      const hier::Index& iend(fill_box.upper());
+
+      F77_FUNC(getcartnodebdry2d, GETCARTNODEBDRY2D) (ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ibeg(0), iend(0),
+         ibeg(1), iend(1),
+         ghost_cells(0), ghost_cells(1),
+         dx,
+         bnode_loc,
+         bdry_node_conds[bnode_loc],
+         bdry_edge_values.getPointer(),
+         vardata->getPointer(),
+         vardata->getDepth());
+
+   }
+
+}
+
+/*
+ * Function that returns the integer edge boundary location
+ * corresponding to the given node location and node boundary
+ * condition.
+ *
+ * If the node boundary condition type or node location are unknown,
+ * or the boundary condition type is inconsistant with the node location
+ * an error results.
+ */
+
+int CartesianBoundaryUtilities2::getEdgeLocationForNodeBdry(
+   int node_loc,
+   int node_btype)
+{
+
+   int ret_edge = -1;
+
+   switch (node_btype) {
+      case XFLOW_BC:
+      case XREFLECT_BC:
+      case XDIRICHLET_BC:
+      case XNEUMANN_BC:
+      {
+         if (node_loc == XLO_YLO_2D || node_loc == XLO_YHI_2D) {
+            ret_edge = XLO;
+         } else {
+            ret_edge = XHI;
+         }
+         break;
+      }
+      case YFLOW_BC:
+      case YREFLECT_BC:
+      case YDIRICHLET_BC:
+      case YNEUMANN_BC:
+      {
+         if (node_loc == XLO_YLO_2D || node_loc == XHI_YLO_2D) {
+            ret_edge = YLO;
+         } else {
+            ret_edge = YHI;
+         }
+         break;
+      }
+      default: {
+         TBOX_ERROR("Unknown node boundary condition type = "
+            << node_btype << " passed to \n"
+            << "CartesianBoundaryUtilities2::getEdgeLocationForNodeBdry"
+            << std::endl);
+      }
+   }
+
+   if (ret_edge == -1) {
+      TBOX_ERROR("Node boundary condition type = "
+         << node_btype << " and node location = " << node_loc
+         << "\n passed to "
+         << "CartesianBoundaryUtilities2::getEdgeLocationForNodeBdry"
+         << " are inconsistant." << std::endl);
+   }
+
+   return ret_edge;
+
+}
+
+/*
+ * Function to check 2D boundary data filling.  Arguments are:
+ *
+ *    varname ..... name of variable (for error reporting)
+ *    patch ....... patch on which boundary data to check lives
+ *    data_id ..... patch data index on patch
+ *    depth ....... depth index of data to check
+ *    gcw_to_check. boundary ghost width to fill
+ *    bbox ........ boundary box to check
+ *    bcase ....... boundary condition case for edge or a node to check
+ *    bstate ...... boundary state that applies when such a value is
+ *                  required, such as when using Dirichlet conditions
+ */
+
+int CartesianBoundaryUtilities2::checkBdryData(
+   const std::string& varname,
+   const hier::Patch& patch,
+   int data_id,
+   int depth,
+   const hier::IntVector& gcw_to_check,
+   const hier::BoundaryBox& bbox,
+   int bcase,
+   double bstate)
+{
+   TBOX_ASSERT(!varname.empty());
+   TBOX_ASSERT(data_id >= 0);
+   TBOX_ASSERT(depth >= 0);
+
+   TBOX_DIM_ASSERT(gcw_to_check.getDim() == tbox::Dimension(2));
+   TBOX_DIM_ASSERT_CHECK_ARGS3(patch, gcw_to_check, bbox);
+
+   int num_bad_values = 0;
+
+   int btype = bbox.getBoundaryType();
+   int bloc = bbox.getLocationIndex();
+
+   tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+      patch.getPatchGeometry();
+
+   tbox::Pointer<pdat::CellData<double> > vardata =
+      patch.getPatchData(data_id);
+
+   std::string bdry_type_str;
+   if (btype == EDGE2D_BDRY_TYPE) {
+      bdry_type_str = "EDGE";
+   } else if (btype == NODE2D_BDRY_TYPE) {
+      bdry_type_str = "NODE";
+   } else {
+      TBOX_ERROR(
+         "Unknown btype " << btype
+         <<
+         " passed to CartesianBoundaryUtilities2::checkBdryData()! "
+         << std::endl);
+   }
+
+   tbox::plog << "\n\nCHECKING 2D " << bdry_type_str << " BDRY DATA..."
+              << std::endl;
+   tbox::plog << "varname = " << varname << " : depth = " << depth << std::endl;
+   tbox::plog << "bbox = " << bbox.getBox() << std::endl;
+   tbox::plog << "btype, bloc, bcase = "
+              << btype << ", = " << bloc << ", = " << bcase << std::endl;
+
+   int idir;
+   double valfact = 0.0, constval = 0.0, dxfact = 0.0;
+   int offsign;
+
+   get2dBdryDirectionCheckValues(idir, offsign,
+      btype, bloc, bcase);
+
+   if (btype == EDGE2D_BDRY_TYPE) {
+
+      if (bcase == FLOW_BC) {
+         valfact = 1.0;
+         constval = 0.0;
+         dxfact = 0.0;
+      } else if (bcase == REFLECT_BC) {
+         valfact = -1.0;
+         constval = 0.0;
+         dxfact = 0.0;
+      } else if (bcase == DIRICHLET_BC) {
+         valfact = 0.0;
+         constval = bstate;
+         dxfact = 0.0;
+      } else if (bcase == NEUMANN_BC) {
+         valfact = 1.0;
+         constval = 0.0;
+         dxfact = bstate * pgeom->getDx()[idir];
+      } else {
+         TBOX_ERROR(
+            "Unknown bcase " << bcase
+            <<
+            " passed to CartesianBoundaryUtilities2::checkBdryData()"
+            << "\n for " << bdry_type_str
+            << " at location " << bloc << std::endl);
+      }
+
+   } else if (btype == NODE2D_BDRY_TYPE) {
+
+      if (bcase == XFLOW_BC || bcase == YFLOW_BC) {
+         valfact = 1.0;
+         constval = 0.0;
+         dxfact = 0.0;
+      } else if (bcase == XREFLECT_BC || bcase == YREFLECT_BC) {
+         valfact = -1.0;
+         constval = 0.0;
+         dxfact = 0.0;
+      } else if (bcase == XDIRICHLET_BC || bcase == YDIRICHLET_BC) {
+         valfact = 0.0;
+         constval = bstate;
+         dxfact = 0.0;
+      } else if (bcase == XNEUMANN_BC || bcase == YNEUMANN_BC) {
+         valfact = 1.0;
+         constval = 0.0;
+         dxfact = bstate * pgeom->getDx()[idir];
+      } else {
+         TBOX_ERROR(
+            "Unknown bcase " << bcase
+            <<
+            " passed to CartesianBoundaryUtilities2::checkBdryData()"
+            << "\n for " << bdry_type_str
+            << " at location " << bloc << std::endl);
+      }
+
+   }
+
+   hier::Box gbox_to_check =
+      vardata->getGhostBox() * pgeom->getBoundaryFillBox(bbox,
+         patch.getBox(),
+         gcw_to_check);
+
+   hier::Box cbox(gbox_to_check);
+   hier::Box dbox(gbox_to_check);
+   hier::Index ifirst(vardata->getBox().lower());
+   hier::Index ilast(vardata->getBox().upper());
+
+   if (offsign == -1) {
+      cbox.lower(idir) = ifirst(idir) - 1;
+      cbox.upper(idir) = ifirst(idir) - 1;
+      dbox.lower(idir) = ifirst(idir);
+      dbox.upper(idir) = ifirst(idir);
+   } else {
+      cbox.lower(idir) = ilast(idir) + 1;
+      cbox.upper(idir) = ilast(idir) + 1;
+      dbox.lower(idir) = ilast(idir);
+      dbox.upper(idir) = ilast(idir);
+   }
+
+   pdat::CellIterator id(dbox);
+   for (pdat::CellIterator ic(cbox); ic; ic++) {
+      double checkval = valfact * (*vardata)(id(), depth) + constval;
+      pdat::CellIndex check = ic();
+      for (int p = 0; p < gbox_to_check.numberCells(idir); p++) {
+         double offcheckval = checkval + dxfact * (p + 1);
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1572)
+#endif
+         if ((*vardata)(check, depth) != offcheckval) {
+            num_bad_values++;
+            TBOX_WARNING("Bad " << bdry_type_str
+                                << " boundary value for " << varname
+                                << " found in cell " << check
+                                << "\n   found = " << (*vardata)(check, depth)
+                                << " : correct = " << offcheckval << std::endl);
+         }
+         check(idir) += offsign;
+      }
+      id++;
+   }
+
+   return num_bad_values;
+
+}
+
+/*
+ * Private function to read 2D edge boundary data from input database.
+ */
+
+void CartesianBoundaryUtilities2::read2dBdryEdges(
+   BoundaryUtilityStrategy* bdry_strategy,
+   tbox::Pointer<tbox::Database> bdry_db,
+   tbox::Array<int>& edge_conds,
+   const hier::IntVector& periodic)
+{
+   TBOX_DIM_ASSERT(periodic.getDim() == tbox::Dimension(2));
+
+   TBOX_ASSERT(bdry_strategy != (BoundaryUtilityStrategy *)NULL);
+   TBOX_ASSERT(!bdry_db.isNull());
+   TBOX_ASSERT(edge_conds.getSize() == NUM_2D_EDGES);
+
+   int num_per_dirs = 0;
+   for (int id = 0; id < 2; id++) {
+      if (periodic(id)) num_per_dirs++;
+   }
+
+   if (num_per_dirs < 2) { // face boundary input required
+
+      for (int s = 0; s < NUM_2D_EDGES; s++) {
+
+         std::string bdry_loc_str;
+         switch (s) {
+            case XLO: { bdry_loc_str = "boundary_edge_xlo";
+                        break;
+            }
+            case XHI: { bdry_loc_str = "boundary_edge_xhi";
+                        break;
+            }
+            case YLO: { bdry_loc_str = "boundary_edge_ylo";
+                        break;
+            }
+            case YHI: { bdry_loc_str = "boundary_edge_yhi";
+                        break;
+            }
+            default: NULL_STATEMENT;
+         }
+
+         bool need_data_read = true;
+         if (num_per_dirs > 0) {
+            if (periodic(0) && (s == XLO || s == XHI)) {
+               need_data_read = false;
+            } else if (periodic(1) && (s == YLO || s == YHI)) {
+               need_data_read = false;
+            }
+         }
+
+         if (need_data_read) {
+            if (bdry_db->keyExists(bdry_loc_str)) {
+               tbox::Pointer<tbox::Database> bdry_loc_db =
+                  bdry_db->getDatabase(bdry_loc_str);
+               if (!bdry_loc_db.isNull()) {
+                  if (bdry_loc_db->keyExists("boundary_condition")) {
+                     std::string bdry_cond_str =
+                        bdry_loc_db->getString("boundary_condition");
+                     if (bdry_cond_str == "FLOW") {
+                        edge_conds[s] = FLOW_BC;
+                     } else if (bdry_cond_str == "REFLECT") {
+                        edge_conds[s] = REFLECT_BC;
+                     } else if (bdry_cond_str == "DIRICHLET") {
+                        edge_conds[s] = DIRICHLET_BC;
+                        bdry_strategy->
+                        readDirichletBoundaryDataEntry(bdry_loc_db,
+                           bdry_loc_str,
+                           s);
+                     } else if (bdry_cond_str == "NEUMANN") {
+                        edge_conds[s] = NEUMANN_BC;
+                        bdry_strategy->
+                        readNeumannBoundaryDataEntry(bdry_loc_db,
+                           bdry_loc_str,
+                           s);
+                     } else {
+                        TBOX_ERROR("Unknown edge boundary string = "
+                           << bdry_cond_str << " found in input." << std::endl);
+                     }
+                  } else {
+                     TBOX_ERROR("'boundary_condition' entry missing from "
+                        << bdry_loc_str << " input database." << std::endl);
+                  }
+               }
+            } else {
+               TBOX_ERROR(bdry_loc_str
+                  << " database entry not found in input." << std::endl);
+            }
+         } // if (need_data_read)
+
+      } // for (int s = 0 ...
+
+   } // if (num_per_dirs < 2)
+
+}
+
+/*
+ * Private function to read 2D node boundary data from input database.
+ */
+
+void CartesianBoundaryUtilities2::read2dBdryNodes(
+   tbox::Pointer<tbox::Database> bdry_db,
+   const tbox::Array<int>& edge_conds,
+   tbox::Array<int>& node_conds,
+   const hier::IntVector& periodic)
+{
+   TBOX_DIM_ASSERT(periodic.getDim() == tbox::Dimension(2));
+
+   TBOX_ASSERT(!bdry_db.isNull());
+   TBOX_ASSERT(edge_conds.getSize() == NUM_2D_EDGES);
+   TBOX_ASSERT(node_conds.getSize() == NUM_2D_NODES);
+
+   int num_per_dirs = 0;
+   for (int id = 0; id < 2; id++) {
+      if (periodic(id)) num_per_dirs++;
+   }
+
+   if (num_per_dirs < 1) { // node boundary data required
+
+      for (int s = 0; s < NUM_2D_NODES; s++) {
+
+         std::string bdry_loc_str;
+         switch (s) {
+            case XLO_YLO_2D: { bdry_loc_str = "boundary_node_xlo_ylo";
+                               break;
+            }
+            case XHI_YLO_2D: { bdry_loc_str = "boundary_node_xhi_ylo";
+                               break;
+            }
+            case XLO_YHI_2D: { bdry_loc_str = "boundary_node_xlo_yhi";
+                               break;
+            }
+            case XHI_YHI_2D: { bdry_loc_str = "boundary_node_xhi_yhi";
+                               break;
+            }
+            default: NULL_STATEMENT;
+         }
+
+         if (bdry_db->keyExists(bdry_loc_str)) {
+            tbox::Pointer<tbox::Database> bdry_loc_db =
+               bdry_db->getDatabase(bdry_loc_str);
+            if (!bdry_loc_db.isNull()) {
+               if (bdry_loc_db->keyExists("boundary_condition")) {
+                  std::string bdry_cond_str =
+                     bdry_loc_db->getString("boundary_condition");
+                  if (bdry_cond_str == "XFLOW") {
+                     node_conds[s] = XFLOW_BC;
+                  } else if (bdry_cond_str == "YFLOW") {
+                     node_conds[s] = YFLOW_BC;
+                  } else if (bdry_cond_str == "XREFLECT") {
+                     node_conds[s] = XREFLECT_BC;
+                  } else if (bdry_cond_str == "YREFLECT") {
+                     node_conds[s] = YREFLECT_BC;
+                  } else if (bdry_cond_str == "XDIRICHLET") {
+                     node_conds[s] = XDIRICHLET_BC;
+                  } else if (bdry_cond_str == "YDIRICHLET") {
+                     node_conds[s] = YDIRICHLET_BC;
+                  } else if (bdry_cond_str == "XNEUMANN") {
+                     node_conds[s] = XNEUMANN_BC;
+                  } else if (bdry_cond_str == "YNEUMANN") {
+                     node_conds[s] = YNEUMANN_BC;
+                  } else {
+                     TBOX_ERROR("Unknown node boundary string = "
+                        << bdry_cond_str << " found in input." << std::endl);
+                  }
+
+                  std::string proper_edge;
+                  std::string proper_edge_data;
+                  bool no_edge_data_found = false;
+                  if (bdry_cond_str == "XFLOW" ||
+                      bdry_cond_str == "XDIRICHLET" ||
+                      bdry_cond_str == "XNEUMANN" ||
+                      bdry_cond_str == "XREFLECT") {
+                     if (s == XLO_YLO_2D || s == XLO_YHI_2D) {
+                        proper_edge = "XLO";
+                        if (bdry_cond_str == "XFLOW" &&
+                            edge_conds[XLO] != FLOW_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "FLOW";
+                        }
+                        if (bdry_cond_str == "XDIRICHLET" &&
+                            edge_conds[XLO] != DIRICHLET_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "DIRICHLET";
+                        }
+                        if (bdry_cond_str == "XNEUMANN" &&
+                            edge_conds[XLO] != NEUMANN_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "NEUMANN";
+                        }
+                        if (bdry_cond_str == "XREFLECT" &&
+                            edge_conds[XLO] != REFLECT_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "REFLECT";
+                        }
+                     } else {
+                        proper_edge = "XHI";
+                        if (bdry_cond_str == "XFLOW" &&
+                            edge_conds[XHI] != FLOW_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "FLOW";
+                        }
+                        if (bdry_cond_str == "XDIRICHLET" &&
+                            edge_conds[XHI] != DIRICHLET_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "DIRICHLET";
+                        }
+                        if (bdry_cond_str == "XNEUMANN" &&
+                            edge_conds[XHI] != NEUMANN_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "NEUMANN";
+                        }
+                        if (bdry_cond_str == "XREFLECT" &&
+                            edge_conds[XHI] != REFLECT_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "REFLECT";
+                        }
+                     }
+                  } else if (bdry_cond_str == "YFLOW" ||
+                             bdry_cond_str == "YDIRICHLET" ||
+                             bdry_cond_str == "YNEUMANN" ||
+                             bdry_cond_str == "YREFLECT") {
+                     if (s == XLO_YLO_2D || s == XHI_YLO_2D) {
+                        proper_edge = "YLO";
+                        if (bdry_cond_str == "YFLOW" &&
+                            edge_conds[YLO] != FLOW_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "FLOW";
+                        }
+                        if (bdry_cond_str == "YDIRICHLET" &&
+                            edge_conds[YLO] != DIRICHLET_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "DIRICHLET";
+                        }
+                        if (bdry_cond_str == "YNEUMANN" &&
+                            edge_conds[YLO] != NEUMANN_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "NEUMANN";
+                        }
+                        if (bdry_cond_str == "YREFLECT" &&
+                            edge_conds[YLO] != REFLECT_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "REFLECT";
+                        }
+                     } else {
+                        proper_edge = "YHI";
+                        if (bdry_cond_str == "YFLOW" &&
+                            edge_conds[YHI] != FLOW_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "FLOW";
+                        }
+                        if (bdry_cond_str == "YDIRICHLET" &&
+                            edge_conds[YHI] != DIRICHLET_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "DIRICHLET";
+                        }
+                        if (bdry_cond_str == "YNEUMANN" &&
+                            edge_conds[YHI] != NEUMANN_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "NEUMANN";
+                        }
+                        if (bdry_cond_str == "YREFLECT" &&
+                            edge_conds[YHI] != REFLECT_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "REFLECT";
+                        }
+                     }
+                  }
+                  if (no_edge_data_found) {
+                     TBOX_ERROR(
+                        "Bdry condition " << bdry_cond_str
+                        << " found for "
+                        << bdry_loc_str
+                        << "\n but no "
+                        << proper_edge_data
+                        << " data found for edge "
+                        << proper_edge << std::endl);
+                  }
+
+               } else {
+                  TBOX_ERROR("'boundary_condition' entry missing from "
+                     << bdry_loc_str << " input database." << std::endl);
+               }
+            }
+         } else {
+            TBOX_ERROR(bdry_loc_str
+               << " database entry not found in input." << std::endl);
+         }
+
+      } // for (int s = 0 ...
+
+   } // if (num_per_dirs < 1)
+
+}
+
+/*
+ * Private function to get boundary orientation information for
+ * 2D boundary condition checking.  Called from checkBdryData().
+ */
+
+void CartesianBoundaryUtilities2::get2dBdryDirectionCheckValues(
+   int& idir,
+   int& offsign,
+   int btype,
+   int bloc,
+   int bcase)
+{
+
+   std::string bdry_type_str;
+
+   if (btype == EDGE2D_BDRY_TYPE) {
+
+      bdry_type_str = "NODE";
+
+      if (bloc == XLO || bloc == XHI) {
+         idir = 0;
+         if (bloc == XLO) {
+            offsign = -1;
+         } else {
+            offsign = 1;
+         }
+      } else if (bloc == YLO || bloc == YHI) {
+         idir = 1;
+         if (bloc == YLO) {
+            offsign = -1;
+         } else {
+            offsign = 1;
+         }
+      } else {
+         TBOX_ERROR(
+            "Unknown boundary location " << bloc
+            <<
+            " passed to CartesianBoundaryUtilities2::checkBdryData()"
+            << "\n for "
+            << bdry_type_str << " boundary " << std::endl);
+      }
+
+   } else if (btype == NODE2D_BDRY_TYPE) {
+
+      bdry_type_str = "NODE";
+
+      if (bcase == XFLOW_BC || bcase == XREFLECT_BC ||
+          bcase == XDIRICHLET_BC || bcase == XNEUMANN_BC) {
+         idir = 0;
+         if (bloc == XLO_YLO_2D || bloc == XLO_YHI_2D) {
+            offsign = -1;
+         } else {
+            offsign = 1;
+         }
+      } else if (bcase == YFLOW_BC || bcase == YREFLECT_BC ||
+                 bcase == YDIRICHLET_BC || bcase == YNEUMANN_BC) {
+         idir = 1;
+         if (bloc == XLO_YLO_2D || bloc == XHI_YLO_2D) {
+            offsign = -1;
+         } else {
+            offsign = 1;
+         }
+      }
+
+   } else {
+      TBOX_ERROR(
+         "Unknown boundary type " << btype
+         <<
+         " passed to CartesianBoundaryUtilities2::checkBdryData()"
+         << "\n for " << bdry_type_str
+         << " at location " << bloc
+         << std::endl);
+   }
+
+}
+
+/*
+ * Private function to stuff 2D boundary contants into Fortran common blocks
+ */
+
+void CartesianBoundaryUtilities2::stuff2dBdryFortConst()
+{
+   F77_FUNC(stufcartbdryloc2d, STUFCARTBDRYLOC2D) (XLO, XHI, YLO, YHI,
+      XLO_YLO_2D, XHI_YLO_2D, XLO_YHI_2D, XHI_YHI_2D);
+   F77_FUNC(stufcartbdrycond2d, STUFCARTBDRYCOND2D) (FLOW_BC,
+      XFLOW_BC, YFLOW_BC,
+      REFLECT_BC,
+      XREFLECT_BC, YREFLECT_BC,
+      DIRICHLET_BC,
+      XDIRICHLET_BC, YDIRICHLET_BC,
+      NEUMANN_BC,
+      XNEUMANN_BC, YNEUMANN_BC);
+   s_fortran_constants_stuffed = true;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/CartesianBoundaryUtilities2.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/CartesianBoundaryUtilities2.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,266 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility routines for manipulating Cartesian 2d boundary data 
+ *
+ ************************************************************************/
+
+#ifndef included_appu_CartesianBoundaryUtilities2
+#define included_appu_CartesianBoundaryUtilities2
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/appu/BoundaryUtilityStrategy.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace appu {
+
+/*!
+ * @brief Class CartesianBoundaryUtilities2 is a utility class that
+ * simplifies the implementation of simple physical boundary data in
+ * 2 spatial dimensions.  It contains routines for reading boundary data
+ * information from input files, applying those boundary conditions,
+ * and error checking boundary data.  These routines apply to the
+ * case of cell-centered double data only.  One may use all of these
+ * capabilities, or use the input reading, boundary setting, and error
+ * checking routines independently.
+ *
+ * To use the boundary condition input reading capabilities, the format
+ * of the input file section containing the boundary information must
+ * be as described next.  Boundary node and edge entries are only
+ * required for those that are not filled automatically when periodic
+ * conditions apply.
+ *
+ * The boundary condition for edge "*" is provided in a section as follows:
+ *
+ * \verbatim
+ *
+ *    boundary_edge_* {
+ *       boundary_condition  = ...  // boundary condition std::string identifier
+ *       // Any problem-specific boundary data read by user routines
+ *       // is placed here...
+ *    }
+ *
+ * Allowable edge identifiers (i.e., values for "*") are:
+ *       xlo, xhi, ylo, yhi
+ * Supported edge boundary_condition strin values are:
+ *       "FLOW", "REFLECT", "DIRICHLET", "NEUMANN"
+ *
+ * \endverbatim
+ *
+ * The boundary condition for node "*" is provided in a section as follows:
+ *
+ * \verbatim
+ *
+ *    boundary_node_* {
+ *       boundary_condition  = ...  // boundary condition std::string identifier
+ *    }
+ *
+ * Allowable node identifiers (i.e., values for "*") are:
+ *       xlo_ylo, xhi_ylo, xlo_yhi, xhi_yhi
+ * Supported node boundary_condition std::string values are:
+ *       "XFLOW", "YFLOW",
+ *       "XREFLECT", "YREFLECT",
+ *       "XDIRICHLET", "YDIRICHLET",
+ *       "XNEUMANN", "YNEUMANN"
+ *
+ * \endverbatim
+ *
+ * Note that node conditions must be consistent with adjacent edge conditions.
+ *
+ * See the include file CartesianBoundaryDefines.h for integer constant
+ * definitions that apply for the various boundary types, locations,
+ * and boundary conditions.  If you choose to use the input reading
+ * capabilities only and write your own boundary condition routines in
+ * FORTRAN, you should note that the integer constants for the various
+ * boundary condition types and locations are automatically "stuffed" into
+ * FORTRAN common blocks.  This avoids potential problems with
+ * inconsistencies between C++ and FORTRAN usage.  Please see the
+ * FORTRAN include file cartbdryparams2d.i for details.
+ *
+ * @see appu::BoundaryUtilityStrategy2
+ */
+
+struct CartesianBoundaryUtilities2 {
+public:
+   /*!
+    * Function to read 2d boundary data from input database.
+    * The integer boundary condition types are placed in the integer
+    * arrays supplied by the caller (typically, the concrete
+    * BoundaryUtilityStrategy object provided).  When DIRICHLET or
+    * NEUMANN conditions are specified, control is passed to the
+    * BoundaryUtilityStrategy to read the boundary state data specific to
+    * the problem.
+    *
+    * Errors will be reported and the program will abort whenever necessary
+    * boundary condition information is missing in the input database, or
+    * when the data read in is either unknown or inconsistent.  The periodic
+    * domain information is used to determine which boundary edge or
+    * node entries are not required from input.  Error checking
+    * requires that node boundary conditions are consistent
+    * with those specified for the edges.
+    *
+    * When assertion checking is active, assertions will result when any
+    * of the pointer arguments is null, or an array is passed in with the
+    * the wrong size.
+    *
+    * @param bdry_strategy user-defined object that reads DIRICHLET or NEUMANN
+    *                      conditions
+    * @param bdry_db       input database containing all boundary data
+    * @param edge_conds    array into which integer edge boundary condition types
+    *                      are read
+    * @param node_conds    array into which integer node boundary condition types
+    *                      are read
+    * @param periodic      integer vector specifying which coordinate
+    *                      directions are periodic (e.g., value returned from
+    *                      GridGeometry2::getPeriodicShift())
+    */
+   static void
+   readBoundaryInput(
+      BoundaryUtilityStrategy* bdry_strategy,
+      tbox::Pointer<tbox::Database> bdry_db,
+      tbox::Array<int>& edge_conds,
+      tbox::Array<int>& node_conds,
+      const hier::IntVector& periodic);
+
+   /*!
+    * Function to fill 2d edge boundary values for a patch.
+    *
+    * When assertion checking is active, assertions will result when any
+    * of the pointer arguments is null, or an array is passed in with the
+    * the wrong size.
+    *
+    * @param varname             String name of variable (for error reporting).
+    * @param vardata             Cell-centered patch data object to fill.
+    * @param patch               hier::Patch on which data object lives.
+    * @param ghost_width_to_fill Width of ghost region to fill.
+    * @param bdry_edge_conds     tbox::Array of boundary condition types for patch edges.
+    * @param bdry_edge_values    tbox::Array of boundary values for patch edges.
+    */
+   static void
+   fillEdgeBoundaryData(
+      const std::string& varname,
+      tbox::Pointer<pdat::CellData<double> >& vardata,
+      const hier::Patch& patch,
+      const hier::IntVector& ghost_width_to_fill,
+      const tbox::Array<int>& bdry_edge_conds,
+      const tbox::Array<double>& bdry_edge_values);
+
+   /*!
+    * Function to fill 2d node boundary values for a patch.
+    *
+    * When assertion checking is active, assertions will result when any
+    * of the pointer arguments is null, or an array is passed in with the
+    * the wrong size.
+    *
+    * @param varname             String name of variable (for error reporting).
+    * @param vardata             Cell-centered patch data object to fill.
+    * @param patch               hier::Patch on which data object lives.
+    * @param ghost_width_to_fill Width of ghost region to fill.
+    * @param bdry_node_conds     tbox::Array of boundary condition types for patch nodes.
+    * @param bdry_edge_values    tbox::Array of boundary values for patch edges.
+    */
+   static void
+   fillNodeBoundaryData(
+      const std::string& varname,
+      tbox::Pointer<pdat::CellData<double> >& vardata,
+      const hier::Patch& patch,
+      const hier::IntVector& ghost_width_to_fill,
+      const tbox::Array<int>& bdry_node_conds,
+      const tbox::Array<double>& bdry_edge_values);
+
+   /*!
+    * Function that returns the integer edge boundary location
+    * corresponding to the given node location and node boundary
+    * condition.
+    *
+    * If the node boundary condition type or node location are unknown,
+    * or the boundary condition type is inconsistant with the node location
+    * an error results.
+    *
+    * @return Integer edge location for node location and boundary condition type.
+    *
+    * @param node_loc   Integer location for node.
+    * @param node_btype Integer boundary condition type for node.
+    */
+   static int
+   getEdgeLocationForNodeBdry(
+      int node_loc,
+      int node_btype);
+
+   /*!
+    * Function to check 2d boundary data for a patch data quantity on
+    * a patch after it is set.  A warning message will be sent to log
+    * file for each bad boundary value that is found.
+    *
+    * When assertion checking is active, assertions will result when any
+    * of the pointer arguments is null, or an array is passed in with the
+    * the wrong size.
+    *
+    * @return Integer number of bad boundary values found.
+    *
+    * @param varname       String name of variable (for error reporting).
+    * @param patch         hier::Patch on which data object lives.
+    * @param data_id       hier::Patch data index for data on patch.
+    * @param depth         Depth index of patch data to check.
+    * @param gcw_to_check  Width of ghost region to check.
+    * @param bbox          Boundary box to check.
+    * @param bcase         Boundary condition type for given edge or node.
+    * @param bstate        Boundary value that applies in DIRICHLET or NEUMANN case.
+    */
+   static int
+   checkBdryData(
+      const std::string& varname,
+      const hier::Patch& patch,
+      int data_id,
+      int depth,
+      const hier::IntVector& gcw_to_check,
+      const hier::BoundaryBox& bbox,
+      int bcase,
+      double bstate);
+
+private:
+   static bool s_fortran_constants_stuffed;
+
+   static void
+   read2dBdryEdges(
+      BoundaryUtilityStrategy* bdry_strategy,
+      tbox::Pointer<tbox::Database> bdry_db,
+      tbox::Array<int>& edge_conds,
+      const hier::IntVector& periodic);
+
+   static void
+   read2dBdryNodes(
+      tbox::Pointer<tbox::Database> bdry_db,
+      const tbox::Array<int>& edge_conds,
+      tbox::Array<int>& node_conds,
+      const hier::IntVector& periodic);
+
+   static void
+   get2dBdryDirectionCheckValues(
+      int& idir,
+      int& offsign,
+      int btype,
+      int bloc,
+      int bcase);
+
+   static void
+   stuff2dBdryFortConst();
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/CartesianBoundaryUtilities3.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/CartesianBoundaryUtilities3.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1659 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility routines for manipulating 3D Cartesian boundary data 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/appu/CartesianBoundaryUtilities3.h"
+
+#include "SAMRAI/appu/CartesianBoundaryDefines.h"
+
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN 77 routines used in                 *
+ * boundary condition implementation.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+extern "C" {
+
+// Disable Intel warnings about extern declarations in C file
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+void F77_FUNC(stufcartbdryloc3d, STUFCARTBDRYLOC3D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &);
+
+void F77_FUNC(stufcartbdrycond3d, STUFCARTBDRYCOND3D) (const int &,
+   const int &, const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &,
+   const int &, const int &, const int &);
+
+void F77_FUNC(getcartfacebdry3d, GETCARTFACEBDRY3D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const double *,
+   const int &,
+   const int &,
+   const double *,
+   double *,
+   const int &);
+
+void F77_FUNC(getcartedgebdry3d, GETCARTEDGEBDRY3D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const double *,
+   const int &,
+   const int &,
+   const double *,
+   double *,
+   const int &);
+
+void F77_FUNC(getcartnodebdry3d, GETCARTNODEBDRY3D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const double *,
+   const int &,
+   const int &,
+   const double *,
+   double *,
+   const int &);
+
+}
+
+namespace SAMRAI {
+namespace appu {
+
+// using namespace std;
+
+bool CartesianBoundaryUtilities3::s_fortran_constants_stuffed = false;
+
+/*
+ * This function reads 3D boundary data from given input database.
+ * The integer boundary condition types are placed in the integer
+ * arrays supplied by the caller (typically, the concrete BoundaryStrategy
+ * provided).  When DIRICHLET or NEUMANN conditions are specified, control
+ * is passed to the BoundaryStrategy to read the boundary state data
+ * specific to the problem.
+ *
+ * Errors will be reported and the program will abort whenever necessary
+ * boundary condition information is missing in the input database, or
+ * when the data read in is either unknown or inconsistent.  The periodic
+ * domain information is used to determine which boundary face, edge, or
+ * node entries are not required from input.  Error checking requires
+ * that node and edge boundary conditions are consistent with those
+ * specified for the faces.
+ *
+ * Arguments are:
+ *    bdry_strategy .... object that reads DIRICHLET or NEUMANN conditions
+ *    bdry_db .......... input database containing all boundary data
+ *    face_conds ....... array into which integer boundary conditions
+ *                       for faces are read
+ *    edge_conds ....... array into which integer boundary conditions
+ *                       for edges are read
+ *    node_conds ....... array into which integer boundary conditions
+ *                       for nodes are read
+ *    periodic ......... integer vector specifying which coordinate
+ *                       directions are periodic (value returned from
+ *                       GridGeometry3::getPeriodicShift())
+ */
+
+void CartesianBoundaryUtilities3::readBoundaryInput(
+   BoundaryUtilityStrategy* bdry_strategy,
+   tbox::Pointer<tbox::Database> bdry_db,
+   tbox::Array<int>& face_conds,
+   tbox::Array<int>& edge_conds,
+   tbox::Array<int>& node_conds,
+   const hier::IntVector& periodic)
+{
+   TBOX_DIM_ASSERT(periodic.getDim() == tbox::Dimension(3));
+
+   TBOX_ASSERT(bdry_strategy != (BoundaryUtilityStrategy *)NULL);
+   TBOX_ASSERT(!bdry_db.isNull());
+   TBOX_ASSERT(face_conds.getSize() == NUM_3D_FACES);
+   TBOX_ASSERT(edge_conds.getSize() == NUM_3D_EDGES);
+   TBOX_ASSERT(node_conds.getSize() == NUM_3D_NODES);
+
+   if (!s_fortran_constants_stuffed) {
+      stuff3dBdryFortConst();
+   }
+
+   read3dBdryFaces(bdry_strategy,
+      bdry_db,
+      face_conds,
+      periodic);
+
+   read3dBdryEdges(bdry_db,
+      face_conds,
+      edge_conds,
+      periodic);
+
+   read3dBdryNodes(bdry_db,
+      face_conds,
+      node_conds,
+      periodic);
+
+}
+
+/*
+ * Function to fill face boundary values.
+ *
+ * Arguments are:
+ *    varname .............. name of variable (for error reporting)
+ *    vardata .............. cell-centered patch data object to check
+ *    patch ................ patch on which data object lives
+ *    ghost_width_to_fill .. width of ghost region to fill
+ *    bdry_face_conds ...... array of boundary conditions for patch faces
+ *    bdry_face_values ..... array of boundary values for faces
+ *                           (this must be consistent with boundary
+ *                           condition types)
+ */
+
+void CartesianBoundaryUtilities3::fillFaceBoundaryData(
+   const std::string& varname,
+   tbox::Pointer<pdat::CellData<double> >& vardata,
+   const hier::Patch& patch,
+   const hier::IntVector& ghost_fill_width,
+   const tbox::Array<int>& bdry_face_conds,
+   const tbox::Array<double>& bdry_face_values)
+{
+   TBOX_ASSERT(!varname.empty());
+   TBOX_ASSERT(!vardata.isNull());
+   TBOX_ASSERT(bdry_face_conds.getSize() == NUM_3D_FACES);
+   TBOX_ASSERT(bdry_face_values.getSize() == NUM_3D_FACES * (vardata->getDepth()));
+
+   TBOX_DIM_ASSERT(ghost_fill_width.getDim() == tbox::Dimension(3));
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*vardata, patch, ghost_fill_width);
+
+   NULL_USE(varname);
+
+   if (!s_fortran_constants_stuffed) {
+      stuff3dBdryFortConst();
+   }
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+      patch.getPatchGeometry();
+   const double* dx = pgeom->getDx();
+
+   const hier::Box& interior(patch.getBox());
+   const hier::Index& ifirst(interior.lower());
+   const hier::Index& ilast(interior.upper());
+
+   const hier::IntVector& ghost_cells(vardata->getGhostCellWidth());
+
+   hier::IntVector gcw_to_fill(hier::IntVector::min(ghost_cells,
+                                  ghost_fill_width));
+
+   const tbox::Array<hier::BoundaryBox>& face_bdry =
+      pgeom->getCodimensionBoundaries(FACE3D_BDRY_TYPE);
+   for (int i = 0; i < face_bdry.getSize(); i++) {
+
+      TBOX_ASSERT(face_bdry[i].getBoundaryType() == FACE3D_BDRY_TYPE);
+
+      int bface_loc = face_bdry[i].getLocationIndex();
+
+      hier::Box fill_box(pgeom->getBoundaryFillBox(face_bdry[i],
+                            interior,
+                            gcw_to_fill));
+      const hier::Index& ibeg(fill_box.lower());
+      const hier::Index& iend(fill_box.upper());
+
+      F77_FUNC(getcartfacebdry3d, GETCARTFACEBDRY3D) (ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         ibeg(0), iend(0),
+         ibeg(1), iend(1),
+         ibeg(2), iend(2),
+         ghost_cells(0), ghost_cells(1), ghost_cells(2),
+         dx,
+         bface_loc,
+         bdry_face_conds[bface_loc],
+         bdry_face_values.getPointer(),
+         vardata->getPointer(),
+         vardata->getDepth());
+
+   }
+
+}
+
+/*
+ * Function to fill edge boundary values.
+ *
+ * Arguments are:
+ *    varname .............. name of variable (for error reporting)
+ *    vardata .............. cell-centered patch data object to check
+ *    patch ................ patch on which data object lives
+ *    ghost_width_to_fill .. width of ghost region to fill
+ *    bdry_edge_conds ...... array of boundary conditions for patch edges
+ *    bdry_face_values ..... array of boundary values for faces
+ *                           (this must be consistent with boundary
+ *                           condition types)
+ */
+
+void CartesianBoundaryUtilities3::fillEdgeBoundaryData(
+   const std::string& varname,
+   tbox::Pointer<pdat::CellData<double> >& vardata,
+   const hier::Patch& patch,
+   const hier::IntVector& ghost_fill_width,
+   const tbox::Array<int>& bdry_edge_conds,
+   const tbox::Array<double>& bdry_face_values)
+{
+   TBOX_ASSERT(!varname.empty());
+   TBOX_ASSERT(!vardata.isNull());
+   TBOX_ASSERT(bdry_edge_conds.getSize() == NUM_3D_EDGES);
+   TBOX_ASSERT(bdry_face_values.getSize() == NUM_3D_FACES * (vardata->getDepth()));
+
+   TBOX_DIM_ASSERT(ghost_fill_width.getDim() == tbox::Dimension(3));
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*vardata, patch, ghost_fill_width);
+
+   NULL_USE(varname);
+
+   if (!s_fortran_constants_stuffed) {
+      stuff3dBdryFortConst();
+   }
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+      patch.getPatchGeometry();
+   const double* dx = pgeom->getDx();
+
+   const hier::Box& interior(patch.getBox());
+   const hier::Index& ifirst(interior.lower());
+   const hier::Index& ilast(interior.upper());
+
+   const hier::IntVector& ghost_cells(vardata->getGhostCellWidth());
+
+   hier::IntVector gcw_to_fill(hier::IntVector::min(ghost_cells,
+                                  ghost_fill_width));
+
+   const tbox::Array<hier::BoundaryBox>& edge_bdry =
+      pgeom->getCodimensionBoundaries(EDGE3D_BDRY_TYPE);
+   for (int i = 0; i < edge_bdry.getSize(); i++) {
+
+      TBOX_ASSERT(edge_bdry[i].getBoundaryType() == EDGE3D_BDRY_TYPE);
+
+      int bedge_loc(edge_bdry[i].getLocationIndex());
+
+      hier::Box fill_box(pgeom->getBoundaryFillBox(edge_bdry[i],
+                            interior,
+                            gcw_to_fill));
+      const hier::Index& ibeg(fill_box.lower());
+      const hier::Index& iend(fill_box.upper());
+
+      F77_FUNC(getcartedgebdry3d, GETCARTEDGEBDRY3D) (ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         ibeg(0), iend(0),
+         ibeg(1), iend(1),
+         ibeg(2), iend(2),
+         ghost_cells(0), ghost_cells(1), ghost_cells(2),
+         dx,
+         bedge_loc,
+         bdry_edge_conds[bedge_loc],
+         bdry_face_values.getPointer(),
+         vardata->getPointer(),
+         vardata->getDepth());
+
+   }
+
+}
+
+/*
+ * Function to fill node boundary values.
+ *
+ * Arguments are:
+ *    varname .............. name of variable (for error reporting)
+ *    vardata .............. cell-centered patch data object to check
+ *    patch ................ patch on which data object lives
+ *    ghost_width_to_fill .. width of ghost region to fill
+ *    bdry_node_conds ...... array of boundary conditions for patch nodes
+ *    bdry_face_values ..... array of boundary values for faces
+ *                           (this must be consistent with boundary
+ *                           condition types)
+ */
+
+void CartesianBoundaryUtilities3::fillNodeBoundaryData(
+   const std::string& varname,
+   tbox::Pointer<pdat::CellData<double> >& vardata,
+   const hier::Patch& patch,
+   const hier::IntVector& ghost_fill_width,
+   const tbox::Array<int>& bdry_node_conds,
+   const tbox::Array<double>& bdry_face_values)
+{
+   TBOX_ASSERT(!varname.empty());
+   TBOX_ASSERT(!vardata.isNull());
+   TBOX_ASSERT(bdry_node_conds.getSize() == NUM_3D_NODES);
+   TBOX_ASSERT(bdry_face_values.getSize() == NUM_3D_FACES * (vardata->getDepth()));
+
+   TBOX_DIM_ASSERT(ghost_fill_width.getDim() == tbox::Dimension(3));
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*vardata, patch, ghost_fill_width);
+
+   NULL_USE(varname);
+
+   if (!s_fortran_constants_stuffed) {
+      stuff3dBdryFortConst();
+   }
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+      patch.getPatchGeometry();
+   const double* dx = pgeom->getDx();
+
+   const hier::Box& interior(patch.getBox());
+   const hier::Index& ifirst(interior.lower());
+   const hier::Index& ilast(interior.upper());
+
+   const hier::IntVector& ghost_cells(vardata->getGhostCellWidth());
+
+   hier::IntVector gcw_to_fill(hier::IntVector::min(ghost_cells,
+                                  ghost_fill_width));
+
+   const tbox::Array<hier::BoundaryBox>& node_bdry =
+      pgeom->getCodimensionBoundaries(NODE3D_BDRY_TYPE);
+   for (int i = 0; i < node_bdry.getSize(); i++) {
+
+      TBOX_ASSERT(node_bdry[i].getBoundaryType() == NODE3D_BDRY_TYPE);
+
+      int bnode_loc(node_bdry[i].getLocationIndex());
+
+      hier::Box fill_box(pgeom->getBoundaryFillBox(node_bdry[i],
+                            interior,
+                            gcw_to_fill));
+      const hier::Index& ibeg(fill_box.lower());
+      const hier::Index& iend(fill_box.upper());
+
+      F77_FUNC(getcartnodebdry3d, GETCARTNODEBDRY3D) (ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         ibeg(0), iend(0),
+         ibeg(1), iend(1),
+         ibeg(2), iend(2),
+         ghost_cells(0), ghost_cells(1), ghost_cells(2),
+         dx,
+         bnode_loc,
+         bdry_node_conds[bnode_loc],
+         bdry_face_values.getPointer(),
+         vardata->getPointer(),
+         vardata->getDepth());
+
+   }
+
+}
+
+/*
+ * Function that returns the integer face boundary location
+ * corresponding to the given edge location and edge boundary
+ * condition.
+ *
+ * If the edge boundary condition type or edge location are unknown,
+ * or the boundary condition type is inconsistant with the edge location
+ * an error results.
+ */
+
+int CartesianBoundaryUtilities3::getFaceLocationForEdgeBdry(
+   int edge_loc,
+   int edge_btype)
+{
+
+   int ret_face = -1;
+
+   switch (edge_btype) {
+      case XFLOW_BC:
+      case XREFLECT_BC:
+      case XDIRICHLET_BC:
+      case XNEUMANN_BC:
+      {
+         if (edge_loc == XLO_ZLO_3D || edge_loc == XLO_ZHI_3D ||
+             edge_loc == XLO_YLO_3D || edge_loc == XLO_YHI_3D) {
+            ret_face = XLO;
+         } else if (edge_loc == XHI_ZLO_3D || edge_loc == XHI_ZHI_3D ||
+                    edge_loc == XHI_YLO_3D || edge_loc == XHI_YHI_3D) {
+            ret_face = XHI;
+         }
+         break;
+      }
+      case YFLOW_BC:
+      case YREFLECT_BC:
+      case YDIRICHLET_BC:
+      case YNEUMANN_BC:
+      {
+         if (edge_loc == YLO_ZLO_3D || edge_loc == YLO_ZHI_3D ||
+             edge_loc == XLO_YLO_3D || edge_loc == XHI_YLO_3D) {
+            ret_face = YLO;
+         } else if (edge_loc == YHI_ZLO_3D || edge_loc == YHI_ZHI_3D ||
+                    edge_loc == XLO_YHI_3D || edge_loc == XHI_YHI_3D) {
+            ret_face = YHI;
+         }
+         break;
+      }
+      case ZFLOW_BC:
+      case ZREFLECT_BC:
+      case ZDIRICHLET_BC:
+      case ZNEUMANN_BC:
+      {
+         if (edge_loc == YLO_ZLO_3D || edge_loc == YHI_ZLO_3D ||
+             edge_loc == XLO_ZLO_3D || edge_loc == XHI_ZLO_3D) {
+            ret_face = ZLO;
+         } else if (edge_loc == YLO_ZHI_3D || edge_loc == YHI_ZHI_3D ||
+                    edge_loc == XLO_ZHI_3D || edge_loc == XHI_ZHI_3D) {
+            ret_face = ZHI;
+         }
+         break;
+      }
+      default: {
+         TBOX_ERROR("Unknown edge boundary condition type = "
+            << edge_btype << " passed to \n"
+            << "CartesianBoundaryUtilities3::getFaceLocationForEdgeBdry"
+            << std::endl);
+      }
+   }
+
+   if (ret_face == -1) {
+      TBOX_ERROR("Edge boundary condition type = "
+         << edge_btype << " and edge location = " << edge_loc
+         << "\n passed to "
+         << "CartesianBoundaryUtilities3::getFaceLocationForEdgeBdry"
+         << " are inconsistant." << std::endl);
+   }
+
+   return ret_face;
+
+}
+
+/*
+ * Function that returns the integer face boundary location
+ * corresponding to the given node location and node boundary
+ * condition.
+ *
+ * If the node boundary condition type or node location are unknown,
+ * or the boundary condition type is inconsistant with the node location
+ * an error results.
+ */
+
+int CartesianBoundaryUtilities3::getFaceLocationForNodeBdry(
+   int node_loc,
+   int node_btype)
+{
+
+   int ret_face = -1;
+
+   switch (node_btype) {
+      case XFLOW_BC:
+      case XREFLECT_BC:
+      case XDIRICHLET_BC:
+      case XNEUMANN_BC:
+      {
+         if (node_loc == XLO_YLO_ZLO || node_loc == XLO_YHI_ZLO ||
+             node_loc == XLO_YLO_ZHI || node_loc == XLO_YHI_ZHI) {
+            ret_face = XLO;
+         } else {
+            ret_face = XHI;
+         }
+         break;
+      }
+      case YFLOW_BC:
+      case YREFLECT_BC:
+      case YDIRICHLET_BC:
+      case YNEUMANN_BC:
+      {
+         if (node_loc == XLO_YLO_ZLO || node_loc == XHI_YLO_ZLO ||
+             node_loc == XLO_YLO_ZHI || node_loc == XHI_YLO_ZHI) {
+            ret_face = YLO;
+         } else {
+            ret_face = YHI;
+         }
+         break;
+      }
+      case ZFLOW_BC:
+      case ZREFLECT_BC:
+      case ZDIRICHLET_BC:
+      case ZNEUMANN_BC:
+      {
+         if (node_loc == XLO_YLO_ZLO || node_loc == XHI_YLO_ZLO ||
+             node_loc == XLO_YHI_ZLO || node_loc == XHI_YHI_ZLO) {
+            ret_face = ZLO;
+         } else {
+            ret_face = ZHI;
+         }
+         break;
+      }
+      default: {
+         TBOX_ERROR("Unknown node boundary condition type = "
+            << node_btype << " passed to \n"
+            << "CartesianBoundaryUtilities3::getFaceLocationForNodeBdry"
+            << std::endl);
+      }
+   }
+
+   if (ret_face == -1) {
+      TBOX_ERROR("Node boundary condition type = "
+         << node_btype << " and node location = " << node_loc
+         << "\n passed to "
+         << "CartesianBoundaryUtilities3::getFaceLocationForNodeBdry"
+         << " are inconsistant." << std::endl);
+   }
+
+   return ret_face;
+
+}
+
+/*
+ * Function to check 3D boundary data filling.  Arguments are:
+ *
+ *    varname ..... name of variable (for error reporting)
+ *    patch ....... patch on which boundary data to check lives
+ *    data_id ..... patch data index on patch
+ *    depth ....... depth index of data to check
+ *    gcw_to_check. boundary ghost width to fill
+ *    bbox ........ boundary box to check
+ *    bcase ....... boundary condition case for edge or a node to check
+ *    bstate ...... boundary state that applies when such a value is
+ *                  required, such as when using Dirichlet conditions
+ */
+
+int CartesianBoundaryUtilities3::checkBdryData(
+   const std::string& varname,
+   const hier::Patch& patch,
+   int data_id,
+   int depth,
+   const hier::IntVector& gcw_to_check,
+   const hier::BoundaryBox& bbox,
+   int bcase,
+   double bstate)
+{
+   TBOX_ASSERT(!varname.empty());
+   TBOX_ASSERT(data_id >= 0);
+   TBOX_ASSERT(depth >= 0);
+
+   TBOX_DIM_ASSERT(gcw_to_check.getDim() == tbox::Dimension(3));
+   TBOX_DIM_ASSERT_CHECK_ARGS3(patch, gcw_to_check, bbox);
+
+   int num_bad_values = 0;
+
+   int btype = bbox.getBoundaryType();
+   int bloc = bbox.getLocationIndex();
+
+   tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+      patch.getPatchGeometry();
+
+   tbox::Pointer<pdat::CellData<double> > vardata =
+      patch.getPatchData(data_id);
+
+   std::string bdry_type_str;
+   if (btype == FACE3D_BDRY_TYPE) {
+      bdry_type_str = "FACE";
+   } else if (btype == EDGE3D_BDRY_TYPE) {
+      bdry_type_str = "EDGE";
+   } else if (btype == NODE3D_BDRY_TYPE) {
+      bdry_type_str = "NODE";
+   } else {
+      TBOX_ERROR(
+         "Unknown btype " << btype
+         <<
+         " passed to CartesianBoundaryUtilities3::checkBdryData()! "
+         << std::endl);
+   }
+
+   tbox::plog << "\n\nCHECKING 3D " << bdry_type_str << " BDRY DATA..."
+              << std::endl;
+   tbox::plog << "varname = " << varname << " : depth = " << depth << std::endl;
+   tbox::plog << "bbox = " << bbox.getBox() << std::endl;
+   tbox::plog << "btype, bloc, bcase = "
+              << btype << ", = " << bloc << ", = " << bcase << std::endl;
+
+   int idir;
+   double valfact = 0.0, constval = 0.0, dxfact = 0.0;
+   int offsign;
+
+   get3dBdryDirectionCheckValues(idir, offsign,
+      btype, bloc, bcase);
+
+   if (btype == FACE3D_BDRY_TYPE) {
+
+      if (bcase == FLOW_BC) {
+         valfact = 1.0;
+         constval = 0.0;
+         dxfact = 0.0;
+      } else if (bcase == REFLECT_BC) {
+         valfact = -1.0;
+         constval = 0.0;
+         dxfact = 0.0;
+      } else if (bcase == DIRICHLET_BC) {
+         valfact = 0.0;
+         constval = bstate;
+         dxfact = 0.0;
+      } else if (bcase == NEUMANN_BC) {
+         valfact = 1.0;
+         constval = 0.0;
+         dxfact = bstate * pgeom->getDx()[idir];
+      } else {
+         TBOX_ERROR(
+            "Unknown bcase " << bcase
+            <<
+            " passed to CartesianBoundaryUtilities3::checkBdryData()"
+            << "\n for " << bdry_type_str
+            << " at location " << bloc << std::endl);
+      }
+
+   } else if (btype == EDGE3D_BDRY_TYPE) {
+
+      if (bcase == XFLOW_BC || bcase == YFLOW_BC || bcase == ZFLOW_BC) {
+         valfact = 1.0;
+         constval = 0.0;
+         dxfact = 0.0;
+      } else if (bcase == XREFLECT_BC || bcase == YREFLECT_BC ||
+                 bcase == ZREFLECT_BC) {
+         valfact = -1.0;
+         constval = 0.0;
+         dxfact = 0.0;
+      } else if (bcase == XDIRICHLET_BC || bcase == YDIRICHLET_BC ||
+                 bcase == ZDIRICHLET_BC) {
+         valfact = 0.0;
+         constval = bstate;
+         dxfact = 0.0;
+      } else if (bcase == XNEUMANN_BC || bcase == YNEUMANN_BC ||
+                 bcase == ZNEUMANN_BC) {
+         valfact = 1.0;
+         constval = 0.0;
+         dxfact = bstate * pgeom->getDx()[idir];
+      } else {
+         TBOX_ERROR(
+            "Unknown bcase " << bcase
+            <<
+            " passed to CartesianBoundaryUtilities3::checkBdryData()"
+            << "\n for " << bdry_type_str
+            << " at location " << bloc << std::endl);
+      }
+
+   } else if (btype == NODE3D_BDRY_TYPE) {
+
+      if (bcase == XFLOW_BC || bcase == YFLOW_BC || bcase == ZFLOW_BC) {
+         valfact = 1.0;
+         constval = 0.0;
+         dxfact = 0.0;
+      } else if (bcase == XREFLECT_BC || bcase == YREFLECT_BC ||
+                 bcase == ZREFLECT_BC) {
+         valfact = -1.0;
+         constval = 0.0;
+         dxfact = 0.0;
+      } else if (bcase == XDIRICHLET_BC || bcase == YDIRICHLET_BC ||
+                 bcase == ZDIRICHLET_BC) {
+         valfact = 0.0;
+         constval = bstate;
+         dxfact = 0.0;
+      } else if (bcase == XNEUMANN_BC || bcase == YNEUMANN_BC ||
+                 bcase == ZNEUMANN_BC) {
+         valfact = 1.0;
+         constval = 0.0;
+         dxfact = bstate * pgeom->getDx()[idir];
+      } else {
+         TBOX_ERROR(
+            "Unknown bcase " << bcase
+            <<
+            " passed to CartesianBoundaryUtilities3::checkBdryData()"
+            << "\n for " << bdry_type_str
+            << " at location " << bloc << std::endl);
+      }
+
+   }
+
+   hier::Box gbox_to_check(
+      vardata->getGhostBox() * pgeom->getBoundaryFillBox(bbox,
+         patch.getBox(),
+         gcw_to_check));
+
+   hier::Box cbox(gbox_to_check);
+   hier::Box dbox(gbox_to_check);
+   hier::Index ifirst(vardata->getBox().lower());
+   hier::Index ilast(vardata->getBox().upper());
+
+   if (offsign == -1) {
+      cbox.lower(idir) = ifirst(idir) - 1;
+      cbox.upper(idir) = ifirst(idir) - 1;
+      dbox.lower(idir) = ifirst(idir);
+      dbox.upper(idir) = ifirst(idir);
+   } else {
+      cbox.lower(idir) = ilast(idir) + 1;
+      cbox.upper(idir) = ilast(idir) + 1;
+      dbox.lower(idir) = ilast(idir);
+      dbox.upper(idir) = ilast(idir);
+   }
+
+   pdat::CellIterator id(dbox);
+   for (pdat::CellIterator ic(cbox); ic; ic++) {
+      double checkval = valfact * (*vardata)(id(), depth) + constval;
+      pdat::CellIndex check = ic();
+      for (int p = 0; p < gbox_to_check.numberCells(idir); p++) {
+         double offcheckval = checkval + dxfact * (p + 1);
+         if (!tbox::MathUtilities<double>::equalEps((*vardata)(check,
+                                                               depth),
+                offcheckval)) {
+            num_bad_values++;
+            TBOX_WARNING("Bad " << bdry_type_str
+                                << " boundary value for " << varname
+                                << " found in cell " << check
+                                << "\n   found = " << (*vardata)(check, depth)
+                                << " : correct = " << offcheckval << std::endl);
+         }
+         check(idir) += offsign;
+      }
+      id++;
+   }
+
+   return num_bad_values;
+
+}
+
+/*
+ * Private function to read 3D face boundary data from input database.
+ */
+
+void CartesianBoundaryUtilities3::read3dBdryFaces(
+   BoundaryUtilityStrategy* bdry_strategy,
+   tbox::Pointer<tbox::Database> bdry_db,
+   tbox::Array<int>& face_conds,
+   const hier::IntVector& periodic)
+{
+   TBOX_DIM_ASSERT(periodic.getDim() == tbox::Dimension(3));
+
+   TBOX_ASSERT(bdry_strategy != (BoundaryUtilityStrategy *)NULL);
+   TBOX_ASSERT(!bdry_db.isNull());
+   TBOX_ASSERT(face_conds.getSize() == NUM_3D_FACES);
+
+   int num_per_dirs = 0;
+   for (int id = 0; id < 3; id++) {
+      if (periodic(id)) num_per_dirs++;
+   }
+
+   if (num_per_dirs < 3) { // face boundary input required
+
+      for (int s = 0; s < NUM_3D_FACES; s++) {
+
+         std::string bdry_loc_str;
+         switch (s) {
+            case XLO: { bdry_loc_str = "boundary_face_xlo";
+                        break;
+            }
+            case XHI: { bdry_loc_str = "boundary_face_xhi";
+                        break;
+            }
+            case YLO: { bdry_loc_str = "boundary_face_ylo";
+                        break;
+            }
+            case YHI: { bdry_loc_str = "boundary_face_yhi";
+                        break;
+            }
+            case ZLO: { bdry_loc_str = "boundary_face_zlo";
+                        break;
+            }
+            case ZHI: { bdry_loc_str = "boundary_face_zhi";
+                        break;
+            }
+            default: NULL_STATEMENT;
+         }
+
+         bool need_data_read = true;
+         if (num_per_dirs > 0) {
+            if (periodic(0) && (s == XLO || s == XHI)) {
+               need_data_read = false;
+            } else if (periodic(1) && (s == YLO || s == YHI)) {
+               need_data_read = false;
+            } else if (periodic(2) && (s == ZLO || s == ZHI)) {
+               need_data_read = false;
+            }
+         }
+
+         if (need_data_read) {
+            if (bdry_db->keyExists(bdry_loc_str)) {
+               tbox::Pointer<tbox::Database> bdry_loc_db =
+                  bdry_db->getDatabase(bdry_loc_str);
+               if (!bdry_loc_db.isNull()) {
+                  if (bdry_loc_db->keyExists("boundary_condition")) {
+                     std::string bdry_cond_str =
+                        bdry_loc_db->getString("boundary_condition");
+                     if (bdry_cond_str == "FLOW") {
+                        face_conds[s] = FLOW_BC;
+                     } else if (bdry_cond_str == "REFLECT") {
+                        face_conds[s] = REFLECT_BC;
+                     } else if (bdry_cond_str == "DIRICHLET") {
+                        face_conds[s] = DIRICHLET_BC;
+                        bdry_strategy->
+                        readDirichletBoundaryDataEntry(bdry_loc_db,
+                           bdry_loc_str,
+                           s);
+                     } else if (bdry_cond_str == "NEUMANN") {
+                        face_conds[s] = NEUMANN_BC;
+                        bdry_strategy->
+                        readNeumannBoundaryDataEntry(bdry_loc_db,
+                           bdry_loc_str,
+                           s);
+                     } else {
+                        TBOX_ERROR("Unknown face boundary string = "
+                           << bdry_cond_str << " found in input." << std::endl);
+                     }
+                  } else {
+                     TBOX_ERROR("'boundary_condition' entry missing from "
+                        << bdry_loc_str << " input database." << std::endl);
+                  }
+               }
+            } else {
+               TBOX_ERROR(bdry_loc_str
+                  << " database entry not found in input." << std::endl);
+            }
+         } // if (need_data_read)
+
+      } // for (int s = 0 ...
+
+   } // if (num_per_dirs < 3)
+
+}
+
+/*
+ * Private function to read 3D edge boundary data from input database.
+ */
+
+void CartesianBoundaryUtilities3::read3dBdryEdges(
+   tbox::Pointer<tbox::Database> bdry_db,
+   const tbox::Array<int>& face_conds,
+   tbox::Array<int>& edge_conds,
+   const hier::IntVector& periodic)
+{
+   TBOX_DIM_ASSERT(periodic.getDim() == tbox::Dimension(3));
+
+   TBOX_ASSERT(!bdry_db.isNull());
+   TBOX_ASSERT(face_conds.getSize() == NUM_3D_FACES);
+   TBOX_ASSERT(edge_conds.getSize() == NUM_3D_EDGES);
+
+   int num_per_dirs = 0;
+   for (int id = 0; id < 3; id++) {
+      if (periodic(id)) num_per_dirs++;
+   }
+
+   if (num_per_dirs < 2) {  // edge boundary input required
+
+      for (int s = 0; s < NUM_3D_EDGES; s++) {
+
+         std::string bdry_loc_str;
+         switch (s) {
+            case YLO_ZLO_3D: { bdry_loc_str = "boundary_edge_ylo_zlo";
+                               break;
+            }
+            case YHI_ZLO_3D: { bdry_loc_str = "boundary_edge_yhi_zlo";
+                               break;
+            }
+            case YLO_ZHI_3D: { bdry_loc_str = "boundary_edge_ylo_zhi";
+                               break;
+            }
+            case YHI_ZHI_3D: { bdry_loc_str = "boundary_edge_yhi_zhi";
+                               break;
+            }
+            case XLO_ZLO_3D: { bdry_loc_str = "boundary_edge_xlo_zlo";
+                               break;
+            }
+            case XLO_ZHI_3D: { bdry_loc_str = "boundary_edge_xlo_zhi";
+                               break;
+            }
+            case XHI_ZLO_3D: { bdry_loc_str = "boundary_edge_xhi_zlo";
+                               break;
+            }
+            case XHI_ZHI_3D: { bdry_loc_str = "boundary_edge_xhi_zhi";
+                               break;
+            }
+            case XLO_YLO_3D: { bdry_loc_str = "boundary_edge_xlo_ylo";
+                               break;
+            }
+            case XHI_YLO_3D: { bdry_loc_str = "boundary_edge_xhi_ylo";
+                               break;
+            }
+            case XLO_YHI_3D: { bdry_loc_str = "boundary_edge_xlo_yhi";
+                               break;
+            }
+            case XHI_YHI_3D: { bdry_loc_str = "boundary_edge_xhi_yhi";
+                               break;
+            }
+            default: NULL_STATEMENT;
+         }
+
+         bool need_data_read = false;
+         if (num_per_dirs == 0) {
+            need_data_read = true;
+         } else if (periodic(0) &&
+                    (s == YLO_ZLO_3D || s == YHI_ZLO_3D ||
+                     s == YLO_ZHI_3D || s == YHI_ZHI_3D)) {
+            need_data_read = true;
+         } else if (periodic(1) &&
+                    (s == XLO_ZLO_3D || s == XLO_ZHI_3D ||
+                     s == XHI_ZLO_3D || s == XHI_ZHI_3D)) {
+            need_data_read = true;
+         } else if (periodic(2) &&
+                    (s == XLO_YLO_3D || s == XHI_YLO_3D ||
+                     s == XLO_YHI_3D || s == XHI_YHI_3D)) {
+            need_data_read = true;
+         }
+
+         if (need_data_read) {
+            if (bdry_db->keyExists(bdry_loc_str)) {
+               tbox::Pointer<tbox::Database> bdry_loc_db =
+                  bdry_db->getDatabase(bdry_loc_str);
+               if (!bdry_loc_db.isNull()) {
+                  if (bdry_loc_db->keyExists("boundary_condition")) {
+                     std::string bdry_cond_str =
+                        bdry_loc_db->getString("boundary_condition");
+                     if (bdry_cond_str == "XFLOW") {
+                        edge_conds[s] = XFLOW_BC;
+                     } else if (bdry_cond_str == "YFLOW") {
+                        edge_conds[s] = YFLOW_BC;
+                     } else if (bdry_cond_str == "ZFLOW") {
+                        edge_conds[s] = ZFLOW_BC;
+                     } else if (bdry_cond_str == "XREFLECT") {
+                        edge_conds[s] = XREFLECT_BC;
+                     } else if (bdry_cond_str == "YREFLECT") {
+                        edge_conds[s] = YREFLECT_BC;
+                     } else if (bdry_cond_str == "ZREFLECT") {
+                        edge_conds[s] = ZREFLECT_BC;
+                     } else if (bdry_cond_str == "XDIRICHLET") {
+                        edge_conds[s] = XDIRICHLET_BC;
+                     } else if (bdry_cond_str == "YDIRICHLET") {
+                        edge_conds[s] = YDIRICHLET_BC;
+                     } else if (bdry_cond_str == "ZDIRICHLET") {
+                        edge_conds[s] = ZDIRICHLET_BC;
+                     } else if (bdry_cond_str == "XNEUMANN") {
+                        edge_conds[s] = XNEUMANN_BC;
+                     } else if (bdry_cond_str == "YNEUMANN") {
+                        edge_conds[s] = YNEUMANN_BC;
+                     } else if (bdry_cond_str == "ZNEUMANN") {
+                        edge_conds[s] = ZNEUMANN_BC;
+                     } else {
+                        TBOX_ERROR("Unknown edge boundary string = "
+                           << bdry_cond_str << " found in input." << std::endl);
+                     }
+
+                     bool ambiguous_type = false;
+                     if (bdry_cond_str == "XFLOW" ||
+                         bdry_cond_str == "XREFLECT" ||
+                         bdry_cond_str == "XDIRICHLET" ||
+                         bdry_cond_str == "XNEUMANN") {
+                        if (s == YLO_ZLO_3D || s == YHI_ZLO_3D ||
+                            s == YLO_ZHI_3D || s == YHI_ZHI_3D) {
+                           ambiguous_type = true;
+                        }
+                     } else if (bdry_cond_str == "YFLOW" ||
+                                bdry_cond_str == "YREFLECT" ||
+                                bdry_cond_str == "YDIRICHLET" ||
+                                bdry_cond_str == "YNEUMANN") {
+                        if (s == XLO_ZLO_3D || s == XLO_ZHI_3D ||
+                            s == XHI_ZLO_3D || s == XHI_ZHI_3D) {
+                           ambiguous_type = true;
+                        }
+                     } else if (bdry_cond_str == "ZFLOW" ||
+                                bdry_cond_str == "ZREFLECT" ||
+                                bdry_cond_str == "ZDIRICHLET" ||
+                                bdry_cond_str == "ZNEUMANN") {
+                        if (s == XLO_YLO_3D || s == XHI_YLO_3D ||
+                            s == XLO_YHI_3D || s == XHI_YHI_3D) {
+                           ambiguous_type = true;
+                        }
+                     }
+                     if (ambiguous_type) {
+                        TBOX_ERROR("Ambiguous bdry condition "
+                           << bdry_cond_str
+                           << " found for " << bdry_loc_str << std::endl);
+                     }
+
+                     std::string proper_face;
+                     std::string proper_face_data;
+                     bool no_face_data_found = false;
+                     if (bdry_cond_str == "XFLOW" ||
+                         bdry_cond_str == "XDIRICHLET" ||
+                         bdry_cond_str == "XNEUMANN" ||
+                         bdry_cond_str == "XREFLECT") {
+                        if (s == XLO_ZLO_3D || s == XLO_ZHI_3D ||
+                            s == XLO_YLO_3D || s == XLO_YHI_3D) {
+                           proper_face = "XLO";
+                           if (bdry_cond_str == "XFLOW" &&
+                               face_conds[XLO] != FLOW_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "FLOW";
+                           }
+                           if (bdry_cond_str == "XDIRICHLET" &&
+                               face_conds[XLO] != DIRICHLET_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "DIRICHLET";
+                           }
+                           if (bdry_cond_str == "XNEUMANN" &&
+                               face_conds[XLO] != NEUMANN_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "NEUMANN";
+                           }
+                           if (bdry_cond_str == "XREFLECT" &&
+                               face_conds[XLO] != REFLECT_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "REFLECT";
+                           }
+                        } else {
+                           proper_face = "XHI";
+                           if (bdry_cond_str == "XFLOW" &&
+                               face_conds[XHI] != FLOW_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "FLOW";
+                           }
+                           if (bdry_cond_str == "XDIRICHLET" &&
+                               face_conds[XHI] != DIRICHLET_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "DIRICHLET";
+                           }
+                           if (bdry_cond_str == "XNEUMANN" &&
+                               face_conds[XHI] != NEUMANN_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "NEUMANN";
+                           }
+                           if (bdry_cond_str == "XREFLECT" &&
+                               face_conds[XHI] != REFLECT_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "REFLECT";
+                           }
+                        }
+                     } else if (bdry_cond_str == "YFLOW" ||
+                                bdry_cond_str == "YDIRICHLET" ||
+                                bdry_cond_str == "YNEUMANN" ||
+                                bdry_cond_str == "YREFLECT") {
+                        if (s == XLO_ZLO_3D || s == YLO_ZHI_3D ||
+                            s == XLO_YLO_3D || s == XHI_YLO_3D) {
+                           proper_face = "YLO";
+                           if (bdry_cond_str == "YFLOW" &&
+                               face_conds[YLO] != FLOW_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "FLOW";
+                           }
+                           if (bdry_cond_str == "YDIRICHLET" &&
+                               face_conds[YLO] != DIRICHLET_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "DIRICHLET";
+                           }
+                           if (bdry_cond_str == "YNEUMANN" &&
+                               face_conds[YLO] != NEUMANN_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "NEUMANN";
+                           }
+                           if (bdry_cond_str == "YREFLECT" &&
+                               face_conds[YLO] != REFLECT_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "REFLECT";
+                           }
+                        } else {
+                           proper_face = "YHI";
+                           if (bdry_cond_str == "YFLOW" &&
+                               face_conds[YHI] != FLOW_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "FLOW";
+                           }
+                           if (bdry_cond_str == "YDIRICHLET" &&
+                               face_conds[YHI] != DIRICHLET_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "DIRICHLET";
+                           }
+                           if (bdry_cond_str == "YNEUMANN" &&
+                               face_conds[YHI] != NEUMANN_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "NEUMANN";
+                           }
+                           if (bdry_cond_str == "YREFLECT" &&
+                               face_conds[YHI] != REFLECT_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "REFLECT";
+                           }
+                        }
+                     } else if (bdry_cond_str == "ZFLOW" ||
+                                bdry_cond_str == "ZDIRICHLET" ||
+                                bdry_cond_str == "ZNEUMANN" ||
+                                bdry_cond_str == "ZREFLECT") {
+                        if (s == XLO_ZLO_3D || s == YHI_ZLO_3D ||
+                            s == XLO_ZLO_3D || s == XHI_ZLO_3D) {
+                           proper_face = "ZLO";
+                           if (bdry_cond_str == "ZFLOW" &&
+                               face_conds[ZLO] != FLOW_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "FLOW";
+                           }
+                           if (bdry_cond_str == "ZDIRICHLET" &&
+                               face_conds[ZLO] != DIRICHLET_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "DIRICHLET";
+                           }
+                           if (bdry_cond_str == "ZNEUMANN" &&
+                               face_conds[ZLO] != NEUMANN_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "NEUMANN";
+                           }
+                           if (bdry_cond_str == "ZREFLECT" &&
+                               face_conds[ZLO] != REFLECT_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "REFLECT";
+                           }
+                        } else {
+                           proper_face = "ZHI";
+                           if (bdry_cond_str == "ZFLOW" &&
+                               face_conds[ZHI] != FLOW_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "FLOW";
+                           }
+                           if (bdry_cond_str == "ZDIRICHLET" &&
+                               face_conds[ZHI] != DIRICHLET_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "DIRICHLET";
+                           }
+                           if (bdry_cond_str == "ZNEUMANN" &&
+                               face_conds[ZHI] != NEUMANN_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "NEUMANN";
+                           }
+                           if (bdry_cond_str == "ZREFLECT" &&
+                               face_conds[ZHI] != REFLECT_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "REFLECT";
+                           }
+                        }
+                     }
+                     if (no_face_data_found) {
+                        TBOX_ERROR(
+                           "Bdry condition " << bdry_cond_str
+                           << " found for "
+                           << bdry_loc_str
+                           << "\n but no "
+                           << proper_face_data
+                           << " data found for face "
+                           << proper_face << std::endl);
+                     }
+                  } else {
+                     TBOX_ERROR("'boundary_condition' entry missing from "
+                        << bdry_loc_str << " input database." << std::endl);
+                  }
+               }
+            } else {
+               TBOX_ERROR(bdry_loc_str
+                  << " database entry not found in input." << std::endl);
+            }
+
+         } // if (need_data_read)
+
+      } // for (int s = 0 ...
+
+   } // if (num_per_dirs < 2)
+
+}
+
+/*
+ * Private function to read 3D node boundary data from input database.
+ */
+
+void CartesianBoundaryUtilities3::read3dBdryNodes(
+   tbox::Pointer<tbox::Database> bdry_db,
+   const tbox::Array<int>& face_conds,
+   tbox::Array<int>& node_conds,
+   const hier::IntVector& periodic)
+{
+   TBOX_DIM_ASSERT(periodic.getDim() == tbox::Dimension(3));
+
+   TBOX_ASSERT(!bdry_db.isNull());
+   TBOX_ASSERT(face_conds.getSize() == NUM_3D_FACES);
+   TBOX_ASSERT(node_conds.getSize() == NUM_3D_NODES);
+
+   int num_per_dirs = 0;
+   for (int id = 0; id < 3; id++) {
+      if (periodic(id)) num_per_dirs++;
+   }
+
+   if (num_per_dirs < 1) { // node boundary data required
+
+      for (int s = 0; s < NUM_3D_NODES; s++) {
+
+         std::string bdry_loc_str;
+         switch (s) {
+            case XLO_YLO_ZLO: { bdry_loc_str = "boundary_node_xlo_ylo_zlo";
+                                break;
+            }
+            case XHI_YLO_ZLO: { bdry_loc_str = "boundary_node_xhi_ylo_zlo";
+                                break;
+            }
+            case XLO_YHI_ZLO: { bdry_loc_str = "boundary_node_xlo_yhi_zlo";
+                                break;
+            }
+            case XHI_YHI_ZLO: { bdry_loc_str = "boundary_node_xhi_yhi_zlo";
+                                break;
+            }
+            case XLO_YLO_ZHI: { bdry_loc_str = "boundary_node_xlo_ylo_zhi";
+                                break;
+            }
+            case XHI_YLO_ZHI: { bdry_loc_str = "boundary_node_xhi_ylo_zhi";
+                                break;
+            }
+            case XLO_YHI_ZHI: { bdry_loc_str = "boundary_node_xlo_yhi_zhi";
+                                break;
+            }
+            case XHI_YHI_ZHI: { bdry_loc_str = "boundary_node_xhi_yhi_zhi";
+                                break;
+            }
+            default: NULL_STATEMENT;
+         }
+
+         if (bdry_db->keyExists(bdry_loc_str)) {
+            tbox::Pointer<tbox::Database> bdry_loc_db =
+               bdry_db->getDatabase(bdry_loc_str);
+            if (!bdry_loc_db.isNull()) {
+               if (bdry_loc_db->keyExists("boundary_condition")) {
+                  std::string bdry_cond_str =
+                     bdry_loc_db->getString("boundary_condition");
+                  if (bdry_cond_str == "XFLOW") {
+                     node_conds[s] = XFLOW_BC;
+                  } else if (bdry_cond_str == "YFLOW") {
+                     node_conds[s] = YFLOW_BC;
+                  } else if (bdry_cond_str == "ZFLOW") {
+                     node_conds[s] = ZFLOW_BC;
+                  } else if (bdry_cond_str == "XREFLECT") {
+                     node_conds[s] = XREFLECT_BC;
+                  } else if (bdry_cond_str == "YREFLECT") {
+                     node_conds[s] = YREFLECT_BC;
+                  } else if (bdry_cond_str == "ZREFLECT") {
+                     node_conds[s] = ZREFLECT_BC;
+                  } else if (bdry_cond_str == "XDIRICHLET") {
+                     node_conds[s] = XDIRICHLET_BC;
+                  } else if (bdry_cond_str == "YDIRICHLET") {
+                     node_conds[s] = YDIRICHLET_BC;
+                  } else if (bdry_cond_str == "ZDIRICHLET") {
+                     node_conds[s] = ZDIRICHLET_BC;
+                  } else if (bdry_cond_str == "XNEUMANN") {
+                     node_conds[s] = XNEUMANN_BC;
+                  } else if (bdry_cond_str == "YNEUMANN") {
+                     node_conds[s] = YNEUMANN_BC;
+                  } else if (bdry_cond_str == "ZNEUMANN") {
+                     node_conds[s] = ZNEUMANN_BC;
+                  } else {
+                     TBOX_ERROR("Unknown node boundary string = "
+                        << bdry_cond_str << " found in input." << std::endl);
+                  }
+
+                  std::string proper_face;
+                  std::string proper_face_data;
+                  bool no_face_data_found = false;
+                  if (bdry_cond_str == "XFLOW" ||
+                      bdry_cond_str == "XDIRICHLET" ||
+                      bdry_cond_str == "XNEUMANN" ||
+                      bdry_cond_str == "XREFLECT") {
+                     if (s == XLO_YLO_ZLO || s == XLO_YHI_ZLO ||
+                         s == XLO_YLO_ZHI || s == XLO_YHI_ZHI) {
+                        proper_face = "XLO";
+                        if (bdry_cond_str == "XFLOW" &&
+                            face_conds[XLO] != FLOW_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "FLOW";
+                        }
+                        if (bdry_cond_str == "XDIRICHLET" &&
+                            face_conds[XLO] != DIRICHLET_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "DIRICHLET";
+                        }
+                        if (bdry_cond_str == "XNEUMANN" &&
+                            face_conds[XLO] != NEUMANN_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "NEUMANN";
+                        }
+                        if (bdry_cond_str == "XREFLECT" &&
+                            face_conds[XLO] != REFLECT_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "REFLECT";
+                        }
+                     } else {
+                        proper_face = "XHI";
+                        if (bdry_cond_str == "XFLOW" &&
+                            face_conds[XHI] != FLOW_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "FLOW";
+                        }
+                        if (bdry_cond_str == "XDIRICHLET" &&
+                            face_conds[XHI] != DIRICHLET_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "DIRICHLET";
+                        }
+                        if (bdry_cond_str == "XNEUMANN" &&
+                            face_conds[XHI] != NEUMANN_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "NEUMANN";
+                        }
+                        if (bdry_cond_str == "XREFLECT" &&
+                            face_conds[XHI] != REFLECT_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "REFLECT";
+                        }
+                     }
+                  } else if (bdry_cond_str == "YFLOW" ||
+                             bdry_cond_str == "YDIRICHLET" ||
+                             bdry_cond_str == "YNEUMANN" ||
+                             bdry_cond_str == "YREFLECT") {
+                     if (s == XLO_YLO_ZLO || s == XHI_YLO_ZLO ||
+                         s == XLO_YLO_ZHI || s == XHI_YLO_ZHI) {
+                        proper_face = "YLO";
+                        if (bdry_cond_str == "YFLOW" &&
+                            face_conds[YLO] != FLOW_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "FLOW";
+                        }
+                        if (bdry_cond_str == "YDIRICHLET" &&
+                            face_conds[YLO] != DIRICHLET_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "DIRICHLET";
+                        }
+                        if (bdry_cond_str == "YNEUMANN" &&
+                            face_conds[YLO] != NEUMANN_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "NEUMANN";
+                        }
+                        if (bdry_cond_str == "YREFLECT" &&
+                            face_conds[YLO] != REFLECT_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "REFLECT";
+                        }
+                     } else {
+                        proper_face = "YHI";
+                        if (bdry_cond_str == "YFLOW" &&
+                            face_conds[YHI] != FLOW_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "FLOW";
+                        }
+                        if (bdry_cond_str == "YDIRICHLET" &&
+                            face_conds[YHI] != DIRICHLET_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "DIRICHLET";
+                        }
+                        if (bdry_cond_str == "YNEUMANN" &&
+                            face_conds[YHI] != NEUMANN_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "NEUMANN";
+                        }
+                        if (bdry_cond_str == "YREFLECT" &&
+                            face_conds[YHI] != REFLECT_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "REFLECT";
+                        }
+                     }
+                  } else if (bdry_cond_str == "ZFLOW" ||
+                             bdry_cond_str == "ZDIRICHLET" ||
+                             bdry_cond_str == "ZNEUMANN" ||
+                             bdry_cond_str == "ZREFLECT") {
+                     if (s == XLO_YLO_ZLO || s == XHI_YLO_ZLO ||
+                         s == XLO_YHI_ZLO || s == XHI_YHI_ZLO) {
+                        proper_face = "ZLO";
+                        if (bdry_cond_str == "ZFLOW" &&
+                            face_conds[ZLO] != FLOW_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "FLOW";
+                        }
+                        if (bdry_cond_str == "ZDIRICHLET" &&
+                            face_conds[ZLO] != DIRICHLET_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "DIRICHLET";
+                        }
+                        if (bdry_cond_str == "ZNEUMANN" &&
+                            face_conds[ZLO] != NEUMANN_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "NEUMANN";
+                        }
+                        if (bdry_cond_str == "ZREFLECT" &&
+                            face_conds[ZLO] != REFLECT_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "REFLECT";
+                        }
+                     } else {
+                        proper_face = "ZHI";
+                        if (bdry_cond_str == "ZFLOW" &&
+                            face_conds[ZHI] != FLOW_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "FLOW";
+                        }
+                        if (bdry_cond_str == "ZDIRICHLET" &&
+                            face_conds[ZHI] != DIRICHLET_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "DIRICHLET";
+                        }
+                        if (bdry_cond_str == "ZNEUMANN" &&
+                            face_conds[ZHI] != NEUMANN_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "NEUMANN";
+                        }
+                        if (bdry_cond_str == "ZREFLECT" &&
+                            face_conds[ZHI] != REFLECT_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "REFLECT";
+                        }
+                     }
+                  }
+                  if (no_face_data_found) {
+                     TBOX_ERROR(
+                        "Bdry condition " << bdry_cond_str
+                        << " found for "
+                        << bdry_loc_str
+                        << "\n but no "
+                        << proper_face_data
+                        << " data found for face "
+                        << proper_face << std::endl);
+                  }
+
+               } else {
+                  TBOX_ERROR("'boundary_condition' entry missing from "
+                     << bdry_loc_str << " input database." << std::endl);
+               }
+            }
+         } else {
+            TBOX_ERROR(bdry_loc_str
+               << " database entry not found in input." << std::endl);
+         }
+
+      } // for (int s = 0 ...
+
+   } // if (num_per_dirs < 1)
+
+}
+
+/*
+ * Private function to get boundary orientation information for
+ * 3D boundary condition checking.  Called from checkBdryData().
+ */
+
+void CartesianBoundaryUtilities3::get3dBdryDirectionCheckValues(
+   int& idir,
+   int& offsign,
+   int btype,
+   int bloc,
+   int bcase)
+{
+
+   std::string bdry_type_str;
+
+   if (btype == FACE3D_BDRY_TYPE) {
+
+      bdry_type_str = "FACE";
+
+      if (bloc == XLO || bloc == XHI) {
+         idir = 0;
+         if (bloc == XLO) {
+            offsign = -1;
+         } else {
+            offsign = 1;
+         }
+      } else if (bloc == YLO || bloc == YHI) {
+         idir = 1;
+         if (bloc == YLO) {
+            offsign = -1;
+         } else {
+            offsign = 1;
+         }
+      } else if (bloc == ZLO || bloc == ZHI) {
+         idir = 2;
+         if (bloc == ZLO) {
+            offsign = -1;
+         } else {
+            offsign = 1;
+         }
+      } else {
+         TBOX_ERROR(
+            "Unknown boundary location " << bloc
+            <<
+            " passed to CartesianBoundaryUtilities3::checkBdryData()"
+            << "\n for "
+            << bdry_type_str << " boundary " << std::endl);
+      }
+
+   } else if (btype == EDGE3D_BDRY_TYPE) {
+
+      bdry_type_str = "EDGE";
+
+      bool bad_case = false;
+      if (bcase == XFLOW_BC || bcase == XREFLECT_BC ||
+          bcase == XDIRICHLET_BC || bcase == XNEUMANN_BC) {
+         idir = 0;
+         if (bloc == XLO_ZLO_3D || bloc == XLO_ZHI_3D ||
+             bloc == XLO_YLO_3D || bloc == XLO_YHI_3D) {
+            offsign = -1;
+         } else if (bloc == XHI_ZLO_3D || bloc == XHI_ZHI_3D ||
+                    bloc == XHI_YLO_3D || bloc == XHI_YHI_3D) {
+            offsign = 1;
+         } else {
+            bad_case = true;
+         }
+      } else if (bcase == YFLOW_BC || bcase == YREFLECT_BC ||
+                 bcase == YDIRICHLET_BC || bcase == YNEUMANN_BC) {
+         idir = 1;
+         if (bloc == YLO_ZLO_3D || bloc == YLO_ZHI_3D ||
+             bloc == XLO_YLO_3D || bloc == XHI_YLO_3D) {
+            offsign = -1;
+         } else if (bloc == YHI_ZLO_3D || bloc == YHI_ZHI_3D ||
+                    bloc == XLO_YHI_3D || bloc == XHI_YHI_3D) {
+            offsign = 1;
+         } else {
+            bad_case = true;
+         }
+      } else if (bcase == ZFLOW_BC || bcase == ZREFLECT_BC ||
+                 bcase == ZDIRICHLET_BC || bcase == ZNEUMANN_BC) {
+         idir = 2;
+         if (bloc == YLO_ZLO_3D || bloc == YHI_ZLO_3D ||
+             bloc == XLO_ZLO_3D || bloc == XHI_ZLO_3D) {
+            offsign = -1;
+         } else if (bloc == YLO_ZHI_3D || bloc == YHI_ZHI_3D ||
+                    bloc == XLO_ZHI_3D || bloc == XHI_ZHI_3D) {
+            offsign = 1;
+         } else {
+            bad_case = true;
+         }
+      }
+      if (bad_case) {
+         TBOX_ERROR(
+            "Unknown or ambigous bcase " << bcase
+            <<
+            " passed to CartesianBoundaryUtilities3::checkBdryData()"
+            << "\n for " << bdry_type_str
+            << " at location " << bloc
+            << std::endl);
+      }
+
+   } else if (btype == NODE3D_BDRY_TYPE) {
+
+      bdry_type_str = "NODE";
+
+      if (bcase == XFLOW_BC || bcase == XREFLECT_BC ||
+          bcase == XDIRICHLET_BC || bcase == XNEUMANN_BC) {
+         idir = 0;
+         if (bloc == XLO_YLO_ZLO || bloc == XLO_YHI_ZLO ||
+             bloc == XLO_YLO_ZHI || bloc == XLO_YHI_ZHI) {
+            offsign = -1;
+         } else {
+            offsign = 1;
+         }
+      } else if (bcase == YFLOW_BC || bcase == YREFLECT_BC ||
+                 bcase == YDIRICHLET_BC || bcase == YNEUMANN_BC) {
+         idir = 1;
+         if (bloc == XLO_YLO_ZLO || bloc == XHI_YLO_ZLO ||
+             bloc == XLO_YLO_ZHI || bloc == XHI_YLO_ZHI) {
+            offsign = -1;
+         } else {
+            offsign = 1;
+         }
+      } else if (bcase == ZFLOW_BC || bcase == ZREFLECT_BC ||
+                 bcase == ZDIRICHLET_BC || bcase == ZNEUMANN_BC) {
+         idir = 2;
+         if (bloc == XLO_YLO_ZLO || bloc == XHI_YLO_ZLO ||
+             bloc == XLO_YHI_ZLO || bloc == XHI_YHI_ZLO) {
+            offsign = -1;
+         } else {
+            offsign = 1;
+         }
+      }
+
+   } else {
+      TBOX_ERROR(
+         "Unknown boundary type " << btype
+         <<
+         " passed to CartesianBoundaryUtilities3::checkBdryData()"
+         << "\n for " << bdry_type_str
+         << " at location " << bloc
+         << std::endl);
+   }
+
+}
+
+/*
+ * Private function to stuff 3D boundary contants into Fortran common blocks
+ */
+
+void CartesianBoundaryUtilities3::stuff3dBdryFortConst()
+{
+   F77_FUNC(stufcartbdryloc3d, STUFCARTBDRYLOC3D) (XLO, XHI, YLO, YHI, ZLO, ZHI,
+      YLO_ZLO_3D, YHI_ZLO_3D, YLO_ZHI_3D, YHI_ZHI_3D,
+      XLO_ZLO_3D, XLO_ZHI_3D, XHI_ZLO_3D, XHI_ZHI_3D,
+      XLO_YLO_3D, XHI_YLO_3D, XLO_YHI_3D, XHI_YHI_3D,
+      XLO_YLO_ZLO, XHI_YLO_ZLO, XLO_YHI_ZLO, XHI_YHI_ZLO,
+      XLO_YLO_ZHI, XHI_YLO_ZHI, XLO_YHI_ZHI, XHI_YHI_ZHI);
+   F77_FUNC(stufcartbdrycond3d, STUFCARTBDRYCOND3D) (FLOW_BC,
+      XFLOW_BC, YFLOW_BC, ZFLOW_BC,
+      REFLECT_BC,
+      XREFLECT_BC, YREFLECT_BC, ZREFLECT_BC,
+      DIRICHLET_BC,
+      XDIRICHLET_BC, YDIRICHLET_BC, ZDIRICHLET_BC,
+      NEUMANN_BC,
+      XNEUMANN_BC, YNEUMANN_BC, ZNEUMANN_BC);
+   s_fortran_constants_stuffed = true;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/CartesianBoundaryUtilities3.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/CartesianBoundaryUtilities3.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,343 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility routines for manipulating Cartesian 3d boundary data 
+ *
+ ************************************************************************/
+
+#ifndef included_appu_CartesianBoundaryUtilities3
+#define included_appu_CartesianBoundaryUtilities3
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/appu/BoundaryUtilityStrategy.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace appu {
+
+/*!
+ * @brief Class CartesianBoundaryUtilities2 is a utility class that
+ * simplifies the implementation of simple physical boundary data in
+ * 3 spatial dimensions.  It contains routines for reading boundary data
+ * information from input files, applying those boundary conditions,
+ * and error checking boundary data.  These routines apply to the
+ * case of cell-centered double data only.  One may use all of these
+ * capabilities, or use the input reading, boundary setting, and error
+ * checking routines independently.
+ *
+ * To use the boundary condition input reading capabilities, the format
+ * of the input file section containing the boundary information must
+ * be as described next.  Boundary face, node, and edge entries are only
+ * required for those that are not filled automatically when periodic
+ * conditions apply.
+ *
+ * The boundary condition for face "*" is provided in a section as follows:
+ *
+ * \verbatim
+ *
+ *    boundary_face_* {
+ *       boundary_condition  = ...  // boundary condition std::string identifier
+ *       // Any problem-specific boundary data read by user routines
+ *       // is placed here...
+ *    }
+ *
+ * Allowable face identifiers (i.e., values for "*") are:
+ *       xlo, xhi, ylo, yhi, zlo, zhi
+ * Supported face boundary_condition std::string values are:
+ *       "FLOW", "REFLECT", "DIRICHLET", "NEUMANN"
+ *
+ * \endverbatim
+ *
+ * The boundary condition for edge "*" is provided in a section as follows:
+ *
+ * \verbatim
+ *
+ *    boundary_edge_* {
+ *       boundary_condition  = ...  // boundary condition std::string identifier
+ *    }
+ *
+ * Allowable edge identifiers (i.e., values for "*") are:
+ *       ylo_zlo, yhi_zlo, ylo_zhi, yhi_zhi,
+ *       xlo_zlo, xlo_zhi, xhi_zlo, xhi_zhi,
+ *       xlo_ylo, xhi_ylo, xlo_yhi, xhi_yhi
+ * Supported edge boundary_condition std::string values are:
+ *       "XFLOW", "YFLOW", "ZFLOW",
+ *       "XREFLECT", "YREFLECT", "ZREFLECT",
+ *       "XDIRICHLET", "YDIRICHLET", "ZDIRICHLET"
+ *       "XNEUMANN", "YNEUMANN", "ZNEUMANN"
+ *
+ * \endverbatim
+ *
+ * Note that edge conditions must be consistent with adjacent face conditions.
+ *
+ * The boundary condition for node "*" is provided in a section as follows:
+ *
+ * \verbatim
+ *
+ *    boundary_node_* {
+ *       boundary_condition  = ...  // boundary condition std::string identifier
+ *    }
+ *
+ * Allowable node identifiers (i.e., values for "*") are:
+ *       ylo_zlo, yhi_zlo, ylo_zhi, yhi_zhi,
+ *       xlo_zlo, xlo_zhi, xhi_zlo, xhi_zhi,
+ *       xlo_ylo, xhi_ylo, xlo_yhi, xhi_yhi
+ * Supported node boundary_condition values are:
+ *       "XFLOW", "YFLOW", "ZFLOW",
+ *       "XREFLECT", "YREFLECT", "ZREFLECT",
+ *       "XDIRICHLET", "YDIRICHLET", "ZDIRICHLET"
+ *       "XNEUMANN", "YNEUMANN", "ZNEUMANN"
+ *
+ * \endverbatim
+ *
+ * Note that node conditions must be consistent with adjacent face conditions.
+ *
+ * See the include file CartesianBoundaryDefines.h for integer constant
+ * definitions that apply for the various boundary types, locations,
+ * and boundary conditions.  If you choose to use the input reading
+ * capabilities only and write your own boundary condition routines in
+ * FORTRAN, you should note that the integer constants for the various
+ * boundary condition types and locations are automatically "stuffed" into
+ * FORTRAN common blocks.  This avoids potential problems with
+ * inconsistencies between C++ and FORTRAN usage.  Please see the
+ * FORTRAN include file cartbdryparams3d.i for details.
+ *
+ * @see appu::BoundaryUtilityStrategy3
+ */
+
+struct CartesianBoundaryUtilities3 {
+public:
+   /*!
+    * Function to read 3d boundary data from input database.
+    * The integer boundary condition types are placed in the integer
+    * arrays supplied by the caller (typically, the concrete
+    * BoundaryUtilityStrategy object provided).  When DIRICHLET or
+    * NEUMANN conditions are specified, control is passed to the
+    * BoundaryUtilityStrategy to read the boundary state data specific to
+    * the problem.
+    *
+    * Errors will be reported and the program will abort whenever necessary
+    * boundary condition information is missing in the input database, or
+    * when the data read in is either unknown or inconsistent.  The periodic
+    * domain information is used to determine which boundary face, edge, or
+    * node entries are not required from input.  Error checking
+    * requires that node and edge boundary conditions are consistent
+    * with those specified for the faces.
+    *
+    *
+    * When assertion checking is active, assertions will result when any
+    * of the pointer arguments is null, or an array is passed in with the
+    * the wrong size.
+    *
+    * @param bdry_strategy user-defined object that reads DIRICHLET or NEUMANN
+    *                      conditions
+    * @param bdry_db       input database containing all boundary data
+    * @param face_conds    array into which integer face boundary condition types
+    *                      are read
+    * @param edge_conds    array into which integer edge boundary condition types
+    *                      are read
+    * @param node_conds    array into which integer node boundary condition types
+    *                      are read
+    * @param periodic      integer vector specifying which coordinate
+    *                      directions are periodic (e.g., value returned from
+    *                      GridGeometry2::getPeriodicShift())
+    */
+   static void
+   readBoundaryInput(
+      BoundaryUtilityStrategy* bdry_strategy,
+      tbox::Pointer<tbox::Database> bdry_db,
+      tbox::Array<int>& face_conds,
+      tbox::Array<int>& edge_conds,
+      tbox::Array<int>& node_conds,
+      const hier::IntVector& periodic);
+
+   /*!
+    * Function to fill 3d face boundary values for a patch.
+    *
+    * When assertion checking is active, assertions will result when any
+    * of the pointer arguments is null, or an array is passed in with the
+    * the wrong size.
+    *
+    * @param varname             String name of variable (for error reporting).
+    * @param vardata             Cell-centered patch data object to fill.
+    * @param patch               hier::Patch on which data object lives.
+    * @param ghost_width_to_fill Width of ghost region to fill.
+    * @param bdry_face_conds     tbox::Array of boundary condition types for patch faces.
+    * @param bdry_face_values    tbox::Array of boundary values for patch faces.
+    */
+   static void
+   fillFaceBoundaryData(
+      const std::string& varname,
+      tbox::Pointer<pdat::CellData<double> >& vardata,
+      const hier::Patch& patch,
+      const hier::IntVector& ghost_width_to_fill,
+      const tbox::Array<int>& bdry_face_conds,
+      const tbox::Array<double>& bdry_face_values);
+
+   /*!
+    * Function to fill 3d edge boundary values for a patch.
+    *
+    * When assertion checking is active, assertions will result when any
+    * of the pointer arguments is null, or an array is passed in with the
+    * the wrong size.
+    *
+    * @param varname             String name of variable (for error reporting).
+    * @param vardata             Cell-centered patch data object to fill.
+    * @param patch               hier::Patch on which data object lives.
+    * @param ghost_width_to_fill Width of ghost region to fill.
+    * @param bdry_edge_conds     tbox::Array of boundary condition types for patch edges.
+    * @param bdry_face_values    tbox::Array of boundary values for patch faces.
+    */
+   static void
+   fillEdgeBoundaryData(
+      const std::string& varname,
+      tbox::Pointer<pdat::CellData<double> >& vardata,
+      const hier::Patch& patch,
+      const hier::IntVector& ghost_width_to_fill,
+      const tbox::Array<int>& bdry_edge_conds,
+      const tbox::Array<double>& bdry_face_values);
+
+   /*!
+    * Function to fill 3d node boundary values for a patch.
+    *
+    * When assertion checking is active, assertions will result when any
+    * of the pointer arguments is null, or an array is passed in with the
+    * the wrong size.
+    *
+    * @param varname             String name of variable (for error reporting).
+    * @param vardata             Cell-centered patch data object to fill.
+    * @param patch               hier::Patch on which data object lives.
+    * @param ghost_width_to_fill Width of ghost region to fill.
+    * @param bdry_node_conds     tbox::Array of boundary condition types for patch nodes.
+    * @param bdry_face_values    tbox::Array of boundary values for patch faces.
+    */
+   static void
+   fillNodeBoundaryData(
+      const std::string& varname,
+      tbox::Pointer<pdat::CellData<double> >& vardata,
+      const hier::Patch& patch,
+      const hier::IntVector& ghost_width_to_fill,
+      const tbox::Array<int>& bdry_node_conds,
+      const tbox::Array<double>& bdry_face_values);
+
+   /*!
+    * Function that returns the integer face boundary location
+    * corresponding to the given edge location and edge boundary
+    * condition.
+    *
+    * If the edge boundary condition type or edge location are unknown,
+    * or the boundary condition type is inconsistant with the edge location
+    * an error results.
+    *
+    * @return Integer face location for edge location and boundary condition type.
+    *
+    * @param edge_loc   Integer location for edge.
+    * @param edge_btype Integer boundary condition type for edge.
+    */
+   static int
+   getFaceLocationForEdgeBdry(
+      int edge_loc,
+      int edge_btype);
+
+   /*!
+    * Function that returns the integer face boundary location
+    * corresponding to the given node location and node boundary
+    * condition.
+    *
+    * If the node boundary condition type or node location are unknown,
+    * or the boundary condition type is inconsistant with the node location
+    * an error results.
+    *
+    * @return Integer face location for node location and boundary condition type.
+    *
+    * @param node_loc   Integer location for node.
+    * @param node_btype Integer boundary condition type for node.
+    */
+   static int
+   getFaceLocationForNodeBdry(
+      int node_loc,
+      int node_btype);
+
+   /*!
+    * Function to check 3d boundary data for a patch data quantity on
+    * a patch after it is set.  A warning message will be sent to log
+    * file for each bad boundary value that is found.
+    *
+    * When assertion checking is active, assertions will result when any
+    * of the pointer arguments is null, or an array is passed in with the
+    * the wrong size.
+    *
+    * @return Integer number of bad boundary values found.
+    *
+    * @param varname       String name of variable (for error reporting).
+    * @param patch         hier::Patch on which data object lives.
+    * @param data_id       hier::Patch data index for data on patch.
+    * @param depth         Depth index of patch data to check.
+    * @param gcw_to_check  Width of ghost region to check.
+    * @param bbox          Boundary box to check.
+    * @param bcase         Boundary condition type for given edge or node.
+    * @param bstate        Boundary value that applies in DIRICHLET or NEUMANN case.
+    */
+   static int
+   checkBdryData(
+      const std::string& varname,
+      const hier::Patch& patch,
+      int data_id,
+      int depth,
+      const hier::IntVector& gcw_to_check,
+      const hier::BoundaryBox& bbox,
+      int bcase,
+      double bstate);
+
+private:
+   static bool s_fortran_constants_stuffed;
+
+   static void
+   read3dBdryFaces(
+      BoundaryUtilityStrategy* bdry_strategy,
+      tbox::Pointer<tbox::Database> bdry_db,
+      tbox::Array<int>& face_conds,
+      const hier::IntVector& periodic);
+
+   static void
+   read3dBdryEdges(
+      tbox::Pointer<tbox::Database> bdry_db,
+      const tbox::Array<int>& face_conds,
+      tbox::Array<int>& edge_conds,
+      const hier::IntVector& periodic);
+
+   static void
+   read3dBdryNodes(
+      tbox::Pointer<tbox::Database> bdry_db,
+      const tbox::Array<int>& face_conds,
+      tbox::Array<int>& node_conds,
+      const hier::IntVector& periodic);
+
+   static void
+   get3dBdryDirectionCheckValues(
+      int& idir,
+      int& offsign,
+      int btype,
+      int bloc,
+      int bcase);
+
+   static void
+   stuff3dBdryFortConst();
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/CubesPatchInterface.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/CubesPatchInterface.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,149 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Cubes embedded boundary shape 
+ *
+ ************************************************************************/
+//
+// THIS CLASS IS CURRENTLY EMPTY BECAUSE OF LICENSE ISSUES WITH CUBES.
+// PLEASE CONTACT SAMRAI DEVELOPERS IF YOU ARE INTERESTED IN USING
+// THE CUBES INTERFACES.
+//
+#ifndef included_CubesPatchInterface_C
+#define included_CubesPatchInterface_C
+
+#include "SAMRAI/appu/CubesPatchInterface.h"
+
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/appu/CutCell.h"
+#include "SAMRAI/appu/EmbeddedBoundaryDefines.h"
+#include "SAMRAI/pdat/IndexData.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace appu {
+
+tbox::Pointer<tbox::Timer> CubesPatchInterface::t_cubes;
+tbox::Pointer<tbox::Timer> CubesPatchInterface::t_set_cutcells;
+tbox::Pointer<tbox::Timer> CubesPatchInterface::t_set_cutareas;
+
+/*
+ *******************************************************************
+ *
+ *  Constructor
+ *
+ *******************************************************************
+ */
+CubesPatchInterface::CubesPatchInterface(
+   const std::string& object_name,
+   tbox::Pointer<tbox::Database> input_db,
+   tbox::Pointer<geom::CartesianGridGeometry> grid_geom,
+   hier::IntVector nghosts)
+{
+   NULL_USE(grid_geom);
+   NULL_USE(nghosts);
+
+   d_object_name = object_name;
+
+   getFromInput(input_db);
+
+}
+
+/*
+ *******************************************************************
+ *
+ *  Destructor
+ *
+ *******************************************************************
+ */
+CubesPatchInterface::~CubesPatchInterface()
+{
+
+}
+
+/*
+ *******************************************************************
+ *
+ *  Return cubes patch information
+ *
+ *******************************************************************
+ */
+void CubesPatchInterface::calculateCutCellInfo(
+   tbox::Pointer<hier::Patch>& patch,
+   const int cell_flag_data_id,
+   const int cell_vol_data_id,
+   const int cutcell_data_id)
+{
+   NULL_USE(patch);
+   NULL_USE(cell_flag_data_id);
+   NULL_USE(cell_vol_data_id);
+   NULL_USE(cutcell_data_id);
+
+   TBOX_ERROR(
+      d_object_name << ":Unable to use CUBES due to license issues."
+      <<
+      "\nPlease contact SAMRAI developers to find out more"
+      << "\ninformation." << std::endl);
+
+}
+
+/*
+ *******************************************************************
+ *
+ * Set whether or not to record areas and normal.  By default, this
+ * is turned on.
+ *
+ *******************************************************************
+ */
+void CubesPatchInterface::setRecordAreasAndNormal(
+   const bool record_an)
+{
+   d_record_areas_and_normal = record_an;
+}
+
+/*
+ *******************************************************************
+ *
+ *  Read info from input
+ *
+ *******************************************************************
+ */
+void CubesPatchInterface::getFromInput(
+   tbox::Pointer<tbox::Database> db)
+{
+   NULL_USE(db);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   TBOX_ERROR(
+      d_object_name << ":Unable to use CUBES due to license issues."
+      <<
+      "\nPlease contact SAMRAI developers to find out more"
+      << "\ninformation." << std::endl);
+
+}
+
+/*
+ *******************************************************************
+ *
+ *  Dump (to supplied os) class information
+ *
+ *******************************************************************
+ */
+void CubesPatchInterface::printClassData(
+   std::ostream& os) const
+{
+   os << "d_object_name = " << d_object_name << std::endl;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/CubesPatchInterface.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/CubesPatchInterface.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,194 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Cubes embedded boundary shape 
+ *
+ ************************************************************************/
+
+#ifndef included_CubesPatchInterface
+#define included_CubesPatchInterface
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Timer.h"
+
+namespace SAMRAI {
+namespace appu {
+
+/**
+ * This class provides an interface to the Cubes geometry library, the
+ * embedded boundary grid generator in the Cart3D package from NASA Ames
+ * (http://people.nas.nasa.gov/~aftosmis/cart3d/).
+ *
+ * Use of this class first requires that you link with the Cubes library.
+ * The package may be obtained by filling out a license agreement at the
+ * website listed above. Next, you must specify a 'CubesPatchInterface {...}"
+ * input entry in the input for the EmbeddedBoundaryGeometry class.  In
+ * this input you specify the name of the triangulated surface grid file
+ * that defines the surface geometry.
+ *
+ * Once an instance of the class is created, SAMRAI will pass patch information
+ * to the "calculateCutCellInfo()" class whenever an embedded boundary is
+ * constructed on a new level.  Cubes computes the list of cut cells on the
+ * patch and stores them as IndexData, templated on the CutCell class.
+ *
+ * Required input keys and data types:
+ *
+ *    - \b surface_tri_file
+ *       string indicating the name of the triangulated surface file that
+ *       defines the surface geometry.
+ *
+ *    - \b max_levels
+ *       int value indicating the maximum number of levels used to construct
+ *       the ADT tree in Cubes.  In general, this should be equal to the
+ *       maximum number of levels in the hierarchy.  Because it is mainly used
+ *       for storage, it may be larger, but should never be smaller than the
+ *       number of hierarchy levels.
+ *
+ * Optional input keys:
+ *
+ *    - \b  verbose
+ *       boolean turns on the 'verbose' flag in cubes.
+ *
+ * A sample input file entry might look like:
+ *
+ * \verbatim
+ *
+ *   CubesPatchInterface {
+ *      surface_tri_file = "slc-rev.tri"
+ *      max_levels       = 5
+ *      verbose          = TRUE
+ *   }
+ *
+ * \endverbatim
+ *
+ * @see appu::EmbeddedBoundaryGeometry
+ * @see appu::CutCell
+ */
+class CubesPatchInterface
+{
+public:
+   /*!
+    * The constructor initializes the Cubes library and optionally starts
+    * an interactive interface
+    *
+    * @param object_name name of object of this class
+    * @param input_db    the input database which contains the name of the
+    *                    surface geometry.
+    * @param grid_geom   grid geometry
+    * @param nghosts     number of ghost cells
+    *
+    */
+   CubesPatchInterface(
+      const std::string& object_name,
+      tbox::Pointer<tbox::Database> input_db,
+      tbox::Pointer<geom::CartesianGridGeometry> grid_geom,
+      hier::IntVector nghosts);
+
+   /*!
+    * The destructor does nothing.
+    */
+   virtual ~CubesPatchInterface();
+
+   /*!
+    * Compute set of cut cells on a patch.  This method makes calls to
+    * the cubes library, passing in the patch extents, and returning
+    * the set of cut cells on the patch.
+    *
+    * @param patch pointer to a patch on a hierarchy level
+    * @param cell_flag_data_id descriptor id for integer array holding cell
+    *        flag. Stored on every cell of the patch, designates cell as flow,
+    *        solid, or cut.
+    * @param cell_vol_data_id descriptor id for double array holding volume
+    *        fraction. Stored on every cell of the patch.
+    * @param cutcell_data_id descriptor id for IndexData<CutCell> data.
+    */
+   void
+   calculateCutCellInfo(
+      tbox::Pointer<hier::Patch>& patch,
+      const int cell_flag_data_id,
+      const int cell_vol_data_id,
+      const int cutcell_data_id);
+
+   /*!
+    * Set whether to record areas and normal.  Some calculations do not
+    * require this information.  By default, it is set TRUE.
+    */
+   void
+   setRecordAreasAndNormal(
+      const bool record_an);
+
+   /*!
+    * Dump data to supplied stream.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os) const;
+
+   /*
+    * Read name, command_file, and interactive start information from input.
+    * All inputs are optional.  The default behavior starts the interactive
+    * interface to allow a user to build some geometry.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db);
+
+   std::string d_object_name;
+
+   /*
+    * Timers interspersed throughout the class.
+    */
+   static tbox::Pointer<tbox::Timer> t_cubes;
+   static tbox::Pointer<tbox::Timer> t_set_cutcells;
+   static tbox::Pointer<tbox::Timer> t_set_cutareas;
+
+   /*
+    * Whether or not to save the areas and normals.
+    */
+   bool d_record_areas_and_normal;
+
+   /*
+    * Cubes objects used to represent the geometry
+    */
+
+   /*
+    * Triangulated surface file name.
+    */
+   std::string d_surf_tri_file;
+
+   /*
+    * Domain lower/upper bounds.
+    */
+   float d_domain_xlo[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   float d_domain_xhi[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   /*
+    * Number of vertices on coarsest level.
+    */
+   int d_domain_nx[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   /*
+    * Max number of levels for Cubes.  Eventually, we should couple this
+    * with the gridding algorithm but we'll keep it as a separate entry
+    * for now.
+    */
+   int d_max_levels;
+
+   /*
+    * Whether or not to use Cubes in "verbose" mode.
+    */
+   bool d_cubes_verbose;
+
+};
+
+}
+}
+#endif // included_CubesPatchInterface
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/CutCell.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/CutCell.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1572 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Cut cell struct for embedded boundary implementations. 
+ *
+ ************************************************************************/
+
+#ifndef included_appu_CutCell_C
+#define included_appu_CutCell_C
+
+#include "SAMRAI/appu/CutCell.h"
+
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/tbox/IOStream.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#define CUTCELL_VERSION 1
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace appu {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialization for static data members.                               *
+ *                                                                       *
+ *************************************************************************
+ */
+bool CutCell::s_enable_boundary_node_storage = false;
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Static function to set whether or not to compute and store boundary   *
+ * node info.                                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CutCell::enableBoundaryNodeStorage()
+{
+   s_enable_boundary_node_storage = true;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Static function that returns whether boundary node data is enabled.   *
+ *                                                                       *
+ *************************************************************************
+ */
+bool CutCell::boundaryNodesEnabled()
+{
+   return s_enable_boundary_node_storage;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor                                                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+CutCell::CutCell():
+   d_index(pdat::CellIndex(hier::Index(
+      tbox::Dimension::getInvalidDimension())))
+{
+   initializeCutCellData();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor                                                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+CutCell::CutCell(
+   const tbox::Dimension& dim):
+   d_index(pdat::CellIndex(hier::Index(dim, -999)))
+{
+   initializeCutCellData();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Construct a boundary cell, given the cell index.
+ *                                                                       *
+ *************************************************************************
+ */
+
+CutCell::CutCell(
+   const pdat::CellIndex& cut_cell):
+   d_index(cut_cell)
+{
+   initializeCutCellData();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Copy Constructor                                                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+CutCell::CutCell(
+   const appu::CutCell& cut_cell):
+   d_index(cut_cell.d_index)
+{
+   copyCutCellData(cut_cell);
+}
+
+/*
+ *************************************************************************
+ *
+ * copy
+ *
+ *************************************************************************
+ */
+
+CutCell& CutCell::copy(
+   const appu::CutCell& cut_cell)
+{
+   d_index = cut_cell.d_index;
+   copyCutCellData(cut_cell);
+   return *this;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destructor
+ *                                                                       *
+ *************************************************************************
+ */
+
+CutCell::~CutCell()
+{
+}
+
+/*
+ *************************************************************************
+ *
+ *  Return cell index
+ *                                                                       *
+ *************************************************************************
+ */
+pdat::CellIndex
+CutCell::getIndex() const
+{
+   return d_index;
+}
+
+/*
+ *************************************************************************
+ *
+ *  Return volume fraction
+ *                                                                       *
+ *************************************************************************
+ */
+double
+CutCell::getVolume() const
+{
+   return d_vol_fraction;
+}
+
+/*
+ *************************************************************************
+ *
+ *  Return pointer to cell area fraction vector (dimension 2*DIM).
+ *                                                                       *
+ *************************************************************************
+ */
+const double *
+CutCell::getArea() const
+{
+   return d_area_fraction;
+}
+
+/*
+ *************************************************************************
+ *
+ *  Return cell area fraction for face i.
+ *                                                                       *
+ *************************************************************************
+ */
+double
+CutCell::getArea(
+   const int i) const
+{
+   TBOX_ASSERT(i < 2 * d_index.getDim().getValue());
+
+   return d_area_fraction[i];
+}
+
+/*
+ *************************************************************************
+ *
+ *  Return pointer to normal vector (dimension DIM)
+ *                                                                       *
+ *************************************************************************
+ */
+const double *
+CutCell::getNormal() const
+{
+   return d_normal;
+}
+
+/*
+ *************************************************************************
+ *
+ *  Return normal component for direction i.
+ *                                                                       *
+ *************************************************************************
+ */
+double
+CutCell::getNormal(
+   const int i) const
+{
+   TBOX_ASSERT(i < d_index.getDim().getValue());
+
+   return d_normal[i];
+}
+
+/*
+ *************************************************************************
+ *
+ *  Return area of the exposed cut surface.
+ *                                                                       *
+ *************************************************************************
+ */
+double
+CutCell::getFrontArea() const
+{
+   return d_front_area;
+}
+
+/*
+ *************************************************************************
+ *
+ *  Return pointer to front centroid vector (dimension DIM).
+ *                                                                       *
+ *************************************************************************
+ */
+const double *
+CutCell::getFrontCentroid() const
+{
+   return d_front_centroid;
+}
+
+/*
+ *************************************************************************
+ *
+ *  Return front centroid component for direction i.
+ *                                                                       *
+ *************************************************************************
+ */
+double
+CutCell::getFrontCentroid(
+   const int i) const
+{
+   return d_front_centroid[i];
+}
+
+/*
+ *************************************************************************
+ *
+ *  Return volume of cells surrounding the cut-cell
+ *                                                                       *
+ *************************************************************************
+ */
+double
+CutCell::getSurrVolume() const
+{
+   return d_surr_vol;
+}
+
+/*
+ *************************************************************************
+ *
+ *  Return the new base with components (i,j)
+ *                                                                       *
+ *************************************************************************
+ */
+double
+CutCell::getNewBase(
+   const int i,
+   const int j) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(i < d_index.getDim().getValue());
+   TBOX_ASSERT(j < d_index.getDim().getValue());
+#endif
+   return d_newbase[i][j];
+}
+
+/*
+ *************************************************************************
+ *
+ * Get the number of boundary nodes.
+ *                                                                       *
+ *************************************************************************
+ */
+int
+CutCell::getNumberOfBoundaryNodes() const
+{
+   return d_num_boundary_nodes;
+}
+
+/*
+ *************************************************************************
+ *
+ * Get the boundary node at location i
+ *                                                                       *
+ *************************************************************************
+ */
+BoundaryNode
+CutCell::getBoundaryNode(
+   const int i) const
+{
+   if (!s_enable_boundary_node_storage) {
+      TBOX_ERROR("appu::CutCell::setBoundaryNode()"
+         << "\nBoundary node storage is not enabled.  Use the"
+         << "\nappu::CutCell::enableBoundaryNodeStorage()"
+         << "\nmethod to enable boundary node storage." << std::endl);
+   }
+   return d_boundary_nodes[i];
+}
+
+/*
+ *************************************************************************
+ *
+ *  To be removed...
+ *                                                                       *
+ *************************************************************************
+ */
+double
+CutCell::getFluxFront(
+   const int m) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(m < d_index.getDim().getValue() + 2);
+#endif
+   return d_flux_front[m];
+}
+
+/*
+ *************************************************************************
+ *
+ *  Set volume
+ *                                                                       *
+ *************************************************************************
+ */
+void
+CutCell::setVolume(
+   const double volume)
+{
+   d_vol_fraction = volume;
+}
+
+/*
+ *************************************************************************
+ *
+ *  Set cell area fraction for face i (dimension 2*DIM).
+ *                                                                       *
+ *************************************************************************
+ */
+void
+CutCell::setArea(
+   const double area,
+   const int i)
+{
+
+   TBOX_ASSERT(i < 2 * d_index.getDim().getValue());
+
+   d_area_fraction[i] = area;
+}
+
+/*
+ *************************************************************************
+ *
+ *  Set normal component for direction i (dimension DIM).
+ *                                                                       *
+ *************************************************************************
+ */
+void
+CutCell::setNormal(
+   const double normal,
+   const int i)
+{
+   TBOX_ASSERT(i < d_index.getDim().getValue());
+
+   d_normal[i] = normal;
+}
+
+/*
+ *************************************************************************
+ *
+ *  Set pointer to normal vector
+ *                                                                       *
+ *************************************************************************
+ */
+void
+CutCell::setNormal(
+   const double* normal)
+{
+   int i;
+   for (i = 0; i < d_index.getDim().getValue(); i++) {
+      d_normal[i] = normal[i];
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ *  Set volume of cells surrounding the cut-cell
+ *                                                                       *
+ *************************************************************************
+ */
+void
+CutCell::setSurrVolume(
+   const double surrvol)
+{
+   d_surr_vol = surrvol;
+}
+
+/*
+ *************************************************************************
+ *
+ *  Set the frontal area of the cut-cell
+ *                                                                       *
+ *************************************************************************
+ */
+void
+CutCell::setFrontArea(
+   const double area)
+{
+   d_front_area = area;
+}
+
+/*
+ *************************************************************************
+ *
+ *  Set the frontal centroid
+ *                                                                       *
+ *************************************************************************
+ */
+void
+CutCell::setFrontCentroid(
+   const double loc,
+   const int i)
+{
+   d_front_centroid[i] = loc;
+}
+
+/*
+ *************************************************************************
+ *
+ *  Set whether cut cell is split
+ *                                                                       *
+ *************************************************************************
+ */
+void
+CutCell::setSplit()
+{
+   d_is_split = true;
+}
+
+/*
+ *************************************************************************
+ *
+ *  Explicitly set the new base vector with components (i,j)
+ *                                                                       *
+ *************************************************************************
+ */
+void
+CutCell::setNewBase(
+   const double base,
+   const int i,
+   const int j)
+{
+   TBOX_ASSERT(i < d_index.getDim().getValue());
+   TBOX_ASSERT(j < d_index.getDim().getValue());
+
+   d_newbase[i][j] = base;
+}
+
+/*
+ *************************************************************************
+ *
+ *  Set new base using supplied vector
+ *                                                                       *
+ *************************************************************************
+ */
+void
+CutCell::setNewBase(
+   const double* base)
+{
+   const tbox::Dimension& dim(d_index.getDim());
+
+   double norm = 0.0;
+   int i;
+
+   for (i = 0; i < dim.getValue(); i++) {
+      norm = norm + base[i] * base[i];
+   }
+   norm = sqrt(norm);
+
+   /*
+    * For the case where the base is all zero, render the normal and new
+    * base zero as well.
+    */
+   if (tbox::MathUtilities<double>::equalEps(norm, 0.0)) {
+      norm = tbox::MathUtilities<double>::getMax();
+   }
+
+   for (i = 0; i < dim.getValue(); i++) {
+      d_normal[i] = base[i] / norm;
+      d_newbase[0][i] = d_normal[i];
+   }
+
+   if ((dim == tbox::Dimension(2))) {
+      d_newbase[1][0] = -d_normal[1];
+      d_newbase[1][1] = d_normal[0];
+   } else if ((dim == tbox::Dimension(3))) {
+      int min_dir = 0;
+      if (tbox::MathUtilities<double>::Abs(d_normal[1]) <
+          tbox::MathUtilities<double>::Abs(d_normal[0])) {
+         min_dir = 1;
+      }
+      if (tbox::MathUtilities<double>::Abs(d_normal[dim.getValue() - 1]) <
+          tbox::MathUtilities<double>::Abs(d_normal[min_dir])) {
+         min_dir = 2;
+      }
+
+      norm = 0.0;
+      for (i = 0; i < dim.getValue(); i++) {
+         d_newbase[1][i] = d_normal[i] * d_normal[min_dir];
+      }
+      d_newbase[1][min_dir] = d_normal[min_dir] * d_normal[min_dir] - 1;
+
+      for (i = 0; i < dim.getValue(); i++) {
+         norm = norm + d_newbase[1][i] * d_newbase[1][i];
+      }
+      norm = sqrt(norm);
+
+      for (i = 0; i < dim.getValue(); i++) {
+         d_newbase[1][i] = d_newbase[1][i] / norm;
+      }
+
+      d_newbase[dim.getValue() - 1][0] = d_normal[1] * d_newbase[1][dim.getValue() - 1]
+         - d_normal[dim.getValue() - 1] * d_newbase[1][1];
+      d_newbase[dim.getValue() - 1][1] = d_normal[dim.getValue() - 1] * d_newbase[1][0]
+         - d_normal[0] * d_newbase[1][dim.getValue() - 1];
+      d_newbase[dim.getValue() - 1][dim.getValue() - 1] = d_normal[0] * d_newbase[1][1]
+         - d_normal[1] * d_newbase[1][0];
+   }
+
+}
+
+/*
+ *************************************************************************
+ *
+ *  Set new base using cells normal vector.
+ *                                                                       *
+ *************************************************************************
+ */
+void
+CutCell::setNewBase()
+{
+   setNewBase(d_normal);
+}
+
+/*
+ *************************************************************************
+ *
+ * Add the boundary node to the array of boundary nodes maintained
+ * by the cut cell.
+ *                                                                       *
+ *************************************************************************
+ */
+void
+CutCell::setBoundaryNode(
+   const BoundaryNode& node)
+{
+   const tbox::Dimension& dim(d_index.getDim());
+
+   if (s_enable_boundary_node_storage) {
+
+      if (d_num_boundary_nodes >= dim.getValue() * dim.getValue()) {
+         TBOX_ERROR("CutCell::setBoundaryNode()"
+            << "\nNumber of boundary nodes set exceeds max allowed"
+            << "(DIM*DIM)." << std::endl);
+      } else {
+         d_boundary_nodes[d_num_boundary_nodes] = node;
+         d_num_boundary_nodes++;
+      }
+   } else {
+      TBOX_ERROR("appu::CutCell::setBoundaryNode()"
+         << "\nBoundary node storage is not enabled.  Use the"
+         << "\nappu::CutCell::enableBoundaryNodeStorage()"
+         << "\nmethod to enable boundary node storage." << std::endl);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *
+ * Add the boundary node to the array of boundary nodes maintained
+ * by the cut cell.
+ *                                                                       *
+ *************************************************************************
+ */
+void
+CutCell::setBoundaryNode(
+   const BoundaryNode& node,
+   const int i)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   const tbox::Dimension& dim(d_index.getDim());
+   TBOX_ASSERT(i < dim.getValue() * dim.getValue());
+#endif
+
+   if (s_enable_boundary_node_storage) {
+      d_boundary_nodes[i] = node;
+   } else {
+      TBOX_ERROR("appu::CutCell::setBoundaryNode()"
+         << "\nBoundary node storage is not enabled.  Use the"
+         << "\nappu::CutCell::enableBoundaryNodeStorage()"
+         << "\nmethod to enable boundary node storage." << std::endl);
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ * Add the boundary node to the particular index i of the array of
+ * boundary nodes maintained by the cut cell.
+ *                                                                       *
+ *************************************************************************
+ */
+void
+CutCell::setBoundaryNode(
+   const pdat::NodeIndex& node)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_index, node);
+
+   if (s_enable_boundary_node_storage) {
+      appu::BoundaryNode bn(node);
+      setBoundaryNode(bn);
+   } else {
+      TBOX_ERROR("appu::CutCell::setBoundaryNode()"
+         << "\nBoundary node storage is not enabled.  Use the"
+         << "\nappu::CutCell::enableBoundaryNodeStorage()"
+         << "\nmethod to enable boundary node storage." << std::endl);
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ *  To be removed (eventually)
+ *                                                                       *
+ *************************************************************************
+ */
+void
+CutCell::setFluxFront(
+   const int m,
+   const double front)
+{
+   d_flux_front[m] = front;
+}
+
+/*
+ *************************************************************************
+ *
+ * Print volume and area data.
+ *                                                                       *
+ *************************************************************************
+ */
+void
+CutCell::printVolumeAndAreas(
+   std::ostream& os) const
+{
+   tbox::pout << std::flush;
+   int i;
+
+   os << "index = " << d_index << std::endl;
+   os << "volume fraction = " << d_vol_fraction << std::endl;
+   os << "area fraction = ";
+   for (i = 0; i < 2 * d_index.getDim().getValue(); i++) {
+      os << d_area_fraction[i] << " ";
+   }
+   os << "surr vol = " << d_surr_vol << std::endl;
+   os << std::endl;
+   os << std::endl;
+}
+
+/*
+ *************************************************************************
+ *
+ * Print normal components.
+ *                                                                       *
+ *************************************************************************
+ */
+void
+CutCell::printNormal(
+   std::ostream& os) const
+{
+   tbox::pout << std::flush;
+   os << "index = " << d_index << std::endl;
+   os << "normal = ";
+   for (int i = 0; i < d_index.getDim().getValue(); i++) {
+      os << d_normal[i] << " ";
+   }
+   os << "front area = " << d_front_area << std::endl;
+   os << std::endl;
+}
+
+/*
+ *************************************************************************
+ *
+ * Print boundary node information
+ *                                                                       *
+ *************************************************************************
+ */
+void
+CutCell::printBoundaryNodes(
+   std::ostream& os) const
+{
+   if (s_enable_boundary_node_storage) {
+      const tbox::Dimension& dim(d_index.getDim());
+
+      tbox::pout << std::flush;
+      int i, j;
+
+      os << "cut cell index = " << d_index << std::endl;
+      os << "   front centroid:  ";
+      for (i = 0; i < dim.getValue(); i++) {
+         os << d_front_centroid[i] << "\t";
+      }
+      os << std::endl;
+
+      os << "   number boundary nodes: " << d_num_boundary_nodes << std::endl;
+      for (i = 0; i < d_num_boundary_nodes; i++) {
+         BoundaryNode bn = getBoundaryNode(i);
+         pdat::NodeIndex bnode = bn.getIndex();
+         os << "   boundary node: " << i << "\t" << bnode << std::endl;
+         os << "      closest boundary point loc: " << "\t";
+         for (i = 0; i < dim.getValue(); i++) {
+            os << bn.getClosestBoundaryPoint(i) << "\t";
+         }
+         os << std::endl;
+         os << "      normal to boundary: " << "\t";
+         for (i = 0; i < dim.getValue(); i++) {
+            os << bn.getNormalToBoundary(i) << "\t";
+         }
+         os << std::endl;
+         double dist_to_boundary = bn.getDistanceToBoundary();
+         os << "      distance to boundary: " << "\t"
+            << dist_to_boundary << std::endl;
+         bool on_boundary = bn.getNodeOnBoundary();
+         os << "      on boundary?: " << "\t" << on_boundary << std::endl;
+
+         int nn = bn.getNumberOfNearestNeighborNodes();
+         os << "      number nearest neighbors: " << nn << std::endl;
+         for (j = 0; j < nn; j++) {
+            pdat::NodeIndex bnode_nbr = bn.getNearestNeighborNode(j);
+            os << "      nearest neighbor: " << j
+               << "\t" << bnode_nbr << std::endl;
+         }
+      }
+   } else {
+      os << "Boundary Node data NOT COMPUTED" << std::endl;
+   }
+   os << std::endl;
+}
+
+/*
+ *************************************************************************
+ *
+ * Print ALL data.
+ *                                                                       *
+ *************************************************************************
+ */
+void
+CutCell::printAll(
+   std::ostream& os) const
+{
+   const tbox::Dimension& dim(d_index.getDim());
+
+   os << std::flush;
+   int i, j;
+
+   os << "ptr_boundary_cell = " << (CutCell *)this << std::endl;
+   printVolumeAndAreas(os);
+   printNormal(os);
+
+   for (i = 0; i < dim.getValue(); i++) {
+      os << "newbase[" << i << "] = ";
+      for (j = 0; j < dim.getValue(); j++) {
+         os << d_newbase[i][j] << " ";
+      }
+      os << std::endl;
+   }
+
+   printBoundaryNodes(os);
+   os << std::endl;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The copySourceItem() method is used to copy CutCell data in the  *
+ * SAMRAI communication infrastructure. This method is required in order *
+ * for CutCell to be a templated data type for IndexData<DIM>      *
+ * i.e. IndexData<CutCell>.                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+void
+CutCell::copySourceItem(
+   hier::Index& index,
+   const hier::IntVector& src_offset,
+   appu::CutCell& src_item)
+{
+   NULL_USE(src_offset);
+
+   /*
+    * Copy src_item data into *this.  Note that we don't do
+    * anything with the src_offset.  This is because we have
+    * access to the index already.
+    */
+   d_index = (pdat::CellIndex)index;
+   copyCutCellData(src_item);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The getDataStreamSize(), packStream(), and unpackStream() methods     *
+ * are required to template CutCell as IndexData<DIM> type - i.e.        *
+ * IndexData<CutCell>.  They are used to communicate          *
+ * CutCell data.                                              *
+ *                                                                       *
+ * The getDataStreamSize() method specifies how many bytes of data       *
+ * will be packed in the packStream() method.                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+size_t
+CutCell::getDataStreamSize()
+{
+   /*
+    * #bytes =
+    *   d_index           (int[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]) +
+    *   d_boundary_nodes  (int[1 + DIM*DIM*(DIM+1+DIM*DIM)] +
+    *                      double[DIM*DIM*(1+2*DIM)])
+    *   d_vol_fraction    (double) +
+    *   d_surr_vol        (double) +
+    *   d_front_area      (double) +
+    *   d_normal          (double[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]) +
+    *   d_front_centroid  (double[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]) +
+    *   d_area_fraction   (double[2*DIM]) +
+    *   d_flux_front      (double[DIM+2]) +
+    *   d_newbase         (double[DIM*DIM])
+    */
+
+   int dim_value = d_index.getDim().getValue();
+
+   size_t bytes =
+      (dim_value + 1 + dim_value * dim_value * (dim_value + 1 + dim_value * dim_value))
+      * tbox::MessageStream::getSizeof<int>()
+      + (3 + 4 * dim_value + dim_value + 2 + dim_value * dim_value + dim_value * dim_value)
+      * tbox::MessageStream::getSizeof<double>();
+
+   return bytes;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ *  Pack message stream.                                                 *
+ *                                                                       *
+ *************************************************************************
+ */
+void
+CutCell::packStream(
+   tbox::MessageStream& stream)
+{
+   const tbox::Dimension& dim(d_index.getDim());
+
+   int i, j, k;
+
+   /*
+    * #ints =
+    *   d_index                (int[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]) +
+    *   d_num_boundary_nodes   (int) +
+    *   d_boundary_nodes       (int[DIM*DIM*(DIM+1+DIM*DIM)])
+    */
+   int int_buff_size = dim.getValue() + 1;
+   if (s_enable_boundary_node_storage) {
+      int_buff_size += dim.getValue() * dim.getValue()
+         * (dim.getValue() + 1 + dim.getValue() * dim.getValue());
+   }
+   int* ibuffer = new int[int_buff_size];
+   int counter = 0;
+   for (i = 0; i < dim.getValue(); i++) {
+      ibuffer[counter] = d_index(i);
+      counter++;
+   }
+
+   ibuffer[counter] = d_num_boundary_nodes;
+   counter++;
+
+   if (s_enable_boundary_node_storage) {
+      // the maximum number of boundary nodes is DIM*DIM
+      for (j = 0; j < dim.getValue() * dim.getValue(); j++) {
+         pdat::NodeIndex index = d_boundary_nodes[j].getIndex();
+         for (i = 0; i < dim.getValue(); i++) {
+            ibuffer[counter] = index(i);
+            counter++;
+         }
+         bool on_boundary = d_boundary_nodes[j].getNodeOnBoundary();
+         int iosb = 0;
+         if (on_boundary) iosb = 1;
+         ibuffer[counter] = iosb;
+         counter++;
+
+         // the maximum number of nearest neighbor nodes is DIM
+         for (k = 0; k < dim.getValue(); k++) {
+            index = d_boundary_nodes[j].getNearestNeighborNode(k);
+            for (i = 0; i < dim.getValue(); i++) {
+               ibuffer[counter] = index(i);
+               counter++;
+            }
+         }
+      }
+   }
+
+   /*
+    * The counter should equal the buffer size.  Otherwise, there is an
+    * error.
+    */
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(int_buff_size == counter);
+#endif
+   stream.pack(ibuffer, counter);
+
+   /*
+    * #doubles =
+    *   d_vol_fraction    (double) +
+    *   d_surr_vol        (double) +
+    *   d_front_area      (double) +
+    *   d_normal          (double[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]) +
+    *   d_front_centroid  (double[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]) +
+    *   d_area_fraction   (double[2*DIM]) +
+    *   d_flux_front      (double[DIM+2]) +
+    *   d_newbase         (double[DIM*DIM])
+    *   d_boundary_nodes  (double[DIM*DIM*(1+2*DIM)])
+    */
+
+   int dbl_buff_size = 3 + 4 * dim.getValue() + dim.getValue() + 2 + dim.getValue() * dim.getValue();
+   if (s_enable_boundary_node_storage) {
+      dbl_buff_size += dim.getValue() * dim.getValue() * (1 + 2 * dim.getValue());
+   }
+   double* dbuffer = new double[dbl_buff_size];
+   counter = 0;
+
+   dbuffer[0] = d_vol_fraction;
+   dbuffer[1] = d_surr_vol;
+   dbuffer[2] = d_front_area;
+   counter += 3;
+
+   for (i = 0; i < dim.getValue(); i++) {
+      dbuffer[counter] = d_normal[i];
+      dbuffer[counter + 1] = d_front_centroid[i];
+      counter += 2;
+   }
+
+   for (i = 0; i < 2 * dim.getValue(); i++) {
+      dbuffer[counter] = d_area_fraction[i];
+      counter++;
+   }
+
+   for (i = 0; i < dim.getValue() + 2; i++) {
+      dbuffer[counter] = d_flux_front[i];
+      counter++;
+   }
+
+   for (i = 0; i < dim.getValue(); i++) {
+      for (j = 0; j < dim.getValue(); j++) {
+         dbuffer[counter] = d_newbase[i][j];
+         counter++;
+      }
+   }
+
+   if (s_enable_boundary_node_storage) {
+      // the maximum number of boundary nodes is DIM*DIM
+      for (i = 0; i < dim.getValue() * dim.getValue(); i++) {
+         dbuffer[counter] = d_boundary_nodes[i].getDistanceToBoundary();
+         counter++;
+         for (j = 0; j < dim.getValue(); j++) {
+            dbuffer[counter] = d_boundary_nodes[i].getNormalToBoundary(j);
+            dbuffer[counter + 1] = d_boundary_nodes[i].getClosestBoundaryPoint(
+                  j);
+            counter += 2;
+         }
+      }
+   }
+
+   /*
+    * The counter should equal the buffer size.  Otherwise, there is an
+    * error.
+    */
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(dbl_buff_size == counter);
+#endif
+   stream.pack(dbuffer, counter);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ *  Unpack message stream.                                               *
+ *                                                                       *
+ *************************************************************************
+ */
+void
+CutCell::unpackStream(
+   tbox::MessageStream& stream,
+   const hier::IntVector& offset)
+{
+   const tbox::Dimension& dim(d_index.getDim());
+
+   int i, j, k;
+
+   /*
+    * #ints =
+    *   d_index                (int[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]) +
+    *   d_num_boundary_nodes   (int) +
+    *   d_boundary_nodes       (int[DIM*DIM*(DIM+1+DIM*DIM)])
+    */
+   int int_buff_size = dim.getValue() + 1;
+   if (s_enable_boundary_node_storage) {
+      int_buff_size += dim.getValue() * dim.getValue()
+         * (dim.getValue() + 1 + dim.getValue() * dim.getValue());
+   }
+   int* ibuffer = new int[int_buff_size];
+   int counter = 0;
+   stream.unpack(ibuffer, int_buff_size);
+   pdat::CellIndex cell_index(dim);
+   for (i = 0; i < dim.getValue(); i++) {
+      cell_index(i) = ibuffer[counter];
+      counter++;
+   }
+   d_index = cell_index + offset;
+
+   int d_num_boundary_nodes = ibuffer[counter];
+   counter++;
+
+   if (s_enable_boundary_node_storage) {
+
+      for (j = 0; j < d_num_boundary_nodes; j++) {
+         pdat::NodeIndex node_index(dim);
+         for (i = 0; i < dim.getValue(); i++) {
+            node_index(i) = ibuffer[counter];
+            counter++;
+         }
+
+         BoundaryNode bn(node_index);
+
+         int iosb = ibuffer[counter];
+         counter++;
+         if (iosb == 1) bn.setNodeOnBoundary();
+
+         for (k = 0; k < dim.getValue(); k++) {
+            for (i = 0; i < dim.getValue(); i++) {
+               node_index(i) = ibuffer[counter];
+               counter++;
+            }
+            bn.setNearestNeighborNode(node_index);
+         }
+         d_boundary_nodes[j] = bn;
+      }
+   }
+
+   /*
+    * The counter should equal the buffer size.  Otherwise, there is an
+    * error.
+    */
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(int_buff_size == counter);
+#endif
+
+   /*
+    * #doubles =
+    *   d_vol_fraction    (double) +
+    *   d_surr_vol        (double) +
+    *   d_front_area      (double) +
+    *   d_normal          (double[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]) +
+    *   d_front_centroid  (double[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]) +
+    *   d_area_fraction   (double[2*DIM]) +
+    *   d_flux_front      (double[DIM+2]) +
+    *   d_newbase         (double[DIM*DIM])
+    *   d_boundary_nodes  (double[DIM*DIM*(1+2*DIM)])
+    */
+
+   int dbl_buff_size = 3 + 4 * dim.getValue() + dim.getValue() + 2 + dim.getValue() * dim.getValue();
+   if (s_enable_boundary_node_storage) {
+      dbl_buff_size += dim.getValue() * dim.getValue() * (1 + 2 * dim.getValue());
+   }
+   double* dbuffer = new double[dbl_buff_size];
+   counter = 0;
+   stream.unpack(dbuffer, dbl_buff_size);
+   d_vol_fraction = dbuffer[0];
+   d_surr_vol = dbuffer[1];
+   d_front_area = dbuffer[2];
+   counter += 3;
+
+   for (i = 0; i < dim.getValue(); i++) {
+      d_normal[i] = dbuffer[counter];
+      d_front_centroid[i] = dbuffer[counter + 1];
+      counter += 2;
+   }
+
+   for (i = 0; i < 2 * dim.getValue(); i++) {
+      d_area_fraction[i] = dbuffer[counter];
+      counter++;
+   }
+
+   for (i = 0; i < dim.getValue() + 2; i++) {
+      d_flux_front[i] = dbuffer[counter];
+      counter++;
+   }
+
+   for (i = 0; i < dim.getValue(); i++) {
+      for (j = 0; j < dim.getValue(); j++) {
+         d_newbase[i][j] = dbuffer[counter];
+         counter++;
+      }
+   }
+
+   if (s_enable_boundary_node_storage) {
+      // the maximum number of boundary nodes is dim*dim
+      for (i = 0; i < dim.getValue() * dim.getValue(); i++) {
+         d_boundary_nodes[i].setDistanceToBoundary(dbuffer[counter]);
+         counter++;
+         for (j = 0; j < dim.getValue(); j++) {
+            d_boundary_nodes[i].setNormalToBoundary(dbuffer[counter], j);
+            d_boundary_nodes[i].setClosestBoundaryPoint(dbuffer[counter + 1], j);
+            counter += 2;
+         }
+      }
+   }
+   /*
+    * The counter should equal the buffer size.  Otherwise, there is an
+    * error.
+    */
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(dbl_buff_size == counter);
+#endif
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The putToDatabase() and getFromDatabase() methods are required to     *
+ * template CutCell as IndexData<DIM> type                         *
+ * i.e. IndexData<CutCell>.  They are used to write/read      *
+ * CutCell data to/from the restart database.                       *
+ *                                                                       *
+ * The following writes data to the restart database.                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+CutCell::putToDatabase(
+   tbox::Pointer<tbox::Database>& database)
+{
+   const tbox::Dimension& dim(d_index.getDim());
+
+   int i, j, k;
+
+   /*
+    * #ints =
+    *   d_index                (int[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]) +
+    *   d_num_boundary_nodes   (int) +
+    *   d_boundary_nodes       (int[DIM*DIM*(DIM+1+DIM*DIM)])
+    */
+   int int_buff_size = dim.getValue() + 1;
+   if (s_enable_boundary_node_storage) {
+      int_buff_size += dim.getValue() * dim.getValue()
+         * (dim.getValue() + 1 + dim.getValue() * dim.getValue());
+   }
+   int* ibuffer = new int[int_buff_size];
+   int counter = 0;
+   for (i = 0; i < dim.getValue(); i++) {
+      ibuffer[counter] = d_index(i);
+      counter++;
+   }
+
+   ibuffer[counter] = d_num_boundary_nodes;
+   counter++;
+
+   if (s_enable_boundary_node_storage) {
+      // the maximum number of boundary nodes is dim*dim
+      for (j = 0; j < dim.getValue() * dim.getValue(); j++) {
+         pdat::NodeIndex index = d_boundary_nodes[j].getIndex();
+         for (i = 0; i < dim.getValue(); i++) {
+            ibuffer[counter] = index(i);
+            counter++;
+         }
+         bool on_boundary = d_boundary_nodes[j].getNodeOnBoundary();
+         int iosb = 0;
+         if (on_boundary) iosb = 1;
+         ibuffer[counter] = iosb;
+         counter++;
+
+         // the maximum number of nearest neighbor nodes is dim
+         for (k = 0; k < dim.getValue(); k++) {
+            index = d_boundary_nodes[j].getNearestNeighborNode(k);
+            for (i = 0; i < dim.getValue(); i++) {
+               ibuffer[counter] = index(i);
+               counter++;
+            }
+         }
+      }
+   }
+
+   /*
+    * The counter should equal the buffer size.  Otherwise, there is an
+    * error.
+    */
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(int_buff_size == counter);
+#endif
+   database->putIntegerArray("ibuffer", ibuffer, int_buff_size);
+
+   /*
+    * #doubles =
+    *   d_vol_fraction    (double) +
+    *   d_surr_vol        (double) +
+    *   d_front_area      (double) +
+    *   d_normal          (double[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]) +
+    *   d_front_centroid  (double[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]) +
+    *   d_area_fraction   (double[2*DIM]) +
+    *   d_flux_front      (double[DIM+2]) +
+    *   d_newbase         (double[DIM*DIM])
+    *   d_boundary_nodes  (double[DIM*DIM*(1+2*DIM)])
+    */
+
+   int dbl_buff_size = 3 + 4 * dim.getValue() + dim.getValue() + 2 + dim.getValue() * dim.getValue();
+   if (s_enable_boundary_node_storage) {
+      dbl_buff_size += dim.getValue() * dim.getValue() * (1 + 2 * dim.getValue());
+   }
+   double* dbuffer = new double[dbl_buff_size];
+   counter = 0;
+
+   dbuffer[0] = d_vol_fraction;
+   dbuffer[1] = d_surr_vol;
+   dbuffer[2] = d_front_area;
+   counter += 3;
+
+   for (i = 0; i < dim.getValue(); i++) {
+      dbuffer[counter] = d_normal[i];
+      dbuffer[counter + 1] = d_front_centroid[i];
+      counter += 2;
+   }
+
+   for (i = 0; i < 2 * dim.getValue(); i++) {
+      dbuffer[counter] = d_area_fraction[i];
+      counter++;
+   }
+
+   for (i = 0; i < dim.getValue() + 2; i++) {
+      dbuffer[counter] = d_flux_front[i];
+      counter++;
+   }
+
+   for (i = 0; i < dim.getValue(); i++) {
+      for (j = 0; j < dim.getValue(); j++) {
+         dbuffer[counter] = d_newbase[i][j];
+         counter++;
+      }
+   }
+
+   if (s_enable_boundary_node_storage) {
+      // the maximum number of boundary nodes is dim*dim
+      for (i = 0; i < dim.getValue() * dim.getValue(); i++) {
+         dbuffer[counter] = d_boundary_nodes[i].getDistanceToBoundary();
+         counter++;
+      }
+   }
+
+   /*
+    * The counter should equal the buffer size.  Otherwise, there is an
+    * error.
+    */
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(dbl_buff_size == counter);
+#endif
+   database->putDoubleArray("dbuffer", dbuffer, dbl_buff_size);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ *  Read data from restart.                                              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+CutCell::getFromDatabase(
+   tbox::Pointer<tbox::Database>& database)
+{
+   const tbox::Dimension& dim(d_index.getDim());
+
+   int i, j, k;
+   /*
+    * #ints =
+    *   d_index                (int[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]) +
+    *   d_num_boundary_nodes   (int) +
+    *   d_boundary_nodes       (int[DIM*DIM*(DIM+1+DIM*DIM)])
+    */
+   int int_buff_size = dim.getValue() + 1;
+   if (s_enable_boundary_node_storage) {
+      int_buff_size += dim.getValue() * dim.getValue()
+         * (dim.getValue() + 1 + dim.getValue() * dim.getValue());
+   }
+   int* ibuffer = new int[int_buff_size];
+   int counter = 0;
+
+   database->getIntegerArray("ibuffer", ibuffer, int_buff_size);
+   pdat::CellIndex cell_index(dim);
+   for (i = 0; i < dim.getValue(); i++) {
+      cell_index(i) = ibuffer[counter];
+      counter++;
+   }
+   d_index = cell_index;
+
+   int d_num_boundary_nodes = ibuffer[counter];
+   counter++;
+
+   if (s_enable_boundary_node_storage) {
+      for (j = 0; j < d_num_boundary_nodes; j++) {
+         pdat::NodeIndex node_index(dim);
+         for (i = 0; i < dim.getValue(); i++) {
+            node_index(i) = ibuffer[counter];
+            counter++;
+         }
+
+         BoundaryNode bn(node_index);
+
+         int iosb = ibuffer[counter];
+         counter++;
+         if (iosb == 1) bn.setNodeOnBoundary();
+
+         for (k = 0; k < dim.getValue(); k++) {
+            for (i = 0; i < dim.getValue(); i++) {
+               node_index(i) = ibuffer[counter];
+               counter++;
+            }
+            bn.setNearestNeighborNode(node_index);
+         }
+         d_boundary_nodes[j] = bn;
+      }
+   }
+
+   /*
+    * The counter should equal the buffer size.  Otherwise, there is an
+    * error.
+    */
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(int_buff_size == counter);
+#endif
+
+   /*
+    * #doubles =
+    *   d_vol_fraction    (double) +
+    *   d_surr_vol        (double) +
+    *   d_front_area      (double) +
+    *   d_normal          (double[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]) +
+    *   d_front_centroid  (double[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]) +
+    *   d_area_fraction   (double[2*DIM]) +
+    *   d_flux_front      (double[DIM+2]) +
+    *   d_newbase         (double[DIM*DIM])
+    *   d_boundary_nodes  (double[DIM*DIM*(1+2*DIM)])
+    */
+
+   int dbl_buff_size = 3 + 4 * dim.getValue() + dim.getValue() + 2 + dim.getValue() * dim.getValue();
+   if (s_enable_boundary_node_storage) {
+      dbl_buff_size += dim.getValue() * dim.getValue() * (1 + 2 * dim.getValue());
+   }
+   double* dbuffer = new double[dbl_buff_size];
+   counter = 0;
+
+   database->getDoubleArray("dbuffer", dbuffer, dbl_buff_size);
+   d_vol_fraction = dbuffer[0];
+   d_surr_vol = dbuffer[1];
+   d_front_area = dbuffer[2];
+   counter += 3;
+
+   for (i = 0; i < dim.getValue(); i++) {
+      d_normal[i] = dbuffer[counter];
+      d_front_centroid[i] = dbuffer[counter + 1];
+      counter += 2;
+   }
+
+   for (i = 0; i < 2 * dim.getValue(); i++) {
+      d_area_fraction[i] = dbuffer[counter];
+      counter++;
+   }
+
+   for (i = 0; i < dim.getValue() + 2; i++) {
+      d_flux_front[i] = dbuffer[counter];
+      counter++;
+   }
+
+   for (i = 0; i < dim.getValue(); i++) {
+      for (j = 0; j < dim.getValue(); j++) {
+         d_newbase[i][j] = dbuffer[counter];
+         counter++;
+      }
+   }
+
+   if (s_enable_boundary_node_storage) {
+      // the maximum number of boundary nodes is dim*dim
+      for (i = 0; i < dim.getValue() * dim.getValue(); i++) {
+         d_boundary_nodes[i].setDistanceToBoundary(dbuffer[counter]);
+         counter++;
+      }
+   }
+
+   /*
+    * The counter should equal the buffer size.  Otherwise, there is an
+    * error.
+    */
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(dbl_buff_size == counter);
+#endif
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialize data in a new cut cell.
+ *                                                                       *
+ *************************************************************************
+ */
+void
+CutCell::initializeCutCellData()
+{
+   const tbox::Dimension& dim(d_index.getDim());
+
+   if ((dim == tbox::Dimension(1)) || (dim > tbox::Dimension(3))) {
+      TBOX_ERROR("CutCell : (dim == tbox::Dimension(1)) or > 3 not implemented");
+   }
+
+   d_vol_fraction = tbox::MathUtilities<double>::getSignalingNaN();
+   d_surr_vol = tbox::MathUtilities<double>::getSignalingNaN();
+   d_front_area = tbox::MathUtilities<double>::getSignalingNaN();
+
+   int i;
+   for (i = 0; i < dim.getValue(); i++) {
+      d_normal[i] = tbox::MathUtilities<double>::getSignalingNaN();
+      d_front_centroid[i] = tbox::MathUtilities<double>::getSignalingNaN();
+   }
+
+   int j;
+   for (i = 0; i < dim.getValue(); i++) {
+      for (j = 0; j < dim.getValue(); j++) {
+         d_newbase[i][j] = tbox::MathUtilities<double>::getSignalingNaN();
+      }
+   }
+
+   for (i = 0; i < 2 * dim.getValue(); i++) {
+      d_area_fraction[i] = tbox::MathUtilities<double>::getSignalingNaN();
+   }
+
+   for (i = 0; i < dim.getValue() + 2; i++) {
+      d_flux_front[i] = 0.;
+   }
+
+   d_num_boundary_nodes = 0;
+   if (s_enable_boundary_node_storage) {
+      d_boundary_nodes.clear();
+      d_boundary_nodes.resizeArray(dim.getValue() * dim.getValue(), BoundaryNode(dim));
+      d_is_split = false;
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Copy data from supplied cut cell                                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+CutCell::copyCutCellData(
+   const appu::CutCell& cut_cell)
+{
+   const tbox::Dimension& dim(d_index.getDim());
+
+   d_vol_fraction = cut_cell.d_vol_fraction;
+   d_surr_vol = cut_cell.d_surr_vol;
+   d_front_area = cut_cell.d_front_area;
+
+   int i;
+   for (i = 0; i < dim.getValue(); i++) {
+      d_normal[i] = cut_cell.d_normal[i];
+      d_front_centroid[i] = cut_cell.d_front_centroid[i];
+      for (int j = 0; j < dim.getValue(); j++) {
+         d_newbase[i][j] = cut_cell.d_newbase[i][j];
+      }
+   }
+   for (i = 0; i < 2 * dim.getValue(); i++) {
+      d_area_fraction[i] = cut_cell.d_area_fraction[i];
+   }
+
+   for (i = 0; i < dim.getValue() + 2; i++) {
+      d_flux_front[i] = cut_cell.d_flux_front[i];
+   }
+
+   d_num_boundary_nodes = cut_cell.d_num_boundary_nodes;
+   if (s_enable_boundary_node_storage) {
+      d_boundary_nodes.resizeArray(dim.getValue() * dim.getValue(), BoundaryNode(dim));
+      for (i = 0; i < d_num_boundary_nodes; i++) {
+         d_boundary_nodes[i] = cut_cell.d_boundary_nodes[i];
+      }
+   }
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/CutCell.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/CutCell.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,454 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Cut cell class for embedded boundary implementations 
+ *
+ ************************************************************************/
+
+#ifndef included_appu_CutCell
+#define included_appu_CutCell
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/appu/BoundaryNode.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/IOStream.h"
+#include "SAMRAI/tbox/List.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/MessageStream.h"
+#include "SAMRAI/tbox/Database.h"
+
+namespace SAMRAI {
+namespace appu {
+
+/*!
+ * @brief The CutCell struct holds data and methods to define a cut-cell
+ * on an irregular boundary.
+ *
+ * Information maintained by the struct includes the following:
+ *
+ *
+ *     - INDEX                 - index (i,j,k) of the cell
+ *     - VOL FRACTION          - volume fraction of the cell
+ *     - AREA FRACTION[2*DIM]  - areas of the faces of the cell
+ *     - NORMAL[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]           - normal to the cut plane through the cell
+ *     - FRONT AREA            - area of exposed plane cutting the cell
+ *     - SURROUNDING VOL       - volume of cells surrounding the cut cell
+ *     - NEW BASE              - a basis aligned with the cell cut face
+ *     - BOUNDARY NODE[DIM**2] - nodes on the corners of the cut cell, which
+ *                               contain information for immersed boundary
+ *                               calculations
+ */
+
+class CutCell
+{
+public:
+   /*!
+    * Static function to set whether storage will be allocated for boundary
+    * node information.
+    *
+    */
+   static void
+   enableBoundaryNodeStorage();
+
+   /*!
+    * Static function that returns whether storage is allocated for boundary
+    * node information.
+    */
+   static bool
+   boundaryNodesEnabled();
+
+   /*!
+    * Create a new ``empty'' CutCell.
+    */
+   CutCell();
+
+   /*!
+    * Create a new ``empty'' CutCell.
+    */
+   explicit CutCell(
+      const tbox::Dimension& dim);
+
+   /*!
+    * Create a new cut cell with specified cell index.
+    */
+   explicit CutCell(
+      const pdat::CellIndex& cut_cell);
+
+   /*!
+    * The copy constructor copies the data of the argument cell.
+    */
+   CutCell(
+      const appu::CutCell& cut_cell);
+
+   /*!
+    * The assignment operator copies the data of the argument cell.
+    */
+#if 0
+   CutCell&
+   operator = (
+      const appu::CutCell& cut_cell);
+#endif
+   CutCell&
+   copy(
+      const appu::CutCell& cut_cell);
+
+   /*!
+    * The destructor for CutCell.
+    */
+   ~CutCell();
+
+   /*!
+    * Returns the index (i,j,k) of the cell.
+    */
+   pdat::CellIndex
+   getIndex() const;
+
+   /*!
+    * Returns the volume fraction of cell.
+    */
+   double
+   getVolume() const;
+
+   /*!
+    * Returns the area fraction of the cell (dimension 2*DIM)
+    *   0,1 - Xlower,Xupper
+    *   2,3 - Ylower,Yupper
+    *   4,5 - Zlower,Zupper
+    */
+   const double *
+   getArea() const;
+
+   /*!
+    * Returns the area fraction of the cell for face i
+    *   i = 0,1 - Xlower,Xupper
+    *   i = 2,3 - Ylower,Yupper
+    *   i = 4,5 - Zlower,Zupper
+    */
+   double
+   getArea(
+      const int i) const;
+
+   /*!
+    * Returns the normal vector (dimension DIM).
+    */
+   const double *
+   getNormal() const;
+
+   /*!
+    * Returns the ith component of the normal vector.
+    */
+   double
+   getNormal(
+      const int i) const;
+
+   /*!
+    * Returns the frontal area of exposed cut surface.
+    */
+   double
+   getFrontArea() const;
+
+   /*!
+    * Returns the front centroid vector (dimension DIM).
+    */
+   const double *
+   getFrontCentroid() const;
+
+   /*!
+    * Returns the front centroid location for direction i.
+    */
+   double
+   getFrontCentroid(
+      const int i) const;
+
+   /*!
+    * Returns the volume of the cells surrounding the cut cell.
+    */
+   double
+   getSurrVolume() const;
+
+   /*!
+    * Returns the new base with components (i,j).
+    */
+   double
+   getNewBase(
+      const int i,
+      const int j) const;
+
+   /*!
+    * Return number of boundary nodes.
+    */
+   int
+   getNumberOfBoundaryNodes() const;
+
+   /*!
+    * Return boundary node class for location i.
+    */
+   BoundaryNode
+   getBoundaryNode(
+      const int i) const;
+
+   /*!
+    * TO BE REMOVED (eventually)
+    */
+   double
+   getFluxFront(
+      const int m) const;
+
+   /*!
+    * Sets the volume fraction of cell.
+    */
+   void
+   setVolume(
+      const double volume);
+
+   /*!
+    * Sets the area fraction of the cell for face i
+    *   i = 0,1 - Xlower,Xupper
+    *   i = 2,3 - Ylower,Yupper
+    *   i = 4,5 - Zlower,Zupper
+    */
+   void
+   setArea(
+      const double area,
+      const int i);
+
+   /*!
+    * Sets the normal vector for dimension i.
+    */
+   void
+   setNormal(
+      const double normal,
+      const int i);
+
+   /*!
+    * Sets the normal vector (dimension DIM).
+    */
+   void
+   setNormal(
+      const double* normal);
+
+   /*!
+    * Sets the volume of the cells surrounding the cut cell.
+    */
+   void
+   setSurrVolume(
+      const double surrvol);
+
+   /*!
+    * Sets the front area.
+    */
+   void
+   setFrontArea(
+      const double area);
+
+   /*!
+    * Sets the front centroid location for direction i.
+    */
+   void
+   setFrontCentroid(
+      const double centroid,
+      const int i);
+
+   /*!
+    * Set split cell.
+    */
+   void
+   setSplit();
+
+   /*!
+    * Explicitly set the new base vector with components (i,j).
+    */
+   void
+   setNewBase(
+      const double base,
+      const int i,
+      const int j);
+
+   /*!
+    * Set new base vector using supplied "base" vector.
+    */
+   void
+   setNewBase(
+      const double* base);
+
+   /*!
+    * Set new base vector using cell's normal vector.
+    */
+   void
+   setNewBase();
+
+   /*!
+    * TO BE REMOVED (eventually)
+    */
+   void
+   setFluxFront(
+      const int m,
+      const double front);
+
+   /*!
+    * Add the supplied boundary node to the array of boundary nodes
+    * maintained by this cut cell.
+    */
+   void
+   setBoundaryNode(
+      const BoundaryNode& node);
+
+   /*!
+    * Overwrite index i of the boundary node array maintained by
+    * the cut cell with the supplied boundary node.
+    */
+   void
+   setBoundaryNode(
+      const BoundaryNode& node,
+      const int i);
+
+   /*!
+    * Add the supplied index as an uninitialized boundary node.
+    */
+   void
+   setBoundaryNode(
+      const pdat::NodeIndex& node);
+
+   /*!
+    * Print volume and area data for the cell.
+    */
+   void
+   printVolumeAndAreas(
+      std::ostream& os) const;
+
+   /*!
+    * Print normal data for the cell.
+    */
+   void
+   printNormal(
+      std::ostream& os) const;
+
+   /*!
+    * Print boundary nodes for the cell.
+    */
+   void
+   printBoundaryNodes(
+      std::ostream& os) const;
+
+   /*!
+    * Print all data in the struct.
+    */
+   void
+   printAll(
+      std::ostream& os) const;
+
+   /*!
+    * The copySourceItem() method allows CutCell to be a templated
+    * data type for IndexData - i.e. IndexData<CutCell>.  In
+    * addition to this method, the other methods that must be defined are
+    * getDataStreamSize(), packStream(), unpackStream() for communication,
+    * putToDatabase(), getFromDatabase for restart.  These are described
+    * below.
+    */
+   void
+   copySourceItem(
+      hier::Index& index,
+      const hier::IntVector& src_offset,
+      appu::CutCell& src_item);
+
+   /*!
+    * The following functions enable parallel communication with
+    * CutCells. They are used in SAMRAI communication infrastructure to
+    * specify the number of bytes of data stored in each CutCell object,
+    * and to pack and unpack the data to the specified stream.
+    */
+   size_t
+   getDataStreamSize();
+   void
+   packStream(
+      tbox::MessageStream& stream);
+   void
+   unpackStream(
+      tbox::MessageStream& stream,
+      const hier::IntVector& offset);
+
+   /*!
+    * These functions are used to read/write CutCell data to/from
+    * restart.
+    */
+   void
+   getFromDatabase(
+      tbox::Pointer<tbox::Database>& database);
+   void
+   putToDatabase(
+      tbox::Pointer<tbox::Database>& database);
+
+private:
+   /*
+    * Specifies whether or not storage will be allocated for boundary node
+    * data.
+    */
+   static bool s_enable_boundary_node_storage;
+
+   /*
+    * Initialize data in a new cut cell.
+    */
+   void
+   initializeCutCellData();
+
+   /*
+    * Copy data from supplied cut cell.
+    */
+   void
+   copyCutCellData(
+      const appu::CutCell& cut_cell);
+
+   /*
+    * Index of CutCell
+    */
+   pdat::CellIndex d_index;
+
+   /*
+    * Volume and area fractions.
+    */
+   double d_vol_fraction;
+   double d_area_fraction[2 * tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   /*
+    * Surface normal and exposed (wetted) area of cut region.
+    */
+   double d_normal[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   double d_front_area;
+   double d_front_centroid[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   bool d_is_split;
+
+   /*
+    * Volume of surrounding cells.
+    */
+   double d_surr_vol;
+
+   /*
+    * New base.  Not sure exactly if we need to store this here, but
+    * keep it for now.
+    */
+   double d_newbase[tbox::Dimension::MAXIMUM_DIMENSION_VALUE][tbox::Dimension::
+                                                        MAXIMUM_DIMENSION_VALUE];
+
+   /*
+    * Array of BoundaryNodes on this cut cell.
+    */
+   int d_num_boundary_nodes;
+   tbox::Array<appu::BoundaryNode> d_boundary_nodes;
+
+   /*
+    * Flux front - EVENTUALLY REMOVE!!
+    */
+   double d_flux_front[2 + tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/ElevenPatchInterface.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/ElevenPatchInterface.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,179 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   SAMRAI interface to Eleven library 
+ *
+ ************************************************************************/
+//
+// THIS CLASS IS CURRENTLY EMPTY BECAUSE INTERFACES TO ELEVEN ARE
+// STILL BEING DEVELOPED.  PLEASE CONTACT SAMRAI DEVELOPERS IF YOU
+// ARE INTERESTED IN USING ELEVEN INTERFACES.
+//
+#ifndef included_ElevenPatchInterface_C
+#define included_ElevenPatchInterface_C
+
+#include "SAMRAI/appu/ElevenPatchInterface.h"
+
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/appu/CutCell.h"
+#include "SAMRAI/appu/EmbeddedBoundaryDefines.h"
+#include "SAMRAI/pdat/IndexData.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace appu {
+
+/*
+ *******************************************************************
+ *
+ *  Constructor
+ *
+ *******************************************************************
+ */
+ElevenPatchInterface::ElevenPatchInterface(
+   const std::string& object_name,
+   tbox::Pointer<tbox::Database> input_db)
+{
+   d_object_name = object_name;
+
+   getFromInput(input_db);
+}
+
+/*
+ *******************************************************************
+ *
+ *  Destructor
+ *
+ *******************************************************************
+ */
+ElevenPatchInterface::~ElevenPatchInterface()
+{
+
+}
+
+/*
+ *******************************************************************
+ *
+ *  Return eleven patch information
+ *
+ *******************************************************************
+ */
+void ElevenPatchInterface::calculateCutCellInfo(
+   tbox::Pointer<hier::Patch>& patch,
+   const int cell_flag_data_id,
+   const int cell_vol_data_id,
+   const int node_flag_data_id,
+   const int cutcell_data_id)
+{
+   NULL_USE(patch);
+   NULL_USE(cell_flag_data_id);
+   NULL_USE(cell_vol_data_id);
+   NULL_USE(node_flag_data_id);
+   NULL_USE(cutcell_data_id);
+
+   TBOX_ERROR(
+      d_object_name << ":Unable to use ELEVEN."
+      <<
+      "\nPlease contact SAMRAI developers to find out more"
+      << "\ninformation." << std::endl);
+}
+
+/*
+ *******************************************************************
+ *
+ *  Check whether a particular node is inside the shape
+ *
+ *******************************************************************
+ */
+bool ElevenPatchInterface::isInside(
+   const double* xyz) const
+{
+   NULL_USE(xyz);
+
+   TBOX_ERROR(
+      d_object_name << ":Unable to use ELEVEN."
+      <<
+      "\nPlease contact SAMRAI developers to find out more"
+      << "\ninformation." << std::endl);
+
+   return true;
+}
+
+/*
+ *******************************************************************
+ *
+ *  Mark a SET of nodes on a patch as being inside or outside the
+ *  shape.
+ *
+ *     nx[tbox::Dimension::MAXIMUM_DIMENSION_VALUE] is the dimensions of the patch
+ *     dx[tbox::Dimension::MAXIMUM_DIMENSION_VALUE] is the delta x in each direction of the patch
+ *     origin[tbox::Dimension::MAXIMUM_DIMENSION_VALUE] is the location of the lower left node of the
+ *                 patch
+ *     inout[nx[0]*nx[1]*nx[2]] is the array holding whether the
+ *                 nodes are inside or outside (1=inside, 0=outside)
+ *
+ *******************************************************************
+ */
+void ElevenPatchInterface::isInside(
+   const int* nx,
+   const double* dx,
+   const double* origin,
+   int* inout) const
+{
+   NULL_USE(nx);
+   NULL_USE(dx);
+   NULL_USE(origin);
+   NULL_USE(inout);
+
+   TBOX_ERROR(
+      d_object_name << ":Unable to use ELEVEN."
+      <<
+      "\nPlease contact SAMRAI developers to find out more"
+      << "\ninformation." << std::endl);
+}
+
+/*
+ *******************************************************************
+ *
+ *  Read info from input
+ *
+ *******************************************************************
+ */
+void ElevenPatchInterface::getFromInput(
+   tbox::Pointer<tbox::Database> db)
+{
+   NULL_USE(db);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   TBOX_ERROR(
+      d_object_name << ":Unable to use ELEVEN."
+      <<
+      "\nPlease contact SAMRAI developers to find out more"
+      << "\ninformation." << std::endl);
+
+}
+
+/*
+ *******************************************************************
+ *
+ *  Dump (to supplied os) class information
+ *
+ *******************************************************************
+ */
+void ElevenPatchInterface::printClassData(
+   std::ostream& os) const
+{
+   os << "d_object_name = " << d_object_name << std::endl;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/ElevenPatchInterface.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/ElevenPatchInterface.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,176 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   SAMRAI interface to Eleven library 
+ *
+ ************************************************************************/
+
+#ifndef included_ElevenPatchInterface
+#define included_ElevenPatchInterface
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#ifdef HAVE_ELEVEN
+#include "model.hh"
+#endif
+
+namespace SAMRAI {
+namespace appu {
+
+/*!
+ * @brief This class provides an interface to the Eleven geometry library by
+ * Kyle Chand in CASC.  The shapes over which the embedded boundary
+ * is cut is defined through an XML database, the name of which is specified
+ * in the input file.
+ *
+ * Use of this class first requires that you link with the Eleven library.
+ * Next, you must specify a 'ElevenPatchInterface {...}"
+ * input entry in the input for the EmbeddedBoundaryGeometry class.  In
+ * this input you specify the name of the XML database file that defines
+ * the surface geometry.
+ *
+ * Once an instance of the class is created, SAMRAI will pass patch information
+ * to the "calculateCutCellInfo()" class whenever an embedded boundary is
+ * constructed on a new level.  The eleven interfaces may be used to
+ * compute the volume fractions through an inside/outside determination of
+ * the nodes of the cell, and also may be used to compute the distance
+ * of a particular node from the surface boundary.
+ *
+ * Required input keys and data types:
+ *
+ *    - \b database_file
+ *       string indicating the name of the XML database file describing the
+ *       geometry.
+ *
+ *
+ *
+ * Optional input keys:
+ *
+ *    - \b geom_tolerance
+ *       double value indicating the error tolerance for determining
+ *       geometric information relative to the cartesian grid.  For instance,
+ *       a setting of 0.01 indicates the error tolerance will be 1% of the
+ *       supplied patch bounding box.
+ *
+ * A sample input file entry might look like:
+ *
+ * \verbatim
+ *
+ *   ElevenPatchInterface {
+ *      database_file = "circle_r.3.gzxml"
+ *      geom_tolerance = 0.01 // 1% of bounding box
+ *   }
+ * \endverbatim
+ *
+ * @see appu::EmbeddedBoundaryGeometry
+ * @see appu::CutCell
+ */
+
+class ElevenPatchInterface
+{
+public:
+   /*!
+    * The constructor initializes the eleven library and optionally starts
+    * an interactive interface
+    *
+    * @param object_name name of object of this class
+    * @param input_db    the input database which contains radius and
+    *                    center specification.
+    */
+   ElevenPatchInterface(
+      const std::string& object_name,
+      tbox::Pointer<tbox::Database> input_db);
+
+   /*!
+    * The destructor does nothing.
+    */
+   virtual ~ElevenPatchInterface();
+
+   /*!
+    * This method computes information about the cut cells on a patch.
+    */
+   void
+   calculateCutCellInfo(
+      tbox::Pointer<hier::Patch>& patch,
+      const int cell_flag_data_id,
+      const int cell_vol_data_id,
+      const int node_flag_data_id,
+      const int cutcell_data_id);
+
+   /*!
+    * For a given point, specify whether that point is inside (true)
+    * or outside (false) the set of shapes.
+    *
+    * @param xyz  double array[tbox::Dimension::MAXIMUM_DIMENSION_VALUE] specifying coordinates.
+    */
+   bool
+   isInside(
+      const double* xyz) const;
+
+   /*!
+    * For a SET of nodes on a patch, with patch dimensions (number of
+    * nodes in each direction) nx[tbox::Dimension::MAXIMUM_DIMENSION_VALUE], origin[tbox::Dimension::MAXIMUM_DIMENSION_VALUE], and grid spacing
+    * dx[tbox::Dimension::MAXIMUM_DIMENSION_VALUE], set the integer inout[nx[0]*nx[1]*nx[2]] array to specify
+    * whether nodes are inside or outside.
+    *
+    * Node is:
+    *     INSIDE  - set inout[ijk] = 1
+    *     OUTSIDE - set inout[ijk] = 0
+    *
+    * @param nx integer array [tbox::Dimension::MAXIMUM_DIMENSION_VALUE] specifying number of points in each dir
+    * @param dx double array [tbox::Dimension::MAXIMUM_DIMENSION_VALUE] specifying spacing of points in each dir
+    * @param origin double array [tbox::Dimension::MAXIMUM_DIMENSION_VALUE] specifying origin of lower corner
+    * @param inout int array dimensioned the total number of points
+    *        (i.e. nx[0]*nx[1]*nx[2]).  This is an OUTPUT quantity.
+    */
+   void
+   isInside(
+      const int* nx,
+      const double* dx,
+      const double* origin,
+      int* inout) const;
+
+   /*!
+    * Dump data to supplied stream.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os) const;
+
+private:
+   /*
+    * Read name, database_file, and geom tolerance information from input.
+    * All inputs are optional.  The default behavior starts the interactive
+    * interface to allow a user to build some geometry.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db);
+
+   std::string d_object_name;
+
+   /*
+    * Eleven objects used to represent the geometry
+    */
+#ifdef HAVE_ELEVEN
+//   mutable ELEVEN::PointList points;
+//   mutable ELEVEN::CompoundCurveList curves;
+   mutable ELEVEN::CompoundCurve::ProjectionInfo pi;
+   mutable ELEVEN::ArrayVector3D x, xp;
+
+   mutable ELEVEN::Model * d_eleven_model;
+#endif
+
+};
+
+}
+}
+
+#endif // included_ElevenPatchInterface
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/EmbeddedBoundaryDefines.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/EmbeddedBoundaryDefines.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Definitions of cells and nodes on embedded boundaries. 
+ *
+ ************************************************************************/
+
+#ifndef included_appu_EmbeddedBoundaryDefines
+#define included_appu_EmbeddedBoundaryDefines
+
+#include "SAMRAI/SAMRAI_config.h"
+
+namespace SAMRAI {
+namespace appu {
+
+/*!
+ * @brief Class EmbeddedBoundaryDefines sets the enumerated types used
+ * to define cells and nodes on the embedded boundary level.
+ *
+ * @see appu::EmbeddedBoundaryGeometry
+ * @see appu::CutCell
+ * @see appu::BoundaryNode
+ */
+
+class EmbeddedBoundaryDefines
+{
+public:
+   /*!
+    * Enumerated type for the different cell classifications.
+    *
+    * - \b SOLID          {Cell is located in the "solid" region.}
+    * - \b CUT            {Cell is cut, meaning a CutCell data
+    *                      structure will be maintained at this cell.}
+    * - \b BORDER         {Cell neighbors a cut cell, in the "flow" region.}
+    * - \b FLOW           {Cell is located in the "flow" region.}
+    */
+   enum CELL_TYPE { SOLID = 0,
+                    CUT = 1,
+                    BORDER = 2,
+                    FLOW = 3 };
+
+   /*!
+    * Enumerated type for inside/outside node classification.
+    *
+    * - \b INSIDE         {Node is located "inside" the prescribed geometry.}
+    * - \b OUTSIDE        {Node is outside the geometry.}
+    * - \b BOUNDARY       {Node is on the boundary of the geometry.  That is
+    *                      it is the first one "inside" the geometry.}
+    * - \b ONBOUNDARY     {Node is located exactly on the boundary of the
+    *                      geometry (used to avoid divide-by-zero problems)
+    *                      in numerical operations at embedded boundary.}
+    */
+   enum NODE_TYPE { OUTSIDE = 0,
+                    INSIDE = 1,
+                    BOUNDARY = 2,
+                    ONBOUNDARY = -9 };
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/EmbeddedBoundaryGeometry.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/EmbeddedBoundaryGeometry.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,4115 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Compute and store geometry information about the
+ *                embedded boundary 
+ *
+ ************************************************************************/
+#ifndef included_appu_EmbeddedBoundaryGeometry_C
+#define included_appu_EmbeddedBoundaryGeometry_C
+
+#include "SAMRAI/appu/EmbeddedBoundaryGeometry.h"
+
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/appu/CartesianBoundaryDefines.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/CellIntegerConstantRefine.h"
+#include "SAMRAI/pdat/CellDoubleConstantRefine.h"
+#include "SAMRAI/pdat/IndexData.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/IOStream.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeIterator.h"
+#include "SAMRAI/pdat/NodeIndex.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/xfer/RefineSchedule.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+// Shapes used to cut embedded boundary
+#include "SAMRAI/appu/EmbeddedBoundaryShapePolygon.h"
+#include "SAMRAI/appu/EmbeddedBoundaryShapeSphere.h"
+
+#define APPU_EMBEDDED_BOUNDARY_GEOMETRY_VERSION (1)
+#define EBGEOM_UNDEFINED (-1)
+#define CUTCASE_UNDEFINED (-1)
+
+#undef USE_SINGLE_POINT_FOR_INOUT
+//#define USE_SINGLE_POINT_FOR_INOUT
+//#undef USE_ARRAY_FOR_INOUT
+#define USE_ARRAY_FOR_INOUT
+#undef DEBUG_PRINT
+//#define DEBUG_PRINT
+//#undef RECORD_STATS
+#define RECORD_STATS
+
+#ifdef RECORD_STATS
+#include "SAMRAI/tbox/Statistic.h"
+#include "SAMRAI/tbox/Statistician.h"
+#endif
+
+/*
+ *************************************************************************
+ *
+ * External declarations for FORTRAN 77 routines
+ *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+void F77_FUNC(setebparams, SETEBPARAMS) (const int &, const int &, const int &,
+   const int &,
+   const int &, const int &, const int &, const int &);
+
+// 2D fortran subroutines
+void F77_FUNC(node2cellflag2d, node2cellflag2D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   int *,
+   double *);
+
+void F77_FUNC(setebnode2d, SETEBNODE2D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   int *, double *);
+
+void F77_FUNC(setebedge2d, SETEBEDGE2D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   double *, double *);
+
+// 3D fortran subroutines
+void F77_FUNC(node2cellflag3d, NODE2CELLFLAG3D) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   int *,
+   double *);
+
+void F77_FUNC(setebnode3d, SETEBNODE3D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &,
+   double *, double *);
+
+void F77_FUNC(setebedge3d, SETEBEDGE3D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &,
+   double *, double *);
+
+void F77_FUNC(setebface3d, SETEBFACE3D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &,
+   double *, double *);
+
+}
+
+namespace SAMRAI {
+namespace appu {
+
+tbox::Pointer<tbox::Timer> EmbeddedBoundaryGeometry::t_compute_eb;
+tbox::Pointer<tbox::Timer> EmbeddedBoundaryGeometry::t_calc_node_inout;
+tbox::Pointer<tbox::Timer> EmbeddedBoundaryGeometry::t_calc_volume;
+tbox::Pointer<tbox::Timer> EmbeddedBoundaryGeometry::t_calc_area;
+tbox::Pointer<tbox::Timer> EmbeddedBoundaryGeometry::t_calc_boundary_node;
+tbox::Pointer<tbox::Timer> EmbeddedBoundaryGeometry::t_eb_phys_bdry;
+tbox::Pointer<tbox::Timer> EmbeddedBoundaryGeometry::t_read_write_eb;
+
+/*
+ *************************************************************************
+ *                                                                       *
+ *  Constructor initializes private data and reads input.                *
+ *                                                                       *
+ *************************************************************************
+ */
+EmbeddedBoundaryGeometry::EmbeddedBoundaryGeometry(
+   const std::string& object_name,
+   tbox::Pointer<tbox::Database> input_db,
+   const tbox::Pointer<geom::CartesianGridGeometry> grid_geom,
+   const hier::IntVector& nghosts):
+   xfer::RefinePatchStrategy(grid_geom->getDim()),
+   d_object_name(object_name),
+   d_grid_geometry(grid_geom),
+   d_ebdry_nghosts(nghosts),
+   d_ebdry_data_id(EBGEOM_UNDEFINED),
+   d_cell_flag_data_id(EBGEOM_UNDEFINED),
+   d_cell_vol_data_id(EBGEOM_UNDEFINED),
+   d_node_flag_data_id(EBGEOM_UNDEFINED),
+   d_max_levels(0),
+   d_ratio_to_coarser(0, hier::IntVector(grid_geom->getDim())),
+   d_level_ratios(0, hier::IntVector(grid_geom->getDim())),
+   d_use_cubes(false),
+   d_use_eleven_inside_outside(false),
+   d_use_eleven_boundary_node(false),
+   d_max_subdivides(0),
+   d_use_recursive_algs(false),
+   d_compute_areas_and_normal(false),
+   d_compute_cutcell_index_data(false),
+   d_compute_boundary_node_data(false)
+{
+   initialize(input_db);
+}
+
+EmbeddedBoundaryGeometry::EmbeddedBoundaryGeometry(
+   const std::string& object_name,
+   tbox::Pointer<tbox::Database> input_db,
+   const tbox::Pointer<geom::CartesianGridGeometry> grid_geom):
+   xfer::RefinePatchStrategy(grid_geom->getDim()),
+   d_object_name(object_name),
+   d_grid_geometry(grid_geom),
+   d_ebdry_nghosts(grid_geom->getDim()),
+   d_ebdry_data_id(EBGEOM_UNDEFINED),
+   d_cell_flag_data_id(EBGEOM_UNDEFINED),
+   d_cell_vol_data_id(EBGEOM_UNDEFINED),
+   d_node_flag_data_id(EBGEOM_UNDEFINED),
+   d_max_levels(0),
+   d_ratio_to_coarser(0, hier::IntVector(grid_geom->getDim())),
+   d_level_ratios(0, hier::IntVector(grid_geom->getDim())),
+   d_use_cubes(false),
+   d_use_eleven_inside_outside(false),
+   d_use_eleven_boundary_node(false),
+   d_max_subdivides(0),
+   d_use_recursive_algs(false),
+   d_compute_areas_and_normal(false),
+   d_compute_cutcell_index_data(false),
+   d_compute_boundary_node_data(false)
+{
+   initialize(input_db);
+}
+
+void EmbeddedBoundaryGeometry::initialize(
+   tbox::Pointer<tbox::Database> input_db)
+{
+   const tbox::Dimension& dim(d_grid_geometry->getDim());
+
+   if ((dim == tbox::Dimension(1)) || (dim > tbox::Dimension(3))) {
+      TBOX_ERROR("EmbeddedBoundaryGeometry : DIM = 1 or > 3 not implemented");
+   }
+
+   /*
+    * Set commons in the fortran routines used by this class.
+    */
+   F77_FUNC(setebparams, SETEBPARAMS) (SOLID, CUT, BORDER, FLOW,          // cell
+      OUTSIDE, INSIDE, BOUNDARY, ONBOUNDARY);        // node
+
+   /*
+    * Register with RestartManager to write restart info via
+    * the "putToDatabase()" method.
+    */
+   tbox::RestartManager::getManager()->
+   registerRestartItem(d_object_name, this);
+
+   /*
+    * Initialize variables and communication algorithms.
+    */
+   initializeVariables(d_ebdry_nghosts);
+
+   /*
+    * If this is a restarted case, get information from restart.
+    */
+   bool is_from_restart =
+      tbox::RestartManager::getManager()->isFromRestart();
+   if (is_from_restart) {
+      getFromRestart();
+   }
+
+   /*
+    * Get information from input.
+    */
+   if (!(input_db.isNull())) {
+      getFromInput(input_db, is_from_restart);
+   }
+
+   if (d_use_cubes) {
+      d_cubes_interface = new appu::CubesPatchInterface(
+            "CubesPatchInterface",
+            input_db->getDatabase("CubesPatchInterface"),
+            d_grid_geometry,
+            d_ebdry_nghosts);
+      d_cubes_interface->setRecordAreasAndNormal(d_compute_areas_and_normal);
+   }
+
+   if (d_use_eleven_boundary_node || d_use_eleven_inside_outside) {
+      d_eleven_interface = new ElevenPatchInterface(
+            "ElevenPatchInterface",
+            input_db->getDatabase("ElevenPatchInterface"));
+   }
+
+   /*
+    * Set defaults for boundary conditions.  Initialize to bogus values
+    * for error checking.
+    */
+   int i;
+   if ((dim == tbox::Dimension(2))) {
+      d_edge_bdry_cond.resizeArray(NUM_2D_EDGES);
+      for (i = 0; i < NUM_2D_EDGES; i++) {
+         d_edge_bdry_cond[i] = tbox::MathUtilities<int>::getMax();
+      }
+
+      d_node_bdry_cond.resizeArray(NUM_2D_NODES);
+      for (i = 0; i < NUM_2D_NODES; i++) {
+         d_node_bdry_cond[i] = tbox::MathUtilities<int>::getMax();
+      }
+   }
+
+   if ((dim == tbox::Dimension(3))) {
+      d_face_bdry_cond.resizeArray(NUM_3D_FACES);
+      for (i = 0; i < NUM_3D_FACES; i++) {
+         d_face_bdry_cond[i] = tbox::MathUtilities<int>::getMax();
+      }
+      d_edge_bdry_cond.resizeArray(NUM_3D_EDGES);
+      for (i = 0; i < NUM_3D_EDGES; i++) {
+         d_edge_bdry_cond[i] = tbox::MathUtilities<int>::getMax();
+      }
+
+      d_node_bdry_cond.resizeArray(NUM_3D_NODES);
+      for (i = 0; i < NUM_3D_NODES; i++) {
+         d_node_bdry_cond[i] = tbox::MathUtilities<int>::getMax();
+      }
+   }
+
+   /*
+    * The boundary node stuff only works if you have at least
+    * one ghost cell.
+    */
+   if (d_compute_boundary_node_data) {
+      for (i = 0; i < dim.getValue(); i++) {
+         if (d_ebdry_nghosts(i) <= 0) {
+            TBOX_ERROR(
+               d_object_name << ": cannot compute boundary node"
+               <<
+               " information unless at least one ghost is used."
+               <<
+               "\nAdjust the 'nghosts' argument used for "
+               << "constructing this object, or set"
+               <<
+               "\n'compute_boundary_node_data = FALSE' in "
+               << "the input file." << std::endl);
+         }
+      }
+   }
+
+   /*
+    * Timers used in this class.
+    */
+   t_compute_eb = tbox::TimerManager::getManager()->
+      getTimer("appu::EmbeddedBoundaryGeometry::computeEBOnLevel()");
+   t_calc_node_inout = tbox::TimerManager::getManager()->
+      getTimer("appu::EmbeddedBoundaryGeometry::tagInsideOutsideNodes()");
+   t_calc_volume = tbox::TimerManager::getManager()->
+      getTimer("appu::EmbeddedBoundaryGeometry::calculateVolume()");
+   t_calc_area = tbox::TimerManager::getManager()->
+      getTimer("appu::EmbeddedBoundaryGeometry::calculateArea()");
+   t_calc_boundary_node = tbox::TimerManager::getManager()->
+      getTimer("appu::EmbeddedBoundaryGeometry::calculateBoundaryNodes()");
+   t_eb_phys_bdry = tbox::TimerManager::getManager()->
+      getTimer("appu::EmbeddedBoundaryGeometry::setEBAtPhysBoundaries()");
+   t_read_write_eb = tbox::TimerManager::getManager()->
+      getTimer("appu::EmbeddedBoundaryGeometry::read_writeEBto_fromFile()");
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Empty destructor.                                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+EmbeddedBoundaryGeometry::~EmbeddedBoundaryGeometry()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ *  Initialize geometric features of embedded boundary on the supplied   *
+ *  patch level. This procedure generally involves three steps:          *
+ *                                                                       *
+ *    1) Set the cell flag, cell volume, and boundary cell parameters    *
+ *       (e.g. volume fraction, area fractions, surface normal).  If     *
+ *       the supplied level is in a patch hierarchy and a coarser level  *
+ *       that contains embedded boundary already exists, we can use      *
+ *       this information to speed up the construction.                  *
+ *    2) Extend the embedded boundary into the physical boundary region  *
+ *       of the problem (e.g. set the normal appropriate to the type of  *
+ *       boundary condition applied).                                    *
+ *    3) Construct volume of cells surrounding the cut cell, which is    *
+ *       used to distribute conserved quantities.                        *
+ *                                                                       *
+ *  Depending on the arguments supplied, this method may be used in      *
+ *  one of two ways.  The first, taking only the level as an argument,   *
+ *  performs an exhaustive search of all cells on the level              *
+ *  to find the cut cells and classify the cells as FLOW, SOLID, or CUT. *
+ *  The second, taking as additional arguments a hierarchy, coarser_level,
+ *  and possibly old_level, performs the same function but uses the      *
+ *  information on the coarser and old levels to narrow the search for   *
+ *  cut cells, making it considerably faster.  Generally, the first method
+ *  is used for the coarsest level only and the second is used for all   *
+ *  subsequent finer levels.                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+void
+EmbeddedBoundaryGeometry::buildEmbeddedBoundaryOnLevel(
+   const tbox::Pointer<hier::PatchLevel> level,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const tbox::Pointer<hier::PatchLevel> old_level)
+{
+   NULL_USE(hierarchy);
+   NULL_USE(old_level);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(level.isNull()));
+#endif
+
+   /*
+    * Set level ratio information required to build the
+    * embedded boundary.
+    */
+   setLevelRatioInformation(level);
+
+   /*
+    * Make sure the boundary, flag, and vol data have been allocated
+    * on the level.
+    */
+   if (!(level->checkAllocated(d_ebdry_data_id))) {
+      level->allocatePatchData(d_ebdry_data_id);
+   }
+   if (!(level->checkAllocated(d_cell_flag_data_id))) {
+      level->allocatePatchData(d_cell_flag_data_id);
+   }
+
+   if (!(level->checkAllocated(d_node_flag_data_id))) {
+      level->allocatePatchData(d_node_flag_data_id);
+   }
+
+   if (!(level->checkAllocated(d_cell_vol_data_id))) {
+      level->allocatePatchData(d_cell_vol_data_id);
+   }
+
+   /*
+    * Initialze flag and vol data to FLOW conditions - flag=FLOW, vol=1.0
+    */
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      tbox::Pointer<pdat::CellData<int> > cell_flag =
+         patch->getPatchData(d_cell_flag_data_id);
+      tbox::Pointer<pdat::CellData<int> > node_flag =
+         patch->getPatchData(d_cell_flag_data_id);
+      tbox::Pointer<pdat::CellData<double> > vol =
+         patch->getPatchData(d_cell_vol_data_id);
+
+      cell_flag->fillAll(FLOW);
+      node_flag->fillAll(OUTSIDE);
+      vol->fillAll(1.0);
+   }
+
+   /*
+    * If we are operating on a temporary level, or on the coarsest level
+    * of the hierarchy, iterate over all cells to classify cells as
+    * FLOW, SOLID, or CUT.
+    *
+    * If on a finer level, use the coarser level flag
+    * information to help isolate the search.  Refine the cell flag
+    * from the coarser level and operate only on cells that
+    * were identified as being split cells on the coarser level.
+    */
+
+   int level_number = level->getLevelNumber();
+
+   /*
+    * Read the embedded boundary from file or generate it.  If it is read
+    * from file, the grid geometry may be null since we don't need the
+    * cell dx information.
+    */
+   if (d_read_ebdry) {
+
+      readLevelEmbeddedBoundaryDataFromFile(level, d_ebdry_dirname);
+
+   } else {
+
+      /*
+       * If the embedded boundary is to be constructed, the grid geometry
+       * must be non-null and we must have a valid array of shapes from
+       * input.
+       */
+      if (d_grid_geometry.isNull()) {
+         TBOX_ERROR(
+            d_object_name << ":buildEmbeddedBoundaryOnLevel()"
+            <<
+            "\nThe grid geometry is NULL.  Make sure the"
+            <<
+            "\ngrid geometry is supplied to the constructor."
+            << std::endl);
+      }
+
+      /*
+       * Reset error parameters for cut cell computation on level.
+       */
+      int cut_cells_on_proc = 0;
+      double l2_volume_error = 0.;
+      double l2_area_error = 0.;
+      double max_volume_error = 0.;
+      double max_area_error = 0.;
+
+      /*
+       * Compute solid, cut, and surrounding cells on level.
+       * - If there are no coarser levels, do an exhaustive search to find
+       *   the inside/outside points on the level (expensive).
+       * - If there is a coarser level in the hierarchy, use the flag
+       *   information from the coarser level to narrow the search for
+       *   cut cells.
+       */
+      t_compute_eb->start();
+      if (d_use_cubes || d_use_eleven_boundary_node) {
+         computeEmbeddedBoundaryOnLevelWithPackage(level,
+            cut_cells_on_proc);
+      } else {
+         computeEmbeddedBoundaryOnLevel(level,
+            cut_cells_on_proc,
+            l2_volume_error,
+            l2_area_error,
+            max_volume_error,
+            max_area_error);
+      }
+      t_compute_eb->stop();
+
+      /*
+       * Output information about the cut cells on the level.
+       */
+
+      int number_cells = 0;
+      hier::BoxArray level_boxes = level->getBoxes();
+      for (int i = 0; i < level_boxes.getNumberOfBoxes(); i++) {
+         number_cells += level_boxes[i].size();
+      }
+
+      int cut_cells_on_level = cut_cells_on_proc;
+      const tbox::SAMRAI_MPI& mpi(level->getMappedBoxLevel()->getMPI());
+      if (mpi.getSize() > 1) {
+         mpi.AllReduce(&cut_cells_on_level, 1, MPI_SUM);
+      }
+
+      if (d_verbose) {
+
+         tbox::pout << "============ Embedded Boundary on Level "
+                    << level_number
+                    << " ============"
+                    << "\n  total number cells on level: " << number_cells
+                    << "\n  number cut cells on level:   "
+                    << cut_cells_on_level;
+
+         if (!(d_use_cubes || d_use_eleven_boundary_node)) {
+
+            if (cut_cells_on_level > 0) {
+               l2_volume_error =
+                  sqrt(l2_volume_error) / (double)cut_cells_on_level;
+               l2_area_error =
+                  sqrt(l2_area_error) / (double)cut_cells_on_level;
+            }
+            tbox::pout << "\n  L2 norm of error in volume:  "
+                       << l2_volume_error;
+
+            if (d_compute_areas_and_normal) {
+               tbox::pout << "\n  L2 norm of error in area:    "
+                          << l2_area_error
+                          << "\n  max error in volume:         "
+                          << max_volume_error
+                          << "\n  max error in area:           "
+                          << max_area_error;
+            } else {
+
+               tbox::pout << "\n  AREAS NOT COMPUTED           ";
+
+            }
+         }
+
+         tbox::pout << "\n===================================================="
+                    << std::endl;
+
+      }
+
+#ifdef RECORD_STATS
+      tbox::Pointer<tbox::Statistic> num_patches_l0 =
+         tbox::Statistician::getStatistician()->
+         getStatistic("NumberPatchesL0", "PROC_STAT");
+      tbox::Pointer<tbox::Statistic> num_patches_l1 =
+         tbox::Statistician::getStatistician()->
+         getStatistic("NumberPatchesL1", "PROC_STAT");
+      tbox::Pointer<tbox::Statistic> num_patches_l2 =
+         tbox::Statistician::getStatistician()->
+         getStatistic("NumberPatchesL2", "PROC_STAT");
+      tbox::Pointer<tbox::Statistic> num_patches_l3 =
+         tbox::Statistician::getStatistician()->
+         getStatistic("NumberPatchesL3", "PROC_STAT");
+      tbox::Pointer<tbox::Statistic> num_patches_l4 =
+         tbox::Statistician::getStatistician()->
+         getStatistic("NumberPatchesL4", "PROC_STAT");
+
+      tbox::Pointer<tbox::Statistic> num_gridcells_l0 =
+         tbox::Statistician::getStatistician()->
+         getStatistic("NumberGridcellsL0", "PROC_STAT");
+      tbox::Pointer<tbox::Statistic> num_gridcells_l1 =
+         tbox::Statistician::getStatistician()->
+         getStatistic("NumberGridcellsL1", "PROC_STAT");
+      tbox::Pointer<tbox::Statistic> num_gridcells_l2 =
+         tbox::Statistician::getStatistician()->
+         getStatistic("NumberGridcellsL2", "PROC_STAT");
+      tbox::Pointer<tbox::Statistic> num_gridcells_l3 =
+         tbox::Statistician::getStatistician()->
+         getStatistic("NumberGridcellsL3", "PROC_STAT");
+      tbox::Pointer<tbox::Statistic> num_gridcells_l4 =
+         tbox::Statistician::getStatistician()->
+         getStatistic("NumberGridcellsL4", "PROC_STAT");
+
+      tbox::Pointer<tbox::Statistic> num_cutcells_l0 =
+         tbox::Statistician::getStatistician()->
+         getStatistic("NumberCutcellsL0", "PROC_STAT");
+      tbox::Pointer<tbox::Statistic> num_cutcells_l1 =
+         tbox::Statistician::getStatistician()->
+         getStatistic("NumberCutcellsL1", "PROC_STAT");
+      tbox::Pointer<tbox::Statistic> num_cutcells_l2 =
+         tbox::Statistician::getStatistician()->
+         getStatistic("NumberCutcellsL2", "PROC_STAT");
+      tbox::Pointer<tbox::Statistic> num_cutcells_l3 =
+         tbox::Statistician::getStatistician()->
+         getStatistic("NumberCutcellsL3", "PROC_STAT");
+      tbox::Pointer<tbox::Statistic> num_cutcells_l4 =
+         tbox::Statistician::getStatistician()->
+         getStatistic("NumberCutcellsL4", "PROC_STAT");
+
+      // count number patches
+      double number_patches = level->getNumberOfPatches();
+
+      // record stats
+      if (level_number == 0) {
+         num_patches_l0->recordProcStat(number_patches);
+         num_gridcells_l0->recordProcStat((double)number_cells);
+         num_cutcells_l0->recordProcStat((double)cut_cells_on_proc);
+      }
+      if (level_number == 1) {
+         num_patches_l1->recordProcStat(number_patches);
+         num_gridcells_l1->recordProcStat((double)number_cells);
+         num_cutcells_l1->recordProcStat((double)cut_cells_on_proc);
+      }
+      if (level_number == 2) {
+         num_patches_l2->recordProcStat(number_patches);
+         num_gridcells_l2->recordProcStat((double)number_cells);
+         num_cutcells_l2->recordProcStat((double)cut_cells_on_proc);
+      }
+      if (level_number == 3) {
+         num_patches_l3->recordProcStat(number_patches);
+         num_gridcells_l3->recordProcStat((double)number_cells);
+         num_cutcells_l3->recordProcStat((double)cut_cells_on_proc);
+      }
+      if (level_number == 4) {
+         num_patches_l4->recordProcStat(number_patches);
+         num_gridcells_l4->recordProcStat((double)number_cells);
+         num_cutcells_l4->recordProcStat((double)cut_cells_on_proc);
+      }
+#endif
+
+   }
+
+   if (d_write_ebdry) {
+
+      writeLevelEmbeddedBoundaryDataToFile(level, d_ebdry_dirname);
+
+   }
+
+   /*
+    * Set the boundary cells on physical boundaries according to
+    * the specified boundary conditions.
+    */
+   setEmbeddedBoundaryAtPhysicalBoundaries(level);
+
+   /*
+    * Set the "surrounding volumes" for each EB cell.  This is the
+    * sum of the volumes of the cell surrounding the EB cell and is
+    * used to distribute mass.
+    */
+   //   setSurroundingVolumes(level);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute characteristics of the embedded boundary using Cubes.  Loop   *
+ * through patches and call the patch interface to Cubes.                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+EmbeddedBoundaryGeometry::computeEmbeddedBoundaryOnLevelWithPackage(
+   const tbox::Pointer<hier::PatchLevel> level,
+   int& cut_cells_on_level)
+{
+   const tbox::Dimension& dim(d_grid_geometry->getDim());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(level.isNull()));
+   if (d_use_cubes) TBOX_ASSERT(!d_cubes_interface.isNull());
+   if (d_use_eleven_boundary_node) TBOX_ASSERT(!d_eleven_interface.isNull());
+#endif
+
+   if (d_use_cubes && dim != tbox::Dimension(3)) {
+      TBOX_ERROR(
+         d_object_name << "::computeEmbeddedBoundaryOnLevelWithPackage"
+         <<
+         "\nCannot use Cubes - it only works for 3D cases..");
+   }
+
+#ifdef RECORD_STATS
+   tbox::Pointer<tbox::Statistic> num_cutcells_patch_l0 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("NumberCutcellsPatchL0", "PATCH_STAT");
+   tbox::Pointer<tbox::Statistic> num_cutcells_patch_l1 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("NumberCutcellsPatchL1", "PATCH_STAT");
+   tbox::Pointer<tbox::Statistic> num_cutcells_patch_l2 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("NumberCutcellsPatchL2", "PATCH_STAT");
+   tbox::Pointer<tbox::Statistic> num_cutcells_patch_l3 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("NumberCutcellsPatchL3", "PATCH_STAT");
+   tbox::Pointer<tbox::Statistic> num_cutcells_patch_l4 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("NumberCutcellsPatchL4", "PATCH_STAT");
+
+   tbox::Pointer<tbox::Statistic> num_flowcells_patch_l0 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("NumberFlowcellsPatchL0", "PATCH_STAT");
+   tbox::Pointer<tbox::Statistic> num_flowcells_patch_l1 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("NumberFlowcellsPatchL1", "PATCH_STAT");
+   tbox::Pointer<tbox::Statistic> num_flowcells_patch_l2 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("NumberFlowcellsPatchL2", "PATCH_STAT");
+   tbox::Pointer<tbox::Statistic> num_flowcells_patch_l3 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("NumberFlowcellsPatchL3", "PATCH_STAT");
+   tbox::Pointer<tbox::Statistic> num_flowcells_patch_l4 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("NumberFlowcellsPatchL4", "PATCH_STAT");
+
+   tbox::Pointer<tbox::Timer> t_patch = tbox::TimerManager::getManager()->
+      getTimer("appu::EmbeddedBoundaryGeometry::package_patch");
+
+   tbox::Pointer<tbox::Statistic> timing_patch_l0 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("TimingPatchL0", "PATCH_STAT");
+   tbox::Pointer<tbox::Statistic> timing_patch_l1 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("TimingPatchL1", "PATCH_STAT");
+   tbox::Pointer<tbox::Statistic> timing_patch_l2 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("TimingPatchL2", "PATCH_STAT");
+   tbox::Pointer<tbox::Statistic> timing_patch_l3 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("TimingPatchL3", "PATCH_STAT");
+   tbox::Pointer<tbox::Statistic> timing_patch_l4 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("TimingPatchL4", "PATCH_STAT");
+#endif
+
+   /*
+    * Loop through patches and call the patch interface to Cubes.
+    */
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+#ifdef RECORD_STATS
+      t_patch->reset();
+      t_patch->start();
+#endif
+
+      if (d_use_cubes) {
+         d_cubes_interface->calculateCutCellInfo(patch,
+            d_cell_flag_data_id,
+            d_cell_vol_data_id,
+            d_ebdry_data_id);
+      }
+
+      if (d_use_eleven_boundary_node) {
+         d_eleven_interface->calculateCutCellInfo(patch,
+            d_cell_flag_data_id,
+            d_cell_vol_data_id,
+            d_node_flag_data_id,
+            d_ebdry_data_id);
+      }
+
+#ifdef RECORD_STATS
+      t_patch->stop();
+
+      double num_flowcells = (double)patch->getBox().size();
+      double time = t_patch->getTotalWallclockTime();
+      tbox::Pointer<pdat::IndexData<appu::CutCell,
+                                    pdat::CellGeometry> > eboundary =
+         patch->getPatchData(d_ebdry_data_id);
+      int num_cutcells = eboundary->getNumberOfItems();
+      num_flowcells = num_flowcells - num_cutcells;
+
+      // record stats
+      int ln = patch->getPatchLevelNumber();
+      int pn = patch->getLocalId().getValue();
+      if (ln == 0) {
+         num_cutcells_patch_l0->recordPatchStat(pn, num_cutcells, d_step_count);
+         num_flowcells_patch_l0->recordPatchStat(pn,
+            num_flowcells,
+            d_step_count);
+         timing_patch_l0->recordPatchStat(pn, time, d_step_count);
+      }
+      if (ln == 1) {
+         num_cutcells_patch_l1->recordPatchStat(pn, num_cutcells, d_step_count);
+         num_flowcells_patch_l1->recordPatchStat(pn,
+            num_flowcells,
+            d_step_count);
+         timing_patch_l1->recordPatchStat(pn, time, d_step_count);
+      }
+      if (ln == 2) {
+         num_cutcells_patch_l2->recordPatchStat(pn, num_cutcells, d_step_count);
+         num_flowcells_patch_l2->recordPatchStat(pn,
+            num_flowcells,
+            d_step_count);
+         timing_patch_l2->recordPatchStat(pn, time, d_step_count);
+      }
+      if (ln == 3) {
+         num_cutcells_patch_l3->recordPatchStat(pn, num_cutcells, d_step_count);
+         num_flowcells_patch_l3->recordPatchStat(pn,
+            num_flowcells,
+            d_step_count);
+         timing_patch_l3->recordPatchStat(pn, time, d_step_count);
+      }
+      if (ln == 4) {
+         num_cutcells_patch_l4->recordPatchStat(pn, num_cutcells, d_step_count);
+         num_flowcells_patch_l4->recordPatchStat(pn,
+            num_flowcells,
+            d_step_count);
+         timing_patch_l4->recordPatchStat(pn, time, d_step_count);
+      }
+#endif
+
+   }
+
+#ifdef RECORD_STATS
+   d_step_count++;
+#endif
+
+   /*
+    * Count the number of cut cells
+    */
+
+   cut_cells_on_level = 0;
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      tbox::Pointer<pdat::CellData<int> > cell_flag =
+         patch->getPatchData(d_cell_flag_data_id);
+
+      const hier::Box& interior = patch->getBox();
+
+      for (pdat::CellIterator ic(interior); ic; ic++) {
+         pdat::CellIndex cell(ic());
+
+         if ((*cell_flag)(cell) == CUT) {
+            cut_cells_on_level++;
+         }
+      }
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ *  Set the embedded boundary on the supplied level.  Loop over all      *
+ *  cells on the level and flag them as being flow, split, boundary,     *
+ *  or interior cells.  For split cells, we compute the volume and       *
+ *  area fractions.                                                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+EmbeddedBoundaryGeometry::computeEmbeddedBoundaryOnLevel(
+   const tbox::Pointer<hier::PatchLevel> level,
+   int& cut_cells_on_level,
+   double& l2_volume_error,
+   double& l2_area_error,
+   double& max_volume_error,
+   double& max_area_error)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(level.isNull()));
+#endif
+
+   const tbox::Dimension& dim(d_grid_geometry->getDim());
+
+   /**************************************************************
+   *  1) Set tags on the nodes then identify cut cells:
+   *     - mark nodes as being "inside" or "outside" the geom
+   *     - call fortran determination to set cells as "FLOW",
+   *       "CUT", or "SOLID", based on the surrounding node
+   *       inside/outside determination.
+   **************************************************************/
+   /*
+    *  Set tags on nodes of the level.
+    */
+   t_calc_node_inout->start();
+   tagInsideOutsideNodesOnLevel(level);
+   t_calc_node_inout->stop();
+
+   /*
+    * Convert node tags to cell tags.
+    */
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      tbox::Pointer<pdat::NodeData<int> > node_flag =
+         patch->getPatchData(d_node_flag_data_id);
+      tbox::Pointer<pdat::CellData<int> > cell_flag =
+         patch->getPatchData(d_cell_flag_data_id);
+      tbox::Pointer<pdat::CellData<double> > cell_vol =
+         patch->getPatchData(d_cell_vol_data_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!(node_flag.isNull()));
+      TBOX_ASSERT(!(cell_flag.isNull()));
+      TBOX_ASSERT(!(cell_vol.isNull()));
+#endif
+      /*
+       * Assume cell is "flow" unless computed otherwise.
+       */
+      cell_flag->fillAll(FLOW);
+      cell_vol->fillAll(1.0);
+
+      const hier::Box& interior = patch->getBox();
+      const hier::Index& ifirst = interior.lower();
+      const hier::Index& ilast = interior.upper();
+
+      hier::IntVector node_ghosts = node_flag->getGhostCellWidth();
+      hier::IntVector cell_ghosts = cell_flag->getGhostCellWidth();
+
+      if ((dim == tbox::Dimension(2))) {
+         F77_FUNC(node2cellflag2d, NODE2CELLFLAG2D) (ifirst(0), ifirst(1),
+            ilast(0), ilast(1),
+            node_ghosts(0), node_ghosts(1),
+            cell_ghosts(0), cell_ghosts(1),
+            node_flag->getPointer(),
+            cell_flag->getPointer(),
+            cell_vol->getPointer());
+      }
+
+      if ((dim == tbox::Dimension(3))) {
+         F77_FUNC(node2cellflag3d, NODE2CELLFLAG3D) (ifirst(0), ifirst(1),
+            ifirst(2),
+            ilast(0), ilast(1), ilast(2),
+            node_ghosts(0), node_ghosts(1), node_ghosts(2),
+            cell_ghosts(0), cell_ghosts(1), cell_ghosts(2),
+            node_flag->getPointer(),
+            cell_flag->getPointer(),
+            cell_vol->getPointer());
+      }
+
+   } // loop over patches
+
+   /**************************************************************
+   *  2) Compute volume/areas of CUT cells
+   **************************************************************/
+   /*
+    * Set global level info - physical domain boxes, lowest index, and
+    * the lowest XYZ coordinate.
+    */
+   int i;
+   hier::BoxArray domain_boxes(dim);
+   domain_boxes = level->getGridGeometry()->getPhysicalDomain();
+   hier::Index domain_ilo(dim, tbox::MathUtilities<int>::getMax());
+   for (int n = 0; n < domain_boxes.getNumberOfBoxes(); n++) {
+      for (i = 0; i < dim.getValue(); i++) {
+         if (domain_boxes[n].lower(i) < domain_ilo(i)) {
+            domain_ilo[i] = domain_boxes[n].lower(i);
+         }
+      }
+   }
+   const double* domain_xlo = d_grid_geometry->getXLower();
+
+   /*
+    * Loop over patches on level and compute volume/areas for cut cells.
+    */
+   cut_cells_on_level = 0;
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      const tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+         patch->getPatchGeometry();
+      const double* dx = pgeom->getDx();
+      hier::IntVector level_ratio = pgeom->getRatio();
+
+      /*
+       * Determine full volume and cell face areas.
+       */
+      double fullcellvol = 1.0;
+      for (i = 0; i < dim.getValue(); i++) {
+         fullcellvol = fullcellvol * dx[i];
+      }
+
+      double fullareas[2 * dim.getValue()];
+      for (i = 0; i < dim.getValue(); i++) {
+         fullareas[2 * i] = fullcellvol / dx[i];
+         fullareas[2 * i + 1] = fullcellvol / dx[i];
+      }
+
+      double lower[tbox::Dimension::MAXIMUM_DIMENSION_VALUE],
+             upper[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      double volume_error_estimate, area_error_estimate;
+
+      /*
+       * Loop over INTERIOR cells on the patch - this can include
+       * ghost cells but not those on physical boundary - and
+       * identify cut cells.  Embedded boundary cells that lie on
+       * the physical boundary require special treatment, performed
+       * in the "setEmbeddedBoundaryAtPhysicalBoundaries()" method.
+       */
+
+      const hier::Box& interior = patch->getBox();
+
+      tbox::Pointer<pdat::IndexData<appu::CutCell,
+                                    pdat::CellGeometry> > eboundary =
+         patch->getPatchData(d_ebdry_data_id);
+      tbox::Pointer<pdat::CellData<int> > cell_flag =
+         patch->getPatchData(d_cell_flag_data_id);
+      tbox::Pointer<pdat::CellData<double> > cell_vol =
+         patch->getPatchData(d_cell_vol_data_id);
+      tbox::Pointer<pdat::NodeData<int> > node_flag =
+         patch->getPatchData(d_node_flag_data_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!(eboundary.isNull()));
+      TBOX_ASSERT(!(cell_flag.isNull()));
+      TBOX_ASSERT(!(cell_vol.isNull()));
+      TBOX_ASSERT(!(node_flag.isNull()));
+#endif
+
+      for (pdat::CellIterator ic(interior); ic; ic++) {
+         pdat::CellIndex cell(ic());
+
+         if ((*cell_flag)(cell) == CUT) {
+
+            /*
+             * Compute the volume and areas.
+             *
+             * Fast approximation:
+             *   If the cell is not going to be sub-divided, the areas
+             *   and normal are not needed (d_compute_areas_and_normal = false),
+             *   and we do not need to keep a list of cut cells, do a quick
+             *   estimation of the volume and exit.
+             *
+             * Standard computation:
+             *   - create a CutCell data struct
+             *   - compute the information for the struct
+             *   - append the struct to the list of IndexData<DIM> for the patch
+             */
+            if (d_max_subdivides == 0 &&
+                d_compute_areas_and_normal &&
+                !d_compute_cutcell_index_data) {
+
+               (*cell_vol)(cell) = 0.5;
+               volume_error_estimate = 0.25 * fullcellvol;
+
+            } else {
+
+               /*
+                * Create a cut cell.
+                */
+               appu::CutCell cc(ic());
+
+               /*
+                * Compute upper and lower extents of the cell
+                */
+               for (i = 0; i < dim.getValue(); i++) {
+                  lower[i] = domain_xlo[i] + (cell(i) - domain_ilo(i)) * dx[i];
+                  upper[i] = domain_xlo[i]
+                     + (cell(i) - domain_ilo(i) + 1) * dx[i];
+               }
+
+               /*
+                * Compute volume, areas, normal, etc. for the cut cell
+                */
+               volume_error_estimate = 0.;
+               area_error_estimate = 0.;
+               calculateCutCellInformation(cc,
+                  lower,
+                  upper,
+                  fullcellvol,
+                  fullareas,
+                  volume_error_estimate,
+                  area_error_estimate);
+
+               /*
+                * Compute boundary node information, if desired.
+                */
+               if (d_compute_boundary_node_data) {
+
+                  t_calc_boundary_node->start();
+                  calculateBoundaryNodeInformation(cc,
+                     node_flag,
+                     lower,
+                     upper,
+                     dx);
+                  t_calc_boundary_node->stop();
+
+               }
+
+               /*
+                * Add the cut cell to the list of index data for the patch
+                */
+               eboundary->appendItem(ic(), cc);
+               (*cell_vol)(cell) = cc.getVolume();
+
+            }
+
+            /*
+             * Accumulate information on errors in volume fraction
+             * computation on the cut cells.
+             */
+            cut_cells_on_level++;
+            l2_volume_error +=
+               volume_error_estimate * volume_error_estimate;
+            l2_area_error +=
+               area_error_estimate * area_error_estimate;
+            max_volume_error =
+               tbox::MathUtilities<double>::Max(volume_error_estimate,
+                  max_volume_error);
+            max_area_error =
+               tbox::MathUtilities<double>::Max(area_error_estimate,
+                  max_area_error);
+
+         } // if cell is cut
+
+      } // cell iterator
+
+#ifdef DEBUG_PRINT
+      tbox::plog << "----computeEmbeddedBoundaryOnLevel() " << std::endl;
+      tbox::plog << "Patch: " << patch->getLocalId()
+                 << "  Box: " << patch->getBox() << std::endl;
+      tbox::plog << "Cell Flag:" << std::endl;
+      cell_flag->print(cell_flag->getGhostBox());
+      tbox::plog << "Node Flag:" << std::endl;
+      node_flag->print(node_flag->getGhostBox());
+#endif
+
+   } // loop over patches
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Classify all nodes on the level as being INSIDE or OUTSIDE the        *
+ * geometry.                                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+EmbeddedBoundaryGeometry::tagInsideOutsideNodesOnLevel(
+   const tbox::Pointer<hier::PatchLevel> level)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(level.isNull()));
+#endif
+
+   const tbox::Dimension& dim(d_grid_geometry->getDim());
+
+   int i;
+
+   /*
+    * Loop over patches on level.
+    */
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      tbox::Pointer<pdat::NodeData<int> > node_flag =
+         patch->getPatchData(d_node_flag_data_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!(node_flag.isNull()));
+#endif
+
+      const tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+         patch->getPatchGeometry();
+      const double* dx = pgeom->getDx();
+      const double* xlower = pgeom->getXLower();
+      hier::IntVector level_ratio = pgeom->getRatio();
+
+      const hier::Box patch_box = patch->getBox();
+
+      /*
+       * Assume node is "outside" unless computed otherwise.
+       */
+      node_flag->fillAll(OUTSIDE);
+
+#ifdef USE_ARRAY_FOR_INOUT
+      int nx[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      double origin[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      // NOTE: we are finding NODE locations.
+      for (i = 0; i < dim.getValue(); i++) {
+         nx[i] = patch->getBox().numberCells(i) + 2 * d_ebdry_nghosts(i) + 1;
+         origin[i] = xlower[i] - (double)d_ebdry_nghosts(i) * dx[i];
+      }
+
+      if (d_use_eleven_inside_outside) {
+         d_eleven_interface->isInside(nx,
+            dx,
+            origin,
+            node_flag->getPointer());
+      } else {
+
+         /*
+          * Native SAMRAI-defined shapes
+          */
+         doNativeShapeInsideOutside(nx, dx, origin, node_flag->getPointer());
+
+      }
+#endif
+
+#ifdef USE_SINGLE_POINT_FOR_INOUT
+      double node_xyz[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+      /*
+       * Loop over nodes on the patch.
+       */
+      for (pdat::NodeIterator ni(patch_box); ni; ni++) {
+
+         /*
+          * Compute upper and lower extents of the cell and classify
+          * it.
+          */
+         pdat::NodeIndex node = ni();
+         for (i = 0; i < dim.getValue(); i++) {
+            node_xyz[i] = xlower[i] + (double)node(i) * dx[i];
+         }
+
+         /*
+          * determine if node is "inside"
+          */
+         bool is_inside = false;
+         if (d_use_eleven_inside_outside) {
+
+            is_inside = d_eleven_interface->isInside(node_xyz);
+
+         } else {
+
+            /*
+             * Native SAMRAI-defined shapes
+             */
+
+            for (n = 0; n < d_shapes.getSize(); n++) {
+               is_inside = d_shapes[n]->isInside(node_xyz);
+               if (is_inside) {
+                  (*node_flag)(node) = INSIDE;
+                  break;
+               }
+            }
+         }
+
+      } // iteration over nodes on patch
+
+#endif
+
+   } // loop over patches of level
+
+}
+
+/*
+ *************************************************************************
+ *	                                                                *
+ * Compute the total volume on the supplied level.                       *
+ *                                                                       *
+ *************************************************************************
+ */
+double
+EmbeddedBoundaryGeometry::computeTotalVolumeOnLevel(
+   const tbox::Pointer<hier::PatchLevel> level)
+{
+   const tbox::Dimension& dim(d_grid_geometry->getDim());
+
+   double vol_this_proc = 0.;
+
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      const tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+         patch->getPatchGeometry();
+      const double* dx = pgeom->getDx();
+
+      /*
+       * Compute actual cell volume.
+       */
+      double fullcellvol = 1.0;
+      for (int i = 0; i < dim.getValue(); i++) {
+         fullcellvol = fullcellvol * dx[i];
+      }
+
+      /*
+       * Access the volume fraction.
+       */
+      tbox::Pointer<pdat::CellData<double> > cell_vol =
+         patch->getPatchData(d_cell_vol_data_id);
+
+      /*
+       * Multiply volume fraction times the actual cell volume and
+       * add to sum to compute the volume amongst patches located on
+       * this processor.
+       */
+      for (pdat::CellIterator ic(patch->getBox()); ic; ic++) {
+         vol_this_proc += (*cell_vol)(ic()) * fullcellvol;
+      }
+
+   } // loop over patches
+
+   /*
+    * Compute the total volume by summing processor contributions.
+    */
+   double total_volume = vol_this_proc;
+   const tbox::SAMRAI_MPI& mpi(level->getMappedBoxLevel()->getMPI());
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&total_volume, 1, MPI_SUM);
+   }
+
+   return total_volume;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register VisIt data writer to write data to plot files that may       *
+ * be postprocessed by the VisIt tool.                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+#ifdef HAVE_HDF5
+void
+EmbeddedBoundaryGeometry::registerVisItDataWriter(
+   tbox::Pointer<appu::VisItDataWriter> visit_writer)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(visit_writer.isNull()));
+#endif
+
+   d_visit_writer = visit_writer;
+
+   /*
+    * Register the object that supplies functions to write out materials
+    * data.  In this case, "this" object does it.
+    */
+   d_visit_writer->setMaterialsDataWriter(this);
+
+   /*
+    * If the cell flag and volume fraction variables have been created
+    * register them with the visit data writer.
+    */
+   if (d_cell_flag_data_id > 0) {
+      d_visit_writer->registerPlotQuantity("Cell Flag",
+         "SCALAR",
+         d_cell_flag_data_id);
+   }
+
+   if (d_cell_vol_data_id > 0) {
+      d_visit_writer->registerPlotQuantity("Volume Frac",
+         "SCALAR",
+         d_cell_vol_data_id);
+   }
+
+   if (d_node_flag_data_id > 0) {
+      d_visit_writer->registerPlotQuantity("Node InOut Flag",
+         "SCALAR",
+         d_node_flag_data_id);
+   }
+
+   /*
+    * Register flow and solid as a "material" data types.
+    */
+   tbox::Array<std::string> names(2);
+   names[0] = "Flow";
+   names[1] = "Solid";
+   d_visit_writer->registerMaterialNames(names);
+
+}
+#endif
+
+/*
+ *************************************************************************
+ *	                                                                *
+ * Return the descriptor ID for the patch data which holds the following *
+ *                                                                       *
+ *   - cell flag data id - integer at each cell, specifying it as solid, *
+ *     cut, border, or flow.                                             *
+ *                                                                       *
+ *   - cell volume id - double at each cell specifying volume fraction.  *
+ *                                                                       *
+ *   - cut cell data id - IndexData<appu::CutCell> at selected cells     *
+ *     holding information like the volume, area fraction,               *
+ *     normal, etc.                                                      *
+ *                                                                       *
+ *   - node flag id - int at each node specifying whether node is       *
+ *     flagged as inside or outside the embedded boundary                *
+ *                                                                       *
+ *************************************************************************
+ */
+int
+EmbeddedBoundaryGeometry::getCellFlagDataId() const
+{
+   return d_cell_flag_data_id;
+}
+
+int
+EmbeddedBoundaryGeometry::getCellVolumeDataId() const
+{
+   return d_cell_vol_data_id;
+}
+
+int
+EmbeddedBoundaryGeometry::getIndexCutCellDataId() const
+{
+   return d_ebdry_data_id;
+}
+
+int
+EmbeddedBoundaryGeometry::getNodeInsideOutsideDataId() const
+{
+   return d_node_flag_data_id;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Pack "volume" data (Vis materials plot quantity) into the supplied    *
+ * double precision buffer.                                              *
+ *                                                                       *
+ * The returned integer value allows savings of storage by returning     *
+ * whether the volume of all cells on the patch is 1.0, or all 0.0,      *
+ * or mixed.                                                             *
+ *  appu::VisMaterialsDataStrategy::VISIT_ALL_ONE  - all cells volume 1. *
+ *  appu::VisMaterialsDataStrategy::VISIT_ALL_ZERO - all cells volume 0. *
+ *  appu::VisMaterialsDataStrategy::VISIT_MIXED    - data is packed      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int
+EmbeddedBoundaryGeometry::packMaterialFractionsIntoDoubleBuffer(
+   double* dbuffer,
+   const hier::Patch& patch,
+   const hier::Box& region,
+   const std::string& material_name) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((region * patch.getBox()) == region);
+#endif
+
+   const tbox::Dimension& dim(d_grid_geometry->getDim());
+
+   tbox::Pointer<pdat::CellData<double> > cell_vol =
+      patch.getPatchData(d_cell_vol_data_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!cell_vol.isNull());
+#endif
+
+   const hier::Box& data_box = cell_vol->getGhostBox();
+   const int box_w0 = region.numberCells(0);
+   const int dat_w0 = data_box.numberCells(0);
+   const int box_w1 = region.numberCells(1);
+   int dat_w1 = 0;
+   int box_w2 = 1;
+   if ((dim == tbox::Dimension(3))) {
+      dat_w1 = data_box.numberCells(1);
+      box_w2 = region.numberCells(2);
+   }
+
+   if (material_name == "Flow") {
+      const double * const vol = cell_vol->getPointer();
+      int buf_b1 = 0;
+      int dat_b2 = data_box.offset(region.lower());
+
+      for (int i2 = 0; i2 < box_w2; i2++) {
+         int dat_b1 = dat_b2;
+         for (int i1 = 0; i1 < box_w1; i1++) {
+            for (int i0 = 0; i0 < box_w0; i0++) {
+               int dat_indx = dat_b1 + i0;
+               dbuffer[buf_b1 + i0] = vol[dat_indx];
+            }
+            dat_b1 += dat_w0;
+            buf_b1 += box_w0;
+         }
+         dat_b2 += dat_w1 * dat_w0;
+      }
+   }
+
+   if (material_name == "Solid") {
+      const double * const vol = cell_vol->getPointer();
+      int buf_b1 = 0;
+      int dat_b2 = data_box.offset(region.lower());
+      double solid_frac = 0.;
+
+      for (int i2 = 0; i2 < box_w2; i2++) {
+         int dat_b1 = dat_b2;
+         for (int i1 = 0; i1 < box_w1; i1++) {
+            for (int i0 = 0; i0 < box_w0; i0++) {
+               int dat_indx = dat_b1 + i0;
+               solid_frac = 1.0 - vol[dat_indx];
+               dbuffer[buf_b1 + i0] =
+                  tbox::MathUtilities<double>::Abs(solid_frac);
+            }
+            dat_b1 += dat_w0;
+            buf_b1 += box_w0;
+         }
+         dat_b2 += dat_w1 * dat_w0;
+      }
+   }
+
+   int return_val = appu::VisMaterialsDataStrategy::VISIT_MIXED;
+   return return_val;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Apply the operations to construct embedded boundary on fine level     *
+ * wherever the cell tag indicates it being a cut cell (this information *
+ * is provided by the coarser level.                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+EmbeddedBoundaryGeometry::postprocessRefine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio)
+{
+   NULL_USE(coarse);
+
+   const tbox::Dimension& dim(d_grid_geometry->getDim());
+
+   tbox::Pointer<pdat::IndexData<appu::CutCell,
+                                 pdat::CellGeometry> > feboundary =
+      fine.getPatchData(d_ebdry_data_id);
+   tbox::Pointer<pdat::CellData<int> > fcell_flag =
+      fine.getPatchData(d_cell_flag_data_id);
+   tbox::Pointer<pdat::CellData<double> > fcell_vol =
+      fine.getPatchData(d_cell_vol_data_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(fcell_flag.isNull()));
+   TBOX_ASSERT(!(fcell_vol.isNull()));
+#endif
+
+   hier::Box fine_patch_box = fine.getBox();
+   const tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+      fine.getPatchGeometry();
+   const double* dx = pgeom->getDx();
+   const double* domain_xlo = d_grid_geometry->getXLower();
+   hier::IntVector level_ratio = pgeom->getRatio();
+
+   /*
+    * Determine full volume and cell face areas for fine cells.
+    */
+   int i;
+   double fullcellvol = 1.0;
+   for (i = 0; i < dim.getValue(); i++) {
+      fullcellvol = fullcellvol * dx[i];
+   }
+
+   double fullareas[2 * dim.getValue()];
+   for (i = 0; i < dim.getValue(); i++) {
+      fullareas[2 * i] = fullcellvol / dx[i];
+      fullareas[2 * i + 1] = fullcellvol / dx[i];
+   }
+
+   int cell_type;
+   double lower[tbox::Dimension::MAXIMUM_DIMENSION_VALUE],
+          upper[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   double volume_error_estimate, area_error_estimate;
+
+   /*
+    * Loop over INTERIOR cells on the patch - this can include
+    * ghost cells but not those on physical boundary - and
+    * identify cut cells.  Embedded boundary cells that lie on
+    * the physical boundary require special treatment, performed
+    * in the "setEmbeddedBoundaryAtPhysicalBoundaries()" method.
+    */
+   pdat::CellIndex fine_cell(dim);
+   pdat::CellIndex coarse_cell(dim);
+
+   for (pdat::CellIterator ic(fine_box); ic; ic++) {
+
+      fine_cell = ic();
+      int fine_cell_flag = (*fcell_flag)(fine_cell);
+
+      if (fine_cell_flag == BORDER) {
+
+         /*
+          * The refine operation interpolated "Border" cells on the
+          * coarse level to the fine level. These border cells will
+          * ALWAYS be "flow" cells on the fine level, so tag them as
+          * such here.
+          */
+         (*fcell_flag)(fine_cell) = FLOW;
+         (*fcell_vol)(fine_cell) = 1.0;
+
+      } else if (fine_cell_flag == CUT) {
+
+         /*
+          * "Cut" cells on the coarse level may be solid, cut, border,
+          * or flow cells on the fine. Go through each fine cell and
+          * determine which.
+          */
+         coarse_cell = pdat::CellIndex(fine_cell / ratio);
+
+         /*
+          * Initialize cell as being "flow" and check if otherwise.
+          */
+         (*fcell_flag)(fine_cell) = FLOW;
+         (*fcell_vol)(fine_cell) = 1.0;
+
+         /*
+          * Compute upper and lower extents of the cell and classify
+          * it.
+          */
+         for (i = 0; i < dim.getValue(); i++) {
+            lower[i] = domain_xlo[i] + fine_cell(i) * dx[i];
+            upper[i] = domain_xlo[i] + (fine_cell(i) + 1) * dx[i];
+         }
+         cell_type = classifyCell(lower, upper);
+
+         if (cell_type == CUT) {
+            appu::CutCell bc(fine_cell);
+
+            volume_error_estimate = 0.;
+            area_error_estimate = 0.;
+            calculateCutCellInformation(bc,
+               lower,
+               upper,
+               fullcellvol,
+               fullareas,
+               volume_error_estimate,
+               area_error_estimate);
+
+            feboundary->appendItem(ic(), bc);
+
+            (*fcell_flag)(fine_cell) = CUT;
+            (*fcell_vol)(fine_cell) = bc.getVolume();
+
+            /*
+             * Accumulate information on errors in volume fraction
+             * computation on the cut cells.
+             * NOTE:  If we decide to go back and use the refine operations
+             * we'll have to re-institute this
+             */
+#if 0
+            cut_cells_on_level++;
+            l2_volume_error +=
+               volume_error_estimate * volume_error_estimate;
+            l2_area_error +=
+               area_error_estimate * area_error_estimate;
+            max_volume_error =
+               tbox::MathUtilities<double>::Max(volume_error_estimate,
+                  max_volume_error);
+            max_area_error =
+               tbox::MathUtilities<double>::Max(area_error_estimate,
+                  max_area_error);
+#endif
+
+         } else if (cell_type == SOLID) {
+
+            (*fcell_flag)(fine_cell) = SOLID;
+            (*fcell_vol)(fine_cell) = 0.0;
+
+         }
+
+      } // cell was cut cell (on coarse level)
+
+   } // iterate over cells of fine box
+
+}
+
+/*
+ *************************************************************************
+ *	                                                                *
+ * Unused (needed because we supply postprocessRefine())                 *
+ *                                                                       *
+ *************************************************************************
+ */
+hier::IntVector
+EmbeddedBoundaryGeometry::getRefineOpStencilWidth() const
+{
+   return hier::IntVector::getZero(d_grid_geometry->getDim());
+}
+
+/*
+ *************************************************************************
+ *	                                                                *
+ * Unused (needed because we supply postprocessRefine())                 *
+ *                                                                       *
+ *************************************************************************
+ */
+void
+EmbeddedBoundaryGeometry::setPhysicalBoundaryConditions(
+   hier::Patch& patch,
+   const double fill_time,
+   const hier::IntVector& ghost_width_to_fill)
+{
+   NULL_USE(patch);
+   NULL_USE(fill_time);
+   NULL_USE(ghost_width_to_fill);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Write data to restart.                                                *
+ *                                                                       *
+ *************************************************************************
+ */
+void
+EmbeddedBoundaryGeometry::putToDatabase(
+   tbox::Pointer<tbox::Database> db)
+{
+   const tbox::Dimension& dim(d_grid_geometry->getDim());
+
+   db->putInteger("APPU_EMBEDDED_BOUNDARY_GEOMETRY_VERSION",
+      APPU_EMBEDDED_BOUNDARY_GEOMETRY_VERSION);
+
+   db->putString("d_flow_type", d_flow_type);
+
+   tbox::Array<int> tmp_array(dim.getValue());
+   for (int i = 0; i < dim.getValue(); i++) {
+      tmp_array[i] = d_ebdry_nghosts(i);
+   }
+   db->putIntegerArray("d_ebdry_nghosts", tmp_array);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Construct Variables and communication schedules used to define the    *
+ * embedded boundary and its inter-level operations.                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+EmbeddedBoundaryGeometry::initializeVariables(
+   const hier::IntVector& nghosts)
+{
+   const tbox::Dimension& dim(d_grid_geometry->getDim());
+
+   d_ebdry_nghosts = nghosts;
+
+   /*
+    * Initialize variables used to define the embedded boundary
+    */
+   hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+
+   d_ebdry_var =
+      new pdat::IndexVariable<appu::CutCell, pdat::CellGeometry>(
+         dim,
+         "Embedded Boundary");
+   d_cell_flag_var =
+      new pdat::CellVariable<int>(dim, "Cell Flag", 1);
+   d_cell_vol_var =
+      new pdat::CellVariable<double>(dim, "Cell Volume Fraction", 1);
+   d_node_flag_var =
+      new pdat::NodeVariable<int>(dim, "Node Flag", 1);
+
+   tbox::Pointer<hier::VariableContext> current =
+      variable_db->getContext("CURRENT");
+
+   d_ebdry_data_id =
+      variable_db->registerVariableAndContext(d_ebdry_var,
+         current,
+         nghosts);
+
+   d_cell_flag_data_id =
+      variable_db->registerVariableAndContext(d_cell_flag_var,
+         current,
+         nghosts);
+
+   d_cell_vol_data_id =
+      variable_db->registerVariableAndContext(d_cell_vol_var,
+         current,
+         nghosts);
+
+   d_node_flag_data_id =
+      variable_db->registerVariableAndContext(d_node_flag_var,
+         current,
+         nghosts);
+
+   d_ebdry_scratch_id =
+      variable_db->registerVariableAndContext(d_ebdry_var,
+         current,
+         nghosts);
+
+   d_cell_flag_scratch_id =
+      variable_db->registerVariableAndContext(d_cell_flag_var,
+         current,
+         nghosts);
+
+   d_cell_vol_scratch_id =
+      variable_db->registerVariableAndContext(d_cell_vol_var,
+         current,
+         nghosts);
+
+   /*
+    * Create a refine algorithm to refine the flag data, volume
+    * fraction data, and embedded boundary.
+    */
+   d_ebdry_refine_alg = new xfer::RefineAlgorithm(dim);
+
+   tbox::Pointer<pdat::CellIntegerConstantRefine> const_refine_int(
+      new pdat::CellIntegerConstantRefine(dim));
+
+   /*
+    * The flag data and volume fraction data both use CONSTANT_REFINE.
+    * Since we store the volume *fraction*, not the cell volume,
+    * constant refine is the appropriate refine operator.
+    */
+
+   d_ebdry_refine_alg->registerRefine(d_cell_flag_data_id, //dst
+      d_cell_flag_data_id,                                 //src
+      d_cell_flag_scratch_id,                                 //scratch
+      const_refine_int);
+
+   tbox::Pointer<pdat::CellDoubleConstantRefine> const_refine_double(
+      new pdat::CellDoubleConstantRefine(dim));
+
+   d_ebdry_refine_alg->registerRefine(d_cell_vol_data_id, //dst
+      d_cell_vol_data_id,                                 //src
+      d_cell_vol_scratch_id,                                 //scratch
+      const_refine_double);
+
+   /*
+    * The embedded boundary uses the postprocessRefine() method, but
+    * does not use any other refine operations.  Hence, the refine op is
+    * set to NULL.
+    */
+   d_ebdry_refine_alg->registerRefine(d_ebdry_data_id, //dst
+      d_ebdry_data_id,                                 //src
+      d_ebdry_data_id,                                 //scratch
+      tbox::Pointer<SAMRAI::xfer::RefineOperator>(NULL));
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private function that makes the necessary calls to compute volume,    *
+ * area fraction, normals, etc. on cut cells.                            *
+ *                                                                       *
+ *************************************************************************
+ */
+void
+EmbeddedBoundaryGeometry::calculateCutCellInformation(
+   appu::CutCell& cut_cell,
+   const double* lower,
+   const double* upper,
+   const double& fullcellvol,
+   const double* fullareas,
+   double& volume_error_estimate,
+   double& area_error_estimate)
+{
+   const tbox::Dimension& dim(d_grid_geometry->getDim());
+
+   double volume;
+   int subdivide_level = 0;
+   volume_error_estimate = 0.;
+
+   /*
+    * We can calculate the cut-cell volume and area information using
+    * recursive or non-recursive algorithms.  See the header descriptions
+    * for a discussion of each approach.
+    */
+   t_calc_volume->start();
+   if (d_use_recursive_algs) {
+
+      int return_val = recursiveCalculateVolume(lower,
+            upper,
+            volume,
+            volume_error_estimate,
+            subdivide_level);
+      // approximate volume,error if we reach max subdivisions
+      if (return_val == 1) {
+         volume = 0.5 * fullcellvol;
+         volume_error_estimate = 0.25 * fullcellvol;
+      }
+
+   } else {  // non-recursive
+
+      volume = calculateVolume(lower,
+            upper,
+            volume_error_estimate);
+   }
+   t_calc_volume->stop();
+
+   cut_cell.setVolume(volume / fullcellvol);
+   volume_error_estimate = volume_error_estimate / fullcellvol;
+
+   if (d_compute_areas_and_normal) {
+
+      t_calc_area->start();
+
+      double areas[2 * dim.getValue()];
+      area_error_estimate = 1.;
+
+      for (int f = 0; f < 2 * dim.getValue(); f++) {
+         subdivide_level = 0;
+         double face_area_error_estimate = 0.;
+
+         if (d_use_recursive_algs) {
+
+            int return_val = recursiveCalculateArea(lower,
+                  upper,
+                  f,
+                  areas[f],
+                  face_area_error_estimate,
+                  subdivide_level);
+            // approximate area,error if we reach max subdivisions
+            if (return_val == 1) {
+               areas[f] = 0.5 * fullareas[f];
+               face_area_error_estimate = 0.25 * fullareas[f];
+            }
+
+         } else { // non-recursive
+
+            areas[f] = calculateArea(lower,
+                  upper,
+                  f,
+                  face_area_error_estimate);
+         }
+
+         cut_cell.setArea(areas[f] / fullareas[f], f);
+         face_area_error_estimate = face_area_error_estimate / fullareas[f];
+         area_error_estimate += face_area_error_estimate / ((double)2 * dim.getValue());
+      }
+
+      t_calc_area->stop();
+
+      int i;
+      double areafront = 0.0;
+      double areavector[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (i = 0; i < dim.getValue(); i++) {
+         areavector[i] = areas[2 * i] - areas[2 * i + 1];
+         areafront = areafront + areavector[i] * areavector[i];
+      }
+      areafront = sqrt(areafront);
+      cut_cell.setFrontArea(areafront);
+
+      /*
+       * ANDY, FIX THIS
+       */
+      for (i = 0; i < dim.getValue(); i++) {
+         cut_cell.setFrontCentroid(0., i);
+      }
+
+      /*
+       * Avoid problems with normal computation if frontal area is very small
+       * by resetting areafront to be large.  This will render the normal to
+       * be zero.
+       */
+
+      if (tbox::MathUtilities<double>::equalEps(areafront, 0.0)) {
+         areafront = tbox::MathUtilities<double>::getMax();
+      }
+
+      double tnormal[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (i = 0; i < dim.getValue(); i++) {
+         tnormal[i] = areavector[i] / areafront;
+         cut_cell.setNormal(tnormal[i], i);
+      }
+      cut_cell.setNewBase(tnormal);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private function that computes the boundary nodes and frontal
+ * centroid on the cut cell.                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+void
+EmbeddedBoundaryGeometry::calculateBoundaryNodeInformation(
+   appu::CutCell& cut_cell,
+   tbox::Pointer<pdat::NodeData<int> >& node_flag,
+   const double* lower,
+   const double* upper,
+   const double* dx)
+{
+   const tbox::Dimension& dim(d_grid_geometry->getDim());
+
+   if (!(CutCell::boundaryNodesEnabled())) {
+      TBOX_ERROR(
+         d_object_name << ":calculateBoundaryNodeInformation()"
+         << "\nBoundary node data cannot be computed"
+         <<
+         "\nbecause storage on CutCell is not enabled."
+         <<
+         "\nEither set 'compute_boundary_node_data' to"
+         << "\nfalse in input or use the static function"
+         <<
+         "\nappu::CutCell::enableBoundaryNodeStorage()"
+         << "\nto enable storage." << std::endl);
+   }
+
+   hier::Index ic = cut_cell.getIndex();
+
+   int i, n;
+
+   /*
+    * Loop over "edges" in each direction to mark the boundary nodes.
+    */
+   // set nedges = 2^(dim-1)
+   int nedges = 1;
+   for (i = 0; i < dim.getValue() - 1; i++) {
+      nedges *= 2;
+   }
+
+   for (i = 0; i < dim.getValue(); i++) {
+      for (n = 0; n < nedges; n++) {
+         hier::IntVector nlo(dim, 0);
+         hier::IntVector nhi(dim, 0);
+         if ((i == 0) && (n == 0)) {
+            // nlo = 0,0, nhi = 1,0
+            nhi(0) = 1;
+         } else if ((i == 0) && (n == 1)) {
+            // nlo = 0,1, nhi = 1,1
+            nlo(1) = 1;
+            nhi(0) = 1;
+            nhi(1) = 1;
+         }
+         if ((i == 1) && (n == 0)) {
+            // nlo = 0,0  nhi = 0,1
+            nhi(1) = 1;
+         } else if ((i == 1) && (n == 1)) {
+            // nlo = 1,0  nhi = 1,1
+            nlo(0) = 1;
+            nhi(0) = 1;
+            nhi(1) = 1;
+         }
+         pdat::NodeIndex nodelo(ic, nlo);
+         pdat::NodeIndex nodehi(ic, nhi);
+         if (((*node_flag)(nodelo) == INSIDE) &&
+             ((*node_flag)(nodehi) == OUTSIDE)) {
+            (*node_flag)(nodelo) = BOUNDARY;
+         }
+         if (((*node_flag)(nodelo) == OUTSIDE) &&
+             ((*node_flag)(nodehi) == INSIDE)) {
+            (*node_flag)(nodehi) = BOUNDARY;
+         }
+
+      } // loop over n
+   } // loop over i
+
+   /*
+    * Set the boundary node information for the cut cell
+    */
+   hier::Box one_cell_box(ic, ic);
+   for (pdat::NodeIterator ni(one_cell_box); ni; ni++) {
+      pdat::NodeIndex boundary_node = ni();
+      if ((*node_flag)(boundary_node) == BOUNDARY ||
+          (*node_flag)(boundary_node) == ONBOUNDARY) {
+
+         BoundaryNode bn(boundary_node);
+         if ((*node_flag)(boundary_node) == ONBOUNDARY) {
+            bn.setNodeOnBoundary();
+         }
+
+         bn.setNearestNeighborNodes(node_flag, ic);
+
+         cut_cell.setBoundaryNode(bn);
+
+      } // if node_type == BOUNDARY
+   } // iterator over nodes of the cut cell
+
+   /*
+    * Set the frontal centroid.  This only works if areas are computed.
+    */
+   if (d_compute_areas_and_normal) {
+
+      double midpt[tbox::Dimension::MAXIMUM_DIMENSION_VALUE],
+             centroid[tbox::Dimension::MAXIMUM_DIMENSION_VALUE],
+             node_loc[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int cut_case = CUTCASE_UNDEFINED;
+      int flow_side[2]; // 0 = lower, 1 = upper
+      const double* area_frac = cut_cell.getArea();
+
+      double fullcellvol = 1.0;
+      for (i = 0; i < dim.getValue(); i++) {
+         fullcellvol = fullcellvol * dx[i];
+      }
+      double fullareas[2 * dim.getValue()], areas[2 * dim.getValue()];
+      for (i = 0; i < dim.getValue(); i++) {
+         fullareas[2 * i] = fullcellvol / dx[i];
+         fullareas[2 * i + 1] = fullcellvol / dx[i];
+         areas[2 * i] = area_frac[2 * i] * fullareas[2 * i];
+         areas[2 * i + 1] = area_frac[2 * i + 1] * fullareas[2 * i + 1];
+
+      }
+
+      if ((dim == tbox::Dimension(2))) {
+
+         /*
+          * Identify cut_case:
+          * 0 - both X faces cut
+          * 1 - both Y faces cut
+          * 2 - Xlo/Ylo cut
+          * 3 - Xlo/Yhi cut
+          * 4 - Xhi/Ylo cut
+          * 5 - Xhi/Yhi cut
+          */
+         if ((areas[0] < dx[dim.getValue() - 1]) &&
+             (areas[dim.getValue() - 1] < dx[dim.getValue() - 1])) {
+            cut_case = 0;
+         } else if ((areas[tbox::Dimension::MAXIMUM_DIMENSION_VALUE] < dx[0]) &&
+                    (areas[2 * dim.getValue() - 1] < dx[0])) {
+            cut_case = 1;
+         } else if ((areas[0] < dx[dim.getValue() - 1]) &&
+                    (areas[tbox::Dimension::MAXIMUM_DIMENSION_VALUE] < dx[0])) {
+            cut_case = 2;
+         } else if ((areas[0] < dx[dim.getValue() - 1]) &&
+                    (areas[2 * dim.getValue() - 1] < dx[0])) {
+            cut_case = 3;
+         } else if ((areas[1] < dx[dim.getValue() - 1]) &&
+                    (areas[tbox::Dimension::MAXIMUM_DIMENSION_VALUE] < dx[0])) {
+            cut_case = 4;
+         } else if ((areas[1] < dx[dim.getValue() - 1]) &&
+                    (areas[2 * dim.getValue() - 1] < dx[0])) {
+            cut_case = 5;
+         } else {
+            cut_case = CUTCASE_UNDEFINED;
+         }
+
+         /*
+          * The CUTCASE_UNDEFINED can occur if one of the nodes of the
+          * cut cell lies on the boundary, in which case all the areas
+          * may be 1.0 or 0.0 so it is impossible to identify the case.
+          * For these situations, assume the centroid should not be used
+          * for any calculations so set it to a NaN value.
+          */
+
+         if (cut_case == 0) {
+            flow_side[0] = 0;
+            if (tbox::MathUtilities<double>::equalEps(areas[tbox::Dimension::
+                                                            MAXIMUM_DIMENSION_VALUE],
+                   0.)) {
+               flow_side[1] = 0;
+            } else {
+               flow_side[1] = 1;
+            }
+         }
+         if (cut_case == 1) {
+            if (tbox::MathUtilities<double>::equalEps(areas[0], 0.)) {
+               flow_side[0] = 0;
+            } else {
+               flow_side[0] = 1;
+            }
+            flow_side[1] = 0;
+         }
+         if (cut_case == 2) {
+            if (tbox::MathUtilities<double>::equalEps(areas[1], 0.)) {
+               flow_side[0] = 0;
+            } else {
+               flow_side[0] = 1;
+            }
+            if (tbox::MathUtilities<double>::equalEps(areas[2 * dim.getValue() - 1],
+                   0.)) {
+               flow_side[1] = 0;
+            } else {
+               flow_side[1] = 1;
+            }
+         }
+         if (cut_case == 3) {
+            if (tbox::MathUtilities<double>::equalEps(areas[1], 0.)) {
+               flow_side[0] = 0;
+            } else {
+               flow_side[0] = 1;
+            }
+            if (tbox::MathUtilities<double>::equalEps(areas[tbox::Dimension::
+                                                            MAXIMUM_DIMENSION_VALUE],
+                   0.)) {
+               flow_side[1] = 1;
+            } else {
+               flow_side[1] = 0;
+            }
+         }
+         if (cut_case == 4) {
+            if (tbox::MathUtilities<double>::equalEps(areas[0], 0.)) {
+               flow_side[0] = 1;
+            } else {
+               flow_side[0] = 0;
+            }
+            if (tbox::MathUtilities<double>::equalEps(areas[2 * dim.getValue() - 1],
+                   0.)) {
+               flow_side[1] = 0;
+            } else {
+               flow_side[1] = 1;
+            }
+         }
+         if (cut_case == 5) {
+            if (tbox::MathUtilities<double>::equalEps(areas[0], 0.)) {
+               flow_side[0] = 1;
+            } else {
+               flow_side[0] = 0;
+            }
+            if (tbox::MathUtilities<double>::equalEps(areas[tbox::Dimension::
+                                                            MAXIMUM_DIMENSION_VALUE],
+                   0.)) {
+               flow_side[1] = 1;
+            } else {
+               flow_side[1] = 0;
+            }
+         }
+         midpt[0] =
+            (areas[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]
+             + areas[2 * dim.getValue() - 1]) / 2.0;
+         midpt[1] = (areas[0] + areas[1]) / 2.0;
+
+      } // if DIM == 2
+
+      if ((dim == tbox::Dimension(3))) {
+         TBOX_ERROR(
+            d_object_name << ":calculateBoundaryNodeInformation()"
+            <<
+            "\nBoundary node computation does not work"
+            << "\nin 3D." << std::endl);
+      }
+
+      /*
+       * Set centroid.
+       */
+      for (i = 0; i < dim.getValue(); i++) {
+         if (cut_case == CUTCASE_UNDEFINED) {
+            centroid[i] = tbox::MathUtilities<double>::getSignalingNaN();
+         } else {
+            if (flow_side[i] == 0) {
+               centroid[i] = lower[i] + midpt[i] * dx[i];
+            } else if (flow_side[i] == 1) {
+               centroid[i] = upper[i] - midpt[i] * dx[i];
+            } else {
+               TBOX_ERROR(
+                  d_object_name << ":calculateBoundaryNodeInformation()"
+                  << "\nflow_side is not properly set."
+                  << std::endl);
+            }
+         }
+
+         cut_cell.setFrontCentroid(centroid[i], i);
+
+      }
+
+      /*
+       * Set shortest distance between boundary node and shape boundary
+       */
+      tbox::Dimension dim2d(2);
+      const int ll_a[] = { 0, 0 };
+      pdat::NodeIndex ll(ic, hier::IntVector(dim2d, ll_a));
+      const int lr_a[] = { 1, 0 };
+      pdat::NodeIndex lr(ic, hier::IntVector(dim2d, lr_a));
+      const int ul_a[] = { 0, 1 };
+      pdat::NodeIndex ul(ic, hier::IntVector(dim2d, ul_a));
+      const int ur_a[] = { 1, 1 };
+      pdat::NodeIndex ur(ic, hier::IntVector(dim2d, ur_a));
+
+      int num_bdry_nodes = cut_cell.getNumberOfBoundaryNodes();
+      for (int j = 0; j < num_bdry_nodes; j++) {
+         pdat::NodeIndex bdry_node =
+            cut_cell.getBoundaryNode(j).getIndex();
+
+         double dist = EBGEOM_UNDEFINED;
+         double distsq = EBGEOM_UNDEFINED;
+
+         if (cut_case == 0) {
+            if (bdry_node == ll || bdry_node == ul) {
+               dist = dx[1] - areas[0];
+            } else if (bdry_node == lr || bdry_node == ur) {
+               dist = dx[1] - areas[1];
+            } else {
+               TBOX_ERROR(
+                  d_object_name << "::calculateBoundaryNodeInfo()"
+                  <<
+                  "\ndid not find boundary node in 'distance to "
+                  << "shape' calculation" << std::endl);
+            }
+         } else if (cut_case == 1) {
+            if (bdry_node == ll || bdry_node == lr) {
+               dist = dx[0] - areas[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+            } else if (bdry_node == ul || bdry_node == ur) {
+               dist = dx[0] - areas[2 * dim.getValue() - 1];
+            } else {
+               TBOX_ERROR(
+                  d_object_name << "::calculateBoundaryNodeInfo()"
+                  <<
+                  "\ndid not find boundary node in 'distance to "
+                  << "shape' calculation" << std::endl);
+            }
+
+         } else {
+
+            /*
+             * Set the distance to simply be the distance between
+             * the boundary node and the centroid.
+             */
+            if (bdry_node == ll) {
+               node_loc[0] = lower[0];
+               node_loc[1] = lower[1];
+            } else if (bdry_node == lr) {
+               node_loc[0] = upper[0];
+               node_loc[1] = lower[1];
+            } else if (bdry_node == ul) {
+               node_loc[0] = lower[0];
+               node_loc[1] = upper[1];
+            } else if (bdry_node == ur) {
+               node_loc[0] = upper[0];
+               node_loc[1] = upper[1];
+            } else {
+               TBOX_ERROR(
+                  d_object_name << "::calculateBoundaryNodeInfo()"
+                  <<
+                  "\ndid not find boundary node in 'distance to "
+                  << "shape' calculation" << std::endl);
+            }
+
+            distsq = 0.;
+            for (i = 0; i < dim.getValue(); i++) {
+               distsq += (node_loc[i] - centroid[i])
+                  * (node_loc[i] - centroid[i]);
+            }
+            dist = sqrt(distsq);
+         }
+
+         BoundaryNode bn1 = cut_cell.getBoundaryNode(j);
+
+         //cut_cell.getBoundaryNode(j).setDistanceToShapeBoundary(dist);
+         bn1.setDistanceToBoundary(dist);
+         cut_cell.setBoundaryNode(bn1, j);
+
+         BoundaryNode bn2 = cut_cell.getBoundaryNode(j);
+
+         dist = bn2.getDistanceToBoundary();
+
+      }
+
+   } // if d_compute_areas_and_normal
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Calculate the volume of the supplied cell.  This algorithm divides    *
+ * the cell into subcells using the maximum number of subdivides in each *
+ * direction.  Thus, each dimension is divided into 2^d_max_subdivides   *
+ * cells.  From these subcells, set an integer "inout" array centered    *
+ * at the nodes of the cell. Use the array of node flag values on the   *
+ * subcells to compute the volume fraction of the cell.                  *
+ *                                                                       *
+ * This method should return exactly the same result as the              *
+ * recursiveCalculateVolume() method because it uses the same algorithm  *
+ * implemented in a non-recursive form.  The user should be warned that  *
+ * the number of subcells can grow very quickly; for example, with a 3D  *
+ * problem with d_max_subdivides set to 3, each cell will be subdivided  *
+ * into 8x8x8 = 512 subcells.                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+double
+EmbeddedBoundaryGeometry::calculateVolume(
+   const double* cell_lower,
+   const double* cell_upper,
+   double& error_estimate) const
+{
+   const tbox::Dimension& dim(d_grid_geometry->getDim());
+
+   double volume = 0.;
+
+   /*
+    * Compute the number of sub-cells (in each direction) from the max number
+    * of subdivides.  The total number of sub cells will be subcells^DIM.
+    */
+   int subcells = 1;
+   for (int i = 0; i < d_max_subdivides; i++) {
+      subcells *= 2;
+   }
+
+   /*
+    * Set the number of nodes, dx, and cell vol of each subcell
+    */
+   int nx[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   double dx[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   int total_subnodes = 1;
+   double subcell_vol = 1.;
+   for (int i = 0; i < dim.getValue(); i++) {
+      nx[i] = subcells + 1;
+      dx[i] = (cell_upper[i] - cell_lower[i]) / (double)subcells;
+      total_subnodes *= (subcells + 1);
+      subcell_vol *= dx[i];
+   }
+
+   /*
+    * Allocate space for node "inout" array, and set array by calling
+    * the shape's "isInside()" method.
+    */
+   int* node_flag = new int[total_subnodes];
+
+   doNativeShapeInsideOutside(nx, dx, cell_lower, node_flag);
+
+   /*
+    * Compute total volume from subcell volumes using the following criteria:
+    *   1. Compute subcell flag (flow, solid, cut) using:
+    *           cell_flag = sum(node_flag)
+    *      where node_flag is the "flag" value at each corner node.
+    *   2. If cell_flag = 2^DIM (solid)      volume += 0.
+    *         cell_flag = 0      (flow)       volume += subcell_vol
+    *         cell_flag > 0 && < 2^DIM (cut) volume += subcell_vol/2.
+    */
+   int two_to_the_ndim = 1;
+   for (int i = 0; i < dim.getValue(); i++) {
+      two_to_the_ndim *= 2;
+   }
+
+   int ijk, ijk_i, ijk_j, ijk_ij;
+   int cell_flag = -1;
+   int khi = 1;
+   if ((dim == tbox::Dimension(3))) {
+      khi = nx[dim.getValue() - 1] - 1;
+   }
+
+   for (int k = 0; k < khi; k++) {
+      for (int j = 0; j < nx[1] - 1; j++) {
+         for (int i = 0; i < nx[0] - 1; i++) {
+            if ((dim == tbox::Dimension(2))) {
+               ijk = k * nx[1] * nx[0] + j * nx[0] + i;
+               ijk_i = k * nx[1] * nx[0] + j * nx[0] + (i + 1);
+               ijk_j = k * nx[1] * nx[0] + (j + 1) * nx[0] + i;
+               ijk_ij = k * nx[1] * nx[0] + (j + 1) * nx[0] + (i + 1);
+
+               cell_flag =
+                  node_flag[ijk] + node_flag[ijk_i]
+                  + node_flag[ijk_j] + node_flag[ijk_ij];
+            }
+
+            if ((dim == tbox::Dimension(3))) {
+               ijk = (k + 1) * nx[1] * nx[0] + j * nx[0] + i;
+               ijk_i = (k + 1) * nx[1] * nx[0] + j * nx[0] + (i + 1);
+               ijk_j = (k + 1) * nx[1] * nx[0] + (j + 1) * nx[0] + i;
+               ijk_ij = (k + 1) * nx[1] * nx[0] + (j + 1) * nx[0] + (i + 1);
+
+               cell_flag +=
+                  node_flag[ijk] + node_flag[ijk_i]
+                  + node_flag[ijk_j] + node_flag[ijk_ij];
+            }
+
+            if (cell_flag == two_to_the_ndim) { // solid
+               volume += 0.;
+            } else if (cell_flag == 0) {  // flow
+               volume += subcell_vol;
+            } else {  // cut
+               volume += 0.5 * subcell_vol;
+               error_estimate += 0.25 * subcell_vol;
+            }
+         } // nx[0]
+      } // nx[1]
+   } // khi
+
+   delete[] node_flag;
+
+   return volume;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Calculate the volume of the cut cell using a recursive algorithm.     *
+ * This involves recursively subdividing the cell and summing the        *
+ * subcell volumes until the minimum subcell volume (i.e. maximum        *
+ * number of subdivides) is reached.  The method returns the computed    *
+ * volume along with an estimate of the error.                           *
+ *                                                                       *
+ *************************************************************************
+ */
+int
+EmbeddedBoundaryGeometry::recursiveCalculateVolume(
+   const double* cell_lower,
+   const double* cell_upper,
+   double& volume,
+   double& error_estimate,
+   int& subdivide_level) const
+{
+   const tbox::Dimension& dim(d_grid_geometry->getDim());
+
+   int i, j;
+   int return_val = 0;
+   volume = 0.;
+
+   /*
+    * If the cell volume is less than the specified minimum subcell
+    * volume, or if the maximum number of subdivides has been reached,
+    * exit this method with volume = 0.
+    */
+   double cell_vol = 1.0;
+   for (i = 0; i < dim.getValue(); i++) {
+      cell_vol *= (cell_upper[i] - cell_lower[i]);
+   }
+
+   if (subdivide_level < d_max_subdivides) {
+
+      /*
+       * Form lower and upper extents of sub-boxes resulting from cell
+       * subdivision.
+       *
+       *   Bit shifting:
+       *    - Think of (1 << dim) as 2**dim
+       *      1d  1 << 1 = 100 = 2
+       *      2d  1 << 2 = 010 = 4
+       *      3d  1 << 3 = 001 = 8
+       */
+      double lowers[(1 << dim.getValue())][tbox::Dimension::MAXIMUM_DIMENSION_VALUE];  // [ncorners][ndim]
+      double uppers[(1 << dim.getValue())][tbox::Dimension::MAXIMUM_DIMENSION_VALUE];  // [ncorners][ndim]
+      int classifications[(1 << dim.getValue())];  // [ncorners]
+      double midwy[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+      subdivide_level++; // increment subdivide counter
+
+      const int sub_boxes = (1 << dim.getValue());
+
+      int curr_subdivide_level = subdivide_level;
+
+      for (i = 0; i < sub_boxes; i++) {
+         for (j = 0; j < dim.getValue(); j++) {
+            midwy[j] = 0.5 * (cell_lower[j] + cell_upper[j]);
+            lowers[i][j] = (i & (1 << j) ? cell_lower[j] : midwy[j]);
+            uppers[i][j] = (i & (1 << j) ? midwy[j] : cell_upper[j]);
+         }
+
+         /*
+          * Classify each of the sub boxes as FLOW, CUT, or SOLID.
+          */
+         classifications[i] = classifyCell(lowers[i], uppers[i]);
+
+      }
+
+      /*
+       * Add up the volumes based on classifications.  If it is CUT,
+       * call this method recursively.
+       */
+      double subvolume = cell_vol / (double)sub_boxes;
+
+      for (i = 0; i < sub_boxes; i++) {
+         if (classifications[i] == FLOW) {
+            volume += subvolume;
+         } else if (classifications[i] == CUT) {
+            double cut_vol;
+            int ret = recursiveCalculateVolume(lowers[i],
+                  uppers[i],
+                  cut_vol,
+                  error_estimate,
+                  subdivide_level);
+
+            /*
+             * If the returned sub-cell volume is zero, it means the sub
+             * cell has reached our prescribed limit on size. Assume its
+             * split in half and update the error estimate.
+             */
+            double error_est = 0.;
+            if (ret == 1) {
+               cut_vol = 0.5 * subvolume;
+               error_est = 0.25 * subvolume;
+            }
+            volume += cut_vol;
+            error_estimate += error_est;
+         } else if (classifications[i] == SOLID) {
+            volume += 0.;
+         }
+
+         /*
+          * Reset subdivide_level back to original before moving to the
+          * next sub-volume.
+          */
+
+         subdivide_level = curr_subdivide_level;
+
+      } // loop over sub-boxes
+
+   } else {
+
+      return_val = 1;
+
+   } // subdivide_level < d_max_subdivides
+
+   return return_val;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Calculate the area lying within the computational domain of a cell.   *
+ * If ndim is 3d, then this function calculates the area of the faces of *
+ * the cell.  If ndim is 2d, it computes the length of the sides.  The   *
+ * faces are numbered from zero through ndim*2 and are of the form       *
+ * dim*2+side, where dim is the dimension and side is 0 (lower) or       *
+ * 1 (upper).                                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+double
+EmbeddedBoundaryGeometry::calculateArea(
+   const double* cell_lower,
+   const double* cell_upper,
+   const int face,
+   double& error_estimate) const
+{
+   const tbox::Dimension& dim(d_grid_geometry->getDim());
+
+   double area = 0.;
+
+   double face_lower[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   double face_upper[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   /*
+    * Classify the face:
+    *  face_dim - X, Y, or Z
+    *  face_side - 0(lower) or 1(upper) face
+    */
+   int face_dim = EBGEOM_UNDEFINED;
+   int face_side = EBGEOM_UNDEFINED;
+   if (face == 0) {
+      face_dim = 0;
+      face_side = 0;
+   } else if (face == 1) {
+      face_dim = 0;
+      face_side = 1;
+   } else if (face == 2) {
+      face_dim = 1;
+      face_side = 0;
+   } else if (face == 3) {
+      face_dim = 1;
+      face_side = 1;
+   } else if (face == 4) {
+      face_dim = 2;
+      face_side = 0;
+   } else if (face == 5) {
+      face_dim = 2;
+      face_side = 1;
+   }
+
+   double face_area = 1.0;
+   for (int i = 0; i < dim.getValue(); i++) {
+      if (i == face_dim) {
+         if (face_side == 0) {
+            face_lower[i] = cell_lower[i];
+            face_upper[i] = cell_lower[i];
+         } else if (face_side == 1) {
+            face_lower[i] = cell_upper[i];
+            face_upper[i] = cell_upper[i];
+         }
+      } else {
+         face_lower[i] = cell_lower[i];
+         face_upper[i] = cell_upper[i];
+         face_area *= face_upper[i] - face_lower[i];
+      }
+   }
+
+   /*
+    * Compute the number of sub-cells from the max number
+    * of subdivides.  The total number of sub cells will be subcells^DIM.
+    */
+   int subcells = 1;
+   for (int i = 0; i < d_max_subdivides; i++) {
+      subcells *= 2;
+   }
+
+   /*
+    * Set the number of nodes, dx, and cell vol of each subcell
+    */
+   int nx[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   double dx[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   int total_subnodes = 1;
+   double subface_area = 1.;
+   for (int i = 0; i < dim.getValue(); i++) {
+      if (i == face_dim) {
+         nx[i] = 1;
+         dx[i] = 0.;
+      } else {
+         nx[i] = subcells + 1;
+         dx[i] = (face_upper[i] - face_lower[i]) / (double)subcells;
+         total_subnodes *= (subcells + 1);
+         subface_area *= dx[i];
+      }
+   }
+
+   /*
+    * Allocate space for node "inout" array, and set array by calling
+    * the shape's "isInside()" method.
+    */
+   int* node_flag = new int[total_subnodes];
+   doNativeShapeInsideOutside(nx, dx, face_lower, node_flag);
+
+   /*
+    * Compute total area from subareas using the following criteria:
+    *   1. Compute subarea flag (flow, solid, cut) using:
+    *           cell_flag = sum(node_inout)
+    *      where node_flag is the "inout" value at each corner.
+    *   2. If cell_flag = 2^DIM (solid)      area += 0.
+    *         cell_flag = 0      (flow)      area += subcell_area
+    *         cell_flag > 0 && < 2^DIM (cut) area += subcell_area/2.
+    */
+   int two_to_the_ndim = 1;
+   for (int i = 0; i < dim.getValue() - 1; i++) {
+      two_to_the_ndim *= 2;
+   }
+
+   int ij, ij_i, ij_j, ij_ij;
+   int cell_flag = -1;
+
+   if ((dim == tbox::Dimension(2))) {
+      int face_nx[1];
+      if (face_dim == 0) {
+         face_nx[0] = nx[1];
+      } else {
+         face_nx[0] = nx[0];
+      }
+      for (int i = 0; i < face_nx[0] - 1; i++) {
+         cell_flag = node_flag[i] + node_flag[i + 1];
+
+         if (cell_flag == two_to_the_ndim) { // solid
+            area += 0.;
+         } else if (cell_flag == 0) {        // flow
+            area += subface_area;
+         } else {                            // cut
+            area += 0.5 * subface_area;
+            error_estimate += 0.25 * subface_area;
+         }
+
+      }
+   } // (dim == tbox::Dimension(2))
+
+   if ((dim == tbox::Dimension(3))) {
+      int face_nx[2] = { 0, 0 };
+      if (face_dim == 0) {
+         face_nx[0] = nx[1];
+         face_nx[1] = nx[dim.getValue() - 1];
+      } else if (face_dim == 1) {
+         face_nx[0] = nx[0];
+         face_nx[1] = nx[dim.getValue() - 1];
+      } else if (face_dim == 2) {
+         face_nx[0] = nx[0];
+         face_nx[1] = nx[1];
+      }
+      for (int j = 0; j < face_nx[1] - 1; j++) {
+         for (int i = 0; i < face_nx[0] - 1; i++) {
+            ij = j * face_nx[0] + i;
+            ij_i = j * face_nx[0] + (i + 1);
+            ij_j = (j + 1) * face_nx[0] + i;
+            ij_ij = (j + 1) * face_nx[0] + (i + 1);
+
+            cell_flag =
+               node_flag[ij] + node_flag[ij_i]
+               + node_flag[ij_j] + node_flag[ij_ij];
+
+            if (cell_flag == two_to_the_ndim) { // solid
+               area += 0.;
+            } else if (cell_flag == 0) {        // flow
+               area += subface_area;
+            } else {                            // cut
+               area += 0.5 * subface_area;
+               error_estimate += 0.25 * subface_area;
+            }
+         }
+      }
+   } // (dim == tbox::Dimension(3))
+
+   delete[] node_flag;
+
+   return area;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Calculate the area lying within the computational domain of a cell.   *
+ * If ndim is 3d, then this function calculates the area of the faces of *
+ * the cell.  If ndim is 2d, it computes the length of the sides.  The   *
+ * faces are numbered from zero through ndim*2 and are of the form       *
+ * dim*2+side, where dim is the dimension and side is 0 (lower) or       *
+ * 1 (upper).                                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+int
+EmbeddedBoundaryGeometry::recursiveCalculateArea(
+   const double* cell_lower,
+   const double* cell_upper,
+   const int face,
+   double& area,
+   double& error_estimate,
+   int& subdivide_level) const
+{
+   const tbox::Dimension& dim(d_grid_geometry->getDim());
+
+   int i, j;
+   int return_val = 0;
+   area = 0.;
+
+   double face_lower[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   double face_upper[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   /*
+    * Classify the face:
+    *  face_dim - X, Y, or Z
+    *  face_side - 0(lower) or 1(upper) face
+    */
+   int face_dim = EBGEOM_UNDEFINED;
+   int face_side = EBGEOM_UNDEFINED;
+   if (face == 0) {
+      face_dim = 0;
+      face_side = 0;
+   } else if (face == 1) {
+      face_dim = 0;
+      face_side = 1;
+   } else if (face == 2) {
+      face_dim = 1;
+      face_side = 0;
+   } else if (face == 3) {
+      face_dim = 1;
+      face_side = 1;
+   } else if (face == 4) {
+      face_dim = 2;
+      face_side = 0;
+   } else if (face == 5) {
+      face_dim = 2;
+      face_side = 1;
+   }
+
+   double face_area = 1.0;
+   for (i = 0; i < dim.getValue(); i++) {
+      if (i == face_dim) {
+         if (face_side == 0) {
+            face_lower[i] = cell_lower[i];
+            face_upper[i] = cell_lower[i];
+         } else if (face_side == 1) {
+            face_lower[i] = cell_upper[i];
+            face_upper[i] = cell_upper[i];
+         }
+      } else {
+         face_lower[i] = cell_lower[i];
+         face_upper[i] = cell_upper[i];
+         face_area *= face_upper[i] - face_lower[i];
+      }
+   }
+
+   if (subdivide_level < d_max_subdivides) {
+
+      /*
+       * Form lower and upper extents of sub-boxes resulting from face
+       * subdivision.
+       *
+       *   Bit shifting:
+       *    - Think of (1 << dim) as 2**dim
+       *      1d  1 << 1 = 100 = 2
+       *      2d  1 << 2 = 010 = 4
+       */
+      const int area_ndim = dim.getValue() - 1;
+      double lowers[(1 << area_ndim)][tbox::Dimension::MAXIMUM_DIMENSION_VALUE];  // [ncorners][XYZ loc]
+      double uppers[(1 << area_ndim)][tbox::Dimension::MAXIMUM_DIMENSION_VALUE];  // [ncorners][XYZ loc]
+      int classifications[(1 << area_ndim)];  // [ncorners]
+      double midwy[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+      subdivide_level++; // increment subdivide counter
+
+      const int sub_boxes = (1 << area_ndim);
+
+      int curr_subdivide_level = subdivide_level;
+
+      for (i = 0; i < sub_boxes; i++) {
+         for (j = 0; j < dim.getValue(); j++) {
+            midwy[j] = 0.5 * (face_lower[j] + face_upper[j]);
+            lowers[i][j] = (i & (1 << j) ? face_lower[j] : midwy[j]);
+            uppers[i][j] = (i & (1 << j) ? midwy[j] : face_upper[j]);
+         }
+
+         /*
+          * Classify each of the sub boxes as FLOW, CUT, or SOLID.
+          */
+         classifications[i] = classifyCell(lowers[i], uppers[i]);
+      }
+
+      /*
+       * Add up the areas based on classifications.  If it is CUT,
+       * call this method recursively.
+       */
+      double subarea = face_area / (double)sub_boxes;
+
+      for (i = 0; i < sub_boxes; i++) {
+         if (classifications[i] == FLOW) {
+            area += subarea;
+         } else if (classifications[i] == CUT) {
+            double cut_area;
+            int ret = recursiveCalculateArea(lowers[i],
+                  uppers[i],
+                  face,
+                  cut_area,
+                  error_estimate,
+                  subdivide_level);
+
+            /*
+             * If the returned sub-cell area is zero, it means the sub
+             * cell has reached our prescribed limit on size. Assume its
+             * split in half and update the error estimate.
+             */
+            double error_est = 0.;
+            if (ret == 1) {
+               cut_area = 0.5 * subarea;
+               error_est = 0.25 * subarea;
+            }
+            area += cut_area;
+            error_estimate += error_est;
+
+         } else if (classifications[i] == SOLID) {
+            area += 0.;
+         }
+
+         /*
+          * Reset subdivide_level back to original before moving to the
+          * next sub-volume.
+          */
+         subdivide_level = curr_subdivide_level;
+
+      } // loop over sub-boxes
+
+   } else {
+
+      return_val = 1;
+
+   }
+
+   return return_val;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Given a cell lower and upper bounds, classify the cell as FLOW,       *
+ * SOLID, or CUT.  Note that this method may be applied to any           *
+ * dimension.  It is assumed that the "isInside()" function associated   *
+ * with each shape takes an ndim-vector and returns a boolean value.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int
+EmbeddedBoundaryGeometry::classifyCell(
+   const double* lower,
+   const double* upper) const
+{
+   const tbox::Dimension& dim(d_grid_geometry->getDim());
+
+   /*
+    * Classify each of the corners of the cell and return the appropriate
+    * flag depending on whether all corners are inside or outside of the
+    * computational domain
+    */
+
+   bool classify_flow = true;
+   bool classify_cut = false;
+   bool classify_solid = false;
+
+   const int ncorners = 1 << dim.getValue();
+
+   bool is_inside = false;
+   int i, c, n, inside_corner_ctr;
+
+#ifdef USE_SINGLE_POINT_FOR_INOUT
+   double corner[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+#endif
+
+   for (n = 0; n < d_shapes.getSize(); n++) {
+
+#ifdef USE_ARRAY_FOR_INOUT
+      int inout[ncorners];
+      int nx[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      double dx[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+      for (i = 0; i < dim.getValue(); i++) {
+         nx[i] = 2;
+         dx[i] = upper[i] - lower[i];
+      }
+
+      for (c = 0; c < ncorners; c++) {
+         inout[c] = OUTSIDE;
+      }
+
+      d_shapes[n]->isInside(nx,
+         dx,
+         lower,
+         inout);
+
+      inside_corner_ctr = 0;
+      for (c = 0; c < ncorners; c++) {
+         if (inout[c] == INSIDE) {
+            is_inside = true;
+         } else {
+            is_inside = false;
+         }
+         if (is_inside) inside_corner_ctr++;
+      }
+#endif
+
+#ifdef USE_SINGLE_POINT_FOR_INOUT
+      inside_corner_ctr = 0;
+      for (c = 0; c < ncorners; c++) {
+         for (i = 0; i < dim.getValue(); i++) {
+            corner[i] = (c & (1 << i) ? lower[i] : upper[i]);
+         }
+         is_inside = d_shapes[n]->isInside(corner);
+         if (is_inside) inside_corner_ctr++;
+      }
+#endif
+      if (inside_corner_ctr > ncorners) {
+         TBOX_ERROR(
+            d_object_name << ":classifyCell()"
+            <<
+            "\nSevere Error: the inside corner counter is "
+            << "\ngreater than the number of corners!"
+            << std::endl);
+      }
+
+      /*
+       * A cell with no corners inside will be flow; a cell with some
+       * corners inside will be cut; and a cell with all corners inside
+       * will be solid.
+       *
+       * Note that a cell may be flow for one shape, but cut or solid
+       * on another.  Or, it may be cut on one shape but solid on another.
+       * For this reason, we establish the precedence:
+       *
+       * If cell is SOLID, this takes precedence over CUT and FLOW -
+       *    break out of the loop over shapes in this case.
+       * If cell is CUT, this takes precedence over FLOW but not solid -
+       *    we set classify_flow to false but do not reset solid and do
+       *    not break out of the loop.
+       * If cell is FLOW, it does not take precedence over either - we
+       *    do nothing in this case (classify_flow is set to true before
+       *    the loop over shapes).
+       */
+      if ((inside_corner_ctr > 0) && (inside_corner_ctr < ncorners)) {
+         classify_flow = false;
+         classify_cut = true;
+      } else if (inside_corner_ctr == ncorners) {
+         classify_flow = false;
+         classify_cut = false;
+         classify_solid = true;
+         break;
+      }
+
+   } // loop over shapes.
+
+   int classification = -1;
+   if (classify_cut) {
+      classification = CUT;
+   } else if (classify_flow) {
+      classification = FLOW;
+   } else if (classify_solid) {
+      classification = SOLID;
+   } else {
+      TBOX_ERROR(d_object_name << ":classifyCell()"
+                               << "\nCould not classify cell!!" << std::endl);
+   }
+   return classification;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ *  Set the embedded boundary on the supplied level using data from      *
+ *  coarser level to initialize cell flags.  Note that this method       *
+ *  simply refines the cell flags to the finer level.  The steps to      *
+ *  step through the marked cells and compute cells that intersect       *
+ *  the triangulated surface are done via the "postprocessRefine()"      *
+ *  method, which gets called for each patch during refinement.          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+EmbeddedBoundaryGeometry::refineEmbeddedBoundary(
+   const tbox::Pointer<hier::PatchLevel> level,
+   const tbox::Pointer<hier::PatchLevel> old_level,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   (void)old_level;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(level.isNull()));
+#endif
+
+   /*
+    * If the "old_level" is null (i.e. not regridding) construct a schedule
+    * that uses the coarser level data only.  If the "old_level" is non-null,
+    * but no coarser level exists (e.g. hierarchy is null) construct a
+    * schedule that pulls data from the old level only. If the old_level is
+    * non-null and a coarser level exists, construct a schedule that pulls
+    * data from both the old level and coarser level.
+    */
+   int level_number = level->getLevelNumber();
+
+   if (level_number == 0) {
+      TBOX_ERROR(
+         d_object_name << ":refineEmbeddedBoundary()\n"
+         <<
+         "Operating on level 0 - no coarser level available."
+         << std::endl);
+   }
+
+   tbox::Pointer<xfer::RefineSchedule> fill_sched;
+
+   if (hierarchy.isNull()) {
+#ifdef USING_SAMRAI_DLBG
+      /*
+       * Add DLBG shcduel creation here
+       */
+#else
+      fill_sched = d_ebdry_refine_alg->createSchedule(level,
+            old_level,
+            this);
+#endif
+   } else {
+#ifdef USING_SAMRAI_DLBG
+      /*
+       * Add DLBG shcduel creation here
+       */
+#else
+      fill_sched = d_ebdry_refine_alg->createSchedule(level,
+            old_level,
+            level_number - 1,
+            hierarchy,
+            this);
+#endif
+   }
+
+   /*
+    * Note: This step invokes the postprocessRefine() method
+    */
+   double time = 0.;
+   fill_sched->fillData(time);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set the embedded boundary on the physical boundaries (the boundary    *
+ * boxes) of the prescribed level.                                       *
+ *                                                                       *
+ * The implementation here takes advantage of the information stored     *
+ * in the BoundaryConditionsUtilities class.                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+EmbeddedBoundaryGeometry::setEmbeddedBoundaryAtPhysicalBoundaries(
+   const tbox::Pointer<hier::PatchLevel> level)
+{
+   const tbox::Dimension& dim(d_grid_geometry->getDim());
+
+   /*
+    * Loop over patches on level and loop over boundary boxes.
+    */
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      const tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+         patch->getPatchGeometry();
+
+      const hier::Box& interior = patch->getBox();
+      const hier::Index& ifirst = interior.lower();
+      const hier::Index& ilast = interior.upper();
+
+      hier::IntVector gcw_to_fill = d_ebdry_nghosts;
+
+      tbox::Pointer<pdat::CellData<int> > cell_flag =
+         patch->getPatchData(d_cell_flag_data_id);
+      tbox::Pointer<pdat::CellData<double> > cell_vol =
+         patch->getPatchData(d_cell_vol_data_id);
+
+      /*
+       * These are the definitions for the different boundary conditions
+       * defined in appu::CartesianBoundaryDefines.h.
+       *
+       * #define FLOW_BC            (90)
+       * #define REFLECT_BC         (91)
+       * #define DIRICHLET_BC       (92)
+       * #define NEUMANN_BC         (93)
+       *
+       * The fortran will interpret the different "types" based on these
+       * values.
+       */
+
+      /*
+       * Loop over NODE boundary boxes.
+       */
+      int btype = EBGEOM_UNDEFINED;
+      if ((dim == tbox::Dimension(2))) {
+         btype = NODE2D_BDRY_TYPE;
+      } else if ((dim == tbox::Dimension(3))) {
+         btype = NODE3D_BDRY_TYPE;
+      }
+
+      const tbox::Array<hier::BoundaryBox>& node_bdry =
+         pgeom->getCodimensionBoundaries(btype);
+
+      for (int i = 0; i < node_bdry.getSize(); i++) {
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         if ((dim == tbox::Dimension(2))) {
+            TBOX_ASSERT(node_bdry[i].getBoundaryType() == NODE2D_BDRY_TYPE);
+         } else if ((dim == tbox::Dimension(3))) {
+            TBOX_ASSERT(node_bdry[i].getBoundaryType() == NODE3D_BDRY_TYPE);
+         }
+#endif
+
+         int bnode_loc = node_bdry[i].getLocationIndex();
+
+         hier::Box fill_box = pgeom->getBoundaryFillBox(node_bdry[i],
+               interior,
+               gcw_to_fill);
+         const hier::Index ibeg = fill_box.lower();
+         const hier::Index iend = fill_box.upper();
+
+         if ((dim == tbox::Dimension(2))) {
+            F77_FUNC(setebnode2d, SETEBNODE2D) (ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ibeg(0), iend(0),
+               ibeg(1), iend(1),
+               d_ebdry_nghosts(0),
+               d_ebdry_nghosts(1),
+               bnode_loc,
+               d_node_bdry_cond[bnode_loc],
+               cell_flag->getPointer(),
+               cell_vol->getPointer());
+         }
+
+#if 0
+         if ((dim == tbox::Dimension(3))) {
+            F77_FUNC(setebnodebdry3d, SETEBNODEBDRY3D) (ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ifirst(2), ilast(2),
+               ibeg(0), iend(0),
+               ibeg(1), iend(1),
+               ibeg(2), iend(2),
+               d_ebdry_nghosts(0),
+               d_ebdry_nghosts(1),
+               d_ebdry_nghosts(1),
+               bnode_loc,
+               d_node_bdry_conds[bnode_loc],
+               cell_flag->getPointer(),
+               cell_vol->getPointer());
+         }
+#endif
+
+      }
+
+      /*
+       * Loop over EDGE boundary boxes.
+       */
+
+      if ((dim == tbox::Dimension(2))) {
+         btype = EDGE2D_BDRY_TYPE;
+      } else if ((dim == tbox::Dimension(3))) {
+         btype = EDGE3D_BDRY_TYPE;
+      }
+
+      const tbox::Array<hier::BoundaryBox>& edge_bdry =
+         pgeom->getCodimensionBoundaries(btype);
+
+      for (int i = 0; i < edge_bdry.getSize(); i++) {
+
+         hier::Box fill_box = pgeom->getBoundaryFillBox(edge_bdry[i],
+               interior,
+               gcw_to_fill);
+         const hier::Index ibeg = fill_box.lower();
+         const hier::Index iend = fill_box.upper();
+
+#if 0
+
+         int bedge_loc = edge_bdry[i].getLocationIndex();
+
+         if ((dim == tbox::Dimension(2))) {
+
+            F77_FUNC(setebedgebdry2d, SETEBEDGEBDRY2D) (ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ibeg(0), iend(0),
+               ibeg(1), iend(1),
+               d_ebdry_nghosts(0),
+               d_ebdry_nghosts(1),
+               bedge_loc,
+               d_edge_bdry_conds[bedge_loc],
+               cell_flag->getPointer(),
+               cell_vol->getPointer());
+         }
+
+         if ((dim == tbox::Dimension(3))) {
+
+            F77_FUNC(setebedgebdry3d, SETEBEDGEBDRY3D) (ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ifirst(2), ilast(2),
+               ibeg(0), iend(0),
+               ibeg(1), iend(1),
+               ibeg(2), iend(2),
+               d_ebdry_nghosts(0),
+               d_ebdry_nghosts(1),
+               d_ebdry_nghosts(1),
+               bedge_loc,
+               d_edge_bdry_conds[bedge_loc],
+               cell_flag->getPointer(),
+               cell_vol->getPointer());
+         }
+
+#endif
+
+      }
+
+      if ((dim == tbox::Dimension(3))) {
+         /*
+          * Loop over FACE boundary boxes.
+          */
+         const tbox::Array<hier::BoundaryBox>& face_bdry =
+            pgeom->getCodimensionBoundaries(FACE3D_BDRY_TYPE);
+
+         for (int i = 0; i < face_bdry.getSize(); i++) {
+
+#if 0
+
+            int bface_loc = face_bdry[i].getLocationIndex();
+
+            hier::Box fill_box = pgeom->getBoundaryFillBox(face_bdry[i],
+                  interior,
+                  gcw_to_fill);
+
+            const hier::Index ibeg = fill_box.lower();
+            const hier::Index iend = fill_box.upper();
+
+            F77_FUNC(setebfacebdry3d, SETEBFACEBDRY3D) (ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ifirst(2), ilast(2),
+               ibeg(0), iend(0),
+               ibeg(1), iend(1),
+               ibeg(2), iend(2),
+               d_ebdry_nghosts(0),
+               d_ebdry_nghosts(1),
+               d_ebdry_nghosts(2),
+               bface_loc,
+               d_face_bdry_conds[bface_loc],
+               cell_flag->getPointer(),
+               cell_vol->getPointer());
+#endif
+
+         } // loop over faces
+      }
+
+   } // loop over patches on level
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set parameters maintaining level ratio information for the hierarchy. *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+EmbeddedBoundaryGeometry::setLevelRatioInformation(
+   const tbox::Pointer<hier::PatchLevel> level)
+{
+   TBOX_ASSERT(!(level.isNull()));
+
+   const tbox::Dimension& dim(d_grid_geometry->getDim());
+   /*
+    *  Allocate level ratios and ratio to coarser arrays.
+    */
+   int level_num = level->getLevelNumber();
+
+   if (level->inHierarchy() && level_num >= d_max_levels) {
+      d_max_levels = level_num + 1;
+      d_ratio_to_coarser.resizeArray(d_max_levels, hier::IntVector(dim));
+      d_level_ratios.resizeArray(d_max_levels, hier::IntVector(dim));
+   }
+
+   /*
+    * Set ratios for level 0.
+    */
+   d_ratio_to_coarser[0] = hier::IntVector::getOne(dim);
+   d_level_ratios[0] = hier::IntVector::getOne(dim);
+
+   /*
+    * Set ratios for finer levels.
+    */
+   if (level_num > 0) {
+      hier::IntVector ratio = level->getRatioToCoarserLevel();
+      d_ratio_to_coarser[level_num] = ratio;
+      d_level_ratios[level_num] =
+         d_ratio_to_coarser[level_num] * d_level_ratios[level_num - 1];
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set node inside/outside array from native SAMRAI analytic shapes      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+EmbeddedBoundaryGeometry::doNativeShapeInsideOutside(
+   const int* nx,
+   const double* dx,
+   const double* origin,
+   int* node_flag) const
+{
+   const tbox::Dimension& dim(d_grid_geometry->getDim());
+
+   /*
+    * Create temporary array to store node flag for each shape.
+    */
+   int total_nodes = 1;
+   for (int i = 0; i < dim.getValue(); i++) {
+      total_nodes *= nx[i];
+   }
+
+   int* temp_node_flag = new int[total_nodes];
+
+   /*
+    * Loop over SAMRAI shapes and for each {
+    *   - initialize all entries of temp_node_flag array to OUTSIDE
+    *   - set temp_node_flag using shape's 'isInside()' method
+    *   - copy temp_node_flag to supplied node_flag if temp_node_flag
+    *     is INSIDE
+    *   - clean up temporary array
+    */
+   for (int nshape = 0; nshape < d_shapes.getSize(); nshape++) {
+
+      // initialize
+      int n;
+      for (n = 0; n < total_nodes; n++) {
+         temp_node_flag[n] = OUTSIDE;
+      }
+
+      // set
+      d_shapes[nshape]->isInside(nx,
+         dx,
+         origin,
+         temp_node_flag);
+
+      // copy
+      for (n = 0; n < total_nodes; n++) {
+         if (temp_node_flag[n] == INSIDE) {
+            node_flag[n] = INSIDE;
+         }
+      }
+
+   } // loop over shapes
+
+   // clean up
+   delete[] temp_node_flag;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Write embedded boundary information - cell flag and cut cell          *
+ * information - to supplied file.                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+EmbeddedBoundaryGeometry::writeLevelEmbeddedBoundaryDataToFile(
+   const tbox::Pointer<hier::PatchLevel> level,
+   const std::string& dirname) const
+{
+
+#ifdef HAVE_HDF5
+
+   const tbox::SAMRAI_MPI& mpi(level->getMappedBoxLevel()->getMPI());
+   const tbox::Dimension& dim(d_grid_geometry->getDim());
+   /*
+    * Generate directory to store mesh files.
+    */
+   bool write_to_dir = false;
+   if (dirname.size() > 0) {
+      write_to_dir = true;
+      tbox::Utilities::recursiveMkdir(dirname);
+   }
+
+   /*
+    * Form the filename.  It will be "ebmesh" appended
+    * by the level number and processor id.
+    *
+    * i.e.   filename = "ebmesh-l<n>-p<pid>.hdf"
+    */
+   int i;
+   int ln = level->getLevelNumber();
+   int pid = mpi.getRank();
+
+   std::string filename = "ebmesh-l" + tbox::Utilities::intToString(ln)
+      + "-p" + tbox::Utilities::intToString(pid) + ".hdf";
+
+   tbox::pout << "\n  writing eb mesh to file = " << dirname << "/"
+              << "/ebmesh-l" << ln << "-p" << pid << "\n" << std::endl;
+
+   if (write_to_dir) filename = dirname + "/" + filename;
+
+   /*
+    * Open the HDF5 database with the supplied filename.
+    */
+   tbox::Pointer<tbox::Database> db(new tbox::HDFDatabase("root"));
+   if (!db->create(filename)) {
+      TBOX_ERROR(
+         d_object_name << "writeLevelEmbeddedBoundaryDataToFile():"
+         << "\n Error opening HDF database: "
+         << filename << std::endl);
+   }
+
+   /*
+    * Write header information containing the box array for the
+    * level to verify matching when we read in the data.
+    */
+   hier::BoxArray patch_boxes = level->getBoxes();
+   db->putDatabaseBoxArray("patch_boxes", patch_boxes);
+
+   if (!d_grid_geometry.isNull()) {
+      const double* domain_xlo = d_grid_geometry->getXLower();
+      const double* domain_xhi = d_grid_geometry->getXUpper();
+      db->putDoubleArray("domain_xlo", domain_xlo, dim.getValue());
+      db->putDoubleArray("domain_xhi", domain_xhi, dim.getValue());
+   }
+
+   /*
+    * Write embedded boundary data on the patches.  To keep the file size
+    * minimal, we only write the SOLID and CUT cells.  All
+    * other cells are assumed to be FLOW.
+    */
+
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+      tbox::Pointer<pdat::IndexData<appu::CutCell,
+                                    pdat::CellGeometry> > eboundary =
+         patch->getPatchData(d_ebdry_data_id);
+      tbox::Pointer<pdat::CellData<int> > cell_flag =
+         patch->getPatchData(d_cell_flag_data_id);
+      tbox::Pointer<pdat::CellData<double> > cell_vol =
+         patch->getPatchData(d_cell_vol_data_id);
+
+      tbox::List<hier::Index> solid_cells;
+      hier::Index solid_cell(dim, 0);
+      for (pdat::CellIterator ic(patch->getBox()); ic; ic++) {
+         if ((*cell_flag)(ic()) == SOLID) {
+            for (i = 0; i < dim.getValue(); i++) {
+               solid_cell(i) = ic() (i);  // cast CellIndex to Index
+            }
+            solid_cells.addItem(solid_cell);
+         }
+      }
+
+      /*
+       * Create patch database to store solid and cut cell data.
+       */
+      int patch_id = patch->getLocalId().getValue();
+      std::string name2 = "patch_db["
+         + tbox::Utilities::intToString(patch_id) + "]";
+
+      tbox::Pointer<tbox::Database> patch_db = db->putDatabase(name2);
+      /*
+       * Write solid cells for the patch.
+       */
+      int num_solid_cells = solid_cells.getNumberOfItems();
+      patch_db->putInteger("num_solid_cells", num_solid_cells);
+
+      if (num_solid_cells > 0) {
+
+         // pack indices into an integer array
+         tbox::Array<int> packed_indices;
+         packed_indices.resizeArray(num_solid_cells * dim.getValue());
+         int cell = 0;
+         for (tbox::List<hier::Index>::Iterator
+              li(solid_cells); li; li++) {
+            for (i = 0; i < dim.getValue(); i++) {
+               packed_indices[cell + i] = li() (i);
+            }
+            cell += dim.getValue();
+         }
+
+         // write packed indices array to database
+         patch_db->putIntegerArray("solid_cell_indices", packed_indices);
+      }
+
+      /*
+       * Write cut cells for the patch
+       */
+      int num_cut_cells = eboundary->getNumberOfItems();
+      patch_db->putInteger("num_cut_cells", num_cut_cells);
+
+      int cut_cell_ctr = 0;
+
+      for (pdat::IndexData<appu::CutCell, pdat::CellGeometry>::Iterator
+           bc(*eboundary); bc; bc++) {
+
+         std::string name3 = "cut_cell["
+            + tbox::Utilities::intToString(cut_cell_ctr) + "]";
+
+         tbox::Pointer<tbox::Database> cut_cell_db =
+            patch_db->putDatabase(name3);
+
+         tbox::Array<int> index;
+         index.resizeArray(dim.getValue());
+         for (i = 0; i < dim.getValue(); i++) {
+            index[i] = bc().getIndex() (i);
+         }
+         cut_cell_db->putIntegerArray("index", index);
+         bc().putToDatabase(cut_cell_db);
+
+         cut_cell_ctr++;
+
+      }
+
+   } // loop over patches
+
+   /*
+    * Close the file.
+    */
+   db->close();
+
+#endif
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Read embedded boundary information - cell flag and cut cell           *
+ * information - from supplied file.                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+void
+EmbeddedBoundaryGeometry::readLevelEmbeddedBoundaryDataFromFile(
+   const tbox::Pointer<hier::PatchLevel> level,
+   const std::string& dirname) const
+{
+   const tbox::SAMRAI_MPI& mpi(level->getMappedBoxLevel()->getMPI());
+
+#ifdef HAVE_HDF5
+
+   const tbox::Dimension& dim(d_grid_geometry->getDim());
+   /*
+    * Form the filename.  It will be "ebmesh" appended
+    * by the level number and processor id.
+    *
+    * i.e.   filename = "ebmesh-l<n>-p<pid>.hdf"
+    */
+   int ln = level->getLevelNumber();
+   int pid = mpi.getRank();
+   tbox::pout << "\n  reading eb mesh from file = " << dirname
+              << "/ebmesh-l" << ln << "-p" << pid << "\n" << std::endl;
+
+   std::string filename = dirname + "/" + "ebmesh-l"
+      + tbox::Utilities::intToString(ln)
+      + "-p" + tbox::Utilities::intToString(pid) + ".hdf";
+
+   /*
+    * Open the HDF5 database with the supplied filename.
+    */
+   tbox::Pointer<tbox::Database> db(new tbox::HDFDatabase(filename));
+   if (!db->open(filename)) {
+      TBOX_ERROR(
+         d_object_name << "::readLevelEmbeddedBoundaryDataFromFile():"
+         << "\n Error opening HDF database: "
+         << filename << std::endl);
+   }
+
+   /*
+    * Read patch boxes from file header.  This information is used to
+    * verify the written information and the read information is compatible.
+    */
+   hier::BoxArray patch_boxes(dim, db->getDatabaseBoxArray("patch_boxes"));
+   bool same = true;
+   for (int p = 0; p < level->getNumberOfPatches(); p++) {
+      if (p >= patch_boxes.getNumberOfBoxes()) {
+         same = false;
+         break;
+      }
+      hier::Box rbox = patch_boxes[p];
+      hier::Box pbox = level->getPatch(hier::LocalId(p))->getBox();
+      if (rbox != pbox) same = false;
+   }
+   if (!same) {
+      TBOX_ERROR(d_object_name << "::readLevelEmbeddedBoundaryDataFromFile()"
+                               << "\nBoxes in file: " << filename
+                               << "\nare different than supplied Level " << ln
+                               << " boxes. ***Exiting." << std::endl);
+   }
+
+   if (!d_grid_geometry.isNull()) {
+      same = true;
+      const double* domain_xlo = d_grid_geometry->getXLower();
+      const double* domain_xhi = d_grid_geometry->getXUpper();
+
+      double read_xlo[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      double read_xhi[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      db->getDoubleArray("domain_xlo", read_xlo, dim.getValue());
+      db->getDoubleArray("domain_xhi", read_xhi, dim.getValue());
+
+      for (int i = 0; i < dim.getValue(); i++) {
+         if (!tbox::MathUtilities<double>::equalEps(domain_xlo[i],
+                read_xlo[i])) {
+            TBOX_ERROR(d_object_name
+               << "::readLevelEmbeddedBoundaryDataFromFile()"
+               << "\nlevel xlo definition in: " << filename
+               << "\nis different than supplied Level " << ln << " xlo"
+               << "\n   level xlo[" << i << "]: " << domain_xlo[i]
+               << "\n   read xlo[" << i << "]:  " << read_xlo[i]
+               << std::endl);
+         }
+         if (!tbox::MathUtilities<double>::equalEps(domain_xhi[i],
+                read_xhi[i])) {
+            TBOX_ERROR(d_object_name
+               << "::readLevelEmbeddedBoundaryDataFromFile()"
+               << "\nlevel xhi definition in: " << filename
+               << "\nis different than supplied Level " << ln << " xhi"
+               << "\n   level xhi[" << i << "]: " << domain_xhi[i]
+               << "\n   read xhi[" << i << "]:  " << read_xhi[i]
+               << std::endl);
+         }
+      }
+   }
+
+   /*
+    * Read the embedded boundary information for each patch.
+    */
+   int i, d;
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      tbox::Pointer<pdat::IndexData<appu::CutCell,
+                                    pdat::CellGeometry> > eboundary =
+         patch->getPatchData(d_ebdry_data_id);
+      tbox::Pointer<pdat::CellData<int> > cell_flag =
+         patch->getPatchData(d_cell_flag_data_id);
+      tbox::Pointer<pdat::CellData<double> > cell_vol =
+         patch->getPatchData(d_cell_vol_data_id);
+
+      /*
+       * Determine name of patch database that holds solid and cut cell data.
+       */
+      int patch_id = patch->getLocalId().getValue();
+      std::string name2 = "patch_db["
+         + tbox::Utilities::intToString(patch_id) + "]";
+
+      tbox::Pointer<tbox::Database> patch_db = db->getDatabase(name2);
+
+      /*
+       * Read solid cells from patch_db
+       */
+      int num_solid_cells = patch_db->getInteger("num_solid_cells");
+
+      if (num_solid_cells > 0) {
+
+         tbox::Array<int> packed_indices =
+            patch_db->getIntegerArray("solid_cell_indices");
+
+         /*
+          * Unpack solid cell indices and cell flag to SOLID for
+          * each index.
+          */
+         int cell_ctr = 0;
+         for (i = 0; i < num_solid_cells; i++) {
+            hier::Index packed_index(dim, 0);
+            for (d = 0; d < dim.getValue(); d++) {
+               packed_index(d) = packed_indices[cell_ctr + d];
+            }
+            pdat::CellIndex cell(packed_index);
+            (*cell_flag)(cell) = SOLID;
+            (*cell_vol)(cell) = 0.;
+            cell_ctr += dim.getValue();
+         }
+      }
+
+      /*
+       * Read cut cell info from patch_db
+       */
+      int num_cut_cells = patch_db->getInteger("num_cut_cells");
+      for (i = 0; i < num_cut_cells; i++) {
+
+         /*
+          * Form cut cell database that will hold info about each cut cell
+          */
+         std::string name3 = "cut_cell[" + tbox::Utilities::intToString(i)
+            + "]";
+
+         /*
+          * Access database and data in it.
+          */
+         tbox::Pointer<tbox::Database> cut_cell_db =
+            patch_db->getDatabase(name3);
+
+         tbox::Array<int> index_array = cut_cell_db->getIntegerArray("index");
+         pdat::CellIndex index(dim);
+         for (d = 0; d < dim.getValue(); d++) {
+            index(d) = index_array[d];
+         }
+
+         /*
+          * Create cut cell and add to eboundary
+          */
+         appu::CutCell cc(index);
+         cc.getFromDatabase(cut_cell_db);
+         eboundary->appendItem(index, cc);
+
+         /*
+          * Set cell flag and volume fraction
+          */
+         pdat::CellIndex cell = index;
+         (*cell_flag)(cell) = CUT;
+         (*cell_vol)(cell) = cc.getVolume();
+
+      }
+
+   } // loop over patches
+
+   /*
+    * Close the file.
+    */
+   db->close();
+
+#endif
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Allow user to set the grid geometry, if they did not supply it        *
+ * when the object was constructed.                                      *
+ *                                                                       *
+ *************************************************************************
+ */
+void
+EmbeddedBoundaryGeometry::setGridGeometry(
+   const tbox::Pointer<geom::CartesianGridGeometry> grid_geom)
+{
+   d_grid_geometry = grid_geom;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Get data from input.                                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+void
+EmbeddedBoundaryGeometry::getFromInput(
+   tbox::Pointer<tbox::Database> ebdb,
+   const bool is_from_restart)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(ebdb.isNull()));
+#endif
+
+   const tbox::Dimension& dim(d_grid_geometry->getDim());
+
+   if (!is_from_restart) {
+      d_flow_type = "EXTERNAL";
+      if (ebdb->keyExists("flow_type")) {
+         d_flow_type = ebdb->getString("flow_type");
+      }
+   }
+
+   d_verbose = true;
+   d_verbose = ebdb->getBoolWithDefault("verbose", d_verbose);
+
+   d_read_ebdry = false;
+   d_read_ebdry = ebdb->getBoolWithDefault("read_from_file", d_read_ebdry);
+
+   d_write_ebdry = false;
+   d_write_ebdry = ebdb->getBoolWithDefault("write_to_file", d_write_ebdry);
+
+   if (ebdb->keyExists("dirname")) {
+      d_ebdry_dirname = ebdb->getString("dirname");
+   }
+
+   int j;
+
+   /*
+    * Read in info about boundary definition.
+    */
+
+   if (ebdb->keyExists("CubesPatchInterface")) {
+
+      /*
+       * Boundary defined by Cubes.
+       */
+#ifndef HAVE_CUBES
+      TBOX_ERROR("Cannot use Cubes - SAMRAI was not configured with it!");
+#endif
+      d_use_cubes = true;
+
+   } else if (ebdb->keyExists("ElevenPatchInterface")) {
+
+      /*
+       * Boundary defined by Eleven.
+       */
+#ifndef HAVE_ELEVEN
+      TBOX_ERROR("Cannot use Eleven - SAMRAI was not configured with it!");
+#endif
+      tbox::Pointer<tbox::Database> eleven_db =
+         ebdb->getDatabase("ElevenPatchInterface");
+      d_use_eleven_inside_outside =
+         eleven_db->getBoolWithDefault("use_inside_outside", false);
+      d_use_eleven_boundary_node =
+         eleven_db->getBoolWithDefault("use_boundary_node", false);
+      if (!d_use_eleven_inside_outside && !d_use_eleven_boundary_node) {
+         TBOX_ERROR(
+            d_object_name << ": You must specify how you want to "
+            <<
+            "\nuse ELEVEN.  It will either compute nodal "
+            <<
+            "\ninside/outside info or compute Boundary nodes."
+            <<
+            "\nSet 'use_inside_outside' or 'use_boundary_node' in "
+            <<
+            "\nthe ElevenPatchInterface input to indicate which"
+            << "\nyou prefer." << std::endl);
+      }
+      if (d_use_eleven_inside_outside && d_use_eleven_boundary_node) {
+         TBOX_ERROR(
+            d_object_name << ": You have both 'use_inside_outside' and"
+            <<
+            "\n'use_boundary_node' specified in input.  You cannot "
+            << "\nuse both." << std::endl);
+      }
+
+   } else {
+
+      /*
+       * Boundary defined by native SAMRAI shapes.
+       */
+      if (ebdb->keyExists("Shapes")) {
+
+         tbox::Pointer<tbox::Database> shapes_db = ebdb->getDatabase("Shapes");
+
+         tbox::Array<std::string> shapes_keys = shapes_db->getAllKeys();
+         int num_shapes = shapes_keys.getSize();
+
+         if (d_flow_type == "INTERNAL" && num_shapes > 1) {
+            TBOX_ERROR(d_object_name << ": Must supply only one shape when"
+                                     << " flow_type = INTERNAL" << std::endl);
+         }
+
+         /*
+          * Each shape is expected to have input of the form:
+          *   Shape {
+          *     shape params
+          *   }
+          *
+          * Here, we read in and construct each of the shapes provided
+          * by the user.
+          */
+         d_shapes.resizeArray(num_shapes);
+         for (j = 0; j < num_shapes; j++) {
+            tbox::Pointer<tbox::Database> shape_db =
+               shapes_db->getDatabase(shapes_keys[j]);
+            std::string type = shape_db->getString("type");
+            tbox::Pointer<appu::EmbeddedBoundaryShape> new_shape;
+
+            if (type == "SPHERE") {
+               std::string object_name = shapes_keys[j];
+               new_shape = new appu::EmbeddedBoundaryShapeSphere(dim,
+                     object_name,
+                     shape_db);
+            } else if (type == "POLYGON") {
+               std::string object_name = shapes_keys[j];
+               new_shape =
+                  new appu::EmbeddedBoundaryShapePolygon(dim,
+                     object_name,
+                     shape_db);
+            } else {
+               TBOX_ERROR("invalid shape type!!");
+            }
+            d_shapes[j] = new_shape;
+
+         }
+
+      }
+   }
+
+   d_compute_areas_and_normal = true;
+   d_compute_areas_and_normal =
+      ebdb->getBoolWithDefault("compute_areas_and_normal",
+         d_compute_areas_and_normal);
+
+   /*
+    * If SAMRAI is to be used for computing cutcell information, read
+    * problem parameters controlling it here.
+    */
+   if (!d_use_cubes) {
+
+      if (ebdb->keyExists("max_subdivides")) {
+         d_max_subdivides = ebdb->getInteger("max_subdivides");
+         if (d_verbose) {
+            tbox::pout << "  d_max_subdivides = "
+                       << d_max_subdivides << std::endl;
+         }
+      }
+
+      d_use_recursive_algs = false;
+      d_use_recursive_algs =
+         ebdb->getBoolWithDefault("use_recursive_algs",
+            d_use_recursive_algs);
+
+      d_compute_cutcell_index_data = true;
+      d_compute_cutcell_index_data =
+         ebdb->getBoolWithDefault("compute_cutcell_index_data",
+            d_compute_cutcell_index_data);
+   }
+
+   d_compute_boundary_node_data = false;
+   d_compute_boundary_node_data =
+      ebdb->getBoolWithDefault("compute_boundary_node_data",
+         d_compute_boundary_node_data);
+
+   /*
+    * If boundary node data is to be used, specify that storage should
+    * be allocated for it in the CutCell class.
+    */
+   if (d_compute_boundary_node_data) {
+      CutCell::enableBoundaryNodeStorage();
+   }
+
+   // Note: Currently the boundary node stuff only works in 2D.
+   if ((dim == tbox::Dimension(3)) && d_compute_boundary_node_data) {
+      TBOX_ERROR(
+         d_object_name << ": Boundary nodes not working yet in 3D"
+         <<
+         "\nPlease set 'compute_boundary_node_data' in input"
+         << "to FALSE." << std::endl);
+   }
+
+   // Cannot compute boundary node data if compute_areas_and_normal is
+   // turned off.
+   if (!d_compute_areas_and_normal && d_compute_boundary_node_data) {
+      TBOX_ERROR(
+         d_object_name << ": Cannot compute boundary node data"
+         <<
+         "\nif 'compute_areas_and_normal' is FALSE.  Please"
+         <<
+         "\nset 'compute_boundary_node_data' to FALSE."
+         << std::endl);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Read data from restart.                                               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+EmbeddedBoundaryGeometry::getFromRestart()
+{
+   const tbox::Dimension& dim(d_grid_geometry->getDim());
+
+   tbox::Pointer<tbox::Database> root_db =
+      tbox::RestartManager::getManager()->getRootDatabase();
+
+   tbox::Pointer<tbox::Database> restart_db;
+   if (root_db->isDatabase(d_object_name)) {
+      restart_db = root_db->getDatabase(d_object_name);
+   } else {
+      TBOX_ERROR("Restart database corresponding to "
+         << d_object_name << " not found in restart file.");
+   }
+
+   int ver = restart_db->getInteger("APPU_EMBEDDED_BOUNDARY_GEOMETRY_VERSION");
+   if (ver != APPU_EMBEDDED_BOUNDARY_GEOMETRY_VERSION) {
+      TBOX_ERROR(
+         d_object_name << ":  "
+         <<
+         "Restart file version different than class version.");
+   }
+
+   d_flow_type = static_cast<char>(restart_db->getInteger("d_flow_type"));
+   tbox::Array<int> tmp_array = restart_db->getIntegerArray("d_ebdry_nghosts");
+   for (int i = 0; i < dim.getValue(); i++) {
+      d_ebdry_nghosts(i) = tmp_array[i];
+   }
+
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/EmbeddedBoundaryGeometry.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/EmbeddedBoundaryGeometry.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,878 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Construction and management of embedded boundary data
+ *                on an AMR hierarchy. 
+ *
+ ************************************************************************/
+
+#ifndef included_appu_EmbeddedBoundaryGeometry
+#define included_appu_EmbeddedBoundaryGeometry
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/appu/EmbeddedBoundaryDefines.h"
+#include "SAMRAI/appu/EmbeddedBoundaryShape.h"
+#include "SAMRAI/appu/ElevenPatchInterface.h"
+#include "SAMRAI/appu/CutCell.h"
+#include "SAMRAI/appu/CubesPatchInterface.h"
+#include "SAMRAI/appu/VisItDataWriter.h"
+#include "SAMRAI/appu/VisMaterialsDataStrategy.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/pdat/CellGeometry.h"
+#include "SAMRAI/pdat/IndexVariable.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "SAMRAI/xfer/RefineAlgorithm.h"
+#include "SAMRAI/xfer/RefinePatchStrategy.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/tbox/Serializable.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace appu {
+
+/*!
+ * @brief Class EmbeddedBoundaryGeometry provides embedded boundary mesh
+ * construction, storage, and management on an AMR hierarchy.
+ *
+ * The embedded boundary may be constructed from a set of analytic shapes
+ * supplied through input.  The following outlines the steps required:
+ *
+ * 1. Construct an EmbeddedBoundaryGeometry object, supplying the input file
+ *    that contains the shape entries, a pointer to the Cartesian grid
+ *    geometry, and the desired number of ghosts to be used in defining
+ *    the embedded boundary:
+ *
+ *    \verbatim
+ *    EmbeddedBoundaryGeometry* eb_geom =
+ *       new EmbeddedBoundaryGeometry("EmbeddedBoundaryGeometry",
+ *                                     input_db->getDatabase("EBdryGeometry"),
+ *                                     grid_geometry,
+ *                                     nghosts);
+ *    \endverbatim
+ *
+ *    Note:  The cart_grid_geometry argument is optional and may be supplied
+ *           later using the "setGridGeometry()" method.  However, it must
+ *           be set before the "buildEmbeddedBoundaryOnLevel()" is called.
+ *           The nghosts argument is also optional and is set to zero by
+ *           default.
+ *
+ * 2. Build the embedded boundary on the levels of the hierarchy:
+ *
+ *    \verbatim
+ *    Pointer<PatchLevel<DIM> > level = hierarchy->getPatchLevel(ln);
+ *    eb_geom->buildEmbeddedBoundaryOnLevel(level);
+ *    \endverbatim
+ *
+ *    Note: It is also possible to pass in a hierarchy and an old level
+ *          as arguments.  If supplied, this information can be used to
+ *          accelerate construction of the boundary on the supplied level.
+ *
+ * 3. Access information about the embedded boundary from patches:
+ *
+ *    - The "cell flag" identifies whether a cell is cut, solid, or flow
+ *    - The "node flag" identifies nodes as inside, outside, boundary
+ *      (first node just inside solid boundary), or on-boundary (within
+ *      a specified distance from the solid boundary).
+ *    - The "volume fraction" will be 0.0 for solid cells, 1.0 for flow
+ *      cells, and somewhere in-between for cut cells
+ *    - The list of "cut cells" holds information about the normal, face
+ *      areas, etc. on specific cells that are cut.
+ *
+ *    \verbatim
+ *    int cell_flag_index = eb_geom->getCellFlagDataId();
+ *    int node_flag_index = eb_geom->getNodeInsideOutsideDataId();
+ *    int vol_frac_index = eb_geom->getCellVolumeDataId();
+ *    int cut_cell_index = eb_geom->getIndexCutCellDataId();
+ *
+ *    tbox::Pointer<CellData<int> > cell_flag_data =
+ *        patch->getPatchData(cell_flag_index);
+ *    tbox::Pointer<NodeData<int> > node_flag_data =
+ *        patch->getPatchData(node_flag_index);
+ *    tbox::Pointer<CellData<double> > vol_frac_data =
+ *        patch->getPatchData(vol_frac_index);
+ *    tbox::Pointer<IndexData<CutCell> > cut_cell_data =
+ *        patch->getPatchData(cut_cell_index);
+ *    \endverbatim
+ *
+ * Input parameters specify the list of shapes to be used to construct the
+ * boundary, the desired accuracy of the volume and area fraction
+ * computation, and information about whether write constructed embedded
+ * boundary information to file, or read from file.
+ *
+ * Required input keys and data types: NONE
+ *
+ * Optional input keys, data types, and defaults:
+ *
+ *    -\b verbose
+ *      boolean specifying whether to output information about the
+ *      embedded boundary, such as the number of cut cells, the
+ *      error in the volume calculation, etc. to the
+ *      log file. If no value is supplied in input, the default
+ *      is TRUE.
+ *
+ *    -\b max_subdivides
+ *      integer specifying the number of cell subdivides when
+ *      computing the volume and area fractions.  The larger
+ *      the number of subdivides, the more accurate the fraction
+ *      calculation will be, but the calculation will also be more
+ *      expensive.  If no value is supplied in input, a default of
+ *      0 is used.
+ *
+ *    -\b read_from_file
+ *      bool specifying whether to read the embedded boundary from file.
+ *      If true, it will read flag, volume fraction, and cut cell information
+ *      describing the embedded boundary from the specified HDF "dirname"
+ *      (specified below). If no value is supplied, the default is FALSE.
+ *
+ *    -\b write_to_file
+ *      bool specifying whether to write the embedded boundary to the
+ *      specified HDF "dirname" (specified below).  If true, it will write
+ *      flag, volume fraction, and cut cell information computed while
+ *      building the embedded boundary to the specified HDF "dirname"
+ *      (specified below). If no value is supplied, the default is FALSE.
+ *
+ *    -\b dirname
+ *      string specifying the name of the HDF directory to read/write
+ *      embedded boundary information.  Used with the "read_from_file"
+ *      and "write_to_file" options.
+ *
+ *    -\b compute_areas_and_normal
+ *      bool specifying whether to compute areas and normal information.
+ *      Some applications only need the volume fraction so it is not
+ *      necessary to invoke the extra cost of computing the areas and
+ *      normal.  If no value is supplied, the default is TRUE.
+ *
+ *    -\b compute_cutcell_index_data
+ *      bool specifying whether to compute a list of cut cells.  If false,
+ *      it will compute the cell flag and volume fraction information but
+ *      will not create and store the list of CutCell data structs.  If
+ *      no value is supplied, the default is TRUE.
+ *
+ *    -\b compute_boundary_node_data
+ *      bool specifying whether to mark nodes that are just inside the
+ *      geometry as BOUNDARY nodes, and to compute the centroid of the
+ *      wetted cut area (i.e. the "front area") of the cut cells.  This
+ *      information may be needed for node-based finite difference or
+ *      finite element computations of the embedded boundary. If
+ *      no value is supplied, the default is TRUE.
+ *
+ *    -\b use_recursive_algs
+ *      bool specifying whether to use a recursive algorithm to compute
+ *      volume and area fractions.  If true, it volume and area fractions
+ *      are computed by recursively subdividing the cell until the max
+ *      number of subdivides is reached.  If false, it will apply the max
+ *      subdivides to divide the cell into a (potentially large) array of
+ *      subcells.  Algorithmically, the recursive algorithm has fewer
+ *      operations but the non-recursive algorithm may be more computationally
+ *      efficient because it can do array-based operations.  If
+ *      no value is supplied, the default is TRUE.
+ *
+ *    -\b Shapes
+ *      sub-database that specifies information about the analytic
+ *      shapes used to construct an embedded boundary.  See the
+ *      EmbeddedBoundaryShapeSphere and EmbeddedBoundaryShapePolygon class
+ *      headers for information on the inputs required.
+ *
+ *    -\b CubesPatchInterface
+ *      sub-database for the Cubes interface, a cut-cell mesh generator
+ *      from NASA Ames.  See the CubesPatchInterface class header for
+ *      information about the required inputs.
+ *
+ *
+ * The following represents a sample input entry:
+ *
+ * \verbatim
+ *  EmbeddedBoundaryGeometry{
+ *     max_subdivides = 2
+ *     read_from_file  = FALSE
+ *     write_to_file   = FALSE
+ *     dirname         = "eb_grid"
+ *     compute_areas_and_normal   = TRUE
+ *     compute_boundary_node_data = FALSE
+ *     use_recursive_algs         = FALSE
+ *
+ *     Shapes {
+ *        Shape1 {
+ *           type = "POLYGON"
+ *           vertices {
+ *              v1 = 1.0 , 1.0
+ *              v2 = 1.5 , .5
+ *              v3 = 2.0 , 1.75
+ *              v4 = 1.5 , 4.5
+ *              v5 = .5 , 2.0
+ *           }
+ *           height = 5.0 // only used for 3D
+ *        }
+ *        Shape2 {
+ *           type = "SPHERE"
+ *           center = 65., 50.
+ *           radius = 20.
+ *        }
+ *     }
+ *  }
+ *  \endverbatim
+ *
+ * Note: Each shape has its own specific set of inputs.  See the
+ *       individual shapes for information about input requirements.
+ *
+ * @see appu::EmbeddedBoundaryShapeSphere
+ * @see appu::EmbeddedBoundaryShapePolygon
+ * @see appu::CubesPatchInterface
+ * @see appu::ElevenPatchInterface
+ * @see appu::CutCell
+ */
+
+class EmbeddedBoundaryGeometry:
+   public appu::VisMaterialsDataStrategy,
+   public xfer::RefinePatchStrategy,
+   public tbox::Serializable
+{
+public:
+   /*!
+    * Enumerated type for the different cell classifications.
+    *
+    * - \b SOLID          {Cell is located in the "solid" region.}
+    * - \b CUT            {Cell is cut, meaning a CutCell data
+    *                      structure will be maintained at this cell.}
+    * - \b BORDER         {Cell neighbors a cut cell, in the "flow" region.}
+    * - \b FLOW           {Cell is located in the "flow" region.}
+    */
+   enum CELL_TYPE { SOLID = EmbeddedBoundaryDefines::SOLID,
+                    CUT = EmbeddedBoundaryDefines::CUT,
+                    BORDER = EmbeddedBoundaryDefines::BORDER,
+                    FLOW = EmbeddedBoundaryDefines::FLOW };
+
+   /*!
+    * Enumerated type for inside/outside node classification.
+    *
+    * - \b INSIDE         {Node is located "inside" the prescribed geometry.}
+    * - \b OUTSIDE        {Node is outside the geometry.}
+    * - \b BOUNDARY       {Node is on the boundary of the geometry.  That is
+    *                      it is the first one "inside" the geometry.}
+    * - \b ONBOUNDARY     {Node is located exactly on the boundary of the
+    *                      geometry (used to avoid divide-by-zero problems)
+    *                      in numerical operations at embedded boundary.}
+    */
+   enum NODE_TYPE { OUTSIDE = EmbeddedBoundaryDefines::OUTSIDE,
+                    INSIDE = EmbeddedBoundaryDefines::INSIDE,
+                    BOUNDARY = EmbeddedBoundaryDefines::BOUNDARY,
+                    ONBOUNDARY = EmbeddedBoundaryDefines::ONBOUNDARY };
+
+   /*!
+    * Constructor sets default values and reads data from input.
+    *
+    * @param object_name  Name of object.
+    * @param input_db     Input database.
+    * @param grid_geom    The grid geometry (e.g. cartesian) used
+    *                     in the problem.
+    * @param nghosts      Number of ghosts used to hold the embedded
+    *                     boundary.  If not supplied, defaults to 0.
+    *
+    * The grid_geom and nghosts may be NULL if the embedded
+    * boundary information is to be supplied by a file, either by restart
+    * or by other input such as CART3D.  If the embedded boundary is to
+    * be constructed using analytic shapes in SAMRAI, the input_db and
+    * and grid_geom arguments must be supplied and may not be NULL.
+    */
+   EmbeddedBoundaryGeometry(
+      const std::string& object_name,
+      tbox::Pointer<tbox::Database> input_db,
+      const tbox::Pointer<geom::CartesianGridGeometry> grid_geom,
+      const hier::IntVector& nghosts);
+
+   /*
+    * Constructor with defaults for input_db, grid_geom and nghosts.
+    */
+   EmbeddedBoundaryGeometry(
+      const std::string& object_name,
+      tbox::Pointer<tbox::Database> input_db =
+         tbox::Pointer<tbox::Database>(
+            NULL),
+      const tbox::Pointer<geom::CartesianGridGeometry> grid_geom =
+         tbox::Pointer<geom::CartesianGridGeometry>(NULL));
+
+   /*!
+    * Destructor deallocates data describing and unregisters the
+    * object with the restart manager if previously registered.
+    */
+   ~EmbeddedBoundaryGeometry();
+
+   /*!
+    * Build an embedded boundary by forming the set of cut cells, extend
+    * them to appropriately apply the physical boundary conditions, and
+    * lastly compute the surrounding volumes for mass correction.
+    *
+    * Depending on the arguments supplied, this method may be used in
+    * one of two ways.  The first, taking only the level as an argument,
+    * performs an exhaustive search of all cells on the level
+    * to find the cut cells and classify the cells as inside or outside.
+    * The second, taking as additional arguments a hierarchy, coarser_level,
+    * and possibly old_level, performs the same function but uses the
+    * information on the coarser and old levels to narrow the search for
+    * cut cells, making it considerably faster.  Generally, the first method
+    * is used for the coarsest level only and the second is used for all
+    * subsequent finer levels.
+    *
+    * @param level Patch level on which embedded boundary is to be
+    *              constructed.
+    * @param hierarchy Patch hierarchy of the level.  Required if the
+    *                  level supplied in the first argument is in the
+    *                  hierarchy and is not the coarsest level.
+    * @param old_level Patch level which holds "old" embedded boundary
+    *                  data (not required).  Use this if regridding
+    *                  and you have an embedded boundary at the old
+    *                  level to speed construction of the boundary on
+    *                  the new level.
+    */
+   void
+   buildEmbeddedBoundaryOnLevel(
+      const tbox::Pointer<hier::PatchLevel> level,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy =
+         tbox::Pointer<hier::PatchHierarchy>(
+            NULL),
+      const tbox::Pointer<hier::PatchLevel> old_level =
+         tbox::Pointer<hier::PatchLevel>(NULL));
+
+   /*!
+    * Tag nodes as being inside or outside the geometry.  Some applications
+    * only require this knowledge and do not use need the volume/area
+    * fraction information for cut cells.
+    *
+    * @param level Patch level where tagging takes place.
+    */
+   void
+   tagInsideOutsideNodesOnLevel(
+      const tbox::Pointer<hier::PatchLevel> level);
+
+   /*!
+    * Register a VisIt data writer so this class will write
+    * plot files that may be postprocessed with the VisIt
+    * visualization tool.
+    *
+    * @param visit_writer    VisIt data writer
+    */
+#ifdef HAVE_HDF5
+   void
+   registerVisItDataWriter(
+      tbox::Pointer<appu::VisItDataWriter> visit_writer);
+#endif
+
+   /*!
+    * Return the descriptor index for the CellData<int> patch data
+    * that holds the integer flag at each cell, identifying it as
+    * being solid, cut, boundary, or flow.
+    */
+   int
+   getCellFlagDataId() const;
+
+   /*!
+    * Return the descriptor index for the CellData<double> patch data
+    * that holds the cell volume fraction.
+    */
+   int
+   getCellVolumeDataId() const;
+
+   /*!
+    * Return the descriptor index for the IndexData<CutCell> patch
+    * data that holds the list of embedded boundary cells on the patch.
+    */
+   int
+   getIndexCutCellDataId() const;
+
+   /*!
+    * Return the descriptor index for the NodeData<int> patch
+    * data that specifies a cell as being inside or outside the geometry.
+    */
+   int
+   getNodeInsideOutsideDataId() const;
+
+   /*!
+    * Compute the total volume, which is the sum of the volume fractions,
+    * on the supplied level.
+    */
+   double
+   computeTotalVolumeOnLevel(
+      const tbox::Pointer<hier::PatchLevel> level);
+
+   /*!
+    * Set the grid geometry, if it was not supplied when the object
+    * was constructed.
+    */
+   void
+   setGridGeometry(
+      const tbox::Pointer<geom::CartesianGridGeometry> grid_geom);
+
+   /*!
+    * Write embedded boundary information - cell flag and cut cell
+    * information - to supplied directory.   Files of the form
+    * "ebmesh-l<ln>-p<pid>.hdf", where ln is the level number
+    * and pid is the processor number, will be written to the directory.
+    */
+   void
+   writeLevelEmbeddedBoundaryDataToFile(
+      const tbox::Pointer<hier::PatchLevel> level,
+      const std::string& dirname) const;
+
+   ///
+   ///  The following routine:
+   ///
+   ///      packMaterialFractionsIntoDoubleBuffer()
+   ///
+   ///  is a concrete implementation of function declared in the
+   ///  appu::VisMaterialsDataStrategy abstract base class.
+   ///
+
+   /*!
+    * Put volume data located on the patch into the double buffer over
+    * the specified region.
+    *
+    * @param dbuffer   double buffer into which materials data is packed.
+    * @param patch     supplied patch on which materials data is defined
+    * @param region    region over which data is packed
+    * @param material_name    name of the material
+    */
+   int
+   packMaterialFractionsIntoDoubleBuffer(
+      double* dbuffer,
+      const hier::Patch& patch,
+      const hier::Box& region,
+      const std::string& material_name) const;
+
+   ///
+   ///  The following routines:
+   ///
+   ///      setPhysicalBoundaryConditions(),
+   ///      getRefineOpStencilWidth(),
+   ///      postprocessRefine()
+   ///
+   ///  are concrete implementations of functions declared in the
+   ///  xfer::RefinePatchStrategy abstract base class.
+   ///
+
+   /*!
+    * Set the data in ghost cells corresponding to physical boundary
+    * conditions.  Specific boundary conditions are determined by
+    * information specified in input file and numerical routines.
+    */
+   void
+   setPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const double fill_time,
+      const hier::IntVector&
+      ghost_width_to_fill);
+
+   /*!
+    * Perform user-defined refining operations.  This member function
+    * is called before the other refining operators.  For this class,
+    * no preprocessing is needed for the refine operators so it is
+    * setup to do nothing.
+    */
+   virtual void preprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio)
+   {
+      (void)fine;
+      (void)coarse;
+      (void)fine_box;
+      (void)ratio;
+   }
+
+   /*!
+    * Postprocess data after the refinement operator is applied.  For
+    * the embedded boundary data, refining involves two steps;  First,
+    * refine the "flag" data, which will designate on the fine level
+    * where the boundary exists;  Second, on each fine cell that is flagged
+    * to possibly contain the boundary, go through and determine whether
+    * the cell is indeed cut by the boundary and adjust the volume, flag,
+    * and boundary cell data on the fine level as necessary.  This method
+    * invokes step 2 of this refine operation.
+    */
+   virtual void
+   postprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio);
+
+   /*!
+    * Return maximum stencil width needed for user-defined
+    * data interpolation operations.  Default is to return
+    * zero, assuming no user-defined operations provided.
+    */
+   virtual hier::IntVector
+   getRefineOpStencilWidth() const;
+
+   ///
+   ///  The following routine:
+   ///
+   ///      putToDatabase()
+   ///
+   ///  is a concrete implementation of a function declared in the
+   ///  tbox::Serializable abstract base class.
+   ///
+   void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> db);
+
+private:
+   /*
+    * Common ctor initialization.
+    */
+
+   void
+   initialize(
+      tbox::Pointer<tbox::Database> input_db);
+
+   /*
+    * Initialize variables & communication schedules used to construct
+    * the embedded boundary.  The supplied number of ghosts specifies
+    * the ghost border over which the embedded boundary will be stored.
+    * This can vary depending on the needs of the application.  The
+    * variables are registered with the supplied Visit or Vizamrai
+    * data writer(s).
+    *
+    * @param nghosts Size of the ghost mapped_box_level over which the embedded
+    *                boundary will be stored.
+    */
+   void
+   initializeVariables(
+      const hier::IntVector& nghosts);
+
+   /*
+    * Use CUBES or ELEVEN packages to construct the embedded boundary
+    * on the level.
+    */
+   void
+   computeEmbeddedBoundaryOnLevelWithPackage(
+      const tbox::Pointer<hier::PatchLevel> level,
+      int& cut_cells_on_level);
+
+   /*
+    * Use internal SAMRAI routines to generate the embedded boundary
+    * on the supplied level using an exhaustive search to classify
+    * every cell on the level.
+    */
+   void
+   computeEmbeddedBoundaryOnLevel(
+      const tbox::Pointer<hier::PatchLevel> level,
+      int& cut_cells_on_level,
+      double& l2_volume_error,
+      double& l2_area_error,
+      double& max_volume_error,
+      double& max_area_error);
+
+   /*
+    * Compute volume and area fraction, normals, etc. on the supplied
+    * cut cell.
+    */
+   void
+   calculateCutCellInformation(
+      appu::CutCell& cut_cell,
+      const double* lower,
+      const double* upper,
+      const double& fullcellvol,
+      const double* fullareas,
+      double& volume_error_estimate,
+      double& area_error_estimate);
+
+   /*
+    * Determine boundary nodes (those that lie immediately inside the
+    * boundary) and compute the centroid of the wetted surface of the
+    * cut (i.e. the "front area") of the cut cell.
+    */
+   void
+   calculateBoundaryNodeInformation(
+      appu::CutCell& cut_cell,
+      tbox::Pointer<pdat::NodeData<int> >& node_flag,
+      const double* lower,
+      const double* upper,
+      const double* dx);
+
+   /*
+    * Calculate the volume of cut-cell using a non-recursive algorithm.
+    * This method uses the same algorithm as the recursiveCalculateVolume()
+    * method but is implemented in a non-recursive way.  In practice, it
+    * uses slightly more memory but is computationally faster than the
+    * recursive version.
+    *
+    * The computed volume is returned and the error_estimate is a
+    * call-by-reference argument that is set inside the method.
+    */
+   double
+   calculateVolume(
+      const double* cell_lower,
+      const double* cell_upper,
+      double& error_estimate) const;
+
+   /*
+    * Calculate the volume of the cut-cell using a recursive algorithm.
+    * The cell is recursively sub-divided into smaller cells to identify
+    * the cut plane.  The volume and error estimate args are set inside
+    * the method.  The return value indicates if it has reached the
+    * maximum number of subdivides for the cell - return value is 0 if
+    * it has NOT reached max subdivides, 1 if it has.
+    */
+   int
+   recursiveCalculateVolume(
+      const double* cell_lower,
+      const double* cell_upper,
+      double& volume,
+      double& error_estimate,
+      int& subdivide_level) const;
+
+   /*
+    * Calculate face area using a non-recursive algorithm. This method
+    * uses the same algorithm as the recursiveCalculateArea()
+    * method but is implemented in a non-recursive way.  In practice, it
+    * uses slightly more memory but is computationally faster than the
+    * recursive version.
+    *
+    * The computed area is returned and the error_estimate is a
+    * call-by-reference argument that is set inside the method.
+    */
+   double
+   calculateArea(
+      const double* cell_lower,
+      const double* cell_upper,
+      const int face,
+      double& error_estimate) const;
+
+   /*
+    * Calculate face area using a recursive algorithm.  The face is
+    * recursively subdivided into smaller faces  The area and error
+    * estimate args are set inside the method.  The return value indicates
+    * if it has reached the maximum number of subdivides for the cell.
+    * The return value is 0 if it has NOT reached max subdivides, 1 if it has.
+    */
+   int
+   recursiveCalculateArea(
+      const double* cell_lower,
+      const double* cell_upper,
+      const int face,
+      double& area,
+      double& error_estimate,
+      int& subdivide_level) const;
+
+   /*
+    * Classify cell as being FLOW, SOLID, or CUT.
+    */
+   int
+   classifyCell(
+      const double* lower,
+      const double* upper) const;
+
+   /*
+    * Invoke refine algorithm to refine the embedded boundary definition
+    * from coarser.
+    */
+   void
+   refineEmbeddedBoundary(
+      const tbox::Pointer<hier::PatchLevel> level,
+      const tbox::Pointer<hier::PatchLevel> old_level =
+         tbox::Pointer<hier::PatchLevel>(
+            NULL),
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy =
+         tbox::Pointer<hier::PatchHierarchy>(NULL));
+
+   /*!
+    * Set the embedded boundary cells on physical boundarys according
+    * to the specified boundary conditions.
+    */
+   void
+   setEmbeddedBoundaryAtPhysicalBoundaries(
+      const tbox::Pointer<hier::PatchLevel> level);
+
+   /*
+    * Set the level ratio information needed to construct the embedded
+    * boundary.  This method should be invoked each time a new level
+    * is added to the hierarchy which may have an embedded boundary
+    * on it.
+    */
+   void
+   setLevelRatioInformation(
+      const tbox::Pointer<hier::PatchLevel> level);
+
+   /*
+    * Set node inside/outside array from SAMRAI analytic shapes.
+    */
+   void
+   doNativeShapeInsideOutside(
+      const int* nx,
+      const double* dx,
+      const double* origin,
+      int* node_flag) const;
+
+   /*!
+    * Read embedded boundary information - cell flag and cut cell
+    * information - from supplied directory.  Files of the form
+    * "ebmesh-l<ln>-p<pid>.hdf", where ln is the level number
+    * and pid is the processor number, should exist in the directory.
+    * If they don't exist, an error will be thrown.
+    */
+   void
+   readLevelEmbeddedBoundaryDataFromFile(
+      const tbox::Pointer<hier::PatchLevel> level,
+      const std::string& dirname) const;
+
+   /*
+    * These private member functions read data from input and restart.
+    * When beginning a run from a restart file, all data members are read
+    * from the restart file.  If the boolean flag is true when reading
+    * from input, some restart values may be overridden by those in the
+    * input file.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db,
+      const bool is_from_restart);
+
+   void
+   getFromRestart();
+
+   /*
+    * Name used for this object.
+    */
+   std::string d_object_name;
+
+   /*
+    * Grid geometry which embedded boundary is applied.
+    */
+   tbox::Pointer<geom::CartesianGridGeometry> d_grid_geometry;
+
+   /*
+    * Visit and Vizamrai data writers.
+    */
+#ifdef HAVE_HDF5
+   tbox::Pointer<appu::VisItDataWriter> d_visit_writer;
+#endif
+
+   /*
+    * Whether to write information about the embedded boundary construction
+    * to log file.
+    */
+   bool d_verbose;
+
+   /*
+    * INTERNAL or EXTERNAL flow.
+    */
+   std::string d_flow_type;
+
+   /*
+    * Number of ghosts used for the embedded boundary.
+    */
+   hier::IntVector d_ebdry_nghosts;
+
+   /*
+    * Data members that defined the embedded Boundary.
+    */
+   tbox::Pointer<pdat::IndexVariable<appu::CutCell,
+                                     pdat::CellGeometry> > d_ebdry_var;
+   tbox::Pointer<pdat::CellVariable<int> > d_cell_flag_var;
+   tbox::Pointer<pdat::CellVariable<double> > d_cell_vol_var;
+   tbox::Pointer<pdat::NodeVariable<int> > d_node_flag_var;
+
+   int d_ebdry_data_id;
+   int d_ebdry_scratch_id;
+   int d_cell_flag_data_id;
+   int d_cell_flag_scratch_id;
+   int d_cell_vol_data_id;
+   int d_cell_vol_scratch_id;
+   int d_node_flag_data_id;
+
+   /*
+    * Refine algorithm and schedule to manage communication of embedded
+    * boundary data from coarse to fine levels.
+    */
+   tbox::Pointer<xfer::RefineAlgorithm> d_ebdry_refine_alg;
+
+   /*
+    * These should be provided by the gridding alg at some point.  We store
+    * them locally for the time being.
+    */
+   int d_max_levels;
+   tbox::Array<hier::IntVector> d_ratio_to_coarser;
+   tbox::Array<hier::IntVector> d_level_ratios;
+
+   /*
+    * Interfaces to outside packages that are used to define the
+    * embedded boundary.
+    */
+   bool d_use_cubes;
+   tbox::Pointer<appu::CubesPatchInterface> d_cubes_interface;
+
+   bool d_use_eleven_inside_outside;
+   bool d_use_eleven_boundary_node;
+   tbox::Pointer<ElevenPatchInterface> d_eleven_interface;
+
+   /*
+    * Array of native SAMRAI shapes used to define embedded boundary.
+    */
+   tbox::Array<tbox::Pointer<appu::EmbeddedBoundaryShape> > d_shapes;
+
+   /*
+    * Max number of subdivisions allowed for computing volume and area
+    * fractions.
+    */
+   int d_max_subdivides;
+
+   /*
+    * Bools specifying if we read/write EB data to/from file, and
+    * the directory name where the files are stored.
+    */
+   bool d_read_ebdry;
+   bool d_write_ebdry;
+   std::string d_ebdry_dirname;
+
+   /*
+    * Bools specifying if we should use recursive or non-recursive algorithms
+    * to compute volume and areas of the cut cells, and whether or not
+    * to compute the face areas and normal of the cut cell (some applications
+    * don't need this information.
+    */
+   bool d_use_recursive_algs;
+   bool d_compute_areas_and_normal;
+   bool d_compute_cutcell_index_data;
+   bool d_compute_boundary_node_data;
+
+   /*
+    * Boundary condition information.
+    */
+   tbox::Array<int> d_node_bdry_cond;
+   tbox::Array<int> d_edge_bdry_cond;
+   tbox::Array<int> d_face_bdry_cond;
+
+   /*
+    * Timers interspersed throughout the class.
+    */
+   static tbox::Pointer<tbox::Timer> t_compute_eb;
+   static tbox::Pointer<tbox::Timer> t_calc_node_inout;
+   static tbox::Pointer<tbox::Timer> t_calc_volume;
+   static tbox::Pointer<tbox::Timer> t_calc_area;
+   static tbox::Pointer<tbox::Timer> t_calc_boundary_node;
+   static tbox::Pointer<tbox::Timer> t_eb_phys_bdry;
+   static tbox::Pointer<tbox::Timer> t_read_write_eb;
+
+   /*
+    * Used to record step count, for timing and statistics reporting.
+    */
+   int d_step_count;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/EmbeddedBoundaryShape.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/EmbeddedBoundaryShape.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,73 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Base class for analytic embedded Boundaries 
+ *
+ ************************************************************************/
+
+#ifndef included_appu_EmbeddedBoundaryShape_C
+#define included_appu_EmbeddedBoundaryShape_C
+
+#include "SAMRAI/appu/EmbeddedBoundaryShape.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace appu {
+
+/*
+ *******************************************************************
+ *
+ *  Empty constructor and destructor
+ *
+ *******************************************************************
+ */
+EmbeddedBoundaryShape::EmbeddedBoundaryShape()
+{
+}
+
+EmbeddedBoundaryShape::~EmbeddedBoundaryShape()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default virtual function implementations.                             *
+ *                                                                       *
+ *************************************************************************
+ */
+bool
+EmbeddedBoundaryShape::isInside(
+   const double* xyz) const
+{
+   NULL_USE(xyz);
+   TBOX_ERROR("EmbeddedBoundaryShape::isInside(): "
+      << "\nNo implementation provided for this shape."
+      << std::endl);
+   return false;
+}
+
+void
+EmbeddedBoundaryShape::isInside(
+   const int* nx,
+   const double* dx,
+   const double* origin,
+   int* inout) const
+{
+   NULL_USE(nx);
+   NULL_USE(dx);
+   NULL_USE(origin);
+   NULL_USE(inout);
+
+   TBOX_ERROR("EmbeddedBoundaryShape::isInside(): "
+      << "\nNo implementation provided for this shape. "
+      << std::endl);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/EmbeddedBoundaryShape.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/EmbeddedBoundaryShape.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Base class for analytic embedded boundaries 
+ *
+ ************************************************************************/
+
+#ifndef included_appu_EmbeddedBoundaryShape
+#define included_appu_EmbeddedBoundaryShape
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/IOStream.h"
+#include "SAMRAI/tbox/Array.h"
+
+namespace SAMRAI {
+namespace appu {
+
+/*!
+ * @brief An abstract base class from which the different embedded boundary
+ * analytic shapes used in SAMRAI are derived.  It specifies virtual
+ * implementations of several functions used to define an analytic
+ * embedded boundary shape.
+ */
+class EmbeddedBoundaryShape
+{
+public:
+   /*!
+    * The constructor and destructor essentially do nothing.
+    */
+   EmbeddedBoundaryShape();
+
+   virtual ~EmbeddedBoundaryShape();
+
+   /*!
+    * Virtual implementation of the isInside() method.  The class
+    * that inherets from this base class must provide an implementation of
+    * this function, specifying whether the supplied xyz coordinates are
+    * inside or outside of the particular shape being defined.
+    *
+    * @param xyz double array dimension [tbox::Dimension::MAXIMUM_DIMENSION_VALUE], specifying the location of
+    *            a single point.
+    */
+   virtual bool
+   isInside(
+      const double* xyz) const;
+
+   /*!
+    * Same implementation as above, but instead takes an array of points.
+    * Unlike the method above, which returns a boolean for a single point,
+    * this method sets an integer for any array of points layed out in a
+    * patch.  The "nx" argument specifies the dimension of the array of
+    * points in DIM directions - it should be an int dimensioned
+    * [tbox::Dimension::MAXIMUM_DIMENSION_VALUE].  The "dx" argument specifies the grid spacing in each
+    * direction - it should be a double dimensioned DIM.  The "origin"
+    * argument specifies the origin, or lower corner of the patch -
+    * it also should be a double dimensioned DIM.  From these three
+    * pieces of information, the coordinates of all points on the
+    * patch can be computed.
+    *
+    * The "inout" argument is the returned integer array which
+    * will contain a definition of whether each point on the patch is
+    * inside (1) or outside (0) the geometry.
+    *
+    * @param nx integer array [tbox::Dimension::MAXIMUM_DIMENSION_VALUE] specifying number of points in each dir
+    * @param dx double array [tbox::Dimension::MAXIMUM_DIMENSION_VALUE] specifying spacing of points in each dir
+    * @param origin double array [tbox::Dimension::MAXIMUM_DIMENSION_VALUE] specifying origin of lower corner
+    * @param inout int array dimensioned the total number of points
+    *        (i.e. nx[0]*nx[1]*nx[2]).  This is an OUTPUT quantity.
+    */
+   virtual void
+   isInside(
+      const int* nx,
+      const double* dx,
+      const double* origin,
+      int* inout) const;
+
+   /*!
+    * Dump data to supplied stream.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os) const = 0;
+
+private:
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/EmbeddedBoundaryShapePolygon.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/EmbeddedBoundaryShapePolygon.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,166 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Polygon embedded boundary shape 
+ *
+ ************************************************************************/
+
+#ifndef included_EmbeddedBoundaryShapePolygon_C
+#define included_EmbeddedBoundaryShapePolygon_C
+
+#include "SAMRAI/appu/EmbeddedBoundaryShapePolygon.h"
+
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/appu/EmbeddedBoundaryShapePolygon.I"
+#endif
+
+namespace SAMRAI {
+namespace appu {
+
+EmbeddedBoundaryShapePolygon::EmbeddedBoundaryShapePolygon(
+   const tbox::Dimension& dim,
+   const std::string& object_name,
+   tbox::Pointer<tbox::Database> input_db):
+   d_dim(dim),
+   d_object_name(object_name),
+   d_height(tbox::MathUtilities<double>::getSignalingNaN()),
+   d_eps(tbox::MathUtilities<double>::getEpsilon())
+{
+   getFromInput(input_db);
+}
+
+EmbeddedBoundaryShapePolygon::~EmbeddedBoundaryShapePolygon()
+{
+}
+
+void EmbeddedBoundaryShapePolygon::printClassData(
+   std::ostream& os) const
+{
+
+   os << std::endl;
+   os << "d_object_name = " << d_object_name << std::endl;
+
+   os << "d_eps = " << d_eps << std::endl;
+   os << "d_num_vertices = " << d_num_vertices << std::endl;
+
+   for (int j = 0; j < d_num_vertices; j++) {
+
+      os << "d_vx[" << j << "] = " << d_vx[j] << "\t"
+      << "d_vy[" << j << "] = " << d_vy[j] << std::endl;
+   }
+
+   if (d_dim == tbox::Dimension(3)) {
+      os << "height (z) = " << d_height << std::endl;
+   }
+
+   os << std::endl;
+}
+
+void EmbeddedBoundaryShapePolygon::getFromInput(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   /*
+    * Read in coordinates of the nodes of the polygon in X,Y space.
+    */
+   tbox::Pointer<tbox::Database> vertices_db = db->getDatabase("vertices");
+   tbox::Array<std::string> vertices = vertices_db->getAllKeys();
+
+   d_num_vertices = vertices.getSize();
+
+   d_vx.resizeArray(d_num_vertices);
+   d_vy.resizeArray(d_num_vertices);
+
+   int i = 0;
+
+   if (d_num_vertices < 3) {
+      TBOX_ERROR(
+         d_object_name << ": "
+         <<
+         "\n You must supply at least 3 vertices to define "
+         << "a polygon." << std::endl);
+   }
+
+   tbox::Array<double> vertices_temp;
+   for (i = 0; i < d_num_vertices; i++) {
+      std::string name = vertices[i];
+
+      vertices_temp = vertices_db->getDoubleArray(name);
+
+      if (vertices_temp.getSize() < 2) {
+         TBOX_ERROR(
+            d_object_name << ": "
+            << "\ninsufficient entries for 'vertices[ "
+            << i << "]'"
+            << "\n   required size = " << d_dim
+            << "\n   supplied size = "
+            << vertices_temp.getSize()
+            << std::endl);
+      }
+
+      d_vx[i] = vertices_temp[0];
+      d_vy[i] = vertices_temp[1];
+   }
+
+   // We check to make sure that the poly is convex.
+   int ip1, ip2;
+   bool counter_clockwise = false;
+   bool clockwise = false;
+   for (i = 0; i < d_num_vertices; i++) {
+
+      double v1[3], v2[3], cp[3];
+
+      ip1 = (i + 1) % d_num_vertices;
+      ip2 = (i + 2) % d_num_vertices;
+
+      v1[0] = d_vx[ip1] - d_vx[i];
+      v1[1] = d_vy[ip1] - d_vy[i];
+      v1[2] = 0.;
+      v2[0] = d_vx[ip2] - d_vx[ip1];
+      v2[1] = d_vy[ip2] - d_vy[ip1];
+      v2[2] = 0.;
+
+      crossProduct(cp, v1, v2);
+      if (cp[2] > 0)
+         counter_clockwise = true;
+      else
+         clockwise = true;
+
+      if (counter_clockwise && clockwise) // Polygon must not be convex
+         TBOX_ERROR(d_object_name << ": "
+                                  << "\nPolygon must be convex"
+                                  << "correct vertices in input file."
+                                  << std::endl);
+
+   }
+
+   if (d_dim == tbox::Dimension(3)) {
+      /*
+       * MUST supply a height in 3D.
+       */
+      if (db->keyExists("height")) {
+         d_height = db->getDouble("height");
+      } else {
+         TBOX_ERROR(
+            d_object_name << ": "
+            <<
+            "\n'height' entry not supplied - in 3D you must supply "
+            << "a height." << std::endl);
+      }
+   }
+
+   printClassData(tbox::plog);
+
+}
+
+}
+}
+#endif // included_EmbeddedBoundaryShapePolygon_C
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/EmbeddedBoundaryShapePolygon.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/EmbeddedBoundaryShapePolygon.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,201 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Polygon embedded boundary shape 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace appu {
+
+SAMRAI_INLINE_KEYWORD
+void EmbeddedBoundaryShapePolygon::crossProduct(
+   double a[3],
+   const double b[3],
+   const double c[3]) const
+{
+   a[0] = b[1] * c[2] - c[1] * b[2];
+   a[1] = b[2] * c[0] - c[2] * b[0];
+   a[2] = b[0] * c[1] - c[0] * b[1];
+}
+
+SAMRAI_INLINE_KEYWORD
+double EmbeddedBoundaryShapePolygon::dotProduct(
+   const double a[3],
+   const double b[3]) const
+{
+   return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
+}
+
+SAMRAI_INLINE_KEYWORD
+bool EmbeddedBoundaryShapePolygon::sameSide(
+   double p1[3],
+   double p2[3],
+   double a[3],
+   double b[3]) const
+{
+   double cp1[3], cp2[3], d;
+   double b_minus_a[3];
+   double p1_minus_a[3];
+   double p2_minus_a[3];
+   double dot1, dot2;
+
+   b_minus_a[0] = b[0] - a[0];
+   b_minus_a[1] = b[1] - a[1];
+   b_minus_a[2] = b[2] - a[2];
+
+   p1_minus_a[0] = p1[0] - a[0];
+   p1_minus_a[1] = p1[1] - a[1];
+   p1_minus_a[2] = p1[2] - a[2];
+
+   p2_minus_a[0] = p2[0] - a[0];
+   p2_minus_a[1] = p2[1] - a[1];
+   p2_minus_a[2] = p2[2] - a[2];
+
+   this->crossProduct(cp1, b_minus_a, p1_minus_a);
+   this->crossProduct(cp2, b_minus_a, p2_minus_a);
+   d = this->dotProduct(cp1, cp2);
+   dot1 = this->dotProduct(cp1, cp1);
+   dot2 = this->dotProduct(cp2, cp2);
+
+   if (d >= -1000.e0 * d_eps * (dot1 + dot2))
+      return true;
+   else
+      return false;
+
+}
+
+SAMRAI_INLINE_KEYWORD
+bool EmbeddedBoundaryShapePolygon::pointInPolygon(
+   tbox::Array<double> v_x,
+   tbox::Array<double> v_y,
+   double p_x,
+   double p_y) const
+{
+   double p[3];
+   double a[3];
+   double b[3];
+   double c[3];
+
+   p[0] = p_x;
+   p[1] = p_y;
+   p[2] = 0.;
+   for (int i = 0; i < d_num_vertices; i++) {
+      a[0] = v_x[i];
+      a[1] = v_y[i];
+      a[2] = 0.;
+
+      int ip1 = (i + 1) % d_num_vertices;
+      int ip2 = (i + 2) % d_num_vertices;
+      b[0] = v_x[ip1];
+      b[1] = v_y[ip1];
+      b[2] = 0.;
+      c[0] = v_x[ip2];
+      c[1] = v_y[ip2];
+      c[2] = 0.;
+
+      if (!sameSide(p, a, b, c))
+         return false;
+   }
+   return true;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool EmbeddedBoundaryShapePolygon::isInside(
+   const double* xyz) const
+{
+
+   bool below_height = true;
+   bool inside_poly = false;
+
+   /*
+    * Check if height z is less than d_height.  If not, no further checks
+    * are necessary.
+    */
+   if (d_dim == tbox::Dimension(3)) {
+      below_height = xyz[2] < d_height;
+   }
+
+   /*
+    * See if supplied point is inside or outside the polygon.
+    */
+   if (below_height) {
+      inside_poly = pointInPolygon(d_vx, d_vy, xyz[0], xyz[1]);
+   }
+
+   return inside_poly;
+
+}
+
+SAMRAI_INLINE_KEYWORD
+void EmbeddedBoundaryShapePolygon::isInside(
+   const int* nx,
+   const double* dx,
+   const double* origin,
+   int* inout) const
+{
+
+   /*
+    * See if a set of points are inside or outside the polygon.
+    */
+   int kstr = 0;
+   int jstr = 0;
+   int istr = 0;
+   int ijk;
+   double xyz[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   bool below_height;
+   bool inside_poly;
+
+   /*
+    * Initialize xyz to avoid uninitialized use.
+    */
+   for(int d = 0; d < tbox::Dimension::MAXIMUM_DIMENSION_VALUE; ++d) {
+      xyz[d] = 0.0;
+   }
+
+   /*
+    * Compute the node centered inout points
+    */
+   int khi = 1;
+   if (d_dim == tbox::Dimension(3)) {
+      khi = nx[2];
+   }
+   for (int kk = 0; kk < khi; kk++) {
+      kstr = kk * nx[1] * nx[0];
+      if (d_dim == tbox::Dimension(3)) {
+         xyz[d_dim.getValue()
+             - 1] = origin[d_dim.getValue() - 1] + dx[d_dim.getValue() - 1] * (double)kk;
+      }
+      for (int jj = 0; jj < nx[1]; jj++) {
+         jstr = jj * nx[0];
+         xyz[1] = origin[1] + dx[1] * (double)jj;
+         for (int ii = 0; ii < nx[0]; ii++) {
+            istr = ii;
+            xyz[0] = origin[0] + dx[0] * (double)ii;
+
+            below_height = true;
+            inside_poly = false;
+
+            if (d_dim == tbox::Dimension(3)) {
+               below_height = xyz[d_dim.getValue() - 1] < d_height;
+            }
+
+            if (below_height) {
+               inside_poly = pointInPolygon(d_vx, d_vy, xyz[0], xyz[1]);
+            }
+
+            ijk = kstr + jstr + istr;
+            if (inside_poly) {
+               inout[ijk] = EmbeddedBoundaryDefines::INSIDE;
+               inout[ijk] = 1;
+            }
+         }
+      }
+   }
+}
+
+} // namespace appu
+} // namespace SAMRAI
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/EmbeddedBoundaryShapePolygon.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/EmbeddedBoundaryShapePolygon.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,177 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Polygon embedded boundary shape 
+ *
+ ************************************************************************/
+
+#ifndef included_appu_EmbeddedBoundaryShapePolygon
+#define included_appu_EmbeddedBoundaryShapePolygon
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/appu/EmbeddedBoundaryDefines.h"
+#include "SAMRAI/appu/EmbeddedBoundaryShape.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace appu {
+
+/*!
+ * @brief Provides an analytic description of a convex polygon.
+ * It inherets from the EmbeddedBoundaryShape base class and provides a
+ * concrete implementation of the "isInside()" method, which specifies
+ * whether a cell is INSIDE the convex poly.
+ *
+ * The user must specify at least three coordinates that define the vertices
+ * the poly.  If the problem is 3D, a height must also be specified.  An
+ * example input entry would look like:
+ *
+ * \verbatim
+ *        Polygon1{
+ *           type = "POLYGON"
+ *           coords_1 = 1.0 , 1.0
+ *           coords_2 = 2.0 , 1.0
+ *           coords_3 = 2.0 , 2.0
+ *           coords_4 = 1.0 , 2.0
+ *           height = 8.0
+ *        }
+ * \endverbatim
+ *
+ */
+
+class EmbeddedBoundaryShapePolygon:public EmbeddedBoundaryShape
+{
+public:
+   /*!
+    * @param object_name name of object of this class
+    * @param input_db    the input database which contains radius and
+    *                    center specification.
+    */
+   EmbeddedBoundaryShapePolygon(
+      const tbox::Dimension& dim,
+      const std::string& object_name,
+      tbox::Pointer<tbox::Database> input_db);
+
+   /*!
+    * The destructor does nothing.
+    */
+   ~EmbeddedBoundaryShapePolygon();
+
+   /*!
+    * Concrete implementation of the isInside() method defined by the
+    * EmbeddedBoundaryShapeX base class.  This method indicates
+    * whether the supplied xyz coordinates are inside or outside of
+    * the polygon.
+    *
+    * @param xyz  double array[tbox::Dimension::MAXIMUM_DIMENSION_VALUE] specifying coordinates.
+    */
+   bool
+   isInside(
+      const double* xyz) const;
+
+   /*!
+    * Concrete implementation of the isInside() method defined by the
+    * EmbeddedBoundaryShapeX base class.  This method indicates
+    * whether the array of xyz coordinates are inside or outside of
+    * the polygon.
+    *
+    * @param nx integer array [tbox::Dimension::MAXIMUM_DIMENSION_VALUE] specifying number of points in each dir
+    * @param dx double array [tbox::Dimension::MAXIMUM_DIMENSION_VALUE] specifying spacing of points in each dir
+    * @param origin double array [tbox::Dimension::MAXIMUM_DIMENSION_VALUE] specifying origin of lower corner
+    * @param inout int array dimensioned the total number of points
+    *        (i.e. nx[0]*nx[1]*nx[2]).  This is an OUTPUT quantity.
+    */
+   void
+   isInside(
+      const int* nx,
+      const double* dx,
+      const double* origin,
+      int* inout) const;
+
+   /*!
+    * Dump data to supplied stream.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os) const;
+
+private:
+   /*!
+    * Read name, and vertex information from input.  The name is optional but
+    * at least three vertices must be specified by the input file.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db);
+
+   /*!
+    * Returns TRUE if points p1 and p2 are on the same side of line segment ab;
+    * FALSE otherwise.
+    */
+   bool sameSide(double p1[3], double p2[3],
+                 double a[3], double b[3]) const;
+
+   /*!
+    * Returns TRUE if a point p is within a convex polygon defined by vertices
+    * (v_x[i], * v_y[i]), i = 0..d_num_vertices-1; FALSE otherwise.
+    */
+   bool
+   pointInPolygon(
+      tbox::Array<double> v_x,
+      tbox::Array<double> v_y,
+      double p_x,
+      double p_y) const;
+
+   /*!
+    * This method computes the cross prodcut, A = B cross C.
+    */
+   void crossProduct(double a[3],
+                     const double b[3],
+                     const double c[3]) const;
+
+   /*!
+    * This method computes the dot product of A and B.
+    */
+   double
+   dotProduct(
+      const double a[3],
+      const double b[3]) const;
+
+   const tbox::Dimension d_dim;
+
+   std::string d_object_name;
+
+   /*
+    * Coordinates in X,Y space for the polygon, and height in Z.
+    */
+   double d_height;
+
+   /*
+    * Machine roundoff
+    */
+   double d_eps;
+
+   /*
+    * Arrays of x and y vertices respectively.
+    */
+   tbox::Array<double> d_vx;
+   tbox::Array<double> d_vy;
+
+   int d_num_vertices;
+
+};
+
+} // namespace appu
+} // namespace SAMRAI
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/appu/EmbeddedBoundaryShapePolygon.I"
+#endif
+
+#endif // included_EmbeddedBoundaryShapePolygon
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/EmbeddedBoundaryShapeSphere.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/EmbeddedBoundaryShapeSphere.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,75 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Sphere embedded boundary shape 
+ *
+ ************************************************************************/
+
+#ifndef included_appu_EmbeddedBoundaryShapeSphere_C
+#define included_appu_EmbeddedBoundaryShapeSphere_C
+
+#include "SAMRAI/appu/EmbeddedBoundaryShapeSphere.h"
+
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/appu/EmbeddedBoundaryShapeSphere.I"
+#endif
+
+namespace SAMRAI {
+namespace appu {
+
+EmbeddedBoundaryShapeSphere::EmbeddedBoundaryShapeSphere(
+   const tbox::Dimension& dim,
+   const std::string& object_name,
+   tbox::Pointer<tbox::Database> input_db):
+   d_dim(dim),
+   d_object_name(object_name),
+   d_radius(tbox::MathUtilities<double>::getSignalingNaN())
+{
+   tbox::MathUtilities<double>::setArrayToSignalingNaN(d_center, d_dim.getValue());
+
+   getFromInput(input_db);
+}
+
+EmbeddedBoundaryShapeSphere::~EmbeddedBoundaryShapeSphere()
+{
+}
+
+void
+EmbeddedBoundaryShapeSphere::printClassData(
+   std::ostream& os) const
+{
+   os << "d_object_name = " << d_object_name << std::endl;
+   os << "d_radius = " << d_radius << std::endl;
+   for (int i = 0; i < d_dim.getValue(); i++) {
+      os << "d_center[" << i << "] = " << d_center[i] << std::endl;
+   }
+
+}
+
+void EmbeddedBoundaryShapeSphere::getFromInput(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   /*
+    * MUST supply a center and radius.
+    */
+   d_radius = db->getDouble("radius");
+
+   tbox::Array<double> temp_center;
+   temp_center = db->getDoubleArray("center");
+   for (int i = 0; i < d_dim.getValue(); i++) {
+      d_center[i] = temp_center[i];
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/EmbeddedBoundaryShapeSphere.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/EmbeddedBoundaryShapeSphere.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,96 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Sphere embedded boundary shape 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/MathUtilities.h"
+
+namespace SAMRAI {
+namespace appu {
+
+SAMRAI_INLINE_KEYWORD
+bool EmbeddedBoundaryShapeSphere::isInside(
+   const double* xyz) const
+{
+   /*
+    * Compare the radius of the point from center to the radius
+    * of the ball from center.
+    */
+   double rad_squared = 0.;
+   for (int i = 0; i < d_dim.getValue(); i++) {
+      rad_squared += (xyz[i] - d_center[i]) * (xyz[i] - d_center[i]);
+   }
+   return (d_radius * d_radius - rad_squared) > 0.;
+}
+
+/*
+ * Array based version of isInside - set the node-centered "inout"
+ * array on a mesh defined by the provided nx, dx, and origin.
+ */
+SAMRAI_INLINE_KEYWORD
+void EmbeddedBoundaryShapeSphere::isInside(
+   const int* nx,
+   const double* dx,
+   const double* origin,
+   int* inout) const
+{
+   /*
+    * Compare the radius of the point from center to the radius
+    * of the ball from center.
+    */
+   int kstr = 0;
+   int jstr = 0;
+   int istr = 0;
+   int ijk;
+   double rad_diff;
+   double xyz[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   /*
+    * Compute the node centered inout points
+    */
+   int khi = 1;
+   if (d_dim == tbox::Dimension(3)) {
+      khi = nx[2];
+   }
+   for (int kk = 0; kk < khi; kk++) {
+      kstr = kk * nx[1] * nx[0];
+      if (d_dim == tbox::Dimension(3)) {
+         xyz[d_dim.getValue()
+             - 1] = origin[d_dim.getValue() - 1] + dx[d_dim.getValue() - 1] * (double)kk;
+      }
+      for (int jj = 0; jj < nx[1]; jj++) {
+         jstr = jj * nx[0];
+         xyz[1] = origin[1] + dx[1] * (double)jj;
+         for (int ii = 0; ii < nx[0]; ii++) {
+            istr = ii;
+            xyz[0] = origin[0] + dx[0] * (double)ii;
+
+            double rad_squared = 0.;
+            for (int d = 0; d < d_dim.getValue(); ++d) {
+               rad_squared +=
+                  (xyz[d] - d_center[d]) * (xyz[d] - d_center[d]);
+            }
+
+            ijk = kstr + jstr + istr;
+            rad_diff = d_radius * d_radius - rad_squared;
+
+            if (tbox::MathUtilities<double>::equalEps(rad_diff, 0.)) {
+               inout[ijk] = EmbeddedBoundaryDefines::ONBOUNDARY;
+            } else if (rad_diff > 0.) {
+               inout[ijk] = EmbeddedBoundaryDefines::INSIDE;
+            } else {
+               inout[ijk] = EmbeddedBoundaryDefines::OUTSIDE;
+            }
+         }
+      }
+   }
+
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/EmbeddedBoundaryShapeSphere.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/EmbeddedBoundaryShapeSphere.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,132 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Sphere embedded boundary shape 
+ *
+ ************************************************************************/
+
+#ifndef included_appu_EmbeddedBoundaryShapeSphere
+#define included_appu_EmbeddedBoundaryShapeSphere
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/appu/EmbeddedBoundaryShape.h"
+#include "SAMRAI/appu/EmbeddedBoundaryDefines.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace appu {
+
+/*!
+ * @brief Provides an analytic description of a sphere.  It inherets
+ * from the EmbeddedBoundaryShape base class and provides a concrete
+ * implementation of the "isInside()" method, which specifies whether a
+ * cell is INSIDE the sphere.
+ *
+ * The user must specify in the input a "center" and a "radius". An
+ * example input entry would look like:
+ *
+ * \verbatim
+ *        Shape1 {
+ *           type = "SPHERE"
+ *           center = 40.0 , 15.0, 15.0
+ *           radius = 5.0
+ *        }
+ *
+ * \endverbatim
+ *
+ */
+
+class EmbeddedBoundaryShapeSphere:public EmbeddedBoundaryShape
+{
+public:
+   /*!
+    * The constructor initializes center and radius to NaN.
+    *
+    * @param object_name name of object of this class
+    * @param input_db    the input database which contains radius and
+    *                    center specification.
+    */
+   EmbeddedBoundaryShapeSphere(
+      const tbox::Dimension& dim,
+      const std::string& object_name,
+      tbox::Pointer<tbox::Database> input_db);
+
+   /*!
+    * The destructor does nothing.
+    */
+   ~EmbeddedBoundaryShapeSphere();
+
+   /*!
+    * Concrete implementation of the isInside() method defined by the
+    * EmbeddedBoundaryShape base class.  This method indicates
+    * whether the supplied xyz coordinates are inside or outside of
+    * the sphere.
+    *
+    * @param xyz  double array[tbox::Dimension::MAXIMUM_DIMENSION_VALUE] specifying coordinates.
+    */
+   bool
+   isInside(
+      const double* xyz) const;
+
+   /*!
+    * Concrete implementation of the isInside() method defined by the
+    * EmbeddedBoundaryShape base class.  This method indicates
+    * whether the array of xyz coordinates are inside or outside of
+    * the sphere.
+    *
+    * @param nx integer array [tbox::Dimension::MAXIMUM_DIMENSION_VALUE] specifying number of points in each dir
+    * @param dx double array [tbox::Dimension::MAXIMUM_DIMENSION_VALUE] specifying spacing of points in each dir
+    * @param origin double array [tbox::Dimension::MAXIMUM_DIMENSION_VALUE] specifying origin of lower corner
+    * @param inout int array dimensioned the total number of points
+    *        (i.e. nx[0]*nx[1]*nx[2]).  This is an OUTPUT quantity.
+    */
+   void
+   isInside(
+      const int* nx,
+      const double* dx,
+      const double* origin,
+      int* inout) const;
+
+   /*!
+    * Dump data to supplied stream.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os) const;
+
+private:
+   /*
+    * Read name, center, and radius information from input.  The name
+    * is optional but center and radius MUST be specified in the input
+    * file.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db);
+
+   const tbox::Dimension& d_dim;
+
+   std::string d_object_name;
+
+   /*
+    * Center and radius of the sphere.
+    */
+   double d_center[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   double d_radius;
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/appu/EmbeddedBoundaryShapeSphere.I"
+#endif
+
+#endif // included_EmbeddedBoundaryShapeSphere
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1639 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=BoundaryNode.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryNode.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/EmbeddedBoundaryDefines.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h BoundaryNode.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=BoundaryUtilityStrategy.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryUtilityStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h BoundaryUtilityStrategy.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=CartesianBoundaryUtilities2.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryUtilityStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryDefines.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryUtilities2.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	CartesianBoundaryUtilities2.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=CartesianBoundaryUtilities3.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryUtilityStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryDefines.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryUtilities3.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	CartesianBoundaryUtilities3.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
+FILE_4=CubesPatchInterface.o
+DEPENDS_4:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryNode.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/CubesPatchInterface.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/CutCell.h				\
+	$(INCLUDE_SAM)/SAMRAI/appu/EmbeddedBoundaryDefines.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	CubesPatchInterface.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_4 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_4:X.o=${NDIM}.o}: ${DEPENDS_4}
+
+FILE_5=CutCell.o
+DEPENDS_5:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryNode.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/CutCell.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h CutCell.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_5 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_5:X.o=${NDIM}.o}: ${DEPENDS_5}
+
+FILE_6=ElevenPatchInterface.o
+DEPENDS_6:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryNode.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/CutCell.h				\
+	$(INCLUDE_SAM)/SAMRAI/appu/ElevenPatchInterface.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/EmbeddedBoundaryDefines.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h ElevenPatchInterface.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_6 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_6:X.o=${NDIM}.o}: ${DEPENDS_6}
+
+FILE_7=EmbeddedBoundaryGeometry.o
+DEPENDS_7:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryNode.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryDefines.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/CubesPatchInterface.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/CutCell.h				\
+	$(INCLUDE_SAM)/SAMRAI/appu/ElevenPatchInterface.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/EmbeddedBoundaryDefines.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/EmbeddedBoundaryGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/EmbeddedBoundaryShape.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/EmbeddedBoundaryShapePolygon.I	\
+	$(INCLUDE_SAM)/SAMRAI/appu/EmbeddedBoundaryShapePolygon.h	\
+	$(INCLUDE_SAM)/SAMRAI/appu/EmbeddedBoundaryShapeSphere.I	\
+	$(INCLUDE_SAM)/SAMRAI/appu/EmbeddedBoundaryShapeSphere.h	\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIntegerConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	EmbeddedBoundaryGeometry.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_7 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_7:X.o=${NDIM}.o}: ${DEPENDS_7}
+
+FILE_8=EmbeddedBoundaryShape.o
+DEPENDS_8:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/EmbeddedBoundaryShape.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h EmbeddedBoundaryShape.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_8 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_8:X.o=${NDIM}.o}: ${DEPENDS_8}
+
+FILE_9=EmbeddedBoundaryShapePolygon.o
+DEPENDS_9:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/EmbeddedBoundaryDefines.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/EmbeddedBoundaryShape.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/EmbeddedBoundaryShapePolygon.I	\
+	$(INCLUDE_SAM)/SAMRAI/appu/EmbeddedBoundaryShapePolygon.h	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	EmbeddedBoundaryShapePolygon.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_9 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_9:X.o=${NDIM}.o}: ${DEPENDS_9}
+
+FILE_10=EmbeddedBoundaryShapeSphere.o
+DEPENDS_10:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/EmbeddedBoundaryDefines.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/EmbeddedBoundaryShape.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/EmbeddedBoundaryShapeSphere.I	\
+	$(INCLUDE_SAM)/SAMRAI/appu/EmbeddedBoundaryShapeSphere.h	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	EmbeddedBoundaryShapeSphere.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_10 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_10:X.o=${NDIM}.o}: ${DEPENDS_10}
+
+FILE_11=VisDerivedDataStrategy.o
+DEPENDS_11:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h VisDerivedDataStrategy.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_11 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_11:X.o=${NDIM}.o}: ${DEPENDS_11}
+
+FILE_12=VisItDataWriter.o
+DEPENDS_12:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxTree.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxTreeNode.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelConnectorUtils.I	\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelConnectorUtils.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	VisItDataWriter.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_12 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_12:X.o=${NDIM}.o}: ${DEPENDS_12}
+
+FILE_13=VisMaterialsDataStrategy.o
+DEPENDS_13:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	VisMaterialsDataStrategy.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_13 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_13:X.o=${NDIM}.o}: ${DEPENDS_13}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,46 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   primary makefile for compiling the SAMRAI appu package 
+##
+#########################################################################
+
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/SAMRAI/appu
+VPATH         = @srcdir@
+OBJECT        = ../../..
+
+default: library
+
+include $(OBJECT)/config/Makefile.config
+
+SUBDIRS = fortran
+
+OBJS = \
+	BoundaryUtilityStrategy.o \
+	VisItDataWriter.o \
+	VisDerivedDataStrategy.o \
+	VisMaterialsDataStrategy.o \
+	CubesPatchInterface.o \
+        ElevenPatchInterface.o \
+	BoundaryNode.o \
+	CutCell.o \
+	EmbeddedBoundaryGeometry.o \
+	EmbeddedBoundaryShape.o \
+	EmbeddedBoundaryShapePolygon.o \
+	EmbeddedBoundaryShapeSphere.o \
+	CartesianBoundaryUtilities2.o \
+	CartesianBoundaryUtilities3.o
+
+library: $(OBJS) $(OBJSXD)
+	for DIR in $(SUBDIRS); do if test -d $$DIR; then (cd $$DIR && $(MAKE) $@) ; fi || exit 1; done
+clean:
+	$(SAMCLEAN)
+	for DIR in $(SUBDIRS); do if test -d $$DIR; then (cd $$DIR && $(MAKE) $@) ; fi || exit 1; done
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/VisDerivedDataStrategy.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/VisDerivedDataStrategy.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,55 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface for writing user-defined data to either VisIt or
+ *                Vizamrai dump file 
+ *
+ ************************************************************************/
+
+#ifndef included_appu_VisDerivedDataStrategy_C
+#define included_appu_VisDerivedDataStrategy_C
+
+#include "SAMRAI/appu/VisDerivedDataStrategy.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace appu {
+
+VisDerivedDataStrategy::VisDerivedDataStrategy()
+{
+}
+
+VisDerivedDataStrategy::~VisDerivedDataStrategy()
+{
+}
+
+bool VisDerivedDataStrategy::packMixedDerivedDataIntoDoubleBuffer(
+   double* buffer,
+   std::vector<double>& mixbuffer,
+   const hier::Patch& patch,
+   const hier::Box& region,
+   const std::string& variable_name,
+   int depth_index) const
+{
+   NULL_USE(buffer);
+   NULL_USE(mixbuffer);
+   NULL_USE(patch);
+   NULL_USE(region);
+   NULL_USE(variable_name);
+   NULL_USE(depth_index);
+   TBOX_ERROR("VisDerivedDataStrategy::"
+      << "packMixedDerivedDataIntoDoubleBuffer()"
+      << "\nNo class supplies a concrete implementation for "
+      << "\nthis method.  The default abstract method (which "
+      << "\ndoes nothing) is executed" << std::endl);
+   return 0;
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/VisDerivedDataStrategy.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/VisDerivedDataStrategy.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,189 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface for writing user-defined data to either
+ *                VisIt or Vizamrai file 
+ *
+ ************************************************************************/
+
+#ifndef included_appu_VisDerivedDataStrategy
+#define included_appu_VisDerivedDataStrategy
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <string>
+#include <vector>
+
+namespace SAMRAI {
+namespace appu {
+
+/*!
+ * @brief Class VisDerivedDataStrategy is an abstract base class
+ * that defines an interface allowing an VisItDataWriter object
+ * and/or an CartesianVizamraiDataWriter<DIM> object to generate plot
+ * files that contain "derived" quantities; that is, data that does
+ * not reside on the hierarchy, but which is derived from data that
+ * does reside on the hierarchy.  The derived data may be scalar,
+ * vector, or tensor (VisIt only), and cell-centered or node-centered
+ * (VisIt only).  A concrete object of this type must be registered
+ * with the data writer if any derived variable is registered with the
+ * data writer.  The registration of the concrete strategy object may
+ * be done independently using the method setDerivedDataWriter()
+ * (Vizamrai only) or setDefaultDerivedDataWriter() (VisIt only) from
+ * the relevant DataWriter class, or the concrete strategy object may
+ * be registered concurrently with the derived variable using the
+ * method registerDerivedPlotScalar/Vector/Tensor().
+ *
+ * The concrete strategy object is responsible for supplying an
+ * implementation of the function packDerivedDataIntoDoubleBuffer()
+ * which calculates the derived data and writes it into the double
+ * precision buffer passed in to it.
+ *
+ * This class is shared by both VisDataWriter<DIM> and
+ * CartesianVizamraiDataWriter<DIM>.
+ *
+ * @see appu::VisItDataWriter
+ */
+
+class VisDerivedDataStrategy
+{
+public:
+   /*!
+    * @brief Default constructor for VisDerivedDataStrategy.
+    */
+   VisDerivedDataStrategy();
+
+   /*!
+    * @brief Destructor for VisDerivedDataStrategy.
+    */
+   virtual ~VisDerivedDataStrategy();
+
+   /*!
+    * @brief This function calculates and packs derived
+    * cell-centered data to a 1D double precision buffer.  In the case
+    * of the VisIt data writer, node-centered data may also be used.
+    * It is called once for each component of multicomponent data.
+    *
+    * The buffer will be already allocated.  This routine is needed to
+    * construct data values that are not stored on the hierarchy, but
+    * which may be important to visualize.  The data to be packed
+    * corresponds to the plot variable that the user has registered
+    * with the data writer using
+    * registerDerivedPlotScalar/Vector/Tensor() with the std::string
+    * "variable_name".  The data to be packed is derived from the data
+    * that lives on the given patch.  The box describes the patch
+    * region over which to pack the data.  It is assumed that all data
+    * needed to compute the derived quantity exists on the given
+    * patch.
+    *
+    * The method packDerivedDataIntoDoubleBuffer() will be called DIM
+    * times for vector data, and DIM*DIM times for tensor data, with
+    * the integer "depth_index" argument indicating the particular
+    * component of vector to be packed.  For scalar values, the
+    * depth_index will be 0.
+    *
+    * This routine must include ghost data if the ghost_cell_width
+    * parameter was set when the derived data was registered. The data
+    * must be packed into the buffer in column major order, the
+    * ordering used by SAMRAI, i.e. (f(x_0,y_0,z_0), f(x_1,y_0,z_0),
+    * f(x_2,y_0,z_0), ...). If the derived data was registered as
+    * node-centered, a buffer of node-centered data is expected.
+    * Derived data need not be defined on all patches.  It is the
+    * responsibility of this routine to determine if data exists on
+    * the patch and set the return value of of this routine
+    * appropriately: true if the data exists on the patch, false
+    * otherwise.
+    *
+    * @param buffer Double precision array into which derived data is
+    *  packed.
+    * @param patch hier::Patch on which to calculate and pack derived data.
+    * @param region hier::Box region over which to pack data.
+    * @param variable_name Name identifier for the derived variable as
+    *  registered in registerDerivedPlotScalar/Vector/Tensor().
+    * @param depth_index For scalar quantities index will be zero.
+    *  For vector data, index varies between 0 and DIM-1.  For tensor
+    *  data, index varies from 0 (DIM*DIM)-1.
+    * @return Boolean value indicating if derived data defined on this
+    *  patch.
+    */
+   virtual bool
+   packDerivedDataIntoDoubleBuffer(
+      double* buffer,
+      const hier::Patch& patch,
+      const hier::Box& region,
+      const std::string& variable_name,
+      int depth_index) const = 0;
+
+   /*!
+    * @brief This function calculates and packs derived
+    * cell-centered data to a 1D double precision buffer.  It also packs
+    * material state varaibles for component materials in mixed zones for
+    * accurate visualization of mixed zones. In the case
+    * of the VisIt data writer, node-centered data may also be used.
+    * It is called once for each component of multicomponent data.
+    *
+    * The buffer will be already allocated and an empty vector will be
+    * provided.  This routine is needed to construct data values that are not
+    * stored on the hierarchy, but which may be important to visualize.  The
+    * data to be packed corresponds to the plot variable that the user has
+    * registered with the data writer using
+    * registerDerivedPlotScalar/Vector/Tensor() with the string
+    * "variable_name".  The data to be packed is derived from the data that
+    * lives on the given patch.  The box describes the patch region over which>     * to pack the data.  It is assumed that all data needed to compute the
+    * derived quantity exists on the given patch.
+    *
+    * The method packMixedDerivedDataIntoDoubleBuffer() will be called DIM
+    * times for vector data, and DIM*DIM times for tensor data, with
+    * the integer "depth_index" argument indicating the particular
+    * component of vector to be packed.  For scalar values, the
+    * depth_index will be 0.
+    *
+    * This routine must include ghost data if the ghost_cell_width
+    * parameter was set when the derived data was registered. The data
+    * must be packed into the buffer in column major order, the
+    * ordering used by SAMRAI, i.e. (f(x_0,y_0,z_0), f(x_1,y_0,z_0),
+    * f(x_2,y_0,z_0), ...). If the derived data was registered as
+    * node-centered, a buffer of node-centered data is expected.
+    * Derived data need not be defined on all patches.  It is the
+    * responsibility of this routine to determine if data exists on
+    * the patch and set the return value of of this routine
+    * appropriately: true if the data exists on the patch, false
+    * otherwise.
+    *
+    * Mixed data should be packed in a sparse manner (i.e., only for cells
+    * that are mixed) in the same column major order and following the ordering
+    * of materials specified when registerMaterialNames() or
+    * registerSparseMaterialNames() was called.
+    *
+    * @param buffer Double precision array into which derived data is
+    *  packed.
+    * @param patch hier::Patch on which to calculate and pack derived data.
+    * @param region hier::Box region over which to pack data.
+    * @param variable_name Name identifier for the derived variable as
+    *  registered in registerDerivedPlotScalar/Vector/Tensor().
+    * @param depth_index For scalar quantities index will be zero.
+    *  For vector data, index varies between 0 and DIM-1.  For tensor
+    *  data, index varies from 0 (DIM*DIM)-1.
+    * @return Boolean value indicating if derived data defined on this
+    *  patch.
+    */
+   virtual bool
+   packMixedDerivedDataIntoDoubleBuffer(
+      double* buffer,
+      std::vector<double>& mixbuffer,
+      const hier::Patch& patch,
+      const hier::Box& region,
+      const std::string& variable_name,
+      int depth_index) const;
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/VisItDataWriter.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/VisItDataWriter.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,5247 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Writes data files for visualization by VisIt 
+ *
+ ************************************************************************/
+
+#ifndef included_appu_VisItDataWriter_C
+#define included_appu_VisItDataWriter_C
+
+#include "SAMRAI/appu/VisItDataWriter.h"
+
+#ifdef HAVE_HDF5
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/HDFDatabase.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellDataFactory.h"
+#include "SAMRAI/hier/BoxTree.h"
+#include "SAMRAI/hier/MappedBoxLevelConnectorUtils.h"
+#include "SAMRAI/hier/MultiblockPatchHierarchy.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeDataFactory.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#include <cstring>
+#include <ctime>
+#include <vector>
+
+// Make code look more like the trunk version, for debugging.
+// #define getNumberOfPatches getGlobalNumberOfPatches
+
+#define VISIT_NAME_BUFSIZE (128)
+#define VISIT_UNDEFINED_INDEX (-1)
+
+// for parallel runs, VISIT_MASTER writes single summary file
+// with information from all processors.
+#define VISIT_MASTER (0)
+
+// used by VisIt to track version of VisIt Data Writer
+#define VISIT_DATAWRITER_VERSION_NUMBER 2.0
+
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+void F77_FUNC(cpfdat2buf3d, CPFDAT2BUF3D) (
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   float *, double *, const int &);
+void F77_FUNC(cpddat2buf3d, CPDDAT2BUF3D) (
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   double *, double *, const int &);
+void F77_FUNC(cpidat2buf3d, CPIDAT2BUF3D) (
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   int *, double *, const int &);
+}
+extern "C" {
+void F77_FUNC(cpfdat2buf2d, CPFDAT2BUF2D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   float *, double *, const int &);
+void F77_FUNC(cpddat2buf2d, CPDDAT2BUF2D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   double *, double *, const int &);
+void F77_FUNC(cpidat2buf2d, CPIDAT2BUF2D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   int *, double *, const int &);
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace appu {
+
+bool VisItDataWriter::s_summary_file_opened = false;
+
+tbox::StartupShutdownManager::Handler
+VisItDataWriter::s_initialize_handler(
+   VisItDataWriter::initializeCallback,
+   0,
+   0,
+   VisItDataWriter::finalizeCallback,
+   tbox::StartupShutdownManager::priorityTimers);
+
+tbox::Pointer<tbox::Timer> VisItDataWriter::t_write_plot_data;
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The constructor --- sets default object state.                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+VisItDataWriter::VisItDataWriter(
+   const tbox::Dimension& dim,
+   const std::string& object_name,
+   const std::string& dump_directory_name,
+   int number_procs_per_file,
+   bool is_multiblock):
+   d_dim(dim)
+{
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(number_procs_per_file > 0);
+
+   if ((d_dim < tbox::Dimension(2)) || (d_dim > tbox::Dimension(3))) {
+      TBOX_ERROR(
+         "VisItDataWriter::VisItDataWriter"
+         << "\n          VisItDataWriter only works for"
+         << "\n          2D or 3D data" << std::endl);
+   }
+
+   d_object_name = object_name;
+
+   d_default_derived_writer = NULL;
+   d_materials_writer = NULL;
+
+   d_number_working_slaves = VISIT_UNDEFINED_INDEX;
+   d_file_cluster_size = number_procs_per_file;
+   d_number_file_clusters = VISIT_UNDEFINED_INDEX;
+   d_my_file_cluster_number = VISIT_UNDEFINED_INDEX;
+   d_file_cluster_leader = false;
+   d_my_rank_in_file_cluster = VISIT_UNDEFINED_INDEX;
+   d_number_files_this_file_cluster = VISIT_UNDEFINED_INDEX;
+
+   d_scaling_ratios.resizeArray(1, hier::IntVector::getOne(dim));
+
+   d_number_visit_variables = 0;
+   d_number_visit_variables_plus_depth = 0;
+   d_number_species = 0;
+
+   d_time_step_number = VISIT_UNDEFINED_INDEX;
+   d_grid_type = VISIT_CARTESIAN;
+   d_top_level_directory_name = dump_directory_name;
+   d_summary_filename = "summary.samrai";
+   d_number_levels = 1;
+
+   d_worker_min_max = (patchMinMaxStruct *)NULL;
+
+   d_is_multiblock = is_multiblock;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The destructor implicitly deallocates the list of plot data items.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+VisItDataWriter::~VisItDataWriter()
+{
+   /*
+    * De-allocate min/max structs for each variable.
+    */
+   if (d_worker_min_max != (patchMinMaxStruct *)NULL)
+      delete[] d_worker_min_max;
+
+   for (tbox::List<VisItItem>::Iterator ipi(d_plot_items);
+        ipi; ipi++) {
+      for (int comp = 0; comp < VISIT_MAX_NUMBER_COMPONENTS; comp++) {
+         if (ipi().d_master_min_max[comp] != (patchMinMaxStruct *)NULL)
+            delete[] ipi().d_master_min_max[comp];
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set default derived data writer.                                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VisItDataWriter::setDefaultDerivedDataWriter(
+   VisDerivedDataStrategy* derived_writer)
+{
+   TBOX_ASSERT(derived_writer != (VisDerivedDataStrategy *)NULL);
+
+   d_default_derived_writer = derived_writer;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set materials data writer object.                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VisItDataWriter::setMaterialsDataWriter(
+   VisMaterialsDataStrategy* materials_writer)
+{
+   TBOX_ASSERT(materials_writer != (VisMaterialsDataStrategy *)NULL);
+
+   d_materials_writer = materials_writer;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register (non-derived) plot quantities: scalar, vector or tensor.     *
+ *                                                                       *
+ *************************************************************************
+ */
+void VisItDataWriter::registerPlotQuantity(
+   const std::string& variable_name,
+   const std::string& variable_type,
+   const int patch_data_index,
+   const int start_depth_index,
+   const double scale_factor,
+   const std::string& variable_centering)
+{
+   TBOX_ASSERT(!variable_name.empty());
+   TBOX_ASSERT(!variable_type.empty());
+   TBOX_ASSERT(patch_data_index >= -1);
+   TBOX_ASSERT(start_depth_index >= 0);
+
+   /*
+    * Check for name conflicts with existing registered variables.
+    */
+   for (tbox::List<VisItItem>::Iterator
+        ipi(d_plot_items); ipi; ipi++) {
+      if (ipi().d_var_name == variable_name) {
+         TBOX_ERROR("VisItDataWriter::registerPlotQuantity()"
+            << "\n    Attempting to register variable with name "
+            << variable_name << "\n    more than once." << std::endl);
+      }
+   }
+
+   /*
+    * Create a plot item and initialize its characteristics.
+    */
+   VisItItem plotitem;
+
+   initializePlotItem(plotitem,
+      variable_name,
+      variable_type,
+      patch_data_index,
+      start_depth_index,
+      scale_factor,
+      variable_centering);
+
+   d_number_visit_variables++;
+   d_number_visit_variables_plus_depth += plotitem.d_depth;
+   d_plot_items.appendItem(plotitem);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register derived plot quantities: scalar, vector, or tensor.  If no   *
+ * derived data strategy is specified and no default derived data        *
+ * strategy is set, an error will result.                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VisItDataWriter::registerDerivedPlotQuantity(
+   const std::string& variable_name,
+   const std::string& variable_type,
+   VisDerivedDataStrategy* derived_writer,
+   double scale_factor,
+   const std::string& variable_centering,
+   const std::string& variable_mix_type)
+{
+   TBOX_ASSERT(!variable_name.empty());
+   TBOX_ASSERT(!variable_type.empty());
+
+   /*
+    * Check for name conflicts with existing registered variables.
+    */
+   for (tbox::List<VisItItem>::Iterator
+        ipi(d_plot_items); ipi; ipi++) {
+      if (ipi().d_var_name == variable_name) {
+         TBOX_ERROR("VisItDataWriter::registerDerivedPlotQuantity()"
+            << "\n    Attempting to register variable with name "
+            << variable_name << "\n    more than once." << std::endl);
+      }
+   }
+
+   if (variable_name == "Coords") {
+      TBOX_ASSERT(variable_type == "VECTOR");
+      TBOX_ASSERT(variable_centering == "NODE");
+      d_grid_type = VISIT_DEFORMED;
+   }
+
+   /*
+    * Create a plot item and initialize its characteristics.
+    */
+   VisItItem plotitem;
+
+   /*
+    * Derived data is packed by the user.  Thus, we specify a dummy
+    * patch data id here.
+    */
+   int patch_data_index = VISIT_UNDEFINED_INDEX;
+   int start_depth_index = 0;
+   initializePlotItem(plotitem,
+      variable_name,
+      variable_type,
+      patch_data_index,
+      start_depth_index,
+      scale_factor,
+      variable_centering);
+
+   if (variable_name == "Coords") {
+      plotitem.d_is_deformed_coords = true;
+
+      /*
+       * We need to reset the variable name, because it has to be written with
+       * a special form to the VisIt readible HDF file.
+       */
+      char temp_buf[VISIT_NAME_BUFSIZE];
+      for (int i = 0; i < plotitem.d_depth; i++) {
+         sprintf(temp_buf, ".%02d", i);
+         plotitem.d_visit_var_name[i] = variable_name + temp_buf;
+      }
+
+      /*
+       * In this method, we assume the scale factor is always 1.0.  If a
+       * user would like to choose a scale factor, use the
+       * "registerSingleNodeCoordinate()" method.
+       */
+      plotitem.d_coord_scale_factor.resizeArray(d_dim.getValue(), 1.0);
+   }
+
+   if (variable_mix_type == "MIXED") {
+      plotitem.d_is_material_state_variable = true;
+   }
+
+   /*
+    * Set characteristics for derived variable.
+    */
+   plotitem.d_is_derived = true;
+
+   if (derived_writer == NULL) {
+      if (d_default_derived_writer == NULL) {
+         TBOX_ERROR("VisItDataWriter::registerDerivedPlotQuantity"
+            << "\n    no derived data writer specified for variable:"
+            << variable_name
+            << "\n    and no default derived data writer set."
+            << std::endl);
+      } else {
+         plotitem.d_derived_writer = d_default_derived_writer;
+      }
+   } else {
+      plotitem.d_derived_writer = derived_writer;
+   }
+
+   d_number_visit_variables++;
+   d_number_visit_variables_plus_depth += plotitem.d_depth;
+   d_plot_items.appendItem(plotitem);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Reset previously-registered scalar/vector variable to new data id     *
+ * and depth index on the given level.  This allows the use of different *
+ * patch data ids for the same quantity on different hierarchy levels.   *
+ * We check to make sure that the factory at the given index is          *
+ * defined and consistent with the original registration.                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VisItDataWriter::resetLevelPlotQuantity(
+   const std::string& variable_name,
+   const int level_number,
+   const int patch_data_index,
+   const int start_depth_index)
+{
+   TBOX_ASSERT(!variable_name.empty());
+   TBOX_ASSERT(level_number >= 0);
+   TBOX_ASSERT(patch_data_index >= -1);
+   TBOX_ASSERT(start_depth_index >= 0);
+
+   /*
+    * Verify the supplied patch data index has the same type and centering
+    * as the plot item its replacing.
+    */
+   tbox::Pointer<hier::PatchDataFactory> factory =
+      hier::VariableDatabase::getDatabase()->
+      getPatchDescriptor()->
+      getPatchDataFactory(patch_data_index);
+
+   bool found_type = false;
+   variable_data_type vdt = VISIT_DATA_TYPE_BAD;
+   variable_centering vc = VISIT_CENTERING_BAD;
+
+   if (!found_type) {
+      tbox::Pointer<pdat::CellDataFactory<float> > ffactory = factory;
+      if (!ffactory.isNull()) {
+         vdt = VISIT_FLOAT;
+         vc = VISIT_CELL;
+         found_type = true;
+      }
+   }
+   if (!found_type) {
+      tbox::Pointer<pdat::NodeDataFactory<float> > ffactory = factory;
+      if (!ffactory.isNull()) {
+         vdt = VISIT_FLOAT;
+         vc = VISIT_NODE;
+         found_type = true;
+      }
+   }
+
+   if (!found_type) {
+      tbox::Pointer<pdat::CellDataFactory<double> > dfactory = factory;
+      if (!dfactory.isNull()) {
+         vdt = VISIT_DOUBLE;
+         vc = VISIT_CELL;
+         found_type = true;
+      }
+   }
+   if (!found_type) {
+      tbox::Pointer<pdat::NodeDataFactory<double> > dfactory = factory;
+      if (!dfactory.isNull()) {
+         vdt = VISIT_DOUBLE;
+         vc = VISIT_NODE;
+         found_type = true;
+      }
+   }
+   if (!found_type) {
+      tbox::Pointer<pdat::CellDataFactory<int> > ifactory = factory;
+      if (!ifactory.isNull()) {
+         vdt = VISIT_INT;
+         vc = VISIT_CELL;
+         found_type = true;
+      }
+   }
+   if (!found_type) {
+      tbox::Pointer<pdat::NodeDataFactory<int> > ifactory = factory;
+      if (!ifactory.isNull()) {
+         vdt = VISIT_INT;
+         vc = VISIT_NODE;
+         found_type = true;
+      }
+   }
+   if (!found_type) {
+      TBOX_ERROR("VisItDataWriter::resetLevelPlotQuantity()"
+         << "\n     Unable to determine type and centering"
+         << "\n     of supplied patch data index."
+         << "\n     ***Exiting" << std::endl);
+   }
+
+   /*
+    * Find variable in the list of maintained vars.
+    */
+   bool found_var = false;
+   for (tbox::List<VisItItem>::Iterator
+        ipi(d_plot_items); (!found_var && ipi); ipi++) {
+      if (ipi().d_var_name == variable_name) {
+
+         /*
+          * Check to make sure supplied variable has same type and
+          * centering as registered one.
+          */
+         if ((ipi().d_var_data_type != vdt) ||
+             (ipi().d_var_centering != vc)) {
+            TBOX_ERROR("VisItDataWriter::resetLevelPlotQuantity()"
+               << "\n     The supplied patch data id has a different"
+               << "\n     type and centering from the one originally"
+               << "\n     registered.  hier::Variable name: "
+               << variable_name
+               << "\n     ***Exiting" << std::endl);
+         }
+         if (level_number >= ipi().d_level_patch_data_index.getSize()) {
+            ipi().d_level_patch_data_index.resizeArray(level_number + 1);
+         }
+         ipi().d_level_patch_data_index[level_number] = patch_data_index;
+         ipi().d_start_depth_index = start_depth_index;
+      }
+   }
+
+   if (!found_var) {
+      TBOX_ERROR("VisItDataWriter::resetLevelPlotQuantity()"
+         << "\n     Could not find the variable: "
+         << variable_name
+         << "\n     in the list of registered plot items."
+         << "\n     Be sure registerPlotQuantity() has been"
+         << "\n     called for the variable."
+         << "\n     ***Exiting" << std::endl);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register node coordinates of deformed (moving) grids.                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VisItDataWriter::registerNodeCoordinates(
+   const int patch_data_index,
+   const int start_depth_index)
+{
+   TBOX_ASSERT(patch_data_index >= -1);
+   TBOX_ASSERT(start_depth_index >= 0);
+
+   /*
+    * Check to make sure "Coords" variable has not already been registered.
+    */
+   for (tbox::List<VisItItem>::Iterator
+        ipi(d_plot_items); ipi; ipi++) {
+      if (ipi().d_var_name == "Coords") {
+         TBOX_ERROR("VisItDataWriter::registerNodeCoordinates()"
+            << "\n   Coordinates registered more than once." << std::endl);
+      }
+   }
+
+   /*
+    * Set the grid type for the visit data
+    */
+   d_grid_type = VISIT_DEFORMED;
+
+   /*
+    * Verify the supplied patch data index is a valid NODE-centered
+    * float or double and has a depth of at least d_dim
+    */
+   tbox::Pointer<hier::PatchDataFactory> factory =
+      hier::VariableDatabase::getDatabase()->
+      getPatchDescriptor()->
+      getPatchDataFactory(patch_data_index);
+
+   bool found_type = false;
+   int var_depth = VISIT_UNDEFINED_INDEX;
+   if (!found_type) {
+
+      tbox::Pointer<pdat::NodeDataFactory<float> > ffactory = factory;
+      if (!ffactory.isNull()) {
+         var_depth = ffactory->getDepth();
+         found_type = true;
+      }
+   }
+   if (!found_type) {
+      tbox::Pointer<pdat::NodeDataFactory<double> > dfactory = factory;
+      if (!dfactory.isNull()) {
+         var_depth = dfactory->getDepth();
+         found_type = true;
+      }
+   }
+   if (!found_type) {
+      TBOX_ERROR("VisItDataWriter::registerNodeCoordinates"
+         << "\n     This variable is NOT a node centered"
+         << "\n     float or double type, which is required."
+         << "\n     ***Exiting" << std::endl);
+   }
+
+   int end_depth = start_depth_index + d_dim.getValue();
+   if (var_depth < (end_depth)) {
+      TBOX_ERROR("VisItDataWriter::registerNodeCoordinates"
+         << "\n     This variable has depth: " << var_depth
+         << "\n     It must be a VECTOR type and therefore"
+         << "\n     have depth at least d_dim + start_depth_index = "
+         << end_depth
+         << "\n     ***Exiting" << std::endl);
+   }
+
+   /*
+    * Create the coords plot item.
+    */
+   VisItItem plotitem;
+
+   std::string var_name = "Coords";
+   std::string var_type = "VECTOR";
+   double scale_factor = 1.0;
+   std::string var_cent = "NODE";
+
+   initializePlotItem(plotitem,
+      var_name,
+      var_type,
+      patch_data_index,
+      start_depth_index,
+      scale_factor,
+      var_cent);
+
+   plotitem.d_is_deformed_coords = true;
+
+   /*
+    * We need to reset the variable name, because it has to be written with
+    * a special form to the VisIt readible HDF file.
+    */
+   char temp_buf[VISIT_NAME_BUFSIZE];
+   for (int i = 0; i < plotitem.d_depth; i++) {
+      sprintf(temp_buf, ".%02d", i);
+      plotitem.d_visit_var_name[i] = var_name + temp_buf;
+   }
+
+   /*
+    * In this method, we assume the scale factor is always 1.0.  If a
+    * user would like to choose a scale factor, use the
+    * "registerSingleNodeCoordinate()" method.
+    */
+   plotitem.d_coord_scale_factor.resizeArray(d_dim.getValue(), 1.0);
+
+   d_number_visit_variables++;
+   d_number_visit_variables_plus_depth += plotitem.d_depth;
+   d_plot_items.appendItem(plotitem);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register node coordinates of deformed (moving) grids.                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VisItDataWriter::registerSingleNodeCoordinate(
+   const int coordinate_number,
+   const int patch_data_index,
+   const int depth_index,
+   const double scale_factor)
+{
+   TBOX_ASSERT(coordinate_number >= 0 && coordinate_number < d_dim.getValue());
+   TBOX_ASSERT(patch_data_index >= -1);
+   TBOX_ASSERT(depth_index >= 0);
+
+   /*
+    * Set the grid type for the visit data
+    */
+   d_grid_type = VISIT_DEFORMED;
+
+   /*
+    * Verify the supplied patch data index is a valid NODE-centered
+    * float or double
+    */
+   tbox::Pointer<hier::PatchDataFactory> factory =
+      hier::VariableDatabase::getDatabase()->
+      getPatchDescriptor()->
+      getPatchDataFactory(patch_data_index);
+
+   bool found_type = false;
+   if (!found_type) {
+      tbox::Pointer<pdat::NodeDataFactory<float> > ffactory = factory;
+      if (!ffactory.isNull()) {
+         found_type = true;
+      }
+   }
+   if (!found_type) {
+      tbox::Pointer<pdat::NodeDataFactory<double> > dfactory = factory;
+      if (!dfactory.isNull()) {
+         found_type = true;
+      }
+   }
+   if (!found_type) {
+      TBOX_ERROR("VisItDataWriter::registerSingleNodeCoordinate"
+         << "\n     This variable is NOT a node centered"
+         << "\n     float or double type, which is required."
+         << "\n     ***Exiting" << std::endl);
+   }
+
+   /*
+    * Create the coords plot item.  If its the first time this method
+    * is called, initialize the "Coords" plot variable.  If it has
+    * already been called before (i.e. coordinate_number > 0) then just
+    * reset plot variable parameters as necessary.
+    */
+   if (coordinate_number == 0) {
+
+      /*
+       * Check to make sure "Coords" variable has not already been registered.
+       */
+      for (tbox::List<VisItItem>::Iterator
+           ipi(d_plot_items); ipi; ipi++) {
+         if (ipi().d_var_name == "Coords") {
+            TBOX_ERROR("VisItDataWriter::registerSingleNodeCoordinate()"
+               << "\n   Coordinate registered more than once."
+               << std::endl);
+         }
+      }
+
+      VisItItem plotitem;
+
+      std::string var_name = "Coords";
+      std::string var_type = "SCALAR";
+      std::string var_cent = "NODE";
+
+      initializePlotItem(plotitem,
+         var_name,
+         var_type,
+         patch_data_index,
+         depth_index,
+         scale_factor,
+         var_cent);
+
+      plotitem.d_is_deformed_coords = true;
+
+      /*
+       * We need to reset the variable name, because it has to be written with
+       * a special form to the VisIt readible HDF file.
+       */
+      char temp_buf[VISIT_NAME_BUFSIZE];
+      for (int i = 0; i < plotitem.d_depth; i++) {
+         sprintf(temp_buf, ".%02d", i);
+         plotitem.d_visit_var_name[i] = var_name + temp_buf;
+      }
+
+      plotitem.d_coord_scale_factor.resizeArray(d_dim.getValue());
+      plotitem.d_coord_scale_factor[coordinate_number] = scale_factor;
+      d_number_visit_variables++;
+      d_number_visit_variables_plus_depth += plotitem.d_depth;
+
+      d_plot_items.appendItem(plotitem);
+
+   } else {
+
+      for (tbox::List<VisItItem>::Iterator
+           ipi(d_plot_items); ipi; ipi++) {
+
+         if (ipi().d_is_deformed_coords) {
+
+            ipi().d_var_type = VISIT_VECTOR;
+            ipi().d_depth = d_dim.getValue();
+            ipi().d_visit_var_name.resizeArray(d_dim.getValue());
+
+            std::string var_name = "Coords";
+            char temp_buf[VISIT_NAME_BUFSIZE];
+            sprintf(temp_buf, ".%02d", coordinate_number);
+            ipi().d_visit_var_name[coordinate_number] = var_name + temp_buf;
+
+            ipi().d_coord_scale_factor[coordinate_number] = scale_factor;
+            d_number_visit_variables_plus_depth += 1;
+         }
+      }
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register material names -- names of all the materials (not species)   *
+ * being used in the application.                                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VisItDataWriter::registerMaterialNames(
+   const tbox::Array<std::string>& material_names)
+{
+   TBOX_ASSERT(material_names.getSize() > 0);
+
+   /*
+    * Check if we have already tried to register materials.
+    */
+   if (d_materials_names.getSize() > 0) {
+      TBOX_ERROR("VisItDataWriter::registerMaterialNames"
+         << "\n    This method has been called more than once."
+         << "\n    The material names may not change during the"
+         << "\n    simulation.  ***Exiting" << std::endl);
+   }
+
+   /*
+    * Register each of the material names as a plot item with material
+    * characteristics.
+    */
+   int num_materials = material_names.getSize();
+   d_materials_names.resizeArray(num_materials);
+   for (int i = 0; i < num_materials; i++) {
+      if (material_names[i].empty()) {
+         TBOX_ERROR("VisItDataWriter::registerMaterialNames"
+            << "\n    Material: " << i
+            << "\n    has an empty name.  A name must be supplied."
+            << "\n    ***Exiting" << std::endl);
+      }
+
+      d_materials_names[i] = material_names[i];
+
+      VisItItem plotitem;
+
+      /*
+       * We impose the criteria that materials must be scalar cell centered
+       * double quantities.  The user must supply a method to pack
+       * this information.  See header for more info.
+       */
+      std::string var_type = "SCALAR";
+      int patch_data_index = VISIT_UNDEFINED_INDEX;
+      int start_depth_index = 0;
+      double scale_factor = 1.0;
+      std::string var_cent = "CELL";
+
+      initializePlotItem(plotitem,
+         material_names[i],
+         var_type,
+         patch_data_index,
+         start_depth_index,
+         scale_factor,
+         var_cent);
+
+      plotitem.d_isa_material = true;
+      plotitem.d_material_name = material_names[i];
+
+      d_plot_items.appendItem(plotitem);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register material names -- names of all the materials (not species)   *
+ * being used in the application. Volume fractions (and optionally state *
+ * variables) will be written in sparse arrays                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VisItDataWriter::registerSparseMaterialNames(
+   const tbox::Array<std::string>& material_names)
+{
+   TBOX_ASSERT(material_names.getSize() > 0);
+
+   /*
+    * Check if we have already tried to register materials.
+    */
+   if (d_materials_names.getSize() > 0) {
+      TBOX_ERROR("VisItDataWriter::registerSparseMaterialNames"
+         << "\n    This method has been called more than once."
+         << "\n    The material names may not change during the"
+         << "\n    simulation.  ***Exiting" << std::endl);
+   }
+
+   /*
+    * Register each of the material names as a plot item with material
+    * characteristics.
+    */
+   int num_materials = material_names.getSize();
+   d_materials_names.resizeArray(num_materials);
+   for (int i = 0; i < num_materials; i++) {
+      if (material_names[i].empty()) {
+         TBOX_ERROR("VisItDataWriter::registerMaterialNames"
+            << "\n    Material: " << i
+            << "\n    has an empty name.  A name must be supplied."
+            << "\n    ***Exiting" << std::endl);
+      }
+      d_materials_names[i] = material_names[i];
+   }
+   // Sparse Structure
+   VisItItem plotitem;
+
+   std::string var_type = "SCALAR";
+   int patch_data_index = VISIT_UNDEFINED_INDEX;
+   int start_depth_index = 0;
+   double scale_factor = 1.0;
+   std::string var_cent = "CELL";
+
+   /*
+    * this plotitem will write out the mat_list and material_packing_type
+    * (=1) the value of mat_list for any zone will be either the material
+    * number if the zone is clean, or a negative value that is the negative
+    * index into mix_mat, vol_frac and next_mat (assuming the indexing of
+    * mix_mat, etc. begin at 1) These arrays will only be written if there are
+    * mixed zones.
+    */
+   initializePlotItem(plotitem,
+      "materials",
+      var_type,
+      patch_data_index,
+      start_depth_index,
+      scale_factor,
+      var_cent);
+   plotitem.d_isa_material = true;
+   plotitem.d_material_name = "sparse_material_list";
+
+   // Use d_is_material_state_variable to mark this as the material list for
+   //   the sparse data writing when volume fractions are written out
+   plotitem.d_is_material_state_variable = true;
+
+   d_plot_items.appendItem(plotitem);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register species names for a given material.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VisItDataWriter::registerSpeciesNames(
+   const std::string& material_name,
+   const tbox::Array<std::string>& species_names)
+{
+   TBOX_ASSERT(!material_name.empty());
+   TBOX_ASSERT(species_names.getSize() > 0);
+
+   /*
+    * Be sure we have already registered materials.
+    */
+   if (d_materials_names.getSize() == 0) {
+      TBOX_ERROR("VisItDataWriter::registerSpeciesNames"
+         << "\n    No materials have yet been registered."
+         << "\n    Be sure the 'registerMaterialNames()'"
+         << "\n    is called before this method.  ***Exiting"
+         << std::endl);
+   }
+
+   bool found_material = false;
+   for (tbox::List<VisItItem>::Iterator ipi(d_plot_items); ipi; ipi++) {
+      if (ipi().d_material_name == material_name) {
+         found_material = true;
+      }
+   }
+   if (!found_material) {
+      TBOX_ERROR("VisItDataWriter::registerSpeciesNames"
+         << "\n    material name = " << material_name
+         << "\n    has not been registered." << std::endl);
+   }
+
+   /*
+    * Find the material in the list of plot items
+    */
+   VisItItem* material_item = (VisItItem *)NULL;
+   for (tbox::List<VisItItem>::Iterator ipi(d_plot_items); ipi; ipi++) {
+      if ((ipi().d_material_name == material_name) &&
+          ipi().d_isa_material) {
+         if (ipi().d_species_names.getSize() > 0) {
+            TBOX_ERROR("VisItDataWriter::registerSpeciesNames"
+               << "\n    material name = " << material_name
+               << "\n    registerSpeciesNames has already been"
+               << "\n    called for this material.  It is not"
+               << "\n    possible to reset species during the"
+               << "\n    simulation.  ***Exiting" << std::endl);
+         }
+         material_item = &(ipi());
+      }
+   }
+
+   TBOX_ASSERT(material_item != (VisItItem *)NULL);
+
+   d_number_species += species_names.getSize();
+   material_item->d_species_names = species_names;
+
+   /*
+    * Create a plot variable for each species of the material.
+    */
+   for (int i = 0; i < species_names.getSize(); i++) {
+
+      if (species_names[i].empty()) {
+         TBOX_ERROR("VisItDataWriter::registerSpeciesNames"
+            << "\n    species i = " << i
+            << "\n    for material: " << material_item->d_material_name
+            << "\n    is empty.  ***Exiting" << std::endl);
+      }
+
+      /*
+       * Species are associated with a material.  Hence, we give them
+       * the same characteristics (centering, type, etc) as material
+       * variables.
+       */
+      VisItItem plotitem;
+
+      std::string var_type = "SCALAR";
+      int patch_data_index = VISIT_UNDEFINED_INDEX;
+      int start_depth_index = 0;
+      double scale_factor = 1.0;
+      std::string var_cent = "CELL";
+
+      initializePlotItem(plotitem,
+         species_names[i],
+         var_type,
+         patch_data_index,
+         start_depth_index,
+         scale_factor,
+         var_cent);
+
+      plotitem.d_isa_species = true;
+
+      plotitem.d_species_name = species_names[i];
+      plotitem.d_parent_material_pointer = material_item;
+
+      d_plot_items.appendItem(plotitem);
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register VisIt expressions to be embedded in datafile summary         *
+ *   This method may be called multiple times to add more expressions    *
+ *   as needed.
+ *                                                                       *
+ *************************************************************************
+ */
+void VisItDataWriter::registerVisItExpressions(
+   const tbox::Array<std::string>& expression_keys,
+   const tbox::Array<std::string>& expressions,
+   const tbox::Array<std::string>& expression_types)
+{
+   if ((expressions.size() > 0) &&
+       (expressions.size() == expression_keys.size()) &&
+       (expressions.size() == expression_types.size())) {
+      int num_current_exp = d_visit_expressions.size();
+      d_visit_expressions.resizeArray(num_current_exp + expressions.size());
+      d_visit_expression_keys.resizeArray(num_current_exp + expressions.size());
+      d_visit_expression_types.resizeArray(num_current_exp + expressions.size());
+      for (int i = 0; i < expressions.size(); ++i) {
+         d_visit_expressions[num_current_exp + i] = expressions[i];
+         d_visit_expression_keys[num_current_exp + i] = expression_keys[i];
+         d_visit_expression_types[num_current_exp + i] = expression_types[i];
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private method which initializes a VisIt variable based on user       *
+ * input.
+ *                                                                       *
+ *************************************************************************
+ */
+void VisItDataWriter::initializePlotItem(
+   VisItItem& plotitem,
+   const std::string& variable_name,
+   const std::string& variable_type,
+   const int patch_data_index,
+   const int start_depth_index,
+   const double scale_factor,
+   const std::string& variable_centering)
+{
+   TBOX_ASSERT(!variable_name.empty());
+   TBOX_ASSERT(!variable_type.empty());
+   TBOX_ASSERT(patch_data_index >= -1);
+   TBOX_ASSERT(start_depth_index >= 0);
+
+   plotitem.d_var_name = variable_name;
+
+   /*
+    * Set variable type.
+    */
+   if (variable_type == "SCALAR") {
+      plotitem.d_var_type = VISIT_SCALAR;
+      plotitem.d_depth = 1;
+   } else if (variable_type == "VECTOR") {
+      plotitem.d_var_type = VISIT_VECTOR;
+      plotitem.d_depth = d_dim.getValue();
+   } else if (variable_type == "TENSOR") {
+      plotitem.d_var_type = VISIT_TENSOR;
+      plotitem.d_depth = d_dim.getValue() * d_dim.getValue();
+   } else {
+      TBOX_ERROR("VisItDataWriter::registerPlotQuantity"
+         << "\n    variable_type " << variable_type
+         << "\n    is unsupported.  You must use SCALAR, VECTOR, or"
+         << "\n    TENSOR.  Exiting***" << std::endl);
+   }
+
+   /*
+    * Check to make sure we have not exceeded max allowed components.
+    */
+   int num_old_components = d_number_visit_variables_plus_depth
+      + d_materials_names.getSize() // number materials
+      + d_number_species;
+
+   int new_num_components = num_old_components + plotitem.d_depth;
+   if (new_num_components > VISIT_MAX_NUMBER_COMPONENTS) {
+      TBOX_ERROR("VisItDataWriter::registerPlotQuantity"
+         << "\n     Unable to register this quantity because it"
+         << "\n     the maximum number of variables allowed in"
+         << "\n     the VisItWriter was reached:"
+         << "\n       current num variables:"
+         << num_old_components
+         << "\n       variable depth: "
+         << plotitem.d_depth
+         << "\n     MAX_NUMBER_COMPONENTS: "
+         << VISIT_MAX_NUMBER_COMPONENTS
+         << "\n     Contact SAMRAI team for assistance." << std::endl);
+   }
+
+   /*
+    * Set variable centering.  If the variable supplied a valid patch
+    * index, we check the factory of the variable first to try to
+    * determine centering from that.  If we cannot determine
+    * the type, we use the "variable_centering" provided by the user.
+    * Note that we only set the centering for variables that are not
+    * derived, materials, or species, since these variables do not have
+    * a supplied patch data index because they are packed by the user.
+    */
+   bool found_type = false;
+   int var_depth = 0;
+   if (patch_data_index >= 0) {
+
+      tbox::Pointer<hier::PatchDataFactory> factory =
+         hier::VariableDatabase::getDatabase()->
+         getPatchDescriptor()->
+         getPatchDataFactory(patch_data_index);
+      if (factory.isNull()) {
+         TBOX_ERROR("VisItDataWriter::registerPlotQuantity"
+            << "\n    patch data array index = " << patch_data_index
+            << "\n    for variable = " << variable_name
+            << "\n    is invalid" << std::endl);
+      } else {
+
+         if (!found_type) {
+            tbox::Pointer<pdat::CellDataFactory<float> > ffactory = factory;
+            if (!ffactory.isNull()) {
+               plotitem.d_var_centering = VISIT_CELL;
+               plotitem.d_var_data_type = VISIT_FLOAT;
+               var_depth = ffactory->getDepth();
+               found_type = true;
+            }
+         }
+         if (!found_type) {
+            tbox::Pointer<pdat::CellDataFactory<double> > dfactory = factory;
+            if (!dfactory.isNull()) {
+               plotitem.d_var_centering = VISIT_CELL;
+               plotitem.d_var_data_type = VISIT_DOUBLE;
+               var_depth = dfactory->getDepth();
+               found_type = true;
+            }
+         }
+         if (!found_type) {
+            tbox::Pointer<pdat::CellDataFactory<int> > ifactory = factory;
+            if (!ifactory.isNull()) {
+               plotitem.d_var_centering = VISIT_CELL;
+               plotitem.d_var_data_type = VISIT_INT;
+               var_depth = ifactory->getDepth();
+               found_type = true;
+            }
+         }
+         if (!found_type) {
+            tbox::Pointer<pdat::NodeDataFactory<float> > ffactory = factory;
+            if (!ffactory.isNull()) {
+               plotitem.d_var_centering = VISIT_NODE;
+               plotitem.d_var_data_type = VISIT_FLOAT;
+               var_depth = ffactory->getDepth();
+               found_type = true;
+            }
+         }
+         if (!found_type) {
+            tbox::Pointer<pdat::NodeDataFactory<double> > dfactory = factory;
+            if (!dfactory.isNull()) {
+               plotitem.d_var_centering = VISIT_NODE;
+               plotitem.d_var_data_type = VISIT_DOUBLE;
+               var_depth = dfactory->getDepth();
+               found_type = true;
+            }
+         }
+         if (!found_type) {
+            tbox::Pointer<pdat::NodeDataFactory<int> > ifactory = factory;
+            if (!ifactory.isNull()) {
+               plotitem.d_var_centering = VISIT_NODE;
+               plotitem.d_var_data_type = VISIT_INT;
+               var_depth = ifactory->getDepth();
+               found_type = true;
+            }
+         }
+
+         /*
+          * Make sure variable depth is sufficient for the specified type
+          * (SCALAR/VECTOR/TENSOR) with the start depth index.
+          */
+         int end_depth = start_depth_index + plotitem.d_depth;
+         if (var_depth < end_depth) {
+            TBOX_ERROR("VisItDataWriter::registerPlotQuantity"
+               << "\n    The variable: " << variable_name
+               << "\n    has insufficient depth for the type"
+               << "\n    and start depth index registered."
+               << "\n      var_type:           " << variable_type
+               << "\n      start_depth_index:  " << start_depth_index
+               << "\n      required min depth: " << end_depth
+               << std::endl);
+         }
+
+      } // factory.isNull
+
+   } // valid patch data index
+
+   if (!found_type) {
+      if (variable_centering == "CELL") {
+         plotitem.d_var_centering = VISIT_UNKNOWN_CELL;
+      } else if (variable_centering == "NODE") {
+         plotitem.d_var_centering = VISIT_UNKNOWN_NODE;
+      } else {
+         TBOX_ERROR("VisItDataWriter::registerPlotQuantity"
+            << "\n     Unable to determine the centering for"
+            << "\n     this variable; it must be supplied."
+            << "\n     The variable_centering argument is "
+            << variable_centering
+            << "\n     Possible entries are CELL or NODE"
+            << "\n     ***Exiting" << std::endl);
+      }
+
+      /*
+       * When the var centering is specified by the user, we assume
+       * it is of type double.  This implies the user should NOT try
+       * to register their undefined variables with type float or int.
+       */
+      plotitem.d_var_data_type = VISIT_DOUBLE;
+   }
+
+   /*
+    * Set the patch data index.
+    */
+   plotitem.d_patch_data_index = patch_data_index;
+   plotitem.d_level_patch_data_index.resizeArray(d_number_levels,
+      patch_data_index);
+
+   plotitem.d_visit_var_name.resizeArray(plotitem.d_depth);
+   char temp_buf[VISIT_NAME_BUFSIZE];
+   for (int i = 0; i < plotitem.d_depth; i++) {
+      if (plotitem.d_depth == 1) {
+         plotitem.d_visit_var_name[i] = variable_name;
+      } else {
+         sprintf(temp_buf, ".%02d", i);
+         plotitem.d_visit_var_name[i] = variable_name + temp_buf;
+      }
+   }
+
+   plotitem.d_scale_factor = scale_factor;
+   plotitem.d_start_depth_index = start_depth_index;
+
+   /*
+    * Initialize min/max information.
+    */
+   for (int i = 0; i < VISIT_MAX_NUMBER_COMPONENTS; i++) {
+      plotitem.d_master_min_max[i] = (patchMinMaxStruct *)NULL;
+   }
+
+   /*
+    * Set derived, coords, material, and species information NULL.
+    * If the variable is any of these types, this information
+    * should be set by the appropriate registration functions.
+    */
+   plotitem.d_is_derived = false;
+   plotitem.d_derived_writer = (VisDerivedDataStrategy *)NULL;
+   plotitem.d_is_deformed_coords = false;
+
+   plotitem.d_isa_material = false;
+   plotitem.d_materials_writer = (VisMaterialsDataStrategy *)NULL;
+
+   plotitem.d_isa_species = false;
+   plotitem.d_parent_material_pointer = (VisItItem *)NULL;
+
+   // default to CLEAN (not mixed data)
+   plotitem.d_is_material_state_variable = false;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private functions for parallel runs which serve as barriers to enable *
+ * orderly writing of cluster files by passing a baton from the current  *
+ * writer to the next proc in cluster, and so on.                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+#define VISIT_FILE_CLUSTER_WRITE_BATON 117
+
+void VisItDataWriter::dumpWriteBarrierBegin()
+{
+   int x[1], proc_before_me, len = 1;
+
+   if (d_file_cluster_leader) {
+      return;
+   } else {
+      proc_before_me = (d_my_file_cluster_number * d_file_cluster_size)
+         + d_my_rank_in_file_cluster - 1;
+
+      const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+      if (mpi.getSize() > 1) {
+         tbox::SAMRAI_MPI::Status status;
+         mpi.Recv(x,
+            len,
+            MPI_INT,
+            proc_before_me,
+            VISIT_FILE_CLUSTER_WRITE_BATON,
+            &status);
+      }
+   }
+}
+
+void VisItDataWriter::dumpWriteBarrierEnd()
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   int x[1], proc_after_me;
+   int num_procs = mpi.getSize();
+   proc_after_me = (d_my_file_cluster_number * d_file_cluster_size)
+      + d_my_rank_in_file_cluster + 1;
+   x[0] = 0;
+   if (proc_after_me < num_procs) {
+      if (mpi.getSize() > 1) {
+         mpi.Send(x,
+            1,
+            MPI_INT,
+            proc_after_me,
+            VISIT_FILE_CLUSTER_WRITE_BATON);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Write plot data from given hierarchy to HDF file                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VisItDataWriter::writePlotData(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   int time_step_number,
+   double simulation_time)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT(time_step_number >= 0);
+   TBOX_ASSERT(!d_top_level_directory_name.empty());
+
+   if (1) {
+      /*
+       * Currently, this class does not work unless the nodes
+       * have globally sequentialized indices.  Check for these.
+       */
+      hier::MappedBoxLevelConnectorUtils dlbg_edge_utils;
+      tbox::Pointer<hier::PatchHierarchy> patch_hierarchy = hierarchy;
+
+      if (patch_hierarchy.isNull()) {
+
+         tbox::Pointer<hier::MultiblockPatchHierarchy> mblk_hierarchy =
+            hierarchy;
+
+         TBOX_ASSERT(!mblk_hierarchy.isNull());
+
+         for (int b = 0; b < mblk_hierarchy->getNumberOfBlocks(); b++) {
+            tbox::Pointer<hier::PatchHierarchy> block_hierarchy =
+               mblk_hierarchy->getHierarchy(b);
+            for (int ln = 0; ln < block_hierarchy->getNumberOfLevels(); ln++) {
+               tbox::Pointer<hier::PatchLevel> level =
+                  block_hierarchy->getPatchLevel(ln);
+               const hier::MappedBoxLevel& unsorted_mapped_box_level =
+                  *level->getMappedBoxLevel();
+               hier::MappedBoxLevel sorted_mapped_box_level(d_dim);
+               hier::Connector unused_sorting_map;
+               dlbg_edge_utils.makeSortingMap(
+                  sorted_mapped_box_level,
+                  unused_sorting_map,
+                  unsorted_mapped_box_level,
+                  false,
+                  true);
+               if (sorted_mapped_box_level != unsorted_mapped_box_level) {
+                  TBOX_ERROR(
+                     "VisItDataWriter: Encountered existing limitation of VisItDataWriter\n"
+                     <<
+                     "This class cannot write files unless all patch levels have\n"
+                     <<
+                     "globally sequentialized nodes.  This can be accomplished\n"
+                     <<
+                     "by the sequentialize_patch_indices = TRUE input flag in\n"
+                     << "GriddingAlgorithm.  This problem can (and should\n"
+                     << "be fixed soon.");
+
+               }
+            }
+         }
+      } else {
+
+         for (int ln = 0; ln < patch_hierarchy->getNumberOfLevels(); ++ln) {
+            tbox::Pointer<hier::PatchLevel> level =
+               patch_hierarchy->getPatchLevel(ln);
+            const hier::MappedBoxLevel& unsorted_mapped_box_level =
+               *level->getMappedBoxLevel();
+            hier::MappedBoxLevel sorted_mapped_box_level(d_dim);
+            hier::Connector unused_sorting_map;
+            dlbg_edge_utils.makeSortingMap(
+               sorted_mapped_box_level,
+               unused_sorting_map,
+               unsorted_mapped_box_level,
+               false,
+               true);
+            if (sorted_mapped_box_level != unsorted_mapped_box_level) {
+               TBOX_ERROR(
+                  "VisItDataWriter: Encountered existing limitation of VisItDataWriter\n"
+                  <<
+                  "This class cannot write files unless all patch levels have\n"
+                  <<
+                  "globally sequentialized nodes.  This can be accomplished\n"
+                  <<
+                  "by the sequentialize_patch_indices = TRUE input flag in\n"
+                  << "GriddingAlgorithm.  This problem can (and should\n"
+                  << "be fixed soon.");
+
+            }
+         }
+      }
+   }
+
+   t_write_plot_data->start();
+
+   if (time_step_number <= d_time_step_number) {
+      TBOX_ERROR("VisItDataWriter::writePlotData"
+         << "\n    data writer with name " << d_object_name
+         << "\n    time step number: " << time_step_number
+         << " is <= last time step number: " << d_time_step_number
+         << std::endl);
+   }
+   d_time_step_number = time_step_number;
+
+   if ((d_materials_names.getSize() > 0) &&
+       (d_materials_writer == NULL)) {
+      TBOX_ERROR("VisItDataWriter::writePlotData"
+         << "\n    data writer with name " << d_object_name
+         << "\n    setMaterialsDataWriter() has not been called,"
+         << "\n    this method must be called when using materials."
+         << std::endl);
+   }
+
+   if (d_is_multiblock) {
+      d_number_levels = 0;
+      int finest_level_num = hierarchy->getFinestLevelNumber();
+      for (int ln = 0; ln <= finest_level_num; ln++) {
+         tbox::Pointer<hier::MultiblockPatchLevel> mblk_level =
+            hierarchy->getPatchLevel(ln);
+         for (int b = 0; b < mblk_level->getNumberOfBlocks(); b++) {
+            tbox::Pointer<hier::PatchLevel> patch_level =
+               mblk_level->getPatchLevelForBlock(b);
+            if (!patch_level.isNull()) {
+               d_number_levels++;
+            }
+         }
+      }
+   } else {
+
+      d_number_levels = hierarchy->getNumberOfLevels();
+
+   }
+   if (d_number_levels > d_scaling_ratios.getSize()) {
+      d_scaling_ratios.resizeArray(d_number_levels, hier::IntVector(d_dim));
+   }
+
+   if (d_is_multiblock) {
+      tbox::Pointer<hier::MultiblockPatchHierarchy> mblk_hierarchy =
+         hierarchy;
+      int nblocks = mblk_hierarchy->getNumberOfBlocks();
+      int level_counter = 0;
+      for (int ln = 0; ln <= mblk_hierarchy->getFinestLevelNumber(); ln++) {
+         tbox::Pointer<hier::MultiblockPatchLevel> level =
+            mblk_hierarchy->getPatchLevel(ln);
+         for (int b = 0; b < nblocks; b++) {
+            tbox::Pointer<hier::PatchLevel> patch_level =
+               level->getPatchLevelForBlock(b);
+            if (!patch_level.isNull()) {
+               if (ln == 0) {
+                  d_scaling_ratios[level_counter] = hier::IntVector::getOne(
+                        d_dim);
+               } else {
+                  d_scaling_ratios[level_counter] =
+                     patch_level->getRatioToCoarserLevel();
+               }
+               level_counter++;
+            }
+         }
+      }
+   } else {
+      for (int ln = 1; ln <= hierarchy->getFinestLevelNumber(); ln++) {
+         tbox::Pointer<hier::PatchLevel> level =
+            hierarchy->getPatchLevel(ln);
+         d_scaling_ratios[ln] = level->getRatioToCoarserLevel();
+      }
+   }
+
+   if (d_top_level_directory_name.empty()) {
+      TBOX_ERROR("VisItDataWriter::writePlotData"
+         << "\n    data writer with name " << d_object_name
+         << "\n     Dump Directory Name is not set" << std::endl);
+   }
+
+   int num_items_to_plot = d_number_visit_variables_plus_depth
+      + d_materials_names.getSize() // number of materials
+      + d_number_species;
+
+   if (num_items_to_plot == 0) {
+      TBOX_ERROR("VisItDataWriter::writePlotData"
+         << "\n    No VisIt variables have been registered."
+         << std::endl);
+   }
+
+   initializePlotVariableMinMaxInfo(hierarchy);
+
+   writeHDFFiles(hierarchy, simulation_time);
+
+   t_write_plot_data->stop();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Write plot data from given hierarchy to HDF file                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VisItDataWriter::setSummaryFilename(
+   std::string& filename)
+{
+   TBOX_ASSERT(!filename.empty());
+
+   d_summary_filename = filename + ".samrai";
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private function to initialize min/max information for the plot       *
+ * components.  This method will allocate space for the d_mm array on    *
+ * the VISIT_MASTER processsor (which holds min/max info for all plot    *
+ * variables on all patches) and will allocate the d_worker_min_max array   *
+ * on all processors except the VISIT_MASTER.  This latter array is used *
+ * to store data to be sent to the master when summary information is    *
+ * written.                                                              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VisItDataWriter::initializePlotVariableMinMaxInfo(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   /*
+    * Compute max number of patches on this processor.
+    */
+   int number_local_patches = 0;
+   int tot_number_of_patches = 0;
+
+   if (d_is_multiblock) {
+      for (int ln = 0; ln <= hierarchy->getFinestLevelNumber(); ln++) {
+         tbox::Pointer<hier::MultiblockPatchLevel> mblk_level =
+            hierarchy->getPatchLevel(ln);
+         for (int b = 0; b < mblk_level->getNumberOfBlocks(); b++) {
+            tbox::Pointer<hier::PatchLevel> patch_level =
+               mblk_level->getPatchLevelForBlock(b);
+            if (!patch_level.isNull()) {
+               tot_number_of_patches += patch_level->getGlobalNumberOfPatches();
+               for (hier::PatchLevel::Iterator ip(patch_level);
+                    ip; ip++) {
+                  number_local_patches++;
+               }
+            }
+         }
+      }
+   } else {
+      for (int ln = 0; ln <= hierarchy->getFinestLevelNumber(); ln++) {
+         tbox::Pointer<hier::PatchLevel> patch_level =
+            hierarchy->getPatchLevel(ln);
+         tot_number_of_patches += patch_level->getGlobalNumberOfPatches();
+         for (hier::PatchLevel::Iterator ip(patch_level);
+              ip; ip++) {
+            number_local_patches++;
+         }
+      }
+   }
+
+   int max_number_local_patches = number_local_patches;
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&max_number_local_patches, 1, MPI_MAX);
+   }
+
+   /*
+    * Determine number of worker processors.  NOTE: subract one because we
+    * don't want to count processor zero.
+    */
+   int count_me_in = 0;
+   if (number_local_patches > 0 || mpi.getRank() == VISIT_MASTER)
+      count_me_in = 1;
+   d_number_working_slaves = count_me_in;
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&d_number_working_slaves, 1, MPI_SUM);
+   }
+   d_number_working_slaves -= 1;
+
+   if (mpi.getRank() != VISIT_MASTER) {
+
+      /*
+       * Worker processor:  Allocate an array large enough to hold patch
+       * min max information.  Pack array by var_item, component number,
+       * level, and local patch number.
+       */
+      int num_items_to_plot = d_number_visit_variables_plus_depth
+         + d_materials_names.getSize() // number materials
+         + d_number_species;
+
+      int num_components = max_number_local_patches * num_items_to_plot;
+      if (d_worker_min_max != (patchMinMaxStruct *)NULL) {
+         delete[] d_worker_min_max;
+      }
+      d_worker_min_max = new patchMinMaxStruct[num_components];
+      memset((char *)d_worker_min_max, 0,
+         num_components * sizeof(patchMinMaxStruct));
+      for (int i = 0; i < num_components; i++) {
+         d_worker_min_max[i].patch_data_on_disk = false;
+         d_worker_min_max[i].min = tbox::MathUtilities<double>::getMax();
+         d_worker_min_max[i].max = tbox::MathUtilities<double>::getMin();
+         d_worker_min_max[i].material_composition_code =
+            VisMaterialsDataStrategy::VISIT_MIXED;
+         d_worker_min_max[i].species_composition_code =
+            VisMaterialsDataStrategy::VISIT_MIXED;
+      }
+
+   } else {   // (mpi.getRank() == VISIT_MASTER)
+
+      /*
+       * Master processor:  allocate array for each plot item to hold
+       * min/max information for ALL patches, on all levels.
+       */
+      for (tbox::List<VisItItem>::Iterator
+           ipi(d_plot_items); ipi; ipi++) {
+
+         for (int comp = 0; comp < ipi().d_depth; comp++) {
+
+            /*
+             * Create space for master min/max struct, if it doesn't
+             * already exist.
+             */
+            if (ipi().d_master_min_max[comp] != (patchMinMaxStruct *)NULL) {
+               delete[] ipi().d_master_min_max[comp];
+            }
+            patchMinMaxStruct* mm =
+               new patchMinMaxStruct[tot_number_of_patches];
+            memset((char *)mm, 0,
+               tot_number_of_patches * sizeof(patchMinMaxStruct));
+            ipi().d_master_min_max[comp] = mm;
+
+            for (int pn = 0; pn < number_local_patches; pn++) {
+               ipi().d_master_min_max[comp][pn].patch_data_on_disk = false;
+               ipi().d_master_min_max[comp][pn].min =
+                  tbox::MathUtilities<double>::getMax();
+               ipi().d_master_min_max[comp][pn].max =
+                  tbox::MathUtilities<double>::getMin();
+               ipi().d_master_min_max[comp][pn].material_composition_code =
+                  VisMaterialsDataStrategy::VISIT_MIXED;
+               ipi().d_master_min_max[comp][pn].species_composition_code =
+                  VisMaterialsDataStrategy::VISIT_MIXED;
+            }
+         }
+      }
+   } // proc == VISIT_MASTER
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private function to coordinate writing HDF plot files.                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VisItDataWriter::writeHDFFiles(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   double simulation_time)
+{
+
+   TBOX_ASSERT(!hierarchy.isNull());
+
+// Disable Intel warning about conversions
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:810)
+#endif
+
+   char temp_buf[VISIT_NAME_BUFSIZE];
+   std::string dump_dirname;
+   tbox::Database* visit_HDFFilePointer;
+
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   int num_procs = mpi.getSize();
+   int my_proc = mpi.getRank();
+
+   if (d_file_cluster_size > num_procs) {
+      d_file_cluster_size = num_procs;
+   }
+   d_my_file_cluster_number = my_proc / d_file_cluster_size;
+   d_my_rank_in_file_cluster = my_proc % d_file_cluster_size;
+
+   if (d_my_rank_in_file_cluster == 0) {
+      d_file_cluster_leader = true;
+   } else {
+      d_file_cluster_leader = false;
+   }
+
+   d_number_file_clusters =
+      static_cast<int>(ceil(static_cast<double>(num_procs)
+                          / static_cast<double>(d_file_cluster_size)));
+   d_number_files_this_file_cluster = d_file_cluster_size;
+
+   if (d_my_file_cluster_number == (d_number_file_clusters - 1)) {
+      // set d_number_files_this_file_cluster for last cluster
+      d_number_files_this_file_cluster =
+         num_procs - (d_file_cluster_size
+                      * (static_cast<int>(
+                            floor(static_cast<double>(num_procs)
+                               / static_cast<double>(d_file_cluster_size)))));
+      if (d_number_files_this_file_cluster == 0) {
+         d_number_files_this_file_cluster = d_file_cluster_size;
+      }
+   }
+
+   d_processor_in_file_cluster_number.resizeArray(num_procs);
+   for (int i = 0; i < num_procs; i++) {
+      d_processor_in_file_cluster_number[i] = i / d_file_cluster_size;
+   }
+
+   tbox::Pointer<tbox::Database> processor_HDFGroup;
+   sprintf(temp_buf, "%05d", d_time_step_number);
+   d_current_dump_directory_name = "visit_dump.";
+   d_current_dump_directory_name += temp_buf;
+   dump_dirname = d_top_level_directory_name + "/";
+   dump_dirname = dump_dirname + d_current_dump_directory_name;
+   tbox::Utilities::recursiveMkdir(dump_dirname);
+
+// The baton barrier implementation seems to be buggy, and can affect
+// other mpi writes and reads.
+
+//#define USE_BATON_BARRIERS
+
+#ifdef USE_BATON_BARRIERS
+   dumpWriteBarrierBegin();
+#endif
+   {
+      // cluster_leader guaranteed to enter this section before anyone else
+      sprintf(temp_buf, "/processor_cluster.%05d.samrai",
+         d_my_file_cluster_number);
+      std::string database_name(temp_buf);
+      std::string visit_HDFFilename = dump_dirname + database_name;
+      visit_HDFFilePointer = new tbox::HDFDatabase(database_name);
+      if (d_file_cluster_leader) {
+
+         // creates the HDF file:
+         //      dirname/visit_dump.000n/processor_cluster.000m.samrai
+         //      where n is timestep #, m is processor number
+         visit_HDFFilePointer->create(visit_HDFFilename);
+
+      } else {
+         // file already created other procs just need to open it
+         if (!visit_HDFFilePointer->open(visit_HDFFilename)) {
+            TBOX_ERROR("VisItDataWriter::writeHDFFiles"
+               << "\n    data writer with name " << d_object_name
+               << "\n    Error attempting to open visit file "
+               << visit_HDFFilename << std::endl);
+         }
+      }
+
+      // create group for this proc
+      sprintf(temp_buf, "processor.%05d", my_proc);
+      processor_HDFGroup =
+         visit_HDFFilePointer->putDatabase(std::string(temp_buf));
+      writeVisItVariablesToHDFFile(processor_HDFGroup,
+         hierarchy,
+         0,
+         hierarchy->getFinestLevelNumber());
+      visit_HDFFilePointer->close(); // invokes H5FClose
+      delete visit_HDFFilePointer; // deletes tbox::HDFDatabase object
+   }
+
+#ifdef USE_BATON_BARRIERS
+   dumpWriteBarrierEnd();
+#endif
+
+   /*
+    * When using DLBG, the globalized data is not saved by default,
+    * so it must be generated, requiring communication.
+    * To avoid mixing these communications and those required
+    * in writing plot data, execute a function to compute and
+    * cache the globalized data.
+    */
+   if (d_is_multiblock) {
+
+      for (int ln = 0; ln < hierarchy->getNumberOfLevels(); ++ln) {
+         tbox::Pointer<hier::MultiblockPatchLevel> mblk_level =
+            hierarchy->getPatchLevel(ln);
+         int nblocks = mblk_level->getNumberOfBlocks();
+
+         for (int nb = 0; nb < nblocks; nb++) {
+            tbox::Pointer<hier::PatchLevel> level =
+               mblk_level->getPatchLevelForBlock(nb);
+            if (!level.isNull()) {
+               level->getBoxes();
+            }
+         }
+      }
+
+   } else {
+      for (int ln = 0; ln < hierarchy->getNumberOfLevels(); ++ln) {
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+         level->getBoxes();
+      }
+   }
+
+   tbox::SAMRAI_MPI::getSAMRAIWorld().Barrier();
+
+   writeSummaryToHDFFile(dump_dirname,
+      hierarchy,
+      0,
+      hierarchy->getFinestLevelNumber(),
+      simulation_time);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private function to find global patch number, given level number and  *
+ * local patch number. This is needed because SAMRAI maintains the patch *
+ * number on each level, but VisIt needs a unique number for each patch  *
+ * written.                                                              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int VisItDataWriter::getGlobalPatchNumber(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const int block_number,
+   const int patch_number)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT(level_number >= 0);
+   TBOX_ASSERT(block_number >= -1);
+   TBOX_ASSERT(patch_number >= 0);
+
+   int global_patch_id = 0;
+
+   if (d_is_multiblock) {
+      for (int i = 0; i < level_number; i++) {
+         tbox::Pointer<hier::MultiblockPatchLevel> mblk_level =
+            hierarchy->getPatchLevel(i);
+         int nblocks = mblk_level->getNumberOfBlocks();
+         for (int b = 0; b < nblocks; b++) {
+            tbox::Pointer<hier::PatchLevel> patch_level =
+               mblk_level->getPatchLevelForBlock(b);
+            if (!patch_level.isNull()) {
+               global_patch_id += patch_level->getGlobalNumberOfPatches();
+            }
+         }
+      }
+      tbox::Pointer<hier::MultiblockPatchLevel> this_mblk_level =
+         hierarchy->getPatchLevel(level_number);
+
+      for (int b = 0; b < block_number; b++) {
+         tbox::Pointer<hier::PatchLevel> this_patch_level =
+            this_mblk_level->getPatchLevelForBlock(b);
+         if (!this_patch_level.isNull()) {
+            global_patch_id += this_patch_level->getGlobalNumberOfPatches();
+         }
+      }
+
+   } else {
+
+      for (int i = 0; i < level_number; i++) {
+         tbox::Pointer<hier::PatchLevel> patch_level =
+            hierarchy->getPatchLevel(i);
+         global_patch_id += patch_level->getGlobalNumberOfPatches();
+      }
+
+   }
+
+   global_patch_id += patch_number;
+   return global_patch_id;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private function to write variables & materials data to an HDF File.  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VisItDataWriter::writeVisItVariablesToHDFFile(
+   tbox::Pointer<tbox::Database> processor_HDFGroup,
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   int coarsest_level,
+   int finest_level)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT(coarsest_level >= 0);
+   TBOX_ASSERT(finest_level >= 0);
+
+   /*
+    * Reset the var_id_ctr - this is used to record min/max summary
+    * information for every plotted variable on the patch.  It is incremented
+    * for each component (i.e. depth), of each variable, of each patch.
+    */
+   d_var_id_ctr = 0;
+
+   char temp_buf[VISIT_NAME_BUFSIZE];
+   tbox::Pointer<tbox::Database> level_HDFGroup, patch_HDFGroup;
+
+   if (d_is_multiblock) {
+
+      int unique_level_number = coarsest_level;
+      for (int ln = coarsest_level; ln <= finest_level; ln++) {
+
+         /*
+          * create new HDFGroup for this level
+          */
+         tbox::Pointer<hier::MultiblockPatchLevel> mblk_level =
+            hierarchy->getPatchLevel(ln);
+
+         int nblocks = mblk_level->getNumberOfBlocks();
+
+         int patch_counter = 0;
+         for (int b = 0; b < nblocks; b++) {
+            tbox::Pointer<hier::PatchLevel> patch_level =
+               mblk_level->getPatchLevelForBlock(b);
+
+            if (!patch_level.isNull()) {
+
+               sprintf(temp_buf, "level.%05d", unique_level_number);
+               level_HDFGroup =
+                  processor_HDFGroup->putDatabase(std::string(temp_buf));
+               unique_level_number++;
+
+               hier::IntVector coarsen_ratio(
+                  patch_level->getRatioToCoarserLevel());
+
+               for (hier::PatchLevel::Iterator ip(patch_level);
+                    ip; ip++) {
+                  tbox::Pointer<hier::Patch> patch = *ip;
+
+                  /*
+                   * create new HDFGroup for this patch
+                   */
+                  int pn = patch->getLocalId().getValue();
+                  sprintf(temp_buf, "patch.%05d", pn);
+                  patch_HDFGroup =
+                     level_HDFGroup->putDatabase(std::string(temp_buf));
+
+                  int curr_var_id_ctr = d_var_id_ctr;
+                  packRegularAndDerivedData(patch_HDFGroup,
+                     hierarchy,
+                     ln,
+                     b,
+                     *patch);
+
+                  if (d_materials_names.getSize() > 0) {
+                     d_var_id_ctr = curr_var_id_ctr;
+                     packMaterialsData(patch_HDFGroup,
+                        hierarchy,
+                        ln,
+                        b,
+                        *patch);
+
+                     d_var_id_ctr = curr_var_id_ctr;
+                     packSpeciesData(hierarchy,
+                        ln,
+                        b,
+                        *patch);
+                  }
+
+               }
+               patch_counter += patch_level->getGlobalNumberOfPatches();
+            }
+         }
+      }
+   } else {
+      for (int ln = coarsest_level; ln <= finest_level; ln++) {
+
+         /*
+          * create new HDFGroup for this level
+          */
+         sprintf(temp_buf, "level.%05d", ln);
+         level_HDFGroup = processor_HDFGroup->putDatabase(std::string(temp_buf));
+
+         tbox::Pointer<hier::PatchLevel> patch_level =
+            hierarchy->getPatchLevel(ln);
+
+         hier::IntVector coarsen_ratio(patch_level->getRatioToCoarserLevel());
+
+         for (hier::PatchLevel::Iterator ip(patch_level);
+              ip; ip++) {
+            tbox::Pointer<hier::Patch> patch = *ip;
+
+            /*
+             * create new HDFGroup for this patch
+             */
+            int pn = patch->getLocalId().getValue();
+            sprintf(temp_buf, "patch.%05d", pn);
+            patch_HDFGroup = level_HDFGroup->putDatabase(std::string(temp_buf));
+
+            int bn = -1;
+            int curr_var_id_ctr = d_var_id_ctr;
+            packRegularAndDerivedData(patch_HDFGroup,
+               hierarchy,
+               ln,
+               bn,
+               *patch);
+
+            if (d_materials_names.getSize() > 0) {
+               d_var_id_ctr = curr_var_id_ctr;
+               packMaterialsData(patch_HDFGroup,
+                  hierarchy,
+                  ln,
+                  bn,
+                  *patch);
+
+               d_var_id_ctr = curr_var_id_ctr;
+               packSpeciesData(hierarchy,
+                  ln,
+                  bn,
+                  *patch);
+            }
+
+         }
+      }
+   }
+
+   /*
+    * Clean up from packing operations.  If this is not done there is a dangling smart
+    * pointer reference to HDF5 groups and the file may not be written/closed.
+    */
+   for (tbox::List<VisItItem>::Iterator
+        ipi(d_plot_items); ipi; ipi++) {
+      ipi().d_species_HDFGroup = NULL;
+      ipi().d_extents_species_HDFGroup = NULL;
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private function to pack regular and derived VisIt variables into     *
+ * specified HDF database.                                               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VisItDataWriter::packRegularAndDerivedData(
+   tbox::Pointer<tbox::Database> patch_HDFGroup,
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const int block_number,
+   hier::Patch& patch)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT(level_number >= 0);
+   TBOX_ASSERT(block_number >= -1);
+
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   /*
+    * Loop over variables and write out those that are NOT
+    * material or species variables.
+    */
+   for (tbox::List<VisItItem>::Iterator
+        ipi(d_plot_items); ipi; ipi++) {
+
+      /*
+       * Only write regular (non-derived) and derived vars, not
+       * material or spacies vars.
+       */
+      if (!(ipi().d_isa_material || ipi().d_isa_species)) {
+
+         /*
+          * create buffer to hold patch data
+          */
+         int buf_size = getBufferSize(patch.getBox(),
+               hier::IntVector::getZero(d_dim),
+               ipi().d_var_centering);
+
+         double* dbuffer = new double[buf_size]; // used to pack var
+         float* fbuffer = new float[buf_size]; // copy to float for writing
+
+         // Check for mixed/clean state variables
+         if (!(ipi().d_is_material_state_variable)) { // Conventional variable
+            for (int depth_id = 0; depth_id < ipi().d_depth; depth_id++) {
+
+               /*
+                * If its derived data, pack via the derived writer.
+                * Otherwise, pack with local private method.
+                */
+               bool data_exists_on_patch = false;
+               int patch_data_id = VISIT_UNDEFINED_INDEX;
+               if (ipi().d_is_derived) {
+
+                  // derived data
+                  data_exists_on_patch =
+                     ipi().d_derived_writer->
+                     packDerivedDataIntoDoubleBuffer(
+                        dbuffer,
+                        patch,
+                        patch.getBox(),
+                        ipi().d_var_name,
+                        depth_id);
+
+               } else {
+
+                  /*
+                   * Check if patch data id has been reset on the level.  If
+                   * not, just use the original registered data id.
+                   */
+                  patch_data_id = ipi().d_patch_data_index;
+                  if (ipi().d_level_patch_data_index.getSize() >
+                      level_number) {
+                     patch_data_id =
+                        ipi().d_level_patch_data_index[level_number];
+                  }
+
+                  data_exists_on_patch =
+                     patch.checkAllocated(patch_data_id);
+
+                  if (data_exists_on_patch) {
+                     int new_depth_id = ipi().d_start_depth_index + depth_id;
+
+                     // regular (non-derived) data
+                     packPatchDataIntoDoubleBuffer(
+                        patch.getPatchData(patch_data_id),
+                        new_depth_id,
+                        ipi().d_var_data_type,
+                        patch.getBox(),
+                        dbuffer,
+                        ipi().d_var_centering);
+                  }
+               }
+
+               double dmax = -tbox::MathUtilities<double>::getMax();
+               double dmin = tbox::MathUtilities<double>::getMax();
+
+               if (data_exists_on_patch) {
+
+                  /*
+                   * Scale data (while still double)
+                   */
+                  const double scale = ipi().d_scale_factor;
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1572)
+#endif
+                  if (scale != 1.0) {
+                     for (int i = 0; i < buf_size; i++) {
+                        dbuffer[i] *= scale;
+                     }
+                  }
+
+                  /*
+                   * Determine patch min/max.
+                   */
+
+                  for (int i = 0; i < buf_size; i++) {
+                     if (dbuffer[i] > dmax) {
+                        dmax = dbuffer[i];
+                     }
+                     if (dbuffer[i] < dmin) {
+                        dmin = dbuffer[i];
+                     }
+                  }
+
+                  checkFloatMinMax(ipi().d_visit_var_name[depth_id],
+                     dmin,
+                     dmax,
+                     level_number,
+                     patch.getLocalId().getValue(),
+                     patch_data_id);
+
+                  /*
+                   * Convert buffer from double to float
+                   */
+                  for (int i = 0; i < buf_size; i++) {
+                     fbuffer[i] = static_cast<float>(dbuffer[i]);
+                  }
+
+                  /*
+                   * Write to disk
+                   */
+                  std::string vname = ipi().d_visit_var_name[depth_id];
+                  patch_HDFGroup->putFloatArray(vname,
+                     fbuffer,
+                     buf_size);
+
+               } else { // data does not exist on patch
+
+                  dmax = 0.;
+                  dmin = 0.;
+
+               }
+
+               /*
+                * Write min/max summary info
+                */
+               if (mpi.getRank() == VISIT_MASTER) {
+                  int gpn = getGlobalPatchNumber(hierarchy,
+                        level_number,
+                        block_number,
+                                                 patch.getLocalId().getValue());
+                  ipi().d_master_min_max[depth_id][gpn].patch_data_on_disk =
+                     data_exists_on_patch;
+                  ipi().d_master_min_max[depth_id][gpn].min = dmin;
+                  ipi().d_master_min_max[depth_id][gpn].max = dmax;
+               } else {
+                  d_worker_min_max[d_var_id_ctr].patch_data_on_disk =
+                     data_exists_on_patch;
+                  d_worker_min_max[d_var_id_ctr].min = dmin;
+                  d_worker_min_max[d_var_id_ctr].max = dmax;
+               }
+
+               /*
+                * Increment local var_id counter used for d_mm array.
+                */
+               d_var_id_ctr++;
+
+            } // loop over var depths
+         } // conventional (not material state) variable
+         else { // Data is mixed
+            for (int depth_id = 0; depth_id < ipi().d_depth; depth_id++) {
+               std::vector<double> dmix_data;
+
+               /*
+                * If its derived data, pack via the derived writer.
+                * Otherwise, pack with local private method.
+                */
+               bool data_exists_on_patch = false;
+               int patch_data_id = VISIT_UNDEFINED_INDEX;
+               if (ipi().d_is_derived) {
+
+                  // Single function packs clean and mixed data
+                  data_exists_on_patch =
+                     ipi().d_derived_writer->
+                     packMixedDerivedDataIntoDoubleBuffer(
+                        dbuffer,
+                        dmix_data,
+                        patch,
+                        patch.getBox(),
+                        ipi().d_var_name,
+                        depth_id);
+
+               } else {
+                  TBOX_ERROR("Mixed Data must be treated as Derived");
+               }
+
+               double dmax = -tbox::MathUtilities<double>::getMax();
+               double dmin = tbox::MathUtilities<double>::getMax();
+
+               if (data_exists_on_patch) {
+
+                  /*
+                   * Scale data (while still double)
+                   */
+                  const double scale = ipi().d_scale_factor;
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1572)
+#endif
+                  if (scale != 1.0) {
+                     for (int i = 0; i < buf_size; i++) {
+                        dbuffer[i] *= scale;
+                     }
+                     // Scale Mixed data
+                     for (std::vector<double>::iterator mi = dmix_data.begin();
+                          mi != dmix_data.end(); ++mi) {
+                        (*mi) *= scale;
+                     }
+                  }
+
+                  /*
+                   * Determine patch min/max.
+                   */
+
+                  int i;
+                  for (i = 0; i < buf_size; i++) {
+                     if (dbuffer[i] > dmax) {
+                        dmax = dbuffer[i];
+                     }
+                     if (dbuffer[i] < dmin) {
+                        dmin = dbuffer[i];
+                     }
+                  }
+                  // Include mix data in patch min/max
+                  for (std::vector<double>::iterator mi = dmix_data.begin();
+                       mi != dmix_data.end(); ++mi) {
+                     if ((*mi) > dmax) {
+                        dmax = (*mi);
+                     }
+                     if ((*mi) < dmin) {
+                        dmin = (*mi);
+                     }
+                  }
+
+                  checkFloatMinMax(ipi().d_visit_var_name[depth_id],
+                     dmin,
+                     dmax,
+                     level_number,
+                     patch.getLocalId().getValue(),
+                     patch_data_id);
+
+                  /*
+                   * Convert buffer from double to float
+                   */
+                  for (i = 0; i < buf_size; i++) {
+                     fbuffer[i] = static_cast<float>(dbuffer[i]);
+                  }
+
+                  /*
+                   * Write to disk
+                   */
+                  std::string vname = ipi().d_visit_var_name[depth_id];
+                  patch_HDFGroup->putFloatArray(vname,
+                     fbuffer,
+                     buf_size);
+
+                  // If there are no mixed zones in this patch do not write
+                  //   mix_zone, mix_mat, vol_fracs, and next_mat
+                  int mix_buf_size = static_cast<int>(dmix_data.size());
+                  if (mix_buf_size > 0) {
+                     // copy mixdata to float for writing
+                     // If we had a putFloatVector() this copy could be avoided
+                     float* fmixbuffer = new float[mix_buf_size];
+                     //std::copy(dmix_data.begin(),dmix_data.end(),fmixbuffer);
+                     for (i = 0; i < mix_buf_size; i++) {
+                        fmixbuffer[i] = static_cast<float>(dmix_data[i]);
+                     }
+
+                     /*
+                      * Write Mixed State Variable to disk
+                      * We need to know where to write this
+                      */
+
+                     // Use an HDF Group for all material state data
+                     tbox::Pointer<tbox::Database> mat_state_HDFGroup;
+                     if (patch_HDFGroup->isDatabase("material_state")) {
+                        mat_state_HDFGroup =
+                           patch_HDFGroup->getDatabase("material_state");
+                     } else {
+                        mat_state_HDFGroup =
+                           patch_HDFGroup->putDatabase("material_state");
+                     }
+                     mat_state_HDFGroup->putFloatArray(vname,
+                        fmixbuffer,
+                        mix_buf_size);
+
+                     // For now assume that this buffer cannot be reused.
+                     delete[] fmixbuffer;
+                  }
+
+               } else { // data does not exist on patch
+
+                  dmax = 0.;
+                  dmin = 0.;
+
+               }
+
+               /*
+                * Write min/max summary info
+                */
+               if (mpi.getRank() == VISIT_MASTER) {
+                  int gpn = getGlobalPatchNumber(hierarchy,
+                        level_number,
+                        block_number,
+                        patch.getLocalId().getValue());
+                  ipi().d_master_min_max[depth_id][gpn].patch_data_on_disk =
+                     data_exists_on_patch;
+                  ipi().d_master_min_max[depth_id][gpn].min = dmin;
+                  ipi().d_master_min_max[depth_id][gpn].max = dmax;
+               } else {
+                  d_worker_min_max[d_var_id_ctr].patch_data_on_disk =
+                     data_exists_on_patch;
+                  d_worker_min_max[d_var_id_ctr].min = dmin;
+                  d_worker_min_max[d_var_id_ctr].max = dmax;
+               }
+
+               /*
+                * Increment local var_id counter used for d_mm array.
+                */
+               d_var_id_ctr++;
+
+            } // loop over var depths
+
+         } // material_state variable
+
+         delete[] dbuffer;
+         delete[] fbuffer;
+
+      } // var is not species or material
+      else {
+         for (int depth_id = 0; depth_id < ipi().d_depth; ++depth_id) {
+            d_var_id_ctr++;
+         }
+      }
+
+   } // iterate over vars
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private function to pack Material variables into specified HDF        *
+ * database.                                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VisItDataWriter::packMaterialsData(
+   tbox::Pointer<tbox::Database> patch_HDFGroup,
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const int block_number,
+   hier::Patch& patch)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT(level_number >= 0);
+   TBOX_ASSERT(block_number >= -1);
+
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   /*
+    * Loop over variables and pull out those that are material variables.
+    */
+   tbox::Pointer<tbox::Database> materials_HDFGroup;
+   tbox::Pointer<tbox::Database> material_name_HDFGroup;
+   for (tbox::List<VisItItem>::Iterator
+        ipi(d_plot_items); ipi; ipi++) {
+
+      if (ipi().d_isa_material) {
+
+         /*
+          * create buffer to hold patch data
+          */
+         int buf_size = getBufferSize(patch.getBox(),
+               hier::IntVector::getZero(d_dim),
+               ipi().d_var_centering);
+
+         // Pointers to buffers for dense packing format
+         double* dbuffer = NULL; // used to pack var
+         float* fbuffer = NULL;   // copy to float for writing
+         // Pointer to buffer for sparse packing format
+         int* ibuffer = NULL;      // used to pack mat_list
+
+         // Allocate appropriate memory for packing format
+         if (!(ipi().d_is_material_state_variable)) {
+            dbuffer = new double[buf_size];
+            fbuffer = new float[buf_size];
+         } else {
+            ibuffer = new int[buf_size];
+         }
+
+         for (int depth_id = 0; depth_id < ipi().d_depth; depth_id++) {
+
+            /*
+             * Create the "materials" HDF database entry:
+             * <patch HDF group>
+             *    "materials"  (only if there are materials)
+             *       material_name
+             *          "species"    (only if matl has species)
+             */
+            if (materials_HDFGroup.isNull()) {
+               materials_HDFGroup =
+                  patch_HDFGroup->putDatabase("materials");
+            }
+
+            double dmax = -tbox::MathUtilities<double>::getMax();
+            double dmin = tbox::MathUtilities<double>::getMax();
+            bool data_on_disk = false;
+
+            int return_code;
+
+            /*
+             * Method for Sparse representation of materials (and volume
+             *   fractions)
+             */
+            if ((ipi().d_is_material_state_variable)) {
+               /*
+                * Sparse packing method
+                * This requires packing an array of integers (mat_list) with
+                *   either the material number of the material occupying the
+                *   current cell, or a (negative) index to a set of auxilliary>                 *   vectors.
+                *   mat_list:  Material occupying clean zone or (negative)
+                *              index to mix_mat, vol_fracs, and next_mat
+                *   mix_zones: Cell with which the mixed data is associated
+                *   mix_mat:   Material number of partial volumes
+                *   vol_fracs: Volume fractions of materials specified by
+                *              mix_mat
+                *   next_mat:  Next index if there are more materials in mixed>                 *              zone, or zero to indicate mixed zone is complete
+                * If the patch is occupied by a single material this can be
+                *   indicated by returning
+                *   VisMaterialsDataStrategy::VISIT_ALLONE from
+                *   packMaterialFractionsIntoSparseBuffers(). This will further
+                *   reduce the file size by only writing one entry for mat_list
+                *   which indicates the material for the current patch.
+                */
+
+               std::vector<int> mix_zones;
+               std::vector<int> mix_mat;
+               std::vector<double> vol_fracs;
+               std::vector<int> next_mat;
+
+               return_code = d_materials_writer->
+                  packMaterialFractionsIntoSparseBuffers(
+                     ibuffer, mix_zones, mix_mat, vol_fracs, next_mat,
+                     patch, patch.getBox());
+
+               /*
+                * Write to disk
+                */
+               // Mark material storage type as dense
+               std::string mtype = "material_packing_type";
+               materials_HDFGroup->putInteger(mtype, 1);
+               std::string vname = "mat_list";
+
+               // Is the patch "clean" (ALL_ONE)
+               if (return_code == VisMaterialsDataStrategy::VISIT_ALLONE) {
+                  materials_HDFGroup->putIntegerArray(vname,
+                     ibuffer,
+                     1);
+               } else { // Otherwise write full mat_list
+                  materials_HDFGroup->putIntegerArray(vname,
+                     ibuffer,
+                     buf_size);
+               }
+               // The limits should always be 0.0 to 1.0 for volume_fractions
+               //   Do this as a check (?)
+               dmax = 1.0;
+               dmin = 0.0;
+               data_on_disk = true;
+               // Are there mixed cells?
+               if (mix_zones.size() > 0) {
+                  TBOX_ASSERT((mix_zones.size() == mix_mat.size()) &&
+                     (mix_zones.size() == vol_fracs.size()) &&
+                     (mix_zones.size() == next_mat.size()));
+
+                  /*
+                   * Determine patch min/max.
+                   */
+                  for (std::vector<double>::iterator vf = vol_fracs.begin();
+                       vf != vol_fracs.end(); ++vf) {
+                     if ((*vf) > dmax) {
+                        dmax = (*vf);
+                     }
+                     if ((*vf) < dmin) {
+                        dmin = (*vf);
+                     }
+                  }
+
+                  int dummy_pdata_id = VISIT_UNDEFINED_INDEX;
+                  checkFloatMinMax(ipi().d_visit_var_name[depth_id],
+                     dmin,
+                     dmax,
+                     level_number,
+                     patch.getLocalId().getValue(),
+                     dummy_pdata_id);
+
+                  vname = "mix_zones";
+                  materials_HDFGroup->putIntegerArray(vname,
+                     &mix_zones[0],
+                     static_cast<int>(mix_mat.size()));
+
+                  vname = "mix_mat";
+                  materials_HDFGroup->putIntegerArray(vname,
+                     &mix_mat[0],
+                     static_cast<int>(mix_mat.size()));
+
+                  // allocate buffer for volume fraction data
+                  float* fmix_data_buffer;
+                  fmix_data_buffer = new float[mix_mat.size()];
+                  /*
+                   * Convert buffer from double to float
+                   */
+                  for (unsigned int i = 0; i < vol_fracs.size(); i++) {
+                     fmix_data_buffer[i] = static_cast<float>(vol_fracs[i]);
+                  }
+
+                  vname = "vol_fracs";
+                  materials_HDFGroup->putFloatArray(vname,
+                     fmix_data_buffer,
+                     static_cast<int>(mix_mat.size()));
+
+                  vname = "next_mat";
+                  materials_HDFGroup->putIntegerArray(vname,
+                     &next_mat[0],
+                     static_cast<int>(mix_mat.size()));
+                  // cleanup buffer
+                  delete[] fmix_data_buffer;
+               }
+            } else { // Legacy material format
+                     // Mark material storage type as dense (only once per patch)
+               std::string mtype = "material_packing_type";
+               if (!(materials_HDFGroup->isInteger(mtype))) {
+                  materials_HDFGroup->putInteger(mtype, 0);
+               }
+
+               // create materials_name HDF database
+               std::string mname = ipi().d_material_name;
+               material_name_HDFGroup =
+                  materials_HDFGroup->putDatabase(mname);
+
+               // create "species" HDF database for material name
+               if (ipi().d_species_names.getSize() > 0) {
+                  ipi().d_species_HDFGroup =
+                     material_name_HDFGroup->putDatabase("species");
+               }
+
+               // pack the buffer with material data
+               return_code = d_materials_writer->
+                  packMaterialFractionsIntoDoubleBuffer(
+                     dbuffer,
+                     patch,
+                     patch.getBox(),
+                     ipi().d_material_name);
+
+               // check return code
+               if ((return_code != VisMaterialsDataStrategy::VISIT_MIXED)
+                   && (return_code !=
+                       VisMaterialsDataStrategy::VISIT_ALLONE)
+                   && (return_code !=
+                       VisMaterialsDataStrategy::VISIT_ALLZERO)) {
+                  TBOX_ERROR(
+                     "VisItDataWriter::packMaterialsData()"
+                     << "\n    Invalid return value from "
+                     << "packMaterialFractionsIntoDoubleBuffer()\n");
+               }
+
+               if (return_code == VisMaterialsDataStrategy::VISIT_MIXED) {
+
+                  data_on_disk = true;
+
+                  /*
+                   * Scale data (while still double)
+                   */
+                  const double scale = ipi().d_scale_factor;
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1572)
+#endif
+                  if (scale != 1.0) {
+                     for (int i = 0; i < buf_size; i++) {
+                        dbuffer[i] *= scale;
+                     }
+                  }
+
+                  /*
+                   * Determine patch min/max.
+                   */
+                  int i;
+                  for (i = 0; i < buf_size; i++) {
+                     if (dbuffer[i] > dmax) {
+                        dmax = dbuffer[i];
+                     }
+                     if (dbuffer[i] < dmin) {
+                        dmin = dbuffer[i];
+                     }
+                  }
+
+                  int dummy_pdata_id = VISIT_UNDEFINED_INDEX;
+                  checkFloatMinMax(ipi().d_visit_var_name[depth_id],
+                     dmin,
+                     dmax,
+                     level_number,
+                     patch.getLocalId().getValue(),
+                     dummy_pdata_id);
+
+                  /*
+                   * Convert buffer from double to float
+                   */
+                  for (i = 0; i < buf_size; i++) {
+                     fbuffer[i] = static_cast<float>(dbuffer[i]);
+                  }
+
+                  /*
+                   * Write to disk
+                   */
+                  std::string vname = ipi().d_material_name;
+                  vname = vname + "-fractions";
+                  material_name_HDFGroup->putFloatArray(vname,
+                     fbuffer,
+                     buf_size);
+
+               } else if (return_code ==
+                          VisMaterialsDataStrategy::VISIT_ALLONE) {
+
+                  data_on_disk = false;
+                  dmin = 1.0;
+                  dmax = 1.0;
+
+               } else { // return code == VISIT_ALLZERO
+
+                  data_on_disk = false;
+                  dmin = 0.0;
+                  dmax = 0.0;
+
+               }
+            }
+
+            /*
+             * Write min/max summary info
+             */
+            if (mpi.getRank() == VISIT_MASTER) {
+               int gpn = getGlobalPatchNumber(hierarchy,
+                     level_number,
+                     block_number,
+                     patch.getLocalId().getValue());
+               ipi().d_master_min_max[depth_id][gpn].patch_data_on_disk =
+                  data_on_disk;
+               ipi().d_master_min_max[depth_id][gpn].min = dmin;
+               ipi().d_master_min_max[depth_id][gpn].max = dmax;
+               ipi().d_master_min_max[depth_id][gpn].
+               material_composition_code = return_code;
+            } else {
+               d_worker_min_max[d_var_id_ctr].patch_data_on_disk =
+                  data_on_disk;
+               d_worker_min_max[d_var_id_ctr].min = dmin;
+               d_worker_min_max[d_var_id_ctr].max = dmax;
+               d_worker_min_max[d_var_id_ctr].material_composition_code =
+                  return_code;
+            }
+
+            /*
+             * Increment local var_id counter used for d_mm array.
+             */
+            d_var_id_ctr++;
+
+         } // loop over var depths
+
+         // Dense packing format delete buffers
+         if (!(ipi().d_is_material_state_variable)) {
+            delete[] fbuffer;
+            delete[] dbuffer;
+         } else { // Delete buffer used for sparse format
+            delete[] ibuffer;
+         }
+
+      } // var is a material
+      else {
+         for (int depth_id = 0; depth_id < ipi().d_depth; depth_id++) {
+            d_var_id_ctr++;
+         }
+      }
+
+   } // iterate over vars
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private function to pack Species variables into specified HDF         *
+ * database.                                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VisItDataWriter::packSpeciesData(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const int block_number,
+   hier::Patch& patch)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT(level_number >= 0);
+   TBOX_ASSERT(block_number >= -1);
+
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   /*
+    * Loop over variables and pull out those that are material variables.
+    */
+   for (tbox::List<VisItItem>::Iterator
+        ipi(d_plot_items); ipi; ipi++) {
+
+      if (ipi().d_isa_species) {
+
+         /*
+          * create buffer to hold patch data
+          */
+         int buf_size = getBufferSize(patch.getBox(),
+               hier::IntVector::getZero(d_dim),
+               ipi().d_var_centering);
+
+         double* dbuffer = new double[buf_size]; // used to pack var
+         float* fbuffer = new float[buf_size]; // copy to float for writing
+
+         for (int depth_id = 0; depth_id < ipi().d_depth; depth_id++) {
+
+            // pack the buffer with species data
+            int return_code = d_materials_writer->
+               packSpeciesFractionsIntoDoubleBuffer(
+                  dbuffer,
+                  patch,
+                  patch.getBox(),
+                  ipi().d_material_name,
+                  ipi().d_species_name);
+
+            // check return code
+            if ((return_code != VisMaterialsDataStrategy::VISIT_MIXED)
+                && (return_code !=
+                    VisMaterialsDataStrategy::VISIT_ALLONE)
+                && (return_code ==
+                    VisMaterialsDataStrategy::VISIT_ALLZERO)) {
+               TBOX_ERROR("VisItDataWriter::packSpeciesData()"
+                  << "\n    Invalid return value from "
+                  << "packSpeciesFractionsIntoDoubleBuffer()\n"
+                  << std::endl);
+            }
+
+            double dmax = -tbox::MathUtilities<double>::getMax();
+            double dmin = tbox::MathUtilities<double>::getMax();
+            bool data_on_disk = false;
+
+            if (return_code == VisMaterialsDataStrategy::VISIT_MIXED) {
+
+               /*
+                * Scale data (while still double)
+                */
+               const double scale = ipi().d_scale_factor;
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1572)
+#endif
+               if (scale != 1.0) {
+                  for (int i = 0; i < buf_size; i++) {
+                     dbuffer[i] *= scale;
+                  }
+               }
+
+               /*
+                * Determine patch min/max.
+                */
+               for (int i = 0; i < buf_size; i++) {
+                  if (dbuffer[i] > dmax) {
+                     dmax = dbuffer[i];
+                  }
+                  if (dbuffer[i] < dmin) {
+                     dmin = dbuffer[i];
+                  }
+               }
+
+               int dummy_pdata_id = VISIT_UNDEFINED_INDEX;
+               checkFloatMinMax(ipi().d_visit_var_name[depth_id],
+                  dmin,
+                  dmax,
+                  level_number,
+                  patch.getLocalId().getValue(),
+                  dummy_pdata_id);
+
+               /*
+                * Convert buffer from double to float
+                */
+               for (int i = 0; i < buf_size; i++) {
+                  fbuffer[i] = static_cast<float>(dbuffer[i]);
+               }
+
+               /*
+                * Write to disk
+                */
+               std::string sname = ipi().d_species_name;
+               ipi().d_parent_material_pointer->
+               d_species_HDFGroup->putFloatArray(sname,
+                  fbuffer,
+                  buf_size);
+
+            } else if (return_code ==
+                       VisMaterialsDataStrategy::VISIT_ALLONE) {
+
+               data_on_disk = false;
+               dmin = 1.0;
+               dmax = 1.0;
+
+            } else { // return code == VISIT_ALLZERO
+
+               data_on_disk = false;
+               dmin = 0.0;
+               dmax = 0.0;
+
+            }
+
+            /*
+             * Write min/max summary info
+             */
+            if (mpi.getRank() == VISIT_MASTER) {
+               int gpn = getGlobalPatchNumber(hierarchy,
+                     level_number,
+                     block_number,
+                     patch.getLocalId().getValue());
+               ipi().d_master_min_max[depth_id][gpn].patch_data_on_disk =
+                  data_on_disk;
+               ipi().d_master_min_max[depth_id][gpn].min = dmin;
+               ipi().d_master_min_max[depth_id][gpn].max = dmax;
+               ipi().d_master_min_max[depth_id][gpn].species_composition_code =
+                  return_code;
+            } else {
+               d_worker_min_max[d_var_id_ctr].patch_data_on_disk =
+                  data_on_disk;
+               d_worker_min_max[d_var_id_ctr].min = dmin;
+               d_worker_min_max[d_var_id_ctr].max = dmax;
+               d_worker_min_max[d_var_id_ctr].species_composition_code =
+                  return_code;
+            }
+
+            /*
+             * Increment local var_id counter used for d_mm array.
+             */
+            d_var_id_ctr++;
+
+         } // loop over var depths
+
+         delete[] fbuffer;
+         delete[] dbuffer;
+
+      } // var is a species
+      else {
+         for (int depth_id = 0; depth_id < ipi().d_depth; depth_id++) {
+            d_var_id_ctr++;
+         }
+      }
+
+   } // iterate over vars
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private function to check float min/max values.                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VisItDataWriter::checkFloatMinMax(
+   const std::string& var_name,
+   const double dmin,
+   const double dmax,
+   const int level_number,
+   const int patch_number,
+   const int patch_data_id)
+{
+   TBOX_ASSERT(level_number >= 0);
+   TBOX_ASSERT(patch_number >= 0);
+   TBOX_ASSERT(patch_data_id >= -1);
+
+   double fmin = -(tbox::MathUtilities<double>::getMax());
+   double fmax = tbox::MathUtilities<double>::getMax();
+
+   if (dmin < fmin) {
+      TBOX_ERROR("VisItDataWriter:"
+         << "\n    hier::Patch data "
+         << var_name
+         << " is less than FLT_MIN "
+         << "\n    level: " << level_number
+         << "  patch: " << patch_number
+         << "  patch_data_id: " << patch_data_id
+         << "  value: " << dmin
+         << "\n    It cannot be read by VisIt."
+         << "\n    Make sure data is properly initialized or"
+         << "\n    use scale factor to increase its size.");
+   }
+   if (dmax > fmax) {
+      TBOX_ERROR("VisItDataWriter:"
+         << "\n    hier::Patch data "
+         << var_name
+         << " is greater than FLT_MAX "
+         << "\n    level: " << level_number
+         << "  patch: " << patch_number
+         << "  patch_data_id: " << patch_data_id
+         << "  value: " << dmax
+         << "\n    It cannot be interpreted by VisIt."
+         << "\n    Make sure data is properly initialized or"
+         << "\n    use scale factor to decrease its size.");
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private function to write one summary HDF file covering data from all *
+ * processors for use by VisIt.                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VisItDataWriter::writeSummaryToHDFFile(
+   std::string dump_dirname,
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   int coarsest_plot_level,
+   int finest_plot_level,
+   double simulation_time)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT(coarsest_plot_level >= 0);
+   TBOX_ASSERT(finest_plot_level >= 0);
+
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   int i, ln, pn;
+
+   /*
+    * Pack patch min/max information
+    */
+   exchangeMinMaxPatchInformation(hierarchy,
+      coarsest_plot_level,
+      finest_plot_level);
+
+   /*
+    * The "VISIT_MASTER" writes a set of summary information to
+    * the summary file that describes data contained in the visit
+    * files written by each MPI process.
+    *
+    * Although the VISIT_MASTER processor needs the global mesh
+    * data, global communication is required, so access the
+    * global data to make sure it is built.
+    */
+   if (d_is_multiblock) {
+
+      for (ln = 0; ln < hierarchy->getNumberOfLevels(); ++ln) {
+         tbox::Pointer<hier::MultiblockPatchLevel> mblk_level =
+            hierarchy->getPatchLevel(ln);
+         int nblocks = mblk_level->getNumberOfBlocks();
+
+         for (int nb = 0; nb < nblocks; nb++) {
+            tbox::Pointer<hier::PatchLevel> level =
+               mblk_level->getPatchLevelForBlock(nb);
+            if (!level.isNull()) {
+               level->getBoxes();
+            }
+         }
+      }
+
+   } else {
+      for (ln = 0; ln < hierarchy->getNumberOfLevels(); ++ln) {
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+         level->getBoxes();
+      }
+   }
+   int my_proc = mpi.getRank();
+   if (my_proc == VISIT_MASTER) {
+      char temp_buf[VISIT_NAME_BUFSIZE];
+      //sprintf(temp_buf, "/summary.samrai");
+      //string summary_HDFFilename = dump_dirname + temp_buf;
+      std::string summary_HDFFilename = dump_dirname + "/" + d_summary_filename;
+      tbox::Pointer<tbox::Database> summary_HDFFilePointer(
+         new tbox::HDFDatabase("root"));
+      summary_HDFFilePointer->create(summary_HDFFilename);
+
+      /*
+       * Create BASIC information HDF Group and provide it the following
+       * information:
+       *   - VisItWriter version number
+       *   - grid_type (CARTESIAN or DEFORMED)
+       *   - simulation time
+       *   - time step number
+       *   - number of processors
+       *   - number of file clusters
+       *   - DIM
+       *   - number of levels
+       *   - number of patches at each level (array - int[nlevels])
+       *   - total number of patches (on all levels)
+       *   - ratio to coarser level (array - int[nlevels][ndim])
+       */
+
+      sprintf(temp_buf, "BASIC_INFO");
+      tbox::Pointer<tbox::Database> basic_HDFGroup =
+         summary_HDFFilePointer->putDatabase(std::string(temp_buf));
+
+      tbox::Pointer<tbox::HDFDatabase> hdf_database = basic_HDFGroup;
+      hid_t basic_group_id = hdf_database->getGroupId();
+
+      std::string key_string = "VDR_version_number";
+      basic_HDFGroup->putFloat(key_string, VISIT_DATAWRITER_VERSION_NUMBER);
+
+      key_string = "grid_type";
+      std::string data_string;
+      if (d_grid_type == VISIT_CARTESIAN) {
+         data_string = "CARTESIAN";
+      } else if (d_grid_type == VISIT_DEFORMED) {
+         data_string = "DEFORMED";
+      } else {
+         TBOX_ERROR("VisItDataWriter::writeSummaryToHDFFile"
+            << "\n    data writer with name " << d_object_name
+            << "\n    Illegal grid type: " << d_grid_type << std::endl);
+      }
+      basic_HDFGroup->putString(key_string, data_string);
+
+      key_string = "time";
+      basic_HDFGroup->putDouble(key_string, simulation_time);
+
+      key_string = "time_step_number";
+      basic_HDFGroup->putInteger(key_string, d_time_step_number);
+
+      key_string = "number_processors";
+      basic_HDFGroup->putInteger(key_string, mpi.getSize());
+
+      key_string = "number_file_clusters";
+      basic_HDFGroup->putInteger(key_string, d_number_file_clusters);
+
+      key_string = "number_dimensions_of_problem";
+      basic_HDFGroup->putInteger(key_string, d_dim.getValue());
+
+      int num_levels;
+      int tot_number_of_patches = 0;
+      if (d_is_multiblock) {
+         tbox::Pointer<hier::MultiblockPatchHierarchy> mblk_hierarchy =
+            hierarchy;
+
+         //key_string = "number_levels";
+         num_levels =
+            (mblk_hierarchy->getNumberOfLevels())
+            * (mblk_hierarchy->getNumberOfBlocks());
+
+         //key_string = "number_patches_at_level";
+         tbox::Array<int> num_patches_per_level(num_levels);
+         int unique_level_number = 0;
+         for (ln = coarsest_plot_level; ln <= finest_plot_level; ln++) {
+            num_patches_per_level[ln] = 0;
+            tbox::Pointer<hier::MultiblockPatchLevel> mblk_level =
+               hierarchy->getPatchLevel(ln);
+            for (int b = 0; b < mblk_level->getNumberOfBlocks(); b++) {
+               tbox::Pointer<hier::PatchLevel> patch_level =
+                  mblk_level->getPatchLevelForBlock(b);
+               if (!patch_level.isNull()) {
+                  num_patches_per_level[unique_level_number] =
+                     patch_level->getGlobalNumberOfPatches();
+                  tot_number_of_patches +=
+                     patch_level->getGlobalNumberOfPatches();
+                  unique_level_number++;
+               }
+            }
+         }
+
+         num_levels = unique_level_number;
+         num_patches_per_level.resizeArray(num_levels);
+
+         key_string = "number_levels";
+         basic_HDFGroup->putInteger(key_string, num_levels);
+
+         key_string = "number_patches_at_level";
+         basic_HDFGroup->putIntegerArray(key_string,
+            num_patches_per_level);
+
+         key_string = "number_global_patches";
+         basic_HDFGroup->putInteger(key_string, tot_number_of_patches);
+
+      } else {
+
+         key_string = "number_levels";
+         num_levels = hierarchy->getNumberOfLevels();
+         basic_HDFGroup->putInteger(key_string, num_levels);
+
+         key_string = "number_patches_at_level";
+         tbox::Array<int> num_patches_per_level(num_levels);
+         for (ln = coarsest_plot_level; ln <= finest_plot_level; ln++) {
+            tbox::Pointer<hier::PatchLevel> patch_level =
+               hierarchy->getPatchLevel(ln);
+            num_patches_per_level[ln] = patch_level->getGlobalNumberOfPatches();
+            tot_number_of_patches += num_patches_per_level[ln];
+         }
+         basic_HDFGroup->putIntegerArray(key_string,
+            num_patches_per_level);
+
+         key_string = "number_global_patches";
+         basic_HDFGroup->putInteger(key_string, tot_number_of_patches);
+      }
+
+      /*
+       * When writing Visit data, it expects to see 3D data for
+       * xlo, dx, ratios_to_coarser, and number of ghosts.  The
+       * VISIT_FIXED_DIM is set to 3, and the third element
+       * is zero if we have 2D data.
+       */
+      key_string = "ratios_to_coarser_levels";
+      int idx = 0;
+      int* rtcl = new int[num_levels * VISIT_FIXED_DIM];
+      for (i = 0; i < num_levels * VISIT_FIXED_DIM; i++) rtcl[i] = 0;
+      for (ln = 0; ln <= finest_plot_level; ln++) {
+         for (i = 0; i < d_dim.getValue(); i++) {
+            idx = ln * VISIT_FIXED_DIM + i;
+            if (ln == 0) {
+               rtcl[idx] = VISIT_UNDEFINED_INDEX;
+            } else {
+               rtcl[idx] = d_scaling_ratios[ln](i);
+            }
+         }
+      }
+      HDFputIntegerArray2D(key_string,
+         rtcl,
+         num_levels,
+         VISIT_FIXED_DIM,
+         basic_group_id);
+      delete[] rtcl;
+
+      /*
+       * Write to BASIC HDF group information about the
+       * VisIt plot variables:
+       *   - number of visit variables
+       *
+       *   for each variable {
+       *      - name
+       *      - centering (1 = CELL, 0 = NODE)
+       *      - scale factor
+       *      - depth
+       *      - ghosts
+       *   }
+       */
+      key_string = "number_visit_variables";
+      basic_HDFGroup->putInteger(key_string, d_number_visit_variables);
+
+      tbox::Array<std::string> var_names(d_number_visit_variables);
+      tbox::Array<int> var_centering(d_number_visit_variables);
+      tbox::Array<double> var_scale_factors(d_number_visit_variables);
+      tbox::Array<int> var_depths(d_number_visit_variables);
+
+      // SGS propose adding array indicating clean/mixed
+      tbox::Array<int> var_material_state_variable(d_number_visit_variables);
+
+      int* var_ghosts = new int[d_number_visit_variables * VISIT_FIXED_DIM];
+      for (i = 0; i < d_number_visit_variables * VISIT_FIXED_DIM; i++) {
+         var_ghosts[i] = 0;
+      }
+
+      i = 0;
+      for (tbox::List<VisItItem>::Iterator
+           ipi(d_plot_items); ipi; ipi++) {
+
+         if (!(ipi().d_isa_material || ipi().d_isa_species)) {
+            var_names[i] = ipi().d_var_name;
+            if ((ipi().d_var_centering == VISIT_CELL) ||
+                (ipi().d_var_centering == VISIT_UNKNOWN_CELL)) {
+               var_centering[i] = 1;
+            } else {
+               var_centering[i] = 0;
+            }
+            if (ipi().d_is_deformed_coords) {
+               var_scale_factors[i] = 0.0;
+            } else {
+               var_scale_factors[i] = ipi().d_scale_factor;
+            }
+            var_depths[i] = ipi().d_depth;
+            for (int dim = 0; dim < d_dim.getValue(); dim++) {
+               var_ghosts[i * VISIT_FIXED_DIM + dim] =
+                  0;
+            }
+            if (ipi().d_is_material_state_variable) {
+               // var_material_state_variable[i] = VISIT_MATERIAL;
+               var_material_state_variable[i] = 1;
+            } else {
+               // var_material_state_variable[i] = VISIT_CLEAN;
+               var_material_state_variable[i] = 0;
+            }
+            i++;
+         }
+      }
+
+      key_string = "var_names";
+      basic_HDFGroup->putStringArray(key_string,
+         var_names);
+
+      key_string = "var_cell_centered";
+      basic_HDFGroup->putIntegerArray(key_string,
+         var_centering);
+
+      key_string = "scaling";
+      basic_HDFGroup->putDoubleArray(key_string,
+         var_scale_factors);
+
+      // VCHANGE Visit needs to read this array so it will
+      //         know which variables have mixed material data.
+      // SGS
+      key_string = "material_state_variable";
+      basic_HDFGroup->putIntegerArray(key_string,
+         var_material_state_variable);
+
+      if (d_grid_type == VISIT_DEFORMED) {
+         tbox::Array<double> coord_scaling(VISIT_FIXED_DIM);
+         for (tbox::List<VisItItem>::Iterator
+              ipi(d_plot_items); ipi; ipi++) {
+            if (ipi().d_is_deformed_coords) {
+               for (i = 0; i < VISIT_FIXED_DIM; i++) {
+                  coord_scaling[i] = 0.0;
+                  if (i < d_dim.getValue()) {
+                     coord_scaling[i] = ipi().d_coord_scale_factor[i];
+                  }
+               }
+            }
+         }
+         key_string = "deformed_coordinate_scaling";
+         basic_HDFGroup->putDoubleArray(key_string,
+            coord_scaling);
+      }
+
+      key_string = "var_number_components";
+      basic_HDFGroup->putIntegerArray(key_string,
+         var_depths);
+
+      key_string = "var_number_ghosts";
+      HDFputIntegerArray2D(key_string,
+         var_ghosts,
+         d_number_visit_variables,
+         VISIT_FIXED_DIM,
+         basic_group_id);
+      delete[] var_ghosts;
+
+      // Embed VisIt expressions
+      tbox::Pointer<tbox::Database> expression_HDFGroup;
+      if (d_visit_expressions.size() > 0) {
+         TBOX_ASSERT((d_visit_expressions.size() ==
+                      d_visit_expression_keys.size()) &&
+            (d_visit_expressions.size() == d_visit_expression_types.size()));
+
+         std::string expdbname = "visit_expressions";
+         expression_HDFGroup =
+            summary_HDFFilePointer->putDatabase(expdbname);
+         std::string expression_keys("expression_keys");
+         std::string expressions("expressions");
+         std::string expression_types("expression_types");
+         expression_HDFGroup->putStringArray(expression_keys,
+            d_visit_expression_keys);
+         expression_HDFGroup->putStringArray(expressions,
+            d_visit_expressions);
+         expression_HDFGroup->putStringArray(expression_types,
+            d_visit_expression_types);
+      }
+
+      /*
+       * Write time and data info to BASIC HDF group
+       */
+      key_string = "time_of_dump";
+/*
+ *    std::string temp = dump_dirname + "/temp";
+ *    std::ofstream dfile(temp.c_str());
+ *    char cmdstr[100];
+ *    sprintf(cmdstr,"date > %s",temp.c_str());
+ *    system(cmdstr);
+ *    std::ifstream date_file(temp.c_str());
+ *    std::string ds1, ds2, ds3, ds4, ds5, ds6;
+ *    date_file >> ds1 >> ds2 >> ds3 >> ds4 >> ds5 >> ds6;
+ *    std::string date = ds1 + " " + ds2 + " " + ds3 + " " + ds4
+ + " " + ds5 + " " + ds6;
+ *    basic_HDFGroup->putString(key_string, date);
+ *    dfile.close();
+ *    date_file.close();
+ *    sprintf(cmdstr,"rm %s",temp.c_str());
+ *    system(cmdstr);
+ */
+      const int MAXLEN = 256;
+      char s[MAXLEN];
+      time_t t = time(0);
+      strftime(s, MAXLEN, "%a %b %d %H:%M:%S %Z %Y", localtime(&t));
+      basic_HDFGroup->putString(key_string, std::string(s));
+
+      /*
+       * Write general materials and species information to the
+       * materials and species HDF groups:
+       *
+       *  - material names
+       *  - species names
+       */
+      tbox::Pointer<tbox::Database> materials_HDFGroup;
+      tbox::Pointer<tbox::Database> species_HDFGroup;
+      if (d_materials_names.getSize() > 0) {
+         sprintf(temp_buf, "materials");
+         materials_HDFGroup =
+            summary_HDFFilePointer->putDatabase(std::string(temp_buf));
+
+         key_string = "material_names";
+         materials_HDFGroup->putStringArray(key_string,
+            d_materials_names);
+
+         int mat_ghosts[VISIT_FIXED_DIM];
+         for (i = 0; i < VISIT_FIXED_DIM; i++) mat_ghosts[i] = 0;
+         for (tbox::List<VisItItem>::Iterator
+              ipi(d_plot_items); ipi; ipi++) {
+            if (ipi().d_isa_material) {
+               for (int dim = 0; dim < d_dim.getValue(); dim++) {
+                  mat_ghosts[dim] =
+                     0;
+               }
+            }
+         }
+         key_string = "material_number_ghosts";
+         materials_HDFGroup->putIntegerArray(key_string,
+            mat_ghosts,
+            VISIT_FIXED_DIM);
+
+         sprintf(temp_buf, "species");
+         species_HDFGroup =
+            materials_HDFGroup->putDatabase(std::string(temp_buf));
+
+         for (i = 0; i < d_materials_names.getSize(); i++) {
+            key_string = d_materials_names[i];
+            for (tbox::List<VisItItem>::Iterator
+                 ipi(d_plot_items); ipi; ipi++) {
+               if ((ipi().d_material_name == d_materials_names[i]) &&
+                   ipi().d_isa_material) {
+                  if (ipi().d_species_names.getSize() > 0) {
+                     species_HDFGroup->putStringArray(
+                        key_string,
+                        ipi().d_species_names);
+                  }
+               }
+            }
+         }
+      }
+
+      /*
+       * When writing Visit data, it expects to see 3D data for
+       * xlo, dx, ratios_to_coarser, and number of ghosts.  The
+       * VISIT_FIXED_DIM is set to 3, and the third element
+       * is zero if we have 2D data.
+       */
+      double geom_lo[VISIT_FIXED_DIM] = { 0., 0., 0. };
+
+      double dx_curr_lev[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      double patch_xlo, patch_xhi;
+
+      for (i = 0; i < d_dim.getValue(); i++) {
+         dx_curr_lev[i] = 0.0;
+      }
+
+      /*
+       * Add mesh dx information to BASIC group
+       */
+
+      double* dx = new double[VISIT_FIXED_DIM * num_levels];
+      double* xlo = new double[VISIT_FIXED_DIM * num_levels];
+      for (i = 0; i < VISIT_FIXED_DIM * num_levels; i++) {
+         dx[i] = 0.0;
+         xlo[i] = 0.0;
+      }
+      if (d_grid_type != VISIT_DEFORMED) {
+         //This is never entered in multiblock case
+         tbox::Pointer<hier::PatchHierarchy> patch_hierarchy =
+            hierarchy;
+         const tbox::Pointer<geom::CartesianGridGeometry> ggeom =
+            patch_hierarchy->getGridGeometry();
+         int next = 0;
+         for (ln = coarsest_plot_level; ln <= finest_plot_level; ln++) {
+            for (i = 0; i < VISIT_FIXED_DIM; i++) {
+               if (i < d_dim.getValue()) {
+                  if (ln == 0) {
+                     xlo[i] = ggeom->getXLower()[i];
+                     dx_curr_lev[i] = ggeom->getDx()[i]; // coarsest level dx
+                     dx[next] = dx_curr_lev[i];
+                  } else {
+                     double scale_ratio = (double)d_scaling_ratios[ln](i);
+                     dx_curr_lev[i] = dx_curr_lev[i] / scale_ratio;
+                     dx[next] = dx_curr_lev[i];
+                  }
+               }
+               next++;
+            }
+         }
+      }
+
+      key_string = "dx";
+      HDFputDoubleArray2D(key_string,
+         dx,
+         num_levels,
+         VISIT_FIXED_DIM,
+         basic_group_id);
+      delete[] dx;
+
+      /*
+       * Add mesh xlo information to BASIC group
+       */
+      key_string = "XLO";
+      basic_HDFGroup->putDoubleArray(key_string,
+         xlo,
+         VISIT_FIXED_DIM);
+      delete[] xlo;
+
+      /*
+       * Write parent/child information
+       */
+      writeParentChildInfoToSummaryHDFFile(hierarchy, basic_HDFGroup);
+
+      /*
+       * Write processor mapping information and domain extents
+       * for each patch.
+       */
+
+      tbox::Pointer<tbox::Database> extents_HDFGroup;
+      sprintf(temp_buf, "extents");
+      extents_HDFGroup =
+         summary_HDFFilePointer->putDatabase(std::string(temp_buf));
+      hdf_database = extents_HDFGroup;
+      hid_t extents_group_id = hdf_database->getGroupId();
+
+      /*
+       * Create "patch_map" sub-database of extents group.
+       */
+      patchMapStruct* pms = new patchMapStruct[tot_number_of_patches];
+
+      if (d_is_multiblock) {
+         int unique_level_number = 0;
+         for (ln = coarsest_plot_level; ln <= finest_plot_level; ln++) {
+            tbox::Pointer<hier::MultiblockPatchLevel> mblk_level =
+               hierarchy->getPatchLevel(ln);
+            for (int b = 0; b < mblk_level->getNumberOfBlocks(); b++) {
+               tbox::Pointer<hier::PatchLevel> patch_level =
+                  mblk_level->getPatchLevelForBlock(b);
+               if (!patch_level.isNull()) {
+                  tbox::Array<int> proc_mapping =
+                     patch_level->getProcessorMapping().getProcessorMapping();
+
+                  for (pn = 0;
+                       pn < patch_level->getGlobalNumberOfPatches();
+                       pn++) {
+                     int proc_num = proc_mapping[pn];
+                     int global_patch_id =
+                        getGlobalPatchNumber(hierarchy, ln, b, pn);
+                     pms[global_patch_id].processor_number = proc_num;
+                     pms[global_patch_id].block_number = b;
+                     pms[global_patch_id].file_cluster_number =
+                        d_processor_in_file_cluster_number[proc_num];
+                     pms[global_patch_id].level_number = unique_level_number;
+                     pms[global_patch_id].patch_number = pn;
+                  }
+                  unique_level_number++;
+               }
+            }
+         }
+      } else {
+         for (ln = coarsest_plot_level; ln <= finest_plot_level; ln++) {
+            tbox::Pointer<hier::PatchLevel> patch_level =
+               hierarchy->getPatchLevel(ln);
+            tbox::Array<int> proc_mapping =
+               patch_level->getProcessorMapping().getProcessorMapping();
+
+            for (pn = 0; pn < patch_level->getGlobalNumberOfPatches(); pn++) {
+               int proc_num = proc_mapping[pn];
+               int global_patch_id = getGlobalPatchNumber(hierarchy, ln, -1, pn);
+               pms[global_patch_id].processor_number = proc_num;
+               pms[global_patch_id].block_number = 0;
+               pms[global_patch_id].file_cluster_number =
+                  d_processor_in_file_cluster_number[proc_num];
+               pms[global_patch_id].level_number = ln;
+               pms[global_patch_id].patch_number = pn;
+            }
+         }
+      }
+
+      key_string = "patch_map";
+      HDFputPatchMapStructArray(key_string,
+         pms,
+         tot_number_of_patches,
+         extents_group_id);
+
+      delete[] pms;
+
+      /*
+       * Printf-style string on how to name patches:
+       * %T --- local patch number
+       * %L --- level number
+       * %B --- block number
+       * %P --- processor number
+       * %F --- file number
+       */
+      key_string = "patch_names_printf";
+      std::string patch_names_printf = "f%F R%P B%B L%02L P%05T";
+      basic_HDFGroup->putString(key_string, patch_names_printf);
+
+      /*
+       * Create "patch_extents" sub-database of extents group.
+       */
+      patchExtentsStruct* pes = new patchExtentsStruct[tot_number_of_patches];
+
+      for (pn = 0; pn < tot_number_of_patches; pn++) {
+         for (i = 0; i < VISIT_FIXED_DIM; i++) {
+            pes[pn].lower[i] = 0;
+            pes[pn].upper[i] = 0;
+            pes[pn].xlo[i] = 0.;
+            pes[pn].xhi[i] = 0.;
+         }
+      }
+
+      /*
+       * Set patch extents
+       */
+      if (d_grid_type != VISIT_DEFORMED) {
+         //This is never entered in multiblock case
+         tbox::Pointer<hier::PatchHierarchy> patch_hierarchy =
+            hierarchy;
+         const tbox::Pointer<geom::CartesianGridGeometry> ggeom =
+            patch_hierarchy->getGridGeometry();
+         for (i = 0; i < d_dim.getValue(); i++) {
+            geom_lo[i] = ggeom->getXLower()[i];
+            dx_curr_lev[i] = ggeom->getDx()[i]; // coarsest level dx
+         }
+
+      } else {
+
+         /*
+          * Deformed grid - set extents to 0.
+          */
+         for (i = 0; i < d_dim.getValue(); i++) {
+            geom_lo[i] = 0.;
+            dx_curr_lev[i] = 0.;
+         }
+      }
+
+      if (d_is_multiblock) {
+
+         int unique_level_number = 0;
+         for (ln = coarsest_plot_level; ln <= finest_plot_level; ln++) {
+            tbox::Pointer<hier::MultiblockPatchLevel> mblk_level =
+               hierarchy->getPatchLevel(ln);
+            for (int b = 0; b < mblk_level->getNumberOfBlocks(); b++) {
+               tbox::Pointer<hier::PatchLevel> patch_level =
+                  mblk_level->getPatchLevelForBlock(b);
+               if (!patch_level.isNull()) {
+                  const hier::BoxArray& boxes = patch_level->getBoxes();
+
+                  /*
+                   * Set the dx for the next level
+                   */
+                  for (i = 0; i < d_dim.getValue(); i++) {
+                     double scale_ratio =
+                        (double)d_scaling_ratios[unique_level_number](i);
+                     dx_curr_lev[i] = dx_curr_lev[i] / scale_ratio;
+                  }
+
+                  for (pn = 0; pn < boxes.getNumberOfBoxes(); pn++) {
+                     int global_patch_id =
+                        getGlobalPatchNumber(hierarchy, ln, b, pn);
+                     const hier::Box& box = boxes[pn];
+                     const int* lower = &box.lower()[0];
+                     const int* upper = &box.upper()[0];
+
+                     for (i = 0; i < d_dim.getValue(); i++) {
+                        pes[global_patch_id].lower[i] = lower[i];
+                        pes[global_patch_id].upper[i] = upper[i];
+
+                        patch_xlo = 0.;
+                        patch_xhi = 0.;
+
+                        pes[global_patch_id].xlo[i] = patch_xlo;
+                        pes[global_patch_id].xhi[i] = patch_xhi;
+                     }
+                  }
+                  unique_level_number++;
+               }
+            } // loop over patch boxes
+         } // loop over levels
+      } else {
+         for (ln = coarsest_plot_level; ln <= finest_plot_level; ln++) {
+            tbox::Pointer<hier::PatchLevel> patch_level =
+               hierarchy->getPatchLevel(ln);
+            const hier::BoxArray& boxes = patch_level->getBoxes();
+
+            /*
+             * Set the dx for the next level
+             */
+            for (i = 0; i < d_dim.getValue(); i++) {
+               double scale_ratio = (double)d_scaling_ratios[ln](i);
+               dx_curr_lev[i] = dx_curr_lev[i] / scale_ratio;
+            }
+
+            for (pn = 0; pn < boxes.getNumberOfBoxes(); pn++) {
+               int global_patch_id = getGlobalPatchNumber(hierarchy, ln, -1, pn);
+               const hier::Box& box = boxes[pn];
+               const int* lower = &box.lower()[0];
+               const int* upper = &box.upper()[0];
+
+               for (i = 0; i < d_dim.getValue(); i++) {
+                  pes[global_patch_id].lower[i] = lower[i];
+                  pes[global_patch_id].upper[i] = upper[i];
+
+                  if (d_grid_type != VISIT_DEFORMED) {
+                     patch_xlo = geom_lo[i]
+                        + dx_curr_lev[i] * (double)lower[i];
+                     patch_xhi = geom_lo[i]
+                        + dx_curr_lev[i] * (double)(upper[i] + 1);
+                  } else {
+                     patch_xlo = 0.;
+                     patch_xhi = 0.;
+                  }
+                  pes[global_patch_id].xlo[i] = patch_xlo;
+                  pes[global_patch_id].xhi[i] = patch_xhi;
+
+               }
+            } // loop over patch boxes
+         } // loop over levels
+      }
+
+      /*
+       * Write patch min/max for each variable.
+       */
+      tbox::Pointer<tbox::Database> extents_materials_HDFGroup;
+      for (tbox::List<VisItItem>::Iterator
+           ipi(d_plot_items); ipi; ipi++) {
+         for (int comp = 0; comp < ipi().d_depth; comp++) {
+
+            /*
+             * Regular (i.e. not materials or species) variables
+             */
+            if (!(ipi().d_isa_material) && !(ipi().d_isa_species)) {
+
+               key_string = ipi().d_visit_var_name[comp] + "-Extents";
+               HDFputPatchMinMaxStructArray(
+                  key_string,
+                  ipi().d_master_min_max[comp],
+                  tot_number_of_patches,
+                  extents_group_id);
+
+            } else if (ipi().d_isa_material) {
+
+               /*
+                * Create materials HDF group
+                * set up HDF extents structure for materials:
+                *  <extents group>
+                *      materials group  (i.e. one constructed below)
+                *         material_name group
+                *            species group
+                */
+               if (extents_materials_HDFGroup.isNull()) {
+                  extents_materials_HDFGroup =
+                     extents_HDFGroup->putDatabase("materials");
+               }
+
+               key_string = ipi().d_material_name;
+               tbox::Pointer<tbox::Database>
+               extents_material_name_HDFGroup;
+               if (!(ipi().d_is_material_state_variable)) {
+                  std::string mname = ipi().d_material_name;
+                  // material_name group
+                  extents_material_name_HDFGroup =
+                     extents_materials_HDFGroup->putDatabase(mname);
+                  key_string += "-Fractions";
+               } else {
+                  // Sparse Format does not need additional group
+                  extents_material_name_HDFGroup = extents_materials_HDFGroup;
+               }
+               tbox::Pointer<tbox::HDFDatabase> extents_database =
+                  extents_material_name_HDFGroup;
+               hid_t extents_material_name_group_id =
+                  extents_database->getGroupId();
+
+               HDFputPatchMinMaxStructArray(
+                  key_string,
+                  ipi().d_master_min_max[comp],
+                  tot_number_of_patches,
+                  extents_material_name_group_id);
+
+               // species group
+               if (ipi().d_species_names.getSize() > 0) {
+                  ipi().d_extents_species_HDFGroup =
+                     extents_material_name_HDFGroup->putDatabase("species");
+               }
+
+            } else if (ipi().d_isa_species) {
+
+               // species
+               key_string = ipi().d_species_name;
+               tbox::Pointer<tbox::HDFDatabase> extents_database =
+                  ipi().d_parent_material_pointer->d_extents_species_HDFGroup;
+
+               /*
+                * species group
+                */
+               hid_t species_group_id = extents_database->getGroupId();
+
+               HDFputPatchMinMaxStructArray(
+                  key_string,
+                  ipi().d_master_min_max[comp],
+                  tot_number_of_patches,
+                  species_group_id);
+            }
+
+         } // loop over components
+      } // loop over variables
+
+      delete[] d_worker_min_max;
+
+      key_string = "patch_extents";
+      HDFputPatchExtentsStructArray(key_string,
+         pes,
+         tot_number_of_patches,
+         extents_group_id);
+
+      delete[] pes;
+
+      summary_HDFFilePointer->close();
+
+   } // if VISIT_MASTER
+
+   tbox::SAMRAI_MPI::getSAMRAIWorld().Barrier();
+
+   if (my_proc == VISIT_MASTER) {
+
+      /*
+       * Add this dump entry to dumps.visit file
+       */
+      if (d_time_step_number == 0) s_summary_file_opened = false;
+      std::string path = d_top_level_directory_name + "/dumps.visit";
+      std::string file = d_current_dump_directory_name + "/"
+         + d_summary_filename;
+
+      /*
+       * If summary file has not yet been opened, open and write file.
+       * If it has been opened, append this to file.
+       */
+      if (!s_summary_file_opened) {
+         s_summary_file_opened = true;
+         std::ofstream sfile(path.c_str(), std::ios::out);
+         sfile << file << "\n";
+         sfile.close();
+      } else {
+         std::ofstream sfile(path.c_str(), std::ios::app);
+         sfile << file << "\n";
+         sfile.close();
+      }
+   }
+
+   tbox::SAMRAI_MPI::getSAMRAIWorld().Barrier();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private function to store min/max information on each patch for each  *
+ * variable.  The "master" processor allocates an array that will hold   *
+ * the global data.  The "worker" processors send this information to    *
+ * the master which in turn unpacks and stores the data.                 *
+ *                                                                       *
+ *************************************************************************
+ */
+void VisItDataWriter::exchangeMinMaxPatchInformation(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int coarsest_plot_level,
+   const int finest_plot_level)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT(coarsest_plot_level >= 0);
+   TBOX_ASSERT(finest_plot_level >= 0);
+
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   /*
+    * Compute max number of patches on any processor, and the total number of
+    * patches in the problem.
+    */
+   int ln, pn, comp, item_ctr;
+   int number_local_patches = 0;
+   int tot_number_of_patches = 0;
+
+   if (d_is_multiblock) {
+      for (ln = coarsest_plot_level; ln <= finest_plot_level; ln++) {
+         tbox::Pointer<hier::MultiblockPatchLevel> mblk_level =
+            hierarchy->getPatchLevel(ln);
+         for (int b = 0; b < mblk_level->getNumberOfBlocks(); b++) {
+            tbox::Pointer<hier::PatchLevel> patch_level =
+               mblk_level->getPatchLevelForBlock(b);
+            if (!patch_level.isNull()) {
+               tot_number_of_patches += patch_level->getGlobalNumberOfPatches();
+               for (hier::PatchLevel::Iterator ip(patch_level);
+                    ip; ip++) {
+                  number_local_patches++;
+               }
+            }
+         }
+      }
+   } else {
+      for (ln = coarsest_plot_level; ln <= finest_plot_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> patch_level =
+            hierarchy->getPatchLevel(ln);
+         tot_number_of_patches += patch_level->getGlobalNumberOfPatches();
+         for (hier::PatchLevel::Iterator ip(patch_level);
+              ip; ip++) {
+            number_local_patches++;
+         }
+      }
+   }
+
+   int max_number_local_patches = number_local_patches;
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&max_number_local_patches, 1, MPI_MAX);
+   }
+
+   int num_items_to_plot = d_number_visit_variables_plus_depth
+      + d_materials_names.getSize() // number materials
+      + d_number_species;
+
+   int message_size = max_number_local_patches
+      * static_cast<int>(sizeof(patchMinMaxStruct)) * num_items_to_plot;
+
+   if (mpi.getRank() != VISIT_MASTER) {
+
+      /*
+       * Worker processor:  send contents of d_worker_min_max array that
+       * was setup in "initializePlotVariableMinMaxInfo()" to the
+       * master processor.
+       */
+      if (number_local_patches > 0) {
+         if (mpi.getSize() > 1) {
+            mpi.Send(d_worker_min_max,
+               message_size,
+               MPI_BYTE,
+               VISIT_MASTER,
+               0);
+         }
+      }
+
+   } else { // (mpi.getRank() == VISIT_MASTER)
+
+      /*
+       * Master processor:  Receive the min/max information sent by the
+       * worker processors (above).  Unpack into the local d_mm array
+       * for each plot variable.
+       */
+
+      // recv buffer large enough to receive info from any processor.
+      patchMinMaxStruct* buf = NULL;
+      if (d_number_working_slaves > 0) {
+         buf = new patchMinMaxStruct[max_number_local_patches
+                                     * num_items_to_plot];
+         memset((char *)buf, 0,
+            max_number_local_patches * num_items_to_plot
+            * sizeof(patchMinMaxStruct));
+      }
+
+      /*
+       * Receive information sent by "sending_proc".
+       */
+      int number_msgs_recvd = 0;
+      while (number_msgs_recvd < d_number_working_slaves) {
+         int sending_proc = -1;
+         if (mpi.getSize() > 1) {
+            tbox::SAMRAI_MPI::Status status;
+            mpi.Recv(buf,
+               message_size,
+               MPI_BYTE,
+               MPI_ANY_SOURCE,
+               MPI_ANY_TAG,
+               &status);
+            sending_proc = status.MPI_SOURCE;
+         }
+         number_msgs_recvd++;
+
+         /*
+          * Unpack the information from buf and fill d_worker_min_max array.
+          */
+         item_ctr = 0;
+
+         if (d_is_multiblock) {
+            for (ln = coarsest_plot_level; ln <= finest_plot_level; ln++) {
+               tbox::Pointer<hier::MultiblockPatchLevel> mblk_level =
+                  hierarchy->getPatchLevel(ln);
+               for (int b = 0; b < mblk_level->getNumberOfBlocks(); b++) {
+                  tbox::Pointer<hier::PatchLevel> patch_level =
+                     mblk_level->getPatchLevelForBlock(b);
+                  if (!patch_level.isNull()) {
+                     tbox::Array<int> proc_mapping =
+                        patch_level->
+                        getProcessorMapping().getProcessorMapping();
+
+                     int npatches_on_level = proc_mapping.getSize();
+                     for (pn = 0; pn < npatches_on_level; pn++) {
+                        if (proc_mapping[pn] == sending_proc) {
+                           int global_patch_id =
+                              getGlobalPatchNumber(hierarchy, ln, b, pn);
+                           for (tbox::List<VisItItem>::Iterator
+                                ipi(d_plot_items); ipi; ipi++) {
+                              for (comp = 0; comp < ipi().d_depth; comp++) {
+                                 ipi().d_master_min_max[comp][global_patch_id]
+                                    =
+                                       buf[item_ctr];
+                                 item_ctr++;
+                              }
+                           }  // variables
+                        } // patch from sending proc?
+                     } // patches
+                  }
+               }
+            } // levels
+         } else {
+            for (ln = coarsest_plot_level; ln <= finest_plot_level; ln++) {
+               tbox::Pointer<hier::PatchLevel> patch_level =
+                  hierarchy->getPatchLevel(ln);
+               tbox::Array<int> proc_mapping =
+                  patch_level->getProcessorMapping().getProcessorMapping();
+
+               int npatches_on_level = proc_mapping.getSize();
+               for (pn = 0; pn < npatches_on_level; pn++) {
+                  if (proc_mapping[pn] == sending_proc) {
+                     int global_patch_id =
+                        getGlobalPatchNumber(hierarchy, ln, -1, pn);
+                     for (tbox::List<VisItItem>::Iterator
+                          ipi(d_plot_items); ipi; ipi++) {
+                        for (comp = 0; comp < ipi().d_depth; comp++) {
+                           ipi().d_master_min_max[comp][global_patch_id] =
+                              buf[item_ctr];
+                           item_ctr++;
+                        }
+                     }  // variables
+                  } // patch from sending proc?
+               } // patches
+            } // levels
+         }
+      } // while msgs_recvd < working procs
+
+      if (d_number_working_slaves > 0) {
+         delete[] buf;
+      }
+
+   } // proc == VISIT_MASTER?
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private function to find and write to summary file parent & child     *
+ * info.  For each global patch number, find its children using the      *
+ * box_tree.  Record the children, as well as each child's parent, in a  *
+ * child_parent array. A child_ptrs array records for each global patch  *
+ * number, the number of children that patch has, as well as the offset  *
+ * into the child_parent array where the patch numbers of those children *
+ * are stored.  If a patch has no children, offset = -1. Next, the child *
+ * info from the child_parent array is copied into the final child array.*
+ * Then the child_parent array is sorted by child number.  Now all       *
+ * parents of a given patch are grouped together in this sorted array.   *
+ * The parents are then stored in a parent array, and a parent_ptrs      *
+ * array is created similar to the child_ptrs array.                     *
+ *                                                                       *
+ *************************************************************************
+ */
+void VisItDataWriter::writeParentChildInfoToSummaryHDFFile(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   tbox::Pointer<tbox::Database> basic_HDFGroup)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+
+   struct cpPointerStruct {  // auxiliary info for child/parent data struct
+      int offset;
+      union {
+         int number_children;
+         int number_parents;
+      } u;
+   };
+
+   /*
+    * Find child patches of each global patch number
+    */
+   int tot_number_of_patches = 0;
+   int finest_level = hierarchy->getFinestLevelNumber();
+   int ln;
+
+   if (d_is_multiblock) {
+      for (ln = 0; ln <= finest_level; ln++) {
+         tbox::Pointer<hier::MultiblockPatchLevel> mblk_level =
+            hierarchy->getPatchLevel(ln);
+         for (int b = 0; b < mblk_level->getNumberOfBlocks(); b++) {
+            tbox::Pointer<hier::PatchLevel> patch_level =
+               mblk_level->getPatchLevelForBlock(b);
+            if (!patch_level.isNull()) {
+               tot_number_of_patches += patch_level->getGlobalNumberOfPatches();
+            }
+         }
+      }
+   } else {
+      for (ln = 0; ln <= finest_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> patch_level =
+            hierarchy->getPatchLevel(ln);
+         tot_number_of_patches += patch_level->getGlobalNumberOfPatches();
+      }
+   }
+   int chunk_size = 2 * tot_number_of_patches;
+   int current_child_parent_max_size = chunk_size;
+   struct cpPointerStruct* child_ptrs =
+      new struct cpPointerStruct[tot_number_of_patches];
+   struct childParentStruct* child_parent =
+      new struct childParentStruct[chunk_size];
+   int child_parent_idx = 0;
+   int child_ptrs_idx = 0;
+
+   if (d_is_multiblock) {
+      tbox::Pointer<hier::MultiblockPatchLevel> mblk_level =
+         hierarchy->getPatchLevel(ln);
+      for (int b = 0; b < mblk_level->getNumberOfBlocks(); b++) {
+         tbox::Pointer<hier::PatchLevel> patch_level =
+            mblk_level->getPatchLevelForBlock(b);
+         if (!patch_level.isNull()) {
+            hier::BoxArray coarser_boxes = patch_level->getBoxes();
+
+            const int num_coarser_boxes = coarser_boxes.getNumberOfBoxes();
+            tbox::Pointer<hier::BoxTree> child_box_tree;
+            bool finest_level_in_block = false;
+
+            if (ln != finest_level) {
+               tbox::Pointer<hier::MultiblockPatchLevel>
+               child_mblk_level =
+                  hierarchy->getPatchLevel(ln + 1);
+               tbox::Pointer<hier::PatchLevel> child_patch_level =
+                  child_mblk_level->getPatchLevelForBlock(b);
+
+               if (!child_patch_level.isNull()) {
+                  coarser_boxes.refine(
+                     child_patch_level->getRatioToCoarserLevel());
+                  child_box_tree =
+                     new hier::BoxTree(child_patch_level->getBoxes());
+               } else {
+                  finest_level_in_block = true;
+               }
+            }
+
+            for (int icp = 0; icp < num_coarser_boxes; icp++) {
+               if (ln == finest_level || finest_level_in_block) {
+                  child_ptrs[child_ptrs_idx].u.number_children = 0;
+                  child_ptrs[child_ptrs_idx++].offset =
+                     VISIT_UNDEFINED_INDEX;
+               } else {
+                  tbox::Array<int> child_patch_array;
+                  child_box_tree->findOverlapIndices(
+                     child_patch_array,
+                     coarser_boxes[icp]);
+                  int num_kids = child_patch_array.getSize();
+                  child_ptrs[child_ptrs_idx].u.number_children = num_kids;
+
+                  if (num_kids == 0) {
+                     child_ptrs[child_ptrs_idx++].offset =
+                        VISIT_UNDEFINED_INDEX;
+                  } else {
+                     child_ptrs[child_ptrs_idx++].offset = child_parent_idx;
+                     if ((child_parent_idx + num_kids) >
+                         current_child_parent_max_size) {
+                        current_child_parent_max_size += chunk_size;
+                        struct childParentStruct* temp = child_parent;
+                        child_parent =
+                           new struct
+                           childParentStruct[current_child_parent_max_size];
+                        for (int idx = 0; idx < child_parent_idx; idx++) {
+                           child_parent[idx].child = temp[idx].child;
+                           child_parent[idx].parent = temp[idx].parent;
+                        }
+                        delete[] temp;
+                     }
+
+                     for (int idx = 0; idx < num_kids; idx++) {
+                        child_parent[child_parent_idx].child =
+                           getGlobalPatchNumber(hierarchy, ln + 1,
+                              b, child_patch_array[idx]);
+                        child_parent[child_parent_idx++].parent =
+                           getGlobalPatchNumber(hierarchy, ln, b, icp);
+                     }
+                  }
+               }
+            }
+         }
+      }
+   } else {
+      for (ln = 0; ln <= finest_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> patch_level =
+            hierarchy->getPatchLevel(ln);
+         hier::BoxArray coarser_boxes = patch_level->getBoxes();
+
+         const int num_coarser_boxes = coarser_boxes.getNumberOfBoxes();
+         tbox::Pointer<hier::BoxTree> child_box_tree;
+
+         if (ln != finest_level) {
+            tbox::Pointer<hier::PatchLevel> child_patch_level =
+               hierarchy->getPatchLevel(ln + 1);
+            coarser_boxes.refine(child_patch_level->getRatioToCoarserLevel());
+            child_box_tree =
+               new hier::BoxTree(child_patch_level->getBoxes());
+         }
+
+         for (int icp = 0; icp < num_coarser_boxes; icp++) {
+            if (ln == finest_level) {
+               child_ptrs[child_ptrs_idx].u.number_children = 0;
+               child_ptrs[child_ptrs_idx++].offset = VISIT_UNDEFINED_INDEX;
+            } else {
+               tbox::Array<int> child_patch_array;
+               child_box_tree->findOverlapIndices(child_patch_array,
+                  coarser_boxes[icp]);
+               int num_kids = child_patch_array.getSize();
+               child_ptrs[child_ptrs_idx].u.number_children = num_kids;
+
+               if (num_kids == 0) {
+                  child_ptrs[child_ptrs_idx++].offset = VISIT_UNDEFINED_INDEX;
+               } else {
+                  child_ptrs[child_ptrs_idx++].offset = child_parent_idx;
+                  if ((child_parent_idx + num_kids) >
+                      current_child_parent_max_size) {
+                     current_child_parent_max_size += chunk_size;
+                     struct childParentStruct* temp = child_parent;
+                     child_parent =
+                        new struct
+                        childParentStruct[current_child_parent_max_size];
+                     for (int idx = 0; idx < child_parent_idx; idx++) {
+                        child_parent[idx].child = temp[idx].child;
+                        child_parent[idx].parent = temp[idx].parent;
+                     }
+                     delete[] temp;
+                  }
+
+                  for (int idx = 0; idx < num_kids; idx++) {
+                     child_parent[child_parent_idx].child =
+                        getGlobalPatchNumber(hierarchy, ln + 1,
+                           -1, child_patch_array[idx]);
+                     child_parent[child_parent_idx++].parent =
+                        getGlobalPatchNumber(hierarchy, ln, -1, icp);
+                  }
+               }
+            }
+         }
+      }
+   }
+
+   int* parent_array = (int *)NULL;
+   int* child_array = (int *)NULL;
+   int parent_array_length = 0;
+   int child_array_length = child_parent_idx;
+
+   struct cpPointerStruct* parent_ptrs = (cpPointerStruct *)NULL;
+
+   // copy child info to child array
+   if (child_array_length > 0) {
+      child_array = new int[child_array_length];
+      for (int idx = 0; idx < child_array_length; idx++) {
+         child_array[idx] = child_parent[idx].child;
+      }
+
+      // sort child_parent array by child patch number.
+      qsort((char *)child_parent,
+         child_array_length,
+         sizeof(struct childParentStruct),
+         &childParentCompareFunc);
+
+      // now record parents in the parent array
+      parent_array = new int[chunk_size];
+      int parent_size = chunk_size;
+      int cp_idx = 0;
+      int next_parent = 0;
+      parent_ptrs =
+         new struct cpPointerStruct[tot_number_of_patches];
+
+      for (int gpn = 0; gpn < tot_number_of_patches; gpn++) {
+         if (gpn < child_parent[cp_idx].child) {
+            parent_ptrs[gpn].offset = VISIT_UNDEFINED_INDEX;
+            parent_ptrs[gpn].u.number_parents = 0;
+         } else {
+            int num_pars = 0;
+            while (cp_idx < current_child_parent_max_size &&
+                   child_parent[cp_idx].child == gpn) {
+               if (num_pars == 0) {
+                  parent_ptrs[gpn].offset = next_parent;
+               }
+               num_pars++;
+               if (next_parent >= parent_size) {
+                  // increase size of parent_array
+                  int old_parent_size = parent_size;
+                  int* temp = new int[old_parent_size];
+                  for (int i = 0; i < old_parent_size; i++) {
+                     temp[i] = parent_array[i];
+                  }
+                  delete[] parent_array;
+                  parent_size += chunk_size;
+                  parent_array = new int[parent_size];
+                  for (int i = 0; i < old_parent_size; i++) {
+                     parent_array[i] = temp[i];
+                  }
+                  delete[] temp;
+               }
+               parent_array[next_parent++] = child_parent[cp_idx++].parent;
+            }
+            parent_ptrs[gpn].u.number_parents = num_pars;
+         }
+      }
+      parent_array_length = next_parent;
+   }
+   delete[] child_parent;
+
+   /*
+    * Write parent & child info to summary file
+    */
+   std::string key_string = "child_array_length";
+   basic_HDFGroup->putInteger(key_string, child_array_length);
+   key_string = "parent_array_length";
+   basic_HDFGroup->putInteger(key_string, parent_array_length);
+   tbox::Pointer<tbox::HDFDatabase> hdf_database = basic_HDFGroup;
+   hid_t basic_group_id = hdf_database->getGroupId();
+   if (child_array_length > 0) {
+      key_string = "child_array";
+      basic_HDFGroup->putIntegerArray(key_string,
+         child_array,
+         child_array_length);
+
+      key_string = "child_pointer_array";
+      HDFputChildParentStructArray(
+         key_string,
+         (void *)child_ptrs,
+         tot_number_of_patches,
+         basic_group_id,
+         sizeof(cpPointerStruct),
+         "number_children");
+   }
+   if (child_array) delete[] child_array;
+   if (child_ptrs) delete[] child_ptrs;
+
+   if (parent_array_length > 0) {
+      key_string = "parent_array";
+      basic_HDFGroup->putIntegerArray(key_string,
+         parent_array,
+         parent_array_length);
+      key_string = "parent_pointer_array";
+      HDFputChildParentStructArray(
+         key_string,
+         (void *)parent_ptrs,
+         tot_number_of_patches,
+         basic_group_id,
+         sizeof(cpPointerStruct),
+         "number_parents");
+   }
+
+   if (parent_array) delete[] parent_array;
+   if (parent_ptrs) delete[] parent_ptrs;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ *    childParentCompareFunc() used by qsort to sort child_parent array  *
+ *        by child patch num to find all parents of a given child        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int VisItDataWriter::childParentCompareFunc(
+   const void* s1,
+   const void* s2)
+{
+   struct childParentStruct* a = (struct childParentStruct *)s1;
+   struct childParentStruct* b = (struct childParentStruct *)s2;
+   if (((struct childParentStruct *)a)->child >
+       ((struct childParentStruct *)b)->child) {
+      return 1;
+   } else if (((struct childParentStruct *)b)->child >
+              ((struct childParentStruct *)a)->child) {
+      return VISIT_UNDEFINED_INDEX;
+   } else {
+      return 0;
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private utility function to pack DIM patch data into 1D double       *
+ * precision buffer, omitting ghost data if necessary. Data is packed in *
+ * column major order, i.e. x0,y0,z0, x1,y0,z0, x2,y0,z0, ...            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VisItDataWriter::packPatchDataIntoDoubleBuffer(
+   const tbox::Pointer<hier::PatchData> pdata,
+   const int depth_index,
+   const variable_data_type data_type,
+   const hier::Box patch_box,
+   double* buffer,
+   const variable_centering centering)
+{
+   TBOX_ASSERT(depth_index >= 0);
+   TBOX_ASSERT((patch_box * pdata->getGhostBox()) == patch_box);
+
+   /*
+    * Currently, Fortran calls in this method limit it to two or
+    * three dimensions only.  It will not work for DIM < 2 or
+    * DIM > 3.  Give the user a run-time error asserting this.
+    */
+   if (d_dim < tbox::Dimension(2) || d_dim > tbox::Dimension(3)) {
+      TBOX_ERROR(
+         d_object_name << ":packPatchDataIntoDoubleBuffer()"
+         << "\n  This case has DIM = " << d_dim
+         <<
+         "\n  Dimensions < 2 or > 3 are not supported at"
+         << "\n  this time." << std::endl);
+   }
+
+   int buf_size = getBufferSize(patch_box,
+         hier::IntVector::getZero(d_dim),
+         centering);
+
+   hier::Index databox_lower = pdata->getGhostBox().lower();
+   hier::Index databox_upper = pdata->getGhostBox().upper();
+
+   hier::Box plot_box = patch_box;
+   hier::Index plolower = plot_box.lower();
+   hier::Index ploupper = plot_box.upper();
+
+   /*
+    * Extend index boundaries by one point if NODE data is used.
+    */
+   if (centering == VISIT_NODE || centering == VISIT_UNKNOWN_NODE) {
+      databox_upper += 1;
+      ploupper += 1;
+   }
+
+   switch (data_type) {
+
+      case VISIT_FLOAT: {
+         float* dat_ptr = NULL;
+         if (centering == VISIT_CELL) {
+            const tbox::Pointer<pdat::CellData<float> > fpdata = pdata;
+
+            TBOX_ASSERT(!fpdata.isNull());
+
+            dat_ptr = fpdata->getPointer(depth_index);
+         } else if (centering == VISIT_UNKNOWN_CELL) {
+            pdat::CellData<float> cell_copy(plot_box,
+                                            1,
+                                            hier::IntVector::getZero(d_dim));
+            pdata->copy2(cell_copy);
+            dat_ptr = cell_copy.getPointer();
+         } else if (centering == VISIT_NODE) {
+            const tbox::Pointer<pdat::NodeData<float> > fpdata = pdata;
+
+            TBOX_ASSERT(!fpdata.isNull());
+
+            dat_ptr = fpdata->getPointer(depth_index);
+         } else if (centering == VISIT_UNKNOWN_NODE) {
+            pdat::NodeData<float> node_copy(plot_box,
+                                            1,
+                                            hier::IntVector::getZero(d_dim));
+            pdata->copy2(node_copy);
+            dat_ptr = node_copy.getPointer();
+         }
+         if (d_dim == tbox::Dimension(2)) {
+            F77_FUNC(cpfdat2buf2d, CPFDAT2BUF2D) (databox_lower(0),
+               databox_lower(1),
+               plolower(0), plolower(1),
+               ploupper(0), ploupper(1),
+               databox_upper(0), databox_upper(1),
+               dat_ptr, buffer, buf_size);
+         } else if (d_dim == tbox::Dimension(3)) {
+            F77_FUNC(cpfdat2buf3d, CPFDAT2BUF3D) (databox_lower(0),
+               databox_lower(1), databox_lower(2),
+               plolower(0), plolower(1), plolower(2),
+               ploupper(0), ploupper(1), ploupper(2),
+               databox_upper(0), databox_upper(1), databox_upper(2),
+               dat_ptr, buffer, buf_size);
+         }
+         break;
+      }
+
+      case VISIT_DOUBLE: {
+         double* dat_ptr = NULL;
+         if (centering == VISIT_CELL) {
+            const tbox::Pointer<pdat::CellData<double> > dpdata = pdata;
+            TBOX_ASSERT(!dpdata.isNull());
+
+            dat_ptr = dpdata->getPointer(depth_index);
+         } else if (centering == VISIT_UNKNOWN_CELL) {
+            pdat::CellData<double> cell_copy(plot_box,
+                                             1,
+                                             hier::IntVector::getZero(d_dim));
+            pdata->copy2(cell_copy);
+            dat_ptr = cell_copy.getPointer();
+         } else if (centering == VISIT_NODE) {
+            const tbox::Pointer<pdat::NodeData<double> > dpdata = pdata;
+            TBOX_ASSERT(!dpdata.isNull());
+
+            dat_ptr = dpdata->getPointer(depth_index);
+         } else if (centering == VISIT_UNKNOWN_NODE) {
+            pdat::NodeData<double> node_copy(plot_box,
+                                             1,
+                                             hier::IntVector::getZero(d_dim));
+            pdata->copy2(node_copy);
+            dat_ptr = node_copy.getPointer();
+         }
+         if (d_dim == tbox::Dimension(2)) {
+            F77_FUNC(cpddat2buf2d, CPDDAT2BUF2D) (databox_lower(0),
+               databox_lower(1),
+               plolower(0), plolower(1),
+               ploupper(0), ploupper(1),
+               databox_upper(0), databox_upper(1),
+               dat_ptr, buffer, buf_size);
+         } else if (d_dim == tbox::Dimension(3)) {
+            F77_FUNC(cpddat2buf3d, CPDDAT2BUF3D) (databox_lower(0),
+               databox_lower(1), databox_lower(2),
+               plolower(0), plolower(1), plolower(2),
+               ploupper(0), ploupper(1), ploupper(2),
+               databox_upper(0), databox_upper(1), databox_upper(2),
+               dat_ptr, buffer, buf_size);
+         }
+         break;
+      }
+
+      case VISIT_INT: {
+         int* dat_ptr = NULL;
+         if (centering == VISIT_CELL) {
+            const tbox::Pointer<pdat::CellData<int> > ipdata = pdata;
+
+            TBOX_ASSERT(!ipdata.isNull());
+
+            dat_ptr = ipdata->getPointer(depth_index);
+         } else if (centering == VISIT_UNKNOWN_CELL) {
+            pdat::CellData<int> cell_copy(plot_box, 1, hier::IntVector::getZero(
+                                             d_dim));
+            pdata->copy2(cell_copy);
+            dat_ptr = cell_copy.getPointer();
+         } else if (centering == VISIT_NODE) {
+            const tbox::Pointer<pdat::NodeData<int> > ipdata = pdata;
+
+            TBOX_ASSERT(!ipdata.isNull());
+
+            dat_ptr = ipdata->getPointer(depth_index);
+         } else if (centering == VISIT_UNKNOWN_NODE) {
+            pdat::NodeData<int> node_copy(plot_box, 1, hier::IntVector::getZero(
+                                             d_dim));
+            pdata->copy2(node_copy);
+            dat_ptr = node_copy.getPointer();
+         }
+         if (d_dim == tbox::Dimension(2)) {
+            F77_FUNC(cpidat2buf2d, CPIDAT2BUF2D) (databox_lower(0),
+               databox_lower(1),
+               plolower(0), plolower(1),
+               ploupper(0), ploupper(1),
+               databox_upper(0), databox_upper(1),
+               dat_ptr, buffer, buf_size);
+         } else if (d_dim == tbox::Dimension(3)) {
+            F77_FUNC(cpidat2buf3d, CPIDAT2BUF3D) (databox_lower(0),
+               databox_lower(1), databox_lower(2),
+               plolower(0), plolower(1), plolower(2),
+               ploupper(0), ploupper(1), ploupper(2),
+               databox_upper(0), databox_upper(1), databox_upper(2),
+               dat_ptr, buffer, buf_size);
+         }
+         break;
+      }
+
+      default: {
+         TBOX_ERROR(
+            d_object_name << ":packPatchDataIntoDoubleBuffer()"
+            << "\n  Unknown type.  ***Exiting."
+            << std::endl);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a 2D integer array entry in an HDF database with the specified *
+ * key name.  The array type is based on the hdf type H5T_NATIVE_INT.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VisItDataWriter::HDFputIntegerArray2D(
+   const std::string& key,
+   const int* data,
+   const int nelements0,
+   const int nelements1,
+   const hid_t group_id)
+{
+   TBOX_ASSERT(!key.empty());
+   TBOX_ASSERT(data != NULL);
+   TBOX_ASSERT((nelements0 > 0) && (nelements1 > 0));
+
+   herr_t errf;
+   if ((nelements0 > 0) && (nelements1 > 0)) {
+      hsize_t dim[] = { nelements0, nelements1 };
+      hid_t space = H5Screate_simple(2, dim, NULL);
+
+      TBOX_ASSERT(space >= 0);
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      hid_t dataset = H5Dcreate(group_id,
+            key.c_str(),
+            H5T_NATIVE_INT,
+            space,
+            H5P_DEFAULT,
+            H5P_DEFAULT,
+            H5P_DEFAULT);
+#else
+      hid_t dataset = H5Dcreate(group_id,
+            key.c_str(),
+            H5T_NATIVE_INT,
+            space,
+            H5P_DEFAULT);
+#endif
+
+      TBOX_ASSERT(dataset >= 0);
+
+      errf = H5Dwrite(dataset,
+            H5T_NATIVE_INT,
+            H5S_ALL,
+            H5S_ALL,
+            H5P_DEFAULT,
+            data);
+      TBOX_ASSERT(errf >= 0);
+      NULL_USE(errf);
+
+      errf = H5Sclose(space);
+
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Dclose(dataset);
+      TBOX_ASSERT(errf >= 0);
+
+   } else {
+      TBOX_ERROR("VisItDataWriter::HDFputIntegerArray2D()"
+         << "\n    data writer with name " << d_object_name
+         << "\n    Attempt to put zero-length array with key = "
+         << key << std::endl);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a 2D double array entry in an HDF database with the specified  *
+ * key name.  The array type is based on the hdf type H5T_NATIVE_DOUBLE. *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VisItDataWriter::HDFputDoubleArray2D(
+   const std::string& key,
+   const double* data,
+   const int nelements0,
+   const int nelements1,
+   const hid_t group_id)
+{
+
+   TBOX_ASSERT(!key.empty());
+   TBOX_ASSERT(data != NULL);
+   TBOX_ASSERT((nelements0 > 0) && (nelements1 > 0));
+
+   herr_t errf;
+   if ((nelements0 > 0) && (nelements1 > 0)) {
+      hsize_t dim[] = { nelements0, nelements1 };
+      hid_t space = H5Screate_simple(2, dim, NULL);
+
+      TBOX_ASSERT(space >= 0);
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      hid_t dataset = H5Dcreate(group_id,
+            key.c_str(),
+            H5T_NATIVE_DOUBLE,
+            space,
+            H5P_DEFAULT,
+            H5P_DEFAULT,
+            H5P_DEFAULT);
+#else
+      hid_t dataset = H5Dcreate(group_id,
+            key.c_str(),
+            H5T_NATIVE_DOUBLE,
+            space,
+            H5P_DEFAULT);
+#endif
+
+      TBOX_ASSERT(dataset >= 0);
+
+      errf = H5Dwrite(dataset,
+            H5T_NATIVE_DOUBLE,
+            H5S_ALL,
+            H5S_ALL,
+            H5P_DEFAULT,
+            data);
+
+      TBOX_ASSERT(errf >= 0);
+      NULL_USE(errf);
+
+      errf = H5Sclose(space);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Dclose(dataset);
+      TBOX_ASSERT(errf >= 0);
+
+   } else {
+      TBOX_ERROR("VisItDataWriter::HDFputDoubleArray2D()"
+         << "\n    data writer with name " << d_object_name
+         << "\n    Attempt to put zero-length array with key = "
+         << key << std::endl);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create an array of patch extent (pe) structs in an HDF database       *
+ * with the specified key name.                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VisItDataWriter::HDFputPatchExtentsStructArray(
+   const std::string& key,
+   const patchExtentsStruct* data,
+   const int nelements,
+   const hid_t group_id)
+{
+   TBOX_ASSERT(!key.empty());
+   TBOX_ASSERT(data != NULL);
+   TBOX_ASSERT(nelements > 0);
+
+   herr_t errf;
+   if (nelements > 0) {
+      hid_t space;
+      hsize_t dim[1];
+      dim[0] = nelements;
+      space = H5Screate_simple(1, dim, NULL);
+      TBOX_ASSERT(space >= 0);
+
+      hid_t pe_id = H5Tcreate(H5T_COMPOUND, sizeof(patchExtentsStruct));
+      TBOX_ASSERT(pe_id >= 0);
+
+      hsize_t dim1[1];
+      dim1[0] = VISIT_FIXED_DIM;
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      hid_t intXdType = H5Tarray_create(H5T_NATIVE_INT, 1, dim1);
+#else
+      hid_t intXdType = H5Tarray_create(H5T_NATIVE_INT, 1, dim1, NULL);
+#endif
+      TBOX_ASSERT(intXdType >= 0);
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      hid_t doubleXdType = H5Tarray_create(H5T_NATIVE_DOUBLE, 1, dim1);
+#else
+      hid_t doubleXdType = H5Tarray_create(H5T_NATIVE_DOUBLE, 1, dim1, NULL);
+#endif
+      TBOX_ASSERT(doubleXdType >= 0);
+
+      errf = H5Tinsert(pe_id,
+            "lower",
+            HOFFSET(patchExtentsStruct, lower),
+            intXdType);
+      TBOX_ASSERT(errf >= 0);
+      NULL_USE(errf);
+
+      errf = H5Tinsert(pe_id,
+            "upper",
+            HOFFSET(patchExtentsStruct, upper),
+            intXdType);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Tinsert(pe_id,
+            "xlo",
+            HOFFSET(patchExtentsStruct, xlo),
+            doubleXdType);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Tinsert(pe_id,
+            "xup",
+            HOFFSET(patchExtentsStruct, xhi),
+            doubleXdType);
+      TBOX_ASSERT(errf >= 0);
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      hid_t dataset = H5Dcreate(group_id,
+            key.c_str(),
+            pe_id,
+            space,
+            H5P_DEFAULT,
+            H5P_DEFAULT,
+            H5P_DEFAULT);
+#else
+      hid_t dataset = H5Dcreate(group_id,
+            key.c_str(),
+            pe_id,
+            space,
+            H5P_DEFAULT);
+#endif
+      TBOX_ASSERT(dataset >= 0);
+
+      errf = H5Dwrite(dataset,
+            pe_id,
+            H5S_ALL,
+            H5S_ALL,
+            H5P_DEFAULT,
+            data);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Sclose(space);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Tclose(pe_id);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Tclose(intXdType);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Tclose(doubleXdType);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Dclose(dataset);
+      TBOX_ASSERT(errf >= 0);
+
+   } else {
+      TBOX_ERROR("VisItDataWriter::HDFputPatchExtentsStructArray()"
+         << "\n    Attempt to put zero-length array with key = "
+         << key << std::endl);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create patch map for each of the patch extents HDF entries            *
+ * with the specified key name.                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VisItDataWriter::HDFputPatchMapStructArray(
+   const std::string& key,
+   const patchMapStruct* data,
+   const int nelements,
+   const hid_t group_id)
+{
+   TBOX_ASSERT(!key.empty());
+   TBOX_ASSERT(data != NULL);
+   TBOX_ASSERT(nelements > 0);
+
+   herr_t errf;
+   if (nelements > 0) {
+      hid_t space;
+      hsize_t dim[1];
+      dim[0] = nelements;
+      space = H5Screate_simple(1, dim, NULL);
+      TBOX_ASSERT(space >= 0);
+
+      hid_t pm_id = H5Tcreate(H5T_COMPOUND, sizeof(patchMapStruct));
+      TBOX_ASSERT(pm_id >= 0);
+
+      errf = H5Tinsert(pm_id,
+            "processor_number",
+            HOFFSET(patchMapStruct, processor_number),
+            H5T_NATIVE_INT);
+      TBOX_ASSERT(errf >= 0);
+      NULL_USE(errf);
+
+      errf = H5Tinsert(pm_id,
+            "file_cluster_number",
+            HOFFSET(patchMapStruct, file_cluster_number),
+            H5T_NATIVE_INT);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Tinsert(pm_id,
+            "block_number",
+            HOFFSET(patchMapStruct, block_number),
+            H5T_NATIVE_INT);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Tinsert(pm_id,
+            "level_number",
+            HOFFSET(patchMapStruct, level_number),
+            H5T_NATIVE_INT);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Tinsert(pm_id,
+            "patch_number",
+            HOFFSET(patchMapStruct, patch_number),
+            H5T_NATIVE_INT);
+      TBOX_ASSERT(errf >= 0);
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      hid_t dataset = H5Dcreate(group_id,
+            key.c_str(),
+            pm_id,
+            space,
+            H5P_DEFAULT,
+            H5P_DEFAULT,
+            H5P_DEFAULT);
+#else
+      hid_t dataset = H5Dcreate(group_id,
+            key.c_str(),
+            pm_id,
+            space,
+            H5P_DEFAULT);
+#endif
+      TBOX_ASSERT(dataset >= 0);
+      errf = H5Dwrite(dataset,
+            pm_id,
+            H5S_ALL,
+            H5S_ALL,
+            H5P_DEFAULT,
+            data);
+
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Sclose(space);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Tclose(pm_id);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Dclose(dataset);
+      TBOX_ASSERT(errf >= 0);
+
+   } else {
+      TBOX_ERROR("VisItDataWriter::HDFputPatchMapStructArray()"
+         << "\n    Attempt to put zero-length array with key = "
+         << key << std::endl);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create an array of max-min double (mm) structs an HDF database with   *
+ * the specified key name.                                               *
+ *                                                                       *
+ *************************************************************************
+ */
+void VisItDataWriter::HDFputPatchMinMaxStructArray(
+   const std::string& key,
+   const patchMinMaxStruct* data,
+   const int nelements,
+   const hid_t group_id)
+{
+   TBOX_ASSERT(!key.empty());
+   TBOX_ASSERT(data != NULL);
+   TBOX_ASSERT(nelements > 0);
+
+   herr_t errf;
+   if (nelements > 0) {
+      hid_t space;
+      hsize_t dim[1];
+      dim[0] = nelements;
+      space = H5Screate_simple(1, dim, NULL);
+      TBOX_ASSERT(space >= 0);
+
+      hid_t s1_tid = H5Tcreate(H5T_COMPOUND, sizeof(patchMinMaxStruct));
+      TBOX_ASSERT(s1_tid >= 0);
+
+      errf = H5Tinsert(s1_tid,
+            "data_is_defined",
+            HOFFSET(patchMinMaxStruct, patch_data_on_disk),
+            H5T_NATIVE_CHAR);
+      TBOX_ASSERT(errf >= 0);
+      NULL_USE(errf);
+
+      errf = H5Tinsert(s1_tid,
+            "material_composition_flag",
+            HOFFSET(patchMinMaxStruct, material_composition_code),
+            H5T_NATIVE_INT);
+
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Tinsert(s1_tid,
+            "species_composition_flag",
+            HOFFSET(patchMinMaxStruct, species_composition_code),
+            H5T_NATIVE_INT);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Tinsert(s1_tid,
+            "min",
+            HOFFSET(patchMinMaxStruct, min),
+            H5T_NATIVE_DOUBLE);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Tinsert(s1_tid,
+            "max",
+            HOFFSET(patchMinMaxStruct, max),
+            H5T_NATIVE_DOUBLE);
+      TBOX_ASSERT(errf >= 0);
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      hid_t dataset = H5Dcreate(group_id,
+            key.c_str(),
+            s1_tid,
+            space,
+            H5P_DEFAULT,
+            H5P_DEFAULT,
+            H5P_DEFAULT);
+#else
+      hid_t dataset = H5Dcreate(group_id,
+            key.c_str(),
+            s1_tid,
+            space,
+            H5P_DEFAULT);
+#endif
+      TBOX_ASSERT(dataset >= 0);
+
+      errf = H5Dwrite(dataset,
+            s1_tid,
+            H5S_ALL,
+            H5S_ALL,
+            H5P_DEFAULT,
+            data);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Sclose(space);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Tclose(s1_tid);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Dclose(dataset);
+      TBOX_ASSERT(errf >= 0);
+
+   } else {
+      TBOX_ERROR("VisItDataWriter::HDFputPatchMinMaxStructArray()"
+         << "\n    data writer with name " << d_object_name
+         << "\n    Attempt to put zero-length array with key = "
+         << key << std::endl);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create an array of child/parent pointer (cpp) structs an HDF          *
+ * database with the specified key name.                                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VisItDataWriter::HDFputChildParentStructArray(
+   const std::string& key,
+   const void* data,
+   const int nelements,
+   hid_t group_id,
+   const int sizeOfStruct,
+   const std::string& field_name)
+{
+   TBOX_ASSERT(!key.empty());
+   TBOX_ASSERT(data != NULL);
+   TBOX_ASSERT(nelements > 0);
+
+   herr_t errf;
+   if (nelements > 0) {
+      hid_t space;
+      hsize_t dim[1];
+      dim[0] = nelements;
+      space = H5Screate_simple(1, dim, NULL);
+      TBOX_ASSERT(space >= 0);
+
+      hid_t s1_tid = H5Tcreate(H5T_COMPOUND, sizeOfStruct);
+      TBOX_ASSERT(s1_tid >= 0);
+
+      errf = H5Tinsert(s1_tid,
+            "offset",
+            0,
+            H5T_NATIVE_INT);
+      TBOX_ASSERT(errf >= 0);
+      NULL_USE(errf);
+
+      errf = H5Tinsert(s1_tid,
+            field_name.c_str(),
+            sizeof(int),
+            H5T_NATIVE_INT);
+      TBOX_ASSERT(errf >= 0);
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      hid_t dataset = H5Dcreate(group_id,
+            key.c_str(),
+            s1_tid,
+            space,
+            H5P_DEFAULT,
+            H5P_DEFAULT,
+            H5P_DEFAULT);
+#else
+      hid_t dataset = H5Dcreate(group_id,
+            key.c_str(),
+            s1_tid,
+            space,
+            H5P_DEFAULT);
+#endif
+      TBOX_ASSERT(dataset >= 0);
+
+      errf = H5Dwrite(dataset, s1_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Sclose(space);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Tclose(s1_tid);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Dclose(dataset);
+      TBOX_ASSERT(errf >= 0);
+
+   } else {
+      TBOX_ERROR("VisItDataWriter::HDFputChildParentStructArray()"
+         << "\n    data writer with name " << d_object_name
+         << "\n    Attempt to put zero-length array with key = "
+         << key << std::endl);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private function to calculate required size for a buffer              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int VisItDataWriter::getBufferSize(
+   const hier::Box patch_box,
+   const hier::IntVector& ghost_cell_width,
+   const variable_centering centering)
+{
+   int buf_size = 1;
+   int cen = 0;
+   if (centering == VISIT_CELL || centering == VISIT_UNKNOWN_CELL) {
+      cen = 1;
+   } else if (centering == VISIT_NODE || centering == VISIT_UNKNOWN_NODE) {
+      cen = 2;
+   }
+   const int* lower = &patch_box.lower()[0];
+   const int* upper = &patch_box.upper()[0];
+
+   for (int i = 0; i < d_dim.getValue(); i++) {
+      buf_size *= upper[i] - lower[i] + cen + (2 * ghost_cell_width(i));
+   }
+   return buf_size;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Dump plotitem fields for debugging purposes                           *
+ *                                                                       *
+ *************************************************************************
+ */
+void VisItDataWriter::dumpItem(
+   VisItItem& plotitem,
+   std::ostream& os) const
+{
+   os << "d_var_name: " << plotitem.d_var_name << "\n";
+   std::string type;
+   if (plotitem.d_var_type == VISIT_SCALAR) {
+      type = "SCALAR";
+   } else if (plotitem.d_var_type == VISIT_VECTOR) {
+      type = "VECTOR";
+   } else if (plotitem.d_var_type == VISIT_TENSOR) {
+      type = "TENSOR";
+   }
+   os << "d_var_type: " << type << "\n";
+   std::string data_type;
+   if (plotitem.d_var_data_type == VISIT_DOUBLE) {
+      data_type = "DOUBLE";
+   } else if (plotitem.d_var_data_type == VISIT_FLOAT) {
+      data_type = "FLOAT";
+   } else if (plotitem.d_var_data_type == VISIT_INT) {
+      data_type = "INT";
+   }
+   os << "d_var_data_type: " << data_type << "\n";
+   std::string cent;
+   if (plotitem.d_var_centering == VISIT_CELL) {
+      cent = "CELL";
+   } else if (plotitem.d_var_centering == VISIT_UNKNOWN_CELL) {
+      cent = "UNKNOWN_CELL";
+   } else if (plotitem.d_var_centering == VISIT_NODE) {
+      cent = "NODE";
+   } else if (plotitem.d_var_centering == VISIT_UNKNOWN_NODE) {
+      cent = "VISIT_UNKNOWN_NODE";
+   }
+   os << "d_var_centering: " << cent << "\n";
+   os << "d_patch_data_index: " << plotitem.d_patch_data_index << "\n";
+   os << "d_depth: " << plotitem.d_depth << "\n";
+   os << "d_start_depth_index: " << plotitem.d_start_depth_index << "\n";
+   os << "d_scale_factor: " << plotitem.d_scale_factor << "\n";
+   os << "d_is_material_state_variable: "
+      << plotitem.d_is_material_state_variable << "\n";
+   os << "d_derived_writer ptr: " << plotitem.d_derived_writer << "\n";
+
+   int i;
+   for (i = 0; i < plotitem.d_depth; i++) {
+      os << "   comp_name[" << i << "]: "
+      << plotitem.d_visit_var_name[i] << "\n";
+   }
+
+   os << "d_isa_material: " << plotitem.d_isa_material << "\n";
+   os << "d_material_name: " << plotitem.d_material_name << "\n";
+   os << "d_materials_writer ptr: " << plotitem.d_materials_writer << "\n";
+   if (plotitem.d_isa_material) {
+      os << "  Species for this material: " << "\n";
+      for (i = 0; i < plotitem.d_species_names.getSize(); i++) {
+         os << "   species[" << i << "]: "
+         << plotitem.d_species_names[i] << "\n";
+      }
+   }
+
+   os << "d_isa_species: " << plotitem.d_isa_species << "\n";
+   if (plotitem.d_parent_material_pointer) {
+      os << "parent_material: "
+         << plotitem.d_parent_material_pointer->d_material_name << "\n";
+   } else {
+      os << "parent_material: Not Applicable\n";
+   }
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void VisItDataWriter::initializeCallback()
+{
+   t_write_plot_data =
+      tbox::TimerManager::getManager()->getTimer("appu:VisItDataWriter::writePlotData()");
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void VisItDataWriter::finalizeCallback()
+{
+   t_write_plot_data.setNull();
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/VisItDataWriter.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/VisItDataWriter.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1245 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Writes data files for visualization by VisIt 
+ *
+ ************************************************************************/
+
+#ifndef included_appu_VisItDataWriter
+#define included_appu_VisItDataWriter
+
+#include "SAMRAI/SAMRAI_config.h"
+
+/*
+ ************************************************************************
+ *  THIS CLASS WILL BE UNDEFINED IF THE LIBRARY IS BUILT WITHOUT HDF5
+ ************************************************************************
+ */
+#ifdef HAVE_HDF5
+
+#include "SAMRAI/appu/VisDerivedDataStrategy.h"
+#include "SAMRAI/appu/VisMaterialsDataStrategy.h"
+
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/tbox/IOStream.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/HDFDatabase.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/Database.h"
+
+#include <string>
+
+#ifndef VISIT_MAX_NUMBER_COMPONENTS
+#define VISIT_MAX_NUMBER_COMPONENTS (100)
+#endif
+
+#ifndef VISIT_FIXED_DIM
+#define VISIT_FIXED_DIM (3)
+#endif
+
+namespace SAMRAI {
+namespace appu {
+
+/*!
+ * @brief Class VisItDataWriter is used by SAMRAI-based
+ * application codes to generate VisIt data files.  VisIt provides a
+ * wide range of visualization and post-processing capabilities.  This
+ * class supports both cell-centered and node-centered 2D and 3D AMR
+ * data where the underlying data type is either double, float, or
+ * int.  Scalar, vector and 2nd-order tensor variables are
+ * supported. This class may be used when the mesh geometry is managed
+ * by a geom::CartesianGridGeometry object, or when the mesh itself is
+ * stored in a state variable to allow moving deformed grids.
+ *
+ * The VisIt data writer (VDW) supports CELL or NODE centered data
+ * of data type double, float, and integer.  There is support to
+ * convert an alternative user-defined type into standard cell or node
+ * centered data for visualization purposes.  See method descriptions
+ * below for more information.  The data actually written by the VDW
+ * is of type float so data should not exceed the defined MAX_FLT
+ * and/or MIN_FLT.  An optional scale factor may be supplied for
+ * data that exceeds these values.
+ *
+ * After creating a VDW object, the data items to be dumped for
+ * plotting must be registered with that object. Thereafter, the
+ * object can be used to generate a series of visualization dump files
+ * during the execution of an application.  The dumps will include all
+ * data items registered with the VDW.
+ *
+ * This class supports the dumping of data that
+ * resides on an AMR patch hierarchy at the time the dump file is
+ * written, and derived data, data that does not live on the patch
+ * hierarchy, but that can be computed from data which does live on
+ * the patch hierarchy.  Derived data requires the user to implement a
+ * method for a concrete class derived from the
+ * VisDerivedDataStrategy abstract class.
+ *
+ * The class also supports writing material and species data.  Material
+ * is data which indicates for each cell, the fractional amount of
+ * a material compound, e.g. "steel", "gas", "copper", etc., contained
+ * in that cell. Species are subcomponents of a material, e.g. if the material
+ * is "gas", it may have subcomponents such as "nitrogen", "oxygen",
+ * etc.  To use material data it is necessary for a user to implement
+ * the relevant packing methods for a concrete class derived from the
+ * VisMaterialsDataStrategy abstract class.
+ *
+ * The VDW requires the compilation of SAMRAI with the HDF5 library.
+ *
+ *
+ * A brief summary of the basic steps typically involved in using the
+ * VDW are:
+ *
+ *    -  Create a VisIt data writer object, specifying a name for the
+ *       object and the name of the directory to contain the visit dump
+ *       files.  An optional argument number_procs_per_file, applicable
+ *       to parallel runs, sets the number of processors that share a
+ *       common dump file.  This can reduce parallel I/O contention.
+ *       The default value of this arg is 1.  If the value specified
+ *       is greater than the number of processors, then all processors
+ *       share a single dump file.
+ *
+ *    - Register hierarchy variable data fields using
+ *      registerPlotQuantity(). The variables registered may be scalar,
+ *      vector, or tensor (depth 1, DIM, and DIM*DIM, respectively)
+ *      which is specified in the argument list.  All variables require a
+ *      string identifier and an index into the patch data array on the
+ *      AMR hierarchy. Optionally, a start depth index may be supplied
+ *      to plot a single component of a multi-component field (i.e.
+ *      a scalar quantity within a vector, or a vector within a tensor).
+ *      A scale factor may also optionally be specified. Lastly, for
+ *      user-defined data that is not cell or node type, the proper
+ *      centering (cell or node) for the data may be supplied.
+ *
+ *    - If using derived data, set a default user-defined
+ *      derived data writer using setDefaultDerivedDataWriter(). A derived
+ *      data writer may also optionally be specified in the call to
+ *      registerDerivedPlotQuantity(); if so, this derived data writer
+ *      will be used for the variable being registered.  If no derived
+ *      writer is specified in the registration call, the default
+ *      derived data writer will be used.
+ *
+ *    - Register derived variable data fields using
+ *      registerDerivedPlotQuantity().  All derived variables require a string
+ *      identifier. Optionally, a VisDerivedDataStrategy object,
+ *      a scale factor, and centering and may be specified.  By default
+ *      By default, the data is assumed to be cell-centered.
+ *
+ *    - The resetLevelPlotQuantity() method is provided for cases when a
+ *      variable lives at different patch data indices on different
+ *      levels.  Invoking this method redefines the patch data array
+ *      index for a given variable on a given level that will be
+ *      written to a visit dump file.  Before this method is called,
+ *      the variable must be registered using registerPlotQuantity() method.
+ *
+ *    - If using deformed structured AMR grids (moving grids), register
+ *      the coordinates of the nodes using the registerNodeCoordinates()
+ *      method.
+ *
+ *    - If using materials, set the user-defined data writer for material
+ *      data using setMaterialsDataWriter().  Then register the names of
+ *      the materials being used with registerMaterialNames().
+ *
+ *    - If using species of the materials, register the names of
+ *      the species of each material using the registerSpeciesNames() method.
+ *
+ *    - The writer will generate VisIt dump files when the method
+ *      writePlotData() is called.  Minimally, only a hierarchy and the
+ *      time step number is needed.  A simulation time can also be
+ *      specified which will be included as part of the file
+ *      information in the dump
+ *
+ *    - The document "Generating VisIt Visualization Data Files in
+ *      SAMRAI" in the SAMRAI documentation directory
+ *      (docs/userdocs/VisIt-writer.pdf) gives in-depth details on the
+ *      use of the VDW and materials, as well as example code fragments
+ *      showing how the various VisItDataWriter methods can be embedded
+ *      in an application.
+ *
+ */
+
+class VisItDataWriter:public virtual tbox::DescribedClass
+{
+public:
+   /*!
+    * @brief The constructor initializes the VisIt data writer to a
+    * default state.
+    *
+    * The object_name argument is used primarily for error reporting.
+    * The dump_directory_name argument is the name of the directory
+    * which will contain the visit dump files.  The directory name may
+    * include a path.  If the dump directory or any intermediate
+    * directories in the path do not exist, they will be created. The
+    * optional number_procs_per_file argument is applicable to
+    * parallel runs and specifies the number of processors that share
+    * a common dump file; the default value is 1. If the specified
+    * number_procs_per_file is greater than the number of processors,
+    * then all processors share a single vis dump file.  Reducing the
+    * number of files written may reduce parallel I/O contention and
+    * thus improve I/O efficiency.  The optional argument is_multiblock
+    * defaults to false.  It must be set to true for problems on multiblock
+    * domains, and left false in all other cases.
+    *
+    * Before the data writer object can be used for dumping VisIt
+    * data, the variables and material-related data (if any) must be
+    * registered.
+    *
+    * An error results and the program will halt if:
+    *   - the data is not 2D nor 3D, i.e. DIM != 2 and DIM != 3
+    *   - when assertion checking is active, the object name string is
+    *     empty, or the number_procs_per_file is <= 0.
+    *
+    * @param object_name String name for data writer object
+    * @param dump_directory_name String name for dump directory, which
+    *   may include a path.
+    * @param number_procs_per_file Optional integer number processors
+    *  (>= 1) to share a common dump file; default is 1.
+    * @param is_multiblock Optional argument should be set to true only
+    *  only for problems on a multiblock domain.
+    */
+   VisItDataWriter(
+      const tbox::Dimension& dim,
+      const std::string& object_name,
+      const std::string& dump_directory_name,
+      int number_procs_per_file = 1,
+      bool is_multiblock = false);
+
+   /*!
+    * @brief The destructor for a VisItDataWriter object.
+    *
+    * The destructor for the writer does nothing interesting.
+    */
+   virtual ~VisItDataWriter();
+
+   /*!
+    * @brief This method sets the default data writer to use for derived
+    * data.
+    *
+    * If a non-null derived data writer is supplied by the member function
+    * registerDerivedPlotQuantity() it will be used in place of the one
+    * given here.
+    *
+    * An error results and the program will halt if:
+    *   - assertion checking is active and the default_derived_writer
+    *     pointer is null.
+    *
+    * @param default_derived_writer tbox::Pointer to a VisDerivedDataStrategy
+    *  object.
+    */
+   void
+   setDefaultDerivedDataWriter(
+      VisDerivedDataStrategy* default_derived_writer);
+
+   /*!
+    * @brief This method sets the data writer to use for materials.
+    *
+    * An error results and the program will halt if:
+    *   - assertion checking is active and the materials_data__writer
+    *     pointer is null.
+    *
+    * @param materials_data_writer tbox::Pointer to a VisMaterialsDataStrategy object.
+    */
+   void
+   setMaterialsDataWriter(
+      VisMaterialsDataStrategy* materials_data_writer);
+
+   /*!
+    * @brief This method registers a variable with the VisIt data writer.
+    *
+    * Each plot quantity requires a variable name, which is what VisIt
+    * will label the plotted quantity.  The variable type is a string
+    * specifying either "SCALAR", "VECTOR", or "TENSOR".  By default, the
+    * dimension of a scalar variable is 1, vector is DIM, and tensor is
+    * DIM*DIM. The integer patch data array index and optional depth
+    * index indicate where the data may be found on patches in the hierarchy.
+    *
+    * A number of optional parameters may be used to further specify
+    * characteristics of the plotted variable. The start depth index
+    * allows subsets of variables with depth greater than than the supplied
+    * type (scalar, vector, tensor) to be specified. For example, a single
+    * depth index of a variable with depth greater than one may be registered
+    * as a scalar.  A scale factor may be specified such that each data value
+    * is multiplied by this factor before being written to the file. Finally,
+    * Finally, the variable centering may be specified for data that is not
+    * standard CELL or NODE centered types. By default, the writer will set
+    * the centering according to the type of data in the supplied patch data
+    * index. It will revert to the supplied type only if it is unable to
+    * determine the type from the index.
+    *
+    * Data does not need to exist on all patches or all levels.
+    *
+    * An error results and the program will halt if:
+    *   - a variable was previously registered with the same name.
+    *   - the variable type is not "SCALAR", "VECTOR", or "TENSOR"
+    *   - the patch data factory referred to by the patch data array
+    *     index is null.
+    *   - the start depth index is invalid.
+    *   - the supplied variable centering is not "CELL" or "NODE".
+    *
+    * @param variable_name name of variable.
+    * @param variable_type "SCALAR", "VECTOR", "TENSOR"
+    * @param patch_data_index patch data descriptor id
+    * @param start_depth_index (optional) zero by default; may specify
+    *    starting index if patch_data_id has depth greater than
+    *    the supplied variable_type
+    * @param scale_factor (optional) scale factor for data
+    * @param variable_centering (optional) "CELL" or "NODE" - used
+    *    only when data being registered is not standard cell or
+    *    node type.
+    */
+
+   void
+   registerPlotQuantity(
+      const std::string& variable_name,
+      const std::string& variable_type,
+      const int patch_data_index,
+      const int start_depth_index = 0,
+      const double scale_factor = 1.0,
+      const std::string& variable_centering = "UNKNOWN");
+
+   /*!
+    * @brief This method registers a derived variable with the VisIt data
+    * writer.
+    *
+    * Each derived variable requires a variable name, which is what VisIt
+    * will label the plotted quantity.  The variable type is a string
+    * specifying either "SCALAR", "VECTOR", or "TENSOR".  By default, the
+    * dimension of a scalar variable is 1, vector is DIM, and tensor is
+    * DIM*DIM.  The derived writer should implement methods defined in
+    * the derived data strategy which compute the derived data.
+    *
+    * Optional parameters may be used to further define characteristics
+    * of the derived variable. A scale factor may be specified such that
+    * each data value is multiplied by this factor before being written
+    * to the file.  The variable centering should specify the variable as
+    * "CELL" or "NODE" type (if unspecified, "CELL" is used by default).
+    *
+    * An error results and the program will halt if:
+    *   - a variable was previously registered with the same name.
+    *   - the variable type is not "SCALAR", "VECTOR", or "TENSOR"
+    *   - the derived_writer is NULL and there is no default derived writer.
+    *   - the supplied variable centering is not "CELL" or "NODE".
+    *
+    * @param variable_name name of variable.
+    * @param variable_type "SCALAR", "VECTOR", "TENSOR"
+    * @param derived_writer (optional) derived data strategy
+    *    object to use to calculate this derived data - will use default
+    *    derived data object if not supplied
+    * @param scale_factor (optional) scale factor with which to multiply
+    *    all data values
+    * @param variable_centering (optional) centering of derived data - "CELL" or "NODE"
+    * @param mix type (optional) indicate whether or not the mixed material
+    *    state will be stored, "MIXED", or the default of using cell averages
+    *    "CLEAN". If "MIXED" then packMixedDerivedDataIntoDoubleBuffer() must
+    *    be provided.
+    */
+   void
+   registerDerivedPlotQuantity(
+      const std::string& variable_name,
+      const std::string& variable_type,
+      VisDerivedDataStrategy* derived_writer =
+         (VisDerivedDataStrategy *)NULL,
+      const double scale_factor = 1.0,
+      const std::string& variable_centering = "CELL",
+      const std::string& variable_mix_type = "CLEAN");
+
+   /*!
+    * @brief This method resets the patch_data_index, and/or
+    * the depth_index, at a specific level, of a previously registered
+    * plot variable.
+    *
+    * The change redefines the patch data object written to the plot
+    * file on the specified level to the data at the new patch data
+    * array index / depth index.  This method is used when a
+    * particular variable lives at different patch data slots
+    * on different hierarchy levels.  For example, suppose a
+    * variable lives at a patch data array index on every level except
+    * the finest hierarchy level, where it lives at a different index.
+    * First, the variable must be registered using
+    * registerPlotQuantity().  Second, the patch data index for
+    * the finest hierarchy level is reset using this method. When the
+    * data is plotted, it will appear on all levels in the
+    * hierarchy. The patch data array index must refer to data with
+    * the same type (SCALAR, VECTOR, or TENSOR), centering (NODE or CELL),
+    * and data type (int, float, double) as the data for which the
+    * variable was originally registered.
+    *
+    * An error results and the program will halt if:
+    *   - this variable name was not previously registered.
+    *   - the patch data referred to by the patch data array index
+    *     is null, or the data type is not the same type as the data
+    *     which was originally registered.
+    *   - the depth index is invalid.
+    *
+    * @param variable_name name of variable.
+    * @param level_number level number on which data index is being reset.
+    * @param patch_data_index new patch data array index.
+    * @param start_depth_index (optional) argument indicating the new depth index.
+    */
+   void
+   resetLevelPlotQuantity(
+      const std::string& variable_name,
+      const int level_number,
+      const int patch_data_index,
+      const int start_depth_index = 0);
+
+   /*!
+    * @brief This method is used to register node coordinates for
+    * deformed structured AMR grids (moving grids).
+    *
+    * The patch data index must correspond to an DIM dimensional vector
+    * that defines the coordinate location ([X,Y] in 2D, [X,Y,Z] in 3D).
+    * The data defining the node locations must be node centered.
+    *
+    * An error results and the program will halt if:
+    *   - the patch data array index is invalid.
+    *   - the depth of the patch data index is less than DIM.
+    *
+    * If the nodal coordinates are not in a NodeData object on the
+    * hierarchy, you can use registerDerivedPlotQuantity() with the
+    * variable name of "Coords", the type of "VECTOR" and the
+    * variable_centering of "NODE".
+    *
+    * @param patch_data_index patch data index of the coordinate data.
+    * @param start_depth_index (optional) start index for case where
+    *    coordinate data is a subcomponent of a larger patch data vector
+    */
+   void
+   registerNodeCoordinates(
+      const int patch_data_index,
+      const int start_depth_index = 0);
+
+   /*!
+    * @brief Same as above method, but allows registration of single
+    * coordinate for deformed structured AMR grids (moving grids).
+    *
+    * The coordinate number should be 0, 1, or 2 for X, Y, and Z directions,
+    * respectively.  The patch data index must either be a scalar,  or a
+    * vector with an appropriate depth index.  A scale factor may be used to
+    * scale grid data.
+    *
+    * If the nodal coordinates are not in a NodeData object on the
+    * hierarchy, you can use registerDerivedPlotQuantity() with the
+    * variable name of "Coords", the type of "VECTOR" and the
+    * variable_centering of "NODE".
+    *
+    * @param coordinate_number must be 0 or 1 for 2D, or 0,1,2 for 3D.
+    * @param patch_data_index patch data index of the coordinate data.
+    * @param depth_index (optional) index for case where
+    *    coordinate data is a subcomponent of a larger patch data vector
+    * @param scale_factor scale factor with which to multiply
+    *    coordinate data values
+    */
+   void
+   registerSingleNodeCoordinate(
+      const int coordinate_number,
+      const int patch_data_index,
+      const int depth_index = 0,
+      const double scale_factor = 1.0);
+
+   /*!
+    * @brief This method registers with the VisIt data writer the
+    * names of materials being used in the simulation.
+    *
+    * When a mesh has materials defined over it, every cell will
+    * contain a fractional amount f (0 <= f <= 1.0) of every material,
+    * called a material fraction or volume fraction.  The sum of all
+    * material fractions for every cell must be 1.0.  Since materials
+    * are defined over a cell, each materials variable is assumed to
+    * be CELL centered.
+    *
+    * In order to use materials with VisIt, the application class
+    * needs to inherit from VisMaterialsDataStrategy, an
+    * abstract base class which defines an interface for writing out
+    * various materials related fields.  A concrete object of this
+    * strategy must be registered with the VisIt data writer.  That
+    * concrete object is responsible for providing a concrete
+    * implementation of the method packMaterialFractionsIntoDoubleBuffer()
+    * which writes out the material fractions for each registered material
+    * over a given patch.
+    *
+    * VisIt uses the material fractions to calculate interpolated
+    * material boundaries in cells with multiple materials.  Therefore
+    * VisIt can display a material (or materials) as multiple colored
+    * contiguous regions.  In addition, VisIt can intersect this
+    * volume field with a plane and get accurate 2D boundaries within
+    * cells.  If desired, the material fractions for a material can be
+    * treated as a scalar field and the usual scalar field plot tools,
+    * such as pseudocolor and contour, can be applied.
+    *
+    * Because species are a subset of materials, it is required that the
+    * material names be registered before any species names are registered.
+    * New materials may not be added during the simulation; that is, this
+    * method should only be called once.
+    *
+    * An error results and the program will halt if:
+    *   - this method is called more than once.
+    *   - the new registerSparseMaterialNames() method is called
+    *   - when assertion checking is active, the number of names = 0,
+    *     or any material name string is empty.
+    *
+    * @param material_names tbox::Array of strings: the names of the materials.
+    */
+   void
+   registerMaterialNames(
+      const tbox::Array<std::string>& material_names);
+
+   /*!
+    * @brief This method registers with the VisIt data writer the
+    * names of materials being used in the simulation.
+    *
+    * When a mesh has materials defined over it, every cell will
+    * contain a fractional amount f (0 <= f <= 1.0) of every material,
+    * called a material fraction or volume fraction.  The sum of all
+    * material fractions for every cell must be 1.0.  Since materials
+    * are defined over a cell, each materials variable is assumed to
+    * be CELL centered.
+    *
+    * In order to use materials with VisIt, the application class
+    * needs to inherit from VisMaterialsDataStrategy, an
+    * abstract base class which defines an interface for writing out
+    * various materials related fields.  A concrete object of this
+    * strategy must be registered with the VisIt data writer.  That
+    * concrete object is responsible for providing a concrete
+    * implementation of the method packMaterialFractionsIntoSparseBuffers()
+    * which writes out the material fractions for each registered material
+    * over a given patch.
+    *
+    * VisIt uses the material fractions to calculate interpolated
+    * material boundaries in cells with multiple materials.  Therefore
+    * VisIt can display a material (or materials) as multiple colored
+    * contiguous regions.  In addition, VisIt can intersect this
+    * volume field with a plane and get accurate 2D boundaries within
+    * cells.  If desired, the material fractions for a material can be
+    * treated as a scalar field and the usual scalar field plot tools,
+    * such as pseudocolor and contour, can be applied.
+    *
+    * An error results and the program will halt if:
+    *   - this method is called more than once.
+    *   - the legacy registerMaterialNames() method is called
+    *   - when assertion checking is active, the number of names = 0,
+    *     or any material name string is empty.
+    *
+    * @param material_names tbox::Array of strings: the names of the materials.
+    */
+   void
+   registerSparseMaterialNames(
+      const tbox::Array<std::string>& material_names);
+
+   /*!
+    * @brief This method registers the names of the species for a
+    * material_name with the VisIt data writer.
+    *
+    * Species are subcomponents of a material. For example, a simulation
+    * with 4 materials (e.g. "copper", "gold", "liquid" and "gas") may have
+    * one of the materials (e.g. "gas") that is composed of multiple
+    * species (e.g. "nitrogen" and helium"). Each species is associated
+    * with a particular material, so it is necessary that the
+    * "registerMaterialNames()" method is called before this method.
+    *
+    * For each species name registered, there is an associated species
+    * fraction,  which must be between 0 and 1.0 on each cell. The sum of
+    * the species fractions for all species of a given material must
+    * equal 1.0 in every cell in which that material appears.  In VisIt,
+    * the species fractions for a species can be treated as
+    * a scalar field and the usual scalar plot operations applied to
+    * the field to show "concentrations".  So, in the example described
+    * above, the percentage of nitrogen in the gas can be displayed in a
+    * pseudocolor plot.
+    *
+    * In order to use species with VisIt, the application class
+    * needs to inherit from VisMaterialsDataStrategy, an
+    * abstract base class which defines an interface for writing out
+    * species related fields.  A concrete object of the materials data
+    * strategy class is responsible for providing an implementation of the
+    * method packSpeciesFractionsIntoDoubleBuffer() to write out
+    * the species fractions field for each registered species over a
+    * given patch.
+    *
+    * An error results and the program will halt if:
+    *   - this method is called before registerMaterialNames() is
+    *     called.
+    *   - the supplied material name is not in the list of materials
+    *     supplied in the registerMaterialNames() method.
+    *   - the method is called more than once for a given material
+    *   - when assertion checking is active, the number of names = 0,
+    *     or any name string is empty.
+    *
+    * @param material_name String name of the material whose species
+    *  names are being registered.
+    * @param species_names tbox::Array of strings: the names of the species
+    *  for material_name.
+    */
+   void
+   registerSpeciesNames(
+      const std::string& material_name,
+      const tbox::Array<std::string>& species_names);
+
+   /*!
+    * @brief This method registers expressions that will be embedded in the
+    * VisIt datafiles.
+    *
+    * The three Arrays of strings define the names (or keys) of the
+    * expressions, the expressions, and the types of the expressions
+    * (scalar, vector, tensor). For more information on defining VisIt
+    * expressions see the VisItUsersManual.
+    */
+
+   void
+   registerVisItExpressions(
+      const tbox::Array<std::string>& expression_keys,
+      const tbox::Array<std::string>& expressions,
+      const tbox::Array<std::string>& expression_types);
+
+   /*!
+    * @brief This method causes the VisIt data writer to dump all
+    * registered data. The appropriate packing methods will be invoked
+    * for material-related data and derived data.
+    *
+    * The time step number is used as a file name extension for the
+    * dump files. It must be non-negative and greater than the
+    * previous time step, if any. A simulation time may be provided as
+    * an optional argument.  If this time is not specified, a default
+    * value of zero is used.  The simulation time can be accessed in
+    * VisIt's "File Information" dialog box.
+    *
+    * An error results and the program will halt if:
+    *   - materials have been registered, but setMaterialsDataWriter() has
+    *     not been called.
+    *   - the time step number is <= the previous time step number.
+    *   - when assertion checking is active, the hierarchy pointer is null,
+    *     the time step is < 0, or the dump directory name string is empty,
+    *
+    * @param hierarchy A pointer to the patch hierarchy on which the data
+    *  to be plotted is defined.
+    * @param time_step Non-negative integer value specifying the current
+    *  time step number.
+    * @param simulation_time Optional argument specifying the double
+    *  precision simulation time. Default is 0.0.
+    */
+   void
+   writePlotData(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      int time_step,
+      double simulation_time = 0.0);
+
+   /*!
+    * @brief Set the name of the summary file.
+    *
+    * This sets the summary file written at each step of the simulation
+    * which describes the data contained in the visit files written by
+    * each MPI process.  The supplied string is appended with ".samrai"
+    * so the actual name of the file will be "<filename>.samrai".  If no
+    * alternative name is supplied, by default the summary file used is
+    * "summary.samrai".
+    */
+   void
+   setSummaryFilename(
+      std::string& filename);
+
+private:
+   /*
+    * Static boolean that specifies if the summary file (d_summary_filename)
+    * has been opened.
+    */
+   static bool s_summary_file_opened;
+
+   /*
+    * Struct used to gather min/max information, and
+    * to track floating point overflows of data.
+    */
+   struct patchMinMaxStruct {
+      double min;
+      double max;
+      int material_composition_code;
+      int species_composition_code;
+      char patch_data_on_disk;
+   };
+
+   /*
+    * Struct to hold patch extents.
+    */
+   struct patchExtentsStruct {
+      int lower[VISIT_FIXED_DIM];
+      int upper[VISIT_FIXED_DIM];
+      double xlo[VISIT_FIXED_DIM];
+      double xhi[VISIT_FIXED_DIM];
+   };
+
+   /*
+    * Struct to hold patch processor mapping info.
+    */
+   struct patchMapStruct {
+      int file_cluster_number;
+      int processor_number;
+      int block_number;
+      int level_number;
+      int patch_number;
+   };
+
+   /*
+    * Struct used to hold parent and child information for
+    * writing data from multiple tbox::MPI processes.
+    */
+   struct childParentStruct {
+      childParentStruct():child(-1),
+         parent(-1) {
+      }                                              // Kill warnings about uninit values.
+      int child;
+      int parent;
+   };
+
+   /*
+    * hier::Variable type:
+    *   SCALAR - scalar plot variable (depth = 1)
+    *   VECTOR - vector plot variable (depth = DIM)
+    *   TENSOR - tensor plot variable (depth = DIM*DIM)
+    */
+   enum variable_type { VISIT_SCALAR = 0,
+                        VISIT_VECTOR = 1,
+                        VISIT_TENSOR = 2 };
+
+   /*
+    * hier::Variable data type  - float, double, integer
+    */
+   enum variable_data_type { VISIT_INT = 3,
+                             VISIT_FLOAT = 4,
+                             VISIT_DOUBLE = 5,
+                             VISIT_DATA_TYPE_BAD = 990 };
+
+   /*
+    * hier::Variable centering:
+    *   CELL         - standard cell centered
+    *   NODE         - standard node centered
+    *   UNKNOWN_CELL - unknown type, cast to cell centered
+    *   UNKNOWN_NODE - unknown type, cast to node centered
+    */
+   enum variable_centering { VISIT_CELL = 6,
+                             VISIT_NODE = 7,
+                             VISIT_UNKNOWN_CELL = 8,
+                             VISIT_UNKNOWN_NODE = 9,
+                             VISIT_CENTERING_BAD = 991 };
+
+   /*
+    * Grid type:
+    *   CARTESIAN - standard cartesian grid
+    *   DEFORMED  - node centered grid where nodes may be deformed
+    *               (e.g. sometimes called curvilinear)
+    */
+   enum grid_type { VISIT_CARTESIAN = 10,
+                    VISIT_DEFORMED = 11 };
+
+   /*
+    * The following structure is used to store data about each item
+    * to be written to a plot file.
+    *
+    * Standard information (user supplied):
+    *   d_var_name - string variable name:
+    *   d_var_type - SCALAR, VECTOR, TENSOR
+    *   d_var_data_type - INT, FLOAT, DOUBLE
+    *   d_var_centering - CELL, NODE, UNKNOWN_CELL, UNKNOWN_NODE
+    *   d_patch_data_index - int patch data id
+    *   d_depth - int depth of patch data
+    *   d_start_depth_index - int starting depth for vector data
+    *   d_scale_factor - dbl scaling factor
+    *   d_derived_writer - ptr to derived data writer (NULL if not DERIVED)
+    *   d_is_material_state_variable - bool, true if mixed state var, in which
+    *       case d_derived_writer must be provided and provide
+    *       packMixedDerivedDataIntoDoubleBuffer
+    *   d_is_species_state_variable - bool, true if mixed state var, in which
+    *       case d_derived_writer must be provided and provide
+    *       packMixedDerivedDataIntoDoubleBuffer
+    *
+    * Standard information (writer internal):
+    *   d_data_type - INT, FLOAT, DOUBLE
+    *   d_visit_var_name - internally maintained visit var name:
+    *       for scalar: name[0]  = d_variable_name
+    *       for vector: name[0]  = d_variable_name.00,
+    *                   name[1]  = d_variable_name.01,
+    *                   ..
+    *                   name[nn] = d_variable_name.nn
+    *   d_master_min_max - ptr to min/max struct on master for each
+    *      var.  This is used to gather the min max info for all patches.
+    *   d_deformed_coord_id - id of vector defining deformed coordinates
+    *   d_coord_scale_factor - scale factor of the different deformed coords
+    *   d_level_start_depth_index - int array specifying start depth on
+    *                               each level
+    *
+    * Material information
+    *   d_isa_material - boolean specifying if variable is a material
+    *   d_material_name - string name of material
+    *   d_species_names - string array names of the species
+    *   d_materials_writer - ptr to user-supplied materials writer
+    *   d_material_name_HDFGroup - hdf group for material
+    *
+    * Species information
+    *   d_isa_species - boolean specifying if variable is a species
+    *   d_species_name - string name of species
+    *   d_parent_material_pointer - VisItItem ptr to parent material
+    *   d_species_HDFGroup - hdf group for species
+    *   d_extents_species_HDFGroup - hdf group for species extents
+    */
+   struct VisItItem {
+
+      /*
+       * Standard information (user supplied)
+       */
+      std::string d_var_name;
+      variable_type d_var_type;
+      variable_centering d_var_centering;
+      int d_patch_data_index;
+      int d_start_depth_index;
+      double d_scale_factor;
+      bool d_is_derived;
+      VisDerivedDataStrategy* d_derived_writer;
+      bool d_is_deformed_coords;
+      // new flag for mixed/clean state variables
+      bool d_is_material_state_variable;
+      // Do we want to extend this for species, or can that fit into the
+      //   material state variable treatment?
+      //bool d_is_species_state_variable;
+
+      /*
+       * Standard information (writer generated)
+       */
+      int d_depth;
+      variable_data_type d_var_data_type;
+      tbox::Array<std::string> d_visit_var_name;
+      struct patchMinMaxStruct *
+      d_master_min_max[VISIT_MAX_NUMBER_COMPONENTS];
+      tbox::Array<int> d_level_patch_data_index;
+      tbox::Array<double> d_coord_scale_factor;
+
+      /*
+       * Material information
+       */
+      bool d_isa_material;
+      std::string d_material_name;
+      tbox::Array<std::string> d_species_names;
+      VisMaterialsDataStrategy* d_materials_writer;
+      /*
+       * Species information
+       */
+      bool d_isa_species;
+      std::string d_species_name;
+      VisItItem* d_parent_material_pointer;
+      tbox::Pointer<tbox::Database> d_species_HDFGroup;
+      tbox::Pointer<tbox::Database> d_extents_species_HDFGroup;
+   };
+
+   /*
+    * Utility routine to initialize a standard variable for
+    * plotting based on user input.  Derived, coordinate, material,
+    * and species data all use this method to initialize the variable
+    * and then set specific characteristics in their appropriate
+    * register methods.
+    */
+   void
+   initializePlotItem(
+      VisItItem& plotitem,
+      const std::string& variable_name,
+      const std::string& variable_type,
+      const int patch_data_index,
+      const int start_depth_index,
+      const double scale_factor,
+      const std::string& variable_centering);
+
+   /*
+    * Utility routine to reset a variable by level for plotting
+    * (either vector or scalar variable).
+    */
+   void
+   resetLevelPlotItem(
+      const std::string& variable_name,
+      int level_number,
+      int patch_data_array_index,
+      int start_depth_index,
+      std::string method_name);
+
+   /*
+    * Coordinate writing HDF plot files, both data and summary.
+    */
+   void
+   writeHDFFiles(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      double simulation_time);
+
+   /*
+    * Allocate and initialize the min/max structs that hold
+    * summary information about each plotted variable.
+    */
+   void
+   initializePlotVariableMinMaxInfo(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy);
+
+   /*
+    * Write variable data to HDF file.
+    */
+   void
+   writeVisItVariablesToHDFFile(
+      tbox::Pointer<tbox::Database> processor_HDFGroup,
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      int coarsest_level,
+      int finest_level);
+
+   /*
+    * Pack regular (i.e. NOT materials or species) and derived data into
+    * the supplied HDF database for output.
+    */
+   void
+   packRegularAndDerivedData(
+      tbox::Pointer<tbox::Database> patch_HDFGroup,
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const int block_number,
+      hier::Patch& patch);
+
+   /*
+    * Pack the materials data into the supplied database for output.
+    */
+   void
+   packMaterialsData(
+      tbox::Pointer<tbox::Database> patch_HDFGroup,
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const int block_number,
+      hier::Patch& patch);
+
+   /*
+    * Pack the species data.  The correct HDF database is determined
+    * from the parent material.
+    */
+   void
+   packSpeciesData(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const int block_number,
+      hier::Patch& patch);
+
+   /*
+    * Check min/max to make exit cleanly if users data exceeds float
+    * min/max values. Otherwise, the writer will dump core when it
+    * tries to convert double data to float for writing the vis file.
+    */
+   void
+   checkFloatMinMax(
+      const std::string& var_name,
+      const double dmin,
+      const double dmax,
+      const int level_number,
+      const int patch_number,
+      const int patch_data_id);
+
+   /*
+    * Convert level number, patch number, block_number to global patch number.
+    * Block number (block_number) is only relevant in multiblock problems.
+    */
+   int
+   getGlobalPatchNumber(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const int block_number,
+      const int patch_number);
+
+   /*
+    * Calculate and then write patch parent and
+    * child info to summary HDF file.
+    */
+   void
+   writeParentChildInfoToSummaryHDFFile(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      tbox::Pointer<tbox::Database> basic_HDFGroup);
+
+   /*
+    *    Sort function for use by qsort to sort child_parent array
+    *    by child patch number so can find all parents of a given child.
+    */
+   static int
+   childParentCompareFunc(
+      const void* s1,
+      const void* s2);
+
+   /*
+    * Barrier functions to enable orderly writing of cluster files by
+    * passing a baton from current writer to next proc in cluster.
+    */
+   void
+   dumpWriteBarrierBegin();
+   void
+   dumpWriteBarrierEnd();
+
+   /*
+    * Write summary data for VisIt to HDF file.
+    */
+   void
+   writeSummaryToHDFFile(
+      std::string dump_dir_name,
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      int coarsest_plot_level,
+      int finest_plot_level,
+      double simulation_time);
+
+   /*
+    * Helper method for writeSummaryToHDFFile() method above.
+    * Performs tbox::MPI communications to send min/max information for all
+    * variables on all patches to the VISIT_MASTER.
+    */
+   void
+   exchangeMinMaxPatchInformation(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int coarsest_plot_level,
+      const int finest_plot_level);
+
+   /*
+    * Pack DIM patch data into 1D double precision buffer,
+    * eliminating ghost data if necessary
+    */
+   void
+   packPatchDataIntoDoubleBuffer(
+      const tbox::Pointer<hier::PatchData> pdata,
+      const int depth_index,
+      const variable_data_type type_of_data,
+      const hier::Box patch_box,
+      double* buffer,
+      const variable_centering centering);
+
+   /*
+    * Create a 2D integer array entry in the database with the specified
+    * key name.
+    */
+   void
+   HDFputIntegerArray2D(
+      const std::string& key,
+      const int* data,
+      const int nelements0,
+      const int nelements1,
+      const hid_t group_id);
+
+   /*
+    * Create a 2D double array entry in the database with the specified
+    * key name.
+    */
+   void
+   HDFputDoubleArray2D(
+      const std::string& key,
+      const double* data,
+      const int nelements0,
+      const int nelements1,
+      const hid_t group_id);
+
+   /*
+    * Create an array of patch extent structs in the database
+    * with the specified key name.
+    */
+   void
+   HDFputPatchExtentsStructArray(
+      const std::string& key,
+      const patchExtentsStruct* data,
+      const int nelements,
+      const hid_t group_id);
+
+   /*
+    * Create an array of patch map structs in the database
+    * with the specified key name.
+    */
+   void
+   HDFputPatchMapStructArray(
+      const std::string& key,
+      const patchMapStruct* data,
+      const int nelements,
+      const hid_t group_id);
+
+   /*
+    * Create an array of min/max structs in the database with
+    * the specified key name.
+    */
+   void
+   HDFputPatchMinMaxStructArray(
+      const std::string& key,
+      const patchMinMaxStruct* data,
+      const int nelements,
+      const hid_t group_id);
+
+   /*
+    * Create an array of child/parent pointer (CPP) structs in
+    * the database with the specified key name.
+    */
+   void
+   HDFputChildParentStructArray(
+      const std::string& key,
+      const void* data,
+      const int nelements,
+      const hid_t group_id,
+      const int sizeOfStruct,
+      const std::string& fieldName);
+
+   /*
+    * Calculate buffer size to hold data on patch with given ghost cell
+    * width and centering.
+    */
+   int
+   getBufferSize(
+      const hier::Box patch_box,
+      const hier::IntVector& ghost_cell_width,
+      const variable_centering centering);
+
+   /*
+    * Dump item fields for debugging purposes.
+    */
+   void
+   dumpItem(
+      VisItItem& plotitem,
+      std::ostream& os) const;
+
+   /*
+    * Dimension of object
+    */
+   const tbox::Dimension d_dim;
+
+   /*
+    * Name of this VisIt data writer object
+    */
+   std::string d_object_name;
+
+   /*
+    * Hierarchy level information to write to a file.
+    */
+   int d_number_levels;
+
+   /*
+    * tbox::Array of mesh-scaling ratios from each level to reference level
+    * (i.e., coarsest level).
+    */
+   tbox::Array<hier::IntVector> d_scaling_ratios;
+
+   /*
+    * Default data writer for user defined data.
+    */
+   VisDerivedDataStrategy* d_default_derived_writer;
+
+   /*
+    * Data writer for materials data.
+    */
+   VisMaterialsDataStrategy* d_materials_writer;
+
+   /*
+    * Directory into which VisIt files will be written.
+    */
+   std::string d_top_level_directory_name;
+   std::string d_current_dump_directory_name;
+   std::string d_summary_filename;
+
+   /*
+    * Grid type - CARTESIAN or DEFORMED.
+    */
+   grid_type d_grid_type;
+
+   /*
+    * Time step number (passed in by user).
+    */
+   int d_time_step_number;
+
+   /*
+    * Number of worker processors that pass info to VISIT_MASTER
+    */
+   int d_number_working_slaves;
+
+   /*
+    * Cluster information for parallel runs. A file_cluster
+    * is a set of processors that all write VisIt data to
+    * a single disk file.  d_processor_on_file_cluster[processorNumber]
+    * returns the file_clusterNumber of processorNumber.
+    * d_file_cluster_leader is controller of file_cluster.
+    */
+   int d_number_file_clusters;
+   int d_my_file_cluster_number;
+   tbox::Array<int> d_processor_in_file_cluster_number;
+   bool d_file_cluster_leader;
+   int d_file_cluster_size;
+   int d_my_rank_in_file_cluster;
+   int d_number_files_this_file_cluster;
+
+   /*
+    * Number of registered VisIt variables, materials, and species.
+    * Each regular and derived and variable (i.e. variables registered with
+    * a patch data index) are considered visit variables.  If the grid is
+    * deformed, the node coordinates registered are also considered
+    * visit variables.  Material and species data are NOT counted in
+    * d_number_visit_variables because these are supplied by the user. The
+    * d_number_visit_variables does not consider whether the plotted variable
+    * is scalar, vector, or tensor.  The d_number_visit_variables_plus_depth
+    * does consider this, and is the sume of the depths of all the visit
+    * variables, again not counting material and species data.
+    *
+    * The material names are stored in d_materials_names.  Any or all of the
+    * materials may have an associated species, and the TOTAL of these is
+    * counted in d_number_species.
+    */
+   int d_number_visit_variables;
+   int d_number_visit_variables_plus_depth;
+   tbox::Array<std::string> d_materials_names;
+   int d_number_species;
+
+   /*
+    * For parallel runs, this array of min/max structs holds the summary
+    * information all local patches on workers prior to being sent to
+    * master.  It is filled in this order: by level, then by
+    * local_patch_number, then by var_item, then by component_number.
+    */
+   patchMinMaxStruct* d_worker_min_max;
+   int d_var_id_ctr;
+
+   /*
+    *  tbox::List of scalar and vector variables registered with
+    *  VisItDataWriter.
+    */
+   tbox::List<VisItItem> d_plot_items;
+
+   /*
+    * Boolean that is set to true only in multiblock problems.
+    */
+   bool d_is_multiblock;
+
+   /*
+    * brief Storage for strings defining VisIt expressions to be embedded in
+    * the plot dump.
+    */
+   tbox::Array<std::string> d_visit_expression_keys;
+   tbox::Array<std::string> d_visit_expressions;
+   tbox::Array<std::string> d_visit_expression_types;
+
+   //! @brief Timer for writePlotData().
+   static tbox::Pointer<tbox::Timer> t_write_plot_data;
+
+   /*!
+    * @brief Initialize static objects and register shutdown routine.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   initializeCallback();
+
+   /*!
+    * @brief Method registered with ShutdownRegister to cleanup statics.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   finalizeCallback();
+
+   /* 
+    * Static initialization and cleanup handler.
+    */
+   static tbox::StartupShutdownManager::Handler
+   s_initialize_handler;
+
+};
+}
+}
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/VisMaterialsDataStrategy.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/VisMaterialsDataStrategy.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,97 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface for writing material related data to VisIt
+ *                dump file 
+ *
+ ************************************************************************/
+
+#ifndef included_appu_VisMaterialsDataStrategy_C
+#define included_appu_VisMaterialsDataStrategy_C
+
+#include "SAMRAI/appu/VisMaterialsDataStrategy.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace appu {
+
+// using namespace std;
+
+VisMaterialsDataStrategy::VisMaterialsDataStrategy()
+{
+}
+
+VisMaterialsDataStrategy::~VisMaterialsDataStrategy()
+{
+}
+
+int VisMaterialsDataStrategy::packMaterialFractionsIntoDoubleBuffer(
+   double* buffer,
+   const hier::Patch& patch,
+   const hier::Box& region,
+   const std::string& material_name) const
+{
+   NULL_USE(buffer);
+   NULL_USE(patch);
+   NULL_USE(region);
+   NULL_USE(material_name);
+   TBOX_ERROR("VisMaterialsDataStrategy::"
+      << "packMaterialFractionsIntoDoubleBuffer()"
+      << "\nNo class supplies a concrete implementation for "
+      << "\nthis method.  The default abstract method (which "
+      << "\ndoes nothing) is executed" << std::endl);
+   return 0;
+}
+
+int VisMaterialsDataStrategy::packMaterialFractionsIntoSparseBuffers(
+   int* mat_list,
+   std::vector<int>& mix_zones,
+   std::vector<int>& mix_mat,
+   std::vector<double>& vol_fracs,
+   std::vector<int>& next_mat,
+   const hier::Patch& patch,
+   const hier::Box& region) const
+{
+   NULL_USE(mat_list);
+   NULL_USE(mix_zones);
+   NULL_USE(mix_mat);
+   NULL_USE(vol_fracs);
+   NULL_USE(next_mat);
+   NULL_USE(patch);
+   NULL_USE(region);
+   TBOX_ERROR("VisMaterialsDataStrategy::"
+      << "packSparseMaterialFractionsIntoDoubleBuffer()"
+      << "\nNo class supplies a concrete implementation for "
+      << "\nthis method.  The default abstract method (which "
+      << "\ndoes nothing) is executed" << std::endl);
+   return 0;
+}
+
+int VisMaterialsDataStrategy::packSpeciesFractionsIntoDoubleBuffer(
+   double* buffer,
+   const hier::Patch& patch,
+   const hier::Box& region,
+   const std::string& material_name,
+   const std::string& species_name) const
+{
+   NULL_USE(buffer);
+   NULL_USE(patch);
+   NULL_USE(region);
+   NULL_USE(material_name);
+   NULL_USE(species_name);
+   TBOX_ERROR("VisMaterialsDataStrategy::"
+      << "packSpeciesFractionsIntoDoubleBuffer()"
+      << "\nNo class supplies a concrete implementation for "
+      << "\nthis method.  The default abstract method (which "
+      << "\ndoes nothing) is executed" << std::endl);
+   return 0;
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/VisMaterialsDataStrategy.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/VisMaterialsDataStrategy.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,221 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface for writing material related data to a VisIt
+ *                dump file. 
+ *
+ ************************************************************************/
+
+#ifndef included_appu_VisMaterialsDataStrategy
+#define included_appu_VisMaterialsDataStrategy
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <string>
+#include <vector>
+
+namespace SAMRAI {
+namespace appu {
+
+/*!
+ * @brief Class VisMaterialsDataStrategy is an abstract base
+ * class that defines an interface allowing an VisItDataWriter
+ * object to generate plot files that contain material and species
+ * fractions, as well as state variables for individual materials.  A
+ * concrete object of this type must be registered with the data
+ * writer in order to use materials or species with the data writer.
+ * The registration of the concrete object is done using the method
+ * setMaterialsDataWriter() from the VisItDataWriter class.  VisIt
+ * requires that material fractions, species fractions, and material
+ * state variables be cell-centered.  If they are not cell-centered in
+ * the simulation, it is the job of the relevant packing method to
+ * convert them to a cell-centered basis before packing them into the
+ * buffer.
+ *
+ * The concrete strategy object is responsible for supplying an
+ * implementation of packMaterialFractionsIntoDoubleBuffer().  If
+ * species are used, packSpeciesFractionsIntoDoubleBuffer() must also
+ * be implemented.  If material state variables are used,
+ * packMaterialStateVariableIntoDoubleBuffer() must be implemented.
+ *
+ * @see appu::VisItDataWriter
+ */
+
+class VisMaterialsDataStrategy
+{
+public:
+   /*!
+    * @brief Default constructor for VisMaterialsDataStrategy.
+    */
+   VisMaterialsDataStrategy();
+
+   /*!
+    * @brief Destructor for VisMaterialsDataStrategy.
+    */
+   virtual ~VisMaterialsDataStrategy();
+
+   /*!
+    * @brief Enumerated type for the allowable return values
+    * for packMaterialFractionsIntoDoubleBuffer() and
+    * packSpeciesFractionsIntoDoubleBuffer().
+    * - \b ALL_ZERO   (Fractions are 0.0 for every cell in patch.)
+    * - \b ALL_ONE    (Fractions are 1.0 for every cell in patch.)
+    * - \b MIXTURE    (There is some of this species/material in one or
+    *                    more cells of this patch, but the above two cases
+    *                   do not apply.)
+    */
+
+   enum PACK_RETURN_TYPE { VISIT_ALLZERO = 0,
+                           VISIT_ALLONE = 1,
+                           VISIT_MIXED = 2 };
+
+   /*!
+    * @brief This function, which must be implemented whenever
+    * materials are used, packs cell-centered material fractions for
+    * the given material, patch, and region into the given 1D double
+    * precision buffer which will already have been allocated.  If a
+    * non-zero ghost cell vector was specified when
+    * registerMaterialNames() was invoked, then ghost data
+    * corresponding to this ghost cell vector must be packed into this
+    * double buffer.  The data must be packed into the buffer in
+    * column major order, i.e. (f(x_0,y_0,z_0), f(x_1,y_0,z_0),
+    * f(x_2,y_0,z_0), ...).
+    *
+    * This method will be called once for each material for each patch.
+    *
+    * A enumerated PACK_RETURN_TYPE is used for a return value.  To
+    * save space in the visit data file, you may choose to set the return
+    * value to indicate if a material does not exist at all on the patch,
+    * or if the material exists fully on the patch. A return of ALL_ZERO
+    * indicates there is 0% of the material in each of the cells of the
+    * patch, while a return type of ALL_ONE indicates the material consumes
+    * 100% on each of the cells of the patch.  If the patch has a mixture
+    * of the material (i.e. between 0% and 100%) then return MIXTURE.
+    *
+    * @param buffer Double precision array into which cell-centered
+    *  material fractions are packed.
+    * @param patch hier::Patch on which fractions are defined.
+    * @param region hier::Box region over which to pack fractions.
+    * @param material_name String identifier for the material.
+    * @return The enumeration constant
+    *    VisMaterialsDataStrategy::ALL_ZERO,
+    *    VisMaterialsDataStrategy::ALL_ONE,
+    *    or VisMaterialsDataStrategy::MIXTURE.
+    */
+   virtual int
+   packMaterialFractionsIntoDoubleBuffer(
+      double* buffer,
+      const hier::Patch& patch,
+      const hier::Box& region,
+      const std::string& material_name) const;
+
+   /*!
+    * @brief Pack sparse volume fraction data
+    *
+    * This function, which must be implemented whenever materials are
+    * used if the sparse packing format is to be used. Packing traverses the
+    * patch in a column major order (i.e. (f(x_0,y_0,z_0), f(x_1,y_0,z_0),
+    * f(x_2,y_0,z_0), ...) ). If the current cell is clean, then the material
+    * number of the material occupying the cell should be packed in to the
+    * buffer. If the cell is mixed, then a negative index (i.e., with numbering
+    * begining at -1) into the auxilliary mix_zones, mix_mat, vol_fracs, and
+    * next_mat vectors which will contain the sparse representation of the
+    * volume fractions (VisIt will correct the negative index internally and
+    * offset to a zero based representation).  For each component of a mixed
+    * cell packMaterialFractionsIntoDoubleBuffer() should pack an entry in the
+    * following vectors: mix_zones: the cell number with which the fraction is
+    * associated mix_mat: the material number of the fraction vol_fracs: the
+    * volume fraction of the current material next_mat: either the (positive
+    * but still offset by one) index to the next mixed component within the
+    * auxilliary vectors or a 0, indicating the end of the mixed components for
+    * this cell.
+    *
+    * If a non-zero ghost cell vector was specified when
+    * registerMaterialNames() was invoked, then ghost data
+    * corresponding to this ghost cell vector must be packed into this
+    * double buffer.
+    *
+    * This method will be called once for each patch.
+    *
+    * A enumerated PACK_RETURN_TYPE is used for a return value.  To
+    * save space in the visit data file, you may choose to set the return
+    * value to ALL_ONE to indicate that a single material occupies 100% of
+    * each cell on the patch. Otherwise, MIXTURE should be returned even if
+    * individual cells are not mixed, as this indicates that the patch contains
+    * multiple materials.
+    *
+    * @param buffer Double precision array into which the material
+    *  numbers (or negative indices) are packed.
+    * @param mix_zones std::vector<int> into which the cell number
+    *  associated with the mixed components are packed.
+    * @param mix_mat std::vector<int> into which the material numbers
+    *  of the mixed components are packed.
+    * @param vol_fracs std::vector<double> into which the volume fractions
+    *  (between 0.0 and 1.0) of the mixed components are packed.
+    * @param next_mat std::vector<int> into which the (positive) index of
+    *  the next mixed component or a terminating 0 are packed.
+    * @param patch hier::Patch on which fractions are defined.
+    * @param region hier::Box region over which to pack fractions.
+    * @return The enumeration constant
+    *    VisMaterialsDataStrategy::ALL_ONE,
+    *    or VisMaterialsDataStrategy::MIXTURE.
+    */
+   virtual int
+   packMaterialFractionsIntoSparseBuffers(
+      int* mat_list,
+      std::vector<int>& mix_zones,
+      std::vector<int>& mix_mat,
+      std::vector<double>& vol_fracs,
+      std::vector<int>& next_mat,
+      const hier::Patch& patch,
+      const hier::Box& region) const;
+
+   /*!
+    * @brief This function packs cell-centered species fractions for
+    * the given species.
+    *
+    * This user supplied function packs species fractions of the
+    * given material, patch, and region into the supplied 1D double
+    * precision buffer.  If a non-zero ghost cell vector was specified when
+    * registerSpeciesNames() was invoked, then ghost data
+    * corresponding to this ghost cell vector must be packed into this
+    * double buffer.  The data must be packed into the buffer in
+    * column major order.
+    *
+    * This method will be called once for each species for each patch.
+    *
+    * The method must return a PACK_RETURN_TYPE of ALL_ONE, ALL_ZERO,
+    * or MIXED.  See the discussion above for the
+    * "packMaterialFractionsIntoDoubleBuffer()" method for an explanation
+    * of correct return values.
+    *
+    * @param buffer Double precision array into which  cell-centered
+    *   species fractions are packed.
+    * @param patch hier::Patch on which fractions are defined.
+    * @param region hier::Box region over which to pack fractions.
+    * @param material_name String identifier for the material to
+    *  which the species belongs.
+    * @param species_name String identifier for the species.
+    * @return The enumeration constant
+    *    VisMaterialsDataStrategy::ALL_ZERO,
+    *    VisMaterialsDataStrategy::ALL_ONE,
+    *    or VisMaterialsDataStrategy::MIXTURE.
+    */
+   virtual int
+   packSpeciesFractionsIntoDoubleBuffer(
+      double* buffer,
+      const hier::Patch& patch,
+      const hier::Box& region,
+      const std::string& material_name,
+      const std::string& species_name) const;
+};
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/dox/manual.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/dox/manual.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,28 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace appu {
+
+/*!
+  @page package_apputils The Application Utilities Package
+ 
+  The Application Utilities package contains tools that are useful 
+  for application developmentwith SAMRAI.
+  Currently, the package has two subdirectories containing:
+  -# @ref package_apputils_boundary "Support for physical boundary conditions"
+  -# @ref package_apputils_embedded_boundary "Support for Embedded or Immersed boundary representations on Cartesian grids"
+  -# @ref package_apputils_plotting "Utilities for plotting AMR data"
+ 
+  All class names in the Application Utilities package are in the 
+  namespace SAMRAI::appu.
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/dox/manual_boundary.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/dox/manual_boundary.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,35 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace appu {
+
+/*!
+  @page package_apputils_boundary Support for physical boundary conditions
+
+  These classes contain utilities for reading boundary data from
+  input files, setting boundary values during program execution,
+  and checking boundary values for correctness.  These facilities
+  are provided for 2 and 3 spatial dimensions only.
+
+  An abstract base class interface is provided for treating 
+  application-specific data.  A header file containing all valid
+  integer boundary constants is provided to make use of the boundary
+  capabilities easier.
+  - SAMRAI/appu/CartesianBoundaryDefines.h 
+
+  - SAMRAI::appu::BoundaryUtilityStrategy
+
+  Boundary utilities are provided for two and three spatial dimensions:
+  - SAMRAI::appu::CartesianBoundaryUtilities2
+  - SAMRAI::appu::CartesianBoundaryUtilities3
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/dox/manual_embedded_boundary.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/dox/manual_embedded_boundary.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,47 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace appu {
+/*!
+  @page package_apputils_embedded_boundary Support for Embedded Boundary construction
+
+  These classes provide support to generate embedded boundaries on a 
+  Cartesian AMR hierarchy.  The embedded boundary is represented as a 
+  set of cells on each patch for which the boundary intersects.  Each
+  of these cells contains a struct of information, such as the volume
+  fraction, normal, face areas, etc.  For information about what information
+  is stored, see the CutCell class.  
+
+  The boundary may be constructed from analytic shapes in SAMRAI, such 
+  as spheres and polygons.  For information on the use of native analytic 
+  shapes in SAMRAI see the EmbeddedBoundaryShape, and the corresponding
+  sphere and polygon shape classes.  The boundary information can also be constructed
+  through links to the Cubes or Eleven software.  Cubes is a cutcell mesh generator that
+  is part of the Cart3D software from NASA Ames.  Eleven is a complex geometry
+  meshing library that is part of the Overture software from LLNL.  For information
+  about these two libraries see the CubesPatchInterface and ElevenPatchInterface
+  classes.
+
+  The class that manages the construction of the embedded boundary is
+  the EmbeddedBoundaryGeometry class.  See this class for information about
+  different options to construct the boundary from the geometry input.
+
+  - SAMRAI::appu::BoundaryNode
+  - SAMRAI::appu::CutCell
+  - SAMRAI::appu::CubesPatchInterface
+  - SAMRAI::appu::ElevenPatchInterface
+  - SAMRAI::appu::EmbeddedBoundaryGeometry   
+  - SAMRAI::appu::EmbeddedBoundaryShape   
+  - SAMRAI::appu::EmbeddedBoundaryShapeSphere
+  - SAMRAI::appu::EmbeddedBoundaryShapePolygon
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/dox/manual_plotting.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/dox/manual_plotting.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,32 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace appu {
+/*!
+  @page package_apputils_plotting Visualization Data File Generation
+
+  These classes provide basic support to generate data files that may
+  be post-processed using the Vizamrai or Visit visualization tool.  Two kinds
+  of data quantities are supported, those that reside on an AMR patch
+  hierarchy when a data file is created, and those that are "derived" from 
+  data living on an AMR patch hierarchy.
+
+  The Vizamrai writer supports cartesian cell-centered data only, while 
+  the Visit writer supports cell, node, and logically-mapped (e.g. ALE)
+  data.    In addition, the VisIt writer supports material-related data
+  and ghost zone data.
+  
+  - SAMRAI::appu::VisItDataWriter
+  - SAMRAI::appu::VisDerivedDataStrategy
+  - SAMRAI::appu::VisMaterialsDataStrategy
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/fortran/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/fortran/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,80 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=appu_cartbdry2d.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h appu_cartbdry2d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=appu_cartbdry3d.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h appu_cartbdry3d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=appu_cpdat2buf2d.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h appu_cpdat2buf2d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=appu_cpdat2buf3d.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h appu_cpdat2buf3d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
+FILE_4=appu_ebdry2d.o
+DEPENDS_4:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h appu_ebdry2d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_4 +=\
+	
+endif
+
+${FILE_4:X.o=${NDIM}.o}: ${DEPENDS_4}
+
+FILE_5=appu_ebdry3d.o
+DEPENDS_5:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h appu_ebdry3d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_5 +=\
+	
+endif
+
+${FILE_5:X.o=${NDIM}.o}: ${DEPENDS_5}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/fortran/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/fortran/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,33 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for fortran files for appu directory 
+##
+#########################################################################
+
+SAMRAI	      =	@top_srcdir@
+SRCDIR	      =	@srcdir@
+SUBDIR        = source/SAMRAI/appu/fortran
+VPATH	      =	@srcdir@
+OBJECT        = ../../../..
+
+# For classes that are non-dimensional.
+OBJS= 	appu_ebdry2d.o appu_ebdry3d.o appu_cpdat2buf2d.o\
+	appu_cpdat2buf3d.o\
+	appu_cartbdry2d.o \
+	appu_cartbdry3d.o 
+
+
+default: library
+
+include $(OBJECT)/config/Makefile.config
+
+library:	$(OBJS)
+
+clean:
+	$(SAMCLEAN)
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/fortran/appu_cartbdry2d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/fortran/appu_cartbdry2d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,507 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/appu/fortran/appu_cartbdry2d.m4 $
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: F77 routines for Cartesian 2d boundary conditions
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim2d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 2d arrays in FORTRAN routines.
+c
+c
+c general boundary condition cases
+c
+c
+c node boundary conditions
+c
+c
+c edge boundary conditions
+c
+c***********************************************************************
+c***********************************************************************
+      subroutine getcartedgebdry2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  ibeg0,iend0,ibeg1,iend1,
+     &  ngc0,ngc1,
+     &  dx,
+     &  bdry_loc,
+     &  bdry_cond,
+     &  edge_values,
+     &  arrdata,
+     &  arrdepth)
+c***********************************************************************
+      implicit none
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/appu/fortran/appu_cartbdryparams2d.i $
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 2d boundary constant common blocks
+c
+      common/cartbdrylocparams2d/
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,
+     &  X0Y0,X1Y0,X0Y1,X1Y1
+      integer
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,
+     &  X0Y0,X1Y0,X0Y1,X1Y1
+c
+c
+      common/cartbdrycondparams2d/
+     &  FLOW,XFLOW,YFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN
+      integer
+     &  FLOW,XFLOW,YFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN
+c***********************************************************************
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer ibeg0,iend0,ibeg1,iend1
+      integer ngc0,ngc1
+c
+      double precision dx(0:2-1)
+c
+      integer bdry_loc,
+     &        arrdepth, 
+     &        bdry_cond
+      double precision
+     &        edge_values(0:arrdepth-1,0:2*2-1)
+c
+      double precision
+     &  arrdata(ifirst0-ngc0:ilast0+ngc0,
+     &          ifirst1-ngc1:ilast1+ngc1,0:arrdepth-1)
+c
+      integer ic1,ic0,ict0,ict1
+      integer k
+      integer ipivot0,ipivot1
+      integer edge_loc
+      double precision    dirsign0,dirsign1
+c
+c***********************************************************************
+c   bdry_loc   index     bdry_loc  index   
+c       0     (-1, 0)       2     (0,-1)  
+c       1     ( 1, 0)       3     (0, 1)  
+c***********************************************************************
+c***********************************************************************
+      edge_loc = bdry_loc
+      if ((bdry_loc.eq.XLEFT).or.(bdry_loc.eq.XRIGHT)) then
+         if (bdry_loc.eq.XLEFT) then
+c                             x0 boundary
+            ipivot0  = ifirst0
+            dirsign0 = -1.d0
+         else
+c                             x1 boundary
+            ipivot0  = ilast0
+            dirsign0 = 1.d0
+         endif
+           if (bdry_cond.eq.DIRICHLET) then
+             do ic1=ibeg1,iend1
+               do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=edge_values(k,edge_loc)
+         enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.NEUMANN) then
+             do ic1=ibeg1,iend1
+               ict1 = ic1
+               do ic0=ibeg0,iend0
+                 ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=arrdata(ict0,ict1,k) + dirsign0
+     &       * edge_values(k,edge_loc) * dble(ic0-ict0) * dx(0)
+         enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.FLOW) then
+             do ic1=ibeg1,iend1
+               ict1 = ic1
+               do ic0=ibeg0,iend0
+                 ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=arrdata(ict0,ict1,k)
+         enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.REFLECT) then
+             do ic1=ibeg1,iend1
+               ict1 = ic1
+               do ic0=ibeg0,iend0
+                 ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=arrdata(ict0,ict1,k)
+         enddo
+         arrdata(ic0,ic1,0)= -arrdata(ic0,ic1,0)
+               enddo
+             enddo
+          else
+             write(6,*) "INVALID EDGE bdry_cond in getcartedgebdry2d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+          endif
+      else if ((bdry_loc.eq.YLEFT).or.(bdry_loc.eq.YRIGHT)) then
+         if (bdry_loc.eq.YLEFT) then
+c                             y0 boundary
+            ipivot1  = ifirst1
+            dirsign1 = -1.d0
+         else
+c                             y1 boundary
+            ipivot1  = ilast1
+            dirsign1 = 1.d0
+         endif
+           if (bdry_cond.eq.DIRICHLET) then
+             do ic1=ibeg1,iend1
+               do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=edge_values(k,edge_loc)
+         enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.NEUMANN) then
+             do ic1=ibeg1,iend1
+               ict1 = ipivot1
+               do ic0=ibeg0,iend0
+                 ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=arrdata(ict0,ict1,k) + dirsign1
+     &       * edge_values(k,edge_loc) * dble(ic1-ict1) * dx(1)
+         enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.FLOW) then
+             do ic1=ibeg1,iend1
+               ict1 = ipivot1
+               do ic0=ibeg0,iend0
+                 ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=arrdata(ict0,ict1,k)
+         enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.REFLECT) then
+             do ic1=ibeg1,iend1
+               ict1 = ipivot1
+               do ic0=ibeg0,iend0
+                 ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=arrdata(ict0,ict1,k)
+         enddo
+         arrdata(ic0,ic1,1)= -arrdata(ic0,ic1,1)
+               enddo
+             enddo
+          else
+             write(6,*) "INVALID EDGE bdry_cond in getcartedgebdry2d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+          endif
+      endif
+c
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine getcartnodebdry2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  ibeg0,iend0,ibeg1,iend1,
+     &  ngc0,ngc1,
+     &  dx,
+     &  bdry_loc,
+     &  bdry_cond,
+     &  edge_values,
+     &  arrdata,
+     &  arrdepth)
+c***********************************************************************
+      implicit none
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/appu/fortran/appu_cartbdryparams2d.i $
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 2d boundary constant common blocks
+c
+      common/cartbdrylocparams2d/
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,
+     &  X0Y0,X1Y0,X0Y1,X1Y1
+      integer
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,
+     &  X0Y0,X1Y0,X0Y1,X1Y1
+c
+c
+      common/cartbdrycondparams2d/
+     &  FLOW,XFLOW,YFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN
+      integer
+     &  FLOW,XFLOW,YFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN
+c***********************************************************************
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer ibeg0,iend0,ibeg1,iend1
+      integer ngc0,ngc1
+c
+      double precision dx(0:2-1)
+c
+      integer bdry_loc,
+     &        arrdepth,
+     &        bdry_cond
+      double precision
+     &        edge_values(0:arrdepth-1,0:2*2-1)
+c
+      double precision
+     &  arrdata(ifirst0-ngc0:ilast0+ngc0,
+     &          ifirst1-ngc1:ilast1+ngc1,0:arrdepth-1)
+c
+      integer ic1,ic0,ict0,ict1
+      integer k
+      integer ipivot0,ipivot1
+      integer edge_loc0,edge_loc1
+      double precision    dirsign0,dirsign1
+c
+c***********************************************************************
+c***********************************************************************
+c    bdry_loc   index 
+c       0     (-1,-1)
+c       1     ( 1,-1)
+c       2     (-1, 1)
+c       3     ( 1, 1)
+c***********************************************************************
+c***********************************************************************
+      if (bdry_loc.eq.X0Y0) then
+         edge_loc0 = XLEFT
+         ipivot0   = ifirst0
+         dirsign0  = -1.d0
+         edge_loc1 = YLEFT
+         ipivot1   = ifirst1
+         dirsign1  = -1.d0
+      else if (bdry_loc.eq.X1Y0) then
+         edge_loc0 = XRIGHT
+         ipivot0   = ilast0
+         dirsign0  = 1.d0
+         edge_loc1 = YLEFT
+         ipivot1   = ifirst1
+         dirsign1  = -1.d0
+      else if (bdry_loc.eq.X0Y1) then
+         edge_loc0 = XLEFT
+         ipivot0   = ifirst0
+         dirsign0  = -1.d0
+         edge_loc1 = YRIGHT
+         ipivot1   = ilast1
+         dirsign1  = 1.d0
+      else if (bdry_loc.eq.X1Y1) then
+         edge_loc0 = XRIGHT
+         ipivot0   = ilast0
+         dirsign0  = 1.d0
+         edge_loc1 = YRIGHT
+         ipivot1   = ilast1
+         dirsign1  = 1.d0
+      endif
+           if (bdry_cond.eq.XDIRICHLET) then
+             do ic1=ibeg1,iend1
+               do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=edge_values(k,edge_loc0)
+         enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.YDIRICHLET) then
+             do ic1=ibeg1,iend1
+               do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=edge_values(k,edge_loc1)
+         enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.XNEUMANN) then
+             do ic1=ibeg1,iend1
+               ict1 = ic1
+                do ic0=ibeg0,iend0
+                 ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=arrdata(ict0,ict1,k) + dirsign0
+     &       * edge_values(k,edge_loc0) * dble(ic0-ict0) * dx(0)
+         enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.YNEUMANN) then
+             do ic1=ibeg1,iend1
+               ict1 = ipivot1
+                do ic0=ibeg0,iend0
+                 ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=arrdata(ict0,ict1,k) + dirsign1
+     &       * edge_values(k,edge_loc1) * dble(ic1-ict1) * dx(1)
+         enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.XFLOW) then
+             do ic1=ibeg1,iend1
+               ict1 = ic1
+               do ic0=ibeg0,iend0
+                 ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=arrdata(ict0,ict1,k)
+         enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YFLOW) then
+             do ic1=ibeg1,iend1
+               ict1 = ipivot1
+               do ic0=ibeg0,iend0
+                 ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=arrdata(ict0,ict1,k)
+         enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XREFLECT) then
+             do ic1=ibeg1,iend1
+               ict1 = ic1
+               do ic0=ibeg0,iend0
+                 ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=arrdata(ict0,ict1,k)
+         enddo
+         arrdata(ic0,ic1,0)= -arrdata(ic0,ic1,0)
+               enddo
+             enddo
+           else if (bdry_cond.eq.YREFLECT) then
+             do ic1=ibeg1,iend1
+               ict1 = ipivot1
+               do ic0=ibeg0,iend0
+                 ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=arrdata(ict0,ict1,k)
+         enddo
+         arrdata(ic0,ic1,1)= -arrdata(ic0,ic1,1)
+               enddo
+             enddo
+           else
+             write(6,*) "INVALID NODE bdry_cond in getcartnodebdry2d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+           endif
+c
+      return
+      end
+
+c***********************************************************************
+c***********************************************************************
+      subroutine stufcartbdryloc2d(
+     &  XLEFTin, XRIGHTin, YLEFTin, YRIGHTin,
+     &  X0Y0in, X1Y0in, X0Y1in, X1Y1in)
+      implicit none
+      integer
+     &  XLEFTin, XRIGHTin, YLEFTin, YRIGHTin,
+     &  X0Y0in, X1Y0in, X0Y1in, X1Y1in
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/appu/fortran/appu_cartbdryparams2d.i $
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 2d boundary constant common blocks
+c
+      common/cartbdrylocparams2d/
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,
+     &  X0Y0,X1Y0,X0Y1,X1Y1
+      integer
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,
+     &  X0Y0,X1Y0,X0Y1,X1Y1
+c
+c
+      common/cartbdrycondparams2d/
+     &  FLOW,XFLOW,YFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN
+      integer
+     &  FLOW,XFLOW,YFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN
+
+c 2d edges
+        XLEFT=XLEFTin
+        XRIGHT=XRIGHTin
+        YLEFT=YLEFTin
+        YRIGHT=YRIGHTin
+
+c 2d nodes
+        X0Y0=X0Y0in
+        X1Y0=X1Y0in
+        X0Y1=X0Y1in
+        X1Y1=X1Y1in
+
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine stufcartbdrycond2d(
+     &  FLOWin, XFLOWin, YFLOWin, 
+     &  REFLECTin, XREFLECTin, YREFLECTin,
+     &  DIRICHLETin, XDIRICHLETin, YDIRICHLETin,
+     &  NEUMANNin, XNEUMANNin, YNEUMANNin)
+      implicit none
+      integer
+     &  FLOWin, XFLOWin, YFLOWin, 
+     &  REFLECTin, XREFLECTin, YREFLECTin,
+     &  DIRICHLETin, XDIRICHLETin, YDIRICHLETin,
+     &  NEUMANNin, XNEUMANNin, YNEUMANNin
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/appu/fortran/appu_cartbdryparams2d.i $
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 2d boundary constant common blocks
+c
+      common/cartbdrylocparams2d/
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,
+     &  X0Y0,X1Y0,X0Y1,X1Y1
+      integer
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,
+     &  X0Y0,X1Y0,X0Y1,X1Y1
+c
+c
+      common/cartbdrycondparams2d/
+     &  FLOW,XFLOW,YFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN
+      integer
+     &  FLOW,XFLOW,YFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN
+
+        FLOW=FLOWin
+        XFLOW=XFLOWin
+        YFLOW=YFLOWin
+
+        REFLECT=REFLECTin
+        XREFLECT=XREFLECTin
+        YREFLECT=YREFLECTin
+
+        DIRICHLET=DIRICHLETin
+        XDIRICHLET=XDIRICHLETin
+        YDIRICHLET=YDIRICHLETin
+
+        NEUMANN=NEUMANNin
+        XNEUMANN=XNEUMANNin
+        YNEUMANN=YNEUMANNin
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/fortran/appu_cartbdry2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/fortran/appu_cartbdry2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,345 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/appu/fortran/appu_cartbdry2d.m4 $
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: F77 routines for Cartesian 2d boundary conditions
+c
+define(NDIM,2)dnl
+define(REAL,`double precision')dnl
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+c
+c general boundary condition cases
+c
+define(setvalues_to_ict,`dnl
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=arrdata(ict0,ict1,k)
+         enddo
+')dnl
+define(setvalues_to_ict_reflect,`dnl
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=arrdata(ict0,ict1,k)
+         enddo
+         arrdata(ic0,ic1,$1)= -arrdata(ic0,ic1,$1)
+')dnl
+define(setvalues_to_dirichlet,`dnl
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=edge_values(k,$1)
+         enddo
+')dnl
+define(setvalues_to_neumann,`dnl
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=arrdata(ict0,ict1,k) + $2
+     &       * edge_values(k,$3) * dble(ic$1-ict$1) * dx($1)
+         enddo
+')dnl
+c
+c node boundary conditions
+c
+define(do_node_ict,`dnl
+             do ic1=ibeg1,iend1
+               ict1 = $2
+               do ic0=ibeg0,iend0
+                 ict0 = $1
+setvalues_to_ict()dnl
+                enddo
+             enddo
+')dnl
+define(do_node_ict_reflect,`dnl
+             do ic1=ibeg1,iend1
+               ict1 = $2
+               do ic0=ibeg0,iend0
+                 ict0 = $1
+setvalues_to_ict_reflect($3)dnl
+               enddo
+             enddo
+')dnl
+define(do_node_dirichlet,`dnl
+             do ic1=ibeg1,iend1
+               do ic0=ibeg0,iend0
+setvalues_to_dirichlet($1)dnl
+               enddo
+             enddo
+')dnl
+define(do_node_neumann,`dnl
+             do ic1=ibeg1,iend1
+               ict1 = $2
+                do ic0=ibeg0,iend0
+                 ict0 = $1
+setvalues_to_neumann($3,$4,$5)dnl
+               enddo
+             enddo
+')dnl
+define(do_bdry_node,`dnl
+           if (bdry_cond.eq.XDIRICHLET) then
+do_node_dirichlet(`edge_loc0')dnl
+           else if (bdry_cond.eq.YDIRICHLET) then
+do_node_dirichlet(`edge_loc1')dnl
+           else if (bdry_cond.eq.XNEUMANN) then
+do_node_neumann(`ipivot0',`ic1',0,`dirsign0',`edge_loc0')dnl
+           else if (bdry_cond.eq.YNEUMANN) then
+do_node_neumann(`ic0',`ipivot1',1,`dirsign1',`edge_loc1')dnl
+           else if (bdry_cond.eq.XFLOW) then
+do_node_ict(`ipivot0',`ic1')dnl
+           else if (bdry_cond.eq.YFLOW) then
+do_node_ict(`ic0',`ipivot1')dnl
+           else if (bdry_cond.eq.XREFLECT) then
+do_node_ict_reflect(`ipivot0',`ic1',0)dnl
+           else if (bdry_cond.eq.YREFLECT) then
+do_node_ict_reflect(`ic0',`ipivot1',1)dnl
+           else
+             write(6,*) "INVALID NODE bdry_cond in getcartnodebdry2d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+           endif
+')dnl
+c
+c edge boundary conditions
+c
+define(do_bdry_edge,`dnl
+           if (bdry_cond.eq.DIRICHLET) then
+             do ic1=ibeg1,iend1
+               do ic0=ibeg0,iend0
+setvalues_to_dirichlet(`edge_loc')dnl
+               enddo
+             enddo
+           else if (bdry_cond.eq.NEUMANN) then
+             do ic1=ibeg1,iend1
+               ict1 = $3
+               do ic0=ibeg0,iend0
+                 ict0 = $2
+setvalues_to_neumann($1,$4,`edge_loc')dnl
+               enddo
+             enddo
+           else if (bdry_cond.eq.FLOW) then
+             do ic1=ibeg1,iend1
+               ict1 = $3
+               do ic0=ibeg0,iend0
+                 ict0 = $2
+setvalues_to_ict()dnl
+               enddo
+             enddo
+           else if (bdry_cond.eq.REFLECT) then
+             do ic1=ibeg1,iend1
+               ict1 = $3
+               do ic0=ibeg0,iend0
+                 ict0 = $2
+setvalues_to_ict_reflect($1)dnl
+               enddo
+             enddo
+          else
+             write(6,*) "INVALID EDGE bdry_cond in getcartedgebdry2d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+          endif
+')dnl
+c***********************************************************************
+c***********************************************************************
+      subroutine getcartedgebdry2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  ibeg0,iend0,ibeg1,iend1,
+     &  ngc0,ngc1,
+     &  dx,
+     &  bdry_loc,
+     &  bdry_cond,
+     &  edge_values,
+     &  arrdata,
+     &  arrdepth)
+c***********************************************************************
+      implicit none
+include(appu_cartbdryparams2d.i)dnl
+c***********************************************************************
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer ibeg0,iend0,ibeg1,iend1
+      integer ngc0,ngc1
+c
+      REAL dx(0:NDIM-1)
+c
+      integer bdry_loc,
+     &        arrdepth, 
+     &        bdry_cond
+      REAL
+     &        edge_values(0:arrdepth-1,0:2*NDIM-1)
+c
+      REAL
+     &  arrdata(CELL2dVECG(ifirst,ilast,ngc),0:arrdepth-1)
+c
+      integer ic1,ic0,ict0,ict1
+      integer k
+      integer ipivot0,ipivot1
+      integer edge_loc
+      REAL    dirsign0,dirsign1
+c
+c***********************************************************************
+c   bdry_loc   index     bdry_loc  index   
+c       0     (-1, 0)       2     (0,-1)  
+c       1     ( 1, 0)       3     (0, 1)  
+c***********************************************************************
+c***********************************************************************
+      edge_loc = bdry_loc
+      if ((bdry_loc.eq.XLEFT).or.(bdry_loc.eq.XRIGHT)) then
+         if (bdry_loc.eq.XLEFT) then
+c                             x0 boundary
+            ipivot0  = ifirst0
+            dirsign0 = -1.d0
+         else
+c                             x1 boundary
+            ipivot0  = ilast0
+            dirsign0 = 1.d0
+         endif
+do_bdry_edge(0,`ipivot0',`ic1',`dirsign0')dnl
+      else if ((bdry_loc.eq.YLEFT).or.(bdry_loc.eq.YRIGHT)) then
+         if (bdry_loc.eq.YLEFT) then
+c                             y0 boundary
+            ipivot1  = ifirst1
+            dirsign1 = -1.d0
+         else
+c                             y1 boundary
+            ipivot1  = ilast1
+            dirsign1 = 1.d0
+         endif
+do_bdry_edge(1,`ic0',`ipivot1',`dirsign1')dnl
+      endif
+c
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine getcartnodebdry2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  ibeg0,iend0,ibeg1,iend1,
+     &  ngc0,ngc1,
+     &  dx,
+     &  bdry_loc,
+     &  bdry_cond,
+     &  edge_values,
+     &  arrdata,
+     &  arrdepth)
+c***********************************************************************
+      implicit none
+include(appu_cartbdryparams2d.i)dnl
+c***********************************************************************
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer ibeg0,iend0,ibeg1,iend1
+      integer ngc0,ngc1
+c
+      REAL dx(0:NDIM-1)
+c
+      integer bdry_loc,
+     &        arrdepth,
+     &        bdry_cond
+      REAL
+     &        edge_values(0:arrdepth-1,0:2*NDIM-1)
+c
+      REAL
+     &  arrdata(CELL2dVECG(ifirst,ilast,ngc),0:arrdepth-1)
+c
+      integer ic1,ic0,ict0,ict1
+      integer k
+      integer ipivot0,ipivot1
+      integer edge_loc0,edge_loc1
+      REAL    dirsign0,dirsign1
+c
+c***********************************************************************
+c***********************************************************************
+c    bdry_loc   index 
+c       0     (-1,-1)
+c       1     ( 1,-1)
+c       2     (-1, 1)
+c       3     ( 1, 1)
+c***********************************************************************
+c***********************************************************************
+      if (bdry_loc.eq.X0Y0) then
+         edge_loc0 = XLEFT
+         ipivot0   = ifirst0
+         dirsign0  = -1.d0
+         edge_loc1 = YLEFT
+         ipivot1   = ifirst1
+         dirsign1  = -1.d0
+      else if (bdry_loc.eq.X1Y0) then
+         edge_loc0 = XRIGHT
+         ipivot0   = ilast0
+         dirsign0  = 1.d0
+         edge_loc1 = YLEFT
+         ipivot1   = ifirst1
+         dirsign1  = -1.d0
+      else if (bdry_loc.eq.X0Y1) then
+         edge_loc0 = XLEFT
+         ipivot0   = ifirst0
+         dirsign0  = -1.d0
+         edge_loc1 = YRIGHT
+         ipivot1   = ilast1
+         dirsign1  = 1.d0
+      else if (bdry_loc.eq.X1Y1) then
+         edge_loc0 = XRIGHT
+         ipivot0   = ilast0
+         dirsign0  = 1.d0
+         edge_loc1 = YRIGHT
+         ipivot1   = ilast1
+         dirsign1  = 1.d0
+      endif
+do_bdry_node()dnl
+c
+      return
+      end
+
+c***********************************************************************
+c***********************************************************************
+      subroutine stufcartbdryloc2d(
+     &  XLEFTin, XRIGHTin, YLEFTin, YRIGHTin,
+     &  X0Y0in, X1Y0in, X0Y1in, X1Y1in)
+      implicit none
+      integer
+     &  XLEFTin, XRIGHTin, YLEFTin, YRIGHTin,
+     &  X0Y0in, X1Y0in, X0Y1in, X1Y1in
+include(appu_cartbdryparams2d.i)dnl
+
+c 2d edges
+        XLEFT=XLEFTin
+        XRIGHT=XRIGHTin
+        YLEFT=YLEFTin
+        YRIGHT=YRIGHTin
+
+c 2d nodes
+        X0Y0=X0Y0in
+        X1Y0=X1Y0in
+        X0Y1=X0Y1in
+        X1Y1=X1Y1in
+
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine stufcartbdrycond2d(
+     &  FLOWin, XFLOWin, YFLOWin, 
+     &  REFLECTin, XREFLECTin, YREFLECTin,
+     &  DIRICHLETin, XDIRICHLETin, YDIRICHLETin,
+     &  NEUMANNin, XNEUMANNin, YNEUMANNin)
+      implicit none
+      integer
+     &  FLOWin, XFLOWin, YFLOWin, 
+     &  REFLECTin, XREFLECTin, YREFLECTin,
+     &  DIRICHLETin, XDIRICHLETin, YDIRICHLETin,
+     &  NEUMANNin, XNEUMANNin, YNEUMANNin
+include(appu_cartbdryparams2d.i)dnl
+
+        FLOW=FLOWin
+        XFLOW=XFLOWin
+        YFLOW=YFLOWin
+
+        REFLECT=REFLECTin
+        XREFLECT=XREFLECTin
+        YREFLECT=YREFLECTin
+
+        DIRICHLET=DIRICHLETin
+        XDIRICHLET=XDIRICHLETin
+        YDIRICHLET=YDIRICHLETin
+
+        NEUMANN=NEUMANNin
+        XNEUMANN=XNEUMANNin
+        YNEUMANN=YNEUMANNin
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/fortran/appu_cartbdry3d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/fortran/appu_cartbdry3d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1441 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/appu/fortran/appu_cartbdry3d.m4 $
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: F77 routines for Cartesian 3d boundary conditions
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim3d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 3d arrays in FORTRAN routines.
+c
+c
+c general boundary condition cases
+c
+c
+c edge boundary conditions
+c
+c
+c node boundary conditions
+c
+c
+c face boundary conditions
+c
+c***********************************************************************
+c***********************************************************************
+      subroutine getcartfacebdry3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,
+     &  ngc0,ngc1,ngc2,
+     &  dx,
+     &  bdry_loc,
+     &  bdry_cond,
+     &  face_values,
+     &  arrdata,
+     &  arrdepth)
+c***********************************************************************
+      implicit none
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/appu/fortran/appu_cartbdryparams3d.i $
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 3d boundary constant common blocks
+c
+      common/cartbdrylocparams3d/
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT, 
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1
+      integer
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT,
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1  
+c
+c
+      common/cartbdrycondparams3d/
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+      integer
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+c***********************************************************************
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      integer ngc0,ngc1,ngc2
+c
+      double precision dx(0:3-1)
+c
+      integer bdry_loc,
+     &        arrdepth, 
+     &        bdry_cond
+      double precision
+     &        face_values(0:arrdepth-1,0:2*3-1)
+c
+      double precision
+     &  arrdata(ifirst0-ngc0:ilast0+ngc0,
+     &          ifirst1-ngc1:ilast1+ngc1,
+     &          ifirst2-ngc2:ilast2+ngc2,0:arrdepth-1)
+c
+      integer ic2,ic1,ic0,ict0,ict1,ict2
+      integer k
+      integer ipivot0,ipivot1,ipivot2
+      integer face_loc
+      double precision    dirsign0,dirsign1,dirsign2
+c
+c***********************************************************************
+c   bdry_loc   index     bdry_loc    index     bdry_loc   index
+c       0     (-1, 0, 0)     2     (0,-1, 0)      4     (0, 0,-1)
+c       1     ( 1, 0, 0)     3     (0, 1, 0)      5     (0, 0, 1)
+c***********************************************************************
+c***********************************************************************
+      face_loc = bdry_loc
+      if ((bdry_loc.eq.XLEFT).or.(bdry_loc.eq.XRIGHT)) then
+         if (bdry_loc.eq.XLEFT) then
+c                             x0 boundary
+            ipivot0  = ifirst0
+            dirsign0 = -1.d0 
+         else
+c                             x1 boundary
+            ipivot0  = ilast0
+            dirsign0 = 1.d0 
+         endif
+           if (bdry_cond.eq.DIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.NEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign0
+     &       * face_values(k,face_loc) * dble(ic0-ict0) * dx(0)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.FLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.REFLECT) then
+             do ic2=ibeg2,iend2
+              ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,0)= -arrdata(ic0,ic1,ic2,0)
+                 enddo
+               enddo
+             enddo
+          else
+             write(6,*) "INVALID FACE bdry_cond in getcartfacebdry3d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+          endif
+      else if ((bdry_loc.eq.YLEFT).or.(bdry_loc.eq.YRIGHT)) then
+         if (bdry_loc.eq.YLEFT) then
+c                             y0 boundary
+            ipivot1  = ifirst1
+            dirsign1 = -1.d0 
+         else
+c                             y1 boundary
+            ipivot1  = ilast1
+            dirsign1 = 1.d0 
+         endif
+           if (bdry_cond.eq.DIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.NEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign1
+     &       * face_values(k,face_loc) * dble(ic1-ict1) * dx(1)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.FLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.REFLECT) then
+             do ic2=ibeg2,iend2
+              ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,1)= -arrdata(ic0,ic1,ic2,1)
+                 enddo
+               enddo
+             enddo
+          else
+             write(6,*) "INVALID FACE bdry_cond in getcartfacebdry3d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+          endif
+      else if ((bdry_loc.eq.ZLEFT).or.(bdry_loc.eq.ZRIGHT)) then
+         if (bdry_loc.eq.ZLEFT) then
+c                             z0 boundary
+            ipivot2  = ifirst2
+            dirsign2 = -1.d0 
+         else
+c                             z1 boundary
+            ipivot2  = ilast2
+            dirsign2 = 1.d0 
+         endif
+           if (bdry_cond.eq.DIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.NEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign2
+     &       * face_values(k,face_loc) * dble(ic2-ict2) * dx(2)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.FLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.REFLECT) then
+             do ic2=ibeg2,iend2
+              ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,2)= -arrdata(ic0,ic1,ic2,2)
+                 enddo
+               enddo
+             enddo
+          else
+             write(6,*) "INVALID FACE bdry_cond in getcartfacebdry3d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+          endif
+      endif
+c
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine getcartedgebdry3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,
+     &  ngc0,ngc1,ngc2,
+     &  dx,
+     &  bdry_loc,
+     &  bdry_cond,
+     &  face_values,
+     &  arrdata,
+     &  arrdepth)
+c***********************************************************************
+      implicit none
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/appu/fortran/appu_cartbdryparams3d.i $
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 3d boundary constant common blocks
+c
+      common/cartbdrylocparams3d/
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT, 
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1
+      integer
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT,
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1  
+c
+c
+      common/cartbdrycondparams3d/
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+      integer
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+c***********************************************************************
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      integer ngc0,ngc1,ngc2
+c
+      double precision dx(0:3-1)
+c
+      integer bdry_loc,
+     &        arrdepth,
+     &        bdry_cond
+      double precision
+     &        face_values(0:arrdepth-1,0:2*3-1)
+c
+      double precision
+     &  arrdata(ifirst0-ngc0:ilast0+ngc0,
+     &          ifirst1-ngc1:ilast1+ngc1,
+     &          ifirst2-ngc2:ilast2+ngc2,0:arrdepth-1)
+c
+      integer ic2,ic1,ic0,ict0,ict1,ict2
+      integer k
+      integer ipivot0,ipivot1,ipivot2
+      integer face_loc0,face_loc1,face_loc2
+      double precision    dirsign0,dirsign1,dirsign2
+c
+c***********************************************************************
+c***********************************************************************
+c    bdry_loc   index    bdry_loc   index     bdry_loc   index
+c       0     (0,-1,-1)      4     (-1,0,-1)      8     (-1,-1,0)
+c       1     (0, 1,-1)      5     (-1,0, 1)      9     ( 1,-1,0)
+c       2     (0,-1, 1)      6     ( 1,0,-1)     10     (-1, 1,0)
+c       3     (0, 1, 1)      7     ( 1,0, 1)     11     ( 1, 1,0)
+c***********************************************************************
+c***********************************************************************
+      if ((bdry_loc.eq.Y0Z0).or.(bdry_loc.eq.Y1Z0).or.
+     &    (bdry_loc.eq.Y0Z1).or.(bdry_loc.eq.Y1Z1)) then
+         if (bdry_loc.eq.Y0Z0) then
+            face_loc1 = YLEFT
+            ipivot1   = ifirst1
+            dirsign1  = -1.d0
+            face_loc2 = ZLEFT
+            ipivot2   = ifirst2
+            dirsign2  = -1.d0
+         else if (bdry_loc.eq.Y1Z0) then
+            face_loc1 = YRIGHT
+            ipivot1   = ilast1
+            dirsign1  = 1.d0
+            face_loc2 = ZLEFT
+            ipivot2   = ifirst2
+            dirsign2  = -1.d0
+         else if (bdry_loc.eq.Y0Z1) then
+            face_loc1 = YLEFT
+            ipivot1   = ifirst1
+            dirsign1  = -1.d0
+            face_loc2 = ZRIGHT
+            ipivot2   = ilast2
+            dirsign2  = 1.d0
+         else
+            face_loc1 = YRIGHT
+            ipivot1   = ilast1
+            dirsign1  = 1.d0
+            face_loc2 = ZRIGHT
+            ipivot2   = ilast2
+            dirsign2  = 1.d0
+         endif
+           if (bdry_cond.eq.XDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc0)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc1)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc2)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign0
+     &       * face_values(k,face_loc0) * dble(ic0-ict0) * dx(0)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign1
+     &       * face_values(k,face_loc1) * dble(ic1-ict1) * dx(1)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign2
+     &       * face_values(k,face_loc2) * dble(ic2-ict2) * dx(2)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,0)= -arrdata(ic0,ic1,ic2,0)
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,1)= -arrdata(ic0,ic1,ic2,1)
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,2)= -arrdata(ic0,ic1,ic2,2)
+                   enddo
+                enddo
+             enddo
+           else
+             write(6,*) "INVALID EDGE bdry_cond in getcartedgebdry3d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+           endif
+      else if ((bdry_loc.eq.X0Z0).or.(bdry_loc.eq.X0Z1).or.
+     &         (bdry_loc.eq.X1Z0).or.(bdry_loc.eq.X1Z1)) then
+         if (bdry_loc.eq.X0Z0) then
+            face_loc2 = ZLEFT
+            ipivot2   = ifirst2
+            dirsign2  = -1.d0
+            face_loc0 = XLEFT
+            ipivot0   = ifirst0
+            dirsign0  = -1.d0
+         else if (bdry_loc.eq.X0Z1) then
+            face_loc2 = ZRIGHT
+            ipivot2   = ilast2
+            dirsign2  = 1.d0
+            face_loc0 = XLEFT
+            ipivot0   = ifirst0
+            dirsign0  = -1.d0
+         else if (bdry_loc.eq.X1Z0) then
+            face_loc2 = ZLEFT
+            ipivot2   = ifirst2
+            dirsign2  = -1.d0
+            face_loc0 = XRIGHT
+            ipivot0   = ilast0
+            dirsign0  = 1.d0
+         else
+            face_loc2 = ZRIGHT
+            ipivot2   = ilast2
+            dirsign2  = 1.d0
+            face_loc0 = XRIGHT
+            ipivot0   = ilast0
+            dirsign0  = 1.d0
+         endif
+           if (bdry_cond.eq.XDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc0)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc1)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc2)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign0
+     &       * face_values(k,face_loc0) * dble(ic0-ict0) * dx(0)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign1
+     &       * face_values(k,face_loc1) * dble(ic1-ict1) * dx(1)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign2
+     &       * face_values(k,face_loc2) * dble(ic2-ict2) * dx(2)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,0)= -arrdata(ic0,ic1,ic2,0)
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,1)= -arrdata(ic0,ic1,ic2,1)
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,2)= -arrdata(ic0,ic1,ic2,2)
+                   enddo
+                enddo
+             enddo
+           else
+             write(6,*) "INVALID EDGE bdry_cond in getcartedgebdry3d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+           endif
+      else if ((bdry_loc.eq.X0Y0).or.(bdry_loc.eq.X1Y0).or.
+     &         (bdry_loc.eq.X0Y1).or.(bdry_loc.eq.X1Y1)) then
+         if (bdry_loc.eq.X0Y0) then
+            face_loc1 = YLEFT
+            ipivot1   = ifirst1
+            dirsign1  = -1.d0
+            face_loc0 = XLEFT
+            ipivot0   = ifirst0
+            dirsign0  = -1.d0
+         else if (bdry_loc.eq.X1Y0) then
+            face_loc1 = YLEFT
+            ipivot1   = ifirst1
+            dirsign1  = -1.d0
+            face_loc0 = XRIGHT
+            ipivot0   = ilast0
+            dirsign0  = 1.d0
+         else if (bdry_loc.eq.X0Y1) then
+            face_loc1 = YRIGHT
+            ipivot1   = ilast1
+            dirsign1  = 1.d0
+            face_loc0 = XLEFT
+            ipivot0   = ifirst0
+            dirsign0  = -1.d0
+         else
+            face_loc1 = YRIGHT
+            ipivot1   = ilast1
+            dirsign1  = 1.d0
+            face_loc0 = XRIGHT
+            ipivot0   = ilast0
+            dirsign0  = 1.d0
+         endif
+           if (bdry_cond.eq.XDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc0)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc1)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc2)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign0
+     &       * face_values(k,face_loc0) * dble(ic0-ict0) * dx(0)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign1
+     &       * face_values(k,face_loc1) * dble(ic1-ict1) * dx(1)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign2
+     &       * face_values(k,face_loc2) * dble(ic2-ict2) * dx(2)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,0)= -arrdata(ic0,ic1,ic2,0)
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,1)= -arrdata(ic0,ic1,ic2,1)
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,2)= -arrdata(ic0,ic1,ic2,2)
+                   enddo
+                enddo
+             enddo
+           else
+             write(6,*) "INVALID EDGE bdry_cond in getcartedgebdry3d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+           endif
+      endif
+c
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine getcartnodebdry3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,
+     &  ngc0,ngc1,ngc2,
+     &  dx,
+     &  bdry_loc,
+     &  bdry_cond,
+     &  face_values,
+     &  arrdata,
+     &  arrdepth)
+c***********************************************************************
+      implicit none
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/appu/fortran/appu_cartbdryparams3d.i $
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 3d boundary constant common blocks
+c
+      common/cartbdrylocparams3d/
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT, 
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1
+      integer
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT,
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1  
+c
+c
+      common/cartbdrycondparams3d/
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+      integer
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+c***********************************************************************
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      integer ngc0,ngc1,ngc2
+c
+      double precision dx(0:3-1)
+c
+      integer bdry_loc,
+     &        arrdepth,
+     &        bdry_cond
+      double precision
+     &        face_values(0:arrdepth-1,0:2*3-1)
+c
+      double precision
+     &  arrdata(ifirst0-ngc0:ilast0+ngc0,
+     &          ifirst1-ngc1:ilast1+ngc1,
+     &          ifirst2-ngc2:ilast2+ngc2,0:arrdepth-1)
+c
+      integer ic2,ic1,ic0,ict0,ict1,ict2
+      integer k
+      integer ipivot0,ipivot1,ipivot2
+      integer face_loc0,face_loc1,face_loc2
+      double precision    dirsign0,dirsign1,dirsign2
+c
+c***********************************************************************
+c***********************************************************************
+c    bdry_loc   index     bdry_loc    index
+c       0     (-1,-1,-1)      4     (-1,-1, 1)
+c       1     ( 1,-1,-1)      5     ( 1,-1, 1)
+c       2     (-1, 1,-1)      6     (-1, 1, 1)
+c       3     ( 1, 1,-1)      7     ( 1, 1, 1)
+c***********************************************************************
+c***********************************************************************
+      if (bdry_loc.eq.X0Y0Z0) then
+         face_loc0 = XLEFT
+         ipivot0   = ifirst0
+         dirsign0  = -1.d0
+         face_loc1 = YLEFT
+         ipivot1   = ifirst1
+         dirsign1  = -1.d0
+         face_loc2 = ZLEFT
+         ipivot2   = ifirst2
+         dirsign2  = -1.d0
+      else if (bdry_loc.eq.X1Y0Z0) then
+         face_loc0 = XRIGHT
+         ipivot0   = ilast0
+         dirsign0  = 1.d0
+         face_loc1 = YLEFT
+         ipivot1   = ifirst1
+         dirsign1  = -1.d0
+         face_loc2 = ZLEFT
+         ipivot2   = ifirst2
+         dirsign2  = -1.d0
+      else if (bdry_loc.eq.X0Y1Z0) then
+         face_loc0 = XLEFT
+         ipivot0   = ifirst0
+         dirsign0  = -1.d0
+         face_loc1 = YRIGHT
+         ipivot1   = ilast1
+         dirsign1  = 1.d0
+         face_loc2 = ZLEFT
+         ipivot2   = ifirst2
+         dirsign2  = -1.d0
+      else if (bdry_loc.eq.X1Y1Z0) then
+         face_loc0 = XRIGHT
+         ipivot0   = ilast0
+         dirsign0  = 1.d0
+         face_loc1 = YRIGHT
+         ipivot1   = ilast1
+         dirsign1  = 1.d0
+         face_loc2 = ZLEFT
+         ipivot2   = ifirst2
+         dirsign2  = -1.d0
+      else if (bdry_loc.eq.X0Y0Z1) then
+         face_loc0 = XLEFT
+         ipivot0   = ifirst0
+         dirsign0  = -1.d0
+         face_loc1 = YLEFT
+         ipivot1   = ifirst1
+         dirsign1  = -1.d0
+         face_loc2 = ZRIGHT
+         ipivot2   = ilast2
+         dirsign2  = 1.d0
+      else if (bdry_loc.eq.X1Y0Z1) then
+         face_loc0 = XRIGHT
+         ipivot0   = ilast0
+         dirsign0  = 1.d0
+         face_loc1 = YLEFT
+         ipivot1   = ifirst1
+         dirsign1  = -1.d0
+         face_loc2 = ZRIGHT
+         ipivot2   = ilast2
+         dirsign2  = 1.d0
+      else if (bdry_loc.eq.X0Y1Z1) then
+         face_loc0 = XLEFT
+         ipivot0   = ifirst0
+         dirsign0  = -1.d0
+         face_loc1 = YRIGHT
+         ipivot1   = ilast1
+         dirsign1  = 1.d0
+         face_loc2 = ZRIGHT
+         ipivot2   = ilast2
+         dirsign2  = 1.d0
+      else if (bdry_loc.eq.X1Y1Z1) then
+         face_loc0 = XRIGHT
+         ipivot0   = ilast0
+         dirsign0  = 1.d0
+         face_loc1 = YRIGHT
+         ipivot1   = ilast1
+         dirsign1  = 1.d0
+         face_loc2 = ZRIGHT
+         ipivot2   = ilast2
+         dirsign2  = 1.d0
+      endif
+           if (bdry_cond.eq.XDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc0)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc1)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc2)
+         enddo
+                   enddo
+                enddo
+             enddo
+          else if (bdry_cond.eq.XNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign0
+     &       * face_values(k,face_loc0) * dble(ic0-ict0) * dx(0)
+         enddo
+                   enddo
+                enddo
+             enddo
+          else if (bdry_cond.eq.YNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign1
+     &       * face_values(k,face_loc1) * dble(ic1-ict1) * dx(1)
+         enddo
+                   enddo
+                enddo
+             enddo
+          else if (bdry_cond.eq.ZNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign2
+     &       * face_values(k,face_loc2) * dble(ic2-ict2) * dx(2)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,0)= -arrdata(ic0,ic1,ic2,0)
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,1)= -arrdata(ic0,ic1,ic2,1)
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,2)= -arrdata(ic0,ic1,ic2,2)
+                   enddo
+                enddo
+             enddo
+           else
+             write(6,*) "INVALID NODE bdry_cond in getcartnodebdry3d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+           endif
+c
+      return
+      end
+
+c***********************************************************************
+c***********************************************************************
+      subroutine stufcartbdryloc3d(
+     &  XLEFTin, XRIGHTin, YLEFTin, YRIGHTin, ZLEFTin, ZRIGHTin,
+     &  Y0Z0in, Y1Z0in, Y0Z1in, Y1Z1in,
+     &  X0Z0in, X0Z1in, X1Z0in, X1Z1in,
+     &  X0Y0in, X1Y0in, X0Y1in, X1Y1in,
+     &  X0Y0Z0in, X1Y0Z0in, X0Y1Z0in, X1Y1Z0in,
+     &  X0Y0Z1in, X1Y0Z1in, X0Y1Z1in, X1Y1Z1in)
+      implicit none
+      integer
+     &  XLEFTin, XRIGHTin, YLEFTin, YRIGHTin, ZLEFTin, ZRIGHTin,
+     &  Y0Z0in, Y1Z0in, Y0Z1in, Y1Z1in,
+     &  X0Z0in, X0Z1in, X1Z0in, X1Z1in,
+     &  X0Y0in, X1Y0in, X0Y1in, X1Y1in,
+     &  X0Y0Z0in, X1Y0Z0in, X0Y1Z0in, X1Y1Z0in,
+     &  X0Y0Z1in, X1Y0Z1in, X0Y1Z1in, X1Y1Z1in
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/appu/fortran/appu_cartbdryparams3d.i $
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 3d boundary constant common blocks
+c
+      common/cartbdrylocparams3d/
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT, 
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1
+      integer
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT,
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1  
+c
+c
+      common/cartbdrycondparams3d/
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+      integer
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+
+c 3d faces
+        XLEFT=XLEFTin
+        XRIGHT=XRIGHTin
+        YLEFT=YLEFTin
+        YRIGHT=YRIGHTin
+        ZLEFT=ZLEFTin
+        ZRIGHT=ZRIGHTin
+
+c 3d edges
+        Y0Z0=Y0Z0in
+        Y1Z0=Y1Z0in
+        Y0Z1=Y0Z1in
+        Y1Z1=Y1Z1in
+        X0Z0=X0Z0in
+        X0Z1=X0Z1in
+        X1Z0=X1Z0in
+        X1Z1=X1Z1in
+        X0Y0=X0Y0in
+        X1Y0=X1Y0in
+        X0Y1=X0Y1in
+        X1Y1=X1Y1in
+
+c 3d nodes
+        X0Y0Z0=X0Y0Z0in
+        X1Y0Z0=X1Y0Z0in
+        X0Y1Z0=X0Y1Z0in
+        X1Y1Z0=X1Y1Z0in
+        X0Y0Z1=X0Y0Z1in
+        X1Y0Z1=X1Y0Z1in
+        X0Y1Z1=X0Y1Z1in
+        X1Y1Z1=X1Y1Z1in
+
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine stufcartbdrycond3d(
+     &  FLOWin, XFLOWin, YFLOWin, ZFLOWin,
+     &  REFLECTin, XREFLECTin, YREFLECTin, ZREFLECTin, 
+     &  DIRICHLETin, XDIRICHLETin, YDIRICHLETin, ZDIRICHLETin,
+     &  NEUMANNin, XNEUMANNin, YNEUMANNin, ZNEUMANNin)
+      implicit none
+      integer
+     &  FLOWin, XFLOWin, YFLOWin, ZFLOWin,
+     &  REFLECTin, XREFLECTin, YREFLECTin, ZREFLECTin,
+     &  DIRICHLETin, XDIRICHLETin, YDIRICHLETin, ZDIRICHLETin,
+     &  NEUMANNin, XNEUMANNin, YNEUMANNin, ZNEUMANNin
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/appu/fortran/appu_cartbdryparams3d.i $
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 3d boundary constant common blocks
+c
+      common/cartbdrylocparams3d/
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT, 
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1
+      integer
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT,
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1  
+c
+c
+      common/cartbdrycondparams3d/
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+      integer
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+
+        FLOW=FLOWin
+        XFLOW=XFLOWin
+        YFLOW=YFLOWin
+        ZFLOW=ZFLOWin
+
+        REFLECT=REFLECTin
+        XREFLECT=XREFLECTin
+        YREFLECT=YREFLECTin
+        ZREFLECT=ZREFLECTin
+
+        DIRICHLET=DIRICHLETin
+        XDIRICHLET=XDIRICHLETin
+        YDIRICHLET=YDIRICHLETin
+        ZDIRICHLET=ZDIRICHLETin
+
+        NEUMANN=NEUMANNin
+        XNEUMANN=XNEUMANNin
+        YNEUMANN=YNEUMANNin
+        ZNEUMANN=ZNEUMANNin
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/fortran/appu_cartbdry3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/fortran/appu_cartbdry3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,695 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/appu/fortran/appu_cartbdry3d.m4 $
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: F77 routines for Cartesian 3d boundary conditions
+c
+define(NDIM,3)dnl
+define(REAL,`double precision')dnl
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+c
+c general boundary condition cases
+c
+define(setvalues_to_ict,`dnl
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+')dnl
+define(setvalues_to_ict_reflect,`dnl
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,$1)= -arrdata(ic0,ic1,ic2,$1)
+')dnl
+define(setvalues_to_dirichlet,`dnl
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,$1)
+         enddo
+')dnl
+define(setvalues_to_neumann,`dnl
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + $2
+     &       * face_values(k,$3) * dble(ic$1-ict$1) * dx($1)
+         enddo
+')dnl
+c
+c edge boundary conditions
+c
+define(do_edge_ict,`dnl
+             do ic2=ibeg2,iend2
+               ict2 = $3
+               do ic1=ibeg1,iend1
+                 ict1 = $2
+                 do ic0=ibeg0,iend0
+                   ict0 = $1
+setvalues_to_ict()dnl
+                   enddo
+                enddo
+             enddo
+')dnl
+define(do_edge_ict_reflect,`dnl
+             do ic2=ibeg2,iend2
+               ict2 = $3
+               do ic1=ibeg1,iend1
+                 ict1 = $2
+                 do ic0=ibeg0,iend0
+                   ict0 = $1
+setvalues_to_ict_reflect($4)dnl
+                   enddo
+                enddo
+             enddo
+')dnl
+define(do_edge_dirichlet,`dnl
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+setvalues_to_dirichlet($1)dnl
+                   enddo
+                enddo
+             enddo
+')dnl
+define(do_edge_neumann,`dnl
+             do ic2=ibeg2,iend2
+               ict2 = $3
+               do ic1=ibeg1,iend1
+                 ict1 = $2
+                 do ic0=ibeg0,iend0
+                   ict0 = $1
+setvalues_to_neumann($4,$5,$6)dnl
+                   enddo
+                enddo
+             enddo
+')dnl
+define(do_bdry_edge,`dnl
+           if (bdry_cond.eq.XDIRICHLET) then
+do_edge_dirichlet(`face_loc0')dnl
+           else if (bdry_cond.eq.YDIRICHLET) then
+do_edge_dirichlet(`face_loc1')dnl
+           else if (bdry_cond.eq.ZDIRICHLET) then
+do_edge_dirichlet(`face_loc2')dnl
+           else if (bdry_cond.eq.XNEUMANN) then
+do_edge_neumann(`ipivot0',`ic1',`ic2',0,`dirsign0',`face_loc0')dnl
+           else if (bdry_cond.eq.YNEUMANN) then
+do_edge_neumann(`ic0',`ipivot1',`ic2',1,`dirsign1',`face_loc1')dnl
+           else if (bdry_cond.eq.ZNEUMANN) then
+do_edge_neumann(`ic0',`ic1',`ipivot2',2,`dirsign2',`face_loc2')dnl
+           else if (bdry_cond.eq.XFLOW) then
+do_edge_ict(`ipivot0',`ic1',`ic2')dnl
+           else if (bdry_cond.eq.YFLOW) then
+do_edge_ict(`ic0',`ipivot1',`ic2')dnl
+           else if (bdry_cond.eq.ZFLOW) then
+do_edge_ict(`ic0',`ic1',`ipivot2')dnl
+           else if (bdry_cond.eq.XREFLECT) then
+do_edge_ict_reflect(`ipivot0',`ic1',`ic2',0)dnl
+           else if (bdry_cond.eq.YREFLECT) then
+do_edge_ict_reflect(`ic0',`ipivot1',`ic2',1)dnl
+           else if (bdry_cond.eq.ZREFLECT) then
+do_edge_ict_reflect(`ic0',`ic1',`ipivot2',2)dnl
+           else
+             write(6,*) "INVALID EDGE bdry_cond in getcartedgebdry3d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+           endif
+')dnl
+c
+c node boundary conditions
+c
+define(do_node_ict,`dnl
+             do ic2=ibeg2,iend2
+               ict2 = $3
+               do ic1=ibeg1,iend1
+                 ict1 = $2
+                 do ic0=ibeg0,iend0
+                   ict0 = $1
+setvalues_to_ict()dnl
+                   enddo
+                enddo
+             enddo
+')dnl
+define(do_node_ict_reflect,`dnl
+             do ic2=ibeg2,iend2
+               ict2 = $3
+               do ic1=ibeg1,iend1
+                 ict1 = $2
+                 do ic0=ibeg0,iend0
+                   ict0 = $1
+setvalues_to_ict_reflect($4)dnl
+                   enddo
+                enddo
+             enddo
+')dnl
+define(do_node_dirichlet,`dnl
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+setvalues_to_dirichlet($1)dnl
+                   enddo
+                enddo
+             enddo
+')dnl
+define(do_node_neumann,`dnl
+             do ic2=ibeg2,iend2
+               ict2 = $3
+               do ic1=ibeg1,iend1
+                 ict1 = $2
+                 do ic0=ibeg0,iend0
+                   ict0 = $1
+setvalues_to_neumann($4,$5,$6)dnl
+                   enddo
+                enddo
+             enddo
+')dnl
+define(do_bdry_node,`dnl
+           if (bdry_cond.eq.XDIRICHLET) then
+do_node_dirichlet(`face_loc0')dnl
+           else if (bdry_cond.eq.YDIRICHLET) then
+do_node_dirichlet(`face_loc1')dnl
+           else if (bdry_cond.eq.ZDIRICHLET) then
+do_node_dirichlet(`face_loc2')dnl
+          else if (bdry_cond.eq.XNEUMANN) then
+do_node_neumann(`ipivot0',`ic1',`ic2',0,`dirsign0',`face_loc0')dnl
+          else if (bdry_cond.eq.YNEUMANN) then
+do_node_neumann(`ic0',`ipivot1',`ic2',1,`dirsign1',`face_loc1')dnl
+          else if (bdry_cond.eq.ZNEUMANN) then
+do_node_neumann(`ic0',`ic1',`ipivot2',2,`dirsign2',`face_loc2')dnl
+           else if (bdry_cond.eq.XFLOW) then
+do_node_ict(`ipivot0',`ic1',`ic2')dnl
+           else if (bdry_cond.eq.YFLOW) then
+do_node_ict(`ic0',`ipivot1',`ic2')dnl
+           else if (bdry_cond.eq.ZFLOW) then
+do_node_ict(`ic0',`ic1',`ipivot2')dnl
+           else if (bdry_cond.eq.XREFLECT) then
+do_node_ict_reflect(`ipivot0',`ic1',`ic2',0)dnl
+           else if (bdry_cond.eq.YREFLECT) then
+do_node_ict_reflect(`ic0',`ipivot1',`ic2',1)dnl
+           else if (bdry_cond.eq.ZREFLECT) then
+do_node_ict_reflect(`ic0',`ic1',`ipivot2',2)dnl
+           else
+             write(6,*) "INVALID NODE bdry_cond in getcartnodebdry3d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+           endif
+')dnl
+c
+c face boundary conditions
+c
+define(do_bdry_face,`dnl
+           if (bdry_cond.eq.DIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+setvalues_to_dirichlet(`face_loc')dnl
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.NEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = $4
+               do ic1=ibeg1,iend1
+                 ict1 = $3
+                 do ic0=ibeg0,iend0
+                   ict0 = $2
+setvalues_to_neumann($1,$5,`face_loc')dnl
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.FLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = $4
+               do ic1=ibeg1,iend1
+                 ict1 = $3
+                 do ic0=ibeg0,iend0
+                   ict0 = $2
+setvalues_to_ict()dnl
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.REFLECT) then
+             do ic2=ibeg2,iend2
+              ict2 = $4
+               do ic1=ibeg1,iend1
+                 ict1 = $3
+                 do ic0=ibeg0,iend0
+                   ict0 = $2
+setvalues_to_ict_reflect($1)dnl
+                 enddo
+               enddo
+             enddo
+          else
+             write(6,*) "INVALID FACE bdry_cond in getcartfacebdry3d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+          endif
+')dnl
+c***********************************************************************
+c***********************************************************************
+      subroutine getcartfacebdry3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,
+     &  ngc0,ngc1,ngc2,
+     &  dx,
+     &  bdry_loc,
+     &  bdry_cond,
+     &  face_values,
+     &  arrdata,
+     &  arrdepth)
+c***********************************************************************
+      implicit none
+include(appu_cartbdryparams3d.i)dnl
+c***********************************************************************
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      integer ngc0,ngc1,ngc2
+c
+      REAL dx(0:NDIM-1)
+c
+      integer bdry_loc,
+     &        arrdepth, 
+     &        bdry_cond
+      REAL
+     &        face_values(0:arrdepth-1,0:2*NDIM-1)
+c
+      REAL
+     &  arrdata(CELL3dVECG(ifirst,ilast,ngc),0:arrdepth-1)
+c
+      integer ic2,ic1,ic0,ict0,ict1,ict2
+      integer k
+      integer ipivot0,ipivot1,ipivot2
+      integer face_loc
+      REAL    dirsign0,dirsign1,dirsign2
+c
+c***********************************************************************
+c   bdry_loc   index     bdry_loc    index     bdry_loc   index
+c       0     (-1, 0, 0)     2     (0,-1, 0)      4     (0, 0,-1)
+c       1     ( 1, 0, 0)     3     (0, 1, 0)      5     (0, 0, 1)
+c***********************************************************************
+c***********************************************************************
+      face_loc = bdry_loc
+      if ((bdry_loc.eq.XLEFT).or.(bdry_loc.eq.XRIGHT)) then
+         if (bdry_loc.eq.XLEFT) then
+c                             x0 boundary
+            ipivot0  = ifirst0
+            dirsign0 = -1.d0 
+         else
+c                             x1 boundary
+            ipivot0  = ilast0
+            dirsign0 = 1.d0 
+         endif
+do_bdry_face(0,`ipivot0',`ic1',`ic2',`dirsign0')dnl
+      else if ((bdry_loc.eq.YLEFT).or.(bdry_loc.eq.YRIGHT)) then
+         if (bdry_loc.eq.YLEFT) then
+c                             y0 boundary
+            ipivot1  = ifirst1
+            dirsign1 = -1.d0 
+         else
+c                             y1 boundary
+            ipivot1  = ilast1
+            dirsign1 = 1.d0 
+         endif
+do_bdry_face(1,`ic0',`ipivot1',`ic2',`dirsign1')dnl
+      else if ((bdry_loc.eq.ZLEFT).or.(bdry_loc.eq.ZRIGHT)) then
+         if (bdry_loc.eq.ZLEFT) then
+c                             z0 boundary
+            ipivot2  = ifirst2
+            dirsign2 = -1.d0 
+         else
+c                             z1 boundary
+            ipivot2  = ilast2
+            dirsign2 = 1.d0 
+         endif
+do_bdry_face(2,`ic0',`ic1',`ipivot2',`dirsign2')dnl
+      endif
+c
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine getcartedgebdry3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,
+     &  ngc0,ngc1,ngc2,
+     &  dx,
+     &  bdry_loc,
+     &  bdry_cond,
+     &  face_values,
+     &  arrdata,
+     &  arrdepth)
+c***********************************************************************
+      implicit none
+include(appu_cartbdryparams3d.i)dnl
+c***********************************************************************
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      integer ngc0,ngc1,ngc2
+c
+      REAL dx(0:NDIM-1)
+c
+      integer bdry_loc,
+     &        arrdepth,
+     &        bdry_cond
+      REAL
+     &        face_values(0:arrdepth-1,0:2*NDIM-1)
+c
+      REAL
+     &  arrdata(CELL3dVECG(ifirst,ilast,ngc),0:arrdepth-1)
+c
+      integer ic2,ic1,ic0,ict0,ict1,ict2
+      integer k
+      integer ipivot0,ipivot1,ipivot2
+      integer face_loc0,face_loc1,face_loc2
+      REAL    dirsign0,dirsign1,dirsign2
+c
+c***********************************************************************
+c***********************************************************************
+c    bdry_loc   index    bdry_loc   index     bdry_loc   index
+c       0     (0,-1,-1)      4     (-1,0,-1)      8     (-1,-1,0)
+c       1     (0, 1,-1)      5     (-1,0, 1)      9     ( 1,-1,0)
+c       2     (0,-1, 1)      6     ( 1,0,-1)     10     (-1, 1,0)
+c       3     (0, 1, 1)      7     ( 1,0, 1)     11     ( 1, 1,0)
+c***********************************************************************
+c***********************************************************************
+      if ((bdry_loc.eq.Y0Z0).or.(bdry_loc.eq.Y1Z0).or.
+     &    (bdry_loc.eq.Y0Z1).or.(bdry_loc.eq.Y1Z1)) then
+         if (bdry_loc.eq.Y0Z0) then
+            face_loc1 = YLEFT
+            ipivot1   = ifirst1
+            dirsign1  = -1.d0
+            face_loc2 = ZLEFT
+            ipivot2   = ifirst2
+            dirsign2  = -1.d0
+         else if (bdry_loc.eq.Y1Z0) then
+            face_loc1 = YRIGHT
+            ipivot1   = ilast1
+            dirsign1  = 1.d0
+            face_loc2 = ZLEFT
+            ipivot2   = ifirst2
+            dirsign2  = -1.d0
+         else if (bdry_loc.eq.Y0Z1) then
+            face_loc1 = YLEFT
+            ipivot1   = ifirst1
+            dirsign1  = -1.d0
+            face_loc2 = ZRIGHT
+            ipivot2   = ilast2
+            dirsign2  = 1.d0
+         else
+            face_loc1 = YRIGHT
+            ipivot1   = ilast1
+            dirsign1  = 1.d0
+            face_loc2 = ZRIGHT
+            ipivot2   = ilast2
+            dirsign2  = 1.d0
+         endif
+do_bdry_edge()dnl
+      else if ((bdry_loc.eq.X0Z0).or.(bdry_loc.eq.X0Z1).or.
+     &         (bdry_loc.eq.X1Z0).or.(bdry_loc.eq.X1Z1)) then
+         if (bdry_loc.eq.X0Z0) then
+            face_loc2 = ZLEFT
+            ipivot2   = ifirst2
+            dirsign2  = -1.d0
+            face_loc0 = XLEFT
+            ipivot0   = ifirst0
+            dirsign0  = -1.d0
+         else if (bdry_loc.eq.X0Z1) then
+            face_loc2 = ZRIGHT
+            ipivot2   = ilast2
+            dirsign2  = 1.d0
+            face_loc0 = XLEFT
+            ipivot0   = ifirst0
+            dirsign0  = -1.d0
+         else if (bdry_loc.eq.X1Z0) then
+            face_loc2 = ZLEFT
+            ipivot2   = ifirst2
+            dirsign2  = -1.d0
+            face_loc0 = XRIGHT
+            ipivot0   = ilast0
+            dirsign0  = 1.d0
+         else
+            face_loc2 = ZRIGHT
+            ipivot2   = ilast2
+            dirsign2  = 1.d0
+            face_loc0 = XRIGHT
+            ipivot0   = ilast0
+            dirsign0  = 1.d0
+         endif
+do_bdry_edge()dnl
+      else if ((bdry_loc.eq.X0Y0).or.(bdry_loc.eq.X1Y0).or.
+     &         (bdry_loc.eq.X0Y1).or.(bdry_loc.eq.X1Y1)) then
+         if (bdry_loc.eq.X0Y0) then
+            face_loc1 = YLEFT
+            ipivot1   = ifirst1
+            dirsign1  = -1.d0
+            face_loc0 = XLEFT
+            ipivot0   = ifirst0
+            dirsign0  = -1.d0
+         else if (bdry_loc.eq.X1Y0) then
+            face_loc1 = YLEFT
+            ipivot1   = ifirst1
+            dirsign1  = -1.d0
+            face_loc0 = XRIGHT
+            ipivot0   = ilast0
+            dirsign0  = 1.d0
+         else if (bdry_loc.eq.X0Y1) then
+            face_loc1 = YRIGHT
+            ipivot1   = ilast1
+            dirsign1  = 1.d0
+            face_loc0 = XLEFT
+            ipivot0   = ifirst0
+            dirsign0  = -1.d0
+         else
+            face_loc1 = YRIGHT
+            ipivot1   = ilast1
+            dirsign1  = 1.d0
+            face_loc0 = XRIGHT
+            ipivot0   = ilast0
+            dirsign0  = 1.d0
+         endif
+do_bdry_edge()dnl
+      endif
+c
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine getcartnodebdry3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,
+     &  ngc0,ngc1,ngc2,
+     &  dx,
+     &  bdry_loc,
+     &  bdry_cond,
+     &  face_values,
+     &  arrdata,
+     &  arrdepth)
+c***********************************************************************
+      implicit none
+include(appu_cartbdryparams3d.i)dnl
+c***********************************************************************
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      integer ngc0,ngc1,ngc2
+c
+      REAL dx(0:NDIM-1)
+c
+      integer bdry_loc,
+     &        arrdepth,
+     &        bdry_cond
+      REAL
+     &        face_values(0:arrdepth-1,0:2*NDIM-1)
+c
+      REAL
+     &  arrdata(CELL3dVECG(ifirst,ilast,ngc),0:arrdepth-1)
+c
+      integer ic2,ic1,ic0,ict0,ict1,ict2
+      integer k
+      integer ipivot0,ipivot1,ipivot2
+      integer face_loc0,face_loc1,face_loc2
+      REAL    dirsign0,dirsign1,dirsign2
+c
+c***********************************************************************
+c***********************************************************************
+c    bdry_loc   index     bdry_loc    index
+c       0     (-1,-1,-1)      4     (-1,-1, 1)
+c       1     ( 1,-1,-1)      5     ( 1,-1, 1)
+c       2     (-1, 1,-1)      6     (-1, 1, 1)
+c       3     ( 1, 1,-1)      7     ( 1, 1, 1)
+c***********************************************************************
+c***********************************************************************
+      if (bdry_loc.eq.X0Y0Z0) then
+         face_loc0 = XLEFT
+         ipivot0   = ifirst0
+         dirsign0  = -1.d0
+         face_loc1 = YLEFT
+         ipivot1   = ifirst1
+         dirsign1  = -1.d0
+         face_loc2 = ZLEFT
+         ipivot2   = ifirst2
+         dirsign2  = -1.d0
+      else if (bdry_loc.eq.X1Y0Z0) then
+         face_loc0 = XRIGHT
+         ipivot0   = ilast0
+         dirsign0  = 1.d0
+         face_loc1 = YLEFT
+         ipivot1   = ifirst1
+         dirsign1  = -1.d0
+         face_loc2 = ZLEFT
+         ipivot2   = ifirst2
+         dirsign2  = -1.d0
+      else if (bdry_loc.eq.X0Y1Z0) then
+         face_loc0 = XLEFT
+         ipivot0   = ifirst0
+         dirsign0  = -1.d0
+         face_loc1 = YRIGHT
+         ipivot1   = ilast1
+         dirsign1  = 1.d0
+         face_loc2 = ZLEFT
+         ipivot2   = ifirst2
+         dirsign2  = -1.d0
+      else if (bdry_loc.eq.X1Y1Z0) then
+         face_loc0 = XRIGHT
+         ipivot0   = ilast0
+         dirsign0  = 1.d0
+         face_loc1 = YRIGHT
+         ipivot1   = ilast1
+         dirsign1  = 1.d0
+         face_loc2 = ZLEFT
+         ipivot2   = ifirst2
+         dirsign2  = -1.d0
+      else if (bdry_loc.eq.X0Y0Z1) then
+         face_loc0 = XLEFT
+         ipivot0   = ifirst0
+         dirsign0  = -1.d0
+         face_loc1 = YLEFT
+         ipivot1   = ifirst1
+         dirsign1  = -1.d0
+         face_loc2 = ZRIGHT
+         ipivot2   = ilast2
+         dirsign2  = 1.d0
+      else if (bdry_loc.eq.X1Y0Z1) then
+         face_loc0 = XRIGHT
+         ipivot0   = ilast0
+         dirsign0  = 1.d0
+         face_loc1 = YLEFT
+         ipivot1   = ifirst1
+         dirsign1  = -1.d0
+         face_loc2 = ZRIGHT
+         ipivot2   = ilast2
+         dirsign2  = 1.d0
+      else if (bdry_loc.eq.X0Y1Z1) then
+         face_loc0 = XLEFT
+         ipivot0   = ifirst0
+         dirsign0  = -1.d0
+         face_loc1 = YRIGHT
+         ipivot1   = ilast1
+         dirsign1  = 1.d0
+         face_loc2 = ZRIGHT
+         ipivot2   = ilast2
+         dirsign2  = 1.d0
+      else if (bdry_loc.eq.X1Y1Z1) then
+         face_loc0 = XRIGHT
+         ipivot0   = ilast0
+         dirsign0  = 1.d0
+         face_loc1 = YRIGHT
+         ipivot1   = ilast1
+         dirsign1  = 1.d0
+         face_loc2 = ZRIGHT
+         ipivot2   = ilast2
+         dirsign2  = 1.d0
+      endif
+do_bdry_node()dnl
+c
+      return
+      end
+
+c***********************************************************************
+c***********************************************************************
+      subroutine stufcartbdryloc3d(
+     &  XLEFTin, XRIGHTin, YLEFTin, YRIGHTin, ZLEFTin, ZRIGHTin,
+     &  Y0Z0in, Y1Z0in, Y0Z1in, Y1Z1in,
+     &  X0Z0in, X0Z1in, X1Z0in, X1Z1in,
+     &  X0Y0in, X1Y0in, X0Y1in, X1Y1in,
+     &  X0Y0Z0in, X1Y0Z0in, X0Y1Z0in, X1Y1Z0in,
+     &  X0Y0Z1in, X1Y0Z1in, X0Y1Z1in, X1Y1Z1in)
+      implicit none
+      integer
+     &  XLEFTin, XRIGHTin, YLEFTin, YRIGHTin, ZLEFTin, ZRIGHTin,
+     &  Y0Z0in, Y1Z0in, Y0Z1in, Y1Z1in,
+     &  X0Z0in, X0Z1in, X1Z0in, X1Z1in,
+     &  X0Y0in, X1Y0in, X0Y1in, X1Y1in,
+     &  X0Y0Z0in, X1Y0Z0in, X0Y1Z0in, X1Y1Z0in,
+     &  X0Y0Z1in, X1Y0Z1in, X0Y1Z1in, X1Y1Z1in
+include(appu_cartbdryparams3d.i)dnl
+
+c 3d faces
+        XLEFT=XLEFTin
+        XRIGHT=XRIGHTin
+        YLEFT=YLEFTin
+        YRIGHT=YRIGHTin
+        ZLEFT=ZLEFTin
+        ZRIGHT=ZRIGHTin
+
+c 3d edges
+        Y0Z0=Y0Z0in
+        Y1Z0=Y1Z0in
+        Y0Z1=Y0Z1in
+        Y1Z1=Y1Z1in
+        X0Z0=X0Z0in
+        X0Z1=X0Z1in
+        X1Z0=X1Z0in
+        X1Z1=X1Z1in
+        X0Y0=X0Y0in
+        X1Y0=X1Y0in
+        X0Y1=X0Y1in
+        X1Y1=X1Y1in
+
+c 3d nodes
+        X0Y0Z0=X0Y0Z0in
+        X1Y0Z0=X1Y0Z0in
+        X0Y1Z0=X0Y1Z0in
+        X1Y1Z0=X1Y1Z0in
+        X0Y0Z1=X0Y0Z1in
+        X1Y0Z1=X1Y0Z1in
+        X0Y1Z1=X0Y1Z1in
+        X1Y1Z1=X1Y1Z1in
+
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine stufcartbdrycond3d(
+     &  FLOWin, XFLOWin, YFLOWin, ZFLOWin,
+     &  REFLECTin, XREFLECTin, YREFLECTin, ZREFLECTin, 
+     &  DIRICHLETin, XDIRICHLETin, YDIRICHLETin, ZDIRICHLETin,
+     &  NEUMANNin, XNEUMANNin, YNEUMANNin, ZNEUMANNin)
+      implicit none
+      integer
+     &  FLOWin, XFLOWin, YFLOWin, ZFLOWin,
+     &  REFLECTin, XREFLECTin, YREFLECTin, ZREFLECTin,
+     &  DIRICHLETin, XDIRICHLETin, YDIRICHLETin, ZDIRICHLETin,
+     &  NEUMANNin, XNEUMANNin, YNEUMANNin, ZNEUMANNin
+include(appu_cartbdryparams3d.i)dnl
+
+        FLOW=FLOWin
+        XFLOW=XFLOWin
+        YFLOW=YFLOWin
+        ZFLOW=ZFLOWin
+
+        REFLECT=REFLECTin
+        XREFLECT=XREFLECTin
+        YREFLECT=YREFLECTin
+        ZREFLECT=ZREFLECTin
+
+        DIRICHLET=DIRICHLETin
+        XDIRICHLET=XDIRICHLETin
+        YDIRICHLET=YDIRICHLETin
+        ZDIRICHLET=ZDIRICHLETin
+
+        NEUMANN=NEUMANNin
+        XNEUMANN=XNEUMANNin
+        YNEUMANN=YNEUMANNin
+        ZNEUMANN=ZNEUMANNin
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/fortran/appu_cartbdryparams2d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/fortran/appu_cartbdryparams2d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,26 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/appu/fortran/appu_cartbdryparams2d.i $
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 2d boundary constant common blocks
+c
+      common/cartbdrylocparams2d/
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,
+     &  X0Y0,X1Y0,X0Y1,X1Y1
+      integer
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,
+     &  X0Y0,X1Y0,X0Y1,X1Y1
+c
+c
+      common/cartbdrycondparams2d/
+     &  FLOW,XFLOW,YFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN
+      integer
+     &  FLOW,XFLOW,YFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/fortran/appu_cartbdryparams3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/fortran/appu_cartbdryparams3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,34 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/appu/fortran/appu_cartbdryparams3d.i $
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 3d boundary constant common blocks
+c
+      common/cartbdrylocparams3d/
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT, 
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1
+      integer
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT,
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1  
+c
+c
+      common/cartbdrycondparams3d/
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+      integer
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/fortran/appu_cpdat2buf2d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/fortran/appu_cpdat2buf2d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,99 @@
+c    
+c File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/appu/fortran/appu_cpdat2buf2d.f $
+c Package:     SAMRAI application utilities
+c Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c Revision:    $LastChangedRevision: 4081 $
+c Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c Description: copies data from 2D fortran array to 1D double buffer
+c
+
+      subroutine cpddat2buf2d(
+     & gidxlo0, gidxlo1,
+     & bidxlo0, bidxlo1, 
+     & bidxhi0, bidxhi1,
+     & gidxhi0, gidxhi1, 
+     & darray, buffer, bufsize)
+c     =============================================================
+      implicit none
+      integer gidxlo0, gidxlo1, 
+     &        bidxlo0, bidxlo1,
+     &        bidxhi0, bidxhi1, 
+     &        gidxhi0, gidxhi1,
+     &        bufsize
+      double precision darray(gidxlo0:gidxhi0,
+     &                        gidxlo1:gidxhi1)
+      double precision buffer(0:bufsize-1)
+      integer in0,in1,mark 
+c     =============================================================
+
+      mark = 0 
+      do in1=bidxlo1,bidxhi1
+         do in0=bidxlo0,bidxhi0
+            buffer(mark) = darray(in0,in1)
+            mark = mark + 1
+         enddo
+      enddo
+
+      return
+      end
+
+
+      subroutine cpfdat2buf2d(
+     & gidxlo0, gidxlo1, 
+     & bidxlo0, bidxlo1,
+     & bidxhi0, bidxhi1,
+     & gidxhi0, gidxhi1,
+     & farray, buffer, bufsize)
+c     =============================================================
+      implicit none
+      integer gidxlo0, gidxlo1,
+     &        bidxlo0, bidxlo1,
+     &        bidxhi0, bidxhi1,
+     &        gidxhi0, gidxhi1,
+     &        bufsize 
+      real farray(gidxlo0:gidxhi0,
+     &             gidxlo1:gidxhi1)
+      double precision buffer(0:bufsize-1)
+      integer in0,in1,mark 
+c     =============================================================
+
+      mark = 0 
+      do in1=bidxlo1,bidxhi1
+         do in0=bidxlo0,bidxhi0
+            buffer(mark) = dble(farray(in0,in1))
+            mark = mark + 1
+         enddo
+      enddo
+
+      return
+      end
+
+      subroutine cpidat2buf2d(
+     & gidxlo0, gidxlo1, 
+     & bidxlo0, bidxlo1, 
+     & bidxhi0, bidxhi1, 
+     & gidxhi0, gidxhi1,
+     & iarray, buffer, bufsize)
+c     =============================================================
+      implicit none
+      integer gidxlo0, gidxlo1,
+     &        bidxlo0, bidxlo1,
+     &        bidxhi0, bidxhi1, 
+     &        gidxhi0, gidxhi1,
+     &        bufsize, 
+     &        iarray(gidxlo0:gidxhi0,
+     &               gidxlo1:gidxhi1)
+      double precision buffer(0:bufsize-1)
+      integer in0,in1,mark 
+c     =============================================================
+
+      mark = 0 
+      do in1=bidxlo1,bidxhi1
+         do in0=bidxlo0,bidxhi0
+            buffer(mark) = dble(iarray(in0,in1))
+            mark = mark + 1
+         enddo
+      enddo
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/fortran/appu_cpdat2buf3d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/fortran/appu_cpdat2buf3d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,107 @@
+c    
+c File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/appu/fortran/appu_cpdat2buf3d.f $
+c Package:     SAMRAI application utilities
+c Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c Revision:    $LastChangedRevision: 4081 $
+c Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c Description: copies data from 3D fortran array to 1D double buffer
+c
+
+      subroutine cpfdat2buf3d(
+     & gidxlo0, gidxlo1, gidxlo2,
+     & bidxlo0, bidxlo1, bidxlo2,
+     & bidxhi0, bidxhi1, bidxhi2,
+     & gidxhi0, gidxhi1, gidxhi2,
+     & farray, buffer, bufsize)
+c     =============================================================
+      implicit none
+      integer gidxlo0, gidxlo1, gidxlo2,
+     &        bidxlo0, bidxlo1, bidxlo2,
+     &        bidxhi0, bidxhi1, bidxhi2,
+     &        gidxhi0, gidxhi1, gidxhi2,
+     &        bufsize
+      real farray(gidxlo0:gidxhi0,
+     &             gidxlo1:gidxhi1,
+     &             gidxlo2:gidxhi2)
+      double precision buffer(0:bufsize-1)
+      integer in0,in1,in2,mark
+c     =============================================================
+
+      mark = 0 
+      do in2=bidxlo2,bidxhi2
+         do in1=bidxlo1,bidxhi1
+            do in0=bidxlo0,bidxhi0
+            buffer(mark) = dble(farray(in0,in1,in2))
+            mark = mark + 1
+            enddo
+         enddo
+      enddo
+
+      return
+      end
+
+      subroutine cpddat2buf3d(
+     & gidxlo0, gidxlo1, gidxlo2,
+     & bidxlo0, bidxlo1, bidxlo2,
+     & bidxhi0, bidxhi1, bidxhi2,
+     & gidxhi0, gidxhi1, gidxhi2,
+     & darray, buffer, bufsize)
+c     =============================================================
+      implicit none
+      integer gidxlo0, gidxlo1, gidxlo2,
+     &        bidxlo0, bidxlo1, bidxlo2,
+     &        bidxhi0, bidxhi1, bidxhi2,
+     &        gidxhi0, gidxhi1, gidxhi2,
+     &        bufsize
+      double precision darray(gidxlo0:gidxhi0,
+     &                        gidxlo1:gidxhi1,
+     &                        gidxlo2:gidxhi2)
+      double precision buffer(0:bufsize-1)
+      integer in0,in1,in2,mark 
+c     =============================================================
+
+      mark = 0 
+      do in2=bidxlo2,bidxhi2
+         do in1=bidxlo1,bidxhi1
+            do in0=bidxlo0,bidxhi0
+            buffer(mark) = darray(in0,in1,in2)
+            mark = mark + 1
+            enddo
+         enddo
+      enddo
+
+      return
+      end
+
+      subroutine cpidat2buf3d(
+     & gidxlo0, gidxlo1, gidxlo2,
+     & bidxlo0, bidxlo1, bidxlo2,
+     & bidxhi0, bidxhi1, bidxhi2,
+     & gidxhi0, gidxhi1, gidxhi2,
+     & iarray, buffer, bufsize)
+c     =============================================================
+      implicit none
+      integer gidxlo0, gidxlo1, gidxlo2,
+     &        bidxlo0, bidxlo1, bidxlo2,
+     &        bidxhi0, bidxhi1, bidxhi2,
+     &        gidxhi0, gidxhi1, gidxhi2,
+     &        bufsize,
+     &        iarray(gidxlo0:gidxhi0,
+     &               gidxlo1:gidxhi1,
+     &               gidxlo2:gidxhi2)
+      double precision buffer(0:bufsize-1)
+      integer in0,in1,in2,mark 
+c     =============================================================
+
+      mark = 0 
+      do in2=bidxlo2,bidxhi2
+         do in1=bidxlo1,bidxhi1
+            do in0=bidxlo0,bidxhi0
+            buffer(mark) = dble(iarray(in0,in1,in2))
+            mark = mark + 1
+            enddo
+         enddo
+      enddo
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/fortran/appu_ebdry2d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/fortran/appu_ebdry2d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,324 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/appu/fortran/appu_ebdry2d.m4 $
+c  Package:     SAMRAI 
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Release:     
+c  Revision:    
+c  Modified:    
+c  Description:    F77 routines for setting embedded boundary conditions.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim2d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 2d arrays in FORTRAN routines.
+c
+c
+c***********************************************************************
+c Set common definitions - integers passed from C++ code that define
+c constants.
+c***********************************************************************
+c
+      subroutine setebparams(
+     &  SOLIDin,CUTin,BORDERin,FLOWin,
+     &  OUTSIDEin,INSIDEin,BOUNDARYin,ONBOUNDARYin)
+c***********************************************************************
+      implicit none
+      integer
+     &  SOLIDin,CUTin,BORDERin,FLOWin,
+     &  OUTSIDEin,INSIDEin,BOUNDARYin,ONBOUNDARYin
+c
+c File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/appu/fortran/ebparams.i $
+c Package:     SAMRAI application
+c Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c Revision:    $LastChangedRevision: 4081 $
+c Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c Description: Commonblock in embedded boundary test code.
+c
+
+      common/ebparams/SOLID_EB,CUT_EB,BORDER_EB,FLOW_EB,
+     &  OUTSIDE_EB,INSIDE_EB,BOUNDARY_EB,ONBOUNDARY_EB
+      integer
+     &  SOLID_EB,CUT_EB,BORDER_EB,FLOW_EB,
+     &  OUTSIDE_EB,INSIDE_EB,BOUNDARY_EB,ONBOUNDARY_EB
+c***********************************************************************
+c
+      SOLID_EB      = SOLIDin
+      CUT_EB        = CUTin
+      BORDER_EB     = BORDERin
+      FLOW_EB       = FLOWin
+      OUTSIDE_EB    = OUTSIDEin
+      INSIDE_EB     = INSIDEin
+      BOUNDARY_EB   = BOUNDARYin
+      ONBOUNDARY_EB = ONBOUNDARYin
+
+      return
+      end
+     
+c
+c***********************************************************************
+c Convert node inout values to cell flags.
+c***********************************************************************
+c
+      subroutine node2cellflag2d(
+     &  ifirst0,ifirst1,
+     &  ilast0,ilast1,
+     &  ngc0,ngc1,
+     &  cgc0,cgc1,
+     &  node_flag,
+     &  cell_flag,
+     &  cell_vol)
+c***********************************************************************
+      implicit none
+c
+c File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/appu/fortran/ebparams.i $
+c Package:     SAMRAI application
+c Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c Revision:    $LastChangedRevision: 4081 $
+c Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c Description: Commonblock in embedded boundary test code.
+c
+
+      common/ebparams/SOLID_EB,CUT_EB,BORDER_EB,FLOW_EB,
+     &  OUTSIDE_EB,INSIDE_EB,BOUNDARY_EB,ONBOUNDARY_EB
+      integer
+     &  SOLID_EB,CUT_EB,BORDER_EB,FLOW_EB,
+     &  OUTSIDE_EB,INSIDE_EB,BOUNDARY_EB,ONBOUNDARY_EB
+c***********************************************************************
+c
+      integer
+     &  ifirst0,ifirst1,
+     &  ilast0,ilast1,
+     &  ngc0,ngc1,
+     &  cgc0,cgc1
+      integer
+     &  node_flag(ifirst0-ngc0:ilast0+1+ngc0,
+     &          ifirst1-ngc1:ilast1+1+ngc1)
+      integer
+     &  cell_flag(ifirst0-cgc0:ilast0+cgc0,
+     &          ifirst1-cgc1:ilast1+cgc1)
+      double precision
+     &  cell_vol(ifirst0-cgc0:ilast0+cgc0,
+     &          ifirst1-cgc1:ilast1+cgc1)
+      integer ic0,ic1
+c
+c  The cell flag is equal to the sum of the node flags around it.
+c
+      do ic1 = ifirst1, ilast1
+         do ic0 = ifirst0, ilast0
+            cell_flag(ic0,ic1) = 
+     &         node_flag(ic0,ic1) + node_flag(ic0+1,ic1) +
+     &         node_flag(ic0,ic1+1) + node_flag(ic0+1,ic1+1)
+         end do
+      end do
+c
+c  If the cell flag is:
+c      flag = 0             - FLOW cell
+c      flag = 2^NDIM        - SOLID cell
+c      flag = anything else - CUT cell
+c
+c  Set volume of cut cell to -1.0 to trip an error if we don't reset it.
+c
+      do ic1 = ifirst1, ilast1
+         do ic0 = ifirst0, ilast0
+            if (cell_flag(ic0,ic1).eq.0) then
+               cell_flag(ic0,ic1) = FLOW_EB
+               cell_vol(ic0,ic1) = 1.0
+            else if (cell_flag(ic0,ic1).eq.2**2) then
+               cell_flag(ic0,ic1) = SOLID_EB
+               cell_vol(ic0,ic1) = 0.0
+            else
+               cell_flag(ic0,ic1) = CUT_EB
+               cell_vol(ic0,ic1) = -1.0
+            endif
+         end do
+      end do
+
+      return
+      end
+               
+
+c
+c***********************************************************************
+c Set boundary condtions for embedded boundary
+c***********************************************************************
+c
+      subroutine setebnode2d(
+     &  ifirst0,ilast0,
+     &  ifirst1,ilast1,
+     &  ibeg0,iend0,
+     &  ibeg1,iend1,
+     &  ngc0, ngc1,
+     &  bdry_loc,
+     &  bdry_cond,
+     &  cell_flag,
+     &  cell_vol)
+c***********************************************************************
+      implicit none
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/appu/fortran/appu_cartbdryparams2d.i $
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 2d boundary constant common blocks
+c
+      common/cartbdrylocparams2d/
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,
+     &  X0Y0,X1Y0,X0Y1,X1Y1
+      integer
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,
+     &  X0Y0,X1Y0,X0Y1,X1Y1
+c
+c
+      common/cartbdrycondparams2d/
+     &  FLOW,XFLOW,YFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN
+      integer
+     &  FLOW,XFLOW,YFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN
+c***********************************************************************
+c
+      integer
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  ibeg0,iend0,ibeg1,iend1,
+     &  ngc0,ngc1,
+     &  bdry_loc, bdry_cond
+      integer
+     &  cell_flag(ifirst0-ngc0:ilast0+ngc0,
+     &          ifirst1-ngc1:ilast1+ngc1)
+      double precision
+     &  cell_vol(ifirst0-ngc0:ilast0+ngc0,
+     &          ifirst1-ngc1:ilast1+ngc1)
+      integer ic0,ic1
+c
+c***********************************************************************
+c
+c
+c Set the cell volume and tags appropriately
+c
+c    DIRICHLET,NEUMANN, - cell_tag(bdry) = cell_tag(interior)
+c    REFLECT              cell_vol(bdry) = cell_vol(interior)
+c
+
+
+      if ((bdry_cond.eq.XDIRICHLET).or.
+     &    (bdry_cond.eq.XREFLECT).or.
+     &    (bdry_cond.eq.XNEUMANN)) then
+
+         if (bdry_loc.eq.X0Y0) then        
+            do ic1=ifirst1-ngc1,ifirst1-1     
+               do ic0=ifirst0-ngc0,ifirst0-1  
+                  cell_flag(ic0,ic1) = cell_flag(ifirst0,ic1)
+                  cell_vol(ic0,ic1)  = cell_vol(ifirst0,ic1)
+               end do
+            end do
+         else if (bdry_loc.eq.X0Y1) then
+           do ic1=ilast1+1,ilast1+ngc1     
+               do ic0=ifirst0-ngc0,ifirst0-1  
+                  cell_flag(ic0,ic1) = cell_flag(ifirst0,ic1)
+                  cell_vol(ic0,ic1)  = cell_vol(ifirst0,ic1)
+               end do
+            end do
+         else if (bdry_loc.eq.X1Y0) then
+           do ic1=ifirst1-ngc1,ifirst1-1     
+               do ic0=ilast0+1,ilast0+ngc0  
+                  cell_flag(ic0,ic1) = cell_flag(ilast0,ic1)
+                  cell_vol(ic0,ic1)  = cell_vol(ilast0,ic1)
+               end do
+            end do
+         else if (bdry_loc.eq.X1Y1) then
+           do ic1=ilast1+1,ilast1+ngc1     
+               do ic0=ilast0+1,ilast0+ngc0  
+                  cell_flag(ic0,ic1) = cell_flag(ilast0,ic1)
+                  cell_vol(ic0,ic1)  = cell_vol(ilast0,ic1)
+               end do
+            end do
+         endif
+   
+      endif
+
+      if ((bdry_cond.eq.YDIRICHLET).or.
+     &    (bdry_cond.eq.YREFLECT).or.
+     &    (bdry_cond.eq.YNEUMANN)) then
+
+         if (bdry_loc.eq.X0Y0) then        
+            do ic1=ifirst1-ngc1,ifirst1-1     
+               do ic0=ifirst0-ngc0,ifirst0-1  
+                  cell_flag(ic0,ic1) = cell_flag(ic0,ifirst1)
+                  cell_vol(ic0,ic1)  = cell_vol(ic0,ifirst1)
+               end do
+            end do
+         else if (bdry_loc.eq.X0Y1) then
+           do ic1=ilast1+1,ilast1+ngc1     
+               do ic0=ifirst0-ngc0,ifirst0-1  
+                  cell_flag(ic0,ic1) = cell_flag(ic0,ilast1)
+                  cell_vol(ic0,ic1)  = cell_vol(ic0,ilast1)
+               end do
+            end do
+         else if (bdry_loc.eq.X1Y0) then
+           do ic1=ifirst1-ngc1,ifirst1-1     
+               do ic0=ilast0+1,ilast0+ngc0  
+                  cell_flag(ic0,ic1) = cell_flag(ic0,ifirst1)
+                  cell_vol(ic0,ic1)  = cell_vol(ic0,ifirst1)
+               end do
+            end do
+         else if (bdry_loc.eq.X1Y1) then
+           do ic1=ilast1+1,ilast1+ngc1     
+               do ic0=ilast0+1,ilast0+ngc0  
+                  cell_flag(ic0,ic1) = cell_flag(ic0,ilast1)
+                  cell_vol(ic0,ic1)  = cell_vol(ic0,ilast1)
+               end do
+            end do
+         endif
+   
+      endif
+
+c
+c    FLOW               - cell_tag(bdry) = -2
+c                         cell_vol(bdry) = 0. 
+c
+      if ((bdry_cond.eq.XFLOW).or.
+     &    (bdry_cond.eq.YFLOW)) then
+
+         if (bdry_loc.eq.X0Y0) then        
+            do ic1=ifirst1-ngc1,ifirst1-1     
+               do ic0=ifirst0-ngc0,ifirst0-1  
+                  cell_flag(ic0,ic1) = -2
+                  cell_vol(ic0,ic1)  = 0.
+               end do
+            end do
+         else if (bdry_loc.eq.X0Y1) then
+            do ic1=ilast1+1,ilast1+ngc1     
+               do ic0=ifirst0-ngc0,ifirst0-1       
+                  cell_flag(ic0,ic1) = -2
+                  cell_vol(ic0,ic1)  = 0.
+               end do
+            end do
+         else if (bdry_loc.eq.X1Y0) then
+            do ic1=ifirst1-ngc1,ifirst1-1     
+               do ic0=ilast0+1,ilast0+ngc0
+                  cell_flag(ic0,ic1) = -2
+                  cell_vol(ic0,ic1)  = 0.
+               end do
+            end do
+         else if (bdry_loc.eq.X1Y1) then
+            do ic1=ilast1+1,ilast1+ngc1     
+               do ic0=ilast0+1,ilast0+ngc0  
+                 cell_flag(ic0,ic1) = -2
+                  cell_vol(ic0,ic1)  = 0.
+               end do
+            end do
+         endif
+      endif
+  
+
+      return
+      end
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/fortran/appu_ebdry2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/fortran/appu_ebdry2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,262 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/appu/fortran/appu_ebdry2d.m4 $
+c  Package:     SAMRAI 
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Release:     
+c  Revision:    
+c  Modified:    
+c  Description:    F77 routines for setting embedded boundary conditions.
+c
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+c
+c***********************************************************************
+c Set common definitions - integers passed from C++ code that define
+c constants.
+c***********************************************************************
+c
+      subroutine setebparams(
+     &  SOLIDin,CUTin,BORDERin,FLOWin,
+     &  OUTSIDEin,INSIDEin,BOUNDARYin,ONBOUNDARYin)
+c***********************************************************************
+      implicit none
+      integer
+     &  SOLIDin,CUTin,BORDERin,FLOWin,
+     &  OUTSIDEin,INSIDEin,BOUNDARYin,ONBOUNDARYin
+include(ebparams.i)dnl
+c***********************************************************************
+c
+      SOLID_EB      = SOLIDin
+      CUT_EB        = CUTin
+      BORDER_EB     = BORDERin
+      FLOW_EB       = FLOWin
+      OUTSIDE_EB    = OUTSIDEin
+      INSIDE_EB     = INSIDEin
+      BOUNDARY_EB   = BOUNDARYin
+      ONBOUNDARY_EB = ONBOUNDARYin
+
+      return
+      end
+     
+c
+c***********************************************************************
+c Convert node inout values to cell flags.
+c***********************************************************************
+c
+      subroutine node2cellflag2d(
+     &  ifirst0,ifirst1,
+     &  ilast0,ilast1,
+     &  ngc0,ngc1,
+     &  cgc0,cgc1,
+     &  node_flag,
+     &  cell_flag,
+     &  cell_vol)
+c***********************************************************************
+      implicit none
+include(ebparams.i)dnl
+c***********************************************************************
+c
+      integer
+     &  ifirst0,ifirst1,
+     &  ilast0,ilast1,
+     &  ngc0,ngc1,
+     &  cgc0,cgc1
+      integer
+     &  node_flag(NODE2dVECG(ifirst,ilast,ngc))
+      integer
+     &  cell_flag(CELL2dVECG(ifirst,ilast,cgc))
+      double precision
+     &  cell_vol(CELL2dVECG(ifirst,ilast,cgc))
+      integer ic0,ic1
+c
+c  The cell flag is equal to the sum of the node flags around it.
+c
+      do ic1 = ifirst1, ilast1
+         do ic0 = ifirst0, ilast0
+            cell_flag(ic0,ic1) = 
+     &         node_flag(ic0,ic1) + node_flag(ic0+1,ic1) +
+     &         node_flag(ic0,ic1+1) + node_flag(ic0+1,ic1+1)
+         end do
+      end do
+c
+c  If the cell flag is:
+c      flag = 0             - FLOW cell
+c      flag = 2^NDIM        - SOLID cell
+c      flag = anything else - CUT cell
+c
+c  Set volume of cut cell to -1.0 to trip an error if we don't reset it.
+c
+      do ic1 = ifirst1, ilast1
+         do ic0 = ifirst0, ilast0
+            if (cell_flag(ic0,ic1).eq.0) then
+               cell_flag(ic0,ic1) = FLOW_EB
+               cell_vol(ic0,ic1) = 1.0
+            else if (cell_flag(ic0,ic1).eq.2**2) then
+               cell_flag(ic0,ic1) = SOLID_EB
+               cell_vol(ic0,ic1) = 0.0
+            else
+               cell_flag(ic0,ic1) = CUT_EB
+               cell_vol(ic0,ic1) = -1.0
+            endif
+         end do
+      end do
+
+      return
+      end
+               
+
+c
+c***********************************************************************
+c Set boundary condtions for embedded boundary
+c***********************************************************************
+c
+      subroutine setebnode2d(
+     &  ifirst0,ilast0,
+     &  ifirst1,ilast1,
+     &  ibeg0,iend0,
+     &  ibeg1,iend1,
+     &  ngc0, ngc1,
+     &  bdry_loc,
+     &  bdry_cond,
+     &  cell_flag,
+     &  cell_vol)
+c***********************************************************************
+      implicit none
+include(appu_cartbdryparams2d.i)dnl
+c***********************************************************************
+c
+      integer
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  ibeg0,iend0,ibeg1,iend1,
+     &  ngc0,ngc1,
+     &  bdry_loc, bdry_cond
+      integer
+     &  cell_flag(CELL2dVECG(ifirst,ilast,ngc))
+      double precision
+     &  cell_vol(CELL2dVECG(ifirst,ilast,ngc))
+      integer ic0,ic1
+c
+c***********************************************************************
+c
+c
+c Set the cell volume and tags appropriately
+c
+c    DIRICHLET,NEUMANN, - cell_tag(bdry) = cell_tag(interior)
+c    REFLECT              cell_vol(bdry) = cell_vol(interior)
+c
+
+
+      if ((bdry_cond.eq.XDIRICHLET).or.
+     &    (bdry_cond.eq.XREFLECT).or.
+     &    (bdry_cond.eq.XNEUMANN)) then
+
+         if (bdry_loc.eq.X0Y0) then        
+            do ic1=ifirst1-ngc1,ifirst1-1     
+               do ic0=ifirst0-ngc0,ifirst0-1  
+                  cell_flag(ic0,ic1) = cell_flag(ifirst0,ic1)
+                  cell_vol(ic0,ic1)  = cell_vol(ifirst0,ic1)
+               end do
+            end do
+         else if (bdry_loc.eq.X0Y1) then
+           do ic1=ilast1+1,ilast1+ngc1     
+               do ic0=ifirst0-ngc0,ifirst0-1  
+                  cell_flag(ic0,ic1) = cell_flag(ifirst0,ic1)
+                  cell_vol(ic0,ic1)  = cell_vol(ifirst0,ic1)
+               end do
+            end do
+         else if (bdry_loc.eq.X1Y0) then
+           do ic1=ifirst1-ngc1,ifirst1-1     
+               do ic0=ilast0+1,ilast0+ngc0  
+                  cell_flag(ic0,ic1) = cell_flag(ilast0,ic1)
+                  cell_vol(ic0,ic1)  = cell_vol(ilast0,ic1)
+               end do
+            end do
+         else if (bdry_loc.eq.X1Y1) then
+           do ic1=ilast1+1,ilast1+ngc1     
+               do ic0=ilast0+1,ilast0+ngc0  
+                  cell_flag(ic0,ic1) = cell_flag(ilast0,ic1)
+                  cell_vol(ic0,ic1)  = cell_vol(ilast0,ic1)
+               end do
+            end do
+         endif
+   
+      endif
+
+      if ((bdry_cond.eq.YDIRICHLET).or.
+     &    (bdry_cond.eq.YREFLECT).or.
+     &    (bdry_cond.eq.YNEUMANN)) then
+
+         if (bdry_loc.eq.X0Y0) then        
+            do ic1=ifirst1-ngc1,ifirst1-1     
+               do ic0=ifirst0-ngc0,ifirst0-1  
+                  cell_flag(ic0,ic1) = cell_flag(ic0,ifirst1)
+                  cell_vol(ic0,ic1)  = cell_vol(ic0,ifirst1)
+               end do
+            end do
+         else if (bdry_loc.eq.X0Y1) then
+           do ic1=ilast1+1,ilast1+ngc1     
+               do ic0=ifirst0-ngc0,ifirst0-1  
+                  cell_flag(ic0,ic1) = cell_flag(ic0,ilast1)
+                  cell_vol(ic0,ic1)  = cell_vol(ic0,ilast1)
+               end do
+            end do
+         else if (bdry_loc.eq.X1Y0) then
+           do ic1=ifirst1-ngc1,ifirst1-1     
+               do ic0=ilast0+1,ilast0+ngc0  
+                  cell_flag(ic0,ic1) = cell_flag(ic0,ifirst1)
+                  cell_vol(ic0,ic1)  = cell_vol(ic0,ifirst1)
+               end do
+            end do
+         else if (bdry_loc.eq.X1Y1) then
+           do ic1=ilast1+1,ilast1+ngc1     
+               do ic0=ilast0+1,ilast0+ngc0  
+                  cell_flag(ic0,ic1) = cell_flag(ic0,ilast1)
+                  cell_vol(ic0,ic1)  = cell_vol(ic0,ilast1)
+               end do
+            end do
+         endif
+   
+      endif
+
+c
+c    FLOW               - cell_tag(bdry) = -2
+c                         cell_vol(bdry) = 0. 
+c
+      if ((bdry_cond.eq.XFLOW).or.
+     &    (bdry_cond.eq.YFLOW)) then
+
+         if (bdry_loc.eq.X0Y0) then        
+            do ic1=ifirst1-ngc1,ifirst1-1     
+               do ic0=ifirst0-ngc0,ifirst0-1  
+                  cell_flag(ic0,ic1) = -2
+                  cell_vol(ic0,ic1)  = 0.
+               end do
+            end do
+         else if (bdry_loc.eq.X0Y1) then
+            do ic1=ilast1+1,ilast1+ngc1     
+               do ic0=ifirst0-ngc0,ifirst0-1       
+                  cell_flag(ic0,ic1) = -2
+                  cell_vol(ic0,ic1)  = 0.
+               end do
+            end do
+         else if (bdry_loc.eq.X1Y0) then
+            do ic1=ifirst1-ngc1,ifirst1-1     
+               do ic0=ilast0+1,ilast0+ngc0
+                  cell_flag(ic0,ic1) = -2
+                  cell_vol(ic0,ic1)  = 0.
+               end do
+            end do
+         else if (bdry_loc.eq.X1Y1) then
+            do ic1=ilast1+1,ilast1+ngc1     
+               do ic0=ilast0+1,ilast0+ngc0  
+                 cell_flag(ic0,ic1) = -2
+                  cell_vol(ic0,ic1)  = 0.
+               end do
+            end do
+         endif
+      endif
+  
+
+      return
+      end
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/fortran/appu_ebdry3d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/fortran/appu_ebdry3d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,112 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/appu/fortran/appu_ebdry3d.m4 $
+c  Package:     SAMRAI 
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Release:     
+c  Revision:    
+c  Modified:    
+c  Description:    F77 routines for setting embedded boundary conditions.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim3d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 3d arrays in FORTRAN routines.
+c
+c
+c***********************************************************************
+c Convert node inout values to cell flags.
+c***********************************************************************
+c
+      subroutine node2cellflag3d(
+     &  ifirst0,ifirst1,ifirst2,
+     &  ilast0,ilast1,ilast2,
+     &  ngc0,ngc1,ngc2,
+     &  cgc0,cgc1,cgc2,
+     &  node_flag,
+     &  cell_flag,
+     &  cell_vol)
+c***********************************************************************
+      implicit none
+c
+c File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/appu/fortran/ebparams.i $
+c Package:     SAMRAI application
+c Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c Revision:    $LastChangedRevision: 4081 $
+c Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c Description: Commonblock in embedded boundary test code.
+c
+
+      common/ebparams/SOLID_EB,CUT_EB,BORDER_EB,FLOW_EB,
+     &  OUTSIDE_EB,INSIDE_EB,BOUNDARY_EB,ONBOUNDARY_EB
+      integer
+     &  SOLID_EB,CUT_EB,BORDER_EB,FLOW_EB,
+     &  OUTSIDE_EB,INSIDE_EB,BOUNDARY_EB,ONBOUNDARY_EB
+c***********************************************************************
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,
+     &  ilast0,ilast1,ilast2,
+     &  ngc0,ngc1,ngc2,
+     &  cgc0,cgc1,cgc2
+      integer
+     &  node_flag(ifirst0-ngc0:ilast0+1+ngc0,
+     &          ifirst1-ngc1:ilast1+1+ngc1,
+     &          ifirst2-ngc2:ilast2+1+ngc2)
+      integer
+     &  cell_flag(ifirst0-cgc0:ilast0+cgc0,
+     &          ifirst1-cgc1:ilast1+cgc1,
+     &          ifirst2-cgc2:ilast2+cgc2)
+      double precision
+     &  cell_vol(ifirst0-cgc0:ilast0+cgc0,
+     &          ifirst1-cgc1:ilast1+cgc1,
+     &          ifirst2-cgc2:ilast2+cgc2)
+      integer ic0,ic1,ic2
+c
+c  The cell flag is equal to the sum of the node flags around it.
+c
+      do ic2 = ifirst2, ilast2
+         do ic1 = ifirst1, ilast1  
+            do ic0 = ifirst0, ilast0
+               cell_flag(ic0,ic1,ic2) = 
+     &            node_flag(ic0,ic1,ic2) + 
+     &            node_flag(ic0+1,ic1,ic2) +
+     &            node_flag(ic0,ic1+1,ic2) + 
+     &            node_flag(ic0+1,ic1+1,ic2) +
+     &            node_flag(ic0,ic1,ic2+1) + 
+     &            node_flag(ic0+1,ic1,ic2+1) +
+     &            node_flag(ic0,ic1+1,ic2+1) + 
+     &            node_flag(ic0+1,ic1+1,ic2+1) 
+            end do
+         end do
+      end do
+c
+c  If the cell flag is:
+c      flag = 0          - FLOW cell
+c      flag = 2^NDIM     - SOLID cell
+c      0 < flag < 2^NDIM - CUT cell
+c
+c  Set volume of cut cell to -1.0 to trip an error if we don't reset it.
+c
+      do ic2 = ifirst2, ilast2
+         do ic1 = ifirst1, ilast1  
+            do ic0 = ifirst0, ilast0
+               if (cell_flag(ic0,ic1,ic2).eq.0) then
+                  cell_flag(ic0,ic1,ic2) = FLOW_EB
+                  cell_vol(ic0,ic1,ic2) = 1.0
+               else if (cell_flag(ic0,ic1,ic2).eq.2**3) then
+                  cell_flag(ic0,ic1,ic2) = SOLID_EB
+                  cell_vol(ic0,ic1,ic2) = 0.0
+               else
+                  cell_flag(ic0,ic1,ic2) = CUT_EB
+                  cell_vol(ic0,ic1,ic2) = -1.0
+               endif
+            end do
+         end do
+      end do
+
+      return
+      end
+               
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/fortran/appu_ebdry3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/fortran/appu_ebdry3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,87 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/appu/fortran/appu_ebdry3d.m4 $
+c  Package:     SAMRAI 
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Release:     
+c  Revision:    
+c  Modified:    
+c  Description:    F77 routines for setting embedded boundary conditions.
+c
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+c
+c***********************************************************************
+c Convert node inout values to cell flags.
+c***********************************************************************
+c
+      subroutine node2cellflag3d(
+     &  ifirst0,ifirst1,ifirst2,
+     &  ilast0,ilast1,ilast2,
+     &  ngc0,ngc1,ngc2,
+     &  cgc0,cgc1,cgc2,
+     &  node_flag,
+     &  cell_flag,
+     &  cell_vol)
+c***********************************************************************
+      implicit none
+include(ebparams.i)dnl
+c***********************************************************************
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,
+     &  ilast0,ilast1,ilast2,
+     &  ngc0,ngc1,ngc2,
+     &  cgc0,cgc1,cgc2
+      integer
+     &  node_flag(NODE3dVECG(ifirst,ilast,ngc))
+      integer
+     &  cell_flag(CELL3dVECG(ifirst,ilast,cgc))
+      double precision
+     &  cell_vol(CELL3dVECG(ifirst,ilast,cgc))
+      integer ic0,ic1,ic2
+c
+c  The cell flag is equal to the sum of the node flags around it.
+c
+      do ic2 = ifirst2, ilast2
+         do ic1 = ifirst1, ilast1  
+            do ic0 = ifirst0, ilast0
+               cell_flag(ic0,ic1,ic2) = 
+     &            node_flag(ic0,ic1,ic2) + 
+     &            node_flag(ic0+1,ic1,ic2) +
+     &            node_flag(ic0,ic1+1,ic2) + 
+     &            node_flag(ic0+1,ic1+1,ic2) +
+     &            node_flag(ic0,ic1,ic2+1) + 
+     &            node_flag(ic0+1,ic1,ic2+1) +
+     &            node_flag(ic0,ic1+1,ic2+1) + 
+     &            node_flag(ic0+1,ic1+1,ic2+1) 
+            end do
+         end do
+      end do
+c
+c  If the cell flag is:
+c      flag = 0          - FLOW cell
+c      flag = 2^NDIM     - SOLID cell
+c      0 < flag < 2^NDIM - CUT cell
+c
+c  Set volume of cut cell to -1.0 to trip an error if we don't reset it.
+c
+      do ic2 = ifirst2, ilast2
+         do ic1 = ifirst1, ilast1  
+            do ic0 = ifirst0, ilast0
+               if (cell_flag(ic0,ic1,ic2).eq.0) then
+                  cell_flag(ic0,ic1,ic2) = FLOW_EB
+                  cell_vol(ic0,ic1,ic2) = 1.0
+               else if (cell_flag(ic0,ic1,ic2).eq.2**3) then
+                  cell_flag(ic0,ic1,ic2) = SOLID_EB
+                  cell_vol(ic0,ic1,ic2) = 0.0
+               else
+                  cell_flag(ic0,ic1,ic2) = CUT_EB
+                  cell_vol(ic0,ic1,ic2) = -1.0
+               endif
+            end do
+         end do
+      end do
+
+      return
+      end
+               
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/appu/fortran/ebparams.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/appu/fortran/ebparams.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,14 @@
+c
+c File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/appu/fortran/ebparams.i $
+c Package:     SAMRAI application
+c Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c Revision:    $LastChangedRevision: 4081 $
+c Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c Description: Commonblock in embedded boundary test code.
+c
+
+      common/ebparams/SOLID_EB,CUT_EB,BORDER_EB,FLOW_EB,
+     &  OUTSIDE_EB,INSIDE_EB,BOUNDARY_EB,ONBOUNDARY_EB
+      integer
+     &  SOLID_EB,CUT_EB,BORDER_EB,FLOW_EB,
+     &  OUTSIDE_EB,INSIDE_EB,BOUNDARY_EB,ONBOUNDARY_EB
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/BlockGridGeometry.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/BlockGridGeometry.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,495 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Simple Block grid geometry for an AMR hierarchy. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_BlockGridGeometry_C
+#define included_geom_BlockGridGeometry_C
+
+#include "SAMRAI/geom/BlockGridGeometry.h"
+
+// Time interpolation operators
+#include "SAMRAI/pdat/CellComplexLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/SideComplexLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/FaceComplexLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/NodeComplexLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/OuterfaceComplexLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/OutersideComplexLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/SideComplexLinearTimeInterpolateOp.h"
+
+#include "SAMRAI/pdat/CellFloatLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/SideFloatLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/FaceFloatLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/NodeFloatLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/OuterfaceFloatLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/OutersideFloatLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/SideFloatLinearTimeInterpolateOp.h"
+
+#include "SAMRAI/pdat/CellDoubleLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/SideDoubleLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/FaceDoubleLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/NodeDoubleLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/OuterfaceDoubleLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/OutersideDoubleLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/SideDoubleLinearTimeInterpolateOp.h"
+#include "SAMRAI/hier/BlockPatchGeometry.h"
+#include "SAMRAI/hier/BoundaryLookupTable.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <fstream>
+#include <cstdlib>
+
+#define GEOM_SKELETON_GRID_GEOMETRY_VERSION (2)
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/geom/BlockGridGeometry.I"
+#endif
+
+namespace SAMRAI {
+namespace geom {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructors for BlockGridGeometry.  Both set up operator     *
+ * handlers.  However, one initializes data members based on arguments.  *
+ * The other initializes the object based on input file information.     *
+ *                                                                       *
+ *************************************************************************
+ */
+BlockGridGeometry::BlockGridGeometry(
+   const tbox::Dimension& dim,
+   const std::string& object_name,
+   tbox::Pointer<tbox::Database> input_db,
+   const int block_number,
+   bool register_for_restart):
+   xfer::Geometry(dim, object_name)
+{
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!input_db.isNull());
+
+   d_object_name = object_name;
+   d_registered_for_restart = register_for_restart;
+
+   d_block_number = block_number;
+
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->
+      registerRestartItem(d_object_name, this);
+   }
+
+   makeStandardOperators();
+
+   bool is_from_restart = tbox::RestartManager::getManager()->isFromRestart();
+   if (is_from_restart && d_registered_for_restart) {
+      getFromRestart();
+   }
+
+   getFromInput(input_db, is_from_restart);
+
+}
+
+BlockGridGeometry::BlockGridGeometry(
+   const std::string& object_name,
+   const hier::BoxArray& domain,
+   const int block_number,
+   bool register_for_restart):
+   xfer::Geometry(domain.getDim(), object_name)
+{
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, domain);
+
+   d_object_name = object_name;
+   d_registered_for_restart = register_for_restart;
+
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->
+      registerRestartItem(d_object_name, this);
+   }
+
+   this->setPhysicalDomain(domain);
+
+   d_block_number = block_number;
+
+   makeStandardOperators();
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destructor for BlockGridGeometry deallocates grid storage.    *
+ * Note that operator handlers that are created in constructor are       *
+ * deallocated in xfer::Geometry destructor.                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+BlockGridGeometry::~BlockGridGeometry()
+{
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->unregisterRestartItem(d_object_name);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create and return pointer to refined version of this Cartesian        *
+ * grid geometry object refined by the given ratio.                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::GridGeometry>
+BlockGridGeometry::makeRefinedGridGeometry(
+   const std::string& fine_geom_name,
+   const hier::IntVector& refine_ratio,
+   bool register_for_restart) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   TBOX_ASSERT(!fine_geom_name.empty());
+   TBOX_ASSERT(fine_geom_name != d_object_name);
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, refine_ratio);
+   TBOX_ASSERT(refine_ratio > hier::IntVector::getZero(dim));
+
+   hier::BoxArray fine_domain(this->getPhysicalDomain());
+   fine_domain.refine(refine_ratio);
+
+   geom::BlockGridGeometry* fine_geometry =
+      new geom::BlockGridGeometry(fine_geom_name,
+         fine_domain,
+         register_for_restart);
+
+   fine_geometry->initializePeriodicShift(this->getPeriodicShift(hier::
+         IntVector::getOne(dim)));
+
+   return tbox::Pointer<hier::GridGeometry>(fine_geometry);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create and return pointer to coarsened version of this Cartesian      *
+ * grid geometry object coarsened by the given ratio.                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::GridGeometry>
+BlockGridGeometry::makeCoarsenedGridGeometry(
+   const std::string& coarse_geom_name,
+   const hier::IntVector& coarsen_ratio,
+   bool register_for_restart) const
+{
+
+   const tbox::Dimension& dim(getDim());
+
+   TBOX_ASSERT(!coarse_geom_name.empty());
+   TBOX_ASSERT(coarse_geom_name != d_object_name);
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, coarsen_ratio);
+   TBOX_ASSERT(coarsen_ratio > hier::IntVector::getZero(dim));
+
+   hier::BoxArray coarse_domain(this->getPhysicalDomain());
+   coarse_domain.coarsen(coarsen_ratio);
+
+   /*
+    * Need to check that domain can be coarsened by given ratio.
+    */
+   const hier::BoxArray& fine_domain = this->getPhysicalDomain();
+   const int nboxes = fine_domain.getNumberOfBoxes();
+   for (int ib = 0; ib < nboxes; ib++) {
+      hier::Box testbox = hier::Box::refine(coarse_domain[ib], coarsen_ratio);
+      if (testbox != fine_domain[ib]) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+         tbox::plog
+         << "BlockGridGeometry::makeCoarsenedGridGeometry : Box # "
+         << ib << std::endl;
+         tbox::plog << "      fine box = " << fine_domain[ib] << std::endl;
+         tbox::plog << "f      coarse box = " << coarse_domain[ib] << std::endl;
+         tbox::plog << "      refined coarse box = " << testbox << std::endl;
+#endif
+         TBOX_ERROR(
+            "geom::BlockGridGeometry::makeCoarsenedGridGeometry() error...\n"
+            << "    geometry object with name = " << d_object_name
+            << "\n    Cannot be coarsened by ratio " << coarsen_ratio
+            << std::endl);
+      }
+   }
+
+   geom::BlockGridGeometry* coarse_geometry =
+      new geom::BlockGridGeometry(coarse_geom_name,
+         coarse_domain,
+         register_for_restart);
+
+   coarse_geometry->initializePeriodicShift(this->getPeriodicShift(hier::
+         IntVector::getOne(dim)));
+
+   return tbox::Pointer<hier::GridGeometry>(coarse_geometry);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create default interlevel transfer operator handlers and time         *
+ * interpolation operator handlers.  Add them to appropriate chains.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BlockGridGeometry::makeStandardOperators()
+{
+   /*
+    * Standard linear time interpolation operators.
+    */
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::CellComplexLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::SideComplexLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::FaceComplexLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::NodeComplexLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::OuterfaceComplexLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::OutersideComplexLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::SideComplexLinearTimeInterpolateOp()));
+
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::CellFloatLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::SideFloatLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::FaceFloatLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::NodeFloatLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::OuterfaceFloatLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::OutersideFloatLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::SideFloatLinearTimeInterpolateOp()));
+
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::CellDoubleLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::SideDoubleLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::FaceDoubleLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::NodeDoubleLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::OuterfaceDoubleLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::OutersideDoubleLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::SideDoubleLinearTimeInterpolateOp()));
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create BlockPatchGeometry geometry object, initializing its   *
+ * boundary and assigning it to the given patch.                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BlockGridGeometry::setGeometryDataOnPatch(
+   hier::Patch& patch,
+   const hier::IntVector& ratio_to_level_zero,
+   const hier::PatchGeometry::TwoDimBool& touches_regular_bdry,
+   const hier::PatchGeometry::TwoDimBool& touches_periodic_bdry)
+const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   const tbox::Dimension& dim(getDim());
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, patch, ratio_to_level_zero,
+      touches_regular_bdry, touches_periodic_bdry);
+
+   /*
+    * All components of ratio must be nonzero.  Additionally,
+    * all components not equal to 1 must have the same sign.
+    */
+   int i;
+   for (i = 0; i < dim.getValue(); i++) {
+      TBOX_ASSERT(ratio_to_level_zero(i) != 0);
+   }
+   if (dim > tbox::Dimension(1)) {
+      for (i = 0; i < dim.getValue(); i++) {
+         TBOX_ASSERT((ratio_to_level_zero(i)
+                      * ratio_to_level_zero((i + 1) % dim.getValue()) > 0)
+            || (ratio_to_level_zero(i) == 1)
+            || (ratio_to_level_zero((i + 1) % dim.getValue()) == 1));
+      }
+   }
+#endif
+
+   tbox::Pointer<hier::BlockPatchGeometry>
+   geometry(new hier::BlockPatchGeometry(ratio_to_level_zero,
+               d_block_number,
+               touches_regular_bdry,
+               touches_periodic_bdry));
+
+   patch.setPatchGeometry(geometry);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Writes out version number and data members for the class.		*
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BlockGridGeometry::putToDatabase(
+   tbox::Pointer<tbox::Database> db)
+{
+   TBOX_ASSERT(!db.isNull());
+
+   const tbox::Dimension dim(getDim());
+
+   db->putInteger("GEOM_SKELETON_GRID_GEOMETRY_VERSION",
+      GEOM_SKELETON_GRID_GEOMETRY_VERSION);
+   tbox::Array<tbox::DatabaseBox> temp_box_array = this->getPhysicalDomain();
+   db->putDatabaseBoxArray("d_physical_domain", temp_box_array);
+
+   hier::IntVector level0_shift(this->getPeriodicShift(hier::IntVector::getOne(dim)));
+   int* temp_shift = &level0_shift[0];
+   db->putIntegerArray("d_periodic_shift", temp_shift, dim.getValue());
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Data is read from input only if the simulation is not from restart.   *
+ * Otherwise, all values specifed in the input database are ignored.	*
+ * In this method data from the database are read to local              *
+ * variables and the setPhysicalDomain() method is called.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BlockGridGeometry::getFromInput(
+   tbox::Pointer<tbox::Database> db,
+   bool is_from_restart)
+{
+
+   TBOX_ASSERT(!db.isNull());
+
+   const tbox::Dimension dim(getDim());
+
+   if (!is_from_restart) {
+
+      hier::BoxArray domain(dim);
+      if (db->keyExists("domain_boxes")) {
+         domain = db->getDatabaseBoxArray("domain_boxes");
+         if (domain.getNumberOfBoxes() == 0) {
+            TBOX_ERROR(
+               d_object_name << ":  "
+               <<
+               "Block `domain_boxes' array found in input.");
+         }
+      } else {
+         TBOX_ERROR(
+            d_object_name << ":  "
+            <<
+            "Key data `domain_boxes' not found in input.");
+      }
+
+      int pbc[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      hier::IntVector per_bc(dim, 0);
+      if (db->keyExists("periodic_dimension")) {
+         db->getIntegerArray("periodic_dimension", pbc, dim.getValue());
+         for (int i = 0; i < dim.getValue(); i++) {
+            per_bc(i) = ((pbc[i] == 0) ? 0 : 1);
+         }
+      }
+
+      this->setPhysicalDomain(domain);
+
+      this->initializePeriodicShift(per_bc);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Checks to see if the version number for the class is the same as	*
+ * as the version number of the restart file.				*
+ * If they are equal, then the data from the database are read to local	*
+ * variables and the setPhysicalDomain() method is called.              *
+ *                                                                       *
+ *************************************************************************
+ */
+void BlockGridGeometry::getFromRestart()
+{
+   const tbox::Dimension dim(getDim());
+
+   tbox::Pointer<tbox::Database> restart_db =
+      tbox::RestartManager::getManager()->getRootDatabase();
+
+   tbox::Pointer<tbox::Database> db;
+
+   if (restart_db->isDatabase(d_object_name)) {
+      db = restart_db->getDatabase(d_object_name);
+   } else {
+      TBOX_ERROR("Restart database corresponding to "
+         << d_object_name << " not found in the restart file.");
+   }
+
+   int ver = db->getInteger("GEOM_SKELETON_GRID_GEOMETRY_VERSION");
+   if (ver != GEOM_SKELETON_GRID_GEOMETRY_VERSION) {
+      TBOX_ERROR(
+         d_object_name << ":  "
+         <<
+         "Restart file version is different than class version.");
+   }
+   hier::BoxArray domain(dim, db->getDatabaseBoxArray("d_physical_domain"));
+
+   this->setPhysicalDomain(domain);
+
+   hier::IntVector periodic_shift(dim);
+   int* temp_shift = &periodic_shift[0];
+   db->getIntegerArray("d_periodic_shift", temp_shift, dim.getValue());
+   this->initializePeriodicShift(periodic_shift);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print BlockGridGeometry class data.                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BlockGridGeometry::printClassData(
+   std::ostream& os) const
+{
+   os << "Printing BlockGridGeometry data: this = "
+      << (BlockGridGeometry *)this << std::endl;
+
+   xfer::Geometry::printClassData(os);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/BlockGridGeometry.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/BlockGridGeometry.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,21 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Block grid geometry for use in AMR multiblock hierarchy. 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace geom {
+
+SAMRAI_INLINE_KEYWORD
+int BlockGridGeometry::getBlockNumber() const
+{
+   return d_block_number;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/BlockGridGeometry.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/BlockGridGeometry.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,274 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Block grid geometry for an AMR hierarchy. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_BlockGridGeometry
+#define included_geom_BlockGridGeometry
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/Serializable.h"
+#include "SAMRAI/xfer/Geometry.h"
+
+namespace SAMRAI {
+namespace geom {
+
+/*!
+ * @brief Grid geometry class for a block within a multiblock configuration.
+ *
+ * BlockGridGeometry is a concrete grid geometry class that is intended for
+ * use with problems that have multiblock mesh configurations.  One instance of
+ * this object is intended to manage geometry information for one block within
+ * a multiblock configuration.  This class contains no information about the
+ * physical domain characteristics of the mesh apart from the index space.
+ * It is expected that the physical characteristics, such as node locations,
+ * will be managed within application code.  This class sets geometry
+ * information on each patch in an AMR hierarchy.  This class is derived
+ * from the xfer::Geometry base class which is further derived from
+ * the hier::GridGeometry base class.
+ *
+ * Required input file keys and data types (for first constructor which
+ * takes an input database):
+ *
+ *
+ *    - @b    domain_boxes
+ *       An array of boxes representing the index space for the entire
+ *       domain within a block (on the coarsest mesh level; i.e., level zero).
+ *
+ * Optional input file keys and data types (for first constructor which
+ * takes an input database):
+ *
+ *    - @b    periodic_dimension
+ *       An array of integer values (expected number of values is equal to 
+ *       the spatial dimension of the mesh) representing the directions in 
+ *       which the physical domain is periodic.  A non-zero value indicates
+ *       that the direction is periodic.  A zero value indicates that
+ *       the direction is not periodic.  If no values are specified, then
+ *       the array is initialized to all zeros (no periodic directions).
+ *       If BlockGridGeometry is being used as part of a nontrivial (2 or
+ *       more blocks) multiblock problem, this key should not be used, as
+ *       periodic boundaries are not supported for multiblock meshes.
+ *
+ * @see hier::GridGeometry
+ * @see xfer::Geometry
+ * @see hier::BlockPatchGeometry
+ * @see hier::MultiblockGridGeometry
+ */
+
+class BlockGridGeometry:
+   public xfer::Geometry,
+   public tbox::Serializable
+{
+public:
+   /*!
+    * @brief Construct a BlockGridGeometry object with a consistent state.
+    *
+    * Constructor for BlockGridGeometry initializes data
+    * members based on parameters read from the specified input
+    * database.  The constructor also registers this object
+    * for restart using the specified object name, when the boolean
+    * argument is true.  Whether object will write its state to restart
+    * files during program execution is determined by this argument.
+    *
+    * @note
+    * @b Errors: passing in a null database pointer or an empty string
+    * will result in an unrecoverable assertion.
+    *
+    * @param[in]  dim
+    * @param[in]  object_name
+    * @param[in]  input_db
+    * @param[in]  block_number
+    * @param[in]  register_for_restart Flag indicating whether this instance
+    *             should be registered for restart.  @b Default: true
+    */
+   explicit BlockGridGeometry(
+      const tbox::Dimension& dim,
+      const std::string& object_name,
+      tbox::Pointer<tbox::Database> input_db,
+      const int block_number,
+      bool register_for_restart = true);
+
+   /*!
+    * @brief Construct a BlockGridGeometry object with a consistent state.
+    *
+    * Constructor for BlockGridGeometry sets index space domain
+    * based on arguments. The constructor also registers this object
+    * for restart using the specified object name, when the boolean
+    * argument is true.  Whether object will write its state to restart
+    * files during program execution is determined by this argument.
+    *
+    * @note
+    * @b Errors: passing in an empty string will result in an unrecoverable 
+    * assertion.
+    *
+    * @param[in]  object_name
+    * @param[in]  level_domain The index space domain.
+    * @param[in]  block_number
+    * @param[in]  register_for_restart Flag indicating whether this instance
+    *             should be registered for restart.  @b Default: true
+    */
+   explicit BlockGridGeometry(
+      const std::string& object_name,
+      const hier::BoxArray& level_domain,
+      const int block_number,
+      bool register_for_restart = true);
+
+   /*!
+    * @brief Destructor for BlockGridGeometry unregisters the object
+    * with the restart manager if previously registered.
+    */
+   virtual ~BlockGridGeometry();
+
+   /*!
+    * @brief Create and return a pointer to a refined version of this
+    * BlockGridGeometry object.
+    *
+    * @param[in]  fine_geom_name
+    * @param[in]  refine_ratio
+    * @param[in]  register_for_restart
+    *
+    * @return The tbox::Pointer to the refined grid geometry.
+    */
+   tbox::Pointer<hier::GridGeometry>
+   makeRefinedGridGeometry(
+      const std::string& fine_geom_name,
+      const hier::IntVector& refine_ratio,
+      bool register_for_restart) const;
+
+   /*!
+    * @brief Create and return a pointer to a coarsened version of this
+    * BlockGridGeometry object.
+    *
+    * @param[in]  coarse_geom_name
+    * @param[in]  coarsen_ratio
+    * @param[in]  register_for_restart
+    *
+    * @return The tbox::Pointer to the coarsened grid geometry.
+    */
+   tbox::Pointer<hier::GridGeometry>
+   makeCoarsenedGridGeometry(
+      const std::string& coarse_geom_name,
+      const hier::IntVector& coarsen_ratio,
+      bool register_for_restart) const;
+
+   /*!
+    * @brief Construct new BlockPatchGeometry object for a patch.
+    *
+    * The given arguments are used to construct a new BlockPatchGeometry
+    * object, which is then given to the patch.  This method is usually
+    * called by the parent class GridGeometry, which has precomputed the
+    * values of the input arguments.
+    *
+    * @param[in,out]    patch The Patch for which grid data is computed and
+    *                   to which the new BlockPatchGeometry gets assigned
+    * @param[in]        ratio_to_level_zero ratio to the coarsest level
+    * @param[in]        touches_regular_bdry Array telling whether the patch
+    *                   touches a non-periodic boundary.
+    * @param[in]        touches_periodic_bdry Array telling whether the patch
+    *                   touches a periodic boundary.
+    */
+   virtual void
+   setGeometryDataOnPatch(
+      hier::Patch& patch,
+      const hier::IntVector& ratio_to_level_zero,
+      const hier::PatchGeometry::TwoDimBool& touches_regular_bdry,
+      const hier::PatchGeometry::TwoDimBool& touches_periodic_bdry) const;
+
+   /*!
+    * @brief Get the block number where this BlockGridGeometry exists.
+    *
+    * @return The block number where this BlockGridGeometry exists.
+    */
+   int
+   getBlockNumber() const;
+
+   /*!
+    * @brief Print class data representation.
+    *
+    * @param[in]     os The std::ostream to which to print
+    */
+   virtual void
+   printClassData(
+      std::ostream& os) const;
+
+   /*!
+    * @brief Writes the state of the BlockGridGeometry object to the database.
+    *
+    * When assertion checking is active, db cannot be a null database pointer.
+    *
+    * @param[in,out]    db The database to write to write/serialize.
+    */
+   virtual void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> db);
+
+private:
+   /*!
+    * @brief Reads in physical domain (from hier::GridGeometry superclass),
+    * from the specified input database.
+    *
+    * If the simulation is from restart, these values are taken from restart 
+    * and newly specified values in the input database are ignored.
+    * 
+    * @param[in] db  input database, must not be NULL pointer
+    * @param[in] is_from_restart  set to true if simulation is from restart 
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db,
+      bool is_from_restart);
+
+   /*! 
+    * @brief Read object state from the restart file and initialize class data
+    * members.
+    *
+    * The database from which the restart data is read is
+    * determined by the object_name specified in the constructor.
+    *
+    * Unrecoverable Errors:
+    *
+    *    -The database corresponding to object_name is not found
+    *     in the restart file.
+    *
+    *    -The class version number and restart version number do not
+    *     match.
+    */
+   void
+   getFromRestart();
+
+   /*! 
+    * @brief Create time interpolation operators for Block grid geometry.
+    */
+   void
+   makeStandardOperators();
+
+   /*
+    * String name for object used in error reporting and restart operations.
+    * Boolean is set in constructor and determines whether object should
+    * dump its state to restart files during program execution.
+    */
+   std::string d_object_name;
+
+   /*
+    * Flag to determine whether this instance is registered for restart.
+    */
+   bool d_registered_for_restart;
+
+   /*
+    * The block number where this geometry exists
+    */
+   int d_block_number;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/geom/BlockGridGeometry.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianCellComplexConservativeLinearRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianCellComplexConservativeLinearRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,254 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Conservative linear refine operator for cell-centered
+ *                omplex data on a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianCellComplexConservativeLinearRefine_C
+#define included_geom_CartesianCellComplexConservativeLinearRefine_C
+
+#include "SAMRAI/geom/CartesianCellComplexConservativeLinearRefine.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <cfloat>
+#include <cmath>
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartrefine1d.f:
+void F77_FUNC(cartclinrefcellcplx1d, CARTCLINREFCELLCPLX1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *,
+   dcomplex *, dcomplex *);
+// in cartrefine2d.f:
+void F77_FUNC(cartclinrefcellcplx2d, CARTCLINREFCELLCPLX2D) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *,
+   dcomplex *, dcomplex *, dcomplex *, dcomplex *);
+void F77_FUNC(cartclinrefcellcplx3d, CARTCLINREFCELLCPLX3D) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *,
+   dcomplex *, dcomplex *, dcomplex *,
+   dcomplex *, dcomplex *, dcomplex *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianCellComplexConservativeLinearRefine::
+CartesianCellComplexConservativeLinearRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSERVATIVE_LINEAR_REFINE")
+{
+   d_name_id = "CONSERVATIVE_LINEAR_REFINE";
+}
+
+CartesianCellComplexConservativeLinearRefine::~
+CartesianCellComplexConservativeLinearRefine()
+{
+}
+
+bool CartesianCellComplexConservativeLinearRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::CellVariable<dcomplex> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianCellComplexConservativeLinearRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int
+CartesianCellComplexConservativeLinearRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianCellComplexConservativeLinearRefine::getStencilWidth() const {
+   return hier::IntVector::getOne(getDim());
+}
+
+void CartesianCellComplexConservativeLinearRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const pdat::CellOverlap* t_overlap =
+      dynamic_cast<const pdat::CellOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::BoxList& boxes = t_overlap->getDestinationBoxList();
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      refine(fine,
+         coarse,
+         dst_component,
+         src_component,
+         b(),
+         ratio);
+   }
+}
+
+void CartesianCellComplexConservativeLinearRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, fine, coarse, fine_box, ratio);
+
+   tbox::Pointer<pdat::CellData<dcomplex> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<pdat::CellData<dcomplex> >
+   fdata = fine.getPatchData(dst_component);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+#endif
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+
+   const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+   const hier::Index ifirstf = fine_box.lower();
+   const hier::Index ilastf = fine_box.upper();
+
+   const hier::IntVector tmp_ghosts(dim, 0);
+   tbox::Array<dcomplex> diff0(cgbox.numberCells(0) + 1);
+   pdat::CellData<dcomplex> slope0(cgbox, 1, tmp_ghosts);
+
+   for (int d = 0; d < fdata->getDepth(); d++) {
+      if ((dim == tbox::Dimension(1))) {
+         F77_FUNC(cartclinrefcellcplx1d, CARTCLINREFCELLCPLX1D) (ifirstc(0),
+            ilastc(0),
+            ifirstf(0), ilastf(0),
+            cilo(0), cihi(0),
+            filo(0), fihi(0),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d),
+            diff0.getPointer(), slope0.getPointer());
+      } else if ((dim == tbox::Dimension(2))) {
+         tbox::Array<dcomplex> diff1(cgbox.numberCells(1) + 1);
+         pdat::CellData<dcomplex> slope1(cgbox, 1, tmp_ghosts);
+
+         F77_FUNC(cartclinrefcellcplx2d, CARTCLINREFCELLCPLX2D) (ifirstc(0),
+            ifirstc(1), ilastc(0), ilastc(1),
+            ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d),
+            diff0.getPointer(), slope0.getPointer(),
+            diff1.getPointer(), slope1.getPointer());
+      } else if ((dim == tbox::Dimension(3))) {
+         tbox::Array<dcomplex> diff1(cgbox.numberCells(1) + 1);
+         pdat::CellData<dcomplex> slope1(cgbox, 1, tmp_ghosts);
+
+         tbox::Array<dcomplex> diff2(cgbox.numberCells(2) + 1);
+         pdat::CellData<dcomplex> slope2(cgbox, 1, tmp_ghosts);
+
+         F77_FUNC(cartclinrefcellcplx3d, CARTCLINREFCELLCPLX3D) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            ifirstf(0), ifirstf(1), ifirstf(2),
+            ilastf(0), ilastf(1), ilastf(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d),
+            diff0.getPointer(), slope0.getPointer(),
+            diff1.getPointer(), slope1.getPointer(),
+            diff2.getPointer(), slope2.getPointer());
+      } else {
+         TBOX_ERROR("CartesianCellComplexConservativeLinearRefine error...\n"
+            << "dim > 3 not supported." << std::endl);
+      }
+   }
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianCellComplexConservativeLinearRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianCellComplexConservativeLinearRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,132 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Conservative linear refine operator for cell-centered
+ *                omplex data on a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianCellComplexConservativeLinearRefine
+#define included_geom_CartesianCellComplexConservativeLinearRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianCellComplexConservativeLinearRefine implements
+ * conservative linear interpolation for cell-centered complex patch data
+ * defined over a Cartesian mesh.  In particular, the interpolation is
+ * implemented by applying the standard conservative linear interpolation
+ * to each of the real and imaginary parts of the complex data array
+ * independently.  This operator is derived from the base class
+ * xfer::RefineOperator.  The numerical operations for the interpolation
+ * use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is cell-centered complex, and the std::string is
+ * "CONSERVATIVE_LINEAR_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class CartesianCellComplexConservativeLinearRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianCellComplexConservativeLinearRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianCellComplexConservativeLinearRefine();
+
+   /**
+    * Return true if the variable and name std::string match cell-centered
+    * complex conservative linear interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of cell-centered complex conservative linear is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the conservative linear interpolation operator is
+    * the vector of ones.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the cell-centered complex conservative
+    * linear interpolation operator.  Interpolation is performed on the
+    * intersection of the destination patch and the boxes contained in
+    * fine_overlap.  It is assumed that the coarse patch contains sufficient
+    * data for the stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the cell-centered complex conservative
+    * linear interpolation operator.  Interpolation is performed on the
+    * intersection of the destination patch and the fine box.  It is assumed
+    * that the coarse patch contains sufficient data for the stencil width of
+    * the refinement operator.  This differs from the above refine() method
+    * only in that it operates on a single fine box instead of a BoxOverlap.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianCellComplexLinearRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianCellComplexLinearRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,227 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear refine operator for cell-centered complex data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianCellComplexLinearRefine_C
+#define included_geom_CartesianCellComplexLinearRefine_C
+
+#include "SAMRAI/geom/CartesianCellComplexLinearRefine.h"
+#include "SAMRAI/tbox/Complex.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartrefine1d.f:
+void F77_FUNC(cartlinrefcellcplx1d, CARTLINREFCELLCPLX1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+// in cartrefine2d.f:
+void F77_FUNC(cartlinrefcellcplx2d, CARTLINREFCELLCPLX2D) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+// in cartrefine3d.f:
+void F77_FUNC(cartlinrefcellcplx3d, CARTLINREFCELLCPLX3D) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianCellComplexLinearRefine::CartesianCellComplexLinearRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "LINEAR_REFINE")
+{
+   d_name_id = "LINEAR_REFINE";
+}
+
+CartesianCellComplexLinearRefine::~CartesianCellComplexLinearRefine()
+{
+}
+
+bool CartesianCellComplexLinearRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::CellVariable<dcomplex> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianCellComplexLinearRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int CartesianCellComplexLinearRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianCellComplexLinearRefine::getStencilWidth() const {
+   return hier::IntVector::getOne(getDim());
+}
+
+void CartesianCellComplexLinearRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const pdat::CellOverlap* t_overlap =
+      dynamic_cast<const pdat::CellOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::BoxList& boxes = t_overlap->getDestinationBoxList();
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      refine(fine,
+         coarse,
+         dst_component,
+         src_component,
+         b(),
+         ratio);
+   }
+}
+
+void CartesianCellComplexLinearRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, fine, coarse, fine_box, ratio);
+
+   tbox::Pointer<pdat::CellData<dcomplex> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<pdat::CellData<dcomplex> >
+   fdata = fine.getPatchData(dst_component);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+
+   const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+   const hier::Index ifirstf = fine_box.lower();
+   const hier::Index ilastf = fine_box.upper();
+
+   for (int d = 0; d < fdata->getDepth(); d++) {
+      if ((dim == tbox::Dimension(1))) {
+         F77_FUNC(cartlinrefcellcplx1d, CARTLINREFCELLCPLX1D) (ifirstc(0),
+            ilastc(0),
+            ifirstf(0), ilastf(0),
+            cilo(0), cihi(0),
+            filo(0), fihi(0),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else if ((dim == tbox::Dimension(2))) {
+         F77_FUNC(cartlinrefcellcplx2d, CARTLINREFCELLCPLX2D) (ifirstc(0),
+            ifirstc(1), ilastc(0), ilastc(1),
+            ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else if ((dim == tbox::Dimension(3))) {
+         F77_FUNC(cartlinrefcellcplx3d, CARTLINREFCELLCPLX3D) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            ifirstf(0), ifirstf(1), ifirstf(2),
+            ilastf(0), ilastf(1), ilastf(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else {
+         TBOX_ERROR("CartesianCellComplexLinearLinearRefine error...\n"
+            << "dim > 3 not supported." << std::endl);
+      }
+
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianCellComplexLinearRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianCellComplexLinearRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,126 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear refine operator for cell-centered complex data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianCellComplexLinearRefine
+#define included_geom_CartesianCellComplexLinearRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianCellComplexLinearRefine implements linear
+ * interpolation for cell-centered complex patch data defined over a Cartesian
+ * mesh.  It is derived from the xfer::RefineOperator base class.
+ * The numerical operations for interpolation use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is cell-centered complex, and the std::string is "LINEAR_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class CartesianCellComplexLinearRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianCellComplexLinearRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianCellComplexLinearRefine();
+
+   /**
+    * Return true if the variable and name std::string match cell-centered
+    * complex linear interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of cell-centered complex linear interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the linear interpolation operator is the vector
+    * of ones.  That is, its stencil extends one cell outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the cell-centered complex linear
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the boxes contained in fine_overlap
+    * It is assumed that the coarse patch contains sufficient data for the
+    * stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the cell-centered complex linear
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the fine box.   It is assumed that the
+    * coarse patch contains sufficient data for the stencil width of the
+    * refinement operator.  This differs from the above refine() method
+    * only in that it operates on a single fine box instead of a BoxOverlap.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianCellComplexWeightedAverage.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianCellComplexWeightedAverage.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,190 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for cell-centered complex data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianCellComplexWeightedAverage_C
+#define included_geom_CartesianCellComplexWeightedAverage_C
+
+#include "SAMRAI/geom/CartesianCellComplexWeightedAverage.h"
+#include "SAMRAI/tbox/Complex.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartcoarsen1d.f:
+void F77_FUNC(cartwgtavgcellcplx1d, CARTWGTAVGCELLCPLX1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+// in cartcoarsen2d.f:
+void F77_FUNC(cartwgtavgcellcplx2d, CARTWGTAVGCELLCPLX2D) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+// in cartcoarsen3d.f:
+void F77_FUNC(cartwgtavgcellcplx3d, CARTWGTAVGCELLCPLX3D) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianCellComplexWeightedAverage::CartesianCellComplexWeightedAverage(
+   const tbox::Dimension& dim):
+   xfer::CoarsenOperator(dim, "CONSERVATIVE_COARSEN")
+{
+   d_name_id = "CONSERVATIVE_COARSEN";
+}
+
+CartesianCellComplexWeightedAverage::~CartesianCellComplexWeightedAverage()
+{
+}
+
+bool CartesianCellComplexWeightedAverage::findCoarsenOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::CellVariable<dcomplex> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianCellComplexWeightedAverage::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int CartesianCellComplexWeightedAverage::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianCellComplexWeightedAverage::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void CartesianCellComplexWeightedAverage::coarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, coarse, fine, coarse_box, ratio);
+
+   tbox::Pointer<pdat::CellData<dcomplex> >
+   fdata = fine.getPatchData(src_component);
+   tbox::Pointer<pdat::CellData<dcomplex> >
+   cdata = coarse.getPatchData(dst_component);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+#endif
+
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+   const hier::Index cilo = cdata->getGhostBox().lower();
+   const hier::Index cihi = cdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+
+   for (int d = 0; d < cdata->getDepth(); d++) {
+      if ((dim == tbox::Dimension(1))) {
+         F77_FUNC(cartwgtavgcellcplx1d, CARTWGTAVGCELLCPLX1D) (ifirstc(0),
+            ilastc(0),
+            filo(0), fihi(0),
+            cilo(0), cihi(0),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(d),
+            cdata->getPointer(d));
+      }
+      if ((dim == tbox::Dimension(2))) {
+         F77_FUNC(cartwgtavgcellcplx2d, CARTWGTAVGCELLCPLX2D) (ifirstc(0),
+            ifirstc(1), ilastc(0), ilastc(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(d),
+            cdata->getPointer(d));
+      }
+      if ((dim == tbox::Dimension(3))) {
+         F77_FUNC(cartwgtavgcellcplx3d, CARTWGTAVGCELLCPLX3D) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(d),
+            cdata->getPointer(d));
+      } else {
+         TBOX_ERROR("CartesianEdgeComplexWeightedAverage error...\n"
+            << "dim > 3 not supported." << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianCellComplexWeightedAverage.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianCellComplexWeightedAverage.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for cell-centered complex data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianCellComplexWeightedAverage
+#define included_geom_CartesianCellComplexWeightedAverage
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianCellComplexWeightedAverage implements conservative
+ * cell-weighted averaging for cell-centered complex patch data defined over a
+ * Cartesian mesh.  It is derived from the xfer::CoarsenOperator base class.
+ * The numerical operations for the averaging use FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is cell-centered complex, and the std::string is "CONSERVATIVE_COARSEN".
+ *
+ * @see xfer::CoarsenOperator
+ */
+
+class CartesianCellComplexWeightedAverage:
+   public xfer::CoarsenOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianCellComplexWeightedAverage(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianCellComplexWeightedAverage();
+
+   /**
+    * Return true if the variable and name std::string match cell-centered
+    * complex weighted averaging; otherwise, return false.
+    */
+   bool
+   findCoarsenOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this coarsening operation.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of cell-centered complex weighted averaging is 0.
+    * It will be performed before any user-defined coarsen operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the weighted averaging operator is the vector of
+    * zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Coarsen the source component on the fine patch to the destination
+    * component on the coarse patch using the cell-centered complex weighted
+    * averaging operator.  Coarsening is performed on the intersection of
+    * the destination patch and the coarse box.  It is assumed that the
+    * fine patch contains sufficient data for the stencil width of the
+    * coarsening operator.
+    */
+   void
+   coarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianCellDoubleConservativeLinearRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianCellDoubleConservativeLinearRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,271 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Conservative linear refine operator for cell-centered
+ *                double data on a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianCellDoubleConservativeLinearRefine_C
+#define included_geom_CartesianCellDoubleConservativeLinearRefine_C
+
+#include "SAMRAI/geom/CartesianCellDoubleConservativeLinearRefine.h"
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartrefine1d.f:
+void F77_FUNC(cartclinrefcelldoub1d, CARTCLINREFCELLDOUB1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *,
+   double *, double *);
+// in cartrefine2d.f:
+void F77_FUNC(cartclinrefcelldoub2d, CARTCLINREFCELLDOUB2D) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *,
+   double *, double *, double *, double *);
+// in cartrefine3d.f:
+void F77_FUNC(cartclinrefcelldoub3d, CARTCLINREFCELLDOUB3D) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *,
+   double *, double *, double *,
+   double *, double *, double *);
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianCellDoubleConservativeLinearRefine::
+CartesianCellDoubleConservativeLinearRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSERVATIVE_LINEAR_REFINE")
+{
+   d_name_id = "CONSERVATIVE_LINEAR_REFINE";
+}
+
+CartesianCellDoubleConservativeLinearRefine::~
+CartesianCellDoubleConservativeLinearRefine()
+{
+}
+
+bool CartesianCellDoubleConservativeLinearRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::CellVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianCellDoubleConservativeLinearRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int
+CartesianCellDoubleConservativeLinearRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianCellDoubleConservativeLinearRefine::getStencilWidth() const {
+   return hier::IntVector::getOne(getDim());
+}
+
+void CartesianCellDoubleConservativeLinearRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const pdat::CellOverlap* t_overlap =
+      dynamic_cast<const pdat::CellOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::BoxList& boxes = t_overlap->getDestinationBoxList();
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      refine(fine,
+         coarse,
+         dst_component,
+         src_component,
+         b(),
+         ratio);
+   }
+}
+
+void CartesianCellDoubleConservativeLinearRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, fine, coarse, fine_box, ratio);
+
+   tbox::Pointer<pdat::CellData<double> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<pdat::CellData<double> >
+   fdata = fine.getPatchData(dst_component);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+#endif
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+
+   const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+   const hier::Index ifirstf = fine_box.lower();
+   const hier::Index ilastf = fine_box.upper();
+
+   const hier::IntVector tmp_ghosts(dim, 0);
+   tbox::Array<double> diff0(cgbox.numberCells(0) + 1);
+   pdat::CellData<double> slope0(cgbox, 1, tmp_ghosts);
+
+   for (int d = 0; d < fdata->getDepth(); d++) {
+      if ((dim == tbox::Dimension(1))) {
+         F77_FUNC(cartclinrefcelldoub1d, CARTCLINREFCELLDOUB1D) (ifirstc(0),
+            ilastc(0),
+            ifirstf(0), ilastf(0),
+            cilo(0), cihi(0),
+            filo(0), fihi(0),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d),
+            diff0.getPointer(), slope0.getPointer());
+      } else if ((dim == tbox::Dimension(2))) {
+
+         tbox::Array<double> diff1(cgbox.numberCells(1) + 1);
+         pdat::CellData<double> slope1(cgbox, 1, tmp_ghosts);
+
+         F77_FUNC(cartclinrefcelldoub2d, CARTCLINREFCELLDOUB2D) (ifirstc(0),
+            ifirstc(1), ilastc(0), ilastc(1),
+            ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d),
+            diff0.getPointer(), slope0.getPointer(),
+            diff1.getPointer(), slope1.getPointer());
+      } else if ((dim == tbox::Dimension(3))) {
+
+         tbox::Array<double> diff1(cgbox.numberCells(1) + 1);
+         pdat::CellData<double> slope1(cgbox, 1, tmp_ghosts);
+
+         tbox::Array<double> diff2(cgbox.numberCells(2) + 1);
+         pdat::CellData<double> slope2(cgbox, 1, tmp_ghosts);
+
+         F77_FUNC(cartclinrefcelldoub3d, CARTCLINREFCELLDOUB3D) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            ifirstf(0), ifirstf(1), ifirstf(2),
+            ilastf(0), ilastf(1), ilastf(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d),
+            diff0.getPointer(), slope0.getPointer(),
+            diff1.getPointer(), slope1.getPointer(),
+            diff2.getPointer(), slope2.getPointer());
+      } else {
+         TBOX_ERROR("CartesianCellDoubleConservativeLinearRefine error...\n"
+            << "dim > 3 not supported." << std::endl);
+
+      }
+   }
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianCellDoubleConservativeLinearRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianCellDoubleConservativeLinearRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,128 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Conservative linear refine operator for cell-centered
+ *                double data on a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianCellDoubleConservativeLinearRefine
+#define included_geom_CartesianCellDoubleConservativeLinearRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianCellDoubleConservativeLinearRefine implements
+ * conservative linear interpolation for cell-centered double patch data
+ * defined over a Cartesian mesh.  It is derived from the base class
+ * xfer::RefineOperator.  The numerical operations for the interpolation
+ * use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is cell-centered double, and the std::string is
+ * "CONSERVATIVE_LINEAR_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class CartesianCellDoubleConservativeLinearRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianCellDoubleConservativeLinearRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianCellDoubleConservativeLinearRefine();
+
+   /**
+    * Return true if the variable and name std::string match cell-centered
+    * double conservative linear interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of cell-centered double conservative linear is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the conservative linear interpolation operator is
+    * the vector of ones.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the cell-centered double conservative
+    * linear interpolation operator.  Interpolation is performed on the
+    * intersection of the destination patch and the boxes contained in
+    * fine_overlap.  It is assumed that the coarse patch contains sufficient
+    * data for the stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the cell-centered double conservative
+    * linear interpolation operator.  Interpolation is performed on the
+    * intersection of the destination patch and the fine box.  It is assumed
+    * that the coarse patch contains sufficient data for the stencil width of
+    * the refinement operator.  This differs from the above refine() method
+    * only in that it operates on a single fine box instead of a BoxOverlap.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianCellDoubleLinearRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianCellDoubleLinearRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,225 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear refine operator for cell-centered double data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianCellDoubleLinearRefine_C
+#define included_geom_CartesianCellDoubleLinearRefine_C
+
+#include "SAMRAI/geom/CartesianCellDoubleLinearRefine.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartrefine1d.f:
+void F77_FUNC(cartlinrefcelldoub1d, CARTLINREFCELLDOUB1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+// in cartrefine2d.f:
+void F77_FUNC(cartlinrefcelldoub2d, CARTLINREFCELLDOUB2D) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+// in cartrefine3d.f:
+void F77_FUNC(cartlinrefcelldoub3d, CARTLINREFCELLDOUB3D) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianCellDoubleLinearRefine::CartesianCellDoubleLinearRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "LINEAR_REFINE")
+{
+   d_name_id = "LINEAR_REFINE";
+}
+
+CartesianCellDoubleLinearRefine::~CartesianCellDoubleLinearRefine()
+{
+}
+
+bool CartesianCellDoubleLinearRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::CellVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianCellDoubleLinearRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int CartesianCellDoubleLinearRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianCellDoubleLinearRefine::getStencilWidth() const {
+   return hier::IntVector::getOne(getDim());
+}
+
+void CartesianCellDoubleLinearRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const pdat::CellOverlap* t_overlap =
+      dynamic_cast<const pdat::CellOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::BoxList& boxes = t_overlap->getDestinationBoxList();
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      refine(fine,
+         coarse,
+         dst_component,
+         src_component,
+         b(),
+         ratio);
+   }
+}
+
+void CartesianCellDoubleLinearRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, fine, coarse, fine_box, ratio);
+
+   tbox::Pointer<pdat::CellData<double> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<pdat::CellData<double> >
+   fdata = fine.getPatchData(dst_component);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+#endif
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+
+   const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+   const hier::Index ifirstf = fine_box.lower();
+   const hier::Index ilastf = fine_box.upper();
+
+   for (int d = 0; d < fdata->getDepth(); d++) {
+      if ((dim == tbox::Dimension(1))) {
+         F77_FUNC(cartlinrefcelldoub1d, CARTLINREFCELLDOUB1D) (ifirstc(0),
+            ilastc(0),
+            ifirstf(0), ilastf(0),
+            cilo(0), cihi(0),
+            filo(0), fihi(0),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else if ((dim == tbox::Dimension(2))) {
+         F77_FUNC(cartlinrefcelldoub2d, CARTLINREFCELLDOUB2D) (ifirstc(0),
+            ifirstc(1), ilastc(0), ilastc(1),
+            ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else if ((dim == tbox::Dimension(3))) {
+         F77_FUNC(cartlinrefcelldoub3d, CARTLINREFCELLDOUB3D) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            ifirstf(0), ifirstf(1), ifirstf(2),
+            ilastf(0), ilastf(1), ilastf(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else {
+         TBOX_ERROR("CartesianCellDoubleLinearRefine error...\n"
+            << "dim > 3 not supported." << std::endl);
+
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianCellDoubleLinearRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianCellDoubleLinearRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,126 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear refine operator for cell-centered double data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianCellDoubleLinearRefine
+#define included_geom_CartesianCellDoubleLinearRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianCellDoubleLinearRefine implements linear
+ * interpolation for cell-centered double patch data defined over a Cartesian
+ * mesh.  It is derived from the xfer::RefineOperator base class.
+ * The numerical operations for interpolation use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is cell-centered double, and the std::string is "LINEAR_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class CartesianCellDoubleLinearRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianCellDoubleLinearRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianCellDoubleLinearRefine();
+
+   /**
+    * Return true if the variable and name std::string match cell-centered
+    * double linear interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of cell-centered double linear interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the linear interpolation operator is the vector
+    * of ones.  That is, its stencil extends one cell outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the cell-centered double linear
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the boxes contained in fine_overlap
+    * It is assumed that the coarse patch contains sufficient data for the
+    * stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the cell-centered double linear
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the fine box.   It is assumed that the
+    * coarse patch contains sufficient data for the stencil width of the
+    * refinement operator.  This differs from the above refine() method
+    * only in that it operates on a single fine box instead of a BoxOverlap.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianCellDoubleWeightedAverage.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianCellDoubleWeightedAverage.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,187 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for cell-centered double data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianCellDoubleWeightedAverage_C
+#define included_geom_CartesianCellDoubleWeightedAverage_C
+
+#include "SAMRAI/geom/CartesianCellDoubleWeightedAverage.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <float.h>
+#include <math.h>
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartcoarsen1d.f:
+void F77_FUNC(cartwgtavgcelldoub1d, CARTWGTAVGCELLDOUB1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+// in cartcoarsen2d.f:
+void F77_FUNC(cartwgtavgcelldoub2d, CARTWGTAVGCELLDOUB2D) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+// in cartcoarsen3d.f:
+void F77_FUNC(cartwgtavgcelldoub3d, CARTWGTAVGCELLDOUB3D) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+CartesianCellDoubleWeightedAverage::CartesianCellDoubleWeightedAverage(
+   const tbox::Dimension& dim):
+   xfer::CoarsenOperator(dim, "CONSERVATIVE_COARSEN")
+{
+   d_name_id = "CONSERVATIVE_COARSEN";
+}
+
+CartesianCellDoubleWeightedAverage::~CartesianCellDoubleWeightedAverage()
+{
+}
+
+bool CartesianCellDoubleWeightedAverage::findCoarsenOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::CellVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianCellDoubleWeightedAverage::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int CartesianCellDoubleWeightedAverage::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianCellDoubleWeightedAverage::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void CartesianCellDoubleWeightedAverage::coarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, coarse, fine, coarse_box, ratio);
+
+   tbox::Pointer<pdat::CellData<double> >
+   fdata = fine.getPatchData(src_component);
+   tbox::Pointer<pdat::CellData<double> >
+   cdata = coarse.getPatchData(dst_component);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+#endif
+
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+   const hier::Index cilo = cdata->getGhostBox().lower();
+   const hier::Index cihi = cdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+
+   for (int d = 0; d < cdata->getDepth(); d++) {
+      if ((dim == tbox::Dimension(1))) {
+         F77_FUNC(cartwgtavgcelldoub1d, CARTWGTAVGCELLDOUB1D) (ifirstc(0),
+            ilastc(0),
+            filo(0), fihi(0),
+            cilo(0), cihi(0),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(d),
+            cdata->getPointer(d));
+      } else if ((dim == tbox::Dimension(2))) {
+         F77_FUNC(cartwgtavgcelldoub2d, CARTWGTAVGCELLDOUB2D) (ifirstc(0),
+            ifirstc(1), ilastc(0), ilastc(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(d),
+            cdata->getPointer(d));
+      } else if ((dim == tbox::Dimension(3))) {
+         F77_FUNC(cartwgtavgcelldoub3d, CARTWGTAVGCELLDOUB3D) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(d),
+            cdata->getPointer(d));
+      } else {
+         TBOX_ERROR("CartesianCellDoubleWeightedAverage error...\n"
+            << "dim > 3 not supported." << std::endl);
+
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianCellDoubleWeightedAverage.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianCellDoubleWeightedAverage.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for cell-centered double data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianCellDoubleWeightedAverage
+#define included_geom_CartesianCellDoubleWeightedAverage
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianCellDoubleWeightedAverage implements conservative
+ * cell-weighted averaging for cell-centered double patch data defined over a
+ * Cartesian mesh.  It is derived from the xfer::CoarsenOperator base class.
+ * The numerical operations for the averaging use FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is cell-centered double, and the std::string is "CONSERVATIVE_COARSEN".
+ *
+ * @see xfer::CoarsenOperator
+ */
+
+class CartesianCellDoubleWeightedAverage:
+   public xfer::CoarsenOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianCellDoubleWeightedAverage(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianCellDoubleWeightedAverage();
+
+   /**
+    * Return true if the variable and name std::string match cell-centered
+    * double weighted averaging; otherwise, return false.
+    */
+   bool
+   findCoarsenOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this coarsening operation.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of cell-centered double weighted averaging is 0.
+    * It will be performed before any user-defined coarsen operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the weighted averaging operator is the vector of
+    * zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Coarsen the source component on the fine patch to the destination
+    * component on the coarse patch using the cell-centered double weighted
+    * averaging operator.  Coarsening is performed on the intersection of
+    * the destination patch and the coarse box.  It is assumed that the
+    * fine patch contains sufficient data for the stencil width of the
+    * coarsening operator.
+    */
+   void
+   coarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianCellFloatConservativeLinearRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianCellFloatConservativeLinearRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,251 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Conservative linear refine operator for cell-centered float
+ *                data on a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianCellFloatConservativeLinearRefine_C
+#define included_geom_CartesianCellFloatConservativeLinearRefine_C
+
+#include "SAMRAI/geom/CartesianCellFloatConservativeLinearRefine.h"
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartrefine1d.f:
+void F77_FUNC(cartclinrefcellflot1d, CARTCLINREFCELLFLOT1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *,
+   float *, float *);
+// in cartrefine2d.f:
+void F77_FUNC(cartclinrefcellflot2d, CARTCLINREFCELLFLOT2D) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *,
+   float *, float *, float *, float *);
+// in cartrefine3d.f:
+void F77_FUNC(cartclinrefcellflot3d, CARTCLINREFCELLFLOT3D) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *,
+   float *, float *, float *,
+   float *, float *, float *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianCellFloatConservativeLinearRefine::
+CartesianCellFloatConservativeLinearRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSERVATIVE_LINEAR_REFINE")
+{
+   d_name_id = "CONSERVATIVE_LINEAR_REFINE";
+}
+
+CartesianCellFloatConservativeLinearRefine::~
+CartesianCellFloatConservativeLinearRefine()
+{
+}
+
+bool CartesianCellFloatConservativeLinearRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::CellVariable<float> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianCellFloatConservativeLinearRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int
+CartesianCellFloatConservativeLinearRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianCellFloatConservativeLinearRefine::getStencilWidth() const {
+   return hier::IntVector::getOne(getDim());
+}
+
+void CartesianCellFloatConservativeLinearRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const pdat::CellOverlap* t_overlap =
+      dynamic_cast<const pdat::CellOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::BoxList& boxes = t_overlap->getDestinationBoxList();
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      refine(fine,
+         coarse,
+         dst_component,
+         src_component,
+         b(),
+         ratio);
+   }
+}
+
+void CartesianCellFloatConservativeLinearRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension dim(getDim());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, fine, coarse, fine_box, ratio);
+
+   tbox::Pointer<pdat::CellData<float> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<pdat::CellData<float> >
+   fdata = fine.getPatchData(dst_component);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+
+   const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+   const hier::Index ifirstf = fine_box.lower();
+   const hier::Index ilastf = fine_box.upper();
+
+   const hier::IntVector tmp_ghosts(dim, 0);
+   tbox::Array<float> diff0(cgbox.numberCells(0) + 1);
+   pdat::CellData<float> slope0(cgbox, 1, tmp_ghosts);
+
+   for (int d = 0; d < fdata->getDepth(); d++) {
+      if ((dim == tbox::Dimension(1))) {
+         F77_FUNC(cartclinrefcellflot1d, CARTCLINREFCELLFLOT1D) (ifirstc(0),
+            ilastc(0),
+            ifirstf(0), ilastf(0),
+            cilo(0), cihi(0),
+            filo(0), fihi(0),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d),
+            diff0.getPointer(), slope0.getPointer());
+      } else if ((dim == tbox::Dimension(2))) {
+         tbox::Array<float> diff1(cgbox.numberCells(1) + 1);
+         pdat::CellData<float> slope1(cgbox, 1, tmp_ghosts);
+
+         F77_FUNC(cartclinrefcellflot2d, CARTCLINREFCELLFLOT2D) (ifirstc(0),
+            ifirstc(1), ilastc(0), ilastc(1),
+            ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d),
+            diff0.getPointer(), slope0.getPointer(),
+            diff1.getPointer(), slope1.getPointer());
+      } else if ((dim == tbox::Dimension(3))) {
+         tbox::Array<float> diff1(cgbox.numberCells(1) + 1);
+         pdat::CellData<float> slope1(cgbox, 1, tmp_ghosts);
+
+         tbox::Array<float> diff2(cgbox.numberCells(2) + 1);
+         pdat::CellData<float> slope2(cgbox, 1, tmp_ghosts);
+
+         F77_FUNC(cartclinrefcellflot3d, CARTCLINREFCELLFLOT3D) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            ifirstf(0), ifirstf(1), ifirstf(2),
+            ilastf(0), ilastf(1), ilastf(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d),
+            diff0.getPointer(), slope0.getPointer(),
+            diff1.getPointer(), slope1.getPointer(),
+            diff2.getPointer(), slope2.getPointer());
+      } else {
+         TBOX_ERROR("CartesianFloatConservativeLinearRefine error...\n"
+            << "dim > 3 not supported." << std::endl);
+
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianCellFloatConservativeLinearRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianCellFloatConservativeLinearRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,128 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Conservative linear refine operator for cell-centered
+ *                float data on a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianCellFloatConservativeLinearRefine
+#define included_geom_CartesianCellFloatConservativeLinearRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianCellFloatConservativeLinearRefine implements
+ * conservative linear interpolation for cell-centered float patch data
+ * defined over a Cartesian mesh.  It is derived from the base class
+ * xfer::RefineOperator.  The numerical operations for the interpolation
+ * use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is cell-centered float, and the std::string is
+ * "CONSERVATIVE_LINEAR_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class CartesianCellFloatConservativeLinearRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianCellFloatConservativeLinearRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianCellFloatConservativeLinearRefine();
+
+   /**
+    * Return true if the variable and name std::string match cell-centered
+    * float conservative linear interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of cell-centered float conservative linear is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the conservative linear interpolation operator is
+    * the vector of ones.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the cell-centered float conservative
+    * linear interpolation operator.  Interpolation is performed on the
+    * intersection of the destination patch and the boxes contained in
+    * fine_overlap.  It is assumed that the coarse patch contains sufficient
+    * data for the stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the cell-centered float conservative
+    * linear interpolation operator.  Interpolation is performed on the
+    * intersection of the destination patch and the fine box.  It is assumed
+    * that the coarse patch contains sufficient data for the stencil width of
+    * the refinement operator.  This differs from the above refine() method
+    * only in that it operates on a single fine box instead of a BoxOverlap.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianCellFloatLinearRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianCellFloatLinearRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,224 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear refine operator for cell-centered float data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianCellFloatLinearRefine_C
+#define included_geom_CartesianCellFloatLinearRefine_C
+
+#include "SAMRAI/geom/CartesianCellFloatLinearRefine.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartrefine1d.f:
+void F77_FUNC(cartlinrefcellflot1d, CARTLINREFCELLFLOT1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+// in cartrefine2d.f:
+void F77_FUNC(cartlinrefcellflot2d, CARTLINREFCELLFLOT2D) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+// in cartrefine3d.f:
+void F77_FUNC(cartlinrefcellflot3d, CARTLINREFCELLFLOT3D) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianCellFloatLinearRefine::CartesianCellFloatLinearRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "LINEAR_REFINE")
+{
+   d_name_id = "LINEAR_REFINE";
+}
+
+CartesianCellFloatLinearRefine::~CartesianCellFloatLinearRefine()
+{
+}
+
+bool CartesianCellFloatLinearRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::CellVariable<float> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianCellFloatLinearRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int CartesianCellFloatLinearRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianCellFloatLinearRefine::getStencilWidth() const {
+   return hier::IntVector::getOne(getDim());
+}
+
+void CartesianCellFloatLinearRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const pdat::CellOverlap* t_overlap =
+      dynamic_cast<const pdat::CellOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::BoxList& boxes = t_overlap->getDestinationBoxList();
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      refine(fine,
+         coarse,
+         dst_component,
+         src_component,
+         b(),
+         ratio);
+   }
+}
+
+void CartesianCellFloatLinearRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, fine, coarse, fine_box, ratio);
+
+   tbox::Pointer<pdat::CellData<float> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<pdat::CellData<float> >
+   fdata = fine.getPatchData(dst_component);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+
+   const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+   const hier::Index ifirstf = fine_box.lower();
+   const hier::Index ilastf = fine_box.upper();
+
+   for (int d = 0; d < fdata->getDepth(); d++) {
+      if ((dim == tbox::Dimension(1))) {
+         F77_FUNC(cartlinrefcellflot1d, CARTLINREFCELLFLOT1D) (ifirstc(0),
+            ilastc(0),
+            ifirstf(0), ilastf(0),
+            cilo(0), cihi(0),
+            filo(0), fihi(0),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else if ((dim == tbox::Dimension(2))) {
+         F77_FUNC(cartlinrefcellflot2d, CARTLINREFCELLFLOT2D) (ifirstc(0),
+            ifirstc(1), ilastc(0), ilastc(1),
+            ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else if ((dim == tbox::Dimension(3))) {
+         F77_FUNC(cartlinrefcellflot3d, CARTLINREFCELLFLOT3D) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            ifirstf(0), ifirstf(1), ifirstf(2),
+            ilastf(0), ilastf(1), ilastf(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else {
+         TBOX_ERROR("CartesianCellFloatLinearRefine error...\n"
+            << "dim > 3 not supported." << std::endl);
+
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianCellFloatLinearRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianCellFloatLinearRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,126 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear refine operator for cell-centered float data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianCellFloatLinearRefine
+#define included_geom_CartesianCellFloatLinearRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianCellFloatLinearRefine implements linear
+ * interpolation for cell-centered float patch data defined over a Cartesian
+ * mesh.  It is derived from the xfer::RefineOperator base class.
+ * The numerical operations for interpolation use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is cell-centered float, and the std::string is "LINEAR_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class CartesianCellFloatLinearRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianCellFloatLinearRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianCellFloatLinearRefine();
+
+   /**
+    * Return true if the variable and name std::string match cell-centered
+    * float linear interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of cell-centered float linear interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the linear interpolation operator is the vector
+    * of ones.  That is, its stencil extends one cell outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the cell-centered float linear
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the boxes contained in fine_overlap
+    * It is assumed that the coarse patch contains sufficient data for the
+    * stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the cell-centered float linear
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the fine box.   It is assumed that the
+    * coarse patch contains sufficient data for the stencil width of the
+    * refinement operator.  This differs from the above refine() method
+    * only in that it operates on a single fine box instead of a BoxOverlap.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianCellFloatWeightedAverage.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianCellFloatWeightedAverage.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,189 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for cell-centered float data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianCellFloatWeightedAverage_C
+#define included_geom_CartesianCellFloatWeightedAverage_C
+
+#include "SAMRAI/geom/CartesianCellFloatWeightedAverage.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartcoarsen1d.f:
+void F77_FUNC(cartwgtavgcellflot1d, CARTWGTAVGCELLFLOT1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+// in cartcoarsen2d.f:
+void F77_FUNC(cartwgtavgcellflot2d, CARTWGTAVGCELLFLOT2D) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+// in cartcoarsen3d.f:
+void F77_FUNC(cartwgtavgcellflot3d, CARTWGTAVGCELLFLOT3D) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianCellFloatWeightedAverage::CartesianCellFloatWeightedAverage(
+   const tbox::Dimension& dim):
+   xfer::CoarsenOperator(dim, "CONSERVATIVE_COARSEN")
+{
+   d_name_id = "CONSERVATIVE_COARSEN";
+}
+
+CartesianCellFloatWeightedAverage::~CartesianCellFloatWeightedAverage()
+{
+}
+
+bool CartesianCellFloatWeightedAverage::findCoarsenOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::CellVariable<float> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianCellFloatWeightedAverage::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int CartesianCellFloatWeightedAverage::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianCellFloatWeightedAverage::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void CartesianCellFloatWeightedAverage::coarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, coarse, fine, coarse_box, ratio);
+
+   tbox::Pointer<pdat::CellData<float> >
+   fdata = fine.getPatchData(src_component);
+   tbox::Pointer<pdat::CellData<float> >
+   cdata = coarse.getPatchData(dst_component);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+#endif
+
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+   const hier::Index cilo = cdata->getGhostBox().lower();
+   const hier::Index cihi = cdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+
+   for (int d = 0; d < cdata->getDepth(); d++) {
+      if ((dim == tbox::Dimension(1))) {
+         F77_FUNC(cartwgtavgcellflot1d, CARTWGTAVGCELLFLOT1D) (ifirstc(0),
+            ilastc(0),
+            filo(0), fihi(0),
+            cilo(0), cihi(0),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(d),
+            cdata->getPointer(d));
+      } else if ((dim == tbox::Dimension(2))) {
+         F77_FUNC(cartwgtavgcellflot2d, CARTWGTAVGCELLFLOT2D) (ifirstc(0),
+            ifirstc(1), ilastc(0), ilastc(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(d),
+            cdata->getPointer(d));
+      } else if ((dim == tbox::Dimension(3))) {
+         F77_FUNC(cartwgtavgcellflot3d, CARTWGTAVGCELLFLOT3D) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(d),
+            cdata->getPointer(d));
+      } else {
+         TBOX_ERROR("CartesianCellFloatWeightedAverage error...\n"
+            << "dim > 3 not supported." << std::endl);
+
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianCellFloatWeightedAverage.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianCellFloatWeightedAverage.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for cell-centered float data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianCellFloatWeightedAverage
+#define included_geom_CartesianCellFloatWeightedAverage
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianCellFloatWeightedAverage implements conservative
+ * cell-weighted averaging for cell-centered float patch data defined over a
+ * Cartesian mesh.  It is derived from the xfer::CoarsenOperator base class.
+ * The numerical operations for the averaging use FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is cell-centered float, and the std::string is "CONSERVATIVE_COARSEN".
+ *
+ * @see xfer::CoarsenOperator
+ */
+
+class CartesianCellFloatWeightedAverage:
+   public xfer::CoarsenOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianCellFloatWeightedAverage(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianCellFloatWeightedAverage();
+
+   /**
+    * Return true if the variable and name std::string match cell-centered
+    * float weighted averaging; otherwise, return false.
+    */
+   bool
+   findCoarsenOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this coarsening operation.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of cell-centered float weighted averaging is 0.
+    * It will be performed before any user-defined coarsen operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the weighted averaging operator is the vector of
+    * zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Coarsen the source component on the fine patch to the destination
+    * component on the coarse patch using the cell-centered float weighted
+    * averaging operator.  Coarsening is performed on the intersection of
+    * the destination patch and the coarse box.  It is assumed that the
+    * fine patch contains sufficient data for the stencil width of the
+    * coarsening operator.
+    */
+   void
+   coarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianEdgeComplexWeightedAverage.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianEdgeComplexWeightedAverage.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,248 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for edge-centered complex data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianEdgeComplexWeightedAverage_C
+#define included_geom_CartesianEdgeComplexWeightedAverage_C
+
+#include <float.h>
+#include <math.h>
+
+#include "SAMRAI/geom/CartesianEdgeComplexWeightedAverage.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/pdat/EdgeVariable.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartcoarsen1d.f:
+void F77_FUNC(cartwgtavgedgecplx1d, CARTWGTAVGEDGECPLX1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+// in cartcoarsen2d.f:
+void F77_FUNC(cartwgtavgedgecplx2d0, CARTWGTAVGEDGECPLX2D0) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+
+void F77_FUNC(cartwgtavgedgecplx2d1, CARTWGTAVGEDGECPLX2D1) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+// in cartcoarsen3d.f:
+void F77_FUNC(cartwgtavgedgecplx3d0, CARTWGTAVGEDGECPLX3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+void F77_FUNC(cartwgtavgedgecplx3d1, CARTWGTAVGEDGECPLX3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+void F77_FUNC(cartwgtavgedgecplx3d2, CARTWGTAVGEDGECPLX3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianEdgeComplexWeightedAverage::CartesianEdgeComplexWeightedAverage(
+   const tbox::Dimension& dim):
+   xfer::CoarsenOperator(dim, "CONSERVATIVE_COARSEN")
+{
+   d_name_id = "CONSERVATIVE_COARSEN";
+}
+
+CartesianEdgeComplexWeightedAverage::~CartesianEdgeComplexWeightedAverage()
+{
+}
+
+bool CartesianEdgeComplexWeightedAverage::findCoarsenOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::EdgeVariable<dcomplex> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianEdgeComplexWeightedAverage::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int CartesianEdgeComplexWeightedAverage::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianEdgeComplexWeightedAverage::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void CartesianEdgeComplexWeightedAverage::coarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, coarse, fine, coarse_box, ratio);
+
+   tbox::Pointer<pdat::EdgeData<dcomplex> >
+   fdata = fine.getPatchData(src_component);
+   tbox::Pointer<pdat::EdgeData<dcomplex> >
+   cdata = coarse.getPatchData(dst_component);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+#endif
+
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+   const hier::Index cilo = cdata->getGhostBox().lower();
+   const hier::Index cihi = cdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+
+   for (int d = 0; d < cdata->getDepth(); d++) {
+      if ((dim == tbox::Dimension(1))) {
+         F77_FUNC(cartwgtavgedgecplx1d, CARTWGTAVGEDGECPLX1D) (ifirstc(0),
+            ilastc(0),
+            filo(0), fihi(0),
+            cilo(0), cihi(0),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(0, d),
+            cdata->getPointer(0, d));
+      } else if ((dim == tbox::Dimension(2))) {
+         F77_FUNC(cartwgtavgedgecplx2d0, CARTWGTAVGEDGECPLX2D0) (ifirstc(0),
+            ifirstc(1), ilastc(0), ilastc(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(0, d),
+            cdata->getPointer(0, d));
+         F77_FUNC(cartwgtavgedgecplx2d1, CARTWGTAVGEDGECPLX2D1) (ifirstc(0),
+            ifirstc(1), ilastc(0), ilastc(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(1, d),
+            cdata->getPointer(1, d));
+      } else if ((dim == tbox::Dimension(3))) {
+         F77_FUNC(cartwgtavgedgecplx3d0, CARTWGTAVGEDGECPLX3D0) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(0, d),
+            cdata->getPointer(0, d));
+         F77_FUNC(cartwgtavgedgecplx3d1, CARTWGTAVGEDGECPLX3D1) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(1, d),
+            cdata->getPointer(1, d));
+         F77_FUNC(cartwgtavgedgecplx3d2, CARTWGTAVGEDGECPLX3D2) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(2, d),
+            cdata->getPointer(2, d));
+      } else {
+         TBOX_ERROR("CartesianEdgeComplexWeightedAverage::coarsen error...\n"
+            << "dim > 3 not supported." << std::endl);
+
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianEdgeComplexWeightedAverage.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianEdgeComplexWeightedAverage.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for edge-centered complex data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianEdgeComplexWeightedAverage
+#define included_geom_CartesianEdgeComplexWeightedAverage
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianEdgeComplexWeightedAverage implements conservative
+ * edge-weighted averaging for edge-centered complex patch data defined over a
+ * Cartesian mesh.  It is derived from the xfer::CoarsenOperator base class.
+ * The numerical operations for theaveraging use FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is edge-centered complex, and the std::string is "CONSERVATIVE_COARSEN".
+ *
+ * @see xfer::CoarsenOperator
+ */
+
+class CartesianEdgeComplexWeightedAverage:
+   public xfer::CoarsenOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianEdgeComplexWeightedAverage(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianEdgeComplexWeightedAverage();
+
+   /**
+    * Return true if the variable and name std::string match the edge-centered
+    * complex weighted averaging; otherwise, return false.
+    */
+   bool
+   findCoarsenOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this coarsening operation.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of edge-centered complex weighted averaging is 0.
+    * It will be performed before any user-defined coarsen operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the weighted averaging operator is the vector of
+    * zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Coarsen the source component on the fine patch to the destination
+    * component on the coarse patch using the edge-centered complex weighted
+    * averaging operator.  Coarsening is performed on the intersection of
+    * the destination patch and the coarse box.  It is assumed that the
+    * fine patch contains sufficient data for the stencil width of the
+    * coarsening operator.
+    */
+   void
+   coarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianEdgeDoubleConservativeLinearRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianEdgeDoubleConservativeLinearRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,335 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Conservative linear refine operator for edge-centered
+ *                double data on a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianEdgeDoubleConservativeLinearRefine_C
+#define included_geom_CartesianEdgeDoubleConservativeLinearRefine_C
+
+#include "SAMRAI/geom/CartesianEdgeDoubleConservativeLinearRefine.h"
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/pdat/EdgeVariable.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartrefine1d.f:
+void F77_FUNC(cartclinrefedgedoub1d, CARTCLINREFEDGEDOUB1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *,
+   double *, double *);
+// in cartrefine2d.f:
+void F77_FUNC(cartclinrefedgedoub2d0, CARTCLINREFEDGEDOUB2D0) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *,
+   double *, double *, double *, double *);
+void F77_FUNC(cartclinrefedgedoub2d1, CARTCLINREFEDGEDOUB2D1) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *,
+   double *, double *, double *, double *);
+// in cartrefine3d.f:
+void F77_FUNC(cartclinrefedgedoub3d0, CARTCLINREFEDGEDOUB3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *,
+   double *, double *, double *,
+   double *, double *, double *);
+void F77_FUNC(cartclinrefedgedoub3d1, CARTCLINREFEDGEDOUB3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *,
+   double *, double *, double *,
+   double *, double *, double *);
+void F77_FUNC(cartclinrefedgedoub3d2, CARTCLINREFEDGEDOUB3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *,
+   double *, double *, double *,
+   double *, double *, double *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianEdgeDoubleConservativeLinearRefine::
+CartesianEdgeDoubleConservativeLinearRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSERVATIVE_LINEAR_REFINE")
+{
+   d_name_id = "CONSERVATIVE_LINEAR_REFINE";
+}
+
+CartesianEdgeDoubleConservativeLinearRefine::~
+CartesianEdgeDoubleConservativeLinearRefine()
+{
+}
+
+bool CartesianEdgeDoubleConservativeLinearRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::EdgeVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianEdgeDoubleConservativeLinearRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int
+CartesianEdgeDoubleConservativeLinearRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianEdgeDoubleConservativeLinearRefine::getStencilWidth() const {
+   return hier::IntVector::getOne(getDim());
+}
+
+void CartesianEdgeDoubleConservativeLinearRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS3(dim, fine, coarse, ratio);
+
+   tbox::Pointer<pdat::EdgeData<double> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<pdat::EdgeData<double> >
+   fdata = fine.getPatchData(dst_component);
+
+   const pdat::EdgeOverlap* t_overlap =
+      dynamic_cast<const pdat::EdgeOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+
+   for (int axis = 0; axis < dim.getValue(); axis++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(axis);
+
+      for (hier::BoxList::Iterator b(boxes); b; b++) {
+
+         hier::Box fine_box(b());
+         TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, fine_box);
+
+         for (int i = 0; i < dim.getValue(); i++) {
+            if (i != axis) {
+               fine_box.upper(i) -= 1;
+            }
+         }
+
+         const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+         const hier::Index ifirstc = coarse_box.lower();
+         const hier::Index ilastc = coarse_box.upper();
+         const hier::Index ifirstf = fine_box.lower();
+         const hier::Index ilastf = fine_box.upper();
+
+         const hier::IntVector tmp_ghosts(dim, 0);
+         tbox::Array<double> diff0(cgbox.numberCells(0) + 2);
+         pdat::EdgeData<double> slope0(cgbox, 1, tmp_ghosts);
+
+         for (int d = 0; d < fdata->getDepth(); d++) {
+            if ((dim == tbox::Dimension(1))) {
+               F77_FUNC(cartclinrefedgedoub1d, CARTCLINREFEDGEDOUB1D) (
+                  ifirstc(0), ilastc(0),
+                  ifirstf(0), ilastf(0),
+                  cilo(0), cihi(0),
+                  filo(0), fihi(0),
+                  &ratio[0],
+                  cgeom->getDx(),
+                  fgeom->getDx(),
+                  cdata->getPointer(0, d),
+                  fdata->getPointer(0, d),
+                  diff0.getPointer(), slope0.getPointer(0));
+            } else if ((dim == tbox::Dimension(2))) {
+               tbox::Array<double> diff1(cgbox.numberCells(1) + 2);
+               pdat::EdgeData<double> slope1(cgbox, 1, tmp_ghosts);
+
+               if (axis == 0) {
+                  F77_FUNC(cartclinrefedgedoub2d0, CARTCLINREFEDGEDOUB2D0) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d),
+                     diff0.getPointer(), slope0.getPointer(0),
+                     diff1.getPointer(), slope1.getPointer(0));
+               } else if (axis == 1) {
+                  F77_FUNC(cartclinrefedgedoub2d1, CARTCLINREFEDGEDOUB2D1) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d),
+                     diff1.getPointer(), slope1.getPointer(1),
+                     diff0.getPointer(), slope0.getPointer(1));
+               }
+            } else if ((dim == tbox::Dimension(3))) {
+               tbox::Array<double> diff1(cgbox.numberCells(1) + 2);
+               pdat::EdgeData<double> slope1(cgbox, 1, tmp_ghosts);
+
+               tbox::Array<double> diff2(cgbox.numberCells(2) + 2);
+               pdat::EdgeData<double> slope2(cgbox, 1, tmp_ghosts);
+
+               if (axis == 0) {
+                  F77_FUNC(cartclinrefedgedoub3d0, CARTCLINREFEDGEDOUB3D0) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d),
+                     diff0.getPointer(), slope0.getPointer(0),
+                     diff1.getPointer(), slope1.getPointer(0),
+                     diff2.getPointer(), slope2.getPointer(0));
+               } else if (axis == 1) {
+                  F77_FUNC(cartclinrefedgedoub3d1, CARTCLINREFEDGEDOUB3D1) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d),
+                     diff1.getPointer(), slope1.getPointer(1),
+                     diff2.getPointer(), slope2.getPointer(1),
+                     diff0.getPointer(), slope0.getPointer(1));
+               } else if (axis == 2) {
+                  F77_FUNC(cartclinrefedgedoub3d2, CARTCLINREFEDGEDOUB3D2) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(2, d),
+                     fdata->getPointer(2, d),
+                     diff2.getPointer(), slope2.getPointer(2),
+                     diff0.getPointer(), slope0.getPointer(2),
+                     diff1.getPointer(), slope1.getPointer(2));
+               }
+            } else {
+               TBOX_ERROR(
+                  "CartesianEdgeDoubleConservativeLinearRefine error...\n"
+                  << "dim > 3 not supported." << std::endl);
+            }
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianEdgeDoubleConservativeLinearRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianEdgeDoubleConservativeLinearRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Conservative linear refine operator for edge-centered
+ *                double data on a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianEdgeDoubleConservativeLinearRefine
+#define included_geom_CartesianEdgeDoubleConservativeLinearRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianEdgeDoubleConservativeLinearRefine implements
+ * conservative linear interpolation for edge-centered double patch data
+ * defined over a Cartesian mesh.  It is derived from the base class
+ * xfer::RefineOperator.  The numerical operations for the interpolation
+ * use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is edge-centered double, and the std::string is
+ * "CONSERVATIVE_LINEAR_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class CartesianEdgeDoubleConservativeLinearRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianEdgeDoubleConservativeLinearRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianEdgeDoubleConservativeLinearRefine();
+
+   /**
+    * Return true if the variable and name std::string match edge-centered
+    * double conservative linear interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this refinement operation.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of edge-centered double conservative linear is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the conservative linear interpolation operator is
+    * the vector of ones.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the edge-centered double conservative
+    * linear interpolation operator.  Interpolation is performed on the
+    * intersection of the destination patch and the boxes contained in
+    * fine_overlap.  It is assumed that the coarse patch contains sufficient
+    * data for the stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianEdgeDoubleWeightedAverage.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianEdgeDoubleWeightedAverage.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,247 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for edge-centered double data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianEdgeDoubleWeightedAverage_C
+#define included_geom_CartesianEdgeDoubleWeightedAverage_C
+
+#include "SAMRAI/geom/CartesianEdgeDoubleWeightedAverage.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/pdat/EdgeVariable.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartcoarsen1d.f:
+void F77_FUNC(cartwgtavgedgedoub1d, CARTWGTAVGEDGEDOUB1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+// in cartcoarsen2d.f:
+void F77_FUNC(cartwgtavgedgedoub2d0, CARTWGTAVGEDGEDOUB2D0) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+
+void F77_FUNC(cartwgtavgedgedoub2d1, CARTWGTAVGEDGEDOUB2D1) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+// in cartcoarsen3d.f:
+void F77_FUNC(cartwgtavgedgedoub3d0, CARTWGTAVGEDGEDOUB3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+void F77_FUNC(cartwgtavgedgedoub3d1, CARTWGTAVGEDGEDOUB3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+void F77_FUNC(cartwgtavgedgedoub3d2, CARTWGTAVGEDGEDOUB3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianEdgeDoubleWeightedAverage::CartesianEdgeDoubleWeightedAverage(
+   const tbox::Dimension& dim):
+   xfer::CoarsenOperator(dim, "CONSERVATIVE_COARSEN")
+{
+   d_name_id = "CONSERVATIVE_COARSEN";
+}
+
+CartesianEdgeDoubleWeightedAverage::~CartesianEdgeDoubleWeightedAverage()
+{
+}
+
+bool CartesianEdgeDoubleWeightedAverage::findCoarsenOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::EdgeVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianEdgeDoubleWeightedAverage::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int CartesianEdgeDoubleWeightedAverage::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianEdgeDoubleWeightedAverage::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void CartesianEdgeDoubleWeightedAverage::coarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, coarse, fine, coarse_box, ratio);
+
+   tbox::Pointer<pdat::EdgeData<double> >
+   fdata = fine.getPatchData(src_component);
+   tbox::Pointer<pdat::EdgeData<double> >
+   cdata = coarse.getPatchData(dst_component);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+#endif
+
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+   const hier::Index cilo = cdata->getGhostBox().lower();
+   const hier::Index cihi = cdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+
+   for (int d = 0; d < cdata->getDepth(); d++) {
+      if ((dim == tbox::Dimension(1))) {
+         F77_FUNC(cartwgtavgedgedoub1d, CARTWGTAVGEDGEDOUB1D) (ifirstc(0),
+            ilastc(0),
+            filo(0), fihi(0),
+            cilo(0), cihi(0),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(0, d),
+            cdata->getPointer(0, d));
+      } else if ((dim == tbox::Dimension(2))) {
+         F77_FUNC(cartwgtavgedgedoub2d0, CARTWGTAVGEDGEDOUB2D0) (ifirstc(0),
+            ifirstc(1), ilastc(0), ilastc(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(0, d),
+            cdata->getPointer(0, d));
+         F77_FUNC(cartwgtavgedgedoub2d1, CARTWGTAVGEDGEDOUB2D1) (ifirstc(0),
+            ifirstc(1), ilastc(0), ilastc(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(1, d),
+            cdata->getPointer(1, d));
+      } else if ((dim == tbox::Dimension(3))) {
+         F77_FUNC(cartwgtavgedgedoub3d0, CARTWGTAVGEDGEDOUB3D0) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(0, d),
+            cdata->getPointer(0, d));
+         F77_FUNC(cartwgtavgedgedoub3d1, CARTWGTAVGEDGEDOUB3D1) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(1, d),
+            cdata->getPointer(1, d));
+         F77_FUNC(cartwgtavgedgedoub3d2, CARTWGTAVGEDGEDOUB3D2) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(2, d),
+            cdata->getPointer(2, d));
+      } else {
+         TBOX_ERROR("CartesianEdgeDoubleWeightedAverage error...\n"
+            << "dim > 3 not supported." << std::endl);
+      }
+
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianEdgeDoubleWeightedAverage.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianEdgeDoubleWeightedAverage.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for edge-centered double data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianEdgeDoubleWeightedAverage
+#define included_geom_CartesianEdgeDoubleWeightedAverage
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianEdgeDoubleWeightedAverage implements conservative
+ * edge-weighted averaging for edge-centered double patch data defined over a
+ * Cartesian mesh.  It is derived from the xfer::CoarsenOperator base class.
+ * The numerical operations for theaveraging use FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is edge-centered double, and the std::string is "CONSERVATIVE_COARSEN".
+ *
+ * @see xfer::CoarsenOperator
+ */
+
+class CartesianEdgeDoubleWeightedAverage:
+   public xfer::CoarsenOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianEdgeDoubleWeightedAverage(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianEdgeDoubleWeightedAverage();
+
+   /**
+    * Return true if the variable and name std::string match the edge-centered
+    * double weighted averaging; otherwise, return false.
+    */
+   bool
+   findCoarsenOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this coarsening operation.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of edge-centered double weighted averaging is 0.
+    * It will be performed before any user-defined coarsen operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the weighted averaging operator is the vector of
+    * zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Coarsen the source component on the fine patch to the destination
+    * component on the coarse patch using the edge-centered double weighted
+    * averaging operator.  Coarsening is performed on the intersection of
+    * the destination patch and the coarse box.  It is assumed that the
+    * fine patch contains sufficient data for the stencil width of the
+    * coarsening operator.
+    */
+   void
+   coarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianEdgeFloatConservativeLinearRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianEdgeFloatConservativeLinearRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,334 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Conservative linear refine operator for edge-centered
+ *                float data on a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianEdgeFloatConservativeLinearRefine_C
+#define included_geom_CartesianEdgeFloatConservativeLinearRefine_C
+
+#include "SAMRAI/geom/CartesianEdgeFloatConservativeLinearRefine.h"
+
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/pdat/EdgeVariable.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartrefine1d.f:
+void F77_FUNC(cartclinrefedgeflot1d, CARTCLINREFEDGEFLOT1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *,
+   float *, float *);
+// in cartrefine2d.f:
+void F77_FUNC(cartclinrefedgeflot2d0, CARTCLINREFEDGEFLOT2D0) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *,
+   float *, float *, float *, float *);
+void F77_FUNC(cartclinrefedgeflot2d1, CARTCLINREFEDGEFLOT2D1) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *,
+   float *, float *, float *, float *);
+// in cartrefine3d.f:
+void F77_FUNC(cartclinrefedgeflot3d0, CARTCLINREFEDGEFLOT3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *,
+   float *, float *, float *,
+   float *, float *, float *);
+void F77_FUNC(cartclinrefedgeflot3d1, CARTCLINREFEDGEFLOT3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *,
+   float *, float *, float *,
+   float *, float *, float *);
+void F77_FUNC(cartclinrefedgeflot3d2, CARTCLINREFEDGEFLOT3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *,
+   float *, float *, float *,
+   float *, float *, float *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianEdgeFloatConservativeLinearRefine::
+CartesianEdgeFloatConservativeLinearRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSERVATIVE_LINEAR_REFINE")
+{
+   d_name_id = "CONSERVATIVE_LINEAR_REFINE";
+}
+
+CartesianEdgeFloatConservativeLinearRefine::~
+CartesianEdgeFloatConservativeLinearRefine()
+{
+}
+
+bool CartesianEdgeFloatConservativeLinearRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::EdgeVariable<float> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianEdgeFloatConservativeLinearRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int
+CartesianEdgeFloatConservativeLinearRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianEdgeFloatConservativeLinearRefine::getStencilWidth() const {
+   return hier::IntVector::getOne(getDim());
+}
+
+void CartesianEdgeFloatConservativeLinearRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS3(dim, fine, coarse, ratio);
+
+   tbox::Pointer<pdat::EdgeData<float> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<pdat::EdgeData<float> >
+   fdata = fine.getPatchData(dst_component);
+
+   const pdat::EdgeOverlap* t_overlap =
+      dynamic_cast<const pdat::EdgeOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+
+   for (int axis = 0; axis < dim.getValue(); axis++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(axis);
+
+      for (hier::BoxList::Iterator b(boxes); b; b++) {
+
+         hier::Box fine_box(b());
+         TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, fine_box);
+
+         for (int i = 0; i < dim.getValue(); i++) {
+            if (i != axis) {
+               fine_box.upper(i) -= 1;
+            }
+         }
+
+         const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+         const hier::Index ifirstc = coarse_box.lower();
+         const hier::Index ilastc = coarse_box.upper();
+         const hier::Index ifirstf = fine_box.lower();
+         const hier::Index ilastf = fine_box.upper();
+
+         const hier::IntVector tmp_ghosts(dim, 0);
+         tbox::Array<float> diff0(cgbox.numberCells(0) + 2);
+         pdat::EdgeData<float> slope0(cgbox, 1, tmp_ghosts);
+
+         for (int d = 0; d < fdata->getDepth(); d++) {
+            if ((dim == tbox::Dimension(1))) {
+               F77_FUNC(cartclinrefedgeflot1d, CARTCLINREFEDGEFLOT1D) (
+                  ifirstc(0), ilastc(0),
+                  ifirstf(0), ilastf(0),
+                  cilo(0), cihi(0),
+                  filo(0), fihi(0),
+                  &ratio[0],
+                  cgeom->getDx(),
+                  fgeom->getDx(),
+                  cdata->getPointer(0, d),
+                  fdata->getPointer(0, d),
+                  diff0.getPointer(), slope0.getPointer(0));
+            } else if ((dim == tbox::Dimension(2))) {
+               tbox::Array<float> diff1(cgbox.numberCells(1) + 2);
+               pdat::EdgeData<float> slope1(cgbox, 1, tmp_ghosts);
+
+               if (axis == 0) {
+                  F77_FUNC(cartclinrefedgeflot2d0, CARTCLINREFEDGEFLOT2D0) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d),
+                     diff0.getPointer(), slope0.getPointer(0),
+                     diff1.getPointer(), slope1.getPointer(0));
+               } else if (axis == 1) {
+                  F77_FUNC(cartclinrefedgeflot2d1, CARTCLINREFEDGEFLOT2D1) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d),
+                     diff1.getPointer(), slope1.getPointer(1),
+                     diff0.getPointer(), slope0.getPointer(1));
+               }
+            } else if ((dim == tbox::Dimension(3))) {
+               tbox::Array<float> diff1(cgbox.numberCells(1) + 2);
+               pdat::EdgeData<float> slope1(cgbox, 1, tmp_ghosts);
+
+               tbox::Array<float> diff2(cgbox.numberCells(2) + 2);
+               pdat::EdgeData<float> slope2(cgbox, 1, tmp_ghosts);
+
+               if (axis == 0) {
+                  F77_FUNC(cartclinrefedgeflot3d0, CARTCLINREFEDGEFLOT3D0) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d),
+                     diff0.getPointer(), slope0.getPointer(0),
+                     diff1.getPointer(), slope1.getPointer(0),
+                     diff2.getPointer(), slope2.getPointer(0));
+               } else if (axis == 1) {
+                  F77_FUNC(cartclinrefedgeflot3d1, CARTCLINREFEDGEFLOT3D1) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d),
+                     diff1.getPointer(), slope1.getPointer(1),
+                     diff2.getPointer(), slope2.getPointer(1),
+                     diff0.getPointer(), slope0.getPointer(1));
+               } else if (axis == 2) {
+                  F77_FUNC(cartclinrefedgeflot3d2, CARTCLINREFEDGEFLOT3D2) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(2, d),
+                     fdata->getPointer(2, d),
+                     diff2.getPointer(), slope2.getPointer(2),
+                     diff0.getPointer(), slope0.getPointer(2),
+                     diff1.getPointer(), slope1.getPointer(2));
+               }
+            } else {
+               TBOX_ERROR(
+                  "CartesianEdgeFloatConservativeLinearRefine error...\n"
+                  << "dim > 3 not supported." << std::endl);
+            }
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianEdgeFloatConservativeLinearRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianEdgeFloatConservativeLinearRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Conservative linear refine operator for edge-centered
+ *                float data on a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianEdgeFloatConservativeLinearRefine
+#define included_geom_CartesianEdgeFloatConservativeLinearRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianEdgeFloatConservativeLinearRefine implements
+ * conservative linear interpolation for edge-centered float patch data
+ * defined over a Cartesian mesh.  It is derived from the base class
+ * xfer::RefineOperator.  The numerical operations for the interpolation
+ * use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is edge-centered float, and the std::string is
+ * "CONSERVATIVE_LINEAR_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class CartesianEdgeFloatConservativeLinearRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianEdgeFloatConservativeLinearRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianEdgeFloatConservativeLinearRefine();
+
+   /**
+    * Return true if the variable and name std::string match edge-centered
+    * float conservative linear interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * The priority of edge-centered float conservative linear is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * Return name std::string identifier of this refinement operation.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The stencil width of the conservative linear interpolation operator is
+    * the vector of ones.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the edge-centered float conservative
+    * linear interpolation operator.  Interpolation is performed on the
+    * intersection of the destination patch and the boxes contained in
+    * fine_overlap.  It is assumed that the coarse patch contains sufficient
+    * data for the stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianEdgeFloatWeightedAverage.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianEdgeFloatWeightedAverage.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,246 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for edge-centered float data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianEdgeFloatWeightedAverage_C
+#define included_geom_CartesianEdgeFloatWeightedAverage_C
+
+#include "SAMRAI/geom/CartesianEdgeFloatWeightedAverage.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/pdat/EdgeVariable.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartcoarsen1d.f:
+void F77_FUNC(cartwgtavgedgeflot1d, CARTWGTAVGEDGEFLOT1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+// in cartcoarsen2d.f:
+void F77_FUNC(cartwgtavgedgeflot2d0, CARTWGTAVGEDGEFLOT2D0) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+
+void F77_FUNC(cartwgtavgedgeflot2d1, CARTWGTAVGEDGEFLOT2D1) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+// in cartcoarsen3d.f:
+void F77_FUNC(cartwgtavgedgeflot3d0, CARTWGTAVGEDGEFLOT3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+void F77_FUNC(cartwgtavgedgeflot3d1, CARTWGTAVGEDGEFLOT3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+void F77_FUNC(cartwgtavgedgeflot3d2, CARTWGTAVGEDGEFLOT3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianEdgeFloatWeightedAverage::CartesianEdgeFloatWeightedAverage(
+   const tbox::Dimension& dim):
+   xfer::CoarsenOperator(dim, "CONSERVATIVE_COARSEN")
+{
+   d_name_id = "CONSERVATIVE_COARSEN";
+}
+
+CartesianEdgeFloatWeightedAverage::~CartesianEdgeFloatWeightedAverage()
+{
+}
+
+bool CartesianEdgeFloatWeightedAverage::findCoarsenOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::EdgeVariable<float> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianEdgeFloatWeightedAverage::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int CartesianEdgeFloatWeightedAverage::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianEdgeFloatWeightedAverage::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void CartesianEdgeFloatWeightedAverage::coarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, coarse, fine, coarse_box, ratio);
+
+   tbox::Pointer<pdat::EdgeData<float> >
+   fdata = fine.getPatchData(src_component);
+   tbox::Pointer<pdat::EdgeData<float> >
+   cdata = coarse.getPatchData(dst_component);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+#endif
+
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+   const hier::Index cilo = cdata->getGhostBox().lower();
+   const hier::Index cihi = cdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+
+   for (int d = 0; d < cdata->getDepth(); d++) {
+      if ((dim == tbox::Dimension(1))) {
+         F77_FUNC(cartwgtavgedgeflot1d, CARTWGTAVGEDGEFLOT1D) (ifirstc(0),
+            ilastc(0),
+            filo(0), fihi(0),
+            cilo(0), cihi(0),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(0, d),
+            cdata->getPointer(0, d));
+      } else if ((dim == tbox::Dimension(2))) {
+         F77_FUNC(cartwgtavgedgeflot2d0, CARTWGTAVGEDGEFLOT2D0) (ifirstc(0),
+            ifirstc(1), ilastc(0), ilastc(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(0, d),
+            cdata->getPointer(0, d));
+         F77_FUNC(cartwgtavgedgeflot2d1, CARTWGTAVGEDGEFLOT2D1) (ifirstc(0),
+            ifirstc(1), ilastc(0), ilastc(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(1, d),
+            cdata->getPointer(1, d));
+      } else if ((dim == tbox::Dimension(3))) {
+         F77_FUNC(cartwgtavgedgeflot3d0, CARTWGTAVGEDGEFLOT3D0) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(0, d),
+            cdata->getPointer(0, d));
+         F77_FUNC(cartwgtavgedgeflot3d1, CARTWGTAVGEDGEFLOT3D1) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(1, d),
+            cdata->getPointer(1, d));
+         F77_FUNC(cartwgtavgedgeflot3d2, CARTWGTAVGEDGEFLOT3D2) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(2, d),
+            cdata->getPointer(2, d));
+      } else {
+         TBOX_ERROR("CartesianEdgeFloatWeightedAverage error...\n"
+            << "dim > 3 not supported." << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianEdgeFloatWeightedAverage.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianEdgeFloatWeightedAverage.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,109 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for edge-centered float data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianEdgeFloatWeightedAverage
+#define included_geom_CartesianEdgeFloatWeightedAverage
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+#ifndef included_String
+#include <string>
+#define included_String
+#endif
+#include "SAMRAI/xfer/CoarsenOperator.h"
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianEdgeFloatWeightedAverage implements conservative
+ * edge-weighted averaging for edge-centered float patch data defined over a
+ * Cartesian mesh.  It is derived from the xfer::CoarsenOperator base class.
+ * The numerical operations for theaveraging use FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is edge-centered float, and the std::string is "CONSERVATIVE_COARSEN".
+ *
+ * @see xfer::CoarsenOperator
+ */
+
+class CartesianEdgeFloatWeightedAverage:
+   public xfer::CoarsenOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianEdgeFloatWeightedAverage(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianEdgeFloatWeightedAverage();
+
+   /**
+    * Return true if the variable and name std::string match the edge-centered
+    * float weighted averaging; otherwise, return false.
+    */
+   bool
+   findCoarsenOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this coarsening operation.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of edge-centered float weighted averaging is 0.
+    * It will be performed before any user-defined coarsen operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the weighted averaging operator is the vector of
+    * zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Coarsen the source component on the fine patch to the destination
+    * component on the coarse patch using the edge-centered float weighted
+    * averaging operator.  Coarsening is performed on the intersection of
+    * the destination patch and the coarse box.  It is assumed that the
+    * fine patch contains sufficient data for the stencil width of the
+    * coarsening operator.
+    */
+   void
+   coarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianFaceComplexWeightedAverage.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianFaceComplexWeightedAverage.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,248 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for face-centered complex data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianFaceComplexWeightedAverage_C
+#define included_geom_CartesianFaceComplexWeightedAverage_C
+
+#include "SAMRAI/geom/CartesianFaceComplexWeightedAverage.h"
+#include "SAMRAI/tbox/Complex.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartcoarsen1d.f:
+void F77_FUNC(cartwgtavgfacecplx1d, CARTWGTAVGFACECPLX1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+// in cartcoarsen2d.f:
+void F77_FUNC(cartwgtavgfacecplx2d0, CARTWGTAVGFACECPLX2D0) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+
+void F77_FUNC(cartwgtavgfacecplx2d1, CARTWGTAVGFACECPLX2D1) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+// in cartcoarsen3d.f:
+void F77_FUNC(cartwgtavgfacecplx3d0, CARTWGTAVGFACECPLX3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+void F77_FUNC(cartwgtavgfacecplx3d1, CARTWGTAVGFACECPLX3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+void F77_FUNC(cartwgtavgfacecplx3d2, CARTWGTAVGFACECPLX3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianFaceComplexWeightedAverage::CartesianFaceComplexWeightedAverage(
+   const tbox::Dimension& dim):
+   xfer::CoarsenOperator(dim, "CONSERVATIVE_COARSEN")
+{
+   d_name_id = "CONSERVATIVE_COARSEN";
+}
+
+CartesianFaceComplexWeightedAverage::~CartesianFaceComplexWeightedAverage()
+{
+}
+
+bool CartesianFaceComplexWeightedAverage::findCoarsenOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::FaceVariable<dcomplex> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianFaceComplexWeightedAverage::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int CartesianFaceComplexWeightedAverage::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianFaceComplexWeightedAverage::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void CartesianFaceComplexWeightedAverage::coarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, coarse, fine, coarse_box, ratio);
+
+   tbox::Pointer<pdat::FaceData<dcomplex> >
+   fdata = fine.getPatchData(src_component);
+   tbox::Pointer<pdat::FaceData<dcomplex> >
+   cdata = coarse.getPatchData(dst_component);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+#endif
+
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+   const hier::Index cilo = cdata->getGhostBox().lower();
+   const hier::Index cihi = cdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+
+   for (int d = 0; d < cdata->getDepth(); d++) {
+      if ((dim == tbox::Dimension(1))) {
+         F77_FUNC(cartwgtavgfacecplx1d, CARTWGTAVGFACECPLX1D) (ifirstc(0),
+            ilastc(0),
+            filo(0), fihi(0),
+            cilo(0), cihi(0),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(0, d),
+            cdata->getPointer(0, d));
+      } else if ((dim == tbox::Dimension(2))) {
+         F77_FUNC(cartwgtavgfacecplx2d0, CARTWGTAVGFACECPLX2D0) (ifirstc(0),
+            ifirstc(1), ilastc(0), ilastc(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(0, d),
+            cdata->getPointer(0, d));
+         F77_FUNC(cartwgtavgfacecplx2d1, CARTWGTAVGFACECPLX2D1) (ifirstc(0),
+            ifirstc(1), ilastc(0), ilastc(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(1, d),
+            cdata->getPointer(1, d));
+      } else if ((dim == tbox::Dimension(3))) {
+         F77_FUNC(cartwgtavgfacecplx3d0, CARTWGTAVGFACECPLX3D0) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(0, d),
+            cdata->getPointer(0, d));
+         F77_FUNC(cartwgtavgfacecplx3d1, CARTWGTAVGFACECPLX3D1) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(1, d),
+            cdata->getPointer(1, d));
+         F77_FUNC(cartwgtavgfacecplx3d2, CARTWGTAVGFACECPLX3D2) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(2, d),
+            cdata->getPointer(2, d));
+      } else {
+         TBOX_ERROR("CartesianFaceComplexWeightedAverage error...\n"
+            << "dim > 3 not supported." << std::endl);
+      }
+
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianFaceComplexWeightedAverage.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianFaceComplexWeightedAverage.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for face-centered complex data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianFaceComplexWeightedAverage
+#define included_geom_CartesianFaceComplexWeightedAverage
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#ifndef included_String
+#include <string>
+#define included_String
+#endif
+#include "SAMRAI/xfer/CoarsenOperator.h"
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianFaceComplexWeightedAverage implements conservative
+ * face-weighted averaging for face-centered complex patch data defined over
+ * a Cartesian mesh.  It is derived from the xfer::CoarsenOperator base class.
+ * The numerical operations for the averaging use FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is face-centered complex, and the std::string is "CONSERVATIVE_COARSEN".
+ *
+ * @see xfer::CoarsenOperator
+ */
+
+class CartesianFaceComplexWeightedAverage:
+   public xfer::CoarsenOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianFaceComplexWeightedAverage(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianFaceComplexWeightedAverage();
+
+   /**
+    * Return true if the variable and name std::string match the face-centered
+    * complex weighted averaging; otherwise, return false.
+    */
+   bool
+   findCoarsenOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this coarsening operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of face-centered complex weighted averaging is 0.
+    * It will be performed before any user-defined coarsen operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the weighted averaging operator is the vector of
+    * zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Coarsen the source component on the fine patch to the destination
+    * component on the coarse patch using the face-centered complex weighted
+    * averaging operator.  Coarsening is performed on the intersection of
+    * the destination patch and the coarse box.  It is assumed that the
+    * fine patch contains sufficient data for the stencil width of the
+    * coarsening operator.
+    */
+   void
+   coarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianFaceDoubleConservativeLinearRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianFaceDoubleConservativeLinearRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,337 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Conservative linear refine operator for face-centered
+ *                double data on a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianFaceDoubleConservativeLinearRefine_C
+#define included_geom_CartesianFaceDoubleConservativeLinearRefine_C
+
+#include "SAMRAI/geom/CartesianFaceDoubleConservativeLinearRefine.h"
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartrefine1d.f:
+void F77_FUNC(cartclinreffacedoub1d, CARTCLINREFFACEDOUB1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *,
+   double *, double *);
+// in cartrefine2d.f:
+void F77_FUNC(cartclinreffacedoub2d0, CARTCLINREFFACEDOUB2D0) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *,
+   double *, double *, double *, double *);
+void F77_FUNC(cartclinreffacedoub2d1, CARTCLINREFFACEDOUB2D1) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *,
+   double *, double *, double *, double *);
+// in cartrefine3d.f:
+void F77_FUNC(cartclinreffacedoub3d0, CARTCLINREFFACEDOUB3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *,
+   double *, double *, double *,
+   double *, double *, double *);
+void F77_FUNC(cartclinreffacedoub3d1, CARTCLINREFFACEDOUB3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *,
+   double *, double *, double *,
+   double *, double *, double *);
+void F77_FUNC(cartclinreffacedoub3d2, CARTCLINREFFACEDOUB3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *,
+   double *, double *, double *,
+   double *, double *, double *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianFaceDoubleConservativeLinearRefine::
+CartesianFaceDoubleConservativeLinearRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSERVATIVE_LINEAR_REFINE")
+{
+   d_name_id = "CONSERVATIVE_LINEAR_REFINE";
+}
+
+CartesianFaceDoubleConservativeLinearRefine::~
+CartesianFaceDoubleConservativeLinearRefine()
+{
+}
+
+bool CartesianFaceDoubleConservativeLinearRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::FaceVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianFaceDoubleConservativeLinearRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int
+CartesianFaceDoubleConservativeLinearRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianFaceDoubleConservativeLinearRefine::getStencilWidth() const {
+   return hier::IntVector::getOne(getDim());
+}
+
+void CartesianFaceDoubleConservativeLinearRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS3(dim, fine, coarse, ratio);
+
+   tbox::Pointer<pdat::FaceData<double> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<pdat::FaceData<double> >
+   fdata = fine.getPatchData(dst_component);
+
+   const pdat::FaceOverlap* t_overlap =
+      dynamic_cast<const pdat::FaceOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+
+   for (int axis = 0; axis < dim.getValue(); axis++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(axis);
+
+      for (hier::BoxList::Iterator b(boxes); b; b++) {
+
+         const hier::Box& face_box = b();
+         TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, face_box);
+
+         hier::Box fine_box(dim);
+         for (int i = 0; i < dim.getValue(); i++) {
+            fine_box.lower((axis + i) % dim.getValue()) = face_box.lower(i);
+            fine_box.upper((axis + i) % dim.getValue()) = face_box.upper(i);
+         }
+
+         fine_box.upper(axis) -= 1;
+
+         const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+         const hier::Index ifirstc = coarse_box.lower();
+         const hier::Index ilastc = coarse_box.upper();
+         const hier::Index ifirstf = fine_box.lower();
+         const hier::Index ilastf = fine_box.upper();
+
+         const hier::IntVector tmp_ghosts(dim, 0);
+         tbox::Array<double> diff0(cgbox.numberCells(0) + 2);
+         pdat::FaceData<double> slope0(cgbox, 1, tmp_ghosts);
+
+         for (int d = 0; d < fdata->getDepth(); d++) {
+            if ((dim == tbox::Dimension(1))) {
+               F77_FUNC(cartclinreffacedoub1d, CARTCLINREFFACEDOUB1D) (
+                  ifirstc(0), ilastc(0),
+                  ifirstf(0), ilastf(0),
+                  cilo(0), cihi(0),
+                  filo(0), fihi(0),
+                  &ratio[0],
+                  cgeom->getDx(),
+                  fgeom->getDx(),
+                  cdata->getPointer(0, d),
+                  fdata->getPointer(0, d),
+                  diff0.getPointer(), slope0.getPointer(0));
+            } else if ((dim == tbox::Dimension(2))) {
+               tbox::Array<double> diff1(cgbox.numberCells(1) + 2);
+               pdat::FaceData<double> slope1(cgbox, 1, tmp_ghosts);
+
+               if (axis == 0) {
+                  F77_FUNC(cartclinreffacedoub2d0, CARTCLINREFFACEDOUB2D0) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d),
+                     diff0.getPointer(), slope0.getPointer(0),
+                     diff1.getPointer(), slope1.getPointer(0));
+               } else if (axis == 1) {
+                  F77_FUNC(cartclinreffacedoub2d1, CARTCLINREFFACEDOUB2D1) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d),
+                     diff1.getPointer(), slope1.getPointer(1),
+                     diff0.getPointer(), slope0.getPointer(1));
+               }
+            } else if ((dim == tbox::Dimension(3))) {
+               tbox::Array<double> diff1(cgbox.numberCells(1) + 2);
+               pdat::FaceData<double> slope1(cgbox, 1, tmp_ghosts);
+
+               tbox::Array<double> diff2(cgbox.numberCells(2) + 2);
+               pdat::FaceData<double> slope2(cgbox, 1, tmp_ghosts);
+
+               if (axis == 0) {
+                  F77_FUNC(cartclinreffacedoub3d0, CARTCLINREFFACEDOUB3D0) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d),
+                     diff0.getPointer(), slope0.getPointer(0),
+                     diff1.getPointer(), slope1.getPointer(0),
+                     diff2.getPointer(), slope2.getPointer(0));
+               } else if (axis == 1) {
+                  F77_FUNC(cartclinreffacedoub3d1, CARTCLINREFFACEDOUB3D1) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d),
+                     diff1.getPointer(), slope1.getPointer(1),
+                     diff2.getPointer(), slope2.getPointer(1),
+                     diff0.getPointer(), slope0.getPointer(1));
+               } else if (axis == 2) {
+                  F77_FUNC(cartclinreffacedoub3d2, CARTCLINREFFACEDOUB3D2) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(2, d),
+                     fdata->getPointer(2, d),
+                     diff2.getPointer(), slope2.getPointer(2),
+                     diff0.getPointer(), slope0.getPointer(2),
+                     diff1.getPointer(), slope1.getPointer(2));
+               }
+            } else {
+               TBOX_ERROR(
+                  "CartesianFaceDoubleConservativeLinearRefine error...\n"
+                  << "dim > 3 not supported." << std::endl);
+            }
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianFaceDoubleConservativeLinearRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianFaceDoubleConservativeLinearRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Conservative linear refine operator for face-centered
+ *                double data on a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianFaceDoubleConservativeLinearRefine
+#define included_geom_CartesianFaceDoubleConservativeLinearRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianFaceDoubleConservativeLinearRefine implements
+ * conservative linear interpolation for face-centered double patch data
+ * defined over a Cartesian mesh.  It is derived from the base class
+ * xfer::RefineOperator.  The numerical operations for the interpolation
+ * use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is face-centered double, and the std::string is
+ * "CONSERVATIVE_LINEAR_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class CartesianFaceDoubleConservativeLinearRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianFaceDoubleConservativeLinearRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianFaceDoubleConservativeLinearRefine();
+
+   /**
+    * Return true if the variable and name std::string match face-centered
+    * double conservative linear interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of face-centered double conservative linear is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the conservative linear interpolation operator is
+    * the vector of ones.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the face-centered double conservative
+    * linear interpolation operator.  Interpolation is performed on the
+    * intersection of the destination patch and the boxes contained in
+    * fine_overlap.  It is assumed that the coarse patch contains sufficient
+    * data for the stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianFaceDoubleWeightedAverage.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianFaceDoubleWeightedAverage.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,246 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for face-centered double data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianFaceDoubleWeightedAverage_C
+#define included_geom_CartesianFaceDoubleWeightedAverage_C
+
+#include "SAMRAI/geom/CartesianFaceDoubleWeightedAverage.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartcoarsen1d.f:
+void F77_FUNC(cartwgtavgfacedoub1d, CARTWGTAVGFACEDOUB1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+// in cartcoarsen2d.f:
+void F77_FUNC(cartwgtavgfacedoub2d0, CARTWGTAVGFACEDOUB2D0) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+
+void F77_FUNC(cartwgtavgfacedoub2d1, CARTWGTAVGFACEDOUB2D1) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+// in cartcoarsen3d.f:
+void F77_FUNC(cartwgtavgfacedoub3d0, CARTWGTAVGFACEDOUB3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+void F77_FUNC(cartwgtavgfacedoub3d1, CARTWGTAVGFACEDOUB3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+void F77_FUNC(cartwgtavgfacedoub3d2, CARTWGTAVGFACEDOUB3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianFaceDoubleWeightedAverage::CartesianFaceDoubleWeightedAverage(
+   const tbox::Dimension& dim):
+   xfer::CoarsenOperator(dim, "CONSERVATIVE_COARSEN")
+{
+   d_name_id = "CONSERVATIVE_COARSEN";
+}
+
+CartesianFaceDoubleWeightedAverage::~CartesianFaceDoubleWeightedAverage()
+{
+}
+
+bool CartesianFaceDoubleWeightedAverage::findCoarsenOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::FaceVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianFaceDoubleWeightedAverage::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int CartesianFaceDoubleWeightedAverage::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianFaceDoubleWeightedAverage::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void CartesianFaceDoubleWeightedAverage::coarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, coarse, fine, coarse_box, ratio);
+
+   tbox::Pointer<pdat::FaceData<double> >
+   fdata = fine.getPatchData(src_component);
+   tbox::Pointer<pdat::FaceData<double> >
+   cdata = coarse.getPatchData(dst_component);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+#endif
+
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+   const hier::Index cilo = cdata->getGhostBox().lower();
+   const hier::Index cihi = cdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+
+   for (int d = 0; d < cdata->getDepth(); d++) {
+      if ((dim == tbox::Dimension(1))) {
+         F77_FUNC(cartwgtavgfacedoub1d, CARTWGTAVGFACEDOUB1D) (ifirstc(0),
+            ilastc(0),
+            filo(0), fihi(0),
+            cilo(0), cihi(0),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(0, d),
+            cdata->getPointer(0, d));
+      } else if ((dim == tbox::Dimension(2))) {
+         F77_FUNC(cartwgtavgfacedoub2d0, CARTWGTAVGFACEDOUB2D0) (ifirstc(0),
+            ifirstc(1), ilastc(0), ilastc(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(0, d),
+            cdata->getPointer(0, d));
+         F77_FUNC(cartwgtavgfacedoub2d1, CARTWGTAVGFACEDOUB2D1) (ifirstc(0),
+            ifirstc(1), ilastc(0), ilastc(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(1, d),
+            cdata->getPointer(1, d));
+      } else if ((dim == tbox::Dimension(3))) {
+         F77_FUNC(cartwgtavgfacedoub3d0, CARTWGTAVGFACEDOUB3D0) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(0, d),
+            cdata->getPointer(0, d));
+         F77_FUNC(cartwgtavgfacedoub3d1, CARTWGTAVGFACEDOUB3D1) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(1, d),
+            cdata->getPointer(1, d));
+         F77_FUNC(cartwgtavgfacedoub3d2, CARTWGTAVGFACEDOUB3D2) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(2, d),
+            cdata->getPointer(2, d));
+      } else {
+         TBOX_ERROR("CartesianFaceDoubleWeightedAverage error...\n"
+            << "dim > 3 not supported." << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianFaceDoubleWeightedAverage.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianFaceDoubleWeightedAverage.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for face-centered double data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianFaceDoubleWeightedAverage
+#define included_geom_CartesianFaceDoubleWeightedAverage
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianFaceDoubleWeightedAverage implements conservative
+ * face-weighted averaging for face-centered double patch data defined over
+ * a Cartesian mesh.  It is derived from the xfer::CoarsenOperator base class.
+ * The numerical operations for the averaging use FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is face-centered double, and the std::string is "CONSERVATIVE_COARSEN".
+ *
+ * @see xfer::CoarsenOperator
+ */
+
+class CartesianFaceDoubleWeightedAverage:
+   public xfer::CoarsenOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianFaceDoubleWeightedAverage(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianFaceDoubleWeightedAverage();
+
+   /**
+    * Return true if the variable and name std::string match the face-centered
+    * double weighted averaging; otherwise, return false.
+    */
+   bool
+   findCoarsenOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this coarsening operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of face-centered double weighted averaging is 0.
+    * It will be performed before any user-defined coarsen operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the weighted averaging operator is the vector of
+    * zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Coarsen the source component on the fine patch to the destination
+    * component on the coarse patch using the face-centered double weighted
+    * averaging operator.  Coarsening is performed on the intersection of
+    * the destination patch and the coarse box.  It is assumed that the
+    * fine patch contains sufficient data for the stencil width of the
+    * coarsening operator.
+    */
+   void
+   coarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianFaceFloatConservativeLinearRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianFaceFloatConservativeLinearRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,335 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Conservative linear refine operator for face-centered
+ *                float data on a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianFaceFloatConservativeLinearRefine_C
+#define included_geom_CartesianFaceFloatConservativeLinearRefine_C
+
+#include "SAMRAI/geom/CartesianFaceFloatConservativeLinearRefine.h"
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartrefine1d.f:
+void F77_FUNC(cartclinreffaceflot1d, CARTCLINREFFACEFLOT1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *,
+   float *, float *);
+// in cartrefine2d.f:
+void F77_FUNC(cartclinreffaceflot2d0, CARTCLINREFFACEFLOT2D0) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *,
+   float *, float *, float *, float *);
+void F77_FUNC(cartclinreffaceflot2d1, CARTCLINREFFACEFLOT2D1) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *,
+   float *, float *, float *, float *);
+// in cartrefine3d.f:
+void F77_FUNC(cartclinreffaceflot3d0, CARTCLINREFFACEFLOT3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *,
+   float *, float *, float *,
+   float *, float *, float *);
+void F77_FUNC(cartclinreffaceflot3d1, CARTCLINREFFACEFLOT3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *,
+   float *, float *, float *,
+   float *, float *, float *);
+void F77_FUNC(cartclinreffaceflot3d2, CARTCLINREFFACEFLOT3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *,
+   float *, float *, float *,
+   float *, float *, float *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+CartesianFaceFloatConservativeLinearRefine::
+CartesianFaceFloatConservativeLinearRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSERVATIVE_LINEAR_REFINE")
+{
+   d_name_id = "CONSERVATIVE_LINEAR_REFINE";
+}
+
+CartesianFaceFloatConservativeLinearRefine::~
+CartesianFaceFloatConservativeLinearRefine()
+{
+}
+
+bool CartesianFaceFloatConservativeLinearRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::FaceVariable<float> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianFaceFloatConservativeLinearRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int
+CartesianFaceFloatConservativeLinearRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianFaceFloatConservativeLinearRefine::getStencilWidth() const {
+   return hier::IntVector::getOne(getDim());
+}
+
+void CartesianFaceFloatConservativeLinearRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS3(dim, fine, coarse, ratio);
+
+   tbox::Pointer<pdat::FaceData<float> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<pdat::FaceData<float> >
+   fdata = fine.getPatchData(dst_component);
+
+   const pdat::FaceOverlap* t_overlap =
+      dynamic_cast<const pdat::FaceOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+
+   for (int axis = 0; axis < dim.getValue(); axis++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(axis);
+
+      for (hier::BoxList::Iterator b(boxes); b; b++) {
+
+         const hier::Box& face_box = b();
+         TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, face_box);
+
+         hier::Box fine_box(dim);
+         for (int i = 0; i < dim.getValue(); i++) {
+            fine_box.lower((axis + i) % dim.getValue()) = face_box.lower(i);
+            fine_box.upper((axis + i) % dim.getValue()) = face_box.upper(i);
+         }
+
+         fine_box.upper(axis) -= 1;
+
+         const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+         const hier::Index ifirstc = coarse_box.lower();
+         const hier::Index ilastc = coarse_box.upper();
+         const hier::Index ifirstf = fine_box.lower();
+         const hier::Index ilastf = fine_box.upper();
+
+         const hier::IntVector tmp_ghosts(dim, 0);
+         tbox::Array<float> diff0(cgbox.numberCells(0) + 2);
+         pdat::FaceData<float> slope0(cgbox, 1, tmp_ghosts);
+
+         for (int d = 0; d < fdata->getDepth(); d++) {
+            if ((dim == tbox::Dimension(1))) {
+               F77_FUNC(cartclinreffaceflot1d, CARTCLINREFFACEFLOT1D) (
+                  ifirstc(0), ilastc(0),
+                  ifirstf(0), ilastf(0),
+                  cilo(0), cihi(0),
+                  filo(0), fihi(0),
+                  &ratio[0],
+                  cgeom->getDx(),
+                  fgeom->getDx(),
+                  cdata->getPointer(0, d),
+                  fdata->getPointer(0, d),
+                  diff0.getPointer(), slope0.getPointer(0));
+            } else if ((dim == tbox::Dimension(2))) {
+               tbox::Array<float> diff1(cgbox.numberCells(1) + 2);
+               pdat::FaceData<float> slope1(cgbox, 1, tmp_ghosts);
+
+               if (axis == 0) {
+                  F77_FUNC(cartclinreffaceflot2d0, CARTCLINREFFACEFLOT2D0) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d),
+                     diff0.getPointer(), slope0.getPointer(0),
+                     diff1.getPointer(), slope1.getPointer(0));
+               } else if (axis == 1) {
+                  F77_FUNC(cartclinreffaceflot2d1, CARTCLINREFFACEFLOT2D1) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d),
+                     diff1.getPointer(), slope1.getPointer(1),
+                     diff0.getPointer(), slope0.getPointer(1));
+               }
+            } else if ((dim == tbox::Dimension(3))) {
+               tbox::Array<float> diff1(cgbox.numberCells(1) + 2);
+               pdat::FaceData<float> slope1(cgbox, 1, tmp_ghosts);
+
+               tbox::Array<float> diff2(cgbox.numberCells(2) + 2);
+               pdat::FaceData<float> slope2(cgbox, 1, tmp_ghosts);
+
+               if (axis == 0) {
+                  F77_FUNC(cartclinreffaceflot3d0, CARTCLINREFFACEFLOT3D0) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d),
+                     diff0.getPointer(), slope0.getPointer(0),
+                     diff1.getPointer(), slope1.getPointer(0),
+                     diff2.getPointer(), slope2.getPointer(0));
+               } else if (axis == 1) {
+                  F77_FUNC(cartclinreffaceflot3d1, CARTCLINREFFACEFLOT3D1) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d),
+                     diff1.getPointer(), slope1.getPointer(1),
+                     diff2.getPointer(), slope2.getPointer(1),
+                     diff0.getPointer(), slope0.getPointer(1));
+               } else if (axis == 2) {
+                  F77_FUNC(cartclinreffaceflot3d2, CARTCLINREFFACEFLOT3D2) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(2, d),
+                     fdata->getPointer(2, d),
+                     diff2.getPointer(), slope2.getPointer(2),
+                     diff0.getPointer(), slope0.getPointer(2),
+                     diff1.getPointer(), slope1.getPointer(2));
+               }
+            } else {
+               TBOX_ERROR(
+                  "CartesianFaceFloatConservativeLinearRefine error...\n"
+                  << "dim > 3 not supported." << std::endl);
+            }
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianFaceFloatConservativeLinearRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianFaceFloatConservativeLinearRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Conservative linear refine operator for face-centered
+ *                float data on a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianFaceFloatConservativeLinearRefine
+#define included_geom_CartesianFaceFloatConservativeLinearRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianFaceFloatConservativeLinearRefine implements
+ * conservative linear interpolation for face-centered float patch data
+ * defined over a Cartesian mesh.  It is derived from the base class
+ * xfer::RefineOperator.  The numerical operations for the interpolation
+ * use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is face-centered float, and the std::string is
+ * "CONSERVATIVE_LINEAR_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class CartesianFaceFloatConservativeLinearRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianFaceFloatConservativeLinearRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianFaceFloatConservativeLinearRefine();
+
+   /**
+    * Return true if the variable and name std::string match face-centered
+    * float conservative linear interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of face-centered float conservative linear is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the conservative linear interpolation operator is
+    * the vector of ones.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the face-centered float conservative
+    * linear interpolation operator.  Interpolation is performed on the
+    * intersection of the destination patch and the boxes contained in
+    * fine_overlap.  It is assumed that the coarse patch contains sufficient
+    * data for the stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianFaceFloatWeightedAverage.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianFaceFloatWeightedAverage.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,246 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for face-centered float data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianFaceFloatWeightedAverage_C
+#define included_geom_CartesianFaceFloatWeightedAverage_C
+
+#include "SAMRAI/geom/CartesianFaceFloatWeightedAverage.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartcoarsen1d.f:
+void F77_FUNC(cartwgtavgfaceflot1d, CARTWGTAVGFACEFLOT1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+// in cartcoarsen2d.f:
+void F77_FUNC(cartwgtavgfaceflot2d0, CARTWGTAVGFACEFLOT2D0) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+
+void F77_FUNC(cartwgtavgfaceflot2d1, CARTWGTAVGFACEFLOT2D1) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+// in cartcoarsen3d.f:
+void F77_FUNC(cartwgtavgfaceflot3d0, CARTWGTAVGFACEFLOT3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+void F77_FUNC(cartwgtavgfaceflot3d1, CARTWGTAVGFACEFLOT3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+void F77_FUNC(cartwgtavgfaceflot3d2, CARTWGTAVGFACEFLOT3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianFaceFloatWeightedAverage::CartesianFaceFloatWeightedAverage(
+   const tbox::Dimension& dim):
+   xfer::CoarsenOperator(dim, "CONSERVATIVE_COARSEN")
+{
+   d_name_id = "CONSERVATIVE_COARSEN";
+}
+
+CartesianFaceFloatWeightedAverage::~CartesianFaceFloatWeightedAverage()
+{
+}
+
+bool CartesianFaceFloatWeightedAverage::findCoarsenOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::FaceVariable<float> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianFaceFloatWeightedAverage::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int CartesianFaceFloatWeightedAverage::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianFaceFloatWeightedAverage::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void CartesianFaceFloatWeightedAverage::coarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, coarse, fine, coarse_box, ratio);
+
+   tbox::Pointer<pdat::FaceData<float> >
+   fdata = fine.getPatchData(src_component);
+   tbox::Pointer<pdat::FaceData<float> >
+   cdata = coarse.getPatchData(dst_component);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+#endif
+
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+   const hier::Index cilo = cdata->getGhostBox().lower();
+   const hier::Index cihi = cdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+
+   for (int d = 0; d < cdata->getDepth(); d++) {
+      if ((dim == tbox::Dimension(1))) {
+         F77_FUNC(cartwgtavgfaceflot1d, CARTWGTAVGFACEFLOT1D) (ifirstc(0),
+            ilastc(0),
+            filo(0), fihi(0),
+            cilo(0), cihi(0),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(0, d),
+            cdata->getPointer(0, d));
+      } else if ((dim == tbox::Dimension(2))) {
+         F77_FUNC(cartwgtavgfaceflot2d0, CARTWGTAVGFACEFLOT2D0) (ifirstc(0),
+            ifirstc(1), ilastc(0), ilastc(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(0, d),
+            cdata->getPointer(0, d));
+         F77_FUNC(cartwgtavgfaceflot2d1, CARTWGTAVGFACEFLOT2D1) (ifirstc(0),
+            ifirstc(1), ilastc(0), ilastc(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(1, d),
+            cdata->getPointer(1, d));
+      } else if ((dim == tbox::Dimension(3))) {
+         F77_FUNC(cartwgtavgfaceflot3d0, CARTWGTAVGFACEFLOT3D0) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(0, d),
+            cdata->getPointer(0, d));
+         F77_FUNC(cartwgtavgfaceflot3d1, CARTWGTAVGFACEFLOT3D1) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(1, d),
+            cdata->getPointer(1, d));
+         F77_FUNC(cartwgtavgfaceflot3d2, CARTWGTAVGFACEFLOT3D2) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            &ratio[0],
+            fgeom->getDx(),
+            cgeom->getDx(),
+            fdata->getPointer(2, d),
+            cdata->getPointer(2, d));
+      } else {
+         TBOX_ERROR("CartesianFaceFloatWeightedAverage error...\n"
+            << "dim > 3 not supported." << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianFaceFloatWeightedAverage.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianFaceFloatWeightedAverage.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for face-centered float data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianFaceFloatWeightedAverage
+#define included_geom_CartesianFaceFloatWeightedAverage
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianFaceFloatWeightedAverage implements conservative
+ * face-weighted averaging for face-centered float patch data defined over
+ * a Cartesian mesh.  It is derived from the xfer::CoarsenOperator base class.
+ * The numerical operations for the averaging use FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is face-centered float, and the std::string is "CONSERVATIVE_COARSEN".
+ *
+ * @see xfer::CoarsenOperator
+ */
+
+class CartesianFaceFloatWeightedAverage:
+   public xfer::CoarsenOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianFaceFloatWeightedAverage(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianFaceFloatWeightedAverage();
+
+   /**
+    * Return true if the variable and name std::string match the face-centered
+    * float weighted averaging; otherwise, return false.
+    */
+   bool
+   findCoarsenOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this coarsening operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of face-centered float weighted averaging is 0.
+    * It will be performed before any user-defined coarsen operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the weighted averaging operator is the vector of
+    * zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Coarsen the source component on the fine patch to the destination
+    * component on the coarse patch using the face-centered float weighted
+    * averaging operator.  Coarsening is performed on the intersection of
+    * the destination patch and the coarse box.  It is assumed that the
+    * fine patch contains sufficient data for the stencil width of the
+    * coarsening operator.
+    */
+   void
+   coarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianGridGeometry.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianGridGeometry.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,850 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Simple Cartesian grid geometry for an AMR hierarchy. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianGridGeometry_C
+#define included_geom_CartesianGridGeometry_C
+
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+
+// Cell data coarsen operators
+#include "SAMRAI/geom/CartesianCellComplexWeightedAverage.h"
+#include "SAMRAI/geom/CartesianCellDoubleWeightedAverage.h"
+#include "SAMRAI/geom/CartesianCellFloatWeightedAverage.h"
+
+// Cell data refine operators
+#include "SAMRAI/geom/CartesianCellComplexConservativeLinearRefine.h"
+#include "SAMRAI/geom/CartesianCellComplexLinearRefine.h"
+#include "SAMRAI/geom/CartesianCellDoubleConservativeLinearRefine.h"
+#include "SAMRAI/geom/CartesianCellDoubleLinearRefine.h"
+#include "SAMRAI/geom/CartesianCellFloatConservativeLinearRefine.h"
+#include "SAMRAI/geom/CartesianCellFloatLinearRefine.h"
+#include "SAMRAI/pdat/CellComplexConstantRefine.h"
+#include "SAMRAI/pdat/CellDoubleConstantRefine.h"
+#include "SAMRAI/pdat/CellFloatConstantRefine.h"
+#include "SAMRAI/pdat/CellIntegerConstantRefine.h"
+
+// Edge data coarsen operators
+#include "SAMRAI/geom/CartesianEdgeComplexWeightedAverage.h"
+#include "SAMRAI/geom/CartesianEdgeDoubleWeightedAverage.h"
+#include "SAMRAI/geom/CartesianEdgeFloatWeightedAverage.h"
+
+// Edge data refine operators
+#include "SAMRAI/geom/CartesianEdgeDoubleConservativeLinearRefine.h"
+#include "SAMRAI/geom/CartesianEdgeFloatConservativeLinearRefine.h"
+#include "SAMRAI/pdat/EdgeComplexConstantRefine.h"
+#include "SAMRAI/pdat/EdgeDoubleConstantRefine.h"
+#include "SAMRAI/pdat/EdgeFloatConstantRefine.h"
+#include "SAMRAI/pdat/EdgeIntegerConstantRefine.h"
+
+// Face data coarsen operators
+#include "SAMRAI/geom/CartesianFaceComplexWeightedAverage.h"
+#include "SAMRAI/geom/CartesianFaceDoubleWeightedAverage.h"
+#include "SAMRAI/geom/CartesianFaceFloatWeightedAverage.h"
+
+// Face data refine operators
+#include "SAMRAI/geom/CartesianFaceDoubleConservativeLinearRefine.h"
+#include "SAMRAI/geom/CartesianFaceFloatConservativeLinearRefine.h"
+#include "SAMRAI/pdat/FaceComplexConstantRefine.h"
+#include "SAMRAI/pdat/FaceDoubleConstantRefine.h"
+#include "SAMRAI/pdat/FaceFloatConstantRefine.h"
+#include "SAMRAI/pdat/FaceIntegerConstantRefine.h"
+
+// Node data coarsen operators
+#include "SAMRAI/pdat/NodeComplexInjection.h"
+#include "SAMRAI/pdat/NodeDoubleInjection.h"
+#include "SAMRAI/pdat/NodeFloatInjection.h"
+#include "SAMRAI/pdat/NodeIntegerInjection.h"
+
+// Node data refine operators
+#include "SAMRAI/geom/CartesianNodeComplexLinearRefine.h"
+#include "SAMRAI/geom/CartesianNodeDoubleLinearRefine.h"
+#include "SAMRAI/geom/CartesianNodeFloatLinearRefine.h"
+
+// Outerface data coarsen operators
+#include "SAMRAI/geom/CartesianOuterfaceComplexWeightedAverage.h"
+#include "SAMRAI/geom/CartesianOuterfaceDoubleWeightedAverage.h"
+#include "SAMRAI/geom/CartesianOuterfaceFloatWeightedAverage.h"
+
+// Outerface data refine operators
+#include "SAMRAI/pdat/OuterfaceComplexConstantRefine.h"
+#include "SAMRAI/pdat/OuterfaceDoubleConstantRefine.h"
+#include "SAMRAI/pdat/OuterfaceFloatConstantRefine.h"
+#include "SAMRAI/pdat/OuterfaceIntegerConstantRefine.h"
+
+// Outernode data coarsen operators
+#include "SAMRAI/pdat/OuternodeDoubleConstantCoarsen.h"
+
+// Outerside data coarsen operators
+#include "SAMRAI/geom/CartesianOutersideDoubleWeightedAverage.h"
+
+// Side data coarsen operators
+#include "SAMRAI/geom/CartesianSideComplexWeightedAverage.h"
+#include "SAMRAI/geom/CartesianSideDoubleWeightedAverage.h"
+#include "SAMRAI/geom/CartesianSideFloatWeightedAverage.h"
+
+// Side data refine operators
+#include "SAMRAI/geom/CartesianSideDoubleConservativeLinearRefine.h"
+#include "SAMRAI/geom/CartesianSideFloatConservativeLinearRefine.h"
+#include "SAMRAI/pdat/SideComplexConstantRefine.h"
+#include "SAMRAI/pdat/SideDoubleConstantRefine.h"
+#include "SAMRAI/pdat/SideFloatConstantRefine.h"
+#include "SAMRAI/pdat/SideIntegerConstantRefine.h"
+
+// Time interpolation operators
+#include "SAMRAI/pdat/CellComplexLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/CellDoubleLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/CellFloatLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/EdgeComplexLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/EdgeDoubleLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/EdgeFloatLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/FaceComplexLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/FaceDoubleLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/FaceFloatLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/NodeComplexLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/NodeDoubleLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/NodeFloatLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/OuterfaceComplexLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/OuterfaceDoubleLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/OuterfaceFloatLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/OutersideComplexLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/OutersideDoubleLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/OutersideFloatLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/SideComplexLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/SideDoubleLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/SideFloatLinearTimeInterpolateOp.h"
+
+#include "SAMRAI/hier/BoundaryLookupTable.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#include <cstdlib>
+#include <fstream>
+
+#define GEOM_CARTESIAN_GRID_GEOMETRY_VERSION (2)
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/geom/CartesianGridGeometry.I"
+#endif
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructors for CartesianGridGeometry.  Both set up operator    *
+ * handlers and register the geometry object with the RestartManager.    *
+ * However, one initializes data members based on arguments.             *
+ * The other initializes the object based on input file information.     *
+ *                                                                       *
+ *************************************************************************
+ */
+CartesianGridGeometry::CartesianGridGeometry(
+   const tbox::Dimension& dim,
+   const std::string& object_name,
+   tbox::Pointer<tbox::Database> input_db,
+   bool register_for_restart):
+   xfer::Geometry(dim, object_name),
+   d_domain_box(dim)
+{
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!input_db.isNull());
+
+   d_object_name = object_name;
+   d_registered_for_restart = register_for_restart;
+
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->
+      registerRestartItem(d_object_name, this);
+   }
+
+   makeStandardOperators();
+
+   bool is_from_restart = tbox::RestartManager::getManager()->isFromRestart();
+   if (is_from_restart && d_registered_for_restart) {
+      getFromRestart();
+   }
+
+   getFromInput(input_db, is_from_restart);
+
+}
+
+CartesianGridGeometry::CartesianGridGeometry(
+   const std::string& object_name,
+   const double* x_lo,
+   const double* x_up,
+   const hier::BoxArray& domain,
+   bool register_for_restart):
+   xfer::Geometry(domain.getDim(), object_name),
+   d_domain_box(domain.getDim())
+{
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!(x_lo == (double *)NULL));
+   TBOX_ASSERT(!(x_up == (double *)NULL));
+
+   d_object_name = object_name;
+   d_registered_for_restart = register_for_restart;
+
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->
+      registerRestartItem(d_object_name, this);
+   }
+
+   setGeometryData(x_lo, x_up, domain);
+
+   makeStandardOperators();
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create and return pointer to refined version of this Cartesian        *
+ * grid geometry object refined by the given ratio.                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::GridGeometry>
+CartesianGridGeometry::makeRefinedGridGeometry(
+   const std::string& fine_geom_name,
+   const hier::IntVector& refine_ratio,
+   bool register_for_restart) const
+{
+   const tbox::Dimension dim(getDim());
+
+   TBOX_ASSERT(!fine_geom_name.empty());
+   TBOX_ASSERT(fine_geom_name != d_object_name);
+   TBOX_ASSERT(refine_ratio > hier::IntVector::getZero(dim));
+
+   hier::BoxArray fine_domain(this->getPhysicalDomain());
+   fine_domain.refine(refine_ratio);
+
+   CartesianGridGeometry* fine_geometry =
+      new CartesianGridGeometry(fine_geom_name,
+         d_x_lo,
+         d_x_up,
+         fine_domain,
+         register_for_restart);
+
+   fine_geometry->initializePeriodicShift(this->getPeriodicShift(hier::
+         IntVector::getOne(dim)));
+
+   return tbox::Pointer<hier::GridGeometry>(fine_geometry);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create and return pointer to coarsened version of this Cartesian      *
+ * grid geometry object coarsened by the given ratio.                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::GridGeometry> CartesianGridGeometry::
+makeCoarsenedGridGeometry(
+   const std::string& coarse_geom_name,
+   const hier::IntVector& coarsen_ratio,
+   bool register_for_restart) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   TBOX_ASSERT(!coarse_geom_name.empty());
+   TBOX_ASSERT(coarse_geom_name != d_object_name);
+   TBOX_ASSERT(coarsen_ratio > hier::IntVector::getZero(dim));
+
+   hier::BoxArray coarse_domain(this->getPhysicalDomain());
+   coarse_domain.coarsen(coarsen_ratio);
+
+   /*
+    * Need to check that domain can be coarsened by given ratio.
+    */
+   const hier::BoxArray& fine_domain = this->getPhysicalDomain();
+   const int nboxes = fine_domain.getNumberOfBoxes();
+   for (int ib = 0; ib < nboxes; ib++) {
+      hier::Box testbox = hier::Box::refine(coarse_domain[ib], coarsen_ratio);
+      if (testbox != fine_domain[ib]) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+         tbox::plog
+         << "CartesianGridGeometry::makeCoarsenedGridGeometry : Box # "
+         << ib << std::endl;
+         tbox::plog << "      fine box = " << fine_domain[ib] << std::endl;
+         tbox::plog << "      coarse box = " << coarse_domain[ib] << std::endl;
+         tbox::plog << "      refined coarse box = " << testbox << std::endl;
+#endif
+         TBOX_ERROR(
+            "geom::CartesianGridGeometry::makeCoarsenedGridGeometry() error...\n"
+            << "    geometry object with name = " << d_object_name
+            << "\n    Cannot be coarsened by ratio " << coarsen_ratio
+            << std::endl);
+      }
+   }
+
+   hier::GridGeometry* coarse_geometry =
+      new geom::CartesianGridGeometry(coarse_geom_name,
+         d_x_lo,
+         d_x_up,
+         coarse_domain,
+         register_for_restart);
+
+   coarse_geometry->initializePeriodicShift(this->getPeriodicShift(hier::
+         IntVector::getOne(dim)));
+
+   return tbox::Pointer<hier::GridGeometry>(coarse_geometry);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destructor for CartesianGridGeometry deallocates grid storage.   *
+ * Note that operator handlers that are created in constructor are       *
+ * deallocated in xfer::Geometry destructor.                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+CartesianGridGeometry::~CartesianGridGeometry()
+{
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->unregisterRestartItem(d_object_name);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set data members for this geometry object based on arguments.         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CartesianGridGeometry::setGeometryData(
+   const double* x_lo,
+   const double* x_up,
+   const hier::BoxArray& domain)
+{
+   const tbox::Dimension& dim(getDim());
+
+   TBOX_ASSERT(!(x_lo == (double *)NULL));
+   TBOX_ASSERT(!(x_up == (double *)NULL));
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, domain);
+
+   for (int id = 0; id < dim.getValue(); id++) {
+      d_x_lo[id] = x_lo[id];
+      d_x_up[id] = x_up[id];
+   }
+
+   this->setPhysicalDomain(domain);
+
+   hier::Box bigbox(dim);
+   for (int k = 0; k < this->getPhysicalDomain().getNumberOfBoxes(); k++)
+      bigbox += this->getPhysicalDomain()[k];
+
+   d_domain_box = bigbox;
+
+   hier::IntVector ncells = d_domain_box.numberCells();
+   for (int id2 = 0; id2 < dim.getValue(); id2++) {
+      double length = d_x_up[id2] - d_x_lo[id2];
+      d_dx[id2] = length / ((double)ncells(id2));
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create default interlevel transfer operator handlers and time         *
+ * interpolation operator handlers.  Add them to appropriate chains.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CartesianGridGeometry::makeStandardOperators()
+{
+
+   const tbox::Dimension& dim(getDim());
+
+   /*
+    * Standard spatial coarsening operators.
+    */
+
+   addSpatialCoarsenOperator(tbox::Pointer<SAMRAI::xfer::CoarsenOperator>(new
+         CartesianCellComplexWeightedAverage(dim)));
+   addSpatialCoarsenOperator(tbox::Pointer<SAMRAI::xfer::CoarsenOperator>(new
+         CartesianEdgeComplexWeightedAverage(dim)));
+   addSpatialCoarsenOperator(tbox::Pointer<SAMRAI::xfer::CoarsenOperator>(new
+         CartesianFaceComplexWeightedAverage(dim)));
+   addSpatialCoarsenOperator(tbox::Pointer<SAMRAI::xfer::CoarsenOperator>(new
+         pdat::NodeComplexInjection(dim)));
+   addSpatialCoarsenOperator(tbox::Pointer<SAMRAI::xfer::CoarsenOperator>(new
+         CartesianOuterfaceComplexWeightedAverage(dim)));
+   addSpatialCoarsenOperator(tbox::Pointer<SAMRAI::xfer::CoarsenOperator>(new
+         CartesianSideComplexWeightedAverage(dim)));
+
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         pdat::CellComplexConstantRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         CartesianCellComplexLinearRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         pdat::EdgeComplexConstantRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         pdat::FaceComplexConstantRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         CartesianNodeComplexLinearRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         pdat::OuterfaceComplexConstantRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         pdat::SideComplexConstantRefine(dim)));
+
+   /*
+    * Standard linear time interpolation operators.
+    */
+
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::CellComplexLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::EdgeComplexLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::FaceComplexLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::NodeComplexLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::OuterfaceComplexLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::OutersideComplexLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::SideComplexLinearTimeInterpolateOp()));
+
+   /*
+    * Standard spatial coarsening operators.
+    */
+
+   addSpatialCoarsenOperator(tbox::Pointer<SAMRAI::xfer::CoarsenOperator>(new
+         CartesianCellFloatWeightedAverage(dim)));
+   addSpatialCoarsenOperator(tbox::Pointer<SAMRAI::xfer::CoarsenOperator>(new
+         CartesianEdgeFloatWeightedAverage(dim)));
+   addSpatialCoarsenOperator(tbox::Pointer<SAMRAI::xfer::CoarsenOperator>(new
+         CartesianFaceFloatWeightedAverage(dim)));
+   addSpatialCoarsenOperator(tbox::Pointer<SAMRAI::xfer::CoarsenOperator>(new
+         pdat::NodeFloatInjection(dim)));
+   addSpatialCoarsenOperator(tbox::Pointer<SAMRAI::xfer::CoarsenOperator>(new
+         CartesianOuterfaceFloatWeightedAverage(dim)));
+   addSpatialCoarsenOperator(tbox::Pointer<SAMRAI::xfer::CoarsenOperator>(new
+         CartesianSideFloatWeightedAverage(dim)));
+
+   /*
+    * Standard spatial refining operators.
+    */
+
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         CartesianCellFloatConservativeLinearRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         CartesianEdgeFloatConservativeLinearRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         pdat::EdgeFloatConstantRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         pdat::CellFloatConstantRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         CartesianCellFloatLinearRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         CartesianFaceFloatConservativeLinearRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         CartesianNodeFloatLinearRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         pdat::FaceFloatConstantRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         pdat::OuterfaceFloatConstantRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         pdat::OuterfaceIntegerConstantRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         CartesianSideFloatConservativeLinearRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         pdat::SideFloatConstantRefine(dim)));
+
+   /*
+    * Standard linear time interpolation operators.
+    */
+
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::CellFloatLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::EdgeFloatLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::FaceFloatLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::NodeFloatLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::OuterfaceFloatLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::OutersideFloatLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::SideFloatLinearTimeInterpolateOp()));
+
+   /*
+    * Standard spatial coarsening operators.
+    */
+   addSpatialCoarsenOperator(tbox::Pointer<SAMRAI::xfer::CoarsenOperator>(new
+         CartesianCellDoubleWeightedAverage(dim)));
+   addSpatialCoarsenOperator(tbox::Pointer<SAMRAI::xfer::CoarsenOperator>(new
+         CartesianEdgeDoubleWeightedAverage(dim)));
+   addSpatialCoarsenOperator(tbox::Pointer<SAMRAI::xfer::CoarsenOperator>(new
+         CartesianFaceDoubleWeightedAverage(dim)));
+   addSpatialCoarsenOperator(tbox::Pointer<SAMRAI::xfer::CoarsenOperator>(new
+         pdat::NodeDoubleInjection(dim)));
+   addSpatialCoarsenOperator(tbox::Pointer<SAMRAI::xfer::CoarsenOperator>(new
+         pdat::NodeIntegerInjection(dim)));
+   addSpatialCoarsenOperator(tbox::Pointer<SAMRAI::xfer::CoarsenOperator>(new
+         CartesianOuterfaceDoubleWeightedAverage(dim)));
+   addSpatialCoarsenOperator(tbox::Pointer<SAMRAI::xfer::CoarsenOperator>(new
+         pdat::OuternodeDoubleConstantCoarsen(dim)));
+   addSpatialCoarsenOperator(tbox::Pointer<SAMRAI::xfer::CoarsenOperator>(new
+         CartesianOutersideDoubleWeightedAverage(dim)));
+   addSpatialCoarsenOperator(tbox::Pointer<SAMRAI::xfer::CoarsenOperator>(new
+         CartesianSideDoubleWeightedAverage(dim)));
+
+   /*
+    * Standard spatial refining operators.
+    */
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         CartesianCellDoubleConservativeLinearRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         pdat::CellDoubleConstantRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         CartesianCellDoubleLinearRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         CartesianEdgeDoubleConservativeLinearRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         pdat::EdgeDoubleConstantRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         pdat::EdgeIntegerConstantRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         pdat::CellIntegerConstantRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         CartesianFaceDoubleConservativeLinearRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         pdat::FaceDoubleConstantRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         pdat::FaceIntegerConstantRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         CartesianNodeDoubleLinearRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         pdat::OuterfaceDoubleConstantRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         CartesianSideDoubleConservativeLinearRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         pdat::SideDoubleConstantRefine(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         pdat::SideIntegerConstantRefine(dim)));
+
+   /*
+    * Standard linear time interpolation operators.
+    */
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::CellDoubleLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::EdgeDoubleLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::FaceDoubleLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::NodeDoubleLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::OuterfaceDoubleLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::OutersideDoubleLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<xfer::TimeInterpolateOperator>(new
+         pdat::SideDoubleLinearTimeInterpolateOp()));
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create CartesianPatchGeometry geometry object, initializing its  *
+ * boundary and grid information and assign it to the given patch.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CartesianGridGeometry::setGeometryDataOnPatch(
+   hier::Patch& patch,
+   const hier::IntVector& ratio_to_level_zero,
+   const TwoDimBool& touches_regular_bdry,
+   const TwoDimBool& touches_periodic_bdry) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(dim, patch, ratio_to_level_zero);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   /*
+    * All components of ratio must be nonzero.  Additionally,
+    * all components not equal to 1 must have the same sign.
+    */
+   TBOX_ASSERT(ratio_to_level_zero != hier::IntVector::getZero(dim));
+
+   if (dim > tbox::Dimension(1)) {
+      for (int i = 0; i < dim.getValue(); i++) {
+         TBOX_ASSERT((ratio_to_level_zero(i)
+                      * ratio_to_level_zero((i + 1) % dim.getValue()) > 0)
+            || (ratio_to_level_zero(i) == 1)
+            || (ratio_to_level_zero((i + 1) % dim.getValue()) == 1));
+      }
+   }
+#endif
+
+   double dx[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   double x_lo[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   double x_up[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   bool coarsen = false;
+   if (ratio_to_level_zero(0) < 0) coarsen = true;
+   hier::IntVector tmp_rat = (ratio_to_level_zero);
+   for (int id2 = 0; id2 < dim.getValue(); id2++) {
+      tmp_rat(id2) = abs(ratio_to_level_zero(id2));
+   }
+
+   hier::Box index_box = d_domain_box;
+   hier::Box box = patch.getBox();
+
+   if (coarsen) {
+      index_box.coarsen(tmp_rat);
+      for (int id3 = 0; id3 < dim.getValue(); id3++) {
+         dx[id3] = d_dx[id3] * ((double)tmp_rat(id3));
+      }
+   } else {
+      index_box.refine(tmp_rat);
+      for (int id4 = 0; id4 < dim.getValue(); id4++) {
+         dx[id4] = d_dx[id4] / ((double)tmp_rat(id4));
+      }
+   }
+
+   for (int id5 = 0; id5 < dim.getValue(); id5++) {
+      x_lo[id5] = d_x_lo[id5]
+         + ((double)(box.lower(id5) - index_box.lower(id5))) * dx[id5];
+      x_up[id5] = x_lo[id5] + ((double)box.numberCells(id5)) * dx[id5];
+   }
+
+   tbox::Pointer<CartesianPatchGeometry> geom(
+      new CartesianPatchGeometry(ratio_to_level_zero,
+         touches_regular_bdry,
+         touches_periodic_bdry,
+         dx, x_lo, x_up));
+
+   patch.setPatchGeometry(geom);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print CartesianGridGeometry class data.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CartesianGridGeometry::printClassData(
+   std::ostream& os) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   os << "Printing CartesianGridGeometry data: this = "
+      << (CartesianGridGeometry *)this << std::endl;
+   os << "d_object_name = " << d_object_name << std::endl;
+
+   int id;
+   os << "d_x_lo = ";
+   for (id = 0; id < dim.getValue(); id++) {
+      os << d_x_lo[id] << "   ";
+   }
+   os << std::endl;
+   os << "d_x_up = ";
+   for (id = 0; id < dim.getValue(); id++) {
+      os << d_x_up[id] << "   ";
+   }
+   os << std::endl;
+   os << "d_dx = ";
+   for (id = 0; id < dim.getValue(); id++) {
+      os << d_dx[id] << "   ";
+   }
+   os << std::endl;
+
+   os << "d_domain_box = " << d_domain_box << std::endl;
+
+   xfer::Geometry::printClassData(os);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Write class version number and object state to database.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CartesianGridGeometry::putToDatabase(
+   tbox::Pointer<tbox::Database> db)
+{
+   TBOX_ASSERT(!db.isNull());
+
+   const tbox::Dimension& dim(getDim());
+
+   db->putInteger("GEOM_CARTESIAN_GRID_GEOMETRY_VERSION",
+      GEOM_CARTESIAN_GRID_GEOMETRY_VERSION);
+   tbox::Array<tbox::DatabaseBox> temp_box_array = this->getPhysicalDomain();
+   db->putDatabaseBoxArray("d_physical_domain", temp_box_array);
+
+   db->putDoubleArray("d_dx", d_dx, dim.getValue());
+   db->putDoubleArray("d_x_lo", d_x_lo, dim.getValue());
+   db->putDoubleArray("d_x_up", d_x_up, dim.getValue());
+
+   hier::IntVector level0_shift(this->getPeriodicShift(
+                                   hier::IntVector::getOne(dim)));
+   int* temp_shift = &level0_shift[0];
+   db->putIntegerArray("d_periodic_shift", temp_shift, dim.getValue());
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Data is read from input only if the simulation is not from restart.   *
+ * Otherwise, all values specifed in the input database are ignored.	*
+ * In this method data from the database are read to local              *
+ * variables and the setGeometryData() method is called to              *
+ * initialize the data members.						*
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CartesianGridGeometry::getFromInput(
+   tbox::Pointer<tbox::Database> db,
+   bool is_from_restart)
+{
+   TBOX_ASSERT(!db.isNull());
+
+   const tbox::Dimension& dim(getDim());
+
+   if (!is_from_restart) {
+
+      hier::BoxArray domain(dim);
+      if (db->keyExists("domain_boxes")) {
+         domain = db->getDatabaseBoxArray("domain_boxes");
+         if (domain.getNumberOfBoxes() == 0) {
+            TBOX_ERROR(
+               "CartesianGridGeometry::getFromInput() error...\n"
+               << "    geometry object with name = " << d_object_name
+               << "\n    Empty `domain_boxes' array found in input."
+               << std::endl);
+         }
+      } else {
+         TBOX_ERROR("CartesianGridGeometry::getFromInput() error...\n"
+            << "    geometry object with name = " << d_object_name
+            << "\n    Key data `domain_boxes' not found in input." << std::endl);
+      }
+
+      double x_lo[tbox::Dimension::MAXIMUM_DIMENSION_VALUE],
+             x_up[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+      if (db->keyExists("x_lo")) {
+         db->getDoubleArray("x_lo", x_lo, dim.getValue());
+      } else {
+         TBOX_ERROR("CartesianGridGeometry::getFromInput() error...\n"
+            << "    geometry object with name = " << d_object_name
+            << "\n    Key data `x_lo' not found in input." << std::endl);
+      }
+      if (db->keyExists("x_up")) {
+         db->getDoubleArray("x_up", x_up, dim.getValue());
+      } else {
+         TBOX_ERROR("CartesianGridGeometry::getFromInput() error...\n"
+            << "    geometry object with name = " << d_object_name
+            << "\n   Key data `x_up' not found in input." << std::endl);
+      }
+
+      int pbc[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      hier::IntVector per_bc(dim, 0);
+      if (db->keyExists("periodic_dimension")) {
+         db->getIntegerArray("periodic_dimension", pbc, dim.getValue());
+         for (int i = 0; i < dim.getValue(); i++) {
+            per_bc(i) = ((pbc[i] == 0) ? 0 : 1);
+         }
+      }
+
+      setGeometryData(x_lo, x_up, domain);
+
+      this->initializePeriodicShift(per_bc);
+
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Checks to see if the version number for the class is the same as	*
+ * as the version number of the restart file.				*
+ * If they are equal, then the data from the database are read to local	*
+ * variables and the setGeometryData() method is called to              *
+ * initialize the data members.						*
+ *                                                                       *
+ *************************************************************************
+ */
+void CartesianGridGeometry::getFromRestart()
+{
+   const tbox::Dimension& dim(getDim());
+
+   tbox::Pointer<tbox::Database> restart_db =
+      tbox::RestartManager::getManager()->getRootDatabase();
+
+   tbox::Pointer<tbox::Database> db;
+
+   if (restart_db->isDatabase(d_object_name)) {
+      db = restart_db->getDatabase(d_object_name);
+   } else {
+      TBOX_ERROR("CartesianGridGeometry::getFromRestart() error...\n"
+         << "    database with name " << d_object_name
+         << " not found in the restart file" << std::endl);
+   }
+
+   int ver = db->getInteger("GEOM_CARTESIAN_GRID_GEOMETRY_VERSION");
+   if (ver != GEOM_CARTESIAN_GRID_GEOMETRY_VERSION) {
+      TBOX_ERROR("CartesianGridGeometry::getFromRestart() error...\n"
+         << "    geometry object with name = " << d_object_name
+         << "Restart file version is different than class version" << std::endl);
+   }
+   hier::BoxArray domain(dim, db->getDatabaseBoxArray("d_physical_domain"));
+   double x_lo[tbox::Dimension::MAXIMUM_DIMENSION_VALUE],
+          x_up[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   db->getDoubleArray("d_x_lo", x_lo, dim.getValue());
+   db->getDoubleArray("d_x_up", x_up, dim.getValue());
+
+   setGeometryData(x_lo, x_up, domain);
+
+   hier::IntVector periodic_shift(dim);
+   int* temp_shift = &periodic_shift[0];
+   db->getIntegerArray("d_periodic_shift", temp_shift, dim.getValue());
+   this->initializePeriodicShift(periodic_shift);
+
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianGridGeometry.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianGridGeometry.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,33 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Simple Cartesian grid geometry for an AMR hierarchy. 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace geom {
+
+SAMRAI_INLINE_KEYWORD
+const double *CartesianGridGeometry::getDx() const
+{
+   return d_dx;
+}
+
+SAMRAI_INLINE_KEYWORD
+const double *CartesianGridGeometry::getXLower() const
+{
+   return d_x_lo;
+}
+
+SAMRAI_INLINE_KEYWORD
+const double *CartesianGridGeometry::getXUpper() const
+{
+   return d_x_up;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianGridGeometry.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianGridGeometry.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,295 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Simple Cartesian grid geometry for an AMR hierarchy. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianGridGeometry
+#define included_geom_CartesianGridGeometry
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/Geometry.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Serializable.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianGridGeometry provides simple Cartesian mesh geometry
+ * management on an AMR hierarchy.  The mesh coordinates on each hierarchy
+ * level are limited to mesh increments specified as DIM-tuple
+ * (dx[0],...,dx[DIM-1]) and spatial coordinates of the lower and upper
+ * corners of the smallest parallelepiped bounding the entire computational
+ * domain.  The mesh increments on each level are defined with respect to
+ * the coarsest hierarchy level and multiplying those values by the proper
+ * refinement ratio.  This class sets geometry information on each patch in
+ * an AMR hierarchy.  This class is derived from the xfer::Geometry base
+ * class which is further derived from the hier::GridGeometry base class.
+ *
+ * An object of this class requires numerous parameters to be read from
+ * input.  Also, data must be written to and read from files for restart.
+ * The input and restart data are summarized as follows:
+ *
+ * Required input keys and data types:
+ *
+ *
+ *
+ *
+ *    - \b    domain_boxes
+ *       tbox::Array of boxes representing the index space for the entire
+ *       domain (on the coarsest refinement level).
+ *
+ *    - \b    x_lo
+ *       tbox::Array of double values representing the spatial coordinates of
+ *       the lower corner of the physical domain.
+ *
+ *    - \b    x_up
+ *       tbox::Array of double values representing the spatial coordinates of
+ *       the upper corner of the physical domain.
+ *
+ *
+ *
+ *
+ *
+ * Optional input keys, data types, and defaults:
+ *
+ *
+ *
+ *
+ *    - \b    periodic_dimension
+ *       tbox::Array of integer values representing the directions in which
+ *       the physical domain is periodic.  A non-zero value indicates
+ *       that the direction is periodic.  A zero value indicates that
+ *       the direction is not periodic.  If no values are specified, then
+ *       the array is initialized to all zeros (no periodic directions).
+ *
+ *
+ *
+ * No input values can overwrite restart values.
+ *
+ * A sample input file for a two-dimensional problem might look like:
+ *
+ * @verbatim
+ *
+ *    domain_boxes = [(0,0) , (49,39)]
+ *    x_lo = 0.0 , 0.0
+ *    x_up = 50.0 , 40.0
+ *    periodic_dimension = 0, 1  // periodic in y only
+ *
+ * @endverbatim
+ *
+ * This generates a two-dimensional rectangular domain periodic in the
+ * y-direction, and having 50 cells in the x-direction and 40 cells in
+ * the y-direction, with the cell size 1 unit in each direction.
+ *
+ * @see xfer::Geometry
+ * @see hier::GridGeometry
+ */
+
+class CartesianGridGeometry:
+   public xfer::Geometry,
+   public tbox::Serializable
+{
+
+   typedef hier::PatchGeometry::TwoDimBool TwoDimBool;
+
+public:
+   /**
+    * Constructor for CartesianGridGeometry initializes data
+    * members based on parameters read from the specified input database
+    * or from the restart database corresponding to the specified
+    * object name.  The constructor also registers this object
+    * for restart using the specified object name when the boolean
+    * argument is true.  Whether object will write its state to restart
+    * files during program execution is determined by this argument.
+    * Note that it has a default state of true.
+    *
+    * Errors: passing in a null database pointer or an empty std::string
+    * will result in an unrecoverable assertion.
+    */
+   explicit CartesianGridGeometry(
+      const tbox::Dimension& dim,
+      const std::string& object_name,
+      tbox::Pointer<tbox::Database> input_db,
+      bool register_for_restart = true);
+
+   /**
+    * Constructor for CartesianGridGeometry sets data members
+    * based on arguments.  The constructor also registers this object
+    * for restart using the specified object name when the boolean
+    * argument is true.  Whether object will write its state to restart
+    * files during program execution is determined by this argument.
+    * Note that it has a default state of true.
+    *
+    * Errors: passing in an empty std::string, or null data pointers will
+    * result in an unrecoverable assertion.
+    */
+   explicit CartesianGridGeometry(
+      const std::string& object_name,
+      const double* x_lo,
+      const double* x_up,
+      const hier::BoxArray& domain,
+      bool register_for_restart = true);
+
+   /**
+    * Destructor for CartesianGridGeometry deallocates
+    * data describing grid geometry and unregisters the object with
+    * the restart manager if previously registered.
+    */
+   virtual ~CartesianGridGeometry();
+
+   /**
+    * Create and return a pointer to a refined version of this Cartesian grid
+    * geometry object. This function is pure virtual in the hier::GridGeometry base class.
+    */
+   tbox::Pointer<hier::GridGeometry>
+   makeRefinedGridGeometry(
+      const std::string& fine_geom_name,
+      const hier::IntVector& refine_ratio,
+      bool register_for_restart) const;
+
+   /**
+    * Create and return a pointer to a coarsened version of this Cartesian grid
+    * geometry object. This function is pure virtual in the hier::GridGeometry base class.
+    */
+   tbox::Pointer<hier::GridGeometry>
+   makeCoarsenedGridGeometry(
+      const std::string& coarse_geom_name,
+      const hier::IntVector& coarsen_ratio,
+      bool register_for_restart) const;
+
+   /*
+    * Compute grid data for patch and assign new geom_CartesianPatchGeometry
+    * object to patch.  This function is pure virtual in the hier::GridGeometry
+    * base class.
+    */
+   void
+   setGeometryDataOnPatch(
+      hier::Patch& patch,
+      const hier::IntVector& ratio_to_level_zero,
+      const TwoDimBool& touches_regular_bdry,
+      const TwoDimBool& touches_periodic_bdry) const;
+
+   /**
+    * Set data members for this CartesianGridGeometry object.
+    */
+   void
+   setGeometryData(
+      const double* x_lo,
+      const double* x_up,
+      const hier::BoxArray& domain);
+
+   /**
+    * Return const pointer to dx array for reference level in hierarchy.
+    */
+   const double *
+   getDx() const;
+
+   /**
+    * Return const pointer to lower spatial coordinate for reference
+    * level in hierarchy.
+    */
+   const double *
+   getXLower() const;
+
+   /**
+    * Return const pointer to upper spatial coordinate for reference
+    * level in hierarchy.
+    */
+   const double *
+   getXUpper() const;
+
+   /**
+    * Print class data representation.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os) const;
+
+   /**
+    * Writes the state of the CartesianGridGeometry object to the
+    * database.
+    *
+    * When assertion checking is active, db cannot be a null database pointer.
+    */
+   virtual void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> db);
+
+private:
+   /*
+    * Reads in domain_boxes, x_lo, and x_up from the input database.
+    * Data is read from input only if the simulation is not from restart.
+    * Otherwise, all values specified in the input database are ignored.
+    *
+    * Arguments: is_from_restart is true when simulation is from restart
+    * Assertions: db must not be a null pointer.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db,
+      bool is_from_restart);
+
+   /*
+    * Read object state from the restart file and initialize class data
+    * members.  The database from which the restart data is read is
+    * determined by the object_name specified in the constructor.
+    *
+    * Unrecoverable Errors:
+    *
+    *    -The database corresponding to object_name is not found
+    *     in the restart file.
+    *
+    *    -The class version number and restart version number do not
+    *     match.
+    *
+    */
+   void
+   getFromRestart();
+
+   /*
+    * Create default operator for Cartesian grid geometry.
+    */
+   void
+   makeStandardOperators();
+
+   /*
+    * String name for object used in error reporting and restart operations.
+    * Boolean is set in constructor and determines whether object should
+    * dump its state to restart files during program execution.
+    */
+   std::string d_object_name;
+   bool d_registered_for_restart;
+
+   double d_dx[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];                // mesh increments for level 0.
+   double d_x_lo[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];              // spatial coordinates of lower corner
+   // (i.e., box corner) of problem domain.
+   double d_x_up[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];              // spatial coordinates of upper corner
+   // (i.e., box corner) of problem domain.
+
+   hier::Box d_domain_box;           // smallest box covering coarsest level
+                                     // (i.e., reference level) index space.
+
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/geom/CartesianGridGeometry.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianNodeComplexLinearRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianNodeComplexLinearRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,227 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear refine operator for node-centered complex data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianNodeComplexLinearRefine_C
+#define included_geom_CartesianNodeComplexLinearRefine_C
+
+#include "SAMRAI/geom/CartesianNodeComplexLinearRefine.h"
+#include "SAMRAI/tbox/Complex.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartrefine1d.f:
+void F77_FUNC(cartlinrefnodecplx1d, CARTLINREFNODECPLX1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+// in cartrefine2d.f:
+void F77_FUNC(cartlinrefnodecplx2d, CARTLINREFNODECPLX2D) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+// in cartrefine3d.f:
+void F77_FUNC(cartlinrefnodecplx3d, CARTLINREFNODECPLX3D) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianNodeComplexLinearRefine::CartesianNodeComplexLinearRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "LINEAR_REFINE")
+{
+   d_name_id = "LINEAR_REFINE";
+}
+
+CartesianNodeComplexLinearRefine::~CartesianNodeComplexLinearRefine()
+{
+}
+
+bool CartesianNodeComplexLinearRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::NodeVariable<dcomplex> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianNodeComplexLinearRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int CartesianNodeComplexLinearRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianNodeComplexLinearRefine::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void CartesianNodeComplexLinearRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const pdat::NodeOverlap* t_overlap =
+      dynamic_cast<const pdat::NodeOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::BoxList& boxes = t_overlap->getDestinationBoxList();
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      hier::Box fine_box(b());
+      fine_box.growUpper(hier::IntVector(ratio.getDim(), -1));
+      refine(fine,
+         coarse,
+         dst_component,
+         src_component,
+         fine_box,
+         ratio);
+   }
+}
+
+void CartesianNodeComplexLinearRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, fine, coarse, fine_box, ratio);
+
+   tbox::Pointer<pdat::NodeData<dcomplex> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<pdat::NodeData<dcomplex> >
+   fdata = fine.getPatchData(dst_component);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+#endif
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+
+   const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+   const hier::Index ifirstf = fine_box.lower();
+   const hier::Index ilastf = fine_box.upper();
+
+   for (int d = 0; d < fdata->getDepth(); d++) {
+      if ((dim == tbox::Dimension(1))) {
+         F77_FUNC(cartlinrefnodecplx1d, CARTLINREFNODECPLX1D) (ifirstc(0),
+            ilastc(0),
+            ifirstf(0), ilastf(0),
+            cilo(0), cihi(0),
+            filo(0), fihi(0),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else if ((dim == tbox::Dimension(2))) {
+         F77_FUNC(cartlinrefnodecplx2d, CARTLINREFNODECPLX2D) (ifirstc(0),
+            ifirstc(1), ilastc(0), ilastc(1),
+            ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else if ((dim == tbox::Dimension(3))) {
+         F77_FUNC(cartlinrefnodecplx3d, CARTLINREFNODECPLX3D) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            ifirstf(0), ifirstf(1), ifirstf(2),
+            ilastf(0), ilastf(1), ilastf(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else {
+         TBOX_ERROR("CartesianNodeComplexLinearRefine error...\n"
+            << "dim > 3 not supported." << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianNodeComplexLinearRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianNodeComplexLinearRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,126 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear refine operator for node-centered complex data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianNodeComplexLinearRefine
+#define included_geom_CartesianNodeComplexLinearRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianNodeComplexLinearRefine implements linear
+ * interpolation for node-centered complex patch data defined over a Cartesian
+ * mesh.  It is derived from the xfer::RefineOperator base class.
+ * The numerical operations for interpolation use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is node-centered complex, and the std::string is "LINEAR_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class CartesianNodeComplexLinearRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianNodeComplexLinearRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianNodeComplexLinearRefine();
+
+   /**
+    * Return true if the variable and name std::string match node-centered
+    * complex linear interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of node-centered complex linear interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the linear interpolation operator is the vector
+    * of zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the node-centered complex linear
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the boxes contained in fine_overlap
+    * It is assumed that the coarse patch contains sufficient data for the
+    * stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the node-centered complex linear
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the fine box.   It is assumed that the
+    * coarse patch contains sufficient data for the stencil width of the
+    * refinement operator.  This differs from the above refine() method
+    * only in that it operates on a single fine box instead of a BoxOverlap.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianNodeDoubleLinearRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianNodeDoubleLinearRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,226 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear refine operator for node-centered double data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianNodeDoubleLinearRefine_C
+#define included_geom_CartesianNodeDoubleLinearRefine_C
+
+#include "SAMRAI/geom/CartesianNodeDoubleLinearRefine.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartrefine1d.f:
+void F77_FUNC(cartlinrefnodedoub1d, CARTLINREFNODEDOUB1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+// in cartrefine2d.f:
+void F77_FUNC(cartlinrefnodedoub2d, CARTLINREFNODEDOUB2D) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+// in cartrefine3d.f:
+void F77_FUNC(cartlinrefnodedoub3d, CARTLINREFNODEDOUB3D) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianNodeDoubleLinearRefine::CartesianNodeDoubleLinearRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "LINEAR_REFINE")
+{
+   d_name_id = "LINEAR_REFINE";
+}
+
+CartesianNodeDoubleLinearRefine::~CartesianNodeDoubleLinearRefine()
+{
+}
+
+bool CartesianNodeDoubleLinearRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::NodeVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianNodeDoubleLinearRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int CartesianNodeDoubleLinearRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianNodeDoubleLinearRefine::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void CartesianNodeDoubleLinearRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const pdat::NodeOverlap* t_overlap =
+      dynamic_cast<const pdat::NodeOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::BoxList& boxes = t_overlap->getDestinationBoxList();
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      hier::Box fine_box(b());
+      fine_box.growUpper(hier::IntVector(ratio.getDim(), -1));
+      refine(fine,
+         coarse,
+         dst_component,
+         src_component,
+         fine_box,
+         ratio);
+   }
+}
+
+void CartesianNodeDoubleLinearRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, fine, coarse, fine_box, ratio);
+
+   tbox::Pointer<pdat::NodeData<double> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<pdat::NodeData<double> >
+   fdata = fine.getPatchData(dst_component);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+#endif
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+
+   const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+   const hier::Index ifirstf = fine_box.lower();
+   const hier::Index ilastf = fine_box.upper();
+
+   for (int d = 0; d < fdata->getDepth(); d++) {
+      if ((dim == tbox::Dimension(1))) {
+         F77_FUNC(cartlinrefnodedoub1d, CARTLINREFNODEDOUB1D) (ifirstc(0),
+            ilastc(0),
+            ifirstf(0), ilastf(0),
+            cilo(0), cihi(0),
+            filo(0), fihi(0),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else if ((dim == tbox::Dimension(2))) {
+         F77_FUNC(cartlinrefnodedoub2d, CARTLINREFNODEDOUB2D) (ifirstc(0),
+            ifirstc(1), ilastc(0), ilastc(1),
+            ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else if ((dim == tbox::Dimension(3))) {
+         F77_FUNC(cartlinrefnodedoub3d, CARTLINREFNODEDOUB3D) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            ifirstf(0), ifirstf(1), ifirstf(2),
+            ilastf(0), ilastf(1), ilastf(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else {
+         TBOX_ERROR("CartesianNodeDoubleLinearRefine error...\n"
+            << "dim > 3 not supported." << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianNodeDoubleLinearRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianNodeDoubleLinearRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,126 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear refine operator for node-centered double data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianNodeDoubleLinearRefine
+#define included_geom_CartesianNodeDoubleLinearRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianNodeDoubleLinearRefine implements linear
+ * interpolation for node-centered double patch data defined over a Cartesian
+ * mesh.  It is derived from the xfer::RefineOperator base class.
+ * The numerical operations for interpolation use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is node-centered double, and the std::string is "LINEAR_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class CartesianNodeDoubleLinearRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianNodeDoubleLinearRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianNodeDoubleLinearRefine();
+
+   /**
+    * Return true if the variable and name std::string match node-centered
+    * double linear interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of node-centered double linear interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the linear interpolation operator is the vector
+    * of zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the node-centered double linear
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the boxes contained in fine_overlap
+    * It is assumed that the coarse patch contains sufficient data for the
+    * stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the node-centered double linear
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the fine box.   It is assumed that the
+    * coarse patch contains sufficient data for the stencil width of the
+    * refinement operator.  This differs from the above refine() method
+    * only in that it operates on a single fine box instead of a BoxOverlap.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianNodeFloatLinearRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianNodeFloatLinearRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,225 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear refine operator for node-centered float data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianNodeFloatLinearRefine_C
+#define included_geom_CartesianNodeFloatLinearRefine_C
+
+#include "SAMRAI/geom/CartesianNodeFloatLinearRefine.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartrefine1d.f:
+void F77_FUNC(cartlinrefnodeflot1d, CARTLINREFNODEFLOT1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+// in cartrefine2d.f:
+void F77_FUNC(cartlinrefnodeflot2d, CARTLINREFNODEFLOT2D) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+// in cartrefine3d.f:
+void F77_FUNC(cartlinrefnodeflot3d, CARTLINREFNODEFLOT3D) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+CartesianNodeFloatLinearRefine::CartesianNodeFloatLinearRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "LINEAR_REFINE")
+{
+   d_name_id = "LINEAR_REFINE";
+}
+
+CartesianNodeFloatLinearRefine::~CartesianNodeFloatLinearRefine()
+{
+}
+
+bool CartesianNodeFloatLinearRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::NodeVariable<float> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianNodeFloatLinearRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int CartesianNodeFloatLinearRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianNodeFloatLinearRefine::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void CartesianNodeFloatLinearRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const pdat::NodeOverlap* t_overlap =
+      dynamic_cast<const pdat::NodeOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::BoxList& boxes = t_overlap->getDestinationBoxList();
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      hier::Box fine_box(b());
+      fine_box.growUpper(hier::IntVector(ratio.getDim(), -1));
+      refine(fine,
+         coarse,
+         dst_component,
+         src_component,
+         fine_box,
+         ratio);
+   }
+}
+
+void CartesianNodeFloatLinearRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, fine, coarse, fine_box, ratio);
+
+   tbox::Pointer<pdat::NodeData<float> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<pdat::NodeData<float> >
+   fdata = fine.getPatchData(dst_component);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+#endif
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+
+   const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+   const hier::Index ifirstf = fine_box.lower();
+   const hier::Index ilastf = fine_box.upper();
+
+   for (int d = 0; d < fdata->getDepth(); d++) {
+      if ((dim == tbox::Dimension(1))) {
+         F77_FUNC(cartlinrefnodeflot1d, CARTLINREFNODEFLOT1D) (ifirstc(0),
+            ilastc(0),
+            ifirstf(0), ilastf(0),
+            cilo(0), cihi(0),
+            filo(0), fihi(0),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else if ((dim == tbox::Dimension(2))) {
+         F77_FUNC(cartlinrefnodeflot2d, CARTLINREFNODEFLOT2D) (ifirstc(0),
+            ifirstc(1), ilastc(0), ilastc(1),
+            ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else if ((dim == tbox::Dimension(3))) {
+         F77_FUNC(cartlinrefnodeflot3d, CARTLINREFNODEFLOT3D) (ifirstc(0),
+            ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            ifirstf(0), ifirstf(1), ifirstf(2),
+            ilastf(0), ilastf(1), ilastf(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            &ratio[0],
+            cgeom->getDx(),
+            fgeom->getDx(),
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else {
+         TBOX_ERROR("CartesianNodeFloatLinearRefine error...\n"
+            << "dim > 3 not supported." << std::endl);
+      }
+
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianNodeFloatLinearRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianNodeFloatLinearRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,126 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear refine operator for node-centered float data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianNodeFloatLinearRefine
+#define included_geom_CartesianNodeFloatLinearRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianNodeFloatLinearRefine implements linear
+ * interpolation for node-centered float patch data defined over a Cartesian
+ * mesh.  It is derived from the xfer::RefineOperator base class.
+ * The numerical operations for interpolation use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is node-centered float, and the std::string is "LINEAR_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class CartesianNodeFloatLinearRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianNodeFloatLinearRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianNodeFloatLinearRefine();
+
+   /**
+    * Return true if the variable and name std::string match node-centered
+    * float linear interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of node-centered float linear interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the linear interpolation operator is the vector
+    * of zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the node-centered float linear
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the boxes contained in fine_overlap
+    * It is assumed that the coarse patch contains sufficient data for the
+    * stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the node-centered float linear
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the fine box.   It is assumed that the
+    * coarse patch contains sufficient data for the stencil width of the
+    * refinement operator.  This differs from the above refine() method
+    * only in that it operates on a single fine box instead of a BoxOverlap.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianOuterfaceComplexWeightedAverage.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianOuterfaceComplexWeightedAverage.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,260 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for outerface complex data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianOuterfaceComplexWeightedAverage_C
+#define included_geom_CartesianOuterfaceComplexWeightedAverage_C
+
+#include "SAMRAI/geom/CartesianOuterfaceComplexWeightedAverage.h"
+#include "SAMRAI/tbox/Complex.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/OuterfaceData.h"
+#include "SAMRAI/pdat/OuterfaceVariable.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartcoarsen1d.f:
+void F77_FUNC(cartwgtavgoutfacecplx1d, CARTWGTAVGOUTFACECPLX1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+// in cartcoarsen2d.f:
+void F77_FUNC(cartwgtavgoutfacecplx2d0, CARTWGTAVGOUTFACECPLX2D0) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+
+void F77_FUNC(cartwgtavgoutfacecplx2d1, CARTWGTAVGOUTFACECPLX2D1) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+// in cartcoarsen3d.f:
+void F77_FUNC(cartwgtavgoutfacecplx3d0, CARTWGTAVGOUTFACECPLX3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+void F77_FUNC(cartwgtavgoutfacecplx3d1, CARTWGTAVGOUTFACECPLX3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+void F77_FUNC(cartwgtavgoutfacecplx3d2, CARTWGTAVGOUTFACECPLX3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianOuterfaceComplexWeightedAverage::
+CartesianOuterfaceComplexWeightedAverage(
+   const tbox::Dimension& dim):
+   xfer::CoarsenOperator(dim, "CONSERVATIVE_COARSEN")
+{
+   d_name_id = "CONSERVATIVE_COARSEN";
+}
+
+CartesianOuterfaceComplexWeightedAverage::~
+CartesianOuterfaceComplexWeightedAverage()
+{
+}
+
+bool CartesianOuterfaceComplexWeightedAverage::findCoarsenOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::OuterfaceVariable<dcomplex> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianOuterfaceComplexWeightedAverage::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int CartesianOuterfaceComplexWeightedAverage::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianOuterfaceComplexWeightedAverage::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void CartesianOuterfaceComplexWeightedAverage::coarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, coarse, fine, coarse_box, ratio);
+
+   tbox::Pointer<pdat::OuterfaceData<dcomplex> >
+   fdata = fine.getPatchData(src_component);
+   tbox::Pointer<pdat::OuterfaceData<dcomplex> >
+   cdata = coarse.getPatchData(dst_component);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+#endif
+
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+   const hier::Index cilo = cdata->getGhostBox().lower();
+   const hier::Index cihi = cdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+
+   for (int d = 0; d < cdata->getDepth(); d++) {
+      // loop over lower and upper outerface arrays
+      for (int i = 0; i < 2; i++) {
+         if ((dim == tbox::Dimension(1))) {
+            F77_FUNC(cartwgtavgoutfacecplx1d,
+               CARTWGTAVGOUTFACECPLX1D) (ifirstc(0), ilastc(0),
+               filo(0), fihi(0),
+               cilo(0), cihi(0),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(0, i, d),
+               cdata->getPointer(0, i, d));
+         } else if ((dim == tbox::Dimension(2))) {
+            F77_FUNC(cartwgtavgoutfacecplx2d0,
+               CARTWGTAVGOUTFACECPLX2D0) (ifirstc(0), ifirstc(1), ilastc(0),
+               ilastc(1),
+               filo(0), filo(1), fihi(0), fihi(1),
+               cilo(0), cilo(1), cihi(0), cihi(1),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(0, i, d),
+               cdata->getPointer(0, i, d));
+            F77_FUNC(cartwgtavgoutfacecplx2d1,
+               CARTWGTAVGOUTFACECPLX2D1) (ifirstc(0), ifirstc(1), ilastc(0),
+               ilastc(1),
+               filo(0), filo(1), fihi(0), fihi(1),
+               cilo(0), cilo(1), cihi(0), cihi(1),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(1, i, d),
+               cdata->getPointer(1, i, d));
+         } else if ((dim == tbox::Dimension(3))) {
+            F77_FUNC(cartwgtavgoutfacecplx3d0,
+               CARTWGTAVGOUTFACECPLX3D0) (ifirstc(0), ifirstc(1), ifirstc(2),
+               ilastc(0), ilastc(1), ilastc(2),
+               filo(0), filo(1), filo(2),
+               fihi(0), fihi(1), fihi(2),
+               cilo(0), cilo(1), cilo(2),
+               cihi(0), cihi(1), cihi(2),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(0, i, d),
+               cdata->getPointer(0, i, d));
+            F77_FUNC(cartwgtavgoutfacecplx3d1,
+               CARTWGTAVGOUTFACECPLX3D1) (ifirstc(0), ifirstc(1), ifirstc(2),
+               ilastc(0), ilastc(1), ilastc(2),
+               filo(0), filo(1), filo(2),
+               fihi(0), fihi(1), fihi(2),
+               cilo(0), cilo(1), cilo(2),
+               cihi(0), cihi(1), cihi(2),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(1, i, d),
+               cdata->getPointer(1, i, d));
+            F77_FUNC(cartwgtavgoutfacecplx3d2,
+               CARTWGTAVGOUTFACECPLX3D2) (ifirstc(0), ifirstc(1), ifirstc(2),
+               ilastc(0), ilastc(1), ilastc(2),
+               filo(0), filo(1), filo(2),
+               fihi(0), fihi(1), fihi(2),
+               cilo(0), cilo(1), cilo(2),
+               cihi(0), cihi(1), cihi(2),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(2, i, d),
+               cdata->getPointer(2, i, d));
+         } else {
+            TBOX_ERROR("CartesianOuterfaceComplexWeightedAverage error...\n"
+               << "dim > 3 not supported." << std::endl);
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianOuterfaceComplexWeightedAverage.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianOuterfaceComplexWeightedAverage.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,109 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for outerface complex data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianOuterfaceComplexWeightedAverage
+#define included_geom_CartesianOuterfaceComplexWeightedAverage
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianOuterfaceComplexWeightedAverage implements conservative
+ * face-weighted averaging for outerface complex patch data defined over
+ * a Cartesian mesh.  It is derived from the xfer::CoarsenOperator base class.
+ * The numerical operations for theaveraging use FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is outerface complex, and the std::string is "CONSERVATIVE_COARSEN".
+ *
+ * @see xfer::CoarsenOperator
+ */
+
+class CartesianOuterfaceComplexWeightedAverage:
+   public xfer::CoarsenOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianOuterfaceComplexWeightedAverage(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianOuterfaceComplexWeightedAverage();
+
+   /**
+    * Return true if the variable and name std::string match the outerface
+    * complex weighted averaging; otherwise, return false.
+    */
+   bool
+   findCoarsenOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this coarsening operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of outerface complex weighted averaging is 0.
+    * It will be performed before any user-defined coarsen operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the weighted averaging operator is the vector of
+    * zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Coarsen the source component on the fine patch to the destination
+    * component on the coarse patch using the outerface complex weighted
+    * averaging operator.  Coarsening is performed on the intersection of
+    * the destination patch and the coarse box.  It is assumed that the
+    * fine patch contains sufficient data for the stencil width of the
+    * coarsening operator.
+    */
+   void
+   coarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianOuterfaceDoubleWeightedAverage.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianOuterfaceDoubleWeightedAverage.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,259 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for outerface double data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianOuterfaceDoubleWeightedAverage_C
+#define included_geom_CartesianOuterfaceDoubleWeightedAverage_C
+
+#include "SAMRAI/geom/CartesianOuterfaceDoubleWeightedAverage.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/OuterfaceData.h"
+#include "SAMRAI/pdat/OuterfaceVariable.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartcoarsen1d.f:
+void F77_FUNC(cartwgtavgoutfacedoub1d, CARTWGTAVGOUTFACEDOUB1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+// in cartcoarsen2d.f:
+void F77_FUNC(cartwgtavgoutfacedoub2d0, CARTWGTAVGOUTFACEDOUB2D0) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+
+void F77_FUNC(cartwgtavgoutfacedoub2d1, CARTWGTAVGOUTFACEDOUB2D1) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+// in cartcoarsen3d.f:
+void F77_FUNC(cartwgtavgoutfacedoub3d0, CARTWGTAVGOUTFACEDOUB3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+void F77_FUNC(cartwgtavgoutfacedoub3d1, CARTWGTAVGOUTFACEDOUB3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+void F77_FUNC(cartwgtavgoutfacedoub3d2, CARTWGTAVGOUTFACEDOUB3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianOuterfaceDoubleWeightedAverage::
+CartesianOuterfaceDoubleWeightedAverage(
+   const tbox::Dimension& dim):
+   xfer::CoarsenOperator(dim, "CONSERVATIVE_COARSEN")
+{
+   d_name_id = "CONSERVATIVE_COARSEN";
+}
+
+CartesianOuterfaceDoubleWeightedAverage::~
+CartesianOuterfaceDoubleWeightedAverage()
+{
+}
+
+bool CartesianOuterfaceDoubleWeightedAverage::findCoarsenOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::OuterfaceVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianOuterfaceDoubleWeightedAverage::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int CartesianOuterfaceDoubleWeightedAverage::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianOuterfaceDoubleWeightedAverage::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void CartesianOuterfaceDoubleWeightedAverage::coarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, coarse, fine, coarse_box, ratio);
+
+   tbox::Pointer<pdat::OuterfaceData<double> >
+   fdata = fine.getPatchData(src_component);
+   tbox::Pointer<pdat::OuterfaceData<double> >
+   cdata = coarse.getPatchData(dst_component);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+#endif
+
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+   const hier::Index cilo = cdata->getGhostBox().lower();
+   const hier::Index cihi = cdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+
+   for (int d = 0; d < cdata->getDepth(); d++) {
+      // loop over lower and upper outerface arrays
+      for (int i = 0; i < 2; i++) {
+         if ((dim == tbox::Dimension(1))) {
+            F77_FUNC(cartwgtavgoutfacedoub1d,
+               CARTWGTAVGOUTFACEDOUB1D) (ifirstc(0), ilastc(0),
+               filo(0), fihi(0),
+               cilo(0), cihi(0),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(0, i, d),
+               cdata->getPointer(0, i, d));
+         } else if ((dim == tbox::Dimension(2))) {
+            F77_FUNC(cartwgtavgoutfacedoub2d0,
+               CARTWGTAVGOUTFACEDOUB2D0) (ifirstc(0), ifirstc(1), ilastc(0),
+               ilastc(1),
+               filo(0), filo(1), fihi(0), fihi(1),
+               cilo(0), cilo(1), cihi(0), cihi(1),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(0, i, d),
+               cdata->getPointer(0, i, d));
+            F77_FUNC(cartwgtavgoutfacedoub2d1,
+               CARTWGTAVGOUTFACEDOUB2D1) (ifirstc(0), ifirstc(1), ilastc(0),
+               ilastc(1),
+               filo(0), filo(1), fihi(0), fihi(1),
+               cilo(0), cilo(1), cihi(0), cihi(1),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(1, i, d),
+               cdata->getPointer(1, i, d));
+         } else if ((dim == tbox::Dimension(3))) {
+            F77_FUNC(cartwgtavgoutfacedoub3d0,
+               CARTWGTAVGOUTFACEDOUB3D0) (ifirstc(0), ifirstc(1), ifirstc(2),
+               ilastc(0), ilastc(1), ilastc(2),
+               filo(0), filo(1), filo(2),
+               fihi(0), fihi(1), fihi(2),
+               cilo(0), cilo(1), cilo(2),
+               cihi(0), cihi(1), cihi(2),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(0, i, d),
+               cdata->getPointer(0, i, d));
+            F77_FUNC(cartwgtavgoutfacedoub3d1,
+               CARTWGTAVGOUTFACEDOUB3D1) (ifirstc(0), ifirstc(1), ifirstc(2),
+               ilastc(0), ilastc(1), ilastc(2),
+               filo(0), filo(1), filo(2),
+               fihi(0), fihi(1), fihi(2),
+               cilo(0), cilo(1), cilo(2),
+               cihi(0), cihi(1), cihi(2),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(1, i, d),
+               cdata->getPointer(1, i, d));
+            F77_FUNC(cartwgtavgoutfacedoub3d2,
+               CARTWGTAVGOUTFACEDOUB3D2) (ifirstc(0), ifirstc(1), ifirstc(2),
+               ilastc(0), ilastc(1), ilastc(2),
+               filo(0), filo(1), filo(2),
+               fihi(0), fihi(1), fihi(2),
+               cilo(0), cilo(1), cilo(2),
+               cihi(0), cihi(1), cihi(2),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(2, i, d),
+               cdata->getPointer(2, i, d));
+         } else {
+            TBOX_ERROR("CartesianOuterfaceDoubleWeightedAverage error...\n"
+               << "dim > 3 not supported." << std::endl);
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianOuterfaceDoubleWeightedAverage.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianOuterfaceDoubleWeightedAverage.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for outerface double data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianOuterfaceDoubleWeightedAverage
+#define included_geom_CartesianOuterfaceDoubleWeightedAverage
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianOuterfaceDoubleWeightedAverage implements conservative
+ * face-weighted averaging for outerface double patch data defined over
+ * a Cartesian mesh.  It is derived from the xfer::CoarsenOperator base class.
+ * The numerical operations for theaveraging use FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is outerface double, and the std::string is "CONSERVATIVE_COARSEN".
+ *
+ * @see xfer::CoarsenOperator
+ */
+
+class CartesianOuterfaceDoubleWeightedAverage:
+   public xfer::CoarsenOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianOuterfaceDoubleWeightedAverage(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianOuterfaceDoubleWeightedAverage();
+
+   /**
+    * Return true if the variable and name std::string match the outerface
+    * double weighted averaging; otherwise, return false.
+    */
+   bool
+   findCoarsenOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this coarsening operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of outerface double weighted averaging is 0.
+    * It will be performed before any user-defined coarsen operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the weighted averaging operator is the vector of
+    * zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Coarsen the source component on the fine patch to the destination
+    * component on the coarse patch using the outerface double weighted
+    * averaging operator.  Coarsening is performed on the intersection of
+    * the destination patch and the coarse box.  It is assumed that the
+    * fine patch contains sufficient data for the stencil width of the
+    * coarsening operator.
+    */
+   void
+   coarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianOuterfaceFloatWeightedAverage.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianOuterfaceFloatWeightedAverage.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,258 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for outerface float data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianOuterfaceFloatWeightedAverage_C
+#define included_geom_CartesianOuterfaceFloatWeightedAverage_C
+
+#include "SAMRAI/geom/CartesianOuterfaceFloatWeightedAverage.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/OuterfaceData.h"
+#include "SAMRAI/pdat/OuterfaceVariable.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartcoarsen1d.f:
+void F77_FUNC(cartwgtavgoutfaceflot1d, CARTWGTAVGOUTFACEFLOT1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+// in cartcoarsen2d.f:
+void F77_FUNC(cartwgtavgoutfaceflot2d0, CARTWGTAVGOUTFACEFLOT2D0) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+
+void F77_FUNC(cartwgtavgoutfaceflot2d1, CARTWGTAVGOUTFACEFLOT2D1) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+// in cartcoarsen3d.f:
+void F77_FUNC(cartwgtavgoutfaceflot3d0, CARTWGTAVGOUTFACEFLOT3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+void F77_FUNC(cartwgtavgoutfaceflot3d1, CARTWGTAVGOUTFACEFLOT3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+void F77_FUNC(cartwgtavgoutfaceflot3d2, CARTWGTAVGOUTFACEFLOT3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianOuterfaceFloatWeightedAverage::CartesianOuterfaceFloatWeightedAverage(
+   const tbox::Dimension& dim):
+   xfer::CoarsenOperator(dim, "CONSERVATIVE_COARSEN")
+{
+   d_name_id = "CONSERVATIVE_COARSEN";
+}
+
+CartesianOuterfaceFloatWeightedAverage::~CartesianOuterfaceFloatWeightedAverage()
+{
+}
+
+bool CartesianOuterfaceFloatWeightedAverage::findCoarsenOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::OuterfaceVariable<float> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianOuterfaceFloatWeightedAverage::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int CartesianOuterfaceFloatWeightedAverage::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianOuterfaceFloatWeightedAverage::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void CartesianOuterfaceFloatWeightedAverage::coarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, coarse, fine, coarse_box, ratio);
+
+   tbox::Pointer<pdat::OuterfaceData<float> >
+   fdata = fine.getPatchData(src_component);
+   tbox::Pointer<pdat::OuterfaceData<float> >
+   cdata = coarse.getPatchData(dst_component);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+#endif
+
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+   const hier::Index cilo = cdata->getGhostBox().lower();
+   const hier::Index cihi = cdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+
+   for (int d = 0; d < cdata->getDepth(); d++) {
+      // loop over lower and upper outerface arrays
+      for (int i = 0; i < 2; i++) {
+         if ((dim == tbox::Dimension(1))) {
+            F77_FUNC(cartwgtavgoutfaceflot1d,
+               CARTWGTAVGOUTFACEFLOT1D) (ifirstc(0), ilastc(0),
+               filo(0), fihi(0),
+               cilo(0), cihi(0),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(0, i, d),
+               cdata->getPointer(0, i, d));
+         } else if ((dim == tbox::Dimension(2))) {
+            F77_FUNC(cartwgtavgoutfaceflot2d0,
+               CARTWGTAVGOUTFACEFLOT2D0) (ifirstc(0), ifirstc(1), ilastc(0),
+               ilastc(1),
+               filo(0), filo(1), fihi(0), fihi(1),
+               cilo(0), cilo(1), cihi(0), cihi(1),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(0, i, d),
+               cdata->getPointer(0, i, d));
+            F77_FUNC(cartwgtavgoutfaceflot2d1,
+               CARTWGTAVGOUTFACEFLOT2D1) (ifirstc(0), ifirstc(1), ilastc(0),
+               ilastc(1),
+               filo(0), filo(1), fihi(0), fihi(1),
+               cilo(0), cilo(1), cihi(0), cihi(1),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(1, i, d),
+               cdata->getPointer(1, i, d));
+         } else if ((dim == tbox::Dimension(3))) {
+            F77_FUNC(cartwgtavgoutfaceflot3d0,
+               CARTWGTAVGOUTFACEFLOT3D0) (ifirstc(0), ifirstc(1), ifirstc(2),
+               ilastc(0), ilastc(1), ilastc(2),
+               filo(0), filo(1), filo(2),
+               fihi(0), fihi(1), fihi(2),
+               cilo(0), cilo(1), cilo(2),
+               cihi(0), cihi(1), cihi(2),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(0, i, d),
+               cdata->getPointer(0, i, d));
+            F77_FUNC(cartwgtavgoutfaceflot3d1,
+               CARTWGTAVGOUTFACEFLOT3D1) (ifirstc(0), ifirstc(1), ifirstc(2),
+               ilastc(0), ilastc(1), ilastc(2),
+               filo(0), filo(1), filo(2),
+               fihi(0), fihi(1), fihi(2),
+               cilo(0), cilo(1), cilo(2),
+               cihi(0), cihi(1), cihi(2),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(1, i, d),
+               cdata->getPointer(1, i, d));
+            F77_FUNC(cartwgtavgoutfaceflot3d2,
+               CARTWGTAVGOUTFACEFLOT3D2) (ifirstc(0), ifirstc(1), ifirstc(2),
+               ilastc(0), ilastc(1), ilastc(2),
+               filo(0), filo(1), filo(2),
+               fihi(0), fihi(1), fihi(2),
+               cilo(0), cilo(1), cilo(2),
+               cihi(0), cihi(1), cihi(2),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(2, i, d),
+               cdata->getPointer(2, i, d));
+         } else {
+            TBOX_ERROR("CartesianOuterfaceFloatWeightedAverage error...\n"
+               << "dim > 3 not supported." << std::endl);
+         }
+
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianOuterfaceFloatWeightedAverage.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianOuterfaceFloatWeightedAverage.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for outerface float data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianOuterfaceFloatWeightedAverage
+#define included_geom_CartesianOuterfaceFloatWeightedAverage
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianOuterfaceFloatWeightedAverage implements conservative
+ * face-weighted averaging for outerface float patch data defined over
+ * a Cartesian mesh.  It is derived from the xfer::CoarsenOperator base class.
+ * The numerical operations for theaveraging use FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is outerface float, and the std::string is "CONSERVATIVE_COARSEN".
+ *
+ * @see xfer::CoarsenOperator
+ */
+
+class CartesianOuterfaceFloatWeightedAverage:
+   public xfer::CoarsenOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianOuterfaceFloatWeightedAverage(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianOuterfaceFloatWeightedAverage();
+
+   /**
+    * Return true if the variable and name std::string match the outerface
+    * float weighted averaging; otherwise, return false.
+    */
+   bool
+   findCoarsenOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this coarsening operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of outerface float weighted averaging is 0.
+    * It will be performed before any user-defined coarsen operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the weighted averaging operator is the vector of
+    * zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Coarsen the source component on the fine patch to the destination
+    * component on the coarse patch using the outerface float weighted
+    * averaging operator.  Coarsening is performed on the intersection of
+    * the destination patch and the coarse box.  It is assumed that the
+    * fine patch contains sufficient data for the stencil width of the
+    * coarsening operator.
+    */
+   void
+   coarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianOutersideDoubleWeightedAverage.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianOutersideDoubleWeightedAverage.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,258 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for outerside double data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianOutersideDoubleWeightedAverage_C
+#define included_geom_CartesianOutersideDoubleWeightedAverage_C
+
+#include "SAMRAI/geom/CartesianOutersideDoubleWeightedAverage.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/OutersideData.h"
+#include "SAMRAI/pdat/OutersideVariable.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartcoarsen1d.f:
+void F77_FUNC(cartwgtavgoutsidedoub1d, CARTWGTAVGOUTSIDEDOUB1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+// in cartcoarsen2d.f:
+void F77_FUNC(cartwgtavgoutsidedoub2d0, CARTWGTAVGOUTSIDEDOUB2D0) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+
+void F77_FUNC(cartwgtavgoutsidedoub2d1, CARTWGTAVGOUTSIDEDOUB2D1) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+// in cartcoarsen3d.f:
+void F77_FUNC(cartwgtavgoutsidedoub3d0, CARTWGTAVGOUTSIDEDOUB3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+void F77_FUNC(cartwgtavgoutsidedoub3d1, CARTWGTAVGOUTSIDEDOUB3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+void F77_FUNC(cartwgtavgoutsidedoub3d2, CARTWGTAVGOUTSIDEDOUB3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianOutersideDoubleWeightedAverage::
+CartesianOutersideDoubleWeightedAverage(
+   const tbox::Dimension& dim):
+   xfer::CoarsenOperator(dim, "CONSERVATIVE_COARSEN")
+{
+   d_name_id = "CONSERVATIVE_COARSEN";
+}
+
+CartesianOutersideDoubleWeightedAverage::~
+CartesianOutersideDoubleWeightedAverage()
+{
+}
+
+bool CartesianOutersideDoubleWeightedAverage::findCoarsenOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::OutersideVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianOutersideDoubleWeightedAverage::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int CartesianOutersideDoubleWeightedAverage::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianOutersideDoubleWeightedAverage::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void CartesianOutersideDoubleWeightedAverage::coarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, coarse, fine, coarse_box, ratio);
+
+   tbox::Pointer<pdat::OutersideData<double> >
+   fdata = fine.getPatchData(src_component);
+   tbox::Pointer<pdat::OutersideData<double> >
+   cdata = coarse.getPatchData(dst_component);
+
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+   const hier::Index cilo = cdata->getGhostBox().lower();
+   const hier::Index cihi = cdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+
+   for (int d = 0; d < cdata->getDepth(); d++) {
+      // loop over lower and upper outerside arrays
+      for (int i = 0; i < 2; i++) {
+         if ((dim == tbox::Dimension(1))) {
+            F77_FUNC(cartwgtavgoutsidedoub1d,
+               CARTWGTAVGOUTSIDEDOUB1D) (ifirstc(0), ilastc(0),
+               filo(0), fihi(0),
+               cilo(0), cihi(0),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(0, i, d),
+               cdata->getPointer(0, i, d));
+         } else if ((dim == tbox::Dimension(2))) {
+            F77_FUNC(cartwgtavgoutsidedoub2d0,
+               CARTWGTAVGOUTSIDEDOUB2D0) (ifirstc(0), ifirstc(1), ilastc(0),
+               ilastc(1),
+               filo(0), filo(1), fihi(0), fihi(1),
+               cilo(0), cilo(1), cihi(0), cihi(1),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(0, i, d),
+               cdata->getPointer(0, i, d));
+            F77_FUNC(cartwgtavgoutsidedoub2d1,
+               CARTWGTAVGOUTSIDEDOUB2D1) (ifirstc(0), ifirstc(1), ilastc(0),
+               ilastc(1),
+               filo(0), filo(1), fihi(0), fihi(1),
+               cilo(0), cilo(1), cihi(0), cihi(1),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(1, i, d),
+               cdata->getPointer(1, i, d));
+         } else if ((dim == tbox::Dimension(3))) {
+            F77_FUNC(cartwgtavgoutsidedoub3d0,
+               CARTWGTAVGOUTSIDEDOUB3D0) (ifirstc(0), ifirstc(1), ifirstc(2),
+               ilastc(0), ilastc(1), ilastc(2),
+               filo(0), filo(1), filo(2),
+               fihi(0), fihi(1), fihi(2),
+               cilo(0), cilo(1), cilo(2),
+               cihi(0), cihi(1), cihi(2),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(0, i, d),
+               cdata->getPointer(0, i, d));
+            F77_FUNC(cartwgtavgoutsidedoub3d1,
+               CARTWGTAVGOUTSIDEDOUB3D1) (ifirstc(0), ifirstc(1), ifirstc(2),
+               ilastc(0), ilastc(1), ilastc(2),
+               filo(0), filo(1), filo(2),
+               fihi(0), fihi(1), fihi(2),
+               cilo(0), cilo(1), cilo(2),
+               cihi(0), cihi(1), cihi(2),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(1, i, d),
+               cdata->getPointer(1, i, d));
+            F77_FUNC(cartwgtavgoutsidedoub3d2,
+               CARTWGTAVGOUTSIDEDOUB3D2) (ifirstc(0), ifirstc(1), ifirstc(2),
+               ilastc(0), ilastc(1), ilastc(2),
+               filo(0), filo(1), filo(2),
+               fihi(0), fihi(1), fihi(2),
+               cilo(0), cilo(1), cilo(2),
+               cihi(0), cihi(1), cihi(2),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(2, i, d),
+               cdata->getPointer(2, i, d));
+         } else {
+            TBOX_ERROR("CartesianOutersideDoubleWeightedAverage error...\n"
+               << "dim > 3 not supported." << std::endl);
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianOutersideDoubleWeightedAverage.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianOutersideDoubleWeightedAverage.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for outerside double data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianOutersideDoubleWeightedAverage
+#define included_geom_CartesianOutersideDoubleWeightedAverage
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianOutersideDoubleWeightedAverage implements conservative
+ * side-weighted averaging for outerside double patch data defined over
+ * a Cartesian mesh.  It is derived from the xfer::CoarsenOperator base class.
+ * The numerical operations for theaveraging use FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is outerside double, and the std::string is "CONSERVATIVE_COARSEN".
+ *
+ * @see xfer::CoarsenOperator
+ */
+
+class CartesianOutersideDoubleWeightedAverage:
+   public xfer::CoarsenOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianOutersideDoubleWeightedAverage(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianOutersideDoubleWeightedAverage();
+
+   /**
+    * Return true if the variable and name std::string match the outerside
+    * double weighted averaging; otherwise, return false.
+    */
+   bool
+   findCoarsenOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this coarsening operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of outerside double weighted averaging is 0.
+    * It will be performed before any user-defined coarsen operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the weighted averaging operator is the vector of
+    * zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Coarsen the source component on the fine patch to the destination
+    * component on the coarse patch using the outerside double weighted
+    * averaging operator.  Coarsening is performed on the intersection of
+    * the destination patch and the coarse box.  It is assumed that the
+    * fine patch contains sufficient data for the stencil width of the
+    * coarsening operator.
+    */
+   void
+   coarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianPatchGeometry.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianPatchGeometry.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,106 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Simple Cartesian grid geometry for an AMR hierarchy. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianPatchGeometry_C
+#define included_geom_CartesianPatchGeometry_C
+
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/geom/CartesianPatchGeometry.I"
+#endif
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor for CartesianPatchGeometry allocates and sets        *
+ * patch coordinate system information.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+CartesianPatchGeometry::CartesianPatchGeometry(
+   const hier::IntVector& ratio_to_level_zero,
+   const TwoDimBool& touches_regular_bdry,
+   const TwoDimBool& touches_periodic_bdry,
+   const double* dx,
+   const double* x_lo,
+   const double* x_up):
+   hier::PatchGeometry(ratio_to_level_zero,
+                       touches_regular_bdry,
+                       touches_periodic_bdry)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(dx == (double *)NULL));
+   TBOX_ASSERT(!(x_lo == (double *)NULL));
+   TBOX_ASSERT(!(x_up == (double *)NULL));
+#endif
+
+   const tbox::Dimension& dim(ratio_to_level_zero.getDim());
+
+   for (int id = 0; id < dim.getValue(); id++) {
+      d_dx[id] = dx[id];
+      d_x_lo[id] = x_lo[id];
+      d_x_up[id] = x_up[id];
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destructor for CartesianPatchGeometry deallocates dx array.      *
+ *                                                                       *
+ *************************************************************************
+ */
+CartesianPatchGeometry::~CartesianPatchGeometry()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print CartesianPatchGeometry class data.                         *
+ *                                                                       *
+ *************************************************************************
+ */
+void CartesianPatchGeometry::printClassData(
+   std::ostream& os) const
+{
+   const tbox::Dimension& dim(getRatio().getDim());
+
+   os << "Printing CartesianPatchGeometry data: this = "
+      << (CartesianPatchGeometry *)this << std::endl;
+   os << "x_lo = ";
+   for (int id1 = 0; id1 < dim.getValue(); id1++) {
+      os << d_x_lo[id1] << "   ";
+   }
+   os << std::endl;
+   os << "x_up = ";
+   for (int id2 = 0; id2 < dim.getValue(); id2++) {
+      os << d_x_up[id2] << "   ";
+   }
+   os << std::endl;
+   os << "dx = ";
+   for (int id3 = 0; id3 < dim.getValue(); id3++) {
+      os << d_dx[id3] << "   ";
+   }
+   os << std::endl;
+
+   hier::PatchGeometry::printClassData(os);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianPatchGeometry.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianPatchGeometry.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,33 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Simple Cartesian grid geometry for an AMR hierarchy. 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace geom {
+
+SAMRAI_INLINE_KEYWORD
+const double *CartesianPatchGeometry::getDx() const
+{
+   return d_dx;
+}
+
+SAMRAI_INLINE_KEYWORD
+const double *CartesianPatchGeometry::getXLower() const
+{
+   return d_x_lo;
+}
+
+SAMRAI_INLINE_KEYWORD
+const double *CartesianPatchGeometry::getXUpper() const
+{
+   return d_x_up;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianPatchGeometry.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianPatchGeometry.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,107 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Simple Cartesian grid geometry for an AMR hierarchy. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianPatchGeometry
+#define included_geom_CartesianPatchGeometry
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/PatchGeometry.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/IntVector.h"
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianPatchGeometry implements simple Cartesian mes
+ * geometry management for a single patch in an AMR hierarchy.  The geometry is
+ * limited to the mesh increments being specified by the DIM-tuple
+ * (dx[0],...,dx[DIM-1]) associated with the patch, and the spatial
+ * coordinates of the lower and upper corners of the patch within the
+ * computational domain.  The grid data is set by CartesianGridGeometry
+ * class.  This patch geometry class is derived from hier::PatchGeometry
+ * base class.
+ *
+ * @see hier::BoundaryBox
+ * @see hier::PatchGeometry
+ * @see geom::CartesianGridGeometry
+ */
+
+class CartesianPatchGeometry:
+   public hier::PatchGeometry
+{
+public:
+   typedef hier::PatchGeometry::TwoDimBool TwoDimBool;
+
+   /**
+    * Constructor for CartesianPatchGeometry class.  It simply passes
+    * patch boundary information to hier::PatchGeometry base class constructor
+    * and allocates storage for spatial coordinates on patch.
+    */
+   explicit CartesianPatchGeometry(
+      const hier::IntVector& ratio_to_level_zero,
+      const TwoDimBool& touches_regular_bdry,
+      const TwoDimBool& touches_periodic_bdry,
+      const double* dx,
+      const double* x_lo,
+      const double* x_hi);
+
+   /**
+    * Destructor for CartesianPatchGeometry deallocates the
+    * storage for spatial coordinates on patch.
+    */
+   ~CartesianPatchGeometry();
+
+   /**
+    * Return const pointer to dx array for patch.
+    */
+   const double *
+   getDx() const;
+
+   /**
+    * Return const pointer to lower spatial coordinate for patch.
+    */
+   const double *
+   getXLower() const;
+
+   /**
+    * Return const pointer to upper spatial coordinate for patch.
+    */
+   const double *
+   getXUpper() const;
+
+   /**
+    * Print CartesianPatchGeometry class data.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os) const;
+
+private:
+   // These are not implemented.
+   CartesianPatchGeometry(
+      const CartesianPatchGeometry&);
+   void
+   operator = (
+      const CartesianPatchGeometry&);
+
+   double d_dx[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];           // mesh increments for patch.
+   double d_x_lo[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];         // spatial coords of lower end of patch.
+   double d_x_up[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];         // spatial coords of upper end of patch.
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/geom/CartesianPatchGeometry.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianSideComplexWeightedAverage.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianSideComplexWeightedAverage.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,264 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for side-centered complex data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianSideComplexWeightedAverage_C
+#define included_geom_CartesianSideComplexWeightedAverage_C
+
+#include "SAMRAI/geom/CartesianSideComplexWeightedAverage.h"
+#include "SAMRAI/tbox/Complex.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartcoarsen1d.f:
+void F77_FUNC(cartwgtavgsidecplx1d, CARTWGTAVGSIDECPLX1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+// in cartcoarsen2d.f:
+void F77_FUNC(cartwgtavgsidecplx2d0, CARTWGTAVGSIDECPLX2D0) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+
+void F77_FUNC(cartwgtavgsidecplx2d1, CARTWGTAVGSIDECPLX2D1) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+// in cartcoarsen3d.f:
+void F77_FUNC(cartwgtavgsidecplx3d0, CARTWGTAVGSIDECPLX3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+void F77_FUNC(cartwgtavgsidecplx3d1, CARTWGTAVGSIDECPLX3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+void F77_FUNC(cartwgtavgsidecplx3d2, CARTWGTAVGSIDECPLX3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const dcomplex *, dcomplex *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianSideComplexWeightedAverage::CartesianSideComplexWeightedAverage(
+   const tbox::Dimension& dim):
+   xfer::CoarsenOperator(dim, "CONSERVATIVE_COARSEN")
+{
+   d_name_id = "CONSERVATIVE_COARSEN";
+}
+
+CartesianSideComplexWeightedAverage::~CartesianSideComplexWeightedAverage()
+{
+}
+
+bool CartesianSideComplexWeightedAverage::findCoarsenOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::SideVariable<dcomplex> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianSideComplexWeightedAverage::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int CartesianSideComplexWeightedAverage::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianSideComplexWeightedAverage::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void CartesianSideComplexWeightedAverage::coarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, coarse, fine, coarse_box, ratio);
+
+   tbox::Pointer<pdat::SideData<dcomplex> >
+   fdata = fine.getPatchData(src_component);
+   tbox::Pointer<pdat::SideData<dcomplex> >
+   cdata = coarse.getPatchData(dst_component);
+
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+
+   const hier::IntVector& directions(cdata->getDirectionVector());
+
+   TBOX_ASSERT(directions ==
+      hier::IntVector::min(directions, fdata->getDirectionVector()));
+
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+   const hier::Index cilo = cdata->getGhostBox().lower();
+   const hier::Index cihi = cdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+
+   for (int d = 0; d < cdata->getDepth(); d++) {
+      if ((dim == tbox::Dimension(1))) {
+         if (directions(0)) {
+            F77_FUNC(cartwgtavgsidecplx1d, CARTWGTAVGSIDECPLX1D) (ifirstc(0),
+               ilastc(0),
+               filo(0), fihi(0),
+               cilo(0), cihi(0),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(0, d),
+               cdata->getPointer(0, d));
+         }
+      } else if ((dim == tbox::Dimension(2))) {
+         if (directions(0)) {
+            F77_FUNC(cartwgtavgsidecplx2d0, CARTWGTAVGSIDECPLX2D0) (ifirstc(0),
+               ifirstc(1), ilastc(0), ilastc(1),
+               filo(0), filo(1), fihi(0), fihi(1),
+               cilo(0), cilo(1), cihi(0), cihi(1),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(0, d),
+               cdata->getPointer(0, d));
+         }
+         if (directions(1)) {
+            F77_FUNC(cartwgtavgsidecplx2d1, CARTWGTAVGSIDECPLX2D1) (ifirstc(0),
+               ifirstc(1), ilastc(0), ilastc(1),
+               filo(0), filo(1), fihi(0), fihi(1),
+               cilo(0), cilo(1), cihi(0), cihi(1),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(1, d),
+               cdata->getPointer(1, d));
+         }
+      } else if ((dim == tbox::Dimension(3))) {
+         if (directions(0)) {
+            F77_FUNC(cartwgtavgsidecplx3d0, CARTWGTAVGSIDECPLX3D0) (ifirstc(0),
+               ifirstc(1), ifirstc(2),
+               ilastc(0), ilastc(1), ilastc(2),
+               filo(0), filo(1), filo(2),
+               fihi(0), fihi(1), fihi(2),
+               cilo(0), cilo(1), cilo(2),
+               cihi(0), cihi(1), cihi(2),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(0, d),
+               cdata->getPointer(0, d));
+         }
+         if (directions(1)) {
+            F77_FUNC(cartwgtavgsidecplx3d1, CARTWGTAVGSIDECPLX3D1) (ifirstc(0),
+               ifirstc(1), ifirstc(2),
+               ilastc(0), ilastc(1), ilastc(2),
+               filo(0), filo(1), filo(2),
+               fihi(0), fihi(1), fihi(2),
+               cilo(0), cilo(1), cilo(2),
+               cihi(0), cihi(1), cihi(2),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(1, d),
+               cdata->getPointer(1, d));
+         }
+         if (directions(2)) {
+            F77_FUNC(cartwgtavgsidecplx3d2, CARTWGTAVGSIDECPLX3D2) (ifirstc(0),
+               ifirstc(1), ifirstc(2),
+               ilastc(0), ilastc(1), ilastc(2),
+               filo(0), filo(1), filo(2),
+               fihi(0), fihi(1), fihi(2),
+               cilo(0), cilo(1), cilo(2),
+               cihi(0), cihi(1), cihi(2),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(2, d),
+               cdata->getPointer(2, d));
+         }
+      } else {
+         TBOX_ERROR("CartesianOutersideComplexWeightedAverage error...\n"
+            << "dim > 3 not supported." << std::endl);
+      }
+
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianSideComplexWeightedAverage.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianSideComplexWeightedAverage.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for side-centered complex data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianSideComplexWeightedAverage
+#define included_geom_CartesianSideComplexWeightedAverage
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianSideComplexWeightedAverage implements conservative
+ * side-weighted averaging for side-centered complex patch data defined over
+ * a Cartesian mesh.  It is derived from the xfer::CoarsenOperator base class.
+ * The numerical operations for theaveraging use FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is side-centered complex, and the std::string is "CONSERVATIVE_COARSEN".
+ *
+ * @see xfer::CoarsenOperator
+ */
+
+class CartesianSideComplexWeightedAverage:
+   public xfer::CoarsenOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianSideComplexWeightedAverage(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianSideComplexWeightedAverage();
+
+   /**
+    * Return true if the variable and name std::string match the side-centered
+    * complex weighted averaging; otherwise, return false.
+    */
+   bool
+   findCoarsenOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this coarsening operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of side-centered complex weighted averaging is 0.
+    * It will be performed before any user-defined coarsen operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the weighted averaging operator is the vector of
+    * zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Coarsen the source component on the fine patch to the destination
+    * component on the coarse patch using the side-centered complex weighted
+    * averaging operator.  Coarsening is performed on the intersection of
+    * the destination patch and the coarse box.  It is assumed that the
+    * fine patch contains sufficient data for the stencil width of the
+    * coarsening operator.
+    */
+   void
+   coarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianSideDoubleConservativeLinearRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianSideDoubleConservativeLinearRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,344 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Conservative linear refine operator for side-centered
+ *                double data on a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianSideDoubleConservativeLinearRefine_C
+#define included_geom_CartesianSideDoubleConservativeLinearRefine_C
+
+#include "SAMRAI/geom/CartesianSideDoubleConservativeLinearRefine.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <cfloat>
+#include <cmath>
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartrefine1d.f:
+void F77_FUNC(cartclinrefsidedoub1d, CARTCLINREFSIDEDOUB1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *,
+   double *, double *);
+// in cartrefine2d.f:
+void F77_FUNC(cartclinrefsidedoub2d0, CARTCLINREFSIDEDOUB2D0) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *,
+   double *, double *, double *, double *);
+void F77_FUNC(cartclinrefsidedoub2d1, CARTCLINREFSIDEDOUB2D1) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *,
+   double *, double *, double *, double *);
+// in cartrefine3d.f:
+void F77_FUNC(cartclinrefsidedoub3d0, CARTCLINREFSIDEDOUB3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *,
+   double *, double *, double *,
+   double *, double *, double *);
+void F77_FUNC(cartclinrefsidedoub3d1, CARTCLINREFSIDEDOUB3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *,
+   double *, double *, double *,
+   double *, double *, double *);
+void F77_FUNC(cartclinrefsidedoub3d2, CARTCLINREFSIDEDOUB3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *,
+   double *, double *, double *,
+   double *, double *, double *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+CartesianSideDoubleConservativeLinearRefine::
+CartesianSideDoubleConservativeLinearRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSERVATIVE_LINEAR_REFINE")
+{
+   d_name_id = "CONSERVATIVE_LINEAR_REFINE";
+}
+
+CartesianSideDoubleConservativeLinearRefine::~
+CartesianSideDoubleConservativeLinearRefine()
+{
+}
+
+bool CartesianSideDoubleConservativeLinearRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::SideVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianSideDoubleConservativeLinearRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int
+CartesianSideDoubleConservativeLinearRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianSideDoubleConservativeLinearRefine::getStencilWidth() const {
+   return hier::IntVector::getOne(getDim());
+}
+
+void CartesianSideDoubleConservativeLinearRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS3(dim, fine, coarse, ratio);
+
+   tbox::Pointer<pdat::SideData<double> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<pdat::SideData<double> >
+   fdata = fine.getPatchData(dst_component);
+
+   const pdat::SideOverlap* t_overlap =
+      dynamic_cast<const pdat::SideOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+
+   const hier::IntVector& directions(fdata->getDirectionVector());
+
+   TBOX_ASSERT(directions ==
+      hier::IntVector::min(directions, cdata->getDirectionVector()));
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+
+   for (int axis = 0; axis < dim.getValue(); axis++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(axis);
+
+      for (hier::BoxList::Iterator b(boxes); b; b++) {
+
+         hier::Box fine_box(b());
+         TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, fine_box);
+
+         fine_box.upper(axis) -= 1;
+
+         const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+         const hier::Index ifirstc = coarse_box.lower();
+         const hier::Index ilastc = coarse_box.upper();
+         const hier::Index ifirstf = fine_box.lower();
+         const hier::Index ilastf = fine_box.upper();
+
+         const hier::IntVector tmp_ghosts(dim, 0);
+         tbox::Array<double> diff0(cgbox.numberCells(0) + 2);
+         pdat::SideData<double> slope0(cgbox, 1, tmp_ghosts,
+                                       directions);
+
+         for (int d = 0; d < fdata->getDepth(); d++) {
+            if ((dim == tbox::Dimension(1))) {
+               if (directions(axis)) {
+                  F77_FUNC(cartclinrefsidedoub1d, CARTCLINREFSIDEDOUB1D) (
+                     ifirstc(0), ilastc(0),
+                     ifirstf(0), ilastf(0),
+                     cilo(0), cihi(0),
+                     filo(0), fihi(0),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d),
+                     diff0.getPointer(), slope0.getPointer(0));
+               }
+            } else if ((dim == tbox::Dimension(2))) {
+               tbox::Array<double> diff1(cgbox.numberCells(1) + 2);
+               pdat::SideData<double> slope1(cgbox, 1, tmp_ghosts,
+                                             directions);
+
+               if (axis == 0 && directions(0)) {
+                  F77_FUNC(cartclinrefsidedoub2d0, CARTCLINREFSIDEDOUB2D0) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d),
+                     diff0.getPointer(), slope0.getPointer(0),
+                     diff1.getPointer(), slope1.getPointer(0));
+               }
+               if (axis == 1 && directions(1)) {
+                  F77_FUNC(cartclinrefsidedoub2d1, CARTCLINREFSIDEDOUB2D1) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d),
+                     diff1.getPointer(), slope1.getPointer(1),
+                     diff0.getPointer(), slope0.getPointer(1));
+               }
+            } else if ((dim == tbox::Dimension(3))) {
+               tbox::Array<double> diff1(cgbox.numberCells(1) + 2);
+               pdat::SideData<double> slope1(cgbox, 1, tmp_ghosts,
+                                             directions);
+
+               tbox::Array<double> diff2(cgbox.numberCells(2) + 2);
+               pdat::SideData<double> slope2(cgbox, 1, tmp_ghosts,
+                                             directions);
+
+               if (axis == 0 && directions(0)) {
+                  F77_FUNC(cartclinrefsidedoub3d0, CARTCLINREFSIDEDOUB3D0) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d),
+                     diff0.getPointer(), slope0.getPointer(0),
+                     diff1.getPointer(), slope1.getPointer(0),
+                     diff2.getPointer(), slope2.getPointer(0));
+               }
+               if (axis == 1 && directions(1)) {
+                  F77_FUNC(cartclinrefsidedoub3d1, CARTCLINREFSIDEDOUB3D1) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d),
+                     diff1.getPointer(), slope1.getPointer(1),
+                     diff2.getPointer(), slope2.getPointer(1),
+                     diff0.getPointer(), slope0.getPointer(1));
+               }
+               if (axis == 2 && directions(2)) {
+                  F77_FUNC(cartclinrefsidedoub3d2, CARTCLINREFSIDEDOUB3D2) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(2, d),
+                     fdata->getPointer(2, d),
+                     diff2.getPointer(), slope2.getPointer(2),
+                     diff0.getPointer(), slope0.getPointer(2),
+                     diff1.getPointer(), slope1.getPointer(2));
+               }
+            } else {
+               TBOX_ERROR(
+                  "CartesianSideDoubleConservativeLinearRefine error...\n"
+                  << "dim > 3 not supported." << std::endl);
+            }
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianSideDoubleConservativeLinearRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianSideDoubleConservativeLinearRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Conservative linear refine operator for side-centered
+ *                double data on a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianSideDoubleConservativeLinearRefine
+#define included_geom_CartesianSideDoubleConservativeLinearRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianSideDoubleConservativeLinearRefine implements
+ * conservative linear interpolation for side-centered double patch data
+ * defined over a Cartesian mesh.  It is derived from the base class
+ * xfer::RefineOperator.  The numerical operations for the interpolation
+ * use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is side-centered double, and the std::string is
+ * "CONSERVATIVE_LINEAR_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class CartesianSideDoubleConservativeLinearRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianSideDoubleConservativeLinearRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianSideDoubleConservativeLinearRefine();
+
+   /**
+    * Return true if the variable and name std::string match side-centered
+    * double conservative linear interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of side-centered double conservative linear is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the conservative linear interpolation operator is
+    * the vector of ones.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the side-centered double conservative
+    * linear interpolation operator.  Interpolation is performed on the
+    * intersection of the destination patch and the boxes contained in
+    * fine_overlap.  It is assumed that the coarse patch contains sufficient
+    * data for the stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianSideDoubleWeightedAverage.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianSideDoubleWeightedAverage.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,262 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for side-centered double data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianSideDoubleWeightedAverage_C
+#define included_geom_CartesianSideDoubleWeightedAverage_C
+
+#include "SAMRAI/geom/CartesianSideDoubleWeightedAverage.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartcoarsen1d.f:
+void F77_FUNC(cartwgtavgsidedoub1d, CARTWGTAVGSIDEDOUB1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+// in cartcoarsen2d.f:
+void F77_FUNC(cartwgtavgsidedoub2d0, CARTWGTAVGSIDEDOUB2D0) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+
+void F77_FUNC(cartwgtavgsidedoub2d1, CARTWGTAVGSIDEDOUB2D1) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+// in cartcoarsen3d.f:
+void F77_FUNC(cartwgtavgsidedoub3d0, CARTWGTAVGSIDEDOUB3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+void F77_FUNC(cartwgtavgsidedoub3d1, CARTWGTAVGSIDEDOUB3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+void F77_FUNC(cartwgtavgsidedoub3d2, CARTWGTAVGSIDEDOUB3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianSideDoubleWeightedAverage::CartesianSideDoubleWeightedAverage(
+   const tbox::Dimension& dim):
+   xfer::CoarsenOperator(dim, "CONSERVATIVE_COARSEN")
+{
+   d_name_id = "CONSERVATIVE_COARSEN";
+}
+
+CartesianSideDoubleWeightedAverage::~CartesianSideDoubleWeightedAverage()
+{
+}
+
+bool CartesianSideDoubleWeightedAverage::findCoarsenOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::SideVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianSideDoubleWeightedAverage::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int CartesianSideDoubleWeightedAverage::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianSideDoubleWeightedAverage::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void CartesianSideDoubleWeightedAverage::coarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, coarse, fine, coarse_box, ratio);
+
+   tbox::Pointer<pdat::SideData<double> >
+   fdata = fine.getPatchData(src_component);
+   tbox::Pointer<pdat::SideData<double> >
+   cdata = coarse.getPatchData(dst_component);
+
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+
+   const hier::IntVector& directions(cdata->getDirectionVector());
+
+   TBOX_ASSERT(directions ==
+      hier::IntVector::min(directions, fdata->getDirectionVector()));
+
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+   const hier::Index cilo = cdata->getGhostBox().lower();
+   const hier::Index cihi = cdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+
+   for (int d = 0; d < cdata->getDepth(); d++) {
+      if ((dim == tbox::Dimension(1))) {
+         if (directions(0)) {
+            F77_FUNC(cartwgtavgsidedoub1d, CARTWGTAVGSIDEDOUB1D) (ifirstc(0),
+               ilastc(0),
+               filo(0), fihi(0),
+               cilo(0), cihi(0),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(0, d),
+               cdata->getPointer(0, d));
+         }
+      } else if ((dim == tbox::Dimension(2))) {
+         if (directions(0)) {
+            F77_FUNC(cartwgtavgsidedoub2d0, CARTWGTAVGSIDEDOUB2D0) (ifirstc(0),
+               ifirstc(1), ilastc(0), ilastc(1),
+               filo(0), filo(1), fihi(0), fihi(1),
+               cilo(0), cilo(1), cihi(0), cihi(1),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(0, d),
+               cdata->getPointer(0, d));
+         }
+         if (directions(1)) {
+            F77_FUNC(cartwgtavgsidedoub2d1, CARTWGTAVGSIDEDOUB2D1) (ifirstc(0),
+               ifirstc(1), ilastc(0), ilastc(1),
+               filo(0), filo(1), fihi(0), fihi(1),
+               cilo(0), cilo(1), cihi(0), cihi(1),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(1, d),
+               cdata->getPointer(1, d));
+         }
+      } else if ((dim == tbox::Dimension(3))) {
+         if (directions(0)) {
+            F77_FUNC(cartwgtavgsidedoub3d0, CARTWGTAVGSIDEDOUB3D0) (ifirstc(0),
+               ifirstc(1), ifirstc(2),
+               ilastc(0), ilastc(1), ilastc(2),
+               filo(0), filo(1), filo(2),
+               fihi(0), fihi(1), fihi(2),
+               cilo(0), cilo(1), cilo(2),
+               cihi(0), cihi(1), cihi(2),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(0, d),
+               cdata->getPointer(0, d));
+         }
+         if (directions(1)) {
+            F77_FUNC(cartwgtavgsidedoub3d1, CARTWGTAVGSIDEDOUB3D1) (ifirstc(0),
+               ifirstc(1), ifirstc(2),
+               ilastc(0), ilastc(1), ilastc(2),
+               filo(0), filo(1), filo(2),
+               fihi(0), fihi(1), fihi(2),
+               cilo(0), cilo(1), cilo(2),
+               cihi(0), cihi(1), cihi(2),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(1, d),
+               cdata->getPointer(1, d));
+         }
+         if (directions(2)) {
+            F77_FUNC(cartwgtavgsidedoub3d2, CARTWGTAVGSIDEDOUB3D2) (ifirstc(0),
+               ifirstc(1), ifirstc(2),
+               ilastc(0), ilastc(1), ilastc(2),
+               filo(0), filo(1), filo(2),
+               fihi(0), fihi(1), fihi(2),
+               cilo(0), cilo(1), cilo(2),
+               cihi(0), cihi(1), cihi(2),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(2, d),
+               cdata->getPointer(2, d));
+         }
+      } else {
+         TBOX_ERROR("CartesianCellSideDoubleWeightedAverage error...\n"
+            << "dim > 3 not supported." << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianSideDoubleWeightedAverage.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianSideDoubleWeightedAverage.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for side-centered double data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianSideDoubleWeightedAverage
+#define included_geom_CartesianSideDoubleWeightedAverage
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianSideDoubleWeightedAverage implements conservative
+ * side-weighted averaging for side-centered double patch data defined over
+ * a Cartesian mesh.  It is derived from the xfer::CoarsenOperator base class.
+ * The numerical operations for theaveraging use FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is side-centered double, and the std::string is "CONSERVATIVE_COARSEN".
+ *
+ * @see xfer::CoarsenOperator
+ */
+
+class CartesianSideDoubleWeightedAverage:
+   public xfer::CoarsenOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianSideDoubleWeightedAverage(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianSideDoubleWeightedAverage();
+
+   /**
+    * Return true if the variable and name std::string match the side-centered
+    * double weighted averaging; otherwise, return false.
+    */
+   bool
+   findCoarsenOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this coarsening operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of side-centered double weighted averaging is 0.
+    * It will be performed before any user-defined coarsen operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the weighted averaging operator is the vector of
+    * zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Coarsen the source component on the fine patch to the destination
+    * component on the coarse patch using the side-centered double weighted
+    * averaging operator.  Coarsening is performed on the intersection of
+    * the destination patch and the coarse box.  It is assumed that the
+    * fine patch contains sufficient data for the stencil width of the
+    * coarsening operator.
+    */
+   void
+   coarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianSideFloatConservativeLinearRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianSideFloatConservativeLinearRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,344 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Conservative linear refine operator for side-centered
+ *                float data on a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianSideFloatConservativeLinearRefine_C
+#define included_geom_CartesianSideFloatConservativeLinearRefine_C
+
+#include "SAMRAI/geom/CartesianSideFloatConservativeLinearRefine.h"
+
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartrefine1d.f:
+void F77_FUNC(cartclinrefsideflot1d, CARTCLINREFSIDEFLOT1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *,
+   float *, float *);
+// in cartrefine2d.f:
+void F77_FUNC(cartclinrefsideflot2d0, CARTCLINREFSIDEFLOT2D0) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *,
+   float *, float *, float *, float *);
+void F77_FUNC(cartclinrefsideflot2d1, CARTCLINREFSIDEFLOT2D1) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *,
+   float *, float *, float *, float *);
+// in cartrefine3d.f:
+void F77_FUNC(cartclinrefsideflot3d0, CARTCLINREFSIDEFLOT3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *,
+   float *, float *, float *,
+   float *, float *, float *);
+void F77_FUNC(cartclinrefsideflot3d1, CARTCLINREFSIDEFLOT3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *,
+   float *, float *, float *,
+   float *, float *, float *);
+void F77_FUNC(cartclinrefsideflot3d2, CARTCLINREFSIDEFLOT3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *,
+   float *, float *, float *,
+   float *, float *, float *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianSideFloatConservativeLinearRefine::
+CartesianSideFloatConservativeLinearRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSERVATIVE_LINEAR_REFINE")
+{
+   d_name_id = "CONSERVATIVE_LINEAR_REFINE";
+}
+
+CartesianSideFloatConservativeLinearRefine::~
+CartesianSideFloatConservativeLinearRefine()
+{
+}
+
+bool CartesianSideFloatConservativeLinearRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::SideVariable<float> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianSideFloatConservativeLinearRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int
+CartesianSideFloatConservativeLinearRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianSideFloatConservativeLinearRefine::getStencilWidth() const {
+   return hier::IntVector::getOne(getDim());
+}
+
+void CartesianSideFloatConservativeLinearRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS3(dim, fine, coarse, ratio);
+
+   tbox::Pointer<pdat::SideData<float> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<pdat::SideData<float> >
+   fdata = fine.getPatchData(dst_component);
+
+   const pdat::SideOverlap* t_overlap =
+      dynamic_cast<const pdat::SideOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+
+   const hier::IntVector& directions(fdata->getDirectionVector());
+
+   TBOX_ASSERT(directions ==
+      hier::IntVector::min(directions, cdata->getDirectionVector()));
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+
+   for (int axis = 0; axis < dim.getValue(); axis++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(axis);
+
+      for (hier::BoxList::Iterator b(boxes); b; b++) {
+
+         hier::Box fine_box(b());
+         TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, fine_box);
+
+         fine_box.upper(axis) -= 1;
+
+         const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+         const hier::Index ifirstc = coarse_box.lower();
+         const hier::Index ilastc = coarse_box.upper();
+         const hier::Index ifirstf = fine_box.lower();
+         const hier::Index ilastf = fine_box.upper();
+
+         const hier::IntVector tmp_ghosts(dim, 0);
+         tbox::Array<float> diff0(cgbox.numberCells(0) + 2);
+         pdat::SideData<float> slope0(cgbox, 1, tmp_ghosts,
+                                      directions);
+
+         for (int d = 0; d < fdata->getDepth(); d++) {
+            if ((dim == tbox::Dimension(1))) {
+               if (directions(axis)) {
+                  F77_FUNC(cartclinrefsideflot1d, CARTCLINREFSIDEFLOT1D) (
+                     ifirstc(0), ilastc(0),
+                     ifirstf(0), ilastf(0),
+                     cilo(0), cihi(0),
+                     filo(0), fihi(0),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d),
+                     diff0.getPointer(), slope0.getPointer(0));
+               }
+            } else if ((dim == tbox::Dimension(2))) {
+               tbox::Array<float> diff1(cgbox.numberCells(1) + 2);
+               pdat::SideData<float> slope1(cgbox, 1, tmp_ghosts,
+                                            directions);
+
+               if (axis == 0 && directions(0)) {
+                  F77_FUNC(cartclinrefsideflot2d0, CARTCLINREFSIDEFLOT2D0) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d),
+                     diff0.getPointer(), slope0.getPointer(0),
+                     diff1.getPointer(), slope1.getPointer(0));
+               }
+               if (axis == 1 && directions(1)) {
+                  F77_FUNC(cartclinrefsideflot2d1, CARTCLINREFSIDEFLOT2D1) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d),
+                     diff1.getPointer(), slope1.getPointer(1),
+                     diff0.getPointer(), slope0.getPointer(1));
+               }
+            } else if ((dim == tbox::Dimension(3))) {
+               tbox::Array<float> diff1(cgbox.numberCells(1) + 2);
+               pdat::SideData<float> slope1(cgbox, 1, tmp_ghosts,
+                                            directions);
+
+               tbox::Array<float> diff2(cgbox.numberCells(2) + 2);
+               pdat::SideData<float> slope2(cgbox, 1, tmp_ghosts,
+                                            directions);
+
+               if (axis == 0 && directions(0)) {
+                  F77_FUNC(cartclinrefsideflot3d0, CARTCLINREFSIDEFLOT3D0) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d),
+                     diff0.getPointer(), slope0.getPointer(0),
+                     diff1.getPointer(), slope1.getPointer(0),
+                     diff2.getPointer(), slope2.getPointer(0));
+               }
+               if (axis == 1 && directions(1)) {
+                  F77_FUNC(cartclinrefsideflot3d1, CARTCLINREFSIDEFLOT3D1) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d),
+                     diff1.getPointer(), slope1.getPointer(1),
+                     diff2.getPointer(), slope2.getPointer(1),
+                     diff0.getPointer(), slope0.getPointer(1));
+               }
+               if (axis == 2 && directions(2)) {
+                  F77_FUNC(cartclinrefsideflot3d2, CARTCLINREFSIDEFLOT3D2) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cgeom->getDx(),
+                     fgeom->getDx(),
+                     cdata->getPointer(2, d),
+                     fdata->getPointer(2, d),
+                     diff2.getPointer(), slope2.getPointer(2),
+                     diff0.getPointer(), slope0.getPointer(2),
+                     diff1.getPointer(), slope1.getPointer(2));
+               }
+            } else {
+               TBOX_ERROR(
+                  "CartesianSideFloatConservativeLinearRefine error...\n"
+                  << "dim > 3 not supported." << std::endl);
+            }
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianSideFloatConservativeLinearRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianSideFloatConservativeLinearRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Conservative linear refine operator for side-centered
+ *                float data on a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianSideFloatConservativeLinearRefine
+#define included_geom_CartesianSideFloatConservativeLinearRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianSideFloatConservativeLinearRefine implements
+ * conservative linear interpolation for side-centered float patch data
+ * defined over a Cartesian mesh.  It is derived from the base class
+ * xfer::RefineOperator.  The numerical operations for the interpolation
+ * use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is side-centered float, and the std::string is
+ * "CONSERVATIVE_LINEAR_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class CartesianSideFloatConservativeLinearRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianSideFloatConservativeLinearRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianSideFloatConservativeLinearRefine();
+
+   /**
+    * Return true if the variable and name std::string match side-centered
+    * float conservative linear interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of side-centered float conservative linear is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the conservative linear interpolation operator is
+    * the vector of ones.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the side-centered float conservative
+    * linear interpolation operator.  Interpolation is performed on the
+    * intersection of the destination patch and the boxes contained in
+    * fine_overlap.  It is assumed that the coarse patch contains sufficient
+    * data for the stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianSideFloatWeightedAverage.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianSideFloatWeightedAverage.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,263 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for side-centered float data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianSideFloatWeightedAverage_C
+#define included_geom_CartesianSideFloatWeightedAverage_C
+
+#include "SAMRAI/geom/CartesianSideFloatWeightedAverage.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in cartcoarsen1d.f:
+void F77_FUNC(cartwgtavgsideflot1d, CARTWGTAVGSIDEFLOT1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+// in cartcoarsen2d.f:
+void F77_FUNC(cartwgtavgsideflot2d0, CARTWGTAVGSIDEFLOT2D0) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+
+void F77_FUNC(cartwgtavgsideflot2d1, CARTWGTAVGSIDEFLOT2D1) (const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+// in cartcoarsen3d.f:
+void F77_FUNC(cartwgtavgsideflot3d0, CARTWGTAVGSIDEFLOT3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+void F77_FUNC(cartwgtavgsideflot3d1, CARTWGTAVGSIDEFLOT3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+void F77_FUNC(cartwgtavgsideflot3d2, CARTWGTAVGSIDEFLOT3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const float *, float *);
+}
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+CartesianSideFloatWeightedAverage::CartesianSideFloatWeightedAverage(
+   const tbox::Dimension& dim):
+   xfer::CoarsenOperator(dim, "CONSERVATIVE_COARSEN")
+{
+   d_name_id = "CONSERVATIVE_COARSEN";
+}
+
+CartesianSideFloatWeightedAverage::~CartesianSideFloatWeightedAverage()
+{
+}
+
+bool CartesianSideFloatWeightedAverage::findCoarsenOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::SideVariable<float> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CartesianSideFloatWeightedAverage::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int CartesianSideFloatWeightedAverage::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CartesianSideFloatWeightedAverage::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void CartesianSideFloatWeightedAverage::coarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, coarse, fine, coarse_box, ratio);
+
+   tbox::Pointer<pdat::SideData<float> >
+   fdata = fine.getPatchData(src_component);
+   tbox::Pointer<pdat::SideData<float> >
+   cdata = coarse.getPatchData(dst_component);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+#endif
+   const hier::IntVector& directions = cdata->getDirectionVector();
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(directions ==
+      hier::IntVector::min(directions, fdata->getDirectionVector()));
+#endif
+
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+   const hier::Index cilo = cdata->getGhostBox().lower();
+   const hier::Index cihi = cdata->getGhostBox().upper();
+
+   const tbox::Pointer<CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+   const tbox::Pointer<CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+
+   for (int d = 0; d < cdata->getDepth(); d++) {
+      if ((dim == tbox::Dimension(1))) {
+         if (directions(0)) {
+            F77_FUNC(cartwgtavgsideflot1d, CARTWGTAVGSIDEFLOT1D) (ifirstc(0),
+               ilastc(0),
+               filo(0), fihi(0),
+               cilo(0), cihi(0),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(0, d),
+               cdata->getPointer(0, d));
+         }
+      } else if ((dim == tbox::Dimension(2))) {
+         if (directions(0)) {
+            F77_FUNC(cartwgtavgsideflot2d0, CARTWGTAVGSIDEFLOT2D0) (ifirstc(0),
+               ifirstc(1), ilastc(0), ilastc(1),
+               filo(0), filo(1), fihi(0), fihi(1),
+               cilo(0), cilo(1), cihi(0), cihi(1),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(0, d),
+               cdata->getPointer(0, d));
+         }
+         if (directions(1)) {
+            F77_FUNC(cartwgtavgsideflot2d1, CARTWGTAVGSIDEFLOT2D1) (ifirstc(0),
+               ifirstc(1), ilastc(0), ilastc(1),
+               filo(0), filo(1), fihi(0), fihi(1),
+               cilo(0), cilo(1), cihi(0), cihi(1),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(1, d),
+               cdata->getPointer(1, d));
+         }
+      } else if ((dim == tbox::Dimension(3))) {
+         if (directions(0)) {
+            F77_FUNC(cartwgtavgsideflot3d0, CARTWGTAVGSIDEFLOT3D0) (ifirstc(0),
+               ifirstc(1), ifirstc(2),
+               ilastc(0), ilastc(1), ilastc(2),
+               filo(0), filo(1), filo(2),
+               fihi(0), fihi(1), fihi(2),
+               cilo(0), cilo(1), cilo(2),
+               cihi(0), cihi(1), cihi(2),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(0, d),
+               cdata->getPointer(0, d));
+         }
+         if (directions(1)) {
+            F77_FUNC(cartwgtavgsideflot3d1, CARTWGTAVGSIDEFLOT3D1) (ifirstc(0),
+               ifirstc(1), ifirstc(2),
+               ilastc(0), ilastc(1), ilastc(2),
+               filo(0), filo(1), filo(2),
+               fihi(0), fihi(1), fihi(2),
+               cilo(0), cilo(1), cilo(2),
+               cihi(0), cihi(1), cihi(2),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(1, d),
+               cdata->getPointer(1, d));
+         }
+         if (directions(2)) {
+            F77_FUNC(cartwgtavgsideflot3d2, CARTWGTAVGSIDEFLOT3D2) (ifirstc(0),
+               ifirstc(1), ifirstc(2),
+               ilastc(0), ilastc(1), ilastc(2),
+               filo(0), filo(1), filo(2),
+               fihi(0), fihi(1), fihi(2),
+               cilo(0), cilo(1), cilo(2),
+               cihi(0), cihi(1), cihi(2),
+               &ratio[0],
+               fgeom->getDx(),
+               cgeom->getDx(),
+               fdata->getPointer(2, d),
+               cdata->getPointer(2, d));
+         }
+      } else {
+         TBOX_ERROR("CartesianSideFloatWeightedAverage error...\n"
+            << "dim > 3 not supported." << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/CartesianSideFloatWeightedAverage.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/CartesianSideFloatWeightedAverage.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for side-centered float data on
+ *                a Cartesian mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_CartesianSideFloatWeightedAverage
+#define included_geom_CartesianSideFloatWeightedAverage
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class CartesianSideFloatWeightedAverage implements conservative
+ * side-weighted averaging for side-centered float patch data defined over
+ * a Cartesian mesh.  It is derived from the xfer::CoarsenOperator base class.
+ * The numerical operations for theaveraging use FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is side-centered float, and the std::string is "CONSERVATIVE_COARSEN".
+ *
+ * @see xfer::CoarsenOperator
+ */
+
+class CartesianSideFloatWeightedAverage:
+   public xfer::CoarsenOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CartesianSideFloatWeightedAverage(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CartesianSideFloatWeightedAverage();
+
+   /**
+    * Return true if the variable and name std::string match the side-centered
+    * float weighted averaging; otherwise, return false.
+    */
+   bool
+   findCoarsenOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this coarsening operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of side-centered float weighted averaging is 0.
+    * It will be performed before any user-defined coarsen operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the weighted averaging operator is the vector of
+    * zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Coarsen the source component on the fine patch to the destination
+    * component on the coarse patch using the side-centered float weighted
+    * averaging operator.  Coarsening is performed on the intersection of
+    * the destination patch and the coarse box.  It is assumed that the
+    * fine patch contains sufficient data for the stencil width of the
+    * coarsening operator.
+    */
+   void
+   coarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,6433 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=BlockGridGeometry.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/BlockGridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/geom/BlockGridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellComplexLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDoubleLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellFloatLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceComplexLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDoubleLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceFloatLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeComplexLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDoubleLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeFloatLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceComplexLinearTimeInterpolateOp.h\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDoubleLinearTimeInterpolateOp.h\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceFloatLinearTimeInterpolateOp.h\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideComplexLinearTimeInterpolateOp.h\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDoubleLinearTimeInterpolateOp.h\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideFloatLinearTimeInterpolateOp.h\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideComplexLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDoubleLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideFloatLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	BlockGridGeometry.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=CartesianCellComplexConservativeLinearRefine.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianCellComplexConservativeLinearRefine.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	CartesianCellComplexConservativeLinearRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=CartesianCellComplexLinearRefine.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianCellComplexLinearRefine.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	CartesianCellComplexLinearRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=CartesianCellComplexWeightedAverage.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianCellComplexWeightedAverage.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	CartesianCellComplexWeightedAverage.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
+FILE_4=CartesianCellDoubleConservativeLinearRefine.o
+DEPENDS_4:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianCellDoubleConservativeLinearRefine.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	CartesianCellDoubleConservativeLinearRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_4 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_4:X.o=${NDIM}.o}: ${DEPENDS_4}
+
+FILE_5=CartesianCellDoubleLinearRefine.o
+DEPENDS_5:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianCellDoubleLinearRefine.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	CartesianCellDoubleLinearRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_5 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_5:X.o=${NDIM}.o}: ${DEPENDS_5}
+
+FILE_6=CartesianCellDoubleWeightedAverage.o
+DEPENDS_6:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianCellDoubleWeightedAverage.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	CartesianCellDoubleWeightedAverage.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_6 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_6:X.o=${NDIM}.o}: ${DEPENDS_6}
+
+FILE_7=CartesianCellFloatConservativeLinearRefine.o
+DEPENDS_7:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianCellFloatConservativeLinearRefine.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	CartesianCellFloatConservativeLinearRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_7 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_7:X.o=${NDIM}.o}: ${DEPENDS_7}
+
+FILE_8=CartesianCellFloatLinearRefine.o
+DEPENDS_8:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianCellFloatLinearRefine.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	CartesianCellFloatLinearRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_8 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_8:X.o=${NDIM}.o}: ${DEPENDS_8}
+
+FILE_9=CartesianCellFloatWeightedAverage.o
+DEPENDS_9:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianCellFloatWeightedAverage.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	CartesianCellFloatWeightedAverage.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_9 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_9:X.o=${NDIM}.o}: ${DEPENDS_9}
+
+FILE_10=CartesianEdgeComplexWeightedAverage.o
+DEPENDS_10:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianEdgeComplexWeightedAverage.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	CartesianEdgeComplexWeightedAverage.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_10 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_10:X.o=${NDIM}.o}: ${DEPENDS_10}
+
+FILE_11=CartesianEdgeDoubleConservativeLinearRefine.o
+DEPENDS_11:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianEdgeDoubleConservativeLinearRefine.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	CartesianEdgeDoubleConservativeLinearRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_11 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_11:X.o=${NDIM}.o}: ${DEPENDS_11}
+
+FILE_12=CartesianEdgeDoubleWeightedAverage.o
+DEPENDS_12:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianEdgeDoubleWeightedAverage.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	CartesianEdgeDoubleWeightedAverage.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_12 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_12:X.o=${NDIM}.o}: ${DEPENDS_12}
+
+FILE_13=CartesianEdgeFloatConservativeLinearRefine.o
+DEPENDS_13:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianEdgeFloatConservativeLinearRefine.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	CartesianEdgeFloatConservativeLinearRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_13 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_13:X.o=${NDIM}.o}: ${DEPENDS_13}
+
+FILE_14=CartesianEdgeFloatWeightedAverage.o
+DEPENDS_14:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianEdgeFloatWeightedAverage.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	CartesianEdgeFloatWeightedAverage.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_14 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_14:X.o=${NDIM}.o}: ${DEPENDS_14}
+
+FILE_15=CartesianFaceComplexWeightedAverage.o
+DEPENDS_15:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianFaceComplexWeightedAverage.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	CartesianFaceComplexWeightedAverage.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_15 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_15:X.o=${NDIM}.o}: ${DEPENDS_15}
+
+FILE_16=CartesianFaceDoubleConservativeLinearRefine.o
+DEPENDS_16:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianFaceDoubleConservativeLinearRefine.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	CartesianFaceDoubleConservativeLinearRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_16 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_16:X.o=${NDIM}.o}: ${DEPENDS_16}
+
+FILE_17=CartesianFaceDoubleWeightedAverage.o
+DEPENDS_17:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianFaceDoubleWeightedAverage.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	CartesianFaceDoubleWeightedAverage.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_17 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_17:X.o=${NDIM}.o}: ${DEPENDS_17}
+
+FILE_18=CartesianFaceFloatConservativeLinearRefine.o
+DEPENDS_18:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianFaceFloatConservativeLinearRefine.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	CartesianFaceFloatConservativeLinearRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_18 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_18:X.o=${NDIM}.o}: ${DEPENDS_18}
+
+FILE_19=CartesianFaceFloatWeightedAverage.o
+DEPENDS_19:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianFaceFloatWeightedAverage.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	CartesianFaceFloatWeightedAverage.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_19 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_19:X.o=${NDIM}.o}: ${DEPENDS_19}
+
+FILE_20=CartesianGridGeometry.o
+DEPENDS_20:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianCellComplexConservativeLinearRefine.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianCellComplexLinearRefine.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianCellComplexWeightedAverage.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianCellDoubleConservativeLinearRefine.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianCellDoubleLinearRefine.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianCellDoubleWeightedAverage.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianCellFloatConservativeLinearRefine.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianCellFloatLinearRefine.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianCellFloatWeightedAverage.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianEdgeComplexWeightedAverage.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianEdgeDoubleConservativeLinearRefine.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianEdgeDoubleWeightedAverage.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianEdgeFloatConservativeLinearRefine.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianEdgeFloatWeightedAverage.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianFaceComplexWeightedAverage.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianFaceDoubleConservativeLinearRefine.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianFaceDoubleWeightedAverage.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianFaceFloatConservativeLinearRefine.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianFaceFloatWeightedAverage.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianNodeComplexLinearRefine.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianNodeDoubleLinearRefine.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianNodeFloatLinearRefine.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianOuterfaceComplexWeightedAverage.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianOuterfaceDoubleWeightedAverage.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianOuterfaceFloatWeightedAverage.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianOutersideDoubleWeightedAverage.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianSideComplexWeightedAverage.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianSideDoubleConservativeLinearRefine.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianSideDoubleWeightedAverage.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianSideFloatConservativeLinearRefine.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianSideFloatWeightedAverage.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellComplexConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellComplexLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDoubleLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellFloatConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellFloatLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIntegerConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeComplexConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeComplexLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDoubleLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeFloatConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeFloatLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIntegerConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceComplexConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceComplexLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDoubleLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceFloatConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceFloatLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIntegerConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeComplexInjection.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeComplexLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDoubleInjection.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDoubleLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeFloatInjection.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeFloatLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIntegerInjection.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceComplexConstantRefine.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceComplexLinearTimeInterpolateOp.h\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDoubleConstantRefine.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDoubleLinearTimeInterpolateOp.h\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceFloatConstantRefine.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceFloatLinearTimeInterpolateOp.h\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceIntegerConstantRefine.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDoubleConstantCoarsen.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideComplexLinearTimeInterpolateOp.h\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDoubleLinearTimeInterpolateOp.h\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideFloatLinearTimeInterpolateOp.h\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideComplexConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideComplexLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDoubleLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideFloatConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideFloatLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIntegerConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	CartesianGridGeometry.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_20 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_20:X.o=${NDIM}.o}: ${DEPENDS_20}
+
+FILE_21=CartesianNodeComplexLinearRefine.o
+DEPENDS_21:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianNodeComplexLinearRefine.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	CartesianNodeComplexLinearRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_21 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_21:X.o=${NDIM}.o}: ${DEPENDS_21}
+
+FILE_22=CartesianNodeDoubleLinearRefine.o
+DEPENDS_22:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianNodeDoubleLinearRefine.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	CartesianNodeDoubleLinearRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_22 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_22:X.o=${NDIM}.o}: ${DEPENDS_22}
+
+FILE_23=CartesianNodeFloatLinearRefine.o
+DEPENDS_23:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianNodeFloatLinearRefine.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	CartesianNodeFloatLinearRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_23 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_23:X.o=${NDIM}.o}: ${DEPENDS_23}
+
+FILE_24=CartesianOuterfaceComplexWeightedAverage.o
+DEPENDS_24:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianOuterfaceComplexWeightedAverage.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	CartesianOuterfaceComplexWeightedAverage.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_24 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_24:X.o=${NDIM}.o}: ${DEPENDS_24}
+
+FILE_25=CartesianOuterfaceDoubleWeightedAverage.o
+DEPENDS_25:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianOuterfaceDoubleWeightedAverage.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	CartesianOuterfaceDoubleWeightedAverage.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_25 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_25:X.o=${NDIM}.o}: ${DEPENDS_25}
+
+FILE_26=CartesianOuterfaceFloatWeightedAverage.o
+DEPENDS_26:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianOuterfaceFloatWeightedAverage.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	CartesianOuterfaceFloatWeightedAverage.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_26 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_26:X.o=${NDIM}.o}: ${DEPENDS_26}
+
+FILE_27=CartesianOutersideDoubleWeightedAverage.o
+DEPENDS_27:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianOutersideDoubleWeightedAverage.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	CartesianOutersideDoubleWeightedAverage.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_27 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_27:X.o=${NDIM}.o}: ${DEPENDS_27}
+
+FILE_28=CartesianPatchGeometry.o
+DEPENDS_28:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h CartesianPatchGeometry.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_28 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_28:X.o=${NDIM}.o}: ${DEPENDS_28}
+
+FILE_29=CartesianSideComplexWeightedAverage.o
+DEPENDS_29:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianSideComplexWeightedAverage.h\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	CartesianSideComplexWeightedAverage.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_29 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_29:X.o=${NDIM}.o}: ${DEPENDS_29}
+
+FILE_30=CartesianSideDoubleConservativeLinearRefine.o
+DEPENDS_30:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianSideDoubleConservativeLinearRefine.h\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	CartesianSideDoubleConservativeLinearRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_30 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_30:X.o=${NDIM}.o}: ${DEPENDS_30}
+
+FILE_31=CartesianSideDoubleWeightedAverage.o
+DEPENDS_31:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianSideDoubleWeightedAverage.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	CartesianSideDoubleWeightedAverage.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_31 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_31:X.o=${NDIM}.o}: ${DEPENDS_31}
+
+FILE_32=CartesianSideFloatConservativeLinearRefine.o
+DEPENDS_32:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianSideFloatConservativeLinearRefine.h\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	CartesianSideFloatConservativeLinearRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_32 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_32:X.o=${NDIM}.o}: ${DEPENDS_32}
+
+FILE_33=CartesianSideFloatWeightedAverage.o
+DEPENDS_33:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianSideFloatWeightedAverage.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	CartesianSideFloatWeightedAverage.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_33 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_33:X.o=${NDIM}.o}: ${DEPENDS_33}
+
+FILE_34=SkeletonCoarsen.o
+DEPENDS_34:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/SkeletonCoarsen.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h SkeletonCoarsen.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_34 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_34:X.o=${NDIM}.o}: ${DEPENDS_34}
+
+FILE_35=SkeletonGridGeometry.o
+DEPENDS_35:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/SkeletonCoarsen.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/SkeletonGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/SkeletonPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/SkeletonRefine.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellComplexLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDoubleLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellFloatLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceComplexLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDoubleLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceFloatLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeComplexLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDoubleLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeFloatLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceComplexLinearTimeInterpolateOp.h\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDoubleLinearTimeInterpolateOp.h\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceFloatLinearTimeInterpolateOp.h\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideComplexLinearTimeInterpolateOp.h\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDoubleLinearTimeInterpolateOp.h\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideFloatLinearTimeInterpolateOp.h\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideComplexLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDoubleLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideFloatLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	SkeletonGridGeometry.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_35 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_35:X.o=${NDIM}.o}: ${DEPENDS_35}
+
+FILE_36=SkeletonPatchGeometry.o
+DEPENDS_36:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/SkeletonPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h SkeletonPatchGeometry.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_36 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_36:X.o=${NDIM}.o}: ${DEPENDS_36}
+
+FILE_37=SkeletonRefine.o
+DEPENDS_37:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/SkeletonRefine.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h SkeletonRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_37 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_37:X.o=${NDIM}.o}: ${DEPENDS_37}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,72 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   primary makefile for compiling the SAMRAI geom package 
+##
+#########################################################################
+
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/SAMRAI/geom
+VPATH         = @srcdir@
+OBJECT        = ../../..
+
+default: library
+
+include $(OBJECT)/config/Makefile.config
+
+SUBDIRS = fortran
+
+OBJS = 		\
+	BlockGridGeometry.o \
+	SkeletonCoarsen.o \
+	SkeletonPatchGeometry.o \
+	SkeletonGridGeometry.o \
+	SkeletonCoarsen.o \
+	SkeletonRefine.o \
+	CartesianPatchGeometry.o \
+	CartesianGridGeometry.o \
+	CartesianCellDoubleLinearRefine.o \
+	CartesianCellDoubleConservativeLinearRefine.o \
+	CartesianCellDoubleWeightedAverage.o \
+	CartesianOutersideDoubleWeightedAverage.o \
+	CartesianSideDoubleWeightedAverage.o \
+	CartesianSideDoubleConservativeLinearRefine.o \
+	CartesianEdgeDoubleWeightedAverage.o \
+	CartesianEdgeDoubleConservativeLinearRefine.o \
+	CartesianNodeDoubleLinearRefine.o \
+	CartesianOuterfaceDoubleWeightedAverage.o \
+	CartesianFaceDoubleWeightedAverage.o \
+	CartesianFaceDoubleConservativeLinearRefine.o \
+	CartesianCellFloatLinearRefine.o \
+	CartesianCellFloatWeightedAverage.o \
+	CartesianCellFloatConservativeLinearRefine.o \
+	CartesianSideFloatConservativeLinearRefine.o \
+	CartesianSideFloatWeightedAverage.o \
+	CartesianEdgeFloatConservativeLinearRefine.o \
+	CartesianEdgeFloatWeightedAverage.o \
+	CartesianNodeFloatLinearRefine.o \
+	CartesianOuterfaceFloatWeightedAverage.o \
+	CartesianFaceFloatWeightedAverage.o \
+	CartesianFaceFloatConservativeLinearRefine.o \
+	CartesianCellComplexLinearRefine.o \
+	CartesianCellComplexWeightedAverage.o \
+	CartesianCellComplexConservativeLinearRefine.o \
+	CartesianSideComplexWeightedAverage.o \
+	CartesianEdgeComplexWeightedAverage.o \
+	CartesianNodeComplexLinearRefine.o \
+	CartesianOuterfaceComplexWeightedAverage.o \
+	CartesianFaceComplexWeightedAverage.o \
+	CartesianFaceFloatWeightedAverage.o
+
+library: $(OBJS)
+	for DIR in $(SUBDIRS); do if test -d $$DIR; then (cd $$DIR && $(MAKE) $@) ; fi || exit 1; done
+clean:
+	$(SAMCLEAN)
+	for DIR in $(SUBDIRS); do if test -d $$DIR; then (cd $$DIR && $(MAKE) $@) ; fi || exit 1; done
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/SkeletonCoarsen.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/SkeletonCoarsen.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for cell-centered double data on
+ *                a Moving mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_SkeletonCoarsen_C
+#define included_geom_SkeletonCoarsen_C
+
+#include "SAMRAI/geom/SkeletonCoarsen.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <float.h>
+#include <math.h>
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+SkeletonCoarsen::SkeletonCoarsen(
+   const tbox::Dimension& dim):
+   xfer::CoarsenOperator(dim, "SKELETON_COARSEN")
+{
+   d_name_id = "SKELETON_COARSEN";
+}
+
+SkeletonCoarsen::~SkeletonCoarsen()
+{
+}
+
+bool SkeletonCoarsen::findCoarsenOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   NULL_USE(var);
+   if (op_name == d_name_id) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string& SkeletonCoarsen::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int SkeletonCoarsen::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector SkeletonCoarsen::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void SkeletonCoarsen::coarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   //no operation for skeleton coarsen operator
+   NULL_USE(coarse);
+   NULL_USE(fine);
+   NULL_USE(dst_component);
+   NULL_USE(src_component);
+   NULL_USE(coarse_box);
+   NULL_USE(ratio);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/SkeletonCoarsen.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/SkeletonCoarsen.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,106 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for cell-centered double data on
+ *                a Moving mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_SkeletonCoarsen
+#define included_geom_SkeletonCoarsen
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class SkeletonCoarsen implements a dummy coarsen operator
+ * for the skeleton geometry type.  It does nothing but provide
+ * basic implementations of the pure virtual functions in the coarsen
+ * operator interface.  The findCoarsenOperator() operator function
+ * returns true if the the argument std::string is "SKELETON_COARSEN".
+ *
+ * @see xfer::CoarsenOperator
+ */
+
+class SkeletonCoarsen:
+   public xfer::CoarsenOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit SkeletonCoarsen(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~SkeletonCoarsen();
+
+   /**
+    * Return true if the variable and name std::string match cell-centered
+    * double weighted averaging; otherwise, return false.
+    */
+   bool
+   findCoarsenOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this coarsening operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of cell-centered double weighted averaging is 0.
+    * It will be performed before any user-defined coarsen operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the weighted averaging operator is the vector of
+    * zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Coarsen the source component on the fine patch to the destination
+    * component on the coarse patch using the cell-centered double weighted
+    * averaging operator.  Coarsening is performed on the intersection of
+    * the destination patch and the coarse box.  It is assumed that the
+    * fine patch contains sufficient data for the stencil width of the
+    * coarsening operator.
+    */
+   void
+   coarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/SkeletonGridGeometry.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/SkeletonGridGeometry.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,517 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Simple Skeleton grid geometry for an AMR hierarchy. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_SkeletonGridGeometry_C
+#define included_geom_SkeletonGridGeometry_C
+
+#include "SAMRAI/geom/SkeletonGridGeometry.h"
+#include "SAMRAI/geom/SkeletonPatchGeometry.h"
+
+// Skeleton no-operation refine and coarsen operators
+#include "SAMRAI/geom/SkeletonCoarsen.h"
+#include "SAMRAI/geom/SkeletonRefine.h"
+
+// Time interpolation operators
+#include "SAMRAI/pdat/CellComplexLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/SideComplexLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/FaceComplexLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/NodeComplexLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/OuterfaceComplexLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/OutersideComplexLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/SideComplexLinearTimeInterpolateOp.h"
+
+#include "SAMRAI/pdat/CellFloatLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/SideFloatLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/FaceFloatLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/NodeFloatLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/OuterfaceFloatLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/OutersideFloatLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/SideFloatLinearTimeInterpolateOp.h"
+
+#include "SAMRAI/pdat/CellDoubleLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/SideDoubleLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/FaceDoubleLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/NodeDoubleLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/OuterfaceDoubleLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/OutersideDoubleLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/SideDoubleLinearTimeInterpolateOp.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/BoundaryLookupTable.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <cstdlib>
+#include <fstream>
+
+#define GEOM_SKELETON_GRID_GEOMETRY_VERSION (2)
+
+namespace SAMRAI {
+namespace geom {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructors for SkeletonGridGeometry.  Both set up operator     *
+ * handlers.  However, one initializes data members based on arguments.  *
+ * The other initializes the object based on input file information.     *
+ *                                                                       *
+ *************************************************************************
+ */
+SkeletonGridGeometry::SkeletonGridGeometry(
+   const tbox::Dimension& dim,
+   const std::string& object_name,
+   tbox::Pointer<tbox::Database> input_db,
+   bool register_for_restart):
+   xfer::Geometry(dim, object_name)
+{
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!input_db.isNull());
+
+   d_object_name = object_name;
+   d_registered_for_restart = register_for_restart;
+
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->
+      registerRestartItem(d_object_name, this);
+   }
+
+   makeStandardOperators(dim);
+
+   bool is_from_restart = tbox::RestartManager::getManager()->isFromRestart();
+   if (is_from_restart && d_registered_for_restart) {
+      getFromRestart();
+   }
+
+   getFromInput(input_db, is_from_restart);
+
+}
+
+SkeletonGridGeometry::SkeletonGridGeometry(
+   const std::string& object_name,
+   const hier::BoxArray& domain,
+   bool register_for_restart):
+   xfer::Geometry(domain.getDim(), object_name)
+{
+   TBOX_ASSERT(!object_name.empty());
+
+   const tbox::Dimension& dim(getDim());
+
+   d_object_name = object_name;
+   d_registered_for_restart = register_for_restart;
+
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->
+      registerRestartItem(d_object_name, this);
+   }
+
+   this->setPhysicalDomain(domain);
+
+   makeStandardOperators(dim);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destructor for SkeletonGridGeometry deallocates grid storage.    *
+ * Note that operator handlers that are created in constructor are       *
+ * deallocated in xfer::Geometry destructor.                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SkeletonGridGeometry::~SkeletonGridGeometry()
+{
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->unregisterRestartItem(d_object_name);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create and return pointer to refined version of this Cartesian        *
+ * grid geometry object refined by the given ratio.                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::GridGeometry>
+SkeletonGridGeometry::makeRefinedGridGeometry(
+   const std::string& fine_geom_name,
+   const hier::IntVector& refine_ratio,
+   bool register_for_restart) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   TBOX_ASSERT(!fine_geom_name.empty());
+   TBOX_ASSERT(fine_geom_name != d_object_name);
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, refine_ratio);
+   TBOX_ASSERT(refine_ratio > hier::IntVector::getZero(dim));
+
+   hier::BoxArray fine_domain(this->getPhysicalDomain());
+   fine_domain.refine(refine_ratio);
+
+   geom::SkeletonGridGeometry* fine_geometry =
+      new geom::SkeletonGridGeometry(fine_geom_name,
+         fine_domain,
+         register_for_restart);
+
+   fine_geometry->initializePeriodicShift(this->getPeriodicShift(hier::
+         IntVector::getOne(dim)));
+
+   return tbox::Pointer<hier::GridGeometry>(fine_geometry);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create and return pointer to coarsened version of this Cartesian      *
+ * grid geometry object coarsened by the given ratio.                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::GridGeometry>
+SkeletonGridGeometry::makeCoarsenedGridGeometry(
+   const std::string& coarse_geom_name,
+   const hier::IntVector& coarsen_ratio,
+   bool register_for_restart) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   TBOX_ASSERT(!coarse_geom_name.empty());
+   TBOX_ASSERT(coarse_geom_name != d_object_name);
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, coarsen_ratio);
+   TBOX_ASSERT(coarsen_ratio > hier::IntVector::getZero(dim));
+
+   hier::BoxArray coarse_domain(this->getPhysicalDomain());
+   coarse_domain.coarsen(coarsen_ratio);
+
+   /*
+    * Need to check that domain can be coarsened by given ratio.
+    */
+   const hier::BoxArray& fine_domain = this->getPhysicalDomain();
+   const int nboxes = fine_domain.getNumberOfBoxes();
+   for (int ib = 0; ib < nboxes; ib++) {
+      hier::Box testbox = hier::Box::refine(coarse_domain[ib], coarsen_ratio);
+      if (testbox != fine_domain[ib]) {
+         tbox::plog
+         << "SkeletonGridGeometry::makeCoarsenedGridGeometry : Box # "
+         << ib << std::endl;
+         tbox::plog << "      fine box = " << fine_domain[ib] << std::endl;
+         tbox::plog << "      coarse box = " << coarse_domain[ib] << std::endl;
+         tbox::plog << "      refined coarse box = " << testbox << std::endl;
+
+         TBOX_ERROR(
+            "geom::SkeletonGridGeometry::makeCoarsenedGridGeometry() error...\n"
+            << "    geometry object with name = " << d_object_name
+            << "\n    Cannot be coarsened by ratio " << coarsen_ratio
+            << std::endl);
+      }
+   }
+
+   geom::SkeletonGridGeometry* coarse_geometry =
+      new geom::SkeletonGridGeometry(coarse_geom_name,
+         coarse_domain,
+         register_for_restart);
+
+   coarse_geometry->initializePeriodicShift(this->getPeriodicShift(hier::
+         IntVector::getOne(dim)));
+
+   return tbox::Pointer<hier::GridGeometry>(coarse_geometry);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create default interlevel transfer operator handlers and time         *
+ * interpolation operator handlers.  Add them to appropriate chains.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void SkeletonGridGeometry::makeStandardOperators(
+   const tbox::Dimension& dim)
+{
+   /*
+    * Standard spatial coarsening operators.
+    */
+   addSpatialCoarsenOperator(tbox::Pointer<SAMRAI::xfer::CoarsenOperator>(new
+         SkeletonCoarsen(dim)));
+   addSpatialRefineOperator(tbox::Pointer<SAMRAI::xfer::RefineOperator>(new
+         SkeletonRefine(dim)));
+
+   /*
+    * Standard linear time interpolation operators.
+    */
+   addTimeInterpolateOperator(tbox::Pointer<SAMRAI::xfer::
+                                            TimeInterpolateOperator>(new pdat::
+         CellComplexLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<SAMRAI::xfer::
+                                            TimeInterpolateOperator>(new pdat::
+         SideComplexLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<SAMRAI::xfer::
+                                            TimeInterpolateOperator>(new pdat::
+         FaceComplexLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<SAMRAI::xfer::
+                                            TimeInterpolateOperator>(new pdat::
+         NodeComplexLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<SAMRAI::xfer::
+                                            TimeInterpolateOperator>(new pdat::
+         OuterfaceComplexLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<SAMRAI::xfer::
+                                            TimeInterpolateOperator>(new pdat::
+         OutersideComplexLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<SAMRAI::xfer::
+                                            TimeInterpolateOperator>(new pdat::
+         SideComplexLinearTimeInterpolateOp()));
+
+   addTimeInterpolateOperator(tbox::Pointer<SAMRAI::xfer::
+                                            TimeInterpolateOperator>(new pdat::
+         CellFloatLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<SAMRAI::xfer::
+                                            TimeInterpolateOperator>(new pdat::
+         SideFloatLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<SAMRAI::xfer::
+                                            TimeInterpolateOperator>(new pdat::
+         FaceFloatLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<SAMRAI::xfer::
+                                            TimeInterpolateOperator>(new pdat::
+         NodeFloatLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<SAMRAI::xfer::
+                                            TimeInterpolateOperator>(new pdat::
+         OuterfaceFloatLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<SAMRAI::xfer::
+                                            TimeInterpolateOperator>(new pdat::
+         OutersideFloatLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<SAMRAI::xfer::
+                                            TimeInterpolateOperator>(new pdat::
+         SideFloatLinearTimeInterpolateOp()));
+
+   addTimeInterpolateOperator(tbox::Pointer<SAMRAI::xfer::
+                                            TimeInterpolateOperator>(new pdat::
+         CellDoubleLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<SAMRAI::xfer::
+                                            TimeInterpolateOperator>(new pdat::
+         SideDoubleLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<SAMRAI::xfer::
+                                            TimeInterpolateOperator>(new pdat::
+         FaceDoubleLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<SAMRAI::xfer::
+                                            TimeInterpolateOperator>(new pdat::
+         NodeDoubleLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<SAMRAI::xfer::
+                                            TimeInterpolateOperator>(new pdat::
+         OuterfaceDoubleLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<SAMRAI::xfer::
+                                            TimeInterpolateOperator>(new pdat::
+         OutersideDoubleLinearTimeInterpolateOp()));
+   addTimeInterpolateOperator(tbox::Pointer<SAMRAI::xfer::
+                                            TimeInterpolateOperator>(new pdat::
+         SideDoubleLinearTimeInterpolateOp()));
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create SkeletonPatchGeometry geometry object, initializing its   *
+ * boundary and assigning it to the given patch.                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void SkeletonGridGeometry::setGeometryDataOnPatch(
+   hier::Patch& patch,
+   const hier::IntVector& ratio_to_level_zero,
+   const TwoDimBool& touches_regular_bdry,
+   const TwoDimBool& touches_periodic_bdry) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   const tbox::Dimension& dim(getDim());
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(dim, patch, ratio_to_level_zero);
+
+   /*
+    * All components of ratio must be nonzero.  Additionally,
+    * all components not equal to 1 must have the same sign.
+    */
+
+   int i;
+   for (i = 0; i < dim.getValue(); i++) {
+      TBOX_ASSERT(ratio_to_level_zero(i) != 0);
+   }
+   if (dim > tbox::Dimension(1)) {
+      for (i = 0; i < dim.getValue(); i++) {
+         TBOX_ASSERT((ratio_to_level_zero(i)
+                      * ratio_to_level_zero((i + 1) % dim.getValue()) > 0)
+            || (ratio_to_level_zero(i) == 1)
+            || (ratio_to_level_zero((i + 1) % dim.getValue()) == 1));
+      }
+   }
+#endif
+
+   tbox::Pointer<SkeletonPatchGeometry>
+   geometry(new SkeletonPatchGeometry(ratio_to_level_zero,
+               touches_regular_bdry,
+               touches_periodic_bdry));
+
+   patch.setPatchGeometry(geometry);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Writes out version number and data members for the class.		*
+ *                                                                       *
+ *************************************************************************
+ */
+
+void SkeletonGridGeometry::putToDatabase(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   const tbox::Dimension& dim(getDim());
+
+   db->putInteger("GEOM_SKELETON_GRID_GEOMETRY_VERSION",
+      GEOM_SKELETON_GRID_GEOMETRY_VERSION);
+   tbox::Array<tbox::DatabaseBox> temp_box_array = this->getPhysicalDomain();
+   db->putDatabaseBoxArray("d_physical_domain", temp_box_array);
+
+   hier::IntVector level0_shift = this->getPeriodicShift(
+         hier::IntVector::getOne(dim));
+   int* temp_shift = &level0_shift[0];
+   db->putIntegerArray("d_periodic_shift", temp_shift, dim.getValue());
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Data is read from input only if the simulation is not from restart.   *
+ * Otherwise, all values specifed in the input database are ignored.	*
+ * In this method data from the database are read to local              *
+ * variables and the setPhysicalDomain() method is called.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void SkeletonGridGeometry::getFromInput(
+   tbox::Pointer<tbox::Database> db,
+   bool is_from_restart)
+{
+   TBOX_ASSERT(!db.isNull());
+
+   tbox::Dimension dim(getDim());
+
+   if (!is_from_restart) {
+
+      hier::BoxArray domain(dim);
+      if (db->keyExists("domain_boxes")) {
+         domain = db->getDatabaseBoxArray("domain_boxes");
+         if (domain.getNumberOfBoxes() == 0) {
+            TBOX_ERROR(
+               d_object_name << ":  "
+               <<
+               "Skeleton `domain_boxes' array found in input.");
+         }
+      } else {
+         TBOX_ERROR(
+            d_object_name << ":  "
+            <<
+            "Key data `domain_boxes' not found in input.");
+      }
+
+      int pbc[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      hier::IntVector per_bc(dim, 0);
+      if (db->keyExists("periodic_dimension")) {
+         db->getIntegerArray("periodic_dimension", pbc, dim.getValue());
+         for (int i = 0; i < dim.getValue(); i++) {
+            per_bc(i) = ((pbc[i] == 0) ? 0 : 1);
+         }
+      }
+
+      this->setPhysicalDomain(domain);
+
+      this->initializePeriodicShift(per_bc);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Checks to see if the version number for the class is the same as	*
+ * as the version number of the restart file.				*
+ * If they are equal, then the data from the database are read to local	*
+ * variables and the setPhysicalDomain() method is called.              *
+ *                                                                       *
+ *************************************************************************
+ */
+void SkeletonGridGeometry::getFromRestart()
+{
+   const tbox::Dimension dim(getDim());
+
+   tbox::Pointer<tbox::Database> restart_db =
+      tbox::RestartManager::getManager()->getRootDatabase();
+
+   tbox::Pointer<tbox::Database> db;
+
+   if (restart_db->isDatabase(d_object_name)) {
+      db = restart_db->getDatabase(d_object_name);
+   } else {
+      TBOX_ERROR("Restart database corresponding to "
+         << d_object_name << " not found in the restart file.");
+   }
+
+   int ver = db->getInteger("GEOM_SKELETON_GRID_GEOMETRY_VERSION");
+   if (ver != GEOM_SKELETON_GRID_GEOMETRY_VERSION) {
+      TBOX_ERROR(
+         d_object_name << ":  "
+         <<
+         "Restart file version is different than class version.");
+   }
+   hier::BoxArray domain(dim, db->getDatabaseBoxArray("d_physical_domain"));
+
+   this->setPhysicalDomain(domain);
+
+   hier::IntVector periodic_shift(dim);
+   int* temp_shift = &periodic_shift[0];
+   db->getIntegerArray("d_periodic_shift", temp_shift, dim.getValue());
+   this->initializePeriodicShift(periodic_shift);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print SkeletonGridGeometry class data.                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void SkeletonGridGeometry::printClassData(
+   std::ostream& os) const
+{
+   os << "Printing SkeletonGridGeometry data: this = "
+      << (SkeletonGridGeometry *)this << std::endl;
+
+   xfer::Geometry::printClassData(os);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/SkeletonGridGeometry.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/SkeletonGridGeometry.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,221 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Skeleton grid geometry for an AMR hierarchy. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_SkeletonGridGeometry
+#define included_geom_SkeletonGridGeometry
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/Serializable.h"
+#include "SAMRAI/xfer/Geometry.h"
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class SkeletonGridGeometry is a concrete grid geometry class that
+ * contains no information about the physical domain characteristics of an AMR
+ * mesh apart from the index space.  The purpose of this class is to allow
+ * an application that needs to use a special mesh to manage the physical
+ * domain within the application code.  The skeleton grid geometry only
+ * manages the index space of the adaptive grid.  This class sets geometry
+ * information on each patch in an AMR hierarchy.  This class is derived
+ * from the xfer::Geometry base class which is further derived from
+ * the hier::GridGeometry base class.
+ *
+ * An object of this class requires parameters to be read from input to
+ * create the hier::BoxArray that stores the index space in the hier::GridGeometry
+ * superclass.  Also, data must be written to and read from files for restart.
+ * The input and restart data are summarized as follows:
+ *
+ *
+ * Required input keys and data types:
+ *
+ *    - \b    domain_boxes
+ *       Array of boxes representing the index space for the entire
+ *       domain (on the coarsest refinement level).
+ *
+ *
+ * Optional input keys, data types, and defaults:
+ *
+ *
+ *    - \b    periodic_dimension
+ *       tbox::Array of integer values representing the directions in which
+ *       the physical domain is periodic.  A non-zero value indicates
+ *       that the direction is periodic.  A zero value indicates that
+ *       the direction is not periodic.  If no values are specified, then
+ *       the array is initialized to all zeros (no periodic directions).
+ *
+ * No input values can overwrite restart values.
+ *
+ * A sample input file for a two-dimensional problem might look like:
+ *
+ * @verbatim
+ *
+ *    domain_boxes = [(0,0) , (49,39)]
+ *    periodic_dimension = 0, 1  // periodic in y only
+ *
+ * @endverbatim
+ *
+ * This generates a two-dimensional domain periodic in the
+ * y-direction, and having 50 cells in the x-direction and 40 cells in
+ * the y-direction.
+ *
+ * @see xfer::Geometry
+ * @see hier::GridGeometry
+ */
+
+class SkeletonGridGeometry:
+   public xfer::Geometry,
+   public tbox::Serializable
+{
+
+   typedef hier::PatchGeometry::TwoDimBool TwoDimBool;
+
+public:
+   /**
+    * Constructor for SkeletonGridGeometry initializes data
+    * members based on parameters read from the specified input and
+    * restart databases.  The constructor also registers this object
+    * for restart using the specified object name, when the boolean
+    * argument is true.  Whether object will write its state to restart
+    * files during program execution is determined by this argument.
+    * Note that it has a default state of true.
+    *
+    * Errors: passing in a null database pointer or an empty std::string
+    * will result in an unrecoverable assertion.
+    */
+   explicit SkeletonGridGeometry(
+      const tbox::Dimension& dim,
+      const std::string& object_name,
+      tbox::Pointer<tbox::Database> input_db,
+      bool register_for_restart = true);
+
+   /**
+    * Constructor for SkeletonGridGeometry sets index space domain
+    * based on arguments. The constructor also registers this object
+    * for restart using the specified object name, when the boolean
+    * argument is true.  Whether object will write its state to restart
+    * files during program execution is determined by this argument.
+    * Note that it has a default state of true.
+    *
+    * Errors: passing in an empty std::string, or null data pointers will
+    * result in an unrecoverable assertion.
+    */
+   explicit SkeletonGridGeometry(
+      const std::string& object_name,
+      const hier::BoxArray& level_domain,
+      bool register_for_restart = true);
+
+   /**
+    * Destructor for SkeletonGridGeometry unregisters the object
+    * with the restart manager if previously registered.
+    */
+   virtual ~SkeletonGridGeometry();
+
+   /**
+    * Create and return a pointer to a refined version of this Cartesian grid
+    * geometry object. This function is pure virtual in the hier_GridGeometry base class.
+    */
+   tbox::Pointer<hier::GridGeometry>
+   makeRefinedGridGeometry(
+      const std::string& fine_geom_name,
+      const hier::IntVector& refine_ratio,
+      bool register_for_restart) const;
+
+   /**
+    * Create and return a pointer to a coarsened version of this Cartesian grid
+    * geometry object. This function is pure virtual in the hier_GridGeometry base class.
+    */
+   tbox::Pointer<hier::GridGeometry>
+   makeCoarsenedGridGeometry(
+      const std::string& coarse_geom_name,
+      const hier::IntVector& coarsen_ratio,
+      bool register_for_restart) const;
+
+   /*
+    * Compute grid data for patch and assign new geom_SkeletonPatchGeometry
+    * object to patch.  This function is pure virtual in the hier_GridGeometry
+    * base class.
+    */
+   void
+   setGeometryDataOnPatch(
+      hier::Patch& patch,
+      const hier::IntVector& ratio_to_level_zero,
+      const TwoDimBool& touches_regular_bdry,
+      const TwoDimBool& touches_periodic_bdry) const;
+   /**
+    * Print class data representation.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os) const;
+
+   /**
+    * Writes the state of the SkeletonGridGeometry object to the database.
+    *
+    * When assertion checking is active, db cannot be a null database pointer.
+    */
+   virtual void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> db);
+
+private:
+   /*
+    * Reads in d_physical_domain (from hier::GridGeometry superclass),
+    * from the specified input database.  If the simulation is from restart,
+    * these values are taken from restart and newly specified values in the
+    * input file are ignored.
+    * Arguments: restart_flag is true when simulation is from restart
+    * Assertions: db must not be a NULL pointer.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db,
+      bool is_from_restart);
+
+   /*
+    * Read object state from the restart file and initialize class data
+    * members.  The database from which the restart data is read is
+    * determined by the object_name specified in the constructor.
+    *
+    * Unrecoverable Errors:
+    *
+    *    -The database corresponding to object_name is not found
+    *     in the restart file.
+    *
+    *    -The class version number and restart version number do not
+    *     match.
+    *
+    */
+   void
+   getFromRestart();
+
+   /*
+    * Create default operator for Skeleton grid geometry.
+    */
+   void
+   makeStandardOperators(
+      const tbox::Dimension& dim);
+
+   /*
+    * String name for object used in error reporting and restart operations.
+    * Boolean is set in constructor and determines whether object should
+    * dump its state to restart files during program execution.
+    */
+   std::string d_object_name;
+   bool d_registered_for_restart;
+
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/SkeletonPatchGeometry.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/SkeletonPatchGeometry.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Skeleton grid geometry for an AMR hierarchy. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_SkeletonPatchGeometry_C
+#define included_geom_SkeletonPatchGeometry_C
+
+#include "SAMRAI/geom/SkeletonPatchGeometry.h"
+
+namespace SAMRAI {
+namespace geom {
+
+// using namespace std;
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor for SkeletonPatchGeometry.                           *
+ * variable.                                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+SkeletonPatchGeometry::SkeletonPatchGeometry(
+   const hier::IntVector& ratio_to_level_zero,
+   const TwoDimBool& touches_regular_bdry,
+   const TwoDimBool& touches_periodic_bdry):
+   hier::PatchGeometry(ratio_to_level_zero,
+                       touches_regular_bdry,
+                       touches_periodic_bdry)
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destructor for SkeletonPatchGeometry.                            *
+ *                                                                       *
+ *************************************************************************
+ */
+SkeletonPatchGeometry::~SkeletonPatchGeometry()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print SkeletonPatchGeometry class data.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+void SkeletonPatchGeometry::printClassData(
+   std::ostream& os) const
+{
+   os << "Printing SkeletonPatchGeometry data: this = "
+      << (SkeletonPatchGeometry *)this << std::endl;
+
+   hier::PatchGeometry::printClassData(os);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/SkeletonPatchGeometry.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/SkeletonPatchGeometry.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Simple Skeleton grid geometry for an AMR hierarchy. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_SkeletonPatchGeometry
+#define included_geom_SkeletonPatchGeometry
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchGeometry.h"
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class SkeletonPatchGeometry implements geometry management
+ * for a single patch in an AMR hierarchy with no information about
+ * the physical characteristics of the problem.  This is intended for
+ * use in an application that will manage the physical geometry in
+ * user-defined code.
+ *
+ * The grid data is set by SkeletonGridGeometry class.  This patch
+ * geometry class is derived from hier::PatchGeometry base class.
+ *
+ * @see hier::BoundaryBox
+ * @see hier::PatchGeometry
+ * @see geom::SkeletonGridGeometry
+ */
+
+class SkeletonPatchGeometry:
+   public hier::PatchGeometry
+{
+public:
+   typedef hier::PatchGeometry::TwoDimBool TwoDimBool;
+
+   /**
+    * Constructor for SkeletonPatchGeometry class.  It simply passes
+    * patch boundary information and the ratio to the coarsest level to
+    * hier::PatchGeometry constructor.
+    */
+   explicit SkeletonPatchGeometry(
+      const hier::IntVector& ratio_to_level_zero,
+      const TwoDimBool& touches_regular_bdry,
+      const TwoDimBool& touches_periodic_bdry);
+
+   /**
+    * Destructor for SkeletonPatchGeometry.
+    */
+   ~SkeletonPatchGeometry();
+
+   /**
+    * Print SkeletonPatchGeometry class data.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os) const;
+
+private:
+   // These are not implemented.
+   SkeletonPatchGeometry(
+      const SkeletonPatchGeometry&);
+   void
+   operator = (
+      const SkeletonPatchGeometry&);
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/SkeletonRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/SkeletonRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for cell-centered double data on
+ *                a Moving mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_SkeletonRefine_C
+#define included_geom_SkeletonRefine_C
+
+#include "SAMRAI/geom/SkeletonRefine.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace geom {
+
+SkeletonRefine::SkeletonRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "SKELETON_REFINE")
+{
+   d_name_id = "SKELETON_REFINE";
+}
+
+SkeletonRefine::~SkeletonRefine()
+{
+}
+
+bool SkeletonRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   NULL_USE(var);
+   if (op_name == d_name_id) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+SkeletonRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int SkeletonRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+SkeletonRefine::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void SkeletonRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   //no operation for the empty refine operator
+   NULL_USE(fine);
+   NULL_USE(coarse);
+   NULL_USE(dst_component);
+   NULL_USE(src_component);
+   NULL_USE(fine_overlap);
+   NULL_USE(ratio);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/SkeletonRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/SkeletonRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,101 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for cell-centered double data on
+ *                a Moving mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_geom_SkeletonRefine
+#define included_geom_SkeletonRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace geom {
+
+/**
+ * Class SkeletonRefine implements a dummy refine operator
+ * for the skeleton geometry type.  It does nothing but provide
+ * basic implementations of the pure virtual functions in the refine
+ * operator interface.  The findCoarsenOperator() operator function
+ * returns true if the the argument std::string is "SKELETON_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class SkeletonRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit SkeletonRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~SkeletonRefine();
+
+   /**
+    * Return true if the variable and name std::string match cell-centered
+    * double constant interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name std::string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of cell-centered double constant interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the constant interpolation operator is the vector
+    * of zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * No-op implementation of refine()
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/dox/manual.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/dox/manual.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,31 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace geom {
+
+/*!
+  @page package_geometry The Geometry Package
+ 
+  The Geometry package supports specific coordinate systems on structured 
+  AMR patch hierarchies.  Since interlevel data transfer operators (e.g., 
+  spatial coarsening and refining) depend on the mesh description, they 
+  are included here.  Time interpolation operators and constant data transfer
+  operators are also included here although they are independent of the
+  mesh description.  Geometry support is divided into three categories:
+  -# @ref package_geometry_cartesian "simple Cartesian mesh (grid geometry and operators)"
+  -# @ref package_geometry_skeleton "generic 'skeleton' geometry classes"
+  -# @ref package_geometry_multiblock "multiblock geometry classes"
+ 
+  All class names in the Geometry package are in the SAMRAI::geom namespace.
+
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/dox/manual_cartesian.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/dox/manual_cartesian.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,145 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+  namespace geom {
+
+/*!
+  @page package_geometry_cartesian Basic Cartesian Mesh Geometry Support
+
+  The Cartesian geometry package provides classes to manage a simple 
+  Cartesian mesh defined over an AMR mesh and to transfer data between
+  levels of different spatial resolution in the mesh hierarchy (i.e., 
+  refining and coarsening).  The Cartesian mesh is defined by the
+  NDIM-tuple (dx[0],...,dx[NDIM-1]) of mesh increments given on the 
+  coarsest hierarchy level.  The mesh increments on each finer level
+  are determined by multiplying the increments on the coarsest level by 
+  the refinement ratio relating the index spaces between the two levels.
+  More simply put, the mesh spacing on each hierarchy level is constant 
+  in each coordinate direction and that spacing is determined by 
+  refinement ratios between the level and the mesh on the coarsest level.
+
+  In the interest of brevity, we include header file documentation for
+  a single data coarsen operator and a single data refine operator here.  These
+  interlevel data transfer operators are representative of all other operator 
+  classes in the Cartesian geometry package.  The minor assertions to this 
+  are the details of the individual operators, such as stencil width, 
+  operator priority, identifier name string, etc.  For reference, we list
+  below the spatial coarsen and refine operators currently available for 
+  Cartesian geometry and the string identifiers that can be used to look them 
+  up using the xfer_GeometryX class.  It is important to note that new operators 
+  may be added at any time without re-compilation of the Cartesian geometry package 
+  or SAMRAI library code.
+
+  <ul>
+  <li> Coarsen operators:
+    <ul>
+    <li> Cell-Centered patch data:
+      <ul>
+      <li> Volume-weighted averaging for complex, double, float data.
+            String identifier is "CONSERVATIVE_COARSEN".
+      </ul>
+    <li> Edge-Centered patch data:
+      <ul>
+      <li> Area-weighted averaging for complex, double, float data.
+            String identifier is "CONSERVATIVE_COARSEN".
+      </ul>
+    <li> Face-Centered patch data:
+      <ul>
+       <li> Area-weighted averaging for complex, double, float data.
+            String identifier is "CONSERVATIVE_COARSEN".
+      </ul>
+    <li> Node-Centered patch data:
+      <ul>
+      <li> Constant averaging (i.e., injection) for complex, double, 
+            float, integer data.  String identifier is "CONSTANT_COARSEN". 
+      </ul>
+    <li> Outerface patch data:
+      <ul>
+      <li> Area-weighted averaging for complex, double, float data.
+            String identifier is "CONSERVATIVE_COARSEN".
+      </ul>
+    <li> Outerside patch data:
+      <ul>
+      <li> Area-weighted averaging for double data.
+            String identifier is "CONSERVATIVE_COARSEN".
+      </ul>
+    <li> Side-Centered patch data:
+      <ul>
+      <li> Area-weighted averaging for complex, double, float data.
+            String identifier is "CONSERVATIVE_COARSEN".
+      </ul>
+    </ul>
+  <li> Refine operators:
+    <ul>
+    <li> Cell-Centered patch data:
+      <ul>
+      <li> Constant interpolation for complex, double, float, 
+            integer data.  String identifier is "CONSTANT_REFINE".
+      <li> Conservative linear interpolation for complex, double, 
+            float data.  String identifier is "CONSERVATIVE_LINEAR_REFINE".
+      <li> Linear interpolation for complex, double, float data.
+            String identifier is "LINEAR_REFINE".
+      </ul>
+    <li> Edge-Centered patch data:
+      <ul>
+      <li> Constant interpolation for complex, double, float,
+            integer data.  String identifier is "CONSTANT_REFINE"
+      <li> Conservative linear interpolation for double and
+            float data.  String identifier is "CONSERVATIVE_LINEAR_REFINE".
+      </ul>
+    <li> Face-Centered patch data:
+      <ul>
+      <li> Constant interpolation for complex, double, float,
+           integer data.  String identifier is "CONSTANT_REFINE"
+      <li> Conservative linear interpolation for double and
+            float data.  String identifier is "CONSERVATIVE_LINEAR_REFINE".
+      </ul>
+    <li> Node-Centered patch data:
+      <ul>
+      <li> Linear interpolation for complex, double, float data.
+            String identifier is "LINEAR_REFINE".
+      </ul>
+    <li> Outerface patch data:
+      <ul>
+      <li> Constant interpolation for complex, double, float,
+            integer data.  String identifier is "CONSTANT_REFINE".
+      </ul>
+    <li> Outerside patch data:
+      <ul>
+      <li> No refine operators are currently available for this type.
+      </ul>
+    <li> Side-Centered patch data:
+      <ul>
+      <li> Constant interpolation for complex, double, float,
+            integer data.  String identifier is "CONSTANT_REFINE".
+      <li> Conservative linear interpolation for double and
+            float data.  String identifier is "CONSERVATIVE_LINEAR_REFINE".
+      </ul>
+    </ul>  
+  </ul>  
+
+  - @ref package_geometry_cartesian_grid_geom
+  - @ref package_geometry_cartesian_patch_geom
+  - @ref package_geometry_cartesian_operators_cell
+  - @ref package_geometry_cartesian_operators_fortran
+
+  For information on mesh-independent operators, including constant
+  spatial refinement operators, and linear time interpolation operators, see
+  - @ref package_patchdata_operators
+
+  For information on the options to use user-defined operators for
+  coarsening, refining, and time interpolation, or the option to use
+  no such operators, see
+  - @ref package_transfer_operators
+ 
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/dox/manual_cartesian_grid_geom.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/dox/manual_cartesian_grid_geom.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,22 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace geom {
+
+/*!
+  @page package_geometry_cartesian_grid_geom Cartesian Grid Geometry
+
+  The Cartesian grid geometry class maintains a simple Cartesian mesh geometry
+  description for the entire hierarchy.
+  - SAMRAI::geom::CartesianGridGeometry
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/dox/manual_cartesian_operators_cell.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/dox/manual_cartesian_operators_cell.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace geom {
+
+/*!
+  @page package_geometry_cartesian_operators_cell Cell Data Operators
+
+  A variety of operators are provided to coarsen and refine cell-centered
+  patch data on a Cartesian mesh.  These operators are representative of 
+  the spatial coarsen and refine operators found in the library for all
+  other array-based types.
+  - SAMRAI::geom::CartesianCellComplexWeightedAverage
+  - SAMRAI::geom::CartesianCellDoubleConservativeLinearRefine
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/dox/manual_cartesian_operators_fortran.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/dox/manual_cartesian_operators_fortran.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace geom {
+
+
+/*!
+  @page package_geometry_cartesian_operators_fortran Cartesian Transfer Operator Numerical Routines
+
+  The routines that perform spatial refining/coarsening on standard patch 
+  data types in Cartesian geometry are located in the directory
+  <TT>SAMRAI/source/geometry/cartesian/operators/fortran</TT>.
+  These routines are written in FORTRAN 77 and are invoked from the
+  appropriate operator classes.
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/dox/manual_cartesian_patch_geom.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/dox/manual_cartesian_patch_geom.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,22 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace geom {
+
+/*!
+  @page package_geometry_cartesian_patch_geom Cartesian Patch Geometry
+
+  The Cartesian patch geometry class provides a description of Cartesian
+  mesh defined over a single patch.
+  - SAMRAI::geom::CartesianPatchGeometry
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/dox/manual_multiblock.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/dox/manual_multiblock.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,22 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+  namespace geom {
+
+/*!
+  @page package_geometry_multiblock Basic Multiblock Geometry Support
+
+  - @ref package_geometry_multiblock_grid_geom
+  - @ref package_geometry_multiblock_patch_geom
+
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/dox/manual_multiblock_grid_geom.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/dox/manual_multiblock_grid_geom.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,22 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace geom {
+
+/*!
+  @page package_geometry_multiblock_grid_geom Block Grid Geometry
+
+  The block grid geometry class maintains a simple geometry
+  description for a block within a hier::MultiblockGridGeometry
+  - SAMRAI::geom::BlockGridGeometry
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/dox/manual_multiblock_patch_geom.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/dox/manual_multiblock_patch_geom.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,22 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace geom {
+
+/*!
+  @page package_geometry_multiblock_patch_geom Multiblock Patch Geometry
+
+  The block patch geometry class provides a patch geometry for 
+  use by the BlockGridGeometry in multiblock domains.
+  - SAMRAI::geom::BlockPatchGeometry
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/dox/manual_skeleton.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/dox/manual_skeleton.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,30 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace geom {
+
+/*!
+  @page package_geometry_skeleton Skeleton Geometry Support
+
+  The skeleton geometry classes provided here serve as templates for 
+  those who wish to develop special mesh geometry capabilities that 
+  are not included in SAMRAI.  Included here are concrete classes for
+  grid geometry, patch geometry, and spatial coarsen/refine.  These classes
+  effectively serve as placeholders for application's that manage the
+  physical domain and mesh independently of SAMRAI.  These classes
+  contain no information about the physical domain characteristics of an AMR
+  mesh apart from the index space. 
+  - @ref package_geometry_skeleton_grid_geom
+  - @ref package_geometry_skeleton_patch_geom
+  - @ref package_geometry_skeleton_operators
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/dox/manual_skeleton_grid_geom.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/dox/manual_skeleton_grid_geom.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,23 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace geom {
+
+/*!
+  @page package_geometry_skeleton_grid_geom Skeleton Grid Geometry
+
+  This is a concrete grid geometry class that serves as a grid geometry
+  placeholder for applications that manage the physical domain and mesh in 
+  the user-supplied application code.
+  - SAMRAI::geom::SkeletonGridGeometry
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/dox/manual_skeleton_operators.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/dox/manual_skeleton_operators.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace geom {
+
+/*!
+  @page package_geometry_skeleton_operators Skeleton Operators
+
+  These classes provide dummy coarsen and refine operators for the
+  skeleton geometry type.  They provide dummy implementations of 
+  the pure virtual functions in the refine and coarsen operator 
+  interfaces.
+  - SAMRAI::geom::SkeletonRefine
+  - SAMRAI::geom::SkeletonCoarsen
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/dox/manual_skeleton_patch_geom.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/dox/manual_skeleton_patch_geom.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,23 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace geom {
+
+/*!
+  @page package_geometry_skeleton_patch_geom Skeleton Patch Geometry
+
+  This is a concrete patch geometry class that serves as a patch geometry
+  placeholder for applications that manage the physical domain and mesh in 
+  the user-supplied application code.
+  - SAMRAI::geom::SkeletonPatchGeometry
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/fortran/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/fortran/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,80 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=geom_cartcoarsen1d.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h geom_cartcoarsen1d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=geom_cartcoarsen2d.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h geom_cartcoarsen2d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=geom_cartcoarsen3d.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h geom_cartcoarsen3d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=geom_cartrefine1d.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h geom_cartrefine1d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
+FILE_4=geom_cartrefine2d.o
+DEPENDS_4:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h geom_cartrefine2d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_4 +=\
+	
+endif
+
+${FILE_4:X.o=${NDIM}.o}: ${DEPENDS_4}
+
+FILE_5=geom_cartrefine3d.o
+DEPENDS_5:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h geom_cartrefine3d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_5 +=\
+	
+endif
+
+${FILE_5:X.o=${NDIM}.o}: ${DEPENDS_5}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/fortran/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/fortran/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,32 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for fortran files for geom directory 
+##
+#########################################################################
+
+SAMRAI	      =	@top_srcdir@
+SRCDIR	      =	@srcdir@
+SUBDIR        = source/SAMRAI/geom/fortran
+VPATH	      =	@srcdir@
+OBJECT        = ../../../..
+
+# For classes that are non-dimensional.
+OBJS= 	 geom_cartcoarsen1d.o geom_cartcoarsen3d.o\
+	geom_cartrefine2d.o geom_cartcoarsen2d.o\
+	geom_cartrefine1d.o geom_cartrefine3d.o\
+
+
+default: library
+
+include $(OBJECT)/config/Makefile.config
+
+library: $(OBJS)
+
+clean:
+	$(SAMCLEAN)
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/fortran/geom_cartcoarsen1d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/fortran/geom_cartcoarsen1d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,703 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_cartcoarsen1d.m4 $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for spatial coarsening of 1d patch data
+c               on a regular Cartesian mesh.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_m4cartcoarsenops1d.i $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 1d Cartesian coarsen operators
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim1d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 1d arrays in FORTRAN routines.
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c***********************************************************************
+c Weighted averaging for 1d cell-centered double data
+c***********************************************************************
+c
+      subroutine cartwgtavgcelldoub1d(
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxf(0:1-1),
+     &  dxc(0:1-1)
+      double precision
+     &  arrayf(filo0:fihi0),
+     &  arrayc(cilo0:cihi0)
+      double precision dVf,dVc
+      integer ic0,if0,ir0
+c
+c***********************************************************************
+c
+      dVf = dxf(0)
+      dVc = dxc(0)
+
+      do ic0=ifirstc0,ilastc0
+         arrayc(ic0) = zero
+      enddo
+
+      do ir0=0,ratio(0)-1
+         do ic0=ifirstc0,ilastc0
+            if0=ic0*ratio(0)+ir0
+            arrayc(ic0)=arrayc(ic0)+arrayf(if0)*dVf
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         arrayc(ic0)=arrayc(ic0)/dVc
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 1d cell-centered float data
+c***********************************************************************
+c
+      subroutine cartwgtavgcellflot1d(
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxf(0:1-1),
+     &  dxc(0:1-1)
+      real
+     &  arrayf(filo0:fihi0),
+     &  arrayc(cilo0:cihi0)
+      double precision dVf,dVc
+      integer ic0,if0,ir0
+c
+c***********************************************************************
+c
+      dVf = dxf(0)
+      dVc = dxc(0)
+
+      do ic0=ifirstc0,ilastc0
+         arrayc(ic0) = zero
+      enddo
+
+      do ir0=0,ratio(0)-1
+         do ic0=ifirstc0,ilastc0
+            if0=ic0*ratio(0)+ir0
+            arrayc(ic0)=arrayc(ic0)+arrayf(if0)*dVf
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         arrayc(ic0)=arrayc(ic0)/dVc
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 1d cell-centered complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgcellcplx1d(
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxf(0:1-1),
+     &  dxc(0:1-1)
+      double complex
+     &  arrayf(filo0:fihi0),
+     &  arrayc(cilo0:cihi0)
+      double precision dVf,dVc
+      integer ic0,if0,ir0
+c
+c***********************************************************************
+c
+      dVf = dxf(0)
+      dVc = dxc(0)
+
+      do ic0=ifirstc0,ilastc0
+         arrayc(ic0) = cmplx(zero, zero)
+      enddo
+
+      do ir0=0,ratio(0)-1
+         do ic0=ifirstc0,ilastc0
+            if0=ic0*ratio(0)+ir0
+            arrayc(ic0)=arrayc(ic0)+arrayf(if0)*dVf
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         arrayc(ic0)=arrayc(ic0)/dVc
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 1d edge-centered double data
+c***********************************************************************
+c
+      subroutine cartwgtavgedgedoub1d(
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxf(0:1-1),
+     &  dxc(0:1-1)
+      double precision
+     &  arrayf(filo0:fihi0),
+     &  arrayc(cilo0:cihi0)
+      double precision dVf,dVc
+      integer ic0,if0,ir0
+c
+c***********************************************************************
+c
+      dVf = dxf(0)
+      dVc = dxc(0)
+
+      do ic0=ifirstc0,ilastc0
+         arrayc(ic0) = zero
+      enddo
+
+      do ir0=0,ratio(0)-1
+         do ic0=ifirstc0,ilastc0
+            if0=ic0*ratio(0)+ir0
+            arrayc(ic0)=arrayc(ic0)+arrayf(if0)*dVf
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         arrayc(ic0)=arrayc(ic0)/dVc
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 1d edge-centered float data
+c***********************************************************************
+c
+      subroutine cartwgtavgedgeflot1d(
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxf(0:1-1),
+     &  dxc(0:1-1)
+      real
+     &  arrayf(filo0:fihi0),
+     &  arrayc(cilo0:cihi0)
+      double precision dVf,dVc
+      integer ic0,if0,ir0
+c
+c***********************************************************************
+c
+      dVf = dxf(0)
+      dVc = dxc(0)
+
+      do ic0=ifirstc0,ilastc0
+         arrayc(ic0) = zero
+      enddo
+
+      do ir0=0,ratio(0)-1
+         do ic0=ifirstc0,ilastc0
+            if0=ic0*ratio(0)+ir0
+            arrayc(ic0)=arrayc(ic0)+arrayf(if0)*dVf
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         arrayc(ic0)=arrayc(ic0)/dVc
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 1d edge-centered complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgedgecplx1d(
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxf(0:1-1),
+     &  dxc(0:1-1)
+      double complex
+     &  arrayf(filo0:fihi0),
+     &  arrayc(cilo0:cihi0)
+      double precision dVf,dVc
+      integer ic0,if0,ir0
+c
+c***********************************************************************
+c
+      dVf = dxf(0)
+      dVc = dxc(0)
+
+      do ic0=ifirstc0,ilastc0
+         arrayc(ic0) = cmplx(zero, zero)
+      enddo
+
+      do ir0=0,ratio(0)-1
+         do ic0=ifirstc0,ilastc0
+            if0=ic0*ratio(0)+ir0
+            arrayc(ic0)=arrayc(ic0)+arrayf(if0)*dVf
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         arrayc(ic0)=arrayc(ic0)/dVc
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 1d face-centered double data
+c***********************************************************************
+c
+      subroutine cartwgtavgfacedoub1d(
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxf(0:1-1),
+     &  dxc(0:1-1)
+      double precision
+     &  arrayf(filo0:fihi0+1),
+     &  arrayc(cilo0:cihi0+1)
+      integer ie0
+c
+c***********************************************************************
+c
+      do ie0=ifirstc0,ilastc0+1
+         arrayc(ie0)=arrayf(ie0*ratio(0))
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 1d face-centered float data
+c***********************************************************************
+c
+      subroutine cartwgtavgfaceflot1d(
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxf(0:1-1),
+     &  dxc(0:1-1)
+      real
+     &  arrayf(filo0:fihi0+1),
+     &  arrayc(cilo0:cihi0+1)
+      integer ie0
+c
+c***********************************************************************
+c
+      do ie0=ifirstc0,ilastc0+1
+         arrayc(ie0)=arrayf(ie0*ratio(0))
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 1d face-centered complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgfacecplx1d(
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxf(0:1-1),
+     &  dxc(0:1-1)
+      double complex
+     &  arrayf(filo0:fihi0+1),
+     &  arrayc(cilo0:cihi0+1)
+      integer ie0
+c
+c***********************************************************************
+c
+      do ie0=ifirstc0,ilastc0+1
+         arrayc(ie0)=arrayf(ie0*ratio(0))
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 1d outerface double data
+c***********************************************************************
+c
+      subroutine cartwgtavgoutfacedoub1d(
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxf(0:1-1),
+     &  dxc(0:1-1)
+      double precision
+     &  arrayf(1),
+     &  arrayc(1)
+c
+c***********************************************************************
+c
+      arrayc(1)=arrayf(1)
+c
+      return
+      end    
+c
+c***********************************************************************
+c Weighted averaging for 1d outerface float data
+c***********************************************************************
+c
+      subroutine cartwgtavgoutfaceflot1d(
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxf(0:1-1),
+     &  dxc(0:1-1)
+      real
+     &  arrayf(1),
+     &  arrayc(1)
+c
+c***********************************************************************
+c
+      arrayc(1)=arrayf(1)
+c
+      return
+      end    
+c
+c***********************************************************************
+c Weighted averaging for 1d outerface complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgoutfacecplx1d(
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxf(0:1-1),
+     &  dxc(0:1-1)
+      double complex
+     &  arrayf(1),
+     &  arrayc(1)
+c
+c***********************************************************************
+c
+      arrayc(1)=arrayf(1)
+c
+      return
+      end    
+c
+c***********************************************************************
+c Weighted averaging for 1d outerside double data
+c***********************************************************************
+c
+      subroutine cartwgtavgoutsidedoub1d(
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxf(0:1-1),
+     &  dxc(0:1-1)
+      double precision
+     &  arrayf(1),
+     &  arrayc(1)
+c
+c***********************************************************************
+c
+      arrayc(1)=arrayf(1)
+c
+      return
+      end    
+c
+c***********************************************************************
+c Weighted averaging for 1d side-centered double data
+c***********************************************************************
+c
+      subroutine cartwgtavgsidedoub1d(
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxf(0:1-1),
+     &  dxc(0:1-1)
+      double precision
+     &  arrayf(filo0:fihi0+1),
+     &  arrayc(cilo0:cihi0+1)
+      integer ie0
+c
+c***********************************************************************
+c
+      do ie0=ifirstc0,ilastc0+1
+         arrayc(ie0)=arrayf(ie0*ratio(0))
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 1d side-centered float data
+c***********************************************************************
+c
+      subroutine cartwgtavgsideflot1d(
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxf(0:1-1),
+     &  dxc(0:1-1)
+      real
+     &  arrayf(filo0:fihi0+1),
+     &  arrayc(cilo0:cihi0+1)
+      integer ie0
+c
+c***********************************************************************
+c
+      do ie0=ifirstc0,ilastc0+1
+         arrayc(ie0)=arrayf(ie0*ratio(0))
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 1d side-centered complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgsidecplx1d(
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxf(0:1-1),
+     &  dxc(0:1-1)
+      double complex
+     &  arrayf(filo0:fihi0+1),
+     &  arrayc(cilo0:cihi0+1)
+      integer ie0
+c
+c***********************************************************************
+c
+      do ie0=ifirstc0,ilastc0+1
+         arrayc(ie0)=arrayf(ie0*ratio(0))
+      enddo
+c
+      return
+      end
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/fortran/geom_cartcoarsen1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/fortran/geom_cartcoarsen1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,123 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_cartcoarsen1d.m4 $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for spatial coarsening of 1d patch data
+c               on a regular Cartesian mesh.
+c
+include(geom_m4cartcoarsenops1d.i)dnl
+c
+c***********************************************************************
+c Weighted averaging for 1d cell-centered double data
+c***********************************************************************
+c
+      subroutine cartwgtavgcelldoub1d(
+cart_wgtavg_op_cell_1d(`double precision')dnl
+c
+c***********************************************************************
+c Weighted averaging for 1d cell-centered float data
+c***********************************************************************
+c
+      subroutine cartwgtavgcellflot1d(
+cart_wgtavg_op_cell_1d(`real')dnl
+c
+c***********************************************************************
+c Weighted averaging for 1d cell-centered complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgcellcplx1d(
+cart_wgtavg_op_cell_1d(`double complex')dnl
+c
+c***********************************************************************
+c Weighted averaging for 1d edge-centered double data
+c***********************************************************************
+c
+      subroutine cartwgtavgedgedoub1d(
+cart_wgtavg_op_edge_1d(`double precision')dnl
+c
+c***********************************************************************
+c Weighted averaging for 1d edge-centered float data
+c***********************************************************************
+c
+      subroutine cartwgtavgedgeflot1d(
+cart_wgtavg_op_edge_1d(`real')dnl
+c
+c***********************************************************************
+c Weighted averaging for 1d edge-centered complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgedgecplx1d(
+cart_wgtavg_op_edge_1d(`double complex')dnl
+c
+c***********************************************************************
+c Weighted averaging for 1d face-centered double data
+c***********************************************************************
+c
+      subroutine cartwgtavgfacedoub1d(
+cart_wgtavg_op_face_1d(`double precision')dnl
+c
+c***********************************************************************
+c Weighted averaging for 1d face-centered float data
+c***********************************************************************
+c
+      subroutine cartwgtavgfaceflot1d(
+cart_wgtavg_op_face_1d(`real')dnl
+c
+c***********************************************************************
+c Weighted averaging for 1d face-centered complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgfacecplx1d(
+cart_wgtavg_op_face_1d(`double complex')dnl
+c
+c***********************************************************************
+c Weighted averaging for 1d outerface double data
+c***********************************************************************
+c
+      subroutine cartwgtavgoutfacedoub1d(
+cart_wgtavg_op_outerface_1d(`double precision')dnl
+c
+c***********************************************************************
+c Weighted averaging for 1d outerface float data
+c***********************************************************************
+c
+      subroutine cartwgtavgoutfaceflot1d(
+cart_wgtavg_op_outerface_1d(`real')dnl
+c
+c***********************************************************************
+c Weighted averaging for 1d outerface complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgoutfacecplx1d(
+cart_wgtavg_op_outerface_1d(`double complex')dnl
+c
+c***********************************************************************
+c Weighted averaging for 1d outerside double data
+c***********************************************************************
+c
+      subroutine cartwgtavgoutsidedoub1d(
+cart_wgtavg_op_outerside_1d(`double precision')dnl
+c
+c***********************************************************************
+c Weighted averaging for 1d side-centered double data
+c***********************************************************************
+c
+      subroutine cartwgtavgsidedoub1d(
+cart_wgtavg_op_side_1d(`double precision')dnl
+c
+c***********************************************************************
+c Weighted averaging for 1d side-centered float data
+c***********************************************************************
+c
+      subroutine cartwgtavgsideflot1d(
+cart_wgtavg_op_side_1d(`real')dnl
+c
+c***********************************************************************
+c Weighted averaging for 1d side-centered complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgsidecplx1d(
+cart_wgtavg_op_side_1d(`double complex')dnl
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/fortran/geom_cartcoarsen2d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/fortran/geom_cartcoarsen2d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1730 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_cartcoarsen2d.m4 $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for spatial coarsening of 2d patch data
+c               on a regular Cartesian mesh.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_m4cartcoarsenops2d.i $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 2d Cartesian coarsen operators
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim2d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 2d arrays in FORTRAN routines.
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c***********************************************************************
+c Weighted averaging for 2d cell-centered double data
+c***********************************************************************
+c
+      subroutine cartwgtavgcelldoub2d(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      double precision
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1)
+      double precision dVf,dVc
+      integer ic0,ic1,if0,if1,ir0,ir1
+c
+c***********************************************************************
+c
+      dVf = dxf(0)*dxf(1)
+      dVc = dxc(0)*dxc(1)
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            arrayc(ic0,ic1)=zero
+         enddo
+      enddo
+
+      do ir1=0,ratio(1)-1
+         do ir0=0,ratio(0)-1
+            do ic1=ifirstc1,ilastc1
+               if1=ic1*ratio(1)+ir1
+               do ic0=ifirstc0,ilastc0
+                  if0=ic0*ratio(0)+ir0
+                  arrayc(ic0,ic1)=arrayc(ic0,ic1)
+     &                            +arrayf(if0,if1)*dVf
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            arrayc(ic0,ic1)=arrayc(ic0,ic1)/dVc
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 2d cell-centered float data
+c***********************************************************************
+c
+      subroutine cartwgtavgcellflot2d(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      real
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1)
+      double precision dVf,dVc
+      integer ic0,ic1,if0,if1,ir0,ir1
+c
+c***********************************************************************
+c
+      dVf = dxf(0)*dxf(1)
+      dVc = dxc(0)*dxc(1)
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            arrayc(ic0,ic1)=zero
+         enddo
+      enddo
+
+      do ir1=0,ratio(1)-1
+         do ir0=0,ratio(0)-1
+            do ic1=ifirstc1,ilastc1
+               if1=ic1*ratio(1)+ir1
+               do ic0=ifirstc0,ilastc0
+                  if0=ic0*ratio(0)+ir0
+                  arrayc(ic0,ic1)=arrayc(ic0,ic1)
+     &                            +arrayf(if0,if1)*dVf
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            arrayc(ic0,ic1)=arrayc(ic0,ic1)/dVc
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 2d cell-centered complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgcellcplx2d(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      double complex
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1)
+      double precision dVf,dVc
+      integer ic0,ic1,if0,if1,ir0,ir1
+c
+c***********************************************************************
+c
+      dVf = dxf(0)*dxf(1)
+      dVc = dxc(0)*dxc(1)
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            arrayc(ic0,ic1)=cmplx(zero,zero)
+         enddo
+      enddo
+
+      do ir1=0,ratio(1)-1
+         do ir0=0,ratio(0)-1
+            do ic1=ifirstc1,ilastc1
+               if1=ic1*ratio(1)+ir1
+               do ic0=ifirstc0,ilastc0
+                  if0=ic0*ratio(0)+ir0
+                  arrayc(ic0,ic1)=arrayc(ic0,ic1)
+     &                            +arrayf(if0,if1)*dVf
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            arrayc(ic0,ic1)=arrayc(ic0,ic1)/dVc
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 2d edge-centered double data
+c***********************************************************************
+c
+      subroutine cartwgtavgedgedoub2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      double precision
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1)
+      double precision lengthf, lengthc
+      integer ic0,ic1,if0,if1,ir
+c
+c***********************************************************************
+c
+      lengthf=dxf(0)
+      lengthc=dxc(0)
+
+      do ic1=ifirstc1,ilastc1+1
+         do ic0=ifirstc0,ilastc0+0
+            arrayc(ic0,ic1)=zero
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+1
+
+            if1=ic1*ratio(1)
+            do ic0=ifirstc0,ilastc0+0
+
+               do ir=0,ratio(0)-1
+                  if0=ic0*ratio(0)+ir
+                  arrayc(ic0,ic1)=arrayc(ic0,ic1)
+     &                           +arrayf(if0,if1)*lengthf
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+1
+         do ic0=ifirstc0,ilastc0+0
+            arrayc(ic0,ic1)=arrayc(ic0,ic1)/lengthc
+        enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgedgedoub2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      double precision
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1)
+      double precision lengthf, lengthc
+      integer ic0,ic1,if0,if1,ir
+c
+c***********************************************************************
+c
+      lengthf=dxf(1)
+      lengthc=dxc(1)
+
+      do ic1=ifirstc1,ilastc1+0
+         do ic0=ifirstc0,ilastc0+1
+            arrayc(ic0,ic1)=zero
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+0
+
+         do ir=0,ratio(1)-1
+            if1=ic1*ratio(1)+ir
+            do ic0=ifirstc0,ilastc0+1
+
+                  if0=ic0*ratio(0)
+                  arrayc(ic0,ic1)=arrayc(ic0,ic1)
+     &                           +arrayf(if0,if1)*lengthf
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+0
+         do ic0=ifirstc0,ilastc0+1
+            arrayc(ic0,ic1)=arrayc(ic0,ic1)/lengthc
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 2d edge-centered float data
+c***********************************************************************
+c
+      subroutine cartwgtavgedgeflot2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      real
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1)
+      double precision lengthf, lengthc
+      integer ic0,ic1,if0,if1,ir
+c
+c***********************************************************************
+c
+      lengthf=dxf(0)
+      lengthc=dxc(0)
+
+      do ic1=ifirstc1,ilastc1+1
+         do ic0=ifirstc0,ilastc0+0
+            arrayc(ic0,ic1)=zero
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+1
+
+            if1=ic1*ratio(1)
+            do ic0=ifirstc0,ilastc0+0
+
+               do ir=0,ratio(0)-1
+                  if0=ic0*ratio(0)+ir
+                  arrayc(ic0,ic1)=arrayc(ic0,ic1)
+     &                           +arrayf(if0,if1)*lengthf
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+1
+         do ic0=ifirstc0,ilastc0+0
+            arrayc(ic0,ic1)=arrayc(ic0,ic1)/lengthc
+        enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgedgeflot2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      real
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1)
+      double precision lengthf, lengthc
+      integer ic0,ic1,if0,if1,ir
+c
+c***********************************************************************
+c
+      lengthf=dxf(1)
+      lengthc=dxc(1)
+
+      do ic1=ifirstc1,ilastc1+0
+         do ic0=ifirstc0,ilastc0+1
+            arrayc(ic0,ic1)=zero
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+0
+
+         do ir=0,ratio(1)-1
+            if1=ic1*ratio(1)+ir
+            do ic0=ifirstc0,ilastc0+1
+
+                  if0=ic0*ratio(0)
+                  arrayc(ic0,ic1)=arrayc(ic0,ic1)
+     &                           +arrayf(if0,if1)*lengthf
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+0
+         do ic0=ifirstc0,ilastc0+1
+            arrayc(ic0,ic1)=arrayc(ic0,ic1)/lengthc
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 2d edge-centered complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgedgecplx2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      double complex
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1)
+      double precision lengthf, lengthc
+      integer ic0,ic1,if0,if1,ir
+c
+c***********************************************************************
+c
+      lengthf=dxf(0)
+      lengthc=dxc(0)
+
+      do ic1=ifirstc1,ilastc1+1
+         do ic0=ifirstc0,ilastc0+0
+            arrayc(ic0,ic1)=cmplx(zero,zero)
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+1
+
+            if1=ic1*ratio(1)
+            do ic0=ifirstc0,ilastc0+0
+
+               do ir=0,ratio(0)-1
+                  if0=ic0*ratio(0)+ir
+                  arrayc(ic0,ic1)=arrayc(ic0,ic1)
+     &                           +arrayf(if0,if1)*lengthf
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+1
+         do ic0=ifirstc0,ilastc0+0
+            arrayc(ic0,ic1)=arrayc(ic0,ic1)/lengthc
+        enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgedgecplx2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      double complex
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1)
+      double precision lengthf, lengthc
+      integer ic0,ic1,if0,if1,ir
+c
+c***********************************************************************
+c
+      lengthf=dxf(1)
+      lengthc=dxc(1)
+
+      do ic1=ifirstc1,ilastc1+0
+         do ic0=ifirstc0,ilastc0+1
+            arrayc(ic0,ic1)=cmplx(zero,zero)
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+0
+
+         do ir=0,ratio(1)-1
+            if1=ic1*ratio(1)+ir
+            do ic0=ifirstc0,ilastc0+1
+
+                  if0=ic0*ratio(0)
+                  arrayc(ic0,ic1)=arrayc(ic0,ic1)
+     &                           +arrayf(if0,if1)*lengthf
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+0
+         do ic0=ifirstc0,ilastc0+1
+            arrayc(ic0,ic1)=arrayc(ic0,ic1)/lengthc
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 2d face-centered double data
+c***********************************************************************
+c
+      subroutine cartwgtavgfacedoub2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      double precision
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1)
+      double precision lengthf, lengthc
+      integer ie0,ic1,if0,if1,ir1
+c
+c***********************************************************************
+c
+      lengthf=dxf(1)
+      lengthc=dxc(1)
+
+      do ic1=ifirstc1,ilastc1
+         do ie0=ifirstc0,ilastc0+1
+            arrayc(ie0,ic1)=zero
+         enddo
+      enddo
+
+      do ir1=0,ratio(1)-1
+         do ic1=ifirstc1,ilastc1
+            if1=ic1*ratio(1)+ir1
+            do ie0=ifirstc0,ilastc0+1
+               if0=ie0*ratio(0)
+               arrayc(ie0,ic1)=arrayc(ie0,ic1)
+     &                           +arrayf(if0,if1)*lengthf
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ie0=ifirstc0,ilastc0+1
+            arrayc(ie0,ic1)=arrayc(ie0,ic1)/lengthc
+        enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgfacedoub2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      double precision
+     &  arrayf(filo1:fihi1+1,
+     &          filo0:fihi0),
+     &  arrayc(cilo1:cihi1+1,
+     &          cilo0:cihi0)
+      double precision lengthf, lengthc
+      integer ie1,ic0,if1,if0,ir0
+c
+c***********************************************************************
+c
+      lengthf=dxf(0)
+      lengthc=dxc(0)
+
+      do ic0=ifirstc0,ilastc0
+         do ie1=ifirstc1,ilastc1+1
+            arrayc(ie1,ic0)=zero
+         enddo
+      enddo
+
+      do ir0=0,ratio(0)-1
+         do ic0=ifirstc0,ilastc0
+            if0=ic0*ratio(0)+ir0
+            do ie1=ifirstc1,ilastc1+1
+               if1=ie1*ratio(1)
+               arrayc(ie1,ic0)=arrayc(ie1,ic0)
+     &                           +arrayf(if1,if0)*lengthf
+            enddo
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         do ie1=ifirstc1,ilastc1+1
+            arrayc(ie1,ic0)=arrayc(ie1,ic0)/lengthc
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 2d face-centered float data
+c***********************************************************************
+c
+      subroutine cartwgtavgfaceflot2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      real
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1)
+      double precision lengthf, lengthc
+      integer ie0,ic1,if0,if1,ir1
+c
+c***********************************************************************
+c
+      lengthf=dxf(1)
+      lengthc=dxc(1)
+
+      do ic1=ifirstc1,ilastc1
+         do ie0=ifirstc0,ilastc0+1
+            arrayc(ie0,ic1)=zero
+         enddo
+      enddo
+
+      do ir1=0,ratio(1)-1
+         do ic1=ifirstc1,ilastc1
+            if1=ic1*ratio(1)+ir1
+            do ie0=ifirstc0,ilastc0+1
+               if0=ie0*ratio(0)
+               arrayc(ie0,ic1)=arrayc(ie0,ic1)
+     &                           +arrayf(if0,if1)*lengthf
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ie0=ifirstc0,ilastc0+1
+            arrayc(ie0,ic1)=arrayc(ie0,ic1)/lengthc
+        enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgfaceflot2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      real
+     &  arrayf(filo1:fihi1+1,
+     &          filo0:fihi0),
+     &  arrayc(cilo1:cihi1+1,
+     &          cilo0:cihi0)
+      double precision lengthf, lengthc
+      integer ie1,ic0,if1,if0,ir0
+c
+c***********************************************************************
+c
+      lengthf=dxf(0)
+      lengthc=dxc(0)
+
+      do ic0=ifirstc0,ilastc0
+         do ie1=ifirstc1,ilastc1+1
+            arrayc(ie1,ic0)=zero
+         enddo
+      enddo
+
+      do ir0=0,ratio(0)-1
+         do ic0=ifirstc0,ilastc0
+            if0=ic0*ratio(0)+ir0
+            do ie1=ifirstc1,ilastc1+1
+               if1=ie1*ratio(1)
+               arrayc(ie1,ic0)=arrayc(ie1,ic0)
+     &                           +arrayf(if1,if0)*lengthf
+            enddo
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         do ie1=ifirstc1,ilastc1+1
+            arrayc(ie1,ic0)=arrayc(ie1,ic0)/lengthc
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 2d face-centered complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgfacecplx2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      double complex
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1)
+      double precision lengthf, lengthc
+      integer ie0,ic1,if0,if1,ir1
+c
+c***********************************************************************
+c
+      lengthf=dxf(1)
+      lengthc=dxc(1)
+
+      do ic1=ifirstc1,ilastc1
+         do ie0=ifirstc0,ilastc0+1
+            arrayc(ie0,ic1)=cmplx(zero,zero)
+         enddo
+      enddo
+
+      do ir1=0,ratio(1)-1
+         do ic1=ifirstc1,ilastc1
+            if1=ic1*ratio(1)+ir1
+            do ie0=ifirstc0,ilastc0+1
+               if0=ie0*ratio(0)
+               arrayc(ie0,ic1)=arrayc(ie0,ic1)
+     &                           +arrayf(if0,if1)*lengthf
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ie0=ifirstc0,ilastc0+1
+            arrayc(ie0,ic1)=arrayc(ie0,ic1)/lengthc
+        enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgfacecplx2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      double complex
+     &  arrayf(filo1:fihi1+1,
+     &          filo0:fihi0),
+     &  arrayc(cilo1:cihi1+1,
+     &          cilo0:cihi0)
+      double precision lengthf, lengthc
+      integer ie1,ic0,if1,if0,ir0
+c
+c***********************************************************************
+c
+      lengthf=dxf(0)
+      lengthc=dxc(0)
+
+      do ic0=ifirstc0,ilastc0
+         do ie1=ifirstc1,ilastc1+1
+            arrayc(ie1,ic0)=cmplx(zero,zero)
+         enddo
+      enddo
+
+      do ir0=0,ratio(0)-1
+         do ic0=ifirstc0,ilastc0
+            if0=ic0*ratio(0)+ir0
+            do ie1=ifirstc1,ilastc1+1
+               if1=ie1*ratio(1)
+               arrayc(ie1,ic0)=arrayc(ie1,ic0)
+     &                           +arrayf(if1,if0)*lengthf
+            enddo
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         do ie1=ifirstc1,ilastc1+1
+            arrayc(ie1,ic0)=arrayc(ie1,ic0)/lengthc
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 2d outerface double data
+c***********************************************************************
+c
+      subroutine cartwgtavgoutfacedoub2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      double precision
+     &  arrayf(filo1:fihi1),
+     &  arrayc(cilo1:cihi1)
+      double precision lengthf, lengthc
+      integer ic1,if1,ir1
+c
+c***********************************************************************
+c
+      lengthf=dxf(1)
+      lengthc=dxc(1)
+
+      do ic1=ifirstc1,ilastc1
+         arrayc(ic1)=zero
+      enddo
+
+      do ir1=0,ratio(1)-1
+         do ic1=ifirstc1,ilastc1
+            if1=ic1*ratio(1)+ir1
+            arrayc(ic1)=arrayc(ic1)+arrayf(if1)*lengthf
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         arrayc(ic1)=arrayc(ic1)/lengthc
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgoutfacedoub2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      double precision
+     &  arrayf(filo0:fihi0),
+     &  arrayc(cilo0:cihi0)
+      double precision lengthf, lengthc
+      integer ic0,if0,ir0
+c
+c***********************************************************************
+c
+      lengthf=dxf(0)
+      lengthc=dxc(0)
+
+      do ic0=ifirstc0,ilastc0
+         arrayc(ic0)=zero
+      enddo
+
+      do ir0=0,ratio(0)-1
+         do ic0=ifirstc0,ilastc0
+            if0=ic0*ratio(0)+ir0
+            arrayc(ic0)=arrayc(ic0)+arrayf(if0)*lengthf
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         arrayc(ic0)=arrayc(ic0)/lengthc
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 2d outerface float data
+c***********************************************************************
+c
+      subroutine cartwgtavgoutfaceflot2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      real
+     &  arrayf(filo1:fihi1),
+     &  arrayc(cilo1:cihi1)
+      double precision lengthf, lengthc
+      integer ic1,if1,ir1
+c
+c***********************************************************************
+c
+      lengthf=dxf(1)
+      lengthc=dxc(1)
+
+      do ic1=ifirstc1,ilastc1
+         arrayc(ic1)=zero
+      enddo
+
+      do ir1=0,ratio(1)-1
+         do ic1=ifirstc1,ilastc1
+            if1=ic1*ratio(1)+ir1
+            arrayc(ic1)=arrayc(ic1)+arrayf(if1)*lengthf
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         arrayc(ic1)=arrayc(ic1)/lengthc
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgoutfaceflot2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      real
+     &  arrayf(filo0:fihi0),
+     &  arrayc(cilo0:cihi0)
+      double precision lengthf, lengthc
+      integer ic0,if0,ir0
+c
+c***********************************************************************
+c
+      lengthf=dxf(0)
+      lengthc=dxc(0)
+
+      do ic0=ifirstc0,ilastc0
+         arrayc(ic0)=zero
+      enddo
+
+      do ir0=0,ratio(0)-1
+         do ic0=ifirstc0,ilastc0
+            if0=ic0*ratio(0)+ir0
+            arrayc(ic0)=arrayc(ic0)+arrayf(if0)*lengthf
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         arrayc(ic0)=arrayc(ic0)/lengthc
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 2d outerface complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgoutfacecplx2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      double complex
+     &  arrayf(filo1:fihi1),
+     &  arrayc(cilo1:cihi1)
+      double precision lengthf, lengthc
+      integer ic1,if1,ir1
+c
+c***********************************************************************
+c
+      lengthf=dxf(1)
+      lengthc=dxc(1)
+
+      do ic1=ifirstc1,ilastc1
+         arrayc(ic1)=cmplx(zero,zero)
+      enddo
+
+      do ir1=0,ratio(1)-1
+         do ic1=ifirstc1,ilastc1
+            if1=ic1*ratio(1)+ir1
+            arrayc(ic1)=arrayc(ic1)+arrayf(if1)*lengthf
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         arrayc(ic1)=arrayc(ic1)/lengthc
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgoutfacecplx2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      double complex
+     &  arrayf(filo0:fihi0),
+     &  arrayc(cilo0:cihi0)
+      double precision lengthf, lengthc
+      integer ic0,if0,ir0
+c
+c***********************************************************************
+c
+      lengthf=dxf(0)
+      lengthc=dxc(0)
+
+      do ic0=ifirstc0,ilastc0
+         arrayc(ic0)=cmplx(zero,zero)
+      enddo
+
+      do ir0=0,ratio(0)-1
+         do ic0=ifirstc0,ilastc0
+            if0=ic0*ratio(0)+ir0
+            arrayc(ic0)=arrayc(ic0)+arrayf(if0)*lengthf
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         arrayc(ic0)=arrayc(ic0)/lengthc
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 2d outerside double data
+c***********************************************************************
+c
+      subroutine cartwgtavgoutsidedoub2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      double precision
+     &  arrayf(filo1:fihi1),
+     &  arrayc(cilo1:cihi1)
+      double precision lengthf, lengthc
+      integer ic1,if1,ir1
+c
+c***********************************************************************
+c
+      lengthf=dxf(1)
+      lengthc=dxc(1)
+
+      do ic1=ifirstc1,ilastc1
+         arrayc(ic1)=zero
+      enddo
+
+      do ir1=0,ratio(1)-1
+         do ic1=ifirstc1,ilastc1
+            if1=ic1*ratio(1)+ir1
+            arrayc(ic1)=arrayc(ic1)+arrayf(if1)*lengthf
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         arrayc(ic1)=arrayc(ic1)/lengthc
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgoutsidedoub2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      double precision
+     &  arrayf(filo0:fihi0),
+     &  arrayc(cilo0:cihi0)
+      double precision lengthf, lengthc
+      integer ic0,if0,ir0
+c
+c***********************************************************************
+c
+      lengthf=dxf(0)
+      lengthc=dxc(0)
+
+      do ic0=ifirstc0,ilastc0
+         arrayc(ic0)=zero
+      enddo
+
+      do ir0=0,ratio(0)-1
+         do ic0=ifirstc0,ilastc0
+            if0=ic0*ratio(0)+ir0
+            arrayc(ic0)=arrayc(ic0)+arrayf(if0)*lengthf
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         arrayc(ic0)=arrayc(ic0)/lengthc
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 2d side-centered double data
+c***********************************************************************
+c
+      subroutine cartwgtavgsidedoub2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      double precision
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1)
+      double precision lengthf, lengthc
+      integer ic0,ic1,if0,if1,ir
+c
+c***********************************************************************
+c
+      lengthf=dxf(1)
+      lengthc=dxc(1)
+
+      do ic1=ifirstc1,ilastc1+0
+         do ic0=ifirstc0,ilastc0+1
+            arrayc(ic0,ic1)=zero
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+0
+
+         do ir=0,ratio(1)-1
+            if1=ic1*ratio(1)+ir
+            do ic0=ifirstc0,ilastc0+1
+
+                  if0=ic0*ratio(0)
+               arrayc(ic0,ic1)=arrayc(ic0,ic1)
+     &                           +arrayf(if0,if1)*lengthf
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+0
+         do ic0=ifirstc0,ilastc0+1
+            arrayc(ic0,ic1)=arrayc(ic0,ic1)/lengthc
+        enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgsidedoub2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      double precision
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1)
+      double precision lengthf, lengthc
+      integer ic0,ic1,if0,if1,ir
+c
+c***********************************************************************
+c
+      lengthf=dxf(0)
+      lengthc=dxc(0)
+
+      do ic1=ifirstc1,ilastc1+1
+         do ic0=ifirstc0,ilastc0+0
+            arrayc(ic0,ic1)=zero
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+1
+
+            if1=ic1*ratio(1)
+            do ic0=ifirstc0,ilastc0+0
+
+               do ir=0,ratio(0)-1
+                  if0=ic0*ratio(0)+ir
+               arrayc(ic0,ic1)=arrayc(ic0,ic1)
+     &                           +arrayf(if0,if1)*lengthf
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+1
+         do ic0=ifirstc0,ilastc0+0
+            arrayc(ic0,ic1)=arrayc(ic0,ic1)/lengthc
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 2d side-centered float data
+c***********************************************************************
+c
+      subroutine cartwgtavgsideflot2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      real
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1)
+      double precision lengthf, lengthc
+      integer ic0,ic1,if0,if1,ir
+c
+c***********************************************************************
+c
+      lengthf=dxf(1)
+      lengthc=dxc(1)
+
+      do ic1=ifirstc1,ilastc1+0
+         do ic0=ifirstc0,ilastc0+1
+            arrayc(ic0,ic1)=zero
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+0
+
+         do ir=0,ratio(1)-1
+            if1=ic1*ratio(1)+ir
+            do ic0=ifirstc0,ilastc0+1
+
+                  if0=ic0*ratio(0)
+               arrayc(ic0,ic1)=arrayc(ic0,ic1)
+     &                           +arrayf(if0,if1)*lengthf
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+0
+         do ic0=ifirstc0,ilastc0+1
+            arrayc(ic0,ic1)=arrayc(ic0,ic1)/lengthc
+        enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgsideflot2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      real
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1)
+      double precision lengthf, lengthc
+      integer ic0,ic1,if0,if1,ir
+c
+c***********************************************************************
+c
+      lengthf=dxf(0)
+      lengthc=dxc(0)
+
+      do ic1=ifirstc1,ilastc1+1
+         do ic0=ifirstc0,ilastc0+0
+            arrayc(ic0,ic1)=zero
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+1
+
+            if1=ic1*ratio(1)
+            do ic0=ifirstc0,ilastc0+0
+
+               do ir=0,ratio(0)-1
+                  if0=ic0*ratio(0)+ir
+               arrayc(ic0,ic1)=arrayc(ic0,ic1)
+     &                           +arrayf(if0,if1)*lengthf
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+1
+         do ic0=ifirstc0,ilastc0+0
+            arrayc(ic0,ic1)=arrayc(ic0,ic1)/lengthc
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 2d side-centered complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgsidecplx2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      double complex
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1)
+      double precision lengthf, lengthc
+      integer ic0,ic1,if0,if1,ir
+c
+c***********************************************************************
+c
+      lengthf=dxf(1)
+      lengthc=dxc(1)
+
+      do ic1=ifirstc1,ilastc1+0
+         do ic0=ifirstc0,ilastc0+1
+            arrayc(ic0,ic1)=cmplx(zero,zero)
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+0
+
+         do ir=0,ratio(1)-1
+            if1=ic1*ratio(1)+ir
+            do ic0=ifirstc0,ilastc0+1
+
+                  if0=ic0*ratio(0)
+               arrayc(ic0,ic1)=arrayc(ic0,ic1)
+     &                           +arrayf(if0,if1)*lengthf
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+0
+         do ic0=ifirstc0,ilastc0+1
+            arrayc(ic0,ic1)=arrayc(ic0,ic1)/lengthc
+        enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgsidecplx2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxf(0:2-1),
+     &  dxc(0:2-1)
+      double complex
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1)
+      double precision lengthf, lengthc
+      integer ic0,ic1,if0,if1,ir
+c
+c***********************************************************************
+c
+      lengthf=dxf(0)
+      lengthc=dxc(0)
+
+      do ic1=ifirstc1,ilastc1+1
+         do ic0=ifirstc0,ilastc0+0
+            arrayc(ic0,ic1)=cmplx(zero,zero)
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+1
+
+            if1=ic1*ratio(1)
+            do ic0=ifirstc0,ilastc0+0
+
+               do ir=0,ratio(0)-1
+                  if0=ic0*ratio(0)+ir
+               arrayc(ic0,ic1)=arrayc(ic0,ic1)
+     &                           +arrayf(if0,if1)*lengthf
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+1
+         do ic0=ifirstc0,ilastc0+0
+            arrayc(ic0,ic1)=arrayc(ic0,ic1)/lengthc
+        enddo
+      enddo
+c
+      return
+      end
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/fortran/geom_cartcoarsen2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/fortran/geom_cartcoarsen2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,162 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_cartcoarsen2d.m4 $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for spatial coarsening of 2d patch data
+c               on a regular Cartesian mesh.
+c
+include(geom_m4cartcoarsenops2d.i)dnl
+c
+c***********************************************************************
+c Weighted averaging for 2d cell-centered double data
+c***********************************************************************
+c
+      subroutine cartwgtavgcelldoub2d(
+cart_wgtavg_op_cell_2d(`double precision')dnl
+c
+c***********************************************************************
+c Weighted averaging for 2d cell-centered float data
+c***********************************************************************
+c
+      subroutine cartwgtavgcellflot2d(
+cart_wgtavg_op_cell_2d(`real')dnl
+c
+c***********************************************************************
+c Weighted averaging for 2d cell-centered complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgcellcplx2d(
+cart_wgtavg_op_cell_2d(`double complex')dnl
+c
+c***********************************************************************
+c Weighted averaging for 2d edge-centered double data
+c***********************************************************************
+c
+      subroutine cartwgtavgedgedoub2d0(
+cart_wgtavg_op_edge_2d(`double precision',0,1)dnl
+c
+      subroutine cartwgtavgedgedoub2d1(
+cart_wgtavg_op_edge_2d(`double precision',1,0)dnl
+c
+c***********************************************************************
+c Weighted averaging for 2d edge-centered float data
+c***********************************************************************
+c
+      subroutine cartwgtavgedgeflot2d0(
+cart_wgtavg_op_edge_2d(`real',0,1)dnl
+c
+      subroutine cartwgtavgedgeflot2d1(
+cart_wgtavg_op_edge_2d(`real',1,0)dnl
+c
+c***********************************************************************
+c Weighted averaging for 2d edge-centered complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgedgecplx2d0(
+cart_wgtavg_op_edge_2d(`double complex',0,1)dnl
+c
+      subroutine cartwgtavgedgecplx2d1(
+cart_wgtavg_op_edge_2d(`double complex',1,0)dnl
+c
+c***********************************************************************
+c Weighted averaging for 2d face-centered double data
+c***********************************************************************
+c
+      subroutine cartwgtavgfacedoub2d0(
+cart_wgtavg_op_face_2d(`double precision',0,1)dnl
+c
+      subroutine cartwgtavgfacedoub2d1(
+cart_wgtavg_op_face_2d(`double precision',1,0)dnl
+c
+c***********************************************************************
+c Weighted averaging for 2d face-centered float data
+c***********************************************************************
+c
+      subroutine cartwgtavgfaceflot2d0(
+cart_wgtavg_op_face_2d(`real',0,1)dnl
+c
+      subroutine cartwgtavgfaceflot2d1(
+cart_wgtavg_op_face_2d(`real',1,0)dnl
+c
+c***********************************************************************
+c Weighted averaging for 2d face-centered complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgfacecplx2d0(
+cart_wgtavg_op_face_2d(`double complex',0,1)dnl
+c
+      subroutine cartwgtavgfacecplx2d1(
+cart_wgtavg_op_face_2d(`double complex',1,0)dnl
+c
+c***********************************************************************
+c Weighted averaging for 2d outerface double data
+c***********************************************************************
+c
+      subroutine cartwgtavgoutfacedoub2d0(
+cart_wgtavg_op_outerface_2d(`double precision',0,1)dnl
+c
+      subroutine cartwgtavgoutfacedoub2d1(
+cart_wgtavg_op_outerface_2d(`double precision',1,0)dnl
+c
+c***********************************************************************
+c Weighted averaging for 2d outerface float data
+c***********************************************************************
+c
+      subroutine cartwgtavgoutfaceflot2d0(
+cart_wgtavg_op_outerface_2d(`real',0,1)dnl
+c
+      subroutine cartwgtavgoutfaceflot2d1(
+cart_wgtavg_op_outerface_2d(`real',1,0)dnl
+c
+c***********************************************************************
+c Weighted averaging for 2d outerface complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgoutfacecplx2d0(
+cart_wgtavg_op_outerface_2d(`double complex',0,1)dnl
+c
+      subroutine cartwgtavgoutfacecplx2d1(
+cart_wgtavg_op_outerface_2d(`double complex',1,0)dnl
+c
+c***********************************************************************
+c Weighted averaging for 2d outerside double data
+c***********************************************************************
+c
+      subroutine cartwgtavgoutsidedoub2d0(
+cart_wgtavg_op_outerside_2d(`double precision',0,1)dnl
+c
+      subroutine cartwgtavgoutsidedoub2d1(
+cart_wgtavg_op_outerside_2d(`double precision',1,0)dnl
+c
+c***********************************************************************
+c Weighted averaging for 2d side-centered double data
+c***********************************************************************
+c
+      subroutine cartwgtavgsidedoub2d0(
+cart_wgtavg_op_side_2d(`double precision',0,1)dnl
+c
+      subroutine cartwgtavgsidedoub2d1(
+cart_wgtavg_op_side_2d(`double precision',1,0)dnl
+c
+c***********************************************************************
+c Weighted averaging for 2d side-centered float data
+c***********************************************************************
+c
+      subroutine cartwgtavgsideflot2d0(
+cart_wgtavg_op_side_2d(`real',0,1)dnl
+c
+      subroutine cartwgtavgsideflot2d1(
+cart_wgtavg_op_side_2d(`real',1,0)dnl
+c
+c***********************************************************************
+c Weighted averaging for 2d side-centered complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgsidecplx2d0(
+cart_wgtavg_op_side_2d(`double complex',0,1)dnl
+c
+      subroutine cartwgtavgsidecplx2d1(
+cart_wgtavg_op_side_2d(`double complex',1,0)dnl
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/fortran/geom_cartcoarsen3d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/fortran/geom_cartcoarsen3d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,3115 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_cartcoarsen3d.m4 $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for spatial coarsening of 3d patch data
+c               on a regular Cartesian mesh.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_m4cartcoarsenops3d.i $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 3d Cartesian coarsen operators
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim3d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 3d arrays in FORTRAN routines.
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c***********************************************************************
+c Weighted averaging for 3d cell-centered double data
+c***********************************************************************
+c
+      subroutine cartwgtavgcelldoub3d(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double precision
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1,
+     &          filo2:fihi2),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2)
+      double precision dVf,dVc
+      integer ic0,ic1,ic2,if0,if1,if2,ir0,ir1,ir2
+c
+c***********************************************************************
+c
+      dVf = dxf(0)*dxf(1)*dxf(2)
+      dVc = dxc(0)*dxc(1)*dxc(2)
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            do ic0=ifirstc0,ilastc0
+               arrayc(ic0,ic1,ic2)=zero
+            enddo
+         enddo
+      enddo
+
+      do ir2=0,ratio(2)-1
+         do ir1=0,ratio(1)-1
+            do ir0=0,ratio(0)-1
+               do ic2=ifirstc2,ilastc2
+                  if2=ic2*ratio(2)+ir2
+                  do ic1=ifirstc1,ilastc1
+                     if1=ic1*ratio(1)+ir1
+                     do ic0=ifirstc0,ilastc0
+                        if0=ic0*ratio(0)+ir0
+                        arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)
+     &                                      +arrayf(if0,if1,if2)*dVf
+                     enddo
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            do ic0=ifirstc0,ilastc0
+               arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)/dVc
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 3d cell-centered float data
+c***********************************************************************
+c
+      subroutine cartwgtavgcellflot3d(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      real
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1,
+     &          filo2:fihi2),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2)
+      double precision dVf,dVc
+      integer ic0,ic1,ic2,if0,if1,if2,ir0,ir1,ir2
+c
+c***********************************************************************
+c
+      dVf = dxf(0)*dxf(1)*dxf(2)
+      dVc = dxc(0)*dxc(1)*dxc(2)
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            do ic0=ifirstc0,ilastc0
+               arrayc(ic0,ic1,ic2)=zero
+            enddo
+         enddo
+      enddo
+
+      do ir2=0,ratio(2)-1
+         do ir1=0,ratio(1)-1
+            do ir0=0,ratio(0)-1
+               do ic2=ifirstc2,ilastc2
+                  if2=ic2*ratio(2)+ir2
+                  do ic1=ifirstc1,ilastc1
+                     if1=ic1*ratio(1)+ir1
+                     do ic0=ifirstc0,ilastc0
+                        if0=ic0*ratio(0)+ir0
+                        arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)
+     &                                      +arrayf(if0,if1,if2)*dVf
+                     enddo
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            do ic0=ifirstc0,ilastc0
+               arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)/dVc
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 3d cell-centered complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgcellcplx3d(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double complex
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1,
+     &          filo2:fihi2),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2)
+      double precision dVf,dVc
+      integer ic0,ic1,ic2,if0,if1,if2,ir0,ir1,ir2
+c
+c***********************************************************************
+c
+      dVf = dxf(0)*dxf(1)*dxf(2)
+      dVc = dxc(0)*dxc(1)*dxc(2)
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            do ic0=ifirstc0,ilastc0
+               arrayc(ic0,ic1,ic2)=cmplx(zero,zero)
+            enddo
+         enddo
+      enddo
+
+      do ir2=0,ratio(2)-1
+         do ir1=0,ratio(1)-1
+            do ir0=0,ratio(0)-1
+               do ic2=ifirstc2,ilastc2
+                  if2=ic2*ratio(2)+ir2
+                  do ic1=ifirstc1,ilastc1
+                     if1=ic1*ratio(1)+ir1
+                     do ic0=ifirstc0,ilastc0
+                        if0=ic0*ratio(0)+ir0
+                        arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)
+     &                                      +arrayf(if0,if1,if2)*dVf
+                     enddo
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            do ic0=ifirstc0,ilastc0
+               arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)/dVc
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 3d edge-centered double data
+c***********************************************************************
+c
+      subroutine cartwgtavgedgedoub3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double precision
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2+1),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2+1)
+      double precision lengthf,lengthc
+      integer ic0,ic1,ic2,if0,if1,if2,ir
+c
+c***********************************************************************
+c
+      lengthf=dxf(0)
+      lengthc=dxc(0)
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+         do ic1=ifirstc1,ilastc1+1
+
+            do ic0=ifirstc0,ilastc0
+
+               arrayc(ic0,ic1,ic2)=zero
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+            if2=ic2*ratio(2)
+
+
+         do ic1=ifirstc1,ilastc1+1
+               if1=ic1*ratio(1)
+
+
+            do ic0=ifirstc0,ilastc0
+               do ir=0,ratio(0)-1
+                  if0=ic0*ratio(0)+ir
+                  arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)
+     &                             +arrayf(if0,if1,if2)*lengthf
+               enddo
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+         do ic1=ifirstc1,ilastc1+1
+
+            do ic0=ifirstc0,ilastc0
+               arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)/lengthc
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgedgedoub3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double precision
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2+1),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1)
+      double precision lengthf,lengthc
+      integer ic0,ic1,ic2,if0,if1,if2,ir
+c
+c***********************************************************************
+c
+      lengthf=dxf(1)
+      lengthc=dxc(1)
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+         do ic1=ifirstc1,ilastc1
+
+            do ic0=ifirstc0,ilastc0+1
+
+               arrayc(ic0,ic1,ic2)=zero
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+            if2=ic2*ratio(2)
+
+
+         do ic1=ifirstc1,ilastc1
+            do ir=0,ratio(1)-1
+               if1=ic1*ratio(1)+ir
+
+
+            do ic0=ifirstc0,ilastc0+1
+                  if0=ic0*ratio(0)
+                  arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)
+     &                             +arrayf(if0,if1,if2)*lengthf
+               enddo
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+         do ic1=ifirstc1,ilastc1
+
+            do ic0=ifirstc0,ilastc0+1
+               arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)/lengthc
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgedgedoub3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double precision
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2)
+      double precision lengthf,lengthc
+      integer ic0,ic1,ic2,if0,if1,if2,ir
+c
+c***********************************************************************
+c
+      lengthf=dxf(2)
+      lengthc=dxc(2)
+
+
+      do ic2=ifirstc2,ilastc2 
+
+         do ic1=ifirstc1,ilastc1+1
+
+            do ic0=ifirstc0,ilastc0+1
+
+               arrayc(ic0,ic1,ic2)=zero
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2 
+         do ir=0,ratio(2)-1
+            if2=ic2*ratio(2)+ir
+
+
+         do ic1=ifirstc1,ilastc1+1
+               if1=ic1*ratio(1)
+
+
+            do ic0=ifirstc0,ilastc0+1
+                  if0=ic0*ratio(0)
+                  arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)
+     &                             +arrayf(if0,if1,if2)*lengthf
+               enddo
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2 
+
+         do ic1=ifirstc1,ilastc1+1
+
+            do ic0=ifirstc0,ilastc0+1
+               arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)/lengthc
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 3d edge-centered float data
+c***********************************************************************
+c
+      subroutine cartwgtavgedgeflot3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      real
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2+1),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2+1)
+      double precision lengthf,lengthc
+      integer ic0,ic1,ic2,if0,if1,if2,ir
+c
+c***********************************************************************
+c
+      lengthf=dxf(0)
+      lengthc=dxc(0)
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+         do ic1=ifirstc1,ilastc1+1
+
+            do ic0=ifirstc0,ilastc0
+
+               arrayc(ic0,ic1,ic2)=zero
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+            if2=ic2*ratio(2)
+
+
+         do ic1=ifirstc1,ilastc1+1
+               if1=ic1*ratio(1)
+
+
+            do ic0=ifirstc0,ilastc0
+               do ir=0,ratio(0)-1
+                  if0=ic0*ratio(0)+ir
+                  arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)
+     &                             +arrayf(if0,if1,if2)*lengthf
+               enddo
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+         do ic1=ifirstc1,ilastc1+1
+
+            do ic0=ifirstc0,ilastc0
+               arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)/lengthc
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgedgeflot3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      real
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2+1),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1)
+      double precision lengthf,lengthc
+      integer ic0,ic1,ic2,if0,if1,if2,ir
+c
+c***********************************************************************
+c
+      lengthf=dxf(1)
+      lengthc=dxc(1)
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+         do ic1=ifirstc1,ilastc1
+
+            do ic0=ifirstc0,ilastc0+1
+
+               arrayc(ic0,ic1,ic2)=zero
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+            if2=ic2*ratio(2)
+
+
+         do ic1=ifirstc1,ilastc1
+            do ir=0,ratio(1)-1
+               if1=ic1*ratio(1)+ir
+
+
+            do ic0=ifirstc0,ilastc0+1
+                  if0=ic0*ratio(0)
+                  arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)
+     &                             +arrayf(if0,if1,if2)*lengthf
+               enddo
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+         do ic1=ifirstc1,ilastc1
+
+            do ic0=ifirstc0,ilastc0+1
+               arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)/lengthc
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgedgeflot3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      real
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2)
+      double precision lengthf,lengthc
+      integer ic0,ic1,ic2,if0,if1,if2,ir
+c
+c***********************************************************************
+c
+      lengthf=dxf(2)
+      lengthc=dxc(2)
+
+
+      do ic2=ifirstc2,ilastc2 
+
+         do ic1=ifirstc1,ilastc1+1
+
+            do ic0=ifirstc0,ilastc0+1
+
+               arrayc(ic0,ic1,ic2)=zero
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2 
+         do ir=0,ratio(2)-1
+            if2=ic2*ratio(2)+ir
+
+
+         do ic1=ifirstc1,ilastc1+1
+               if1=ic1*ratio(1)
+
+
+            do ic0=ifirstc0,ilastc0+1
+                  if0=ic0*ratio(0)
+                  arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)
+     &                             +arrayf(if0,if1,if2)*lengthf
+               enddo
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2 
+
+         do ic1=ifirstc1,ilastc1+1
+
+            do ic0=ifirstc0,ilastc0+1
+               arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)/lengthc
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 3d edge-centered complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgedgecplx3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double complex
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2+1),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2+1)
+      double precision lengthf,lengthc
+      integer ic0,ic1,ic2,if0,if1,if2,ir
+c
+c***********************************************************************
+c
+      lengthf=dxf(0)
+      lengthc=dxc(0)
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+         do ic1=ifirstc1,ilastc1+1
+
+            do ic0=ifirstc0,ilastc0
+
+               arrayc(ic0,ic1,ic2)=cmplx(zero,zero)
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+            if2=ic2*ratio(2)
+
+
+         do ic1=ifirstc1,ilastc1+1
+               if1=ic1*ratio(1)
+
+
+            do ic0=ifirstc0,ilastc0
+               do ir=0,ratio(0)-1
+                  if0=ic0*ratio(0)+ir
+                  arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)
+     &                             +arrayf(if0,if1,if2)*lengthf
+               enddo
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+         do ic1=ifirstc1,ilastc1+1
+
+            do ic0=ifirstc0,ilastc0
+               arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)/lengthc
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgedgecplx3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double complex
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2+1),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1)
+      double precision lengthf,lengthc
+      integer ic0,ic1,ic2,if0,if1,if2,ir
+c
+c***********************************************************************
+c
+      lengthf=dxf(1)
+      lengthc=dxc(1)
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+         do ic1=ifirstc1,ilastc1
+
+            do ic0=ifirstc0,ilastc0+1
+
+               arrayc(ic0,ic1,ic2)=cmplx(zero,zero)
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+            if2=ic2*ratio(2)
+
+
+         do ic1=ifirstc1,ilastc1
+            do ir=0,ratio(1)-1
+               if1=ic1*ratio(1)+ir
+
+
+            do ic0=ifirstc0,ilastc0+1
+                  if0=ic0*ratio(0)
+                  arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)
+     &                             +arrayf(if0,if1,if2)*lengthf
+               enddo
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+         do ic1=ifirstc1,ilastc1
+
+            do ic0=ifirstc0,ilastc0+1
+               arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)/lengthc
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgedgecplx3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double complex
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2)
+      double precision lengthf,lengthc
+      integer ic0,ic1,ic2,if0,if1,if2,ir
+c
+c***********************************************************************
+c
+      lengthf=dxf(2)
+      lengthc=dxc(2)
+
+
+      do ic2=ifirstc2,ilastc2 
+
+         do ic1=ifirstc1,ilastc1+1
+
+            do ic0=ifirstc0,ilastc0+1
+
+               arrayc(ic0,ic1,ic2)=cmplx(zero,zero)
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2 
+         do ir=0,ratio(2)-1
+            if2=ic2*ratio(2)+ir
+
+
+         do ic1=ifirstc1,ilastc1+1
+               if1=ic1*ratio(1)
+
+
+            do ic0=ifirstc0,ilastc0+1
+                  if0=ic0*ratio(0)
+                  arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)
+     &                             +arrayf(if0,if1,if2)*lengthf
+               enddo
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2 
+
+         do ic1=ifirstc1,ilastc1+1
+
+            do ic0=ifirstc0,ilastc0+1
+               arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)/lengthc
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 3d face-centered double data
+c***********************************************************************
+c
+      subroutine cartwgtavgfacedoub3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double precision
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2)
+      double precision areaf,areac
+      integer ie0,ic1,ic2,if0,if1,if2,ir1,ir2
+c
+c***********************************************************************
+c
+      areaf=dxf(1)*dxf(2)
+      areac=dxc(1)*dxc(2)
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            do ie0=ifirstc0,ilastc0+1
+               arrayc(ie0,ic1,ic2)=zero
+            enddo
+         enddo
+      enddo
+
+      do ir2=0,ratio(2)-1
+         do ir1=0,ratio(1)-1
+            do ic2=ifirstc2,ilastc2
+               if2=ic2*ratio(2)+ir2
+               do ic1=ifirstc1,ilastc1
+                  if1=ic1*ratio(1)+ir1
+                  do ie0=ifirstc0,ilastc0+1
+                     if0=ie0*ratio(0)
+                     arrayc(ie0,ic1,ic2)=arrayc(ie0,ic1,ic2)
+     &                                +arrayf(if0,if1,if2)*areaf
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            do ie0=ifirstc0,ilastc0+1
+               arrayc(ie0,ic1,ic2)=arrayc(ie0,ic1,ic2)/areac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgfacedoub3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double precision
+     &  arrayf(filo1:fihi1+1,
+     &          filo2:fihi2,
+     &          filo0:fihi0),
+     &  arrayc(cilo1:cihi1+1,
+     &          cilo2:cihi2,
+     &          cilo0:cihi0)
+      double precision areaf,areac
+      integer ie1,ic2,ic0,if1,if2,if0,ir2,ir0
+c
+c***********************************************************************
+c
+      areaf=dxf(2)*dxf(0)
+      areac=dxc(2)*dxc(0)
+
+      do ic0=ifirstc0,ilastc0
+         do ic2=ifirstc2,ilastc2
+            do ie1=ifirstc1,ilastc1+1
+               arrayc(ie1,ic2,ic0)=zero
+            enddo
+         enddo
+      enddo
+
+      do ir0=0,ratio(0)-1
+         do ir2=0,ratio(2)-1
+            do ic0=ifirstc0,ilastc0
+               if0=ic0*ratio(0)+ir0
+               do ic2=ifirstc2,ilastc2
+                  if2=ic2*ratio(2)+ir2
+                  do ie1=ifirstc1,ilastc1+1
+                     if1=ie1*ratio(1)
+                     arrayc(ie1,ic2,ic0)=arrayc(ie1,ic2,ic0)
+     &                                +arrayf(if1,if2,if0)*areaf
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         do ic2=ifirstc2,ilastc2
+            do ie1=ifirstc1,ilastc1+1
+               arrayc(ie1,ic2,ic0)=arrayc(ie1,ic2,ic0)/areac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgfacedoub3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double precision
+     &  arrayf(filo2:fihi2+1,
+     &          filo0:fihi0,
+     &          filo1:fihi1),
+     &  arrayc(cilo2:cihi2+1,
+     &          cilo0:cihi0,
+     &          cilo1:cihi1)
+      double precision areaf,areac
+      integer ie2,ic0,ic1,if2,if0,if1,ir0,ir1
+c
+c***********************************************************************
+c
+      areaf=dxf(0)*dxf(1)
+      areac=dxc(0)*dxc(1)
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            do ie2=ifirstc2,ilastc2+1
+               arrayc(ie2,ic0,ic1)=zero
+            enddo
+         enddo
+      enddo
+
+      do ir1=0,ratio(1)-1
+         do ir0=0,ratio(0)-1
+            do ic1=ifirstc1,ilastc1
+               if1=ic1*ratio(1)+ir1
+               do ic0=ifirstc0,ilastc0
+                  if0=ic0*ratio(0)+ir0
+                  do ie2=ifirstc2,ilastc2+1
+                     if2=ie2*ratio(2)
+                     arrayc(ie2,ic0,ic1)=arrayc(ie2,ic0,ic1)
+     &                                +arrayf(if2,if0,if1)*areaf
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            do ie2=ifirstc2,ilastc2+1
+               arrayc(ie2,ic0,ic1)=arrayc(ie2,ic0,ic1)/areac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 3d face-centered float data
+c***********************************************************************
+c
+      subroutine cartwgtavgfaceflot3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      real
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2)
+      double precision areaf,areac
+      integer ie0,ic1,ic2,if0,if1,if2,ir1,ir2
+c
+c***********************************************************************
+c
+      areaf=dxf(1)*dxf(2)
+      areac=dxc(1)*dxc(2)
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            do ie0=ifirstc0,ilastc0+1
+               arrayc(ie0,ic1,ic2)=zero
+            enddo
+         enddo
+      enddo
+
+      do ir2=0,ratio(2)-1
+         do ir1=0,ratio(1)-1
+            do ic2=ifirstc2,ilastc2
+               if2=ic2*ratio(2)+ir2
+               do ic1=ifirstc1,ilastc1
+                  if1=ic1*ratio(1)+ir1
+                  do ie0=ifirstc0,ilastc0+1
+                     if0=ie0*ratio(0)
+                     arrayc(ie0,ic1,ic2)=arrayc(ie0,ic1,ic2)
+     &                                +arrayf(if0,if1,if2)*areaf
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            do ie0=ifirstc0,ilastc0+1
+               arrayc(ie0,ic1,ic2)=arrayc(ie0,ic1,ic2)/areac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgfaceflot3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      real
+     &  arrayf(filo1:fihi1+1,
+     &          filo2:fihi2,
+     &          filo0:fihi0),
+     &  arrayc(cilo1:cihi1+1,
+     &          cilo2:cihi2,
+     &          cilo0:cihi0)
+      double precision areaf,areac
+      integer ie1,ic2,ic0,if1,if2,if0,ir2,ir0
+c
+c***********************************************************************
+c
+      areaf=dxf(2)*dxf(0)
+      areac=dxc(2)*dxc(0)
+
+      do ic0=ifirstc0,ilastc0
+         do ic2=ifirstc2,ilastc2
+            do ie1=ifirstc1,ilastc1+1
+               arrayc(ie1,ic2,ic0)=zero
+            enddo
+         enddo
+      enddo
+
+      do ir0=0,ratio(0)-1
+         do ir2=0,ratio(2)-1
+            do ic0=ifirstc0,ilastc0
+               if0=ic0*ratio(0)+ir0
+               do ic2=ifirstc2,ilastc2
+                  if2=ic2*ratio(2)+ir2
+                  do ie1=ifirstc1,ilastc1+1
+                     if1=ie1*ratio(1)
+                     arrayc(ie1,ic2,ic0)=arrayc(ie1,ic2,ic0)
+     &                                +arrayf(if1,if2,if0)*areaf
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         do ic2=ifirstc2,ilastc2
+            do ie1=ifirstc1,ilastc1+1
+               arrayc(ie1,ic2,ic0)=arrayc(ie1,ic2,ic0)/areac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgfaceflot3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      real
+     &  arrayf(filo2:fihi2+1,
+     &          filo0:fihi0,
+     &          filo1:fihi1),
+     &  arrayc(cilo2:cihi2+1,
+     &          cilo0:cihi0,
+     &          cilo1:cihi1)
+      double precision areaf,areac
+      integer ie2,ic0,ic1,if2,if0,if1,ir0,ir1
+c
+c***********************************************************************
+c
+      areaf=dxf(0)*dxf(1)
+      areac=dxc(0)*dxc(1)
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            do ie2=ifirstc2,ilastc2+1
+               arrayc(ie2,ic0,ic1)=zero
+            enddo
+         enddo
+      enddo
+
+      do ir1=0,ratio(1)-1
+         do ir0=0,ratio(0)-1
+            do ic1=ifirstc1,ilastc1
+               if1=ic1*ratio(1)+ir1
+               do ic0=ifirstc0,ilastc0
+                  if0=ic0*ratio(0)+ir0
+                  do ie2=ifirstc2,ilastc2+1
+                     if2=ie2*ratio(2)
+                     arrayc(ie2,ic0,ic1)=arrayc(ie2,ic0,ic1)
+     &                                +arrayf(if2,if0,if1)*areaf
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            do ie2=ifirstc2,ilastc2+1
+               arrayc(ie2,ic0,ic1)=arrayc(ie2,ic0,ic1)/areac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 3d face-centered complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgfacecplx3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double complex
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2)
+      double precision areaf,areac
+      integer ie0,ic1,ic2,if0,if1,if2,ir1,ir2
+c
+c***********************************************************************
+c
+      areaf=dxf(1)*dxf(2)
+      areac=dxc(1)*dxc(2)
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            do ie0=ifirstc0,ilastc0+1
+               arrayc(ie0,ic1,ic2)=cmplx(zero,zero)
+            enddo
+         enddo
+      enddo
+
+      do ir2=0,ratio(2)-1
+         do ir1=0,ratio(1)-1
+            do ic2=ifirstc2,ilastc2
+               if2=ic2*ratio(2)+ir2
+               do ic1=ifirstc1,ilastc1
+                  if1=ic1*ratio(1)+ir1
+                  do ie0=ifirstc0,ilastc0+1
+                     if0=ie0*ratio(0)
+                     arrayc(ie0,ic1,ic2)=arrayc(ie0,ic1,ic2)
+     &                                +arrayf(if0,if1,if2)*areaf
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            do ie0=ifirstc0,ilastc0+1
+               arrayc(ie0,ic1,ic2)=arrayc(ie0,ic1,ic2)/areac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgfacecplx3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double complex
+     &  arrayf(filo1:fihi1+1,
+     &          filo2:fihi2,
+     &          filo0:fihi0),
+     &  arrayc(cilo1:cihi1+1,
+     &          cilo2:cihi2,
+     &          cilo0:cihi0)
+      double precision areaf,areac
+      integer ie1,ic2,ic0,if1,if2,if0,ir2,ir0
+c
+c***********************************************************************
+c
+      areaf=dxf(2)*dxf(0)
+      areac=dxc(2)*dxc(0)
+
+      do ic0=ifirstc0,ilastc0
+         do ic2=ifirstc2,ilastc2
+            do ie1=ifirstc1,ilastc1+1
+               arrayc(ie1,ic2,ic0)=cmplx(zero,zero)
+            enddo
+         enddo
+      enddo
+
+      do ir0=0,ratio(0)-1
+         do ir2=0,ratio(2)-1
+            do ic0=ifirstc0,ilastc0
+               if0=ic0*ratio(0)+ir0
+               do ic2=ifirstc2,ilastc2
+                  if2=ic2*ratio(2)+ir2
+                  do ie1=ifirstc1,ilastc1+1
+                     if1=ie1*ratio(1)
+                     arrayc(ie1,ic2,ic0)=arrayc(ie1,ic2,ic0)
+     &                                +arrayf(if1,if2,if0)*areaf
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         do ic2=ifirstc2,ilastc2
+            do ie1=ifirstc1,ilastc1+1
+               arrayc(ie1,ic2,ic0)=arrayc(ie1,ic2,ic0)/areac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgfacecplx3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double complex
+     &  arrayf(filo2:fihi2+1,
+     &          filo0:fihi0,
+     &          filo1:fihi1),
+     &  arrayc(cilo2:cihi2+1,
+     &          cilo0:cihi0,
+     &          cilo1:cihi1)
+      double precision areaf,areac
+      integer ie2,ic0,ic1,if2,if0,if1,ir0,ir1
+c
+c***********************************************************************
+c
+      areaf=dxf(0)*dxf(1)
+      areac=dxc(0)*dxc(1)
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            do ie2=ifirstc2,ilastc2+1
+               arrayc(ie2,ic0,ic1)=cmplx(zero,zero)
+            enddo
+         enddo
+      enddo
+
+      do ir1=0,ratio(1)-1
+         do ir0=0,ratio(0)-1
+            do ic1=ifirstc1,ilastc1
+               if1=ic1*ratio(1)+ir1
+               do ic0=ifirstc0,ilastc0
+                  if0=ic0*ratio(0)+ir0
+                  do ie2=ifirstc2,ilastc2+1
+                     if2=ie2*ratio(2)
+                     arrayc(ie2,ic0,ic1)=arrayc(ie2,ic0,ic1)
+     &                                +arrayf(if2,if0,if1)*areaf
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            do ie2=ifirstc2,ilastc2+1
+               arrayc(ie2,ic0,ic1)=arrayc(ie2,ic0,ic1)/areac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 3d outerface double data
+c***********************************************************************
+c
+      subroutine cartwgtavgoutfacedoub3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double precision
+     &  arrayf(filo1:fihi1,
+     &          filo2:fihi2),
+     &  arrayc(cilo1:cihi1,
+     &          cilo2:cihi2)
+      double precision areaf,areac
+      integer ic1,ic2,if1,if2,ir1,ir2
+c
+c***********************************************************************
+c
+      areaf=dxf(1)*dxf(2)
+      areac=dxc(1)*dxc(2)
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            arrayc(ic1,ic2)=zero
+         enddo
+      enddo
+
+      do ir2=0,ratio(2)-1
+         do ir1=0,ratio(1)-1
+            do ic2=ifirstc2,ilastc2
+               if2=ic2*ratio(2)+ir2
+               do ic1=ifirstc1,ilastc1
+                  if1=ic1*ratio(1)+ir1
+                  arrayc(ic1,ic2)=arrayc(ic1,ic2)
+     &                              +arrayf(if1,if2)*areaf
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            arrayc(ic1,ic2)=arrayc(ic1,ic2)/areac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgoutfacedoub3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double precision
+     &  arrayf(filo2:fihi2,
+     &          filo0:fihi0),
+     &  arrayc(cilo2:cihi2,
+     &          cilo0:cihi0)
+      double precision areaf,areac
+      integer ic2,ic0,if2,if0,ir2,ir0
+c
+c***********************************************************************
+c
+      areaf=dxf(2)*dxf(0)
+      areac=dxc(2)*dxc(0)
+
+      do ic0=ifirstc0,ilastc0
+         do ic2=ifirstc2,ilastc2
+            arrayc(ic2,ic0)=zero
+         enddo
+      enddo
+
+      do ir0=0,ratio(0)-1
+         do ir2=0,ratio(2)-1
+            do ic0=ifirstc0,ilastc0
+               if0=ic0*ratio(0)+ir0
+               do ic2=ifirstc2,ilastc2
+                  if2=ic2*ratio(2)+ir2
+                  arrayc(ic2,ic0)=arrayc(ic2,ic0)
+     &                              +arrayf(if2,if0)*areaf
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         do ic2=ifirstc2,ilastc2
+            arrayc(ic2,ic0)=arrayc(ic2,ic0)/areac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgoutfacedoub3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double precision
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1)
+      double precision areaf,areac
+      integer ic0,ic1,if0,if1,ir0,ir1
+c
+c***********************************************************************
+c
+      areaf=dxf(0)*dxf(1)
+      areac=dxc(0)*dxc(1)
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            arrayc(ic0,ic1)=zero
+         enddo
+      enddo
+
+      do ir1=0,ratio(1)-1
+         do ir0=0,ratio(0)-1
+            do ic1=ifirstc1,ilastc1
+               if1=ic1*ratio(1)+ir1
+               do ic0=ifirstc0,ilastc0
+                  if0=ic0*ratio(0)+ir0
+                  arrayc(ic0,ic1)=arrayc(ic0,ic1)
+     &                              +arrayf(if0,if1)*areaf
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            arrayc(ic0,ic1)=arrayc(ic0,ic1)/areac
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 3d outerface float data
+c***********************************************************************
+c
+      subroutine cartwgtavgoutfaceflot3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      real
+     &  arrayf(filo1:fihi1,
+     &          filo2:fihi2),
+     &  arrayc(cilo1:cihi1,
+     &          cilo2:cihi2)
+      double precision areaf,areac
+      integer ic1,ic2,if1,if2,ir1,ir2
+c
+c***********************************************************************
+c
+      areaf=dxf(1)*dxf(2)
+      areac=dxc(1)*dxc(2)
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            arrayc(ic1,ic2)=zero
+         enddo
+      enddo
+
+      do ir2=0,ratio(2)-1
+         do ir1=0,ratio(1)-1
+            do ic2=ifirstc2,ilastc2
+               if2=ic2*ratio(2)+ir2
+               do ic1=ifirstc1,ilastc1
+                  if1=ic1*ratio(1)+ir1
+                  arrayc(ic1,ic2)=arrayc(ic1,ic2)
+     &                              +arrayf(if1,if2)*areaf
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            arrayc(ic1,ic2)=arrayc(ic1,ic2)/areac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgoutfaceflot3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      real
+     &  arrayf(filo2:fihi2,
+     &          filo0:fihi0),
+     &  arrayc(cilo2:cihi2,
+     &          cilo0:cihi0)
+      double precision areaf,areac
+      integer ic2,ic0,if2,if0,ir2,ir0
+c
+c***********************************************************************
+c
+      areaf=dxf(2)*dxf(0)
+      areac=dxc(2)*dxc(0)
+
+      do ic0=ifirstc0,ilastc0
+         do ic2=ifirstc2,ilastc2
+            arrayc(ic2,ic0)=zero
+         enddo
+      enddo
+
+      do ir0=0,ratio(0)-1
+         do ir2=0,ratio(2)-1
+            do ic0=ifirstc0,ilastc0
+               if0=ic0*ratio(0)+ir0
+               do ic2=ifirstc2,ilastc2
+                  if2=ic2*ratio(2)+ir2
+                  arrayc(ic2,ic0)=arrayc(ic2,ic0)
+     &                              +arrayf(if2,if0)*areaf
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         do ic2=ifirstc2,ilastc2
+            arrayc(ic2,ic0)=arrayc(ic2,ic0)/areac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgoutfaceflot3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      real
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1)
+      double precision areaf,areac
+      integer ic0,ic1,if0,if1,ir0,ir1
+c
+c***********************************************************************
+c
+      areaf=dxf(0)*dxf(1)
+      areac=dxc(0)*dxc(1)
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            arrayc(ic0,ic1)=zero
+         enddo
+      enddo
+
+      do ir1=0,ratio(1)-1
+         do ir0=0,ratio(0)-1
+            do ic1=ifirstc1,ilastc1
+               if1=ic1*ratio(1)+ir1
+               do ic0=ifirstc0,ilastc0
+                  if0=ic0*ratio(0)+ir0
+                  arrayc(ic0,ic1)=arrayc(ic0,ic1)
+     &                              +arrayf(if0,if1)*areaf
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            arrayc(ic0,ic1)=arrayc(ic0,ic1)/areac
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 3d outerface complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgoutfacecplx3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double complex
+     &  arrayf(filo1:fihi1,
+     &          filo2:fihi2),
+     &  arrayc(cilo1:cihi1,
+     &          cilo2:cihi2)
+      double precision areaf,areac
+      integer ic1,ic2,if1,if2,ir1,ir2
+c
+c***********************************************************************
+c
+      areaf=dxf(1)*dxf(2)
+      areac=dxc(1)*dxc(2)
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            arrayc(ic1,ic2)=cmplx(zero,zero)
+         enddo
+      enddo
+
+      do ir2=0,ratio(2)-1
+         do ir1=0,ratio(1)-1
+            do ic2=ifirstc2,ilastc2
+               if2=ic2*ratio(2)+ir2
+               do ic1=ifirstc1,ilastc1
+                  if1=ic1*ratio(1)+ir1
+                  arrayc(ic1,ic2)=arrayc(ic1,ic2)
+     &                              +arrayf(if1,if2)*areaf
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            arrayc(ic1,ic2)=arrayc(ic1,ic2)/areac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgoutfacecplx3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double complex
+     &  arrayf(filo2:fihi2,
+     &          filo0:fihi0),
+     &  arrayc(cilo2:cihi2,
+     &          cilo0:cihi0)
+      double precision areaf,areac
+      integer ic2,ic0,if2,if0,ir2,ir0
+c
+c***********************************************************************
+c
+      areaf=dxf(2)*dxf(0)
+      areac=dxc(2)*dxc(0)
+
+      do ic0=ifirstc0,ilastc0
+         do ic2=ifirstc2,ilastc2
+            arrayc(ic2,ic0)=cmplx(zero,zero)
+         enddo
+      enddo
+
+      do ir0=0,ratio(0)-1
+         do ir2=0,ratio(2)-1
+            do ic0=ifirstc0,ilastc0
+               if0=ic0*ratio(0)+ir0
+               do ic2=ifirstc2,ilastc2
+                  if2=ic2*ratio(2)+ir2
+                  arrayc(ic2,ic0)=arrayc(ic2,ic0)
+     &                              +arrayf(if2,if0)*areaf
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         do ic2=ifirstc2,ilastc2
+            arrayc(ic2,ic0)=arrayc(ic2,ic0)/areac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgoutfacecplx3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double complex
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1)
+      double precision areaf,areac
+      integer ic0,ic1,if0,if1,ir0,ir1
+c
+c***********************************************************************
+c
+      areaf=dxf(0)*dxf(1)
+      areac=dxc(0)*dxc(1)
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            arrayc(ic0,ic1)=cmplx(zero,zero)
+         enddo
+      enddo
+
+      do ir1=0,ratio(1)-1
+         do ir0=0,ratio(0)-1
+            do ic1=ifirstc1,ilastc1
+               if1=ic1*ratio(1)+ir1
+               do ic0=ifirstc0,ilastc0
+                  if0=ic0*ratio(0)+ir0
+                  arrayc(ic0,ic1)=arrayc(ic0,ic1)
+     &                              +arrayf(if0,if1)*areaf
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            arrayc(ic0,ic1)=arrayc(ic0,ic1)/areac
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 3d outerside double data
+c***********************************************************************
+c
+      subroutine cartwgtavgoutsidedoub3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double precision
+     &  arrayf(filo1:fihi1,
+     &          filo2:fihi2),
+     &  arrayc(cilo1:cihi1,
+     &          cilo2:cihi2)
+      double precision areaf,areac
+      integer ic_outer,ic_inner,if_outer,if_inner,
+     &  ir_outer,ir_inner
+c
+c***********************************************************************
+c
+      areaf=dxf(1)*dxf(2)
+      areac=dxc(1)*dxc(2)
+
+
+      do ic_outer=ifirstc2,ilastc2
+         do ic_inner=ifirstc1,ilastc1
+
+            arrayc(ic_inner,ic_outer)=zero
+         enddo
+      enddo
+
+
+      do ic_outer=ifirstc2,ilastc2
+         do ir_outer=0,ratio(2)-1
+            if_outer=ic_outer*ratio(2)+ir_outer
+            do ic_inner=ifirstc1,ilastc1
+               do ir_inner=0,ratio(1)-1
+               if_inner=ic_inner*ratio(1)+ir_inner
+ 
+                  arrayc(ic_inner,ic_outer)=
+     &               arrayc(ic_inner,ic_outer)
+     &               +arrayf(if_inner,if_outer)*areaf
+               enddo
+            enddo
+         enddo
+      enddo
+
+
+      do ic_outer=ifirstc2,ilastc2
+         do ic_inner=ifirstc1,ilastc1
+            arrayc(ic_inner,ic_outer)=
+     &         arrayc(ic_inner,ic_outer)/areac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgoutsidedoub3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double precision
+     &  arrayf(filo0:fihi0,
+     &          filo2:fihi2),
+     &  arrayc(cilo0:cihi0,
+     &          cilo2:cihi2)
+      double precision areaf,areac
+      integer ic_outer,ic_inner,if_outer,if_inner,
+     &  ir_outer,ir_inner
+c
+c***********************************************************************
+c
+      areaf=dxf(0)*dxf(2)
+      areac=dxc(0)*dxc(2)
+
+
+      do ic_outer=ifirstc2,ilastc2
+         do ic_inner=ifirstc0,ilastc0
+
+            arrayc(ic_inner,ic_outer)=zero
+         enddo
+      enddo
+
+
+      do ic_outer=ifirstc2,ilastc2
+         do ir_outer=0,ratio(2)-1
+            if_outer=ic_outer*ratio(2)+ir_outer
+            do ic_inner=ifirstc0,ilastc0
+               do ir_inner=0,ratio(0)-1
+               if_inner=ic_inner*ratio(0)+ir_inner
+ 
+                  arrayc(ic_inner,ic_outer)=
+     &               arrayc(ic_inner,ic_outer)
+     &               +arrayf(if_inner,if_outer)*areaf
+               enddo
+            enddo
+         enddo
+      enddo
+
+
+      do ic_outer=ifirstc2,ilastc2
+         do ic_inner=ifirstc0,ilastc0
+            arrayc(ic_inner,ic_outer)=
+     &         arrayc(ic_inner,ic_outer)/areac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgoutsidedoub3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double precision
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1)
+      double precision areaf,areac
+      integer ic_outer,ic_inner,if_outer,if_inner,
+     &  ir_outer,ir_inner
+c
+c***********************************************************************
+c
+      areaf=dxf(0)*dxf(1)
+      areac=dxc(0)*dxc(1)
+
+
+      do ic_outer=ifirstc1,ilastc1
+         do ic_inner=ifirstc0,ilastc0
+
+            arrayc(ic_inner,ic_outer)=zero
+         enddo
+      enddo
+
+
+      do ic_outer=ifirstc1,ilastc1
+         do ir_outer=0,ratio(1)-1
+            if_outer=ic_outer*ratio(1)+ir_outer
+            do ic_inner=ifirstc0,ilastc0
+               do ir_inner=0,ratio(0)-1
+               if_inner=ic_inner*ratio(0)+ir_inner
+ 
+                  arrayc(ic_inner,ic_outer)=
+     &               arrayc(ic_inner,ic_outer)
+     &               +arrayf(if_inner,if_outer)*areaf
+               enddo
+            enddo
+         enddo
+      enddo
+
+
+      do ic_outer=ifirstc1,ilastc1
+         do ic_inner=ifirstc0,ilastc0
+            arrayc(ic_inner,ic_outer)=
+     &         arrayc(ic_inner,ic_outer)/areac
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 3d side-centered double data
+c***********************************************************************
+c
+      subroutine cartwgtavgsidedoub3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double precision
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2)
+      double precision areaf,areac
+      integer ic0,ic1,ic2,if0,if1,if2,
+
+     &  ir1,ir2
+c
+c***********************************************************************
+c
+      areaf=dxf(1)*dxf(2)
+      areac=dxc(1)*dxc(2)
+
+
+      do ic2=ifirstc2,ilastc2 
+
+         do ic1=ifirstc1,ilastc1
+
+            do ic0=ifirstc0,ilastc0+1
+
+               arrayc(ic0,ic1,ic2)=zero
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2 
+         do ir2=0,ratio(2)-1
+               if2=ic2*ratio(2)+ir2
+
+         do ic1=ifirstc1,ilastc1
+            do ir1=0,ratio(1)-1
+                  if1=ic1*ratio(1)+ir1
+
+            do ic0=ifirstc0,ilastc0+1
+                  if0=ic0*ratio(0)
+                     arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)
+     &                                +arrayf(if0,if1,if2)*areaf
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2 
+
+         do ic1=ifirstc1,ilastc1
+
+            do ic0=ifirstc0,ilastc0+1
+               arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)/areac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgsidedoub3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double precision
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2)
+      double precision areaf,areac
+      integer ic0,ic1,ic2,if0,if1,if2,
+
+     &  ir0,ir2
+c
+c***********************************************************************
+c
+      areaf=dxf(2)*dxf(0)
+      areac=dxc(2)*dxc(0)
+
+
+      do ic2=ifirstc2,ilastc2 
+
+         do ic1=ifirstc1,ilastc1+1
+
+            do ic0=ifirstc0,ilastc0
+
+               arrayc(ic0,ic1,ic2)=zero
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2 
+         do ir2=0,ratio(2)-1
+               if2=ic2*ratio(2)+ir2
+
+         do ic1=ifirstc1,ilastc1+1
+                  if1=ic1*ratio(1)
+
+            do ic0=ifirstc0,ilastc0
+               do ir0=0,ratio(0)-1
+                  if0=ic0*ratio(0)+ir0
+                     arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)
+     &                                +arrayf(if0,if1,if2)*areaf
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2 
+
+         do ic1=ifirstc1,ilastc1+1
+
+            do ic0=ifirstc0,ilastc0
+               arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)/areac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgsidedoub3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double precision
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1,
+     &          filo2:fihi2+1),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1)
+      double precision areaf,areac
+      integer ic0,ic1,ic2,if0,if1,if2,
+
+     &  ir0,ir1
+c
+c***********************************************************************
+c
+      areaf=dxf(0)*dxf(1)
+      areac=dxc(0)*dxc(1)
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+         do ic1=ifirstc1,ilastc1
+
+            do ic0=ifirstc0,ilastc0
+
+               arrayc(ic0,ic1,ic2)=zero
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+               if2=ic2*ratio(2)
+
+         do ic1=ifirstc1,ilastc1
+            do ir1=0,ratio(1)-1
+                  if1=ic1*ratio(1)+ir1
+
+            do ic0=ifirstc0,ilastc0
+               do ir0=0,ratio(0)-1
+                  if0=ic0*ratio(0)+ir0
+                     arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)
+     &                                +arrayf(if0,if1,if2)*areaf
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+         do ic1=ifirstc1,ilastc1
+
+            do ic0=ifirstc0,ilastc0
+               arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)/areac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 3d side-centered float data
+c***********************************************************************
+c
+      subroutine cartwgtavgsideflot3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      real
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2)
+      double precision areaf,areac
+      integer ic0,ic1,ic2,if0,if1,if2,
+
+     &  ir1,ir2
+c
+c***********************************************************************
+c
+      areaf=dxf(1)*dxf(2)
+      areac=dxc(1)*dxc(2)
+
+
+      do ic2=ifirstc2,ilastc2 
+
+         do ic1=ifirstc1,ilastc1
+
+            do ic0=ifirstc0,ilastc0+1
+
+               arrayc(ic0,ic1,ic2)=zero
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2 
+         do ir2=0,ratio(2)-1
+               if2=ic2*ratio(2)+ir2
+
+         do ic1=ifirstc1,ilastc1
+            do ir1=0,ratio(1)-1
+                  if1=ic1*ratio(1)+ir1
+
+            do ic0=ifirstc0,ilastc0+1
+                  if0=ic0*ratio(0)
+                     arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)
+     &                                +arrayf(if0,if1,if2)*areaf
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2 
+
+         do ic1=ifirstc1,ilastc1
+
+            do ic0=ifirstc0,ilastc0+1
+               arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)/areac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgsideflot3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      real
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2)
+      double precision areaf,areac
+      integer ic0,ic1,ic2,if0,if1,if2,
+
+     &  ir0,ir2
+c
+c***********************************************************************
+c
+      areaf=dxf(2)*dxf(0)
+      areac=dxc(2)*dxc(0)
+
+
+      do ic2=ifirstc2,ilastc2 
+
+         do ic1=ifirstc1,ilastc1+1
+
+            do ic0=ifirstc0,ilastc0
+
+               arrayc(ic0,ic1,ic2)=zero
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2 
+         do ir2=0,ratio(2)-1
+               if2=ic2*ratio(2)+ir2
+
+         do ic1=ifirstc1,ilastc1+1
+                  if1=ic1*ratio(1)
+
+            do ic0=ifirstc0,ilastc0
+               do ir0=0,ratio(0)-1
+                  if0=ic0*ratio(0)+ir0
+                     arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)
+     &                                +arrayf(if0,if1,if2)*areaf
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2 
+
+         do ic1=ifirstc1,ilastc1+1
+
+            do ic0=ifirstc0,ilastc0
+               arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)/areac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgsideflot3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      real
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1,
+     &          filo2:fihi2+1),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1)
+      double precision areaf,areac
+      integer ic0,ic1,ic2,if0,if1,if2,
+
+     &  ir0,ir1
+c
+c***********************************************************************
+c
+      areaf=dxf(0)*dxf(1)
+      areac=dxc(0)*dxc(1)
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+         do ic1=ifirstc1,ilastc1
+
+            do ic0=ifirstc0,ilastc0
+
+               arrayc(ic0,ic1,ic2)=zero
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+               if2=ic2*ratio(2)
+
+         do ic1=ifirstc1,ilastc1
+            do ir1=0,ratio(1)-1
+                  if1=ic1*ratio(1)+ir1
+
+            do ic0=ifirstc0,ilastc0
+               do ir0=0,ratio(0)-1
+                  if0=ic0*ratio(0)+ir0
+                     arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)
+     &                                +arrayf(if0,if1,if2)*areaf
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+         do ic1=ifirstc1,ilastc1
+
+            do ic0=ifirstc0,ilastc0
+               arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)/areac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Weighted averaging for 3d side-centered complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgsidecplx3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double complex
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2)
+      double precision areaf,areac
+      integer ic0,ic1,ic2,if0,if1,if2,
+
+     &  ir1,ir2
+c
+c***********************************************************************
+c
+      areaf=dxf(1)*dxf(2)
+      areac=dxc(1)*dxc(2)
+
+
+      do ic2=ifirstc2,ilastc2 
+
+         do ic1=ifirstc1,ilastc1
+
+            do ic0=ifirstc0,ilastc0+1
+
+               arrayc(ic0,ic1,ic2)=cmplx(zero,zero)
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2 
+         do ir2=0,ratio(2)-1
+               if2=ic2*ratio(2)+ir2
+
+         do ic1=ifirstc1,ilastc1
+            do ir1=0,ratio(1)-1
+                  if1=ic1*ratio(1)+ir1
+
+            do ic0=ifirstc0,ilastc0+1
+                  if0=ic0*ratio(0)
+                     arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)
+     &                                +arrayf(if0,if1,if2)*areaf
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2 
+
+         do ic1=ifirstc1,ilastc1
+
+            do ic0=ifirstc0,ilastc0+1
+               arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)/areac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgsidecplx3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double complex
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2)
+      double precision areaf,areac
+      integer ic0,ic1,ic2,if0,if1,if2,
+
+     &  ir0,ir2
+c
+c***********************************************************************
+c
+      areaf=dxf(2)*dxf(0)
+      areac=dxc(2)*dxc(0)
+
+
+      do ic2=ifirstc2,ilastc2 
+
+         do ic1=ifirstc1,ilastc1+1
+
+            do ic0=ifirstc0,ilastc0
+
+               arrayc(ic0,ic1,ic2)=cmplx(zero,zero)
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2 
+         do ir2=0,ratio(2)-1
+               if2=ic2*ratio(2)+ir2
+
+         do ic1=ifirstc1,ilastc1+1
+                  if1=ic1*ratio(1)
+
+            do ic0=ifirstc0,ilastc0
+               do ir0=0,ratio(0)-1
+                  if0=ic0*ratio(0)+ir0
+                     arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)
+     &                                +arrayf(if0,if1,if2)*areaf
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2 
+
+         do ic1=ifirstc1,ilastc1+1
+
+            do ic0=ifirstc0,ilastc0
+               arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)/areac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartwgtavgsidecplx3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxf(0:3-1),
+     &  dxc(0:3-1)
+      double complex
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1,
+     &          filo2:fihi2+1),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1)
+      double precision areaf,areac
+      integer ic0,ic1,ic2,if0,if1,if2,
+
+     &  ir0,ir1
+c
+c***********************************************************************
+c
+      areaf=dxf(0)*dxf(1)
+      areac=dxc(0)*dxc(1)
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+         do ic1=ifirstc1,ilastc1
+
+            do ic0=ifirstc0,ilastc0
+
+               arrayc(ic0,ic1,ic2)=cmplx(zero,zero)
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+               if2=ic2*ratio(2)
+
+         do ic1=ifirstc1,ilastc1
+            do ir1=0,ratio(1)-1
+                  if1=ic1*ratio(1)+ir1
+
+            do ic0=ifirstc0,ilastc0
+               do ir0=0,ratio(0)-1
+                  if0=ic0*ratio(0)+ir0
+                     arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)
+     &                                +arrayf(if0,if1,if2)*areaf
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+         do ic1=ifirstc1,ilastc1
+
+            do ic0=ifirstc0,ilastc0
+               arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)/areac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/fortran/geom_cartcoarsen3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/fortran/geom_cartcoarsen3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,201 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_cartcoarsen3d.m4 $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for spatial coarsening of 3d patch data
+c               on a regular Cartesian mesh.
+c
+include(geom_m4cartcoarsenops3d.i)dnl
+c
+c***********************************************************************
+c Weighted averaging for 3d cell-centered double data
+c***********************************************************************
+c
+      subroutine cartwgtavgcelldoub3d(
+cart_wgtavg_op_cell_3d(`double precision')dnl
+c
+c***********************************************************************
+c Weighted averaging for 3d cell-centered float data
+c***********************************************************************
+c
+      subroutine cartwgtavgcellflot3d(
+cart_wgtavg_op_cell_3d(`real')dnl
+c
+c***********************************************************************
+c Weighted averaging for 3d cell-centered complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgcellcplx3d(
+cart_wgtavg_op_cell_3d(`double complex')dnl
+c
+c***********************************************************************
+c Weighted averaging for 3d edge-centered double data
+c***********************************************************************
+c
+      subroutine cartwgtavgedgedoub3d0(
+cart_wgtavg_op_edge_3d(`double precision',0,1,2)dnl
+c
+      subroutine cartwgtavgedgedoub3d1(
+cart_wgtavg_op_edge_3d(`double precision',1,2,0)dnl
+c
+      subroutine cartwgtavgedgedoub3d2(
+cart_wgtavg_op_edge_3d(`double precision',2,0,1)dnl
+c
+c***********************************************************************
+c Weighted averaging for 3d edge-centered float data
+c***********************************************************************
+c
+      subroutine cartwgtavgedgeflot3d0(
+cart_wgtavg_op_edge_3d(`real',0,1,2)dnl
+c
+      subroutine cartwgtavgedgeflot3d1(
+cart_wgtavg_op_edge_3d(`real',1,2,0)dnl
+c
+      subroutine cartwgtavgedgeflot3d2(
+cart_wgtavg_op_edge_3d(`real',2,0,1)dnl
+c
+c***********************************************************************
+c Weighted averaging for 3d edge-centered complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgedgecplx3d0(
+cart_wgtavg_op_edge_3d(`double complex',0,1,2)dnl
+c
+      subroutine cartwgtavgedgecplx3d1(
+cart_wgtavg_op_edge_3d(`double complex',1,2,0)dnl
+c
+      subroutine cartwgtavgedgecplx3d2(
+cart_wgtavg_op_edge_3d(`double complex',2,0,1)dnl
+c
+c***********************************************************************
+c Weighted averaging for 3d face-centered double data
+c***********************************************************************
+c
+      subroutine cartwgtavgfacedoub3d0(
+cart_wgtavg_op_face_3d(`double precision',0,1,2)dnl
+c
+      subroutine cartwgtavgfacedoub3d1(
+cart_wgtavg_op_face_3d(`double precision',1,2,0)dnl
+c
+      subroutine cartwgtavgfacedoub3d2(
+cart_wgtavg_op_face_3d(`double precision',2,0,1)dnl
+c
+c***********************************************************************
+c Weighted averaging for 3d face-centered float data
+c***********************************************************************
+c
+      subroutine cartwgtavgfaceflot3d0(
+cart_wgtavg_op_face_3d(`real',0,1,2)dnl
+c
+      subroutine cartwgtavgfaceflot3d1(
+cart_wgtavg_op_face_3d(`real',1,2,0)dnl
+c
+      subroutine cartwgtavgfaceflot3d2(
+cart_wgtavg_op_face_3d(`real',2,0,1)dnl
+c
+c***********************************************************************
+c Weighted averaging for 3d face-centered complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgfacecplx3d0(
+cart_wgtavg_op_face_3d(`double complex',0,1,2)dnl
+c
+      subroutine cartwgtavgfacecplx3d1(
+cart_wgtavg_op_face_3d(`double complex',1,2,0)dnl
+c
+      subroutine cartwgtavgfacecplx3d2(
+cart_wgtavg_op_face_3d(`double complex',2,0,1)dnl
+c
+c***********************************************************************
+c Weighted averaging for 3d outerface double data
+c***********************************************************************
+c
+      subroutine cartwgtavgoutfacedoub3d0(
+cart_wgtavg_op_outerface_3d(`double precision',0,1,2)dnl
+c
+      subroutine cartwgtavgoutfacedoub3d1(
+cart_wgtavg_op_outerface_3d(`double precision',1,2,0)dnl
+c
+      subroutine cartwgtavgoutfacedoub3d2(
+cart_wgtavg_op_outerface_3d(`double precision',2,0,1)dnl
+c
+c***********************************************************************
+c Weighted averaging for 3d outerface float data
+c***********************************************************************
+c
+      subroutine cartwgtavgoutfaceflot3d0(
+cart_wgtavg_op_outerface_3d(`real',0,1,2)dnl
+c
+      subroutine cartwgtavgoutfaceflot3d1(
+cart_wgtavg_op_outerface_3d(`real',1,2,0)dnl
+c
+      subroutine cartwgtavgoutfaceflot3d2(
+cart_wgtavg_op_outerface_3d(`real',2,0,1)dnl
+c
+c***********************************************************************
+c Weighted averaging for 3d outerface complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgoutfacecplx3d0(
+cart_wgtavg_op_outerface_3d(`double complex',0,1,2)dnl
+c
+      subroutine cartwgtavgoutfacecplx3d1(
+cart_wgtavg_op_outerface_3d(`double complex',1,2,0)dnl
+c
+      subroutine cartwgtavgoutfacecplx3d2(
+cart_wgtavg_op_outerface_3d(`double complex',2,0,1)dnl
+c
+c***********************************************************************
+c Weighted averaging for 3d outerside double data
+c***********************************************************************
+c
+      subroutine cartwgtavgoutsidedoub3d0(
+cart_wgtavg_op_outerside_3d(`double precision',0,1,2)dnl
+c
+      subroutine cartwgtavgoutsidedoub3d1(
+cart_wgtavg_op_outerside_3d(`double precision',1,0,2)dnl
+c
+      subroutine cartwgtavgoutsidedoub3d2(
+cart_wgtavg_op_outerside_3d(`double precision',2,0,1)dnl
+c
+c***********************************************************************
+c Weighted averaging for 3d side-centered double data
+c***********************************************************************
+c
+      subroutine cartwgtavgsidedoub3d0(
+cart_wgtavg_op_side_3d(`double precision',0,1,2)dnl
+c
+      subroutine cartwgtavgsidedoub3d1(
+cart_wgtavg_op_side_3d(`double precision',1,2,0)dnl
+c
+      subroutine cartwgtavgsidedoub3d2(
+cart_wgtavg_op_side_3d(`double precision',2,0,1)dnl
+c
+c***********************************************************************
+c Weighted averaging for 3d side-centered float data
+c***********************************************************************
+c
+      subroutine cartwgtavgsideflot3d0(
+cart_wgtavg_op_side_3d(`real',0,1,2)dnl
+c
+      subroutine cartwgtavgsideflot3d1(
+cart_wgtavg_op_side_3d(`real',1,2,0)dnl
+c
+      subroutine cartwgtavgsideflot3d2(
+cart_wgtavg_op_side_3d(`real',2,0,1)dnl
+c
+c***********************************************************************
+c Weighted averaging for 3d side-centered complex data
+c***********************************************************************
+c
+      subroutine cartwgtavgsidecplx3d0(
+cart_wgtavg_op_side_3d(`double complex',0,1,2)dnl
+c
+      subroutine cartwgtavgsidecplx3d1(
+cart_wgtavg_op_side_3d(`double complex',1,2,0)dnl
+c
+      subroutine cartwgtavgsidecplx3d2(
+cart_wgtavg_op_side_3d(`double complex',2,0,1)dnl
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/fortran/geom_cartrefine1d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/fortran/geom_cartrefine1d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1196 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_cartrefine1d.m4 $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for spatial refining of 1d patch data
+c               on a regular Cartesian mesh.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_m4cartrefineops1d.i $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 1d Cartesian refine operators
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim1d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 1d arrays in FORTRAN routines.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_m4cartopstuff.i $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for cartesian geometry transfer routines.
+c
+
+
+
+
+c
+c
+c
+c
+c
+c
+c
+c 
+c
+c***********************************************************************
+c Linear interpolation for 1d cell-centered double data
+c***********************************************************************
+c
+      subroutine cartlinrefcelldoub1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxc(0:1-1),
+     &  dxf(0:1-1)
+      double precision
+     &  arrayc(cilo0:cihi0),
+     &  arrayf(filo0:fihi0)
+      double precision deltax(0:15,0:1-1),x
+      integer ic0,if0,ir0
+c
+c***********************************************************************
+c
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+        ir0=if0-ic0*ratio(0)
+        x=deltax(ir0,0)/dxc(0)
+        if( x .lt. 0.d0 ) then
+           ic0 = ic0-1
+           x = x + one
+        endif
+        arrayf(if0)=arrayc(ic0)+(arrayc(ic0+1)-arrayc(ic0))*x
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear interpolation for 1d cell-centered float data
+c***********************************************************************
+c
+      subroutine cartlinrefcellflot1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxc(0:1-1),
+     &  dxf(0:1-1)
+      real
+     &  arrayc(cilo0:cihi0),
+     &  arrayf(filo0:fihi0)
+      double precision deltax(0:15,0:1-1),x
+      integer ic0,if0,ir0
+c
+c***********************************************************************
+c
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+        ir0=if0-ic0*ratio(0)
+        x=deltax(ir0,0)/dxc(0)
+        if( x .lt. 0.d0 ) then
+           ic0 = ic0-1
+           x = x + one
+        endif
+        arrayf(if0)=arrayc(ic0)+(arrayc(ic0+1)-arrayc(ic0))*x
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear interpolation for 1d cell-centered complex data
+c***********************************************************************
+c
+      subroutine cartlinrefcellcplx1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxc(0:1-1),
+     &  dxf(0:1-1)
+      double complex
+     &  arrayc(cilo0:cihi0),
+     &  arrayf(filo0:fihi0)
+      double precision deltax(0:15,0:1-1),x
+      integer ic0,if0,ir0
+c
+c***********************************************************************
+c
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+        ir0=if0-ic0*ratio(0)
+        x=deltax(ir0,0)/dxc(0)
+        if( x .lt. 0.d0 ) then
+           ic0 = ic0-1
+           x = x + one
+        endif
+        arrayf(if0)=arrayc(ic0)+(arrayc(ic0+1)-arrayc(ic0))*x
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d cell-centered double data
+c***********************************************************************
+c
+      subroutine cartclinrefcelldoub1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxc(0:1-1),
+     &  dxf(0:1-1),
+     &  deltax(0:15,0:1-1)
+      double precision
+     &  arrayc(cilo0:cihi0),
+     &  arrayf(filo0:fihi0),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0)
+      integer ic0,ie0,if0,ir0
+      double precision
+     &  coef2,bound
+c
+c***********************************************************************
+c
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie0)
+     &               -arrayc(ie0-1)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic0)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic0)=zero
+         endif
+      enddo
+
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         ir0=if0-ic0*ratio(0)
+         arrayf(if0)=arrayc(ic0)+slope0(ic0)*deltax(ir0,0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d cell-centered float data
+c***********************************************************************
+c
+      subroutine cartclinrefcellflot1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxc(0:1-1),
+     &  dxf(0:1-1),
+     &  deltax(0:15,0:1-1)
+      real
+     &  arrayc(cilo0:cihi0),
+     &  arrayf(filo0:fihi0),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0)
+      integer ic0,ie0,if0,ir0
+      real
+     &  coef2,bound
+c
+c***********************************************************************
+c
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie0)
+     &               -arrayc(ie0-1)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic0)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic0)=zero
+         endif
+      enddo
+
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         ir0=if0-ic0*ratio(0)
+         arrayf(if0)=arrayc(ic0)+slope0(ic0)*deltax(ir0,0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d cell-centered complex data
+c***********************************************************************
+c
+      subroutine cartclinrefcellcplx1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxc(0:1-1),
+     &  dxf(0:1-1),
+     &  deltax(0:15,0:1-1)
+      double complex
+     &  arrayc(cilo0:cihi0),
+     &  arrayf(filo0:fihi0),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0)
+      integer ic0,ie0,if0,ir0
+      double precision
+     &  coef2real,coef2imag,boundreal,boundimag,
+     &  diff0real,diff0imag,diff1real,diff1imag,
+     &  slopereal,slopeimag
+c
+c***********************************************************************
+c
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie0)
+     &               -arrayc(ie0-1)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         diff0real=dble(diff0(ic0))
+         diff0imag=imag(diff0(ic0))
+         diff1real=dble(diff0(ic0+1))
+         diff1imag=imag(diff0(ic0+1))
+         coef2real=half*(diff0real+diff1real)
+         coef2imag=half*(diff0imag+diff1imag)
+         boundreal=two*min(abs(diff1real),abs(diff0real))
+         boundimag=two*min(abs(diff1imag),abs(diff0imag))
+         if (diff0real*diff1real.gt.zero) then
+            slopereal=sign(min(abs(coef2real),boundreal),coef2real)
+     &                /dxc(0)
+         else
+            slopereal=zero
+         endif
+         if (diff0imag*diff1imag.gt.zero) then
+            slopeimag=sign(min(abs(coef2imag),boundimag),coef2imag) 
+     &                /dxc(0)
+         else
+            slopeimag=zero
+         endif
+         slope0(ic0) = slopereal + cmplx(zero,one)*slopeimag
+      enddo
+
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         ir0=if0-ic0*ratio(0)
+         arrayf(if0)=arrayc(ic0)+slope0(ic0)*deltax(ir0,0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d edge-centered double data
+c***********************************************************************
+c
+      subroutine cartclinrefedgedoub1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxc(0:1-1),
+     &  dxf(0:1-1),
+     &  deltax(0:15,0:1-1)
+      double precision
+     &  arrayc(cilo0:cihi0),
+     &  arrayf(filo0:fihi0),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0)
+      integer ic0,ie0,if0,ir0
+      double precision
+     &  coef2,bound
+c
+c***********************************************************************
+c
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie0)
+     &               -arrayc(ie0-1)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic0)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic0)=zero
+         endif
+      enddo
+
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         ir0=if0-ic0*ratio(0)
+         arrayf(if0)=arrayc(ic0)+slope0(ic0)*deltax(ir0,0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d edge-centered float data
+c***********************************************************************
+c
+      subroutine cartclinrefedgeflot1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxc(0:1-1),
+     &  dxf(0:1-1),
+     &  deltax(0:15,0:1-1)
+      real
+     &  arrayc(cilo0:cihi0),
+     &  arrayf(filo0:fihi0),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0)
+      integer ic0,ie0,if0,ir0
+      real
+     &  coef2,bound
+c
+c***********************************************************************
+c
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie0)
+     &               -arrayc(ie0-1)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic0)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic0)=zero
+         endif
+      enddo
+
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         ir0=if0-ic0*ratio(0)
+         arrayf(if0)=arrayc(ic0)+slope0(ic0)*deltax(ir0,0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d face-centered double data
+c***********************************************************************
+c
+      subroutine cartclinreffacedoub1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxc(0:1-1),
+     &  dxf(0:1-1),
+     &  deltax(0:15,0:1-1)
+      double precision
+     &  arrayc(cilo0:cihi0+1),
+     &  arrayf(filo0:fihi0+1),
+     &  diff0(cilo0:cihi0),
+     &  slope0(cilo0:cihi0+1)
+      integer ic0,ie0,if0,ir0
+      double precision
+     &  coef2,bound
+c
+c***********************************************************************
+c
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=dble(ir0)*dxf(0)
+      enddo
+
+      do ic0=ifirstc0-1,ilastc0+1
+         diff0(ic0)=arrayc(ic0+1)
+     &                -arrayc(ic0)
+      enddo
+      do ie0=ifirstc0,ilastc0+1
+         coef2=half*(diff0(ie0-1)+diff0(ie0))
+         bound=two*min(abs(diff0(ie0-1)),abs(diff0(ie0)))
+         if (diff0(ie0)*diff0(ie0-1).gt.zero) then
+           slope0(ie0)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(0) 
+         else
+            slope0(ie0)=zero
+         endif
+      enddo
+
+      do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         ir0=if0-ic0*ratio(0)
+         arrayf(if0)=arrayc(ic0)+slope0(ic0)*deltax(ir0,0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d face-centered float data
+c***********************************************************************
+c
+      subroutine cartclinreffaceflot1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxc(0:1-1),
+     &  dxf(0:1-1),
+     &  deltax(0:15,0:1-1)
+      real
+     &  arrayc(cilo0:cihi0+1),
+     &  arrayf(filo0:fihi0+1),
+     &  diff0(cilo0:cihi0),
+     &  slope0(cilo0:cihi0+1)
+      integer ic0,ie0,if0,ir0
+      real
+     &  coef2,bound
+c
+c***********************************************************************
+c
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=dble(ir0)*dxf(0)
+      enddo
+
+      do ic0=ifirstc0-1,ilastc0+1
+         diff0(ic0)=arrayc(ic0+1)
+     &                -arrayc(ic0)
+      enddo
+      do ie0=ifirstc0,ilastc0+1
+         coef2=half*(diff0(ie0-1)+diff0(ie0))
+         bound=two*min(abs(diff0(ie0-1)),abs(diff0(ie0)))
+         if (diff0(ie0)*diff0(ie0-1).gt.zero) then
+           slope0(ie0)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(0) 
+         else
+            slope0(ie0)=zero
+         endif
+      enddo
+
+      do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         ir0=if0-ic0*ratio(0)
+         arrayf(if0)=arrayc(ic0)+slope0(ic0)*deltax(ir0,0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d face-centered complex data
+c***********************************************************************
+c
+c      subroutine cartclinreffacecplx1d(
+ccart_clinref_op_face_1d(double complex)c
+c***********************************************************************
+c Linear interpolation for 1d node-centered double data
+c***********************************************************************
+c
+       subroutine cartlinrefnodedoub1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxc(0:1-1),
+     &  dxf(0:1-1)
+      double precision
+     &  arrayc(cilo0:cihi0+1),
+     &  arrayf(filo0:fihi0+1)
+      double precision realrat,x
+      integer i,ic0,if0,ie0,ir0
+c
+c***********************************************************************
+c
+      realrat=one/dble(ratio(0))
+
+      do ic0=ifirstc0,ilastc0
+         if0=ic0*ratio(0)
+         if (if0.ge.filo0.and.if0.le.fihi0+1) then 
+            do ir0=0,ratio(0)-1
+               ie0=if0+ir0
+               x = dble(ir0)*realrat
+               if (ie0.ge.filo0.and.ie0.le.fihi0+1) then
+                  arrayf(ie0) = arrayc(ic0)*(one-x)
+     &                              + arrayc(ic0+1)*x
+               endif
+            enddo
+         endif
+      enddo
+c
+      ic0 = ilastc0+1
+      if0 = ic0*ratio(0)
+      if (if0.ge.filo0.and.if0.le.fihi0+1) then
+         arrayf(if0) = arrayc(ic0)
+      endif
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear interpolation for 1d node-centered float data
+c***********************************************************************
+c
+       subroutine cartlinrefnodeflot1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxc(0:1-1),
+     &  dxf(0:1-1)
+      real
+     &  arrayc(cilo0:cihi0+1),
+     &  arrayf(filo0:fihi0+1)
+      double precision realrat,x
+      integer i,ic0,if0,ie0,ir0
+c
+c***********************************************************************
+c
+      realrat=one/dble(ratio(0))
+
+      do ic0=ifirstc0,ilastc0
+         if0=ic0*ratio(0)
+         if (if0.ge.filo0.and.if0.le.fihi0+1) then 
+            do ir0=0,ratio(0)-1
+               ie0=if0+ir0
+               x = dble(ir0)*realrat
+               if (ie0.ge.filo0.and.ie0.le.fihi0+1) then
+                  arrayf(ie0) = arrayc(ic0)*(one-x)
+     &                              + arrayc(ic0+1)*x
+               endif
+            enddo
+         endif
+      enddo
+c
+      ic0 = ilastc0+1
+      if0 = ic0*ratio(0)
+      if (if0.ge.filo0.and.if0.le.fihi0+1) then
+         arrayf(if0) = arrayc(ic0)
+      endif
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear interpolation for 1d node-centered complex data
+c***********************************************************************
+c
+       subroutine cartlinrefnodecplx1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxc(0:1-1),
+     &  dxf(0:1-1)
+      double complex
+     &  arrayc(cilo0:cihi0+1),
+     &  arrayf(filo0:fihi0+1)
+      double precision realrat,x
+      integer i,ic0,if0,ie0,ir0
+c
+c***********************************************************************
+c
+      realrat=one/dble(ratio(0))
+
+      do ic0=ifirstc0,ilastc0
+         if0=ic0*ratio(0)
+         if (if0.ge.filo0.and.if0.le.fihi0+1) then 
+            do ir0=0,ratio(0)-1
+               ie0=if0+ir0
+               x = dble(ir0)*realrat
+               if (ie0.ge.filo0.and.ie0.le.fihi0+1) then
+                  arrayf(ie0) = arrayc(ic0)*(one-x)
+     &                              + arrayc(ic0+1)*x
+               endif
+            enddo
+         endif
+      enddo
+c
+      ic0 = ilastc0+1
+      if0 = ic0*ratio(0)
+      if (if0.ge.filo0.and.if0.le.fihi0+1) then
+         arrayf(if0) = arrayc(ic0)
+      endif
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d outerface double data
+c***********************************************************************
+c
+      subroutine cartclinrefoutfacedoub1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxc(0:1-1),
+     &  dxf(0:1-1)
+      double precision
+     &  arrayc(1),
+     &  arrayf(1)
+c
+c***********************************************************************
+c
+      arrayf(1)=arrayc(1)
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d outerface float data
+c***********************************************************************
+c
+      subroutine cartclinrefoutfaceflot1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxc(0:1-1),
+     &  dxf(0:1-1),
+     &  deltax(0:15,0:1-1)
+      real
+     &  arrayc(cilo0:cihi0+1),
+     &  arrayf(filo0:fihi0+1),
+     &  diff0(cilo0:cihi0),
+     &  slope0(cilo0:cihi0+1)
+      integer ic0,ie0,if0,ir0
+      real
+     &  coef2,bound
+c
+c***********************************************************************
+c
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=dble(ir0)*dxf(0)
+      enddo
+
+      do ic0=ifirstc0-1,ilastc0+1
+         diff0(ic0)=arrayc(ic0+1)
+     &                -arrayc(ic0)
+      enddo
+      do ie0=ifirstc0,ilastc0+1
+         coef2=half*(diff0(ie0-1)+diff0(ie0))
+         bound=two*min(abs(diff0(ie0-1)),abs(diff0(ie0)))
+         if (diff0(ie0)*diff0(ie0-1).gt.zero) then
+           slope0(ie0)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(0) 
+         else
+            slope0(ie0)=zero
+         endif
+      enddo
+
+      do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         ir0=if0-ic0*ratio(0)
+         arrayf(if0)=arrayc(ic0)+slope0(ic0)*deltax(ir0,0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d outerface complex data
+c***********************************************************************
+c
+c      subroutine cartclinrefoutfacecplx1d(
+ccart_clinref_op_face_1d(double complex)c
+c***********************************************************************
+c Conservative linear interpolation for 1d side-centered double data
+c***********************************************************************
+c
+      subroutine cartclinrefsidedoub1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxc(0:1-1),
+     &  dxf(0:1-1),
+     &  deltax(0:15,0:1-1)
+      double precision
+     &  arrayc(cilo0:cihi0+1),
+     &  arrayf(filo0:fihi0+1),
+     &  diff0(cilo0:cihi0),
+     &  slope0(cilo0:cihi0+1)
+      integer ic0,ie0,if0,ir0
+      double precision
+     &  coef2,bound
+c
+c***********************************************************************
+c
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=dble(ir0)*dxf(0)
+      enddo
+
+      do ic0=ifirstc0-1,ilastc0+1
+         diff0(ic0)=arrayc(ic0+1)
+     &                -arrayc(ic0)
+      enddo
+      do ie0=ifirstc0,ilastc0+1
+         coef2=half*(diff0(ie0-1)+diff0(ie0))
+         bound=two*min(abs(diff0(ie0-1)),abs(diff0(ie0)))
+         if (diff0(ie0)*diff0(ie0-1).gt.zero) then
+           slope0(ie0)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(0) 
+         else
+            slope0(ie0)=zero
+         endif
+      enddo
+
+      do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         ir0=if0-ic0*ratio(0)
+         arrayf(if0)=arrayc(ic0)+slope0(ic0)*deltax(ir0,0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d side-centered float data
+c***********************************************************************
+c
+      subroutine cartclinrefsideflot1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double precision
+     &  dxc(0:1-1),
+     &  dxf(0:1-1),
+     &  deltax(0:15,0:1-1)
+      real
+     &  arrayc(cilo0:cihi0+1),
+     &  arrayf(filo0:fihi0+1),
+     &  diff0(cilo0:cihi0),
+     &  slope0(cilo0:cihi0+1)
+      integer ic0,ie0,if0,ir0
+      real
+     &  coef2,bound
+c
+c***********************************************************************
+c
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=dble(ir0)*dxf(0)
+      enddo
+
+      do ic0=ifirstc0-1,ilastc0+1
+         diff0(ic0)=arrayc(ic0+1)
+     &                -arrayc(ic0)
+      enddo
+      do ie0=ifirstc0,ilastc0+1
+         coef2=half*(diff0(ie0-1)+diff0(ie0))
+         bound=two*min(abs(diff0(ie0-1)),abs(diff0(ie0)))
+         if (diff0(ie0)*diff0(ie0-1).gt.zero) then
+           slope0(ie0)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(0) 
+         else
+            slope0(ie0)=zero
+         endif
+      enddo
+
+      do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         ir0=if0-ic0*ratio(0)
+         arrayf(if0)=arrayc(ic0)+slope0(ic0)*deltax(ir0,0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d side-centered complex data
+c***********************************************************************
+c
+c      subroutine cartclinrefsidecplx1d(
+ccart_clinref_op_side_1d(double complex)c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/fortran/geom_cartrefine1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/fortran/geom_cartrefine1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,151 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_cartrefine1d.m4 $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for spatial refining of 1d patch data
+c               on a regular Cartesian mesh.
+c
+include(geom_m4cartrefineops1d.i)dnl
+c
+c***********************************************************************
+c Linear interpolation for 1d cell-centered double data
+c***********************************************************************
+c
+      subroutine cartlinrefcelldoub1d(
+cart_linref_op_cell_1d(`double precision')dnl
+c
+c***********************************************************************
+c Linear interpolation for 1d cell-centered float data
+c***********************************************************************
+c
+      subroutine cartlinrefcellflot1d(
+cart_linref_op_cell_1d(`real')dnl
+c
+c***********************************************************************
+c Linear interpolation for 1d cell-centered complex data
+c***********************************************************************
+c
+      subroutine cartlinrefcellcplx1d(
+cart_linref_op_cell_1d(`double complex')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d cell-centered double data
+c***********************************************************************
+c
+      subroutine cartclinrefcelldoub1d(
+cart_clinref_op_cell_1d(`double precision')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d cell-centered float data
+c***********************************************************************
+c
+      subroutine cartclinrefcellflot1d(
+cart_clinref_op_cell_1d(`real')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d cell-centered complex data
+c***********************************************************************
+c
+      subroutine cartclinrefcellcplx1d(
+cart_clinref_op_cell_1d(`double complex')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d edge-centered double data
+c***********************************************************************
+c
+      subroutine cartclinrefedgedoub1d(
+cart_clinref_op_edge_1d(`double precision')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d edge-centered float data
+c***********************************************************************
+c
+      subroutine cartclinrefedgeflot1d(
+cart_clinref_op_edge_1d(`real')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d face-centered double data
+c***********************************************************************
+c
+      subroutine cartclinreffacedoub1d(
+cart_clinref_op_face_1d(`double precision')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d face-centered float data
+c***********************************************************************
+c
+      subroutine cartclinreffaceflot1d(
+cart_clinref_op_face_1d(`real')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d face-centered complex data
+c***********************************************************************
+c
+c      subroutine cartclinreffacecplx1d(
+ccart_clinref_op_face_1d(`double complex')dnl
+c
+c***********************************************************************
+c Linear interpolation for 1d node-centered double data
+c***********************************************************************
+c
+       subroutine cartlinrefnodedoub1d(
+cart_linref_op_node_1d(`double precision')dnl
+c
+c***********************************************************************
+c Linear interpolation for 1d node-centered float data
+c***********************************************************************
+c
+       subroutine cartlinrefnodeflot1d(
+cart_linref_op_node_1d(`real')dnl
+c
+c***********************************************************************
+c Linear interpolation for 1d node-centered complex data
+c***********************************************************************
+c
+       subroutine cartlinrefnodecplx1d(
+cart_linref_op_node_1d(`double complex')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d outerface double data
+c***********************************************************************
+c
+      subroutine cartclinrefoutfacedoub1d(
+cart_clinref_op_outerface_1d(`double precision')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d outerface float data
+c***********************************************************************
+c
+      subroutine cartclinrefoutfaceflot1d(
+cart_clinref_op_face_1d(`real')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d outerface complex data
+c***********************************************************************
+c
+c      subroutine cartclinrefoutfacecplx1d(
+ccart_clinref_op_face_1d(`double complex')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d side-centered double data
+c***********************************************************************
+c
+      subroutine cartclinrefsidedoub1d(
+cart_clinref_op_side_1d(`double precision')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d side-centered float data
+c***********************************************************************
+c
+      subroutine cartclinrefsideflot1d(
+cart_clinref_op_side_1d(`real')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 1d side-centered complex data
+c***********************************************************************
+c
+c      subroutine cartclinrefsidecplx1d(
+ccart_clinref_op_side_1d(`double complex')dnl
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/fortran/geom_cartrefine2d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/fortran/geom_cartrefine2d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,2565 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_cartrefine2d.m4 $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for spatial refining of 2d patch data
+c               on a regular Cartesian mesh.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_m4cartrefineops2d.i $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 2d Cartesian refine operators
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim2d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 2d arrays in FORTRAN routines.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_m4cartopstuff.i $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for cartesian geometry transfer routines.
+c
+
+
+
+
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c***********************************************************************
+c Linear interpolation for 2d cell-centered double data
+c***********************************************************************
+c
+      subroutine cartlinrefcelldoub2d(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxc(0:2-1),
+     &  dxf(0:2-1)
+      double precision
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1)
+      double precision deltax(0:15,0:2-1),x,y
+      integer ic0,ic1,if0,if1,ir0,ir1
+c
+c***********************************************************************
+c
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         ir1=if1-ic1*ratio(1)
+         y=deltax(ir1,1)/dxc(1)
+         if( y .lt. 0.d0 ) then
+            ic1 = ic1-1
+            y = y + one
+         endif
+         do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            ir0=if0-ic0*ratio(0)
+            x=deltax(ir0,0)/dxc(0)
+            if( x .lt. 0.d0 ) then
+               ic0 = ic0-1
+               x = x + one
+            endif
+            arrayf(if0,if1)=
+     &      (arrayc(ic0,ic1)+(arrayc(ic0+1,ic1)-arrayc(ic0,ic1))*x)
+     &        *(one-y)
+     &      +(arrayc(ic0,ic1+1)
+     &        +(arrayc(ic0+1,ic1+1)-arrayc(ic0,ic1+1))*x)*y
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear interpolation for 2d cell-centered float data
+c***********************************************************************
+c
+      subroutine cartlinrefcellflot2d(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxc(0:2-1),
+     &  dxf(0:2-1)
+      real
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1)
+      double precision deltax(0:15,0:2-1),x,y
+      integer ic0,ic1,if0,if1,ir0,ir1
+c
+c***********************************************************************
+c
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         ir1=if1-ic1*ratio(1)
+         y=deltax(ir1,1)/dxc(1)
+         if( y .lt. 0.d0 ) then
+            ic1 = ic1-1
+            y = y + one
+         endif
+         do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            ir0=if0-ic0*ratio(0)
+            x=deltax(ir0,0)/dxc(0)
+            if( x .lt. 0.d0 ) then
+               ic0 = ic0-1
+               x = x + one
+            endif
+            arrayf(if0,if1)=
+     &      (arrayc(ic0,ic1)+(arrayc(ic0+1,ic1)-arrayc(ic0,ic1))*x)
+     &        *(one-y)
+     &      +(arrayc(ic0,ic1+1)
+     &        +(arrayc(ic0+1,ic1+1)-arrayc(ic0,ic1+1))*x)*y
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear interpolation for 2d cell-centered complex data
+c***********************************************************************
+c
+      subroutine cartlinrefcellcplx2d(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxc(0:2-1),
+     &  dxf(0:2-1)
+      double complex
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1)
+      double precision deltax(0:15,0:2-1),x,y
+      integer ic0,ic1,if0,if1,ir0,ir1
+c
+c***********************************************************************
+c
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         ir1=if1-ic1*ratio(1)
+         y=deltax(ir1,1)/dxc(1)
+         if( y .lt. 0.d0 ) then
+            ic1 = ic1-1
+            y = y + one
+         endif
+         do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            ir0=if0-ic0*ratio(0)
+            x=deltax(ir0,0)/dxc(0)
+            if( x .lt. 0.d0 ) then
+               ic0 = ic0-1
+               x = x + one
+            endif
+            arrayf(if0,if1)=
+     &      (arrayc(ic0,ic1)+(arrayc(ic0+1,ic1)-arrayc(ic0,ic1))*x)
+     &        *(one-y)
+     &      +(arrayc(ic0,ic1+1)
+     &        +(arrayc(ic0+1,ic1+1)-arrayc(ic0,ic1+1))*x)*y
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d cell-centered double data
+c***********************************************************************
+c
+      subroutine cartclinrefcelldoub2d(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0,diff1,slope1)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxc(0:2-1),
+     &  dxf(0:2-1),
+     &  deltax(0:15,0:2-1)
+      double precision
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0,
+     &          cilo1:cihi1)
+      integer ic0,ic1,ie0,ie1,if0,if1,ir0,ir1
+      double precision
+     &  coef2,bound
+      double precision deltax1
+c
+c***********************************************************************
+c
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie0,ic1)
+     &               -arrayc(ie0-1,ic1)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic0,ic1)=zero
+         endif
+      enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ic0,ie1)
+     &               -arrayc(ic0,ie1-1)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         coef2=half*(diff1(ic1+1)+diff1(ic1))
+         bound=two*min(abs(diff1(ic1+1)),abs(diff1(ic1)))
+         if (diff1(ic1)*diff1(ic1+1).gt.zero) then
+            slope1(ic0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(1)
+         else
+            slope1(ic0,ic1)=zero
+         endif
+      enddo
+      enddo
+
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         ir1=if1-ic1*ratio(1)
+         deltax1=deltax(ir1,1)
+         do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            ir0=if0-ic0*ratio(0)
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+     &                      +slope0(ic0,ic1)*deltax(ir0,0)
+     &                      +slope1(ic0,ic1)*deltax1
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d cell-centered float data
+c***********************************************************************
+c
+      subroutine cartclinrefcellflot2d(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0,diff1,slope1)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxc(0:2-1),
+     &  dxf(0:2-1),
+     &  deltax(0:15,0:2-1)
+      real
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0,
+     &          cilo1:cihi1)
+      integer ic0,ic1,ie0,ie1,if0,if1,ir0,ir1
+      real
+     &  coef2,bound
+      double precision deltax1
+c
+c***********************************************************************
+c
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie0,ic1)
+     &               -arrayc(ie0-1,ic1)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic0,ic1)=zero
+         endif
+      enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ic0,ie1)
+     &               -arrayc(ic0,ie1-1)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         coef2=half*(diff1(ic1+1)+diff1(ic1))
+         bound=two*min(abs(diff1(ic1+1)),abs(diff1(ic1)))
+         if (diff1(ic1)*diff1(ic1+1).gt.zero) then
+            slope1(ic0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(1)
+         else
+            slope1(ic0,ic1)=zero
+         endif
+      enddo
+      enddo
+
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         ir1=if1-ic1*ratio(1)
+         deltax1=deltax(ir1,1)
+         do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            ir0=if0-ic0*ratio(0)
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+     &                      +slope0(ic0,ic1)*deltax(ir0,0)
+     &                      +slope1(ic0,ic1)*deltax1
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d cell-centered complex data
+c***********************************************************************
+c
+      subroutine cartclinrefcellcplx2d(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0,diff1,slope1)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxc(0:2-1),
+     &  dxf(0:2-1),
+     &  deltax(0:15,0:2-1)
+      double complex
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0,
+     &          cilo1:cihi1)
+      integer ic0,ic1,ie0,ie1,if0,if1,ir0,ir1
+      double precision
+     &  coef2real,coef2imag,boundreal,boundimag,
+     &  diff0real,diff0imag,diff1real,diff1imag,
+     &  slopereal,slopeimag
+      double precision deltax1
+c
+c***********************************************************************
+c
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie0,ic1)
+     &               -arrayc(ie0-1,ic1)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         diff0real=dble(diff0(ic0))
+         diff0imag=imag(diff0(ic0))
+         diff1real=dble(diff0(ic0+1))
+         diff1imag=imag(diff0(ic0+1))
+         coef2real=half*(diff0real+diff1real)
+         coef2imag=half*(diff0imag+diff1imag)
+         boundreal=two*min(abs(diff1real),abs(diff0real))
+         boundimag=two*min(abs(diff1imag),abs(diff0imag))
+         if (diff0real*diff1real.gt.zero) then
+            slopereal=sign(min(abs(coef2real),boundreal),coef2real)
+     &                /dxc(0)
+         else
+            slopereal=zero
+         endif
+         if (diff0imag*diff1imag.gt.zero) then
+            slopeimag=sign(min(abs(coef2imag),boundimag),coef2imag) 
+     &                /dxc(0)
+         else
+            slopeimag=zero
+         endif
+         slope0(ic0,ic1) = slopereal + cmplx(zero,one)*slopeimag
+      enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ic0,ie1)
+     &               -arrayc(ic0,ie1-1)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         diff0real=dble(diff1(ic1))
+         diff0imag=imag(diff1(ic1))
+         diff1real=dble(diff1(ic1+1))
+         diff1imag=imag(diff1(ic1+1))
+         coef2real=half*(diff0real+diff1real)
+         coef2imag=half*(diff0imag+diff1imag)
+         boundreal=two*min(abs(diff1real),abs(diff0real))
+         boundimag=two*min(abs(diff1imag),abs(diff0imag))
+         if (diff0real*diff1real.gt.zero) then
+            slopereal=sign(min(abs(coef2real),boundreal),coef2real)
+     &                /dxc(1)
+         else
+            slopereal=zero
+         endif
+         if (diff0imag*diff1imag.gt.zero) then
+            slopeimag=sign(min(abs(coef2imag),boundimag),coef2imag) 
+     &                /dxc(1)
+         else
+            slopeimag=zero
+         endif
+         slope1(ic0,ic1) = slopereal + cmplx(zero,one)*slopeimag
+      enddo
+      enddo
+
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         ir1=if1-ic1*ratio(1)
+         deltax1=deltax(ir1,1)
+         do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            ir0=if0-ic0*ratio(0)
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+     &                      +slope0(ic0,ic1)*deltax(ir0,0)
+     &                      +slope1(ic0,ic1)*deltax1
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d edge-centered double data
+c***********************************************************************
+c
+      subroutine cartclinrefedgedoub2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0,diff1,slope1)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxc(0:2-1),
+     &  dxf(0:2-1),
+     &  deltax(0:15,0:2-1)
+      double precision
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0,
+     &          cilo1:cihi1+1),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0,
+     &          cilo1:cihi1+1)
+      integer ic0,ic1,ie0,ie1,if0,if1,ir0,ir1
+      double precision
+     &  coef2,bound
+      double precision deltax1
+c
+c***********************************************************************
+c
+
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=dble(ir1)*dxf(1)
+      enddo
+
+      do ic1=ifirstc1,ilastc1+1
+
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie0,ic1)
+     &               -arrayc(ie0-1,ic1)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic0,ic1)=zero
+         endif
+      enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0+0
+
+      do ic1=ifirstc1-1,ilastc1+1
+         diff1(ic1)=arrayc(ic0,ic1+1)
+     &                -arrayc(ic0,ic1)
+      enddo
+      do ie1=ifirstc1,ilastc1+1
+         coef2=half*(diff1(ie1-1)+diff1(ie1))
+         bound=two*min(abs(diff1(ie1-1)),abs(diff1(ie1)))
+         if (diff1(ie1)*diff1(ie1-1).gt.zero) then
+           slope1(ic0,ie1)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(1) 
+         else
+            slope1(ic0,ie1)=zero
+         endif
+      enddo
+      enddo
+
+      do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         ir1=if1-ic1*ratio(1)
+         deltax1=deltax(ir1,1)
+         do if0=ifirstf0,ilastf0+0
+         if (if0.lt.0) then
+            ie0=(if0+1)/ratio(0)-1
+         else
+            ie0=if0/ratio(0)
+         endif
+            ir0=if0-ie0*ratio(0)
+            arrayf(if0,if1)=arrayc(ie0,ic1)
+     &                +slope0(ie0,ic1)*deltax(ir0,0)
+     &                +slope1(ie0,ic1)*deltax1
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartclinrefedgedoub2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff1,slope1,diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxc(0:2-1),
+     &  dxf(0:2-1),
+     &  deltax(0:15,0:2-1)
+      double precision
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0+1,
+     &          cilo1:cihi1),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0+1,
+     &          cilo1:cihi1)
+      integer ic0,ic1,ie0,ie1,if0,if1,ir0,ir1
+      double precision
+     &  coef2,bound
+      double precision deltax1
+c
+c***********************************************************************
+c
+
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=dble(ir0)*dxf(0)
+      enddo
+
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do ic1=ifirstc1,ilastc1+0
+
+      do ic0=ifirstc0-1,ilastc0+1
+         diff0(ic0)=arrayc(ic0+1,ic1)
+     &                -arrayc(ic0,ic1)
+      enddo
+      do ie0=ifirstc0,ilastc0+1
+         coef2=half*(diff0(ie0-1)+diff0(ie0))
+         bound=two*min(abs(diff0(ie0-1)),abs(diff0(ie0)))
+         if (diff0(ie0)*diff0(ie0-1).gt.zero) then
+           slope0(ie0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(0) 
+         else
+            slope0(ie0,ic1)=zero
+         endif
+      enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0+1
+
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ic0,ie1)
+     &               -arrayc(ic0,ie1-1)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         coef2=half*(diff1(ic1+1)+diff1(ic1))
+         bound=two*min(abs(diff1(ic1+1)),abs(diff1(ic1)))
+         if (diff1(ic1)*diff1(ic1+1).gt.zero) then
+            slope1(ic0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(1)
+         else
+            slope1(ic0,ic1)=zero
+         endif
+      enddo
+      enddo
+
+      do if1=ifirstf1,ilastf1+0
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         ir1=if1-ic1*ratio(1)
+         deltax1=deltax(ir1,1)
+         do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ie0=(if0+1)/ratio(0)-1
+         else
+            ie0=if0/ratio(0)
+         endif
+            ir0=if0-ie0*ratio(0)
+            arrayf(if0,if1)=arrayc(ie0,ic1)
+     &                +slope0(ie0,ic1)*deltax(ir0,0)
+     &                +slope1(ie0,ic1)*deltax1
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d edge-centered float data
+c***********************************************************************
+c
+      subroutine cartclinrefedgeflot2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0,diff1,slope1)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxc(0:2-1),
+     &  dxf(0:2-1),
+     &  deltax(0:15,0:2-1)
+      real
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0,
+     &          cilo1:cihi1+1),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0,
+     &          cilo1:cihi1+1)
+      integer ic0,ic1,ie0,ie1,if0,if1,ir0,ir1
+      real
+     &  coef2,bound
+      double precision deltax1
+c
+c***********************************************************************
+c
+
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=dble(ir1)*dxf(1)
+      enddo
+
+      do ic1=ifirstc1,ilastc1+1
+
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie0,ic1)
+     &               -arrayc(ie0-1,ic1)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic0,ic1)=zero
+         endif
+      enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0+0
+
+      do ic1=ifirstc1-1,ilastc1+1
+         diff1(ic1)=arrayc(ic0,ic1+1)
+     &                -arrayc(ic0,ic1)
+      enddo
+      do ie1=ifirstc1,ilastc1+1
+         coef2=half*(diff1(ie1-1)+diff1(ie1))
+         bound=two*min(abs(diff1(ie1-1)),abs(diff1(ie1)))
+         if (diff1(ie1)*diff1(ie1-1).gt.zero) then
+           slope1(ic0,ie1)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(1) 
+         else
+            slope1(ic0,ie1)=zero
+         endif
+      enddo
+      enddo
+
+      do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         ir1=if1-ic1*ratio(1)
+         deltax1=deltax(ir1,1)
+         do if0=ifirstf0,ilastf0+0
+         if (if0.lt.0) then
+            ie0=(if0+1)/ratio(0)-1
+         else
+            ie0=if0/ratio(0)
+         endif
+            ir0=if0-ie0*ratio(0)
+            arrayf(if0,if1)=arrayc(ie0,ic1)
+     &                +slope0(ie0,ic1)*deltax(ir0,0)
+     &                +slope1(ie0,ic1)*deltax1
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartclinrefedgeflot2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff1,slope1,diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxc(0:2-1),
+     &  dxf(0:2-1),
+     &  deltax(0:15,0:2-1)
+      real
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0+1,
+     &          cilo1:cihi1),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0+1,
+     &          cilo1:cihi1)
+      integer ic0,ic1,ie0,ie1,if0,if1,ir0,ir1
+      real
+     &  coef2,bound
+      double precision deltax1
+c
+c***********************************************************************
+c
+
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=dble(ir0)*dxf(0)
+      enddo
+
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do ic1=ifirstc1,ilastc1+0
+
+      do ic0=ifirstc0-1,ilastc0+1
+         diff0(ic0)=arrayc(ic0+1,ic1)
+     &                -arrayc(ic0,ic1)
+      enddo
+      do ie0=ifirstc0,ilastc0+1
+         coef2=half*(diff0(ie0-1)+diff0(ie0))
+         bound=two*min(abs(diff0(ie0-1)),abs(diff0(ie0)))
+         if (diff0(ie0)*diff0(ie0-1).gt.zero) then
+           slope0(ie0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(0) 
+         else
+            slope0(ie0,ic1)=zero
+         endif
+      enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0+1
+
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ic0,ie1)
+     &               -arrayc(ic0,ie1-1)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         coef2=half*(diff1(ic1+1)+diff1(ic1))
+         bound=two*min(abs(diff1(ic1+1)),abs(diff1(ic1)))
+         if (diff1(ic1)*diff1(ic1+1).gt.zero) then
+            slope1(ic0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(1)
+         else
+            slope1(ic0,ic1)=zero
+         endif
+      enddo
+      enddo
+
+      do if1=ifirstf1,ilastf1+0
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         ir1=if1-ic1*ratio(1)
+         deltax1=deltax(ir1,1)
+         do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ie0=(if0+1)/ratio(0)-1
+         else
+            ie0=if0/ratio(0)
+         endif
+            ir0=if0-ie0*ratio(0)
+            arrayf(if0,if1)=arrayc(ie0,ic1)
+     &                +slope0(ie0,ic1)*deltax(ir0,0)
+     &                +slope1(ie0,ic1)*deltax1
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d face-centered double data
+c***********************************************************************
+c
+      subroutine cartclinreffacedoub2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0,diff1,slope1)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxc(0:2-1),
+     &  dxf(0:2-1),
+     &  deltax(0:15,0:2-1)
+      double precision
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0+1,
+     &          cilo1:cihi1),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0+1,
+     &          cilo1:cihi1)
+      integer ic0,ic1,ie0,ie1,if0,if1,ir0,ir1
+      double precision
+     &  coef2,bound
+      double precision deltax1
+c
+c***********************************************************************
+c
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=dble(ir0)*dxf(0)
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+      do ic0=ifirstc0-1,ilastc0+1
+         diff0(ic0)=arrayc(ic0+1,ic1)
+     &                -arrayc(ic0,ic1)
+      enddo
+      do ie0=ifirstc0,ilastc0+1
+         coef2=half*(diff0(ie0-1)+diff0(ie0))
+         bound=two*min(abs(diff0(ie0-1)),abs(diff0(ie0)))
+         if (diff0(ie0)*diff0(ie0-1).gt.zero) then
+           slope0(ie0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(0) 
+         else
+            slope0(ie0,ic1)=zero
+         endif
+      enddo
+      enddo
+
+      do ie0=ifirstc0,ilastc0+1
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ie0,ie1)
+     &               -arrayc(ie0,ie1-1)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         coef2=half*(diff1(ic1+1)+diff1(ic1))
+         bound=two*min(abs(diff1(ic1+1)),abs(diff1(ic1)))
+         if (diff1(ic1)*diff1(ic1+1).gt.zero) then
+            slope1(ie0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(1)
+         else
+            slope1(ie0,ic1)=zero
+         endif
+      enddo
+      enddo
+
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         ir1=if1-ic1*ratio(1)
+         deltax1=deltax(ir1,1)
+         do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ie0=(if0+1)/ratio(0)-1
+         else
+            ie0=if0/ratio(0)
+         endif
+            ir0=if0-ie0*ratio(0)
+            arrayf(if0,if1)=arrayc(ie0,ic1)
+     &                +slope0(ie0,ic1)*deltax(ir0,0)
+     &                +slope1(ie0,ic1)*deltax1
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartclinreffacedoub2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff1,slope1,diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxc(0:2-1),
+     &  dxf(0:2-1),
+     &  deltax(0:15,0:2-1)
+      double precision
+     &  arrayc(cilo1:cihi1+1,
+     &          cilo0:cihi0),
+     &  arrayf(filo1:fihi1+1,
+     &          filo0:fihi0),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo1:cihi1+1,
+     &          cilo0:cihi0),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo1:cihi1+1,
+     &          cilo0:cihi0)
+      integer ic1,ic0,ie1,ie0,if1,if0,ir1,ir0
+      double precision
+     &  coef2,bound
+      double precision deltax0
+c
+c***********************************************************************
+c
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=dble(ir1)*dxf(1)
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+      do ic1=ifirstc1-1,ilastc1+1
+         diff1(ic1)=arrayc(ic1+1,ic0)
+     &                -arrayc(ic1,ic0)
+      enddo
+      do ie1=ifirstc1,ilastc1+1
+         coef2=half*(diff1(ie1-1)+diff1(ie1))
+         bound=two*min(abs(diff1(ie1-1)),abs(diff1(ie1)))
+         if (diff1(ie1)*diff1(ie1-1).gt.zero) then
+           slope1(ie1,ic0)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(1) 
+         else
+            slope1(ie1,ic0)=zero
+         endif
+      enddo
+      enddo
+
+      do ie1=ifirstc1,ilastc1+1
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie1,ie0)
+     &               -arrayc(ie1,ie0-1)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ie1,ic0)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ie1,ic0)=zero
+         endif
+      enddo
+      enddo
+
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         ir0=if0-ic0*ratio(0)
+         deltax0=deltax(ir0,0)
+         do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ie1=(if1+1)/ratio(1)-1
+         else
+            ie1=if1/ratio(1)
+         endif
+            ir1=if1-ie1*ratio(1)
+            arrayf(if1,if0)=arrayc(ie1,ic0)
+     &                +slope1(ie1,ic0)*deltax(ir1,1)
+     &                +slope0(ie1,ic0)*deltax0
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d face-centered float data
+c***********************************************************************
+c
+      subroutine cartclinreffaceflot2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0,diff1,slope1)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxc(0:2-1),
+     &  dxf(0:2-1),
+     &  deltax(0:15,0:2-1)
+      real
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0+1,
+     &          cilo1:cihi1),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0+1,
+     &          cilo1:cihi1)
+      integer ic0,ic1,ie0,ie1,if0,if1,ir0,ir1
+      real
+     &  coef2,bound
+      double precision deltax1
+c
+c***********************************************************************
+c
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=dble(ir0)*dxf(0)
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+      do ic0=ifirstc0-1,ilastc0+1
+         diff0(ic0)=arrayc(ic0+1,ic1)
+     &                -arrayc(ic0,ic1)
+      enddo
+      do ie0=ifirstc0,ilastc0+1
+         coef2=half*(diff0(ie0-1)+diff0(ie0))
+         bound=two*min(abs(diff0(ie0-1)),abs(diff0(ie0)))
+         if (diff0(ie0)*diff0(ie0-1).gt.zero) then
+           slope0(ie0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(0) 
+         else
+            slope0(ie0,ic1)=zero
+         endif
+      enddo
+      enddo
+
+      do ie0=ifirstc0,ilastc0+1
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ie0,ie1)
+     &               -arrayc(ie0,ie1-1)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         coef2=half*(diff1(ic1+1)+diff1(ic1))
+         bound=two*min(abs(diff1(ic1+1)),abs(diff1(ic1)))
+         if (diff1(ic1)*diff1(ic1+1).gt.zero) then
+            slope1(ie0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(1)
+         else
+            slope1(ie0,ic1)=zero
+         endif
+      enddo
+      enddo
+
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         ir1=if1-ic1*ratio(1)
+         deltax1=deltax(ir1,1)
+         do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ie0=(if0+1)/ratio(0)-1
+         else
+            ie0=if0/ratio(0)
+         endif
+            ir0=if0-ie0*ratio(0)
+            arrayf(if0,if1)=arrayc(ie0,ic1)
+     &                +slope0(ie0,ic1)*deltax(ir0,0)
+     &                +slope1(ie0,ic1)*deltax1
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartclinreffaceflot2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff1,slope1,diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxc(0:2-1),
+     &  dxf(0:2-1),
+     &  deltax(0:15,0:2-1)
+      real
+     &  arrayc(cilo1:cihi1+1,
+     &          cilo0:cihi0),
+     &  arrayf(filo1:fihi1+1,
+     &          filo0:fihi0),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo1:cihi1+1,
+     &          cilo0:cihi0),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo1:cihi1+1,
+     &          cilo0:cihi0)
+      integer ic1,ic0,ie1,ie0,if1,if0,ir1,ir0
+      real
+     &  coef2,bound
+      double precision deltax0
+c
+c***********************************************************************
+c
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=dble(ir1)*dxf(1)
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+      do ic1=ifirstc1-1,ilastc1+1
+         diff1(ic1)=arrayc(ic1+1,ic0)
+     &                -arrayc(ic1,ic0)
+      enddo
+      do ie1=ifirstc1,ilastc1+1
+         coef2=half*(diff1(ie1-1)+diff1(ie1))
+         bound=two*min(abs(diff1(ie1-1)),abs(diff1(ie1)))
+         if (diff1(ie1)*diff1(ie1-1).gt.zero) then
+           slope1(ie1,ic0)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(1) 
+         else
+            slope1(ie1,ic0)=zero
+         endif
+      enddo
+      enddo
+
+      do ie1=ifirstc1,ilastc1+1
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie1,ie0)
+     &               -arrayc(ie1,ie0-1)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ie1,ic0)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ie1,ic0)=zero
+         endif
+      enddo
+      enddo
+
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         ir0=if0-ic0*ratio(0)
+         deltax0=deltax(ir0,0)
+         do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ie1=(if1+1)/ratio(1)-1
+         else
+            ie1=if1/ratio(1)
+         endif
+            ir1=if1-ie1*ratio(1)
+            arrayf(if1,if0)=arrayc(ie1,ic0)
+     &                +slope1(ie1,ic0)*deltax(ir1,1)
+     &                +slope0(ie1,ic0)*deltax0
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d face-centered complex data
+c***********************************************************************
+c
+c      subroutine cartclinreffacecplx2d0(
+ccart_clinref_op_face_2d(double complex,0,1)cc
+c      subroutine cartclinreffacecplx2d1(
+ccart_clinref_op_face_2d(double complex,1,0)c
+c***********************************************************************
+c Linear interpolation for 2d node-centered double data
+c***********************************************************************
+c
+       subroutine cartlinrefnodedoub2d(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxc(0:2-1),
+     &  dxf(0:2-1)
+      double precision
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1)
+      double precision x,y,realrat0,realrat1
+      integer ic0,ic1,if0,if1,ie0,ie1,ir0,ir1,i,j
+c
+c***********************************************************************
+c
+      realrat0=one/dble(ratio(0))
+      realrat1=one/dble(ratio(1))
+
+      do ic1=ifirstc1,ilastc1
+         if1=ic1*ratio(1)
+         do ir1=0,ratio(1)
+            ie1=if1+ir1
+            if ((ie1.ge.filo1).and.(ie1.le.(fihi1+1))) then
+      do ic0=ifirstc0,ilastc0
+         if0=ic0*ratio(0)
+         do ir0=0,ratio(0)
+            ie0=if0+ir0
+            if ((ie0.ge.filo0).and.(ie0.le.(fihi0+1))) then
+               x = dble(ir0)*realrat0
+               y = dble(ir1)*realrat1
+               arrayf(ie0,ie1)=
+     &              (arrayc(ic0,ic1)*(one-x) + 
+     &               arrayc(ic0+1,ic1)*x)*(one-y) +
+     &              (arrayc(ic0,ic1+1)*(one-x) + 
+     &               arrayc(ic0+1,ic1+1)*x)*y
+           endif
+         end do
+      end do
+           endif
+         end do
+      end do
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear interpolation for 2d node-centered float data
+c***********************************************************************
+c
+       subroutine cartlinrefnodeflot2d(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxc(0:2-1),
+     &  dxf(0:2-1)
+      real
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1)
+      double precision x,y,realrat0,realrat1
+      integer ic0,ic1,if0,if1,ie0,ie1,ir0,ir1,i,j
+c
+c***********************************************************************
+c
+      realrat0=one/dble(ratio(0))
+      realrat1=one/dble(ratio(1))
+
+      do ic1=ifirstc1,ilastc1
+         if1=ic1*ratio(1)
+         do ir1=0,ratio(1)
+            ie1=if1+ir1
+            if ((ie1.ge.filo1).and.(ie1.le.(fihi1+1))) then
+      do ic0=ifirstc0,ilastc0
+         if0=ic0*ratio(0)
+         do ir0=0,ratio(0)
+            ie0=if0+ir0
+            if ((ie0.ge.filo0).and.(ie0.le.(fihi0+1))) then
+               x = dble(ir0)*realrat0
+               y = dble(ir1)*realrat1
+               arrayf(ie0,ie1)=
+     &              (arrayc(ic0,ic1)*(one-x) + 
+     &               arrayc(ic0+1,ic1)*x)*(one-y) +
+     &              (arrayc(ic0,ic1+1)*(one-x) + 
+     &               arrayc(ic0+1,ic1+1)*x)*y
+           endif
+         end do
+      end do
+           endif
+         end do
+      end do
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear interpolation for 2d node-centered complex data
+c***********************************************************************
+c
+       subroutine cartlinrefnodecplx2d(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxc(0:2-1),
+     &  dxf(0:2-1)
+      double complex
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1)
+      double precision x,y,realrat0,realrat1
+      integer ic0,ic1,if0,if1,ie0,ie1,ir0,ir1,i,j
+c
+c***********************************************************************
+c
+      realrat0=one/dble(ratio(0))
+      realrat1=one/dble(ratio(1))
+
+      do ic1=ifirstc1,ilastc1
+         if1=ic1*ratio(1)
+         do ir1=0,ratio(1)
+            ie1=if1+ir1
+            if ((ie1.ge.filo1).and.(ie1.le.(fihi1+1))) then
+      do ic0=ifirstc0,ilastc0
+         if0=ic0*ratio(0)
+         do ir0=0,ratio(0)
+            ie0=if0+ir0
+            if ((ie0.ge.filo0).and.(ie0.le.(fihi0+1))) then
+               x = dble(ir0)*realrat0
+               y = dble(ir1)*realrat1
+               arrayf(ie0,ie1)=
+     &              (arrayc(ic0,ic1)*(one-x) + 
+     &               arrayc(ic0+1,ic1)*x)*(one-y) +
+     &              (arrayc(ic0,ic1+1)*(one-x) + 
+     &               arrayc(ic0+1,ic1+1)*x)*y
+           endif
+         end do
+      end do
+           endif
+         end do
+      end do
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d outerface double data
+c***********************************************************************
+c
+      subroutine cartclinrefoutfacedoub2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0,diff1,slope1)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxc(0:2-1),
+     &  dxf(0:2-1),
+     &  deltax(0:15,0:2-1)
+      double precision
+     &  arrayc(cilo1:cihi1),
+     &  arrayf(filo1:fihi1),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo1:cihi1),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo1:cihi1)
+      integer ic1,ie1,if1,ir1
+      double precision
+     &  coef2,bound
+c
+c***********************************************************************
+c
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ie1)
+     &               -arrayc(ie1-1)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         coef2=half*(diff1(ic1+1)+diff1(ic1))
+         bound=two*min(abs(diff1(ic1+1)),abs(diff1(ic1)))
+         if (diff1(ic1)*diff1(ic1+1).gt.zero) then
+            slope1(ic1)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(1)
+         else
+            slope1(ic1)=zero
+         endif
+      enddo
+
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         ir1=if1-ic1*ratio(1)
+         arrayf(if1)=arrayc(ic1)
+     &                +slope1(ic1)*deltax(ir1,1)
+      enddo
+c
+      return
+      end
+c
+      subroutine cartclinrefoutfacedoub2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff1,slope1,diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxc(0:2-1),
+     &  dxf(0:2-1),
+     &  deltax(0:15,0:2-1)
+      double precision
+     &  arrayc(cilo0:cihi0),
+     &  arrayf(filo0:fihi0),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0)
+      integer ic0,ie0,if0,ir0
+      double precision
+     &  coef2,bound
+c
+c***********************************************************************
+c
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie0)
+     &               -arrayc(ie0-1)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic0)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic0)=zero
+         endif
+      enddo
+
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         ir0=if0-ic0*ratio(0)
+         arrayf(if0)=arrayc(ic0)
+     &                +slope0(ic0)*deltax(ir0,0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d outerface float data
+c***********************************************************************
+c
+      subroutine cartclinrefoutfaceflot2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0,diff1,slope1)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxc(0:2-1),
+     &  dxf(0:2-1),
+     &  deltax(0:15,0:2-1)
+      real
+     &  arrayc(cilo1:cihi1),
+     &  arrayf(filo1:fihi1),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo1:cihi1),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo1:cihi1)
+      integer ic1,ie1,if1,ir1
+      real
+     &  coef2,bound
+c
+c***********************************************************************
+c
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ie1)
+     &               -arrayc(ie1-1)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         coef2=half*(diff1(ic1+1)+diff1(ic1))
+         bound=two*min(abs(diff1(ic1+1)),abs(diff1(ic1)))
+         if (diff1(ic1)*diff1(ic1+1).gt.zero) then
+            slope1(ic1)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(1)
+         else
+            slope1(ic1)=zero
+         endif
+      enddo
+
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         ir1=if1-ic1*ratio(1)
+         arrayf(if1)=arrayc(ic1)
+     &                +slope1(ic1)*deltax(ir1,1)
+      enddo
+c
+      return
+      end
+c
+      subroutine cartclinrefoutfaceflot2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff1,slope1,diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxc(0:2-1),
+     &  dxf(0:2-1),
+     &  deltax(0:15,0:2-1)
+      real
+     &  arrayc(cilo0:cihi0),
+     &  arrayf(filo0:fihi0),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0)
+      integer ic0,ie0,if0,ir0
+      real
+     &  coef2,bound
+c
+c***********************************************************************
+c
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie0)
+     &               -arrayc(ie0-1)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic0)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic0)=zero
+         endif
+      enddo
+
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         ir0=if0-ic0*ratio(0)
+         arrayf(if0)=arrayc(ic0)
+     &                +slope0(ic0)*deltax(ir0,0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d outerface complex data
+c***********************************************************************
+c
+c      subroutine cartclinrefoutfacecplx2d0(
+ccart_clinref_op_outerface_2d(double complex,0,1)cc
+c      subroutine cartclinrefoutfacecplx2d1(
+ccart_clinref_op_outerface_2d(double complex,1,0)c
+c***********************************************************************
+c Conservative linear interpolation for 2d side-centered double data
+c***********************************************************************
+c
+      subroutine cartclinrefsidedoub2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0,diff1,slope1)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxc(0:2-1),
+     &  dxf(0:2-1),
+     &  deltax(0:15,0:2-1)
+      double precision
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0+1,
+     &          cilo1:cihi1),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0+1,
+     &          cilo1:cihi1)
+      integer ic0,ic1,ie0,ie1,if0,if1,ir0,ir1
+      double precision
+     &  coef2,bound
+      double precision deltax1
+c
+c***********************************************************************
+c
+
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=dble(ir0)*dxf(0)
+      enddo
+
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do ic1=ifirstc1,ilastc1+0
+
+      do ic0=ifirstc0-1,ilastc0+1
+         diff0(ic0)=arrayc(ic0+1,ic1)
+     &                -arrayc(ic0,ic1)
+      enddo
+      do ie0=ifirstc0,ilastc0+1
+         coef2=half*(diff0(ie0-1)+diff0(ie0))
+         bound=two*min(abs(diff0(ie0-1)),abs(diff0(ie0)))
+         if (diff0(ie0)*diff0(ie0-1).gt.zero) then
+           slope0(ie0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(0) 
+         else
+            slope0(ie0,ic1)=zero
+         endif
+      enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0+1
+
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ic0,ie1)
+     &               -arrayc(ic0,ie1-1)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         coef2=half*(diff1(ic1+1)+diff1(ic1))
+         bound=two*min(abs(diff1(ic1+1)),abs(diff1(ic1)))
+         if (diff1(ic1)*diff1(ic1+1).gt.zero) then
+            slope1(ic0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(1)
+         else
+            slope1(ic0,ic1)=zero
+         endif
+      enddo
+      enddo
+
+      do if1=ifirstf1,ilastf1+0
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         ir1=if1-ic1*ratio(1)
+         deltax1=deltax(ir1,1)
+         do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            ir0=if0-ic0*ratio(0)
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+     &                +slope0(ic0,ic1)*deltax(ir0,0)
+     &                +slope1(ic0,ic1)*deltax1
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartclinrefsidedoub2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff1,slope1,diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxc(0:2-1),
+     &  dxf(0:2-1),
+     &  deltax(0:15,0:2-1)
+      double precision
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0,
+     &          cilo1:cihi1+1),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0,
+     &          cilo1:cihi1+1)
+      integer ic0,ic1,ie0,ie1,if0,if1,ir0,ir1
+      double precision
+     &  coef2,bound
+      double precision deltax1
+c
+c***********************************************************************
+c
+
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=dble(ir1)*dxf(1)
+      enddo
+
+      do ic1=ifirstc1,ilastc1+1
+
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie0,ic1)
+     &               -arrayc(ie0-1,ic1)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic0,ic1)=zero
+         endif
+      enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0+0
+
+      do ic1=ifirstc1-1,ilastc1+1
+         diff1(ic1)=arrayc(ic0,ic1+1)
+     &                -arrayc(ic0,ic1)
+      enddo
+      do ie1=ifirstc1,ilastc1+1
+         coef2=half*(diff1(ie1-1)+diff1(ie1))
+         bound=two*min(abs(diff1(ie1-1)),abs(diff1(ie1)))
+         if (diff1(ie1)*diff1(ie1-1).gt.zero) then
+           slope1(ic0,ie1)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(1) 
+         else
+            slope1(ic0,ie1)=zero
+         endif
+      enddo
+      enddo
+
+      do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         ir1=if1-ic1*ratio(1)
+         deltax1=deltax(ir1,1)
+         do if0=ifirstf0,ilastf0+0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            ir0=if0-ic0*ratio(0)
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+     &                +slope0(ic0,ic1)*deltax(ir0,0)
+     &                +slope1(ic0,ic1)*deltax1
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d side-centered float data
+c***********************************************************************
+c
+      subroutine cartclinrefsideflot2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0,diff1,slope1)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxc(0:2-1),
+     &  dxf(0:2-1),
+     &  deltax(0:15,0:2-1)
+      real
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0+1,
+     &          cilo1:cihi1),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0+1,
+     &          cilo1:cihi1)
+      integer ic0,ic1,ie0,ie1,if0,if1,ir0,ir1
+      real
+     &  coef2,bound
+      double precision deltax1
+c
+c***********************************************************************
+c
+
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=dble(ir0)*dxf(0)
+      enddo
+
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do ic1=ifirstc1,ilastc1+0
+
+      do ic0=ifirstc0-1,ilastc0+1
+         diff0(ic0)=arrayc(ic0+1,ic1)
+     &                -arrayc(ic0,ic1)
+      enddo
+      do ie0=ifirstc0,ilastc0+1
+         coef2=half*(diff0(ie0-1)+diff0(ie0))
+         bound=two*min(abs(diff0(ie0-1)),abs(diff0(ie0)))
+         if (diff0(ie0)*diff0(ie0-1).gt.zero) then
+           slope0(ie0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(0) 
+         else
+            slope0(ie0,ic1)=zero
+         endif
+      enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0+1
+
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ic0,ie1)
+     &               -arrayc(ic0,ie1-1)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         coef2=half*(diff1(ic1+1)+diff1(ic1))
+         bound=two*min(abs(diff1(ic1+1)),abs(diff1(ic1)))
+         if (diff1(ic1)*diff1(ic1+1).gt.zero) then
+            slope1(ic0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(1)
+         else
+            slope1(ic0,ic1)=zero
+         endif
+      enddo
+      enddo
+
+      do if1=ifirstf1,ilastf1+0
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         ir1=if1-ic1*ratio(1)
+         deltax1=deltax(ir1,1)
+         do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            ir0=if0-ic0*ratio(0)
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+     &                +slope0(ic0,ic1)*deltax(ir0,0)
+     &                +slope1(ic0,ic1)*deltax1
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartclinrefsideflot2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff1,slope1,diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  dxc(0:2-1),
+     &  dxf(0:2-1),
+     &  deltax(0:15,0:2-1)
+      real
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0,
+     &          cilo1:cihi1+1),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0,
+     &          cilo1:cihi1+1)
+      integer ic0,ic1,ie0,ie1,if0,if1,ir0,ir1
+      real
+     &  coef2,bound
+      double precision deltax1
+c
+c***********************************************************************
+c
+
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=dble(ir1)*dxf(1)
+      enddo
+
+      do ic1=ifirstc1,ilastc1+1
+
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie0,ic1)
+     &               -arrayc(ie0-1,ic1)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic0,ic1)=zero
+         endif
+      enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0+0
+
+      do ic1=ifirstc1-1,ilastc1+1
+         diff1(ic1)=arrayc(ic0,ic1+1)
+     &                -arrayc(ic0,ic1)
+      enddo
+      do ie1=ifirstc1,ilastc1+1
+         coef2=half*(diff1(ie1-1)+diff1(ie1))
+         bound=two*min(abs(diff1(ie1-1)),abs(diff1(ie1)))
+         if (diff1(ie1)*diff1(ie1-1).gt.zero) then
+           slope1(ic0,ie1)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(1) 
+         else
+            slope1(ic0,ie1)=zero
+         endif
+      enddo
+      enddo
+
+      do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         ir1=if1-ic1*ratio(1)
+         deltax1=deltax(ir1,1)
+         do if0=ifirstf0,ilastf0+0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            ir0=if0-ic0*ratio(0)
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+     &                +slope0(ic0,ic1)*deltax(ir0,0)
+     &                +slope1(ic0,ic1)*deltax1
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d side-centered complex data
+c***********************************************************************
+c
+c      subroutine cartclinrefsidecplx2d0(
+ccart_clinref_op_side_2d(double complex,0,1)cc
+c      subroutine cartclinrefsidecplx2d1(
+ccart_clinref_op_side_2d(double complex,1,0)c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/fortran/geom_cartrefine2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/fortran/geom_cartrefine2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,184 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_cartrefine2d.m4 $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for spatial refining of 2d patch data
+c               on a regular Cartesian mesh.
+c
+include(geom_m4cartrefineops2d.i)dnl
+c
+c***********************************************************************
+c Linear interpolation for 2d cell-centered double data
+c***********************************************************************
+c
+      subroutine cartlinrefcelldoub2d(
+cart_linref_op_cell_2d(`double precision')dnl
+c
+c***********************************************************************
+c Linear interpolation for 2d cell-centered float data
+c***********************************************************************
+c
+      subroutine cartlinrefcellflot2d(
+cart_linref_op_cell_2d(`real')dnl
+c
+c***********************************************************************
+c Linear interpolation for 2d cell-centered complex data
+c***********************************************************************
+c
+      subroutine cartlinrefcellcplx2d(
+cart_linref_op_cell_2d(`double complex')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d cell-centered double data
+c***********************************************************************
+c
+      subroutine cartclinrefcelldoub2d(
+cart_clinref_op_cell_2d(`double precision')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d cell-centered float data
+c***********************************************************************
+c
+      subroutine cartclinrefcellflot2d(
+cart_clinref_op_cell_2d(`real')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d cell-centered complex data
+c***********************************************************************
+c
+      subroutine cartclinrefcellcplx2d(
+cart_clinref_op_cell_2d(`double complex')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d edge-centered double data
+c***********************************************************************
+c
+      subroutine cartclinrefedgedoub2d0(
+cart_clinref_op_edge_2d(`double precision',0,1)dnl
+c
+      subroutine cartclinrefedgedoub2d1(
+cart_clinref_op_edge_2d(`double precision',1,0)dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d edge-centered float data
+c***********************************************************************
+c
+      subroutine cartclinrefedgeflot2d0(
+cart_clinref_op_edge_2d(`real',0,1)dnl
+c
+      subroutine cartclinrefedgeflot2d1(
+cart_clinref_op_edge_2d(`real',1,0)dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d face-centered double data
+c***********************************************************************
+c
+      subroutine cartclinreffacedoub2d0(
+cart_clinref_op_face_2d(`double precision',0,1)dnl
+c
+      subroutine cartclinreffacedoub2d1(
+cart_clinref_op_face_2d(`double precision',1,0)dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d face-centered float data
+c***********************************************************************
+c
+      subroutine cartclinreffaceflot2d0(
+cart_clinref_op_face_2d(`real',0,1)dnl
+c
+      subroutine cartclinreffaceflot2d1(
+cart_clinref_op_face_2d(`real',1,0)dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d face-centered complex data
+c***********************************************************************
+c
+c      subroutine cartclinreffacecplx2d0(
+ccart_clinref_op_face_2d(`double complex',0,1)dnl
+cc
+c      subroutine cartclinreffacecplx2d1(
+ccart_clinref_op_face_2d(`double complex',1,0)dnl
+c
+c***********************************************************************
+c Linear interpolation for 2d node-centered double data
+c***********************************************************************
+c
+       subroutine cartlinrefnodedoub2d(
+cart_linref_op_node_2d(`double precision')dnl
+c
+c***********************************************************************
+c Linear interpolation for 2d node-centered float data
+c***********************************************************************
+c
+       subroutine cartlinrefnodeflot2d(
+cart_linref_op_node_2d(`real')dnl
+c
+c***********************************************************************
+c Linear interpolation for 2d node-centered complex data
+c***********************************************************************
+c
+       subroutine cartlinrefnodecplx2d(
+cart_linref_op_node_2d(`double complex')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d outerface double data
+c***********************************************************************
+c
+      subroutine cartclinrefoutfacedoub2d0(
+cart_clinref_op_outerface_2d(`double precision',0,1)dnl
+c
+      subroutine cartclinrefoutfacedoub2d1(
+cart_clinref_op_outerface_2d(`double precision',1,0)dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d outerface float data
+c***********************************************************************
+c
+      subroutine cartclinrefoutfaceflot2d0(
+cart_clinref_op_outerface_2d(`real',0,1)dnl
+c
+      subroutine cartclinrefoutfaceflot2d1(
+cart_clinref_op_outerface_2d(`real',1,0)dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d outerface complex data
+c***********************************************************************
+c
+c      subroutine cartclinrefoutfacecplx2d0(
+ccart_clinref_op_outerface_2d(`double complex',0,1)dnl
+cc
+c      subroutine cartclinrefoutfacecplx2d1(
+ccart_clinref_op_outerface_2d(`double complex',1,0)dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d side-centered double data
+c***********************************************************************
+c
+      subroutine cartclinrefsidedoub2d0(
+cart_clinref_op_side_2d(`double precision',0,1)dnl
+c
+      subroutine cartclinrefsidedoub2d1(
+cart_clinref_op_side_2d(`double precision',1,0)dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d side-centered float data
+c***********************************************************************
+c
+      subroutine cartclinrefsideflot2d0(
+cart_clinref_op_side_2d(`real',0,1)dnl
+c
+      subroutine cartclinrefsideflot2d1(
+cart_clinref_op_side_2d(`real',1,0)dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d side-centered complex data
+c***********************************************************************
+c
+c      subroutine cartclinrefsidecplx2d0(
+ccart_clinref_op_side_2d(`double complex',0,1)dnl
+cc
+c      subroutine cartclinrefsidecplx2d1(
+ccart_clinref_op_side_2d(`double complex',1,0)dnl
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/fortran/geom_cartrefine3d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/fortran/geom_cartrefine3d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,4916 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_cartrefine3d.m4 $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for spatial refining of 3d patch data
+c               on a regular Cartesian mesh.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_m4cartrefineops3d.i $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 3d Cartesian refine operators
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim3d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 3d arrays in FORTRAN routines.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_m4cartopstuff.i $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for cartesian geometry transfer routines.
+c
+
+
+
+
+c
+c
+c
+c
+c
+c
+
+c
+c
+c
+c
+c
+c***********************************************************************
+c Linear interpolation for 3d cell-centered double data
+c***********************************************************************
+c
+      subroutine cartlinrefcelldoub3d(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1)
+      double precision
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1,
+     &          filo2:fihi2)
+      double precision deltax(0:15,0:3-1),x,y,z
+      integer ic0,ic1,ic2,if0,if1,if2,ir0,ir1,ir2
+c
+c***********************************************************************
+c
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=(dble(ir2)+half)*dxf(2)-dxc(2)*half
+      enddo
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         ir2=if2-ic2*ratio(2)
+         z=deltax(ir2,2)/dxc(2)
+         if( z .lt. 0.d0 ) then
+           ic2 = ic2-1
+           z = z + one
+         endif
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            ir1=if1-ic1*ratio(1)
+            y=deltax(ir1,1)/dxc(1)
+            if( y .lt. 0.d0 ) then
+              ic1 = ic1-1
+              y = y + one
+            endif
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+               ir0=if0-ic0*ratio(0)
+               x=deltax(ir0,0)/dxc(0)
+               if( x .lt. 0.d0 ) then
+                 ic0 = ic0-1
+                 x = x + one
+               endif
+               arrayf(if0,if1,if2)=
+     &          ( (arrayc(ic0,ic1,ic2)
+     &      +(arrayc(ic0+1,ic1,ic2)-arrayc(ic0,ic1,ic2))*x)*(one-y)
+     &      +(arrayc(ic0,ic1+1,ic2)
+     &      +(arrayc(ic0+1,ic1+1,ic2)-arrayc(ic0,ic1+1,ic2))*x)*y )
+     &       *(one-z)
+     &         +( (arrayc(ic0,ic1,ic2+1)
+     &      +(arrayc(ic0+1,ic1,ic2+1)-arrayc(ic0,ic1,ic2+1))*x)
+     &       *(one-y)
+     &      +(arrayc(ic0,ic1+1,ic2+1)
+     &      +(arrayc(ic0+1,ic1+1,ic2+1)-arrayc(ic0,ic1+1,ic2+1))*x)*y)
+     &       *z
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear interpolation for 3d cell-centered float data
+c***********************************************************************
+c
+      subroutine cartlinrefcellflot3d(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1)
+      real
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1,
+     &          filo2:fihi2)
+      double precision deltax(0:15,0:3-1),x,y,z
+      integer ic0,ic1,ic2,if0,if1,if2,ir0,ir1,ir2
+c
+c***********************************************************************
+c
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=(dble(ir2)+half)*dxf(2)-dxc(2)*half
+      enddo
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         ir2=if2-ic2*ratio(2)
+         z=deltax(ir2,2)/dxc(2)
+         if( z .lt. 0.d0 ) then
+           ic2 = ic2-1
+           z = z + one
+         endif
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            ir1=if1-ic1*ratio(1)
+            y=deltax(ir1,1)/dxc(1)
+            if( y .lt. 0.d0 ) then
+              ic1 = ic1-1
+              y = y + one
+            endif
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+               ir0=if0-ic0*ratio(0)
+               x=deltax(ir0,0)/dxc(0)
+               if( x .lt. 0.d0 ) then
+                 ic0 = ic0-1
+                 x = x + one
+               endif
+               arrayf(if0,if1,if2)=
+     &          ( (arrayc(ic0,ic1,ic2)
+     &      +(arrayc(ic0+1,ic1,ic2)-arrayc(ic0,ic1,ic2))*x)*(one-y)
+     &      +(arrayc(ic0,ic1+1,ic2)
+     &      +(arrayc(ic0+1,ic1+1,ic2)-arrayc(ic0,ic1+1,ic2))*x)*y )
+     &       *(one-z)
+     &         +( (arrayc(ic0,ic1,ic2+1)
+     &      +(arrayc(ic0+1,ic1,ic2+1)-arrayc(ic0,ic1,ic2+1))*x)
+     &       *(one-y)
+     &      +(arrayc(ic0,ic1+1,ic2+1)
+     &      +(arrayc(ic0+1,ic1+1,ic2+1)-arrayc(ic0,ic1+1,ic2+1))*x)*y)
+     &       *z
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear interpolation for 3d cell-centered complex data
+c***********************************************************************
+c
+      subroutine cartlinrefcellcplx3d(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1)
+      double complex
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1,
+     &          filo2:fihi2)
+      double precision deltax(0:15,0:3-1),x,y,z
+      integer ic0,ic1,ic2,if0,if1,if2,ir0,ir1,ir2
+c
+c***********************************************************************
+c
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=(dble(ir2)+half)*dxf(2)-dxc(2)*half
+      enddo
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         ir2=if2-ic2*ratio(2)
+         z=deltax(ir2,2)/dxc(2)
+         if( z .lt. 0.d0 ) then
+           ic2 = ic2-1
+           z = z + one
+         endif
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            ir1=if1-ic1*ratio(1)
+            y=deltax(ir1,1)/dxc(1)
+            if( y .lt. 0.d0 ) then
+              ic1 = ic1-1
+              y = y + one
+            endif
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+               ir0=if0-ic0*ratio(0)
+               x=deltax(ir0,0)/dxc(0)
+               if( x .lt. 0.d0 ) then
+                 ic0 = ic0-1
+                 x = x + one
+               endif
+               arrayf(if0,if1,if2)=
+     &          ( (arrayc(ic0,ic1,ic2)
+     &      +(arrayc(ic0+1,ic1,ic2)-arrayc(ic0,ic1,ic2))*x)*(one-y)
+     &      +(arrayc(ic0,ic1+1,ic2)
+     &      +(arrayc(ic0+1,ic1+1,ic2)-arrayc(ic0,ic1+1,ic2))*x)*y )
+     &       *(one-z)
+     &         +( (arrayc(ic0,ic1,ic2+1)
+     &      +(arrayc(ic0+1,ic1,ic2+1)-arrayc(ic0,ic1,ic2+1))*x)
+     &       *(one-y)
+     &      +(arrayc(ic0,ic1+1,ic2+1)
+     &      +(arrayc(ic0+1,ic1+1,ic2+1)-arrayc(ic0,ic1+1,ic2+1))*x)*y)
+     &       *z
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d cell-centered double data
+c***********************************************************************
+c
+      subroutine cartclinrefcelldoub3d(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0,diff1,slope1,diff2,slope2)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      double precision
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1,
+     &          filo2:fihi2),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2)
+      integer ic0,ic1,ic2,ie0,ie1,ie2,if0,if1,if2,ir0,ir1,ir2
+      double precision
+     &  coef2,bound
+      double precision deltax1,deltax2
+c
+c***********************************************************************
+c
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=(dble(ir2)+half)*dxf(2)-dxc(2)*half
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie0,ic1,ic2)
+     &               -arrayc(ie0-1,ic1,ic2)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic0=ifirstc0,ilastc0
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ic0,ie1,ic2)
+     &               -arrayc(ic0,ie1-1,ic2)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         coef2=half*(diff1(ic1+1)+diff1(ic1))
+         bound=two*min(abs(diff1(ic1+1)),abs(diff1(ic1)))
+         if (diff1(ic1)*diff1(ic1+1).gt.zero) then
+            slope1(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(1)
+         else
+            slope1(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+      do ie2=ifirstc2,ilastc2+1
+         diff2(ie2)=arrayc(ic0,ic1,ie2)
+     &               -arrayc(ic0,ic1,ie2-1)
+      enddo
+      do ic2=ifirstc2,ilastc2
+         coef2=half*(diff2(ic2+1)+diff2(ic2))
+         bound=two*min(abs(diff2(ic2+1)),abs(diff2(ic2)))
+         if (diff2(ic2)*diff2(ic2+1).gt.zero) then
+            slope2(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(2)
+         else
+            slope2(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         ir2=if2-ic2*ratio(2)
+         deltax2=deltax(ir2,2)
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            ir1=if1-ic1*ratio(1)
+            deltax1=deltax(ir1,1)
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+               ir0=if0-ic0*ratio(0)
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+     &                     +slope0(ic0,ic1,ic2)*deltax(ir0,0)
+     &                     +slope1(ic0,ic1,ic2)*deltax1
+     &                     +slope2(ic0,ic1,ic2)*deltax2
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d cell-centered float data
+c***********************************************************************
+c
+      subroutine cartclinrefcellflot3d(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0,diff1,slope1,diff2,slope2)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      real
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1,
+     &          filo2:fihi2),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2)
+      integer ic0,ic1,ic2,ie0,ie1,ie2,if0,if1,if2,ir0,ir1,ir2
+      real
+     &  coef2,bound
+      double precision deltax1,deltax2
+c
+c***********************************************************************
+c
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=(dble(ir2)+half)*dxf(2)-dxc(2)*half
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie0,ic1,ic2)
+     &               -arrayc(ie0-1,ic1,ic2)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic0=ifirstc0,ilastc0
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ic0,ie1,ic2)
+     &               -arrayc(ic0,ie1-1,ic2)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         coef2=half*(diff1(ic1+1)+diff1(ic1))
+         bound=two*min(abs(diff1(ic1+1)),abs(diff1(ic1)))
+         if (diff1(ic1)*diff1(ic1+1).gt.zero) then
+            slope1(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(1)
+         else
+            slope1(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+      do ie2=ifirstc2,ilastc2+1
+         diff2(ie2)=arrayc(ic0,ic1,ie2)
+     &               -arrayc(ic0,ic1,ie2-1)
+      enddo
+      do ic2=ifirstc2,ilastc2
+         coef2=half*(diff2(ic2+1)+diff2(ic2))
+         bound=two*min(abs(diff2(ic2+1)),abs(diff2(ic2)))
+         if (diff2(ic2)*diff2(ic2+1).gt.zero) then
+            slope2(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(2)
+         else
+            slope2(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         ir2=if2-ic2*ratio(2)
+         deltax2=deltax(ir2,2)
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            ir1=if1-ic1*ratio(1)
+            deltax1=deltax(ir1,1)
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+               ir0=if0-ic0*ratio(0)
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+     &                     +slope0(ic0,ic1,ic2)*deltax(ir0,0)
+     &                     +slope1(ic0,ic1,ic2)*deltax1
+     &                     +slope2(ic0,ic1,ic2)*deltax2
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d cell-centered complex data
+c***********************************************************************
+c
+      subroutine cartclinrefcellcplx3d(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0,diff1,slope1,diff2,slope2)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      double complex
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1,
+     &          filo2:fihi2),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2)
+      integer ic0,ic1,ic2,ie0,ie1,ie2,if0,if1,if2,ir0,ir1,ir2
+      double precision
+     &  coef2real,coef2imag,boundreal,boundimag,
+     &  diff0real,diff0imag,diff1real,diff1imag,
+     &  slopereal,slopeimag
+      double precision deltax1,deltax2
+c
+c***********************************************************************
+c
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=(dble(ir2)+half)*dxf(2)-dxc(2)*half
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie0,ic1,ic2)
+     &               -arrayc(ie0-1,ic1,ic2)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         diff0real=dble(diff0(ic0))
+         diff0imag=imag(diff0(ic0))
+         diff1real=dble(diff0(ic0+1))
+         diff1imag=imag(diff0(ic0+1))
+         coef2real=half*(diff0real+diff1real)
+         coef2imag=half*(diff0imag+diff1imag)
+         boundreal=two*min(abs(diff1real),abs(diff0real))
+         boundimag=two*min(abs(diff1imag),abs(diff0imag))
+         if (diff0real*diff1real.gt.zero) then
+            slopereal=sign(min(abs(coef2real),boundreal),coef2real)
+     &                /dxc(0)
+         else
+            slopereal=zero
+         endif
+         if (diff0imag*diff1imag.gt.zero) then
+            slopeimag=sign(min(abs(coef2imag),boundimag),coef2imag) 
+     &                /dxc(0)
+         else
+            slopeimag=zero
+         endif
+         slope0(ic0,ic1,ic2) = slopereal + cmplx(zero,one)*slopeimag
+      enddo
+         enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic0=ifirstc0,ilastc0
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ic0,ie1,ic2)
+     &               -arrayc(ic0,ie1-1,ic2)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         diff0real=dble(diff1(ic1))
+         diff0imag=imag(diff1(ic1))
+         diff1real=dble(diff1(ic1+1))
+         diff1imag=imag(diff1(ic1+1))
+         coef2real=half*(diff0real+diff1real)
+         coef2imag=half*(diff0imag+diff1imag)
+         boundreal=two*min(abs(diff1real),abs(diff0real))
+         boundimag=two*min(abs(diff1imag),abs(diff0imag))
+         if (diff0real*diff1real.gt.zero) then
+            slopereal=sign(min(abs(coef2real),boundreal),coef2real)
+     &                /dxc(1)
+         else
+            slopereal=zero
+         endif
+         if (diff0imag*diff1imag.gt.zero) then
+            slopeimag=sign(min(abs(coef2imag),boundimag),coef2imag) 
+     &                /dxc(1)
+         else
+            slopeimag=zero
+         endif
+         slope1(ic0,ic1,ic2) = slopereal + cmplx(zero,one)*slopeimag
+      enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+      do ie2=ifirstc2,ilastc2+1
+         diff2(ie2)=arrayc(ic0,ic1,ie2)
+     &               -arrayc(ic0,ic1,ie2-1)
+      enddo
+      do ic2=ifirstc2,ilastc2
+         diff0real=dble(diff2(ic2))
+         diff0imag=imag(diff2(ic2))
+         diff1real=dble(diff2(ic2+1))
+         diff1imag=imag(diff2(ic2+1))
+         coef2real=half*(diff0real+diff1real)
+         coef2imag=half*(diff0imag+diff1imag)
+         boundreal=two*min(abs(diff1real),abs(diff0real))
+         boundimag=two*min(abs(diff1imag),abs(diff0imag))
+         if (diff0real*diff1real.gt.zero) then
+            slopereal=sign(min(abs(coef2real),boundreal),coef2real)
+     &                /dxc(2)
+         else
+            slopereal=zero
+         endif
+         if (diff0imag*diff1imag.gt.zero) then
+            slopeimag=sign(min(abs(coef2imag),boundimag),coef2imag) 
+     &                /dxc(2)
+         else
+            slopeimag=zero
+         endif
+         slope2(ic0,ic1,ic2) = slopereal + cmplx(zero,one)*slopeimag
+      enddo
+         enddo
+      enddo
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         ir2=if2-ic2*ratio(2)
+         deltax2=deltax(ir2,2)
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            ir1=if1-ic1*ratio(1)
+            deltax1=deltax(ir1,1)
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+               ir0=if0-ic0*ratio(0)
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+     &                     +slope0(ic0,ic1,ic2)*deltax(ir0,0)
+     &                     +slope1(ic0,ic1,ic2)*deltax1
+     &                     +slope2(ic0,ic1,ic2)*deltax2
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d edge-centered double data
+c***********************************************************************
+c
+      subroutine cartclinrefedgedoub3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0,diff1,slope1,diff2,slope2)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      double precision
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2+1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2+1),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2+1),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2+1),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2+1)
+      integer ic0,ic1,ic2,ie0,ie1,ie2,if0,if1,if2,
+     &        ir0,ir1,ir2
+      double precision
+     &  coef2,bound
+      double precision deltax1,deltax2
+c
+c***********************************************************************
+c
+
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=dble(ir1)*dxf(1)
+      enddo
+
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=dble(ir2)*dxf(2)
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+         do ic1=ifirstc1,ilastc1+1
+
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie0,ic1,ic2)
+     &               -arrayc(ie0-1,ic1,ic2)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+            do ic0=ifirstc0,ilastc0
+
+
+      do ic1=ifirstc1-1,ilastc1+1
+         diff1(ic1)=arrayc(ic0,ic1+1,ic2)
+     &                -arrayc(ic0,ic1,ic2)
+      enddo
+      do ie1=ifirstc1,ilastc1+1
+         coef2=half*(diff1(ie1-1)+diff1(ie1))
+         bound=two*min(abs(diff1(ie1-1)),abs(diff1(ie1)))
+         if (diff1(ie1)*diff1(ie1-1).gt.zero) then
+           slope1(ic0,ie1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(1) 
+         else
+            slope1(ic0,ie1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+         do ic1=ifirstc1,ilastc1+1
+
+            do ic0=ifirstc0,ilastc0
+
+      do ic2=ifirstc2-1,ilastc2+1
+         diff2(ic2)=arrayc(ic0,ic1,ic2+1)
+     &                -arrayc(ic0,ic1,ic2)
+      enddo
+      do ie2=ifirstc2,ilastc2+1
+         coef2=half*(diff2(ie2-1)+diff2(ie2))
+         bound=two*min(abs(diff2(ie2-1)),abs(diff2(ie2)))
+         if (diff2(ie2)*diff2(ie2-1).gt.zero) then
+           slope2(ic0,ic1,ie2)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(2) 
+         else
+            slope2(ic0,ic1,ie2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+      do if2=ifirstf2,ilastf2+1
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         ir2=if2-ic2*ratio(2)
+         deltax2=deltax(ir2,2)
+
+
+         do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            ir1=if1-ic1*ratio(1)
+            deltax1=deltax(ir1,1)
+
+
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+               ir0=if0-ic0*ratio(0)
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+     &                +slope0(ic0,ic1,ic2)*deltax(ir0,0)
+     &                +slope1(ic0,ic1,ic2)*deltax1
+     &                +slope2(ic0,ic1,ic2)*deltax2
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartclinrefedgedoub3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff1,slope1,diff2,slope2,diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      double precision
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2+1),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1)
+      integer ic0,ic1,ic2,ie0,ie1,ie2,if0,if1,if2,
+     &        ir0,ir1,ir2
+      double precision
+     &  coef2,bound
+      double precision deltax1,deltax2
+c
+c***********************************************************************
+c
+
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=dble(ir0)*dxf(0)
+      enddo
+
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=dble(ir2)*dxf(2)
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+         do ic1=ifirstc1,ilastc1
+
+      do ic0=ifirstc0-1,ilastc0+1
+         diff0(ic0)=arrayc(ic0+1,ic1,ic2)
+     &                -arrayc(ic0,ic1,ic2)
+      enddo
+      do ie0=ifirstc0,ilastc0+1
+         coef2=half*(diff0(ie0-1)+diff0(ie0))
+         bound=two*min(abs(diff0(ie0-1)),abs(diff0(ie0)))
+         if (diff0(ie0)*diff0(ie0-1).gt.zero) then
+           slope0(ie0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(0) 
+         else
+            slope0(ie0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+            do ic0=ifirstc0,ilastc0+1
+
+
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ic0,ie1,ic2)
+     &               -arrayc(ic0,ie1-1,ic2)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         coef2=half*(diff1(ic1+1)+diff1(ic1))
+         bound=two*min(abs(diff1(ic1+1)),abs(diff1(ic1)))
+         if (diff1(ic1)*diff1(ic1+1).gt.zero) then
+            slope1(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(1)
+         else
+            slope1(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+         do ic1=ifirstc1,ilastc1
+
+            do ic0=ifirstc0,ilastc0+1
+
+      do ic2=ifirstc2-1,ilastc2+1
+         diff2(ic2)=arrayc(ic0,ic1,ic2+1)
+     &                -arrayc(ic0,ic1,ic2)
+      enddo
+      do ie2=ifirstc2,ilastc2+1
+         coef2=half*(diff2(ie2-1)+diff2(ie2))
+         bound=two*min(abs(diff2(ie2-1)),abs(diff2(ie2)))
+         if (diff2(ie2)*diff2(ie2-1).gt.zero) then
+           slope2(ic0,ic1,ie2)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(2) 
+         else
+            slope2(ic0,ic1,ie2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+      do if2=ifirstf2,ilastf2+1
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         ir2=if2-ic2*ratio(2)
+         deltax2=deltax(ir2,2)
+
+
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            ir1=if1-ic1*ratio(1)
+            deltax1=deltax(ir1,1)
+
+
+            do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+               ir0=if0-ic0*ratio(0)
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+     &                +slope0(ic0,ic1,ic2)*deltax(ir0,0)
+     &                +slope1(ic0,ic1,ic2)*deltax1
+     &                +slope2(ic0,ic1,ic2)*deltax2
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartclinrefedgedoub3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff2,slope2,diff0,slope0,diff1,slope1)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      double precision
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo0:cihi0+1,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0+1,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0+1,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2)
+      integer ic0,ic1,ic2,ie0,ie1,ie2,if0,if1,if2,
+     &        ir0,ir1,ir2
+      double precision
+     &  coef2,bound
+      double precision deltax1,deltax2
+c
+c***********************************************************************
+c
+
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=dble(ir0)*dxf(0)
+      enddo
+
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=dble(ir1)*dxf(1)
+      enddo
+
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=(dble(ir2)+half)*dxf(2)-dxc(2)*half
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2
+
+         do ic1=ifirstc1,ilastc1+1
+
+      do ic0=ifirstc0-1,ilastc0+1
+         diff0(ic0)=arrayc(ic0+1,ic1,ic2)
+     &                -arrayc(ic0,ic1,ic2)
+      enddo
+      do ie0=ifirstc0,ilastc0+1
+         coef2=half*(diff0(ie0-1)+diff0(ie0))
+         bound=two*min(abs(diff0(ie0-1)),abs(diff0(ie0)))
+         if (diff0(ie0)*diff0(ie0-1).gt.zero) then
+           slope0(ie0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(0) 
+         else
+            slope0(ie0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2
+
+            do ic0=ifirstc0,ilastc0+1
+
+
+      do ic1=ifirstc1-1,ilastc1+1
+         diff1(ic1)=arrayc(ic0,ic1+1,ic2)
+     &                -arrayc(ic0,ic1,ic2)
+      enddo
+      do ie1=ifirstc1,ilastc1+1
+         coef2=half*(diff1(ie1-1)+diff1(ie1))
+         bound=two*min(abs(diff1(ie1-1)),abs(diff1(ie1)))
+         if (diff1(ie1)*diff1(ie1-1).gt.zero) then
+           slope1(ic0,ie1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(1) 
+         else
+            slope1(ic0,ie1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+         do ic1=ifirstc1,ilastc1+1
+
+            do ic0=ifirstc0,ilastc0+1
+
+      do ie2=ifirstc2,ilastc2+1
+         diff2(ie2)=arrayc(ic0,ic1,ie2)
+     &               -arrayc(ic0,ic1,ie2-1)
+      enddo
+      do ic2=ifirstc2,ilastc2
+         coef2=half*(diff2(ic2+1)+diff2(ic2))
+         bound=two*min(abs(diff2(ic2+1)),abs(diff2(ic2)))
+         if (diff2(ic2)*diff2(ic2+1).gt.zero) then
+            slope2(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(2)
+         else
+            slope2(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         ir2=if2-ic2*ratio(2)
+         deltax2=deltax(ir2,2)
+
+
+         do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            ir1=if1-ic1*ratio(1)
+            deltax1=deltax(ir1,1)
+
+
+            do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+               ir0=if0-ic0*ratio(0)
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+     &                +slope0(ic0,ic1,ic2)*deltax(ir0,0)
+     &                +slope1(ic0,ic1,ic2)*deltax1
+     &                +slope2(ic0,ic1,ic2)*deltax2
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d edge-centered float data
+c***********************************************************************
+c
+      subroutine cartclinrefedgeflot3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0,diff1,slope1,diff2,slope2)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      real
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2+1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2+1),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2+1),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2+1),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2+1)
+      integer ic0,ic1,ic2,ie0,ie1,ie2,if0,if1,if2,
+     &        ir0,ir1,ir2
+      real
+     &  coef2,bound
+      double precision deltax1,deltax2
+c
+c***********************************************************************
+c
+
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=dble(ir1)*dxf(1)
+      enddo
+
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=dble(ir2)*dxf(2)
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+         do ic1=ifirstc1,ilastc1+1
+
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie0,ic1,ic2)
+     &               -arrayc(ie0-1,ic1,ic2)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+            do ic0=ifirstc0,ilastc0
+
+
+      do ic1=ifirstc1-1,ilastc1+1
+         diff1(ic1)=arrayc(ic0,ic1+1,ic2)
+     &                -arrayc(ic0,ic1,ic2)
+      enddo
+      do ie1=ifirstc1,ilastc1+1
+         coef2=half*(diff1(ie1-1)+diff1(ie1))
+         bound=two*min(abs(diff1(ie1-1)),abs(diff1(ie1)))
+         if (diff1(ie1)*diff1(ie1-1).gt.zero) then
+           slope1(ic0,ie1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(1) 
+         else
+            slope1(ic0,ie1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+         do ic1=ifirstc1,ilastc1+1
+
+            do ic0=ifirstc0,ilastc0
+
+      do ic2=ifirstc2-1,ilastc2+1
+         diff2(ic2)=arrayc(ic0,ic1,ic2+1)
+     &                -arrayc(ic0,ic1,ic2)
+      enddo
+      do ie2=ifirstc2,ilastc2+1
+         coef2=half*(diff2(ie2-1)+diff2(ie2))
+         bound=two*min(abs(diff2(ie2-1)),abs(diff2(ie2)))
+         if (diff2(ie2)*diff2(ie2-1).gt.zero) then
+           slope2(ic0,ic1,ie2)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(2) 
+         else
+            slope2(ic0,ic1,ie2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+      do if2=ifirstf2,ilastf2+1
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         ir2=if2-ic2*ratio(2)
+         deltax2=deltax(ir2,2)
+
+
+         do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            ir1=if1-ic1*ratio(1)
+            deltax1=deltax(ir1,1)
+
+
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+               ir0=if0-ic0*ratio(0)
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+     &                +slope0(ic0,ic1,ic2)*deltax(ir0,0)
+     &                +slope1(ic0,ic1,ic2)*deltax1
+     &                +slope2(ic0,ic1,ic2)*deltax2
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartclinrefedgeflot3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff1,slope1,diff2,slope2,diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      real
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2+1),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1)
+      integer ic0,ic1,ic2,ie0,ie1,ie2,if0,if1,if2,
+     &        ir0,ir1,ir2
+      real
+     &  coef2,bound
+      double precision deltax1,deltax2
+c
+c***********************************************************************
+c
+
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=dble(ir0)*dxf(0)
+      enddo
+
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=dble(ir2)*dxf(2)
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+         do ic1=ifirstc1,ilastc1
+
+      do ic0=ifirstc0-1,ilastc0+1
+         diff0(ic0)=arrayc(ic0+1,ic1,ic2)
+     &                -arrayc(ic0,ic1,ic2)
+      enddo
+      do ie0=ifirstc0,ilastc0+1
+         coef2=half*(diff0(ie0-1)+diff0(ie0))
+         bound=two*min(abs(diff0(ie0-1)),abs(diff0(ie0)))
+         if (diff0(ie0)*diff0(ie0-1).gt.zero) then
+           slope0(ie0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(0) 
+         else
+            slope0(ie0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+            do ic0=ifirstc0,ilastc0+1
+
+
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ic0,ie1,ic2)
+     &               -arrayc(ic0,ie1-1,ic2)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         coef2=half*(diff1(ic1+1)+diff1(ic1))
+         bound=two*min(abs(diff1(ic1+1)),abs(diff1(ic1)))
+         if (diff1(ic1)*diff1(ic1+1).gt.zero) then
+            slope1(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(1)
+         else
+            slope1(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+         do ic1=ifirstc1,ilastc1
+
+            do ic0=ifirstc0,ilastc0+1
+
+      do ic2=ifirstc2-1,ilastc2+1
+         diff2(ic2)=arrayc(ic0,ic1,ic2+1)
+     &                -arrayc(ic0,ic1,ic2)
+      enddo
+      do ie2=ifirstc2,ilastc2+1
+         coef2=half*(diff2(ie2-1)+diff2(ie2))
+         bound=two*min(abs(diff2(ie2-1)),abs(diff2(ie2)))
+         if (diff2(ie2)*diff2(ie2-1).gt.zero) then
+           slope2(ic0,ic1,ie2)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(2) 
+         else
+            slope2(ic0,ic1,ie2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+      do if2=ifirstf2,ilastf2+1
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         ir2=if2-ic2*ratio(2)
+         deltax2=deltax(ir2,2)
+
+
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            ir1=if1-ic1*ratio(1)
+            deltax1=deltax(ir1,1)
+
+
+            do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+               ir0=if0-ic0*ratio(0)
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+     &                +slope0(ic0,ic1,ic2)*deltax(ir0,0)
+     &                +slope1(ic0,ic1,ic2)*deltax1
+     &                +slope2(ic0,ic1,ic2)*deltax2
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartclinrefedgeflot3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff2,slope2,diff0,slope0,diff1,slope1)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      real
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo0:cihi0+1,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0+1,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0+1,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2)
+      integer ic0,ic1,ic2,ie0,ie1,ie2,if0,if1,if2,
+     &        ir0,ir1,ir2
+      real
+     &  coef2,bound
+      double precision deltax1,deltax2
+c
+c***********************************************************************
+c
+
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=dble(ir0)*dxf(0)
+      enddo
+
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=dble(ir1)*dxf(1)
+      enddo
+
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=(dble(ir2)+half)*dxf(2)-dxc(2)*half
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2
+
+         do ic1=ifirstc1,ilastc1+1
+
+      do ic0=ifirstc0-1,ilastc0+1
+         diff0(ic0)=arrayc(ic0+1,ic1,ic2)
+     &                -arrayc(ic0,ic1,ic2)
+      enddo
+      do ie0=ifirstc0,ilastc0+1
+         coef2=half*(diff0(ie0-1)+diff0(ie0))
+         bound=two*min(abs(diff0(ie0-1)),abs(diff0(ie0)))
+         if (diff0(ie0)*diff0(ie0-1).gt.zero) then
+           slope0(ie0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(0) 
+         else
+            slope0(ie0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2
+
+            do ic0=ifirstc0,ilastc0+1
+
+
+      do ic1=ifirstc1-1,ilastc1+1
+         diff1(ic1)=arrayc(ic0,ic1+1,ic2)
+     &                -arrayc(ic0,ic1,ic2)
+      enddo
+      do ie1=ifirstc1,ilastc1+1
+         coef2=half*(diff1(ie1-1)+diff1(ie1))
+         bound=two*min(abs(diff1(ie1-1)),abs(diff1(ie1)))
+         if (diff1(ie1)*diff1(ie1-1).gt.zero) then
+           slope1(ic0,ie1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(1) 
+         else
+            slope1(ic0,ie1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+         do ic1=ifirstc1,ilastc1+1
+
+            do ic0=ifirstc0,ilastc0+1
+
+      do ie2=ifirstc2,ilastc2+1
+         diff2(ie2)=arrayc(ic0,ic1,ie2)
+     &               -arrayc(ic0,ic1,ie2-1)
+      enddo
+      do ic2=ifirstc2,ilastc2
+         coef2=half*(diff2(ic2+1)+diff2(ic2))
+         bound=two*min(abs(diff2(ic2+1)),abs(diff2(ic2)))
+         if (diff2(ic2)*diff2(ic2+1).gt.zero) then
+            slope2(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(2)
+         else
+            slope2(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         ir2=if2-ic2*ratio(2)
+         deltax2=deltax(ir2,2)
+
+
+         do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            ir1=if1-ic1*ratio(1)
+            deltax1=deltax(ir1,1)
+
+
+            do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+               ir0=if0-ic0*ratio(0)
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+     &                +slope0(ic0,ic1,ic2)*deltax(ir0,0)
+     &                +slope1(ic0,ic1,ic2)*deltax1
+     &                +slope2(ic0,ic1,ic2)*deltax2
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d face-centered double data
+c***********************************************************************
+c
+      subroutine cartclinreffacedoub3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0,diff1,slope1,diff2,slope2)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      double precision
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2)
+      integer ic0,ic1,ic2,ie0,ie1,ie2,if0,if1,if2,
+     &        ir0,ir1,ir2
+      double precision
+     &  coef2,bound
+      double precision deltax1,deltax2
+c
+c***********************************************************************
+c
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=(dble(ir2)+half)*dxf(2)-dxc(2)*half
+      enddo
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=dble(ir0)*dxf(0)
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+      do ic0=ifirstc0-1,ilastc0+1
+         diff0(ic0)=arrayc(ic0+1,ic1,ic2)
+     &                -arrayc(ic0,ic1,ic2)
+      enddo
+      do ie0=ifirstc0,ilastc0+1
+         coef2=half*(diff0(ie0-1)+diff0(ie0))
+         bound=two*min(abs(diff0(ie0-1)),abs(diff0(ie0)))
+         if (diff0(ie0)*diff0(ie0-1).gt.zero) then
+           slope0(ie0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(0) 
+         else
+            slope0(ie0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic0=ifirstc0,ilastc0+1
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ic0,ie1,ic2)
+     &               -arrayc(ic0,ie1-1,ic2)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         coef2=half*(diff1(ic1+1)+diff1(ic1))
+         bound=two*min(abs(diff1(ic1+1)),abs(diff1(ic1)))
+         if (diff1(ic1)*diff1(ic1+1).gt.zero) then
+            slope1(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(1)
+         else
+            slope1(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0+1
+      do ie2=ifirstc2,ilastc2+1
+         diff2(ie2)=arrayc(ic0,ic1,ie2)
+     &               -arrayc(ic0,ic1,ie2-1)
+      enddo
+      do ic2=ifirstc2,ilastc2
+         coef2=half*(diff2(ic2+1)+diff2(ic2))
+         bound=two*min(abs(diff2(ic2+1)),abs(diff2(ic2)))
+         if (diff2(ic2)*diff2(ic2+1).gt.zero) then
+            slope2(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(2)
+         else
+            slope2(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         ir2=if2-ic2*ratio(2)
+         deltax2=deltax(ir2,2)
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            ir1=if1-ic1*ratio(1)
+            deltax1=deltax(ir1,1)
+            do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ie0=(if0+1)/ratio(0)-1
+         else
+            ie0=if0/ratio(0)
+         endif
+               ir0=if0-ie0*ratio(0)
+               arrayf(if0,if1,if2)=arrayc(ie0,ic1,ic2)
+     &                +slope0(ie0,ic1,ic2)*deltax(ir0,0)
+     &                +slope1(ie0,ic1,ic2)*deltax1
+     &                +slope2(ie0,ic1,ic2)*deltax2
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartclinreffacedoub3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff1,slope1,diff2,slope2,diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      double precision
+     &  arrayc(cilo1:cihi1+1,
+     &          cilo2:cihi2,
+     &          cilo0:cihi0),
+     &  arrayf(filo1:fihi1+1,
+     &          filo2:fihi2,
+     &          filo0:fihi0),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo1:cihi1+1,
+     &          cilo2:cihi2,
+     &          cilo0:cihi0),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo1:cihi1+1,
+     &          cilo2:cihi2,
+     &          cilo0:cihi0),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo1:cihi1+1,
+     &          cilo2:cihi2,
+     &          cilo0:cihi0)
+      integer ic1,ic2,ic0,ie1,ie2,ie0,if1,if2,if0,
+     &        ir1,ir2,ir0
+      double precision
+     &  coef2,bound
+      double precision deltax2,deltax0
+c
+c***********************************************************************
+c
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=(dble(ir2)+half)*dxf(2)-dxc(2)*half
+      enddo
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=dble(ir1)*dxf(1)
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         do ic2=ifirstc2,ilastc2
+      do ic1=ifirstc1-1,ilastc1+1
+         diff1(ic1)=arrayc(ic1+1,ic2,ic0)
+     &                -arrayc(ic1,ic2,ic0)
+      enddo
+      do ie1=ifirstc1,ilastc1+1
+         coef2=half*(diff1(ie1-1)+diff1(ie1))
+         bound=two*min(abs(diff1(ie1-1)),abs(diff1(ie1)))
+         if (diff1(ie1)*diff1(ie1-1).gt.zero) then
+           slope1(ie1,ic2,ic0)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(1) 
+         else
+            slope1(ie1,ic2,ic0)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         do ic1=ifirstc1,ilastc1+1
+      do ie2=ifirstc2,ilastc2+1
+         diff2(ie2)=arrayc(ic1,ie2,ic0)
+     &               -arrayc(ic1,ie2-1,ic0)
+      enddo
+      do ic2=ifirstc2,ilastc2
+         coef2=half*(diff2(ic2+1)+diff2(ic2))
+         bound=two*min(abs(diff2(ic2+1)),abs(diff2(ic2)))
+         if (diff2(ic2)*diff2(ic2+1).gt.zero) then
+            slope2(ic1,ic2,ic0)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(2)
+         else
+            slope2(ic1,ic2,ic0)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1+1
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ic1,ic2,ie0)
+     &               -arrayc(ic1,ic2,ie0-1)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic1,ic2,ic0)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic1,ic2,ic0)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         ir0=if0-ic0*ratio(0)
+         deltax0=deltax(ir0,0)
+         do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+            ir2=if2-ic2*ratio(2)
+            deltax2=deltax(ir2,2)
+            do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ie1=(if1+1)/ratio(1)-1
+         else
+            ie1=if1/ratio(1)
+         endif
+               ir1=if1-ie1*ratio(1)
+               arrayf(if1,if2,if0)=arrayc(ie1,ic2,ic0)
+     &                +slope1(ie1,ic2,ic0)*deltax(ir1,1)
+     &                +slope2(ie1,ic2,ic0)*deltax2
+     &                +slope0(ie1,ic2,ic0)*deltax0
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartclinreffacedoub3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff2,slope2,diff0,slope0,diff1,slope1)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      double precision
+     &  arrayc(cilo2:cihi2+1,
+     &          cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  arrayf(filo2:fihi2+1,
+     &          filo0:fihi0,
+     &          filo1:fihi1),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo2:cihi2+1,
+     &          cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo2:cihi2+1,
+     &          cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo2:cihi2+1,
+     &          cilo0:cihi0,
+     &          cilo1:cihi1)
+      integer ic2,ic0,ic1,ie2,ie0,ie1,if2,if0,if1,
+     &        ir2,ir0,ir1
+      double precision
+     &  coef2,bound
+      double precision deltax0,deltax1
+c
+c***********************************************************************
+c
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=dble(ir2)*dxf(2)
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+      do ic2=ifirstc2-1,ilastc2+1
+         diff2(ic2)=arrayc(ic2+1,ic0,ic1)
+     &                -arrayc(ic2,ic0,ic1)
+      enddo
+      do ie2=ifirstc2,ilastc2+1
+         coef2=half*(diff2(ie2-1)+diff2(ie2))
+         bound=two*min(abs(diff2(ie2-1)),abs(diff2(ie2)))
+         if (diff2(ie2)*diff2(ie2-1).gt.zero) then
+           slope2(ie2,ic0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(2) 
+         else
+            slope2(ie2,ic0,ic1)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic2=ifirstc2,ilastc2+1
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ic2,ie0,ic1)
+     &               -arrayc(ic2,ie0-1,ic1)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic2,ic0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic2,ic0,ic1)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         do ic2=ifirstc2,ilastc2+1
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ic2,ic0,ie1)
+     &               -arrayc(ic2,ic0,ie1-1)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         coef2=half*(diff1(ic1+1)+diff1(ic1))
+         bound=two*min(abs(diff1(ic1+1)),abs(diff1(ic1)))
+         if (diff1(ic1)*diff1(ic1+1).gt.zero) then
+            slope1(ic2,ic0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(1)
+         else
+            slope1(ic2,ic0,ic1)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         ir1=if1-ic1*ratio(1)
+         deltax1=deltax(ir1,1)
+         do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            ir0=if0-ic0*ratio(0)
+            deltax0=deltax(ir0,0)
+            do if2=ifirstf2,ilastf2+1
+         if (if2.lt.0) then
+            ie2=(if2+1)/ratio(2)-1
+         else
+            ie2=if2/ratio(2)
+         endif
+               ir2=if2-ie2*ratio(2)
+               arrayf(if2,if0,if1)=arrayc(ie2,ic0,ic1)
+     &                +slope2(ie2,ic0,ic1)*deltax(ir2,2)
+     &                +slope0(ie2,ic0,ic1)*deltax0
+     &                +slope1(ie2,ic0,ic1)*deltax1
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d face-centered float data
+c***********************************************************************
+c
+      subroutine cartclinreffaceflot3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0,diff1,slope1,diff2,slope2)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      real
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2)
+      integer ic0,ic1,ic2,ie0,ie1,ie2,if0,if1,if2,
+     &        ir0,ir1,ir2
+      real
+     &  coef2,bound
+      double precision deltax1,deltax2
+c
+c***********************************************************************
+c
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=(dble(ir2)+half)*dxf(2)-dxc(2)*half
+      enddo
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=dble(ir0)*dxf(0)
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+      do ic0=ifirstc0-1,ilastc0+1
+         diff0(ic0)=arrayc(ic0+1,ic1,ic2)
+     &                -arrayc(ic0,ic1,ic2)
+      enddo
+      do ie0=ifirstc0,ilastc0+1
+         coef2=half*(diff0(ie0-1)+diff0(ie0))
+         bound=two*min(abs(diff0(ie0-1)),abs(diff0(ie0)))
+         if (diff0(ie0)*diff0(ie0-1).gt.zero) then
+           slope0(ie0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(0) 
+         else
+            slope0(ie0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic0=ifirstc0,ilastc0+1
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ic0,ie1,ic2)
+     &               -arrayc(ic0,ie1-1,ic2)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         coef2=half*(diff1(ic1+1)+diff1(ic1))
+         bound=two*min(abs(diff1(ic1+1)),abs(diff1(ic1)))
+         if (diff1(ic1)*diff1(ic1+1).gt.zero) then
+            slope1(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(1)
+         else
+            slope1(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0+1
+      do ie2=ifirstc2,ilastc2+1
+         diff2(ie2)=arrayc(ic0,ic1,ie2)
+     &               -arrayc(ic0,ic1,ie2-1)
+      enddo
+      do ic2=ifirstc2,ilastc2
+         coef2=half*(diff2(ic2+1)+diff2(ic2))
+         bound=two*min(abs(diff2(ic2+1)),abs(diff2(ic2)))
+         if (diff2(ic2)*diff2(ic2+1).gt.zero) then
+            slope2(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(2)
+         else
+            slope2(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         ir2=if2-ic2*ratio(2)
+         deltax2=deltax(ir2,2)
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            ir1=if1-ic1*ratio(1)
+            deltax1=deltax(ir1,1)
+            do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ie0=(if0+1)/ratio(0)-1
+         else
+            ie0=if0/ratio(0)
+         endif
+               ir0=if0-ie0*ratio(0)
+               arrayf(if0,if1,if2)=arrayc(ie0,ic1,ic2)
+     &                +slope0(ie0,ic1,ic2)*deltax(ir0,0)
+     &                +slope1(ie0,ic1,ic2)*deltax1
+     &                +slope2(ie0,ic1,ic2)*deltax2
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartclinreffaceflot3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff1,slope1,diff2,slope2,diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      real
+     &  arrayc(cilo1:cihi1+1,
+     &          cilo2:cihi2,
+     &          cilo0:cihi0),
+     &  arrayf(filo1:fihi1+1,
+     &          filo2:fihi2,
+     &          filo0:fihi0),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo1:cihi1+1,
+     &          cilo2:cihi2,
+     &          cilo0:cihi0),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo1:cihi1+1,
+     &          cilo2:cihi2,
+     &          cilo0:cihi0),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo1:cihi1+1,
+     &          cilo2:cihi2,
+     &          cilo0:cihi0)
+      integer ic1,ic2,ic0,ie1,ie2,ie0,if1,if2,if0,
+     &        ir1,ir2,ir0
+      real
+     &  coef2,bound
+      double precision deltax2,deltax0
+c
+c***********************************************************************
+c
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=(dble(ir2)+half)*dxf(2)-dxc(2)*half
+      enddo
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=dble(ir1)*dxf(1)
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         do ic2=ifirstc2,ilastc2
+      do ic1=ifirstc1-1,ilastc1+1
+         diff1(ic1)=arrayc(ic1+1,ic2,ic0)
+     &                -arrayc(ic1,ic2,ic0)
+      enddo
+      do ie1=ifirstc1,ilastc1+1
+         coef2=half*(diff1(ie1-1)+diff1(ie1))
+         bound=two*min(abs(diff1(ie1-1)),abs(diff1(ie1)))
+         if (diff1(ie1)*diff1(ie1-1).gt.zero) then
+           slope1(ie1,ic2,ic0)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(1) 
+         else
+            slope1(ie1,ic2,ic0)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         do ic1=ifirstc1,ilastc1+1
+      do ie2=ifirstc2,ilastc2+1
+         diff2(ie2)=arrayc(ic1,ie2,ic0)
+     &               -arrayc(ic1,ie2-1,ic0)
+      enddo
+      do ic2=ifirstc2,ilastc2
+         coef2=half*(diff2(ic2+1)+diff2(ic2))
+         bound=two*min(abs(diff2(ic2+1)),abs(diff2(ic2)))
+         if (diff2(ic2)*diff2(ic2+1).gt.zero) then
+            slope2(ic1,ic2,ic0)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(2)
+         else
+            slope2(ic1,ic2,ic0)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1+1
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ic1,ic2,ie0)
+     &               -arrayc(ic1,ic2,ie0-1)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic1,ic2,ic0)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic1,ic2,ic0)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         ir0=if0-ic0*ratio(0)
+         deltax0=deltax(ir0,0)
+         do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+            ir2=if2-ic2*ratio(2)
+            deltax2=deltax(ir2,2)
+            do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ie1=(if1+1)/ratio(1)-1
+         else
+            ie1=if1/ratio(1)
+         endif
+               ir1=if1-ie1*ratio(1)
+               arrayf(if1,if2,if0)=arrayc(ie1,ic2,ic0)
+     &                +slope1(ie1,ic2,ic0)*deltax(ir1,1)
+     &                +slope2(ie1,ic2,ic0)*deltax2
+     &                +slope0(ie1,ic2,ic0)*deltax0
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartclinreffaceflot3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff2,slope2,diff0,slope0,diff1,slope1)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      real
+     &  arrayc(cilo2:cihi2+1,
+     &          cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  arrayf(filo2:fihi2+1,
+     &          filo0:fihi0,
+     &          filo1:fihi1),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo2:cihi2+1,
+     &          cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo2:cihi2+1,
+     &          cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo2:cihi2+1,
+     &          cilo0:cihi0,
+     &          cilo1:cihi1)
+      integer ic2,ic0,ic1,ie2,ie0,ie1,if2,if0,if1,
+     &        ir2,ir0,ir1
+      real
+     &  coef2,bound
+      double precision deltax0,deltax1
+c
+c***********************************************************************
+c
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=dble(ir2)*dxf(2)
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+      do ic2=ifirstc2-1,ilastc2+1
+         diff2(ic2)=arrayc(ic2+1,ic0,ic1)
+     &                -arrayc(ic2,ic0,ic1)
+      enddo
+      do ie2=ifirstc2,ilastc2+1
+         coef2=half*(diff2(ie2-1)+diff2(ie2))
+         bound=two*min(abs(diff2(ie2-1)),abs(diff2(ie2)))
+         if (diff2(ie2)*diff2(ie2-1).gt.zero) then
+           slope2(ie2,ic0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(2) 
+         else
+            slope2(ie2,ic0,ic1)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic2=ifirstc2,ilastc2+1
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ic2,ie0,ic1)
+     &               -arrayc(ic2,ie0-1,ic1)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic2,ic0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic2,ic0,ic1)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         do ic2=ifirstc2,ilastc2+1
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ic2,ic0,ie1)
+     &               -arrayc(ic2,ic0,ie1-1)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         coef2=half*(diff1(ic1+1)+diff1(ic1))
+         bound=two*min(abs(diff1(ic1+1)),abs(diff1(ic1)))
+         if (diff1(ic1)*diff1(ic1+1).gt.zero) then
+            slope1(ic2,ic0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(1)
+         else
+            slope1(ic2,ic0,ic1)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         ir1=if1-ic1*ratio(1)
+         deltax1=deltax(ir1,1)
+         do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            ir0=if0-ic0*ratio(0)
+            deltax0=deltax(ir0,0)
+            do if2=ifirstf2,ilastf2+1
+         if (if2.lt.0) then
+            ie2=(if2+1)/ratio(2)-1
+         else
+            ie2=if2/ratio(2)
+         endif
+               ir2=if2-ie2*ratio(2)
+               arrayf(if2,if0,if1)=arrayc(ie2,ic0,ic1)
+     &                +slope2(ie2,ic0,ic1)*deltax(ir2,2)
+     &                +slope0(ie2,ic0,ic1)*deltax0
+     &                +slope1(ie2,ic0,ic1)*deltax1
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d face-centered complex data
+c***********************************************************************
+c
+c     subroutine cartclinreffacecplx3d0(
+ccart_clinref_op_face_3d(double complex,0,1,2)c
+c      subroutine cartclinreffacecplx3d1(
+ccart_clinref_op_face_3d(double complex,1,2,0)c
+c      subroutine cartclinreffacecplx3d2(
+ccart_clinref_op_face_3d(double complex,2,0,1)c
+c***********************************************************************
+c Linear interpolation for 3d node-centered double data
+c***********************************************************************
+c
+       subroutine cartlinrefnodedoub3d(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1)
+      double precision
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2+1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2+1)
+      double precision x,y,z,realrat0,realrat1,realrat2
+      integer ic0,ic1,ic2,ie0,ie1,ie2,if0,if1,if2,ir0,ir1,ir2,i,j,k
+c
+c***********************************************************************
+c
+      realrat0=one/dble(ratio(0))
+      realrat1=one/dble(ratio(1))
+      realrat2=one/dble(ratio(2))
+
+      do ic2=ifirstc2,ilastc2
+         if2=ic2*ratio(2)
+         do ir2=0,ratio(2)
+            ie2=if2+ir2
+            if ((ie2.ge.filo2).and.(ie2.le.(fihi2+1))) then
+      do ic1=ifirstc1,ilastc1
+         if1=ic1*ratio(1)
+         do ir1=0,ratio(1)
+            ie1=if1+ir1
+            if ((ie1.ge.filo1).and.(ie1.le.(fihi1+1))) then
+      do ic0=ifirstc0,ilastc0
+         if0=ic0*ratio(0)
+         do ir0=0,ratio(0)
+            ie0=if0+ir0
+            if ((ie0.ge.filo0).and.(ie0.le.(fihi0+1))) then
+               x = dble(ir0)*realrat0
+               y = dble(ir1)*realrat1
+               z = dble(ir2)*realrat2
+               arrayf(ie0,ie1,ie2)=
+     &            ( (arrayc(ic0,ic1,ic2)*(one-x) +
+     &               arrayc(ic0+1,ic1,ic2)*x)*(one-y)
+     &            + (arrayc(ic0,ic1+1,ic2)*(one-x) +
+     &               arrayc(ic0+1,ic1+1,ic2)*x)*y ) * (one-z) + 
+     &            ( (arrayc(ic0,ic1,ic2+1)*(one-x) +
+     &               arrayc(ic0+1,ic1,ic2+1)*x)*(one-y)
+     &            + (arrayc(ic0,ic1+1,ic2+1)*(one-x) +
+     &               arrayc(ic0+1,ic1+1,ic2+1)*x)*y ) * z
+           endif
+         end do
+      end do
+           endif
+         end do
+      end do
+           endif
+         end do
+      end do
+
+      return
+      end
+c
+c***********************************************************************
+c Linear interpolation for 3d node-centered float data
+c***********************************************************************
+c
+       subroutine cartlinrefnodeflot3d(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1)
+      real
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2+1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2+1)
+      double precision x,y,z,realrat0,realrat1,realrat2
+      integer ic0,ic1,ic2,ie0,ie1,ie2,if0,if1,if2,ir0,ir1,ir2,i,j,k
+c
+c***********************************************************************
+c
+      realrat0=one/dble(ratio(0))
+      realrat1=one/dble(ratio(1))
+      realrat2=one/dble(ratio(2))
+
+      do ic2=ifirstc2,ilastc2
+         if2=ic2*ratio(2)
+         do ir2=0,ratio(2)
+            ie2=if2+ir2
+            if ((ie2.ge.filo2).and.(ie2.le.(fihi2+1))) then
+      do ic1=ifirstc1,ilastc1
+         if1=ic1*ratio(1)
+         do ir1=0,ratio(1)
+            ie1=if1+ir1
+            if ((ie1.ge.filo1).and.(ie1.le.(fihi1+1))) then
+      do ic0=ifirstc0,ilastc0
+         if0=ic0*ratio(0)
+         do ir0=0,ratio(0)
+            ie0=if0+ir0
+            if ((ie0.ge.filo0).and.(ie0.le.(fihi0+1))) then
+               x = dble(ir0)*realrat0
+               y = dble(ir1)*realrat1
+               z = dble(ir2)*realrat2
+               arrayf(ie0,ie1,ie2)=
+     &            ( (arrayc(ic0,ic1,ic2)*(one-x) +
+     &               arrayc(ic0+1,ic1,ic2)*x)*(one-y)
+     &            + (arrayc(ic0,ic1+1,ic2)*(one-x) +
+     &               arrayc(ic0+1,ic1+1,ic2)*x)*y ) * (one-z) + 
+     &            ( (arrayc(ic0,ic1,ic2+1)*(one-x) +
+     &               arrayc(ic0+1,ic1,ic2+1)*x)*(one-y)
+     &            + (arrayc(ic0,ic1+1,ic2+1)*(one-x) +
+     &               arrayc(ic0+1,ic1+1,ic2+1)*x)*y ) * z
+           endif
+         end do
+      end do
+           endif
+         end do
+      end do
+           endif
+         end do
+      end do
+
+      return
+      end
+c
+c***********************************************************************
+c Linear interpolation for 3d node-centered complex data
+c***********************************************************************
+c
+       subroutine cartlinrefnodecplx3d(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1)
+      double complex
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2+1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2+1)
+      double precision x,y,z,realrat0,realrat1,realrat2
+      integer ic0,ic1,ic2,ie0,ie1,ie2,if0,if1,if2,ir0,ir1,ir2,i,j,k
+c
+c***********************************************************************
+c
+      realrat0=one/dble(ratio(0))
+      realrat1=one/dble(ratio(1))
+      realrat2=one/dble(ratio(2))
+
+      do ic2=ifirstc2,ilastc2
+         if2=ic2*ratio(2)
+         do ir2=0,ratio(2)
+            ie2=if2+ir2
+            if ((ie2.ge.filo2).and.(ie2.le.(fihi2+1))) then
+      do ic1=ifirstc1,ilastc1
+         if1=ic1*ratio(1)
+         do ir1=0,ratio(1)
+            ie1=if1+ir1
+            if ((ie1.ge.filo1).and.(ie1.le.(fihi1+1))) then
+      do ic0=ifirstc0,ilastc0
+         if0=ic0*ratio(0)
+         do ir0=0,ratio(0)
+            ie0=if0+ir0
+            if ((ie0.ge.filo0).and.(ie0.le.(fihi0+1))) then
+               x = dble(ir0)*realrat0
+               y = dble(ir1)*realrat1
+               z = dble(ir2)*realrat2
+               arrayf(ie0,ie1,ie2)=
+     &            ( (arrayc(ic0,ic1,ic2)*(one-x) +
+     &               arrayc(ic0+1,ic1,ic2)*x)*(one-y)
+     &            + (arrayc(ic0,ic1+1,ic2)*(one-x) +
+     &               arrayc(ic0+1,ic1+1,ic2)*x)*y ) * (one-z) + 
+     &            ( (arrayc(ic0,ic1,ic2+1)*(one-x) +
+     &               arrayc(ic0+1,ic1,ic2+1)*x)*(one-y)
+     &            + (arrayc(ic0,ic1+1,ic2+1)*(one-x) +
+     &               arrayc(ic0+1,ic1+1,ic2+1)*x)*y ) * z
+           endif
+         end do
+      end do
+           endif
+         end do
+      end do
+           endif
+         end do
+      end do
+
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d outerface double data
+c***********************************************************************
+c
+      subroutine cartclinrefoutfacedoub3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0,diff1,slope1,diff2,slope2)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      double precision
+     &  arrayc(cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo1:fihi1,
+     &          filo2:fihi2),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo1:cihi1,
+     &          cilo2:cihi2)
+      integer ic1,ic2,ie1,ie2,if1,if2,ir1,ir2
+      double precision
+     &  coef2,bound
+      double precision deltax2
+c
+c***********************************************************************
+c
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=(dble(ir2)+half)*dxf(2)-dxc(2)*half
+      enddo
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ie1,ic2)
+     &               -arrayc(ie1-1,ic2)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         coef2=half*(diff1(ic1+1)+diff1(ic1))
+         bound=two*min(abs(diff1(ic1+1)),abs(diff1(ic1)))
+         if (diff1(ic1)*diff1(ic1+1).gt.zero) then
+            slope1(ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(1)
+         else
+            slope1(ic1,ic2)=zero
+         endif
+      enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+      do ie2=ifirstc2,ilastc2+1
+         diff2(ie2)=arrayc(ic1,ie2)
+     &               -arrayc(ic1,ie2-1)
+      enddo
+      do ic2=ifirstc2,ilastc2
+         coef2=half*(diff2(ic2+1)+diff2(ic2))
+         bound=two*min(abs(diff2(ic2+1)),abs(diff2(ic2)))
+         if (diff2(ic2)*diff2(ic2+1).gt.zero) then
+            slope2(ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(2)
+         else
+            slope2(ic1,ic2)=zero
+         endif
+      enddo
+      enddo
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         ir2=if2-ic2*ratio(2)
+         deltax2=deltax(ir2,2)
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            ir1=if1-ic1*ratio(1)
+            arrayf(if1,if2)=arrayc(ic1,ic2)
+     &            +slope1(ic1,ic2)*deltax(ir1,1)
+     &            +slope2(ic1,ic2)*deltax2
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartclinrefoutfacedoub3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff1,slope1,diff2,slope2,diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      double precision
+     &  arrayc(cilo2:cihi2,
+     &          cilo0:cihi0),
+     &  arrayf(filo2:fihi2,
+     &          filo0:fihi0),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo2:cihi2,
+     &          cilo0:cihi0),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo2:cihi2,
+     &          cilo0:cihi0),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo2:cihi2,
+     &          cilo0:cihi0)
+      integer ic2,ic0,ie2,ie0,if2,if0,ir2,ir0
+      double precision
+     &  coef2,bound
+      double precision deltax0
+c
+c***********************************************************************
+c
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=(dble(ir2)+half)*dxf(2)-dxc(2)*half
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+      do ie2=ifirstc2,ilastc2+1
+         diff2(ie2)=arrayc(ie2,ic0)
+     &               -arrayc(ie2-1,ic0)
+      enddo
+      do ic2=ifirstc2,ilastc2
+         coef2=half*(diff2(ic2+1)+diff2(ic2))
+         bound=two*min(abs(diff2(ic2+1)),abs(diff2(ic2)))
+         if (diff2(ic2)*diff2(ic2+1).gt.zero) then
+            slope2(ic2,ic0)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(2)
+         else
+            slope2(ic2,ic0)=zero
+         endif
+      enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ic2,ie0)
+     &               -arrayc(ic2,ie0-1)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic2,ic0)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic2,ic0)=zero
+         endif
+      enddo
+      enddo
+
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         ir0=if0-ic0*ratio(0)
+         deltax0=deltax(ir0,0)
+         do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+            ir2=if2-ic2*ratio(2)
+            arrayf(if2,if0)=arrayc(ic2,ic0)
+     &            +slope2(ic2,ic0)*deltax(ir2,2)
+     &            +slope0(ic2,ic0)*deltax0
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartclinrefoutfacedoub3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff2,slope2,diff0,slope0,diff1,slope1)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      double precision
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0,
+     &          cilo1:cihi1)
+      integer ic0,ic1,ie0,ie1,if0,if1,ir0,ir1
+      double precision
+     &  coef2,bound
+      double precision deltax1
+c
+c***********************************************************************
+c
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie0,ic1)
+     &               -arrayc(ie0-1,ic1)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic0,ic1)=zero
+         endif
+      enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ic0,ie1)
+     &               -arrayc(ic0,ie1-1)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         coef2=half*(diff1(ic1+1)+diff1(ic1))
+         bound=two*min(abs(diff1(ic1+1)),abs(diff1(ic1)))
+         if (diff1(ic1)*diff1(ic1+1).gt.zero) then
+            slope1(ic0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(1)
+         else
+            slope1(ic0,ic1)=zero
+         endif
+      enddo
+      enddo
+
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         ir1=if1-ic1*ratio(1)
+         deltax1=deltax(ir1,1)
+         do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            ir0=if0-ic0*ratio(0)
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+     &            +slope0(ic0,ic1)*deltax(ir0,0)
+     &            +slope1(ic0,ic1)*deltax1
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d outerface float data
+c***********************************************************************
+c
+      subroutine cartclinrefoutfaceflot3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0,diff1,slope1,diff2,slope2)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      real
+     &  arrayc(cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo1:fihi1,
+     &          filo2:fihi2),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo1:cihi1,
+     &          cilo2:cihi2)
+      integer ic1,ic2,ie1,ie2,if1,if2,ir1,ir2
+      real
+     &  coef2,bound
+      double precision deltax2
+c
+c***********************************************************************
+c
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=(dble(ir2)+half)*dxf(2)-dxc(2)*half
+      enddo
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ie1,ic2)
+     &               -arrayc(ie1-1,ic2)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         coef2=half*(diff1(ic1+1)+diff1(ic1))
+         bound=two*min(abs(diff1(ic1+1)),abs(diff1(ic1)))
+         if (diff1(ic1)*diff1(ic1+1).gt.zero) then
+            slope1(ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(1)
+         else
+            slope1(ic1,ic2)=zero
+         endif
+      enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+      do ie2=ifirstc2,ilastc2+1
+         diff2(ie2)=arrayc(ic1,ie2)
+     &               -arrayc(ic1,ie2-1)
+      enddo
+      do ic2=ifirstc2,ilastc2
+         coef2=half*(diff2(ic2+1)+diff2(ic2))
+         bound=two*min(abs(diff2(ic2+1)),abs(diff2(ic2)))
+         if (diff2(ic2)*diff2(ic2+1).gt.zero) then
+            slope2(ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(2)
+         else
+            slope2(ic1,ic2)=zero
+         endif
+      enddo
+      enddo
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         ir2=if2-ic2*ratio(2)
+         deltax2=deltax(ir2,2)
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            ir1=if1-ic1*ratio(1)
+            arrayf(if1,if2)=arrayc(ic1,ic2)
+     &            +slope1(ic1,ic2)*deltax(ir1,1)
+     &            +slope2(ic1,ic2)*deltax2
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartclinrefoutfaceflot3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff1,slope1,diff2,slope2,diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      real
+     &  arrayc(cilo2:cihi2,
+     &          cilo0:cihi0),
+     &  arrayf(filo2:fihi2,
+     &          filo0:fihi0),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo2:cihi2,
+     &          cilo0:cihi0),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo2:cihi2,
+     &          cilo0:cihi0),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo2:cihi2,
+     &          cilo0:cihi0)
+      integer ic2,ic0,ie2,ie0,if2,if0,ir2,ir0
+      real
+     &  coef2,bound
+      double precision deltax0
+c
+c***********************************************************************
+c
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=(dble(ir2)+half)*dxf(2)-dxc(2)*half
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+      do ie2=ifirstc2,ilastc2+1
+         diff2(ie2)=arrayc(ie2,ic0)
+     &               -arrayc(ie2-1,ic0)
+      enddo
+      do ic2=ifirstc2,ilastc2
+         coef2=half*(diff2(ic2+1)+diff2(ic2))
+         bound=two*min(abs(diff2(ic2+1)),abs(diff2(ic2)))
+         if (diff2(ic2)*diff2(ic2+1).gt.zero) then
+            slope2(ic2,ic0)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(2)
+         else
+            slope2(ic2,ic0)=zero
+         endif
+      enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ic2,ie0)
+     &               -arrayc(ic2,ie0-1)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic2,ic0)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic2,ic0)=zero
+         endif
+      enddo
+      enddo
+
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         ir0=if0-ic0*ratio(0)
+         deltax0=deltax(ir0,0)
+         do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+            ir2=if2-ic2*ratio(2)
+            arrayf(if2,if0)=arrayc(ic2,ic0)
+     &            +slope2(ic2,ic0)*deltax(ir2,2)
+     &            +slope0(ic2,ic0)*deltax0
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartclinrefoutfaceflot3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff2,slope2,diff0,slope0,diff1,slope1)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      real
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0,
+     &          cilo1:cihi1)
+      integer ic0,ic1,ie0,ie1,if0,if1,ir0,ir1
+      real
+     &  coef2,bound
+      double precision deltax1
+c
+c***********************************************************************
+c
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie0,ic1)
+     &               -arrayc(ie0-1,ic1)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic0,ic1)=zero
+         endif
+      enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ic0,ie1)
+     &               -arrayc(ic0,ie1-1)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         coef2=half*(diff1(ic1+1)+diff1(ic1))
+         bound=two*min(abs(diff1(ic1+1)),abs(diff1(ic1)))
+         if (diff1(ic1)*diff1(ic1+1).gt.zero) then
+            slope1(ic0,ic1)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(1)
+         else
+            slope1(ic0,ic1)=zero
+         endif
+      enddo
+      enddo
+
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         ir1=if1-ic1*ratio(1)
+         deltax1=deltax(ir1,1)
+         do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            ir0=if0-ic0*ratio(0)
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+     &            +slope0(ic0,ic1)*deltax(ir0,0)
+     &            +slope1(ic0,ic1)*deltax1
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d outerface complex data
+c***********************************************************************
+c
+c     subroutine cartclinrefoutfacecplx3d0(
+ccart_clinref_op_outerface_3d(double complex,0,1,2)c
+c      subroutine cartclinrefoutfacecplx3d1(
+ccart_clinref_op_outerface_3d(double complex,1,2,0)c
+c      subroutine cartclinrefoutfacecplx3d2(
+ccart_clinref_op_outerface_3d(double complex,2,0,1)c
+c***********************************************************************
+c Conservative linear interpolation for 3d side-centered double data
+c***********************************************************************
+c
+      subroutine cartclinrefsidedoub3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0,diff1,slope1,diff2,slope2)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      double precision
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2)
+      integer ic0,ic1,ic2,ie0,ie1,ie2,if0,if1,if2,
+     &        ir0,ir1,ir2
+      double precision
+     &  coef2,bound
+      double precision deltax2,deltax1
+c
+c***********************************************************************
+c
+
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=dble(ir0)*dxf(0)
+      enddo
+
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=(dble(ir2)+half)*dxf(2)-dxc(2)*half
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2
+
+         do ic1=ifirstc1,ilastc1
+
+      do ic0=ifirstc0-1,ilastc0+1
+         diff0(ic0)=arrayc(ic0+1,ic1,ic2)
+     &                -arrayc(ic0,ic1,ic2)
+      enddo
+      do ie0=ifirstc0,ilastc0+1
+         coef2=half*(diff0(ie0-1)+diff0(ie0))
+         bound=two*min(abs(diff0(ie0-1)),abs(diff0(ie0)))
+         if (diff0(ie0)*diff0(ie0-1).gt.zero) then
+           slope0(ie0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(0) 
+         else
+            slope0(ie0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+            do ic2=ifirstc2,ilastc2
+
+            do ic0=ifirstc0,ilastc0+1
+
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ic0,ie1,ic2)
+     &               -arrayc(ic0,ie1-1,ic2)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         coef2=half*(diff1(ic1+1)+diff1(ic1))
+         bound=two*min(abs(diff1(ic1+1)),abs(diff1(ic1)))
+         if (diff1(ic1)*diff1(ic1+1).gt.zero) then
+            slope1(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(1)
+         else
+            slope1(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+            do ic1=ifirstc1,ilastc1
+
+            do ic0=ifirstc0,ilastc0+1
+
+      do ie2=ifirstc2,ilastc2+1
+         diff2(ie2)=arrayc(ic0,ic1,ie2)
+     &               -arrayc(ic0,ic1,ie2-1)
+      enddo
+      do ic2=ifirstc2,ilastc2
+         coef2=half*(diff2(ic2+1)+diff2(ic2))
+         bound=two*min(abs(diff2(ic2+1)),abs(diff2(ic2)))
+         if (diff2(ic2)*diff2(ic2+1).gt.zero) then
+            slope2(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(2)
+         else
+            slope2(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         ir2=if2-ic2*ratio(2)
+         deltax2=deltax(ir2,2)
+
+
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            ir1=if1-ic1*ratio(1)
+            deltax1=deltax(ir1,1)
+
+
+            do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+               ir0=if0-ic0*ratio(0)
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+     &                +slope0(ic0,ic1,ic2)*deltax(ir0,0)
+     &                +slope1(ic0,ic1,ic2)*deltax1
+     &                +slope2(ic0,ic1,ic2)*deltax2
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartclinrefsidedoub3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff1,slope1,diff2,slope2,diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      double precision
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2)
+      integer ic0,ic1,ic2,ie0,ie1,ie2,if0,if1,if2,
+     &        ir0,ir1,ir2
+      double precision
+     &  coef2,bound
+      double precision deltax2,deltax1
+c
+c***********************************************************************
+c
+
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=dble(ir1)*dxf(1)
+      enddo
+
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=(dble(ir2)+half)*dxf(2)-dxc(2)*half
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2
+
+         do ic1=ifirstc1,ilastc1+1
+
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie0,ic1,ic2)
+     &               -arrayc(ie0-1,ic1,ic2)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+            do ic2=ifirstc2,ilastc2
+
+            do ic0=ifirstc0,ilastc0
+
+      do ic1=ifirstc1-1,ilastc1+1
+         diff1(ic1)=arrayc(ic0,ic1+1,ic2)
+     &                -arrayc(ic0,ic1,ic2)
+      enddo
+      do ie1=ifirstc1,ilastc1+1
+         coef2=half*(diff1(ie1-1)+diff1(ie1))
+         bound=two*min(abs(diff1(ie1-1)),abs(diff1(ie1)))
+         if (diff1(ie1)*diff1(ie1-1).gt.zero) then
+           slope1(ic0,ie1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(1) 
+         else
+            slope1(ic0,ie1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+            do ic1=ifirstc1,ilastc1+1
+
+            do ic0=ifirstc0,ilastc0
+
+      do ie2=ifirstc2,ilastc2+1
+         diff2(ie2)=arrayc(ic0,ic1,ie2)
+     &               -arrayc(ic0,ic1,ie2-1)
+      enddo
+      do ic2=ifirstc2,ilastc2
+         coef2=half*(diff2(ic2+1)+diff2(ic2))
+         bound=two*min(abs(diff2(ic2+1)),abs(diff2(ic2)))
+         if (diff2(ic2)*diff2(ic2+1).gt.zero) then
+            slope2(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(2)
+         else
+            slope2(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         ir2=if2-ic2*ratio(2)
+         deltax2=deltax(ir2,2)
+
+
+         do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            ir1=if1-ic1*ratio(1)
+            deltax1=deltax(ir1,1)
+
+
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+               ir0=if0-ic0*ratio(0)
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+     &                +slope0(ic0,ic1,ic2)*deltax(ir0,0)
+     &                +slope1(ic0,ic1,ic2)*deltax1
+     &                +slope2(ic0,ic1,ic2)*deltax2
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartclinrefsidedoub3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff2,slope2,diff0,slope0,diff1,slope1)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      double precision
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1,
+     &          filo2:fihi2+1),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1)
+      integer ic0,ic1,ic2,ie0,ie1,ie2,if0,if1,if2,
+     &        ir0,ir1,ir2
+      double precision
+     &  coef2,bound
+      double precision deltax2,deltax1
+c
+c***********************************************************************
+c
+
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=dble(ir2)*dxf(2)
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+         do ic1=ifirstc1,ilastc1
+
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie0,ic1,ic2)
+     &               -arrayc(ie0-1,ic1,ic2)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+            do ic2=ifirstc2,ilastc2+1
+
+            do ic0=ifirstc0,ilastc0
+
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ic0,ie1,ic2)
+     &               -arrayc(ic0,ie1-1,ic2)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         coef2=half*(diff1(ic1+1)+diff1(ic1))
+         bound=two*min(abs(diff1(ic1+1)),abs(diff1(ic1)))
+         if (diff1(ic1)*diff1(ic1+1).gt.zero) then
+            slope1(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(1)
+         else
+            slope1(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+            do ic1=ifirstc1,ilastc1
+
+            do ic0=ifirstc0,ilastc0
+
+      do ic2=ifirstc2-1,ilastc2+1
+         diff2(ic2)=arrayc(ic0,ic1,ic2+1)
+     &                -arrayc(ic0,ic1,ic2)
+      enddo
+      do ie2=ifirstc2,ilastc2+1
+         coef2=half*(diff2(ie2-1)+diff2(ie2))
+         bound=two*min(abs(diff2(ie2-1)),abs(diff2(ie2)))
+         if (diff2(ie2)*diff2(ie2-1).gt.zero) then
+           slope2(ic0,ic1,ie2)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(2) 
+         else
+            slope2(ic0,ic1,ie2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+      do if2=ifirstf2,ilastf2+1
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         ir2=if2-ic2*ratio(2)
+         deltax2=deltax(ir2,2)
+
+
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            ir1=if1-ic1*ratio(1)
+            deltax1=deltax(ir1,1)
+
+
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+               ir0=if0-ic0*ratio(0)
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+     &                +slope0(ic0,ic1,ic2)*deltax(ir0,0)
+     &                +slope1(ic0,ic1,ic2)*deltax1
+     &                +slope2(ic0,ic1,ic2)*deltax2
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d side-centered float data
+c***********************************************************************
+c
+      subroutine cartclinrefsideflot3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0,diff1,slope1,diff2,slope2)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      real
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2)
+      integer ic0,ic1,ic2,ie0,ie1,ie2,if0,if1,if2,
+     &        ir0,ir1,ir2
+      real
+     &  coef2,bound
+      double precision deltax2,deltax1
+c
+c***********************************************************************
+c
+
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=dble(ir0)*dxf(0)
+      enddo
+
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=(dble(ir2)+half)*dxf(2)-dxc(2)*half
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2
+
+         do ic1=ifirstc1,ilastc1
+
+      do ic0=ifirstc0-1,ilastc0+1
+         diff0(ic0)=arrayc(ic0+1,ic1,ic2)
+     &                -arrayc(ic0,ic1,ic2)
+      enddo
+      do ie0=ifirstc0,ilastc0+1
+         coef2=half*(diff0(ie0-1)+diff0(ie0))
+         bound=two*min(abs(diff0(ie0-1)),abs(diff0(ie0)))
+         if (diff0(ie0)*diff0(ie0-1).gt.zero) then
+           slope0(ie0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(0) 
+         else
+            slope0(ie0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+            do ic2=ifirstc2,ilastc2
+
+            do ic0=ifirstc0,ilastc0+1
+
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ic0,ie1,ic2)
+     &               -arrayc(ic0,ie1-1,ic2)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         coef2=half*(diff1(ic1+1)+diff1(ic1))
+         bound=two*min(abs(diff1(ic1+1)),abs(diff1(ic1)))
+         if (diff1(ic1)*diff1(ic1+1).gt.zero) then
+            slope1(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(1)
+         else
+            slope1(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+            do ic1=ifirstc1,ilastc1
+
+            do ic0=ifirstc0,ilastc0+1
+
+      do ie2=ifirstc2,ilastc2+1
+         diff2(ie2)=arrayc(ic0,ic1,ie2)
+     &               -arrayc(ic0,ic1,ie2-1)
+      enddo
+      do ic2=ifirstc2,ilastc2
+         coef2=half*(diff2(ic2+1)+diff2(ic2))
+         bound=two*min(abs(diff2(ic2+1)),abs(diff2(ic2)))
+         if (diff2(ic2)*diff2(ic2+1).gt.zero) then
+            slope2(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(2)
+         else
+            slope2(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         ir2=if2-ic2*ratio(2)
+         deltax2=deltax(ir2,2)
+
+
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            ir1=if1-ic1*ratio(1)
+            deltax1=deltax(ir1,1)
+
+
+            do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+               ir0=if0-ic0*ratio(0)
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+     &                +slope0(ic0,ic1,ic2)*deltax(ir0,0)
+     &                +slope1(ic0,ic1,ic2)*deltax1
+     &                +slope2(ic0,ic1,ic2)*deltax2
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartclinrefsideflot3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff1,slope1,diff2,slope2,diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      real
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2)
+      integer ic0,ic1,ic2,ie0,ie1,ie2,if0,if1,if2,
+     &        ir0,ir1,ir2
+      real
+     &  coef2,bound
+      double precision deltax2,deltax1
+c
+c***********************************************************************
+c
+
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=dble(ir1)*dxf(1)
+      enddo
+
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=(dble(ir2)+half)*dxf(2)-dxc(2)*half
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2
+
+         do ic1=ifirstc1,ilastc1+1
+
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie0,ic1,ic2)
+     &               -arrayc(ie0-1,ic1,ic2)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+            do ic2=ifirstc2,ilastc2
+
+            do ic0=ifirstc0,ilastc0
+
+      do ic1=ifirstc1-1,ilastc1+1
+         diff1(ic1)=arrayc(ic0,ic1+1,ic2)
+     &                -arrayc(ic0,ic1,ic2)
+      enddo
+      do ie1=ifirstc1,ilastc1+1
+         coef2=half*(diff1(ie1-1)+diff1(ie1))
+         bound=two*min(abs(diff1(ie1-1)),abs(diff1(ie1)))
+         if (diff1(ie1)*diff1(ie1-1).gt.zero) then
+           slope1(ic0,ie1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(1) 
+         else
+            slope1(ic0,ie1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+            do ic1=ifirstc1,ilastc1+1
+
+            do ic0=ifirstc0,ilastc0
+
+      do ie2=ifirstc2,ilastc2+1
+         diff2(ie2)=arrayc(ic0,ic1,ie2)
+     &               -arrayc(ic0,ic1,ie2-1)
+      enddo
+      do ic2=ifirstc2,ilastc2
+         coef2=half*(diff2(ic2+1)+diff2(ic2))
+         bound=two*min(abs(diff2(ic2+1)),abs(diff2(ic2)))
+         if (diff2(ic2)*diff2(ic2+1).gt.zero) then
+            slope2(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(2)
+         else
+            slope2(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         ir2=if2-ic2*ratio(2)
+         deltax2=deltax(ir2,2)
+
+
+         do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            ir1=if1-ic1*ratio(1)
+            deltax1=deltax(ir1,1)
+
+
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+               ir0=if0-ic0*ratio(0)
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+     &                +slope0(ic0,ic1,ic2)*deltax(ir0,0)
+     &                +slope1(ic0,ic1,ic2)*deltax1
+     &                +slope2(ic0,ic1,ic2)*deltax2
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine cartclinrefsideflot3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff2,slope2,diff0,slope0,diff1,slope1)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  dxc(0:3-1),
+     &  dxf(0:3-1),
+     &  deltax(0:15,0:3-1)
+      real
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1,
+     &          filo2:fihi2+1),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1)
+      integer ic0,ic1,ic2,ie0,ie1,ie2,if0,if1,if2,
+     &        ir0,ir1,ir2
+      real
+     &  coef2,bound
+      double precision deltax2,deltax1
+c
+c***********************************************************************
+c
+
+
+      do ir0=0,ratio(0)-1
+         deltax(ir0,0)=(dble(ir0)+half)*dxf(0)-dxc(0)*half
+      enddo
+
+
+      do ir1=0,ratio(1)-1
+         deltax(ir1,1)=(dble(ir1)+half)*dxf(1)-dxc(1)*half
+      enddo
+
+
+      do ir2=0,ratio(2)-1
+         deltax(ir2,2)=dble(ir2)*dxf(2)
+      enddo
+
+
+      do ic2=ifirstc2,ilastc2+1
+
+         do ic1=ifirstc1,ilastc1
+
+      do ie0=ifirstc0,ilastc0+1
+         diff0(ie0)=arrayc(ie0,ic1,ic2)
+     &               -arrayc(ie0-1,ic1,ic2)
+      enddo
+      do ic0=ifirstc0,ilastc0
+         coef2=half*(diff0(ic0+1)+diff0(ic0))
+         bound=two*min(abs(diff0(ic0+1)),abs(diff0(ic0)))
+         if (diff0(ic0)*diff0(ic0+1).gt.zero) then
+            slope0(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(0)
+         else
+            slope0(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+            do ic2=ifirstc2,ilastc2+1
+
+            do ic0=ifirstc0,ilastc0
+
+      do ie1=ifirstc1,ilastc1+1
+         diff1(ie1)=arrayc(ic0,ie1,ic2)
+     &               -arrayc(ic0,ie1-1,ic2)
+      enddo
+      do ic1=ifirstc1,ilastc1
+         coef2=half*(diff1(ic1+1)+diff1(ic1))
+         bound=two*min(abs(diff1(ic1+1)),abs(diff1(ic1)))
+         if (diff1(ic1)*diff1(ic1+1).gt.zero) then
+            slope1(ic0,ic1,ic2)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc(1)
+         else
+            slope1(ic0,ic1,ic2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+            do ic1=ifirstc1,ilastc1
+
+            do ic0=ifirstc0,ilastc0
+
+      do ic2=ifirstc2-1,ilastc2+1
+         diff2(ic2)=arrayc(ic0,ic1,ic2+1)
+     &                -arrayc(ic0,ic1,ic2)
+      enddo
+      do ie2=ifirstc2,ilastc2+1
+         coef2=half*(diff2(ie2-1)+diff2(ie2))
+         bound=two*min(abs(diff2(ie2-1)),abs(diff2(ie2)))
+         if (diff2(ie2)*diff2(ie2-1).gt.zero) then
+           slope2(ic0,ic1,ie2)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc(2) 
+         else
+            slope2(ic0,ic1,ie2)=zero
+         endif
+      enddo
+         enddo
+      enddo
+
+
+      do if2=ifirstf2,ilastf2+1
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         ir2=if2-ic2*ratio(2)
+         deltax2=deltax(ir2,2)
+
+
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            ir1=if1-ic1*ratio(1)
+            deltax1=deltax(ir1,1)
+
+
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+               ir0=if0-ic0*ratio(0)
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+     &                +slope0(ic0,ic1,ic2)*deltax(ir0,0)
+     &                +slope1(ic0,ic1,ic2)*deltax1
+     &                +slope2(ic0,ic1,ic2)*deltax2
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d side-centered complex data
+c***********************************************************************
+c
+c     subroutine cartclinrefsidecplx3d0(
+ccart_clinref_op_side_3d(double complex,0,1,2)c
+c      subroutine cartclinrefsidecplx3d1(
+ccart_clinref_op_side_3d(double complex,1,2,0)c
+c      subroutine cartclinrefsidecplx3d2(
+ccart_clinref_op_side_3d(double complex,2,0,1)c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/fortran/geom_cartrefine3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/fortran/geom_cartrefine3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,217 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_cartrefine3d.m4 $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for spatial refining of 3d patch data
+c               on a regular Cartesian mesh.
+c
+include(geom_m4cartrefineops3d.i)dnl
+c
+c***********************************************************************
+c Linear interpolation for 3d cell-centered double data
+c***********************************************************************
+c
+      subroutine cartlinrefcelldoub3d(
+cart_linref_op_cell_3d(`double precision')dnl
+c
+c***********************************************************************
+c Linear interpolation for 3d cell-centered float data
+c***********************************************************************
+c
+      subroutine cartlinrefcellflot3d(
+cart_linref_op_cell_3d(`real')dnl
+c
+c***********************************************************************
+c Linear interpolation for 3d cell-centered complex data
+c***********************************************************************
+c
+      subroutine cartlinrefcellcplx3d(
+cart_linref_op_cell_3d(`double complex')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d cell-centered double data
+c***********************************************************************
+c
+      subroutine cartclinrefcelldoub3d(
+cart_clinref_op_cell_3d(`double precision')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d cell-centered float data
+c***********************************************************************
+c
+      subroutine cartclinrefcellflot3d(
+cart_clinref_op_cell_3d(`real')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d cell-centered complex data
+c***********************************************************************
+c
+      subroutine cartclinrefcellcplx3d(
+cart_clinref_op_cell_3d(`double complex')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d edge-centered double data
+c***********************************************************************
+c
+      subroutine cartclinrefedgedoub3d0(
+cart_clinref_op_edge_3d(`double precision',0,1,2)dnl
+c
+      subroutine cartclinrefedgedoub3d1(
+cart_clinref_op_edge_3d(`double precision',1,2,0)dnl
+c
+      subroutine cartclinrefedgedoub3d2(
+cart_clinref_op_edge_3d(`double precision',2,0,1)dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d edge-centered float data
+c***********************************************************************
+c
+      subroutine cartclinrefedgeflot3d0(
+cart_clinref_op_edge_3d(`real',0,1,2)dnl
+c
+      subroutine cartclinrefedgeflot3d1(
+cart_clinref_op_edge_3d(`real',1,2,0)dnl
+c
+      subroutine cartclinrefedgeflot3d2(
+cart_clinref_op_edge_3d(`real',2,0,1)dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d face-centered double data
+c***********************************************************************
+c
+      subroutine cartclinreffacedoub3d0(
+cart_clinref_op_face_3d(`double precision',0,1,2)dnl
+c
+      subroutine cartclinreffacedoub3d1(
+cart_clinref_op_face_3d(`double precision',1,2,0)dnl
+c
+      subroutine cartclinreffacedoub3d2(
+cart_clinref_op_face_3d(`double precision',2,0,1)dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d face-centered float data
+c***********************************************************************
+c
+      subroutine cartclinreffaceflot3d0(
+cart_clinref_op_face_3d(`real',0,1,2)dnl
+c
+      subroutine cartclinreffaceflot3d1(
+cart_clinref_op_face_3d(`real',1,2,0)dnl
+c
+      subroutine cartclinreffaceflot3d2(
+cart_clinref_op_face_3d(`real',2,0,1)dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d face-centered complex data
+c***********************************************************************
+c
+c     subroutine cartclinreffacecplx3d0(
+ccart_clinref_op_face_3d(`double complex',0,1,2)dnl
+c
+c      subroutine cartclinreffacecplx3d1(
+ccart_clinref_op_face_3d(`double complex',1,2,0)dnl
+c
+c      subroutine cartclinreffacecplx3d2(
+ccart_clinref_op_face_3d(`double complex',2,0,1)dnl
+c
+c***********************************************************************
+c Linear interpolation for 3d node-centered double data
+c***********************************************************************
+c
+       subroutine cartlinrefnodedoub3d(
+cart_linref_op_node_3d(`double precision')dnl
+c
+c***********************************************************************
+c Linear interpolation for 3d node-centered float data
+c***********************************************************************
+c
+       subroutine cartlinrefnodeflot3d(
+cart_linref_op_node_3d(`real')dnl
+c
+c***********************************************************************
+c Linear interpolation for 3d node-centered complex data
+c***********************************************************************
+c
+       subroutine cartlinrefnodecplx3d(
+cart_linref_op_node_3d(`double complex')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d outerface double data
+c***********************************************************************
+c
+      subroutine cartclinrefoutfacedoub3d0(
+cart_clinref_op_outerface_3d(`double precision',0,1,2)dnl
+c
+      subroutine cartclinrefoutfacedoub3d1(
+cart_clinref_op_outerface_3d(`double precision',1,2,0)dnl
+c
+      subroutine cartclinrefoutfacedoub3d2(
+cart_clinref_op_outerface_3d(`double precision',2,0,1)dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d outerface float data
+c***********************************************************************
+c
+      subroutine cartclinrefoutfaceflot3d0(
+cart_clinref_op_outerface_3d(`real',0,1,2)dnl
+c
+      subroutine cartclinrefoutfaceflot3d1(
+cart_clinref_op_outerface_3d(`real',1,2,0)dnl
+c
+      subroutine cartclinrefoutfaceflot3d2(
+cart_clinref_op_outerface_3d(`real',2,0,1)dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d outerface complex data
+c***********************************************************************
+c
+c     subroutine cartclinrefoutfacecplx3d0(
+ccart_clinref_op_outerface_3d(`double complex',0,1,2)dnl
+c
+c      subroutine cartclinrefoutfacecplx3d1(
+ccart_clinref_op_outerface_3d(`double complex',1,2,0)dnl
+c
+c      subroutine cartclinrefoutfacecplx3d2(
+ccart_clinref_op_outerface_3d(`double complex',2,0,1)dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d side-centered double data
+c***********************************************************************
+c
+      subroutine cartclinrefsidedoub3d0(
+cart_clinref_op_side_3d(`double precision',0,1,2)dnl
+c
+      subroutine cartclinrefsidedoub3d1(
+cart_clinref_op_side_3d(`double precision',1,2,0)dnl
+c
+      subroutine cartclinrefsidedoub3d2(
+cart_clinref_op_side_3d(`double precision',2,0,1)dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d side-centered float data
+c***********************************************************************
+c
+      subroutine cartclinrefsideflot3d0(
+cart_clinref_op_side_3d(`real',0,1,2)dnl
+c
+      subroutine cartclinrefsideflot3d1(
+cart_clinref_op_side_3d(`real',1,2,0)dnl
+c
+      subroutine cartclinrefsideflot3d2(
+cart_clinref_op_side_3d(`real',2,0,1)dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d side-centered complex data
+c***********************************************************************
+c
+c     subroutine cartclinrefsidecplx3d0(
+ccart_clinref_op_side_3d(`double complex',0,1,2)dnl
+c
+c      subroutine cartclinrefsidecplx3d1(
+ccart_clinref_op_side_3d(`double complex',1,2,0)dnl
+c
+c      subroutine cartclinrefsidecplx3d2(
+ccart_clinref_op_side_3d(`double complex',2,0,1)dnl
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/fortran/geom_m4cartcoarsenops1d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/fortran/geom_m4cartcoarsenops1d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,138 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_m4cartcoarsenops1d.i $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 1d Cartesian coarsen operators
+c
+define(NDIM,1)dnl
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim1d.i)dnl
+define(cart_coarsen_op_subroutine_head_1d,`dnl
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:NDIM-1)
+      double precision
+     &  dxf(0:NDIM-1),
+     &  dxc(0:NDIM-1)
+')dnl
+c
+define(cart_wgtavg_cell_body_1d,`dnl
+c
+c***********************************************************************
+c
+      dVf = dxf(0)
+      dVc = dxc(0)
+
+      do ic0=ifirstc0,ilastc0
+ifelse($1,`double complex',`dnl
+         arrayc(ic0) = cmplx(zero, zero)
+',`dnl
+         arrayc(ic0) = zero
+')dnl
+      enddo
+
+      do ir0=0,ratio(0)-1
+         do ic0=ifirstc0,ilastc0
+            if0=ic0*ratio(0)+ir0
+            arrayc(ic0)=arrayc(ic0)+arrayf(if0)*dVf
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         arrayc(ic0)=arrayc(ic0)/dVc
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_injection_body_1d,`dnl
+c
+c***********************************************************************
+c
+      do $1=$2
+         arrayc($1)=arrayf($1*ratio(0))
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_wgtavg_op_cell_1d,`dnl
+cart_coarsen_op_subroutine_head_1d()dnl
+      $1
+     &  arrayf(CELL1d(filo,fihi,0)),
+     &  arrayc(CELL1d(cilo,cihi,0))
+      double precision dVf,dVc
+      integer ic0,if0,ir0
+cart_wgtavg_cell_body_1d($1)dnl
+')dnl
+c
+define(cart_wgtavg_op_edge_1d,`dnl
+cart_coarsen_op_subroutine_head_1d()dnl
+      $1
+     &  arrayf(EDGE1d(filo,fihi,0)),
+     &  arrayc(EDGE1d(cilo,cihi,0))
+      double precision dVf,dVc
+      integer ic0,if0,ir0
+cart_wgtavg_cell_body_1d($1)dnl
+')dnl
+c
+define(cart_wgtavg_op_face_1d,`dnl
+cart_coarsen_op_subroutine_head_1d()dnl
+      $1
+     &  arrayf(FACE1d(filo,fihi,0)),
+     &  arrayc(FACE1d(cilo,cihi,0))
+      integer ie0
+cart_injection_body_1d(`ie0',`ifirstc0,ilastc0+1')dnl
+')dnl
+c
+define(cart_wgtavg_op_outerface_1d,`dnl
+cart_coarsen_op_subroutine_head_1d()dnl
+      $1
+     &  arrayf(OUTERFACE1d(filo,fihi,0)),
+     &  arrayc(OUTERFACE1d(cilo,cihi,0))
+c
+c***********************************************************************
+c
+      arrayc(1)=arrayf(1)
+c
+      return
+      end    
+')dnl
+define(cart_wgtavg_op_outerside_1d,`dnl
+cart_coarsen_op_subroutine_head_1d()dnl
+      $1
+     &  arrayf(OUTERSIDE1d(filo,fihi,0)),
+     &  arrayc(OUTERSIDE1d(cilo,cihi,0))
+c
+c***********************************************************************
+c
+      arrayc(1)=arrayf(1)
+c
+      return
+      end    
+')dnl
+define(cart_wgtavg_op_side_1d,`dnl
+cart_coarsen_op_subroutine_head_1d()dnl
+      $1
+     &  arrayf(SIDE1d(filo,fihi,0)),
+     &  arrayc(SIDE1d(cilo,cihi,0))
+      integer ie0
+cart_injection_body_1d(`ie0',`ifirstc0,ilastc0+1')dnl
+')dnl
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/fortran/geom_m4cartcoarsenops2d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/fortran/geom_m4cartcoarsenops2d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,319 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_m4cartcoarsenops2d.i $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 2d Cartesian coarsen operators
+c
+define(NDIM,2)dnl
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+define(cart_coarsen_op_subroutine_head_2d,`dnl
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:NDIM-1)
+      double precision
+     &  dxf(0:NDIM-1),
+     &  dxc(0:NDIM-1)
+')dnl
+c
+define(cart_wgtavg_cell_body_2d,`dnl
+c
+c***********************************************************************
+c
+      dVf = dxf(0)*dxf(1)
+      dVc = dxc(0)*dxc(1)
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+ifelse($1,`double complex',`dnl
+            arrayc(ic0,ic1)=cmplx(zero,zero)
+',`dnl
+            arrayc(ic0,ic1)=zero
+')dnl
+         enddo
+      enddo
+
+      do ir1=0,ratio(1)-1
+         do ir0=0,ratio(0)-1
+            do ic1=ifirstc1,ilastc1
+               if1=ic1*ratio(1)+ir1
+               do ic0=ifirstc0,ilastc0
+                  if0=ic0*ratio(0)+ir0
+                  arrayc(ic0,ic1)=arrayc(ic0,ic1)
+     &                            +arrayf(if0,if1)*dVf
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            arrayc(ic0,ic1)=arrayc(ic0,ic1)/dVc
+        enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_wgtavg_edge_body_2d,`dnl
+c
+c***********************************************************************
+c
+      lengthf=dxf($2)
+      lengthc=dxc($2)
+
+      do ic1=ifirstc1,ilastc1+$3
+         do ic0=ifirstc0,ilastc0+$2
+ifelse($1,`double complex',`dnl
+            arrayc(ic0,ic1)=cmplx(zero,zero)
+',`dnl
+            arrayc(ic0,ic1)=zero
+')dnl
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+$3
+ifelse($2,`1',`
+         do ir=0,ratio(1)-1
+            if1=ic1*ratio(1)+ir
+',`
+            if1=ic1*ratio(1)
+')dnl
+            do ic0=ifirstc0,ilastc0+$2
+ifelse($2,`0',`
+               do ir=0,ratio(0)-1
+                  if0=ic0*ratio(0)+ir
+',`
+                  if0=ic0*ratio(0)
+')dnl
+                  arrayc(ic0,ic1)=arrayc(ic0,ic1)
+     &                           +arrayf(if0,if1)*lengthf
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+$3
+         do ic0=ifirstc0,ilastc0+$2
+            arrayc(ic0,ic1)=arrayc(ic0,ic1)/lengthc
+        enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_wgtavg_face_body_2d,`dnl
+c
+c***********************************************************************
+c
+      lengthf=dxf($3)
+      lengthc=dxc($3)
+
+      do ic$3=ifirstc$3,ilastc$3
+         do ie$2=ifirstc$2,ilastc$2+1
+ifelse($1,`double complex',`dnl
+            arrayc(ie$2,ic$3)=cmplx(zero,zero)
+',`dnl
+            arrayc(ie$2,ic$3)=zero
+')dnl
+         enddo
+      enddo
+
+      do ir$3=0,ratio($3)-1
+         do ic$3=ifirstc$3,ilastc$3
+            if$3=ic$3*ratio($3)+ir$3
+            do ie$2=ifirstc$2,ilastc$2+1
+               if$2=ie$2*ratio($2)
+               arrayc(ie$2,ic$3)=arrayc(ie$2,ic$3)
+     &                           +arrayf(if$2,if$3)*lengthf
+            enddo
+         enddo
+      enddo
+
+      do ic$3=ifirstc$3,ilastc$3
+         do ie$2=ifirstc$2,ilastc$2+1
+            arrayc(ie$2,ic$3)=arrayc(ie$2,ic$3)/lengthc
+        enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_wgtavg_side_body_2d,`dnl
+c
+c***********************************************************************
+c
+      lengthf=dxf($3)
+      lengthc=dxc($3)
+
+      do ic1=ifirstc1,ilastc1+$2
+         do ic0=ifirstc0,ilastc0+$3
+ifelse($1,`double complex',`dnl
+            arrayc(ic0,ic1)=cmplx(zero,zero)
+',`dnl
+            arrayc(ic0,ic1)=zero
+')dnl
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+$2
+ifelse($2,`1',`
+            if1=ic1*ratio(1)
+',`
+         do ir=0,ratio(1)-1
+            if1=ic1*ratio(1)+ir
+')dnl
+            do ic0=ifirstc0,ilastc0+$3
+ifelse($2,`0',`
+                  if0=ic0*ratio(0)
+',`
+               do ir=0,ratio(0)-1
+                  if0=ic0*ratio(0)+ir
+')dnl
+               arrayc(ic0,ic1)=arrayc(ic0,ic1)
+     &                           +arrayf(if0,if1)*lengthf
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1+$2
+         do ic0=ifirstc0,ilastc0+$3
+            arrayc(ic0,ic1)=arrayc(ic0,ic1)/lengthc
+        enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_wgtavg_outerface_body_2d,`dnl
+c
+c***********************************************************************
+c
+      lengthf=dxf($3)
+      lengthc=dxc($3)
+
+      do ic$3=ifirstc$3,ilastc$3
+ifelse($1,`double complex',`dnl
+         arrayc(ic$3)=cmplx(zero,zero)
+',`dnl
+         arrayc(ic$3)=zero
+')dnl
+      enddo
+
+      do ir$3=0,ratio($3)-1
+         do ic$3=ifirstc$3,ilastc$3
+            if$3=ic$3*ratio($3)+ir$3
+            arrayc(ic$3)=arrayc(ic$3)+arrayf(if$3)*lengthf
+         enddo
+      enddo
+
+      do ic$3=ifirstc$3,ilastc$3
+         arrayc(ic$3)=arrayc(ic$3)/lengthc
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_wgtavg_outerside_body_2d,`dnl
+c
+c***********************************************************************
+c
+      lengthf=dxf($3)
+      lengthc=dxc($3)
+
+      do ic$3=ifirstc$3,ilastc$3
+ifelse($1,`double complex',`dnl
+         arrayc(ic$3)=cmplx(zero,zero)
+',`dnl
+         arrayc(ic$3)=zero
+')dnl
+      enddo
+
+      do ir$3=0,ratio($3)-1
+         do ic$3=ifirstc$3,ilastc$3
+            if$3=ic$3*ratio($3)+ir$3
+            arrayc(ic$3)=arrayc(ic$3)+arrayf(if$3)*lengthf
+         enddo
+      enddo
+
+      do ic$3=ifirstc$3,ilastc$3
+         arrayc(ic$3)=arrayc(ic$3)/lengthc
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_wgtavg_op_cell_2d,`dnl
+cart_coarsen_op_subroutine_head_2d()dnl
+      $1
+     &  arrayf(CELL2d(filo,fihi,0)),
+     &  arrayc(CELL2d(cilo,cihi,0))
+      double precision dVf,dVc
+      integer ic0,ic1,if0,if1,ir0,ir1
+cart_wgtavg_cell_body_2d($1)dnl
+')dnl
+c
+define(cart_wgtavg_op_edge_2d,`dnl
+cart_coarsen_op_subroutine_head_2d()dnl
+      $1
+     &  arrayf(EDGE2d$2(filo,fihi,0)),
+     &  arrayc(EDGE2d$2(cilo,cihi,0))
+      double precision lengthf, lengthc
+      integer ic0,ic1,if0,if1,ir
+cart_wgtavg_edge_body_2d($1,$2,$3)dnl
+')dnl
+define(cart_wgtavg_op_face_2d,`dnl
+cart_coarsen_op_subroutine_head_2d()dnl
+      $1
+     &  arrayf(FACE2d$2(filo,fihi,0)),
+     &  arrayc(FACE2d$2(cilo,cihi,0))
+      double precision lengthf, lengthc
+      integer ie$2,ic$3,if$2,if$3,ir$3
+cart_wgtavg_face_body_2d($1,$2,$3)dnl
+')dnl
+define(cart_wgtavg_op_side_2d,`dnl
+cart_coarsen_op_subroutine_head_2d()dnl
+      $1
+     &  arrayf(SIDE2d$2(filo,fihi,0)),
+     &  arrayc(SIDE2d$2(cilo,cihi,0))
+      double precision lengthf, lengthc
+      integer ic0,ic1,if0,if1,ir
+cart_wgtavg_side_body_2d($1,$2,$3)dnl
+')dnl
+define(cart_wgtavg_op_outerface_2d,`dnl
+cart_coarsen_op_subroutine_head_2d()dnl
+      $1
+     &  arrayf(OUTERFACE2d$2(filo,fihi,0)),
+     &  arrayc(OUTERFACE2d$2(cilo,cihi,0))
+      double precision lengthf, lengthc
+      integer ic$3,if$3,ir$3
+cart_wgtavg_outerface_body_2d($1,$2,$3)dnl
+')dnl
+define(cart_wgtavg_op_outerside_2d,`dnl
+cart_coarsen_op_subroutine_head_2d()dnl
+      $1
+     &  arrayf(OUTERSIDE2d$2(filo,fihi,0)),
+     &  arrayc(OUTERSIDE2d$2(cilo,cihi,0))
+      double precision lengthf, lengthc
+      integer ic$3,if$3,ir$3
+cart_wgtavg_outerside_body_2d($1,$2,$3)dnl
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/fortran/geom_m4cartcoarsenops3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/fortran/geom_m4cartcoarsenops3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,491 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_m4cartcoarsenops3d.i $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 3d Cartesian coarsen operators
+c
+define(NDIM,3)dnl
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+define(cart_coarsen_op_subroutine_head_3d,`dnl
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:NDIM-1)
+      double precision
+     &  dxf(0:NDIM-1),
+     &  dxc(0:NDIM-1)
+')dnl
+c
+define(cart_wgtavg_cell_body_3d,`dnl
+c
+c***********************************************************************
+c
+      dVf = dxf(0)*dxf(1)*dxf(2)
+      dVc = dxc(0)*dxc(1)*dxc(2)
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            do ic0=ifirstc0,ilastc0
+ifelse($1,`double complex',`dnl
+               arrayc(ic0,ic1,ic2)=cmplx(zero,zero)
+',`dnl
+               arrayc(ic0,ic1,ic2)=zero
+')dnl
+            enddo
+         enddo
+      enddo
+
+      do ir2=0,ratio(2)-1
+         do ir1=0,ratio(1)-1
+            do ir0=0,ratio(0)-1
+               do ic2=ifirstc2,ilastc2
+                  if2=ic2*ratio(2)+ir2
+                  do ic1=ifirstc1,ilastc1
+                     if1=ic1*ratio(1)+ir1
+                     do ic0=ifirstc0,ilastc0
+                        if0=ic0*ratio(0)+ir0
+                        arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)
+     &                                      +arrayf(if0,if1,if2)*dVf
+                     enddo
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            do ic0=ifirstc0,ilastc0
+               arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)/dVc
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_wgtavg_edge_body_3d,`dnl
+c
+c***********************************************************************
+c
+      lengthf=dxf($2)
+      lengthc=dxc($2)
+
+ifelse($2,`2',`
+      do ic2=ifirstc2,ilastc2 
+',`
+      do ic2=ifirstc2,ilastc2+1
+')dnl
+ifelse($2,`1',`
+         do ic1=ifirstc1,ilastc1
+',`
+         do ic1=ifirstc1,ilastc1+1
+')dnl
+ifelse($2,`0',`
+            do ic0=ifirstc0,ilastc0
+',`
+            do ic0=ifirstc0,ilastc0+1
+')dnl
+
+ifelse($1,`double complex',`dnl
+               arrayc(ic0,ic1,ic2)=cmplx(zero,zero)
+',`dnl
+               arrayc(ic0,ic1,ic2)=zero
+')dnl
+            enddo
+         enddo
+      enddo
+
+ifelse($2,`2',`
+      do ic2=ifirstc2,ilastc2 
+         do ir=0,ratio($2)-1
+            if2=ic2*ratio(2)+ir
+',`
+      do ic2=ifirstc2,ilastc2+1
+            if2=ic2*ratio(2)
+')dnl
+
+ifelse($2,`1',`
+         do ic1=ifirstc1,ilastc1
+            do ir=0,ratio($2)-1
+               if1=ic1*ratio(1)+ir
+',`
+         do ic1=ifirstc1,ilastc1+1
+               if1=ic1*ratio(1)
+')dnl
+
+ifelse($2,`0',`
+            do ic0=ifirstc0,ilastc0
+               do ir=0,ratio($2)-1
+                  if0=ic0*ratio(0)+ir
+',`
+            do ic0=ifirstc0,ilastc0+1
+                  if0=ic0*ratio(0)
+')dnl
+                  arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)
+     &                             +arrayf(if0,if1,if2)*lengthf
+               enddo
+            enddo
+         enddo
+      enddo
+
+ifelse($2,`2',`
+      do ic2=ifirstc2,ilastc2 
+',`
+      do ic2=ifirstc2,ilastc2+1
+')dnl
+ifelse($2,`1',`
+         do ic1=ifirstc1,ilastc1
+',`
+         do ic1=ifirstc1,ilastc1+1
+')dnl
+ifelse($2,`0',`
+            do ic0=ifirstc0,ilastc0
+',`
+            do ic0=ifirstc0,ilastc0+1
+')dnl
+               arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)/lengthc
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_wgtavg_face_body_3d,`dnl
+c
+c***********************************************************************
+c
+      areaf=dxf($3)*dxf($4)
+      areac=dxc($3)*dxc($4)
+
+      do ic$4=ifirstc$4,ilastc$4
+         do ic$3=ifirstc$3,ilastc$3
+            do ie$2=ifirstc$2,ilastc$2+1
+ifelse($1,`double complex',`dnl
+               arrayc(ie$2,ic$3,ic$4)=cmplx(zero,zero)
+',`dnl
+               arrayc(ie$2,ic$3,ic$4)=zero
+')dnl
+            enddo
+         enddo
+      enddo
+
+      do ir$4=0,ratio($4)-1
+         do ir$3=0,ratio($3)-1
+            do ic$4=ifirstc$4,ilastc$4
+               if$4=ic$4*ratio($4)+ir$4
+               do ic$3=ifirstc$3,ilastc$3
+                  if$3=ic$3*ratio($3)+ir$3
+                  do ie$2=ifirstc$2,ilastc$2+1
+                     if$2=ie$2*ratio($2)
+                     arrayc(ie$2,ic$3,ic$4)=arrayc(ie$2,ic$3,ic$4)
+     &                                +arrayf(if$2,if$3,if$4)*areaf
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic$4=ifirstc$4,ilastc$4
+         do ic$3=ifirstc$3,ilastc$3
+            do ie$2=ifirstc$2,ilastc$2+1
+               arrayc(ie$2,ic$3,ic$4)=arrayc(ie$2,ic$3,ic$4)/areac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_wgtavg_side_body_3d,`dnl
+c
+c***********************************************************************
+c
+      areaf=dxf($3)*dxf($4)
+      areac=dxc($3)*dxc($4)
+
+ifelse($2,`2',`
+      do ic2=ifirstc2,ilastc2+1
+',`
+      do ic2=ifirstc2,ilastc2 
+')dnl
+ifelse($2,`1',`
+         do ic1=ifirstc1,ilastc1+1
+',`
+         do ic1=ifirstc1,ilastc1
+')dnl
+ifelse($2,`0',`
+            do ic0=ifirstc0,ilastc0+1
+',`
+            do ic0=ifirstc0,ilastc0
+')dnl
+
+ifelse($1,`double complex',`dnl
+               arrayc(ic0,ic1,ic2)=cmplx(zero,zero)
+',`dnl
+               arrayc(ic0,ic1,ic2)=zero
+')dnl
+            enddo
+         enddo
+      enddo
+
+ifelse($2,`2',`
+      do ic2=ifirstc2,ilastc2+1
+               if2=ic2*ratio(2)
+',`
+      do ic2=ifirstc2,ilastc2 
+         do ir2=0,ratio(2)-1
+               if2=ic2*ratio(2)+ir2
+')dnl
+ifelse($2,`1',`
+         do ic1=ifirstc1,ilastc1+1
+                  if1=ic1*ratio(1)
+',`
+         do ic1=ifirstc1,ilastc1
+            do ir1=0,ratio(1)-1
+                  if1=ic1*ratio(1)+ir1
+')dnl
+ifelse($2,`0',`
+            do ic0=ifirstc0,ilastc0+1
+                  if0=ic0*ratio(0)
+',`
+            do ic0=ifirstc0,ilastc0
+               do ir0=0,ratio(0)-1
+                  if0=ic0*ratio(0)+ir0
+')dnl
+                     arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)
+     &                                +arrayf(if0,if1,if2)*areaf
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+
+ifelse($2,`2',`
+      do ic2=ifirstc2,ilastc2+1
+',`
+      do ic2=ifirstc2,ilastc2 
+')dnl
+ifelse($2,`1',`
+         do ic1=ifirstc1,ilastc1+1
+',`
+         do ic1=ifirstc1,ilastc1
+')dnl
+ifelse($2,`0',`
+            do ic0=ifirstc0,ilastc0+1
+',`
+            do ic0=ifirstc0,ilastc0
+')dnl
+               arrayc(ic0,ic1,ic2)=arrayc(ic0,ic1,ic2)/areac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_wgtavg_outerface_body_3d,`dnl
+c
+c***********************************************************************
+c
+      areaf=dxf($3)*dxf($4)
+      areac=dxc($3)*dxc($4)
+
+      do ic$4=ifirstc$4,ilastc$4
+         do ic$3=ifirstc$3,ilastc$3
+ifelse($1,`double complex',`dnl
+            arrayc(ic$3,ic$4)=cmplx(zero,zero)
+',`dnl
+            arrayc(ic$3,ic$4)=zero
+')dnl
+         enddo
+      enddo
+
+      do ir$4=0,ratio($4)-1
+         do ir$3=0,ratio($3)-1
+            do ic$4=ifirstc$4,ilastc$4
+               if$4=ic$4*ratio($4)+ir$4
+               do ic$3=ifirstc$3,ilastc$3
+                  if$3=ic$3*ratio($3)+ir$3
+                  arrayc(ic$3,ic$4)=arrayc(ic$3,ic$4)
+     &                              +arrayf(if$3,if$4)*areaf
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic$4=ifirstc$4,ilastc$4
+         do ic$3=ifirstc$3,ilastc$3
+            arrayc(ic$3,ic$4)=arrayc(ic$3,ic$4)/areac
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+define(cart_wgtavg_outerside_body_3d,`dnl
+c
+c***********************************************************************
+c
+      areaf=dxf($3)*dxf($4)
+      areac=dxc($3)*dxc($4)
+
+ifelse($2,`0',`
+      do ic_outer=ifirstc2,ilastc2
+         do ic_inner=ifirstc1,ilastc1
+',`')dnl
+ifelse($2,`1',`
+      do ic_outer=ifirstc2,ilastc2
+         do ic_inner=ifirstc0,ilastc0
+',`')dnl
+ifelse($2,`2',`
+      do ic_outer=ifirstc1,ilastc1
+         do ic_inner=ifirstc0,ilastc0
+',`')dnl
+
+ifelse($1,`double complex',`dnl
+            arrayc(ic_inner,ic_outer)=cmplx(zero,zero)
+',`dnl
+            arrayc(ic_inner,ic_outer)=zero
+')dnl
+         enddo
+      enddo
+
+ifelse($2,`0',`
+      do ic_outer=ifirstc2,ilastc2
+         do ir_outer=0,ratio(2)-1
+            if_outer=ic_outer*ratio(2)+ir_outer
+            do ic_inner=ifirstc1,ilastc1
+               do ir_inner=0,ratio(1)-1
+               if_inner=ic_inner*ratio(1)+ir_inner
+',`')dnl
+ifelse($2,`1',`
+      do ic_outer=ifirstc2,ilastc2
+         do ir_outer=0,ratio(2)-1
+            if_outer=ic_outer*ratio(2)+ir_outer
+            do ic_inner=ifirstc0,ilastc0
+               do ir_inner=0,ratio(0)-1
+               if_inner=ic_inner*ratio(0)+ir_inner
+',`')dnl
+ifelse($2,`2',`
+      do ic_outer=ifirstc1,ilastc1
+         do ir_outer=0,ratio(1)-1
+            if_outer=ic_outer*ratio(1)+ir_outer
+            do ic_inner=ifirstc0,ilastc0
+               do ir_inner=0,ratio(0)-1
+               if_inner=ic_inner*ratio(0)+ir_inner
+',`')dnl
+ 
+                  arrayc(ic_inner,ic_outer)=
+     &               arrayc(ic_inner,ic_outer)
+     &               +arrayf(if_inner,if_outer)*areaf
+               enddo
+            enddo
+         enddo
+      enddo
+
+ifelse($2,`0',`
+      do ic_outer=ifirstc2,ilastc2
+         do ic_inner=ifirstc1,ilastc1
+',`')dnl
+ifelse($2,`1',`
+      do ic_outer=ifirstc2,ilastc2
+         do ic_inner=ifirstc0,ilastc0
+',`')dnl
+ifelse($2,`2',`
+      do ic_outer=ifirstc1,ilastc1
+         do ic_inner=ifirstc0,ilastc0
+',`')dnl
+            arrayc(ic_inner,ic_outer)=
+     &         arrayc(ic_inner,ic_outer)/areac
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_wgtavg_op_cell_3d,`dnl
+cart_coarsen_op_subroutine_head_3d()dnl
+      $1
+     &  arrayf(CELL3d(filo,fihi,0)),
+     &  arrayc(CELL3d(cilo,cihi,0))
+      double precision dVf,dVc
+      integer ic0,ic1,ic2,if0,if1,if2,ir0,ir1,ir2
+cart_wgtavg_cell_body_3d($1)dnl
+')dnl
+c
+define(cart_wgtavg_op_edge_3d,`dnl
+cart_coarsen_op_subroutine_head_3d()dnl
+      $1
+     &  arrayf(EDGE3d$2(filo,fihi,0)),
+     &  arrayc(EDGE3d$2(cilo,cihi,0))
+      double precision lengthf,lengthc
+      integer ic0,ic1,ic2,if0,if1,if2,ir
+cart_wgtavg_edge_body_3d($1,$2,$3,$4)dnl
+')dnl
+define(cart_wgtavg_op_face_3d,`dnl
+cart_coarsen_op_subroutine_head_3d()dnl
+      $1
+     &  arrayf(FACE3d$2(filo,fihi,0)),
+     &  arrayc(FACE3d$2(cilo,cihi,0))
+      double precision areaf,areac
+      integer ie$2,ic$3,ic$4,if$2,if$3,if$4,ir$3,ir$4
+cart_wgtavg_face_body_3d($1,$2,$3,$4)dnl
+')dnl
+define(cart_wgtavg_op_side_3d,`dnl
+cart_coarsen_op_subroutine_head_3d()dnl
+      $1
+     &  arrayf(SIDE3d$2(filo,fihi,0)),
+     &  arrayc(SIDE3d$2(cilo,cihi,0))
+      double precision areaf,areac
+      integer ic0,ic1,ic2,if0,if1,if2,
+ifelse($2,`0',`
+     &  ir1,ir2
+',`')dnl
+ifelse($2,`1',`
+     &  ir0,ir2
+',`')dnl
+ifelse($2,`2',`
+     &  ir0,ir1
+',`')dnl
+cart_wgtavg_side_body_3d($1,$2,$3,$4)dnl
+')dnl
+define(cart_wgtavg_op_outerface_3d,`dnl
+cart_coarsen_op_subroutine_head_3d()dnl
+      $1
+     &  arrayf(OUTERFACE3d$2(filo,fihi,0)),
+     &  arrayc(OUTERFACE3d$2(cilo,cihi,0))
+      double precision areaf,areac
+      integer ic$3,ic$4,if$3,if$4,ir$3,ir$4
+cart_wgtavg_outerface_body_3d($1,$2,$3,$4)dnl
+')dnl
+define(cart_wgtavg_op_outerside_3d,`dnl
+cart_coarsen_op_subroutine_head_3d()dnl
+      $1
+     &  arrayf(OUTERSIDE3d$2(filo,fihi,0)),
+     &  arrayc(OUTERSIDE3d$2(cilo,cihi,0))
+      double precision areaf,areac
+      integer ic_outer,ic_inner,if_outer,if_inner,
+     &  ir_outer,ir_inner
+cart_wgtavg_outerside_body_3d($1,$2,$3,$4)dnl
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/fortran/geom_m4cartopstuff.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/fortran/geom_m4cartopstuff.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,110 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_m4cartopstuff.i $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for cartesian geometry transfer routines.
+c
+define(coarsen_index,`dnl
+         if ($1.lt.0) then
+            $2=($1+1)/$3-1
+         else
+            $2=$1/$3
+         endif
+')dnl
+
+define(coarsen_face_index,`dnl
+         it=2*$1+$3
+         if (it.le.0) then
+            $2=it/(2*$3)-1
+         else
+            $2=(it-1)/(2*$3)
+         endif
+')dnl
+
+define(node_refloop_pre,`dnl
+      do ic$1=ifirstc$1,ilastc$1
+         if$1=ic$1*ratio($1)
+         do ir$1=0,ratio($1)
+            ie$1=if$1+ir$1
+            if ((ie$1.ge.filo$1).and.(ie$1.le.(fihi$1+1))) then
+')dnl
+
+define(node_refloop_post,`dnl
+           endif
+         end do
+      end do
+')dnl
+
+define(coarse_fine_cell_deltas,`dnl
+      do ir$1=0,ratio($1)-1
+         deltax(ir$1,$1)=(dble(ir$1)+half)*dxf($1)-dxc($1)*half
+      enddo
+')dnl
+define(coarse_fine_face_deltas,`dnl
+      do ir$1=0,ratio($1)-1
+         deltax(ir$1,$1)=dble(ir$1)*dxf($1)
+      enddo
+')dnl
+define(muscl_limited_cell_slopes,`dnl
+      do ie$1=ifirstc$1,ilastc$1+1
+         diff$1(ie$1)=arrayc($2)
+     &               -arrayc($3)
+      enddo
+      do ic$1=ifirstc$1,ilastc$1
+         coef2=half*(diff$1(ic$1+1)+diff$1(ic$1))
+         bound=two*min(abs(diff$1(ic$1+1)),abs(diff$1(ic$1)))
+         if (diff$1(ic$1)*diff$1(ic$1+1).gt.zero) then
+            slope$1($4)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc($1)
+         else
+            slope$1($4)=zero
+         endif
+      enddo
+')dnl
+define(muscl_limited_cell_slopes_complex,`dnl
+      do ie$1=ifirstc$1,ilastc$1+1
+         diff$1(ie$1)=arrayc($2)
+     &               -arrayc($3)
+      enddo
+      do ic$1=ifirstc$1,ilastc$1
+         diff0real=dble(diff$1(ic$1))
+         diff0imag=imag(diff$1(ic$1))
+         diff1real=dble(diff$1(ic$1+1))
+         diff1imag=imag(diff$1(ic$1+1))
+         coef2real=half*(diff0real+diff1real)
+         coef2imag=half*(diff0imag+diff1imag)
+         boundreal=two*min(abs(diff1real),abs(diff0real))
+         boundimag=two*min(abs(diff1imag),abs(diff0imag))
+         if (diff0real*diff1real.gt.zero) then
+            slopereal=sign(min(abs(coef2real),boundreal),coef2real)
+     &                /dxc($1)
+         else
+            slopereal=zero
+         endif
+         if (diff0imag*diff1imag.gt.zero) then
+            slopeimag=sign(min(abs(coef2imag),boundimag),coef2imag) 
+     &                /dxc($1)
+         else
+            slopeimag=zero
+         endif
+         slope$1($4) = slopereal + cmplx(zero,one)*slopeimag
+      enddo
+')dnl
+define(muscl_limited_face_slopes,`dnl
+      do ic$1=ifirstc$1-1,ilastc$1+1
+         diff$1(ic$1)=arrayc($2)
+     &                -arrayc($3)
+      enddo
+      do ie$1=ifirstc$1,ilastc$1+1
+         coef2=half*(diff$1(ie$1-1)+diff$1(ie$1))
+         bound=two*min(abs(diff$1(ie$1-1)),abs(diff$1(ie$1)))
+         if (diff$1(ie$1)*diff$1(ie$1-1).gt.zero) then
+           slope$1($4)=sign(min(abs(coef2),bound),coef2)
+     &                 /dxc($1) 
+         else
+            slope$1($4)=zero
+         endif
+      enddo
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/fortran/geom_m4cartrefineops1d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/fortran/geom_m4cartrefineops1d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,261 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_m4cartrefineops1d.i $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 1d Cartesian refine operators
+c
+define(NDIM,1)dnl
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim1d.i)dnl
+include(geom_m4cartopstuff.i)dnl
+c
+define(cart_refine_op_subroutine_head_1d,`dnl
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:NDIM-1)
+      double precision
+     &  dxc(0:NDIM-1),
+     &  dxf(0:NDIM-1)
+')dnl
+c
+define(cart_clinrefine_op_subroutine_head_1d,`dnl
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff0,slope0)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:NDIM-1)
+      double precision
+     &  dxc(0:NDIM-1),
+     &  dxf(0:NDIM-1),
+     &  deltax(0:15,0:NDIM-1)
+')dnl
+c
+define(cart_linref_cell_body_1d,`dnl
+c
+c***********************************************************************
+c
+coarse_fine_cell_deltas(0)dnl
+
+      do if0=ifirstf0,ilastf0
+coarsen_index(if0,ic0,ratio(0))dnl
+        ir0=if0-ic0*ratio(0)
+        x=deltax(ir0,0)/dxc(0)
+        if( x .lt. 0.d0 ) then
+           ic0 = ic0-1
+           x = x + one
+        endif
+        arrayf(if0)=arrayc(ic0)+(arrayc(ic0+1)-arrayc(ic0))*x
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_clinref_cell_body_1d,`dnl
+c
+c***********************************************************************
+c
+coarse_fine_cell_deltas(0)dnl
+
+muscl_limited_cell_slopes$1(0,ie0,ie0-1,ic0)dnl
+
+      do if0=ifirstf0,ilastf0
+coarsen_index(if0,ic0,ratio(0))dnl
+         ir0=if0-ic0*ratio(0)
+         arrayf(if0)=arrayc(ic0)+slope0(ic0)*deltax(ir0,0)
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_clinref_edge_body_1d,`dnl
+c
+c***********************************************************************
+c
+coarse_fine_cell_deltas(0)dnl
+
+muscl_limited_cell_slopes(0,ie0,ie0-1,ic0)dnl
+
+      do if0=ifirstf0,ilastf0
+coarsen_index(if0,ic0,ratio(0))dnl
+         ir0=if0-ic0*ratio(0)
+         arrayf(if0)=arrayc(ic0)+slope0(ic0)*deltax(ir0,0)
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_clinref_face_body_1d,`dnl
+c
+c***********************************************************************
+c
+
+coarse_fine_face_deltas(0)dnl
+
+muscl_limited_face_slopes(0,ic0+1,ic0,ie0)dnl
+
+      do if0=ifirstf0,ilastf0+1
+coarsen_index(if0,ic0,ratio(0))dnl
+         ir0=if0-ic0*ratio(0)
+         arrayf(if0)=arrayc(ic0)+slope0(ic0)*deltax(ir0,0)
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_linref_node_body_1d,`dnl
+c
+c***********************************************************************
+c
+      realrat=one/dble(ratio(0))
+
+      do ic0=ifirstc0,ilastc0
+         if0=ic0*ratio(0)
+         if (if0.ge.filo0.and.if0.le.fihi0+1) then 
+            do ir0=0,ratio(0)-1
+               ie0=if0+ir0
+               x = dble(ir0)*realrat
+               if (ie0.ge.filo0.and.ie0.le.fihi0+1) then
+                  arrayf(ie0) = arrayc(ic0)*(one-x)
+     &                              + arrayc(ic0+1)*x
+               endif
+            enddo
+         endif
+      enddo
+c
+      ic0 = ilastc0+1
+      if0 = ic0*ratio(0)
+      if (if0.ge.filo0.and.if0.le.fihi0+1) then
+         arrayf(if0) = arrayc(ic0)
+      endif
+c
+      return
+      end
+')dnl
+c 
+define(cart_linref_op_cell_1d,`dnl
+cart_refine_op_subroutine_head_1d()dnl
+      $1
+     &  arrayc(CELL1d(cilo,cihi,0)),
+     &  arrayf(CELL1d(filo,fihi,0))
+      double precision deltax(0:15,0:NDIM-1),x
+      integer ic0,if0,ir0
+cart_linref_cell_body_1d()dnl
+')dnl
+define(cart_clinref_op_cell_1d,`dnl
+cart_clinrefine_op_subroutine_head_1d()dnl
+      $1
+     &  arrayc(CELL1d(cilo,cihi,0)),
+     &  arrayf(CELL1d(filo,fihi,0)),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(CELL1d(cilo,cihi,0))
+      integer ic0,ie0,if0,ir0
+ifelse($1,`double complex',`dnl
+      double precision
+     &  coef2real,coef2imag,boundreal,boundimag,
+     &  diff0real,diff0imag,diff1real,diff1imag,
+     &  slopereal,slopeimag
+',`dnl
+      $1
+     &  coef2,bound
+')dnl
+ifelse($1,`double complex',`dnl
+cart_clinref_cell_body_1d(`_complex')dnl
+',`dnl
+cart_clinref_cell_body_1d(`')dnl
+')dnl
+')dnl
+define(cart_clinref_op_edge_1d,`dnl
+cart_clinrefine_op_subroutine_head_1d()dnl
+      $1
+     &  arrayc(EDGE1d(cilo,cihi,0)),
+     &  arrayf(EDGE1d(filo,fihi,0)),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(EDGE1d(cilo,cihi,0))
+      integer ic0,ie0,if0,ir0
+      $1
+     &  coef2,bound
+cart_clinref_edge_body_1d()dnl
+')dnl
+define(cart_clinref_op_face_1d,`dnl
+cart_clinrefine_op_subroutine_head_1d()dnl
+      $1
+     &  arrayc(FACE1d(cilo,cihi,0)),
+     &  arrayf(FACE1d(filo,fihi,0)),
+     &  diff0(cilo0:cihi0),
+     &  slope0(FACE1d(cilo,cihi,0))
+      integer ic0,ie0,if0,ir0
+      $1
+     &  coef2,bound
+cart_clinref_face_body_1d()dnl
+')dnl
+define(cart_linref_op_node_1d,`dnl
+cart_refine_op_subroutine_head_1d()dnl
+      $1
+     &  arrayc(NODE1d(cilo,cihi,0)),
+     &  arrayf(NODE1d(filo,fihi,0))
+      double precision realrat,x
+      integer i,ic0,if0,ie0,ir0
+cart_linref_node_body_1d()dnl
+')dnl
+define(cart_clinref_op_side_1d,`dnl
+cart_clinrefine_op_subroutine_head_1d()dnl
+      $1
+     &  arrayc(SIDE1d(cilo,cihi,0)),
+     &  arrayf(SIDE1d(filo,fihi,0)),
+     &  diff0(cilo0:cihi0),
+     &  slope0(SIDE1d(cilo,cihi,0))
+      integer ic0,ie0,if0,ir0
+      $1
+     &  coef2,bound
+cart_clinref_face_body_1d()dnl
+')dnl
+define(cart_clinref_op_outerface_1d,`dnl
+cart_refine_op_subroutine_head_1d()dnl
+      $1
+     &  arrayc(OUTERFACE1d(cilo,cihi,0)),
+     &  arrayf(OUTERFACE1d(filo,fihi,0))
+c
+c***********************************************************************
+c
+      arrayf(1)=arrayc(1)
+c
+      return
+      end
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/fortran/geom_m4cartrefineops2d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/fortran/geom_m4cartrefineops2d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,414 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_m4cartrefineops2d.i $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 2d Cartesian refine operators
+c
+define(NDIM,2)dnl
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+include(geom_m4cartopstuff.i)dnl
+c
+define(cart_refine_op_subroutine_head_2d,`dnl
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:NDIM-1)
+      double precision
+     &  dxc(0:NDIM-1),
+     &  dxf(0:NDIM-1)
+')dnl
+c
+define(cart_clinrefine_op_subroutine_head_2d,`dnl
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff$1,slope$1,diff$2,slope$2)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:NDIM-1)
+      double precision
+     &  dxc(0:NDIM-1),
+     &  dxf(0:NDIM-1),
+     &  deltax(0:15,0:NDIM-1)
+')dnl
+c
+define(cart_linref_cell_body_2d,`dnl
+c
+c***********************************************************************
+c
+coarse_fine_cell_deltas(0)dnl
+
+coarse_fine_cell_deltas(1)dnl
+
+      do if1=ifirstf1,ilastf1
+coarsen_index(if1,ic1,ratio(1))dnl
+         ir1=if1-ic1*ratio(1)
+         y=deltax(ir1,1)/dxc(1)
+         if( y .lt. 0.d0 ) then
+            ic1 = ic1-1
+            y = y + one
+         endif
+         do if0=ifirstf0,ilastf0
+coarsen_index(if0,ic0,ratio(0))dnl
+            ir0=if0-ic0*ratio(0)
+            x=deltax(ir0,0)/dxc(0)
+            if( x .lt. 0.d0 ) then
+               ic0 = ic0-1
+               x = x + one
+            endif
+            arrayf(if0,if1)=
+     &      (arrayc(ic0,ic1)+(arrayc(ic0+1,ic1)-arrayc(ic0,ic1))*x)
+     &        *(one-y)
+     &      +(arrayc(ic0,ic1+1)
+     &        +(arrayc(ic0+1,ic1+1)-arrayc(ic0,ic1+1))*x)*y
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_clinref_cell_body_2d,`dnl
+c
+c***********************************************************************
+c
+coarse_fine_cell_deltas(0)dnl
+
+coarse_fine_cell_deltas(1)dnl
+
+      do ic1=ifirstc1,ilastc1
+muscl_limited_cell_slopes$1(0,`ie0,ic1',`ie0-1,ic1',`ic0,ic1')dnl
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+muscl_limited_cell_slopes$1(1,`ic0,ie1',`ic0,ie1-1',`ic0,ic1')dnl
+      enddo
+
+      do if1=ifirstf1,ilastf1
+coarsen_index(if1,ic1,ratio(1))dnl
+         ir1=if1-ic1*ratio(1)
+         deltax1=deltax(ir1,1)
+         do if0=ifirstf0,ilastf0
+coarsen_index(if0,ic0,ratio(0))dnl
+            ir0=if0-ic0*ratio(0)
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+     &                      +slope0(ic0,ic1)*deltax(ir0,0)
+     &                      +slope1(ic0,ic1)*deltax1
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_clinref_edge_body_2d,`dnl
+c
+c***********************************************************************
+c
+
+ifelse($1,`0',`
+coarse_fine_cell_deltas(0)dnl
+',`
+coarse_fine_face_deltas(0)dnl
+')dnl
+
+ifelse($1,`1',`
+coarse_fine_cell_deltas(1)dnl
+',`
+coarse_fine_face_deltas(1)dnl
+')dnl
+
+      do ic1=ifirstc1,ilastc1+$2
+ifelse($1,`0',`
+muscl_limited_cell_slopes(0,`ie0,ic1',`ie0-1,ic1',`ic0,ic1')dnl
+',`
+muscl_limited_face_slopes(0,`ic0+1,ic1',`ic0,ic1',`ie0,ic1')dnl
+')dnl
+      enddo
+
+      do ic0=ifirstc0,ilastc0+$1
+ifelse($1,`1',`
+muscl_limited_cell_slopes(1,`ic0,ie1',`ic0,ie1-1',`ic0,ic1')dnl
+',`
+muscl_limited_face_slopes(1,`ic0,ic1+1',`ic0,ic1',`ic0,ie1')dnl
+')dnl
+      enddo
+
+      do if1=ifirstf1,ilastf1+$2
+coarsen_index(if1,ic1,ratio(1))dnl
+         ir1=if1-ic1*ratio(1)
+         deltax1=deltax(ir1,1)
+         do if0=ifirstf0,ilastf0+$1
+coarsen_index(if0,ie0,ratio(0))dnl
+            ir0=if0-ie0*ratio(0)
+            arrayf(if0,if1)=arrayc(ie0,ic1)
+     &                +slope0(ie0,ic1)*deltax(ir0,0)
+     &                +slope1(ie0,ic1)*deltax1
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_clinref_face_body_2d,`dnl
+c
+c***********************************************************************
+c
+
+coarse_fine_cell_deltas($2)dnl
+
+coarse_fine_face_deltas($1)dnl
+
+      do ic$2=ifirstc$2,ilastc$2
+muscl_limited_face_slopes($1,`ic$1+1,ic$2',`ic$1,ic$2',`ie$1,ic$2')dnl
+      enddo
+
+      do ie$1=ifirstc$1,ilastc$1+1
+muscl_limited_cell_slopes($2,`ie$1,ie$2',`ie$1,ie$2-1',`ie$1,ic$2')dnl
+      enddo
+
+      do if$2=ifirstf$2,ilastf$2
+coarsen_index(if$2,ic$2,ratio($2))dnl
+         ir$2=if$2-ic$2*ratio($2)
+         deltax$2=deltax(ir$2,$2)
+         do if$1=ifirstf$1,ilastf$1+1
+coarsen_index(if$1,ie$1,ratio($1))dnl
+            ir$1=if$1-ie$1*ratio($1)
+            arrayf(if$1,if$2)=arrayc(ie$1,ic$2)
+     &                +slope$1(ie$1,ic$2)*deltax(ir$1,$1)
+     &                +slope$2(ie$1,ic$2)*deltax$2
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_linref_node_body_2d,`dnl
+c
+c***********************************************************************
+c
+      realrat0=one/dble(ratio(0))
+      realrat1=one/dble(ratio(1))
+
+node_refloop_pre(1)dnl
+node_refloop_pre(0)dnl
+               x = dble(ir0)*realrat0
+               y = dble(ir1)*realrat1
+               arrayf(ie0,ie1)=
+     &              (arrayc(ic0,ic1)*(one-x) + 
+     &               arrayc(ic0+1,ic1)*x)*(one-y) +
+     &              (arrayc(ic0,ic1+1)*(one-x) + 
+     &               arrayc(ic0+1,ic1+1)*x)*y
+node_refloop_post()dnl
+node_refloop_post()dnl
+c
+      return
+      end
+')dnl
+c
+define(cart_clinref_side_body_2d,`dnl
+c
+c***********************************************************************
+c
+
+ifelse($1,`0',`
+coarse_fine_face_deltas(0)dnl
+',`
+coarse_fine_cell_deltas(0)dnl
+')dnl
+
+ifelse($1,`1',`
+coarse_fine_face_deltas(1)dnl
+',`
+coarse_fine_cell_deltas(1)dnl
+')dnl
+
+      do ic1=ifirstc1,ilastc1+$1
+ifelse($1,`0',`
+muscl_limited_face_slopes(0,`ic0+1,ic1',`ic0,ic1',`ie0,ic1')dnl
+',`
+muscl_limited_cell_slopes(0,`ie0,ic1',`ie0-1,ic1',`ic0,ic1')dnl
+')dnl
+      enddo
+
+      do ic0=ifirstc0,ilastc0+$2
+ifelse($1,`1',`
+muscl_limited_face_slopes(1,`ic0,ic1+1',`ic0,ic1',`ic0,ie1')dnl
+',`
+muscl_limited_cell_slopes(1,`ic0,ie1',`ic0,ie1-1',`ic0,ic1')dnl
+')dnl
+      enddo
+
+      do if1=ifirstf1,ilastf1+$1
+coarsen_index(if1,ic1,ratio(1))dnl
+         ir1=if1-ic1*ratio(1)
+         deltax1=deltax(ir1,1)
+         do if0=ifirstf0,ilastf0+$2
+coarsen_index(if0,ic0,ratio(0))dnl
+            ir0=if0-ic0*ratio(0)
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+     &                +slope0(ic0,ic1)*deltax(ir0,0)
+     &                +slope1(ic0,ic1)*deltax1
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_clinref_outerface_body_2d,`dnl
+c
+c***********************************************************************
+c
+
+coarse_fine_cell_deltas($1)dnl
+
+muscl_limited_cell_slopes($1,`ie$1',`ie$1-1',`ic$1')dnl
+
+      do if$1=ifirstf$1,ilastf$1
+coarsen_index(if$1,ic$1,ratio($1))dnl
+         ir$1=if$1-ic$1*ratio($1)
+         arrayf(if$1)=arrayc(ic$1)
+     &                +slope$1(ic$1)*deltax(ir$1,$1)
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_linref_op_cell_2d,`dnl
+cart_refine_op_subroutine_head_2d()dnl
+      $1
+     &  arrayc(CELL2d(cilo,cihi,0)),
+     &  arrayf(CELL2d(filo,fihi,0))
+      double precision deltax(0:15,0:NDIM-1),x,y
+      integer ic0,ic1,if0,if1,ir0,ir1
+cart_linref_cell_body_2d()dnl
+')dnl
+define(cart_clinref_op_cell_2d,`dnl
+cart_clinrefine_op_subroutine_head_2d(0,1)dnl
+      $1
+     &  arrayc(CELL2d(cilo,cihi,0)),
+     &  arrayf(CELL2d(filo,fihi,0)),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(CELL2d(cilo,cihi,0)),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(CELL2d(cilo,cihi,0))
+      integer ic0,ic1,ie0,ie1,if0,if1,ir0,ir1
+ifelse($1,`double complex',`dnl
+      double precision
+     &  coef2real,coef2imag,boundreal,boundimag,
+     &  diff0real,diff0imag,diff1real,diff1imag,
+     &  slopereal,slopeimag
+',`dnl
+      $1
+     &  coef2,bound
+')dnl
+      double precision deltax1
+ifelse($1,`double complex',`dnl
+cart_clinref_cell_body_2d(`_complex')dnl
+',`dnl
+cart_clinref_cell_body_2d(`')dnl
+')dnl
+')dnl
+define(cart_clinref_op_edge_2d,`dnl
+cart_clinrefine_op_subroutine_head_2d($2,$3)dnl
+      $1
+     &  arrayc(EDGE2d$2(cilo,cihi,0)),
+     &  arrayf(EDGE2d$2(filo,fihi,0)),
+     &  diff$2(cilo$2:cihi$2+1),
+     &  slope$2(EDGE2d$2(cilo,cihi,0)),
+     &  diff$3(cilo$3:cihi$3+1),
+     &  slope$3(EDGE2d$2(cilo,cihi,0))
+      integer ic0,ic1,ie0,ie1,if0,if1,ir0,ir1
+      $1
+     &  coef2,bound
+      double precision deltax1
+cart_clinref_edge_body_2d($2,$3)dnl
+')dnl
+define(cart_clinref_op_face_2d,`dnl
+cart_clinrefine_op_subroutine_head_2d($2,$3)dnl
+      $1
+     &  arrayc(FACE2d$2(cilo,cihi,0)),
+     &  arrayf(FACE2d$2(filo,fihi,0)),
+     &  diff$2(cilo$2:cihi$2+1),
+     &  slope$2(FACE2d$2(cilo,cihi,0)),
+     &  diff$3(cilo$3:cihi$3+1),
+     &  slope$3(FACE2d$2(cilo,cihi,0))
+      integer ic$2,ic$3,ie$2,ie$3,if$2,if$3,ir$2,ir$3
+      $1
+     &  coef2,bound
+      double precision deltax$3
+cart_clinref_face_body_2d($2,$3)dnl
+')dnl
+define(cart_linref_op_node_2d,`dnl
+cart_refine_op_subroutine_head_2d()dnl
+      $1
+     &  arrayc(NODE2d(cilo,cihi,0)),
+     &  arrayf(NODE2d(filo,fihi,0))
+      double precision x,y,realrat0,realrat1
+      integer ic0,ic1,if0,if1,ie0,ie1,ir0,ir1,i,j
+cart_linref_node_body_2d()dnl
+')dnl
+define(cart_clinref_op_side_2d,`dnl
+cart_clinrefine_op_subroutine_head_2d($2,$3)dnl
+      $1
+     &  arrayc(SIDE2d$2(cilo,cihi,0)),
+     &  arrayf(SIDE2d$2(filo,fihi,0)),
+     &  diff$2(cilo$2:cihi$2+1),
+     &  slope$2(SIDE2d$2(cilo,cihi,0)),
+     &  diff$3(cilo$3:cihi$3+1),
+     &  slope$3(SIDE2d$2(cilo,cihi,0))
+      integer ic0,ic1,ie0,ie1,if0,if1,ir0,ir1
+      $1
+     &  coef2,bound
+      double precision deltax1
+cart_clinref_side_body_2d($2,$3)dnl
+')dnl
+define(cart_clinref_op_outerface_2d,`dnl
+cart_clinrefine_op_subroutine_head_2d($2,$3)dnl
+      $1
+     &  arrayc(OUTERFACE2d$2(cilo,cihi,0)),
+     &  arrayf(OUTERFACE2d$2(filo,fihi,0)),
+     &  diff$2(cilo$2:cihi$2+1),
+     &  slope$2(OUTERFACE2d$2(cilo,cihi,0)),
+     &  diff$3(cilo$3:cihi$3+1),
+     &  slope$3(OUTERFACE2d$2(cilo,cihi,0))
+      integer ic$3,ie$3,if$3,ir$3
+      $1
+     &  coef2,bound
+cart_clinref_outerface_body_2d($3)dnl
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/geom/fortran/geom_m4cartrefineops3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/geom/fortran/geom_m4cartrefineops3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,635 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/geom/fortran/geom_m4cartrefineops3d.i $
+c  Package:     SAMRAI geometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 3d Cartesian refine operators
+c
+define(NDIM,3)dnl
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+include(geom_m4cartopstuff.i)dnl
+c
+define(cart_refine_op_subroutine_head_3d,`dnl
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:NDIM-1)
+      double precision
+     &  dxc(0:NDIM-1),
+     &  dxf(0:NDIM-1)
+')dnl
+c
+define(cart_clinrefine_op_subroutine_head_3d,`dnl
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  arrayc,arrayf,
+     &  diff$1,slope$1,diff$2,slope$2,diff$3,slope$3)
+c***********************************************************************
+      implicit none
+      double precision zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:NDIM-1)
+      double precision
+     &  dxc(0:NDIM-1),
+     &  dxf(0:NDIM-1),
+     &  deltax(0:15,0:NDIM-1)
+')dnl
+c
+define(cart_linref_cell_body_3d,`dnl
+c
+c***********************************************************************
+c
+coarse_fine_cell_deltas(0)dnl
+
+coarse_fine_cell_deltas(1)dnl
+
+coarse_fine_cell_deltas(2)dnl
+
+      do if2=ifirstf2,ilastf2
+coarsen_index(if2,ic2,ratio(2))dnl
+         ir2=if2-ic2*ratio(2)
+         z=deltax(ir2,2)/dxc(2)
+         if( z .lt. 0.d0 ) then
+           ic2 = ic2-1
+           z = z + one
+         endif
+         do if1=ifirstf1,ilastf1
+coarsen_index(if1,ic1,ratio(1))dnl
+            ir1=if1-ic1*ratio(1)
+            y=deltax(ir1,1)/dxc(1)
+            if( y .lt. 0.d0 ) then
+              ic1 = ic1-1
+              y = y + one
+            endif
+            do if0=ifirstf0,ilastf0
+coarsen_index(if0,ic0,ratio(0))dnl
+               ir0=if0-ic0*ratio(0)
+               x=deltax(ir0,0)/dxc(0)
+               if( x .lt. 0.d0 ) then
+                 ic0 = ic0-1
+                 x = x + one
+               endif
+               arrayf(if0,if1,if2)=
+     &          ( (arrayc(ic0,ic1,ic2)
+     &      +(arrayc(ic0+1,ic1,ic2)-arrayc(ic0,ic1,ic2))*x)*(one-y)
+     &      +(arrayc(ic0,ic1+1,ic2)
+     &      +(arrayc(ic0+1,ic1+1,ic2)-arrayc(ic0,ic1+1,ic2))*x)*y )
+     &       *(one-z)
+     &         +( (arrayc(ic0,ic1,ic2+1)
+     &      +(arrayc(ic0+1,ic1,ic2+1)-arrayc(ic0,ic1,ic2+1))*x)
+     &       *(one-y)
+     &      +(arrayc(ic0,ic1+1,ic2+1)
+     &      +(arrayc(ic0+1,ic1+1,ic2+1)-arrayc(ic0,ic1+1,ic2+1))*x)*y)
+     &       *z
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_clinref_cell_body_3d,`dnl
+c
+c***********************************************************************
+c
+coarse_fine_cell_deltas(0)dnl
+
+coarse_fine_cell_deltas(1)dnl
+
+coarse_fine_cell_deltas(2)dnl
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+muscl_limited_cell_slopes$1(0,`ie0,ic1,ic2',`ie0-1,ic1,ic2',`ic0,ic1,ic2')dnl
+         enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic0=ifirstc0,ilastc0
+muscl_limited_cell_slopes$1(1,`ic0,ie1,ic2',`ic0,ie1-1,ic2',`ic0,ic1,ic2')dnl
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+muscl_limited_cell_slopes$1(2,`ic0,ic1,ie2',`ic0,ic1,ie2-1',`ic0,ic1,ic2')dnl
+         enddo
+      enddo
+
+      do if2=ifirstf2,ilastf2
+coarsen_index(if2,ic2,ratio(2))dnl
+         ir2=if2-ic2*ratio(2)
+         deltax2=deltax(ir2,2)
+         do if1=ifirstf1,ilastf1
+coarsen_index(if1,ic1,ratio(1))dnl
+            ir1=if1-ic1*ratio(1)
+            deltax1=deltax(ir1,1)
+            do if0=ifirstf0,ilastf0
+coarsen_index(if0,ic0,ratio(0))dnl
+               ir0=if0-ic0*ratio(0)
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+     &                     +slope0(ic0,ic1,ic2)*deltax(ir0,0)
+     &                     +slope1(ic0,ic1,ic2)*deltax1
+     &                     +slope2(ic0,ic1,ic2)*deltax2
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_clinref_edge_body_3d,`dnl
+c
+c***********************************************************************
+c
+
+ifelse($1,`0',`
+coarse_fine_cell_deltas(0)dnl
+',`
+coarse_fine_face_deltas(0)dnl
+')dnl
+
+ifelse($1,`1',`
+coarse_fine_cell_deltas(1)dnl
+',`
+coarse_fine_face_deltas(1)dnl
+')dnl
+
+ifelse($1,`2',`
+coarse_fine_cell_deltas(2)dnl
+',`
+coarse_fine_face_deltas(2)dnl
+')dnl
+
+ifelse($1,`2',`
+      do ic2=ifirstc2,ilastc2
+',`
+      do ic2=ifirstc2,ilastc2+1
+')dnl
+ifelse($1,`1',`
+         do ic1=ifirstc1,ilastc1
+',`
+         do ic1=ifirstc1,ilastc1+1
+')dnl
+ifelse($1,`0',`
+muscl_limited_cell_slopes(0,`ie0,ic1,ic2',`ie0-1,ic1,ic2',`ic0,ic1,ic2')dnl
+',`
+muscl_limited_face_slopes(0,`ic0+1,ic1,ic2',`ic0,ic1,ic2',`ie0,ic1,ic2')dnl
+')dnl
+         enddo
+      enddo
+
+ifelse($1,`2',`
+      do ic2=ifirstc2,ilastc2
+',`
+      do ic2=ifirstc2,ilastc2+1
+')dnl
+ifelse($1,`0',`
+            do ic0=ifirstc0,ilastc0
+',`
+            do ic0=ifirstc0,ilastc0+1
+')dnl
+
+ifelse($1,`1',`
+muscl_limited_cell_slopes(1,`ic0,ie1,ic2',`ic0,ie1-1,ic2',`ic0,ic1,ic2')dnl
+',`
+muscl_limited_face_slopes(1,`ic0,ic1+1,ic2',`ic0,ic1,ic2',`ic0,ie1,ic2')dnl
+')dnl
+         enddo
+      enddo
+
+ifelse($1,`1',`
+         do ic1=ifirstc1,ilastc1
+',`
+         do ic1=ifirstc1,ilastc1+1
+')dnl
+ifelse($1,`0',`
+            do ic0=ifirstc0,ilastc0
+',`
+            do ic0=ifirstc0,ilastc0+1
+')dnl
+ifelse($1,`2',`
+muscl_limited_cell_slopes(2,`ic0,ic1,ie2',`ic0,ic1,ie2-1',`ic0,ic1,ic2')dnl
+',`
+muscl_limited_face_slopes(2,`ic0,ic1,ic2+1',`ic0,ic1,ic2',`ic0,ic1,ie2')dnl
+')dnl
+         enddo
+      enddo
+
+ifelse($1,`2',`
+      do if2=ifirstf2,ilastf2
+',`
+      do if2=ifirstf2,ilastf2+1
+')dnl
+coarsen_index(if2,ic2,ratio(2))dnl
+         ir2=if2-ic2*ratio(2)
+         deltax2=deltax(ir2,2)
+
+ifelse($1,`1',`
+         do if1=ifirstf1,ilastf1
+',`
+         do if1=ifirstf1,ilastf1+1
+')dnl
+coarsen_index(if1,ic1,ratio(1))dnl
+            ir1=if1-ic1*ratio(1)
+            deltax1=deltax(ir1,1)
+
+ifelse($1,`0',`
+            do if0=ifirstf0,ilastf0
+',`
+            do if0=ifirstf0,ilastf0+1
+')dnl
+coarsen_index(if0,ic0,ratio(0))dnl
+               ir0=if0-ic0*ratio(0)
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+     &                +slope0(ic0,ic1,ic2)*deltax(ir0,0)
+     &                +slope1(ic0,ic1,ic2)*deltax1
+     &                +slope2(ic0,ic1,ic2)*deltax2
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_clinref_face_body_3d,`dnl
+c
+c***********************************************************************
+c
+
+coarse_fine_cell_deltas($3)dnl
+
+coarse_fine_cell_deltas($2)dnl
+
+coarse_fine_face_deltas($1)dnl
+
+      do ic$3=ifirstc$3,ilastc$3
+         do ic$2=ifirstc$2,ilastc$2
+muscl_limited_face_slopes($1,`ic$1+1,ic$2,ic$3',`ic$1,ic$2,ic$3',`ie$1,ic$2,ic$3')dnl
+         enddo
+      enddo
+
+      do ic$3=ifirstc$3,ilastc$3
+         do ic$1=ifirstc$1,ilastc$1+1
+muscl_limited_cell_slopes($2,`ic$1,ie$2,ic$3',`ic$1,ie$2-1,ic$3',`ic$1,ic$2,ic$3')dnl
+         enddo
+      enddo
+
+      do ic$2=ifirstc$2,ilastc$2
+         do ic$1=ifirstc$1,ilastc$1+1
+muscl_limited_cell_slopes($3,`ic$1,ic$2,ie$3',`ic$1,ic$2,ie$3-1',`ic$1,ic$2,ic$3')dnl
+         enddo
+      enddo
+
+      do if$3=ifirstf$3,ilastf$3
+coarsen_index(if$3,ic$3,ratio($3))dnl
+         ir$3=if$3-ic$3*ratio($3)
+         deltax$3=deltax(ir$3,$3)
+         do if$2=ifirstf$2,ilastf$2
+coarsen_index(if$2,ic$2,ratio($2))dnl
+            ir$2=if$2-ic$2*ratio($2)
+            deltax$2=deltax(ir$2,$2)
+            do if$1=ifirstf$1,ilastf$1+1
+coarsen_index(if$1,ie$1,ratio($1))dnl
+               ir$1=if$1-ie$1*ratio($1)
+               arrayf(if$1,if$2,if$3)=arrayc(ie$1,ic$2,ic$3)
+     &                +slope$1(ie$1,ic$2,ic$3)*deltax(ir$1,$1)
+     &                +slope$2(ie$1,ic$2,ic$3)*deltax$2
+     &                +slope$3(ie$1,ic$2,ic$3)*deltax$3
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+')dnl
+
+c
+define(cart_linref_node_body_3d,`dnl
+c
+c***********************************************************************
+c
+      realrat0=one/dble(ratio(0))
+      realrat1=one/dble(ratio(1))
+      realrat2=one/dble(ratio(2))
+
+node_refloop_pre(2)dnl
+node_refloop_pre(1)dnl
+node_refloop_pre(0)dnl
+               x = dble(ir0)*realrat0
+               y = dble(ir1)*realrat1
+               z = dble(ir2)*realrat2
+               arrayf(ie0,ie1,ie2)=
+     &            ( (arrayc(ic0,ic1,ic2)*(one-x) +
+     &               arrayc(ic0+1,ic1,ic2)*x)*(one-y)
+     &            + (arrayc(ic0,ic1+1,ic2)*(one-x) +
+     &               arrayc(ic0+1,ic1+1,ic2)*x)*y ) * (one-z) + 
+     &            ( (arrayc(ic0,ic1,ic2+1)*(one-x) +
+     &               arrayc(ic0+1,ic1,ic2+1)*x)*(one-y)
+     &            + (arrayc(ic0,ic1+1,ic2+1)*(one-x) +
+     &               arrayc(ic0+1,ic1+1,ic2+1)*x)*y ) * z
+node_refloop_post()dnl 
+node_refloop_post()dnl 
+node_refloop_post()dnl 
+
+      return
+      end
+')dnl
+c
+define(cart_clinref_outerface_body_3d,`dnl
+c
+c***********************************************************************
+c
+
+coarse_fine_cell_deltas($2)dnl
+
+coarse_fine_cell_deltas($1)dnl
+
+      do ic$2=ifirstc$2,ilastc$2
+muscl_limited_cell_slopes($1,`ie$1,ic$2',`ie$1-1,ic$2',`ic$1,ic$2')dnl
+      enddo
+
+      do ic$1=ifirstc$1,ilastc$1
+muscl_limited_cell_slopes($2,`ic$1,ie$2',`ic$1,ie$2-1',`ic$1,ic$2')dnl
+      enddo
+
+      do if$2=ifirstf$2,ilastf$2
+coarsen_index(if$2,ic$2,ratio($2))dnl
+         ir$2=if$2-ic$2*ratio($2)
+         deltax$2=deltax(ir$2,$2)
+         do if$1=ifirstf$1,ilastf$1
+coarsen_index(if$1,ic$1,ratio($1))dnl
+            ir$1=if$1-ic$1*ratio($1)
+            arrayf(if$1,if$2)=arrayc(ic$1,ic$2)
+     &            +slope$1(ic$1,ic$2)*deltax(ir$1,$1)
+     &            +slope$2(ic$1,ic$2)*deltax$2
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_clinref_side_body_3d,`dnl
+c
+c***********************************************************************
+c
+
+ifelse($1,`0',`
+coarse_fine_face_deltas(0)dnl
+',`
+coarse_fine_cell_deltas(0)dnl
+')dnl
+
+ifelse($1,`1',`
+coarse_fine_face_deltas(1)dnl
+',`
+coarse_fine_cell_deltas(1)dnl
+')dnl
+
+ifelse($1,`2',`
+coarse_fine_face_deltas(2)dnl
+',`
+coarse_fine_cell_deltas(2)dnl
+')dnl
+
+ifelse($1,`2',`
+      do ic2=ifirstc2,ilastc2+1
+',`
+      do ic2=ifirstc2,ilastc2
+')dnl
+ifelse($1,`1',`
+         do ic1=ifirstc1,ilastc1+1
+',`
+         do ic1=ifirstc1,ilastc1
+')dnl
+ifelse($1,`0',`
+muscl_limited_face_slopes(0,`ic0+1,ic1,ic2',`ic0,ic1,ic2',`ie0,ic1,ic2')dnl
+',`
+muscl_limited_cell_slopes(0,`ie0,ic1,ic2',`ie0-1,ic1,ic2',`ic0,ic1,ic2')dnl
+')dnl
+         enddo
+      enddo
+
+ifelse($1,`2',`
+            do ic2=ifirstc2,ilastc2+1
+',`
+            do ic2=ifirstc2,ilastc2
+')dnl
+ifelse($1,`0',`
+            do ic0=ifirstc0,ilastc0+1
+',`
+            do ic0=ifirstc0,ilastc0
+')dnl
+ifelse($1,`1',`
+muscl_limited_face_slopes(1,`ic0,ic1+1,ic2',`ic0,ic1,ic2',`ic0,ie1,ic2')dnl
+',`
+muscl_limited_cell_slopes(1,`ic0,ie1,ic2',`ic0,ie1-1,ic2',`ic0,ic1,ic2')dnl
+')dnl
+         enddo
+      enddo
+
+ifelse($1,`1',`
+            do ic1=ifirstc1,ilastc1+1
+',`
+            do ic1=ifirstc1,ilastc1
+')dnl
+ifelse($1,`0',`
+            do ic0=ifirstc0,ilastc0+1
+',`
+            do ic0=ifirstc0,ilastc0
+')dnl
+ifelse($1,`2',`
+muscl_limited_face_slopes(2,`ic0,ic1,ic2+1',`ic0,ic1,ic2',`ic0,ic1,ie2')dnl
+',`
+muscl_limited_cell_slopes(2,`ic0,ic1,ie2',`ic0,ic1,ie2-1',`ic0,ic1,ic2')dnl
+')dnl
+         enddo
+      enddo
+
+ifelse($1,`2',`
+      do if2=ifirstf2,ilastf2+1
+',`
+      do if2=ifirstf2,ilastf2
+')dnl
+coarsen_index(if2,ic2,ratio(2))dnl
+         ir2=if2-ic2*ratio(2)
+         deltax2=deltax(ir2,2)
+
+ifelse($1,`1',`
+         do if1=ifirstf1,ilastf1+1
+',`
+         do if1=ifirstf1,ilastf1
+')dnl
+coarsen_index(if1,ic1,ratio(1))dnl
+            ir1=if1-ic1*ratio(1)
+            deltax1=deltax(ir1,1)
+
+ifelse($1,`0',`
+            do if0=ifirstf0,ilastf0+1
+',`
+            do if0=ifirstf0,ilastf0
+')dnl
+coarsen_index(if0,ic0,ratio(0))dnl
+               ir0=if0-ic0*ratio(0)
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+     &                +slope0(ic0,ic1,ic2)*deltax(ir0,0)
+     &                +slope1(ic0,ic1,ic2)*deltax1
+     &                +slope2(ic0,ic1,ic2)*deltax2
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(cart_linref_op_cell_3d,`dnl
+cart_refine_op_subroutine_head_3d()dnl
+      $1
+     &  arrayc(CELL3d(cilo,cihi,0)),
+     &  arrayf(CELL3d(filo,fihi,0))
+      double precision deltax(0:15,0:NDIM-1),x,y,z
+      integer ic0,ic1,ic2,if0,if1,if2,ir0,ir1,ir2
+cart_linref_cell_body_3d()dnl
+')dnl
+define(cart_clinref_op_cell_3d,`dnl
+cart_clinrefine_op_subroutine_head_3d(0,1,2)dnl
+      $1
+     &  arrayc(CELL3d(cilo,cihi,0)),
+     &  arrayf(CELL3d(filo,fihi,0)),
+     &  diff0(cilo0:cihi0+1),
+     &  slope0(CELL3d(cilo,cihi,0)),
+     &  diff1(cilo1:cihi1+1),
+     &  slope1(CELL3d(cilo,cihi,0)),
+     &  diff2(cilo2:cihi2+1),
+     &  slope2(CELL3d(cilo,cihi,0))
+      integer ic0,ic1,ic2,ie0,ie1,ie2,if0,if1,if2,ir0,ir1,ir2
+ifelse($1,`double complex',`dnl
+      double precision
+     &  coef2real,coef2imag,boundreal,boundimag,
+     &  diff0real,diff0imag,diff1real,diff1imag,
+     &  slopereal,slopeimag
+',`dnl
+      $1
+     &  coef2,bound
+')dnl
+      double precision deltax1,deltax2
+ifelse($1,`double complex',`dnl
+cart_clinref_cell_body_3d(`_complex')dnl
+',`dnl
+cart_clinref_cell_body_3d(`')dnl
+')dnl
+')dnl
+define(cart_clinref_op_edge_3d,`dnl
+cart_clinrefine_op_subroutine_head_3d($2,$3,$4)dnl
+      $1
+     &  arrayc(EDGE3d$2(cilo,cihi,0)),
+     &  arrayf(EDGE3d$2(filo,fihi,0)),
+     &  diff$2(cilo$2:cihi$2+1),
+     &  slope$2(EDGE3d$2(cilo,cihi,0)),
+     &  diff$3(cilo$3:cihi$3+1),
+     &  slope$3(EDGE3d$2(cilo,cihi,0)),
+     &  diff$4(cilo$4:cihi$4+1),
+     &  slope$4(EDGE3d$2(cilo,cihi,0))
+      integer ic0,ic1,ic2,ie0,ie1,ie2,if0,if1,if2,
+     &        ir0,ir1,ir2
+      $1
+     &  coef2,bound
+      double precision deltax1,deltax2
+cart_clinref_edge_body_3d($2,$3,$4)dnl
+')dnl
+define(cart_clinref_op_face_3d,`dnl
+cart_clinrefine_op_subroutine_head_3d($2,$3,$4)dnl
+      $1
+     &  arrayc(FACE3d$2(cilo,cihi,0)),
+     &  arrayf(FACE3d$2(filo,fihi,0)),
+     &  diff$2(cilo$2:cihi$2+1),
+     &  slope$2(FACE3d$2(cilo,cihi,0)),
+     &  diff$3(cilo$3:cihi$3+1),
+     &  slope$3(FACE3d$2(cilo,cihi,0)),
+     &  diff$4(cilo$4:cihi$4+1),
+     &  slope$4(FACE3d$2(cilo,cihi,0))
+      integer ic$2,ic$3,ic$4,ie$2,ie$3,ie$4,if$2,if$3,if$4,
+     &        ir$2,ir$3,ir$4
+      $1
+     &  coef2,bound
+      double precision deltax$3,deltax$4
+cart_clinref_face_body_3d($2,$3,$4)dnl
+')dnl
+define(cart_linref_op_node_3d,`dnl
+cart_refine_op_subroutine_head_3d()dnl
+      $1
+     &  arrayc(NODE3d(cilo,cihi,0)),
+     &  arrayf(NODE3d(filo,fihi,0))
+      double precision x,y,z,realrat0,realrat1,realrat2
+      integer ic0,ic1,ic2,ie0,ie1,ie2,if0,if1,if2,ir0,ir1,ir2,i,j,k
+cart_linref_node_body_3d()dnl
+')dnl
+define(cart_clinref_op_outerface_3d,`dnl
+cart_clinrefine_op_subroutine_head_3d($2,$3,$4)dnl
+      $1
+     &  arrayc(OUTERFACE3d$2(cilo,cihi,0)),
+     &  arrayf(OUTERFACE3d$2(filo,fihi,0)),
+     &  diff$2(cilo$2:cihi$2+1),
+     &  slope$2(OUTERFACE3d$2(cilo,cihi,0)),
+     &  diff$3(cilo$3:cihi$3+1),
+     &  slope$3(OUTERFACE3d$2(cilo,cihi,0)),
+     &  diff$4(cilo$4:cihi$4+1),
+     &  slope$4(OUTERFACE3d$2(cilo,cihi,0))
+      integer ic$3,ic$4,ie$3,ie$4,if$3,if$4,ir$3,ir$4
+      $1
+     &  coef2,bound
+      double precision deltax$4
+cart_clinref_outerface_body_3d($3,$4)dnl
+')dnl
+define(cart_clinref_op_side_3d,`dnl
+cart_clinrefine_op_subroutine_head_3d($2,$3,$4)dnl
+      $1
+     &  arrayc(SIDE3d$2(cilo,cihi,0)),
+     &  arrayf(SIDE3d$2(filo,fihi,0)),
+     &  diff$2(cilo$2:cihi$2+1),
+     &  slope$2(SIDE3d$2(cilo,cihi,0)),
+     &  diff$3(cilo$3:cihi$3+1),
+     &  slope$3(SIDE3d$2(cilo,cihi,0)),
+     &  diff$4(cilo$4:cihi$4+1),
+     &  slope$4(SIDE3d$2(cilo,cihi,0))
+      integer ic0,ic1,ic2,ie0,ie1,ie2,if0,if1,if2,
+     &        ir0,ir1,ir2
+      $1
+     &  coef2,bound
+      double precision deltax2,deltax1
+cart_clinref_side_body_3d($2,$3,$4)dnl
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BasePatchHierarchy.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BasePatchHierarchy.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,42 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An abstract base class for hierarchies 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BasePatchHierarchy_C
+#define included_hier_BasePatchHierarchy_C
+
+#include "SAMRAI/hier/BasePatchHierarchy.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/BasePatchHierarchy.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+ *************************************************************************
+ *									*
+ * Constructor and destructor for abstract base class			*
+ *									*
+ *************************************************************************
+ */
+
+BasePatchHierarchy::BasePatchHierarchy()
+{
+}
+
+BasePatchHierarchy::~BasePatchHierarchy()
+{
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BasePatchHierarchy.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BasePatchHierarchy.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,27 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An abstract base class of hierarchies 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace hier {
+
+
+SAMRAI_INLINE_KEYWORD
+bool
+BasePatchHierarchy::levelCanBeRefined(
+   const int level_number) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(level_number >= 0);
+#endif
+   return level_number < getMaxNumberOfLevels() - 1;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BasePatchHierarchy.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BasePatchHierarchy.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,176 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An abstract base class of hierarchies 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BasePatchHierarchy
+#define included_hier_BasePatchHierarchy
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/BasePatchLevel.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Serializable.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief Pure virtual base class providing an abstract interface for a
+ * patch hierarchy.
+ *
+ * This base class allows higher-level classes in SAMRAI and in
+ * applications that use SAMRAI to interface with a hierarchy in
+ * an abstract manner without knowing whether it is a
+ * PatchHierarchy representing a rectangular domain or if it is a
+ * hierarchy that represents, for example, part of a multiblock domain.
+ *
+ * @see hier::PatchHierarchy
+ * @see tbox::Serializable
+ */
+
+class BasePatchHierarchy:
+   public virtual tbox::DescribedClass,
+   public tbox::Serializable
+{
+public:
+
+   /*!
+    * @brief Default constructor
+    */
+   BasePatchHierarchy();
+
+   /*!
+    * @brief Virtual destructor for base patch hierarchy objects.
+    */
+   virtual ~BasePatchHierarchy();
+
+   /*!
+    * @brief Get the specified patch level.
+    *
+    * @param[in]  level
+    *
+    * @return a tbox::Pointer to the abstract patch level
+    */
+   virtual
+   tbox::Pointer<hier::BasePatchLevel>
+   getPatchLevel(
+      const int level) const = 0;
+
+   /**
+    * @brief Return the maximum number of levels allowed on the hierarchy.
+    *
+    * @return the maximum number of levels allowed on the hierarchy.
+    */
+   virtual int
+   getMaxNumberOfLevels() const = 0;
+
+   /*!
+    * @brief Reports if a finer patch level exists than the one specified.
+    *
+    * @param[in] level
+    *
+    * @returns true if the hierarchy contains a patch level
+    * finer than the specified patch level. Otherwise, false.
+    */
+   virtual bool
+   finerLevelExists(
+      const int level) const = 0;
+
+   /*!
+    * @brief Get the level number of the finest patch level in the hierarchy.
+    *
+    * @return the level number of the finest resolution patch level residing
+    * in the hierarchy.
+    */
+   virtual int
+   getFinestLevelNumber() const = 0;
+
+   /*!
+    * @brief Get the number of levels
+    *
+    * @return the number of levels that currently exist in the hierarchy.
+    */
+   virtual int
+   getNumberOfLevels() const = 0;
+
+   /*!
+    * @brief Check whether specified level can be refined.
+    *
+    * @return true if level associated with the specified level number can
+    * be refined; i.e., the level number is less than that of the finest
+    * level allowed in the hierarchy.  Otherwise, false is returned.
+    */
+   bool
+   levelCanBeRefined(
+      const int level_number) const;
+
+   /*!
+    * @brief Get the ratio to the next coarser level.
+    *
+    * @param[in]  level_number
+    *
+    * @return const reference to ratio between specified level and next
+    * coarser.
+    */
+   virtual const IntVector
+   &getRatioToCoarserLevel( int level_number ) const = 0;
+
+   /*!
+    * @brief Get the entire hierarchy from the restart file.
+    */
+   virtual void
+   getFromRestart() = 0;
+
+   /*!
+    * @brief Serialize the state of the BasePatchHierarchy object
+    * and each PatchLevel it contains to the database.
+    *
+    * @param[in]  database
+    */
+   virtual void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> database) = 0;
+
+   /*!
+    * @brief Serialize the state of the BasePatchHierarchy object and
+    * each PatchLevel is contains to the database.
+    *
+    * Only the PatchData objects corresponding to those indicated in the
+    * ComponentSelector are written to the specified database.
+    *
+    * @param[in]  database
+    * @param[in]  patchdata_write_table the ComponentSelector indicating
+    *             which PatchData to be written
+    */
+   virtual void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> database,
+      const ComponentSelector& patchdata_write_table) = 0;
+
+   /*!
+    * @brief Get the dimension of this object
+    *
+    * @return the dimension of this object.
+    */
+   virtual const tbox::Dimension&
+   getDim() const = 0;
+
+private:
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/BasePatchHierarchy.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BasePatchLevel.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BasePatchLevel.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,42 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An abstract base class for a level of the AMR hierarchy 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BasePatchLevel_C
+#define included_hier_BasePatchLevel_C
+
+#include "SAMRAI/hier/BasePatchLevel.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/BasePatchLevel.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor and destructor for abstract base class                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+BasePatchLevel::BasePatchLevel()
+{
+}
+
+BasePatchLevel::~BasePatchLevel()
+{
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BasePatchLevel.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BasePatchLevel.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,16 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Base class for a collection of patches at one level of the AMR hierarchy 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace hier {
+
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BasePatchLevel.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BasePatchLevel.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,175 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An abstract base class for a level of the AMR hierarchy 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BasePatchLevel
+#define included_hier_BasePatchLevel
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/ComponentSelector.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief Pure virtual base class providing the abstract interface for a
+ * patch level.
+ *
+ * The base class allows higher-level classes in SAMRAI and in
+ * applications that use SAMRAI, to interface with a level in an abstract
+ * manner without knowing whether it is a PatchLevel representing a level
+ * on a rectangular domain or if it is a level that exists, for example,
+ * in a multiblock domain.
+ *
+ * @see hier::BasePatchHierarchy
+ * @see hier::PatchLevel
+ * @see hier::Patch
+ */
+
+class BasePatchLevel:
+   public tbox::DescribedClass
+{
+public:
+   /*!
+    * @brief Class constructor.
+    */
+   BasePatchLevel();
+
+   /*!
+    * @brief The virtual destructor for patch level deallocates all patches.
+    */
+   virtual ~BasePatchLevel();
+
+   /*!
+    * @brief Get the level number matching the index space of this level.
+    *
+    * If this level does not align with the index space of a level in the
+    * hierarchy, then thie value is undefined (-1).
+    *
+    * @return the value of the level in the hierarchy corresponding to the
+    * index space of this level.
+    *
+    * @see inHierarchy()
+    */
+   virtual int
+   getLevelNumber() const = 0;
+
+   /*!
+    * @brief Allocate the specified component on all patches.
+    *
+    * @param[in]  id The id of the component to allocate
+    * @param[in]  timestamp
+    */
+   virtual
+   void
+   allocatePatchData(
+      const int id,
+      const double timestamp = 0.0) = 0;
+
+   /*!
+    * @brief Allocate the specified components on all patches.
+    *
+    * @param[in]  components The ComponentSelector indicating which components
+    *             to allocate
+    * @param[in]  timestamp
+    */
+   virtual
+   void
+   allocatePatchData(
+      const hier::ComponentSelector& components,
+      const double timestamp = 0.0) = 0;
+
+   /*!
+    * @brief Deallocate the specified component on all patches.
+    *
+    * Deallocated component needs to be reallocated before its next use.
+    *
+    * @param[in]  id The ide of the component to deallocate.
+    */
+   virtual void
+   deallocatePatchData(
+      const int id) = 0;
+
+   /**
+    * Deallocate the specified components on all patches.
+    *
+    * Deallocated components need to be reallocated before their next use.
+    *
+    * @param[in]  components The ComponentSelector indicating which components
+    *             to deallocate.
+    */
+   virtual void
+   deallocatePatchData(
+      const hier::ComponentSelector& components) = 0;
+
+   /*!
+    * @brief Set the simulation time for the specified patch component.
+    *
+    * @param[in]  timestamp
+    * @param[in]  id The id of the component for which simulation time
+    *             should be set.
+    */
+   virtual void
+   setTime(
+      const double timestamp,
+      const int id) = 0;
+
+   /*!
+    * @brief Set the simulation time for the specified patch components.
+    *
+    * @param[in]  timestamp
+    * @param[in]  components The ComponentSelector indicating for which
+    *             elements to set the simulation time.
+    */
+   virtual void
+   setTime(
+      const double timestamp,
+      const hier::ComponentSelector& components) = 0;
+
+   /*!
+    * @brief Set the simulation time for all allocated patch components.
+    *
+    * @param[in]  timestamp
+    */
+   virtual void
+   setTime(
+      const double timestamp) = 0;
+
+   /*!
+    * @brief Get the ratio to the coarsest level
+    *
+    * @return a const reference to the vector ratio between the index
+    * space of this patch level and that of a reference level in AMR
+    * hierarchy (typically, level zero).
+    */
+   virtual const hier::IntVector&
+   getRatioToLevelZero() const = 0;
+
+   /*!
+    * @brief Get the dimension of this object
+    *
+    * @Return the dimension of this object.
+    */
+   virtual const tbox::Dimension&
+   getDim() const = 0;
+
+private:
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/BasePatchLevel.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BlockPatchGeometry.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BlockPatchGeometry.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Patch geometry for multiblock. 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BlockPatchGeometry_C
+#define included_hier_BlockPatchGeometry_C
+
+#include "SAMRAI/hier/BlockPatchGeometry.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/BlockPatchGeometry.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor for BlockPatchGeometry.                           *
+ * variable.                                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+BlockPatchGeometry::BlockPatchGeometry(
+   const hier::IntVector& ratio_to_level_zero,
+   const int block_number,
+   const hier::PatchGeometry::TwoDimBool& touches_regular_bdry,
+   const hier::PatchGeometry::TwoDimBool& touches_periodic_bdry):
+   hier::PatchGeometry(ratio_to_level_zero,
+                       touches_regular_bdry,
+                       touches_periodic_bdry)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(touches_regular_bdry, touches_periodic_bdry);
+
+   d_block_number = block_number;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destructor for BlockPatchGeometry.                            *
+ *                                                                       *
+ *************************************************************************
+ */
+BlockPatchGeometry::~BlockPatchGeometry()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print BlockPatchGeometry class data.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+void BlockPatchGeometry::printClassData(
+   std::ostream& os) const
+{
+   os << "Printing BlockPatchGeometry data: this = "
+      << (BlockPatchGeometry *)this << std::endl;
+
+   hier::PatchGeometry::printClassData(os);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BlockPatchGeometry.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BlockPatchGeometry.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,21 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Block patch geometry for use in AMR multiblock hierarchy. 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+int BlockPatchGeometry::getBlockNumber() const
+{
+   return d_block_number;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BlockPatchGeometry.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BlockPatchGeometry.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,104 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Patch geometry for multiblock. 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BlockPatchGeometry
+#define included_hier_BlockPatchGeometry
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/PatchGeometry.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief PatchGeometry implementation for use with a multiblock domain.
+ *
+ * Class BlockPatchGeometry implements geometry management
+ * for a single patch in an AMR hierarchy that is part of a multiblock
+ * mesh configuration.  This class contains no information about the
+ * the physical characteristics of the mesh, but only information about
+ * index space and the block where the patch exists.  It is expected that
+ * all information about the physical mesh, such as the positions of mesh
+ * nodes will be managed in an application by user-defined code.
+ *
+ * The grid data is set by BlockGridGeometry class.  This patch
+ * geometry class is derived from hier::PatchGeometry base class.
+ *
+ * @see hier::BoundaryBox
+ * @see hier::PatchGeometry
+ * @see geom::BlockGridGeometry
+ */
+
+class BlockPatchGeometry:
+   public hier::PatchGeometry
+{
+public:
+   /*!
+    * @brief Constructor for BlockPatchGeometry class.
+    *
+    * @param[in] ratio_to_level_zero   Refinement ratio to coarsest level.
+    * @param[in] block_number          Number of block where patch exists.
+    * @param[in] touches_regular_bdry  Array telling if patch touches
+    *                                  non-periodic boundary.
+    * @param[in] touches_periodic_bdry Array telling if patch touches
+    *                                  periodic boundary.
+    */
+   BlockPatchGeometry(
+      const hier::IntVector& ratio_to_level_zero,
+      const int block_number,
+      const hier::PatchGeometry::TwoDimBool& touches_regular_bdry,
+      const hier::PatchGeometry::TwoDimBool& touches_periodic_bdry);
+
+   /*!
+    * @brief Destructor for BlockPatchGeometry.
+    */
+   ~BlockPatchGeometry();
+
+   /*!
+    * @brief Get the number of the block where patch exists.
+    *
+    * @return The block number.
+    */
+   int
+   getBlockNumber() const;
+
+   /*!
+    * @brief Print BlockPatchGeometry class data.
+    *
+    * @param[in]     os The std::ostream to which to print
+    */
+   virtual void
+   printClassData(
+      std::ostream& os) const;
+
+private:
+   // These are not implemented.
+   BlockPatchGeometry(
+      const BlockPatchGeometry&);
+   void
+   operator = (
+      const BlockPatchGeometry&);
+
+   /*
+    * The block number where the patch exists
+    */
+   int d_block_number;
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/BlockPatchGeometry.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoundaryBox.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoundaryBox.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,56 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   BoundaryBox representing a portion of the physical boundary 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BoundaryBox_C
+#define included_hier_BoundaryBox_C
+
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/BoundaryLookupTable.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/BoundaryBox.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+BoundaryBox::BoundaryBox(
+   const Box& box,
+   const int bdry_type,
+   const int location_index):
+   d_dim(box.getDim()),
+   d_box(box)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   BoundaryLookupTable* blut =
+      BoundaryLookupTable::getLookupTable(d_dim);
+   const tbox::Array<int>& location_index_max = blut->getMaxLocationIndices();
+
+   TBOX_ASSERT((bdry_type >= 1) && (bdry_type <= d_dim.getValue()));
+   TBOX_ASSERT(location_index >= 0);
+   TBOX_ASSERT(location_index < location_index_max[bdry_type - 1]);
+#endif
+
+   d_bdry_type = bdry_type;
+
+   d_location_index = location_index;
+
+   d_is_mblk_singularity = false;
+}
+
+BoundaryBox::~BoundaryBox()
+{
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoundaryBox.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoundaryBox.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   BoundaryBox representing a portion of the physical boundary 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/hier/BoundaryLookupTable.h"
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Dimension& BoundaryBox::getDim() const
+{
+   return d_dim;
+}
+
+SAMRAI_INLINE_KEYWORD
+BoundaryBox::BoundaryBox(
+   const tbox::Dimension& dim):
+   d_dim(dim),
+   d_box(dim),
+   d_bdry_type(-1),
+   d_location_index(-1)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(d_dim);
+}
+
+SAMRAI_INLINE_KEYWORD
+BoundaryBox::BoundaryBox(
+   const BoundaryBox& boundary_box):
+   d_dim(boundary_box.getDim()),
+   d_box(boundary_box.d_box),
+   d_bdry_type(boundary_box.d_bdry_type),
+   d_location_index(boundary_box.d_location_index),
+   d_is_mblk_singularity(boundary_box.d_is_mblk_singularity)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+const Box& BoundaryBox::getBox() const
+{
+   return d_box;
+}
+
+SAMRAI_INLINE_KEYWORD
+int BoundaryBox::getBoundaryType() const
+{
+   return d_bdry_type;
+}
+
+SAMRAI_INLINE_KEYWORD
+int BoundaryBox::getLocationIndex() const
+{
+   return d_location_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+void BoundaryBox::setIsMultiblockSingularity(
+   bool is_mblk_singularity)
+{
+   d_is_mblk_singularity = is_mblk_singularity;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool BoundaryBox::getIsMultiblockSingularity() const
+{
+   return d_is_mblk_singularity;
+}
+
+SAMRAI_INLINE_KEYWORD
+BoundaryBox::BoundaryOrientation BoundaryBox::getBoundaryOrientation(
+   const int dir) const
+{
+   TBOX_ASSERT(dir < d_dim.getValue());
+
+   BoundaryLookupTable* blut =
+      BoundaryLookupTable::getLookupTable(d_dim);
+
+   int bdry_dir =
+      blut->getBoundaryDirections(d_bdry_type)[d_location_index](dir);
+
+   TBOX_ASSERT(bdry_dir == -1 || bdry_dir == 0 || bdry_dir == 1);
+
+   BoundaryOrientation retval;
+
+   if (bdry_dir == -1) {
+      retval = LOWER;
+   } else if (bdry_dir == 0) {
+      retval = MIDDLE;
+   } else {
+      retval = UPPER;
+   }
+
+   return retval;
+}
+
+SAMRAI_INLINE_KEYWORD
+BoundaryBox& BoundaryBox::operator = (
+   const BoundaryBox& boundary_box)
+{
+   d_box = boundary_box.d_box;
+   d_bdry_type = boundary_box.d_bdry_type;
+   d_location_index = boundary_box.d_location_index;
+   d_is_mblk_singularity = boundary_box.d_is_mblk_singularity;
+
+   return *this;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoundaryBox.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoundaryBox.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,295 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Box representing a portion of the AMR index space 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BoundaryBox
+#define included_hier_BoundaryBox
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/Box.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @breif Class BoundaryBox is is used to describe boundaries of a patch.
+ *
+ * Objects of this type are held by a PatchGeometry object.
+ * The BoundaryBox consists of a Box, a boundary type (codimension), and a
+ * location index.  The Box is one cell wide in at least one direction and is
+ * located just outside of a patch boundary.  For example, a bondary box 
+ * along a patch face is one cell wide in the coordinate direction normal
+ * to the patch face.  The boundary type identifies the type of patch bounadry:
+ * face, edge, or corner (node).  The location index specifies the location
+ * of the boundary box in relation to the patch boundary.  
+ * See the getBoundaryType() and getLocationIndex() methods for more 
+ * information.
+ *
+ * @see hier::Box
+ * @see hier::PatchGeometry
+ * @see hier::BoundaryLookupTable
+ */
+
+class BoundaryBox
+{
+public:
+   /*!
+    * @brief Constructor that builds an undefined boundary box, with invalid
+    * values other than dimension.
+    *
+    * @param[in] dim Dimension
+    */
+   explicit BoundaryBox(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Construct a boundary box described by arguments.
+    *
+    * Assertions:  bdry_type must be between 1 and dim, inclusive.
+    * location_index must be non-negative and less than the location index max,
+    * which is the total number of boundaries of a particular codimension that
+    * a single patch has.  This max value can be obtained from the class
+    * BoundaryLookupTable using the getMaxLocationIndices method.
+    *
+    * @param[in] box
+    * @param[in] bdry_type
+    * @param[in] location_index  
+    */
+   explicit BoundaryBox(
+      const Box& box,
+      const int bdry_type,
+      const int location_index);
+
+   /*!
+    * @brief Copy constructor.
+    *
+    * @param[in] boundary_box
+    */
+   BoundaryBox(
+      const BoundaryBox& boundary_box);
+
+   /*!
+    * @brief The destructor for BoundaryBox.
+    */
+   ~BoundaryBox();
+
+   /*!
+    * @brief Return the Box member of the boundary box
+    *
+    * @return The Box
+    */
+   const Box&
+   getBox() const;
+
+   /*!
+    * @brief Return the boundary type (codimension) of the boundary box.
+    *
+    * \verbatim
+    * Convention:
+    * ===========
+    *
+    * 1d
+    * --
+    * 1 = node
+    *
+    * 2d
+    * --
+    * 1 = edge
+    * 2 = node
+    *
+    * 3d
+    * --
+    * 1 = face
+    * 2 = edge
+    * 3 = node
+    * \endverbatim
+    *
+    * @return boundary type value
+    */
+   int
+   getBoundaryType() const;
+
+   /*!
+    * @brief Return the location index for the boundary box.
+    *
+    * The location index is an integer which indicates the location of the
+    * the boundary box in relation to the location of the associated patch.
+    * The conventions for the location index depend on the dimension of 
+    * the problem and the boundary type (codimentsion) of the BoundaryBox.
+    *
+    * \verbatim
+    * Conventions:
+    * ============
+    *
+    * 1d
+    * --
+    * node (codimension 1):
+    * x_lo : 0
+    * x_hi : 1
+    *
+    * 2d
+    * --
+    * edge (codimension 1):
+    * x_lo: 0
+    * x_hi: 1
+    * y_lo: 2
+    * y_hi: 3
+    *
+    * node (codimension 2):
+    * x_lo, y_lo: 0
+    * x_hi, y_lo: 1
+    * x_lo, y_hi: 2
+    * x_hi, y_hi: 3
+    *
+    * 3d
+    * --
+    *
+    * face (codimension 1):
+    * x_lo: 0
+    * x_hi: 1
+    * y_lo: 2
+    * y_hi: 3
+    * z_lo: 4
+    * z_hi: 5
+    *
+    * edge (codimension 2):
+    * x_lo, y_lo: 0
+    * x_hi, y_lo: 1
+    * x_lo, y_hi: 2
+    * x_hi, y_hi: 3
+    * x_lo, z_lo: 4
+    * x_hi, z_lo: 5
+    * x_lo, z_hi: 6
+    * x_hi, z_hi: 7
+    * y_lo, z_lo: 8
+    * y_hi, z_lo: 9
+    * y_lo, z_hi: 10
+    * y_hi, z_hi: 11
+    *
+    * node (codimension 3):
+    * x_lo, y_lo, z_lo: 0
+    * x_hi, y_lo, z_lo: 1
+    * x_lo, y_hi, z_lo: 2
+    * x_hi, y_hi, z_lo: 3
+    * x_lo, y_lo, z_hi: 4
+    * x_hi, y_lo, z_hi: 5
+    * x_lo, y_hi, z_hi: 6
+    * x_hi, y_hi, z_hi: 7
+    *
+    * \endverbatim
+    *
+    * @return The location index
+    */
+   int
+   getLocationIndex() const;
+
+   /*!
+    * @brief Set the multiblock singularity flag to the argument value.
+    *
+    * In multiblock problems, the code setting up multiblock hierarchies and
+    * patch levels will set this value to true when creating a BoundaryBox
+    * that represents a patch boundary at a multiblock singularity.
+    *
+    * @param[in] is_mblk_singularity
+    */
+   void
+   setIsMultiblockSingularity(
+      bool is_mblk_singularity);
+
+   /*!
+    * @brief Get the value of the multiblock singularity flag.
+    *
+    * @return The singularity flag value.
+    */
+   bool
+   getIsMultiblockSingularity() const;
+
+   /*!
+    * @brief The assignment operator copies all data components.
+    *
+    * @param[in] boundary_box
+    */
+   BoundaryBox&
+   operator = (
+      const BoundaryBox& boundary_box);
+
+   /*!
+    * @brief Enumerated type BoundaryOrientation is used to indicate where a
+    * boundary box is located relative to a patch in a particular coordinate
+    * direction.  MIDDLE means a boundary box is neither on the upper or lower
+    * side of a patch in the given coordinate direction.  For example, an edge 
+    * boundary box on the right side of a patch in 2d is neither on the upper
+    * or lower side of the patch in the J coordinate direction, so its 
+    * BoundaryOrientation value would be MIDDLE.  The same boundary box 
+    * would be UPPER in the I coordinate direction.
+    */
+   enum BoundaryOrientation {
+      LOWER = -1,
+      MIDDLE = 0,
+      UPPER = 1
+   };
+
+   /*!
+    * @brief Get which side of a patch the boundary box is on.
+    *
+    * Returns BoundaryOrientation value indicating whether the boundary
+    * box is on the upper or lower side of the patch in the given coordinate
+    * direction, or in the middle (neither upper nor lower).
+    *
+    * @return BoundaryOrientation value LOWER, MIDDLE, or UPPER
+    *
+    * @param[in] dir Coordinate direction on which to query
+    */
+   BoundaryOrientation
+   getBoundaryOrientation(
+      const int dir) const;
+
+   /*!
+    * @brief Return the dimension of this object.
+    *
+    * @return The dimension
+    */
+   const tbox::Dimension&
+   getDim() const;
+
+private:
+   /*!
+    * @brief Dimension of the object
+    */
+   const tbox::Dimension d_dim;
+
+   /*!
+    * @brief Box holding spatial location of the BoundaryBox.
+    */
+   Box d_box;
+
+   /*!
+    * @brief Codimension of the boundary.
+    */
+   int d_bdry_type;
+
+   /*!
+    * @brief Location index identifying relative location of the BoundaryBox
+    */
+   int d_location_index;
+
+   /*!
+    * @brief Flag telling whether the BoundaryBox is located at a
+    * multiblock singularity.
+    */
+   bool d_is_mblk_singularity;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/BoundaryBox.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoundaryBoxUtils.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoundaryBoxUtils.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,273 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generic utilities for boundary box calculus. 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BoundaryBoxUtils_C
+#define included_hier_BoundaryBoxUtils_C
+
+#include "SAMRAI/hier/BoundaryBoxUtils.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+namespace SAMRAI {
+namespace hier {
+
+BoundaryBoxUtils::BoundaryBoxUtils():
+   d_bbox(tbox::Dimension::getInvalidDimension()),
+   d_outward(tbox::Dimension::getInvalidDimension(), 0)
+{
+}
+
+BoundaryBoxUtils::BoundaryBoxUtils(
+   const BoundaryBox& bbox):
+   d_bbox(bbox),
+   d_outward(bbox.getDim(), 0)
+{
+   computeOutwardShift();
+}
+
+BoundaryBoxUtils::~BoundaryBoxUtils()
+{
+}
+
+void BoundaryBoxUtils::setBoundaryBox(
+   const BoundaryBox& bbox)
+{
+   d_bbox = bbox;
+   computeOutwardShift();
+}
+
+const BoundaryBox& BoundaryBoxUtils::getBoundaryBox() const
+{
+   return d_bbox;
+}
+
+const IntVector& BoundaryBoxUtils::getOutwardShift() const
+{
+   return d_outward;
+}
+
+void BoundaryBoxUtils::computeOutwardShift()
+{
+
+   const tbox::Dimension& dim(d_bbox.getDim());
+   /*
+    * Note that d_outward contains information that is redundant
+    * with respect to the boundary box.  The values of d_outward
+    * depends strictly the location of the boundary box.
+    */
+   const int lidx = d_bbox.getLocationIndex();
+
+   switch (d_bbox.getBoundaryType()) {
+
+      // Note: number of non-zero in d_outward is the same as boundary type.
+
+      case 1:
+      {
+         int i = lidx / 2;
+         d_outward(i) = lidx % 2 == 0 ? -1 /* lower side */ : 1 /* upper side */;
+      }
+      break;
+
+      case 2:
+      {
+         if (dim.getValue() == 2) {
+            d_outward(0) = lidx % 2 == 0 ? -1 : 1;
+            d_outward(1) = lidx / 2 == 0 ? -1 : 1;
+         } else if (dim.getValue() == 3) {
+            const int dir = 2 - (lidx / 4);
+            const int rem = lidx % 4;
+            if (dir == 0) {
+               // Nonzero in dirs 1 and 2.
+               d_outward(1) = rem % 2 == 0 ? -1 : 1;
+               d_outward(2) = rem / 2 == 0 ? -1 : 1;
+            } else if (dir == 1) {
+               // Nonzero in dirs 0 and 2.
+               d_outward(0) = rem % 2 == 0 ? -1 : 1;
+               d_outward(2) = rem / 2 == 0 ? -1 : 1;
+            } else {
+               // Nonzero in dirs 0 and 1.
+               d_outward(0) = rem % 2 == 0 ? -1 : 1;
+               d_outward(1) = rem / 2 == 0 ? -1 : 1;
+            }
+         } else {
+            TBOX_ERROR("BoundaryBoxUtils cannot compute\n"
+               << "boundary direction for " << d_bbox.getBox());
+         }
+      }
+      break;
+
+      case 3:
+      {
+         if (dim.getValue() == 3) {
+            d_outward(0) = lidx % 2 == 0 ? -1 : 1;
+            d_outward(1) = (lidx % 4) / 2 == 0 ? -1 : 1;
+            d_outward(2) = lidx / 4 == 0 ? -1 : 1;
+         } else {
+            TBOX_ERROR("BoundaryBoxUtils cannot compute\n"
+               << "boundary direction for " << d_bbox.getBox());
+         }
+      }
+      break;
+
+      default:
+         TBOX_ERROR("BoundaryBoxUtils cannot compute\n"
+         << "boundary direction for type "
+         << d_bbox.getBoundaryType() << " in " << dim << "D");
+   }
+}
+
+void BoundaryBoxUtils::stretchBoxToGhostWidth(
+   Box& box,
+   const hier::IntVector& ghost_cell_width) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_bbox, box);
+
+   const tbox::Dimension& dim(d_bbox.getDim());
+
+   TBOX_ASSERT(ghost_cell_width >= hier::IntVector::getZero(dim));
+
+   box = d_bbox.getBox();
+   for (int d = 0; d < dim.getValue(); ++d) {
+      /*
+       * If gcw along dimension d is > 1, stretch it out to that width.
+       * If gcw a long dimension d is 0, shrink the box down to nothing
+       * in that dimension.
+       */
+      if (d_outward(d) == -1) {
+         if (ghost_cell_width(d) > 1) box.growLower(d, ghost_cell_width(d) - 1);
+         else box.lower() (d) = box.upper() (d) - (ghost_cell_width(d) - 1);
+      } else if (d_outward(d) == 1) {
+         if (ghost_cell_width(d) > 1) box.growUpper(d, ghost_cell_width(d) - 1);
+         else box.upper() (d) = box.lower() (d) + (ghost_cell_width(d) - 1);
+      }
+   }
+}
+
+void BoundaryBoxUtils::extendBoxOutward(
+   Box& box,
+   const hier::IntVector& extension) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_bbox, box);
+
+   const tbox::Dimension& dim(d_bbox.getDim());
+
+   box = d_bbox.getBox();
+   for (int d = 0; d < dim.getValue(); ++d) {
+      if (d_outward(d) == -1) box.growLower(d, extension(d));
+      else if (d_outward(d) == 1) box.growUpper(d, extension(d));
+   }
+}
+
+int BoundaryBoxUtils::normalDir() const
+{
+   return d_bbox.getLocationIndex() / 2;
+}
+
+/*
+ ************************************************************************
+ * Make surface box on boundary using standard boundary box             *
+ ************************************************************************
+ */
+
+hier::Box BoundaryBoxUtils::getSurfaceBoxFromBoundaryBox() const
+{
+   if (d_bbox.getBoundaryType() != 1) {
+      TBOX_ERROR("BoundaryBoxUtils::getSurfaceBoxFromBoundaryBox\n"
+         << "called with improper boundary box\n");
+   }
+   hier::Box side_index_box = d_bbox.getBox();
+   int location_index = d_bbox.getLocationIndex();
+   if (location_index % 2 == 0) {
+      /*
+       * On the min index side, the face indices are one higher
+       * than the boundary cell indices, in the direction normal
+       * to the boundary.
+       */
+      side_index_box.shift(location_index / 2, 1);
+   }
+   return side_index_box;
+}
+
+/*
+ ************************************************************************
+ * Trim a boundary box so it does not stick out past the corners of a   *
+ * patch.                                                               *
+ ************************************************************************
+ */
+
+hier::BoundaryBox BoundaryBoxUtils::trimBoundaryBox(
+   const hier::Box& limit_box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_bbox, limit_box);
+
+   const tbox::Dimension& dim(d_bbox.getDim());
+
+   TBOX_ASSERT(d_bbox.getBoundaryType() < dim.getValue());
+
+   const hier::Box& bbox = d_bbox.getBox();
+   const hier::Index& plo = limit_box.lower();
+   const hier::Index& pup = limit_box.upper();
+   const hier::Index& blo = bbox.lower();
+   const hier::Index& bup = bbox.upper();
+   hier::Index newlo(dim), newup(dim);
+
+   if (d_bbox.getBoundaryType() == 1) {
+      /*
+       * Loop through directions.
+       * Preserve box size in direction normal to boundary.
+       * Trim box size in direction parallel to boundary.
+       */
+      const int boundary_normal = d_bbox.getLocationIndex() / 2;
+      int d;
+      for (d = 0; d < dim.getValue(); ++d) {
+         if (d == boundary_normal) {
+            newlo(d) = blo(d);
+            newup(d) = bup(d);
+         } else {
+            // On min side, use max between boundary and patch boxes.
+            newlo(d) = tbox::MathUtilities<int>::Max(blo(d), plo(d));
+            // On max side, use min between boundary and patch boxes.
+            newup(d) = tbox::MathUtilities<int>::Min(bup(d), pup(d));
+         }
+      }
+   } else if (d_bbox.getBoundaryType() == 2) {
+      /*
+       * Loop through directions.
+       * Preserve box size in direction normal to boundary.
+       * Trim box size in direction parallel to boundary.
+       */
+      const int boundary_dir = 4 - (d_bbox.getLocationIndex() / 4);
+      int d;
+      for (d = 0; d < dim.getValue(); ++d) {
+         if (d == boundary_dir) {
+            // On min side, use max between boundary and patch boxes.
+            newlo(d) = tbox::MathUtilities<int>::Max(blo(d), plo(d));
+            // On max side, use min between boundary and patch boxes.
+            newup(d) = tbox::MathUtilities<int>::Min(bup(d), pup(d));
+         } else {
+            newlo(d) = blo(d);
+            newup(d) = bup(d);
+         }
+      }
+   }
+
+   const hier::Box newbox(newlo, newup);
+   const hier::BoundaryBox newbbox(newbox,
+                                   d_bbox.getBoundaryType(),
+                                   d_bbox.getLocationIndex());
+
+   return newbbox;
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoundaryBoxUtils.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoundaryBoxUtils.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,207 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generic utilities for boundary box calculus. 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BoundaryBoxUtils
+#define included_hier_BoundaryBoxUtils
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief Perform shifts, extensions, etc on a BoundaryBox using the box's
+ * location index and type.
+ *
+ * @see hier::BoundaryBox
+ */
+
+class BoundaryBoxUtils
+{
+
+public:
+   /*!
+    * @brief Construct with a boundary box.
+    *
+    * @param[in]  bbox  boundary box
+    *
+    * @see setBoundaryBox()
+    */
+   explicit BoundaryBoxUtils(
+      const BoundaryBox& bbox);
+
+   /*!
+    * @brief Destructor.
+    */
+   virtual ~BoundaryBoxUtils();
+
+   /*!
+    * @brief Reset boundary box.
+    *
+    * All utility operations refer to this box.
+    *
+    * @param[in]  bbox  boundary box
+    */
+   void
+   setBoundaryBox(
+      const BoundaryBox& bbox);
+
+   /*!
+    * @brief Get boundary box.
+    *
+    * @return The boundary box
+    */
+   const BoundaryBox&
+   getBoundaryBox() const;
+
+   /*!
+    * @brief Get the outward direction in logical space.
+    *
+    * Each component of the returned outward direction will have
+    * one of these values:
+    *
+    * <ul>
+    *   <li> -1 if the outward direction is toward the lower indices
+    *   <li> 0 for the direction is orthogonal to the outward direction.
+    *   <li> 1 if the outward direction is toward the higher indices
+    * </ul>
+    *
+    * The number of non-zero components should equal the boundary
+    * type (codimension).
+    *
+    * @return IntVector containing the outward direction values
+    */
+   const IntVector&
+   getOutwardShift() const;
+
+   /*!
+    * @brief Stretch box outward by the given ghost cell width.
+    *
+    * The number of directions affected is the same as the
+    * codimension of the boundary.
+    *
+    * Note that the BoundaryBox is defined to be one cell wide.  The
+    * output of this method is the box held by the BoundaryBox, stretched to
+    * cover the given ghost cell width.  This means that if ghost_cell_width
+    * is one, the output is identical to the BoundaryBox.  If the ghost
+    * width is zero in any direction, the output will shrink to nothing
+    * in that direction.
+    *
+    * @param[out] box The stretched box.
+    * @param[in] ghost_cell_width Ghost width to stretch the box.
+    */
+   void
+   stretchBoxToGhostWidth(
+      Box& box,
+      const hier::IntVector& ghost_cell_width) const;
+
+   /*!
+    * @brief Extend box outward by the given amount.
+    *
+    * The output box is the box held by the BoundaryBox extended outward
+    * according to the values in the extension IntVector.  If any
+    * coordinate direction has a zero value in the IntVector returned by
+    * getOutwardShift(), the box will not be extended in that direction.
+    * The number of directions that will be extended is equal to the
+    * codimension of the BoundaryBox.
+    *
+    * @param[out] box      The extended box
+    * @param[in] extension IntVector telling how many cells to extend the box
+    *                      in each coordinate direction.
+    */
+   void
+   extendBoxOutward(
+      Box& box,
+      const IntVector& extension) const;
+
+   /*!
+    * @brief Return the direction normal to the BoundaryBox.
+    *
+    * The normal direction is defined only for surface
+    * boundaries (codimension 1).  A -1 is returned for
+    * all other boundary types.
+    *
+    * @return The normal direction.
+    */
+   int
+   normalDir() const;
+
+   /*!
+    * @brief Trim a boundary box so that it does not stick out
+    * past a limiting box in direction transverse to the boundary
+    * normal.
+    *
+    * This method affects the only box dimensions parallel to
+    * the boundary.  For methods affecting other box dimensions,
+    * see stretchBoxToGhostWidth().
+    *
+    * The boundary type of the BoundaryBox that was given to the
+    * BoundaryBoxUtils constructor must be less than dim.
+    *
+    * @param[in] limit_box Box to not stick out past
+    *
+    * @return New trimmed boundary box.
+    */
+   hier::BoundaryBox
+   trimBoundaryBox(
+      const hier::Box& limit_box) const;
+
+   /*!
+    * @brief Return box describing the index space of the outer surface of
+    * a boundary box.
+    *
+    * Define a box describing the indices of the surface of the
+    * the input boundary box.  A surface is a face in 3D and an edge
+    * in 2D.  These surfaces lie on the boundary itself.
+    *
+    * The input boundary_box must be of type 1
+    * (see hier::BoundaryBox::getBoundaryType()).
+    *
+    * This is a utility function for working with the surface
+    * indices corresponding to a boundary box.
+    *
+    * @return a box to define the side indices corresponding to the
+    * BoundaryBox
+    */
+   hier::Box
+   getSurfaceBoxFromBoundaryBox() const;
+
+private:
+   BoundaryBoxUtils();
+
+   /*!
+    * @brief Compute the shift in the outward direction
+    * (redundant data, function of boundary box) and store
+    * in d_outward.
+    *
+    * @see getOutwardShift();
+    */
+   void
+   computeOutwardShift();
+
+   /*!
+    * @brief Boundary box implicitly referred to by all methods.
+    *
+    * @see setBoundaryBox(), getBoundaryBox()
+    */
+   BoundaryBox d_bbox;
+
+   /*!
+    * @brief Vector pointing outward from patch.
+    */
+   IntVector d_outward;
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoundaryLookupTable.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoundaryLookupTable.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,195 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Lookup table to aid in BoundaryBox construction 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BoundaryLookupTable_C
+#define included_hier_BoundaryLookupTable_C
+
+#include "SAMRAI/hier/BoundaryLookupTable.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/BoundaryLookupTable.I"
+#endif
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+BoundaryLookupTable *
+BoundaryLookupTable::s_lookup_table_instance[tbox::Dimension::MAXIMUM_DIMENSION_VALUE
+] = { (BoundaryLookupTable *)NULL };
+
+tbox::StartupShutdownManager::Handler
+BoundaryLookupTable::s_finalize_handler(
+   0,
+   0,
+   0,
+   BoundaryLookupTable::finalizeCallback,
+   tbox::StartupShutdownManager::priorityBoundaryLookupTable);
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Lookup table constructor and destructor.                              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+BoundaryLookupTable::BoundaryLookupTable(
+   const tbox::Dimension& dim):
+   d_dim(dim)
+{
+   if (d_table[0].isNull()) {
+      int factrl[d_dim.getValue() + 1];
+      factrl[0] = 1;
+      for (int i = 1; i <= d_dim.getValue(); i++) factrl[i] = i * factrl[i - 1];
+      d_ncomb.resizeArray(d_dim.getValue());
+      d_max_li.resizeArray(d_dim.getValue());
+      for (int codim = 1; codim <= d_dim.getValue(); codim++) {
+         int cdm1 = codim - 1;
+         d_ncomb[cdm1] = factrl[d_dim.getValue()]
+            / (factrl[codim] * factrl[d_dim.getValue() - codim]);
+
+         tbox::Array<int> work;
+         work.resizeArray(codim * d_ncomb[cdm1]);
+
+         int recursive_work[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int recursive_work_lvl = 0;
+         int* recursive_work_ptr;
+         buildTable(work.getPointer(), codim, 1, recursive_work,
+            recursive_work_lvl, recursive_work_ptr);
+
+         d_table[cdm1].resizeArray(d_ncomb[cdm1]);
+         for (int j = 0; j < d_ncomb[cdm1]; j++) {
+            d_table[cdm1][j].resizeArray(codim);
+            for (int k = 0; k < codim; k++) {
+               d_table[cdm1][j][k] = work[j * codim + k] - 1;
+            }
+         }
+
+         d_max_li[cdm1] = d_ncomb[cdm1] * (1 << codim);
+      }
+   }
+
+   buildBoundaryDirectionVectors();
+}
+
+BoundaryLookupTable::~BoundaryLookupTable()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Recursive function that computes the combinations in the lookup       *
+ * table.                                                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BoundaryLookupTable::buildTable(
+   int* table,
+   int codim,
+   int ibeg,
+   int(&work)[tbox::Dimension::MAXIMUM_DIMENSION_VALUE],
+   int& lvl,
+   int *& ptr)
+{
+   lvl++;
+   if (lvl == 1) ptr = table;
+   int iend = d_dim.getValue() - codim + lvl;
+   for (int i = ibeg; i <= iend; i++) {
+      work[lvl - 1] = i;
+      if (lvl != codim) {
+         buildTable(ptr, codim, i + 1, work, lvl, ptr);
+      } else {
+         for (int j = 0; j < codim; j++) {
+            *(ptr + j) = work[j];
+         }
+         ptr += codim;
+      }
+   }
+   lvl--;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Build table of IntVectors indication locations of boundaries relative *
+ * to a patch.                                                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BoundaryLookupTable::buildBoundaryDirectionVectors()
+{
+
+   d_bdry_dirs.resizeArray(d_dim.getValue());
+
+   for (int i = 0; i < d_dim.getValue(); i++) {
+      d_bdry_dirs[i].resizeArray(d_max_li[i], IntVector::getZero(d_dim));
+      int codim = i + 1;
+
+      for (int loc = 0; loc < d_max_li[i]; loc++) {
+         const tbox::Array<int>& dirs = getDirections(loc, codim);
+
+         for (int d = 0; d < dirs.size(); d++) {
+
+            if (isUpper(loc, codim, d)) {
+
+               d_bdry_dirs[i][loc](dirs[d]) = 1;
+
+            } else {
+
+               d_bdry_dirs[i][loc](dirs[d]) = -1;
+
+            }
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ * Free statics.
+ *
+ *************************************************************************
+ */
+void BoundaryLookupTable::finalizeCallback()
+{
+   for (int i = 0; i < tbox::Dimension::MAXIMUM_DIMENSION_VALUE; ++i) {
+      if (s_lookup_table_instance[i]) {
+         delete s_lookup_table_instance[i];
+      }
+      s_lookup_table_instance[i] = ((BoundaryLookupTable *)NULL);
+   }
+
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoundaryLookupTable.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoundaryLookupTable.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,106 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:    
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Static lookup table member functions.                                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+BoundaryLookupTable *BoundaryLookupTable::getLookupTable(
+   const tbox::Dimension& dim)
+{
+   if (!s_lookup_table_instance[dim.getValue() - 1]) {
+      s_lookup_table_instance[dim.getValue() - 1] = new BoundaryLookupTable(dim);
+   }
+   return s_lookup_table_instance[dim.getValue() - 1];
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Inline accessory functions to retrieve data members.                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Array<int>& BoundaryLookupTable::getMaxLocationIndices() const
+{
+   return d_max_li;
+}
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Array<int>& BoundaryLookupTable::getDirections(
+   const int loc,
+   const int codim) const
+{
+   TBOX_ASSERT((codim > 0) && (codim <= d_dim.getValue()));
+   TBOX_ASSERT((loc >= 0) && (loc < d_max_li[codim - 1]));
+
+   int iloc = loc / (1 << codim);
+   return d_table[codim - 1][iloc];
+}
+
+SAMRAI_INLINE_KEYWORD
+bool BoundaryLookupTable::isUpper(
+   const int loc,
+   const int codim,
+   const int index) const
+{
+   TBOX_ASSERT((codim > 0) && (codim <= d_dim.getValue()));
+   TBOX_ASSERT((loc >= 0) && (loc < d_max_li[codim - 1]));
+   TBOX_ASSERT((index >= 0) && (index < codim));
+
+   return (loc % (1 << codim)) & (1 << (index));
+}
+
+SAMRAI_INLINE_KEYWORD
+bool BoundaryLookupTable::isLower(
+   const int loc,
+   const int codim,
+   const int index) const
+{
+   TBOX_ASSERT((codim > 0) && (codim <= d_dim.getValue()));
+   TBOX_ASSERT((loc >= 0) && (loc < d_max_li[codim - 1]));
+   TBOX_ASSERT((index >= 0) && (index < codim));
+
+   return !isUpper(loc, codim, index);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Get array of IntVectors indication location of a boundary relative    *
+ * to a patch.                                                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Array<IntVector>&
+BoundaryLookupTable::getBoundaryDirections(
+   int codim) const
+{
+   TBOX_ASSERT((codim > 0) && (codim <= d_dim.getValue()));
+   return d_bdry_dirs[codim - 1];
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoundaryLookupTable.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoundaryLookupTable.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,270 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Lookup table to aid in BoundaryBox construction 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BoundaryLookupTable
+#define included_hier_BoundaryLookupTable
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/Array.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief Singleton class to organize patch boundary information.
+ *
+ * Class BoundaryLookupTable is a singleton class that maintains
+ * a table that organizes all of the possible boundary region cases
+ * for a patch.  It is used primarily by the GridGeometry during the
+ * construction of physical boundary boxes for patches and by the
+ * PatchGeometry class to determine box regions to be filled during
+ * a physical boundary fill.
+ *
+ * This class is useful for any situation where enumerating the
+ * cases for boundary regions around a box is needed. The main advantage
+ * of using this class is that such calculations can be programmed in
+ * a dimension-independent way.
+ *
+ * @see hier::BoundaryBox
+ * @see hier::GridGeometry
+ * @see hier::PatchGeometry
+ */
+
+class BoundaryLookupTable
+{
+public:
+   /*!
+    * @brief Return pointer to singleton instance of the boundary
+    * lookup table.
+    *
+    * Following the Singleton design pattern, users of this class 
+    * do not explicitly allocate or deallocate the Singleton instance.
+    *
+    * @param   dim   Dimension of the object.
+    *
+    * @return  Pointer to lookup table instance.
+    */
+   static BoundaryLookupTable *
+   getLookupTable(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Get array of active directions for specific boundary
+    * location and codimension case.
+    *
+    * The active directions are those coordinate direction in which
+    * the boundary region would have to be shifted in order to be
+    * contained in the corresponding patch box (whose boundary
+    * we are interested in).
+    *
+    * @param loc   integer location index of boundary region
+    * @param codim integer codimension of boundary region
+
+    * @return  const reference to integer array of length codim
+    *          containing the active directions for this boundary case.
+    */
+   const tbox::Array<int>&
+   getDirections(
+      int loc,
+      int codim) const;
+
+   /*!
+    * @brief Get array of maximum number of locations for each
+    * codimension boundary case.
+    *
+    * For example, a 2D patch has 4 possible locations for codimension 1
+    * (edges) and 4 possible locations for codimension 2 (nodes).  A 3D
+    * patch has 6 possible locations for codimension 1 (faces), 12 for
+    * codimension 2 (edges), and 8 for codimension 3 (nodes).
+    *
+    * @return integer array of length dim, each entry of which indicates
+    *         the maximum number of boundary locations for each
+    *         codimension
+    */
+   const tbox::Array<int>&
+   getMaxLocationIndices() const;
+
+   /*!
+    * @brief Determines if given boundary information indicates a
+    * a lower boundary region.
+    *
+    * A boundary region is a "lower" boundary region if the associated patch
+    * box contains higher values along the axis in the coordinate
+    * direction than the boundary region.
+    *
+    * @param loc       integer location index of boundary region
+    * @param codim     integer codimension of boundary region
+    * @param dir_index integer spatial direction identifier, an index into the
+    *                  array returned by getDirections().
+    *
+    * @return bool true if the boundary type of codimension codim indexed
+    * by loc is a lower boundary in the specified direction;
+    * return false if the boundary is an upper boundary.
+    */
+   bool
+   isLower(
+      int loc,
+      int codim,
+      int dim_index) const;
+
+   /*!
+    * @brief Determines if given boundary information indicates a
+    * an upper boundary region.
+    *
+    * A boundary region is an "upper" boundary region if the associated patch
+    * box contains lower values along the axis in the coordinate
+    * direction than the boundary region.
+    *
+    * @param loc       integer location index of boundary region
+    * @param codim     integer codimension of boundary region
+    * @param dir_index integer spatial direction identifier, an index into the
+    *                  array returned by getDirections().
+    *
+    * @return bool true if the boundary type of codimension codim indexed
+    * by loc is an upper boundary in the specified direction;
+    * return false if the boundary is a lower boundary.
+    */
+   bool
+   isUpper(
+      int loc,
+      int codim,
+      int index) const;
+
+   /*!
+    * @brief Get array of boundary direction IntVectors.
+    *
+    * For any codimension, there is a particular number of valid boundary
+    * locations.  This function returns an array of IntVectors that provide
+    * information about where each boundary location lies in relation to
+    * a patch.  The array's length is the number of valid locations for
+    * the given codimension, and the array is indexed by the location id's
+    * that are set up by this BoundaryLookupTable class.
+    *
+    * For a particular location, each element of the IntVector tells whether
+    * the location is on the lower or upper side, or neither, of the patch in
+    * a specific coordinate direction.  -1 indicates lower, 0 indicates
+    * neither, and 1 indicates upper.
+    *
+    * @param codim  codimension
+    * @return       Array of IntVectors, one element for each valid location
+    */
+   const tbox::Array<IntVector>&
+   getBoundaryDirections(
+      int codim) const;
+
+protected:
+   /*!
+    * @brief protected constructor
+    *
+    * The constructor for BoundaryLookupTable is protected.
+    * Consistent with the definition of a Singleton class, only the
+    * lookup table has access to the constructor for the class.
+    *
+    * The constructor initializes the state of lookup table contents.
+    *
+    * @param dim  Dimension
+    */
+   BoundaryLookupTable(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief protected destructor
+    *
+    * The destructor for BoundaryLookupTable is protected. See the
+    * comments for the constructor.
+    *
+    * The destructor deallocates lookup table contents.
+    */
+   ~BoundaryLookupTable();
+
+private:
+   /*!
+    * @brief Build table by recursively computing the entries in the
+    * lookup table for a given codimension.
+    *
+    * TODO:  Document the parameters.
+    */
+   void buildTable(int* table,
+                   int codim,
+                   int ibeg,
+                   int(&work)[tbox::Dimension::MAXIMUM_DIMENSION_VALUE],
+                   int & lvl,
+                   int * & ptr);
+
+   /*!
+    * @brief Build table of direction IntVectors
+    *
+    * Private member function that builds table of intvectors that stores
+    * whether a boundary location is upper, lower, or neither in each
+    * coordinate direction
+    */
+   void
+   buildBoundaryDirectionVectors();
+
+   /*!
+    * @brief Deallocate the BoundaryLookupTable instance.
+    *
+    * It is not necessary to call this function at program termination,
+    * since it is automatically called by the StartupShutdownManager class.
+    */
+   static void
+   finalizeCallback();
+
+   /*!
+    * @brief Static data members used to control access to and destruction of
+    * singleton variable database instance.
+    */
+   static BoundaryLookupTable* s_lookup_table_instance[tbox::Dimension::
+                                                       MAXIMUM_DIMENSION_VALUE];
+
+   /*!
+    * @brief Dimension of the object
+    */
+   const tbox::Dimension d_dim;
+
+   /*!
+    * @brief Array used to store the number of combinations for
+    * each codimension.
+    */
+   tbox::Array<int> d_ncomb;
+
+   /*!
+    * @brief Array used to store the number of possible location indices
+    * for each codimension.
+    */
+   tbox::Array<int> d_max_li;
+
+   /*!
+    * @brief Data member used to store the lookup table.
+    */
+   tbox::Array<tbox::Array<int> >
+   d_table[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   /*!
+    * @brief Array to hold information about possible directions for each
+    * codimension.
+    */
+   tbox::Array<tbox::Array<hier::IntVector> > d_bdry_dirs;
+
+   static tbox::StartupShutdownManager::Handler
+   s_finalize_handler;
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/BoundaryLookupTable.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/Box.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/Box.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,433 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Box representing a portion of the AMR index space 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_Box_C
+#define included_hier_Box_C
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/Box.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+Box * Box::s_emptys[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+Box * Box::s_universes[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+tbox::StartupShutdownManager::Handler
+Box::s_initialize_finalize_handler(
+   Box::initializeCallback,
+   0,
+   0,
+   Box::finalizeCallback,
+   tbox::StartupShutdownManager::priorityListElements);
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return the dimension of the box that is the longest.                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int Box::longestDimension() const
+{
+   int max = upper(0) - lower(0);
+   int dim = 0;
+
+   for (int i = 1; i < getDim().getValue(); i++)
+      if ((upper(i) - lower(i)) > max) {
+         max = upper(i) - lower(i);
+         dim = i;
+      }
+   return dim;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Type Conversions							*
+ *									*
+ *************************************************************************
+ */
+
+tbox::DatabaseBox Box::DatabaseBox_from_Box() const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(getDim());
+
+   tbox::DatabaseBox new_Box;
+
+   new_Box.setDim(getDim());
+
+   for (int i = 0; i < getDim().getValue(); i++) {
+      new_Box.lower(i) = d_lo(i);
+      new_Box.upper(i) = d_hi(i);
+   }
+
+   return new_Box;
+}
+
+void Box::set_Box_from_DatabaseBox(
+   const tbox::DatabaseBox& box)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(getDim());
+
+   for (int i = 0; i < box.getDim().getValue(); i++) {
+      d_lo(i) = box.lower(i);
+      d_hi(i) = box.upper(i);
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Stream input/output operators: [(l0,...,ln),(u0,...,un)].		*
+ *									*
+ *************************************************************************
+ */
+
+std::istream& operator >> (
+   std::istream& s,
+   Box& box)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(box.getDim());
+
+   while (s.get() != '[') ;
+   s >> box.lower();
+   while (s.get() != ',') NULL_STATEMENT;
+   s >> box.upper();
+   while (s.get() != ']') NULL_STATEMENT;
+   return s;
+}
+
+std::ostream& operator << (
+   std::ostream& s,
+   const Box& box)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(box.getDim());
+
+   if (box.empty()) {
+      s << "[(),()]";
+   } else {
+      s << '[' << box.lower() << ',' << box.upper() << ']';
+   }
+   return s;
+}
+
+Box& Box::operator += (
+   const Box& box)
+{
+
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   if (!box.empty()) {
+      if (empty()) {
+         *this = box;
+      } else {
+         d_lo.min(box.d_lo);
+         d_hi.max(box.d_hi);
+      }
+   }
+   return *this;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Static member function called from coalesceWith().  It attempts to    *
+ * recursively coalesce intervals individual dimensions in index space.  *
+ * If it is possible to coalesce two intervals (defined by a proper      *
+ * overlap or adjacency relationship), the value true is returned.       *
+ * If this is impossible, false is returned.                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool Box::coalesceIntervals(
+   const int* lo1,
+   const int* hi1,
+   const int* lo2,
+   const int* hi2,
+   const int dim)
+{
+   bool retval = false;
+   if (dim == 1) {
+      // interval 1 to the right of interval 2.
+      if ((lo1[0] <= hi2[0] + 1) && (hi2[0] <= hi1[0])) {
+         retval = true;
+         return retval;
+      }
+      // interval 1 to the left of interval 2.
+      if ((lo1[0] <= lo2[0]) && (lo2[0] <= hi1[0] + 1)) {
+         retval = true;
+         return retval;
+      }
+   } else {
+      for (int id = 0; id < dim; id++) {
+         if ((lo1[id] == lo2[id]) && (hi1[id] == hi2[id])) {
+            int id2;
+            int low1[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+            int high1[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+            int low2[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+            int high2[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+            for (id2 = 0; id2 < id; id2++) {
+               low1[id2] = lo1[id2];
+               high1[id2] = hi1[id2];
+               low2[id2] = lo2[id2];
+               high2[id2] = hi2[id2];
+            }
+            for (id2 = id + 1; id2 < dim; id2++) {
+               int id1 = id2 - 1;
+               low1[id1] = lo1[id2];
+               high1[id1] = hi1[id2];
+               low2[id1] = lo2[id2];
+               high2[id1] = hi2[id2];
+            }
+            if (coalesceIntervals(low1, high1, low2, high2, dim - 1)) {
+               retval = true;
+               return retval;
+            }
+         }
+      }
+   }
+
+   return retval;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true if this box can be coalesced with the argument box,       *
+ * and set this box to the union of the boxes.  Otherwise, return false  *
+ * and leave this box as is.  Two boxes may be coalesced if their union  *
+ * is a box.  This routine attempts to coalesce the boxes along          *
+ * each coordinate direction using the coalesceIntervals() function.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool Box::coalesceWith(
+   const Box& box)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   bool retval = false;
+
+   if (empty() || box.empty()) {
+      retval = true;
+      *this += box;
+   } else {
+      int id;
+      const int* box_lo = &box.lower()[0];
+      const int* box_hi = &box.upper()[0];
+      int me_lo[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int me_hi[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (id = 0; id < getDim().getValue(); id++) {
+         me_lo[id] = d_lo(id);
+         me_hi[id] = d_hi(id);
+      }
+      if (coalesceIntervals(box_lo, box_hi, me_lo, me_hi, getDim().getValue())) {
+         retval = true;
+      } else { // test for one box containing the other...
+         // test whether me contains box.
+         retval = true;
+         id = 0;
+         while (retval && (id < getDim().getValue())) {
+            retval = ((me_lo[id] <= box_lo[id]) && (me_hi[id] >= box_hi[id]));
+            id++;
+         }
+         if (!retval) { // me doesn't contain box; check other way around...
+            retval = true;
+            id = 0;
+            while (retval && (id < getDim().getValue())) {
+               retval = ((box_lo[id] <= me_lo[id])
+                         && (box_hi[id] >= me_hi[id]));
+               id++;
+            }
+         }
+      }
+   }
+
+   if (retval) *this += box;
+
+   return retval;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Rotates a 3-Dimensional box 45*num_rotations degrees around the given *
+ * and set this box to the union of the boxes.                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Box::rotateAboutAxis(
+   const int axis,
+   const int num_rotations)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(getDim());
+   TBOX_ASSERT(axis < getDim().getValue());
+   TBOX_ASSERT(getDim().getValue() == 3);
+
+   const tbox::Dimension& dim(getDim());
+
+   const int a = (axis + 1) % dim.getValue();
+   const int b = (axis + 2) % dim.getValue();
+
+   Index tmp_lo(dim);
+   Index tmp_hi(dim);
+
+   for (int j = 0; j < num_rotations; j++) {
+      tmp_lo = d_lo;
+      tmp_hi = d_hi;
+      d_lo(a) = tmp_lo(b);
+      d_lo(b) = -tmp_hi(a) - 1;
+      d_hi(a) = tmp_hi(b);
+      d_hi(b) = -tmp_lo(a) - 1;
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Rotate a box in the manner determined by the rotation number          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Box::rotate(
+   const int rotation_number)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(getDim());
+   TBOX_ASSERT(getDim().getValue() == 2 || getDim().getValue() == 3);
+
+   if (getDim().getValue() == 2) {
+      for (int j = 0; j < rotation_number; j++) {
+         Index tmp_lo(d_lo);
+         Index tmp_hi(d_hi);
+
+         d_lo(0) = tmp_lo(1);
+         d_lo(1) = -tmp_hi(0) - 1;
+         d_hi(0) = tmp_hi(1);
+         d_hi(1) = -tmp_lo(0) - 1;
+      }
+   } else {
+
+      if (getDim().getValue() == 3) {
+         if (rotation_number == 0) {
+            return;
+         } else if (rotation_number == 1) {
+            rotateAboutAxis(0, 3);
+            rotateAboutAxis(2, 3);
+         } else if (rotation_number == 2) {
+            rotateAboutAxis(1, 1);
+            rotateAboutAxis(2, 1);
+         } else if (rotation_number == 3) {
+            rotateAboutAxis(1, 2);
+            rotateAboutAxis(0, 3);
+         } else if (rotation_number == 4) {
+            rotateAboutAxis(1, 3);
+         } else if (rotation_number == 5) {
+            rotateAboutAxis(2, 1);
+         } else if (rotation_number == 6) {
+            rotateAboutAxis(1, 1);
+         } else if (rotation_number == 7) {
+            rotateAboutAxis(0, 3);
+         } else if (rotation_number == 8) {
+            rotateAboutAxis(0, 2);
+            rotateAboutAxis(2, 3);
+         } else if (rotation_number == 9) {
+            rotateAboutAxis(0, 3);
+            rotateAboutAxis(2, 1);
+         } else if (rotation_number == 10) {
+            rotateAboutAxis(1, 2);
+         } else if (rotation_number == 11) {
+            rotateAboutAxis(0, 3);
+            rotateAboutAxis(1, 3);
+         } else if (rotation_number == 12) {
+            rotateAboutAxis(2, 3);
+         } else if (rotation_number == 13) {
+            rotateAboutAxis(0, 1);
+         } else if (rotation_number == 14) {
+            rotateAboutAxis(0, 2);
+            rotateAboutAxis(1, 1);
+         } else if (rotation_number == 15) {
+            rotateAboutAxis(0, 1);
+            rotateAboutAxis(1, 3);
+         } else if (rotation_number == 16) {
+            rotateAboutAxis(0, 2);
+            rotateAboutAxis(1, 2);
+         } else if (rotation_number == 17) {
+            rotateAboutAxis(0, 1);
+            rotateAboutAxis(2, 1);
+         } else if (rotation_number == 18) {
+            rotateAboutAxis(0, 3);
+            rotateAboutAxis(1, 1);
+         } else if (rotation_number == 19) {
+            rotateAboutAxis(0, 1);
+            rotateAboutAxis(2, 3);
+         } else if (rotation_number == 20) {
+            rotateAboutAxis(0, 2);
+         } else if (rotation_number == 21) {
+            rotateAboutAxis(0, 2);
+            rotateAboutAxis(2, 1);
+         } else if (rotation_number == 22) {
+            rotateAboutAxis(0, 2);
+            rotateAboutAxis(1, 3);
+         } else if (rotation_number == 23) {
+            rotateAboutAxis(1, 2);
+            rotateAboutAxis(0, 1);
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void Box::initializeCallback()
+{
+   for (unsigned short d = 0; d < tbox::Dimension::MAXIMUM_DIMENSION_VALUE; ++d) {
+      tbox::Dimension dim(static_cast<unsigned short>(d + 1));
+      s_emptys[d] = new Box(dim);
+
+      /*
+       * Note we can't use Index getMin, getMax here as that
+       * would create a dependency between static initializers
+       */
+      s_universes[d] = new hier::Box(
+            hier::Index(dim, tbox::MathUtilities<int>::getMin()),
+            hier::Index(dim, tbox::MathUtilities<int>::getMax()));
+   }
+
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void Box::finalizeCallback()
+{
+   for (int d = 0; d < tbox::Dimension::MAXIMUM_DIMENSION_VALUE; ++d) {
+      delete s_emptys[d];
+      delete s_universes[d];
+   }
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/Box.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/Box.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,708 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Box representing a portion of the AMR index space 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/MathUtilities.h"
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Dimension& Box::getDim() const
+{
+   return d_lo.getDim();
+}
+
+SAMRAI_INLINE_KEYWORD
+Box::Box():
+   d_lo(tbox::Dimension::getInvalidDimension(), tbox::MathUtilities<int>::getMax()),
+   d_hi(tbox::Dimension::getInvalidDimension(), tbox::MathUtilities<int>::getMin())
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+Box::Box(
+   const tbox::Dimension& dim):
+   d_lo(dim, tbox::MathUtilities<int>::getMax()),
+   d_hi(dim, tbox::MathUtilities<int>::getMin())
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(dim);
+}
+
+SAMRAI_INLINE_KEYWORD
+Box::Box(
+   const Index& lower,
+   const Index& upper):
+   d_lo(lower),
+   d_hi(upper)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(lower, upper);
+}
+
+SAMRAI_INLINE_KEYWORD
+Box::Box(
+   const Box& box):d_lo(box.d_lo),
+   d_hi(box.d_hi)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+Box::Box(
+   const tbox::DatabaseBox& box):
+   d_lo(box.getDim(), tbox::MathUtilities<int>::getMax()),
+   d_hi(box.getDim(), tbox::MathUtilities<int>::getMin())
+{
+   set_Box_from_DatabaseBox(box);
+}
+
+SAMRAI_INLINE_KEYWORD
+Box::~Box()
+{
+}
+
+
+SAMRAI_INLINE_KEYWORD
+Box& Box::Box_from_DatabaseBox(
+   const tbox::DatabaseBox& box)
+{
+   set_Box_from_DatabaseBox(box);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+Box& Box::operator = (
+   const Box& box)
+{
+
+   /*
+    * Allow assignment of to an uninitialized box but
+    * not from an uninitialized box.
+    * This is needed for tbox::Array and vector.
+    */
+   if (getDim().isValid()) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   } else {
+      TBOX_DIM_ASSERT_CHECK_DIM(box.getDim());
+   }
+
+   d_lo = box.d_lo;
+   d_hi = box.d_hi;
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+Box& Box::operator = (
+   const tbox::DatabaseBox& box)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   return Box_from_DatabaseBox(box);
+}
+
+SAMRAI_INLINE_KEYWORD
+Index& Box::lower()
+{
+   return d_lo;
+}
+
+SAMRAI_INLINE_KEYWORD
+Index& Box::upper()
+{
+   return d_hi;
+}
+
+SAMRAI_INLINE_KEYWORD
+const Index& Box::lower() const
+{
+   return d_lo;
+}
+
+SAMRAI_INLINE_KEYWORD
+const Index& Box::upper() const
+{
+   return d_hi;
+}
+
+SAMRAI_INLINE_KEYWORD
+int& Box::lower(
+   const int i)
+{
+   return d_lo(i);
+}
+
+SAMRAI_INLINE_KEYWORD
+int& Box::upper(
+   const int i)
+{
+   return d_hi(i);
+}
+
+SAMRAI_INLINE_KEYWORD
+const int& Box::lower(
+   const int i) const
+{
+   return d_lo(i);
+}
+
+SAMRAI_INLINE_KEYWORD
+const int& Box::upper(
+   const int i) const
+{
+   return d_hi(i);
+}
+
+SAMRAI_INLINE_KEYWORD
+bool Box::empty() const
+{
+   for (int i = 0; i < getDim().getValue(); i++) {
+      if (d_hi(i) < d_lo(i)) return true;
+   }
+
+   return false;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool Box::isEmpty() const
+{
+   for (int i = 0; i < getDim().getValue(); i++) {
+      if (d_hi(i) < d_lo(i)) return true;
+   }
+
+   return false;
+}
+
+SAMRAI_INLINE_KEYWORD
+void Box::setEmpty()
+{
+   const tbox::Dimension& dim(getDim());
+
+   d_lo = Index(dim, tbox::MathUtilities<int>::getMax());
+   d_hi = Index(dim, tbox::MathUtilities<int>::getMin());
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector Box::numberCells() const
+{
+   if (empty()) {
+      return IntVector::getZero(getDim());
+   } else {
+      return d_hi - d_lo + 1;
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+int Box::numberCells(
+   const int i) const
+{
+   if (empty()) {
+      return 0;
+   } else {
+      return d_hi(i) - d_lo(i) + 1;
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+int Box::size() const
+{
+   int mysize = 0;
+   if (!empty()) {
+      mysize = 1;
+      for (int i = 0; i < getDim().getValue(); i++)
+         mysize *= (d_hi(i) - d_lo(i) + 1);
+   }
+
+   return mysize;
+}
+
+SAMRAI_INLINE_KEYWORD
+int Box::offset(
+   const Index& p) const
+{
+   int myoffset = 0;
+
+   for (int i = getDim().getValue() - 1; i > 0; i--) {
+      myoffset = (d_hi(i - 1) - d_lo(i - 1) + 1) * (p(i) - d_lo(i) + myoffset);
+   }
+   myoffset += p(0) - d_lo(0);
+
+   return myoffset;
+}
+
+SAMRAI_INLINE_KEYWORD
+Index Box::index(
+   const int offset) const
+{
+   TBOX_ASSERT(offset >= 0);
+   TBOX_ASSERT(offset <= size());
+
+   hier::IntVector n(getDim());
+   hier::IntVector index(getDim());
+
+   n = numberCells();
+
+   int remainder = offset;
+
+   for (int d = getDim().getValue() - 1; d > -1; d--) {
+      /* Compute the stride for indexing */
+      int stride = 1;
+      for (int stride_dim = 0; stride_dim < d; stride_dim++) {
+         stride *= n[stride_dim];
+      }
+
+      /* Compute the local index */
+      index[d] = remainder / stride;
+      remainder -= index[d] * stride;
+
+      /* Compute the global index */
+      index[getDim().getValue()] += lower(d);
+   }
+
+   hier::Index idx(index);
+
+   return idx;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool Box::contains(
+   const Index& p) const
+{
+   for (int i = 0; i < getDim().getValue(); i++) {
+      if ((p(i) < d_lo(i)) || (p(i) > d_hi(i))) return false;
+   }
+   return true;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool Box::contains(
+   const Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   if (box.empty()) return true;
+
+   if (!contains(box.lower())) return false;
+
+   if (!contains(box.upper())) return false;
+
+   return true;
+}
+
+SAMRAI_INLINE_KEYWORD
+Box::operator tbox::DatabaseBox ()
+{
+   return DatabaseBox_from_Box();
+}
+
+SAMRAI_INLINE_KEYWORD
+Box::operator tbox::DatabaseBox () const
+{
+   return DatabaseBox_from_Box();
+}
+
+SAMRAI_INLINE_KEYWORD
+int Box::operator == (
+   const Box& box) const
+{
+   return ((d_lo == box.d_lo) && (d_hi == box.d_hi)) || (empty() && box.empty());
+}
+
+SAMRAI_INLINE_KEYWORD
+int Box::operator != (
+   const Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   return !(*this == box);
+}
+
+SAMRAI_INLINE_KEYWORD
+Box Box::operator * (
+   const Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   Box both(*this);
+   both.d_lo.max(box.d_lo);
+   both.d_hi.min(box.d_hi);
+   return both;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool Box::intersects(
+   const Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   for (int i = 0; i < getDim().getValue(); i++) {
+      if (tbox::MathUtilities<int>::Max(d_lo(i), box.d_lo(i)) >
+          tbox::MathUtilities<int>::Min(d_hi(i), box.d_hi(i))) {
+         return false;
+      }
+   }
+   return true;
+}
+
+SAMRAI_INLINE_KEYWORD
+Box Box::operator + (
+   const Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   Box bbox(*this);
+   bbox += box;
+   return bbox;
+}
+
+SAMRAI_INLINE_KEYWORD
+void Box::grow(
+   const IntVector& ghosts)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, ghosts);
+
+   if (!empty()) {
+      d_lo -= ghosts;
+      d_hi += ghosts;
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void Box::grow(
+   const int direction,
+   const int ghosts)
+{
+   TBOX_ASSERT((direction >= 0) && (direction < getDim().getValue()));
+
+   if (!empty()) {
+      d_lo(direction) -= ghosts;
+      d_hi(direction) += ghosts;
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void Box::growLower(
+   const IntVector& ghosts)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, ghosts);
+
+   if (!empty()) {
+      d_lo -= ghosts;
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void Box::growLower(
+   const int direction,
+   const int ghosts)
+{
+   TBOX_ASSERT((direction >= 0) && (direction < getDim().getValue()));
+
+   if (!empty()) {
+      d_lo(direction) -= ghosts;
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void Box::growUpper(
+   const IntVector& ghosts)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, ghosts);
+
+   if (!empty()) {
+      d_hi += ghosts;
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void Box::growUpper(
+   const int direction,
+   const int ghosts)
+{
+   TBOX_ASSERT((direction >= 0) && (direction < getDim().getValue()));
+
+   if (!empty()) {
+      d_hi(direction) += ghosts;
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void Box::lengthen(
+   const int direction,
+   const int ghosts)
+{
+   TBOX_ASSERT((direction >= 0) && (direction < getDim().getValue()));
+
+   if (!empty()) {
+      if (ghosts > 0) {
+         d_hi(direction) += ghosts;
+      } else {
+         d_lo(direction) += ghosts;
+      }
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void Box::shorten(
+   const int direction,
+   const int ghosts)
+{
+   TBOX_ASSERT((direction >= 0) && (direction < getDim().getValue()));
+
+   if (!empty()) {
+      if (ghosts > 0) {
+         d_hi(direction) -= ghosts;
+      } else {
+         d_lo(direction) -= ghosts;
+      }
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void Box::shift(
+   const IntVector& offset)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, offset);
+
+   d_lo += offset;
+   d_hi += offset;
+}
+
+SAMRAI_INLINE_KEYWORD
+void Box::shift(
+   const int direction,
+   const int offset)
+{
+   TBOX_ASSERT((direction >= 0) && (direction < getDim().getValue()));
+
+   d_lo(direction) += offset;
+   d_hi(direction) += offset;
+}
+
+SAMRAI_INLINE_KEYWORD
+int Box::coarsen(
+   const int index,
+   const int ratio)
+{
+   return index < 0 ? (index + 1) / ratio - 1 : index / ratio;
+}
+
+SAMRAI_INLINE_KEYWORD
+void Box::coarsen(
+   const IntVector& ratio)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, ratio);
+
+   for (int i = 0; i < getDim().getValue(); i++) {
+      d_lo(i) = coarsen(d_lo(i), ratio(i));
+      d_hi(i) = coarsen(d_hi(i), ratio(i));
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void Box::refine(
+   const IntVector& ratio)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, ratio);
+
+   bool negative_ratio = false;
+   for (int d = 0; d < getDim().getValue(); d++) {
+      if (ratio(d) < 0) {
+         negative_ratio = true;
+         break;
+      }
+   }
+
+   if (!negative_ratio) {
+      d_lo *= ratio;
+      d_hi = d_hi * ratio + (ratio - 1);
+   } else {
+      for (int i = 0; i < getDim().getValue(); i++) {
+         if (ratio(i) > 0) {
+            d_lo(i) *= ratio(i);
+            d_hi(i) = d_hi(i) * ratio(i) + (ratio(i) - 1);
+         } else {
+            d_lo(i) = coarsen(d_lo(i), -ratio(i));
+            d_hi(i) = coarsen(d_hi(i), -ratio(i));
+         }
+      }
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+Box Box::grow(
+   const Box& box,
+   const IntVector& ghosts)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(box, ghosts);
+
+   Box tmp = box;
+   tmp.grow(ghosts);
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+Box Box::shift(
+   const Box& box,
+   const IntVector& ghosts)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(box, ghosts);
+
+   return Box(box.lower() + ghosts, box.upper() + ghosts);
+}
+
+SAMRAI_INLINE_KEYWORD
+Box Box::refine(
+   const Box& box,
+   const IntVector& ratio)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(box, ratio);
+
+   Box tmp = box;
+   tmp.refine(ratio);
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+Box Box::coarsen(
+   const Box& box,
+   const IntVector& ratio)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(box, ratio);
+
+   Box tmp = box;
+   tmp.coarsen(ratio);
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+BoxIterator::BoxIterator():
+   d_index(tbox::Dimension::getInvalidDimension())
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+BoxIterator::BoxIterator(
+   const Box& box):
+   d_index(box.lower()),
+   d_box(box)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(box.getDim());
+}
+
+SAMRAI_INLINE_KEYWORD
+BoxIterator::BoxIterator(
+   const BoxIterator& iter):
+   d_index(iter.d_index),
+   d_box(iter.d_box)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+void BoxIterator::initialize(
+   const Box& box)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(box.getDim());
+
+   d_index = box.lower();
+   d_box = box;
+}
+
+SAMRAI_INLINE_KEYWORD
+BoxIterator&
+BoxIterator::operator = (
+   const BoxIterator& iter)
+{
+   d_index = iter.d_index;
+   d_box = iter.d_box;
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+BoxIterator::~BoxIterator()
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+const Index& BoxIterator::operator * () const
+{
+   return d_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+const Index& BoxIterator::operator () () const
+{
+   return d_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+BoxIterator::operator bool () const
+{
+   for (int i = 0; i < d_index.getDim().getValue(); i++) {
+      if (d_index(i) > d_box.upper(i)) return false;
+   }
+   return true;
+}
+
+#ifndef LACKS_BOOL_VOID_RESOLUTION
+SAMRAI_INLINE_KEYWORD
+BoxIterator::operator const void* () const
+{
+   return BoxIterator::operator bool () ? this : NULL;
+}
+#endif
+
+SAMRAI_INLINE_KEYWORD
+bool BoxIterator::operator ! () const
+{
+   return !BoxIterator::operator bool ();
+}
+
+SAMRAI_INLINE_KEYWORD
+void BoxIterator::operator ++ (
+   int)
+{
+   d_index(0)++;
+   for (int i = 0; i < (d_index.getDim().getValue() - 1); i++) {
+      if (d_index(i) > d_box.upper(i)) {
+         d_index(i) = d_box.lower(i);
+         d_index(i + 1)++;
+      } else
+         break;
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+bool BoxIterator::operator == (
+   const BoxIterator& iter) const
+{
+   return d_index == iter.d_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool BoxIterator::operator != (
+   const BoxIterator& iter) const
+{
+   return d_index != iter.d_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+const Box& Box::getEmptyBox(
+   const tbox::Dimension& dim) {
+   TBOX_DIM_ASSERT_CHECK_DIM(dim);
+   return *(s_emptys[dim.getValue() - 1]);
+}
+
+SAMRAI_INLINE_KEYWORD
+const Box& Box::getUniverse(
+   const tbox::Dimension& dim) {
+   TBOX_DIM_ASSERT_CHECK_DIM(dim);
+   return *(s_universes[dim.getValue() - 1]);
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/Box.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/Box.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,727 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Box representing a portion of the AMR index space 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_Box
+#define included_hier_Box
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/DatabaseBox.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace hier {
+
+class BoxIterator;
+
+/**
+ * Class Box represents a n-dimensional box in the AMR index
+ * space.  It is defined by lower and upper bounds given by index objects.
+ * The box semantics assumes that the box is cell-centered.  A cell-centered
+ * convention implies that the index set covered by the box includes both
+ * the lower and upper bounds.
+ *
+ * @see hier::BoxIterator
+ * @see hier::Index
+ */
+
+class Box
+{
+public:
+   /**
+    * Creates an ``empty'' box.
+    */
+   explicit Box(
+      const tbox::Dimension& dim);
+
+   /**
+    * Create a box describing the index space between lower and upper.  The
+    * box is assumed to be cell centered and include all elements between lower
+    * and upper, including the end points.
+    */
+   explicit Box(
+      const Index& lower,
+      const Index& upper);
+
+   /**
+    * The copy constructor copies the index space of the argument box.
+    */
+   Box(
+      const Box& box);
+
+   /**
+    * Construct a Box from a DatabaseBox.
+    */
+   explicit Box(
+      const tbox::DatabaseBox& box);
+
+   /**
+    * The destructor for Box.
+    */
+   ~Box();
+
+   /**
+    * The assignment operator copies the index space of the argument box.
+    *
+    * An assignment to an uninitialized box is allowed but assigning
+    * from an uninitialized box will result in an assert.
+    */
+   Box&
+   operator = (
+      const Box& box);
+
+   /**
+    * Return a non-const lower index of the box.
+    */
+   Index&
+   lower();
+
+   /**
+    * Return a non-const upper index of the box.
+    */
+   Index&
+   upper();
+
+   /**
+    * Return a const lower index of the box.
+    */
+   const Index&
+   lower() const;
+
+   /**
+    * Return a const upper index of the box.
+    */
+   const Index&
+   upper() const;
+
+   /**
+    * Return the i'th component (non-const) of the lower index of the box.
+    */
+   int&
+   lower(
+      const int i);
+
+   /**
+    * Return the i'th component (non-const) of the upper index of the box.
+    */
+   int&
+   upper(
+      const int i);
+
+   /**
+    * Return the i'th component (const) of the lower index of the box.
+    */
+   const int&
+   lower(
+      const int i) const;
+
+   /**
+    * Return the i'th component (const) of the upper index of the box.
+    */
+   const int&
+   upper(
+      const int i) const;
+
+   /**
+    * Set the index space represented by the box to empty.
+    */
+   void
+   setEmpty();
+
+   /**
+    * @brief Return whether the box is ``empty''.
+    *
+    * isEmpty() is preferred to match "is" standard syntax for
+    * boolean methods.
+    *
+    * @see isEmpty()
+    */
+   bool
+   empty() const;
+
+   /**
+    * @brief Return whether the box is ``empty''.
+    *
+    * A box is empty if any of the lower bounds is greater than the
+    * corresponding upper bound.  An empty box has a size of zero.
+    */
+   bool
+   isEmpty() const;
+
+   /**
+    * Return the number of cells (an integer) represented by the box in
+    * the given coordinate direction.
+    */
+   int
+   numberCells(
+      const int i) const;
+
+   /**
+    * Return the number of cells (a vector of integers) represented by
+    * the box in every coordinate direction.
+    */
+   IntVector
+   numberCells() const;
+
+   /**
+    * Calculate the number of indices represented by the box.  If the box
+    * is empty, then the number of index points within the box is zero.
+    */
+   int
+   size() const;
+
+   /**
+    *  Return the dimension of the box that is longest.
+    */
+   int
+   longestDimension() const;
+
+   /**
+    * Given an index, calculate the offset of the index into the box.
+    * This function assumes column-major (e.g., Fortran) ordering of
+    * the indices within the box.  This operation is a convenience
+    * function for later array indexing operations.
+    */
+   int
+   offset(
+      const Index& p) const;
+
+   /**
+    * Given an offset, calculate the index of the offset into the box.
+    * This function assumes column-major (e.g., Fortran) ordering of
+    * the indices within the box.  This operation is a convenience
+    * function for later array indexing operations.
+    */
+   Index
+   index(
+      const int offset) const;
+
+   /**
+    * Check whether an index lies within the bounds of the box.
+    */
+   bool
+   contains(
+      const Index& p) const;
+
+   /**
+    * Check whether a given box lies within the bounds of the box.
+    *
+    * If @c b is empty, always return true.
+    */
+   bool
+   contains(
+      const Box& b) const;
+
+   /**
+    * Check whether two boxes represent the same portion of index space.
+    */
+   int
+   operator == (
+      const Box& box) const;
+
+   /**
+    * Check whether two boxes cover different portions of index space.
+    */
+   int
+   operator != (
+      const Box& box) const;
+
+   /**
+    * Calculate the intersection of the index spaces of two boxes.  The
+    * intersection with an empty box always yields an empty box.
+    */
+   Box
+   operator * (
+      const Box& box) const;
+
+   /**
+    * Return true if two boxes have a non-empty intersection.
+    * Otherwise, return false.
+    */
+   bool
+   intersects(
+      const Box& box) const;
+
+   /**
+    * Calculate the bounding box of two boxes.  Note that this is not
+    * the union of the two boxes (since union is not closed over boxes),
+    * but rather the smallest box that contains both boxes.
+    */
+   Box
+   operator + (
+      const Box& box) const;
+
+   /**
+    * Increase the bounding box to include the argument box.
+    */
+   Box&
+   operator += (
+      const Box& box);
+
+   /**
+    * Return true if this box can be coalesced with the argument box,
+    * and set this box to the union of the boxes.  Otherwise, return false
+    * and leave boxes as is.  Two boxes may be coalesced if their
+    * union is a box (recall that index set union is not closed over boxes).
+    * If either box is empty, then the return value is true and this box
+    * becomes the union of the two.
+    */
+   bool
+   coalesceWith(
+      const Box& box);
+
+   /**
+    * Grow a box by the specified ghost cell width.  The lower bound is
+    * decremented by the width, and the upper bound is incremented by the
+    * width.  All dimensions are grown by the corresponding component in
+    * the IntVector; ghost cell widths may be different in each dimension.
+    * Negative ghost cell widths will shrink the box.
+    */
+   void
+   grow(
+      const IntVector& ghosts);
+
+   /**
+    * Grow a box by the specified ghost cell width in the given coordinate
+    * direction in index space.  The lower bound is decremented by the
+    * width, and the upper bound is incremented by the width.  Note that
+    * negative ghost cell widths will shrink the box.
+    */
+   void
+   grow(
+      const int direction,
+      const int ghosts);
+
+   /**
+    * Similar to grow() functions. However, box is only grown in lower
+    * directions (i.e., only lower index is changed).
+    */
+   void
+   growLower(
+      const IntVector& ghosts);
+
+   /**
+    * Similar to grow() functions. However, box is only grown in lower
+    * bound of given direction in index space.
+    */
+   void
+   growLower(
+      const int direction,
+      const int ghosts);
+
+   /**
+    * Similar to grow() function. However, box is only grown in upper
+    * directions (i.e., only upper index is changed).
+    */
+   void
+   growUpper(
+      const IntVector& ghosts);
+
+   /**
+    * Similar to grow() functions. However, box is only grown in upper
+    * bound of given direction in index space.
+    */
+   void
+   growUpper(
+      const int direction,
+      const int ghosts);
+
+   /**
+    * Similar to growUpper() and growLower() functions. However, box is
+    * lengthened (never shortened).  The sign of @c ghosts refer to whether
+    * the box is lengthened in the upper or lower side.
+    */
+   void
+   lengthen(
+      const int direction,
+      const int ghosts);
+
+   /**
+    * Similar to growUpper() and growLower() functions. However, box is
+    * shortened (never lengthened).  The sign of @c ghosts refer to whether
+    * the box is shortened in the upper or lower side.
+    */
+   void
+   shorten(
+      const int direction,
+      const int ghosts);
+
+   /**
+    * Shift a box by the specified amount (a vector of integers).
+    * The new box is located at (lower+offset, upper+offset).
+    */
+   void
+   shift(
+      const IntVector& offset);
+
+   /**
+    * Similar to shift() function above, but shift occurs only in specified
+    * direction in index space.  The new box is located at (lower+offset,
+    * upper+offset) in that direction.
+    */
+   void
+   shift(
+      const int direction,
+      const int offset);
+
+   /**
+    * Rotate 90 degrees around origin.
+    */
+   void
+   rotate(
+      const int rotation_number);
+
+   /**
+    * Refine the index space of a box by specified vector ratio.  Each
+    * component of the box is multiplied by the refinement ratio,
+    * then @c (ratio-1) is added to the upper corner.
+    */
+   void
+   refine(
+      const IntVector& ratio);
+
+   /**
+    * Coarsen the index space of a box by specified vector ratio.  Each
+    * component is divided by the specified coarsening ratio and rounded
+    * (if necessary) such that the coarsened box contains the cells that
+    * are the parents of the refined box.  In other words, refining a
+    * coarsened box will always yield a box that is equal to or larger
+    * than the original box.
+    */
+   void
+   coarsen(
+      const IntVector& ratio);
+
+   /**
+    * This assignment operator constructs a Box given a DatabaseBox.
+    */
+   Box&
+   operator = (
+      const tbox::DatabaseBox& box);
+
+   /**
+    * Sets a Box from a tbox::DatabaseBox and returns a reference to
+    * the Box.
+    */
+   Box&
+   Box_from_DatabaseBox(
+      const tbox::DatabaseBox& box);
+
+   /**
+    * Sets a Box from a DatabaseBox.
+    */
+   void
+   set_Box_from_DatabaseBox(
+      const tbox::DatabaseBox& box);
+
+   /**
+    * Returns a tbox::DatabaseBox generated from a Box.
+    */
+   tbox::DatabaseBox
+   DatabaseBox_from_Box() const;
+
+   /**
+    * Type conversion from Box to Box
+    */
+   operator tbox::DatabaseBox ();
+
+   /**
+    * Type conversion from Box to Box
+    */
+   operator tbox::DatabaseBox () const;
+
+   /**
+    * Utility function to grow a box by the specified vector ghost cell
+    * width.  A new box is returned and the argument is not changed.
+    */
+   static Box
+   grow(
+      const Box& box,
+      const IntVector& ghosts);
+
+   /**
+    * Utility function to shift a box by the specified offset.  A new
+    * box is returned and the argument is not changed.
+    */
+   static Box
+   shift(
+      const Box& box,
+      const IntVector& offset);
+
+   /**
+    * Utility function to refine the index space of a box by the specified
+    * refinement ratio.  A new box is returned and the argument is not changed.
+    */
+   static Box
+   refine(
+      const Box& box,
+      const IntVector& ratio);
+
+   /**
+    * Utility function to coarsen the index space of a box by the specified
+    * coarsening ratio.  A new box is returned and the argument is not changed.
+    */
+   static Box
+   coarsen(
+      const Box& box,
+      const IntVector& ratio);
+
+   /**
+    * Return the dimension of this object.
+    */
+   const tbox::Dimension&
+   getDim() const;
+
+   /**
+    * Read the box description in the form [L,U], where L and U are the
+    * lower and upper bounds of the box.
+    */
+   friend std::istream&
+   operator >> (
+      std::istream& s,
+      Box& box);
+
+   /**
+    * Output the box description in the form [L,U], where L and U are the
+    * lower and upper bounds of the box.
+    */
+   friend std::ostream&
+   operator << (
+      std::ostream& s,
+      const Box& box);
+
+   /*!
+    * @brief Return an empty Box of the specified dimension.
+    *
+    * Can be used to avoid object creation overheads.
+    */
+   static const Box&
+   getEmptyBox(
+      const tbox::Dimension& dim);
+
+   /**
+    * Returns a Box that represents the maximum allowed index extents
+    * for a given dimension.   The "universe" that can be represented.
+    */
+   static const Box&
+   getUniverse(
+      const tbox::Dimension& dim);
+
+   /**
+    * A box iterator iterates over the elements of a box.  This class is
+    * defined elsewhere, and the typedef is used to point to that class.
+    */
+   typedef BoxIterator Iterator;
+
+   template<class>
+   friend class ::SAMRAI::pdat::ArrayData;
+   friend class BoxIterator;
+   friend class std::vector<Box>;
+
+private:
+   /**
+    * The default constructor creates an uninitialized box.
+    *
+    * This should never be invoked, it will cause assertions
+    */
+   Box();
+
+   static int
+   coarsen(
+      const int index,
+      const int ratio);
+
+   static bool
+   coalesceIntervals(
+      const int* lo1,
+      const int* hi1,
+      const int* lo2,
+      const int* hi2,
+      const int dim);
+
+   void
+   rotateAboutAxis(
+      const int axis,
+      const int num_rotations);
+
+   Index d_lo;
+   Index d_hi;
+
+   /*!
+    * @brief Initialize static objects and register shutdown routine.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   initializeCallback();
+
+   /*!
+    * @brief Method registered with ShutdownRegister to cleanup statics.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   finalizeCallback();
+
+   /*
+    * Array of empty boxes for each dimension.  Preallocated
+    * as a performance enhancement to avoid constructing
+    * them in multiple places.
+    */
+
+   static Box* s_emptys[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   /*
+    * Box that represents the maximum allowed index extents,
+    * the "universe" that can be represented.
+    */
+   static Box* s_universes[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   static tbox::StartupShutdownManager::Handler
+   s_initialize_finalize_handler;
+};
+
+/**
+ * Class BoxIterator is an iterator that provides methods for
+ * stepping through the index space associated with a box.  The indices
+ * are enumerated in column-major (e.g., Fortran) order.  The iterator
+ * should be used as follows:
+ * \verbatim
+ * Box box;
+ * ...
+ * for (Box::Iterator b(box); b; b++) {
+ *    // use index b of the box
+ * }
+ * \endverbatim
+ * Note that the box iterator may not compile to efficient code, depending
+ * on your compiler.  Many compilers are not smart enough to optimize the
+ * looping constructs and indexing operations.
+ *
+ * @see hier::Index
+ * @see hier::Box
+ */
+
+class BoxIterator
+{
+public:
+   /**
+    * Default constructor for the box iterator.  The iterator must
+    * be initialized before it can be used to iterate over a box.
+    *
+    * @see initialize().
+    */
+   BoxIterator();
+
+   /**
+    * Constructor for the box iterator.  The iterator will enumerate the
+    * indices in the argument box.
+    */
+   BoxIterator(
+      const Box& box);
+
+   /**
+    * Copy constructor for the box iterator.
+    */
+   BoxIterator(
+      const BoxIterator& iterator);
+
+   /**
+    * Assignment operator for the box iterator.
+    */
+   BoxIterator&
+   operator = (
+      const BoxIterator& iterator);
+
+   /**
+    * Destructor for the box iterator.
+    */
+   ~BoxIterator();
+
+   /**
+    * @brief Initializer for the box iterator.
+    *
+    * The iterator will enumerate the indices in the box.
+    */
+   void
+   initialize(
+      const Box& box);
+
+   /**
+    * Return the current index in the box.  This operation is undefined
+    * if the iterator is past the last Index in the box.
+    */
+   const Index&
+   operator * () const;
+
+   /**
+    * Return the current index in the box.  This operation is undefined
+    * if the iterator is past the last Index in the box.
+    */
+   const Index&
+   operator () () const;
+
+   /**
+    * Return true if the iterator points to a valid index in the box.
+    */
+   operator bool () const;
+
+#ifndef LACKS_BOOL_VOID_RESOLUTION
+   /**
+    * Return a non-NULL if the iterator points to a valid index in the box.
+    */
+   operator const void
+   * () const;
+#endif
+
+   /**
+    * Return whether the iterator points to a valid item in the box.  This
+    * operator mimics the !p operation applied to a pointer p.
+    */
+   bool
+   operator ! () const;
+
+   /**
+    * Increment the iterator to point to the next index in the box.
+    */
+   void
+   operator ++ (
+      int);
+
+   /**
+    * Test two iterators for equality (same index value).
+    */
+   bool
+   operator == (
+      const BoxIterator& iterator) const;
+
+   /**
+    * Test two iterators for inequality (different index values).
+    */
+   bool
+   operator != (
+      const BoxIterator& iterator) const;
+
+private:
+   Index d_index;
+   Box d_box;
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/Box.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoxArray.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoxArray.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,250 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An array of boxes that complements BoxList 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BoxArray_C
+#define included_hier_BoxArray_C
+
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/BoxArray.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+BoxArray::BoxArray(
+   const tbox::Dimension& dim,
+   const int n):
+   d_dim(dim),
+   d_boxes(n, hier::Box::getEmptyBox(dim))
+{
+}
+
+BoxArray::BoxArray(
+   const tbox::Dimension& dim,
+   const tbox::Array<Box>& array):
+   d_dim(dim),
+   d_boxes(array.getSize(), hier::Box::getEmptyBox(d_dim))
+{
+   for (int i = 0; i < d_dim.getValue(); i++) {
+      TBOX_DIM_ASSERT(d_dim == d_boxes[i].getDim());
+      d_boxes[i] = array[i];
+   }
+}
+
+BoxArray::BoxArray(
+   const BoxArray& array):
+   d_dim(array.getDim()),
+   d_boxes(array.getNumberOfBoxes(), hier::Box::getEmptyBox(array.getDim()))
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, array);
+
+   const int n = array.getNumberOfBoxes();
+   for (int i = 0; i < n; i++) {
+      d_boxes[i] = array.d_boxes[i];
+   }
+}
+
+BoxArray::BoxArray(
+   const tbox::Dimension& dim,
+   const BoxList& list):
+   d_dim(dim),
+   d_boxes(list.getNumberOfItems(), hier::Box::getEmptyBox(dim))
+{
+   int index = 0;
+   for (tbox::List<Box>::Iterator box(list); box; box++) {
+      TBOX_DIM_ASSERT(d_dim == box().getDim());
+      d_boxes[index++] = box();
+   }
+}
+
+BoxArray::BoxArray(
+   const Box& box):
+   d_dim(box.getDim()),
+   d_boxes(1, box)
+{
+}
+
+BoxArray::BoxArray(
+   const tbox::Dimension& dim,
+   const tbox::Array<tbox::DatabaseBox>& array):
+   d_dim(dim),
+   d_boxes(dim.getValue(), hier::Box::getEmptyBox(dim))
+{
+   set_BoxArray_from_Array(array);
+}
+
+BoxArray::operator tbox::Array<tbox::DatabaseBox>() const
+{
+   int number_boxes = getNumberOfBoxes ();
+   tbox::Array<tbox::DatabaseBox> new_Array(number_boxes);
+
+   for (int j = 0; j < number_boxes; j++) {
+      new_Array[j] = (tbox::DatabaseBox)(d_boxes[j]);
+   }
+
+   return new_Array;
+}
+
+void BoxArray::set_BoxArray_from_Array(
+   const tbox::Array<tbox::DatabaseBox>& array)
+{
+   const int n = array.getSize();
+
+   d_boxes.resizeArray(n, hier::Box::getEmptyBox(d_dim));
+
+   for (int j = 0; j < n; j++) {
+      TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, array[j]);
+      d_boxes[j] = array[j];
+   }
+}
+
+BoxArray& BoxArray::operator = (
+   const BoxArray& array)
+{
+   if (this != &array) {
+      const int n = array.getNumberOfBoxes();
+      d_boxes = tbox::Array<Box>(n, hier::Box::getEmptyBox(d_dim));
+      for (int i = 0; i < n; i++) {
+         TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, array.d_boxes[i]);
+         d_boxes[i] = array.d_boxes[i];
+      }
+   }
+   return *this;
+}
+
+BoxArray& BoxArray::operator = (
+   const BoxList& list)
+{
+   const int n = list.getNumberOfItems();
+
+   d_boxes = tbox::Array<Box>(n, Box(d_dim));
+   int index = 0;
+   for (tbox::List<Box>::Iterator box(list); box; box++) {
+      TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, box());
+      d_boxes[index++] = box();
+   }
+   return *this;
+}
+
+bool BoxArray::contains(
+   const Index& p) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, p);
+
+   const int n = getNumberOfBoxes();
+   for (int i = 0; i < n; i++) {
+      if (d_boxes[i].contains(p)) return true;
+   }
+   return false;
+}
+
+void BoxArray::grow(
+   const IntVector& ghosts)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, ghosts);
+
+   const int n = getNumberOfBoxes();
+   for (int i = 0; i < n; i++) {
+      d_boxes[i].grow(ghosts);
+   }
+}
+
+void BoxArray::shift(
+   const IntVector& offset)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, offset);
+
+   const int n = getNumberOfBoxes();
+   for (int i = 0; i < n; i++) {
+      d_boxes[i].shift(offset);
+   }
+}
+
+void BoxArray::rotate(
+   int rotation_number)
+{
+   if (d_dim.getValue() == 2 || d_dim.getValue() == 3) {
+      const int n = getNumberOfBoxes();
+      for (int b = 0; b < n; b++) {
+         d_boxes[b].rotate(rotation_number);
+      }
+   } else {
+      NULL_USE(rotation_number);
+
+      TBOX_ERROR("BoxArray::rotate() error ..."
+         << "\n   Rotation only implemented for 2D and 3D " << std::endl);
+   }
+}
+
+void BoxArray::refine(
+   const IntVector& ratio)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, ratio);
+
+   const int n = getNumberOfBoxes();
+   for (int i = 0; i < n; i++) {
+      d_boxes[i].refine(ratio);
+   }
+}
+
+void BoxArray::coarsen(
+   const IntVector& ratio)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, ratio);
+
+   const int n = getNumberOfBoxes();
+   for (int i = 0; i < n; i++) {
+      d_boxes[i].coarsen(ratio);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return the bounding box for all boxes in the box array.               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+Box BoxArray::getBoundingBox() const
+{
+   Box bbox(d_dim);
+   const int n = getNumberOfBoxes();
+   for (int i = 0; i < n; i++) {
+      bbox += d_boxes[i];
+   }
+   return bbox;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print boxes in array.                                                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BoxArray::print(
+   std::ostream& os) const
+{
+   for (int i = 0; i < getNumberOfBoxes(); i++) {
+      os << "Box # " << i << ":  " << d_boxes[i] << std::endl;
+   }
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoxArray.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoxArray.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An array of boxes that complements BoxList 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+BoxArray::~BoxArray()
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+int BoxArray::getNumberOfBoxes() const
+{
+   return d_boxes.getSize();
+}
+
+SAMRAI_INLINE_KEYWORD
+int BoxArray::size() const
+{
+   return d_boxes.getSize();
+}
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Dimension& BoxArray::getDim() const
+{
+   return d_dim;
+}
+
+SAMRAI_INLINE_KEYWORD
+BoxArray& BoxArray::operator = (
+   const tbox::Array<tbox::DatabaseBox>& array)
+{
+   set_BoxArray_from_Array(array);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+BoxArray& BoxArray::BoxArray_from_Array(
+   tbox::Array<tbox::DatabaseBox> array)
+{
+   set_BoxArray_from_Array(array);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+Box& BoxArray::operator [] (
+   const int i)
+{
+   TBOX_ASSERT((i >= 0) && (i < d_boxes.getSize()));
+   return d_boxes[i];
+}
+
+SAMRAI_INLINE_KEYWORD
+const Box& BoxArray::operator [] (
+   const int i) const
+{
+   TBOX_ASSERT((i >= 0) && (i < d_boxes.getSize()));
+   return d_boxes[i];
+}
+
+SAMRAI_INLINE_KEYWORD
+void BoxArray::resizeBoxArray(
+   const int n)
+{
+   d_boxes.resizeArray(n, hier::Box::getEmptyBox(d_dim));
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoxArray.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoxArray.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,251 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An array of boxes that complements BoxList 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BoxArray
+#define included_hier_BoxArray
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/tbox/DatabaseBox.h"
+#include "SAMRAI/tbox/PIO.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace hier {
+
+class BoxList;
+
+/**
+ * Class BoxArray is a container represents an array of boxes.
+ * Once the array is created, it can be resized.  However, it is usually
+ * better to use the BoxList class to represent collections of boxes
+ * that change in number.
+ *
+ * @see hier::Box
+ * @see hier::BoxList
+ */
+
+class BoxArray
+{
+public:
+   /**
+    * Create an array of boxes with space for n boxes.  All boxes are
+    * initialized to empty.
+    */
+   explicit BoxArray(
+      const tbox::Dimension& dim,
+      const int n = 0);
+
+   /**
+    * Create a box array and copy box data from the array argument.
+    */
+   explicit BoxArray(
+      const tbox::Dimension& dim,
+      const tbox::Array<Box>& array);
+
+   /**
+    * The const constructor creates an array of boxes and copies
+    * box data from the argument box array.
+    */
+   BoxArray(
+      const BoxArray& array);
+
+   /**
+    * Create a box array and copy box data from the list.
+    */
+   explicit BoxArray(
+      const tbox::Dimension& dim,
+      const BoxList& list);
+
+   /**
+    * Create a box array with a single box.
+    */
+   explicit BoxArray(
+      const Box& box);
+
+   /**
+    * Create a regular box array from an array of tbox::DatabaseBox objects.
+    */
+   explicit BoxArray(
+      const tbox::Dimension& dim,
+      const tbox::Array<tbox::DatabaseBox>& array);
+
+   /**
+    * Type conversion from BoxArray to tbox::Array<tbox::DatabaseBox>.
+    */
+   operator tbox::Array<tbox::DatabaseBox>() const;
+
+   /**
+    * Create a box array using boxes in tbox::Array<tbox::DatabaseBox> for the data.
+    */
+   BoxArray&
+   operator = (
+      const tbox::Array<tbox::DatabaseBox>& array);
+
+   /**
+    * Create a box array and copy data from the array argument.
+    */
+   BoxArray&
+   operator = (
+      const BoxArray& array);
+
+   /**
+    * Create a box array and copy data from the list argument.
+    */
+   BoxArray&
+   operator = (
+      const BoxList& list);
+
+   /**
+    * The BoxArray destructor releases the box array data.
+    */
+   ~BoxArray();
+
+   /**
+    * Return the number of boxes in the array.
+    */
+   int
+   getNumberOfBoxes() const;
+
+   /**
+    * Return the number of boxes in the array.  Identical to getNumberOfBoxes(),
+    * but this method is common to several container classes.
+    */
+   int
+   size() const;
+
+   /**
+    * Non-const array subscripting.  Return a reference the box at array
+    * index ``i'' (between 0 and N-1, where N is the number of elements in
+    * the array.
+    *
+    * When assertion checking is active non-recoverable assertion
+    * results when array bounds are violated.
+    */
+   Box&
+   operator [] (
+      const int i);
+
+   /**
+    * Const array subscripting.  Return a const reference to the box
+    * at array index ``i'' (between 0 and N-1, where N is the number of
+    * elements in the array.
+    *
+    * When assertion checking is active non-recoverable assertion
+    * results when array bounds are violated.
+    */
+   const Box&
+   operator [] (
+      const int i) const;
+
+   /**
+    * Create a BoxArray from a tbox::Array<tbox::DatabaseBox>.
+    */
+   BoxArray&
+   BoxArray_from_Array(
+      tbox::Array<tbox::DatabaseBox> array);
+
+   /**
+    * Sets a BoxArray from a tbox::Array<tbox::DatabaseBox>.
+    */
+   void
+   set_BoxArray_from_Array(
+      const tbox::Array<tbox::DatabaseBox>& array);
+
+   /**
+    * Check whether an index lies within the bounds of the collection
+    * of boxes.
+    */
+   bool
+   contains(
+      const Index& p) const;
+
+   /**
+    * Grow all boxes in the box array by the specified ghost cell width.
+    */
+   void
+   grow(
+      const IntVector& ghosts);
+
+   /**
+    * Shift all boxes in the box array by the specified offset.
+    */
+   void
+   shift(
+      const IntVector& offset);
+
+   /**
+    * rotate the box array clockwise 90 degrees times the rotation number.
+    * Currently works only in 2D.
+    */
+   void
+   rotate(
+      int rotation_number);
+
+   /**
+    * Refine the index space of each box in the box array by the
+    * specified vector refinement ratio.
+    */
+   void
+   refine(
+      const IntVector& ratio);
+
+   /**
+    * Coarsen the index space of each box in the box array by the
+    * specified vector coarsening ratio.
+    */
+   void
+   coarsen(
+      const IntVector& ratio);
+
+   /**
+    * Resize the array to contain the specified number of boxes.
+    * The resizing operation copies the old box values into the
+    * new boxes where the indices in the array overlap.
+    */
+   void
+   resizeBoxArray(
+      const int n);
+
+   /**
+    * Return the bounding box for all boxes in the box array.
+    */
+   Box
+   getBoundingBox() const;
+
+   /**
+    * Print all boxes in this array to specified output stream.
+    */
+   void
+   print(
+      std::ostream& os = tbox::plog) const;
+
+   /**
+    * Return the dimension of this object.
+    */
+   const tbox::Dimension&
+   getDim() const;
+
+private:
+   tbox::Dimension d_dim;
+
+   tbox::Array<Box> d_boxes;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/BoxArray.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoxGeometry.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoxGeometry.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,29 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Box geometry description for overlap computations 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BoxGeometry_C
+#define included_hier_BoxGeometry_C
+
+#include "SAMRAI/hier/BoxGeometry.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/BoxGeometry.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+BoxGeometry::~BoxGeometry()
+{
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoxGeometry.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoxGeometry.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,37 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Box geometry description for overlap computations 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+BoxGeometry::BoxGeometry()
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<BoxOverlap>
+BoxGeometry::calculateOverlap(
+   const BoxGeometry& src_geometry,
+   const Box& src_mask,
+   const bool overwrite_interior,
+   const IntVector& src_offset,
+   const BoxList& dst_restrict_boxes) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(src_mask, src_offset);
+   return this->calculateOverlap(
+      *this, src_geometry, src_mask, overwrite_interior, src_offset, true,
+      dst_restrict_boxes);
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoxGeometry.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoxGeometry.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,164 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Box geometry description for overlap computations 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BoxGeometry
+#define included_hier_BoxGeometry
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/**
+ * Class BoxGeometry encapsulates the geometry information associated
+ * with data defined over a box region, such as its ghost cell width and the
+ * centering or geometry of the data index space.  The intersection (or overlap)
+ * of two box geometries is generated via member function calculateOverlap().  The
+ * form of this overlap depends on the particular geometry represented by the
+ * subclass.
+ *
+ * Box geometry objects are created by the patch data factories since patch
+ * data objects may not be available for patches that are distributed across
+ * processor memories (patch data factories are always replicated).
+ *
+ * The concept of ``overlap'' or data dependency is more complex for generic
+ * box geometry objects than for just cell-centered box indices in the abstract
+ * AMR index space.  Problems arise in cases where data lies on the outside
+ * corners, faces, or edges of a box.  For these data types, it is likely
+ * that there will exist duplicate data values on different patches.
+ *
+ * The solution implemented here introduces the concept of ``priority''
+ * between patches.  Data of patches with higher priority can overwrite
+ * the interiors (face, node, or edge values associated with cells that
+ * constitute the interior of the patch) of patches with lower priorities,
+ * but lower priority patches can never overwrite the interiors of higher
+ * priority patches.  This scheme introduces a total ordering of data and
+ * therefore eliminates the duplicate information problem.
+ *
+ * In practice, this protocol means two things: (1) the communication
+ * routines must always process copies from low priority sources to high
+ * priority sources, and (2) patches must be given special permission to
+ * overwrite their interior values during a write.  All destinations are
+ * therefore represented by three quantities: (1) the box geometry of the
+ * destination (which encodes the box, ghost cells, and geometry), (2) the
+ * box geometry of the source, and (3) a flag indicating whether the source
+ * has a higher priority than the destination (that is, whether the source
+ * can overwrite the interior of the destination).  If the overwrite flag is
+ * set, then data will be copied over the specified box domain and may write
+ * into the interior of the destination.  If the overwrite flag is not set,
+ * then data will be copied only into the ghost cell values and not the
+ * interior values of the patch.
+ *
+ * @see hier::BoxOverlap
+ * @see hier::PatchDataFactory
+ * @see hier::PatchData
+ */
+
+class BoxGeometry:public tbox::DescribedClass
+{
+public:
+   /**
+    * The default constructor for BoxGeometry does nothing interesting.
+    */
+   BoxGeometry();
+
+   /**
+    * The virtual destructor does nothing interesting.
+    */
+   virtual ~BoxGeometry();
+
+   /**
+    * Calculate the overlap between two box geometry objects given the
+    * source and destination (given by this) geometries, a source mask,
+    * the priority overwrite flag, and an offset between source and
+    * destination index spaces.  The box overlap description returned by
+    * this function will be used in later copy and pack/unpack calls on
+    * the patch data object.  The offset is from the source space
+    * into the destination index space.  That is, if p is in the source
+    * index space, then p + sourceOffset is the corresponding point in the
+    * destination index space.  The overwrite flag is used to represent
+    * priority between patches.  If it is set, then the copy is allowed
+    * to modify the interior of the destination region.  Note that the
+    * source and destination box geometries encode the geometry of the box
+    * that they represent; thus, it is possible to calculate intersections
+    * between different geometries.  This will be necessary when copying
+    * data from flux sum counters into a face centered array in the AMR
+    * flux synchronization algorithm.  The optional argument
+    * dst_restrict_boxes can be used to add a further restriction on the
+    * calculated overlap, so that none of the calculated overlap will lie
+    * outside of the space covered by dst_restrict_boxes. If dst_restrict_boxes
+    * is an empty BoxList, then it will have no effect on the overlap
+    * calculation.
+    */
+   tbox::Pointer<BoxOverlap>
+   calculateOverlap(
+      const BoxGeometry& src_geometry,
+      const Box& src_mask,
+      const bool overwrite_interior,
+      const IntVector& src_offset,
+      const BoxList& dst_restrict_boxes = BoxList()) const;
+
+   /**
+    * Calculate the overlap between two box geometry objects given the
+    * source and destination geometries.  This form calculateOverlap() is
+    * redefined by the subclasses of BoxGeometry for the appropriate
+    * intersection algorithms.  If calculateOverlap() cannot compute the
+    * intersection between the two given geometries and retry is true, then
+    * calculateOverlap() is called on the destination geometry object with
+    * retry set to false (to avoid infinite recursion).  This protocol
+    * makes it possible to add new box geometry types and still calculate
+    * intersections with existing box geometry types.  The optional argument
+    * dst_restrict_boxes can be used to add a further restriction on the
+    * calculated overlap, so that none of the calculated overlap will lie
+    * outside of the space covered by dst_restrict_boxes. If dst_restrict_boxes
+    * is an empty BoxList, then it will have no effect on the overlap
+    * calculation.
+    */
+   virtual tbox::Pointer<BoxOverlap>
+   calculateOverlap(
+      const BoxGeometry& dst_geometry,
+      const BoxGeometry& src_geometry,
+      const Box& src_mask,
+      const bool overwrite_interior,
+      const IntVector& src_offset,
+      const bool retry,
+      const BoxList& dst_restrict_boxes = BoxList()) const = 0;
+
+   /**
+    * Set up a BoxOverlap object that consists simply of the given boxes
+    * and the offset.
+    */
+   virtual tbox::Pointer<BoxOverlap>
+   setUpOverlap(
+      const hier::BoxList& boxes,
+      const IntVector& src_offset) const = 0;
+
+private:
+   BoxGeometry(
+      const BoxGeometry&);              // not implemented
+   void
+   operator = (
+      const BoxGeometry&);              // not implemented
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/BoxGeometry.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoxGraphUtilities.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoxGraphUtilities.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,186 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility class for operations that reduce complexity of box calculus 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BoxGraphUtilities_C
+#define included_hier_BoxGraphUtilities_C
+
+#include "SAMRAI/hier/BoxGraphUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+ * ************************************************************************
+ *
+ * Returns an array of boxes that includes entries for each
+ * box that touches a periodic boundary.
+ *
+ * ************************************************************************
+ */
+void BoxGraphUtilities::makeBoxesPlusPeriodicBoxes(
+   BoxArray& out_boxes,
+   const BoxArray& in_boxes,
+   const tbox::Array<tbox::List<IntVector> >& shifts)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(out_boxes, in_boxes);
+
+   /*
+    * Compute the number of boxes that will be in the list;
+    * this is the number of original boxes, plus all the shifts.
+    */
+   int p_num = in_boxes.getNumberOfBoxes();
+   int b_num = countPeriodicBoxes(shifts);
+   int ct = p_num + b_num;
+
+   int test = shifts.getSize();
+   if (!(test == 0 || test == p_num)) {
+      TBOX_ERROR("BoxGraphUtilities::makeBoxesPlusPeriodicBoxes() error"
+         << "The shift array must either have zero length, or be the "
+         << "same length as in_boxes" << std::endl);
+   }
+
+   /*
+    *  Resize the array to hold the expanded box list.
+    */
+   out_boxes.resizeBoxArray(ct);
+
+   /*
+    * Finally, fill in the arrays.
+    */
+   int idx = 0;
+   for (int i = 0; i < p_num; i++) {
+      /*
+       * append the unshifted box
+       */
+      out_boxes[idx] = in_boxes[i];
+      ++idx;
+
+      /*
+       * append any associated shifted boxes
+       */
+      if (b_num) {
+         for (tbox::List<IntVector>::Iterator
+              sh(shifts[i]); sh; sh++) {
+            out_boxes[idx] = Box::shift(in_boxes[i], sh());
+            ++idx;
+         }
+      }
+   }
+}
+
+/*
+ * ************************************************************************
+ *
+ * Returns an array of boxes that includes entries for each
+ * box that touches a periodic boundary.
+ *
+ * ************************************************************************
+ */
+void BoxGraphUtilities::makeBoxesPlusPeriodicBoxes(
+   BoxArray& out_boxes,
+   tbox::Array<int>& out_indices,
+   const BoxArray& in_boxes,
+   const tbox::Array<tbox::List<IntVector> >& shifts)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(out_boxes, in_boxes);
+
+   /*
+    * Compute the number of boxes that will be in the list;
+    * this is the number of original boxes, plus all the shifts.
+    */
+   int p_num = in_boxes.getNumberOfBoxes();
+   int b_num = countPeriodicBoxes(shifts);
+   int ct = p_num + b_num;
+
+   int test = shifts.getSize();
+   if (!(test == 0 || test == p_num)) {
+      TBOX_ERROR("BoxGraphUtilities::makeBoxesPlusPeriodicBoxes() error"
+         << "The shift array must either have zero length, or be the "
+         << "same length as in_boxes" << std::endl);
+   }
+
+   /*
+    *  Resize the array to hold the expanded box list.
+    */
+   out_boxes.resizeBoxArray(ct);
+   out_indices.resizeArray(ct);
+
+   /*
+    * Finally, fill in the arrays.
+    */
+   int idx = 0;
+   for (int i = 0; i < p_num; i++) {
+      /*
+       * append the unshifted box
+       */
+      out_boxes[idx] = in_boxes[i];
+      out_indices[idx] = i;
+      ++idx;
+
+      /*
+       * append any associated shifted boxes
+       */
+      if (b_num) {
+         for (tbox::List<IntVector>::Iterator sh(shifts[i]); sh; sh++) {
+            TBOX_DIM_ASSERT_CHECK_ARGS2(out_boxes, sh());
+
+            out_boxes[idx] = Box::shift(in_boxes[i], sh());
+            out_indices[idx] = i;
+            ++idx;
+         }
+      }
+   }
+}
+
+/*
+ * ************************************************************************
+ *
+ *  Returns the sum of shifts[j].getNumberOfItems()
+ *
+ * ************************************************************************
+ */
+int BoxGraphUtilities::countPeriodicBoxes(
+   const tbox::Array<tbox::List<IntVector> >& shifts)
+{
+   int count = 0;
+   int n = shifts.getSize();
+   for (int j = 0; j < n; ++j) {
+      count += shifts[j].getNumberOfItems();
+   }
+   return count;
+}
+
+/*
+ * ************************************************************************
+ *
+ *  for use when sorting integers using the C-library qsort
+ *
+ * ************************************************************************
+ */
+int BoxGraphUtilities::qsortIntCompare(
+   const void* v,
+   const void* w)
+{
+   int i = *(int *)v;
+   int j = *(int *)w;
+   if (i > j) {
+      return 1;
+   }
+   if (i < j) {
+      return -1;
+   }
+   return 0;
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoxGraphUtilities.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoxGraphUtilities.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,134 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility class for operations that reduce complexity of box calculus 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BoxGraphUtilities
+#define included_hier_BoxGraphUtilities
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/List.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * Class BoxGraphUtilities is a utility class that provides
+ * methods for "expanding" an array of boxes when some of the
+ * boxes touch periodic boundaries.  If a box touches a periodic
+ * boundary, then there are one or more "virtual" boxes that
+ * "wrap around" to the opposite side(s) of the domain:
+ *
+ *
+ * @verbatim
+ *
+ *         ---------------------------
+ *         |                         |
+ *         |                         |
+ *         |                         |
+ *         |-------------            |-------------
+ *         | this       |            | the virtual|
+ *         | box touches|            | wrap around|
+ *         | a periodic |            | box        |
+ *         | boundary   |            |            |
+ *         |-------------            |-------------
+ *         |                         |
+ *         |       domain            |
+ *         |        box              |
+ *         ---------------------------
+ *
+ * @endverbatim
+ *
+ *
+ * The BoxTop, BoxGraph, and possibly other classes require
+ * as input arrays of boxes in which the "virtual" boxes are
+ * explicitly represented.
+ */
+
+struct BoxGraphUtilities {
+   /*!
+    * @brief Returns an array of boxes that includes entries for each
+    * box that touches a periodic boundary.
+    *
+    * The shift array must either have zero length, or have the same length
+    * as \b in_boxes, otherwise an unrecoverable error will be thrown.
+    *
+    * @param out_boxes contains all items in the \b in_boxes array, and contains
+    *                  one or more additional items for any box that touches
+    *                  a periodic boundary.
+    * @param in_boxes  array of input boxes.
+    * @param shifts    shift information for each of the input boxes.
+    */
+   static void
+   makeBoxesPlusPeriodicBoxes(
+      BoxArray& out_boxes,
+      const BoxArray& in_boxes,
+      const tbox::Array<tbox::List<IntVector> >& shifts);
+
+   /*!
+    * @brief Returns an array of boxes that includes entries for each
+    * box that touches a periodic boundary.
+    *
+    * The shift array must either have zero length, or have the same length
+    * as \b in_boxes, otherwise an unrecoverable error will be thrown.
+    *
+    *
+    * @param out_boxes contains all items in the \b in_boxes array, and contains
+    *                  one or more additional items for any box that touches
+    *                  a periodic boundary.
+    * @param out_indices contains an entry for each box in \b out_boxes;
+    *                    the entry indicates the box, w.r.t \b in_boxes,
+    *                    from which the box was derived.
+    * @param in_boxes  array of input boxes.
+    * @param shifts    shift information for each of the input boxes.
+    */
+   static void
+   makeBoxesPlusPeriodicBoxes(
+      BoxArray& out_boxes,
+      tbox::Array<int>& out_indices,
+      const BoxArray& in_boxes,
+      const tbox::Array<tbox::List<IntVector> >& shifts);
+
+   /*!
+    * @brief Returns the sum of shifts[j].getNumberOfItems().
+    *
+    * This function is called by makeBoxesPlusPeriodicBoxes().
+    *
+    * @param shifts periodic shift information for each box.
+    */
+   static int
+   countPeriodicBoxes(
+      const tbox::Array<tbox::List<IntVector> >& shifts);
+
+   /*!
+    * @brief Compare function for use with qsort when sorting integers
+    * in ascending order.
+    *
+    * Sample usage:
+    *
+    * @verbatim
+    *   intarray[len];
+    *   ...
+    *   qsort(array, len, sizeof(int), qsortIntCompare);
+    * @endverbatim
+    *
+    */
+   static int
+   qsortIntCompare(
+      const void* v,
+      const void* w);
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoxIOUtility.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoxIOUtility.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,361 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility class to read and write boxes to an HDF database. 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BoxIOUtility_C
+#define included_hier_BoxIOUtility_C
+
+#include "SAMRAI/hier/BoxIOUtility.h"
+
+#ifdef HAVE_HDF5
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/HDFDatabase.h"
+#endif
+#include "SAMRAI/tbox/List.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <fstream>
+
+#define MESH_REFINE_BOX_IO_UTILITY (1)
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor and destructor for BoxIOUtility.                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+BoxIOUtility::BoxIOUtility(
+   const std::string& filename,
+   const IOTYPE iotype)
+{
+   TBOX_ASSERT(!filename.empty());
+
+#ifndef HAVE_HDF5
+   TBOX_ERROR("BoxIOUtility constructor error"
+      << "\n HDF Library not included in SAMRAI configure - "
+      << "cannot read or write box information" << std::endl);
+#endif
+
+   d_hdf_filename = filename;
+   d_iotype = iotype;
+   if (d_iotype == READ) {
+      readLevelBoxesDatabase();
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destructor writes refine boxes to HDF database.                       *
+ *                                                                       *
+ *************************************************************************
+ */
+BoxIOUtility::~BoxIOUtility()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Read information from the storage arrays.                             *
+ *                                                                       *
+ *************************************************************************
+ */
+void BoxIOUtility::getLevelBoxes(
+   BoxArray& level_boxes,
+   const int level_number,
+   const int entry_number)
+{
+   tbox::plog << "Reading boxes for level: " << level_number
+              << " entry number: " << entry_number << std::endl;
+
+   /*
+    * Make sure the data we are reading valid data from the database.
+    */
+   if (level_number + 1 > d_level_boxes.getSize()) {
+      TBOX_ERROR("BoxIOUtility::getLevelBoxes() error:  invalid level number. "
+         << "\n The level boxes database holds data only up "
+         << "\n to level " << d_level_boxes.getSize() - 1
+         << "\n You requested data from level " << level_number
+         << std::endl);
+   }
+
+   if (entry_number + 1 > d_level_boxes[level_number].getSize()) {
+      TBOX_ERROR("BoxIOUtility::getLevelBoxes() error:  invalid entry number. "
+         << "\n The level boxes database holds entries up "
+         << "\n to size " << d_level_boxes[level_number].getSize()
+         << "\n You requested data for entry " << entry_number
+         << std::endl);
+   }
+
+   tbox::plog << "Returning BoxArray containing "
+   << d_level_boxes[level_number][entry_number].getNumberOfBoxes()
+   << " boxes. " << std::endl;
+
+   /*
+    * Return BoxArray entry for this step.
+    */
+   level_boxes = d_level_boxes[level_number][entry_number];
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Pack information into storage arrays.                                 *
+ *                                                                       *
+ *************************************************************************
+ */
+void BoxIOUtility::putLevelBoxes(
+   const BoxArray& level_boxes,
+   const int level_number,
+   const int entry_number)
+{
+   const tbox::Dimension dim(level_boxes.getDim());
+
+   tbox::plog << "Writing boxes for level: " << level_number
+              << " entry number: " << entry_number << std::endl;
+
+   /*
+    * Reset dimension of arrays, if necessary.
+    */
+   if (d_level_boxes.getSize() < level_number + 1) {
+      d_level_boxes.resizeArray(level_number + 1);
+   }
+
+   /*
+    * Increment entry size by 10 to buffer the resize call.
+    */
+   int level_entry_size = d_level_boxes[level_number].getSize();
+   if (level_entry_size < entry_number + 1) {
+      d_level_boxes[level_number].resizeArray(level_entry_size + 10,
+         hier::BoxArray(dim));
+   }
+
+   /*
+    * Pack array
+    */
+   d_level_boxes[level_number][entry_number] = level_boxes;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return number of levels in the Database.                              *
+ *                                                                       *
+ *************************************************************************
+ */
+int BoxIOUtility::getNumberOfLevels()
+{
+   return d_level_boxes.getSize();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return number of entries for a particular level.                      *
+ *                                                                       *
+ *************************************************************************
+ */
+int BoxIOUtility::getNumberOfEntries(
+   const int level_number)
+{
+   if (level_number + 1 > d_level_boxes.getSize()) {
+      TBOX_ERROR("BoxIOUtility::getNumberOfEntries() error: "
+         << "invalid level number. "
+         << "\n The level boxes database holds data only up "
+         << "\n to level " << d_level_boxes.getSize() - 1
+         << "\n You requested data from level " << level_number
+         << std::endl);
+   }
+
+   return d_level_boxes[level_number].getSize();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Opens an HDF5 database which we will either write to or read from.    *
+ *                                                                       *
+ *************************************************************************
+ */
+void BoxIOUtility::readLevelBoxesDatabase()
+{
+
+#ifdef HAVE_HDF5
+   /*
+    * Open the HDF5 database.
+    */
+   tbox::Pointer<tbox::HDFDatabase> db(new tbox::HDFDatabase("root"));
+   int stat = db->open(d_hdf_filename);
+   if (stat < 0) {
+      TBOX_ERROR("BoxIOUtility::readLevelBoxesDatabase() error: "
+         "\n Error opening HDF database: " << d_hdf_filename << std::endl);
+   }
+
+   /*
+    * Read number of levels.
+    */
+   int num_levels = db->getInteger("num_levels");
+
+   d_level_boxes.resizeArray(num_levels);
+
+   int i;
+
+   /*
+    * Cycle through the levels and read the number of entries
+    * for each level, followed by the box arrays.
+    *
+    * Format:  nboxes[i]      - number of boxes for each entry
+    *          BoxArray[i]    - box arrays for each of the entries
+    */
+
+   for (int ln = 0; ln < num_levels; ln++) {
+
+      /*
+       * Read number of boxes for each entry of the level.
+       */
+      std::string s1 = "nboxes[" + tbox::Utilities::intToString(ln) + "]";
+      tbox::Array<int> number_of_boxes = db->getIntegerArray(s1);
+
+      /*
+       * Read box array for each entry of the level
+       */
+      int nentries = number_of_boxes.getSize();
+
+      for (i = 0; i < nentries; i++) {
+         std::string s2 = "BoxArray[" + tbox::Utilities::intToString(ln) + "]["
+            + tbox::Utilities::intToString(i) + "]";
+         if (number_of_boxes[i] > 0) {
+            tbox::Array<tbox::DatabaseBox> db_array = db->getDatabaseBoxArray(
+                  s2);
+            /*
+             * Do not have DIM so we need to resize inside the loop after getting
+             * a box.
+             */
+            if (d_level_boxes[ln].size() < nentries) {
+               d_level_boxes[ln].resizeArray(nentries,
+                  hier::BoxArray(db_array[0].getDim()));
+            }
+
+            d_level_boxes[ln][i] = db_array;
+         }
+      }
+   }
+
+   db->close();
+#endif
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Writes level box information to HDF5 database                         *
+ *                                                                       *
+ *************************************************************************
+ */
+void BoxIOUtility::writeLevelBoxesDatabase()
+{
+#ifdef HAVE_HDF5
+   /*
+    * Open the HDF5 database.
+    */
+   tbox::Pointer<tbox::Database> db(new tbox::HDFDatabase("root"));
+   int stat = db->create(d_hdf_filename);
+   if (stat < 0) {
+      TBOX_ERROR("BoxIOUtility::writeLevelBoxesDatabase() error"
+         << "\n Error opening HDF database: " << d_hdf_filename << std::endl);
+   }
+
+   /*
+    * Cycle through the levels and write the number of entries
+    * followed by the box array.
+    *
+    * Format:  num_levels     - number of levels in problem
+    *          nboxes[i]      - number of boxes for each entry of the level
+    *          BoxArray[i]    - box arrays for each of the entries
+    */
+
+   /*
+    * Write number of levels.
+    */
+   int num_levels = d_level_boxes.getSize();
+   db->putInteger("num_levels", num_levels);
+
+   int i;
+
+   for (int ln = 0; ln < num_levels; ln++) {
+
+      /*
+       * Write nboxes[i].
+       */
+      int nentries = d_level_boxes[ln].getSize();
+      tbox::Array<int> number_of_boxes(nentries);
+      for (i = 0; i < nentries; i++) {
+         number_of_boxes[i] = d_level_boxes[ln][i].getNumberOfBoxes();
+      }
+      std::string s1 = "nboxes[" + tbox::Utilities::intToString(ln) + "]";
+      db->putIntegerArray(s1, number_of_boxes);
+
+      /*
+       * Write box array[i]
+       */
+      for (i = 0; i < nentries; i++) {
+         std::string s2 = "BoxArray[" + tbox::Utilities::intToString(ln)
+            + "][" + tbox::Utilities::intToString(i) + "]";
+         if (number_of_boxes[i] > 0) {
+            db->putDatabaseBoxArray(s2, d_level_boxes[ln][i]);
+         }
+      }
+   }
+   db->close();
+
+   d_level_boxes.resizeArray(0);
+#endif
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print the boxes stored om the database to the specified IO stream.    *
+ *                                                                       *
+ *************************************************************************
+ */
+void BoxIOUtility::printBoxes(
+   std::ostream& os)
+{
+   os << "\n\n---------------------------------------------" << std::endl;
+   os << "Boxes stored in database:" << std::endl;
+
+   int nlevels = d_level_boxes.getSize();
+
+   for (int ln = 0; ln < nlevels; ln++) {
+      os << "Level " << ln << ":" << std::endl;
+      os << "-------" << std::endl;
+
+      for (int i = 0; i < d_level_boxes[ln].getSize(); i++) {
+
+         os << "   Entry " << i << ": " << std::endl;
+         d_level_boxes[ln][i].print(os);
+      }
+      os << "\n" << std::endl;
+   }
+   os << "---------------------------------------------\n\n" << std::endl;
+
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoxIOUtility.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoxIOUtility.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,138 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility class to read and write boxes to an HDF database. 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BoxIOUtility
+#define included_hier_BoxIOUtility
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+#include <string>
+
+namespace SAMRAI {
+namespace hier {
+
+/**
+ * Class BoxIOUtility supports writing and reading box information
+ * to an HDF file.
+ *
+ * TODO: This class in used only in the application tests.  Should it
+ * be moved there?
+ */
+
+class BoxIOUtility
+{
+public:
+   /**
+    * Enumerated type for specification of whether to read or write
+    * data.
+    *
+    * - \b READ           { read from HDF database}
+    * - \b WRITE          { write to HDF database};
+    *
+    */
+   enum IOTYPE { READ = 0,
+                 WRITE = 1 };
+   /**
+    * The constructor requires the name of the HDF database
+    * to write or read to, and the IOTYPE.
+    */
+   explicit BoxIOUtility(
+      const std::string& filename,
+      const IOTYPE iotype);
+
+   /**
+    * Virtual destructor.
+    */
+   virtual ~BoxIOUtility();
+
+   /**
+    * Pulls refinement boxes corresponding to the provided level and
+    * entry number from storage array - returns
+    * a boxlist with the corresponding refine boxes.
+    */
+   void
+   getLevelBoxes(
+      BoxArray& level_boxes,
+      const int level_number,
+      const int entry_number);
+
+   /**
+    * Puts new refinement boxes corresponding to the provided level and
+    * entry number into storage arrays.
+    */
+   void
+   putLevelBoxes(
+      const BoxArray& level_boxes,
+      const int level_number,
+      const int entry_number);
+
+   /**
+    * Returns the number of levels in the database.
+    */
+   int
+   getNumberOfLevels();
+
+   /**
+    * Returns the number of entries in the database for the specified
+    * level.
+    */
+   int
+   getNumberOfEntries(
+      const int level_number);
+
+   /**
+    * Opens and writes to an HDF database directory with the prescribed
+    * name a set of refinement boxes used during the run.
+    */
+   void
+   writeLevelBoxesDatabase();
+
+   /**
+    * Print the boxes stored in the database to the specified IO stream.
+    */
+   void
+   printBoxes(
+      std::ostream& os);
+
+private:
+   /*
+    * Opens and reads from an HDF database with the prescribed directory
+    * the set of refine boxes for controlled gridding operations.
+    */
+   void
+   readLevelBoxesDatabase();
+
+   /*
+    * HDF database name.
+    */
+   std::string d_hdf_filename;
+
+   /*
+    * The IO type - read or write
+    */
+   IOTYPE d_iotype;
+
+   /*
+    * tbox::Array to store the level boxes.
+    */
+   tbox::Array<tbox::Array<BoxArray> > d_level_boxes;
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoxList.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoxList.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,699 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A list of boxes with basic domain calculus operations 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BoxList_C
+#define included_hier_BoxList_C
+
+#include "SAMRAI/hier/BoxList.h"
+
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/MappedBoxTree.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/BoxList.I"
+#endif
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+ *************************************************************************
+ *									*
+ * Implement the various constructors and the assignment operator for	*
+ * the list of boxes.  Note that none of these routines modify their	*
+ * arguments.								*
+ *									*
+ *************************************************************************
+ */
+
+BoxList::BoxList(
+   const Box& box):
+   tbox::List<Box>()
+{
+   addItem(box);
+}
+
+BoxList::BoxList(
+   const BoxList& list):
+   tbox::List<Box>()
+{
+   copyItems(list);
+}
+
+BoxList::BoxList(
+   const BoxArray& array):
+   tbox::List<Box>()
+{
+   const int n = array.getNumberOfBoxes();
+   for (int i = 0; i < n; i++) {
+      appendItem(array[i]);
+   }
+}
+
+BoxList& BoxList::operator = (
+   const BoxList& list)
+{
+   if (this != &list) {
+      this->clearItems();
+      copyItems(list);
+   }
+   return *this;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Function simplifyBoxes() takes the complicated list of boxes and	*
+ * coalesces regions together where possible.				*
+ *									*
+ * The canonical ordering for boxes is defined such that boxes which	*
+ * 1* lie next to each other in higher dimensions are coalesced together	*
+ * before boxes which lie next to each other in lower dimensions.	*
+ * Thus, we try to coalesce two boxes together on the higher		*
+ * dimensions first.							*
+ *									*
+ * Assuming that two boxes a and b of dimension DIM are in canonical	*
+ * order for dimensions d+1, ..., D, we can coalesce them together on	*
+ * dimension d if:							*
+ *									*
+ *	(1) the lower and upper bounds for a and b agree for all	*
+ *	    dimensions greater than d					*
+ *	(2) boxes a and b overlap or are next to each other in		*
+ *	    dimension d							*
+ *	(3) boxes a and b overlap for all dimensions less than d	*
+ *									*
+ * If these conditions hold, then we break up the two boxes and put	*
+ * them onto the list of non-canonical boxes.				*
+ *									*
+ *************************************************************************
+ */
+
+void BoxList::simplifyBoxes()
+{
+   // Start coalescing on the highest dimension of the lists and work down
+   // While there are non-canonical boxes, pick somebody off of the list
+
+   if (!this->isEmpty()) {
+
+      tbox::Dimension dim(this->getFirstItem().getDim());
+
+      BoxList notCanonical;
+      for (int d = dim.getValue() - 1; d >= 0; d--) {
+         notCanonical.catenateItems(*this);
+         while (!notCanonical.isEmpty()) {
+            Box tryMe = notCanonical.getFirstItem();
+            notCanonical.removeFirstItem();
+
+            // Pick somebody off of the canonical list and compare against tryMe
+
+            if (!tryMe.empty()) {
+               bool combineDaPuppies = false;
+               BoxList::Iterator l;
+               for (l = this->listStart(); l; l++) {
+                  const Box andMe = l();
+
+                  const Index& al = andMe.lower();
+                  const Index& ah = andMe.upper();
+                  const Index& bl = tryMe.lower();
+                  const Index& bh = tryMe.upper();
+
+                  combineDaPuppies = true;
+                  for (int du = d + 1; du < dim.getValue(); du++) {
+                     if ((al(du) != bl(du)) || (ah(du) != bh(du))) {
+                        combineDaPuppies = false;
+                        break;
+                     }
+                  }
+                  if (combineDaPuppies) {
+                     if ((bl(d) > ah(d) + 1) || (bh(d) < al(d) - 1)) {
+                        combineDaPuppies = false;
+                     } else {
+                        for (int dl = 0; dl < d; dl++) {
+                           if ((bl(dl) > ah(dl)) || (bh(dl) < al(dl))) {
+                              combineDaPuppies = false;
+                              break;
+                           }
+                        }
+                     }
+                  }
+                  if (combineDaPuppies) break;
+               }
+
+               // If we are at the end of the canonical list, then just add
+               // Otherwise, burst tryMe and andMe and put on noncanonical
+
+               if (!combineDaPuppies) {
+                  appendItem(tryMe);
+               } else {
+                  Box andMe = l();
+                  removeItem(l);
+                  const Index& bl = tryMe.lower();
+                  const Index& bh = tryMe.upper();
+                  Index il = andMe.lower();
+                  Index ih = andMe.upper();
+                  for (int dl = 0; dl < d; dl++) {
+                     if (il(dl) < bl(dl)) il(dl) = bl(dl);
+                     if (ih(dl) > bh(dl)) ih(dl) = bh(dl);
+                  }
+                  if (bl(d) < il(d)) il(d) = bl(d);
+                  if (bh(d) > ih(d)) ih(d) = bh(d);
+                  Box intersection(il, ih);
+                  notCanonical.addItem(intersection);
+                  if (d > 0) {
+                     notCanonical.burstBoxes(tryMe, intersection, d);
+                     notCanonical.burstBoxes(andMe, intersection, d);
+                  }
+               }
+            }
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Break up box bursty against box solid and adds the pieces to list.	*
+ * The bursting is done on dimensions 0 through dimension-1, starting	*
+ * with lowest dimensions first to try to maintain the canonical		*
+ * representation for the bursted domains.				*
+ *									*
+ *************************************************************************
+ */
+
+void BoxList::burstBoxes(
+   const Box& bursty,
+   const Box& solid,
+   const int dimension)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(bursty, solid);
+   TBOX_ASSERT(dimension <= bursty.getDim().getValue());
+
+   // Set up the lower and upper bounds of the regions for ease of access
+
+   Index burstl = bursty.lower();
+   Index bursth = bursty.upper();
+   const Index& solidl = solid.lower();
+   const Index& solidh = solid.upper();
+
+   // Break bursty region against solid region along low dimensions first
+
+   for (int d = 0; d < dimension; d++) {
+      if (bursth(d) > solidh(d)) {
+         Index newl = burstl;
+         newl(d) = solidh(d) + 1;
+         appendItem(Box(newl, bursth));
+         bursth(d) = solidh(d);
+      }
+      if (burstl(d) < solidl(d)) {
+         Index newh = bursth;
+         newh(d) = solidl(d) - 1;
+         appendItem(Box(burstl, newh));
+         burstl(d) = solidl(d);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Same as burstBoxes without output argument.  This version uses a     *
+ * vector for output to minimize numerous tiny memory allocations.      *
+ *									*
+ *************************************************************************
+ */
+
+void BoxList::burstBoxes(
+   std::vector<Box>& non_intersecting,
+   const Box& bursty,
+   const Box& solid,
+   const int dimension) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(bursty, solid);
+   TBOX_ASSERT(bursty.getDim().getValue() <= dimension);
+
+   // Set up the lower and upper bounds of the regions for ease of access
+
+   Index burstl = bursty.lower();
+   Index bursth = bursty.upper();
+   const Index& solidl = solid.lower();
+   const Index& solidh = solid.upper();
+
+   // Break bursty region against solid region along low dimensions first
+
+   non_intersecting.clear();
+   for (int d = 0; d < dimension; d++) {
+      if (bursth(d) > solidh(d)) {
+         Index newl = burstl;
+         newl(d) = solidh(d) + 1;
+         non_intersecting.push_back(Box(newl, bursth));
+         bursth(d) = solidh(d);
+      }
+      if (burstl(d) < solidl(d)) {
+         Index newh = bursth;
+         newh(d) = solidl(d) - 1;
+         non_intersecting.push_back(Box(burstl, newh));
+         burstl(d) = solidl(d);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Return the current list without the portions that intersect takeaway.	*
+ *									*
+ *************************************************************************
+ */
+
+void BoxList::removeIntersections(
+   const Box& takeaway)
+{
+   BoxList fragments;
+   while (!this->isEmpty()) {
+      Box tryme = this->getFirstItem();
+      this->removeFirstItem();
+      if ((tryme * takeaway).empty()) {
+         fragments.appendItem(tryme);
+      } else {
+         fragments.burstBoxes(tryme, takeaway, takeaway.getDim().getValue());
+      }
+   }
+   catenateItems(fragments);
+}
+
+void BoxList::removeIntersections(
+   const Box& box,
+   const Box& takeaway)
+{
+   /*
+    * The boxlist MUST be empty to use this function (see comments
+    * in header file for discussion of why). If the two boxes intersect,
+    * form a boxlist that contains the boxes resulting from removing
+    * the intersection of box with takeaway.  If the two boxes do not
+    * intersect, simply add box to the box list (no intersection removed).
+    */
+   TBOX_ASSERT(this->isEmpty());
+
+   if (!(box * takeaway).empty()) {
+      BoxList::burstBoxes(box, takeaway, box.getDim().getValue());
+   } else {
+      appendItem(box);
+   }
+
+}
+
+void BoxList::removeIntersections(
+   const BoxList& takeaway)
+{
+   for (BoxList::Iterator remove(takeaway); remove; remove++) {
+      const Box& byebye = remove();
+      BoxList::removeIntersections(byebye);
+   }
+}
+
+void BoxList::removeIntersections(
+   const MappedBoxTree& takeaway)
+{
+   if (isEmpty()) {
+      return;
+   }
+
+   // Parts of the list not intersecting "takeaway"
+   BoxArray old_boxes(getFirstItem().getDim(), *this);
+   clearItems();
+
+   std::vector<MappedBox> overlap_mapped_boxes;
+   for (int j = 0; j < old_boxes.size(); ++j) {
+      const Box& tryme = old_boxes[j];
+      takeaway.findOverlapMappedBoxes(overlap_mapped_boxes, tryme);
+      if (overlap_mapped_boxes.empty()) {
+         appendItem(tryme);
+      } else {
+         // Remove overlap_mapped_boxes from tryme and save leftovers.
+         BoxList leftover(tryme);
+         for (size_t i = 0;
+              i < overlap_mapped_boxes.size() && !leftover.isEmpty();
+              ++i) {
+            leftover.removeIntersections(overlap_mapped_boxes[i].getBox());
+         }
+         copyItems(leftover);
+         overlap_mapped_boxes.clear();
+      }
+   }
+}
+
+void BoxList::intersectBoxes(
+   const MappedBoxTree& boxes)
+{
+   if (isEmpty()) {
+      return;
+   }
+
+   // Parts of the list intersecting "boxes"
+   BoxArray old_boxes(getFirstItem().getDim(), *this);
+   clearItems();
+
+   std::vector<MappedBox> overlapping_mapped_boxes;
+   for (int j = 0; j < old_boxes.size(); ++j) {
+      const Box& tryme = old_boxes[j];
+      boxes.findOverlapMappedBoxes(overlapping_mapped_boxes, tryme);
+      for (size_t i = 0; i < overlapping_mapped_boxes.size(); ++i) {
+         BoxList tryme_burst(tryme);
+         tryme_burst.intersectBoxes(overlapping_mapped_boxes[i].getBox());
+         copyItems(tryme_burst);
+      }
+      overlapping_mapped_boxes.clear();
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Return the boxes in the current list that intersect the index space	*
+ * of the argument.							*
+ *									*
+ *************************************************************************
+ */
+
+void BoxList::intersectBoxes(
+   const Box& box)
+{
+   BoxList intersection;
+   while (!this->isEmpty()) {
+      Box tryme = this->getFirstItem();
+      this->removeFirstItem();
+      Box overlap = tryme * box;
+      if (!overlap.empty()) {
+         intersection.appendItem(overlap);
+      }
+   }
+   catenateItems(intersection);
+}
+
+void BoxList::intersectBoxes(
+   const BoxList& boxes)
+{
+   BoxList intersection;
+   while (!this->isEmpty()) {
+      Box tryme = this->getFirstItem();
+      this->removeFirstItem();
+      for (BoxList::Iterator i(boxes); i; i++) {
+         Box overlap = tryme * i();
+         if (!overlap.empty()) {
+            intersection.appendItem(overlap);
+         }
+      }
+   }
+   catenateItems(intersection);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Coalesce boxes on the list where possible.  The resulting box list    *
+ * will contain a non-overlapping set of boxes covering the identical    *
+ * region of index space covered by the original list.  Two boxes may be *
+ * coalesced if their union is a box (recall that union is not closed    *
+ * over boxes), and they have a non-empty intersection or they are       *
+ * adjacent to each other in index space.  Empty boxes on the list are   *
+ * removed during this process.  Also, the boxes are coalesced in the    *
+ * order in which they appear on the list.  No attempt is made to        *
+ * coalesce boxes in any particular way (e.g., to achieve the smallest   *
+ * number of boxes).                                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BoxList::coalesceBoxes()
+{
+   BoxList::Iterator tb = this->listStart();
+   while (tb) {
+
+      bool found_match = false;
+
+      BoxList::Iterator tb2 = tb;
+      tb2++;
+
+      while (!found_match && tb2) {
+
+         if (tb2().coalesceWith(tb())) {
+            found_match = true;
+            removeItem(tb);
+         }
+
+         tb2++;
+      }
+
+      if (found_match) {
+         tb = this->listStart();
+      } else {
+         tb++;
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Sort boxes in list from largest to smallest in size with a heap sort. *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BoxList::heapify(
+   Box** heap,
+   const int i,
+   const int j)
+{
+   const int l = 2 * i + 1;
+   const int r = l + 1;
+   int s = i;
+   if ((l < j) && (heap[s]->size() > heap[l]->size())) s = l;
+   if ((r < j) && (heap[s]->size() > heap[r]->size())) s = r;
+   if (s != i) {
+      Box* tmp = heap[s];
+      heap[s] = heap[i];
+      heap[i] = tmp;
+      heapify(heap, s, j);
+   }
+}
+
+void BoxList::sortDescendingBoxSizes()
+{
+   if (!this->isEmpty()) {
+      const int nboxes = this->getNumberOfItems();
+      Box** heap = new Box *[nboxes];
+      int ib = 0;
+      for (BoxList::Iterator lb(*this); lb; lb++) {
+         heap[ib] = &(lb());
+         ib++;
+      }
+
+      for (int j = nboxes / 2 - 1; j >= 0; j--) heapify(heap, j, nboxes);
+
+      for (int k = nboxes - 1; k >= 1; k--) {
+         Box* tmp = heap[0];
+         heap[0] = heap[k];
+         heap[k] = tmp;
+         heapify(heap, 0, k);
+      }
+
+      BoxList out_boxes;
+      for (int l = 0; l < nboxes; l++) {
+         out_boxes.appendItem(*(heap[l]));
+      }
+      delete[] heap;
+
+      *this = out_boxes;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      bool boxes_in_order = true;
+      BoxList::Iterator tlb(*this);
+      int size = tlb().size();
+      tlb++;
+      while (boxes_in_order && tlb) {
+         int next_size = tlb().size();
+         boxes_in_order = (size >= next_size);
+         tlb++;
+         size = next_size;
+      }
+#endif
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Count the total size of all of the boxes in the boxlist.		*
+ *									*
+ *************************************************************************
+ */
+
+int BoxList::getTotalSizeOfBoxes() const
+{
+   int size = 0;
+   for (BoxList::Iterator i(*this); i; i++) {
+      size += i().size();
+   }
+   return size;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Perform simple operations (contains, grow, shift, refine, coarsen)	*
+ * on all elements in the box list.  These functions simply iterate over	*
+ * all list boxes and apply the operation to each box.			*
+ *									*
+ *************************************************************************
+ */
+
+bool BoxList::contains(
+   const Index& p) const
+{
+   for (BoxList::Iterator i(*this); i; i++) {
+      if (i().contains(p)) return true;
+   }
+   return false;
+}
+
+void BoxList::grow(
+   const IntVector& ghosts)
+{
+   for (BoxList::Iterator i(*this); i; i++) {
+      i().grow(ghosts);
+   }
+}
+
+void BoxList::shift(
+   const IntVector& offset)
+{
+   for (BoxList::Iterator i(*this); i; i++) {
+      i().shift(offset);
+   }
+}
+
+void BoxList::refine(
+   const IntVector& ratio)
+{
+   for (BoxList::Iterator i(*this); i; i++) {
+      i().refine(ratio);
+   }
+}
+
+void BoxList::coarsen(
+   const IntVector& ratio)
+{
+   for (BoxList::Iterator i(*this); i; i++) {
+      i().coarsen(ratio);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Test the box list for intersections among its boxes.			*
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool BoxList::boxesIntersect() const
+{
+   bool intersections = false;
+
+   BoxList my_boxes(*this);
+   while (!intersections && !my_boxes.isEmpty()) {
+      Box tryMe = my_boxes.getFirstItem();
+      my_boxes.removeFirstItem();
+
+      BoxList test_boxes = my_boxes;
+
+      while (!intersections && !test_boxes.isEmpty()) {
+         Box whatAboutMe = test_boxes.getFirstItem();
+         test_boxes.removeFirstItem();
+
+         if (!((tryMe * whatAboutMe).size() == 0)) {
+            intersections = true;
+         }
+      }
+   }
+
+   return intersections;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Return the bounding box for all boxes in the box list.		*
+ *									*
+ *************************************************************************
+ */
+
+Box BoxList::getBoundingBox() const
+{
+   if (this->isEmpty()) {
+      TBOX_WARNING("Bounding box list is empty");
+      const tbox::Dimension dim(tbox::Dimension::getInvalidDimension());
+      Box empty(dim);
+      return empty;
+   } else {
+      const tbox::Dimension& dim(this->getFirstItem().getDim());
+
+      Box bbox(dim);
+
+      for (BoxList::Iterator i(*this); i; i++) {
+         bbox += i();
+      }
+
+      return bbox;
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print boxes in list.                                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BoxList::print(
+   std::ostream& os) const
+{
+   int i = 0;
+   for (BoxList::Iterator b(*this); b; b++) {
+      os << "Box # " << i << ":  " << b() << std::endl;
+      i++;
+   }
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoxList.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoxList.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,47 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A list of boxes with basic domain calculus operations 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+BoxList::BoxList():tbox::List<Box>()
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+int BoxList::getNumberOfBoxes() const
+{
+   return this->getNumberOfItems();
+}
+
+SAMRAI_INLINE_KEYWORD
+void BoxList::unionBoxes(
+   const Box& box)
+{
+   if (!box.empty()) {
+      appendItem(box);
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void BoxList::unionBoxes(
+   const BoxList& boxes)
+{
+   copyItems(boxes);
+}
+
+SAMRAI_INLINE_KEYWORD
+BoxList::~BoxList()
+{
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoxList.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoxList.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,319 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A list of boxes with basic domain calculus operations 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BoxList
+#define included_hier_BoxList
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/List.h"
+#include "SAMRAI/tbox/PIO.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace hier {
+
+class BoxArray;
+class MappedBoxTree;
+
+/**
+ * Class BoxList represents a linked list of boxes.  It defines
+ * basic box calculus operations such as set intersection, union, and
+ * difference.
+ *
+ * @see hier::Box
+ * @see hier::BoxArray
+ */
+
+class BoxList:public tbox::List<Box>
+{
+public:
+   /**
+    * The iterator for class BoxList.  This is a convenient
+    * alias to the list iterator tbox::List< Box >::Iterator.
+    */
+   typedef tbox::List<Box>::Iterator Iterator;
+
+   /**
+    * Create an empty box list with no boxes.
+    */
+   BoxList();
+
+   /**
+    * Create a box list with one box in it.
+    */
+   explicit BoxList(
+      const Box& box);
+
+   /**
+    * Create a box list and copy the boxes from the argument list.
+    */
+   BoxList(
+      const BoxList& list);
+
+   /**
+    * Create a box list and copy the boxes from the argument array.
+    */
+   explicit BoxList(
+      const BoxArray& array);
+
+   /**
+    * Copy boxes from the argument list.
+    */
+   BoxList&
+   operator = (
+      const BoxList& list);
+
+   /**
+    * The destructor releases all list storage.
+    */
+   ~BoxList();
+
+   /**
+    * Return integer number of boxes in the box list.  Note that this
+    * function merely calls the getNumberOfItems() function in the tbox::List
+    * base class.  This function is provided for convenience and consistency
+    * with the tbox::BoxArray class.
+    */
+   int
+   getNumberOfBoxes() const;
+
+   /**
+    * Place the boxes on the list into a canonical ordering.  The canonical
+    * ordering for boxes is defined such that boxes that lie next to each
+    * other in higher dimensions are coalesced together before boxes that
+    * lie next to each other in lower dimensions.  This ordering provides
+    * a standard representation that can be used to compare box lists.
+    * The canonical ordering also does not allow any overlap between the
+    * boxes on the list.  This routine is potentially expensive, since the
+    * running time is \f$O(N^2)\f$ for N boxes.  None of the domain calculus
+    * routines call simplifyBoxes(); all calls to simplify the boxes must
+    * be explicit.  Note that this routine is distinct from coalesceBoxes(),
+    * which is not guaranteed to produce a canonical ordering.
+    */
+   void
+   simplifyBoxes();
+
+   /**
+    * Add the box to the list of boxes.  Note that this routine does not
+    * simplify the box list.  Thus, the new box may overlap with boxes
+    * that already reside on the list.
+    */
+   void
+   unionBoxes(
+      const Box& box);
+
+   /**
+    * Add the boxes to the list of boxes.  Note that this routine does not
+    * simplify the box list.  Thus, the new boxes may overlap with boxes
+    * that already reside on the list.
+    */
+   void
+   unionBoxes(
+      const BoxList& boxes);
+
+   /**
+    * Remove from the current boxlist the portions that intersect
+    * the box takeaway.  This operation can be thought of as a set
+    * difference defined over the abstract AMR box index space.
+    * Performing the set difference will require \f$O(N)\f$ time for a
+    * list with \f$N\f$ boxes.
+    */
+   void
+   removeIntersections(
+      const Box& takeaway);
+
+   /**
+    * Remove from the current boxlist the portions that intersect the
+    * boxes in the BoxList takeaway.
+    */
+   void
+   removeIntersections(
+      const BoxList& takeaway);
+
+   /**
+    * Remove from the current boxlist the portions that intersect the
+    * boxes in the MappedBoxTree takeaway.
+    *
+    * MappedBoxTree has an efficient overlap search method so this
+    * version of removeIntersection is relatively fast.
+    */
+   void
+   removeIntersections(
+      const MappedBoxTree& takeaway);
+
+   /**
+    * A special version for the case where the BoxList is empty initially,
+    * this routine builds the list of boxes that get formed when intersecting
+    * box with takeaway.  If the boxes do not intersect, box is added to
+    * the boxlist.  This routine is primarily suited for applications
+    * which are looking only for the intersection of two boxes.
+    */
+   void
+   removeIntersections(
+      const Box& box,
+      const Box& takeaway);
+
+   /**
+    * Intersect the current boxlist against the specified box.  Performing
+    * the intersection will require \f$O(N)\f$ time for a list with \f$N\f$ boxes.
+    */
+   void
+   intersectBoxes(
+      const Box& box);
+
+   /**
+    * Intersect the current boxlist against the specified boxlist.
+    * The intersection calculation will require \f$O(N^2)\f$ time for
+    * boxlists with \f$N\f$ boxes.
+    */
+   void
+   intersectBoxes(
+      const BoxList& boxes);
+
+   /**
+    * Intersect the current boxlist against the boxes in the specified MappedBoxtree.
+    *
+    * MappedBoxTree has an efficient overlap search method so this
+    * version of intersectBoxes is relatively fast.
+    */
+   void
+   intersectBoxes(
+      const MappedBoxTree& boxes);
+
+   /**
+    * Combine any boxes in the list which may be coalesced.  Two boxes
+    * may be coalesced if their union is a box (recall that boxes are not
+    * closed under index set unions).  Empty boxes on the list are removed
+    * during this process.  Note that this is potentially an expensive
+    * calculation (e.g., it will require \f$(N-1)!\f$ box comparisons for a box
+    * list with \f$N\f$ boxes in the worst possible case).  So this routine
+    * should be used sparingly.  Also note that this routine is different
+    * than simplifyBoxes() since it does not produce a canonical ordering.
+    * In particular, this routine processes the boxes in the order in which
+    * they appear on the list, rather than attempting to coalesce boxes
+    * along specific coordinate directions before others.
+    */
+   void
+   coalesceBoxes();
+
+   /**
+    * Sort the boxes in the list from largest to smallest in size.  Recall
+    * that the size of a box is the number of cell indices it contains.  This
+    * routine uses a heap sort algorithm which requires \f$O(N*logN)\f$ work
+    * in both average and worst case scenarios.  Note that to obtain a
+    * box list from smallest to largest, the list elements can be reversed
+    * after this sorting routine is applied.
+    */
+   void
+   sortDescendingBoxSizes();
+
+   /**
+    * Count up the total number of indices in all the boxes in the list.
+    */
+   int
+   getTotalSizeOfBoxes() const;
+
+   /**
+    * Check whether an index lies within the bounds of the collection
+    * of boxes.
+    */
+   bool
+   contains(
+      const Index& p) const;
+
+   /**
+    * Grow all boxes in the box list by the specified ghost cell width.
+    */
+   void
+   grow(
+      const IntVector& ghosts);
+
+   /**
+    * Shift all boxes in the box list by the specified offset.
+    */
+   void
+   shift(
+      const IntVector& offset);
+
+   /**
+    * Refine the index space of each box in the box list by
+    * the specified vector refinement ratio.
+    */
+   void
+   refine(
+      const IntVector& ratio);
+
+   /**
+    * Coarsen the index space of each box in the box list by
+    * the specified vector coarsening ratio.
+    */
+   void
+   coarsen(
+      const IntVector& ratio);
+
+   /**
+    * Return true if there exists non-empty intersection among boxes in
+    * list; otherwise, return false.
+    */
+   bool
+   boxesIntersect() const;
+
+   /**
+    * Return the bounding box for all boxes in the box list.
+    */
+   Box
+   getBoundingBox() const;
+
+   /**
+    * Print all class member data for this bounding box list object
+    * to specified output stream.
+    */
+   void
+   print(
+      std::ostream& os = tbox::plog) const;
+
+private:
+   void
+   burstBoxes(
+      const Box& bursty,
+      const Box& solid,
+      const int dimension);
+   void
+   burstBoxes(
+      std::vector<Box>& non_intersecting,
+      const Box& bursty,
+      const Box& solid,
+      const int dimension) const;
+
+   /**
+    *
+    * Sort boxes in list from largest to smallest in size with a heap sort.
+    *
+    */
+   static void
+   heapify(
+      Box** heap,
+      const int i,
+      const int j);
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/BoxList.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoxOverlap.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoxOverlap.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,35 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Base class that describes intersections between AMR boxes 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BoxOverlap_C
+#define included_hier_BoxOverlap_C
+
+#include "SAMRAI/hier/BoxOverlap.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/BoxOverlap.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+BoxOverlap::~BoxOverlap()
+{
+}
+
+void BoxOverlap::print(
+   std::ostream& os) const
+{
+   os << "print() method not implemented for this overlap type" << std::endl;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoxOverlap.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoxOverlap.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,20 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Base class that describes intersections between AMR boxes 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+BoxOverlap::BoxOverlap()
+{
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoxOverlap.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoxOverlap.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,107 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Base class that describes intersections between AMR boxes 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BoxOverlap
+#define included_hier_BoxOverlap
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief Class BoxOverlap is an abstract base class used to represent a region 
+ * where data will be communicated between two AMR patches.
+ *
+ * The exact form of the overlap will be determined by the subclass, which 
+ * will be implemented to handle a particular patch data class.  For example, 
+ * the rules for data intersection for face-centered data are different 
+ * from that for cell-centered data.
+ *
+ * The BoxOverlap class provides three functions.  First, it serves
+ * as a base class that can answer the question whether an intersection
+ * is empty, and is therefore useful for determining communication
+ * dependencies.  Second, it holds information about any offset (such as 
+ * a periodic shift) between a source and destination patch.  Third, it 
+ * is a storage location for the exact form of the intersection of the data 
+ * residing on two patches, which can be quite complicated (for example, 
+ * for face centered data).  To access the information about the intersection, 
+ * type-safe type casting should be used to access the subclass and its 
+ * member functions.
+ *
+ * @see hier::BoxGeometry
+ */
+
+class BoxOverlap:public tbox::DescribedClass
+{
+public:
+   /*!
+    * @brief The default constructor for BoxOverlap.
+    */
+   BoxOverlap();
+
+   /*!
+    * @brief The virtual destructor.
+    */
+   virtual ~BoxOverlap();
+
+   /*!
+    * @brief Return true if overlap object represents an empty data 
+    * overlap; i.e., there is no data intersection between patches.
+    *
+    * Note that two patches may communicate even if they do not intersect in
+    * the underlying AMR index space (e.g., if data values exist at the
+    * a faces or corners of cells).
+    *
+    * @return  Returns true for empty overlaps and false otherwise.
+    */
+   virtual bool
+   isOverlapEmpty() const = 0;
+
+   /*!
+    * @brief Return the offset between the destination and source index spaces.
+    *
+    * The destination index space is the source index space shifted
+    * by this amount.
+    *
+    * @return  The offset.
+    */
+   virtual const IntVector&
+   getSourceOffset() const = 0;
+
+   /*!
+    * @brief Print BoxOverlap object data.
+    *
+    * @param[in]     os the std::ostream to which to print
+    */
+   virtual void
+   print(
+      std::ostream& os) const;
+
+private:
+   BoxOverlap(
+      const BoxOverlap&);               // not implemented
+   void
+   operator = (
+      const BoxOverlap&);               // not implemented
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/BoxOverlap.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoxTree.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoxTree.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,358 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility class to reduce complexity of box calculus operations. 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BoxTree_C
+#define included_hier_BoxTree_C
+
+#include "SAMRAI/hier/BoxTree.h"
+#include "SAMRAI/hier/BoxGraphUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <iostream>
+#include <iomanip>
+
+// Ignore incorrect Intel warning
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:177)
+#endif
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+static void buildTboxArrayFromList(
+   tbox::Array<int>& array,
+   const tbox::List<int>& list)
+{
+   int len = list.getNumberOfItems();
+   array.resizeArray(len);
+   int count = 0;
+   for (tbox::List<int>::Iterator j(list); j; j++) {
+      array[count++] = j();
+   }
+}
+
+/*
+ * ************************************************************************
+ *
+ * ctors and dtor
+ *
+ * ************************************************************************
+ */
+
+BoxTree::BoxTree(
+   const BoxArray& box_array,
+   const tbox::Array<tbox::List<IntVector> >& box_shifts,
+   const ProcessorMapping& box_mapping,
+   int min_length):
+   d_boxes(box_array),
+   d_have_mapping(true)
+{
+   const tbox::Dimension& dim(box_array.getDim());
+
+   tbox::Array<int> indices;
+   BoxArray boxes(dim);
+   BoxGraphUtilities::makeBoxesPlusPeriodicBoxes(
+      boxes, indices, box_array, box_shifts);
+
+   int len = boxes.getNumberOfBoxes();
+   tbox::Array<BoxTreeNode::Triple> box_triples(len, BoxTreeNode::Triple(dim));
+   for (int i = 0; i < len; ++i) {
+      int idx = indices[i];
+      box_triples[i].box = boxes[i];
+      box_triples[i].idx = idx;
+      box_triples[i].owner = box_mapping.getProcessorAssignment(idx);
+   }
+
+   int partition_dim = dim.getValue() - 1;
+   d_tree = new BoxTreeNode(dim,
+         box_triples,
+         d_have_mapping,
+         min_length,
+         partition_dim);
+}
+
+BoxTree::BoxTree(
+   const BoxArray& box_array,
+   const tbox::Array<tbox::List<IntVector> >& box_shifts,
+   int min_length):
+   d_boxes(box_array),
+   d_have_mapping(false)
+{
+   const tbox::Dimension& dim(box_array.getDim());
+
+   tbox::Array<int> indices;
+   BoxArray boxes(dim);
+   BoxGraphUtilities::makeBoxesPlusPeriodicBoxes(
+      boxes, indices, box_array, box_shifts);
+
+   int len = boxes.getNumberOfBoxes();
+   tbox::Array<BoxTreeNode::Triple> box_triples(len, BoxTreeNode::Triple(
+                                                   tbox::Dimension(dim)));
+   for (int i = 0; i < len; ++i) {
+      int idx = indices[i];
+      box_triples[i].box = boxes[i];
+      box_triples[i].idx = idx;
+      box_triples[i].owner = -1;
+   }
+
+   int partition_dim = dim.getValue() - 1;
+   d_tree = new BoxTreeNode(dim,
+         box_triples,
+         d_have_mapping,
+         min_length,
+         partition_dim);
+}
+
+BoxTree::BoxTree(
+   const BoxArray& box_array,
+   int min_length):
+   d_boxes(box_array),
+   d_have_mapping(false)
+{
+   const tbox::Dimension& dim(d_boxes.getDim());
+
+   int len = d_boxes.getNumberOfBoxes();
+   tbox::Array<BoxTreeNode::Triple> box_triples(len, BoxTreeNode::Triple(
+                                                   tbox::Dimension(dim)));
+   for (int i = 0; i < len; ++i) {
+      box_triples[i].box = d_boxes[i];
+      box_triples[i].idx = i;
+      box_triples[i].owner = -1;
+   }
+
+   int partition_dim = dim.getValue() - 1;
+   d_tree = new BoxTreeNode(dim,
+         box_triples,
+         d_have_mapping,
+         min_length,
+         partition_dim);
+}
+
+BoxTree::~BoxTree()
+{
+}
+
+/*
+ *************************************************************************
+ *
+ * Routines to return an array of integer indices indicating elements
+ * of the box array passed to the ctor that overlap with the specified box.
+ * Depending on which routine is called, the indices will either correspond
+ * to all boxes in the original box array or only those that are local to
+ * this processor.
+ *
+ *************************************************************************
+ */
+
+void BoxTree::findOverlapIndices(
+   tbox::Array<int>& indices,
+   const Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_boxes, box);
+
+   bool find_local_overlap_indices = false;
+   privateFindOverlapIndices(indices, box, find_local_overlap_indices);
+}
+
+void BoxTree::findLocalOverlapIndices(
+   tbox::Array<int>& indices,
+   const Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_boxes, box);
+
+   if (!d_have_mapping) {
+      TBOX_ERROR("BoxTree::findLocalOverlapIndices() error!!"
+         << "\n Processor mapping must be passed to class constructor"
+         << "to use this method. None was passed." << std::endl);
+   }
+
+   bool find_local_overlap_indices = true;
+   privateFindOverlapIndices(indices, box, find_local_overlap_indices);
+}
+
+void BoxTree::privateFindOverlapIndices(
+   tbox::Array<int>& indices,
+   const Box& box,
+   bool find_local_overlaps) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_boxes, box);
+
+   indices.setNull();
+   tbox::List<int> indices_list;
+   d_tree->findOverlapIndices(indices_list, box, find_local_overlaps);
+
+   buildTboxArrayFromList(indices, indices_list);
+
+   int len = indices.getSize();
+   if (len) {
+      int* idx_ptr = indices.getPointer();
+      qsort((void *)idx_ptr, len, sizeof(int),
+         BoxGraphUtilities::qsortIntCompare);
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ * Routine that returns a list of boxes that overlap with the argument box.
+ *
+ *************************************************************************
+ */
+
+void BoxTree::findOverlapBoxes(
+   BoxList& overlap_boxes,
+   const Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_boxes, box);
+
+   overlap_boxes.clearItems();
+   tbox::List<int> indices_list;
+   d_tree->findOverlapBoxes(overlap_boxes, box);
+}
+
+/*
+ * **************************************************************
+ * CAUTION: the semantics of this call differ from that of
+ * BoxList::removeIntersections(const BoxList takeaway);
+ * here, the list that is being modified is the list that is
+ * passed as an argument; the "takeaway" list is the list that
+ * was passed when the BoxTop object was constructed.
+ * **************************************************************
+ */
+
+void BoxTree::removeIntersections(
+   BoxList& fragments) const
+{
+   const tbox::Dimension& dim(d_boxes.getDim());
+
+   //This will hold boxes in "list" minus the intersection with "takeaway"
+   BoxArray boxes_in(dim, fragments);
+   fragments.clearItems();
+
+   /*
+    * Compare each box in "list" against all boxes in "take_away"
+    * Note: this is opposite the approach of the current implementation;
+    * here, the "take_away" list is the list with which the tree was
+    * instantiated.
+    */
+   int len = boxes_in.getNumberOfBoxes();
+   for (int k = 0; k < len; ++k) {
+      Box tryme = boxes_in[k];
+
+      TBOX_DIM_ASSERT_CHECK_ARGS2(d_boxes, tryme);
+
+      /*
+       * Find a shorter list of boxes from "takeaway" that might intersect
+       * with "tryme."  Recall that "takeaway" was the BoxList with which
+       * this object was instantiated; the next call returns a list of
+       * boxes that are in "takeaway," and are also nabors (i.e., overlap with)
+       * the "tryme" box.
+       */
+      BoxList nabors;
+      findOverlapBoxes(nabors, tryme);
+      int nabor_count = nabors.size();
+
+      /*
+       * if "tryme" doesn't intersect any boxes on takeaway
+       * i.e., if "nabors" is empty" then keep "tryme."
+       */
+      if (nabor_count == 0) {
+         fragments.appendItem(tryme);
+      }
+      /*
+       * Else, burst up tryme against the nabors.
+       * Here, we call the BoxList version of
+       * removeIntersections.
+       */
+      else {
+
+         //possibly todo: hand-code a removeIntersections arrays ...
+         BoxList tryme_burst(tryme);
+         tryme_burst.removeIntersections(nabors);
+         fragments.copyItems(tryme_burst);
+      }
+   }
+}
+
+/*
+ * **************************************************************
+ * CAUTION: the semantics of this call differ from that of
+ * BoxList::removeIntersections(const BoxList takeaway);
+ * here, the list that is being modified is the list that is
+ * passed as an argument; the "takeaway" list is the list that
+ * was passed when the BoxTop object was constructed.
+ * **************************************************************
+ */
+
+void BoxTree::intersectBoxes(
+   BoxList& boxes) const
+{
+
+   const tbox::Dimension dim(d_boxes.getDim());
+
+   //This will hold boxes in "list" minus the intersection with "takeaway"
+   BoxArray boxes_in(dim, boxes);
+   boxes.clearItems();
+
+   /*
+    * Compare each box in "list" against all boxes in "take_away"
+    * Note: this is opposite the approach of the current implementation;
+    * here, the "take_away" list is the list with which the tree was
+    * instantiated.
+    */
+   int len = boxes_in.getNumberOfBoxes();
+   for (int k = 0; k < len; ++k) {
+      Box tryme = boxes_in[k];
+
+      TBOX_DIM_ASSERT_CHECK_ARGS2(d_boxes, tryme);
+
+      /*
+       * Find a shorter list of boxes from "takeaway" that might intersect
+       * with "tryme."  Recall that "takeaway" was the BoxList with which
+       * this object was instantiated; the next call returns a list of
+       * boxes that are in "takeaway," and are also nabors (i.e., overlap with)
+       * the "tryme" box.
+       */
+      BoxList nabors;
+      findOverlapBoxes(nabors, tryme);
+      int nabor_count = nabors.size();
+
+      /*
+       * if "tryme" doesn't intersect any boxes on takeaway
+       * i.e., if "nabors" is empty" then keep "tryme."
+       */
+      if (nabor_count > 0) {
+         BoxList tryme_burst(tryme);
+         tryme_burst.intersectBoxes(nabors);
+         boxes.copyItems(tryme_burst);
+      }
+   }
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoxTree.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoxTree.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,253 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility class to reduce complexity of box calculus operations. 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BoxTree
+#define included_hier_BoxTree
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <stdlib.h>
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/BoxTreeNode.h"
+#include "SAMRAI/hier/ProcessorMapping.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * TODO: This class is almost completely obsolete.  It is only used by
+ * the VisItDataWriter and VisItDataWriter needs a serious overhaul.
+ *
+ * Class BoxTree is a utility class that provides functionality
+ * that can reduce the runtime complexity of certain box
+ * calculus operations.
+ *
+ * A BoxTree object is constructed by passing the ctor a BoxArray
+ * which will then be translated into an internal tree representation
+ * in subsequently-called methods, described below. If the
+ * BoxArray contains \b n boxes, then the setup phase (which is
+ * invoked by the constructor) has an expected runtime complexity
+ * of O(n log(n)).
+ *
+ * Following construction, two types of operations are supported by the
+ * member functions findOverlapIndices() and findLocalOverlapIndices().
+ * Each function takes an integer array and a box as input, and computes
+ * the indices of the subset of the boxes (in the array that was passed
+ * to the constructor) that overlap with the argument box.  On return from
+ * the function, the integer array holds the indices of the boxes in the
+ * array that overlap with the argument box.  The function findOverlapIndices()
+ * returns indices of all boxes that overlap the argument box.  The function
+ * findLocalOverlapIndices() returns only the indices of the boxes that are
+ * assigned to this processor.
+ *
+ * Second, the removeIntersections call takes a list of boxes as
+ * input, and removes those portions that intersect with the boxes
+ * in the BoxArray that was passed to the constructor.
+ *
+ * This class provides functionality that is similar to that provided
+ * by the BoxTop and BoxGraph classes.  However, it employs different
+ * algorithms to do so, and is expected to have different runtime
+ * characteristics.  Questions such as "which is faster for
+ * removeIntersections(): BoxTop, BoxGraph, or BoxTree?" depends on many
+ * factors for which analysis is difficult.  The answer is largely a
+ * function of a particular problem and domain topology, and is best
+ * answered experimentally.
+ *
+ *
+ * @see hier::BoxTop
+ * @see hier::BoxGraph
+ * @see hier::Box
+ * @see hier::BoxArray
+ */
+class BoxTree:public tbox::DescribedClass
+{
+public:
+   //! @{
+   /*!
+    * @name BoxTree constructors
+    */
+
+   /*!
+    * @brief Constructor for BoxTree.
+    *
+    * The primary difference between the constructors is that the first takes
+    * processor mapping information while the others do not.  This is because
+    * processor mapping information is required in the method
+    * findLocalOverlapIndices(), but is not required for the other
+    * methods.
+    *
+    * If you do not pass processor mappying information, and subsequently call
+    * findLocalOverlapIndices(), an unrecoverable assertion will be thrown.
+    *
+    * @param boxes input array of boxes.
+    * @param box_shifts the amount by which each box is shifted when there
+    *               are periodic boundary conditions.  If there are no
+    *               periodic boundary conditions you can pass an array
+    *               of length zero; otherwise the array must contain
+    *               an entry for each box in \b boxes.
+    * @param box_mapping maps each box in \b boxes to a processor.
+    * @param min_length controls the partitioning of \b boxes amongst
+    *                   child nodes in the tree.
+    *                   Setting to a larger value tends to
+    *                   decrease the total number of nodes in the tree,
+    *                   and hence reduces memory requirements; however, a
+    *                   larger value may also increase the cost of the
+    *                   findOverlapBoxes and removeIntersections operations.
+    *                   (and hence reduces memory requirements), but increase
+    *                   the cost of findOverlapBoxes.  Unless you are
+    *                   heavily invested in performance tweaking, please use
+    *                   the default value.  Really, I mean it.
+    */
+   explicit BoxTree(
+      const BoxArray& boxes,
+      const tbox::Array<tbox::List<IntVector> >& box_shifts,
+      const ProcessorMapping& box_mapping,
+      int min_length = 10);
+
+   explicit BoxTree(
+      const BoxArray& boxes,
+      const tbox::Array<tbox::List<IntVector> >& box_shifts,
+      int min_length = 10);
+
+   explicit BoxTree(
+      const BoxArray& boxes,
+      int min_length = 10);
+   //@}
+
+   /*!
+    * The dtor does nothing interesting.
+    */
+   ~BoxTree();
+
+   //! @{
+   /*!
+    * @name BoxTree findIndices
+    */
+
+   /*!
+    * @brief Compute the indices of all boxes that overlap the specified \b box.
+    *
+    * The integer array will contain the indices of all boxes (in the BoxArray
+    * that was passed to the constructor) and that overlap the specified \b box.
+    *
+    * @param indices           integer array to hold the array indices of
+    *                          the overlapping boxes in the box array.
+    * @param box               box whose overlaps are requested.
+    */
+   void
+   findOverlapIndices(
+      tbox::Array<int>& indices,
+      const Box& box) const;
+
+   /*!
+    * @brief Compute the indices of the boxes local to this processor that
+    * overlap the specified \b box.
+    *
+    * The integer array will contain the indices of the boxes (in the BoxArray
+    * that was passed to the constructor) and that overlap the specified \b box
+    * and which are assigned to this processor.  The processor assignment is
+    * determined from the mapping information passed to the constructor.  This
+    * routine will result in an unrecoverable assertion if a constructor that
+    * does not accept the mapping information was used to create this object.
+    * See the comments for the constructors.
+    *
+    * @param indices           integer array to hold the array indices of
+    *                          the overlapping boxes in the box array.
+    * @param box               box whose overlaps are requested.
+    */
+   void
+   findLocalOverlapIndices(
+      tbox::Array<int>& indices,
+      const Box& box) const;
+
+   //! @}
+
+   /*!
+    * @brief Compute list of boxes that overlap the specified \b box.
+    *
+    * @param overlap_boxes boxes in BoxArray that was passed to the constructor
+    *                      that overlap with argument box.
+    * @param box           box whose overlaps are requested.
+    */
+   void
+   findOverlapBoxes(
+      BoxList& overlap_boxes,
+      const Box& box) const;
+
+   /*!
+    * @brief Intersect a list of boxes with boxes in the tree,
+    * output the intersection.
+    *
+    * CAUTION: the semantics of this call differ from that of
+    * BoxList::intersect(const BoxList takeaway).
+    * Here, the list that is being modified is the list that is
+    * passed as an argument; the "keep" list is the list that
+    * was passed when the BoxTop object was constructed.
+    *
+    * @param boxes the list of boxes from which to remove nonintersecting parts.
+    */
+   void
+   intersectBoxes(
+      BoxList& boxes) const;
+
+   /*!
+    * @brief Remove from \b boxes the portions that intersect the boxes
+    * in the BoxArray that was passed to the constructor.
+    *
+    * CAUTION: the semantics of this call differ from that of
+    * BoxList::removeIntersections(const BoxList takeaway).
+    * Here, the list that is being modified is the list that is
+    * passed as an argument; the "takeaway" list is the list that
+    * was passed when the BoxTop object was constructed.
+    *
+    * @param boxes the list of boxes from which intersections are to be removed.
+    */
+   void
+   removeIntersections(
+      BoxList& boxes) const;
+
+private:
+   /*!
+    * The copy ctor is not implemented.
+    */
+   BoxTree(
+      const BoxTree& box);
+
+   /*!
+    * The assignment operator is not implemented.
+    */
+   BoxTree&
+   operator = (
+      const BoxTree& box);
+
+   /*!
+    * Private routine to construct overlap indices.
+    */
+   void
+   privateFindOverlapIndices(
+      tbox::Array<int>& indices,
+      const Box& box,
+      bool find_local_overlaps) const;
+
+   tbox::Pointer<BoxTreeNode> d_tree;
+
+   BoxArray d_boxes;
+
+   bool d_have_mapping;
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoxTreeNode.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoxTreeNode.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,320 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Basic building block used by BoxTree class. 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BoxTreeNode_C
+#define included_hier_BoxTreeNode_C
+
+#include "SAMRAI/hier/BoxTreeNode.h"
+#include "SAMRAI/hier/BoxGraphUtilities.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+ * ************************************************************************
+ *                                                                       *
+ * Constructs a BoxTreeNodeX that represents the physical
+ * domain specified by box.
+ *                                                                       *
+ * ************************************************************************
+ */
+
+BoxTreeNode::BoxTreeNode(
+   const tbox::Dimension& dim,
+   tbox::Array<BoxTreeNode::Triple> box_triples,
+   bool have_mapping,
+   int min_length,
+   int partition_dim,
+   int recurse_level):
+   d_domain(dim),
+   d_partition_dim(partition_dim)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   d_rank = mpi.getRank();
+
+   /*
+    * Compute this node's domain, which is the bounding box
+    * for the list of boxes.
+    */
+   int len = box_triples.size();
+   for (int j = 0; j < len; ++j) {
+      d_domain += box_triples[j].box;
+   }
+
+   /*
+    * If the list of boxes is small enough, we won't
+    * do any recursive stuff: we'll just let the boxes
+    * live here.  In this case, there is no left child,
+    * no right child, and no recursive d_tree.
+    */
+   min_length = (min_length < 1) ? 1 : min_length;
+   if (len <= min_length || partition_dim == 0) {
+      d_box_triples = box_triples;
+      d_work.resizeArray(len);
+      return;
+   }
+
+   /*
+    * Partition the boxes into three sets:
+    *    - those that belong to me
+    *    - those that belong to my left child
+    *    - those that belong to my right child
+    */
+   tbox::Array<BoxTreeNode::Triple> left, right;
+   int mid =
+      (d_domain.lower(d_partition_dim) + d_domain.upper(d_partition_dim)) / 2;
+
+   //first, compute the number of items in each list
+   //(this loop would be eliminated if we had an Array::appendItem())
+   int my_ct, left_ct, right_ct;
+   my_ct = left_ct = right_ct = 0;
+   for (int i = 0; i < len; ++i) {
+      if (box_triples[i].box.upper(d_partition_dim) <= mid) {
+         ++left_ct;
+      } else if (box_triples[i].box.lower(d_partition_dim) > mid) {
+         ++right_ct;
+      } else {
+         ++my_ct;
+      }
+   }
+
+   //second, resize the arrays and insert the elements
+   d_box_triples.resizeArray(my_ct, BoxTreeNode::Triple(dim));
+   left.resizeArray(left_ct, BoxTreeNode::Triple(dim));
+   right.resizeArray(right_ct, BoxTreeNode::Triple(dim));
+   my_ct = left_ct = right_ct = 0;
+
+   for (int i = 0; i < len; ++i) {
+      if (box_triples[i].box.upper(d_partition_dim) <= mid) {
+         left[left_ct++] = box_triples[i];
+      } else if (box_triples[i].box.lower(d_partition_dim) > mid) {
+         right[right_ct++] = box_triples[i];
+      } else {
+         d_box_triples[my_ct++] = box_triples[i];
+      }
+   }
+
+   /*
+    * Recurse to build a private tree on this node;
+    * this tree contains the boxes assigned to this node,
+    * but they will be partitioned with referenc to
+    * the next lower dimension.
+    */
+   if (d_partition_dim > 0) {
+      d_tree = new BoxTreeNode(dim,
+            d_box_triples, have_mapping,
+            min_length, d_partition_dim - 1, recurse_level + 1);
+      d_box_triples.setNull();
+   } else {
+      d_work.resizeArray(d_box_triples.size());
+   }
+
+   /*
+    * Recurse to build this node's left and right children.
+    */
+   if (!left.isNull()) {
+      d_left_child = new BoxTreeNode(dim,
+            left, have_mapping,
+            min_length, d_partition_dim - 1, recurse_level + 1);
+   }
+
+   if (!right.isNull()) {
+      d_right_child = new BoxTreeNode(dim,
+            right, have_mapping,
+            min_length, d_partition_dim - 1, recurse_level + 1);
+   }
+}
+
+/*
+ * ************************************************************************
+ *                                                                       *
+ * dtor
+ *                                                                       *
+ * ************************************************************************
+ */
+
+BoxTreeNode::~BoxTreeNode()
+{
+}
+
+/*
+ * ************************************************************************
+ *
+ *  Append to "indices" the indice of the boxes owned by this
+ *  node that intersect with "box."  Then recurse (1) for child
+ *  nodes; (2) for the tree rooted at this node.
+ *
+ * ************************************************************************
+ */
+
+void BoxTreeNode::findOverlapIndices(
+   tbox::List<int>& indices,
+   const Box& box,
+   bool find_local_boxes,
+   int recurse_level)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_domain, box);
+
+   if (box.intersects(d_domain)) {
+      if (d_tree) {
+         d_tree->findOverlapIndices(indices, box, find_local_boxes);
+      }
+      /*
+       * "d_work.isNull()" if the calling BoxTree was not passed processor
+       * mapping information.  The import is that all indices int d_box_triples
+       * are unique, so we don't need to check for duplicates.
+       */
+      else if (d_work.isNull()) {
+         int len = d_box_triples.size();
+
+         //case 1: only interested in local overlapping boxes
+         if (find_local_boxes) {
+            for (int i = 0; i < len; ++i) {
+               if (d_box_triples[i].owner == d_rank) {
+                  if (box.intersects(d_box_triples[i].box)) {
+                     indices.appendItem(d_box_triples[i].idx);
+                  }
+               }
+            }
+            //case 2: interested in all overlapping boxes
+         } else {
+            for (int i = 0; i < len; ++i) {
+               if (box.intersects(d_box_triples[i].box)) {
+                  indices.appendItem(d_box_triples[i].idx);
+               }
+            }
+         }
+      }
+      /*
+       * If there is a mapping, then it's possible that same index
+       * could be appended more than once, so extra care is required
+       * to guard against duplicate indices.
+       */
+      else {
+
+         int len = d_box_triples.size();
+         int idx = 0;
+
+         //case 1: only interested in local overlapping boxes
+         if (find_local_boxes) {
+            for (int i = 0; i < len; ++i) {
+               if (d_box_triples[i].owner == d_rank) {
+                  if (box.intersects(d_box_triples[i].box)) {
+                     d_work[idx++] = d_box_triples[i].idx;
+                  }
+               }
+            }
+            //case 2: interested in all overlapping boxes
+         } else {
+            for (int i = 0; i < len; ++i) {
+               if (box.intersects(d_box_triples[i].box)) {
+                  d_work[idx++] = d_box_triples[i].idx;
+               }
+            }
+         }
+
+         for (int j = 0; j < idx; ++j) {
+            indices.appendItem(d_work[j]);
+         }
+
+      }
+
+      if (d_left_child) {
+         d_left_child->findOverlapIndices(indices, box,
+            find_local_boxes, recurse_level + 1);
+      }
+
+      if (d_right_child) {
+         d_right_child->findOverlapIndices(indices, box,
+            find_local_boxes, recurse_level + 1);
+      }
+   }
+
+   /*
+    * check for and eliminate any duplicate indices that
+    * may have crept in during the recursive calls to
+    * left or right children.  Note: this really only needs
+    * to be done before exiting at the top recursion level.
+    */
+
+   int size = indices.size();
+   if (size > 1) {
+      tbox::Array<int> sortme(size);
+      int j = 0;
+      for (tbox::List<int>::Iterator l(indices); l; l++) {
+         sortme[j++] = l();
+      }
+
+      int* ptr = sortme.getPointer();
+      qsort((void *)ptr, size, sizeof(int),
+         hier::BoxGraphUtilities::qsortIntCompare);
+
+      indices.clearItems();
+      indices.appendItem(sortme[0]);
+      for (int k = 1; k < size; ++k) {
+         if (sortme[k] != sortme[k - 1]) {
+            indices.appendItem(sortme[k]);
+         }
+      }
+   }
+
+}
+
+void BoxTreeNode::findOverlapBoxes(
+   BoxList& overlap_boxes,
+   const Box& box)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_domain, box);
+
+   if (box.intersects(d_domain)) {
+      if (d_tree) {
+         d_tree->findOverlapBoxes(overlap_boxes, box);
+      } else {
+
+         int len = d_box_triples.size();
+         for (int i = 0; i < len; ++i) {
+            if (box.intersects(d_box_triples[i].box)) {
+               TBOX_DIM_ASSERT_CHECK_ARGS2(d_domain, d_box_triples[i].box);
+               overlap_boxes.appendItem(d_box_triples[i].box);
+            }
+         }
+      }
+
+      if (d_left_child) {
+         d_left_child->findOverlapBoxes(overlap_boxes, box);
+      }
+
+      if (d_right_child) {
+         d_right_child->findOverlapBoxes(overlap_boxes, box);
+      }
+   }
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoxTreeNode.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoxTreeNode.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,209 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Basic building block used by BoxTree class. 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BoxTreeNode
+#define included_hier_BoxTreeNode
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace hier {
+
+// TODO:  if this is supposed to be private, should it be nested in BoxTree?
+/*!
+ * @brief Building block used by BoxTree.
+ *
+ * This is a private class that is used by the BoxTree class;
+ * there is no reason that anyone should make direct use of this class.
+ */
+
+class BoxTreeNode:public tbox::DescribedClass
+{
+public:
+   /*!
+    * @brief Internal class to track a box and its owner
+    */
+   class Triple
+   {
+   public:
+      /*!
+       * @brief constructs an uninitialized Triple object
+       * with a specific dimensionality.
+       *
+       * @param[in] dim
+       */
+      explicit Triple(
+         const tbox::Dimension& dim):
+         box(dim),
+         idx(0),
+         owner(0)
+      {
+      }
+
+      Box box;
+      int idx;
+      int owner;
+   };
+
+   /*!
+    * @brief Constructs a BoxTreeNode that represents the 
+    * the bounding box that covers all boxes in @c box_triples.
+    *
+    * Constructs a BoxTreeNode that represents the bounding box 
+    * that covers all boxes in @c box_triples.  The \b dim parameter is
+    * the dimension along which the domain will be cut when
+    * constructing child nodes.
+    *
+    * @param[in] dim
+    * @param[in] box_triples input
+    * @param[in] have_mapping true if the calling BoxTree was passed a
+    *                     processor mapping.
+    * @param[in] min_length if \b box_triples contains less than \b min_length
+    *                   elements, then the list will never be partitioned
+    *                   amongst child nodes.  Setting to a larger value
+    *                   tends to decrease the total number of nodes in the tree
+    *                   (and hence reduces memory requirements), but increase
+    *                   the cost of findOverlappingBoxes.
+    * @param[in] partition_dim the dimension along which the domain will be cut
+    *            when constructing child nodes.
+    * @param[in] recurse_level is a counter that is used internally to
+    *        keep track of the recurse level.  Do not change the
+    *        default value.
+    */
+   explicit BoxTreeNode(
+      const tbox::Dimension& dim,
+      const tbox::Array<BoxTreeNode::Triple> box_triples,
+      bool have_mapping,
+      int min_length, // default was = 10,
+      int partition_dim, // default was = DIM-1,
+      int recurse_level = 0);
+
+   /*!
+    * @brief Destructor
+    */
+   ~BoxTreeNode();
+
+   /*!
+    * @brief Compute the box array indices of boxes that overlap the 
+    * given @c box.
+    *
+    * If @c find_local_boxes = false, then the array @c indices
+    * contains the indices of tall boxes (wrt the array of boxes passed
+    * to the constructor) that overlap with the specified @c box.
+    * If @c find_local_boxes = true, then only the indices of those boxes
+    * that overlap with the specified @c box and whose corresponding 
+    * patches are mapped to this process are returned.
+    *
+    * @param[in] indices the indices of the overlapping boxes.
+    * @param[in] box the specified box whose overlaps are requested.
+    * @param[in] find_local_boxes switch to determine if all overlapping
+    *        boxes are returned, or only those boxes that overlap
+    *        and are local to this processor.
+    * @param[in] recurse_level is a counter that is used internally to
+    *        keep track of the recurse level.  Do not change the
+    *        default value.
+    */
+   void
+   findOverlapIndices(
+      tbox::List<int>& indices,
+      const Box& box,
+      bool find_local_boxes,
+      int recurse_level = 0);
+
+   /*!
+    * @brief Create a list of all boxes that overlap the given @c box.
+    *
+    * @param[out] overlap_boxes boxlist containing boxes that overlap with box.
+    * @param[in] box the specified box whose overlaps are requested.
+    */
+   void
+   findOverlapBoxes(
+      BoxList& overlap_boxes,
+      const Box& box);
+
+   /*!
+    * @brief Counts the total number of nodes in all trees rooted at this
+    * node, and add this to the totals stored in BoxTree::s_node_count
+    * and BoxTree::s_box_count.
+    * This is a recursive call, i.e, all nodes in all subtrees
+    * rooted at this node are examined.
+    *
+    * This call is primarily of interest for gathering information
+    * on performance, during development and testing.
+    */
+   void
+   count();
+
+private:
+   /*!
+    * The copy ctor is not implemented.
+    */
+   BoxTreeNode(
+      const BoxTreeNode& box);
+
+   /*!
+    * The assignemnt operator is not implemented.
+    */
+   BoxTreeNode&
+   operator = (
+      const BoxTreeNode& box);
+
+   /*!
+    * The physical domain that this node represents.
+    */
+   Box d_domain;
+
+   /*!
+    * Pointers to familial nodes.
+    */
+   tbox::Pointer<BoxTreeNode> d_left_child;
+   tbox::Pointer<BoxTreeNode> d_right_child;
+
+   /*!
+    * The list of boxes, and their associated indices and processor
+    * mappings, that are contained within the physical domain that
+    * this node represents.
+    */
+   tbox::Array<Triple> d_box_triples;
+
+   /*!
+    * Working space that is used in findOverlapIndices
+    */
+   tbox::Array<int> d_work;
+
+   /*!
+    * The dimension along which the input box triples will be partitioned.
+    */
+   int d_partition_dim;
+
+   /*!
+    * A tree rooted at this node.  The tree is constructed
+    * from d_box_triples; these boxes are partitioned along dimension
+    * d_dim.getValue() - 1).
+    */
+   tbox::Pointer<BoxTreeNode> d_tree;
+
+   /*!
+    * This processor's rank.
+    */
+   int d_rank;
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoxUtilities.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoxUtilities.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1746 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Routines for processing boxes within a domain of index space. 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BoxUtilities_C
+#define included_hier_BoxUtilities_C
+
+#include "SAMRAI/hier/BoxUtilities.h"
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#include <stdlib.h>
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * This static private member function is called by findBadCutPoints(),  *
+ * and the findBadCutPointsForDirection() member functions.  It sets bad *
+ * cut points near the lower and upper ends of the border box in the     *
+ * given coordinate direction.                                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BoxUtilities::findBadCutPointsForBorderAndDirection(
+   const int id,
+   tbox::Array<bool>& bad_cuts,
+   const Box& box,
+   const Box& border,
+   const int bad_interval)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(box, border);
+
+   TBOX_ASSERT((0 <= id) && (id < box.getDim().getValue()));
+   TBOX_ASSERT(bad_cuts.getSize() == box.numberCells(id));
+   TBOX_ASSERT(bad_interval >= 0);
+
+   if (bad_interval > 0) {
+
+      const int ilo = box.lower(id);
+      const int ihi = box.upper(id);
+
+      int iclo, ichi, ic;
+
+      /*
+       * Set bad cut points near lower end of border box.
+       */
+      int mark = border.lower(id);
+      if (mark > (ilo - bad_interval)) {
+
+         iclo =
+            tbox::MathUtilities<int>::Max(ilo, (mark - bad_interval + 1)) - ilo;
+         ichi =
+            tbox::MathUtilities<int>::Min(ihi, (mark - 1)) - ilo + 1;
+         for (ic = iclo; ic < ichi; ic++) bad_cuts[ic] = true;
+
+         iclo =
+            tbox::MathUtilities<int>::Max(ilo, (mark + 1)) - ilo;
+         ichi =
+            tbox::MathUtilities<int>::Min(ihi,
+               (mark + bad_interval - 1)) - ilo + 1;
+         for (ic = iclo; ic < ichi; ic++) bad_cuts[ic] = true;
+
+      }
+
+      /*
+       * Set bad cut points near upper end of border box.
+       */
+      mark = border.upper(id) + 1;
+      if (mark < (ihi + bad_interval + 1)) {
+
+         iclo =
+            tbox::MathUtilities<int>::Max(ilo, (mark - bad_interval + 1)) - ilo;
+         ichi =
+            tbox::MathUtilities<int>::Min(ihi, (mark - 1)) - ilo + 1;
+         for (ic = iclo; ic < ichi; ic++) bad_cuts[ic] = true;
+
+         iclo =
+            tbox::MathUtilities<int>::Max(ilo, (mark + 1)) - ilo;
+         ichi =
+            tbox::MathUtilities<int>::Min(ihi,
+               (mark + bad_interval - 1)) - ilo + 1;
+         for (ic = iclo; ic < ichi; ic++) bad_cuts[ic] = true;
+
+      }
+
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Check min size, cut factor, and physical domain constraints for       *
+ * given box.  If a patch is generated from a box that violates any      *
+ * of these constraints, then some other routine (e.g., ghost cell       *
+ * filling, or inter-patch communication) may fail.  Thus, an error      *
+ * message will be generated describing the violation and the program    *
+ * will abort.                                                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BoxUtilities::checkBoxConstraints(
+   const Box& box,
+   const IntVector& min_size,
+   const IntVector& cut_factor,
+   const IntVector& bad_interval,
+   const BoxArray& physical_boxes)
+{
+
+   TBOX_DIM_ASSERT_CHECK_ARGS3(min_size, cut_factor, bad_interval);
+
+   TBOX_ASSERT(min_size > IntVector::getZero(min_size.getDim()));
+   TBOX_ASSERT(cut_factor > IntVector::getZero(min_size.getDim()));
+   TBOX_ASSERT(bad_interval >= IntVector::getZero(min_size.getDim()));
+
+   const tbox::Dimension& dim(box.getDim());
+
+   int id;
+
+   /*
+    * Test box against minimum size constraint.
+    */
+   tbox::Array<bool> min_is_bad(dim.getValue());
+   bool min_violation = false;
+   for (id = 0; id < dim.getValue(); id++) {
+      if (box.numberCells(id) < min_size(id)) {
+         min_is_bad[id] = true;
+         min_violation = true;
+      } else {
+         min_is_bad[id] = false;
+      }
+   }
+
+   if (min_violation) {
+      tbox::perr << "\nBox = " << box << " -- minimum size = " << min_size
+                 << std::endl;
+      for (id = 0; id < dim.getValue(); id++) {
+         if (min_is_bad[id]) {
+            tbox::perr << "min size violated in direction " << id << std::endl;
+         }
+      }
+      TBOX_ERROR("BoxUtilities::checkBoxConstraints() error:\n"
+         << "  Box violates minimum size restriction" << std::endl);
+   }
+
+   /*
+    * Test box against cut factor constraint.
+    */
+   tbox::Array<bool> factor_is_bad(dim.getValue());
+   bool factor_violation = false;
+   for (id = 0; id < dim.getValue(); id++) {
+      if ((box.numberCells(id) % cut_factor(id)) != 0) {
+         factor_is_bad[id] = true;
+         factor_violation = true;
+      } else {
+         factor_is_bad[id] = false;
+      }
+   }
+
+   if (factor_violation) {
+      tbox::perr << "\nBox = " << box << " -- cut factor = " << cut_factor
+                 << std::endl;
+      for (id = 0; id < dim.getValue(); id++) {
+         if (factor_is_bad[id]) {
+            tbox::perr << "factor bad in direction " << id << std::endl;
+         }
+      }
+      TBOX_ERROR("BoxUtilities::checkBoxConstraints() error:\n"
+         << "  Box violates cut factor restriction" << std::endl);
+   }
+
+   if (physical_boxes.getNumberOfBoxes() > 0) {
+
+      tbox::Array<bool> cut_is_bad(dim.getValue());
+      for (id = 0; id < dim.getValue(); id++) {
+         cut_is_bad[id] = false;
+      }
+
+      bool bad_cut_violation = false;
+
+      /*
+       * Test box for bad cut point violation.
+       */
+
+      Box test_border = box;
+      test_border.grow(bad_interval);
+
+      BoxList border_boxes(test_border);
+      border_boxes.removeIntersections(BoxList(physical_boxes));
+
+      if (!border_boxes.isEmpty()) {
+
+         /*
+          * Test individual box faces in each direction for bad cuts.
+          */
+
+         id = 0;
+         while ((id < dim.getValue()) && !bad_cut_violation) {
+
+            int blo = box.lower(id);
+            int bhi = box.upper(id);
+            int bad = bad_interval(id);
+
+            /*
+             * Test lower box face in single direction.
+             */
+
+            Box test_box = box;
+            test_box.grow(bad_interval);
+
+            test_box.upper(id) = box.lower(id) - 1;
+
+            BoxList test_boxes(test_box);
+            test_boxes.intersectBoxes(border_boxes);
+            test_boxes.simplifyBoxes();
+
+            BoxList::Iterator tb = test_boxes.listStart();
+            while (!bad_cut_violation && tb) {
+               if ((tb().lower(id) > (blo - bad))
+                   || (tb().upper(id) < (blo - 1))) {
+                  bad_cut_violation = true;
+                  cut_is_bad[id] = true;
+               }
+               tb++;
+            }
+
+            if (!bad_cut_violation) {
+
+               /*
+                * Test upper box face in single direction.
+                */
+
+               test_box = box;
+               test_box.grow(bad_interval);
+
+               test_box.lower(id) = box.upper(id) + 1;
+
+               test_boxes = BoxList(test_box);
+               test_boxes.intersectBoxes(border_boxes);
+               test_boxes.simplifyBoxes();
+
+               tb = test_boxes.listStart();
+               while (!bad_cut_violation && tb) {
+                  if ((tb().lower(id) > (bhi + 1))
+                      || (tb().upper(id) < (bhi + bad))) {
+                     bad_cut_violation = true;
+                     cut_is_bad[id] = true;
+                  }
+                  tb++;
+               }
+
+            }
+
+            id++;
+         }
+
+      }
+
+      if (bad_cut_violation) {
+
+         tbox::perr << "Box violates bad cut restriction in directions...";
+         for (id = 0; id < dim.getValue(); id++) {
+            if (cut_is_bad[id]) tbox::perr << "\n" << id;
+         }
+         tbox::perr << "\nBox = " << box << " -- bad cut interval = "
+                    << bad_interval << std::endl;
+         tbox::perr << "Physical domain boxes ... " << std::endl;
+         for (int ib = 0; ib < physical_boxes.getNumberOfBoxes(); ib++) {
+            tbox::perr << "Box # " << ib << " -- "
+            << physical_boxes[ib] << std::endl;
+         }
+         TBOX_ERROR("BoxUtilities::checkBoxConstraints() error:\n"
+            << "  Box violates bad cut restriction" << std::endl);
+      }
+
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Replace each box in the list that is too large with a list of         *
+ * nonoverlapping smaller boxes whose union covers the same region of    *
+ * index space as the original box.  The resulting boxes will obey the   *
+ * minimum size, and cut factor restrictions if the original box does.   *
+ * However, the maximum size restriction may be sacrified if the box     *
+ * cannot be chopped at appropriate points.                              *
+ *                                                                       *
+ * For each box in the list, we perform the following operations         *
+ *                                                                       *
+ *    (1) Determine a set of cut points for each coordinate direction.   *
+ *        The ideal cuts satisfy all min, max, and factor restrictions   *
+ *        assuming the box does too.                                     *
+ *                                                                       *
+ *    (2) If step (1) finds that the box may be chopped, we determine    *
+ *        the bad cut points for the box and adjust the original cut     *
+ *        points if necessary.  Note that this operation uses the        *
+ *        physical domain and the bad interval information.              *
+ *                                                                       *
+ *    (3) The box is chopped if this is still possible after (1) and (2).*
+ *                                                                       *
+ *    (4) If the box is chopped, set the box list to the resulting       *
+ *        boxes.  Otherwise, put the original box on the list.           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BoxUtilities::chopBoxes(
+   BoxList& boxes,
+   const IntVector& max_size,
+   const IntVector& min_size,
+   const IntVector& cut_factor,
+   const IntVector& bad_interval,
+   const BoxArray& physical_boxes)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS4(max_size, min_size, cut_factor, bad_interval);
+
+   TBOX_ASSERT(min_size > IntVector::getZero(min_size.getDim()));
+   TBOX_ASSERT(max_size >= min_size);
+   TBOX_ASSERT(cut_factor > IntVector::getZero(min_size.getDim()));
+   TBOX_ASSERT(bad_interval >= IntVector::getZero(min_size.getDim()));
+   TBOX_ASSERT(physical_boxes.getNumberOfBoxes() > 0);
+
+   const tbox::Dimension& dim(max_size.getDim());
+
+   BoxList in_boxes(boxes);
+   boxes.clearItems();
+
+   while (!in_boxes.isEmpty()) {
+
+      Box box = in_boxes.getFirstItem();
+      in_boxes.removeFirstItem();
+
+      BoxList tmp_boxes;
+
+      tbox::Array<tbox::List<int> > cut_points(dim.getValue());
+      bool chop_box = findBestCutPointsGivenMax(cut_points,
+            box,
+            max_size,
+            min_size,
+            cut_factor);
+
+      if (chop_box) {
+
+         for (int id = 0; id < dim.getValue(); id++) {
+
+            if (cut_points[id].getNumberOfItems() > 0) {
+
+               tbox::Array<bool> bad_cut_points;
+
+               findBadCutPointsForDirection(id,
+                  bad_cut_points,
+                  box,
+                  physical_boxes,
+                  bad_interval);
+               fixBadCutPointsForDirection(id,
+                  cut_points[id],
+                  bad_cut_points,
+                  box,
+                  min_size(id),
+                  cut_factor(id));
+
+            }
+
+         }
+
+         chopBox(tmp_boxes,
+            box,
+            cut_points);
+
+         boxes.catenateItems(tmp_boxes);
+
+      } else {
+
+         boxes.appendItem(box);
+
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Chop given box into a collection of boxes according to the collection *
+ * of cut points specified along each coordinate direction.   This box   *
+ * list is formed from the resulting boxes.                              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BoxUtilities::chopBox(
+   BoxList& boxes,
+   const Box& box,
+   const tbox::Array<tbox::List<int> > cut_points)
+{
+   const tbox::Dimension& dim(box.getDim());
+
+   TBOX_ASSERT(cut_points.getSize() == dim.getValue());
+
+   if (!box.empty()) {
+
+      boxes.clearItems();
+      boxes.appendItem(box);
+
+      BoxList tmp_boxes;
+      for (int id = 0; id < dim.getValue(); id++) {
+
+         tmp_boxes.clearItems();
+
+         while (!boxes.isEmpty()) {
+
+            Box chop_box = boxes.getFirstItem();
+            boxes.removeFirstItem();
+
+            TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, chop_box);
+
+            if (cut_points[id].getNumberOfItems() > 0) {
+
+               Index ilo = chop_box.lower();
+               Index ihi = chop_box.upper();
+               Index boxhi = chop_box.upper();
+
+               tbox::List<int>::Iterator cut = cut_points[id].listStart();
+#ifdef DEBUG_CHECK_ASSERTIONS
+               int last_cut = tbox::MathUtilities<int>::getMin();
+#endif
+               while (cut) {
+                  int cut_val = cut();
+#ifdef DEBUG_CHECK_ASSERTIONS
+                  TBOX_ASSERT(last_cut <= cut_val);
+                  last_cut = cut_val;
+#endif
+                  ihi(id) = cut_val - 1;
+                  if ((ilo(id) < cut_val) && (ihi(id) <= boxhi(id))) {
+                     Box new_box(ilo, ihi);
+                     tmp_boxes.appendItem(new_box);
+                     ilo(id) = cut_val;
+                  }
+                  cut++;
+               }
+
+               ihi(id) = chop_box.upper(id);
+               Box last_box(ilo, ihi);
+               tmp_boxes.appendItem(last_box);
+
+            } else {
+               tmp_boxes.appendItem(chop_box);
+            }
+
+         }
+
+         boxes = tmp_boxes;
+
+      }
+
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Test each box in this box list for its intersection with the physical *
+ * domain boundary when it is grown by the given ghost width.  If the    *
+ * ghost box lies entirely within the domain, or if all of its ghost     *
+ * cells intersect the domain boundary appropriately, then the box will  *
+ * not be changed.  Otherwise, the box is removed from the list and is   *
+ * replaced by a new box formed by growing the original box to boundary. *
+ * This process eliminates domain boundary intersections which are       *
+ * deemed unacceptable.  Intersections that are disallowed are those in  *
+ * which a portion of the domain boundary is parallel to a box face and  *
+ * lies strictly in the interior of the ghost cell mapped_box_level adjacent to     *
+ * that face.  In other words, we eliminate ghost cell regions residing  *
+ * outside of the domain and which are narrower than the ghost width.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool BoxUtilities::extendBoxesToDomainBoundary(
+   BoxList& boxes,
+   const BoxList& domain,
+   const IntVector& ext_ghosts)
+{
+   TBOX_ASSERT(!domain.isEmpty());
+   TBOX_ASSERT(ext_ghosts >= IntVector::getZero(ext_ghosts.getDim()));
+
+   bool out_val = false;
+
+   BoxList out_boxes;
+
+   while (!boxes.isEmpty()) {
+
+      Box try_box = boxes.getFirstItem();
+      boxes.removeFirstItem();
+
+      out_val = extendBoxToDomainBoundary(try_box, domain, ext_ghosts) ||
+         out_val;
+
+      out_boxes.appendItem(try_box);
+
+   }
+
+   boxes = out_boxes;
+
+   return out_val;
+}
+
+bool BoxUtilities::extendBoxToDomainBoundary(
+   Box& box,
+   const BoxList& domain,
+   const IntVector& ext_ghosts)
+{
+
+   TBOX_ASSERT(!domain.isEmpty());
+   TBOX_ASSERT(ext_ghosts >= IntVector::getZero(ext_ghosts.getDim()));
+
+   const tbox::Dimension& dim(box.getDim());
+
+   int id;
+   bool out_val = false;
+
+   if (!box.empty()) {
+
+      Box test_ghost_box = box;
+      test_ghost_box.grow(ext_ghosts);
+
+      BoxList outside_domain(test_ghost_box);
+      outside_domain.removeIntersections(domain);
+
+      if (!outside_domain.isEmpty()) {
+
+         for (id = 0; id < dim.getValue(); id++) {
+            BoxList outside_boxes;
+            BoxList::Iterator lb;
+
+            // Test whether lower end of ghost box extends outside domain
+            Box test_region = test_ghost_box;
+            test_region.upper(id) = box.lower(id) - 1;
+
+            outside_boxes = outside_domain;
+            outside_boxes.intersectBoxes(test_region);
+
+            int box_lo = box.lower(id);
+            for (lb = outside_boxes.listStart(); lb; lb++) {
+               box_lo = tbox::MathUtilities<int>::Min(box_lo, lb().upper(
+                        id) + 1);
+            }
+
+            // Test whether upper end of ghost box extends outside domain
+            test_region = test_ghost_box;
+            test_region.lower(id) = box.upper(id) + 1;
+
+            outside_boxes = outside_domain;
+            outside_boxes.intersectBoxes(test_region);
+
+            int box_hi = box.upper(id);
+            for (lb = outside_boxes.listStart(); lb; lb++) {
+               box_hi = tbox::MathUtilities<int>::Max(box_hi, lb().lower(
+                        id) - 1);
+            }
+
+            if (!out_val) {
+               out_val = ((box.lower(id) != box_lo) ||
+                          (box.upper(id) != box_hi));
+            }
+
+            // Adjust box dimensions as necessary
+            box.lower(id) = box_lo;
+            box.upper(id) = box_hi;
+
+         }
+
+      }
+
+   }
+
+   return out_val;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Grow each box in the list that is smaller than the specified minimum  *
+ * size.  Each box that is grown must remain within the union of the     *
+ * boxes of the given domain.  If the specified domain is an empty box   *
+ * list, then each box will be grown to be as large as the minimum size  *
+ * with no particular restrictions applied.  Note that this operation    *
+ * may produce overlap regions among boxes on the list in either case.   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BoxUtilities::growBoxesWithinDomain(
+   BoxList& boxes,
+   const BoxList& domain,
+   const IntVector& min_size)
+{
+   const tbox::Dimension& dim(min_size.getDim());
+
+   int id;
+
+   TBOX_ASSERT(min_size > IntVector::getZero(dim));
+
+   if (!boxes.isEmpty()) {
+
+      BoxList out_boxes;
+
+      BoxList outside_domain;
+      if (domain.isEmpty()) {
+         Box big_box(boxes.getBoundingBox());
+         big_box.grow(min_size);
+         outside_domain = BoxList(big_box);
+         outside_domain.grow(IntVector::getOne(dim));
+         outside_domain.removeIntersections(big_box);
+      } else {
+         outside_domain = domain;
+         outside_domain.grow(IntVector::getOne(dim));
+         outside_domain.removeIntersections(domain);
+      }
+
+      while (!boxes.isEmpty()) {
+
+         Box try_box = boxes.getFirstItem();
+         boxes.removeFirstItem();
+
+         for (id = 0; id < dim.getValue(); id++) {
+
+            int grow = min_size(id) - try_box.numberCells(id);
+
+            if (grow > 0) {
+
+               BoxList outside_boxes;
+               BoxList::Iterator lb;
+               Box test_region(dim);
+
+               // How far may box be grown within domain in lower direction?
+               test_region = try_box;
+               test_region.lower(id) -= grow;
+               test_region.upper(id) = try_box.lower(id) - 1;
+
+               outside_boxes = outside_domain;
+               outside_boxes.intersectBoxes(test_region);
+
+               int grow_lo = try_box.lower(id) - grow;
+               for (lb = outside_boxes.listStart(); lb; lb++) {
+                  grow_lo =
+                     tbox::MathUtilities<int>::Max(grow_lo, lb().upper(id) + 1);
+               }
+
+               // How far may box be grown within domain in upper direction?
+               test_region = try_box;
+               test_region.upper(id) += grow;
+               test_region.lower(id) = try_box.upper(id) + 1;
+
+               outside_boxes = outside_domain;
+               outside_boxes.intersectBoxes(test_region);
+
+               int grow_up = try_box.upper(id) + grow;
+               for (lb = outside_boxes.listStart(); lb; lb++) {
+                  grow_up =
+                     tbox::MathUtilities<int>::Min(grow_up, lb().lower(id) - 1);
+               }
+
+               // Adjust box dimensions as necessary
+               if ((grow_up - grow_lo + 1) < min_size(id)) {
+                  try_box.lower(id) = grow_lo;
+                  try_box.upper(id) = grow_up;
+               } else {
+                  int left = try_box.lower(id) - grow_lo;
+                  int right = grow_up - try_box.upper(id);
+                  int grow_half = grow / 2;
+
+                  if (left < right) {
+                     try_box.lower(id) -= ((left < grow_half) ? left
+                                           : grow_half);
+                     try_box.upper(id) = try_box.lower(id) + min_size(id) - 1;
+                  } else {
+                     try_box.upper(id) += ((right < grow_half) ? right
+                                           : grow_half);
+                     try_box.lower(id) = try_box.upper(id) - min_size(id) + 1;
+                  }
+               }
+
+            }
+
+         }
+
+         out_boxes.appendItem(try_box);
+
+      }
+
+      boxes = out_boxes;
+
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Grow each box in the list that is smaller than the specified minimum  *
+ * size.  Each box that is grown must remain within the union of the     *
+ * boxes of the given domain.  The domain is defined by the complement   *
+ * of the local portion of the domain.                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BoxUtilities::growBoxWithinDomain(
+   Box& box,
+   const BoxList& local_domain_complement,
+   const IntVector& min_size)
+{
+   const tbox::Dimension& dim(min_size.getDim());
+   int id;
+
+   TBOX_ASSERT(min_size > IntVector::getZero(dim));
+
+   Box try_box = box;
+
+   for (id = 0; id < dim.getValue(); id++) {
+
+      int grow = min_size(id) - try_box.numberCells(id);
+
+      if (grow > 0) {
+
+         BoxList outside_boxes;
+         BoxList::Iterator lb;
+         Box test_region(dim);
+
+         // How far may box be grown within domain in lower direction?
+         test_region = try_box;
+         test_region.lower(id) -= grow;
+         test_region.upper(id) = try_box.lower(id) - 1;
+
+         outside_boxes = local_domain_complement;
+         outside_boxes.intersectBoxes(test_region);
+
+         int grow_lo = try_box.lower(id) - grow;
+         for (lb = outside_boxes.listStart(); lb; lb++) {
+            grow_lo =
+               tbox::MathUtilities<int>::Max(grow_lo, lb().upper(id) + 1);
+         }
+
+         // How far may box be grown within domain in upper direction?
+         test_region = try_box;
+         test_region.upper(id) += grow;
+         test_region.lower(id) = try_box.upper(id) + 1;
+
+         outside_boxes = local_domain_complement;
+         outside_boxes.intersectBoxes(test_region);
+
+         int grow_up = try_box.upper(id) + grow;
+         for (lb = outside_boxes.listStart(); lb; lb++) {
+            grow_up =
+               tbox::MathUtilities<int>::Min(grow_up, lb().lower(id) - 1);
+         }
+
+         // Adjust box dimensions as necessary
+         if ((grow_up - grow_lo + 1) < min_size(id)) {
+            try_box.lower(id) = grow_lo;
+            try_box.upper(id) = grow_up;
+         } else {
+            int left = try_box.lower(id) - grow_lo;
+            int right = grow_up - try_box.upper(id);
+            int grow_half = grow / 2;
+
+            if (left < right) {
+               try_box.lower(id) -= ((left < grow_half) ? left
+                                     : grow_half);
+               try_box.upper(id) = try_box.lower(id) + min_size(id) - 1;
+            } else {
+               try_box.upper(id) += ((right < grow_half) ? right
+                                     : grow_half);
+               try_box.lower(id) = try_box.upper(id) - min_size(id) + 1;
+            }
+         }
+
+      }
+
+   }
+
+   box = try_box;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Determine whether this box can be chopped according to specified      *
+ * max, min, and factor constraints.  If the box may be chopped along    *
+ * any face, true is returned.  Otherwise, false is returned.  For those *
+ * directions along which the box may be chopped, the cut points are     *
+ * computed.  The procedure is as follows:                               *
+ *                                                                       *
+ *    (1) Determine which directions chopping is allowed.                *
+ *    (2) For each direction to chop, determine list of cut points.      *
+ *                                                                       *
+ * Important note: By convention, each integer cut point that is         *
+ * computed corresponds to the cell index to the right of cut point.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool BoxUtilities::findBestCutPointsGivenMax(
+   tbox::Array<tbox::List<int> >& cut_points,
+   const Box& box,
+   const IntVector& max_size,
+   const IntVector& min_size,
+   const IntVector& cut_factor)
+{
+   const tbox::Dimension& dim(max_size.getDim());
+
+   TBOX_DIM_ASSERT_CHECK_ARGS3(max_size, min_size, cut_factor);
+
+   TBOX_ASSERT(min_size > IntVector::getZero(dim));
+   TBOX_ASSERT(min_size <= max_size);
+   TBOX_ASSERT(cut_factor > IntVector::getZero(dim));
+
+   int id;
+   bool chop_ok = false;
+
+   cut_points.resizeArray(dim.getValue());
+
+   for (id = 0; id < dim.getValue(); id++) {
+      if (findBestCutPointsForDirectionGivenMax(id,
+             cut_points[id],
+             box,
+             max_size(id),
+             min_size(id),
+             cut_factor(id))) {
+         chop_ok = true;
+      }
+   }
+
+   return chop_ok;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Determine whether this box can be chopped according to specified      *
+ * max, min, and factor constraints along given coordinate direction.    *
+ * If the box may be chopped, true is returned; otherwise, false is      *
+ * returned.  The procedure for determining the cuts is as follows:      *
+ *                                                                       *
+ *    (1) Adjust min and max values so that they are integer             *
+ *        multiples of the cut factor.                                   *
+ *    (2) Determine number of boxes, min and max box widths.             *
+ *    (3) Determine list of cut points.                                  *
+ *                                                                       *
+ * Important note: By convention, each integer cut point that is         *
+ * computed corresponds to the cell index to the right of cut point.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool BoxUtilities::findBestCutPointsForDirectionGivenMax(
+   const int idir,
+   tbox::List<int>& cut_points,
+   const Box& box,
+   const int max_size,
+   const int min_size,
+   const int cut_factor)
+{
+   TBOX_ASSERT(!box.empty());
+   TBOX_ASSERT(min_size > 0);
+   TBOX_ASSERT(max_size >= min_size);
+   TBOX_ASSERT(cut_factor > 0);
+
+   cut_points.clearItems();
+
+   bool chop_ok = (((box.numberCells(idir) % cut_factor)
+                    || (box.numberCells(idir) <= max_size)
+                    || (box.numberCells(idir) < 2 * min_size))
+                   ? false : true);
+
+   if (chop_ok) {
+
+      int min = min_size;
+      int max = max_size;
+
+      chop_ok = false;
+
+      int len = box.numberCells(idir);
+
+      if (min % cut_factor) min = (min / cut_factor + 1) * cut_factor;
+      if (max % cut_factor) max = (max / cut_factor) * cut_factor;
+
+      /* make sure that max >= min.  In the case that
+       * max equals min, max is increased only if the len is
+       * not divisible by max.  This choice ensures that we
+       * choose cut points that satisfy the min constraint
+       * but possibly at the expense of breaking the max constraint.
+       */
+      if ((max < min) || ((max == min) && ((len % max) != 0))) {
+         max = tbox::MathUtilities<int>::Min(2 * min, len / 2);
+      }
+
+      int num_boxes = 1;
+      int max_width = min;
+      int num_wide_boxes = num_boxes;
+      int min_width = min;
+
+      num_boxes = (len - 1) / max + 1;
+      int len_remaining = len - num_boxes * min;
+
+      if (len_remaining > 0) {
+         int len_mult = len_remaining / cut_factor;
+         num_wide_boxes = len_mult % num_boxes;
+         if (num_wide_boxes != 0) {
+            max_width += (len_mult / num_boxes + 1) * cut_factor;
+            min_width = max_width - cut_factor;
+         } else {
+            max_width += (len_mult / num_boxes) * cut_factor;
+            num_wide_boxes = num_boxes;
+            min_width = 0;
+         }
+      }
+
+      if (num_boxes > 1) {
+         int mark = box.lower(idir);
+         int wide_count = 0;
+         for (int ic = 0; ic < num_boxes - 1; ic++) {
+            int width = ((wide_count < num_wide_boxes)
+                         ? max_width : min_width);
+            mark += width;
+            cut_points.appendItem(mark);
+            wide_count++;
+         }
+
+         chop_ok = true;
+      }
+
+   }
+
+   return chop_ok;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Determine whether this box may be chopped according to requested      *
+ * number of cuts along each side.  If the box may be chopped along any  *
+ * coordinate direction, true is returned.  Otherwise, false is          *
+ * returned.  For those directions along which the box may be chopped,   *
+ * the cut points are computed.  The procedure is as follows:            *
+ *                                                                       *
+ *    (1) Determine for which directions shopping is allowed.            *
+ *    (2) For each direction to chop, determine list of cut points.      *
+ *                                                                       *
+ * Important note: By convention, each integer cut point that is         *
+ * computed corresponds to the cell index to the right of cut point.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool BoxUtilities::findBestCutPointsGivenNumber(
+   tbox::Array<tbox::List<int> >& cut_points,
+   const Box& box,
+   const IntVector& number_boxes,
+   const IntVector& min_size,
+   const IntVector& cut_factor)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(number_boxes, min_size, cut_factor);
+
+   const tbox::Dimension& dim(number_boxes.getDim());
+
+   TBOX_ASSERT(!box.empty());
+   TBOX_ASSERT(min_size > IntVector::getZero(dim));
+   TBOX_ASSERT(number_boxes > IntVector::getZero(dim));
+   TBOX_ASSERT(cut_factor > IntVector::getZero(dim));
+
+   int id;
+
+   cut_points.resizeArray(dim.getValue());
+
+   tbox::Array<bool> chop_dir(dim.getValue());
+   for (id = 0; id < dim.getValue(); id++) {
+      cut_points[id].clearItems();
+      chop_dir[id] = (((number_boxes(id) <= 1)
+                       || (box.numberCells(id) % cut_factor(id))
+                       || (box.numberCells(id) < 2 * min_size(id))
+                       || (box.numberCells(id) <
+                           (number_boxes(id) * min_size(id))))
+                      ? false : true);
+   }
+
+   bool chop_ok = false;
+
+   for (id = 0; id < dim.getValue(); id++) {
+
+      if (chop_dir[id]) {
+
+         if (findBestCutPointsForDirectionGivenNumber(id,
+                cut_points[id],
+                box,
+                number_boxes(id),
+                min_size(id),
+                cut_factor(id))) {
+            chop_ok = true;
+         }
+
+      }
+
+   }
+
+   return chop_ok;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Determine whether this box may be chopped according to requested      *
+ * number of cuts along given direction.  If the box may be chopped,     *
+ * true is returned; otherwise, false is returned.  The procedure for    *
+ * determining the cuts is as follows:                                   *
+ *                                                                       *
+ *    (1) Adjust min value so that it is an integer multiple of          *
+ *        the cut factor.                                                *
+ *    (2) Determine number of boxes, min and max box widths.             *
+ *    (3) Determine list of cut points.                                  *
+ *                                                                       *
+ * Important note: By convention, each integer cut point that is         *
+ * computed corresponds to the cell index to the right of cut point.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool BoxUtilities::findBestCutPointsForDirectionGivenNumber(
+   const int idir,
+   tbox::List<int>& cut_points,
+   const Box& box,
+   const int num_boxes,
+   const int min_size,
+   const int cut_factor)
+{
+   TBOX_ASSERT(min_size > 0);
+   TBOX_ASSERT(num_boxes > 0);
+   TBOX_ASSERT(cut_factor > 0);
+
+   cut_points.clearItems();
+
+   bool chop_ok = (((num_boxes <= 1)
+                    || (box.numberCells(idir) % cut_factor)
+                    || (box.numberCells(idir) < 2 * min_size)
+                    || (box.numberCells(idir) < num_boxes * min_size))
+                   ? false : true);
+
+   if (chop_ok) {
+
+      chop_ok = false;
+
+      int len = box.numberCells(idir);
+      int min = min_size;
+
+      if (min % cut_factor) min = (min / cut_factor + 1) * cut_factor;
+
+      int max_width = min;
+      int num_wide_boxes = num_boxes;
+      int min_width = min;
+
+      int len_remaining = len - num_boxes * min;
+
+      if (len_remaining > 0) {
+         int len_mult = len_remaining / cut_factor;
+         num_wide_boxes = len_mult % num_boxes;
+         if (num_wide_boxes != 0) {
+            max_width += (len_mult / num_boxes + 1) * cut_factor;
+            min_width = max_width - cut_factor;
+         } else {
+            max_width += (len_mult / num_boxes) * cut_factor;
+            num_wide_boxes = num_boxes;
+            min_width = 0;
+         }
+      }
+
+      if (num_boxes > 1) {
+         int mark = box.lower(idir);
+         int wide_count = 0;
+         for (int ic = 0; ic < num_boxes - 1; ic++) {
+            int width = ((wide_count < num_wide_boxes)
+                         ? max_width : min_width);
+            mark += width;
+            cut_points.appendItem(mark);
+            wide_count++;
+         }
+
+         chop_ok = true;
+      }
+
+   }
+
+   return chop_ok;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true if the box may have bad cut points, potentially.          *
+ * Otherwise, return false.  Information about which directions may      *
+ * have bad cut points is returned in the integer vector.  An entry of   *
+ * zero indicates that there are no bad cut points for the box along     *
+ * that coordinate direction.  An entry of one indicates that there      *
+ * may be a bad cut point along that direction.
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool BoxUtilities::checkBoxForBadCutPoints(
+   IntVector& bad_cut_information,
+   const Box& box,
+   const BoxArray& physical_boxes,
+   const IntVector& bad_interval)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS4(bad_cut_information, box, physical_boxes,
+      bad_interval);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   bool found_bad = false;
+
+   int id;
+
+   bad_cut_information = IntVector::getZero(dim);
+   for (id = 0; id < dim.getValue(); id++) {
+      if (checkBoxForBadCutPointsInDirection(id,
+             box,
+             physical_boxes,
+             bad_interval)) {
+         bad_cut_information(id) = 1;
+         found_bad = true;
+      }
+   }
+
+   return found_bad;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true if the box may have bad cut points along the given        *
+ * coordinate direction, potentially.  Otherwise, return false.
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool BoxUtilities::checkBoxForBadCutPointsInDirection(
+   const int id,
+   const Box& box,
+   const BoxArray& physical_boxes,
+   const IntVector& bad_interval)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(box, physical_boxes, bad_interval);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   TBOX_ASSERT(!box.empty());
+   TBOX_ASSERT(bad_interval >= IntVector::getZero(dim));
+
+   bool found_bad = false;
+
+   if (physical_boxes.getNumberOfBoxes() > 0) {
+
+      BoxList level_interior(physical_boxes);
+
+      int bad = bad_interval(id);
+
+      int id2 = 0;
+      while ((id2 < dim.getValue()) && !found_bad) {
+         if (id2 != id) {
+
+            int blo = box.lower(id);
+            int bhi = box.upper(id);
+
+            /*
+             * Test lower box face in direction id2.
+             */
+
+            Box border = box;
+            border.grow(bad_interval);
+            border.upper(id2) = box.lower(id2) - 1;
+
+            BoxList border_boxes(border);
+            border_boxes.removeIntersections(level_interior);
+            border_boxes.simplifyBoxes();
+
+            BoxList::Iterator bb = border_boxes.listStart();
+            while (!found_bad && bb) {
+               found_bad = ((bb().lower(id) > (blo - bad))
+                            || (bb().upper(id) < (bhi + bad)));
+               bb++;
+            }
+
+            if (!found_bad) {
+
+               /*
+                * Test upper box face in direction id2.
+                */
+
+               border = box;
+               border.grow(bad_interval);
+               border.lower(id2) = box.upper(id2) + 1;
+
+               border_boxes.clearItems();
+               border_boxes.appendItem(border);
+               border_boxes.removeIntersections(level_interior);
+               border_boxes.simplifyBoxes();
+
+               bb = border_boxes.listStart();
+               while (!found_bad && bb) {
+                  found_bad = ((bb().lower(id) > (blo - bad))
+                               || (bb().upper(id) < (bhi + bad)));
+                  bb++;
+               }
+
+            }
+
+         }
+         id2++;
+      }
+
+   }
+   return found_bad;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Determine bad cut points for box based on the specified physical      *
+ * domain and bad interval.   The cut information is returned as an      *
+ * array (size = dim) of arrays (size = number of cells along edge      *
+ * of the box) of boolean values.  A value of false indicates a          *
+ * good cut point, a true value indicates that the cut is bad.           *
+ *                                                                       *
+ * Important notes: By convention, each integer cut point that is        *
+ * computed corresponds to the cell index to the right of cut point.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BoxUtilities::findBadCutPoints(
+   tbox::Array<tbox::Array<bool> >& bad_cuts,
+   const Box& box,
+   const BoxArray& physical_boxes,
+   const IntVector& bad_interval)
+{
+   const tbox::Dimension& dim(box.getDim());
+
+   TBOX_ASSERT(!box.empty());
+   TBOX_ASSERT(bad_cuts.getSize() == dim.getValue());
+
+   for (int id = 0; id < dim.getValue(); id++) {
+      findBadCutPointsForDirection(id,
+         bad_cuts[id],
+         box,
+         physical_boxes,
+         bad_interval);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Determine bad cut points for box for given coordinate direction       *
+ * based on the specified physical domain and bad interval.  The cut     *
+ * information is returned as an array of integer values (size = number  *
+ * of cells along edge of box.  A value of zero (0) indicates a good     *
+ * cut point, a non-zero value indicates that the cut is bad.  The       *
+ * process works as follows:                                             *
+ *                                                                       *
+ *    (1) Initialize all cut points to zero (zero = good).               *
+ *    (2) Determine bad cut points based on domain configuration.        *
+ *                                                                       *
+ * Important notes: By convention, each integer cut point that is        *
+ * computed corresponds to the cell index to the right of cut point.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BoxUtilities::findBadCutPointsForDirection(
+   const int id,
+   tbox::Array<bool>& bad_cuts,
+   const Box& box,
+   const BoxArray& physical_boxes,
+   const IntVector& bad_interval)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(box, physical_boxes, bad_interval);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   TBOX_ASSERT(!box.empty());
+   TBOX_ASSERT(bad_interval >= IntVector::getZero(dim));
+
+   int ic;
+
+   /*
+    * Initialize all bad cut points to false; i.e., all are good.
+    */
+   const int ncells = box.numberCells(id);
+   bad_cuts.resizeArray(ncells);
+   for (ic = 0; ic < ncells; ic++) {
+      bad_cuts[ic] = false;
+   }
+
+   if (physical_boxes.size() == 0) {
+      return; // Avoid the code below, which may crash for zero boxes.
+   }
+
+   /*
+    * Determine whether box intersects physical boundary in such a way
+    * that a bad cut point may result when the box is grown by the bad
+    * interval.  To determine bad cut points for direction i, the box
+    * must be intersected against the domain exterior in each directions
+    * j not equal to i.  First, we check the lower end of box in direction j.
+    * Then, we check the upper end of the box in direction j.  In each case,
+    * the bad cut points are generated by considering each region that
+    * intersects the domain exterior.
+    */
+
+   BoxList level_interior(physical_boxes);
+   Box level_bounding_box = level_interior.getBoundingBox();
+
+   for (int id2 = 0; id2 < dim.getValue(); id2++) {
+
+      if (((dim.getValue() == 1) && id2 == id) || ((dim.getValue() != 1) && (id2 != id))) {
+         /*
+          * Test lower box face in direction id2.
+          */
+
+         Box border = box;
+         border.grow(bad_interval);
+         border.upper(id2) = box.lower(id2) - 1;
+
+         /*
+          * limit the width of the border box to the width of the
+          * domain to ensure that bad cut points near the boundary
+          * of the box are not missed.
+          */
+         border.upper(id) = level_bounding_box.upper(id);
+         border.lower(id) = level_bounding_box.lower(id);
+
+         BoxList border_boxes(border);
+
+         if (dim.getValue() > 1) {
+            /*
+             * only remove the level interior if the dimensionality of
+             * the problem is greater than 1.
+             */
+            border_boxes.removeIntersections(level_interior);
+         }
+
+         if (!border_boxes.isEmpty()) {
+            border_boxes.simplifyBoxes();
+
+            for (BoxList::Iterator bbox(border_boxes); bbox; bbox++) {
+               findBadCutPointsForBorderAndDirection(id,
+                  bad_cuts,
+                  box,
+                  bbox(),
+                  bad_interval(id));
+            }
+         }
+
+         /*
+          * Test upper box face in direction id2.
+          */
+
+         border = box;
+         border.grow(bad_interval);
+         border.lower(id2) = box.upper(id2) + 1;
+
+         /*
+          * limit the width of the border box to the width of the
+          * domain to ensure that bad cut points near the boundary
+          * of the box are not missed.
+          */
+         border.upper(id) = level_bounding_box.upper(id);
+         border.lower(id) = level_bounding_box.lower(id);
+
+         border_boxes.clearItems();
+         border_boxes.appendItem(border);
+
+         if (dim.getValue() > 1) {
+            /*
+             * only remove the level interior if the dimensionality of
+             * the problem is greater than 1.
+             */
+            border_boxes.removeIntersections(level_interior);
+         }
+
+         if (!border_boxes.isEmpty()) {
+            border_boxes.simplifyBoxes();
+            for (BoxList::Iterator bbox(border_boxes); bbox; bbox++) {
+               findBadCutPointsForBorderAndDirection(id,
+                  bad_cuts,
+                  box,
+                  bbox(),
+                  bad_interval(id));
+            }
+         }
+
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Adjust cut points if they coincide with bad cut points.               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BoxUtilities::fixBadCutPoints(
+   tbox::Array<tbox::List<int> >& cuts,
+   const tbox::Array<tbox::Array<bool> >& bad_cuts,
+   const Box& box,
+   const IntVector& min_size,
+   const IntVector& cut_factor)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(box, min_size, cut_factor);
+
+   const tbox::Dimension& dim(box.getDim());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(cuts.getSize() == dim.getValue());
+   TBOX_ASSERT(bad_cuts.getSize() == dim.getValue());
+   bool bad_cuts_ok = true;
+   for (int id = 0; id < dim.getValue(); id++) {
+      bad_cuts_ok = bad_cuts_ok &&
+         (bad_cuts[id].getSize() == box.numberCells(id));
+   }
+   TBOX_ASSERT(bad_cuts_ok);
+   TBOX_ASSERT(!box.empty());
+   TBOX_ASSERT(min_size > IntVector::getZero(dim));
+   TBOX_ASSERT(cut_factor > IntVector::getZero(dim));
+#endif
+
+   for (int id = 0; id < dim.getValue(); id++) {
+      fixBadCutPointsForDirection(id,
+         cuts[id],
+         bad_cuts[id],
+         box,
+         min_size(id),
+         cut_factor(id));
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * For specified coordinate direction, adjust cut points if they         *
+ * coincide with bad cut points.  This routine processes cut points      *
+ * from the beginning of the list and the end of the list simultaneously.*
+ * When a bad cut is found when processing from the list beginning,      *
+ * a good cut point is searched for by moving toward the lower end of    *
+ * the box.  The opposite holds when processing from list end.  The      *
+ * In either case, a new cut point will be inserted in the list if one   *
+ * is found.  Otherwise, there will be one less cut point along the box  *
+ * side.  This routine may be made more robust in the future.            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BoxUtilities::fixBadCutPointsForDirection(
+   const int id,
+   tbox::List<int>& cuts,
+   const tbox::Array<bool>& bad_cuts,
+   const Box& box,
+   const int min_in,
+   const int fact)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   tbox::List<int>::Iterator cut = cuts.listStart();
+   TBOX_ASSERT(bad_cuts.getSize() == box.numberCells(id));
+   bool cuts_strictly_increase = true;
+   if (cut) {
+      int prev = cut();
+      cut++;
+      while (cut && cuts_strictly_increase) {
+         if (cut() <= prev) cuts_strictly_increase = false;
+         prev = cut();
+         cut++;
+      }
+   }
+   TBOX_ASSERT(cuts_strictly_increase);
+   TBOX_ASSERT(!box.empty());
+   TBOX_ASSERT(min_in > 0);
+   TBOX_ASSERT(fact > 0);
+   bool cuts_satisfy_factor = true;
+   cut = cuts.listStart();
+   while (cut && cuts_satisfy_factor) {
+      if (((cut() - box.lower(id)) % fact) != 0) cuts_satisfy_factor = false;
+      cut++;
+   }
+   TBOX_ASSERT(cuts_satisfy_factor);
+#endif
+
+   /*
+    * Do a quick check to see whether there are any bad cut points for
+    * the box in the specified coordinate direction.  If not, we are done.
+    */
+   bool bad_point_exists = false;
+   const int ncells = box.numberCells(id);
+   for (int ic = 0; ic < ncells; ic++) {
+      if (bad_cuts[ic]) bad_point_exists = true;
+   }
+
+   if (bad_point_exists) {
+
+      tbox::List<int>::Iterator cutlo = cuts.listStart();
+
+      if (cutlo) {
+
+         int min = min_in;
+
+         if (min % fact) min = (min / fact + 1) * fact;
+
+         const int offset = box.lower(id);
+         const int ilo = box.lower(id);
+         const int ihi = box.upper(id) + 1;
+
+         tbox::List<int>::Iterator cuthi = cuts.listEnd();
+
+         while (cutlo && cuthi && (cutlo() <= cuthi())) {
+
+            int bad_cut_val, below, above, try_cut;
+            tbox::List<int>::Iterator tmplo;
+            tbox::List<int>::Iterator tmphi;
+
+            if (cutlo == cuthi) {
+
+               if (bad_cuts[cutlo() - offset]) {
+
+                  bool found_good_cut = false;
+
+                  bad_cut_val = cutlo();
+                  tmplo = cutlo;
+                  tmphi = cutlo;
+                  tmplo--;
+                  tmphi++;
+                  cuts.removeItem(cutlo);
+
+                  below = (tmplo ? tmplo() : ilo);
+
+                  try_cut = bad_cut_val - fact;
+                  while ((try_cut >= (below + min))
+                         && bad_cuts[try_cut - offset]) {
+                     try_cut -= fact;
+                  }
+
+                  if (try_cut >= (below + min)) {
+                     found_good_cut = true;
+                     if (tmplo) {
+                        cuts.addItemAfter(tmplo, try_cut);
+                        cutlo = tmplo;
+                        cutlo++;
+                     } else {
+                        cuts.addItem(try_cut);
+                        cutlo = cuts.listStart();
+                     }
+                     cutlo++;
+                  } else {
+                     cutlo = tmphi;
+                  }
+
+                  if (!found_good_cut) {
+                     above = (tmphi ? tmphi() : ihi);
+
+                     try_cut = bad_cut_val + fact;
+                     while ((try_cut <= (above - min))
+                            && bad_cuts[try_cut - offset]) {
+                        try_cut += fact;
+                     }
+
+                     if (try_cut <= (above - min)) {
+                        if (tmphi) {
+                           cuts.addItemBefore(tmphi, try_cut);
+                           cuthi = tmphi;
+                           cuthi--;
+                        } else {
+                           cuts.appendItem(try_cut);
+                           cuthi = cuts.listEnd();
+                        }
+                        cuthi--;
+                     } else {
+                        cuthi = tmplo;
+                     }
+                  }
+
+               } else {
+                  cutlo++;
+                  cuthi--;
+               }
+
+            } else {
+
+               if (bad_cuts[cutlo() - offset]) {
+
+                  bad_cut_val = cutlo();
+                  tmplo = cutlo;
+                  tmplo--;
+                  cuts.removeItem(cutlo);
+
+                  below = (tmplo ? tmplo() : ilo);
+
+                  try_cut = bad_cut_val - fact;
+                  while ((try_cut >= (below + min))
+                         && bad_cuts[try_cut - offset]) {
+                     try_cut -= fact;
+                  }
+
+                  if (try_cut >= (below + min)) {
+                     if (tmplo) {
+                        cuts.addItemAfter(tmplo, try_cut);
+                        cutlo = tmplo;
+                        cutlo++;
+                     } else {
+                        cuts.addItem(try_cut);
+                        cutlo = cuts.listStart();
+                     }
+                     cutlo++;
+                  } else {
+                     if (tmplo) {
+                        cutlo = tmplo;
+                        cutlo++;
+                     } else {
+                        cutlo = cuts.listStart();
+                     }
+                  }
+
+               } else {
+                  cutlo++;
+               }
+
+               if (bad_cuts[cuthi() - offset]) {
+
+                  bad_cut_val = cuthi();
+                  tmphi = cuthi;
+                  tmphi++;
+                  cuts.removeItem(cuthi);
+
+                  above = (tmphi ? tmphi() : ihi);
+
+                  try_cut = bad_cut_val + fact;
+                  while ((try_cut <= (above - min))
+                         && bad_cuts[try_cut - offset]) {
+                     try_cut += fact;
+                  }
+
+                  if (try_cut <= (above - min)) {
+                     if (tmphi) {
+                        cuts.addItemBefore(tmphi, try_cut);
+                        cuthi = tmphi;
+                        cuthi--;
+                     } else {
+                        cuts.appendItem(try_cut);
+                        cuthi = cuts.listEnd();
+                     }
+                     cuthi--;
+                  } else {
+                     if (tmphi) {
+                        cuthi = tmphi;
+                        cuthi--;
+                     } else {
+                        cuthi = cuts.listEnd();
+                     }
+                  }
+
+               } else {
+                  cuthi--;
+               }
+
+            }
+
+         }
+
+      }
+
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Decompose each box in this box array into a list of non overlapping   *
+ * boxes.  Moreover, the regions of index space formed by composing the  *
+ * union of boxes on each box list are mutually disjoint.                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BoxUtilities::makeNonOverlappingBoxLists(
+   tbox::Array<BoxList>& box_list_array,
+   const BoxArray& boxes)
+{
+   const int nb = boxes.getNumberOfBoxes();
+
+   for (int i = 0; i < box_list_array.getSize(); i++) {
+      box_list_array[i].clearItems();
+   }
+
+   box_list_array.resizeArray(nb, hier::BoxList());
+
+   // Copy boxes into a list to preserve the original box array.
+   BoxList box_list(boxes);
+
+   // Remove portion of index space represented by array box from list.
+   // Keep unique pieces on box list.
+   for (int ib = 0; ib < nb; ib++) {
+      Box remove = boxes[ib];
+
+      for (tbox::List<Box>::Iterator l(box_list); l; l++) {
+         Box intersection = remove * l();
+         if (intersection == l()) {
+            box_list_array[ib].appendItem(l());
+         }
+      }
+      box_list_array[ib].coalesceBoxes();
+
+      box_list.removeIntersections(remove);
+   }
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/BoxUtilities.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/BoxUtilities.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,923 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Routines for processing boxes within a domain of index space. 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_BoxUtilities
+#define included_hier_BoxUtilities
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/List.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/**
+ * Class BoxUtilities provides several utility routines for processing
+ * boxes or collections of boxes.  Many of these operations require
+ * information about the location of the input boxes within some region of
+ * index space (domain) or are used to compute this sort of information.
+ * Often these routines are used in load balancing and communication routines
+ * to determine the relationship of a box or set of boxes to some domain
+ * boundary, where the domain is specified by a list of box regions.
+ *
+ * The following provides an explanation some of the concepts
+ * common to many of the functions in this class.
+ *
+ *     - \b cut point
+ *
+ *        A cut point for a coordinate direction is an integer that
+ *        specifies the index value of the cell immediately to the
+ *        right of the boundary along which a box will be cut.  For
+ *        instance, if we have a cut point value of 12 in the y-coordinate
+ *        direction for box [(0,0,0), (5,15,10)], then the box
+ *        will be cut into [(0,0,0),(5,11,10)] and [(0,12,0),(5,15,10)].
+ *        That is, the box has been cut along the boundary between
+ *        the y = 11 and y = 12 cells.
+ *
+ *     - \b bad cut point
+ *        If a box is cut at a "bad cut point", the resulting boxes
+ *        will violate some of the box constraints. For example, a
+ *        cut point that does not satify the cut factor restriction
+ *        or violates the bad_interval constraint (see below)
+ *        is a bad cut point.
+ *
+ *     - \b irregular boundary
+ *        An irregular boundary results when the domain cannot be
+ *        described by a single box and the domain is non-convex.
+ *
+ *
+ * The following provides an explanation some of the arguments
+ * common to many of the functions in this class.
+ *
+ *    - \b min_size
+ *       min_size is a IntVector that specifies the minimum
+ *       allowable box length in each dimension.  For example, if
+ *       min_size = (10,4,15), then the minimum box length in the
+ *       x, y, and z dimensions are 10, 4, and 15 respectively.
+ *
+ *    - \b max_size
+ *       max_size is a IntVector that specifies the maximum
+ *       allowable box length in each dimension.  For example, if
+ *       max_size = (10,40,50), then the maximum box length in the
+ *       x, y, and z dimensions are 10, 40, and 50 respectively.
+ *
+ *       It should be noted that the max_size constraint has lower
+ *       priority than the other constraints.  In instances where
+ *       all constraints cannot be simultaneously satisfied, the max_size
+ *       constraint is sacrificed.
+ *
+ *    - \b cut_factor
+ *       cut_factor is a IntVector that constrains the
+ *       dimensions of a box to be multiples of the components of the
+ *       cut_factor.  For instance, if cut_factor = (2,4,5), then the
+ *       x, y, and z dimensions of a 8 box that satisfies the cut_factor
+ *       constraint would be multiples of 2, 4, and 5 respectively.
+ *
+ *       This constraint is usually enforced with the cut_factor equal
+ *       to a multiple of the refinement ratio between levels to ensure
+ *       that if the box is coarsened, the resulting box is aligned with
+ *       the coarse grid (it is assumed that the boundary of the fine box
+ *       is aligned with a coarse cell boundary).
+ *
+ *    - \b bad_interval
+ *       bad_interval is a IntVector that limits the distance
+ *       a box can be from the boundary of the box list domain so that
+ *       the outer boundaries of the box and the box list domain which are
+ *       perpendicular to the i-th direction are no closer than the i-th
+ *       component of bad_interval.  Another way to think of this is that
+ *       the boundary of the box list domain in the i-th direction is not
+ *       allowed to lie strictly within the interior of the box after
+ *       it has been grown in the i-th direction by the i-th component
+ *       of bad_interval.  For example, if bad_interval = (2,3,4), then
+ *       the x, y, and z boundaries of the box must be at least 2, 3, and
+ *       4 cells away from the x, y, and z boundaries of the box list
+ *       domain.
+ *
+ *       The bad_interval constraint is enforced to avoid the situation
+ *       where the ghost region for a box resides partially inside and
+ *       partially outside the box list domain which complicates ghost
+ *       cell filling.  In addition, this constraint avoids complicated
+ *       issues with respect to the numerical accuracy of the solution.
+ *
+ *       Typically, bad_interval is based on the maximum ghost cell
+ *       width over all patch data objects and some coarsen ratio.
+ *
+ *
+ * Note that all member functions of this class are static.  The main intent
+ * of the class is to group the functions into one name space.  Thus, you
+ * should never attempt to instantiate a class of type BoxUtilities;
+ * simply call the functions as static functions; e.g.,
+ * BoxUtilities::function(...).  These routines are placed here rather
+ * than in the box, box list, box array classes to avoid circular dependencies
+ * among these classes.
+ *
+ * @see hier::Box
+ * @see hier::BoxArray
+ * @see hier::BoxList
+ */
+
+struct BoxUtilities {
+   /**
+    * Check the given box for violation of minimum size, cut factor,
+    * and box list domain constraints.  If a patch is generated from a box
+    * that violates any of these constraints, then some other routine
+    * (e.g., ghost cell filling, or inter-patch communication) may fail.
+    * Thus, this routine prints an error message describing the violation and
+    * executes a program abort.
+    *
+    * Arguments:
+    *
+    *    - \b box (input)
+    *       box whose constraints are to be checked
+    *
+    *    - \b min_size (input)
+    *       minimum allowed box size.  See class header for further
+    *       description.
+    *
+    *    - \b cut_factor (input)
+    *       See class header for description.
+    *
+    *    - \b bad_interval (input)
+    *       See class header for description.
+    *
+    *       If there is no constraint on the box location within
+    *       the box list domain, pass in an empty box array for the
+    *       physical_boxes argument.
+    *
+    *    - \b physical_boxes (input)
+    *       box array representing the index space of box list domain
+    *
+    *
+    * Assertion checks:
+    *
+    *    - all components of min_size and bad_interval must be nonnegative
+    *
+    *    - all components of cut_factor must be positive
+    *
+    */
+   static void
+   checkBoxConstraints(
+      const Box& box,
+      const IntVector& min_size,
+      const IntVector& cut_factor,
+      const IntVector& bad_interval,
+      const BoxArray& physical_boxes);
+
+   /**
+    * Replace each box in the list that is too large with a list of non-
+    * overlapping smaller boxes whose union covers the same region of
+    * index space as the original box.
+    *
+    * Arguments:
+    *
+    *    - \b boxes (input)
+    *       list of boxes to be chopped
+    *
+    *    - \b max_size (input)
+    *       maximum allowed box size.  See class header for further
+    *       description.
+    *
+    *    - \b min_size (input)
+    *       minimum allowed box size.  See class header for further
+    *       description.
+    *
+    *    - \b cut_factor (input)
+    *       See class header for description.
+    *
+    *    - \b bad_interval (input)
+    *       See class header for description.
+    *
+    *    - \b physical_boxes (input)
+    *       box array representing the index space of box list domain
+    *
+    *
+    * Notes:
+    *
+    *    - The resulting boxes will obey the minimum size and cut factor
+    *      restrictions if the each of the original boxes does.
+    *
+    *    - Any box with side length not equal to a multiple of the
+    *      cut factor for that direction, will not be chopped along that
+    *      direction.
+    *
+    *    - The maximum size restriction may be sacrificed if the box
+    *      cannot be chopped at appropriate points.  However, this is
+    *      generally the case only when the box is adjacent to the
+    *      box list domain boundary and an irregular boundary configuration
+    *      restricts the cut locations or if the maximum size is not a
+    *      multiple of the cut factor.
+    *
+    */
+   static void
+   chopBoxes(
+      BoxList& boxes,
+      const IntVector& max_size,
+      const IntVector& min_size,
+      const IntVector& cut_factor,
+      const IntVector& bad_interval,
+      const BoxArray& physical_boxes);
+
+   /**
+    * Chop the box into a collection of boxes according to the collection
+    * of cut points specified along each coordinate direction.  Cut points
+    * that do not reside within the range of box indices are ignored.
+    *
+    * Arguments:
+    *
+    *    - \b boxes (output)
+    *       list of boxes into which the "box" argument was chopped
+    *
+    *    - \b box (input)
+    *       box which is to be chopped
+    *
+    *    - \b cut_points (input)
+    *       cut_points is an array of integer lists, each of which
+    *       indicates the indices where the box will be cut in one of
+    *       the coordinate directions
+    *
+    *
+    * Assertion checks:
+    *
+    *    - The cut point array must have size equal to the number of
+    *      spatial dimensions for the box.
+    *
+    *    - The cut points for each direction must be on the list in
+    *      increasing order.
+    *
+    *
+    * Notes:
+    *
+    *    - The "boxes" BoxList is cleared before any box
+    *      operations are performed.  Thus, any boxes on the list when
+    *      the function is called will be lost.
+    *
+    */
+   static void
+   chopBox(
+      BoxList& boxes,
+      const Box& box,
+      const tbox::Array<tbox::List<int> > cut_points);
+
+   /**
+    * Extend the box in the list to domain boundary as needed so that
+    * the domain boundary does not intersect the ghost cell region around
+    * the box in an inappropriate manner.  Intersections that are
+    * disallowed are those in which a portion of the domain boundary is
+    * parallel to a box face and lies strictly in the interior of the ghost
+    * cell mapped_box_level adjacent to that face.  In other words, we eliminate
+    * ghost cell regions residing outside of a given domain and which are
+    * narrower than the specified ghost width.   The boolean return value
+    * is true if the input box was extended to the boundary and thus
+    * is changed by the routine.  Otherwise, the return value is false.
+    *
+    * See description of bad_interval in the class header comments for
+    * more details.
+    *
+    * Arguments:
+    *
+    *    - \b box (input/ouput)
+    *       box to be extended
+    *
+    *    - \b domain (input)
+    *       some domain whose interior is the union of boxes in a list
+    *
+    *    - \b ext_ghosts (input)
+    *       IntVector that specifies the size of the desired
+    *       ghost cell region
+    *
+    *
+    * Assertion checks:
+    *
+    *    - domain must not be an empty boxlist.
+    *
+    *    - All components of ext_ghosts must be nonnegative.
+    *
+    *
+    * Notes:
+    *
+    *    - The ext_ghosts argument often corresponds to the bad_interval
+    *      argument in many of the other functions in class.
+    *
+    *    - This operation may produce overlap regions among boxes on the
+    *      list.
+    *
+    *    - There exist some bizarre domain configurations for which it is
+    *      impossible to grow a box to the boundary and eliminate bad
+    *      ghost region intersections.  This routine will extend each box as
+    *      far as it can, but will not remedy these degenerate situations
+    *      in general.
+    *
+    */
+   static bool
+   extendBoxToDomainBoundary(
+      Box& box,
+      const BoxList& domain,
+      const IntVector& ext_ghosts);
+
+   /**
+    * Same function as extendBoxToDomainBoundary() above except that it
+    * extends each box in a list of boxes to the domain boundary specified
+    * by the box list argument as needed.  The boolean return value
+    * is true if any box in the input box list was extended to the boundary
+    * and thus is changed by the routine.  Otherwise, the return value
+    * is false.
+    */
+   static bool
+   extendBoxesToDomainBoundary(
+      BoxList& boxes,
+      const BoxList& domain,
+      const IntVector& ext_ghosts);
+
+   /**
+    * Grow each box in the list that is smaller than the specified minimum
+    * size.
+    *
+    * Arguments:
+    *
+    *    - \b boxes (input/output)
+    *       list of boxes to be grown to satisfy the min_size constraint
+    *
+    *    - \b domain (input)
+    *       list of boxes whose union is some domain
+    *
+    *    - \b min_size (input)
+    *       minimum allowed box size.  See class header for further
+    *       description.
+    *
+    *
+    * Assertion checks:
+    *
+    *    - The minimum box size argument must have all nonnegative entries.
+    *
+    *
+    * Notes:
+    *
+    *    - Each box that is grown must remain within the union of the
+    *      boxes of the given domain.
+    *
+    *    - If the specified domain is an empty box list, then each box
+    *      will be grown to be as large as the minimum size with no
+    *      particular restrictions applied.
+    *
+    *    - This operation may produce overlap regions among boxes on list
+    *
+    *    - There exist some bizarre domain configurations for which it is
+    *      impossible to grow a box sufficiently within the domain.
+    *
+    *      For instance if the domain is given by
+    *      [(0,0),(2,10)], [(0,3),(1,4)], [(0,5),(10,10)]
+    *      and the box is given by [(4,1),(6,2)] with a minimum size
+    *      of (4,4), there is no way the box can be grown to the minimum
+    *      size without have to "cross" the gap in the box list domain.
+    *
+    *      This routine will grow each box as far as it can, but will not
+    *      remedy these situations, generally.
+    */
+   static void
+   growBoxesWithinDomain(
+      BoxList& boxes,
+      const BoxList& domain,
+      const IntVector& min_size);
+
+   /*
+    * Similar to growBoxesWithinDomain but works on one box at
+    * a time and the domain is defined by the complement of local
+    * parts of the domain.
+    */
+   static void
+   growBoxWithinDomain(
+      Box& box,
+      const BoxList& local_domain_complement,
+      const IntVector& min_size);
+
+   /**
+    * Determine whether the box may be chopped according to specified
+    * min_size, max_size and cut_factor constraints.  For those
+    * directions along which the box may be chopped, the cut points are
+    * computed.  The cut points for the j-th coordinate direction are
+    * placed into a list of integers corresponding to the j-th component
+    * of the cut_point array.
+    *
+    * Return value:
+    *
+    *    - true is returned if the box may be chopped along any
+    *      coordinate direction.  Otherwise, false is returned.
+    *
+    * Arguments:
+    *
+    *    - \b cut_points (output)
+    *       array of list of cut points for the box
+    *
+    *    - \b box (input)
+    *       box to be cut
+    *
+    *    - \b max_size(input)
+    *       minimum allowed box size.  See class header for further
+    *       description.
+    *
+    *    - \b min_size(input)
+    *       minimum allowed box size.  See class header for further
+    *       description.
+    *
+    *    - \b cut_factor(input)
+    *       See class header for description.
+    *
+    *
+    * Assertion checks:
+    *
+    *    - all components of min_size must be nonnegative
+    *
+    *    - all components of max_size and cut_factor must be positive
+    *
+    *    - for each i between 0 and (dim-1), the i-th component of
+    *      min_size must be less than or equal to the i-th component
+    *      of max_size
+    *
+    */
+   static bool
+   findBestCutPointsGivenMax(
+      tbox::Array<tbox::List<int> >& cut_points,
+      const Box& box,
+      const IntVector& max_size,
+      const IntVector& min_size,
+      const IntVector& cut_factor);
+
+   /**
+    * Determine whether the box may be chopped according to specified
+    * min_size, max_size and cut_factor constraints along given
+    * coordinate direction.  If the box may be chopped, the cut points
+    * are computed and placed into a list of integers.
+    *
+    * Return value:
+    *
+    *    - true is returned if the box may be chopped along the specified
+    *      coordinate direction.  Otherwise, false is returned.
+    *
+    * Arguments:
+    *
+    *    - \b idir (input)
+    *       coordinate direction along which cut points will be computed
+    *
+    *    - \b cut_points (output)
+    *       list of cut points for the box along the idir coordinate
+    *       direction
+    *
+    *    - \b box (input)
+    *       box to be chopped
+    *
+    *    - \b max_size (input)
+    *       maximum allowed box size in idir coordinate direction.
+    *
+    *    - \b min_size (input)
+    *       minimum allowed box size in idir coordinate direction.
+    *
+    *    - \b cut_factor (input)
+    *       See class header for description.
+    *
+    *
+    * Assertion checks:
+    *
+    *    - min_size must be nonnegative
+    *
+    *    - max_size and cut_factor must be positive
+    *
+    *    - min_size must be less than or equal to max_size
+    *
+    */
+   static bool
+   findBestCutPointsForDirectionGivenMax(
+      const int idir,
+      tbox::List<int>& cut_points,
+      const Box& box,
+      const int max_size,
+      const int min_size,
+      const int cut_factor);
+
+   /**
+    * Determine whether the box may be chopped into the specified
+    * number of boxes along each coordinate direction.  For those
+    * directions along which the box may be chopped, the cut points are
+    * computed.  The cut points for the j-th coordinate direction are
+    * placed into a list of integers corresponding to the j-th component
+    * of the cut_point array.
+    *
+    * Return value:
+    *
+    *    - true is returned if the box may be chopped along any
+    *      coordinate direction.  Otherwise, false is returned.
+    *
+    * Arguments:
+    *
+    *    - \b cut_points (output)
+    *       array of list of cut points for the box
+    *
+    *    - \b box (input)
+    *       box to be cut
+    *
+    *    - \b number_boxes (input)
+    *       the i-th component of number_boxes specifies the desired
+    *       number of cuts to be made along the i-th coordinate
+    *       direction.
+    *
+    *    - \b min_size (input)
+    *       minimum allowed box size. See class header for further
+    *       description.
+    *
+    *    - \b cut_factor (input)
+    *       See class header for description.
+    *
+    *
+    * Important note: By convention, each integer cut point that is computed
+    *                 corresponds to the cell index to the right of cut point.
+    *
+    * Assertion checks:
+    *
+    *    - all components of min_size must be nonnegative
+    *
+    *    - all components of cut_factor and number_boxes must be positive
+    *
+    */
+   static bool
+   findBestCutPointsGivenNumber(
+      tbox::Array<tbox::List<int> >& cut_points,
+      const Box& box,
+      const IntVector& number_boxes,
+      const IntVector& min_size,
+      const IntVector& cut_factor);
+
+   /**
+    * Determine whether the box may be chopped into the specified
+    * number of boxes along along given coordinate direction.  If the
+    * box may be chopped, the cut points are computed and placed
+    * into a list of integers.
+    *
+    * Return value:
+    *
+    *    - true is returned if the box may be chopped along the specified
+    *      coordinate direction.  Otherwise, false is returned.
+    *
+    * Arguments:
+    *
+    *    - \b idir (input)
+    *       coordinate direction along which cut points will be computed
+    *
+    *    - \b cut_points (output)
+    *       list of cut points for the box along the idir coordinate
+    *       direction
+    *
+    *    - \b box (input)
+    *       box to be chopped
+    *
+    *    - \b num_boxes (input)
+    *       num_boxes specifies the desired number of cuts to be made
+    *       along the idir coordinate direction.
+    *
+    *    - \b min_size (input)
+    *       minimum allowed box size in idir coordinate direction.
+    *
+    *    - \b cut_factor (input)
+    *       See class header for description.
+    *
+    *
+    * Assertion checks:
+    *
+    *    - min_size must be nonnegative
+    *
+    *    - cut_factor and num_boxes must be positive
+    *
+    */
+   static bool
+   findBestCutPointsForDirectionGivenNumber(
+      const int idir,
+      tbox::List<int>& cut_points,
+      const Box& box,
+      const int num_boxes,
+      const int min_size,
+      const int cut_factor);
+
+   /**
+    * Determine whether box has any bad cut points based on its
+    * position within the box list domain.  Information about the potentially
+    * bad directions is returned in the IntVector
+    * bad_cut_information.  An entry of zero indicates that there are no
+    * bad cut points for the box along that coordinate direction.  An entry
+    * of one indicates that there may be a bad cut point along that direction.
+    *
+    * Return value:
+    *
+    *    - true is returned if the box may potentially have a bad point
+    *      along some coordinate direction. Otherwise false is returned.
+    *
+    * Arguments:
+    *
+    *    - \b bad_cut_information (output)
+    *       A value of 0 in the i-th component of bad_cut_information
+    *       indicates that there are no bad cut points in the i-th
+    *       coordinate direction.
+    *
+    *    - \b box (input)
+    *       box to be cut.
+    *
+    *    - \b physical_boxes (input)
+    *       box array that represents some domain
+    *
+    *    - \b bad_interval (input)
+    *       See class header for description.
+    *
+    *
+    * Assertion checks:
+    *
+    *    - all components of bad_interval must be nonnegative
+    *
+    */
+   static bool
+   checkBoxForBadCutPoints(
+      IntVector& bad_cut_information,
+      const Box& box,
+      const BoxArray& physical_boxes,
+      const IntVector& bad_interval);
+
+   /**
+    * Determine whether box may have any bad cut points along the specified
+    * coordinate direction based on its position within the box array domain.
+    *
+    * Return value:
+    *
+    *    - true is returned if the box may potentially have a bad point;
+    *      otherwise false is returned.
+    *
+    * Arguments:
+    *
+    *    - \b dir (input)
+    *       coordinate direction to be checked for bad cut points
+    *
+    *    - \b box (input)
+    *       box to be cut
+    *
+    *    - \b physical_boxes (input)
+    *       box array that represents some domain
+    *
+    *    - \b bad_interval (input)
+    *       See class header for description.
+    *
+    *
+    * Assertion checks:
+    *
+    *    - all components of bad_interval must be nonnegative.
+    *
+    */
+   static bool
+   checkBoxForBadCutPointsInDirection(
+      const int dir,
+      const Box& box,
+      const BoxArray& physical_boxes,
+      const IntVector& bad_interval);
+
+   /**
+    * Determine bad cut points for box based on the specified box array domain
+    * and bad interval.
+    *
+    * The cut information is returned as an array (size = dim) of arrays
+    * (size = number of cells along edge of box) of boolean values.  A
+    * false value indicates a good cut point, a true value indicates that
+    * the box should not be cut at that point.
+    *
+    * Arguments:
+    *
+    *    - \b bad_cuts (output)
+    *        stores an array of boolean arrays that indicates whether
+    *        a potential cut point is bad.  A value of false indicates
+    *        a good cut point, and a true value indicates a bad cut point.
+    *
+    *    - \b box (input)
+    *        box to be cut
+    *
+    *    - \b physical_boxes (input)
+    *        box array that represents some domain
+    *
+    *    - \b bad_interval (input)
+    *        See class header for description.
+    *
+    *
+    * Assertion checks:
+    *
+    *    - all components of bad_interval must be nonnegative
+    *
+    *    - bad_cuts must have size equal to dim
+    *
+    */
+   static void
+   findBadCutPoints(
+      tbox::Array<tbox::Array<bool> >& bad_cuts,
+      const Box& box,
+      const BoxArray& physical_boxes,
+      const IntVector& bad_interval);
+
+   /**
+    * Find bad cut points for a box given a single coordinate direction.
+    * The cut information is returned as an array of boolean values
+    * (size = number of cells along specified edge of box).  A false value
+    * indicates a good cut point, a true value indicates that the box should
+    * not be cut at that point.
+    *
+    * Arguments:
+    *
+    *    - \b dir (input)
+    *       coordinate direction to be checked for bad cut points
+    *
+    *    - \b bad_cuts (output)
+    *        boolean arrays whose entries indicates whether
+    *        a potential cut point is bad.
+    *
+    *    - \b box (input)
+    *       box to be cut
+    *
+    *    - \b physical_boxes (input)
+    *       box array that represents some domain
+    *
+    *    - \b bad_interval (input)
+    *       See class header for description.
+    *
+    *
+    * Assertion checks:
+    *
+    *    - all components of bad_interval must be nonnegative
+    *
+    */
+   static void
+   findBadCutPointsForDirection(
+      const int dir,
+      tbox::Array<bool>& bad_cuts,
+      const Box& box,
+      const BoxArray& physical_boxes,
+      const IntVector& bad_interval);
+
+   /**
+    * Given a set of potential cut points and a set of bad cut points for
+    * a box, adjust the cut points so that they do not coincide with
+    * bad cut points.  Typically, the cuts are generated using either of
+    * the findBestCutPoints...() functions, and the bad cut points are
+    * generated using the findBadCutPoints() function.
+    *
+    * Arguments:
+    *
+    *    - \b cuts (input/output)
+    *       array of integer lists each of which holds a list of
+    *       cut points for the box.  Each list is adjusted so that
+    *       no cut points coincide with bad cut points
+    *
+    *    - \b bad_cuts (input)
+    *       array of boolean arrays each of which stores information
+    *       about which offsets from the lower corner of the box
+    *       are bad cut points
+    *
+    *    - \b box (input)
+    *       box to be cut
+    *
+    *    - \b min_size (input)
+    *       minimum allowed box size.  See class header for further
+    *       details.
+    *
+    *    - \b cut_factor (input)
+    *       See class header for description.
+    *
+    *
+    * Assertion checks:
+    *
+    *    - All components of min_size must be nonnegative.
+    *
+    *    - All components of cut_factor must be positive.
+    *
+    *    - cuts and bad_cuts must have size equal to dim
+    *
+    *    - Each array of integers in bad_cuts must have length
+    *      equal to the number of cells for the box in that dimension.
+    *
+    *    - The cut points for each direction must be strictly increasing
+    *      and all satisfy the cut_factor restriction.
+    *
+    */
+   static void
+   fixBadCutPoints(
+      tbox::Array<tbox::List<int> >& cuts,
+      const tbox::Array<tbox::Array<bool> >& bad_cuts,
+      const Box& box,
+      const IntVector& min_size,
+      const IntVector& cut_factor);
+
+   /**
+    * Given a set of potential cut points and a set of bad cut points for
+    * a box, adjust the cut points in the specified coordinate direction
+    * so that they do not coincide with bad cut points.  Typically, the
+    * cuts are generated using either of the findBestCutPoints...()
+    * functions, and the bad cut points are generated using the
+    * findBadCutPoints() function.
+    *
+    * Arguments:
+    *
+    *    - \b dir (input)
+    *       coordinate direction along which to fix cut points
+    *
+    *    - \b cuts (input/output)
+    *       list of integers which holds a list of cut points for the box.
+    *       This list is adjusted so that no cut points coincide with bad
+    *       cut points.
+    *
+    *    - \b bad_cuts (input)
+    *       array of booleans which stores information about which
+    *       offsets from the lower corner of the box are bad cut points
+    *
+    *    - \b box (input)
+    *       box to be cut
+    *
+    *    - \b min_size (input)
+    *       minimum allowed box size along specified coordinate direction.
+    *
+    *    - \b cut_factor (input)
+    *       See class header for description.
+    *
+    *
+    * Assertion checks:
+    *
+    *    - min_size must be nonnegative.
+    *
+    *    - cut_factor must be positive.
+    *
+    *    - bad_cut_points must have size equal to the number of
+    *      cells in the box along the specified coordinate direction.
+    *
+    *    - The cut points must be strictly increasing and all
+    *      satisfy the cut_factor constraint.
+    *
+    */
+   static void
+   fixBadCutPointsForDirection(
+      const int dir,
+      tbox::List<int>& cuts,
+      const tbox::Array<bool>& bad_cuts,
+      const Box& box,
+      const int min_size,
+      const int cut_factor);
+
+   /**
+    *
+    * This static private member function is called by findBadCutPoints(),
+    * and the findBadCutPointsForDirection() member functions.  It sets bad
+    * cut points near the lower and upper ends of the border box in the
+    * given coordinate direction.
+    *
+    */
+   static void
+   findBadCutPointsForBorderAndDirection(
+      const int id,
+      tbox::Array<bool>& bad_cuts,
+      const Box& box,
+      const Box& border,
+      const int bad_interval);
+
+   /**
+    * Construct an array of box lists so that each list contains
+    * a non-overlapping set of boxes covering some portion of the
+    * box at the same array location in the box array.  The regions
+    * of index space formed by composing the union of boxes on each
+    * box list are mutually disjoint and the union of all boxes in
+    * the box lists exactly covers the union of boxes in the original
+    * box array.  In other words, this routine partitions the boxes
+    * in the "boxes" argument into a set of non-overlapping box collections.
+    * If none of the boxes in this box array overlap then each box list
+    * in the resulting array has a single box equal to the corresponding
+    * box in the box array.  This routine is especially useful for
+    * determining a unique set of index points given an array of boxes
+    * in some index space.
+    *
+    * Arguments:
+    *
+    *    - \b box_list_array (output)
+    *       array of box lists which cover mutually exclusive portions
+    *       of the index space covered by the "boxes" argument
+    *
+    *    - \b boxes (input)
+    *       an arbitrary box array
+    */
+   static void
+   makeNonOverlappingBoxLists(
+      tbox::Array<BoxList>& box_list_array,
+      const BoxArray& boxes);
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/CoarseFineBoundary.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/CoarseFineBoundary.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,562 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   For describing coarse-fine boundary interfaces 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_CoarseFineBoundary_C
+#define included_hier_CoarseFineBoundary_C
+
+#include "SAMRAI/hier/CoarseFineBoundary.h"
+
+#include "SAMRAI/hier/MappedBoxContainerUtils.h"
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+CoarseFineBoundary::CoarseFineBoundary(
+   const tbox::Dimension& dim):
+   d_dim(dim),
+   d_initialized(1, false),
+   d_mblk_hierarchy(NULL),
+   d_boundary_boxes(1)
+{
+}
+
+CoarseFineBoundary::CoarseFineBoundary(
+   const CoarseFineBoundary& rhs):
+   tbox::DescribedClass(),
+   d_dim(rhs.d_dim),
+   d_initialized(1, false),
+   d_mblk_hierarchy(rhs.d_mblk_hierarchy),
+   d_boundary_boxes(rhs.d_boundary_boxes)
+{
+   /*
+    * This needs to be written this way since STL vector for bools
+    * causes uninitialized memory reads because it is poorly implemented.
+    * So the vector is initialized and then copied.
+    */
+   d_initialized = rhs.d_initialized;
+}
+
+CoarseFineBoundary::CoarseFineBoundary(
+   const PatchHierarchy& hierarchy,
+   int level_num,
+   const IntVector& max_ghost_width):
+   d_dim(max_ghost_width.getDim()),
+   d_initialized(1, false),
+   d_boundary_boxes(1)
+{
+   TBOX_ASSERT(max_ghost_width > IntVector(d_dim, -1));
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, max_ghost_width);
+
+   d_mblk_hierarchy.setNull();
+
+   const hier::PatchLevel& level =
+      dynamic_cast<const hier::PatchLevel&>(*hierarchy.getPatchLevel(level_num));
+   const hier::Connector& level_to_level =
+      level.getMappedBoxLevel()->getPersistentOverlapConnectors().
+      findOrCreateConnector(
+         *level.getMappedBoxLevel(),
+         max_ghost_width);
+   computeFromLevel(level,
+      hierarchy.getConnectorToDomain(level_num),
+      level_to_level,
+      max_ghost_width);
+
+}
+
+CoarseFineBoundary::CoarseFineBoundary(
+   const tbox::Pointer<MultiblockPatchHierarchy>& hierarchy,
+   int level_num,
+   const IntVector& max_ghost_width):
+   d_dim(max_ghost_width.getDim()),
+   d_initialized(1, false),
+   d_mblk_hierarchy(hierarchy),
+   d_boundary_boxes(hierarchy->getNumberOfBlocks())
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, max_ghost_width);
+   TBOX_ASSERT(max_ghost_width > IntVector(d_dim, -1));
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+#pragma report(level, E)
+#endif
+   d_boundary_boxes.resize(hierarchy->getNumberOfBlocks());
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+#pragma report(pop)
+#endif
+
+   const tbox::Pointer<hier::MultiblockPatchLevel> level =
+      hierarchy->getPatchLevel(level_num);
+   const tbox::Pointer<hier::MultiblockPatchLevel> level0 =
+      hierarchy->getPatchLevel(0);
+   computeFromLevel(*level,
+      *level0,
+      max_ghost_width);
+}
+
+CoarseFineBoundary::CoarseFineBoundary(
+   const PatchLevel& level,
+   const Connector& mapped_box_level_to_domain,
+   const Connector& mapped_box_level_to_self,
+   const IntVector& max_ghost_width):
+   d_dim(max_ghost_width.getDim()),
+   d_initialized(1, false),
+   d_boundary_boxes(1)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, max_ghost_width);
+   TBOX_ASSERT(max_ghost_width > IntVector(d_dim, -1));
+
+   d_mblk_hierarchy.setNull();
+
+   computeFromLevel(level,
+                    mapped_box_level_to_domain,
+                    mapped_box_level_to_self,
+                    max_ghost_width);
+
+}
+
+CoarseFineBoundary::~CoarseFineBoundary()
+{
+}
+
+/*
+ ************************************************************************
+ * Use grid_geometry.computeBoundaryGeometry function,                  *
+ * setting up the arguments in a way that will generate                 *
+ * the coarse-fine boundary (instead of the domain boundary).           *
+ ************************************************************************
+ */
+void CoarseFineBoundary::computeFromLevel(
+   const PatchLevel& level,
+   const Connector& mapped_box_level_to_domain,
+   const Connector& mapped_box_level_to_self,
+   const IntVector& max_ghost_width)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, max_ghost_width);
+
+   clear();
+
+   const MappedBoxLevel& mapped_box_level = *level.getMappedBoxLevel();
+   const hier::IntVector& ratio = level.getRatioToLevelZero();
+
+   tbox::Pointer<hier::GridGeometry> grid_geometry = level.getGridGeometry();
+
+   /*
+    * Get the domain's periodic shift.
+    */
+   const hier::IntVector periodic_shift(grid_geometry->getPeriodicShift(ratio));
+
+   bool is_periodic = false;
+   for (int i = 0; i < d_dim.getValue(); ++i) {
+      is_periodic = is_periodic || periodic_shift(i);
+   }
+
+   /*
+    * Here we add some boxes outside of non-periodic boundaries to the
+    * adjusted level.  For each patch that touches a regular boundary,
+    * grow the patch box (and any periodic images of the patch box) by
+    * the max ghost width.  Remove intersections with the periodic
+    * adjusted physical domain.  Add what remains to the adjusted level.
+    *
+    * This will ensure that ensuing call to create boundary boxes will not
+    * create boundary boxes at the locations where the level touches a
+    * non-periodic physical boundary, but only where there is a coarse-fine
+    * interface in the domain interior (A periodic boundary is considered
+    * part of the domain interior for this purpose).
+    */
+
+   /*
+    * Build a fake domain in fake_domain_list.
+    *
+    * The fake domain should be such that when fed to computeBoundaryBoxesOnLevel,
+    * the coarse-fine boundaries are computed rather than the physical boundary.
+    * computeBoundaryBoxesOnLevel defines boundaries of a patch to be the
+    * parts of the grown patch box that lie outside the "domain".  So se make
+    * the fake domain be everywhere there is NOT a coarse-fine boundary--or
+    * everywhere there IS a physical boundary or a fine-boundary.
+    */
+   BoxList fake_domain_list;
+   const NeighborhoodSet& mapped_box_level_eto_domain =
+      mapped_box_level_to_domain.getNeighborhoodSets();
+
+   // Every mapped_box should connect to the domain mapped_box_level.
+   TBOX_ASSERT(
+      mapped_box_level_eto_domain.size() == mapped_box_level.getLocalNumberOfBoxes());
+
+   // Add physical boundaries to the fake domain.
+   for (NeighborhoodSet::const_iterator ei = mapped_box_level_eto_domain.begin();
+        ei != mapped_box_level_eto_domain.end(); ++ei) {
+      const MappedBox& mapped_box = *mapped_box_level.getMappedBoxStrict(
+            ei->first);
+      const Connector::NeighborSet& domain_nabrs = ei->second;
+      Connector::NeighborSet refined_domain_nabrs;
+      hier::MappedBoxContainerUtils::refineNeighborSet(refined_domain_nabrs, domain_nabrs, ratio);
+      Box box = mapped_box.getBox();
+      box.grow(max_ghost_width);
+      BoxList physical_boundary_portion(box);
+      hier::MappedBoxContainerUtils::removeBoxListNeighborSetIntersections(
+         physical_boundary_portion,
+         refined_domain_nabrs);
+      fake_domain_list.copyItems(physical_boundary_portion);
+   }
+   // Add fine-fine boundaries to the fake domain.
+   Connector::NeighborSet all_peer_nabrs;
+
+   TBOX_ASSERT(mapped_box_level_to_self.getConnectorWidth() >=
+      hier::IntVector::getOne(d_dim));
+
+   hier::MappedBoxContainerUtils::getNeighborsFromNeighborhoodSet(all_peer_nabrs,
+         mapped_box_level_to_self.getNeighborhoodSets());
+   for (Connector::NeighborSet::const_iterator na = all_peer_nabrs.begin();
+        na != all_peer_nabrs.end(); ++na) {
+      fake_domain_list.appendItem(na->getBox());
+   }
+
+   /*
+    * Call GridGeometry::computeBoundaryGeometry with arguments contrived
+    * such that they give the coarse-fine boundaries instead of the domain
+    * boundaries.  The basic algorithm used by
+    * GridGeometry::computeBoundaryGeometry is
+    * 1. grow boxes by ghost width
+    * 2. remove intersection with domain
+    * 3. reorganize and classify resulting boxes
+    *
+    * This is how we get GridGeometry::computeBoundaryGeometry to
+    * compute the coarse-fine boundary instead of the physical boundary.
+    *
+    * Since we handle the periodic boundaries ourselves, do not treat
+    * them differently from regular boundaries.  State that all boundaries
+    * are non-periodic boundaries.
+    *
+    * Send the periodic-adjusted level boxes as the domain for the
+    * remove-intersection-with-domain operation.  This causes that
+    * operation to remove non-coarse-fine (that is, fine-fine) boxes
+    * along the periodic boundaries, leaving the coarse-fine boundary
+    * boxes.
+    *
+    * Send the periodic-adjusted domain for the limit-domain intersect
+    * operation.  This removes the boundaries that are on the non-periodic
+    * boundaries, which is what we want because there is no possibility
+    * of a coarse-fine boundary there.
+    */
+   bool do_all_patches = true;
+   const IntVector use_periodic_shift(d_dim, 0);
+   const BoxArray fake_domain(d_dim, fake_domain_list);
+   grid_geometry->computeBoundaryBoxesOnLevel(
+      d_boundary_boxes[0],
+      level,
+      use_periodic_shift,
+      max_ghost_width,
+      fake_domain,
+      do_all_patches);
+
+   d_initialized[0] = true;
+}
+
+void CoarseFineBoundary::computeFromLevel(
+   const MultiblockPatchLevel& level,
+   const MultiblockPatchLevel& level0,
+   const IntVector& max_ghost_width)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, max_ghost_width);
+   // TODO Something needs to be done with this.
+
+   int nblocks = level.getNumberOfBlocks();
+   for (int i = 0; i < nblocks; i++) {
+      tbox::Pointer<hier::PatchLevel> block_level =
+         level.getPatchLevelForBlock(i);
+      tbox::Pointer<hier::PatchLevel> block_level0 =
+         level0.getPatchLevelForBlock(i);
+
+      clear(i);
+
+      if (!block_level.isNull()) {
+         const hier::IntVector& ratio = block_level->getRatioToLevelZero();
+
+         tbox::Pointer<hier::GridGeometry> grid_geometry =
+            block_level->getGridGeometry();
+
+         BoxArray phys_domain(block_level0->getBoxes());
+         BoxArray level_domain(block_level->getBoxes());
+
+         phys_domain.refine(ratio);
+
+         /*
+          * Create a pseudo-domain -- the union of the current level's boxes
+          * on all blocks in terms of the current block's index space.
+          */
+
+         BoxList pseudo_domain(phys_domain);
+
+         for (tbox::List<MultiblockPatchHierarchy::Neighbor>::Iterator
+              ni(d_mblk_hierarchy->getNeighbors(i)); ni; ni++) {
+
+            BoxList neighbor_domain(ni().getTranslatedDomain());
+            neighbor_domain.refine(ratio);
+
+            pseudo_domain.unionBoxes(neighbor_domain);
+
+         }
+
+         /*
+          * Make a list containing the level boxes for the current block,
+          * then add more boxes as a buffer around physical domain boundaries.
+          * This prevents physical boundaries from being identified as coarse-fine
+          * boundaries.
+          */
+
+         BoxList adjusted_level_domain_list(level_domain);
+
+         for (PatchLevel::Iterator p(block_level); p; p++) {
+            if ( (*p)->getPatchGeometry()->getTouchesRegularBoundary() ) {
+
+               const Box& patch_box = (*p)->getBox();
+
+               BoxList no_shift_boxes(patch_box);
+               no_shift_boxes.grow(max_ghost_width);
+               no_shift_boxes.removeIntersections(pseudo_domain);
+               adjusted_level_domain_list.unionBoxes(no_shift_boxes);
+
+            }
+         }
+
+         /*
+          * Add buffer of boxes that exist on the current level across
+          * block boundaries from the current block.  This prevents block
+          * boundaries from being identified as coarse-fine boundaries when they
+          * are not.
+          */
+         for (tbox::List<MultiblockPatchHierarchy::Neighbor>::Iterator
+              ni(d_mblk_hierarchy->getNeighbors(i)); ni; ni++) {
+
+            tbox::Pointer<hier::PatchLevel> neighbor_level =
+               level.getPatchLevelForBlock(ni().getBlockNumber());
+
+            hier::BoxArray neighbor_boxes(d_dim, 0);
+
+            if (!neighbor_level.isNull()) {
+               neighbor_boxes = neighbor_level->getBoxes();
+            }
+
+            if (neighbor_boxes.size()) {
+               d_mblk_hierarchy->translateBoxArray(neighbor_boxes,
+                  ratio,
+                  i,
+                  ni().getBlockNumber());
+
+               BoxList neighbor_boxes_to_add(phys_domain);
+               neighbor_boxes_to_add.grow(max_ghost_width);
+
+               neighbor_boxes_to_add.intersectBoxes(hier::BoxList(
+                     neighbor_boxes));
+
+               adjusted_level_domain_list.unionBoxes(neighbor_boxes_to_add);
+            }
+         }
+
+         BoxArray adjusted_level_domain(d_dim, adjusted_level_domain_list);
+
+         d_boundary_boxes[i].clear();
+
+         /*
+          * Call GridGeometry::computeBoundaryGeometry with arguments contrived
+          * such that they give the coarse-fine boundaries instead of the domain
+          * boundaries.  The basic algorithm used by
+          * GridGeometry::computeBoundaryGeometry is
+          * 1. grow boxes by ghost width
+          * 2. remove intersection with domain
+          * 3. reorganize and classify resulting boxes
+          *
+          * This is how we get GridGeometry::computeBoundaryGeometry to
+          * compute the coarse-fine boundary instead of the physical boundary.
+          *
+          * Send the adjusted level boxes as the domain for the
+          * remove-intersection-with-domain operation.  This causes that
+          * operation to remove non-coarse-fine (that is, fine-fine) boxes
+          * along the periodic boundaries, leaving the coarse-fine boundary
+          * boxes.
+          *
+          * Send the adjusted domain for the limit-domain intersect
+          * operation.  This removes the boundaries that are on the physical
+          * boundaries, which is what we want because there is no possibility
+          * of a coarse-fine boundary there.
+          */
+         bool do_all_patches = true;
+         IntVector use_periodic_shift(d_dim, 0);
+         grid_geometry->computeBoundaryBoxesOnLevel(
+            d_boundary_boxes[i],
+            *block_level,
+            use_periodic_shift,
+            max_ghost_width,
+            adjusted_level_domain,
+            do_all_patches);
+      }
+
+      d_initialized[i] = true;
+
+   }
+
+}
+
+void CoarseFineBoundary::addPeriodicImageBoxes(
+   BoxArray& boxes,
+   const tbox::Array<tbox::List<IntVector> >& shifts)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, boxes);
+   TBOX_ASSERT(shifts.size() == boxes.getNumberOfBoxes());
+
+   int current_size = boxes.getNumberOfBoxes();
+
+   TBOX_ERROR("Code disabled because getShiftsForLevel is gone.");
+
+   // TODO Something needs to be done with this
+
+   int ip;
+   /*
+    * Count number of boxes that must be added to boxes.
+    * And resize boxes accordingly before adding the
+    * periodic images to it.
+    */
+   int new_size = current_size;
+   for (ip = 0; ip < current_size; ++ip) {
+      new_size += shifts[ip].getNumberOfItems();
+   }
+   boxes.resizeBoxArray(new_size);
+
+   /*
+    * For all the possible shifts of all patches,
+    * compute the shifted box and add it to boxes.
+    * This completes the addition of images boxes.
+    */
+   const int old_size = current_size;
+
+   for (ip = 0; ip < old_size; ++ip) {
+      const Box& unshifted_box = boxes[ip];
+      const tbox::List<IntVector>& shifts_list = shifts[ip];
+      if (!shifts_list.isEmpty()) {
+         tbox::List<IntVector>::Iterator sh;
+         for (sh = shifts_list.listStart(); sh; sh++) {
+            Box shifted_box(unshifted_box);
+            shifted_box.shift((*sh));
+            boxes[current_size++] = shifted_box;
+         }
+      }
+   }
+
+   TBOX_ASSERT(current_size == new_size);
+}
+
+void CoarseFineBoundary::clear(
+   const int block_number) {
+   d_boundary_boxes[block_number].clear();
+}
+
+const tbox::Array<BoundaryBox>&
+CoarseFineBoundary::getNodeBoundaries(
+   const hier::GlobalId& global_id,
+   const int block_num) const
+{
+   return getBoundaries(global_id, d_dim.getValue(), block_num);
+}
+
+const tbox::Array<BoundaryBox>&
+CoarseFineBoundary::getEdgeBoundaries(
+   const hier::GlobalId& global_id,
+   const int block_num) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_dim.getValue() < 2) {
+      TBOX_ERROR("CoarseFineBoundary::getEdgeBoundaries():  There is\n"
+         << "no edge boundaries in " << d_dim << "d.\n");
+   }
+#endif
+   return getBoundaries(global_id, d_dim.getValue() - 1, block_num);
+}
+
+const tbox::Array<BoundaryBox>&
+CoarseFineBoundary::getFaceBoundaries(
+   const hier::GlobalId& global_id,
+   const int block_num) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_dim.getValue() < 3) {
+      TBOX_ERROR("CoarseFineBoundary::getFaceBoundaries():  There is\n"
+         << "no face boundaries in " << d_dim << "d.\n");
+   }
+#endif
+   return getBoundaries(global_id, d_dim.getValue() - 2, block_num);
+}
+
+const tbox::Array<BoundaryBox>&
+CoarseFineBoundary::getBoundaries(
+   const hier::GlobalId& global_id,
+   const int boundary_type,
+   const int block_num) const
+{
+   if (!d_initialized[block_num]) {
+      TBOX_ERROR("The boundary boxes have not been computed.");
+   }
+
+   std::map<LocalId, PatchBoundaries>::const_iterator
+   mi = d_boundary_boxes[block_num].find(global_id.getLocalId());
+   TBOX_ASSERT(mi != d_boundary_boxes[block_num].end());
+   return (*mi).second[boundary_type - 1];
+}
+
+void CoarseFineBoundary::printClassData(
+   std::ostream& os) const {
+   os << "\nCoarseFineBoundary::printClassData...";
+   for (std::map<LocalId, PatchBoundaries>::const_iterator
+        mi = d_boundary_boxes[0].begin(); mi != d_boundary_boxes[0].end(); ++mi) {
+      os << "\n		patch "<< (*mi).first;
+      for (unsigned int btype = 0; btype < d_dim.getValue(); ++btype) {
+         os << "\n			type "<< btype;
+         const tbox::Array<BoundaryBox>
+         & array_of_boxes = (*mi).second[btype];
+         int num_boxes = array_of_boxes.getSize();
+         int bn;
+         for (bn = 0; bn < num_boxes; ++bn) {
+            os << "\n				box "
+               << bn << "/" << num_boxes << ":";
+            os << array_of_boxes[bn].getBox();
+         }
+      }
+   }
+   os << "\n";
+}
+
+CoarseFineBoundary& CoarseFineBoundary::operator = (
+   const CoarseFineBoundary& rhs)
+{
+   d_initialized = rhs.d_initialized;
+   d_mblk_hierarchy = rhs.d_mblk_hierarchy;
+   d_boundary_boxes = rhs.d_boundary_boxes;
+   return *this;
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/CoarseFineBoundary.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/CoarseFineBoundary.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,354 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   For describing coarse-fine boundary interfaces 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_CoarseFineBoundary
+#define included_hier_CoarseFineBoundary
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/Connector.h"
+#include "SAMRAI/hier/MultiblockPatchHierarchy.h"
+#include "SAMRAI/hier/PatchBoundaries.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief Utility class to construct and maintain a description of the
+ * coarse-fine boundary between a patch level and a coarser level.
+ *
+ * A coarse-fine boundary box is a BoundaryBox object, but it is generated
+ * differently than a typical boundary box maintained by a patch geometry
+ * object.  A boundary box serving as a coarse-fine boundary box describes part
+ * of the boundary of a given patch with its next coarser AMR hierarchy level.
+ * It does not intersect any other patch on the same level, nor does it lie
+ * on a physical domain boundary, except where the physical boundary is
+ * periodic and the appropriate continuation of that boundary is part of a
+ * coarser patch level.
+ *
+ * The coarse-fine boundary is typically created from two adjacent
+ * hierarchy levels, but the description lives on (refers to the index
+ * space of) the finer level.  Since the coarse-fine boundary
+ * describes the boundary to the next coarser level, the coarsest
+ * level (level zero) has no coarse-fine boundary.
+ *
+ * Each CoarseFineBoundary object corresponds to one level, so to
+ * represent a entire hierarchy, one would need an array or list of
+ * such objects.
+ */
+
+class CoarseFineBoundary:public tbox::DescribedClass
+{
+public:
+   /*!
+    * @brief Construct a CoarseFineBoundary object with no boundary boxes.
+    *
+    * @param[in] dim Dimension
+    */
+   explicit CoarseFineBoundary(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Copy constructor.
+    *
+    * @param[in] rhs
+    */
+   CoarseFineBoundary(
+      const CoarseFineBoundary& rhs);
+
+   /*!
+    * @brief Construct a CoarseFineBoundary object for the specified
+    * level in the given patch hierarchy.
+    *
+    * @note If level number is zero, the coarse-fine boundary will be empty.
+    *
+    * @param[in] hierarchy
+    * @param[in] level_num  
+    * @param[in] max_ghost_width The ghost width determines the extent of the
+    *                            boundary boxes along the level domain boundary,
+    *                            similar to regular domain boundary boxes.  Note
+    *                            that as in the case of regular boundary boxes,
+    *                            each box will always be one cell wide in the
+    *                            direction perpendicular to the patch boundary.
+    */
+   explicit CoarseFineBoundary(
+      const PatchHierarchy& hierarchy,
+      int level_num,
+      const IntVector& max_ghost_width);
+
+   /*!
+    * @brief Construct a CoarseFineBoundary object for the specified
+    * level in the given multiblock patch hierarchy.
+    *
+    * @note If level number is zero, the coarse-fine boundary will be empty.
+    *
+    * @param[in] hierarchy
+    * @param[in] level_num
+    * @param[in] max_ghost_width The ghost width determines the extent of the
+    *                            boundary boxes along the level domain boundary,
+    *                            similar to regular domain boundary boxes.  Note
+    *                            that as in the case of regular boundary boxes,
+    *                            each box will always be one cell wide in the
+    *                            direction perpendicular to the patch boundary.
+    */
+   explicit CoarseFineBoundary(
+      const tbox::Pointer<MultiblockPatchHierarchy>& hierarchy,
+      int level_num,
+      const IntVector& max_ghost_width);
+
+   /*!
+    * @brief Construct a CoarseFineBoundary object for a specified level.
+    *
+    * The coarse-fine boundary will be computed using the physical domain
+    * as the reference coarser level.  The physical domain is provided to this
+    * method as the 'head' level of the mapped_box_level_to_domain Connector.
+    *
+    * @note If the level covers the entire physical domain, the coarse-fine
+    * boundary will be empty.
+    *
+    * @param[in] level
+    * @param[in] mapped_box_level_to_domain
+    * @param[in] mapped_box_level_to_self
+    * @param[in] max_ghost_width The ghost width determines the extent of the
+    *                            boundary boxes along the level domain boundary,
+    *                            similar to regular domain boundary boxes.  Note    
+    *                            that as in the case of regular boundary boxes,
+    *                            each box will always be one cell wide in the
+    *                            direction perpendicular to the patch boundary.
+    */
+   explicit CoarseFineBoundary(
+      const PatchLevel& level,
+      const Connector& mapped_box_level_to_domain,
+      const Connector& mapped_box_level_to_self,
+      const IntVector& max_ghost_width);
+
+   /*!
+    * @brief Destructor.
+    */
+   ~CoarseFineBoundary();
+
+   /*!
+    * @brief Clear all boundary data or clear boundary data for a given block 
+    * for multiblock.
+    *
+    * @param[in] block_number  Optional argument for use in multiblock.
+    */
+   void
+   clear(
+      const int block_number = 0);
+
+   //@{
+   /*!
+    * @name Functions to get the computed coarse-fine boundaries.
+    */
+
+   /*!
+    * @brief Get an array of boundary boxes of a given type
+    * for a specified patch.
+    *
+    * The specified patch must exist in the level used to compute
+    * the internal state or it is an error.
+    *
+    * @param[in] global_id
+    * @param[in] boundary_type Codimension of boundaries.
+    * @param[in] block_num     Defaults to 0 for the single block case
+    */
+   const tbox::Array<BoundaryBox>&
+   getBoundaries(
+      const hier::GlobalId& global_id,
+      const int boundary_type,
+      const int block_num = 0) const;
+
+   /*!
+    * @brief Get an array of node boundary boxes for a specified patch.
+    *
+    * @see hier::BoundaryBox for more information.
+    *
+    * The specified patch must exist in the level used to compute
+    * the internal state or it is an error.
+    *
+    * @param[in] global_id
+    * @param[in] block_num     Defaults to 0 for the single block case
+    */
+   const tbox::Array<BoundaryBox>&
+   getNodeBoundaries(
+      const hier::GlobalId& global_id,
+      const int block_num = 0) const;
+
+   /*!
+    * @brief Get an array of edge boundary boxes for a specified patch.
+    *
+    * @see hier::BoundaryBox for more information.
+    *
+    * Note that edge boxes are only meaningful if the dimension is > 1.
+    * The specified patch must exist in the level used to compute
+    * the internal state or it is an error.
+    *
+    * @param[in] global_id
+    * @param[in] block_num     Defaults to 0 for the single block case
+    */
+   const tbox::Array<BoundaryBox>&
+   getEdgeBoundaries(
+      const hier::GlobalId& global_id,
+      const int block_num = 0) const;
+
+   /*!
+    * @brief Get an array of face boundary boxes for a specified patch.
+    *		
+    * @see hier::BoundaryBox for more information.
+    *
+    * Note that face boxes are only meaningful if the dimension is > 2.
+    * The specified patch must exist in the level used to compute
+    * the internal state or it is an error.
+    *
+    * @param[in] global_id
+    * @param[in] block_num     Defaults to 0 for the single block case
+    */
+   const tbox::Array<BoundaryBox>&
+   getFaceBoundaries(
+      const hier::GlobalId& global_id,
+      const int block_num = 0) const;
+
+   //@}
+
+   /*!
+    * @brief Print out class data.
+    *
+    * @param[in] os Output stream
+    */
+   virtual void
+   printClassData(
+      std::ostream& os) const;
+
+   /*!
+    * @brief Assignment operator.
+    *
+    * @param[in] rhs
+    */
+   CoarseFineBoundary&
+   operator = (
+      const CoarseFineBoundary& rhs);
+
+private:
+   /* Don't allow default ctor */
+   CoarseFineBoundary();
+
+   /*!
+    * @brief Compute a CoarseFineBoundary object for a specified level.
+    *
+    * The coarse-fine boundary will be computed using the physical domain
+    * as the reference coarser level.  The physical domain is provided to this
+    * method as the 'head' level of the mapped_box_level_to_domain Connector.
+    *
+    * @note If the level covers the entire physical domain, the coarse-fine
+    * boundary will be empty.
+    *
+    * @param[in] level
+    * @param[in] mapped_box_level_to_domain
+    * @param[in] mapped_box_level_to_self
+    * @param[in] max_ghost_width The ghost width determines the extent of the
+    *                            boundary boxes along the level domain boundary,
+    *                            similar to regular domain boundary boxes.  Note   
+    *                            that as in the case of regular boundary boxes,
+    *                            each box will always be one cell wide in the
+    *                            direction perpendicular to the patch boundary.
+    */
+   void
+   computeFromLevel(
+      const PatchLevel& level,
+      const Connector& mapped_box_level_to_domain,
+      const Connector& mapped_box_level_to_self,
+      const IntVector& max_ghost_width);
+
+   /*!
+    * @brief Compute a CoarseFineBoundary object for the specified
+    * multibock level based on a given reference level which is assumed to be
+    * the coarsest level (i.e., level zero) of a hierarchy.
+    *
+    * @note If level and level0 are the same, the coarse-fine boundary
+    * will be empty.
+
+    * @param[in] level
+    * @param[in] level_zero
+    * @param[in] max_ghost_width The ghost width determines the extent of the
+    *                            boundary boxes along the level domain boundary,  
+    *                            similar to regular domain boundary boxes.  Note    
+    *                            that as in the case of regular boundary boxes,
+    *                            each box will always be one cell wide in the
+    *                            direction perpendicular to the patch boundary.
+    */
+   void
+   computeFromLevel(
+      const MultiblockPatchLevel& level,
+      const MultiblockPatchLevel& level0,
+      const IntVector& max_ghost_width);
+
+   /*!
+    * @brief Take a set of boxes representing a domain and
+    * append to it the immediate periodic images of the boxes.
+    *
+    * If there are no periodic directions in the grid, there will be no
+    * change.
+    *
+    * The image boxes form a virtual domain which can be used by
+    * GridGeometry to compute the coarse-fine boundary instead of the
+    * physical boundary.
+    *
+    * @param[in,out] boxes Box array on which to append periodic images boxes
+    * @param[in] shifts Periodic shifts.
+    *
+    * TODO: refactor remove this method.
+    */
+   void
+   addPeriodicImageBoxes(
+      BoxArray& boxes,
+      const tbox::Array<tbox::List<IntVector> >& shifts);
+
+   /*!
+    * @brief Dimension of the object.
+    */
+   const tbox::Dimension d_dim;
+
+
+   /*!
+    * @brief Whether the boundary boxes have been computed.  One entry on the
+    * vector for each block in a multiblock grid.
+    */
+   std::vector<bool> d_initialized;
+
+   /*!
+    * @brief pointer to the multiblock hierarchy on which the coarse-fine
+    * boundary was computed.  Always null in the single block case.
+    */
+   tbox::Pointer<MultiblockPatchHierarchy> d_mblk_hierarchy;
+
+   /*!
+    * @brief Patch boundary boxes describing the coarse-fine boundary.
+    *
+    * Map each local patch to a PatchBoundaries object.
+    *
+    * This is stored as an vector so that it can be used with a multiblock
+    * hierarchy.  Each entry in the vector holds the boundary boxes for 
+    * a particular block on the level.  For single-block cases, the
+    * vector is always of length 1.
+    */
+   std::vector<std::map<LocalId, PatchBoundaries> > d_boundary_boxes;
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/ComponentSelector.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/ComponentSelector.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,73 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Simple bit vector of a fixed length (128 bits) 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_ComponentSelector_C
+#define included_hier_ComponentSelector_C
+
+#include "SAMRAI/hier/ComponentSelector.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/ComponentSelector.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+bool
+ComponentSelector::any() const {
+   std::vector<std::bitset<C_BITSET_SIZE> >::const_iterator iter;
+   bool set = false;
+   for (iter = d_bit_vector.begin(); iter != d_bit_vector.end() && !set;
+        ++iter) {
+      set = iter->any();
+   }
+   return set;
+}
+
+bool
+ComponentSelector::none() const {
+   return !any();
+}
+
+int ComponentSelector::_findMaxIndex(
+      const std::vector<std::bitset<C_BITSET_SIZE> >& bits) const
+{
+   bool bits_set = false;
+   int max_index = -1;
+   for (size_t i = 0; i < bits.size() && !bits_set; ++i)  {
+      bits_set |= bits[i].any();
+   }
+
+   if (bits_set) {
+      int j = C_BITSET_SIZE - 1;
+      while (!bits[_index(j)].test(_element(j))) {
+         --j;
+      }
+      max_index = j;
+   }
+   return max_index;
+}
+
+
+void ComponentSelector::printClassData(
+   std::ostream& os) const
+{
+   int i;
+   const int number_of_bits = getSize();
+   for (i = 0; i < number_of_bits; ++i) {
+      os << " | Bit " << i << " = " << isSet(i);
+   }
+   os << "|\n";
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/ComponentSelector.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/ComponentSelector.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,238 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Simple bit vector.  The size of the bit vector depends on
+ *                The number of PatchData entries.  It is implemented as a 
+ *                vector of bitsets to take advantage of the speed of 
+ *                processing elements in a bitset.
+ *
+ ************************************************************************/
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+ComponentSelector::ComponentSelector(
+   const bool flag) : d_max_bit_index(-1)
+{
+   int pd_entries = tbox::SAMRAIManager::getMaxNumberPatchDataEntries();
+   int num_bitset_elements = pd_entries / C_BITSET_SIZE;
+   int num_mod = pd_entries % C_BITSET_SIZE;
+
+   if (num_mod != 0) {
+      num_bitset_elements++;
+   }  
+
+   std::bitset<C_BITSET_SIZE> l_bits;
+   d_bit_vector.resize(num_bitset_elements, l_bits);   
+
+   if (flag) {
+      // use the bitset "set" operation to set each vector element's
+      // bitset values to "true".
+      for (size_t vi = 0; vi < d_bit_vector.size(); ++vi) {
+         d_bit_vector[vi].set();
+      }
+      d_max_bit_index =
+         (static_cast<int>(d_bit_vector.size()) * C_BITSET_SIZE) - 1;
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+ComponentSelector::ComponentSelector(
+   const ComponentSelector& flags):
+   tbox::DescribedClass()
+{
+   d_bit_vector = flags.d_bit_vector;
+   d_max_bit_index = flags.d_max_bit_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+ComponentSelector::~ComponentSelector()
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+int ComponentSelector::getSize() const
+{
+   return static_cast<int>(d_bit_vector.size()) * C_BITSET_SIZE;
+}
+
+SAMRAI_INLINE_KEYWORD
+ComponentSelector&
+ComponentSelector::operator = (
+   const ComponentSelector& flags)
+{
+   d_bit_vector = flags.d_bit_vector;
+   d_max_bit_index = flags.d_max_bit_index;
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool
+ComponentSelector::operator == (
+   const ComponentSelector& flags) const
+{
+   return d_bit_vector == flags.d_bit_vector;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool
+ComponentSelector::operator != (
+   const ComponentSelector& flags) const
+{
+   return d_bit_vector != flags.d_bit_vector;
+}
+
+SAMRAI_INLINE_KEYWORD
+ComponentSelector
+ComponentSelector::operator | (
+   const ComponentSelector& flags) const
+{
+   ComponentSelector tmp;
+   for (size_t vi = 0; vi < d_bit_vector.size(); ++vi) {
+      tmp.d_bit_vector[vi] = d_bit_vector[vi] | flags.d_bit_vector[vi];
+   }
+   tmp.d_max_bit_index = 
+      tbox::MathUtilities<int>::Max(
+         d_max_bit_index, flags.d_max_bit_index);
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+ComponentSelector
+ComponentSelector::operator& (
+   const ComponentSelector& flags) const
+{
+   ComponentSelector tmp;
+   for (size_t vi = 0; vi < d_bit_vector.size(); ++vi) {
+      tmp.d_bit_vector[vi] = d_bit_vector[vi] & flags.d_bit_vector[vi];
+   }
+   tmp.d_max_bit_index = _findMaxIndex(tmp.d_bit_vector);
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+ComponentSelector
+ComponentSelector::operator ! () const
+{
+   ComponentSelector tmp;
+   for (size_t vi = 0; vi < d_bit_vector.size(); ++vi) {
+      tmp.d_bit_vector[vi] = ~(d_bit_vector[vi]);
+   }
+   tmp.d_max_bit_index = _findMaxIndex(tmp.d_bit_vector);
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+ComponentSelector&
+ComponentSelector::operator |= (
+   const ComponentSelector& flags)
+{
+   for (size_t vi = 0; vi < d_bit_vector.size(); ++vi) {
+      d_bit_vector[vi] |= flags.d_bit_vector[vi];
+   }
+   d_max_bit_index = 
+      tbox::MathUtilities<int>::Max(
+         d_max_bit_index, flags.d_max_bit_index);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+ComponentSelector&
+ComponentSelector::operator &= (
+   const ComponentSelector& flags)
+{
+   for (size_t vi = 0; vi < d_bit_vector.size(); ++vi) {
+      d_bit_vector[vi] &= flags.d_bit_vector[vi];
+   }
+   d_max_bit_index = _findMaxIndex(d_bit_vector);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool ComponentSelector::isSet(
+   const int i) const
+{
+   TBOX_ASSERT((i >= 0) && (i < getSize()));
+   return d_bit_vector[_index(i)].test(_element(i));
+}
+
+SAMRAI_INLINE_KEYWORD
+void ComponentSelector::setFlag(
+   const int i)
+{
+   TBOX_ASSERT((i >= 0) && (i < getSize()));
+   d_bit_vector[_index(i)].set(_element(i));
+}
+
+SAMRAI_INLINE_KEYWORD
+void ComponentSelector::clrFlag(
+   const int i)
+{
+   TBOX_ASSERT((i >= 0) && (i < getSize()));
+   d_bit_vector[_index(i)].reset(_element(i));
+   d_max_bit_index = _findMaxIndex(d_bit_vector);
+}
+
+SAMRAI_INLINE_KEYWORD
+void ComponentSelector::setAllFlags()
+{
+   for (size_t vi = 0; vi < d_bit_vector.size(); ++vi) {
+      (d_bit_vector[vi]).set();
+   }
+   d_max_bit_index = C_BITSET_SIZE * static_cast<int>(d_bit_vector.size()) - 1;
+}
+
+SAMRAI_INLINE_KEYWORD
+void ComponentSelector::clrAllFlags()
+{
+   for (size_t vi = 0; vi < d_bit_vector.size(); ++vi) {
+      (d_bit_vector[vi]).reset();
+   }
+   d_max_bit_index = -1;
+}
+
+SAMRAI_INLINE_KEYWORD
+int ComponentSelector::getMaxIndex() const
+{
+   return d_max_bit_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+int ComponentSelector::_index(const int i) const
+{
+   return i / C_BITSET_SIZE; 
+}
+
+SAMRAI_INLINE_KEYWORD
+int ComponentSelector::_element(const int i) const
+{
+   return i % C_BITSET_SIZE; 
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/ComponentSelector.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/ComponentSelector.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,268 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Simple bit vector. 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_ComponentSelector
+#define included_hier_ComponentSelector
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/PIO.h"
+
+#include <vector>
+#include <bitset>
+
+//
+//  Default length of std::bitset entries used in bit vector representation.
+//
+#define C_BITSET_SIZE 1024
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief Bit vector used to indicate on which patch data elements to
+ * apply operations.
+ *
+ * Class ComponentSelector implements a bit vector of a fixed
+ * length and is typically used to apply operations on subsets of entries
+ * in the patch data array owned by a patch (e.g., allocate/deallocate).
+ * All ComponentSelector objects have the same bit vector length that is
+ * established by the SAMRAIManager utility. See the documentation
+ * of the SAMRAIManager utility for information about changing this
+ * maximum value.
+ *
+ * @see tbox::SAMRAIManager
+ */
+class ComponentSelector:public tbox::DescribedClass
+{
+public:
+   /*!
+    * @brief Create a ComponentSelector with all values initialized to
+    * the specified flag value.
+    *
+    * @param[in]  flag @b Default: false
+    */
+   explicit ComponentSelector(
+      const bool flag = false);
+
+   /*!
+    * @brief Copy constructor that create a component selector identical 
+    * to the argument.
+    */
+   ComponentSelector(
+      const ComponentSelector& flags);
+
+   /*!
+    * @brief The destructor for a component selector does nothing interesting.
+    */
+   ~ComponentSelector();
+
+   /*!
+    * @brief Get the size of the ComponentSelector.
+    *
+    * @return total number of flags (i.e., bits) in this component selector.
+    */
+   int
+   getSize() const;
+
+   /*!
+    * @brief Copy assignment operator.
+    */
+   ComponentSelector&
+   operator = (
+      const ComponentSelector& flags);
+
+   /*!
+    * @brief Equality operator.  Two ComponentSelector objects are 
+    * equal when all their bits are the same.
+    */
+   bool
+   operator == (
+      const ComponentSelector& flags) const;
+
+   /*!
+    * @brief Inequality operator.  Two ComponentSelector objects are 
+    * unequal if any of their bits are different.
+    */
+   bool
+   operator != (
+      const ComponentSelector& flags) const;
+
+   /*!
+    * @brief Generate and return a component selector set to the bitwise
+    * logical OR of this component selector and the argument component
+    * selector.
+    *
+    * @param[in]  flags The ComponentSelector used to apply the logical OR
+    *             operation
+    *
+    * @return The ComponentSelector which is the logical OR of this component.
+    */
+   ComponentSelector
+   operator | (
+      const ComponentSelector& flags) const;
+
+   /*!
+    * @brief Generate a component selector set to the bitwise logical AND
+    * of this component selector and the argument component selector.
+    *
+    * @param[in]  flags The ComponentSelector used to apply the logical
+    *             AND operation
+    *
+    * @return The ComponentSelector which is the logical AND of this component.
+    */
+   ComponentSelector
+   operator & (
+      const ComponentSelector& flags) const;
+
+   /*!
+    * @brief Generate a component selector set to the bitwise logical
+    * negation of this component selector.
+    *
+    * @return The ComponentSelector which is the logical negation of this
+    *         component.
+    */
+   ComponentSelector
+   operator ! () const;
+
+   /*!
+    * @brief Set all bits in this component selector to the bitwise
+    * logical OR of this component selector and the argument component
+    * selector.
+    *
+    * This is a modifying operation on this ComponentSelector.
+    *
+    * @return This selector, modified.
+    */
+   ComponentSelector&
+   operator |= (
+      const ComponentSelector& flags);
+
+   /*!
+    * @brief Set all bits in this component selector to the bitwise
+    * logical AND of this component selector and the argument component
+    * selector.
+    *
+    * This is a modifying operation on this ComponentSelector.
+    *
+    * @return This selector, modified.
+    */
+   ComponentSelector&
+   operator &= (
+      const ComponentSelector& flags);
+
+   /*!
+    * @brief Check whether the specified bit vector position is true.
+    *
+    * When assertion checking is active, an assertion will result if the
+    * given position is out-of-bounds.
+    *
+    * @param[in]  i The position in the bit vector to check.
+    *
+    * @return True if the bit at position i is set to true.
+    */
+   bool
+   isSet(
+      const int i) const;
+
+   /*!
+    * @brief Set the specified bit vector position to true.
+    *
+    * When assertion checking is active, an assertion will result if the
+    * given position is out-of-bounds.
+    *
+    * @param[in]  i The position in the bit vector to set to true.
+    */
+   void
+   setFlag(
+      const int i);
+
+   /*!
+    * @brief Set the specified bit vector position to false.
+    *
+    * When assertion checking is active, an assertion will result if the
+    * given position is out-of-bounds.
+    *
+    * @param[in]  i The position in the bit vector to set to false.
+    */
+   void
+   clrFlag(
+      const int i);
+
+   /*!
+    * @brief Set all bit vector positions to true.
+    */
+   void
+   setAllFlags();
+
+   /*!
+    * @brief Set all bit vector positions to false.
+    */
+   void
+   clrAllFlags();
+
+   /*!
+    * @brief Get the index of the highest set position.
+    */
+   int
+   getMaxIndex() const;
+
+   /*!
+    * @brief check if any bits in the vector are set to true.
+    *
+    * @return True if any bit in the vector is set true, otherwise false.
+    */
+   bool
+   any() const;
+
+   /*!
+    * @brief check if no bits in the vector are set to true.
+    *
+    * This is essentially determining if all bits are false.
+    *
+    * @return True if no bits in the vector are set to true, otherwise false.
+    */
+   bool
+   none() const;
+
+   /*!
+    * @brief Print the bit vector data to the specified output stream.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os = tbox::plog) const;
+
+private:
+   std::vector<std::bitset<C_BITSET_SIZE> > d_bit_vector;
+
+   // the index of the highest bit set in the bit vector.
+   // used for efficiency
+   int d_max_bit_index;
+
+   int
+   _findMaxIndex(
+      const std::vector<std::bitset<C_BITSET_SIZE> >& bits) const;
+   // private function to return the index into the d_bit_vector
+   int
+   _index(const int i) const;
+
+   // private function to return the element within the d_bit_vector[i]
+   // bitset.
+   int 
+   _element(const int i) const;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/ComponentSelector.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/Connector.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/Connector.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1959 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Set of edges incident from a mapped_box_level of a distributed box graph. 
+ *
+ ************************************************************************/
+#ifndef included_hier_Connector_C
+#define included_hier_Connector_C
+
+#include "SAMRAI/hier/Connector.h"
+#include "SAMRAI/hier/PeriodicShiftCatalog.h"
+#include "SAMRAI/hier/RealMappedBoxConstIterator.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/Connector.I"
+#endif
+
+#include <algorithm>
+//#include <iomanip>
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+static const std::string dbgbord;
+
+namespace SAMRAI {
+namespace hier {
+
+#define HIER_CONNECTOR_VERSION (0)
+
+tbox::Pointer<tbox::Timer> Connector::t_initialize;
+
+tbox::Pointer<tbox::Timer> Connector::t_acquire_remote_relationships;
+
+tbox::StartupShutdownManager::Handler
+Connector::s_initialize_finalize_handler(
+   Connector::initializeCallback,
+   0,
+   0,
+   Connector::finalizeCallback,
+   tbox::StartupShutdownManager::priorityTimers);
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+Connector::Connector():
+   d_base_handle(),
+   d_head_handle(),
+   d_base_width(tbox::Dimension::getInvalidDimension()),
+   d_ratio(tbox::Dimension::getInvalidDimension()),
+   d_head_coarser(false),
+   d_relationships(),
+   d_global_relationships(),
+   d_parallel_state(MappedBoxLevel::DISTRIBUTED),
+   d_global_number_of_neighbor_sets(0),
+   d_global_number_of_relationships(0),
+   d_global_data_up_to_date(false),
+   d_rank(BAD_INT),
+   d_nproc(BAD_INT),
+   d_connector_type(UNKNOWN)
+{
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+Connector::Connector(
+   const Connector& other):
+   tbox::DescribedClass(),
+   d_base_handle(other.d_base_handle),
+   d_head_handle(other.d_head_handle),
+   d_base_width(other.d_base_width),
+   d_ratio(other.d_ratio),
+   d_head_coarser(other.d_head_coarser),
+   d_relationships(other.d_relationships),
+   d_global_relationships(other.d_global_relationships),
+   d_parallel_state(other.d_parallel_state),
+   d_global_number_of_neighbor_sets(other.d_global_number_of_neighbor_sets),
+   d_global_number_of_relationships(other.d_global_number_of_relationships),
+   d_global_data_up_to_date(other.d_global_data_up_to_date),
+   d_rank(other.d_rank),
+   d_nproc(other.d_nproc),
+   d_connector_type(other.d_connector_type)
+{
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+Connector::Connector(
+   const MappedBoxLevel& base_mapped_box_level,
+   const MappedBoxLevel& head_mapped_box_level,
+   const IntVector& base_width,
+   const NeighborhoodSet& relationships,
+   const MappedBoxLevel::ParallelState parallel_state)
+   :d_base_width(base_width.getDim(), 0),
+   d_ratio(base_width.getDim(), 0),
+   d_head_coarser(false),
+   d_relationships(),
+   d_global_relationships(),
+   d_parallel_state(MappedBoxLevel::DISTRIBUTED),
+   d_global_number_of_neighbor_sets(0),
+   d_global_number_of_relationships(0),
+   d_global_data_up_to_date(false),
+   d_rank(BAD_INT),
+   d_nproc(BAD_INT),
+   d_connector_type(UNKNOWN)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(base_mapped_box_level,
+      head_mapped_box_level,
+      base_width);
+
+   initialize(base_mapped_box_level,
+      head_mapped_box_level,
+      base_width,
+      relationships,
+      parallel_state);
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+Connector::Connector(
+   const MappedBoxLevel& base_mapped_box_level,
+   const MappedBoxLevel& head_mapped_box_level,
+   const IntVector& base_width,
+   const MappedBoxLevel::ParallelState parallel_state)
+   :d_base_width(base_width.getDim(), 0),
+   d_ratio(base_width.getDim(), 0),
+   d_head_coarser(false),
+   d_relationships(),
+   d_global_relationships(),
+   d_parallel_state(MappedBoxLevel::DISTRIBUTED),
+   d_global_number_of_neighbor_sets(0),
+   d_global_number_of_relationships(0),
+   d_global_data_up_to_date(true),
+   d_rank(BAD_INT),
+   d_nproc(BAD_INT),
+   d_connector_type(UNKNOWN)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(base_mapped_box_level,
+      head_mapped_box_level,
+      base_width);
+
+   initialize(base_mapped_box_level,
+      head_mapped_box_level,
+      base_width,
+      parallel_state);
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+Connector::~Connector()
+{
+   clear();
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+const NeighborhoodSet
+& Connector::getNeighborhoodSets() const
+{
+   TBOX_ASSERT(isInitialized());
+   return d_relationships;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+NeighborhoodSet::ConstRange
+Connector::getNeighborhoodSets(
+   const int rank) const
+{
+   TBOX_ASSERT(isInitialized());
+   TBOX_ASSERT(rank >= 0 && rank < d_nproc);
+   if (d_parallel_state == MappedBoxLevel::DISTRIBUTED) {
+      TBOX_ERROR("Non-local connectivity unavailable in DISTRIBUTED state.");
+   }
+   return d_global_relationships.findRanksRange(rank);
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+const NeighborhoodSet
+& Connector::getGlobalNeighborhoodSets() const
+{
+   TBOX_ASSERT(isInitialized());
+   if (d_parallel_state == MappedBoxLevel::DISTRIBUTED) {
+      TBOX_ERROR("Global connectivity unavailable in DISTRIBUTED state.");
+   }
+   return d_global_relationships;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void Connector::insertNeighbors(
+   const NeighborSet& neighbors,
+   const GlobalId& global_id)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_parallel_state == MappedBoxLevel::DISTRIBUTED &&
+       global_id.getOwnerRank() != d_rank) {
+      TBOX_ERROR("Connector::insertNeighbors error: Cannot work on remote\n"
+         << "data in DISTRIBUTED mode.");
+   }
+   if (!getBase().hasMappedBox(global_id)) {
+      TBOX_ERROR(
+         "Exiting due to above reported error."
+         << "Connector::insertNeighbors: Cannot access neighbors for\n"
+         << "id " << global_id << " because it does not "
+         << "exist in the base.\n"
+         << "base:\n" << getBase().format("", 2));
+   }
+#endif
+   if (d_parallel_state == MappedBoxLevel::GLOBALIZED) {
+      d_global_relationships[global_id].insert(neighbors.begin(),
+         neighbors.end());
+   }
+   if (global_id.getOwnerRank() == d_rank) {
+      d_relationships[global_id].insert(neighbors.begin(),
+         neighbors.end());
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void Connector::eraseNeighbor(
+   const MappedBox& neighbor,
+   const GlobalId& global_id)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_parallel_state == MappedBoxLevel::DISTRIBUTED &&
+       global_id.getOwnerRank() != d_rank) {
+      TBOX_ERROR("Connector::insertNeighbors error: Cannot work on remote\n"
+         << "data in DISTRIBUTED mode.");
+   }
+   if (!getBase().hasMappedBox(global_id)) {
+      TBOX_ERROR(
+         "Connector::eraseNeighbors: Cannot access neighbors for\n"
+         << "id " << global_id << " because it does not "
+         << "exist in the base.\n"
+         << "base:\n" << getBase().format("", 2));
+   }
+#endif
+   if (d_parallel_state == MappedBoxLevel::GLOBALIZED) {
+      NeighborhoodSet::iterator mi(d_global_relationships.find(global_id));
+      if (mi != d_global_relationships.end()) {
+         mi->second.erase(neighbor);
+      }
+   }
+   if (global_id.getOwnerRank() == d_rank) {
+      NeighborhoodSet::iterator mi(d_relationships.find(global_id));
+      if (mi != d_relationships.end()) {
+         mi->second.erase(neighbor);
+      }
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void Connector::swapNeighbors(
+   NeighborSet& neighbors,
+   const GlobalId& global_id)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_parallel_state == MappedBoxLevel::DISTRIBUTED &&
+       global_id.getOwnerRank() != d_rank) {
+      TBOX_ERROR("Connector::insertNeighbors error: Cannot work on remote\n"
+         << "data in DISTRIBUTED mode.");
+   }
+   if (!getBase().hasMappedBox(global_id)) {
+      TBOX_ERROR(
+         "Exiting due to above reported error."
+         << "Connector::swapNeighbors: Cannot access neighbors for\n"
+         << "id " << global_id << " because it does not "
+         << "exist in the base.\n"
+         << "base:\n" << getBase().format("", 2));
+   }
+#endif
+   if (global_id.getOwnerRank() == d_rank) {
+      if (d_parallel_state == MappedBoxLevel::GLOBALIZED) {
+         d_global_relationships[global_id] = neighbors;
+      }
+      d_relationships[global_id].swap(neighbors);
+   } else if (d_parallel_state == MappedBoxLevel::GLOBALIZED) {
+      d_global_relationships[global_id].swap(neighbors);
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void Connector::acquireRemoteNeighborhoods()
+{
+   tbox::SAMRAI_MPI mpi(getMPI());
+   if (mpi.getSize() == 1) {
+      // In single-proc mode, we already have all the relationships already.
+      d_global_relationships = d_relationships;
+      return;
+   }
+
+   t_acquire_remote_relationships->start();
+
+   std::vector<int> send_mesg;
+   std::vector<int> recv_mesg;
+   /*
+    * Pack relationships from all mapped_box_level relationship sets into a single message.
+    * Note that each mapped_box_level relationship set object packs the size of its
+    * sub-message into send_mesg.
+    */
+   acquireRemoteNeighborhoods_pack(send_mesg,
+                                   static_cast<int>(send_mesg.size()));
+   int send_mesg_size = static_cast<int>(send_mesg.size());
+
+   /*
+    * Send and receive the data.
+    */
+
+   std::vector<int> recv_mesg_size(d_nproc);
+   mpi.Allgather(&send_mesg_size,
+      1,
+      MPI_INT,
+      &recv_mesg_size[0],
+      1,
+      MPI_INT);
+
+   std::vector<int> proc_offset(d_nproc);
+   int totl_size = 0;
+   for (int n = 0; n < d_nproc; ++n) {
+      proc_offset[n] = totl_size;
+      totl_size += recv_mesg_size[n];
+   }
+   recv_mesg.resize(totl_size, BAD_INT);
+   mpi.Allgatherv(&send_mesg[0],
+      send_mesg_size,
+      MPI_INT,
+      &recv_mesg[0],
+      &recv_mesg_size[0],
+      &proc_offset[0],
+      MPI_INT);
+
+   /*
+    * Extract relationship info received from other processors.
+    */
+   acquireRemoteNeighborhoods_unpack(recv_mesg, proc_offset);
+
+   t_acquire_remote_relationships->stop();
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void Connector::acquireRemoteNeighborhoods_pack(
+   std::vector<int>& send_mesg,
+   int offset) const
+{
+   const tbox::Dimension dim(getBase().getDim());
+
+   (void)offset;
+   /*
+    * relationship acquisition is done during globalization.
+    * Thus, do not rely on current value of d_parallel_state.
+    */
+
+   /*
+    * Pack relationship info from d_relationships into send_mesg,
+    * starting at the offset location.
+    */
+   /*
+    * Information to be packed:
+    *   - Number of local mapped_boxes with neighbor lists (no info to send
+    *     for those mapped_boxes without neighbor lists)
+    *   - For each local mapped_box,
+    *     - mapped_box's local index
+    *     - number of neighbors
+    *     - neighbors
+    */
+   const int num_mapped_boxes = static_cast<int>(d_relationships.size());
+   int num_nabrs = 0;
+   for (NeighborhoodSet::const_iterator ci = d_relationships.begin(); ci != d_relationships.end();
+        ++ci) {
+      num_nabrs += static_cast<int>((*ci).second.size());
+   }
+   const int mesg_size =
+      1             /* number of local mapped_boxes with neighbor lists */
+      + 2 * num_mapped_boxes /* local index and neighbor list size of each mapped_box */
+      + num_nabrs * MappedBox::commBufferSize(dim) /* neighbors */
+   ;
+
+   send_mesg.resize(mesg_size, BAD_INT);
+   send_mesg[0] = num_mapped_boxes;
+   int imesg = 1;
+
+   for (NeighborhoodSet::const_iterator ci = d_relationships.begin(); ci != d_relationships.end();
+        ++ci) {
+
+      const GlobalId& global_id = (*ci).first;
+      const NeighborSet& nabrs = (*ci).second;
+
+      send_mesg[imesg++] = global_id.getLocalId().getValue();
+      send_mesg[imesg++] = static_cast<int>(nabrs.size());
+
+      for (NeighborSet::const_iterator ni = nabrs.begin();
+           ni != nabrs.end(); ++ni) {
+         (*ni).putToIntBuffer(&send_mesg[imesg]);
+         imesg += MappedBox::commBufferSize(dim);
+      }
+
+   }
+
+   TBOX_ASSERT(imesg == mesg_size);
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void Connector::acquireRemoteNeighborhoods_unpack(
+   const std::vector<int>& recv_mesg,
+   const std::vector<int>& proc_offset)
+{
+   const tbox::Dimension dim(getBase().getDim());
+
+   /*
+    * Unpack relationship info from recv_mesg into d_relationships.
+    */
+   int mapped_box_com_buf_size = MappedBox::commBufferSize(dim);
+
+   d_global_relationships = d_relationships;
+
+   for (int n = 0; n < d_nproc; ++n) {
+
+      if (n != d_rank) {
+
+         const int* ptr = &recv_mesg[0] + proc_offset[n];
+         const int num_nabr_lists = *(ptr++);
+
+         for (int i = 0; i < num_nabr_lists; ++i) {
+
+            const LocalId local_id(*ptr++);
+            const int num_nabrs = (*ptr++);
+            const GlobalId global_id(local_id, n);
+
+            NeighborSet& nabrs = d_global_relationships[global_id];
+            MappedBox nabr(dim);
+            for (int nn = 0; nn < num_nabrs; ++nn) {
+               nabr.getFromIntBuffer(ptr);
+               nabrs.insert(nabrs.end(), nabr);
+               ptr += mapped_box_com_buf_size;
+            }
+
+         }
+
+      }
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void Connector::setParallelState(
+   const MappedBoxLevel::ParallelState parallel_state)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (!isInitialized()) {
+      TBOX_ERROR(
+         "Connector::setParallelState: Cannot change the parallel state of\n"
+         << "an uninitialized Connector.  See Connector::initialize()");
+   }
+#endif
+   if (parallel_state != MappedBoxLevel::DISTRIBUTED && parallel_state != MappedBoxLevel::GLOBALIZED) {
+      TBOX_ERROR("Connector::setParallelState: Invalid distribution state: "
+         << parallel_state << "\n");
+   }
+
+   if (d_parallel_state == MappedBoxLevel::DISTRIBUTED && parallel_state == MappedBoxLevel::GLOBALIZED) {
+      acquireRemoteNeighborhoods();
+   } else if (d_parallel_state == MappedBoxLevel::GLOBALIZED && parallel_state ==
+              MappedBoxLevel::DISTRIBUTED) {
+      d_global_relationships.clear();
+   }
+   d_parallel_state = parallel_state;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void Connector::initialize(
+   const MappedBoxLevel& base,
+   const MappedBoxLevel& head,
+   const IntVector& base_width,
+   const NeighborhoodSet& relationships,
+   const MappedBoxLevel::ParallelState parallel_state)
+{
+   if (&relationships != &d_relationships) {
+      d_relationships = relationships;
+   }
+   initializePrivate(base,
+      head,
+      base_width,
+      base.getMappedBoxLevelHandle()->getMappedBoxLevel().getRefinementRatio(),
+      head.getMappedBoxLevelHandle()->getMappedBoxLevel().getRefinementRatio(),
+      parallel_state);
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void Connector::initialize(
+   const MappedBoxLevel& base,
+   const MappedBoxLevel& head,
+   const IntVector& base_width,
+   const MappedBoxLevel::ParallelState parallel_state)
+{
+   NeighborhoodSet dummy_relationships;
+   swapInitialize(base, head, base_width, dummy_relationships, parallel_state);
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void Connector::swapInitialize(
+   const MappedBoxLevel& base,
+   const MappedBoxLevel& head,
+   const IntVector& base_width,
+   NeighborhoodSet& relationships,
+   const MappedBoxLevel::ParallelState parallel_state)
+{
+   TBOX_ASSERT(&relationships != &d_relationships);   // Library error if this fails.
+   d_relationships.swap(relationships);
+   initializePrivate(base,
+      head,
+      base_width,
+      base.getRefinementRatio(),
+      head.getRefinementRatio(),
+      parallel_state);
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void Connector::initializePrivate(
+   const MappedBoxLevel& base,
+   const MappedBoxLevel& head,
+   const IntVector& base_width,
+   const IntVector& baseRefinementRatio,
+   const IntVector& headRefinementRatio,
+   const MappedBoxLevel::ParallelState parallel_state)
+{
+   t_initialize->start();
+   /*
+    * Check inputs.
+    */
+   if (!base.isInitialized() ||
+       !head.isInitialized()) {
+      TBOX_ERROR("Connector::initializePrivate():\n"
+         << "Connector may not be initialized with\n"
+         << "an uninitialized MappedBoxLevel.");
+   }
+   if (!(base.getRefinementRatio() >=
+         head.getRefinementRatio() ||
+         base.getRefinementRatio() <=
+         head.getRefinementRatio())) {
+      TBOX_ERROR("Connector::initializePrivate():\n"
+         << "Refinement ratio between base and head mapped_box_levels\n"
+         << "cannot be mixed (bigger in some dimension and\n"
+         << "smaller in others).\n"
+         << "Input base ratio = " << base.getRefinementRatio()
+         << "\n"
+         << "Input head ratio = " << head.getRefinementRatio()
+         << "\n");
+   }
+   if (!(base_width >= hier::IntVector::getZero(base_width.getDim()))) {
+      TBOX_ERROR("Connector::initializePrivate():\n"
+         << "Invalid ghost cell width: "
+         << base_width << "\n");
+   }
+   if (parallel_state == MappedBoxLevel::GLOBALIZED &&
+       base.getParallelState() != MappedBoxLevel::GLOBALIZED) {
+      TBOX_ERROR(
+         "Connector::initializePrivate: base MappedBoxLevel must be in\n"
+         << "GLOBALIZED state before initializing the Connector to\n"
+         << "GLOBALIZED state.");
+   }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   bool errf = false;
+   for (NeighborhoodSet::const_iterator ci = d_relationships.begin(); ci != d_relationships.end(); ++ci) {
+      if (!base.hasMappedBox((*ci).first)) {
+         const NeighborSet& nabrs = (*ci).second;
+         tbox::perr << "\nConnector::initializePrivate: NeighborhoodSet "
+                    << "provided for non-existent mapped_box " << ci->first
+                    << "\n" << "Neighbors (" << nabrs.size() << "):\n";
+         for (NeighborSet::const_iterator na = nabrs.begin();
+              na != nabrs.end(); ++na) {
+            tbox::perr << (*na) << "\n";
+         }
+         errf = true;
+      }
+   }
+   if (errf) {
+      TBOX_ERROR(
+         "Exiting due to errors."
+         << "\nConnector::initializePrivate base mapped_box_level:\n"
+         << base.format(dbgbord, 2)
+         << "\nConnector::initializePrivate head mapped_box_level:\n"
+         << head.format(dbgbord, 2));
+   }
+#endif
+
+   d_nproc = base.getNproc();
+   d_rank = base.getRank();
+
+   d_base_handle = base.getMappedBoxLevelHandle();
+   d_head_handle = head.getMappedBoxLevelHandle();
+
+   d_base_width = base_width;
+
+   if (baseRefinementRatio <= headRefinementRatio) {
+      d_ratio = headRefinementRatio / baseRefinementRatio;
+      d_head_coarser = false;
+   } else {
+      d_ratio = baseRefinementRatio / headRefinementRatio;
+      d_head_coarser = true;
+   }
+   if (baseRefinementRatio * headRefinementRatio <
+       IntVector::getZero(base_width.getDim())) {
+      // Note that negative ratios like -N really mean 1/N (negative reciprocal).
+      d_ratio = -headRefinementRatio * baseRefinementRatio;
+   }
+
+   if (parallel_state == MappedBoxLevel::DISTRIBUTED) {
+      d_global_relationships.clear();
+   } else {
+      if (&d_relationships != &d_global_relationships) {
+         d_global_relationships = d_relationships;
+      }
+   }
+
+   // Erase remote relationships, if any, from d_relationships.
+   if (!d_relationships.empty()) {
+      if (d_relationships.begin()->first.getOwnerRank() != d_rank ||
+          d_relationships.rbegin()->first.getOwnerRank() != d_rank) {
+         NeighborhoodSet::Range range = d_relationships.findRanksRange(d_rank);
+         if (range.first == range.second) {
+            // No relationship belongs to local process.
+            d_relationships.clear();
+         } else {
+            // Erase relationships belonging to remote process < d_rank.
+            d_relationships.erase(d_relationships.begin(), range.first);
+            // Erase relationships belonging to remote process > d_rank.
+            d_relationships.erase(range.second, d_relationships.end());
+         }
+      }
+   }
+
+   d_parallel_state = parallel_state;
+
+   t_initialize->stop();
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void Connector::clear()
+{
+   if (d_nproc != BAD_INT) {
+      d_relationships.clear();
+      d_global_relationships.clear();
+      d_base_handle.setNull();
+      d_head_handle.setNull();
+      d_base_width(0) = d_ratio(0) = 0;
+      d_parallel_state = MappedBoxLevel::DISTRIBUTED;
+      d_rank = d_nproc = BAD_INT;
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void Connector::swap(
+   Connector& a,
+   Connector& b)
+{
+
+   if (&a != &b) {
+      tbox::Pointer<MappedBoxLevelHandle> tmplayer;
+      // tbox::Pointer<PersistentOverlapConnectors> tmphub;
+      int tmpint;
+      bool tmpbool;
+      IntVector tmpvec(a.getBase().getDim());
+      MappedBoxLevel::ParallelState tmpstate;
+
+      tmplayer = a.d_base_handle;
+      a.d_base_handle = b.d_base_handle;
+      b.d_base_handle = tmplayer;
+
+      tmplayer = a.d_head_handle;
+      a.d_head_handle = b.d_head_handle;
+      b.d_head_handle = tmplayer;
+
+      a.d_relationships.swap(b.d_relationships);
+      a.d_global_relationships.swap(b.d_global_relationships);
+
+      tmpvec = a.d_ratio;
+      a.d_ratio = b.d_ratio;
+      b.d_ratio = tmpvec;
+
+      tmpbool = a.d_head_coarser;
+      a.d_head_coarser = b.d_head_coarser;
+      b.d_head_coarser = tmpbool;
+
+      tmpstate = a.d_parallel_state;
+      a.d_parallel_state = b.d_parallel_state;
+      b.d_parallel_state = tmpstate;
+
+      tmpint = a.d_nproc;
+      a.d_nproc = b.d_nproc;
+      b.d_nproc = tmpint;
+
+      tmpint = a.d_rank;
+      a.d_rank = b.d_rank;
+      b.d_rank = tmpint;
+
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void Connector::initializeToLocalTranspose(
+   const Connector& connector)
+{
+   const IntVector my_gcw = convertHeadWidthToBase(
+         connector.getHead().getRefinementRatio(),
+         connector.getBase().getRefinementRatio(),
+         connector.getConnectorWidth());
+
+   initialize(
+      connector.d_head_handle->getMappedBoxLevel(),
+      connector.d_base_handle->getMappedBoxLevel(),
+      my_gcw,
+      MappedBoxLevel::DISTRIBUTED);
+   TBOX_ASSERT(isTransposeOf(connector));
+
+   const tbox::Dimension dim(my_gcw.getDim());
+   const PeriodicShiftCatalog* shift_catalog =
+      PeriodicShiftCatalog::getCatalog(dim);
+
+   const NeighborhoodSet& r_relationships = connector.getNeighborhoodSets();
+
+   for (NeighborhoodSet::const_iterator ci = r_relationships.begin();
+        ci != r_relationships.end(); ++ci) {
+
+      const GlobalId& global_id = ci->first;
+      const MappedBoxSet::const_iterator ni = getHead().getMappedBox(global_id);
+      if (ni == getHead().getMappedBoxes().end()) {
+         TBOX_ERROR(
+            "Connector::initializeToLocalTranspose: mapped_box index\n"
+            << global_id
+            << " not found in local part of head mapped_box_level.\n"
+            << "This means that the incoming Connector data was not a\n"
+            << "self-consistent local mapping.\n");
+      }
+      const MappedBox& my_head_mapped_box = *ni;
+
+      const NeighborSet& my_base_subset = ci->second;
+      for (NeighborSet::const_iterator na = my_base_subset.begin();
+           na != my_base_subset.end(); ++na) {
+         const MappedBox& my_base_mapped_box = *na;
+         if (my_base_mapped_box.getOwnerRank() != d_rank) {
+            TBOX_ERROR(
+               "Connector::initializeToLocalTranspose: base mapped_box "
+               << my_head_mapped_box << "\n"
+               << "has remote neighbor " << my_base_mapped_box
+               << " which is disallowed.\n"
+               << "Mapped_boxes must have only local neighbors in this method.");
+         }
+         if (my_base_mapped_box.isPeriodicImage()) {
+            MappedBox my_shifted_head_mapped_box(
+               my_head_mapped_box,
+               shift_catalog->getOppositeShiftNumber(
+                  my_base_mapped_box.getPeriodicShiftNumber()),
+               getHead().getRefinementRatio());
+            if (getHead().hasMappedBox(my_shifted_head_mapped_box)) {
+               d_relationships[my_base_mapped_box.getGlobalId()].insert(
+                  my_shifted_head_mapped_box);
+            }
+         } else {
+            d_relationships[my_base_mapped_box.getGlobalId()].insert(my_head_mapped_box);
+         }
+      }
+
+   }
+
+   if (0) {
+      tbox::perr << "end of initializeToLocalTranspose:\n"
+                 << "base:\n" << getBase().format("BASE->", 3)
+                 << "head:\n" << getHead().format("HEAD->", 3)
+                 << "this:\n" << format("THIS->", 3)
+                 << "r:\n" << connector.format("RRRR->", 3)
+                 << "Checking this transpose correctness:" << std::endl;
+      assertTransposeCorrectness(connector, false);
+      tbox::perr << "Checking r's transpose correctness:" << std::endl;
+      connector.assertTransposeCorrectness(*this, false);
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void Connector::eraseEmptyNeighborSets()
+{
+   for (NeighborhoodSet::iterator ei = d_relationships.begin();
+        ei != d_relationships.end(); ) {
+      if ((*ei).second.empty()) {
+         d_relationships.erase(ei++);
+      } else {
+         ++ei;
+      }
+   }
+   d_global_data_up_to_date = false;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+bool
+Connector::isTransposeOf(
+   const Connector& other) const
+{
+   bool rval = false;
+   if (d_base_handle == other.d_head_handle && d_head_handle == other.d_base_handle) {
+      if (d_head_coarser) {
+         IntVector transpose_base_width = convertHeadWidthToBase(
+               getHead().getRefinementRatio(),
+               getBase().getRefinementRatio(),
+               d_base_width);
+         rval = other.d_base_width == transpose_base_width;
+      } else {
+         IntVector transpose_base_width = convertHeadWidthToBase(
+               other.getHead().getRefinementRatio(),
+               other.getBase().getRefinementRatio(),
+               other.d_base_width);
+         rval = d_base_width == transpose_base_width;
+      }
+   }
+   return rval;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+bool Connector::isLocal() const
+{
+   for (NeighborhoodSet::const_iterator ei = d_relationships.begin(); ei != d_relationships.end();
+        ++ei) {
+      const MappedBoxSet& nabrs = ei->second;
+      for (MappedBoxSet::const_iterator na = nabrs.begin();
+           na != nabrs.end();
+           ++na) {
+         if (na->getOwnerRank() != d_rank) {
+            return false;
+         }
+      }
+   }
+   return true;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+size_t Connector::getLocalNumberOfNeighborSets() const
+{
+   TBOX_ASSERT(isInitialized());
+   return d_relationships.size();
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+size_t Connector::getLocalNumberOfRelationships() const
+{
+   // FIXME:  BUG
+   TBOX_ASSERT(isInitialized());
+   size_t local_number_of_relationships = 0;
+   for (NeighborhoodSet::const_iterator ei(d_relationships.begin()); ei != d_relationships.end(); ++ei) {
+      d_global_number_of_relationships += static_cast<int>(ei->second.size());
+   }
+   return local_number_of_relationships;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+int Connector::getGlobalNumberOfNeighborSets() const
+{
+   TBOX_ASSERT(isInitialized());
+
+   cacheGlobalReducedData();
+   return d_global_number_of_neighbor_sets;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+int Connector::getGlobalNumberOfRelationships() const
+{
+   TBOX_ASSERT(isInitialized());
+
+   cacheGlobalReducedData();
+   return d_global_number_of_relationships;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void Connector::cacheGlobalReducedData() const
+{
+   tbox::SAMRAI_MPI mpi(getMPI());
+   TBOX_ASSERT(isInitialized());
+
+   if (d_global_data_up_to_date) {
+      return;
+   }
+   if (d_parallel_state == MappedBoxLevel::GLOBALIZED) {
+      d_global_number_of_relationships = 0;
+      for (NeighborhoodSet::const_iterator ei(d_global_relationships.begin());
+           ei != d_global_relationships.end();
+           ++ei) {
+         d_global_number_of_relationships +=
+            static_cast<int>(ei->second.size());
+      }
+      d_global_number_of_neighbor_sets =
+         static_cast<int>(d_global_relationships.size());
+   } else {
+      if (mpi.getSize() > 1) {
+         int tmpa[2], tmpb[2];
+         tmpa[0] = getLocalNumberOfNeighborSets();
+         tmpa[1] = getLocalNumberOfRelationships();
+
+         TBOX_ASSERT(tmpa[0] >= 0);
+         TBOX_ASSERT(tmpa[0] >= 0);
+
+         mpi.Allreduce(tmpa,
+            tmpb,                        // Better to use MPI_IN_PLACE, but not some MPI's do not support.
+            2,
+            MPI_INT,
+            MPI_SUM);
+         d_global_number_of_neighbor_sets = tmpb[0];
+         d_global_number_of_relationships = tmpb[1];
+      } else {
+         d_global_number_of_neighbor_sets = getLocalNumberOfNeighborSets();
+         d_global_number_of_relationships = getLocalNumberOfRelationships();
+      }
+
+      TBOX_ASSERT(d_global_number_of_neighbor_sets >= 0);
+      TBOX_ASSERT(d_global_number_of_relationships >= 0);
+   }
+
+   d_global_data_up_to_date = true;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+IntVector Connector::convertHeadWidthToBase(
+   const IntVector& base_refinement_ratio,
+   const IntVector& head_refinement_ratio,
+   const IntVector& head_gcw)
+{
+   if (!(base_refinement_ratio >= head_refinement_ratio ||
+         base_refinement_ratio <= head_refinement_ratio)) {
+      TBOX_ERROR("Connector::convertHeadWidthToBase:\n"
+         << "head mapped_box_level must be either\n"
+         << "finer or coarser than base.\n"
+         << "Combined refinement and coarsening not allowed.");
+   }
+
+   tbox::Dimension dim(head_refinement_ratio.getDim());
+
+   IntVector ratio(dim); // Ratio between head and base.
+
+   if (head_refinement_ratio * base_refinement_ratio >
+       IntVector::getZero(dim)) {
+      // Same signs for both ratios -> simple to compute head-base ratio.
+      if (base_refinement_ratio >= head_refinement_ratio) {
+         ratio = base_refinement_ratio / head_refinement_ratio;
+      } else {
+         ratio = head_refinement_ratio / base_refinement_ratio;
+      }
+   } else {
+      // Note that negative ratios like -N really mean 1/N (negative reciprocal).
+      ratio = -base_refinement_ratio * head_refinement_ratio;
+   }
+   TBOX_ASSERT(ratio >= IntVector::getOne(dim));
+
+   const IntVector base_width =
+      (base_refinement_ratio >= head_refinement_ratio) ?
+      (head_gcw * ratio) : IntVector::ceiling(head_gcw, ratio);
+
+   return base_width;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void Connector::recursivePrint(
+   std::ostream& os,
+   const std::string& border,
+   int detail_depth) const
+{
+   if (detail_depth < 0) return;
+
+   if (!isInitialized()) {
+      os << border << "Uninitialized.\n";
+      return;
+   }
+   bool head_coarser = d_head_coarser;
+   const NeighborhoodSet& relationships = getNeighborhoodSets();
+   const hier::IntVector head_gcw =
+      convertHeadWidthToBase(
+         getHead().getRefinementRatio(),
+         getBase().getRefinementRatio(),
+         d_base_width);
+   os << border << "Parallel state     : "
+      << (getParallelState() == MappedBoxLevel::DISTRIBUTED ? "DIST" : "GLOB")
+      << '\n'
+      << border << "Rank,nproc         : " << d_rank << ", " << d_nproc << '\n'
+      << border << "Base,head objects  :"
+      << " ("
+      << (d_base_handle == d_head_handle ? "same" : "different") << ") "
+      << (void *)&d_base_handle->getMappedBoxLevel() << ", "
+      << (void *)&d_head_handle->getMappedBoxLevel() << "\n"
+      << border << "Base,head,/ ratios : "
+      << getBase().getRefinementRatio() << ", "
+      << getHead().getRefinementRatio() << ", "
+      << d_ratio << (d_head_coarser ? " (head coarser)" : "") << '\n'
+      << border << "Base,head widths   : " << d_base_width << ", "
+      << head_gcw << '\n'
+      << border << "MappedBox count    : " << getBase().getLocalNumberOfBoxes()
+      << " (" << relationships.size() << " with neighbor lists)\n"
+   ;
+   if (detail_depth > 0) {
+      os << border << "Mapped_boxes with neighbors:\n";
+      for (NeighborhoodSet::const_iterator ei = relationships.begin(); ei != relationships.end();
+           ++ei) {
+         MappedBoxSet::const_iterator ni = getBase().getMappedBox(ei->first);
+         if (ni != getBase().getMappedBoxes().end()) {
+            os << border << "  "
+               << (*ni) << "_"
+               << (*ni).getBox().numberCells() << '\n';
+         } else {
+            os << border << "  #"
+               << (*ei).first
+               << ": INVALID DATA WARNING: nonexistent mapped_box index\n";
+            TBOX_WARNING("Inconsistent data!!!\n"
+               << "Neighbor data found for mapped_box "
+               << (*ei).first << " but there is no such mapped_box!\n");
+         }
+         hier::Box ghost_box = (*ni).getBox();
+         ghost_box.grow(d_base_width);
+         const NeighborSet& nabrs = (*ei).second;
+         os << border << "    Neighbors (" << nabrs.size() << "):"
+            << ((detail_depth > 1) ? "\n" : " ...\n");
+         if (detail_depth > 1) {
+            NeighborSet::const_iterator i_nabr;
+            for (i_nabr = nabrs.begin(); i_nabr != nabrs.end(); ++i_nabr) {
+               hier::Box ovlap = (*i_nabr).getBox();
+               if (head_coarser) ovlap.refine(d_ratio);
+               else if (d_ratio != 1) ovlap.coarsen(d_ratio);
+               ovlap = ovlap * ghost_box;
+               os << border << "      "
+                  << (*i_nabr) << "_"
+                  << (*i_nabr).getBox().numberCells()
+                  << "\tov" << ovlap << "_" << ovlap.numberCells() << '\n';
+            }
+         }
+      }
+   }
+}
+
+/*
+ ***********************************************************************
+ * Write out some statistics on the relationships, including statistics
+ * for judging mesh quality.
+ ***********************************************************************
+ */
+
+void Connector::printNeighborStats(
+   std::ostream& os,
+   const std::string& border) const
+{
+   if (!isInitialized()) {
+      os << "Uninitialized.\n";
+      return;
+   }
+
+   tbox::SAMRAI_MPI mpi(getMPI());
+
+   getBase().cacheGlobalReducedData();
+
+   /*
+    * Compute additional statistics.
+    */
+   std::set<int> owners; // Neighbor owners for the local processor.
+
+   int sum_nabr_sets = 0;
+   int sum_relationships = 0;
+   int sum_local_relationships = 0;
+   int sum_nonlocal_relationships = 0;
+   int sum_cells = 0;
+   int sum_ovlap_size = 0;
+   int sum_local_ovlap_size = 0;
+   int sum_nonlocal_ovlap_size = 0;
+   int sum_owners = 0;
+   int sum_local_owners = 0;
+   int sum_nonlocal_owners = 0;
+
+   int max_nabrs = 0;
+   int min_nabrs = 9999;
+
+   const NeighborhoodSet& relationships = getNeighborhoodSets();
+
+   for (NeighborhoodSet::const_iterator ni = relationships.begin();
+        ni != relationships.end(); ++ni) {
+
+      ++sum_nabr_sets;
+      const MappedBox& mapped_box = *getBase().getMappedBoxStrict(ni->first);
+      sum_cells += mapped_box.getBox().size();
+      Box base_ghost_box = mapped_box.getBox();
+      base_ghost_box.grow(d_base_width);
+
+      const NeighborSet& nabrs = ni->second;
+
+      max_nabrs = tbox::MathUtilities<int>::Max(max_nabrs, (int)nabrs.size());
+      min_nabrs = tbox::MathUtilities<int>::Min(min_nabrs, (int)nabrs.size());
+
+      for (NeighborSet::const_iterator na = nabrs.begin();
+           na != nabrs.end(); ++na) {
+
+         const MappedBox& nabr = *na;
+
+         Box head_box = nabr.getBox();
+         if (d_head_coarser) {
+            head_box.refine(d_ratio);
+         } else {
+            head_box.coarsen(d_ratio);
+         }
+         Box overlap_box = base_ghost_box * head_box;
+         int overlap_size = overlap_box.size();
+
+         ++sum_relationships;
+         sum_ovlap_size += overlap_size;
+
+         if (nabr.getOwnerRank() == d_rank) {
+            ++sum_local_relationships;
+            sum_local_ovlap_size += overlap_size;
+            sum_local_owners = 1;
+         } else {
+            ++sum_nonlocal_relationships;
+            sum_nonlocal_ovlap_size += overlap_size;
+            owners.insert(nabr.getOwnerRank());
+         }
+
+      }
+
+   }
+
+   sum_nonlocal_owners = static_cast<int>(owners.size());
+   sum_owners = sum_local_owners + sum_nonlocal_owners;
+
+   /*
+    * Collect local statistics into arrays for global reduction.
+    */
+   const int number_of_stats(20);
+   int loc_num[number_of_stats];
+   int min_num[number_of_stats];
+   int max_num[number_of_stats];
+   int sum_num[number_of_stats];
+   std::string names[number_of_stats];
+   int k = 0;
+   names[k] = "sum_nabr_sets";
+   loc_num[k++] = sum_nabr_sets;
+   names[k] = "sum_relationships";
+   loc_num[k++] = sum_relationships;
+   const int k_sum_relationships = k - 1;
+   names[k] = "sum_local_relationships";
+   loc_num[k++] = sum_local_relationships;
+   const int k_sum_local_relationships = k - 1;
+   names[k] = "sum_nonlocal_relationships";
+   loc_num[k++] = sum_nonlocal_relationships;
+   names[k] = "sum_cells";
+   loc_num[k++] = sum_cells;
+   names[k] = "sum_ovlap_size";
+   loc_num[k++] = sum_ovlap_size;
+   const int k_sum_ovlap_size = k - 1;
+   names[k] = "sum_local_ovlap_size";
+   loc_num[k++] = sum_local_ovlap_size;
+   const int k_sum_local_ovlap_size = k - 1;
+   names[k] = "sum_nonlocal_ovlap_size";
+   loc_num[k++] = sum_nonlocal_ovlap_size;
+   names[k] = "sum_owners";
+   loc_num[k++] = sum_owners;
+   names[k] = "sum_local_owners";
+   loc_num[k++] = sum_local_owners;
+   names[k] = "sum_nonlocal_owners";
+   loc_num[k++] = sum_nonlocal_owners;
+   names[k] = "min_nabrs";
+   loc_num[k++] = min_nabrs;
+   names[k] = "max_nabrs";
+   loc_num[k++] = max_nabrs;
+   TBOX_ASSERT(k < number_of_stats);
+   for (int i = 0; i < k; ++i) max_num[i] = sum_num[i] = min_num[i] =
+               loc_num[i];
+   int rank_of_min[number_of_stats],
+       rank_of_max[number_of_stats];
+   if (d_nproc > 1) {
+      mpi.AllReduce(min_num, k, MPI_MINLOC, rank_of_min);
+      mpi.AllReduce(max_num, k, MPI_MAXLOC, rank_of_max);
+      mpi.AllReduce(sum_num, k, MPI_SUM);
+   } else {
+      for (int i = 0; i < k; ++i) {
+         rank_of_min[i] = rank_of_max[i] = 0;
+      }
+   }
+
+   os.unsetf(std::ios::fixed | std::ios::scientific);
+   os.precision(3);
+
+   os << border
+      <<
+   "                               local        min               max           sum/N    sum/P\n";
+   for (int i = 0; i < k; ++i) {
+      os << border << std::setw(27) << std::left << names[i]
+      << ' ' << std::setw(8) << std::right << loc_num[i]
+      << ' ' << std::setw(8) << std::right << min_num[i] << " @ " << std::setw(
+         6) << std::left << rank_of_min[i]
+      << ' ' << std::setw(8) << std::right << max_num[i] << " @ " << std::setw(
+         6) << std::left << rank_of_max[i]
+      << ' ' << std::setw(8) << std::right
+      << (getBase().getGlobalNumberOfBoxes() > 0 ? static_cast<float>(sum_num[i]
+                                                                      / getBase().
+                                                                      getGlobalNumberOfBoxes()) :
+          0.0)
+      << ' ' << std::setw(8) << std::right << static_cast<float>(sum_num[i] / d_nproc)
+      << '\n';
+   }
+
+   // Write statistics that cannot be expressed as average over P processors or N MappedBoxes.
+   os << border
+      <<
+   "                               local        min               max             avg\n";
+   double local_relationship_fraction = loc_num[k_sum_relationships] ==
+      0 ? 0.0 : (double)loc_num[k_sum_local_relationships] / loc_num[k_sum_relationships];
+   double min_local_relationship_fraction = local_relationship_fraction;
+   double max_local_relationship_fraction = local_relationship_fraction;
+   double sum_local_relationship_fraction = local_relationship_fraction;
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&min_local_relationship_fraction, 1, MPI_MINLOC, rank_of_min);
+      mpi.AllReduce(&max_local_relationship_fraction, 1, MPI_MAXLOC, rank_of_max);
+      mpi.AllReduce(&sum_local_relationship_fraction, 1, MPI_SUM);
+   }
+   os << border << std::setw(27) << std::left << "local_relationship_fraction"
+   << ' ' << std::setw(8) << std::right << local_relationship_fraction
+   << ' ' << std::setw(8) << std::right << min_local_relationship_fraction << " @ "
+   << std::setw(6) << std::left << rank_of_min[0]
+   << ' ' << std::setw(8) << std::right << max_local_relationship_fraction << " @ "
+   << std::setw(6) << std::left << rank_of_max[0]
+   << ' ' << std::setw(8) << std::right
+   << (sum_num[k_sum_relationships] ==
+       0 ? 0.0 : (double)sum_num[k_sum_local_relationships] / sum_num[k_sum_relationships])
+   << '\n';
+   double local_ovlap_fraction = loc_num[k_sum_ovlap_size] ==
+      0 ? 0.0 : (double)loc_num[k_sum_local_ovlap_size]
+      / loc_num[k_sum_ovlap_size];
+   double min_local_ovlap_fraction = local_ovlap_fraction;
+   double max_local_ovlap_fraction = local_ovlap_fraction;
+   double sum_local_ovlap_fraction = local_ovlap_fraction;
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&min_local_ovlap_fraction, 1, MPI_MINLOC, rank_of_min);
+      mpi.AllReduce(&max_local_ovlap_fraction, 1, MPI_MAXLOC, rank_of_max);
+      mpi.AllReduce(&sum_local_ovlap_fraction, 1, MPI_SUM);
+   }
+   os << border << std::setw(27) << std::left << "local_ovlap_fraction"
+   << ' ' << std::setw(8) << std::right << local_ovlap_fraction
+   << ' ' << std::setw(8) << std::right << min_local_ovlap_fraction << " @ "
+   << std::setw(6) << std::left << rank_of_min[0]
+   << ' ' << std::setw(8) << std::right << max_local_ovlap_fraction << " @ "
+   << std::setw(6) << std::left << rank_of_max[0]
+   << ' ' << std::setw(8) << std::right
+   << (sum_num[k_sum_ovlap_size] ==
+       0 ? 0.0 : (double)sum_num[k_sum_local_ovlap_size]
+       / sum_num[k_sum_ovlap_size])
+   << '\n';
+}
+
+
+/*
+ ***********************************************************************
+ * Construct a Connector Outputter with formatting parameters.
+ ***********************************************************************
+ */
+
+Connector::Outputter::Outputter(
+   const Connector &connector,
+   const std::string& border,
+   int detail_depth )
+   : d_conn(connector),
+     d_border(border),
+     d_detail_depth(detail_depth)
+{
+   return;
+}
+
+
+/*
+ ***********************************************************************
+ * Print out a Connector according to settings in the Outputter.
+ ***********************************************************************
+ */
+
+std::ostream& operator << (
+   std::ostream& os,
+   const Connector::Outputter& format)
+{
+   format.d_conn.recursivePrint( os, format.d_border, format.d_detail_depth );
+   return os;
+}
+
+
+/*
+ ***********************************************************************
+ * Return a Outputter that can dump the Connector to a stream.
+ ***********************************************************************
+ */
+
+Connector::Outputter Connector::format(
+   const std::string& border,
+   int detail_depth ) const
+{
+   return Outputter( *this, border, detail_depth);
+}
+
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+Connector *Connector::makeGlobalizedCopy(
+   const Connector& other) const
+{
+   // Prevent wasteful accidental use when this method is not needed.
+   TBOX_ASSERT(other.getParallelState() != MappedBoxLevel::GLOBALIZED);
+
+   Connector* copy = new Connector(other);
+   copy->setParallelState(MappedBoxLevel::GLOBALIZED);
+   return copy;
+}
+
+/*
+ ***********************************************************************
+ * Run checkTransposeCorrectness and assert that no errors are found.
+ ***********************************************************************
+ */
+
+void Connector::assertTransposeCorrectness(
+   const Connector& input_transpose,
+   const bool ignore_periodic_relationships) const
+{
+   size_t err_count =
+      checkTransposeCorrectness(input_transpose, ignore_periodic_relationships);
+   if (err_count) {
+      TBOX_ERROR(
+         "Connector::assertTransposeCorrectness:\n"
+         << "Aborting with " << err_count << " transpose errors found:\n"
+         << "this base:\n" << getBase().format("B:", 3)
+         << "this head:\n" << getHead().format("H:", 3)
+         << "this Connector:\n" << format("B->H:", 3)
+         << "\ntranspose Connector:\n" << input_transpose.format("H->B:", 3));
+   }
+}
+
+/*
+ ***********************************************************************
+ *
+ * For every relationship in this, there should be reverse relationship in transpose.
+ *
+ * This method does not check whether the Connectors are defined to
+ * form logical transposes (based on their widths and their base and
+ * head mapped_box_levels).  For that, see isTransposeOf().
+ *
+ ***********************************************************************
+ */
+
+size_t Connector::checkTransposeCorrectness(
+   const Connector& input_transpose,
+   const bool ignore_periodic_relationships) const
+{
+   const tbox::Dimension dim(getBase().getDim());
+
+   const Connector* transpose =
+      (input_transpose.d_parallel_state == MappedBoxLevel::GLOBALIZED) ?
+      &input_transpose : makeGlobalizedCopy(input_transpose);
+
+   const MappedBoxLevel &head = getHead().getGlobalizedVersion();
+
+   const PeriodicShiftCatalog* shift_catalog =
+      PeriodicShiftCatalog::getCatalog(dim);
+
+   /*
+    * Check for extraneous relationships.
+    * For every relationship in this, there should be reverse relationship in transpose.
+    */
+   const NeighborhoodSet& this_relationships = getNeighborhoodSets();
+
+   MappedBox shifted_mapped_box(dim);   // Shifted version of an unshifted MappedBox.
+   MappedBox unshifted_mapped_box(dim); // Unhifted version of a shifted MappedBox.
+
+   size_t err_count = 0;
+
+   for (NeighborhoodSet::const_iterator ci = this_relationships.begin();
+        ci != this_relationships.end(); ++ci) {
+
+      const GlobalId& global_id = ci->first;
+      const MappedBox& mapped_box = *getBase().getMappedBox(global_id);
+
+      size_t err_count_for_current_index = 0;
+
+      const NeighborSet& nabrs = ci->second;
+
+      for (NeighborSet::const_iterator ni = nabrs.begin();
+           ni != nabrs.end(); ++ni) {
+
+         if (ignore_periodic_relationships && ni->isPeriodicImage()) {
+            continue;
+         }
+
+         const MappedBox& nabr = *ni;
+
+         const NeighborhoodSet& tran_relationships = transpose->getGlobalNeighborhoodSets();
+
+         const NeighborhoodSet::const_iterator cn =
+            tran_relationships.find(nabr.getGlobalId());
+
+         if (cn == tran_relationships.end()) {
+            tbox::perr << "\nConnector::checkTransposeCorrectness:\n"
+                       << "Local mapped_box " << mapped_box
+                       << " has relationship to " << nabr
+                       << " but " << nabr << " has no relationship container.\n";
+            ++err_count_for_current_index;
+            continue;
+         }
+
+         TBOX_ASSERT(cn->first == nabr.getGlobalId());
+         const NeighborSet& nabr_nabrs = cn->second;
+
+         NeighborSet::const_iterator nabr_ni;
+
+         if (nabr.isPeriodicImage()) {
+            shifted_mapped_box.initialize(
+               mapped_box,
+               shift_catalog->getOppositeShiftNumber(nabr.getPeriodicShiftNumber()),
+               getBase().getRefinementRatio());
+            nabr_ni = nabr_nabrs.find(shifted_mapped_box);
+         } else {
+            nabr_ni = nabr_nabrs.find(mapped_box);
+         }
+
+         if (nabr_ni == nabr_nabrs.end()) {
+            tbox::perr << "\nConnector::checkTransposeCorrectness:\n"
+                       << "Local mapped_box " << mapped_box;
+            if (nabr.isPeriodicImage()) {
+               tbox::perr << " (shifted version " << shifted_mapped_box << ")";
+            }
+            tbox::perr << " has relationship to " << nabr << " but "
+                       << nabr << " does not have the reverse relationship.\n"
+            ;
+            tbox::perr << "Neighbors of " << nabr << " are:\n";
+            for (NeighborSet::const_iterator nj = nabr_nabrs.begin();
+                 nj != nabr_nabrs.end(); ++nj) {
+               tbox::perr << *nj << std::endl;
+            }
+            ++err_count_for_current_index;
+            continue;
+         }
+
+      }
+
+      if (err_count_for_current_index > 0) {
+         tbox::perr << "Mapped_box " << mapped_box << " had "
+                    << err_count_for_current_index
+                    << " errors.  Neighbors are:\n";
+         for (NeighborSet::const_iterator nj = nabrs.begin();
+              nj != nabrs.end(); ++nj) {
+            tbox::perr << *nj << std::endl;
+         }
+         err_count += err_count_for_current_index;
+      }
+
+   }
+
+   /*
+    * Check for missing relationships:
+    * Transpose should not contain any relationship that does not correspond to
+    * one in this.
+    */
+
+   const NeighborhoodSet& tran_relationships = transpose->getGlobalNeighborhoodSets();
+
+   for (NeighborhoodSet::const_iterator ci = tran_relationships.begin();
+        ci != tran_relationships.end(); ++ci) {
+
+      const GlobalId& global_id = ci->first;
+      const NeighborSet& nabrs = ci->second;
+
+      size_t err_count_for_current_index = 0;
+
+      if (!head.hasMappedBox(global_id)) {
+         TBOX_ASSERT(head.hasMappedBox(global_id));
+      }
+      const MappedBox& head_mapped_box = *head.getMappedBoxStrict(global_id);
+
+      for (NeighborSet::const_iterator na = nabrs.begin();
+           na != nabrs.end(); ++na) {
+
+         const MappedBox nabr = *na;
+
+         if (nabr.getOwnerRank() == d_rank) {
+
+            if (ignore_periodic_relationships && nabr.isPeriodicImage()) {
+               continue;
+            }
+
+            if (!getBase().hasMappedBox(nabr)) {
+               tbox::perr << "\nConnector::checkTransposeCorrectness:\n"
+                          << "Head mapped_box " << head_mapped_box
+                          << " has neighbor " << nabr << "\n"
+                          << " but the neighbor does not exist "
+                          << "in the base mapped_box_level.\n";
+               tbox::perr << "Neighbors of head mapped_box "
+                          << global_id << " are:\n";
+               for (NeighborSet::const_iterator nj = nabrs.begin();
+                    nj != nabrs.end(); ++nj) {
+                  tbox::perr << *nj << std::endl;
+               }
+               ++err_count_for_current_index;
+               continue;
+            }
+
+            const MappedBox& base_mapped_box = *getBase().getMappedBoxStrict(
+                  nabr);
+
+            NeighborhoodSet::const_iterator nabr_nabrs_ =
+               this_relationships.find(base_mapped_box.getGlobalId());
+
+            if (nabr_nabrs_ == this_relationships.end()) {
+               tbox::perr << "\nConnector::checkTransposeCorrectness:\n"
+                          << "Head mapped_box " << head_mapped_box << "\n"
+                          << " has base mapped_box "
+                          << base_mapped_box << " as a neighbor.\n"
+                          << "But " << base_mapped_box
+                          << " has no neighbor container.\n";
+               tbox::perr << "Neighbors of head mapped_box " << MappedBoxId(
+                  global_id)
+                          << ":" << std::endl;
+               for (NeighborSet::const_iterator nj = nabrs.begin();
+                    nj != nabrs.end(); ++nj) {
+                  tbox::perr << *nj << std::endl;
+               }
+               ++err_count_for_current_index;
+               continue;
+            }
+
+            const NeighborSet& nabr_nabrs = nabr_nabrs_->second;
+
+            const MappedBox nabr_nabr(dim, global_id,
+                                      shift_catalog->getOppositeShiftNumber(
+                                         base_mapped_box.getPeriodicShiftNumber()));
+
+            NeighborSet::const_iterator found_nabr_ =
+               nabr_nabrs.find(nabr_nabr);
+
+            if (found_nabr_ == nabr_nabrs.end()) {
+               tbox::perr << "\nConnector::checkTransposeCorrectness:\n"
+                          << "Head mapped_box " << head_mapped_box << "\n"
+                          << " has base mapped_box " << base_mapped_box
+                          << " as a neighbor.\n"
+                          << "But base mapped_box " << base_mapped_box
+                          << " does not have a mapped_box indexed "
+                          << nabr_nabr.getId()
+                          << " in its neighbor list." << std::endl;
+               tbox::perr << "Neighbors of head mapped_box " << nabr_nabr.getId()
+                          << ":" << std::endl;
+               for (NeighborSet::const_iterator
+                    nj = nabrs.begin(); nj != nabrs.end(); ++nj) {
+                  tbox::perr << *nj << std::endl;
+               }
+               tbox::perr << "Neighbors of base mapped_box ";
+               if (nabr.isPeriodicImage()) {
+                  unshifted_mapped_box.initialize(
+                     nabr,
+                     shift_catalog->getZeroShiftNumber(),
+                     getBase().getRefinementRatio());
+                  tbox::perr << unshifted_mapped_box;
+               }
+               tbox::perr << ":" << std::endl;
+               for (NeighborSet::const_iterator nj = nabr_nabrs.begin();
+                    nj != nabr_nabrs.end(); ++nj) {
+                  tbox::perr << *nj << std::endl;
+               }
+               ++err_count_for_current_index;
+               continue;
+            }
+
+         }
+
+      }
+
+      if (err_count_for_current_index > 0) {
+         err_count += err_count_for_current_index;
+      }
+
+   }
+
+   if (transpose != &input_transpose) {
+      delete transpose;
+   }
+
+   return err_count;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+size_t Connector::checkConsistencyWithBase() const
+{
+   size_t num_errors = 0;
+   const NeighborhoodSet& relationships = getNeighborhoodSets();
+   NeighborhoodSet::const_iterator i_relationships;
+   for (i_relationships = relationships.begin(); i_relationships != relationships.end(); ++i_relationships) {
+      const GlobalId& global_id = (*i_relationships).first;
+      if (!getBase().hasMappedBox(global_id)) {
+         ++num_errors;
+         tbox::plog << "ERROR->"
+                    <<
+         "Connector::assertConsistencyWithBase: Neighbor data given "
+                    << "\nfor mapped_box " << global_id
+                    << " but the mapped_box does not exist.\n";
+      }
+   }
+   return num_errors;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void Connector::assertConsistencyWithBase() const
+{
+   if (checkConsistencyWithBase() > 0) {
+      TBOX_ERROR(
+         "Connector::assertConsistencyWithBase() found inconsistencies.\n"
+         << "Base mapped box level:\n" << getBase().format("ERROR->", 2));
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void Connector::computeNeighborhoodDifferences(
+   Connector& left_minus_right,
+   const Connector& left,
+   const Connector& right)
+{
+   if (0) {
+      tbox::plog << "Computing relationship differences, a:\n" << left.format(dbgbord, 3)
+                 << "Computing relationship differences, b:\n" << right.format(dbgbord, 3);
+   }
+   left_minus_right.initialize(left.d_base_handle->getMappedBoxLevel(),
+      left.d_head_handle->getMappedBoxLevel(),
+      left.d_base_width,
+      left.getParallelState());
+   const NeighborhoodSet& arelationships = left.getNeighborhoodSets();
+   const NeighborhoodSet& brelationships = right.getNeighborhoodSets();
+   NeighborhoodSet& drelationships = left_minus_right.d_relationships;
+
+   for (NeighborhoodSet::const_iterator ai = arelationships.begin(); ai != arelationships.end();
+        ++ai) {
+
+      const GlobalId& global_id = (*ai).first;
+      const NeighborSet& anabrs = (*ai).second;
+
+      NeighborhoodSet::const_iterator bi = brelationships.find(global_id);
+      if (bi != brelationships.end()) {
+         const NeighborSet& bnabrs = (*bi).second;
+         // Remove bi from ai.  Put results in a_minus_b.
+         NeighborSet& diff = drelationships[global_id];
+         std::insert_iterator<NeighborSet> ii(diff, diff.begin());
+         set_difference(anabrs.begin(),
+            anabrs.end(),
+            bnabrs.begin(),
+            bnabrs.end(),
+            ii);
+         if (diff.empty()) {
+            drelationships.erase(global_id);
+         }
+      } else if (!anabrs.empty()) {
+         drelationships[global_id] = anabrs;
+      }
+
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void Connector::assertConsistencyWithHead() const
+{
+   const int number_of_inconsistencies =
+      checkConsistencyWithHead();
+   if (number_of_inconsistencies > 0) {
+      TBOX_ERROR(
+         "Connector::assertConsistencyWithHead() found inconsistencies.\n"
+         << getBase().format("base-> ", 3)
+         << getHead().format("head-> ", 3)
+         << format("E-> ", 3));
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+size_t Connector::checkConsistencyWithHead() const
+{
+   const MappedBoxLevel &globalized_head = getHead().getGlobalizedVersion();
+
+   const int number_of_inconsistencies =
+      static_cast<int>(
+         checkConsistencyWithHead(
+            getNeighborhoodSets(),
+            globalized_head));
+
+   return number_of_inconsistencies;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+size_t Connector::checkConsistencyWithHead(
+   const NeighborhoodSet& relationships,
+   const MappedBoxLevel& head_mapped_box_level)
+{
+   TBOX_ASSERT(head_mapped_box_level.getParallelState() ==
+      MappedBoxLevel::GLOBALIZED);
+
+   const MappedBoxSet& head_mapped_boxes =
+      head_mapped_box_level.getGlobalMappedBoxes();
+
+   size_t number_of_inconsistencies = 0;
+
+   /*
+    * For each neighbor in each neighbor list,
+    * check that the neighbor is in the head_mapped_box_level.
+    */
+
+   for (NeighborhoodSet::const_iterator ei = relationships.begin();
+        ei != relationships.end(); ++ei) {
+
+      const GlobalId& global_id = ei->first;
+      const NeighborSet& nabrs = ei->second;
+
+      for (NeighborSet::const_iterator na = nabrs.begin();
+           na != nabrs.end(); ++na) {
+
+         const MappedBox& nabr = *na;
+         const MappedBox unshifted_nabr(
+            nabr, 0, head_mapped_box_level.getRefinementRatio());
+
+         MappedBoxSet::const_iterator na_in_head =
+            head_mapped_boxes.find(unshifted_nabr);
+
+         if (na_in_head == head_mapped_boxes.end()) {
+            tbox::perr << "\nConnector::checkConsistencyWithHead:\n"
+                       << "Neighbor list for mapped_box " << global_id << "\n"
+                       << "referenced nonexistent neighbor "
+                       << nabr << "\n";
+            tbox::perr << "Neighbors of mapped_box " << global_id << ":\n";
+            for (MappedBoxSet::const_iterator nb = nabrs.begin();
+                 nb != nabrs.end(); ++nb) {
+               tbox::perr << "    " << *nb << '\n';
+            }
+            ++number_of_inconsistencies;
+            continue;
+         }
+
+         const MappedBox& nabr_in_head = *na_in_head;
+         if (unshifted_nabr != nabr_in_head ||
+             unshifted_nabr.getBox() != nabr_in_head.getBox()) {
+            tbox::perr << "\nConnector::checkConsistencyWithHead:\n"
+                       << "Inconsistent mapped_box data at mapped_box "
+                       << global_id << "\n"
+                       << "Neighbor " << nabr << "(unshifted to "
+                       << unshifted_nabr << ") does not match "
+                       << "head mapped_box " << nabr_in_head
+                       << "\n";
+            ++number_of_inconsistencies;
+         }
+
+      }
+   }
+
+   return number_of_inconsistencies;
+}
+
+/*
+ ***************************************************************************
+ ***************************************************************************
+ */
+void Connector::setConnectorType(
+   ConnectorType connector_type)
+{
+   d_connector_type = connector_type;
+}
+
+/*
+ ***************************************************************************
+ ***************************************************************************
+ */
+Connector::ConnectorType Connector::getConnectorType() const
+{
+   return d_connector_type;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void Connector::initializeCallback()
+{
+   t_initialize = tbox::TimerManager::getManager()->
+      getTimer("hier::Connector::initialize()");
+   t_acquire_remote_relationships = tbox::TimerManager::getManager()->
+      getTimer("hier::Connector::acquire_remote_relationships");
+}
+
+/*
+ ***************************************************************************
+ *
+ * Release static timers.  To be called by shutdown registry to make sure
+ * memory for timers does not leak.
+ *
+ ***************************************************************************
+ */
+
+void Connector::finalizeCallback()
+{
+   t_initialize.setNull();
+   t_acquire_remote_relationships.setNull();
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/Connector.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/Connector.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,281 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Set of relationships incident from a mapped_box_level of a distributed box graph. 
+ *
+ ************************************************************************/
+#include "SAMRAI/hier/Connector.h"
+
+#include "SAMRAI/hier/MappedBoxLevelHandle.h"
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+bool Connector::isInitialized() const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   /*
+    * The base and head mapped_box_level handles should have
+    * been initialized when this object was initialized.
+    * They should remain initialized as long as they are
+    * referenced by a Connector.  Because this check may
+    * occur when the base and head MappedBoxLevels are in
+    * transition, we don't require that the MappedBoxLevels
+    * themselves be initialized.
+    */
+   if (d_nproc != BAD_INT) {
+      TBOX_ASSERT(!d_base_handle.isNull());
+      TBOX_ASSERT(!d_head_handle.isNull());
+   }
+#endif
+   return d_nproc != BAD_INT;
+}
+
+SAMRAI_INLINE_KEYWORD
+MappedBoxLevel::ParallelState Connector::getParallelState() const
+{
+   return d_parallel_state;
+}
+
+SAMRAI_INLINE_KEYWORD
+const tbox::SAMRAI_MPI& Connector::getMPI() const
+{
+   TBOX_ASSERT(isInitialized());
+
+   return d_base_handle->getMappedBoxLevel().getMPI();
+}
+
+SAMRAI_INLINE_KEYWORD
+int Connector::getRank() const
+{
+   return d_rank;
+}
+
+SAMRAI_INLINE_KEYWORD
+int Connector::getNproc() const
+{
+   return d_nproc;
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::IntVector& Connector::getConnectorWidth() const
+{
+   TBOX_ASSERT(isInitialized());
+   return d_base_width;
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::MappedBoxLevel& Connector::getBase() const
+{
+   TBOX_ASSERT(isInitialized());
+   return d_base_handle->getMappedBoxLevel();
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::MappedBoxLevel& Connector::getHead() const
+{
+   TBOX_ASSERT(isInitialized());
+   return d_head_handle->getMappedBoxLevel();
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::IntVector& Connector::getRatio() const
+{
+   TBOX_ASSERT(isInitialized());
+   return d_ratio;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool Connector::getHeadCoarserFlag() const
+{
+   TBOX_ASSERT(isInitialized());
+   return d_head_coarser;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+bool Connector::hasNeighborSet(
+   const LocalId local_id) const
+{
+   const GlobalId global_id(local_id, d_rank);
+   const NeighborhoodSet& relationships = d_parallel_state == MappedBoxLevel::DISTRIBUTED ?
+      d_relationships : d_global_relationships;
+   NeighborhoodSet::const_iterator ei = relationships.find(global_id);
+   return ei != relationships.end();
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+bool Connector::hasNeighborSet(
+   const GlobalId& global_id) const
+{
+   if (d_parallel_state == MappedBoxLevel::DISTRIBUTED) {
+      TBOX_ASSERT(global_id.getOwnerRank() == d_rank);
+   }
+   const NeighborhoodSet& relationships = d_parallel_state == MappedBoxLevel::DISTRIBUTED ?
+      d_relationships : d_global_relationships;
+   NeighborhoodSet::const_iterator ei = relationships.find(global_id);
+   return ei != relationships.end();
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+const Connector::NeighborSet& Connector::getNeighborSet(
+   const LocalId local_id) const
+{
+   const GlobalId global_id(local_id, d_rank);
+   const NeighborhoodSet& relationships = d_parallel_state == MappedBoxLevel::DISTRIBUTED ?
+      d_relationships : d_global_relationships;
+   NeighborhoodSet::const_iterator ei = relationships.find(global_id);
+   if (ei == relationships.end()) {
+      TBOX_ERROR("Connector::getNeighborSet: No neighbor set exists for\n"
+         << "mapped_box " << global_id << ".\n");
+   }
+   return ei->second;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+const Connector::NeighborSet& Connector::getNeighborSet(
+   const GlobalId& global_id) const
+{
+   if (d_parallel_state == MappedBoxLevel::DISTRIBUTED) {
+      TBOX_ASSERT(global_id.getOwnerRank() == d_rank);
+   }
+   const NeighborhoodSet& relationships = d_parallel_state == MappedBoxLevel::DISTRIBUTED ?
+      d_relationships : d_global_relationships;
+   NeighborhoodSet::const_iterator ei = relationships.find(global_id);
+   if (ei == relationships.end()) {
+      TBOX_ERROR("Connector::getNeighborSet: No neighbor set exists for\n"
+         << "mapped_box " << global_id << ".\n");
+   }
+   return ei->second;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+const Connector& Connector::operator = (
+   const Connector& rhs)
+{
+   if (this != &rhs) {
+      d_base_handle = rhs.d_base_handle;
+      d_global_data_up_to_date = rhs.d_global_data_up_to_date;
+      d_global_number_of_neighbor_sets = rhs.d_global_number_of_neighbor_sets;
+      d_head_handle = rhs.d_head_handle;
+      d_global_number_of_relationships = rhs.d_global_number_of_relationships;
+      d_relationships = rhs.d_relationships;
+      d_global_relationships = rhs.d_global_relationships;
+      d_base_width = rhs.d_base_width;
+      d_ratio = rhs.d_ratio;
+      d_head_coarser = rhs.d_head_coarser;
+      d_parallel_state = rhs.d_parallel_state;
+      d_nproc = rhs.d_nproc;
+      d_rank = rhs.d_rank;
+      d_connector_type = rhs.d_connector_type;
+   }
+   return *this;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+bool Connector::operator == (
+   const Connector& rhs) const
+{
+   if (this == &rhs) {
+      return true;
+   }
+   // Note: two uninitialized Connectors always compare equal.
+   if (!isInitialized() && !rhs.isInitialized()) {
+      return true;
+   }
+   if (!isInitialized() && rhs.isInitialized()) {
+      return false;
+   }
+   if (isInitialized() && !rhs.isInitialized()) {
+      return false;
+   }
+
+   // Compare only independent attributes.
+   if (d_base_width != rhs.d_base_width) {
+      return false;
+   }
+   if (d_base_handle->getMappedBoxLevel() !=
+       rhs.d_base_handle->getMappedBoxLevel()) {
+      return false;
+   }
+   if (d_head_handle->getMappedBoxLevel() !=
+       rhs.d_head_handle->getMappedBoxLevel()) {
+      return false;
+   }
+   if (getNeighborhoodSets() != rhs.getNeighborhoodSets()) {
+      return false;
+   }
+
+   return true;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+bool Connector::operator != (
+   const Connector& rhs) const
+{
+   if (this == &rhs) {
+      return false;
+   }
+   // Note: two uninitialized Connectors always compare equal.
+   if (!isInitialized() && !rhs.isInitialized()) {
+      return false;
+   }
+   if (!isInitialized() && rhs.isInitialized()) {
+      return true;
+   }
+   if (isInitialized() && !rhs.isInitialized()) {
+      return true;
+   }
+
+   // Compare only independent attributes.
+   if (d_base_width != rhs.d_base_width) {
+      return true;
+   }
+   if (d_base_handle->getMappedBoxLevel() !=
+       rhs.d_base_handle->getMappedBoxLevel()) {
+      return true;
+   }
+   if (d_head_handle->getMappedBoxLevel() !=
+       rhs.d_head_handle->getMappedBoxLevel()) {
+      return true;
+   }
+   if (getNeighborhoodSets() != rhs.getNeighborhoodSets()) {
+      return true;
+   }
+
+   return false;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/Connector.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/Connector.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1044 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Set of distributed box-graph relationships from one MappedBoxLevel to another. 
+ *
+ ************************************************************************/
+#ifndef included_hier_Connector
+#define included_hier_Connector
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/MappedBox.h"
+#include "SAMRAI/hier/MappedBoxLevel.h"
+#include "SAMRAI/hier/NeighborhoodSet.h"
+#include "SAMRAI/tbox/Timer.h"
+
+#include <vector>
+#include <string>
+
+namespace SAMRAI {
+namespace hier {
+
+class MappedBoxLevelHandle;
+class SAMRAI_MPI;
+
+/*!
+ * @brief A container which holds relationship connections between two
+ * MappedBoxLevels.
+ *
+ * Connectors have a notion of a "base" and a "head", representing a
+ * directional relationship between two MappedBoxLevels.  The relationships
+ * are a collection of MappedBoxes in the head, pointed to by a MappedBox in
+ * the base.   The association between base and head relationships is
+ * 1 .. 0-many.  That is, one MappedBox in the base can be related to zero or
+ * more MappedBoxes (called its NeighborSet) in the head.
+ *
+ * @par Usage
+ * Connections in a Connector can have three possible relationships:
+ *
+ * # A MappedBox in the base has no related NeighborSet.  In this case,
+ *   the MappedBox in the base will exist as-is in the head.
+ * # A MappedBox in the base has NeighborSet which is empty.  In this case, the
+ *   MappedBox from the base will not exist in the head MappedBoxLevel.
+ * # A MappedBox in the base has a corresponding NeighborSet which in
+ *   non-empty.  In this case, the NeighborSet contains the set of MappedBoxes
+ *   to which the MappedBox in the base is related.
+ */
+
+class Connector:public tbox::DescribedClass
+{
+public:
+   /*!
+    * @brief NeighborsSet is a clarifying typedef.
+    */
+   typedef MappedBoxSet NeighborSet;
+
+
+   /// TODO:  Possible refactor?  Since Connectors do not imply relationship
+   // meanings, why is this even defined?  The "getConnectorType function
+   // is never called; The individual types are never used except in
+   // conjunction with the "setConnectorType" function.  This seems to be
+   // a useless enumeration producing unused code.  SGH.
+
+   /*!
+    * @brief Types of Connectors
+    *
+    * The types describe the meaning of the relationships in a Connector.
+    *
+    * @b COMPLETE_OVERLAP: The relationships represent overlaps, and every
+    * overlap is represented by an relationship, including overlaps with
+    * periodic images.
+    *
+    * @b COMPLETE_OVERLAP_NO_PERIODIC: The relationships represent overlaps,
+    * and every overlap is represented by an relationship.  Overlaps with
+    * periodic images are omitted.
+    *
+    * @b INCOMPLETE_OVERLAP: The relationships represent overlaps, but not
+    * all overlaps are represented.
+    *
+    * @b BASE_GENERATED: The head is generated from the base.  Each
+    * head MappedBox comes from a base MappedBox and there is an relationship
+    * from the base MappedBox to the head MappedBox.
+    *
+    * @b MAPPING: relationships indicate a mapping relationship.  Applying
+    * the map would change Connectors incident to the base into
+    * Connectors incident to the head.
+    *
+    * @b UNKNOWN: Meaning of relationships are unknown.
+    *
+    * See setConnectorType(), getConnectorType().
+    *
+    * The Connector types are not exclusive.  For example, a mapping
+    * Connector may also be used as an overlap Connector.
+    */
+   enum ConnectorType {
+      COMPLETE_OVERLAP = 1,
+      COMPLETE_OVERLAP_NO_PERIODIC = 2,
+      INCOMPLETE_OVERLAP = 3,
+      BASE_GENERATED = 4,
+      MAPPING = 5,
+      UNKNOWN = 6
+   };
+
+   /*!
+    * @brief Creates an uninitialized Connector object in the
+    * distributed state.
+    *
+    * @see initialize()
+    * @see swapInitialize()
+    */
+   Connector();
+
+   /*!
+    * @brief Copy constructor.
+    *
+    * @param[in] other
+    */
+   Connector(
+      const Connector& other);
+
+   /*!
+    * @brief Creates an initialized Connector with the given relationships.
+    *
+    * @param[in] base_mapped_box_level
+    * @param[in] head_mapped_box_level
+    * @param[in] base_width
+    * @param[in] relationships
+    * @param[in] parallel_state
+    */
+   explicit Connector(
+      const MappedBoxLevel& base_mapped_box_level,
+      const MappedBoxLevel& head_mapped_box_level,
+      const IntVector& base_width,
+      const NeighborhoodSet& relationships,
+      const MappedBoxLevel::ParallelState parallel_state = MappedBoxLevel::DISTRIBUTED);
+
+   /*!
+    * @brief Initialize a Connector with no defined relationships.
+    *
+    * The Connector's relationships are initialized to a dummy state.
+    *
+    * @param[in] base_mapped_box_level
+    * @param[in] head_mapped_box_level
+    * @param[in] base_width
+    * @param[in] parallel_state
+    */
+   explicit Connector(
+      const MappedBoxLevel& base_mapped_box_level,
+      const MappedBoxLevel& head_mapped_box_level,
+      const IntVector& base_width,
+      const MappedBoxLevel::ParallelState parallel_state = MappedBoxLevel::DISTRIBUTED);
+
+   /*!
+    * @brief Destructor.
+    */
+   virtual ~Connector();
+
+   /*!
+    * @brief Initializes the Connector.
+    *
+    * The Connector is initialized with the provided information.
+    *
+    * Consistency with the base and head requires that the relationships be
+    * from an existing MappedBox in the base to an existing MappedBox
+    * in the head.
+    *
+    * @par Assertions
+    * With assertion checking turned on, this function will check for
+    * base consistency only.  Consistency with the head is not checked
+    * explicitly.
+    *
+    * @param[in] base
+    * @param[in] head
+    * @param[in] base_width The Connector width associated with the meaning of the
+    *   relationships, specified in base refinement ratio.
+    * @param[in] parallel_state Either DISTRIBUTED or GLOBALIZED.
+    *   If state is GLOBALIZED, base must be in GLOBALIZED mode.
+    * @param[in] relationships The input relationship data.  For DISTRIBUTED state, we
+    *   disregard relationships from remote MappedBoxes.
+    *
+    * @see initializePrivate()
+    * @see checkConsistencyWithBase()
+    * @see checkConsistencyWithHead()
+    *
+    */
+   void
+   initialize(
+      const MappedBoxLevel& base,
+      const MappedBoxLevel& head,
+      const IntVector& base_width,
+      const NeighborhoodSet& relationships,
+      const MappedBoxLevel::ParallelState parallel_state = MappedBoxLevel::DISTRIBUTED);
+
+   /*!
+    * @brief Initializes the Connector without any relationships.
+    *
+    * @param[in] base
+    * @param[in] head
+    * @param[in] base_width The Connector width, specified in the base
+    *   refinement ratio, associated with the meaning of the relationships to be
+    *   added to the Connector.
+    * @param[in] parallel_state Either DISTRIBUTED or GLOBALIZED.
+    *   If state is GLOBALIZED, base must be in GLOBALIZED mode.
+    *
+    * @see swapInitialize()
+    * @see initializePrivate()
+    *
+    */
+   void
+   initialize(
+      const MappedBoxLevel& base,
+      const MappedBoxLevel& head,
+      const IntVector& base_width,
+      const MappedBoxLevel::ParallelState parallel_state = MappedBoxLevel::DISTRIBUTED);
+
+   /*!
+    * @brief Set data defining the relationship set.
+    *
+    * @param[in] base
+    * @param[in] head
+    * @param[in] base_width
+    * @param[out] relationships
+    * @param[in] parallel_state
+    *
+    * POST-CONDITION:  @c relationships contains the NeighborhoodSet.
+    *
+    * @see initializePrivate()
+    *
+    */
+   void
+   swapInitialize(
+      const MappedBoxLevel& base,
+      const MappedBoxLevel& head,
+      const IntVector& base_width,
+      NeighborhoodSet& relationships,
+      const MappedBoxLevel::ParallelState parallel_state = MappedBoxLevel::DISTRIBUTED);
+
+   /*!
+    * @brief Clear the Connector, putting it into an uninitialized state.
+    */
+   void
+   clear();
+
+   /*!
+    * @brief Returns true if the object has been initialized
+    */
+   bool
+   isInitialized() const;
+
+   /*!
+    * @brief Return relationships from local base MappedBoxes.
+    */
+   const NeighborhoodSet&
+   getNeighborhoodSets() const;
+
+   /*!
+    * @brief Return the globalized relationship data.
+    *
+    * @par Assertions
+    * Throws an unrecoverable assertion if not in GLOBALIZED mode.
+    */
+   const NeighborhoodSet&
+   getGlobalNeighborhoodSets() const;
+
+   /*!
+    * @brief Returns the iterator range of relationships for a given rank.
+    *
+    * @par Assertions
+    * The iterators apply to the container getGlobalNeighborhoodSets(), so it
+    * only works in GLOBALIZED mode.  This method throws an unrecoverable
+    * assertion if not in GLOBALIZED mode.
+    * @note
+    * If range's end points are the same, then the range is empty.
+    *
+    * @param[in] rank
+    */
+   NeighborhoodSet::ConstRange
+   getNeighborhoodSets(
+      int rank) const;
+
+   /*!
+    * @brief Return true if a neighbor set exists for the specified
+    * LocalId.
+    *
+    * @param[in] local_id
+    */
+   bool
+   hasNeighborSet(
+      const LocalId local_id) const;
+
+   /*!
+    * @brief Return true if a neighbor set exists for the specified
+    * GlobalId.
+    *
+    * @param[in] global_id
+    */
+   bool
+   hasNeighborSet(
+      const GlobalId& global_id) const;
+
+   /*!
+    * @brief Return the NeighborSet for the specified LocalId.
+    *
+    * @param[in] local_id
+    */
+   const NeighborSet&
+   getNeighborSet(
+      const LocalId local_id) const;
+
+   /*!
+    * @brief Return the neighbor set for the specified GlobalId.
+    *
+    * @param[in] global_id
+    */
+   const NeighborSet&
+   getNeighborSet(
+      const GlobalId& global_id) const;
+
+   //@{
+   /*!
+    * @name Algorithms for changing individual MappedBox's neighbor data
+    */
+
+   /*!
+    * @brief Insert additional neighbors for the specified MappedBox.
+    *
+    * @param[in] neighbors
+    * @param[in] global_id
+    */
+   void
+   insertNeighbors(
+      const NeighborSet& neighbors,
+      const GlobalId& global_id);
+
+   /*!
+    * @brief Erase neighbor of the specified GlobalId.
+    *
+    * @note Assertions
+    * It is an error to to specify a non-existent GlobalId.
+    *
+    * @param[in] neighbor
+    * @param[in] global_id
+    */
+   void
+   eraseNeighbor(
+      const MappedBox& neighbor,
+      const GlobalId& global_id);
+
+   /*!
+    * @brief Set the neighbors for the specified GlobalId to the
+    * given set by swapping the sets.
+    *
+    * If no neighbor set exists for the specified GlobalId, an empty
+    * set is first created for swapping.
+    *
+    * @param[out] neighbors
+    * @param[in] global_id
+    */
+   void
+   swapNeighbors(
+      NeighborSet& neighbors,
+      const GlobalId& global_id);
+
+   /*!
+    * @brief Clear neighbor set for the specified GlobalId.
+    *
+    * If remove_neighbor_set is true, this method also removes the
+    * empty neighbor set for GlobalId.
+    *
+    * @param[in] global_id
+    * @param[in] remove_neighbor_set @b DEFAULT: false
+    */
+   void
+   clearNeighbors(
+      const GlobalId& global_id,
+      bool remove_neighbor_set = false);
+
+   /*!
+    * @brief Remove empty sets of neighbors.
+    */
+   void
+   eraseEmptyNeighborSets();
+
+   //@}
+
+   /*!
+    * @brief Return a reference to the base MappedBoxLevel.
+    */
+   const MappedBoxLevel&
+   getBase() const;
+
+   /*!
+    * @brief Return a reference to the head MappedBoxLevel.
+    */
+   const MappedBoxLevel&
+   getHead() const;
+
+   /*!
+    * @brief Get the refinement ratio between the base and head
+    * MappedBoxLevels.
+    *
+    * The ratio is the same regardless of which is the coarser of the two.
+    * Use getHeadCoarserFlag() to determine which is coarser.
+    */
+   const IntVector&
+   getRatio() const;
+
+   /*!
+    * @brief Return true if head MappedBoxLevel is coarser than base
+    * MappedBoxLevel.
+    */
+   bool
+   getHeadCoarserFlag() const;
+
+   /*!
+    * @brief Return true if the Connector contains only relationships to local
+    * MappedBoxes.
+    *
+    * The check only applies to neighbors of local base MappedBoxes,
+    * so it is possible for the results to be different on different
+    * processors.
+    */
+   bool
+   isLocal() const;
+
+   /*!
+    * @brief Initialize to the transpose of a given Connector object,
+    * assuming that all relationships are local (no remote neighbors).
+    *
+    * If any remote neighbor is found an unrecoverable assertion is
+    * thrown.
+    *
+    * Non-periodic relationships in @c connector are simply reversed to get the
+    * transpose relationship.  For each periodic relationships in @c connector, we create a
+    * periodic relationship incident from @c connector's unshifted head neighbor to
+    * @c connectors's shifted base neighbor.  This is because all relationships must be
+    * incident from a real (unshifted) MappedBox.
+    *
+    * @param[in] connector
+    */
+   void
+   initializeToLocalTranspose(
+      const Connector& connector);
+
+   /*!
+    * @brief Assignment operator
+    */
+   const Connector&
+   operator= (
+      const Connector& rhs);
+
+   //  TODO:  need to find out what the use case is for this, especially
+   //  considering the caution statement.
+   /*!
+    * @brief Equality operator checks relationship data, Connector width and
+    * equality of base and head MappedBox pointers.
+    *
+    * @par CAUTION
+    * Equality here means just the local parts are equal.
+    * This means that one processor may see the equality differently
+    * from another.
+    *
+    * The cost for the comparison is on the order of the local relationship
+    * count.  However, an object may be compared to itself, an
+    * efficient operation that always returns true.  When comparing
+    * Connector objects, if you expect equality to hold, using the
+    * same objects would improve performance.
+    */
+   bool
+   operator== (
+      const Connector& rhs) const;
+
+   /*!
+    * @brief Inequality operator checks the same data that equality
+    * operator checks.
+    *
+    * @see operator==( const Connector &rhs );
+    */
+   bool
+   operator != (
+      const Connector& rhs) const;
+
+   /*!
+    * @brief Swap the contents of two Connector objects.
+    */
+   static void
+   swap(
+      Connector& a,
+      Connector& b);
+
+   /*!
+    * @brief Set the parallel distribution state.
+    *
+    * Before a Connector can be in a GLOBALIZED state, The base
+    * MappedBoxLevel given in initialize() must already be in
+    * GLOBALIZED mode.  The base MappedBoxLevel should remain in
+    * GLOBALIZED mode for compatibility with the Connector.
+    *
+    * This method is not necessarily trivial.  More memory is required
+    * to store additional relationships.
+    *
+    * For serial (one processor) runs, there is no difference between
+    * the parallel states (except for the names), and there is no real
+    * cost for switching parallel states.
+    *
+    * @param[in] parallel_state
+    */
+   void
+   setParallelState(
+      const MappedBoxLevel::ParallelState parallel_state);
+
+   /*!
+    * @brief Return the current parallel state.
+    */
+   MappedBoxLevel::ParallelState
+   getParallelState() const;
+
+   /*!
+    * @brief Returns the MPI communication object, which is always
+    * that of the base MappedBoxLevel.
+    */
+   const tbox::SAMRAI_MPI&
+   getMPI() const;
+
+   /*!
+    * @return Processor rank in the internal MPI communicator.
+    *
+    * This is redundant information.  You can obtain it from the MPI
+    * Communicator.
+    */
+   int
+   getRank() const;
+
+   /*!
+    * @return Number of processes for the internal MPI communicator.
+    *
+    * This is redundant information.  You can obtain it from the MPI
+    * Communicator.
+    */
+   int
+   getNproc() const;
+
+   /*!
+    * @brief Return the Connector width associated with the relationships.
+    *
+    * For overlap Connectors, an relationship exists between a base and head
+    * MappedBoxes if the base mapped_box, grown by this width,
+    * overlaps the head mapped_box.  For mapping Connectors, the width
+    * the amount that a pre-map box must grow to nest the post-map
+    * boxes.
+    */
+   const IntVector&
+   getConnectorWidth() const;
+
+   //@{
+   /*!
+    * @name For outputs, error checking and debugging.
+    */
+
+
+   /*
+    * @brief output data
+    *
+    * @param[in,out] os The output stream
+    * @param[in] border
+    * @param[in] detail_depth
+    */
+   void
+   recursivePrint(
+      std::ostream& os,
+      const std::string& border,
+      int detail_depth = 0) const;
+
+   /*!
+    * @brief Print out statistics on the relationships.
+    *
+    * Requires communication, so all processors must call this.
+    *
+    * @param[in,out] os The output stream
+    * @param[in] border
+    */
+   void
+   printNeighborStats(
+      std::ostream& co,
+      const std::string& border) const;
+
+   /*!
+    * @brief Return true if two Connector objects are
+    * transposes of each other.
+    *
+    * Each Connector represents a set of directed relationships incident from its base
+    * to its head.  The transpose represent the relationships in the opposite
+    * direction.  In order for two Connector objects to be transpose of each
+    * other, their Connector widths and base refinement ratios must be
+    * such that an relationship in one set also appears in the other set.
+    * A transpose set must have
+    * @li base and head MappedBoxLevels reversed from the untransposed set.
+    * @li the same Connector width, although it is described in the index
+    *     space of a different base MappedBoxLevel.
+    *
+    * @param[in] other
+    */
+   bool
+   isTransposeOf(
+      const Connector& other) const;
+
+   /*!
+    * @brief Given the Connector width in the head index space, convert
+    * it to the base index space.
+    *
+    * This method is useful for computing Connector widths for
+    * transpose Connectors.  It handles negative refinement ratios. By
+    * SAMRAI convention, a refinement ratio of -N is interpreted as
+    * 1/N.)
+    *
+    * This method is static because (1) it has nothing to do with an
+    * existing Connector object, and (2) it is often used to compute a
+    * Connector's initializing data.
+    *
+    * @param[in] base_refinement_ratio
+    * @param[in] head_refinement_ratio
+    * @param[in] head_gcw The connector width in the head index space.
+    *
+    * @return A copy of the connector width converted to the base index
+    * space.
+    */
+   static IntVector
+   convertHeadWidthToBase(
+      const IntVector& base_refinement_ratio,
+      const IntVector& head_refinement_ratio,
+      const IntVector& head_gcw);
+
+
+   // TODO: refactor use of size_t as return type.  This could be
+   // problematic.
+   /*!
+    * @brief Check for consistency between the relationship data and base
+    * mapped boxes, and return the number of consistency errors.
+    *
+    * Consistency stipulates that each neighbor list must correspond to
+    * a base mapped box.
+    *
+    * relationship consistency errors should be treated as fatal because many
+    * operations assume consistency.
+    */
+   size_t
+   checkConsistencyWithBase() const;
+
+   /*!
+    * @brief Run checkConsistencyWithBase().
+    *
+    * If any inconsistency is
+    * found, write out diagnostic information and throw an
+    * unrecoverable assertion is found.
+    */
+   void
+   assertConsistencyWithBase() const;
+
+   /*!
+    * @brief Check that the neighbors specified by the relationships exist in
+    * the head MappedBoxLevel.
+    *
+    * If the head is not GLOBALIZED, a temporary copy is made and
+    * globalized for checking, triggering communication.
+    *
+    * @return number of inconsistencies found.
+    */
+
+   size_t
+   checkConsistencyWithHead() const;
+
+   /*!
+    * @brief Run checkConsistencyWithBase().  If any inconsistency is
+    * found, write out diagnostic information and throw an
+    * unrecoverable assertion.
+    */
+   void
+   assertConsistencyWithHead() const;
+
+   /*!
+    * @brief Check that MappedBoxes referenced by the given NeighborhoodSet
+    * match those in the given MappedBoxLevel.
+    *
+    * This method is static so users can check data without having to
+    * put it in a Connector object.  Connectors prohibit initializing
+    * with inconsistent data.
+    *
+    * @param[in] relationships
+    * @param[in] head_mapped_box_level
+    *
+    * @return number of inconsistencies found.
+    */
+   static size_t
+   checkConsistencyWithHead(
+      const NeighborhoodSet& relationships,
+      const MappedBoxLevel& head_mapped_box_level);
+
+   /*!
+    * @brief Compute the differences between two relationship sets.
+    *
+    * Given Connectors @c left_connector and @c right_connector,
+    * compute the relationships that are in @c left_connector but not in
+    * @c right_connector.
+    *
+    * @param[out] left_minus_right
+    * @param[in] left_connector
+    * @param[in] right_connector
+    */
+   static void
+   computeNeighborhoodDifferences(
+      Connector& left_minus_right,
+      const Connector& left_connector,
+      const Connector& right_connector);
+
+   /*!
+    * @brief Check that the relationships are a correct transpose of another
+    * Connector and return the number of erroneous relationships.
+    *
+    * For every relationship in this Connector, there should be a corresponding relationship
+    * in the transpose Connector.  Any missing or extra relationship constitutes
+    * an error.
+    *
+    * Errors found are written to perr.
+    *
+    * @param[in] transpose
+    * @param[in] ignore_periodic_relationships
+    *
+    * @return Number of errors in assuming that @c transpose is a
+    * transpose of @c *this.
+    */
+   size_t
+   checkTransposeCorrectness(
+      const Connector& transpose,
+      const bool ignore_periodic_relationships = false) const;
+
+   /*!
+    * @brief Run checkTransposeCorrectness.  If any errors are found,
+    * print out diagnostic information and throw an unrecoverable
+    * assertion.
+    *
+    * @param[in] transpose
+    * @param[in] ignore_periodic_relationships
+    */
+   void
+   assertTransposeCorrectness(
+      const Connector& transpose,
+      const bool ignore_periodic_relationships = false) const;
+
+   //@}
+
+   /*!
+    * @brief Set the Connector type.
+    *
+    * @param[in] connector_type
+    */
+   void
+   setConnectorType(
+      ConnectorType connector_type);
+
+   /*!
+    * @brief Return the Connector type.
+    */
+   ConnectorType
+   getConnectorType() const;
+
+   // TODO:  refactor size_t
+   /*!
+    * @brief Return local number of neighbor sets.
+    */
+   size_t
+   getLocalNumberOfNeighborSets() const;
+
+   // TODO: refactor size_t
+   /*!
+    * @brief Return local number of relationships.
+    */
+   size_t
+   getLocalNumberOfRelationships() const;
+
+   /*!
+    * @brief Return global number of neighbor sets.
+    *
+    * This requires a global sum reduction, if the global size has not
+    * been computed and cached.  When communication is required, all
+    * processors must call this method.  To ensure that no
+    * communication is needed, call cacheGlobalReducedData() first.
+    */
+   int
+   getGlobalNumberOfNeighborSets() const;
+
+   /*!
+    * @brief Return global number of relationships.
+    *
+    * This requires a global sum reduction if the global size has not
+    * been computed and cached.  When communication is required, all
+    * processors must call this method.  To ensure that no
+    * communication is needed, call cacheGlobalReducedData() first.
+    */
+   int
+   getGlobalNumberOfRelationships() const;
+
+   /*!
+    * @brief If global reduced data (global number of relationships,
+    * etc.) has not been updated, compute and cache them
+    * (communication required).
+    *
+    * After this method is called, data requiring global reduction can
+    * be accessed without further communications, until the object
+    * changes.
+    *
+    * Sets d_global_data_up_to_date;
+    */
+   void
+   cacheGlobalReducedData() const;
+
+   /*!
+    * @brief A class for outputting Connector.
+    *
+    * This class simplifies the insertion of a Connector into a stream
+    * while letting the user control how the Connector is formatted
+    * for output.
+    *
+    * Each Outputter is a light-weight object constructed with a
+    * Connector and output parameters.  The Outputter is capable of
+    * outputting its Connector, formatted according to the parameters.
+    *
+    * To use, @see Connector::format().
+    */
+   class Outputter {
+      friend std::ostream& operator << ( std::ostream& s, const Outputter& f);
+   private:
+      friend class Connector;
+      /*!
+       * @brief Construct the Outputter with a Connector and the
+       * parameters needed to output the Connector to a stream.
+       */
+      Outputter( const Connector &connector,
+                 const std::string& border,
+                 int detail_depth = 0);
+      void operator=( const Outputter &r ); // Unimplemented private.
+      const Connector &d_conn;
+      const std::string d_border;
+      const int d_detail_depth;
+   };
+
+   /*!
+    * @brief Return an Outputter object that is formatted
+    * insertion into output streams.
+    *
+    * Usage example:
+    * @code
+    *    cout << "my connector:\n"
+    *         << connector.format("  ", 2) << endl;
+    * @endcode
+    *
+    * @param[in] border
+    * @param[in] detail_depth
+    */
+   Outputter format( const std::string& border,
+                     int detail_depth = 0 ) const;
+
+private:
+   enum { BAD_INT = (1 << (8 * sizeof(int) - 2)) };
+
+   /*
+    * @brief Create a copy of a DISTRIBUTED Connector and
+    * change its state to GLOBALIZED.
+    *
+    * The returned object should be deleted to prevent memory leaks.
+    */
+   Connector *
+   makeGlobalizedCopy(
+      const Connector& other) const;
+
+   /*!
+    * @brief Get and store info on remote MappedBoxes.
+    *
+    * This requires global communication (all gather).
+    * Call acquireRemoteNeighborhoods_pack to pack up messages.
+    * Do an all-gather.  Call acquireRemoteNeighborhoods_unpack
+    * to unpack data from other processors.
+    */
+   void
+   acquireRemoteNeighborhoods();
+
+   //! @brief Pack local MappedBoxes into an integer array.
+   void
+   acquireRemoteNeighborhoods_pack(
+      std::vector<int>& send_mesg,
+      int offset) const;
+
+   //! @brief Unpack MappedBoxes from an integer array into internal storage.
+   void
+   acquireRemoteNeighborhoods_unpack(
+      const std::vector<int>& recv_mesg,
+      const std::vector<int>& proc_offset);
+
+   /*! @brief Encapsulates functionality common to all initialization
+    *  functions.
+    */
+   void
+   initializePrivate(
+      const MappedBoxLevel& base,
+      const MappedBoxLevel& head,
+      const IntVector& base_width,
+      const IntVector& baseRefinementRatio,
+      const IntVector& headRefinementRatio,
+      const MappedBoxLevel::ParallelState parallel_state = MappedBoxLevel::DISTRIBUTED);
+
+   /*!
+    * @brief Set up things for the entire class.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   initializeCallback();
+
+   /*!
+    * Free static timers.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   finalizeCallback();
+
+   //@{ @name Private utilities.
+
+   //@}
+
+   /*!
+    * @brief Handle for access to the base MappedBoxLevel.
+    *
+    * We don't use a pointer to the MappedBoxLevel, because it would
+    * become dangling when the MappedBoxLevel goes out of scope.
+    */
+   tbox::Pointer<MappedBoxLevelHandle> d_base_handle;
+
+   /*!
+    * @brief Handle for access to the base MappedBoxLevel.
+    *
+    * We don't use a pointer to the MappedBoxLevel, because it would
+    * become dangling when the MappedBoxLevel goes out of scope.
+    */
+   tbox::Pointer<MappedBoxLevelHandle> d_head_handle;
+
+   /*!
+    * @brief Connector width for the base MappedBoxLevel.
+    *
+    * This is the amount of growth applied to a mapped_box in the base MappedBoxLevel
+    * before checking if the mapped_box overlaps a mapped_box in the head MappedBoxLevel.
+    */
+   IntVector d_base_width;
+
+   /*!
+    * @brief Refinement ratio between base and head.
+    *
+    * If d_head_coarser is false, the head is not coarser than
+    * the base and this is the refinement ratio from base to head.
+    * If d_head_coarser is true, this is the coarsen ratio
+    * from base to head.
+    *
+    * This is redundant information.  You can compute it
+    * from the base and head MappedBoxLevels.
+    */
+   IntVector d_ratio;
+
+   /*!
+    * @brief Whether the base MappedBoxLevel is at a finer index space.
+    *
+    * When this is true, d_ratio is the refinement ratio going
+    * from the head to the base.
+    *
+    * This is redundant information.  You can compute it
+    * from the base and head MappedBoxLevels.
+    */
+   bool d_head_coarser;
+
+   /*!
+    * @brief Neighbor data for local MappedBoxes.
+    */
+   NeighborhoodSet d_relationships;
+
+   /*!
+    * @brief Neighbor data for global MappedBoxes in GLOBALIZED mode.
+    */
+   NeighborhoodSet d_global_relationships;
+
+   /*!
+    * @brief State flag.
+    *
+    * Modified by setParallelState().
+    */
+   MappedBoxLevel::ParallelState d_parallel_state;
+
+   /*!
+    * @brief Number of NeighborSets in d_relationships globally.
+    */
+   mutable int d_global_number_of_neighbor_sets;
+
+   /*!
+    * @brief Number of relationships in d_relationships globally.
+    */
+   mutable int d_global_number_of_relationships;
+
+   /*!
+    * @brief Whether globally reduced data is up to date or needs
+    * recomputing using cacheGlobalReducedData().
+    */
+   mutable bool d_global_data_up_to_date;
+
+   /*!
+    * @brief Process rank (id),
+    * for convenience and data management use after MPI_Finalize.
+    */
+   int d_rank;
+   /*!
+    * @brief Number of processes,
+    * for convenience and data management use after MPI_Finalize.
+    *
+    * If d_nproc == BAD_INT, the object is in uninitialized state.
+    */
+   int d_nproc;
+
+   ConnectorType d_connector_type;
+
+   static tbox::Pointer<tbox::Timer> t_initialize;
+   static tbox::Pointer<tbox::Timer> t_acquire_remote_relationships;
+
+   static tbox::StartupShutdownManager::Handler
+   s_initialize_finalize_handler;
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/Connector.I"
+#endif
+
+#endif // included_hier_Connector
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/ErrorCheckIntTypes.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/ErrorCheckIntTypes.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Trivial struct types for enforcing type checking in
+ *                multiple int function arguments. 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_ErrorCheckIntTypes
+#define included_hier_ErrorCheckIntTypes
+
+#include "SAMRAI/SAMRAI_config.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * The PatchNumber struct associates a type to an integral
+ * patch number to prevent errors in function arguments.
+ */
+struct PatchNumber {
+   int pn;
+   explicit PatchNumber(
+      int patch_num):pn(patch_num)
+   {
+      TBOX_ASSERT(patch_num >= 0);
+   }
+};
+
+/*!
+ * The LevelNumber struct associates a type to an integral
+ * level number to prevent errors in function arguments.
+ */
+struct LevelNumber {
+   int ln;
+   explicit LevelNumber(
+      int level_num):ln(level_num) {
+   }
+};
+
+/*!
+ * The PatchDataId struct associates a type to an integral
+ * patch data index to prevent errors in function arguments.
+ */
+struct PatchDataId {
+   int pd;
+   explicit PatchDataId(
+      int patch_data_id):pd(patch_data_id) {
+   }
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/GlobalId.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/GlobalId.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,34 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Globally unique identifier that can be locally determined. 
+ *
+ ************************************************************************/
+#ifndef included_hier_GlobalId_C
+#define included_hier_GlobalId_C
+
+#include "SAMRAI/hier/GlobalId.h"
+
+#include <iostream>
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/GlobalId.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+std::ostream& operator << (
+   std::ostream& co,
+   const GlobalId& r)
+{
+   co << r.d_owner_rank << '#' << r.d_local_id;
+   return co;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/GlobalId.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/GlobalId.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,171 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Globally unique identifier that can be locally determined. 
+ *
+ ************************************************************************/
+#include "SAMRAI/hier/GlobalId.h"
+
+#ifndef included_tbox_Utilities
+#include "SAMRAI/tbox/Utilities.h"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+GlobalId::GlobalId():
+   d_owner_rank(tbox::SAMRAI_MPI::getInvalidRank()),
+   d_local_id(LocalId::getInvalidId())
+{
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+GlobalId::GlobalId(
+   const LocalId &local_id,
+   const int owner):
+   d_owner_rank(owner),
+   d_local_id(local_id)
+{
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+GlobalId::GlobalId(
+   const GlobalId& other):
+   d_owner_rank(other.d_owner_rank),
+   d_local_id(other.d_local_id)
+{
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+GlobalId::~GlobalId()
+{
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+int& GlobalId::getOwnerRank() {
+   return d_owner_rank;
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+const int& GlobalId::getOwnerRank() const {
+   return d_owner_rank;
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+LocalId& GlobalId::getLocalId() {
+   return d_local_id;
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+const LocalId& GlobalId::getLocalId() const {
+   return d_local_id;
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+bool GlobalId::operator == (
+   const GlobalId& r) const {
+   bool rval = (d_owner_rank == r.d_owner_rank) &&
+      (d_local_id == r.d_local_id);
+   return rval;
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+bool GlobalId::operator != (
+   const GlobalId& r) const {
+   bool rval = (d_owner_rank != r.d_owner_rank) ||
+      (d_local_id != r.d_local_id);
+   return rval;
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+bool GlobalId::operator < (
+   const GlobalId& r) const {
+   return (d_owner_rank < r.d_owner_rank) ||
+          ((d_owner_rank == r.d_owner_rank) && (d_local_id < r.d_local_id));
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+bool GlobalId::operator > (
+   const GlobalId& r) const {
+   return (d_owner_rank > r.d_owner_rank) ||
+          ((d_owner_rank == r.d_owner_rank) && (d_local_id > r.d_local_id));
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+bool GlobalId::operator <= (
+   const GlobalId& r) const {
+   return (d_owner_rank < r.d_owner_rank) ||
+          ((d_owner_rank == r.d_owner_rank) &&
+           (d_local_id <= r.d_local_id));
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+bool GlobalId::operator >= (
+   const GlobalId& r) const {
+   return (d_owner_rank > r.d_owner_rank) ||
+          ((d_owner_rank == r.d_owner_rank) &&
+           (d_local_id >= r.d_local_id));
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/GlobalId.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/GlobalId.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,195 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Globally unique identifier that can be locally determined. 
+ *
+ ************************************************************************/
+#ifndef included_hier_GlobalId
+#define included_hier_GlobalId
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/LocalId.h"
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief A locally determined, globally unique identifier.
+ *
+ * GlobalIds are used as object identifiers in distributed sets of
+ * objects, such as Patches and MappedBoxes.  GlobalIds allow objects
+ * to be created in parallel while maintaining globally-unique 
+ * identifiers for those objects.
+ *
+ * GlobalId includes an owner rank and a LocalId.  A GlobalId is
+ * typically generated only by the owner, so global uniqueness is
+ * guaranteed by uniqueness of the LocalId portion.
+ *
+ * GlobalId comparison operators are implemented for sorting objects
+ * with GlobalIds.  The owners and LocalIds are used for all
+ * comparisons.  The owner ranks are compared first, followed by the
+ * LocalIds.
+ */
+class GlobalId
+{
+
+public:
+
+   /*!
+    * @brief Default constructor is non-initializing.
+    *
+    * Sets rank to an invalid value provided by SAMRAI_MPI.
+    *
+    * The object can be initialized using the assignment operator or
+    * the non-const versions of the getOwnerRank() and getLocalId() methods.
+    */
+   /*
+    * TODO: Replace the magic number with a method returning the
+    * official invalid value.  See artifact artf13924.
+    */
+   GlobalId();
+
+   /*!
+    * @brief Initializing constructor.
+    */
+   explicit GlobalId(
+      const LocalId &local_id,
+      const int owner_rank);
+
+   /*!
+    * @brief Copy constructor.
+    *
+    * @param[in] other
+    */
+   GlobalId(
+      const GlobalId& other);
+
+   /*!
+    * @brief Destructor.
+    */
+   virtual ~GlobalId(
+      void);
+
+   /*!
+    * @brief Access the owner rank.
+    */
+   int&
+   getOwnerRank();
+
+   /*!
+    * @brief Access the owner rank.
+    */
+   const int&
+   getOwnerRank() const;
+
+   /*!
+    * @brief Access the LocalId.
+    */
+   LocalId&
+   getLocalId();
+
+   /*!
+    * @brief Access the LocalId.
+    */
+   const LocalId&
+   getLocalId() const;
+
+
+   //@{
+
+   //! @name Comparison operators
+
+   /*!
+    * @brief Equality operator.
+    *
+    * All comparison operators use the owner and rank.  Compare the
+    * owner values first; if they compare equal, compare the LocalId
+    * next.
+    */
+   bool
+   operator == (
+      const GlobalId& r) const;
+
+   /*!
+    * @brief Inequality operator.
+    *
+    * See note on comparison for operator==(const GlobalId&);
+    */
+   bool
+   operator != (
+      const GlobalId& r) const;
+
+   /*!
+    * @brief Less-than operator.
+    *
+    * See note on comparison for operator==(const GlobalId&);
+    */
+   bool
+   operator < (
+      const GlobalId& r) const;
+
+   /*!
+    * @brief Greater-than operator.
+    *
+    * See note on comparison for operator==(const GlobalId&);
+    */
+   bool
+   operator > (
+      const GlobalId& r) const;
+
+   /*!
+    * @brief Less-than-or-equal-to operator.
+    *
+    * See note on comparison for operator==(const GlobalId&);
+    */
+   bool
+   operator <= (
+      const GlobalId& r) const;
+
+   /*!
+    * @brief Greater-thanor-equal-to operator.
+    *
+    * See note on comparison for operator==(const GlobalId&);
+    */
+   bool
+   operator >= (
+      const GlobalId& r) const;
+
+   //@}
+
+   /*!
+    * @brief Format and insert rank and LocalId into a stream.
+    */
+   friend std::ostream&
+   operator << (
+      std::ostream& co,
+      const GlobalId& r);
+
+private:
+   /*!
+    * @brief Rank of owner of this id.
+    */
+   int d_owner_rank;
+
+   /*!
+    * @brief Local id on the owner process.
+    */
+   LocalId d_local_id;
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/GlobalId.I"
+#endif
+
+#endif  // included_hier_GlobalId
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/GridGeometry.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/GridGeometry.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1317 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Base class for geometry management in AMR hierarchy 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_GridGeometry_C
+#define included_hier_GridGeometry_C
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/GridGeometry.h"
+#include "SAMRAI/hier/BoundaryLookupTable.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/MappedBoxContainerUtils.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/PeriodicShiftCatalog.h"
+#include "SAMRAI/hier/RealMappedBoxConstIterator.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <map>
+#include <stdlib.h>
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/GridGeometry.I"
+#endif
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+tbox::StartupShutdownManager::Handler
+GridGeometry::s_initialize_handler(
+   GridGeometry::initializeCallback,
+   0,
+   0,
+   GridGeometry::finalizeCallback,
+   tbox::StartupShutdownManager::priorityTimers);
+
+tbox::Pointer<tbox::Timer> GridGeometry::t_find_patches_touching_boundaries;
+tbox::Pointer<tbox::Timer> GridGeometry::t_touching_boundaries_init;
+tbox::Pointer<tbox::Timer> GridGeometry::t_touching_boundaries_loop;
+tbox::Pointer<tbox::Timer> GridGeometry::t_set_geometry_on_patches;
+tbox::Pointer<tbox::Timer> GridGeometry::t_set_boundary_boxes;
+tbox::Pointer<tbox::Timer> GridGeometry::t_set_geometry_data_on_patches;
+tbox::Pointer<tbox::Timer> GridGeometry::t_compute_boundary_boxes_on_level;
+tbox::Pointer<tbox::Timer> GridGeometry::t_get_boundary_boxes;
+
+/*
+ *************************************************************************
+ *
+ * Constructor initializes basic data members to default state.
+ *
+ *************************************************************************
+ */
+
+GridGeometry::GridGeometry(
+   const tbox::Dimension& dim,
+   const std::string& object_name):
+   d_dim(dim),
+   d_object_name(object_name),
+   d_physical_domain(d_dim),
+   d_domain_tree(0),
+   d_domain_mapped_box_level(d_dim),
+   d_periodic_shift(hier::IntVector::getZero(d_dim)),
+   d_max_data_ghost_width(hier::IntVector(d_dim, -1))
+{
+   TBOX_ASSERT(!object_name.empty());
+}
+
+/*
+ *************************************************************************
+ *
+ * Empty destructor.
+ *
+ *************************************************************************
+ */
+
+GridGeometry::~GridGeometry()
+{
+}
+
+/*
+ *************************************************************************
+ *
+ * Compute boundary boxes for all patches in patch level.  The domain
+ * array describes the interior of the level index space.  Note that
+ * boundaries is assumed to be an array of DIM * #patches Arrays of
+ * BoundaryBoxes.
+ *
+ *************************************************************************
+ */
+
+void GridGeometry::computeBoundaryBoxesOnLevel(
+   std::map<LocalId, PatchBoundaries>& boundaries,
+   const PatchLevel& level,
+   const IntVector& periodic_shift,
+   const IntVector& ghost_width,
+   const BoxArray& domain,
+   bool do_all_patches) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(d_dim,
+      level,
+      periodic_shift,
+      ghost_width,
+      domain);
+
+   t_compute_boundary_boxes_on_level->start();
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(ghost_width >= hier::IntVector::getZero(ghost_width.getDim()));
+
+   int num_per_dirs = 0;
+   for (int i = 0; i < d_dim.getValue(); i++) {
+      if (periodic_shift(i)) {
+         num_per_dirs++;
+      }
+   }
+#endif
+
+   for (PatchLevel::Iterator ip(&level); ip; ip++) {
+      tbox::Pointer<Patch> patch = *ip;
+      const LocalId patch_id = patch->getLocalId();
+
+      if (patch->getPatchGeometry()->getTouchesRegularBoundary() ||
+          do_all_patches) {
+
+         const Box &box(patch->getBox());
+
+         /*
+          * patch_boundaries is an array of DIM BoxLists for each patch.
+          * patch_boundaries[DIM-1] will store boundary boxes of the mapped_box type.
+          * If DIM > 1, patch_boundaries[DIM-2] will store boundary boxes of
+          * the edge type, and if DIM > 2, patch_boundaries[DIM-3] will store
+          * boundary boxes of the face type.
+          */
+
+         // std::cout << "Getting boundary boxes for " << patch_id << std::endl;
+
+         /*
+          * Create new map element if one does not exist.
+          * Note can't use [] as this requires a default ctor which we do
+          * not have for PatchBoundaries.
+          */
+         std::map<LocalId, PatchBoundaries>::iterator iter(boundaries.find(patch_id));
+         if (iter == boundaries.end()) {
+            std::pair<LocalId, PatchBoundaries> new_boundaries(patch_id,
+                                                           PatchBoundaries(
+                                                              d_dim));
+            iter = boundaries.insert(iter, new_boundaries);
+         }
+         getBoundaryBoxes((*iter).second, box, domain, ghost_width,
+            periodic_shift);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         for (int j = 0; j < d_dim.getValue(); j++) {
+            iter = (boundaries.find(patch_id));
+            TBOX_ASSERT(iter != boundaries.end());
+            for (int k = 0; k < ((*iter).second)[j].getSize(); k++) {
+               TBOX_ASSERT(checkBoundaryBox(((*iter).second)[j][k], *patch,
+                     domain, num_per_dirs, ghost_width));
+            }
+         }
+#endif
+      }
+   }
+   t_compute_boundary_boxes_on_level->stop();
+}
+
+/*
+ *************************************************************************
+ *
+ * For each patch in the level, use box intersection operation to
+ * determine what kind of boundaries, if any the patch touches.  Call
+ * Patch functions to set flags that store this information once it
+ * is found.
+ *
+ *************************************************************************
+ */
+
+void GridGeometry::findPatchesTouchingBoundaries(
+   std::map<LocalId, TwoDimBool>& touches_regular_bdry,
+   std::map<LocalId, TwoDimBool>& touches_periodic_bdry,
+   const PatchLevel& level,
+   const IntVector& periodic_shift,
+   const BoxArray& domain) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(level, periodic_shift, domain);
+
+   MappedBoxTree domain_tree(d_dim, &domain[0], domain.size());
+   findPatchesTouchingBoundaries(touches_regular_bdry,
+      touches_periodic_bdry,
+      level,
+      periodic_shift,
+      domain_tree);
+}
+
+void GridGeometry::findPatchesTouchingBoundaries(
+   std::map<LocalId, TwoDimBool>& touches_regular_bdry,
+   std::map<LocalId, TwoDimBool>& touches_periodic_bdry,
+   const PatchLevel& level,
+   const IntVector& periodic_shift,
+   const MappedBoxTree& domain_tree) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(level, periodic_shift);
+
+   t_find_patches_touching_boundaries->start();
+
+   t_touching_boundaries_init->start();
+   touches_regular_bdry.clear();
+   touches_periodic_bdry.clear();
+   t_touching_boundaries_init->stop();
+
+   t_touching_boundaries_loop->start();
+   for (PatchLevel::Iterator ip(&level); ip; ip++) {
+      tbox::Pointer<Patch> patch = *ip;
+      const Box &box(patch->getBox());
+
+      std::map<LocalId, TwoDimBool>::iterator iter_touches_regular_bdry(
+         touches_regular_bdry.find(ip->getLocalId()));
+      if (iter_touches_regular_bdry == touches_regular_bdry.end()) {
+         iter_touches_regular_bdry = touches_regular_bdry.insert(
+               iter_touches_regular_bdry,
+               std::pair<LocalId, TwoDimBool>(ip->getLocalId(), TwoDimBool(d_dim)));
+      }
+
+      std::map<LocalId, TwoDimBool>::iterator iter_touches_periodic_bdry(
+         touches_periodic_bdry.find(ip->getLocalId()));
+      if (iter_touches_periodic_bdry == touches_periodic_bdry.end()) {
+         iter_touches_periodic_bdry = touches_periodic_bdry.insert(
+               iter_touches_periodic_bdry,
+               std::pair<LocalId, TwoDimBool>(ip->getLocalId(), TwoDimBool(d_dim)));
+      }
+
+      computeBoxTouchingBoundaries((*iter_touches_regular_bdry).second,
+         (*iter_touches_periodic_bdry).second,
+         box,
+         periodic_shift,
+         domain_tree);
+   }
+   t_touching_boundaries_loop->stop();
+   t_find_patches_touching_boundaries->stop();
+}
+
+void GridGeometry::computeBoxTouchingBoundaries(
+   TwoDimBool& touches_regular_bdry,
+   TwoDimBool& touches_periodic_bdry,
+   const Box& box,
+   const IntVector& periodic_shift,
+   const MappedBoxTree& domain_tree) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(box, periodic_shift);
+
+   /*
+    * Create a list of boxes inside a mapped_box_level of one cell outside the patch.
+    * Remove the intersections with the domain's interior, so that only
+    * boxes outside the physical domain (if any) remain in the list.
+    */
+   BoxList bdry_list(Box::grow(box, IntVector::getOne(d_dim)));
+   bdry_list.removeIntersections(domain_tree);
+   const bool touches_any_boundary = (bdry_list.getNumberOfItems() > 0);
+
+   if (!touches_any_boundary) {
+      for (int d = 0; d < d_dim.getValue(); ++d) {
+         touches_regular_bdry(d, 0) = touches_periodic_bdry(d, 0) =
+               touches_regular_bdry(d, 1) = touches_periodic_bdry(d, 1) = false;
+      }
+   } else {
+      bool bdry_located = false;
+      for (int nd = 0; nd < d_dim.getValue(); nd++) {
+         BoxList lower_list(bdry_list);
+         BoxList upper_list(bdry_list);
+
+         Box test_box(box);
+
+         test_box.growLower(nd, 1);
+         lower_list.intersectBoxes(test_box); // performance ok.  lower_list is short.
+
+         test_box = box;
+         test_box.growUpper(nd, 1);
+         upper_list.intersectBoxes(test_box); // performance ok.  upper_list is short.
+
+         if (lower_list.size()) {
+            // Touches regular or periodic bdry on lower side.
+            touches_periodic_bdry(nd, 0) = (periodic_shift(nd) != 0);
+            touches_regular_bdry(nd, 0) = (periodic_shift(nd) == 0);
+            bdry_located = true;
+         }
+
+         if (upper_list.size()) {
+            // Touches regular or periodic bdry on upper side.
+            touches_periodic_bdry(nd, 1) = (periodic_shift(nd) != 0);
+            touches_regular_bdry(nd, 1) = (periodic_shift(nd) == 0);
+            bdry_located = true;
+         }
+      }
+
+      /*
+       * By this point, bdry_located will have been set to true almost
+       * every time whenever touches_any_boundary is true.  The only way
+       * it will not be true is if the domain is not a parallelpiped, and
+       * the patch touches the boundary only at a location such as the
+       * concave corner of an L-shaped domain.
+       */
+      if (!bdry_located) {
+         for (int nd = 0; nd < d_dim.getValue(); nd++) {
+            touches_periodic_bdry(nd, 0) = touches_periodic_bdry(nd, 1) = false;
+
+            bool lower_side = false;
+            bool upper_side = false;
+            for (BoxList::Iterator bl(bdry_list); bl; bl++) {
+               if (bl().lower() (nd) < box.lower(nd)) {
+                  lower_side = true;
+               }
+               if (bl().upper() (nd) > box.upper(nd)) {
+                  upper_side = true;
+               }
+               if (lower_side && upper_side) {
+                  break;
+               }
+            }
+            touches_regular_bdry(nd, 0) = lower_side;
+            touches_regular_bdry(nd, 1) = upper_side;
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ * Set geometry data for each patch on level.
+ *
+ *************************************************************************
+ */
+
+void GridGeometry::setGeometryOnPatches(
+   hier::PatchLevel& level,
+   const hier::IntVector& ratio_to_level_zero,
+   std::map<LocalId, TwoDimBool>& touches_regular_bdry,
+   std::map<LocalId, TwoDimBool>& touches_periodic_bdry,
+   bool defer_boundary_box_creation)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*this, level, ratio_to_level_zero);
+
+   t_set_geometry_on_patches->start();
+#ifdef DEBUG_CHECK_ASSERTIONS
+   /*
+    * All components of ratio must be nonzero.  Additionally,
+    * all components not equal to 1 must have the same sign.
+    */
+   TBOX_ASSERT(ratio_to_level_zero != hier::IntVector::getZero(d_dim));
+   if (d_dim.getValue() > 1) {
+      for (int i = 0; i < d_dim.getValue(); i++) {
+         TBOX_ASSERT((ratio_to_level_zero(i)
+                      * ratio_to_level_zero((i + 1) % d_dim.getValue()) > 0)
+            || (ratio_to_level_zero(i) == 1)
+            || (ratio_to_level_zero((i + 1) % d_dim.getValue()) == 1));
+      }
+   }
+#endif
+
+   BoxArray domain(d_dim);
+   computePhysicalDomain(domain, ratio_to_level_zero);
+
+   t_set_geometry_data_on_patches->start();
+   for (hier::PatchLevel::Iterator ip(&level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+      setGeometryDataOnPatch(*patch, ratio_to_level_zero,
+         (*touches_regular_bdry.find(ip->getLocalId())).second,
+         (*touches_periodic_bdry.find(ip->getLocalId())).second);
+   }
+   t_set_geometry_data_on_patches->stop();
+
+   if (!defer_boundary_box_creation) {
+      setBoundaryBoxes(level);
+   }
+   t_set_geometry_on_patches->stop();
+}
+
+/*
+ *************************************************************************
+ *
+ * Set boundary boxes for each patch on level.
+ *
+ *************************************************************************
+ */
+
+void GridGeometry::setBoundaryBoxes(
+   hier::PatchLevel& level)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, level);
+
+   t_set_boundary_boxes->start();
+   std::map<LocalId, PatchBoundaries> boundaries;
+
+   hier::BoxArray domain(level.getPhysicalDomain());
+
+   hier::IntVector ghost_width(
+      level.getPatchDescriptor()->getMaxGhostWidth(d_dim));
+
+   if (d_max_data_ghost_width != -1 &&
+       !(ghost_width <= d_max_data_ghost_width)) {
+
+      TBOX_ERROR("Error in hier::GridGeometry object with name = "
+         << d_object_name << ": in computeMaxGhostWidth():  "
+         << "Cannot add variables and increase maximum ghost "
+         << "width after creating the GridGeometry!");
+   }
+
+   d_max_data_ghost_width = ghost_width;
+
+   computeBoundaryBoxesOnLevel(
+      boundaries,
+      level,
+      getPeriodicShift(IntVector::getOne(d_dim)),
+      d_max_data_ghost_width,
+      domain);
+
+   for (std::map<LocalId, PatchBoundaries>::const_iterator mi = boundaries.begin();
+        mi != boundaries.end(); ++mi) {
+      tbox::Pointer<Patch> patch = level.getPatch((*mi).first);
+      patch->getPatchGeometry()->setBoundaryBoxesOnPatch((*mi).second.getArrays());
+   }
+
+   t_set_boundary_boxes->stop();
+}
+
+/*
+ *************************************************************************
+ * Compute the valid periodic shifts for the given box.
+ *************************************************************************
+ */
+
+void GridGeometry::computeShiftsForBox(
+   std::vector<IntVector>& shifts,
+   const Box& box,
+   const MappedBoxTree& domain_search_tree,
+   const IntVector& periodic_shift) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*this, box, periodic_shift);
+
+   shifts.clear();
+
+   int num_periodic_dirs = 0;
+
+   for (int i = 0; i < d_dim.getValue(); i++) {
+      if (periodic_shift(i) != 0) {
+         num_periodic_dirs++;
+      }
+   }
+
+   if (num_periodic_dirs > 0) {
+
+      const PeriodicShiftCatalog* periodic_shift_catalog =
+         PeriodicShiftCatalog::getCatalog(d_dim);
+
+      shifts.reserve(periodic_shift_catalog->getNumberOfShifts());
+
+      BoundaryLookupTable* blut =
+         BoundaryLookupTable::getLookupTable(d_dim);
+
+      const tbox::Array<int>& location_index_max =
+         blut->getMaxLocationIndices();
+
+      for (int d = 0; d < num_periodic_dirs; d++) {
+
+         const int codim = d + 1;
+
+         for (int loc = 0; loc < location_index_max[d]; loc++) {
+
+            const tbox::Array<int>& dirs = blut->getDirections(loc, codim);
+
+            bool need_to_test = true;
+            for (int k = 0; k < dirs.size(); k++) {
+               if (periodic_shift(dirs[k]) == 0) {
+                  need_to_test = false;
+                  break;
+               }
+            }
+
+            if (need_to_test) {
+
+               Box border(box);
+               IntVector border_shift(d_dim, 0);
+
+               tbox::Array<bool> is_upper(codim);
+               for (int j = 0; j < codim; j++) {
+                  if (blut->isUpper(loc, codim, j)) {
+                     border.lower(dirs[j]) = box.upper(dirs[j]);
+                     border.upper(dirs[j]) = box.upper(dirs[j]);
+                     border_shift(dirs[j]) = 1;
+                     is_upper[j] = true;
+                  } else {
+                     border.lower(dirs[j]) = box.lower(dirs[j]);
+                     border.upper(dirs[j]) = box.lower(dirs[j]);
+                     border_shift(dirs[j]) = -1;
+                     is_upper[j] = false;
+                  }
+               }
+
+               border.shift(border_shift);
+               BoxList border_list(border);
+
+               border_list.removeIntersections(domain_search_tree);
+
+               if (border_list.size() > 0) {
+
+                  const Box& domain_bound_box =
+                     domain_search_tree.getBoundingBox();
+
+                  if (codim == 1) {
+
+                     IntVector new_shift(d_dim, 0);
+                     if (is_upper[0]) {
+                        new_shift(dirs[0]) =
+                           -domain_bound_box.numberCells(dirs[0]);
+                     } else {
+                        new_shift(dirs[0]) =
+                           domain_bound_box.numberCells(dirs[0]);
+                     }
+                     // shifts.addItem(new_shift);
+                     shifts.insert(shifts.end(), new_shift);
+
+                  } else {
+
+                     bool shift_to_add = true;
+                     for (int c = 0; c < codim; c++) {
+
+                        if (is_upper[c]) {
+                           if (border.upper(dirs[c]) <=
+                               domain_bound_box.upper(dirs[c])) {
+                              shift_to_add = false;
+                              break;
+                           }
+                        } else {
+                           if (border.lower(dirs[c]) >=
+                               domain_bound_box.lower(dirs[c])) {
+                              shift_to_add = false;
+                              break;
+                           }
+                        }
+
+                     }
+
+                     if (shift_to_add) {
+                        IntVector new_shift(d_dim, 0);
+                        for (int b = 0; b < codim; b++) {
+                           if (is_upper[b]) {
+                              new_shift(dirs[b]) =
+                                 -domain_bound_box.numberCells(dirs[b]);
+                           } else {
+                              new_shift(dirs[b]) =
+                                 domain_bound_box.numberCells(dirs[b]);
+                           }
+                        }
+                        // shifts.addItem(new_shift);
+                        shifts.insert(shifts.end(), new_shift);
+                     }
+                  }
+               }
+            }
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ * Decompose patch boundary region into pieces depending on spatial dim.
+ * Boxes are extended along the boundary to the edge of the ghost mapped_box_level
+ * if necessary.
+ *
+ *************************************************************************
+ */
+
+void GridGeometry::getBoundaryBoxes(
+   PatchBoundaries& patch_boundaries,
+   const Box& box,
+   const BoxArray& domain_boxes,
+   const IntVector& ghosts,
+   const IntVector& periodic_shift) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS5(*this, box, domain_boxes, ghosts, periodic_shift);
+
+   t_get_boundary_boxes->start();
+
+   const Index ifirst = box.lower();
+   const Index ilast = box.upper();
+
+   int num_per_dirs = 0;
+   for (int d = 0; d < d_dim.getValue(); d++) {
+      num_per_dirs += (periodic_shift(d) ? 1 : 0);
+   }
+
+   if (num_per_dirs == d_dim.getValue()) {
+      for (int k = 0; k < d_dim.getValue(); k++) {
+         patch_boundaries[k].resizeArray(0, hier::BoundaryBox(d_dim));
+      }
+
+   } else {
+      BoundaryLookupTable* blut =
+         BoundaryLookupTable::getLookupTable(d_dim);
+
+      const tbox::Array<int>& location_index_max =
+         blut->getMaxLocationIndices();
+      tbox::Array<BoxList> codim_boxlist(d_dim.getValue(), BoxList());
+
+      for (int d = 0; d < d_dim.getValue() - num_per_dirs; d++) {
+
+         int codim = d + 1;
+
+         patch_boundaries[d].resizeArray(location_index_max[d],
+            hier::BoundaryBox(d_dim));
+         int bdry_array_size = location_index_max[d];
+         int num_bboxes = 0;
+
+         for (int loc = 0; loc < location_index_max[d]; loc++) {
+            const tbox::Array<int>& dirs = blut->getDirections(loc, codim);
+
+            tbox::Array<bool> periodic_dir(codim);
+            bool all_is_per = true;
+            for (int p = 0; p < codim; p++) {
+               if (periodic_shift(dirs[p]) == 0) {
+                  periodic_dir[p] = false;
+                  all_is_per = false;
+               } else {
+                  periodic_dir[p] = true;
+               }
+            }
+
+            if (!all_is_per) {
+               Box border(box);
+               IntVector border_shift(d_dim, 0);
+
+               for (int i = 0; i < codim; i++) {
+                  if (blut->isUpper(loc, codim, i)) {
+                     border.lower(dirs[i]) = box.upper(dirs[i]);
+                     border.upper(dirs[i]) = box.upper(dirs[i]);
+                     border_shift(dirs[i]) = 1;
+                  } else {
+                     border.lower(dirs[i]) = box.lower(dirs[i]);
+                     border.upper(dirs[i]) = box.lower(dirs[i]);
+                     border_shift(dirs[i]) = -1;
+                  }
+               }
+
+               // grow in non-dirs directions
+               for (int j = 0; j < d_dim.getValue(); j++) {
+                  bool dir_used = false;
+                  for (int du = 0; du < codim; du++) {
+                     if (dirs[du] == j) {
+                        dir_used = true;
+                        break;
+                     }
+                  }
+                  if (!dir_used) {
+                     border.upper(j) = ilast(j) + ghosts(j);
+                     border.lower(j) = ifirst(j) - ghosts(j);
+                  }
+               }
+
+               BoxList domain_list(domain_boxes);
+               if (num_per_dirs != 0) {
+                  domain_list.grow(periodic_shift);
+               }
+
+               /*
+                * Intersect border_list with domain, then shift so that
+                * true boundary boxes are outside domain.  Then remove
+                * intersections with the domain.
+                */
+
+               BoxList border_list(border);
+               border_list.intersectBoxes(domain_list); // Should use MappedBoxTree here if possible.
+
+               border_list.shift(border_shift);
+
+               border_list.removeIntersections(domain_list);
+
+               if (border_list.size() > 0) {
+                  for (int bd = 0; bd < d; bd++) {
+                     border_list.removeIntersections(codim_boxlist[bd]);
+
+                     if (border_list.size() == 0) {
+                        break;
+                     }
+                  }
+               }
+
+               if (border_list.size() > 0) {
+                  border_list.coalesceBoxes();
+                  for (BoxList::Iterator bl(border_list);
+                       bl; bl++) {
+                     if (num_bboxes == bdry_array_size) {
+                        patch_boundaries[d].resizeArray(
+                           bdry_array_size + location_index_max[d],
+                           hier::BoundaryBox(d_dim));
+                        bdry_array_size = patch_boundaries[d].size();
+                     }
+
+                     BoundaryBox boundary_box(bl(), codim, loc);
+
+                     patch_boundaries[d][num_bboxes] = boundary_box;
+
+                     num_bboxes++;
+                  }
+
+                  codim_boxlist[d].unionBoxes(border_list);
+               }
+            }
+
+            if (loc + 1 == location_index_max[d]) {
+               patch_boundaries[d].resizeArray(num_bboxes,
+                  hier::BoundaryBox(d_dim));
+            }
+         }
+      }
+   }
+   t_get_boundary_boxes->stop();
+}
+
+/*
+ *************************************************************************
+ *
+ * Compute physical domain for index space related to reference domain
+ * by specified ratio.  If any entry of ratio is negative, the reference
+ * domain will be coarsened.  Otherwise, it will be refined.
+ *
+ *************************************************************************
+ */
+
+void GridGeometry::computePhysicalDomain(
+   BoxArray& domain,
+   const IntVector& ratio_to_level_zero) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*this, domain, ratio_to_level_zero);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   /*
+    * All components of ratio must be nonzero.  Additionally, all components
+    * of ratio not equal to 1 must have the same sign.
+    */
+   int i;
+   for (i = 0; i < d_dim.getValue(); i++) {
+      TBOX_ASSERT(ratio_to_level_zero(i) != 0);
+   }
+   if (d_dim.getValue() > 1) {
+      for (i = 0; i < d_dim.getValue(); i++) {
+         TBOX_ASSERT((ratio_to_level_zero(i)
+                      * ratio_to_level_zero((i + 1) % d_dim.getValue()) > 0)
+            || (ratio_to_level_zero(i) == 1)
+            || (ratio_to_level_zero((i + 1) % d_dim.getValue()) == 1));
+      }
+   }
+#endif
+
+   domain = d_physical_domain;
+
+   bool coarsen = false;
+   IntVector tmp_rat = ratio_to_level_zero;
+   for (int id = 0; id < d_dim.getValue(); id++) {
+      if (ratio_to_level_zero(id) < 0) coarsen = true;
+      tmp_rat(id) = abs(ratio_to_level_zero(id));
+   }
+
+   if (coarsen) {
+      domain.coarsen(tmp_rat);
+   } else {
+      domain.refine(tmp_rat);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *
+ * Compute physical domain for index space related to reference domain
+ * by specified ratio.  If any entry of ratio is negative, the reference
+ * domain will be coarsened.  Otherwise, it will be refined.
+ *
+ *************************************************************************
+ */
+
+void GridGeometry::computePhysicalDomain(
+   MappedBoxSet& domain_mapped_boxes,
+   const IntVector& ratio_to_level_zero) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, ratio_to_level_zero);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   /*
+    * All components of ratio must be nonzero.  Additionally, all components
+    * of ratio not equal to 1 must have the same sign.
+    */
+   int i;
+   for (i = 0; i < d_dim.getValue(); i++) {
+      TBOX_ASSERT(ratio_to_level_zero(i) != 0);
+   }
+   if (d_dim.getValue() > 1) {
+      for (i = 0; i < d_dim.getValue(); i++) {
+         TBOX_ASSERT((ratio_to_level_zero(i)
+                      * ratio_to_level_zero((i + 1) % d_dim.getValue()) > 0)
+            || (ratio_to_level_zero(i) == 1)
+            || (ratio_to_level_zero((i + 1) % d_dim.getValue()) == 1));
+      }
+   }
+#endif
+
+   domain_mapped_boxes = d_domain_mapped_box_level.getGlobalMappedBoxes();
+
+   if (ratio_to_level_zero != IntVector::getOne(d_dim)) {
+      bool coarsen = false;
+      IntVector tmp_rat = ratio_to_level_zero;
+      for (int id = 0; id < d_dim.getValue(); id++) {
+         if (ratio_to_level_zero(id) < 0) coarsen = true;
+         tmp_rat(id) = abs(ratio_to_level_zero(id));
+      }
+      MappedBoxSet tmp_mapped_boxes;
+      if (coarsen) {
+         hier::MappedBoxContainerUtils::coarsenMappedBoxSet(
+            tmp_mapped_boxes,
+            domain_mapped_boxes,
+            tmp_rat);
+      } else {
+         hier::MappedBoxContainerUtils::refineMappedBoxSet(tmp_mapped_boxes, domain_mapped_boxes,
+            tmp_rat);
+      }
+      domain_mapped_boxes.swap(tmp_mapped_boxes);
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ * Set physical domain data member from input box array and determine
+ * whether domain is a single box.
+ *
+ *************************************************************************
+ */
+
+void GridGeometry::setPhysicalDomain(
+   const BoxArray& domain)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, domain);
+
+   BoxList domain_boxes(domain);
+   BoxList bounding_box(domain_boxes.getBoundingBox());
+
+   bounding_box.removeIntersections(domain_boxes);
+   if (bounding_box.getNumberOfItems() == 0) {
+      d_domain_is_single_box = true;
+      d_physical_domain = BoxArray(domain_boxes.getBoundingBox());
+   } else {
+      d_domain_is_single_box = false;
+      d_physical_domain = domain;
+   }
+
+   resetDomainMappedBoxLevel();
+
+   d_domain_tree = new MappedBoxTree(d_dim,
+         &d_physical_domain[0],
+         d_physical_domain.size());
+}
+
+/*
+ *************************************************************************
+ * Reset the domain mapped_box_level based on current definition of
+ * physical domain and periodic shift.
+ *************************************************************************
+ */
+
+void GridGeometry::resetDomainMappedBoxLevel()
+{
+   d_domain_mapped_box_level.initialize(
+      IntVector::getOne(d_dim),
+      tbox::SAMRAI_MPI::getSAMRAIWorld(),
+      MappedBoxLevel::GLOBALIZED);
+
+   for (LocalId i(0); i < d_physical_domain.size(); ++i) {
+      MappedBox mapped_box(d_physical_domain[i.getValue()], i, 0);
+      d_domain_mapped_box_level.addMappedBox(mapped_box);
+   }
+   const IntVector periodic_shift_distances = getPeriodicShift(
+         IntVector::getOne(d_dim));
+   bool is_periodic = false;
+   for (int i = 0; i < d_dim.getValue(); i++) {
+      if (periodic_shift_distances(i) != 0) {
+         is_periodic = true;
+         break;
+      }
+   }
+   if (is_periodic) {
+
+      PeriodicShiftCatalog::initializeShiftsByIndexDirections(d_periodic_shift);
+      const PeriodicShiftCatalog* periodic_shift_catalog =
+         PeriodicShiftCatalog::getCatalog(d_dim);
+
+      // Add periodic images of the domain d_domain_mapped_box_level.
+      std::vector<IntVector> shifts;
+      const MappedBoxSet& mapped_boxes =
+         d_domain_mapped_box_level.getGlobalMappedBoxes();
+      for (RealMappedBoxConstIterator ni(mapped_boxes); ni.isValid(); ++ni) {
+         const MappedBox& mapped_box = *ni;
+         computeShiftsForBox(shifts,
+            mapped_box.getBox(),
+            *d_domain_tree,
+            periodic_shift_distances);
+         for (std::vector<IntVector>::const_iterator si = shifts.begin();
+              si != shifts.end(); ++si) {
+            int shift_number = periodic_shift_catalog->shiftDistanceToShiftNumber(*si);
+            MappedBox image_mapped_box(
+               mapped_box,
+               shift_number,
+               d_domain_mapped_box_level.
+               getRefinementRatio());
+            d_domain_mapped_box_level.addMappedBox(image_mapped_box);
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ * The argument is an IntVector of length DIM.  It is set to 1
+ * for periodic directions and 0 for all other directions.  In the
+ * periodic directions, the coarse-level shift is calculated and stored
+ * in the IntVector d_periodic_shift. The shift is the number of cells
+ * in each periodic direction and is zero in all other directions.
+ *
+ *************************************************************************
+ */
+
+void GridGeometry::initializePeriodicShift(
+   const IntVector& directions)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, directions);
+
+   d_periodic_shift = directions;
+
+   int id;
+   /*
+    * Check incoming array and reset values if necessary.
+    */
+   for (id = 0; id < d_dim.getValue(); id++) {
+      d_periodic_shift(id) = ((d_periodic_shift(id) == 0) ? 0 : 1);
+   }
+
+   /*
+    * Check if the physical domain is valid for the specified
+    * periodic conditions.  If so, compute the shift in each
+    * dimension based on the the number of cells.
+    */
+   if (checkPeriodicValidity(d_physical_domain)) {
+
+      BoxList domain_box_list(d_physical_domain);
+      Box bounding_box = domain_box_list.getBoundingBox();
+
+      for (id = 0; id < d_dim.getValue(); id++) {
+         d_periodic_shift(id) *= bounding_box.numberCells(id);
+      }
+
+   } else {
+      TBOX_ERROR("Error in hier::GridGeometry object with name = "
+         << d_object_name << ": in intializePeriodicShift():  "
+         << "Domain is not periodic for one (or more) of the dimensions "
+         << "specified in the geometry input file!");
+   }
+
+   resetDomainMappedBoxLevel();
+
+}
+
+/*
+ *************************************************************************
+ *
+ * This returns an IntVector of length d_dim that is set to the width of
+ * the domain in periodic directions and 0 in all other directions.
+ * the argument contains the refinement ratio relative to the coarsest
+ * level, which is multiplied by d_periodic_shift to get the return
+ * vector.
+ *
+ *************************************************************************
+ */
+
+IntVector GridGeometry::getPeriodicShift(
+   const IntVector& ratio_to_level_zero) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, ratio_to_level_zero);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   /*
+    * All components of ratio vector must be nonzero.  Additionally,
+    * all components not equal to 1 must have the same sign.
+    */
+   int k;
+   for (k = 0; k < d_dim.getValue(); k++) {
+      TBOX_ASSERT(ratio_to_level_zero(k) != 0);
+   }
+   if (d_dim.getValue() > 1) {
+      for (k = 0; k < d_dim.getValue(); k++) {
+         TBOX_ASSERT((ratio_to_level_zero(k)
+                      * ratio_to_level_zero((k + 1) % d_dim.getValue()) > 0)
+            || (ratio_to_level_zero(k) == 1)
+            || (ratio_to_level_zero((k + 1) % d_dim.getValue()) == 1));
+      }
+   }
+#endif
+
+   IntVector periodic_shift(d_dim);
+   for (int i = 0; i < d_dim.getValue(); i++) {
+      if (ratio_to_level_zero(i) > 0) {
+         periodic_shift(i) = d_periodic_shift(i) * ratio_to_level_zero(i);
+      } else {
+         int abs_ratio = abs(ratio_to_level_zero(i));
+         periodic_shift(i) = d_periodic_shift(i) / abs_ratio;
+      }
+   }
+   return periodic_shift;
+}
+
+/*
+ *************************************************************************
+ *
+ * This checks if the periodic directions given to the constructor are
+ * valid for the domain.  Periodic directions are valid if the domain
+ * has exactly two physical boundaries normal to the periodic direction.
+ *
+ *************************************************************************
+ */
+
+bool GridGeometry::checkPeriodicValidity(
+   const BoxArray& domain)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, domain);
+
+   bool is_valid = true;
+
+   IntVector valid_direction(d_dim, 1);
+   IntVector grow_direction(d_dim, 1);
+
+   /*
+    * Compute the bounding box of a "duplicate" domain + 1
+    * cell and set the min and max indices of this grown box.
+    */
+   BoxList dup_domain(domain);
+
+   Box domain_box = dup_domain.getBoundingBox();
+   domain_box.grow(grow_direction);
+   int i;
+   Index min_index(d_dim, 0), max_index(d_dim, 0);
+   for (i = 0; i < d_dim.getValue(); i++) {
+      //set min/max of the bounding box
+      min_index(i) = domain_box.lower(i);
+      max_index(i) = domain_box.upper(i);
+   }
+
+   /*
+    * Next, for each dimension, grow another "duplicate" domain
+    * by 1.  Remove the intersections with the original domain,
+    * and loop through the remaining box list, checking if the
+    * upper index of the box matches the bounding box max or the
+    * lower index of the box matches the bounding box min.  If
+    * not, this dimension is not a valid periodic dimension.
+    */
+   for (i = 0; i < d_dim.getValue(); i++) {
+      BoxList dup_domain2(domain);
+      IntVector grow_one(d_dim, 0);
+      grow_one(i) = 1;
+      dup_domain2.grow(grow_one);
+      dup_domain2.removeIntersections(BoxList(domain));
+
+      BoxList::Iterator n;
+      for (n = dup_domain2.listStart(); n; n++) {
+         Box this_box = n();
+         Index box_lower = this_box.lower();
+         Index box_upper = this_box.upper();
+         if (d_periodic_shift(i) != 0) {
+            if (!((box_lower(i) == min_index(i)) ||
+                  (box_upper(i) == max_index(i)))) {
+               valid_direction(i) = 0;
+            }
+         }
+      }
+   }
+
+   for (i = 0; i < d_dim.getValue(); i++) {
+      if ((valid_direction(i) == 0) &&
+          (d_periodic_shift(i) != 0)) {
+         is_valid = false;
+      }
+   }
+
+   return is_valid;
+}
+
+/*
+ *************************************************************************
+ *
+ * Perform an error check on a recently-constructed boundary box to
+ * make sure that it is the proper size, is adjacent to a patch, and is
+ * outside the physical domain.
+ *
+ *************************************************************************
+ */
+
+bool GridGeometry::checkBoundaryBox(
+   const BoundaryBox& boundary_box,
+   const Patch& patch,
+   const BoxArray& domain,
+   const int num_per_dirs,
+   const IntVector& max_data_ghost_width) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS5(*this,
+      boundary_box,
+      patch,
+      domain,
+      max_data_ghost_width);
+
+   bool return_val = true;
+
+   const Box &bbox = boundary_box.getBox();
+
+   /*
+    * Test to see that the box is of size 1 in at least 1 direction.
+    */
+   IntVector box_size(d_dim);
+
+   for (int i = 0; i < d_dim.getValue(); i++) {
+      box_size(i) = bbox.numberCells(i);
+   }
+
+   if (box_size.min() != 1) {
+      return_val = false;
+   }
+
+   /*
+    * Quick and dirty test to see that boundary box is adjacent to patch
+    * boundary, or a patch boundary extended through the ghost region.
+    */
+   Box patch_box = patch.getBox();
+
+   Box grow_patch_box(patch_box);
+
+   grow_patch_box.grow(hier::IntVector::getOne(d_dim));
+
+   if (grow_patch_box != (grow_patch_box + bbox)) {
+      bool valid_box = false;
+      grow_patch_box = patch_box;
+      for (int j = 0; j < d_dim.getValue(); j++) {
+         if (num_per_dirs == 0) {
+
+            for (int k = 1; k < d_dim.getValue(); k++) {
+
+               grow_patch_box.grow((j + k) % d_dim.getValue(),
+                  max_data_ghost_width((j + k) % d_dim.getValue()));
+
+            }
+
+         } else {
+
+            for (int k = 1; k < d_dim.getValue(); k++) {
+
+               grow_patch_box.grow((j + k) % d_dim.getValue(),
+                  2 * max_data_ghost_width((j + k) % d_dim.getValue()));
+
+            }
+
+         }
+         grow_patch_box.grow(j, 1);
+         if (grow_patch_box == (grow_patch_box + bbox)) {
+            valid_box = true;
+         }
+         grow_patch_box = patch_box;
+      }
+      if (!valid_box) {
+         return_val = false;
+      }
+   }
+
+   /*
+    * check that the boundary box is outside the physical domain.
+    */
+   BoxList domain_list(domain);
+   BoxList bbox_list(bbox);
+
+   domain_list.intersectBoxes(bbox_list);
+
+   if (domain_list.getNumberOfItems()) {
+      return_val = false;
+   }
+
+   return return_val;
+}
+
+/*
+ ***************************************************************************
+ ***************************************************************************
+ */
+
+void GridGeometry::initializeTimers()
+{
+   if (t_find_patches_touching_boundaries.isNull()) {
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ * Print object data to the specified output stream.
+ *
+ *************************************************************************
+ */
+
+void GridGeometry::printClassData(
+   std::ostream& stream) const
+{
+
+   stream << "\nhier::GridGeometry::printClassData..." << std::endl;
+   stream << "hier::GridGeometry: this = "
+          << (hier::GridGeometry *)this << std::endl;
+   stream << "d_object_name = " << d_object_name << std::endl;
+
+   const int n = d_physical_domain.getNumberOfBoxes();
+   stream << "Number of boxes describing physical domain = " << n << std::endl;
+   stream << "Boxes describing physical domain..." << std::endl;
+   d_physical_domain.print(stream);
+
+   stream << "\nd_periodic_shift = " << d_periodic_shift << std::endl;
+
+   stream << "d_max_data_ghost_width = " << d_max_data_ghost_width << std::endl;
+
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void GridGeometry::initializeCallback()
+{
+      t_find_patches_touching_boundaries = tbox::TimerManager::getManager()->
+         getTimer("hier::GridGeometry::findPatchesTouchingBoundaries()");
+      TBOX_ASSERT(!t_find_patches_touching_boundaries.isNull());
+      t_touching_boundaries_init = tbox::TimerManager::getManager()->
+         getTimer("hier::GridGeometry::...TouchingBoundaries()_init");
+      TBOX_ASSERT(!t_touching_boundaries_init.isNull());
+      t_touching_boundaries_loop = tbox::TimerManager::getManager()->
+         getTimer("hier::GridGeometry::...TouchingBoundaries()_loop");
+      TBOX_ASSERT(!t_touching_boundaries_loop.isNull());
+      t_set_geometry_on_patches = tbox::TimerManager::getManager()->
+         getTimer("hier::GridGeometry::setGeometryOnPatches()");
+      TBOX_ASSERT(!t_set_geometry_on_patches.isNull());
+      t_set_boundary_boxes = tbox::TimerManager::getManager()->
+         getTimer("hier::GridGeometry::setBoundaryBoxes()");
+      TBOX_ASSERT(!t_set_boundary_boxes.isNull());
+      t_set_geometry_data_on_patches = tbox::TimerManager::getManager()->
+         getTimer("hier::GridGeometry::set_geometry_data_on_patches");
+      TBOX_ASSERT(!t_set_geometry_data_on_patches.isNull());
+      t_compute_boundary_boxes_on_level = tbox::TimerManager::getManager()->
+         getTimer("hier::GridGeometry::computeBoundaryBoxesOnLevel()");
+      TBOX_ASSERT(!t_compute_boundary_boxes_on_level.isNull());
+      t_get_boundary_boxes = tbox::TimerManager::getManager()->
+         getTimer("hier::GridGeometry::getBoundaryBoxes()");
+      TBOX_ASSERT(!t_get_boundary_boxes.isNull());
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void GridGeometry::finalizeCallback()
+{
+   t_find_patches_touching_boundaries.setNull();
+   t_touching_boundaries_init.setNull();
+   t_touching_boundaries_loop.setNull();
+   t_set_geometry_on_patches.setNull();
+   t_set_boundary_boxes.setNull();
+   t_set_geometry_data_on_patches.setNull();
+   t_compute_boundary_boxes_on_level.setNull();
+   t_get_boundary_boxes.setNull();
+}
+
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/GridGeometry.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/GridGeometry.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,32 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Base class for geometry management in AMR hierarchy 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+const BoxArray& GridGeometry::getPhysicalDomain() const
+{
+   return d_physical_domain;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool GridGeometry::getDomainIsSingleBox() const
+{
+   return d_domain_is_single_box;
+}
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Dimension& GridGeometry::getDim() const {
+   return d_dim;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/GridGeometry.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/GridGeometry.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,610 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Base class for geometry management in AMR hierarchy 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_GridGeometry
+#define included_hier_GridGeometry
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/MappedBoxLevel.h"
+#include "SAMRAI/hier/MappedBoxSet.h"
+#include "SAMRAI/hier/MappedBoxTree.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchBoundaries.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+#include <string>
+#include <vector>
+#include <map>
+
+namespace SAMRAI {
+namespace hier {
+
+class PatchLevel;
+
+/*!
+ * @brief Class GridGeometry serves as the base class for SAMRAI geometry
+ * classes that manage particular grid types (%e.g., Cartesian, cylindrical,
+ * etc.).
+ *
+ * The grid geometry class is responsible for maintaining information
+ * about the index space describing the physical domain and computing this
+ * information for patches in an AMR hierarchy.
+ *
+ * Member functions that manage the description of the spatial coordinates on
+ * the mesh are pure virtual here and must be implemented in an appropriate
+ * subclass.
+ *
+ * @par Additional Functionality
+ * Operations performed by this class include determining which patches are
+ * adjacent to the physical domain boundary and computing boundary boxes
+ * for patches which describe how the patch touches the domain boundary
+ * (useful for filling ghost cell data for physical boundary conditions).
+ *
+ * @note
+ * The derivation from tbox::DescribedClass is virtual.  The
+ * reason for this is to avoid dynamic casting problems for smart pointers.
+ * Typically, SAMRAI geometry objects inherit from tbox::Serializable
+ * as well as this base geometry class.  Thus, there is usually more than
+ * one class hierarchy for geometry objects.  Pointers to base objects
+ * may need to be dynamically cast to derived objects in either hierarchy.
+ *
+ * @see hier::BoundaryBox
+ */
+
+class GridGeometry:public virtual tbox::DescribedClass
+{
+public:
+   typedef  PatchGeometry::TwoDimBool TwoDimBool;
+
+   /*!
+    * @brief Create a new GridGeometry object and set its default state.
+    */
+   explicit GridGeometry(
+      const tbox::Dimension& dim,
+      const std::string& object_name);
+
+   /*!
+    * @brief Virtual destructor
+    */
+   virtual ~GridGeometry();
+
+   //! @{
+   /*!
+    * @name Functions for computing boundary boxes
+    */
+   /*!
+    * @brief For every patch on a level, find all ways a patch touches
+    * a physical or periodic boundary.
+    *
+    * For every patch on the given PatchLevel, this routine determines which
+    * kinds of boundaries are touched (regular, periodic, both, or neither).
+    *
+    * @note
+    * The array arguments should be uninitialized when they are passed into
+    * this function.
+    *
+    * @param[out]   touches_regular_bdry map to store which patches touch
+    *               non-periodic boundaries.
+    * @param[out]   touches_periodic_bdry map to store which patches touch
+    *               periodic boundaries.
+    * @param[in]    level containing the patches to be checked
+    * @param[in]    periodic_shift periodic shift for the level (see getPeriodicShift())
+    * @param[in]    domain Physical domain (at the same level of refinement as level)
+    */
+   void
+   findPatchesTouchingBoundaries(
+      std::map<LocalId, TwoDimBool>& touches_regular_boundary,
+      std::map<LocalId, TwoDimBool>& touches_periodic_boundary,
+      const PatchLevel& level,
+      const IntVector& periodic_shift,
+      const BoxArray& domain) const;
+
+   /*!
+    * @brief Version of findPatchTouchingBoundaries using pre-constructed
+    * search tree for domain.
+    *
+    * @param[out]   touches_regular_bdry map to store which patches touch
+    *               non-periodic boundaries.
+    * @param[out]   touches_periodic_bdry map to store which patches touch
+    *               periodic boundaries.
+    * @param[in]    level containing the patches to be checked
+    * @param[in]    periodic_shift periodic shift for the level (see getPeriodicShift())
+    * @param[in]    domain_tree search tree for the domain
+    */
+   void
+   findPatchesTouchingBoundaries(
+      std::map<LocalId, TwoDimBool>& touches_regular_boundary,
+      std::map<LocalId, TwoDimBool>& touches_periodic_boundary,
+      const PatchLevel& level,
+      const IntVector& periodic_shift,
+      const MappedBoxTree& domain_tree) const;
+
+   /*!
+    * @brief Version of findPatchTouchingBoundaries for a single box.
+    *
+    * @param[out]   touches_regular_bdry TwoDimBool to store which patches touch
+    *               non-periodic boundaries.
+    * @param[out]   touches_periodic_bdry TwoDimBool to store which patches touch
+    *               periodic boundaries.
+    * @param[in]    box to be checked
+    * @param[in]    periodic_shift periodic shift for the level (see getPeriodicShift())
+    * @param[in]    domain_tree search tree for the domain
+    */
+   void
+   computeBoxTouchingBoundaries(
+      TwoDimBool& touches_regular_bdry,
+      TwoDimBool& touches_periodic_bdry,
+      const Box& box,
+      const IntVector& periodic_shift,
+      const MappedBoxTree& domain_tree) const;
+
+   /*!
+    * @brief Sets geometry data for patches on a level.
+    *
+    * Using the boundary information previously computed, this method
+    * will pass the information to the concrete implementation of the
+    * geometry class, and construct boundary boxes if required.
+    *
+    * @param[in]   level containing the patches to be checked.
+    * @param[in]   ratio_to_level_zero ratio to the coarsest level.
+    * @param[in]   touches_regular_bdry Array storing which patches touch
+    *              non-periodic boundaries.
+    * @param[in]   touches_periodic_bdry Array storing which patches touch
+    *              periodic boundaries.
+    * @param[in]   defer_boundary_box_creation Flag to indicate if boundary
+    *              boxes should be created
+    */
+   /*
+    * TODO:  Are all these parameters really only input params?  If so, these
+    * should be const references rather than non-const.
+    *
+    * TODO:  The confusing coordination and sequence of calls between
+    *        grid geometry classes and patch geometry classes should
+    *        be reworked, including simplification of the data we're 
+    *        passing around.  Part of the issue is tied to the fact that
+    *        we are inheriting implementation here as well as providing
+    *        a concrete implementation of an interface.
+    */
+   virtual void
+   setGeometryOnPatches(
+      PatchLevel& level,
+      const IntVector& ratio_to_level_zero,
+      std::map<LocalId, TwoDimBool>& touches_regular_bdry,
+      std::map<LocalId, TwoDimBool>& touches_periodic_bdry,
+      bool defer_boundary_box_creation);
+
+   /*!
+    * @brief Construct and set the boundary boxes for each patch.
+    *
+    * Construct the boundary boxes for every patch in the level.
+    * Once constructed, the boundary boxes are set on each patch's
+    * PatchGeometry object.
+    *
+    * @param[in] level The level for which boundary boxes are constructed.
+    */
+   /*
+    * TODO:  really input param?  If so, should be const qualified.
+    * 
+    * TODO:  See the second TODO item for the previous method.
+    */
+   void
+   setBoundaryBoxes(
+      PatchLevel& level);
+
+   //@}
+
+   /*!
+    * @brief Compute the box array describing the index space of the
+    * physical domain managed by this geometry object.
+    *
+    * If any entry of the ratio vector is negative, the index space is
+    * coarsened with respect to the physical domain description.
+    * Otherwise, the index space is refined.
+    *
+    * @param[out]    domain The BoxArray to be computed
+    * @param[in]     ratio_to_level_zero ratio to the coarsest level
+    */
+   void
+   computePhysicalDomain(
+      BoxArray& domain,
+      const IntVector& ratio_to_level_zero) const;
+
+   /*!
+    * @brief Compute the MappedBoxedSet describing the index space of the
+    * physical domain managed by this geometry object.
+    *
+    * Unlike the BoxArray version of this function, the domain computed
+    * contains periodic image boxes.  If any entry of ratio vector is
+    * negative, the index space is coarsened with respect to the physical
+    * domain description.  Otherwise, the index space is refined.
+    *
+    * @param[out]    domain_mapped_boxes The MappedBoxSet containing all
+    *                MappedBoxes describing the index space
+    * @param[in]     ratio_to_level_zero ratio to the coarsest level
+    */
+   void
+   computePhysicalDomain(
+      MappedBoxSet& domain_mapped_boxes,
+      const IntVector& ratio_to_level_zero) const;
+
+   /*!
+    * @brief Set the physical domain (for level zero) to the input box array
+    * and determine whether the domain is a single box.
+    *
+    * @param[in]     domain The input BoxArray
+    */
+   void
+   setPhysicalDomain(
+      const BoxArray& domain);
+
+   /*!
+    * @brief Get the physical domain description for level zero.
+    *
+    * @return const reference to physical domain description for level 0.
+    */
+   const BoxArray&
+   getPhysicalDomain() const;
+
+   /*!
+    * @brief returns whether the physical domain managed by this geometry 
+    * object can be represented as a single box.
+    *
+    * @return true if the physical domain can be represented as a single box,
+    *         otherwise false.
+    */
+   bool
+   getDomainIsSingleBox() const;
+
+   /*!
+    * @brief Print object data to the specified output stream.
+    *
+    * @param[out] stream The output stream (as a std::ostream&) to print to.
+    */
+   void
+   printClassData(
+      std::ostream& stream) const;
+
+   /*!
+    * @brief Initialize the periodic shift on the coarsest level.
+    *
+    * @param[in]  directions an array indicating periodic directions(1) or
+    *             all others (0).
+    *
+    * @note
+    * The IntVector argument should be set to 1 for periodic directions
+    * and 0 for all other directions.  The shift will be calculated to
+    * the number of cells in the periodic direction and zero in all
+    * other directions.
+    */
+   void
+   initializePeriodicShift(
+      const IntVector& directions);
+
+   /*!
+    * @brief Get the periodic shift in each direction for the physical domain
+    * managed by this geometry object.
+    *
+    * The returned IntVector contains the periodic shift in each direction
+    * for a domain represented by a refinement of the reference physical
+    * domain (i.e. level zero) by the given ratio vector.  Entries
+    * will be zero for non-periodic directions.
+    *
+    * @param[in]     ratio_to_level_zero ratio to the coarsest level.
+    *
+    * @return        The periodic shift in each direction for a domain
+    *                represented by a refinement of the reference physical
+    *                domain.
+    */
+   IntVector
+   getPeriodicShift(
+      const IntVector& ratio_to_level_zero) const;
+
+
+   /*!
+    * @brief Get the max stencil width of all transfer operators.
+    *
+    * The max stencil width is required by the DLBG to determine when
+    * two nearby boxes are defined as neighbors.  The DLBG in turn
+    * provides the neighbor information for various operations such as
+    * schedule construction.
+    *
+    * @return The max stencil width of all transfer operators.
+    */
+   virtual IntVector
+   getMaxTransferOpStencilWidth() = 0;
+
+   /*!
+    * @brief Create a pointer to a refined version of this grid geometry
+    *        object.
+    *
+    * Pure virtual function.  Implementers must override this method.
+    *
+    * @param[in]     fine_geom_name std::string name of the geometry object
+    * @param[in]     refine_ratio the refinement ratio.
+    * @param[in]     register_for_restart Flag to indicate whether to register
+    *                for restart.
+    *
+    * @return The pointer to the grid geometry object.
+    */
+   virtual tbox::Pointer<GridGeometry>
+   makeRefinedGridGeometry(
+      const std::string& fine_geom_name,
+      const IntVector& refine_ratio,
+      bool register_for_restart) const = 0;
+
+   /*!
+    * @brief Create a pointer to a coarsened version of this grid geometry
+    *        object.
+    *
+    * Pure virtual function.  Implementers must override this method.
+    *
+    * @param[in]     coarse_geom_name std::string name of the geometry object
+    * @param[in]     coarsen_ratio the coasening ratio
+    * @param[in]     register_for_restart Flag to indicate whether to register
+    *                for restart.
+    *
+    * @return The pointer to a coarsened version of this grid geometry object.
+    */
+   virtual tbox::Pointer<GridGeometry>
+   makeCoarsenedGridGeometry(
+      const std::string& coarse_geom_name,
+      const IntVector& coarsen_ratio,
+      bool register_for_restart) const = 0;
+
+   /*!
+    * @brief Compute and set grid data for patch.
+    *
+    * Pure virtual function.  Implementers must override this method.
+    *
+    * @param[in,out]    patch The patch on which to set grid data and the new
+    *                   concrete patch geometry object.
+    * @param[in]        ratio_to_level_zero ratio to coarsest level
+    * @param[in]        touches_regular_bdry Array storing which patches touch
+    *                   non-periodic boundaries.
+    * @param[in]        touches_periodic_bdry Array storing which patches touch
+    *                   periodic boundaries.
+    */
+   /* 
+    * TODO:  See the second TODO item for the setGeometryOnPatches() method.
+    */
+   virtual void
+   setGeometryDataOnPatch(
+      Patch& patch,
+      const IntVector& ratio_to_level_zero,
+      const TwoDimBool& touches_regular_bdry,
+      const TwoDimBool& touches_periodic_bdry) const = 0;
+
+   /*!
+    * @brief Compute boundary boxes for each patch in patch level.
+    *
+    * Boundary boxes for each patch in a patch level will be computed and
+    * assign to boundary box arrays.  These arrays are assumed to be
+    * of length
+    * @code
+    *    DIM * num_patches
+    * @endcode.
+    *
+    * The DIM arrays of boundary boxes for each patch will be stored in groups
+    * of DIM. For example in 3D, with @c n patches on the level, the array
+    * of boundary box arrays will be ordered as follows:
+    *
+    * @code
+    * (patch 0 face array, patch 0 edge array, patch 0 mapped_box array,
+    *  patch 1 face array, patch 1 edge array, patch 1 mapped_box array, . . . ,
+    *  patch n-1 face array, patch n-1 edge array, patch n-1 mapped_box array)
+    * @endcode
+    *
+    * @note
+    * The optional argument @c do_all_patches defaults to false:
+    * the boundary box computation is executed only on patches that touch a
+    * non-periodic boundary.  When this routine is called during patch
+    * level construction to describe a physical boundary, it is known that
+    * only patches that touch a non-periodic boundary will have non-empty
+    * sets of boundary boxes, so for efficiency's sake the boundary box
+    * box computation is supressed for all other patches.
+    *
+    * When this routine is called to create boundary boxes that describe a
+    * coarse-fine boundary, the computation must occur for every patch, so
+    * @c do_all_patches must be set to true.
+    *
+    * @param[out]    boundaries output boundary description
+    * @param[in]     level level on which to generate boundaries
+    * @param[in]     periodic_shift periodic shift for the level
+    *                (see getPeriodicShift())
+    * @param[in]     ghost_width ghost width to compute geometry for the domain
+    * @param[in]     domain Physical domain (in index space of level) for
+    *                computing boundary boxes.
+    * @param[in]     do_all_patches Flag to indicate boundary box computation
+    *                on all patches, even those known to not touch a boundary
+    */
+   void
+   computeBoundaryBoxesOnLevel(
+      std::map<LocalId, PatchBoundaries>& boundaries,
+      const PatchLevel& level,
+      const IntVector& periodic_shift,
+      const IntVector& ghost_width,
+      const BoxArray& domain,
+      bool do_all_patches = false) const;
+
+   /*!
+    * @brief Compute boundary boxes for patch
+    *
+    * Decompose patch boundary region into pieces depending on spatial
+    * dimensions. Boxes are extended along the boundary to the edge
+    * of the ghost mapped_box_level if necessary.
+    *
+    * @param[out]    patch_boundaries output boundaries
+    * @param[in]     box
+    * @param[in]     domain_boxes
+    * @param[in]     ghosts
+    * @param[in]     periodic_shift
+    */
+   void
+   getBoundaryBoxes(
+      PatchBoundaries& patch_boundaries,
+      const Box& box,
+      const BoxArray& domain_boxes,
+      const IntVector& ghosts,
+      const IntVector& periodic_shift) const;
+
+   /*!
+    * @brief Get the dimension of this object.
+    *
+    * @return the dimension of this object.
+    */
+   const tbox::Dimension&
+   getDim() const;
+
+private:
+   /*!
+    * @brief Reset d_domain_mapped_box_level after data it depends on has changed.
+    */
+   void
+   resetDomainMappedBoxLevel();
+
+   /*!
+    * @brief Check that the domain is valid for periodic boundary conditions
+    */
+   bool
+   checkPeriodicValidity(
+      const BoxArray& domain);
+
+   /*!
+    * @brief Check on each BoundaryBox when it is created.
+    *
+    * This is a check performed on each BoundaryBox when it is created.
+    * It returns true when a BoundaryBox has a width of 1 in at least
+    * one direction, is adjacent to the patch boundary (possible extended
+    * into the patch's ghost region) and is outside the physical domain.
+    */
+   bool
+   checkBoundaryBox(
+      const BoundaryBox& boundary_box,
+      const Patch& patch,
+      const BoxArray& domain,
+      const int num_per_dirs,
+      const IntVector& max_data_ghost_width) const;
+
+   /*!
+    * @brief Compute shifts for a box on periodic boundary.
+    *
+    * If box is located on a periodic boundary, all of its possible shifts
+    * will be computed and stored in shifts.  If box is not on a periodic
+    * boundary, shifts will be an empty list.
+    *
+    * @param[out]    shifts vector storing the periodic shifts for a box
+    * @param[in]     box Box on which to compute periodic shifts
+    * @param[in]     domain_search_tree search tree for the domain
+    * @param[in]     periodic_shift
+    */
+   void
+   computeShiftsForBox(
+      std::vector<IntVector>& shifts,
+      const Box& box,
+      const MappedBoxTree& domain_search_tree,
+      const IntVector& periodic_shift) const;
+
+
+   /*!
+    * @brief Initialize static objects and register shutdown routine.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   initializeCallback();
+
+   /*!
+    * @brief Method registered with ShutdownRegister to cleanup statics.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   finalizeCallback();
+
+
+
+   /*!
+    * Initialize timers.
+    */
+   void
+   initializeTimers();
+
+   tbox::Dimension d_dim;
+
+   /*!
+    * Object name used for error reporting purposes.
+    */
+   std::string d_object_name;
+
+   /*!
+    * Box array defining computational domain on coarsest level
+    * and boolean flag that is true when domain is a single box.
+    */
+   BoxArray d_physical_domain;
+
+   /*!
+    * Tree representation of domain, used for searches.
+    *
+    * This representation does NOT contain any periodic image boxes of
+    * the domain.
+    */
+   tbox::Pointer<MappedBoxTree> d_domain_tree;
+   bool d_domain_is_single_box;
+
+   /*!
+    * @brief MappedBoxLevel representation of the physical domain, including
+    * its periodic image MappedBoxes.
+    */
+   MappedBoxLevel d_domain_mapped_box_level;
+
+   /*!
+    * Integer array vector describing periodic shift coarsest level.
+    * An entry of zero means direction is not periodic.
+    */
+   IntVector d_periodic_shift;
+
+   /*!
+    * Current maximum ghost cell width over all patch data objects
+    * known to the patch descriptor.  This is used to compute
+    * boundary boxes.
+    */
+   IntVector d_max_data_ghost_width;
+
+   static tbox::Pointer<tbox::Timer> t_find_patches_touching_boundaries;
+   static tbox::Pointer<tbox::Timer> t_touching_boundaries_init;
+   static tbox::Pointer<tbox::Timer> t_touching_boundaries_loop;
+   static tbox::Pointer<tbox::Timer> t_set_geometry_on_patches;
+   static tbox::Pointer<tbox::Timer> t_set_boundary_boxes;
+   static tbox::Pointer<tbox::Timer> t_set_geometry_data_on_patches;
+   static tbox::Pointer<tbox::Timer> t_compute_boundary_boxes_on_level;
+   static tbox::Pointer<tbox::Timer> t_get_boundary_boxes;
+
+   /* 
+    * Static initialization and cleanup handler.
+    */
+   static tbox::StartupShutdownManager::Handler
+   s_initialize_handler;
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/GridGeometry.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/Index.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/Index.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,65 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface for the AMR Index object 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_Index_C
+#define included_hier_Index_C
+
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/Index.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+Index * Index::s_zeros[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+Index * Index::s_ones[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+Index * Index::s_mins[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+Index * Index::s_maxs[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+tbox::StartupShutdownManager::Handler
+Index::s_initialize_finalize_handler(
+   Index::initializeCallback,
+   0,
+   0,
+   Index::finalizeCallback,
+   tbox::StartupShutdownManager::priorityTimers);
+
+void Index::initializeCallback()
+{
+   for (unsigned short d = 0; d < tbox::Dimension::MAXIMUM_DIMENSION_VALUE; ++d) {
+      s_zeros[d] = new Index(tbox::Dimension(static_cast<unsigned short>(d + 1)), 0);
+      s_ones[d] = new Index(tbox::Dimension(static_cast<unsigned short>(d + 1)), 1);
+
+      s_mins[d] = new Index(tbox::Dimension(static_cast<unsigned short>(d + 1)),
+            tbox::MathUtilities<int>::getMin());
+      s_maxs[d] = new Index(tbox::Dimension(static_cast<unsigned short>(d + 1)),
+            tbox::MathUtilities<int>::getMax());
+   }
+}
+
+void Index::finalizeCallback()
+{
+   for (int d = 0; d < tbox::Dimension::MAXIMUM_DIMENSION_VALUE; ++d) {
+      delete s_zeros[d];
+      delete s_ones[d];
+
+      delete s_mins[d];
+      delete s_maxs[d];
+   }
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/Index.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/Index.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,373 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface for the AMR Index object 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+Index::Index():
+   IntVector()
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+Index::Index(
+   const tbox::Dimension& dim):
+   IntVector(dim)
+{
+   // an explicit setting Invalid is allowed.
+   TBOX_DIM_ASSERT((!dim.isValid()) || (
+         dim.getValue() > 0 && dim <= tbox::Dimension::getMaxDimension()));
+}
+
+SAMRAI_INLINE_KEYWORD
+Index::Index(
+   const tbox::Dimension& dim,
+   const int i):
+   IntVector(dim, i)
+{
+   // an explicit setting Invalid is allowed.
+   TBOX_DIM_ASSERT((!dim.isValid()) || (
+         dim >= tbox::Dimension(1) && dim <= tbox::Dimension::getMaxDimension()));
+}
+
+SAMRAI_INLINE_KEYWORD
+Index::Index(
+   const int i,
+   const int j):
+   IntVector(tbox::Dimension(2))
+{
+   TBOX_DIM_ASSERT(
+      SAMRAI::tbox::Dimension::getMaxDimension() >= tbox::Dimension(2));
+
+   (*this)[0] = i;
+   if (SAMRAI::tbox::Dimension::MAXIMUM_DIMENSION_VALUE > 1) {
+      (*this)[1] = j;
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+Index::Index(
+   const int i,
+   const int j,
+   const int k):
+   IntVector(tbox::Dimension(3))
+{
+   TBOX_DIM_ASSERT(
+      SAMRAI::tbox::Dimension::getMaxDimension() >= tbox::Dimension(3));
+
+   (*this)[0] = i;
+   if (SAMRAI::tbox::Dimension::MAXIMUM_DIMENSION_VALUE > 1) {
+      (*this)[1] = j;
+   }
+
+   if (SAMRAI::tbox::Dimension::MAXIMUM_DIMENSION_VALUE > 2) {
+      (*this)[2] = k;
+   }
+
+}
+
+SAMRAI_INLINE_KEYWORD
+Index::Index(
+   const tbox::Array<int>& a):
+   IntVector(a)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+Index::Index(
+   const tbox::Dimension& dim,
+   const int array[]):
+   IntVector(dim, array)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+Index::Index(
+   const Index& rhs):
+   IntVector(rhs)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+Index::Index(
+   const IntVector& rhs):
+   IntVector(rhs)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+Index& Index::operator = (
+   const Index& rhs)
+{
+   /*
+    * Allow assignment of to an uninitialized
+    * but do not allow assignment from an
+    * uninitialized.
+    */
+   if (getDim().isValid()) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+   } else {
+      TBOX_DIM_ASSERT_CHECK_DIM(rhs.getDim());
+   }
+
+   IntVector::operator = (
+      rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+Index& Index::operator = (
+   const IntVector& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   IntVector::operator = (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+Index::~Index()
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+Index& Index::operator += (
+   const IntVector& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   IntVector::operator += (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+Index Index::operator + (
+   const IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   Index tmp = *this;
+   tmp += rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+Index& Index::operator += (
+   const int rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(getDim());
+
+   IntVector::operator += (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+Index Index::operator + (
+   const int rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(getDim());
+
+   Index tmp = *this;
+   tmp += rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+Index& Index::operator -= (
+   const IntVector& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   IntVector::operator -= (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+Index Index::operator - (
+   const IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   Index tmp = *this;
+   tmp -= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+Index& Index::operator -= (
+   const int rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(getDim());
+
+   IntVector::operator -= (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+Index Index::operator - (
+   const int rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(getDim());
+
+   Index tmp = *this;
+   tmp -= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+Index& Index::operator *= (
+   const IntVector& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   IntVector::operator *= (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+Index Index::operator * (
+   const IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   Index tmp = *this;
+   tmp *= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+Index& Index::operator *= (
+   const int rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(getDim());
+
+   IntVector::operator *= (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+Index Index::operator * (
+   const int rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(getDim());
+
+   Index tmp = *this;
+   tmp *= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+Index& Index::operator /= (
+   const IntVector& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   IntVector::operator /= (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+Index Index::operator / (
+   const IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   Index tmp = *this;
+   tmp /= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+Index& Index::operator /= (
+   const int rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(getDim());
+
+   IntVector::operator /= (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+Index Index::operator / (
+   const int rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(getDim());
+
+   Index tmp = *this;
+   tmp /= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+int Index::coarsen(
+   const int index,
+   const int ratio)
+{
+   return index < 0 ? (index + 1) / ratio - 1 : index / ratio;
+}
+
+SAMRAI_INLINE_KEYWORD
+Index& Index::coarsen(
+   const IntVector& ratio)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, ratio);
+
+   for (int d = 0; d < getDim().getValue(); ++d) {
+      (*this)(d) = coarsen((*this)(d), ratio(d));
+   }
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+const Index& Index::getZeroIndex(
+   const tbox::Dimension& dim) {
+   return *(s_zeros[dim.getValue() - 1]);
+}
+
+SAMRAI_INLINE_KEYWORD
+const Index& Index::getOneIndex(
+   const tbox::Dimension& dim) {
+   return *(s_ones[dim.getValue() - 1]);
+}
+
+SAMRAI_INLINE_KEYWORD
+const Index& Index::getMinIndex(
+   const tbox::Dimension& dim) {
+   return *(s_mins[dim.getValue() - 1]);
+}
+
+SAMRAI_INLINE_KEYWORD
+const Index& Index::getMaxIndex(
+   const tbox::Dimension& dim) {
+   return *(s_maxs[dim.getValue() - 1]);
+}
+
+SAMRAI_INLINE_KEYWORD
+Index Index::coarsen(
+   const Index& index,
+   const IntVector& ratio)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(index, ratio);
+
+   tbox::Dimension dim(index.getDim());
+
+   Index tmp(dim);
+   for (int d = 0; d < dim.getValue(); ++d) {
+      tmp(d) = coarsen(index(d), ratio(d));
+   }
+   return tmp;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/Index.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/Index.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,332 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface for the AMR Index object 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_Index
+#define included_hier_Index
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/Array.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/**
+ * Class Index implements a simple n-dimensional integer vector in the
+ * AMR index space.  Index is used as lower and upper bounds when
+ * creating a box and also when iterating over the cells in a box.  An
+ * index is essentially an integer vector but it carries along the
+ * notion of indexing into AMR's abstract index space.
+ *
+ * @see hier::Box
+ * @see hier::BoxIterator
+ * @see hier::IntVector
+ */
+
+class Index:public IntVector
+{
+public:
+   /**
+    * Creates an uninitialized vector.
+    */
+   explicit Index(
+      const tbox::Dimension& dim);
+
+   /**
+    * Construct an index with all components equal to the argument.
+    */
+   explicit Index(
+      const tbox::Dimension& dim,
+      const int i);
+
+   /**
+    * Construct a two-dimensional index with the value (i,j).
+    */
+   explicit Index(
+      const int i,
+      const int j);
+
+   /**
+    * Construct a three-dimensional index with the value (i,j,k).
+    */
+   explicit Index(
+      const int i,
+      const int j,
+      const int k);
+
+   /**
+    * Construct an n-dimensional index with the values copied
+    * from the integer tbox::Array i of size n.
+    */
+   explicit Index(
+      const tbox::Array<int>& i);
+
+   /**
+    * The copy constructor creates an index equal to the argument.
+    */
+   Index(
+      const Index& rhs);
+
+   /**
+    * Construct an index equal to the argument IntVector.
+    */
+   Index(
+      const IntVector& rhs);
+
+   /**
+    * Construct an index equal to the argument array.
+    */
+   explicit Index(
+      const tbox::Dimension& dim,
+      const int array[]);
+
+   /**
+    * The assignment operator sets the index equal to the argument.
+    *
+    * An assignment to an uninitialized Index is allowed but assigning
+    * from an uninitialized Index will result in an assert.
+    */
+   Index&
+   operator = (
+      const Index& rhs);
+
+   /**
+    * The assignment operator sets the index equal to the argument IntVector.
+    */
+   Index&
+   operator = (
+      const IntVector& rhs);
+
+   /**
+    * The index destructor does nothing interesting.
+    */
+   ~Index();
+
+   /**
+    * Plus-equals operator for an index and an integer vector.
+    */
+   Index&
+   operator += (
+      const IntVector& rhs);
+
+   /**
+    * Plus operator for an index and an integer vector.
+    */
+   Index
+   operator + (
+      const IntVector& rhs) const;
+
+   /**
+    * Plus-equals operator for an index and an integer.
+    */
+   Index&
+   operator += (
+      const int rhs);
+
+   /**
+    * Plus operator for an index and an integer.
+    */
+   Index
+   operator + (
+      const int rhs) const;
+
+   /**
+    * Minus-equals operator for an index and an integer vector.
+    */
+   Index&
+   operator -= (
+      const IntVector& rhs);
+
+   /**
+    * Minus operator for an index and an integer vector.
+    */
+   Index
+   operator - (
+      const IntVector& rhs) const;
+
+   /**
+    * Minus-equals operator for an index and an integer.
+    */
+   Index&
+   operator -= (
+      const int rhs);
+
+   /**
+    * Minus operator for an index and an integer.
+    */
+   Index
+   operator - (
+      const int rhs) const;
+
+   /**
+    * Times-equals operator for an index and an integer vector.
+    */
+   Index&
+   operator *= (
+      const IntVector& rhs);
+
+   /**
+    * Times operator for an index and an integer vector.
+    */
+   Index
+   operator * (
+      const IntVector& rhs) const;
+
+   /**
+    * Times-equals operator for an index and an integer.
+    */
+   Index&
+   operator *= (
+      const int rhs);
+
+   /**
+    * Times operator for an index and an integer.
+    */
+   Index
+   operator * (
+      const int rhs) const;
+
+   /**
+    * Assign-quotient operator for an index and an integer vector.
+    */
+   Index&
+   operator /= (
+      const IntVector& rhs);
+
+   /**
+    * Quotient operator for an index and an integer vector.
+    */
+   Index
+   operator / (
+      const IntVector& rhs) const;
+
+   /**
+    * Assign-quotient operator for an index and an integer.
+    */
+   Index&
+   operator /= (
+      const int rhs);
+
+   /**
+    * Quotient operator for an index and an integer.
+    */
+   Index
+   operator / (
+      const int rhs) const;
+
+   /*!
+    * @brief Coarsen the Index by a given ratio.
+    *
+    * For positive indices, this is the same as dividing by the ratio.
+    */
+   Index&
+   coarsen(
+      const IntVector& ratio);
+
+   /*!
+    * @brief Return an Index of zeros of the specified dimension.
+    *
+    * Can be used to avoid object creation overheads.
+    */
+   static const Index&
+   getZeroIndex(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Return an Index of ones of the specified dimension.
+    *
+    * Can be used to avoid object creation overheads.
+    */
+   static const Index&
+   getOneIndex(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Return an Index with minimum index values for the
+    * specified dimension.
+    *
+    * Can be used to avoid object creation overheads.
+    */
+   static const Index&
+   getMinIndex(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Return an Index with maximum index values for the
+    * specified dimension.
+    *
+    * Can be used to avoid object creation overheads.
+    */
+   static const Index&
+   getMaxIndex(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Coarsen an Index by a given ratio.
+    *
+    * For positive indices, this is the same as dividing by the ratio.
+    */
+   static Index
+   coarsen(
+      const Index& index,
+      const IntVector& ratio);
+
+private:
+
+   friend class std::vector<Index>;
+
+   /**
+    * The default constructor for Index creates an uninitialized index.
+    */
+   Index();
+
+   static int
+   coarsen(
+      const int index,
+      const int ratio);
+
+   /*!
+    * @brief Initialize static objects and register shutdown routine.
+    *
+    * Only called by StartupShutdownManager.
+    *
+    */
+   static void
+   initializeCallback();
+
+   /*!
+    * @brief Method registered with ShutdownRegister to cleanup statics.
+    *
+    * Only called by StartupShutdownManager.
+    *
+    */
+   static void
+   finalizeCallback();
+
+   static Index* s_zeros[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   static Index* s_ones[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   static Index* s_maxs[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   static Index* s_mins[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   static tbox::StartupShutdownManager::Handler
+   s_initialize_finalize_handler;
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/Index.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/IntVector.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/IntVector.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,107 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A n-dimensional integer vector 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_IntVector_C
+#define included_hier_IntVector_C
+
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/IntVector.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+IntVector * IntVector::s_zeros[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+IntVector * IntVector::s_ones[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+tbox::StartupShutdownManager::Handler
+IntVector::s_initialize_finalize_handler(
+   IntVector::initializeCallback,
+   0,
+   0,
+   IntVector::finalizeCallback,
+   tbox::StartupShutdownManager::priorityTimers);
+
+std::istream& operator >> (
+   std::istream& s,
+   IntVector& rhs)
+{
+   while (s.get() != '(') ;
+
+   for (int i = 0; i < rhs.getDim().getValue(); i++) {
+      s >> rhs(i);
+      if (i < rhs.getDim().getValue() - 1)
+         while (s.get() != ',') ;
+   }
+
+   while (s.get() != ')') ;
+
+   return s;
+}
+
+std::ostream& operator << (
+   std::ostream& s,
+   const IntVector& rhs)
+{
+   s << '(';
+
+   for (int i = 0; i < rhs.getDim().getValue(); i++) {
+      s << rhs(i);
+      if (i < rhs.getDim().getValue() - 1)
+         s << ",";
+   }
+   s << ')';
+
+   return s;
+}
+
+void IntVector::putToDatabase(
+   tbox::Database& database,
+   const std::string& name) const
+{
+   database.putIntegerArray(name, d_vector, d_dim.getValue());
+}
+
+void IntVector::getFromDatabase(
+   tbox::Database& database,
+   const std::string& name)
+{
+   int d = database.getArraySize(name);
+   d_dim = tbox::Dimension(static_cast<unsigned short>(d));
+   database.getIntegerArray(name, d_vector, d_dim.getValue());
+}
+
+void IntVector::initializeCallback()
+{
+   for (unsigned short d = 0; d < tbox::Dimension::MAXIMUM_DIMENSION_VALUE; ++d) {
+      s_zeros[d] = new IntVector(tbox::Dimension(static_cast<unsigned short>(d + 1)), 0);
+   }
+
+   for (unsigned short d = 0; d < tbox::Dimension::MAXIMUM_DIMENSION_VALUE; ++d) {
+      s_ones[d] = new IntVector(tbox::Dimension(static_cast<unsigned short>(d + 1)), 1);
+   }
+}
+
+void IntVector::finalizeCallback()
+{
+   for (int d = 0; d < tbox::Dimension::MAXIMUM_DIMENSION_VALUE; ++d) {
+      delete s_zeros[d];
+      delete s_ones[d];
+   }
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/IntVector.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/IntVector.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,645 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A n-dimensional integer vector 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Dimension& IntVector::getDim() const
+{
+   return d_dim;
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector::IntVector():
+   d_dim(SAMRAI::tbox::Dimension::getInvalidDimension())
+{
+#ifdef DEBUG_INITIALIZE_UNDEFINED
+   for (int i = 0; i < SAMRAI::tbox::Dimension::MAXIMUM_DIMENSION_VALUE; i++) {
+      d_vector[i] = SAMRAI::tbox::MathUtilities<int>::getMin();
+   }
+#endif
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector::IntVector(
+   const tbox::Dimension& dim):
+   d_dim(dim)
+{
+   // an explicit setting Invalid is allowed.
+   TBOX_DIM_ASSERT((!d_dim.isValid()) ||
+      (d_dim >= SAMRAI::tbox::Dimension(1) && d_dim <= SAMRAI::tbox::Dimension::getMaxDimension()));
+
+#ifdef DEBUG_INITIALIZE_UNDEFINED
+   for (int i = 0; i < SAMRAI::tbox::Dimension::MAXIMUM_DIMENSION_VALUE; i++) {
+      d_vector[i] = SAMRAI::tbox::MathUtilities<int>::getMin();
+   }
+#endif
+
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector::IntVector(
+   const tbox::Dimension& dim,
+   const int value):
+   d_dim(dim)
+{
+   // an explicit setting Invalid is allowed.
+   TBOX_DIM_ASSERT((!d_dim.isValid()) ||
+      (d_dim >= SAMRAI::tbox::Dimension(1) && d_dim <= SAMRAI::tbox::Dimension::getMaxDimension()));
+
+   if (d_dim.isValid()) {
+      for (int i = 0; i < d_dim.getValue(); i++)
+         d_vector[i] = value;
+
+#ifdef DEBUG_INITIALIZE_UNDEFINED
+      for (int i = d_dim.getValue(); i < SAMRAI::tbox::Dimension::MAXIMUM_DIMENSION_VALUE;
+           i++) {
+         d_vector[i] = SAMRAI::tbox::MathUtilities<int>::getMin();
+      }
+#endif
+   } else {
+      for (int i = 0; i < SAMRAI::tbox::Dimension::MAXIMUM_DIMENSION_VALUE; i++) {
+         d_vector[i] = SAMRAI::tbox::MathUtilities<int>::getMin();
+      }
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector::IntVector(
+   const tbox::Array<int>& a):
+   d_dim(static_cast<unsigned short>(a.getSize()))
+{
+   TBOX_DIM_ASSERT(a.getSize() > 1 &&
+      a.getSize() <= SAMRAI::tbox::Dimension::MAXIMUM_DIMENSION_VALUE);
+
+   for (int i = 0; i < d_dim.getValue(); i++)
+      d_vector[i] = a[i];
+
+#ifdef DEBUG_INITIALIZE_UNDEFINED
+   for (int i = d_dim.getValue(); i < SAMRAI::tbox::Dimension::MAXIMUM_DIMENSION_VALUE; i++) {
+      d_vector[i] = SAMRAI::tbox::MathUtilities<int>::getMin();
+   }
+#endif
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector::IntVector(
+   const IntVector& rhs):
+   d_dim(rhs.getDim())
+{
+   /*
+    * STL needs to be able to copy invalid values.
+    */
+   if (rhs.getDim().isValid()) {
+      TBOX_DIM_ASSERT_CHECK_DIM(rhs.getDim());
+
+      for (int i = 0; i < d_dim.getValue(); i++)
+         d_vector[i] = rhs.d_vector[i];
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector::IntVector(
+   const tbox::Dimension& dim,
+   const int array[]):
+   d_dim(dim)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(dim);
+
+   for (int i = 0; i < d_dim.getValue(); i++)
+      d_vector[i] = array[i];
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector& IntVector::operator = (
+   const IntVector& rhs)
+{
+   /*
+    * Allow assignment of to an uninitialized but do not allow
+    * assignment from an uninitialized.
+    */
+   if (d_dim.isValid()) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+   } else {
+      TBOX_DIM_ASSERT_CHECK_DIM(rhs.getDim());
+      d_dim = rhs.getDim();
+   }
+
+   for (int i = 0; i < d_dim.getValue(); i++)
+      d_vector[i] = rhs.d_vector[i];
+
+#ifdef DEBUG_INITIALIZE_UNDEFINED
+   for (int i = d_dim.getValue(); i < SAMRAI::tbox::Dimension::MAXIMUM_DIMENSION_VALUE; i++) {
+      d_vector[i] = SAMRAI::tbox::MathUtilities<int>::getMin();
+   }
+#endif
+
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector::~IntVector()
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+int& IntVector::operator [] (
+   const int i)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(d_dim);
+   TBOX_ASSERT(i >= 0 && i < d_dim.getValue());
+   return d_vector[i];
+}
+
+SAMRAI_INLINE_KEYWORD
+const int& IntVector::operator [] (
+   const int i) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(d_dim);
+   TBOX_ASSERT(i >= 0 && i < d_dim.getValue());
+   return d_vector[i];
+}
+
+SAMRAI_INLINE_KEYWORD
+int& IntVector::operator () (
+   const int i)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(d_dim);
+   TBOX_ASSERT(i >= 0 && i < d_dim.getValue());
+   return d_vector[i];
+}
+
+SAMRAI_INLINE_KEYWORD
+const int& IntVector::operator () (
+   const int i) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(d_dim);
+   TBOX_ASSERT(i >= 0 && i < d_dim.getValue());
+   return d_vector[i];
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector& IntVector::operator += (
+   const IntVector& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   for (int i = 0; i < d_dim.getValue(); i++)
+      d_vector[i] += rhs.d_vector[i];
+
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector IntVector::operator + (
+   const IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   IntVector tmp(*this);
+   tmp += rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector& IntVector::operator += (
+   const int rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(d_dim);
+
+   for (int i = 0; i < d_dim.getValue(); i++)
+      d_vector[i] += rhs;
+
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector IntVector::operator + (
+   const int rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(d_dim);
+
+   IntVector tmp = *this;
+   tmp += rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector& IntVector::operator -= (
+   const IntVector& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   for (int i = 0; i < d_dim.getValue(); i++)
+      d_vector[i] -= rhs.d_vector[i];
+
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector IntVector::operator - (
+   const IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   IntVector tmp = *this;
+   tmp -= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector& IntVector::operator -= (
+   const int rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(d_dim);
+
+   for (int i = 0; i < d_dim.getValue(); i++)
+      d_vector[i] -= rhs;
+
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector IntVector::operator - (
+   const int rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(d_dim);
+
+   IntVector tmp = *this;
+   tmp -= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector& IntVector::operator *= (
+   const IntVector& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   for (int i = 0; i < d_dim.getValue(); i++)
+      d_vector[i] *= rhs.d_vector[i];
+
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector IntVector::operator * (
+   const IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   IntVector tmp = *this;
+   tmp *= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector& IntVector::operator *= (
+   const int rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(d_dim);
+
+   for (int i = 0; i < d_dim.getValue(); i++)
+      d_vector[i] *= rhs;
+
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector IntVector::operator * (
+   const int rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(d_dim);
+
+   IntVector tmp = *this;
+   tmp *= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector& IntVector::operator /= (
+   const IntVector& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   for (int i = 0; i < d_dim.getValue(); i++)
+      d_vector[i] /= rhs.d_vector[i];
+
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+void IntVector::ceiling(
+   const IntVector& denominator)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, denominator);
+
+   for (int i = 0; i < getDim().getValue(); i++) {
+      /*
+       * This is the formula for integer divide, rounding away from
+       * zero.  It is meant as an extension of the ceiling quotient of
+       * 2 positive integers.
+       *
+       * The ceiling is the integer divide plus 0, -1 or 1 representing
+       * the results of rounding.
+       * - Add zero if there's no remainder to round.
+       * - Round remainder to 1 if numerator and denominator has same sign.
+       * - Round remainder to -1 if numerator and denominator has opposite sign.
+       */
+      d_vector[i] = (d_vector[i] / denominator[i])
+         + ((d_vector[i] % denominator[i]) ?
+            ((d_vector[i] > 0) == (denominator[i] > 0) ? 1 : -1) : 0);
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector IntVector::ceiling(
+   const IntVector& numerator,
+   const IntVector& denominator)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(numerator, denominator);
+
+   IntVector rval(numerator.getDim());
+   for (int i = 0; i < numerator.getDim().getValue(); i++) {
+      /*
+       * This is the formula for integer divide, rounding away from
+       * zero.  It is meant as an extension of the ceiling quotient of
+       * 2 positive integers.
+       *
+       * The ceiling is the integer divide plus 0, -1 or 1 representing
+       * the results of rounding.
+       * - Add zero if there's no remainder to round.
+       * - Round remainder to 1 if numerator and denominator has same sign.
+       * - Round remainder to -1 if numerator and denominator has opposite sign.
+       */
+      rval[i] = (numerator[i] / denominator[i])
+         + ((numerator[i] % denominator[i]) ?
+            ((numerator[i] > 0) == (denominator[i] > 0) ? 1 : -1) : 0);
+   }
+   return rval;
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector IntVector::operator / (
+   const IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   IntVector tmp = *this;
+   tmp /= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector& IntVector::operator /= (
+   const int rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(d_dim);
+
+   for (int i = 0; i < d_dim.getValue(); i++)
+      d_vector[i] /= rhs;
+
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector IntVector::operator / (
+   const int rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(d_dim);
+
+   IntVector tmp = *this;
+   tmp /= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector IntVector::operator - () const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(d_dim);
+
+   IntVector tmp(d_dim);
+   for (int i = 0; i < d_dim.getValue(); i++)
+      tmp.d_vector[i] = -d_vector[i];
+
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool IntVector::operator == (
+   int rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(d_dim);
+
+   bool result = true;
+
+   for (int i = 0; result && (i < d_dim.getValue()); i++)
+      result = d_vector[i] == rhs;
+
+   return result;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool IntVector::operator != (
+   int rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(d_dim);
+
+   bool result = true;
+
+   for (int i = 0; result && (i < d_dim.getValue()); i++)
+      result = d_vector[i] != rhs;
+
+   return result;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool IntVector::operator == (
+   const IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   bool result = true;
+
+   for (int i = 0; result && (i < d_dim.getValue()); i++)
+      result = result && (d_vector[i] == rhs.d_vector[i]);
+
+   return result;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool IntVector::operator != (
+   const IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   return !(*this == rhs);
+}
+
+SAMRAI_INLINE_KEYWORD
+void IntVector::min(
+   IntVector const& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   for (int i = 0; i < d_dim.getValue(); i++)
+      if (rhs.d_vector[i] < d_vector[i])
+         d_vector[i] = rhs.d_vector[i];
+
+}
+
+SAMRAI_INLINE_KEYWORD
+bool IntVector::operator < (
+   const IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   bool result = true;
+
+   for (int i = 0; result && (i < d_dim.getValue()); i++)
+      result = result && (d_vector[i] < rhs.d_vector[i]);
+
+   return result;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool IntVector::operator <= (
+   const IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   bool result = true;
+
+   for (int i = 0; result && (i < d_dim.getValue()); i++)
+      result = result && (d_vector[i] <= rhs.d_vector[i]);
+
+   return result;
+
+}
+
+SAMRAI_INLINE_KEYWORD
+bool IntVector::operator > (
+   const IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   bool result = true;
+
+   for (int i = 0; result && (i < d_dim.getValue()); i++)
+      result = result && (d_vector[i] > rhs.d_vector[i]);
+
+   return result;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool IntVector::operator >= (
+   const IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   bool result = true;
+
+   for (int i = 0; result && (i < d_dim.getValue()); i++)
+      result = result && (d_vector[i] >= rhs.d_vector[i]);
+
+   return result;
+}
+
+SAMRAI_INLINE_KEYWORD
+int IntVector::min() const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(d_dim);
+
+   int min = d_vector[0];
+
+   for (int i = 1; i < d_dim.getValue(); i++)
+      if (d_vector[i] < min)
+         min = d_vector[i];
+
+   return min;
+}
+
+SAMRAI_INLINE_KEYWORD
+void IntVector::max(
+   const IntVector& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   for (int i = 0; i < d_dim.getValue(); i++)
+      if (rhs.d_vector[i] > d_vector[i])
+         d_vector[i] = rhs.d_vector[i];
+}
+
+SAMRAI_INLINE_KEYWORD
+int IntVector::max() const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(d_dim);
+
+   int max = d_vector[0];
+
+   for (int i = 1; i < d_dim.getValue(); i++)
+      if (d_vector[i] > max)
+         max = d_vector[i];
+
+   return max;
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector IntVector::min(
+   const IntVector& a,
+   const IntVector& b)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(a, b);
+
+   IntVector tmp = a;
+   tmp.min(b);
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+IntVector IntVector::max(
+   const IntVector& a,
+   const IntVector& b)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(a, b);
+
+   IntVector tmp = a;
+   tmp.max(b);
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+int IntVector::getProduct() const
+{
+   int prod = 1;
+   for (int i = 0; i < d_dim.getValue(); i++) {
+      prod *= d_vector[i];
+   }
+   return prod;
+}
+
+SAMRAI_INLINE_KEYWORD
+const IntVector& IntVector::getZero(
+   const tbox::Dimension& dim) {
+   return *(s_zeros[dim.getValue() - 1]);
+}
+
+SAMRAI_INLINE_KEYWORD
+const IntVector& IntVector::getOne(
+   const tbox::Dimension& dim) {
+   return *(s_ones[dim.getValue() - 1]);
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/IntVector.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/IntVector.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,472 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A N-dimensional integer vector 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_IntVector
+#define included_hier_IntVector
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Dimension.h"
+
+#include <vector>
+#include <iostream>
+
+namespace SAMRAI {
+
+namespace hier {
+
+/**
+ * Class IntVector implements a simple N-dimensional integer
+ * vector.  This class is the base class for most of the simple indexing
+ * classes.
+ *
+ */
+
+class IntVector
+{
+public:
+   /**
+    * Creates an uninitialized vector.
+    */
+   explicit IntVector(
+      const tbox::Dimension& dim);
+
+   /**
+    * Construct an integer vector with all components equal to the argument.
+    */
+   explicit IntVector(
+      const tbox::Dimension& dim,
+      const int i);
+
+   /**
+    * Construct a n-dimensional integer vector with the value with
+    * values provided by the array.
+    *
+    * Dimension inferred from array size.
+    */
+   explicit IntVector(
+      const tbox::Array<int>& a);
+
+   /**
+    * Construct a n-dimensional integer vector with the value with
+    * values provided by the array.
+    *
+    */
+   explicit IntVector(
+      const tbox::Dimension& dim,
+      const int array[]);
+
+   /**
+    * Construct an integer vector equal to the argument.
+    */
+   IntVector(
+      const IntVector& rhs);
+
+   /**
+    * The assignment operator sets the integer vector equal to the argument.
+    *
+    * An assignment to an uninitialized Index is allowed but assigning
+    * from an uninitialized Index will result in an assert.
+    */
+   IntVector&
+   operator = (
+      const IntVector& rhs);
+
+   /**
+    * The integer vector destructor does nothing interesting.
+    */
+   virtual ~IntVector();
+
+   /**
+    * Return the specified component of the vector.  No bounds checking.
+    */
+   int&
+   operator [] (
+      const int i);
+
+   /**
+    * Return the specified component of the vector as a const integer.
+    * No bounds checking.
+    */
+   const int&
+   operator [] (
+      const int i) const;
+
+   /**
+    * Return the specified component of the vector.  No bounds checking.
+    */
+   int&
+   operator () (
+      const int i);
+
+   /**
+    * Return the specified component of the vector as a const integer.
+    * No bounds checking.
+    */
+   const int&
+   operator () (
+      const int i) const;
+
+   /**
+    * Plus-equals operator for two integer vectors.
+    */
+   IntVector&
+   operator += (
+      const IntVector& rhs);
+
+   /**
+    * Plus operator for two integer vectors.
+    */
+   IntVector
+   operator + (
+      const IntVector& rhs) const;
+
+   /**
+    * Plus-equals operator for an integer vector and an integer.
+    */
+   IntVector&
+   operator += (
+      const int rhs);
+
+   /**
+    * Plus operator for an integer vector and an integer.
+    */
+   IntVector
+   operator + (
+      const int rhs) const;
+
+   /**
+    * Minus-equals operator for two integer vectors.
+    */
+   IntVector&
+   operator -= (
+      const IntVector& rhs);
+
+   /**
+    * Minus operator for two integer vectors.
+    */
+   IntVector
+   operator - (
+      const IntVector& rhs) const;
+
+   /**
+    * Minus-equals operator for an integer vector and an integer.
+    */
+   IntVector&
+   operator -= (
+      const int rhs);
+
+   /**
+    * Minus operator for an integer vector and an integer.
+    */
+   IntVector
+   operator - (
+      const int rhs) const;
+
+   /**
+    * Times-equals operator for two integer vectors.
+    */
+   IntVector&
+   operator *= (
+      const IntVector& rhs);
+
+   /**
+    * Times operator for two integer vectors.
+    */
+   IntVector
+   operator * (
+      const IntVector& rhs) const;
+
+   /**
+    * Times-equals operator for an integer vector and an integer.
+    */
+   IntVector&
+   operator *= (
+      const int rhs);
+
+   /**
+    * Times operator for an integer vector and an integer.
+    */
+   IntVector
+   operator * (
+      const int rhs) const;
+
+   /**
+    * Assign-quotient operator for two integer vectors.
+    */
+   IntVector&
+   operator /= (
+      const IntVector& rhs);
+
+   /**
+    * Component-wise ceiling quotient (integer divide with rounding up).
+    */
+   void
+   ceiling(
+      const IntVector& denominator);
+
+   /**
+    * Component-wise ceiling quotient (integer divide with rounding up).
+    */
+   static IntVector
+   ceiling(
+      const IntVector& numerator,
+      const IntVector& denominator);
+
+   /**
+    * Quotient operator for two integer vectors.
+    */
+   IntVector
+   operator / (
+      const IntVector& rhs) const;
+
+   /**
+    * Assign-quotient operator for an integer vector and an integer.
+    */
+   IntVector&
+   operator /= (
+      const int rhs);
+
+   /**
+    * Quotient operator for an integer vector and an integer.
+    */
+   IntVector
+   operator / (
+      const int rhs) const;
+
+   /**
+    * Unary minus to negate an integer vector.
+    */
+   IntVector
+   operator - () const;
+
+   /**
+    * Returns true if all components are equal to a given integer.
+    */
+   bool
+   operator == (
+      int rhs) const;
+
+   /**
+    * Returns true if some components are not equal to a given integer.
+    */
+   bool
+   operator != (
+      int rhs) const;
+
+   /**
+    * Returns true if two vector objects are equal.  All components
+    * must be the same for equality.
+    */
+   bool
+   operator == (
+      const IntVector& rhs) const;
+
+   /**
+    * Returns true if two vector objects are not equal.  Any of
+    * the components may be different for inequality.
+    */
+   bool
+   operator != (
+      const IntVector& rhs) const;
+
+   /**
+    * Returns true if each integer in vector is less than
+    * corresponding integer in comparison vector.
+    */
+   bool
+   operator < (
+      const IntVector& rhs) const;
+
+   /**
+    * Returns true if each integer in vector is less or equal to
+    * corresponding integer in comparison vector.
+    */
+   bool
+   operator <= (
+      const IntVector& rhs) const;
+
+   /**
+    * Returns true if each integer in vector is greater than
+    * corresponding integer in comparison vector.
+    */
+   bool
+   operator > (
+      const IntVector& rhs) const;
+
+   /**
+    * Returns true if each integer in vector is greater or equal to
+    * corresponding integer in comparison vector.
+    */
+   bool
+   operator >= (
+      const IntVector& rhs) const;
+
+   /**
+    * Return the component-wise minimum of two integer vector objects.
+    */
+   void
+   min(
+      const IntVector& rhs);
+
+   /**
+    * Return the minimum entry in an integer vector.
+    */
+   int
+   min() const;
+
+   /**
+    * Return the component-wise maximum of two integer vector objects.
+    */
+   void
+   max(
+      const IntVector& rhs);
+
+   /**
+    * Return the maximum entry in an integer vector.
+    */
+   int
+   max() const;
+
+   /**
+    * Utility function to take the minimum of two integer vector objects.
+    */
+   static IntVector
+   min(
+      const IntVector& a,
+      const IntVector& b);
+
+   /**
+    * Utility function to take the maximum of two integer vector objects.
+    */
+   static IntVector
+   max(
+      const IntVector& a,
+      const IntVector& b);
+
+   /**
+    * Return the product of the entries in the integer vector.
+    */
+   int
+   getProduct() const;
+
+   /**
+    * Store the object state to the specified database
+    * with the provided name.
+    *
+    */
+   virtual void
+   putToDatabase(
+      tbox::Database& database,
+      const std::string& name) const;
+
+   /**
+    * Restores the object state from the specified database
+    * with the provided name.
+    *
+    */
+   virtual void
+   getFromDatabase(
+      tbox::Database& database,
+      const std::string& name);
+
+   /**
+    * Return the dimension of this object.
+    */
+   const tbox::Dimension&
+   getDim() const;
+
+   /*!
+    * @brief Return an IntVector of zeros of the specified dimension.
+    *
+    * Can be used to avoid object creation overheads.
+    */
+   static const IntVector&
+   getZero(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Return an IntVector of ones of the specified dimension.
+    *
+    * Can be used to avoid object creation overheads.
+    */
+   static const IntVector&
+   getOne(
+      const tbox::Dimension& dim);
+
+   /**
+    * Read an integer vector from an input stream.  The format for
+    * the input is (i0,...,in) for an n-dimensional vector.
+    */
+   friend std::istream&
+   operator >> (
+      std::istream& s,
+      IntVector& rhs);
+
+   /**
+    * Write an integer vector into an output stream.  The format for
+    * the output is (i0,...,in) for an n-dimensional vector.
+    */
+   friend std::ostream&
+   operator << (
+      std::ostream& s,
+      const IntVector& rhs);
+
+   friend class std::vector<IntVector>;
+
+protected:
+   /**
+    * Default ctor for IntVector is protected to disallow normal use.
+    * This is needed by the poorly designed STL container library.
+    *
+    *
+    */
+   IntVector();
+
+private:
+   /*!
+    * @brief Initialize static objects and register shutdown routine.
+    *
+    * Only called by StartupShutdownManager.
+    *
+    */
+   static void
+   initializeCallback();
+
+   /*!
+    * @brief Method registered with ShutdownRegister to cleanup statics.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   finalizeCallback();
+
+   tbox::Dimension d_dim;
+
+   int d_vector[SAMRAI::tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   static IntVector* s_zeros[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   static IntVector* s_ones[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   static tbox::StartupShutdownManager::Handler
+   s_initialize_finalize_handler;
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/IntVector.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/LocalId.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/LocalId.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,46 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generic identifier used on a single process. 
+ *
+ ************************************************************************/
+#ifndef included_hier_LocalId_C
+#define included_hier_LocalId_C
+
+#include "SAMRAI/hier/LocalId.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#include <iostream>
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/LocalId.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+const LocalId LocalId::s_invalid_id(tbox::MathUtilities<int>::getMax());
+const LocalId LocalId::s_zero_id(0);
+
+
+
+/*
+********************************************************************************
+********************************************************************************
+*/
+std::ostream &operator << (
+   std::ostream &co,
+   const LocalId &r)
+{
+   co << r.d_value;
+   return co;
+}
+
+
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/LocalId.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/LocalId.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,474 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generic identifier used on a single process. 
+ *
+ ************************************************************************/
+#include "SAMRAI/tbox/MathUtilities.h"
+
+namespace SAMRAI {
+namespace hier {
+
+
+/*
+********************************************************************************
+********************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+LocalId::LocalId()
+   : d_value( getInvalidId().d_value ) {
+   return;
+}
+
+
+/*
+********************************************************************************
+********************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+LocalId::LocalId(const LocalId &other)
+   : d_value( other.d_value ) {
+   return;
+}
+
+
+/*
+********************************************************************************
+********************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+LocalId::LocalId(const int &value)
+   : d_value( value ) {
+   return;
+}
+
+
+/*
+********************************************************************************
+********************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+LocalId::~LocalId()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   d_value = s_invalid_id.d_value;
+#endif
+   return;
+}
+
+
+/*
+********************************************************************************
+* Assignment operator.
+********************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+LocalId &LocalId::operator = ( const LocalId &rhs)
+{
+   d_value = rhs.d_value;
+   return *this;
+}
+
+/*
+********************************************************************************
+* Assignment operator.
+********************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+LocalId &LocalId::operator = ( const int &rhs)
+{
+   d_value = rhs;
+   return *this;
+}
+
+
+/*
+********************************************************************************
+********************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+int &LocalId::getValue()
+{
+   return d_value;
+}
+
+
+/*
+********************************************************************************
+********************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+const int &LocalId::getValue() const
+{
+   return d_value;
+}
+
+
+
+
+/*
+****************************************************************************
+* Pre-increment operator.
+****************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+LocalId LocalId::operator ++ ()
+{
+   ++d_value;
+   return *this;
+}
+
+/*
+****************************************************************************
+* Post-increment operator.
+****************************************************************************
+*/
+
+SAMRAI_INLINE_KEYWORD
+LocalId LocalId::operator ++ (int)
+{
+   int saved = d_value;
+   ++d_value;
+   return LocalId(saved);
+}
+
+
+
+
+/*
+****************************************************************************
+* Addition
+****************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+LocalId LocalId::operator + (const LocalId &rhs) const
+{
+   return LocalId(d_value + rhs.d_value);
+}
+
+/*
+****************************************************************************
+* Subtraction
+****************************************************************************
+*/
+
+SAMRAI_INLINE_KEYWORD
+LocalId LocalId::operator - (const LocalId &rhs) const
+{
+   return LocalId(d_value - rhs.d_value);
+}
+
+/*
+****************************************************************************
+* Multiplication
+****************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+LocalId LocalId::operator * (const LocalId &rhs) const
+{
+   return LocalId(d_value * rhs.d_value);
+}
+
+/*
+****************************************************************************
+* Division
+****************************************************************************
+*/
+
+SAMRAI_INLINE_KEYWORD
+LocalId LocalId::operator / (const LocalId &rhs) const
+{
+   return LocalId(d_value / rhs.d_value);
+}
+
+/*
+****************************************************************************
+* Modulus
+****************************************************************************
+*/
+
+SAMRAI_INLINE_KEYWORD
+LocalId LocalId::operator % (const LocalId &rhs) const
+{
+   return LocalId(d_value % rhs.d_value);
+}
+
+
+/*
+********************************************************************************
+* Addition and assignment.
+********************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+LocalId &LocalId::operator += ( const LocalId &rhs)
+{
+   d_value += rhs.d_value;
+   return *this;
+}
+
+/*
+********************************************************************************
+* Subtraction and assignment.
+********************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+LocalId &LocalId::operator -= ( const LocalId &rhs)
+{
+   d_value -= rhs.d_value;
+   return *this;
+}
+
+
+
+
+/*
+****************************************************************************
+* Integer addition
+****************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+LocalId LocalId::operator + (const int &rhs) const
+{
+   return LocalId(d_value + rhs);
+}
+
+/*
+****************************************************************************
+* Integer subtraction
+****************************************************************************
+*/
+
+SAMRAI_INLINE_KEYWORD
+LocalId LocalId::operator - (const int &rhs) const
+{
+   return LocalId(d_value - rhs);
+}
+
+/*
+****************************************************************************
+* Integer multiplication
+****************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+LocalId LocalId::operator * (const int &rhs) const
+{
+   return LocalId(d_value * rhs);
+}
+
+/*
+****************************************************************************
+* Integer division
+****************************************************************************
+*/
+
+SAMRAI_INLINE_KEYWORD
+LocalId LocalId::operator / (const int &rhs) const
+{
+   return LocalId(d_value / rhs);
+}
+
+/*
+****************************************************************************
+* Integer modulus
+****************************************************************************
+*/
+
+SAMRAI_INLINE_KEYWORD
+LocalId LocalId::operator % (const int &rhs) const
+{
+   return LocalId(d_value % rhs);
+}
+
+
+/*
+********************************************************************************
+* Integer addition and assignment.
+********************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+LocalId &LocalId::operator += ( const int &rhs)
+{
+   d_value += rhs;
+   return *this;
+}
+
+/*
+********************************************************************************
+* Integer subtraction and assignment.
+********************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+LocalId &LocalId::operator -= ( const int &rhs)
+{
+   d_value -= rhs;
+   return *this;
+}
+
+
+
+
+
+/*
+********************************************************************************
+* Equality operator.
+********************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+bool LocalId::operator == ( const LocalId &rhs) const
+{
+   return d_value == rhs.d_value;
+}
+
+/*
+********************************************************************************
+* Equality operator.
+********************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+bool LocalId::operator == ( const int &rhs) const
+{
+   return d_value == rhs;
+}
+
+/*
+********************************************************************************
+* Inequality operator.
+********************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+bool LocalId::operator != ( const LocalId &rhs) const
+{
+   return d_value != rhs.d_value;
+}
+
+/*
+********************************************************************************
+* Inequality operator.
+********************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+bool LocalId::operator != ( const int &rhs) const
+{
+   return d_value != rhs;
+}
+
+/*
+********************************************************************************
+* Less-than operator.
+********************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+bool LocalId::operator < ( const LocalId &rhs) const
+{
+   return d_value < rhs.d_value;
+}
+
+/*
+********************************************************************************
+* Less-than operator.
+********************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+bool LocalId::operator < ( const int &rhs) const
+{
+   return d_value < rhs;
+}
+
+/*
+********************************************************************************
+* Greater-than operator.
+********************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+bool LocalId::operator > ( const LocalId &rhs) const
+{
+   return d_value > rhs.d_value;
+}
+
+/*
+********************************************************************************
+* Greater-than operator.
+********************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+bool LocalId::operator > ( const int &rhs) const
+{
+   return d_value > rhs;
+}
+
+/*
+********************************************************************************
+* Less-than-or-equal-to operator.
+********************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+bool LocalId::operator <= ( const LocalId &rhs) const
+{
+   return d_value <= rhs.d_value;
+}
+
+/*
+********************************************************************************
+* Less-than-or-equal-to operator.
+********************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+bool LocalId::operator <= ( const int &rhs) const
+{
+   return d_value <= rhs;
+}
+
+/*
+********************************************************************************
+* Greater-thanor-equal-to operator.
+********************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+bool LocalId::operator >= ( const LocalId &rhs) const
+{
+   return d_value >= rhs.d_value;
+}
+
+/*
+********************************************************************************
+* Greater-thanor-equal-to operator.
+********************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+bool LocalId::operator >= ( const int &rhs) const
+{
+   return d_value >= rhs;
+}
+
+
+
+/*
+********************************************************************************
+********************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+const LocalId &LocalId::getZero()
+{
+   return s_zero_id;
+}
+
+/*
+********************************************************************************
+********************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+const LocalId &LocalId::getInvalidId()
+{
+   return s_invalid_id;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/LocalId.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/LocalId.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,372 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Globally unique identifier that can be locally determined. 
+ *
+ ************************************************************************/
+#ifndef included_hier_LocalId
+#define included_hier_LocalId
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief Generic identifier for identifying things on the local
+ * process.
+ *
+ * The LocalId can be combined with a process rank, as is done in
+ * GlobalId, to create global identifiers.
+ */
+class LocalId {
+
+public:
+
+   /*!
+    * @brief Default constructor.
+    */
+   LocalId();
+
+   /*!
+    * @brief Copy constructor.
+    */
+   LocalId(const LocalId &other);
+
+   /*!
+    * @brief Construct from a numerical value.
+    *
+    * This method is explicit to prevent automatic conversion.
+    */
+   explicit LocalId(const int &value);
+
+   /*!
+    * @brief Default constructor.
+    */
+   ~LocalId();
+
+   /*!
+    * @brief Assignment operator.
+    *
+    * @param[in] rhs
+    *
+    * @return @c *this
+    */
+   LocalId &operator = ( const LocalId& rhs);
+
+   /*!
+    * @brief Assignment operator.
+    *
+    * @param[in] rhs
+    *
+    * @return @c *this
+    */
+   LocalId &operator = ( const int &rhs);
+
+   /*!
+    * @brief Access the numerical value.
+    */
+   int &getValue();
+
+   /*!
+    * @brief Access the numerical value.
+    */
+   const int &getValue() const;
+
+   /*!
+    * @brief Get the LocalId with a numerical value of zero.
+    */
+   static const LocalId &getZero();
+
+   /*!
+    * @brief Get the designated invalid value for this class.
+    */
+   static const LocalId &getInvalidId();
+
+
+   //@{
+
+   //! @name Numerical operations.
+
+   /*!
+    * @brief Pre-increment iterator.
+    *
+    * Post-increment increment the value and returns the incremented
+    * state.
+    */
+   LocalId operator ++ ();
+
+   /*!
+    * @brief Post-increment iterator.
+    *
+    * Post-increment saves the value, increment it and returns an
+    * object with the saved value.
+    */
+   LocalId operator ++ (int);
+
+
+   /*!
+    * @brief Addition.
+    *
+    * @param[in] rhs
+    */
+   LocalId operator+(const LocalId &rhs) const;
+
+   /*!
+    * @brief Subtraction.
+    *
+    * @param[in] rhs
+    */
+   LocalId operator-(const LocalId &rhs) const;
+
+   /*!
+    * @brief Multiplication.
+    *
+    * @param[in] rhs
+    */
+   LocalId operator*(const LocalId &rhs) const;
+
+   /*!
+    * @brief Division.
+    *
+    * @param[in] rhs
+    */
+   LocalId operator/(const LocalId &rhs) const;
+
+   /*!
+    * @brief Modulus.
+    *
+    * @param[in] rhs
+    */
+   LocalId operator%(const LocalId &rhs) const;
+
+   /*!
+    * @brief Addition and assignment.
+    *
+    * @param[in] rhs
+    */
+   LocalId &operator+=(const LocalId &rhs);
+
+   /*!
+    * @brief Subtraction and assignment.
+    *
+    * @param[in] rhs
+    */
+   LocalId &operator-=(const LocalId &rhs);
+
+
+   /*!
+    * @brief Integer addition.
+    *
+    * @param[in] rhs
+    */
+   LocalId operator+(const int &rhs) const;
+
+   /*!
+    * @brief Integer subtraction.
+    *
+    * @param[in] rhs
+    */
+   LocalId operator-(const int &rhs) const;
+
+   /*!
+    * @brief Integer multiplication.
+    *
+    * @param[in] rhs
+    */
+   LocalId operator*(const int &rhs) const;
+
+   /*!
+    * @brief Integer division.
+    *
+    * @param[in] rhs
+    */
+   LocalId operator/(const int &rhs) const;
+
+   /*!
+    * @brief Integer modulus.
+    *
+    * @param[in] rhs
+    */
+   LocalId operator%(const int &rhs) const;
+
+   /*!
+    * @brief Integer addition and assignment.
+    *
+    * @param[in] rhs
+    */
+   LocalId &operator+=(const int &rhs);
+
+   /*!
+    * @brief Integer subtraction and assignment.
+    *
+    * @param[in] rhs
+    */
+   LocalId &operator-=(const int &rhs);
+
+
+   //@}
+
+
+   //@{
+
+   //! @name Comparison with another LocalId.
+
+   /*!
+    * @brief Equality operator.
+    *
+    * All comparison operators compare the numerical value.
+    *
+    * @param[in] rhs
+    */
+   bool operator == ( const LocalId& rhs) const;
+
+   /*!
+    * @brief Inequality operator.
+    *
+    * See note on comparison for operator==(const LocalId&);
+    *
+    * @param[in] rhs
+    */
+   bool operator != ( const LocalId& rhs) const;
+
+   /*!
+    * @brief Less-than operator.
+    *
+    * See note on comparison for operator==(const LocalId&);
+    *
+    * @param[in] rhs
+    */
+   bool operator < ( const LocalId& rhs) const;
+
+   /*!
+    * @brief Greater-than operator.
+    *
+    * See note on comparison for operator==(const LocalId&);
+    *
+    * @param[in] rhs
+    */
+   bool operator > ( const LocalId& rhs) const;
+
+   /*!
+    * @brief Less-than-or-equal-to operator.
+    *
+    * See note on comparison for operator==(const LocalId&);
+    *
+    * @param[in] rhs
+    */
+   bool operator <= ( const LocalId& rhs) const;
+
+   /*!
+    * @brief Greater-thanor-equal-to operator.
+    *
+    * See note on comparison for operator==(const LocalId&);
+    *
+    * @param[in] rhs
+    */
+   bool operator >= ( const LocalId& rhs) const;
+
+   //@}
+
+
+   //@{
+
+   //! @name Comparison with an integer.
+
+   /*!
+    * @brief Equality operator.
+    *
+    * All comparison operators compare the numerical value.
+    *
+    * @param[in] rhs
+    */
+   bool operator == ( const int &rhs) const;
+
+   /*!
+    * @brief Inequality operator.
+    *
+    * See note on comparison for operator==(const LocalId&);
+    *
+    * @param[in] rhs
+    */
+   bool operator != ( const int &rhs) const;
+
+   /*!
+    * @brief Less-than operator.
+    *
+    * See note on comparison for operator==(const LocalId&);
+    *
+    * @param[in] rhs
+    */
+   bool operator < ( const int &rhs) const;
+
+   /*!
+    * @brief Greater-than operator.
+    *
+    * See note on comparison for operator==(const LocalId&);
+    *
+    * @param[in] rhs
+    */
+   bool operator > ( const int &rhs) const;
+
+   /*!
+    * @brief Less-than-or-equal-to operator.
+    *
+    * See note on comparison for operator==(const LocalId&);
+    *
+    * @param[in] rhs
+    */
+   bool operator <= ( const int &rhs) const;
+
+   /*!
+    * @brief Greater-thanor-equal-to operator.
+    *
+    * See note on comparison for operator==(const LocalId&);
+    *
+    * @param[in] rhs
+    */
+   bool operator >= ( const int &rhs) const;
+
+   //@}
+
+
+   /*!
+    * @brief Format and insert object into a stream.
+    */
+   friend std::ostream&
+   operator << (
+      std::ostream& co,
+      const LocalId& r);
+
+private:
+
+   /*!
+    * @brief Numerical value of the identifier.
+    */
+   int d_value;
+
+   /*!
+    * @brief LocalId with a numerical value of zero.
+    */
+   static const LocalId s_zero_id;
+
+   /*!
+    * @brief Definition of invalid LocalId.
+    */
+   static const LocalId s_invalid_id;
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/LocalId.I"
+#endif
+
+#endif  // included_hier_LocalId
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MBUtilities.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MBUtilities.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,242 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   utility functions for multiblock 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_MBUtilities_C
+#define included_hier_MBUtilities_C
+
+#include "SAMRAI/hier/MBUtilities.h"
+
+#include "SAMRAI/hier/MultiblockDataTranslator.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+
+namespace SAMRAI {
+namespace hier {
+
+#ifndef NULL
+#defined NULL(0)
+#endif
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor and destructor do nothing, as all member functions in     *
+ * this class are static.                                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+MBUtilities::MBUtilities()
+{
+}
+
+MBUtilities::~MBUtilities()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Determines the patch data type and calls the appropriate routine      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MBUtilities::translateAndCopyData(
+   hier::Patch& dst_patch,
+   const int dst_id,
+   const hier::Patch& src_patch,
+   const int src_id,
+   const hier::IntVector& shift,
+   const MultiblockPatchHierarchy::RotationIdentifier rotate)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst_patch, src_patch, shift);
+
+   tbox::Pointer<PatchDataFactory> dst_pdf =
+      VariableDatabase::getDatabase()->getPatchDescriptor()->
+      getPatchDataFactory(dst_id);
+
+   MultiblockDataTranslator* mb_trans =
+      dst_pdf->getMultiblockDataTranslator();
+
+   mb_trans->translateAndCopyData(dst_patch,
+      dst_id,
+      src_patch,
+      src_id,
+      shift,
+      rotate);
+}
+
+void MBUtilities::translateAndFillData(
+   hier::Patch& dst_patch,
+   const int dst_id,
+   const hier::Patch& src_patch,
+   const int src_id,
+   const hier::IntVector& shift,
+   const MultiblockPatchHierarchy::RotationIdentifier rotate)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst_patch, src_patch, shift);
+
+   tbox::Pointer<PatchDataFactory> dst_pdf =
+      VariableDatabase::getDatabase()->getPatchDescriptor()->
+      getPatchDataFactory(dst_id);
+
+   MultiblockDataTranslator* mb_trans =
+      dst_pdf->getMultiblockDataTranslator();
+
+   mb_trans->translateAndFillData(dst_patch,
+      dst_id,
+      src_patch,
+      src_id,
+      shift,
+      rotate);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * rotate an index around the origin.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MBUtilities::rotateIndex(
+   int* index,
+   const tbox::Dimension& dim,
+   const MultiblockPatchHierarchy::RotationIdentifier rotation)
+{
+   if (dim.getValue() == 2) {
+      int num_rotations = (int)rotation;
+
+      for (int j = 0; j < num_rotations; j++) {
+         int tmp_in[2];
+         tmp_in[0] = index[0];
+         tmp_in[1] = index[1];
+
+         index[0] = tmp_in[1];
+         index[1] = -tmp_in[0] - 1;
+      }
+   } else if (dim.getValue() == 3) {
+      if (rotation == MultiblockPatchHierarchy::IUP_JUP_KUP) {
+         return;
+      } else if (rotation == MultiblockPatchHierarchy::KUP_IUP_JUP) {
+         rotateAboutAxis(dim, index, 0, 3);
+         rotateAboutAxis(dim, index, 2, 3);
+      } else if (rotation == MultiblockPatchHierarchy::JUP_KUP_IUP) {
+         rotateAboutAxis(dim, index, 1, 1);
+         rotateAboutAxis(dim, index, 2, 1);
+      } else if (rotation == MultiblockPatchHierarchy::IDOWN_KUP_JUP) {
+         rotateAboutAxis(dim, index, 1, 2);
+         rotateAboutAxis(dim, index, 0, 3);
+      } else if (rotation == MultiblockPatchHierarchy::KUP_JUP_IDOWN) {
+         rotateAboutAxis(dim, index, 1, 3);
+      } else if (rotation == MultiblockPatchHierarchy::JUP_IDOWN_KUP) {
+         rotateAboutAxis(dim, index, 2, 1);
+      } else if (rotation == MultiblockPatchHierarchy::KDOWN_JUP_IUP) {
+         rotateAboutAxis(dim, index, 1, 1);
+      } else if (rotation == MultiblockPatchHierarchy::IUP_KDOWN_JUP) {
+         rotateAboutAxis(dim, index, 0, 3);
+      } else if (rotation == MultiblockPatchHierarchy::JUP_IUP_KDOWN) {
+         rotateAboutAxis(dim, index, 0, 2);
+         rotateAboutAxis(dim, index, 2, 3);
+      } else if (rotation == MultiblockPatchHierarchy::KDOWN_IDOWN_JUP) {
+         rotateAboutAxis(dim, index, 0, 3);
+         rotateAboutAxis(dim, index, 2, 1);
+      } else if (rotation == MultiblockPatchHierarchy::IDOWN_JUP_KDOWN) {
+         rotateAboutAxis(dim, index, 1, 2);
+      } else if (rotation == MultiblockPatchHierarchy::JUP_KDOWN_IDOWN) {
+         rotateAboutAxis(dim, index, 0, 3);
+         rotateAboutAxis(dim, index, 1, 3);
+      } else if (rotation == MultiblockPatchHierarchy::JDOWN_IUP_KUP) {
+         rotateAboutAxis(dim, index, 2, 3);
+      } else if (rotation == MultiblockPatchHierarchy::IUP_KUP_JDOWN) {
+         rotateAboutAxis(dim, index, 0, 1);
+      } else if (rotation == MultiblockPatchHierarchy::KUP_JDOWN_IUP) {
+         rotateAboutAxis(dim, index, 0, 2);
+         rotateAboutAxis(dim, index, 1, 1);
+      } else if (rotation == MultiblockPatchHierarchy::JDOWN_KUP_IDOWN) {
+         rotateAboutAxis(dim, index, 0, 1);
+         rotateAboutAxis(dim, index, 1, 3);
+      } else if (rotation == MultiblockPatchHierarchy::IDOWN_JDOWN_KUP) {
+         rotateAboutAxis(dim, index, 0, 2);
+         rotateAboutAxis(dim, index, 1, 2);
+      } else if (rotation == MultiblockPatchHierarchy::KUP_IDOWN_JDOWN) {
+         rotateAboutAxis(dim, index, 0, 1);
+         rotateAboutAxis(dim, index, 2, 1);
+      } else if (rotation == MultiblockPatchHierarchy::JDOWN_KDOWN_IUP) {
+         rotateAboutAxis(dim, index, 0, 3);
+         rotateAboutAxis(dim, index, 1, 1);
+      } else if (rotation == MultiblockPatchHierarchy::KDOWN_IUP_JDOWN) {
+         rotateAboutAxis(dim, index, 0, 1);
+         rotateAboutAxis(dim, index, 2, 3);
+      } else if (rotation == MultiblockPatchHierarchy::IUP_JDOWN_KDOWN) {
+         rotateAboutAxis(dim, index, 0, 2);
+      } else if (rotation == MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN) {
+         rotateAboutAxis(dim, index, 0, 2);
+         rotateAboutAxis(dim, index, 2, 1);
+      } else if (rotation == MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN) {
+         rotateAboutAxis(dim, index, 0, 2);
+         rotateAboutAxis(dim, index, 1, 3);
+      } else if (rotation == MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN) {
+         rotateAboutAxis(dim, index, 1, 2);
+         rotateAboutAxis(dim, index, 0, 1);
+      }
+   } else {
+      TBOX_ERROR("MBUtilities::rotateIndex : DIM = 1 or > 3 not implemented");
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Rotate an index around the origin.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MBUtilities::rotateIndex(
+   hier::Index& index,
+   const hier::MultiblockPatchHierarchy::RotationIdentifier rotation)
+{
+   rotateIndex(&index[0], index.getDim(), rotation);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private routine to rotate an index about an axis.                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MBUtilities::rotateAboutAxis(
+   const tbox::Dimension& dim,
+   int* index,
+   const int axis,
+   const int num_rotations)
+{
+   if (dim.getValue() == 3) {
+      TBOX_ASSERT(axis < dim.getValue());
+
+      const int a = (axis + 1) % dim.getValue();
+      const int b = (axis + 2) % dim.getValue();
+
+      for (int j = 0; j < num_rotations; j++) {
+         int tmp_in[3] = { index[0], index[1], index[2] };
+         index[a] = tmp_in[b];
+         index[b] = -tmp_in[a] - 1;
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MBUtilities.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MBUtilities.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,149 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   utility functions for multiblock 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_MBUtilities
+#define included_hier_MBUtilities
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/MultiblockPatchHierarchy.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief Class MBUtilities contains utility functions
+ * related to multiblock functionality.
+ *
+ * @see hier::MultiblockPatchHierarchy
+ */
+
+class MBUtilities
+{
+public:
+   /*!
+    * Constructor
+    */
+   MBUtilities();
+
+   /*!
+    * Virtual destructor does nothing
+    */
+   virtual ~MBUtilities();
+
+   /*!
+    * @brief Copy patch data from src to dst using the shift and rotate
+    * arguments.
+    *
+    * @param dst_patch   destination data
+    * @param dst_id      destination id
+    * @param src_patch   source data
+    * @param src_id      source id
+    * @param shift       the shift needed after rotation
+    * @param rotate      identifier of the rotation between index spaces
+    */
+   static
+   void
+   translateAndCopyData(
+      hier::Patch& dst_patch,
+      const int dst_id,
+      const hier::Patch& src_patch,
+      const int src_id,
+      const hier::IntVector& shift,
+      const MultiblockPatchHierarchy::RotationIdentifier rotate);
+
+   /*!
+    * @brief Fill patch data from src to dst using the shift and rotate
+    * arguments.
+    *
+    * This is an empty virtual function that allows for a user-defined
+    * implementation of the filling of destination patch data.
+    *
+    * @param dst_patch   destination data
+    * @param dst_id      destination id
+    * @param src_patch   source data
+    * @param src_id      source id
+    * @param shift       the shift needed after rotation
+    * @param rotate      identifier of the rotation between index spaces
+    */
+   static
+   void
+   translateAndFillData(
+      hier::Patch& dst_patch,
+      const int dst_id,
+      const hier::Patch& src_patch,
+      const int src_id,
+      const hier::IntVector& shift,
+      const MultiblockPatchHierarchy::RotationIdentifier rotate);
+
+   /*!
+    * @brief rotate an index from one index space to another
+    *
+    * The parameter index is an int pointer with points to an array of
+    * int data, length DIM.  It signifies an ijk location in an index
+    * space.  According to the rotation number, the location will be
+    * rotated around the origin, with the new values overwriting the original
+    * values in the array pointed to by index.
+    *
+    * @param index array identifying a point in index space
+    * @param dimension of the index and the hierarchy where it is located
+    * @param rotation    identifier of the rotation that will be applied
+    *                        to index
+    */
+   static
+   void
+   rotateIndex(
+      int* index,
+      const tbox::Dimension& dim,
+      const MultiblockPatchHierarchy::RotationIdentifier rotation);
+
+   /*!
+    * @brief rotate an index from one index space to another
+    *
+    * According to the rotation number, the location of the given Index will
+    * be rotated around the origin, overwriting the original value of the
+    * Index.
+    *
+    * @param index a point in index space
+    * @param dim   dimension of the index and the hierarchy where it is located
+    * @param rotation    identifier of the rotation that will be applied
+    *                        to index
+    */
+   static
+   void
+   rotateIndex(
+      hier::Index& index,
+      const MultiblockPatchHierarchy::RotationIdentifier rotation);
+
+private:
+   /*!
+    * @brief private routine to rotate an index around an axis
+    *
+    * In 3D, rotation of an index about the origin is decomposed into a
+    * series of rotations about an axis.  This function performs one such
+    * rotation.
+    *
+    * @param index array identifying a point in index space
+    * @param axis axis around which index will be rotated
+    * @param num_rotations number of 90-degree rotations around the axis
+    */
+   static
+   void
+   rotateAboutAxis(
+      const tbox::Dimension& dim,
+      int* index,
+      const int axis,
+      const int num_rotations);
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,4264 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=BasePatchHierarchy.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h BasePatchHierarchy.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=BasePatchLevel.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h BasePatchLevel.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=BlockPatchGeometry.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h BlockPatchGeometry.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=BoundaryBox.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h BoundaryBox.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
+FILE_4=BoundaryBoxUtils.o
+DEPENDS_4:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBoxUtils.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h BoundaryBoxUtils.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_4 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_4:X.o=${NDIM}.o}: ${DEPENDS_4}
+
+FILE_5=BoundaryLookupTable.o
+DEPENDS_5:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h BoundaryLookupTable.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_5 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_5:X.o=${NDIM}.o}: ${DEPENDS_5}
+
+FILE_6=Box.o
+DEPENDS_6:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h Box.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_6 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_6:X.o=${NDIM}.o}: ${DEPENDS_6}
+
+FILE_7=BoxArray.o
+DEPENDS_7:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h BoxArray.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_7 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_7:X.o=${NDIM}.o}: ${DEPENDS_7}
+
+FILE_8=BoxGeometry.o
+DEPENDS_8:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h BoxGeometry.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_8 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_8:X.o=${NDIM}.o}: ${DEPENDS_8}
+
+FILE_9=BoxGraphUtilities.o
+DEPENDS_9:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGraphUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h BoxGraphUtilities.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_9 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_9:X.o=${NDIM}.o}: ${DEPENDS_9}
+
+FILE_10=BoxIOUtility.o
+DEPENDS_10:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxIOUtility.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h BoxIOUtility.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_10 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_10:X.o=${NDIM}.o}: ${DEPENDS_10}
+
+FILE_11=BoxList.o
+DEPENDS_11:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h BoxList.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_11 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_11:X.o=${NDIM}.o}: ${DEPENDS_11}
+
+FILE_12=BoxOverlap.o
+DEPENDS_12:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h BoxOverlap.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_12 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_12:X.o=${NDIM}.o}: ${DEPENDS_12}
+
+FILE_13=BoxTree.o
+DEPENDS_13:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGraphUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxTree.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxTreeNode.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h BoxTree.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_13 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_13:X.o=${NDIM}.o}: ${DEPENDS_13}
+
+FILE_14=BoxTreeNode.o
+DEPENDS_14:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGraphUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxTreeNode.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h BoxTreeNode.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_14 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_14:X.o=${NDIM}.o}: ${DEPENDS_14}
+
+FILE_15=BoxUtilities.o
+DEPENDS_15:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h BoxUtilities.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_15 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_15:X.o=${NDIM}.o}: ${DEPENDS_15}
+
+FILE_16=CoarseFineBoundary.o
+DEPENDS_16:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/CoarseFineBoundary.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h CoarseFineBoundary.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_16 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_16:X.o=${NDIM}.o}: ${DEPENDS_16}
+
+FILE_17=ComponentSelector.o
+DEPENDS_17:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h ComponentSelector.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_17 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_17:X.o=${NDIM}.o}: ${DEPENDS_17}
+
+FILE_18=Connector.o
+DEPENDS_18:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h Connector.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_18 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_18:X.o=${NDIM}.o}: ${DEPENDS_18}
+
+FILE_19=GlobalId.o
+DEPENDS_19:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h GlobalId.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_19 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_19:X.o=${NDIM}.o}: ${DEPENDS_19}
+
+FILE_20=GridGeometry.o
+DEPENDS_20:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h GridGeometry.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_20 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_20:X.o=${NDIM}.o}: ${DEPENDS_20}
+
+FILE_21=Index.o
+DEPENDS_21:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h Index.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_21 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_21:X.o=${NDIM}.o}: ${DEPENDS_21}
+
+FILE_22=IntVector.o
+DEPENDS_22:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h IntVector.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_22 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_22:X.o=${NDIM}.o}: ${DEPENDS_22}
+
+FILE_23=LocalId.o
+DEPENDS_23:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h LocalId.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_23 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_23:X.o=${NDIM}.o}: ${DEPENDS_23}
+
+FILE_24=MBUtilities.o
+DEPENDS_24:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h MBUtilities.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_24 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_24:X.o=${NDIM}.o}: ${DEPENDS_24}
+
+FILE_25=MappedBox.o
+DEPENDS_25:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h MappedBox.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_25 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_25:X.o=${NDIM}.o}: ${DEPENDS_25}
+
+FILE_26=MappedBoxContainerUtils.o
+DEPENDS_26:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h MappedBoxContainerUtils.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_26 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_26:X.o=${NDIM}.o}: ${DEPENDS_26}
+
+FILE_27=MappedBoxId.o
+DEPENDS_27:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h MappedBoxId.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_27 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_27:X.o=${NDIM}.o}: ${DEPENDS_27}
+
+FILE_28=MappedBoxLevel.o
+DEPENDS_28:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h MappedBoxLevel.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_28 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_28:X.o=${NDIM}.o}: ${DEPENDS_28}
+
+FILE_29=MappedBoxLevelConnectorUtils.o
+DEPENDS_29:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelConnectorUtils.I	\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelConnectorUtils.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappingConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/OverlapConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	MappedBoxLevelConnectorUtils.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_29 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_29:X.o=${NDIM}.o}: ${DEPENDS_29}
+
+FILE_30=MappedBoxLevelHandle.o
+DEPENDS_30:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h MappedBoxLevelHandle.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_30 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_30:X.o=${NDIM}.o}: ${DEPENDS_30}
+
+FILE_31=MappedBoxSet.o
+DEPENDS_31:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h MappedBoxSet.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_31 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_31:X.o=${NDIM}.o}: ${DEPENDS_31}
+
+FILE_32=MappedBoxTree.o
+DEPENDS_32:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h MappedBoxTree.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_32 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_32:X.o=${NDIM}.o}: ${DEPENDS_32}
+
+FILE_33=MappingConnectorAlgorithm.o
+DEPENDS_33:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappingConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/OverlapConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	MappingConnectorAlgorithm.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_33 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_33:X.o=${NDIM}.o}: ${DEPENDS_33}
+
+FILE_34=MultiblockDataTranslator.o
+DEPENDS_34:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	MultiblockDataTranslator.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_34 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_34:X.o=${NDIM}.o}: ${DEPENDS_34}
+
+FILE_35=MultiblockGridGeometry.o
+DEPENDS_35:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h MultiblockGridGeometry.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_35 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_35:X.o=${NDIM}.o}: ${DEPENDS_35}
+
+FILE_36=MultiblockPatchHierarchy.o
+DEPENDS_36:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	MultiblockPatchHierarchy.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_36 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_36:X.o=${NDIM}.o}: ${DEPENDS_36}
+
+FILE_37=MultiblockPatchLevel.o
+DEPENDS_37:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h MultiblockPatchLevel.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_37 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_37:X.o=${NDIM}.o}: ${DEPENDS_37}
+
+FILE_38=MultiblockPatchLevelIterator.o
+DEPENDS_38:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevelIterator.I	\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevelIterator.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	MultiblockPatchLevelIterator.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_38 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_38:X.o=${NDIM}.o}: ${DEPENDS_38}
+
+FILE_39=NeighborhoodSet.o
+DEPENDS_39:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h NeighborhoodSet.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_39 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_39:X.o=${NDIM}.o}: ${DEPENDS_39}
+
+FILE_40=OverlapConnectorAlgorithm.o
+DEPENDS_40:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/OverlapConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	OverlapConnectorAlgorithm.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_40 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_40:X.o=${NDIM}.o}: ${DEPENDS_40}
+
+FILE_41=Patch.o
+DEPENDS_41:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h Patch.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_41 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_41:X.o=${NDIM}.o}: ${DEPENDS_41}
+
+FILE_42=PatchBoundaries.o
+DEPENDS_42:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchBoundaries.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_42 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_42:X.o=${NDIM}.o}: ${DEPENDS_42}
+
+FILE_43=PatchData.o
+DEPENDS_43:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchData.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_43 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_43:X.o=${NDIM}.o}: ${DEPENDS_43}
+
+FILE_44=PatchDataFactory.o
+DEPENDS_44:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchDataFactory.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_44 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_44:X.o=${NDIM}.o}: ${DEPENDS_44}
+
+FILE_45=PatchDescriptor.o
+DEPENDS_45:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchDescriptor.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_45 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_45:X.o=${NDIM}.o}: ${DEPENDS_45}
+
+FILE_46=PatchFactory.o
+DEPENDS_46:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchFactory.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_46 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_46:X.o=${NDIM}.o}: ${DEPENDS_46}
+
+FILE_47=PatchGeometry.o
+DEPENDS_47:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchGeometry.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_47 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_47:X.o=${NDIM}.o}: ${DEPENDS_47}
+
+FILE_48=PatchHierarchy.o
+DEPENDS_48:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/OverlapConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchHierarchy.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_48 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_48:X.o=${NDIM}.o}: ${DEPENDS_48}
+
+FILE_49=PatchLevel.o
+DEPENDS_49:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchLevel.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_49 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_49:X.o=${NDIM}.o}: ${DEPENDS_49}
+
+FILE_50=PatchLevelFactory.o
+DEPENDS_50:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchLevelFactory.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_50 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_50:X.o=${NDIM}.o}: ${DEPENDS_50}
+
+FILE_51=PeriodicShiftCatalog.o
+DEPENDS_51:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PeriodicShiftCatalog.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_51 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_51:X.o=${NDIM}.o}: ${DEPENDS_51}
+
+FILE_52=PersistentOverlapConnectors.o
+DEPENDS_52:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/OverlapConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	PersistentOverlapConnectors.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_52 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_52:X.o=${NDIM}.o}: ${DEPENDS_52}
+
+FILE_53=ProcessorMapping.o
+DEPENDS_53:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h ProcessorMapping.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_53 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_53:X.o=${NDIM}.o}: ${DEPENDS_53}
+
+FILE_54=RealMappedBoxConstIterator.o
+DEPENDS_54:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	RealMappedBoxConstIterator.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_54 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_54:X.o=${NDIM}.o}: ${DEPENDS_54}
+
+FILE_55=Variable.o
+DEPENDS_55:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h Variable.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_55 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_55:X.o=${NDIM}.o}: ${DEPENDS_55}
+
+FILE_56=VariableContext.o
+DEPENDS_56:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h VariableContext.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_56 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_56:X.o=${NDIM}.o}: ${DEPENDS_56}
+
+FILE_57=VariableDatabase.o
+DEPENDS_57:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h VariableDatabase.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_57 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_57:X.o=${NDIM}.o}: ${DEPENDS_57}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,90 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   primary makefile for compiling the SAMRAI hier package 
+##
+#########################################################################
+
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/SAMRAI/hier
+VPATH         = @srcdir@
+OBJECT        = ../../..
+
+default: library
+
+include $(OBJECT)/config/Makefile.config
+
+SUBDIRS = fortran
+
+OBJS = 	\
+	LocalId.o \
+	BasePatchHierarchy.o \
+	BasePatchLevel.o \
+	CoarseFineBoundary.o \
+	GridGeometry.o \
+	MBUtilities.o \
+	MultiblockGridGeometry.o \
+	MultiblockPatchHierarchy.o \
+	MultiblockPatchLevel.o \
+	MultiblockPatchLevelIterator.o \
+	PatchBoundaries.o \
+	PatchHierarchy.o \
+	PatchLevel.o \
+	PatchLevelFactory.o \
+	VariableDatabase.o \
+	Variable.o \
+	MultiblockDataTranslator.o \
+	PatchDescriptor.o \
+	PatchFactory.o \
+	PatchDataFactory.o \
+	Patch.o \
+	BlockPatchGeometry.o \
+	PatchGeometry.o \
+	PatchData.o \
+	MappedBoxLevelConnectorUtils.o \
+	MappedBoxContainerUtils.o \
+	OverlapConnectorAlgorithm.o \
+	MappingConnectorAlgorithm.o \
+	Connector.o \
+	MappedBoxLevelHandle.o \
+	BoxIOUtility.o \
+	PeriodicShiftCatalog.o \
+	RealMappedBoxConstIterator.o \
+	MappedBoxTree.o \
+	MappedBoxLevel.o \
+	PersistentOverlapConnectors.o \
+	MappedBoxSet.o \
+	MappedBox.o \
+	NeighborhoodSet.o \
+	BoxTreeNode.o \
+	BoxTree.o \
+	BoxGraphUtilities.o \
+	BoxOverlap.o \
+	BoxGeometry.o \
+	BoundaryBoxUtils.o \
+	BoxUtilities.o \
+	BoundaryBox.o \
+	BoundaryLookupTable.o \
+	BoxArray.o \
+	BoxList.o \
+	Box.o \
+	Index.o \
+	IntVector.o \
+	GlobalId.o \
+	MappedBoxId.o \
+	ProcessorMapping.o \
+	ComponentSelector.o \
+	VariableContext.o
+
+library: $(OBJS)
+	for DIR in $(SUBDIRS); do if test -d $$DIR; then (cd $$DIR && $(MAKE) $@) ; fi || exit 1; done
+clean:
+	$(SAMCLEAN)
+	for DIR in $(SUBDIRS); do if test -d $$DIR; then (cd $$DIR && $(MAKE) $@) ; fi || exit 1; done
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MappedBox.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MappedBox.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,203 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Box in the distribued box graph. 
+ *
+ ************************************************************************/
+#ifndef included_hier_MappedBox_C
+#define included_hier_MappedBox_C
+
+#include "SAMRAI/hier/MappedBox.h"
+#include "SAMRAI/hier/PeriodicShiftCatalog.h"
+
+#include <iostream>
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/MappedBox.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+
+/*
+**********************************************************************************
+**********************************************************************************
+*/
+MappedBox::~MappedBox()
+{
+}
+
+
+/*
+ *********************************************************************************
+ * Construct MappedBox from the components of a reference MappedBox
+ * and possibly changing the periodic shift.
+ *
+ * This method is not inlined because constructing a periodic-shifted
+ * MappedBox from another (possibly shifted) MappedBox is more involved
+ * and less frequently used.
+ *********************************************************************************
+ */
+MappedBox::MappedBox(
+   const MappedBox& r,
+   const int periodic_shift_num,
+   const IntVector& refinement_ratio):
+   d_id(r.getLocalId(), r.getOwnerRank(), periodic_shift_num),
+   d_box(r.d_box)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(d_box, r, refinement_ratio);
+
+   const tbox::Dimension& dim(d_box.getDim());
+
+   const PeriodicShiftCatalog* shift_catalog =
+      PeriodicShiftCatalog::getCatalog(dim);
+
+   TBOX_ASSERT(periodic_shift_num >= 0);
+   TBOX_ASSERT(periodic_shift_num < shift_catalog->getNumberOfShifts());
+
+   if (refinement_ratio > hier::IntVector::getZero(dim)) {
+
+      if (r.getPeriodicShiftNumber() != shift_catalog->getZeroShiftNumber()) {
+         // Undo the shift that existed in r's Box.
+         d_box.shift(-shift_catalog->shiftNumberToShiftDistance(r.
+               getPeriodicShiftNumber())
+            * refinement_ratio);
+      }
+
+      if (periodic_shift_num != shift_catalog->getZeroShiftNumber()) {
+         // Apply the shift for this MappedBox.
+         d_box.shift(shift_catalog->shiftNumberToShiftDistance(periodic_shift_num)
+            * refinement_ratio);
+      }
+
+   } else if (refinement_ratio < hier::IntVector::getZero(dim)) {
+
+      if (r.getPeriodicShiftNumber() != shift_catalog->getZeroShiftNumber()) {
+         // Undo the shift that existed in r's Box.
+         d_box.shift(shift_catalog->shiftNumberToShiftDistance(r.getPeriodicShiftNumber())
+            / refinement_ratio);
+      }
+
+      if (periodic_shift_num != shift_catalog->getZeroShiftNumber()) {
+         // Apply the shift for this MappedBox.
+         d_box.shift(-shift_catalog->shiftNumberToShiftDistance(periodic_shift_num)
+            / refinement_ratio);
+      }
+
+   } else {
+
+      TBOX_ERROR(
+         "MappedBox::MappedBox: Invalid refinement ratio "
+         << refinement_ratio
+         <<
+         "\nRefinement ratio must be completely positive or negative.");
+
+   }
+}
+
+
+/*
+**********************************************************************************
+* Default constructor needed by STL classes but should not be used
+* by anything.
+**********************************************************************************
+*/
+MappedBox::MappedBox():
+   d_box(tbox::Dimension::getInvalidDimension())
+{
+}
+
+
+/*
+ *********************************************************************************
+ * Construct MappedBox from a reference MappedBox and possibly
+ * changing the periodic shift.
+ *
+ * This method is not inlined because initializing a periodic-shifted
+ * MappedBox from another (possibly shifted) MappedBox is more involved
+ * and less frequently used.
+ *
+ * We inititalize d_id last so that we can support inititalizing an
+ * object from a reference to itself.
+ *********************************************************************************
+ */
+void MappedBox::initialize(
+   const MappedBox& r,
+   const int periodic_shift_num,
+   const IntVector& refinement_ratio)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(d_box, r, refinement_ratio);
+
+   const tbox::Dimension& dim(d_box.getDim());
+
+   const PeriodicShiftCatalog* shift_catalog =
+      PeriodicShiftCatalog::getCatalog(dim);
+
+   TBOX_ASSERT(periodic_shift_num >= 0);
+   TBOX_ASSERT(periodic_shift_num < shift_catalog->getNumberOfShifts());
+
+   d_box = r.d_box;
+
+   if (refinement_ratio > hier::IntVector::getZero(dim)) {
+
+      if (r.getPeriodicShiftNumber() != shift_catalog->getZeroShiftNumber()) {
+         // Undo the shift that existed in r's Box.
+         d_box.shift(-shift_catalog->shiftNumberToShiftDistance(r.
+               getPeriodicShiftNumber())
+            * refinement_ratio);
+      }
+
+      if (periodic_shift_num != shift_catalog->getZeroShiftNumber()) {
+         // Apply the shift for this MappedBox.
+         d_box.shift(shift_catalog->shiftNumberToShiftDistance(periodic_shift_num)
+            * refinement_ratio);
+      }
+
+   } else if (refinement_ratio < hier::IntVector::getZero(dim)) {
+
+      if (r.getPeriodicShiftNumber() != shift_catalog->getZeroShiftNumber()) {
+         // Undo the shift that existed in r's Box.
+         d_box.shift(shift_catalog->shiftNumberToShiftDistance(r.getPeriodicShiftNumber())
+            / refinement_ratio);
+      }
+
+      if (periodic_shift_num != shift_catalog->getZeroShiftNumber()) {
+         // Apply the shift for this MappedBox.
+         d_box.shift(-shift_catalog->shiftNumberToShiftDistance(periodic_shift_num)
+            / refinement_ratio);
+      }
+
+   } else {
+
+      TBOX_ERROR(
+         "MappedBox::initialize: Invalid refinement ratio "
+         << refinement_ratio
+         <<
+         "\nRefinement ratio must be completely positive or negative.");
+
+   }
+
+   d_id.initialize(r.getLocalId(), r.getOwnerRank(), periodic_shift_num);
+}
+
+
+/*
+*******************************************************************************
+Stream-insert operator.
+*******************************************************************************
+*/
+std::ostream& operator << (
+   std::ostream& co,
+   const MappedBox& r)
+{
+   co << r.d_id << ':' << r.getBox();
+   return co;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MappedBox.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MappedBox.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,239 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Box in the distribued box graph. 
+ *
+ ************************************************************************/
+#include "SAMRAI/hier/MappedBox.h"
+#include "SAMRAI/hier/PeriodicShiftCatalog.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Dimension& MappedBox::getDim() const
+{
+   return d_box.getDim();
+}
+
+SAMRAI_INLINE_KEYWORD
+MappedBox::MappedBox(
+   const tbox::Dimension& dim):
+   d_id(),
+   d_box(dim)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+MappedBox::MappedBox(
+   const hier::Box& box,
+   const LocalId &local_id,
+   const int owner,
+   const int periodic_shift_num):
+   d_id(local_id, owner, periodic_shift_num),
+   d_box(box)
+{
+   TBOX_ASSERT(periodic_shift_num >= 0);
+   TBOX_ASSERT(periodic_shift_num <
+      PeriodicShiftCatalog::getCatalog(box.getDim())->getNumberOfShifts());
+}
+
+SAMRAI_INLINE_KEYWORD
+MappedBox::MappedBox(
+   const tbox::Dimension& dim,
+   const LocalId &local_id,
+   const int owner,
+   const int periodic_shift_num):
+   d_id(local_id, owner, periodic_shift_num),
+   d_box(dim)
+{
+   TBOX_ASSERT(periodic_shift_num >= 0);
+   TBOX_ASSERT(periodic_shift_num < PeriodicShiftCatalog::getCatalog(
+         dim)->getNumberOfShifts());
+}
+
+SAMRAI_INLINE_KEYWORD
+MappedBox::MappedBox(
+   const tbox::Dimension& dim,
+   const GlobalId& global_id,
+   const int periodic_shift_num):
+   d_id(global_id, periodic_shift_num),
+   d_box(dim)
+{
+   TBOX_ASSERT(periodic_shift_num >= 0);
+   TBOX_ASSERT(periodic_shift_num < PeriodicShiftCatalog::getCatalog(
+         dim)->getNumberOfShifts());
+}
+
+SAMRAI_INLINE_KEYWORD
+MappedBox::MappedBox(
+   const tbox::Dimension& dim,
+   const MappedBoxId& mapped_box_id):
+   d_id(mapped_box_id),
+   d_box(dim)
+{
+   TBOX_ASSERT(mapped_box_id.getPeriodicShiftNumber() >= 0);
+   TBOX_ASSERT(
+      mapped_box_id.getPeriodicShiftNumber() <
+      PeriodicShiftCatalog::getCatalog(dim)->getNumberOfShifts());
+}
+
+SAMRAI_INLINE_KEYWORD
+MappedBox::MappedBox(
+   const MappedBox& r):
+   d_id(r.d_id),
+   d_box(r.d_box)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+void MappedBox::initialize(
+   const hier::Box& box,
+   const LocalId &local_id,
+   const int owner,
+   const int periodic_shift_num)
+{
+   d_id.initialize(local_id, owner, periodic_shift_num);
+   d_box = box;
+}
+
+SAMRAI_INLINE_KEYWORD
+hier::MappedBoxId& MappedBox::getId() {
+   return d_id;
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::MappedBoxId& MappedBox::getId() const {
+   return d_id;
+}
+
+SAMRAI_INLINE_KEYWORD
+hier::Box& MappedBox::getBox() {
+   return d_box;
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::Box& MappedBox::getBox() const {
+   return d_box;
+}
+
+
+SAMRAI_INLINE_KEYWORD
+int MappedBox::getOwnerRank() const
+{
+   return d_id.getOwnerRank();
+}
+
+
+SAMRAI_INLINE_KEYWORD
+const LocalId &MappedBox::getLocalId() const
+{
+   return d_id.getLocalId();
+}
+
+
+SAMRAI_INLINE_KEYWORD
+const GlobalId& MappedBox::getGlobalId() const
+{
+   return d_id.getGlobalId();
+}
+
+
+SAMRAI_INLINE_KEYWORD
+int MappedBox::getPeriodicShiftNumber() const
+{
+   return d_id.getPeriodicShiftNumber();
+}
+
+
+SAMRAI_INLINE_KEYWORD
+bool MappedBox::isPeriodicImage() const
+{
+   return d_id.isPeriodicImage();
+}
+
+SAMRAI_INLINE_KEYWORD
+int MappedBox::commBufferSize(
+   const tbox::Dimension& dim)
+{
+   return 3 + 2 * dim.getValue();
+}
+
+SAMRAI_INLINE_KEYWORD
+void MappedBox::putToIntBuffer(
+   int* buffer) const
+{
+   const tbox::Dimension& dim(d_box.getDim());
+
+   buffer[0] = d_id.getOwnerRank();
+   buffer[1] = d_id.getLocalId().getValue();
+   buffer[2] = d_id.getPeriodicShiftNumber();
+
+   for (int d = 0; d < dim.getValue(); ++d) {
+      buffer[3 + d * 2] = d_box.lower() (d);
+      buffer[3 + d * 2 + 1] = d_box.upper() (d);
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void MappedBox::getFromIntBuffer(
+   const int* buffer)
+{
+   const tbox::Dimension& dim(d_box.getDim());
+
+   d_id.initialize(LocalId(buffer[1]), buffer[0], buffer[2]);
+
+   for (int d = 0; d < dim.getValue(); ++d) {
+      d_box.lower() (d) = buffer[3 + d * 2];
+      d_box.upper() (d) = buffer[3 + d * 2 + 1];
+   }
+}
+
+
+SAMRAI_INLINE_KEYWORD
+bool MappedBox::operator == ( const MappedBox& r) const
+{
+   return d_id == r.d_id;
+}
+
+
+SAMRAI_INLINE_KEYWORD
+bool MappedBox::operator != ( const MappedBox& r) const
+{
+   return d_id != r.d_id;
+}
+
+
+SAMRAI_INLINE_KEYWORD
+bool MappedBox::operator < ( const MappedBox& r) const
+{
+   return d_id < r.d_id;
+}
+
+
+SAMRAI_INLINE_KEYWORD
+bool MappedBox::operator > ( const MappedBox& r) const
+{
+   return d_id > r.d_id;
+}
+
+
+SAMRAI_INLINE_KEYWORD
+bool MappedBox::operator <= ( const MappedBox& r) const
+{
+   return d_id <= r.d_id;
+}
+
+
+SAMRAI_INLINE_KEYWORD
+bool MappedBox::operator >= ( const MappedBox& r) const
+{
+   return d_id >= r.d_id;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MappedBox.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MappedBox.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,409 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Box in the distributed box graph. 
+ *
+ ************************************************************************/
+#ifndef included_hier_MappedBox
+#define included_hier_MappedBox
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/MappedBoxId.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief A MappedBox represents a Box that is mapped (owned) to a process.
+ *
+ * A MappedBox describes Box that is "owned" by a certain process.
+ * The MappedBox has a MappedBoxId identifier that includes the rank
+ * of the owning process and the LocalId assigned to the Box by the
+ * owning process.
+ *
+ * Ownership typically means that only the owner should change the
+ * object.  Other processes may work with a copy of the object but
+ * should not change it.  (Any changes made by the owner should
+ * eventually be communicated to other processes for re-establishing
+ * consistency.)
+ *
+ * Each MappedBox may be real or a periodic image of a real MappedBox.
+ * A MappedBox that is a periodic image has the same GlobalId as its
+ * real MappedBox but a different periodic shift number.  A real
+ * MappedBox has a periodic shift number of zero.  Periodic images
+ * should set the Box portion of the MappedBox at the shifted
+ * postition rather than the real position.  See PeriodicShiftCatalog.
+ *
+ * Comparison operators are implemented for sorting MappedBoxes and
+ * instantiating (STL) containers of MappedBoxes.  Comparisons are
+ * strictly by the MappedBoxId.  (The Box is ignored by comparisons.)
+ */
+class MappedBox
+{
+
+public:
+   /*!
+    * @brief Non-initializing constructor.
+    *
+    * The object can be initialized using any of the initialize()
+    * methods or by assignment.
+    *
+    * @param[in] dim
+    */
+   explicit MappedBox(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Initializing constructor.
+    *
+    * @param[in] box
+    *
+    * @param[in] local_id
+    *
+    * @param[in] owner_rank
+    *
+    * @param[in] periodic_shift_num The periodic shift number.  If
+    * periodic_shift_num is zero, specify the Box in the shifted
+    * position specified by @c periodic_shift_num.  The default
+    * argument for @c periodic_shift_num corresponds to the
+    * zero-shift.
+    */
+   explicit MappedBox(
+      const hier::Box& box,
+      const LocalId &local_id,
+      const int owner_rank,
+      const int periodic_shift_num = 0);
+
+   /*!
+    * @brief Constructor with undefined box.
+    *
+    * The box can be initialized using any of the initialize()
+    * methods or by assignment.
+    *
+    * @param[in] dim
+    *
+    * @param[in] local_id
+    *
+    * @param[in] owner_rank
+    *
+    * @param[in] periodic_shift_num
+    */
+   /*
+    * TODO: Constructors initializing boxes are only used to construct
+    * temporary objects for finding other MappedBoxes in a
+    * stl::set<MappedBox>.  We need another way to do it and get rid
+    * of these constructors.
+    */
+   explicit MappedBox(
+      const tbox::Dimension& dim,
+      const LocalId &local_id,
+      const int owner_rank,
+      const int periodic_shift_num = 0);
+
+   /*!
+    * @brief Constructor with undefined box and a GlobalId.
+    *
+    * The box can be initialized using any of the initialize()
+    * methods or by assignment.
+    *
+    * @param[in] dim
+    *
+    * @param[in] global_id
+    *
+    * @param[in] periodic_shift_num
+    */
+   /*
+    * TODO: Constructors initializing boxes are only used to construct
+    * temporary objects for finding other MappedBoxes in a
+    * stl::set<MappedBox>.  We need another way to do it and get rid
+    * of these constructors.
+    */
+   explicit MappedBox(
+      const tbox::Dimension& dim,
+      const GlobalId& id,
+      const int periodic_shift_num = 0);
+
+   /*!
+    * @brief Constructor with undefined box and a MappedBoxId.
+    *
+    * The box can be initialized using any of the initialize()
+    * methods or by assignment.
+    *
+    * @param[in] dim
+    *
+    * @param[in] mapped_box_id
+    *
+    * @param[in] periodic_shift_num
+    */
+   /*
+    * TODO: Constructors initializing boxes are only used to construct
+    * temporary objects for finding other MappedBoxes in a
+    * stl::set<MappedBox>.  We need another way to do it and get rid
+    * of these constructors.
+    */
+   explicit MappedBox(
+      const tbox::Dimension& dim,
+      const MappedBoxId& mapped_box_id);
+
+   /*!
+    * @brief Copy constructor making an exact copy.
+    *
+    * @param[in] r
+    */
+   MappedBox(
+      const MappedBox& r);
+
+   /*!
+    * @brief "Copy" constructor allowing change in periodic shift number.
+    *
+    * @param[in] r  Make a copy (but not an exact copy) of this MappedBox.
+    *
+    * @param[in] periodic_shift_num Periodic shift number to use
+    * instead of the shift in @c r.  The box will be set to the real
+    * box shifted to the position specified by this value.
+    *
+    * @param[in] refinement_ratio The index space where the MappedBox
+    * lives.
+    *
+    * @see initialize( const MappedBox&, const int, const IntVector&);
+    */
+   explicit MappedBox(
+      const MappedBox& r,
+      const int periodic_shift_num,
+      const IntVector& refinement_ratio);
+
+   /*!
+    * @brief Destructor.
+    */
+   virtual ~MappedBox();
+
+
+
+   /*!
+    * @brief Set all the attributes of the MappedBox.
+    *
+    * @param[in] box
+    *
+    * @param[in] local_id
+    *
+    * @param[in] owner_rank
+    *
+    * @param[in] periodic_shift_num The periodic shift number.  If
+    * this is not zero, specify @c box in the shifted position.  The
+    * default argument for @c periodic_shift_num corresponds to the
+    * zero-shift.
+    */
+   void
+   initialize(
+      const hier::Box& box,
+      const LocalId &local_id,
+      const int owner_rank,
+      const int periodic_shift_num = 0);
+
+   /*!
+    * @brief Set all the attributes identical to that of a reference
+    * MappedBox, but with a different periodic shift.
+    *
+    * @param[in] r Initialize to this MappedBox, but with the shift
+    * given by @c periodic_shift_num.
+    *
+    * @param[in] periodic_shift_num Periodic shift number to use
+    * instead of the shift in @c r.  The box will be set to the real
+    * box shifted to the position specified by this value.
+    *
+    * @param[in] refinement_ratio The index space where the MappedBox
+    * lives.
+    */
+   void
+   initialize(
+      const MappedBox& r,
+      const int periodic_shift_num,
+      const IntVector& refinement_ratio);
+
+
+   //@{
+
+   //! @name Accessors
+
+   //! @brief Get the Box.
+   hier::Box& getBox();
+
+   //! @brief Get the Box.
+   const hier::Box&
+   getBox() const;
+
+   //! @brief Get the MappedBoxId.
+   MappedBoxId&
+   getId();
+
+   //! @brief Get the MappedBoxId.
+   const MappedBoxId&
+   getId() const;
+
+   //! @brief Get the LocalId.
+   const LocalId &getLocalId() const;
+
+   //! @brief Get the GlobalId.
+   const GlobalId& getGlobalId() const;
+
+   //! @brief Get the owner rank.
+   int getOwnerRank() const;
+
+   /*!
+    * @brief Get the periodic shift number.
+    *
+    * @see PeriodicShiftCatalog.
+    */
+   int getPeriodicShiftNumber() const;
+
+   //! @brief Whether the MappedBox is a periodic image.
+   bool isPeriodicImage() const;
+
+   /*!
+    * @brief Return the dimension of this object.
+    */
+   const tbox::Dimension&
+   getDim() const;
+
+   //@}
+
+
+
+   //@{
+
+   //! @name Comparison operators
+
+   /*!
+    * @brief Equality operator.
+    *
+    * All comparison operators use only the MappedBoxId.
+    * The box does not affect comparison results.
+    */
+   bool operator == (
+      const MappedBox& r) const;
+
+   /*!
+    * @brief Inequality operator.
+    *
+    * See note on comparison for operator==(const MappedBox&).
+    */
+   bool operator != (
+      const MappedBox& r) const;
+
+   /*!
+    * @brief Less-than operator.
+    *
+    * See note on comparison for operator==(const MappedBox&).
+    */
+   bool operator < (
+      const MappedBox& r) const;
+
+   /*!
+    * @brief Greater-than operator.
+    *
+    * See note on comparison for operator==(const MappedBox&).
+    */
+   bool operator > (
+      const MappedBox& r) const;
+
+   /*!
+    * @brief Less-than-or-equal-to operator.
+    *
+    * See note on comparison for operator==(const MappedBox&).
+    */
+   bool operator <= (
+      const MappedBox& r) const;
+
+   /*!
+    * @brief Greater-than-or-equal-to operator.
+    *
+    * See note on comparison for operator==(const MappedBox&).
+    */
+   bool operator >= (
+      const MappedBox& r) const;
+
+   //@}
+
+
+   //@{
+
+   //! @name Support for message passing
+
+   /*!
+    * @brief Give number of ints required for putting a MappedBox in
+    * message passing buffer.
+    *
+    * This number is independent of instance (but dependent on
+    * dimension).
+    *
+    * @see putToIntBuffer(), getFromIntBuffer().
+    */
+   static int
+   commBufferSize(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Put self into a int buffer.
+    *
+    * This is the opposite of getFromIntBuffer().  Number of ints
+    * written is given by commBufferSize().
+    */
+   void
+   putToIntBuffer(
+      int* buffer) const;
+
+   /*!
+    * @brief Set attributes according to data in int buffer.
+    *
+    * This is the opposite of putToIntBuffer().  Number of ints read
+    * is given by commBufferSize().
+    */
+   void
+   getFromIntBuffer(
+      const int* buffer);
+
+   //@}
+
+
+   //! @brief Stream-insert operator.
+   friend std::ostream&
+   operator << (
+      std::ostream& co,
+      const MappedBox& r);
+
+   /*!
+    * @brief Allows container to construct objects without dimension.
+    */
+   friend class std::vector<MappedBox>;
+
+private:
+   /**
+    * Needed by the stupid STL vector class.
+    */
+   MappedBox();
+
+   /*!
+    * @brief MappedBox identifier.
+    *
+    * This state variable is used in sorting a set of MappedBox objects.
+    */
+   MappedBoxId d_id;
+
+   Box d_box;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/MappedBox.I"
+#endif
+
+#endif  // included_hier_MappedBox
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MappedBoxContainerUtils.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MappedBoxContainerUtils.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Common MappedBox operations for MappedBox containers. 
+ *
+ ************************************************************************/
+#ifndef included_hier_MappedBoxContainerUtils_C
+#define included_hier_MappedBoxContainerUtils_C
+
+#include "SAMRAI/hier/MappedBoxContainerUtils.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/TimerManager.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/MappedBoxContainerUtils.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+ * Constructor does nothing because the objects are stateless.
+ */
+
+MappedBoxContainerUtils::MappedBoxContainerUtils() {
+}
+
+/*!
+***********************************************************************
+***********************************************************************
+*/
+
+void MappedBoxContainerUtils::getNeighborsFromNeighborhoodSet(
+   Connector::NeighborSet& all_nabrs,
+   const NeighborhoodSet& edges)
+{
+   for (NeighborhoodSet::const_iterator ei = edges.begin();
+        ei != edges.end(); ++ei) {
+      const Connector::NeighborSet& nabrs = (*ei).second;
+      all_nabrs.insert(nabrs.begin(), nabrs.end());
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void MappedBoxContainerUtils::removeBoxListNeighborSetIntersections(
+   BoxList& boxes,
+   const Connector::NeighborSet& nabrs)
+{
+   for (Connector::NeighborSet::const_iterator na = nabrs.begin();
+        na != nabrs.end(); ++na) {
+      const MappedBox& nabr = *na;
+      boxes.removeIntersections(nabr.getBox());
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void MappedBoxContainerUtils::getOwnersFromNeighborhoodSet(
+   std::set<int>& owners,
+   const NeighborhoodSet& edges)
+{
+   NeighborhoodSet::const_iterator i_mapped_box;
+   for (i_mapped_box = edges.begin();
+        i_mapped_box != edges.end();
+        ++i_mapped_box) {
+      const NeighborhoodSet::value_type& mapped_box = *i_mapped_box;
+      const Connector::NeighborSet& nabr = mapped_box.second;
+      getOwnersFromNeighbors(owners, nabr);
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void MappedBoxContainerUtils::getOwnersFromNeighbors(
+   std::set<int>& owners,
+   const Connector::NeighborSet& nabrs)
+{
+   Connector::NeighborSet::const_iterator i_nabr;
+   for (i_nabr = nabrs.begin(); i_nabr != nabrs.end(); ++i_nabr) {
+      const int owner = (*i_nabr).getOwnerRank();
+      owners.insert(owner);
+   }
+}
+
+/*
+ ***************************************************************************
+ ***************************************************************************
+ */
+
+void MappedBoxContainerUtils::recursivePrintMappedBoxVector(
+   const std::vector<MappedBox>& mapped_boxes,
+   std::ostream& os,
+   const std::string& border,
+   int detail_depth)
+{
+   (void)detail_depth;
+   os << border;
+   for (std::vector<MappedBox>::const_iterator ni = mapped_boxes.begin();
+        ni != mapped_boxes.end();
+        ++ni) {
+      os << "  " << *ni;
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MappedBoxContainerUtils.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MappedBoxContainerUtils.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,365 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Common MappedBox operations for MappedBox containers. 
+ *
+ ************************************************************************/
+#include "SAMRAI/hier/MappedBox.h"
+#include "SAMRAI/hier/PeriodicShiftCatalog.h"
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+void MappedBoxContainerUtils::refineMappedBoxSet(
+   std::set<MappedBox>& output_mapped_boxes,
+   const std::set<MappedBox>& input_mapped_boxes,
+   const IntVector& ratio)
+{
+   if (&input_mapped_boxes != &output_mapped_boxes) {
+      for (std::set<MappedBox>::const_iterator na = input_mapped_boxes.begin();
+           na != input_mapped_boxes.end(); ++na) {
+         MappedBox n = *na;
+         n.getBox().refine(ratio);
+         output_mapped_boxes.insert(output_mapped_boxes.end(), n);
+      }
+   } else {
+      std::set<MappedBox> tmp_mapped_boxes;
+      for (std::set<MappedBox>::const_iterator na = input_mapped_boxes.begin();
+           na != input_mapped_boxes.end(); ++na) {
+         MappedBox n = *na;
+         n.getBox().refine(ratio);
+         tmp_mapped_boxes.insert(tmp_mapped_boxes.end(), n);
+      }
+      output_mapped_boxes.swap(tmp_mapped_boxes);
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void MappedBoxContainerUtils::coarsenMappedBoxSet(
+   std::set<MappedBox>& output_mapped_boxes,
+   const std::set<MappedBox>& input_mapped_boxes,
+   const IntVector& ratio)
+{
+   if (&input_mapped_boxes != &output_mapped_boxes) {
+      for (std::set<MappedBox>::const_iterator na = input_mapped_boxes.begin();
+           na != input_mapped_boxes.end(); ++na) {
+         MappedBox n = *na;
+         n.getBox().coarsen(ratio);
+         output_mapped_boxes.insert(output_mapped_boxes.end(), n);
+      }
+   } else {
+      std::set<MappedBox> tmp_mapped_boxes;
+      for (std::set<MappedBox>::const_iterator na = input_mapped_boxes.begin();
+           na != input_mapped_boxes.end(); ++na) {
+         MappedBox n = *na;
+         n.getBox().coarsen(ratio);
+         tmp_mapped_boxes.insert(tmp_mapped_boxes.end(), n);
+      }
+      output_mapped_boxes.swap(tmp_mapped_boxes);
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void MappedBoxContainerUtils::growMappedBoxSet(
+   std::set<MappedBox>& output_mapped_boxes,
+   const std::set<MappedBox>& input_mapped_boxes,
+   const IntVector& growth)
+{
+   if (&input_mapped_boxes != &output_mapped_boxes) {
+      for (std::set<MappedBox>::const_iterator na = input_mapped_boxes.begin();
+           na != input_mapped_boxes.end(); ++na) {
+         MappedBox n = *na;
+         n.getBox().grow(growth);
+         output_mapped_boxes.insert(output_mapped_boxes.end(), n);
+      }
+   } else {
+      std::set<MappedBox> tmp_mapped_boxes;
+      for (std::set<MappedBox>::const_iterator na = input_mapped_boxes.begin();
+           na != input_mapped_boxes.end(); ++na) {
+         MappedBox n = *na;
+         n.getBox().grow(growth);
+         tmp_mapped_boxes.insert(tmp_mapped_boxes.end(), n);
+      }
+      output_mapped_boxes.swap(tmp_mapped_boxes);
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void MappedBoxContainerUtils::coarsenNeighborSet(
+   Connector::NeighborSet& output_nabrs,
+   const Connector::NeighborSet& input_nabrs,
+   const IntVector& ratio)
+{
+   for (Connector::NeighborSet::const_iterator na = input_nabrs.begin();
+        na != input_nabrs.end(); ++na) {
+      MappedBox n = *na;
+      n.getBox().coarsen(ratio);
+      output_nabrs.insert(output_nabrs.end(), n);
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void MappedBoxContainerUtils::removePeriodicImageMappedBoxes(
+   std::set<MappedBox>& output_mapped_boxes,
+   const std::set<MappedBox>& input_mapped_boxes)
+{
+   std::set<MappedBox>::iterator hint = output_mapped_boxes.begin();
+   for (std::set<MappedBox>::const_iterator na = input_mapped_boxes.begin();
+        na != input_mapped_boxes.end(); ++na) {
+      const MappedBox& n = *na;
+      if (!n.isPeriodicImage()) {
+         hint = output_mapped_boxes.insert(hint, n);
+      }
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void MappedBoxContainerUtils::removePeriodicNeighbors(
+   NeighborhoodSet& output_edges,
+   const NeighborhoodSet& input_edges)
+{
+   for (NeighborhoodSet::const_iterator ei = input_edges.begin();
+        ei != input_edges.end(); ++ei) {
+      removePeriodicImageMappedBoxes(output_edges[ei->first], ei->second);
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void MappedBoxContainerUtils::unshiftPeriodicImageMappedBoxes(
+   std::set<MappedBox>& output_mapped_boxes,
+   const std::set<MappedBox>& input_mapped_boxes,
+   const IntVector& refinement_ratio)
+{
+   std::set<MappedBox>::iterator hint = output_mapped_boxes.begin();
+
+   if (!input_mapped_boxes.empty()) {
+      const MappedBox& first_element(*input_mapped_boxes.begin());
+
+      const int zero_shift_number(PeriodicShiftCatalog::getCatalog(
+                                     first_element.getDim())->
+                                  getZeroShiftNumber());
+
+      for (std::set<MappedBox>::const_iterator na = input_mapped_boxes.begin();
+           na != input_mapped_boxes.end(); ++na) {
+         if (na->isPeriodicImage()) {
+            const MappedBox unshifted_mapped_box(
+               *na, zero_shift_number, refinement_ratio);
+            hint = output_mapped_boxes.insert(hint, unshifted_mapped_box);
+         } else {
+            hint = output_mapped_boxes.insert(hint, *na);
+         }
+      }
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void MappedBoxContainerUtils::refineNeighborSet(
+   Connector::NeighborSet& output_nabrs,
+   const Connector::NeighborSet& input_nabrs,
+   const IntVector& ratio)
+{
+   for (Connector::NeighborSet::const_iterator na = input_nabrs.begin();
+        na != input_nabrs.end(); ++na) {
+      MappedBox n = *na;
+      n.getBox().refine(ratio);
+      output_nabrs.insert(output_nabrs.end(), n);
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void MappedBoxContainerUtils::coarsenNeighborsInNeighborhoodSet(
+   NeighborhoodSet& output_edges,
+   const NeighborhoodSet& input_edges,
+   const IntVector& ratio)
+{
+   for (NeighborhoodSet::const_iterator ei = input_edges.begin();
+        ei != input_edges.end(); ++ei) {
+      const GlobalId& global_id = (*ei).first;
+      const Connector::NeighborSet& orig_nabrs = (*ei).second;
+      coarsenNeighborSet(output_edges[global_id], orig_nabrs, ratio);
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void MappedBoxContainerUtils::refineNeighborsInNeighborhoodSet(
+   NeighborhoodSet& output_edges,
+   const NeighborhoodSet& input_edges,
+   const IntVector& ratio)
+{
+   for (NeighborhoodSet::const_iterator ei = input_edges.begin();
+        ei != input_edges.end(); ++ei) {
+      const GlobalId& global_id = (*ei).first;
+      const Connector::NeighborSet& orig_nabrs = (*ei).second;
+      refineNeighborSet(output_edges[global_id], orig_nabrs, ratio);
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void MappedBoxContainerUtils::growNeighborsInNeighborhoodSet(
+   NeighborhoodSet& output_edges,
+   const NeighborhoodSet& input_edges,
+   const IntVector& growth)
+{
+   for (NeighborhoodSet::const_iterator ei = input_edges.begin();
+        ei != input_edges.end(); ++ei) {
+      const GlobalId& global_id = (*ei).first;
+      const Connector::NeighborSet& orig_nabrs = (*ei).second;
+      growMappedBoxSet(output_edges[global_id], orig_nabrs, growth);
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void MappedBoxContainerUtils::growMappedBoxes(
+   MappedBox* mapped_boxes,
+   size_t num_mapped_boxes,
+   const IntVector& growth)
+{
+   for (size_t i = 0; i < num_mapped_boxes; ++i) {
+      mapped_boxes[i].getBox().grow(growth);
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void MappedBoxContainerUtils::refineMappedBoxes(
+   MappedBox* mapped_boxes,
+   size_t num_mapped_boxes,
+   const IntVector& ratio)
+{
+   for (size_t i = 0; i < num_mapped_boxes; ++i) {
+      mapped_boxes[i].getBox().refine(ratio);
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void MappedBoxContainerUtils::coarsenMappedBoxes(
+   MappedBox* mapped_boxes,
+   size_t num_mapped_boxes,
+   const IntVector& ratio)
+{
+   for (size_t i = 0; i < num_mapped_boxes; ++i) {
+      mapped_boxes[i].getBox().coarsen(ratio);
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void MappedBoxContainerUtils::convertMappedBoxVectorToBoxList(
+   BoxList& box_list,
+   const std::vector<MappedBox>& mapped_box_vector)
+{
+   for (std::vector<MappedBox>::const_iterator ni = mapped_box_vector.begin();
+        ni != mapped_box_vector.end(); ++ni) {
+      box_list.appendItem(ni->getBox());
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void MappedBoxContainerUtils::convertBoxListToMappedBoxVector(
+   std::vector<MappedBox>& mapped_box_vector,
+   const BoxList& box_list)
+{
+   mapped_box_vector.reserve(mapped_box_vector.size() + box_list.size());
+   LocalId last_used_id(-1);
+   for (BoxList::Iterator bi(box_list); bi; bi++) {
+      mapped_box_vector.push_back(MappedBox(*bi, ++last_used_id, 0));
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void MappedBoxContainerUtils::convertMappedBoxSetToBoxList(
+   BoxList& box_list,
+   const std::set<MappedBox>& mapped_box_set)
+{
+   for (std::set<MappedBox>::const_iterator ni = mapped_box_set.begin();
+        ni != mapped_box_set.end(); ++ni) {
+      box_list.appendItem(ni->getBox());
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void MappedBoxContainerUtils::convertMappedBoxSetToBoxVector(
+   std::vector<Box>& box_vector,
+   const std::set<MappedBox>& mapped_box_set)
+{
+   box_vector.reserve(box_vector.size() + mapped_box_set.size());
+   for (std::set<MappedBox>::const_iterator ni = mapped_box_set.begin();
+        ni != mapped_box_set.end(); ++ni) {
+      box_vector.push_back(ni->getBox());
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void MappedBoxContainerUtils::convertMappedBoxSetToBoxArray(
+   BoxArray& box_array,
+   const std::set<MappedBox>& mapped_box_set)
+{
+   int last_index = box_array.size() - 1;
+   box_array.resizeBoxArray(
+      static_cast<int>(box_array.size() + mapped_box_set.size()));
+   for (std::set<MappedBox>::const_iterator ni = mapped_box_set.begin();
+        ni != mapped_box_set.end(); ++ni) {
+      box_array[++last_index] = ni->getBox();
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void MappedBoxContainerUtils::convertMappedBoxSetToMappedBoxVector(
+   std::vector<MappedBox>& mapped_box_vector,
+   const std::set<MappedBox>& mapped_box_set)
+{
+   mapped_box_vector.reserve(mapped_box_vector.size() + mapped_box_set.size());
+   for (std::set<MappedBox>::const_iterator ni = mapped_box_set.begin();
+        ni != mapped_box_set.end(); ++ni) {
+      mapped_box_vector.push_back(*ni);
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void MappedBoxContainerUtils::separatePeriodicImages(
+   std::vector<MappedBox>& real_mapped_box_vector,
+   std::vector<MappedBox>& periodic_image_mapped_box_vector,
+   const std::set<MappedBox>& mapped_box_set)
+{
+   if (!mapped_box_set.empty()) {
+
+      const MappedBox& first_element(*mapped_box_set.begin());
+
+      const int zero_shift_number(PeriodicShiftCatalog::getCatalog(
+                                     first_element.getDim())->
+                                  getZeroShiftNumber());
+
+      real_mapped_box_vector.reserve(
+         real_mapped_box_vector.size() + mapped_box_set.size());
+      for (std::set<MappedBox>::const_iterator ni = mapped_box_set.begin();
+           ni != mapped_box_set.end(); ++ni) {
+         const MappedBox& mapped_box = *ni;
+         if (mapped_box.getPeriodicShiftNumber() == zero_shift_number) {
+            real_mapped_box_vector.push_back(*ni);
+         } else {
+            periodic_image_mapped_box_vector.push_back(*ni);
+         }
+      }
+   }
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MappedBoxContainerUtils.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MappedBoxContainerUtils.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,558 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Common MappedBox operations for MappedBox containers. 
+ *
+ ************************************************************************/
+#ifndef included_hier_MappedBoxContainerUtils
+#define included_hier_MappedBoxContainerUtils
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/Connector.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief Utilities for performing simple common tasks on a container
+ * of MappedBoxes.
+ *
+ * TODO: Arguments should be re-ordered to the SAMRAI standard, output
+ * before input.
+ *
+ * TODO: There are some very similar methods in this class (for
+ * example coarsenMappedBoxSet and coarsenNeighborSet).  In many
+ * cases, one version supports input and output being the same object,
+ * but the other does not.  For uniformity, all these methods should
+ * support input and output containers being the same object.  It's
+ * simple to implement.
+ */
+class MappedBoxContainerUtils
+{
+
+public:
+
+
+   //@{
+
+   //! @name Changing the boxes of MappedBoxes in a container.
+
+   /*!
+    * @brief Refine the boxes in a set<MappedBox>.
+    *
+    * Put the results in the output container.  For flexibility and
+    * efficiency, the output container is NOT cleared first, so you
+    * may want to clear it before calling this method.  However, if
+    * the input and output sets are the same object, replace the
+    * entire content with the changed objects.
+    *
+    * @param[out] output_mapped_boxes
+    *
+    * @param[in] input_mapped_boxes
+    *
+    * @param[in] ratio Ratio in the refinement operation.
+    */
+   static void
+   refineMappedBoxSet(
+      std::set<MappedBox>& output_mapped_boxes,
+      const std::set<MappedBox>& input_mapped_boxes,
+      const IntVector& ratio);
+
+   /*!
+    * @brief Coarsen the boxes in a set<MappedBox>.
+    *
+    * Put the results in the output container.  For flexibility and
+    * efficiency, the output container is NOT cleared first, so you
+    * may want to clear it before calling this method.  However, if
+    * the input and output sets are the same, replace the entire
+    * content with the changed objects.
+    *
+    * @param[out] output_mapped_boxes
+    *
+    * @param[in] input_mapped_boxes
+    *
+    * @param[in] ratio Ratio in the coarsen operation.
+    */
+   static void
+   coarsenMappedBoxSet(
+      std::set<MappedBox>& output_mapped_boxes,
+      const std::set<MappedBox>& input_mapped_boxes,
+      const IntVector& ratio);
+
+   /*!
+    * @brief Refine the boxes in a NeighborSet.
+    *
+    * Put the results in the output container.  For flexibility and
+    * efficiency, the output container is NOT cleared first, so you
+    * may want to clear it before calling this method.
+    *
+    * @param[out] output_neighbors
+    *
+    * @param[in] input_neighbors
+    *
+    * @param[in] ratio Ratio in the refine operation.
+    */
+   static void
+   refineNeighborSet(
+      Connector::NeighborSet& output_neighbors,
+      const Connector::NeighborSet& input_neighbors,
+      const IntVector& ratio);
+
+   /*!
+    * @brief Coarsen the boxes a NeighborSet.
+    *
+    * Put the results in the output container.  For flexibility and
+    * efficiency, the output container is NOT cleared first, so you
+    * may want to clear it before calling this method.
+    *
+    * @param[out] output_neighbors
+    *
+    * @param[in] input_neighbors
+    *
+    * @param[in] ratio Ratio in the coarsen operations
+    */
+   static void
+   coarsenNeighborSet(
+      Connector::NeighborSet& output_neighbors,
+      const Connector::NeighborSet& input_neighbors,
+      const IntVector& ratio);
+
+   /*!
+    * @brief Refine the boxes of the neighbors in a NeighborhoodSet.
+    *
+    * Put the results in the output container.  For flexibility and
+    * efficiency, the output container is NOT cleared first, so you
+    * may want to clear it before calling this method.
+    *
+    * @param[out] output_neighborhood_set
+    *
+    * @param[in] input_neighborhood_set
+    *
+    * @param[in] ratio Ratio in the coarsen operation.
+    */
+   static void
+   refineNeighborsInNeighborhoodSet(
+      NeighborhoodSet& output_neighborhood_set,
+      const NeighborhoodSet& input_neighborhood_set,
+      const IntVector& ratio);
+
+   /*!
+    * @brief Coarsen the boxes of the neighbors in a NeighborhoodSet
+    *
+    * Put the results in the output container.  For flexibility and
+    * efficiency, the output container is NOT cleared first, so you
+    * may want to clear it before calling this method.
+    *
+    * @param[out] output_neighborhood_set
+    *
+    * @param[in] input_neighborhood_set
+    *
+    * @param[in] ratio Ratio in the coarsen operation.
+    */
+   static void
+   coarsenNeighborsInNeighborhoodSet(
+      NeighborhoodSet& output_neighborhood_set,
+      const NeighborhoodSet& input_neighborhood_set,
+      const IntVector& ratio);
+
+   /*!
+    * @brief Grow the boxes in a set<MappedBox>.
+    *
+    * Put the results in the output container.  For flexibility and
+    * efficiency, the output container is NOT cleared first, so you
+    * may want to clear it before calling this method.  However, if
+    * the input and output sets are the same, replace the entire
+    * content with the changed objects.
+    *
+    * @param[out] output_mapped_boxes
+    *
+    * @param[in] input_mapped_boxes
+    *
+    * @param[in] growth Grow boxes by this amount.
+    */
+   static void
+   growMappedBoxSet(
+      std::set<MappedBox>& output_mapped_boxes,
+      const std::set<MappedBox>& input_mapped_boxes,
+      const IntVector& growth);
+
+   /*!
+    * @brief Grow the boxes of the neighbors in a NeighborhoodSet.
+    *
+    * Put the results in the output container.  For flexibility and
+    * efficiency, the output container is NOT cleared first, so you
+    * may want to clear it before calling this method.
+    *
+    * @param[out] output_neighborhood_set
+    *
+    * @param[in] input_neighborhood_set
+    *
+    * @param[in] growth Growth amount.
+    */
+   static void
+   growNeighborsInNeighborhoodSet(
+      NeighborhoodSet& output_neighborhood_set,
+      const NeighborhoodSet& input_neighborhood_set,
+      const IntVector& growth);
+
+   //@}
+
+
+
+   //@{
+   //! @name Changing a plain array of MappedBoxes in place.
+
+   /*!
+    * @brief Refine the boxes in an array of MappedBoxes.
+    *
+    * @brief[in,out] mapped_boxes
+    *
+    * @param[in] num_mapped_boxes Number of MappedBoxes in mapped_boxes.
+    *
+    * @param[in] ratio Ratio in refinement operation.
+    */
+   static void
+   refineMappedBoxes(
+      MappedBox* mapped_boxes,
+      size_t num_mapped_boxes,
+      const IntVector& ratio);
+
+   /*!
+    * @brief Coarsen the boxes in a plain array of MappedBoxes.
+    *
+    * @brief[in,out] mapped_boxes
+    *
+    * @param[in] num_mapped_boxes Number of MappedBoxes in mapped_boxes.
+    *
+    * @param[in] ratio Ratio in coarsen operation.
+    */
+   static void
+   coarsenMappedBoxes(
+      MappedBox* mapped_boxes,
+      size_t num_mapped_boxes,
+      const IntVector& ratio);
+
+   /*!
+    * @brief Grow the boxes in a plain array of MappedBoxes.
+    *
+    * @param[in,out] mapped_boxes
+    *
+    * @param[in] num_mapped_boxes Number of MappedBoxes in mapped_boxes.
+    *
+    * @param[in] growth Growth amount.
+    */
+   static void
+   growMappedBoxes(
+      MappedBox* mapped_boxes,
+      size_t num_mapped_boxes,
+      const IntVector& growth);
+
+   //@}
+
+
+
+   //@{
+
+   //! @name Converting from one container to another
+
+   /*!
+    * @brief Convert a BoxList to a vector<MappedBox>.
+    *
+    * Each input box is converted to a MappedBox owned by process 0
+    * The LocalIndices are set sequentially starting with 0 for the
+    * first input Box.
+    *
+    * Put the results in the output container.  For flexibility and
+    * efficiency, the output container is NOT cleared first, so you
+    * may want to clear it before calling this method.
+    *
+    * @param[out] mapped_box_vector
+    *
+    * @param[in] box_list
+    */
+   static void
+   convertBoxListToMappedBoxVector(
+      std::vector<MappedBox>& mapped_box_vector,
+      const BoxList& box_list);
+
+   /*!
+    * @brief Convert a vector<MappedBox> to a BoxList.
+    *
+    * Put the results in the output container.  For flexibility and
+    * efficiency, the output container is NOT cleared first, so you
+    * may want to clear it before calling this method.
+    *
+    * @param[out] box_list
+    *
+    * @param[in] mapped_box_vector
+    */
+   static void
+   convertMappedBoxVectorToBoxList(
+      BoxList& box_list,
+      const std::vector<MappedBox>& mapped_box_vector);
+
+   /*!
+    * @brief Convert a set<MappedBox> to a BoxList.
+    *
+    * Put the results in the output container.  For flexibility and
+    * efficiency, the output container is NOT cleared first, so you
+    * may want to clear it before calling this method.
+    *
+    * @param[out] box_list
+    *
+    * @param[in] mapped_box_set
+    */
+   static void
+   convertMappedBoxSetToBoxList(
+      BoxList& box_list,
+      const std::set<MappedBox>& mapped_box_set);
+
+   /*!
+    * @brief Convert a set<MappedBox> to a Box vector;
+    *
+    * Put the results in the output container.  For flexibility and
+    * efficiency, the output container is NOT cleared first, so you
+    * may want to clear it before calling this method.
+    *
+    * @param[out] box_vector
+    *
+    * @param[in] mapped_box_set
+    */
+   static void
+   convertMappedBoxSetToBoxVector(
+      std::vector<Box>& box_vector,
+      const std::set<MappedBox>& mapped_box_set);
+
+   /*!
+    * @brief Convert a set<MappedBox> to a BoxArray;
+    *
+    * Put the results in the output container.  For flexibility and
+    * efficiency, the output container is NOT cleared first, so you
+    * may want to clear it before calling this method.
+    *
+    * @param[out] box_array
+    *
+    * @param[in] mapped_box_set
+    */
+   static void
+   convertMappedBoxSetToBoxArray(
+      BoxArray& box_array,
+      const std::set<MappedBox>& mapped_box_set);
+
+   /*!
+    * @brief Convert a set<MappedBox> to a vector<MappedBox>.
+    *
+    * Put the results in the output container.  For flexibility and
+    * efficiency, the output container is NOT cleared first, so you
+    * may want to clear it before calling this method.
+    *
+    * @param[out] mapped_box_vector
+    *
+    * @param[in] mapped_box_set
+    */
+   static void
+   convertMappedBoxSetToMappedBoxVector(
+      std::vector<MappedBox>& mapped_box_vector,
+      const std::set<MappedBox>& mapped_box_set);
+
+   //@}
+
+
+
+   //@{
+
+   //! @name Periodic-image-specific container operations.
+
+   /*!
+    * @brief Unshift periodic image MappedBoxes from a set<MappedBox>.
+    *
+    * Change periodic image MappedBoxes to their unshifted position.
+    *
+    * Put the results in the output container.  For flexibility and
+    * efficiency, the output container is NOT cleared first, so you
+    * may want to clear it before calling this method.
+    *
+    * @param[out] output_mapped_boxes
+    *
+    * @param[in] input_mapped_boxes
+    *
+    * @param[in] refinement_ratio Refinement ratio where the boxes
+    * live.
+    */
+   static void
+   unshiftPeriodicImageMappedBoxes(
+      std::set<MappedBox>& output_mapped_boxes,
+      const std::set<MappedBox>& input_mapped_boxes,
+      const IntVector& refinement_ratio);
+
+   /*!
+    * @brief Split a set<MappedBox> into two vector<MappedBox>
+    * objects, one containing real MappedBoxes and one containing their
+    * periodic images.
+    *
+    * Put the results in the output container.  For flexibility and
+    * efficiency, the output container is NOT cleared first, so you
+    * may want to clear it before calling this method.
+    *
+    * @param[out] real_mapped_box_vector
+    *
+    * @param[out] periodic_image_mapped_box_vector
+    *
+    * @param[in] mapped_box_set
+    */
+   static void
+   separatePeriodicImages(
+      std::vector<MappedBox>& real_mapped_box_vector,
+      std::vector<MappedBox>& periodic_image_mapped_box_vector,
+      const std::set<MappedBox>& mapped_box_set);
+
+   /*!
+    * @brief Remove periodic image MappedBoxes from a set<MappedBox>.
+    *
+    * Put the results in the output container.  For flexibility and
+    * efficiency, the output container is NOT cleared first, so you
+    * may want to clear it before calling this method.
+    *
+    * @param[out] output_mapped_boxes
+    *
+    * @param[in] input_mapped_boxes
+    */
+   static void
+   removePeriodicImageMappedBoxes(
+      std::set<MappedBox>& output_mapped_boxes,
+      const std::set<MappedBox>& input_mapped_boxes);
+
+   /*!
+    * @brief Remove periodic neighbors from a NeighborhoodSet.
+    *
+    * Put the results in the output container.  For flexibility and
+    * efficiency, the output container is NOT cleared first, so you
+    * may want to clear it before calling this method.
+    *
+    * @param[out] output_neighborhood_set
+    *
+    * @param[in] input_neighborhood_set
+    */
+   static void
+   removePeriodicNeighbors(
+      NeighborhoodSet& output_neighborhood_set,
+      const NeighborhoodSet& input_neighborhood_set);
+
+   //@}
+
+
+
+   //@{
+
+   //! @name Extracting information from NeighborhoodSets
+
+   /*!
+    * @brief Insert all neighbors from an NeighborhoodSet into a
+    * single NeighborSet.
+    *
+    * @param[out] all_neighbors
+    *
+    * @param[in] neighborhood_set
+    */
+   static void
+   getNeighborsFromNeighborhoodSet(
+      Connector::NeighborSet& all_neighbors,
+      const NeighborhoodSet& neighborhood_set);
+
+   /*!
+    * @brief Insert all owners of neighbors from a NeighborhoodSet
+    * into a single set container.
+    *
+    * @param[out] owners
+    *
+    * @param[in] neighborhood_set
+    */
+   static void
+   getOwnersFromNeighborhoodSet(
+      std::set<int>& owners,
+      const NeighborhoodSet& neighborhood_set);
+
+   /*!
+    * @brief Insert owners of neighbors from NeighborSet into a single
+    * set container.
+    *
+    * @param[out] owners
+    *
+    * @param[in] neighbors
+    */
+   static void
+   getOwnersFromNeighbors(
+      std::set<int>& owners,
+      const Connector::NeighborSet& neighbors);
+
+   //@}
+
+
+
+   //@{
+
+   //! @name Intersections between MappedBoxes.
+
+   /*!
+    * @brief Remove from a BoxList its the intersections with a NeighborSet.
+    *
+    *
+    * @param[in, out] boxes
+    *
+    * @param[in] neighbors
+    */
+   static void
+   removeBoxListNeighborSetIntersections(
+      BoxList& boxes,
+      const Connector::NeighborSet& neighbors);
+
+   //@}
+
+
+
+   //@{
+
+   //! @name I/O operations for containers that lack built-in versions.
+
+   /*!
+    * @brief Print a vector of MappedBoxes to an output stream.
+    *
+    * @param[in] mapped_boxes
+    *
+    * @param[in] output_stream
+    *
+    * @param[in] left_border
+    *
+    * @param[in] detail_depth
+    */
+   static void
+   recursivePrintMappedBoxVector(
+      const std::vector<MappedBox>& mapped_boxes,
+      std::ostream& output_stream = tbox::plog,
+      const std::string& border = std::string(),
+      int detail_depth = 0);
+
+   //@}
+
+private:
+
+   // Disabled constructor.  No need for objects of this class.
+   MappedBoxContainerUtils();
+
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/MappedBoxContainerUtils.I"
+#endif
+
+#endif  // included_hier_MappedBoxContainerUtils
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MappedBoxId.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MappedBoxId.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,47 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Identifier for a MappedBox. 
+ *
+ ************************************************************************/
+#ifndef included_hier_MappedBoxId_C
+#define included_hier_MappedBoxId_C
+
+#include "SAMRAI/hier/MappedBoxId.h"
+
+#include <iostream>
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/MappedBoxId.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+*******************************************************************************
+*******************************************************************************
+*/
+MappedBoxId::~MappedBoxId()
+{
+}
+
+/*
+*******************************************************************************
+Stream-insert operator.
+*******************************************************************************
+*/
+std::ostream& operator << (
+   std::ostream& co,
+   const MappedBoxId& r)
+{
+   co << r.d_global_id << '/' << r.d_periodic_shift_num;
+   return co;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MappedBoxId.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MappedBoxId.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,209 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Identifier for a MappedBox. 
+ *
+ ************************************************************************/
+#include "SAMRAI/hier/MappedBoxId.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+MappedBoxId::MappedBoxId():
+   d_global_id(),
+   d_periodic_shift_num(0)
+{
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+MappedBoxId::MappedBoxId(
+   const GlobalId& id,
+   const int periodic_shift_num):
+   d_global_id(id),
+   d_periodic_shift_num(periodic_shift_num)
+{
+   TBOX_ASSERT(periodic_shift_num >= 0);
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+MappedBoxId::MappedBoxId(
+   const LocalId &local_id,
+   const int owner,
+   const int periodic_shift_num):
+   d_global_id(local_id, owner),
+   d_periodic_shift_num(periodic_shift_num)
+{
+   TBOX_ASSERT(periodic_shift_num >= 0);
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+MappedBoxId::MappedBoxId(
+   const MappedBoxId& r):
+   d_global_id(r.d_global_id),
+   d_periodic_shift_num(r.d_periodic_shift_num)
+{
+   TBOX_ASSERT(r.d_periodic_shift_num >= 0);
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+void MappedBoxId::initialize(
+   const LocalId &local_id,
+   const int owner,
+   const int periodic_shift_num)
+{
+   if (periodic_shift_num < 0) {
+      TBOX_ASSERT(periodic_shift_num >= 0);
+   }
+   TBOX_ASSERT(periodic_shift_num >= 0);
+
+   d_global_id.getLocalId() = local_id;
+   d_global_id.getOwnerRank() = owner;
+   d_periodic_shift_num = periodic_shift_num;
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+const hier::GlobalId& MappedBoxId::getGlobalId() const {
+   return d_global_id;
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+int MappedBoxId::getOwnerRank() const {
+   return d_global_id.getOwnerRank();
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+const LocalId &MappedBoxId::getLocalId() const {
+   return d_global_id.getLocalId();
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+int MappedBoxId::getPeriodicShiftNumber() const {
+   return d_periodic_shift_num;
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+bool MappedBoxId::isPeriodicImage() const {
+   return d_periodic_shift_num != 0;
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+bool MappedBoxId::operator == (
+   const MappedBoxId& r) const {
+   bool rval = d_global_id == r.d_global_id && d_periodic_shift_num ==
+      r.d_periodic_shift_num;
+   TBOX_ASSERT(d_periodic_shift_num >= 0 && r.d_periodic_shift_num >= 0);
+   return rval;
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+bool MappedBoxId::operator != (
+   const MappedBoxId& r) const {
+   TBOX_ASSERT(d_periodic_shift_num >= 0 && r.d_periodic_shift_num >= 0);
+   bool rval = d_global_id != r.d_global_id || d_periodic_shift_num !=
+      r.d_periodic_shift_num;
+   return rval;
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+bool MappedBoxId::operator < (
+   const MappedBoxId& r) const {
+   TBOX_ASSERT(d_periodic_shift_num >= 0 && r.d_periodic_shift_num >= 0);
+   return d_global_id < r.d_global_id ||
+          (d_global_id == r.d_global_id && d_periodic_shift_num <
+           r.d_periodic_shift_num);
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+bool MappedBoxId::operator > (
+   const MappedBoxId& r) const {
+   TBOX_ASSERT(d_periodic_shift_num >= 0 && r.d_periodic_shift_num >= 0);
+   return d_global_id > r.d_global_id ||
+          (d_global_id == r.d_global_id && d_periodic_shift_num <
+           r.d_periodic_shift_num);
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+bool MappedBoxId::operator <= (
+   const MappedBoxId& r) const {
+   TBOX_ASSERT(d_periodic_shift_num >= 0 && r.d_periodic_shift_num >= 0);
+   return *this < r || *this == r;
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+bool MappedBoxId::operator >= (
+   const MappedBoxId& r) const {
+   TBOX_ASSERT(d_periodic_shift_num >= 0 && r.d_periodic_shift_num >= 0);
+   return *this > r || *this == r;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MappedBoxId.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MappedBoxId.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,225 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Identifier for a MappedBox. 
+ *
+ ************************************************************************/
+#ifndef included_hier_MappedBoxId
+#define included_hier_MappedBoxId
+
+#include <iostream>
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/GlobalId.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief Identifier for a MappedBox, consisting of a GlobalId
+ * and a periodic shift number.
+ *
+ * MappedBoxes are primarily identified by their GlobalId.  But in a
+ * periodic domain, a MappedBox may have periodic images.  To uniquely
+ * identify real and image MappedBoxes, the MappedBoxId includes both
+ * the GlobalId and a periodic shift number (see
+ * PeriodicShiftCatalog).  A MappedBox and all its periodic images
+ * have the same GlobalId but different periodic shift number.
+ *
+ * MappedBoxId comparison operators are implemented for sorting
+ * MappedBoxes.  The GlobalIds and periodic shift indices are used for
+ * all comparisons.  The GlobalIds are compared first, followed by the
+ * periodic shift index.
+ */
+class MappedBoxId
+{
+
+public:
+
+   /*!
+    * @brief Default constructor is non-initializing.
+    *
+    * The object can be initialized using initialize() or by
+    * assignment.
+    */
+   MappedBoxId();
+
+   /*!
+    * @brief Initializing constructor.
+    *
+    * @param[in] local_id
+    *
+    * @param[in] owner_rank
+    *
+    * @param[in] periodic_shift_num
+    */
+   explicit MappedBoxId(
+      const LocalId &local_id,
+      const int owner_rank,
+      const int periodic_shift_num = 0);
+
+   /*!
+    * @brief Initializing constructor.
+    *
+    * @param[in] global_id
+    *
+    * @param[in] periodic_shift_num
+    */
+   explicit MappedBoxId(
+      const GlobalId& id,
+      const int periodic_shift_num = 0);
+
+   /*!
+    * @brief Copy constructor.
+    *
+    * @param[in] r
+    */
+   MappedBoxId(
+      const MappedBoxId& r);
+
+   /*!
+    * @brief Destructor.
+    */
+   virtual ~MappedBoxId(
+      void);
+
+   /*!
+    * @brief Set all the attributes to given values.
+    *
+    * @param[in] local_id
+    *
+    * @param[in] owner_rank
+    *
+    * @param[in] periodic_shift_num
+    */
+   /*
+    * TODO: Replace the magic numbers with a methods returning the
+    * official invalid value.  See artifact artf13924.
+    */
+   void
+   initialize(
+      const LocalId &local_id = LocalId::getInvalidId(),
+      const int owner_rank = tbox::SAMRAI_MPI::getInvalidRank(),
+      const int periodic_shift_num = 0);
+
+   /*!
+    * @brief Access the GlobalId.
+    */
+   const GlobalId&
+   getGlobalId() const;
+
+   /*!
+    * @brief Access the owner rank.
+    */
+   int
+   getOwnerRank() const;
+
+   /*!
+    * @brief Access the LocalId.
+    */
+   const LocalId
+   &getLocalId() const;
+
+   /*!
+    * @brief Access the periodic shift number.
+    */
+   int
+   getPeriodicShiftNumber() const;
+
+   /*!
+    * @brief Whether the periodic shift number refers to a periodic
+    * image.
+    */
+   bool
+   isPeriodicImage() const;
+
+
+   //@{
+
+   //! @name Comparison operators
+
+   /*!
+    * @brief Equality operator.
+    *
+    * All comparison operators use the GlobalId and periodic shift
+    * number.  Compare the GlobalIds first; if they compare equal,
+    * compare the periodic shift numbers next.
+    */
+   bool
+   operator == (
+      const MappedBoxId& r) const;
+
+   /*!
+    * @brief Inequality operator.
+    *
+    * See note on comparison for operator==(const MappedBoxId&);
+    */
+   bool
+   operator != (
+      const MappedBoxId& r) const;
+
+   /*!
+    * @brief Less-than operator.
+    *
+    * See note on comparison for operator==(const MappedBoxId&);
+    */
+   bool
+   operator < (
+      const MappedBoxId& r) const;
+
+   /*!
+    * @brief Greater-than operator.
+    *
+    * See note on comparison for operator==(const MappedBoxId&);
+    */
+   bool
+   operator > (
+      const MappedBoxId& r) const;
+
+   /*!
+    * @brief Less-than-or-equal-to operator.
+    *
+    * See note on comparison for operator==(const MappedBoxId&);
+    */
+   bool
+   operator <= (
+      const MappedBoxId& r) const;
+
+   /*!
+    * @brief Greater-than-or-equal-to operator.
+    *
+    * See note on comparison for operator==(const MappedBoxId&);
+    */
+   bool
+   operator >= (
+      const MappedBoxId& r) const;
+
+   //@}
+
+
+   /*!
+    * @brief Format and insert the object into a stream.
+    */
+   friend std::ostream&
+   operator << (
+      std::ostream& co,
+      const MappedBoxId& r);
+
+private:
+   GlobalId d_global_id;
+
+   int d_periodic_shift_num;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/MappedBoxId.I"
+#endif
+
+#endif  // included_hier_MappedBoxId
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MappedBoxLevel.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MappedBoxLevel.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1603 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Set of mapped_boxes in a mapped_box_level of a distributed box graph. 
+ *
+ ************************************************************************/
+#ifndef included_hier_MappedBoxLevel_C
+#define included_hier_MappedBoxLevel_C
+
+#include "SAMRAI/hier/MappedBoxLevel.h"
+
+#include "SAMRAI/hier/PeriodicShiftCatalog.h"
+#include "SAMRAI/hier/RealMappedBoxConstIterator.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/TimerManager.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/MappedBoxLevel.I"
+#endif
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+#define HIER_MAPPED_BOX_LEVEL_VERSION (0)
+
+tbox::Pointer<tbox::Timer> MappedBoxLevel::t_acquire_remote_mapped_boxes;
+
+const LocalId MappedBoxLevel::s_negative_one_local_id(-1);
+
+tbox::StartupShutdownManager::Handler
+MappedBoxLevel::s_initialize_finalize_handler(
+   MappedBoxLevel::initializeCallback,
+   0,
+   0,
+   MappedBoxLevel::finalizeCallback,
+   tbox::StartupShutdownManager::priorityTimers);
+
+MappedBoxLevel::MappedBoxLevel():
+   d_mpi(tbox::SAMRAI_MPI::commNull),
+   d_mapped_boxes(),
+   d_global_mapped_boxes(),
+   d_ratio(tbox::Dimension::getInvalidDimension(), 0),
+
+   d_local_number_of_cells(0),
+   d_global_number_of_cells(-1),
+   d_local_number_of_mapped_boxes(0),
+   d_global_number_of_mapped_boxes(-1),
+
+   d_max_number_of_mapped_boxes(-1),
+   d_min_number_of_mapped_boxes(-1),
+   d_max_number_of_cells(-1),
+   d_min_number_of_cells(-1),
+
+   d_local_max_box_size(tbox::Dimension::getInvalidDimension()),
+   d_global_max_box_size(tbox::Dimension::getInvalidDimension()),
+   d_local_min_box_size(tbox::Dimension::getInvalidDimension()),
+   d_global_min_box_size(tbox::Dimension::getInvalidDimension()),
+
+   d_local_bounding_box(tbox::Dimension::getInvalidDimension()),
+   d_local_bounding_box_up_to_date(false),
+   d_global_bounding_box(tbox::Dimension::getInvalidDimension()),
+   d_global_data_up_to_date(false),
+
+   d_parallel_state(DISTRIBUTED),
+   d_globalized_version(NULL),
+   d_persistent_overlap_connectors(NULL),
+   d_handle(NULL),
+   d_rank(BAD_INT),
+   d_nproc(BAD_INT)
+{
+   // This ctor should never be invoked.
+   TBOX_ASSERT(false);
+}
+
+MappedBoxLevel::MappedBoxLevel(
+   const tbox::Dimension& dim):
+   d_mpi(tbox::SAMRAI_MPI::commNull),
+   d_mapped_boxes(),
+   d_global_mapped_boxes(),
+   d_ratio(dim, 0),
+
+   d_local_number_of_cells(0),
+   d_global_number_of_cells(-1),
+   d_local_number_of_mapped_boxes(0),
+   d_global_number_of_mapped_boxes(-1),
+
+   d_max_number_of_mapped_boxes(-1),
+   d_min_number_of_mapped_boxes(-1),
+   d_max_number_of_cells(-1),
+   d_min_number_of_cells(-1),
+
+   d_local_max_box_size(dim),
+   d_global_max_box_size(dim),
+   d_local_min_box_size(dim),
+   d_global_min_box_size(dim),
+
+   d_local_bounding_box(dim),
+   d_local_bounding_box_up_to_date(false),
+   d_global_bounding_box(dim),
+   d_global_data_up_to_date(false),
+
+   d_parallel_state(DISTRIBUTED),
+   d_globalized_version(NULL),
+   d_persistent_overlap_connectors(NULL),
+   d_handle(NULL),
+   d_rank(BAD_INT),
+   d_nproc(BAD_INT)
+{
+}
+
+MappedBoxLevel::MappedBoxLevel(
+   const MappedBoxLevel& rhs):
+   tbox::DescribedClass(),
+   d_mpi(rhs.d_mpi),
+   d_mapped_boxes(rhs.d_mapped_boxes),
+   d_global_mapped_boxes(rhs.d_global_mapped_boxes),
+   d_ratio(rhs.d_ratio),
+
+   d_local_number_of_cells(rhs.d_local_number_of_cells),
+   d_global_number_of_cells(rhs.d_global_number_of_cells),
+   d_local_number_of_mapped_boxes(rhs.d_local_number_of_mapped_boxes),
+   d_global_number_of_mapped_boxes(rhs.d_global_number_of_mapped_boxes),
+
+   d_max_number_of_mapped_boxes(rhs.d_max_number_of_mapped_boxes),
+   d_min_number_of_mapped_boxes(rhs.d_min_number_of_mapped_boxes),
+   d_max_number_of_cells(rhs.d_max_number_of_cells),
+   d_min_number_of_cells(rhs.d_min_number_of_cells),
+
+   d_local_max_box_size(rhs.d_local_max_box_size),
+   d_global_max_box_size(rhs.d_global_max_box_size),
+   d_local_min_box_size(rhs.d_local_min_box_size),
+   d_global_min_box_size(rhs.d_global_min_box_size),
+
+   d_local_bounding_box(rhs.d_local_bounding_box),
+   d_local_bounding_box_up_to_date(rhs.d_local_bounding_box_up_to_date),
+   d_global_bounding_box(rhs.d_global_bounding_box),
+   d_global_data_up_to_date(rhs.d_global_data_up_to_date),
+
+   d_parallel_state(rhs.d_parallel_state),
+   d_globalized_version(NULL),
+   d_persistent_overlap_connectors(NULL),
+   d_handle(NULL),
+   d_rank(rhs.d_rank),
+   d_nproc(rhs.d_nproc)
+{
+   // This cannot be the first constructor call, so no need to set timers.
+}
+
+MappedBoxLevel::MappedBoxLevel(
+   const MappedBoxSet& mapped_boxes,
+   const IntVector& ratio,
+   const tbox::SAMRAI_MPI& mpi,
+   const ParallelState parallel_state):
+   d_mpi(tbox::SAMRAI_MPI::commNull),
+   d_mapped_boxes(),
+   d_global_mapped_boxes(),
+   d_ratio(ratio),
+
+   d_local_number_of_cells(0),
+   d_global_number_of_cells(-1),
+   d_local_number_of_mapped_boxes(0),
+   d_global_number_of_mapped_boxes(-1),
+
+   d_max_number_of_mapped_boxes(-1),
+   d_min_number_of_mapped_boxes(-1),
+   d_max_number_of_cells(-1),
+   d_min_number_of_cells(-1),
+
+   d_local_max_box_size(ratio.getDim()),
+   d_global_max_box_size(ratio.getDim()),
+   d_local_min_box_size(ratio.getDim()),
+   d_global_min_box_size(ratio.getDim()),
+
+   d_local_bounding_box(ratio.getDim()),
+   d_local_bounding_box_up_to_date(false),
+   d_global_bounding_box(ratio.getDim()),
+   d_global_data_up_to_date(false),
+
+   d_parallel_state(DISTRIBUTED),
+   d_globalized_version(NULL),
+   d_persistent_overlap_connectors(NULL),
+   d_handle(NULL),
+   d_rank(BAD_INT),
+   d_nproc(BAD_INT)
+{
+   initialize(mapped_boxes, ratio, mpi, parallel_state);
+}
+
+MappedBoxLevel::MappedBoxLevel(
+   const IntVector& ratio,
+   const tbox::SAMRAI_MPI& mpi,
+   const ParallelState parallel_state):
+   d_mpi(tbox::SAMRAI_MPI::commNull),
+   d_mapped_boxes(),
+   d_global_mapped_boxes(),
+   d_ratio(ratio),
+
+   d_local_number_of_cells(0),
+   d_global_number_of_cells(-1),
+   d_local_number_of_mapped_boxes(0),
+   d_global_number_of_mapped_boxes(-1),
+
+   d_max_number_of_mapped_boxes(-1),
+   d_min_number_of_mapped_boxes(-1),
+   d_max_number_of_cells(-1),
+   d_min_number_of_cells(-1),
+
+   d_local_max_box_size(ratio.getDim()),
+   d_global_max_box_size(ratio.getDim()),
+   d_local_min_box_size(ratio.getDim()),
+   d_global_min_box_size(ratio.getDim()),
+
+   d_local_bounding_box(ratio.getDim()),
+   d_local_bounding_box_up_to_date(false),
+   d_global_bounding_box(ratio.getDim()),
+   d_global_data_up_to_date(false),
+
+   d_parallel_state(DISTRIBUTED),
+   d_globalized_version(NULL),
+   d_persistent_overlap_connectors(NULL),
+   d_handle(NULL),
+   d_rank(BAD_INT),
+   d_nproc(BAD_INT)
+{
+   MappedBoxSet dummy_mapped_boxes;
+   initialize(dummy_mapped_boxes, ratio, mpi, parallel_state);
+}
+
+MappedBoxLevel::~MappedBoxLevel()
+{
+   clear();
+   if (d_persistent_overlap_connectors != NULL) {
+      delete d_persistent_overlap_connectors;
+      d_persistent_overlap_connectors = NULL;
+   }
+}
+
+void MappedBoxLevel::initialize(
+   const MappedBoxSet& mapped_boxes,
+   const IntVector& ratio,
+   const tbox::SAMRAI_MPI& mpi,
+   const ParallelState parallel_state)
+{
+   if (&mapped_boxes != &d_mapped_boxes) {
+      d_mapped_boxes = mapped_boxes;
+   }
+   initializePrivate(ratio,
+      false,
+      mpi,
+      parallel_state);
+}
+
+void MappedBoxLevel::initialize(
+   const IntVector& ratio,
+   const tbox::SAMRAI_MPI& mpi,
+   const ParallelState parallel_state)
+{
+   MappedBoxSet dummy_mapped_boxes;
+   initialize(dummy_mapped_boxes,
+      ratio,
+      mpi,
+      parallel_state);
+}
+
+void MappedBoxLevel::swapInitialize(
+   MappedBoxSet& mapped_boxes,
+   const IntVector& ratio,
+   const tbox::SAMRAI_MPI& mpi,
+   const ParallelState parallel_state)
+{
+   TBOX_ASSERT(&mapped_boxes != &d_mapped_boxes);   // Library error if this fails.
+   d_mapped_boxes.swap(mapped_boxes);
+   initializePrivate(ratio,
+      true,
+      mpi,
+      parallel_state);
+}
+
+void MappedBoxLevel::initializePrivate(
+   const IntVector& ratio,
+   const bool swap,
+   const tbox::SAMRAI_MPI& mpi,
+   const ParallelState parallel_state)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, ratio);
+
+   clearForBoxChanges();
+
+   d_mpi = mpi;
+   d_rank = mpi.getRank();
+   d_nproc = mpi.getSize();
+
+   if (parallel_state == DISTRIBUTED) {
+      d_global_mapped_boxes.clear();
+   } else {
+      if (&d_mapped_boxes != &d_global_mapped_boxes) {
+         d_global_mapped_boxes = d_mapped_boxes;
+      }
+   }
+   // Erase non-local MappedBoxes, if any, from d_mapped_boxes.
+   if (!d_mapped_boxes.empty()) {
+      if (d_mapped_boxes.begin()->getOwnerRank() != d_rank ||
+          d_mapped_boxes.rbegin()->getOwnerRank() != d_rank) {
+         MappedBoxSet::Range range = d_mapped_boxes.findRanksRange(d_rank);
+         if (range.first == range.second) {
+            // No MappedBoxes belonging to local process.
+            d_mapped_boxes.clear();
+         }
+         if (swap) {
+            if (range.first != d_mapped_boxes.end()) {
+               // Some MappedBoxes belonging to remote process < d_rank.
+               d_mapped_boxes.erase(d_mapped_boxes.begin(), range.first);
+            }
+            if (range.second != d_mapped_boxes.end()) {
+               // Some MappedBoxes belonging to remote process > d_rank.
+               d_mapped_boxes.erase(range.second, d_mapped_boxes.end());
+            }
+         }
+         else {
+            // Erase MappedBoxes belonging to remote process < d_rank.
+            d_mapped_boxes.erase(d_mapped_boxes.begin(), range.first);
+            // Erase MappedBoxes belonging to remote process > d_rank.
+            d_mapped_boxes.erase(range.second, d_mapped_boxes.end());
+         }
+      }
+   }
+
+   d_ratio = ratio;
+   d_parallel_state = parallel_state;
+   d_global_number_of_cells = -1;
+   d_global_number_of_mapped_boxes = -1;
+   d_local_bounding_box_up_to_date = false;
+   d_global_data_up_to_date = false;
+   computeLocalRedundantData();
+}
+
+/*
+ ***********************************************************************
+ * Clear data and reset them to unusuable values.
+ *
+ * Note: don't use IntVector::getOne here, because SAMRAI may have
+ * already shut down.
+ ***********************************************************************
+ */
+void MappedBoxLevel::clear()
+{
+   if (isInitialized()) {
+      clearForBoxChanges();
+      d_mpi = tbox::SAMRAI_MPI(tbox::SAMRAI_MPI::commNull);
+      d_mapped_boxes.clear();
+      d_global_mapped_boxes.clear();
+      d_ratio(0) = 0;
+      d_local_number_of_cells = 0;
+      d_global_number_of_cells = -1;
+      d_local_number_of_mapped_boxes = 0;
+      d_global_number_of_mapped_boxes = -1;
+      d_local_bounding_box.setEmpty();
+      d_local_bounding_box_up_to_date = false;
+      d_global_bounding_box.setEmpty();
+      d_global_data_up_to_date = false;
+      d_parallel_state = DISTRIBUTED;
+      d_rank = BAD_INT;
+      d_nproc = BAD_INT;
+   }
+}
+
+void MappedBoxLevel::swap(
+   MappedBoxLevel& level_a,
+   MappedBoxLevel& level_b)
+{
+
+   if (&level_a != &level_b) {
+      if (level_a.isInitialized() && level_b.isInitialized()) {
+         TBOX_DIM_ASSERT_CHECK_ARGS2(level_a, level_b);
+      }
+
+      level_a.clearPersistentOverlapConnectors();
+      level_b.clearPersistentOverlapConnectors();
+
+      level_a.detachMyHandle();
+      level_b.detachMyHandle();
+
+      int tmpint;
+      bool tmpbool;
+      IntVector tmpvec(level_a.getDim());
+      Box tmpbox(level_a.getDim());
+      ParallelState tmpstate;
+      const MappedBoxLevel *tmpmbl;
+      tbox::SAMRAI_MPI tmpmpi(tbox::SAMRAI_MPI::commNull);
+
+      tmpstate = level_a.d_parallel_state;
+      level_a.d_parallel_state = level_b.d_parallel_state;
+      level_b.d_parallel_state = tmpstate;
+
+      tmpmpi = level_a.d_mpi;
+      level_a.d_mpi = level_b.d_mpi;
+      level_b.d_mpi = tmpmpi;
+
+      tmpint = level_a.d_nproc;
+      level_a.d_nproc = level_b.d_nproc;
+      level_b.d_nproc = tmpint;
+
+      tmpint = level_a.d_rank;
+      level_a.d_rank = level_b.d_rank;
+      level_b.d_rank = tmpint;
+
+      tmpvec = level_a.d_ratio;
+      level_a.d_ratio = level_b.d_ratio;
+      level_b.d_ratio = tmpvec;
+
+      tmpint = static_cast<int>(level_a.d_local_number_of_cells);
+      level_a.d_local_number_of_cells = level_b.d_local_number_of_cells;
+      level_b.d_local_number_of_cells = tmpint;
+
+      tmpint = level_a.d_global_number_of_cells;
+      level_a.d_global_number_of_cells = level_b.d_global_number_of_cells;
+      level_b.d_global_number_of_cells = tmpint;
+
+      tmpint = static_cast<int>(level_a.d_local_number_of_mapped_boxes);
+      level_a.d_local_number_of_mapped_boxes = level_b.d_local_number_of_mapped_boxes;
+      level_b.d_local_number_of_mapped_boxes = tmpint;
+
+      tmpint = level_a.d_global_number_of_mapped_boxes;
+      level_a.d_global_number_of_mapped_boxes = level_b.d_global_number_of_mapped_boxes;
+      level_b.d_global_number_of_mapped_boxes = tmpint;
+
+      tmpbox = level_a.d_local_bounding_box;
+      level_a.d_local_bounding_box = level_b.d_local_bounding_box;
+      level_b.d_local_bounding_box = tmpbox;
+
+      tmpbool = level_a.d_local_bounding_box_up_to_date;
+      level_a.d_local_bounding_box_up_to_date = level_b.d_local_bounding_box_up_to_date;
+      level_b.d_local_bounding_box_up_to_date = tmpbool;
+
+      tmpvec = level_a.d_local_min_box_size;
+      level_a.d_local_min_box_size = level_b.d_local_min_box_size;
+      level_b.d_local_min_box_size = tmpvec;
+
+      tmpvec = level_a.d_local_max_box_size;
+      level_a.d_local_max_box_size = level_b.d_local_max_box_size;
+      level_b.d_local_max_box_size = tmpvec;
+
+      tmpbox = level_a.d_global_bounding_box;
+      level_a.d_global_bounding_box = level_b.d_global_bounding_box;
+      level_b.d_global_bounding_box = tmpbox;
+
+      tmpbool = level_a.d_global_data_up_to_date;
+      level_a.d_global_data_up_to_date = level_b.d_global_data_up_to_date;
+      level_b.d_global_data_up_to_date = tmpbool;
+
+      tmpmbl = level_a.d_globalized_version;
+      level_a.d_globalized_version = level_b.d_globalized_version;
+      level_b.d_globalized_version = tmpmbl;
+
+      level_a.d_mapped_boxes.swap(level_b.d_mapped_boxes);
+      level_a.d_global_mapped_boxes.swap(level_b.d_global_mapped_boxes);
+   }
+}
+
+void MappedBoxLevel::computeLocalRedundantData()
+{
+   d_local_number_of_mapped_boxes = 0;
+   d_local_number_of_cells = 0;
+   d_local_bounding_box.setEmpty();
+   d_local_min_box_size = IntVector(d_ratio.getDim(),tbox::MathUtilities<int>::getMax());
+   d_local_max_box_size = IntVector::getZero(d_ratio.getDim());
+   for (RealMappedBoxConstIterator ni(d_mapped_boxes); ni.isValid(); ++ni) {
+      const IntVector boxdim(ni->getBox().numberCells());
+      ++d_local_number_of_mapped_boxes;
+      d_local_number_of_cells += boxdim.getProduct();
+      d_local_bounding_box += ni->getBox();
+      d_local_min_box_size.min(boxdim);
+      d_local_max_box_size.max(boxdim);
+   }
+   d_local_bounding_box_up_to_date = true;
+   d_global_data_up_to_date = false;
+}
+
+/*
+****************************************************************************
+Perform global reductions to get characteristics of the global data
+without globalizing.  Data that can be reduced are combined into
+arrays for reduction.  We do one sum reduction and one max reduction.
+All the data we need fall into one or the other so it's all we need to
+do.
+****************************************************************************
+*/
+void MappedBoxLevel::cacheGlobalReducedData() const
+{
+   TBOX_ASSERT(isInitialized());
+
+   if (d_global_data_up_to_date) {
+      return;
+   }
+
+   /*
+    * Sum reduction is used to compute the global sums of box count
+    * and cell count.
+    */
+   if (d_parallel_state == GLOBALIZED) {
+      d_global_number_of_mapped_boxes = 0;
+      d_global_number_of_cells = 0;
+      for (RealMappedBoxConstIterator ni(d_global_mapped_boxes);
+           ni.isValid();
+           ++ni) {
+         ++d_global_number_of_mapped_boxes;
+         d_global_number_of_cells += ni->getBox().size();
+      }
+   } else {
+      if (d_mpi.getSize() > 1) {
+         int tmpa[2], tmpb[2];
+         tmpa[0] = getLocalNumberOfBoxes();
+         tmpa[1] = getLocalNumberOfCells();
+
+         TBOX_ASSERT(tmpa[0] >= 0);
+         TBOX_ASSERT(tmpa[1] >= 0);
+
+         d_mpi.Allreduce(tmpa,
+            tmpb,                        // Better to use MPI_IN_PLACE, but not some MPI's do not support.
+            2,
+            MPI_INT,
+            MPI_SUM);
+         d_global_number_of_mapped_boxes = tmpb[0];
+         d_global_number_of_cells = tmpb[1];
+      } else {
+         d_global_number_of_mapped_boxes = getLocalNumberOfBoxes();
+         d_global_number_of_cells = getLocalNumberOfCells();
+      }
+
+      TBOX_ASSERT(d_global_number_of_mapped_boxes >= 0);
+      TBOX_ASSERT(d_global_number_of_cells >= 0);
+   }
+
+   /*
+    * Max reduction is used to compute max/min box counts, max/min
+    * cell counts, max/min box sizes, and bounding boxes.
+    */
+   getLocalBoundingBox();
+   if (d_nproc == 1) {
+      d_global_bounding_box = d_local_bounding_box;
+      d_max_number_of_mapped_boxes = d_min_number_of_mapped_boxes = getLocalNumberOfBoxes();
+      d_max_number_of_cells = d_min_number_of_cells = getLocalNumberOfCells();
+      d_global_max_box_size = d_local_max_box_size;
+      d_global_min_box_size = d_local_min_box_size;
+   } else {
+      if (d_mpi.getSize() > 1) {
+         const tbox::Dimension& dim(getDim());
+         std::vector<int> send_mesg(4 * dim.getValue());
+         std::vector<int> recv_mesg(4 * dim.getValue() + 4);
+         for (int i = 0; i < dim.getValue(); ++i) {
+            send_mesg[i] = -d_local_bounding_box.lower()[i];
+            send_mesg[i + dim.getValue()] = d_local_bounding_box.upper()[i];
+            send_mesg[i + 2*dim.getValue()] = -d_local_min_box_size[i];
+            send_mesg[i + 3*dim.getValue()] =  d_local_max_box_size[i];
+         }
+         send_mesg.push_back(getLocalNumberOfBoxes());
+         send_mesg.push_back(-static_cast<int>(getLocalNumberOfBoxes()));
+         send_mesg.push_back(getLocalNumberOfCells());
+         send_mesg.push_back(-static_cast<int>(getLocalNumberOfCells()));
+         d_mpi.Allreduce(
+            &send_mesg[0],
+            &recv_mesg[0],
+            static_cast<int>(send_mesg.size()),
+            MPI_INT,
+            MPI_MAX);
+         for (int i = 0; i < dim.getValue(); ++i) {
+            d_global_bounding_box.lower()[i] = -recv_mesg[i];
+            d_global_bounding_box.upper()[i] = recv_mesg[i + dim.getValue()];
+            d_global_min_box_size[i] = -recv_mesg[i + 2*dim.getValue()];
+            d_global_max_box_size[i] =  recv_mesg[i + 3*dim.getValue()];
+         }
+         d_max_number_of_mapped_boxes = recv_mesg[4 * dim.getValue() + 0];
+         d_min_number_of_mapped_boxes = -recv_mesg[4 * dim.getValue() + 1];
+         d_max_number_of_cells = recv_mesg[4 * dim.getValue() + 2];
+         d_min_number_of_cells = -recv_mesg[4 * dim.getValue() + 3];
+      } else {
+         d_global_bounding_box = d_local_bounding_box;
+      }
+   }
+
+   d_global_data_up_to_date = true;
+}
+
+int MappedBoxLevel::getGlobalNumberOfBoxes() const
+{
+   TBOX_ASSERT(isInitialized());
+
+   cacheGlobalReducedData();
+   return d_global_number_of_mapped_boxes;
+}
+
+int MappedBoxLevel::getMaxNumberOfBoxes() const
+{
+   TBOX_ASSERT(isInitialized());
+
+   cacheGlobalReducedData();
+   return d_max_number_of_mapped_boxes;
+}
+
+int MappedBoxLevel::getMinNumberOfBoxes() const
+{
+   TBOX_ASSERT(isInitialized());
+
+   cacheGlobalReducedData();
+   return d_min_number_of_mapped_boxes;
+}
+
+int MappedBoxLevel::getGlobalNumberOfCells() const
+{
+   TBOX_ASSERT(isInitialized());
+
+   cacheGlobalReducedData();
+   return d_global_number_of_cells;
+}
+
+int MappedBoxLevel::getMaxNumberOfCells() const
+{
+   TBOX_ASSERT(isInitialized());
+
+   cacheGlobalReducedData();
+   return d_max_number_of_cells;
+}
+
+int MappedBoxLevel::getMinNumberOfCells() const
+{
+   TBOX_ASSERT(isInitialized());
+
+   cacheGlobalReducedData();
+   return d_min_number_of_cells;
+}
+
+const Box& MappedBoxLevel::getGlobalBoundingBox() const
+{
+   cacheGlobalReducedData();
+   return d_global_bounding_box;
+}
+
+const Box& MappedBoxLevel::getLocalBoundingBox() const
+{
+   return d_local_bounding_box;
+}
+
+const IntVector& MappedBoxLevel::getLocalMaxBoxSize() const
+{
+   return d_local_max_box_size;
+}
+
+const IntVector& MappedBoxLevel::getGlobalMaxBoxSize() const
+{
+   cacheGlobalReducedData();
+   return d_local_max_box_size;
+}
+
+const IntVector& MappedBoxLevel::getLocalMinBoxSize() const
+{
+   return d_local_min_box_size;
+}
+
+const IntVector& MappedBoxLevel::getGlobalMinBoxSize() const
+{
+   cacheGlobalReducedData();
+   return d_local_min_box_size;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void MappedBoxLevel::setParallelState(
+   const ParallelState parallel_state)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (!isInitialized()) {
+      TBOX_ERROR(
+         "MappedBoxLevel::setParallelState: Cannot change the parallel state of\n"
+         <<
+         "an uninitialized MappedBoxLevel.  See MappedBoxLevel::initialize()");
+   }
+#endif
+   if (parallel_state != DISTRIBUTED && parallel_state != GLOBALIZED) {
+      TBOX_ERROR(
+         "MappedBoxLevel::setParallelState: Invalid distribution state: "
+         << parallel_state << "\n");
+   }
+
+   if (d_parallel_state == DISTRIBUTED && parallel_state == GLOBALIZED) {
+      acquireRemoteMappedBoxes();
+   } else if (d_parallel_state == GLOBALIZED && parallel_state ==
+              DISTRIBUTED) {
+      d_global_mapped_boxes.clear();
+   }
+   d_parallel_state = parallel_state;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void MappedBoxLevel::acquireRemoteMappedBoxes()
+{
+   MappedBoxLevel* object = this;
+   acquireRemoteMappedBoxes(1, &object);
+}
+
+/*
+ ***********************************************************************
+ * Acquire remote mapped_boxes for multiple mapped_box_level mapped_box
+ * sets.  This method combines communication for the multiple
+ * mapped_box_levels to increase message passing efficiency.
+ *
+ * Note: This method is stateless (could be static).
+ ***********************************************************************
+ */
+
+void MappedBoxLevel::acquireRemoteMappedBoxes(
+   const int num_sets,
+   MappedBoxLevel* multiple_mapped_box_levels[])
+{
+   if (d_mpi.getSize() == 1) {
+      // In single-proc mode, we already have all the MappedBoxes already.
+      for (int n = 0; n < num_sets; ++n) {
+         multiple_mapped_box_levels[n]->d_global_mapped_boxes =
+            multiple_mapped_box_levels[n]->d_mapped_boxes;
+      }
+      return;
+   }
+
+   t_acquire_remote_mapped_boxes->start();
+   int n;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   for (n = 0; n < num_sets; ++n) {
+      if (multiple_mapped_box_levels[n]->getParallelState() !=
+          DISTRIBUTED) {
+         TBOX_ERROR("MappedBoxLevel objects must be in distributed mode\n"
+            << "when acquiring remote mapped_boxes.\n");
+      }
+   }
+#endif
+
+   std::vector<int> send_mesg;
+   std::vector<int> recv_mesg;
+   /*
+    * Pack mapped_boxes from all mapped_box_level mapped_box sets into a single message.
+    * Note that each mapped_box_level mapped_box set object packs the size of its
+    * sub-message into send_mesg.
+    */
+   for (n = 0; n < num_sets; ++n) {
+      const MappedBoxLevel& mapped_box_level =
+         *multiple_mapped_box_levels[n];
+      mapped_box_level.acquireRemoteMappedBoxes_pack(send_mesg);
+   }
+   int send_mesg_size = static_cast<int>(send_mesg.size());
+
+   /*
+    * Send and receive the data.
+    */
+
+   std::vector<int> recv_mesg_size(d_nproc);
+   d_mpi.Allgather(&send_mesg_size,
+      1,
+      MPI_INT,
+      &recv_mesg_size[0],
+      1,
+      MPI_INT);
+
+   std::vector<int> proc_offset(d_nproc);
+   int totl_size = 0;
+   for (n = 0; n < d_nproc; ++n) {
+      proc_offset[n] = totl_size;
+      totl_size += recv_mesg_size[n];
+   }
+   recv_mesg.resize(totl_size, BAD_INT);
+   d_mpi.Allgatherv(&send_mesg[0],
+      send_mesg_size,
+      MPI_INT,
+      &recv_mesg[0],
+      &recv_mesg_size[0],
+      &proc_offset[0],
+      MPI_INT);
+
+   /*
+    * Extract mapped_box info received from other processors.
+    */
+   for (n = 0; n < num_sets; ++n) {
+      MappedBoxLevel& mapped_box_level =
+         *multiple_mapped_box_levels[n];
+      mapped_box_level.acquireRemoteMappedBoxes_unpack(recv_mesg,
+         proc_offset);
+   }
+
+   t_acquire_remote_mapped_boxes->stop();
+
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void MappedBoxLevel::acquireRemoteMappedBoxes_pack(
+   std::vector<int>& send_mesg) const
+{
+   const tbox::Dimension& dim(getDim());
+   /*
+    * MappedBox acquisition is done during globalization.  Thus, do not
+    * rely on current value of d_parallel_state.
+    */
+
+   /*
+    * Pack mapped_box info from d_mapped_boxes into send_mesg,
+    * starting at the offset location.
+    */
+   /*
+    * Information to be packed:
+    *   - Number of MappedBoxes from self
+    *   - Self MappedBoxes
+    */
+   const int mapped_box_com_buf_size = MappedBox::commBufferSize(dim);
+   const int send_mesg_size = 1 + mapped_box_com_buf_size
+      * static_cast<int>(d_mapped_boxes.size());
+   const int old_size = static_cast<int>(send_mesg.size());
+   send_mesg.resize(old_size + send_mesg_size, BAD_INT);
+
+   int* ptr = &send_mesg[0] + old_size;
+   *(ptr++) = static_cast<int>(d_mapped_boxes.size());
+
+   MappedBoxSet::const_iterator i_mapped_boxes;
+   for (i_mapped_boxes = d_mapped_boxes.begin();
+        i_mapped_boxes != d_mapped_boxes.end();
+        ++i_mapped_boxes) {
+      (*i_mapped_boxes).putToIntBuffer(ptr);
+      ptr += mapped_box_com_buf_size;
+   }
+
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void MappedBoxLevel::acquireRemoteMappedBoxes_unpack(
+   const std::vector<int>& recv_mesg,
+   std::vector<int>& proc_offset)
+{
+   const tbox::Dimension& dim(getDim());
+   /*
+    * Unpack mapped_box info from recv_mesg into d_global_mapped_boxes,
+    * starting at the offset location.
+    * Advance the proc_offset past the used data.
+    */
+   int n;
+   int mapped_box_com_buf_size = MappedBox::commBufferSize(dim);
+
+   for (n = 0; n < d_nproc; ++n) {
+      if (n != d_rank) {
+
+         const int* ptr = &recv_mesg[0] + proc_offset[n];
+         const int n_self_mapped_boxes = *(ptr++);
+         proc_offset[d_rank] += (n_self_mapped_boxes) * mapped_box_com_buf_size;
+
+         int i;
+         MappedBox mapped_box(dim);
+
+         for (i = 0; i < n_self_mapped_boxes; ++i) {
+            mapped_box.getFromIntBuffer(ptr);
+            d_global_mapped_boxes.insert(
+               d_global_mapped_boxes.end(), mapped_box);
+            ptr += mapped_box_com_buf_size;
+         }
+
+      } else {
+         d_global_mapped_boxes.insert(
+            d_mapped_boxes.begin(), d_mapped_boxes.end());
+      }
+   }
+
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+MappedBoxSet::iterator MappedBoxLevel::addBox(
+   const Box& box,
+   const bool use_vacant_index)
+{
+   const tbox::Dimension& dim(getDim());
+   /*
+    * FIXME: bug: if some procs add a mapped_box and others do not,
+    * their d_computed_global_* flags will be inconsistent
+    * resulting in incomplete participation in future communication
+    * calls to compute those parameters.
+    *
+    * This problem is not exclusive to box adding.
+    * It would also happen if some call initialize()
+    * and others do not.  But because box adding is finer grained
+    * than initialize(), it is more likely that some processors
+    * will skip over the box adding.
+    */
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_parallel_state != DISTRIBUTED) {
+      TBOX_ERROR("Individually adding MappedBoxes is a local process\n"
+         << "so it can only be performed in\n"
+         << "distributed state.");
+   }
+#endif
+
+   clearForBoxChanges(false);
+
+   MappedBoxSet::iterator new_iterator;
+
+   if (d_mapped_boxes.size() == 0) {
+      MappedBox new_mapped_box =
+         MappedBox(box,
+                   LocalId::getZero(),
+            d_rank,
+            PeriodicShiftCatalog::getCatalog(dim)->getZeroShiftNumber());
+      new_iterator = d_mapped_boxes.insert(d_mapped_boxes.end(), new_mapped_box);
+   } else {
+      // Set new_index to one more than the largest index used.
+      MappedBoxSet::iterator ni = d_mapped_boxes.end();
+      do {
+         TBOX_ASSERT(ni != d_mapped_boxes.begin());   // There should not be all periodic images.
+         --ni;
+      } while (ni->isPeriodicImage());
+      LocalId new_index = ni->getLocalId() + 1;
+      if (use_vacant_index) {
+         TBOX_ASSERT(new_index >= 0);
+
+         if (new_index.getValue() !=
+             static_cast<int>(d_local_number_of_mapped_boxes)) {
+            /*
+             * There is a smaller unused index we can use for the new index.
+             */
+            for (new_index = 0, ni = d_mapped_boxes.begin();
+                 ni != d_mapped_boxes.end();
+                 ++ni) {
+               if (new_index != (*ni).getLocalId()) {
+                  break;
+               }
+               if (!ni->isPeriodicImage()) {
+                  ++new_index;
+               }
+            }
+            // We should have found an unused index.
+            TBOX_ASSERT(ni != d_mapped_boxes.end());
+         }
+      }
+
+      const MappedBox new_mapped_box = MappedBox(box, new_index, d_rank);
+      new_iterator = d_mapped_boxes.insert(ni, new_mapped_box);
+   }
+
+   const IntVector box_size(box.numberCells());
+   ++d_local_number_of_mapped_boxes;
+   d_local_number_of_cells += box.size();
+   d_local_bounding_box += box;
+   d_local_max_box_size.max(box_size);
+   d_local_min_box_size.min(box_size);
+   d_global_data_up_to_date = false;
+
+   return new_iterator;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void
+MappedBoxLevel::addPeriodicMappedBox(
+   const MappedBox& ref_mapped_box,
+   int shift_number)
+{
+   // FIXME: We don't allow individually adding remote MappedBoxes even in globalized state.  We probably shouldn't allow adding remote images either.
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (shift_number ==
+       PeriodicShiftCatalog::getCatalog(getDim())->getZeroShiftNumber()) {
+      TBOX_ERROR(
+         "MappedBoxLevel::addPeriodicMappedBox cannot be used to add regular mapped_box.");
+   }
+   if (d_parallel_state != GLOBALIZED && ref_mapped_box.getOwnerRank() !=
+       d_rank) {
+      TBOX_ERROR(
+         "MappedBoxLevel::addPeriodicMappedBox: Cannot add remote MappedBox\n"
+         << "(owned by rank " << ref_mapped_box.getOwnerRank() << ")\n"
+         << "when not in GLOBALIZED state.");
+   }
+#endif
+
+   clearForBoxChanges(false);
+
+   MappedBox image_mapped_box(ref_mapped_box, shift_number, d_ratio);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   MappedBoxSet& mapped_boxes =
+      d_parallel_state == DISTRIBUTED ? d_mapped_boxes : d_global_mapped_boxes;
+   /*
+    * Sanity checks:
+    *
+    * - Require that the real version of the reference mapped_box exists
+    *   before adding the periodic image mapped_box.
+    */
+   MappedBox real_mapped_box(getDim(),
+                             ref_mapped_box.getLocalId(),
+                             ref_mapped_box.getOwnerRank(),
+                             PeriodicShiftCatalog::getCatalog(
+                                getDim())->getZeroShiftNumber());
+   if (mapped_boxes.find(real_mapped_box) == mapped_boxes.end()) {
+      TBOX_ERROR(
+         "MappedBoxLevel::addPeriodicMappedBox: cannot add periodic image MappedBox "
+         << image_mapped_box
+         <<
+         "\nwithout the real MappedBox (" << real_mapped_box
+         <<
+         ") already in the MappedBoxLevel.\n");
+   }
+#endif
+
+   if (d_parallel_state == GLOBALIZED) {
+      d_global_mapped_boxes.insert(image_mapped_box);
+   }
+   if (image_mapped_box.getOwnerRank() == d_rank) {
+      d_mapped_boxes.insert(image_mapped_box).first;
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void
+MappedBoxLevel::addMappedBox(
+   const MappedBox& mapped_box)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_parallel_state != GLOBALIZED && mapped_box.getOwnerRank() != d_rank) {
+      TBOX_ERROR("MappedBoxLevel::addMappedBox: Cannot add remote mapped_box\n"
+         << "(owned by rank " << mapped_box.getOwnerRank() << ")\n"
+         << "when not in GLOBALIZED state.");
+   }
+#endif
+
+   clearForBoxChanges(false);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   /*
+    * Sanity checks:
+    * - Require that the real mapped_box exists before adding the periodic image mapped_box.
+    */
+   if (mapped_box.isPeriodicImage()) {
+      MappedBox real_mapped_box(getDim(),
+                                mapped_box.getLocalId(),
+                                mapped_box.getOwnerRank(),
+                                PeriodicShiftCatalog::getCatalog(
+                                   getDim())->getZeroShiftNumber());
+      MappedBoxSet& mapped_boxes = mapped_box.getOwnerRank() ==
+         d_rank ? d_mapped_boxes : d_global_mapped_boxes;
+      if (mapped_boxes.find(real_mapped_box) == mapped_boxes.end()) {
+         TBOX_ERROR(
+            "MappedBoxLevel::addMappedBox: cannot add periodic image mapped_box "
+            << mapped_box
+            <<
+            "\nwithout the real mapped_box (" << real_mapped_box
+            <<
+            ") already in the mapped_box_level.\n");
+      }
+      if (d_global_mapped_boxes.find(mapped_box) !=
+          d_global_mapped_boxes.end()) {
+         TBOX_ERROR(
+            "MappedBoxLevel::addMappedBox: cannot add mapped_box "
+            << mapped_box
+            <<
+            "\nbecause mapped_box already exists ("
+            << *mapped_boxes.find(mapped_box) << "\n");
+      }
+   }
+#endif
+
+   // Update counters.
+   if (!mapped_box.isPeriodicImage()) {
+      if (mapped_box.getOwnerRank() == d_rank) {
+         const IntVector box_size(mapped_box.getBox().numberCells());
+         ++d_local_number_of_mapped_boxes;
+         d_local_number_of_cells += mapped_box.getBox().size();
+         d_local_bounding_box += mapped_box.getBox();
+         d_local_max_box_size.max(box_size);
+         d_local_min_box_size.min(box_size);
+      }
+      d_global_data_up_to_date = false;
+      /*
+       * FIXME: bug: if some procs add a real mapped_box and others do not,
+       * their d_global_data_up_to_date flags will be inconsistent
+       * resulting in incomplete participation in future collective
+       * communication to compute that parameter.
+       */
+   }
+
+   if (d_parallel_state == GLOBALIZED) {
+      d_global_mapped_boxes.insert(mapped_box);
+   }
+   if (mapped_box.getOwnerRank() == d_rank) {
+      d_mapped_boxes.insert(mapped_box).first;
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void
+MappedBoxLevel::eraseMappedBox(
+   MappedBoxSet::iterator& ibox)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_parallel_state != DISTRIBUTED) {
+      TBOX_ERROR("Individually erasing mapped_boxes is a local process\n"
+         << "so it can only be performed in\n"
+         << "distributed state.");
+   }
+#endif
+
+   clearForBoxChanges();
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (ibox != d_mapped_boxes.find(*ibox)) {
+      TBOX_ERROR("MappedBoxLevel::eraseMappedBox: Attempt to erase a\n"
+         << "MappedBox that does not belong to the MappedBoxLevel\n"
+         << "object.\n");
+   }
+#endif
+
+   if (ibox->isPeriodicImage()) {
+      d_mapped_boxes.erase(ibox++);
+      // No need to update counters (they neglect periodic images).
+   } else {
+      /*
+       * Update counters.  Bounding box cannot be updated (without
+       * recomputing) because we don't know how the erased MappedBox
+       * affects the bounding box.
+       */
+      d_local_bounding_box_up_to_date = d_global_data_up_to_date = false;
+      --d_local_number_of_mapped_boxes;
+      d_local_number_of_cells -= ibox->getBox().size();
+      // Erase real mapped_box and its periodic images.
+      const LocalId &local_id = ibox->getLocalId();
+      do {
+         d_mapped_boxes.erase(ibox++);
+      } while (ibox != d_mapped_boxes.end() && ibox->getLocalId() ==
+               local_id);
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void
+MappedBoxLevel::eraseMappedBox(
+   const MappedBox& mapped_box)
+{
+   /*
+    * FIXME: bug: if some procs erase some MappedBoxes and others do
+    * not, their d_computed_global_* flags will be inconsistent
+    * resulting in incomplete participation in future communication
+    * calls to compute those parameters.
+    *
+    * This problem is not exclusive to box adding/erasing.  It would
+    * also happen if some call initialize() and others do not.  But
+    * because box adding is finer grained than initialize(), it is
+    * more likely that some processors will skip over the box adding.
+    */
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_parallel_state != DISTRIBUTED) {
+      TBOX_ERROR("Individually erasing MappedBoxes is a local process\n"
+         << "so it can only be performed in\n"
+         << "distributed state.");
+   }
+#endif
+
+   clearForBoxChanges();
+
+   d_local_bounding_box_up_to_date = d_global_data_up_to_date = false;
+
+   MappedBoxSet::iterator ibox = d_mapped_boxes.find(mapped_box);
+   if (ibox == d_mapped_boxes.end()) {
+      TBOX_ERROR("MappedBoxLevel::eraseMappedBox: MappedBox to be erased ("
+         << mapped_box << ") is NOT a part of the MappedBoxLevel.\n");
+   }
+   d_mapped_boxes.erase(ibox);
+}
+
+/*
+****************************************************************************
+****************************************************************************
+*/
+const MappedBoxLevel &MappedBoxLevel::getGlobalizedVersion() const
+{
+   TBOX_ASSERT(isInitialized());
+
+   if ( d_parallel_state == GLOBALIZED ) {
+      return *this;
+   }
+
+   if ( d_globalized_version == NULL ) {
+      MappedBoxLevel *globalized_version = new MappedBoxLevel(*this);
+      globalized_version->setParallelState(GLOBALIZED);
+      TBOX_ASSERT( globalized_version->getParallelState() == GLOBALIZED );
+      d_globalized_version = globalized_version;
+      globalized_version = NULL;
+   }
+
+   TBOX_ASSERT( d_globalized_version->getParallelState() == GLOBALIZED );
+   return *d_globalized_version;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+PersistentOverlapConnectors& MappedBoxLevel::getPersistentOverlapConnectors()
+const
+{
+   if (d_persistent_overlap_connectors == NULL) {
+      d_persistent_overlap_connectors = new PersistentOverlapConnectors(*this);
+   }
+   return *d_persistent_overlap_connectors;
+}
+
+/*
+ ***********************************************************************
+ * Write the MappedBoxLevel to a database.
+ *
+ * Write only local parts.
+ ***********************************************************************
+ */
+
+void MappedBoxLevel::putToDatabase(
+   tbox::Database& database) const
+{
+   database.putBool("d_is_mapped_box_level", true);
+   database.putInteger(
+      "HIER_MAPPED_BOX_LEVEL_VERSION", HIER_MAPPED_BOX_LEVEL_VERSION);
+   database.putInteger("d_nproc", d_nproc);
+   database.putInteger("d_rank", d_rank);
+   database.putInteger("dim", d_ratio.getDim().getValue());
+   database.putIntegerArray("d_ratio", &d_ratio[0], d_ratio.getDim().getValue());
+   getMappedBoxes().putToDatabase(*database.putDatabase("mapped_boxes"));
+}
+
+/*
+ ***********************************************************************
+ * Read the MappedBoxLevel from a database.
+ ***********************************************************************
+ */
+
+void MappedBoxLevel::getFromDatabase(
+   tbox::Database& database)
+{
+   TBOX_ASSERT(database.isInteger("dim"));
+   const tbox::Dimension dim(static_cast<unsigned short>(database.getInteger("dim")));
+   TBOX_ASSERT(getDim() == dim);
+
+   IntVector ratio(dim);
+   database.getIntegerArray("d_ratio", &ratio[0], dim.getValue());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   const int version = database.getInteger("HIER_MAPPED_BOX_LEVEL_VERSION");
+   const int nproc = database.getInteger("d_nproc");
+   const int rank = database.getInteger("d_rank");
+   TBOX_ASSERT(ratio >= IntVector::getOne(dim));
+   TBOX_ASSERT(version <= HIER_MAPPED_BOX_LEVEL_VERSION);
+#endif
+
+   /*
+    * If the communicator is already set, use it.  Otherwise, use the
+    * one in tbox::SAMRAI_MPI::getSAMRAIWorld().
+    *
+    * There must be a better way to handle the communicator than this.
+    */
+   if (isInitialized()) {
+      TBOX_ASSERT(ratio == d_ratio);
+      if (d_parallel_state != DISTRIBUTED) {
+         setParallelState(DISTRIBUTED);
+         d_mapped_boxes.clear();
+      }
+   } else {
+      TBOX_WARNING(
+         "MappedBoxLevel::getFromDatabase: Uninitialized MPI communicator.\n"
+         << "Using tbox::SAMRAI_MPI::getSAMRAIWorld().");
+      initialize(ratio, tbox::SAMRAI_MPI::getSAMRAIWorld(), DISTRIBUTED);
+   }
+
+   /*
+    * Failing these asserts means that we don't have a compatible
+    * database for the number of processors or we are reading another
+    * processor's data.
+    */
+   TBOX_ASSERT(nproc == d_nproc);
+   TBOX_ASSERT(rank == d_rank);
+
+   d_mapped_boxes.getFromDatabase(*database.getDatabase("mapped_boxes"));
+   computeLocalRedundantData();
+
+}
+
+
+/*
+ ***********************************************************************
+ * Construct a MappedBoxLevel Outputter with formatting parameters.
+ ***********************************************************************
+ */
+
+MappedBoxLevel::Outputter::Outputter(
+   const MappedBoxLevel &mapped_box_level,
+   const std::string& border,
+   int detail_depth )
+   : d_level(mapped_box_level),
+     d_border(border),
+     d_detail_depth(detail_depth)
+{
+   return;
+}
+
+
+/*
+ ***********************************************************************
+ * Print out a MappedBoxLevel according to settings in the Outputter.
+ ***********************************************************************
+ */
+
+std::ostream& operator << (
+   std::ostream& s,
+   const MappedBoxLevel::Outputter& format)
+{
+   format.d_level.recursivePrint( s, format.d_border, format.d_detail_depth );
+   return s;
+}
+
+
+/*
+ ***********************************************************************
+ * Return a Outputter that can dump the MappedBoxLevel to a stream.
+ ***********************************************************************
+ */
+
+MappedBoxLevel::Outputter MappedBoxLevel::format(
+   const std::string& border,
+   int detail_depth ) const
+{
+   return Outputter( *this, border, detail_depth);
+}
+
+
+/*
+ ***********************************************************************
+ * Avoid communication in this method.  It is often used for debugging.
+ * Print out global bounding box only if it has been computed already.
+ ***********************************************************************
+ */
+
+void MappedBoxLevel::recursivePrint(
+   std::ostream& co,
+   const std::string& border,
+   int detail_depth) const
+{
+   if (detail_depth < 0) return;
+
+   if (!isInitialized()) {
+      co << border << "Uninitialized.\n";
+      return;
+   }
+   co // << "Address        : " << (void*)this << '\n'
+   << border << "Parallel state : "
+   << (getParallelState() == DISTRIBUTED ? "DIST" : "GLOB") << '\n'
+   << border << "Ratio          : " << getRefinementRatio() << '\n'
+   << border << "Box count      : " << d_local_number_of_mapped_boxes << ", "
+   << d_global_number_of_mapped_boxes << '\n'
+   << border << "Cell count     : " << d_local_number_of_cells << ", "
+   << d_global_number_of_cells << '\n'
+   << border << "Bounding box   : " << getLocalBoundingBox() << ", "
+   << (d_global_data_up_to_date ? getGlobalBoundingBox() : Box(getDim()))
+   << '\n'
+   << border << "Comm,rank,nproc: " << d_mpi.getCommunicator() << ", " << d_rank
+   << ", " << d_nproc << '\n'
+   ;
+   if (detail_depth > 0) {
+      MappedBoxSet::const_iterator i_mapped_box;
+      co << border << "Mapped_boxes:\n";
+      if (getParallelState() == GLOBALIZED) {
+         /*
+          * Print mapped_boxes from all ranks.
+          */
+         for (MappedBoxSet::const_iterator bi = d_global_mapped_boxes.begin();
+              bi != d_global_mapped_boxes.end();
+              ++bi) {
+            MappedBox mapped_box = *bi;
+            co << border << "    "
+               << mapped_box << "   "
+               << mapped_box.getBox().numberCells() << '\n';
+         }
+      } else {
+         /*
+          * Print local mapped_boxes only.
+          */
+         for (MappedBoxSet::const_iterator bi = d_mapped_boxes.begin();
+              bi != d_mapped_boxes.end();
+              ++bi) {
+            MappedBox mapped_box = *bi;
+            co << border << "    "
+               << mapped_box << "   "
+               << mapped_box.getBox().numberCells() << '\n';
+         }
+      }
+   }
+}
+
+/*
+ ***********************************************************************
+ * Write out some statistics on the mapped_boxes, including statistics
+ * for judging mesh quality.
+ ***********************************************************************
+ */
+
+void MappedBoxLevel::printMappedBoxStats(
+   std::ostream& co,
+   const std::string& border) const
+{
+   if (!isInitialized()) {
+      co << "Uninitialized.\n";
+      return;
+   }
+
+   const tbox::Dimension& dim(getDim());
+
+   cacheGlobalReducedData();
+
+   double ideal_surfarea =
+      pow((double)getGlobalNumberOfCells() / d_nproc, double(dim.getValue() - 1) / dim.getValue());
+
+   // Per-processor statistics.
+   double has_mapped_box = (double)(getLocalNumberOfBoxes() > 0);
+   double mapped_number_of_boxes = (double)(getLocalNumberOfBoxes());
+   double largest_dim = 0;
+   double smallest_dim = (double)(getLocalNumberOfBoxes() == 0 ? 0 : 9999999);
+   double largest_aspect = 0;
+   double smallest_aspect = 1.;
+   double sum_aspect = 0.;
+   double sum_surfarea = 0.;
+   double sum_normsurfarea = 0.;
+
+   const MappedBoxSet& mapped_boxes = getMappedBoxes();
+
+   for (RealMappedBoxConstIterator ni(mapped_boxes); ni.isValid(); ++ni) {
+
+      const MappedBox& mapped_box = *ni;
+      const IntVector boxdims = mapped_box.getBox().numberCells();
+      const double boxvol = boxdims.getProduct();
+      const double longdim = boxdims.max();
+      const double shortdim = boxdims.min();
+      const double aspect = (double)longdim / shortdim;
+      double surfarea = 0.;
+      for (int d = 0; d < dim.getValue(); ++d) {
+         surfarea += 2 * (double)boxvol / boxdims(d);
+      }
+
+      largest_dim = tbox::MathUtilities<double>::Max(largest_dim, longdim);
+      smallest_dim = tbox::MathUtilities<double>::Min(smallest_dim, shortdim);
+
+      largest_aspect = tbox::MathUtilities<double>::Max(largest_aspect, aspect);
+      smallest_aspect = tbox::MathUtilities<double>::Min(smallest_aspect,
+            aspect);
+      sum_aspect += aspect;
+
+      sum_surfarea += surfarea;
+
+   }
+
+   sum_normsurfarea = sum_surfarea / ideal_surfarea;
+
+   /*
+    * Collect local statistics into arrays for global reduction.
+    */
+#define MappedBoxLevel_NumberOfStats 20
+   {
+      // For floating point data.
+      double loc_dbl[MappedBoxLevel_NumberOfStats];
+      double min_dbl[MappedBoxLevel_NumberOfStats];
+      double max_dbl[MappedBoxLevel_NumberOfStats];
+      double sum_dbl[MappedBoxLevel_NumberOfStats];
+      std::string names[MappedBoxLevel_NumberOfStats];
+      int k = 0;
+      names[k] = "mapped_number_of_boxes (N)";
+      loc_dbl[k++] = mapped_number_of_boxes;
+      names[k] = "has_mapped_box";
+      loc_dbl[k++] = has_mapped_box;
+      names[k] = "smallest_aspect";
+      loc_dbl[k++] = smallest_aspect;
+      names[k] = "largest_aspect";
+      loc_dbl[k++] = largest_aspect;
+      names[k] = "sum_aspect";
+      loc_dbl[k++] = sum_aspect;
+      names[k] = "sum_normsurfarea";
+      loc_dbl[k++] = sum_normsurfarea;
+      names[k] = "sum_surfarea";
+      loc_dbl[k++] = sum_surfarea;
+      names[k] = "smallest_dim";
+      loc_dbl[k++] = smallest_dim;
+      names[k] = "largest_dim";
+      loc_dbl[k++] = largest_dim;
+      TBOX_ASSERT(k < MappedBoxLevel_NumberOfStats);
+      for (int i = 0; i < k; ++i) max_dbl[i] = sum_dbl[i] = min_dbl[i] =
+                  loc_dbl[i];
+      int rank_of_min[MappedBoxLevel_NumberOfStats],
+          rank_of_max[MappedBoxLevel_NumberOfStats];
+      if (d_nproc > 1) {
+         d_mpi.AllReduce(min_dbl, k, MPI_MINLOC, rank_of_min);
+         d_mpi.AllReduce(max_dbl, k, MPI_MAXLOC, rank_of_max);
+         d_mpi.AllReduce(sum_dbl, k, MPI_SUM);
+      } else {
+         for (int i = 0; i < k; ++i) {
+            rank_of_min[i] = rank_of_max[i] = 0;
+         }
+      }
+
+      co.unsetf(std::ios::fixed | std::ios::scientific);
+      co.precision(3);
+
+      co << border
+         <<
+      "                               local        min               max           sum/N    sum/P\n";
+      for (int i = 0; i < k; ++i) {
+         co << border << std::setw(27) << std::left << names[i]
+         << ' ' << std::setw(8) << std::right << loc_dbl[i]
+         << ' ' << std::setw(8) << std::right << min_dbl[i] << " @ "
+         << std::setw(6) << std::left << rank_of_min[i]
+         << ' ' << std::setw(8) << std::right << max_dbl[i] << " @ "
+         << std::setw(6) << std::left << rank_of_max[i]
+         << ' ' << std::setw(8) << std::right << sum_dbl[i] / getGlobalNumberOfBoxes()
+         << ' ' << std::setw(8) << std::right << sum_dbl[i] / d_nproc
+         << '\n';
+      }
+   }
+
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void MappedBoxLevel::initializeCallback()
+{
+   t_acquire_remote_mapped_boxes = tbox::TimerManager::getManager()->
+      getTimer("MappedBoxLevel::acquireRemoteMappedBoxes()");
+}
+
+/*
+ ***************************************************************************
+ * *                                                                         *
+ * * Release static timers.  To be called by shutdown registry to make sure  *
+ * * memory for timers does not leak.                                        *
+ * *                                                                         *
+ ***************************************************************************
+ */
+
+void MappedBoxLevel::finalizeCallback()
+{
+   t_acquire_remote_mapped_boxes.setNull();
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MappedBoxLevel.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MappedBoxLevel.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,563 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Set of mapped_boxes in a mapped_box_level of a distributed box graph. 
+ *
+ ************************************************************************/
+#include "SAMRAI/hier/RealMappedBoxConstIterator.h"
+#include "SAMRAI/hier/MappedBoxLevelHandle.h"
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Dimension& MappedBoxLevel::getDim() const
+{
+   return d_ratio.getDim();
+}
+
+SAMRAI_INLINE_KEYWORD
+bool MappedBoxLevel::isInitialized() const
+{
+   return d_ratio(0) != 0;
+}
+
+SAMRAI_INLINE_KEYWORD
+MappedBoxLevel::ParallelState
+MappedBoxLevel::getParallelState() const
+{
+   return d_parallel_state;
+}
+
+/*
+ ***********************************************************************
+ * Detach this object from the handle it has been using.
+ *
+ * Postcondition: Object that cached the handle would no longer
+ * be able to access this MappedBoxLevel from the handle.
+ ***********************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+void MappedBoxLevel::detachMyHandle() const
+{
+   if (!d_handle.isNull()) {
+      d_handle->detachMyMappedBoxLevel();
+      d_handle.setNull();
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+const MappedBoxSet& MappedBoxLevel::getMappedBoxes() const
+{
+   return d_mapped_boxes;
+}
+
+SAMRAI_INLINE_KEYWORD
+MappedBoxSet::ConstRange MappedBoxLevel::getMappedBoxes(
+   int rank) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_parallel_state == DISTRIBUTED) {
+      TBOX_ERROR("MappedBoxLevel::getMappedBoxes(rank): Accessing\n"
+         << "mapped_boxes from arbitrary processes is not\n"
+         << "available in DISTRIBUTED mode.");
+   }
+#endif
+   return d_global_mapped_boxes.findRanksRange(rank);
+}
+
+SAMRAI_INLINE_KEYWORD
+const MappedBoxSet& MappedBoxLevel::getGlobalMappedBoxes() const
+{
+   return d_global_mapped_boxes;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool MappedBoxLevel::operator == (
+   const MappedBoxLevel& r) const
+{
+   if (this == &r) return true;
+
+   if (d_ratio != r.d_ratio) return false;
+
+   if (d_mpi != r.d_mpi) return false;
+
+   if (getMappedBoxes() != r.getMappedBoxes()) return false;
+
+   return true;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool MappedBoxLevel::operator != (
+   const MappedBoxLevel& r) const
+{
+   if (this == &r) return false;
+
+   if (d_ratio != r.d_ratio) return true;
+
+   if (d_mpi != r.d_mpi) return true;
+
+   if (getMappedBoxes() != r.getMappedBoxes()) return true;
+
+   return false;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+void MappedBoxLevel::clearPersistentOverlapConnectors()
+{
+   if (d_persistent_overlap_connectors != NULL) {
+      d_persistent_overlap_connectors->clear();
+   }
+}
+
+/*
+****************************************************************************
+****************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+void MappedBoxLevel::deallocateGlobalizedVersion() const
+{
+   if ( d_globalized_version != NULL ) {
+      TBOX_ASSERT( d_globalized_version->getParallelState() == GLOBALIZED );
+      delete d_globalized_version;
+      d_globalized_version = NULL;
+   }
+   return;
+}
+
+/*
+****************************************************************************
+Clear certain data that would become inconsistent when a box changes.
+****************************************************************************
+*/
+SAMRAI_INLINE_KEYWORD
+void MappedBoxLevel::clearForBoxChanges( bool isInvalid )
+{
+   deallocateGlobalizedVersion();
+   clearPersistentOverlapConnectors();
+   if ( isInvalid ) {
+      /*
+       * Box removal can lead on inconsistent Connectors holding on to
+       * handle, so detach the handle.  Box addition does NOT lead to
+       * such inconsistencies, so we can leave the handle alone in
+       * those cases.
+       */
+      detachMyHandle();
+   }
+   return;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+MappedBoxLevel& MappedBoxLevel::operator = (
+   const MappedBoxLevel& rhs)
+{
+   if (&rhs != this) {
+      /*
+       * Protect this block from assignment to self because it is
+       * inefficient and it removes d_mapped_boxes data before resetting it.
+       */
+
+      deallocateGlobalizedVersion();
+      clearPersistentOverlapConnectors();
+      detachMyHandle();
+
+      d_parallel_state = rhs.d_parallel_state;
+      d_mpi = rhs.d_mpi;
+      d_nproc = rhs.d_nproc;
+      d_rank = rhs.d_rank;
+      d_ratio = rhs.d_ratio;
+
+      d_local_number_of_cells = rhs.d_local_number_of_cells;
+      d_local_number_of_mapped_boxes = rhs.d_local_number_of_mapped_boxes;
+      d_global_number_of_cells = rhs.d_global_number_of_cells;
+      d_global_number_of_mapped_boxes = rhs.d_global_number_of_mapped_boxes;
+
+      d_local_max_box_size = rhs.d_local_max_box_size;
+      d_global_max_box_size = rhs.d_global_max_box_size;
+      d_local_min_box_size = rhs.d_local_min_box_size;
+      d_global_min_box_size = rhs.d_global_min_box_size;
+
+      d_local_bounding_box = rhs.d_local_bounding_box;
+      d_local_bounding_box_up_to_date = rhs.d_local_bounding_box_up_to_date;
+      d_global_bounding_box = rhs.d_global_bounding_box;
+      d_global_data_up_to_date = rhs.d_global_data_up_to_date;
+
+      d_mapped_boxes = rhs.d_mapped_boxes;
+      d_global_mapped_boxes = rhs.d_global_mapped_boxes;
+   }
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+LocalId MappedBoxLevel::getFirstLocalId() const
+{
+   TBOX_ASSERT(isInitialized());
+
+   const MappedBoxSet& mapped_boxes = getMappedBoxes();
+   if (mapped_boxes.empty()) {
+      return s_negative_one_local_id;
+   }
+   MappedBoxSet::const_iterator ni = mapped_boxes.begin();
+   while (ni->isPeriodicImage()) {
+      TBOX_ASSERT(ni != mapped_boxes.end());   // There should be a real mapped_box!
+      ++ni;
+   }
+   return ni->getLocalId();
+}
+
+SAMRAI_INLINE_KEYWORD
+LocalId MappedBoxLevel::getLastLocalId() const
+{
+   TBOX_ASSERT(isInitialized());
+
+   const MappedBoxSet& mapped_boxes = getMappedBoxes();
+   if (mapped_boxes.empty()) {
+      return s_negative_one_local_id;
+   }
+   MappedBoxSet::const_reverse_iterator ni = mapped_boxes.rbegin();
+   while (ni->isPeriodicImage()) {
+      TBOX_ASSERT(ni != mapped_boxes.rend());   // There should be a real mapped_box!
+      ++ni;
+   }
+   return ni->getLocalId();
+}
+
+SAMRAI_INLINE_KEYWORD
+const IntVector& MappedBoxLevel::getRefinementRatio() const
+{
+   return d_ratio;
+}
+
+SAMRAI_INLINE_KEYWORD
+size_t MappedBoxLevel::getLocalNumberOfBoxes() const
+{
+   TBOX_ASSERT(isInitialized());
+
+   return d_local_number_of_mapped_boxes;
+}
+
+SAMRAI_INLINE_KEYWORD
+size_t MappedBoxLevel::getLocalNumberOfBoxes(
+   int rank) const
+{
+   TBOX_ASSERT(isInitialized());
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_parallel_state == DISTRIBUTED && rank != d_rank) {
+      TBOX_ERROR(
+         "Non-local mapped_boxes are not available in DISTRIBUTED mode.");
+   }
+   TBOX_ASSERT(rank >= 0 && rank < d_nproc);
+#endif
+
+   if (rank == d_rank) {
+      return d_local_number_of_mapped_boxes;
+   } else {
+      size_t count = 0;
+      MappedBoxSet::ConstRange range = d_global_mapped_boxes.findRanksRange(
+            rank);
+      for (MappedBoxSet::const_iterator bi = range.first;
+           bi != range.second;
+           ++bi) {
+         if (!bi->isPeriodicImage()) {
+            ++count;
+         }
+      }
+      return count;
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+size_t MappedBoxLevel::getLocalNumberOfCells() const
+{
+   TBOX_ASSERT(isInitialized());
+
+   return d_local_number_of_cells;
+}
+
+SAMRAI_INLINE_KEYWORD
+size_t MappedBoxLevel::getLocalNumberOfCells(
+   int rank) const
+{
+   TBOX_ASSERT(isInitialized());
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_parallel_state == DISTRIBUTED && rank != d_rank) {
+      TBOX_ERROR(
+         "Non-local mapped_boxes are not available in DISTRIBUTED mode.");
+   }
+   TBOX_ASSERT(rank >= 0 && rank < d_nproc);
+#endif
+
+   if (rank == d_rank) {
+      return d_local_number_of_cells;
+   } else {
+      size_t count = 0;
+      MappedBoxSet::ConstRange range = d_global_mapped_boxes.findRanksRange(
+            rank);
+      for (MappedBoxSet::const_iterator bi = range.first;
+           bi != range.second;
+           ++bi) {
+         if (!bi->isPeriodicImage()) {
+            count += bi->getBox().size();
+         }
+      }
+      return count;
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+bool MappedBoxLevel::hasMappedBox(
+   const MappedBox& mapped_box) const
+{
+   if (mapped_box.getOwnerRank() == d_rank) {
+      MappedBoxSet::const_iterator ni = d_mapped_boxes.find(mapped_box);
+      return ni != d_mapped_boxes.end();
+   } else {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      if (d_parallel_state == DISTRIBUTED) {
+         TBOX_ERROR("MappedBoxLevel: Cannot check on remote MappedBox "
+            << mapped_box << " while in DISTRIBUTED mode.\n"
+            << "See MappedBoxLevel::setParallelState().");
+      }
+#endif
+      MappedBoxSet::const_iterator ni = d_global_mapped_boxes.find(mapped_box);
+      return ni != d_global_mapped_boxes.end();
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+bool MappedBoxLevel::hasMappedBox(
+   const GlobalId& global_id,
+   const int periodic_shift_number) const
+{
+   const MappedBox mapped_box(
+      getDim(),
+      global_id,
+      periodic_shift_number);
+   return hasMappedBox(mapped_box);
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+bool MappedBoxLevel::hasMappedBox(
+   const MappedBoxId& mapped_box_id) const
+{
+   const MappedBox mapped_box(getDim(), mapped_box_id);
+   return hasMappedBox(mapped_box);
+}
+
+SAMRAI_INLINE_KEYWORD
+const tbox::SAMRAI_MPI& MappedBoxLevel::getMPI() const
+{
+   return d_mpi;
+}
+
+SAMRAI_INLINE_KEYWORD
+int MappedBoxLevel::getRank() const
+{
+   return d_rank;
+}
+
+SAMRAI_INLINE_KEYWORD
+int MappedBoxLevel::getNproc() const
+{
+   return d_nproc;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+MappedBoxSet::const_iterator
+MappedBoxLevel::getMappedBox(
+   const MappedBox& mapped_box) const
+{
+   MappedBoxSet::const_iterator ni;
+   if (mapped_box.getOwnerRank() == d_rank) {
+      ni = d_mapped_boxes.find(mapped_box);
+   } else {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      if (d_parallel_state != GLOBALIZED) {
+         TBOX_ERROR(
+            "MappedBoxLevel::getMappedBox: cannot get remote mapped_box "
+            << mapped_box << " without being in globalized state.");
+      }
+#endif
+      ni = d_global_mapped_boxes.find(mapped_box);
+   }
+   return ni;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+MappedBoxSet::const_iterator
+MappedBoxLevel::getMappedBox(
+   const GlobalId& global_id,
+   const int periodic_shift_number) const
+{
+   const MappedBox mapped_box(getDim(), global_id, periodic_shift_number);
+   MappedBoxSet::const_iterator ni;
+   if (mapped_box.getOwnerRank() == d_rank) {
+      ni = d_mapped_boxes.find(mapped_box);
+   } else {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      if (d_parallel_state != GLOBALIZED) {
+         TBOX_ERROR(
+            "MappedBoxLevel::getMappedBox: cannot get remote mapped_box "
+            << mapped_box << " without being in globalized state.");
+      }
+#endif
+      ni = d_global_mapped_boxes.find(mapped_box);
+   }
+   return ni;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+MappedBoxSet::const_iterator
+MappedBoxLevel::getMappedBoxStrict(
+   const MappedBox& mapped_box) const
+{
+   MappedBoxSet::const_iterator ni;
+   if (mapped_box.getOwnerRank() == d_rank) {
+      ni = d_mapped_boxes.find(mapped_box);
+      if (ni == d_mapped_boxes.end()) {
+         TBOX_ERROR(
+            "MappedBoxSet::getMappedBoxStrict: requested mapped_box "
+            << mapped_box
+            <<
+            " does not exist in the mapped_box_level.");
+      }
+   } else {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      if (d_parallel_state != GLOBALIZED) {
+         TBOX_ERROR(
+            "MappedBoxLevel::getMappedBox: cannot get remote mapped_box "
+            << mapped_box << " without being in globalized state.");
+      }
+#endif
+      ni = d_global_mapped_boxes.find(mapped_box);
+      if (ni == d_global_mapped_boxes.end()) {
+         TBOX_ERROR(
+            "MappedBoxSet::getMappedBoxStrict: requested mapped_box "
+            << mapped_box
+            <<
+            " does not exist in the mapped_box_level.");
+      }
+   }
+   return ni;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+MappedBoxSet::const_iterator
+MappedBoxLevel::getMappedBoxStrict(
+   const GlobalId& global_id,
+   const int periodic_shift_number) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (global_id.getOwnerRank() != d_rank && d_parallel_state != GLOBALIZED) {
+      TBOX_ERROR(
+         "MappedBoxLevel::getMappedBox: cannot get remote mapped_box " << global_id
+         <<
+         " without being in globalized state.");
+   }
+#endif
+   MappedBox mapped_box(getDim(), global_id, periodic_shift_number);
+   MappedBoxSet::const_iterator ni;
+   if (mapped_box.getOwnerRank() == d_rank) {
+      ni = d_mapped_boxes.find(mapped_box);
+      if (ni == d_mapped_boxes.end()) {
+         TBOX_ERROR(
+            "MappedBoxSet::getMappedBoxStrict: requested mapped_box "
+            << mapped_box
+            <<
+            " does not exist in the mapped_box_level.");
+      }
+   } else {
+      ni = d_global_mapped_boxes.find(mapped_box);
+      if (ni == d_global_mapped_boxes.end()) {
+         TBOX_ERROR(
+            "MappedBoxSet::getMappedBoxStrict: requested mapped_box "
+            << mapped_box
+            <<
+            " does not exist in the mapped_box_level.");
+      }
+   }
+   return ni;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+const tbox::Pointer<MappedBoxLevelHandle>& MappedBoxLevel::
+getMappedBoxLevelHandle() const
+{
+   if (d_handle.isNull()) {
+      /*
+       * No handle yet.  Generate one attached to this object.
+       */
+      tbox::Pointer<MappedBoxLevelHandle> ptr(new MappedBoxLevelHandle(this));
+      d_handle = ptr;
+   }
+   if (d_handle->d_mapped_box_level != this) {
+      /*
+       * Sanity check: The handle for this object should be attached
+       * to this object.
+       */
+      TBOX_ERROR("Library error in MappedBoxLevelHandle::getMappedBoxLevel");
+   }
+   return d_handle;
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MappedBoxLevel.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MappedBoxLevel.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1490 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Set of MappedBoxes in the same "level". 
+ *
+ ************************************************************************/
+#ifndef included_hier_MappedBoxLevel
+#define included_hier_MappedBoxLevel
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/MappedBox.h"
+#include "SAMRAI/hier/MappedBoxLevelHandle.h"
+#include "SAMRAI/hier/MappedBoxSet.h"
+#include "SAMRAI/hier/PersistentOverlapConnectors.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/Timer.h"
+
+#include <vector>
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief A distributed set of MappedBox objects which reside in the
+ * same index space.
+ *
+   *
+   * TODO: Are we eliminating DLBG terminology?
+   *
+ * This class is a part of the distributed layered box graph (DLBG) for
+ * managing SAMR meshes in parallel.  A MappedBoxLevel is a set of 
+ * boxes in the same index space. Relationships (e.g., neighbor adjacency)
+ * among boxes is contained in a Connector object. Also, each MappedBoxLevel 
+ * has an refinement ratio vector describing the relationship of the 
+ * index space to that of a reference level in a patch hierarchy (typically
+ * the coarsest level or level zero).  
+ *
+ * Like a PatchLevel, a MappedBoxLevel is a parallel object.  The
+ * MappedBoxes of a MappedBoxLevel may be distributed across all the
+ * processors in an MPI communicator and can be in one
+ * of two parallel states:
+ *
+ * - @b DISTRIBUTED: Each MPI process knows only the MappedBoxes in the set
+ * that are "owned" by that process.  This is analogous to a PatchLevel 
+ * which owns only the Patches that reside on a process.
+ *
+ * - @b GLOBALIZED: All processes know all MappedBoxes in the set.
+ * This is analogous to PatchLevel BoxArray state when it is globalized
+ * (@see PatchLevel::getBoxes()).
+ *
+ * @par Performance notes
+ * <li> The parallel state is changed by calling setParallelState().  Going
+ * from DISTRIBUTED to GLOBALIZED state is an expensive operation requiring
+ * all-to-all communication.  Using this state can incur a significant 
+ * performance penalty.
+ *
+ * <li> The GLOBALIZED state requires more memory.
+ *
+ * <li> Transitioning from GLOBALIZED state to DISTRIBUTED state is
+ * cheap.
+ *
+ * @note
+ * The general attributes of a MappedBoxLevel are
+ * <li> the set of unique MappedBox objects,
+ * <li> the refinement ratio defining their index space, and
+ * <li> the parallel state.
+ *
+ * MappedBox object uniqueness is based on the MappedBox equality operator,
+ * which compares owner MPI ranks and local indices.  Therefore, 
+ * a valid MappedBoxLevel does not contain two MappedBoxes with the same
+ * owner and index.
+ */
+class MappedBoxLevel:public tbox::DescribedClass
+{
+
+public:
+   /*!
+    * @brief Names of parallel states.
+    */
+   /*
+    * TODO: We should only have one enum for this. Currently, we have
+    * this one and a similar one in Connector.h.
+    */
+   enum ParallelState { DISTRIBUTED, GLOBALIZED };
+
+   /*!
+    * @brief Construct uninitialized object.
+    *
+    * Uninitialized objects can be initialized by calling initialize()
+    * or swapInitialize().
+    *
+    * @see initialize()
+    * @see swapInitialize()
+    *
+    * @param[in] dim
+    */
+   explicit MappedBoxLevel(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Copy constructor.
+    *
+    * New object has the same parallel state as original.
+    *
+    * Persistent Connectors are not duplicated.  This
+    * decision was based on expected usage, which is that
+    * copies are either for short term usage or meant to
+    * be changed in some way and will invalidate Connectors.
+    *
+    * @param[in] rhs
+    */
+   MappedBoxLevel(
+      const MappedBoxLevel& rhs);
+
+   /*!
+    * @brief Construct initialized and populated object.
+    *
+    * @see initialize()
+    *
+    * @param[in] mapped_boxes
+    * @param[in] ratio
+    * @param[in] mpi
+    * @param[in] parallel_state
+    */
+   explicit MappedBoxLevel(
+      const MappedBoxSet& mapped_boxes,
+      const IntVector& ratio,
+      const tbox::SAMRAI_MPI& mpi = tbox::SAMRAI_MPI::getSAMRAIWorld(),
+      const ParallelState parallel_state = DISTRIBUTED);
+
+   /*!
+    * @brief Constructs an empty, initialized object.
+    *
+    * @see addMappedBox()
+    * @see addBox()
+    * @see initialize()
+    *
+    * @param[in] ratio
+    * @param[in] mpi
+    * @param[in] parallel_state
+    */
+   explicit MappedBoxLevel(
+      const IntVector& ratio,
+      const tbox::SAMRAI_MPI& mpi = tbox::SAMRAI_MPI::getSAMRAIWorld(),
+      const ParallelState parallel_state = DISTRIBUTED);
+
+   /*!
+    * @brief Destructor.
+    *
+    * Deallocate internal data.
+    */
+   ~MappedBoxLevel(
+      void);
+
+   //@{
+   //! @name Initialization and clearing methods
+
+   /*!
+    * @brief Initialize the MappedBoxLevel
+    *
+    * If @c parallel_state is GLOBALIZED, mapped_boxes must be
+    * the global set of MappedBoxes.
+    *
+    * If @c parallel_state is DISTRIBUTED, mapped_boxes should contain
+    * all local MappedBoxes.  Non-local MappedBoxes are ignored.
+    *
+    * Once the object is initialized, you can further modify it by
+    * adding and removing boxes.
+    *
+    * Initializing is a modifying operation, causing the
+    * PersistentOverlapConnectors to be cleared.
+    *
+    * The content and state of the object before calling this function
+    * is discarded.
+    *
+    * @see initializePrivate()
+    * @see getPersistentOverlapConnectors().
+    *
+    * @param[in] mapped_boxes
+    * @param[in] ratio
+    * @param[in] mpi
+    * @param[in] parallel_state
+    */
+   void
+   initialize(
+      const MappedBoxSet& mapped_boxes,
+      const IntVector& ratio,
+      const tbox::SAMRAI_MPI& mpi = tbox::SAMRAI_MPI::getSAMRAIWorld(),
+      const ParallelState parallel_state = DISTRIBUTED);
+
+  /*!
+    * @brief Initialize the MappedBoxLevel without and MappedBoxes
+    *
+    * The content and state of the object before calling this function
+    * is discarded.
+    *
+    * @see addMappedBox()
+    * @see addBox()
+    * @see initialize(const MappedBoxSet&, const IntVector&, const tbox::SAMRAI_MPI&, const ParallelState)
+    *
+    * @param[in] mapped_boxes
+    * @param[in] ratio
+    * @param[in] mpi
+    * @param[in] parallel_state
+    */
+   void
+   initialize(
+      const IntVector& ratio,
+      const tbox::SAMRAI_MPI& mpi = tbox::SAMRAI_MPI::getSAMRAIWorld(),
+      const ParallelState parallel_state = DISTRIBUTED);
+
+   /*!
+    * @brief Initialize the MappedBoxLevel.
+    *
+    * Similar to initialize(const MappedBoxSet&, const IntVector&, const tbox::SAMRAI_MPI&, const ParallelState), except that the @c mapped_boxes are mutable.
+    *
+    * The state of the object before calling this function is
+    * discarded.  The MappedBox content before calling this function
+    * is returned via the @c mapped_boxes argument.
+    *
+    * @see initializePrivate()
+    *
+    * @param[in,out] mapped_boxes On input, this should contain the
+    * MappedBoxes to place in the MappedBoxLevel.  On output, it
+    * contains the MappedBoxes that were in the MappedBoxLevel before 
+    * the call.
+    *
+    * @param[in] ratio
+    * @param[in] mpi
+    * @param[in] parallel_state
+    */
+   void
+   swapInitialize(
+      MappedBoxSet& mapped_boxes,
+      const IntVector& ratio,
+      const tbox::SAMRAI_MPI& mpi = tbox::SAMRAI_MPI::getSAMRAIWorld(),
+      const ParallelState parallel_state = DISTRIBUTED);
+
+   /*!
+    * @brief Returns True if the object has been initialized.
+    */
+   bool
+   isInitialized() const;
+
+   /*!
+    * @brief Clear the internal state of the MappedBoxLevel.
+    *
+    * The MappedBoxLevel will be in an uninitialized state
+    * after a call to this method.
+    */
+   void
+   clear();
+
+   /*!
+    * @brief Clear the globalized version and the persistent overlap
+    * connectors for data consistency.
+    *
+    * Most of the time, this method is automatically called by methods
+    * that know when some data is stale and needs to be cleared.  
+    * For example, adding a box makes the global number of
+    * boxes stale.  However, sometimes it is necessary to call this
+    * method manually.  For example, when only some processes add
+    * boxes while others do not, resulting in some processes not
+    * knowing that the global number of boxes is inconsistent.
+    *
+    * @param[in] isInvalid A flag indicating that boxes have been (or will
+    *            be) removed, thus invalidating the handle.
+    */
+   void clearForBoxChanges( bool isInvalid = true );
+
+
+   //@{
+
+   //! @name Parallelism
+
+   /*!
+    * @brief Set the parallel state.
+    *
+    * This method is potentially expensive.
+    * Acquiring remote MappedBox information (when going
+    * to GLOBALIZED mode) triggers all-gather communication.
+    * More memory is required to store additional MappedBoxes.
+    *
+    * Data not used by the new state gets deallocated.
+    *
+    * @param[in] parallel_state
+    */
+   void
+   setParallelState(
+      const ParallelState parallel_state);
+
+   /*!
+    * @brief Returns the ParallelState of the object.
+    */
+   ParallelState
+   getParallelState() const;
+
+   /*!
+    * @brief If global reduced data (global MappedBox count, global
+    * cell count and global bounding box) have not been updated,
+    * compute and cache them (communication required).
+    *
+    * After this method is called, data requiring global reduction can
+    * be accessed without further communications, until the object
+    * changes.
+    *
+    * Sets d_global_data_up_to_date;
+    */
+   void
+   cacheGlobalReducedData() const;
+
+   /*!
+    * @brief Return the globalized version of the MappedBoxLevel,
+    * creating it if needed.
+    *
+    * If the MappedBoxLevel is in globalized state, return @c *this.
+    * If not, create and cache a globalized version (if necessary) and
+    * return that.
+    *
+    * The cached version remains until it is removed by
+    * deallocateGlobalizedVersion() or a method that can potentially
+    * change the MappedBoxes is called.  Note that globalizing and
+    * globalized data is not scalable.  Use only when necessary.
+    *
+    * Obviously, when the globalized version must be created (when the
+    * MappedBoxLevel is in DISTRIBUTED state and there is no cached
+    * version yet), all processes must make this call at the same
+    * point.
+    */
+   const MappedBoxLevel&
+   getGlobalizedVersion() const;
+
+   /*!
+    * @brief Deallocate the internal globalized version of the
+    * MappedBoxLevel, if there is any.
+    */
+   void
+   deallocateGlobalizedVersion() const;
+
+   /*!
+    * @brief Returns the SAMRAI_MPI communicator over which the MappedBoxes
+    * are distributed.
+    */
+   const tbox::SAMRAI_MPI&
+   getMPI() const;
+
+   /*
+    * TODO: Why are these methods here? Shouldn't we get this information
+    * from the SAMRAI_MPI object (method above).
+    */
+   /*!
+    * @brief Return the processor rank for the internal MPI communicator.
+    */
+   int
+   getRank() const;
+
+   /*!
+    * @brief Return the number of processes for the internal MPI communicator.
+    */
+   int
+   getNproc() const;
+
+   //@}
+
+
+   /*!
+    * @brief Assignment operator duplicates all internal data,
+    * including parallel mode.
+    *
+    * Assignment is a modifying operation, causing the
+    * PersistentOverlapConnectors to be cleared.
+    *
+    * Persistent Connectors are not duplicated.  This
+    * decision was based on expected usage, which is 
+    * that copies are either for short term usage or meant to
+    * be changed in some way (thus invalidating current
+    * Connectors anyway).
+    *
+    * @see getPersistentOverlapConnectors()
+    *
+    * @param[in] rhs
+    */
+   MappedBoxLevel&
+   operator = (
+      const MappedBoxLevel& rhs);
+
+   /*!
+    * @brief Swap the contents of two MappedBoxLevel objects.
+    *
+    * Swapping is a modifying operation, so the
+    * PersistentOverlapConnectorss of the operands are cleared.
+    *
+    * Persistent Connectors are not swapped.  This decision
+    * was based on expected usage, which is that
+    * copies are either for short term usage or meant to be
+    * changed in some way (thus invalidating current
+    * Connectors anyway).
+    *
+    * @param[in,out] level_a
+    * @param[in,out] level_b
+    */
+   static void
+   swap(
+      MappedBoxLevel& level_a,
+      MappedBoxLevel& level_b);
+
+   //@}
+
+   /*!
+    * @brief Equality comparison.
+    *
+    * All data required to initialize the object is compared, except
+    * for the parallel state.  Thus equality here means just the local
+    * parts are equal.  @b BEWARE!  This means that one processor may
+    * see the equality differently from another.
+    *
+    * The cost for the comparison is on the order of the local
+    * MappedBox count.  An object may be compared to itself, an
+    * efficient operation that always returns true.
+    *
+    * @param[in] rhs
+    */
+   bool
+   operator == (
+      const MappedBoxLevel& rhs) const;
+
+   /*!
+    * @brief Inequality comparison.
+    *
+    * All data required to initialize the object is compared, except
+    * for the parallel state.  Thus equality here means just the local
+    * parts are equal.  @b BEWARE!  This means that one processor may
+    * see the inequality differently from another.
+    *
+    * The cost for the comparison is on the order of the local
+    * MappedBox count.  However, an object may be compared to itself,
+    * an efficient operation that always returns false.
+    *
+    * @param[in] rhs
+    */
+   bool
+   operator != (
+      const MappedBoxLevel& rhs) const;
+
+
+   //@{
+   /*!
+    * @name Accessors
+    */
+
+   /*!
+    * @brief Returns the container of local MappedBoxes.
+    *
+    * @par Important
+    * The MappedBoxSet returned contains periodic image
+    * MappedBoxes (if any).  To iterate through real MappedBoxes only, see
+    * RealMappedBoxConstIterator.
+    *
+    * You cannot directly modify the MappedBoxSet because it may
+    * invalidate other internal data.  Use other methods for modifying
+    * the MappedBoxSet.
+    *
+    * @see getGlobalNumberOfBoxes()
+    * @see getLocalNumberOfBoxes()
+    *
+    */
+   const MappedBoxSet&
+   getMappedBoxes() const;
+
+   /*!
+    * @brief Returns the container of global MappedBoxes.
+    *
+    * @par Assertions
+    * Throws an unrecoverable assertion if not in GLOBALIZED mode.
+    */
+   const MappedBoxSet&
+   getGlobalMappedBoxes() const;
+
+   /*!
+    * @brief Returns the iterator range of MappedBoxes for a given rank.
+    * The iterators apply to the container getGlobalMappedBoxes().
+    *
+    * If range's end points are the same, then the range is empty.
+    *
+    * You cannot directly modify the MappedBoxSet because it may
+    * invalidate other internal data.  Use other methods for modifying
+    * the MappedBoxSet.
+    *
+    * @par Assertions
+    * Throws an unrecoverable assertion if not in GLOBALIZED mode.
+    *
+    * @param[in] rank
+    */
+   /*
+    * TODO: Would it be better to rename this method getMappedBoxesRange() 
+    * to avoid confusion with other methods of the same name?
+    */
+   MappedBoxSet::ConstRange
+   getMappedBoxes(
+      int rank) const;
+
+   /*
+    * TODO: Why are the following two methods here?  Returning local id 
+    * information like this is dangerous in that it seems to imply that 
+    * they can be used as an integer range, or a count (last - first + 1).  
+    * Since the first method is not used and the second is used in a few 
+    * places, wouldn't it be better to just use the previous method?
+    */
+   /*!
+    * @brief Returns the first LocalId, or one with a value of -1 if
+    * no local MappedBox exists.
+    */
+   LocalId
+   getFirstLocalId() const;
+
+   /*!
+    * @brief Returns the last LocalId, or one with a value of -1 if no
+    * local MappedBox exists.
+    */
+   LocalId
+   getLastLocalId() const;
+
+   /*!
+    * @brief Get const access to MappedBoxLevel's refinement ratio
+    * (with respect to a reference level).
+    */
+   const IntVector&
+   getRefinementRatio() const;
+
+   /*!
+    * @brief Return local number of boxes.
+    *
+    * Periodic image MappedBoxes are excluded.
+    */
+   size_t
+   getLocalNumberOfBoxes() const;
+
+   /*!
+    * @brief Return number of boxes local to the given rank.
+    *
+    * Periodic image MappedBoxes are excluded.
+    *
+    * Object must be in GLOBALIZED mode to use this method.
+    *
+    * @param[in] rank
+    */
+   size_t
+   getLocalNumberOfBoxes(
+      int rank) const;
+
+   /*!
+    * @brief Return global number of MappedBoxes.
+    *
+    * This requires a global reduction, if the global-reduced data has
+    * not been computed and cached.  When communication is required,
+    * all processors must call this method.  To ensure that no
+    * communication is needed, call cacheGlobalReducedData() first.
+    *
+    * Periodic image MappedBoxes are excluded.
+    */
+   int
+   getGlobalNumberOfBoxes() const;
+
+   /*!
+    * @brief Return maximum number of MappedBoxes over all processes.
+    *
+    * This requires a global reduction, if the global-reduced data has
+    * not been computed and cached.  When communication is required,
+    * all processors must call this method.  To ensure that no
+    * communication is needed, call cacheGlobalReducedData() first.
+    *
+    * Periodic image MappedBoxes are excluded.
+    */
+   int
+   getMaxNumberOfBoxes() const;
+
+   /*!
+    * @brief Return maximum number of MappedBoxes over all processes.
+    *
+    * This requires a global reduction, if the global-reduced data has
+    * not been computed and cached.  When communication is required,
+    * all processors must call this method.  To ensure that no
+    * communication is needed, call cacheGlobalReducedData() first.
+    *
+    * Periodic image MappedBoxes are excluded.
+    */
+   int
+   getMinNumberOfBoxes() const;
+
+   /*!
+    * @brief Return local number of cells.
+    *
+    * Cells in periodic image MappedBoxes are excluded.
+    */
+   size_t
+   getLocalNumberOfCells() const;
+
+   /*!
+    * @brief Return maximum number of cells over all processes.
+    *
+    * This requires a global reduction, if the global-reduced data has
+    * not been computed and cached.  When communication is required,
+    * all processors must call this method.  To ensure that no
+    * communication is needed, call cacheGlobalReducedData() first.
+    *
+    * Periodic image MappedBoxes are excluded.
+    */
+   int
+   getMaxNumberOfCells() const;
+
+   /*!
+    * @brief Return maximum number of cells over all processes.
+    *
+    * This requires a global reduction, if the global-reduced data has
+    * not been computed and cached.  When communication is required,
+    * all processors must call this method.  To ensure that no
+    * communication is needed, call cacheGlobalReducedData() first.
+    *
+    * Periodic image MappedBoxes are excluded.
+    */
+   int
+   getMinNumberOfCells() const;
+
+   /*!
+    * @brief Return number of cells local to the given rank.
+    *
+    * Cells in periodic image MappedBoxes are excluded.
+    *
+    * Object must be in GLOBALIZED mode to use this method.
+    *
+    * @param[in] rank
+    */
+   size_t
+   getLocalNumberOfCells(
+      int rank) const;
+
+   /*!
+    * @brief Return global number of cells.
+    *
+    * This requires a global reduction if the global-reduced data has
+    * not been computed and cached.  When communication is required,
+    * all processors must call this method.  To ensure that no
+    * communication is needed, call cacheGlobalReducedData() first.
+    *
+    * Cells in periodic image MappedBoxes are excluded.
+    */
+   int
+   getGlobalNumberOfCells() const;
+
+   /*!
+    * @brief Return bounding box for local MappedBoxes.
+    */
+   const Box&
+   getLocalBoundingBox() const;
+
+   /*!
+    * @brief Return bounding box for global MappedBoxes.
+    *
+    * This requires a global reduction if the global bounding box has
+    * not been computed and cached.  When communication is required,
+    * all processors must call this method.  To ensure that no
+    * communication is needed, call cacheGlobalReducedData() first.
+    */
+   const Box&
+   getGlobalBoundingBox() const;
+
+   /*!
+    * @brief Return size of the largest local MappedBox.
+    */
+   const IntVector&
+   getLocalMaxBoxSize() const;
+
+   /*!
+    * @brief Return size of the smallest local MappedBox.
+    */
+   const IntVector&
+   getLocalMinBoxSize() const;
+
+   /*!
+    * @brief Return size of the largest MappedBox globally.
+    *
+    * This requires a global reduction if the global bounding box has
+    * not been computed and cached.  When communication is required,
+    * all processors must call this method.  To ensure that no
+    * communication is needed, call cacheGlobalReducedData() first.
+    */
+   const IntVector&
+   getGlobalMaxBoxSize() const;
+
+   /*!
+    * @brief Return size of the smallest MappedBox globally.
+    *
+    * This requires a global reduction if the global bounding box has
+    * not been computed and cached.  When communication is required,
+    * all processors must call this method.  To ensure that no
+    * communication is needed, call cacheGlobalReducedData() first.
+    */
+   const IntVector&
+   getGlobalMinBoxSize() const;
+
+   /*!
+    * @brief Return the dimension of this object.
+    *
+    * If object has never been initialized, return
+    * tbox::Dimension::getInvalidDimension().
+    */
+   const tbox::Dimension&
+   getDim() const;
+
+   //@}
+
+
+   //@{
+
+   //! @name Individual MappedBox methods.
+
+   /*
+    * TODO: Why the vacant index thing?  The comments say that the
+    * box will be assigned an unused index.  Isn't this a "vacant" index?
+    *
+    * TODO: Why does the first method require "distributed" state and the ones
+    * after require GLOBALIZED state for a remote box?  These comments
+    * are inconsistent and confusing.  I think it would be best to have the
+    * same pre/post conditions apply to all similar methods (e.g., "add box" 
+    * methods), then describe them once rather than repeat (potentially 
+    * inconsistently for each method).
+    */
+
+
+   /*!
+    * @brief Create new local MappedBox from given Box and add it to this
+    * level.
+    *
+    * The new MappedBox will be assigned an unused local index.  To be
+    * efficient, no communication will be used.  Therefore, the state
+    * must be distributed.
+    *
+    * The new MappedBox will have a periodic shift number
+    * corresponding to zero-shift.
+    *
+    * It is faster not to request a vacant index when adding a box.
+    *
+    * @param[in] box
+    * @param[in] use_vacant_index
+    *
+    * @return iterator to the new MappedBox
+    */
+   MappedBoxSet::iterator
+   addBox(
+      const Box& box,
+      const bool use_vacant_index = true);
+
+   /*!
+    * @brief Add a MappedBox to this level.
+    *
+    * Adding a remote MappedBox is allowed if the object is in
+    * GLOBALIZED mode.
+    *
+    * @par CAUTION
+    * To be efficient, no checks are made to make sure the
+    * MappedBoxLevel representation is consistent across all
+    * processors.  Setting inconsistent data leads potentially
+    * elusive bugs.
+    *
+    * @par Errors
+    * It is an error to add a periodic image of a MappedBox that is
+    * not a part of the MappedBoxLevel.
+    *
+    * It is an error to add any MappedBox that already exists.
+    *
+    * FIXME: Should we prevent this operation if persistent overlap
+    * Connectors are attached to this object?
+    *
+    * @param[in] mapped_box
+    */
+   void
+   addMappedBox(
+      const MappedBox& mapped_box);
+
+   /*!
+    * @brief Insert given periodic image of an existing MappedBox.
+    *
+    * Adding a remote MappedBox is allowed if the object is in
+    * GLOBALIZED mode.
+    *
+    * Unlike adding a regular MappedBox, it is OK to add a periodic
+    * image MappedBox that already exists.  However, that is a no-op.
+    *
+    * @par CAUTION
+    * To be efficient, no checks are made to make sure the
+    * MappedBoxLevel representation is consistent across all
+    * processors.  Setting inconsistent data leads potentially elusive
+    * bugs.
+    *
+    * @par Errors
+    * It is an error to add a periodic image of a MappedBox that does
+    * not exist.
+    *
+    * FIXME: Should we prevent this operation if persistent overlap
+    * Connectors are attached to this object?
+    *
+    * @param[in] existing_mapped_box  An existing MappedBox for reference.
+    *      This MappedBox must be in the MappedBoxLevel.  The MappedBox added
+    *      is an image of the reference MappedBox but shifted to another
+    *      position.
+    * @param[in] shift_number The valid shift number for the MappedBox being
+    *      added.  The shift amount is taken from the PeriodicShiftCatalog.
+    */
+   void
+   addPeriodicMappedBox(
+      const MappedBox& existing_mapped_box,
+      int shift_number);
+
+   /*!
+    * @brief Erase the existing MappedBox specified by its iterator.
+    *
+    * The given iterator @em MUST be a valid iterator pointing to a
+    * MappedBox currently in this object.  After erasing, the iterator
+    * is advanced to the next valid MappedBox (or the end of its
+    * MappedBoxSet).
+    *
+    * Erasing a MappedBox also erases all of its periodic images.
+    *
+    * FIXME: Should we prevent this operation if the object has
+    * persistent overlap Connectors?
+    *
+    * @param[in] ibox The iterator of the MappedBox to erase.
+    */
+   void
+   eraseMappedBox(
+      MappedBoxSet::iterator& ibox);
+
+   /*!
+    * @brief Erase the MappedBox matching the one given.
+    *
+    * The given MappedBox @em MUST match a MappedBox currently in this
+    * object.  Matching means that the MappedBoxId's match
+    * (disregarding the Boxes).
+    *
+    * Erasing a MappedBox also erases all of its periodic images.
+    *
+    * FIXME: Should we prevent this operation if the object has
+    * persistent overlap Connectors?
+    *
+    * @param[in] mapped_box
+    */
+   void
+   eraseMappedBox(
+      const MappedBox& mapped_box);
+
+   /*!
+    * @brief Find the MappedBox matching the one given.
+    *
+    * Only the MappedBoxId matters in matching, so the actual Box can
+    * be anything.
+    *
+    * If @c mapped_box is not a local MappedBox, the state must be
+    * GLOBALIZED.
+    *
+    * @param[in] mapped_box
+    *
+    * @return Iterator to the mapped_box, or @c
+    * getMappedBoxes(owner).end() if mapped_box does not exist in set.
+    */
+   MappedBoxSet::const_iterator
+   getMappedBox(
+      const MappedBox& mapped_box) const;
+
+   /*!
+    * @brief Find the MappedBox specified by the given GlobalId and
+    * periodic shift.
+    *
+    * If @c mapped_box is not a local MappedBox, the state must be
+    * GLOBALIZED.
+    * @param[in] periodic_shift_number
+    *
+    * @return Iterator to the mapped_box, or @c
+    * getMappedBoxes(owner).end() if mapped_box does not exist in set.
+    */
+   MappedBoxSet::const_iterator
+   getMappedBox(
+      const GlobalId& global_id,
+      const int periodic_shift_number = 0) const;
+
+   /*
+    * TODO: What is different about these "strict" methods compared to
+    * the preceding ones?  I can't tell from the comments.
+    */
+
+   /*!
+    * @brief Find the MappedBox matching the one given.
+    *
+    * Only the MappedBoxId matters in matching, so the actual Box can
+    * be anything.
+    *
+    * If @c mapped_box is not owned by the local process, the state
+    * must be GLOBALIZED.
+    *
+    * You cannot directly modify the MappedBoxSet because it may
+    * invalidate other internal data.  Use other methods for modifying
+    * the MappedBoxSet.
+    *
+    * @par Assertions
+    * Throws an unrecoverable assertion if the MappedBox does not
+    * exist.
+    *
+    * @param[in] mapped_box
+    *
+    * @return Iterator to the mapped_box.
+    */
+   MappedBoxSet::const_iterator
+   getMappedBoxStrict(
+      const MappedBox& mapped_box) const;
+
+   /*!
+    * @brief Find the MappedBox specified by the given GlobalId and
+    * periodic shift.
+    *
+    * You cannot directly modify the MappedBoxSet because it may
+    * invalidate other internal data.  Use other methods for modifying
+    * the MappedBoxSet.
+    *
+    * @par Assertions
+    * Throw an unrecoverable assertion if the MappedBox does not exist.
+    *
+    * @param[in] global_id
+    * @param[in] periodic_shift_number
+    *
+    * @return Iterator to the mapped_box.
+    */
+   MappedBoxSet::const_iterator
+   getMappedBoxStrict(
+      const GlobalId& global_id,
+      const int periodic_shift_number = 0) const;
+
+   /*!
+    * @brief Returns true when the object has a MappedBox specified by the
+    * GlobalId and periodic shift.
+    *
+    * @param[in] global_id
+    * @param[in] periodic_shift_number
+    */
+   bool
+   hasMappedBox(
+      const GlobalId& global_id,
+      const int periodic_shift_number = 0) const;
+
+   /*!
+    * @brief Returns true when the object has a MappedBox specified by the
+    * MappedBoxId.
+    *
+    * @param[in] mapped_box_id
+    */
+   bool
+   hasMappedBox(
+      const MappedBoxId& mapped_box_id) const;
+
+   /*!
+    * @brief Returns true when the object has a MappedBox matching the
+    * one parameter.
+    *
+    * @param[in] mapped_box
+    */
+   bool
+   hasMappedBox(
+      const MappedBox& mapped_box) const;
+
+   //@}
+
+   //@{
+   /*!
+    * @name IO support.
+    */
+
+   /*!
+    * @brief Write the MappedBoxLevel to a database.
+    *
+    * Write only local parts regardless of parallel state (to avoid
+    * writing tons of repetitive data).
+    *
+    * @par Assertions
+    * Check that database is a non-null Pointer.
+    *
+    * @param[in,out] database
+    */
+   void
+   putToDatabase(
+      tbox::Database& database) const;
+
+   /*!
+    * @brief Read the MappedBoxLevel from a database.
+    *
+    * Put the MappedBoxLevel in the DISTRIBUTED parallel state and
+    * read only local parts.
+    *
+    * If the MappedBoxLevel is initialized, use its SAMRAI_MPI object
+    * and require its refinement ratio to match that in the database.
+    * If the MappedBoxLevel is uninitialized, it will be initialized
+    * to use tbox::SAMRAI_MPI::getSAMRAIWorld() for the SAMRAI_MPI
+    * object.  Note that these behaviors have not been extensively
+    * discussed by the SAMRAI developers and may be subject to change.
+    *
+    * @par Assertions
+    * Check that database is a non-null Pointer.
+    *
+    * @param[in,out] database
+    */
+   void
+   getFromDatabase(
+      tbox::Database& database);
+
+   //@}
+
+
+   /*!
+    * @brief Get the collection of overlap Connectors dedicated to
+    * provide overlap neighbors for this MappedBoxLevel.
+    *
+    * The PersistentOverlapConnectors provides overlap neighbors for
+    * this MappedBoxLevel.  Its role is to create and manage
+    * persistent overlap Connectors based at this MappedBoxLevel and
+    * persisting until the MappedBoxLevel changes (so they should not
+    * be set up until the MappedBoxLevel is in its final state).  This
+    * is the mechanism by which code that can efficiently generate the
+    * overlap Connectors (usually the code that generated the
+    * MappedBoxLevel) provides overlap data to code using the
+    * MappedBoxLevel.  The PersistentOverlapConnectors are guaranteed
+    * to be correct, so any changes to the MappedBoxLevel will cause
+    * current Connectors to be deallocated.
+    *
+    * @see PersistentOverlapConnectors for instructions on creating
+    * the Connectors.
+    */
+   PersistentOverlapConnectors&
+   getPersistentOverlapConnectors() const;
+
+   /*
+    * TODO: The following method is "not for general use" and indeed
+    * is only used in two Connector classes.  Would it be better to 
+    * make the method private and make this class a friend of those?
+    */
+
+   /*!
+    * @brief Get the handle with which Connectors
+    * reference the MappedBoxLevel instead of referencing the
+    * MappedBoxLevel itself.  Not for general use.
+    *
+    * Connectors referencing their base and head MappedBoxLevels should
+    * reference their handles instead of the MappedBoxLevels themselves.
+    * As long as the MappedBoxLevel does not change in a way
+    * that can invalidate Connector data, you can access
+    * the MappedBoxLevel from the MappedBoxLevelHandle.
+    *
+    * If the MappedBoxLevel go out of scope before the
+    * Connector disconnects, this tbox::Pointer object will
+    * stay around until all Connectors have disconnected.
+    *
+    * Operations that can invalidate Connector data are those
+    * that remove information from the MappedBoxLevel.  These
+    * are:
+    *
+    * @li initialize()
+    * @li swapInitialize()
+    * @li swap()
+    * @li clear()
+    * @li operator=() (assignment) (Exception: assigning to
+    *     self is a no-op, which does not invalidate Connector
+    *     data.
+    * @li eraseMappedBox() (Note that adding a MappedBox
+    *     does not invalidate Connector data.)
+    * @li going out of scope
+    *
+    * @see MappedBoxLevelHandle.
+    *
+    * @return A tbox::Pointer to the MappedBoxLevelHandle
+    */
+   const tbox::Pointer<MappedBoxLevelHandle>&
+   getMappedBoxLevelHandle() const;
+
+   //@{
+
+   /*!
+    * @name Methods for outputs, error checking and debugging.
+    */
+
+   /*!
+    * @brief Print MappedBox info from this level
+    *
+    * @param[in,out] os The output stream
+    * @param[in] border
+    * @param[in] detail_depth
+    */
+   void
+   recursivePrint(
+      std::ostream& os,
+      const std::string& border,
+      int detail_depth = 0) const;
+
+   /*!
+    * @brief Print out statistics on the MappedBoxes.
+    *
+    * @param[in,out] os The output stream
+    * @param[in] border
+    */
+   void
+   printMappedBoxStats(
+      std::ostream& os,
+      const std::string& border) const;
+
+   /*!
+    * @brief A class for outputting MappedBoxLevel.
+    *
+    * To use, see MappedBoxLevel::format().
+    *
+    * This class simplifies the insertion of a MappedBoxLevel into a
+    * stream while letting the user control how the MappedBoxLevel is
+    * formatted for output.
+    *
+    * Each Outputter is a light-weight object constructed with a
+    * MappedBoxLevel and output parameters.  The Outputter is capable
+    * of outputting its MappedBoxLevel, formatted according to the
+    * parameters.
+    */
+   class Outputter {
+      friend std::ostream& operator << ( std::ostream& s, const Outputter& f);
+   private:
+      friend class MappedBoxLevel;
+      /*!
+       * @brief Construct the Outputter with a MappedBoxLevel and the
+       * parameters needed to output the MappedBoxLevel to a stream.
+       *
+       * @param[in] mapped_box_level
+       * @param[in] border
+       * @param[in] detail_depth
+       */
+      Outputter( const MappedBoxLevel &mapped_box_level,
+                 const std::string& border,
+                 int detail_depth = 0);
+      void operator=( const Outputter &r ); // Unimplemented private.
+      const MappedBoxLevel &d_level;
+      const std::string d_border;
+      const int d_detail_depth;
+   };
+
+   /*!
+    * @brief Return a object that can format the MappedBoxLevel for
+    * inserting into output streams.
+    *
+    * Usage example:
+    * @code
+    *    std::cout << "my mapped_box_level:\n"
+    *         << mapped_box_level.format("  ", 2) << std::endl;
+    * @endcode
+    *
+    * @param[in] border
+    * @param[in] detail_depth
+    */
+   Outputter format( const std::string& border,
+                     int detail_depth = 0 ) const;
+
+   //@}
+
+   /*!
+    * @brief Allows std::vector to allocate objects with
+    * uninitialized dimensions.
+    */
+   friend class std::vector<MappedBoxLevel>;
+
+   /*!
+    * @brief Set up things for the entire class.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   initializeCallback();
+
+   /*!
+    * @brief Free static timers.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   finalizeCallback();
+
+private:
+
+   /*
+    * TODO: This same enum is defined in the Connector header.
+    * If there is a common use for this, should it be defined in a
+    * common location? Also, it seems to be used similarly to the
+    * BAD_INTEGER #define in BergerRigoutsosNode.C.  Is the intent
+    * really the same?
+    */
+   enum { BAD_INT = (1 << (8 * sizeof(int) - 2)) };
+
+   /*!
+    * @brief Construct uninitialized object.
+    *
+    * Constructor creates an uninitialized object in distributed state.
+    *
+    * Private to limit where an uninitialized object can
+    * be created.
+    */
+   MappedBoxLevel();
+
+   /*
+    * TODO: The comments for the following method use the phrase
+    * "local redundant data" three times, but I still don't know
+    * what that is!
+    */
+   /*!
+    * @brief Recompute local redundant data.
+    *
+    * Local redundant data is usually updated immediately after their
+    * dependencies change.  On certain occasions, we recompute all
+    * the local redundant data.
+    */
+   void
+   computeLocalRedundantData();
+
+   //@{
+
+   /*!
+    * @brief Get and store info on remote MappedBoxes.
+    *
+    * This requires global communication (all-gather).
+    * Call acquireRemoteMappedBoxes_pack to pack up messages.
+    * Do an all-gather.  Call acquireRemoteMappedBoxes_unpack
+    * to unpack data from other processors.
+    */
+   void
+   acquireRemoteMappedBoxes();
+
+   //! @brief Pack local MappedBoxes into an integer array.
+   void
+   acquireRemoteMappedBoxes_pack(
+      std::vector<int>& send_mesg) const;
+
+   /*!
+    * @brief Unpack MappedBoxes from an integer array into internal
+    * storage.
+    */
+   void
+   acquireRemoteMappedBoxes_unpack(
+      const std::vector<int>& recv_mesg,
+      std::vector<int>& proc_offset);
+
+   /*!
+    * @brief Get and store info on remote MappedBoxes for multiple
+    * MappedBoxLevel objects.
+    *
+    * This method combines communication for the multiple
+    * mapped_box_levels to increase message passing efficiency.
+    *
+    * Note: This method is stateless (could be static).
+    */
+   void acquireRemoteMappedBoxes(
+      const int num_sets,
+      MappedBoxLevel * multiple_mapped_box_level[]);
+   //@}
+
+   /*!
+    * @brief Deallocate persistent overlap Connectors, if there are any.
+    */
+   void
+   clearPersistentOverlapConnectors();
+
+   /*!
+    * @brief Detach this object from the handle it has been using.
+    *
+    * Postcondition: Objects that cached the handle would no longer
+    * be able to access this MappedBoxLevel by the handle.
+    */
+   void
+   detachMyHandle() const;
+
+   /*!
+    * @brief Encapsulates functionality common to all initialization
+    * functions.
+    */
+   void
+   initializePrivate(
+      const IntVector& ratio,
+      const bool swap,
+      const tbox::SAMRAI_MPI& mpi = tbox::SAMRAI_MPI::getSAMRAIWorld(),
+      const ParallelState parallel_state = DISTRIBUTED);
+
+   /*!
+    * @brief MappedBoxLevel is a parallel object,
+    * and this describes its MPI object.
+    */
+   tbox::SAMRAI_MPI d_mpi;
+
+   /*!
+    * @brief Locally-stored MappedBoxes.
+    *
+    * This is always the container of local MappedBoxes, regardless of
+    * parallel mode.
+    */
+   MappedBoxSet d_mapped_boxes;
+
+   /*!
+    * @brief Locally-stored global MappedBoxes (for GLOBALIZED mode).
+    *
+    * In DISTRIBUTED mode, this is empty.
+    */
+   MappedBoxSet d_global_mapped_boxes;
+
+   /*
+    * TODO: I certainly hope we are not using tests on whether the
+    * ratio vector is zero to check whether we have an initialized object.
+    */
+   /*!
+    * @brief Refinement ratio from a reference such as level 0.
+    *
+    * If d_ratio(0) == 0, the object is in uninitialized state.
+    */
+   IntVector d_ratio;
+
+   /*!
+    * @brief Local cell count, excluding periodic images.
+    *
+    * Unlike d_global_number_of_cells, this parameter is always current.
+    */
+   size_t d_local_number_of_cells;
+
+   /*!
+    * @brief Global cell count, excluding periodic images.
+    *
+    * This is mutable because it depends on the MappedBoxes and may be
+    * saved by a const object if computed.
+    *
+    * A value < 0 means it has not been computed.
+    */
+   mutable int d_global_number_of_cells;
+
+   /*!
+    * @brief Local MappedBox count, excluding periodic images.
+    *
+    * Unlike d_global_number_of_mapped_boxes, this parameter is always current.
+    */
+   size_t d_local_number_of_mapped_boxes;
+
+   /*!
+    * @brief Global box count, excluding periodic images.
+    *
+    * This is mutable because it depends on the MappedBoxes and may be
+    * saved by a const object if computed.
+    *
+    * A value < 0 means it has not been computed.
+    */
+   mutable int d_global_number_of_mapped_boxes;
+
+   //! @brief Global max box count on any proc, excluding periodic images.
+   mutable int d_max_number_of_mapped_boxes;
+   //! @brief Global min box count on any proc, excluding periodic images.
+   mutable int d_min_number_of_mapped_boxes;
+   //! @brief Global max cell count on any proc, excluding periodic images.
+   mutable int d_max_number_of_cells;
+   //! @brief Global min cell count on any proc, excluding periodic images.
+   mutable int d_min_number_of_cells;
+
+   //! @brief Max size of largest local box.
+   IntVector d_local_max_box_size;
+   //! @brief Max size of largest box globally.
+   mutable IntVector d_global_max_box_size;
+   //! @brief Min size of largest local box.
+   IntVector d_local_min_box_size;
+   //! @brief Min size of largest box globally.
+   mutable IntVector d_global_min_box_size;
+
+   /*!
+    * @brief Bounding box of local MappedBoxes, excluding periodic images.
+    *
+    * This is mutable because it depends on the MappedBoxes and may be
+    * saved by a const object if computed.
+    */
+   mutable Box d_local_bounding_box;
+
+   /*!
+    * @brief Whether d_local_bounding_box is up to date (or needs
+    * recomputing.
+    */
+   mutable bool d_local_bounding_box_up_to_date;
+
+   /*!
+    * @brief Bounding box of global MappedBoxes, excluding periodic images.
+    *
+    * This is mutable because it depends on the MappedBoxes and may be
+    * saved by a const object if computed.
+    */
+   mutable Box d_global_bounding_box;
+
+   /*!
+    * @brief Whether globally reduced data is up to date or needs
+    * recomputing using cacheGlobalReducedData().
+    */
+   mutable bool d_global_data_up_to_date;
+
+   /*!
+    * @brief State flag.
+    *
+    * Modified by setParallelState().
+    */
+   ParallelState d_parallel_state;
+
+   /*!
+    * @brief A globalized version of the MappedBoxLevel.
+    *
+    * Initialized by getGlobalizedVersion().  Deallocated by
+    * deallocateGlobalizedVersion().
+    *
+    * Like other redundant data, this is automatically removed if any
+    * method that can potentially change the MappedBoxLevel is called.
+    *
+    * This is mutable because it is redundant data and gets
+    * automatically set as needed.
+    */
+   mutable MappedBoxLevel const *d_globalized_version;
+
+   /*!
+    * @brief Connectors managed by this MappedBoxLevel,
+    * providing overlap neighbor data across multiple
+    * scopes.
+    *
+    * This is mutable so it can be allocated as needed (by
+    * getPersistentOverlapConnectors()).  We can make it non-mutable
+    * by always allocating the PersistentOverlapConnectors in the
+    * constructor, but most MappedBoxLevel won't need it at all.
+    */
+   mutable PersistentOverlapConnectors * d_persistent_overlap_connectors;
+
+   /*!
+    * @brief A Handle for Connectors to reference this
+    * MappedBoxLevel, used to help prevent invalid Connector
+    * data.
+    *
+    * Connectors reference the handle instead of the
+    * MappedBoxLevel directly.  When the MappedBoxLevel
+    * changes in a way that can invalidate Connector data,
+    * it detaches its handle from itself.  A detached handle
+    * tells Connectors that the MappedBoxLevel has changed
+    * in a way that can invalidate their data.
+    *
+    * Note: The automatic detaching mechanism prevents some
+    * logic errors.  It cannot prevent incorrect Connector
+    * data because correctness depends on the Connector's
+    * intended usage.
+    */
+   mutable tbox::Pointer<MappedBoxLevelHandle> d_handle;
+
+   static tbox::Pointer<tbox::Timer> t_acquire_remote_mapped_boxes;
+
+   /*!
+    * @brief Process rank (id),
+    * for convenience and data management use after MPI_Finalize.
+    */
+   int d_rank;
+
+   /*!
+    * @brief Number of processes,
+    * for convenience and data management use after MPI_Finalize.
+    */
+   int d_nproc;
+
+   /*!
+    * @brief A LocalId object with value of -1.
+    */
+   static const LocalId s_negative_one_local_id;
+
+   static tbox::StartupShutdownManager::Handler
+   s_initialize_finalize_handler;
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/MappedBoxLevel.I"
+#endif
+
+#endif  // included_hier_MappedBoxLevel
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MappedBoxLevelConnectorUtils.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MappedBoxLevelConnectorUtils.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1996 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utilities for working on DLBG edges. 
+ *
+ ************************************************************************/
+#ifndef included_hier_MappedBoxLevelConnectorUtils_C
+#define included_hier_MappedBoxLevelConnectorUtils_C
+
+#include "SAMRAI/hier/MappedBoxLevelConnectorUtils.h"
+#include "SAMRAI/hier/MappedBoxContainerUtils.h"
+#include "SAMRAI/hier/MappingConnectorAlgorithm.h"
+#include "SAMRAI/hier/OverlapConnectorAlgorithm.h"
+#include "SAMRAI/hier/PeriodicShiftCatalog.h"
+#include "SAMRAI/hier/RealMappedBoxConstIterator.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/TimerManager.h"
+
+#include <limits>
+#include <cstdlib>
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/MappedBoxLevelConnectorUtils.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+tbox::Pointer<tbox::Timer> MappedBoxLevelConnectorUtils::t_make_sorting_map;
+tbox::Pointer<tbox::Timer> MappedBoxLevelConnectorUtils::t_compute_external_parts;
+tbox::Pointer<tbox::Timer> MappedBoxLevelConnectorUtils::t_compute_external_parts_intersection;
+tbox::Pointer<tbox::Timer> MappedBoxLevelConnectorUtils::t_compute_internal_parts;
+tbox::Pointer<tbox::Timer> MappedBoxLevelConnectorUtils::t_compute_internal_parts_intersection;
+
+tbox::StartupShutdownManager::Handler
+MappedBoxLevelConnectorUtils::s_initialize_finalize_handler(
+   MappedBoxLevelConnectorUtils::initializeCallback,
+   0,
+   0,
+   MappedBoxLevelConnectorUtils::finalizeCallback,
+   tbox::StartupShutdownManager::priorityTimers);
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+MappedBoxLevelConnectorUtils::MappedBoxLevelConnectorUtils():
+   d_sanity_check_precond(false),
+   d_sanity_check_postcond(false)
+{
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void MappedBoxLevelConnectorUtils::setSanityCheckMethodPreconditions(
+   bool do_check)
+{
+   d_sanity_check_precond = do_check;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void MappedBoxLevelConnectorUtils::setSanityCheckMethodPostconditions(
+   bool do_check)
+{
+   d_sanity_check_postcond = do_check;
+}
+/*
+ ***********************************************************************
+ * Given the base and head levels, determine whether the base nests
+ * nests in the head.
+ ***********************************************************************
+ */
+bool MappedBoxLevelConnectorUtils::baseNestsInHead(
+   bool* locally_nests,
+   const MappedBoxLevel& base,
+   const MappedBoxLevel& head,
+   const IntVector& base_swell,
+   const IntVector& head_swell,
+   const IntVector& head_nesting_margin,
+   const hier::MappedBoxTree* domain) const
+{
+
+   tbox::Dimension dim(head.getDim());
+
+   TBOX_DIM_ASSERT_CHECK_ARGS2(head_nesting_margin, base_swell);
+
+   TBOX_ASSERT(head.getMPI() == base.getMPI());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   const IntVector &zero_vector(IntVector::getZero(dim));
+   TBOX_ASSERT(base_swell >= zero_vector);
+   TBOX_ASSERT(head_swell >= zero_vector);
+   TBOX_ASSERT(head_nesting_margin >= zero_vector);
+#endif
+
+   hier::IntVector required_gcw = base_swell;
+   if (head.getRefinementRatio() <= base.getRefinementRatio()) {
+      const IntVector ratio = base.getRefinementRatio()
+         / head.getRefinementRatio();
+      required_gcw += (head_swell + head_nesting_margin) * ratio;
+   } else if (head.getRefinementRatio() >= base.getRefinementRatio()) {
+      const IntVector ratio = head.getRefinementRatio()
+         / base.getRefinementRatio();
+      required_gcw += IntVector::ceiling((head_swell + head_nesting_margin), ratio);
+   } else {
+      TBOX_ERROR("MappedBoxLevelConnectorUtils::baseNestsInHead: head index space\n"
+         << "must be either a refinement or a coarsening of\n"
+         << "base, but not both.");
+   }
+
+   Connector base_to_head(
+      base,
+      head,
+      required_gcw);
+
+   OverlapConnectorAlgorithm oca;
+   oca.findOverlaps(base_to_head);
+
+   bool rval = baseNestsInHead(
+         locally_nests,
+         base_to_head,
+         base_swell,
+         head_swell,
+         head_nesting_margin,
+         domain);
+
+   return rval;
+}
+
+/*
+ ***********************************************************************
+ * Given a Connector, determine the extent to which the base nests in the
+ * head.  The Connector is assumed, without verification, to be complete.
+ *
+ * This method returns true if the base, grown by (non-negative)
+ * base_swell nests inside the head by a margin of head_nesting_margin.
+ * base_swell should be in the base index space and head_nesting_margin
+ * should be in the head index space.  The Connector GCW must be at least
+ * the sum of the base_swell and the appropriately converted
+ * head_nesting_margin.  base_swell and head_nesting_margin can be
+ * interchangable if you do the index space conversion yourself.
+ *
+ * If the domain is given, disregard non-nesting parts that are outside
+ * the domain.
+ ***********************************************************************
+ */
+bool MappedBoxLevelConnectorUtils::baseNestsInHead(
+   bool* locally_nests,
+   const Connector& connector,
+   const IntVector& base_swell,
+   const IntVector& head_swell,
+   const IntVector& head_nesting_margin,
+   const hier::MappedBoxTree* domain) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(
+      connector.getBase(), base_swell, head_nesting_margin);
+   TBOX_ASSERT(connector.isInitialized());
+   const tbox::Dimension& dim(connector.getBase().getDim());
+   TBOX_ASSERT(base_swell >= IntVector::getZero(dim));
+   TBOX_ASSERT(head_nesting_margin >= IntVector::getZero(dim));
+
+   /*
+    * To ensure correct results, connector must be sufficiently wide.
+    * It should be at least as wide as the combination of base_swell,
+    * head_swell and head_nesting_margin.
+    */
+   const hier::IntVector required_gcw =
+      base_swell
+      + (connector.getHeadCoarserFlag() ?
+         head_swell * connector.getRatio() :
+         IntVector::ceiling(head_swell, connector.getRatio()))
+      + (connector.getHeadCoarserFlag() ?
+         head_nesting_margin * connector.getRatio() :
+         IntVector::ceiling(head_nesting_margin, connector.getRatio()))
+      ;
+   if (!(connector.getConnectorWidth() >= required_gcw)) {
+      TBOX_ERROR("MappedBoxLevelConnectorUtils::baseNestsInHead: connector lacks sufficient\n"
+         << "ghost cell width for determining whether its base nests\n"
+         << "inside its head.");
+   }
+
+   hier::OverlapConnectorAlgorithm oca;
+
+   const MappedBoxLevel& base = connector.getBase();
+   const MappedBoxLevel& head = connector.getHead();
+
+   tbox::Pointer<hier::MappedBoxTree> refined_domain;
+   if (domain != NULL) {
+      refined_domain = domain->createRefinedTree(head.getRefinementRatio());
+   }
+
+   /*
+    * We swell the base then check for the parts outside the head if
+    * the head domain is grown by head_swell then shrunken by
+    * head_nesting_margin.
+    *
+    * TODO: We can probably remove the base swelling step by converting
+    * the base_swell into head index space and add it to
+    * head_nesting_margin.
+    */
+
+   MappedBoxLevel swelledbase(dim);
+   if (base_swell == IntVector::getZero(dim)) {
+      swelledbase = base;
+   } else {
+      const MappedBoxSet& base_mapped_boxes = base.getMappedBoxes();
+      MappedBoxSet swelledbase_mapped_boxes;
+      for (MappedBoxSet::const_iterator ni = base_mapped_boxes.begin();
+           ni != base_mapped_boxes.end(); ++ni) {
+         MappedBox swelledbase_mapped_box = *ni;
+         swelledbase_mapped_box.getBox().grow(base_swell);
+         swelledbase_mapped_boxes.insert(
+            swelledbase_mapped_boxes.end(), swelledbase_mapped_box);
+      }
+      swelledbase.swapInitialize(swelledbase_mapped_boxes,
+         base.getRefinementRatio(),
+         base.getMPI());
+   }
+
+   MappedBoxLevel swelledhead(dim);
+   NeighborhoodSet swelledbase_eto_swelledhead;
+   if (head_swell == IntVector::getZero(dim)) {
+      swelledhead = head;
+      swelledbase_eto_swelledhead = connector.getNeighborhoodSets();
+   } else {
+      const MappedBoxSet& head_mapped_boxes = head.getMappedBoxes();
+
+      MappedBoxSet swelledhead_mapped_boxes;
+
+      for (MappedBoxSet::const_iterator ni = head_mapped_boxes.begin();
+           ni != head_mapped_boxes.end(); ++ni) {
+         MappedBox swelledhead_mapped_box = *ni;
+
+         swelledhead_mapped_box.getBox().grow(head_swell);
+         swelledhead_mapped_boxes.insert(
+            swelledhead_mapped_boxes.end(), swelledhead_mapped_box);
+      }
+      swelledhead.swapInitialize(swelledhead_mapped_boxes,
+         head.getRefinementRatio(),
+         head.getMPI());
+
+      hier::MappedBoxContainerUtils::growNeighborsInNeighborhoodSet(
+         swelledbase_eto_swelledhead,
+         connector.getNeighborhoodSets(),
+         head_swell);
+   }
+
+
+   Connector swelledbase_to_swelledhead;
+   swelledbase_to_swelledhead.swapInitialize(
+      swelledbase,
+      swelledhead,
+      connector.getConnectorWidth() - base_swell,
+      swelledbase_eto_swelledhead,
+      MappedBoxLevel::DISTRIBUTED);
+   if ( d_sanity_check_precond &&
+        head_swell == hier::IntVector::getZero(dim) ) {
+      /*
+       * If head was swelled, it may generate undetected overlaps that
+       * cannot be compensated for by shrinking the connector width.
+       * The additional overlaps do not matter to the nesting check,
+       * so it does not affect our result.  Nevertheless, because they
+       * are not detected, don't make this check if head was swelled.
+       */
+      oca.assertOverlapCorrectness(swelledbase_to_swelledhead);
+   }
+
+   MappedBoxLevel external(dim);
+   Connector swelledbase_to_external;
+   if (domain) {
+      computeExternalParts(
+         external,
+         swelledbase_to_external,
+         swelledbase_to_swelledhead,
+         -head_nesting_margin,
+         *domain);
+   } else {
+      computeExternalParts(
+         external,
+         swelledbase_to_external,
+         swelledbase_to_swelledhead,
+         -head_nesting_margin,
+         MappedBoxTree(dim) );
+   }
+   if (domain) {
+      /*
+       * If domain is given, do not count external parts that are
+       * outside the domain.  In many usages, part of base is outside
+       * the domain and we want to ignore those parts.
+       */
+      hier::MappingConnectorAlgorithm mca;
+      std::vector<MappedBox> domain_mapped_boxes;
+      domain->getMappedBoxes(domain_mapped_boxes);
+      MappedBoxLevel domain_mapped_box_level(
+         IntVector::getOne(dim),
+         connector.getMPI(),
+         MappedBoxLevel::GLOBALIZED);
+      for (size_t i = 0; i < domain_mapped_boxes.size(); ++i) {
+         domain_mapped_box_level.addMappedBox(domain_mapped_boxes[i]);
+      }
+      Connector external_to_domain(
+         external,
+         domain_mapped_box_level,
+         base_swell);
+      oca.findOverlaps(external_to_domain);
+      MappedBoxLevel finalexternal(dim);
+      Connector external_to_finalexternal;
+      computeInternalParts(
+         finalexternal,
+         external_to_finalexternal,
+         external_to_domain,
+         IntVector::getZero(dim),
+         *domain);
+      mca.modify(swelledbase_to_external,
+         external_to_finalexternal,
+         &external,
+         &finalexternal);
+   }
+
+   if (locally_nests) {
+      *locally_nests = external.getLocalNumberOfBoxes() == 0;
+   }
+   bool globally_nests = external.getGlobalNumberOfBoxes() == 0;
+
+   return globally_nests;
+}
+
+/*
+ ***********************************************************************
+ * Make a Connector object for changing the MappedBox indices of a MappedBoxLevel.
+ *
+ * If sequentialize_global_indices is true, the indices are changed
+ * such that they become globally sequential, with processor n
+ * starting where processor n-1 ended.  In order to determine what the
+ * global indices should be, an allgather communication is used to
+ * determine how many mapped_boxes each processor has.  This is a
+ * utility function for resetting MappedBox indices to correspond to
+ * patch indices while we try to be backward compatible with non-DLBG
+ * parts of SAMRAI.
+ *
+ * If sort_mapped_boxes_by_corner is true, the local MappedBoxes are
+ * sorted by their corner indices.  This helps to de-randomize
+ * MappedBoxes that may be randomly ordered by non-deterministic
+ * algorithms.
+ ***********************************************************************
+ */
+void MappedBoxLevelConnectorUtils::makeSortingMap(
+   MappedBoxLevel& sorted_mapped_box_level,
+   Connector& output_map,
+   const MappedBoxLevel& unsorted_mapped_box_level,
+   bool sort_mapped_boxes_by_corner,
+   bool sequentialize_global_indices,
+   LocalId initial_sequential_index) const
+{
+   const tbox::Dimension& dim(unsorted_mapped_box_level.getDim());
+
+   if (!sort_mapped_boxes_by_corner && !sequentialize_global_indices) {
+      // Make a blank map.
+      sorted_mapped_box_level = unsorted_mapped_box_level;
+      output_map.initialize(
+         unsorted_mapped_box_level,
+         sorted_mapped_box_level,
+         hier::IntVector::getZero(dim),
+         MappedBoxLevel::DISTRIBUTED);
+      output_map.setConnectorType(Connector::MAPPING);
+      return;
+   }
+
+   t_make_sorting_map->start();
+
+   const MappedBoxSet& cur_mapped_boxes =
+      unsorted_mapped_box_level.getMappedBoxes();
+   int n_mapped_boxes = 
+      static_cast<int>(unsorted_mapped_box_level.getLocalNumberOfBoxes());
+
+   LocalId last_index = initial_sequential_index - 1;
+
+   if (sequentialize_global_indices) {
+
+      const int nproc = unsorted_mapped_box_level.getNproc();
+      const int rank = unsorted_mapped_box_level.getRank();
+
+      std::vector<int> all_n_mapped_boxes(nproc);
+      tbox::SAMRAI_MPI mpi(unsorted_mapped_box_level.getMPI());
+      if (mpi.getSize() > 1) {
+         mpi.Allgather(&n_mapped_boxes,
+            1,
+            MPI_INT,
+            &all_n_mapped_boxes[0],
+            1,
+            MPI_INT);
+      } else {
+         all_n_mapped_boxes[0] = n_mapped_boxes;
+      }
+
+      LocalId new_start_index = initial_sequential_index;
+      for (int i = 0; i < rank; ++i) {
+         new_start_index += all_n_mapped_boxes[i];
+      }
+      last_index = new_start_index - 1;
+
+   }
+
+   std::vector<MappedBox> real_mapped_box_vector;
+   std::vector<MappedBox> periodic_image_mapped_box_vector;
+   if (!cur_mapped_boxes.empty()) {
+      /*
+       * Bypass qsort if we have no mapped_boxes (else there is a memory warning).
+       */
+      hier::MappedBoxContainerUtils::separatePeriodicImages(
+         real_mapped_box_vector,
+         periodic_image_mapped_box_vector,
+         cur_mapped_boxes);
+      if (sort_mapped_boxes_by_corner) {
+         qsort((void *)&real_mapped_box_vector[0],
+            real_mapped_box_vector.size(),
+            sizeof(MappedBox),
+            qsortBoxCompare);
+      }
+   }
+
+   MappedBoxSet new_mapped_boxes;
+   NeighborhoodSet edges;
+
+   for (std::vector<MappedBox>::const_iterator ni = real_mapped_box_vector.begin();
+        ni != real_mapped_box_vector.end(); ++ni) {
+
+      const MappedBox& cur_mapped_box = *ni;
+      const MappedBox new_mapped_box(cur_mapped_box.getBox(),
+                                ++last_index,
+                                cur_mapped_box.getOwnerRank(),
+                                cur_mapped_box.getPeriodicShiftNumber());
+      new_mapped_boxes.insert(new_mapped_boxes.end(), new_mapped_box);
+
+      /*
+       * Now, add cur_mapped_box's periodic images, but give them cur_mapped_box's
+       * new LocalId.  In finding the image mapped_boxes, we use the fact
+       * that a real mapped_box's image follows the real mapped_box in a MappedBoxSet.
+       */
+      MappedBoxSet::const_iterator ini = cur_mapped_boxes.find(cur_mapped_box);
+      TBOX_ASSERT(ini != cur_mapped_boxes.end());
+      ++ini; // Skip the real mapped_box to look for its image mapped_boxes.
+      while (ini != cur_mapped_boxes.end() &&
+             ini->getGlobalId() == cur_mapped_box.getGlobalId()) {
+         const MappedBox& image_mapped_box = *ini;
+         const MappedBox new_image_mapped_box(image_mapped_box.getBox(),
+                                         new_mapped_box.getLocalId(),
+                                         new_mapped_box.getOwnerRank(),
+                                         image_mapped_box.
+                                         getPeriodicShiftNumber());
+         new_mapped_boxes.insert(new_mapped_boxes.end(), new_image_mapped_box);
+         ++ini;
+      }
+
+      /*
+       * Edge for the mapping.  By convention, image mapped_boxes are
+       * not explicitly mapped.  Also by convention, we don't create
+       * edges unless there is a change.
+       */
+      if (cur_mapped_box.getLocalId() != new_mapped_box.getLocalId()) {
+         edges[cur_mapped_box.getGlobalId()].insert(new_mapped_box);
+      }
+   }
+
+   sorted_mapped_box_level.swapInitialize(
+      new_mapped_boxes,
+      unsorted_mapped_box_level.getRefinementRatio(),
+      unsorted_mapped_box_level.getMPI(),
+      MappedBoxLevel::DISTRIBUTED);
+   output_map.swapInitialize(
+      unsorted_mapped_box_level,
+      sorted_mapped_box_level,
+      hier::IntVector::getZero(dim),
+      edges,
+      MappedBoxLevel::DISTRIBUTED);
+   output_map.setConnectorType(Connector::MAPPING);
+
+   t_make_sorting_map->stop();
+}
+
+/*
+ *************************************************************************
+ * for use when sorting integers using the C-library qsort
+ *************************************************************************
+ */
+int MappedBoxLevelConnectorUtils::qsortBoxCompare(
+   const void* v,
+   const void* w)
+{
+   const hier::IntVector& lowv = ((const hier::MappedBox *)v)->getBox().lower();
+   const hier::IntVector& loww = ((const hier::MappedBox *)w)->getBox().lower();
+   const tbox::Dimension& dim(lowv.getDim());
+   for (int i = 0; i < dim.getValue(); ++i) {
+      if (lowv[i] > loww[i]) return 1;
+
+      if (lowv[i] < loww[i]) return -1;
+   }
+   const hier::IntVector& upv = ((const hier::MappedBox *)v)->getBox().upper();
+   const hier::IntVector& upw = ((const hier::MappedBox *)w)->getBox().upper();
+   for (int i = 0; i < dim.getValue(); ++i) {
+      if (upv[i] > upw[i]) return 1;
+
+      if (upv[i] < upw[i]) return -1;
+   }
+   return 0;
+}
+
+/*
+ *************************************************************************
+ *
+ * Compare an input MappedBoxLevel to a "nominal" MappedBoxLevel.
+ * Identify parts of the input that are external to the nominal
+ * MappedBoxLevel, and store the external parts in an "external"
+ * mapped_box_level.  Create Connectors between the input and its
+ * external parts.
+ *
+ * For generality, the nominal MappedBoxLevel can be grown a specified
+ * ammount (nominal_mapped_box_level_growth) before comparing.
+ * nominal_mapped_box_level_growth must be in the index space of the
+ * input MappedBoxLevel (not the nominal MappedBoxLevel, despite the
+ * name).  A negative growth indicates shrinking the nominal layer at
+ * its perimeter.  As a practical consideration of how this method is used,
+ * we do not shrink the nominal layer where it touches the domain boundary.
+ * This feature can be disabled by specifying an uninitialized domain object.
+ *
+ * input_to_external is set to an appropriate mapping for
+ * Connector::modify().  An input mapped_box that is entirely internal
+ * gets mapped to an empty set (because it has no external part).  An
+ * input mapped_box that is entirely external does not get a map, since
+ * it would just get trivially mapped to itself.  An input mapped_box
+ * that has some parts outside the nominal mapped_box_level is mapped to
+ * its external parts.
+ *
+ * This method does not require any communication.
+ *
+ * Defs:
+ * L = MappedBoxLevel whose external parts are sought
+ * E = external parts
+ * N = nominal MappedBoxLevel
+ * g = nominal MappedBoxLevel growth (non-negative or non-positive, but not mixed)
+ * O = entire mesh domain (without periodic images)
+ *
+ * For non-negative nominal_mapped_box_level_growth:
+ *
+ * E <- L \ ( (N+g) \ O )
+ *
+ * Feb 25, 2008: New formula for non-positive nominal_mapped_box_level_growth:
+ *
+ * E <- L <intersection> { ( ( (N+1) \ N ) <intersection> O ) - g }
+ *                   A =       \___/
+ *                   B =     \___________/
+ *                   C =   \________________________________/
+ *                   D = \________________________________________/
+ *
+ * B = the border of N.  C is the interior border (parts of A that is
+ * inside the domain).
+ *
+ * The purpose of intersecting the boundary (N+1)\N with the domain O is
+ * to avoid shrinking N where it touches the domain boundary.  Although
+ * this makes an unusual definition of "external", it suits some of
+ * SAMRAI's special requirements where levels touch domain boundaries.
+ * To disable this feature, issue an uninitialized MappedBoxTree for the
+ * domain.
+ *
+ * A requirement of the computation for negative g is that input must
+ * nest in N+1-g.  In other words: L \ (N+1-g} = <empty>.  If not satisfied,
+ * this method may classify some external parts as internal.
+ *
+ *************************************************************************
+ */
+
+void MappedBoxLevelConnectorUtils::computeExternalParts(
+   hier::MappedBoxLevel& external,
+   hier::Connector& input_to_external,
+   const hier::Connector& input_to_nominal,
+   const hier::IntVector& nominal_mapped_box_level_growth,
+   const hier::MappedBoxTree& domain) const
+{
+   const tbox::Dimension& dim(nominal_mapped_box_level_growth.getDim());
+
+   t_compute_external_parts->start();
+
+   const MappedBoxLevel& input = input_to_nominal.getBase();
+
+   const hier::IntVector& zero_vec = IntVector::getZero(dim);
+   const hier::IntVector& one_vec = IntVector::getOne(dim);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (!(nominal_mapped_box_level_growth >= zero_vec) &&
+       !(nominal_mapped_box_level_growth <= zero_vec)) {
+      TBOX_ERROR(
+         "MappedBoxLevelConnectorUtils::computeExternalParts: internal error:\n"
+         << "nominal_mapped_box_level_growth cannot have mix of positive\n"
+         << "and negative values.");
+   }
+   if (nominal_mapped_box_level_growth >= zero_vec) {
+      if (!(input_to_nominal.getConnectorWidth() >=
+            nominal_mapped_box_level_growth)) {
+         TBOX_ERROR(
+            "MappedBoxLevelConnectorUtils::computeExternalParts: internal error:\n"
+            << "nominal_mapped_box_level_growth "
+            << nominal_mapped_box_level_growth << " exceeds\n"
+            << "ghost cell width " << input_to_nominal.getConnectorWidth()
+            << ",\n"
+            << "which can lead to possible missed overlaps.");
+      }
+   }
+#endif
+
+   const NeighborhoodSet& input_eto_nominal = input_to_nominal.getNeighborhoodSets();
+
+   external.initialize(input.getRefinementRatio(), input.getMPI());
+
+   /*
+    *  Keep track of last index so we don't give external an index
+    *  used by input.  This is required because if we allow external
+    *  to select an index it is not using, it may select one that is
+    *  used by input, creating an invalid mapping that prevents
+    *  Connector::modify() from working correctly.
+    *
+    *  Potential optimization: This loop uses many removeIntersections()
+    *  calls.  If it gets too slow, consider precomputing a MappedBoxTree
+    *  of all the visible neighbors (or one of the complement of all the
+    *  visible neighbors, depending on the sign of nominal_mapped_box_level_growth)
+    *  to speed up intersection removals.
+    */
+   LocalId last_used_index = input.getLastLocalId();
+
+   Connector::NeighborSet visible_nominal_nabrs;
+   hier::MappedBoxContainerUtils::getNeighborsFromNeighborhoodSet(visible_nominal_nabrs, input_eto_nominal);
+   std::vector<MappedBox> nominal_mapped_boxes_vec(
+      visible_nominal_nabrs.begin(), visible_nominal_nabrs.end());
+   visible_nominal_nabrs.clear();
+
+   /*
+    * Bring nominal_mapped_boxes_vec into refinement ratio of input
+    * (for intersection checks).
+    */
+   if (input_to_nominal.getRatio() != hier::IntVector::getOne(dim)) {
+      if (input_to_nominal.getHeadCoarserFlag()) {
+         hier::MappedBoxContainerUtils::refineMappedBoxes(
+            &nominal_mapped_boxes_vec[0],
+            nominal_mapped_boxes_vec.size(),
+            input_to_nominal.getRatio());
+      } else {
+         hier::MappedBoxContainerUtils::coarsenMappedBoxes(
+            &nominal_mapped_boxes_vec[0],
+            nominal_mapped_boxes_vec.size(),
+            input_to_nominal.getRatio());
+      }
+   }
+
+   /*
+    * Build the tree used for searching for either the internal or external
+    * parts (as specified by search_tree_repesents_internal).  The search tree
+    * is built differently, depending on the sign of nominal_mapped_box_level_growth.
+    */
+
+   hier::MappedBoxTree search_tree(dim);
+   bool search_tree_represents_internal;
+
+   if (nominal_mapped_box_level_growth == zero_vec) {
+      /*
+       * Zero nominal_mapped_box_level_growth.
+       * The nominal mapped_box_level represents the internl parts.
+       */
+      search_tree_represents_internal = true;
+      search_tree.generateTree(nominal_mapped_boxes_vec);
+   } else if (nominal_mapped_box_level_growth >= zero_vec) {
+      /*
+       * nominal_mapped_box_level_growth is non-negative, grow nominal
+       * mapped_boxes, which will then represent the internal parts.
+       */
+      search_tree_represents_internal = true;
+      hier::MappedBoxContainerUtils::growMappedBoxes(
+         &nominal_mapped_boxes_vec[0],
+         nominal_mapped_boxes_vec.size(),
+         nominal_mapped_box_level_growth);
+      search_tree.generateTree(nominal_mapped_boxes_vec);
+   } else {
+      /*
+       * nominal_mapped_box_level_growth is non-positive.  The external
+       * parts are given by the complex formula above for (A\B).
+       */
+
+      search_tree_represents_internal = false;
+
+      hier::BoxList nominal_boundary;
+      hier::MappedBoxContainerUtils::convertMappedBoxVectorToBoxList(
+            nominal_boundary, nominal_mapped_boxes_vec);
+      nominal_boundary.grow(one_vec);
+      // ... nominal_boundary is now (N+1)
+      hier::MappedBoxTree nominal_mapped_boxes_tree(dim,
+                                                    nominal_mapped_boxes_vec);
+      t_compute_external_parts_intersection->start();
+      nominal_boundary.removeIntersections(nominal_mapped_boxes_tree);
+      // ... nominal_boundary is now ( (N+1) \ N )
+      if (domain.isInitialized()) {
+         if (input.getRefinementRatio() == one_vec) {
+            nominal_boundary.intersectBoxes(domain);
+         } else {
+            tbox::Pointer<MappedBoxTree> refined_domain =
+               domain.createRefinedTree(input.getRefinementRatio());
+            nominal_boundary.intersectBoxes(*refined_domain);
+         }
+      }
+      // ... nominal_boundary is now ( (N+1) \ N ) <intersection> O )
+      t_compute_external_parts_intersection->stop();
+      nominal_boundary.grow(-nominal_mapped_box_level_growth);
+      // ... nominal_boundary is now ( (N+1) \ N ) <intersection> O ) - g
+      std::vector<MappedBox> nominal_boundary_vector;
+      hier::MappedBoxContainerUtils::convertBoxListToMappedBoxVector(nominal_boundary_vector,
+            nominal_boundary);
+      search_tree.generateTree(nominal_boundary_vector);
+
+   }
+
+   nominal_mapped_boxes_vec.clear();
+
+   const MappedBoxSet& input_mapped_boxes = input.getMappedBoxes();
+
+   NeighborhoodSet input_eto_external;
+
+   /*
+    * For each MappedBox in input_mapped_boxes, compare it to the
+    * search tree to compute its external parts.
+    */
+
+   for (RealMappedBoxConstIterator ni(input_mapped_boxes); ni.isValid();
+        ++ni) {
+
+      const hier::MappedBox& input_mapped_box = *ni;
+
+      NeighborhoodSet::const_iterator ei =
+         input_eto_nominal.find(ni->getGlobalId());
+
+      if (ei == input_eto_nominal.end()) {
+         /*
+          * Input mapped_box does not overlap nominal, so it must be
+          * completely external.
+          */
+         external.addMappedBox(input_mapped_box);
+         /*
+          * The input_mapped_box should be mapped to itself.
+          * We can create such a map, but a missing map
+          * means the same thing, so we omit the map
+          */
+      } else {
+
+         /*
+          * external_list will be what remains of input_mapped_box after
+          * removing parts we know (by comparing with the nominal
+          * mapped_box_level) to be internal.
+          */
+         hier::BoxList external_list(input_mapped_box.getBox());
+
+         t_compute_external_parts_intersection->start();
+         if (search_tree_represents_internal) {
+            external_list.removeIntersections(search_tree);
+         } else {
+            external_list.intersectBoxes(search_tree);
+         }
+         t_compute_external_parts_intersection->stop();
+
+         /*
+          * Make external mapped_boxes from external_list and create
+          * connectivity with input.
+          *
+          * We force a neighbor container to be created for input,
+          * even if it is replaced with nothing, because
+          * Connector::modify() interprets the presence
+          * of a neighbor list as a mapping.  Missing neighbor
+          * list mean "no change", which is not what we want.
+          */
+         if (external_list.size() == 1 &&
+             external_list.getFirstItem() == input_mapped_box.getBox()) {
+            /*
+             * The entire input_mapped_box is external.
+             * The input_mapped_box should be mapped to itself.
+             * We can create such a map, but a missing map
+             * means the same thing, so we omit the map
+             */
+            external.addMappedBox(input_mapped_box);
+         } else {
+            hier::Connector::NeighborSet
+            & replacements = input_eto_external[input_mapped_box.getGlobalId()];
+            for (hier::BoxList::Iterator bi(external_list); bi; bi++) {
+               const hier::MappedBox
+               external_mapped_box((*bi),
+                                   ++last_used_index,
+                                   input_mapped_box.getOwnerRank());
+               external.addMappedBox(external_mapped_box);
+               // Set connectivities between input and external.
+               replacements.insert(external_mapped_box);
+            }
+         }
+      }
+
+   }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (external.getMappedBoxes().empty()) {
+      /*
+       * If there are no external parts, then all in input
+       * should be mapped to empty neighbor containers according
+       * to the definition of a map in Connector::modify().
+       */
+      TBOX_ASSERT(input_eto_external.size() ==
+         input.getLocalNumberOfBoxes());
+      for (NeighborhoodSet::const_iterator ci = input_eto_external.begin();
+           ci != input_eto_external.end(); ++ci) {
+         TBOX_ASSERT((*ci).second.empty());
+      }
+   }
+#endif
+
+   /*
+    * input_to_external has zero width because a non-zero width means
+    * that we should have some edges from an input MappedBox and the
+    * external parts of a nearby-input MappedBox, which we don't.
+    * Moreover, we cannot compute edges unless we know input<==>input.
+    */
+   input_to_external.swapInitialize(
+      input,
+      external,
+      zero_vec,
+      input_eto_external,
+      hier::MappedBoxLevel::DISTRIBUTED);
+   input_to_external.setConnectorType(Connector::BASE_GENERATED);
+
+   TBOX_ASSERT(input_to_external.isLocal());
+
+#if 0
+   tbox::plog << "\n\nMappedBoxLevelConnectorUtils::computeExternalParts:input:\n" << input.format("", 2)
+              << "MappedBoxLevelConnectorUtils::computeExternalParts:external:\n" << external.format("", 2)
+              << "MappedBoxLevelConnectorUtils::computeExternalParts:input_to_external:\n" << input_to_external.format("", 2);
+   OverlapConnectorAlgorithm oca;
+   /*
+    * We only expect this check to pass if the input Connector is
+    * complete.  Users may issue an incomplete Connector if he knows
+    * what he's doing.
+    */
+   TBOX_ASSERT(oca.checkOverlapCorrectness(input_to_external) == 0);
+#endif
+
+   t_compute_external_parts->stop();
+}
+
+/*
+ *************************************************************************
+ *
+ * Compare an input MappedBoxLevel to a "nominal" MappedBoxLevel.
+ * Identify parts of the input that are internal to the nominal
+ * MappedBoxLevel, and store the internal parts in an "internal"
+ * mapped_box_level.  Create Connectors between the input and its
+ * internal parts.
+ *
+ * For generality, the nominal MappedBoxLevel can be grown a specified
+ * ammount (nominal_mapped_box_level_growth) before comparing.
+ * nominal_mapped_box_level_growth must be in the index space of the
+ * input mapped_box_level (not the nominal mapped_box_level, despite the
+ * name).  A negative growth indicates shrinking the nominal layer at its
+ * perimeter.
+ *
+ * As a practical consideration of how this method is used,
+ * we do not shrink the nominal layer where it touches the domain
+ * boundary.  This feature can be disabled by specifying an uninitialized
+ * domain object.  Calling this method with an unitialized domain object
+ * is equivalent to calling the overloaded computeInternalParts() that
+ * does not take a domain.
+ *
+ * On exit, input_to_internal is set to an appropriate mapping for use in
+ * MappingConnectorAlgorithms::modify().  An input mapped_box that is entirely
+ * external gets mapped to an empty set (because it has no internal
+ * part).  An input mapped_box that is entirely internal does not get a
+ * map, since it would just get trivially mapped to itself.  An input
+ * mapped_box that has some parts inside the nominal mapped_box_level is
+ * mapped to its internal parts.
+ *
+ * This method does not require any communication.
+ *
+ * Defs:
+ * L = mapped_box_level whose internal parts are sought
+ * N = nominal mapped_box_level
+ * g = nominal mapped_box_level growth (non-negative or non-positive, but not mixed)
+ * I = output parts of L internal to N^g
+ * O = entire mesh domain (without periodic images)
+ *
+ * For non-negative g:
+ *
+ * I <- L <intersection> { (N^g) <intersection> O }
+ *                   A = \________________________/
+ * A is internal to the grown nominal
+ *
+ * For non-positive g:
+ *
+ * E <- L \ { (O\N)^(-g) }
+ *      C = \____________/
+ *
+ * C is external to shrunken nominal.
+ *
+ * A requirement of the computation for negative g is that input must
+ * nest in N+1-g.  In other words: L \ (N+1-g} = <empty>.  If not satisfied,
+ * this method may classify some external parts as internal.
+ *
+ *************************************************************************
+ */
+
+void MappedBoxLevelConnectorUtils::computeInternalParts(
+   hier::MappedBoxLevel& internal,
+   hier::Connector& input_to_internal,
+   const hier::Connector& input_to_nominal,
+   const hier::IntVector& nominal_mapped_box_level_growth,
+   const hier::MappedBoxTree& domain) const
+{
+   const tbox::Dimension& dim(nominal_mapped_box_level_growth.getDim());
+
+   t_compute_internal_parts->start();
+
+   const MappedBoxLevel& input = input_to_nominal.getBase();
+
+   const IntVector& zero_vec(IntVector::getZero(dim));
+   const IntVector& one_vec(IntVector::getOne(dim));
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (!(nominal_mapped_box_level_growth >= zero_vec) &&
+       !(nominal_mapped_box_level_growth <= zero_vec)) {
+      TBOX_ERROR(
+         "MappedBoxLevelConnectorUtils::computeInternalParts: input parameter error:\n"
+         << "nominal_mapped_box_level_growth cannot have mix of positive\n"
+         << "and negative values.");
+   }
+   if (nominal_mapped_box_level_growth >= zero_vec) {
+      if (!(input_to_nominal.getConnectorWidth() >=
+            nominal_mapped_box_level_growth)) {
+         TBOX_ERROR(
+            "MappedBoxLevelConnectorUtils::computeInternalParts: internal error:\n"
+            << "nominal_mapped_box_level_growth "
+            << nominal_mapped_box_level_growth << " exceeds\n"
+            << "ghost cell width " << input_to_nominal.getConnectorWidth()
+            << ",\n"
+            << "which can lead to possible missed overlaps.");
+      }
+   }
+#endif
+
+#if 0
+   tbox::plog << "MappedBoxLevelConnectorUtils::computeInternalParts: input:\n" << input.format("", 2)
+              << "MappedBoxLevelConnectorUtils::computeInternalParts: nominal:\n" << input_to_nominal.getHead().format("", 2)
+              << "MappedBoxLevelConnectorUtils::computeInternalParts: input_to_nominal:\n" << input_to_nominal.format("", 2);
+#endif
+
+   const NeighborhoodSet& input_eto_nominal = input_to_nominal.getNeighborhoodSets();
+
+   internal.initialize(input.getRefinementRatio(), input.getMPI());
+
+   /*
+    * Keep track of last index so we don't give internal an index
+    * used by input.  This is required because if we allow internal
+    * to select an index it is not using, it may select one that is
+    * used by input, creating an invalid mapping that prevents
+    * MappingConnectorAlgorithm::modify() from working correctly.
+    */
+   LocalId last_used_index = input.getLastLocalId();
+
+   Connector::NeighborSet visible_nominal_nabrs;
+   hier::MappedBoxContainerUtils::getNeighborsFromNeighborhoodSet(visible_nominal_nabrs, input_eto_nominal);
+   BoxList nominal_box_list;
+   hier::MappedBoxContainerUtils::convertMappedBoxSetToBoxList(nominal_box_list,
+         visible_nominal_nabrs);
+   visible_nominal_nabrs.clear();
+
+   // Bring nominal boxes into refinement ratio of input (for intersection checks).
+   if (input_to_nominal.getRatio() != hier::IntVector::getOne(dim)) {
+      if (input_to_nominal.getHeadCoarserFlag()) {
+         nominal_box_list.refine(input_to_nominal.getRatio());
+      } else {
+         nominal_box_list.coarsen(input_to_nominal.getRatio());
+      }
+   }
+
+   /*
+    * Build the search tree containing either the internal or external
+    * parts (as specified by search_tree_repesents_internal).  The
+    * search tree is built differently, depending on the sign of
+    * nominal_mapped_box_level_growth.
+    */
+
+   hier::MappedBoxTree search_tree(dim);
+   bool search_tree_represents_internal;
+
+   if (nominal_mapped_box_level_growth == zero_vec) {
+      /*
+       * Zero nominal_mapped_box_level_growth.
+       * The nominal mapped_box_level represents the internal parts.
+       */
+      search_tree_represents_internal = true;
+      if ( domain.isInitialized() ) {
+         if (input.getRefinementRatio() == one_vec) {
+            nominal_box_list.intersectBoxes(domain);
+         } else {
+            tbox::Pointer<MappedBoxTree> refined_domain =
+               domain.createRefinedTree(input.getRefinementRatio());
+            nominal_box_list.intersectBoxes(*refined_domain);
+         }
+      }
+      std::vector<MappedBox> nominal_mapped_boxes_vec;
+      hier::MappedBoxContainerUtils::convertBoxListToMappedBoxVector(nominal_mapped_boxes_vec,
+            nominal_box_list);
+      search_tree.generateTree(nominal_mapped_boxes_vec);
+   } else if (nominal_mapped_box_level_growth >= zero_vec) {
+      /*
+       * nominal_mapped_box_level_growth is non-negative, grow nominal
+       * mapped_boxes, which will then represent the internal parts.
+       */
+      search_tree_represents_internal = true;
+      nominal_box_list.grow(nominal_mapped_box_level_growth);
+      if ( domain.isInitialized() ) {
+         if (input.getRefinementRatio() == one_vec) {
+            nominal_box_list.intersectBoxes(domain);
+         } else {
+            tbox::Pointer<MappedBoxTree> refined_domain =
+               domain.createRefinedTree(input.getRefinementRatio());
+            nominal_box_list.intersectBoxes(*refined_domain);
+         }
+      }
+      std::vector<MappedBox> nominal_mapped_boxes_vec;
+      hier::MappedBoxContainerUtils::convertBoxListToMappedBoxVector(nominal_mapped_boxes_vec,
+            nominal_box_list);
+      search_tree.generateTree(nominal_mapped_boxes_vec);
+   } else {
+      TBOX_ERROR(
+         "For lack of need, this method is not currently supporting non-positive g.");
+      /*
+       * nominal_mapped_box_level_growth is non-positive.
+       * The shrunken nominal mapped_box_level is given by (O\N)-g.
+       * The interior is L intersected with (O\N)-g.
+       */
+
+      search_tree_represents_internal = false;
+
+      std::vector<MappedBox> nominal_mapped_boxes_vec;
+      search_tree.generateTree(nominal_mapped_boxes_vec);
+      std::vector<hier::MappedBox> domain_mapped_boxes;
+      domain.getMappedBoxes(domain_mapped_boxes);
+      BoxList domain_box_list;
+      hier::MappedBoxContainerUtils::convertMappedBoxVectorToBoxList(domain_box_list,
+            domain_mapped_boxes);
+      domain_box_list.removeIntersections(search_tree);
+
+      hier::BoxList nominal_boundary;
+      hier::MappedBoxContainerUtils::convertMappedBoxVectorToBoxList(nominal_boundary,
+            nominal_mapped_boxes_vec);
+      nominal_boundary.grow(one_vec);
+      // ... nominal_boundary is now (N+1)
+      hier::MappedBoxTree nominal_mapped_boxes_tree(dim,
+                                                    nominal_mapped_boxes_vec);
+      t_compute_internal_parts_intersection->start();
+      nominal_boundary.removeIntersections(nominal_mapped_boxes_tree);
+      // ... nominal_boundary is now ( (N+1) \ N )
+      if (domain.isInitialized()) {
+         if (input.getRefinementRatio() == one_vec) {
+            nominal_boundary.intersectBoxes(domain);
+         } else {
+            tbox::Pointer<MappedBoxTree> refined_domain =
+               domain.createRefinedTree(input.getRefinementRatio());
+            nominal_boundary.intersectBoxes(*refined_domain);
+         }
+      }
+      // ... nominal_boundary is now ( (N+1) \ N ) <intersection> O )
+      t_compute_internal_parts_intersection->stop();
+      nominal_boundary.grow(-nominal_mapped_box_level_growth);
+      // ... nominal_boundary is now ( (N+1) \ N ) <intersection> O ) - g
+      std::vector<MappedBox> nominal_boundary_vector;
+      hier::MappedBoxContainerUtils::convertBoxListToMappedBoxVector(nominal_boundary_vector,
+            nominal_boundary);
+      search_tree.generateTree(nominal_boundary_vector);
+
+   }
+
+   // nominal_mapped_boxes_vec.clear();
+
+   const MappedBoxSet& input_mapped_boxes = input.getMappedBoxes();
+
+   NeighborhoodSet input_eto_internal;
+
+   /*
+    * For each MappedBox in input_mapped_boxes, compare it to the
+    * search tree to compute its internal parts.
+    */
+
+   for (RealMappedBoxConstIterator ni(input_mapped_boxes); ni.isValid();
+        ++ni) {
+
+      const hier::MappedBox& input_mapped_box = *ni;
+
+      NeighborhoodSet::const_iterator ei = input_eto_nominal.find(ni->getGlobalId());
+
+      if (ei == input_eto_nominal.end()) {
+         /*
+          * Input mapped_box does not overlap nominal, so it must be
+          * completely external.  Create a blank neighbor set to map it
+          * to nothing.
+          */
+         input_eto_internal[input_mapped_box.getGlobalId()];
+      } else {
+
+         /*
+          * internal_list will be the intersection of input_mapped_box
+          * neighbors on the nominal mapped_box_level.
+          */
+         hier::BoxList internal_list(input_mapped_box.getBox());
+
+         t_compute_internal_parts_intersection->start();
+         if (search_tree_represents_internal) {
+            internal_list.intersectBoxes(search_tree);
+         } else {
+            internal_list.removeIntersections(search_tree);
+         }
+         t_compute_internal_parts_intersection->stop();
+
+         /*
+          * Make internal mapped_boxes from internal_list and create
+          * connectivity with input.
+          *
+          * We force a neighbor container to be created for input,
+          * even if it is replaced with nothing, because
+          * Connector::modify() interprets the presence
+          * of a neighbor list as a mapping.  Missing neighbor
+          * list mean "no change", which is not what we want.
+          */
+         if (internal_list.size() == 1 &&
+             internal_list.getFirstItem() == input_mapped_box.getBox()) {
+            /*
+             * The entire input_mapped_box is internal.
+             * The input_mapped_box should be mapped to itself.
+             * We can create such a map, but a missing map
+             * means the same thing, so we omit the map
+             */
+            internal.addMappedBox(input_mapped_box);
+         } else {
+            hier::Connector::NeighborSet
+            & replacements = input_eto_internal[input_mapped_box.getGlobalId()];
+            for (hier::BoxList::Iterator bi(internal_list); bi; bi++) {
+               const hier::MappedBox
+               internal_mapped_box((*bi),
+                                   ++last_used_index,
+                                   input_mapped_box.getOwnerRank());
+               internal.addMappedBox(internal_mapped_box);
+               // Set connectivities between input and internal.
+               replacements.insert(internal_mapped_box);
+            }
+         }
+      }
+
+   }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (internal.getMappedBoxes().empty()) {
+      /*
+       * If there are no internal parts, then all in input
+       * should be mapped to empty neighbor containers according
+       * to the definition of a map in Connector::modify().
+       */
+      if (0) {
+         tbox::plog << "input/nominal/internal:\n"
+                    << "input:\n" << input.format("", 2)
+                    << "nominal:\n" << input_to_nominal.getHead().format("", 2)
+                    << "input_to_nominal:\n" << input_to_nominal.format("", 3)
+                    << "internal:\n" << internal.format("", 2)
+                    << input_eto_internal.size() << ' '
+                    << input.getMappedBoxes().size() << std::endl;
+      }
+      TBOX_ASSERT(input_eto_internal.size() == input.getLocalNumberOfBoxes());
+      for (NeighborhoodSet::const_iterator ci = input_eto_internal.begin();
+           ci != input_eto_internal.end(); ++ci) {
+         TBOX_ASSERT((*ci).second.empty());
+      }
+   }
+#endif
+
+   input_to_internal.swapInitialize(
+      input,
+      internal,
+      zero_vec,
+      input_eto_internal,
+      hier::MappedBoxLevel::DISTRIBUTED);
+   input_to_internal.setConnectorType(Connector::MAPPING);
+
+   TBOX_ASSERT(input_to_internal.isLocal());
+
+#if 0
+   tbox::plog << "\n\nMappedBoxLevelConnectorUtils::computeInternalParts:input:\n" << input.format("", 2)
+              << "MappedBoxLevelConnectorUtils::computeInternalParts:internal:\n" << internal.format("", 2)
+              << "MappedBoxLevelConnectorUtils::computeInternalParts:input_to_internal:\n" << input_to_internal.format("", 2)
+   TBOX_ASSERT(input_to_internal.checkOverlapCorrectness(true) == 0);
+#endif
+
+   t_compute_internal_parts->stop();
+}
+
+/*
+ *************************************************************************
+ *
+ * Compare an input MappedBoxLevel to a "nominal" MappedBoxLevel.
+ * Identify parts of the input that are internal to the nominal
+ * MappedBoxLevel, and store the internal parts in an "internal"
+ * mapped_box_level.  Create Connectors between the input and its
+ * internal parts.
+ *
+ * For generality, the nominal MappedBoxLevel can be grown a specified
+ * ammount (nominal_mapped_box_level_growth) before comparing.
+ * nominal_mapped_box_level_growth must be in the index space of the
+ * input mapped_box_level (not the nominal mapped_box_level, despite the
+ * name).  A negative growth indicates shrinking the nominal layer at its
+ * perimeter.
+ *
+ * On exit, input_to_internal is set to an appropriate mapping for use in
+ * MappingConnectorAlgorithms::modify().  An input mapped_box that is entirely
+ * external gets mapped to an empty set (because it has no internal
+ * part).  An input mapped_box that is entirely internal does not get a
+ * map, since it would just get trivially mapped to itself.  An input
+ * mapped_box that has some parts inside the nominal mapped_box_level is
+ * mapped to its internal parts.
+ *
+ * This method does not require any communication.
+ *
+ * Defs:
+ * L = mapped_box_level whose internal parts are sought
+ * N = nominal mapped_box_level
+ * g = nominal mapped_box_level growth (non-negative or non-positive, but not mixed)
+ * I = output parts of L internal to N^g
+ * U = some usable representation of the "universe"
+ *
+ * For non-negative g:
+ *
+ * I <- L <intersection> (N^g)
+ *                   A = \___/
+ * A is internal to the grown nominal
+ *
+ * For non-positive g:
+ *
+ * I <- L \ { (U\N)^(-g) }
+ *      C = \____________/
+ *
+ * C is external to shrunken nominal.
+ *
+ * A requirement of the computation for negative g is that input must
+ * nest in N+1-g.  In other words: L \ (N+1-g} = <empty>.  If not satisfied,
+ * this method may classify some external parts as internal.
+ *
+ *************************************************************************
+ */
+
+void MappedBoxLevelConnectorUtils::computeInternalParts(
+   hier::MappedBoxLevel& internal,
+   hier::Connector& input_to_internal,
+   const hier::Connector& input_to_nominal,
+   const hier::IntVector& nominal_mapped_box_level_growth) const
+{
+   const tbox::Dimension& dim(nominal_mapped_box_level_growth.getDim());
+
+   t_compute_internal_parts->start();
+
+   const MappedBoxLevel& input = input_to_nominal.getBase();
+
+   const IntVector& zero_vec(IntVector::getZero(dim));
+   const IntVector& one_vec(IntVector::getOne(dim));
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (!(nominal_mapped_box_level_growth >= zero_vec) &&
+       !(nominal_mapped_box_level_growth <= zero_vec)) {
+      TBOX_ERROR(
+         "MappedBoxLevelConnectorUtils::computeInternalParts: input parameter error:\n"
+         << "nominal_mapped_box_level_growth cannot have mix of positive\n"
+         << "and negative values.");
+   }
+   if (nominal_mapped_box_level_growth >= zero_vec) {
+      if (!(input_to_nominal.getConnectorWidth() >=
+            nominal_mapped_box_level_growth)) {
+         TBOX_ERROR(
+            "MappedBoxLevelConnectorUtils::computeInternalParts: internal error:\n"
+            << "nominal_mapped_box_level_growth "
+            << nominal_mapped_box_level_growth << " exceeds\n"
+            << "ghost cell width " << input_to_nominal.getConnectorWidth()
+            << ",\n"
+            << "which can lead to possible missed overlaps.");
+      }
+   }
+#endif
+
+#if 0
+   tbox::plog << "MappedBoxLevelConnectorUtils::computeInternalParts: input:\n" << input.format("", 2)
+              << "MappedBoxLevelConnectorUtils::computeInternalParts: nominal:\n" << input_to_nominal.getHead().format("", 2)
+              << "MappedBoxLevelConnectorUtils::computeInternalParts: input_to_nominal:\n" << input_to_nominal.format("", 2);
+#endif
+
+   const NeighborhoodSet& input_eto_nominal = input_to_nominal.getNeighborhoodSets();
+
+   internal.initialize(input.getRefinementRatio(), input.getMPI());
+
+   /*
+    * Keep track of last index so we don't give internal an index
+    * used by input.  This is required because if we allow internal
+    * to select an index it is not using, it may select one that is
+    * used by input, creating an invalid mapping that prevents
+    * Connector::modify() from working correctly.
+    */
+   LocalId last_used_index = input.getLastLocalId();
+
+   Connector::NeighborSet visible_nominal_nabrs;
+   hier::MappedBoxContainerUtils::getNeighborsFromNeighborhoodSet(visible_nominal_nabrs, input_eto_nominal);
+   std::vector<MappedBox> nominal_mapped_boxes_vec(
+      visible_nominal_nabrs.begin(), visible_nominal_nabrs.end());
+   visible_nominal_nabrs.clear();
+
+   // Bring nominal_mapped_boxes_vec into refinement ratio of input (for intersection checks).
+   if (input_to_nominal.getRatio() != hier::IntVector::getOne(dim)) {
+      if (input_to_nominal.getHeadCoarserFlag()) {
+         hier::MappedBoxContainerUtils::refineMappedBoxes(
+            &nominal_mapped_boxes_vec[0],
+            nominal_mapped_boxes_vec.size(),
+            input_to_nominal.getRatio());
+      } else {
+         hier::MappedBoxContainerUtils::coarsenMappedBoxes(
+            &nominal_mapped_boxes_vec[0],
+            nominal_mapped_boxes_vec.size(),
+            input_to_nominal.getRatio());
+      }
+   }
+
+   /*
+    * Build the tree used for searching for either the internal or external
+    * parts (as specified by search_tree_repesents_internal).  The search tree
+    * is built differently, depending on the sign of nominal_mapped_box_level_growth.
+    */
+
+   hier::MappedBoxTree search_tree(dim);
+   bool search_tree_represents_internal;
+
+   if (nominal_mapped_box_level_growth == zero_vec) {
+      /*
+       * Zero nominal_mapped_box_level_growth.  The search tree of
+       * nominal MappedBoxes will represent the internal parts.
+       */
+      search_tree_represents_internal = true;
+      search_tree.generateTree(nominal_mapped_boxes_vec);
+   } else if (nominal_mapped_box_level_growth >= zero_vec) {
+      /*
+       * nominal_mapped_box_level_growth is non-negative, grow nominal
+       * mapped_boxes, which will then represent the internal parts.
+       */
+      search_tree_represents_internal = true;
+      hier::MappedBoxContainerUtils::growMappedBoxes(&nominal_mapped_boxes_vec[0],
+         nominal_mapped_boxes_vec.size(),
+         nominal_mapped_box_level_growth);
+      search_tree.generateTree(nominal_mapped_boxes_vec);
+   } else {
+      TBOX_ERROR(
+         "For lack of need, this method is not currently supporting non-positive g.");
+      /*
+       * nominal_mapped_box_level_growth is non-positive.
+       * The shrunken nominal mapped_box_level is given by (U\N)-g.
+       * The interior is L intersected with (U\N)-g.
+       */
+      // The rest of this block is pasted from elsewhere for reference purposes.  It does not work.
+
+      MappedBoxTree domain(dim);
+
+      search_tree_represents_internal = false;
+
+      search_tree.generateTree(nominal_mapped_boxes_vec);
+      std::vector<hier::MappedBox> domain_mapped_boxes;
+      domain.getMappedBoxes(domain_mapped_boxes);
+      BoxList domain_box_list;
+      hier::MappedBoxContainerUtils::convertMappedBoxVectorToBoxList(domain_box_list,
+            domain_mapped_boxes);
+      domain_box_list.removeIntersections(search_tree);
+
+      hier::BoxList nominal_boundary;
+      hier::MappedBoxContainerUtils::convertMappedBoxVectorToBoxList(nominal_boundary,
+            nominal_mapped_boxes_vec);
+      nominal_boundary.grow(one_vec);
+      // ... nominal_boundary is now (N+1)
+      hier::MappedBoxTree nominal_mapped_boxes_tree(dim,
+                                                    nominal_mapped_boxes_vec);
+      t_compute_internal_parts_intersection->start();
+      nominal_boundary.removeIntersections(nominal_mapped_boxes_tree);
+      // ... nominal_boundary is now ( (N+1) \ N )
+      if (domain.isInitialized()) {
+         if (input.getRefinementRatio() == one_vec) {
+            nominal_boundary.intersectBoxes(domain);
+         } else {
+            tbox::Pointer<MappedBoxTree> refined_domain =
+               domain.createRefinedTree(input.getRefinementRatio());
+            nominal_boundary.intersectBoxes(*refined_domain);
+         }
+      }
+      // ... nominal_boundary is now ( (N+1) \ N ) <intersection> O )
+      t_compute_internal_parts_intersection->stop();
+      nominal_boundary.grow(-nominal_mapped_box_level_growth);
+      // ... nominal_boundary is now ( (N+1) \ N ) <intersection> O ) - g
+      std::vector<MappedBox> nominal_boundary_vector;
+      hier::MappedBoxContainerUtils::convertBoxListToMappedBoxVector(nominal_boundary_vector,
+            nominal_boundary);
+      search_tree.generateTree(nominal_boundary_vector);
+
+   }
+
+   nominal_mapped_boxes_vec.clear();
+
+   const MappedBoxSet& input_mapped_boxes = input.getMappedBoxes();
+
+   NeighborhoodSet input_eto_internal;
+
+   /*
+    * For each MappedBox in input_mapped_boxes, compare it to the
+    * search tree to compute its internal parts.
+    */
+
+   for (RealMappedBoxConstIterator ni(input_mapped_boxes); ni.isValid();
+        ++ni) {
+
+      const hier::MappedBox& input_mapped_box = *ni;
+
+      NeighborhoodSet::const_iterator ei = input_eto_nominal.find(ni->getGlobalId());
+
+      if (ei == input_eto_nominal.end()) {
+         /*
+          * Input mapped_box does not overlap nominal, so it must be
+          * completely external.  Create a blank neighbor set to map it
+          * to nothing.
+          */
+         input_eto_internal[input_mapped_box.getGlobalId()];
+      } else {
+
+         /*
+          * internal_list will be the intersection of input_mapped_box
+          * neighbors and the nominal mapped_box_level.
+          */
+         hier::BoxList internal_list(input_mapped_box.getBox());
+
+         t_compute_internal_parts_intersection->start();
+         if (search_tree_represents_internal) {
+            internal_list.intersectBoxes(search_tree);
+         } else {
+            internal_list.removeIntersections(search_tree);
+         }
+         t_compute_internal_parts_intersection->stop();
+
+         /*
+          * Make internal MappedBoxes from internal_list and create
+          * relationship with input MappedBoxes.
+          *
+          * We force a neighbor container to be created for input,
+          * even if it is replaced with nothing, because
+          * Connector::modify() interprets the presence
+          * of a neighbor list as a mapping.  Missing neighbor
+          * list mean "no change", which is not what we want.
+          */
+         if (internal_list.size() == 1 &&
+             internal_list.getFirstItem() == input_mapped_box.getBox()) {
+            /*
+             * The entire input_mapped_box is internal.
+             * The input_mapped_box should be mapped to itself.
+             * We can create such a map, but a missing map
+             * means the same thing, so we omit the map
+             */
+            internal.addMappedBox(input_mapped_box);
+         } else {
+            hier::Connector::NeighborSet
+            & replacements = input_eto_internal[input_mapped_box.getGlobalId()];
+            for (hier::BoxList::Iterator bi(internal_list); bi; bi++) {
+               const hier::MappedBox
+               internal_mapped_box((*bi),
+                                   ++last_used_index,
+                                   input_mapped_box.getOwnerRank());
+               internal.addMappedBox(internal_mapped_box);
+               // Set connectivities between input and internal.
+               replacements.insert(internal_mapped_box);
+            }
+         }
+      }
+
+   }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (internal.getMappedBoxes().empty()) {
+      /*
+       * If there are no internal parts, then all in input
+       * should be mapped to empty neighbor containers according
+       * to the definition of a map in Connector::modify().
+       */
+      if (0) {
+         tbox::plog << "input/nominal/internal:\n"
+                    << "input:\n" << input.format("", 2)
+                    << "nominal:\n" << input_to_nominal.getHead().format("", 2)
+                    << "input_to_nominal:\n" << input_to_nominal.format("", 3)
+                    << "internal:\n" << internal.format("", 2)
+                    << input_eto_internal.size() << ' '
+                    << input.getMappedBoxes().size() << std::endl;
+      }
+      TBOX_ASSERT(input_eto_internal.size() == input.getLocalNumberOfBoxes());
+      for (NeighborhoodSet::const_iterator ci = input_eto_internal.begin();
+           ci != input_eto_internal.end(); ++ci) {
+         TBOX_ASSERT((*ci).second.empty());
+      }
+   }
+#endif
+
+   input_to_internal.swapInitialize(
+      input,
+      internal,
+      zero_vec,
+      input_eto_internal,
+      hier::MappedBoxLevel::DISTRIBUTED);
+
+   TBOX_ASSERT(input_to_internal.isLocal());
+
+#if 0
+   tbox::plog << "\n\nMappedBoxLevelConnectorUtils::computeInternalParts:input:\n" << input.format("", 2)
+              << "MappedBoxLevelConnectorUtils::computeInternalParts:internal:\n" << internal.format("", 2)
+              << "MappedBoxLevelConnectorUtils::computeInternalParts:input_to_internal:\n" << input_to_internal.format("", 2);
+   TBOX_ASSERT(input_to_internal.checkOverlapCorrectness(true) == 0);
+#endif
+
+   t_compute_internal_parts->stop();
+}
+
+
+/*
+ *************************************************************************
+ * Given a mapping from an original MappedBoxLevel to parts to be
+ * removed, construct the remainder MappedBoxLevel and the mapping from
+ * the original to a remainder.
+ *************************************************************************
+ */
+
+void MappedBoxLevelConnectorUtils::makeRemainderMap(
+   MappedBoxLevel& remainder,
+   Connector& orig_to_remainder,
+   const Connector& orig_to_rejection) const
+{
+   TBOX_ASSERT(orig_to_rejection.isLocal());
+
+   const tbox::Dimension& dim(remainder.getDim());
+
+   /*
+    * remainder_nodes starts as a copy of orig codes.
+    * It will be modified to become the remainder version.
+    *
+    * orig_to_remainder is the mapping between orig and
+    * its properly remainder version.
+    */
+
+   const MappedBoxLevel& orig = orig_to_rejection.getBase();
+   const MappedBoxSet& orig_nodes = orig.getMappedBoxes();
+   const int rank = orig.getRank();
+   MappedBoxSet remainder_nodes = orig_nodes;
+
+   /*
+    * Track last used index to ensure we use unique indices
+    * for new nodes, so that Connector::modify() works properly.
+    */
+   LocalId last_used_index = orig.getLastLocalId();
+
+   NeighborhoodSet orig_eto_remainder;
+
+   const NeighborhoodSet& orig_eto_rejection = orig_to_rejection.getNeighborhoodSets();
+
+   for (MappedBoxSet::const_iterator ni = orig_nodes.begin();
+        ni != orig_nodes.end(); ++ni) {
+
+      const hier::MappedBox& orig_node = *ni;
+      const GlobalId global_id = orig_node.getGlobalId();
+
+      NeighborhoodSet::const_iterator ci =
+         orig_eto_rejection.find(orig_node.getGlobalId());
+
+      if (ci == orig_eto_rejection.end()) {
+         /*
+          * By the definition of a mapping Connector, no mapping means
+          * the entire orig_node violates.
+          *
+          * - Erase violating node from remainder_nodes
+          * - Build connectivities in orig_to_remainder (empty neighbor list).
+          */
+         remainder_nodes.erase(orig_node);
+
+         TBOX_ASSERT(orig_eto_remainder.find(
+               global_id) == orig_eto_remainder.end());
+
+         orig_eto_remainder[global_id];
+      } else if (ci->second.empty()) {
+         /*
+          * By the definition of a mapping Connector, empty mapping means
+          * entire orig_node does NOT violate.
+          *
+          * No orig<->remainder mapping is required.
+          */
+      } else {
+         /*
+          * The orig_node partially violates.
+          *
+          * - Erase violating node from remainder_nodes
+          * - Remove violating parts to obtain nesting parts
+          * - Add nesting parts to remainder_nodes
+          * - Build connectivities in orig_to_remainder
+          */
+
+         const hier::Connector::NeighborSet& rejections = (*ci).second;
+
+         remainder_nodes.erase(orig_node);
+
+         hier::BoxList nesting_parts_list(orig_node.getBox());
+
+         for (hier::Connector::NeighborSet::const_iterator
+              vi = rejections.begin(); vi != rejections.end(); ++vi) {
+            nesting_parts_list.removeIntersections((*vi).getBox());
+         }
+         /*
+          * Coalesce the nesting_parts_list, because it may have unneeded cuts.
+          * The coalesce algorithm is O(N^2) or O(N^3), but we expect the
+          * length of nesting_parts to be very small.
+          */
+         if (nesting_parts_list.size() > 1) {
+            nesting_parts_list.coalesceBoxes();
+         }
+
+         /*
+          * Create orig_eto_remainder[global_id] even if nesting_parts_list
+          * is empty because its existence defines the required mapping from
+          * the orig node to a (possibly empty) container of nesting parts.
+          */
+         Connector::NeighborSet& nesting_parts = orig_eto_remainder[global_id];
+         for (hier::BoxList::Iterator bi(nesting_parts_list);
+              bi; bi++) {
+            hier::Box new_box = (*bi);
+            hier::MappedBox new_node(new_box, ++last_used_index,
+                                     rank);
+            remainder_nodes.insert(remainder_nodes.end(), new_node);
+            nesting_parts.insert(nesting_parts.end(), new_node);
+         }
+      }
+
+   }
+
+   if (0) {
+      tbox::plog << "orig orig:\n" << orig.format("", 3);
+   }
+   remainder.initialize(
+      remainder_nodes,
+      orig.getRefinementRatio(),
+      orig.getMPI(),
+      hier::MappedBoxLevel::DISTRIBUTED);
+
+   orig_to_remainder.initialize(
+      orig,
+      remainder,
+      hier::IntVector::getZero(dim),
+      orig_eto_remainder,
+      hier::MappedBoxLevel::DISTRIBUTED);
+}
+
+/*
+ *************************************************************************
+ * Add periodic images to a MappedBoxLevel.
+ *
+ * We add the periodic images by examining real Mapped_boxes in the
+ * MappedBoxLevel.  For each real mapped_box, consider all of its
+ * possible periodic images and add those that are within the
+ * given width of the domain.
+ *************************************************************************
+ */
+
+void MappedBoxLevelConnectorUtils::addPeriodicImages(
+   MappedBoxLevel& mapped_box_level,
+   const hier::MappedBoxTree& domain_search_tree,
+   const IntVector &threshold_distance) const
+{
+   const hier::PeriodicShiftCatalog* shift_catalog =
+      hier::PeriodicShiftCatalog::getCatalog(mapped_box_level.getDim());
+
+   if (!shift_catalog->isPeriodic()) {
+      return; // No-op.
+   }
+
+   tbox::Pointer<hier::MappedBoxTree> domain_tree_for_mapped_box_level =
+      domain_search_tree.createRefinedTree(mapped_box_level.getRefinementRatio());
+
+   const hier::MappedBoxTree& domain_tree =
+      *domain_tree_for_mapped_box_level;
+
+   const hier::IntVector& mapped_box_level_growth = threshold_distance;
+
+   for (hier::RealMappedBoxConstIterator ni(mapped_box_level.getMappedBoxes());
+        ni.isValid(); ++ni) {
+
+      const MappedBox& mapped_box = *ni;
+      for (int s = 1; s < shift_catalog->getNumberOfShifts(); ++s) {
+         const hier::IntVector& try_shift =
+            shift_catalog->shiftNumberToShiftDistance(s);
+         hier::Box box = mapped_box.getBox();
+         box.shift(try_shift);
+         box.grow(mapped_box_level_growth);
+         if (domain_tree.hasOverlap(box)) {
+            mapped_box_level.addPeriodicMappedBox(mapped_box, s);
+         }
+      }
+   }
+
+}
+
+/*
+ *************************************************************************
+ * Add periodic images to a MappedBoxLevel, and update Connectors that
+ * require new edges incident on the additions to the MappedBoxLevel.
+ *
+ * We add the periodic images by examining real Mapped_boxes in the
+ * MappedBoxLevel.  For each real mapped_box, consider all of its
+ * possible periodic images and add those that are within the
+ * Connector width distance of the domain.  (We are not interested in
+ * periodic images so far from the domain that they are never used.)
+ *
+ * After adding periodic images, we bridge through
+ * mapped_box_level<==>anchor<==>anchor so bridge can find the periodic
+ * edges.
+ *************************************************************************
+ */
+
+void MappedBoxLevelConnectorUtils::addPeriodicImagesAndRelationships(
+   MappedBoxLevel& mapped_box_level,
+   Connector& mapped_box_level_to_anchor,
+   Connector& anchor_to_mapped_box_level,
+   const hier::MappedBoxTree& domain_search_tree,
+   const Connector& anchor_to_anchor) const
+{
+   hier::OverlapConnectorAlgorithm oca;
+
+   if (d_sanity_check_precond) {
+      if (!mapped_box_level_to_anchor.isTransposeOf(anchor_to_mapped_box_level)) {
+         TBOX_ERROR(
+            "MappedBoxLevelConnectorUtils::addPeriodicImages: non-transposed connector inputs.\n"
+            << "mapped_box_level_to_anchor and anchor_to_mapped_box_level\n"
+            << "must be mutual transposes.");
+      }
+      mapped_box_level_to_anchor.assertTransposeCorrectness(
+         anchor_to_mapped_box_level);
+      if (oca.checkOverlapCorrectness(anchor_to_anchor)) {
+         TBOX_ERROR(
+            "MappedBoxLevelConnectorUtils::addPeriodicImages: input anchor_to_anchor\n"
+            << "Connector failed edge correctness check.");
+      }
+      if (oca.checkOverlapCorrectness(anchor_to_mapped_box_level, false, true,
+             true)) {
+         TBOX_ERROR(
+            "MappedBoxLevelConnectorUtils::addPeriodicImages: input anchor_to_mapped_box_level\n"
+            << "Connector failed edge correctness check.");
+      }
+      if (oca.checkOverlapCorrectness(mapped_box_level_to_anchor, false, true,
+             true)) {
+         TBOX_ERROR(
+            "MappedBoxLevelConnectorUtils::addPeriodicImages: input mapped_box_level_to_anchor\n"
+            << "Connector failed edge correctness check.");
+      }
+   }
+   if (!(anchor_to_anchor.getConnectorWidth() >=
+         anchor_to_mapped_box_level.getConnectorWidth())) {
+      TBOX_ERROR("MappedBoxLevelConnectorUtils::addPeriodicImages: anchor_to_anchor width\n"
+         << anchor_to_anchor.getConnectorWidth() << " is insufficient for\n"
+         <<
+         "generating periodic edges for anchor_to_mapped_box_level's width of "
+         << anchor_to_mapped_box_level.getConnectorWidth() << ".\n");
+   }
+
+   const hier::PeriodicShiftCatalog* shift_catalog =
+      hier::PeriodicShiftCatalog::getCatalog(anchor_to_anchor.getConnectorWidth(
+            ).getDim());
+
+   if (!shift_catalog->isPeriodic()) {
+      return; // No-op.
+   }
+
+   const MappedBoxLevel& anchor = anchor_to_mapped_box_level.getBase();
+
+   tbox::Pointer<hier::MappedBoxTree> domain_tree_for_mapped_box_level =
+      domain_search_tree.createRefinedTree(mapped_box_level.getRefinementRatio());
+
+   {
+      /*
+       * Add the periodic image mapped_boxes for mapped_box_level.
+       *
+       * Adding images to a MappedBox without neighbors in the anchor
+       * means that this method will not find any edges to the added
+       * images.
+       */
+      mapped_box_level.clearForBoxChanges(false);
+      if (0) {
+         tbox::perr << "mapped_box_level:\n"
+                    << mapped_box_level.format("BEFORE-> ", 3);
+      }
+      const hier::MappedBoxTree& domain_tree =
+         *domain_tree_for_mapped_box_level;
+
+      const hier::IntVector& mapped_box_level_growth =
+         mapped_box_level_to_anchor.getConnectorWidth();
+
+      for (hier::RealMappedBoxConstIterator ni(mapped_box_level.getMappedBoxes());
+           ni.isValid(); ++ni) {
+
+         const MappedBox& mapped_box = *ni;
+         hier::Box grown_box = mapped_box.getBox();
+         grown_box.grow(mapped_box_level_growth);
+         bool images_added(false);
+         for (int s = 1; s < shift_catalog->getNumberOfShifts(); ++s) {
+            const hier::IntVector& try_shift =
+               shift_catalog->shiftNumberToShiftDistance(s);
+            hier::Box box = grown_box;
+            box.shift(try_shift);
+            if (domain_tree.hasOverlap(box)) {
+               mapped_box_level.addPeriodicMappedBox(mapped_box, s);
+               images_added = true;
+            }
+         }
+         if (d_sanity_check_precond) {
+            if ( images_added &&
+                 ( !mapped_box_level_to_anchor.hasNeighborSet(mapped_box.getGlobalId()) ||
+                   mapped_box_level_to_anchor.getNeighborSet(mapped_box.getGlobalId()).empty() ) ) {
+               TBOX_WARNING("MappedBoxLevelConnectorUtils::addPeriodicImages: MappedBox " << mapped_box
+                            <<"\nhas periodic images in or close to the domain\n"
+                            <<"but it does not have any neighbors in the anchor MappedBoxLevel.\n"
+                            <<"This will lead to missing neighbors in the output.\n"
+                            <<"If post-condition checking is enabled, this will\n"
+                            <<"result in an error.\n");
+            }
+         }
+
+      }
+      if (0) {
+         tbox::perr << "mapped_box_level:\n" << mapped_box_level.format("AFTER-> ", 3);
+      }
+   }
+
+   if (0) {
+      tbox::plog << "Before bridging for periodic edges:\n"
+                 << "anchor_to_anchor:\n" << anchor_to_anchor.format("DBG-> ", 3)
+                 << "anchor_to_anchor:\n" << anchor_to_anchor.format("DBG-> ", 3)
+                 << "mapped_box_level_to_anchor:\n" << mapped_box_level_to_anchor.format("DBG-> ", 3)
+                 << "anchor_to_mapped_box_level:\n" << anchor_to_mapped_box_level.format("DBG-> ", 3);
+   }
+
+   Connector new_anchor_to_mapped_box_level;
+   Connector new_mapped_box_level_to_anchor;
+
+   hier::IntVector width_limit =
+      anchor_to_mapped_box_level.getHeadCoarserFlag() ?
+      mapped_box_level_to_anchor.getConnectorWidth() :
+      anchor_to_mapped_box_level.getConnectorWidth();
+
+   oca.setSanityCheckMethodPreconditions(d_sanity_check_precond);
+   oca.bridge(new_mapped_box_level_to_anchor,
+      new_anchor_to_mapped_box_level,
+      mapped_box_level_to_anchor,
+      anchor_to_anchor,
+      anchor_to_anchor,
+      anchor_to_mapped_box_level,
+      width_limit);
+   new_anchor_to_mapped_box_level.eraseEmptyNeighborSets();
+   new_mapped_box_level_to_anchor.eraseEmptyNeighborSets();
+
+   if (d_sanity_check_postcond) {
+      // Expensive sanity check for consistency.
+      size_t err1 = new_anchor_to_mapped_box_level.checkConsistencyWithBase();
+      if (err1) {
+         tbox::perr << "OverlapConnectorAlgorithm found " << err1
+                    << " edge-base consistency errors in\n"
+                    <<
+         "anchor_to_mapped_box_level after computing periodic images.\n";
+      }
+      size_t err2 = new_mapped_box_level_to_anchor.checkConsistencyWithBase();
+      if (err2) {
+         tbox::perr << "OverlapConnectorAlgorithm found " << err2
+                    << " edge-base consistency errors in\n"
+                    <<
+         "mapped_box_level_to_anchor after computing periodic images.\n";
+      }
+      size_t err3 = new_anchor_to_mapped_box_level.checkConsistencyWithHead();
+      if (err3) {
+         tbox::perr << "OverlapConnectorAlgorithm found " << err3
+                    << " edge-mapped_box consistency errors in\n"
+                    <<
+         "anchor_to_mapped_box_level after computing periodic images.\n";
+      }
+      size_t err4 = new_mapped_box_level_to_anchor.checkConsistencyWithHead();
+      if (err4) {
+         tbox::perr << "OverlapConnectorAlgorithm found " << err4
+                    << " edge-mapped_box consistency errors in\n"
+                    <<
+         "mapped_box_level_to_anchor after computing periodic images.\n";
+      }
+      if (err1 + err2 + err3 + err4) {
+         TBOX_ERROR(
+            "OverlapConnectorAlgorithm found consistency errors in\n"
+            << "addPeriodicImages\n"
+            << "anchor:\n" << anchor.format("ERR-> ", 3)
+            << "mapped_box_level:\n" << mapped_box_level.format("ERR-> ", 3)
+            << "anchor_to_anchor:\n" << anchor_to_anchor.format("ERR-> ", 3)
+            << "new_anchor_to_mapped_box_level:\n" << new_anchor_to_mapped_box_level.format("ERR-> ", 3)
+            << "new_mapped_box_level_to_anchor:\n" << new_mapped_box_level_to_anchor.format("ERR-> ", 3));
+      }
+   }
+   if (d_sanity_check_postcond) {
+      // Expensive sanity check for correctness.
+      size_t err1 = oca.checkOverlapCorrectness(new_anchor_to_mapped_box_level);
+      if (err1) {
+         tbox::perr << "MappedBoxLevelConnectorUtils::addPeriodicImages found " << err1
+                    << " errors\n"
+                    << "in new_anchor_to_mapped_box_level after\n"
+                    << "computing periodic images.  If you enabled\n"
+                    << "precondition checking, this is probably a\n"
+                    << "library error.\n";
+      }
+      size_t err2 = oca.checkOverlapCorrectness(new_mapped_box_level_to_anchor);
+      if (err2) {
+         tbox::perr << "MappedBoxLevelConnectorUtils::addPeriodicImages found " << err2
+                    << " errors\n"
+                    << "in new_mapped_box_level_to_anchor after\n"
+                    << "computing periodic images.  If you enabled\n"
+                    << "precondition checking, this is probably a\n"
+                    << "library error.\n";
+      }
+      if (err1 + err2) {
+         TBOX_ERROR(
+            "MappedBoxLevelConnectorUtils::addPeriodicImages found edge errors\n"
+            << "in output data\n"
+            << "anchor:\n" << anchor.format("ERR-> ", 3)
+            << "mapped_box_level:\n" << mapped_box_level.format("ERR-> ", 3)
+            << "anchor_to_anchor:\n" << anchor_to_anchor.format("ERR-> ", 3)
+            << "anchor_to_mapped_box_level:\n" << anchor_to_mapped_box_level.format("ERR-> ", 3)
+            << "mapped_box_level_to_anchor:\n" << mapped_box_level_to_anchor.format("ERR-> ", 3)
+            << "new_anchor_to_mapped_box_level:\n" << new_anchor_to_mapped_box_level.format("ERR-> ", 3)
+            << "new_mapped_box_level_to_anchor:\n" << new_mapped_box_level_to_anchor.format("ERR-> ", 3));
+      }
+   }
+
+   Connector::swap(new_anchor_to_mapped_box_level, anchor_to_mapped_box_level);
+   Connector::swap(new_mapped_box_level_to_anchor, mapped_box_level_to_anchor);
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void MappedBoxLevelConnectorUtils::initializeCallback()
+{
+   t_make_sorting_map = tbox::TimerManager::getManager()->
+      getTimer("hier::MappedBoxLevelConnectorUtils::makeSortingMap()");
+   t_compute_external_parts = tbox::TimerManager::getManager()->
+      getTimer("hier::MappedBoxLevelConnectorUtils::computeExternalParts()");
+   t_compute_external_parts_intersection =
+      tbox::TimerManager::getManager()->
+      getTimer("mesh::MappedBoxLevelConnectorUtils::computeExternalParts()_intersection");
+   t_compute_internal_parts = tbox::TimerManager::getManager()->
+      getTimer("hier::MappedBoxLevelConnectorUtils::computeInternalParts()");
+   t_compute_internal_parts_intersection =
+      tbox::TimerManager::getManager()->
+      getTimer("mesh::MappedBoxLevelConnectorUtils::computeInternalParts()_intersection");
+}
+
+/*
+ ***************************************************************************
+ * * Release static timers.  To be called by shutdown registry to make sure  *
+ * * memory for timers does not leak.                                        *
+ ***************************************************************************
+ */
+
+void MappedBoxLevelConnectorUtils::finalizeCallback()
+{
+   t_make_sorting_map.setNull();
+   t_compute_external_parts.setNull();
+   t_compute_external_parts_intersection.setNull();
+   t_compute_internal_parts.setNull();
+   t_compute_internal_parts_intersection.setNull();
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MappedBoxLevelConnectorUtils.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MappedBoxLevelConnectorUtils.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,14 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utilities for working on DLBG edges. 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+namespace hier {
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MappedBoxLevelConnectorUtils.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MappedBoxLevelConnectorUtils.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,527 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utilities for working on DLBG edges. 
+ *
+ ************************************************************************/
+#ifndef included_hier_MappedBoxLevelConnectorUtils
+#define included_hier_MappedBoxLevelConnectorUtils
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Connector.h"
+#include "SAMRAI/hier/MappedBoxLevel.h"
+#include "SAMRAI/hier/MappedBoxTree.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief Utilities for common tasks involving comparison of
+ * MappedBoxLevels or setting up Connectors.
+ *
+ * In addition to the utility methods, objects of this class can be
+ * set to perform certain sanity checks on the pre and post conditions
+ * of the methods.  See setSanityCheckMethodPreconditions() and
+ * setSanityCheckMethodPostconditions().
+ *
+ * TODO: The use and purpose of this class might be more obvious if it
+ * were renamed something else.
+ *
+ * TODO: Some methods should have arguments re-ordered to conform to
+ * SAMRAI standards.
+ */
+class MappedBoxLevelConnectorUtils
+{
+
+public:
+   /*!
+    * @brief Default constructor.
+    *
+    * By default, sanity checks are disabled.  To enable them, see
+    * setSanityCheckMethodPreconditions() and
+    * setSanityCheckMethodPostconditions().
+    */
+   MappedBoxLevelConnectorUtils();
+
+   /*!
+    * @brief Set whether to run expensive sanity checks on input parameters.
+    *
+    * Mainly for debugging.
+    *
+    * @param[in] do_check
+    */
+   void
+   setSanityCheckMethodPreconditions(
+      bool do_check);
+
+   /*!
+    * @brief Set whether to run expensive sanity checks on output parameters.
+    *
+    * Mainly for debugging.
+    *
+    * @param[in] do_check
+    */
+   void
+   setSanityCheckMethodPostconditions(
+      bool do_check);
+
+
+   //@{
+
+   //! @name Comparing boxes of two MappedBoxLevels
+
+   /*!
+    * @brief Given an overlap Connector, determine the extent to which
+    * the Connector's base nests in its head.
+    *
+    * This method returns true if the base, grown by @c base_swell,
+    * nests inside the head, grown by @c head_swell, by a margin of @c
+    * head_nesting_margin.  @c base_swell and @c head_swell should be
+    * non-negative and specified in the base and head index spaces,
+    * respectively.  @c head_nesting_margin should be in the head
+    * index space.
+    *
+    * The Connector width must be at least the sum of the @c
+    * base_swell and the (appropriately converted) @c head_swell and
+    * @c head_nesting_margin.  We require and assume without verifying
+    * that the Connector is complete.
+    *
+    * If the domain is given, non-nesting parts outside of the domain
+    * are disregarded.
+    *
+    * @param[out] locally_nests Whether the local parts of the base
+    * nests in the head.  This output may vary among the processes.
+    *
+    * @param[in] connector
+    *
+    * @param[in] base_swell the amount that the base is grown by, given in the
+    * base index space and non-negative
+    *
+    * @param[in] head_swell the amount that the head is grown by, given in the
+    * head index space and non-negative
+    *
+    * @param[in] head_nesting_margin given in the head index space.
+    *
+    * @param[in] domain Domain description, in reference index space,
+    * in search tree format.
+    *
+    * @return True if the given base MappedBoxLevel nests in the head,
+    * otherwise False.
+    */
+   bool
+   baseNestsInHead(
+      bool* locally_nests,
+      const Connector& connector,
+      const IntVector& base_swell,
+      const IntVector& head_swell,
+      const IntVector& head_nesting_margin,
+      const hier::MappedBoxTree* domain = NULL) const;
+
+   /*!
+    * @brief Given base and head MappedBoxLevels, determine the extent
+    * to which the base nests in the head.
+    *
+    * This method is similar to the version taking a Connector instead
+    * of the base and head MappedBoxLevels, except that it will build
+    * the overlap Connector from the base to the head.  It should be
+    * used when you don't have a pre-built Connector or don't have one
+    * with sufficient width.
+    *
+    * This method simply builds a Connector from head to base with
+    * sufficient width and calls baseNestsInHead().  Building of the
+    * Connector is not scalable.  If you already have such a
+    * Connector, you should call baseNestsInHead(bool*, const Connector&,
+    * const IntVector&, const IntVector&, const IntVector&,
+    * const MappedBoxTree*) directly.
+    *
+    * TODO: Is this method really needed now that we can automatically
+    * build the base--->head Connector automatically using
+    * PersistentOverlapConnectors?  Using PersistentOverlapConnector
+    * does have the side-effect that the generated Connector persists
+    * longer than the immediate need.
+    *
+    * @param domain Domain description, in reference index space, in
+    * search tree format.
+    *
+    * @return Whether the given base MappedBoxLevel nests in the head.
+    *
+    * @param[out] locally_nests Whether the local parts of the base
+    * nests in the head.  This output may vary among the processes.
+    *
+    * @param[in] base
+    *
+    * @param[in] head
+    *
+    * @param[in] base_swell the amount that the base is grown by, given in the
+    * base index space and non-negative
+    *
+    * @param[in] head_swell the amount that the head is grown by, given in the
+    * head index space and non-negative
+    *
+    * @param[in] head_nesting_margin given in the head index space.
+    *
+    * @param[in] domain Domain description, in reference index space,
+    * in search tree format.
+    *
+    * @return Whether the given base MappedBoxLevel nests in the head.
+    */
+   bool
+   baseNestsInHead(
+      bool* locally_nests,
+      const MappedBoxLevel& base,
+      const MappedBoxLevel& head,
+      const IntVector& base_swell,
+      const IntVector& head_swell,
+      const IntVector& head_margin,
+      const hier::MappedBoxTree* domain = NULL) const;
+
+   /*!
+    * @brief Compute the parts of one MappedBoxLevel that are external
+    * to another MappedBoxLevel.
+    *
+    * Compare an input MappedBoxLevel to a "nominal" MappedBoxLevel.
+    * Identify parts of the input that are external to the nominal
+    * MappedBoxLevel, and store the external parts in a
+    * MappedBoxLevel.  Set up a mapping Connector between the input
+    * and its external parts.
+    *
+    * For the purpose of defining what is external, the nominal
+    * MappedBoxLevel may be grown by a specified amount before
+    * comparison.  A negative growth indicates shrinking.
+    *
+    * A partially external input cell (possible when input is coarser
+    * than nominal) is considered to be external.
+    *
+    * If the domain is given (@c domain is initialized), we do not
+    * shrink or grow the nominal layer where it touches the domain
+    * boundary.
+    *
+    * This method does not require any communication.
+    *
+    * @param[out] external Any external part is owned by the process
+    * owning the input MappedBox that generated it.
+    *
+    * @param[out] input_to_external Relationships from input
+    * MapppedBoxes to their external parts.  This is a local map.
+    *
+    * @param[in] input_to_nominal Overlap Connector from input to
+    * nominal MappedBoxLevel.
+    *
+    * @param[in] nominal_mapped_box_level_growth Growth of the nominal
+    * MappedBoxLevel for the purpose of comparing to input.  Must be
+    * in index space of input.
+    *
+    * @param[in] domain The domain representation in search tree form.
+    * These boxes should be in the reference index space.
+    */
+   void
+   computeExternalParts(
+      hier::MappedBoxLevel& external,
+      hier::Connector& input_to_external,
+      const hier::Connector& input_to_nominal,
+      const hier::IntVector& nominal_mapped_box_level_growth,
+      const hier::MappedBoxTree& domain) const;
+
+   /*!
+    * @brief Compute the parts of one MappedBoxLevel that are internal
+    * to another MappedBoxLevel.
+    *
+    * Compare an input MappedBoxLevel to a "nominal" mapped_box_level.
+    * Identify parts of the input that are internal to the nominal
+    * MappedBoxLevel, and store the internal parts in a
+    * MappedBoxLevel.  Set up a mapping Connector between the input
+    * and its internal parts.
+    *
+    * For the purpose of defining what is internal, the nominal
+    * MappedBoxLevel may be grown by a specified amount before
+    * comparison.  A negative growth indicates shrinking.
+    *
+    * A partially internal input cell (possible when input is coarser
+    * than nominal) is considered to be internal.
+    *
+    * If the domain is given (@c domain is initialized), we do not
+    * shrink or grow the nominal layer where it touches the domain
+    * boundary.
+    *
+    * This method does not require any communication.
+    *
+    * @param[out] internal Any internal part is owned by the process
+    * owning the input MappedBox that generated it.
+    *
+    * @param[out] input_to_internal Relationships from input
+    * MapppedBoxes to their internal parts.  This is a local map.
+    *
+    * @param[in] input_to_nominal Overlap Connector from input to
+    * nominal MappedBoxLevel.
+    *
+    * @param[in] nominal_mapped_box_level_growth Growth of the nominal
+    * MappedBoxLevel for the purpose of comparing to input.  Must be
+    * in index space of input.
+    *
+    * @param[in] domain The domain representation in search tree form.
+    * Boxes should be in the reference index space.
+    */
+   void
+   computeInternalParts(
+      hier::MappedBoxLevel& internal,
+      hier::Connector& input_to_internal,
+      const hier::Connector& input_to_nominal,
+      const hier::IntVector& nominal_mapped_box_level_growth,
+      const hier::MappedBoxTree& domain) const;
+
+   /*!
+    * @brief Compute the parts of one MappedBoxLevel that is internal
+    * to another MappedBoxLevel.
+    *
+    * TODO: This method may be redundant.  The other
+    * computeInternalParts method does the same thing if the domain is
+    * not specified.  I've checked the implementation and verified
+    * that both methods are almost the same.
+    *
+    * Compare an input MappedBoxLevel to a "nominal" mapped_box_level.
+    * Identify parts of the input that are internal to the nominal
+    * MappedBoxLevel, and store the internal parts in a
+    * MappedBoxLevel.  Set up a mapping Connector between the input
+    * and its internal parts.
+    *
+    * For the purpose of defining what is internal, the nominal
+    * MappedBoxLevel may be grown by a specified amount before
+    * comparison.  A negative growth indicates shrinking.
+    *
+    * A partially internal input cell (possible when input is coarser
+    * than nominal) is considered to be internal.
+    *
+    * This method does not require any communication.
+    *
+    * @param[out] internal Any internal part is owned by the process
+    * owning the input MappedBox that generated it.
+    *
+    * @param[out] input_to_internal Relationships from input
+    * MapppedBoxes to their internal parts.  This is a local map.
+    *
+    * @param[in] input_to_nominal Overlap Connector from input to
+    * nominal MappedBoxLevel.
+    *
+    * @param[in] nominal_mapped_box_level_growth Growth of the nominal
+    * MappedBoxLevel for the purpose of comparing to input.  Must be
+    * in index space of input.
+    */
+   void
+   computeInternalParts(
+      hier::MappedBoxLevel& internal,
+      hier::Connector& input_to_internal,
+      const hier::Connector& input_to_nominal,
+      const hier::IntVector& nominal_mapped_box_level_growth) const;
+
+   //@}
+
+
+
+   //@{
+
+   //! @name Setting up common mapping Connectors
+
+   /*
+    * @brief Sort the MappedBoxes in MappedBoxLevel and make a mapping
+    * Connector from the unsorted MappedBoxLevel to the sorted one.
+    * The sorting can renumber the LocalIndices of the MappedBoxes
+    * or put the MappedBoxes in spatial ordering, or both.
+    *
+    * The Connector map created is local (no MappedBox is mapped to a new
+    * owner).
+    *
+    * If @c sort_mapped_boxes_by_corner is true, the map will reorder
+    * local MappedBoxes by their box corners.  This is useful for
+    * making random box ordering into something deterministic.
+    *
+    * If @c sequentialize_global_indices is true, determine the lowest
+    * index the local processor should use for the output
+    * MappedBoxLevel so that the global set of MappedBoxes have
+    * sequential indices.  (This requires communication.)  If false,
+    * each processor start numbering with LocalIndex zero.  If true,
+    * @c initial_sequential_index can specify the first index of first
+    * MappedBox of the lowest rank processor.
+    *
+    * For more information on mapping Connectors, see
+    * MappingConnectorAlgorithm.
+    *
+    * @param[out] sorted_mapped_box_level Sorted version of the input
+    * unsorted_mapped_box_level.
+    *
+    * @param[out] output_map Mapping from @c unsorted_mapped_box_level
+    * to @c sorted_mapped_box_level.
+    *
+    * @param[in] unsorted_mapped_box_level
+    *
+    * @param[in] sort_mapped_boxes_by_corner Whether to sort local
+    * MappedBoxes by their indices to make their ordering solely a
+    * function of box positions.
+    *
+    * @param[in] sequentialize_global_indices Whether to renumber the
+    * LocalIndices into a globally sequential numbering.
+    *
+    * @param[in] initial_sequential_index The first index of first
+    * MappedBox of the lowest rank process.  This parameter is
+    * disregarded when not globally sequentializing the indices.
+    */
+   void
+   makeSortingMap(
+      MappedBoxLevel& sorted_mapped_box_level,
+      Connector& output_map,
+      const MappedBoxLevel& unsorted_mapped_box_level,
+      bool sort_mapped_boxes_by_corner = true,
+      bool sequentialize_global_indices = true,
+      LocalId initial_sequential_index = LocalId::getZero()) const;
+
+   /*
+    * @brief Given a mapping from an original MappedBoxLevel to parts
+    * to be removed (rejected), construct the remainder MappedBoxLevel
+    * and the mapping from the original to a remainder.
+    *
+    * @see MappingConnectorAlgorithm.
+    *
+    * @param[out] remainder The new MappedBoxLevel resulting from
+    * removing the rejected parts from the original MappedBoxLevel.
+    *
+    * @param[out] orig_to_remainder The output mapping.  This is a
+    * local map.
+    *
+    * @param[in] orig_to_rejections Mapping from original
+    * MappedBoxLevel to its parts that should be be removed.  This
+    * must be a local map.
+    */
+   void
+   makeRemainderMap(
+      MappedBoxLevel& remainder,
+      Connector& orig_to_remainder,
+      const Connector& orig_to_rejections) const;
+
+   //@}
+
+
+   //@{
+
+   //! @name Adding periodic images
+
+   /*!
+    * @brief Add periodic images to a MappedBoxLevel.
+    *
+    * This method is a no-op in the case of non-periodic domains.
+    *
+    * Any periodic image within a certain distance of the domain is
+    * added, Those farther out are not added.  The threshold distance
+    * is @c threshold_distance.
+    *
+    * @param[in,out] mapped_box_level MappedBoxLevel subject to the
+    * addition of periodic MappedBoxes.
+    *
+    * @param[in] domain_search_tree Domain description in the reference
+    * index space.  This tree must NOT include periodic images.
+    *
+    * @param[in] threshold_distance
+    */
+   void
+   addPeriodicImages(
+      MappedBoxLevel& mapped_box_level,
+      const hier::MappedBoxTree& domain_search_tree,
+      const IntVector &threshold_distance) const;
+
+   /*!
+    * @brief Add periodic images to a MappedBoxLevel and add new
+    * relationships to the periodic images.
+    *
+    * This method is a no-op in the case of non-periodic domains.
+    *
+    * Any periodic images within a certain distance of the domain is
+    * added, but the rest are not added.  The threshold distance is
+    * the width of the Connector @c mapped_box_level_to_anchor.
+    *
+    * This method updates the overlap Connectors between the
+    * MappedBoxLevel getting new periodic MappedBoxes and an "anchor"
+    * MappedBoxLevel.  New periodic overlap relationships generated
+    * are added to the overlap Connector @c
+    * mapped_box_level_to_anchor.  If you don't need to have a
+    * Connector updated, use addPeriodicImages() instead of this
+    * method.
+    *
+    * @param[in,out] mapped_box_level MappedBoxLevel subject to the
+    * addition of periodic MappedBoxes.
+    *
+    * @param[in,out] mapped_box_level_to_anchor Overlap Connector to
+    * be updated with new relationships.
+    *
+    * @param[in,out] anchor_to_mapped_box_level Overlap Connector to
+    * be updated with new relationships.
+    *
+    * @param[in] domain_search_tree Domain description in the
+    * reference index space.  This tree must NOT include periodic
+    * images.
+    *
+    * @param[in] anchor_to_anchor Self overlap Connector for anchor
+    * MappedBoxLevel.  Must be a complete overlap Connector with
+    * periodic relationships.
+    */
+   void
+   addPeriodicImagesAndRelationships(
+      MappedBoxLevel& mapped_box_level,
+      Connector& mapped_box_level_to_anchor,
+      Connector& anchor_to_mapped_box_level,
+      const hier::MappedBoxTree& domain_search_tree,
+      const Connector& anchor_to_anchor) const;
+
+   //@}
+
+
+
+private:
+
+   /*!
+    * @brief Call-back function to sort boxes.
+    */
+   static int
+   qsortBoxCompare(
+      const void* v,
+      const void* w);
+
+   /*!
+    * @brief Allocate statics
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   initializeCallback();
+
+   /*!
+    * @brief Delete statics.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   finalizeCallback();
+
+   static tbox::Pointer<tbox::Timer> t_make_sorting_map;
+   static tbox::Pointer<tbox::Timer> t_compute_external_parts;
+   static tbox::Pointer<tbox::Timer> t_compute_external_parts_intersection;
+   static tbox::Pointer<tbox::Timer> t_compute_internal_parts;
+   static tbox::Pointer<tbox::Timer> t_compute_internal_parts_intersection;
+
+   bool d_sanity_check_precond;
+   bool d_sanity_check_postcond;
+
+   static tbox::StartupShutdownManager::Handler
+   s_initialize_finalize_handler;
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/MappedBoxLevelConnectorUtils.I"
+#endif
+
+#endif  // included_hier_MappedBoxLevelConnectorUtils
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MappedBoxLevelHandle.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MappedBoxLevelHandle.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Registry of MappedBoxLevelHandles incident from a common MappedBoxLevel. 
+ *
+ ************************************************************************/
+#ifndef included_hier_MappedBoxLevelHandle_C
+#define included_hier_MappedBoxLevelHandle_C
+
+#include "SAMRAI/hier/MappedBoxLevelHandle.h"
+#include "SAMRAI/hier/MappedBoxLevel.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+************************************************************************
+************************************************************************
+*/
+MappedBoxLevelHandle::MappedBoxLevelHandle(
+   const MappedBoxLevel* mapped_box_level):
+   d_mapped_box_level(mapped_box_level)
+{
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+MappedBoxLevelHandle::~MappedBoxLevelHandle()
+{
+   detachMyMappedBoxLevel();
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+bool MappedBoxLevelHandle::isAttached() const
+{
+   return d_mapped_box_level != NULL;
+}
+
+/*
+************************************************************************
+************************************************************************
+*/
+const MappedBoxLevel& MappedBoxLevelHandle::getMappedBoxLevel() const
+{
+   if (d_mapped_box_level == NULL) {
+      TBOX_ERROR(
+         "MappedBoxLevelHandle::getMappedBoxLevel Attempted to access a MappedBoxLevel\n"
+         << "that has been detached from its handle.  Detachment happens\n"
+         << "when the MappedBoxLevel changes in a way that can invalidate\n"
+         << "Connector data.  Therefore, Connectors should not attempt\n"
+         << "to access the MappedBoxLevel using a detatched handle.");
+   }
+#ifdef DEBUG_CHECK_ASSERTIONS
+   // Sanity check: the MappedBoxLevel's handle should be this handle.
+   if (d_mapped_box_level->getMappedBoxLevelHandle().getPointer() != this) {
+      TBOX_ERROR("Library error in MappedBoxLevelHandle::getMappedBoxLevel");
+   }
+#endif
+   return *d_mapped_box_level;
+}
+
+/*
+************************************************************************
+* To be called by the object's MappedBoxLevel when the
+* MappedBoxLevel changes in a way that can invalidate the
+* Connector data.
+************************************************************************
+*/
+void MappedBoxLevelHandle::detachMyMappedBoxLevel()
+{
+   d_mapped_box_level = NULL;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MappedBoxLevelHandle.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MappedBoxLevelHandle.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,132 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Auto-release handle to prevent using invalid Connector data. 
+ *
+ ************************************************************************/
+#ifndef included_hier_MappedBoxLevelHandle
+#define included_hier_MappedBoxLevelHandle
+
+#include "SAMRAI/SAMRAI_config.h"
+
+namespace SAMRAI {
+namespace hier {
+
+class MappedBoxLevel;
+
+/*!
+ * @brief A handle for Connectors to access their head and base
+ * MappedBoxLevels.  A MappedBoxLevel automatically releases its
+ * handle when it changes in a way that can invalidate Connector data,
+ * preventing the use of inconsistent data and deallocated objects.
+ *
+ * Connector data can become invalid if the base or head
+ * MappedBoxLevel changes in certain ways, such as being
+ * re-initialized or going out of scope.  This class is a mechanism to
+ * prevent inappropriately using Connectors with invalid data.
+ *
+ * A MappedBoxLevelHandle is generated by a MappedBoxLevel and sits
+ * between the MappedBoxLevel and all Connectors referencing the
+ * MappedBoxLevel.  Connectors sensing that the MappedBoxLevel has 
+ * been disconnected has a chance to reset themselves to avoid using 
+ * invalid data.
+ *
+ * @see MappedBoxLevel::getMappedBoxLevelHandle()
+ */
+
+class MappedBoxLevelHandle
+{
+
+public:
+
+   /*!
+    * @brief Destructor detaches the handle from its MappedBoxLevel,
+    * if it is still attached.
+    */
+   ~MappedBoxLevelHandle();
+
+   /*!
+    * @brief Return the MappedBoxLevel attached to this handle.
+    *
+    * If there is no attached MappedBoxLevel (isAttached() returns
+    * false), an assertion is thrown.
+    *
+    * @see isAttached()
+    */
+   const MappedBoxLevel&
+   getMappedBoxLevel() const;
+
+   /*!
+    * @brief Whether the MappedBoxLevelHandle is still attached to its
+    * MappedBoxLevel.
+    */
+   bool
+   isAttached() const;
+
+private:
+   /*!
+    * @brief Constructor to be called only by MappedBoxLevel.
+    *
+    * This is the only constructor and it is private.  Only the
+    * MappedBoxLevel should allocate MappedBoxLevelHandles.
+    *
+    * @param[in] mapped_box_level The MappedBoxLevel to be attached to
+    * this handle.
+    */
+   MappedBoxLevelHandle(
+      const MappedBoxLevel* mapped_box_level);
+
+   /*!
+    * @brief Forbidden copy constructor.
+    *
+    * This constructor is unimplemented and forbidden.  We never want
+    * multiple handles attached to the same MappedBoxLevel.
+    */
+   MappedBoxLevelHandle( const MappedBoxLevelHandle &other );
+
+   /*!
+    * @brief Forbidden assignment operator.
+    *
+    * This operation is unimplemented and forbidden.  We never want
+    * multiple handles attached to the same MappedBoxLevel.
+    */
+   MappedBoxLevelHandle &operator=( const MappedBoxLevelHandle &other );
+
+   /*!
+    * @brief Detach the MappedBoxLevel
+    *
+    * To be called when the attached MappedBoxLevel changes in a way
+    * that can invalidate Connector data.
+    *
+    * Only the MappedBoxLevel that is attached to the
+    * MappedBoxLevelHandle should call this method.
+    */
+   void
+   detachMyMappedBoxLevel();
+
+   //@{
+   /*!
+    * @brief Allows MappedBoxLevel to allocate MappedBoxLevelHandles
+    * and call detachMyMappedBoxLevel().
+    */
+   friend class MappedBoxLevel;
+   //@}
+
+   /*!
+    * @brief Pointer to the MappedBoxLevel attached to this handle.
+    */
+   const MappedBoxLevel* d_mapped_box_level;
+
+};
+
+}
+}
+
+#ifndef DEBUG_NO_INLINE
+// #include "SAMRAI/hier/MappedBoxLevelHandle.I"
+#endif
+
+#endif // included_hier_MappedBoxLevelHandle
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MappedBoxSet.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MappedBoxSet.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,268 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Extension of a std 
+ *
+ ************************************************************************/
+#ifndef included_hier_MappedBoxSet_C
+#define included_hier_MappedBoxSet_C
+
+#include "SAMRAI/hier/MappedBoxSet.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/MappedBoxSet.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+#define HIER_MAPPED_BOX_SET_VERSION (0)
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+/*
+ ***********************************************************************
+ * Find all the MappedBoxes corresponding to a given rank as a range in
+ * the container.
+ ***********************************************************************
+ */
+MappedBoxSet::Range
+MappedBoxSet::findRanksRange(
+   int rank)
+{
+   Range rval(d_set.end(), d_set.end());
+   if (!d_set.empty()) {
+      /*
+       * start_key and stop_key are set key objects that would be
+       * ordered at the first MappedBox to be found and just after the
+       * last.
+       */
+      const tbox::Dimension& dim = d_set.begin()->getDim();
+      MappedBox start_key(dim, GlobalId(LocalId::getZero(), rank), 0);
+      rval.first = d_set.lower_bound(start_key);
+      MappedBox stop_key(dim, GlobalId(LocalId::getZero(), rank + 1), 0);
+      rval.second = d_set.lower_bound(stop_key);
+   }
+   return rval;
+}
+
+/*
+ ***********************************************************************
+ * Find all the MappedBoxes corresponding to a given rank as a range in
+ * the container.
+ ***********************************************************************
+ */
+MappedBoxSet::ConstRange
+MappedBoxSet::findRanksRange(
+   int rank) const
+{
+   ConstRange rval(d_set.end(), d_set.end());
+   if (!d_set.empty()) {
+      /*
+       * start_key and stop_key are set key objects that would be
+       * ordered at the first MappedBox to be found and just after the
+       * last.
+       */
+      const tbox::Dimension& dim = d_set.begin()->getDim();
+      MappedBox start_key(dim, GlobalId(LocalId::getZero(), rank), 0);
+      rval.first = d_set.lower_bound(start_key);
+      MappedBox stop_key(dim, GlobalId(LocalId::getZero(), rank + 1), 0);
+      rval.second = d_set.lower_bound(stop_key);
+   }
+   return rval;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+bool MappedBoxSet::isLocallyEqual(
+   const MappedBoxSet& other,
+   int rank) const
+{
+   if (this == &other) return true;
+
+   ConstRange irange = findRanksRange(rank);
+   ConstRange jrange = other.findRanksRange(rank);
+   while (irange.first != irange.second &&
+          jrange.first != jrange.second) {
+      if (*irange.first != *jrange.first) {
+         return false;
+      }
+      ++irange.first;
+      ++jrange.first;
+   }
+   if (irange.first != irange.second || jrange.first != jrange.second) {
+      // local count in this is different from local count in other.
+      return false;
+   }
+   return true;
+}
+
+/*
+ ***********************************************************************
+ * Write the MappedBoxSet to a database.
+ ***********************************************************************
+ */
+void MappedBoxSet::putToDatabase(
+   tbox::Database& database) const
+{
+   database.putInteger(
+      "HIER_MAPPED_BOX_SET_VERSION", HIER_MAPPED_BOX_SET_VERSION);
+
+   const int mbs_size = size();
+   database.putInteger("mapped_box_set_size", mbs_size);
+   if (mbs_size > 0) {
+
+      std::vector<int> local_ids;
+      std::vector<int> ranks;
+      std::vector<int> periodic_shift_numbers;
+      local_ids.reserve(mbs_size);
+      ranks.reserve(mbs_size);
+      periodic_shift_numbers.reserve(mbs_size);
+
+      tbox::Array<tbox::DatabaseBox> db_box_array(mbs_size);
+
+      int counter = -1;
+      for (MappedBoxSet::const_iterator ni = begin();
+           ni != end(); ++ni) {
+         local_ids.push_back(ni->getLocalId().getValue());
+         ranks.push_back(ni->getOwnerRank());
+         periodic_shift_numbers.push_back(ni->getPeriodicShiftNumber());
+         db_box_array[++counter] = ni->getBox();
+      }
+
+      database.putIntegerArray(
+         "local_indices", &local_ids[0], mbs_size);
+      database.putIntegerArray(
+         "ranks", &ranks[0], mbs_size);
+      database.putIntegerArray(
+         "periodic_shift_numbers", &periodic_shift_numbers[0], mbs_size);
+      database.putDatabaseBoxArray(
+         "boxes", &db_box_array[0], mbs_size);
+   }
+}
+
+/*
+ ***********************************************************************
+ * Read the MappedBoxSet from a database.
+ ***********************************************************************
+ */
+void MappedBoxSet::getFromDatabase(
+   tbox::Database& database)
+{
+   const unsigned int mbs_size = database.getInteger("mapped_box_set_size");
+   if (mbs_size > 0) {
+      std::vector<int> local_ids(mbs_size);
+      std::vector<int> ranks(mbs_size);
+      std::vector<int> periodic_shift_numbers(mbs_size);
+      tbox::Array<tbox::DatabaseBox> db_box_array(mbs_size);
+
+      database.getIntegerArray(
+         "local_indices", &local_ids[0], mbs_size);
+      database.getIntegerArray(
+         "ranks", &ranks[0], mbs_size);
+      database.getIntegerArray(
+         "periodic_shift_numbers", &periodic_shift_numbers[0], mbs_size);
+      database.getDatabaseBoxArray(
+         "boxes", &db_box_array[0], mbs_size);
+
+      for (unsigned int i = 0; i < mbs_size; ++i) {
+         Box box(db_box_array[i]);
+         MappedBox mapped_box(
+            box,
+            LocalId(local_ids[i]),
+            ranks[i],
+            periodic_shift_numbers[i]);
+         insert(end(), mapped_box);
+      }
+   }
+}
+
+/*
+ ***********************************************************************
+ * Avoid communication in this method.  It is often used for debugging.
+ ***********************************************************************
+ */
+void MappedBoxSet::recursivePrint(
+   std::ostream& co,
+   const std::string& border,
+   int detail_depth) const
+{
+   NULL_USE(detail_depth);
+   for (const_iterator bi = begin(); bi != end(); ++bi) {
+      MappedBox mapped_box = *bi;
+      co << border << "    "
+         << mapped_box << "   "
+         << mapped_box.getBox().numberCells() << '\n';
+   }
+}
+
+
+/*
+ ***********************************************************************
+ * Construct a MappedBoxSet Outputter with formatting parameters.
+ ***********************************************************************
+ */
+
+MappedBoxSet::Outputter::Outputter(
+   const MappedBoxSet &mapped_box_set,
+   const std::string& border,
+   int detail_depth )
+   : d_set(mapped_box_set),
+     d_border(border),
+     d_detail_depth(detail_depth)
+{
+   return;
+}
+
+
+/*
+ ***********************************************************************
+ * Print out a MappedBoxSet according to settings in the Outputter.
+ ***********************************************************************
+ */
+
+std::ostream& operator << (
+   std::ostream& s,
+   const MappedBoxSet::Outputter& format)
+{
+   format.d_set.recursivePrint( s, format.d_border, format.d_detail_depth );
+   return s;
+}
+
+
+/*
+ ***********************************************************************
+ * Return a Outputter that can dump the MappedBoxSet to a stream.
+ ***********************************************************************
+ */
+
+MappedBoxSet::Outputter MappedBoxSet::format(
+   const std::string& border,
+   int detail_depth ) const
+{
+   return Outputter( *this, border, detail_depth);
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MappedBoxSet.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MappedBoxSet.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Extension of a std 
+ *
+ ************************************************************************/
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+MappedBoxSet::MappedBoxSet():
+   d_set()
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+MappedBoxSet::MappedBoxSet(
+   const MappedBoxSet& other):
+   d_set(other.d_set)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+MappedBoxSet::~MappedBoxSet()
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+MappedBoxSet& MappedBoxSet::operator = (
+   const MappedBoxSet& rhs)
+{
+   d_set = rhs.d_set;
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool MappedBoxSet::operator == (
+   const MappedBoxSet& rhs) const
+{
+   return d_set == rhs.d_set;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool MappedBoxSet::operator != (
+   const MappedBoxSet& rhs) const
+{
+   return d_set != rhs.d_set;
+}
+
+SAMRAI_INLINE_KEYWORD
+void MappedBoxSet::swap(
+   MappedBoxSet& other)
+{
+   d_set.swap(other.d_set);
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MappedBoxSet.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MappedBoxSet.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,371 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Extension of a std 
+ *
+ ************************************************************************/
+#ifndef included_hier_MappedBoxSet
+#define included_hier_MappedBoxSet
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/MappedBox.h"
+#include "SAMRAI/tbox/Database.h"
+
+#include <set>
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief A wrapper around std::set<MappedBox>.
+ *
+ * This is little more than a std::set<MappedBox>, a sorted container
+ * of MappedBoxes.  It adds a few additional "features" such as:
+ *
+ * - Database reading/writing
+ * - printing
+ */
+class MappedBoxSet
+{
+
+public:
+
+   /*!
+    * @brief Default constructor creates an empty container.
+    */
+   MappedBoxSet();
+
+   /*!
+    * @brief Copy constructor.
+    *
+    * @param[in] other
+    */
+   MappedBoxSet(
+      const MappedBoxSet& other);
+
+   //! @brief Destructor.
+   virtual ~MappedBoxSet();
+
+
+   //@{
+
+   //! @name Types defined by std::set.
+
+   typedef std::set<MappedBox>::iterator iterator;
+   typedef std::set<MappedBox>::const_iterator const_iterator;
+   typedef std::set<MappedBox>::reverse_iterator reverse_iterator;
+   typedef std::set<MappedBox>::const_reverse_iterator const_reverse_iterator;
+   typedef std::set<MappedBox>::key_type key_type;
+   typedef std::set<MappedBox>::value_type value_type;
+   typedef std::set<MappedBox>::size_type size_type;
+   typedef std::set<MappedBox>::reference reference;
+   typedef std::set<MappedBox>::const_reference const_reference;
+
+   //@}
+
+
+   //@{
+
+   //! @name Set-like interfaces: see STL set documentation.
+
+   /*
+    * This is just a subset of the set interface.  Add more as needed.
+    * These methods just pass the call off to d_set.
+    */
+
+   iterator begin() {
+      return d_set.begin();
+   }
+
+   iterator end() {
+      return d_set.end();
+   }
+
+   const_iterator begin() const {
+      return d_set.begin();
+   }
+
+   const_iterator end() const {
+      return d_set.end();
+   }
+
+   reverse_iterator rbegin() {
+      return d_set.rbegin();
+   }
+
+   reverse_iterator rend() {
+      return d_set.rend();
+   }
+
+   const_reverse_iterator rbegin() const {
+      return d_set.rbegin();
+   }
+
+   const_reverse_iterator rend() const {
+      return d_set.rend();
+   }
+
+
+   iterator insert(
+      iterator i,
+      const value_type& v) {
+      return d_set.insert(i, v);
+   }
+
+   std::pair<iterator, bool> insert(
+      const value_type& v) {
+      return d_set.insert(v);
+   }
+
+   template<class InputIterator>
+   void insert(
+      InputIterator i,
+      InputIterator j) {
+      d_set.insert(i, j);
+   }
+
+   void erase(
+      iterator i) {
+      d_set.erase(i);
+   }
+
+   size_type erase(
+      const key_type& k) {
+      return d_set.erase(k);
+   }
+
+   void erase(
+      iterator first,
+      iterator last) {
+      d_set.erase(first, last);
+   }
+
+
+   size_t size() const {
+      return d_set.size();
+   }
+
+   bool empty() const {
+      return d_set.empty();
+   }
+
+   void clear() {
+      d_set.clear();
+   }
+
+
+   iterator find(
+      const key_type& k) {
+      return d_set.find(k);
+   }
+
+   iterator lower_bound(
+      const key_type& k) {
+      return d_set.lower_bound(k);
+   }
+
+   iterator upper_bound(
+      const key_type& k) {
+      return d_set.upper_bound(k);
+   }
+
+   const_iterator find(
+      const key_type& k) const {
+      return d_set.find(k);
+   }
+
+
+   MappedBoxSet&
+   operator = (
+      const MappedBoxSet& rhs);
+
+   bool
+   operator == (
+      const MappedBoxSet& rhs) const;
+
+   bool
+   operator != (
+      const MappedBoxSet& rhs) const;
+
+   void
+   swap(
+      MappedBoxSet& other);
+
+   static void
+   swap(
+      MappedBoxSet& a,
+      MappedBoxSet& b);
+
+
+   operator const std::set<MappedBox>& () const { return d_set;
+   }
+
+   operator std::set<MappedBox>& ()
+   {
+      return d_set;
+   }
+
+   //@}
+
+
+   //@{
+
+   //! @name Structure to represent a range of items in the container.
+
+   /*!
+    * @brief Shorthand for a range of MappedBoxes in a MappedBoxSet.
+    *
+    * A Range has two members: first and second.  It denotes the
+    * subset [first,second), which includes first and everything up to
+    * but not including second.  An empty range is designated by first
+    * == second.
+    */
+   typedef std::pair<iterator, iterator> Range;
+
+   /*!
+    * @brief Shorthand for an range of MappedBoxes in a const MappedBoxSet.
+    *
+    * A Range has two members: first and second.  It denotes the
+    * subset [first,second), which includes first and everything up to
+    * but not including second.  An empty range is designated by first
+    * == second.
+    */
+   typedef std::pair<const_iterator, const_iterator> ConstRange;
+
+   //@}
+
+   /*!
+    * @brief Find the range of the MappedBoxes of a given rank.
+    *
+    * The MappedBoxes found are in [first,second).  If first==second,
+    * no MappedBoxes are found for the given rank.
+    *
+    * @return the range requested.
+    */
+   Range
+   findRanksRange(
+      int rank);
+
+   /*!
+    * @brief Find range for MappedBoxes of a given rank.
+    *
+    * The MappedBoxes belonging to the given rank are in
+    * [first,second).  If first == second, no MappedBoxes are found
+    * for the given rank.
+    *
+    * @return the range requested.
+    */
+   ConstRange
+   findRanksRange(
+      int rank) const;
+
+   /*!
+    * @brief Whether the subsets of MappedBoxes owned by a given
+    * process are the same between this and another MappedBoxSet.
+    */
+   bool
+   isLocallyEqual(
+      const MappedBoxSet& other,
+      int rank) const;
+
+
+   //@{
+   /*!
+    * @name IO support.
+    */
+
+   /*!
+    * @brief Write the MappedBoxSet to a database.
+    */
+   void
+   putToDatabase(
+      tbox::Database& database) const;
+
+   /*!
+    * @brief Read the MappedBoxSet from a database.
+    */
+   void
+   getFromDatabase(
+      tbox::Database& database);
+
+
+   /*!
+    * @brief Intermediary between MappedBoxSet and output streams,
+    * adding ability to control the output.  See
+    * MappedBoxSet::format().
+    */
+   class Outputter {
+
+      friend std::ostream& operator << ( std::ostream& s, const Outputter& f);
+
+   private:
+
+      friend class MappedBoxSet;
+
+      /*!
+       * @brief Construct the Outputter with a MappedBoxSet and the
+       * parameters needed to output the MappedBoxSet to a stream.
+       */
+      Outputter( const MappedBoxSet &mapped_box_set,
+                 const std::string& border,
+                 int detail_depth = 0);
+
+      void operator=( const Outputter &rhs ); // Unimplemented private.
+
+      const MappedBoxSet &d_set;
+
+      const std::string d_border;
+
+      const int d_detail_depth;
+   };
+
+   /*!
+    * @brief Return a object to that can format the MappedBoxSet for
+    * inserting into output streams.
+    *
+    * Usage example (printing with a tab indentation):
+    * @verbatim
+    *    cout << "my mapped_boxes:\n" << mapped_boxes.format("\t") << endl;
+    * @endverbatim
+    *
+    * @param[in] border Left border of the output
+    *
+    * @param[in] detail_depth How much detail to print.
+    */
+   Outputter format( const std::string& border,
+                     int detail_depth = 0 ) const;
+
+   /*!
+    * @brief Print the contents of the object recursively.
+    *
+    * @param[in] output_stream
+    *
+    * @param[in] border Left border of the output
+    *
+    * @param[in] detail_depth How much detail to print.
+    */
+   void
+   recursivePrint(
+      std::ostream& output_stream,
+      const std::string& left_border,
+      int detail_depth) const;
+
+   //@}
+
+private:
+   std::set<MappedBox> d_set;
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/MappedBoxSet.I"
+#endif
+
+#endif  // included_hier_MappedBoxSet
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MappedBoxTree.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MappedBoxTree.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1238 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Binary tree of MappedBoxes for overlap searches. 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_MappedBoxTree_C
+#define included_hier_MappedBoxTree_C
+
+#include "SAMRAI/hier/MappedBoxTree.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/Statistician.h"
+#include "SAMRAI/tbox/TimerManager.h"
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+tbox::Pointer<tbox::Timer> MappedBoxTree::t_build_tree[tbox::Dimension::
+                                                       MAXIMUM_DIMENSION_VALUE];
+tbox::Pointer<tbox::Timer> MappedBoxTree::t_search[tbox::Dimension::
+                                                   MAXIMUM_DIMENSION_VALUE];
+unsigned int MappedBoxTree::s_num_build[tbox::Dimension::MAXIMUM_DIMENSION_VALUE] =
+{ 0 };
+unsigned int MappedBoxTree::s_num_generate[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]
+   =
+   { 0 };
+unsigned int MappedBoxTree::s_num_duplicate[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]
+   =
+   { 0 };
+unsigned int MappedBoxTree::s_num_search[tbox::Dimension::MAXIMUM_DIMENSION_VALUE] =
+{ 0 };
+unsigned int MappedBoxTree::s_num_sorted_box[tbox::Dimension::MAXIMUM_DIMENSION_VALUE
+] = { 0 };
+unsigned int MappedBoxTree::s_num_found_box[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]
+   =
+   { 0 };
+unsigned int MappedBoxTree::s_max_sorted_box[tbox::Dimension::MAXIMUM_DIMENSION_VALUE
+] = { 0 };
+unsigned int MappedBoxTree::s_max_found_box[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]
+   =
+   { 0 };
+unsigned int MappedBoxTree::s_max_lin_search[tbox::Dimension::MAXIMUM_DIMENSION_VALUE
+] = { 0 };
+
+tbox::StartupShutdownManager::Handler
+MappedBoxTree::s_initialize_finalize_handler(
+   MappedBoxTree::initializeCallback,
+   0,
+   0,
+   MappedBoxTree::finalizeCallback,
+   tbox::StartupShutdownManager::priorityTimers);
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+
+MappedBoxTree::MappedBoxTree():
+   d_dim(tbox::Dimension::getInvalidDimension()),
+   d_bounding_box(tbox::Dimension::getInvalidDimension()),
+   d_partition_dim(0)
+{
+   TBOX_ERROR("Using forbidden MappedBoxTree constructor.\n"
+              <<"This constructor should never be invoked.");
+}
+
+MappedBoxTree::MappedBoxTree(
+   const tbox::Dimension& dim):
+   d_dim(dim),
+   d_bounding_box(dim),
+   d_partition_dim(0)
+{
+}
+
+MappedBoxTree::MappedBoxTree(
+   const tbox::Dimension& dim,
+   const MappedBoxSet& mapped_boxes,
+   size_t min_number):
+   d_dim(dim),
+   d_bounding_box(dim)
+{
+   ++s_num_build[d_dim.getValue() - 1];
+   s_num_sorted_box[d_dim.getValue() - 1] +=
+      static_cast<int>(mapped_boxes.size());
+   s_max_sorted_box[d_dim.getValue() - 1] = tbox::MathUtilities<int>::Max(
+         s_max_sorted_box[d_dim.getValue() - 1],
+         static_cast<int>(mapped_boxes.size()));
+   t_build_tree[d_dim.getValue() - 1]->start();
+   min_number = (min_number < 1) ? 1 : min_number;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   // Catch empty boxes so sorting logic does not have to.
+   for (MappedBoxSet::const_iterator ni = mapped_boxes.begin();
+        ni != mapped_boxes.end();
+        ++ni) {
+      TBOX_ASSERT(!ni->getBox().empty());
+   }
+#endif
+
+   /*
+    * Implementation note: We can simply copy mapped_boxes into
+    * d_mapped_boxes and call privateGenerateTree using:
+    *
+    *   d_mapped_boxes.insert(d_mapped_boxes.end(),
+    *                         mapped_boxes.begin(),
+    *                         mapped_boxes.end());
+    *   privateGenerateTree(d_mapped_boxes, d_partition_dim, min_number);
+    *
+    * However, this extra copy slows things down about 30%.
+    * So we live with the repetitious code to do the same thing
+    * that privateGenerateTree, except with a MappedBoxSet instead of a
+    * std::vector<MappedBox >.
+    */
+
+   /*
+    * Compute this mapped_box's domain, which is the bounding box
+    * for the list of boxes.
+    */
+   for (MappedBoxSet::const_iterator ni = mapped_boxes.begin();
+        ni != mapped_boxes.end(); ++ni) {
+      d_bounding_box += (*ni).getBox();
+   }
+
+   /*
+    * If the list of boxes is small enough, we won't
+    * do any recursive stuff: we'll just let the boxes
+    * live here.  In this case, there is no left child,
+    * no right child.
+    */
+   if (mapped_boxes.size() <= min_number) {
+      d_mapped_boxes.insert(d_mapped_boxes.end(),
+         mapped_boxes.begin(), mapped_boxes.end());
+      if (s_max_lin_search[d_dim.getValue() - 1] < d_mapped_boxes.size()) {
+         s_max_lin_search[d_dim.getValue() - 1] =
+            static_cast<int>(d_mapped_boxes.size());
+      }
+   } else {
+
+      /*
+       * Partition the boxes into three sets, using the midpoint of
+       * the longest dimension of the bounding box:
+       *
+       * - those that belong to me (intersects the midpoint plane)
+       *
+       * - those that belong to my left child (lower than the midpoint
+       *      plane)
+       *
+       * - those that belong to my right child (higher than the
+       *      midpoint plane)
+       */
+
+      const IntVector bbsize = d_bounding_box.numberCells();
+      d_partition_dim = 0;
+      for (int d = 1; d < d_dim.getValue(); ++d) {
+         if (bbsize(d_partition_dim) < bbsize(d)) {
+            d_partition_dim = d;
+         }
+      }
+
+      int mid =
+         (d_bounding_box.lower(d_partition_dim)
+          + d_bounding_box.upper(d_partition_dim)) / 2;
+
+      std::vector<MappedBox> left_mapped_boxes, right_mapped_boxes;
+      for (MappedBoxSet::const_iterator ni = mapped_boxes.begin();
+           ni != mapped_boxes.end(); ++ni) {
+         const MappedBox& mapped_box = *ni;
+         if (mapped_box.getBox().upper(d_partition_dim) <= mid) {
+            left_mapped_boxes.insert(left_mapped_boxes.end(), mapped_box);
+         } else if (mapped_box.getBox().lower(d_partition_dim) > mid) {
+            right_mapped_boxes.insert(right_mapped_boxes.end(), mapped_box);
+         } else {
+            d_mapped_boxes.insert(d_mapped_boxes.end(), mapped_box);
+         }
+      }
+
+      /*
+       * Recurse to build this mapped_box's left and right children.
+       */
+      if (!left_mapped_boxes.empty()) {
+         tbox::Pointer<MappedBoxTree> child(new MappedBoxTree(d_dim));
+         d_left_child = child;
+         d_left_child->privateGenerateTree(left_mapped_boxes, min_number);
+      }
+
+      if (!right_mapped_boxes.empty()) {
+         tbox::Pointer<MappedBoxTree> child(new MappedBoxTree(d_dim));
+         d_right_child = child;
+         d_right_child->privateGenerateTree(right_mapped_boxes, min_number);
+      }
+
+      /*
+       * TODO: Unlike in privateGenerateTree, we seem to be assuming
+       * that d_mapped_boxes have few enough boxes.  I think we should
+       * follow privateGenerateTree's code and generate a d_tree if
+       * d_mapped_boxes have more than min_number of boxes.  This may
+       * fix mysterious performance issues observed at 64K processes.
+       * BTNG.
+       */
+   }
+
+   t_build_tree[d_dim.getValue() - 1]->stop();
+}
+
+/*
+ *************************************************************************
+ * Constructs a MappedBoxTree that represents the physical
+ * domain specified by box.
+ *************************************************************************
+ */
+
+MappedBoxTree::MappedBoxTree(
+   const tbox::Dimension& dim,
+   const std::vector<MappedBox>& mapped_boxes,
+   size_t min_number):
+   d_dim(dim),
+   d_bounding_box(dim)
+{
+   t_build_tree[d_dim.getValue() - 1]->start();
+   ++s_num_build[d_dim.getValue() - 1];
+   s_num_sorted_box[d_dim.getValue() - 1] +=
+      static_cast<int>(mapped_boxes.size());
+   s_max_sorted_box[d_dim.getValue() - 1] = tbox::MathUtilities<int>::Max(
+         s_max_sorted_box[d_dim.getValue() - 1],
+         static_cast<int>(mapped_boxes.size()));
+   min_number = (min_number < 1) ? 1 : min_number;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   // Catch empty boxes so sorting logic does not have to.
+   for (std::vector<MappedBox>::const_iterator ni = mapped_boxes.begin();
+        ni != mapped_boxes.end();
+        ++ni) {
+      TBOX_ASSERT(!ni->getBox().empty());
+   }
+#endif
+
+   /*
+    * Compute this mapped_box's domain, which is the bounding box
+    * for the list of boxes.
+    */
+   for (std::vector<MappedBox>::const_iterator ni = mapped_boxes.begin();
+        ni != mapped_boxes.end(); ++ni) {
+      d_bounding_box += (*ni).getBox();
+   }
+
+   /*
+    * If the list of boxes is small enough, we won't
+    * do any recursive stuff: we'll just let the boxes
+    * live here.  In this case, there is no left child,
+    * no right child, and no recursive d_tree.
+    */
+   if (mapped_boxes.size() <= min_number) {
+      d_mapped_boxes = mapped_boxes;
+   } else {
+
+      /*
+       * Partition the boxes into three sets:
+       *    - those that belong to me
+       *    - those that belong to my left child
+       *    - those that belong to my right child
+       */
+
+      const IntVector bbsize = d_bounding_box.numberCells();
+      d_partition_dim = 0;
+      for (int d = 1; d < dim.getValue(); ++d) {
+         if (bbsize(d_partition_dim) < bbsize(d)) {
+            d_partition_dim = d;
+         }
+      }
+
+      int mid =
+         (d_bounding_box.lower(d_partition_dim)
+          + d_bounding_box.upper(d_partition_dim)) / 2;
+
+      std::vector<MappedBox> left_mapped_boxes, right_mapped_boxes;
+      for (std::vector<MappedBox>::const_iterator ni = mapped_boxes.begin();
+           ni != mapped_boxes.end(); ++ni) {
+         const MappedBox& mapped_box = *ni;
+         if (mapped_box.getBox().upper(d_partition_dim) <= mid) {
+            left_mapped_boxes.insert(left_mapped_boxes.end(), mapped_box);
+         } else if (mapped_box.getBox().lower(d_partition_dim) > mid) {
+            right_mapped_boxes.insert(right_mapped_boxes.end(), mapped_box);
+         } else {
+            d_mapped_boxes.insert(d_mapped_boxes.end(), mapped_box);
+         }
+      }
+
+      /*
+       * Recurse to build this mapped_box's left and right children.
+       */
+      if (!left_mapped_boxes.empty()) {
+         d_left_child = new MappedBoxTree(d_dim);
+         d_left_child->privateGenerateTree(left_mapped_boxes, min_number);
+      }
+
+      if (!right_mapped_boxes.empty()) {
+         d_right_child = new MappedBoxTree(d_dim);
+         d_right_child->privateGenerateTree(right_mapped_boxes, min_number);
+      }
+
+      /*
+       * TODO: Unlike in privateGenerateTree, we seem to be assuming
+       * that d_mapped_boxes have few enough boxes.  I think we should
+       * follow privateGenerateTree's code and generate a d_tree if
+       * d_mapped_boxes have more than min_number of boxes.  This may
+       * fix mysterious performance issues observed at 64K processes.
+       * BTNG.
+       */
+   }
+
+   t_build_tree[d_dim.getValue() - 1]->stop();
+}
+
+/*
+ *************************************************************************
+ * Constructs a MappedBoxTree that represents the physical
+ * domain specified by box.
+ *************************************************************************
+ */
+
+MappedBoxTree::MappedBoxTree(
+   const tbox::Dimension& dim,
+   const Box* boxes,
+   size_t num_boxes,
+   size_t min_number):
+   d_dim(dim),
+   d_bounding_box(dim)
+{
+   ++s_num_build[d_dim.getValue() - 1];
+   s_num_sorted_box[d_dim.getValue() - 1] += static_cast<int>(num_boxes);
+   s_max_sorted_box[d_dim.getValue() - 1] = tbox::MathUtilities<int>::Max(
+         s_max_sorted_box[d_dim.getValue() - 1],
+         static_cast<int>(num_boxes));
+   t_build_tree[d_dim.getValue() - 1]->start();
+   min_number = (min_number < 1) ? 1 : min_number;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   // Catch empty boxes so sorting logic does not have to.
+   for (size_t i = 0; i < num_boxes; ++i) {
+      TBOX_ASSERT(!boxes[i].empty());
+   }
+#endif
+
+   /*
+    * Compute this mapped_box's domain, which is the bounding box
+    * for the list of boxes.
+    */
+   for (size_t i = 0; i < num_boxes; ++i) {
+      d_bounding_box += boxes[i];
+   }
+
+   /*
+    * If the list of boxes is small enough, we won't
+    * do any recursive stuff: we'll just let the boxes
+    * live here.  In this case, there is no left child,
+    * no right child, and no recursive d_tree.
+    */
+   if (num_boxes <= min_number) {
+      d_mapped_boxes.reserve(num_boxes);
+      for (LocalId i(0); i < static_cast<int>(num_boxes); ++i) {
+         const MappedBox n(boxes[i.getValue()], i, 0);
+         d_mapped_boxes.insert(d_mapped_boxes.end(), n);
+      }
+      if (s_max_lin_search[d_dim.getValue() - 1] < d_mapped_boxes.size()) {
+         s_max_lin_search[d_dim.getValue() - 1] =
+            static_cast<int>(d_mapped_boxes.size());
+      }
+   } else {
+
+      /*
+       * Partition the boxes into three sets:
+       *    - those that belong to me
+       *    - those that belong to my left child
+       *    - those that belong to my right child
+       */
+
+      const IntVector bbsize = d_bounding_box.numberCells();
+      d_partition_dim = 0;
+      for (int d = 1; d < dim.getValue(); ++d) {
+         if (bbsize(d_partition_dim) < bbsize(d)) {
+            d_partition_dim = d;
+         }
+      }
+
+      int mid =
+         (d_bounding_box.lower(d_partition_dim)
+          + d_bounding_box.upper(d_partition_dim)) / 2;
+
+      std::vector<MappedBox> left_mapped_boxes, right_mapped_boxes;
+      for (LocalId i(0); i < static_cast<int>(num_boxes); ++i) {
+         const MappedBox mapped_box(boxes[i.getValue()], i, 0);
+         if (mapped_box.getBox().upper(d_partition_dim) <= mid) {
+            left_mapped_boxes.insert(left_mapped_boxes.end(), mapped_box);
+         } else if (mapped_box.getBox().lower(d_partition_dim) > mid) {
+            right_mapped_boxes.insert(right_mapped_boxes.end(), mapped_box);
+         } else {
+            d_mapped_boxes.insert(d_mapped_boxes.end(), mapped_box);
+         }
+      }
+
+      /*
+       * Recurse to build this mapped_box's left and right children.
+       */
+      if (!left_mapped_boxes.empty()) {
+         d_left_child = new MappedBoxTree(d_dim);
+         d_left_child->privateGenerateTree(left_mapped_boxes, min_number);
+      }
+
+      if (!right_mapped_boxes.empty()) {
+         d_right_child = new MappedBoxTree(d_dim);
+         d_right_child->privateGenerateTree(right_mapped_boxes, min_number);
+      }
+
+      /*
+       * TODO: Unlike in privateGenerateTree, we seem to be assuming
+       * that d_mapped_boxes have few enough boxes.  I think we should
+       * follow privateGenerateTree's code and generate a d_tree if
+       * d_mapped_boxes have more than min_number of boxes.  This may
+       * fix mysterious performance issues observed at 64K processes.
+       * BTNG.
+       */
+   }
+
+   t_build_tree[d_dim.getValue() - 1]->stop();
+}
+
+/*
+ *************************************************************************
+ * Constructs a MappedBoxTree that represents the physical
+ * domain specified by box.
+ *************************************************************************
+ */
+
+MappedBoxTree::MappedBoxTree(
+   const tbox::Dimension& dim,
+   const hier::BoxList& boxes,
+   size_t min_number):
+   d_dim(dim),
+   d_bounding_box(d_dim)
+{
+   t_build_tree[d_dim.getValue() - 1]->start();
+   ++s_num_build[d_dim.getValue() - 1];
+   s_num_sorted_box[d_dim.getValue() - 1] += boxes.size();
+   s_max_sorted_box[d_dim.getValue() - 1] = tbox::MathUtilities<int>::Max(
+         s_max_sorted_box[d_dim.getValue() - 1],
+         boxes.size());
+   min_number = (min_number < 1) ? 1 : min_number;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   // Catch empty boxes so sorting logic does not have to.
+   for (hier::BoxList::Iterator ni(boxes); ni; ni++) {
+      TBOX_ASSERT(!(*ni).empty());
+   }
+#endif
+
+   /*
+    * Compute this mapped_box's domain, which is the bounding box
+    * for the list of boxes.
+    */
+   for (hier::BoxList::Iterator li(boxes); li; li++) {
+      d_bounding_box += *li;
+   }
+
+   /*
+    * If the list of boxes is small enough, we won't
+    * do any recursive stuff: we'll just let the boxes
+    * live here.  In this case, there is no left child,
+    * no right child, and no recursive d_tree.
+    */
+   if ((size_t)boxes.size() <= min_number) {
+      d_mapped_boxes.reserve(boxes.size());
+      LocalId count(-1);
+      for (hier::BoxList::Iterator li(boxes); li; li++) {
+         const MappedBox n(*li, ++count, 0);
+         d_mapped_boxes.insert(d_mapped_boxes.end(), n);
+      }
+      if (s_max_lin_search[d_dim.getValue() - 1] < d_mapped_boxes.size()) {
+         s_max_lin_search[d_dim.getValue() - 1] =
+            static_cast<int>(d_mapped_boxes.size());
+      }
+   } else {
+
+      /*
+       * Partition the boxes into three sets:
+       *    - those that belong to me
+       *    - those that belong to my left child
+       *    - those that belong to my right child
+       */
+
+      const IntVector bbsize = d_bounding_box.numberCells();
+      d_partition_dim = 0;
+      for (int d = 1; d < dim.getValue(); ++d) {
+         if (bbsize(d_partition_dim) < bbsize(d)) {
+            d_partition_dim = d;
+         }
+      }
+
+      int mid =
+         (d_bounding_box.lower(d_partition_dim)
+          + d_bounding_box.upper(d_partition_dim)) / 2;
+
+      std::vector<MappedBox> left_mapped_boxes, right_mapped_boxes;
+      LocalId count(-1);
+      for (hier::BoxList::Iterator li(boxes); li; li++) {
+         const MappedBox mapped_box(*li, ++count, 0);
+         if (mapped_box.getBox().upper(d_partition_dim) <= mid) {
+            left_mapped_boxes.insert(left_mapped_boxes.end(), mapped_box);
+         } else if (mapped_box.getBox().lower(d_partition_dim) > mid) {
+            right_mapped_boxes.insert(right_mapped_boxes.end(), mapped_box);
+         } else {
+            d_mapped_boxes.insert(d_mapped_boxes.end(), mapped_box);
+         }
+      }
+
+      /*
+       * Recurse to build this mapped_box's left and right children.
+       */
+      if (!left_mapped_boxes.empty()) {
+         d_left_child = new MappedBoxTree(d_dim);
+         d_left_child->privateGenerateTree(left_mapped_boxes, min_number);
+      }
+
+      if (!right_mapped_boxes.empty()) {
+         d_right_child = new MappedBoxTree(d_dim);
+         d_right_child->privateGenerateTree(right_mapped_boxes, min_number);
+      }
+
+      /*
+       * TODO: Unlike in privateGenerateTree, we seem to be assuming
+       * that d_mapped_boxes have few enough boxes.  I think we should
+       * follow privateGenerateTree's code and generate a d_tree if
+       * d_mapped_boxes have more than min_number of boxes.  This may
+       * fix mysterious performance issues observed at 64K processes.
+       * BTNG.
+       */
+   }
+
+   t_build_tree[d_dim.getValue() - 1]->stop();
+}
+
+/*
+ *************************************************************************
+ * dtor
+ *************************************************************************
+ */
+
+MappedBoxTree::~MappedBoxTree()
+{
+}
+
+/*
+ *************************************************************************
+ * Assignment operator.
+ *
+ * We share the children with the reference MappedBoxTree.  This is
+ * safe because the trees are never changed once they are set up.  If
+ * one MappedBoxTree changes, it simply sets its children pointers to
+ * NULL instead of trying to change the children.  Other
+ * MappedBoxTrees sharing the children do not see any changes to the
+ * children.
+ *************************************************************************
+ */
+
+MappedBoxTree& MappedBoxTree::operator = (
+   const MappedBoxTree& r)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, r);
+
+   d_bounding_box = r.d_bounding_box;
+   d_left_child = r.d_left_child;
+   d_right_child = r.d_right_child;
+   d_mapped_boxes = r.d_mapped_boxes;
+   d_partition_dim = r.d_partition_dim;
+   d_tree = r.d_tree;
+   return *this;
+}
+
+/*
+ *************************************************************************
+ * Generate the tree from a given mutable vector of mapped_boxes.
+ * The vector will be changed and its output state is undefined.
+ *************************************************************************
+ */
+void MappedBoxTree::generateTree(
+   std::vector<MappedBox>& mapped_boxes,
+   size_t min_number)
+{
+   t_build_tree[d_dim.getValue() - 1]->start();
+   ++s_num_build[d_dim.getValue() - 1];
+   s_num_sorted_box[d_dim.getValue() - 1] +=
+      static_cast<int>(mapped_boxes.size());
+   s_max_sorted_box[d_dim.getValue() - 1] = tbox::MathUtilities<int>::Max(
+         s_max_sorted_box[d_dim.getValue() - 1],
+         static_cast<int>(mapped_boxes.size()));
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   // Catch empty boxes so sorting logic does not have to.
+   for (std::vector<MappedBox>::const_iterator ni = mapped_boxes.begin();
+        ni != mapped_boxes.end();
+        ++ni) {
+      TBOX_ASSERT(!ni->getBox().empty());
+   }
+#endif
+
+   clear();
+   privateGenerateTree(mapped_boxes, min_number);
+   t_build_tree[d_dim.getValue() - 1]->stop();
+}
+
+/*
+ *************************************************************************
+ * Generate the tree from a given mutable vector of mapped_boxes.
+ * The vector will be changed and its output state is undefined.
+ *
+ * Methods taking various input containers of mapped_boxes could
+ * simply copy the input MappedBoxes into a vector, then call this
+ * method.  However, we don't do that for efficiency reasons.  The
+ * extra copy turns out to be significant.  Therefore, the
+ * constructors have code similar to privateGenerateTree to make the
+ * first tree branching.  Further branching is done by
+ * privateGenerateTree.
+ *
+ * This method is not timed using the Timers.  Only the public
+ * itnerfaces are timed.  Isolating the recursive code in
+ * privateGenerateTree also helps in timing the methods, because timer
+ * starts/stops can be removed from the recursive codes.
+ *************************************************************************
+ */
+void MappedBoxTree::privateGenerateTree(
+   std::vector<MappedBox>& mapped_boxes,
+   size_t min_number)
+{
+   ++s_num_generate[d_dim.getValue() - 1];
+
+   // d_partition_dim = dim;
+   if (&mapped_boxes != &d_mapped_boxes) {
+      swap(mapped_boxes, d_mapped_boxes);
+   }
+
+   /*
+    * Compute this mapped_box's domain, which is the bounding box
+    * for the list of boxes.
+    */
+   for (std::vector<MappedBox>::const_iterator ni = d_mapped_boxes.begin();
+        ni != d_mapped_boxes.end(); ++ni) {
+      d_bounding_box += (*ni).getBox();
+   }
+
+   /*
+    * If the list of boxes is small enough, we won't
+    * do any recursive stuff: we'll just let the boxes
+    * live here.  In this case, there is no left child,
+    * no right child, and no recursive d_tree.
+    */
+   if (d_mapped_boxes.size() <= min_number) {
+      if (s_max_lin_search[d_dim.getValue() - 1] < d_mapped_boxes.size()) {
+         s_max_lin_search[d_dim.getValue() - 1] =
+            static_cast<int>(d_mapped_boxes.size());
+      }
+      return;
+   }
+
+   /*
+    * Partition the boxes into three sets:
+    *    - those that belong to me
+    *    - those that belong to my left child
+    *    - those that belong to my right child
+    */
+
+   const IntVector bbsize = d_bounding_box.numberCells();
+   d_partition_dim = 0;
+   for (int d = 1; d < d_dim.getValue(); ++d) {
+      if (bbsize(d_partition_dim) < bbsize(d)) {
+         d_partition_dim = d;
+      }
+   }
+
+   int mid =
+      (d_bounding_box.lower(d_partition_dim)
+       + d_bounding_box.upper(d_partition_dim)) / 2;
+
+   std::vector<MappedBox> left_mapped_boxes, right_mapped_boxes,
+                          cent_mapped_boxes;
+   for (std::vector<MappedBox>::const_iterator ni = d_mapped_boxes.begin();
+        ni != d_mapped_boxes.end(); ++ni) {
+      const MappedBox& mapped_box = *ni;
+      if (mapped_box.getBox().upper(d_partition_dim) <= mid) {
+         left_mapped_boxes.insert(left_mapped_boxes.end(), mapped_box);
+      } else if (mapped_box.getBox().lower(d_partition_dim) > mid) {
+         right_mapped_boxes.insert(right_mapped_boxes.end(), mapped_box);
+      } else {
+         cent_mapped_boxes.insert(cent_mapped_boxes.end(), mapped_box);
+      }
+   }
+   /*
+    * If all of d_mapped_boxes goes into a single child, the child is
+    * just as big as its parent, so there is no point recursing.  Put
+    * everything into the center so the check below will prevent
+    * recursion.
+    */
+   if (left_mapped_boxes.size() == d_mapped_boxes.size()) {
+      swap(left_mapped_boxes, cent_mapped_boxes);
+   } else if (right_mapped_boxes.size() == d_mapped_boxes.size()) {
+      swap(right_mapped_boxes, cent_mapped_boxes);
+   }
+
+#if 0
+   tbox::plog << "Split " << d_mapped_boxes.size() << "  " << d_bounding_box
+              << " across " << d_partition_dim << " at " << mid << " into "
+              << ' ' << left_mapped_boxes.size()
+              << ' ' << cent_mapped_boxes.size()
+              << ' ' << right_mapped_boxes.size()
+              << std::endl;
+#endif
+   if (cent_mapped_boxes.size() <= min_number /* truncate recursion */ ||
+       cent_mapped_boxes.size() == d_mapped_boxes.size() /* avoid infinite recursion */) {
+      swap(d_mapped_boxes, cent_mapped_boxes);
+      if (s_max_lin_search[d_dim.getValue() - 1] < d_mapped_boxes.size()) {
+         s_max_lin_search[d_dim.getValue() - 1] =
+            static_cast<int>(d_mapped_boxes.size());
+      }
+   } else {
+      d_mapped_boxes.clear();   // No longer needed for tree construction or search.
+      d_tree = new MappedBoxTree(d_dim);
+      d_tree->privateGenerateTree(cent_mapped_boxes, min_number);
+   }
+
+   /*
+    * Recurse to build this node's left and right children.
+    */
+   if (!left_mapped_boxes.empty()) {
+      d_left_child = new MappedBoxTree(d_dim);
+      d_left_child->privateGenerateTree(left_mapped_boxes, min_number);
+   }
+   if (!right_mapped_boxes.empty()) {
+      d_right_child = new MappedBoxTree(d_dim);
+      d_right_child->privateGenerateTree(right_mapped_boxes, min_number);
+   }
+
+}
+
+bool MappedBoxTree::hasOverlap(
+   const Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   return privateHasOverlap(box);
+}
+
+void MappedBoxTree::findOverlapMappedBoxes(
+   std::vector<MappedBox>& overlap_mapped_boxes,
+   const Box& box) const
+{
+   ++s_num_search[d_dim.getValue() - 1];
+   int num_found_box = static_cast<int>(overlap_mapped_boxes.size());
+   t_search[d_dim.getValue() - 1]->start();
+   privateFindOverlapMappedBoxes(overlap_mapped_boxes, box);
+   t_search[d_dim.getValue() - 1]->stop();
+   num_found_box = static_cast<int>(overlap_mapped_boxes.size()) -
+                   num_found_box;
+   s_max_found_box[d_dim.getValue()
+                   - 1] =
+      tbox::MathUtilities<int>::Max(s_max_found_box[d_dim.getValue() - 1],
+         num_found_box);
+   s_num_found_box[d_dim.getValue() - 1] += num_found_box;
+}
+
+void MappedBoxTree::clear()
+{
+   d_bounding_box.setEmpty();
+   d_left_child.setNull();
+   d_right_child.setNull();
+   d_mapped_boxes.clear();
+   d_tree.setNull();
+}
+
+bool MappedBoxTree::isInitialized() const
+{
+   return !d_bounding_box.empty();
+}
+
+const Box& MappedBoxTree::getBoundingBox() const
+{
+   return d_bounding_box;
+}
+
+const tbox::Dimension& MappedBoxTree::getDim() const
+{
+   return d_dim;
+}
+
+void MappedBoxTree::findOverlapMappedBoxes(
+   MappedBoxSet& overlap_mapped_boxes,
+   const Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   ++s_num_search[d_dim.getValue() - 1];
+   int num_found_box = static_cast<int>(overlap_mapped_boxes.size());
+   t_search[d_dim.getValue() - 1]->start();
+   privateFindOverlapMappedBoxes(overlap_mapped_boxes, box);
+   t_search[d_dim.getValue() - 1]->stop();
+   num_found_box = static_cast<int>(overlap_mapped_boxes.size()) -
+                   num_found_box;
+   s_max_found_box[d_dim.getValue()
+                   - 1] =
+      tbox::MathUtilities<int>::Max(s_max_found_box[d_dim.getValue() - 1],
+         num_found_box);
+   s_num_found_box[d_dim.getValue() - 1] += num_found_box;
+}
+
+bool MappedBoxTree::privateHasOverlap(
+   const Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   bool has_overlap = false;
+   if (box.intersects(d_bounding_box)) {
+
+      if (d_tree) {
+         has_overlap = d_tree->privateHasOverlap(box);
+      } else {
+         for (std::vector<MappedBox>::const_iterator ni = d_mapped_boxes.begin();
+              ni != d_mapped_boxes.end(); ++ni) {
+            const MappedBox& mapped_box = *ni;
+            if (box.intersects(mapped_box.getBox())) {
+               has_overlap = true;
+               break;
+            }
+         }
+      }
+
+      if (!has_overlap && d_left_child) {
+         has_overlap = d_left_child->privateHasOverlap(box);
+      }
+
+      if (!has_overlap && d_right_child) {
+         has_overlap = d_right_child->privateHasOverlap(box);
+      }
+   }
+   return has_overlap;
+}
+
+void MappedBoxTree::privateFindOverlapMappedBoxes(
+   MappedBoxSet& overlap_mapped_boxes,
+   const Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   if (box.intersects(d_bounding_box)) {
+
+      if (d_tree) {
+         d_tree->privateFindOverlapMappedBoxes(overlap_mapped_boxes, box);
+      } else {
+         for (std::vector<MappedBox>::const_iterator ni = d_mapped_boxes.begin();
+              ni != d_mapped_boxes.end(); ++ni) {
+            const MappedBox& mapped_box = *ni;
+            if (box.intersects(mapped_box.getBox())) {
+               overlap_mapped_boxes.insert(mapped_box);
+            }
+         }
+      }
+
+      if (d_left_child) {
+         d_left_child->privateFindOverlapMappedBoxes(overlap_mapped_boxes, box);
+      }
+
+      if (d_right_child) {
+         d_right_child->privateFindOverlapMappedBoxes(overlap_mapped_boxes, box);
+      }
+   }
+}
+
+void MappedBoxTree::privateFindOverlapMappedBoxes(
+   std::vector<MappedBox>& overlap_mapped_boxes,
+   const Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   if (box.intersects(d_bounding_box)) {
+
+      if (d_tree) {
+         d_tree->privateFindOverlapMappedBoxes(overlap_mapped_boxes, box);
+      } else {
+         for (std::vector<MappedBox>::const_iterator ni = d_mapped_boxes.begin();
+              ni != d_mapped_boxes.end(); ++ni) {
+            const MappedBox& mapped_box = *ni;
+            if (box.intersects(mapped_box.getBox())) {
+               overlap_mapped_boxes.insert(
+                  overlap_mapped_boxes.end(), mapped_box);
+            }
+         }
+      }
+
+      if (d_left_child) {
+         d_left_child->privateFindOverlapMappedBoxes(overlap_mapped_boxes, box);
+      }
+
+      if (d_right_child) {
+         d_right_child->privateFindOverlapMappedBoxes(overlap_mapped_boxes, box);
+      }
+   }
+}
+
+void MappedBoxTree::getMappedBoxes(
+   std::vector<MappedBox>& mapped_boxes) const
+{
+   if (d_tree) {
+      d_tree->getMappedBoxes(mapped_boxes);
+   } else {
+      mapped_boxes.insert(
+         mapped_boxes.end(),
+         d_mapped_boxes.begin(), d_mapped_boxes.end());
+   }
+
+   if (d_left_child) {
+      d_left_child->getMappedBoxes(mapped_boxes);
+   }
+
+   if (d_right_child) {
+      d_right_child->getMappedBoxes(mapped_boxes);
+   }
+}
+
+tbox::Pointer<MappedBoxTree> MappedBoxTree::createRefinedTree(
+   const IntVector& ratio) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, ratio);
+   TBOX_ASSERT(ratio >= IntVector::getOne(d_dim));
+
+   MappedBoxTree* rval = new MappedBoxTree(d_dim);
+
+   rval->d_partition_dim = d_dim.getValue();
+
+   rval->d_bounding_box = d_bounding_box;
+   rval->d_bounding_box.refine(ratio);
+
+   rval->d_mapped_boxes = d_mapped_boxes;
+   for (std::vector<MappedBox>::iterator ni = rval->d_mapped_boxes.begin();
+        ni != rval->d_mapped_boxes.end(); ++ni) {
+      (*ni).getBox().refine(ratio);
+   }
+
+   if (!d_tree.isNull()) {
+      rval->d_tree = d_tree->createRefinedTree(ratio);
+   }
+   if (!d_left_child.isNull()) {
+      rval->d_left_child = d_left_child->createRefinedTree(ratio);
+   }
+   if (!d_right_child.isNull()) {
+      rval->d_right_child = d_right_child->createRefinedTree(ratio);
+   }
+
+   return tbox::Pointer<MappedBoxTree>(rval);
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void MappedBoxTree::initializeCallback()
+{
+   for (int i = 0; i < tbox::Dimension::MAXIMUM_DIMENSION_VALUE; ++i) {
+      t_build_tree[i] = tbox::TimerManager::getManager()->
+         getTimer("hier::MappedBoxTree::build_tree");
+      t_search[i] = tbox::TimerManager::getManager()->
+         getTimer("hier::MappedBoxTree::search");
+   }
+}
+
+/*
+ ***************************************************************************
+ * Release static timers.  To be called by shutdown registry to make sure  *
+ * memory for timers does not leak.                                        *
+ ***************************************************************************
+ */
+void MappedBoxTree::finalizeCallback()
+{
+   for (int i = 0; i < tbox::Dimension::MAXIMUM_DIMENSION_VALUE; ++i) {
+      t_build_tree[i].setNull();
+      t_search[i].setNull();
+   }
+}
+
+/*
+ ***************************************************************************
+ ***************************************************************************
+ */
+void MappedBoxTree::resetStatistics(
+   const tbox::Dimension& dim)
+{
+   s_num_build[dim.getValue() - 1] = 0;
+   s_num_generate[dim.getValue() - 1] = 0;
+   s_num_duplicate[dim.getValue() - 1] = 0;
+   s_num_search[dim.getValue() - 1] = 0;
+   s_num_sorted_box[dim.getValue() - 1] = 0;
+   s_num_found_box[dim.getValue() - 1] = 0;
+   s_max_sorted_box[dim.getValue() - 1] = 0;
+   s_max_found_box[dim.getValue() - 1] = 0;
+   s_max_lin_search[dim.getValue() - 1] = 0;
+}
+
+/*
+ ***************************************************************************
+ ***************************************************************************
+ */
+void MappedBoxTree::printStatistics(
+   const tbox::Dimension& dim)
+{
+   tbox::plog << "MappedBoxTree local stats:"
+   << "  build=" << s_num_build[dim.getValue() - 1]
+   << "  generate=" << s_num_generate[dim.getValue() - 1]
+   << "  duplicate=" << s_num_duplicate[dim.getValue() - 1]
+   << "  search=" << s_num_search[dim.getValue() - 1]
+   << "  sorted_box=" << s_num_sorted_box[dim.getValue() - 1]
+   << "  found_box=" << s_num_found_box[dim.getValue() - 1]
+   << "  max_sorted_box=" << s_max_sorted_box[dim.getValue() - 1]
+   << "  max_found_box=" << s_max_found_box[dim.getValue() - 1]
+   << "  max_lin_search=" << s_max_lin_search[dim.getValue() - 1]
+   << std::endl;
+
+   tbox::Statistician* st = tbox::Statistician::getStatistician();
+   tbox::Pointer<tbox::Statistic> bdstat = st->getStatistic("num_build",
+         "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> gnstat = st->getStatistic("num_generate",
+         "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> dpstat = st->getStatistic("num_duplicate",
+         "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> srstat = st->getStatistic("num_search",
+         "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> sbstat = st->getStatistic("num_sorted_box",
+         "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> fbstat = st->getStatistic("num_found_box",
+         "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> msbstat = st->getStatistic("max_sorted_box",
+         "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> mfbstat = st->getStatistic("max_found_box",
+         "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> lsstat = st->getStatistic("max_lin_search",
+         "PROC_STAT");
+
+   static int seq_num = 0;
+   bdstat->recordProcStat(s_num_build[dim.getValue() - 1], seq_num);
+   gnstat->recordProcStat(s_num_generate[dim.getValue() - 1], seq_num);
+   dpstat->recordProcStat(s_num_duplicate[dim.getValue() - 1], seq_num);
+   srstat->recordProcStat(s_num_search[dim.getValue() - 1], seq_num);
+   sbstat->recordProcStat(s_num_sorted_box[dim.getValue() - 1], seq_num);
+   fbstat->recordProcStat(s_num_found_box[dim.getValue() - 1], seq_num);
+   lsstat->recordProcStat(s_max_lin_search[dim.getValue() - 1], seq_num);
+
+   st->finalize(false);
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   const int nproc = mpi.getSize();
+
+   double avg;
+   double min, max;
+   int rmin(0), rmax(0);
+
+   int doublewidth = 6;
+   int intwidth = 6;
+   int namewidth = 20;
+
+   min = max = avg = s_num_build[dim.getValue() - 1];
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&min, 1, MPI_MIN, &rmin);
+      mpi.AllReduce(&max, 1, MPI_MAX, &rmax);
+      mpi.AllReduce(&avg, 1, MPI_SUM);
+      avg /= nproc;
+   }
+   tbox::plog << std::setw(namewidth) << bdstat->getName()
+              << "  " << std::setw(doublewidth) << std::setprecision(0) << avg
+              << " [ " << std::setw(doublewidth) << std::setprecision(0)
+              << min << " at " << std::setw(intwidth) << rmin
+              << " -> " << std::setw(doublewidth) << std::setprecision(0)
+              << max << " at " << std::setw(intwidth) << rmax
+              << " ]"
+              << std::endl;
+
+   min = max = avg = s_num_generate[dim.getValue() - 1];
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&min, 1, MPI_MIN, &rmin);
+      mpi.AllReduce(&max, 1, MPI_MAX, &rmax);
+      mpi.AllReduce(&avg, 1, MPI_SUM);
+      avg /= nproc;
+   }
+   tbox::plog << std::setw(namewidth) << gnstat->getName()
+              << "  " << std::setw(namewidth) << std::setw(doublewidth)
+              << std::setprecision(0) << avg
+              << " [ " << std::setw(doublewidth) << std::setprecision(0)
+              << min << " at " << std::setw(intwidth) << rmin
+              << " -> " << std::setw(doublewidth) << std::setprecision(0)
+              << max << " at " << std::setw(intwidth) << rmax
+              << " ]"
+              << std::endl;
+
+   min = max = avg = s_num_duplicate[dim.getValue() - 1];
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&min, 1, MPI_MIN, &rmin);
+      mpi.AllReduce(&max, 1, MPI_MAX, &rmax);
+      mpi.AllReduce(&avg, 1, MPI_SUM);
+      avg /= nproc;
+   }
+   tbox::plog << std::setw(namewidth) << dpstat->getName()
+              << "  " << std::setw(doublewidth) << std::setprecision(0) << avg
+              << " [ " << std::setw(doublewidth) << std::setprecision(0)
+              << min << " at " << std::setw(intwidth) << rmin
+              << " -> " << std::setw(doublewidth) << std::setprecision(0)
+              << max << " at " << std::setw(intwidth) << rmax
+              << " ]"
+              << std::endl;
+
+   min = max = avg = s_num_search[dim.getValue() - 1];
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&min, 1, MPI_MIN, &rmin);
+      mpi.AllReduce(&max, 1, MPI_MAX, &rmax);
+      mpi.AllReduce(&avg, 1, MPI_SUM);
+      avg /= nproc;
+   }
+   tbox::plog << std::setw(namewidth) << srstat->getName()
+              << "  " << std::setw(doublewidth) << std::setprecision(0) << avg
+              << " [ " << std::setw(doublewidth) << std::setprecision(0)
+              << min << " at " << std::setw(intwidth) << rmin
+              << " -> " << std::setw(doublewidth) << std::setprecision(0)
+              << max << " at " << std::setw(intwidth) << rmax
+              << " ]"
+              << std::endl;
+
+   min = max = avg = s_num_sorted_box[dim.getValue() - 1];
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&min, 1, MPI_MIN, &rmin);
+      mpi.AllReduce(&max, 1, MPI_MAX, &rmax);
+      mpi.AllReduce(&avg, 1, MPI_SUM);
+      avg /= nproc;
+   }
+   tbox::plog << std::setw(namewidth) << sbstat->getName()
+              << "  " << std::setw(doublewidth) << std::setprecision(0) << avg
+              << " [ " << std::setw(doublewidth) << std::setprecision(0)
+              << min << " at " << std::setw(intwidth) << rmin
+              << " -> " << std::setw(doublewidth) << std::setprecision(0)
+              << max << " at " << std::setw(intwidth) << rmax
+              << " ]"
+              << std::endl;
+
+   min = max = avg = s_num_found_box[dim.getValue() - 1];
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&min, 1, MPI_MIN, &rmin);
+      mpi.AllReduce(&max, 1, MPI_MAX, &rmax);
+      mpi.AllReduce(&avg, 1, MPI_SUM);
+      avg /= nproc;
+   }
+   tbox::plog << std::setw(namewidth) << fbstat->getName()
+              << "  " << std::setw(doublewidth) << std::setprecision(0) << avg
+              << " [ " << std::setw(doublewidth) << std::setprecision(0)
+              << min << " at " << std::setw(intwidth) << rmin
+              << " -> " << std::setw(doublewidth) << std::setprecision(0)
+              << max << " at " << std::setw(intwidth) << rmax
+              << " ]"
+              << std::endl;
+
+   min = max = avg = s_max_sorted_box[dim.getValue() - 1];
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&min, 1, MPI_MIN, &rmin);
+      mpi.AllReduce(&max, 1, MPI_MAX, &rmax);
+      mpi.AllReduce(&avg, 1, MPI_SUM);
+      avg /= nproc;
+   }
+   tbox::plog << std::setw(namewidth) << msbstat->getName()
+              << "  " << std::setw(doublewidth) << std::setprecision(0) << avg
+              << " [ " << std::setw(doublewidth) << std::setprecision(0)
+              << min << " at " << std::setw(intwidth) << rmin
+              << " -> " << std::setw(doublewidth) << std::setprecision(0)
+              << max << " at " << std::setw(intwidth) << rmax
+              << " ]"
+              << std::endl;
+
+   min = max = avg = s_max_found_box[dim.getValue() - 1];
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&min, 1, MPI_MIN, &rmin);
+      mpi.AllReduce(&max, 1, MPI_MAX, &rmax);
+      mpi.AllReduce(&avg, 1, MPI_SUM);
+      avg /= nproc;
+   }
+   tbox::plog << std::setw(namewidth) << mfbstat->getName()
+              << "  " << std::setw(doublewidth) << std::setprecision(0) << avg
+              << " [ " << std::setw(doublewidth) << std::setprecision(0)
+              << min << " at " << std::setw(intwidth) << rmin
+              << " -> " << std::setw(doublewidth) << std::setprecision(0)
+              << max << " at " << std::setw(intwidth) << rmax
+              << " ]"
+              << std::endl;
+
+   min = max = avg = s_max_lin_search[dim.getValue() - 1];
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&min, 1, MPI_MIN, &rmin);
+      mpi.AllReduce(&max, 1, MPI_MAX, &rmax);
+      mpi.AllReduce(&avg, 1, MPI_SUM);
+      avg /= nproc;
+   }
+   tbox::plog << std::setw(namewidth) << bdstat->getName()
+              << "  " << std::setw(doublewidth) << std::setprecision(0) << avg
+              << " [ " << std::setw(doublewidth) << std::setprecision(0)
+              << min << " at " << std::setw(intwidth) << rmin
+              << " -> " << std::setw(doublewidth) << std::setprecision(0)
+              << max << " at " << std::setw(intwidth) << rmax
+              << " ]"
+              << std::endl;
+
+   ++seq_num;
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MappedBoxTree.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MappedBoxTree.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,447 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Binary tree of MappedBoxes for overlap searches. 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_MappedBoxTree
+#define included_hier_MappedBoxTree
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/MappedBox.h"
+#include "SAMRAI/hier/MappedBoxSet.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Timer.h"
+
+#include <vector>
+
+namespace SAMRAI {
+namespace hier {
+
+class BoxList;
+
+/*!
+ * @brief Utility sorting MappedBoxes into tree-like form for finding
+ * box overlaps.
+ *
+ * This class recursively splits a set of MappedBoxes into tree-like
+ * form and stores them for fast searches.  The recursive
+ * splitting stops when the number of boxes in a leaf node of the tree
+ * is less than a minimum number specified in the constructor.
+ *
+ * Overlap searches are done by
+ * - hasOverlap()
+ * - findOverlapMappedBoxes()
+ *
+ * Information about the boxes in the tree are given by
+ * - getBoundingBox()
+ * - getMappedBoxes()
+ */
+
+class MappedBoxTree:public tbox::DescribedClass
+{
+public:
+   /*!
+    * @brief Constructor building an uninitialized object.
+    *
+    * The object can be initialized using generateTree().
+    *
+    * @param[in] dim
+    */
+   explicit MappedBoxTree(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Constructs a MappedBoxTree from set of MappedBoxes.
+    *
+    * @param[in] dim
+    *
+    * @param[in] mapped_boxes.  No empty boxes are allowed.
+    *
+    * @param[in] min_number Split up sets of boxes while the number of
+    * boxes in a subset is greater than this value.  Setting to a
+    * larger value tends to make tree building faster but tree
+    * searching slower, and vice versa.  @b Default: 10
+    */
+   explicit MappedBoxTree(
+      const tbox::Dimension& dim,
+      const MappedBoxSet& mapped_boxes,
+      size_t min_number = 10);
+
+   /*!
+    * @brief Constructs a MappedBoxTree from vector of MappedBoxes.
+    *
+    * See MappedBoxTree( const tbox::Dimension& , const MappedBoxSet& , size_t min_number );
+    *
+    * @param[in] dim
+    *
+    * @param[in] mapped_boxes.  No empty boxes are allowed.
+    *
+    * @param[in] min_number.  @b Default: 10
+    */
+   explicit MappedBoxTree(
+      const tbox::Dimension& dim,
+      const std::vector<MappedBox>& mapped_boxes,
+      size_t min_number = 10);
+
+   /*!
+    * @brief Constructs a MappedBoxTree from array of MappedBoxes.
+    *
+    * See MappedBoxTree( const tbox::Dimension& , const MappedBoxSet& , size_t min_number );
+    *
+    * @param[in] dim
+    *
+    * @param[in] boxes Array of MappedBoxes.  No empty boxes are
+    * allowed.
+    *
+    * @param[in] num_boxes Number of boxes given.
+    *
+    * @param[in] min_number.  @b Default: 10
+    */
+   explicit MappedBoxTree(
+      const tbox::Dimension& dim,
+      const Box* boxes,
+      size_t num_boxes,
+      size_t min_number = 10);
+
+   /*!
+    * @brief Constructs a MappedBoxTree from a list of Boxes.
+    *
+    * See MappedBoxTree( const tbox::Dimension& , const MappedBoxSet& , size_t min_number );
+    *
+    * @param[in] dim
+    *
+    * @param[in] boxes.  No empty boxes are allowed.
+    *
+    * @param[in] min_number.  @b Default: 10
+    */
+   explicit MappedBoxTree(
+      const tbox::Dimension& dim,
+      const BoxList& boxes,
+      size_t min_number = 10);
+
+   /*!
+    * @brief Destructor.
+    */
+   ~MappedBoxTree();
+
+   /*!
+    * @brief Generates the tree from a MUTABLE vector of MappedBoxes.
+    *
+    * For efficiency reasons, mapped_boxes is changed in the process.
+    * Its output state is undefined.  However, you can change
+    * mapped_boxes after tree generation without invalidating the
+    * tree.
+    *
+    * @param[in] mapped_boxes.  No empty boxes are allowed.
+    *
+    * @param[in] min_number
+    */
+   void
+   generateTree(
+      std::vector<MappedBox>& mapped_boxes,
+      size_t min_number = 10);
+
+   /*!
+    * @brief Reset to uninitialized state.
+    *
+    * The dimension of boxes in the tree cannot be changed.
+    *
+    * Uninitialized trees can be initialized using generateTree().
+    */
+   void
+   clear();
+
+   /*!
+    * @brief Check whether the tree has been initialized.
+    *
+    * Uninitialized trees can be initialized using generateTree().
+    */
+   bool
+   isInitialized() const;
+
+   //@{
+
+   //! @name Access to box data
+
+   /*!
+    * @brief Get the MappedBoxes in the tree.
+    *
+    * @param[out] mapped_boxes
+    */
+   void
+   getMappedBoxes(
+      std::vector<MappedBox>& mapped_boxes) const;
+
+   /*!
+    * @brief Return the bounding box of all the MappedBoxes in the
+    * tree.
+    */
+   const Box&
+   getBoundingBox() const;
+
+   /*!
+    * @brief Return the dimension of the boxes in the tree.
+    */
+   const tbox::Dimension&
+   getDim() const;
+
+   //@}
+
+
+   //@{
+
+   //! @name Overlap checks
+
+   /*!
+    * @brief Whether the given box has an overlap with MappedBoxes in the
+    * tree.
+    *
+    * @param[in] box The box is assumed to be in same index space as
+    * those in the tree.
+    */
+   bool
+   hasOverlap(
+      const Box& box) const;
+
+   /*!
+    * @brief Find all boxes that overlap the given \b box.
+    *
+    * To avoid unneeded work, the output @b overlap_mapped_boxes container
+    * is not emptied.  Overlapping MappedBoxes are simply added.
+    *
+    * Output is sorted.
+    *
+    * @param[out] overlap_mapped_boxes MappedBoxes that overlap with box.
+    *
+    * @param[in] box the specified box whose overlaps are requested.
+    * The box is assumed to be in same index space as those in the
+    * tree.
+    */
+   void
+   findOverlapMappedBoxes(
+      MappedBoxSet& overlap_mapped_boxes,
+      const Box& box) const;
+
+   /*!
+    * @brief Find all boxes that overlap the given \b box.
+    *
+    * To avoid unneeded work, the output @b overlap_mapped_boxes container
+    * is not emptied.  Overlapping MappedBoxes are simply added.
+    *
+    * Output is unsorted.
+    *
+    * @param[out] overlap_mapped_boxes MappedBoxes that overlap with box.
+    *
+    * @param[in] box the specified box whose overlaps are requested.
+    * The box is assumed to be in same index space as those in the
+    * tree.
+    */
+   void
+   findOverlapMappedBoxes(
+      std::vector<MappedBox>& overlap_mapped_boxes,
+      const Box& box) const;
+
+   //@}
+
+   /*!
+    * @brief Create a similar tree with the boxes refined by a given
+    * ratio.
+    *
+    * @param[in] ratio The boxes are refined by this ratio.
+    *
+    * Note that there is no coresponding version to create a coarsened
+    * tree.  Coarsened trees cannot be trivially generated like
+    * refined trees can.  To create a coarsened tree, you must
+    * manually get the boxes, coarsen them and use them to build a new
+    * tree.
+    */
+   tbox::Pointer<MappedBoxTree>
+   createRefinedTree(
+      const IntVector& ratio) const;
+
+   /*!
+    * @brief Assignment operator.
+    *
+    * @param[in] r
+    */
+   MappedBoxTree&
+   operator = (
+      const MappedBoxTree& r);
+
+   /*!
+    * @brief Print statistics on number of constructor calls, tree
+    * builds, tree searches, etc.
+    *
+    * This method is for developers to analyze performance.
+    */
+   static void
+   printStatistics(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Reset statistics on number of constructor calls, tree
+    * builds, tree searches, etc.
+    *
+    * This method is for developers to analyze performance.
+    */
+   static void
+   resetStatistics(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief To satisfy requirements of STL vectors, the vector is
+    * allowed to use this constructor.
+    */
+   friend class std::vector<MappedBoxTree>;
+
+private:
+
+   /*!
+    * @brief Default constructor is private to disallow user access.
+    * Objects are normally constructed with at least a dimension.
+    */
+   MappedBoxTree();
+
+   /*!
+    * @brief Private recursive function for generating the search tree.
+    *
+    * mapped_boxes is changed in the process (for efficiency reasons).
+    * Its output state is undefined.
+    *
+    * The object is not cleared in this method.  If the object has
+    * been initialized, it should be cleared before calling this
+    * method.  @see clear().
+    *
+    * @param[in] mapped_boxes
+    *
+    * @param min_number.  @b Default: 10
+    */
+   void
+   privateGenerateTree(
+      std::vector<MappedBox>& mapped_boxes,
+      size_t min_number = 10);
+
+   /*!
+    * @brief Check whether given box has any ovarlap with the tree.
+    *
+    * @param[in] box
+    */
+   bool
+   privateHasOverlap(
+      const Box& box) const;
+
+   /*!
+    * @brief Find all boxes that overlap the given \b box.
+    *
+    * Output is sorted.
+    *
+    * @param[out] overlap_boxes Output, mapped_boxes that overlap with box.
+    *
+    * @param[in] box the specified box whose overlaps are requested.
+    */
+   void
+   privateFindOverlapMappedBoxes(
+      MappedBoxSet& overlap_mapped_boxes,
+      const Box& box) const;
+
+   /*!
+    * @brief Find all boxes that overlap the given \b box.
+    *
+    * Output is unsorted.
+    *
+    * @param[out] overlap_boxes Output, mapped_boxes that overlap with box.
+    *
+    * @param[in] box the specified box whose overlaps are requested.
+    */
+   void
+   privateFindOverlapMappedBoxes(
+      std::vector<MappedBox>& overlap_mapped_boxes,
+      const Box& box) const;
+
+
+   /*!
+    * @brief Set up static class members.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   initializeCallback();
+
+   /*!
+    * @brief Free static timers.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   finalizeCallback();
+
+   /*!
+    * @brief Dimension corresponds to the dimension of boxes in the
+    * tree.
+    */
+   const tbox::Dimension d_dim;
+
+   /*!
+    * @brief Bounding box of all the MappedBoxes in this tree.
+    */
+   Box d_bounding_box;
+
+   /*!
+    * Pointers to familial mapped_boxes.
+    */
+   tbox::Pointer<MappedBoxTree> d_left_child;
+   tbox::Pointer<MappedBoxTree> d_right_child;
+
+   /*!
+    * @brief MappedBoxes that are contained within the physical domain
+    * that this tree represents.
+    */
+   std::vector<MappedBox> d_mapped_boxes;
+
+   /*!
+    * @brief Dimension along which the input box triples are
+    * partitioned.
+    */
+   int d_partition_dim;
+
+   /*!
+    * @brief A tree for MappedBoxes that are not given to the left or
+    * right children.
+    */
+   tbox::Pointer<MappedBoxTree> d_tree;
+
+   /*
+    * Timers are static to keep the objects light-weight.
+    */
+   static tbox::Pointer<tbox::Timer> t_build_tree[tbox::Dimension::
+                                                  MAXIMUM_DIMENSION_VALUE];
+   static tbox::Pointer<tbox::Timer> t_search[tbox::Dimension::
+                                              MAXIMUM_DIMENSION_VALUE];
+
+   static unsigned int s_num_build[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   static unsigned int s_num_generate[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   static unsigned int s_num_duplicate[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   static unsigned int s_num_search[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   static unsigned int s_num_sorted_box[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   static unsigned int s_num_found_box[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   static unsigned int s_max_sorted_box[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   static unsigned int s_max_found_box[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   static unsigned int s_max_lin_search[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   static tbox::StartupShutdownManager::Handler
+   s_initialize_finalize_handler;
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MappingConnectorAlgorithm.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MappingConnectorAlgorithm.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,2047 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Algorithms for working with mapping Connectors. 
+ *
+ ************************************************************************/
+#ifndef included_hier_MappingConnectorAlgorithm_C
+#define included_hier_MappingConnectorAlgorithm_C
+
+#include "SAMRAI/hier/MappingConnectorAlgorithm.h"
+#include "SAMRAI/hier/MappedBoxContainerUtils.h"
+#include "SAMRAI/hier/OverlapConnectorAlgorithm.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/hier/RealMappedBoxConstIterator.h"
+#include "SAMRAI/tbox/AsyncCommStage.h"
+#include "SAMRAI/tbox/AsyncCommPeer.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/TimerManager.h"
+
+#include <algorithm>
+
+namespace SAMRAI {
+namespace hier {
+
+char MappingConnectorAlgorithm::s_print_modify_steps = '\0';
+
+tbox::Pointer<tbox::Timer> MappingConnectorAlgorithm::t_modify;
+
+tbox::Pointer<tbox::Timer> MappingConnectorAlgorithm::t_modify_remove_neighbors;
+
+tbox::Pointer<tbox::Timer> MappingConnectorAlgorithm::t_modify_discover;
+
+tbox::Pointer<tbox::Timer> MappingConnectorAlgorithm::t_modify_share;
+
+tbox::Pointer<tbox::Timer> MappingConnectorAlgorithm::t_modify_comm_init;
+
+tbox::Pointer<tbox::Timer> MappingConnectorAlgorithm::t_modify_unpack;
+
+tbox::Pointer<tbox::Timer> MappingConnectorAlgorithm::t_modify_MPI_wait;
+
+const std::string MappingConnectorAlgorithm::s_dbgbord;
+
+int MappingConnectorAlgorithm::s_operation_mpi_tag = 0;
+/*
+ * Do we even need to use different tags each time we modify???
+ * Unique tags were used to help debug, but the methods may work
+ * with reused tags anyway.
+ */
+
+tbox::SAMRAI_MPI MappingConnectorAlgorithm::s_class_mpi(tbox::SAMRAI_MPI::commNull);
+
+tbox::StartupShutdownManager::Handler
+MappingConnectorAlgorithm::s_initialize_finalize_handler(
+   MappingConnectorAlgorithm::initializeCallback,
+   0,
+   0,
+   MappingConnectorAlgorithm::finalizeCallback,
+   tbox::StartupShutdownManager::priorityTimers);
+
+#define MappingConnectorAlgorithm_FirstDataLength 1000
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+MappingConnectorAlgorithm::MappingConnectorAlgorithm():
+   d_sanity_check_inputs(false),
+   d_sanity_check_outputs(false),
+   d_shortcut_trivial_maps(true)
+{
+   /*
+    * While we figure out how to use multiple communicators in SAMRAI,
+    * we are still assuming that all communications use congruent
+    * communicators.  This class just makes a duplicate communicator
+    * to protect itself from unrelated communications in shared
+    * communicators.
+    */
+   if (s_class_mpi.getCommunicator() == tbox::SAMRAI_MPI::commNull) {
+      if (tbox::SAMRAI_MPI::usingMPI()) {
+         const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+         s_class_mpi.dupCommunicator(mpi);
+      }
+   }
+
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+MappingConnectorAlgorithm::~MappingConnectorAlgorithm()
+{
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void MappingConnectorAlgorithm::setSanityCheckMethodPreconditions(
+   bool do_check)
+{
+   d_sanity_check_inputs = do_check;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void MappingConnectorAlgorithm::setSanityCheckMethodPostconditions(
+   bool do_check)
+{
+   d_sanity_check_outputs = do_check;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void MappingConnectorAlgorithm::shortcutTrivialMapsInModify(
+   bool do_shortcut)
+{
+   d_shortcut_trivial_maps = do_shortcut;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void MappingConnectorAlgorithm::modify(
+   Connector& anchor_to_mapped,
+   Connector& mapped_to_anchor,
+   const Connector& old_to_new,
+   const Connector& new_to_old,
+   MappedBoxLevel* mutable_new,
+   MappedBoxLevel* mutable_old) const
+{
+
+   /*
+    * Ensure that Connectors incident to and from old agree on
+    * what the old mapped_box_level is.
+    */
+   const Connector& anchor_to_old = anchor_to_mapped;
+   const Connector& old_to_anchor = mapped_to_anchor;
+
+   const MappedBoxLevel* old = &old_to_new.getBase();
+
+   if (old != &new_to_old.getHead() ||
+       old != &anchor_to_mapped.getHead() ||
+       old != &mapped_to_anchor.getBase()) {
+      TBOX_ERROR("Bad input for MappingConnectorAlgorithm::modify:\n"
+         << "Given Connectors to base and head of modify are not incident\n"
+         << "from the same old in MappingConnectorAlgorithm::modify:\n"
+         << "anchor_to_old is  TO  " << &anchor_to_old.getHead() << "\n"
+         << "old_to_new is FROM " << &old_to_new.getBase()
+         << "\n"
+         << "new_to_old is  TO  " << &new_to_old.getHead()
+         << "\n"
+         << "old_to_anchor is FROM " << &old_to_anchor.getBase() << "\n"
+         );
+   }
+   /*
+    * Ensure that head and base mapped_box_levels in argument agree with
+    * head and base in the object.
+    */
+   if (&anchor_to_old.getBase() != &old_to_anchor.getHead()) {
+      TBOX_ERROR("Bad input for MappingConnectorAlgorithm::modify:\n"
+         << "Given Connectors to and from base of modify do not refer\n"
+         << "to the base of the modify in:\n"
+         << "anchor_to_old is FROM " << &anchor_to_old.getBase() << "\n"
+         << "old_to_anchor is  TO  " << &old_to_anchor.getHead() << "\n"
+         );
+   }
+   if (&old_to_new.getHead() != &new_to_old.getBase()) {
+      TBOX_ERROR("Bad input for MappingConnectorAlgorithm::modify:\n"
+         << "Given Connectors to and from head of modify do not refer\n"
+         << "to the head of the modify in MappingConnectorAlgorithm::modify:\n"
+         << "new_to_old is FROM " << &new_to_old.getBase()
+         << "\n"
+         << "old_to_new is  TO  " << &old_to_new.getHead()
+         << "\n"
+         );
+   }
+   if (!anchor_to_old.isTransposeOf(old_to_anchor)) {
+      TBOX_ERROR("Bad input for MappingConnectorAlgorithm::modify:\n"
+         << "Given Connectors between base and old of modify\n"
+         << "are not transposes of each other.\n"
+         << "See MappingConnectorAlgorithm::isTransposeOf().\n"
+         );
+   }
+   if (!new_to_old.isTransposeOf(old_to_new)) {
+      TBOX_ERROR("Bad input for MappingConnectorAlgorithm::modify:\n"
+         << "Given Connectors between head and old of modify\n"
+         << "are not transposes of each other.\n"
+         << "See MappingConnectorAlgorithm::isTransposeOf().\n"
+         );
+   }
+   if (anchor_to_old.getParallelState() != MappedBoxLevel::DISTRIBUTED) {
+      TBOX_ERROR("Bad input for MappingConnectorAlgorithm::modify:\n"
+         << "bridging is currently set up for DISTRIBUTED\n"
+         << "mode only.\n");
+   }
+
+   if (s_print_modify_steps == 'y') {
+      tbox::plog
+         << "MappingConnectorAlgorithm::modify: old mapped_box_level:\n"
+         << old_to_new.getBase().format(s_dbgbord, 2)
+         << "MappingConnectorAlgorithm::modify: new mapped_box_level:\n"
+         << new_to_old.getBase().format(s_dbgbord, 2)
+         << "MappingConnectorAlgorithm::modify: old_to_new:\n"
+         << old_to_new.format(s_dbgbord, 2)
+         << "MappingConnectorAlgorithm::modify: new_to_old:\n"
+         << new_to_old.format(s_dbgbord, 2);
+   }
+
+   if (0) {
+      // Expensive input checking.
+      const MappedBoxLevel& anchor_mapped_box_level = anchor_to_old.getBase();
+      const MappedBoxLevel& old_mapped_box_level = old_to_new.getBase();
+
+      tbox::plog
+         << "anchor mapped_box_level:\n" << anchor_mapped_box_level.format(s_dbgbord, 2)
+         << "anchor_to_old:\n" << anchor_to_old.format(s_dbgbord, 2)
+         << "old mapped_box_level:\n" << old_mapped_box_level.format(s_dbgbord, 2)
+         << "old_to_new:\n" << old_to_new.format(s_dbgbord, 2)
+         << "new_to_old:\n" << new_to_old.format(s_dbgbord, 2);
+
+      hier::OverlapConnectorAlgorithm oca;
+      TBOX_ASSERT(oca.checkOverlapCorrectness(anchor_to_old) == 0);
+      TBOX_ASSERT(oca.checkOverlapCorrectness(old_to_anchor) == 0);
+      TBOX_ASSERT(old_to_anchor.checkTransposeCorrectness(anchor_to_old,
+            true) == 0);
+      TBOX_ASSERT(oca.checkOverlapCorrectness(old_to_new, true, false) == 0);
+      TBOX_ASSERT(oca.checkOverlapCorrectness(new_to_old, true, false) == 0);
+      TBOX_ASSERT(old_to_new.checkTransposeCorrectness(new_to_old,
+            true) == 0);
+   }
+
+   privateModify(anchor_to_mapped,
+      mapped_to_anchor,
+      old_to_new,
+      new_to_old,
+      mutable_new,
+      mutable_old);
+
+   if (d_sanity_check_outputs) {
+      anchor_to_mapped.assertTransposeCorrectness(mapped_to_anchor);
+      mapped_to_anchor.assertTransposeCorrectness(anchor_to_mapped);
+   }
+}
+
+/*
+ *****************************************************************************
+ * Version of modify requiring only the forward map
+ * and allows only local mappings.
+ *
+ * This version modifies two transpose Connectors.
+ *****************************************************************************
+ */
+
+void MappingConnectorAlgorithm::modify(
+   Connector& anchor_to_mapped,
+   Connector& mapped_to_anchor,
+   const Connector& old_to_new,
+   MappedBoxLevel* mutable_new,
+   MappedBoxLevel* mutable_old) const
+{
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   /*
+    * Ensure that mapping has only local neighbors.
+    */
+   const NeighborhoodSet& old_eto_new = old_to_new.getNeighborhoodSets();
+   for (NeighborhoodSet::const_iterator ci = old_eto_new.begin();
+        ci != old_eto_new.end(); ++ci) {
+      const NeighborSet& new_nabrs = (*ci).second;
+      for (NeighborSet::const_iterator na = new_nabrs.begin();
+           na != new_nabrs.end(); ++na) {
+         if ((*na).getOwnerRank() != old_to_new.getRank()) {
+            const MappedBox& mapped_box(
+               *old_to_new.getBase().getMappedBoxes().
+               find(MappedBox(
+                     na->getDim(), (*ci).first, old_to_new.getRank())));
+            TBOX_ERROR("MappingConnectorAlgorithm::modify: this version of modify\n"
+               "only allows local mappings.  The local mapped_box\n"
+               << mapped_box << " has a non-local map to\n"
+               << *na << "\n"
+               << "To modify using non-local maps, the\n"
+               << "reverse mapping must be provide and\n"
+               << "the four-argument version of modify\n"
+               << "must be used.");
+         }
+      }
+   }
+#endif
+
+   const Connector& anchor_to_old = anchor_to_mapped;
+   const Connector& old_to_anchor = mapped_to_anchor;
+
+   const MappedBoxLevel* old = &old_to_new.getBase();
+
+   /*
+    * Ensure that Connectors incident to and from old agree on
+    * what the old mapped_box_level is.
+    */
+
+   if (old != &old_to_new.getBase() ||
+       old != &anchor_to_old.getHead()) {
+      TBOX_ERROR("Bad input for MappingConnectorAlgorithm::modify:\n"
+         << "Given Connectors to base and head of modify are not incident\n"
+         << "from the same old in MappingConnectorAlgorithm::modify:\n"
+         << "anchor_to_old is  TO   " << &anchor_to_old.getHead() << "\n"
+         << "old_to_anchor is FROM  " << &old_to_anchor.getBase() << "\n"
+         << "old_to_new is FROM " << &old_to_new.getBase()
+         << "\n"
+         );
+   }
+   /*
+    * Ensure that head and base mapped_box_levels in argument agree with
+    * head and base in the object.
+    */
+   if (&anchor_to_old.getBase() != &old_to_anchor.getHead()) {
+      TBOX_ERROR("Bad input for MappingConnectorAlgorithm::modify:\n"
+         << "Given Connectors to and from base of modify do not refer\n"
+         << "to the base of the modify in MappingConnectorAlgorithm::modify:\n"
+         << "anchor_to_old is FROM " << &anchor_to_old.getBase() << "\n"
+         << "old_to_anchor is  TO  " << &old_to_anchor.getHead() << "\n"
+         );
+   }
+   if (!anchor_to_old.isTransposeOf(old_to_anchor)) {
+      TBOX_ERROR("Bad input for MappingConnectorAlgorithm::modify:\n"
+         << "Given Connectors between base and old of modify\n"
+         << "are not transposes of each other.\n"
+         << "See MappingConnectorAlgorithm::isTransposeOf().\n"
+         );
+   }
+   if (anchor_to_old.getParallelState() != MappedBoxLevel::DISTRIBUTED) {
+      TBOX_ERROR("Bad input for MappingConnectorAlgorithm::modify:\n"
+         << "modifying is currently set up for DISTRIBUTED\n"
+         << "mode only.\n");
+   }
+
+   if (s_print_modify_steps == 'y') {
+      const MappedBoxLevel& anchor_mapped_box_level = anchor_to_mapped.getBase();
+      const MappedBoxLevel& old_mapped_box_level = old_to_new.getBase();
+
+      tbox::plog
+         << "MappingConnectorAlgorithm::modify: anchor mapped_box_level:\n"
+         << anchor_mapped_box_level.format(s_dbgbord, 2)
+         << "MappingConnectorAlgorithm::modify: anchor_to_old:\n"
+         << anchor_to_old.format(s_dbgbord, 2)
+         << "MappingConnectorAlgorithm::modify: old mapped_box_level:\n"
+         << old_mapped_box_level.format(s_dbgbord, 2)
+         << "MappingConnectorAlgorithm::modify: old_to_new:\n"
+         << old_to_new.format(s_dbgbord, 2)
+         << "MappingConnectorAlgorithm::modify: No new_to_old.\n";
+   }
+
+   Connector dummy_new_to_old;
+   privateModify(anchor_to_mapped,
+      mapped_to_anchor,
+      old_to_new,
+      dummy_new_to_old,
+      mutable_new,
+      mutable_old);
+}
+
+/*
+ *****************************************************************************
+ * Version of modify requiring only the forward map
+ * and allows only local mappings.
+ *
+ * This version modifies just one Connector.
+ *****************************************************************************
+ */
+
+void MappingConnectorAlgorithm::modify(
+   Connector& anchor_to_mapped,
+   const Connector& old_to_new,
+   MappedBoxLevel* mutable_new,
+   MappedBoxLevel* mutable_old) const
+{
+   /*
+    * Ensure that connectors incident to and from old agree on
+    * what the old mapped_box_level is.
+    */
+   if (&anchor_to_mapped.getHead() != &old_to_new.getBase()) {
+      TBOX_ERROR(
+         "Bad input for MappingConnectorAlgorithm::modify:\n"
+         <<
+         "Input MappingConnectorAlgorithm do not agree on what the old mapped_box_level is.\n"
+         << "anchor_to_mapped is  TO  " << &anchor_to_mapped.getHead() << "\n"
+         << "old_to_new is FROM " << &old_to_new.getBase()
+         << "\n"
+         );
+   }
+
+   if (anchor_to_mapped.getParallelState() != MappedBoxLevel::DISTRIBUTED) {
+      TBOX_ERROR("Bad input for MappingConnectorAlgorithm::modify:\n"
+         << "modifying is currently set up for DISTRIBUTED\n"
+         << "mode only.\n");
+   }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   /*
+    * Ensure that mapping has only local neighbors.
+    */
+   const NeighborhoodSet& old_eto_new = old_to_new.getNeighborhoodSets();
+   for (NeighborhoodSet::const_iterator ci = old_eto_new.begin();
+        ci != old_eto_new.end(); ++ci) {
+      const NeighborSet& new_nabrs = (*ci).second;
+      for (NeighborSet::const_iterator na = new_nabrs.begin();
+           na != new_nabrs.end(); ++na) {
+         if ((*na).getOwnerRank() != old_to_new.getRank()) {
+            const MappedBox& mapped_box(
+               *old_to_new.getBase().getMappedBoxes().
+               find(MappedBox(
+                     na->getDim(), (*ci).first, old_to_new.getRank())));
+            TBOX_ERROR("MappingConnectorAlgorithm::modify: this version of modify\n"
+               "only allows local mappings.  The local mapped_box\n"
+               << mapped_box << " has a non-local map to\n"
+               << *na << "\n"
+               << "To modify using non-local maps, the\n"
+               << "reverse mapping must be provide and\n"
+               << "the four-argument version of modify\n"
+               << "must be used.");
+         }
+      }
+   }
+#endif
+
+   /*
+    * Generate temporary mapped_to_anchor needed by the modify
+    * operation.  This step is the reason anchor_to_mapped
+    * may not have non-local neighbors.
+    *
+    * No need to check that anchor_to_mapped is strictly local,
+    * because initializeToLocalTranspose checks that.
+    */
+   Connector mapped_to_anchor;
+   mapped_to_anchor.initializeToLocalTranspose(anchor_to_mapped);
+
+   if (s_print_modify_steps == 'y') {
+      const MappedBoxLevel& anchor_mapped_box_level = anchor_to_mapped.getBase();
+      const MappedBoxLevel& old_mapped_box_level = old_to_new.getBase();
+      const MappedBoxLevel& new_mapped_box_level =
+         old_to_new.getHead();
+
+      tbox::plog
+         << "MappingConnectorAlgorithm::modify: anchor mapped_box_level:\n"
+         << anchor_mapped_box_level.format(s_dbgbord, 2)
+         << "MappingConnectorAlgorithm::modify: anchor_to_old:\n"
+         << anchor_to_mapped.format(s_dbgbord, 2)
+         << "MappingConnectorAlgorithm::modify: old mapped_box_level:\n"
+         << old_mapped_box_level.format(s_dbgbord, 2)
+         << "MappingConnectorAlgorithm::modify: old_to_new:\n"
+         << old_to_new.format(s_dbgbord, 2)
+         << "MappingConnectorAlgorithm::modify: new mapped_box_level:\n"
+         << new_mapped_box_level.format(s_dbgbord, 2);
+   }
+
+   Connector dummy_new_to_old;
+   privateModify(anchor_to_mapped,
+      mapped_to_anchor,
+      old_to_new,
+      dummy_new_to_old,
+      mutable_new,
+      mutable_old);
+}
+
+/*
+ ***********************************************************************
+ * This method modifies overlap Connectors based on the described
+ * changes to their base or head MappedBoxLevels.  The change is
+ * described as a mapping from the old state to the new.
+ *
+ * Essential nomenclature:
+ * - mapped: The MappedBoxLevel that is being changed.
+ * - anchor: A MappedBoxLevel that is NOT being changed.
+ *   This method modifies the overlap Connectors between anchor
+ *   and mapped.
+ * - old: The state of mapped before the change.
+ * - new: the state of mapped after the change.
+ * - old_to_new: Desription of the change.  The NeighborSet of
+ *   an old MappedBox is what the old MappedBox will become.
+ *   By convention, the NeighborSet of a un-changing MappedBox
+ *   is not required.  However, an empty NeighborSet means that
+ *   the old MappedBox will disappear.
+ *
+ * While modify adjusts the Connector to reflect changes in the mapped
+ * MappedBoxLevel, it does NOT manipulate any MappedBoxLevel objects
+ * (other than initializing one with another; see in-place changes).
+ *
+ * The Connector width of the mapping must be at least equal to the
+ * ammount that new boxes protrude from their old boxes.  The protusion
+ * may generate undetected overlaps between anchor and mapped.  To
+ * avoid generating undetected overlaps, the width of anchor<==>mapped
+ * are shrunken by the width of the mapping.
+ *
+ * At this time, new_to_old is only used to determine the remote
+ * owners that must be notified of a local mapped_box being mapped.
+ * The Connector object contains more info than required, so it can be
+ * replaced by something more concise.  However, requiring a transpose
+ * Connector lets us use some canned sanity checks.  The use of the
+ * transpose Connector is fairly efficient.
+ ***********************************************************************
+ */
+
+void MappingConnectorAlgorithm::privateModify(
+   Connector& anchor_to_mapped,
+   Connector& mapped_to_anchor,
+   const Connector& old_to_new,
+   const Connector& new_to_old,
+   MappedBoxLevel* mutable_new,
+   MappedBoxLevel* mutable_old) const
+{
+   t_modify->start();
+
+   if (s_print_modify_steps == 'y') {
+      tbox::plog
+         << "MappingConnectorAlgorithm::privateModify: anchor_to_old:\n"
+         << anchor_to_mapped.format(s_dbgbord, 3)
+         << "MappingConnectorAlgorithm::privateModify: mapped_to_anchor:\n"
+         << mapped_to_anchor.format(s_dbgbord, 3)
+         << "MappingConnectorAlgorithm::privateModify: old_to_new:\n"
+         << old_to_new.format(s_dbgbord, 3)
+         << "MappingConnectorAlgorithm::privateModify: new_to_old:\n"
+         << old_to_new.format(s_dbgbord, 3);
+   }
+
+   checkModifyParameters(
+      anchor_to_mapped,
+      mapped_to_anchor,
+      old_to_new,
+      new_to_old);
+
+   /*
+    * anchor<==>mapped start out as Connectors between
+    * old and anchor.  Make copies of Connectors to and from old
+    * so we can modify anchor_to_mapped/mapped_to_anchor without
+    * losing needed data.
+    */
+   const Connector anchor_to_old = anchor_to_mapped;
+   const Connector old_to_anchor = mapped_to_anchor;
+
+   /*
+    * We will modify the mapped MappedBoxLevel to make it the new
+    * MappedBoxLevel.  "mapped" is the name for the changing
+    * MappedBoxLevel.  Because this MappedBoxLevel will be
+    * modified for output, it is synonymous with "new".
+    */
+   Connector& anchor_to_new = anchor_to_mapped;
+   Connector& new_to_anchor = mapped_to_anchor;
+
+   /*
+    * Shorthand for the three MappedBoxLevels and their Refinement
+    * ratios.
+    */
+   const MappedBoxLevel& old = old_to_anchor.getBase();
+   const MappedBoxLevel& new_mapped_box_level = old_to_new.getHead();
+   const MappedBoxLevel& anchor = anchor_to_new.getBase();
+   const IntVector& old_ratio = old.getRefinementRatio();
+   const IntVector& anchor_ratio = anchor.getRefinementRatio();
+   const IntVector& new_ratio = new_mapped_box_level.getRefinementRatio();
+
+   const tbox::Dimension dim(old.getDim());
+
+   /*
+    * The width of old-->new indicates the maximum amount of box
+    * growth caused by the change.  A value of zero means no growth.
+    *
+    * Growing old MappedBoxes may generate new overlaps that we cannot
+    * detect because they lie outside the current anchor<==>mapped
+    * widths.  To reflect that we do not see any farther just because
+    * the MappedBoxes have grown, we shrink the widths by (nominally)
+    * the amount of growth.  To ensure the shrinkage is consistent
+    * between transpose pairs of Connectors, it is converted to the
+    * coarser index space then converted into the final index space.
+    * Calls to Connector::convertHeadWidthToBase() perform the
+    * conversions.
+    */
+   const IntVector shrinkage_in_new_index_space =
+      Connector::convertHeadWidthToBase(
+         old_ratio,
+         new_ratio,
+         old_to_new.getConnectorWidth());
+   const IntVector shrinkage_in_anchor_index_space =
+      Connector::convertHeadWidthToBase(
+         anchor_ratio,
+         new_ratio,
+         shrinkage_in_new_index_space);
+   const IntVector anchor_to_new_width =
+      anchor_to_old.getConnectorWidth() - shrinkage_in_anchor_index_space;
+   if (!(anchor_to_new_width >= hier::IntVector::getZero(dim))) {
+      TBOX_ERROR(
+         "MappingConnectorAlgorithm::privateModify error:\n"
+         << "Mapping connector allows mapped MappedBoxLevel to grow\n"
+         << "too much.  The growth may generate new overlaps\n"
+         << "that cannot be detected by mapping algorithm, thus\n"
+         << "causing output overlap Connectors to be incomplete.\n"
+         << "Mapping Connector:\n" << old_to_new.format("", 0)
+         << "anchor--->mapped:\n" << anchor_to_new.format("", 0)
+         << "Connector width of anchor--->mapped will shrink\n"
+         << "by " << shrinkage_in_anchor_index_space << " which\n"
+         << "will result in a non-positive width.");
+   }
+   const IntVector new_to_anchor_width =
+      Connector::convertHeadWidthToBase(
+         new_mapped_box_level.getRefinementRatio(),
+         anchor.getRefinementRatio(),
+         anchor_to_new_width);
+
+   if (d_shortcut_trivial_maps &&
+       old_to_new.getGlobalNumberOfNeighborSets() == 0) {
+      /*
+       * Shortcut for trivial mapping.
+       *
+       * Initialize the output Connectors to connect to the new
+       * MappedBoxLevel.  Shrink the ghost widths to those computed
+       * above (if needed).
+       */
+
+      if (d_sanity_check_inputs) {
+         TBOX_ASSERT(old_to_new.getBase() == old_to_new.getHead());
+      }
+
+      anchor_to_new.initialize(
+         anchor_to_new.getBase(),
+         old_to_new.getHead(),
+         anchor_to_new.getConnectorWidth(),
+         anchor_to_new.getNeighborhoodSets(),
+         MappedBoxLevel::DISTRIBUTED);
+      new_to_anchor.initialize(
+         old_to_new.getHead(),
+         anchor_to_new.getBase(),
+         new_to_anchor.getConnectorWidth(),
+         new_to_anchor.getNeighborhoodSets(),
+         MappedBoxLevel::DISTRIBUTED);
+
+      hier::OverlapConnectorAlgorithm oca;
+      if (anchor_to_new_width != anchor_to_new.getConnectorWidth()) {
+         oca.shrinkConnectorWidth(anchor_to_new, anchor_to_new_width);
+      }
+      if (new_to_anchor_width != new_to_anchor.getConnectorWidth()) {
+         oca.shrinkConnectorWidth(new_to_anchor, new_to_anchor_width);
+      }
+   } else {
+
+      /*
+       * The essential modify algorithm is in this block.
+       */
+
+      /*
+       * Initialize the output connectors with the correct new
+       * MappedBoxLevel.  (As inputs, they were referencing the old
+       * MappedBoxLevel.)  At the same time, swap out the neighbor data
+       * (into new_eto_anchor and anchor_eto_new) for direct
+       * modification.  We'll swap these back in after the mods.
+       */
+      NeighborhoodSet new_eto_anchor;
+      NeighborhoodSet anchor_eto_new;
+      anchor_to_new.swapInitialize(
+         anchor_to_old.getBase(),
+         old_to_new.getHead(),
+         anchor_to_new_width,
+         anchor_eto_new,
+         MappedBoxLevel::DISTRIBUTED);
+      new_to_anchor.swapInitialize(
+         anchor_to_new.getHead(),
+         anchor_to_old.getBase(),
+         new_to_anchor_width,
+         new_eto_anchor,
+         MappedBoxLevel::DISTRIBUTED);
+
+      const int rank = new_to_anchor.getRank();
+      const int nproc = new_to_anchor.getNproc();
+
+      /*
+       * Determine which ranks we have to communicate with.  They are
+       * the ones who owns MappedBoxes that the local MappedBoxes will
+       * be mapped to.
+       */
+      std::set<int> incoming_ranks, outgoing_ranks;
+      hier::MappedBoxContainerUtils::getOwnersFromNeighborhoodSet(incoming_ranks, old_to_new.getNeighborhoodSets());
+      hier::MappedBoxContainerUtils::getOwnersFromNeighborhoodSet(incoming_ranks, old_to_anchor.getNeighborhoodSets());
+
+      hier::MappedBoxContainerUtils::getOwnersFromNeighborhoodSet(outgoing_ranks, anchor_to_old.getNeighborhoodSets());
+      if (new_to_old.isInitialized())
+         hier::MappedBoxContainerUtils::getOwnersFromNeighborhoodSet(outgoing_ranks, new_to_old.getNeighborhoodSets());
+
+      // We don't need to communicate locally.
+      incoming_ranks.erase(rank);
+      outgoing_ranks.erase(rank);
+
+      /*
+       * Object for communicating relationship changes.
+       */
+      tbox::AsyncCommStage comm_stage;
+      tbox::AsyncCommPeer<int> * all_comms(NULL);
+      tbox::AsyncCommStage::MemberVec completed;
+
+      t_modify_share->start();
+      t_modify_comm_init->start();
+      /*
+       * Set up communication mechanism (and post receives).
+       */
+      privateModify_setupCommunication(
+         all_comms,
+         comm_stage,
+         completed,
+         anchor.getMPI(),
+         incoming_ranks,
+         outgoing_ranks);
+      t_modify_comm_init->stop();
+      t_modify_share->stop();
+
+      /*
+       * There are three major parts to computing the new neighbors:
+       * (1) remove relationships for MappedBoxes being mapped into
+       * something else, (2) discover new relationships for the new
+       * MappedBoxes and (3) share information with other processes.
+       *
+       * In steps 1 and 2, the owners of the MappedBoxes being
+       * modified determine which relationships to remove and which to
+       * add.  Some of this information is kept locally while the rest
+       * are to be sent to the owners of the affected anchor and new
+       * MappedBoxes.
+       *
+       * The three parts are done in the 3 steps following.  Note that
+       * these steps do not correspond to the parts.
+       */
+
+      /*
+       * Data for caching relationship removal messages.  This
+       * temporary object holds data computed when removing neighbors,
+       * to be used when sending out the relationship removal
+       * information.
+       */
+      std::map<int, std::vector<int> > neighbor_removal_mesg;
+
+      /*
+       * First step: Remove neighbor data for MappedBoxes that are
+       * going away and cache information to be sent out.
+       */
+      t_modify_remove_neighbors->start();
+      privateModify_removeAndCache(
+         neighbor_removal_mesg,
+         anchor_eto_new,
+         new_eto_anchor,
+         old_to_new,
+         dim,
+         rank);
+      t_modify_remove_neighbors->stop();
+
+      /*
+       * Second step: Discover overlaps for new MappedBoxes.  Send
+       * messages with information about what relationships to remove
+       * or create.
+       */
+      t_modify_discover->start();
+      privateModify_discoverAndSend(
+         neighbor_removal_mesg,
+         anchor_to_new,
+         new_to_anchor,
+         anchor_eto_new,
+         new_eto_anchor,
+         incoming_ranks,
+         outgoing_ranks,
+         all_comms,
+         completed,
+         old_to_anchor,
+         anchor_to_old,
+         old_to_new,
+         dim,
+         rank,
+         nproc);
+      t_modify_discover->stop();
+
+      /*
+       * Third step: Receive and unpack messages from incoming_ranks.
+       * These message contain information about what relationships to
+       * remove or add.
+       */
+      t_modify_share->start();
+      privateModify_receiveAndUnpack(
+         anchor_eto_new,
+         new_eto_anchor,
+         outgoing_ranks,
+         all_comms,
+         comm_stage,
+         completed,
+         dim,
+         rank);
+      t_modify_share->stop();
+
+      delete[] all_comms;
+
+      TBOX_ASSERT(anchor_to_new.getNeighborhoodSets().empty());
+      TBOX_ASSERT(new_to_anchor.getNeighborhoodSets().empty());
+
+      /*
+       * We have finished manually changing the NeighborhoodSets
+       * anchor_eto_new and new_eto_anchor.  Swap them back into the
+       * Connectors.
+       */
+      anchor_to_new.swapInitialize(
+         anchor_to_new.getBase(),
+         anchor_to_new.getHead(),
+         anchor_to_new.getConnectorWidth(),
+         anchor_eto_new,
+         MappedBoxLevel::DISTRIBUTED);
+      new_to_anchor.swapInitialize(
+         new_to_anchor.getBase(),
+         new_to_anchor.getHead(),
+         new_to_anchor.getConnectorWidth(),
+         new_eto_anchor,
+         MappedBoxLevel::DISTRIBUTED);
+
+      TBOX_ASSERT(anchor_eto_new.empty());
+      TBOX_ASSERT(new_eto_anchor.empty());
+
+   }
+
+   /*
+    * Optional in-place changes:
+    *
+    * Note that the old and new MappedBoxLevels gotten from Connectors
+    * are const, so this method cannot modify them.  Only by specifying
+    * the mutable MappedBoxLevels, can this method modify them.
+    *
+    * If users provide mutable object to initialize to the new
+    * MappedBoxLevel, this method initializes it to the new
+    * MappedBoxLevel and uses it in the output Connectors.
+    */
+   if (mutable_new == &old_to_new.getBase() &&
+       mutable_old == &old_to_new.getHead()) {
+      /*
+       * Since mutable_new is old and mutable_old is new, shortcut
+       * two assignments by swapping.
+       */
+      MappedBoxLevel::swap(*mutable_new, *mutable_old);
+      new_to_anchor.initialize(
+         *mutable_new,
+         new_to_anchor.getHead(),
+         new_to_anchor.getConnectorWidth(),
+         new_to_anchor.getNeighborhoodSets(),
+         MappedBoxLevel::DISTRIBUTED);
+      anchor_to_new.initialize(
+         anchor_to_new.getBase(),
+         *mutable_new,
+         anchor_to_new.getConnectorWidth(),
+         anchor_to_new.getNeighborhoodSets(),
+         MappedBoxLevel::DISTRIBUTED);
+   } else {
+      if (mutable_new != NULL) {
+         *mutable_new = old_to_new.getHead();
+         new_to_anchor.initialize(
+            *mutable_new,
+            new_to_anchor.getHead(),
+            new_to_anchor.getConnectorWidth(),
+            new_to_anchor.getNeighborhoodSets(),
+            MappedBoxLevel::DISTRIBUTED);
+         anchor_to_new.initialize(
+            anchor_to_new.getBase(),
+            *mutable_new,
+            anchor_to_new.getConnectorWidth(),
+            anchor_to_new.getNeighborhoodSets(),
+            MappedBoxLevel::DISTRIBUTED);
+      }
+      if (mutable_old != NULL) {
+         *mutable_old = old_to_new.getBase();
+      }
+   }
+
+   t_modify->stop();
+}
+
+/*
+ ***********************************************************************
+ * Receive messages and unpack info sent from other processes.
+ ***********************************************************************
+ */
+void MappingConnectorAlgorithm::privateModify_setupCommunication(
+   tbox::AsyncCommPeer<int> *& all_comms,
+   tbox::AsyncCommStage& comm_stage,
+   tbox::AsyncCommStage::MemberVec& completed,
+   const tbox::SAMRAI_MPI &mpi,
+   const std::set<int>& incoming_ranks,
+   const std::set<int>& outgoing_ranks) const
+{
+   /*
+    * Set up communication mechanism (and post receives).  We lump all
+    * communication objects into one array, all_comms.  all_comms is
+    * ordered with the incoming first and the outgoing afterward.
+    */
+   comm_stage.setCommunicationWaitTimer(t_modify_MPI_wait);
+   const int n_comm = static_cast<int>(
+      outgoing_ranks.size() + incoming_ranks.size());
+   all_comms = new tbox::AsyncCommPeer<int>[n_comm];
+
+   completed.clear();
+
+   const int tag0 = ++s_operation_mpi_tag;
+   const int tag1 = ++s_operation_mpi_tag;
+
+   std::set<int>::const_iterator owneri;
+   size_t peer_idx = 0;
+   for (owneri = outgoing_ranks.begin(); owneri != outgoing_ranks.end(); ++owneri,
+        ++peer_idx) {
+      const int peer_rank = *owneri;
+      tbox::AsyncCommPeer<int>& incoming_comm = all_comms[peer_idx];
+      incoming_comm.initialize(&comm_stage);
+      incoming_comm.setPeerRank(peer_rank);
+      incoming_comm.setMPI(mpi);
+      incoming_comm.setMPITag(tag0, tag1);
+      incoming_comm.limitFirstDataLength(MappingConnectorAlgorithm_FirstDataLength);
+      incoming_comm.beginRecv();
+      if (s_print_modify_steps == 'y') tbox::plog << "Post recv to "
+                                                  << incoming_comm.getPeerRank()
+                                                  << std::endl;
+      if (incoming_comm.isDone()) {
+         completed.insert(completed.end(), &incoming_comm);
+      }
+   }
+
+   for (owneri = incoming_ranks.begin(); owneri != incoming_ranks.end(); ++owneri,
+        ++peer_idx) {
+      const int peer_rank = *owneri;
+      tbox::AsyncCommPeer<int>& outgoing_comm = all_comms[peer_idx];
+      outgoing_comm.initialize(&comm_stage);
+      outgoing_comm.setPeerRank(peer_rank);
+      outgoing_comm.setMPI(mpi);
+      outgoing_comm.setMPITag(tag0, tag1);
+      outgoing_comm.limitFirstDataLength(MappingConnectorAlgorithm_FirstDataLength);
+   }
+}
+
+/*
+ ***********************************************************************
+ * Receive messages and unpack info sent from other processes.
+ ***********************************************************************
+ */
+void MappingConnectorAlgorithm::privateModify_receiveAndUnpack(
+   NeighborhoodSet& anchor_eto_new,
+   NeighborhoodSet& new_eto_anchor,
+   std::set<int>& outgoing_ranks,
+   tbox::AsyncCommPeer<int> all_comms[],
+   tbox::AsyncCommStage& comm_stage,
+   tbox::AsyncCommStage::MemberVec& completed,
+   const tbox::Dimension& dim,
+   const int rank) const
+{
+
+   do {
+      for (unsigned int i = 0; i < completed.size(); ++i) {
+
+         tbox::AsyncCommPeer<int>* peer =
+            dynamic_cast<tbox::AsyncCommPeer<int> *>(completed[i]);
+         TBOX_ASSERT(completed[i] != NULL);
+         TBOX_ASSERT(peer != NULL);
+
+         if ((unsigned int)(peer - all_comms) < outgoing_ranks.size()) {
+            t_modify_unpack->start();
+            // Received from this peer.
+            const int sender = peer->getPeerRank();
+            const int* ptr = peer->getRecvData();
+
+            const int mapped_box_com_buffer_size = MappedBox::commBufferSize(
+                  dim);
+            /*
+             * Content of send_mesg:
+             * - neighbor-removal section cached in neighbor_removal_mesg.
+             * - offset to the reference section (see below)
+             * - number of anchor mapped_boxes for which neighbors are found
+             * - number of new mapped_boxes for which neighbors are found
+             * - index of base/head mapped_box
+             * - number of neighbors found for base/head mapped_box.
+             *   - owner and local indices of neighbors found.
+             *     Boxes of found neighbors are given in the
+             *     reference section of the message.
+             * - reference section: all the mapped_boxes referenced as
+             *   neighbors (accumulated in referenced_anchor_nabrs
+             *   and referenced_new_nabrs).
+             *   - number of referenced base neighbors
+             *   - number of referenced head neighbors
+             *   - referenced base neighbors
+             *   - referenced head neighbors
+             */
+
+            // Unpack neighbor-removal section.
+            const int num_removed_mapped_boxes = *(ptr++);
+            for (int ii = 0; ii < num_removed_mapped_boxes; ++ii) {
+               const LocalId id_gone(*(ptr++));
+               const int number_affected = *(ptr++);
+               const MappedBox mapped_box_gone(dim, id_gone, sender);
+               if (s_print_modify_steps == 'y') tbox::plog << "MappedBox "
+                                                           << mapped_box_gone
+                                                           <<
+                  " removed, affecting "
+                                                           << number_affected
+                                                           << " mapped_boxes."
+                                                           << std::endl;
+               for (int iii = 0; iii < number_affected; ++iii) {
+                  const LocalId id_affected(*(ptr++));
+                  NeighborhoodSet::iterator ci =
+                     anchor_eto_new.find(GlobalId(id_affected, rank));
+                  NeighborSet& nabrs = (*ci).second;
+                  if (s_print_modify_steps == 'y') tbox::plog
+                     << " Removing " << mapped_box_gone
+                     << " from nabr list for " << id_affected
+                     << std::endl;
+                  NeighborSet::iterator ni = nabrs.find(mapped_box_gone);
+                  TBOX_ASSERT(ni != nabrs.end());
+                  nabrs.erase(ni);
+               }
+               TBOX_ASSERT(ptr != peer->getRecvData() + peer->getRecvSize());
+            }
+
+            // Get the referenced neighbor MappedBoxes.
+            NeighborSet referenced_base_nabrs;
+            NeighborSet referenced_head_nabrs;
+            const int offset = *(ptr++);
+            const int* ref_mapped_box_ptr = peer->getRecvData() + offset;
+            const int n_reference_base_mapped_boxes = *(ref_mapped_box_ptr++);
+            const int n_reference_head_mapped_boxes = *(ref_mapped_box_ptr++);
+            for (int ii = 0; ii < n_reference_base_mapped_boxes; ++ii) {
+               MappedBox mapped_box(dim);
+               mapped_box.getFromIntBuffer(ref_mapped_box_ptr);
+               referenced_base_nabrs.insert(
+                  referenced_base_nabrs.end(), mapped_box);
+               ref_mapped_box_ptr += mapped_box_com_buffer_size;
+            }
+            for (int ii = 0; ii < n_reference_head_mapped_boxes; ++ii) {
+               MappedBox mapped_box(dim);
+               mapped_box.getFromIntBuffer(ref_mapped_box_ptr);
+               referenced_head_nabrs.insert(
+                  referenced_head_nabrs.end(), mapped_box);
+               ref_mapped_box_ptr += mapped_box_com_buffer_size;
+            }
+            TBOX_ASSERT(
+               ref_mapped_box_ptr == peer->getRecvData() + peer->getRecvSize());
+
+            /*
+             * Unpack neighbor data for base mapped_boxes and head
+             * mapped_box_levels.  The neighbor info given includes
+             * only owner and local index.  Refer to reference data to
+             * get the box info.
+             */
+            const int n_base_mapped_boxes = *(ptr++);
+            const int n_head_mapped_boxes = *(ptr++);
+            for (int ii = 0; ii < n_base_mapped_boxes; ++ii) {
+               LocalId local_id(*(ptr++));
+               const GlobalId gid(local_id, rank);
+               NeighborSet& nabrs = anchor_eto_new[gid];
+               const int n_nabrs_found = *(ptr++);
+               for (int j = 0; j < n_nabrs_found; ++j) {
+                  MappedBox tmp_nabr(dim, LocalId(ptr[1]), ptr[0]);
+                  ptr += 2;
+                  NeighborSet::const_iterator na =
+                     referenced_head_nabrs.find(tmp_nabr);
+                  TBOX_ASSERT(na != referenced_head_nabrs.end());
+                  const MappedBox& nabr = *na;
+                  nabrs.insert(nabr);
+               }
+            }
+            for (int ii = 0; ii < n_head_mapped_boxes; ++ii) {
+               LocalId local_id(*(ptr++));
+               const GlobalId gid(local_id, rank);
+               NeighborSet& nabrs = new_eto_anchor[gid];
+               const int n_nabrs_found = *(ptr++);
+               for (int j = 0; j < n_nabrs_found; ++j) {
+                  MappedBox tmp_nabr(dim, LocalId(ptr[1]), ptr[0]);
+                  ptr += 2;
+                  NeighborSet::const_iterator na =
+                     referenced_base_nabrs.find(tmp_nabr);
+                  TBOX_ASSERT(na != referenced_base_nabrs.end());
+                  const MappedBox& nabr = *na;
+                  nabrs.insert(nabr);
+               }
+            }
+            t_modify_unpack->stop();
+         } else {
+            // Sent to this peer.  No need to do anything.
+         }
+      }
+
+      completed.clear();
+      comm_stage.advanceSome(completed);
+
+   } while (completed.size() > 0);
+}
+
+/*
+ ***********************************************************************
+ * Discover overlaps with new MappedBoxes and send outgoing messages.
+ * We interlace discovery with sends rather than wait until all
+ * discovery is completed before sending.  This makes sure sends are
+ * started asap to maximize communication and computation.
+ ***********************************************************************
+ */
+void MappingConnectorAlgorithm::privateModify_discoverAndSend(
+   std::map<int, std::vector<int> >& neighbor_removal_mesg,
+   Connector& anchor_to_new,
+   Connector& new_to_anchor,
+   NeighborhoodSet& anchor_eto_new,
+   NeighborhoodSet& new_eto_anchor,
+   std::set<int>& incoming_ranks,
+   std::set<int>& outgoing_ranks,
+   tbox::AsyncCommPeer<int> all_comms[],
+   tbox::AsyncCommStage::MemberVec& completed,
+   const Connector& old_to_anchor,
+   const Connector& anchor_to_old,
+   const Connector& old_to_new,
+   const tbox::Dimension& dim,
+   const int rank,
+   const int nproc) const
+{
+   const MappedBoxLevel& old(old_to_anchor.getBase());
+   const IntVector& anchor_to_new_width(anchor_to_new.getConnectorWidth());
+   const IntVector& new_to_anchor_width(new_to_anchor.getConnectorWidth());
+   const NeighborhoodSet& old_eto_anchor(old_to_anchor.getNeighborhoodSets());
+   const NeighborhoodSet& old_eto_new(old_to_new.getNeighborhoodSets());
+
+   NeighborSet visible_anchor_nabrs, visible_new_nabrs;
+   InvertedNeighborhoodSet anchor_eto_old, new_eto_old;
+   for (NeighborhoodSet::const_iterator ei = old_eto_anchor.begin();
+        ei != old_eto_anchor.end(); ++ei) {
+      const GlobalId& old_gid = (*ei).first;
+      const NeighborSet& anchor_nabrs = (*ei).second;
+      for (NeighborSet::const_iterator na = anchor_nabrs.begin();
+           na != anchor_nabrs.end(); ++na) {
+         visible_anchor_nabrs.insert(*na);
+         if (old_eto_new.find(old_gid) != old_eto_new.end()) {
+            /*
+             * anchor_eto_old is an InvertedNeighborhoodSet mapping anchor
+             * mapped_boxes to changing old mapped_boxes (excludes
+             * old mapped_boxes that do not change).
+             */
+            anchor_eto_old[*na].insert(old_gid.getLocalId());
+         }
+      }
+   }
+   for (NeighborhoodSet::const_iterator ei = old_eto_new.begin();
+        ei != old_eto_new.end(); ++ei) {
+      const GlobalId& old_gid = (*ei).first;
+      const NeighborSet& new_nabrs = (*ei).second;
+      for (NeighborSet::const_iterator na = new_nabrs.begin();
+           na != new_nabrs.end(); ++na) {
+         visible_new_nabrs.insert(visible_new_nabrs.end(), *na);
+         new_eto_old[*na].insert(old_gid.getLocalId());
+      }
+   }
+
+   /*
+    * Compute relationships.  Relationships are either locally
+    * stored or packed into a message for sending.
+    */
+
+   /*
+    * anchor_ni and new_ni point to the base/head mapped_box whose
+    * neighbors are being sought.
+    *
+    * new_ni is used only if we are trying to compute new_to_anchor.
+    * If we are not interested in that connector, then new_ni plays no
+    * role.
+    */
+   NeighborSet::iterator anchor_ni;
+   NeighborSet::iterator new_ni;
+   /*
+    * Local process can find neighbors for the owners of mapped_boxes
+    * in visible_anchor_nabrs and visible_new_nabrs.  As an
+    * optimization measure, start loop on the first owner with higher
+    * rank than the local rank.  This avoid the higher-end ranks from
+    * having to wait at the beginning and the lower-end ranks from
+    * having to wait at the end.  After the highest rank owner has
+    * been handled, start at the beginning and do the remaining ranks.
+    * If local rank is highest of all owners of the visible
+    * mapped_boxes, start at the begining.
+    */
+
+   const MappedBox start_loop_here(dim, LocalId::getZero(), rank + 1);
+   anchor_ni = visible_anchor_nabrs.lower_bound(start_loop_here);
+   new_ni = visible_new_nabrs.lower_bound(start_loop_here);
+
+   if (anchor_ni == visible_anchor_nabrs.end() &&
+       new_ni == visible_new_nabrs.end()) {
+      /*
+       * There are no visible mapped_boxes owned by rank higher than
+       * local process.  So loop from the beginning.
+       */
+      anchor_ni = visible_anchor_nabrs.begin();
+      new_ni = visible_new_nabrs.begin();
+   }
+
+   /*
+    * Set peer_idx to index the first incoming_ranks peer in all_comms.  It
+    * will be incremented to correpond to the peer whose neighbors are
+    * being searched for.
+    */
+   int peer_idx = static_cast<int>(outgoing_ranks.size());
+
+   if (s_print_modify_steps == 'y') {
+      tbox::plog << "visible_anchor_nabrs:" << std::endl;
+      for (NeighborSet::const_iterator na = visible_anchor_nabrs.begin();
+           na != visible_anchor_nabrs.end(); ++na) {
+         tbox::plog << "  " << *na << std::endl;
+      }
+      tbox::plog << "visible_new_nabrs:" << std::endl;
+      for (NeighborSet::const_iterator na = visible_new_nabrs.begin();
+           na != visible_new_nabrs.end(); ++na) {
+         tbox::plog << "  " << *na << std::endl;
+      }
+   }
+
+   // Owners that we have sent messages to.
+   std::set<int> owners_sent_to;
+
+   /*
+    * Loop until all visible anchor/new neighbors have their
+    * new/anchor neighbors searched for.
+    */
+   while ((anchor_ni != visible_anchor_nabrs.end()) ||
+          (new_ni != visible_new_nabrs.end())) {
+
+      /*
+       * curr_owner is the owner whose neighbors is currently being
+       * searched for.  It should be the owner of the next anchor or
+       * new MappedBox in our cyclic-type looping.
+       */
+      int curr_owner = nproc; // Start with invalid value.
+      if (anchor_ni != visible_anchor_nabrs.end() &&
+          curr_owner > (*anchor_ni).getOwnerRank()) {
+         curr_owner = (*anchor_ni).getOwnerRank();
+      }
+      if (new_ni != visible_new_nabrs.end() &&
+          curr_owner > (*new_ni).getOwnerRank()) {
+         curr_owner = (*new_ni).getOwnerRank();
+      }
+
+      std::vector<int> send_mesg;
+      /*
+       * Set up send_message to contain info discovered
+       * locally and should be sent to curr_owner.
+       *
+       * Content of send_mesg:
+       * - neighbor-removal section cached in neighbor_removal_mesg.
+       * - offset to the reference section (see below)
+       * - number of anchor mapped_boxes for which neighbors are found
+       * - number of new mapped_boxes for which neighbors are found
+       *   - index of base/head mapped_box
+       *   - number of neighbors found for base/head mapped_box.
+       *     - owner and local indices of neighbors found.
+       *       Boxes of found neighbors are given in the
+       *       reference section of the message.
+       * - reference section: all the mapped_boxes referenced as
+       *   neighbors (accumulated in referenced_anchor_nabrs
+       *   and referenced_new_nabrs).
+       *   - number of referenced base neighbors
+       *   - number of referenced head neighbors
+       *   - referenced base neighbors
+       *   - referenced head neighbors
+       *
+       * The purpose of factoring out info on the neighbors referenced
+       * is to reduce redundant data that can eat up lots of memory
+       * and message passing bandwidth when there are lots of mapped_boxes
+       * with the same neighbors.
+       */
+
+      /*
+       * The first section of the send_mesg is the remote neighbor-removal
+       * section (computed above).
+       */
+      if (curr_owner != rank) {
+         // swap( send_mesg, neighbor_removal_mesg[curr_owner] );
+         // We could use swap, but assign instead to leave data for debugging.
+         send_mesg = neighbor_removal_mesg[curr_owner];
+         if (send_mesg.empty()) {
+            // No neighbor-removal data found for curr_owner.
+            send_mesg.insert(send_mesg.end(), 0);
+         }
+      }
+
+      // Indices of certain positions in send_mesg.
+      const size_t idx_offset_to_ref = send_mesg.size();
+      const size_t idx_num_anchor_mapped_boxes = idx_offset_to_ref + 1;
+      const size_t idx_num_new_mapped_boxes = idx_offset_to_ref + 2;
+      send_mesg.insert(send_mesg.end(), 3, 0);
+
+      // Mapped_boxes referenced in the message, used when adding ref section.
+      MappedBoxSet referenced_anchor_nabrs; // Referenced neighbors in anchor.
+      MappedBoxSet referenced_new_nabrs; // Referenced neighbors in new.
+
+      /*
+       * Find locally visible new neighbors for all anchor
+       * MappedBoxes owned by curr_owner.
+       */
+      while (anchor_ni != visible_anchor_nabrs.end() &&
+             (*anchor_ni).getOwnerRank() == curr_owner) {
+         const MappedBox& anchor_mapped_box = *anchor_ni;
+         if (s_print_modify_steps == 'y')
+            tbox::plog << "Finding neighbors for anchor_mapped_box "
+                       << anchor_mapped_box << std::endl;
+         Box compare_box = anchor_mapped_box.getBox();
+         compare_box.grow(anchor_to_new_width);
+         if (anchor_to_old.getHeadCoarserFlag()) compare_box.coarsen(
+               anchor_to_old.getRatio());
+         else if (old_to_anchor.getHeadCoarserFlag()) compare_box.refine(
+               old_to_anchor.getRatio());
+
+         std::vector<MappedBox> found_nabrs;
+         const IndexSet& old_indices = anchor_eto_old[anchor_mapped_box];
+
+         for (IndexSet::const_iterator na = old_indices.begin();
+              na != old_indices.end(); ++na) {
+            const GlobalId old_gid(*na, old.getRank());
+            const NeighborSet& new_nabrs =
+               old_eto_new.find(old_gid)->second;
+            for (NeighborSet::const_iterator naa = new_nabrs.begin();
+                 naa != new_nabrs.end(); ++naa) {
+               if (compare_box.intersects(naa->getBox())) {
+                  found_nabrs.insert(found_nabrs.end(), *naa);
+               }
+            }
+         }
+         if (s_print_modify_steps == 'y') {
+            tbox::plog << "Found " << found_nabrs.size() << " neighbors :"
+                       << std::endl;
+            for (std::vector<MappedBox>::const_iterator naa = found_nabrs.begin();
+                 naa != found_nabrs.end(); ++naa) {
+               tbox::plog << "  " << *naa << std::endl;
+            }
+         }
+         if (!found_nabrs.empty()) {
+            if (anchor_mapped_box.getOwnerRank() != rank) {
+               // Pack up info for sending.
+               ++send_mesg[idx_num_anchor_mapped_boxes];
+               int subsize = 2 + 2 * static_cast<int>(found_nabrs.size());
+               send_mesg.insert(send_mesg.end(), subsize, -1);
+               int* submesg = &send_mesg[send_mesg.size() - subsize];
+               *(submesg++) = anchor_mapped_box.getLocalId().getValue();
+               *(submesg++) = static_cast<int>(found_nabrs.size());
+               for (std::vector<MappedBox>::const_iterator na =
+                       found_nabrs.begin();
+                    na != found_nabrs.end(); ++na) {
+                  const MappedBox& nabr = *na;
+                  referenced_new_nabrs.insert(nabr);
+                  submesg[0] = nabr.getOwnerRank();
+                  submesg[1] = nabr.getLocalId().getValue();
+                  submesg += 2;
+               }
+            } else {
+               /*
+                * Save neighbor info locally.
+                *
+                * To improve communication time, we should really send
+                * the head mapped_box_level neighbors before doing
+                * anything locally.
+                */
+               NeighborSet& local_nabrs =
+                  anchor_eto_new[anchor_mapped_box.getGlobalId()];
+               for (std::vector<MappedBox>::const_iterator na =
+                       found_nabrs.begin();
+                    na != found_nabrs.end(); ++na) {
+                  const MappedBox& nabr = *na;
+                  local_nabrs.insert(nabr);
+               }
+            }
+         }
+         if (s_print_modify_steps == 'y')
+            tbox::plog << "Erasing visible base nabr " << (*anchor_ni)
+                       << std::endl;
+         visible_anchor_nabrs.erase(anchor_ni++);
+         if (s_print_modify_steps == 'y') {
+            if (anchor_ni == visible_anchor_nabrs.end())
+               tbox::plog << "Next base nabr: end" << std::endl;
+            else
+               tbox::plog << "Next base nabr: " << *anchor_ni << std::endl;
+         }
+
+      }
+
+      /*
+       * Find locally visible anchor neighbors for all new
+       * MappedBoxes owned by curr_owner.
+       */
+      while (new_ni != visible_new_nabrs.end() &&
+             (*new_ni).getOwnerRank() == curr_owner) {
+         const MappedBox& new_mapped_box = *new_ni;
+         if (s_print_modify_steps == 'y')
+            tbox::plog << "Finding neighbors for new_mapped_box "
+                       << new_mapped_box << std::endl;
+         Box compare_box = new_mapped_box.getBox();
+         compare_box.grow(new_to_anchor_width);
+         if (anchor_to_new.getHeadCoarserFlag()) compare_box.refine(
+               anchor_to_new.getRatio());
+         else if (new_to_anchor.getHeadCoarserFlag()) compare_box.coarsen(
+               new_to_anchor.getRatio());
+
+         std::vector<MappedBox> found_nabrs;
+         const IndexSet& old_indices = new_eto_old[new_mapped_box];
+
+         for (IndexSet::const_iterator na = old_indices.begin();
+              na != old_indices.end(); ++na) {
+            const GlobalId old_gid(*na, rank);
+            NeighborhoodSet::const_iterator anchor_nabrs_i = old_eto_anchor.find(old_gid);
+            if (anchor_nabrs_i != old_eto_anchor.end()) {
+               /*
+                * There are anchor MappedBoxes with relationships to
+                * the old MappedBox identified by old_gid.
+                */
+               const NeighborSet& anchor_nabrs = anchor_nabrs_i->second;
+               for (NeighborSet::const_iterator naa = anchor_nabrs.begin();
+                    naa != anchor_nabrs.end(); ++naa) {
+                  if (compare_box.intersects(naa->getBox())) {
+                     found_nabrs.insert(found_nabrs.end(), *naa);
+                  }
+               }
+            }
+         }
+
+         if (s_print_modify_steps == 'y') {
+            tbox::plog << "Found " << found_nabrs.size() << " neighbors:"
+                       << std::endl;
+            for (std::vector<MappedBox>::const_iterator naa = found_nabrs.begin();
+                 naa != found_nabrs.end(); ++naa) {
+               tbox::plog << "  " << *naa << std::endl;
+            }
+         }
+
+         if (!found_nabrs.empty()) {
+            if (new_mapped_box.getOwnerRank() != rank) {
+               // Pack up info for sending.
+               ++send_mesg[idx_num_new_mapped_boxes];
+               int subsize = 2 + 2 * static_cast<int>(found_nabrs.size());
+               send_mesg.insert(send_mesg.end(), subsize, -1);
+               int* submesg = &send_mesg[send_mesg.size() - subsize];
+               *(submesg++) = new_mapped_box.getLocalId().getValue();
+               *(submesg++) = static_cast<int>(found_nabrs.size());
+               for (std::vector<MappedBox>::const_iterator na =
+                       found_nabrs.begin();
+                    na != found_nabrs.end(); ++na) {
+                  const MappedBox& nabr(*na);
+                  referenced_anchor_nabrs.insert(nabr);
+                  submesg[0] = nabr.getOwnerRank();
+                  submesg[1] = nabr.getLocalId().getValue();
+                  submesg += 2;
+               }
+            } else {
+               /*
+                * Save neighbor info locally.
+                */
+               NeighborSet& local_nabrs =
+                  new_eto_anchor[new_mapped_box.getGlobalId()];
+               for (std::vector<MappedBox>::const_iterator na =
+                       found_nabrs.begin();
+                    na != found_nabrs.end(); ++na) {
+                  const MappedBox& nabr = *na;
+                  local_nabrs.insert(nabr);
+               }
+            }
+         }
+         if (s_print_modify_steps == 'y')
+            tbox::plog << "Erasing visible head nabr " << (*new_ni)
+                       << std::endl;
+         visible_new_nabrs.erase(new_ni++);
+         if (s_print_modify_steps == 'y') {
+            if (new_ni == visible_new_nabrs.end())
+               tbox::plog << "Next head nabr: end" << std::endl;
+            else
+               tbox::plog << "Next head nabr: " << *new_ni << std::endl;
+         }
+      }
+
+      if (curr_owner != rank) {
+         t_modify_discover->stop();
+         t_modify_share->start();
+         /*
+          * Send discoveries to the curr_owner.
+          */
+
+         /*
+          * Fill the messages's reference section with neighbors
+          * that have been referenced.
+          */
+         const int offset = send_mesg[idx_offset_to_ref] =
+            static_cast<int>(send_mesg.size());
+         const int n_referenced_nabrs =
+            static_cast<int>(
+               referenced_new_nabrs.size() + referenced_anchor_nabrs.size());
+         const int reference_section_size =
+            2 + n_referenced_nabrs * MappedBox::commBufferSize(dim);
+         send_mesg.insert(send_mesg.end(),
+            reference_section_size,
+            -1);
+         int* ptr = &send_mesg[offset];
+         *(ptr++) = static_cast<int>(referenced_anchor_nabrs.size());
+         *(ptr++) = static_cast<int>(referenced_new_nabrs.size());
+         for (MappedBoxSet::const_iterator ni = referenced_anchor_nabrs.begin();
+              ni != referenced_anchor_nabrs.end(); ++ni) {
+            const MappedBox& mapped_box = *ni;
+            mapped_box.putToIntBuffer(ptr);
+            ptr += MappedBox::commBufferSize(dim);
+         }
+         for (MappedBoxSet::const_iterator ni = referenced_new_nabrs.begin();
+              ni != referenced_new_nabrs.end(); ++ni) {
+            const MappedBox& mapped_box = *ni;
+            mapped_box.putToIntBuffer(ptr);
+            ptr += MappedBox::commBufferSize(dim);
+         }
+
+         TBOX_ASSERT(ptr == &send_mesg[send_mesg.size() - 1] + 1);
+
+         /*
+          * Find the communication object by increasing peer_idx
+          * (cyclically) until it corresponds to curr_owner.
+          */
+         while (all_comms[peer_idx].getPeerRank() != curr_owner) {
+            ++peer_idx;
+            if (peer_idx == static_cast<int>(outgoing_ranks.size()
+                                             + incoming_ranks.size()))
+               peer_idx -= static_cast<int>(incoming_ranks.size());
+         }
+         /*
+          * Send message.
+          */
+         tbox::AsyncCommPeer<int>& outgoing_comm = all_comms[peer_idx];
+         // Make sure we picked the correct peer.
+         TBOX_ASSERT(outgoing_comm.getPeerRank() == curr_owner);
+
+         outgoing_comm.beginSend(&send_mesg[0],
+                                 static_cast<int>(send_mesg.size()));
+         if (outgoing_comm.isDone()) {
+            completed.insert(completed.end(), &outgoing_comm);
+         }
+
+         TBOX_ASSERT(owners_sent_to.find(curr_owner) == owners_sent_to.end());
+
+         owners_sent_to.insert(curr_owner);
+
+         t_modify_share->stop();
+         t_modify_discover->start();
+      }
+
+      /*
+       * If we come to the end of visible mapped_boxes, go back and
+       * work on the mapped_boxes owned by processors with lower rank
+       * than the local rank.  (This is part of the optimization to
+       * reduce communication time.)
+       */
+      if (anchor_ni == visible_anchor_nabrs.end() &&
+          new_ni == visible_new_nabrs.end()) {
+         /*
+          * There are no mapped_boxes that are owned by rank higher
+          * than local process and that we want to find neighbors for.
+          * So loop from the beginning.
+          */
+         anchor_ni = visible_anchor_nabrs.begin();
+         new_ni = visible_new_nabrs.begin();
+      }
+
+   }
+}
+
+/*
+ ***********************************************************************
+ * Remove relationships made obsolete by mapping.  Cache outgoing
+ * information in message buffers.
+ ***********************************************************************
+ */
+void MappingConnectorAlgorithm::privateModify_removeAndCache(
+   std::map<int, std::vector<int> >& neighbor_removal_mesg,
+   NeighborhoodSet& anchor_eto_new,
+   NeighborhoodSet& new_eto_anchor,
+   const Connector& old_to_new,
+   const tbox::Dimension& dim,
+   const int rank) const
+{
+   const NeighborhoodSet& old_eto_new = old_to_new.getNeighborhoodSets();
+
+   /*
+    * Remove neighbors incident to or from old mapped_boxes (because
+    * they are going away). These are MappedBoxes mapped by
+    * old_to_new.
+    *
+    * Erase local old mapped_boxes from new_eto_anchor.
+    *
+    * If the old mapped_boxes have neighbors in the anchor
+    * mapped_box_level, some neighbors from anchor_eto_old should be
+    * erased also.  For each neighbor from a remote anchor mapped_box to a
+    * local old mapped_box, add data to mesg_to_owners saying what
+    * mapped_box is disappearing and what anchor mapped_boxes should
+    * no longer reference it.
+    */
+   for (NeighborhoodSet::const_iterator ci = old_eto_new.begin();
+        ci != old_eto_new.end(); ++ci) {
+
+      const GlobalId& old_gid_gone = (*ci).first;
+      const MappedBox old_mapped_box_gone(dim, old_gid_gone);
+
+      NeighborhoodSet::iterator cj =
+         new_eto_anchor.find(old_gid_gone);
+
+      if (cj != new_eto_anchor.end()) {
+         // old_gid_gone exists in new_to_anchor.  Remove it.
+
+         const NeighborSet& affected_anchor_nabrs = cj->second;
+
+         if (s_print_modify_steps == 'y') tbox::plog << "MappedBox "
+                                                     << old_mapped_box_gone
+                                                     << " is gone."
+                                                     << std::endl;
+         for (NeighborSet::const_iterator na = affected_anchor_nabrs.begin();
+              na != affected_anchor_nabrs.end(); /* incremented in loop */) {
+            if (s_print_modify_steps == 'y') tbox::plog << "  MappedBox "
+                                                        << *na
+                                                        << " is affected."
+                                                        << std::endl;
+            const int anchor_nabr_owner = na->getOwnerRank();
+            if (anchor_nabr_owner == rank) {
+               // Erase local relationship from anchor to old_gid_gone.
+               do {
+                  if (s_print_modify_steps == 'y') tbox::plog
+                     << "  Fixing affected mapped_box " << *na
+                     << std::endl;
+                  NeighborhoodSet::iterator ck =
+                     anchor_eto_new.find(na->getGlobalId());
+                  TBOX_ASSERT(ck != anchor_eto_new.end());
+                  NeighborSet& nabrs_nabrs = (*ck).second;
+                  if (s_print_modify_steps == 'y') {
+                     tbox::plog << nabrs_nabrs.format("XX-> ") << std::endl;
+                  }
+                  NeighborSet::iterator nb = nabrs_nabrs.find(
+                        old_mapped_box_gone);
+                  TBOX_ASSERT(nb != nabrs_nabrs.end());
+                  if (s_print_modify_steps == 'y') tbox::plog
+                     << "    Removing neighbor " << *nb
+                     << " from list for " << *na << std::endl;
+                  nabrs_nabrs.erase(nb);
+                  ++na;
+                  // Skip past periodic image mapped_boxes.
+                  while (na != affected_anchor_nabrs.end() &&
+                         na->isPeriodicImage()) {
+                     ++na;
+                  }
+               } while (na != affected_anchor_nabrs.end() &&
+                        na->getOwnerRank() == rank);
+            } else {
+               // Tell owner of nabr to erase references to old_gid_gone.
+               std::vector<int>& mesg = neighbor_removal_mesg[anchor_nabr_owner];
+               // mesg[0] is the counter for how many mapped_boxes are removed.
+               if (mesg.empty()) {
+                  mesg.insert(mesg.end(), 1);
+               } else { ++mesg[0];
+               }
+               mesg.insert(mesg.end(), old_gid_gone.getLocalId().getValue());
+               int i_count = static_cast<int>(mesg.size());
+               mesg.insert(mesg.end(), 0);
+               do {
+                  mesg.insert(mesg.end(), na->getLocalId().getValue());
+                  ++mesg[i_count];
+                  if (s_print_modify_steps == 'y') tbox::plog
+                     << "    Request change " << mesg[i_count]
+                     << " to neighbors fo " << *na << std::endl;
+                  ++na;
+               } while (na != affected_anchor_nabrs.end() &&
+                        na->getOwnerRank() == anchor_nabr_owner);
+            }
+         }
+
+         /*
+          * Erase relationships from old_mapped_box_gone to anchor
+          * mapped_box_level.
+          */
+         new_eto_anchor.erase(cj);
+
+      }
+
+   }
+}
+
+/*
+ ***********************************************************************
+ * Do some standard (not expensive) checks on the arguments of modify.
+ ***********************************************************************
+ */
+
+void MappingConnectorAlgorithm::checkModifyParameters(
+   const Connector& anchor_to_mapped,
+   const Connector& mapped_to_anchor,
+   const Connector& old_to_new,
+   const Connector& new_to_old) const
+{
+   const MappedBoxLevel& old = mapped_to_anchor.getBase();
+
+   /*
+    * Ensure that Connectors incident to and from the old agree on
+    * what the old is.
+    */
+   if (&old != &old_to_new.getBase() ||
+       (new_to_old.isInitialized() && &old !=
+        &new_to_old.getHead()) ||
+       &old != &anchor_to_mapped.getHead()) {
+      TBOX_ERROR("Bad input for MappingConnectorAlgorithm::modify:\n"
+         << "Given Connectors to anchor and new of modify are not incident\n"
+         << "from the same old in MappingConnectorAlgorithm::modify:\n"
+         << "anchor_to_mapped is  TO  " << &anchor_to_mapped.getHead() << "\n"
+         << "old_to_new is FROM " << &old_to_new.getBase()
+         << "\n"
+         << "new_to_old is  TO  " << &new_to_old.getHead()
+         << "\n"
+         << "mapped_to_anchor is FROM " << &mapped_to_anchor.getBase() << "\n"
+         );
+   }
+   /*
+    * Ensure that new and anchor mapped_box_levels in argument agree with
+    * new and anchor in the object.
+    */
+   if (&mapped_to_anchor.getHead() != &anchor_to_mapped.getBase()) {
+      TBOX_ERROR("Bad input for MappingConnectorAlgorithm::modify:\n"
+         << "Given Connectors to and from anchor of modify do not refer\n"
+         << "to the anchor of the modify in MappingConnectorAlgorithm::modify:\n"
+         << "anchor_to_mapped is FROM " << &anchor_to_mapped.getBase() << "\n"
+         << "mapped_to_anchor is  TO  " << &mapped_to_anchor.getHead() << "\n"
+         << "anchor of modify is    " << &anchor_to_mapped.getBase() << "\n"
+         );
+   }
+   if (new_to_old.isInitialized() && &old_to_new.getHead() !=
+       &new_to_old.getBase()) {
+      TBOX_ERROR("Bad input for MappingConnectorAlgorithm::modify:\n"
+         << "Given Connectors to and from new of modify do not refer\n"
+         << "to the new of the modify in MappingConnectorAlgorithm::modify:\n"
+         << "new_to_old is FROM " << &new_to_old.getBase()
+         << "\n"
+         << "old_to_new is  TO  " << &old_to_new.getHead()
+         << "\n"
+         << "new of modify is    " << &anchor_to_mapped.getHead() << "\n"
+         );
+   }
+   if (!anchor_to_mapped.isTransposeOf(mapped_to_anchor)) {
+      TBOX_ERROR("Bad input for MappingConnectorAlgorithm::modify:\n"
+         << "Given Connectors between anchor and mapped of modify\n"
+         << "are not transposes of each other.\n"
+         << "See Connector::isTransposeOf().\n"
+         );
+   }
+   if (new_to_old.isInitialized() &&
+       !new_to_old.isTransposeOf(old_to_new)) {
+      TBOX_ERROR("Bad input for MappingConnectorAlgorithm::modify:\n"
+         << "Given Connectors between new and old of modify\n"
+         << "are not transposes of each other.\n"
+         << "See Connector::isTransposeOf().\n"
+         );
+   }
+   if (anchor_to_mapped.getParallelState() != MappedBoxLevel::DISTRIBUTED) {
+      TBOX_ERROR("Bad input for MappingConnectorAlgorithm::modify:\n"
+         << "bridging is currently set up for DISTRIBUTED\n"
+         << "mode only.\n");
+   }
+   if (mapped_to_anchor.getParallelState() != MappedBoxLevel::DISTRIBUTED) {
+      TBOX_ERROR("Bad input for MappingConnectorAlgorithm::modify:\n"
+         << "bridging is currently set up for DISTRIBUTED\n"
+         << "mode only.\n");
+   }
+
+   // Expensive sanity checks:
+   if (d_sanity_check_inputs) {
+      anchor_to_mapped.assertTransposeCorrectness(mapped_to_anchor);
+      mapped_to_anchor.assertTransposeCorrectness(anchor_to_mapped);
+      if (new_to_old.isInitialized()) {
+         /*
+          * Not sure if the following are valid checks for modify operation.
+          * Modify *may* have different restrictions on the mapping Connector.
+          */
+         new_to_old.assertTransposeCorrectness(old_to_new);
+         old_to_new.assertTransposeCorrectness(new_to_old);
+      }
+      size_t nerrs = findMappingErrors(old_to_new);
+      if (nerrs != 0) {
+         TBOX_ERROR("MappingConnectorUtil::privateModify: found errors in\n"
+            << "mapping Connector.");
+      }
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+hier::Connector *MappingConnectorAlgorithm::makeGlobalizedCopy(
+   const hier::Connector& r)
+{
+   // Prevent wasteful accidental use when this method is not needed.
+   TBOX_ASSERT(r.getParallelState() != MappedBoxLevel::GLOBALIZED);
+
+   Connector* copy = new Connector(r);
+   copy->setParallelState(MappedBoxLevel::GLOBALIZED);
+   return copy;
+}
+
+/*
+ ***********************************************************************
+ * Run findMappingErrors and assert that no errors are found.
+ ***********************************************************************
+ */
+
+void MappingConnectorAlgorithm::assertMappingValidity(
+   const Connector& connector,
+   char is_local_map) const
+{
+   NULL_USE(connector);
+   NULL_USE(is_local_map);
+
+   TBOX_ASSERT(findMappingErrors(connector, is_local_map) == 0);
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+size_t MappingConnectorAlgorithm::findMappingErrors(
+   const Connector& connector,
+   char is_local_map) const
+{
+   const tbox::SAMRAI_MPI& mpi(connector.getMPI());
+   const NeighborhoodSet& neighborhoods = connector.getNeighborhoodSets();
+
+   // Need to know whether this is a local map.
+   if (is_local_map == '\0') {
+      if (mpi.getSize() > 1) {
+         for (NeighborhoodSet::const_iterator ei = neighborhoods.begin();
+              ei != neighborhoods.end(); ++ei) {
+            const NeighborSet& nabrs = (*ei).second;
+            for (NeighborSet::const_iterator ni = nabrs.begin();
+                 ni != nabrs.end(); ++ni) {
+               if ((*ni).getOwnerRank() != connector.getRank()) {
+                  is_local_map = 'n';
+                  break;
+               }
+            }
+            if (is_local_map == 'n') {
+               break;
+            }
+         }
+         if (is_local_map != 'n') {
+            is_local_map = 'y';
+         }
+         int tmpi = is_local_map == 'y' ? 0 : 1;
+         int tmpj; // For some reason, MPI_IN_PLACE is undeclared!
+         mpi.Allreduce(&tmpi,
+            &tmpj,
+            1,
+            MPI_INT,
+            MPI_MAX);
+         if (tmpj > 0) is_local_map = 'n';
+      } else {
+         is_local_map = 'y';
+      }
+   }
+
+   /*
+    * If not a local map, we need a globalized copy of the head.
+    */
+   const MappedBoxLevel &new_mapped_box_level =
+      is_local_map == 'y' ? connector.getHead() :
+      connector.getHead().getGlobalizedVersion();
+
+   int error_count = 0;
+
+   /*
+    * Find old MappedBoxes that changed or disappeared on
+    * the new MappedBoxLevel.  There should be a mapping for each
+    * MappedBox that changed or disappeared.
+    */
+   const MappedBoxSet& old_mapped_boxes = connector.getBase().getMappedBoxes();
+   for (RealMappedBoxConstIterator ni(old_mapped_boxes); ni.isValid();
+        ++ni) {
+      const MappedBox& old_mapped_box = *ni;
+      if (!new_mapped_box_level.hasMappedBox(old_mapped_box)) {
+         // old_mapped_box disappeared.  Require a mapping for old_mapped_box.
+         if (!connector.hasNeighborSet(old_mapped_box.getLocalId())) {
+            ++error_count;
+            tbox::perr << "MappingConnectorAlgorithm::findMappingError ("
+                       << error_count
+                       << "): old mapped_box " << old_mapped_box
+                       << " disappeared without being mapped." << std::endl;
+         }
+      } else {
+         const MappedBox& new_mapped_box =
+            *(new_mapped_box_level.getMappedBoxStrict(old_mapped_box));
+         if (new_mapped_box.getBox() != old_mapped_box.getBox()) {
+            // old_mapped_box has changed its box.  A mapping must exist for it.
+            if (!connector.hasNeighborSet(old_mapped_box.getLocalId())) {
+               ++error_count;
+               tbox::perr << "MappingConnectorAlgorithm::findMappingError ("
+                          << error_count
+                          << "): old mapped_box " << old_mapped_box
+                          << " changed to " << new_mapped_box
+                          << " without being mapped." << std::endl;
+            }
+         }
+      }
+   }
+
+   /*
+    * All mappings should point from a old MappedBox to a new
+    * set of MappedBoxes.
+    */
+   for (NeighborhoodSet::const_iterator ei = neighborhoods.begin();
+        ei != neighborhoods.end(); ++ei) {
+
+      const GlobalId& gid = (*ei).first;
+      const NeighborSet& nabrs = (*ei).second;
+
+      if (!connector.getBase().hasMappedBox(gid)) {
+         // Mapping does not go from a old mapped_box.
+         ++error_count;
+         tbox::perr << "MappingConnectorAlgorithm::findMappingError ("
+                    << error_count
+                    << "): mapping given for nonexistent index " << gid
+                    << std::endl;
+      } else {
+         const MappedBox& old_mapped_box =
+            *(connector.getBase().getMappedBoxStrict(gid));
+
+         Box grown_box(old_mapped_box.getBox());
+         grown_box.grow(connector.getConnectorWidth());
+
+         for (NeighborSet::const_iterator ni = nabrs.begin();
+              ni != nabrs.end(); ++ni) {
+            const MappedBox& nabr = *ni;
+
+            if (!grown_box.contains(nabr.getBox())) {
+               ++error_count;
+               tbox::perr << "MappingConnectorAlgorithm::findMappingError ("
+                          << error_count
+                          << "): old mapped_box " << old_mapped_box
+                          << " grown by " << connector.getConnectorWidth()
+                          << " to " << grown_box << " does not contain neighbor "
+                          << nabr << std::endl;
+            }
+
+            if (!new_mapped_box_level.hasMappedBox(nabr)) {
+               ++error_count;
+               tbox::perr << "MappingConnectorAlgorithm::findMappingError ("
+                          << error_count
+                          << "): old mapped_box " << old_mapped_box
+                          << " mapped to nonexistent new mapped_box "
+                          << nabr << std::endl;
+            } else {
+               const MappedBox& head_mapped_box =
+                  *(new_mapped_box_level.getMappedBoxStrict(nabr.getGlobalId()));
+               if (nabr.getBox() != head_mapped_box.getBox()) {
+                  ++error_count;
+                  tbox::perr << "MappingConnectorAlgorithm::findMappingError ("
+                             << error_count
+                             << "): old mapped_box " << old_mapped_box
+                             << " mapped to neighbor " << nabr
+                             << " inconsistent new mapped_box "
+                             << head_mapped_box << std::endl;
+               }
+            }
+
+         }
+      }
+   }
+
+   return error_count;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void MappingConnectorAlgorithm::initializeCallback()
+{
+   /*
+    * The first constructor:
+    * - gets timers from the TimerManager.
+    * - sets up their deallocation.
+    * - sets up debugging flags.
+    */
+
+   if (s_print_modify_steps == 0) {
+      if (tbox::InputManager::inputDatabaseExists()) {
+         s_print_modify_steps = 'n';
+         tbox::Pointer<tbox::Database> idb =
+            tbox::InputManager::getInputDatabase();
+         if (idb->isDatabase("MappingConnectorAlgorithm")) {
+            tbox::Pointer<tbox::Database> ocu_db =
+               idb->getDatabase("MappingConnectorAlgorithm");
+            s_print_modify_steps =
+               ocu_db->getCharWithDefault("print_modify_steps",
+                  s_print_modify_steps);
+         }
+      }
+   }
+
+   t_modify = tbox::TimerManager::getManager()->
+      getTimer("hier::MappingConnectorAlgorithm::privateModify()");
+   t_modify_remove_neighbors = tbox::TimerManager::getManager()->
+      getTimer("hier::MappingConnectorAlgorithm::privateModify()_neighbors");
+   t_modify_discover = tbox::TimerManager::getManager()->
+      getTimer("hier::MappingConnectorAlgorithm::privateModify()_discover");
+   t_modify_share = tbox::TimerManager::getManager()->
+      getTimer("hier::MappingConnectorAlgorithm::privateModify()_share");
+   t_modify_MPI_wait = tbox::TimerManager::getManager()->
+      getTimer("hier::MappingConnectorAlgorithm::privateModify()_MPI_wait");
+   t_modify_comm_init = tbox::TimerManager::getManager()->
+      getTimer("hier::MappingConnectorAlgorithm::modify_comm_init");
+   t_modify_unpack = tbox::TimerManager::getManager()->
+      getTimer("hier::MappingConnectorAlgorithm::modify_unpack");
+}
+
+/*
+ ***************************************************************************
+ * Free statics.  To be called by shutdown registry to make sure
+ * memory for statics do not leak.
+ ***************************************************************************
+ */
+
+void MappingConnectorAlgorithm::finalizeCallback()
+{
+   t_modify.setNull();
+   t_modify_remove_neighbors.setNull();
+   t_modify_discover.setNull();
+   t_modify_share.setNull();
+   t_modify_comm_init.setNull();
+   t_modify_unpack.setNull();
+   t_modify_MPI_wait.setNull();
+
+   if (s_class_mpi.getCommunicator() != tbox::SAMRAI_MPI::commNull) {
+      s_class_mpi.freeCommunicator();
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MappingConnectorAlgorithm.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MappingConnectorAlgorithm.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,546 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Algorithms to work with maping Connectors. 
+ *
+ ************************************************************************/
+#ifndef included_hier_MappingConnectorAlgorithm
+#define included_hier_MappingConnectorAlgorithm
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Connector.h"
+#include "SAMRAI/hier/MappedBox.h"
+#include "SAMRAI/hier/MappedBoxLevel.h"
+#include "SAMRAI/tbox/AsyncCommPeer.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+
+#include <map>
+#include <string>
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief Algorithms for using Connectors representing changes
+ * to a MappedBoxLevel.
+ *
+ * MappingConnectorAlgorithm objects check and apply mappings.
+ */
+class MappingConnectorAlgorithm
+{
+
+public:
+   /*!
+    * @brief Constructor.
+    *
+    * The default constructor creates an uninitialized object in
+    * distributed state.
+    *
+    * @see initialize()
+    * @see swapInitialize()
+    */
+   explicit MappingConnectorAlgorithm();
+
+   /*!
+    * @brief Deallocate internal data.
+    */
+   virtual ~MappingConnectorAlgorithm(
+      void);
+
+   /*!
+    * @brief Set whether to run expensive sanity checks on input
+    * parameters when at the beginning of certain methods.
+    *
+    * The checks are expensive and meant mainly for debugging.
+    *
+    * @param[in] do_check
+    */
+   void
+   setSanityCheckMethodPreconditions(
+      bool do_check);
+
+   /*!
+    * @brief Set whether to run expensive sanity checks on outputs
+    * before returning from certain methods.
+    *
+    * The checks are expensive and meant mainly for debugging.
+    *
+    * @param[in] do_check
+    */
+   void
+   setSanityCheckMethodPostconditions(
+      bool do_check);
+
+   /*!
+    * @brief Most general version for modifying Connectors using
+    * mapping Connectors.  Modification is the changing of existing
+    * Connectors when mapped_boxes in a MappedBoxLevel changes according to specified
+    * mapping connectors.
+    *
+    * The change is represented by a the mapper @c old_to_new
+    * and its transpose @c new_to_old.  The Connectors to be
+    * modified are @c anchor_to_mapped and @c mapped_to_anchor, which
+    * on input, go between a anchor (not mapped) MappedBoxLevel and the old
+    * MappedBoxLevel.  On output, these Connectors will go from the anchor mapped_box_level
+    * to the new mapped_box_level.
+    *
+    * @code
+    * Input:
+    *
+    *                                    (anchor)
+    *                                   ^ /
+    *                                  / /
+    *              mapped_to_anchor-> / /
+    *                                / / <--anchor_to_mapped
+    *                               / v
+    * mapped mapped_box_level:    (old) ---------> (new)
+    *                                   <---------
+    *
+    *
+    * Output:
+    *
+    *                                    (anchor)
+    *                                          \ ^
+    *                                           \ \
+    *                                            \ \ <-mapped_to_anchor
+    *                        anchor_to_mapped --> \ \
+    *                                              v \
+    *                                              (new)
+    *
+    * @endcode
+    *
+    * The MappedBoxLevels before and after the mapping are represented
+    * by the base and head of the mapping.  No MappedBoxLevel is modified,
+    * other than the "mutable" MappedBoxLevels in the argument.
+    *
+    * An important constraint in the old_to_new Connectors is
+    * that this method cannot handle multiple maps at once.  For
+    * example, it cannot map mapped_box J to mapped_box K and at the
+    * same time map mapped_box I to mapped_box J.  MappedBox J in the
+    * old mapped_box_level and mapped_box J on the new
+    * mapped_box_level are considered entirely different mapped_boxes.
+    *
+    * After modifying, the output Connectors that had referenced old
+    * MappedBoxLevels will be reset to reference the new
+    * MappedBoxedLevel.  This is the end of the modify operation.
+    *
+    * The following "in-place" modification is provided for users'
+    * convenience.  Often times, the "new" level is a temporary object
+    * and users often reset output equivalent to:
+    *
+    * @li old = new
+    * @li reset Connectors using old in place of new.
+    *
+    * The modify methods support these optional steps as follows: If
+    * mutable versions of some MappedBoxLevel are given, the output
+    * Connectors can be reset to reference these versions instead.
+    *
+    * If mutable_new points to the old MappedBoxLevel and mutable_old
+    * points to the new, then do an in-place switch as follows:
+    * @li Swap the mutable_old and mutable_new MappedBoxLevels.
+    * @li Use mutable_old (which actually the new MappedBoxLevel after
+    *    the swap) as the mapped MappedBoxLevel in the output Connectors.
+    * Otherwise:
+    * @li If mutable_new is non-NULL, set it equal to new and use
+    *    it as the mapped MappedBoxLevel in the output Connectors.
+    * @li If mutable_old is non-NULL, set it equal to the old MappedBoxLevel.
+    *
+    * @param[in,out] anchor_to_mapped Connector to be modified.  On input, this
+    *   points to the MappedBoxLevel being mapped.
+    * @param[in,out] mapped_to_anchor Reverse (transpose) of anchor_to_mapped.
+    *   points to the MappedBoxLevel being mapped.
+    * @param[in] old_to_new Mapping from the old MappedBoxLevel to the
+    *   new MappedBoxLevel.
+    *   The width of old-->new should indicate the maximum amount of box
+    *   growth caused by the change.  A value of zero means no growth.
+    * @param[in] new_to_old Reverse (transpose) of old_to_new.
+    * @param[in,out] mutable_new See comments.
+    * @param[in,out] mutable_old See comments.
+    */
+   void
+   modify(
+      Connector& anchor_to_mapped,
+      Connector& mapped_to_anchor,
+      const Connector& old_to_new,
+      const Connector& new_to_old,
+      MappedBoxLevel* mutable_new = NULL,
+      MappedBoxLevel* mutable_old = NULL) const;
+
+   /*!
+    * @brief Version of modify requiring only the forward map
+    * and allows only local mappings.
+    *
+    * This version does not require the reverse mapping, but the
+    * mapping must be totally local, e.g.  old_to_new must
+    * contain no remote neighbor.
+    *
+    * @code
+    * Input:
+    *
+    *                                    (anchor)
+    *                                   ^ /
+    *                                  / /
+    *              mapped_to_anchor-> / /
+    *                                / / <--anchor_to_mapped
+    *                               / v
+    * mapped mapped_box_level:    (old) ---------> (new)
+    *
+    *
+    * Output:
+    *
+    *                                    (anchor)
+    *                                          \ ^
+    *                                           \ \
+    *                                            \ \ <-mapped_to_anchor
+    *                        anchor_to_mapped --> \ \
+    *                                              v \
+    *                                              (new)
+    *
+    * @endcode
+    *
+    * The modify methods support these optional steps as follows: If
+    * mutable versions of some MappedBoxLevel are given, the output
+    * Connectors can be reset to reference these versions instead.
+    *
+    * If mutable_new points to the old MappedBoxLevel and mutable_old
+    * points to the new, then do an in-place switch as follows:
+    * @li Swap the mutable_old and mutable_new MappedBoxLevels.
+    * @li Use mutable_old (which actually the new MappedBoxLevel after
+    *    the swap) as the mapped MappedBoxLevel in the output Connectors.
+    * Otherwise:
+    * @li If mutable_new is non-NULL, set it equal to new and use
+    *    it as the mapped MappedBoxLevel in the output Connectors.
+    * @li If mutable_old is non-NULL, set it equal to the old MappedBoxLevel.
+    *
+    * @param[in,out] anchor_to_mapped Connector to be modified.  On input, this
+    *   points to the MappedBoxLevel being mapped.
+    * @param[in,out] mapped_to_anchor Reverse (transpose) of anchor_to_mapped.
+    *   points to the MappedBoxLevel being mapped.
+    * @param[in] old_to_new Mapping from the old MappedBoxLevel to the
+    *   new MappedBoxLevel.
+    *   The width of old-->new should indicate the maximum amount of box
+    *   growth caused by the change.  A value of zero means no growth.
+    * @param[in,out] mutable_new See comments.
+    * @param[in,out] mutable_old See comments.
+    */
+   void
+   modify(
+      Connector& anchor_to_mapped,
+      Connector& mapped_to_anchor,
+      const Connector& old_to_new,
+      MappedBoxLevel* mutable_new = NULL,
+      MappedBoxLevel* mutable_old = NULL) const;
+
+   /*!
+    * @brief Version of modify requiring only the forward map
+    * and does not set the Connector from the mapped MappedBoxLevel back
+    * to the anchor MappedBoxLevel.
+    *
+    * This version does not require the reverse mapping,
+    * but the forward mapping must be totally local, e.g.
+    * old_to_new must contain no remote neighbor.
+    *
+    * This version does not update the Connector from
+    * the mapped mapped_box_level back to the anchor mapped_box_level.
+    * (This is implicit in the fact that mapped_to_anchor
+    * is absent from the interface.)
+    *
+    * @code
+    * Input:
+    *
+    *                                    (anchor)
+    *                                     /
+    *                                    /
+    *                                   /
+    *                                  / <--anchor_to_mapped
+    *                                 v
+    * mapped mapped_box_level:    (old) ---------> (new)
+    *
+    *
+    * Output:
+    *
+    *                                    (anchor)
+    *                                          \
+    *                                           \
+    *                                            \
+    *                        anchor_to_mapped --> \
+    *                                              v
+    *                                              (new)
+    *
+    * @endcode
+    *
+    *
+    * If mutable_new points to the old MappedBoxLevel and mutable_old
+    * points to the new, then do an in-place switch as follows:
+    * @li Swap the mutable_old and mutable_new MappedBoxLevels.
+    * @li Use mutable_old (which actually the new MappedBoxLevel after
+    *    the swap) as the mapped MappedBoxLevel in the output Connectors.
+    * Otherwise:
+    * @li If mutable_new is non-NULL, set it equal to new and use
+    *    it as the mapped MappedBoxLevel in the output Connectors.
+    * @li If mutable_old is non-NULL, set it equal to the old MappedBoxLevel.
+    *
+    * @param[in,out] anchor_to_mapped Connector to be modified.  On input, this
+    *   points to the MappedBoxLevel being mapped.
+    * @param[in,out] mapped_to_anchor Reverse (transpose) of anchor_to_mapped.
+    *   points to the MappedBoxLevel being mapped.
+    * @param[in] new_to_old Reverse (transpose) of old_to_new.
+    * @param[in,out] mutable_new See comments.
+    * @param[in,out] mutable_old See comments.
+    */
+   void
+   modify(
+      Connector& anchor_to_mapped,
+      const Connector& old_to_new,
+      MappedBoxLevel* mutable_new = NULL,
+      MappedBoxLevel* mutable_old = NULL) const;
+
+   /*
+    * @brief Set whether to check for trivial mappings in modify
+    * operations.
+    *
+    * Many common maps describe small (possibly zero) changes to a
+    * bigger MappedBoxLevel.  If @c do_shortcut is set, we check whether
+    * the mapping is globally empty.  (This costs a global reduction
+    * unless it is already cached in the mapping Connector.)  If
+    * empty, the shortcut improves performance.
+    *
+    * @param[in] do_shortcut
+    */
+   void
+   shortcutTrivialMapsInModify(
+      bool do_shortcut);
+
+   // TODO:  Create an enum to replace the char for clarity.
+   /*!
+    * @brief Check if the Connector has a valid mapping.
+    *
+    * This function can be called prior to calling modify().  It
+    * is intended to check the Connector that is the @c old_to_new
+    * argument in modify() to determine if it has a valid mapping.
+    * In other words, it checks to see if the mapping can be used
+    * in modify() without logic errors.  It does no other checks.
+    *
+    * @param[in] connector
+    * @param[in] is_local_map 'y' means assume the mapping is local.  'n'
+    * means the mapping is not local.  '\0' means find out whether the
+    * map is local or not (communication required) and act
+    * accordingly.
+    *
+    * @return number of errors found.
+    */
+   size_t
+   findMappingErrors(
+      const Connector& connector,
+      char is_local_map = '\0') const;
+
+   /*!
+    * @brief Run findMappingErrors and abort if any errors are found.
+    *
+    * @param[in] connector
+    * @param[in] is_local_map 'y' means assume the mapping is local.  'n'
+    * means the mapping is not local.  '\0' means find out whether the
+    * map is local or not (communication required) and act
+    * accordingly.
+    */
+   void
+   assertMappingValidity(
+      const Connector& connector,
+      char is_local_map = '\0') const;
+
+   //@}
+
+private:
+   // Internal shorthand.
+   typedef Connector::NeighborSet NeighborSet;
+
+   /*!
+    * @brief NeighborsSet is a clarifying typedef.
+    */
+   typedef std::set<LocalId> IndexSet;
+
+   /*!
+    * @brief Mapping from a (potentially remote) MappedBox to a
+    * set of LocalIndices, representing an inverted information
+    * from a NeighborhoodSet.
+    */
+   typedef std::map<MappedBox, IndexSet> InvertedNeighborhoodSet;
+
+   /*
+    * @brief Create a copy of a DISTRIBUTED Connectors and
+    * change its state to GLOBALIZED.
+    *
+    * The returned object should be deleted to prevent memory leaks.
+    */
+   static Connector *
+   makeGlobalizedCopy(
+      const Connector& r);
+
+   /*!
+    * @brief Most general version of method to modify existing
+    * Connectors objects by using another to map the head mapped_boxes.
+    *
+    * This version does no checking of the inputs.  The three
+    * public versions do input checking and setting up temporaries
+    * (where needed), then call this function.
+    *
+    * If new_to_old is uninitialized, treat it as a dummy
+    * and assume that all mappings are local.
+    *
+    * If mutable_new points to the old MappedBoxLevel and mutable_new
+    * points to the new, then do an in-place switch as follows:
+    * -# Swap the old and new MappedBoxLevels.
+    * -# Use mutable_old (which actually the new MappedBoxLevel after
+    *    the swap) as the mapped MappedBoxLevel in the output Connectors.
+    * Otherwise:
+    * -# If mutable_new is non-NULL, set it equal to new and use
+    *    it as the mapped MappedBoxLevel in the output Connectors.
+    * -# If mutable_old is non-NULL, set it equal to the old MappedBoxLevel.
+    */
+   void
+   privateModify(
+      Connector& anchor_to_mapped,
+      Connector& mapped_to_anchor,
+      const Connector& old_to_new,
+      const Connector& new_to_old,
+      MappedBoxLevel* mutable_new,
+      MappedBoxLevel* mutable_old) const;
+
+   /*!
+    * @brief Set up communication objects for use in privateModify.
+    */
+   void
+   privateModify_setupCommunication(
+      tbox::AsyncCommPeer<int> *& all_comms,
+      tbox::AsyncCommStage& comm_stage,
+      tbox::AsyncCommStage::MemberVec& completed,
+      const tbox::SAMRAI_MPI &mpi,
+      const std::set<int>& incoming_ranks,
+      const std::set<int>& outgoing_ranks) const;
+
+   /*!
+    * @brief Relationship removal part of modify algorithm, caching
+    * outgoing information in message buffers.
+    */
+   void
+   privateModify_removeAndCache(
+      std::map<int, std::vector<int> >& neighbor_removal_mesg,
+      NeighborhoodSet& anchor_eto_new,
+      NeighborhoodSet& new_eto_anchor,
+      const Connector& old_to_new,
+      const tbox::Dimension& dim,
+      const int rank) const;
+
+   /*!
+    * @brief Remove relationships made obsolete by mapping and send
+    * outgoing information.
+    */
+   void
+   privateModify_discoverAndSend(
+      std::map<int, std::vector<int> >& neighbor_removal_mesg,
+      Connector& anchor_to_new,
+      Connector& new_to_anchor,
+      NeighborhoodSet& anchor_eto_new,
+      NeighborhoodSet& new_eto_anchor,
+      std::set<int>& incoming_ranks,
+      std::set<int>& outoing_ranks,
+      tbox::AsyncCommPeer<int> all_comms[],
+      tbox::AsyncCommStage::MemberVec& completed,
+      const Connector& old_to_anchor,
+      const Connector& anchor_to_old,
+      const Connector& old_to_new,
+      const tbox::Dimension& dim,
+      const int rank,
+      const int nproc) const;
+
+   /*!
+    * @brief Receive messages and unpack info sent from other processes.
+    */
+   void
+   privateModify_receiveAndUnpack(
+      NeighborhoodSet& anchor_eto_new,
+      NeighborhoodSet& new_eto_anchor,
+      std::set<int>& outgoing_ranks,
+      tbox::AsyncCommPeer<int> all_comms[],
+      tbox::AsyncCommStage& comm_stage,
+      tbox::AsyncCommStage::MemberVec& completed,
+      const tbox::Dimension& dim,
+      const int rank) const;
+
+   /*
+    * @brief Performn checks on the arguments of modify.
+    */
+   void
+   checkModifyParameters(
+      const Connector& anchor_to_mapped,
+      const Connector& mapped_to_anchor,
+      const Connector& old_to_new,
+      const Connector& new_to_old) const;
+
+   /*!
+    * @brief Set up things for the entire class.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   initializeCallback();
+
+   /*!
+    * Free statics.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   finalizeCallback();
+
+   /*
+    * @brief Border for debugging output.
+    */
+   static const std::string s_dbgbord;
+
+   /*!
+    * @brief Private communicator object shared by all objects in class.
+    * Protects internal communication from mixing with external.
+    *
+    * For communication, we usually use the SAMRAI_MPI of the
+    * Connectors, and this object is mainly for debugging.  If we
+    * suspect interference from unrelated communication calls, we
+    * resort to this exclusive SAMRAI_MPI object to rule out that
+    * possibility.
+    */
+   static tbox::SAMRAI_MPI s_class_mpi;
+   /*!
+    * @brief Tag to use (and increment) at begining of operations that
+    * require nearest-neighbor communication, to aid in eliminating
+    * mixing of messages from different internal operations.
+    */
+   static int s_operation_mpi_tag;
+
+   // Extra checks independent of optimization/debug.
+   static char s_print_modify_steps;
+
+   static tbox::Pointer<tbox::Timer> t_modify;
+   static tbox::Pointer<tbox::Timer> t_modify_remove_neighbors;
+   static tbox::Pointer<tbox::Timer> t_modify_discover;
+   static tbox::Pointer<tbox::Timer> t_modify_share;
+   static tbox::Pointer<tbox::Timer> t_modify_comm_init;
+   static tbox::Pointer<tbox::Timer> t_modify_unpack;
+   static tbox::Pointer<tbox::Timer> t_modify_MPI_wait;
+
+   bool d_sanity_check_inputs;
+   bool d_sanity_check_outputs;
+   bool d_shortcut_trivial_maps;
+
+   static tbox::StartupShutdownManager::Handler
+   s_initialize_finalize_handler;
+
+};
+
+}
+}
+
+#endif // included_hier_MappingConnectorAlgorithm
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MultiblockDataTranslator.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MultiblockDataTranslator.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,38 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   data translator for Multiblock. 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_MultiblockDataTranslator_C
+#define included_hier_MultiblockDataTranslator_C
+
+#include "SAMRAI/hier/MultiblockDataTranslator.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+ *************************************************************************
+ *									*
+ * The default constructor and virtual destructor do nothing             *
+ * particularly interesting.		                                *
+ *									*
+ *************************************************************************
+ */
+
+MultiblockDataTranslator::MultiblockDataTranslator()
+{
+}
+
+MultiblockDataTranslator::~MultiblockDataTranslator()
+{
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MultiblockDataTranslator.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MultiblockDataTranslator.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,65 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   data translator for Multiblock. 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_MultiblockDataTranslator
+#define included_hier_MultiblockDataTranslator
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/MultiblockPatchHierarchy.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief Class MultiblockDataTranslator
+ */
+
+class MultiblockDataTranslator
+{
+public:
+   /*!
+    * @brief Default constructor
+    */
+   MultiblockDataTranslator();
+
+   /*!
+    * @brief The virtual destructor does nothing interesting.
+    */
+   virtual ~MultiblockDataTranslator();
+
+   virtual void
+   translateAndCopyData(
+      Patch& dst_patch,
+      const int dst_id,
+      const Patch& src_patch,
+      const int src_id,
+      const IntVector& shift,
+      const MultiblockPatchHierarchy::RotationIdentifier rotate) =
+      0;
+
+   virtual void
+   translateAndFillData(
+      Patch& dst_patch,
+      const int dst_id,
+      const Patch& src_patch,
+      const int src_id,
+      const IntVector& shift,
+      const MultiblockPatchHierarchy::RotationIdentifier rotate) =
+      0;
+
+private:
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MultiblockGridGeometry.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MultiblockGridGeometry.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,70 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Grid geometry for multiblock 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_MultiblockGridGeometry_C
+#define included_hier_MultiblockGridGeometry_C
+
+#include "SAMRAI/hier/MultiblockGridGeometry.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/MultiblockGridGeometry.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+ *************************************************************************
+ *									*
+ * The default constructor and virtual destructor do nothing             *
+ * particularly interesting.		                                *
+ *									*
+ *************************************************************************
+ */
+
+MultiblockGridGeometry::MultiblockGridGeometry(
+   tbox::Array<tbox::Pointer<hier::GridGeometry> >& block_geoms):
+   d_dim(block_geoms[0]->getDim()),
+   d_block_geometry(block_geoms)
+{
+   TBOX_ASSERT(!block_geoms.empty());
+}
+
+MultiblockGridGeometry::~MultiblockGridGeometry()
+{
+}
+
+/*
+ *************************************************************************
+ *
+ * Compute physical domain for indexs space related to physical domain
+ * by specified ratio.  If any entry of ratio is negative, the reference
+ * domain will be coarsened.  Otherwise, it will be refined.
+ *
+ *************************************************************************
+ */
+
+void MultiblockGridGeometry::computePhysicalDomain(
+   tbox::Array<BoxArray>& domain,
+   const IntVector& ratio_to_level_zero) const
+{
+   const int nblocks = d_block_geometry.size();
+   domain.resizeArray(nblocks, hier::BoxArray(d_dim));
+   for (int b = 0; b < nblocks; b++) {
+      d_block_geometry[b]->computePhysicalDomain(domain[b],
+         ratio_to_level_zero);
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MultiblockGridGeometry.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MultiblockGridGeometry.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,34 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   grid geometry for use in AMR multiblock hierarchy. 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<hier::GridGeometry>& MultiblockGridGeometry::getBlockGeometry(
+   const int block)
+{
+   return d_block_geometry[block];
+}
+
+SAMRAI_INLINE_KEYWORD
+tbox::Array<tbox::Pointer<hier::GridGeometry> >& MultiblockGridGeometry::
+getBlockGeometryArray()
+{
+   return d_block_geometry;
+}
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Dimension& MultiblockGridGeometry::getDim() const {
+   return d_dim;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MultiblockGridGeometry.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MultiblockGridGeometry.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   GridGeometry for Multiblock. 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_MultiblockGridGeometry
+#define included_hier_MultiblockGridGeometry
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/GridGeometry.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/**
+ * @brief Class MultiblockGridGeometry is a container for the
+ * GridGeometry objects needed in a multiblock problem.
+ * 
+ * This class is a wrapper for an array of GridGeometry objects, where each
+ * entry maintains grid information for one block within a multiblock mesh.
+ *
+ * @see hier::GridGeometry
+ */
+
+class MultiblockGridGeometry
+{
+public:
+   /*!
+    * @brief The constructor.
+    *
+    * @param[in] block_geoms  Each entry of this array is a GridGeometry
+    *                         representing one block of a multiblock grid.
+    */
+   explicit MultiblockGridGeometry(
+      tbox::Array<tbox::Pointer<hier::GridGeometry> >& block_geoms);
+
+   /*!
+    * @brief The virtual destructor does nothing interesting.
+    */
+   virtual ~MultiblockGridGeometry();
+
+   /*!
+    * @brief Return the GridGeometry for the specified block.
+    *
+    * @return Pointer to GridGeometry for the block
+    *
+    * @param[in] block
+    */
+   tbox::Pointer<hier::GridGeometry>&
+   getBlockGeometry(
+      const int block);
+
+   /*!
+    * @brief Return the array of grid geometries.
+    *
+    * @return The array of grid geometries.
+    */
+   tbox::Array<tbox::Pointer<hier::GridGeometry> >&
+   getBlockGeometryArray();
+
+   /*!
+    * @brief Compute BoxArrays representing the physical domain.
+    *
+    * Fill each entry of the given Array with a BoxArray representing the
+    * physical domain of each block managed by this object.  Each BoxArray
+    * will be in terms of the index space and axis alignment of its associated
+    * block, and will be coarsened or refined from the level zero description
+    * of the physical domain.
+    *
+    * If any entry of ratio_to_level_zero is negative, the index space is
+    * coarsened with respect to the level zero domain description.  Otherwise,
+    * the index space is refined.
+    *
+    * @param[out] domain  Array to be filled
+    * @param[in] ratio_to_level_zero 
+    */
+   void
+   computePhysicalDomain(
+      tbox::Array<BoxArray>& domain,
+      const IntVector& ratio_to_level_zero) const;
+
+   /*!
+    * @brief Return the dimension of this object.
+    */
+   const tbox::Dimension&
+   getDim() const;
+
+private:
+
+   /*!
+    * @brief Dimension of the object.
+    */
+   const tbox::Dimension d_dim;
+
+   /*!
+    * @brief Internal array storing GridGeometry objects.
+    */
+   tbox::Array<tbox::Pointer<hier::GridGeometry> > d_block_geometry;
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/MultiblockGridGeometry.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MultiblockPatchHierarchy.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MultiblockPatchHierarchy.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1205 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   multiblock patch hierarchy 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_MultiblockPatchHierarchy_C
+#define included_hier_MultiblockPatchHierarchy_C
+
+#include "SAMRAI/hier/MultiblockPatchHierarchy.h"
+
+#include "SAMRAI/hier/VariableDatabase.h"
+
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#define MBLK_PATCH_HIERARCHY_VERSION (2)
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/MultiblockPatchHierarchy.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * The constructor initializes the arry of hierarchies, and reads from    *
+ * input all of the neighbor relationships between the various blocks of  *
+ * the domain.                                                            *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+MultiblockPatchHierarchy::MultiblockPatchHierarchy(
+   const std::string& object_name,
+   tbox::Pointer<tbox::Database> input_db,
+   tbox::Pointer<hier::MultiblockGridGeometry>& geometry,
+   bool register_for_restart):
+   d_dim(geometry->getDim())
+{
+
+   d_object_name = object_name;
+   d_registered_for_restart = register_for_restart;
+
+   d_number_blocks = input_db->getInteger("num_blocks");
+   d_hierarchies.resizeArray(d_number_blocks);
+   d_block_neighbors.resizeArray(d_number_blocks);
+   d_geometry = geometry;
+
+   TBOX_ASSERT( input_db->isDatabase("PatchHierarchy") );
+   tbox::Pointer<tbox::Database> ph_db = input_db->getDatabase("PatchHierarchy");
+   for (int g = 0; g < d_number_blocks; g++) {
+
+      std::string hier_name = "PatchHierarchy" + tbox::Utilities::intToString(g);
+      d_hierarchies[g] = new hier::PatchHierarchy(
+            hier_name,
+            geometry->getBlockGeometry(g),
+            ph_db,
+            register_for_restart);
+
+   }
+
+   d_singularity.resizeArray(d_number_blocks, hier::BoxList());
+   d_reduced_connect.resizeArray(d_number_blocks);
+
+   std::string sing_name;
+   std::string neighbor_name;
+
+   for (int i = 0; i < d_number_blocks; i++) {
+
+      d_reduced_connect[i] = false;
+
+   }
+
+   for (int sn = 0; true; sn++) {
+
+      sing_name = "Singularity" + tbox::Utilities::intToString(sn);
+
+      if (!input_db->keyExists(sing_name)) {
+         break;
+      }
+
+      tbox::Pointer<tbox::Database> sing_db =
+         input_db->getDatabase(sing_name);
+
+      tbox::Array<int> blocks = sing_db->getIntegerArray("blocks");
+
+      for (int nb = 0; nb < blocks.size(); nb++) {
+         std::string block_box_name = "sing_box_"
+            + tbox::Utilities::intToString(blocks[nb]);
+
+         hier::Box sing_box(sing_db->getDatabaseBox(block_box_name));
+
+         d_singularity[blocks[nb]].unionBoxes(sing_box);
+      }
+   }
+
+   for (int bn = 0; true; bn++) {
+      neighbor_name = "BlockNeighbors" + tbox::Utilities::intToString(bn);
+
+      if (!input_db->keyExists(neighbor_name)) {
+         break;
+      }
+      tbox::Pointer<tbox::Database> pair_db =
+         input_db->getDatabase(neighbor_name);
+
+      int block_a = pair_db->getInteger("block_a");
+      int block_b = pair_db->getInteger("block_b");
+      RotationIdentifier rotation_b_to_a;
+
+      hier::IntVector shift(d_dim, 0);
+      if (d_dim.getValue() == 1) {
+         rotation_b_to_a = NO_ROTATE;
+      } else {
+         tbox::Array<std::string> rstr =
+            pair_db->getStringArray("rotation_b_to_a");
+         rotation_b_to_a = getRotationIdentifier(rstr);
+
+         tbox::Array<int> b_array =
+            pair_db->getIntegerArray("point_in_b_space");
+         tbox::Array<int> a_array =
+            pair_db->getIntegerArray("point_in_a_space");
+
+         hier::Index b_index(d_dim);
+         hier::Index a_index(d_dim);
+
+         for (int p = 0; p < d_dim.getValue(); p++) {
+            b_index(p) = b_array[p];
+            a_index(p) = a_array[p];
+         }
+
+         hier::Box b_box(b_index, b_index);
+         hier::Box a_box(a_index, a_index);
+
+         b_box.rotate(rotation_b_to_a);
+         hier::Index b_rotated_point(b_box.lower());
+         hier::Index a_point = (a_box.lower());
+
+         shift = a_point - b_rotated_point;
+      }
+
+      bool is_singularity =
+         pair_db->getBoolWithDefault("is_singularity", false);
+
+      registerNeighbors(block_a, block_b,
+         rotation_b_to_a, shift, is_singularity);
+
+   }
+
+   for (int b = 0; b < d_number_blocks; b++) {
+      hier::BoxList pseudo_domain;
+      getDomainOutsideBlock(pseudo_domain, b);
+
+      pseudo_domain.unionBoxes(hier::BoxList(d_hierarchies[b]->getGridGeometry()
+            ->
+            getPhysicalDomain()));
+
+      for (hier::BoxList::Iterator
+           si(d_singularity[b]); si; si++) {
+         hier::BoxList test_domain(pseudo_domain);
+         test_domain.intersectBoxes(si());
+         if (test_domain.size() == 0) {
+            d_reduced_connect[b] = true;
+            break;
+         }
+      }
+   }
+
+   createDomainSearchTrees();
+
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->
+      registerRestartItem(d_object_name, this);
+   }
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * The destructor for the multiblock class implicitly deallocates all of  *
+ * the data associated with the multiblock.                               *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+MultiblockPatchHierarchy::~MultiblockPatchHierarchy()
+{
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->unregisterRestartItem(d_object_name);
+   }
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Register a relationship between two blocks signified by the integer    *
+ * identifiers, with the rotation, shift and neighbor type arguments      *
+ * describing the exact nature of the neighbor relation.                  *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void MultiblockPatchHierarchy::registerNeighbors(
+   int a,
+   int b,
+   RotationIdentifier rotation,
+   hier::IntVector& shift,
+   const int is_singularity)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, shift);
+
+   hier::BoxArray a_domain = d_hierarchies[a]->getGridGeometry()->
+      getPhysicalDomain();
+   hier::BoxArray b_domain = d_hierarchies[b]->getGridGeometry()->
+      getPhysicalDomain();
+
+   hier::BoxArray b_domain_in_a_space(b_domain);
+   hier::BoxArray a_domain_in_b_space(a_domain);
+
+   RotationIdentifier back_rotation = getReverseRotationIdentifier(rotation,
+                                                                   d_dim);
+   hier::IntVector back_shift(d_dim);
+
+   if (d_dim.getValue() == 2 || d_dim.getValue() == 3) {
+      calculateReverseShift(back_shift, shift, rotation);
+   } else {
+      TBOX_ERROR("MultiblockPatchHierarchy::registerNeighbors error...\n"
+         << "  object name = " << d_object_name
+         << " Multiblock only works for 2D and 3D" << std::endl);
+
+   }
+
+   bool rotation_needed;
+   if (rotation != 0) {
+      rotation_needed = true;
+   } else {
+      rotation_needed = false;
+   }
+
+   if (rotation_needed) {
+      b_domain_in_a_space.rotate(rotation);
+      a_domain_in_b_space.rotate(back_rotation);
+   }
+   b_domain_in_a_space.shift(shift);
+   a_domain_in_b_space.shift(back_shift);
+
+   Neighbor neighbor_of_b(a, a_domain_in_b_space,
+                          back_rotation, back_shift,
+                          is_singularity);
+   Neighbor neighbor_of_a(b, b_domain_in_a_space,
+                          rotation, shift,
+                          is_singularity);
+
+   d_block_neighbors[a].addItem(neighbor_of_a);
+   d_block_neighbors[b].addItem(neighbor_of_b);
+
+}
+
+void
+MultiblockPatchHierarchy::calculateReverseShift(
+   hier::IntVector& back_shift,
+   const hier::IntVector& shift,
+   const RotationIdentifier rotation)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(back_shift, shift);
+
+   const tbox::Dimension& dim(back_shift.getDim());
+
+   RotationIdentifier back_rotation =
+      getReverseRotationIdentifier(rotation, dim);
+
+   if (dim.getValue() == 2) {
+
+      if (rotation == IUP_JUP) {
+         back_rotation = IUP_JUP;
+         back_shift = -shift;
+      } else if (rotation == JUP_IDOWN) {
+         back_rotation = JDOWN_IUP;
+         back_shift(0) = shift(1);
+         back_shift(1) = -shift(0);
+      } else if (rotation == IDOWN_JDOWN) {
+         back_rotation = IDOWN_JDOWN;
+         back_shift(0) = shift(0);
+         back_shift(1) = shift(1);
+      } else if (rotation == JDOWN_IUP) {
+         back_rotation = JUP_IDOWN;
+         back_shift(0) = -shift(1);
+         back_shift(1) = shift(0);
+      } else {
+         TBOX_ERROR("MultiblockPatchHierarchy::calculateReverseShift error...\n"
+            << " Invalid RotationIdentifier value given" << std::endl);
+      }
+
+   } else if (dim.getValue() == 3) {
+
+      if (back_rotation == IUP_JUP_KUP) {
+         back_shift = -shift;
+      } else if (back_rotation == KUP_IUP_JUP) {
+         back_shift(0) = -shift(2);
+         back_shift(1) = -shift(0);
+         back_shift(2) = -shift(1);
+      } else if (back_rotation == JUP_KUP_IUP) {
+         back_shift(0) = -shift(1);
+         back_shift(1) = -shift(2);
+         back_shift(2) = -shift(0);
+      } else if (back_rotation == IDOWN_KUP_JUP) {
+         back_shift(0) = shift(0);
+         back_shift(1) = -shift(2);
+         back_shift(2) = -shift(1);
+      } else if (back_rotation == KUP_JUP_IDOWN) {
+         back_shift(0) = -shift(2);
+         back_shift(1) = -shift(1);
+         back_shift(2) = shift(0);
+      } else if (back_rotation == JUP_IDOWN_KUP) {
+         back_shift(0) = -shift(1);
+         back_shift(1) = shift(0);
+         back_shift(2) = -shift(2);
+      } else if (back_rotation == KDOWN_JUP_IUP) {
+         back_shift(0) = shift(2);
+         back_shift(1) = -shift(1);
+         back_shift(2) = -shift(0);
+      } else if (back_rotation == IUP_KDOWN_JUP) {
+         back_shift(0) = -shift(0);
+         back_shift(1) = shift(2);
+         back_shift(2) = -shift(1);
+      } else if (back_rotation == JUP_IUP_KDOWN) {
+         back_shift(0) = -shift(1);
+         back_shift(1) = -shift(0);
+         back_shift(2) = shift(2);
+      } else if (back_rotation == KDOWN_IDOWN_JUP) {
+         back_shift(0) = shift(2);
+         back_shift(1) = shift(0);
+         back_shift(2) = -shift(1);
+      } else if (back_rotation == IDOWN_JUP_KDOWN) {
+         back_shift(0) = shift(0);
+         back_shift(1) = -shift(1);
+         back_shift(2) = shift(2);
+      } else if (back_rotation == JUP_KDOWN_IDOWN) {
+         back_shift(0) = -shift(1);
+         back_shift(1) = shift(2);
+         back_shift(2) = shift(0);
+      } else if (back_rotation == JDOWN_IUP_KUP) {
+         back_shift(0) = shift(1);
+         back_shift(1) = -shift(0);
+         back_shift(2) = -shift(2);
+      } else if (back_rotation == IUP_KUP_JDOWN) {
+         back_shift(0) = -shift(0);
+         back_shift(1) = -shift(2);
+         back_shift(2) = shift(1);
+      } else if (back_rotation == KUP_JDOWN_IUP) {
+         back_shift(0) = -shift(2);
+         back_shift(1) = shift(1);
+         back_shift(2) = -shift(0);
+      } else if (back_rotation == JDOWN_KUP_IDOWN) {
+         back_shift(0) = shift(1);
+         back_shift(1) = -shift(2);
+         back_shift(2) = shift(0);
+      } else if (back_rotation == IDOWN_JDOWN_KUP) {
+         back_shift(0) = shift(0);
+         back_shift(1) = shift(1);
+         back_shift(2) = -shift(2);
+      } else if (back_rotation == KUP_IDOWN_JDOWN) {
+         back_shift(0) = -shift(2);
+         back_shift(1) = shift(0);
+         back_shift(2) = shift(1);
+      } else if (back_rotation == JDOWN_KDOWN_IUP) {
+         back_shift(0) = shift(1);
+         back_shift(1) = shift(2);
+         back_shift(2) = -shift(0);
+      } else if (back_rotation == KDOWN_IUP_JDOWN) {
+         back_shift(0) = shift(2);
+         back_shift(1) = -shift(0);
+         back_shift(2) = shift(1);
+      } else if (back_rotation == IUP_JDOWN_KDOWN) {
+         back_shift(0) = -shift(0);
+         back_shift(1) = shift(1);
+         back_shift(2) = shift(2);
+      } else if (back_rotation == JDOWN_IDOWN_KDOWN) {
+         back_shift(0) = shift(1);
+         back_shift(1) = shift(0);
+         back_shift(2) = shift(2);
+      } else if (back_rotation == KDOWN_JDOWN_IDOWN) {
+         back_shift(0) = shift(2);
+         back_shift(1) = shift(1);
+         back_shift(2) = shift(0);
+      } else if (back_rotation == IDOWN_KDOWN_JDOWN) {
+         back_shift(0) = shift(0);
+         back_shift(1) = shift(2);
+         back_shift(2) = shift(1);
+      } else {
+         TBOX_ERROR("MultiblockPatchHierarchy::calculateReverseShift error...\n"
+            << " Invalid RotationIdentifier value given" << std::endl);
+      }
+
+   }
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Set block to be the domain of translated_block in the index space of   *
+ * base_block.                                                            *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void
+MultiblockPatchHierarchy::getTranslatedBlock(
+   hier::BoxArray& block,
+   const int base_block,
+   const int translated_block)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, block);
+
+   for (tbox::List<Neighbor>::Iterator
+        ni(d_block_neighbors[base_block]); ni; ni++) {
+      if (ni().getBlockNumber() == translated_block) {
+         block = ni().getTranslatedDomain();
+         break;
+      }
+   }
+}
+
+MultiblockPatchHierarchy::RotationIdentifier
+MultiblockPatchHierarchy::getRotationIdentifier(
+   const tbox::Array<std::string>& rotation_string) const
+{
+   TBOX_ASSERT(rotation_string.getSize() == d_dim.getValue());
+
+   RotationIdentifier id = NO_ROTATE;
+   bool is_error = false;
+
+   if (d_dim.getValue() == 2) {
+      if (rotation_string[0] == "I_UP") {
+         if (rotation_string[1] == "J_UP") {
+            id = IUP_JUP; //0;
+         } else {
+            is_error = true;
+         }
+      } else if (rotation_string[0] == "I_DOWN") {
+         if (rotation_string[1] == "J_DOWN") {
+            id = IDOWN_JDOWN; //2;
+         } else {
+            is_error = true;
+         }
+      } else if (rotation_string[0] == "J_UP") {
+         if (rotation_string[1] == "I_DOWN") {
+            id = JUP_IDOWN; //1;
+         } else {
+            is_error = true;
+         }
+      } else if (rotation_string[0] == "J_DOWN") {
+         if (rotation_string[1] == "I_UP") {
+            id = JDOWN_IUP; //3;
+         } else {
+            is_error = true;
+         }
+      }
+      if (is_error) {
+         TBOX_ERROR("Rotation_input " << rotation_string[0] << " "
+            << rotation_string[1] << " "
+            << " is invalid.\n");
+      }
+
+   } else if (d_dim.getValue() == 3) {
+      if (rotation_string[0] == "I_UP") {
+         if (rotation_string[1] == "J_UP") {
+            if (rotation_string[2] == "K_UP") {
+               id = IUP_JUP_KUP; //0;
+            } else {
+               is_error = true;
+            }
+         } else if (rotation_string[1] == "J_DOWN") {
+            if (rotation_string[2] == "K_DOWN") {
+               id = IUP_JDOWN_KDOWN; //20;
+            } else {
+               is_error = true;
+            }
+         } else if (rotation_string[1] == "K_UP") {
+            if (rotation_string[2] == "J_DOWN") {
+               id = IUP_KUP_JDOWN; //13;
+            } else {
+               is_error = true;
+            }
+         } else if (rotation_string[1] == "K_DOWN") {
+            if (rotation_string[2] == "J_UP") {
+               id = IUP_KDOWN_JUP; //7;
+            } else {
+               is_error = true;
+            }
+         } else {
+            is_error = true;
+         }
+      } else if (rotation_string[0] == "I_DOWN") {
+         if (rotation_string[1] == "J_UP") {
+            if (rotation_string[2] == "K_DOWN") {
+               id = IDOWN_JUP_KDOWN; //10;
+            } else {
+               is_error = true;
+            }
+         } else if (rotation_string[1] == "J_DOWN") {
+            if (rotation_string[2] == "K_UP") {
+               id = IDOWN_JDOWN_KUP; //16;
+            } else {
+               is_error = true;
+            }
+         } else if (rotation_string[1] == "K_UP") {
+            if (rotation_string[2] == "J_UP") {
+               id = IDOWN_KUP_JUP; //3;
+            } else {
+               is_error = true;
+            }
+         } else if (rotation_string[1] == "K_DOWN") {
+            if (rotation_string[2] == "J_DOWN") {
+               id = IDOWN_KDOWN_JDOWN; //23;
+            } else {
+               is_error = true;
+            }
+         } else {
+            is_error = true;
+         }
+      } else if (rotation_string[0] == "J_UP") {
+         if (rotation_string[1] == "I_UP") {
+            if (rotation_string[2] == "K_DOWN") {
+               id = JUP_IUP_KDOWN; //8;
+            } else {
+               is_error = true;
+            }
+         } else if (rotation_string[1] == "I_DOWN") {
+            if (rotation_string[2] == "K_UP") {
+               id = JUP_IDOWN_KUP; //5;
+            } else {
+               is_error = true;
+            }
+         } else if (rotation_string[1] == "K_UP") {
+            if (rotation_string[2] == "I_UP") {
+               id = JUP_KUP_IUP; //2;
+            } else {
+               is_error = true;
+            }
+         } else if (rotation_string[1] == "K_DOWN") {
+            if (rotation_string[2] == "I_DOWN") {
+               id = JUP_KDOWN_IDOWN; //11;
+            } else {
+               is_error = true;
+            }
+         } else {
+            is_error = true;
+         }
+      } else if (rotation_string[0] == "J_DOWN") {
+         if (rotation_string[1] == "I_UP") {
+            if (rotation_string[2] == "K_UP") {
+               id = JDOWN_IUP_KUP; //12;
+            } else {
+               is_error = true;
+            }
+         } else if (rotation_string[1] == "I_DOWN") {
+            if (rotation_string[2] == "K_DOWN") {
+               id = JDOWN_IDOWN_KDOWN; //21;
+            } else {
+               is_error = true;
+            }
+         } else if (rotation_string[1] == "K_UP") {
+            if (rotation_string[2] == "I_DOWN") {
+               id = JDOWN_KUP_IDOWN; //15;
+            } else {
+               is_error = true;
+            }
+         } else if (rotation_string[1] == "K_DOWN") {
+            if (rotation_string[2] == "I_UP") {
+               id = JDOWN_KDOWN_IUP; //18;
+            } else {
+               is_error = true;
+            }
+         } else {
+            is_error = true;
+         }
+      } else if (rotation_string[0] == "K_UP") {
+         if (rotation_string[1] == "I_UP") {
+            if (rotation_string[2] == "J_UP") {
+               id = KUP_IUP_JUP; //1;
+            } else {
+               is_error = true;
+            }
+         } else if (rotation_string[1] == "I_DOWN") {
+            if (rotation_string[2] == "J_DOWN") {
+               id = KUP_IDOWN_JDOWN; //17;
+            } else {
+               is_error = true;
+            }
+         } else if (rotation_string[1] == "J_UP") {
+            if (rotation_string[2] == "I_DOWN") {
+               id = KUP_JUP_IDOWN; //4;
+            } else {
+               is_error = true;
+            }
+         } else if (rotation_string[1] == "J_DOWN") {
+            if (rotation_string[2] == "I_UP") {
+               id = KUP_JDOWN_IUP; //14;
+            } else {
+               is_error = true;
+            }
+         } else {
+            is_error = true;
+         }
+      } else if (rotation_string[0] == "K_DOWN") {
+         if (rotation_string[1] == "I_UP") {
+            if (rotation_string[2] == "J_DOWN") {
+               id = KDOWN_IUP_JDOWN; //19;
+            } else {
+               is_error = true;
+            }
+         } else if (rotation_string[1] == "I_DOWN") {
+            if (rotation_string[2] == "J_UP") {
+               id = KDOWN_IDOWN_JUP; //9;
+            } else {
+               is_error = true;
+            }
+         } else if (rotation_string[1] == "J_UP") {
+            if (rotation_string[2] == "I_UP") {
+               id = KDOWN_JUP_IUP; //6;
+            } else {
+               is_error = true;
+            }
+         } else if (rotation_string[1] == "J_DOWN") {
+            if (rotation_string[2] == "I_DOWN") {
+               id = KDOWN_JDOWN_IDOWN; //22;
+            } else {
+               is_error = true;
+            }
+         } else {
+            is_error = true;
+         }
+      } else {
+         is_error = true;
+      }
+
+      if (is_error) {
+         TBOX_ERROR("Rotation_input " << rotation_string[0] << " "
+            << rotation_string[1] << " " << rotation_string[2]
+            << " is invalid.\n");
+      }
+   } else {
+      TBOX_ERROR(
+         " MultiblockPatchHierarchy::RotationIdentifier : DIM = 1 or > 3 not implemented");
+   }
+
+   return id;
+}
+
+MultiblockPatchHierarchy::RotationIdentifier
+MultiblockPatchHierarchy::getReverseRotationIdentifier(
+   const RotationIdentifier rotation,
+   const tbox::Dimension& dim)
+{
+   RotationIdentifier reverse_id = (RotationIdentifier) 0;
+
+   if (dim.getValue() == 2) {
+      reverse_id = (RotationIdentifier) ((4 - (int)rotation)%4);
+   } else if (dim.getValue() == 3) {
+      switch (rotation) {
+
+         case IUP_JUP_KUP:
+            reverse_id = IUP_JUP_KUP;
+            break;
+
+         case KUP_IUP_JUP:
+            reverse_id = JUP_KUP_IUP;
+            break;
+
+         case JUP_KUP_IUP:
+            reverse_id = KUP_IUP_JUP;
+            break;
+
+         case IDOWN_KUP_JUP:
+            reverse_id = IDOWN_KUP_JUP;
+            break;
+
+         case KUP_JUP_IDOWN:
+            reverse_id = KDOWN_JUP_IUP;
+            break;
+
+         case JUP_IDOWN_KUP:
+            reverse_id = JDOWN_IUP_KUP;
+            break;
+
+         case KDOWN_JUP_IUP:
+            reverse_id = KUP_JUP_IDOWN;
+            break;
+
+         case IUP_KDOWN_JUP:
+            reverse_id = IUP_KUP_JDOWN;
+            break;
+
+         case JUP_IUP_KDOWN:
+            reverse_id = JUP_IUP_KDOWN;
+            break;
+
+         case KDOWN_IDOWN_JUP:
+            reverse_id = JDOWN_KUP_IDOWN;
+            break;
+
+         case IDOWN_JUP_KDOWN:
+            reverse_id = IDOWN_JUP_KDOWN;
+            break;
+
+         case JUP_KDOWN_IDOWN:
+            reverse_id = KDOWN_IUP_JDOWN;
+            break;
+
+         case JDOWN_IUP_KUP:
+            reverse_id = JUP_IDOWN_KUP;
+            break;
+
+         case IUP_KUP_JDOWN:
+            reverse_id = IUP_KDOWN_JUP;
+            break;
+
+         case KUP_JDOWN_IUP:
+            reverse_id = KUP_JDOWN_IUP;
+            break;
+
+         case JDOWN_KUP_IDOWN:
+            reverse_id = KDOWN_IDOWN_JUP;
+            break;
+
+         case IDOWN_JDOWN_KUP:
+            reverse_id = IDOWN_JDOWN_KUP;
+            break;
+
+         case KUP_IDOWN_JDOWN:
+            reverse_id = JDOWN_KDOWN_IUP;
+            break;
+
+         case JDOWN_KDOWN_IUP:
+            reverse_id = KUP_IDOWN_JDOWN;
+            break;
+
+         case KDOWN_IUP_JDOWN:
+            reverse_id = JUP_KDOWN_IDOWN;
+            break;
+
+         case IUP_JDOWN_KDOWN:
+            reverse_id = IUP_JDOWN_KDOWN;
+            break;
+
+         case JDOWN_IDOWN_KDOWN:
+            reverse_id = JDOWN_IDOWN_KDOWN;
+            break;
+
+         case KDOWN_JDOWN_IDOWN:
+            reverse_id = KDOWN_JDOWN_IDOWN;
+            break;
+
+         case IDOWN_KDOWN_JDOWN:
+            reverse_id = IDOWN_KDOWN_JDOWN;
+            break;
+
+         default:
+            TBOX_ERROR(
+            "MultiblockPatchHierarchy::getReverseRotationIdentifier error...\n"
+            << " Invalid RotationIdentifier value given" << std::endl);
+   
+            reverse_id = IUP_JUP_KUP;
+            break;
+      }
+   }
+
+   return reverse_id;
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Rotate and shift the boxes in the given array according to the         *
+ * rotation and shift that is used to translated the index space of       *
+ * translated_block into the index space of base_block.                   *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void
+MultiblockPatchHierarchy::translateBoxArray(
+   hier::BoxArray& boxes,
+   const hier::IntVector& ratio,
+   const int base_block,
+   const int translated_block)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*this, boxes, ratio);
+
+   for (tbox::List<Neighbor>::Iterator
+        ni(d_block_neighbors[base_block]); ni; ni++) {
+      if (ni().getBlockNumber() == translated_block) {
+         hier::IntVector refined_shift = (ni().getShift()) * (ratio);
+         boxes.rotate(ni().getRotationIdentifier());
+         boxes.shift(refined_shift);
+      }
+   }
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Return a multiblock level that represents all of the patch levels in   *
+ * the multiblock domain that have the given level number.                *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+tbox::Pointer<MultiblockPatchLevel>
+MultiblockPatchHierarchy::getMultiblockPatchLevel(
+   const int level_num) const
+{
+   tbox::Array<tbox::Pointer<hier::PatchLevel> >
+   level_array(d_number_blocks);
+
+   for (int b = 0; b < d_number_blocks; b++) {
+      if (d_hierarchies[b]->getNumberOfLevels() > level_num) {
+         level_array[b] = d_hierarchies[b]->getPatchLevel(level_num);
+      } else {
+         level_array[b].setNull();
+      }
+   }
+
+   tbox::Pointer<MultiblockPatchLevel> mb_level(
+      new MultiblockPatchLevel(d_dim, level_array));
+
+   return mb_level;
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Query to find if the two blocks represented by the integer identifiers *
+ * are neighbors.                                                         *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+bool MultiblockPatchHierarchy::areNeighbors(
+   const int a,
+   const int b)
+{
+   TBOX_ASSERT(a != b);
+
+   bool are_neighbors = false;
+   for (tbox::List<Neighbor>::Iterator
+        ni(d_block_neighbors[a]); ni; ni++) {
+      if (ni().getBlockNumber() == b) {
+         are_neighbors = true;
+         break;
+      }
+   }
+
+   return are_neighbors;
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Create trees representing the multiblock physical domain               *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void MultiblockPatchHierarchy::createDomainSearchTrees()
+{
+   d_domain_search_tree.resizeArray(d_number_blocks,
+                                    MappedBoxTree(d_dim));
+
+   if (d_number_blocks == 1) {
+      d_domain_search_tree[0] = d_hierarchies[0]->getDomainSearchTree();
+   } else {
+      for (int b = 0; b < d_number_blocks; b++) {
+         const hier::MappedBoxTree& block_domain_search_tree =
+            d_hierarchies[b]->getDomainSearchTree();
+
+         std::vector<MappedBox> block_domain_mapped_boxes;
+         block_domain_search_tree.getMappedBoxes(block_domain_mapped_boxes);
+
+         hier::BoxList domain_outside_block;
+         getDomainOutsideBlock(domain_outside_block, b);
+
+         std::vector<MappedBox> pseudo_domain_mapped_boxes;
+         pseudo_domain_mapped_boxes.reserve(block_domain_mapped_boxes.size() +
+                                            domain_outside_block.size());
+
+         LocalId max_local_id(-1);
+         for (std::vector<MappedBox>::const_iterator ni =
+              block_domain_mapped_boxes.begin();
+              ni != block_domain_mapped_boxes.end(); ++ni) {
+
+            if ( max_local_id < ni->getLocalId() ) {
+               max_local_id = ni->getLocalId();
+            }
+            pseudo_domain_mapped_boxes.push_back(*ni);
+         }
+
+         ++max_local_id; 
+         for (hier::BoxList::Iterator bi(domain_outside_block); bi; bi++) {
+            MappedBox new_box(*bi, ++max_local_id, 0);
+            pseudo_domain_mapped_boxes.push_back(new_box);
+         }
+
+         d_domain_search_tree[b].generateTree(pseudo_domain_mapped_boxes);
+      }
+   } 
+}
+
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Adjust all of the boundary boxes on the level so that they are         *
+ * multiblock-aware.                                                      *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void MultiblockPatchHierarchy::adjustMultiblockPatchLevelBoundaries(
+   tbox::Pointer<MultiblockPatchLevel> mb_level)
+{
+   TBOX_ASSERT(!mb_level.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *mb_level);
+   TBOX_ASSERT(mb_level->getNumberOfBlocks() == d_number_blocks);
+
+   for (int mb = 0; mb < d_number_blocks; mb++) {
+      tbox::Pointer<hier::PatchLevel> patch_level =
+         mb_level->getPatchLevelForBlock(mb);
+
+      if (!patch_level.isNull()) {
+
+         hier::IntVector gcw =
+            patch_level->getPatchDescriptor()->getMaxGhostWidth(d_dim);
+         hier::BoxList singularity(getSingularityBoxList(mb));
+
+         singularity.refine(mb_level->getRatioToLevelZero());
+
+         hier::BoxList pseudo_domain;
+
+         tbox::List<MultiblockPatchHierarchy::Neighbor> neighbors =
+            getNeighbors(mb);
+
+         for (tbox::List<Neighbor>::Iterator
+              nei(neighbors); nei; nei++) {
+            pseudo_domain.unionBoxes(hier::BoxList(nei().getTranslatedDomain()));
+         }
+
+         pseudo_domain.refine(patch_level->getRatioToLevelZero());
+
+         pseudo_domain.unionBoxes(hier::BoxList(patch_level->getPhysicalDomain()));
+         pseudo_domain.unionBoxes(singularity);
+
+         pseudo_domain.coalesceBoxes();
+
+         for (hier::PatchLevel::Iterator sp(patch_level);
+              sp; sp++) {
+            tbox::Pointer<hier::Patch> patch = *sp;
+
+            adjustBoundaryBoxesOnPatch(*patch,
+               patch_level->getGridGeometry(),
+               pseudo_domain,
+               gcw,
+               singularity);
+
+         }
+      }
+   }
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Adjust all of the boundary boxes on the patch so that they are         *
+ * multiblock-aware.                                                      *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void MultiblockPatchHierarchy::adjustBoundaryBoxesOnPatch(
+   const hier::Patch& patch,
+   const tbox::Pointer<hier::GridGeometry> grid_geometry,
+   const hier::BoxList& pseudo_domain,
+   const hier::IntVector& gcw,
+   const hier::BoxList& singularity)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*this, patch, *grid_geometry, gcw);
+
+   /*
+    * Avoid adjusting boundary boxes for the case where we just use
+    * a single block, since this is equivalent to not using multiblocks
+    * at all.
+    */
+   if (d_number_blocks > 1) {
+      PatchBoundaries boundaries(d_dim);
+
+      grid_geometry->getBoundaryBoxes(boundaries,
+         patch.getBox(),
+         hier::BoxArray(d_dim, pseudo_domain),
+         gcw,
+         hier::IntVector::getZero(d_dim));
+
+      tbox::Array<hier::BoundaryBox> codim_boundaries[tbox::Dimension::
+                                                      MAXIMUM_DIMENSION_VALUE];
+      tbox::List<int> boundaries_in_sing[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int codim = 2; codim <= d_dim.getValue(); codim++) {
+
+         codim_boundaries[codim - 1] =
+            patch.getPatchGeometry()->getCodimensionBoundaries(codim);
+
+         int num_boxes = codim_boundaries[codim - 1].size();
+
+         for (int n = 0; n < num_boxes; n++) {
+            hier::Box border_box(codim_boundaries[codim - 1][n].getBox());
+            hier::BoxList sing_test_list(singularity);
+            sing_test_list.intersectBoxes(border_box);
+            if (sing_test_list.size() != 0) {
+               boundaries_in_sing[codim - 1].addItem(n);
+            }
+         }
+      }
+
+      for (int i = 0; i < d_dim.getValue(); i++) {
+         if (boundaries_in_sing[i].size() != 0) {
+            int old_size = boundaries[i].size();
+            boundaries[i].resizeArray(old_size + boundaries_in_sing[i].size(),
+               hier::BoundaryBox(d_dim));
+            int nb = 0;
+            for (tbox::List<int>::Iterator b(boundaries_in_sing[i]); b; b++) {
+               boundaries[i][old_size + nb] = codim_boundaries[i][b()];
+               boundaries[i][old_size + nb].setIsMultiblockSingularity(true);
+               nb++;
+            }
+         }
+         patch.getPatchGeometry()->setCodimensionBoundaries(boundaries[i],
+            i + 1);
+      }
+
+   }
+
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Get a BoxList representing all of the domain outside the given block.  *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void
+MultiblockPatchHierarchy::getDomainOutsideBlock(
+   hier::BoxList& domain_outside_block,
+   const int block_number)
+{
+   for (tbox::List<Neighbor>::Iterator
+        nei(d_block_neighbors[block_number]); nei; nei++) {
+      domain_outside_block.unionBoxes(hier::BoxList(nei().getTranslatedDomain()));
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Writes out the class version number and the number of levels in the   *
+ * hierarchy and has each patch_level write itself out.                  *
+ * The database keys for the patch levels are given by                   *
+ * "level#" where # is the level number for the patch_level.             *
+ * The patchdata that are written to the database are determined by      *
+ * which those bits in the hier::VariableDatabase                   *
+ * d_patchdata_restart_table that are set.                               *
+ *                                                                       *
+ * Asserts that the database pointer passed in is not NULL.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MultiblockPatchHierarchy::putToDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   database->putInteger("MBLK_PATCH_HIERARCHY_VERSION",
+      MBLK_PATCH_HIERARCHY_VERSION);
+
+   for (int nb = 0; nb < d_number_blocks; nb++) {
+      std::string block_name = "block_" + tbox::Utilities::blockToString(nb);
+
+      tbox::Pointer<tbox::Database> block_database =
+         database->putDatabase(block_name);
+
+      d_hierarchies[nb]->putToDatabase(block_database);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Writes out the class version number and the number of levels in the   *
+ * hierarchy and has each patch_level write itself out.                  *
+ * The database keys for the patch levels are given by                   *
+ * "level#" where # is the level number for the patch_level.             *
+ * The patchdata that are written to the database are determined by      *
+ * which those bits in the specified hier::ComponentSelector that are     *
+ * set.                                                                  *
+ *                                                                       *
+ * Asserts that the database pointer passed in is not NULL.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MultiblockPatchHierarchy::putToDatabase(
+   tbox::Pointer<tbox::Database> database,
+   const hier::ComponentSelector& patchdata_write_table)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   database->putInteger("MBLK_PATCH_HIERARCHY_VERSION",
+      MBLK_PATCH_HIERARCHY_VERSION);
+
+   for (int nb = 0; nb < d_number_blocks; nb++) {
+      std::string block_name = "block_" + tbox::Utilities::blockToString(nb);
+
+      tbox::Pointer<tbox::Database> block_database =
+         database->putDatabase(block_name);
+
+      d_hierarchies[nb]->putToDatabase(block_database, patchdata_write_table);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Gets the database in the root database that corresponds to the object *
+ * name.  This method then checks the class version against restart      *
+ * file version.  If they match, it creates each hierarchy level and     *
+ * reads in the level data.   The number of levels read from restart is  *
+ * the minimum of the argument max levels and the number of levels in    *
+ * the restart file.                                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+void MultiblockPatchHierarchy::getFromRestart()
+{
+
+   tbox::Pointer<tbox::Database> restart_db =
+      tbox::RestartManager::getManager()->getRootDatabase();
+
+   tbox::Pointer<tbox::Database> database;
+
+   if (restart_db->isDatabase(d_object_name)) {
+      database = restart_db->getDatabase(d_object_name);
+   } else {
+      TBOX_ERROR("MultiblockPatchHierarchy::getFromRestart() error...\n"
+         << "   Restart database with name "
+         << d_object_name << " not found in restart file" << std::endl);
+   }
+
+   int ver = database->getInteger("MBLK_PATCH_HIERARCHY_VERSION");
+   if (ver != MBLK_PATCH_HIERARCHY_VERSION) {
+      TBOX_ERROR("MultiblockPatchHierarchy::getFromRestart error...\n"
+         << "  object name = " << d_object_name
+         << " : Restart file version different than class version" << std::endl);
+   }
+
+   for (int nb = 0; nb < d_number_blocks; nb++) {
+      std::string block_name = "block_" + tbox::Utilities::blockToString(nb);
+
+      tbox::Pointer<tbox::Database> block_database =
+         database->getDatabase(block_name);
+
+      d_hierarchies[nb]->getFromDatabase(
+         block_database,
+         hier::VariableDatabase::getDatabase()->getPatchDataRestartTable());
+   }
+}
+
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MultiblockPatchHierarchy.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MultiblockPatchHierarchy.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,225 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   multiblock patch hierarchy. 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Get a pointer to the specified heirarchy in the multiblock's array.    *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<hier::PatchHierarchy>&
+MultiblockPatchHierarchy::getHierarchy(
+   const int hiera_num)
+{
+   return d_hierarchies[hiera_num];
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Returns the number of blocks in the multiblock domain.                 *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+int MultiblockPatchHierarchy::getNumberOfBlocks() const
+{
+   return d_number_blocks;
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Returns the number of neighbors a specific block of the multiblock     *
+ * domain has.                                                            *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+int MultiblockPatchHierarchy::getNumberOfNeighbors(
+   const int block_number)
+{
+   return d_block_neighbors[block_number].getNumberOfItems();
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Return a list of Neighbor objects describing all of the neighbors      *
+ * of the block indicated by the block_number.                            *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+tbox::List<MultiblockPatchHierarchy::Neighbor>&
+MultiblockPatchHierarchy::getNeighbors(
+   const int block_number)
+{
+   return d_block_neighbors[block_number];
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Return a BoxList that describes all of the singularity points touched  *
+ * by the block indicated by block_number.                                *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+hier::BoxList&
+MultiblockPatchHierarchy::getSingularityBoxList(
+   const int block_number)
+{
+   return d_singularity[block_number];
+}
+
+SAMRAI_INLINE_KEYWORD
+int
+MultiblockPatchHierarchy::getMaxNumberOfLevels() const
+{
+   return d_hierarchies[0]->getMaxNumberOfLevels();
+}
+
+SAMRAI_INLINE_KEYWORD
+int MultiblockPatchHierarchy::getFinestLevelNumber() const
+{
+   int finest_level_number = -1;
+   for (int i = 0; i < d_number_blocks; i++) {
+      finest_level_number =
+         tbox::MathUtilities<int>::Max(finest_level_number,
+            d_hierarchies[i]->getFinestLevelNumber());
+   }
+
+   return finest_level_number;
+}
+
+SAMRAI_INLINE_KEYWORD
+int MultiblockPatchHierarchy::getNumberOfLevels() const
+{
+   return getFinestLevelNumber() + 1;
+}
+
+SAMRAI_INLINE_KEYWORD
+const IntVector &MultiblockPatchHierarchy::getRatioToCoarserLevel( int ln ) const
+{
+   // Note that all blocks are required to have the same ratio to coarser.
+   TBOX_ASSERT( ln > 0 && ln < d_hierarchies[0]->getMaxNumberOfLevels() );
+   return d_hierarchies[0]->getRatioToCoarserLevel(ln);
+}
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<hier::BasePatchLevel>
+MultiblockPatchHierarchy::getPatchLevel(
+   const int l) const
+{
+   tbox::Pointer<MultiblockPatchLevel> mlevel =
+      getMultiblockPatchLevel(l);
+   tbox::Pointer<hier::BasePatchLevel> level = mlevel;
+   return level;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool MultiblockPatchHierarchy::finerLevelExists(
+   const int l) const
+{
+   bool finer_level_exists = false;
+   for (int i = 0; i < d_number_blocks; i++) {
+      if (d_hierarchies[i]->finerLevelExists(l)) {
+         finer_level_exists = true;
+         break;
+      }
+   }
+
+   return finer_level_exists;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool
+MultiblockPatchHierarchy::reducedConnectivityExists(
+   const int block_number) const
+{
+   return d_reduced_connect[block_number];
+}
+
+SAMRAI_INLINE_KEYWORD
+bool MultiblockPatchHierarchy::levelExists(
+   const int ln) const
+{
+   bool level_exists = false;
+   for (int nb = 0; nb < d_number_blocks; nb++) {
+      if (d_hierarchies[nb]->levelExists(ln)) {
+         level_exists = true;
+         break;
+      }
+   }
+
+   return level_exists;
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::MappedBoxTree&
+MultiblockPatchHierarchy::getDomainSearchTree(const int block_number)
+{
+   return d_domain_search_tree[block_number];
+}
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Dimension& MultiblockPatchHierarchy::getDim() const
+{
+   return d_dim;
+}
+
+SAMRAI_INLINE_KEYWORD
+int MultiblockPatchHierarchy::Neighbor::getBlockNumber() const
+{
+   return d_block_number;
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::BoxArray&
+MultiblockPatchHierarchy::Neighbor::getTranslatedDomain() const
+{
+   return d_translated_domain;
+}
+
+SAMRAI_INLINE_KEYWORD
+MultiblockPatchHierarchy::RotationIdentifier
+MultiblockPatchHierarchy::Neighbor::getRotationIdentifier() const
+{
+   return d_rotation;
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::IntVector& MultiblockPatchHierarchy::Neighbor::getShift() const
+{
+   return d_shift;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool MultiblockPatchHierarchy::Neighbor::isSingularity() const
+{
+   return d_is_singularity;
+}
+
+
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MultiblockPatchHierarchy.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MultiblockPatchHierarchy.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,721 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   multiblock patch hierarchy 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_MultiblockPatchHierarchy
+#define included_hier_MultiblockPatchHierarchy
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/BasePatchHierarchy.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/MultiblockGridGeometry.h"
+#include "SAMRAI/hier/MultiblockPatchLevel.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/List.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief Class MultiblockPatchHierarchy manages an array of patch
+ * hierarchies that represent a multiblock domain, and describes the
+ * relationship between these hierarchies
+ *
+ * Each patch hierarchy contained in the array of patch hierarchies
+ * represents a logically rectangular block of a multiblock domain.  This
+ * class contains this array, and also contains information that describes
+ * the relationship between neighboring blocks.  It also contains
+ * information about the point or points of singularity that exist in the
+ * multiblock domain.
+ *
+ * Input keys and data types:
+ *
+ *   - @b num_blocks Number of blocks in the multiblock hierarchy.
+ *
+ *   - @b PatchHierarchy {
+ *           // This database is applied to the PatchHierarchy in
+ *           // each block.  See PatchHierarchy input documentation.
+ *           ...
+ *        }
+ *
+ * @see hier::BasePatchHierarchy
+ * @see hier::PatchHierarchy
+ * @see hier::MultiblockPatchLevel
+ * @see hier::PatchLevel
+ */
+
+class MultiblockPatchHierarchy:
+   public hier::BasePatchHierarchy
+{
+
+public:
+   /*!
+    * @brief Constructor for MultiblockPatchHierarchy.
+    *
+    * @param[in] object_name String identifier for database operations
+    * @param[in] input_db    Input Database
+    * @param[in] geometry    Defines level zero index space
+    * @param[in] register_for_restart  Boolean switch for restart registration
+    */
+   explicit MultiblockPatchHierarchy(
+      const std::string& object_name,
+      tbox::Pointer<tbox::Database> input_db,
+      tbox::Pointer<hier::MultiblockGridGeometry>& geometry,
+      const bool register_for_restart = true);
+
+   /*!
+    * @brief Destructor
+    */
+   ~MultiblockPatchHierarchy();
+
+   /*!
+    * @brief Get a pointer to a single patch hierarchy represented by
+    * the specified block number
+    *
+    * @return Pointer to the patch hierarchy for a block
+    *
+    * @param[in] block_num
+    */
+   tbox::Pointer<hier::PatchHierarchy>&
+   getHierarchy(
+      const int block_num);
+
+   /*!
+    * @brief Get a pointer to a MultiblockPatchLevel associated with the
+    * given level number.
+    *
+    * @return Pointer to a MultiblockPatchLevel
+    *
+    * @param[in] level_num
+    */
+   tbox::Pointer<MultiblockPatchLevel>
+   getMultiblockPatchLevel(
+      const int level_num) const;
+
+   /*!
+    * @brief Get a pointer to a BasePatchLevel at the given level number
+    * given level number.
+    *
+    * @return A pointer to an object of the virtual base class
+    * hier::BasePatchLevel.  The object being pointed to can be cast to
+    * MultiblockPatchLevel.
+    *
+    * @param[in] level_num
+    */
+   tbox::Pointer<hier::BasePatchLevel>
+   getPatchLevel(
+      const int level_num) const;
+
+   /*!
+    * @brief Adjust boundary data of a level to be consistent with the
+    * multiblock nature of the domain.
+    *
+    * On a MultiblockPatchHierarchy, each hier::PatchHierarchy will
+    * contain PatchLevels with patches that were constructed independent of
+    * any knowledge of the multiblock nature of the complete domain.  Thus
+    * the patches will contain boundary data that recognizes no difference
+    * between a physical domain boundary and a block boundary.  Calling this
+    * routine will adjust the boundary data on all patches in the given level
+    * such that the true boundaries of the domain are represented.
+    *
+    * @param[in,out] level Level where boundaries need to be adjusted.
+    */
+   void
+   adjustMultiblockPatchLevelBoundaries(
+      tbox::Pointer<MultiblockPatchLevel> level);
+
+   /*!
+    * @brief Returns the number of blocks in the multiblock domain.
+    *
+    * @return Number of blocks
+    */
+   int
+   getNumberOfBlocks() const;
+
+   /*!
+    * @brief Return the number of neighbors a specific block of the Multiblock
+    * domain has.
+    *
+    * A block is the neighbor of another block if the two blocks abut in
+    * any way, whether at a point, a 1D line, or a 2D plane.
+    *
+    * @return The number of neighbors
+    *
+    * @param[in] block_number
+    */
+   int
+   getNumberOfNeighbors(
+      const int block_number);
+
+   /*!
+    * @brief Enumerated type defining values representing the axis
+    * rotation between two neighboring blocks.
+    *
+    * The values of this type tell the rotation relationship between
+    * two blocks, which can be called block A and block B.  The symbols with
+    * two elements, such as IDOWN_JDOWN, are used in 2D hierarchies, and
+    * the symbols with three elements, such as JDOWN_IUP_KUP, are used in
+    * 3D hierarchies.
+    *
+    * Each element of a symbol tells describes the transformation of an
+    * axis from block A's index space to block B's index space.  The first
+    * element tells what axis in block B's index space is equivalent to the
+    * positive i direction in block A's index space, while the second does 
+    * the same for the positive j direction, and the third, if needed, does
+    * the same for the positive k direction.
+    *
+    * For example, the enumerated value KUP_IDOWN_JDOWN indicates that the
+    * positive i direction for block A is the positive k direction for block
+    * B, the positive j direction for block A is the negative i direction for
+    * block B, and the positive k direction for block A is the negative j
+    * direction for block B.
+    */
+   enum RotationIdentifier {
+      NO_ROTATE = 0,
+      IUP_JUP = 0,
+      JUP_IDOWN = 1,
+      IDOWN_JDOWN = 2,
+      JDOWN_IUP = 3,
+      IUP_JUP_KUP = 0,
+      KUP_IUP_JUP = 1,
+      JUP_KUP_IUP = 2,
+      IDOWN_KUP_JUP = 3,
+      KUP_JUP_IDOWN = 4,
+      JUP_IDOWN_KUP = 5,
+      KDOWN_JUP_IUP = 6,
+      IUP_KDOWN_JUP = 7,
+      JUP_IUP_KDOWN = 8,
+      KDOWN_IDOWN_JUP = 9,
+      IDOWN_JUP_KDOWN = 10,
+      JUP_KDOWN_IDOWN = 11,
+      JDOWN_IUP_KUP = 12,
+      IUP_KUP_JDOWN = 13,
+      KUP_JDOWN_IUP = 14,
+      JDOWN_KUP_IDOWN = 15,
+      IDOWN_JDOWN_KUP = 16,
+      KUP_IDOWN_JDOWN = 17,
+      JDOWN_KDOWN_IUP = 18,
+      KDOWN_IUP_JDOWN = 19,
+      IUP_JDOWN_KDOWN = 20,
+      JDOWN_IDOWN_KDOWN = 21,
+      KDOWN_JDOWN_IDOWN = 22,
+      IDOWN_KDOWN_JDOWN = 23
+   };
+
+   /*!
+    * @brief Class to represent the neighbor of a given block.
+    */
+   
+   class Neighbor
+   {
+public:
+      /*!
+       * @brief Constructor
+       *
+       * @param[in] block_number  The block number of the neighboring block
+       * @param[in] domain     The neighboring block's domain in the current
+       *                       block's index space
+       * @param[in] rotation   The rotation needed to align the axes of the
+       *                       neighboring index spaces
+       * @param[in] shift      The shift needed to shift the neighboring block
+       *                       to its correct position in the current index
+       *                       space.
+       * @param[in] is_singularity True if the current block and the 
+       *                           neighboring block abut at a reduced
+       *                           or enhanced connectivity singularity
+       */
+      Neighbor(
+         int block_number,
+         hier::BoxArray& domain,
+         const RotationIdentifier rotation,
+         const hier::IntVector& shift,
+         const bool is_singularity):
+         d_block_number(block_number),
+         d_translated_domain(domain),
+         d_rotation(rotation),
+         d_shift(shift),
+         d_is_singularity(is_singularity) {
+      }
+
+      /*!
+       * @brief Get the block number of the neighboring block.
+       */
+      int getBlockNumber() const;
+
+      /*!
+       * @brief Get the neighboring block's domain in the current block's
+       * index space.
+       */
+      const hier::BoxArray& getTranslatedDomain() const;
+
+      /*!
+       * @brief Get the rotation identifier for the neighbor relationship.
+       */
+      RotationIdentifier getRotationIdentifier() const;
+
+      /*!
+       * @brief Get the shift for the neighbor relationship.
+       */
+      const hier::IntVector& getShift() const;
+
+      /*!
+       * @brief Tell if the neighboring block touch each other at an
+       * enhanced connectivity singularity.
+       */
+      bool isSingularity() const;
+
+private:
+
+      /*!
+       * @brief The block number of the neighboring block
+       */
+      int d_block_number;
+
+      /*!
+       * @brief The neighboring block's domain in the current block's
+       * index space.
+       */
+      hier::BoxArray d_translated_domain;
+
+      /*!
+       * @brief The rotation needed to align the axes of the neighboring index
+       * spaces.
+       */
+      RotationIdentifier d_rotation;
+
+      /*!
+       * @brief The shift needed to shift the neighboring block to its
+       * correct position in the current index space.
+       */
+      hier::IntVector d_shift;
+
+      /*!
+       * True if the current block and the neighboring block abut at a
+       * reduced or enhanced connectivity singularity
+       */
+      bool d_is_singularity;
+
+   };
+
+   /*!
+    * @brief Return a list of Neighbor objects describing all of the neighbors
+    * of the block indicated by the block_number.
+    *
+    * @return The list of neighbors
+    *
+    * @param[in] block_number
+    */
+   tbox::List<Neighbor>&
+   getNeighbors(
+      const int block_number);
+
+   /*!
+    * @brief Return a BoxList that describes all of the singularities
+    * touched by the block indicated by block_number.
+    *
+    * @return For every singularity point the block touches, the BoxList will
+    * contain a single-cell box that lies just outside the block domain,
+    * touching the block only at the singularity point.  For line singularities,
+    * the BoxList will contain boxes of width 1 in all dimensions except one,
+    * lying outside the block's coarse-level domain and touching the domain
+    * only along the line of singularity.
+    *
+    * @param[io] block_number
+    */
+   hier::BoxList&
+   getSingularityBoxList(
+      const int block_number);
+
+   /*!
+    * @brief Get a box array that describes the coarse-level domain of the
+    * translated_block in terms of the index space of base_block.
+    *
+    * @param[out] block_boxes The coarse-level domain of the block 
+    *                         identified by translated_block, represented
+    *                         in the index space of the block identified by
+    *                         base_block
+    * @param[in] base_block  The block whose index space will be used for
+    *                        the output boxes
+    * @param[in] translated_block Integer identifier of another block whose
+    *                             domain will be represented in the index space
+    *                             of the base block
+    */
+   void
+   getTranslatedBlock(
+      hier::BoxArray& block_boxes,
+      const int base_block,
+      const int translated_block);
+
+   /*!
+    * @brief Modify boxes by rotating and shifting from the index space of
+    * the translated_block to the index space of the base_block at the
+    * resolution level defined by ratio_to_level_zero.
+    *
+    * @param[in,out] boxes The boxes will be translated from the
+    *                      translated_block index space to the base_block
+    *                      index space.
+    * @param[in] ratio_to_level_zero
+    * @param[in] base_block Integer identifier of the block whose index space
+    *                       will be represented in the boxes at output
+    * @param[in] translated_block Integer identifier of the block whose index
+    *                             space is represented in the boxes at input
+    */
+   void
+   translateBoxArray(
+      hier::BoxArray& boxes,
+      const hier::IntVector& ratio,
+      const int base_block,
+      const int translated_block);
+
+   /*!
+    * @brief static method to get a reverse rotation identifier
+    *
+    * A rotation identifier signifies a specific rotation of an index space.
+    * For each rotation there is another rotation that rotates in the exact
+    * opposite manner.  This routine returns the identifier of the reverse
+    * rotation corresponding to the given rotation.
+    *
+    * @return  The RotationIdentifier opposite the input parameter
+    *
+    * @param[in] rotation Rotation for which the reverse rotation is sought
+    * @param[in] dim      Dimension being used
+    */
+   static RotationIdentifier
+   getReverseRotationIdentifier(
+      const RotationIdentifier rotation,
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief static method to get a reverse shift.
+    *
+    * Given a rotation and shift that define the relationship between two
+    * neighboring blocks, get a reverse shift that, combined with the
+    * reverse rotation from getReverseRotationIdentifier, can be used
+    * to reverse the effect of the original rotation and shift.
+    * 
+    * @param[out] back_shift
+    * @param[in] shift
+    * @param[in] rotation
+    */
+   static void
+   calculateReverseShift(
+      hier::IntVector& back_shift,
+      const hier::IntVector& shift,
+      const RotationIdentifier rotation);
+
+   /*!
+    * @brief Return the maximum number of levels allowed on the hierarchy.
+    *
+    * @return maximum number of levels
+    */
+   int
+   getMaxNumberOfLevels() const;
+
+   /*!
+    * @brief Get finest level number existing in multiblock patch hierarchy
+    *
+    * @return finest level number
+    */
+   int
+   getFinestLevelNumber() const;
+
+   /*!
+    * @brief Return the number of levels that currently exist in the hierarchy.
+    *
+    * @return number of levels
+    */
+   int
+   getNumberOfLevels() const;
+
+   /*!
+    * @brief Get ratio between specified level and next coarser level
+    *
+    * @return Refinement ratio between level @c ln and level @c ln-1.
+    *
+    * @param[in] ln Level number
+    */
+   const IntVector &getRatioToCoarserLevel( int ln ) const;
+
+   /*!
+    * @brief Tell if a level finer than the given level exists in the
+    * hierarchy.
+    *
+    * @return True if there is any PatchLevel finer than the specified level.
+    *
+    * @param[in] ln Level number
+    */
+   bool
+   finerLevelExists(
+      const int ln) const;
+
+   /*!
+    * @brief Tell if a given level exists in the hierarchy.
+    *
+    * @return True if a PatchLevel exists on the specified level on any block.
+    *
+    * @param[in] ln Level number
+    */
+   bool
+   levelExists(
+      const int ln) const;
+
+   /*!
+    * @brief Get a BoxList that contains all of the index space of all other
+    * blocks in the multiblock domain.
+    *
+    * A BoxList will be constructed that contains the full set of the
+    * coarse level domains of all blocks except the one identified by
+    * block_number.  The domains will all be translated into the index space
+    * represented by block_number.
+    *
+    * @param[out] domain_outside_block
+    * @param[in] block_number
+    *
+    */
+   void
+   getDomainOutsideBlock(
+      hier::BoxList& domain_outside_block,
+      const int block_number);
+
+   /*!
+    * @brief Tell if block represented by block_number touches
+    * a reduced-connectivity singularity
+    *
+    * @return True if the block touches reduced connectivity singularity,
+    * false if not.
+    *
+    * @param[in] block_number
+    */
+   bool
+   reducedConnectivityExists(
+      const int block_number) const;
+
+   /*!
+    * @brief Get MappedBoxTree that represents the entire multiblock
+    * physical domain in the index space of the given block number.
+    *
+    * @return Search tree representing entire multiblock domain
+    *
+    * @param[in] block_number
+    */
+   const hier::MappedBoxTree&
+   getDomainSearchTree(const int block_number);
+
+   /*!
+    * @brief Writes the state of the PatchHierarchy object and the PatchLevels
+    * it contains to the database.
+    * 
+    * It should be noted that only those patch data which have been
+    * registered for restart with the VariableDatabase will be
+    * written to the database.  This method implements the pure virtual method
+    * in class tbox::Serializable class which is used by the RestartManager
+    * for writing the MultiblockPatchHierarchy to a restart file.
+    *
+    * When assertion checking is active, the database pointer must be
+    * non-null.
+    *
+    * @param[out] database
+    */
+   void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+   /*!
+    * @brief Writes the state of the MultiblockPatchHierarchy object and the
+    * PatchHierarchies it contains to the database.
+    *
+    * Only those patchdata corresponding to the set bits in the
+    * ComponentSelector are written to the specified database.
+    *
+    * When assertion checking is active, the database pointer must be
+    * non-null.
+    *
+    * @param[out] database
+    * @param[in] patchdata_write_table Specifies PatchData to write
+    */
+   void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> database,
+      const hier::ComponentSelector& patchdata_write_table);
+
+   /*!
+    * @brief Read in the entire hierarchy from the restart file.
+    *
+    * The database from which the restart data is read is determined by the
+    * object_name specified in the constructor.  An unrecoverable assertion
+    * will result if the database cannot be found in the restart file or the
+    * data in the restart file is erroneous.
+    *
+    * This method handles the memory allocation for each PatchLevel
+    * it reads in.
+    */
+   void
+   getFromRestart();
+
+   /*!
+    * @brief Return the dimension of this object.
+    *
+    * @return The dimension
+    */
+   const tbox::Dimension&
+   getDim() const;
+
+private:
+   /*!
+    * @brief Returns true if block a and block b are neighbors
+    *
+    * @return True if the blocks are neighbors
+    *
+    * @param[in] a  A block number 
+    * @param[in] b  A block number 
+    */
+   bool
+   areNeighbors(
+      const int a,
+      const int b);
+
+   /*!
+    * @brief Register a relationship between two neighboring blocks of a
+    * multiblock domain.
+    *
+    * @param[in] block_a         One block in the relationship
+    * @param[in] block_b         The other block
+    * @param[in] rotation_b_to_a The rotation that aligns block b's index space
+    *                            with block a's
+    * @param[in] shift_b_to_a    The post-rotation shift to move b into its
+    *                            correct location within a's index space
+    * @param[in] neighbor_type   The type (codimension) of the neighbor
+    *                            relationship
+    */
+   void
+   registerNeighbors(
+      int block_a,
+      int block_b,
+      RotationIdentifier rotation_b_to_a,
+      hier::IntVector& shift_b_to_a,
+      const int neighbor_type);
+
+   /*!
+    * @brief Map a string-based identifier of a rotation operation to a
+    * RotationIdentifier value.
+    *
+    * The rotation_string array must have each entry intended to be used
+    * to create a value of the enumerated type RotationIdentifier.
+    * For example, to create the value JUP_IDOWN_KUP, the strings in the
+    * array should be "J_UP", "I_DOWN", and "K_UP", in that order.  See
+    * See the comments for the RotationIdentifier definition for the
+    * explanation of the meaning of the RotationIdentifier values.
+    *
+    * An assertion failure will occur if the array length is not equal to
+    * the dimension of the hierarchy.  A run-time error will occur if the
+    * strings do not match the format needed to create a valid
+    * RotationIdentifier value.
+    *
+    * @return RotationIdentifier determined by the strings.
+    *
+    * @param[in] rotation_string
+    */
+   RotationIdentifier
+   getRotationIdentifier(
+      const tbox::Array<std::string>& rotation_string) const;
+
+   /*!
+    * @brief Adjust the BoundaryBoxes held by the Patch so that they take
+    * into account the full multiblock configuration.
+    *
+    * @param[in] patch
+    * @param[in] geometry
+    * @param[in] pseudo_domain The full multiblock domain represented as if
+    *            every block were in the index space where the patch exists
+    * @param[in] gcw         The maximum patch data ghost width
+    * @param[in] singularity BoxList obtained by getSingularityBoxList()
+    */
+   void
+   adjustBoundaryBoxesOnPatch(
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::GridGeometry> geometry,
+      const hier::BoxList& pseudo_domain,
+      const hier::IntVector& gcw,
+      const hier::BoxList& singularity);
+
+   /*!
+    * @brief Create a private MappedBoxTree for each of the blocks,
+    * representing the full multiblock domain in the index space of each block.
+    */
+   void createDomainSearchTrees();
+
+   /*!
+    * @brief Name of the object, used for identification in Databases
+    */ 
+   std::string d_object_name;
+
+   /*!
+    * @brief Dimension of the object
+    */
+   const tbox::Dimension d_dim;
+
+   /*!
+    * @brief Tells if registered for restart
+    */
+   bool d_registered_for_restart;
+
+   /*!
+    * @brief Number of blocks in the multiblock hierarchy.
+    */
+   int d_number_blocks;
+
+   /*!
+    * @brief Array of hierarchies that cover the full multiblock grid
+    */
+   tbox::Array<tbox::Pointer<hier::PatchHierarchy> > d_hierarchies;
+
+   /*!
+    * @brief Associated with each block is a list of Neighbors that
+    * it shares a block boundary with.
+    */
+   tbox::Array<tbox::List<Neighbor> > d_block_neighbors;
+
+   /*!
+    * @brief An array of BoxLists defining the singularities of a multiblock
+    * domain.  Each BoxList element defines the singularities that a single
+    * block touches.
+    */
+   tbox::Array<hier::BoxList> d_singularity;
+
+   /*!
+    * @brief Contains grid information for all blocksa
+    */
+   tbox::Pointer<hier::MultiblockGridGeometry> d_geometry;
+
+   /*!
+    * @brief Search tree array representing coarse-level domain on every block.
+    */
+   tbox::Array<hier::MappedBoxTree> d_domain_search_tree;
+
+   /*!
+    * @brief Tell whether each block touches a reduced-connectivity
+    * singularity.
+    */
+   tbox::Array<bool> d_reduced_connect;
+
+   static tbox::StartupShutdownManager::Handler
+   s_initialize_finalize_handler;
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/MultiblockPatchHierarchy.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MultiblockPatchLevel.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MultiblockPatchLevel.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,199 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Multiblock patch level 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_MultiblockPatchLevel_C
+#define included_hier_MultiblockPatchLevel_C
+
+#include "SAMRAI/hier/MultiblockPatchLevel.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/MultiblockPatchLevel.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor and destructor for multiblcok level.  The constructor     *
+ * simply initializes the d_levels data member.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+MultiblockPatchLevel::MultiblockPatchLevel(
+   tbox::Dimension dim,
+   tbox::Array<tbox::Pointer<hier::PatchLevel> >& levels):
+   d_dim(dim)
+{
+   d_levels = levels;
+   d_number_blocks = levels.getSize();
+}
+
+MultiblockPatchLevel::~MultiblockPatchLevel()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Allocate patch data for the given id                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MultiblockPatchLevel::allocatePatchData(
+   const int id,
+   const double timestamp)
+{
+   for (int i = 0; i < d_levels.getSize(); i++) {
+      if (!d_levels[i].isNull()) {
+         d_levels[i]->allocatePatchData(id, timestamp);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Allocate patch data for the given components                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MultiblockPatchLevel::allocatePatchData(
+   const hier::ComponentSelector& components,
+   const double timestamp)
+{
+   for (int i = 0; i < d_levels.getSize(); i++) {
+      if (!d_levels[i].isNull()) {
+         d_levels[i]->allocatePatchData(components, timestamp);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Deallocate patch data for the given id                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MultiblockPatchLevel::deallocatePatchData(
+   const int id)
+{
+   for (int i = 0; i < d_levels.getSize(); i++) {
+      if (!d_levels[i].isNull()) {
+         d_levels[i]->deallocatePatchData(id);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Deallocate patch data for the given components                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MultiblockPatchLevel::deallocatePatchData(
+   const hier::ComponentSelector& components)
+{
+   for (int i = 0; i < d_levels.getSize(); i++) {
+      if (!d_levels[i].isNull()) {
+         d_levels[i]->deallocatePatchData(components);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ * Check if the data associated with the id has been allocated
+ *
+ *************************************************************************
+ */
+
+bool MultiblockPatchLevel::checkAllocated(
+   const int id) const
+{
+   bool allocated = true;
+   for (int i = 0; i < d_levels.getSize(); i++) {
+      if (!d_levels[i].isNull() && !d_levels[i]->checkAllocated(id)) {
+         allocated = false;
+         break;
+      }
+   }
+
+   return allocated;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set simulation time                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MultiblockPatchLevel::setTime(
+   const double timestamp,
+   const int id)
+{
+   for (int i = 0; i < d_levels.getSize(); i++) {
+      if (!d_levels[i].isNull()) {
+         d_levels[i]->setTime(timestamp, id);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set simulation time                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MultiblockPatchLevel::setTime(
+   const double timestamp,
+   const hier::ComponentSelector& components)
+{
+   for (int i = 0; i < d_levels.getSize(); i++) {
+      if (!d_levels[i].isNull()) {
+         d_levels[i]->setTime(timestamp, components);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set simulation time                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MultiblockPatchLevel::setTime(
+   const double timestamp)
+{
+   for (int i = 0; i < d_levels.getSize(); i++) {
+      if (!d_levels[i].isNull()) {
+         d_levels[i]->setTime(timestamp);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MultiblockPatchLevel.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MultiblockPatchLevel.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Multiblock patch level 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Returns a single patch level from the block identified by the integer *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<hier::PatchLevel>
+MultiblockPatchLevel::getPatchLevelForBlock(
+   const int id) const
+{
+   return d_levels[id];
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Returns the number of blocks.                                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+int MultiblockPatchLevel::getNumberOfBlocks() const
+{
+   return d_number_blocks;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Returns level number.                                                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+int MultiblockPatchLevel::getLevelNumber() const
+{
+   int level_num = 0;
+   for (int i = 0; i < d_levels.getSize(); i++) {
+      if (!d_levels[i].isNull()) {
+         level_num = d_levels[i]->getLevelNumber();
+         break;
+      }
+   }
+   return level_num;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Get ratio to level zero                                               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+const hier::IntVector& MultiblockPatchLevel::getRatioToLevelZero() const
+{
+   int block_num = 0;
+   for (int i = 0; i < d_levels.getSize(); i++) {
+      if (!d_levels[i].isNull()) {
+         block_num = i;
+         break;
+      }
+   }
+
+   TBOX_ASSERT(!d_levels[block_num].isNull());
+
+   return d_levels[block_num]->getRatioToLevelZero();
+}
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Dimension& MultiblockPatchLevel::getDim() const
+{
+   return d_dim;
+}
+
+
+#if 0
+/*
+ *************************************************************************
+ *                                                                       *
+ * Backward compatible getPatch()                                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Pointer<Patch>&
+MultiblockPatchLevel::getPatch(
+   const tbox::Pointer<Patch>& patch_ptr) const
+{
+   return patch_ptr;
+}
+#endif
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MultiblockPatchLevel.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MultiblockPatchLevel.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,217 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Multiblock Patch Level 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_MultiblockPatchLevel
+#define included_hier_MultiblockPatchLevel
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/BasePatchLevel.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+
+namespace SAMRAI {
+namespace hier {
+
+class MultiblockPatchLevelIterator;
+
+/*!
+ * @brief Class MultiblockPatchLevel contains an array of
+ * hier::PatchLevel that contains all of the patch levels that have the
+ * same level of refinement in a multiblock domain.
+ *
+ * This class is an implementation of BasePatchLevel and is used when it is
+ * desired to operate on a particular level of resolution for all blocks
+ * in a multiblock AMR mesh.   
+ *
+ * @see hier::PatchLevel
+ * @see hier::MultiblockPatchHierarchy
+ */
+
+class MultiblockPatchLevel:
+   public hier::BasePatchLevel
+{
+
+public:
+   /*!
+    * @brief Constructor takes an array of pointers to patch levels.
+    *
+    * @param[in] dim  Dimension
+    * @param[in] levels The array indices correspond to block numbers.
+    *                   Pointers in the array may be null.  A null pointer  
+    *                   indicates that the MultiblockPatchLevel does not
+    *                   represent any space in the block associated with
+    *                   its array index.
+    */
+   explicit MultiblockPatchLevel(
+      tbox::Dimension dim,
+      tbox::Array<tbox::Pointer<hier::PatchLevel> >& levels);
+
+   /*!
+    * @brief Destructor
+    */
+   ~MultiblockPatchLevel();
+
+   /*!
+    * @brief Return a pointer to the hier::PatchLevel associated with the
+    * id number.
+    *
+    * @param[in] id corresponds to the indexing of the array passed into the
+    *               constructor.
+    */
+   tbox::Pointer<hier::PatchLevel>
+   getPatchLevelForBlock(
+      const int id) const;
+
+   /*!
+    * @brief Allocate the specified component on all patches.
+    *
+    * @param[in] id        A patch data id
+    * @param[in] timestamp Simulation time
+    */
+   void
+   allocatePatchData(
+      const int id,
+      const double timestamp = 0.0);
+
+   /*!
+    * @brief Allocate the specified components on all patches.
+    *
+    * @param[in] components Defines a set of patch data id's
+    * @param timestamp      Simulation time
+    */
+   void
+   allocatePatchData(
+      const hier::ComponentSelector& components,
+      const double timestamp = 0.0);
+
+   /*!
+    * @brief Deallocate the specified component on all patches
+    *
+    * @param[in] id Patch data id of data to be deallocated
+    */
+   void
+   deallocatePatchData(
+      const int id);
+
+   /*!
+    * @brief Deallocate the specified components on all patches
+    *
+    * @param[in] components Defines a set of patch data id's
+    */
+   void
+   deallocatePatchData(
+      const hier::ComponentSelector& components);
+
+   /*!
+    * @brief Check whether the specified patch data index has been allocated.
+    *
+    * @return True if there are no patches on this level for any block, or
+    *         if all of the patches have allocated the patch data component.
+    *         False for all other cases.
+    *
+    * @param[in]  id  Patch data id
+    */
+   bool
+   checkAllocated(
+      const int id) const;
+
+   /*!
+    * @brief Set the simulation time for the specified patch component.
+    *
+    * @param[in] timestamp Simulation time
+    * @param[in] id        A patch data id
+    */
+   void
+   setTime(
+      const double timestamp,
+      const int id);
+
+   /*!
+    * @brief Set the simulation time for the specified patch components.
+    *
+    * @param[in] timestamp  Simulation time
+    * @param[in] components Defines a set of patch data id's
+    */
+   void
+   setTime(
+      const double timestamp,
+      const hier::ComponentSelector& components);
+
+   /*!
+    * @brief Set the simulation time for all allocated patch components.
+    *
+    * @param[in] timestamp Simulation time
+    */
+   void
+   setTime(
+      const double timestamp);
+
+   /*!
+    * @brief Get the number of blocks in the multiblock domain
+    *
+    * @return Number of blocks
+    */
+   int
+   getNumberOfBlocks() const;
+
+   /*!
+    * @brief Get the level number of this level
+    *
+    * @return Level number
+    */
+   int
+   getLevelNumber() const;
+
+   /*!
+    * @brief Get the ratio to level zero of this level
+    *
+    * @return Ratio to level zero
+    */
+   const hier::IntVector&
+   getRatioToLevelZero() const;
+
+   /*!
+    * @brief Get the dimension of this object.
+    *
+    * @return the dimension of this object.
+    */
+   const tbox::Dimension&
+   getDim() const;
+
+   typedef MultiblockPatchLevelIterator Iterator;
+
+private:
+   /*!
+    * @brief Array of PatchLevels at a single level of resolution within
+    * a multiblock hierarchy.
+    */
+   tbox::Array<tbox::Pointer<hier::PatchLevel> > d_levels;
+
+   /*!
+    * Number of blocks in the multiblock domain
+    */
+   int d_number_blocks;
+
+   /*!
+    * @brief Dimension of the object
+    */
+   const tbox::Dimension d_dim;
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/MultiblockPatchLevel.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MultiblockPatchLevelIterator.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MultiblockPatchLevelIterator.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,187 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A multiblock patch level iterator 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_MultiblockPatchLevelIterator_C
+#define included_hier_MultiblockPatchLevelIterator_C
+
+#include "SAMRAI/hier/MultiblockPatchLevelIterator.h"
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/MultiblockPatchLevelIterator.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+ * ************************************************************************
+ *
+ * Create the patch level iterator and advance through the patches on a
+ * MultiblockLevel.  The iterator will always point to a valid patch or
+ * it will be at the end of the patch list.  The iterator will only point
+ * to patches that are local to the processor.
+ *
+ * ************************************************************************
+ */
+
+MultiblockPatchLevelIterator::MultiblockPatchLevelIterator(
+   const MultiblockPatchLevel& pl):
+   d_patch_level(pl.getNumberOfBlocks()),
+   d_block_num(0),
+   d_num_blocks(pl.getNumberOfBlocks())
+{
+   d_patch_level_iterator.resizeArray(d_num_blocks);
+   d_empty_block.resizeArray(d_num_blocks);
+   for (int i = 0; i < d_num_blocks; i++) {
+      tbox::Pointer<PatchLevel> patch_level(pl.getPatchLevelForBlock(i));
+      if (patch_level.isNull()) {
+         d_empty_block[i] = true;
+         d_patch_level[i].setNull();
+      } else {
+         d_empty_block[i] = false;
+         d_patch_level_iterator[i].initialize(*patch_level);
+         d_patch_level[i] = patch_level;
+      }
+   }
+   while (d_block_num < d_num_blocks &&
+          (d_empty_block[d_block_num] ||
+           !d_patch_level_iterator[d_block_num])) {
+      ++d_block_num;
+   }
+}
+
+/*
+ * ************************************************************************
+ *
+ * Same as above, only taking a pointer rather than a reference argument.
+ *
+ * ************************************************************************
+ */
+
+MultiblockPatchLevelIterator::MultiblockPatchLevelIterator(
+   const MultiblockPatchLevel* pl):
+   d_patch_level(pl->getNumberOfBlocks()),
+   d_block_num(0),
+   d_num_blocks(pl->getNumberOfBlocks())
+{
+   d_patch_level_iterator.resizeArray(d_num_blocks);
+   d_empty_block.resizeArray(d_num_blocks);
+   for (int i = 0; i < d_num_blocks; i++) {
+      tbox::Pointer<PatchLevel> patch_level(pl->getPatchLevelForBlock(i));
+      if (patch_level.isNull()) {
+         d_empty_block[i] = true;
+         d_patch_level[i].setNull();
+      } else {
+         d_empty_block[i] = false;
+         d_patch_level_iterator[i].initialize(*patch_level);
+         d_patch_level[i] = patch_level;
+      }
+   }
+
+   while (d_block_num < d_num_blocks &&
+          (d_empty_block[d_block_num] ||
+           !d_patch_level_iterator[d_block_num])) {
+      ++d_block_num;
+   }
+}
+
+/*
+ * ************************************************************************
+ *
+ * Initialize the patch level iterator when it was already constructed by
+ * the default constructor.
+ *
+ * ************************************************************************
+ */
+
+void MultiblockPatchLevelIterator::initialize(
+   const MultiblockPatchLevel& pl)
+{
+   d_block_num = 0;
+   d_num_blocks = pl.getNumberOfBlocks();
+
+   d_patch_level.resizeArray(d_num_blocks);
+   d_patch_level_iterator.resizeArray(d_num_blocks);
+   d_empty_block.resizeArray(d_num_blocks);
+   for (int i = 0; i < d_num_blocks; i++) {
+      tbox::Pointer<PatchLevel> patch_level(pl.getPatchLevelForBlock(i));
+      if (patch_level.isNull()) {
+         d_empty_block[i] = true;
+         d_patch_level[i].setNull();
+      } else {
+         d_empty_block[i] = false;
+         d_patch_level_iterator[i].initialize(*patch_level);
+         d_patch_level[i] = patch_level;
+      }
+   }
+   while (d_block_num < d_num_blocks &&
+          (d_empty_block[d_block_num] ||
+           !d_patch_level_iterator[d_block_num])) {
+      ++d_block_num;
+   }
+
+}
+
+/*
+ * ************************************************************************
+ *
+ * Same as above, only taking a pointer rather than a reference argument.
+ *
+ * ************************************************************************
+ */
+
+void MultiblockPatchLevelIterator::initialize(
+   const MultiblockPatchLevel* pl)
+{
+   d_block_num = 0;
+   d_num_blocks = pl->getNumberOfBlocks();
+
+   d_patch_level.resizeArray(d_num_blocks);
+   d_patch_level_iterator.resizeArray(d_num_blocks);
+   d_empty_block.resizeArray(d_num_blocks);
+   for (int i = 0; i < d_num_blocks; i++) {
+      tbox::Pointer<PatchLevel> patch_level(pl->getPatchLevelForBlock(i));
+      if (patch_level.isNull()) {
+         d_empty_block[i] = true;
+         d_patch_level[i].setNull();
+      } else {
+         d_empty_block[i] = false;
+         d_patch_level_iterator[i].initialize(*patch_level);
+         d_patch_level[i] = patch_level;
+      }
+   }
+   while (d_block_num < d_num_blocks &&
+          (d_empty_block[d_block_num] ||
+           !d_patch_level_iterator[d_block_num])) {
+      ++d_block_num;
+   }
+
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MultiblockPatchLevelIterator.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MultiblockPatchLevelIterator.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,174 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A multiblock patch level iterator 
+ *
+ ************************************************************************/
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+MultiblockPatchLevelIterator::MultiblockPatchLevelIterator():
+   d_patch_level(0),
+   d_patch_level_iterator(0),
+   d_empty_block(0),
+   d_block_num(0),
+   d_num_blocks(0)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+MultiblockPatchLevelIterator::MultiblockPatchLevelIterator(
+   const MultiblockPatchLevelIterator& iter):
+   d_patch_level(iter.d_patch_level),
+   d_patch_level_iterator(0),
+   d_empty_block(0),
+   d_block_num(iter.d_block_num),
+   d_num_blocks(iter.d_num_blocks)
+{
+   TBOX_ASSERT(d_num_blocks == d_patch_level.size());
+   d_patch_level_iterator.resizeArray(d_num_blocks);
+   d_empty_block.resizeArray(d_num_blocks);
+
+   for (int i = 0; i < d_num_blocks; i++) {
+      d_patch_level_iterator[i] = iter.d_patch_level_iterator[i];
+      d_empty_block[i] = iter.d_empty_block[i];
+   }
+
+   while (d_block_num < d_num_blocks &&
+          (d_empty_block[d_block_num] ||
+           !d_patch_level_iterator[d_block_num])) {
+      ++d_block_num;
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+MultiblockPatchLevelIterator&
+MultiblockPatchLevelIterator::operator = (
+   const MultiblockPatchLevelIterator& iter)
+{
+   d_patch_level = iter.d_patch_level;
+   d_patch_level_iterator.resizeArray(iter.d_num_blocks);
+   d_empty_block.resizeArray(iter.d_num_blocks);
+   d_block_num = iter.d_block_num;
+   d_num_blocks = iter.d_num_blocks;
+
+   for (int i = 0; i < d_num_blocks; i++) {
+      d_patch_level_iterator[i] = iter.d_patch_level_iterator[i];
+      d_empty_block[i] = iter.d_empty_block[i];
+   }
+
+   while (d_block_num < d_num_blocks &&
+          (d_empty_block[d_block_num] ||
+           !d_patch_level_iterator[d_block_num])) {
+      ++d_block_num;
+   }
+
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+MultiblockPatchLevelIterator::~MultiblockPatchLevelIterator()
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<hier::Patch>
+MultiblockPatchLevelIterator::operator * () const
+{
+   TBOX_ASSERT(!d_empty_block[d_block_num]);
+
+   return *(d_patch_level_iterator[d_block_num]);
+}
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<hier::Patch>
+MultiblockPatchLevelIterator::operator () () const
+{
+   TBOX_ASSERT(!d_empty_block[d_block_num]);
+
+   return d_patch_level_iterator[d_block_num]();
+}
+
+SAMRAI_INLINE_KEYWORD
+MultiblockPatchLevelIterator::operator bool () const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_block_num < d_num_blocks) {
+      TBOX_ASSERT(!d_empty_block[d_block_num]);
+   }
+#endif
+
+   return d_block_num != d_num_blocks;
+}
+
+SAMRAI_INLINE_KEYWORD
+void MultiblockPatchLevelIterator::operator ++ (
+   int)
+{
+   d_patch_level_iterator[d_block_num]++;
+
+   while (d_block_num < d_num_blocks &&
+          (d_empty_block[d_block_num] ||
+           !d_patch_level_iterator[d_block_num])) {
+      ++d_block_num;
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+bool MultiblockPatchLevelIterator::operator == (
+   const MultiblockPatchLevelIterator& iter) const
+{
+   bool return_val = true;
+
+   if (d_block_num != iter.d_block_num || d_num_blocks != iter.d_num_blocks ||
+       d_empty_block[d_block_num] != iter.d_empty_block[d_block_num]) {
+      return_val = false;
+   }
+   if (return_val) {
+      if (!d_empty_block[d_block_num]) {
+         if (d_patch_level_iterator[d_block_num] !=
+             iter.d_patch_level_iterator[d_block_num]) {
+            return_val = false;
+         }
+      }
+   }
+
+   return return_val;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool MultiblockPatchLevelIterator::operator != (
+   const MultiblockPatchLevelIterator& iter) const
+{
+   return !(operator == (iter));
+}
+
+SAMRAI_INLINE_KEYWORD
+int MultiblockPatchLevelIterator::getBlockNumber() const
+{
+   return d_block_num;
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/MultiblockPatchLevelIterator.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/MultiblockPatchLevelIterator.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,149 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A multiblock patch level Iterator 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_MultiblockPatchLevelIterator
+#define included_hier_MultiblockPatchLevelIterator
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/MultiblockPatchLevel.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * Class MultiblockPatchLevelIterator iterates over the locally owned patches
+ * of a multiblock patch level.
+ *
+ * @see hier::PatchLevel
+ * @see hier::MultiblockPatchLevel
+ */
+
+class MultiblockPatchLevelIterator
+{
+public:
+   /*!
+    * Default constructor for the patch iterator.  This iterator must be
+    * initialized before it can be used to iterate over the patches.
+    *
+    * @see initialize()
+    */
+   MultiblockPatchLevelIterator();
+
+   /*!
+    * Constructor for the patch level iterator.
+    */
+   MultiblockPatchLevelIterator(
+      const MultiblockPatchLevel& pl);
+
+   /*!
+    * Constructor for the patch level iterator.
+    */
+   MultiblockPatchLevelIterator(
+      const MultiblockPatchLevel* pl);
+
+   /*!
+    * Const copy constructor for the iterator.
+    */
+   MultiblockPatchLevelIterator(
+      const MultiblockPatchLevelIterator& iterator);
+
+   /*!
+    * Initializer for the patch level iterator.  If an iterator was constructed
+    * with the default constructor, initialize() must be called to give the
+    * iterator its associated level.
+    */
+   void
+   initialize(
+      const MultiblockPatchLevel& pl);
+
+   /*!
+    * Initializer for the patch level iterator.  If an iterator was constructed
+    * with the default constructor, initialize() must be called to give the
+    * iterator its associated level.
+    */
+   void
+   initialize(
+      const MultiblockPatchLevel* pl);
+
+   /*!
+    * Assignment operator for the iterator.
+    */
+   MultiblockPatchLevelIterator&
+   operator = (
+      const MultiblockPatchLevelIterator& iterator);
+
+   /*!
+    * Destructor for the patch level iterator.
+    */
+   ~MultiblockPatchLevelIterator();
+
+   /*!
+    * Get the number of the block on which the current patch is located.
+    */
+   int
+   getBlockNumber() const;
+
+   /*!
+    * Dereference operator
+    */
+   tbox::Pointer<hier::Patch>
+   operator * () const;
+
+   /*!
+    * Alternative dereference operator
+    */
+   tbox::Pointer<hier::Patch>
+   operator () () const;
+
+   /*!
+    * Return true if the iterator points to a valid patch on the level.
+    */
+   operator bool () const;
+
+   /*!
+    * Increment the iterator to point to the next patch in the level.
+    */
+   void
+   operator ++ (
+      int);
+
+   /*!
+    * Test whether two patch level iterators point to the same patch index.
+    */
+   bool
+   operator == (
+      const MultiblockPatchLevelIterator& iterator) const;
+
+   /*!
+    * Test whether two patch level iterators point to different patch indices.
+    */
+   bool
+   operator != (
+      const MultiblockPatchLevelIterator& iterator) const;
+
+private:
+   tbox::Array<tbox::Pointer<hier::PatchLevel> > d_patch_level;
+
+   tbox::Array<PatchLevel::Iterator> d_patch_level_iterator;
+   tbox::Array<bool> d_empty_block;
+   int d_block_num;
+   int d_num_blocks;
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/MultiblockPatchLevelIterator.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/NeighborhoodSet.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/NeighborhoodSet.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,219 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Extension of a std 
+ *
+ ************************************************************************/
+#ifndef included_hier_NeighborhoodSet_C
+#define included_hier_NeighborhoodSet_C
+
+#include "SAMRAI/hier/NeighborhoodSet.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/NeighborhoodSet.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+#define HIER_EDGE_SET_VERSION (0)
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+/*
+ ***********************************************************************
+ * Find all the MappedBoxes corresponding to a given rank as a range in
+ * the container.
+ ***********************************************************************
+ */
+NeighborhoodSet::Range
+NeighborhoodSet::findRanksRange(
+   int rank)
+{
+   Range rval(d_map.end(), d_map.end());
+   if (!d_map.empty()) {
+      /*
+       * start_key is an iterator pointing to the first MappedBox in
+       * the range.  stop_key is an iterator pointing just past the
+       * last MappedBox in the range.
+       */
+      GlobalId start_key(LocalId::getZero(), rank);
+      rval.first = d_map.lower_bound(start_key);
+      GlobalId stop_key(LocalId::getZero(), rank + 1);
+      rval.second = d_map.lower_bound(stop_key);
+   }
+   return rval;
+}
+
+/*
+ ***********************************************************************
+ * Find all the MappedBoxes corresponding to a given rank as a range in
+ * the container.
+ ***********************************************************************
+ */
+NeighborhoodSet::ConstRange
+NeighborhoodSet::findRanksRange(
+   int rank) const
+{
+   ConstRange rval(d_map.end(), d_map.end());
+   if (!d_map.empty()) {
+      /*
+       * start_key is an iterator pointing to the first MappedBox in
+       * the range.  stop_key is an iterator pointing just past the
+       * last MappedBox in the range.
+       */
+      GlobalId start_key(LocalId::getZero(), rank);
+      rval.first = d_map.lower_bound(start_key);
+      GlobalId stop_key(LocalId::getZero(), rank + 1);
+      rval.second = d_map.lower_bound(stop_key);
+   }
+   return rval;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+bool NeighborhoodSet::isLocallyEqual(
+   const NeighborhoodSet& r,
+   int rank) const
+{
+   if (this == &r) return true;
+
+   ConstRange irange = findRanksRange(rank);
+   ConstRange jrange = r.findRanksRange(rank);
+   while (irange.first != irange.second && jrange.first != jrange.second) {
+      if (*irange.first != *jrange.first) {
+         return false;
+      }
+      ++irange.first;
+      ++jrange.first;
+   }
+   if (irange.first != irange.second || jrange.first != jrange.second) {
+      // local count in this is different from local count in r.
+      return false;
+   }
+   return true;
+}
+
+/*
+ ***********************************************************************
+ * Write the NeighborhoodSet to a database.
+ ***********************************************************************
+ */
+
+void NeighborhoodSet::putToDatabase(
+   tbox::Database& database) const
+{
+   // This appears to be used in the RedistributedRestartUtility.
+   database.putBool("d_is_edge_set", true);
+
+   database.putInteger(
+      "HIER_EDGE_SET_VERSION", HIER_EDGE_SET_VERSION);
+   database.putInteger("number_of_sets", size());
+
+   if (!empty()) {
+
+      std::vector<int> local_indices;
+      std::vector<int> owners;
+      local_indices.reserve(size());
+      owners.reserve(size());
+      for (const_iterator ei = begin(); ei != end(); ++ei) {
+         local_indices.push_back(ei->first.getLocalId().getValue());
+         owners.push_back(ei->first.getOwnerRank());
+      }
+
+      database.putIntegerArray("local_indices", &local_indices[0], size());
+      database.putIntegerArray("owners", &owners[0], size());
+
+      for (const_iterator ei = begin(); ei != end(); ++ei) {
+         const GlobalId& gid = ei->first;
+         const MappedBoxSet& mapped_boxes = ei->second;
+         const std::string set_name =
+            "set_for_local_id_" + tbox::Utilities::patchToString(
+               gid.getLocalId().getValue());
+         mapped_boxes.putToDatabase(*database.putDatabase(set_name));
+      }
+
+   }
+}
+
+/*
+ ***********************************************************************
+ * Read the NeighborhoodSet from a database.
+ ***********************************************************************
+ */
+
+void NeighborhoodSet::getFromDatabase(
+   tbox::Database& database)
+{
+   const unsigned int number_of_sets = database.getInteger("number_of_sets");
+   if (number_of_sets > 0) {
+
+      std::vector<int> local_indices(number_of_sets);
+      std::vector<int> owners(number_of_sets);
+      database.getIntegerArray("local_indices",
+         &local_indices[0],
+         number_of_sets);
+      database.getIntegerArray("owners", &owners[0], number_of_sets);
+
+      std::pair<GlobalId, MappedBoxSet> tmp_pair;
+      for (size_t i = 0; i < number_of_sets; ++i) {
+         tmp_pair.first.getLocalId() = local_indices[i];
+         tmp_pair.first.getOwnerRank() = owners[i];
+         const std::string set_name =
+            "set_for_local_id_"
+            + tbox::Utilities::patchToString(local_indices[i]);
+         iterator mi = insert(end(), tmp_pair);
+         mi->second.getFromDatabase(*database.getDatabase(set_name));
+      }
+
+   }
+}
+
+/*
+ ***********************************************************************
+ * Avoid communication in this method.  It is often used for debugging.
+ * Print out global bounding box only if it has been computed already.
+ ***********************************************************************
+ */
+
+void NeighborhoodSet::recursivePrint(
+   std::ostream& co,
+   const std::string& border,
+   int detail_depth) const
+{
+   const std::string indented_border = border + "  ";
+   for (NeighborhoodSet::const_iterator ei = begin(); ei != end(); ++ei) {
+      const GlobalId& gid = ei->first;
+      const MappedBoxSet& nabrs = ei->second;
+      co << border << "  " << gid << "\n";
+      co << border << "    Neighbors (" << nabrs.size() << "):\n";
+      if (detail_depth > 1) {
+         nabrs.recursivePrint(co, indented_border, detail_depth - 1);
+      }
+   }
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/NeighborhoodSet.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/NeighborhoodSet.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,63 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Extension of a std 
+ *
+ ************************************************************************/
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+NeighborhoodSet::NeighborhoodSet():
+   d_map()
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+NeighborhoodSet::NeighborhoodSet(
+   const NeighborhoodSet& r):
+   d_map(r.d_map)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+NeighborhoodSet::~NeighborhoodSet()
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+NeighborhoodSet& NeighborhoodSet::operator = (
+   const NeighborhoodSet& r)
+{
+   d_map = r.d_map;
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool NeighborhoodSet::operator == (
+   const NeighborhoodSet& r) const
+{
+   return d_map == r.d_map;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool NeighborhoodSet::operator != (
+   const NeighborhoodSet& r) const
+{
+   return d_map != r.d_map;
+}
+
+SAMRAI_INLINE_KEYWORD
+void NeighborhoodSet::swap(
+   NeighborhoodSet& r)
+{
+   d_map.swap(r.d_map);
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/NeighborhoodSet.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/NeighborhoodSet.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,304 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Extension of a std 
+ *
+ ************************************************************************/
+#ifndef included_hier_NeighborhoodSet
+#define included_hier_NeighborhoodSet
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/GlobalId.h"
+#include "SAMRAI/hier/MappedBoxSet.h"
+#include "SAMRAI/tbox/Database.h"
+
+#include <iostream>
+#include <map>
+#include <string>
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief A wrapper around std::map<GlobalId,MappedBoxSet>.
+ *
+ * A neighborhood is defined as a MappedBox and its "neighbors" which
+ * are related to it via Connector relationships.  For example, 
+ * a NeighborhoodSet is used to group the set of MappedBox neighbors 
+ * for each GlobalId (corresponding to a MappedBox).
+ *
+ * This is little more than a dumb container of neighbor data
+ * with a few additional "features" such as:
+ * - Database reading/writing
+ * - printing
+ *
+ * The NeighborhoodSet @c m maps a GlobalId @c i to a set of MappedBoxes @c
+ * m[i], usually its "neighbors".  (The neighbor are tored in a
+ * MappedBoxSet.)
+ */
+
+class NeighborhoodSet
+{
+
+public:
+
+   //! @brief Default constructor creates an empty container.
+   NeighborhoodSet();
+
+   /*!
+    * @brief Copy constructor.
+    *
+    * @param[in] other
+    */
+   NeighborhoodSet(
+      const NeighborhoodSet& other);
+
+   //! @brief Destructor.
+   virtual ~NeighborhoodSet(
+      void);
+
+
+   //@{
+
+   //! @name Types defined by std::map.
+
+   typedef std::map<GlobalId, MappedBoxSet>::iterator iterator;
+   typedef std::map<GlobalId, MappedBoxSet>::const_iterator const_iterator;
+   typedef std::map<GlobalId, MappedBoxSet>::reverse_iterator reverse_iterator;
+   typedef std::map<GlobalId, MappedBoxSet>::key_type key_type;
+   typedef std::map<GlobalId, MappedBoxSet>::value_type value_type;
+   typedef std::map<GlobalId, MappedBoxSet>::size_type size_type;
+
+   //@}
+
+
+   //@{
+
+   //! @name Map-like interfaces: see STL map documentation.
+
+   /*
+    * This is just a subset of the map interface.  Add more as needed.
+    * These methods just pass the call off to d_map.
+    */
+
+   iterator begin() {
+      return d_map.begin();
+   }
+
+   iterator end() {
+      return d_map.end();
+   }
+
+   const_iterator begin() const {
+      return d_map.begin();
+   }
+
+   const_iterator end() const {
+      return d_map.end();
+   }
+
+
+   reverse_iterator rbegin() {
+      return d_map.rbegin();
+   }
+
+   reverse_iterator rend() {
+      return d_map.rend();
+   }
+
+
+   iterator insert(
+      iterator i,
+      const value_type& v) {
+      return d_map.insert(i, v);
+   }
+
+   void erase(
+      iterator i) {
+      d_map.erase(i);
+   }
+
+   size_type erase(
+      const key_type& k) {
+      return d_map.erase(k);
+   }
+
+   void erase(
+      iterator first,
+      iterator last) {
+      d_map.erase(first, last);
+   }
+
+
+   size_t size() const {
+      return d_map.size();
+   }
+
+   bool empty() const {
+      return d_map.empty();
+   }
+
+   void clear() {
+      d_map.clear();
+   }
+
+
+   MappedBoxSet& operator [] (
+      const key_type& k) {
+      return d_map[k];
+   }
+
+
+   iterator find(
+      const key_type& k) {
+      return d_map.find(k);
+   }
+
+   const_iterator find(
+      const key_type& k) const {
+      return d_map.find(k);
+   }
+
+
+   NeighborhoodSet&
+   operator = (
+      const NeighborhoodSet& rhs);
+
+   bool
+   operator == (
+      const NeighborhoodSet& rhs) const;
+
+   bool
+   operator != (
+      const NeighborhoodSet& rhs) const;
+
+   void
+   swap(
+      NeighborhoodSet& other);
+
+   static void
+   swap(
+      NeighborhoodSet& a,
+      NeighborhoodSet& b);
+
+
+   //@}
+
+
+   //@{
+
+   //! @name Structure to represent a range of items in the container.
+
+   /*!
+    * @brief Shorthand for an range of neighborhoods in the NeighborhoodSet.
+    *
+    * A Range has two members, first and second.  it denotes the
+    * subset [first,second), which includes first and everything up to
+    * but not including second.  An empty range is designated by 
+    * first == second.
+    */
+   typedef std::pair<iterator, iterator> Range;
+
+   /*!
+    * @brief Shorthand for a range of neighborhoods in a const NeighborhoodSet.
+    *
+    * A Range has two members, first and second.  it denotes the
+    * subset [first,second), which includes first and everything up to
+    * but not including second.  An empty range is designated by 
+    * first == second.
+    */
+   typedef std::pair<const_iterator, const_iterator> ConstRange;
+
+   //@}
+
+   /*!
+    * @brief Find the range of neighborhoods owned by a given rank.
+    *
+    * The neighborhoods found are in [first,second).  If first==second,
+    * no neighborhoods are found for the given rank.
+    *
+    * @return the range requested.
+    */
+   Range
+   findRanksRange(
+      int rank);
+
+   /*!
+    * @brief Find the range of neighborhoods owned by a given rank.
+    *
+    * The neighborhoods found are in [first,second).  If first==second,
+    * no neighborhoods are found for the given rank.
+    *
+    * @return the range requested.
+    */
+   ConstRange
+   findRanksRange(
+      int rank) const;
+
+   /*!
+    * @brief Check whether the subsets of neighborhoods owned by a given
+    * process are the same between this and another NeighborhoodSet.
+    */
+   bool
+   isLocallyEqual(
+      const NeighborhoodSet& other,
+      int rank) const;
+
+
+   //@{
+   /*!
+    * @name IO support.
+    */
+
+   /*!
+    * @brief Write the NeighborhoodSet to a database.
+    */
+   void
+   putToDatabase(
+      tbox::Database& database) const;
+
+   /*!
+    * @brief Read the NeighborhoodSet from a database.
+    */
+   void
+   getFromDatabase(
+      tbox::Database& database);
+
+   //@}
+
+
+   /*!
+    * @brief Print the contents of the object recursively.
+    *
+    * @param[in] output_stream
+    *
+    * @param[in] border Left border of the output
+    *
+    * @param[in] detail_depth How much detail to print.
+    */
+   void
+   recursivePrint(
+      std::ostream& output_stream,
+      const std::string& left_border,
+      int detail_depth = 0) const;
+
+private:
+   /*!
+    * @brief NeighborhoodSet is just a wrapper around an STL map.
+    */
+   std::map<GlobalId, MappedBoxSet> d_map;
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/NeighborhoodSet.I"
+#endif
+
+#endif // included_hier_NeighborhoodSet
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/OverlapConnectorAlgorithm.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/OverlapConnectorAlgorithm.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,2046 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Algorithms for working with overlap Connectors. 
+ *
+ ************************************************************************/
+#ifndef included_hier_OverlapConnectorAlgorithm_C
+#define included_hier_OverlapConnectorAlgorithm_C
+
+#include "SAMRAI/hier/OverlapConnectorAlgorithm.h"
+#include "SAMRAI/hier/MappedBoxContainerUtils.h"
+#include "SAMRAI/hier/MappedBoxTree.h"
+#include "SAMRAI/hier/PeriodicShiftCatalog.h"
+#include "SAMRAI/hier/RealMappedBoxConstIterator.h"
+#include "SAMRAI/tbox/AsyncCommStage.h"
+#include "SAMRAI/tbox/AsyncCommPeer.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/TimerManager.h"
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+char OverlapConnectorAlgorithm::s_print_bridge_steps = '\0';
+
+tbox::Pointer<tbox::Timer> OverlapConnectorAlgorithm::t_find_overlaps_rbbt;
+tbox::Pointer<tbox::Timer> OverlapConnectorAlgorithm::t_bridge;
+tbox::Pointer<tbox::Timer> OverlapConnectorAlgorithm::t_bridge_discover;
+tbox::Pointer<tbox::Timer> OverlapConnectorAlgorithm::
+t_bridge_discover_get_neighbors;
+tbox::Pointer<tbox::Timer> OverlapConnectorAlgorithm::t_bridge_discover_form_rbbt;
+tbox::Pointer<tbox::Timer> OverlapConnectorAlgorithm::
+t_bridge_discover_find_overlaps;
+tbox::Pointer<tbox::Timer> OverlapConnectorAlgorithm::t_bridge_share;
+tbox::Pointer<tbox::Timer> OverlapConnectorAlgorithm::t_bridge_comm_init;
+tbox::Pointer<tbox::Timer> OverlapConnectorAlgorithm::t_bridge_unpack;
+tbox::Pointer<tbox::Timer> OverlapConnectorAlgorithm::t_bridge_MPI_wait;
+
+int OverlapConnectorAlgorithm::s_operation_mpi_tag = 0;
+/*
+ * Do we even need to use different tags each time we bridge???
+ * Unique tags were used to help debug, but the methods may work
+ * with reused tags anyway.
+ */
+
+tbox::SAMRAI_MPI OverlapConnectorAlgorithm::s_class_mpi(tbox::SAMRAI_MPI::commNull);
+
+tbox::StartupShutdownManager::Handler
+OverlapConnectorAlgorithm::s_initialize_finalize_handler(
+   OverlapConnectorAlgorithm::initializeCallback,
+   0,
+   0,
+   OverlapConnectorAlgorithm::finalizeCallback,
+   tbox::StartupShutdownManager::priorityTimers);
+
+#define OverlapConnectorAlgorithm_FirstDataLength 1000
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+OverlapConnectorAlgorithm::OverlapConnectorAlgorithm():
+   d_sanity_check_method_preconditions(false),
+   d_sanity_check_method_postconditions(false)
+{
+   /*
+    * While we figure out how to use multiple communicators in SAMRAI,
+    * we are still assuming that all communications use congruent
+    * communicators.  This class just makes a duplicate communicator
+    * to protect itself from unrelated communications in shared
+    * communicators.
+    */
+   if (s_class_mpi.getCommunicator() == tbox::SAMRAI_MPI::commNull) {
+      if (tbox::SAMRAI_MPI::usingMPI()) {
+         const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+         s_class_mpi.dupCommunicator(mpi);
+      }
+   }
+
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+OverlapConnectorAlgorithm::~OverlapConnectorAlgorithm()
+{
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void OverlapConnectorAlgorithm::setSanityCheckMethodPreconditions(
+   bool do_check)
+{
+   d_sanity_check_method_preconditions = do_check;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void OverlapConnectorAlgorithm::setSanityCheckMethodPostconditions(
+   bool do_check)
+{
+   d_sanity_check_method_postconditions = do_check;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void OverlapConnectorAlgorithm::extractNeighbors(
+   NeighborSet& neighbors,
+   const Connector& connector,
+   const GlobalId& global_id,
+   const IntVector& gcw) const
+{
+   const tbox::Dimension& dim(gcw.getDim());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (!(gcw <= connector.getConnectorWidth())) {
+      TBOX_ERROR("Connector::extractNeighbors cannot provide neighbors for\n"
+         << "a wider ghost cell width that used to initialize it.\n");
+   }
+   if (connector.getParallelState() != MappedBoxLevel::GLOBALIZED &&
+       global_id.getOwnerRank() != connector.getRank()) {
+      TBOX_ERROR("Connector::extractNeighbors cannot get neighbor data\n"
+         << "for a remote mapped_box unless in GLOBALIZED mode.\n");
+   }
+   if (!connector.getBase().hasMappedBox(global_id)) {
+      std::string dbgbord;
+      TBOX_ERROR(
+         "\nConnector::extractNeighbors: global_id " << global_id
+         << " is not in the base of the mapped_box_level.\n"
+         << "base:\n" << connector.getBase().format(dbgbord, 2)
+         << "head:\n" << connector.getHead().format(dbgbord, 2)
+         << "connector:\n" << connector.format(dbgbord, 2));
+   }
+#endif
+
+   /*
+    * Temporarily disable extracting neighbors for remote boxes.  This
+    * method functionality is not much used and prrobably should be
+    * removed.
+    */
+   TBOX_ASSERT(global_id.getOwnerRank() == connector.getRank());
+
+   const MappedBox& mapped_box(*connector.getBase().getMappedBox(MappedBox(dim,
+                                     global_id)));
+   NeighborhoodSet::const_iterator ins = connector.getNeighborhoodSets().find(global_id);
+   if (ins == connector.getNeighborhoodSets().end()) {
+      neighbors.clear();
+   } else {
+      const NeighborSet& superset = ins->second;
+      if (gcw == connector.getConnectorWidth()) {
+         neighbors = superset;
+      } else {
+         neighbors.clear();
+         Box grown_mapped_box = mapped_box.getBox();
+         grown_mapped_box.grow(gcw);
+         if (connector.getHeadCoarserFlag() == false) {
+            grown_mapped_box.refine(connector.getRatio());
+         }
+         for (NeighborSet::const_iterator ni = superset.begin();
+              ni != superset.end(); ++ni) {
+            Box nabr_box((*ni).getBox());
+            if (connector.getHeadCoarserFlag() == true) {
+               nabr_box.refine(connector.getRatio());
+            }
+            if (grown_mapped_box.intersects(nabr_box)) {
+               neighbors.insert(neighbors.end(), *ni);
+            }
+         }
+      }
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void OverlapConnectorAlgorithm::findOverlaps(
+   Connector& connector,
+   const bool ignore_self_overlap) const
+{
+   findOverlaps(connector,
+                connector.getHead().getGlobalizedVersion(),
+                ignore_self_overlap);
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void OverlapConnectorAlgorithm::findOverlaps(
+   Connector& connector,
+   const MappedBoxLevel& globalized_head,
+   const bool ignore_self_overlap) const
+{
+   findOverlaps_rbbt(connector, globalized_head, ignore_self_overlap);
+}
+
+/*
+ ***********************************************************************
+ * ignore_self_overlap should be set to true only if
+ * - the base and head mapped_box_levels represent the same mapped_box_level.
+ *   Two different mapped_box_level objects may represent the same
+ *   mapped_box_level if they are of the same refinement ratio.
+ * - you want to ignore overlaps between a mapped_box and itself.
+ ***********************************************************************
+ */
+
+void OverlapConnectorAlgorithm::findOverlaps_rbbt(
+   Connector& connector,
+   const MappedBoxLevel& head,
+   const bool ignore_self_overlap) const
+{
+   const tbox::Dimension dim(head.getDim());
+
+   t_find_overlaps_rbbt->start();
+
+   /*
+    * Finding overlaps for this object, using
+    * an externally provided head MappedBoxLevel
+    * meant to represent d_head.  We allow the
+    * substitution of an external head because
+    * we require the head is GLOBALIZED.  The
+    * user may have a GLOBALIZED version already,
+    * in which case we want to avoid the expense
+    * of creating a temporary GLOBALIZED version.
+    *
+    * Global mapped_boxes provided by head are sorted in a hier::MappedBoxTree
+    * so they can be quickly searched to see which intersects the
+    * boxes in this object.
+    */
+   if (head.getParallelState() != MappedBoxLevel::GLOBALIZED) {
+      TBOX_ERROR("OverlapConnectorAlgorithm::findOverlaps_rbbt() requires given head\n"
+         << "to be GLOBALIZED.\n");
+   }
+
+   /*
+    * The nomenclature "base" refers to the *this mapped_box_level
+    * and "head" refer to the mapped_box_level in the argument.
+    */
+
+   /*
+    * Determine relationship between base and head index spaces.
+    */
+   const bool head_is_finer =
+      head.getRefinementRatio() >= connector.getBase().getRefinementRatio() &&
+      head.getRefinementRatio() != connector.getBase().getRefinementRatio();
+   const bool base_is_finer =
+      connector.getBase().getRefinementRatio() >= head.getRefinementRatio() &&
+      connector.getBase().getRefinementRatio() != head.getRefinementRatio();
+
+   /*
+    * Create single container of visible head mapped_boxes
+    * to generate the search tree.
+    */
+   std::vector<MappedBox> global_head_mapped_boxes;
+   global_head_mapped_boxes.reserve(head.getGlobalNumberOfBoxes());
+   const MappedBoxSet& head_mapped_boxes = head.getGlobalMappedBoxes();
+   global_head_mapped_boxes.insert(
+      global_head_mapped_boxes.end(),
+      head_mapped_boxes.begin(),
+      head_mapped_boxes.end());
+
+   hier::MappedBoxTree rbbt(dim);
+   rbbt.generateTree(global_head_mapped_boxes);
+   global_head_mapped_boxes.clear();
+
+   /*
+    * A neighbor of a mapped_box would be discarded if
+    * - ignore_self_overlap is true,
+    * - the two are equal by comparison, and
+    * - they are from mapped_box_levels with the same refinement ratio
+    *   (we cannot compare mapped_box mapped_box_level pointers because that
+    *   does not work when a mapped_box mapped_box_level is a temporary globalized object)
+    */
+   const bool discard_self_overlap =
+      ignore_self_overlap &&
+      (connector.getBase().getRefinementRatio() == head.getRefinementRatio());
+
+   /*
+    * Discard current overlaps in connector (if any).
+    */
+   connector.initialize(
+      connector.getBase(),
+      connector.getHead(),
+      connector.getConnectorWidth());
+
+   /*
+    * Use MappedBoxTree to find local base boxes intersecting head mapped_boxes.
+    */
+   NeighborSet nabrs_for_box;
+   const MappedBoxSet& mapped_boxes = connector.getBase().getMappedBoxes();
+   for (RealMappedBoxConstIterator ni(mapped_boxes); ni.isValid(); ++ni) {
+
+      const MappedBox& mapped_box = *ni;
+
+      // Add found overlaps to neighbor set for mapped_box.
+      hier::Box box = mapped_box.getBox();
+      box.grow(connector.getConnectorWidth());
+
+      if (head_is_finer) box.refine(connector.getRatio());
+      else if (base_is_finer) box.coarsen(connector.getRatio());
+
+      rbbt.findOverlapMappedBoxes(nabrs_for_box, box);
+      if (discard_self_overlap) nabrs_for_box.erase(mapped_box);
+      if (!nabrs_for_box.empty()) {
+         connector.insertNeighbors(nabrs_for_box, mapped_box.getGlobalId());
+         nabrs_for_box.clear();
+      }
+
+   }
+   connector.setConnectorType(Connector::COMPLETE_OVERLAP);
+
+   if (d_sanity_check_method_postconditions) {
+      connector.assertConsistencyWithBase();
+      connector.assertConsistencyWithHead();
+   }
+
+   t_find_overlaps_rbbt->stop();
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void OverlapConnectorAlgorithm::shrinkConnectorWidth(
+   Connector& connector,
+   const IntVector& new_width) const
+{
+   if (!(new_width <= connector.getConnectorWidth())) {
+      TBOX_ERROR("Connector::shrinkConnectorWidth: new ghost cell\n"
+         << "width " << new_width << " involves an\n"
+         << "enlargement of the current cell width "
+         << connector.getConnectorWidth());
+   }
+   if (new_width == connector.getConnectorWidth()) {
+      // This is a no-op.
+      return;
+   }
+
+   // Have not yet written this for GLOBALIZED mode.
+   TBOX_ASSERT(connector.getParallelState() == MappedBoxLevel::DISTRIBUTED);
+
+   /*
+    * Remove overlaps that disappeared given the new GCW.
+    * Swap out the overlaps, modify them then swap them back in.
+    */
+   NeighborhoodSet neighborhood_set;
+   connector.swapInitialize(connector.getBase(),
+      connector.getHead(),
+      connector.getConnectorWidth(),
+      neighborhood_set,
+      MappedBoxLevel::DISTRIBUTED);
+
+   const bool head_coarser = connector.getHeadCoarserFlag();
+   const bool base_coarser =
+      !connector.getHeadCoarserFlag() &&
+      connector.getBase().getRefinementRatio() !=
+      connector.getHead().getRefinementRatio();
+
+   for (NeighborhoodSet::iterator ei = neighborhood_set.begin();
+        ei != neighborhood_set.end(); ++ei) {
+      const GlobalId& global_id = ei->first;
+      NeighborSet& nabrs = ei->second;
+      const MappedBox& mapped_box = *connector.getBase().getMappedBoxStrict(
+            global_id);
+      hier::Box mapped_box_box = mapped_box.getBox();
+      mapped_box_box.grow(new_width);
+      if (base_coarser) mapped_box_box.refine(connector.getRatio());
+      for (MappedBoxSet::iterator na = nabrs.begin();
+           na != nabrs.end(); /* incremented in loop */) {
+         const MappedBox& nabr = *na;
+         hier::Box nabr_box = nabr.getBox();
+         if (head_coarser) nabr_box.refine(connector.getRatio());
+         if (!mapped_box_box.intersects(nabr_box)) {
+            nabrs.erase(na++);
+         } else {
+            ++na;
+         }
+      }
+   }
+
+   connector.swapInitialize(
+      connector.getBase(),
+      connector.getHead(),
+      new_width,
+      neighborhood_set,
+      MappedBoxLevel::DISTRIBUTED);
+}
+
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void OverlapConnectorAlgorithm::bridge(
+   Connector& west_to_east,
+   Connector& east_to_west,
+   const Connector& west_to_cent,
+   const Connector& cent_to_east,
+   const Connector& east_to_cent,
+   const Connector& cent_to_west) const
+{
+   const IntVector& zero_vector(
+      hier::IntVector::getZero(cent_to_east.getConnectorWidth().getDim()));
+   const IntVector connector_width_limit(
+      cent_to_east.getConnectorWidth().getDim(), -1); // No user-imposed limit.
+   privateBridge(
+      west_to_east,
+      &east_to_west == &west_to_east ? NULL : &east_to_west,
+      west_to_cent,
+      cent_to_east,
+      east_to_cent,
+      cent_to_west,
+      false,
+      zero_vector,
+      false,
+      zero_vector,
+      connector_width_limit);
+}
+
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void OverlapConnectorAlgorithm::bridgeWithNesting(
+   Connector& west_to_east,
+   Connector& east_to_west,
+   const Connector& west_to_cent,
+   const Connector& cent_to_east,
+   const Connector& east_to_cent,
+   const Connector& cent_to_west,
+   const IntVector& cent_growth_to_nest_west,
+   const IntVector& cent_growth_to_nest_east,
+   const IntVector& connector_width_limit) const
+{
+   privateBridge(
+      west_to_east,
+      &east_to_west == &west_to_east ? NULL : &east_to_west,
+      west_to_cent,
+      cent_to_east,
+      east_to_cent,
+      cent_to_west,
+      (cent_growth_to_nest_west(0) >= 0),
+      cent_growth_to_nest_west,
+      (cent_growth_to_nest_east(0) >= 0),
+      cent_growth_to_nest_east,
+      connector_width_limit);
+}
+
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void OverlapConnectorAlgorithm::bridge(
+   Connector& west_to_east,
+   Connector& east_to_west,
+   const Connector& west_to_cent,
+   const Connector& cent_to_east,
+   const Connector& east_to_cent,
+   const Connector& cent_to_west,
+   const IntVector& connector_width_limit) const
+{
+   const IntVector& zero_vector(
+      hier::IntVector::getZero(cent_to_east.getConnectorWidth().getDim()));
+   privateBridge(
+      west_to_east,
+      &east_to_west == &west_to_east ? NULL : &east_to_west,
+      west_to_cent,
+      cent_to_east,
+      east_to_cent,
+      cent_to_west,
+      false,
+      zero_vector,
+      false,
+      zero_vector,
+      connector_width_limit);
+}
+
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void OverlapConnectorAlgorithm::bridge(
+   Connector& west_to_east,
+   const Connector& west_to_cent,
+   const Connector& cent_to_east,
+   const Connector& east_to_cent,
+   const Connector& cent_to_west,
+   const IntVector& connector_width_limit) const
+{
+   const IntVector& zero_vector(
+      hier::IntVector::getZero(cent_to_east.getConnectorWidth().getDim()));
+   privateBridge(
+      west_to_east,
+      NULL,
+      west_to_cent,
+      cent_to_east,
+      east_to_cent,
+      cent_to_west,
+      false,
+      zero_vector,
+      false,
+      zero_vector,
+      connector_width_limit);
+}
+
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void OverlapConnectorAlgorithm::bridge(
+   Connector& west_to_east,
+   const Connector& west_to_cent,
+   const Connector& cent_to_east,
+   const Connector& east_to_cent,
+   const Connector& cent_to_west) const
+{
+   const IntVector& zero_vector(
+      hier::IntVector::getZero(cent_to_east.getConnectorWidth().getDim()));
+   const IntVector connector_width_limit(
+      cent_to_east.getConnectorWidth().getDim(), -1); // No user-imposed limit.
+   privateBridge(
+      west_to_east,
+      NULL,
+      west_to_cent,
+      cent_to_east,
+      east_to_cent,
+      cent_to_west,
+      false,
+      zero_vector,
+      false,
+      zero_vector,
+      connector_width_limit);
+}
+
+/*
+ ***********************************************************************
+ *
+ *                           west to east
+ * (west mapped_box_level)  ------------------> (east mapped_box_level)
+ *                       ^  <------------------ ^
+ *                        \    east to west    /
+ *                         \                  /
+ *           center to west \                / center to east
+ *                           \              /
+ *                            \            /
+ *                      (center mapped_box_level)
+ *
+ * Bridge operation is in two phases, discovery and
+ * sharing.  The discovery phase loops through local
+ * MappedBoxes in the center and comparing the west and east neighbors
+ * for overlaps.  Local overlaps are stored immediately.
+ * Remote overlaps are placed in messages to be sent to appropriate
+ * processors by the sharing phase.
+ ***********************************************************************
+ */
+
+void OverlapConnectorAlgorithm::privateBridge(
+   Connector& west_to_east,
+   Connector* east_to_west,
+   const Connector& west_to_cent,
+   const Connector& cent_to_east,
+   const Connector& east_to_cent,
+   const Connector& cent_to_west,
+   bool west_nesting_is_known,
+   const IntVector& cent_growth_to_nest_west,
+   bool east_nesting_is_known,
+   const IntVector& cent_growth_to_nest_east,
+   const IntVector& connector_width_limit) const
+{
+   t_bridge->barrierAndStart();
+
+   const tbox::Dimension& dim(connector_width_limit.getDim());
+
+   const IntVector& zero_vector(
+      hier::IntVector::getZero(cent_to_east.getConnectorWidth().getDim()));
+
+   const MappedBoxLevel& cent = cent_to_west.getBase();
+
+#if defined(DEBUG_CHECK_ASSERTIONS) || \
+   defined(CONNECTOR_CheckBridgeMappedBoxLevelIdentities)
+   /*
+    * Ensure that Connectors incident to and from the center agree on
+    * what the center is.  This can be an expensive (though still
+    * scalable) check, so we only check in debug mode, unless debugging,
+    * in which it can be independently enabled in any mode.
+    */
+   if (cent != cent_to_east.getBase() ||
+       cent != east_to_cent.getHead() ||
+       cent != west_to_cent.getHead()) {
+      TBOX_ERROR("Bad input for OverlapConnectorAlgorithm::bridge:\n"
+         << "Given Connectors to base and head of bridge are not incident\n"
+         << "from the same center in OverlapConnectorAlgorithm::bridge:\n"
+         << "west_to_cent is  TO  " << &west_to_cent.getHead() << "\n"
+         << "cent_to_east is FROM " << &cent_to_east.getBase() << "\n"
+         << "east_to_cent is  TO  " << &east_to_cent.getHead() << "\n"
+         << "cent_to_west is FROM " << &cent_to_west.getBase() << "\n"
+         );
+   }
+#endif
+   /*
+    * Ensure that head and base mapped_box_levels in argument agree with
+    * head and base in the object.
+    */
+   if (cent_to_west.getHead() != west_to_cent.getBase()) {
+      TBOX_ERROR("Bad input for OverlapConnectorAlgorithm::bridge:\n"
+         << "Given Connectors to and from base of bridge do not refer\n"
+         << "to the base of the bridge in OverlapConnectorAlgorithm::bridge:\n"
+         << "west_to_cent is FROM " << &west_to_cent.getBase() << "\n"
+         << "cent_to_west is  TO  " << &cent_to_west.getHead() << "\n"
+         );
+   }
+   if (cent_to_east.getHead() != east_to_cent.getBase()) {
+      TBOX_ERROR("Bad input for OverlapConnectorAlgorithm::bridge:\n"
+         << "Given Connectors to and from head of bridge do not refer\n"
+         << "to the head of the bridge in OverlapConnectorAlgorithm::bridge:\n"
+         << "east_to_cent is FROM " << &east_to_cent.getBase() << "\n"
+         << "cent_to_east is  TO  " << &cent_to_east.getHead() << "\n"
+         );
+   }
+   if (!west_to_cent.isTransposeOf(cent_to_west)) {
+      TBOX_ERROR("Bad input for OverlapConnectorAlgorithm::bridge:\n"
+         << "Given Connectors between base and center of bridge\n"
+         << "are not transposes of each other.\n"
+         << "See OverlapConnectorAlgorithm::isTransposeOf().\n"
+         );
+   }
+   if (!east_to_cent.isTransposeOf(cent_to_east)) {
+      TBOX_ERROR("Bad input for OverlapConnectorAlgorithm::bridge:\n"
+         << "Given Connectors between head and center of bridge\n"
+         << "are not transposes of each other.\n"
+         << "See OverlapConnectorAlgorithm::isTransposeOf().\n"
+         );
+   }
+
+   // Expensive sanity checks:
+   if (d_sanity_check_method_preconditions) {
+      west_to_cent.assertTransposeCorrectness(cent_to_west);
+      cent_to_west.assertTransposeCorrectness(west_to_cent);
+      east_to_cent.assertTransposeCorrectness(cent_to_east);
+      cent_to_east.assertTransposeCorrectness(east_to_cent);
+   }
+
+   if (s_print_bridge_steps == 'y') {
+      std::string dbgbord("bridge->  ");
+      tbox::plog
+         << "bridge west:\n" << west_to_cent.getBase().format(dbgbord, 3)
+         << "bridge east:\n" << east_to_cent.getBase().format(dbgbord, 3)
+         << "bridge center:\n" << cent_to_west.getBase().format(dbgbord, 3)
+         << "bridge west_to_cent:\n" << west_to_cent.format(dbgbord, 3)
+         << "bridge cent_to_west:\n" << cent_to_west.format(dbgbord, 3)
+         << "bridge cent_to_east:\n" << cent_to_east.format(dbgbord, 3)
+         << "bridge east_to_cent:\n" << cent_to_east.format(dbgbord, 3);
+   }
+
+   /* End sanity checks.  Begin work. */
+
+   const MappedBoxLevel& west = cent_to_west.getHead();
+   const MappedBoxLevel& east = cent_to_east.getHead();
+   const IntVector& cent_ratio = cent.getRefinementRatio();
+   const IntVector& west_ratio = west.getRefinementRatio();
+   const IntVector& east_ratio = east.getRefinementRatio();
+
+   const IntVector finest_ratio =
+      IntVector::max(cent_ratio, IntVector::max(west_ratio, east_ratio));
+
+   /*
+    * Using the bridge theorem, compute the largest bridge width for
+    * which we can guarantee discovering all the overlaps (when
+    * nesting is satisfied).  If either the east or west
+    * MappedBoxLevel's nesting in the center is known, compute the
+    * output width by the bridge theorem, and use the bigger one.  If
+    * neither is known, we assume that both east and west nest in
+    * center, and just to do something reasonable.
+    */
+   IntVector output_width1(dim, 0), output_width2(dim, 0);
+   if (west_nesting_is_known || east_nesting_is_known) {
+      if (west_nesting_is_known) {
+         output_width1 =
+            cent_to_east.getConnectorWidth() - cent_growth_to_nest_west;
+      }
+      if (east_nesting_is_known) {
+         output_width2 =
+            cent_to_west.getConnectorWidth() - cent_growth_to_nest_east;
+      }
+      if (!(output_width1 >= zero_vector ||
+            output_width2 >= zero_vector)) {
+         TBOX_ERROR("OverlapConnectorAlgorithm::privateBridge:\n"
+            << "Useless nesting specifications!\n"
+            << "Neither west nor east MappedBoxLevel nest with enough\n"
+            << "margin to guarantee finding all overlaps.\n"
+            << "To ensure you understand completness is not guaranteed,\n"
+            << "this is considered an error.  To proceed anyway and live\n"
+            << "with potential incompleteness, use a bridge interface\n"
+            << "that does not claim any nesting.  Or, you can specify\n"
+            << "a different nesting claim (but don't enable sanity\n"
+            << "checking, which will catch your fib).\n");
+      }
+   } else {
+      output_width1 = cent_to_east.getConnectorWidth();
+      output_width2 = cent_to_west.getConnectorWidth();
+   }
+   IntVector output_width_in_finest_ratio =
+      IntVector::max(output_width1, output_width2) * finest_ratio / cent_ratio;
+
+   /*
+    * Reduce the output width to the user-specified width limit.  Note
+    * that the width limit is specified in the coarser of the east and
+    * west refinement ratios.
+    */
+   if (connector_width_limit >= IntVector::getZero(dim)) {
+      const IntVector coarser_ratio = IntVector::min(west_ratio, east_ratio);
+      const IntVector width_limit_in_finest_ratio(
+         connector_width_limit * finest_ratio / coarser_ratio);
+      if (width_limit_in_finest_ratio > output_width_in_finest_ratio) {
+         /*
+          * If user specifies a width limit, he is probably assuming
+          * that the bridge's allowable width is bigger.  If that is
+          * not the case, this method won't crash, but it will give
+          * bad results that result in elusive bugs.  Therefore, we
+          * catch it immediately.
+          */
+         TBOX_ERROR("OverlapConnectorAlgorithm::privateBridge found input error:\n"
+            << "The given connector width limit, " << connector_width_limit
+            << " (" << width_limit_in_finest_ratio << " in finest index space)\n"
+            << "is smaller than the width of the bridge, "
+            << output_width_in_finest_ratio << " (in finest index space).");
+      }
+      output_width_in_finest_ratio.min(width_limit_in_finest_ratio);
+   }
+
+   const IntVector west_to_east_width =
+      IntVector::ceiling(output_width_in_finest_ratio, finest_ratio / west_ratio);
+   const IntVector east_to_west_width =
+      IntVector::ceiling(output_width_in_finest_ratio, finest_ratio / east_ratio);
+
+   /*
+    * Compute the reverse bridge (east_to_west) if it is given and is
+    * distinct.
+    */
+   const bool compute_reverse =
+      (east_to_west != NULL && east_to_west != &west_to_east);
+
+   /*
+    * Initialize the output Connectors without overlaps.  Add overlaps
+    * below as they are discovered or received from other procs.
+    */
+   west_to_east.initialize(
+      west,
+      east,
+      west_to_east_width);
+   if (compute_reverse) {
+      east_to_west->initialize(
+         east,
+         west,
+         east_to_west_width);
+#ifdef DEBUG_CHECK_ASSERTIONS
+      if (west_ratio / east_ratio * east_ratio == west_ratio ||
+          east_ratio / west_ratio * west_ratio == east_ratio) {
+         /*
+          * If it's possible to make west<==>east transposes, it
+          * should happen.  The requirement is that one refinement
+          * ratio is an IntVector times the other.
+          */
+         west_to_east.isTransposeOf(*east_to_west);
+         east_to_west->isTransposeOf(west_to_east);
+      }
+#endif
+   }
+
+   const int rank = cent_to_west.getRank();
+   const int nproc = cent_to_west.getNproc();
+
+   /*
+    * Owners we have to exchange information with are the ones
+    * owning east/west MappedBoxes visible to the local process.
+    */
+   std::set<int> outgoing_ranks, incoming_ranks;
+   hier::MappedBoxContainerUtils::getOwnersFromNeighborhoodSet(outgoing_ranks,
+         cent_to_east.getNeighborhoodSets());
+   hier::MappedBoxContainerUtils::getOwnersFromNeighborhoodSet(incoming_ranks,
+         east_to_cent.getNeighborhoodSets());
+   if (&cent_to_west != &cent_to_east) {
+      hier::MappedBoxContainerUtils::getOwnersFromNeighborhoodSet(outgoing_ranks,
+            cent_to_west.getNeighborhoodSets());
+      hier::MappedBoxContainerUtils::getOwnersFromNeighborhoodSet(incoming_ranks,
+            west_to_cent.getNeighborhoodSets());
+   }
+   outgoing_ranks.erase(rank);
+   incoming_ranks.erase(rank);
+
+   t_bridge_share->start();
+   t_bridge_comm_init->start();
+   /*
+    * Set up communication mechanism and post receives.
+    * Note that in comm_peer, all the outgoing_comm come
+    * first, the incoming_comm later.
+    */
+   tbox::AsyncCommStage comm_stage;
+   comm_stage.setCommunicationWaitTimer(t_bridge_MPI_wait);
+   const int n_comm = static_cast<int>(
+      outgoing_ranks.size() + incoming_ranks.size());
+   tbox::AsyncCommPeer<int>* comm_peer =
+      new tbox::AsyncCommPeer<int>[n_comm];
+
+   tbox::AsyncCommStage::MemberVec completed;
+   completed.reserve(incoming_ranks.size());
+
+   const int tag0 = ++s_operation_mpi_tag;
+   const int tag1 = ++s_operation_mpi_tag;
+
+   size_t comm_idx;
+
+   comm_idx = outgoing_ranks.size();
+   for (std::set<int>::const_iterator owneri = incoming_ranks.begin();
+        owneri != incoming_ranks.end(); ++owneri, ++comm_idx) {
+      const int peer_rank = *owneri;
+      tbox::AsyncCommPeer<int>& incoming_comm = comm_peer[comm_idx];
+      incoming_comm.initialize(&comm_stage);
+      incoming_comm.setPeerRank(peer_rank);
+      incoming_comm.setMPI(cent.getMPI());
+      incoming_comm.setMPITag(tag0, tag1);
+      incoming_comm.limitFirstDataLength(OverlapConnectorAlgorithm_FirstDataLength);
+      if (s_print_bridge_steps == 'y')
+         tbox::plog << "Receiving from " << incoming_comm.getPeerRank()
+                    << std::endl;
+      incoming_comm.beginRecv();
+      if (incoming_comm.isDone()) {
+         completed.insert(completed.end(), &incoming_comm);
+      }
+   }
+
+   comm_idx = 0;
+   for (std::set<int>::const_iterator owneri = outgoing_ranks.begin();
+        owneri != outgoing_ranks.end(); ++owneri, ++comm_idx) {
+      const int peer_rank = *owneri;
+      tbox::AsyncCommPeer<int>& outgoing_comm = comm_peer[comm_idx];
+      outgoing_comm.initialize(&comm_stage);
+      outgoing_comm.setPeerRank(peer_rank);
+      outgoing_comm.setMPI(cent.getMPI());
+      outgoing_comm.setMPITag(tag0, tag1);
+      outgoing_comm.limitFirstDataLength(OverlapConnectorAlgorithm_FirstDataLength);
+      if (s_print_bridge_steps == 'y')
+         tbox::plog << "Sending to " << outgoing_comm.getPeerRank() << std::endl;
+   }
+   t_bridge_comm_init->stop();
+   t_bridge_share->stop();
+
+   /*
+    * Create search trees for visible east and west neighbors.  First,
+    * create MappedBoxSets with which to initialize the search trees:
+    * visible_west_nabrs and visible_east_nabrs.
+    */
+   t_bridge_discover_get_neighbors->start();
+   NeighborSet visible_west_nabrs, visible_east_nabrs;
+   hier::MappedBoxContainerUtils::getNeighborsFromNeighborhoodSet(visible_west_nabrs,
+         cent_to_west.getNeighborhoodSets());
+   hier::MappedBoxContainerUtils::getNeighborsFromNeighborhoodSet(visible_east_nabrs,
+         cent_to_east.getNeighborhoodSets());
+   t_bridge_discover_get_neighbors->stop();
+
+   if (!visible_west_nabrs.empty() || !visible_east_nabrs.empty()) {
+
+      /*
+       * Discover overlaps.  Overlaps are either locally stored or
+       * packed into a message for sending.
+       */
+
+      t_bridge_discover->start();
+
+      if (s_print_bridge_steps == 'y') {
+         tbox::plog << "Before building RBBTs:\n"
+                    << "visible_west_nabrs:" << visible_west_nabrs.format("\n  ")
+                    << "visible_east_nabrs:" << visible_east_nabrs.format("\n  ")
+                    << std::endl;
+      }
+
+      t_bridge_discover_form_rbbt->start();
+      const MappedBoxTree west_rbbt(dim, visible_west_nabrs);
+      const MappedBoxTree east_rbbt(dim, visible_east_nabrs);
+      t_bridge_discover_form_rbbt->stop();
+
+      /*
+       * Iterators west_ni and east_ni point to the west/east
+       * MappedBox whose neighbors are being sought.  If we are not
+       * interested in the east-->west connector, then east_ni will
+       * be unused.
+       */
+      NeighborSet::iterator west_ni;
+      NeighborSet::iterator east_ni;
+      /*
+       * Local process can find some neighbors for the (local and
+       * remote) MappedBoxes in visible_west_nabrs and
+       * visible_east_nabrs.  We loop through the visible_west_nabrs
+       * and compare each to visible_ease_nabrs, looking for overlaps.
+       * Then vice versa.
+       *
+       * Looping through the NeighborSets is like looping through
+       * their owners, since they are ordered by owners first.  As an
+       * optimization measure, start loop on the first owner with
+       * higher rank than the local rank.  This avoid the higher-end
+       * ranks from having to wait for messages at the beginning and
+       * the lower-end ranks from having to wait for messages at the
+       * end.  After the highest rank owner has been handled, continue
+       * at the beginning and do the remaining.  (If local rank is
+       * highest of all owners of the visible MappedBoxes, start at
+       * the beginning.)
+       */
+      const MappedBox start_loop_here(dim, hier::LocalId::getZero(), rank + 1);
+      west_ni = visible_west_nabrs.lower_bound(start_loop_here);
+      if (compute_reverse) {
+         east_ni = visible_east_nabrs.lower_bound(start_loop_here);
+      }
+
+      if (west_ni == visible_west_nabrs.end() &&
+          (!compute_reverse ||
+           east_ni == visible_east_nabrs.end())) {
+         /*
+          * There are no visible MappedBoxes owned by rank higher than
+          * local process.  So loop from the beginning.
+          */
+         west_ni = visible_west_nabrs.begin();
+         east_ni = visible_east_nabrs.begin();
+      }
+
+      /*
+       * Set send_comm_idx to reference the first outgoing rank in comm_peer.
+       * It will be incremented to correpond to the rank whose overlaps
+       * are being searched for.
+       */
+      size_t send_comm_idx = 0;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      std::set<int> owners_sent_to; // Used for debugging.
+#endif
+
+      /*
+       * Loop until all visible neighbors have their neighbors
+       * searched for.  But only do this for the east mapped_boxes if
+       * we are actively seeking neighbor data for them.
+       */
+      while ((west_ni != visible_west_nabrs.end()) ||
+             (compute_reverse && east_ni != visible_east_nabrs.end())) {
+
+         /*
+          * curr_owner is the owner whose neighbors is currently
+          * being searched for.  It should be the owner of the
+          * next west or east MappedBox in our cyclic-type looping.
+          */
+         int curr_owner = nproc; // an invalid value.
+         if (west_ni != visible_west_nabrs.end() &&
+             curr_owner > west_ni->getOwnerRank()) {
+            curr_owner = west_ni->getOwnerRank();
+         }
+         if (compute_reverse) {
+            if (east_ni != visible_east_nabrs.end() &&
+                curr_owner > east_ni->getOwnerRank()) {
+               curr_owner = east_ni->getOwnerRank();
+            }
+         }
+         if (s_print_bridge_steps == 'y')
+            tbox::plog << "cur_owner set to " << curr_owner << std::endl;
+
+         TBOX_ASSERT(curr_owner < nproc);
+         TBOX_ASSERT(curr_owner > -1);
+         TBOX_ASSERT(owners_sent_to.find(curr_owner) == owners_sent_to.end());
+
+         /*
+          * Set up send_message to contain info discovered
+          * locally but needed by curr_owner.
+          *
+          * Content of send_mesg:
+          * - offset to the reference section (see below)
+          * - number of west mapped_boxes for which neighbors are found
+          * - number of east mapped_boxes for which neighbors are found
+          *   - index of west/east mapped_box
+          *   - number of neighbors found for west/east mapped_box.
+          *     - MappedBoxId of neighbors found.
+          *       Boxes of these found neighbors are given in the
+          *       reference section of the message.
+          * - reference section: all the MappedBoxes referenced as
+          *   neighbors (accumulated in referenced_west_nabrs
+          *   and referenced_east_nabrs).
+          *   - number of referenced west neighbors
+          *   - number of referenced east neighbors
+          *   - referenced west neighbors
+          *   - referenced east neighbors
+          *
+          * The purpose of factoring out info on the neighbors referenced
+          * is to reduce redundant data that can eat up lots of memory
+          * when we find lots of MappedBoxes with the same neighbors.
+          */
+         std::vector<int> send_mesg(3); // Message to send to curr_owner.
+         MappedBoxSet referenced_west_nabrs; // Referenced neighbors in west.
+         MappedBoxSet referenced_east_nabrs; // Referenced neighbors in east.
+
+         t_bridge_discover_find_overlaps->start();
+
+         // Find neighbors for all west mapped_boxes owned by curr_owner.
+         if (s_print_bridge_steps == 'y') {
+            tbox::plog << "Finding west --> east overlaps for owner "
+                       << curr_owner << std::endl;
+         }
+
+         findOverlapsForOneProcess(
+            curr_owner,
+            visible_west_nabrs,
+            west_ni,
+            send_mesg,
+            1, // remote_mapped_box_counter_index,
+            west_to_east,
+            east_rbbt,
+            referenced_east_nabrs);
+
+         // Find neighbors for all east mapped_boxes owned by curr_owner.
+         if (compute_reverse) {
+            if (s_print_bridge_steps == 'y') {
+               tbox::plog << "Finding west <-- east overlaps for owner "
+                          << curr_owner << std::endl;
+            }
+            findOverlapsForOneProcess(
+               curr_owner,
+               visible_east_nabrs,
+               east_ni,
+               send_mesg,
+               2, // remote_mapped_box_counter_index,
+               *east_to_west,
+               west_rbbt,
+               referenced_west_nabrs);
+         }
+
+         t_bridge_discover_find_overlaps->stop();
+
+         if (curr_owner != rank) {
+            // Send discoveries to the curr_owner.
+
+            t_bridge_discover->stop();
+            t_bridge_share->start();
+
+            /*
+             * Find the communication object by increasing send_comm_idx
+             * (cyclically) until it corresponds to curr_owner.
+             */
+            while (comm_peer[send_comm_idx].getPeerRank() != curr_owner) {
+               send_comm_idx = (send_comm_idx + 1) % outgoing_ranks.size();
+            }
+            tbox::AsyncCommPeer<int>& outgoing_comm = comm_peer[send_comm_idx];
+            TBOX_ASSERT(outgoing_comm.getPeerRank() == curr_owner);
+
+            sendDiscoveryToOneProcess(
+               send_mesg,
+               referenced_east_nabrs,
+               referenced_west_nabrs,
+               outgoing_comm);
+
+            if (outgoing_comm.isDone()) {
+               completed.push_back(&outgoing_comm);
+            }
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(owners_sent_to.find(curr_owner) == owners_sent_to.end());
+            owners_sent_to.insert(curr_owner);
+#endif
+
+            t_bridge_share->stop();
+            t_bridge_discover->start();
+
+         } // Block to send discoveries to curr_owner.
+
+         /*
+          * If we come to the end of visible MappedBoxes, go back and
+          * work on the MappedBoxes owned by processors with lower rank
+          * than the local rank.  (This is part of the optimization
+          * to reduce communication time.)
+          */
+         if (west_ni == visible_west_nabrs.end() &&
+             (!compute_reverse ||
+              east_ni == visible_east_nabrs.end())) {
+            /*
+             * There are no MappedBoxes that owned by rank higher than
+             * local process and that we still need to find neighbors
+             * for.  So loop from the beginning.
+             */
+            west_ni = visible_west_nabrs.begin();
+            east_ni = visible_east_nabrs.begin();
+         }
+
+      } // Loop through visible neighbors.
+
+      t_bridge_discover->stop();
+
+   }
+
+   t_bridge_share->start();
+
+   /*
+    * Receive and unpack messages.
+    */
+   do {
+
+      t_bridge_unpack->start();
+      for (unsigned int i = 0; i < completed.size(); ++i) {
+
+         tbox::AsyncCommPeer<int>* peer =
+            dynamic_cast<tbox::AsyncCommPeer<int> *>(completed[i]);
+         TBOX_ASSERT(completed[i] != NULL);
+         TBOX_ASSERT(peer != NULL);
+
+         if ((size_t)(peer - comm_peer) < outgoing_ranks.size()) {
+            // Sent to this peer.  No follow-up needed.
+            if (s_print_bridge_steps == 'y') {
+               tbox::plog << "Sent to " << peer->getPeerRank() << std::endl;
+            }
+         } else {
+            // Receive from this peer.
+            if (s_print_bridge_steps == 'y') {
+               tbox::plog << "Received from " << peer->getPeerRank()
+                          << std::endl;
+            }
+            unpackDiscoveryMessage(
+               peer,
+               west_to_east,
+               east_to_west);
+         }
+      }
+      t_bridge_unpack->stop();
+
+      completed.clear();
+      comm_stage.advanceSome(completed);
+
+   } while (completed.size() > 0);
+
+   t_bridge_share->stop();
+
+   delete[] comm_peer;
+
+   west_to_east.setConnectorType(Connector::UNKNOWN);
+   if (east_to_west != NULL) {
+      east_to_west->setConnectorType(Connector::UNKNOWN);
+   }
+
+   if (d_sanity_check_method_postconditions) {
+      west_to_east.assertConsistencyWithBase();
+      west_to_east.assertConsistencyWithHead();
+      if (compute_reverse) {
+         east_to_west->assertConsistencyWithBase();
+         east_to_west->assertConsistencyWithHead();
+         east_to_west->assertTransposeCorrectness(west_to_east, true);
+      }
+   }
+
+   t_bridge->barrierAndStop();
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void OverlapConnectorAlgorithm::unpackDiscoveryMessage(
+   const tbox::AsyncCommPeer<int>* incoming_comm,
+   Connector& west_to_east,
+   Connector* east_to_west) const
+{
+   const int* ptr = incoming_comm->getRecvData();
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   const int msg_size = incoming_comm->getRecvSize();
+   const int* ptr_end = ptr + msg_size;
+#endif
+
+   const tbox::Dimension& dim(west_to_east.getRatio().getDim());
+
+   MappedBox tmp_mapped_box(dim);
+
+   const int mapped_box_com_buffer_size = MappedBox::commBufferSize(dim);
+   /*
+    * Content of send_mesg, constructed largely in
+    * findOverlapsForOneProcess() and sendDiscoveryToOneProcess():
+    *
+    * - offset to the reference section (see below)
+    * - number of west mapped_boxes for which overlaps are found
+    * - number of east mapped_boxes for which overlaps are found
+    *   - index of west/east mapped_box
+    *   - number of neighbors found for west/east mapped_box.
+    *     - owner and local indices of neighbors found (unsorted).
+    *       Boxes of found neighbors are given in the
+    *       reference section of the message.
+    * - reference section: all the mapped_boxes referenced as
+    *   neighbors (accumulated in referenced_west_nabrs
+    *   and referenced_east_nabrs).
+    *   - number of referenced west neighbors
+    *   - number of referenced east neighbors
+    *   - referenced west neighbors
+    *   - referenced east neighbors
+    */
+
+   const int offset = ptr[0];
+   const int n_west_mapped_boxes = ptr[1];
+   const int n_east_mapped_boxes = ptr[2];
+   const int n_reference_west_mapped_boxes = ptr[offset];
+   const int n_reference_east_mapped_boxes = ptr[offset + 1];
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   const int correct_msg_size = offset
+      + 2 /* counters of east and west reference mapped_boxes */
+      + MappedBox::commBufferSize(dim) * n_reference_west_mapped_boxes
+      + MappedBox::commBufferSize(dim) * n_reference_east_mapped_boxes
+   ;
+   TBOX_ASSERT(msg_size == correct_msg_size);
+#endif
+
+   // Extract referenced mapped_boxes from message.
+   NeighborSet referenced_west_nabrs;
+   NeighborSet referenced_east_nabrs;
+   ptr = incoming_comm->getRecvData() + offset + 2;
+   for (int ii = 0; ii < n_reference_west_mapped_boxes; ++ii) {
+      tmp_mapped_box.getFromIntBuffer(ptr);
+      referenced_west_nabrs.insert(referenced_west_nabrs.end(), tmp_mapped_box);
+      ptr += mapped_box_com_buffer_size;
+   }
+   for (int ii = 0; ii < n_reference_east_mapped_boxes; ++ii) {
+      tmp_mapped_box.getFromIntBuffer(ptr);
+      referenced_east_nabrs.insert(referenced_east_nabrs.end(), tmp_mapped_box);
+      ptr += mapped_box_com_buffer_size;
+   }
+   if (s_print_bridge_steps == 'y') {
+      tbox::plog << "received " << n_reference_west_mapped_boxes
+                 << " referenced_west_nabrs:" << referenced_west_nabrs.format("\n  ") << std::endl
+                 << "received " << n_reference_east_mapped_boxes
+                 << " referenced_east_nabrs:" << referenced_east_nabrs.format("\n  ") << std::endl;
+   }
+
+   TBOX_ASSERT(ptr == ptr_end);
+
+   /*
+    * Unpack neighbor data for east neighbors of west mapped_boxes
+    * and west neighbors of east mapped_boxes.  The neighbor info
+    * given exclude boxes.  Refer to reference data to get the
+    * box info.
+    */
+   const int rank = west_to_east.getRank();
+   ptr = incoming_comm->getRecvData() + 3;
+   NeighborSet east_nabrs;
+   for (int ii = 0; ii < n_west_mapped_boxes; ++ii) {
+      const GlobalId west_global_id(hier::LocalId(*(ptr++)), rank);
+      const int n_east_nabrs_found = *(ptr++);
+      // Add received neighbors to MappedBox west_global_id.
+      west_to_east.swapNeighbors(east_nabrs, west_global_id);
+      for (int j = 0; j < n_east_nabrs_found; ++j) {
+         tmp_mapped_box.getId().initialize(LocalId(ptr[1]), ptr[0], ptr[2]);
+         ptr += 3;
+         NeighborSet::const_iterator na =
+            referenced_east_nabrs.find(tmp_mapped_box);
+         TBOX_ASSERT(na != referenced_east_nabrs.end());
+         const MappedBox& east_nabr = *na;
+         east_nabrs.insert(east_nabr);
+      }
+      west_to_east.swapNeighbors(east_nabrs, west_global_id);
+   }
+   NeighborSet west_nabrs;
+   for (int ii = 0; ii < n_east_mapped_boxes; ++ii) {
+      const GlobalId east_global_id(LocalId(*(ptr++)), rank);
+      const int n_west_nabrs_found = *(ptr++);
+      // Add received neighbors to MappedBox east_global_id.
+      east_to_west->swapNeighbors(west_nabrs, east_global_id);
+      for (int j = 0; j < n_west_nabrs_found; ++j) {
+         tmp_mapped_box.getId().initialize(LocalId(ptr[1]), ptr[0], ptr[2]);
+         ptr += 3;
+         NeighborSet::const_iterator na =
+            referenced_west_nabrs.find(tmp_mapped_box);
+         TBOX_ASSERT(na != referenced_west_nabrs.end());
+         const MappedBox& west_nabr = *na;
+         west_nabrs.insert(west_nabr);
+      }
+      east_to_west->swapNeighbors(west_nabrs, east_global_id);
+   }
+}
+
+/*
+ ***********************************************************************
+ * findOverlapsForOneProcess() cached some discovered remote neighbors
+ * into send_mesg.  sendDiscoveryToOneProcess() sends the message.
+ *
+ * findOverlapsForOneProcess() placed neighbor data in
+ * referenced_east_nabrs and referenced_west_nabrs rather than directly
+ * into send_mesg.  This method packs the referenced neighbors and send
+ * them.
+ ***********************************************************************
+ */
+
+void OverlapConnectorAlgorithm::sendDiscoveryToOneProcess(
+   std::vector<int>& send_mesg,
+   NeighborSet& referenced_east_nabrs,
+   NeighborSet& referenced_west_nabrs,
+   tbox::AsyncCommPeer<int>& outgoing_comm) const
+{
+   const tbox::Dimension dim =
+      !referenced_east_nabrs.empty() ? referenced_east_nabrs.begin()->getDim()
+      :
+      !referenced_west_nabrs.empty() ? referenced_west_nabrs.begin()->getDim()
+      :
+      tbox::Dimension(1);
+   /*
+    * Fill the messages's reference section with all the neighbors
+    * that have been referenced.
+    */
+   const int offset = send_mesg[0] = static_cast<int>(send_mesg.size());
+   const int n_referenced_nabrs =
+      static_cast<int>(
+         referenced_east_nabrs.size() + referenced_west_nabrs.size());
+   const int reference_section_size =
+      2 + n_referenced_nabrs * MappedBox::commBufferSize(dim);
+   send_mesg.insert(send_mesg.end(),
+      reference_section_size,
+      -1);
+   int* ptr = &send_mesg[offset];
+   *(ptr++) = static_cast<int>(referenced_west_nabrs.size());
+   *(ptr++) = static_cast<int>(referenced_east_nabrs.size());
+   for (MappedBoxSet::const_iterator ni = referenced_west_nabrs.begin();
+        ni != referenced_west_nabrs.end(); ++ni) {
+      const MappedBox& mapped_box = *ni;
+      mapped_box.putToIntBuffer(ptr);
+      ptr += MappedBox::commBufferSize(dim);
+   }
+   for (MappedBoxSet::const_iterator ni = referenced_east_nabrs.begin();
+        ni != referenced_east_nabrs.end(); ++ni) {
+      const MappedBox& mapped_box = *ni;
+      mapped_box.putToIntBuffer(ptr);
+      ptr += MappedBox::commBufferSize(dim);
+   }
+   if (s_print_bridge_steps == 'y') {
+      tbox::plog << "sending " << referenced_west_nabrs.size()
+                 << " referenced_west_nabrs:" << referenced_west_nabrs.format("\n  ") << std::endl
+                 << "sending " << referenced_east_nabrs.size()
+                 << " referenced_east_nabrs:" << referenced_east_nabrs.format("\n  ") << std::endl;
+   }
+
+   TBOX_ASSERT(ptr == &send_mesg[send_mesg.size() - 1] + 1);
+
+   /*
+    * Send message.
+    */
+   outgoing_comm.beginSend(&send_mesg[0], static_cast<int>(send_mesg.size()));
+   if (s_print_bridge_steps == 'y') {
+      tbox::plog << "Sent to " << outgoing_comm.getPeerRank() << std::endl;
+   }
+}
+
+/*
+ ***********************************************************************
+ *
+ * Find overlaps from visible_base_nabrs to head_rbbt.  Find only
+ * overlaps for MappedBoxes owned by owner_rank.
+ *
+ * On input, base_ni points to the first MappedBox in visible_base_nabrs
+ * owned by owner_rank.  Increment base_ni past those MappedBoxes
+ * processed and remove them from visible_base_nabrs.
+ *
+ * Save local and semilocal overlaps in bridging_connector.  For
+ * remote overlaps, pack in send_mesg, add head MappedBox to
+ * referenced_head_nabrs and increment
+ * send_mesg[remote_mapped_box_counter_index].
+ *
+ ***********************************************************************
+ */
+
+void OverlapConnectorAlgorithm::findOverlapsForOneProcess(
+   const int owner_rank,
+   NeighborSet& visible_base_nabrs,
+   NeighborSet::iterator& base_ni,
+   std::vector<int>& send_mesg,
+   const size_t remote_mapped_box_counter_index,
+   Connector& bridging_connector,
+   const MappedBoxTree& head_rbbt,
+   NeighborSet& referenced_head_nabrs) const
+{
+   bool refine_base = false;
+   bool coarsen_base = false;
+   if (bridging_connector.getHead().getRefinementRatio() ==
+       bridging_connector.getBase().getRefinementRatio()) {
+      /*
+       * Don't do any coarsen/refine because head and base have same
+       * refinement ratio.
+       */
+   } else if (bridging_connector.getHead().getRefinementRatio() <=
+              bridging_connector.getBase().getRefinementRatio()) {
+      coarsen_base = true;
+   } else if (bridging_connector.getHead().getRefinementRatio() >=
+              bridging_connector.getBase().getRefinementRatio()) {
+      refine_base = true;
+   }
+#ifdef DEBUG_CHECK_ASSERTIONS
+   else {
+      TBOX_ERROR("Can't coarsen in one dimension and refine in another");
+   }
+#endif
+
+   std::vector<MappedBox> found_nabrs, scratch_found_nabrs; // Should be made a member to avoid repetitive alloc/dealloc.  Reserve in privateBridge and used here.
+
+   while (base_ni != visible_base_nabrs.end() &&
+          base_ni->getOwnerRank() == owner_rank) {
+      const MappedBox& base_mapped_box = *base_ni;
+      if (s_print_bridge_steps == 'y') {
+         tbox::plog << "Finding neighbors for non-periodic base_mapped_box "
+                    << base_mapped_box << std::endl;
+      }
+      Box base_box = base_mapped_box.getBox();
+      base_box.grow(bridging_connector.getConnectorWidth());
+      if (refine_base) base_box.refine(bridging_connector.getRatio());
+      else if (coarsen_base) base_box.coarsen(bridging_connector.getRatio());
+      found_nabrs.clear();
+      head_rbbt.findOverlapMappedBoxes(found_nabrs, base_box);
+      if (s_print_bridge_steps == 'y') {
+         tbox::plog << "Found " << found_nabrs.size() << " neighbors:";
+         hier::MappedBoxContainerUtils::recursivePrintMappedBoxVector(found_nabrs, tbox::plog, "\n ");
+         tbox::plog << std::endl;
+      }
+      if (!found_nabrs.empty()) {
+         if (base_mapped_box.isPeriodicImage()) {
+            unshiftOverlappingNeighbors(
+               base_mapped_box,
+               found_nabrs,
+               scratch_found_nabrs,
+               bridging_connector.getHead().getRefinementRatio());
+         }
+         if (owner_rank != bridging_connector.getRank()) {
+            // Pack up info for sending.
+            ++send_mesg[remote_mapped_box_counter_index];
+            int subsize = 2 + 3 * static_cast<int>(found_nabrs.size());
+            send_mesg.insert(send_mesg.end(), subsize, -1);
+            int* submesg = &send_mesg[send_mesg.size() - subsize];
+            *(submesg++) = base_mapped_box.getLocalId().getValue();
+            *(submesg++) = static_cast<int>(found_nabrs.size());
+            for (std::vector<MappedBox>::const_iterator na = found_nabrs.begin();
+                 na != found_nabrs.end(); ++na) {
+               const MappedBox& head_nabr = *na;
+               referenced_head_nabrs.insert(head_nabr);
+               submesg[0] = head_nabr.getOwnerRank();
+               submesg[1] = head_nabr.getLocalId().getValue();
+               submesg[2] = head_nabr.getPeriodicShiftNumber();
+               submesg += 3;
+            }
+         } else {
+            // Save neighbor info locally.
+            NeighborSet tmp_nabrs;
+            bridging_connector.swapNeighbors(tmp_nabrs,
+               base_mapped_box.getGlobalId());
+            // Add found neighbors for base_mapped_box.
+            tmp_nabrs.insert(found_nabrs.begin(), found_nabrs.end());
+            bridging_connector.swapNeighbors(tmp_nabrs,
+               base_mapped_box.getGlobalId());
+         }
+      }
+      if (s_print_bridge_steps == 'y') {
+         tbox::plog << "Erasing visible base nabr " << (*base_ni) << std::endl;
+      }
+      visible_base_nabrs.erase(base_ni++);
+      if (s_print_bridge_steps == 'y') {
+         if (base_ni == visible_base_nabrs.end())
+            tbox::plog << "Next base nabr: end" << std::endl;
+         else
+            tbox::plog << "Next base nabr: " << *base_ni << std::endl;
+      }
+
+   }
+}
+
+/*
+ ***********************************************************************
+ * Shift neighbors by amount equal and opposite of a MappedBox's shift so that
+ * they become neighbors of the unshifed mapped_box.  If this results in a
+ * neighbor shift that is not in the shift catalog, discard the neighbor.
+ ***********************************************************************
+ */
+
+void OverlapConnectorAlgorithm::unshiftOverlappingNeighbors(
+   const MappedBox& mapped_box,
+   std::vector<MappedBox>& neighbors,
+   std::vector<MappedBox>& scratch_space,
+   const IntVector& neighbor_refinement_ratio) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(mapped_box, neighbor_refinement_ratio);
+
+   const PeriodicShiftCatalog* shift_catalog =
+      PeriodicShiftCatalog::getCatalog(mapped_box.getDim());
+
+   scratch_space.clear();
+   scratch_space.reserve(neighbors.size());
+   for (std::vector<MappedBox>::iterator na = neighbors.begin();
+        na != neighbors.end(); ++na) {
+      MappedBox& nabr = *na;
+      hier::IntVector sum_shift =
+         shift_catalog->shiftNumberToShiftDistance(nabr.getPeriodicShiftNumber())
+         - shift_catalog->shiftNumberToShiftDistance(mapped_box.getPeriodicShiftNumber());
+      const int new_shift_number = shift_catalog->shiftDistanceToShiftNumber(sum_shift);
+      if (new_shift_number != shift_catalog->getInvalidShiftNumber()) {
+         nabr.initialize(nabr, new_shift_number, neighbor_refinement_ratio);
+         scratch_space.push_back(nabr);
+      }
+   }
+   if (scratch_space.size() != neighbors.size()) {
+      // We have discarded some neighbors due to invalid shift.
+      neighbors.swap(scratch_space);
+   }
+}
+
+/*
+ ***********************************************************************
+ * Checking is done as follows:
+ *   - Rebuild the overlap containers using findOverlaps().
+ *     Note that the rebuilt overlap set is complete.
+ *   - Check the current overlap set against the rebuilt overlap set
+ *     to find missing overlaps and extra overlaps.
+ *
+ * Currently, the rebuilt overlaps are rebuilt using findOverlaps().
+ * Thus, it may be pointless to use this method as a check for that
+ * method.
+ ***********************************************************************
+ */
+
+void OverlapConnectorAlgorithm::findOverlapErrors(
+   const Connector& connector,
+   Connector& missing,
+   Connector& extra,
+   bool ignore_self_overlap) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (!connector.getBase().isInitialized() ||
+       !connector.getHead().isInitialized()) {
+      TBOX_ERROR(
+         "OverlapConnectorAlgorithm::findOverlapErrors: Cannot check overlaps\n"
+         << "when base or head mapped_box_level is uninitialized.");
+   }
+#endif
+
+   /*
+    * Obtain a globalized version of the head for checking.
+    */
+   const MappedBoxLevel& head = connector.getHead().getGlobalizedVersion();
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   /*
+    * Before checking on overlap errors, make sure the user gave a
+    * valid Connector.
+    *
+    * Each neighbor set should correspond to a base mapped box.
+    *
+    * Each referenced neighbor should exist in the head.
+    */
+   size_t num_base_consistency_errors = connector.checkConsistencyWithBase();
+   size_t num_head_consistency_errors = Connector::checkConsistencyWithHead(
+         connector.getNeighborhoodSets(), head);
+   if (num_base_consistency_errors > 0) {
+      tbox::perr
+      << "OverlapConnectorAlgorithm::findOverlapErrors: cannot check overlap errors\n"
+      << "for inconsistent base data.\n";
+   }
+   if (num_head_consistency_errors > 0) {
+      tbox::perr
+      << "OverlapConnectorAlgorithm::findOverlapErrors: cannot check overlap errors\n"
+      << "for inconsistent head data.\n";
+   }
+   if (num_base_consistency_errors || num_head_consistency_errors) {
+      TBOX_ERROR(
+         "OverlapConnectorAlgorithm::findOverlapErrors exiting due to\n"
+         << "inconsistent data.\n"
+         << "Base:\n" << connector.getBase().format("B->", 2)
+         << "Head:\n" << connector.getHead().format("H->", 2)
+         << "Connector:\n" << connector.format("C->", 3));
+   }
+#endif
+
+
+   /*
+    * Rebuild the overlap Connector for checking.
+    */
+   Connector rebuilt(
+      connector.getBase(),
+      connector.getHead(),
+      connector.getConnectorWidth());
+   findOverlaps_rbbt(rebuilt, head, ignore_self_overlap);
+
+
+   /*
+    * Check that the rebuilt overlaps match the existing overlaps.
+    *
+    * Currently, we use findOverlaps to rebuild the overlaps.
+    * Thus, it may be pointless to use this method
+    * as a check for that method.
+    */
+   Connector::computeNeighborhoodDifferences(
+      extra,
+      connector,
+      rebuilt);
+   TBOX_ASSERT(&extra.getBase() == &connector.getBase());
+   TBOX_ASSERT(&extra.getHead() == &connector.getHead());
+   Connector::computeNeighborhoodDifferences(
+      missing,
+      rebuilt,
+      connector);
+   TBOX_ASSERT(&missing.getBase() == &connector.getBase());
+   TBOX_ASSERT(&missing.getHead() == &connector.getHead());
+
+   return;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void OverlapConnectorAlgorithm::assertOverlapCorrectness(
+   const Connector& connector,
+   bool ignore_self_overlap,
+   bool assert_completeness,
+   bool ignore_periodic_images) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (!connector.getBase().isInitialized() ||
+       !connector.getHead().isInitialized()) {
+      TBOX_ERROR(
+         "OverlapConnectorAlgorithm::findOverlapErrors: Cannot check overlaps\n"
+         << "when base or head mapped_box_level is uninitialized.");
+
+   }
+#endif
+
+   int local_error_count =
+      checkOverlapCorrectness(connector,
+         ignore_self_overlap,
+         assert_completeness,
+         ignore_periodic_images);
+
+   const tbox::SAMRAI_MPI& mpi(connector.getMPI());
+   int max_error_count = local_error_count;
+   int rank_of_max = mpi.getRank();
+   if (mpi.getSize() > 1) {
+      IntIntStruct send, recv;
+      send.rank = recv.rank = mpi.getRank();
+      send.i = local_error_count;
+      mpi.Allreduce(&send, &recv, 1, MPI_2INT, MPI_MAXLOC);
+      max_error_count = recv.i;
+      rank_of_max = recv.rank;
+   }
+   if (max_error_count > 0) {
+      std::string dbgbord;
+      TBOX_ERROR(
+         "OverlapConnectorAlgorithm::assertOverlapCorrectness found missing and/or extra overlaps."
+         << "Error in connector, " << local_error_count
+         << " local errors, "
+         << max_error_count << " max errors on proc " << rank_of_max
+         << ":\n"
+         << connector.format(dbgbord, 2)
+         << "base mapped_box_level:\n" << connector.getBase().format(dbgbord, 2)
+         << "head mapped_box_level:\n" << connector.getHead().format(dbgbord, 2));
+   }
+}
+
+/*
+ ***********************************************************************
+ * Return number of missing and number of extra overlaps.
+ ***********************************************************************
+ */
+
+size_t OverlapConnectorAlgorithm::checkOverlapCorrectness(
+   const Connector& connector,
+   bool ignore_self_overlap,
+   bool assert_completeness,
+   bool ignore_periodic_images) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (!connector.getBase().isInitialized() ||
+       !connector.getHead().isInitialized()) {
+      TBOX_ERROR(
+         "OverlapConnectorAlgorithm::findOverlapErrors: Cannot check overlaps when\n"
+         << "base or head mapped_box_level is uninitialized.");
+
+   }
+#endif
+
+   Connector missing, extra;
+   findOverlapErrors(connector, missing, extra, ignore_self_overlap);
+
+   if (!assert_completeness) {
+      // Disregard missing overlaps by resetting missing to empty.
+      missing.initialize(
+         missing.getBase(),
+         missing.getHead(),
+         missing.getConnectorWidth());
+   } else if (ignore_periodic_images) {
+      // Disregard missing overlaps if they are incident on a periodic mapped_box.
+      const NeighborhoodSet& missing_overlaps = missing.getNeighborhoodSets();
+      NeighborSet nabrs;
+      for (NeighborhoodSet::const_iterator ei = missing_overlaps.begin();
+           ei != missing_overlaps.end(); ++ei) {
+         // Erase periodic neighbors from missing.
+         missing.swapNeighbors(nabrs, ei->first);
+         for (NeighborSet::iterator na = nabrs.begin();
+              na != nabrs.end(); /* incremented in loop */) {
+            if (na->isPeriodicImage()) {
+               nabrs.erase(na++); // Delete periodic image neighbor.
+            } else {
+               ++na;
+            }
+         }
+         missing.swapNeighbors(nabrs, ei->first);
+      }
+      missing.eraseEmptyNeighborSets();
+   }
+
+   const NeighborhoodSet& overlaps = connector.getNeighborhoodSets();
+   const NeighborhoodSet& missing_overlaps = missing.getNeighborhoodSets();
+   const NeighborhoodSet& extra_overlaps = extra.getNeighborhoodSets();
+
+   const GlobalId dummy_global_id;
+
+   /*
+    * Report the errors found, ordered by the MappedBox where the
+    * error appears.  In order to do this, we have to loop through
+    * missing_overlaps and extra_overlaps at the same time.
+    */
+
+   NeighborhoodSet::const_iterator im, ie, it;
+   for (im = missing_overlaps.begin(), ie = extra_overlaps.begin();
+        im != missing_overlaps.end() || ie != extra_overlaps.end();
+        /* incremented in loop */) {
+
+      const GlobalId& global_id_missing =
+         im == missing_overlaps.end() ? dummy_global_id : im->first;
+      const GlobalId& global_id_extra =
+         ie == extra_overlaps.end() ? dummy_global_id : ie->first;
+
+      if (im != missing_overlaps.end() && ie != extra_overlaps.end() &&
+          im->first == ie->first) {
+
+         /*
+          * im and ie are pointing at the same MappedBox.  Report the
+          * error for this MappedBox.
+          */
+
+         const MappedBox& mapped_box = *connector.getBase().getMappedBoxStrict(
+               global_id_missing);
+         tbox::perr << "Found " << im->second.size() << " missing and "
+                    << ie->second.size() << " extra overlaps for "
+                    << mapped_box << std::endl;
+         it = overlaps.find(global_id_missing);
+         if (it == overlaps.end()) {
+            tbox::perr << "  Current Neighbors (no neighbor set)." << std::endl;
+         } else {
+            const NeighborSet& nabrs = it->second;
+            tbox::perr << "  Current Neighbors (" << nabrs.size() << "):"
+                       << std::endl;
+            hier::Box ghost_box = mapped_box.getBox();
+            ghost_box.grow(connector.getConnectorWidth());
+            for (NeighborSet::const_iterator na = nabrs.begin();
+                 na != nabrs.end(); ++na) {
+               const MappedBox& nabr = *na;
+               hier::Box nabr_box = nabr.getBox();
+               if (connector.getHeadCoarserFlag()) nabr_box.refine(
+                     connector.getRatio());
+               else if (connector.getRatio() != 1) nabr_box.coarsen(
+                     connector.getRatio());
+               hier::Box ovlap = ghost_box * nabr_box;
+               tbox::perr << "    " << nabr << '_' << nabr.getBox().numberCells()
+                          << "\tov" << ovlap << '_' << ovlap.numberCells()
+                          << std::endl;
+            }
+         }
+         {
+            const NeighborSet& nabrs = im->second;
+            tbox::perr << "  Missing Neighbors (" << nabrs.size() << "):"
+                       << std::endl;
+            hier::Box ghost_box = mapped_box.getBox();
+            ghost_box.grow(connector.getConnectorWidth());
+            for (NeighborSet::const_iterator na = nabrs.begin();
+                 na != nabrs.end(); ++na) {
+               const MappedBox& nabr = *na;
+               hier::Box nabr_box = nabr.getBox();
+               if (connector.getHeadCoarserFlag()) nabr_box.refine(
+                     connector.getRatio());
+               else if (connector.getRatio() != 1) nabr_box.coarsen(
+                     connector.getRatio());
+               hier::Box ovlap = ghost_box * nabr_box;
+               tbox::perr << "    " << nabr << '_' << nabr.getBox().numberCells()
+                          << "\tov" << ovlap << '_' << ovlap.numberCells()
+                          << std::endl;
+            }
+         }
+         {
+            const NeighborSet& nabrs = ie->second;
+            tbox::perr << "  Extra Neighbors (" << nabrs.size() << "):"
+                       << std::endl;
+            hier::Box ghost_box = mapped_box.getBox();
+            ghost_box.grow(connector.getConnectorWidth());
+            for (NeighborSet::const_iterator na = nabrs.begin();
+                 na != nabrs.end(); ++na) {
+               const MappedBox& nabr = *na;
+               hier::Box nabr_box = nabr.getBox();
+               if (connector.getHeadCoarserFlag()) nabr_box.refine(
+                     connector.getRatio());
+               else if (connector.getRatio() != 1) nabr_box.coarsen(
+                     connector.getRatio());
+               hier::Box ovlap = ghost_box * nabr_box;
+               tbox::perr << "    " << nabr << '_' << nabr.getBox().numberCells()
+                          << "\tov" << ovlap << '_' << ovlap.numberCells()
+                          << std::endl;
+            }
+         }
+         ++im;
+         ++ie;
+
+      } else if ((ie == extra_overlaps.end()) ||
+                 (im != missing_overlaps.end() && im->first < ie->first)) {
+
+         /*
+          * im goes before ie (or ie has reached the end).  Report the
+          * errors for the MappedBox at im.
+          */
+
+         const MappedBox& mapped_box = *connector.getBase().getMappedBoxStrict(
+               global_id_missing);
+         tbox::perr << "Found " << im->second.size()
+                    << " missing overlaps for " << mapped_box << std::endl;
+         it = overlaps.find(global_id_missing);
+         if (it == overlaps.end()) {
+            tbox::perr << "    Current Neighbors (no neighbor set)."
+                       << std::endl;
+         } else {
+            const NeighborSet& nabrs = it->second;
+            tbox::perr << "  Current Neighbors (" << nabrs.size() << "):"
+                       << std::endl;
+            hier::Box ghost_box = mapped_box.getBox();
+            ghost_box.grow(connector.getConnectorWidth());
+            for (NeighborSet::const_iterator na = nabrs.begin();
+                 na != nabrs.end(); ++na) {
+               const MappedBox& nabr = *na;
+               hier::Box nabr_box = nabr.getBox();
+               if (connector.getHeadCoarserFlag()) nabr_box.refine(
+                     connector.getRatio());
+               else if (connector.getRatio() != 1) nabr_box.coarsen(
+                     connector.getRatio());
+               hier::Box ovlap = ghost_box * nabr_box;
+               tbox::perr << "    " << nabr << '_' << nabr.getBox().numberCells()
+                          << "\tov" << ovlap << '_' << ovlap.numberCells()
+                          << std::endl;
+            }
+         }
+         {
+            const NeighborSet& nabrs = im->second;
+            tbox::perr << "  Missing Neighbors (" << nabrs.size() << "):"
+                       << std::endl;
+            hier::Box ghost_box = mapped_box.getBox();
+            ghost_box.grow(connector.getConnectorWidth());
+            for (NeighborSet::const_iterator na = nabrs.begin();
+                 na != nabrs.end(); ++na) {
+               const MappedBox& nabr = *na;
+               hier::Box nabr_box = nabr.getBox();
+               if (connector.getHeadCoarserFlag()) nabr_box.refine(
+                     connector.getRatio());
+               else if (connector.getRatio() != 1) nabr_box.coarsen(
+                     connector.getRatio());
+               hier::Box ovlap = ghost_box * nabr_box;
+               tbox::perr << "    " << nabr << '_' << nabr.getBox().numberCells()
+                          << "\tov" << ovlap << '_' << ovlap.numberCells()
+                          << std::endl;
+            }
+         }
+         ++im;
+      } else if ((im == missing_overlaps.end()) ||
+                 (ie != extra_overlaps.end() && ie->first < im->first)) {
+
+         /*
+          * ie goes before im (or im has reached the end).  Report the
+          * errors for the MappedBox at ie.
+          */
+
+         const MappedBox& mapped_box = *connector.getBase().getMappedBoxStrict(
+               global_id_extra);
+         tbox::perr << "Found " << ie->second.size()
+                    << " extra overlaps for " << mapped_box << std::endl;
+         it = overlaps.find(global_id_extra);
+         if (it == overlaps.end()) {
+            tbox::perr << "  Current Neighbors (no neighbor set)." << std::endl;
+         } else {
+            const NeighborSet& nabrs = it->second;
+            tbox::perr << "  Current Neighbors (" << nabrs.size() << "):"
+                       << std::endl;
+            hier::Box ghost_box = mapped_box.getBox();
+            ghost_box.grow(connector.getConnectorWidth());
+            for (NeighborSet::const_iterator na = nabrs.begin();
+                 na != nabrs.end(); ++na) {
+               const MappedBox& nabr = *na;
+               hier::Box nabr_box = nabr.getBox();
+               if (connector.getHeadCoarserFlag()) nabr_box.refine(
+                     connector.getRatio());
+               else if (connector.getRatio() != 1) nabr_box.coarsen(
+                     connector.getRatio());
+               hier::Box ovlap = ghost_box * nabr_box;
+               tbox::perr << "    " << nabr << '_' << nabr.getBox().numberCells()
+                          << "\tov" << ovlap << '_' << ovlap.numberCells()
+                          << std::endl;
+            }
+         }
+         {
+            const NeighborSet& nabrs = ie->second;
+            tbox::perr << "  Extra Neighbors (" << nabrs.size() << "):"
+                       << std::endl;
+            hier::Box ghost_box = mapped_box.getBox();
+            ghost_box.grow(connector.getConnectorWidth());
+            for (NeighborSet::const_iterator na = nabrs.begin();
+                 na != nabrs.end(); ++na) {
+               const MappedBox& nabr = *na;
+               hier::Box nabr_box = nabr.getBox();
+               if (connector.getHeadCoarserFlag()) nabr_box.refine(
+                     connector.getRatio());
+               else if (connector.getRatio() != 1) nabr_box.coarsen(
+                     connector.getRatio());
+               hier::Box ovlap = ghost_box * nabr_box;
+               tbox::perr << "    " << nabr << '_' << nabr.getBox().numberCells()
+                          << "\tov" << ovlap << '_' << ovlap.numberCells()
+                          << std::endl;
+            }
+         }
+         ++ie;
+      }
+
+   }
+
+   return missing.getNeighborhoodSets().size() + extra.getNeighborhoodSets().size();
+}
+
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void OverlapConnectorAlgorithm::initializeCallback()
+{
+
+   if (s_print_bridge_steps == 0) {
+      if (tbox::InputManager::inputDatabaseExists()) {
+         s_print_bridge_steps = 'n';
+         tbox::Pointer<tbox::Database> idb =
+            tbox::InputManager::getInputDatabase();
+         if (idb->isDatabase("OverlapConnectorAlgorithm")) {
+            tbox::Pointer<tbox::Database> ocu_db =
+               idb->getDatabase("OverlapConnectorAlgorithm");
+            s_print_bridge_steps =
+               ocu_db->getCharWithDefault("print_bridge_steps",
+                  s_print_bridge_steps);
+         }
+      }
+   }
+
+   t_find_overlaps_rbbt = tbox::TimerManager::getManager()->
+      getTimer("hier::OverlapConnectorAlgorithm::findOverlaps_rbbt()");
+   t_bridge = tbox::TimerManager::getManager()->
+      getTimer("hier::OverlapConnectorAlgorithm::privateBridge()");
+   t_bridge_discover = tbox::TimerManager::getManager()->
+      getTimer("hier::OverlapConnectorAlgorithm::privateBridge()_discover");
+   t_bridge_discover_get_neighbors = tbox::TimerManager::getManager()->
+      getTimer(
+         "hier::OverlapConnectorAlgorithm::privateBridge()_discover_get_neighbors");
+   t_bridge_discover_form_rbbt = tbox::TimerManager::getManager()->
+      getTimer(
+         "hier::OverlapConnectorAlgorithm::privateBridge()_discover_form_rbbt");
+   t_bridge_discover_find_overlaps = tbox::TimerManager::getManager()->
+      getTimer(
+         "hier::OverlapConnectorAlgorithm::privateBridge()_discover_find_overlaps");
+   t_bridge_share = tbox::TimerManager::getManager()->
+      getTimer("hier::OverlapConnectorAlgorithm::privateBridge()_share");
+   t_bridge_comm_init = tbox::TimerManager::getManager()->
+      getTimer("hier::OverlapConnectorAlgorithm::privateBridge()_comm_init");
+   t_bridge_unpack = tbox::TimerManager::getManager()->
+      getTimer("hier::OverlapConnectorAlgorithm::privateBridge()_unpack");
+   t_bridge_MPI_wait = tbox::TimerManager::getManager()->
+      getTimer("hier::OverlapConnectorAlgorithm::privateBridge()_MPI_wait");
+}
+
+/*
+ ***************************************************************************
+ * Release static timers.  To be called by shutdown registry to make sure
+ * memory for timers does not leak.
+ ***************************************************************************
+ */
+
+void OverlapConnectorAlgorithm::finalizeCallback()
+{
+   t_find_overlaps_rbbt.setNull();
+   t_bridge.setNull();
+   t_bridge_discover.setNull();
+   t_bridge_discover_get_neighbors.setNull();
+   t_bridge_discover_form_rbbt.setNull();
+   t_bridge_discover_find_overlaps.setNull();
+   t_bridge_share.setNull();
+   t_bridge_comm_init.setNull();
+   t_bridge_unpack.setNull();
+   t_bridge_MPI_wait.setNull();
+
+   if (s_class_mpi.getCommunicator() != tbox::SAMRAI_MPI::commNull) {
+      s_class_mpi.freeCommunicator();
+   }
+
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/OverlapConnectorAlgorithm.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/OverlapConnectorAlgorithm.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,631 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Algorithms for working with overlap Connectors. 
+ *
+ ************************************************************************/
+#ifndef included_hier_OverlapConnectorAlgorithm
+#define included_hier_OverlapConnectorAlgorithm
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Connector.h"
+#include "SAMRAI/hier/MappedBox.h"
+#include "SAMRAI/hier/MappedBoxTree.h"
+#include "SAMRAI/hier/MappedBoxLevel.h"
+#include "SAMRAI/tbox/AsyncCommPeer.h"
+#include "SAMRAI/tbox/AsyncCommStage.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+
+#include <map>
+
+namespace SAMRAI {
+namespace hier {
+
+class Connector;
+
+/*!
+ * @brief Algorithms for working Connectors whose neighbor data
+ * represents overlaps.
+ *
+ * An overlap Connector is one in which neighbors represent a pair of
+ * overlapping MappedBoxes.  If a base MappedBox grown by the
+ * Connector width overlaps a head MappedBox, the head MappedBox is a
+ * neighbor of the base MappedBox.  This class implements some
+ * functions for working with a overlap Connectors.
+ *
+ * OverlapConnectorAlgorithm objects create, check and operate on overlap
+ * Connectors.
+ */
+class OverlapConnectorAlgorithm
+{
+
+public:
+   /*!
+    * @brief Constructor.
+    */
+   explicit OverlapConnectorAlgorithm();
+
+   /*!
+    * @brief Destructor.
+    */
+   virtual ~OverlapConnectorAlgorithm();
+
+   /*!
+    * @brief Discover and add overlaps from base to head for an
+    * overlap Connector.
+    *
+    * The Connector's neighbor information is modified.
+    *
+    * If the Connector's head is not GLOBALIZED, a copy is made and
+    * globalized.  Once a globalized head is obtained, this method
+    * simply calls findOverlaps(const MappedBoxLevel &globalized_head).
+    *
+    * @param[in,out] connector
+    * @param[in] ignore_self_overlap
+    */
+   void
+   findOverlaps(
+      Connector& connector,
+      const bool ignore_self_overlap = false) const;
+
+   /*
+    * @brief Discover and add overlaps from base to
+    * (a globalized version of the) head for an overlap Connector.
+    *
+    * A MappedBox's overlap with another MappedBox is disregarded if:
+    * @li @c ignore_self_overlap is true and
+    * @li the two MappedBoxes have the same MappedBoxId and.
+    * @li the Connectors's base and head have the same refinement ratio.
+    *
+    * @param[in,out] connector
+    * @param[in] globalized_head
+    * @param[in] ignore_self_overlap
+    */
+   void
+   findOverlaps(
+      Connector& connector,
+      const MappedBoxLevel& globalized_head,
+      const bool ignore_self_overlap = false) const;
+
+   /*!
+    * @brief For a given Connector, get the subset of overlapping neighbors
+    * defined by the given Connector width.
+    *
+    * The difference between extractNeighbors() and
+    * Connector::getNeighbors() is that extractNeighbors() extracts
+    * the subset of the currently stored neighbors associated with the
+    * given Connector width.  getNeighbors() returns the entire
+    * neighbor set, which corresponds to the Connector's width.  The
+    * specified Connector width must be less than or equal to the
+    * Connector's width.
+    *
+    * @param[out] neighbors
+    * @param[in] connector
+    * @param[in] global_id
+    * @param[in] connector_width
+    */
+   void
+   extractNeighbors(
+      Connector::NeighborSet& neighbors,
+      const Connector& connector,
+      const GlobalId& global_id,
+      const IntVector& connector_width) const;
+
+   /*!
+    * @brief Compute the overlap Connectors between MappedBoxLevels
+    * efficiently by using information from existing overlap
+    * Connectors.
+    *
+    * Let east, west and center be MappedBoxLevels.  Given
+    * overlap Connectors between center and east and between center and
+    * west, compute overlap Connectors between east and west.
+    *
+    * @code
+    *
+    *               Input:                            Output:
+    *
+    *                                               west to east
+    *      (west)              (east)      (west) ---------------> (east)
+    *        \ ^                ^ /               <---------------
+    *         \ \center  center/ /                  east to west
+    *          \ \ to     to  / /
+    *       west\ \west  east/ /east
+    *        to  \ \        / /  to
+    *       center\ \      / /center
+    *              v \    / v
+    *               (center)
+    *
+    * @endcode
+    *
+    * The "bridge" is the Connectors between @c west and @c east.
+    * Bridging is an algorithm for finding their overlaps using
+    * existing overlaps incident from @c center.  This is more
+    * efficient than findOverlaps() because it does not require
+    * acquiring, storing or searching globalized data.
+    *
+    * Preconditions:
+    *
+    * - Four input Connectors refer to the center MappedBoxLevel, two
+    * refer to the west, and two refer to the east.  The center, east
+    * and west MappedBoxLevels must be the same regardless of what
+    * Connector is used to get them.  For example, <tt>
+    * &center_to_west.getHead() == &west_to_center.getBase() </tt> must
+    * be true.
+    *
+    * - @c west_to_center and @c center_to_west must be mutual transposes.
+    *
+    * - @c east_to_center and @c center_to_east must be mutual transposes.
+    *
+    * Postconditions:
+    *
+    * @li @c west and @c east, as referenced by the output Connectors
+    * are heads of @c center_to_west and @c center_to_east.
+    *
+    * @li Widths of the output Connectors will be either @c
+    * center_to_east's width reduced by @c center_growth_to_nest_west
+    * or @c center_to_west's width reduced by @c
+    * center_growth_to_nest_east, which ever is greater.  Output
+    * Connector widths are still limited by the @c
+    * connector_width_limit argument.  All comparisons are done after
+    * the appropriate index space conversions, of course.
+    *
+    * @note
+    *
+    * @li Although @c east, @c west and @c center are not explicit
+    * parameters, they are specified implicitly through the input
+    * Connectors.
+    *
+    * @li The bridge operation works in the degenerate case where @c
+    * east and @c west are the same object.  In that case, @c
+    * west_to_east and @c east_to_west should also be the same object.
+    *
+    * @li Bridging finds as many overlaps as it can, given the inputs,
+    * but can only guarantee that the output Connectors are complete
+    * overlap Connectors if there is nesting as specified by the
+    * arguments @c center_growth_to_nest_west and/or @c
+    * center_growth_to_nest_east.  Nesting is not checked, because
+    * checking requires an iterative non-scalable computation.
+    * Nesting is best determined by the code that created the
+    * MappedBoxLevels involved.  Bridging is meant to be fast and
+    * scalable.
+    *
+    * @param[out] west_to_east
+    * @param[out] east_to_west
+    * @param[in] west_to_center
+    * @param[in] center_to_east
+    * @param[in] east_to_center
+    * @param[in] center_to_west
+    *
+    * @param center_growth_to_nest_west The amount by which the center
+    * MappedBoxLevel must grow to nest the west MappedBoxLevel.
+    * Bridging guarantees completeness if the width of @b
+    * center_to_east exceeds this amount.  If unknown, set to negative
+    * value if unknown so it won't be considered when computing the
+    * output Connector widths.
+    *
+    * @param center_growth_to_nest_east The amount by which the center
+    * MappedBoxLevel must grow to nest the east MappedBoxLevel.
+    * Bridging guarantees completeness if the width of @b
+    * center_to_west exceeds this amount.  If unknown, set to negative
+    * value if unknown so it won't be considered when computing the
+    * output Connector widths.
+    *
+    * @param connector_width_limit specifies the maximum Connector
+    * width to compute overlaps for.  The connector_width should be in
+    * the coarser of the east and west indices.  If
+    * connector_width_limit is negative, use the default
+    * connector_width, which is the larger of the center_to_west and
+    * center_to_east Connectors', coarsened into the coarser of east
+    * and west indices.
+    */
+   void
+   bridgeWithNesting(
+      Connector& west_to_east,
+      Connector& east_to_west,
+      const Connector& west_to_center,
+      const Connector& center_to_east,
+      const Connector& east_to_center,
+      const Connector& center_to_west,
+      const IntVector& center_growth_to_nest_west,
+      const IntVector& center_growth_to_nest_east,
+      const IntVector& connector_width_limit) const;
+
+   /*!
+    * @brief A version of bridge without any guarantee of nesting.
+    *
+    * The east and west MappedBoxLevels are assumed
+    * to nest in the center MappedBoxLevel.  If they do not,
+    * the results are not guaranteed to be complete.
+    *
+    * The output Connector widths are the greater of the widths of @c
+    * center_to_east and @c center_to_west (converted into the proper
+    * index space, of course).
+    *
+    * @param[out] west_to_east
+    * @param[out] east_to_west
+    * @param[in] west_to_center
+    * @param[in] center_to_east
+    * @param[in] east_to_center
+    * @param[in] center_to_west
+    * @param[in] connector_width_limit
+    *
+    * @see bridgeWithNesting( Connector& west_to_east, Connector& east_to_west, const Connector& west_to_center, const Connector& center_to_east, const Connector& east_to_center, const Connector& center_to_west, const IntVector& center_growth_to_nest_west, const IntVector& center_growth_to_nest_east, const IntVector& connector_width_limit) const;
+    */
+   void
+   bridge(
+      Connector& west_to_east,
+      Connector& east_to_west,
+      const Connector& west_to_center,
+      const Connector& center_to_east,
+      const Connector& east_to_center,
+      const Connector& center_to_west,
+      const IntVector& connector_width_limit) const;
+
+   /*!
+    * @brief A version of bridge without computing the reverse bridge.
+    *
+    * @param[out] west_to_east
+    * @param[in] west_to_center
+    * @param[in] center_to_east
+    * @param[in] east_to_center
+    * @param[in] center_to_west
+    * @param[in] connector_width_limit
+    *
+    * @see bridge( Connector& west_to_east, Connector& east_to_west, const Connector& west_to_center, const Connector& center_to_east, const Connector& east_to_center, const Connector& center_to_west, const IntVector& connector_width_limit) const;
+    */
+   void
+   bridge(
+      Connector& west_to_east,
+      const Connector& west_to_center,
+      const Connector& center_to_east,
+      const Connector& east_to_center,
+      const Connector& center_to_west,
+      const IntVector& connector_width_limit) const;
+
+   /*!
+    * @brief A version of bridge without limiting the connector_width of the result.
+    *
+    * @param[out] west_to_east
+    * @param[out] east_to_west
+    * @param[in] west_to_center
+    * @param[in] center_to_east
+    * @param[in] east_to_center
+    * @param[in] center_to_west
+    *
+    * @see bridge( Connector& west_to_east, Connector& east_to_west, const Connector& west_to_center, const Connector& center_to_east, const Connector& east_to_center, const Connector& center_to_west, const IntVector& connector_width_limit) const;
+    */
+   void
+   bridge(
+      Connector& west_to_east,
+      Connector& east_to_west,
+      const Connector& west_to_center,
+      const Connector& center_to_east,
+      const Connector& east_to_center,
+      const Connector& center_to_west) const;
+
+   /*!
+    * @brief A version of bridge without computing the reverse bridge
+    * and without limiting the connector_width of the result.
+    *
+    * @param[out] west_to_east
+    * @param[in] west_to_center
+    * @param[in] center_to_east
+    * @param[in] east_to_center
+    * @param[in] center_to_west
+    *
+    * @see bridge( Connector& west_to_east, Connector& east_to_west, const Connector& west_to_center, const Connector& center_to_east, const Connector& east_to_center, const Connector& center_to_west, const IntVector& connector_width_limit) const;
+    */
+   void
+   bridge(
+      Connector& west_to_east,
+      const Connector& west_to_center,
+      const Connector& center_to_east,
+      const Connector& east_to_center,
+      const Connector& center_to_west) const;
+
+   /*!
+    * @brief Shrink the current Connector width and discard overlaps
+    * that do not represent an overlap.
+    *
+    * @par Assertions
+    * The new Connector width must be less than or equal to the
+    * current value, or an unrecoverable assertion is thrown.
+    *
+    * @param[out] connector
+    * @param[in] new_width
+    */
+   void
+   shrinkConnectorWidth(
+      Connector& connector,
+      const IntVector& new_width) const;
+
+   /*!
+    * @brief When @c do_check is true, turn on sanity checks for input
+    * parameters.
+    *
+    * @note
+    * Sanity checks occur at the beginning of certain methods only.
+    * The checks are expensive and meant mainly for debugging.
+    *
+    * @param[in] do_check
+    */
+   void
+   setSanityCheckMethodPreconditions(
+      bool do_check);
+
+   /*!
+    * @brief When @c do_check is true, turn on sanity checks for outputs
+    *
+    * @note
+    * Sanity checks occur at the end of certain methods only.
+    * The checks are expensive and meant mainly for debugging.
+    *
+    * @param[in] do_check
+    */
+   void
+   setSanityCheckMethodPostconditions(
+      bool do_check);
+
+   /*!
+    * Check that overlap data is correct (represents overlaps) for the
+    * given Connector.
+    *
+    * Checking is done as follows:
+    *   - Find overlap errors using @c findOverlapErrors.().
+    *   - Report overlap errors to @c tbox::perr.
+    *   - Return number of local errors.
+    *
+    * @note
+    * This is an expensive operation (it uses @b findOverlapErrors())
+    * and should only be used for debugging.
+    *
+    * @see findOverlaps()
+    *
+    * @param[in] connector
+    * @param[in] ignore_self_overlap Ignore a mapped_box's overlap with itself
+    * @param[in] assert_completeness If false, ignore missing overlaps. This will
+    *   still look for overlaps that should not be there.
+    * @param[in] ignore_periodic_images If true, do not require neighbors
+    *   that are periodic images.
+    *
+    * @return Number of overlap errors found locally.
+    */
+   size_t
+   checkOverlapCorrectness(
+      const Connector& connector,
+      bool ignore_self_overlap = false,
+      bool assert_completeness = true,
+      bool ignore_periodic_images = false) const;
+
+   /*!
+    * @brief Assert overlap correctness.
+    *
+    * @par Assertions
+    * if an error is found, the method will write out diagnostic information
+    * and throw an an error on all processes.
+    *
+    * This is an expensive check.
+    *
+    * @see checkOverlapCorrectness().
+    *
+    * @param[in] connector
+    * @param[in] ignore_self_overlap
+    * @param[in] assert_completeness
+    * @param[in] ignore_periodic_images
+    */
+   void
+   assertOverlapCorrectness(
+      const Connector& connector,
+      bool ignore_self_overlap = false,
+      bool assert_completeness = true,
+      bool ignore_periodic_images = false) const;
+
+   /*!
+    * @brief Find errors in overlap data of an overlap Connector.
+    *
+    * An error is either a missing overlap or an extra overlap.
+    *
+    * This is an expensive operation and should only be used for
+    * debugging.
+    *
+    * @par Assertions
+    * This version throws an assertion only if it finds inconsistent
+    * Connector data.  Missing and extra overlaps are returned but do
+    * not cause an assertion.
+    *
+    * @param[in] connector
+    * @param[out] missing
+    * @param[out] extra
+    * @param[in] ignore_self_overlap
+    */
+   void
+   findOverlapErrors(
+      const Connector& connector,
+      Connector& missing,
+      Connector& extra,
+      bool ignore_self_overlap = false) const;
+
+private:
+   // Internal shorthand.
+   typedef Connector::NeighborSet NeighborSet;
+
+   //! @brief Data structure for MPI reductions.
+   struct IntIntStruct { int i;
+                         int rank;
+   };
+
+   /*!
+    * @brief This is where the bridge algorithm is implemented.
+    * All public bridge interfaces call this method underneath.
+    *
+    * @param west_nesting_is_known Whether we know how west nests in
+    * center.
+    *
+    * @param cent_growth_to_nest_west Amount center MappedBoxLevel has
+    * to grow to nest west MappedBoxLevel (if known).
+    *
+    * @param west_nesting_is_known Whether we known how much center
+    * level has to grow to nest west level.
+    *
+    * @param east_nesting_is_known Whether we know how east nests in
+    * center.
+    *
+    * @param east_nesting_is_known Whether we known how much center
+    * level has to grow to nest east level.
+    *
+    * @param cent_growth_to_nest_east Amount center MappedBoxLevel has
+    * to grow to nest east MappedBoxLevel (if known).
+    *
+    * @param connector_width_limit specifies the maximum Connector
+    * width to compute overlaps for (negative if unlimited).  If
+    * connector_width_limit is negative, do not apply any limit.  The
+    * connector_width should be in the coarser of the east and west
+    * indices.
+    */
+   void
+   privateBridge(
+      Connector& west_to_east,
+      Connector* east_to_west,
+      const Connector& west_to_cent,
+      const Connector& cent_to_east,
+      const Connector& east_to_cent,
+      const Connector& cent_to_west,
+      bool west_nesting_is_known,
+      const IntVector& cent_growth_to_nest_west,
+      bool east_nesting_is_known,
+      const IntVector& cent_growth_to_nest_east,
+      const IntVector& connector_width_limit) const;
+
+   /*!
+    * @brief Find overlap and save in bridging connector or pack
+    * into send message, used in privateBridge().
+    */
+   void
+   findOverlapsForOneProcess(
+      const int curr_owner,
+      NeighborSet& visible_base_nabrs,
+      NeighborSet::iterator& base_ni,
+      std::vector<int>& send_mesg,
+      const size_t remote_mapped_box_counter_index,
+      Connector& bridging_connector,
+      const MappedBoxTree& head_rbbt,
+      NeighborSet& referenced_head_nabrs) const;
+
+   //! @brief Utility used in privateBridge()
+   void
+   unshiftOverlappingNeighbors(
+      const MappedBox& mapped_box,
+      std::vector<MappedBox>& neighbors,
+      std::vector<MappedBox>& scratch_space,
+      const IntVector& neighbor_refinement_ratio) const;
+
+   //! @brief Send discovery to one processor during privateBridge().
+   void
+   sendDiscoveryToOneProcess(
+      std::vector<int>& send_mesg,
+      NeighborSet& referenced_east_nabrs,
+      NeighborSet& referenced_west_nabrs,
+      tbox::AsyncCommPeer<int>& sendto_peer) const;
+
+   //! @brief Unpack message sent by sendDiscoverytoOneProcess().
+   void
+   unpackDiscoveryMessage(
+      const tbox::AsyncCommPeer<int>* peer,
+      Connector& west_to_east,
+      Connector* east_to_west) const;
+
+   /*!
+    * @brief Discover and add overlaps from base and externally
+    * provided head mapped_box_level.
+    *
+    * Relationships found are added to appropriate neighbor lists.  No overlap is
+    * removed.  If existing overlaps are invalid, remove them first.
+    *
+    * The provided head should be like d_head, but if necessary,
+    * it may be a globalized version of d_head.  It should have
+    * the same refinement ratio as d_head.
+    *
+    * The ignore_self_overlap directs the method to not list
+    * a mapped_box as its own neighbor.  This should be true only
+    * when the head and tail objects represent the same mapped_box_level
+    * (regardless of whether they are the same objects), and
+    * you want to disregard self-overlaps.
+    * Two mapped_boxes are considered the same if
+    * - The mapped_boxes are equal by comparison (they have the same
+    *   owner and the same indices), and
+    * - They are from mapped_box_levels with the same refinement ratio.
+    */
+   void
+   findOverlaps_rbbt(
+      Connector& connector,
+      const MappedBoxLevel& head,
+      const bool ignore_self_overlap = false) const;
+
+
+   /*!
+    * @brief Set up things for the entire class.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   initializeCallback();
+
+   /*!
+    * @brief Free statics.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   finalizeCallback();
+
+   /*!
+    * @brief Private communicator object shared by all objects in class,
+    * protecting internal communication from mixing with external.
+    *
+    * For communication, we usually use the SAMRAI_MPI of the
+    * Connectors, and this object is mainly for debugging.  If we
+    * suspect interference from unrelated communication calls, we
+    * resort to this exclusive SAMRAI_MPI object to rule out that
+    * possibility.
+    */
+   static tbox::SAMRAI_MPI s_class_mpi;
+   /*!
+    * @brief Tag to use (and increment) at beginning of operations that
+    * require nearest-neighbor communication, to aid in eliminating
+    * mixing of messages from different internal operations.
+    *
+    * Using unique tags was important to the early development of this
+    * class but may not be necessary anymore.
+    */
+   static int s_operation_mpi_tag;
+
+   // Extra checks independent of optimization/debug.
+   static char s_print_bridge_steps;
+
+   static tbox::Pointer<tbox::Timer> t_find_overlaps_rbbt;
+   static tbox::Pointer<tbox::Timer> t_bridge;
+   static tbox::Pointer<tbox::Timer> t_bridge_discover;
+   static tbox::Pointer<tbox::Timer> t_bridge_discover_get_neighbors;
+   static tbox::Pointer<tbox::Timer> t_bridge_discover_form_rbbt;
+   static tbox::Pointer<tbox::Timer> t_bridge_discover_find_overlaps;
+   static tbox::Pointer<tbox::Timer> t_bridge_share;
+   static tbox::Pointer<tbox::Timer> t_bridge_comm_init;
+   static tbox::Pointer<tbox::Timer> t_bridge_unpack;
+   static tbox::Pointer<tbox::Timer> t_bridge_MPI_wait;
+
+   bool d_sanity_check_method_preconditions;
+   bool d_sanity_check_method_postconditions;
+
+   static tbox::StartupShutdownManager::Handler
+   s_initialize_finalize_handler;
+
+};
+
+}
+}
+
+#endif // included_hier_OverlapConnectorAlgorithm
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/Patch.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/Patch.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,409 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Patch container class for patch data objects 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_Patch_C
+#define included_hier_Patch_C
+
+#include "SAMRAI/hier/Patch.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/PatchDataFactory.h"
+
+#include <typeinfo>
+#include <string>
+
+#define HIER_PATCH_VERSION (2)
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/Patch.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+ *************************************************************************
+ *									*
+ * Allocate a patch container but do not instantiate any components.	*
+ *									*
+ *************************************************************************
+ */
+
+Patch::Patch(
+   const MappedBox& mapped_box,
+   tbox::Pointer<PatchDescriptor> descriptor):
+   d_mapped_box(mapped_box),
+   d_descriptor(descriptor),
+   d_patch_data(d_descriptor->getMaxNumberRegisteredComponents()),
+   d_patch_level_number(-1),
+   d_patch_in_hierarchy(false)
+{
+   TBOX_ASSERT(mapped_box.getLocalId() >= 0);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * The virtual destructor does nothing; all memory deallocation is	*
+ * managed automatically by the pointer and array classes.		*
+ *									*
+ *************************************************************************
+ */
+
+Patch::~Patch()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Calculate the amount of memory space required to allocate the		*
+ * specified component(s).  This information can then be used by a	*
+ * fixed-size memory allocator.						*
+ *									*
+ *************************************************************************
+ */
+
+size_t Patch::getSizeOfPatchData(
+   const int id) const
+{
+   return d_descriptor->getPatchDataFactory(id)->getSizeOfMemory(
+      d_mapped_box.getBox());
+}
+
+size_t
+Patch::getSizeOfPatchData(
+   const ComponentSelector& components) const
+{
+   size_t size = 0;
+   const int max_set_component = components.getMaxIndex();
+
+   for (int i = 0; i < max_set_component && components.isSet(i); i++) {
+      size += d_descriptor->getPatchDataFactory(i)->getSizeOfMemory(
+         d_mapped_box.getBox());
+   }
+
+   return size;
+}
+
+/*
+ *************************************************************************
+ *
+ * Allocate the specified patch data object(s) on the patch.
+ *
+ *************************************************************************
+ */
+
+void Patch::allocatePatchData(
+   const int id,
+   const double time)
+{
+   const int ncomponents = d_descriptor->getMaxNumberRegisteredComponents();
+
+   TBOX_ASSERT((id >= 0) && (id < ncomponents));
+
+   if (ncomponents > d_patch_data.getSize()) {
+      d_patch_data.resizeArray(ncomponents);
+   }
+
+   if ( !checkAllocated(id) ) {
+      d_patch_data[id] =
+         d_descriptor->getPatchDataFactory(id)->allocate(*this);
+   }
+   d_patch_data[id]->setTime(time);
+}
+
+void Patch::allocatePatchData(
+   const ComponentSelector& components,
+   const double time)
+{
+   const int ncomponents = d_descriptor->getMaxNumberRegisteredComponents();
+   if (ncomponents > d_patch_data.getSize()) {
+      d_patch_data.resizeArray(ncomponents);
+   }
+
+   for (int i = 0; i < ncomponents; i++) {
+      if (components.isSet(i)) {
+         if ( !checkAllocated(i) ) {
+            d_patch_data[i] =
+               d_descriptor->getPatchDataFactory(i)->allocate(*this);
+         }
+         d_patch_data[i]->setTime(time);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Deallocate (or set to null) the specified component(s).		*
+ *									*
+ *************************************************************************
+ */
+
+void Patch::deallocatePatchData(
+   const int id)
+{
+   TBOX_ASSERT((id >= 0) &&
+      (id < d_descriptor->getMaxNumberRegisteredComponents()));
+
+   if (id < d_patch_data.getSize()) {
+      d_patch_data[id].setNull();
+   }
+}
+
+void Patch::deallocatePatchData(
+   const ComponentSelector& components)
+{
+   const int ncomponents = d_patch_data.getSize();
+   for (int i = 0; i < ncomponents; i++) {
+      if (components.isSet(i)) {
+         d_patch_data[i].setNull();
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Set the time stamp for the specified components in the patch.		*
+ *									*
+ *************************************************************************
+ */
+
+void Patch::setTime(
+   const double timestamp,
+   const ComponentSelector& components)
+{
+   const int ncomponents = d_patch_data.getSize();
+   for (int i = 0; i < ncomponents; i++) {
+      if (components.isSet(i) && !d_patch_data[i].isNull()) {
+         d_patch_data[i]->setTime(timestamp);
+      }
+   }
+}
+
+void Patch::setTime(
+   const double timestamp)
+{
+   const int ncomponents = d_patch_data.getSize();
+   for (int i = 0; i < ncomponents; i++) {
+      if (!d_patch_data[i].isNull()) {
+         d_patch_data[i]->setTime(timestamp);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Checks that class and restart file version numbers are equal.  If so, *
+ * reads in data from database and have each patch_data item read       *
+ * itself in from the database						*
+ *									*
+ *************************************************************************
+ */
+
+void Patch::getFromDatabase(
+   tbox::Pointer<tbox::Database> database,
+   const ComponentSelector& component_selector)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   int ver = database->getInteger("HIER_PATCH_VERSION");
+   if (ver != HIER_PATCH_VERSION) {
+      TBOX_ERROR("Patch::getFromDatabase() error...\n"
+         << "   Restart file version different than class version" << std::endl);
+   }
+
+   Box box(database->getDatabaseBox("d_box"));
+   const LocalId patch_local_id(database->getInteger("d_patch_local_id"));
+   int patch_owner = database->getInteger("d_patch_owner");
+   d_mapped_box.initialize(box, patch_local_id, patch_owner);
+   // d_mapped_box.getId().getLocalId() = patch_local_id;
+   // d_mapped_box.getOwnerRank() = patch_owner;
+   // d_mapped_box.getBox() = box;
+
+   d_patch_level_number = database->getInteger("d_patch_level_number");
+   d_patch_in_hierarchy = database->getBool("d_patch_in_hierarchy");
+
+   d_patch_data.resizeArray(d_descriptor->getMaxNumberRegisteredComponents());
+
+   int namelist_count = database->getInteger("patch_data_namelist_count");
+   tbox::Array<std::string> patch_data_namelist;
+   if (namelist_count) {
+      patch_data_namelist = database->getStringArray("patch_data_namelist");
+   }
+
+   ComponentSelector local_selector(component_selector);
+
+   for (int i = 0; i < patch_data_namelist.getSize(); i++) {
+      std::string patch_data_name;
+      int patch_data_index;
+      tbox::Pointer<tbox::Database> patch_data_database;
+      tbox::Pointer<PatchDataFactory> patch_data_factory;
+
+      patch_data_name = patch_data_namelist[i];
+
+      if (database->isDatabase(patch_data_name)) {
+         patch_data_database = database->getDatabase(patch_data_name);
+      } else {
+         TBOX_ERROR("Patch::getFromDatabase() error...\n"
+            << "   patch data" << patch_data_name
+            << " not found in database" << std::endl);
+      }
+
+      patch_data_index = d_descriptor->
+         mapNameToIndex(patch_data_name);
+
+
+
+      if ((patch_data_index >= 0) &&
+          (local_selector.isSet(patch_data_index))) {
+         patch_data_factory = d_descriptor->
+            getPatchDataFactory(patch_data_index);
+         d_patch_data[patch_data_index] =
+            patch_data_factory->allocate(*this);
+         d_patch_data[patch_data_index]->getFromDatabase(patch_data_database);
+
+         local_selector.clrFlag(patch_data_index);
+      }
+   }
+
+//   ComponentSelector all_unset(false);
+//   if (component_selector != all_unset) {
+   if (local_selector.any()) {
+      TBOX_WARNING("Patch::getFromDatabase() warning...\n"
+         << "   Some requested patch data components not "
+         << "found in database" << std::endl);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Write out the class version number to database.  Then,		*
+ * writes out data to database and have each patch_data item write      *
+ * itself out to the database.  The following data                       *
+ * members are written out: d_mapped_box, d_patch_number,
+ * d_patch_level_number,
+ * d_patch_in_hierarchy, d_patch_data[].                                 *
+ * The database key for all data members is identical to the             *
+ * name of the data member except for the d_patch_data.  These have      *
+ * keys of the form "variable##context" which is the form that they      *
+ * are stored by the patch descriptor.  In addition a list of the        *
+ * patch_data names ("patch_data_namelist") and the number of patch data *
+ * items saved ("namelist_count") are also written to the database.      *
+ * The patchdata_write_table determines which patchdata are written to   *
+ * the database.                                                         *
+ *									*
+ *************************************************************************
+ */
+void Patch::putToDatabase(
+   tbox::Pointer<tbox::Database> database,
+   const ComponentSelector& patchdata_write_table)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   int i;
+
+   database->putInteger("HIER_PATCH_VERSION", HIER_PATCH_VERSION);
+   database->putDatabaseBox("d_box", d_mapped_box.getBox());
+   database->putInteger("d_patch_local_id",
+                        d_mapped_box.getLocalId().getValue());
+   database->putInteger("d_patch_owner",
+      d_mapped_box.getOwnerRank());
+   database->putInteger("d_patch_level_number", d_patch_level_number);
+   database->putBool("d_patch_in_hierarchy", d_patch_in_hierarchy);
+
+   int namelist_count = 0;
+   for (i = 0; i < d_patch_data.getSize(); i++) {
+      if (patchdata_write_table.isSet(i) && checkAllocated(i)) {
+         namelist_count++;
+      }
+   }
+
+   std::string patch_data_name;
+   tbox::Pointer<tbox::Database> patch_data_database;
+   tbox::Array<std::string> patch_data_namelist(namelist_count);
+   namelist_count = 0;
+   for (i = 0; i < d_patch_data.getSize(); i++) {
+      if (patchdata_write_table.isSet(i) && checkAllocated(i)) {
+         patch_data_namelist[namelist_count++] =
+            patch_data_name = d_descriptor->mapIndexToName(i);
+         patch_data_database = database->putDatabase(patch_data_name);
+         (d_patch_data[i])->putToDatabase(patch_data_database);
+      }
+   }
+
+   database->putInteger("patch_data_namelist_count", namelist_count);
+   if (namelist_count > 0) {
+      database->putStringArray("patch_data_namelist", patch_data_namelist);
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Print information about the patch.					*
+ *									*
+ *************************************************************************
+ */
+
+int Patch::recursivePrint(
+   std::ostream& os,
+   const std::string& border,
+   int depth) const
+{
+   NULL_USE(depth);
+
+   const tbox::Dimension& dim(d_mapped_box.getDim());
+
+   os << border
+      << d_mapped_box
+      << "\tdims: " << d_mapped_box.getBox().numberCells(0)
+   ;
+   for (int i = 1; i < dim.getValue(); ++i) {
+      os << " X " << d_mapped_box.getBox().numberCells(i);
+   }
+   os << "\tsize: " << d_mapped_box.getBox().size()
+      << "\n";
+   return 0;
+}
+
+std::ostream& operator << (
+   std::ostream& s,
+   const Patch& patch)
+{
+   s << "Patch::mapped_box = "
+     << patch.d_mapped_box << std::endl << std::flush;
+   s << "Patch::patch_level_number = " << patch.d_patch_level_number
+     << std::endl << std::flush;
+   s << "Patch::patch_in_hierarchy = " << patch.d_patch_in_hierarchy
+     << std::endl << std::flush;
+   s << "Patch::number_components = " << patch.d_patch_data.getSize()
+     << std::endl << std::flush;
+   const int ncomponents = patch.d_patch_data.getSize();
+   for (int i = 0; i < ncomponents; i++) {
+      s << "Component(" << i << ")=";
+      if (patch.d_patch_data[i].isNull()) {
+         s << "NULL\n";
+      } else {
+         s << typeid(*patch.d_patch_data[i]).name()
+         << " [GCW=" << patch.d_patch_data[i]->getGhostCellWidth() << "]\n";
+      }
+   }
+   return s;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/Patch.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/Patch.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,146 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Patch container class for patch data objects 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+const MappedBox& Patch::getMappedBox() const
+{
+   return d_mapped_box;
+}
+
+SAMRAI_INLINE_KEYWORD
+const GlobalId& Patch::getGlobalId() const
+{
+   return d_mapped_box.getGlobalId();
+}
+
+SAMRAI_INLINE_KEYWORD
+const Box& Patch::getBox() const
+{
+   return d_mapped_box.getBox();
+}
+
+SAMRAI_INLINE_KEYWORD
+const LocalId &Patch::getLocalId() const
+{
+   return d_mapped_box.getLocalId();
+}
+
+SAMRAI_INLINE_KEYWORD
+void Patch::setPatchLevelNumber(
+   const int level_number)
+{
+   d_patch_level_number = level_number;
+}
+
+SAMRAI_INLINE_KEYWORD
+int Patch::getPatchLevelNumber() const
+{
+   return d_patch_level_number;
+}
+
+SAMRAI_INLINE_KEYWORD
+void Patch::setPatchInHierarchy(
+   bool in_hierarchy)
+{
+   d_patch_in_hierarchy = in_hierarchy;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool Patch::inHierarchy() const
+{
+   return d_patch_in_hierarchy;
+}
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<PatchDescriptor> Patch::getPatchDescriptor() const
+{
+   return d_descriptor;
+}
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<PatchData> Patch::getPatchData(
+   const int id) const
+{
+   TBOX_ASSERT((id >= 0) && (id < d_patch_data.getSize()));
+
+   return d_patch_data[id];
+}
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<PatchData> Patch::getPatchData(
+   const tbox::Pointer<Variable> variable,
+   const tbox::Pointer<VariableContext> context) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *variable);
+
+   int id = VariableDatabase::getDatabase()->
+      mapVariableAndContextToIndex(variable, context);
+
+   TBOX_ASSERT((id >= 0) && (id < d_patch_data.getSize()));
+
+   return d_patch_data[id];
+}
+
+SAMRAI_INLINE_KEYWORD
+void Patch::setPatchData(
+   const int id,
+   tbox::Pointer<PatchData> data)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *data);
+   TBOX_ASSERT((id >= 0) && (id < d_patch_data.getSize()));
+
+   d_patch_data[id] = data;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool Patch::checkAllocated(
+   const int id) const
+{
+   return (id < d_patch_data.getSize()) && !(d_patch_data[id].isNull());
+}
+
+SAMRAI_INLINE_KEYWORD
+void Patch::setPatchGeometry(
+   tbox::Pointer<PatchGeometry> geometry)
+{
+   d_patch_geometry = geometry;
+}
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<PatchGeometry> Patch::getPatchGeometry() const
+{
+   return d_patch_geometry;
+}
+
+SAMRAI_INLINE_KEYWORD
+void Patch::setTime(
+   const double timestamp,
+   const int id)
+{
+   TBOX_ASSERT((id >= 0) && (id < d_patch_data.getSize()));
+   TBOX_ASSERT(!d_patch_data[id].isNull());
+
+   d_patch_data[id]->setTime(timestamp);
+}
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Dimension& Patch::getDim() const
+{
+   return d_mapped_box.getDim();
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/Patch.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/Patch.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,494 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Patch container class for patch data objects 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_Patch
+#define included_hier_Patch
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/MappedBox.h"
+#include "SAMRAI/hier/ComponentSelector.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/PatchGeometry.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Database.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief A container for patch data objects defined over a box.
+ *
+ * Class Patch is a container for patch data objects defined over
+ * some box region.  Since the SAMRAI convention is that the structured
+ * mesh index space is always defined as cell-centerd, the box of a patch
+ * may not match the box describing the patch data (in fact, it is not in
+ * general).  Users must be clear about how they relate the patch box to
+ * the data living on the patch.
+ *
+ * Each of the patch data objects that exist on the patch is a subclass
+ * of the patch data pure virtual base class.  The construction
+ * of the patch data objects on a patch are managed via the factory classes
+ * maintained by the patch descriptor which is shared by all patches.
+ *
+ * By default, the patch constructor does not allocate space for the various
+ * patch data components that live on the patch.  Individual components or sets
+ * of components can be created or destroyed via patch member functions.
+ *
+ * @see hier::Box
+ * @see hier::MappedBox
+ * @see hier::PatchDescriptor
+ * @see hier::PatchData
+ * @see hier::PatchDataFactory
+ * @see hier::PatchGeometry
+ */
+class Patch:public tbox::DescribedClass
+{
+public:
+   /*!
+    * @brief  Allocate a patch container over the box.
+    *
+    * @note
+    * Patch data components are not allocated/instantiated.
+    *
+    * @param[in]  mapped_box
+    * @param[in]  descriptor
+    */
+   explicit Patch(
+      const MappedBox& mapped_box,
+      tbox::Pointer<PatchDescriptor> descriptor);
+
+   /*!
+    * @brief Virtual destructor for patch objects.
+    */
+   virtual ~Patch();
+
+   /*!
+    * @brief Get the box over which the patch is defined.
+    *
+    * Note that the patch data objects on a patch are free to interpret 
+    * this box as appropriate for the "geometry" of their data 
+    * (e.g., face-centered, node-centered, etc.)
+    *
+    * @return The box over which this patch is defined.
+    */
+   const Box&
+   getBox() const;
+
+   /*!
+    * @brief Get the GlobalId for this patch.
+    *
+    * The GlobalId is the patch's unique identifier within the
+    * PatchLevel.  It is identical to the GlobalId of the Patch's
+    * MappedBox.
+    *
+    * @return GlobalId for this patch.
+    */
+   const GlobalId&
+   getGlobalId() const;
+
+   /*!
+    * @brief Get the MappedBox from which this patch is defined.
+    *
+    * The box corresponding to this MappedBox is the same as that
+    * given by getBox();
+    *
+    * @return the MappedBox from which patch is defined.
+    */
+   const MappedBox&
+   getMappedBox() const;
+
+   /*!
+    * @brief Get the patch's LocalId.
+    *
+    * The LocalId is the same as that of the MappedBox used to
+    * construct the Patch.
+    *
+    * @return The LocalId of this patch.
+    */
+   const LocalId &getLocalId() const;
+
+   /*!
+    * @brief Get the patch descriptor.
+    *
+    * The patch descriptor describes the patch data types that may exist on
+    * the patch.
+    *
+    * @return the patch descriptor for this patch.
+    */
+   tbox::Pointer<PatchDescriptor>
+   getPatchDescriptor() const;
+
+   /*!
+    * @brief Get the patch data identified by the specified id.
+    *
+    * Typically, this function should only be called to access
+    * patch data objects that have already been explicitly allocated through
+    * a call to one of the patch allocation routines.  A NULL pointer will
+    * be returned if the patch data object is not allocated.
+    *
+    * @return a pointer to the patch data object associated with the specified
+    * identifier.
+    *
+    * @param[in]  id
+    */
+   tbox::Pointer<PatchData>
+   getPatchData(
+      const int id) const;
+
+   /*!
+    * @brief Get the patch data associated with the specified variable and
+    * context.
+    *
+    * Typically, this function should only be called
+    * to access patch data objects that have already been explicitly allocated
+    * through a call to one of the patch allocation routines.  A NULL pointer
+    * will be returned if the patch data object is not allocated.
+    *
+    * @return a pointer to the patch data object associated with the specified
+    * variable and context.
+    *
+    * @param[in]  variable
+    * @param[in]  context
+    */
+   tbox::Pointer<PatchData>
+   getPatchData(
+      const tbox::Pointer<Variable> variable,
+      const tbox::Pointer<VariableContext> context) const;
+
+   /*!
+    * @brief Set the patch data Pointer associated with the specified
+    * identifier.
+    *
+    * @note
+    * This member function must be used with caution.  It can only
+    * be called for patch data indices that were previously allocated through
+    * one of the patch routines.  This member function does not check to see
+    * whether the patch data types are already allocated, consistent, or
+    * whether they have the same factory.  So, for example, a face centered
+    * data type could be assigned to a location reserved for a cell centered
+    * data type (with potentially different box and ghost cell width).
+    *
+    * @param[in]  id
+    * @param[out] data
+    */
+   void
+   setPatchData(
+      const int id,
+      tbox::Pointer<PatchData> data);
+
+   /*!
+    * @brief Check whether the specified component has been allocated.
+    *
+    * @return True if the component has been allocated.
+    *
+    * @param[in]  id
+    */
+   bool
+   checkAllocated(
+      const int id) const;
+
+   /*!
+    * @brief Get the size of the patch data
+    *
+    * @return the amount of memory needed to allocate the specified component.
+    *
+    * @param[in]  id
+    */
+   size_t
+   getSizeOfPatchData(
+      const int id) const;
+
+   /*!
+    * @brief Get the size of the patch data for all components specified
+    *
+    * @return the amount of memory needed to allocate the specified components.
+    *
+    * @param[in]  components
+    */
+   size_t
+   getSizeOfPatchData(
+      const ComponentSelector& components) const;
+
+   /*!
+    * @brief Allocate the specified component on the patch.
+    * @par Assertions
+    * An assertion will result if the component is already allocated.
+    * This provides a key bit of debugging information that may be useful
+    * to application developers.
+    *
+    * @param[in]  id
+    * @param[in]  time
+    */
+   void
+   allocatePatchData(
+      const int id,
+      const double time = 0.0);
+
+   /*!
+    * @brief Allocate the specified components on the patch.
+    * @par Assertions
+    * An assertion will result if any requested component is
+    * already allocated.  This provides a key bit of debugging information
+    * that may be useful to application developers.
+    *
+    * @param[in]  components
+    * @param[in]  time
+    */
+   void
+   allocatePatchData(
+      const ComponentSelector& components,
+      const double time = 0.0);
+
+   /*!
+    * @brief Deallocate the specified component.
+    *
+    * This component will need to be reallocated before its next use.
+    *
+    * @param[in]  id
+    */
+   void
+   deallocatePatchData(
+      const int id);
+
+   /*!
+    * @brief Deallocate the specified components.
+    *
+    * These components will need to be reallocated before their next use.
+    *
+    * @param[in]  components
+    */
+   void
+   deallocatePatchData(
+      const ComponentSelector& components);
+
+   /*!
+    * @brief Set the geometry specification for the patch.
+    *
+    * This includes patch boundary information and grid data.
+    *
+    * @param[in]  geometry
+    */
+   void
+   setPatchGeometry(
+      tbox::Pointer<PatchGeometry> geometry);
+
+   /*!
+    * @brief Get the patch geometry
+    *
+    * @return pointer to patch geometry object.
+    */
+   tbox::Pointer<PatchGeometry>
+   getPatchGeometry() const;
+
+   /*!
+    * @brief Set the timestamp value for the specified patch component.
+    *
+    * @param[in]  timestamp
+    * @param[in]  id
+    */
+   void
+   setTime(
+      const double timestamp,
+      const int id);
+
+   /*!
+    * @brief Set the timestamp value for the specified patch components.
+    *
+    * @param[in]  timestamp
+    * @param[in]  components
+    */
+   void
+   setTime(
+      const double timestamp,
+      const ComponentSelector& components);
+
+   /*!
+    * @brief Set the timestamp value for all allocated patch components.
+    *
+    * @param[in]  timestamp
+    */
+   void
+   setTime(
+      const double timestamp);
+
+   /*!
+    * @brief Get the level number of the patch level in the patch hierarchy
+    * where this patch resides.
+    *
+    * @note
+    * This value can be a valid level number (i.e., >=0) even
+    * when the level is not in a hierarchy.  In this case the level
+    * number will be the number of the hierarchy level matching the
+    * index space of the patch level holding this patch.  If the patch
+    * level does not align with the index space of a level in the hierarchy,
+    * then this value is -1.
+    *
+    * @return The valid level number >= 0 or undefined (-1) if the patch
+    * level does not align with the index space of a level in the hierarchy.
+    *
+    * @see inHierarchy()
+    */
+   int
+   getPatchLevelNumber() const;
+
+   /*!
+    * @brief Set the patch level number for this patch.
+    *
+    * When the index space of the level owning this patch aligns with the
+    * index space of some valid hierarchy level, sets the patch level number
+    * The default level number is -1.
+    *
+    * @param[in]  level_number
+    */
+   void
+   setPatchLevelNumber(
+      const int level_number);
+
+   /*!
+    * @brief Determine if the level holding this patch resides in a hierarchy.
+    *
+    * @return True if the level holding this patch resides in a hierarchy,
+    * otherwise false.
+    */
+   bool
+   inHierarchy() const;
+
+   /*!
+    * @brief Set a flag determining if the patch resides in a hierarchy.
+    *
+    * Set to true if the level holding this patch resides in a hierarchy;
+    * false otherwise.  The default setting is false.
+    *
+    * @param[in]  in_hierarchy The flag that indicates whether the patch
+    *             resides in a hierarchy.
+    */
+   void
+   setPatchInHierarchy(
+      bool in_hierarchy);
+
+   /*!
+    * @brief Get the patch data items from the database.
+    *
+    * Patch state is read in from the database and all patch
+    * data objects specified in the component_selector are created.
+    *
+    * The class version and restart file version must be equal.
+    *
+    * @par Assertions
+    * Checks that the database is a non-null Pointer,
+    * that data retrieved from the database are of the type
+    * expected, and that the patch_number read in from the database
+    * matches the patch number assigned to this Patch.
+    * @note
+    * A warning will be printed to the log file if
+    * some patch data components that were requested through the
+    * component_selector are not found in the database.
+    *
+    * @param[in]  database
+    * @param[in]  component_selector
+    */
+   void
+   getFromDatabase(
+      tbox::Pointer<tbox::Database> database,
+      const ComponentSelector& component_selector);
+
+   /*!
+    * @brief Write patch data and other patch information to the database.
+    *
+    * Class version number and the state of the patch object are written.
+    * Patch data objects specified in the component selector are also written.
+    * @par Assertions
+    * Check that database is a non-null Pointer.
+    *
+    * @param[in]  database
+    * @param[in]  patchdata_write_table The ComponentSelector specifying the
+    *             patch data components to write.
+    */
+   void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> database,
+      const ComponentSelector& patchdata_write_table);
+
+   /*!
+    * @brief Print a patch (for debugging).
+    *
+    * Depth is kept for consistency with other recursivePrint methods,
+    * but is not used because this is the lowest level of recursion
+    * currently supported.
+    *
+    * @param[in,out]  os
+    * @param[in]  border
+    * @param[in]  depth
+    */
+   int
+   recursivePrint(
+      std::ostream& os,
+      const std::string& border = std::string(),
+      int depth = 0) const;
+
+   /*!
+    * @brief Get the dimension of this object.
+    *
+    * @return the dimension of this object.
+    */
+   const tbox::Dimension&
+   getDim() const;
+
+   /*!
+    * @brief Output patch information (box and number of components).
+    *
+    * @param[in,out]  s The output stream
+    * @param[in]      patch
+    */
+   friend std::ostream&
+   operator << (
+      std::ostream& s,
+      const Patch& patch);
+
+private:
+   /*
+    * Copy constructor and assignment operator are not implemented.
+    */
+   Patch(
+      const Patch&);
+   void
+   operator = (
+      const Patch&);
+
+   /*
+    * The box defining the extent of this patch.
+    */
+   MappedBox d_mapped_box;
+
+   tbox::Pointer<PatchDescriptor> d_descriptor;
+
+   tbox::Pointer<PatchGeometry> d_patch_geometry;
+
+   tbox::Array<tbox::Pointer<PatchData> > d_patch_data;
+
+   int d_patch_level_number;
+
+   bool d_patch_in_hierarchy;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/Patch.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchBoundaries.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchBoundaries.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,75 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Describes boundaries for a patch 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_PatchBoundaries_C
+#define included_hier_PatchBoundaries_C
+
+#include "SAMRAI/hier/PatchBoundaries.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/PatchBoundaries.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor leaves the arrays empty.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+PatchBoundaries::PatchBoundaries(const tbox::Dimension& dim)
+: d_dim(dim),
+  d_array_of_bboxes(dim.getValue())
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Copy constructor                                                      *
+ *                                                                       *
+ *************************************************************************
+ */
+PatchBoundaries::PatchBoundaries(const PatchBoundaries& r)
+: d_dim(r.d_dim),
+  d_array_of_bboxes(r.d_dim.getValue())
+{
+   for (unsigned int d = 0; d < d_dim.getValue(); ++d) {
+      d_array_of_bboxes[d] = r.d_array_of_bboxes[d];
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Assignment operator                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+const PatchBoundaries&
+PatchBoundaries::operator = (const PatchBoundaries& r)
+{
+   for (unsigned int d = 0; d < d_dim.getValue(); ++d) {
+      d_array_of_bboxes[d] = r.d_array_of_bboxes[d];
+   }
+
+   return *this;
+}
+
+
+
+} // SAMRAI namespace
+} // hier namespace
+
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchBoundaries.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchBoundaries.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,88 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Describes boundaries for a patch 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace hier {
+
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default constructor                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+PatchBoundaries::PatchBoundaries()
+: d_dim(tbox::Dimension::getInvalidDimension()),
+  d_array_of_bboxes(0)
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Array access operator                                                 *
+ *                                                                       *
+ *************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+tbox::Array<hier::BoundaryBox>&
+PatchBoundaries::operator [] (unsigned int i)
+{
+   TBOX_ASSERT(i < d_dim.getValue());
+   return d_array_of_bboxes[i];
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Array access operator                                                 *
+ *                                                                       *
+ *************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+const tbox::Array<hier::BoundaryBox>&
+PatchBoundaries::operator [] (unsigned int i) const
+{
+   TBOX_ASSERT(i < d_dim.getValue());
+   return d_array_of_bboxes[i];
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Get copy of arrays                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+tbox::Array<tbox::Array<hier::BoundaryBox> >
+PatchBoundaries::getArrays()
+{
+   return d_array_of_bboxes;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Get copy of arrays                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+const tbox::Array<tbox::Array<hier::BoundaryBox> >
+PatchBoundaries::getArrays() const
+{
+   return d_array_of_bboxes;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchBoundaries.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchBoundaries.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,133 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Describes boundaries for a patch 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_PatchBoundaries
+#define included_hier_PatchBoundaries
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <map>
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief Class PatchBoundaries is a container class for storing
+ * BoundaryBox objects for a single patch.
+ *
+ * @see hier::BoundaryBox 
+ */
+
+class PatchBoundaries
+{
+public:
+
+   /*!
+    * @brief Explicit constructor requires dimension argument.
+    *
+    * @param[in] dim
+    */
+   explicit PatchBoundaries(const tbox::Dimension& dim); 
+
+   /*!
+    * @brief Copy constructor.
+    *
+    * @param[in] r  Patchboundaries object to be copied in constructor.
+    */
+   PatchBoundaries(const PatchBoundaries& r);
+
+   /*!
+    * @brief Assignment operator.
+    *
+    * @param[in] r  Patchboundaries object to be copied in assignment.
+    */
+   const PatchBoundaries& operator = (const PatchBoundaries& r);
+
+   /*!
+    * @brief Array access operator.
+    *
+    * @param[in] i  Array index.
+    */
+   tbox::Array<hier::BoundaryBox>& operator [] (unsigned int i);
+
+   /*!
+    * @brief Const Array access operator.
+    *
+    * @param[in] i  Array index.
+    */
+   const tbox::Array<hier::BoundaryBox>& operator [] (unsigned int i) const;
+
+   /*!
+    * @brief Get copy of the internal arrays.
+    *
+    * @return  Copy of the internal arrays.
+    */
+   tbox::Array<tbox::Array<hier::BoundaryBox> > getArrays();
+
+   /*!
+    * @brief Get const copy of the internal arrays.
+    *
+    * @return  Const copy of the internal arrays.
+    */
+   const tbox::Array<tbox::Array<hier::BoundaryBox> > getArrays() const;
+
+   /*!
+    * @brief friend declaration
+    */
+   friend class ::std::map<int, SAMRAI::hier::PatchBoundaries>;
+
+private:
+   /*!
+    * @brief Private default constructor.
+    *
+    * This constructor is need by the brain dead STL and should not be used
+    * for any other purpose.
+    */
+   PatchBoundaries();
+
+   /*!
+    * @brief Dimension of the object. 
+    */
+   const tbox::Dimension d_dim;
+
+   /*
+    * @brief Internal arrays of BoundaryBox
+    */
+   tbox::Array<tbox::Array<hier::BoundaryBox> > d_array_of_bboxes;
+};
+
+} // SAMRAI namespace
+} // hier namespace
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/PatchBoundaries.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchData.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchData.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,100 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract base class for patch data objects 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_PatchData_C
+#define included_hier_PatchData_C
+
+#include "SAMRAI/hier/PatchData.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+#define HIER_PATCH_DATA_VERSION (2)
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/PatchData.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+PatchData::PatchData(
+   const Box& domain,
+   const IntVector& ghosts):
+   d_box(domain),
+   d_ghost_box(domain.getDim()),
+   d_ghosts(ghosts),
+   d_timestamp(0.0)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(domain, ghosts);
+
+   d_ghost_box = Box::grow(domain, ghosts);
+}
+
+PatchData::~PatchData()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Checks that clas and restart file version number are same.  If so,   *
+ * reads in data members common to all patch data and then invoke	*
+ * getSpecializedFromDatabase() to read in data particular to the	*
+ * specific derived class.						*
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchData::getFromDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   int ver = database->getInteger("HIER_PATCH_DATA_VERSION");
+   if (ver != HIER_PATCH_DATA_VERSION) {
+      TBOX_ERROR("PatchData::getFromDatabase() error...\n"
+         << "  Restart file version different than class version" << std::endl);
+   }
+
+   d_box = database->getDatabaseBox("d_box");
+   d_ghost_box = database->getDatabaseBox("d_ghost_box");
+   database->getIntegerArray("d_ghosts", &d_ghosts[0], d_ghosts.getDim().getValue());
+   d_timestamp = database->getDouble("d_timestamp");
+
+   getSpecializedFromDatabase(database);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Write out data members common to all patch data and then invoke	*
+ * putSpecializedToDatabase() to write out data particular to the	*
+ * specific derived class.						*
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchData::putToDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   database->putInteger("HIER_PATCH_DATA_VERSION", HIER_PATCH_DATA_VERSION);
+   database->putDatabaseBox("d_box", d_box);
+   database->putDatabaseBox("d_ghost_box", d_ghost_box);
+   database->putDouble("d_timestamp", d_timestamp);
+   database->putIntegerArray("d_ghosts", &d_ghosts[0], d_ghosts.getDim().getValue());
+
+   putSpecializedToDatabase(database);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchData.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchData.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,62 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract base class for patch data objects 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Dimension& PatchData::getDim() const
+{
+   return d_box.getDim();
+}
+
+SAMRAI_INLINE_KEYWORD
+const Box& PatchData::getBox() const
+{
+   return d_box;
+}
+
+SAMRAI_INLINE_KEYWORD
+const Box& PatchData::getGhostBox() const
+{
+   return d_ghost_box;
+}
+
+SAMRAI_INLINE_KEYWORD
+void PatchData::setGhostBox(
+   const Box& ghost_box)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_box, ghost_box);
+   TBOX_ASSERT(ghost_box * d_box == d_box);
+
+   d_ghost_box = ghost_box;
+}
+
+SAMRAI_INLINE_KEYWORD
+const IntVector& PatchData::getGhostCellWidth() const
+{
+   return d_ghosts;
+}
+
+SAMRAI_INLINE_KEYWORD
+void PatchData::setTime(
+   const double timestamp)
+{
+   d_timestamp = timestamp;
+}
+
+SAMRAI_INLINE_KEYWORD
+double PatchData::getTime() const
+{
+   return d_timestamp;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchData.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchData.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,280 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract base class for patch data objects 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_PatchData
+#define included_hier_PatchData
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/MessageStream.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/**
+ * Class PatchData is a pure virtual base class for the data storage
+ * defined over a box.  Patch data objects are generally contained within
+ * a patch.  Patch data defines the abstract virtual functions for data
+ * management and communication that must be supplied by the subclasses.
+ * Subclasses implement the virtual functions as appropriate for the derived
+ * type; for example, cell centered objects will copy data differently than
+ * face centered objects.
+ *
+ * Patch data objects are created by patch data factories and associated
+ * subclasses.  This separation into abstract factory and concrete
+ * implementation subclasses facilitates the creation of new patch data
+ * subtypes.  See the Design Patterns book for more details about the
+ * Abstract Factory pattern.
+ *
+ * The copy and pack/unpack functions in the patch data object take
+ * box overlap descriptions that describe the index space over which
+ * data is to be copied or packed/unpacked.  Box overlaps are computed
+ * by the box geometry classes, which are accessed through the patch
+ * data factories.  Box geometry classes are created by the patch data
+ * factories instead of the patch data objects because patch data objects
+ * are distributed across memory with patches and therefore may not exist
+ * on a particular processor.  Patch data factories are guaranteed to
+ * exist on all processors independent of the patch-to-processor mapping.
+ *
+ * @see hier::BoxOverlap
+ * @see hier::BoxGeometry
+ * @see hier::Patch
+ * @see hier::PatchDataFactory
+ * @see hier::PatchDescriptor
+ */
+
+class PatchData:public tbox::DescribedClass
+{
+public:
+   /**
+    * The constructor for a patch data object.  Patch data objects will
+    * manage the interior box over which they are defined and the associated
+    * ghost cell width.
+    */
+   explicit PatchData(
+      const Box& domain,
+      const IntVector& ghosts);
+
+   /**
+    * The virtual destructor for a patch data object.
+    */
+   virtual ~PatchData();
+
+   /**
+    * Return the box over which this patch data object is defined.  All
+    * objects in the same patch are defined over the same box, although
+    * the patch data objects may interpret how to allocate storage for
+    * that box in different ways.
+    */
+   const Box&
+   getBox() const;
+
+   /**
+    * Return the ghost cell box.  The ghost cell box is defined to be
+    * the interior box grown by the ghost cell width.
+    */
+   const Box&
+   getGhostBox() const;
+
+   /**
+    * Get the ghost cell width associated with this patch data object.
+    */
+   const IntVector&
+   getGhostCellWidth() const;
+
+   /**
+    * Set the simulation time stamp for the patch data type.  The simulation
+    * time is initialized to zero when the patch data type is created.
+    */
+   void
+   setTime(
+      const double timestamp);
+
+   /**
+    * Get the simulation time stamp for the patch data type.
+    */
+   double
+   getTime() const;
+
+   /**
+    * A fast copy between the source and destination.  Data is copied from
+    * the source into the destination where there is overlap in the underlying
+    * index space.  The copy is performed on the interior plus the ghost cell
+    * width (for both the source and destination).  If this copy does not
+    * understand how to copy data from the argument, then copy2() is called
+    * on the source object.
+    */
+   virtual void
+   copy(
+      const PatchData& src) = 0;
+
+   /**
+    * A fast copy between the source and destination.  Data is copied from
+    * the source into the destination where there is overlap in the underlying
+    * index space.  The copy is performed on the interior plus the ghost cell
+    * width (for both the source and destination).  If this copy does not
+    * understand how to copy data from the destination, then it may throw
+    * an assertion (aka dump core in a failed assertion).
+    */
+   virtual void
+   copy2(
+      PatchData& dst) const = 0;
+
+   /**
+    * Copy data from the source into the destination using the designated
+    * overlap descriptor.  The overlap description will have been computed
+    * using the appropriate box geometry objects.  If this member function
+    * cannot complete the copy from source (e.g., if it doesn't understand
+    * the type of source), then copy2() is called on the source object.
+    */
+   virtual void
+   copy(
+      const PatchData& src,
+      const BoxOverlap& overlap) = 0;
+
+   /**
+    * Copy data from the source into the destination using the designated
+    * overlap descriptor.  The overlap description will have been computed
+    * using the appropriate box geometry objects If this member function
+    * cannot complete the copy from the destination, then it may throw an
+    * assertion (aka dump core in a failed assertion).
+    */
+   virtual void
+   copy2(
+      PatchData& dst,
+      const BoxOverlap& overlap) const = 0;
+
+   /**
+    * Determines whether the patch data subclass can estimate the necessary
+    * stream size using only index space information.  The return value will
+    * most likely be true for data types that are fixed size (such as doubles)
+    * but will be false for complex data types that allocate their own storage
+    * (such as lists of particles).  This routine is used to estimate whether
+    * a processor can estimate space for incoming messages or whether it needs
+    * to receive a message size from the sending processor.
+    */
+   virtual bool
+   canEstimateStreamSizeFromBox() const = 0;
+
+   /**
+    * Calculate the number of bytes needed to stream the data lying
+    * in the specified box domain.  This estimate must be an upper
+    * bound on the size of the data in the actual message stream.
+    * The upper bound should be close, however, since buffer space
+    * will be allocated according to these values, and excess buffer
+    * space will waste memory resources.
+    */
+   virtual int
+   getDataStreamSize(
+      const BoxOverlap& overlap) const = 0;
+
+   /**
+    * Pack data lying on the specified index set into the output stream.
+    * See the abstract stream virtual base class for more information about
+    * the packing operators defined for streams.
+    */
+   virtual void
+   packStream(
+      tbox::MessageStream& stream,
+      const BoxOverlap& overlap) const = 0;
+
+   /**
+    * Unpack data from the message stream into the specified index set.
+    * See the abstract stream virtual base class for more information about
+    * the packing operators defined for streams.
+    */
+   virtual void
+   unpackStream(
+      tbox::MessageStream& stream,
+      const BoxOverlap& overlap) = 0;
+
+   /**
+    * Checks that class version and restart file version are equal.  If so,
+    * reads in the data members common to all patch data types from database.
+    * This method then calls the getSpecializedFromDatabase() method
+    * to retrieve the data special to the concrete patch data type.
+    */
+   virtual void
+   getFromDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+   /**
+    * Writes out the class version number to the database.  Then,
+    * writes the data members common to all patch data types from database.
+    * After the common data is written to the database, the
+    * putSpecializedToDatabase() method is invoked.
+    */
+   virtual void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+   /**
+    * This pure abstract method is used by concrete patch data subclasses
+    * to retrieve from the database data special to the concrete class.
+    */
+   virtual void
+   getSpecializedFromDatabase(
+      tbox::Pointer<tbox::Database> database) = 0;
+
+   /**
+    * This pure abstract method is used by concrete patch data subclasses
+    * to put to the database data special to the concrete class.
+    */
+   virtual void
+   putSpecializedToDatabase(
+      tbox::Pointer<tbox::Database> database) = 0;
+
+   /**
+    * Return the dimension of this object.
+    */
+   const tbox::Dimension&
+   getDim() const;
+
+protected:
+   /**
+    * This protected method is used by concrete patch data subclasses
+    * to set the ghost box over which the patch data will be allocated.
+    * Note that this allows the ghost box to be inconsistant with its
+    * standard interpretation as the patch domain box grown by the ghost
+    * cell width (as set in the constructor).
+    *
+    * This function is included to treat some special cases for concrete
+    * patch data types and should be used with caution.
+    */
+   void
+   setGhostBox(
+      const Box& ghost_box);
+
+private:
+   PatchData(
+      const PatchData&);        // not implemented
+   void
+   operator = (
+      const PatchData&);                // not implemented
+
+   Box d_box;                           // interior box description
+   Box d_ghost_box;                     // interior box plus ghosts
+   IntVector d_ghosts;                  // ghost cell width
+   double d_timestamp;                          // timestamp for the data
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/PatchData.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchDataFactory.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchDataFactory.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory abstract base class for creating patch data objects 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_PatchDataFactory_C
+#define included_hier_PatchDataFactory_C
+
+#include "SAMRAI/hier/PatchDataFactory.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/PatchDataFactory.I"
+#endif
+namespace SAMRAI {
+namespace hier {
+
+PatchDataFactory::~PatchDataFactory()
+{
+}
+
+const hier::IntVector&
+PatchDataFactory::getGhostCellWidth() const
+{
+   return d_ghosts;
+}
+
+/**********************************************************************
+* Default implementation                                             *
+**********************************************************************/
+
+MultiblockDataTranslator *
+PatchDataFactory::getMultiblockDataTranslator()
+{
+   return (MultiblockDataTranslator *)NULL;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchDataFactory.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchDataFactory.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,31 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory abstract base class for creating patch data objects 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+PatchDataFactory::PatchDataFactory(
+   const IntVector& ghosts):
+   d_ghosts(ghosts)
+{
+   TBOX_ASSERT(ghosts.min() >= 0);
+}
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Dimension& PatchDataFactory::getDim() const
+{
+   return d_ghosts.getDim();
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchDataFactory.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchDataFactory.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,205 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory abstract base class for creating patch data objects 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_PatchDataFactory
+#define included_hier_PatchDataFactory
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/**
+ * Class PatchDataFactory is an abstract base class used to allocate
+ * new instances of patch data objects.  Recall that patch data objects (PDs)
+ * are the data storage containers that exist within a patch.  PDs are
+ * created using patch data factory (PDF) objects; this is an example of
+ * the ``Abstract Factory'' method described in the Design Patterns book
+ * by Gamma, et al.
+ *
+ * The separation of PDF from PD simplifies the creation of new concrete PD
+ * classes since it separates the definition of the concrete class type from
+ * the actual instantiation.  The actual concrete class associated with the
+ * PDF is unknown to most of the framework; the PDF only defines enough
+ * information to create the PD instance.  For example, to add a new type
+ * of PD object MyPD (MyPatchData):
+ * \begin{enumerate}
+ * - Derive MyPDF from PDF and implement the abstract virtual
+ *       function calls as appropriate for the concrete subclass;
+ *       in particular, the allocate() function will return an instance
+ *       of MyPD.
+ * - Derive MyPD from PD and implement the abstract virtual
+ *       function calls as appropriate for the concrete subclass.
+ * - When defining the types of storage needed for a patch, add
+ *       MyPDF to the patch descriptor list.
+ * - Now whenever the PDF base class of MyPDF is asked to create
+ *       a concrete class, it will create MyPD.
+ * \end{enumerate}
+ * The creation of concrete PD objects is managed through the allocate()
+ * interfaces in PDF.
+ *
+ * In addition to the generation of patch data, the patch data factory
+ * also generates box geometry descriptions used to calculate the overlap
+ * between two patch data objects.  The allocation of the box geometry
+ * object is managed by the patch data factory instead of the patch data
+ * object since patch data factories are guaranteed to exist on all of the
+ * processors independent of the mapping of patches to processors.  Patch
+ * data is guaranteed to exist only on those patches local to a processor.
+ *
+ * @see hier::BoxGeometry
+ * @see hier::PatchData
+ * @see hier::PatchDescriptor
+ */
+
+class Patch;
+class MultiblockDataTranslator;
+
+class PatchDataFactory:public tbox::DescribedClass
+{
+public:
+   /**
+    * The constructor for the patch data factory class.
+    *
+    * @param ghosts ghost cell width for concrete classes created from
+    * the factory.
+    */
+   explicit PatchDataFactory(
+      const IntVector& ghosts);
+
+   /**
+    * @brief Virtual destructor for the patch data factory class.
+    *
+    */
+   virtual ~PatchDataFactory();
+
+   /**
+    * @brief Abstract virtual function to clone a patch data factory.
+    *
+    * This will return a new instantiation of the abstract factory
+    * with the same properties.  The properties of the cloned factory
+    * can then be changed without modifying the original.
+    *
+    * @param ghosts ghost cell width for concrete classes created from
+    * the factory.
+    */
+   virtual tbox::Pointer<PatchDataFactory>
+   cloneFactory(
+      const IntVector& ghosts) = 0;
+
+   /**
+    * @brief Abstract virtual function to allocate a concrete patch data object.
+    *
+    */
+   virtual tbox::Pointer<PatchData>
+   allocate(
+      const Patch& patch) const = 0;
+
+   /**
+    * @brief
+    * Abstract virtual function to allocate a concrete box geometry
+    * object.
+    *
+    * The box geometry object will be used in the calculation
+    * of box intersections for the computation of data dependencies.
+    */
+   virtual tbox::Pointer<BoxGeometry>
+   getBoxGeometry(
+      const Box& box) const = 0;
+
+   /**
+    * @brief Get the ghost cell width.
+    *
+    * This is the ghost cell width that will be used in the
+    * instantiation of concrete patch data instances.  The
+    * ghost width is specified in the clone method.
+    */
+   const IntVector&
+   getGhostCellWidth() const;
+
+   /**
+    * @brief Abstract virtual function to compute the amount of memory needed to
+    * allocate for object data and to represent the object itself.
+    *
+    * This includes any dynamic storage, such as arrays, needed by the
+    * concrete patch data instance.  Although the patch data subclass
+    * may choose not to allocate memory it must not use more memory
+    * than requested here.
+    */
+   virtual size_t
+   getSizeOfMemory(
+      const Box& box) const = 0;
+
+   /**
+    * @brief Return true if the fine data values represent the data quantity
+    * on coarse-fine interfaces if data lives on patch borders; false
+    * otherwise.
+    *
+    * The boolean return value is supplied by the concrete
+    * patch data factory subclass.
+    */
+   virtual bool
+   fineBoundaryRepresentsVariable() const = 0;
+
+   /**
+    * @brief Return true if the variable data lives on patch borders; false otherwise.
+    *
+    * The boolean return value is supplied by the concrete patch data factory subclass.
+    */
+   virtual bool
+   dataLivesOnPatchBorder() const = 0;
+
+   /**
+    * @brief Abstract virtual function that returns whether the
+    * current PatchDataFactory can be copied to the supplied
+    * destination PatchDataFactory.
+    *
+    * Mechanisms to check for valid types are implemented in the patch
+    * data factory subclasses for particular datatypes.
+    */
+   virtual bool
+   validCopyTo(
+      const tbox::Pointer<PatchDataFactory>& dst_pdf) const = 0;
+
+   virtual MultiblockDataTranslator *
+   getMultiblockDataTranslator();
+
+   /**
+    * Return the dimension of this object.
+    */
+   const tbox::Dimension&
+   getDim() const;
+
+protected:
+   IntVector d_ghosts;
+
+private:
+   PatchDataFactory(
+      const PatchDataFactory&);               // not implemented
+   void
+   operator = (
+      const PatchDataFactory&);               // not implemented
+   PatchDataFactory();                             // not implemented,
+                                                   // must specify ghost width
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/PatchDataFactory.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchDescriptor.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchDescriptor.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,256 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for patch data objects that live on a patch 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_PatchDescriptor_C
+#define included_hier_PatchDescriptor_C
+
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <typeinfo>
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/PatchDescriptor.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+#define INDEX_UNDEFINED (-1)
+
+/*
+ *************************************************************************
+ *									*
+ * The constructor sets the max number of registered components to zero  *
+ * and allocates the factory and name arrays to the fixed length set     *
+ * by the SAMRAIManager utility.  The free list of indices               *
+ * is initialized to the full set of potentially used indices.           *
+ *									*
+ * The destructor clears the free index list and implicitly              *
+ * deallocates the arrays of name strings and factory pointers.          *
+ *									*
+ *************************************************************************
+ */
+
+PatchDescriptor::PatchDescriptor():
+   d_min_gcw(tbox::Dimension::MAXIMUM_DIMENSION_VALUE)
+{
+   const int max_num_patch_data_components_allowed =
+      tbox::SAMRAIManager::getMaxNumberPatchDataEntries();
+   d_max_number_registered_components = 0;
+   d_names.resizeArray(max_num_patch_data_components_allowed);
+   d_factories.resizeArray(max_num_patch_data_components_allowed);
+   for (int i = 0; i < max_num_patch_data_components_allowed; i++) {
+      d_free_indices.appendItem(i);
+   }
+   for (unsigned short d = 0; d < d_min_gcw.size(); ++d) {
+      d_min_gcw[d] = IntVector::getZero(tbox::Dimension(static_cast<unsigned short>(d + 1)));
+   }
+}
+
+PatchDescriptor::~PatchDescriptor()
+{
+   d_free_indices.clearItems();
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Add the new factory to the list of patch data factories and assign    *
+ * it an integer index identifier.  Use a free list item if possible.    *
+ *									*
+ *************************************************************************
+ */
+
+int PatchDescriptor::definePatchDataComponent(
+   const std::string& name,
+   tbox::Pointer<PatchDataFactory> factory)
+{
+   TBOX_ASSERT(!name.empty());
+   TBOX_ASSERT(!factory.isNull());
+
+   int ret_index = INDEX_UNDEFINED;
+   if (d_free_indices.isEmpty()) {
+      TBOX_ERROR(
+         "PatchDescriptor::definePatchDataComponent error...\n"
+         << "No available patch data component indices left.\n"
+         << "Application must be restarted and size must be increased.\n"
+         << "See tbox::SAMRAIManager utility for more information."
+         << std::endl);
+   } else {
+      ret_index = d_free_indices.getFirstItem();
+      d_free_indices.removeFirstItem();
+      if (d_max_number_registered_components < ret_index + 1) {
+         d_max_number_registered_components = ret_index + 1;
+      }
+      d_factories[ret_index] = factory;
+      d_names[ret_index] = name;
+   }
+   return ret_index;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Remove the specified patch data factory index and place the index on	*
+ * the list of free indices.						*
+ *									*
+ *************************************************************************
+ */
+
+void
+PatchDescriptor::removePatchDataComponent(
+   const int id)
+{
+   if ((id >= 0) && (id < d_max_number_registered_components)) {
+      if (!d_names[id].empty()) {
+         d_names[id] = std::string();
+      }
+      if (!d_factories[id].isNull()) {
+         d_factories[id].setNull();
+         d_free_indices.addItem(id);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Look up the factory by name; if no matching factory exists, then a	*
+ * pointer to null is returned.  The first matching factory is returned.	*
+ *									*
+ *************************************************************************
+ */
+
+tbox::Pointer<PatchDataFactory>
+PatchDescriptor::getPatchDataFactory(
+   const std::string& name) const
+{
+   tbox::Pointer<PatchDataFactory> factory(NULL);
+   const int id = mapNameToIndex(name);
+   if (id >= 0) {
+      factory = d_factories[id];
+   }
+   return factory;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Search the factory list for a match and return the associated		*
+ * factory.  If no match exists, return a negative identifier.		*
+ *									*
+ *************************************************************************
+ */
+
+int
+PatchDescriptor::mapNameToIndex(
+   const std::string& name) const
+{
+   int ret_index = INDEX_UNDEFINED;
+   int id = 0;
+   while ((ret_index == INDEX_UNDEFINED) &&
+          (id < d_max_number_registered_components)) {
+      if (name == d_names[id]) {
+         ret_index = id;
+      }
+      id++;
+   }
+   return ret_index;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Print index, name, and factory data for the patch descriptor.		*
+ *									*
+ *************************************************************************
+ */
+
+void PatchDescriptor::printClassData(
+   std::ostream& stream) const
+{
+   stream << "\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
+          << std::endl;
+   stream << "Printing PatchDescriptor state ..." << std::endl;
+   stream << "this = " << (PatchDescriptor *)this << std::endl;
+   stream << "d_max_number_registered_components = "
+          << d_max_number_registered_components << std::endl;
+   stream << "\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
+          << std::endl;
+   for (int i = 0; i < d_max_number_registered_components; i++) {
+      stream << "Patch Data Index=" << i << std::endl;
+      if (!d_factories[i].isNull()) {
+         stream << "   Patch Data Factory Name = "
+         << d_names[i] << std::endl;
+         stream << "   Patch Data Factory = "
+         << typeid(*d_factories[i]).name() << std::endl;
+      } else {
+         stream << "   Patch Data Factory = NULL" << std::endl;
+      }
+   }
+   stream << "\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
+          << std::endl;
+}
+
+/*
+ *************************************************************************
+ * Return the maximum ghost cell width across all factories and the
+ * user-specified minimum value.
+ *************************************************************************
+ */
+
+IntVector
+PatchDescriptor::getMaxGhostWidth(
+   const tbox::Dimension& dim) const
+{
+   IntVector max_gcw(d_min_gcw[dim.getValue() - 1]);
+   for (int i = 0; i < d_max_number_registered_components; i++) {
+      if ((!d_factories[i].isNull()) && (d_factories[i]->getDim() == dim)) {
+         max_gcw.max(d_factories[i]->getGhostCellWidth());
+      }
+   }
+   return max_gcw;
+}
+
+/*
+ *************************************************************************
+ * Set the mininum value to be returned by getMaxGhostWidth().
+ *************************************************************************
+ */
+
+void
+PatchDescriptor::setMinGhostWidth(
+   const hier::IntVector& min_value)
+{
+   d_min_gcw[min_value.getDim().getValue() - 1] = min_value;
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchDescriptor.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchDescriptor.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,40 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for patch data objects that live on a patch 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<PatchDataFactory>
+PatchDescriptor::getPatchDataFactory(
+   const int id) const
+{
+   TBOX_ASSERT((id >= 0) && (id < d_max_number_registered_components));
+
+   return d_factories[id];
+}
+
+SAMRAI_INLINE_KEYWORD
+int PatchDescriptor::getMaxNumberRegisteredComponents() const
+{
+   return d_max_number_registered_components;
+}
+
+SAMRAI_INLINE_KEYWORD
+const std::string& PatchDescriptor::mapIndexToName(
+   const int id) const
+{
+   TBOX_ASSERT((id >= 0) && (id < d_max_number_registered_components));
+
+   return d_names[id];
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchDescriptor.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchDescriptor.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,227 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for patch data objects that live on a patch 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_PatchDescriptor
+#define included_hier_PatchDescriptor
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/PatchDataFactory.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/List.h"
+
+#include <string>
+#include <iostream>
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief Class PatchDescriptor maintains a collection of patch data
+ * factories and associated names that describes how patch data entries are
+ * constructed on each patch in an AMR hierarchy.  The factory mechanism is
+ * used to create new instances of concrete patch data objects without knowing
+ * their actual types.  See the Design Patterns book by Gamma {\em et al.}
+ * for more details about the Abstract Factory pattern.  Generally, a PatchDescriptor
+ * object is intended to be shared among all patches (which are distributed across
+ * processors) so that they store patch data objects in the same way.
+ *
+ * Patch data factory objects (and associated names) are explicitly added to the
+ * PatchDescriptor using the definePatchDataComponent() member function.  This function
+ * returns an integer index that can be used to identify the corresponding patch data
+ * on a a patch.  Factories can be removed from the PatchDescriptor using the
+ * removePatchDataComponent() member function, which returns the integer index associated
+ * with the removed factory to a "free list" so that it can be used again.  At any time,
+ * the valid range of indices is >= 0 and < getMaxNumberRegisteredComponents().
+ *
+ * Note that the SAMRAIManager utility establishes a maximum number of patch data
+ * object that may live on a Patch object which, for consistency, must be the same as
+ * the number of patch data factories a PatchDescriptor will hold.   See the documentation
+ * of the SAMRAIManager utility for information about changing this maximum value.
+ *
+ * @see tbox::SAMRAIManager
+ * @see hier::PatchDataFactory
+ * @see hier::PatchDataData
+ * @see hier::Patch
+ */
+
+class PatchDescriptor:public tbox::DescribedClass
+{
+public:
+   /*!
+    * Constructor for a patch descriptor initializes the
+    * descriptor to hold zero patch data factory entries.
+    */
+   PatchDescriptor();
+
+   /*!
+    * The virtual destructor for a patch descriptor deallocates the
+    * internal data structures.
+    */
+   virtual ~PatchDescriptor();
+
+   /*!
+    * Add a new patch data factory and name std::string identifier to the patch
+    * descriptor.  The factory will be given the specified name which must be
+    * unique for the mapNameToIndex() function to execute as expected. However,
+    * there is no internal checking done to ensure that names are unique.
+    *
+    * @return int index assigned to given patch data factory in patch descriptor.
+    *
+    * @param name      std::string name to be associated in name list with given factory,
+    *                  which must be non-empty when assertion checking is active.
+    * @param factory   pointer to factory to add to patch descriptor, which must
+    *                  be non-null when assertion checking is active.
+    */
+   int
+   definePatchDataComponent(
+      const std::string& name,
+      tbox::Pointer<PatchDataFactory> factory);
+
+   /*!
+    * Deallocate the patch data factory in the patch descriptor identified by the
+    * given index.  The index may be assigned to another factory in the future.
+    * However, index will be invalid as a patch data index until it is re-allocated
+    * by the definePatchDataComponent() member function.  An invalid id value
+    * passed to this function is silently ignored.
+    *
+    * @param id      int index of factory to remove from patch descriptor.
+    */
+   void
+   removePatchDataComponent(
+      int id);
+
+   /*!
+    * Retrieve a patch data factory by integer index identifier.  The identifier
+    * is the one previously returned by definePatchDataComponent().  Note that the
+    * factory pointer will be null if the index is is not currently assigned.
+    *
+    * @return pointer to patch data factory assigned to given index.
+    *
+    * @param id      int index of factory to return, which must be >= 0 and
+    *                < the return value of getMaxNumberRegisteredComponents();
+    */
+   tbox::Pointer<PatchDataFactory>
+   getPatchDataFactory(
+      int id) const;
+
+   /*!
+    * Retrieve a patch data factory by name std::string identifier.  Recall that
+    * uniqueness of names is not strictly enforced. So if more than one
+    * factory matches the given name, then only one of them is returned.  If no
+    * matching factory is found, then a null pointer is returned.
+    *
+    * @return pointer to patch data factory assigned to given name.
+    *
+    * @param name    std::string name of factory.
+    */
+   tbox::Pointer<PatchDataFactory>
+   getPatchDataFactory(
+      const std::string& name) const;
+
+   /*!
+    * Get the maximum number of components currently known to the patch
+    * descriptor.  That is, this number indicates the largest number of
+    * components that have been registered with the descriptor via the
+    * definePatchDataComponent() function, which is equal to the largest
+    * known patch data component index + 1.  Note that the total number of
+    * registered components is reduced by calls to removePatchDataComponent(),
+    * but the max number remains the same when components are removed.
+    * In that case, the corresponding indices are placed on a list of "free"
+    * values to be re-used in subsequent calls to definePatchDataComponent().
+    *
+    * @return largest index assigned to this point.
+    */
+   int
+   getMaxNumberRegisteredComponents() const;
+
+   /*!
+    * Lookup a factory by std::string name and return its integer index identifier.
+    * Note that more than one factory may have the same name.  In this case, the
+    * identifier of one of the factories is chosen.  If no matching factory is found,
+    * then an invalid negative index is returned.
+    */
+   int
+   mapNameToIndex(
+      const std::string& name) const;
+
+   /*!
+    * Lookup a factory by identifier and return its name.
+    */
+   const std::string&
+   mapIndexToName(
+      const int id) const;
+
+   /*!
+    * Return the IntVector indicating the maximum ghost cell width of all registered
+    * patch data components for the provided dimension.
+    *
+    * If no components have been registered returns the value set by
+    * setMinGhostWidth(), which is zero by default.
+    *
+    * @param dim Dimension
+    */
+   IntVector
+   getMaxGhostWidth(
+      const tbox::Dimension& dim) const;
+
+   /*!
+    * @brief Set a minimum value on the value returned by
+    * getMaxGhostWidth().
+    *
+    * This method allows users to specify a mininum value returned by
+    * getMaxGhostWidth().  The default minimum is zero.  This value
+    * can be used as a substitute for data that is not yet registered
+    * with the PatchDescriptor and therefore cannot be reflected in
+    * getMaxGhostWidth().
+    *
+    * The dimension associated with the set value is taken to be @c
+    * min_value.getDim().
+    */
+   void
+   setMinGhostWidth(
+      const IntVector& min_value);
+
+   /*!
+    * Print patch descriptor data to given output stream (plog by default).
+    */
+   virtual void
+   printClassData(
+      std::ostream& stream = tbox::plog) const;
+
+private:
+   PatchDescriptor(
+      const PatchDescriptor&);                  // not implemented
+   void
+   operator = (
+      const PatchDescriptor&);                  // not implemented
+
+   int d_max_number_registered_components;
+   tbox::Array<std::string> d_names;
+   tbox::Array<tbox::Pointer<PatchDataFactory> > d_factories;
+   tbox::List<int> d_free_indices;
+
+   /*!
+    * @brief Value set by setMinGhostWidth().
+    */
+   std::vector<IntVector> d_min_gcw;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/PatchDescriptor.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchFactory.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchFactory.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,36 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract factory class for creating patch classes 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_PatchFactory_C
+#define included_hier_PatchFactory_C
+
+#include "SAMRAI/hier/PatchFactory.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/PatchFactory.I"
+#endif
+namespace SAMRAI {
+namespace hier {
+
+PatchFactory::~PatchFactory()
+{
+}
+
+tbox::Pointer<Patch> PatchFactory::allocate(
+   const MappedBox& mapped_box_level_mapped_box,
+   tbox::Pointer<PatchDescriptor> descriptor) const
+{
+   return tbox::Pointer<Patch>(new Patch(mapped_box_level_mapped_box,
+                                  descriptor));
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchFactory.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchFactory.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,20 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract factory class for creating patch classes 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+PatchFactory::PatchFactory()
+{
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchFactory.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchFactory.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract factory class for creating patch classes 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_PatchFactory
+#define included_hier_PatchFactory
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/MappedBox.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/**
+ * Class PatchFactory is a factory object used to create new patches.
+ * New types of patch objects can be introduced into the hierarchy through
+ * derivation and re-defining the allocate member function.  There should
+ * be no direct calls to the patch constructor (other than through the
+ * patch factory).
+ *
+ * @see hier::Patch
+ */
+
+class PatchFactory:public tbox::DescribedClass
+{
+public:
+   /**
+    * Construct a patch factory object.
+    */
+   PatchFactory();
+
+   /**
+    * Virtual destructor for patch factory objects.
+    */
+   virtual ~PatchFactory();
+
+   /**
+    * Allocate a patch with the specified domain and patch descriptor.
+    */
+   virtual tbox::Pointer<Patch>
+   allocate(
+      const MappedBox& mapped_box_level_mapped_box,
+      tbox::Pointer<PatchDescriptor> descriptor) const;
+
+private:
+   PatchFactory(
+      const PatchFactory&);             // not implemented
+   void
+   operator = (
+      const PatchFactory&);                     // not implemented
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/PatchFactory.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchGeometry.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchGeometry.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,214 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Base class for geometry management on patches 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_PatchGeometry_C
+#define included_hier_PatchGeometry_C
+
+#include "SAMRAI/hier/PatchGeometry.h"
+#include "SAMRAI/hier/BoundaryLookupTable.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/PatchGeometry.I"
+#endif
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+PatchGeometry::PatchGeometry(
+   const IntVector& ratio_to_level_zero,
+   const TwoDimBool& touches_regular_bdry,
+   const TwoDimBool& touches_periodic_bdry):
+   d_dim(ratio_to_level_zero.getDim()),
+   d_ratio_to_level_zero(ratio_to_level_zero),
+   d_patch_boundaries(ratio_to_level_zero.getDim()),
+   d_touches_regular_bdry(ratio_to_level_zero.getDim()),
+   d_touches_periodic_bdry(ratio_to_level_zero.getDim())
+
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(ratio_to_level_zero,
+      touches_regular_bdry,
+      touches_periodic_bdry);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+
+   /*
+    * All components of ratio must me nonzero.  Additionally, all components
+    * of ratio not equal to 1 must have the same sign.
+    */
+   int i;
+   for (i = 0; i < d_dim.getValue(); i++) {
+      TBOX_ASSERT(ratio_to_level_zero(i) != 0);
+   }
+   if (d_dim.getValue() > 1) {
+      for (i = 0; i < d_dim.getValue(); i++) {
+         TBOX_ASSERT((ratio_to_level_zero(i)
+                      * ratio_to_level_zero((i + 1) % d_dim.getValue()) > 0)
+            || (ratio_to_level_zero(i) == 1)
+            || (ratio_to_level_zero((i + 1) % d_dim.getValue()) == 1));
+      }
+   }
+#endif
+
+   d_has_regular_boundary = false;
+   d_has_periodic_boundary = false;
+
+   for (int axis = 0; axis < d_dim.getValue(); axis++) {
+      for (int dir = 0; dir < 2; dir++) {
+         d_touches_regular_bdry(axis, dir) = touches_regular_bdry(axis, dir);
+         d_touches_periodic_bdry(axis, dir) = touches_periodic_bdry(axis, dir);
+
+         if (d_touches_regular_bdry(axis, dir)) {
+            d_has_regular_boundary = true;
+         }
+         if (d_touches_periodic_bdry(axis, dir)) {
+            d_has_periodic_boundary = true;
+         }
+      }
+   }
+}
+
+PatchGeometry::~PatchGeometry()
+{
+}
+
+Box
+PatchGeometry::getBoundaryFillBox(
+   const BoundaryBox& bbox,
+   const Box& patch_box,
+   const IntVector& gcw) const
+{
+
+   TBOX_DIM_ASSERT_CHECK_ARGS3(bbox, patch_box, gcw);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   for (int i = 0; i < d_dim.getValue(); i++) {
+      TBOX_ASSERT(gcw(i) >= 0);
+   }
+#endif
+   Box tmp_box(patch_box);
+   tmp_box.grow(gcw);
+   Box fill_box(bbox.getBox() * tmp_box);
+
+   int bdry_type = bbox.getBoundaryType();
+   int location_index = bbox.getLocationIndex();
+
+   // Get the singleton class lookup table
+   const BoundaryLookupTable* blut;
+   blut = BoundaryLookupTable::getLookupTable(d_dim);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   const tbox::Array<int>& location_index_max = blut->getMaxLocationIndices();
+   TBOX_ASSERT(bdry_type > 0);
+   TBOX_ASSERT(bdry_type <= d_dim.getValue());
+   TBOX_ASSERT(location_index >= 0);
+#endif
+
+   if (!fill_box.empty()) {
+
+      // Loop over codimension (a.k.a. boundary type)
+      for (int codim = 1; codim <= d_dim.getValue(); codim++) {
+
+         // When we get a match on the boundary type
+         if (bdry_type == codim) {
+
+            TBOX_ASSERT(location_index < location_index_max[codim - 1]);
+
+            // Get the directions involved in this boundary type from the
+            // lookup table.
+            const tbox::Array<int>& dir =
+               blut->getDirections(location_index, codim);
+
+            // For each direction, identify this as an upper or lower boundary.
+            for (int i = 0; i < codim; i++) {
+               if (blut->isUpper(location_index, codim, i)) {
+                  fill_box.growUpper(dir[i], gcw(dir[i]) - 1);
+               } else {
+                  fill_box.growLower(dir[i], gcw(dir[i]) - 1);
+               }
+            }
+
+            // We've found boundary type, so break out of the loop.
+            break;
+         }
+      }
+   }
+
+   return fill_box;
+}
+
+void
+PatchGeometry::setCodimensionBoundaries(
+   const tbox::Array<BoundaryBox>& bdry_boxes,
+   int codim)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   for (int i = 0; i < bdry_boxes.size(); i++) {
+      TBOX_ASSERT(bdry_boxes[i].getBoundaryType() == codim);
+   }
+   TBOX_ASSERT(codim <= d_dim.getValue());
+   TBOX_ASSERT(codim > 0);
+#endif
+
+   d_patch_boundaries[codim - 1].resizeArray(bdry_boxes.size(),
+      hier::BoundaryBox(d_dim));
+
+   for (int b = 0; b < bdry_boxes.size(); b++) {
+      d_patch_boundaries[codim - 1][b] = bdry_boxes[b];
+   }
+}
+
+void
+PatchGeometry::setBoundaryBoxesOnPatch(
+   const tbox::Array<tbox::Array<BoundaryBox> > bdry)
+{
+   for (int i = 0; i < d_dim.getValue(); i++) {
+      setCodimensionBoundaries(bdry[i], i + 1);
+   }
+}
+
+void PatchGeometry::printClassData(
+   std::ostream& stream) const
+{
+   stream << "\nPatchGeometry::printClassData..." << std::endl;
+   stream << "Ratio to level zero = " << d_ratio_to_level_zero << std::endl;
+   stream << "d_has_regular_boundary = "
+          << d_has_regular_boundary << std::endl;
+   stream << "Boundary boxes for patch..." << std::endl;
+   for (int d = 0; d < d_dim.getValue(); d++) {
+      const int n = d_patch_boundaries[d].getSize();
+      stream << "Boundary box array " << d << " has " << n << " boxes"
+             << std::endl;
+      for (int i = 0; i < n; i++) {
+         stream << "box " << i << " = "
+         << d_patch_boundaries[d][i].getBox() << std::endl;
+      }
+   }
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchGeometry.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchGeometry.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,199 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Base class for geometry management on patches 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+
+#endif
+
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+bool& PatchGeometry::TwoDimBool::operator () (
+   int dim,
+   int side)
+{
+   TBOX_ASSERT(dim >= 0 && dim < d_dim.getValue());
+   TBOX_ASSERT(side == 0 || side == 1);
+
+   return d_data[2 * dim + side];
+}
+
+SAMRAI_INLINE_KEYWORD
+const bool& PatchGeometry::TwoDimBool::operator () (
+   int dim,
+   int side) const
+{
+   TBOX_ASSERT(dim >= 0 && dim < d_dim.getValue());
+   TBOX_ASSERT(side == 0 || side == 1);
+
+   return d_data[2 * dim + side];
+}
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Array<tbox::Array<BoundaryBox> > PatchGeometry::getPatchBoundaries()
+const
+{
+   return d_patch_boundaries.getArrays();
+}
+
+SAMRAI_INLINE_KEYWORD
+const IntVector& PatchGeometry::getRatio() const
+{
+   return d_ratio_to_level_zero;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool PatchGeometry::intersectsPhysicalBoundary() const
+{
+   return d_has_regular_boundary;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool PatchGeometry::getTouchesRegularBoundary() const
+{
+   return d_has_regular_boundary;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool PatchGeometry::getTouchesPeriodicBoundary() const
+{
+   return d_has_periodic_boundary;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool
+PatchGeometry::getTouchesRegularBoundary(
+   int axis,
+   int upperlower) const
+{
+   TBOX_ASSERT(axis >= 0 && axis < d_dim.getValue());
+   TBOX_ASSERT(upperlower == 0 || upperlower == 1);
+
+   return d_touches_regular_bdry(axis, upperlower);
+}
+
+SAMRAI_INLINE_KEYWORD
+bool
+PatchGeometry::getTouchesPeriodicBoundary(
+   int axis,
+   int upperlower) const
+{
+   TBOX_ASSERT(axis >= 0 && axis < d_dim.getValue());
+   TBOX_ASSERT(upperlower == 0 || upperlower == 1);
+
+   return d_touches_periodic_bdry(axis, upperlower);
+}
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Array<BoundaryBox>&
+PatchGeometry::getNodeBoundaries() const
+{
+   return d_patch_boundaries[d_dim.getValue() - 1];
+}
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Array<BoundaryBox>&
+PatchGeometry::getEdgeBoundaries() const
+{
+   if (d_dim.getValue() < 2) {
+      TBOX_ERROR("PatchGeometry error in getEdgeBoundary...\n"
+         << "DIM < 2 not supported." << std::endl);
+   }
+
+   // The "funny" indexing prevents a warning when compiling for
+   // DIM < 2.  This code is only reached if DIM >= 2 when
+   // executing.
+   return d_patch_boundaries[d_dim.getValue() < 2 ? 0 : d_dim.getValue() - 2];
+}
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Array<BoundaryBox>&
+PatchGeometry::getFaceBoundaries() const
+{
+   if (d_dim.getValue() < 3) {
+      TBOX_ERROR("PatchGeometry error in getFaceBoundary...\n"
+         << "DIM < 3 not supported." << std::endl);
+   }
+
+   // The "funny" indexing prevents a warning when compiling for
+   // DIM < 3.  This code is only reached if DIM >= 3 when
+   // executing.
+   return d_patch_boundaries[d_dim.getValue() < 3 ? 0 : d_dim.getValue() - 3];
+}
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Array<BoundaryBox>&
+PatchGeometry::getCodimensionBoundaries(
+   const int codim) const
+{
+   TBOX_ASSERT((codim > 0) && (codim <= d_dim.getValue()));
+
+   return d_patch_boundaries[codim - 1];
+}
+
+SAMRAI_INLINE_KEYWORD
+void PatchGeometry::TwoDimBool::setAll(
+   bool v)
+{
+   for (int i = 0; i < 2 * d_dim.getValue(); ++i) {
+      d_data[i] = v;
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+PatchGeometry::TwoDimBool::TwoDimBool():
+   d_dim(tbox::Dimension::getInvalidDimension())
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+PatchGeometry::TwoDimBool::TwoDimBool(
+   const tbox::Dimension& dim):
+   d_dim(dim)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(dim);
+   setAll(false);
+}
+
+SAMRAI_INLINE_KEYWORD
+PatchGeometry::TwoDimBool::TwoDimBool(
+   const tbox::Dimension& dim,
+   bool v):
+   d_dim(dim)
+{
+   for (int i = 0; i < 2 * d_dim.getValue(); ++i) {
+      d_data[i] = v;
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Dimension& PatchGeometry::TwoDimBool::getDim() const {
+   return d_dim;
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchGeometry.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchGeometry.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,296 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Base class for geometry management on patches 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_PatchGeometry
+#define included_hier_PatchGeometry
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/GlobalId.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/PatchBoundaries.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/List.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace hier {
+
+/**
+ * Class PatchGeometry is the base class for geometry classes that
+ * manage index space and mesh increment information on individual patches.
+ * Patch geometry information is used for setting boundary conditions in
+ * ghost cells and is used in the inter-level transfer operators for refining
+ * or coarsening data between two patches associated with different index
+ * spaces.  The boundary information for patches is actually computed by
+ * the GridGeometry class.
+ *
+ * @see hier::BoundaryBox
+ * @see hier::GridGeometry
+ */
+
+class PatchGeometry:public tbox::DescribedClass
+{
+public:
+   /*!
+    * @brief Array of 2*DIM booleans (with default constructor),
+    * used to instantiate the sparse container map<LocalId,TwoDimBool>
+    * (map<LocalId,bool[2*DIM]> does not work).
+    */
+   class TwoDimBool
+   {
+public:
+      explicit TwoDimBool(
+         const tbox::Dimension& dim);
+
+      explicit TwoDimBool(
+         const tbox::Dimension& dim,
+         bool v);
+
+      void
+      setAll(
+         bool v);
+
+      bool&
+      operator () (
+         int dim,
+         int side);
+
+      const bool&
+      operator () (
+         int dim,
+         int side) const;
+
+      /**
+       * Return the dimension of this object.
+       */
+      const tbox::Dimension&
+      getDim() const;
+
+      friend class ::std::map<LocalId, SAMRAI::hier::PatchGeometry::TwoDimBool>;
+
+private:
+      /*
+       * Needed by brain dead STL. Don't use for other purposes.
+       */
+      TwoDimBool();
+
+      const tbox::Dimension d_dim;
+      bool d_data[2 * tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   };
+
+   /**
+    * The default constructor for the patch geometry base class.
+    */
+   explicit PatchGeometry(
+      const IntVector& ratio_to_level_zero,
+      const TwoDimBool& touches_regular_bdry,
+      const TwoDimBool& touches_periodic_bdry);
+
+   /**
+    * The virtual destructor for the patch geometry base class.
+    */
+   virtual ~PatchGeometry();
+
+   /**
+    * Return const reference to patch boundary information.
+    */
+   const tbox::Array<tbox::Array<BoundaryBox> >
+   getPatchBoundaries() const;
+
+   /*!
+    * @brief Set the boundary box arrays for this patch geometry.
+    *
+    * An array of length DIM of tbox::Array< BoundaryBox > is passed
+    * in to be stored as the boundary boxes for this patch geometry.
+    *
+    * @param bdry The array of BoundaryBox arrays.
+    */
+   void
+   setBoundaryBoxesOnPatch(
+      const tbox::Array<tbox::Array<BoundaryBox> > bdry);
+
+   /**
+    * Return const reference to ratio to level zero index space.
+    */
+   const IntVector&
+   getRatio() const;
+
+   /**
+    * Return a boolean value indicating whether the patch boundary
+    * intersects the physical domain boundary in a non-periodic
+    * direction.  In other words, the return value is true when the
+    * patch has non-empty boundary boxes that lie outside the physical
+    * domain.  Otherwise, the return value is false.  Note that when
+    * a patch touches the "boundary" of the physical domain in a periodic
+    * direction, there are no boundary boxes to fill; the data is filled
+    * from the proper region of the domain interior in the periodic direction.
+    */
+   bool
+   intersectsPhysicalBoundary() const;
+
+   /**
+    * Return array of boundary box components for patch each of which
+    * intersects the patch at a single point (i.e., 0-dim intersection
+    * between cells in patch and cells in boundary box).
+    */
+   const tbox::Array<BoundaryBox>&
+   getNodeBoundaries() const;
+
+   /**
+    * Return array of boundary box components for patch each of which
+    * intersects the patch along a 1-dim edge (i.e., 1-dim intersection
+    * between cells in patch and cells in boundary box).
+    *
+    * When assertion checking is active, this routine throws an assertion
+    * when DIM < 2.
+    */
+   const tbox::Array<BoundaryBox>&
+   getEdgeBoundaries() const;
+
+   /**
+    * Return array of boundary box components for patch each of which
+    * intersects the patch along a 2-dim face (i.e., 2-dim intersection
+    * between cells in patch and cells in boundary box).
+    *
+    * When assertion checking is active, this routine throws an assertion
+    * when DIM < 3.
+    */
+   const tbox::Array<BoundaryBox>&
+   getFaceBoundaries() const;
+
+   /**
+    * Return array of boundary box components for patch each of which
+    * intersects the patch as a (DIM - codim)-dimensional object.
+    * That is,
+    *
+    * if DIM == 1: (co(dim == tbox::Dimension(1))) => same components as getNodeBoundaries.
+    *
+    * if DIM == 2, (co(dim == tbox::Dimension(1))) => same components as getEdgeBoundaries.
+    *              (co(dim == tbox::Dimension(2))) => same components as getNodeBoundaries.
+    *
+    * if DIM == 3, (co(dim == tbox::Dimension(1))) => same components as getFaceBoundaries.
+    *              (co(dim == tbox::Dimension(2))) => same components as getEdgeBoundaries.
+    *              (co(dim == tbox::Dimension(3))) => same components as getNodeBoundaries.
+    *
+    * When assertion checking is active, this routine throws an assertion
+    * when codim < 0 or codim > DIM.
+    */
+   const tbox::Array<BoundaryBox>&
+   getCodimensionBoundaries(
+      const int codim) const;
+
+   /**
+    * Set the array of boundary box components of the given codimension
+    * for a patch.
+    */
+   void
+   setCodimensionBoundaries(
+      const tbox::Array<BoundaryBox>& bdry_boxes,
+      const int codim);
+
+   /*!
+    * @brief Compute a box outside a physical domain that needs to be filled.
+    *
+    * The patch box will be grown by the given ghost cell width and
+    * then intersected with the boundary box.  The resulting intersection
+    * will be grown to the needed ghost cell width in the direction
+    * normal to the boundary.
+    *
+    * @param bbox BoundaryBox representing location and type of boundary
+    * @param patch_box The box for the patch where data is being filled
+    * @param gcw ghost cell width to fill
+    */
+   Box
+   getBoundaryFillBox(
+      const BoundaryBox& bbox,
+      const Box& patch_box,
+      const IntVector& gcw) const;
+
+   /*!
+    * @brief Query whether patch touches a regular boundary
+    *
+    * Returns true if the Patch touches any non-periodic physical boundary
+    */
+   bool
+   getTouchesRegularBoundary() const;
+
+   /*!
+    * @brief Query whether patch touches a regular boundary
+    *
+    * Returns true if the Patch touches any periodic boundary
+    */
+   bool
+   getTouchesPeriodicBoundary() const;
+
+   /*!
+    * @brief Query whether patch touches a specific regular boundary
+    *
+    * Returns true if the Patch touches a non-periodic physical boundary
+    * on the side of the Patch specified in the argument list.  The side
+    * is specified by an axis direction and a flag specified the upper or
+    * lower side.
+    *
+    * @param axis       Axis direction normal to the side being checked
+    * @param upperlower Flag should be 0 if checking the lower side in the
+    *                   axis direction, or 1 if checking the upper side.
+    */
+   bool
+   getTouchesRegularBoundary(
+      int axis,
+      int upperlower) const;
+
+   /*!
+    * @brief Query whether patch touches a specific regular boundary
+    *
+    * Returns true if the Patch touches a periodic boundary
+    * on the side of the Patch specified in the argument list.  The side
+    * is specified by an axis direction and a flag specified the upper or
+    * lower side.
+    *
+    * @param axis       Axis direction normal to the side being checked
+    * @param upperlower Flag should be 0 if checking the lower side in the
+    *                   axis direction, or 1 if checking the upper side.
+    */
+   bool
+   getTouchesPeriodicBoundary(
+      int axis,
+      int upperlower) const;
+
+   /**
+    * Print object data to the specified output stream.
+    */
+   void
+   printClassData(
+      std::ostream& stream) const;
+
+private:
+   const tbox::Dimension d_dim;
+
+   bool d_has_regular_boundary;
+   bool d_has_periodic_boundary;
+   IntVector d_ratio_to_level_zero;
+   PatchBoundaries d_patch_boundaries;
+
+   TwoDimBool d_touches_regular_bdry;
+   TwoDimBool d_touches_periodic_bdry;
+
+   tbox::List<IntVector> d_periodic_shifts;
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/PatchGeometry.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchHierarchy.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchHierarchy.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1065 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An AMR hierarchy of patch levels 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_PatchHierarchy_C
+#define included_hier_PatchHierarchy_C
+
+#include "SAMRAI/hier/PatchHierarchy.h"
+
+#include <stdio.h>
+
+#include "SAMRAI/hier/OverlapConnectorAlgorithm.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#define HIER_PATCH_HIERARCHY_VERSION (3)
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/PatchHierarchy.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+std::vector<const PatchHierarchy::ConnectorWidthRequestorStrategy*>
+PatchHierarchy::s_class_cwrs;
+
+tbox::StartupShutdownManager::Handler
+PatchHierarchy::s_initialize_finalize_handler(
+   PatchHierarchy::initializeCallback,
+   0,
+   0,
+   PatchHierarchy::finalizeCallback,
+   tbox::StartupShutdownManager::priorityTimers);
+
+/*
+ *************************************************************************
+ *									*
+ * Instantiate the patch hierarchy and set default values.		*
+ * Initialize from restart if necessary.                                 *
+ *									*
+ *************************************************************************
+ */
+
+PatchHierarchy::PatchHierarchy(
+   const std::string& object_name,
+   tbox::Pointer<GridGeometry> geometry,
+   const tbox::Pointer<tbox::Database>& database,
+   bool register_for_restart):
+
+   d_dim(geometry->getDim()),
+
+   d_max_levels(1),
+   d_ratio_to_coarser(1, hier::IntVector(d_dim,1)),
+   d_proper_nesting_buffer(d_max_levels-1, 1),
+   d_smallest_patch_size(1, hier::IntVector(d_dim,1)),
+   d_largest_patch_size(1, hier::IntVector(d_dim,tbox::MathUtilities<int>::getMax())),
+   d_allow_patches_smaller_than_ghostwidth(false),
+   d_allow_patches_smaller_than_minimum_size_to_prevent_overlaps(false),
+   d_self_connector_widths(),
+   d_fine_connector_widths(),
+   d_connector_widths_are_computed(false),
+   d_individual_cwrs(),
+   d_domain_mapped_box_level(d_dim)
+{
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!geometry.isNull());
+
+   d_object_name = object_name;
+   d_registered_for_restart = register_for_restart;
+   d_number_levels = 0;
+   d_grid_geometry = geometry;
+   d_patch_descriptor = VariableDatabase::getDatabase()->
+      getPatchDescriptor();
+   d_patch_factory = new PatchFactory;
+   d_patch_level_factory = new PatchLevelFactory;
+
+   /*
+    * Grab the physical domain (including periodic images) from the
+    * GridGeometry and set up domain data dependent on it.
+    */
+   MappedBoxSet domain_mapped_boxes;
+   geometry->computePhysicalDomain(domain_mapped_boxes,
+      IntVector::getOne(d_dim));
+   setupDomainData(domain_mapped_boxes);
+
+   d_individual_cwrs = s_class_cwrs;
+
+   if ( !database.isNull() ) {
+      getFromInput(database);
+   }
+   else {
+      /*
+       * Without input database, the default is single-level with no
+       * patch size constraints.
+       */
+   }
+
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->
+      registerRestartItem(d_object_name, this);
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * The destructor tells the tbox::RestartManager to remove this hierarchy *
+ * from the list of restart items and automatically deletes all          *
+ * allocated resources through smart pointers and arrays.                *
+ *									*
+ *************************************************************************
+ */
+
+PatchHierarchy::~PatchHierarchy()
+{
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->unregisterRestartItem(d_object_name);
+   }
+}
+
+/*
+ *************************************************************************
+ * If simulation is not from restart, read data from input database.
+ * Otherwise, override data members initialized from restart with
+ * values in the input database.
+ *************************************************************************
+ */
+
+void PatchHierarchy::getFromInput(
+   const tbox::Pointer<tbox::Database>& db)
+{
+   TBOX_ASSERT(!db.isNull());
+
+   /*
+    * Read input for maximum number of levels.
+    */
+
+   d_max_levels = db->getIntegerWithDefault("max_levels", d_max_levels);
+
+   if ( d_max_levels != int(d_ratio_to_coarser.size()) ) {
+      d_ratio_to_coarser.resize( d_max_levels, d_ratio_to_coarser.back() );
+      d_smallest_patch_size.resize( d_max_levels, d_smallest_patch_size.back() );
+      d_largest_patch_size.resize( d_max_levels, d_largest_patch_size.back() );
+   }
+
+   std::vector<std::string> level_names(d_max_levels, std::string("level_"));
+   for ( int ln=0; ln<d_max_levels; ++ln ) {
+      level_names[ln] += tbox::Utilities::intToString(ln);
+   }
+
+   // Read in ratio_to_coarser.
+   if ( db->isDatabase("ratio_to_coarser") ) {
+      const tbox::Pointer<tbox::Database>
+         tmp_db(db->getDatabase("ratio_to_coarser"));
+      for ( int ln=1; ln<d_max_levels; ++ln ) {
+         if ( tmp_db->isInteger(level_names[ln]) ) {
+            tmp_db->getIntegerArray(level_names[ln],
+                                    &d_ratio_to_coarser[ln][0],
+                                    d_dim.getValue());
+         }
+         else {
+            d_ratio_to_coarser[ln] = d_ratio_to_coarser[ln-1];
+         }
+      }
+   }
+
+   // Read in smallest_patch_size.
+   if ( db->isDatabase("smallest_patch_size") ) {
+      const tbox::Pointer<tbox::Database>
+         tmp_db(db->getDatabase("smallest_patch_size"));
+      for ( int ln=0; ln<d_max_levels; ++ln ) {
+         if ( tmp_db->isInteger(level_names[ln]) ) {
+            tmp_db->getIntegerArray(level_names[ln],
+                                    &d_smallest_patch_size[ln][0],
+                                    d_dim.getValue());
+         }
+         else {
+            d_smallest_patch_size[ln] = d_smallest_patch_size[ln-1];
+         }
+      }
+   }
+
+   // Read in largest_patch_size.
+   if ( db->isDatabase("largest_patch_size") ) {
+      const tbox::Pointer<tbox::Database>
+         tmp_db(db->getDatabase("largest_patch_size"));
+      for ( int ln=0; ln<d_max_levels; ++ln ) {
+         if ( tmp_db->isInteger(level_names[ln]) ) {
+            tmp_db->getIntegerArray(level_names[ln],
+                                    &d_largest_patch_size[ln][0],
+                                    d_dim.getValue());
+         }
+         else {
+            d_largest_patch_size[ln] = d_largest_patch_size[ln-1];
+         }
+      }
+   }
+
+   tbox::Array<int> proper_nesting_buffer(1,1);
+   if (db->isInteger("proper_nesting_buffer")) {
+      proper_nesting_buffer = db->getIntegerArray("proper_nesting_buffer");
+   }
+   d_proper_nesting_buffer.clear();
+   for ( int ln=0; ln<d_max_levels-1; ++ln ) {
+      if ( ln < proper_nesting_buffer.size() ) {
+         d_proper_nesting_buffer.push_back(int(proper_nesting_buffer[ln]));
+      }
+      else {
+         d_proper_nesting_buffer.push_back(int(d_proper_nesting_buffer[ln-1]));
+      }
+   }
+   for (size_t ln = 0; ln < d_proper_nesting_buffer.size(); ln++) {
+      if (d_proper_nesting_buffer[ln] < 0) {
+         TBOX_ERROR(
+            d_object_name << ":  "
+            <<
+            "Key data `proper_nesting_buffer' has values < 0.");
+      }
+      if (d_proper_nesting_buffer[ln] == 0) {
+         TBOX_WARNING(
+            d_object_name << ":  "
+            <<
+            "Using zero `proper_nesting_buffer' values.");
+      }
+   }
+
+
+   d_allow_patches_smaller_than_ghostwidth =
+      db->getBoolWithDefault("allow_patches_smaller_than_ghostwidth",
+                             d_allow_patches_smaller_than_ghostwidth);
+
+   d_allow_patches_smaller_than_minimum_size_to_prevent_overlaps =
+      db->getBoolWithDefault(
+         "allow_patches_smaller_than_minimum_size_to_prevent_overlaps",
+         d_allow_patches_smaller_than_minimum_size_to_prevent_overlaps);
+   if (d_allow_patches_smaller_than_minimum_size_to_prevent_overlaps) {
+      TBOX_WARNING(
+         d_object_name << ":  "
+         <<
+         "Allowing patches smaller than the given "
+         <<
+         "smallest patch size.  Note:  If periodic "
+         <<
+         "boundary conditions are used, this flag is "
+         << "ignored in the periodic directions.");
+   }
+
+}
+
+/*
+ *************************************************************************
+ * Adds a ConnectorWidthRequestorStrategy to be used when this
+ * PatchHierarchy computes its required Connector width.
+ *************************************************************************
+ */
+void PatchHierarchy::registerConnectorWidthRequestor(
+   const ConnectorWidthRequestorStrategy &cwrs )
+{
+   if ( d_connector_widths_are_computed ) {
+      TBOX_ERROR("PatchHierarchy::registerConnectorWidthRequestor:\n"
+                 <<"Registering a new ConnectorWidthRequestorStrategy after\n"
+                 <<"calling getRequiredConnectorWidth() is disallowed because\n"
+                 <<"it may cause getRequiredConnectorWidth() to return\n"
+                 <<"conflicting requirements.");
+   }
+
+   size_t i;
+   for ( i=0; i<d_individual_cwrs.size(); ++i ) {
+      if ( d_individual_cwrs[i] == &cwrs ) {
+         break;
+      }
+   }
+   if ( i == d_individual_cwrs.size() ) {
+      d_individual_cwrs.push_back(&cwrs);
+   }
+}
+
+/*
+ *************************************************************************
+ * Adds a ConnectorWidthRequestorStrategy to be automatically
+ * registered with all PatchHierarchy objects during their
+ * construction (if they are not constructed with the flag to bypass
+ * the auto-registration mechanism).
+ *************************************************************************
+ */
+void PatchHierarchy::registerAutoConnectorWidthRequestorStrategy(
+   const ConnectorWidthRequestorStrategy &cwrs )
+{
+   size_t i;
+   for ( i=0; i<s_class_cwrs.size(); ++i ) {
+      if ( s_class_cwrs[i] == &cwrs ) {
+         break;
+      }
+   }
+   if ( i == s_class_cwrs.size() ) {
+      s_class_cwrs.push_back(&cwrs);
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void PatchHierarchy::initializeCallback()
+{
+   /*
+    * No-op.  This class doesn't 
+    */
+}
+
+/*
+ ***************************************************************************
+ * Clear out static registry.
+ ***************************************************************************
+ */
+
+void PatchHierarchy::finalizeCallback()
+{
+   for ( int i=0; i<int(s_class_cwrs.size()); ++i ) {
+      s_class_cwrs[i] = NULL;
+   }
+   s_class_cwrs.clear();
+   /*
+    * Hopefully, reserving 0 will free memory, making memory checkers
+    * happy.
+    */
+   s_class_cwrs.reserve(0);
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+IntVector PatchHierarchy::getRequiredConnectorWidth(
+   int base_ln,
+   int head_ln) const
+{
+   TBOX_ASSERT(head_ln >= 0);
+   TBOX_ASSERT(head_ln < d_max_levels);
+   TBOX_ASSERT(base_ln >= 0);
+   TBOX_ASSERT(base_ln < d_max_levels);
+
+   if ( !d_connector_widths_are_computed ) {
+
+      const IntVector &zero_vector(IntVector::getZero(d_dim));
+      d_self_connector_widths.clear();
+      d_self_connector_widths.insert( d_self_connector_widths.begin(),
+                                      d_max_levels,
+                                      zero_vector );
+      d_fine_connector_widths.clear();
+      if ( d_max_levels > 1 ) {
+         d_fine_connector_widths.insert( d_fine_connector_widths.begin(),
+                                         d_max_levels-1,
+                                         zero_vector );
+      }
+
+      /*
+       * Get the required widths satisfying all registered
+       * ConnectorWidthRequestorStrategy objects.
+       */
+
+      std::vector<hier::IntVector> self_connector_widths;
+      std::vector<hier::IntVector> fine_connector_widths;
+      for ( size_t i=0; i<d_individual_cwrs.size(); ++i ) {
+         d_individual_cwrs[i]->computeRequiredConnectorWidths(
+            self_connector_widths,
+            fine_connector_widths,
+            *this);
+         TBOX_ASSERT( self_connector_widths.size() == static_cast<unsigned int>(d_max_levels) );
+         TBOX_ASSERT( fine_connector_widths.size() == static_cast<unsigned int>(d_max_levels-1) );
+         for ( int ln=0; ln<d_max_levels; ++ln ) {
+            d_self_connector_widths[ln].max(self_connector_widths[ln]);
+         }
+         for ( int ln=0; ln<d_max_levels-1; ++ln ) {
+            d_fine_connector_widths[ln].max(fine_connector_widths[ln]);
+         }
+      }
+
+      /*
+       * Make sure the self connector widths are at least as big as
+       * the fine.  This is required because self Connectors at the
+       * tag level is used to compute the fine Connectors.  This
+       * requirement is due to the GriddingAlgorithm, so perhaps it
+       * should be moved there!  On the other hand, GriddingAlgorithm
+       * cannot be expected know about fine_connector_width
+       * requirements of of ohter width requestors.
+       */
+      for ( int ln=0; ln<d_max_levels-1; ++ln ) {
+         d_self_connector_widths[ln].max(d_fine_connector_widths[ln]);
+      }
+      d_connector_widths_are_computed = true;
+   }
+
+   if ( base_ln != head_ln ) {
+      if (head_ln == base_ln + 1) {
+         // Width is for fine Connector.
+         return d_fine_connector_widths[base_ln];
+      } else if (base_ln == head_ln + 1) {
+         // Width is for coarse Connector.
+         return d_fine_connector_widths[head_ln] * d_ratio_to_coarser[base_ln];
+      }
+      TBOX_ERROR("PatchHierarchy::getRequiredConnectorWidth: base_ln and\n"
+                 <<"head_ln should differ by at most 1.\n"
+                 <<"base_ln=" << base_ln << "  head_ln=" << head_ln);
+   }
+   return d_self_connector_widths[base_ln];
+}
+
+/*
+ *************************************************************************
+ * Get the Connector between 2 levels in the hierarchy.
+ * The levels must be the same or adjacent levels.
+ * The Connector will have the width required by the hierarchy.
+ *
+ * This is primarily a convenience.  Its functionality can be duplicated
+ * by getting the required Connector widths and getting the Connector
+ * with that width from the PatchLevels' MappedBoxLevels.
+ *************************************************************************
+ */
+const Connector &PatchHierarchy::getConnector(
+   int base_ln,
+   int head_ln) const
+{
+   TBOX_ASSERT( base_ln >= 0 );
+   TBOX_ASSERT( base_ln < d_number_levels );
+   TBOX_ASSERT( head_ln >= 0 );
+   TBOX_ASSERT( head_ln < d_number_levels );
+   const MappedBoxLevel &base(*d_patch_levels[base_ln]->getMappedBoxLevel());
+   const MappedBoxLevel &head(*d_patch_levels[head_ln]->getMappedBoxLevel());
+   const IntVector width(getRequiredConnectorWidth(base_ln,head_ln));
+   const Connector &con = base.getPersistentOverlapConnectors().
+      findConnector(head, width);
+   return con;
+}
+
+/*
+ *******************************************************************
+ * Return the connector from the given level number to the domain
+ * MappedBoxLevel.
+ *******************************************************************
+ */
+
+const Connector
+& PatchHierarchy::getConnectorToDomain(
+   int base_ln) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(base_ln < d_number_levels && base_ln >= 0);
+#endif
+   return *d_connectors_to_domain[base_ln];
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Create a copy of this patch hierarchy with each level refined by      *
+ * the given ratio and return a pointer to it.                           *
+ *									*
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::PatchHierarchy>
+PatchHierarchy::makeRefinedPatchHierarchy(
+   const std::string& fine_hierarchy_name,
+   const hier::IntVector& refine_ratio,
+   bool register_for_restart) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, refine_ratio);
+   TBOX_ASSERT(!fine_hierarchy_name.empty());
+   TBOX_ASSERT(fine_hierarchy_name != d_object_name);
+   TBOX_ASSERT(refine_ratio > hier::IntVector::getZero(refine_ratio.getDim()));
+
+   tbox::Pointer<hier::GridGeometry> fine_geometry =
+      d_grid_geometry->makeRefinedGridGeometry(
+         fine_hierarchy_name + "GridGeometry",
+         refine_ratio,
+         register_for_restart);
+
+   hier::PatchHierarchy* fine_hierarchy =
+      new hier::PatchHierarchy(fine_hierarchy_name,
+                               fine_geometry,
+                               tbox::Pointer<tbox::Database>(NULL),
+                               register_for_restart);
+
+
+   // Set hierarchy parameters.
+
+   fine_hierarchy->d_max_levels = d_max_levels;
+   fine_hierarchy->d_ratio_to_coarser = d_ratio_to_coarser;
+   fine_hierarchy->d_smallest_patch_size = d_smallest_patch_size;
+   fine_hierarchy->d_largest_patch_size = d_largest_patch_size;
+   fine_hierarchy->d_individual_cwrs = d_individual_cwrs;
+   fine_hierarchy->d_proper_nesting_buffer = d_proper_nesting_buffer;
+   fine_hierarchy->d_allow_patches_smaller_than_ghostwidth = d_allow_patches_smaller_than_ghostwidth;
+   fine_hierarchy->d_allow_patches_smaller_than_minimum_size_to_prevent_overlaps = d_allow_patches_smaller_than_minimum_size_to_prevent_overlaps;
+
+   for (int ln = 0; ln < d_number_levels; ln++) {
+
+      // SGS TODOD why isn't this a ctor with more args and not all this setting of new_level?
+      // What happened to ctor is initialization?
+      tbox::Pointer<hier::PatchLevel> new_level(new hier::PatchLevel(d_dim));
+      new_level->setRefinedPatchLevel(d_patch_levels[ln],
+         refine_ratio,
+         fine_geometry);
+
+      new_level->setLevelNumber(ln);
+      new_level->setLevelInHierarchy(true);
+      new_level->setRatioToCoarserLevel(
+         d_patch_levels[ln]->getRatioToCoarserLevel());
+      if (ln >= fine_hierarchy->d_number_levels) {
+         fine_hierarchy->d_number_levels = ln + 1;
+         fine_hierarchy->d_patch_levels.resizeArray(d_number_levels);
+      }
+      fine_hierarchy->d_patch_levels[ln] = new_level;
+   }
+
+   return tbox::Pointer<hier::PatchHierarchy>(fine_hierarchy);
+
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Create a copy of this patch hierarchy with each level coarsened by    *
+ * the given ratio and return a pointer to it.                           *
+ *									*
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::PatchHierarchy>
+PatchHierarchy::makeCoarsenedPatchHierarchy(
+   const std::string& coarse_hierarchy_name,
+   const hier::IntVector& coarsen_ratio,
+   bool register_for_restart) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, coarsen_ratio);
+   TBOX_ASSERT(!coarse_hierarchy_name.empty());
+   TBOX_ASSERT(coarse_hierarchy_name != d_object_name);
+   TBOX_ASSERT(coarsen_ratio > hier::IntVector::getZero(coarsen_ratio.getDim()));
+
+   tbox::Pointer<hier::GridGeometry> coarse_geometry =
+      d_grid_geometry->makeCoarsenedGridGeometry(
+         coarse_hierarchy_name + "GridGeometry",
+         coarsen_ratio,
+         register_for_restart);
+
+   hier::PatchHierarchy* coarse_hierarchy =
+      new hier::PatchHierarchy(coarse_hierarchy_name,
+                               coarse_geometry,
+                               tbox::Pointer<tbox::Database>(NULL),
+                               register_for_restart);
+
+
+   // Set hierarchy parameters.
+
+   coarse_hierarchy->d_max_levels = d_max_levels;
+   coarse_hierarchy->d_ratio_to_coarser = d_ratio_to_coarser;
+   coarse_hierarchy->d_smallest_patch_size = d_smallest_patch_size;
+   coarse_hierarchy->d_largest_patch_size = d_largest_patch_size;
+   coarse_hierarchy->d_individual_cwrs = d_individual_cwrs;
+   coarse_hierarchy->d_proper_nesting_buffer = d_proper_nesting_buffer;
+
+   for (int ln = 0; ln < d_number_levels; ln++) {
+      tbox::Pointer<hier::PatchLevel> new_level(new hier::PatchLevel(d_dim));
+      new_level->setCoarsenedPatchLevel(d_patch_levels[ln],
+         coarsen_ratio,
+         coarse_geometry);
+      new_level->setLevelNumber(ln);
+      new_level->setLevelInHierarchy(true);
+      new_level->setRatioToCoarserLevel(
+         d_patch_levels[ln]->getRatioToCoarserLevel());
+      if (ln >= coarse_hierarchy->d_number_levels) {
+         coarse_hierarchy->d_number_levels = ln + 1;
+         coarse_hierarchy->d_patch_levels.resizeArray(d_number_levels);
+      }
+      coarse_hierarchy->d_patch_levels[ln] = new_level;
+   }
+
+   return tbox::Pointer<hier::PatchHierarchy>(coarse_hierarchy);
+
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Create a new patch level in the hierarchy.				*
+ *									*
+ *************************************************************************
+ */
+
+void PatchHierarchy::makeNewPatchLevel(
+   const int ln,
+   const MappedBoxLevel& new_mapped_box_level)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, new_mapped_box_level);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(ln >= 0);
+   for (int i = 0; i < d_dim.getValue(); i++) {
+      TBOX_ASSERT(
+         new_mapped_box_level.getRefinementRatio() > IntVector::getZero(d_dim));
+   }
+#endif
+
+   /*
+    * Make sure the level conforms to certain parameters preset
+    * for the hierarchy.  We are not (yet) checking everything we
+    * should.
+    */
+   if ( ln >= d_max_levels ) {
+      TBOX_ERROR("PatchHierarchy::makeNewPatchLevel: Cannot make\n"
+                 <<"level " << ln << " in a PatchHierarchy with a\n"
+                 <<"max of " << d_max_levels << ".\n"
+                 <<"Use setMaxNumberOfLevels() to change the max.\n");
+   }
+   if ( ln > 0 ) {
+      const IntVector expected_ratio(
+         d_ratio_to_coarser[ln]*(d_patch_levels[ln-1]->getRatioToLevelZero()));
+      if ( ln > 0 &&
+           ( new_mapped_box_level.getRefinementRatio() != expected_ratio ) ) {
+         TBOX_ERROR("PatchHierarchy::makeNewPatchLevel: patch level "
+                    << ln <<" has refinement ratio "
+                    << new_mapped_box_level.getRefinementRatio()
+                    <<", it should be " << expected_ratio );
+      }
+   }
+
+
+   if (ln >= d_number_levels) {
+      d_number_levels = ln + 1;
+      d_patch_levels.resizeArray(d_number_levels);
+      d_connectors_to_domain.resize(d_number_levels,
+                                    tbox::Pointer<Connector>(NULL) );
+   }
+
+   d_patch_levels[ln] = d_patch_level_factory->allocate(
+      new_mapped_box_level,
+      d_grid_geometry, d_patch_descriptor, d_patch_factory);
+   d_patch_levels[ln]->getMappedBoxLevel()->cacheGlobalReducedData();
+
+   d_patch_levels[ln]->setLevelNumber(ln);
+   d_patch_levels[ln]->setLevelInHierarchy(true);
+
+   if ((ln > 0) && (!d_patch_levels[ln - 1].isNull())) {
+      d_patch_levels[ln]->setRatioToCoarserLevel(
+         d_patch_levels[ln]->getRatioToLevelZero()
+         / (d_patch_levels[ln - 1]->getRatioToLevelZero()));
+   }
+
+
+   /*
+    * Set d_connectors_to_domain[ln] by either bridging the new
+    * mapped_box_level to the domain mapped_box_level across the coarse
+    * mapped_box_level or using Connector::findOverlaps.  Using findOverlaps
+    * is probably faster because the domain mapped_box_level usually
+    * has a fixed number of boxes and is already in a globalized state.
+    *
+    * d_connectors_to_domain has the samg gcw as the peer connectors
+    * (peer gcws are larger than gcw to finer).  This is an
+    * arbitrary decision which can be reviewed later.
+    */
+   d_connectors_to_domain[ln] = new Connector(
+      *d_patch_levels[ln]->getMappedBoxLevel(),
+      d_domain_mapped_box_level,
+      getRequiredConnectorWidth(ln, ln),
+      MappedBoxLevel::DISTRIBUTED);
+   OverlapConnectorAlgorithm oca;
+   oca.findOverlaps(*d_connectors_to_domain[ln]);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Remove the specified patch level from the hierarchy.			*
+ *									*
+ *************************************************************************
+ */
+
+void PatchHierarchy::removePatchLevel(
+   const int l)
+{
+   TBOX_ASSERT((l >= 0) && (l < d_number_levels));
+
+   d_patch_levels[l].setNull();
+   if (d_number_levels == l + 1) {
+      d_number_levels--;
+   }
+}
+
+/*
+ ****************************************************************************
+ * Set the various physical domain description in various forms.  If
+ * the domain is periodic, the input mapped_boxes must include the
+ * periodic image mapped_boxes.
+ ****************************************************************************
+ */
+
+void PatchHierarchy::setupDomainData(
+   const MappedBoxSet& domain_mapped_boxes)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   for (MappedBoxSet::const_iterator ni = domain_mapped_boxes.begin();
+        ni != domain_mapped_boxes.end();
+        ++ni) {
+      TBOX_ASSERT(ni->getOwnerRank() == 0);
+   }
+#endif
+
+   /*
+    * Initialize the domain MappedBoxLevel.  We are using getSAMRAIWorld() here
+    * because we have not yet designed the mechanism for introducing a specific
+    * SAMRAI_MPI object for the hierarchy.  We would eventually like to do that.
+    */
+   d_domain_mapped_box_level.initialize(domain_mapped_boxes,
+      IntVector::getOne(d_dim),
+      tbox::SAMRAI_MPI::getSAMRAIWorld(),
+      MappedBoxLevel::GLOBALIZED);
+
+   /*
+    * Set up the domain search tree.
+    */
+   d_periodic_domain_searchtree = new MappedBoxTree(
+         d_dim, d_domain_mapped_box_level.getGlobalMappedBoxes());
+
+   /*
+    * Set up the domain search tree without periodic images.
+    */
+   if (d_domain_mapped_box_level.getLocalNumberOfBoxes(0) ==
+       domain_mapped_boxes.size()) {
+      d_domain_searchtree = d_periodic_domain_searchtree;
+   } else {
+      std::vector<MappedBox> domain_mapped_boxes_excluding_periodic;
+      domain_mapped_boxes_excluding_periodic.reserve(
+         d_domain_mapped_box_level.getLocalNumberOfBoxes());
+      for (MappedBoxSet::const_iterator ni = domain_mapped_boxes.begin();
+           ni != domain_mapped_boxes.end(); ++ni) {
+         if (!ni->isPeriodicImage()) {
+            domain_mapped_boxes_excluding_periodic.insert(
+               domain_mapped_boxes_excluding_periodic.end(),
+               *ni);
+         }
+      }
+      d_domain_searchtree = new MappedBoxTree(d_dim,
+            domain_mapped_boxes_excluding_periodic);
+   }
+
+
+   /*
+    * Set up the search tree for the domain's complement.
+    */
+   hier::BoxList complement_list(hier::Box::getUniverse(d_dim));
+   complement_list.removeIntersections(*d_periodic_domain_searchtree);
+   hier::BoxArray complement_array(d_dim, complement_list);
+
+   d_complement_searchtree = new MappedBoxTree(d_dim,
+         &complement_array[0],
+         complement_array.size());
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Writes out the class version number and the number of levels in the  *
+ * hierarchy and has each patch_level write itself out.			*
+ * The database keys for the patch levels are given by                   *
+ * "level#" where # is the level number for the patch_level.             *
+ * The patchdata that are written to the database are determined by      *
+ * which those bits in the VariableDatabase restart table.          *
+ *									*
+ * Asserts that the database pointer passed in is not NULL.		*
+ *									*
+ *************************************************************************
+ */
+
+void PatchHierarchy::putToDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+   putToDatabase(database,
+      VariableDatabase::getDatabase()->getPatchDataRestartTable());
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Writes out the class version number and the number of levels in the  *
+ * hierarchy and has each patch_level write itself out.			*
+ * The database keys for the patch levels are given by                   *
+ * "level#" where # is the level number for the patch_level.             *
+ * The patchdata that are written to the database are determined by      *
+ * which those bits in the specified ComponentSelector that are     *
+ * set.                                                                  *
+ *									*
+ * Asserts that the database pointer passed in is not NULL.		*
+ *									*
+ *************************************************************************
+ */
+
+void PatchHierarchy::putToDatabase(
+   tbox::Pointer<tbox::Database> database,
+   const ComponentSelector& patchdata_write_table)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   database->putInteger("HIER_PATCH_HIERARCHY_VERSION",
+      HIER_PATCH_HIERARCHY_VERSION);
+   database->putInteger("d_number_levels", d_number_levels);
+
+   std::vector<std::string> level_names(d_max_levels);
+   const std::string prefix("level_");
+   for ( int ln=0; ln<d_max_levels; ++ln ) {
+      level_names[ln] = prefix + tbox::Utilities::levelToString(ln);
+   }
+
+   /*
+    * Write hierarchy parameters.
+    */
+   database->putInteger("d_max_levels", d_max_levels);
+   database->putBool("d_allow_patches_smaller_than_ghostwidth", d_allow_patches_smaller_than_ghostwidth);
+   database->putBool("d_allow_patches_smaller_than_minimum_size_to_prevent_overlaps", d_allow_patches_smaller_than_minimum_size_to_prevent_overlaps);
+   database->putIntegerArray("d_proper_nesting_buffer",
+                             &d_proper_nesting_buffer[0],
+                             static_cast<int>(d_proper_nesting_buffer.size()) );
+
+   tbox::Pointer<tbox::Database> ratio_to_coarser_db =
+      database->putDatabase("d_ratio_to_coarser");
+   for (unsigned int ln = 0; ln < d_ratio_to_coarser.size(); ln++) {
+      int* tmp_array = &d_ratio_to_coarser[ln][0];
+      ratio_to_coarser_db->putIntegerArray(level_names[ln], tmp_array,
+                                           d_dim.getValue());
+   }
+
+   tbox::Pointer<tbox::Database> largest_patch_db =
+      database->putDatabase("d_largest_patch_size");
+   for (unsigned int ln = 0; ln < d_largest_patch_size.size(); ln++) {
+      int* tmp_array = &d_largest_patch_size[ln][0];
+      largest_patch_db->putIntegerArray(level_names[ln], tmp_array,
+                                        d_dim.getValue());
+   }
+
+   tbox::Pointer<tbox::Database> smallest_patch_db =
+      database->putDatabase("d_smallest_patch_size");
+   for (unsigned int ln = 0; ln < d_smallest_patch_size.size(); ln++) {
+      int* tmp_array = &d_smallest_patch_size[ln][0];
+      smallest_patch_db->putIntegerArray(level_names[ln], tmp_array,
+                                         d_dim.getValue());
+   }
+
+   tbox::Pointer<tbox::Database> self_connector_widths_db =
+      database->putDatabase("d_self_connector_widths");
+   for (unsigned int ln = 0; ln < d_self_connector_widths.size(); ln++) {
+      int* tmp_array = &d_self_connector_widths[ln][0];
+      self_connector_widths_db->putIntegerArray(level_names[ln], tmp_array,
+                                                d_dim.getValue());
+   }
+
+   tbox::Pointer<tbox::Database> fine_connector_widths_db =
+      database->putDatabase("d_fine_connector_widths");
+   for (unsigned int ln = 0; ln < d_fine_connector_widths.size(); ln++) {
+      int* tmp_array = &d_fine_connector_widths[ln][0];
+      fine_connector_widths_db->putIntegerArray(level_names[ln], tmp_array,
+                                                d_dim.getValue());
+   }
+
+
+
+   for (int i = 0; i < d_number_levels; i++) {
+
+      tbox::Pointer<tbox::Database> level_database =
+         database->putDatabase(level_names[i]);
+
+      d_patch_levels[i]->putToDatabase(level_database, patchdata_write_table);
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Gets the database in the root database that corresponds to the object *
+ * name.  This method then checks the class version against restart      *
+ * file version.  If they match, it creates each hierarchy level and     *
+ * reads in the level data.   The number of levels read from restart is  *
+ * the minimum of the argument max levels and the number of levels in    *
+ * the restart file.                                                     *
+ *									*
+ *************************************************************************
+ */
+void PatchHierarchy::getFromRestart()
+{
+
+   tbox::Pointer<tbox::Database> restart_db =
+      tbox::RestartManager::getManager()->getRootDatabase();
+
+   tbox::Pointer<tbox::Database> database;
+
+   if (restart_db->isDatabase(d_object_name)) {
+      database = restart_db->getDatabase(d_object_name);
+   } else {
+      TBOX_ERROR("PatchHierarchy::getFromRestart() error...\n"
+         << "   Restart database with name "
+         << d_object_name << " not found in restart file" << std::endl);
+   }
+
+   int ver = database->getInteger("HIER_PATCH_HIERARCHY_VERSION");
+   if (ver != HIER_PATCH_HIERARCHY_VERSION) {
+      TBOX_ERROR("PatchHierarchy::getFromRestart error...\n"
+         << "  object name = " << d_object_name
+         << " : Restart file version different than class version" << std::endl);
+   }
+
+   getFromDatabase(
+      database,
+      VariableDatabase::getDatabase()->getPatchDataRestartTable() );
+}
+
+void PatchHierarchy::getFromDatabase(
+   tbox::Pointer<tbox::Database> database,
+   const ComponentSelector& component_selector)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   d_number_levels = database->getInteger("d_number_levels");
+   if (d_number_levels <= 0) {
+      TBOX_ERROR("PatchHierarchy::getFromDatabase error ...\n"
+         << "  object name = " << d_object_name
+         << " : `d_number_levels' is <= zero in restart file");
+   }
+
+   d_number_levels = tbox::MathUtilities<int>::Min(d_number_levels,
+                                                   d_max_levels);
+
+   d_patch_levels.resizeArray(d_number_levels);
+
+   std::vector<std::string> level_names(d_max_levels);
+   const std::string prefix("level_");
+   for ( int ln=0; ln<d_max_levels; ++ln ) {
+      level_names[ln] = prefix + tbox::Utilities::levelToString(ln);
+   }
+
+   /*
+    * Read hierarchy paremeters.
+    */
+   if ( d_max_levels > 0 ) {
+      d_max_levels = tbox::MathUtilities<int>::Min(
+         d_max_levels, database->getInteger("d_max_levels") );
+   }
+   else {
+      d_max_levels = database->getInteger("d_max_levels");
+   }
+
+   d_allow_patches_smaller_than_ghostwidth = database->getBool("d_allow_patches_smaller_than_ghostwidth");
+   d_allow_patches_smaller_than_minimum_size_to_prevent_overlaps = database->getBool("d_allow_patches_smaller_than_minimum_size_to_prevent_overlaps");
+   d_proper_nesting_buffer.resize(d_max_levels-1, 0);
+   if ( d_max_levels > 1 ) {
+      database->getIntegerArray("d_proper_nesting_buffer", &d_proper_nesting_buffer[0], d_max_levels-1);
+   }
+
+   tbox::Pointer<tbox::Database> ratio_to_coarser_db =
+      database->getDatabase("d_ratio_to_coarser");
+   for (unsigned int ln = 0; ln < d_ratio_to_coarser.size(); ln++) {
+      int* tmp_array = &d_ratio_to_coarser[ln][0];
+      ratio_to_coarser_db->getIntegerArray(level_names[ln], tmp_array,
+                                           d_dim.getValue());
+   }
+
+   tbox::Pointer<tbox::Database> largest_patch_db =
+      database->getDatabase("d_largest_patch_size");
+   for (unsigned int ln = 0; ln < d_largest_patch_size.size(); ln++) {
+      int* tmp_array = &d_largest_patch_size[ln][0];
+      largest_patch_db->getIntegerArray(level_names[ln], tmp_array,
+                                        d_dim.getValue());
+   }
+
+   tbox::Pointer<tbox::Database> smallest_patch_db =
+      database->getDatabase("d_smallest_patch_size");
+   for (unsigned int ln = 0; ln < d_smallest_patch_size.size(); ln++) {
+      int* tmp_array = &d_smallest_patch_size[ln][0];
+      smallest_patch_db->getIntegerArray(level_names[ln], tmp_array,
+                                         d_dim.getValue());
+   }
+
+   tbox::Pointer<tbox::Database> self_connector_widths_db =
+      database->getDatabase("d_self_connector_widths");
+   for (unsigned int ln = 0; ln < d_self_connector_widths.size(); ln++) {
+      int* tmp_array = &d_self_connector_widths[ln][0];
+      self_connector_widths_db->getIntegerArray(level_names[ln], tmp_array,
+                                                d_dim.getValue());
+   }
+
+   tbox::Pointer<tbox::Database> fine_connector_widths_db =
+      database->getDatabase("d_fine_connector_widths");
+   for (unsigned int ln = 0; ln < d_fine_connector_widths.size(); ln++) {
+      int* tmp_array = &d_fine_connector_widths[ln][0];
+      fine_connector_widths_db->getIntegerArray(level_names[ln], tmp_array,
+                                                d_dim.getValue());
+   }
+
+   for (int i = 0; i < d_number_levels; i++) {
+
+      tbox::Pointer<tbox::Database> level_database =
+         database->getDatabase(level_names[i]);
+
+      d_patch_levels[i] = d_patch_level_factory->allocate(
+            level_database,
+            d_grid_geometry,
+            d_patch_descriptor,
+            component_selector,
+            d_patch_factory,
+            false);
+   }
+   /*
+    * Compute Connectors.
+    * BTNG FIXME: This should be replaced by writing edges to
+    * restart and reading them back.
+    */
+   for (int i = 0; i < d_number_levels; ++i) {
+      for (int j = i - 1; j <= i + 1; ++j) {
+         if (j >= 0 && j < d_number_levels) {
+            const IntVector connector_width = getRequiredConnectorWidth(i, j);
+            d_patch_levels[i]->getMappedBoxLevel()->
+            getPersistentOverlapConnectors().findOrCreateConnector(
+               *d_patch_levels[j]->getMappedBoxLevel(),
+               connector_width);
+         }
+      }
+   }
+
+}
+
+int PatchHierarchy::recursivePrint(
+   std::ostream& os,
+   const std::string& border,
+   int depth)
+{
+   int totl_npatches = 0;
+   int totl_ncells = 0;
+   int nlevels = getNumberOfLevels();
+   os << border << "Number of levels = " << nlevels << "\n";
+   if (depth > 0) {
+      int ln;
+      for (ln = 0; ln < nlevels; ++ln) {
+         os << border << "Level " << ln << '/' << nlevels << "\n";
+         tbox::Pointer<PatchLevel> level = getPatchLevel(ln);
+         level->recursivePrint(os, border + "\t", depth - 1);
+         totl_npatches += level->getGlobalNumberOfPatches();
+         totl_ncells += level->getMappedBoxLevel()->getGlobalNumberOfCells();
+      }
+      os << border << "Total number of patches = " << totl_npatches << "\n";
+      os << border << "Total number of cells = " << totl_ncells << "\n";
+   }
+   return 0;
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchHierarchy.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchHierarchy.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,204 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An AMR hierarchy of patch levels 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<BasePatchLevel>
+PatchHierarchy::getPatchLevel(
+   const int l) const
+{
+   TBOX_ASSERT((l >= 0) && (l < d_number_levels));
+
+   return d_patch_levels[l];
+}
+
+SAMRAI_INLINE_KEYWORD
+const tbox::ConstPointer<MappedBoxLevel>& PatchHierarchy::getMappedBoxLevel( int level ) const
+{
+   return d_patch_levels[level]->getMappedBoxLevel();
+}
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<PatchDescriptor>
+PatchHierarchy::getPatchDescriptor() const
+{
+   return d_patch_descriptor;
+}
+
+SAMRAI_INLINE_KEYWORD const MappedBoxLevel&
+PatchHierarchy::getDomainMappedBoxLevel() const
+{
+   return d_domain_mapped_box_level;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD const hier::MappedBoxTree& PatchHierarchy::
+getDomainSearchTree() const
+{
+   return *d_domain_searchtree;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD const hier::MappedBoxTree& PatchHierarchy::
+getPeriodicDomainSearchTree() const
+{
+   return *d_periodic_domain_searchtree;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool PatchHierarchy::levelExists(
+   const int l) const
+{
+   return (l < d_number_levels) && !(d_patch_levels[l].isNull());
+}
+
+SAMRAI_INLINE_KEYWORD
+bool PatchHierarchy::finerLevelExists(
+   const int l) const
+{
+   return (l + 1 < d_number_levels) && !(d_patch_levels[l + 1].isNull());
+}
+
+SAMRAI_INLINE_KEYWORD
+int PatchHierarchy::getNumberOfLevels() const
+{
+   return d_number_levels;
+}
+
+SAMRAI_INLINE_KEYWORD
+int PatchHierarchy::getMaxNumberOfLevels() const
+{
+   return d_max_levels;
+}
+
+SAMRAI_INLINE_KEYWORD
+void PatchHierarchy::setMaxNumberOfLevels( int max_levels )
+{
+   d_max_levels = max_levels;
+
+   if ( d_max_levels != int(d_ratio_to_coarser.size()) ) {
+      d_ratio_to_coarser.resize( d_max_levels, d_ratio_to_coarser.back() );
+      d_smallest_patch_size.resize( d_max_levels, d_smallest_patch_size.back() );
+      d_largest_patch_size.resize( d_max_levels, d_largest_patch_size.back() );
+      d_proper_nesting_buffer.resize( d_max_levels-1,
+                                      d_proper_nesting_buffer.empty() ? 1 : d_proper_nesting_buffer.back() );
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void PatchHierarchy::setRatioToCoarserLevel( const IntVector &ratio,
+                                             int level )
+{
+   TBOX_ASSERT( level > 0 && level < d_max_levels );
+   d_ratio_to_coarser[level] = ratio;
+}
+
+SAMRAI_INLINE_KEYWORD
+const IntVector &PatchHierarchy::getRatioToCoarserLevel( int level ) const
+{
+   TBOX_ASSERT( level < d_max_levels );
+   return d_ratio_to_coarser[level];
+}
+
+SAMRAI_INLINE_KEYWORD
+void PatchHierarchy::setSmallestPatchSize( const IntVector &size,
+                                           int level )
+{
+   TBOX_ASSERT( level >= 0 && level < d_max_levels );
+   d_smallest_patch_size[level] = size;
+}
+
+SAMRAI_INLINE_KEYWORD
+const IntVector &PatchHierarchy::getSmallestPatchSize( int level ) const
+{
+   TBOX_ASSERT( level >= 0 && level < d_max_levels );
+   return d_smallest_patch_size[level];
+}
+
+SAMRAI_INLINE_KEYWORD
+void PatchHierarchy::setLargestPatchSize( const IntVector &size,
+                                          int level )
+{
+   TBOX_ASSERT( level >= 0 && level < d_max_levels );
+   d_largest_patch_size[level] = size;
+}
+
+SAMRAI_INLINE_KEYWORD
+const IntVector &PatchHierarchy::getLargestPatchSize( int level ) const
+{
+   TBOX_ASSERT( level >= 0 && level < d_max_levels );
+   return d_largest_patch_size[level];
+}
+
+SAMRAI_INLINE_KEYWORD
+int PatchHierarchy::getProperNestingBuffer( int level ) const
+{
+   TBOX_ASSERT( level >= 0 && level < d_max_levels );
+   return (level < d_max_levels-1) ? d_proper_nesting_buffer[level] : -1;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool PatchHierarchy::allowPatchesSmallerThanGhostWidth() const
+{
+   return d_allow_patches_smaller_than_ghostwidth;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool PatchHierarchy::allowPatchesSmallerThanMinimumSize() const
+{
+   return d_allow_patches_smaller_than_minimum_size_to_prevent_overlaps;
+}
+
+
+SAMRAI_INLINE_KEYWORD
+int PatchHierarchy::getFinestLevelNumber() const
+{
+   return d_number_levels - 1;
+}
+
+SAMRAI_INLINE_KEYWORD
+void PatchHierarchy::setPatchFactory(
+   tbox::Pointer<PatchFactory> factory)
+{
+   d_patch_factory = factory;
+}
+
+SAMRAI_INLINE_KEYWORD
+void PatchHierarchy::setPatchLevelFactory(
+   tbox::Pointer<PatchLevelFactory> factory)
+{
+   d_patch_level_factory = factory;
+}
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<GridGeometry>
+PatchHierarchy::getGridGeometry() const
+{
+   return d_grid_geometry;
+}
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Dimension& PatchHierarchy::getDim() const
+{
+   return d_dim;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchHierarchy.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchHierarchy.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1097 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An AMR hierarchy of patch levels 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_PatchHierarchy
+#define included_hier_PatchHierarchy
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/BasePatchHierarchy.h"
+#include "SAMRAI/hier/ComponentSelector.h"
+#include "SAMRAI/hier/GridGeometry.h"
+#include "SAMRAI/hier/MappedBoxLevel.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/PatchFactory.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/PatchLevelFactory.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Serializable.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief Class PatchHierarchy maintains the patch levels that
+ * define the AMR hierarchy.
+ *
+ * The following describes the input file keys and data types. For each
+ * input key that involves input for levels in the hierarchy, assume that 
+ * we have N levels, numbered coarsest to finest as 0,..., N-1.  For such 
+ * input, the value for a level must be given as ``level_n = value'' where
+ * n is the level number.  When more values are given than needed for the 
+ * maximum number of levels, extra values are ignored.  When fewer values 
+ * are given, the last value provided will be used on each level without a 
+ * specified input value.  See example input below.
+ *
+ *   - \b    max_levels
+ *      Integer value specifying maximum number of levels
+ *      allowed in the AMR patch hierarchy.
+ *
+ *   - \b    ratio_to_coarser
+ *      A set of max_levels - 1 integer vectors (each has length = DIM), 
+ *      each of which indicates the ratio of the index space of a patch 
+ *      level to that of the next coarser level in the hierarchy.  The 
+ *      input is given for each level n, where n (= 1, 2,..., N-1) is the 
+ *      level number. 
+ *
+ *   - \b    largest_patch_size
+ *      A set of max_levels integer vectors (each has length = DIM) each of
+ *      which indicates the dimensions of largest patch allowed on the level 
+ *      in the hierarchy.  Non-positive values for patch size corresponds to 
+ *      no upper limit on patch size.  The input is given for each level n, 
+ *      where n (= 0, 1,..., N-1) is the level number.
+ *
+ *   - \b    smallest_patch_size
+ *      A set of max_levels integer vectors (each has length = DIM) each of
+ *      which indicates the dimensions of smallest patch allowed on the level 
+ *      in the hierarchy.  The smallest patch allowed must be at least as 
+ *      large as the maximum ghost cell width for all variables in the problem.
+ *      If some smaller patch size is given in input, then it will be 
+ *      overridden by the maximum ghost width.  If no input is given, a 
+ *      default of the maximum ghost cell width over all variables is used.
+ *      The input is given for each level n, where n (= 0, 1,..., N-1) is 
+ *      the level number.
+ *
+ *   - \b    proper_nesting_buffer
+ *      A set of max_levels - 1 integer values specifying the number of 
+ *      coarse cells by which the next finer level is nested within the 
+ *      interior of the union of the patches on the next coarser level.
+ *      The input is given for each level n, where n (= 0, 1,..., N-2) is 
+ *      the level number.
+ *
+ *    - \b    allow_patches_smaller_than_ghostwidth
+ *      A boolean value ("TRUE" or "FALSE") indicating whether patches
+ *      are allowed that are smaller than the maximum variable ghost width 
+ *      along some coordinate direction.  Recall that when a smallest 
+ *      patch size provided in the input file is smaller than the maximum 
+ *      ghost width of all the registered variables, then by default the 
+ *      smallest patch size will be set to the maximum ghost width.  Set this 
+ *      flag to TRUE to override this default behavior and to allow the 
+ *      smallest patch size given in the input to remain in effect.  
+ *      The default value is FALSE.
+ *
+ *    - \b    allow_patches_smaller_than_minimum_size_to_prevent_overlaps
+ *      A boolean value ("TRUE" or "FALSE") indicating whether patches
+ *      are allowed to be smaller than the minimum patch size to prevent
+ *      overlapping patches.  In order to enforce minimum patch size 
+ *      restrictions, boxes may be grown during adaptive gridding operations.  
+ *      This may lead to patches whose boxes overlap.  This may be a problem
+ *      for some applications. If overlaps are undesirable and you are
+ *      willing to relax the minimum size constraints, set this parameter
+ *      TRUE.  By default, it is FALSE.
+ *
+ * Note that when continuing from restart, the input values in the
+ * input file override all values read in from the restart database.
+ *
+ * The following represents sample input data for a three-dimensional problem:
+ *
+ * @code
+ *
+ *   // Required input: maximum number of levels in patch hierarchy
+ *   max_levels = 4
+ *
+ *   // Required input: vector ratio between each finer level and next coarser
+ *   ratio_to_coarser {
+ *      level_1 = 2, 2, 2
+ *      level_2 = 2, 2, 2
+ *      level_3 = 4, 4, 4
+ *   }
+ *
+ *   // Optional input: int vector for largest patch size on each level.
+ *   largest_patch_size {
+ *      level_0 = 40, 40, 40
+ *      level_1 = 30, 30, 30
+ *      // all finer levels will use same values as level_1...
+ *   }
+ *
+ *   // Optional input: int vector for smallest patch size on each level.
+ *   smallest_patch_size {
+ *      level_0 = 16, 16, 16
+ *      // all finer levels will use same values as level_0...
+ *   }
+ *
+ *   // Optional input:  buffer of one cell used on each level
+ *   proper_nesting_buffer = 1
+ *
+ * @endcode
+ *
+ * @see hier::PatchLevel
+ * @see hier::PatchDescriptor
+ */
+
+class PatchHierarchy:
+   public BasePatchHierarchy
+{
+public:
+
+   /*
+    *  TODO: There must be a better way to do what this base class
+    *  provides.  If not, then we need to make this documentation clearer.
+    *  Specifically, it is not clear how one actually determines the 
+    *  correct width information to provide.  Also, the documentation
+    *  alludes to usage that is internal to SAMRAI (e.g., the stuff about
+    *  GriddingAlgorithm) so it is not clear what a user needs to do 
+    *  and what she does not. 
+    *
+    *  The notion of "connector width" does not appear to be defined 
+    *  anywhere.  If is is, where is the definition?
+    */
+   /*!
+    * @brief Abstract base class defining a Strategy pattern interface
+    * for providing Connector width information to the PatchHierarchy.
+    *
+    * The hierarchy needs to know that Connector width constraints
+    * must be applied so it can provide correct connector width information
+    * to mesh generation operations so that they can generate Connectors 
+    * with sufficient widths.  It is most efficient (scales better) to 
+    * generate overlap Connectors when the mesh is built rather than searching
+    * for overlaps later.  If the required widths are not set up this way,
+    * or if the code building the hierarchy does not provide Connectors
+    * of sufficient widths, SAMRAI will still work but will not scale
+    * well.  The mechanism for generating missing Connectors as needed
+    * is in the class PersistentOverlapConnector.
+    *
+    * The user of a PatchHierarchy object registers implementations of 
+    * this strategy class with the PatchHierarchy.  See
+    * PatchHierarchy::registerConnectorWidthRequestor().
+    * By default, requesters implemented by the SAMRAI library will be
+    * automatically registered. Unless you want to provide your own
+    * requesters, no special action is required.
+    *
+    * TODO: The following paragraph is more confusing than helpful.
+    * It exposes internal SAMRAI implementation details and confuses
+    * what a user needs to do.
+    * 
+    * When the hierarchy is first asked for any required width, it
+    * uses the registered implementations to compute all required
+    * widths.  After that, no further registration is allowed.
+    * Implementations of this class usually requires the max ghost
+    * data width and the max stencil widths, so it is best to make
+    * sure that those have been registered before doing something that
+    * calls getRequiredConnectorWidth(), such as using
+    * mesh::GriddingAlgorithm to populate the hierarchy with a level.
+    *
+    * Example of a typical scenario: GriddingAlgorithm is used to
+    * build the hierarchy.  Two classes that will want the hierarchy's
+    * Connectors to have some specified widths are GriddingAlgorithm
+    * and RefineSchedule.  This strategy should therefore be
+    * implemented by GriddingAlgorithm and RefineSchedule.
+    */
+   class ConnectorWidthRequestorStrategy {
+   public:
+    /*
+     * TODO: As a general rule in SAMRAI, we provide a default ctor
+     * explicitly (at least).
+     */
+
+      /*!
+       * @brief Destructor
+       */
+      virtual ~ConnectorWidthRequestorStrategy() {}
+
+    /*
+     * TODO: How is a developer supposed to know what IntVector values 
+     * are needed when she implements this routine?
+     */
+      /*!
+       * @brief Provide Connector widths the child class requires in
+       * order to work properly on a given hierarchy.
+       *
+       * The Connector widths are computed to the maximum that could be
+       * requested between levels in the given PatchHierarchy. The two vector
+       * parameters will contain the computed widths.
+       * @par Assumptions
+       * <li> On completion of the function call, self_connector_width must be
+       *      of length @c patch_hierarchy.getMaxNumberOfLevels().
+       * <li> On completion of the function call, fine_connector_width must be
+       *      of length @c patch_hierarchy.getMaxNumberOfLevels() - 1.
+       *
+       * @param[out] self_connector_width Array of widths for Connectors
+       * from a level to itself.
+       *
+       * @param[out] fine_connector_width Array of widths for Connectors
+       * from a level to the next finer level.
+       *
+       * @param[in]  patch_hierarchy
+       */
+      virtual void computeRequiredConnectorWidths(
+         std::vector<hier::IntVector>& self_connector_widths,
+         std::vector<hier::IntVector>& fine_connector_widths,
+         const PatchHierarchy &patch_hierarchy) const = 0;
+   };
+
+
+/*
+ * TODO: How does the hierarchy get properly initialized if the input
+ * database argument is a null pointer? 
+ */
+   /*!
+    * @brief Constructor initializing the state of PatchHierarchy.
+    *
+    * The constructor for the PatchHierarchy initializes the number of
+    * levels to zero, sets the geometry for the PatchHierarchy, and
+    * registers the PatchHierarchy for restart with the specified name
+    * by default.
+    *
+    * @par Errors/Assertions
+    * Passing in an empty std::string or a null grid geometry pointer
+    * will result in an unrecoverable assertion when assertion checking is
+    * active.
+    *
+    * @param[in]  object_name
+    * @param[in]  geometry
+    * @param[in]  database Database specifying hierarchy parameters.
+    * @param[in]  register_for_restart @b Default: true
+    */
+   explicit PatchHierarchy(
+      const std::string& object_name,
+      tbox::Pointer<GridGeometry> geometry,
+      const tbox::Pointer<tbox::Database>& database =
+         tbox::Pointer<tbox::Database>(NULL),
+      bool register_for_restart = true);
+
+   /*!
+    * @brief Destructor for PatchHierarchy.
+    */
+   ~PatchHierarchy();
+
+   /*!
+    * @brief Create a refined version of this patch hierarchy.
+    *
+    * Create and return pointer to a patch hierarchy that is a refined
+    * version of this patch hierarchy object.  That is, the data
+    * members of the returned patch hierarchy are set by refining
+    * information on this hierarchy using the given ratio.  The refined
+    * hierarchy will cover the same physical space as this hierarchy
+    * and will have the same number of levels and same mapping of
+    * patches to processors on each level.  However, the index space
+    * of each level will be refined by the specified ratio.
+    * @note
+    * This function does not allocate patch data so this must be done
+    * before any data operations can be performed on the new
+    * hierarchy.
+    *
+    * @return The refined patch hierarchy.
+    *
+    * @param[in]  fine_hierarchy_name
+    * @param[in]  refine_ratio
+    * @param[in]  register_for_restart
+    */
+   tbox::Pointer<hier::PatchHierarchy>
+   makeRefinedPatchHierarchy(
+      const std::string& fine_hierarchy_name,
+      const hier::IntVector& refine_ratio,
+      bool register_for_restart) const;
+
+   /*!
+    * @brief Create a coarsened version of this patch hierarchy.
+    *
+    * Create and return pointer to a patch hierarchy that is a
+    * coarsened version of this patch hierarchy object.  That is, the
+    * data members of the returned patch hierarchy are set by
+    * coarsening information on this hierarchy by the given ratio.
+    * The coarsened hierarchy will cover the same physical space as
+    * this hierarchy and will have the same number of levels and same
+    * mapping of patches to processors on each level.  However, the
+    * index space of each level will be coarsened by the specified
+    * ratio.
+    * @note
+    * This function does not allocate patch data so
+    * this must be done before any data operations can be performed on
+    * the new hierarchy.
+    *
+    * @return Pointer to the coarsened patch hierarchy.
+    *
+    * @param[in]  coarse_hierarchy_name
+    * @param[in]  coarsen_ratio
+    * @param[in]  register_for_restart
+    */
+   tbox::Pointer<hier::PatchHierarchy>
+   makeCoarsenedPatchHierarchy(
+      const std::string& coarse_hierarchy_name,
+      const hier::IntVector& coarsen_ratio,
+      bool register_for_restart) const;
+
+/*
+ * TODO: Is it an error to call this method when a level with the given
+ * level number already exists?  Are some preconditions assumed?
+ */
+   /*!
+    * @brief Construct new PatchLevel in hierarchy at given level number.
+    *
+    * Boxes, their mappings and the refinement ratio are obtained from
+    * @c new_mapped_box_level.
+    *
+    * @param[in]  level_number
+    * @param[in]  new_mapped_box_level
+    */
+   void
+   makeNewPatchLevel(
+      const int level_number,
+      const MappedBoxLevel& new_mapped_box_level);
+
+   /*!
+    * @brief Remove a patch level
+    *
+    * Remove PatchLevel from the hierarchy and adjust number of levels
+    * accordingly.
+    *
+    * @param[in]  level
+    */
+   void
+   removePatchLevel(
+      const int level);
+
+   /*!
+    * @brief Get a PatchLevel from the hierarchy.
+    *
+    * @return a pointer to the specified patch level.
+    *
+    * @param[in]  level
+    */
+   tbox::Pointer<BasePatchLevel>
+   getPatchLevel(
+      const int level) const;
+
+   /*!
+    * @brief Get the patch descriptor.
+    *
+    * @return a pointer to the patch descriptor used for the patches in
+    * the patch hierarchy.
+    */
+   tbox::Pointer<PatchDescriptor>
+   getPatchDescriptor() const;
+
+   /*!
+    * @brief Check if the level exists
+    *
+    * @return True if the hierarchy contains a patch level with the given 
+    * level number; otherwise false.
+    *
+    * @param[in]  level
+    */
+   bool
+   levelExists(
+      const int level) const;
+
+   /*!
+    * @brief Check if a finer level exists.
+    *
+    * @return True if the hierarchy contains a patch level with level 
+    * number level + 1 (i.e., finer than level with given number);
+    * otherwise, false.
+    *
+    * @param[in]  level
+    */
+   bool
+   finerLevelExists(
+      const int level) const;
+
+   /*!
+    * @brief Get the number of levels in the hierarchy.
+    *
+    * @return The number of levels that currently exist in the hierarchy.
+    */
+   int
+   getNumberOfLevels() const;
+
+   /*!
+    * @brief Get the finest level in the hierarchy.
+    *
+    * @return The level number of the finest resolution patch level currently
+    * existing in the hierarchy.
+    */
+   int
+   getFinestLevelNumber() const;
+
+   /*!
+    * @brief Return a pointer to the specified MappedBoxLevel.
+    *
+    * @return The MappedBoxLevel owned by PatchLevel number @c level.
+    *
+    * @param[in]  level
+    */
+   const tbox::ConstPointer<MappedBoxLevel>&
+   getMappedBoxLevel( const int level ) const;
+
+   /*!
+    * @brief Get the connector between two levels
+    *
+    * Get const access to the Connector between two given MappedBoxLevels
+    * between two given levels in the hierarchy.
+    *
+    * @return Connector between the two given level numbers.
+    *
+    * @param[in]  base_ln The base level indicating one end of the
+    *             connector.
+    * @param[in]  head_ln The head level indicating the other end of
+    *             the connector.
+    */
+   const Connector&
+   getConnector(
+      int base_ln,
+      int head_ln) const;
+
+   /*!
+    * @brief Get the connector from a level to the physical domain.
+    *
+    * @return A const reference to the Connector from a MappedBoxLevel
+    * in the hierarchy to the physical domain MappedBoxLevel.
+    *
+    * @param[in]  base_ln  The level number.
+    */
+   const Connector&
+   getConnectorToDomain(
+      int base_ln) const;
+
+   //@{
+
+   //! @name Connector width coordination between hierarchy builders and users.
+
+   /*!
+    * @brief Register the ConnectorWidthRequestorStrategy with the hierarchy.
+    *
+    * Used to adjust the results of getRequiredConnectorWidth().
+    * This method can be called multiple times to provide as much
+    * connector width information for any object that requires a connector
+    * width constraint.  The largest Connector width over all provided
+    * will be used in the hierarchy.
+    *
+    * @par Important
+    * All registrations must occur before the first call to
+    * getRequiredConnectorWidth().
+    *
+    * @par Errors/Assertions
+    * Calling this method after the first getRequiredConnectorWidth()
+    * results in an unrecoverable assertion.
+    *
+    * @param[in]  cwrs The connector width requester strategy instance.
+    */
+   void registerConnectorWidthRequestor(
+      const ConnectorWidthRequestorStrategy &cwrs );
+
+   /*!
+    * @brief Get the width required of the Connector from the base to
+    * the head levels, as specified by the given level numbers.
+    *
+    * The two level numbers must differ by no more than one.
+    *
+    * @return The widths required from the base to head levels.
+    *
+    * @param[in]  base_ln
+    * @param[in]  head_ln
+    */
+   IntVector
+   getRequiredConnectorWidth(
+      int base_ln,
+      int head_ln) const;
+
+   /*!
+    * @brief Add a ConnectorWidthRequestorStrategy implementation to
+    * the set of implementations that, by default, gets registered to
+    * all PatchHierarchy objects.
+    *
+    * @param[in] cwrs   ConnectorWidthRequestorStrategy to be registered.
+    */
+   static void registerAutoConnectorWidthRequestorStrategy(
+      const ConnectorWidthRequestorStrategy &cwrs );
+
+   //@}
+
+/*
+ * TODO: This DomainMappedBoxLevel, etc. stuff (if it is really needed) should
+ * be moved to the GridGeometry class.  It makes the role of this class
+ * too divergent by having it here.
+ */
+   /*!
+    * @brief Access the domain description as a MappedBoxLevel.
+    *
+    * The domain MappedBoxLevel is maintained in Globalized mode with
+    * processor 0 owning all mapped boxes.
+    *
+    * @return The domain description as a MappedBoxLevel
+    */
+   const hier::MappedBoxLevel& getDomainMappedBoxLevel() const;
+
+   /*!
+    * @brief Access the domain description without periodic images.
+    *
+    * The domain MappedBoxLevel is maintained in Globalized mode with
+    * processor 0 owning all mapped boxes.
+    *
+    * @return The domain description as a search tree.
+    */
+   const hier::MappedBoxTree& getDomainSearchTree() const;
+
+   /*!
+    * @brief Access the domain description with periodic images
+    *
+    * The domain MappedBoxLevel is maintained in Globalized mode with
+    * processor 0 owning all mapped boxes.
+    *
+    * @return The domain description as a search tree with periodic images.
+    */
+   const hier::MappedBoxTree& getPeriodicDomainSearchTree() const;
+
+   //@{
+
+   //! @name Methods related to the hierarchy parameters
+
+   /*!
+    * @brief Set the maximum number of levels allowed on the hierarchy.
+    *
+    * This method can only be called when the hierarchy has no PatchLevels.
+    *
+    * If this increases the max number of levels, the missing smallest
+    * patch size, largest patch size and ratio to coarser level are
+    * taken from the values for the current finest level.  These values can
+    * be changed afterward using set methods below.
+    *
+    * @param[in]  max_levels
+    */
+   void setMaxNumberOfLevels( int max_levels );
+
+   /*!
+    * @brief Get the maximum number of levels allowed on the hierarchy.
+    *
+    * This number is set by setMaxNumberOfLevels() or in the input database.
+    *
+    * @return The maximum number of levels allowed on the hierarchy.
+    */
+   int
+   getMaxNumberOfLevels() const;
+
+   /*!
+    * @brief Set the ratio to coarser level.
+    *
+    * @param[in]  ratio   Refinement ratio in each direction
+    * @param[in]  level
+    */
+   void setRatioToCoarserLevel( const IntVector &ratio,
+                                int level);
+
+   /*!
+    * @brief Get the ratio between specified level and next coarser level
+    *
+    * @return The ratio between specified @c level and @ level-1
+    *
+    * @param[in]  level
+    */
+   const IntVector &getRatioToCoarserLevel( int level ) const;
+
+   /*!
+    * @brief Set the smallest patch size on the given level.
+    *
+    * @param[in]  size   Smallest size in each direction
+    * @param[in]  level
+    */
+   void setSmallestPatchSize( const IntVector &size,
+                              int level );
+
+   /*!
+    * @brief Get the smallest patch size on the given level.
+    *
+    * @return The smallest patch size allowed on the given level.
+    *
+    * @param[in]  level
+    */
+   const IntVector &getSmallestPatchSize( int level ) const;
+
+   /*!
+    * @brief Set the largest patch size on the given level.
+    *
+    * @param[in]  size   Largest size in each direction.
+    * @param[in]  level
+    */
+   void setLargestPatchSize( const IntVector &size,
+                             int level );
+
+   /*!
+    * @brief Get the largest patch size.
+    *
+    * @return The largest patch size allowed on the given level. 
+    *
+    * @param[in]  level
+    */
+   const IntVector &getLargestPatchSize( int level ) const;
+
+   /*!
+    * @brief Get the proper nesting buffer for a specific level.
+    *
+    * If @c level == getMaxNumberOfLevels()-1, the return value will be -1.
+    *
+    * @return The proper nesting buffer
+    *
+    * @param[in]  level
+    */
+   int getProperNestingBuffer( int level ) const;
+
+   /*!
+    * @brief Get flag for allowing patches smaller than ghost width.
+    */
+   bool allowPatchesSmallerThanGhostWidth() const;
+
+   /*!
+    * @brief Get flag for allowing patches smaller than user-provided minimum
+    * size.
+    */
+   bool allowPatchesSmallerThanMinimumSize() const;
+
+   //@}
+
+/*
+ * TODO: Since we have really never used the patch factory and patch
+ * level factory concepts beyond their defaults, should we remove them?
+ */
+   /*!
+    * @brief Set the factory used to create patch objects.
+    *
+    * If a factory is not specified, then the default factory will create
+    * patch objects of type Patch.
+    *
+    * @param[in]  factory
+    */
+   void
+   setPatchFactory(
+      tbox::Pointer<PatchFactory> factory);
+
+   /*!
+    * @brief Set the factory used to create patch level objects.
+    *
+    * If a factory is not specified, then the default factory will
+    * create patch level objects of type PatchLevel.
+    *
+    * @param[in]  factory
+    */
+   void
+   setPatchLevelFactory(
+      tbox::Pointer<PatchLevelFactory> factory);
+
+   /*!
+    * @brief Get the grid geometry.
+    *
+    * @return a pointer to the grid geometry object.
+    */
+   tbox::Pointer<GridGeometry>
+   getGridGeometry() const;
+
+   /*!
+    * @brief Writes the state of the PatchHierarchy object and the PatchLevels
+    * it contains to the database.
+    *
+    * @note
+    * Only those patch data which have been registered for restart with
+    * the VariableDatabase will be written to the database.
+    * This method implements the pure virtual method in tbox::Serializable
+    * class which is used by the tbox::RestartManager for writing the
+    * PatchHierarchy to a restart file.
+    * @par Assertions
+    * When assertion checking is active, the database pointer must be non-null.
+    *
+    * @param[out]  database
+    */
+   void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+   /*!
+    * @brief Writes the state of the PatchHierarchy object and the PatchLevels
+    * it contains to the database.
+    *
+    * Only those patch data indicated in the ComponentSelector are written to
+    * the specified database.
+    *
+    * @par Assertions
+    * When assertion checking is active, the database pointer must be non-null.
+    *
+    * @param[out]  database
+    * @param[in]  patchdata_write_table
+    */
+   void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> database,
+      const ComponentSelector& patchdata_write_table);
+
+   /*!
+    * @brief Read in the entire hierarchy from the restart file.
+    *
+    * The database from which the restart data is read is determined by the
+    * object_name specified in the constructor.
+    *
+    * @note
+    * <li> This method handles the memory allocation for each PatchLevel
+    *      it reads in.
+    * <li> The number of levels read in is the minimum of the d_max_levels
+    *      and the number of levels stored in the database.
+    *
+    * @par Assertions
+    * When assertion checking is active, @c d_max_levels must be
+    * greater than zero.  An unrecoverable assertion will result if the
+    * database cannot be found in the restart file or the data in the
+    * restart file is erroneous.
+    */
+   void
+   getFromRestart();
+
+   /*!
+    * @brief Read in the entire hierarchy from the specified database.
+    *
+    * The component_selector specifies which patch data components
+    * to read in from the database.
+    *
+    * @note
+    * <li>   Warning messages will be printed to the log file if
+    *        any patch data component specified in the
+    *        component_selector cannot be found in the database.
+    * <li>   This method handles the memory allocation for each PatchLevel
+    *        it reads in.
+    *
+    * @par Assertions
+    *
+    * <li>   The database argument must not be null.
+    * <li>   The number of levels (if given) must be greater than zero.
+    *
+    * @param[in]  database
+    * @param[in]  component_selector
+    */
+   void
+   getFromDatabase(
+      tbox::Pointer<tbox::Database> database,
+      const ComponentSelector& component_selector);
+
+   /*!
+    * @brief Get the dimension of this object.
+    *
+    * @return the dimension of this object.
+    */
+   const tbox::Dimension&
+   getDim() const;
+
+   /*!
+    * @brief Print a patch hierarchy to a specified degree of detail.
+    *
+    * The amount of detail is controlled by the value of depth.
+    *
+    * depth <= 0 means only the number of levels will be printed.
+    * depth == 1 means information about each level of the hierarchy will be
+    * printed, as well as the total number of patches and cells in the
+    * hierarchy.  depth >= 2 will print everything that is printed for
+    * depth == 1, plus details about each patch on each level.
+    *
+    * If depth >= 1, global communication steps will be invoked, which can
+    * have negative effects on scaling performance.
+    *
+    * @return 0.  Always.
+    *
+    * @param[in,out]    os The output stream
+    * @param[in]        border string around output text
+    * @param[depth]     depth
+    */
+   int
+   recursivePrint(
+      std::ostream& os,
+      const std::string& border = std::string(),
+      int depth = 0);
+
+private:
+
+   /*!
+    * @brief Read input data from specified database and initialize
+    * class members.
+    *
+    * When assertion checking is active, the database pointer must be
+    * non-null.
+    *
+    * @param[in]  database   Input database
+    */
+   void
+   getFromInput(
+      const tbox::Pointer<tbox::Database>& database);
+
+/*
+ * TODO: This should be moved to the GridGeometry class.  See earlier comments.
+ */
+   /*!
+    * @brief Set the various physical domain description in various
+    * forms.
+    *
+    * The input MappedBoxSet must include the periodic image
+    * MappedBoxes, if the domain is periodic.
+    *
+    * PatchHierarchy saves the global physical domain on every
+    * processor.  Many loops look through the entire global boxes
+    * defining the domain.  For best performance, simplify the
+    * physical domain as much as possible before setting it.
+    *
+    * @param[in]  domain_mapped_boxes
+    */
+   void
+   setupDomainData(
+      const MappedBoxSet& domain_mapped_boxes);
+
+   /*!
+    * @brief Set up things for the entire class.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   initializeCallback();
+
+   /*!
+    * @brief Free static timers.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   finalizeCallback();
+
+   /*!
+    * @brief String identifier of the object
+    */
+   std::string d_object_name;
+
+   /*!
+    * @brief Dimension of the object
+    */ 
+   const tbox::Dimension d_dim;
+
+   /*!
+    * @brief Boolean telling if object is registered for restart
+    */
+   bool d_registered_for_restart;
+
+   /*!
+    * @brief Number of levels currently in the hierarchy
+    */
+   int d_number_levels;
+
+   /*!
+    * @brief Array of pointers to PatchLevels that make up the hierarchy
+    */
+   tbox::Array<tbox::Pointer<PatchLevel> > d_patch_levels;
+
+   /*!
+    * @brief GridGeometry that was used to construct the hierarchy
+    */
+   tbox::Pointer<GridGeometry> d_grid_geometry;
+
+   /*!
+    * @brief PatchDescriptor that is shared by every patch on the hierarchy
+    */
+   tbox::Pointer<PatchDescriptor> d_patch_descriptor;
+
+/*
+ * TODO: Since we have really never used the patch factory and patch
+ * level factory concepts beyond their defaults, should we remove them?
+ */
+   /*!
+    * @brief Factory used to create patches on the hierarchy
+    */
+   tbox::Pointer<PatchFactory> d_patch_factory;
+
+   /*!
+    * @brief Factory used to create levels on the hierarchy
+    */
+   tbox::Pointer<PatchLevelFactory> d_patch_level_factory;
+
+   //@{
+   //! @name Parameters for setting up the hierarchy.
+
+   /*!
+    * @brief Max number of levels that can be in the hierarchy.
+    */
+   int d_max_levels;
+
+   /*!
+    * @brief Ratio to coarser level.  d_ratio_to_coarser[0] is unused.
+    *
+    * The vector will be sized to d_max_levels.  d_ratio_to_coarser[n] is
+    * the refinement ratio betwee level @c n and level @c n-1.
+    */
+   std::vector<hier::IntVector> d_ratio_to_coarser;
+
+   /*
+    * @brief Proper nesting buffer for each level.
+    *
+    * The proper nesting buffer specifies the number of coarse cells
+    * by which the next finer level is nested within the interior of
+    * the domain of the next coarser level.  These buffer values
+    * are used to compute the proper nesting boxes on each level.  They
+    * can be used to guarantee that:
+    *
+    * (1) Adjacent cells on the composite grid differ by no more than
+    *    one refinement level.
+    *
+    * (2) Data on the interior of fine patches can be filled by
+    *    interpolation from the next coarser level if the buffer
+    *    width is at least as large as the maximum stencil width
+    *    of all interpolation operators.
+    *
+    * The proper nesting buffer size for each level may be specified in the
+    * input file.  If not, a nesting buffer of 1 is used.  This value should
+    * be suitable for most problems.  It is not recommended that the buffer
+    * be set to 0 since this may cause features of the solution to move off
+    * of refined mesh regions before subsequent regridding occurs.  If
+    * additional buffering is required (e.g., if the stencil width for some
+    * interpolation operator is greater than one), then it may be necessary
+    * to increase this value.
+    */
+   std::vector<int> d_proper_nesting_buffer;
+ 
+   /*!
+    * @brief Smallest patch sizes for each level.
+    */
+   std::vector<hier::IntVector> d_smallest_patch_size;
+
+   /*!
+    * @brief Largest patch sizes for each level.  A negative value means
+    * unlimited.
+    */
+   std::vector<hier::IntVector> d_largest_patch_size;
+
+   /*!
+    * @brief Whether to normally allow patches smaller than the max
+    * ghost width.
+    */
+   bool d_allow_patches_smaller_than_ghostwidth;
+ 
+   /*!
+    * @brief Whether to allow patches smaller than d_smallest_patch_size
+    * in order to prevent overlaping patches.
+    */
+   bool d_allow_patches_smaller_than_minimum_size_to_prevent_overlaps;
+
+   /*!
+    * @brief Required Connector width for self connectors.
+    *
+    * This is mutable because it may have to be updated by
+    * getRequiredConnectorWidth(), which is a const method.
+    *
+    * See registerConnectorWidthRequestor() and getRequiredConnectorWidth().
+    */
+   mutable std::vector<IntVector> d_self_connector_widths;
+
+   /*!
+    * @brief Required Connector width for fine connectors.
+    *
+    * The width for coarse Connectors are the equivalent width for the
+    * transpose Connector, times refinement ratio between the two
+    * levels.
+    *
+    * This is mutable because it may have to be updated by
+    * getRequiredConnectorWidth(), which is a const method.
+    *
+    * See registerConnectorWidthRequestor() and getRequiredConnectorWidth().
+    */
+   mutable std::vector<IntVector> d_fine_connector_widths;
+
+   /*!
+    * @brief Whether Connector widths have been computed.
+    *
+    * This is mutable because it is computed as required by the const
+    * method getConnectorWidth().
+    */
+   mutable bool d_connector_widths_are_computed;
+
+   /*!
+    * @brief Vector of all ConnectorWidthRequestorStrategy objects registered
+    * with this particular object.
+    *
+    * Note that this contains strategies registered with this object
+    * using registerConnectorWidthRequestor().  It is
+    * different from the strategies in s_class_cwrs.
+    */
+   std::vector<const ConnectorWidthRequestorStrategy*> d_individual_cwrs;
+
+   /*!
+    * @brief All ConnectorWidthRequestorStrategy registered with
+    * PatchHierarchy's auto-registry.
+    *
+    * These are the implementations registered for the entire class,
+    * using registerAutoConnectorWidthRequestorStrategy().
+    */
+   static std::vector<const ConnectorWidthRequestorStrategy*> s_class_cwrs;
+
+   /*!
+    * @brief Shutdown handler for clearing out static registry.
+    */
+   static tbox::StartupShutdownManager::Handler
+   s_initialize_finalize_handler;
+
+   //@}
+
+   //@{
+
+   //! @name Domain-related objects.
+
+/*
+ * TODO: These things (if really needed) should be moved to the GridGeometry 
+ * class.  See earlier comments.
+ */
+   /*!
+    * @brief Physical domain MappedBoxLevel.
+    *
+    * Set in setDomainData().  All mapped_boxes in the domain
+    * MappedBoxLevel are owned by process 0.
+    *
+    * The physical domain MappedBoxLevel is maintained in GLOBALIZED
+    * mode with processor 0 owning all mapped boxes.
+    */
+   MappedBoxLevel d_domain_mapped_box_level;
+
+   /*!
+    * @brief The domain, including periodic images, in MappedBoxTree
+    * form, used for overlap searches.
+    */
+   tbox::Pointer<MappedBoxTree> d_periodic_domain_searchtree;
+
+   /*!
+    * @brief The domain, excluding periodic images, in MappedBoxTree
+    * form, used for overlap searches.
+    */
+   tbox::Pointer<MappedBoxTree> d_domain_searchtree;
+
+   /*!
+    * @brief The domain complement in MappedBoxTree form, used for
+    * overlap searches.
+    */
+   tbox::Pointer<MappedBoxTree> d_complement_searchtree;
+
+   /*
+    * @brief Connector from a PatchLevel to the domain MappedBoxLevel.
+    */
+   std::vector<tbox::Pointer<Connector> > d_connectors_to_domain;
+
+   //@}
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/PatchHierarchy.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchLevel.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchLevel.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1070 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A collection of patches at one level of the AMR hierarchy 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_PatchLevel_C
+#define included_hier_PatchLevel_C
+
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/MappedBoxContainerUtils.h"
+#include "SAMRAI/hier/MappedBox.h"
+#include "SAMRAI/hier/RealMappedBoxConstIterator.h"
+
+#include "SAMRAI/tbox/List.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/TimerManager.h"
+
+#include <cstdio>
+
+#define HIER_PATCH_LEVEL_VERSION (3)
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/PatchLevel.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+static tbox::Pointer<tbox::Timer> t_level_constructor;
+static tbox::Pointer<tbox::Timer> t_constructor_setup;
+static tbox::Pointer<tbox::Timer> t_constructor_phys_domain;
+static tbox::Pointer<tbox::Timer> t_constructor_touch_boundaries;
+static tbox::Pointer<tbox::Timer> t_constructor_set_geometry;
+static tbox::Pointer<tbox::Timer> t_set_patch_touches;
+static tbox::Pointer<tbox::Timer> t_constructor_compute_shifts;
+
+tbox::StartupShutdownManager::Handler
+PatchLevel::s_initialize_finalize_handler(
+   PatchLevel::initializeCallback,
+   0,
+   0,
+   PatchLevel::finalizeCallback,
+   tbox::StartupShutdownManager::priorityTimers);
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default patch level constructor sets default (non-usable) state.      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+PatchLevel::PatchLevel(
+   const tbox::Dimension& dim):
+   d_dim(dim),
+   d_mapped_box_level(NULL),
+   d_has_globalized_data(false),
+   d_boxes(dim),
+   d_ratio_to_level_zero(hier::IntVector::getZero(dim)),
+   d_physical_domain(dim),
+   d_ratio_to_coarser_level(hier::IntVector::getZero(dim))
+{
+   t_level_constructor->start();
+
+   d_local_number_patches = 0;
+
+   d_level_number = -1;
+   d_next_coarser_level_number = -1;
+   d_in_hierarchy = false;
+
+   d_geometry.setNull();
+   d_descriptor.setNull();
+
+   d_factory = new hier::PatchFactory();
+
+   t_level_constructor->stop();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a new patch level using the specified boxes and processor      *
+ * mapping.  Only those patches that are local to the processor are      *
+ * allocated.  Allocate patches using the specified patch factory or     *
+ * the standard patch factory if none is explicitly specified.           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+PatchLevel::PatchLevel(
+   const MappedBoxLevel& mapped_box_level,
+   const tbox::Pointer<GridGeometry> grid_geometry,
+   const tbox::Pointer<PatchDescriptor> descriptor,
+   tbox::Pointer<PatchFactory> factory,
+   bool defer_boundary_box_creation):
+   d_dim(grid_geometry->getDim()),
+   d_mapped_box_level(new MappedBoxLevel(mapped_box_level)),
+   d_has_globalized_data(false),
+   d_boxes(grid_geometry->getDim()),
+   d_ratio_to_level_zero(d_mapped_box_level->getRefinementRatio()),
+   d_physical_domain(grid_geometry->getDim()),
+   d_ratio_to_coarser_level(grid_geometry->getDim(), 0)
+
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(mapped_box_level, *grid_geometry);
+
+   t_level_constructor->start();
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!grid_geometry.isNull());
+   TBOX_ASSERT(!descriptor.isNull());
+   /*
+    * All components of ratio must be nonzero.  Additionally, all components
+    * of ratio not equal to 1 must have the same sign.
+    */
+   TBOX_ASSERT(mapped_box_level.getRefinementRatio() !=
+      hier::IntVector::getZero(getDim()));
+
+   if (getDim().getValue() > 1) {
+      for (int i = 0; i < getDim().getValue(); i++) {
+         TBOX_ASSERT((mapped_box_level.getRefinementRatio() (i)
+                      * mapped_box_level.getRefinementRatio() ((i
+                                                                 + 1)
+                         % getDim().getValue()) > 0)
+            || (mapped_box_level.getRefinementRatio() (i) == 1)
+            || (mapped_box_level.getRefinementRatio() ((i + 1) % getDim().getValue()) ==
+                1));
+      }
+   }
+#endif
+
+   t_constructor_setup->start();
+
+   d_local_number_patches =
+      static_cast<int>(d_mapped_box_level->getLocalNumberOfBoxes());
+   d_descriptor = descriptor;
+
+   d_geometry = grid_geometry;
+
+   d_level_number = -1;
+   d_next_coarser_level_number = -1;
+   d_in_hierarchy = false;
+
+   if (!factory.isNull()) {
+      d_factory = factory;
+   } else {
+      d_factory = new hier::PatchFactory();
+   }
+
+   const MappedBoxSet& mapped_boxes = d_mapped_box_level->getMappedBoxes();
+   for (RealMappedBoxConstIterator ni(mapped_boxes); ni.isValid(); ++ni) {
+      const MappedBox& mapped_box = *ni;
+      const LocalId &ip = mapped_box.getLocalId();
+      tbox::Pointer<Patch>& patch = d_patches[ip];
+      patch = d_factory->allocate(mapped_box, d_descriptor);
+      patch->setPatchLevelNumber(d_level_number);
+      patch->setPatchInHierarchy(d_in_hierarchy);
+   }
+
+   d_boundary_boxes_created = false;
+   t_constructor_setup->stop();
+
+   t_constructor_phys_domain->start();
+   grid_geometry->computePhysicalDomain(d_physical_domain,
+      d_ratio_to_level_zero);
+   t_constructor_phys_domain->stop();
+
+   t_constructor_touch_boundaries->start();
+   std::map<LocalId, PatchGeometry::TwoDimBool> touches_regular_bdry;
+   std::map<LocalId, PatchGeometry::TwoDimBool> touches_periodic_bdry;
+   grid_geometry->findPatchesTouchingBoundaries(
+      touches_regular_bdry,
+      touches_periodic_bdry,
+      *this,
+      grid_geometry->getPeriodicShift(d_ratio_to_level_zero),
+      d_physical_domain);
+   t_constructor_touch_boundaries->stop();
+
+   t_constructor_set_geometry->start();
+   grid_geometry->setGeometryOnPatches(
+      *this,
+      d_ratio_to_level_zero,
+      touches_regular_bdry,
+      touches_periodic_bdry,
+      defer_boundary_box_creation);
+   t_constructor_set_geometry->stop();
+
+   if (!defer_boundary_box_creation) {
+      d_boundary_boxes_created = true;
+   }
+
+   t_level_constructor->stop();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a new patch level from information in the given database.      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+PatchLevel::PatchLevel(
+   tbox::Pointer<tbox::Database> level_database,
+   tbox::Pointer<GridGeometry> grid_geometry,
+   tbox::Pointer<PatchDescriptor> descriptor,
+   tbox::Pointer<PatchFactory> factory,
+   const ComponentSelector& component_selector,
+   bool defer_boundary_box_creation):
+   d_dim(grid_geometry->getDim()),
+   d_has_globalized_data(false),
+   d_boxes(grid_geometry->getDim()),
+   d_ratio_to_level_zero(hier::IntVector(grid_geometry->getDim(),
+                                         tbox::MathUtilities<int>::getMax())),
+   d_physical_domain(grid_geometry->getDim()),
+   d_ratio_to_coarser_level(hier::IntVector(grid_geometry->getDim(),
+                                            tbox::MathUtilities<int>::getMax()))
+{
+   TBOX_ASSERT(!level_database.isNull());
+   TBOX_ASSERT(!grid_geometry.isNull());
+   TBOX_ASSERT(!descriptor.isNull());
+
+   t_level_constructor->start();
+
+   d_geometry = grid_geometry;
+   d_descriptor = descriptor;
+
+   if (!factory.isNull()) {
+      d_factory = factory;
+   } else {
+      d_factory = new PatchFactory();
+   }
+
+   getFromDatabase(level_database, component_selector);
+
+   d_boundary_boxes_created = false;
+
+   t_constructor_touch_boundaries->start();
+   std::map<LocalId, PatchGeometry::TwoDimBool> touches_regular_bdry;
+   std::map<LocalId, PatchGeometry::TwoDimBool> touches_periodic_bdry;
+   grid_geometry->findPatchesTouchingBoundaries(
+      touches_regular_bdry,
+      touches_periodic_bdry,
+      *this,
+      grid_geometry->getPeriodicShift(d_ratio_to_level_zero),
+      d_physical_domain);
+   t_constructor_touch_boundaries->stop();
+
+   t_constructor_set_geometry->start();
+   grid_geometry->setGeometryOnPatches(
+      *this,
+      d_ratio_to_level_zero,
+      touches_regular_bdry,
+      touches_periodic_bdry,
+      defer_boundary_box_creation);
+   t_constructor_set_geometry->stop();
+
+   if (!defer_boundary_box_creation) {
+      d_boundary_boxes_created = true;
+   }
+
+   t_level_constructor->stop();
+}
+
+PatchLevel::~PatchLevel()
+{
+}
+
+/*
+ * ************************************************************************
+ *
+ * Allocate or deallocate data for single components or collections of
+ * component on all patches on a patch level.
+ *
+ * ************************************************************************
+ */
+
+void PatchLevel::allocatePatchData(
+   const int id,
+   const double timestamp)
+{
+   for (PatchLevel::Iterator ip(this); ip; ip++) {
+      ip->allocatePatchData(id, timestamp);
+   }
+}
+
+void PatchLevel::allocatePatchData(
+   const ComponentSelector& components,
+   const double timestamp)
+{
+   for (PatchLevel::Iterator ip(this); ip; ip++) {
+      ip->allocatePatchData(components, timestamp);
+   }
+}
+
+bool PatchLevel::checkAllocated(
+   const int id) const
+{
+   bool allocated = true;
+   for (PatchContainer::const_iterator
+        mi = d_patches.begin(); mi != d_patches.end(); ++mi) {
+      allocated &= (*mi).second->checkAllocated(id);
+   }
+   return allocated;
+}
+
+void PatchLevel::deallocatePatchData(
+   const int id)
+{
+   for (PatchLevel::Iterator ip(this); ip; ip++) {
+      ip->deallocatePatchData(id);
+   }
+}
+
+void PatchLevel::deallocatePatchData(
+   const ComponentSelector& components)
+{
+   for (PatchLevel::Iterator ip(this); ip; ip++) {
+      ip->deallocatePatchData(components);
+   }
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Set the simulation time for all patches in the patch level.            *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void PatchLevel::setTime(
+   const double timestamp,
+   const int id)
+{
+   for (PatchLevel::Iterator ip(this); ip; ip++) {
+      ip->setTime(timestamp, id);
+   }
+}
+
+void PatchLevel::setTime(
+   const double timestamp,
+   const ComponentSelector& components)
+{
+   for (PatchLevel::Iterator ip(this); ip; ip++) {
+      ip->setTime(timestamp, components);
+   }
+}
+
+void PatchLevel::setTime(
+   const double timestamp)
+{
+   for (PatchLevel::Iterator ip(this); ip; ip++) {
+      ip->setTime(timestamp);
+   }
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Set level numbers relating this level to "level", a level in           *
+ * a hierarchy                                                            *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void PatchLevel::setLevelNumber(
+   const int level)
+{
+   d_level_number = level;
+
+   for (PatchLevel::Iterator p(this); p; p++) {
+      p->setPatchLevelNumber(d_level_number);
+   }
+}
+
+/*
+ * ************************************************************************
+ *                                                                       *
+ * Set whether this level resides in a hierarchy.                        *
+ *                                                                       *
+ * ************************************************************************
+ */
+
+void PatchLevel::setLevelInHierarchy(
+   bool in_hierarchy)
+{
+   d_in_hierarchy = in_hierarchy;
+
+   for (PatchLevel::Iterator p(this); p; p++) {
+      p->setPatchInHierarchy(d_in_hierarchy);
+   }
+}
+
+/*
+ * ************************************************************************
+ *                                                                       *
+ * Set data members of this patch level by refining information on       *
+ * the argument level by the given ratio.                                *
+ *                                                                       *
+ * ************************************************************************
+ */
+
+void PatchLevel::setRefinedPatchLevel(
+   const tbox::Pointer<hier::PatchLevel> coarse_level,
+   const hier::IntVector& refine_ratio,
+   const tbox::Pointer<hier::GridGeometry> fine_grid_geometry,
+   bool defer_boundary_box_creation)
+{
+   TBOX_ASSERT(!coarse_level.isNull());
+   TBOX_ASSERT(refine_ratio > hier::IntVector::getZero(getDim()));
+#ifdef DEBUG_CHECK_DIM_ASSERTIONS
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*this, *coarse_level, refine_ratio);
+   if (!fine_grid_geometry.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *fine_grid_geometry);
+   }
+#endif
+
+   /*
+    * The basic state of the new patch level is initialized from the state of
+    * the given existing patch level.
+    */
+
+   // d_global_number_patches = coarse_level->d_global_number_patches;
+   d_descriptor = coarse_level->d_descriptor;
+   d_factory = coarse_level->d_factory;
+   // d_mapping.setProcessorMapping( (coarse_level->d_mapping).getProcessorMapping() );
+
+   /*
+    * Compute the ratio to coarsest level (reference level in hierarchy --
+    * usually level  zero) and set grid geometry for this (fine) level.  If
+    * pointer to given fine grid geometry is null, then it is assumed that
+    * this level is to use the same grid geometry as the given coarse level
+    * and the ratio to level zero is set relative to the give coarse level.
+    * Otherwise, use given grid geometry and copy ratio to level zero from
+    * given coarse level.
+    */
+
+   if (fine_grid_geometry.isNull()) {
+
+      d_geometry = coarse_level->d_geometry;
+
+      const hier::IntVector& coarse_ratio = coarse_level->getRatioToLevelZero();
+      for (int i = 0; i < getDim().getValue(); i++) {
+         int coarse_rat = coarse_ratio(i);
+         int refine_rat = refine_ratio(i);
+         if (coarse_rat < 0) {
+            if (tbox::MathUtilities<int>::Abs(coarse_rat) >= refine_rat) {
+               d_ratio_to_level_zero(i) =
+                  -(tbox::MathUtilities<int>::Abs(coarse_rat / refine_rat));
+            } else {
+               d_ratio_to_level_zero(i) =
+                  tbox::MathUtilities<int>::Abs(refine_rat / coarse_rat);
+            }
+         } else {
+            d_ratio_to_level_zero(i) = coarse_rat * refine_rat;
+         }
+
+      }
+
+   } else {
+
+      d_geometry = fine_grid_geometry;
+
+      d_ratio_to_level_zero = coarse_level->d_ratio_to_level_zero;
+   }
+
+   /*
+    * Set global box array and index space for level based on refining
+    * coarse level information.
+    */
+
+   d_boxes = coarse_level->d_boxes;
+   d_boxes.refine(refine_ratio);
+
+   {
+      MappedBoxSet mapped_boxes;
+      hier::MappedBoxContainerUtils::refineMappedBoxSet(
+         mapped_boxes,
+         coarse_level->d_mapped_box_level->getMappedBoxes(),
+         refine_ratio);
+      d_mapped_box_level = new MappedBoxLevel(
+            mapped_boxes,
+            d_ratio_to_level_zero,
+            coarse_level->d_mapped_box_level->getMPI());
+   }
+   d_local_number_patches = coarse_level->getLocalNumberOfPatches();
+
+   d_physical_domain = coarse_level->d_physical_domain;
+   d_physical_domain.refine(refine_ratio);
+
+   /*
+    * Allocate arrays of patches and patch information.  Then, allocate and
+    * initialize patch objects.  Finally, set patch geometry and remaining
+    * domain information.
+    */
+
+   // d_patch_touches_regular_boundary.resizeArray(d_global_number_patches);
+   // d_patch_touches_periodic_boundary.resizeArray(d_global_number_patches);
+   // d_shifts.resizeArray(d_global_number_patches);
+
+   const MappedBoxSet& mapped_boxes = d_mapped_box_level->getMappedBoxes();
+   for (RealMappedBoxConstIterator ni(mapped_boxes); ni.isValid(); ++ni) {
+      const MappedBox& mapped_box = *ni;
+      const LocalId &local_id = mapped_box.getLocalId();
+      d_patches[local_id] = d_factory->allocate(mapped_box, d_descriptor);
+      d_patches[local_id]->setPatchLevelNumber(d_level_number);
+      d_patches[local_id]->setPatchInHierarchy(d_in_hierarchy);
+   }
+
+   std::map<LocalId, PatchGeometry::TwoDimBool> touches_regular_bdry;
+   std::map<LocalId, PatchGeometry::TwoDimBool> touches_periodic_bdry;
+
+   for (PatchLevel::Iterator ip(coarse_level); ip; ip++) {
+      tbox::Pointer<PatchGeometry> coarse_pgeom =
+         (*ip)->getPatchGeometry();
+
+      /* If map does not contain values create them */
+      std::map<LocalId,
+               PatchGeometry::TwoDimBool>::iterator iter_touches_regular_bdry(
+         touches_regular_bdry.find(ip->getLocalId()));
+      if (iter_touches_regular_bdry == touches_regular_bdry.end()) {
+         iter_touches_regular_bdry = touches_regular_bdry.insert(
+               iter_touches_regular_bdry,
+               std::pair<LocalId, PatchGeometry::TwoDimBool>(ip->getLocalId(),
+                  PatchGeometry::TwoDimBool(getDim())));
+      }
+
+      std::map<LocalId,
+               PatchGeometry::TwoDimBool>::iterator iter_touches_periodic_bdry(
+         touches_periodic_bdry.find(ip->getLocalId()));
+      if (iter_touches_periodic_bdry == touches_periodic_bdry.end()) {
+         iter_touches_periodic_bdry = touches_periodic_bdry.insert(
+               iter_touches_periodic_bdry,
+               std::pair<LocalId, PatchGeometry::TwoDimBool>(ip->getLocalId(),
+                  PatchGeometry::TwoDimBool(getDim())));
+      }
+
+      PatchGeometry::TwoDimBool&
+      touches_regular_bdry_ip((*iter_touches_regular_bdry).second);
+      PatchGeometry::TwoDimBool&
+      touches_periodic_bdry_ip((*iter_touches_periodic_bdry).second);
+
+      for (int axis = 0; axis < getDim().getValue(); axis++) {
+         for (int side = 0; side < 2; side++) {
+
+            touches_regular_bdry_ip(axis, side) =
+               coarse_pgeom->getTouchesRegularBoundary(axis, side);
+
+            touches_periodic_bdry_ip(axis, side) =
+               coarse_pgeom->getTouchesPeriodicBoundary(axis, side);
+         }
+      }
+   }
+
+   d_geometry->setGeometryOnPatches(
+      *this,
+      d_ratio_to_level_zero,
+      touches_regular_bdry,
+      touches_periodic_bdry,
+      defer_boundary_box_creation);
+
+   if (!defer_boundary_box_creation) {
+      d_boundary_boxes_created = true;
+   }
+
+}
+
+/*
+ * ************************************************************************
+ *                                                                       *
+ * Set data members of this patch level by coarsening information on     *
+ * the argument level by the given ratio.                                *
+ *                                                                       *
+ * ************************************************************************
+ */
+
+void PatchLevel::setCoarsenedPatchLevel(
+   const tbox::Pointer<hier::PatchLevel> fine_level,
+   const hier::IntVector& coarsen_ratio,
+   const tbox::Pointer<hier::GridGeometry> coarse_grid_geom,
+   bool defer_boundary_box_creation)
+{
+   TBOX_ASSERT(!fine_level.isNull());
+   TBOX_ASSERT(coarsen_ratio > hier::IntVector::getZero(getDim()));
+
+#ifdef DEBUG_CHECK_DIM_ASSERTIONS
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*this, *fine_level, coarsen_ratio);
+   if (!coarse_grid_geom.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *coarse_grid_geom);
+   }
+#endif
+
+   /*
+    * The basic state of the new patch level is initialized from the state of
+    * the given existing patch level.
+    */
+
+   // d_global_number_patches = fine_level->d_global_number_patches;
+   d_descriptor = fine_level->d_descriptor;
+   d_factory = fine_level->d_factory;
+   // d_mapping.setProcessorMapping( (fine_level->d_mapping).getProcessorMapping() );
+
+   /*
+    * Compute the ratio to coarsest level (reference level in hierarchy --
+    * usually level zero) and set grid geometry for this (coarse) level.  If
+    * pointer to a given coarse grid geometry is null, then it is assumed
+    * that this level is to use the same grid geometry as the given fine
+    * level and the ratio to level zero is set relative to the given fine
+    * level.  Otherwise, use given grid geometry and copy ratio to level zero
+    * from given fine level.
+    */
+
+   if (coarse_grid_geom.isNull()) {
+
+      d_geometry = fine_level->d_geometry;
+
+      const hier::IntVector& fine_ratio =
+         fine_level->d_ratio_to_level_zero;
+
+      for (int i = 0; i < getDim().getValue(); i++) {
+         int fine_rat = fine_ratio(i);
+         int coarsen_rat = coarsen_ratio(i);
+         if (fine_rat > 0) {
+            if (fine_rat >= coarsen_rat) {
+               d_ratio_to_level_zero(i) = fine_rat / coarsen_rat;
+            } else {
+               d_ratio_to_level_zero(i) =
+                  -(tbox::MathUtilities<int>::Abs(coarsen_rat / fine_rat));
+            }
+         } else {
+            d_ratio_to_level_zero(i) =
+               -(tbox::MathUtilities<int>::Abs(fine_rat * coarsen_rat));
+         }
+      }
+
+   } else {
+
+      d_geometry = coarse_grid_geom;
+
+      d_ratio_to_level_zero = fine_level->d_ratio_to_level_zero;
+   }
+
+   /*
+    * Set global box array and index space for level based on coarsening
+    * of fine level information.
+    */
+
+   d_boxes = fine_level->d_boxes;
+   d_boxes.coarsen(coarsen_ratio);
+
+   /*
+    * Set coarse mapped_box_level to be the coarsened version of fine mapped_box_level.
+    *
+    * NOTE: Some parts of SAMRAI (CoarsenSchedule in particular)
+    * assumes that the mapped_box identities are the same between the
+    * fine and coarsened levels.
+    */
+   const MappedBoxLevel& fine_mapped_box_level =
+      *fine_level->d_mapped_box_level;
+   MappedBoxSet coarsened_mapped_boxes;
+   hier::MappedBoxContainerUtils::coarsenMappedBoxSet(
+      coarsened_mapped_boxes,
+      fine_level->d_mapped_box_level->getMappedBoxes(),
+      coarsen_ratio);
+   d_mapped_box_level = new MappedBoxLevel(
+         coarsened_mapped_boxes,
+         d_ratio_to_level_zero,
+         fine_mapped_box_level.getMPI());
+   d_local_number_patches = fine_level->getNumberOfPatches();
+
+   d_physical_domain = fine_level->d_physical_domain;
+   d_physical_domain.coarsen(coarsen_ratio);
+
+   /*
+    * Allocate arrays of patches and patch information.  Then, allocate and
+    * initialize patch objects.  Finally, set patch geometry and remaining
+    * domain information.
+    */
+
+   // d_patch_touches_regular_boundary.resizeArray(d_global_number_patches);
+   // d_patch_touches_periodic_boundary.resizeArray(d_global_number_patches);
+   // d_shifts.resizeArray(d_global_number_patches);
+
+   const MappedBoxSet& mapped_boxes = d_mapped_box_level->getMappedBoxes();
+   for (RealMappedBoxConstIterator ni(mapped_boxes); ni.isValid(); ++ni) {
+      const MappedBox& mapped_box = *ni;
+      const LocalId index = mapped_box.getLocalId();
+      d_patches[index] = d_factory->allocate(mapped_box, d_descriptor);
+      d_patches[index]->setPatchLevelNumber(d_level_number);
+      d_patches[index]->setPatchInHierarchy(d_in_hierarchy);
+   }
+
+   d_boundary_boxes_created = false;
+
+   std::map<LocalId, PatchGeometry::TwoDimBool> touches_regular_bdry;
+   std::map<LocalId, PatchGeometry::TwoDimBool> touches_periodic_bdry;
+
+   for (PatchLevel::Iterator ip(fine_level); ip; ip++) {
+      tbox::Pointer<PatchGeometry> fine_pgeom =
+         (*ip)->getPatchGeometry();
+
+      /* If map does not contain values create them */
+      std::map<LocalId,
+               PatchGeometry::TwoDimBool>::iterator iter_touches_regular_bdry(
+         touches_regular_bdry.find(ip->getLocalId()));
+      if (iter_touches_regular_bdry == touches_regular_bdry.end()) {
+         iter_touches_regular_bdry = touches_regular_bdry.insert(
+               iter_touches_regular_bdry,
+               std::pair<LocalId, PatchGeometry::TwoDimBool>(ip->getLocalId(),
+                  PatchGeometry::TwoDimBool(getDim())));
+      }
+
+      std::map<LocalId,
+               PatchGeometry::TwoDimBool>::iterator iter_touches_periodic_bdry(
+         touches_periodic_bdry.find(ip->getLocalId()));
+      if (iter_touches_periodic_bdry == touches_periodic_bdry.end()) {
+         iter_touches_periodic_bdry = touches_periodic_bdry.insert(
+               iter_touches_periodic_bdry,
+               std::pair<LocalId, PatchGeometry::TwoDimBool>(ip->getLocalId(),
+                  PatchGeometry::TwoDimBool(getDim())));
+      }
+
+      PatchGeometry::TwoDimBool&
+      touches_regular_bdry_ip((*iter_touches_regular_bdry).second);
+      PatchGeometry::TwoDimBool&
+      touches_periodic_bdry_ip((*iter_touches_periodic_bdry).second);
+
+      for (int axis = 0; axis < getDim().getValue(); axis++) {
+         for (int side = 0; side < 2; side++) {
+            touches_regular_bdry_ip(axis, side) =
+               fine_pgeom->getTouchesRegularBoundary(axis, side);
+            touches_periodic_bdry_ip(axis, side) =
+               fine_pgeom->getTouchesPeriodicBoundary(axis, side);
+         }
+      }
+   }
+
+   d_geometry->setGeometryOnPatches(
+      *this,
+      d_ratio_to_level_zero,
+      touches_regular_bdry,
+      touches_periodic_bdry,
+      defer_boundary_box_creation);
+
+   if (!defer_boundary_box_creation) {
+      d_boundary_boxes_created = true;
+   }
+
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Call the geometry routine to create and set boundary boxes, if they    *
+ * have not already been created.                                         *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void PatchLevel::setBoundaryBoxes()
+{
+   if (!d_boundary_boxes_created) {
+      d_geometry->setBoundaryBoxes(*this);
+      d_boundary_boxes_created = true;
+   }
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ *  Check that class version and restart file number are the same.  If    *
+ *  so, read in data from database and build patch level from data.       *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void PatchLevel::getFromDatabase(
+   tbox::Pointer<tbox::Database> database,
+   const ComponentSelector& component_selector)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   int ver = database->getInteger("HIER_PATCH_LEVEL_VERSION");
+   if (ver != HIER_PATCH_LEVEL_VERSION) {
+      TBOX_ERROR("PatchLevel::getFromDatabase() error...\n"
+         << "   Restart file version different than class version.");
+   }
+
+   if (database->keyExists("d_boxes")) {
+      d_boxes = database->getDatabaseBoxArray("d_boxes");
+   }
+
+   int* temp_ratio = &d_ratio_to_level_zero[0];
+   database->getIntegerArray("d_ratio_to_level_zero", temp_ratio, getDim().getValue());
+
+   d_physical_domain = database->getDatabaseBoxArray("d_physical_domain");
+
+   d_level_number = database->getInteger("d_level_number");
+   d_next_coarser_level_number =
+      database->getInteger("d_next_coarser_level_number");
+   d_in_hierarchy = database->getBool("d_in_hierarchy");
+
+   temp_ratio = &d_ratio_to_coarser_level[0];
+   database->getIntegerArray("d_ratio_to_coarser_level", temp_ratio, getDim().getValue());
+
+   /*
+    * Put local patches in database.
+    */
+
+   tbox::Pointer<tbox::Database> mbl_database = database->getDatabase(
+         "mapped_box_level");
+   tbox::Pointer<MappedBoxLevel> mapped_box_level(new MappedBoxLevel(getDim()));
+   mapped_box_level->getFromDatabase(*mbl_database);
+   d_mapped_box_level = mapped_box_level;
+
+   d_patches.clear();
+
+   const MappedBoxSet& mapped_boxes = d_mapped_box_level->getMappedBoxes();
+   tbox::Pointer<tbox::Database> patch_database;
+   for (RealMappedBoxConstIterator ni(mapped_boxes); ni.isValid(); ++ni) {
+      const MappedBox& mapped_box = *ni;
+      const LocalId &local_id = mapped_box.getLocalId();
+
+      std::string patch_name = "level_" + tbox::Utilities::levelToString(
+            d_level_number)
+         + "-patch_" + tbox::Utilities::patchToString(local_id.getValue());
+      if (!(database->isDatabase(patch_name))) {
+         TBOX_ERROR("PatchLevel::getFromDatabase() error...\n"
+            << "   patch name " << patch_name
+            << " not found in database" << std::endl);
+      }
+      patch_database = database->getDatabase(patch_name);
+
+      tbox::Pointer<Patch>& patch = d_patches[local_id];
+      patch = d_factory->allocate(mapped_box, d_descriptor);
+      patch->setPatchLevelNumber(d_level_number);
+      patch->setPatchInHierarchy(d_in_hierarchy);
+      patch->getFromDatabase(patch_database, component_selector);
+   }
+
+}
+
+/*
+ * ************************************************************************
+ *                           *
+ *  Write out class version number and patch_level data members to the    *
+ *  database, then has each patch on the local processor write itself    *
+ *  to the database.   The following are written out to the database:    *
+ *  d_physical_domain, d_ratio_to_level_zero, d_boxes, d_mapping,        *
+ *  d_global_number_patches, d_level_number, d_next_coarser_level_number,       *
+ *  d_in_hierarchy, d_patches[].                                         *
+ *  The database key for all data members except for d_patches is        *
+ *  the same as the variable name.  For the patches, the database keys   *
+ *  are "level_Xpatch_Y" where X is the level number and Y is the index  *
+ *  position of the patch in the patch in d_patches.                     *
+ *                           *
+ * ************************************************************************
+ */
+void PatchLevel::putToDatabase(
+   tbox::Pointer<tbox::Database> database,
+   const ComponentSelector& patchdata_write_table)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   database->putInteger("HIER_PATCH_LEVEL_VERSION", HIER_PATCH_LEVEL_VERSION);
+
+   database->putBool("d_is_patch_level", true);
+
+   tbox::Array<tbox::DatabaseBox> temp_boxes = d_boxes;
+   if (temp_boxes.getSize() > 0) {
+      database->putDatabaseBoxArray("d_boxes", temp_boxes);
+   }
+
+   // database->putInteger("d_global_number_patches",d_global_number_patches);
+
+   // database->putIntegerArray("d_mapping", d_mapping.getProcessorMapping());
+
+   int* temp_ratio_to_level_zero = &d_ratio_to_level_zero[0];
+   database->putIntegerArray("d_ratio_to_level_zero",
+      temp_ratio_to_level_zero, getDim().getValue());
+
+   tbox::Array<tbox::DatabaseBox> temp_domain = d_physical_domain;
+   database->putDatabaseBoxArray("d_physical_domain", temp_domain);
+
+   database->putInteger("d_level_number", d_level_number);
+   database->putInteger("d_next_coarser_level_number",
+      d_next_coarser_level_number);
+   database->putBool("d_in_hierarchy", d_in_hierarchy);
+
+   int* temp_ratio_to_coarser_level = &d_ratio_to_coarser_level[0];
+   database->putIntegerArray("d_ratio_to_coarser_level",
+      temp_ratio_to_coarser_level, getDim().getValue());
+
+   /*
+    * Put local patches in database.
+    */
+
+   tbox::Pointer<tbox::Database> mbl_database = database->putDatabase(
+         "mapped_box_level");
+   d_mapped_box_level->putToDatabase(*mbl_database);
+
+   tbox::Pointer<tbox::Database> patch_database;
+   for (PatchLevel::Iterator ip(this); ip; ip++) {
+
+      std::string patch_name = "level_" + tbox::Utilities::levelToString(
+            d_level_number)
+         + "-patch_" + tbox::Utilities::patchToString(ip->getLocalId().getValue());
+
+      patch_database = database->putDatabase(patch_name);
+
+      ip->putToDatabase(patch_database, patchdata_write_table);
+   }
+
+}
+
+int PatchLevel::recursivePrint(
+   std::ostream& os,
+   const std::string& border,
+   int depth)
+{
+   int npatch = getGlobalNumberOfPatches();
+
+// Disable Intel warnings on conversions
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:810)
+#pragma warning (disable:857)
+#endif
+
+   os << border << "Local/Global number of patches and cells = "
+      << getLocalNumberOfPatches() << "/" << getGlobalNumberOfPatches() << "  "
+      << getLocalNumberOfCells() << "/" << getGlobalNumberOfCells() << "\n";
+   if (depth > 0) {
+      for (Iterator pi(this); pi; pi++) {
+         const tbox::Pointer<Patch> patch = *pi;
+         os << border << "Patch " << patch->getLocalId() << '/' << npatch << "\n";
+         patch->recursivePrint(os, border + "\t", depth - 1);
+
+      }
+   }
+   return 0;
+}
+
+/*
+ *************************************************************************
+ * Private utility function to gather and store globalized data, if needed.
+ *************************************************************************
+ */
+void PatchLevel::initializeGlobalizedMappedBoxLevel() const
+{
+   if ( !d_has_globalized_data ) {
+
+      const MappedBoxLevel &globalized_mapped_box_level(
+         d_mapped_box_level->getGlobalizedVersion());
+
+      const int nboxes = globalized_mapped_box_level.getGlobalNumberOfBoxes();
+      d_boxes.resizeBoxArray(nboxes);
+      d_mapping.setMappingSize(nboxes);
+
+      /*
+       * Backward compatibility with things requiring global sequential
+       * indices (such as the VisIt writer) is provided by the implicit
+       * ordering of the mapped_boxes in the nested loops below.
+       *
+       * Due to this necessary renumbering, the patch number obtained
+       * by the PatchLevel::Iterator does not correspond to the
+       * global sequential index.
+       */
+      int count = 0;
+      const MappedBoxSet& mapped_boxes =
+         globalized_mapped_box_level.getGlobalMappedBoxes();
+      for (hier::RealMappedBoxConstIterator ni(mapped_boxes);
+           ni.isValid();
+           ++ni) {
+         d_mapping.setProcessorAssignment(count, ni->getOwnerRank());
+         d_boxes[count] = ni->getBox();
+         ++count;
+      }
+
+      d_has_globalized_data = true;
+   }
+}
+
+/*
+ *************************************************************************
+ * Return a const reference to the shift array for the patches on the level;
+ * the shift array contains a list of shift vectors for each patch
+ * when the domain has some periodic direction.
+ *************************************************************************
+ */
+
+const tbox::Array<tbox::List<IntVector> >& PatchLevel::getShiftsForLevel()
+const
+{
+   TBOX_ERROR("Incomplete code.");
+   static tbox::Array<tbox::List<IntVector> > dummy(0);
+   return dummy;
+}
+
+/*
+ * ************************************************************************
+ * ************************************************************************
+ */
+
+void PatchLevel::initializeCallback()
+{
+   t_level_constructor = tbox::TimerManager::getManager()->
+      getTimer("hier::PatchLevel::level_constructor");
+   t_constructor_setup = tbox::TimerManager::getManager()->
+      getTimer("hier::PatchLevel::constructor_setup");
+   t_constructor_phys_domain = tbox::TimerManager::getManager()->
+      getTimer("hier::PatchLevel::constructor_phys_domain");
+   t_constructor_touch_boundaries = tbox::TimerManager::getManager()->
+      getTimer("hier::PatchLevel::constructor_touch_boundaries");
+   t_constructor_set_geometry = tbox::TimerManager::getManager()->
+      getTimer("hier::PatchLevel::set_geometry");
+   t_constructor_compute_shifts = tbox::TimerManager::getManager()->
+      getTimer("hier::PatchLevel::constructor_compute_shifts");
+}
+
+/*
+ ***************************************************************************
+ *                                                                         *
+ * Release static timers.  To be called by shutdown registry to make sure  *
+ * memory for timers does not leak.                                        *
+ *                                                                         *
+ ***************************************************************************
+ */
+
+void PatchLevel::finalizeCallback()
+{
+   t_level_constructor.setNull();
+   t_constructor_setup.setNull();
+   t_constructor_phys_domain.setNull();
+   t_constructor_touch_boundaries.setNull();
+   t_constructor_set_geometry.setNull();
+   t_set_patch_touches.setNull();
+   t_constructor_compute_shifts.setNull();
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchLevel.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchLevel.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,430 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A collection of patches at one level of the AMR hierarchy 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/hier/PeriodicShiftCatalog.h"
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+int PatchLevel::getLevelNumber() const
+{
+   return d_level_number;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool PatchLevel::inHierarchy() const
+{
+   return d_in_hierarchy;
+}
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Pointer<Patch>& PatchLevel::getPatch(
+   const GlobalId& gid) const
+{
+   PatchContainer::const_iterator it = d_patches.find(gid.getLocalId());
+   TBOX_ASSERT(it != d_patches.end());
+   return it->second;
+}
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<Patch> PatchLevel::getPatch(
+   const LocalId &local_id) const
+{
+   const PatchContainer::const_iterator mi = d_patches.find(local_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (mi == d_patches.end()) {
+      TBOX_ERROR("PatchLevel::getPatch(" << local_id
+                                         << "): patch does not exist locally.");
+   }
+#endif
+   return (*mi).second;
+}
+
+SAMRAI_INLINE_KEYWORD
+int PatchLevel::getLocalNumberOfPatches() const
+{
+   return static_cast<int>(d_mapped_box_level->getLocalNumberOfBoxes());
+}
+
+SAMRAI_INLINE_KEYWORD
+int PatchLevel::getGlobalNumberOfPatches() const
+{
+   return d_mapped_box_level->getGlobalNumberOfBoxes();
+}
+
+SAMRAI_INLINE_KEYWORD
+int PatchLevel::getNumberOfPatches() const {
+   return getGlobalNumberOfPatches();
+}
+
+SAMRAI_INLINE_KEYWORD
+int PatchLevel::getLocalNumberOfCells() const
+{
+   return static_cast<int>(d_mapped_box_level->getLocalNumberOfCells());
+}
+
+SAMRAI_INLINE_KEYWORD
+int PatchLevel::getGlobalNumberOfCells() const
+{
+   return d_mapped_box_level->getGlobalNumberOfCells();
+}
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<PatchDescriptor> PatchLevel::getPatchDescriptor() const
+{
+   return d_descriptor;
+}
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<PatchFactory> PatchLevel::getPatchFactory() const
+{
+   return d_factory;
+}
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<GridGeometry> PatchLevel::getGridGeometry() const
+{
+   return d_geometry;
+}
+
+SAMRAI_INLINE_KEYWORD
+const BoxArray& PatchLevel::getPhysicalDomain() const
+{
+   return d_physical_domain;
+}
+
+SAMRAI_INLINE_KEYWORD
+const IntVector& PatchLevel::getRatioToLevelZero() const
+{
+   return d_ratio_to_level_zero;
+}
+
+SAMRAI_INLINE_KEYWORD
+const IntVector& PatchLevel::getRatioToCoarserLevel() const
+{
+   return d_ratio_to_coarser_level;
+}
+
+SAMRAI_INLINE_KEYWORD
+void PatchLevel::setRatioToCoarserLevel(
+   const IntVector& ratio)
+{
+   d_ratio_to_coarser_level = ratio;
+}
+
+SAMRAI_INLINE_KEYWORD
+const BoxArray& PatchLevel::getBoxes() const
+{
+   if ( ! d_has_globalized_data ) {
+      initializeGlobalizedMappedBoxLevel();
+   }
+   return d_boxes;
+}
+
+SAMRAI_INLINE_KEYWORD
+const tbox::ConstPointer<MappedBoxLevel>& PatchLevel::getMappedBoxLevel() const
+{
+   return d_mapped_box_level;
+}
+
+SAMRAI_INLINE_KEYWORD
+const MappedBoxLevel&
+PatchLevel::getGlobalizedMappedBoxLevel() const
+{
+   if ( ! d_has_globalized_data ) {
+      initializeGlobalizedMappedBoxLevel();
+   }
+   return d_mapped_box_level->getGlobalizedVersion();
+}
+
+#if 0
+// Removed due to incompatibility with DLBG.
+SAMRAI_INLINE_KEYWORD
+const tbox::Array<tbox::List<IntVector> >& PatchLevel::getShiftsForLevel()
+const
+{
+   return d_shifts;
+}
+#endif
+
+SAMRAI_INLINE_KEYWORD
+const ProcessorMapping& PatchLevel::getProcessorMapping() const
+{
+   if ( ! d_has_globalized_data ) {
+      initializeGlobalizedMappedBoxLevel();
+   }
+   return d_mapping;
+}
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Dimension& PatchLevel::getDim() const
+{
+   return d_dim;
+}
+
+SAMRAI_INLINE_KEYWORD
+int PatchLevel::getMappingForPatch(
+   const LocalId &local_id) const
+{
+   // Note: p is required to be a local index.
+   /*
+    * This must be for backward compatability, because if p is a local
+    * index, the mapping is always to d_mapped_box_level->getRank().
+    * Here is the old code:
+    *
+    * return d_mapped_box_level->getMappedBoxStrict(p)->getOwnerRank();
+    */
+   NULL_USE(local_id);
+   return d_mapped_box_level->getRank();
+}
+
+SAMRAI_INLINE_KEYWORD
+const Box& PatchLevel::getBoxForPatch(
+   const LocalId &local_id) const
+{
+   // Note: p is required to be a local index.
+   const hier::GlobalId gid(local_id, d_mapped_box_level->getRank());
+   return d_mapped_box_level->getMappedBoxStrict(gid)->getBox();
+}
+
+SAMRAI_INLINE_KEYWORD
+bool PatchLevel::patchTouchesRegularBoundary(
+   const LocalId &local_id) const
+{
+   bool rval = getPatch(local_id)->getPatchGeometry()->getTouchesRegularBoundary();
+   return rval;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool PatchLevel::patchTouchesPeriodicBoundary(
+   const LocalId &local_id) const
+{
+   bool rval = getPatch(local_id)->getPatchGeometry()->getTouchesPeriodicBoundary();
+   return rval;
+}
+
+// Iterator implementation
+
+/*
+ *************************************************************************
+ * Default constructor.
+ *************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+PatchLevel::Iterator::Iterator():
+   d_iterator(),
+   d_patches(NULL /* Unused since not backward compatibility not needed */)
+{
+}
+
+/*
+ *************************************************************************
+ * Copy constructor.
+ *************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+PatchLevel::Iterator::Iterator(
+   const PatchLevel::Iterator& r):
+   d_iterator(r.d_iterator),
+   d_patches(NULL /* Unused since not backward compatibility not needed */)
+{
+}
+
+/*
+ *************************************************************************
+ * Construct from raw iterator.
+ *************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+PatchLevel::Iterator::Iterator(
+   const PatchLevel::PatchContainer::const_iterator& r):
+   d_iterator(r),
+   d_patches(NULL /* Unused since not backward compatibility not needed */)
+{
+}
+
+/*
+ *************************************************************************
+ * Assignment.
+ *************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+PatchLevel::Iterator& PatchLevel::Iterator::operator = (
+   const PatchLevel::Iterator& rhs)
+{
+   d_iterator = rhs.d_iterator;
+   d_patches = rhs.d_patches;
+   return *this;
+}
+
+/*
+ *************************************************************************
+ * Standard iterator's dereference operator.
+ *************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+const tbox::Pointer<Patch>& PatchLevel::Iterator::operator * () const
+{
+   return d_iterator->second;
+}
+
+/*
+ *************************************************************************
+ * Alternative iterator's dereference operator.
+ *************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+const tbox::Pointer<Patch>& PatchLevel::Iterator::operator () () const
+{
+   return d_iterator->second;
+}
+
+/*
+ *************************************************************************
+ * Delegate Pointer operations to the Patch pointer.
+ *************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+const tbox::Pointer<Patch>& PatchLevel::Iterator::operator -> () const
+{
+   return d_iterator->second;
+}
+
+/*
+ *************************************************************************
+ * Equality comparison.
+ *************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+bool PatchLevel::Iterator::operator == (
+   const Iterator& rhs) const
+{
+   return d_iterator == rhs.d_iterator;
+}
+
+/*
+ *************************************************************************
+ * Inequality comparison.
+ *************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+bool PatchLevel::Iterator::operator != (
+   const Iterator& rhs) const
+{
+   return d_iterator != rhs.d_iterator;
+}
+
+/*
+ *************************************************************************
+ * Standard iterator's pre-increment.
+ *************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+const PatchLevel::Iterator& PatchLevel::Iterator::operator ++ ()
+{
+   ++d_iterator;
+   return *this;
+}
+
+/*
+ *************************************************************************
+ * Standard iterator's post-increment.
+ *************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+PatchLevel::Iterator PatchLevel::Iterator::operator ++ (
+   int)
+{
+   Iterator tmp_iterator = d_iterator;
+   ++d_iterator;
+   return tmp_iterator;
+}
+
+// Support for backward compatible interface by new PatchLevel::Iterator.
+SAMRAI_INLINE_KEYWORD
+PatchLevel::Iterator::Iterator(
+   const PatchLevel& patch_level):
+   d_iterator(patch_level.d_patches.begin()),
+   d_patches(&patch_level.d_patches)
+{
+}
+
+// Support for backward compatible interface by new PatchLevel::Iterator.
+SAMRAI_INLINE_KEYWORD
+PatchLevel::Iterator::Iterator(
+   const tbox::Pointer<PatchLevel>& patch_level):
+   d_iterator(patch_level->d_patches.begin()),
+   d_patches(&patch_level->d_patches)
+{
+}
+
+// Support for backward compatible interface by new PatchLevel::Iterator.
+SAMRAI_INLINE_KEYWORD
+PatchLevel::Iterator::Iterator(
+   const PatchLevel* patch_level):
+   d_iterator(patch_level->d_patches.begin()),
+   d_patches(&patch_level->d_patches)
+{
+}
+
+// Support for backward compatible interface by new PatchLevel::Iterator.
+SAMRAI_INLINE_KEYWORD
+void PatchLevel::Iterator::initialize(
+   const tbox::Pointer<PatchLevel>& patch_level)
+{
+   d_iterator = patch_level->d_patches.begin();
+   d_patches = &patch_level->d_patches;
+}
+
+// Support for backward compatible interface by new PatchLevel::Iterator.
+SAMRAI_INLINE_KEYWORD
+void PatchLevel::Iterator::initialize(
+   const PatchLevel& patch_level)
+{
+   d_iterator = patch_level.d_patches.begin();
+   d_patches = &patch_level.d_patches;
+}
+
+// Support for backward compatible interface by new PatchLevel::Iterator.
+SAMRAI_INLINE_KEYWORD
+void PatchLevel::Iterator::initialize(
+   const PatchLevel* patch_level)
+{
+   d_iterator = patch_level->d_patches.begin();
+   d_patches = &patch_level->d_patches;
+}
+
+// Support for backward compatible interface by new PatchLevel::Iterator.
+SAMRAI_INLINE_KEYWORD
+PatchLevel::Iterator::operator bool ()
+{
+   return d_iterator != d_patches->end();
+}
+
+}
+}
+
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchLevel.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchLevel.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,980 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A collection of patches at one level of the AMR hierarchy 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_PatchLevel
+#define included_hier_PatchLevel
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/BasePatchLevel.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/ComponentSelector.h"
+#include "SAMRAI/hier/GridGeometry.h"
+#include "SAMRAI/hier/MappedBoxLevel.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchFactory.h"
+#include "SAMRAI/hier/ProcessorMapping.h"
+#include "SAMRAI/hier/RealMappedBoxConstIterator.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/ConstPointer.h"
+#include "SAMRAI/tbox/Dimension.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Timer.h"
+
+#include <map>
+
+namespace SAMRAI {
+namespace hier {
+
+class PatchLevelIterator;
+
+/*!
+ * @brief Container class for patches defined at a single level of the
+ * AMR hierarchy.
+ *
+ * The patches in a patch level are distributed across the processors
+ * of a parallel machine, so not all patches reside on the local processor.
+ * (However, each patch is assigned to one and only one processor.)
+ *
+ * To iterate over the local patches in a patch level, use the patch
+ * level iterator class (PatchLevel::Iterator).
+ *
+ * @see hier::BasePatchLevel
+ * @see hier::Patch
+ * @see hier::PatchDescriptor
+ * @see hier::PatchFactory
+ * @see hier::PatchLevelFactory
+ * @see hier::PatchLevel::Iterator
+ */
+
+class PatchLevel:public hier::BasePatchLevel
+{
+public:
+   /*!
+    * @brief Default constructor.  PatchLevel must be initialized before it can
+    * be used.
+    */
+   explicit PatchLevel(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Construct a new patch level given a MappedBoxLevel.
+    *
+    * The MappedBoxLevel provides refinement ratio information, establishing
+    * the ratio between the index space of the new level and some reference
+    * level (typically level zero) in some patch hierarchy.
+    *
+    * The ratio information provided by the MappedBoxLevel is also used
+    * by the grid geometry instance to initialize geometry information
+    * of both the level and the patches on that level.
+    *
+    * @par Error conditions
+    * When assertion checking is active, an unrecoverable assertion results
+    * if either the grid geometry pointer or patch descriptor pointer is
+    * null, or if the number of boxes in the array does not match the
+    * mapping array.
+    *
+    * @param[in]  mapped_box_level
+    * @param[in]  grid_geometry
+    * @param[in]  descriptor The PatchDescriptor used to allocate patch data
+    *             on the local processor
+    * @param[in]  factory Optional PatchFactory.  If none specified, a default
+    *             (standard) patch factory will be used.
+    * @param[in]  defer_boundary_box_creation Flag to indicate suppressing
+    *             construction of the boundary boxes.
+    *
+    */
+   explicit PatchLevel(
+      const MappedBoxLevel& mapped_box_level,
+      const tbox::Pointer<GridGeometry> grid_geometry,
+      const tbox::Pointer<PatchDescriptor> descriptor,
+      tbox::Pointer<PatchFactory> factory = tbox::Pointer<PatchFactory>(NULL),
+      bool defer_boundary_box_creation = false);
+
+   /*!
+    * @brief Construct a new patch level from the specified PatchLevel database.
+    *
+    * The box, mapping, and ratio to level zero data which are normally
+    * passed in during the construction of a new patch level are
+    * retrieved from the specified database.  The component_selector
+    * argument specifies which patch data components should be allocated
+    * and read in from the level_database.  By default, all bits in the
+    * component selector are set to false so that no patch data are
+    * allocated.
+    *
+    * @par Error conditions
+    * When assertion checking is turned on, the level_database,
+    * grid_geometry, and descriptor are checked to make sure that
+    * they are not null.  If null, an unrecoverable assertion will result.
+    *
+    * @param[in]  level_database
+    * @param[in]  grid_geometry
+    * @param[in]  descriptor The PatchDescriptor used to allocate patch
+    *             data.
+    * @param[in]  factory
+    * @param[in]  component_selector Optional ComponentSelector. @b Default:
+    *             a ComponentSelector with all elements set to false
+    * @param[in]  defer_boundary_box_creation Flag to indicate suppressing
+    *             construction of the boundary boxes.  @b Default: false
+    */
+   explicit PatchLevel(
+      tbox::Pointer<tbox::Database> level_database,
+      tbox::Pointer<GridGeometry> grid_geometry,
+      tbox::Pointer<PatchDescriptor> descriptor,
+      tbox::Pointer<PatchFactory> factory,
+      const ComponentSelector& component_selector =
+         *(new ComponentSelector(false)),
+      bool defer_boundary_box_creation = false);
+
+   /*!
+    * @brief The virtual destructor for patch level deallocates all patches.
+    */
+   virtual ~PatchLevel();
+
+   /*!
+    * @brief Get the level number
+    *
+    * @return the number of this level in a hierarchy, or the number of
+    * a hierarchy level matching the index space of this level. If this
+    * level does not align with the index space of a level in the hierarchy,
+    * then this value is -1.  When the level is in a hierarchy, the return
+    * value of the number of the level in the hierarchy.
+    *
+    * @see inHierarchy()
+    */
+   int
+   getLevelNumber() const;
+
+   /*!
+    * @brief Set the number of this level to the level in the hierarchy
+    * aligning with the index space of this level.
+    *
+    * The default value is -1 meaning the level index space does not align
+    * with that of any hierarchy level.
+    *
+    * @param[in]  level
+    */
+   void
+   setLevelNumber(
+      const int level);
+
+   /*!
+    * @brief Determine if this level resides in a hierarchy.
+    *
+    * @return true if this level resides in a hierarchy, otherwise false.
+    */
+   bool
+   inHierarchy() const;
+
+   /*!
+    * @brief Setting to indicate whether this level resides in a hierarchy.
+    *
+    * @param[in]  in_hierarchy Flag to indicate whether this level resides
+    *             in a hierarchy.  @b Default: false
+    */
+   void
+   setLevelInHierarchy(
+      bool in_hierarchy);
+
+   /*!
+    * @brief Get the number of patches.
+    *
+    * This is equivalent to calling PatchLevel::getGlobalNumberOfPatches().
+    */
+   int
+   getNumberOfPatches() const;
+
+   /*!
+    * @brief Get the local number of patches
+    */
+   int
+   getLocalNumberOfPatches() const;
+
+   /*!
+    * @brief Get the global number of patches.
+    */
+   int
+   getGlobalNumberOfPatches() const;
+
+   /*!
+    * @brief Get the local number of Cells.
+    */
+   int
+   getLocalNumberOfCells() const;
+
+   /*!
+    * @brief Get the global number of cells
+    */
+   int
+   getGlobalNumberOfCells() const;
+
+   /*!
+    * @brief Get a Patch based on its GlobalId.
+    *
+    * @param[in]  gid
+    *
+    * @return A Pointer to the Patch indicated by the GlobalId.
+    */
+   const tbox::Pointer<Patch>&
+   getPatch(
+      const GlobalId& gid) const;
+
+   /*!
+    * @brief Get a Patch based on its LocalId.
+    *
+    * @param[in]  gid
+    *
+    * @return A Pointer to the Patch indicated by the LocalId.
+    */
+   tbox::Pointer<Patch>
+   getPatch(
+      const LocalId &lid) const;
+
+   /*!
+    * @brief Get the PatchDescriptor
+    *
+    * @return pointer to the patch descriptor for the hierarchy.
+    */
+   tbox::Pointer<PatchDescriptor>
+   getPatchDescriptor() const;
+
+   /*!
+    * @brief Get the PatchFactory
+    *
+    * @return the factory object used to created patches in the level.
+    */
+   tbox::Pointer<PatchFactory>
+   getPatchFactory() const;
+
+   /*!
+    * @brief Get the GridGeometry
+    *
+    * @return A Pointer to the grid geometry description.
+    */
+   tbox::Pointer<GridGeometry>
+   getGridGeometry() const;
+
+   /*!
+    * @brief Update this patch level through refining.
+    *
+    * The data members of this patch level are updated by refining the
+    * information on a given coarse level using the given ratio between
+    * the two levels.  The fine level will cover the same physical space as
+    * the coarse level and will have the same number of patches with the
+    * same mapping of those patches to processors.  However, the index
+    * space of the level will be refined by the specified ratio.
+    *
+    * @par Assumptions
+    * If the fine grid geometry is null (default case), then it is assumed
+    * that this level is to use the same grid geometry as the given coarse
+    * level and the ratio to level zero is set relative to the given coarse
+    * level.  Otherwise, we use the given grid geometry (assumed to be a proper
+    * refinement of the grid geometry used on the given coarse level) and copy
+    * ratio to level zero from given coarse level.  In other words, the function
+    * can be used to produce two different results.
+    *
+    * <ol>
+    *   <li> When passed a null grid geometry pointer, the refined patch level
+    *        can be used for data exchange operations with the AMR hierarchy
+    *        in which the coarse level resides -- both levels are defined with
+    *        respect to the index space of the grid geometry object which they
+    *        share.  Thus, the refined patch level can be used in data
+    *        exchanges with the AMR hierarchy of the coarse level
+    *        automatically.
+    *   <li> Second, when passed a non-null fine grid geometry pointer, the
+    *        level is defined relative to that geometry and the refined patch
+    *        level cannot be used in data exchanges with the AMR hierarchy
+    *        of the coarse level automatically in general.  This mode is
+    *        used to construct a refined copy of an entire patch hierarchy,
+    *        typically.
+    * </ol>
+    *
+    * @param[in]  coarse_level
+    * @param[in]  refine_ratio
+    * @param[in]  fine_grid_geometry @b Default: Pointer to a null grid
+    *             geometry
+    * @param[in]  defer_boundary_box_creation @b Default: false
+    */
+   void
+   setRefinedPatchLevel(
+      const tbox::Pointer<hier::PatchLevel> coarse_level,
+      const hier::IntVector& refine_ratio,
+      const tbox::Pointer<hier::GridGeometry> fine_grid_geometry =
+         tbox::Pointer<hier::GridGeometry>(NULL),
+      bool defer_boundary_box_creation = false);
+
+   /*!
+    * @brief Update this patch through coarsening.
+    *
+    * The data members of this patch level are updated by coarsening the
+    * information on a given fine level using the given ratio between
+    * the two levels.  The coarse level will cover the same physical space as
+    * the fine level and will have the patches with the same
+    * GlobalIndices.  However, the index space of the level will be coarsened
+    * by the specified ratio.
+    * @par Assumptions
+    * If the coarse grid geometry is null (default case), then it is assumed
+    * that this level is to use the same grid geometry as the given fine
+    * level and the ratio to level zero is set relative to the given fine
+    * level.  Otherwise, we use the given grid geometry (assumed to be a proper
+    * coarsening of the grid geometry used on the given fine level) and copy
+    * ratio to level zero from given fine level.  In other words, the function
+    * can be used to produce two different results.
+    *
+    * <ol>
+    *   <li> When passed a null grid geometry pointer, the coarsened
+    *        patch level can be used for data exchange operations with the
+    *        AMR hierarchy in which the fine level resides -- both levels
+    *        are defined with respect to the index space of the grid geometry
+    *        object which they share.  Thus, the coarsened patch level can be
+    *        used in data exchanges with the AMR hierarchy of the fine level
+    *        automatically.
+    *   <li> When passed a non-null coarse grid geometry pointer, the level is
+    *        defined relative to that geometry and the coarsened patch level
+    *        cannot be used in data exchanges with the AMR hierarchy of the
+    *        fine level automatically in general.  This mode is used to
+    *        construct a coarsened copy of an entire patch hierarchy,
+    *        typically.
+    * </ol>
+    *
+    * @param[in]  fine_level
+    * @param[in]  coarsen_ratio
+    * @param[in]  coarse_grid_geometry @b Default: Pointer to a null grid
+    *             geometry
+    * @param[in]  defer_boundary_box_creation @b Default: false
+    */
+   void
+   setCoarsenedPatchLevel(
+      const tbox::Pointer<hier::PatchLevel> fine_level,
+      const hier::IntVector& coarsen_ratio,
+      const tbox::Pointer<hier::GridGeometry> coarse_grid_geom =
+         tbox::Pointer<hier::GridGeometry>(NULL),
+      bool defer_boundary_box_creation = false);
+
+   /*!
+    * @brief Create and store the boundary boxes for this level.
+    *
+    * If boundary boxes have already been constructed, this function
+    * does nothing.
+    * @note
+    * If the level is constructed with boundary box creation deferred,
+    * this method must be called before any attempt at filling data at
+    * physical boundaries.  This function is called from
+    * xfer::RefineSchedule prior to any physical boundary operations.
+    */
+   void
+   setBoundaryBoxes();
+
+   /*!
+    * @brief Get the physical domain.
+    *
+    * @return A const reference to the box array that defines
+    * the extent of the index space on the level.
+    */
+   const BoxArray&
+   getPhysicalDomain() const;
+
+   /*!
+    * @brief Get the box defining the patches on the level.
+    *
+    * The internal state of PatchLevel (where boxes are concern) is
+    * dependent on the MappedBoxLevel associated with it, and computed
+    * only if getBoxes() is called.  The first call to getBoxes() must be
+    * done by all processors as it requires communication.
+
+    * @return a const reference to the box array that defines
+    * the patches on the level.
+    */
+   const BoxArray&
+   getBoxes() const;
+
+   /*!
+    * @brief Get the MappedBoxLevel associated with the PatchLevel.
+    *
+    * @return a reference to a ConstPointer to the MappedBoxLevel
+    * associated with the PatchLevel.
+    */
+   const tbox::ConstPointer<MappedBoxLevel>&
+   getMappedBoxLevel() const;
+
+   /*!
+    * @brief Get the globalized version of the MappedBoxLevel associated
+    * with the PatchLevel.
+    * @note
+    * The first time this method is used, a global communication is
+    * done.  Thus all processors must use this method the first time
+    * any processor uses it.
+    *
+    * @return The globalized version of the MappedBoxLevel associated
+    * with the PatchLevel.
+    */
+   const MappedBoxLevel&
+   getGlobalizedMappedBoxLevel() const;
+
+   /*!
+    * @brief Get the shifts for the patches on the level.
+    *
+    * The shift array contains a list of shift vectors for each patch
+    * when the domain has some periodic direction.
+    *
+    * @return a const reference to the shift array for the patches on the
+    * level.
+    */
+   const tbox::Array<tbox::List<IntVector> >&
+   getShiftsForLevel() const;
+
+   /*!
+    * @brief Get the mapping of patches to processors.
+    *
+    * @return A const reference to the mapping of patches to processors.
+    */
+   const ProcessorMapping&
+   getProcessorMapping() const;
+
+   /*!
+    * @brief Get the ratio between the index space of this PatchLevel and
+    * the reference level in the AMR hierarchy.
+    *
+    * @return A const reference to the vector ratio between the index
+    * space of this patch level and that of a reference level in AMR
+    * hierarchy (that is, level zero).
+    */
+   const IntVector&
+   getRatioToLevelZero() const;
+
+   /*!
+    * @brief Get the ratio between this level and the next coarser
+    * level in the patch hierarchy.
+    *
+    * This vector is set with the setRatioToCoarserLevel() function.
+    * If the level is not in a hierarchy, a default ratio of zero is returned.
+    *
+    * @return the vector ratio between this level and the next coarser
+    * level in the patch hierarchy.
+    */
+   const IntVector&
+   getRatioToCoarserLevel() const;
+
+   /*!
+    * @brief Set the ratio between this level and the next coarser
+    * level in the patch hierarchy.
+    *
+    * This is required only when level resides in a hierarchy.
+    *
+    * @param[in] ratio
+    */
+   void
+   setRatioToCoarserLevel(
+      const IntVector& ratio);
+
+   /*!
+    * @brief Get the processor mapping for the patch.
+    *
+    * @return the processor that owns the specified patch.  The patches
+    * are numbered starting at zero.
+    *
+    * @param[in] local_id Patch's LocalId
+    */
+   int
+   getMappingForPatch(
+      const LocalId &local_id) const;
+
+   /*!
+    * @brief Get the box for the specified patch
+    *
+    * @return The box for the specified patch.  The patches are numbered
+    * starting at zero.
+    *
+    * @param[in] local_id Patch's LocalId
+    */
+   const Box&
+   getBoxForPatch(
+      const LocalId &local_id) const;
+
+   /*!
+    * @brief Determine if the patch is adjacent to a non-periodic
+    * physical domain boundary.
+    *
+    * @param[in] local_id Patch's LocalId
+    *
+    * @return True if patch with given number is adjacent to a non-periodic
+    * physical domain boundary.  Otherwise, false.
+    */
+   bool
+   patchTouchesRegularBoundary(
+      const LocalId &local_id) const;
+
+   /*!
+    * @brief Determine if the patch is adjacent to a periodic physical
+    * domain boundary.
+    *
+    * @return True if patch with given number is adjacent to a periodic
+    * physical domain boundary.  Otherwise, false.
+    *
+    * @param[in] local_id Patch's LocalId
+    */
+   bool
+   patchTouchesPeriodicBoundary(
+      const LocalId &local_id) const;
+
+   /*!
+    * @brief Allocate the specified component on all patches.
+    *
+    * @param[in]  id
+    * @param[in]  timestamp @b Default: zero (0.0)
+    */
+   void
+   allocatePatchData(
+      const int id,
+      const double timestamp = 0.0);
+
+   /*!
+    * @brief Allocate the specified components on all patches.
+    *
+    * @param[in]  components The componentSelector indicating
+    *             which elements to allocate
+    * @param[in]  timestamp @b Default: zero (0.0)
+    */
+   void
+   allocatePatchData(
+      const ComponentSelector& components,
+      const double timestamp = 0.0);
+
+   /*!
+    * @brief Determine if the patch data has been allocated.
+    *
+    * @return True if (1) there are no patches in this patch level or  if
+    *         (2) all of the patches have allocated the patch data component,
+    *         otherwise false.
+    *
+    * @param[in] id The patch identifier.
+    */
+   bool
+   checkAllocated(
+      const int id) const;
+
+   /*!
+    * @brief  Deallocate the specified component on all patches.
+    *
+    * This component will need to be reallocated before its next use.
+    *
+    * @param[in]  id The patch identifier
+    */
+   void
+   deallocatePatchData(
+      const int id);
+
+   /*!
+    * @brief Deallocate the specified components on all patches.
+    *
+    * Components will need to be reallocated before their next use.
+    *
+    * @param[in]  components The ComponentSelector indicating which
+    *             components to deallocate.
+    */
+   void
+   deallocatePatchData(
+      const ComponentSelector& components);
+
+   /*!
+    * @brief Get the dimension of this object.
+    *
+    * @return the dimension of this object.
+    */
+   const tbox::Dimension&
+   getDim() const;
+
+   /*!
+    * @brief Set the simulation time for the specified patch component.
+    *
+    * @param[in]  timestamp
+    * @param[in]  id The patch identifier
+    */
+   void
+   setTime(
+      const double timestamp,
+      const int id);
+
+   /*!
+    * @brief Set the simulation time for the specified patch components.
+    *
+    * @param[in] timestamp
+    * @param[in] components The ComponentSelector indicating on which
+    *            components to set the simulation time.
+    */
+   void
+   setTime(
+      const double timestamp,
+      const ComponentSelector& components);
+
+   /*!
+    * @brief Set the simulation time for all allocated patch components.
+    *
+    * @param[in]  timestamp
+    */
+   void
+   setTime(
+      const double timestamp);
+
+   /*!
+    * @brief Use the PatchLevel database to set the state of the PatchLevel
+    * and to create all patches on the local processor.
+    *
+    * @par Assertions
+    * Assertions will check that database is a non-null Pointer,
+    * that the data being retrieved from the database are of
+    * the type expected.  Also checked is the number of patches is positive,
+    * and the number of patches and size of processor mapping array are the
+    * same, and that the number of patches and the number of boxes on the
+    * level are equal.
+    *
+    * @param[in,out] database
+    * @param[in]     component_selector
+    */
+   void
+   getFromDatabase(
+      tbox::Pointer<tbox::Database> database,
+      const ComponentSelector& component_selector);
+
+   /*!
+    * @brief Write data to the database.
+    *
+    * Writes the data from the PatchLevel to the database.
+    * Also tells all local patches to write out their state to
+    * the database.
+    *
+    * @par Assertions
+    * Check that database is a non-null Pointer.
+    *
+    * @param[in,out]  database
+    * @param[in]      patchdata_write_table The ComponentSelector specifying
+    *                 which patch data to write to the database
+    */
+   void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> database,
+      const ComponentSelector& patchdata_write_table);
+
+   /*!
+    * @brief Print a patch level to varying details.
+    *
+    * If depth>0, print function will be called for each patch in the level.
+    *
+    * @param[in]  os The std::ostream in which to print to
+    * @param[in]  border @b Default: empty string
+    * @param[in]  depth @b Default: zero (0).
+    *
+    * @return 0.  Always.
+    */
+   int
+   recursivePrint(
+      std::ostream& os,
+      const std::string& border = std::string(),
+      int depth = 0);
+
+private:
+   /*
+    * @brief Container of distributed patches on level.
+    *
+    * Only local patches are stored, so we do not need to index by
+    * GlobalId--just LocalId.
+    */
+   typedef std::map<LocalId, tbox::Pointer<Patch> >
+   PatchContainer;
+
+public:
+   /*!
+    * @brief Iterator for looping through local patches.
+    */
+   class Iterator
+   {
+   public:
+      /*!
+       * @brief Default constructor.
+       */
+      Iterator();
+
+      /*!
+       * @brief Copy constructor.
+       *
+       * @param[in]  other
+       */
+      Iterator(
+         const Iterator& other);
+
+      /*!
+       * @brief Construct from raw iterator.
+       *
+       * @param[in]  raw_iter
+       */
+      Iterator(
+         const PatchContainer::const_iterator& raw_iter);
+
+      /*!
+       * @brief Construct from a PatchLevel.
+       *
+       * @param[in]  patch_level
+       */
+      Iterator(
+         const PatchLevel& patch_level);
+
+      /*!
+       * @brief Construct from a PatchLevel.
+       *
+       * @param[in]  patch_level
+       */
+      Iterator(
+         const PatchLevel* patch_level);
+
+      /*!
+       * @brief Construct from a PatchLevel.
+       *
+       * @param[in]  patch_level
+       */
+      Iterator(
+         const tbox::Pointer<PatchLevel>& patch_level);
+
+      /*!
+       * @brief Initialize from a PatchLevel Pointer.
+       *
+       * @param[in]  patch_level
+       */
+      void
+      initialize(
+         const tbox::Pointer<PatchLevel>& patch_level);
+
+      /*!
+       * @brief Initialize from a PatchLevel reference.
+       *
+       * @param[in]  patch_level
+       */
+      void
+      initialize(
+         const PatchLevel& patch_level);
+
+      /*!
+       * @brief Initialize from a PatchLevel pointer.
+       *
+       * @param[in]  patch_level
+       */
+      void
+      initialize(
+         const PatchLevel* patch_level);
+
+      /*!
+       * @brief Assignment operator
+       */
+      Iterator&
+      operator = (
+         const Iterator& rhs);
+
+      /*!
+       * @brief Dereference operator.
+       */
+      const tbox::Pointer<Patch>&
+      operator * () const;
+
+      /*!
+       * @brief Alternative dereference operator.
+       */
+      const tbox::Pointer<Patch>&
+      operator () () const;
+
+      /*!
+       * @brief Delegation operations to the Patch pointer.
+       */
+      const tbox::Pointer<Patch>&
+      operator -> () const;
+
+      /*!
+       * @brief Equality comparison.
+       */
+      bool
+      operator == (
+         const Iterator& rhs) const;
+
+      /*!
+       * @brief Inequality operator.
+       */
+      bool
+      operator != (
+         const Iterator& rhs) const;
+
+      /*!
+       * @brief Pre-increment.
+       */
+      const Iterator&
+      operator ++ ();
+
+      /*!
+       * @brief Post-increment.
+       */
+      Iterator
+      operator ++ (
+         int);
+
+      /*!
+       * @brief Get validity.
+       */
+      operator bool ();
+
+   private:
+      /*!
+       * @brief The real iterator (this class is basically a wrapper).
+       */
+      PatchContainer::const_iterator d_iterator;
+
+      /*!
+       * @brief For supporting backward-compatible interface.
+       */
+      const PatchContainer* d_patches;
+
+   };
+
+private:
+
+   /**
+    * @brief Static initialization to be done at startup.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   initializeCallback();
+
+   /**
+    * @brief Static cleanup to be done at shutdown.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   finalizeCallback();
+
+   void
+   initializeGlobalizedMappedBoxLevel() const;
+
+   /*!
+    * @brief Dimension of the object
+    */
+   const tbox::Dimension d_dim;
+
+   /*!
+    * Primary metadata describing the PatchLevel.
+    */
+   tbox::ConstPointer<MappedBoxLevel> d_mapped_box_level;
+
+   /*
+    * Whether we have a globalized version of d_mapped_box_level.
+    */
+   mutable bool d_has_globalized_data;
+   /*
+    * Boxes for all level patches.
+    *
+    * d_boxes is slave to d_mapped_box_level and computed only if getBoxes() is called.
+    * This means that the first getBoxes() has to be called by all processors,
+    * because it requires communication.
+    */
+   mutable BoxArray d_boxes;
+
+   /*
+    * Patch mapping to processors.
+    */
+   mutable ProcessorMapping d_mapping;
+
+   /*
+    * ratio to reference level
+    */
+   IntVector d_ratio_to_level_zero;
+
+   /*
+    * Grid geometry description.
+    */
+   tbox::Pointer<GridGeometry> d_geometry;
+   /*
+    * PatchDescriptor - patch data info shared by all patches in the hierarchy
+    */
+   tbox::Pointer<PatchDescriptor> d_descriptor;
+   /*
+    * Factory for creating patches.
+    */
+   tbox::Pointer<PatchFactory> d_factory;
+
+   /*
+    * Local number of patches on the level.
+    */
+   int d_local_number_patches;
+
+   /*
+    * Extent of the index space.
+    */
+   BoxArray d_physical_domain;
+
+   /*
+    * The ratio to coarser level applies only when the level resides
+    * in a hierarchy.  The level number is that of the hierarchy level
+    * that aligns with the index space of the level; if level aligns with
+    * no such level then the value is -1 (default value).  The next coarser
+    * level number is the next coarser level in the hierarchy for the
+    * purposes of filling data from coarser levels.   It is -1 by default
+    * but is usually a valid level number more often than level number.
+    * The boolean is true when the level is in a hierarchy, false otherwise.
+    */
+   IntVector d_ratio_to_coarser_level;
+
+   /*
+    * Level number in the hierarchy.
+    */
+   int d_level_number;
+
+   /*
+    * Aligning with the index space of the next coarser level number.
+    */
+   int d_next_coarser_level_number;
+
+   /*
+    * Flag indicating the level is in a hierarchy.
+    */
+   bool d_in_hierarchy;
+
+   /*
+    * Container for patches.
+    */
+   PatchContainer d_patches;
+
+   /*
+    * Flag to indicate boundary boxes are created.
+    */
+   bool d_boundary_boxes_created;
+
+   /*!
+    * @brief Has shutdown handler been initialized.
+    *
+    * This should be checked and set in every ctor.
+    */
+   static bool s_initialized;
+
+   /*!
+    * @brief Initialize static state
+    */
+   static bool
+   initialize(
+      void);
+
+   static tbox::StartupShutdownManager::Handler
+   s_initialize_finalize_handler;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/PatchLevel.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchLevelFactory.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchLevelFactory.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,62 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract factory class for creating patch level objects 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_PatchLevelFactory_C
+#define included_hier_PatchLevelFactory_C
+
+#include "SAMRAI/hier/PatchLevelFactory.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/PatchLevelFactory.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+PatchLevelFactory::~PatchLevelFactory()
+{
+}
+
+tbox::Pointer<PatchLevel> PatchLevelFactory::allocate(
+   const MappedBoxLevel& mapped_box_level,
+   const tbox::Pointer<GridGeometry> grid_geometry,
+   const tbox::Pointer<PatchDescriptor> descriptor,
+   tbox::Pointer<PatchFactory> factory) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(mapped_box_level, *grid_geometry);
+   PatchLevel* pl =
+      new PatchLevel(mapped_box_level,
+         grid_geometry,
+         descriptor,
+         factory);
+   return tbox::Pointer<PatchLevel>(pl);
+}
+
+tbox::Pointer<PatchLevel> PatchLevelFactory::allocate(
+   tbox::Pointer<tbox::Database> database,
+   const tbox::Pointer<GridGeometry> grid_geometry,
+   const tbox::Pointer<PatchDescriptor> descriptor,
+   const ComponentSelector& component_selector,
+   tbox::Pointer<PatchFactory> factory,
+   const bool defer_boundary_box_creation) const
+{
+   PatchLevel* pl =
+      new PatchLevel(database,
+         grid_geometry,
+         descriptor,
+         factory,
+         component_selector,
+         defer_boundary_box_creation);
+   return tbox::Pointer<PatchLevel>(pl);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchLevelFactory.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchLevelFactory.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,20 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract factory class for creating patch level objects 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+PatchLevelFactory::PatchLevelFactory()
+{
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PatchLevelFactory.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PatchLevelFactory.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,116 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract factory class for creating patch level objects 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_PatchLevelFactory
+#define included_hier_PatchLevelFactory
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/GridGeometry.h"
+#include "SAMRAI/hier/MappedBoxLevel.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/PatchFactory.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief Factory used to create new patch levels.
+ *
+ * New types of patch level objects can be introduced into SAMRAI by deriving
+ * from PatchLevelFactory and re-defining allocate.
+ *
+ * @see hier::PatchLevel
+ */
+class PatchLevelFactory:public tbox::DescribedClass
+{
+public:
+   /*!
+    * @brief Construct a patch level factory object.
+    */
+   PatchLevelFactory();
+
+   /*!
+    * @brief Virtual destructor for patch level factory objects.
+    */
+   virtual ~PatchLevelFactory();
+
+   /*!
+    * @brief Allocate a patch level with the specified boxes and processor mappings.
+    *
+    * Redefine this function to change the method for creating patch levels.
+    *
+    * @return A Pointer to the newly created PatchLevel.
+    *
+    * @param[in]  mapped_box_level
+    * @param[in]  grid_geometry
+    * @param[in]  descriptor
+    * @param[in]  factory @b Default: a Pointer to the standard PatchFactory
+    */
+   virtual tbox::Pointer<PatchLevel>
+   allocate(
+      const MappedBoxLevel& mapped_box_level,
+      const tbox::Pointer<GridGeometry> grid_geometry,
+      const tbox::Pointer<PatchDescriptor> descriptor,
+      tbox::Pointer<PatchFactory> factory =
+         tbox::Pointer<PatchFactory>(NULL)) const;
+
+   /*!
+    * @brief Allocate a patch level using the data from the database to
+    * initialize it.
+    *
+    * The component_selector argument is used to specify which patch data
+    * components to allocate and read in from the database.
+    * @note
+    * If desired, pass a ComponentSelector with all bits set to false to
+    * indicate that no patch data components are read/allocated.
+    *
+    * Redefine this function to change the method for creating
+    * patch levels from a database.
+    *
+    * @return A Pointer to the newly created PatchLevel.
+    *
+    * @param[in]  database
+    * @param[in]  grid_geometry
+    * @param[in]  descriptor
+    * @param[in]  component_selector
+    * @param[in]  factory @b Default: a Pointer to the standard PatchFactory
+    * @param[in]  defer_boundary_box_creation @b Default: false
+    */
+   virtual tbox::Pointer<PatchLevel>
+   allocate(
+      tbox::Pointer<tbox::Database> database,
+      const tbox::Pointer<GridGeometry> grid_geometry,
+      const tbox::Pointer<PatchDescriptor> descriptor,
+      const ComponentSelector& component_selector,
+      tbox::Pointer<PatchFactory> factory = tbox::Pointer<PatchFactory>(NULL),
+      const bool defer_boundary_box_creation = false) const;
+
+private:
+   /*
+    * Copy constructor and assignment are not implemented.
+    */
+   PatchLevelFactory(
+      const PatchLevelFactory&);
+   void
+   operator = (
+      const PatchLevelFactory&);
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/PatchLevelFactory.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PeriodicShiftCatalog.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PeriodicShiftCatalog.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,232 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Set of edges incident from a mapped_box_level of a distributed box graph. 
+ *
+ ************************************************************************/
+#ifndef included_hier_PeriodicShiftCatalog_C
+#define included_hier_PeriodicShiftCatalog_C
+
+#include "SAMRAI/hier/PeriodicShiftCatalog.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <iomanip>
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/PeriodicShiftCatalog.I"
+#endif
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+PeriodicShiftCatalog * PeriodicShiftCatalog::s_periodic_shift_catalog_instance[
+   tbox::Dimension::MAXIMUM_DIMENSION_VALUE] = { 0 };
+
+tbox::StartupShutdownManager::Handler
+PeriodicShiftCatalog::s_finalize_handler(
+   0,
+   0,
+   0,
+   PeriodicShiftCatalog::finalizeCallback,
+   40);
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+const PeriodicShiftCatalog *PeriodicShiftCatalog::getCatalog(
+   const tbox::Dimension& dim)
+{
+   if (s_periodic_shift_catalog_instance[dim.getValue() - 1] == NULL) {
+      s_periodic_shift_catalog_instance[dim.getValue() - 1] = new PeriodicShiftCatalog(dim);
+   }
+   return s_periodic_shift_catalog_instance[dim.getValue() - 1];
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void PeriodicShiftCatalog::finalizeCallback()
+{
+   for (int i = 0; i < tbox::Dimension::MAXIMUM_DIMENSION_VALUE; ++i) {
+      if (s_periodic_shift_catalog_instance[i] != NULL) {
+         delete s_periodic_shift_catalog_instance[i];
+         s_periodic_shift_catalog_instance[i] = NULL;
+      }
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+PeriodicShiftCatalog::PeriodicShiftCatalog(
+   const tbox::Dimension& dim):
+   d_dim(dim),
+   d_shifts(1, hier::IntVector::getZero(dim)),
+   d_opposite_number(1),
+   d_zero_shift_number(0)
+{
+   d_opposite_number[0] = 0;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+PeriodicShiftCatalog::~PeriodicShiftCatalog()
+{
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void PeriodicShiftCatalog::setShifts(
+   const tbox::Dimension& dim,
+   const std::vector<IntVector>& shifts)
+{
+   getCatalog(dim);  // Causes singleton object creation if it does not yet exist.
+
+   const int dim_index(dim.getValue()-1);
+
+   std::vector<IntVector> tmp_shifts;
+   s_periodic_shift_catalog_instance[dim_index]->d_opposite_number.clear();
+
+   const IntVector& zero_shift(IntVector::getZero(dim));
+
+   // The first position is the zero-shift and its own opposite.
+   s_periodic_shift_catalog_instance[dim_index]->d_opposite_number.push_back(
+      static_cast<int>(tmp_shifts.size()));
+   tmp_shifts.push_back(zero_shift);
+
+   /*
+    * Add the shifts in shifts, avoiding duplicate shifts.
+    */
+   for (std::vector<IntVector>::const_iterator vi = shifts.begin();
+        vi != shifts.end(); ++vi) {
+
+      std::vector<IntVector>::const_iterator vj;
+      for (vj = tmp_shifts.begin(); vj != tmp_shifts.end(); ++vj) {
+         if (*vi == *vj) {
+            break;
+         }
+      }
+
+      if (vj == tmp_shifts.end()) {
+         /*
+          * Shift *vi doesn't already exists.  Add it, add it's
+          * reverse, and note the positions in d_opposite_number.
+          */
+         s_periodic_shift_catalog_instance[dim_index]->d_opposite_number.push_back(
+            static_cast<int>(tmp_shifts.size()) + 1);
+         s_periodic_shift_catalog_instance[dim_index]->d_opposite_number.push_back(
+            static_cast<int>(tmp_shifts.size()));
+         tmp_shifts.push_back(*vi);
+         tmp_shifts.push_back(-(*vi));
+      }
+
+   }
+
+   s_periodic_shift_catalog_instance[dim_index]->d_shifts = tmp_shifts;
+   s_periodic_shift_catalog_instance[dim_index]->d_zero_shift_number = 0;
+
+   if (1) {
+      // Write out the shift catalog to log file.
+      tbox::plog << "\n\nPeriodicShiftCatalog has "
+      << s_periodic_shift_catalog_instance[dim_index]->d_shifts.size()
+      << " shifts:\n";
+      tbox::plog << "Shift   Opposite\n";
+      tbox::plog << "Number  Shift     Shift\n";
+      for (size_t i = 0;
+           i < s_periodic_shift_catalog_instance[dim_index]->d_shifts.size();
+           ++i) {
+         tbox::plog << std::setw(3) << i << "      "
+         << std::setw(3)
+         << s_periodic_shift_catalog_instance[dim_index]->d_opposite_number[i]
+         << "      "
+         << s_periodic_shift_catalog_instance[dim_index]->d_shifts[i] << "\n";
+      }
+      tbox::plog << "\n\n";
+   }
+
+   TBOX_ASSERT(s_periodic_shift_catalog_instance[dim_index]->d_shifts.size() ==
+      s_periodic_shift_catalog_instance[dim_index]->d_opposite_number.size());
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void PeriodicShiftCatalog::initializeShiftsByIndexDirections(
+   const IntVector& shift_distance_along_index_directions)
+{
+
+   const tbox::Dimension& dim(shift_distance_along_index_directions.getDim());
+
+   // Compute the number of shifts, 3^DIM.
+   int num_shift = 3;
+   for (int d = 1; d < dim.getValue(); ++d) {
+      num_shift *= 3;
+   }
+
+   const IntVector& zero_shift(IntVector::getZero(dim));
+
+   std::vector<IntVector> shifts;
+   shifts.clear();
+   shifts.insert(shifts.begin(), num_shift, zero_shift);
+
+   /*
+    * Compute the direction of each shift, a value of -1, 0 or 1
+    * independent of the period.  A positive value means shift in
+    * the positive direction, etc.
+    *
+    * After getting the signs, multiply in the distances.
+    */
+   for (int s = 0; s < num_shift; ++s) {
+      int s1 = s;
+      for (int d = 0; d < dim.getValue(); ++d) {
+         shifts[s](d) = s1 % 3 - 1;
+         s1 /= 3;
+      }
+   }
+
+   for (unsigned int s = 0; s < shifts.size(); ++s) {
+      shifts[s] *= shift_distance_along_index_directions;
+   }
+
+   setShifts(dim, shifts);
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PeriodicShiftCatalog.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PeriodicShiftCatalog.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,102 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility for computing all possible periodic shift directions. 
+ *
+ ************************************************************************/
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+int PeriodicShiftCatalog::getZeroShiftNumber() const
+{
+   return 0;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+bool PeriodicShiftCatalog::isPeriodic() const
+{
+   return d_shifts.size() > 1;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+int PeriodicShiftCatalog::getNumberOfShifts() const
+{
+   return (int)d_shifts.size();
+}
+
+SAMRAI_INLINE_KEYWORD
+const IntVector& PeriodicShiftCatalog::shiftNumberToShiftDistance(
+   int shift_number) const
+{
+   TBOX_ASSERT(shift_number >= 0);
+   TBOX_ASSERT(shift_number < (int)d_shifts.size());
+
+   return d_shifts[shift_number];
+}
+
+SAMRAI_INLINE_KEYWORD
+int PeriodicShiftCatalog::getOppositeShiftNumber(
+   int shift_number) const
+{
+   TBOX_ASSERT(shift_number >= 0);
+   TBOX_ASSERT(shift_number < (int)d_shifts.size());
+
+   return d_opposite_number[shift_number];
+}
+
+SAMRAI_INLINE_KEYWORD
+int PeriodicShiftCatalog::shiftDistanceToShiftNumber(
+   const IntVector& shift_distance) const
+{
+   unsigned int s;
+   for (s = 0; s < d_shifts.size(); ++s) {
+      if (d_shifts[s] == shift_distance) break;
+   }
+   if (s == d_shifts.size()) {
+      s = tbox::MathUtilities<int>::getMax();
+   }
+   return (int)s;
+}
+
+SAMRAI_INLINE_KEYWORD
+int PeriodicShiftCatalog::getInvalidShiftNumber() const
+{
+   return tbox::MathUtilities<int>::getMax();
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PeriodicShiftCatalog.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PeriodicShiftCatalog.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,207 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility for cataloging periodic shift directions. 
+ *
+ ************************************************************************/
+#ifndef included_hier_PeriodicShiftCatalog
+#define included_hier_PeriodicShiftCatalog
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/IntVector.h"
+
+#include <vector>
+
+namespace SAMRAI {
+namespace hier {
+
+/*!
+ * @brief Singleton for cataloging periodic shifts and assigning
+ * each one a unique "shift number".
+ *
+ * In a periodic domain, a MappedBox location (or rather its images)
+ * can appear to be in many places.  We define the "shift distance" as
+ * the IntVector distance in index space from the original grid
+ * location to the image.
+ *
+ * This class catalogs all possible shifts for a periodic
+ * configuration and assigns an integer index to each shift.  A shift 
+ * can be referenced by a single "shift number" rather than its IntVector
+ * distance.
+ *
+ * TODO: Periodic shift definition and management should probably be
+ * be combined with multi-block relationships in the multi-block
+ * re-design.
+ */
+
+class PeriodicShiftCatalog
+{
+public:
+   /*!
+    * @brief Get the singleton object.
+    *
+    * @param[in] dim Get the catalog for this dimension.
+    */
+   static const PeriodicShiftCatalog *
+   getCatalog(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Return the shift distance corresponding to the given
+    * shift number.
+    *
+    * @param[in] shift_number
+    */
+   const IntVector&
+   shiftNumberToShiftDistance(
+      int shift_number) const;
+
+   /*!
+    * @brief Return the shift number corresponding to the given shift
+    * distance.
+    *
+    * The shift distance must correspond to an actual distance in the
+    * catalog.  Otherwise, invalidShiftNumber() is returned.
+    *
+    * @param[in] shift_distance
+    */
+   int
+   shiftDistanceToShiftNumber(
+      const IntVector& shift_distance) const;
+
+   /*!
+    * @brief Return the "invalid" shift number.
+    */
+   int
+   getInvalidShiftNumber() const;
+
+   /*!
+    * @brief Return the shift number corresponding to the negative of
+    * the shift distance of the given shift number.
+    *
+    * @param[in] shift_number
+    */
+   int
+   getOppositeShiftNumber(
+      int shift_number) const;
+
+   /*!
+    * @brief Determine whether there is any periodicity.
+    */
+   bool
+   isPeriodic() const;
+
+   /*!
+    * @brief Return the number of possible shifts.
+    */
+   int
+   getNumberOfShifts() const;
+
+   /*!
+    * @brief Return the shift number corresponding to no shift.
+    */
+   int
+   getZeroShiftNumber() const;
+
+   /*!
+    * @brief Compute all possible shifts for periodicity along the
+    * index directions and initialize the shifts in the catalog.
+    *
+    * The shift_distances should be non-negative integers representing
+    * the minimum distance (in reference index space) in each
+    * direction that a domain has to be shifted before it repeats.  In
+    * non-periodic directions, use the value of zero.
+    *
+    * Periodic shifts along index directions is the only periodic
+    * shifting that SAMRAI fully supports.  There are 3 possible
+    * shifts per direction: forward, backward and no-shift.  In
+    * D-dimension, there can be up to 3^D images of the same location,
+    * including diagonal shifts that results from combining multiple
+    * shifts along different directions.
+    *
+    * This method must only be called once for each dimension
+    * (indicated by the dimension of @c shift_distances).
+    *
+    * @param[in] shift_distances_along_index_directions The periodic
+    * shift distance in each index direction.
+    *
+    * TODO: possible refactor?  This method should probably be changed
+    * to a regular member method, for conformity to other singletons.
+    */
+   static void
+   initializeShiftsByIndexDirections(
+      const IntVector& shift_distance_along_index_directions);
+
+private:
+   /*!
+    * @brief Constructs uninitialized object.
+    *
+    * After construction, the object should be populated with periodic
+    * shifts using initializeShiftsByIndexDirections().
+    */
+   PeriodicShiftCatalog(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Set the shifts.
+    *
+    * Each IntVector in shifts must represent a minimum distance (in
+    * reference index space) that the domain can be shifted for it to
+    * overlay itself exactly.  For each shift given, its opposite (its
+    * negative value) is automatically added.  Duplicate shifts are
+    * disregarded.
+    *
+    * @param[in] dim
+    *
+    * @param[in] shifts All possible shifts.
+    */
+   static void
+   setShifts(
+      const tbox::Dimension& dim,
+      const std::vector<IntVector>& shifts);
+
+   ~PeriodicShiftCatalog();
+
+   /*!
+    * @brief Free the singleton object.
+    */
+   static void
+   finalizeCallback();
+
+   const tbox::Dimension d_dim;
+
+   static PeriodicShiftCatalog* s_periodic_shift_catalog_instance[tbox::
+                                                                  Dimension::
+                                                                  MAXIMUM_DIMENSION_VALUE
+      ];
+
+   std::vector<IntVector> d_shifts;
+
+   /*!
+    * @brief Shift numbers corresponding to the shift in the opposite
+    * direction.
+    *
+    * Always true: d_shifts[i] == -d_shifts[ d_opposite_number[i] ]
+    */
+   std::vector<int> d_opposite_number;
+
+   /*!
+    * @brief The shift number corresponding to zero shift.
+    */
+   unsigned int d_zero_shift_number;
+
+   static tbox::StartupShutdownManager::Handler
+   s_finalize_handler;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/PeriodicShiftCatalog.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PersistentOverlapConnectors.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PersistentOverlapConnectors.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,503 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Registry of PersistentOverlapConnectorss incident from a common MappedBoxLevel. 
+ *
+ ************************************************************************/
+#ifndef included_hier_PersistentOverlapConnectors_C
+#define included_hier_PersistentOverlapConnectors_C
+
+#include "SAMRAI/hier/PersistentOverlapConnectors.h"
+#include "SAMRAI/hier/Connector.h"
+#include "SAMRAI/hier/MappedBoxLevel.h"
+#include "SAMRAI/hier/OverlapConnectorAlgorithm.h"
+#include "SAMRAI/tbox/InputManager.h"
+
+namespace SAMRAI {
+namespace hier {
+
+char PersistentOverlapConnectors::s_check_created_connectors('\0');
+char PersistentOverlapConnectors::s_check_accessed_connectors('\0');
+bool PersistentOverlapConnectors::s_always_create_missing_connector(true);
+
+/*
+ ************************************************************************
+ * This private constructor can only be used by the friend
+ * class MappedBoxLevel.
+ ************************************************************************
+ */
+PersistentOverlapConnectors::PersistentOverlapConnectors(
+   const MappedBoxLevel& my_mapped_box_level):
+   d_my_mapped_box_level(my_mapped_box_level)
+{
+   if (s_check_created_connectors == '\0') {
+      tbox::Pointer<tbox::Database> idb(tbox::InputManager::getInputDatabase());
+      if (idb && idb->isDatabase("PersistentOverlapConnectors")) {
+         tbox::Pointer<tbox::Database> rsdb(idb->getDatabase("PersistentOverlapConnectors"));
+
+         const bool check_created_connectors(
+            rsdb->getBoolWithDefault("check_created_connectors", false));
+         s_check_created_connectors = check_created_connectors ? 'y' : 'n';
+
+         const bool check_accessed_connectors(
+            rsdb->getBoolWithDefault("check_accessed_connectors", false));
+         s_check_accessed_connectors = check_accessed_connectors ? 'y' : 'n';
+
+         s_always_create_missing_connector =
+            rsdb->getBoolWithDefault("always_create_missing_connector",
+                                     s_always_create_missing_connector);
+      }
+
+   }
+}
+
+/*
+ ************************************************************************
+ *
+ ************************************************************************
+ */
+PersistentOverlapConnectors::~PersistentOverlapConnectors()
+{
+   clear();
+}
+
+/*
+ ************************************************************************
+ * Create Connector using global search for edges.
+ ************************************************************************
+ */
+const Connector& PersistentOverlapConnectors::createConnector(
+   const MappedBoxLevel& head,
+   const IntVector& connector_width)
+{
+   TBOX_ASSERT(d_my_mapped_box_level.isInitialized());
+   TBOX_ASSERT(head.isInitialized());
+
+   for (int i = 0; i < d_cons_from_me.size(); ++i) {
+      if (&d_cons_from_me[i]->getHead() == &head &&
+          d_cons_from_me[i]->getConnectorWidth() == connector_width) {
+         TBOX_ERROR(
+            "PersistentOverlapConnectors::createConnector:\n"
+            <<"Cannot create duplicate Connectors.");
+      }
+   }
+
+   Connector* new_connector = new Connector(
+         d_my_mapped_box_level,
+         head,
+         connector_width,
+         MappedBoxLevel::DISTRIBUTED);
+   OverlapConnectorAlgorithm oca;
+   oca.findOverlaps(*new_connector, head.getGlobalizedVersion());
+
+   d_cons_from_me.push_back(new_connector);
+   head.getPersistentOverlapConnectors().d_cons_to_me.push_back(new_connector);
+
+   return *d_cons_from_me.back();
+}
+
+/*
+ ************************************************************************
+ * Create Connector with user-provided for edges.
+ ************************************************************************
+ */
+const Connector& PersistentOverlapConnectors::createConnector(
+   const MappedBoxLevel& head,
+   const IntVector& connector_width,
+   const NeighborhoodSet& relationships)
+{
+   TBOX_ASSERT(d_my_mapped_box_level.isInitialized());
+   TBOX_ASSERT(head.isInitialized());
+
+   for (int i = 0; i < d_cons_from_me.size(); ++i) {
+      TBOX_ASSERT(d_cons_from_me[i]->isInitialized());
+      TBOX_ASSERT(d_cons_from_me[i]->getBase().isInitialized());
+      TBOX_ASSERT(d_cons_from_me[i]->getHead().isInitialized());
+      TBOX_ASSERT(
+         !d_cons_from_me[i]->getBase().getMappedBoxLevelHandle().isNull());
+      TBOX_ASSERT(
+         !d_cons_from_me[i]->getHead().getMappedBoxLevelHandle().isNull());
+      TBOX_ASSERT(&d_cons_from_me[i]->getBase() ==
+         &d_cons_from_me[i]->getBase().getMappedBoxLevelHandle()->
+         getMappedBoxLevel());
+      TBOX_ASSERT(&d_cons_from_me[i]->getHead() ==
+         &d_cons_from_me[i]->getHead().getMappedBoxLevelHandle()->
+         getMappedBoxLevel());
+      if (&(d_cons_from_me[i]->getHead()) == &head &&
+          d_cons_from_me[i]->getConnectorWidth() == connector_width) {
+         TBOX_ERROR(
+            "PersistentOverlapConnectors::createConnector:\n"
+            <<"Cannot create duplicate Connectors.");
+      }
+   }
+
+   Connector* new_connector = new Connector(
+         d_my_mapped_box_level,
+         head,
+         connector_width,
+         relationships,
+         MappedBoxLevel::DISTRIBUTED);
+   if (s_check_created_connectors == 'y') {
+      // Check correctness.
+      OverlapConnectorAlgorithm oca;
+      TBOX_ASSERT(oca.checkOverlapCorrectness(*new_connector) == 0);
+   }
+
+   d_cons_from_me.push_back(new_connector);
+   head.getPersistentOverlapConnectors().d_cons_to_me.push_back(new_connector);
+
+   new_connector = NULL; // Help Insure++ avoid false positive dangling pointer.
+
+   return *d_cons_from_me.back();
+}
+/*
+ ************************************************************************
+ *
+ ************************************************************************
+ */
+const Connector& PersistentOverlapConnectors::findConnector(
+   const MappedBoxLevel& head,
+   const IntVector& min_connector_width,
+   bool exact_width_only)
+{
+   if ( s_always_create_missing_connector ) {
+      return findOrCreateConnector(head, min_connector_width, exact_width_only);
+   }
+
+   TBOX_ASSERT(d_my_mapped_box_level.isInitialized());
+   TBOX_ASSERT(head.isInitialized());
+
+   const Connector* found = NULL;
+   for (int i = 0; i < d_cons_from_me.size(); ++i) {
+      TBOX_ASSERT(d_cons_from_me[i]->isInitialized());
+      TBOX_ASSERT(d_cons_from_me[i]->getBase().isInitialized());
+      TBOX_ASSERT(d_cons_from_me[i]->getHead().isInitialized());
+      TBOX_ASSERT(
+         !d_cons_from_me[i]->getBase().getMappedBoxLevelHandle().isNull());
+      TBOX_ASSERT(
+         !d_cons_from_me[i]->getHead().getMappedBoxLevelHandle().isNull());
+      TBOX_ASSERT(&d_cons_from_me[i]->getBase() ==
+         &d_cons_from_me[i]->getBase().getMappedBoxLevelHandle()->
+         getMappedBoxLevel());
+      TBOX_ASSERT(&d_cons_from_me[i]->getHead() ==
+         &d_cons_from_me[i]->getHead().getMappedBoxLevelHandle()->
+         getMappedBoxLevel());
+
+      if (&(d_cons_from_me[i]->getHead()) == &head) {
+         if ( d_cons_from_me[i]->getConnectorWidth() >= min_connector_width ) {
+            if (found == NULL) {
+               found = d_cons_from_me[i];
+            } else {
+               IntVector vdiff =
+                  d_cons_from_me[i]->getConnectorWidth()
+                  - found->getConnectorWidth();
+
+               TBOX_ASSERT(vdiff != IntVector::getZero(vdiff.getDim()));
+
+               int diff = 0;
+               for (int j = 0; j < vdiff.getDim().getValue(); ++j) {
+                  diff += vdiff(j);
+               }
+               if (diff < 0) {
+                  found = d_cons_from_me[i];
+               }
+            }
+            if (found->getConnectorWidth() == min_connector_width) {
+               break;
+            }
+         }
+      }
+   }
+
+   OverlapConnectorAlgorithm oca;
+
+   if (found == NULL) {
+
+      TBOX_ERROR(
+         "PersistentOverlapConnectors::findConnector: Failed to find Connector\n"
+         << &d_my_mapped_box_level << "--->" << &head
+         << " with " << (exact_width_only ? "exact" : "min")
+         << " width of " << min_connector_width << ".\n"
+         << "base:\n" << d_my_mapped_box_level.format("B: ")
+         << "head:\n" << head.format("H: ")
+         << "To automatically create the missing\n"
+         << "connector, use findOrCreateConnector.");
+
+   } else if ( exact_width_only &&
+               found->getConnectorWidth() != min_connector_width ) {
+
+      /*
+       * Found a sufficient Connector, but it is too wide.  Extract
+       * relevant neighbors from it to make a Connector with the exact
+       * width.  This is scalable!
+       */
+
+      const hier::NeighborhoodSet &wider_neighborhoods
+         (found->getNeighborhoodSets());
+      hier::NeighborhoodSet exact_neighborhoods;
+
+      for ( hier::NeighborhoodSet::const_iterator ni(wider_neighborhoods.begin());
+            ni!=wider_neighborhoods.end(); ++ni ) {
+         oca.extractNeighbors( exact_neighborhoods[ni->first],
+                               *found,
+                               ni->first,
+                               min_connector_width );
+      }
+
+      Connector* new_connector = new Connector;
+      new_connector->swapInitialize(
+         d_my_mapped_box_level,
+         head,
+         min_connector_width,
+         exact_neighborhoods );
+      /*
+       * Remove empty neighborhood sets.  They are not essential to an
+       * overlap Connector.
+       */
+      new_connector->eraseEmptyNeighborSets();
+      TBOX_ASSERT(oca.checkOverlapCorrectness(*found) == 0);
+
+      d_cons_from_me.push_back(new_connector);
+      head.getPersistentOverlapConnectors().d_cons_to_me.push_back(
+         new_connector);
+
+      found = new_connector;
+
+   }
+
+   if (s_check_accessed_connectors == 'y') {
+      // Check correctness.
+      TBOX_ASSERT(oca.checkOverlapCorrectness(*found) == 0);
+   }
+
+   return *found;
+}
+
+/*
+ ************************************************************************
+ *
+ ************************************************************************
+ */
+const Connector& PersistentOverlapConnectors::findOrCreateConnector(
+   const MappedBoxLevel& head,
+   const IntVector& min_connector_width,
+   bool exact_width_only)
+{
+   TBOX_ASSERT(d_my_mapped_box_level.isInitialized());
+   TBOX_ASSERT(head.isInitialized());
+
+   const Connector* found = NULL;
+   for (int i = 0; i < d_cons_from_me.size(); ++i) {
+      TBOX_ASSERT(d_cons_from_me[i]->isInitialized());
+      TBOX_ASSERT(d_cons_from_me[i]->getBase().isInitialized());
+      TBOX_ASSERT(d_cons_from_me[i]->getHead().isInitialized());
+      TBOX_ASSERT(
+         !d_cons_from_me[i]->getBase().getMappedBoxLevelHandle().isNull());
+      TBOX_ASSERT(
+         !d_cons_from_me[i]->getHead().getMappedBoxLevelHandle().isNull());
+      TBOX_ASSERT(&d_cons_from_me[i]->getBase() ==
+         &d_cons_from_me[i]->getBase().getMappedBoxLevelHandle()->
+         getMappedBoxLevel());
+      TBOX_ASSERT(&d_cons_from_me[i]->getHead() ==
+         &d_cons_from_me[i]->getHead().getMappedBoxLevelHandle()->
+         getMappedBoxLevel());
+
+      if (&(d_cons_from_me[i]->getHead()) == &head) {
+         if ( d_cons_from_me[i]->getConnectorWidth() >= min_connector_width ) {
+            if (found == NULL) {
+               found = d_cons_from_me[i];
+            } else {
+               IntVector vdiff =
+                  d_cons_from_me[i]->getConnectorWidth()
+                  - found->getConnectorWidth();
+
+               TBOX_ASSERT(vdiff != IntVector::getZero(vdiff.getDim()));
+
+               int diff = 0;
+               for (int j = 0; j < vdiff.getDim().getValue(); ++j) {
+                  diff += vdiff(j);
+               }
+               if (diff < 0) {
+                  found = d_cons_from_me[i];
+               }
+            }
+            if (found->getConnectorWidth() == min_connector_width) {
+               break;
+            }
+         }
+      }
+   }
+
+   OverlapConnectorAlgorithm oca;
+
+   if (found == NULL) {
+
+      Connector* new_connector = new Connector(
+            d_my_mapped_box_level,
+            head,
+            min_connector_width,
+            MappedBoxLevel::DISTRIBUTED);
+      oca.findOverlaps(*new_connector, head.getGlobalizedVersion());
+      found = new_connector;
+
+      d_cons_from_me.push_back(new_connector);
+      head.getPersistentOverlapConnectors().d_cons_to_me.push_back(
+         new_connector);
+
+   } else if ( exact_width_only &&
+               found->getConnectorWidth() != min_connector_width ) {
+
+      /*
+       * Found a sufficient Connector, but it is too wide.  Extract
+       * relevant neighbors from it to make a Connector with the exact
+       * width.  This is scalable!
+       */
+
+      const hier::NeighborhoodSet &wider_neighborhoods
+         (found->getNeighborhoodSets());
+      hier::NeighborhoodSet exact_neighborhoods;
+
+      for ( hier::NeighborhoodSet::const_iterator ni(wider_neighborhoods.begin());
+            ni!=wider_neighborhoods.end(); ++ni ) {
+         oca.extractNeighbors( exact_neighborhoods[ni->first],
+                               *found,
+                               ni->first,
+                               min_connector_width );
+      }
+
+      Connector* new_connector = new Connector;
+      new_connector->swapInitialize(
+         d_my_mapped_box_level,
+         head,
+         min_connector_width,
+         exact_neighborhoods );
+      /*
+       * Remove empty neighborhood sets.  They are not essential to an
+       * overlap Connector.
+       */
+      new_connector->eraseEmptyNeighborSets();
+      TBOX_ASSERT(oca.checkOverlapCorrectness(*found) == 0);
+
+      d_cons_from_me.push_back(new_connector);
+      head.getPersistentOverlapConnectors().d_cons_to_me.push_back(
+         new_connector);
+
+      found = new_connector;
+
+   }
+
+   if (s_check_accessed_connectors == 'y') {
+      // Check correctness.
+      TBOX_ASSERT(oca.checkOverlapCorrectness(*found) == 0);
+   }
+
+   return *found;
+}
+
+/*
+ ************************************************************************
+ *
+ ************************************************************************
+ */
+bool PersistentOverlapConnectors::hasConnector(
+   const MappedBoxLevel& head,
+   const IntVector& min_connector_width,
+   bool exact_width_only) const
+{
+   if (exact_width_only) {
+      for (int i = 0; i < d_cons_from_me.size(); ++i) {
+         if (&d_cons_from_me[i]->getHead() == &head &&
+             d_cons_from_me[i]->getConnectorWidth() == min_connector_width) {
+            return true;
+         }
+      }
+   } else {
+      for (int i = 0; i < d_cons_from_me.size(); ++i) {
+         if (&d_cons_from_me[i]->getHead() == &head &&
+             d_cons_from_me[i]->getConnectorWidth() >= min_connector_width) {
+            return true;
+         }
+      }
+   }
+   return false;
+}
+
+/*
+ ************************************************************************
+ *
+ ************************************************************************
+ */
+void PersistentOverlapConnectors::clear()
+{
+   if (d_cons_from_me.empty() && d_cons_to_me.empty()) {
+      return;
+   }
+
+   /*
+    * Delete Connectors from me.
+    */
+   for (int i = 0; i < d_cons_from_me.size(); ++i) {
+
+      const Connector* delete_me = d_cons_from_me[i];
+
+      ConVect& cons_at_head =
+         delete_me->getHead().getPersistentOverlapConnectors().d_cons_to_me;
+
+      for (int j = 0; j < cons_at_head.size(); ++j) {
+         if (cons_at_head[j] == delete_me) {
+            cons_at_head.erase(j);
+            break;
+         }
+      }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+
+      for (int j = 0; j < cons_at_head.size(); ++j) {
+         TBOX_ASSERT(cons_at_head[j] != delete_me);
+      }
+#endif
+
+      delete d_cons_from_me[i];
+      d_cons_from_me[i] = NULL;
+   }
+   d_cons_from_me.clear();
+
+   /*
+    * Delete Connectors to me.
+    */
+   for (int i = 0; i < d_cons_to_me.size(); ++i) {
+
+      const Connector* delete_me = d_cons_to_me[i];
+
+      // Remove reference held by other end of Connector.
+      ConVect& cons_at_base =
+         delete_me->getBase().getPersistentOverlapConnectors().d_cons_from_me;
+
+      for (int j = 0; j < cons_at_base.size(); ++j) {
+         if (cons_at_base[j] == delete_me) {
+            cons_at_base.erase(j);
+            break;
+         }
+      }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+
+      for (int j = 0; j < cons_at_base.size(); ++j) {
+         TBOX_ASSERT(cons_at_base[j] != delete_me);
+      }
+
+#endif
+
+      delete d_cons_to_me[i];
+      d_cons_to_me[i] = NULL;
+
+   }
+   d_cons_to_me.clear();
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/PersistentOverlapConnectors.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/PersistentOverlapConnectors.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,266 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Manager of Connectors incident from a common MappedBoxLevel. 
+ *
+ ************************************************************************/
+#ifndef included_hier_PersistentOverlapConnectors
+#define included_hier_PersistentOverlapConnectors
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/NeighborhoodSet.h"
+#include "SAMRAI/hier/IntVector.h"
+
+#include <vector>
+
+namespace SAMRAI {
+namespace hier {
+
+class Connector;
+class MappedBoxLevel;
+
+/*!
+ * @brief A managager of overlap Connectors incident from a
+ * MappedBoxLevel, used to store and computed overlap Connectors in
+ * MappedBoxLevel.
+ *
+ * PersistantOverlapConnectors provides a mechanism for objects using
+ * the MappedBoxLevel to look up overlap Connectors for the
+ * MappedBoxLevel.  Connectors created or returned by this class are
+ * complete overlap Connectors that always contain the correct overlap
+ * neighbor data.
+ *
+ * For improved scalability, Connectors can be constructed externally
+ * and copied into the collection.  Connectors can also be
+ * automatically computed using a non-scalable global search.
+ *
+ * Inputs:
+ *
+ * <b>bool check_created_connectors:</b> When true, checks Connectors when
+ * they are created.  The check is an non-scalable operation and is
+ * meant for debugging.
+ *
+ * <b>bool check_accessed_connectors:</b> When true, check Connectors when
+ * they are accessed.  The check is an non-scalable operation and is
+ * meant for debugging.
+ *
+ * <b>bool always_create_missing_connector:</b> When true, override
+ * findConnector() to behave like findOrCreateConnector().  This
+ * essentially ensures that any Connectors sought are always found.
+ *
+ * @note
+ * Creating Connectors this way (setting always_create_missing_connector
+ * to true) is non-scalable. Nevertheless, the default is true, so that
+ * application writers need not to worry about creating Connectors in
+ * a scalable way.  For performance, this should be set to false.  To
+ * selectively enable automatic Connector generation, set this to false and
+ * use findOrCreateConnector() instead of findConnector() where one is 
+ * unsure if the Connector has been created.
+ *
+ * @see findConnector()
+ * @see findOrCreateConnector()
+ * @see hier::Connector
+ */
+class PersistentOverlapConnectors
+{
+
+public:
+	/*!
+	 * @brief Deletes all Connectors to and from this object
+	 */
+   ~PersistentOverlapConnectors();
+
+   /*!
+    * @brief Create an overlap Connector, computing relationships by
+    * globalizing data.
+    *
+    * The base will be the MappedBoxLevel that owns this object.
+    * Find Connector relationships using a (non-scalable) global search.
+    *
+    * @see hier::Connector
+    * @see hier::Connector::initialize()
+    *
+    * @param[in] head
+    * @param[in] connector_width
+    *
+    * @return A const reference to the newly created overlap Connector.
+    */
+   const Connector&
+   createConnector(
+      const MappedBoxLevel& head,
+      const IntVector& connector_width);
+
+   /*!
+    * @brief Create an overlap Connector using externally
+    * computed relationships.
+    *
+    * Create the Connector initialized with the arguments.
+    * The base will be the MappedBoxLevel that owns this object.
+    *
+    * @see hier::Connector
+    * @see hier::Connector::initialize()
+    *
+    * @param[in] head
+    * @param[in] connector_width
+    * @param[in] relationships
+    */
+   const Connector&
+   createConnector(
+      const MappedBoxLevel& head,
+      const IntVector& connector_width,
+      const NeighborhoodSet& relationships);
+
+   /*!
+    * @brief Find an overlap Connector with the given head and minimum
+    * Connector width.
+    *
+    * If multiple Connectors fit the criteria, the one with the
+    * smallest ghost cell width (based on the algebraic sum of the
+    * components) is selected.  
+    *
+    * TODO: The criterion for selecting a single Connector is
+    * arbitrary and should be re-examined.
+    *
+    * @par Assertions
+    * If no Connector fits the criteria and @c
+    * always_create_missing_connector is false, an assertion is
+    * thrown.  To automatically create the Connector instead, use
+    * findOrCreateConnector() or set @c
+    * always_create_missing_connector to true.
+    *
+    * @param[in] head Find the overlap Connector with this specified head.
+    * @param[in] min_connector_width Find the overlap Connector satisfying
+    *      this minimum Connector width.
+    * @param[in] exact_width_only If true, reject Connectors that do not
+    *      match the requested width exactly.
+    *
+    * @return The Connector which matches the search criterion.
+    */
+   const Connector&
+   findConnector(
+      const MappedBoxLevel& head,
+      const IntVector& min_connector_width,
+      bool exact_width_only = false);
+
+   /*!
+    * @brief Find or create an overlap Connectors with the
+    * given head and minimum Connector width.
+    *
+    * If multiple Connectors fit the criteria, the one with the
+    * smallest ghost cell width (based on the algebraic sum of the
+    * components) is selected.  
+    *
+    * TODO: The criterion for selecting a
+    * single Connector is arbitrary and should be re-examined.
+    *
+    * If no Connector fits the criteria, a new one is created using
+    * global search for edges.
+    *
+    * @param[in] head Find the overlap Connector with this specified head.
+    * @param[in] min_connector_width Find the overlap Connector satisfying
+    *      this minimum ghost cell width.
+    * @param[in] exact_width_only If true, reject Connectors that do not
+    *      match the requested width exactly.
+    */
+   const Connector&
+   findOrCreateConnector(
+      const MappedBoxLevel& head,
+      const IntVector& min_connector_width,
+      bool exact_width_only = false);
+
+   /*!
+    * @brief Returns whether the object has overlap
+    * Connectors with the given head and minimum Connector
+    * width.
+    *
+    * TODO:  does the following comment mean that this must be called
+    * before the call to findConnector?
+    *
+    * If this returns true, the Connector fitting the specification
+    * exists and findConnector() will not throw an assertion.
+    *
+    * @param[in] head Find the overlap Connector with this specified head.
+    * @param[in] min_connector_width Find the overlap Connector satisfying
+    *      this minimum ghost cell width.
+    * @param[in] exact_width_only If true, reject Connectors that do not
+    *      match the requested width exactly.
+    *
+    * @return True if a Connector is found, otherwise false.
+    */
+   bool
+   hasConnector(
+      const MappedBoxLevel& head,
+      const IntVector& min_connector_width,
+      bool exact_width_only = false) const;
+
+   /*!
+    * @brief Delete stored Connectors.
+    */
+   void
+   clear();
+
+private:
+   //@{ @name Methods meant only for MappedBoxLevel to use.
+
+   /*!
+    * @brief Constructor, to be called from the MappedBoxLevel
+    * allocating the object.
+    *
+    * @param my_mapped_box_level The MappedBoxLevel served by this
+    * object.
+    */
+   PersistentOverlapConnectors(
+      const MappedBoxLevel& my_mapped_box_level);
+
+   //@}
+
+   //@{
+   /*!
+    * @brief Only MappedBoxLevels are allowed to construct a
+    * PersistentOverlapConnectors.
+    */
+   friend class MappedBoxLevel;
+   //@}
+
+   typedef tbox::Array<const Connector *> ConVect;
+
+   /*!
+    * @brief Persistent overlap Connectors incident from me.
+    */
+   ConVect d_cons_from_me;
+
+   /*!
+    * @brief Persistent overlap Connectors incident to me.
+    */
+   ConVect d_cons_to_me;
+
+   /*!
+    * @brief Reference to the MappedBoxLevel served by this object.
+    */
+   const MappedBoxLevel& d_my_mapped_box_level;
+
+   /*!
+    * @brief Whether to check overlap Connectors when they are created.
+    */
+   static char s_check_created_connectors;
+
+   /*!
+    * @brief Whether to check overlap Connectors when they are accessed.
+    */
+   static char s_check_accessed_connectors;
+
+   /*!
+    * @brief Whether to force Connector finding functions to create
+    * connectors that are missing.
+    */
+   static bool s_always_create_missing_connector;
+
+};
+
+}
+}
+
+#endif // included_hier_PersistentOverlapConnectors
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/ProcessorMapping.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/ProcessorMapping.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,144 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   tbox 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/hier/ProcessorMapping.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/ProcessorMapping.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+ProcessorMapping::ProcessorMapping():
+   d_my_rank(-1),
+   d_nodes(-1),
+   d_mapping(0),
+   d_local_id_count(-1)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   d_my_rank = mpi.getRank();
+   d_nodes = mpi.getSize();
+}
+
+ProcessorMapping::ProcessorMapping(
+   const int n):
+   d_my_rank(-1),
+   d_nodes(-1),
+   d_mapping(n),
+   d_local_id_count(-1)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   d_my_rank = mpi.getRank();
+   d_nodes = mpi.getSize();
+   for (int i = 0; i < n; i++) {
+      d_mapping[i] = 0;
+   }
+}
+
+ProcessorMapping::ProcessorMapping(
+   const ProcessorMapping& mapping):
+   d_my_rank(-1),
+   d_nodes(-1),
+   d_mapping(mapping.d_mapping.getSize()),
+   d_local_id_count(-1)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   d_my_rank = mpi.getRank();
+   d_nodes = mpi.getSize();
+   const int n = d_mapping.getSize();
+   for (int i = 0; i < n; i++) {
+      d_mapping[i] = mapping.d_mapping[i];
+   }
+}
+
+ProcessorMapping::ProcessorMapping(
+   const tbox::Array<int>& mapping):
+   d_my_rank(-1),
+   d_nodes(-1),
+   d_local_id_count(-1)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   d_my_rank = mpi.getRank();
+   d_nodes = mpi.getSize();
+   setProcessorMapping(mapping);
+}
+
+void ProcessorMapping::setMappingSize(
+   const int n)
+{
+   d_mapping.resizeArray(n);
+
+   for (int i = 0; i < n; i++) {
+      d_mapping[i] = 0;
+   }
+   d_local_id_count = -1;
+}
+
+void ProcessorMapping::setProcessorMapping(
+   const tbox::Array<int>& mapping)
+{
+   d_mapping.resizeArray(mapping.getSize());
+
+   for (int i = 0; i < d_mapping.getSize(); i++) {
+      //  (mapping[i] % d_nodes) keeps patches from being assigned
+      //  non-existent processors.
+      setProcessorAssignment(i, mapping[i] % d_nodes);
+   }
+   d_local_id_count = -1;
+}
+
+int ProcessorMapping::getNumberOfLocalIndices() const
+{
+   computeLocalIndices();
+   return d_local_id_count;
+}
+
+const tbox::Array<int>& ProcessorMapping::getLocalIndices() const
+{
+   computeLocalIndices();
+   return d_local_indices;
+}
+
+void ProcessorMapping::computeLocalIndices() const
+{
+   if (d_local_id_count != -1) {
+      return;
+   }
+
+   /*
+    * first, count the number of local indices,
+    * so we can set the array size.
+    */
+   const int n = d_mapping.getSize();
+   d_local_id_count = 0;
+
+   for (int i = 0; i < n; i++) {
+      if (d_mapping[i] == d_my_rank) {
+         ++d_local_id_count;
+      }
+   }
+
+   /*
+    * second, resize the array and fill in the data
+    */
+   d_local_indices.resizeArray(d_local_id_count);
+   int idx = 0;
+   for (int i = 0; i < n; i++) {
+      if (d_mapping[i] == d_my_rank) {
+         d_local_indices[idx++] = i;
+      }
+   }
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/ProcessorMapping.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/ProcessorMapping.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,71 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   tbox 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+ProcessorMapping::~ProcessorMapping()
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+void ProcessorMapping::setNumberNodes(
+   const int n)
+{
+   d_nodes = n;
+}
+
+SAMRAI_INLINE_KEYWORD
+int ProcessorMapping::getProcessorAssignment(
+   const int i) const
+{
+   TBOX_ASSERT((i >= 0) && (i < d_mapping.getSize()));
+
+   return d_mapping[i];
+}
+
+SAMRAI_INLINE_KEYWORD
+void ProcessorMapping::setProcessorAssignment(
+   const int i,
+   const int p)
+{
+   TBOX_ASSERT((i >= 0) && (i < d_mapping.getSize()));
+   TBOX_ASSERT((p >= 0) && (p < d_nodes));
+
+   d_mapping[i] = p % d_nodes;
+}
+
+SAMRAI_INLINE_KEYWORD
+tbox::Array<int> ProcessorMapping::getProcessorMapping() const
+{
+   return d_mapping;
+}
+
+SAMRAI_INLINE_KEYWORD
+int ProcessorMapping::getSizeOfMappingArray() const
+{
+   return d_mapping.getSize();
+}
+
+SAMRAI_INLINE_KEYWORD
+bool ProcessorMapping::isMappingLocal(
+   const int i) const
+{
+
+   TBOX_ASSERT((i >= 0) && (i < d_mapping.getSize()));
+
+   return d_mapping[i] == d_my_rank;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/ProcessorMapping.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/ProcessorMapping.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,168 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   tbox 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_ProcessorMapping
+#define included_hier_ProcessorMapping
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/Array.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/**
+ * Class ProcessorMapping represents the processor assignments of
+ * patches to processors.  It makes sure that all processor assignments
+ * are in the range from 0 through NODES-1 and answers whether a particular
+ * assignment is local to the processor.
+ */
+
+class ProcessorMapping
+{
+public:
+   /**
+    * Create a default processor mapping array with 0 elements.  Before
+    * the mapping can be used, its size should be set using the function
+    * setMappingSize() and each element of the mapping should be set
+    * by setProcessorAssignment().
+    */
+   ProcessorMapping();
+
+   /**
+    * Create a processor mapping array with enough space for n elements.
+    * All elements of the mapping are initialized to processor zero, but
+    * they should be set by setProcessorAssignment() later.
+    */
+   explicit ProcessorMapping(
+      const int n);
+
+   /**
+    * Create a new processor mapping and copy the processor assignments
+    * from the argument.
+    */
+   ProcessorMapping(
+      const ProcessorMapping& mapping);
+
+   /**
+    * Create a new processor mapping and get processor assignments
+    * from the the tbox::Array<int> argument.
+    */
+   explicit ProcessorMapping(
+      const tbox::Array<int>& mapping);
+
+   /**
+    * The destructor simply releases the storage for the mapping.
+    */
+   ~ProcessorMapping();
+
+   /**
+    * Resize the mapping so that it has n elements.  Before it can be
+    * used, each element should be set using setProcessorAssignment().
+    */
+   void
+   setMappingSize(
+      const int n);
+
+   /**
+    * Sets the number of mapped_boxes to n.
+    * IMPORTANT NOTE: This method should only be used for
+    * testing purposes.  Under normal circumstances, the number of
+    * mapped_boxes is set by a call to tbox::SAMRAI_MPI::getNodes() and should NOT
+    * be changed.
+    */
+   void
+   setNumberNodes(
+      const int n);
+
+   /**
+    * Return the processor assignment for the specified patch index.
+    */
+   int
+   getProcessorAssignment(
+      const int i) const;
+
+   /**
+    * Set the processor assignment (second argument) for the specified
+    * patch index (first argument).
+    */
+   void
+   setProcessorAssignment(
+      const int i,
+      const int p);
+
+   /**
+    * Return an tbox::Array<int> of the processor mappings.
+    */
+   tbox::Array<int>
+   getProcessorMapping() const;
+
+   /**
+    * Sets the processor mappings from an tbox::Array<int>.  Remaps the
+    * processors so that patches are not accidentally mapped to
+    * non-existent mapped_boxes.
+    */
+   void
+   setProcessorMapping(
+      const tbox::Array<int>& mapping);
+
+   /**
+    * Return the number of local indices (that is, those indices mapped to
+    * the local processor).
+    */
+   int
+   getNumberOfLocalIndices() const;
+
+   /**
+    * Return an array containing the local indices (that is,
+    * those indices mapped to the local processor).
+    */
+   const tbox::Array<int>&
+   getLocalIndices() const;
+
+   /**
+    * Return the total number of indices in the mapping array.
+    */
+   int
+   getSizeOfMappingArray() const;
+
+   /**
+    * Check whether the specified index is a local index (that is, mapped
+    * to the local processor).
+    */
+   bool
+   isMappingLocal(
+      const int i) const;
+
+private:
+   /**
+    * Fills in the array d_local_indices, and sets d_local_id_count.
+    */
+   void
+   computeLocalIndices() const;
+
+   void
+   operator = (
+      const ProcessorMapping&);                 // not implemented
+
+   int d_my_rank;
+   int d_nodes;
+   tbox::Array<int> d_mapping;
+   mutable int d_local_id_count;
+   mutable tbox::Array<int> d_local_indices;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/ProcessorMapping.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/RealMappedBoxConstIterator.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/RealMappedBoxConstIterator.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,102 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Iterator over real MappedBoxes in a MappedBoxSet. 
+ *
+ ************************************************************************/
+#ifndef included_hier_RealMappedBoxConstIterator_C
+#define included_hier_RealMappedBoxConstIterator_C
+
+#include "SAMRAI/hier/RealMappedBoxConstIterator.h"
+
+namespace SAMRAI {
+namespace hier {
+
+RealMappedBoxConstIterator::RealMappedBoxConstIterator(
+   const MappedBoxSet& mapped_boxes):
+   d_mapped_boxes(&mapped_boxes)
+{
+   d_ni = d_mapped_boxes->begin();
+   while (d_ni != d_mapped_boxes->end() && d_ni->isPeriodicImage()) {
+      ++d_ni;
+   }
+}
+
+RealMappedBoxConstIterator::~RealMappedBoxConstIterator()
+{
+   d_mapped_boxes = NULL;
+}
+
+bool RealMappedBoxConstIterator::isValid() const
+{
+   return d_mapped_boxes != NULL &&
+          d_ni != d_mapped_boxes->end() &&
+          !d_ni->isPeriodicImage();
+}
+
+RealMappedBoxConstIterator& RealMappedBoxConstIterator::operator = (
+   const RealMappedBoxConstIterator& r)
+{
+   d_mapped_boxes = r.d_mapped_boxes;
+   d_ni = r.d_ni;
+   return *this;
+}
+
+const MappedBox& RealMappedBoxConstIterator::operator * () const
+{
+   return *d_ni;
+}
+
+const MappedBox *RealMappedBoxConstIterator::operator -> () const
+{
+   return &(*d_ni);
+}
+
+bool RealMappedBoxConstIterator::operator == (
+   const RealMappedBoxConstIterator& r) const
+{
+   return d_mapped_boxes == r.d_mapped_boxes && d_ni == r.d_ni;
+}
+
+bool RealMappedBoxConstIterator::operator != (
+   const RealMappedBoxConstIterator& r) const
+{
+   return d_mapped_boxes != r.d_mapped_boxes || d_ni != r.d_ni;
+}
+
+/*
+ ****************************************************************************
+ * Pre-increment operator.
+ ****************************************************************************
+ */
+
+RealMappedBoxConstIterator RealMappedBoxConstIterator::operator ++ ()
+{
+   do {
+      ++d_ni;
+   } while (d_ni != d_mapped_boxes->end() && d_ni->isPeriodicImage());
+   return *this;
+}
+
+/*
+ ****************************************************************************
+ * Post-increment operator.
+ ****************************************************************************
+ */
+
+RealMappedBoxConstIterator RealMappedBoxConstIterator::operator ++ (
+   int)
+{
+   RealMappedBoxConstIterator saved = *this;
+   do {
+      ++d_ni;
+   } while (d_ni != d_mapped_boxes->end() && d_ni->isPeriodicImage());
+   return saved;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/RealMappedBoxConstIterator.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/RealMappedBoxConstIterator.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,140 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Iterator over real MappedBoxes in a MappedBoxSet. 
+ *
+ ************************************************************************/
+#ifndef included_hier_RealMappedBoxConstIterator
+#define included_hier_RealMappedBoxConstIterator
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/MappedBoxSet.h"
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+ * TODO: Do we really need a separate class for this?  Couldn't we just
+ *       add an argument to the MappedBoxSet iterator construction that
+ *       (e.g., an enum with values: All (default value), RealOnly, 
+ *       PeriodicImagesOnly, etc.  and extend for Multiblock stuff)?
+ *       Then, which boxes in the set are selected for iteration would be 
+ *       controlled internally.
+ */
+/*!
+ * @brief Iterator through real MappedBoxes (not periodic images) in a
+ * const MappedBoxSet.
+ *
+ * RealMappedBoxConstIterator is an iterator that provides methods for
+ * stepping through a MappedBoxSet, skipping periodic images.
+ *
+ * Example usage:
+ * @verbatim
+ *  MappedBoxSet mapped_boxes;
+ *  // fill in mapped_boxes
+ *  for ( RealMappedBoxConstIterator ni(mapped_boxes); ni.isValid(); ++ni ) {
+ *    TBOX_ASSERT( ! ni->isPeriodicImage() );
+ *  }
+ * @endverbatim
+ */
+class RealMappedBoxConstIterator
+{
+
+public:
+
+   /*!
+    * @brief Construct the iterator for the given MappedBoxSet.
+    *
+    * The iterator will iterate through the items in mapped_boxes.
+    *
+    * @param[in] mapped_boxes
+    */
+   explicit RealMappedBoxConstIterator(
+      const MappedBoxSet& mapped_boxes);
+
+   /*!
+    * @brief Destructor.
+    */
+   virtual ~RealMappedBoxConstIterator(
+      void);
+
+   /*!
+    * @brief Assignment operator.
+    */
+   RealMappedBoxConstIterator&
+   operator = (
+      const RealMappedBoxConstIterator& r);
+
+   /*!
+    * @brief Dereference operator mimicking a pointer dereference.
+    */
+   const MappedBox&
+   operator * () const;
+
+   /*!
+    * @brief Dereference operator mimicking a pointer dereference.
+    */
+   const MappedBox *
+   operator -> () const;
+
+   /*!
+    * @brief Equality comparison.
+    */
+   bool
+   operator == (
+      const RealMappedBoxConstIterator& r) const;
+
+   /*!
+    * @brief Inequality comparison.
+    */
+   bool
+   operator != (
+      const RealMappedBoxConstIterator& r) const;
+
+   /*!
+    * @brief Pre-increment iterator.
+    *
+    * Post-increment increment the iterator and returns the incremented
+    * state.
+    */
+   RealMappedBoxConstIterator
+   operator ++ ();
+
+   /*!
+    * @brief Post-increment iterator.
+    *
+    * Post-increment saves the iterator, increment it and returns the
+    * saved iterator.
+    */
+   RealMappedBoxConstIterator
+   operator ++ (
+      int);
+
+   /*!
+    * @brief Whether the iterator can be dereferenced.  When the
+    * iterator reaches its end, this returns false.
+    */
+   bool
+   isValid() const;
+
+private:
+   /*!
+    * @brief MappedBoxSet being iterated through.
+    */
+   const MappedBoxSet* d_mapped_boxes;
+
+   /*!
+    * @brief The iterator.
+    */
+   MappedBoxSet::const_iterator d_ni;
+
+};
+
+}
+}
+
+#endif  // included_hier_RealMappedBoxConstIterator
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/Variable.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/Variable.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,51 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Base class for application-level variables 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_Variable_C
+#define included_hier_Variable_C
+
+#include "SAMRAI/hier/Variable.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/Variable.I"
+#endif
+namespace SAMRAI {
+namespace hier {
+
+int Variable::s_instance_counter = 0;
+
+/*
+ *************************************************************************
+ *									*
+ * The constructor copies the name of the variable, obtains a unique	*
+ * instance number, and increments the number of global instances.	*
+ * The destructor releases the name storage but does not decrease the	*
+ * instance count, since instance numbers are never recycled.		*
+ *									*
+ *************************************************************************
+ */
+
+Variable::Variable(
+   const std::string& name,
+   const tbox::Pointer<PatchDataFactory> factory):
+   d_dim(factory->getDim()),
+   d_name(name),
+   d_factory(factory)
+{
+   d_instance = s_instance_counter++;
+}
+
+Variable::~Variable()
+{
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/Variable.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/Variable.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,56 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Base class for application-level variables 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+int Variable::getCurrentMaximumInstanceNumber()
+{
+   return s_instance_counter;
+}
+
+SAMRAI_INLINE_KEYWORD
+int Variable::getInstanceIdentifier() const
+{
+   return d_instance;
+}
+
+SAMRAI_INLINE_KEYWORD
+const std::string& Variable::getName() const
+{
+   return d_name;
+}
+
+SAMRAI_INLINE_KEYWORD
+void Variable::setPatchDataFactory(
+   tbox::Pointer<PatchDataFactory> factory)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *factory);
+   d_factory = factory;
+}
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<PatchDataFactory>
+Variable::getPatchDataFactory() const
+{
+   return d_factory;
+}
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Dimension& Variable::getDim() const
+{
+   return d_dim;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/Variable.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/Variable.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,168 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Base class for application-level variables 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_Variable
+#define included_hier_Variable
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/PatchDataFactory.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace hier {
+
+/**
+ * Class Variable provides a description of a variable quantity in
+ * an AMR application.  A variable has the following attributes: (1) a name,
+ * (2) a unique instance number, and (3) a way to create the proper type of
+ * storage on the patches in an AMR hierarchy.
+ *
+ * Variable is a base class for all variables; subclasses for each data type
+ * (e.g., cell-centered variables or node-centered variables) will define
+ * member functions to create the appropriate storage management classes.
+ * Note that a variable object is distinct from the storage for the quantity
+ * to which the variable refers.
+ *
+ * The user defines a set of variables and the role they play in the solution
+ * algorithm when describing an AMR application.  Each variable type knows
+ * how to create instances of the associated data objects on patches in an
+ * AMR patch hierarchy via the getPatchDataFactory() member function.  For
+ * example, we might have a concrete  myVariable3<double> object that is
+ * derived from Variable3.  The myVariable3<double> object returns a
+ * myVariableFactory3<double> object from its member function
+ * getPatchDataFactory(), and this factory is used to create the
+ * myVariable3<double> objects on the patches.  Thus, a solution algorithm
+ * may be implemented to manage storage of variable quantities through the
+ * abstract interface without knowing the specific concrete variable types
+ * in use.  This approach gives maximum flexibility when defining new user
+ * data types and variables and solution algorithms.
+ *
+ * Each variable is assigned an ``instance number,'' a unique integer
+ * identifier numbered from 0 through MAX-1, where MAX is the value
+ * returned by static function getCurrentMaximumInstanceNumber().
+ * These identifiers can be used to rapidly look up variable instances
+ * in a table.  For example, the instance number can be used to map
+ * variables to algorithmic data within an algorithm as alluded to above..
+ *
+ * Variable types for which data exists on the borders of patches (such as node,
+ * side, etc.), the data will thus live on the interface between coarse and fine
+ * patch levels.  Thus, it must be specified whether coarse or fine data values
+ * take precedence on the interface between levels.  This information is provided
+ * by the fineBoundaryRepresentsVariable() function.  Each concrete variable subclass
+ * defines the behavior of this function.
+ *
+ * @see hier::PatchDataFactory
+ */
+
+class Variable:public tbox::DescribedClass
+{
+public:
+   /**
+    * Return the current maximum instance number over all variable objects.
+    * The instance identifier returned from each variable objhect is
+    * guaranteed to be between 0 and this number minus one.  Note that this
+    * number changes as new variable instances are created.
+    */
+   static int
+   getCurrentMaximumInstanceNumber();
+
+   /**
+    * Create a variable object with the specified name and patch data
+    * factory.  On creation, each variable is assigned a unique instance
+    * identifier.
+    */
+   explicit Variable(
+      const std::string& name,
+      const tbox::Pointer<PatchDataFactory> factory);
+
+   /**
+    * Virtual destructor for variable objects.
+    */
+   virtual ~Variable();
+
+   /**
+    * Return the instance identifier for this particular variable object.
+    * The instance identifiers are unique integers numbered starting from zero.
+    */
+   int
+   getInstanceIdentifier() const;
+
+   /**
+    * Return the name assigned to this variable.
+    */
+   const std::string&
+   getName() const;
+
+   /**
+    * Return true if the fine data values represent the variable quantity
+    * on coarse-fine interfaces if variable data lives on patch borders;
+    * false otherwise.  The boolean return value is supplied by the concrete
+    * variable subclass.
+    */
+   virtual bool
+   fineBoundaryRepresentsVariable() const = 0;
+
+   /**
+    * Return true if the variable data lives on patch borders; false otherwise.
+    * The boolean return value is supplied by the concrete variable subclass.
+    */
+   virtual bool
+   dataLivesOnPatchBorder() const = 0;
+
+   /**
+    * Set the patch data factory object.  Normally, the factory is set in
+    * the constructor, but this member function enables the factory to be
+    * changed later in the lifetime of the variable.
+    */
+   void
+   setPatchDataFactory(
+      tbox::Pointer<PatchDataFactory> factory);
+
+   /**
+    * Return a non-const pointer to a patch data factory that will be used
+    * to instantiate instances of this variable on the patches.  The factory
+    * returned will have been set by the variable subclasses.
+    */
+   tbox::Pointer<PatchDataFactory>
+   getPatchDataFactory() const;
+
+   /**
+    * Return the dimension of this object.
+    */
+   const tbox::Dimension&
+   getDim() const;
+
+private:
+   Variable(
+      const Variable&);         // not implemented
+   void
+   operator = (
+      const Variable&);                 // not implemented
+
+   const tbox::Dimension d_dim;
+
+   std::string d_name;
+   int d_instance;
+   tbox::Pointer<PatchDataFactory> d_factory;
+
+   static int s_instance_counter;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/Variable.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/VariableContext.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/VariableContext.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,53 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Simple integer id and namestring variable context 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_VariableContext_C
+#define included_hier_VariableContext_C
+
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/VariableContext.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+int VariableContext::s_instance_counter = 0;
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The constructor copies the name of the variable context, obtains      *
+ * a unique instance number, and increments the number of global         *
+ * instances.  The destructor releases the name storage but does not     *
+ * decrease the instance count; instance numbers are not recycled.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+VariableContext::VariableContext(
+   const std::string& name)
+{
+   TBOX_ASSERT(!name.empty());
+
+   d_index = s_instance_counter++;
+   d_name = name;
+}
+
+VariableContext::~VariableContext()
+{
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/VariableContext.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/VariableContext.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,40 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Simple integer id and namestring variable context 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace hier {
+
+SAMRAI_INLINE_KEYWORD
+int VariableContext::getCurrentMaximumInstanceNumber()
+{
+   return s_instance_counter;
+}
+
+SAMRAI_INLINE_KEYWORD
+int VariableContext::getIndex() const
+{
+   return d_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+const std::string& VariableContext::getName() const
+{
+   return d_name;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool VariableContext::operator == (
+   const VariableContext& other) const
+{
+   return d_index == other.d_index;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/VariableContext.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/VariableContext.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,122 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Simple integer id and namestring variable context 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_VariableContext
+#define included_hier_VariableContext
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace hier {
+
+/**
+ * Class VariableContext is a simple class that is used to manage
+ * variable storage in a meaningful, customizable manner.  A variable
+ * context has a name std::string and a unique integer instance identifier.
+ * Context objects are typically generated and used by the variable database
+ * for mapping names to storage locations, but they may also be created
+ * independently of the variable database.
+ *
+ * SAMRAI applications use contexts and the variable database to manage
+ * patch storage locations for variables.  For example, an integration
+ * algorithm may require multiple unique contexts to manage storage
+ * for a problem variable, such as "OLD" and "NEW".  The algorithm
+ * interacts with the database to obtain the contexts and the mapping
+ * between the context and the patch descriptor index to access data on the
+ * patch hierarchy.
+ *
+ * \verbatim
+ * Important note:
+ *
+ *    It is strongly recommended that context objects be generated by
+ *    the variable database and obtained via the getContext() function.
+ *    While contexts can be created by using the variable context
+ *    constructor directly and used with the database, this may produce
+ *    unexpected results due to potentially improperly generated and name
+ *    std::string context identifiers.
+ *
+ * \endverbatim
+ *
+ * @see hier::VariableDatabase
+ */
+
+class VariableContext:public tbox::DescribedClass
+{
+public:
+   /**
+    * Return the current maximum instance number over all variable
+    * context objects.  The instance identifiers returned from variable
+    * context objects are guaranteed to be between 0 and this number minus
+    * one.  Note that this number changes as new variable contexts are created.
+    */
+   static int
+   getCurrentMaximumInstanceNumber();
+
+   /**
+    * The variable context constructor creates a context with the given
+    * name and increments the context index counter.
+    *
+    * When assertion checking is active, an unrecoverable assertion results
+    * when the name std::string is empty.
+    */
+   explicit VariableContext(
+      const std::string& name);
+
+   /**
+    * The virtual destructor does nothing interesting.
+    */
+   virtual ~VariableContext();
+
+   /**
+    * Return integer index for VariableContext object.
+    */
+   int
+   getIndex() const;
+
+   /**
+    * Return name std::string identifier for VariableContext object.
+    */
+   const std::string&
+   getName() const;
+
+   /**
+    * Check whether two contexts are the same.  Return true if the
+    * index of the argument context matches the index of this context object.
+    * Otherwise, return false.
+    */
+   bool
+   operator == (
+      const VariableContext& other) const;
+
+private:
+   VariableContext(
+      const VariableContext&);                // not implemented
+   void
+   operator = (
+      const VariableContext&);                     // not implemented
+
+   static int s_instance_counter;
+
+   std::string d_name;
+   int d_index;
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/VariableContext.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/VariableDatabase.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/VariableDatabase.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1116 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Manager class for variables used in a SAMRAI application. 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_VariableDatabase_C
+#define included_hier_VariableDatabase_C
+
+#include "SAMRAI/hier/VariableDatabase.h"
+
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/hier/VariableDatabase.I"
+#endif
+
+namespace SAMRAI {
+namespace hier {
+
+#ifndef NULL
+#defined NULL(0)
+#endif
+
+VariableDatabase *
+VariableDatabase::s_variable_database_instance = NULL;
+
+int VariableDatabase::s_context_array_alloc_size = 10;
+int VariableDatabase::s_variable_array_alloc_size = 100;
+int VariableDatabase::s_descriptor_array_alloc_size = 200;
+
+tbox::StartupShutdownManager::Handler
+VariableDatabase::s_shutdown_handler(
+   0,
+   0,
+   VariableDatabase::shutdownCallback,
+   0,
+   tbox::StartupShutdownManager::priorityVariableDatabase);
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Static database member functions.                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+VariableDatabase *VariableDatabase::getDatabase()
+{
+   if (!s_variable_database_instance) {
+      s_variable_database_instance = new VariableDatabase();
+   }
+   return s_variable_database_instance;
+}
+
+void VariableDatabase::shutdownCallback()
+{
+   if (s_variable_database_instance) {
+      delete s_variable_database_instance;
+   }
+   s_variable_database_instance = ((VariableDatabase *)NULL);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Protected VariableDatabase constructor, destructor, and function to   *
+ * register Singleton subclass instance for inheritance.                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+VariableDatabase::VariableDatabase()
+{
+   d_patch_descriptor = new hier::PatchDescriptor();
+
+   d_max_variable_id = idUndefined();
+   d_max_context_id = idUndefined();
+   d_max_descriptor_id = idUndefined();
+   d_num_registered_patch_data_ids = 0;
+
+   d_internal_SAMRAI_context = getContext("Internal_SAMRAI_Variable");
+
+}
+
+VariableDatabase::~VariableDatabase()
+{
+}
+
+void VariableDatabase::registerSingletonSubclassInstance(
+   VariableDatabase* subclass_instance)
+{
+   if (!s_variable_database_instance) {
+      s_variable_database_instance = subclass_instance;
+   } else {
+      TBOX_ERROR("hier::VariableDatabase internal error...\n"
+         << "Attemptng to set Singleton instance to subclass instance,"
+         << "\n but Singleton instance already set." << std::endl);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return the context in the database with the given name, or add a      *
+ * context to the database with that name if no such context exists.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::VariableContext>
+VariableDatabase::getContext(
+   const std::string& name)
+{
+   tbox::Pointer<hier::VariableContext> context(NULL);
+
+   if (!name.empty()) {
+
+      int ctxt_id = getContextId_Private(name);
+
+      if (ctxt_id == idUndefined()) {
+         context = new hier::VariableContext(name);
+         addContext_Private(context);
+      } else {
+         context = d_contexts[ctxt_id];
+      }
+
+   }
+
+   return context;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true if context with given name exists in database;            *
+ * otherwise return false.                                               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool VariableDatabase::checkContextExists(
+   const std::string& name) const
+{
+   int ctxt_id = getContextId_Private(name);
+
+   return ctxt_id != idUndefined();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Add user-defined variable to database if it doesn't already exist in  *
+ * the database.                                                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VariableDatabase::addVariable(
+   const tbox::Pointer<hier::Variable> variable)
+{
+   TBOX_ASSERT(!variable.isNull());
+
+   const bool user_variable = true;
+   bool variable_added = addVariable_Private(variable, user_variable);
+
+   if (!variable_added) {
+      TBOX_ERROR("hier::VariableDatabase::addVariable() error...\n"
+         << "Attempt to add variable with duplicate name " << variable->getName()
+         << " to database is not allowed.\n"
+         << "Another variable with this name already exists in database."
+         << std::endl);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return variable in database with given name.  If no such variable     *
+ * resides in database, return a null pointer.                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::Variable>
+VariableDatabase::getVariable(
+   const std::string& name) const
+{
+   tbox::Pointer<hier::Variable> variable(NULL);
+
+   int var_id = getVariableId(name);
+
+   if (var_id != idUndefined()) {
+      variable = d_variables[var_id];
+   }
+
+   return variable;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true if variable with given name exists in database.           *
+ * Otherwise, return false.                                              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool VariableDatabase::checkVariableExists(
+   const std::string& name) const
+{
+   int var_id = getVariableId(name);
+
+   return var_id != idUndefined();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create new patch data index index by cloning factory for variable     *
+ * at the old index and return index of new factory.   Note that the     *
+ * function checkVariablePatchDataIndex() checks type of variable        *
+ * against given patch data index.   If these types match, then add      *
+ * variable and new patch data index to database.  If the types do not   *
+ * match, the program will abort with an error message in the private    *
+ * routine checkVariablePatchDataIndex().                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int VariableDatabase::registerClonedPatchDataIndex(
+   const tbox::Pointer<hier::Variable> variable,
+   int old_id)
+{
+   TBOX_ASSERT(!variable.isNull());
+
+   int new_id = idUndefined();
+
+   if (checkVariablePatchDataIndex(variable, old_id)) {
+
+      std::string old_name = d_patch_descriptor->mapIndexToName(old_id);
+      std::string old_id_string(tbox::Utilities::intToString(old_id, 4));
+
+      std::string new_name;
+      if (old_name.find("-clone_of_id=") == std::string::npos) {
+         new_name = old_name + "-clone_of_id=" + old_id_string;
+      } else {
+         std::string::size_type last_dash = old_name.rfind("=");
+         new_name = old_name.substr(0, last_dash + 1) + old_id_string;
+      }
+
+      new_id = d_patch_descriptor->definePatchDataComponent(
+            new_name,
+            d_patch_descriptor->getPatchDataFactory(old_id)->
+            cloneFactory(d_patch_descriptor->getPatchDataFactory(old_id)->
+               getGhostCellWidth()));
+
+      const bool user_variable = true;
+      addVariablePatchDataIndexPairToDatabase_Private(variable,
+         new_id,
+         user_variable);
+
+   } else {
+
+      TBOX_ERROR("hier::VariableDatabase::registerClonedPatchDataIndex()"
+         << "  error...\n"
+         << "Variable with name " << variable->getName()
+         << "\n does not match type at descriptor index = " << old_id
+         << "\n That type is " << typeid(
+            *(d_patch_descriptor->getPatchDataFactory(old_id))).name()
+         << std::endl);
+   }
+
+   return new_id;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Add patch data index and variable pair to the database.  Note         *
+ * that the function checkVariablePatchDataIndex() checks type of        *
+ * variable against given patch data index.  If the types do not match,  *
+ * the program will abort with an error message in the private routine   *
+ * checkVariablePatchDataIndex().   If the input index is undefined,     *
+ * we clone the default variable factory and add this new index to the   *
+ * database.  In any case, the index of the index-variable pair that     *
+ * is added to the database is returned.                                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int VariableDatabase::registerPatchDataIndex(
+   const tbox::Pointer<hier::Variable> variable,
+   int data_id)
+{
+   TBOX_ASSERT(!variable.isNull());
+
+   int new_id = data_id;
+
+   if (new_id == idUndefined()) {
+
+      new_id = d_patch_descriptor->definePatchDataComponent(
+            variable->getName(),
+            variable->getPatchDataFactory()->cloneFactory(variable->
+               getPatchDataFactory()->getGhostCellWidth()));
+
+      const bool user_variable = true;
+      addVariablePatchDataIndexPairToDatabase_Private(variable,
+         new_id,
+         user_variable);
+
+   } else {
+
+      if (checkVariablePatchDataIndex(variable, new_id)) {
+
+         const bool user_variable = true;
+         addVariablePatchDataIndexPairToDatabase_Private(variable,
+            new_id,
+            user_variable);
+
+      } else {
+
+         TBOX_ERROR("hier::VariableDatabase::registerPatchDataIndex()"
+            << "  error...\n"
+            << "Variable with name " << variable->getName()
+            << "\n does not match type at patch data index = " << new_id
+            << "\n That type is " << typeid(
+               *(d_patch_descriptor->getPatchDataFactory(data_id))).name()
+            << std::endl);
+
+      }
+
+   }
+
+   return new_id;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Remove the given patch data index from the database.  Also, clear     *
+ * the index from the patch descriptor if the index is in the database.  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VariableDatabase::removePatchDataIndex(
+   int data_id)
+{
+
+   if ((data_id >= 0) && (data_id <= d_max_descriptor_id)) {
+
+      tbox::Pointer<hier::Variable> variable =
+         d_index2variable_map[data_id];
+
+      if (!variable.isNull()) {
+
+         tbox::Array<int>& indx_array =
+            d_variable_context2index_map[variable->getInstanceIdentifier()];
+         int array_size = indx_array.getSize();
+         for (int i = 0; i < array_size; i++) {
+            if (indx_array[i] == data_id) {
+               indx_array[i] = idUndefined();
+               break;
+            }
+         }
+
+         d_patch_descriptor->removePatchDataComponent(data_id);
+
+         if (!d_index2variable_map[data_id].isNull()) {
+            d_num_registered_patch_data_ids--;
+         }
+
+         d_index2variable_map[data_id].setNull();
+         if (data_id == d_max_descriptor_id) {
+            for (int id = d_max_descriptor_id; id >= 0; id--) {
+               if (d_index2variable_map[id].isNull()) {
+                  d_max_descriptor_id--;
+               } else {
+                  break;
+               }
+            }
+         }
+
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true if the given variable is mapped to the given patch data   *
+ * index.  Otherwise, return false.                                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool VariableDatabase::checkVariablePatchDataIndex(
+   const tbox::Pointer<hier::Variable> variable,
+   int data_id) const
+{
+   TBOX_ASSERT(!variable.isNull());
+   TBOX_ASSERT(data_id >= 0 &&
+      data_id < d_patch_descriptor->getMaxNumberRegisteredComponents());
+
+   bool ret_value = false;
+
+   tbox::Pointer<hier::Variable> test_variable;
+
+   if ((data_id >= 0) && (data_id <= d_max_descriptor_id)) {
+      test_variable = d_index2variable_map[data_id];
+   }
+
+   if (!test_variable.isNull()) {
+
+      ret_value = (variable.getPointer() == test_variable.getPointer());
+
+   }
+
+   return ret_value;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true if the type of the variable matches the type of the       *
+ * patch data at the given patch data index.  Otherwise, return false.   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool VariableDatabase::checkVariablePatchDataIndexType(
+   const tbox::Pointer<hier::Variable> variable,
+   int data_id) const
+{
+   TBOX_ASSERT(!variable.isNull());
+   TBOX_ASSERT(data_id >= 0 &&
+      data_id < d_patch_descriptor->getMaxNumberRegisteredComponents());
+
+   bool ret_value = false;
+
+   if (!(d_patch_descriptor->getPatchDataFactory(data_id).isNull())) {
+
+      tbox::Pointer<hier::PatchDataFactory> dfact =
+         d_patch_descriptor->getPatchDataFactory(data_id);
+
+      if (!dfact.isNull() &&
+          (typeid(*(variable->getPatchDataFactory())) == typeid(*dfact))) {
+         ret_value = true;
+      }
+
+   }
+
+   return ret_value;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register variable-context pair with the database and return           *
+ * patch daya index corresponding to this pair and given ghost width.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int VariableDatabase::registerVariableAndContext(
+   const tbox::Pointer<hier::Variable> variable,
+   const tbox::Pointer<hier::VariableContext> context,
+   const hier::IntVector& ghosts)
+{
+   TBOX_ASSERT(!variable.isNull());
+   TBOX_ASSERT(!context.isNull());
+   TBOX_ASSERT(ghosts.min() >= 0);
+
+   bool user_variable = true;
+   return registerVariableAndContext_Private(variable,
+      context,
+      ghosts,
+      user_variable);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return patch data index that is mapped to given variable-context      *
+ * pair.  If variable-context pair does not exist in database, return    *
+ * an undefined patch data index of idUndefined().                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int VariableDatabase::mapVariableAndContextToIndex(
+   const tbox::Pointer<hier::Variable> variable,
+   const tbox::Pointer<hier::VariableContext> context) const
+{
+   TBOX_ASSERT(!(variable.isNull()));
+   TBOX_ASSERT(!(context.isNull()));
+
+   int index = idUndefined();
+
+   int var_id = variable->getInstanceIdentifier();
+   int ctxt_id = context->getIndex();
+
+   if ((var_id <= d_max_variable_id) &&
+       (ctxt_id < d_variable_context2index_map[var_id].getSize())) {
+
+      index = d_variable_context2index_map[var_id][ctxt_id];
+
+   }
+
+   return index;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true if given patch data index is mapped to some variable      *
+ * in the database and set the variable pointer to that variable.        *
+ * Otherwise, return false and set the variable pointer to null.         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool VariableDatabase::mapIndexToVariable(
+   const int index,
+   tbox::Pointer<hier::Variable>& variable) const
+{
+   variable.setNull();
+
+   if ((index >= 0) && (index <= d_max_descriptor_id)) {
+      variable = d_index2variable_map[index];
+   }
+
+   return !variable.isNull();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true if specified index is mapped to some variable-context     *
+ * pair in the database and set the variable and context pointers        *
+ * appropriately.  Otherwise, return false and set the pointers to null. *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool VariableDatabase::mapIndexToVariableAndContext(
+   const int index,
+   tbox::Pointer<hier::Variable>& variable,
+   tbox::Pointer<hier::VariableContext>& context) const
+{
+   bool found = false;
+
+   variable.setNull();
+   context.setNull();
+
+   if ((index >= 0) && (index <= d_max_descriptor_id)) {
+
+      variable = d_index2variable_map[index];
+
+      if (!variable.isNull()) {
+
+         const tbox::Array<int>& var_indx_array =
+            d_variable_context2index_map[variable->getInstanceIdentifier()];
+         int arr_size = var_indx_array.getSize();
+         for (int i = 0; i < arr_size; i++) {
+            if (var_indx_array[i] == index) {
+               found = true;
+               context = d_contexts[i];
+               break;
+            }
+         }
+
+      }
+
+   }
+
+   return found;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print all context, variable, and patch data index data                *
+ * contained in database to given output stream.                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VariableDatabase::printClassData(
+   std::ostream& os,
+   bool print_only_user_defined_variables) const
+{
+   int i;
+   os << "\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
+      << "\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
+      << std::endl;
+   os << "Printing hier::VariableDatabase information...";
+   os << "\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
+      << std::endl;
+   os << "Variable Contexts registered with database:";
+   for (i = 0; i <= d_max_context_id; i++) {
+      os << "\nContext id = " << i;
+      if (!d_contexts[i].isNull()) {
+         os << " : Context name = " << d_contexts[i]->getName();
+      } else {
+         os << " : NOT IN DATABASE";
+      }
+   }
+   os << "\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
+      << std::endl << std::flush;
+   os << "Variables registered with database:";
+   for (i = 0; i <= d_max_variable_id; i++) {
+      os << "\nVariable instance = " << i;
+      if (!d_variables[i].isNull()) {
+         os << "\n";
+         if (!print_only_user_defined_variables ||
+             (print_only_user_defined_variables &&
+              d_is_user_variable[i])) {
+            os << "   Variable name = " << d_variables[i]->getName();
+            os << "\n   Variable type = " << typeid(*(d_variables[i])).name();
+         } else {
+            os << "   internal SAMRAI variable";
+         }
+      } else {
+         os << " : NOT IN DATABASE";
+      }
+   }
+   os << "\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
+      << std::endl << std::flush;
+   os << "Variable-Context pairs mapping to Patch Data Indices in database:";
+   for (i = 0; i <= d_max_variable_id; i++) {
+      if (!d_variables[i].isNull()) {
+         if (!print_only_user_defined_variables ||
+             (print_only_user_defined_variables &&
+              d_is_user_variable[i])) {
+            os << "\nVariable name = " << d_variables[i]->getName();
+            int nctxts = d_variable_context2index_map[i].getSize();
+            if (nctxts > 0) {
+               for (int j = 0; j < nctxts; j++) {
+                  if (d_variable_context2index_map[i][j] != idUndefined()) {
+                     os << "\n   context id = " << j << ", name = "
+                     << d_contexts[j]->getName()
+                     << " :  patch data id = "
+                     << d_variable_context2index_map[i][j];
+                  } else {
+                     os << "\n   context id = " << j
+                        << " UNDEFINED for this variable";
+                  }
+               }
+            } else {
+               os << "\n   --- No contexts defined ---";
+            }
+         }
+      }
+   }
+   os << "\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
+      << std::endl << std::flush;
+   os << "Mapping from Patch Data Indices to Variables:";
+   for (i = 0; i <= d_max_descriptor_id; i++) {
+      os << "\nPatch data id = " << i << " -- ";
+      if (d_index2variable_map[i].isNull()) {
+         os << "UNDEFINED in database";
+      } else {
+         int vid = d_index2variable_map[i]->getInstanceIdentifier();
+         if (!print_only_user_defined_variables ||
+             (print_only_user_defined_variables &&
+              d_is_user_variable[vid])) {
+            os << "data factory name = "
+               << d_patch_descriptor->mapIndexToName(i);
+         } else {
+            os << "internal SAMRAI patch data";
+         }
+      }
+   }
+   os << "\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
+      << "\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
+      << std::endl << std::flush;
+   os
+   << "Printing contents of patch descriptor for comparison to database..."
+   << std::endl;
+   d_patch_descriptor->printClassData(os);
+   os << std::flush;
+   os << "\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
+      << "\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
+      << std::endl << std::flush;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register internal SAMRAI variable with database using internal        *
+ * SAMRAI variable context.                                              *
+ *                                                                       *
+ * If the variable is already registered with the database as a user-    *
+ * defined variable, then an unrecoverable error results.  This avoids   *
+ * potential naming conflicts with user variables.                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int VariableDatabase::registerInternalSAMRAIVariable(
+   const tbox::Pointer<hier::Variable> variable,
+   const hier::IntVector& ghosts)
+{
+   TBOX_ASSERT(!variable.isNull());
+   TBOX_ASSERT(ghosts.min() >= 0);
+
+   int data_id = idUndefined();
+
+   int var_id = variable->getInstanceIdentifier();
+   if (var_id <= d_max_variable_id) {
+
+      if (!d_variables[var_id].isNull() &&
+          d_is_user_variable[var_id]) {
+         TBOX_ERROR(
+            "hier::VariableDatabase::registerInternalSAMRAIVariable error...\n"
+            << "Attempt to register internal SAMRAI variable named "
+            << variable->getName() << " with database,\n"
+            << "But, that variable is already registered with the database"
+            << " as a user-defined variable."
+            << std::endl);
+      }
+
+   }
+
+   bool user_variable = false;
+   data_id = registerVariableAndContext_Private(variable,
+         d_internal_SAMRAI_context,
+         ghosts,
+         user_variable);
+
+   return data_id;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Remove the given patch data index from the database if it has been    *
+ * generated as an internal SAMRAI variable patch data index.  Also,     *
+ * clear the index from the patch descriptor.                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VariableDatabase::removeInternalSAMRAIVariablePatchDataIndex(
+   int data_id)
+{
+   if ((data_id >= 0) && (data_id <= d_max_descriptor_id)) {
+
+      tbox::Pointer<hier::Variable> variable =
+         d_index2variable_map[data_id];
+
+      if (!variable.isNull() &&
+          !d_is_user_variable[variable->getInstanceIdentifier()]) {
+         removePatchDataIndex(data_id);
+      }
+
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Protected member function to get variable id by string name.          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int VariableDatabase::getVariableId(
+   const std::string& name) const
+{
+   int ret_id = idUndefined();
+
+   if (!name.empty()) {
+      for (int i = 0; i <= d_max_variable_id; i++) {
+         if (!d_variables[i].isNull() &&
+             (d_variables[i]->getName() == name)) {
+            ret_id = i;
+            break;
+         }
+      }
+   }
+
+   return ret_id;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private member functions to add contexts to database and to look up   *
+ * context by string name.                                               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int VariableDatabase::getContextId_Private(
+   const std::string& name) const
+{
+   int ret_id = idUndefined();
+
+   if (!name.empty()) {
+      for (int i = 0; i <= d_max_context_id; i++) {
+         if (!d_contexts[i].isNull() &&
+             (d_contexts[i]->getName() == name)) {
+            ret_id = i;
+            break;
+         }
+      }
+   }
+
+   return ret_id;
+}
+
+void VariableDatabase::addContext_Private(
+   const tbox::Pointer<hier::VariableContext> context)
+{
+   int new_id = context->getIndex();
+   int oldsize = d_contexts.getSize();
+   int newsize = new_id + 1;
+   if (oldsize < newsize) {
+      newsize =
+         tbox::MathUtilities<int>::Max(oldsize + s_context_array_alloc_size,
+            newsize);
+      d_contexts.resizeArray(newsize);
+   }
+   d_contexts[new_id] = context;
+   d_max_context_id = tbox::MathUtilities<int>::Max(d_max_context_id, new_id);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private member functions to add mapping from data index to variable   *
+ * to the database.  Note that no error checking is done.                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void VariableDatabase::addVariablePatchDataIndexPairToDatabase_Private(
+   const tbox::Pointer<hier::Variable> variable,
+   int data_id,
+   bool user_variable)
+{
+   bool variable_added = addVariable_Private(variable, user_variable);
+
+   if (!variable_added) {
+      TBOX_ERROR("Internal hier::VariableDatabase error...\n"
+         << "Attempt to add variable with duplicate name " << variable->getName()
+         << " to database is not allowed.\n"
+         << "Another variable with this name already exists in database."
+         << std::endl);
+   }
+
+   int oldsize = d_index2variable_map.getSize();
+   if (data_id >= oldsize) {
+      d_index2variable_map.resizeArray(
+         tbox::MathUtilities<int>::Max(oldsize + s_descriptor_array_alloc_size,
+            data_id + 1));
+   }
+
+   if (d_index2variable_map[data_id].isNull() &&
+       !variable.isNull()) {
+      d_num_registered_patch_data_ids++;
+   }
+
+   d_index2variable_map[data_id] = variable;
+   d_max_descriptor_id =
+      tbox::MathUtilities<int>::Max(d_max_descriptor_id, data_id);
+}
+
+void
+VariableDatabase::removeVariable(
+      const std::string& name)
+{
+   /*
+    * 1. find the variable in d_variables by looking up variable id by
+    *    given variable name. 
+    *
+    * if valid id:
+    * 2. unregister and/or unmap it from collection of user-defined 
+    *    variables in database.
+    * 3. remove each patch data id associated with variable 
+    *    from PatchDescriptor
+    * 4. remove variable from collection of variables held by database
+    *    (i.e., d_variables array).
+    * 5. reset max variable instance identifier if necessary
+    * 6. return
+    */
+   int var_id = getVariableId(name);
+   // if we have a valid variable id, then we'll unregister, unmap and
+   // remove the variable.
+   if (var_id != idUndefined()) {
+      d_is_user_variable[var_id] = false;
+
+      tbox::Array<int> index_array = d_variable_context2index_map[var_id];
+      for (int context_id = 0; context_id < index_array.size(); ++context_id) {
+         if (index_array[context_id] != idUndefined()) {
+            int desc_id = index_array[context_id];
+            removePatchDataIndex(desc_id);
+         }
+      }
+      // We cannot erase the item from the list, because the list's index is
+      // assumed to be the instance identifier.  So, we just set this item to
+      // undefined.
+      d_variables[var_id].setNull();
+      if (var_id == d_max_variable_id) {
+         --d_max_variable_id;
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Add variable to database if it doesn't already exist in the database. *
+ * If variable already exists in the database, do nothing.  Note that    *
+ * we check ensure that no two distinct user-defined variables can exist *
+ * in the database with the same name.                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool VariableDatabase::addVariable_Private(
+   const tbox::Pointer<hier::Variable> variable,
+   bool user_variable)
+{
+   bool ret_value = true;
+
+   int var_id = variable->getInstanceIdentifier();
+   bool var_found = false;
+   bool grow_array = false;
+
+   if (var_id < d_variables.getSize()) {
+      var_found = !d_variables[var_id].isNull();
+   } else {
+      grow_array = true;
+   }
+
+   if (!var_found) {
+
+      if (getVariableId(variable->getName()) != idUndefined()) {
+         ret_value = false;
+      }
+
+      if (ret_value) {
+
+         if (grow_array) {
+            const int newsize =
+               tbox::MathUtilities<int>::Max(d_variables.getSize()
+                  + s_variable_array_alloc_size,
+                  var_id + 1);
+            d_variables.resizeArray(newsize);
+            d_variable_context2index_map.resizeArray(newsize);
+
+            const int oldsize = d_is_user_variable.getSize();
+            d_is_user_variable.resizeArray(newsize);
+            for (int i = oldsize; i < newsize; i++) {
+               d_is_user_variable[i] = false;
+            }
+         }
+
+         d_variables[var_id] = variable;
+         d_is_user_variable[var_id] = user_variable;
+         d_max_variable_id =
+            tbox::MathUtilities<int>::Max(d_max_variable_id, var_id);
+
+      }
+
+   } // if !var_found
+
+   return ret_value;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private member function to register variable-context pair with the    *
+ * database and return patch data index corresponding to this pair and   *
+ * given ghost width. The steps are:                                     *
+ *                                                                       *
+ * (1) Check whether variable-context pair maps to a valid patch data    *
+ *     index in the database.  If it does, then check whether the        *
+ *     index is null in the patch descriptor.  If it is, then we will    *
+ *     create a new patch data index.  If the index is not null in       *
+ *     the patch descriptor, the we check to see if the ghost width of   *
+ *     that patch data index matches that in the argument list.  If the  *
+ *     ghost width does not match, then we report an error and abort.    *
+ *                                                                       *
+ * (2) If we find a matching patch data index in step 1, we are done.    *
+ *     We return the index.                                              *
+ *                                                                       *
+ * (3) If we need to create a new patch data index, do the following:    *
+ *                                                                       *
+ *     (3a) Create a new patch data factory, add it to the patch         *
+ *          descriptor, and record the index.                            *
+ *                                                                       *
+ *     (3b) We add the context to the database, if not already there.    *
+ *                                                                       *
+ *     (3c) We add the variable, and index to variable map to the        *
+ *          database, if not already there.                              *
+ *                                                                       *
+ *     (3d) We add the variable-context to index map to the database.    *
+ *                                                                       *
+ * (4) In the end, we return the patch data index for the                *
+ *     variable-context pair.                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int VariableDatabase::registerVariableAndContext_Private(
+   const tbox::Pointer<hier::Variable> variable,
+   const tbox::Pointer<hier::VariableContext> context,
+   const hier::IntVector& ghosts,
+   bool user_variable)
+{
+
+   static std::string separator = "##";
+
+   int desc_id = idUndefined();
+
+   bool make_new_factory = true;
+   int context_id = context->getIndex();
+   int variable_id = variable->getInstanceIdentifier();
+
+   // Check for valid variable_id, and get the
+   // associated context to index map if valid.
+   if (variable_id <= d_max_variable_id) {
+      tbox::Array<int>& test_indx_array =
+         d_variable_context2index_map[variable_id];
+
+      // Check for valid context id and get the patch
+      // descriptor id if valid.
+      if (context_id < test_indx_array.getSize()) {
+         desc_id = test_indx_array[context_id];
+
+         // Check the descriptor id. If valid, get the associated
+         // PatchDataFactory instance.
+         if (desc_id != idUndefined()) {
+            tbox::Pointer<hier::PatchDataFactory> factory =
+               d_patch_descriptor->getPatchDataFactory(desc_id);
+
+            // Ensure the factory is not null and that the ghost
+            // cells are the same as what we passed in.  If the ghost
+            // cells aren't the same, we'll report an error and abort.
+            if (!factory.isNull() &&
+                (factory->getGhostCellWidth() != ghosts)) {
+               TBOX_ERROR("hier::VariableDatabase::registerVariableAndContext"
+                  << " error ...\n" << "Attempting to to register variable "
+                  << variable->getName()
+                  << " and context " << context->getName()
+                  << " with ghost width = " << ghosts
+                  << "\n This variable-context pair is already "
+                  << "registered with a different ghost width. " << std::endl);
+            } else {
+               // reset the boolean flag if necessary
+               if (!factory.isNull()) {
+                  make_new_factory = false;
+               }
+            }
+         }     // if (desc_id != idUndefined())
+      }     // if (context_id < test_indx_array.getSize())
+   }     // if (variable_id <= d_max_variable_id)
+
+   // Create the new factory if necessary
+   if (make_new_factory) {
+
+      tbox::Pointer<hier::PatchDataFactory> new_factory =
+         variable->getPatchDataFactory()->cloneFactory(ghosts);
+
+      std::string tmp(variable->getName());
+      tmp += separator;
+      tmp += context->getName();
+      desc_id = d_patch_descriptor->definePatchDataComponent(tmp, new_factory);
+
+      addContext_Private(context);
+
+      addVariablePatchDataIndexPairToDatabase_Private(variable,
+         desc_id,
+         user_variable);
+
+      tbox::Array<int>& var_indx_array =
+         d_variable_context2index_map[variable_id];
+      int oldsize = var_indx_array.getSize();
+      int newsize = context_id + 1;
+      if (oldsize < newsize) {
+         var_indx_array.resizeArray(newsize);
+         for (int i = oldsize; i < newsize; i++) {
+            var_indx_array[i] = idUndefined();
+         }
+      }
+      var_indx_array[context_id] = desc_id;
+
+   }  // if (make_new_factory)
+
+   return desc_id;
+
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/VariableDatabase.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/VariableDatabase.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Singleton database class for managing variables and contexts. 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Inline accessory functions to retrieve data members.                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<hier::PatchDescriptor>
+VariableDatabase::getPatchDescriptor() const
+{
+   return d_patch_descriptor;
+}
+
+SAMRAI_INLINE_KEYWORD
+int VariableDatabase::getNumberOfRegisteredPatchDataIndices() const
+{
+   return d_num_registered_patch_data_ids;
+}
+
+SAMRAI_INLINE_KEYWORD
+int VariableDatabase::getNumberOfRegisteredVariableContexts() const
+{
+   // currently, we do not allow removal of variable contexts
+   // so this suffices
+   return d_max_context_id + 1;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Inline accessory functions to manage patch data ids for restart.      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+ComponentSelector VariableDatabase::getPatchDataRestartTable() const
+{
+   return d_patchdata_restart_table;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool VariableDatabase::isPatchDataRegisteredForRestart(
+   int index) const
+{
+   return d_patchdata_restart_table.isSet(index);
+}
+
+SAMRAI_INLINE_KEYWORD
+void VariableDatabase::registerPatchDataForRestart(
+   int index)
+{
+   d_patchdata_restart_table.setFlag(index);
+}
+
+SAMRAI_INLINE_KEYWORD
+void VariableDatabase::unregisterPatchDataForRestart(
+   int index)
+{
+   d_patchdata_restart_table.clrFlag(index);
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/VariableDatabase.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/VariableDatabase.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,895 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Singleton database class for managing variables and contexts. 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_VariableDatabase
+#define included_hier_VariableDatabase
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/ComponentSelector.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+#include <iostream>
+
+namespace SAMRAI {
+namespace hier {
+
+/*
+ *  TODO: Should we be more explicit in this class documentation to describe
+ *  how variables of different dimensions are handled?  For example, this 
+ *  places constraints on several methods (i.e., variable dimension must 
+ *  match the ghost width dimension, etc.).  The Array containers that we use
+ *  do not know about the dimension associated with the objects they contain.
+ *  Should we manage things more explicitly for each dimension?
+ */
+/*!
+ * @brief Generates and manages mappings between
+ * Variables and/or (Variable,VariableContext) pairs and patch data indices.
+ *
+ * This class is a Singleton, and serves as a globally accessible lookup
+ * table for the bookkeeping information related to variable storage on a
+ * SAMRAI patch hierarchy.  The database may be used to manage the mapping
+ * between a Variable or (Variable,VariableContext) pair and the patch data
+ * index associated with the data for the Variable or 
+ * (Variable,VariableContext) pair.
+ *
+ * Typically, numerical routines or solution algorithms manage and access
+ * data in terms of Variables and/or (Variable,VariableContext) pairs
+ * (e.g., "OLD", "NEW").
+ *
+ * @par Definitions
+ *
+ * <b><em> %Patch data index:</em></b> SAMRAI uses a patch data index value (an
+ * integer) to lookup patch data information in the patch descriptor
+ * object that is shared by all patches in a SAMR hierarchy.
+ *
+ * <b><em> %Variable:</em></b>  A storage management class.  Each
+ * concrete implementation (cell-centered, node-centered, etc.) provides
+ * the appropriate storage management for that type.
+ *
+ * <b><em>%VariableContext:</em></b>  A way to consistently address the state 
+ * of a variable in multiple contexts.  For example, an application may need 
+ * to manage data for "OLD" pressure values as well as "NEW" pressure 
+ * values.  The context allows the user to have a single variable in multiple 
+ * contexts, without having to create multiple variables.  A context is 
+ * optional and a user could create multiple variables; e.g., "pressure_old"
+ * and "pressure_new".
+ *
+ * When the association between Variable and VariableContext is needed,
+ * the registration operations are used to create this association.
+ * Each variable and context pair maps to a unique integer
+ * patch data index.  The integer indices are the same for every patch in the
+ * hierarchy so data objects are accessed identically for all patches.
+ *
+ * The following example shows the mapping between a PatchData indices
+ * and a Variable/VariableContext pair.
+ * 
+ * @code
+ *    PatchData Index   Variable   Context
+ *    ================  ========   =======
+ *    index = 0         uval       CURRENT
+ *    index = 1         flux       CURRENT
+ *    index = 2         flux       SCRATCH
+ * @endcode
+ *
+ * @par Usage
+ * The typical way to use the database is as follows:
+ *
+ * <ol>
+ *   <li>Add Variable to the database
+ *   <li>Get or create the VariableContext via the getContext() function
+ *   <li>Register the VariableContext pair in the database
+ * </ol>
+ *
+ *  @code
+ * 
+ *    // other setup including dimension and IntVectors specifying ghosts
+ *    ... 
+ * 
+ *    // Get the singleton variable database.
+ *    hier::VariableDatabase* var_db = hier::VariableDatabase.getDatabase();
+ * 
+ *    // Create the context (or access it if it exists already).
+ *    tbox::Pointer<hier::VariableContext> current = 
+ *       var_db->getContext("CURRENT");
+ * 
+ *    // Define the variable.
+ *    hier::Pointer<pdat::FaceVariable<double> > flux(
+ *       new pdat::FaceVariable<double>(dim, "flux", 1));
+ * 
+ *    // Register the Variable/VariableContext pair.
+ *    // "ghosts" is an IntVector defining the data ghost width for this 
+ *    // usage context.  Note that other contexts may have different ghost 
+ *    // widthsi for the same variable.
+ *    const int flux_current_id = 
+ *       var_db->registerVariableAndContext(flux, current, ghosts);
+ * 
+ *  @endcode
+ *
+ * @par 
+ * A Variable can also be added to the database using the
+ * addVariable() function.  This function does not register a mapping
+ * between a Variable and VariableContext, rather it is used when
+ * there are multiple objects needing to access a single Variable.
+ * This eliminates issues with shared objects, order of creation, etc.
+ * For example, two different algorithms in an
+ * application may need to access the current value for pressure.
+ * Each of these algorithms may use the database to access the
+ * patch data index of this shared state.  This is not needed if
+ * registerVariableAndContext() is used.
+ *
+ * @par Alternate Usage
+ * The database can be used to maintain a mapping between a single patch data
+ * index and a Variable.  This type of mapping is constructed using either the
+ * registerPatchDataIndex() function or registerClonedPatchDataIndex() function.
+ * 
+ * <ul>
+ *   <li> Add variable and index pair to the database via the
+ *       addVariablePatchDataIndex() function.   Or, clone an existing
+ *       variable-index pair via registerClonedPatchDataIndex().
+ *       Either of these functions will check to make sure that the type
+ *       of the variable matches the given patch data index.
+ *   <li> Get variable for the index via the mapIndexToVariable() function.
+ * </ul>
+ *
+ * @par 
+ * The database is also used in SAMRAI to manage the reading/writing of
+ * patch data objects to/from restart files.
+ * 
+ * @note
+ * <ul>
+ *    <li> Variable names are unique in the database
+ *    <li> VariableContext names are unique in the database
+ *    <li> VariableContext should be generated solely through the use of the
+ *         getContext() function to avoid unexpected results; e.g., 
+ *         multiple context objects with the same name.
+ *    <li> A Variable can be removed from the database using removeVariable().
+ *    <li> The database can free PatchData indices using removepatchDataIndex()
+ *         function.
+ *    <li> A VariableContext persists once created and cannot be removed from
+ *         the database.
+ *    <li> The database is reset (all data wiped) during shutdown.  It is
+ *         started from a clean state during a new startup.
+ * </ul>
+ *
+ *
+ * @see hier::PatchDescriptor
+ * @see hier::VariableContext
+ * @see hier::Variable
+ * @see hier::Patch
+ */
+
+class VariableDatabase
+{
+public:
+   /*!
+    * @brief Return a pointer to the singleton variable database instance.
+    *
+    * @note 
+    * When the database is accessed for the first time, the
+    * Singleton instance is registered with the StartupShutdownManager
+    * class which destroys such objects at program completion.  Thus,
+    * this class is not explicitly allocated or deallocated.
+    *
+    * @return  Bare pointer to variable database instance.
+    */
+   static VariableDatabase *
+   getDatabase();
+
+   /*!
+    * @brief Get the number of patch data indices registered with the database.
+    */
+   virtual
+   int
+   getNumberOfRegisteredPatchDataIndices() const;
+
+   /*!
+    * @brief Get number of variable contexts registered with the database.
+    */
+   virtual
+   int
+   getNumberOfRegisteredVariableContexts() const;
+
+   /*!
+    * @brief Get the patch descriptor managed by the database.
+    * 
+    * This descriptor is shared by all patches in the hierarchy.
+    */
+   virtual
+   tbox::Pointer<hier::PatchDescriptor>
+   getPatchDescriptor() const;
+
+   /*!
+    * @brief Creates or returns a VariableContext object with the given name.
+    *
+    * If a context exists in the database with the given name, it is
+    * returned.  Otherwise, a new context is created and returned.
+    *
+    * @note
+    * It is impossible to add two distinct variable context
+    * objects to the database with the same name.
+    *
+    * The name must not be empty; a null pointer will be return in this case.
+    *
+    * @param[in] context_name
+    *
+    * @return  Variable context.
+    */
+   virtual
+   tbox::Pointer<hier::VariableContext>
+   getContext(
+      const std::string& context_name);
+
+   /*!
+    * @brief Check whether context with given name exists in the database.
+    *
+    * @param[in] context_name  
+    */
+   virtual
+   bool
+   checkContextExists(
+      const std::string& context_name) const;
+
+   /*!
+    * @brief Add the Variable to the database.  
+    *
+    * If the given Variable already exists nothing is done; the same
+    * Variable may be added multiple times.  If a Variable exists with
+    * the same name identifier but is a different Variable object, an
+    * error will be logged and the program will abort.  This prevents
+    * multiple Variables being associated with the same name.
+    *
+    * @param[in] variable tbox::Pointer to variable.  When assertion checking
+    *                 is active, an assertion will result if the
+    *                 variable pointer is null.
+    */
+   virtual
+   void
+   addVariable(
+      const tbox::Pointer<hier::Variable> variable);
+
+   /*!
+    * @brief Remove the Variable from the database identified by @c name.
+    *
+    * @param[in] variable_name 
+    */
+   virtual
+   void
+   removeVariable(
+         const std::string& variable_name);
+
+   /*!
+    * @brief Get variable in database with given name string identifier.
+    *
+    * @param[in] variable_name  
+    *
+    * @return  Variable in the database with given name.
+    *          If no such variable exists, a null pointer is returned.
+    */
+   virtual
+   tbox::Pointer<hier::Variable>
+   getVariable(
+      const std::string& variable_name) const;
+
+   /*!
+    * @brief Check whether a variable with given name exists in the database.
+    *
+    * @param[in] variable_name
+    *
+    * @return  True if variable with name exists in database;
+    *          otherwise, false.
+    */
+   virtual
+   bool
+   checkVariableExists(
+      const std::string& variable_name) const;
+
+   /*!
+    * @brief Create and register a new patch data index by cloning the data
+    * factory associated with the Variable at the index provided.
+    *
+    * The new index and variable pair is added to the VariableDatabase.
+    * A variable-patch data index pair generated using this function cannot
+    * be looked up using a VariableContext. If the @c old_id is invalid
+    * or undefined, or does not map to patch data of the same type as
+    * @c variable, the program will abort with an error message.
+    *
+    * @note
+    * This function does not deallocate any patch data storage associated
+    * with the new patch data index.
+    *
+    * @param[in]  variable tbox::Pointer to @c Variable.  If the variable is
+    *             unknown to the database, then an invalid patch data index
+    *             (< 0) will be returned. When assertion checking is active,
+    *             an assertion will result when the variable pointer is null.
+    * @param[in]  old_id Integer patch data index currently associated with
+    *             variable. If this value is not a valid patch data index
+    *             (< 0) or does not map to patch data matching the
+    *             type of the given variable, the program will abort with an
+    *             error message.
+    *
+    * @return New integer patch data index. If new patch data not added,
+    *         return value is an invalid (undefined) patch data index (< 0).
+    */
+   virtual
+   int
+   registerClonedPatchDataIndex(
+      const tbox::Pointer<hier::Variable> variable,
+      int old_id);
+
+   /*!
+    * @brief Add given patch data index and variable pair to the database.
+    *
+    * This registration function is primarily intended for Variable objects
+    * (i.e., DO NOT use for internal SAMRAI variables) that are not 
+    * associated with a VariableContext and for which a patch data index 
+    * is already known.
+    *
+    * @par [Default Case]
+    * If the index is unspecified, the default variable factory is cloned
+    * and the Variable and new index are added to the database.
+    * In this case, the patch data will have the default
+    * ghost associated with the given @c variable (defined
+    * by the patch data factory it generates).
+    *
+    * @note
+    * <ul>
+    *   <li> variable-patch data index pair generated with this function
+    *        cannot be looked up using a VariableContext.
+    *   <li> This function does not allocate any patch data storage associated
+    *        with the integer index.
+    *   <li> This function must not be used by SAMRAI developers for
+    *        creating patch data indices for internal SAMRAI variables.  The
+    *        routine registerInternalSAMRAIVariable() must be used for that
+    *        case.
+    * </ul>
+    * @param[in]  variable tbox::Pointer to hier::Variable.  When assertion
+    *                      checking is active, an assertion will result when
+    *                      the variable pointer is null.
+    * @param[in]  data_id  Optional integer patch data index to be added
+    *                      (along with variable) to the database.  If the value
+    *                      is unspecified (default case), the default variable
+    *                      patch data factory is used to generate a new factory.
+    *                      If the value is provided and does not map to patch
+    *                      data matching the type of the given variable, the
+    *                      program will abort with an error message.
+    *
+    * @return New integer patch data index.  If new patch data index not
+    *         added, return value is an invalid patch data index (< 0).
+    */
+   virtual
+   int
+   registerPatchDataIndex(
+      const tbox::Pointer<hier::Variable> variable,
+      int data_id = idUndefined());
+
+   /*!
+    * @brief Remove the patch data index from the VariableDatabase if it exists.
+    *
+    * @par Side Effects
+    * This function also removes the given index from the patch descriptor
+    * and any mapping between the index and a variable from the
+    * database.
+    *
+    * @note
+    * This function does not deallocate any patch data storage associated
+    * with the integer index.
+    *
+    * @param[in]  data_id  Integer patch data index to be removed from
+    *                  the database.  When assertion checking is active,
+    *                  an assertion will result when the patch data index
+    *                  is invalid (i.e., < 0).
+    */
+   virtual
+   void
+   removePatchDataIndex(
+      int data_id);
+
+   /*!
+    * @brief Check whether the given variable is mapped to the given patch data
+    * index in the database.
+    *
+    * @param[in]  variable  tbox::Pointer to variable.  When assertion checking
+    *                   is active, an unrecoverable assertion will result if
+    *                   the variable pointer is null.
+    * @param[in]  data_id   Integer patch data index.  When assertion checking
+    *                   is active, an unrecoverable assertion will result if
+    *                   the value is an invalid identifier (either < 0 or
+    *                   larger than the maximum allowed patch data id).
+    *
+    * @return  Boolean true if the variable is mapped the given patch
+    * data index; false otherwise.
+    */
+   virtual
+   bool
+   checkVariablePatchDataIndex(
+      const tbox::Pointer<hier::Variable> variable,
+      int data_id) const;
+
+   /*!
+    * @brief Check whether the given variable matches the patch data type
+    * associated with the given patch data index in the database.
+    *
+    * @param[in]  variable  tbox::Pointer to variable.  When assertion checking
+    *                   is active, an unrecoverable assertion will result if
+    *                   the variable pointer is null.
+    * @param[in] data_id   Integer patch data index.  When assertion checking
+    *                   is active, an unrecoverable assertion will result if
+    *                   the value is an invalid identifier (either < 0 or
+    *                   larger than the maximum allowed patch data id).
+    *
+    * @return  Boolean true if the type of the variable matches the type of
+    *          the patch data at the given patch data index; false otherwise.
+    */
+   virtual
+   bool
+   checkVariablePatchDataIndexType(
+      const tbox::Pointer<hier::Variable> variable,
+      int data_id) const;
+
+   /*!
+    * @brief Register variable and context pair along with the ghost
+    * width for the patch data mapped to the (Variable, VariableContext)
+    * pair with the variable database.  
+    *
+    * @par 
+    * Typically, this function will generate a new patch data
+    * index for the variable and ghost width and add the
+    * variable-context pair and index to the database.  If the
+    * variable-context pair is already mapped to some patch data index
+    * in the database, and the given ghost width matches that of the 
+    * patch data, then that index will be returned and the function will 
+    * do nothing.  However, if the variable-context pair is already mapped 
+    * to some patch data index with a different ghost width, the program 
+    * will abort with a descriptive error message.
+    *
+    * @par
+    * If either the variable or the context is unknown to the database
+    * prior to calling this routine, both items will be added to the
+    * database, if possible.  The constraints for the getContext() and
+    * addVariable() routines apply.
+    *
+    * @note
+    * It is an error to map a (Variable,VariableContext) pair plus data
+    * index having a different ghost width than that passed in the
+    * argument list.  The program will abort with a descriptive message
+    * in this case.
+    *
+    *
+    * @param[in]  variable  tbox::Pointer to variable.  When assertion checking
+    *                   is active, an unrecoverable assertion will result if
+    *                   the variable pointer is null.
+    * @param[in] context    tbox::Pointer to variable context.  When assertion
+    *                   checking is active, an unrecoverable assertion
+    *                   will result if the context pointer is null.
+    * @param[in] ghosts     Optional ghost width for patch data associated
+    *                   with variable-context pair.  If the ghost width
+    *                   is given, all entries of the vector must be >= 0.
+    *                   When assertion checking is active, an unrecoverable
+    *                   assertion will result if the ghost width vector
+    *                   contains a negative entry.
+    *
+    * @return Integer patch data index of variable-context pair in database.
+    */
+   virtual
+   int
+   registerVariableAndContext(
+      const tbox::Pointer<hier::Variable> variable,
+      const tbox::Pointer<hier::VariableContext> context,
+      const hier::IntVector& ghosts // NOTE: old default (zero ghost width)
+                                    // does not work since dimension of
+                                    // variable and IntVector must match.
+      );
+
+   /*!
+    * @brief Map variable-context pair in database to patch data index.
+    *
+    * If there is no such pair in the database (either the variable does
+    * not exist, the context does not exist, or the pair has not been
+    * registered), then an invalid patch data index (i.e., < 0) is returned.
+    *
+    * @note 
+    * For this function to operate as expected, the database mapping
+    * information must have been generated using the
+    * registerVariableAndContext() function.  If the variable was
+    * registered without a variable context, then the patch data index
+    * associated with the variable will not be returned.  See the other
+    * map...() functions declared in this class.
+    *
+    * @param[in]  variable  tbox::Pointer to variable.  When assertion checking
+    *                   is active, an unrecoverable assertion will result
+    *                   if the variable pointer is null.
+    * @param[in]  context   tbox::Pointer to variable context.  When assertion
+    *                   checking is active, an unrecoverable assertion
+    *                   will result if the variable context pointer is null.
+    *
+    * @return Integer patch data index of variable-context pair in database.
+    *         If the variable-context pair was not registered with the
+    *         database, then an invalid data index (< 0) will be returned.
+    */
+   virtual
+   int
+   mapVariableAndContextToIndex(
+      const tbox::Pointer<hier::Variable> variable,
+      const tbox::Pointer<hier::VariableContext> context) const;
+
+   /*!
+    * @brief Map patch data index to variable associated with the data, if
+    * possible, and set the variable pointer to the variable in the database.
+    *
+    * @param[in]   index  Integer patch data index.  When assertion checking
+    *                 is active, an unrecoverable assertion will if the index
+    *                 is invalid (i.e., < 0).
+    * @param[out]   variable  tbox::Pointer to variable that maps to patch data
+    *                    index in database.  If there is no index in the
+    *                    database matching the index input value, then the
+    *                    variable pointer is set to null.
+    *
+    * @return  Boolean true if patch data index maps to variable in the
+    *          database; otherwise false.
+    */
+   virtual
+   bool
+   mapIndexToVariable(
+      const int index,
+      tbox::Pointer<hier::Variable>& variable) const;
+
+   /*!
+    * @brief Map patch data index to variable-context pair associated with
+    * the data, if possible, and set the variable and context pointers to
+    * the corresponding database entries.  
+    *
+    * @note 
+    * For this function to operate as expected, the database
+    * mapping information must have been generated using the
+    * registerVariableAndContext() function.  If the variable was
+    * registered without a variable context, then the variable and
+    * variable context returned may not be what is expected by the
+    * user; e.g., they may be associated with internal SAMRAI
+    * variables.
+    *
+    * @param[in]   index patch data index
+    * @param[out]   variable tbox::Pointer to variable set to matching variable
+    *          in database.  If no match is found, it is set to null.
+    * @param[out]   context  tbox::Pointer to variable context set to matching
+    *          variable context in database. If no match is found, it is
+    *          set to null.
+    *
+    * @return  Boolean true if patch data index maps to variable-context
+    *          pair in the database; otherwise false.
+    */
+   virtual
+   bool
+   mapIndexToVariableAndContext(
+      const int index,
+      tbox::Pointer<hier::Variable>& variable,
+      tbox::Pointer<hier::VariableContext>& context) const;
+
+   /*!
+    * @brief Return copy of component selector that holds information about 
+    * which patch data entries are written to restart.
+    *
+    * @return Component selector describing patch data items registered
+    *         for restart.  That is, the flags set in the component
+    *         selector will correspond to the patch data indices
+    *         that have been registered for restart.
+    */
+   virtual
+   hier::ComponentSelector
+   getPatchDataRestartTable() const;
+
+   /*!
+    * @brief Check whether given patch data index is registered with database
+    * for restart.
+    *
+    * @param[in]  index  Integer patch data index to check.
+    *
+    * @return Boolean true if the patch data with the given index
+    *         is registered for restart; otherwise false.
+    *
+    */
+   virtual
+   bool
+   isPatchDataRegisteredForRestart(
+      int index) const;
+
+   /*!
+    * @brief Register the given patch data index for restart.
+    *
+    * @param[in]  index  Integer patch data index to set.
+    */
+   virtual
+   void
+   registerPatchDataForRestart(
+      int index);
+
+   /*!
+    * @brief Unregister the given patch data index for restart.
+    *
+    * @param[in]  index  Integer patch data index to unset.
+    */
+   virtual
+   void
+   unregisterPatchDataForRestart(
+      int index);
+
+   /*!
+    * @brief Print variable, context, and patch descriptor information
+    * contained in the database to the specified output stream.
+    *
+    * @param[in] os  Optional output stream.  If not given, tbox::plog is used.
+    * @param[in] print_only_user_defined_variables Optional boolean value
+    *        indicating whether to print information for all variables
+    *        in database or only those that are associated with user-
+    *        defined quantities; i.e., not internal SAMRAI variables.
+    *        The default is true, indicating that only user-defined
+    *        variable information will be printed.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os = tbox::plog,
+      bool print_only_user_defined_variables = true) const;
+
+   /*!
+    * @brief Register internal SAMRAI variable and ghost width
+    * with the variable database.
+    *
+    * This function will generate a new patch data index for the variable
+    * and ghost width unless the variable is already mapped to some
+    * patch data index in the database with a different ghost width
+    * or as a user-defined variable.  If the variable is unknown to the
+    * database prior to calling this routine, it will be added to the
+    * database.
+    *
+    * @note
+    * This routine is intended for managing internal SAMRAI
+    * work variables that are typically unseen by users.  It should not be
+    * called by users for registering variables, or within SAMRAI for
+    * registering any user-defined variables with the variable database.
+    * This function enforces the same constraints on variable registration
+    * that are applied for registering user-defined variables; e.g., using
+    * the routine registerVariableAndContext().  Thus, it is the
+    * responsibility of SAMRAI developers to avoid naming and ghost
+    * width conflicts with user-defined variables or other internal
+    * SAMRAI variables.
+    *
+    *
+    * @param[in]  variable  tbox::Pointer to variable.  When assertion checking
+    *                   is active, an unrecoverable assertion will result
+    *                   if the variable pointer is null.
+    * @param[in] ghosts     Ghost width for patch data associated with the
+    *                   variable.  All entries of the vector must be >= 0.
+    *                   When assertion checking is active, an unrecoverable
+    *                   assertion results if the vector contains a negative
+    *                   entry.
+    * @return Integer patch data index of variable-ghost width pair
+    * in database.
+    */
+   virtual
+   int
+   registerInternalSAMRAIVariable(
+      const tbox::Pointer<hier::Variable> variable,
+      const hier::IntVector& ghosts);
+
+   /*!
+    * @brief Remove the given index from the variable database if it exists in
+    * the database and is associated with an internal SAMRAI variable registered
+    * with the function registerInternalSAMRAIVariable().  
+    *
+    * @par
+    * Also, remove the given index from the patch descriptor and
+    * remove any mapping between the index and a variable from the
+    * variable database.
+    *
+    * @note 
+    * This function does not deallocate
+    * any patch data storage associated with the integer index.
+    *
+    * @note
+    * This routine is intended for managing internal SAMRAI
+    * work variables that are typically unseen by users.  It should not be
+    * called by users for removing patch data indices, or within SAMRAI for
+    * removing any patch data indices associated with user-defined variables.
+    *
+    * @note 
+    * The given index will not be removed if is not associated with
+    * an internal SAMRAI variable in the variable database; i.e., a
+    * user-defined variable.
+    *
+    * @param[in]  data_id  Integer patch data identifier to be removed from
+    *                  the database.
+    */
+   virtual
+   void
+   removeInternalSAMRAIVariablePatchDataIndex(
+      int data_id);
+
+protected:
+   /**
+    * @brief The constructor for VariableDatabase is protected.
+    * Consistent with the definition of a Singleton class, only the
+    * database object has access to the constructor for the class.
+    *
+    * The constructor initializes the state of database contents.
+    */
+   VariableDatabase();
+
+   /**
+    * @brief The destructor for VariableDatabase is protected. See the
+    * comments for the constructor.
+    *
+    * The destructor deallocates database contents.
+    */
+   virtual ~VariableDatabase();
+
+   /**
+    * @brief Return integer value used to indicate undefined variable or
+    * context identifier.  This routine is protected to allow subclasses
+    * to be consistent with this database class.
+    */
+   static int idUndefined() {return -1;}
+
+   /**
+    * @brief Return integer identifier for first variable found matching given
+    * string name identifier (care must be used to avoid adding variables to
+    * database with same name to insure correct behavior), or return an 
+    * undefined integer index if no such variable exists in the database.
+    */
+   int
+   getVariableId(
+      const std::string& name) const;
+
+   /**
+    * @brief Initialize Singleton instance with instance of subclass.  This 
+    * function is used to make the singleton object unique when inheriting 
+    * from this base class.
+    */
+   void
+   registerSingletonSubclassInstance(
+      hier::VariableDatabase* subclass_instance);
+
+private:
+   /*!
+    * @brief Deallocate the Singleton VariableDatabase instance.
+    * 
+    * It is not necessary to call this function at program termination,
+    * since it is automatically called by the StartupShutdownManager class.
+    */
+   static void
+   shutdownCallback();
+
+   /*
+    * Private member functions to search for indices of contexts
+    * given a string identifier, and to add a new context
+    * to database.
+    */
+   int
+   getContextId_Private(
+      const std::string& name) const;
+
+   void
+   addContext_Private(
+      const tbox::Pointer<hier::VariableContext> context);
+
+   /*
+    * Private member function to add variable to database (either
+    * user-defined or internal SAMRAI variable depending on boolean
+    * argument).  Boolean return value is true if variable is either
+    * added to variable database or already found in variable database.
+    * Boolean return value is false only when a user variable has
+    * the same name string identifier of another variable already in
+    * the database.  In this case, the variable is not added to the database.
+    */
+   bool
+   addVariable_Private(
+      const tbox::Pointer<hier::Variable> variable,
+      bool user_variable);
+
+   /*
+    * Private member function to add variable-patch data index mapping
+    * to the database.  Boolean indicates whether variable is a user-defined
+    * variable or an internal SAMRAI work variable.
+    */
+   void
+   addVariablePatchDataIndexPairToDatabase_Private(
+      const tbox::Pointer<hier::Variable> variable,
+      int data_id,
+      bool user_variable);
+
+   /*
+    * Private member function to add variable-context pair to the database.
+    * Boolean indicates whether variable is a user-defined variable or
+    * an internal SAMRAI work variable.
+    */
+   int
+   registerVariableAndContext_Private(
+      const tbox::Pointer<hier::Variable> variable,
+      const tbox::Pointer<hier::VariableContext> context,
+      const hier::IntVector& ghosts,
+      bool user_variable);
+
+   /*
+    * Static data members used to control access to and destruction of
+    * singleton variable database instance.
+    */
+   static VariableDatabase* s_variable_database_instance;
+
+   /*
+    * Static data members used to control allocation of arrays.
+    */
+   static int s_context_array_alloc_size;
+   static int s_variable_array_alloc_size;
+   static int s_descriptor_array_alloc_size;
+
+   /*
+    * Data members that store variable, context, patch data index information.
+    */
+   tbox::Pointer<hier::PatchDescriptor> d_patch_descriptor;
+
+   tbox::Pointer<hier::VariableContext> d_internal_SAMRAI_context;
+
+   int d_num_registered_patch_data_ids;
+
+   /*
+    * Array of VariableContext pointers is indexed as
+    * d_contexts[ <context id> ]
+    */
+   int d_max_context_id;
+   tbox::Array<tbox::Pointer<hier::VariableContext> > d_contexts;
+
+   /*
+    * Array of Variable pointers is indexed as d_variables[ <variable id> ]
+    */
+   int d_max_variable_id;
+   tbox::Array<tbox::Pointer<hier::Variable> > d_variables;
+
+   /*
+    * Array of VariableContext to patch descriptor indices is indexed as
+    * d_variable_context2index_map[ <context id> ]
+    */
+   tbox::Array<tbox::Array<int> > d_variable_context2index_map;
+
+   /*
+    * Array of patch descriptor indices to Variables is indexed as
+    * d_index2variable_map[ <descriptor id> ]
+    */
+   int d_max_descriptor_id;
+   tbox::Array<tbox::Pointer<hier::Variable> > d_index2variable_map;
+
+   /*
+    * Array of user variable booleans is indexed as
+    * d_is_user_variable[ <variable id> ]
+    */
+   tbox::Array<bool> d_is_user_variable;
+
+   /*
+    * ComponentSelector holds bits that determine which patch data
+    * items need to be written to the restart database.  The
+    * bit in position j corresponds to the patch data associated with
+    * the j-th index of the patch descriptor object.
+    */
+   hier::ComponentSelector d_patchdata_restart_table;
+
+   static tbox::StartupShutdownManager::Handler
+   s_shutdown_handler;
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/hier/VariableDatabase.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/dox/manual.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/dox/manual.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,32 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace hier {
+
+/*!
+  @page package_hierarchy The Hierarchy Package
+
+  The Hierarchy package contains classes that provide basic AMR 
+  patch hierarchy definition and management capabilities.  Also,
+  base classes for patch data and variables, and variable-data 
+  management are found here.  These classes are divided into these categories:
+  -# @ref package_hierarchy_boxes "index space and box calculus"
+  -# @ref package_hierarchy_patches "AMR patch hierarchy structure"
+  -# @ref package_hierarchy_variables "AMR patch data and variable support"
+  -# @ref package_hierarchy_dlbg "Distributed layered box-graph data"
+  -# @ref package_hierarchy_multiblock "Multiblock AMR patch hierarchy structure"
+
+  All class names in the Hierarchy package are in the namespace
+  SAMRAI::hier.
+
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/dox/manual_boxes.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/dox/manual_boxes.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,32 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+	namespace hier {
+
+/*!
+  @page package_hierarchy_boxes Box Calculus
+
+  The box calculus routines implement the functionality to manipulate the
+  AMR index space.  A box consists of an upper and lower index and represents
+  a rectangular region of index space.
+  - SAMRAI::hier::Box
+  - SAMRAI::hier::BoxArray
+  - SAMRAI::hier::BoxGraphUtilities
+  - SAMRAI::hier::BoxIOUtility
+  - SAMRAI::hier::BoxList
+  - SAMRAI::hier::BoxTree
+  - SAMRAI::hier::BoxTreeNode
+  - SAMRAI::hier::BoxUtilities
+  - SAMRAI::hier::Index
+  - SAMRAI::hier::IntVector
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/dox/manual_dlbg.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/dox/manual_dlbg.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,33 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+    namespace hier {
+
+/*!
+  @page package_hierarchy_dlbg Patch Adjacency Graph Structures
+
+  These classes support the notion of distributed data across 
+  the patch hierarchy, including box, relationship and neighbor information
+  - SAMRAI::hier::Connector
+  - SAMRAI::hier::MappedBox
+  - SAMRAI::hier::MappedBoxContainerUtils
+  - SAMRAI::hier::MappedBoxId
+  - SAMRAI::hier::MappedBoxLevel
+  - SAMRAI::hier::MappedBoxLevelHandle
+  - SAMRAI::hier::MappedBoxLevelConnectorUtils
+  - SAMRAI::hier::MappedBoxSet
+  - SAMRAI::hier::MappedBoxTree 
+  - SAMRAI::hier::MappingConnectorAlgorithm
+  - SAMRAI::hier::OverlapConnectorAlgorithm
+  - SAMRAI::hier::PersistentOverlapConnectors
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/dox/manual_multiblock.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/dox/manual_multiblock.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,27 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+    namespace hier {
+
+/*!
+  @page package_hierarchy_multiblock Multiblock AMR Patch Hierarchy Management
+
+  The multiblock AMR hierarchy management classes extend the patch hierarchy
+  and patch levels for use on multiblock domains.
+  - SAMRAI::hier::MBUtilities
+  - SAMRAI::hier::MultiblockDataTranslator
+  - SAMRAI::hier::MultiblockGridGeometry
+  - SAMRAI::hier::MultiblockPatchHierarchy
+  - SAMRAI::hier::MultiblockPatchLevel
+
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/dox/manual_patches.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/dox/manual_patches.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,34 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+    namespace hier {
+
+/*!
+  @page package_hierarchy_patches AMR Patch Hierarchy Management
+
+  The AMR hierarchy management classes implement the patch hierarchy,
+  patch levels, and patches used to represent the multi-resolution AMR grid.
+  - SAMRAI::hier::BasePatchHierarchy
+  - SAMRAI::hier::BasePatchLevel
+  - SAMRAI::hier::BoundaryBox
+  - SAMRAI::hier::BoundaryLookupTable
+  - SAMRAI::hier::CoarseFineBoundary
+  - SAMRAI::hier::GridGeometry
+  - SAMRAI::hier::Patch
+  - SAMRAI::hier::PatchFactory
+  - SAMRAI::hier::PatchGeometry
+  - SAMRAI::hier::PatchHierarchy
+  - SAMRAI::hier::PatchLevelFactory
+  - SAMRAI::hier::PatchLevel
+  - SAMRAI::hier::ProcessorMapping
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/hier/dox/manual_variables.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/hier/dox/manual_variables.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,30 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+    namespace hier {
+
+/*!
+  @page package_hierarchy_variables AMR Patch Data and Variable Management
+
+  The variable and patch data classes are used to implement and manipulate
+  data on an AMR patch hierarchy.
+  - SAMRAI::hier::BoxGeometry
+  - SAMRAI::hier::BoxOverlap
+  - SAMRAI::hier::ComponentSelector
+  - SAMRAI::hier::PatchDataFactory
+  - SAMRAI::hier::PatchData
+  - SAMRAI::hier::PatchDescriptor
+  - SAMRAI::hier::VariableContext
+  - SAMRAI::hier::VariableDatabase
+  - SAMRAI::hier::Variable
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mainpage.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mainpage.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,123 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+/*!
+  @mainpage SAMRAI Source Code Documentation
+
+  SAMRAI (Structured Adaptive Mesh Refinement Applications Infrastructure)
+  is a research-oriented software development effort in the Center
+  for Applied Scientific Computing (CASC) at Lawrence Livermore National
+  Laboratory (LLNL).  The project has two main objectives.  First, SAMRAI enables 
+  the application of SAMR (Structured Adaptive Mesh Refinement) technology to 
+  computational physics problems important to the DOE and the ASCI program.
+  Seecond, SAMRAI supports algorithm research for adaptive methods in
+  high-performance massively-parallel computing environments.  
+ 
+  Questions about this document or the SAMRAI library code should be addressed 
+  to samrai at llnl.gov.
+
+  The SAMRAI framework source code is partitioned into a number of software 
+  ``packages".  Each package contains a collection of classes that are 
+  logically-related with respect to the role they play in structured 
+  AMR applications.  Organizing the SAMRAI library in this fashion aids in 
+  understanding the overall software design and helps to maintain the integrity 
+  of the software architecture.  The packages are listed here in order of their 
+  library compilation dependencies.  This provides insight into the relative 
+  complexity of the classes and indicates which packages are needed when using 
+  parts of the library.  Links to package contents follow the list of 
+  package descriptions.
+
+  - @ref package_toolbox "Toolbox":
+    The "Toolbox" package provides basic, general utility classes that are used 
+    throughout the library and in application development.  The utilities include:
+    memory management via arena mechanisms; smart pointers, arrays and 
+    other container classes; basic MPI utilities; stream classes for packing and 
+    unpacking data during interprocessor communication and reading and writing 
+    to files; tools for managing input and restart files; and event logging, 
+    tracing, and timing.
+
+  - @ref package_hierarchy "Hierarchy":
+    The "Hierarchy" package supports abstract index spaces and box calculus 
+    on which most operations on a structured AMR patch hierarchy depend.
+    Structural classes such as patch, patch level, and patch hierarchy, 
+    and base classes for managing variables and data living on the hierarchy 
+    also reside here.
+
+  - @ref package_transfer "Transfer":
+    The "Transfer" package contains classes that provide routines for 
+    transferring data between patches on an structured AMR hierarchy.  
+    This includes communication algorithms and schedules of transactions
+    for moving data between patches on the same level as well as coarsening 
+    and refining data between different levels.  The package also contains 
+    base classes for operators that refine and coarsen data spatially, 
+    interpolate data in time, and implement physical boundary conditions.
+
+  - @ref package_patchdata "Patchdata":
+    The "Patchdata" package provides support for various concrete patch
+    data types that reside on an structured AMR patch hierarchy.  The
+    data types found here include a variety of array-based quantities
+    (cell-centered, node-centered, face-centered, etc.) as well as 
+    an "index" type for managing data associated with an arbitrary 
+    collection of cell indices (e.g., irregular structures like embedded 
+    boundaries or lists of particles).  Other types may be added in the
+    future to meet the application needs.
+
+  - @ref package_mathematical_operations "Mathematical Operations":
+    The "Math Operations" package provides basic arithmetic and other operations 
+    that are required for vector kernels, such as dot products and norms.  
+    These operations apply to patch data living on a single patch, a single level, 
+    or an entire AMR patch hierarchy.  This support is provided for all array-based 
+    data types in SAMRAI.
+
+  - @ref package_mesh "Mesh":
+    The "Mesh" package contains classes for creating patches during construction 
+    and adaptive regridding of a structured AMR patch hierarchy.  Routines
+    include clustering of tagged cells into box regions (algorithm due to 
+    Berger and Rigoutsos) and load balancing based on on either 
+    spatially-uniform or nonuniform workload estimates.
+ 
+  - @ref package_algorithm "Algorithm":
+    The "Algorithm" package houses classes that are useful for constructing
+    solution algorithms for certain classes of PDE problems on a structured 
+    AMR patch hierarchy.  For example, this package contains time integration 
+    routines, including local time cycling on hierarchy levels, method of lines, 
+    and methods for hyperbolic conservation laws.  Additional algorithmic 
+    support may be introduced to meet application needs as they arise.
+
+  - @ref package_solvers "Solvers":
+    The "Solvers" package contains support for applying linear and nonlinear
+    solver method to problems defined on an AMR patch hierarchy.  Vectors
+    for treating data defined on a structured AMR patch hierarchy are 
+    provided here.  SAMRAI also provides interfaces and wrapper classes for 
+    employing the PETSc and KINSOL nonlinear solver libraries, the CVODE
+    ODE solver library, and the hypre preconditioner library.  An FAC algorithm
+    for solving Poisson problems on an AMR hierarchy is also included.
+
+  - @ref package_geometry "Geometry":
+    The "Geometry" package provides support for specific coordinate 
+    systems on structured AMR patch hierarchies.  This includes mesh 
+    spacing, locations of patches in space, as well as a variety of spatial 
+    refine/coarsen operators and time interpolation operators for 
+    array-based patch data types.  
+
+  - @ref package_apputils "Application Utilities":
+    The ``Application Utilities'' package contains utilities that
+    are useful when construction applications with SAMRAI, such as 
+    routines for setting physical boundary conditions and tools for 
+    generating Vizamrai and VisIt data files.
+
+
+
+  @section using_samrai_dox Using SAMRAI Doxygen-generated Documentation with your Doxygen-generated Documentation 
+
+  If your project uses doxygen and you would like to have your
+  documentation link with SAMRAI's documentation, you will need
+  the <a href="samrai.tag">tag file</a> generated by SAMRAI's doxygen run.
+
+*/
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/ArrayDataBasicOps.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/ArrayDataBasicOps.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1463 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Basic templated opertions for array data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_ArrayDataBasicOps_C
+#define included_math_ArrayDataBasicOps_C
+
+#include "SAMRAI/math/ArrayDataBasicOps.h"
+
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+ArrayDataBasicOps<TYPE>::ArrayDataBasicOps()
+{
+}
+
+template<class TYPE>
+ArrayDataBasicOps<TYPE>::~ArrayDataBasicOps()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * The const constructor and assignment operator are not actually used	*
+ * but are defined here for compilers that require an implementation for	*
+ * every declaration.							*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+ArrayDataBasicOps<TYPE>::ArrayDataBasicOps(
+   const ArrayDataBasicOps<TYPE>& foo)
+{
+   NULL_USE(foo);       // not implemented (but needed by some compilers)
+}
+
+template<class TYPE>
+void ArrayDataBasicOps<TYPE>::operator = (
+   const ArrayDataBasicOps<TYPE>& foo)
+{
+   NULL_USE(foo);       // not implemented (but needed by some compilers)
+}
+
+/*
+ *************************************************************************
+ *									*
+ * General templated operations for array data.                          *
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void ArrayDataBasicOps<TYPE>::scale(
+   pdat::ArrayData<TYPE>& dst,
+   const TYPE& alpha,
+   const pdat::ArrayData<TYPE>& src,
+   const hier::Box& box) const
+{
+// Ignore Intel warning about floating point comparisons
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1572)
+#endif
+
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst, src, box);
+
+   const tbox::Dimension& dim(dst.getDim());
+
+   if (alpha == tbox::MathUtilities<TYPE>::getZero()) {
+      dst.fillAll(alpha, box);
+   } else if (alpha == tbox::MathUtilities<TYPE>::getOne()) {
+      dst.copy(src, box);
+   } else {
+      const int ddepth = dst.getDepth();
+
+      TBOX_ASSERT(ddepth == src.getDepth());
+
+      const hier::Box dst_box = dst.getBox();
+      const hier::Box src_box = src.getBox();
+      const hier::Box ibox = box * dst_box * src_box;
+
+      if (!ibox.empty()) {
+
+         int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int dst_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int src_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int i = 0; i < dim.getValue(); i++) {
+            box_w[i] = ibox.numberCells(i);
+            dst_w[i] = dst_box.numberCells(i);
+            src_w[i] = src_box.numberCells(i);
+            dim_counter[i] = 0;
+         }
+
+         const int dst_offset = dst.getOffset();
+         const int src_offset = src.getOffset();
+
+         const int num_d0_blocks = ibox.size() / box_w[0];
+
+         int dst_begin = dst_box.offset(ibox.lower());
+         int src_begin = src_box.offset(ibox.lower());
+
+         TYPE* dd = dst.getPointer();
+         const TYPE* sd = src.getPointer();
+
+         for (int d = 0; d < ddepth; d++) {
+
+            int dst_counter = dst_begin;
+            int src_counter = src_begin;
+
+            int dst_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+            int src_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+            for (int nd = 0; nd < dim.getValue(); nd++) {
+               dst_b[nd] = dst_counter;
+               src_b[nd] = src_counter;
+            }
+
+            /*
+             * Loop over each contiguous block of data.
+             */
+            for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+               for (int i0 = 0; i0 < box_w[0]; i0++) {
+                  dd[dst_counter + i0] = alpha * sd[src_counter + i0];
+               }
+               int dim_jump = 0;
+
+               for (int j = 1; j < dim.getValue(); j++) {
+                  if (dim_counter[j] < box_w[j] - 1) {
+                     ++dim_counter[j];
+                     dim_jump = j;
+                     break;
+                  } else {
+                     dim_counter[j] = 0;
+                  }
+               }
+
+               if (dim_jump > 0) {
+                  int dst_step = 1;
+                  int src_step = 1;
+                  for (int k = 0; k < dim_jump; k++) {
+                     dst_step *= dst_w[k];
+                     src_step *= src_w[k];
+                  }
+                  dst_counter = dst_b[dim_jump - 1] + dst_step;
+                  src_counter = src_b[dim_jump - 1] + src_step;
+
+                  for (int m = 0; m < dim_jump; m++) {
+                     dst_b[m] = dst_counter;
+                     src_b[m] = src_counter;
+                  }
+
+               }
+            }
+
+            dst_begin += dst_offset;
+            src_begin += src_offset;
+
+         }
+      }
+   }
+}
+
+template<class TYPE>
+void ArrayDataBasicOps<TYPE>::addScalar(
+   pdat::ArrayData<TYPE>& dst,
+   const pdat::ArrayData<TYPE>& src,
+   const TYPE& alpha,
+   const hier::Box& box) const
+{
+// Ignore Intel warning about floating point comparisons
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1572)
+#endif
+
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst, src, box);
+
+   const tbox::Dimension& dim(dst.getDim());
+
+   if (alpha == tbox::MathUtilities<TYPE>::getZero()) {
+      dst.copy(src, box);
+   } else {
+      const int ddepth = dst.getDepth();
+
+      TBOX_ASSERT(ddepth == src.getDepth());
+
+      const hier::Box dst_box = dst.getBox();
+      const hier::Box src_box = src.getBox();
+      const hier::Box ibox = box * dst_box * src_box;
+
+      if (!ibox.empty()) {
+
+         int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int dst_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int src_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int i = 0; i < dim.getValue(); i++) {
+            box_w[i] = ibox.numberCells(i);
+            dst_w[i] = dst_box.numberCells(i);
+            src_w[i] = src_box.numberCells(i);
+            dim_counter[i] = 0;
+         }
+
+         const int dst_offset = dst.getOffset();
+         const int src_offset = src.getOffset();
+
+         const int num_d0_blocks = ibox.size() / box_w[0];
+
+         int dst_begin = dst_box.offset(ibox.lower());
+         int src_begin = src_box.offset(ibox.lower());
+
+         TYPE* dd = dst.getPointer();
+         const TYPE* sd = src.getPointer();
+
+         for (int d = 0; d < ddepth; d++) {
+
+            int dst_counter = dst_begin;
+            int src_counter = src_begin;
+
+            int dst_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+            int src_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+            for (int nd = 0; nd < dim.getValue(); nd++) {
+               dst_b[nd] = dst_counter;
+               src_b[nd] = src_counter;
+            }
+
+            /*
+             * Loop over each contiguous block of data.
+             */
+            for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+               for (int i0 = 0; i0 < box_w[0]; i0++) {
+                  dd[dst_counter + i0] = alpha + sd[src_counter + i0];
+               }
+               int dim_jump = 0;
+
+               for (int j = 1; j < dim.getValue(); j++) {
+                  if (dim_counter[j] < box_w[j] - 1) {
+                     ++dim_counter[j];
+                     dim_jump = j;
+                     break;
+                  } else {
+                     dim_counter[j] = 0;
+                  }
+               }
+
+               if (dim_jump > 0) {
+                  int dst_step = 1;
+                  int src_step = 1;
+                  for (int k = 0; k < dim_jump; k++) {
+                     dst_step *= dst_w[k];
+                     src_step *= src_w[k];
+                  }
+                  dst_counter = dst_b[dim_jump - 1] + dst_step;
+                  src_counter = src_b[dim_jump - 1] + src_step;
+
+                  for (int m = 0; m < dim_jump; m++) {
+                     dst_b[m] = dst_counter;
+                     src_b[m] = src_counter;
+                  }
+
+               }
+            }
+
+            dst_begin += dst_offset;
+            src_begin += src_offset;
+
+         }
+      }
+   }
+}
+
+template<class TYPE>
+void ArrayDataBasicOps<TYPE>::add(
+   pdat::ArrayData<TYPE>& dst,
+   const pdat::ArrayData<TYPE>& src1,
+   const pdat::ArrayData<TYPE>& src2,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst, src1, src2, box);
+
+   const tbox::Dimension& dim(dst.getDim());
+
+   const int ddepth = dst.getDepth();
+
+   TBOX_ASSERT(ddepth == src1.getDepth() && ddepth == src2.getDepth());
+
+   const hier::Box dst_box = dst.getBox();
+   const hier::Box src1_box = src1.getBox();
+   const hier::Box src2_box = src2.getBox();
+   const hier::Box ibox = box * dst_box * src1_box * src2_box;
+
+   if (!ibox.empty()) {
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dst_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int src1_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int src2_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         dst_w[i] = dst_box.numberCells(i);
+         src1_w[i] = src1_box.numberCells(i);
+         src2_w[i] = src2_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int dst_offset = dst.getOffset();
+      const int src1_offset = src1.getOffset();
+      const int src2_offset = src2.getOffset();
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int dst_begin = dst_box.offset(ibox.lower());
+      int src1_begin = src1_box.offset(ibox.lower());
+      int src2_begin = src2_box.offset(ibox.lower());
+
+      TYPE* dd = dst.getPointer();
+      const TYPE* s1d = src1.getPointer();
+      const TYPE* s2d = src2.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int dst_counter = dst_begin;
+         int src1_counter = src1_begin;
+         int src2_counter = src2_begin;
+
+         int dst_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int src1_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int src2_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            dst_b[nd] = dst_counter;
+            src1_b[nd] = src1_counter;
+            src2_b[nd] = src2_counter;
+         }
+
+         /*
+          * Loop over each contiguous block of data.
+          */
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               dd[dst_counter + i0] = s1d[src1_counter + i0]
+                  + s2d[src2_counter + i0];
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int dst_step = 1;
+               int src1_step = 1;
+               int src2_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  dst_step *= dst_w[k];
+                  src1_step *= src1_w[k];
+                  src2_step *= src2_w[k];
+               }
+               dst_counter = dst_b[dim_jump - 1] + dst_step;
+               src1_counter = src1_b[dim_jump - 1] + src1_step;
+               src2_counter = src2_b[dim_jump - 1] + src2_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  dst_b[m] = dst_counter;
+                  src1_b[m] = src1_counter;
+                  src2_b[m] = src2_counter;
+               }
+
+            }
+         }
+
+         dst_begin += dst_offset;
+         src1_begin += src1_offset;
+         src2_begin += src2_offset;
+
+      }
+   }
+}
+
+template<class TYPE>
+void ArrayDataBasicOps<TYPE>::subtract(
+   pdat::ArrayData<TYPE>& dst,
+   const pdat::ArrayData<TYPE>& src1,
+   const pdat::ArrayData<TYPE>& src2,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst, src1, src2, box);
+
+   const tbox::Dimension& dim(dst.getDim());
+
+   const int ddepth = dst.getDepth();
+
+   TBOX_ASSERT(ddepth == src1.getDepth() && ddepth == src2.getDepth());
+
+   const hier::Box dst_box = dst.getBox();
+   const hier::Box src1_box = src1.getBox();
+   const hier::Box src2_box = src2.getBox();
+   const hier::Box ibox = box * dst_box * src1_box * src2_box;
+
+   if (!ibox.empty()) {
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dst_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int src1_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int src2_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         dst_w[i] = dst_box.numberCells(i);
+         src1_w[i] = src1_box.numberCells(i);
+         src2_w[i] = src2_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int dst_offset = dst.getOffset();
+      const int src1_offset = src1.getOffset();
+      const int src2_offset = src2.getOffset();
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int dst_begin = dst_box.offset(ibox.lower());
+      int src1_begin = src1_box.offset(ibox.lower());
+      int src2_begin = src2_box.offset(ibox.lower());
+
+      TYPE* dd = dst.getPointer();
+      const TYPE* s1d = src1.getPointer();
+      const TYPE* s2d = src2.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int dst_counter = dst_begin;
+         int src1_counter = src1_begin;
+         int src2_counter = src2_begin;
+
+         int dst_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int src1_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int src2_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            dst_b[nd] = dst_counter;
+            src1_b[nd] = src1_counter;
+            src2_b[nd] = src2_counter;
+         }
+
+         /*
+          * Loop over each contiguous block of data.
+          */
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               dd[dst_counter + i0] = s1d[src1_counter + i0]
+                  - s2d[src2_counter + i0];
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int dst_step = 1;
+               int src1_step = 1;
+               int src2_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  dst_step *= dst_w[k];
+                  src1_step *= src1_w[k];
+                  src2_step *= src2_w[k];
+               }
+               dst_counter = dst_b[dim_jump - 1] + dst_step;
+               src1_counter = src1_b[dim_jump - 1] + src1_step;
+               src2_counter = src2_b[dim_jump - 1] + src2_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  dst_b[m] = dst_counter;
+                  src1_b[m] = src1_counter;
+                  src2_b[m] = src2_counter;
+               }
+
+            }
+         }
+
+         dst_begin += dst_offset;
+         src1_begin += src1_offset;
+         src2_begin += src2_offset;
+
+      }
+   }
+}
+
+template<class TYPE>
+void ArrayDataBasicOps<TYPE>::multiply(
+   pdat::ArrayData<TYPE>& dst,
+   const pdat::ArrayData<TYPE>& src1,
+   const pdat::ArrayData<TYPE>& src2,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst, src1, src2, box);
+
+   const tbox::Dimension& dim(dst.getDim());
+   const int ddepth = dst.getDepth();
+
+   TBOX_ASSERT(ddepth == src1.getDepth() && ddepth == src2.getDepth());
+
+   const hier::Box dst_box = dst.getBox();
+   const hier::Box src1_box = src1.getBox();
+   const hier::Box src2_box = src2.getBox();
+   const hier::Box ibox = box * dst_box * src1_box * src2_box;
+
+   if (!ibox.empty()) {
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dst_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int src1_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int src2_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         dst_w[i] = dst_box.numberCells(i);
+         src1_w[i] = src1_box.numberCells(i);
+         src2_w[i] = src2_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int dst_offset = dst.getOffset();
+      const int src1_offset = src1.getOffset();
+      const int src2_offset = src2.getOffset();
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int dst_begin = dst_box.offset(ibox.lower());
+      int src1_begin = src1_box.offset(ibox.lower());
+      int src2_begin = src2_box.offset(ibox.lower());
+
+      TYPE* dd = dst.getPointer();
+      const TYPE* s1d = src1.getPointer();
+      const TYPE* s2d = src2.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int dst_counter = dst_begin;
+         int src1_counter = src1_begin;
+         int src2_counter = src2_begin;
+
+         int dst_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int src1_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int src2_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            dst_b[nd] = dst_counter;
+            src1_b[nd] = src1_counter;
+            src2_b[nd] = src2_counter;
+         }
+
+         /*
+          * Loop over each contiguous block of data.
+          */
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               dd[dst_counter + i0] = s1d[src1_counter + i0]
+                  * s2d[src2_counter + i0];
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int dst_step = 1;
+               int src1_step = 1;
+               int src2_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  dst_step *= dst_w[k];
+                  src1_step *= src1_w[k];
+                  src2_step *= src2_w[k];
+               }
+               dst_counter = dst_b[dim_jump - 1] + dst_step;
+               src1_counter = src1_b[dim_jump - 1] + src1_step;
+               src2_counter = src2_b[dim_jump - 1] + src2_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  dst_b[m] = dst_counter;
+                  src1_b[m] = src1_counter;
+                  src2_b[m] = src2_counter;
+               }
+
+            }
+         }
+
+         dst_begin += dst_offset;
+         src1_begin += src1_offset;
+         src2_begin += src2_offset;
+
+      }
+   }
+}
+
+template<class TYPE>
+void ArrayDataBasicOps<TYPE>::divide(
+   pdat::ArrayData<TYPE>& dst,
+   const pdat::ArrayData<TYPE>& src1,
+   const pdat::ArrayData<TYPE>& src2,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst, src1, src2, box);
+
+   const tbox::Dimension& dim(dst.getDim());
+   const int ddepth = dst.getDepth();
+
+   TBOX_ASSERT(ddepth == src1.getDepth() && ddepth == src2.getDepth());
+
+   const hier::Box dst_box = dst.getBox();
+   const hier::Box src1_box = src1.getBox();
+   const hier::Box src2_box = src2.getBox();
+   const hier::Box ibox = box * dst_box * src1_box * src2_box;
+
+   if (!ibox.empty()) {
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dst_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int src1_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int src2_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         dst_w[i] = dst_box.numberCells(i);
+         src1_w[i] = src1_box.numberCells(i);
+         src2_w[i] = src2_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int dst_offset = dst.getOffset();
+      const int src1_offset = src1.getOffset();
+      const int src2_offset = src2.getOffset();
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int dst_begin = dst_box.offset(ibox.lower());
+      int src1_begin = src1_box.offset(ibox.lower());
+      int src2_begin = src2_box.offset(ibox.lower());
+
+      TYPE* dd = dst.getPointer();
+      const TYPE* s1d = src1.getPointer();
+      const TYPE* s2d = src2.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int dst_counter = dst_begin;
+         int src1_counter = src1_begin;
+         int src2_counter = src2_begin;
+
+         int dst_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int src1_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int src2_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            dst_b[nd] = dst_counter;
+            src1_b[nd] = src1_counter;
+            src2_b[nd] = src2_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               dd[dst_counter + i0] = s1d[src1_counter + i0]
+                  / s2d[src2_counter + i0];
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int dst_step = 1;
+               int src1_step = 1;
+               int src2_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  dst_step *= dst_w[k];
+                  src1_step *= src1_w[k];
+                  src2_step *= src2_w[k];
+               }
+               dst_counter = dst_b[dim_jump - 1] + dst_step;
+               src1_counter = src1_b[dim_jump - 1] + src1_step;
+               src2_counter = src2_b[dim_jump - 1] + src2_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  dst_b[m] = dst_counter;
+                  src1_b[m] = src1_counter;
+                  src2_b[m] = src2_counter;
+               }
+
+            }
+         }
+
+         dst_begin += dst_offset;
+         src1_begin += src1_offset;
+         src2_begin += src2_offset;
+
+      }
+   }
+}
+
+template<class TYPE>
+void ArrayDataBasicOps<TYPE>::reciprocal(
+   pdat::ArrayData<TYPE>& dst,
+   const pdat::ArrayData<TYPE>& src,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst, src, box);
+
+   const tbox::Dimension& dim(dst.getDim());
+   const int ddepth = dst.getDepth();
+
+   TBOX_ASSERT(ddepth == src.getDepth());
+
+   const hier::Box dst_box = dst.getBox();
+   const hier::Box src_box = src.getBox();
+   const hier::Box ibox = box * dst_box * src_box;
+
+   if (!ibox.empty()) {
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dst_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int src_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         dst_w[i] = dst_box.numberCells(i);
+         src_w[i] = src_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int dst_offset = dst.getOffset();
+      const int src_offset = src.getOffset();
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int dst_begin = dst_box.offset(ibox.lower());
+      int src_begin = src_box.offset(ibox.lower());
+
+      TYPE* dd = dst.getPointer();
+      const TYPE* sd = src.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int dst_counter = dst_begin;
+         int src_counter = src_begin;
+
+         int dst_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int src_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            dst_b[nd] = dst_counter;
+            src_b[nd] = src_counter;
+         }
+
+         /*
+          * Loop over each contiguous block of data.
+          */
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               dd[dst_counter + i0] =
+                  tbox::MathUtilities<TYPE>::getOne() / sd[src_counter + i0];
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int dst_step = 1;
+               int src_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  dst_step *= dst_w[k];
+                  src_step *= src_w[k];
+               }
+               dst_counter = dst_b[dim_jump - 1] + dst_step;
+               src_counter = src_b[dim_jump - 1] + src_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  dst_b[m] = dst_counter;
+                  src_b[m] = src_counter;
+               }
+
+            }
+         }
+
+         dst_begin += dst_offset;
+         src_begin += src_offset;
+
+      }
+   }
+}
+
+template<class TYPE>
+void ArrayDataBasicOps<TYPE>::linearSum(
+   pdat::ArrayData<TYPE>& dst,
+   const TYPE& alpha,
+   const pdat::ArrayData<TYPE>& src1,
+   const TYPE& beta,
+   const pdat::ArrayData<TYPE>& src2,
+   const hier::Box& box) const
+{
+// Ignore Intel warning about floating point comparisons
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1572)
+#endif
+
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst, src1, src2, box);
+
+   const tbox::Dimension& dim(dst.getDim());
+   const int ddepth = dst.getDepth();
+
+   TBOX_ASSERT(ddepth == src1.getDepth() && ddepth == src2.getDepth());
+
+   if (alpha == tbox::MathUtilities<TYPE>::getZero()) {
+      if (beta == tbox::MathUtilities<TYPE>::getZero()) {
+         dst.fillAll(tbox::MathUtilities<TYPE>::getZero(), box);
+      } else {
+         scale(dst, beta, src2, box);
+      }
+   } else if (beta == tbox::MathUtilities<TYPE>::getZero()) {
+      scale(dst, alpha, src1, box);
+   } else if (alpha == tbox::MathUtilities<TYPE>::getOne()) {
+      axpy(dst, beta, src2, src1, box);
+   } else if (beta == tbox::MathUtilities<TYPE>::getOne()) {
+      axpy(dst, alpha, src1, src2, box);
+   } else if (alpha == -tbox::MathUtilities<TYPE>::getOne()) {
+      axmy(dst, beta, src2, src1, box);
+   } else if (beta == -tbox::MathUtilities<TYPE>::getOne()) {
+      axmy(dst, alpha, src1, src2, box);
+   } else {
+
+      const hier::Box dst_box = dst.getBox();
+      const hier::Box src1_box = src1.getBox();
+      const hier::Box src2_box = src2.getBox();
+      const hier::Box ibox = box * dst_box * src1_box * src2_box;
+
+      if (!ibox.empty()) {
+
+         int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int dst_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int src1_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int src2_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int i = 0; i < dim.getValue(); i++) {
+            box_w[i] = ibox.numberCells(i);
+            dst_w[i] = dst_box.numberCells(i);
+            src1_w[i] = src1_box.numberCells(i);
+            src2_w[i] = src2_box.numberCells(i);
+            dim_counter[i] = 0;
+         }
+
+         const int dst_offset = dst.getOffset();
+         const int src1_offset = src1.getOffset();
+         const int src2_offset = src2.getOffset();
+
+         const int num_d0_blocks = ibox.size() / box_w[0];
+
+         int dst_begin = dst_box.offset(ibox.lower());
+         int src1_begin = src1_box.offset(ibox.lower());
+         int src2_begin = src2_box.offset(ibox.lower());
+
+         TYPE* dd = dst.getPointer();
+         const TYPE* s1d = src1.getPointer();
+         const TYPE* s2d = src2.getPointer();
+
+         for (int d = 0; d < ddepth; d++) {
+
+            int dst_counter = dst_begin;
+            int src1_counter = src1_begin;
+            int src2_counter = src2_begin;
+
+            int dst_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+            int src1_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+            int src2_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+            for (int nd = 0; nd < dim.getValue(); nd++) {
+               dst_b[nd] = dst_counter;
+               src1_b[nd] = src1_counter;
+               src2_b[nd] = src2_counter;
+            }
+
+            /*
+             * Loop over each contiguous block of data.
+             */
+            for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+               for (int i0 = 0; i0 < box_w[0]; i0++) {
+                  dd[dst_counter + i0] = alpha * s1d[src1_counter + i0]
+                     + beta * s2d[src2_counter + i0];
+               }
+               int dim_jump = 0;
+
+               for (int j = 1; j < dim.getValue(); j++) {
+                  if (dim_counter[j] < box_w[j] - 1) {
+                     ++dim_counter[j];
+                     dim_jump = j;
+                     break;
+                  } else {
+                     dim_counter[j] = 0;
+                  }
+               }
+
+               if (dim_jump > 0) {
+                  int dst_step = 1;
+                  int src1_step = 1;
+                  int src2_step = 1;
+                  for (int k = 0; k < dim_jump; k++) {
+                     dst_step *= dst_w[k];
+                     src1_step *= src1_w[k];
+                     src2_step *= src2_w[k];
+                  }
+                  dst_counter = dst_b[dim_jump - 1] + dst_step;
+                  src1_counter = src1_b[dim_jump - 1] + src1_step;
+                  src2_counter = src2_b[dim_jump - 1] + src2_step;
+
+                  for (int m = 0; m < dim_jump; m++) {
+                     dst_b[m] = dst_counter;
+                     src1_b[m] = src1_counter;
+                     src2_b[m] = src2_counter;
+                  }
+
+               }
+            }
+
+            dst_begin += dst_offset;
+            src1_begin += src1_offset;
+            src2_begin += src2_offset;
+
+         }
+      }
+   }
+}
+
+template<class TYPE>
+void ArrayDataBasicOps<TYPE>::axpy(
+   pdat::ArrayData<TYPE>& dst,
+   const TYPE& alpha,
+   const pdat::ArrayData<TYPE>& src1,
+   const pdat::ArrayData<TYPE>& src2,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst, src1, src2, box);
+
+   const tbox::Dimension& dim(dst.getDim());
+
+   if (alpha == tbox::MathUtilities<TYPE>::getZero()) {
+      dst.copy(src2, box);
+   } else if (alpha == tbox::MathUtilities<TYPE>::getOne()) {
+      add(dst, src1, src2, box);
+   } else if (alpha == -tbox::MathUtilities<TYPE>::getOne()) {
+      subtract(dst, src2, src1, box);
+   } else {
+      const int ddepth = dst.getDepth();
+
+      TBOX_ASSERT(ddepth == src1.getDepth() && ddepth == src2.getDepth());
+
+      const hier::Box dst_box = dst.getBox();
+      const hier::Box src1_box = src1.getBox();
+      const hier::Box src2_box = src2.getBox();
+      const hier::Box ibox = box * dst_box * src1_box * src2_box;
+
+      if (!ibox.empty()) {
+
+         int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int dst_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int src1_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int src2_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int i = 0; i < dim.getValue(); i++) {
+            box_w[i] = ibox.numberCells(i);
+            dst_w[i] = dst_box.numberCells(i);
+            src1_w[i] = src1_box.numberCells(i);
+            src2_w[i] = src2_box.numberCells(i);
+            dim_counter[i] = 0;
+         }
+
+         const int dst_offset = dst.getOffset();
+         const int src1_offset = src1.getOffset();
+         const int src2_offset = src2.getOffset();
+
+         const int num_d0_blocks = ibox.size() / box_w[0];
+
+         int dst_begin = dst_box.offset(ibox.lower());
+         int src1_begin = src1_box.offset(ibox.lower());
+         int src2_begin = src2_box.offset(ibox.lower());
+
+         TYPE* dd = dst.getPointer();
+         const TYPE* s1d = src1.getPointer();
+         const TYPE* s2d = src2.getPointer();
+
+         for (int d = 0; d < ddepth; d++) {
+
+            int dst_counter = dst_begin;
+            int src1_counter = src1_begin;
+            int src2_counter = src2_begin;
+
+            int dst_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+            int src1_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+            int src2_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+            for (int nd = 0; nd < dim.getValue(); nd++) {
+               dst_b[nd] = dst_counter;
+               src1_b[nd] = src1_counter;
+               src2_b[nd] = src2_counter;
+            }
+
+            /*
+             * Loop over each contiguous block of data.
+             */
+            for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+               for (int i0 = 0; i0 < box_w[0]; i0++) {
+                  dd[dst_counter + i0] = alpha * s1d[src1_counter + i0]
+                     + s2d[src2_counter + i0];
+               }
+               int dim_jump = 0;
+
+               for (int j = 1; j < dim.getValue(); j++) {
+                  if (dim_counter[j] < box_w[j] - 1) {
+                     ++dim_counter[j];
+                     dim_jump = j;
+                     break;
+                  } else {
+                     dim_counter[j] = 0;
+                  }
+               }
+
+               if (dim_jump > 0) {
+                  int dst_step = 1;
+                  int src1_step = 1;
+                  int src2_step = 1;
+                  for (int k = 0; k < dim_jump; k++) {
+                     dst_step *= dst_w[k];
+                     src1_step *= src1_w[k];
+                     src2_step *= src2_w[k];
+                  }
+                  dst_counter = dst_b[dim_jump - 1] + dst_step;
+                  src1_counter = src1_b[dim_jump - 1] + src1_step;
+                  src2_counter = src2_b[dim_jump - 1] + src2_step;
+
+                  for (int m = 0; m < dim_jump; m++) {
+                     dst_b[m] = dst_counter;
+                     src1_b[m] = src1_counter;
+                     src2_b[m] = src2_counter;
+                  }
+
+               }
+            }
+
+            dst_begin += dst_offset;
+            src1_begin += src1_offset;
+            src2_begin += src2_offset;
+
+         }
+      }
+   }
+}
+
+template<class TYPE>
+void ArrayDataBasicOps<TYPE>::axmy(
+   pdat::ArrayData<TYPE>& dst,
+   const TYPE& alpha,
+   const pdat::ArrayData<TYPE>& src1,
+   const pdat::ArrayData<TYPE>& src2,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst, src1, src2, box);
+
+   const tbox::Dimension& dim(dst.getDim());
+
+   if (alpha == tbox::MathUtilities<TYPE>::getZero()) {
+      scale(dst, -tbox::MathUtilities<TYPE>::getOne(), src2, box);
+   } else if (alpha == tbox::MathUtilities<TYPE>::getOne()) {
+      subtract(dst, src1, src2, box);
+   } else {
+      const int ddepth = dst.getDepth();
+
+      TBOX_ASSERT(ddepth == src1.getDepth() && ddepth == src2.getDepth());
+
+      const hier::Box dst_box = dst.getBox();
+      const hier::Box src1_box = src1.getBox();
+      const hier::Box src2_box = src2.getBox();
+      const hier::Box ibox = box * dst_box * src1_box * src2_box;
+
+      if (!ibox.empty()) {
+
+         int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int dst_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int src1_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int src2_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int i = 0; i < dim.getValue(); i++) {
+            box_w[i] = ibox.numberCells(i);
+            dst_w[i] = dst_box.numberCells(i);
+            src1_w[i] = src1_box.numberCells(i);
+            src2_w[i] = src2_box.numberCells(i);
+            dim_counter[i] = 0;
+         }
+
+         const int dst_offset = dst.getOffset();
+         const int src1_offset = src1.getOffset();
+         const int src2_offset = src2.getOffset();
+
+         const int num_d0_blocks = ibox.size() / box_w[0];
+
+         int dst_begin = dst_box.offset(ibox.lower());
+         int src1_begin = src1_box.offset(ibox.lower());
+         int src2_begin = src2_box.offset(ibox.lower());
+
+         TYPE* dd = dst.getPointer();
+         const TYPE* s1d = src1.getPointer();
+         const TYPE* s2d = src2.getPointer();
+
+         for (int d = 0; d < ddepth; d++) {
+
+            int dst_counter = dst_begin;
+            int src1_counter = src1_begin;
+            int src2_counter = src2_begin;
+
+            int dst_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+            int src1_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+            int src2_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+            for (int nd = 0; nd < dim.getValue(); nd++) {
+               dst_b[nd] = dst_counter;
+               src1_b[nd] = src1_counter;
+               src2_b[nd] = src2_counter;
+            }
+
+            /*
+             * Loop over each contiguous block of data.
+             */
+            for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+               for (int i0 = 0; i0 < box_w[0]; i0++) {
+                  dd[dst_counter + i0] = alpha * s1d[src1_counter + i0]
+                     - s2d[src2_counter + i0];
+               }
+               int dim_jump = 0;
+
+               for (int j = 1; j < dim.getValue(); j++) {
+                  if (dim_counter[j] < box_w[j] - 1) {
+                     ++dim_counter[j];
+                     dim_jump = j;
+                     break;
+                  } else {
+                     dim_counter[j] = 0;
+                  }
+               }
+
+               if (dim_jump > 0) {
+                  int dst_step = 1;
+                  int src1_step = 1;
+                  int src2_step = 1;
+                  for (int k = 0; k < dim_jump; k++) {
+                     dst_step *= dst_w[k];
+                     src1_step *= src1_w[k];
+                     src2_step *= src2_w[k];
+                  }
+                  dst_counter = dst_b[dim_jump - 1] + dst_step;
+                  src1_counter = src1_b[dim_jump - 1] + src1_step;
+                  src2_counter = src2_b[dim_jump - 1] + src2_step;
+
+                  for (int m = 0; m < dim_jump; m++) {
+                     dst_b[m] = dst_counter;
+                     src1_b[m] = src1_counter;
+                     src2_b[m] = src2_counter;
+                  }
+
+               }
+            }
+
+            dst_begin += dst_offset;
+            src1_begin += src1_offset;
+            src2_begin += src2_offset;
+
+         }
+      }
+   }
+}
+
+template<class TYPE>
+TYPE ArrayDataBasicOps<TYPE>::min(
+   const pdat::ArrayData<TYPE>& data,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(data, box);
+
+   const tbox::Dimension& dim(data.getDim());
+   TYPE minval = tbox::MathUtilities<TYPE>::getMax();
+
+   const hier::Box d_box = data.getBox();
+   const hier::Box ibox = box * d_box;
+
+   if (!ibox.empty()) {
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         d_w[i] = d_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d_offset = data.getOffset();
+
+      int d_begin = d_box.offset(ibox.lower());
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      const int ddepth = data.getDepth();
+
+      const TYPE* dd = data.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int d_counter = d_begin;
+
+         int d_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d_b[nd] = d_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               minval =
+                  tbox::MathUtilities<TYPE>::Min(minval, dd[d_counter + i0]);
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+            if (dim_jump > 0) {
+               int d_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d_step *= d_w[k];
+               }
+               d_counter = d_b[dim_jump - 1] + d_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d_b[m] = d_counter;
+               }
+            }
+         }
+
+         d_begin += d_offset;
+      }
+   }
+
+   return minval;
+}
+
+template<class TYPE>
+TYPE ArrayDataBasicOps<TYPE>::max(
+   const pdat::ArrayData<TYPE>& data,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(data, box);
+
+   const tbox::Dimension& dim(data.getDim());
+   TYPE maxval = -(tbox::MathUtilities<TYPE>::getMax());
+
+   const hier::Box d_box = data.getBox();
+   const hier::Box ibox = box * d_box;
+
+   if (!ibox.empty()) {
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         d_w[i] = d_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d_offset = data.getOffset();
+
+      int d_begin = d_box.offset(ibox.lower());
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      const int ddepth = data.getDepth();
+
+      const TYPE* dd = data.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int d_counter = d_begin;
+
+         int d_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d_b[nd] = d_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               maxval =
+                  tbox::MathUtilities<TYPE>::Max(maxval, dd[d_counter + i0]);
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+            if (dim_jump > 0) {
+               int d_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d_step *= d_w[k];
+               }
+               d_counter = d_b[dim_jump - 1] + d_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d_b[m] = d_counter;
+               }
+            }
+         }
+
+         d_begin += d_offset;
+      }
+   }
+
+   return maxval;
+}
+
+template<class TYPE>
+void ArrayDataBasicOps<TYPE>::setRandomValues(
+   pdat::ArrayData<TYPE>& dst,
+   const TYPE& width,
+   const TYPE& low,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(dst, box);
+
+   const tbox::Dimension& dim(dst.getDim());
+   const hier::Box d_box = dst.getBox();
+   const hier::Box ibox = box * d_box;
+
+   if (!ibox.empty()) {
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         d_w[i] = d_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d_offset = dst.getOffset();
+
+      int d_begin = d_box.offset(ibox.lower());
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      const int ddepth = dst.getDepth();
+
+      TYPE* dd = dst.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int d_counter = d_begin;
+
+         int d_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d_b[nd] = d_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               dd[d_counter + i0] = tbox::MathUtilities<TYPE>::Rand(low, width);
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+            if (dim_jump > 0) {
+               int d_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d_step *= d_w[k];
+               }
+               d_counter = d_b[dim_jump - 1] + d_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d_b[m] = d_counter;
+               }
+            }
+         }
+
+         d_begin += d_offset;
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/ArrayDataBasicOps.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/ArrayDataBasicOps.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,211 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Basic templated operations for array data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_ArrayDataBasicOps
+#define included_math_ArrayDataBasicOps
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/ArrayData.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class ArrayDataBasicOps implements a set of basic operations
+ * that apply to numerical data maintained as pdat::ArrayData<DIM> objects.
+ * These operations include simple arithmetic operations as well as min
+ * and max, etc.  This class provides a single implementation of these
+ * operations that may used to manipulate any of the standard array-based
+ * patch data types defined on a patch.  Note that each member function
+ * accepts a box argument which specifies the portion of the array data
+ * on which the associated operation is performed.   The actual index
+ * region on which the operation occurs is the intersection of this box
+ * and the boxes of all the pdat::ArrayData<DIM> objects involved.
+ *
+ * These operations typically apply only to the numerical standard built-in
+ * types, such as double, float, and int, and the complex type (which may or
+ * may not be a built-in type depending on the C++ compiler).  Thus, this
+ * templated class should only be used to instantiate objects with those
+ * types as the template parameter.  Those operations whose implementations
+ * depend of the data type are specialized for each numerical type.  To use
+ * this class with other standard types or user-defined types (which may or
+ * may not make sense), the member functions must be specialized so that the
+ * correct operations are performed.
+ *
+ * @see pdat::ArrayData
+ */
+
+template<class TYPE>
+class ArrayDataBasicOps
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   ArrayDataBasicOps();
+
+   ~ArrayDataBasicOps<TYPE>();
+
+   /**
+    * Set dst = alpha * src, elementwise.
+    */
+   void
+   scale(
+      pdat::ArrayData<TYPE>& dst,
+      const TYPE& alpha,
+      const pdat::ArrayData<TYPE>& src,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src + alpha, elementwise.
+    */
+   void
+   addScalar(
+      pdat::ArrayData<TYPE>& dst,
+      const pdat::ArrayData<TYPE>& src,
+      const TYPE& alpha,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src1 + src2, elementwise.
+    */
+   void
+   add(
+      pdat::ArrayData<TYPE>& dst,
+      const pdat::ArrayData<TYPE>& src1,
+      const pdat::ArrayData<TYPE>& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src1 - src2, elementwise.
+    */
+   void
+   subtract(
+      pdat::ArrayData<TYPE>& dst,
+      const pdat::ArrayData<TYPE>& src1,
+      const pdat::ArrayData<TYPE>& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src1 * src2, elementwise.
+    */
+   void
+   multiply(
+      pdat::ArrayData<TYPE>& dst,
+      const pdat::ArrayData<TYPE>& src1,
+      const pdat::ArrayData<TYPE>& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src1 / src2, elementwise.  No check for division by zero.
+    */
+   void
+   divide(
+      pdat::ArrayData<TYPE>& dst,
+      const pdat::ArrayData<TYPE>& src1,
+      const pdat::ArrayData<TYPE>& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = 1 / src, elementwise.  No check for division by zero.
+    */
+   void
+   reciprocal(
+      pdat::ArrayData<TYPE>& dst,
+      const pdat::ArrayData<TYPE>& src,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = alpha * src1 + beta * src2, elementwise.
+    */
+   void
+   linearSum(
+      pdat::ArrayData<TYPE>& dst,
+      const TYPE& alpha,
+      const pdat::ArrayData<TYPE>& src1,
+      const TYPE& beta,
+      const pdat::ArrayData<TYPE>& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = alpha * src1 + src2, elementwise.
+    */
+   void
+   axpy(
+      pdat::ArrayData<TYPE>& dst,
+      const TYPE& alpha,
+      const pdat::ArrayData<TYPE>& src1,
+      const pdat::ArrayData<TYPE>& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = alpha * src1 - src2, elementwise.
+    */
+   void
+   axmy(
+      pdat::ArrayData<TYPE>& dst,
+      const TYPE& alpha,
+      const pdat::ArrayData<TYPE>& src1,
+      const pdat::ArrayData<TYPE>& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Return the minimum array data entry.  If data is complex, return the
+    * array data entry with the minimum norm.
+    */
+   TYPE
+   min(
+      const pdat::ArrayData<TYPE>& data,
+      const hier::Box& box) const;
+
+   /**
+    * Return the maximum array data entry.  If data is complex, return the
+    * array data entry with the maximum norm.
+    */
+   TYPE
+   max(
+      const pdat::ArrayData<TYPE>& data,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst to random values.  If the data is int, each element of dst
+    * is set as dst = mrand48(). If the data is double or float, each
+    * element of dst is set as dst = width * drand48() + low.  If the
+    * data is complex, each element of dst is set as dst = dcomplex(rval, ival),
+    * where rval = real(width) * drand48() + real(low), and
+    * ival = imag(width) * drand48() + imag(low).
+    */
+   void
+   setRandomValues(
+      pdat::ArrayData<TYPE>& dst,
+      const TYPE& width,
+      const TYPE& low,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   ArrayDataBasicOps(
+      const ArrayDataBasicOps<TYPE>&);
+   void
+   operator = (
+      const ArrayDataBasicOps<TYPE>&);
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/ArrayDataBasicOps.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,954 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Miscellaneous templated operations for real array data 
+ *
+ ************************************************************************/
+
+#ifndef included_math_ArrayDataMiscellaneousOpsReal_C
+#define included_math_ArrayDataMiscellaneousOpsReal_C
+
+#include "SAMRAI/math/ArrayDataMiscellaneousOpsReal.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+ArrayDataMiscellaneousOpsReal<TYPE>::ArrayDataMiscellaneousOpsReal()
+{
+}
+
+template<class TYPE>
+ArrayDataMiscellaneousOpsReal<TYPE>::~ArrayDataMiscellaneousOpsReal()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * The const constructor and assignment operator are not actually used	*
+ * but are defined here for compilers that require an implementation for	*
+ * every declaration.							*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+ArrayDataMiscellaneousOpsReal<TYPE>::ArrayDataMiscellaneousOpsReal(
+   const ArrayDataMiscellaneousOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void ArrayDataMiscellaneousOpsReal<TYPE>::operator = (
+   const ArrayDataMiscellaneousOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * General templated miscellaneous operations for array data.            *
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+int
+ArrayDataMiscellaneousOpsReal<TYPE>::computeConstrProdPosWithControlVolume(
+   const pdat::ArrayData<TYPE>& data1,
+   const pdat::ArrayData<TYPE>& data2,
+   const pdat::ArrayData<double>& cvol,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS4(data1, data2, cvol, box);
+   TBOX_ASSERT(data1.getDepth() == data2.getDepth());
+
+   const tbox::Dimension& dim(data1.getDim());
+
+   int test = 1;
+
+   const hier::Box d1_box = data1.getBox();
+   const hier::Box d2_box = data2.getBox();
+   const hier::Box cv_box = cvol.getBox();
+   const hier::Box ibox = box * d1_box * d2_box * cv_box;
+
+   if (!ibox.empty()) {
+      const int ddepth = data1.getDepth();
+      const int cvdepth = cvol.getDepth();
+      TBOX_ASSERT((ddepth == cvdepth) || (cvdepth == 1));
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d1_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d2_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int cv_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         d1_w[i] = d1_box.numberCells(i);
+         d2_w[i] = d2_box.numberCells(i);
+         cv_w[i] = cv_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d1_offset = data1.getOffset();
+      const int d2_offset = data2.getOffset();
+      const int cv_offset = ((cvdepth == 1) ? 0 : cvol.getOffset());
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int d1_begin = d1_box.offset(ibox.lower());
+      int d2_begin = d2_box.offset(ibox.lower());
+      int cv_begin = cv_box.offset(ibox.lower());
+
+      const TYPE* dd1 = data1.getPointer();
+      const TYPE* dd2 = data2.getPointer();
+      const double* cvd = cvol.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int d1_counter = d1_begin;
+         int d2_counter = d2_begin;
+         int cv_counter = cv_begin;
+
+         int d1_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int d2_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int cv_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d1_b[nd] = d1_counter;
+            d2_b[nd] = d2_counter;
+            cv_b[nd] = cv_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               if (cvd[cv_counter + i0] > 0.0) {
+                  if (tbox::MathUtilities<TYPE>::Abs(dd2[d2_counter + i0]) >
+                      0.0
+                      && (dd1[d1_counter + i0] * dd2[d2_counter + i0] <= 0.0)
+                      ) {
+                     test = 0;
+                  }
+               }
+            }
+
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int d1_step = 1;
+               int d2_step = 1;
+               int cv_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d1_step *= d1_w[k];
+                  d2_step *= d2_w[k];
+                  cv_step *= cv_w[k];
+               }
+               d1_counter = d1_b[dim_jump - 1] + d1_step;
+               d2_counter = d2_b[dim_jump - 1] + d1_step;
+               cv_counter = cv_b[dim_jump - 1] + cv_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d1_b[m] = d1_counter;
+                  d2_b[m] = d2_counter;
+                  cv_b[m] = cv_counter;
+               }
+            }
+
+         }
+
+         d1_begin += d1_offset;
+         d2_begin += d2_offset;
+         cv_begin += cv_offset;
+      }
+
+   }
+
+   return test;
+}
+
+template<class TYPE>
+int
+ArrayDataMiscellaneousOpsReal<TYPE>::computeConstrProdPos(
+   const pdat::ArrayData<TYPE>& data1,
+   const pdat::ArrayData<TYPE>& data2,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(data1, data2, box);
+   TBOX_ASSERT(data1.getDepth() == data2.getDepth());
+
+   const tbox::Dimension& dim(data1.getDim());
+
+   int test = 1;
+
+   const hier::Box d1_box = data1.getBox();
+   const hier::Box d2_box = data2.getBox();
+   const hier::Box ibox = box * d1_box * d2_box;
+
+   if (!ibox.empty()) {
+      const int ddepth = data1.getDepth();
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d1_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d2_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         d1_w[i] = d1_box.numberCells(i);
+         d2_w[i] = d2_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d1_offset = data1.getOffset();
+      const int d2_offset = data2.getOffset();
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int d1_begin = d1_box.offset(ibox.lower());
+      int d2_begin = d2_box.offset(ibox.lower());
+
+      const TYPE* dd1 = data1.getPointer();
+      const TYPE* dd2 = data2.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int d1_counter = d1_begin;
+         int d2_counter = d2_begin;
+
+         int d1_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int d2_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d1_b[nd] = d1_counter;
+            d2_b[nd] = d2_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               if (tbox::MathUtilities<TYPE>::Abs(dd2[d2_counter + i0]) > 0.0
+                   && (dd1[d1_counter + i0] * dd2[d2_counter + i0] <= 0.0)) {
+                  test = 0;
+               }
+            }
+
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int d1_step = 1;
+               int d2_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d1_step *= d1_w[k];
+                  d2_step *= d2_w[k];
+               }
+               d1_counter = d1_b[dim_jump - 1] + d1_step;
+               d2_counter = d2_b[dim_jump - 1] + d1_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d1_b[m] = d1_counter;
+                  d2_b[m] = d2_counter;
+               }
+            }
+
+         }
+
+         d1_begin += d1_offset;
+         d2_begin += d2_offset;
+      }
+
+   }
+
+   return test;
+}
+
+template<class TYPE>
+void
+ArrayDataMiscellaneousOpsReal<TYPE>::compareToScalarWithControlVolume(
+   pdat::ArrayData<TYPE>& dst,
+   const pdat::ArrayData<TYPE>& src,
+   const TYPE& alpha,
+   const pdat::ArrayData<double>& cvol,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst, src, cvol, box);
+   TBOX_ASSERT(dst.getDepth() == src.getDepth());
+
+   const tbox::Dimension& dim(dst.getDim());
+
+   const hier::Box d_box = dst.getBox();
+   const hier::Box s_box = src.getBox();
+   const hier::Box cv_box = cvol.getBox();
+   const hier::Box ibox = box * d_box * s_box * cv_box;
+
+   if (!ibox.empty()) {
+      const int ddepth = dst.getDepth();
+      const int cvdepth = cvol.getDepth();
+
+      TBOX_ASSERT((ddepth == cvdepth) || (cvdepth == 1));
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int s_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int cv_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         d_w[i] = d_box.numberCells(i);
+         s_w[i] = s_box.numberCells(i);
+         cv_w[i] = cv_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d_offset = dst.getOffset();
+      const int s_offset = src.getOffset();
+      const int cv_offset = ((cvdepth == 1) ? 0 : cvol.getOffset());
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int d_begin = d_box.offset(ibox.lower());
+      int s_begin = s_box.offset(ibox.lower());
+      int cv_begin = cv_box.offset(ibox.lower());
+
+      TYPE* dd = dst.getPointer();
+      const TYPE* sd = src.getPointer();
+      const double* cvd = cvol.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int d_counter = d_begin;
+         int s_counter = s_begin;
+         int cv_counter = cv_begin;
+
+         int d_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int s_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int cv_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d_b[nd] = d_counter;
+            s_b[nd] = s_counter;
+            cv_b[nd] = cv_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+
+               if (cvd[cv_counter + i0] > 0.0) {
+                  dd[d_counter + i0] = (
+                        (tbox::MathUtilities<TYPE>::Abs(sd[s_counter + i0]) >=
+                         alpha)
+                        ? 1.0F : 0.0F);
+               }
+            }
+
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int d_step = 1;
+               int s_step = 1;
+               int cv_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d_step *= d_w[k];
+                  s_step *= s_w[k];
+                  cv_step *= cv_w[k];
+               }
+               d_counter = d_b[dim_jump - 1] + d_step;
+               s_counter = s_b[dim_jump - 1] + s_step;
+               cv_counter = cv_b[dim_jump - 1] + cv_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d_b[m] = d_counter;
+                  s_b[m] = s_counter;
+                  cv_b[m] = cv_counter;
+               }
+            }
+         }
+
+         d_begin += d_offset;
+         s_begin += s_offset;
+         cv_begin += cv_offset;
+      }
+
+   }
+}
+
+template<class TYPE>
+void
+ArrayDataMiscellaneousOpsReal<TYPE>::compareToScalar(
+   pdat::ArrayData<TYPE>& dst,
+   const pdat::ArrayData<TYPE>& src,
+   const TYPE& alpha,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst, src, box);
+   TBOX_ASSERT(dst.getDepth() == src.getDepth());
+
+   const tbox::Dimension& dim(dst.getDim());
+
+   const hier::Box d_box = dst.getBox();
+   const hier::Box s_box = src.getBox();
+   const hier::Box ibox = box * d_box * s_box;
+
+   if (!ibox.empty()) {
+
+      const int ddepth = dst.getDepth();
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int s_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         d_w[i] = d_box.numberCells(i);
+         s_w[i] = s_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d_offset = dst.getOffset();
+      const int s_offset = src.getOffset();
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int d_begin = d_box.offset(ibox.lower());
+      int s_begin = s_box.offset(ibox.lower());
+
+      TYPE* dd = dst.getPointer();
+      const TYPE* sd = src.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int d_counter = d_begin;
+         int s_counter = s_begin;
+
+         int d_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int s_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d_b[nd] = d_counter;
+            s_b[nd] = s_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               dd[d_counter + i0] = (
+                     (tbox::MathUtilities<TYPE>::Abs(sd[s_counter + i0]) >=
+                      alpha)
+                     ? 1.0F : 0.0F);
+            }
+
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int d_step = 1;
+               int s_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d_step *= d_w[k];
+                  s_step *= s_w[k];
+               }
+               d_counter = d_b[dim_jump - 1] + d_step;
+               s_counter = s_b[dim_jump - 1] + s_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d_b[m] = d_counter;
+                  s_b[m] = s_counter;
+               }
+            }
+         }
+
+         d_begin += d_offset;
+         s_begin += s_offset;
+      }
+
+   }
+}
+
+template<class TYPE>
+int
+ArrayDataMiscellaneousOpsReal<TYPE>::testReciprocalWithControlVolume(
+   pdat::ArrayData<TYPE>& dst,
+   const pdat::ArrayData<TYPE>& src,
+   const pdat::ArrayData<double>& cvol,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst, src, cvol, box);
+   TBOX_ASSERT(dst.getDepth() == src.getDepth());
+
+// Ignore Intel warning about floating point comparisons
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1572)
+#endif
+
+   const tbox::Dimension& dim(dst.getDim());
+
+   int test = 1;
+
+   const hier::Box d_box = dst.getBox();
+   const hier::Box s_box = src.getBox();
+   const hier::Box cv_box = cvol.getBox();
+   const hier::Box ibox = box * d_box * s_box * cv_box;
+
+   if (!ibox.empty()) {
+      const int ddepth = dst.getDepth();
+      const int cvdepth = cvol.getDepth();
+
+      TBOX_ASSERT((ddepth == cvdepth) || (cvdepth == 1));
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int s_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int cv_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         d_w[i] = d_box.numberCells(i);
+         s_w[i] = s_box.numberCells(i);
+         cv_w[i] = cv_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d_offset = dst.getOffset();
+      const int s_offset = src.getOffset();
+      const int cv_offset = ((cvdepth == 1) ? 0 : cvol.getOffset());
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int d_begin = d_box.offset(ibox.lower());
+      int s_begin = s_box.offset(ibox.lower());
+      int cv_begin = cv_box.offset(ibox.lower());
+
+      TYPE* dd = dst.getPointer();
+      const TYPE* sd = src.getPointer();
+      const double* cvd = cvol.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int d_counter = d_begin;
+         int s_counter = s_begin;
+         int cv_counter = cv_begin;
+
+         int d_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int s_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int cv_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d_b[nd] = d_counter;
+            s_b[nd] = s_counter;
+            cv_b[nd] = cv_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               if (cvd[cv_counter + i0] > 0.0) {
+                  if (sd[s_counter + i0] == 0.0) {
+                     test = 0;
+                     dd[d_counter + i0] = 0.0;
+                  } else {
+                     dd[d_counter + i0] = 1.0F / sd[s_counter + i0];
+                  }
+               }
+            }
+
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+            if (dim_jump > 0) {
+               int d_step = 1;
+               int s_step = 1;
+               int cv_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d_step *= d_w[k];
+                  s_step *= s_w[k];
+                  cv_step *= cv_w[k];
+               }
+               d_counter = d_b[dim_jump - 1] + d_step;
+               s_counter = s_b[dim_jump - 1] + s_step;
+               cv_counter = cv_b[dim_jump - 1] + cv_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d_b[m] = d_counter;
+                  s_b[m] = s_counter;
+                  cv_b[m] = cv_counter;
+               }
+            }
+         }
+
+         d_begin += d_offset;
+         s_begin += s_offset;
+         cv_begin += cv_offset;
+      }
+
+   }
+
+   return test;
+}
+
+template<class TYPE>
+int
+ArrayDataMiscellaneousOpsReal<TYPE>::testReciprocal(
+   pdat::ArrayData<TYPE>& dst,
+   const pdat::ArrayData<TYPE>& src,
+   const hier::Box& box) const
+{
+// Ignore Intel warning about floating point comparisons
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1572)
+#endif
+
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst, src, box);
+   TBOX_ASSERT(dst.getDepth() == src.getDepth());
+
+   const tbox::Dimension& dim(dst.getDim());
+
+   int test = 1;
+
+   const hier::Box d_box = dst.getBox();
+   const hier::Box s_box = src.getBox();
+   const hier::Box ibox = box * d_box * s_box;
+
+   if (!ibox.empty()) {
+      const int ddepth = dst.getDepth();
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int s_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         d_w[i] = d_box.numberCells(i);
+         s_w[i] = s_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d_offset = dst.getOffset();
+      const int s_offset = src.getOffset();
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int d_begin = d_box.offset(ibox.lower());
+      int s_begin = s_box.offset(ibox.lower());
+
+      TYPE* dd = dst.getPointer();
+      const TYPE* sd = src.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int d_counter = d_begin;
+         int s_counter = s_begin;
+
+         int d_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int s_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d_b[nd] = d_counter;
+            s_b[nd] = s_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               if (sd[s_counter + i0] == 0.0) {
+                  test = 0;
+                  dd[d_counter + i0] = 0.0F;
+               } else {
+                  dd[d_counter + i0] = 1.0F / sd[s_counter + i0];
+               }
+            }
+
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+            if (dim_jump > 0) {
+               int d_step = 1;
+               int s_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d_step *= d_w[k];
+                  s_step *= s_w[k];
+               }
+               d_counter = d_b[dim_jump - 1] + d_step;
+               s_counter = s_b[dim_jump - 1] + s_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d_b[m] = d_counter;
+                  s_b[m] = s_counter;
+               }
+            }
+         }
+
+         d_begin += d_offset;
+         s_begin += s_offset;
+      }
+
+   }
+
+   return test;
+}
+
+template<class TYPE>
+TYPE
+ArrayDataMiscellaneousOpsReal<TYPE>::maxPointwiseDivide(
+   const pdat::ArrayData<TYPE>& numer,
+   const pdat::ArrayData<TYPE>& denom,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(numer, denom, box);
+   TBOX_ASSERT(denom.getDepth() == numer.getDepth());
+
+   const tbox::Dimension& dim(numer.getDim());
+
+   TYPE max = 0.0, quot;
+
+   const hier::Box n_box = numer.getBox();
+   const hier::Box d_box = denom.getBox();
+   const hier::Box ibox = box * d_box * n_box;
+
+   if (!ibox.empty()) {
+      const int ddepth = denom.getDepth();
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int n_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         n_w[i] = n_box.numberCells(i);
+         d_w[i] = d_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int n_offset = numer.getOffset();
+      const int d_offset = denom.getOffset();
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int n_begin = n_box.offset(ibox.lower());
+      int d_begin = d_box.offset(ibox.lower());
+
+      const TYPE* nd = numer.getPointer();
+      const TYPE* dd = denom.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int n_counter = n_begin;
+         int d_counter = d_begin;
+
+         int n_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int d_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nm = 0; nm < dim.getValue(); nm++) {
+            n_b[nm] = n_counter;
+            d_b[nm] = d_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               if (dd[d_counter + i0] == 0.0) {
+                  quot = tbox::MathUtilities<TYPE>::Abs(nd[n_counter + i0]);
+               } else {
+                  quot = tbox::MathUtilities<TYPE>::Abs(nd[n_counter + i0]
+                        / dd[d_counter + i0]);
+               }
+               if (max < quot) max = quot;
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int n_step = 1;
+               int d_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  n_step *= n_w[k];
+                  d_step *= d_w[k];
+               }
+               n_counter = n_b[dim_jump - 1] + n_step;
+               d_counter = d_b[dim_jump - 1] + d_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  n_b[m] = n_counter;
+                  d_b[m] = d_counter;
+               }
+            }
+         }
+
+         n_begin += n_offset;
+         d_begin += d_offset;
+      }
+
+   }
+
+   return max;
+}
+
+template<class TYPE>
+TYPE
+ArrayDataMiscellaneousOpsReal<TYPE>::minPointwiseDivide(
+   const pdat::ArrayData<TYPE>& numer,
+   const pdat::ArrayData<TYPE>& denom,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(numer, denom, box);
+   TBOX_ASSERT(denom.getDepth() == numer.getDepth());
+
+   const tbox::Dimension& dim(numer.getDim());
+
+   TYPE min = tbox::MathUtilities<TYPE>::getMax();
+   TYPE quot = tbox::MathUtilities<TYPE>::getMax();
+
+   const hier::Box n_box = numer.getBox();
+   const hier::Box d_box = denom.getBox();
+   const hier::Box ibox = box * d_box * n_box;
+
+   if (!ibox.empty()) {
+      const int ddepth = denom.getDepth();
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int n_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         n_w[i] = n_box.numberCells(i);
+         d_w[i] = d_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int n_offset = numer.getOffset();
+      const int d_offset = denom.getOffset();
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int n_begin = n_box.offset(ibox.lower());
+      int d_begin = d_box.offset(ibox.lower());
+
+      const TYPE* nd = numer.getPointer();
+      const TYPE* dd = denom.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int n_counter = n_begin;
+         int d_counter = d_begin;
+
+         int n_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int d_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nm = 0; nm < dim.getValue(); nm++) {
+            n_b[nm] = n_counter;
+            d_b[nm] = d_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               if (dd[d_counter + i0] != 0.0) {
+                  quot = nd[n_counter + i0] / dd[d_counter + i0];
+               }
+               if (quot < min) min = quot;
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int n_step = 1;
+               int d_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  n_step *= n_w[k];
+                  d_step *= d_w[k];
+               }
+               n_counter = n_b[dim_jump - 1] + n_step;
+               d_counter = d_b[dim_jump - 1] + d_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  n_b[m] = n_counter;
+                  d_b[m] = d_counter;
+               }
+            }
+         }
+
+         n_begin += n_offset;
+         d_begin += d_offset;
+      }
+
+   }
+
+   return min;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,179 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Miscellaneous templated operations for real array data 
+ *
+ ************************************************************************/
+
+#ifndef included_math_ArrayDataMiscellaneousOpsReal
+#define included_math_ArrayDataMiscellaneousOpsReal
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/ArrayData.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class ArrayDataMiscellaneousOpsReal provides various operations that
+ * may be applied to arrays of real (double and float) numerical data
+ * values maintained using pdat::ArrayData<DIM> objects.  These operations are
+ * sufficiently different from basic arithmetic and norm operations that we
+ * chose to implement them in a separate class.  However, as in the case of the  * more common operations, the intent of this class is to provide a single
+ * implementation of the operations as they are needed by objects that
+ * manipulate standard array-based patch data types (i.e., cell-centered,
+ * face-centered, node-centered).  Each operation is implemented in two
+ * different ways.  The choice of operation is based on whether control volume
+ * information is to be used to weight the contribution of each data entry
+ * to the calculation.  The use of control volumes is important when these
+ * operations are used in vector kernels where the data resides over multiple
+ * levels of spatial resolution in an AMR hierarchy.  The actual index
+ * region on which each operation occurs is the intersection of this box
+ * and the boxes of all the pdat::ArrayData<DIM> objects involved.
+ *
+ * Since these operations are used only by the vector kernels for the KINSOL
+ * and CVODE solver packages at this time, they are intended to be instantiated
+ * for the standard built-in types double and float (since those solvers only
+ * treat double and float data).  To extend this class to other data types or
+ * to include other operations, the member functions must be specialized or the  * new operations must be added.
+ *
+ * @see pdat::ArrayData
+ */
+
+template<class TYPE>
+class ArrayDataMiscellaneousOpsReal
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   ArrayDataMiscellaneousOpsReal();
+
+   ~ArrayDataMiscellaneousOpsReal<TYPE>();
+
+   /**
+    * Return 1 if \f$\|data2_i\| > 0\f$ and \f$data1_i * data2_i \leq 0\f$, for
+    * any \f$i\f$ in the index region, where \f$cvol_i > 0\f$.  Otherwise return 0.
+    */
+   int
+   computeConstrProdPosWithControlVolume(
+      const pdat::ArrayData<TYPE>& data1,
+      const pdat::ArrayData<TYPE>& data2,
+      const pdat::ArrayData<double>& cvol,
+      const hier::Box& box) const;
+
+   /**
+    * Return 1 if \f$\|data2_i\| > 0\f$ and \f$data1_i * data2_i \leq 0\f$, for
+    * any \f$i\f$ in the index region.  Otherwise return 0.
+    */
+   int
+   computeConstrProdPos(
+      const pdat::ArrayData<TYPE>& data1,
+      const pdat::ArrayData<TYPE>& data2,
+      const hier::Box& box) const;
+
+   /**
+    * Wherever \f$cvol_i > 0\f$ in the index region, set \f$dst_i = 1\f$
+    * if \f$\|src_i\| > \alpha\f$, and \f$dst_i = 0\f$ otherwise.
+    */
+   void
+   compareToScalarWithControlVolume(
+      pdat::ArrayData<TYPE>& dst,
+      const pdat::ArrayData<TYPE>& src,
+      const TYPE& alpha,
+      const pdat::ArrayData<double>& cvol,
+      const hier::Box& box) const;
+
+   /**
+    * Set \f$dst_i = 1\f$ if \f$\|src_i\| > \alpha\f$, and \f$dst_i = 0\f$ otherwise.
+    */
+   void
+   compareToScalar(
+      pdat::ArrayData<TYPE>& dst,
+      const pdat::ArrayData<TYPE>& src,
+      const TYPE& alpha,
+      const hier::Box& box) const;
+
+   /**
+    * Wherever \f$cvol_i > 0\f$ in the index region, set \f$dst_i = 1/src_i\f$ if
+    * \f$src_i \neq 0\f$, and \f$dst_i = 0\f$ otherwise.  If \f$dst_i = 0\f$ anywhere,
+    * 0 is the return value.  Otherwise 1 is returned.
+    */
+   int
+   testReciprocalWithControlVolume(
+      pdat::ArrayData<TYPE>& dst,
+      const pdat::ArrayData<TYPE>& src,
+      const pdat::ArrayData<double>& cvol,
+      const hier::Box& box) const;
+
+   /**
+    * Set \f$dst_i = 1/src_i\f$ if \f$src_i \neq 0\f$, and \f$dst_i = 0\f$ otherwise.
+    * If \f$dst_i = 0\f$ anywhere, 0 is the return value.  Otherwise 1 is returned.
+    */
+   int
+   testReciprocal(
+      pdat::ArrayData<TYPE>& dst,
+      const pdat::ArrayData<TYPE>& src,
+      const hier::Box& box) const;
+
+   /*!
+    * @brief Compute max of "conditional" quotients of two arrays.
+    *
+    * Return the maximum of pointwise "conditional" quotients of the numerator
+    * and denominator.
+    *
+    * The "conditional" quotient is defined as |numerator/denominator|
+    * where the denominator is nonzero.  Otherwise, it is defined as
+    * |numerator|.
+    *
+    * @b Note: This method is currently intended to support the
+    * PETSc-2.1.6 vector wrapper only.  Please do not use it!
+    */
+   TYPE
+   maxPointwiseDivide(
+      const pdat::ArrayData<TYPE>& numer,
+      const pdat::ArrayData<TYPE>& denom,
+      const hier::Box& box) const;
+
+   /*!
+    * @brief Compute min of quotients of two arrays.
+    *
+    * Return the minimum of pointwise quotients of the numerator
+    * and denominator.
+    *
+    * The quotient is defined as (numerator/denominator)
+    * where the denominator is nonzero.  When the denominator is zero, the
+    * entry is skipped.  If the denominator is always zero, the value of
+    * tbox::IEEE::getDBL_MAX() is returned (see @ref SAMRAI::tbox::IEEE).
+    *
+    * @b Note: This method is currently intended to support the
+    * SUNDIALS vector wrapper only.  Please do not use it!
+    */
+   TYPE
+   minPointwiseDivide(
+      const pdat::ArrayData<TYPE>& numer,
+      const pdat::ArrayData<TYPE>& denom,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   ArrayDataMiscellaneousOpsReal(
+      const ArrayDataMiscellaneousOpsReal<TYPE>&);
+   void
+   operator = (
+      const ArrayDataMiscellaneousOpsReal<TYPE>&);
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/ArrayDataMiscellaneousOpsReal.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/ArrayDataNormOpsComplex.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/ArrayDataNormOpsComplex.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1117 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Norm operations for complex data arrays. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_ArrayDataNormOpsComplex_C
+#define included_math_ArrayDataNormOpsComplex_C
+
+#include "SAMRAI/math/ArrayDataNormOpsComplex.h"
+
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace math {
+
+ArrayDataNormOpsComplex::ArrayDataNormOpsComplex()
+{
+}
+
+ArrayDataNormOpsComplex::~ArrayDataNormOpsComplex()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Norm operations for complex array data.				*
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ArrayDataNormOpsComplex::abs(
+   pdat::ArrayData<double>& dst,
+   const pdat::ArrayData<dcomplex>& src,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst, src, box);
+   TBOX_ASSERT(dst.getDepth() == src.getDepth());
+
+   const tbox::Dimension& dim(dst.getDim());
+
+   const hier::Box dst_box = dst.getBox();
+   const hier::Box src_box = src.getBox();
+   const hier::Box ibox = box * dst_box * src_box;
+
+   if (!ibox.empty()) {
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dst_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int src_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         dst_w[i] = dst_box.numberCells(i);
+         src_w[i] = src_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int dst_offset = dst.getOffset();
+      const int src_offset = src.getOffset();
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int dst_begin = dst_box.offset(ibox.lower());
+      int src_begin = src_box.offset(ibox.lower());
+
+      double* dd = dst.getPointer();
+      const dcomplex* sd = src.getPointer();
+
+      const int ddepth = dst.getDepth();
+      for (int d = 0; d < ddepth; d++) {
+
+         int dst_counter = dst_begin;
+         int src_counter = src_begin;
+
+         int dst_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int src_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            dst_b[nd] = dst_counter;
+            src_b[nd] = src_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               dd[dst_counter + i0] = sqrt(norm(sd[src_counter + i0]));
+            }
+
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int dst_step = 1;
+               int src_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  dst_step *= dst_w[k];
+                  src_step *= src_w[k];
+               }
+               dst_counter = dst_b[dim_jump - 1] + dst_step;
+               src_counter = src_b[dim_jump - 1] + src_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  dst_b[m] = dst_counter;
+                  src_b[m] = src_counter;
+               }
+            }
+         }
+
+         dst_begin += dst_offset;
+         src_begin += src_offset;
+
+      }
+   }
+}
+
+double ArrayDataNormOpsComplex::sumControlVolumes(
+   const pdat::ArrayData<dcomplex>& data,
+   const pdat::ArrayData<double>& cvol,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(data, cvol, box);
+
+   const tbox::Dimension& dim(data.getDim());
+
+   double sum = 0.0;
+
+   const hier::Box d_box = data.getBox();
+   const hier::Box cv_box = cvol.getBox();
+   const hier::Box ibox = box * d_box * cv_box;
+
+   if (!ibox.empty()) {
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int cv_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         cv_w[i] = cv_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int cv_offset = cvol.getOffset();
+
+      int cv_begin = cv_box.offset(ibox.lower());
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      const int ddepth = cvol.getDepth();
+
+      TBOX_ASSERT((ddepth == data.getDepth()) || (ddepth == 1));
+
+      const double* cvd = cvol.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int cv_counter = cv_begin;
+
+         int cv_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            cv_b[nd] = cv_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               sum += cvd[cv_counter + i0];
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+            if (dim_jump > 0) {
+               int cv_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  cv_step *= cv_w[k];
+               }
+               cv_counter = cv_b[dim_jump - 1] + cv_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  cv_b[m] = cv_counter;
+               }
+            }
+         }
+         cv_begin += cv_offset;
+      }
+
+      if (ddepth != data.getDepth()) sum *= data.getDepth();
+
+   }
+
+   return sum;
+}
+
+double ArrayDataNormOpsComplex::L1NormWithControlVolume(
+   const pdat::ArrayData<dcomplex>& data,
+   const pdat::ArrayData<double>& cvol,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(data, cvol, box);
+
+   const tbox::Dimension& dim(data.getDim());
+
+   double l1norm = 0.0;
+
+   const hier::Box d_box = data.getBox();
+   const hier::Box cv_box = cvol.getBox();
+   const hier::Box ibox = box * d_box * cv_box;
+
+   if (!ibox.empty()) {
+      const int ddepth = data.getDepth();
+      const int cvdepth = cvol.getDepth();
+
+      TBOX_ASSERT((ddepth == cvdepth) || (cvdepth == 1));
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int cv_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         d_w[i] = d_box.numberCells(i);
+         cv_w[i] = cv_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d_offset = data.getOffset();
+      const int cv_offset = ((cvdepth == 1) ? 0 : cvol.getOffset());
+
+      int d_begin = d_box.offset(ibox.lower());
+      int cv_begin = cv_box.offset(ibox.lower());
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      const dcomplex* dd = data.getPointer();
+      const double* cvd = cvol.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int d_counter = d_begin;
+         int cv_counter = cv_begin;
+
+         int d_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int cv_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d_b[nd] = d_counter;
+            cv_b[nd] = cv_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               l1norm += sqrt(norm(dd[d_counter + i0])) * cvd[cv_counter + i0];
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int d_step = 1;
+               int cv_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d_step *= d_w[k];
+                  cv_step *= cv_w[k];
+               }
+               d_counter = d_b[dim_jump - 1] + d_step;
+               cv_counter = cv_b[dim_jump - 1] + cv_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d_b[m] = d_counter;
+                  cv_b[m] = cv_counter;
+               }
+            }
+         }
+
+         d_begin += d_offset;
+         cv_begin += cv_offset;
+      }
+   }
+
+   return l1norm;
+}
+
+double ArrayDataNormOpsComplex::L1Norm(
+   const pdat::ArrayData<dcomplex>& data,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(data, box);
+
+   const tbox::Dimension& dim(data.getDim());
+
+   double l1norm = 0.0;
+
+   const hier::Box d_box = data.getBox();
+   const hier::Box ibox = box * d_box;
+
+   if (!ibox.empty()) {
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         d_w[i] = d_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d_offset = data.getOffset();
+
+      int d_begin = d_box.offset(ibox.lower());
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      const int ddepth = data.getDepth();
+
+      const dcomplex* dd = data.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int d_counter = d_begin;
+
+         int d_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d_b[nd] = d_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               l1norm += sqrt(norm(dd[d_counter + i0]));
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int d_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d_step *= d_w[k];
+               }
+               d_counter = d_b[dim_jump - 1] + d_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d_b[m] = d_counter;
+               }
+            }
+         }
+
+         d_begin += d_offset;
+      }
+   }
+
+   return l1norm;
+}
+
+dcomplex ArrayDataNormOpsComplex::dotWithControlVolume(
+   const pdat::ArrayData<dcomplex>& data1,
+   const pdat::ArrayData<dcomplex>& data2,
+   const pdat::ArrayData<double>& cvol,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS4(data1, data2, cvol, box);
+   TBOX_ASSERT(data1.getDepth() == data2.getDepth());
+
+   const tbox::Dimension& dim(data1.getDim());
+
+   dcomplex dprod = dcomplex(0.0, 0.0);
+
+   const hier::Box d1_box = data1.getBox();
+   const hier::Box d2_box = data2.getBox();
+   const hier::Box cv_box = cvol.getBox();
+   const hier::Box ibox = box * d1_box * d2_box * cv_box;
+
+   if (!ibox.empty()) {
+      const int d1depth = data1.getDepth();
+      const int cvdepth = cvol.getDepth();
+
+      TBOX_ASSERT(d1depth == data2.getDepth());
+      TBOX_ASSERT((d1depth == cvdepth) || (cvdepth == 1));
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d1_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d2_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int cv_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         d1_w[i] = d1_box.numberCells(i);
+         d2_w[i] = d2_box.numberCells(i);
+         cv_w[i] = cv_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d1_offset = data1.getOffset();
+      const int d2_offset = data2.getOffset();
+      const int cv_offset = ((cvdepth == 1) ? 0 : cvol.getOffset());
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int d1_begin = d1_box.offset(ibox.lower());
+      int d2_begin = d2_box.offset(ibox.lower());
+      int cv_begin = cv_box.offset(ibox.lower());
+
+      const dcomplex* dd1 = data1.getPointer();
+      const dcomplex* dd2 = data2.getPointer();
+      const double* cvd = cvol.getPointer();
+
+      for (int d = 0; d < d1depth; d++) {
+
+         int d1_counter = d1_begin;
+         int d2_counter = d2_begin;
+         int cv_counter = cv_begin;
+
+         int d1_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int d2_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int cv_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d1_b[nd] = d1_counter;
+            d2_b[nd] = d2_counter;
+            cv_b[nd] = cv_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               dprod += dd1[d1_counter + i0]
+                  * conj(dd2[d2_counter + i0]) * cvd[cv_counter + i0];
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int d1_step = 1;
+               int d2_step = 1;
+               int cv_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d1_step *= d1_w[k];
+                  d2_step *= d2_w[k];
+                  cv_step *= cv_w[k];
+               }
+               d1_counter = d1_b[dim_jump - 1] + d1_step;
+               d2_counter = d2_b[dim_jump - 1] + d2_step;
+               cv_counter = cv_b[dim_jump - 1] + cv_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d1_b[m] = d1_counter;
+                  d2_b[m] = d2_counter;
+                  cv_b[m] = cv_counter;
+               }
+            }
+         }
+
+         d1_begin += d1_offset;
+         d2_begin += d2_offset;
+         cv_begin += cv_offset;
+
+      }
+
+   }
+
+   return dprod;
+}
+
+dcomplex ArrayDataNormOpsComplex::dot(
+   const pdat::ArrayData<dcomplex>& data1,
+   const pdat::ArrayData<dcomplex>& data2,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(data1, data2, box);
+   TBOX_ASSERT(data1.getDepth() == data2.getDepth());
+
+   const tbox::Dimension& dim(data1.getDim());
+
+   dcomplex dprod = dcomplex(0.0, 0.0);
+
+   const hier::Box d1_box = data1.getBox();
+   const hier::Box d2_box = data2.getBox();
+   const hier::Box ibox = box * d1_box * d2_box;
+
+   if (!ibox.empty()) {
+      const int d1depth = data1.getDepth();
+
+      TBOX_ASSERT(d1depth == data2.getDepth());
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d1_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d2_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         d1_w[i] = d1_box.numberCells(i);
+         d2_w[i] = d2_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d1_offset = data1.getOffset();
+      const int d2_offset = data2.getOffset();
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int d1_begin = d1_box.offset(ibox.lower());
+      int d2_begin = d2_box.offset(ibox.lower());
+
+      const dcomplex* dd1 = data1.getPointer();
+      const dcomplex* dd2 = data2.getPointer();
+
+      for (int d = 0; d < d1depth; d++) {
+
+         int d1_counter = d1_begin;
+         int d2_counter = d2_begin;
+
+         int d1_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int d2_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d1_b[nd] = d1_counter;
+            d2_b[nd] = d2_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               dprod += dd1[d1_counter + i0] * conj(dd2[d2_counter + i0]);
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int d1_step = 1;
+               int d2_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d1_step *= d1_w[k];
+                  d2_step *= d2_w[k];
+               }
+               d1_counter = d1_b[dim_jump - 1] + d1_step;
+               d2_counter = d2_b[dim_jump - 1] + d2_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d1_b[m] = d1_counter;
+                  d2_b[m] = d2_counter;
+               }
+            }
+         }
+
+         d1_begin += d1_offset;
+         d2_begin += d2_offset;
+
+      }
+
+   }
+
+   return dprod;
+}
+
+dcomplex ArrayDataNormOpsComplex::integral(
+   const pdat::ArrayData<dcomplex>& data,
+   const pdat::ArrayData<double>& vol,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(data, vol, box);
+
+   const tbox::Dimension& dim(data.getDim());
+
+   dcomplex integral = dcomplex(0.0, 0.0);
+
+   const hier::Box d_box = data.getBox();
+   const hier::Box v_box = vol.getBox();
+   const hier::Box ibox = box * d_box * v_box;
+
+   if (!ibox.empty()) {
+      const int ddepth = data.getDepth();
+      const int vdepth = vol.getDepth();
+
+      TBOX_ASSERT((ddepth == vdepth) || (vdepth == 1));
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int v_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         d_w[i] = d_box.numberCells(i);
+         v_w[i] = v_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d_offset = data.getOffset();
+      const int v_offset = ((vdepth == 1) ? 0 : vol.getOffset());
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int d_begin = d_box.offset(ibox.lower());
+      int v_begin = v_box.offset(ibox.lower());
+
+      const dcomplex* dd = data.getPointer();
+      const double* vd = vol.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int d_counter = d_begin;
+         int v_counter = v_begin;
+
+         int d_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int v_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d_b[nd] = d_counter;
+            v_b[nd] = v_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               integral += dd[d_counter + i0] * vd[v_counter + i0];
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int d_step = 1;
+               int v_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d_step *= d_w[k];
+                  v_step *= v_w[k];
+               }
+               d_counter = d_b[dim_jump - 1] + d_step;
+               v_counter = v_b[dim_jump - 1] + v_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d_b[m] = d_counter;
+                  v_b[m] = v_counter;
+               }
+            }
+         }
+
+         d_begin += d_offset;
+         v_begin += v_offset;
+      }
+   }
+
+   return integral;
+}
+
+double ArrayDataNormOpsComplex::L2NormWithControlVolume(
+   const pdat::ArrayData<dcomplex>& data,
+   const pdat::ArrayData<double>& cvol,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(data, cvol, box);
+
+   return sqrt(real(dotWithControlVolume(data, data, cvol, box)));
+}
+
+double ArrayDataNormOpsComplex::L2Norm(
+   const pdat::ArrayData<dcomplex>& data,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(data, box);
+
+   return sqrt(real(dot(data, data, box)));
+}
+
+double ArrayDataNormOpsComplex::weightedL2NormWithControlVolume(
+   const pdat::ArrayData<dcomplex>& data,
+   const pdat::ArrayData<dcomplex>& wgt,
+   const pdat::ArrayData<double>& cvol,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS4(data, wgt, cvol, box);
+   TBOX_ASSERT(data.getDepth() == wgt.getDepth());
+
+   const tbox::Dimension& dim(data.getDim());
+
+   double wl2norm = 0.0;
+
+   const hier::Box d_box = data.getBox();
+   const hier::Box w_box = wgt.getBox();
+   const hier::Box cv_box = cvol.getBox();
+   const hier::Box ibox = box * d_box * w_box * cv_box;
+
+   if (!ibox.empty()) {
+      const int ddepth = data.getDepth();
+      const int cvdepth = cvol.getDepth();
+
+      TBOX_ASSERT((ddepth == cvdepth) || (cvdepth == 1));
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int w_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int cv_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         w_w[i] = w_box.numberCells(i);
+         d_w[i] = d_box.numberCells(i);
+         cv_w[i] = cv_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d_offset = data.getOffset();
+      const int w_offset = wgt.getOffset();
+      const int cv_offset = ((cvdepth == 1) ? 0 : cvol.getOffset());
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int d_begin = d_box.offset(ibox.lower());
+      int w_begin = w_box.offset(ibox.lower());
+      int cv_begin = cv_box.offset(ibox.lower());
+
+      const dcomplex* dd = data.getPointer();
+      const dcomplex* wd = wgt.getPointer();
+      const double* cvd = cvol.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int d_counter = d_begin;
+         int w_counter = w_begin;
+         int cv_counter = cv_begin;
+
+         int d_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int w_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int cv_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d_b[nd] = d_counter;
+            w_b[nd] = w_counter;
+            cv_b[nd] = cv_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               dcomplex val = dd[d_counter + i0] * wd[w_counter + i0];
+               wl2norm += real(val * conj(val)) * cvd[cv_counter + i0];
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int d_step = 1;
+               int w_step = 1;
+               int cv_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d_step *= d_w[k];
+                  w_step *= w_w[k];
+                  cv_step *= cv_w[k];
+               }
+               d_counter = d_b[dim_jump - 1] + d_step;
+               w_counter = w_b[dim_jump - 1] + w_step;
+               cv_counter = cv_b[dim_jump - 1] + cv_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d_b[m] = d_counter;
+                  w_b[m] = w_counter;
+                  cv_b[m] = cv_counter;
+               }
+            }
+         }
+
+         d_begin += d_offset;
+         w_begin += w_offset;
+         cv_begin += cv_offset;
+      }
+   }
+
+   return sqrt(wl2norm);
+}
+
+double ArrayDataNormOpsComplex::weightedL2Norm(
+   const pdat::ArrayData<dcomplex>& data,
+   const pdat::ArrayData<dcomplex>& wgt,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(data, wgt, box);
+   TBOX_ASSERT(data.getDepth() == wgt.getDepth());
+
+   const tbox::Dimension& dim(data.getDim());
+
+   double wl2norm = 0.0;
+
+   const hier::Box d_box = data.getBox();
+   const hier::Box w_box = wgt.getBox();
+   const hier::Box ibox = box * d_box * w_box;
+
+   if (!ibox.empty()) {
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int w_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         w_w[i] = w_box.numberCells(i);
+         d_w[i] = d_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d_offset = data.getOffset();
+      const int w_offset = wgt.getOffset();
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int d_begin = d_box.offset(ibox.lower());
+      int w_begin = w_box.offset(ibox.lower());
+
+      const dcomplex* dd = data.getPointer();
+      const dcomplex* wd = wgt.getPointer();
+
+      const int ddepth = data.getDepth();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int d_counter = d_begin;
+         int w_counter = w_begin;
+
+         int d_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int w_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d_b[nd] = d_counter;
+            w_b[nd] = w_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               dcomplex val = dd[d_counter + i0] * wd[w_counter + i0];
+               wl2norm += real(val * conj(val));
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int d_step = 1;
+               int w_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d_step *= d_w[k];
+                  w_step *= w_w[k];
+               }
+               d_counter = d_b[dim_jump - 1] + d_step;
+               w_counter = w_b[dim_jump - 1] + w_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d_b[m] = d_counter;
+                  w_b[m] = w_counter;
+               }
+            }
+         }
+
+         d_begin += d_offset;
+         w_begin += w_offset;
+      }
+   }
+
+   return sqrt(wl2norm);
+}
+
+double ArrayDataNormOpsComplex::maxNormWithControlVolume(
+   const pdat::ArrayData<dcomplex>& data,
+   const pdat::ArrayData<double>& cvol,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(data, cvol, box);
+
+   const tbox::Dimension& dim(data.getDim());
+
+   double maxnorm = 0.0;
+
+   const hier::Box d_box = data.getBox();
+   const hier::Box cv_box = cvol.getBox();
+   const hier::Box ibox = box * d_box * cv_box;
+
+   if (!ibox.empty()) {
+      const int ddepth = data.getDepth();
+      const int cvdepth = cvol.getDepth();
+
+      TBOX_ASSERT((ddepth == cvdepth) || (cvdepth == 1));
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int cv_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         d_w[i] = d_box.numberCells(i);
+         cv_w[i] = cv_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d_offset = data.getOffset();
+      const int cv_offset = ((cvdepth == 1) ? 0 : cvol.getOffset());
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int d_begin = d_box.offset(ibox.lower());
+      int cv_begin = cv_box.offset(ibox.lower());
+
+      const dcomplex* dd = data.getPointer();
+      const double* cvd = cvol.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int d_counter = d_begin;
+         int cv_counter = cv_begin;
+
+         int d_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int cv_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d_b[nd] = d_counter;
+            cv_b[nd] = cv_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               if (cvd[cv_counter + i0] > 0.0) {
+                  maxnorm = tbox::MathUtilities<double>::Max(maxnorm,
+                        norm(dd[d_counter + i0]));
+               }
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int d_step = 1;
+               int cv_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d_step *= d_w[k];
+                  cv_step *= cv_w[k];
+               }
+               d_counter = d_b[dim_jump - 1] + d_step;
+               cv_counter = cv_b[dim_jump - 1] + cv_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d_b[m] = d_counter;
+                  cv_b[m] = cv_counter;
+               }
+            }
+         }
+
+         d_begin += d_offset;
+         cv_begin += cv_offset;
+      }
+   }
+
+   return sqrt(maxnorm);
+}
+
+double ArrayDataNormOpsComplex::maxNorm(
+   const pdat::ArrayData<dcomplex>& data,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(data, box);
+
+   const tbox::Dimension& dim(data.getDim());
+
+   double maxnorm = 0.0;
+
+   const hier::Box d_box = data.getBox();
+   const hier::Box ibox = box * d_box;
+
+   if (!ibox.empty()) {
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         d_w[i] = d_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d_offset = data.getOffset();
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int d_begin = d_box.offset(ibox.lower());
+
+      const dcomplex* dd = data.getPointer();
+
+      const int ddepth = data.getDepth();
+      for (int d = 0; d < ddepth; d++) {
+
+         int d_counter = d_begin;
+
+         int d_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d_b[nd] = d_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               maxnorm = tbox::MathUtilities<double>::Max(maxnorm,
+                     norm(dd[d_counter + i0]));
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int d_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d_step *= d_w[k];
+               }
+               d_counter = d_b[dim_jump - 1] + d_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d_b[m] = d_counter;
+               }
+            }
+         }
+
+         d_begin += d_offset;
+      }
+   }
+
+   return sqrt(maxnorm);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/ArrayDataNormOpsComplex.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/ArrayDataNormOpsComplex.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,204 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Norm operations for complex data arrays. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_ArrayDataNormOpsComplex
+#define included_math_ArrayDataNormOpsComplex
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/tbox/Complex.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class ArrayDataNormOpsComplex provides a set of common norm
+ * operations that may be applied to arrays of complex data values
+ * maintained as pdat::ArrayData<DIM> objects.  The intent of this class is to
+ * provide a single implementation of these operations as they are needed
+ * by objects that perform these operations on the standard array-based patch
+ * data types (i.e., cell-centered, face-centered, node-centered).  Each of
+ * the norm operations is implemented in two different ways.  The choice of
+ * operation is based on whether control volume information is to be used to
+ * weight the contribution of each data entry to the norm calculation.  The
+ * use of control volumes is important when these operations are used in
+ * vector kernels where the data resides over multiple levels in an AMR
+ * hierarchy.  Note also that each operation will be performed on the
+ * intersection of the box in the function argument list and the boxes
+ * associated with all pdat::ArrayData<DIM> objects.
+ *
+ * Note that a similar set of norm operations is implemented for real array
+ * data (double and float) in the class ArrayDataNormOpsReal.
+ *
+ * @see pdat::ArrayData
+ */
+
+class ArrayDataNormOpsComplex
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   ArrayDataNormOpsComplex();
+
+   ~ArrayDataNormOpsComplex();
+
+   /**
+    * Set destination component to norm of source component.  That is,
+    * each destination entry is set to
+    * \f$d_i = \sqrt{ {real(s_i)}^2 + {imag(s_i)}^2 }\f$.
+    */
+   void
+   abs(
+      pdat::ArrayData<double>& dst,
+      const pdat::ArrayData<dcomplex>& src,
+      const hier::Box& box) const;
+
+   /**
+    * Return sum of entries in control volume array.
+    */
+   double
+   sumControlVolumes(
+      const pdat::ArrayData<dcomplex>& data,
+      const pdat::ArrayData<double>& cvol,
+      const hier::Box& box) const;
+
+   /**
+    * Return discrete \f$L_1\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( \sqrt{data_i * \bar{data_i}} cvol_i )\f$.
+    */
+   double
+   L1NormWithControlVolume(
+      const pdat::ArrayData<dcomplex>& data,
+      const pdat::ArrayData<double>& cvol,
+      const hier::Box& box) const;
+
+   /**
+    * Return discrete \f$L_1\f$-norm of the data.  That is, the return value is
+    * the sum \f$\sum_i ( \sqrt{data_i * \bar{data_i}} )\f$.
+    */
+   double
+   L1Norm(
+      const pdat::ArrayData<dcomplex>& data,
+      const hier::Box& box) const;
+
+   /**
+    * Return discrete \f$L_2\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sqrt{ \sum_i (
+    * data_i * \bar{data_i} cvol_i ) }\f$.
+    */
+   double
+   L2NormWithControlVolume(
+      const pdat::ArrayData<dcomplex>& data,
+      const pdat::ArrayData<double>& cvol,
+      const hier::Box& box) const;
+
+   /**
+    * Return discrete \f$L_2\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sqrt{ \sum_i ( data_i * \bar{data_i} ) }\f$.
+    */
+   double
+   L2Norm(
+      const pdat::ArrayData<dcomplex>& data,
+      const hier::Box& box) const;
+
+   /**
+    * Return discrete weighted \f$L_2\f$-norm of the data using the control
+    * volume to weight the contribution of the data and weight entries to
+    * the sum.  That is, the return value is the sum \f$\sqrt{ \sum_i (
+    * (data_i * wgt_i) * \bar{(data_i * wgt_i)} cvol_i ) }\f$.
+    */
+   double
+   weightedL2NormWithControlVolume(
+      const pdat::ArrayData<dcomplex>& data,
+      const pdat::ArrayData<dcomplex>& wgt,
+      const pdat::ArrayData<double>& cvol,
+      const hier::Box& box) const;
+
+   /**
+    * Return discrete weighted \f$L_2\f$-norm of the data.  That is, the return
+    * value is the sum \f$\sqrt{ \sum_i ( (data_i * wgt_i) *
+    * \bar{(data_i * wgt_i)} cvol_i ) }\f$.
+    */
+   double
+   weightedL2Norm(
+      const pdat::ArrayData<dcomplex>& data,
+      const pdat::ArrayData<dcomplex>& wgt,
+      const hier::Box& box) const;
+
+   /**
+    * Return the \f$\max\f$-norm of the data using the control volume to weight
+    * the contribution of each data entry to the maximum.  That is, the return
+    * value is \f$\max_i ( \sqrt{data_i * \bar{data_i}} )\f$, where the max is
+    * over the data elements where \f$cvol_i > 0\f$.
+    */
+   double
+   maxNormWithControlVolume(
+      const pdat::ArrayData<dcomplex>& data,
+      const pdat::ArrayData<double>& cvol,
+      const hier::Box& box) const;
+
+   /**
+    * Return the \f$\max\f$-norm of the data.  That is, the return value is
+    * \f$\max_i ( \sqrt{data_i * \bar{data_i}} )\f$.
+    */
+   double
+   maxNorm(
+      const pdat::ArrayData<dcomplex>& data,
+      const hier::Box& box) const;
+
+   /**
+    * Return the dot product of the two data arrays using the control volume
+    * to weight the contribution of each product to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( data1_i * \bar{data2_i} * cvol_i )\f$.
+    */
+   dcomplex
+   dotWithControlVolume(
+      const pdat::ArrayData<dcomplex>& data1,
+      const pdat::ArrayData<dcomplex>& data2,
+      const pdat::ArrayData<double>& cvol,
+      const hier::Box& box) const;
+
+   /**
+    * Return the dot product of the two data arrays.  That is, the
+    * return value is the sum \f$\sum_i ( data1_i * \bar{data2_i} )\f$.
+    */
+   dcomplex
+   dot(
+      const pdat::ArrayData<dcomplex>& data1,
+      const pdat::ArrayData<dcomplex>& data2,
+      const hier::Box& box) const;
+
+   /**
+    * Return the integral of the function based on the data array.
+    * The return value is the sum \f$\sum_i ( data_i * vol_i )\f$.
+    */
+   dcomplex
+   integral(
+      const pdat::ArrayData<dcomplex>& data,
+      const pdat::ArrayData<double>& vol,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   ArrayDataNormOpsComplex(
+      const ArrayDataNormOpsComplex&);
+   void
+   operator = (
+      const ArrayDataNormOpsComplex&);
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/ArrayDataNormOpsInteger.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/ArrayDataNormOpsInteger.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,135 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Norm operations for integer data arrays. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_ArrayDataNormOpsInteger_C
+#define included_math_ArrayDataNormOpsInteger_C
+
+#include "SAMRAI/math/ArrayDataNormOpsInteger.h"
+
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace math {
+
+ArrayDataNormOpsInteger::ArrayDataNormOpsInteger()
+{
+}
+
+ArrayDataNormOpsInteger::~ArrayDataNormOpsInteger()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Norm operations for integer array data.				*
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ArrayDataNormOpsInteger::abs(
+   pdat::ArrayData<int>& dst,
+   const pdat::ArrayData<int>& src,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst, src, box);
+   TBOX_ASSERT(dst.getDepth() == src.getDepth());
+
+   const tbox::Dimension& dim(dst.getDim());
+
+   const hier::Box dst_box = dst.getBox();
+   const hier::Box src_box = src.getBox();
+   const hier::Box ibox = box * dst_box * src_box;
+
+   if (!ibox.empty()) {
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dst_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int src_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         dst_w[i] = dst_box.numberCells(i);
+         src_w[i] = src_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int dst_offset = dst.getOffset();
+      const int src_offset = src.getOffset();
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int dst_begin = dst_box.offset(ibox.lower());
+      int src_begin = src_box.offset(ibox.lower());
+
+      int* dd = dst.getPointer();
+      const int* sd = src.getPointer();
+
+      const int ddepth = dst.getDepth();
+      for (int d = 0; d < ddepth; d++) {
+
+         int dst_counter = dst_begin;
+         int src_counter = src_begin;
+
+         int dst_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int src_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            dst_b[nd] = dst_counter;
+            src_b[nd] = src_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               dd[dst_counter + i0] =
+                  tbox::MathUtilities<int>::Abs(sd[src_counter + i0]);
+            }
+
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int dst_step = 1;
+               int src_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  dst_step *= dst_w[k];
+                  src_step *= src_w[k];
+               }
+               dst_counter = dst_b[dim_jump - 1] + dst_step;
+               src_counter = src_b[dim_jump - 1] + src_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  dst_b[m] = dst_counter;
+                  src_b[m] = src_counter;
+               }
+            }
+         }
+
+         dst_begin += dst_offset;
+         src_begin += src_offset;
+
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/ArrayDataNormOpsInteger.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/ArrayDataNormOpsInteger.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated norm operations for real data arrays. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_ArrayDataNormOpsInteger
+#define included_math_ArrayDataNormOpsInteger
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/ArrayData.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class ArrayDataNormOpsInteger provides a set of common norm
+ * operations that may be applied to arrays of integer data values
+ * maintained as pdat::ArrayData<DIM> objects.  The intent of this class
+ * is to provide a single implementation of these operations as they are needed
+ * by objects that perform these operations on the standard array-based patch
+ * data types (i.e., cell-centered, face-centered, node-centered).
+ * Note that each operation is performed on the intersection of the box in
+ * the function argument list and the boxes associated with all
+ * pdat::ArrayData<DIM> objects.  Currently, the only norm operation implemented
+ * in this class is the absolute value operation.
+ *
+ * @see pdat::ArrayData
+ */
+
+class ArrayDataNormOpsInteger
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   ArrayDataNormOpsInteger();
+
+   ~ArrayDataNormOpsInteger();
+
+   /**
+    * Set destination component to absolute value of source component.
+    * That is, each destination entry is set to \f$d_i = \| s_i \|\f$.
+    */
+   void
+   abs(
+      pdat::ArrayData<int>& dst,
+      const pdat::ArrayData<int>& src,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   ArrayDataNormOpsInteger(
+      const ArrayDataNormOpsInteger&);
+   void
+   operator = (
+      const ArrayDataNormOpsInteger&);
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/ArrayDataNormOpsReal.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/ArrayDataNormOpsReal.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1166 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated array data norm operations. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_ArrayDataNormOpsReal_C
+#define included_math_ArrayDataNormOpsReal_C
+
+#include "SAMRAI/math/ArrayDataNormOpsReal.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+ArrayDataNormOpsReal<TYPE>::ArrayDataNormOpsReal()
+{
+}
+
+template<class TYPE>
+ArrayDataNormOpsReal<TYPE>::~ArrayDataNormOpsReal()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * The const constructor and assignment operator are not actually used	*
+ * but are defined here for compilers that require an implementation for	*
+ * every declaration.							*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+ArrayDataNormOpsReal<TYPE>::ArrayDataNormOpsReal(
+   const ArrayDataNormOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);       // not implemented (but needed by some compilers)
+}
+
+template<class TYPE>
+void ArrayDataNormOpsReal<TYPE>::operator = (
+   const ArrayDataNormOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);       // not implemented (but needed by some compilers)
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Generic class template norm operations for real array data.           *
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void ArrayDataNormOpsReal<TYPE>::abs(
+   pdat::ArrayData<TYPE>& dst,
+   const pdat::ArrayData<TYPE>& src,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst, src, box);
+   TBOX_ASSERT(dst.getDepth() == src.getDepth());
+
+   const tbox::Dimension& dim(dst.getDim());
+
+   const hier::Box dst_box = dst.getBox();
+   const hier::Box src_box = src.getBox();
+   const hier::Box ibox = box * dst_box * src_box;
+
+   if (!ibox.empty()) {
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dst_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int src_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         dst_w[i] = dst_box.numberCells(i);
+         src_w[i] = src_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int dst_offset = dst.getOffset();
+      const int src_offset = src.getOffset();
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int dst_begin = dst_box.offset(ibox.lower());
+      int src_begin = src_box.offset(ibox.lower());
+
+      TYPE* dd = dst.getPointer();
+      const TYPE* sd = src.getPointer();
+
+      const int ddepth = dst.getDepth();
+      for (int d = 0; d < ddepth; d++) {
+
+         int dst_counter = dst_begin;
+         int src_counter = src_begin;
+
+         int dst_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int src_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            dst_b[nd] = dst_counter;
+            src_b[nd] = src_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               dd[dst_counter + i0] =
+                  tbox::MathUtilities<TYPE>::Abs(sd[src_counter + i0]);
+            }
+
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int dst_step = 1;
+               int src_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  dst_step *= dst_w[k];
+                  src_step *= src_w[k];
+               }
+               dst_counter = dst_b[dim_jump - 1] + dst_step;
+               src_counter = src_b[dim_jump - 1] + src_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  dst_b[m] = dst_counter;
+                  src_b[m] = src_counter;
+               }
+            }
+         }
+
+         dst_begin += dst_offset;
+         src_begin += src_offset;
+
+      }
+   }
+}
+
+template<class TYPE>
+double ArrayDataNormOpsReal<TYPE>::sumControlVolumes(
+   const pdat::ArrayData<TYPE>& data,
+   const pdat::ArrayData<double>& cvol,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(data, cvol, box);
+
+   const tbox::Dimension& dim(data.getDim());
+
+   double sum = 0.0;
+
+   const hier::Box d_box = data.getBox();
+   const hier::Box cv_box = cvol.getBox();
+   const hier::Box ibox = box * d_box * cv_box;
+
+   if (!ibox.empty()) {
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int cv_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         cv_w[i] = cv_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int cv_offset = cvol.getOffset();
+
+      int cv_begin = cv_box.offset(ibox.lower());
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      const int ddepth = cvol.getDepth();
+
+      TBOX_ASSERT((ddepth == data.getDepth()) || (ddepth == 1));
+
+      const double* cvd = cvol.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int cv_counter = cv_begin;
+
+         int cv_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            cv_b[nd] = cv_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               sum += cvd[cv_counter + i0];
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+            if (dim_jump > 0) {
+               int cv_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  cv_step *= cv_w[k];
+               }
+               cv_counter = cv_b[dim_jump - 1] + cv_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  cv_b[m] = cv_counter;
+               }
+            }
+         }
+         cv_begin += cv_offset;
+      }
+
+      if (ddepth != data.getDepth()) sum *= data.getDepth();
+
+   }
+
+   return sum;
+}
+
+template<class TYPE>
+double ArrayDataNormOpsReal<TYPE>::L1NormWithControlVolume(
+   const pdat::ArrayData<TYPE>& data,
+   const pdat::ArrayData<double>& cvol,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(data, cvol, box);
+
+   const tbox::Dimension& dim(data.getDim());
+
+   double l1norm = 0.0;
+
+   const hier::Box d_box = data.getBox();
+   const hier::Box cv_box = cvol.getBox();
+   const hier::Box ibox = box * d_box * cv_box;
+
+   if (!ibox.empty()) {
+      const int ddepth = data.getDepth();
+      const int cvdepth = cvol.getDepth();
+
+      TBOX_ASSERT((ddepth == cvdepth) || (cvdepth == 1));
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int cv_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         d_w[i] = d_box.numberCells(i);
+         cv_w[i] = cv_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d_offset = data.getOffset();
+      const int cv_offset = ((cvdepth == 1) ? 0 : cvol.getOffset());
+
+      int d_begin = d_box.offset(ibox.lower());
+      int cv_begin = cv_box.offset(ibox.lower());
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      const TYPE* dd = data.getPointer();
+      const double* cvd = cvol.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int d_counter = d_begin;
+         int cv_counter = cv_begin;
+
+         int d_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int cv_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d_b[nd] = d_counter;
+            cv_b[nd] = cv_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               l1norm += tbox::MathUtilities<TYPE>::Abs(dd[d_counter + i0])
+                  * cvd[cv_counter + i0];
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int d_step = 1;
+               int cv_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d_step *= d_w[k];
+                  cv_step *= cv_w[k];
+               }
+               d_counter = d_b[dim_jump - 1] + d_step;
+               cv_counter = cv_b[dim_jump - 1] + cv_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d_b[m] = d_counter;
+                  cv_b[m] = cv_counter;
+               }
+            }
+         }
+
+         d_begin += d_offset;
+         cv_begin += cv_offset;
+      }
+   }
+
+   return l1norm;
+}
+
+template<class TYPE>
+double ArrayDataNormOpsReal<TYPE>::L1Norm(
+   const pdat::ArrayData<TYPE>& data,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(data, box);
+
+   const tbox::Dimension& dim(data.getDim());
+
+   double l1norm = 0.0;
+
+   const hier::Box d_box = data.getBox();
+   const hier::Box ibox = box * d_box;
+
+   if (!ibox.empty()) {
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         d_w[i] = d_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d_offset = data.getOffset();
+
+      int d_begin = d_box.offset(ibox.lower());
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      const int ddepth = data.getDepth();
+
+      const TYPE* dd = data.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int d_counter = d_begin;
+
+         int d_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d_b[nd] = d_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               l1norm += tbox::MathUtilities<TYPE>::Abs(dd[d_counter + i0]);
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int d_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d_step *= d_w[k];
+               }
+               d_counter = d_b[dim_jump - 1] + d_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d_b[m] = d_counter;
+               }
+            }
+         }
+
+         d_begin += d_offset;
+      }
+   }
+
+   return l1norm;
+}
+
+template<class TYPE>
+double ArrayDataNormOpsReal<TYPE>::L2NormWithControlVolume(
+   const pdat::ArrayData<TYPE>& data,
+   const pdat::ArrayData<double>& cvol,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(data, cvol, box);
+
+   return sqrt(ArrayDataNormOpsReal<TYPE>::
+      dotWithControlVolume(data, data, cvol, box));
+}
+
+template<class TYPE>
+double ArrayDataNormOpsReal<TYPE>::L2Norm(
+   const pdat::ArrayData<TYPE>& data,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(data, box);
+
+   return sqrt(ArrayDataNormOpsReal<TYPE>::dot(data, data, box));
+}
+
+template<class TYPE>
+double ArrayDataNormOpsReal<TYPE>::weightedL2NormWithControlVolume(
+   const pdat::ArrayData<TYPE>& data,
+   const pdat::ArrayData<TYPE>& weight,
+   const pdat::ArrayData<double>& cvol,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS4(data, weight, cvol, box);
+   TBOX_ASSERT(data.getDepth() == weight.getDepth());
+
+   const tbox::Dimension& dim(data.getDim());
+
+   double wl2norm = 0.0;
+
+   const hier::Box d_box = data.getBox();
+   const hier::Box w_box = weight.getBox();
+   const hier::Box cv_box = cvol.getBox();
+   const hier::Box ibox = box * d_box * w_box * cv_box;
+
+   if (!ibox.empty()) {
+      const int ddepth = data.getDepth();
+      const int cvdepth = cvol.getDepth();
+
+      TBOX_ASSERT((ddepth == cvdepth) || (cvdepth == 1));
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int w_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int cv_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         w_w[i] = w_box.numberCells(i);
+         d_w[i] = d_box.numberCells(i);
+         cv_w[i] = cv_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d_offset = data.getOffset();
+      const int w_offset = weight.getOffset();
+      const int cv_offset = ((cvdepth == 1) ? 0 : cvol.getOffset());
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int d_begin = d_box.offset(ibox.lower());
+      int w_begin = w_box.offset(ibox.lower());
+      int cv_begin = cv_box.offset(ibox.lower());
+
+      const TYPE* dd = data.getPointer();
+      const TYPE* wd = weight.getPointer();
+      const double* cvd = cvol.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int d_counter = d_begin;
+         int w_counter = w_begin;
+         int cv_counter = cv_begin;
+
+         int d_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int w_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int cv_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d_b[nd] = d_counter;
+            w_b[nd] = w_counter;
+            cv_b[nd] = cv_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               TYPE val = dd[d_counter + i0] * wd[w_counter + i0];
+               wl2norm += val * val * cvd[cv_counter + i0];
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int d_step = 1;
+               int w_step = 1;
+               int cv_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d_step *= d_w[k];
+                  w_step *= w_w[k];
+                  cv_step *= cv_w[k];
+               }
+               d_counter = d_b[dim_jump - 1] + d_step;
+               w_counter = w_b[dim_jump - 1] + w_step;
+               cv_counter = cv_b[dim_jump - 1] + cv_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d_b[m] = d_counter;
+                  w_b[m] = w_counter;
+                  cv_b[m] = cv_counter;
+               }
+            }
+         }
+
+         d_begin += d_offset;
+         w_begin += w_offset;
+         cv_begin += cv_offset;
+      }
+   }
+
+   return sqrt(wl2norm);
+}
+
+template<class TYPE>
+double ArrayDataNormOpsReal<TYPE>::weightedL2Norm(
+   const pdat::ArrayData<TYPE>& data,
+   const pdat::ArrayData<TYPE>& weight,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(data, weight, box);
+   TBOX_ASSERT(data.getDepth() == weight.getDepth());
+
+   const tbox::Dimension& dim(data.getDim());
+
+   double wl2norm = 0.0;
+
+   const hier::Box d_box = data.getBox();
+   const hier::Box w_box = weight.getBox();
+   const hier::Box ibox = box * d_box * w_box;
+
+   if (!ibox.empty()) {
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int w_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         w_w[i] = w_box.numberCells(i);
+         d_w[i] = d_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d_offset = data.getOffset();
+      const int w_offset = weight.getOffset();
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int d_begin = d_box.offset(ibox.lower());
+      int w_begin = w_box.offset(ibox.lower());
+
+      const TYPE* dd = data.getPointer();
+      const TYPE* wd = weight.getPointer();
+
+      const int ddepth = data.getDepth();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int d_counter = d_begin;
+         int w_counter = w_begin;
+
+         int d_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int w_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d_b[nd] = d_counter;
+            w_b[nd] = w_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               TYPE val = dd[d_counter + i0] * wd[w_counter + i0];
+               wl2norm += val * val;
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int d_step = 1;
+               int w_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d_step *= d_w[k];
+                  w_step *= w_w[k];
+               }
+               d_counter = d_b[dim_jump - 1] + d_step;
+               w_counter = w_b[dim_jump - 1] + w_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d_b[m] = d_counter;
+                  w_b[m] = w_counter;
+               }
+            }
+         }
+
+         d_begin += d_offset;
+         w_begin += w_offset;
+      }
+   }
+
+   return sqrt(wl2norm);
+}
+
+template<class TYPE>
+double ArrayDataNormOpsReal<TYPE>::maxNormWithControlVolume(
+   const pdat::ArrayData<TYPE>& data,
+   const pdat::ArrayData<double>& cvol,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(data, cvol, box);
+
+   const tbox::Dimension& dim(data.getDim());
+
+   double maxnorm = 0.0;
+
+   const hier::Box d_box = data.getBox();
+   const hier::Box cv_box = cvol.getBox();
+   const hier::Box ibox = box * d_box * cv_box;
+
+   if (!ibox.empty()) {
+      const int ddepth = data.getDepth();
+      const int cvdepth = cvol.getDepth();
+
+      TBOX_ASSERT((ddepth == cvdepth) || (cvdepth == 1));
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int cv_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         d_w[i] = d_box.numberCells(i);
+         cv_w[i] = cv_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d_offset = data.getOffset();
+      const int cv_offset = ((cvdepth == 1) ? 0 : cvol.getOffset());
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int d_begin = d_box.offset(ibox.lower());
+      int cv_begin = cv_box.offset(ibox.lower());
+
+      const TYPE* dd = data.getPointer();
+      const double* cvd = cvol.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int d_counter = d_begin;
+         int cv_counter = cv_begin;
+
+         int d_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int cv_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d_b[nd] = d_counter;
+            cv_b[nd] = cv_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               if (cvd[cv_counter + i0] > 0.0) {
+                  maxnorm =
+                     tbox::MathUtilities<double>::Max(
+                        maxnorm,
+                        tbox::MathUtilities<TYPE>::Abs(dd[d_counter + i0]));
+               }
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int d_step = 1;
+               int cv_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d_step *= d_w[k];
+                  cv_step *= cv_w[k];
+               }
+               d_counter = d_b[dim_jump - 1] + d_step;
+               cv_counter = cv_b[dim_jump - 1] + cv_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d_b[m] = d_counter;
+                  cv_b[m] = cv_counter;
+               }
+            }
+         }
+
+         d_begin += d_offset;
+         cv_begin += cv_offset;
+      }
+   }
+
+   return maxnorm;
+}
+
+template<class TYPE>
+double ArrayDataNormOpsReal<TYPE>::maxNorm(
+   const pdat::ArrayData<TYPE>& data,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(data, box);
+
+   const tbox::Dimension& dim(data.getDim());
+
+   double maxnorm = 0.0;
+
+   const hier::Box d_box = data.getBox();
+   const hier::Box ibox = box * d_box;
+
+   if (!ibox.empty()) {
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         d_w[i] = d_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d_offset = data.getOffset();
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int d_begin = d_box.offset(ibox.lower());
+
+      const TYPE* dd = data.getPointer();
+
+      const int ddepth = data.getDepth();
+      for (int d = 0; d < ddepth; d++) {
+
+         int d_counter = d_begin;
+
+         int d_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d_b[nd] = d_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               maxnorm = tbox::MathUtilities<double>::Max(
+                     maxnorm,
+                     tbox::MathUtilities<TYPE>::Abs(dd[d_counter + i0]));
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int d_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d_step *= d_w[k];
+               }
+               d_counter = d_b[dim_jump - 1] + d_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d_b[m] = d_counter;
+               }
+            }
+         }
+
+         d_begin += d_offset;
+      }
+   }
+
+   return maxnorm;
+}
+
+template<class TYPE>
+TYPE ArrayDataNormOpsReal<TYPE>::dotWithControlVolume(
+   const pdat::ArrayData<TYPE>& data1,
+   const pdat::ArrayData<TYPE>& data2,
+   const pdat::ArrayData<double>& cvol,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS4(data1, data2, cvol, box);
+   TBOX_ASSERT(data1.getDepth() == data2.getDepth());
+
+// Disable Intel warning about conversions
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:810)
+#endif
+
+   const tbox::Dimension& dim(data1.getDim());
+
+   TYPE dprod = 0.0;
+
+   const hier::Box d1_box = data1.getBox();
+   const hier::Box d2_box = data2.getBox();
+   const hier::Box cv_box = cvol.getBox();
+   const hier::Box ibox = box * d1_box * d2_box * cv_box;
+
+   if (!ibox.empty()) {
+      const int d1depth = data1.getDepth();
+      const int cvdepth = cvol.getDepth();
+
+      TBOX_ASSERT(d1depth == data2.getDepth());
+      TBOX_ASSERT((d1depth == cvdepth) || (cvdepth == 1));
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d1_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d2_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int cv_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         d1_w[i] = d1_box.numberCells(i);
+         d2_w[i] = d2_box.numberCells(i);
+         cv_w[i] = cv_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d1_offset = data1.getOffset();
+      const int d2_offset = data2.getOffset();
+      const int cv_offset = ((cvdepth == 1) ? 0 : cvol.getOffset());
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int d1_begin = d1_box.offset(ibox.lower());
+      int d2_begin = d2_box.offset(ibox.lower());
+      int cv_begin = cv_box.offset(ibox.lower());
+
+      const TYPE* dd1 = data1.getPointer();
+      const TYPE* dd2 = data2.getPointer();
+      const double* cvd = cvol.getPointer();
+
+      for (int d = 0; d < d1depth; d++) {
+
+         int d1_counter = d1_begin;
+         int d2_counter = d2_begin;
+         int cv_counter = cv_begin;
+
+         int d1_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int d2_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int cv_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d1_b[nd] = d1_counter;
+            d2_b[nd] = d2_counter;
+            cv_b[nd] = cv_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               dprod += static_cast<TYPE>(dd1[d1_counter + i0] * dd2[d2_counter + i0]
+                                          * cvd[cv_counter + i0]);
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int d1_step = 1;
+               int d2_step = 1;
+               int cv_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d1_step *= d1_w[k];
+                  d2_step *= d2_w[k];
+                  cv_step *= cv_w[k];
+               }
+               d1_counter = d1_b[dim_jump - 1] + d1_step;
+               d2_counter = d2_b[dim_jump - 1] + d2_step;
+               cv_counter = cv_b[dim_jump - 1] + cv_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d1_b[m] = d1_counter;
+                  d2_b[m] = d2_counter;
+                  cv_b[m] = cv_counter;
+               }
+            }
+         }
+
+         d1_begin += d1_offset;
+         d2_begin += d2_offset;
+         cv_begin += cv_offset;
+
+      }
+
+   }
+
+   return dprod;
+}
+
+template<class TYPE>
+TYPE ArrayDataNormOpsReal<TYPE>::dot(
+   const pdat::ArrayData<TYPE>& data1,
+   const pdat::ArrayData<TYPE>& data2,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(data1, data2, box);
+   TBOX_ASSERT(data1.getDepth() == data2.getDepth());
+
+   const tbox::Dimension& dim(data1.getDim());
+
+   TYPE dprod = 0.0;
+
+   const hier::Box d1_box = data1.getBox();
+   const hier::Box d2_box = data2.getBox();
+   const hier::Box ibox = box * d1_box * d2_box;
+
+   if (!ibox.empty()) {
+      const int d1depth = data1.getDepth();
+
+      TBOX_ASSERT(d1depth == data2.getDepth());
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d1_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d2_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         d1_w[i] = d1_box.numberCells(i);
+         d2_w[i] = d2_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d1_offset = data1.getOffset();
+      const int d2_offset = data2.getOffset();
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int d1_begin = d1_box.offset(ibox.lower());
+      int d2_begin = d2_box.offset(ibox.lower());
+
+      const TYPE* dd1 = data1.getPointer();
+      const TYPE* dd2 = data2.getPointer();
+
+      for (int d = 0; d < d1depth; d++) {
+
+         int d1_counter = d1_begin;
+         int d2_counter = d2_begin;
+
+         int d1_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int d2_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d1_b[nd] = d1_counter;
+            d2_b[nd] = d2_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               dprod += dd1[d1_counter + i0] * dd2[d2_counter + i0];
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int d1_step = 1;
+               int d2_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d1_step *= d1_w[k];
+                  d2_step *= d2_w[k];
+               }
+               d1_counter = d1_b[dim_jump - 1] + d1_step;
+               d2_counter = d2_b[dim_jump - 1] + d2_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d1_b[m] = d1_counter;
+                  d2_b[m] = d2_counter;
+               }
+            }
+         }
+
+         d1_begin += d1_offset;
+         d2_begin += d2_offset;
+
+      }
+
+   }
+
+   return dprod;
+}
+
+template<class TYPE>
+TYPE ArrayDataNormOpsReal<TYPE>::integral(
+   const pdat::ArrayData<TYPE>& data,
+   const pdat::ArrayData<double>& vol,
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(data, vol, box);
+
+   const tbox::Dimension& dim(data.getDim());
+
+   TYPE integral = 0.0;
+
+   const hier::Box d_box = data.getBox();
+   const hier::Box v_box = vol.getBox();
+   const hier::Box ibox = box * d_box * v_box;
+
+   if (!ibox.empty()) {
+      const int ddepth = data.getDepth();
+      const int vdepth = vol.getDepth();
+
+      TBOX_ASSERT((ddepth == vdepth) || (vdepth == 1));
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int d_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int v_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         box_w[i] = ibox.numberCells(i);
+         d_w[i] = d_box.numberCells(i);
+         v_w[i] = v_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int d_offset = data.getOffset();
+      const int v_offset = ((vdepth == 1) ? 0 : vol.getOffset());
+
+      const int num_d0_blocks = ibox.size() / box_w[0];
+
+      int d_begin = d_box.offset(ibox.lower());
+      int v_begin = v_box.offset(ibox.lower());
+
+      const TYPE* dd = data.getPointer();
+      const double* vd = vol.getPointer();
+
+      for (int d = 0; d < ddepth; d++) {
+
+         int d_counter = d_begin;
+         int v_counter = v_begin;
+
+         int d_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int v_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            d_b[nd] = d_counter;
+            v_b[nd] = v_counter;
+         }
+
+         for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+            for (int i0 = 0; i0 < box_w[0]; i0++) {
+               integral += dd[d_counter + i0] * vd[v_counter + i0];
+            }
+            int dim_jump = 0;
+
+            for (int j = 1; j < dim.getValue(); j++) {
+               if (dim_counter[j] < box_w[j] - 1) {
+                  ++dim_counter[j];
+                  dim_jump = j;
+                  break;
+               } else {
+                  dim_counter[j] = 0;
+               }
+            }
+
+            if (dim_jump > 0) {
+               int d_step = 1;
+               int v_step = 1;
+               for (int k = 0; k < dim_jump; k++) {
+                  d_step *= d_w[k];
+                  v_step *= v_w[k];
+               }
+               d_counter = d_b[dim_jump - 1] + d_step;
+               v_counter = v_b[dim_jump - 1] + v_step;
+
+               for (int m = 0; m < dim_jump; m++) {
+                  d_b[m] = d_counter;
+                  v_b[m] = v_counter;
+               }
+            }
+         }
+
+         d_begin += d_offset;
+         v_begin += v_offset;
+      }
+   }
+
+   return integral;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/ArrayDataNormOpsReal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/ArrayDataNormOpsReal.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,210 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated norm operations for real data arrays. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_ArrayDataNormOpsReal
+#define included_math_ArrayDataNormOpsReal
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/ArrayData.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class ArrayDataNormOpsReal provides a set of common norm operations
+ * that may be applied to arrays of real data values (either float or double)
+ * maintained as pdat::ArrayData<DIM> objects.  The intent of this class
+ * is to provide a single implementation of these operations as they are needed
+ * by objects that perform these operations on the standard array-based patch
+ * data types (i.e., cell-centered, face-centered, node-centered).  Each of
+ * the norm operations is implemented in two different ways.  The choice of
+ * operation is based on whether control volume information is to be used to
+ * weight the contribution of each data entry to the norm calculation.  The
+ * use of control volumes is important when these operations are used in
+ * vector kernels where the data resides over multiple levels in an AMR
+ * hierarchy.  Note also that each operation will be performed on the
+ * intersection of the box in the function argument list and the boxes
+ * associated with all pdat::ArrayData<DIM> objects.
+ *
+ * These operations typically apply only to the numerical standard built-in
+ * types, such as double, float, and the complex type (which may or may not
+ * be a built-in type depending on the C++ compiler).  This templated
+ * class should only be used to instantiate objects with double or float as
+ * the template parameter. A similar set of norm operations is implemented
+ * for complex array data in the class ArrayDataNormOpsComplex.
+ *
+ * @see pdat::ArrayData
+ */
+
+template<class TYPE>
+class ArrayDataNormOpsReal
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   ArrayDataNormOpsReal();
+
+   ~ArrayDataNormOpsReal<TYPE>();
+
+   /**
+    * Return sum of entries in control volume array.
+    */
+   double
+   sumControlVolumes(
+      const pdat::ArrayData<TYPE>& data,
+      const pdat::ArrayData<double>& cvol,
+      const hier::Box& box) const;
+
+   /**
+    * Set destination component to absolute value of source component.
+    * That is, each destination entry is set to \f$d_i = \| s_i \|\f$.
+    */
+   void
+   abs(
+      pdat::ArrayData<TYPE>& dst,
+      const pdat::ArrayData<TYPE>& src,
+      const hier::Box& box) const;
+
+   /**
+    * Return discrete \f$L_1\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( \| data_i \| cvol_i )\f$.
+    */
+   double
+   L1NormWithControlVolume(
+      const pdat::ArrayData<TYPE>& data,
+      const pdat::ArrayData<double>& cvol,
+      const hier::Box& box) const;
+
+   /**
+    * Return discrete \f$L_1\f$-norm of the data.  That is, the return value is
+    * the sum \f$\sum_i ( \| data_i \| )\f$.
+    */
+   double
+   L1Norm(
+      const pdat::ArrayData<TYPE>& data,
+      const hier::Box& box) const;
+
+   /**
+    * Return discrete \f$L_2\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sqrt{ \sum_i ( (data_i)^2 cvol_i ) }\f$.
+    */
+   double
+   L2NormWithControlVolume(
+      const pdat::ArrayData<TYPE>& data,
+      const pdat::ArrayData<double>& cvol,
+      const hier::Box& box) const;
+
+   /**
+    * Return discrete \f$L_2\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sqrt{ \sum_i ( (data_i)^2 cvol_i ) }\f$.
+    */
+   double
+   L2Norm(
+      const pdat::ArrayData<TYPE>& data,
+      const hier::Box& box) const;
+
+   /**
+    * Return discrete weighted \f$L_2\f$-norm of the data using the control
+    * volume to weight the contribution of the data and weight entries to
+    * the sum.  That is, the return value is the sum \f$\sqrt{ \sum_i (
+    * (data_i * weight_i)^2 cvol_i ) }\f$.
+    */
+   double
+   weightedL2NormWithControlVolume(
+      const pdat::ArrayData<TYPE>& data,
+      const pdat::ArrayData<TYPE>& weight,
+      const pdat::ArrayData<double>& cvol,
+      const hier::Box& box) const;
+
+   /**
+    * Return discrete weighted \f$L_2\f$-norm of the data.  That is, the return
+    * value is the sum \f$\sqrt{ \sum_i ( (data_i * weight_i)^2 ) }\f$.
+    */
+   double
+   weightedL2Norm(
+      const pdat::ArrayData<TYPE>& data,
+      const pdat::ArrayData<TYPE>& weight,
+      const hier::Box& box) const;
+
+   /**
+    * Return the \f$\max\f$-norm of the data using the control volume to weight
+    * the contribution of each data entry to the maximum.  That is, the return
+    * value is \f$\max_i ( \| data_i \| )\f$, where the max is over the data
+    * elements where \f$cvol_i > 0\f$.
+    */
+   double
+   maxNormWithControlVolume(
+      const pdat::ArrayData<TYPE>& data,
+      const pdat::ArrayData<double>& cvol,
+      const hier::Box& box) const;
+
+   /**
+    * Return the \f$\max\f$-norm of the data.  That is, the return value is
+    * \f$\max_i ( \| data_i \| )\f$.
+    */
+   double
+   maxNorm(
+      const pdat::ArrayData<TYPE>& data,
+      const hier::Box& box) const;
+
+   /**
+    * Return the dot product of the two data arrays using the control volume
+    * to weight the contribution of each product to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( data1_i * data2_i * cvol_i )\f$.
+    */
+   TYPE
+   dotWithControlVolume(
+      const pdat::ArrayData<TYPE>& data1,
+      const pdat::ArrayData<TYPE>& data2,
+      const pdat::ArrayData<double>& cvol,
+      const hier::Box& box) const;
+
+   /**
+    * Return the dot product of the two data arrays.  That is, the
+    * return value is the sum \f$\sum_i ( data1_i * data2_i )\f$.
+    */
+   TYPE
+   dot(
+      const pdat::ArrayData<TYPE>& data1,
+      const pdat::ArrayData<TYPE>& data2,
+      const hier::Box& box) const;
+
+   /**
+    * Return the integral of the function based on the data array.
+    * The return value is the sum \f$\sum_i ( data_i * vol_i )\f$.
+    */
+   TYPE
+   integral(
+      const pdat::ArrayData<TYPE>& data,
+      const pdat::ArrayData<double>& vol,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   ArrayDataNormOpsReal(
+      const ArrayDataNormOpsReal<TYPE>&);
+   void
+   operator = (
+      const ArrayDataNormOpsReal<TYPE>&);
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/ArrayDataNormOpsReal.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyCellDataOpsComplex.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyCellDataOpsComplex.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,936 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for complex cell data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyCellDataOpsComplex_C
+#define included_math_HierarchyCellDataOpsComplex_C
+
+#include "SAMRAI/math/HierarchyCellDataOpsComplex.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/pdat/CellDataFactory.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include <typeinfo>
+#include <stdlib.h>
+#include <float.h>
+#include <math.h>
+
+namespace SAMRAI {
+namespace math {
+
+HierarchyCellDataOpsComplex::HierarchyCellDataOpsComplex(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level):
+   HierarchyDataOpsComplex()
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+
+   d_hierarchy = hierarchy;
+   if ((coarsest_level < 0) || (finest_level < 0)) {
+      if (d_hierarchy->getNumberOfLevels() == 0) {
+         d_coarsest_level = coarsest_level;
+         d_finest_level = finest_level;
+      } else {
+         resetLevels(0, d_hierarchy->getFinestLevelNumber());
+      }
+   } else {
+      resetLevels(coarsest_level, finest_level);
+   }
+}
+
+HierarchyCellDataOpsComplex::~HierarchyCellDataOpsComplex()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to set the hierarchy and level information.                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HierarchyCellDataOpsComplex::setPatchHierarchy(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+
+   d_hierarchy = hierarchy;
+}
+
+void HierarchyCellDataOpsComplex::resetLevels(
+   const int coarsest_level,
+   const int finest_level)
+{
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (finest_level >= coarsest_level)
+      && (finest_level <= d_hierarchy->getFinestLevelNumber()));
+
+   d_coarsest_level = coarsest_level;
+   d_finest_level = finest_level;
+}
+
+const tbox::Pointer<hier::PatchHierarchy>
+HierarchyCellDataOpsComplex::getPatchHierarchy() const
+{
+   return d_hierarchy;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic operations.                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HierarchyCellDataOpsComplex::copyData(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<dcomplex> > s = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.copyData(d, s, box);
+      }
+   }
+}
+
+void HierarchyCellDataOpsComplex::swapData(
+   const int data1_id,
+   const int data2_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   tbox::Pointer<pdat::CellDataFactory<dcomplex> >
+   d1fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data1_id);
+   TBOX_ASSERT(!d1fact.isNull());
+   tbox::Pointer<pdat::CellDataFactory<dcomplex> >
+   d2fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data2_id);
+   TBOX_ASSERT(!d2fact.isNull());
+   TBOX_ASSERT(d1fact->getDepth() == d2fact->getDepth());
+   TBOX_ASSERT(d1fact->getGhostCellWidth() == d2fact->getGhostCellWidth());
+#endif
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         d_patch_ops.swapData(p, data1_id, data2_id);
+      }
+   }
+}
+
+void HierarchyCellDataOpsComplex::printData(
+   const int data_id,
+   std::ostream& s,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   s << "Patch descriptor id = " << data_id << std::endl;
+   s << "Factory = " << typeid(*d_hierarchy->getPatchDescriptor()->
+                               getPatchDataFactory(data_id)).name()
+     << std::endl;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      s << "Level number = " << ln << std::endl;
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<dcomplex> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.printData(d, box, s);
+      }
+   }
+}
+
+void HierarchyCellDataOpsComplex::setToScalar(
+   const int data_id,
+   const dcomplex& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<dcomplex> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.setToScalar(d, alpha, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic arithmetic operations.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HierarchyCellDataOpsComplex::scale(
+   const int dst_id,
+   const dcomplex& alpha,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<dcomplex> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<dcomplex> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.scale(dst, alpha, src, box);
+      }
+   }
+}
+
+void HierarchyCellDataOpsComplex::addScalar(
+   const int dst_id,
+   const int src_id,
+   const dcomplex& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<dcomplex> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<dcomplex> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.addScalar(dst, src, alpha, box);
+      }
+   }
+}
+
+void HierarchyCellDataOpsComplex::add(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::CellData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.add(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyCellDataOpsComplex::subtract(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::CellData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.subtract(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyCellDataOpsComplex::multiply(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::CellData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.multiply(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyCellDataOpsComplex::divide(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::CellData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.divide(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyCellDataOpsComplex::reciprocal(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<dcomplex> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.reciprocal(d, src, box);
+      }
+   }
+}
+
+void HierarchyCellDataOpsComplex::linearSum(
+   const int dst_id,
+   const dcomplex& alpha,
+   const int src1_id,
+   const dcomplex& beta,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::CellData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.linearSum(d, alpha, s1, beta, s2, box);
+      }
+   }
+}
+
+void HierarchyCellDataOpsComplex::axpy(
+   const int dst_id,
+   const dcomplex& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::CellData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.axpy(d, alpha, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyCellDataOpsComplex::axmy(
+   const int dst_id,
+   const dcomplex& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::CellData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.axmy(d, alpha, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyCellDataOpsComplex::abs(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<double> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<dcomplex> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.abs(d, src, box);
+      }
+   }
+}
+
+void HierarchyCellDataOpsComplex::setRandomValues(
+   const int data_id,
+   const dcomplex& width,
+   const dcomplex& low,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<dcomplex> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.setRandomValues(d, width, low, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Generic norm and order operations.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int HierarchyCellDataOpsComplex::numberOfEntries(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int entries = 0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<dcomplex> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         if (!d.isNull()) {
+            entries += d_patch_ops.numberOfEntries(d, box);
+         }
+      }
+   }
+
+   int global_entries = entries;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&entries, &global_entries, 1, MPI_INT, MPI_SUM);
+   }
+   return global_entries;
+}
+
+double HierarchyCellDataOpsComplex::sumControlVolumes(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(vol_id >= 0);
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double sum = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<dcomplex> > d = p->getPatchData(data_id);
+         tbox::Pointer<pdat::CellData<double> > cv = p->getPatchData(vol_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!cv.isNull());
+#endif
+         hier::Box box = cv->getGhostBox();
+
+         sum += d_patch_ops.sumControlVolumes(d, cv, box);
+      }
+   }
+
+   double global_sum = sum;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&sum, &global_sum, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   return global_sum;
+}
+
+double HierarchyCellDataOpsComplex::L1Norm(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<dcomplex> > d = p->getPatchData(data_id);
+         tbox::Pointer<pdat::CellData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            box = d->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         norm += d_patch_ops.L1Norm(d, box, cv);
+      }
+   }
+
+   double global_norm = norm;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&norm, &global_norm, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   return global_norm;
+}
+
+double HierarchyCellDataOpsComplex::L2Norm(
+   const int data_id,
+   const int vol_id) const
+{
+   dcomplex dotprod = HierarchyCellDataOpsComplex::dot(data_id,
+         data_id,
+         vol_id);
+
+   return sqrt(real(dotprod));
+}
+
+double HierarchyCellDataOpsComplex::weightedL2Norm(
+   const int data_id,
+   const int wgt_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm_squared = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<dcomplex> > d = p->getPatchData(data_id);
+         tbox::Pointer<pdat::CellData<dcomplex> > w = p->getPatchData(wgt_id);
+         tbox::Pointer<pdat::CellData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            box = d->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         double pnorm = d_patch_ops.weightedL2Norm(d, w, box, cv);
+
+         norm_squared += pnorm * pnorm;
+      }
+   }
+
+   double global_norm_squared = norm_squared;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&norm_squared, &global_norm_squared, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   return sqrt(global_norm_squared);
+}
+
+double HierarchyCellDataOpsComplex::RMSNorm(
+   const int data_id,
+   const int vol_id) const
+{
+   double l2_norm = L2Norm(data_id, vol_id);
+
+   double volume = ((vol_id < 0) ? (double)numberOfEntries(data_id, true)
+                    : sumControlVolumes(data_id, vol_id));
+
+   double rms_norm = l2_norm / sqrt(volume);
+   return rms_norm;
+}
+
+double HierarchyCellDataOpsComplex::weightedRMSNorm(
+   const int data_id,
+   const int wgt_id,
+   const int vol_id) const
+{
+
+   double l2_norm = weightedL2Norm(data_id, wgt_id, vol_id);
+
+   double volume = ((vol_id < 0) ? (double)numberOfEntries(data_id, true)
+                    : sumControlVolumes(data_id, vol_id));
+
+   double rms_norm = l2_norm / sqrt(volume);
+   return rms_norm;
+}
+
+double HierarchyCellDataOpsComplex::maxNorm(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<dcomplex> > d = p->getPatchData(data_id);
+         tbox::Pointer<pdat::CellData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            box = d->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         norm = tbox::MathUtilities<double>::Max(norm,
+               d_patch_ops.maxNorm(d, box, cv));
+      }
+   }
+
+   double global_norm = norm;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&norm, &global_norm, 1, MPI_DOUBLE, MPI_MAX);
+   }
+   return global_norm;
+}
+
+dcomplex HierarchyCellDataOpsComplex::dot(
+   const int data1_id,
+   const int data2_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   dcomplex dprod = dcomplex(0.0, 0.0);
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<dcomplex> > d1 =
+            p->getPatchData(data1_id);
+         tbox::Pointer<pdat::CellData<dcomplex> > d2 =
+            p->getPatchData(data2_id);
+         tbox::Pointer<pdat::CellData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d1.isNull());
+#endif
+            box = d1->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         dprod += d_patch_ops.dot(d1, d2, box, cv);
+      }
+   }
+
+   dcomplex global_dot = dprod;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&dprod, &global_dot, 1, MPI_DOUBLE_COMPLEX, MPI_SUM);
+   }
+   return global_dot;
+}
+
+dcomplex HierarchyCellDataOpsComplex::integral(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   dcomplex local_integral = dcomplex(0.0, 0.0);
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<dcomplex> > data =
+            p->getPatchData(data_id);
+         tbox::Pointer<pdat::CellData<double> > vol = p->getPatchData(vol_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!data.isNull());
+         TBOX_ASSERT(!vol.isNull());
+#endif
+
+         hier::Box box = data->getGhostBox();
+
+         local_integral += d_patch_ops.integral(data, box, vol);
+      }
+   }
+
+   dcomplex global_integral = local_integral;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&local_integral, &global_integral, 1, MPI_DOUBLE_COMPLEX, MPI_SUM);
+   }
+   return global_integral;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyCellDataOpsComplex.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyCellDataOpsComplex.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,413 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for complex cell data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyCellDataOpsComplex
+#define included_math_HierarchyCellDataOpsComplex
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/math/HierarchyDataOpsComplex.h"
+#include "SAMRAI/math/PatchCellDataOpsComplex.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class HierarchyCellDataOpsComplex provides a collection of
+ * operations that manipulate complex cell-centered patch data components over
+ * multiple levels in an AMR hierarchy.  It is derived from the abstract
+ * base class HierarchyDataOpsComplex which defines the interface to
+ * similar operations for cell-centered, face-centered, node-centered patch
+ * data objects where the data is complex.  The operations include basic
+ * arithmetic and norms.  On each patch, the operations are performed by the
+ * PatchCellDataOpsComplex data member.
+ *
+ * The patch hierarchy and set of levels within that hierarcy over which the
+ * operations will be performed are set in the constructor.  However, note
+ * that the constructor accepts default arguments for the coarsest and finest
+ * level numbers.  If the level numbers are not specified when calling the
+ * constructor the levels which exist in the hierarchy will be assumed in
+ * all operations.  The hierarchy and levels may be changed at any time using
+ * the proper member functions.
+ *
+ * Note that, when it makes sense, an operation accepts a boolean argument
+ * which indicates whether the operation should be performed on all of the
+ * data or just those data elements corresponding to the patch interiors.
+ * If no boolean argument is provided, the default behavior is to treat only
+ * the patch interiors.  Also, a similar set of operations for real (double
+ * and float) and integer cell-centered data is provided in the classes
+ * HierarchyCellDataOpsReal and HierarchyCellDataOpsInteger,
+ * respectively.
+ *
+ * @see math::PatchCellDataOpsComplex
+ */
+
+class HierarchyCellDataOpsComplex:public HierarchyDataOpsComplex
+{
+public:
+   /**
+    * The constructor for the HierarchyCellDataOpsComplex class sets
+    * the default patch hierarchy and coarsest and finest patch levels
+    * in that hierarchy over which operations will be performed.  The
+    * hierarchy and operations may be reset using the member functions
+    * setPatchHierarchy() and resetLevels() below.  If no level number
+    * arguments are given here, the levels over which the operations will
+    * be performed are those already existing in the hierarchy.  If the
+    * hierarchy level configuration changes, the operations must be explicitly
+    * reset by calling the resetLevels() function.
+    */
+   explicit HierarchyCellDataOpsComplex(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int coarsest_level = -1,
+      const int finest_level = -1);
+
+   /**
+    * Virtual destructor for the HierarchyCellDataOpsComplex class.
+    */
+   virtual ~HierarchyCellDataOpsComplex();
+
+   /**
+    * Reset patch hierarchy over which operations occur.
+    */
+   void
+   setPatchHierarchy(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+   /**
+    * Reset range of patch levels over which operations occur.
+    * The levels must exist in the hierarchy or an assertion will result.
+    */
+   void
+   resetLevels(
+      const int coarsest_level,
+      const int finest_level);
+
+   /**
+    * Return const pointer to patch hierarchy associated with operations.
+    */
+   const tbox::Pointer<hier::PatchHierarchy>
+   getPatchHierarchy() const;
+
+   /**
+    * Copy source data to destination data.
+    */
+   void
+   copyData(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Swap data pointers (i.e., storage) between two data components.
+    */
+   void
+   swapData(
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data over multiple levels to specified output stream.
+    */
+   void
+   printData(
+      const int data_id,
+      std::ostream& s,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data component to given scalar.
+    */
+   void
+   setToScalar(
+      const int data_id,
+      const dcomplex& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to source multiplied by given scalar, pointwise.
+    */
+   void
+   scale(
+      const int dst_id,
+      const dcomplex& alpha,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Add scalar to each entry in source data and set destination to result.
+    */
+   void
+   addScalar(
+      const int dst_id,
+      const int src_id,
+      const dcomplex& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to sum of two source components, pointwise.
+    */
+   void
+   add(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Subtract second source component from first source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   subtract(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination component to product of two source components, pointwise.
+    */
+   void
+   multiply(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Divide first data component by second source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   divide(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set each entry of destination component to reciprocal of corresponding
+    * source data component entry.
+    */
+   void
+   reciprocal(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + \beta s_2\f$, where \f$d\f$ is the destination patch
+    * data component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha, \beta\f$ are scalar values.
+    */
+   void
+   linearSum(
+      const int dst_id,
+      const dcomplex& alpha,
+      const int src1_id,
+      const dcomplex& beta,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axpy(
+      const int dst_id,
+      const dcomplex& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 - s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axmy(
+      const int dst_id,
+      const dcomplex& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination data to absolute value of source data, pointwise.
+    * Note that the source data must be dcomplex and the destination must
+    * be double.
+    */
+   void
+   abs(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data entries to random values.  See the operations in the
+    * array data operation classes for details on the generation of
+    * the random values.
+    */
+   void
+   setRandomValues(
+      const int data_id,
+      const dcomplex& width,
+      const dcomplex& low,
+      const bool interior_only = true) const;
+
+   /**
+    * Return the total number of data values for the component on the set
+    * of hierarchy levels.  If the boolean argument is true, the number of
+    * elements will be summed over patch interiors.  If the boolean argument
+    * is false, all elements will be counted (including ghost values)
+    * over all patches.
+    */
+   int
+   numberOfEntries(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return sum of the control volumes associated with the data component.
+    * Note that if the ontrol volumes are set propery, this is equivalent to
+    * integrating a data component containing all ones over the collection of
+    * hierarchy levels.
+    */
+   double
+   sumControlVolumes(
+      const int data_id,
+      const int vol_id) const;
+
+   /**
+    * Return discrete \f$L_1\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( \sqrt{data_i * \bar{data_i}}*cvol_i )\f$.
+    * If the control volume is undefined (vol_id < 0), the
+    * return value is \f$\sum_i ( \sqrt{data_i * \bar{data_i}} )\f$.
+    */
+   double
+   L1Norm(
+      const int data_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete \f$L_2\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum
+    * \f$\sqrt{ \sum_i ( data_i * \bar{data_i} cvol_i ) }\f$.
+    * If the control volume is undefined (vol_id < 0), the return value is
+    * \f$\sqrt{ \sum_i ( data_i * \bar{data_i} ) }\f$.
+    */
+   double
+   L2Norm(
+      const int data_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete weighted \f$L_2\f$-norm of the data using the control
+    * volume to weight the contribution of the data and weight entries to
+    * the sum.  That is, the return value is the sum \f$\sqrt{ \sum_i (
+    * (data_i * wgt_i) * \bar{(data_i * wgt_i)} cvol_i ) }\f$.  If the control
+    * volume is undefined (vol_id < 0), the return value is
+    * \f$\sqrt{ \sum_i ( (data_i * wgt_i) * \bar{(data_i * wgt_i)} cvol_i ) }\f$.
+    */
+   double
+   weightedL2Norm(
+      const int data_id,
+      const int weight_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete root mean squared norm of the data.  If the control
+    * volume is specified (vol_id >= 0), the return value is the \f$L_2\f$-norm
+    * divided by the square root of the sum of the control volumes.  Otherwise,
+    * the return value is the \f$L_2\f$-norm divided by the square root of the
+    * number of data entries.
+    */
+   double
+   RMSNorm(
+      const int data_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete weighted root mean squared norm of the data.  If the
+    * control volume is specified (vol_id >= 0), the return value is the
+    * weighted \f$L_2\f$-norm divided by the square root of the sum of the
+    * control volumes.  Otherwise, the return value is the weighted \f$L_2\f$-norm
+    * divided by the square root of the number of data entries.
+    */
+   double
+   weightedRMSNorm(
+      const int data_id,
+      const int weight_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return the \f$\max\f$-norm of the data using the control volume to weight
+    * the contribution of each data entry to the maximum.  That is, the return
+    * value is \f$\max_i ( \sqrt{data_i * \bar{data_i}} )\f$, where the max is
+    * over the data elements where \f$cvol_i > 0\f$.  If the control volume is
+    * undefined (vol_id < 0), it is ignored during the computation of the
+    * maximum.
+    */
+   double
+   maxNorm(
+      const int data_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return the dot product of the two data arrays using the control volume
+    * to weight the contribution of each product to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( data1_i * \bar{data2_i} * cvol_i )\f$.
+    * If the control volume is undefined (vol_id < 0), it is ignored during
+    * the summation.
+    */
+   dcomplex
+   dot(
+      const int data1_id,
+      const int data2_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return the integral of the function represented by the data array.
+    * The return value is the sum \f$\sum_i ( data_i * vol_i )\f$.
+    */
+   dcomplex
+   integral(
+      const int data_id,
+      const int vol_id) const;
+
+private:
+   // The following are not implemented
+   HierarchyCellDataOpsComplex(
+      const HierarchyCellDataOpsComplex&);
+   void
+   operator = (
+      const HierarchyCellDataOpsComplex&);
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+   int d_coarsest_level;
+   int d_finest_level;
+   PatchCellDataOpsComplex d_patch_ops;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyCellDataOpsInteger.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyCellDataOpsInteger.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,709 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for integer cell data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyCellDataOpsInteger_C
+#define included_math_HierarchyCellDataOpsInteger_C
+
+#include "SAMRAI/math/HierarchyCellDataOpsInteger.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/pdat/CellDataFactory.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#include <typeinfo>
+#include <stdlib.h>
+#include <float.h>
+#include <math.h>
+
+namespace SAMRAI {
+namespace math {
+
+HierarchyCellDataOpsInteger::HierarchyCellDataOpsInteger(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level):
+   HierarchyDataOpsInteger()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+#endif
+   d_hierarchy = hierarchy;
+   if ((coarsest_level < 0) || (finest_level < 0)) {
+      if (d_hierarchy->getNumberOfLevels() == 0) {
+         d_coarsest_level = coarsest_level;
+         d_finest_level = finest_level;
+      } else {
+         resetLevels(0, d_hierarchy->getFinestLevelNumber());
+      }
+   } else {
+      resetLevels(coarsest_level, finest_level);
+   }
+}
+
+HierarchyCellDataOpsInteger::~HierarchyCellDataOpsInteger()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to set the hierarchy and level information.                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HierarchyCellDataOpsInteger::setPatchHierarchy(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+
+   d_hierarchy = hierarchy;
+}
+
+void HierarchyCellDataOpsInteger::resetLevels(
+   const int coarsest_level,
+   const int finest_level)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (finest_level >= coarsest_level)
+      && (finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   d_coarsest_level = coarsest_level;
+   d_finest_level = finest_level;
+}
+
+const tbox::Pointer<hier::PatchHierarchy>
+HierarchyCellDataOpsInteger::getPatchHierarchy() const
+{
+   return d_hierarchy;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic operations.                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int HierarchyCellDataOpsInteger::numberOfEntries(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int entries = 0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<int> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         if (!d.isNull()) {
+            entries += d_patch_ops.numberOfEntries(d, box);
+         }
+      }
+   }
+
+   int global_entries = entries;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&entries, &global_entries, 1, MPI_INT, MPI_SUM);
+   }
+   return global_entries;
+}
+
+void HierarchyCellDataOpsInteger::copyData(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<int> > s = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.copyData(d, s, box);
+      }
+   }
+}
+
+void HierarchyCellDataOpsInteger::swapData(
+   const int data1_id,
+   const int data2_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   tbox::Pointer<pdat::CellDataFactory<int> >
+   d1fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data1_id);
+   TBOX_ASSERT(!d1fact.isNull());
+   tbox::Pointer<pdat::CellDataFactory<int> >
+   d2fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data2_id);
+   TBOX_ASSERT(!d2fact.isNull());
+   TBOX_ASSERT(d1fact->getDepth() == d2fact->getDepth());
+   TBOX_ASSERT(d1fact->getGhostCellWidth() == d2fact->getGhostCellWidth());
+#endif
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         d_patch_ops.swapData(p, data1_id, data2_id);
+      }
+   }
+}
+
+void HierarchyCellDataOpsInteger::printData(
+   const int data_id,
+   std::ostream& s,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   s << "Patch descriptor id = " << data_id << std::endl;
+   s << "Factory = " << typeid(*d_hierarchy->getPatchDescriptor()->
+                               getPatchDataFactory(data_id)).name()
+     << std::endl;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      s << "Level number = " << ln << std::endl;
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<int> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.printData(d, box, s);
+      }
+   }
+}
+
+void HierarchyCellDataOpsInteger::setToScalar(
+   const int data_id,
+   const int& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<int> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.setToScalar(d, alpha, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic arithmetic operations.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HierarchyCellDataOpsInteger::scale(
+   const int dst_id,
+   const int& alpha,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<int> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<int> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.scale(dst, alpha, src, box);
+      }
+   }
+}
+
+void HierarchyCellDataOpsInteger::addScalar(
+   const int dst_id,
+   const int src_id,
+   const int& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<int> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<int> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.addScalar(dst, src, alpha, box);
+      }
+   }
+}
+
+void HierarchyCellDataOpsInteger::add(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::CellData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.add(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyCellDataOpsInteger::subtract(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::CellData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.subtract(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyCellDataOpsInteger::multiply(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::CellData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.multiply(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyCellDataOpsInteger::divide(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::CellData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.divide(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyCellDataOpsInteger::reciprocal(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<int> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.reciprocal(d, src, box);
+      }
+   }
+}
+
+void HierarchyCellDataOpsInteger::linearSum(
+   const int dst_id,
+   const int& alpha,
+   const int src1_id,
+   const int& beta,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::CellData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.linearSum(d, alpha, s1, beta, s2, box);
+      }
+   }
+}
+
+void HierarchyCellDataOpsInteger::axpy(
+   const int dst_id,
+   const int& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::CellData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.axpy(d, alpha, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyCellDataOpsInteger::axmy(
+   const int dst_id,
+   const int& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::CellData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.axmy(d, alpha, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyCellDataOpsInteger::abs(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<int> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.abs(d, src, box);
+      }
+   }
+}
+
+int HierarchyCellDataOpsInteger::min(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int minval = tbox::MathUtilities<int>::getMax();
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<int> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         minval = tbox::MathUtilities<int>::Min(minval,
+               d_patch_ops.min(d, box));
+      }
+   }
+
+   int global_min = minval;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&minval, &global_min, 1, MPI_INT, MPI_SUM);
+   }
+   return global_min;
+}
+
+int HierarchyCellDataOpsInteger::max(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int maxval = -(tbox::MathUtilities<int>::getMax());
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<int> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         maxval = tbox::MathUtilities<int>::Max(maxval,
+               d_patch_ops.min(d, box));
+      }
+   }
+
+   int global_max = maxval;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&maxval, &global_max, 1, MPI_DOUBLE, MPI_MAX);
+   }
+   return global_max;
+}
+
+void HierarchyCellDataOpsInteger::setRandomValues(
+   const int data_id,
+   const int& width,
+   const int& low,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<int> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.setRandomValues(d, width, low, box);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyCellDataOpsInteger.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyCellDataOpsInteger.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,316 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for integer cell data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyCellDataOpsInteger
+#define included_math_HierarchyCellDataOpsInteger
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/math/HierarchyDataOpsInteger.h"
+#include "SAMRAI/math/PatchCellDataOpsInteger.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class HierarchyCellDataOpsInteger provides a collection of
+ * operations that manipulate integer cell-centered patch data components over
+ * multiple levels in an AMR hierarchy.  It is derived from the abstract
+ * base class HierarchyDataOpsInteger which defines the interface to
+ * similar operations for cell-centered, face-centered, node-centered patch
+ * data objects where the data is of type integer.  The operations include
+ * basic arithmetic and some ordering operations.  On each patch, the
+ * operations are performed by the PatchCellDataOpsInteger data member.
+ *
+ * The patch hierarchy and set of levels within that hierarcy over which the
+ * operations will be performed are set in the constructor.  However, note
+ * that the constructor accepts default arguments for the coarsest and finest
+ * level numbers.  If the level numbers are not specified when calling the
+ * constructor the levels which exist in the hierarchy will be assumed in
+ * all operations.  The hierarchy and levels may be changed at any time using
+ * the proper member functions.
+ *
+ * Note that, when it makes sense, an operation accept a boolean argument
+ * which indicates whether the operation should be performed on all of the
+ * data or just those data elements corresponding to the patch interiors.
+ * If no boolean argument is provided, the default behavior is to treat only
+ * the patch interiors.  Also, a similar set of operations for real (double
+ * and float) and complex cell-centered data is provided in the classes
+ * HierarchyCellDataOpsReal and HierarchyCellDataOpsComplex,
+ * respectively.
+ *
+ * @see math::PatchCellDataOpsInteger
+ */
+
+class HierarchyCellDataOpsInteger:public HierarchyDataOpsInteger
+{
+public:
+   /**
+    * The constructor for the HierarchyCellDataOpsInteger class sets
+    * the default patch hierarchy and coarsest and finest patch levels
+    * in that hierarchy over which operations will be performed.  The
+    * hierarchy and operations may be reset using the member functions
+    * setPatchHierarchy() and resetLevels() below.  If no level number
+    * arguments are given here, the levels over which the operations will
+    * be performed are those already existing in the hierarchy.  If the
+    * hierarchy level configuration changes, the operations must be explicitly
+    * reset by calling the resetLevels() function.
+    */
+   explicit HierarchyCellDataOpsInteger(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int coarsest_level = -1,
+      const int finest_level = -1);
+
+   /**
+    * Virtual destructor for the HierarchyCellDataOpsInteger class.
+    */
+   virtual ~HierarchyCellDataOpsInteger();
+
+   /**
+    * Reset patch hierarchy over which operations occur.
+    */
+   void
+   setPatchHierarchy(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+   /**
+    * Reset range of patch levels over which operations occur.
+    * The levels must exist in the hierarchy or an assertion will result.
+    */
+   void
+   resetLevels(
+      const int coarsest_level,
+      const int finest_level);
+
+   /**
+    * Return const pointer to patch hierarchy associated with operations.
+    */
+   const tbox::Pointer<hier::PatchHierarchy>
+   getPatchHierarchy() const;
+
+   /**
+    * Return the total number of data values for the component on the set
+    * of hierarchy levels.  If the boolean argument is true, the number of
+    * elements will be summed over patch interiors.  If the boolean argument
+    * is false, all elements will be counted (including ghost values)
+    * over all patches.
+    */
+   int
+   numberOfEntries(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Copy source data to destination data.
+    */
+   void
+   copyData(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Swap data pointers (i.e., storage) between two data components.
+    */
+   void
+   swapData(
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data over multiple levels to specified output stream.
+    */
+   void
+   printData(
+      const int data_id,
+      std::ostream& s,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data component to given scalar.
+    */
+   void
+   setToScalar(
+      const int data_id,
+      const int& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to source multiplied by given scalar, pointwise.
+    */
+   void
+   scale(
+      const int dst_id,
+      const int& alpha,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Add scalar to each entry in source data and set destination to result.
+    */
+   void
+   addScalar(
+      const int dst_id,
+      const int src_id,
+      const int& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to sum of two source components, pointwise.
+    */
+   void
+   add(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Subtract second source component from first source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   subtract(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination component to product of two source components, pointwise.
+    */
+   void
+   multiply(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Divide first data component by second source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   divide(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set each entry of destination component to reciprocal of corresponding
+    * source data component entry.
+    */
+   void
+   reciprocal(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + \beta s_2\f$, where \f$d\f$ is the destination patch
+    * data component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha, \beta\f$ are scalar values.
+    */
+   void
+   linearSum(
+      const int dst_id,
+      const int& alpha,
+      const int src1_id,
+      const int& beta,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axpy(
+      const int dst_id,
+      const int& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 - s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axmy(
+      const int dst_id,
+      const int& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination data to absolute value of source data, pointwise.
+    */
+   void
+   abs(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return minimum data value over all patches in the collection of levels.
+    */
+   int
+   min(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return maximum data value over all patches in the collection of levels.
+    */
+   int
+   max(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data entries to random values.  See the operations in the
+    * array data operation classes for details on the generation of
+    * the random values.
+    */
+   void
+   setRandomValues(
+      const int data_id,
+      const int& width,
+      const int& low,
+      const bool interior_only = true) const;
+
+private:
+   // The following are not implemented
+   HierarchyCellDataOpsInteger(
+      const HierarchyCellDataOpsInteger&);
+   void
+   operator = (
+      const HierarchyCellDataOpsInteger&);
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+   int d_coarsest_level;
+   int d_finest_level;
+   PatchCellDataOpsInteger d_patch_ops;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyCellDataOpsReal.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyCellDataOpsReal.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1302 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations for real cell data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyCellDataOpsReal_C
+#define included_math_HierarchyCellDataOpsReal_C
+
+#include "SAMRAI/math/HierarchyCellDataOpsReal.h"
+
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/pdat/CellDataFactory.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include <typeinfo>
+#include <cstdlib>
+#include <cfloat>
+#include <cmath>
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+HierarchyCellDataOpsReal<TYPE>::HierarchyCellDataOpsReal(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level):
+   HierarchyDataOpsReal<TYPE>()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+#endif
+   d_hierarchy = hierarchy;
+   if ((coarsest_level < 0) || (finest_level < 0)) {
+      if (d_hierarchy->getNumberOfLevels() == 0) {
+         d_coarsest_level = coarsest_level;
+         d_finest_level = finest_level;
+      } else {
+         resetLevels(0, d_hierarchy->getFinestLevelNumber());
+      }
+   } else {
+      resetLevels(coarsest_level, finest_level);
+   }
+}
+
+template<class TYPE>
+HierarchyCellDataOpsReal<TYPE>::~HierarchyCellDataOpsReal()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to set the hierarchy and level informtation.                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void HierarchyCellDataOpsReal<TYPE>::setPatchHierarchy(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+
+   d_hierarchy = hierarchy;
+}
+
+template<class TYPE>
+void HierarchyCellDataOpsReal<TYPE>::resetLevels(
+   const int coarsest_level,
+   const int finest_level)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (finest_level >= coarsest_level)
+      && (finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   d_coarsest_level = coarsest_level;
+   d_finest_level = finest_level;
+}
+
+template<class TYPE>
+const tbox::Pointer<hier::PatchHierarchy>
+HierarchyCellDataOpsReal<TYPE>::getPatchHierarchy() const
+{
+   return d_hierarchy;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The following are private and cannot be used, but they are defined    *
+ * here for compilers that require that every template declaration have  *
+ * a definition (a stupid requirement, if you ask me).                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+HierarchyCellDataOpsReal<TYPE>::HierarchyCellDataOpsReal(
+   const HierarchyCellDataOpsReal<TYPE>& foo):
+   HierarchyDataOpsReal<TYPE>()
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void HierarchyCellDataOpsReal<TYPE>::operator = (
+   const HierarchyCellDataOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic operations.                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void HierarchyCellDataOpsReal<TYPE>::copyData(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<TYPE> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.copyData(dst, src, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyCellDataOpsReal<TYPE>::swapData(
+   const int data1_id,
+   const int data2_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   tbox::Pointer<pdat::CellDataFactory<TYPE> >
+   d1fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data1_id);
+   TBOX_ASSERT(!d1fact.isNull());
+   tbox::Pointer<pdat::CellDataFactory<TYPE> >
+   d2fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data2_id);
+   TBOX_ASSERT(!d2fact.isNull());
+   TBOX_ASSERT(d1fact->getDepth() == d2fact->getDepth());
+   TBOX_ASSERT(d1fact->getGhostCellWidth() == d2fact->getGhostCellWidth());
+#endif
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         d_patch_ops.swapData(p, data1_id, data2_id);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyCellDataOpsReal<TYPE>::printData(
+   const int data_id,
+   std::ostream& s,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   s << "Patch descriptor id = " << data_id << std::endl;
+   s << "Factory = " << typeid(*d_hierarchy->getPatchDescriptor()->
+                               getPatchDataFactory(data_id)).name()
+     << std::endl;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      s << "Level number = " << ln << std::endl;
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.printData(d, box, s);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyCellDataOpsReal<TYPE>::setToScalar(
+   const int data_id,
+   const TYPE& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.setToScalar(d, alpha, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic arithmetic operations.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void HierarchyCellDataOpsReal<TYPE>::scale(
+   const int dst_id,
+   const TYPE& alpha,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<TYPE> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.scale(dst, alpha, src, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyCellDataOpsReal<TYPE>::addScalar(
+   const int dst_id,
+   const int src_id,
+   const TYPE& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<TYPE> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.addScalar(dst, src, alpha, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyCellDataOpsReal<TYPE>::add(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::CellData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.add(dst, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyCellDataOpsReal<TYPE>::subtract(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::CellData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.subtract(dst, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyCellDataOpsReal<TYPE>::multiply(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::CellData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.multiply(dst, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyCellDataOpsReal<TYPE>::divide(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::CellData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.divide(dst, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyCellDataOpsReal<TYPE>::reciprocal(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<TYPE> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.reciprocal(dst, src, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyCellDataOpsReal<TYPE>::linearSum(
+   const int dst_id,
+   const TYPE& alpha,
+   const int src1_id,
+   const TYPE& beta,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::CellData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.linearSum(dst, alpha, src1, beta, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyCellDataOpsReal<TYPE>::axpy(
+   const int dst_id,
+   const TYPE& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::CellData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.axpy(dst, alpha, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyCellDataOpsReal<TYPE>::axmy(
+   const int dst_id,
+   const TYPE& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::CellData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.axmy(dst, alpha, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyCellDataOpsReal<TYPE>::abs(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<TYPE> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.abs(dst, src, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyCellDataOpsReal<TYPE>::setRandomValues(
+   const int data_id,
+   const TYPE& width,
+   const TYPE& low,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > data = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!data.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : data->getGhostBox());
+
+         d_patch_ops.setRandomValues(data, width, low, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Generic norm and order operations.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+int HierarchyCellDataOpsReal<TYPE>::numberOfEntries(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int entries = 0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         if (!d.isNull()) {
+            entries += d_patch_ops.numberOfEntries(d, box);
+         }
+      }
+   }
+
+   int global_entries = entries;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&entries, &global_entries, 1, MPI_INT, MPI_SUM);
+   }
+   return global_entries;
+}
+
+template<class TYPE>
+double HierarchyCellDataOpsReal<TYPE>::sumControlVolumes(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(vol_id >= 0);
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double sum = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > data = p->getPatchData(data_id);
+         tbox::Pointer<pdat::CellData<double> > cv = p->getPatchData(vol_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!cv.isNull());
+#endif
+         hier::Box box = cv->getGhostBox();
+
+         sum += d_patch_ops.sumControlVolumes(data, cv, box);
+      }
+   }
+
+   double global_sum = sum;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&sum, &global_sum, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   return global_sum;
+}
+
+template<class TYPE>
+double HierarchyCellDataOpsReal<TYPE>::L1Norm(
+   const int data_id,
+   const int vol_id,
+   bool local_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > data = p->getPatchData(data_id);
+         tbox::Pointer<pdat::CellData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!data.isNull());
+#endif
+            box = data->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         norm += d_patch_ops.L1Norm(data, box, cv);
+      }
+   }
+
+   if (!local_only) {
+      double global_norm = norm;
+      if (mpi.getSize() > 1) {
+         mpi.Allreduce(&norm, &global_norm, 1, MPI_DOUBLE, MPI_SUM);
+      }
+      norm = global_norm;
+   }
+   return norm;
+}
+
+template<class TYPE>
+double HierarchyCellDataOpsReal<TYPE>::L2Norm(
+   const int data_id,
+   const int vol_id,
+   bool local_only) const
+{
+   double norm_squared = HierarchyCellDataOpsReal<TYPE>::dot(data_id,
+         data_id,
+         vol_id,
+         local_only);
+
+   return sqrt(norm_squared);
+}
+
+template<class TYPE>
+double HierarchyCellDataOpsReal<TYPE>::weightedL2Norm(
+   const int data_id,
+   const int wgt_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm_squared = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > data = p->getPatchData(data_id);
+         tbox::Pointer<pdat::CellData<TYPE> > weight = p->getPatchData(wgt_id);
+         tbox::Pointer<pdat::CellData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!data.isNull());
+#endif
+            box = data->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         double pnorm = d_patch_ops.weightedL2Norm(data, weight, box, cv);
+
+         norm_squared += pnorm * pnorm;
+      }
+   }
+
+   double global_norm_squared = norm_squared;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&norm_squared, &global_norm_squared, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   return sqrt(global_norm_squared);
+}
+
+template<class TYPE>
+double HierarchyCellDataOpsReal<TYPE>::RMSNorm(
+   const int data_id,
+   const int vol_id) const
+{
+   double l2_norm = L2Norm(data_id, vol_id);
+
+   double volume = ((vol_id < 0) ? (double)numberOfEntries(data_id, true)
+                    : sumControlVolumes(data_id, vol_id));
+
+   double rms_norm = l2_norm / sqrt(volume);
+   return rms_norm;
+}
+
+template<class TYPE>
+double HierarchyCellDataOpsReal<TYPE>::weightedRMSNorm(
+   const int data_id,
+   const int wgt_id,
+   const int vol_id) const
+{
+
+   double l2_norm = weightedL2Norm(data_id, wgt_id, vol_id);
+
+   double volume = ((vol_id < 0) ? (double)numberOfEntries(data_id, true)
+                    : sumControlVolumes(data_id, vol_id));
+
+   double rms_norm = l2_norm / sqrt(volume);
+   return rms_norm;
+}
+
+template<class TYPE>
+double HierarchyCellDataOpsReal<TYPE>::maxNorm(
+   const int data_id,
+   const int vol_id,
+   bool local_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level =
+         d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > data =
+            p->getPatchData(data_id);
+         tbox::Pointer<pdat::CellData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!data.isNull());
+#endif
+            box = data->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         norm = tbox::MathUtilities<double>::Max(norm,
+               d_patch_ops.maxNorm(data, box, cv));
+      }
+   }
+
+   if (!local_only) {
+      double global_norm = norm;
+      if (mpi.getSize() > 1) {
+         mpi.Allreduce(&norm, &global_norm, 1, MPI_DOUBLE, MPI_MAX);
+      }
+      norm = global_norm;
+   }
+   return norm;
+}
+
+template<class TYPE>
+TYPE HierarchyCellDataOpsReal<TYPE>::dot(
+   const int data1_id,
+   const int data2_id,
+   const int vol_id,
+   bool local_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE dprod = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > data1 = p->getPatchData(data1_id);
+         tbox::Pointer<pdat::CellData<TYPE> > data2 = p->getPatchData(data2_id);
+         tbox::Pointer<pdat::CellData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!data1.isNull());
+#endif
+            box = data1->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         dprod += d_patch_ops.dot(data1, data2, box, cv);
+      }
+   }
+
+   if (!local_only) {
+      if (mpi.getSize() > 1) {
+         mpi.AllReduce(&dprod, 1, MPI_SUM);
+      }
+   }
+   return dprod;
+}
+
+template<class TYPE>
+TYPE HierarchyCellDataOpsReal<TYPE>::integral(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE local_integral = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > data =
+            p->getPatchData(data_id);
+         tbox::Pointer<pdat::CellData<double> > vol = p->getPatchData(vol_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!data.isNull());
+         TBOX_ASSERT(!vol.isNull());
+#endif
+
+         hier::Box box = data->getGhostBox();
+
+         local_integral += d_patch_ops.integral(data, box, vol);
+      }
+   }
+
+   TYPE global_integral = local_integral;
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&global_integral, 1, MPI_SUM);
+   }
+   return global_integral;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Generic miscellaneous operations for real data.                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+int HierarchyCellDataOpsReal<TYPE>::computeConstrProdPos(
+   const int data1_id,
+   const int data2_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int test = 1;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level =
+         d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > data1 =
+            p->getPatchData(data1_id);
+         tbox::Pointer<pdat::CellData<TYPE> > data2 =
+            p->getPatchData(data2_id);
+         tbox::Pointer<pdat::CellData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!data1.isNull());
+#endif
+            box = data1->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         test = tbox::MathUtilities<int>::Min(
+               test,
+               d_patch_ops.computeConstrProdPos(data1, data2, box, cv));
+      }
+   }
+
+   int global_test = test;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&test, &global_test, 1, MPI_INT, MPI_MIN);
+   }
+   return global_test;
+}
+
+template<class TYPE>
+void HierarchyCellDataOpsReal<TYPE>::compareToScalar(
+   const int dst_id,
+   const int src_id,
+   const TYPE& alpha,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<TYPE> > src = p->getPatchData(src_id);
+         tbox::Pointer<pdat::CellData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!dst.isNull());
+#endif
+            box = dst->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         d_patch_ops.compareToScalar(dst, src, alpha, box, cv);
+      }
+   }
+}
+
+template<class TYPE>
+int HierarchyCellDataOpsReal<TYPE>::testReciprocal(
+   const int dst_id,
+   const int src_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int test = 1;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::CellData<TYPE> > src = p->getPatchData(src_id);
+         tbox::Pointer<pdat::CellData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!dst.isNull());
+#endif
+            box = dst->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         test = tbox::MathUtilities<int>::Min(
+               test,
+               d_patch_ops.testReciprocal(dst, src, box, cv));
+      }
+   }
+
+   int global_test = test;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&test, &global_test, 1, MPI_INT, MPI_MIN);
+   }
+   return global_test;
+}
+
+template<class TYPE>
+TYPE HierarchyCellDataOpsReal<TYPE>::maxPointwiseDivide(
+   const int numer_id,
+   const int denom_id,
+   bool local_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE max = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > numer = p->getPatchData(numer_id);
+         tbox::Pointer<pdat::CellData<TYPE> > denom = p->getPatchData(denom_id);
+
+         hier::Box box = p->getBox();
+
+         max = tbox::MathUtilities<TYPE>::Max(max,
+               d_patch_ops.maxPointwiseDivide(numer, denom, box));
+      }
+   }
+
+   if (!local_only) {
+      if (mpi.getSize() > 1) {
+         mpi.AllReduce(&max, 1, MPI_MAX);
+      }
+   }
+   return max;
+}
+
+template<class TYPE>
+TYPE HierarchyCellDataOpsReal<TYPE>::minPointwiseDivide(
+   const int numer_id,
+   const int denom_id,
+   bool local_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE min = tbox::MathUtilities<TYPE>::getMax();
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > numer = p->getPatchData(numer_id);
+         tbox::Pointer<pdat::CellData<TYPE> > denom = p->getPatchData(denom_id);
+
+         hier::Box box = p->getBox();
+
+         min = tbox::MathUtilities<TYPE>::Min(min,
+               d_patch_ops.minPointwiseDivide(numer, denom, box));
+      }
+   }
+
+   if (!local_only) {
+      if (mpi.getSize() > 1) {
+         mpi.AllReduce(&min, 1, MPI_MIN);
+      }
+   }
+   return min;
+}
+
+template<class TYPE>
+TYPE HierarchyCellDataOpsReal<TYPE>::min(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE minval = tbox::MathUtilities<TYPE>::getMax();
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         minval = tbox::MathUtilities<TYPE>::Min(minval, d_patch_ops.min(d, box));
+      }
+   }
+
+   TYPE global_min = minval;
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&global_min, 1, MPI_MIN);
+   }
+   return global_min;
+}
+
+template<class TYPE>
+TYPE HierarchyCellDataOpsReal<TYPE>::max(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE maxval = -tbox::MathUtilities<TYPE>::getMax();
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::CellData<TYPE> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         maxval = tbox::MathUtilities<TYPE>::Max(maxval, d_patch_ops.max(d, box));
+      }
+   }
+
+   TYPE global_max = maxval;
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&global_max, 1, MPI_MAX);
+   }
+   return global_max;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyCellDataOpsReal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyCellDataOpsReal.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,519 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations for real cell data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyCellDataOpsReal
+#define included_math_HierarchyCellDataOpsReal
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/math/HierarchyDataOpsReal.h"
+#include "SAMRAI/math/PatchCellDataOpsReal.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class HierarchyCellDataOpsReal provides a collection of operations
+ * that manipulate real (double and float) cell-centered patch data components
+ * over multiple levels in an AMR hierarchy.  It is derived from the abstract
+ * base class HierarchyDataOpsReal which defines the interface to
+ * similar operations for cell-centered, face-centered, node-centered patch
+ * data objects where the data is either double or float. The operations
+ * include basic arithmetic, norms and ordering, and assorted miscellaneous
+ * operations.  On each patch, the operations are performed by the
+ * PatchCellDataOpsReal data member.
+ *
+ * The patch hierarchy and set of levels within that hierarcy over which the
+ * operations will be performed are set in the constructor.  However, note
+ * that the constructor accepts default arguments for the coarsest and finest
+ * level numbers.  If the level numbers are not specified when calling the
+ * constructor the levels which exist in the hierarchy will be assumed in
+ * all operations.  The hierarchy and levels may be changed at any time using
+ * the proper member functions.
+ *
+ * Note that, when it makes sense, an operation accept a boolean argument
+ * which indicates whether the operation should be performed on all of the
+ * data or just those data elements corresponding to the patch interiors.
+ * If no boolean argument is provided, the default behavior is to treat only
+ * the patch interiors.  Also, a similar set of operations for complex and
+ * integer cell-centered data is provided in the classes
+ * HierarchyCellDataOpsComplex and HierarchyCellDataOpsInteger,
+ * respectively.
+ *
+ * @see math::PatchCellDataOpsReal
+ */
+
+template<class TYPE>
+class HierarchyCellDataOpsReal:public HierarchyDataOpsReal<TYPE>
+{
+public:
+   /**
+    * The constructor for the HierarchyCellDataOpsReal class sets
+    * the default patch hierarchy and coarsest and finest patch levels
+    * in that hierarchy over which operations will be performed.  The
+    * hierarchy and operations may be reset using the member functions
+    * setPatchHierarchy() and resetLevels() below.  If no level number
+    * arguments are given here, the levels over which the operations will
+    * be performed are those already existing in the hierarchy.  If the
+    * hierarchy level configuration changes, the operations must be explicitly
+    * reset by calling the resetLevels() function.
+    */
+   explicit HierarchyCellDataOpsReal(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int coarsest_level = -1,
+      const int finest_level = -1);
+
+   /**
+    * Virtual destructor for the HierarchyCellDataOpsReal class.
+    */
+   virtual ~HierarchyCellDataOpsReal<TYPE>();
+
+   /**
+    * Reset patch hierarchy over which operations occur.
+    */
+   void
+   setPatchHierarchy(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+   /**
+    * Reset range of patch levels over which operations occur.
+    * The levels must exist in the hierarchy or an assertion will result.
+    */
+   void
+   resetLevels(
+      const int coarsest_level,
+      const int finest_level);
+
+   /**
+    * Return const pointer to patch hierarchy associated with operations.
+    */
+   const tbox::Pointer<hier::PatchHierarchy>
+   getPatchHierarchy() const;
+
+   /**
+    * Copy source data to destination data.
+    */
+   void
+   copyData(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Swap data pointers (i.e., storage) between two data components.
+    */
+   void
+   swapData(
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data over multiple levels to specified output stream.
+    */
+   void
+   printData(
+      const int data_id,
+      std::ostream& s,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data component to given scalar.
+    */
+   void
+   setToScalar(
+      const int data_id,
+      const TYPE& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to source multiplied by given scalar, pointwise.
+    */
+   void
+   scale(
+      const int dst_id,
+      const TYPE& alpha,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Add scalar to each entry in source data and set destination to result.
+    */
+   void
+   addScalar(
+      const int dst_id,
+      const int src_id,
+      const TYPE& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to sum of two source components, pointwise.
+    */
+   void
+   add(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Subtract second source component from first source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   subtract(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination component to product of two source components, pointwise.
+    */
+   void
+   multiply(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Divide first data component by second source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   divide(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set each entry of destination component to reciprocal of corresponding
+    * source data component entry.
+    */
+   void
+   reciprocal(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + \beta s_2\f$, where \f$d\f$ is the destination patch
+    * data component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha, \beta\f$ are scalar values.
+    */
+   void
+   linearSum(
+      const int dst_id,
+      const TYPE& alpha,
+      const int src1_id,
+      const TYPE& beta,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axpy(
+      const int dst_id,
+      const TYPE& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 - s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axmy(
+      const int dst_id,
+      const TYPE& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination data to absolute value of source data, pointwise.
+    */
+   void
+   abs(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return minimum data value over all patches in the collection of levels.
+    */
+   TYPE
+   min(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return maximum data value over all patches in the collection of levels.
+    */
+   TYPE
+   max(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data entries to random values.  See the operations in the
+    * array data operation classes for each data type for details on the
+    * generation of the random values.
+    */
+   void
+   setRandomValues(
+      const int data_id,
+      const TYPE& width,
+      const TYPE& low,
+      const bool interior_only = true) const;
+
+   /**
+    * Return the total number of data values for the component on the set
+    * of hierarchy levels.  If the boolean argument is true, the number of
+    * elements will be summed over patch interiors.  If the boolean argument
+    * is false, all elements will be counted (including ghost values)
+    * over all patches.
+    */
+   int
+   numberOfEntries(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return sum of the control volumes associated with the data component.
+    * Note that if the ontrol volumes are set propery, this is equivalent to
+    * integrating a data component containing all ones over the collection of
+    * hierarchy levels.
+    */
+   double
+   sumControlVolumes(
+      const int data_id,
+      const int vol_id) const;
+
+   /**
+    * Return discrete \f$L_1\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( \| data_i \| cvol_i )\f$.  If the
+    * control volume is not defined (vol_id < 0), the return value is
+    * \f$\sum_i ( \| data_i \| )\f$.
+    * If local_only is true, the global reduction is not
+    * performed (thus each process will get only local results).
+    */
+   double
+   L1Norm(
+      const int data_id,
+      const int vol_id = -1,
+      bool local_only = false) const;
+
+   /**
+    * Return discrete \f$L_2\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sqrt{ \sum_i ( (data_i)^2 cvol_i ) }\f$.
+    * If the control volume is  not defined (vol_id < 0), the return value
+    * is \f$\sqrt{ \sum_i ( (data_i)^2 cvol_i ) }\f$.
+    * If local_only is true, the global reduction is not
+    * performed (thus each process will get only local results).
+    */
+   double
+   L2Norm(
+      const int data_id,
+      const int vol_id = -1,
+      bool local_only = false) const;
+
+   /**
+    * Return discrete weighted \f$L_2\f$-norm of the data using the control
+    * volume to weight the contribution of the data and weight entries to
+    * the sum.  That is, the return value is the sum \f$\sqrt{ \sum_i (
+    * (data_i * weight_i)^2 cvol_i ) }\f$.  If the control volume is not defined
+    * (vol_id < 0), the return value is
+    * \f$\sqrt{ \sum_i ( (data_i * weight_i)^2 ) }\f$.
+    */
+   double
+   weightedL2Norm(
+      const int data_id,
+      const int weight_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete root mean squared norm of the data.  If the control
+    * volume is defined, the return value is the \f$L_2\f$-norm divided by
+    * the square root of the sum of the control volumes.  Otherwise, the
+    * return value is the \f$L_2\f$-norm divided by the square root of the
+    * number of data entries.
+    */
+   double
+   RMSNorm(
+      const int data_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete weighted root mean squared norm of the data.  If the
+    * control volume is define, the return value is the weighted \f$L_2\f$-norm
+    * divided by the square root of the sum of the control volumes.  Otherwise,
+    * the return value is the weighted \f$L_2\f$-norm divided by the square root
+    * of the number of data entries.
+    */
+   double
+   weightedRMSNorm(
+      const int data_id,
+      const int weight_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return the \f$\max\f$-norm of the data using the control volume to weight
+    * the contribution of each data entry to the maximum.  That is, the return
+    * value is \f$\max_i ( \| data_i \| )\f$, where the max is over the data
+    * elements where \f$cvol_i > 0\f$.  If the control volume is undefined
+    * (vol_id < 0), it is ignored during the computation of the maximum.
+    * If local_only is true, the global reduction is not
+    * performed (thus each process will get only local results).
+    */
+   double
+   maxNorm(
+      const int data_id,
+      const int vol_id = -1,
+      bool local_only = false) const;
+
+   /**
+    * Return the dot product of the two data arrays using the control volume
+    * to weight the contribution of each product to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( data1_i * data2_i * cvol_i )\f$.
+    * If the control volume is undefined (vol_id < 0), it is ignored during
+    * the summation.  If local_only is true, the global reduction is not
+    * performed (thus each process will get only local results).
+    */
+   TYPE
+   dot(
+      const int data1_id,
+      const int data2_id,
+      const int vol_id = -1,
+      bool local_only = false) const;
+
+   /**
+    * Return the integral of the function represented by the data array.
+    * The return value is the sum \f$\sum_i ( data_i * vol_i )\f$.
+    */
+   TYPE
+   integral(
+      const int data_id,
+      const int vol_id) const;
+
+   /**
+    * Return 1 if \f$\|data2_i\| > 0\f$ and \f$data1_i * data2_i \leq 0\f$, for
+    * any \f$i\f$ in the set of patch data indices, where \f$cvol_i > 0\f$.  Otherwise,
+    * return 0.  If the control volume is undefined (vol_id < 0), all values
+    * on the patch interiors are considered.
+    */
+   int
+   computeConstrProdPos(
+      const int data1_id,
+      const int data2_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Wherever \f$cvol_i > 0\f$ in the set of patch data indices, set \f$dst_i = 1\f$
+    * if \f$\|src_i\| > \alpha\f$, and \f$dst_i = 0\f$ otherwise.  If the control
+    * volume is undefined (vol_id < 0), all values on the patch interiors
+    * are considered.
+    */
+   void
+   compareToScalar(
+      const int dst_id,
+      const int src_id,
+      const TYPE& alpha,
+      const int vol_id = -1) const;
+
+   /**
+    * Wherever \f$cvol_i > 0\f$ in the set of patch data indices, set
+    * \f$dst_i = 1/src_i\f$ if \f$src_i \neq 0\f$, and \f$dst_i = 0\f$ otherwise.
+    * If \f$dst_i = 0\f$ anywhere, 0 is the return value.  Otherwise 1 is returned.
+    * If the control volume is undefined (vol_id < 0), all values on the
+    * patch interiors are considered.
+    */
+   int
+   testReciprocal(
+      const int dst_id,
+      const int src_id,
+      const int vol_id = -1) const;
+
+   /*!
+    * @brief Compute max of "conditional" quotients of two arrays.
+    *
+    * Return the maximum of pointwise "conditional" quotients of the numerator
+    * and denominator.
+    *
+    * The "conditional" quotient is defined as |numerator/denominator|
+    * where the denominator is nonzero.  Otherwise, it is defined as
+    * |numerator|.
+    *
+    * @b Note: This method is currently intended to support the
+    * PETSc-2.1.6 vector wrapper only.  Please do not use it!
+    */
+   TYPE
+   maxPointwiseDivide(
+      const int numer_id,
+      const int denom_id,
+      bool local_only = false) const;
+
+   /*!
+    * @brief Compute min of quotients of two arrays.
+    *
+    * Return the minimum of pointwise quotients of the numerator
+    * and denominator.
+    *
+    * The quotient is defined as (numerator/denominator)
+    * where the denominator is nonzero.  When the denominator is zero, the
+    * entry is skipped.  If the denominator is always zero, the value of
+    * tbox::IEEE::getFLT_MAX() is returned (see @ref SAMRAI::tbox::IEEE).
+    *
+    * @b Note: This method is currently intended to support the
+    * SUNDIALS vector wrapper only.  Please do not use it!
+    */
+   TYPE
+   minPointwiseDivide(
+      const int numer_id,
+      const int denom_id,
+      bool local_only = false) const;
+
+private:
+   // The following are not implemented
+   HierarchyCellDataOpsReal(
+      const HierarchyCellDataOpsReal<TYPE>&);
+   void
+   operator = (
+      const HierarchyCellDataOpsReal<TYPE>&);
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+   int d_coarsest_level;
+   int d_finest_level;
+   PatchCellDataOpsReal<TYPE> d_patch_ops;
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/HierarchyCellDataOpsReal.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyDataOpsComplex.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyDataOpsComplex.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,29 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to operations for complex data on hierarchy. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyDataOpsComplex_C
+#define included_math_HierarchyDataOpsComplex_C
+
+#include "SAMRAI/math/HierarchyDataOpsComplex.h"
+
+namespace SAMRAI {
+namespace math {
+
+HierarchyDataOpsComplex::HierarchyDataOpsComplex()
+{
+}
+
+HierarchyDataOpsComplex::~HierarchyDataOpsComplex()
+{
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyDataOpsComplex.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyDataOpsComplex.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,376 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to operations for complex data on hierarchy. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyDataOpsComplex
+#define included_math_HierarchyDataOpsComplex
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class HierarchyDataOpsComplex defines the interface to a collection
+ * of operations that may be used to manipulate complex numerical patch data
+ * components over multiple levels in an AMR hierarchy.  It serves as a base
+ * class for subclasses which implement the operations for cell-centered,
+ * face-centered, or node-centered data types.  The patch hierarchy and set
+ * of levels within that hierarcy over which the operations will be performed
+ * are set in the constructor of the subclass.  However, these data members may
+ * be changed at any time via the virtual access functions setPatchHierarchy()
+ * and resetLevels() below.  The operations include basic arithmetic and norms.
+ *
+ * Note that, when it makes sense, an operation accept a boolean argument
+ * which indicates whether the operation should be performed on all of the
+ * data or just those data elements corresponding to the patch interiors.
+ * If no boolean argument is provided, the default behavior is to treat only
+ * the patch interiors.  Also, interfaces for similar sets of operations
+ * for real (double and float) and integer hierarchy data are defined in the
+ * classes HierarchyDataOpsReal and HierarchyDataOpsInteger,
+ * respectively.
+ */
+
+class HierarchyDataOpsComplex:public tbox::DescribedClass
+{
+public:
+   /**
+    * The constructor for the HierarchyDataOpsComplex class.
+    */
+   HierarchyDataOpsComplex();
+
+   /**
+    * Virtual destructor for the HierarchyDataOpsComplex class.
+    */
+   virtual ~HierarchyDataOpsComplex();
+
+   /**
+    * Reset patch hierarchy over which operations occur.
+    */
+   virtual
+   void
+   setPatchHierarchy(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy) = 0;
+
+   /**
+    * Reset range of patch levels over which operations occur.
+    * Typically, levels must exist in hierarchy or an assertion will result.
+    */
+   virtual void
+   resetLevels(
+      const int coarsest_level,
+      const int finest_level) = 0;
+
+   /**
+    * Return const pointer to patch hierarchy associated with operations.
+    */
+   virtual
+   const tbox::Pointer<hier::PatchHierarchy>
+   getPatchHierarchy() const = 0;
+
+   /**
+    * Copy source data to destination data.
+    */
+   virtual void
+   copyData(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Swap data pointers (i.e., storage) between two data components.
+    */
+   virtual void
+   swapData(
+      const int data1_id,
+      const int data2_id) const = 0;
+
+   /**
+    * Print data over multiple levels to specified output stream.
+    */
+   virtual void
+   printData(
+      const int data_id,
+      std::ostream& s,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set data component to given scalar.
+    */
+   virtual void
+   setToScalar(
+      const int data_id,
+      const dcomplex& alpha,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set destination to source multiplied by given scalar, pointwise.
+    */
+   virtual void
+   scale(
+      const int dst_id,
+      const dcomplex& alpha,
+      const int src_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Add scalar to each entry in source data and set destination to result.
+    */
+   virtual void
+   addScalar(
+      const int dst_id,
+      const int src_id,
+      const dcomplex& alpha,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set destination to sum of two source components, pointwise.
+    */
+   virtual void
+   add(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Subtract second source component from first source component pointwise
+    * and set destination data component to result.
+    */
+   virtual void
+   subtract(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set destination component to product of two source components, pointwise.
+    */
+   virtual void
+   multiply(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Divide first data component by second source component pointwise
+    * and set destination data component to result.
+    */
+   virtual void
+   divide(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set each entry of destination component to reciprocal of corresponding
+    * source data component entry.
+    */
+   virtual void
+   reciprocal(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set \f$d = \alpha s_1 + \beta s_2\f$, where \f$d\f$ is the destination patch
+    * data component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha, \beta\f$ are scalar values.
+    */
+   virtual void
+   linearSum(
+      const int dst_id,
+      const dcomplex& alpha,
+      const int src1_id,
+      const dcomplex& beta,
+      const int src2_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set \f$d = \alpha s_1 + s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   virtual void
+   axpy(
+      const int dst_id,
+      const dcomplex& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set \f$d = \alpha s_1 - s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   virtual void
+   axmy(
+      const int dst_id,
+      const dcomplex& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set destination data to absolute value of source data, pointwise.
+    */
+   virtual void
+   abs(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set data entries to random values.  See the operations in the
+    * array data operation classes for each data type for details on the
+    * generation of the random values.
+    */
+   virtual void
+   setRandomValues(
+      const int data_id,
+      const dcomplex& width,
+      const dcomplex& low,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Return the total number of data values for the component on the set
+    * of hierarchy levels.  If the boolean argument is true, the number of
+    * elements will be summed over patch interiors.  If the boolean argument
+    * is false, all elements will be counted (including ghost values)
+    * over all patches.
+    */
+   virtual int
+   numberOfEntries(
+      const int data_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Return sum of the control volumes associated with the data component.
+    * Note that if the ontrol volumes are set propery, this is equivalent to
+    * integrating a data component containing all ones over the collection of
+    * hierarchy levels.
+    */
+   virtual double
+   sumControlVolumes(
+      const int data_id,
+      const int vol_id) const = 0;
+
+   /**
+    * Return discrete \f$L_1\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( \sqrt{data_i * \bar{data_i}}*cvol_i )\f$.
+    * If the control volume is undefined (vol_id < 0), the
+    * return value is \f$\sum_i ( \sqrt{data_i * \bar{data_i}} )\f$.
+    */
+   virtual double
+   L1Norm(
+      const int data_id,
+      const int vol_id = -1) const = 0;
+
+   /**
+    * Return discrete \f$L_2\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum
+    * \f$\sqrt{ \sum_i ( data_i * \bar{data_i} cvol_i ) }\f$.
+    * If the control volume is undefined (vol_id < 0), the return value is
+    * \f$\sqrt{ \sum_i ( data_i * \bar{data_i} ) }\f$.
+    */
+   virtual double
+   L2Norm(
+      const int data_id,
+      const int vol_id = -1) const = 0;
+
+   /**
+    * Return discrete weighted \f$L_2\f$-norm of the data using the control
+    * volume to weight the contribution of the data and weight entries to
+    * the sum.  That is, the return value is the sum \f$\sqrt{ \sum_i (
+    * (data_i * wgt_i) * \bar{(data_i * wgt_i)} cvol_i ) }\f$.  If the control
+    * volume is undefined (vol_id < 0), the return value is
+    * \f$\sqrt{ \sum_i ( (data_i * wgt_i) * \bar{(data_i * wgt_i)} cvol_i ) }\f$.
+    */
+   virtual double
+   weightedL2Norm(
+      const int data_id,
+      const int weight_id,
+      const int vol_id = -1) const = 0;
+
+   /**
+    * Return discrete root mean squared norm of the data.  If the control
+    * volume is specified (vol_id >= 0), the return value is the \f$L_2\f$-norm
+    * divided by the square root of the sum of the control volumes.  Otherwise,
+    * the return value is the \f$L_2\f$-norm divided by the square root of the
+    * number of data entries.
+    */
+   virtual double
+   RMSNorm(
+      const int data_id,
+      const int vol_id = -1) const = 0;
+
+   /**
+    * Return discrete weighted root mean squared norm of the data.  If the
+    * control volume is specified (vol_id >= 0), the return value is the
+    * weighted \f$L_2\f$-norm divided by the square root of the sum of the
+    * control volumes.  Otherwise, the return value is the weighted \f$L_2\f$-norm
+    * divided by the square root of the number of data entries.
+    */
+   virtual double
+   weightedRMSNorm(
+      const int data_id,
+      const int weight_id,
+      const int vol_id = -1) const = 0;
+
+   /**
+    * Return the \f$\max\f$-norm of the data using the control volume to weight
+    * the contribution of each data entry to the maximum.  That is, the return
+    * value is \f$\max_i ( \sqrt{data_i * \bar{data_i}} )\f$, where the max is
+    * over the data elements where \f$cvol_i > 0\f$.  If the control volume is
+    * undefined (vol_id < 0), it is ignored during the computation of the
+    * maximum.
+    */
+   virtual double
+   maxNorm(
+      const int data_id,
+      const int vol_id = -1) const = 0;
+
+   /**
+    * Return the dot product of the two data arrays using the control volume
+    * to weight the contribution of each product to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( data1_i * \bar{data2_i} * cvol_i )\f$.
+    * If the control volume is undefined (vol_id < 0), it is ignored during
+    * the summation.
+    */
+   virtual dcomplex
+   dot(
+      const int data1_id,
+      const int data2_id,
+      const int vol_id = -1) const = 0;
+
+private:
+   // The following are not implemented
+   HierarchyDataOpsComplex(
+      const HierarchyDataOpsComplex&);
+   void
+   operator = (
+      const HierarchyDataOpsComplex&);
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyDataOpsInteger.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyDataOpsInteger.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,29 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to operations for integer data on hierarchy. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyDataOpsInteger_C
+#define included_math_HierarchyDataOpsInteger_C
+
+#include "SAMRAI/math/HierarchyDataOpsInteger.h"
+
+namespace SAMRAI {
+namespace math {
+
+HierarchyDataOpsInteger::HierarchyDataOpsInteger()
+{
+}
+
+HierarchyDataOpsInteger::~HierarchyDataOpsInteger()
+{
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyDataOpsInteger.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyDataOpsInteger.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,291 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to operations for integer data on hierarchy. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyDataOpsInteger
+#define included_math_HierarchyDataOpsInteger
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class HierarchyDataOpsInteger defines the interface to a collection
+ * of operations that may be used to manipulate integer numerical patch data
+ * components over multiple levels in an AMR hierarchy.  It serves as a base
+ * class for subclasses which implement the operations for cell-centered,
+ * face-centered, or node-centered data types.  The patch hierarchy and set
+ * of levels within that hierarcy over which the operations will be performed
+ * are set in the constructor of the subclass.  However, these data members may
+ * be changed at any time via the virtual access functions setPatchHierarchy()
+ * and resetLevels() below.  The operations include basic arithmetic and
+ * some ordering operations.
+ *
+ * Note that, when it makes sense, an operation accept a boolean argument
+ * which indicates whether the operation should be performed on all of the
+ * data or just those data elements corresponding to the patch interiors.
+ * If no boolean argument is provided, the default behavior is to treat only
+ * the patch interiors.  Also, interfaces for similar sets of operations
+ * for real (double and float) and complex hierarchy data are defined in the
+ * classes HierarchyDataOpsReal and HierarchyDataOpsComplex,
+ * respectively.
+ */
+
+class HierarchyDataOpsInteger:public tbox::DescribedClass
+{
+public:
+   /**
+    * The constructor for the HierarchyDataOpsInteger class.
+    */
+   HierarchyDataOpsInteger();
+
+   /**
+    * Virtual destructor for the HierarchyDataOpsInteger class.
+    */
+   virtual ~HierarchyDataOpsInteger();
+
+   /**
+    * Reset patch hierarchy over which operations occur.
+    */
+   virtual
+   void
+   setPatchHierarchy(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy) = 0;
+
+   /**
+    * Reset range of patch levels over which operations occur.
+    * Typically, levels must exist in hierarchy or an assertion will result.
+    */
+   virtual void
+   resetLevels(
+      const int coarsest_level,
+      const int finest_level) = 0;
+
+   /**
+    * Return const pointer to patch hierarchy associated with operations.
+    */
+   virtual
+   const tbox::Pointer<hier::PatchHierarchy>
+   getPatchHierarchy() const = 0;
+
+   /**
+    * Return the total number of data values for the component on the set
+    * of hierarchy levels.  If the boolean argument is true, the number of
+    * elements will be summed over patch interiors.  If the boolean argument
+    * is false, all elements will be counted (including ghost values)
+    * over all patches.
+    */
+   virtual int
+   numberOfEntries(
+      const int data_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Copy source data to destination data.
+    */
+   virtual void
+   copyData(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Swap data pointers (i.e., storage) between two data components.
+    */
+   virtual void
+   swapData(
+      const int data1_id,
+      const int data2_id) const = 0;
+
+   /**
+    * Print data over multiple levels to specified output stream.
+    */
+   virtual void
+   printData(
+      const int data_id,
+      std::ostream& s,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set data component to given scalar.
+    */
+   virtual void
+   setToScalar(
+      const int data_id,
+      const int& alpha,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set destination to source multiplied by given scalar, pointwise.
+    */
+   virtual void
+   scale(
+      const int dst_id,
+      const int& alpha,
+      const int src_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Add scalar to each entry in source data and set destination to result.
+    */
+   virtual void
+   addScalar(
+      const int dst_id,
+      const int src_id,
+      const int& alpha,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set destination to sum of two source components, pointwise.
+    */
+   virtual void
+   add(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Subtract second source component from first source component pointwise
+    * and set destination data component to result.
+    */
+   virtual void
+   subtract(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set destination component to product of two source components, pointwise.
+    */
+   virtual void
+   multiply(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Divide first data component by second source component pointwise
+    * and set destination data component to result.
+    */
+   virtual void
+   divide(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set each entry of destination component to reciprocal of corresponding
+    * source data component entry.
+    */
+   virtual void
+   reciprocal(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set \f$d = \alpha s_1 + \beta s_2\f$, where \f$d\f$ is the destination patch
+    * data component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha, \beta\f$ are scalar values.
+    */
+   virtual void
+   linearSum(
+      const int dst_id,
+      const int& alpha,
+      const int src1_id,
+      const int& beta,
+      const int src2_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set \f$d = \alpha s_1 + s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   virtual void
+   axpy(
+      const int dst_id,
+      const int& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set \f$d = \alpha s_1 - s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   virtual void
+   axmy(
+      const int dst_id,
+      const int& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set destination data to absolute value of source data, pointwise.
+    */
+   virtual void
+   abs(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Return minimum data value over all patches in the collection of levels.
+    */
+   virtual int
+   min(
+      const int data_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Return maximum data value over all patches in the collection of levels.
+    */
+   virtual int
+   max(
+      const int data_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set data entries to random values.  See the operations in the
+    * array data operation classes for each data type for details on the
+    * generation of the random values.
+    */
+   virtual void
+   setRandomValues(
+      const int data_id,
+      const int& width,
+      const int& low,
+      const bool interior_only = true) const = 0;
+
+private:
+   // The following are not implemented
+   HierarchyDataOpsInteger(
+      const HierarchyDataOpsInteger&);
+   void
+   operator = (
+      const HierarchyDataOpsInteger&);
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyDataOpsManager.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyDataOpsManager.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,660 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Singleton manager for hierarchy data operation objects. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyDataOpsManager_C
+#define included_math_HierarchyDataOpsManager_C
+
+#include "SAMRAI/math/HierarchyDataOpsManager.h"
+
+#include "SAMRAI/math/HierarchyCellDataOpsReal.h"
+#include "SAMRAI/math/HierarchyFaceDataOpsReal.h"
+#include "SAMRAI/math/HierarchyNodeDataOpsReal.h"
+#include "SAMRAI/math/HierarchySideDataOpsReal.h"
+#include "SAMRAI/math/HierarchyEdgeDataOpsReal.h"
+
+#include "SAMRAI/math/HierarchyCellDataOpsComplex.h"
+#include "SAMRAI/math/HierarchyFaceDataOpsComplex.h"
+#include "SAMRAI/math/HierarchyNodeDataOpsComplex.h"
+#include "SAMRAI/math/HierarchySideDataOpsComplex.h"
+#include "SAMRAI/math/HierarchyEdgeDataOpsComplex.h"
+
+#include "SAMRAI/math/HierarchyCellDataOpsInteger.h"
+#include "SAMRAI/math/HierarchyFaceDataOpsInteger.h"
+#include "SAMRAI/math/HierarchyNodeDataOpsInteger.h"
+#include "SAMRAI/math/HierarchySideDataOpsInteger.h"
+#include "SAMRAI/math/HierarchyEdgeDataOpsInteger.h"
+
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/pdat/EdgeVariable.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace math {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Static members for Singleton hierarchy operation manager class.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+HierarchyDataOpsManager *
+HierarchyDataOpsManager::s_pdat_op_manager_instance =
+   ((HierarchyDataOpsManager *)NULL);
+
+tbox::StartupShutdownManager::Handler
+HierarchyDataOpsManager::s_shutdown_handler(
+   0,
+   0,
+   HierarchyDataOpsManager::shutdownCallback,
+   0,
+   tbox::StartupShutdownManager::priorityHierarchyDataOpsManager);
+
+HierarchyDataOpsManager *HierarchyDataOpsManager::getManager()
+{
+   if (!s_pdat_op_manager_instance) {
+      s_pdat_op_manager_instance = new HierarchyDataOpsManager();
+   }
+   return s_pdat_op_manager_instance;
+}
+
+void HierarchyDataOpsManager::shutdownCallback()
+{
+   if (s_pdat_op_manager_instance) delete s_pdat_op_manager_instance;
+   s_pdat_op_manager_instance = ((HierarchyDataOpsManager *)NULL);
+}
+
+void HierarchyDataOpsManager::registerSingletonSubclassInstance(
+   HierarchyDataOpsManager* subclass_instance)
+{
+   if (!s_pdat_op_manager_instance) {
+      s_pdat_op_manager_instance = subclass_instance;
+   } else {
+      TBOX_ERROR("HierarchyDataOpsManager internal error...\n"
+         << "Attempting to set Singleton instance to subclass instance,"
+         << "\n but Singleton instance already set." << std::endl);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Empty constructor and destructor for hierarchy operation manager.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+HierarchyDataOpsManager::HierarchyDataOpsManager()
+{
+}
+
+HierarchyDataOpsManager::~HierarchyDataOpsManager()
+{
+}
+
+/*!
+ * Return pointer to operation object for a double variable
+ * on the given hierarchy.
+ *
+ * If a unique operator object is not requested, and if one already
+ * exists for the hierarchy and variable specified, the existing one
+ * will be created and returned.  Otherwise, a new one is created.
+ * Objects created created for unique requests will not be used later
+ * when an equivalent request is made.
+ */
+
+tbox::Pointer<HierarchyDataOpsReal<double> >
+HierarchyDataOpsManager::getOperationsDouble(
+   const tbox::Pointer<hier::Variable>& variable,
+   tbox::Pointer<hier::PatchHierarchy>& hierarchy,
+   bool get_unique)
+{
+   TBOX_ASSERT(!variable.isNull());
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*variable, *hierarchy);
+
+   const tbox::Pointer<pdat::CellVariable<double> > cellvar(variable);
+   const tbox::Pointer<pdat::FaceVariable<double> > facevar(variable);
+   const tbox::Pointer<pdat::NodeVariable<double> > nodevar(variable);
+   const tbox::Pointer<pdat::SideVariable<double> > sidevar(variable);
+   const tbox::Pointer<pdat::EdgeVariable<double> > edgevar(variable);
+
+   tbox::Pointer<HierarchyDataOpsReal<double> > ops;
+
+   if (!(cellvar.isNull())) {
+
+      if (get_unique) {
+         ops = new HierarchyCellDataOpsReal<double>(hierarchy);
+      } else {
+         const int n = d_cell_ops_double.getSize();
+         for (int i = 0; i < n && ops.isNull(); ++i) {
+            if (hierarchy !=
+                d_cell_ops_double[i]->getPatchHierarchy()) continue;
+            // A compatible operator has been found at i.
+            ops = d_cell_ops_double[i];
+         }
+         if (!ops) {
+            // No compatible operator has been found.
+            ops = new HierarchyCellDataOpsReal<double>(hierarchy);
+            d_cell_ops_double.resizeArray(n + 1);
+            d_cell_ops_double[n] = ops;
+         }
+      }
+
+   } else if (!(facevar.isNull())) {
+
+      if (get_unique) {
+         ops = new HierarchyFaceDataOpsReal<double>(hierarchy);
+      } else {
+         const int n = d_face_ops_double.getSize();
+         for (int i = 0; i < n && ops.isNull(); ++i) {
+            if (hierarchy !=
+                d_face_ops_double[i]->getPatchHierarchy()) continue;
+            // A compatible operator has been found at i.
+            ops = d_face_ops_double[i];
+         }
+         if (!ops) {
+            // No compatible operator has been found.
+            ops = new HierarchyFaceDataOpsReal<double>(hierarchy);
+            d_face_ops_double.resizeArray(n + 1);
+            d_face_ops_double[n] = ops;
+         }
+      }
+
+   } else if (!(nodevar.isNull())) {
+
+      if (get_unique) {
+         ops = new HierarchyNodeDataOpsReal<double>(hierarchy);
+      } else {
+         const int n = d_node_ops_double.getSize();
+         for (int i = 0; i < n && ops.isNull(); ++i) {
+            if (hierarchy !=
+                d_node_ops_double[i]->getPatchHierarchy()) continue;
+            // A compatible operator has been found at i.
+            ops = d_node_ops_double[i];
+         }
+         if (!ops) {
+            // No compatible operator has been found.
+            ops = new HierarchyNodeDataOpsReal<double>(hierarchy);
+            d_node_ops_double.resizeArray(n + 1);
+            d_node_ops_double[n] = ops;
+         }
+      }
+
+   } else if (!(sidevar.isNull())) {
+
+      if (get_unique) {
+         ops = new HierarchySideDataOpsReal<double>(hierarchy);
+      } else {
+         const int n = d_side_ops_double.getSize();
+         for (int i = 0; i < n && ops.isNull(); ++i) {
+            if (hierarchy !=
+                d_side_ops_double[i]->getPatchHierarchy()) continue;
+            // A compatible operator has been found at i.
+            ops = d_side_ops_double[i];
+         }
+         if (!ops) {
+            // No compatible operator has been found.
+            ops = new HierarchySideDataOpsReal<double>(hierarchy);
+            d_side_ops_double.resizeArray(n + 1);
+            d_side_ops_double[n] = ops;
+         }
+      }
+
+   } else if (!(edgevar.isNull())) {
+
+      if (get_unique) {
+         ops = new HierarchyEdgeDataOpsReal<double>(hierarchy);
+      } else {
+         const int n = d_edge_ops_double.getSize();
+         for (int i = 0; i < n && ops.isNull(); ++i) {
+            if (hierarchy !=
+                d_edge_ops_double[i]->getPatchHierarchy()) continue;
+            // A compatible operator has been found at i.
+            ops = d_edge_ops_double[i];
+         }
+         if (!ops) {
+            // No compatible operator has been found.
+            ops = new HierarchyEdgeDataOpsReal<double>(hierarchy);
+            d_edge_ops_double.resizeArray(n + 1);
+            d_edge_ops_double[n] = ops;
+         }
+      }
+
+   }
+
+   if (!ops) {
+      TBOX_ERROR("HierarchyDataOpsManager internal error...\n"
+         << "Operations for variable " << variable->getName()
+         << " not defined.");
+   }
+
+   return ops;
+}
+
+/*!
+ * Return pointer to operation object for a float variable
+ * on the given hierarchy.
+ *
+ * If a unique operator object is not requested, and if one already
+ * exists for the hierarchy and variable specified, the existing one
+ * will be created and returned.  Otherwise, a new one is created.
+ * Objects created created for unique requests will not be used later
+ * when an equivalent request is made.
+ */
+
+tbox::Pointer<HierarchyDataOpsReal<float> >
+HierarchyDataOpsManager::getOperationsFloat(
+   const tbox::Pointer<hier::Variable>& variable,
+   tbox::Pointer<hier::PatchHierarchy>& hierarchy,
+   bool get_unique)
+{
+   TBOX_ASSERT(!variable.isNull());
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*variable, *hierarchy);
+
+   const tbox::Pointer<pdat::CellVariable<float> > cellvar(variable);
+   const tbox::Pointer<pdat::FaceVariable<float> > facevar(variable);
+   const tbox::Pointer<pdat::NodeVariable<float> > nodevar(variable);
+   const tbox::Pointer<pdat::SideVariable<float> > sidevar(variable);
+   const tbox::Pointer<pdat::EdgeVariable<float> > edgevar(variable);
+
+   tbox::Pointer<HierarchyDataOpsReal<float> > ops;
+
+   if (!(cellvar.isNull())) {
+
+      if (get_unique) {
+         ops = new HierarchyCellDataOpsReal<float>(hierarchy);
+      } else {
+         const int n = d_cell_ops_float.getSize();
+         for (int i = 0; i < n && ops.isNull(); ++i) {
+            if (hierarchy != d_cell_ops_float[i]->getPatchHierarchy()) continue;
+            // A compatible operator has been found at i.
+            ops = d_cell_ops_float[i];
+         }
+         if (!ops) {
+            // No compatible operator has been found.
+            ops = new HierarchyCellDataOpsReal<float>(hierarchy);
+            d_cell_ops_float.resizeArray(n + 1);
+            d_cell_ops_float[n] = ops;
+         }
+      }
+
+   } else if (!(facevar.isNull())) {
+
+      if (get_unique) {
+         ops = new HierarchyFaceDataOpsReal<float>(hierarchy);
+      } else {
+         const int n = d_face_ops_float.getSize();
+         for (int i = 0; i < n && ops.isNull(); ++i) {
+            if (hierarchy != d_face_ops_float[i]->getPatchHierarchy()) continue;
+            // A compatible operator has been found at i.
+            ops = d_face_ops_float[i];
+         }
+         if (!ops) {
+            // No compatible operator has been found.
+            ops = new HierarchyFaceDataOpsReal<float>(hierarchy);
+            d_face_ops_float.resizeArray(n + 1);
+            d_face_ops_float[n] = ops;
+         }
+      }
+
+   } else if (!(nodevar.isNull())) {
+
+      if (get_unique) {
+         ops = new HierarchyNodeDataOpsReal<float>(hierarchy);
+      } else {
+         const int n = d_node_ops_float.getSize();
+         for (int i = 0; i < n && ops.isNull(); ++i) {
+            if (hierarchy != d_node_ops_float[i]->getPatchHierarchy()) continue;
+            // A compatible operator has been found at i.
+            ops = d_node_ops_float[i];
+         }
+         if (!ops) {
+            // No compatible operator has been found.
+            ops = new HierarchyNodeDataOpsReal<float>(hierarchy);
+            d_node_ops_float.resizeArray(n + 1);
+            d_node_ops_float[n] = ops;
+         }
+      }
+
+   } else if (!(sidevar.isNull())) {
+
+      if (get_unique) {
+         ops = new HierarchySideDataOpsReal<float>(hierarchy);
+      } else {
+         const int n = d_side_ops_float.getSize();
+         for (int i = 0; i < n && ops.isNull(); ++i) {
+            if (hierarchy != d_side_ops_float[i]->getPatchHierarchy()) continue;
+            // A compatible operator has been found at i.
+            ops = d_side_ops_float[i];
+         }
+         if (!ops) {
+            // No compatible operator has been found.
+            ops = new HierarchySideDataOpsReal<float>(hierarchy);
+            d_side_ops_float.resizeArray(n + 1);
+            d_side_ops_float[n] = ops;
+         }
+      }
+
+   } else if (!(edgevar.isNull())) {
+
+      if (get_unique) {
+         ops = new HierarchyEdgeDataOpsReal<float>(hierarchy);
+      } else {
+         const int n = d_edge_ops_float.getSize();
+         for (int i = 0; i < n && ops.isNull(); ++i) {
+            if (hierarchy != d_edge_ops_float[i]->getPatchHierarchy()) continue;
+            // A compatible operator has been found at i.
+            ops = d_edge_ops_float[i];
+         }
+         if (!ops) {
+            // No compatible operator has been found.
+            ops = new HierarchyEdgeDataOpsReal<float>(hierarchy);
+            d_edge_ops_float.resizeArray(n + 1);
+            d_edge_ops_float[n] = ops;
+         }
+      }
+
+   }
+
+   if (!ops) {
+      TBOX_ERROR("HierarchyDataOpsManager internal error...\n"
+         << "Operations for variable " << variable->getName()
+         << " not defined.");
+   }
+
+   return ops;
+}
+
+/*!
+ * Return pointer to operation object for a complex variable
+ * on the given hierarchy.
+ *
+ * If a unique operator object is not requested, and if one already
+ * exists for the hierarchy and variable specified, the existing one
+ * will be created and returned.  Otherwise, a new one is created.
+ * Objects created created for unique requests will not be used later
+ * when an equivalent request is made.
+ */
+
+tbox::Pointer<HierarchyDataOpsComplex>
+HierarchyDataOpsManager::getOperationsComplex(
+   const tbox::Pointer<hier::Variable>& variable,
+   tbox::Pointer<hier::PatchHierarchy>& hierarchy,
+   bool get_unique)
+{
+   TBOX_ASSERT(!variable.isNull());
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*variable, *hierarchy);
+
+   const tbox::Pointer<pdat::CellVariable<dcomplex> > cellvar(variable);
+   const tbox::Pointer<pdat::FaceVariable<dcomplex> > facevar(variable);
+   const tbox::Pointer<pdat::NodeVariable<dcomplex> > nodevar(variable);
+   const tbox::Pointer<pdat::SideVariable<dcomplex> > sidevar(variable);
+   const tbox::Pointer<pdat::EdgeVariable<dcomplex> > edgevar(variable);
+
+   tbox::Pointer<HierarchyDataOpsComplex> ops;
+
+   if (!(cellvar.isNull())) {
+
+      if (get_unique) {
+         ops = new HierarchyCellDataOpsComplex(hierarchy);
+      } else {
+         const int n = d_cell_ops_double.getSize();
+         for (int i = 0; i < n && ops.isNull(); ++i) {
+            if (hierarchy !=
+                d_cell_ops_complex[i]->getPatchHierarchy()) continue;
+            // A compatible operator has been found at i.
+            ops = d_cell_ops_complex[i];
+         }
+         if (!ops) {
+            // No compatible operator has been found.
+            ops = new HierarchyCellDataOpsComplex(hierarchy);
+            d_cell_ops_complex.resizeArray(n + 1);
+            d_cell_ops_complex[n] = ops;
+         }
+      }
+
+   } else if (!(facevar.isNull())) {
+
+      if (get_unique) {
+         ops = new HierarchyFaceDataOpsComplex(hierarchy);
+      } else {
+         const int n = d_face_ops_complex.getSize();
+         for (int i = 0; i < n && ops.isNull(); ++i) {
+            if (hierarchy !=
+                d_face_ops_complex[i]->getPatchHierarchy()) continue;
+            // A compatible operator has been found at i.
+            ops = d_face_ops_complex[i];
+         }
+         if (!ops) {
+            // No compatible operator has been found.
+            ops = new HierarchyFaceDataOpsComplex(hierarchy);
+            d_face_ops_complex.resizeArray(n + 1);
+            d_face_ops_complex[n] = ops;
+         }
+      }
+
+   } else if (!(nodevar.isNull())) {
+
+      if (get_unique) {
+         ops = new HierarchyNodeDataOpsComplex(hierarchy);
+      } else {
+         const int n = d_node_ops_complex.getSize();
+         for (int i = 0; i < n && ops.isNull(); ++i) {
+            if (hierarchy !=
+                d_node_ops_complex[i]->getPatchHierarchy()) continue;
+            // A compatible operator has been found at i.
+            ops = d_node_ops_complex[i];
+         }
+         if (!ops) {
+            // No compatible operator has been found.
+            ops = new HierarchyNodeDataOpsComplex(hierarchy);
+            d_node_ops_complex.resizeArray(n + 1);
+            d_node_ops_complex[n] = ops;
+         }
+      }
+
+   } else if (!(sidevar.isNull())) {
+
+      if (get_unique) {
+         ops = new HierarchySideDataOpsComplex(hierarchy);
+      } else {
+         const int n = d_side_ops_complex.getSize();
+         for (int i = 0; i < n && ops.isNull(); ++i) {
+            if (hierarchy !=
+                d_side_ops_complex[i]->getPatchHierarchy()) continue;
+            // A compatible operator has been found at i.
+            ops = d_side_ops_complex[i];
+         }
+         if (!ops) {
+            // No compatible operator has been found.
+            ops = new HierarchySideDataOpsComplex(hierarchy);
+            d_side_ops_complex.resizeArray(n + 1);
+            d_side_ops_complex[n] = ops;
+         }
+      }
+
+   } else if (!(edgevar.isNull())) {
+
+      if (get_unique) {
+         ops = new HierarchyEdgeDataOpsComplex(hierarchy);
+      } else {
+         const int n = d_edge_ops_complex.getSize();
+         for (int i = 0; i < n && ops.isNull(); ++i) {
+            if (hierarchy !=
+                d_edge_ops_complex[i]->getPatchHierarchy()) continue;
+            // A compatible operator has been found at i.
+            ops = d_edge_ops_complex[i];
+         }
+         if (!ops) {
+            // No compatible operator has been found.
+            ops = new HierarchyEdgeDataOpsComplex(hierarchy);
+            d_edge_ops_complex.resizeArray(n + 1);
+            d_edge_ops_complex[n] = ops;
+         }
+      }
+
+   }
+
+   if (!ops) {
+      TBOX_ERROR("HierarchyDataOpsManager internal error...\n"
+         << "Operations for variable " << variable->getName()
+         << " not defined.");
+   }
+
+   return ops;
+}
+
+/*!
+ * Return pointer to operation object for an integer variable
+ * on the given hierarchy.
+ *
+ * If a unique operator object is not requested, and if one already
+ * exists for the hierarchy and variable specified, the existing one
+ * will be created and returned.  Otherwise, a new one is created.
+ * Objects created created for unique requests will not be used later
+ * when an equivalent request is made.
+ */
+
+tbox::Pointer<HierarchyDataOpsInteger>
+HierarchyDataOpsManager::getOperationsInteger(
+   const tbox::Pointer<hier::Variable>& variable,
+   tbox::Pointer<hier::PatchHierarchy>& hierarchy,
+   bool get_unique)
+{
+   TBOX_ASSERT(!variable.isNull());
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*variable, *hierarchy);
+
+   const tbox::Pointer<pdat::CellVariable<int> > cellvar(variable);
+   const tbox::Pointer<pdat::FaceVariable<int> > facevar(variable);
+   const tbox::Pointer<pdat::NodeVariable<int> > nodevar(variable);
+   const tbox::Pointer<pdat::SideVariable<int> > sidevar(variable);
+   const tbox::Pointer<pdat::EdgeVariable<int> > edgevar(variable);
+
+   tbox::Pointer<HierarchyDataOpsInteger> ops;
+
+   if (!(cellvar.isNull())) {
+
+      if (get_unique) {
+         ops = new HierarchyCellDataOpsInteger(hierarchy);
+      } else {
+         const int n = d_cell_ops_int.getSize();
+         for (int i = 0; i < n && ops.isNull(); ++i) {
+            if (hierarchy != d_cell_ops_int[i]->getPatchHierarchy()) continue;
+            // A compatible operator has been found at i.
+            ops = d_cell_ops_int[i];
+         }
+         if (!ops) {
+            // No compatible operator has been found.
+            ops = new HierarchyCellDataOpsInteger(hierarchy);
+            d_cell_ops_int.resizeArray(n + 1);
+            d_cell_ops_int[n] = ops;
+         }
+      }
+
+   } else if (!(facevar.isNull())) {
+
+      if (get_unique) {
+         ops = new HierarchyFaceDataOpsInteger(hierarchy);
+      } else {
+         const int n = d_face_ops_int.getSize();
+         for (int i = 0; i < n && ops.isNull(); ++i) {
+            if (hierarchy != d_face_ops_int[i]->getPatchHierarchy()) continue;
+            // A compatible operator has been found at i.
+            ops = d_face_ops_int[i];
+         }
+         if (!ops) {
+            // No compatible operator has been found.
+            ops = new HierarchyFaceDataOpsInteger(hierarchy);
+            d_face_ops_int.resizeArray(n + 1);
+            d_face_ops_int[n] = ops;
+         }
+      }
+
+   } else if (!(nodevar.isNull())) {
+
+      if (get_unique) {
+         ops = new HierarchyNodeDataOpsInteger(hierarchy);
+      } else {
+         const int n = d_node_ops_int.getSize();
+         for (int i = 0; i < n && ops.isNull(); ++i) {
+            if (hierarchy != d_node_ops_int[i]->getPatchHierarchy()) continue;
+            // A compatible operator has been found at i.
+            ops = d_node_ops_int[i];
+         }
+         if (!ops) {
+            // No compatible operator has been found.
+            ops = new HierarchyNodeDataOpsInteger(hierarchy);
+            d_node_ops_int.resizeArray(n + 1);
+            d_node_ops_int[n] = ops;
+         }
+      }
+
+   } else if (!(sidevar.isNull())) {
+
+      if (get_unique) {
+         ops = new HierarchySideDataOpsInteger(hierarchy);
+      } else {
+         const int n = d_side_ops_int.getSize();
+         for (int i = 0; i < n && ops.isNull(); ++i) {
+            if (hierarchy != d_side_ops_int[i]->getPatchHierarchy()) continue;
+            // A compatible operator has been found at i.
+            ops = d_side_ops_int[i];
+         }
+         if (!ops) {
+            // No compatible operator has been found.
+            ops = new HierarchySideDataOpsInteger(hierarchy);
+            d_side_ops_int.resizeArray(n + 1);
+            d_side_ops_int[n] = ops;
+         }
+      }
+
+   } else if (!(edgevar.isNull())) {
+
+      if (get_unique) {
+         ops = new HierarchyEdgeDataOpsInteger(hierarchy);
+      } else {
+         const int n = d_edge_ops_int.getSize();
+         for (int i = 0; i < n && ops.isNull(); ++i) {
+            if (hierarchy != d_edge_ops_int[i]->getPatchHierarchy()) continue;
+            // A compatible operator has been found at i.
+            ops = d_edge_ops_int[i];
+         }
+         if (!ops) {
+            // No compatible operator has been found.
+            ops = new HierarchyEdgeDataOpsInteger(hierarchy);
+            d_edge_ops_int.resizeArray(n + 1);
+            d_edge_ops_int[n] = ops;
+         }
+      }
+
+   }
+
+   if (!ops) {
+      TBOX_ERROR("HierarchyDataOpsManager internal error...\n"
+         << "Operations for variable " << variable->getName()
+         << " not defined.");
+   }
+
+   return ops;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyDataOpsManager.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyDataOpsManager.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,236 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Singleton manager for hierarchy data operation objects. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyDataOpsManager
+#define included_math_HierarchyDataOpsManager
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/math/HierarchyDataOpsComplex.h"
+#include "SAMRAI/math/HierarchyDataOpsInteger.h"
+#include "SAMRAI/math/HierarchyDataOpsReal.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class HierarchyDataOpsManager is a Singleton class that serves as
+ * a single point of control for gaining access to operation objects which
+ * to treat patch data over multiple levels in an AMR hierarchy. Specifically,
+ * this manager returns a pointer to a hierarchy data operation object given
+ * a variable and a hierarchy.  Currently, this manager class supports patch
+ * data operation objects for cell-, face-, and node-centered data of type
+ * double, float, integer and dcomplex.  Although it may be used to manage
+ * data operations for multiple patch hierarchies, it supports only one data
+ * operations per variable centering and data type per hierarchy.  The manager
+ * will create and return a default hierarchy operation object when queried
+ * for an operation object if the operation does not already exist.  If a
+ * matching operation object exists and is known to the manager, that operation
+ * object will be returned.  This manager class may be extended using class
+ * inheritance and implementing a manager subclass.  So, for example, if
+ * more than one operation object per variable type is needed on a hierarchy,
+ * such inheritance should be used to add this capability to the manager.
+ *
+ * Important note: This manager class is incomplete. Specifically, one cannot
+ *                 set an operation object to over-ride the default .  This
+ *                 feature will be added in the near future.
+ *
+ * Important note: If the manager must construct a new hierarchy data
+ *                 operation object, the range of levels used in the
+ *                 operation object must be set explicitly before the
+ *                 operations can be used.
+ *
+ * See the Design Patterns book by Gamma {\em et al.} for more information
+ * about the singleton pattern.
+ *
+ * @see math::HierarchyDataOpsComplex
+ * @see math::HierarchyDataOpsInteger
+ * @see math::HierarchyDataOpsReal
+ */
+
+class HierarchyDataOpsManager
+{
+public:
+   /**
+    * Return a pointer to the single instance of the patch data operation
+    * manager.  All access to the HierarchyDataOpsManager object is
+    * through the getManager() function.  For example, to obtain a pointer
+    * to a hierarchy data operation object appropriate for a variable of type
+    * double one makes the following call:
+    * HierarchyDataOpsManager::getManager()->getOperationsDouble(
+    *                                               var, hierarchy),
+    * where ``var'' is a pointer to the variable, and hierarchy is a
+    * pointer to the AMR hierarchy.
+    *
+    * Note that when the manager is accessed for the first time, the
+    * Singleton instance is registered with the StartupShutdownManager
+    * class which destroys such objects at program completion.  Thus,
+    * users of this class do not explicitly allocate or deallocate the
+    * Singleton instance.
+    */
+   static HierarchyDataOpsManager *
+   getManager();
+
+   //@{
+   /*!
+    * \name Getting operators.
+    *
+    * If a unique operator object is not requested, and if one already
+    * exists for the hierarchy and variable specified, the existing one
+    * will be created and returned.  Otherwise, a new one is created.
+    * Objects created created for unique requests will not be used later
+    * when an equivalent request is made.
+    */
+   /*!
+    * \brief Return pointer to operation object for a double variable
+    * on the given hierarchy.
+    */
+   virtual tbox::Pointer<HierarchyDataOpsReal<double> >
+   getOperationsDouble(
+      /*! operation should correspond to this variable */
+      const tbox::Pointer<hier::Variable>& variable
+      , /*! operation should correspond to this hierarchy */
+      tbox::Pointer<hier::PatchHierarchy>& hierarchy
+      , /*! Whether a unique operator is requested */
+      bool get_unique = false);
+
+   /*!
+    * \brief Return pointer to operation object for a float variable
+    * on the given hierarchy.
+    */
+   virtual tbox::Pointer<HierarchyDataOpsReal<float> >
+   getOperationsFloat(
+      /*! operation should correspond to this variable */
+      const tbox::Pointer<hier::Variable>& variable
+      , /*! operation should correspond to this hierarchy */
+      tbox::Pointer<hier::PatchHierarchy>& hierarchy
+      , /*! Whether a unique operator is requested */
+      bool get_unique = false);
+
+   /*!
+    * \brief Return pointer to operation object for a complex variable
+    * on the given hierarchy.
+    */
+   virtual tbox::Pointer<HierarchyDataOpsComplex>
+   getOperationsComplex(
+      /*! operation should correspond to this variable */
+      const tbox::Pointer<hier::Variable>& variable
+      , /*! operation should correspond to this hierarchy */
+      tbox::Pointer<hier::PatchHierarchy>& hierarchy
+      , /*! Whether a unique operator is requested */
+      bool get_unique = false);
+
+   /*!
+    * \brief Return pointer to operation object for a integer variable
+    * on the given hierarchy.
+    */
+   virtual tbox::Pointer<HierarchyDataOpsInteger>
+   getOperationsInteger(
+      /*! operation should correspond to this variable */
+      const tbox::Pointer<hier::Variable>& variable
+      , /*! operation should correspond to this hierarchy */
+      tbox::Pointer<hier::PatchHierarchy>& hierarchy
+      , /*! Whether a unique operator is requested */
+      bool get_unique = false);
+   //@}
+
+protected:
+   /**
+    * The constructor for HierarchyDataOpsManager is protected.
+    * Consistent with the definition of a Singleton class, only subclasses
+    * have access to the constructor for the class.
+    */
+   HierarchyDataOpsManager();
+
+   /**
+    * The destructor for HierarchyDataOpsManager is protected.
+    * See the comments for the constructor.
+    */
+   virtual ~HierarchyDataOpsManager();
+
+   /**
+    * Initialize Singleton instance with instance of subclass.  This function
+    * is used to make the singleton object unique when inheriting from this
+    * base class.
+    */
+   void
+   registerSingletonSubclassInstance(
+      HierarchyDataOpsManager* subclass_instance);
+
+private:
+
+   /**
+    * Deallocate the HierarchyDataOpsManager instance.  It is not
+    * necessary to explicitly call freeManager() at program termination,
+    * since it is automatically called by the StartupShutdownManager class.
+    */
+   static void
+   shutdownCallback();
+
+
+   static HierarchyDataOpsManager* s_pdat_op_manager_instance;
+
+   //@{ \name Operations for data of various types.
+   tbox::Array<tbox::Pointer<HierarchyDataOpsReal<double> > >
+   d_cell_ops_double;
+   tbox::Array<tbox::Pointer<HierarchyDataOpsReal<double> > >
+   d_face_ops_double;
+   tbox::Array<tbox::Pointer<HierarchyDataOpsReal<double> > >
+   d_node_ops_double;
+   tbox::Array<tbox::Pointer<HierarchyDataOpsReal<double> > >
+   d_side_ops_double;
+   tbox::Array<tbox::Pointer<HierarchyDataOpsReal<double> > >
+   d_edge_ops_double;
+
+   tbox::Array<tbox::Pointer<HierarchyDataOpsReal<float> > >
+   d_cell_ops_float;
+   tbox::Array<tbox::Pointer<HierarchyDataOpsReal<float> > >
+   d_face_ops_float;
+   tbox::Array<tbox::Pointer<HierarchyDataOpsReal<float> > >
+   d_side_ops_float;
+   tbox::Array<tbox::Pointer<HierarchyDataOpsReal<float> > >
+   d_node_ops_float;
+   tbox::Array<tbox::Pointer<HierarchyDataOpsReal<float> > >
+   d_edge_ops_float;
+
+   tbox::Array<tbox::Pointer<HierarchyDataOpsComplex> >
+   d_cell_ops_complex;
+   tbox::Array<tbox::Pointer<HierarchyDataOpsComplex> >
+   d_face_ops_complex;
+   tbox::Array<tbox::Pointer<HierarchyDataOpsComplex> >
+   d_side_ops_complex;
+   tbox::Array<tbox::Pointer<HierarchyDataOpsComplex> >
+   d_node_ops_complex;
+   tbox::Array<tbox::Pointer<HierarchyDataOpsComplex> >
+   d_edge_ops_complex;
+
+   tbox::Array<tbox::Pointer<HierarchyDataOpsInteger> >
+   d_cell_ops_int;
+   tbox::Array<tbox::Pointer<HierarchyDataOpsInteger> >
+   d_face_ops_int;
+   tbox::Array<tbox::Pointer<HierarchyDataOpsInteger> >
+   d_side_ops_int;
+   tbox::Array<tbox::Pointer<HierarchyDataOpsInteger> >
+   d_node_ops_int;
+   tbox::Array<tbox::Pointer<HierarchyDataOpsInteger> >
+   d_edge_ops_int;
+   //@}
+
+   static tbox::StartupShutdownManager::Handler
+   s_shutdown_handler;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyDataOpsReal.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyDataOpsReal.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,55 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to templated operations for real data on hierarchy. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyDataOpsReal_C
+#define included_math_HierarchyDataOpsReal_C
+
+#include "SAMRAI/math/HierarchyDataOpsReal.h"
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+HierarchyDataOpsReal<TYPE>::HierarchyDataOpsReal()
+{
+}
+
+template<class TYPE>
+HierarchyDataOpsReal<TYPE>::~HierarchyDataOpsReal()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The following are private and cannot be used, but they are defined    *
+ * here for compilers that require that every template declaration have  *
+ * a definition (a stupid requirement, if you ask me).                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+HierarchyDataOpsReal<TYPE>::HierarchyDataOpsReal(
+   const HierarchyDataOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void HierarchyDataOpsReal<TYPE>::operator = (
+   const HierarchyDataOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyDataOpsReal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyDataOpsReal.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,485 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to templated operations for real data on hierarchy. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyDataOpsReal
+#define included_math_HierarchyDataOpsReal
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <iostream>
+
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class HierarchyDataOpsReal defines the interface to a collection
+ * of operations that may be used to manipulate real numerical (float
+ * or double) patch data components over multiple levels in an AMR hierarchy.
+ * It serves as a base class for subclasses which implement the operations
+ * for cell-centered, face-centered, or node-centered data types.
+ * The patch hierarchy and set of levels within that hierarcy over which the
+ * operations will be performed are set in the constructor of the subclass.
+ * However, these data members may be changed at any time via the virtual
+ * access functions setPatchHierarchy() and resetLevels() below.  The
+ * operations include basic arithmetic, norms and ordering, and assorted
+ * miscellaneous operations.
+ *
+ * Note that, when it makes sense, an operation accept a boolean argument
+ * which indicates whether the operation should be performed on all of the
+ * data or just those data elements corresponding to the patch interiors.
+ * If no boolean argument is provided, the default behavior is to treat only
+ * the patch interiors.  Also, interfaces for similar sets of operations
+ * for complex and integer hierarchy data are defined in the classes
+ * HierarchyDataOpsComplex and HierarchyDataOpsInteger,
+ * respectively.
+ */
+
+template<class TYPE>
+class HierarchyDataOpsReal:public tbox::DescribedClass
+{
+public:
+   /**
+    * The constructor for the HierarchyDataOpsReal class.
+    */
+   HierarchyDataOpsReal();
+
+   /**
+    * Virtual destructor for the HierarchyDataOpsReal class.
+    */
+   virtual ~HierarchyDataOpsReal<TYPE>();
+
+   /**
+    * Reset patch hierarchy over which operations occur.
+    */
+   virtual
+   void
+   setPatchHierarchy(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy) = 0;
+
+   /**
+    * Reset range of patch levels over which operations occur.
+    * Typically, levels must exist in hierarchy or an assertion will result.
+    */
+   virtual void
+   resetLevels(
+      const int coarsest_level,
+      const int finest_level) = 0;
+
+   /**
+    * Return const pointer to patch hierarchy associated with operations.
+    */
+   virtual
+   const tbox::Pointer<hier::PatchHierarchy>
+   getPatchHierarchy() const = 0;
+
+   /**
+    * Copy source data to destination data.
+    */
+   virtual void
+   copyData(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Swap data pointers (i.e., storage) between two data components.
+    */
+   virtual void
+   swapData(
+      const int data1_id,
+      const int data2_id) const = 0;
+
+   /**
+    * Print data over multiple levels to specified output stream.
+    */
+   virtual void
+   printData(
+      const int data_id,
+      std::ostream& s,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set data component to given scalar.
+    */
+   virtual void
+   setToScalar(
+      const int data_id,
+      const TYPE& alpha,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set destination to source multiplied by given scalar, pointwise.
+    */
+   virtual void
+   scale(
+      const int dst_id,
+      const TYPE& alpha,
+      const int src_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Add scalar to each entry in source data and set destination to result.
+    */
+   virtual void
+   addScalar(
+      const int dst_id,
+      const int src_id,
+      const TYPE& alpha,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set destination to sum of two source components, pointwise.
+    */
+   virtual void
+   add(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Subtract second source component from first source component pointwise
+    * and set destination data component to result.
+    */
+   virtual void
+   subtract(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set destination component to product of two source components, pointwise.
+    */
+   virtual void
+   multiply(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Divide first data component by second source component pointwise
+    * and set destination data component to result.
+    */
+   virtual void
+   divide(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set each entry of destination component to reciprocal of corresponding
+    * source data component entry.
+    */
+   virtual void
+   reciprocal(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set \f$d = \alpha s_1 + \beta s_2\f$, where \f$d\f$ is the destination patch
+    * data component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha, \beta\f$ are scalar values.
+    */
+   virtual void
+   linearSum(
+      const int dst_id,
+      const TYPE& alpha,
+      const int src1_id,
+      const TYPE& beta,
+      const int src2_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set \f$d = \alpha s_1 + s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   virtual void
+   axpy(
+      const int dst_id,
+      const TYPE& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set \f$d = \alpha s_1 - s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   virtual void
+   axmy(
+      const int dst_id,
+      const TYPE& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set destination data to absolute value of source data, pointwise.
+    */
+   virtual void
+   abs(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Return minimum data value over all patches in the collection of levels.
+    */
+   virtual TYPE
+   min(
+      const int data_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Return maximum data value over all patches in the collection of levels.
+    */
+   virtual TYPE
+   max(
+      const int data_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Set data entries to random values.  See the operations in the
+    * array data operation classes for each data type for details on the
+    * generation of the random values.
+    */
+   virtual void
+   setRandomValues(
+      const int data_id,
+      const TYPE& width,
+      const TYPE& low,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Return the total number of data values for the component on the set
+    * of hierarchy levels.  If the boolean argument is true, the number of
+    * elements will be summed over patch interiors.  If the boolean argument
+    * is false, all elements will be counted (including ghost values)
+    * over all patches.
+    */
+   virtual int
+   numberOfEntries(
+      const int data_id,
+      const bool interior_only = true) const = 0;
+
+   /**
+    * Return sum of the control volumes associated with the data component.
+    * Note that if the ontrol volumes are set propery, this is equivalent to
+    * integrating a data component containing all ones over the collection of
+    * hierarchy levels.
+    */
+   virtual double
+   sumControlVolumes(
+      const int data_id,
+      const int vol_id) const = 0;
+
+   /**
+    * Return discrete \f$L_1\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( \| data_i \| cvol_i )\f$.  If the
+    * control volume is not defined (vol_id < 0), the return value is
+    * \f$\sum_i ( \| data_i \| )\f$.
+    * If local_only is true, the global reduction is not
+    * performed (thus each process will get only local results).
+    */
+   virtual double
+   L1Norm(
+      const int data_id,
+      const int vol_id = -1,
+      bool local_only = false) const = 0;
+
+   /**
+    * Return discrete \f$L_2\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sqrt{ \sum_i ( (data_i)^2 cvol_i ) }\f$.
+    * If the control volume is  not defined (vol_id < 0), the return value
+    * is \f$\sqrt{ \sum_i ( (data_i)^2 cvol_i ) }\f$.
+    * If local_only is true, the global reduction is not
+    * performed (thus each process will get only local results).
+    */
+   virtual double
+   L2Norm(
+      const int data_id,
+      const int vol_id = -1,
+      bool local_only = false) const = 0;
+
+   /**
+    * Return discrete weighted \f$L_2\f$-norm of the data using the control
+    * volume to weight the contribution of the data and weight entries to
+    * the sum.  That is, the return value is the sum \f$\sqrt{ \sum_i (
+    * (data_i * weight_i)^2 cvol_i ) }\f$.  If the control volume is not defined
+    * (vol_id < 0), the return value is
+    * \f$\sqrt{ \sum_i ( (data_i * weight_i)^2 ) }\f$.
+    */
+   virtual double
+   weightedL2Norm(
+      const int data_id,
+      const int weight_id,
+      const int vol_id = -1) const = 0;
+
+   /**
+    * Return discrete root mean squared norm of the data.  If the control
+    * volume is defined, the return value is the \f$L_2\f$-norm divided by
+    * the square root of the sum of the control volumes.  Otherwise, the
+    * return value is the \f$L_2\f$-norm divided by the square root of the
+    * number of data entries.
+    */
+   virtual double
+   RMSNorm(
+      const int data_id,
+      const int vol_id = -1) const = 0;
+
+   /**
+    * Return discrete weighted root mean squared norm of the data.  If the
+    * control volume is define, the return value is the weighted \f$L_2\f$-norm
+    * divided by the square root of the sum of the control volumes.  Otherwise,
+    * the return value is the weighted \f$L_2\f$-norm divided by the square root
+    * of the number of data entries.
+    */
+   virtual double
+   weightedRMSNorm(
+      const int data_id,
+      const int weight_id,
+      const int vol_id = -1) const = 0;
+
+   /**
+    * Return the \f$\max\f$-norm of the data using the control volume to weight
+    * the contribution of each data entry to the maximum.  That is, the return
+    * value is \f$\max_i ( \| data_i \| )\f$, where the max is over the data
+    * elements where \f$cvol_i > 0\f$.  If the control volume is undefined
+    * (vol_id < 0), it is ignored during the computation of the maximum.
+    * If local_only is true, the global reduction is not
+    * performed (thus each process will get only local results).
+    */
+   virtual double
+   maxNorm(
+      const int data_id,
+      const int vol_id = -1,
+      bool local_only = false) const = 0;
+
+   /**
+    * Return the dot product of the two data arrays using the control volume
+    * to weight the contribution of each product to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( data1_i * data2_i * cvol_i )\f$.
+    * If the control volume is undefined (vol_id < 0), it is ignored during
+    * the summation.  If local_only is true, the global reduction is not
+    * performed (thus each process will get only local results).
+    */
+   virtual TYPE
+   dot(
+      const int data1_id,
+      const int data2_id,
+      const int vol_id = -1,
+      bool local_only = false) const = 0;
+
+   /**
+    * Return 1 if \f$\|data2_i\| > 0\f$ and \f$data1_i * data2_i \leq 0\f$, for
+    * any \f$i\f$ in the set of patch data indices, where \f$cvol_i > 0\f$.  Otherwise,
+    * return 0.  If the control volume is undefined (vol_id < 0), all values
+    * on the patch interiors are considered.
+    */
+   virtual int
+   computeConstrProdPos(
+      const int data1_id,
+      const int data2_id,
+      const int vol_id = -1) const = 0;
+
+   /**
+    * Wherever \f$cvol_i > 0\f$ in the set of patch data indices, set \f$dst_i = 1\f$
+    * if \f$\|src_i\| > \alpha\f$, and \f$dst_i = 0\f$ otherwise.  If the control
+    * volume is undefined (vol_id < 0), all values on the patch interiors
+    * are considered.
+    */
+   virtual void
+   compareToScalar(
+      const int dst_id,
+      const int src_id,
+      const TYPE& alpha,
+      const int vol_id = -1) const = 0;
+
+   /**
+    * Wherever \f$cvol_i > 0\f$ in the set of patch data indices, set
+    * \f$dst_i = 1/src_i\f$ if \f$src_i \neq 0\f$, and \f$dst_i = 0\f$ otherwise.
+    * If \f$dst_i = 0\f$ anywhere, 0 is the return value.  Otherwise 1 is returned.
+    * If the control volume is undefined (vol_id < 0), all values on the
+    * patch interiors are considered.
+    */
+   virtual int
+   testReciprocal(
+      const int dst_id,
+      const int src_id,
+      const int vol_id = -1) const = 0;
+
+   /*!
+    * @brief Compute max of "conditional" quotients of two arrays.
+    *
+    * Return the maximum of pointwise "conditional" quotients of the numerator
+    * and denominator.
+    *
+    * The "conditional" quotient is defined as |numerator/denominator|
+    * where the denominator is nonzero.  Otherwise, it is defined as
+    * |numerator|.
+    *
+    * @b Note: This method is currently intended to support the
+    * PETSc-2.1.6 vector wrapper only.  Please do not use it!
+    */
+   virtual TYPE
+   maxPointwiseDivide(
+      const int numer_id,
+      const int denom_id,
+      bool local_only = false) const = 0;
+
+   /*!
+    * @brief Compute min of quotients of two arrays.
+    *
+    * Return the minimum of pointwise quotients of the numerator
+    * and denominator.
+    *
+    * The quotient is defined as (numerator/denominator)
+    * where the denominator is nonzero.  When the denominator is zero, the
+    * entry is skipped.  If the denominator is always zero, the value of
+    * tbox::IEEE::getFLT_MAX() is returned (see @ref SAMRAI::tbox::IEEE).
+    *
+    * @b Note: This method is currently intended to support the
+    * SUNDIALS vector wrapper only.  Please do not use it!
+    */
+   virtual TYPE
+   minPointwiseDivide(
+      const int numer_id,
+      const int denom_id,
+      bool local_only = false) const = 0;
+
+private:
+   // The following are not implemented
+   HierarchyDataOpsReal(
+      const HierarchyDataOpsReal<TYPE>&);
+   void
+   operator = (
+      const HierarchyDataOpsReal<TYPE>&);
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/HierarchyDataOpsReal.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyEdgeDataOpsComplex.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyEdgeDataOpsComplex.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,996 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for complex edge data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyEdgeDataOpsComplex_C
+#define included_math_HierarchyEdgeDataOpsComplex_C
+
+#include "SAMRAI/math/HierarchyEdgeDataOpsComplex.h"
+#include "SAMRAI/hier/BoxUtilities.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/pdat/EdgeDataFactory.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include <typeinfo>
+#include <stdlib.h>
+#include <float.h>
+#include <math.h>
+
+namespace SAMRAI {
+namespace math {
+
+HierarchyEdgeDataOpsComplex::HierarchyEdgeDataOpsComplex(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level):
+   HierarchyDataOpsComplex()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+#endif
+   d_hierarchy = hierarchy;
+   if ((coarsest_level < 0) || (finest_level < 0)) {
+      if (d_hierarchy->getNumberOfLevels() == 0) {
+         d_coarsest_level = coarsest_level;
+         d_finest_level = finest_level;
+      } else {
+         resetLevels(0, d_hierarchy->getFinestLevelNumber());
+      }
+   } else {
+      resetLevels(coarsest_level, finest_level);
+   }
+}
+
+HierarchyEdgeDataOpsComplex::~HierarchyEdgeDataOpsComplex()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to set the hierarchy and level information.                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HierarchyEdgeDataOpsComplex::setPatchHierarchy(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+
+   d_hierarchy = hierarchy;
+}
+
+void HierarchyEdgeDataOpsComplex::resetLevels(
+   const int coarsest_level,
+   const int finest_level)
+{
+   int i;
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (finest_level >= coarsest_level)
+      && (finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   const tbox::Dimension& dim(d_hierarchy->getDim());
+
+   d_coarsest_level = coarsest_level;
+   d_finest_level = finest_level;
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      d_nonoverlapping_edge_boxes[d].resizeArray(d_finest_level + 1);
+   }
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      hier::BoxArray edge_boxes(dim);
+
+      for (int nd = 0; nd < dim.getValue(); nd++) {
+         edge_boxes = level->getBoxes();
+         const int n = edge_boxes.getNumberOfBoxes();
+         for (i = 0; i < n; i++) {
+            edge_boxes[i] =
+               pdat::EdgeGeometry::toEdgeBox(edge_boxes[i], nd);
+         }
+         hier::BoxUtilities::makeNonOverlappingBoxLists(
+            d_nonoverlapping_edge_boxes[nd][ln],
+            edge_boxes);
+      }
+   }
+}
+
+const tbox::Pointer<hier::PatchHierarchy>
+HierarchyEdgeDataOpsComplex::getPatchHierarchy() const
+{
+   return d_hierarchy;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic operations.                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HierarchyEdgeDataOpsComplex::copyData(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<dcomplex> > s = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.copyData(d, s, box);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsComplex::swapData(
+   const int data1_id,
+   const int data2_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   tbox::Pointer<pdat::EdgeDataFactory<dcomplex> >
+   d1fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data1_id);
+   TBOX_ASSERT(!d1fact.isNull());
+   tbox::Pointer<pdat::EdgeDataFactory<dcomplex> >
+   d2fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data2_id);
+   TBOX_ASSERT(!d2fact.isNull());
+   TBOX_ASSERT(d1fact->getDepth() == d2fact->getDepth());
+   TBOX_ASSERT(d1fact->getGhostCellWidth() == d2fact->getGhostCellWidth());
+#endif
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         d_patch_ops.swapData(p, data1_id, data2_id);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsComplex::printData(
+   const int data_id,
+   std::ostream& s,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   s << "Patch descriptor id = " << data_id << std::endl;
+   s << "Factory = " << typeid(*d_hierarchy->getPatchDescriptor()->
+                               getPatchDataFactory(data_id)).name()
+     << std::endl;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      s << "Level number = " << ln << std::endl;
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<dcomplex> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.printData(d, box, s);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsComplex::setToScalar(
+   const int data_id,
+   const dcomplex& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<dcomplex> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.setToScalar(d, alpha, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic arithmetic operations.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HierarchyEdgeDataOpsComplex::scale(
+   const int dst_id,
+   const dcomplex& alpha,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<dcomplex> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<dcomplex> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.scale(dst, alpha, src, box);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsComplex::addScalar(
+   const int dst_id,
+   const int src_id,
+   const dcomplex& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<dcomplex> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<dcomplex> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.addScalar(dst, src, alpha, box);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsComplex::add(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::EdgeData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.add(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsComplex::subtract(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::EdgeData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.subtract(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsComplex::multiply(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::EdgeData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.multiply(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsComplex::divide(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::EdgeData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.divide(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsComplex::reciprocal(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<dcomplex> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.reciprocal(d, src, box);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsComplex::linearSum(
+   const int dst_id,
+   const dcomplex& alpha,
+   const int src1_id,
+   const dcomplex& beta,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::EdgeData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.linearSum(d, alpha, s1, beta, s2, box);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsComplex::axpy(
+   const int dst_id,
+   const dcomplex& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::EdgeData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.axpy(d, alpha, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsComplex::axmy(
+   const int dst_id,
+   const dcomplex& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::EdgeData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.axmy(d, alpha, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsComplex::abs(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<double> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<dcomplex> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.abs(d, src, box);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsComplex::setRandomValues(
+   const int data_id,
+   const dcomplex& width,
+   const dcomplex& low,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<dcomplex> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.setRandomValues(d, width, low, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Generic norm and order operations.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int HierarchyEdgeDataOpsComplex::numberOfEntries(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::Dimension& dim(d_hierarchy->getDim());
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int entries = 0;
+
+   if (interior_only) {
+
+      tbox::Pointer<pdat::EdgeDataFactory<dcomplex> >
+      dfact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!dfact.isNull());
+#endif
+
+      for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+         const int npatches = level->getNumberOfPatches();
+#ifdef DEBUG_CHECK_ASSERTIONS
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            TBOX_ASSERT(npatches == d_nonoverlapping_edge_boxes[nd][ln].getSize());
+         }
+#endif
+         for (int il = 0; il < npatches; il++) {
+            tbox::List<hier::Box>::Iterator lb;
+
+            for (int eb = 0; eb < dim.getValue(); eb++) {
+               lb = ((d_nonoverlapping_edge_boxes[eb][ln])[il]).listStart();
+               for ( ; lb; lb++) {
+                  entries += lb().size();
+               }
+            }
+         }
+      }
+
+      entries *= dfact->getDepth();
+
+   } else {
+
+      for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::Pointer<pdat::EdgeData<dcomplex> > d =
+               (*ip)->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            entries += d_patch_ops.numberOfEntries(d, d->getGhostBox());
+         }
+      }
+
+      int global_entries = entries;
+      if (mpi.getSize() > 1) {
+         mpi.Allreduce(&entries, &global_entries, 1, MPI_INT, MPI_SUM);
+      }
+      entries = global_entries;
+
+   }
+
+   return entries;
+}
+
+double HierarchyEdgeDataOpsComplex::sumControlVolumes(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(vol_id >= 0);
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double sum = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<dcomplex> > d = p->getPatchData(data_id);
+         tbox::Pointer<pdat::EdgeData<double> > cv = p->getPatchData(vol_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!cv.isNull());
+#endif
+         hier::Box box = cv->getGhostBox();
+
+         sum += d_patch_ops.sumControlVolumes(d, cv, box);
+      }
+   }
+
+   double global_sum = sum;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&sum, &global_sum, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   return global_sum;
+}
+
+double HierarchyEdgeDataOpsComplex::L1Norm(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<dcomplex> > d = p->getPatchData(data_id);
+         tbox::Pointer<pdat::EdgeData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            box = d->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         norm += d_patch_ops.L1Norm(d, box, cv);
+      }
+   }
+
+   double global_norm = norm;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&norm, &global_norm, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   return global_norm;
+}
+
+double HierarchyEdgeDataOpsComplex::L2Norm(
+   const int data_id,
+   const int vol_id) const
+{
+   dcomplex dotprod = HierarchyEdgeDataOpsComplex::dot(data_id,
+         data_id,
+         vol_id);
+
+   return sqrt(real(dotprod));
+}
+
+double HierarchyEdgeDataOpsComplex::weightedL2Norm(
+   const int data_id,
+   const int wgt_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm_squared = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<dcomplex> > d = p->getPatchData(data_id);
+         tbox::Pointer<pdat::EdgeData<dcomplex> > w = p->getPatchData(wgt_id);
+         tbox::Pointer<pdat::EdgeData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            box = d->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         double pnorm = d_patch_ops.weightedL2Norm(d, w, box, cv);
+
+         norm_squared += pnorm * pnorm;
+      }
+   }
+
+   double global_norm_squared = norm_squared;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&norm_squared, &global_norm_squared, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   return sqrt(global_norm_squared);
+}
+
+double HierarchyEdgeDataOpsComplex::RMSNorm(
+   const int data_id,
+   const int vol_id) const
+{
+   double l2_norm = L2Norm(data_id, vol_id);
+
+   double volume = ((vol_id < 0) ? (double)numberOfEntries(data_id, true)
+                    : sumControlVolumes(data_id, vol_id));
+
+   double rms_norm = l2_norm / sqrt(volume);
+   return rms_norm;
+}
+
+double HierarchyEdgeDataOpsComplex::weightedRMSNorm(
+   const int data_id,
+   const int wgt_id,
+   const int vol_id) const
+{
+
+   double l2_norm = weightedL2Norm(data_id, wgt_id, vol_id);
+
+   double volume = ((vol_id < 0) ? (double)numberOfEntries(data_id, true)
+                    : sumControlVolumes(data_id, vol_id));
+
+   double rms_norm = l2_norm / sqrt(volume);
+   return rms_norm;
+}
+
+double HierarchyEdgeDataOpsComplex::maxNorm(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<dcomplex> > d = p->getPatchData(data_id);
+         tbox::Pointer<pdat::EdgeData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            box = d->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         norm = tbox::MathUtilities<double>::Max(norm,
+               d_patch_ops.maxNorm(d, box, cv));
+      }
+   }
+
+   double global_norm = norm;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&norm, &global_norm, 1, MPI_DOUBLE, MPI_MAX);
+   }
+   return global_norm;
+}
+
+dcomplex HierarchyEdgeDataOpsComplex::dot(
+   const int data1_id,
+   const int data2_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   dcomplex dprod = dcomplex(0.0, 0.0);
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<dcomplex> > d1 =
+            p->getPatchData(data1_id);
+         tbox::Pointer<pdat::EdgeData<dcomplex> > d2 =
+            p->getPatchData(data2_id);
+         tbox::Pointer<pdat::EdgeData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d1.isNull());
+#endif
+            box = d1->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         dprod += d_patch_ops.dot(d1, d2, box, cv);
+      }
+   }
+
+   dcomplex global_dot = dprod;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&dprod, &global_dot, 1, MPI_DOUBLE_COMPLEX, MPI_SUM);
+   }
+   return global_dot;
+}
+
+dcomplex HierarchyEdgeDataOpsComplex::integral(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   dcomplex local_integral = dcomplex(0.0, 0.0);
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<dcomplex> > data =
+            p->getPatchData(data_id);
+         tbox::Pointer<pdat::EdgeData<double> > vol = p->getPatchData(vol_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!data.isNull());
+         TBOX_ASSERT(!vol.isNull());
+#endif
+
+         hier::Box box = data->getGhostBox();
+
+         local_integral += d_patch_ops.integral(data, box, vol);
+      }
+   }
+
+   dcomplex global_integral = local_integral;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&local_integral, &global_integral, 1, MPI_DOUBLE_COMPLEX, MPI_SUM);
+   }
+   return global_integral;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyEdgeDataOpsComplex.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyEdgeDataOpsComplex.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,420 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for complex edge data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyEdgeDataOpsComplex
+#define included_math_HierarchyEdgeDataOpsComplex
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/math/HierarchyDataOpsComplex.h"
+#include "SAMRAI/math/PatchEdgeDataOpsComplex.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class HierarchyEdgeDataOpsComplex provides a collection of
+ * operations that manipulate complex edge-centered patch data components over
+ * multiple levels in an AMR hierarchy.  It is derived from the abstract
+ * base class HierarchyDataOpsComplex which defines the interface to
+ * similar operations for edge-centered, edge-centered, edge-centered patch
+ * data objects where the data is complex.   The operations include basic
+ * arithmetic and norms.  On each patch, the operations are performed by the
+ * PatchEdgeDataOpsComplex data member.
+ *
+ * The patch hierarchy and set of levels within that hierarcy over which the
+ * operations will be performed are set in the constructor.  However, note
+ * that the constructor accepts default arguments for the coarsest and finest
+ * level numbers.  If the level numbers are not specified when calling the
+ * constructor the levels which exist in the hierarchy will be assumed in
+ * all operations.  The hierarchy and levels may be changed at any time using
+ * the proper member functions.
+ *
+ * Note that, when it makes sense, an operation accept a boolean argument
+ * which indicates whether the operation should be performed on all of the
+ * data or just those data elements corresponding to the patch interiors.
+ * If no boolean argument is provided, the default behavior is to treat only
+ * the patch interiors.  Also, a similar set of operations for real (double
+ * and float) and integer edge-centered data is provided in the classes
+ * HierarchyEdgeDataOpsReal and HierarchyEdgeDataOpsInteger,
+ * respectively.
+ *
+ * @see math::PatchEdgeDataOpsComplex
+ */
+
+class HierarchyEdgeDataOpsComplex:public HierarchyDataOpsComplex
+{
+public:
+   /**
+    * The constructor for the HierarchyEdgeDataOpsComplex class sets
+    * the default patch hierarchy and coarsest and finest patch levels
+    * in that hierarchy over which operations will be performed.  The
+    * hierarchy and operations may be reset using the member fuctions
+    * setPatchHierarchy() and resetLevels() below.  If no level number
+    * arguments are given here, the levels over which the operations will
+    * be performed are those already existing in the hierarchy.  If the
+    * hierarchy level configuration changes, the operations must be explicitly
+    * reset by calling the resetLevels() function.
+    */
+   explicit HierarchyEdgeDataOpsComplex(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int coarsest_level = -1,
+      const int finest_level = -1);
+
+   /**
+    * Virtual destructor for the HierarchyEdgeDataOpsComplex class.
+    */
+   virtual ~HierarchyEdgeDataOpsComplex();
+
+   /**
+    * Reset patch hierarchy over which operations occur.
+    */
+   void
+   setPatchHierarchy(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+   /**
+    * Reset range of patch levels over which operations occur.
+    * Levels must exist in hierarchy or an assertion will result.
+    */
+   void
+   resetLevels(
+      const int coarsest_level,
+      const int finest_level);
+
+   /**
+    * Return const pointer to patch hierarchy associated with operations.
+    */
+   const tbox::Pointer<hier::PatchHierarchy>
+   getPatchHierarchy() const;
+
+   /**
+    * Copy source data to destination data.
+    */
+   void
+   copyData(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Swap data pointers (i.e., storage) between two data components.
+    */
+   void
+   swapData(
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data over multiple levels to specified output stream.
+    */
+   void
+   printData(
+      const int data_id,
+      std::ostream& s,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data component to given scalar.
+    */
+   void
+   setToScalar(
+      const int data_id,
+      const dcomplex& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to source multiplied by given scalar, pointwise.
+    */
+   void
+   scale(
+      const int dst_id,
+      const dcomplex& alpha,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Add scalar to each entry in source data and set destination to result.
+    */
+   void
+   addScalar(
+      const int dst_id,
+      const int src_id,
+      const dcomplex& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to sum of two source components, pointwise.
+    */
+   void
+   add(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Subtract second source component from first source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   subtract(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination component to product of two source components, pointwise.
+    */
+   void
+   multiply(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Divide first data component by second source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   divide(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set each entry of destination component to reciprocal of corresponding
+    * source data component entry.
+    */
+   void
+   reciprocal(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + \beta s_2\f$, where \f$d\f$ is the destination patch
+    * data component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha, \beta\f$ are scalar values.
+    */
+   void
+   linearSum(
+      const int dst_id,
+      const dcomplex& alpha,
+      const int src1_id,
+      const dcomplex& beta,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axpy(
+      const int dst_id,
+      const dcomplex& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 - s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axmy(
+      const int dst_id,
+      const dcomplex& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination data to absolute value of source data, pointwise.
+    * Note that the source data must be dcomplex and the destination must
+    * be double.
+    */
+   void
+   abs(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data entries to random values.  See the operations in the
+    * array data operation classes for details on the generation of
+    * the random values.
+    */
+   void
+   setRandomValues(
+      const int data_id,
+      const dcomplex& width,
+      const dcomplex& low,
+      const bool interior_only = true) const;
+
+   /**
+    * Return the total number of data values for the component on the set
+    * of hierarchy levels.  If the boolean argument is true, the number of
+    * elements will be summed over patch interiors in a unique way which
+    * avoids multiple counting of redundant values (recall the definition
+    * of node points on a patch interior).  If the boolean argument is false,
+    * all elements will be counted (including ghost values) over all patches.
+    */
+   int
+   numberOfEntries(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return sum of the control volumes associated with the data component.
+    * Note that if the ontrol volumes are set propery, this is equivalent to
+    * integrating a data component containing all ones over the collection of
+    * hierarchy levels.
+    */
+   double
+   sumControlVolumes(
+      const int data_id,
+      const int vol_id) const;
+
+   /**
+    * Return discrete \f$L_1\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( \sqrt{data_i * \bar{data_i}}*cvol_i )\f$.
+    * If the control volume is undefined (vol_id < 0), the
+    * return value is \f$\sum_i ( \sqrt{data_i * \bar{data_i}} )\f$.
+    */
+   double
+   L1Norm(
+      const int data_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete \f$L_2\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum
+    * \f$\sqrt{ \sum_i ( data_i * \bar{data_i} cvol_i ) }\f$.
+    * If the control volume is undefined (vol_id < 0), the return value is
+    * \f$\sqrt{ \sum_i ( data_i * \bar{data_i} ) }\f$.
+    */
+   double
+   L2Norm(
+      const int data_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete weighted \f$L_2\f$-norm of the data using the control
+    * volume to weight the contribution of the data and weight entries to
+    * the sum.  That is, the return value is the sum \f$\sqrt{ \sum_i (
+    * (data_i * wgt_i) * \bar{(data_i * wgt_i)} cvol_i ) }\f$.  If the control
+    * volume is undefined (vol_id < 0), the return value is
+    * \f$\sqrt{ \sum_i ( (data_i * wgt_i) * \bar{(data_i * wgt_i)} cvol_i ) }\f$.
+    */
+   double
+   weightedL2Norm(
+      const int data_id,
+      const int weight_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete root mean squared norm of the data.  If the control
+    * volume is specified (vol_id >= 0), the return value is the \f$L_2\f$-norm
+    * divided by the square root of the sum of the control volumes.  Otherwise,
+    * the return value is the \f$L_2\f$-norm divided by the square root of the
+    * number of data entries.
+    */
+   double
+   RMSNorm(
+      const int data_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete weighted root mean squared norm of the data.  If the
+    * control volume is specified (vol_id >= 0), the return value is the
+    * weighted \f$L_2\f$-norm divided by the square root of the sum of the
+    * control volumes.  Otherwise, the return value is the weighted \f$L_2\f$-norm
+    * divided by the square root of the number of data entries.
+    */
+   double
+   weightedRMSNorm(
+      const int data_id,
+      const int weight_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return the \f$\max\f$-norm of the data using the control volume to weight
+    * the contribution of each data entry to the maximum.  That is, the return
+    * value is \f$\max_i ( \sqrt{data_i * \bar{data_i}} )\f$, where the max is
+    * over the data elements where \f$cvol_i > 0\f$.  If the control volume is
+    * undefined (vol_id < 0), it is ignored during the computation of the
+    * maximum.
+    */
+   double
+   maxNorm(
+      const int data_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return the dot product of the two data arrays using the control volume
+    * to weight the contribution of each product to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( data1_i * \bar{data2_i} * cvol_i )\f$.
+    * If the control volume is undefined (vol_id < 0), it is ignored during
+    * the summation.
+    */
+   dcomplex
+   dot(
+      const int data1_id,
+      const int data2_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return the integral of the function represented by the data array.
+    * The return value is the sum \f$\sum_i ( data_i * vol_i )\f$.
+    */
+   dcomplex
+   integral(
+      const int data_id,
+      const int vol_id) const;
+
+private:
+   // The following are not implemented
+   HierarchyEdgeDataOpsComplex(
+      const HierarchyEdgeDataOpsComplex&);
+   void
+   operator = (
+      const HierarchyEdgeDataOpsComplex&);
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+   int d_coarsest_level;
+   int d_finest_level;
+   tbox::Array<tbox::Array<hier::BoxList> > d_nonoverlapping_edge_boxes[tbox::
+                                                                        Dimension
+                                                                        ::
+                                                                        MAXIMUM_DIMENSION_VALUE
+   ];
+
+   PatchEdgeDataOpsComplex d_patch_ops;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyEdgeDataOpsInteger.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyEdgeDataOpsInteger.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,768 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for integer edge data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyEdgeDataOpsInteger_C
+#define included_math_HierarchyEdgeDataOpsInteger_C
+
+#include "SAMRAI/math/HierarchyEdgeDataOpsInteger.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/BoxUtilities.h"
+#include "SAMRAI/pdat/EdgeDataFactory.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#include <typeinfo>
+#include <stdlib.h>
+#include <float.h>
+#include <math.h>
+
+namespace SAMRAI {
+namespace math {
+
+HierarchyEdgeDataOpsInteger::HierarchyEdgeDataOpsInteger(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level):
+   HierarchyDataOpsInteger()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+#endif
+   d_hierarchy = hierarchy;
+   if ((coarsest_level < 0) || (finest_level < 0)) {
+      if (d_hierarchy->getNumberOfLevels() == 0) {
+         d_coarsest_level = coarsest_level;
+         d_finest_level = finest_level;
+      } else {
+         resetLevels(0, d_hierarchy->getFinestLevelNumber());
+      }
+   } else {
+      resetLevels(coarsest_level, finest_level);
+   }
+}
+
+HierarchyEdgeDataOpsInteger::~HierarchyEdgeDataOpsInteger()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Rotuines to set the hierarchy and level information.                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HierarchyEdgeDataOpsInteger::setPatchHierarchy(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+
+   d_hierarchy = hierarchy;
+}
+
+void HierarchyEdgeDataOpsInteger::resetLevels(
+   const int coarsest_level,
+   const int finest_level)
+{
+   int i;
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (finest_level >= coarsest_level)
+      && (finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   const tbox::Dimension& dim(d_hierarchy->getDim());
+
+   d_coarsest_level = coarsest_level;
+   d_finest_level = finest_level;
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      d_nonoverlapping_edge_boxes[d].resizeArray(d_finest_level + 1);
+   }
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      hier::BoxArray edge_boxes(dim);
+      const int n = level->getNumberOfPatches();
+
+      for (int nd = 0; nd < dim.getValue(); nd++) {
+         edge_boxes = level->getBoxes();
+         for (i = 0; i < n; i++) {
+            edge_boxes[i] =
+               pdat::EdgeGeometry::toEdgeBox(edge_boxes[i], nd);
+         }
+         hier::BoxUtilities::makeNonOverlappingBoxLists(
+            d_nonoverlapping_edge_boxes[nd][ln],
+            edge_boxes);
+      }
+   }
+}
+
+const tbox::Pointer<hier::PatchHierarchy>
+HierarchyEdgeDataOpsInteger::getPatchHierarchy() const
+{
+   return d_hierarchy;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic operations.                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int HierarchyEdgeDataOpsInteger::numberOfEntries(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+   const tbox::Dimension& dim(d_hierarchy->getDim());
+
+   int entries = 0;
+
+   if (interior_only) {
+
+      tbox::Pointer<pdat::EdgeDataFactory<int> >
+      dfact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!dfact.isNull());
+#endif
+
+      for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+         const int npatches = level->getNumberOfPatches();
+#ifdef DEBUG_CHECK_ASSERTIONS
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            TBOX_ASSERT(npatches == d_nonoverlapping_edge_boxes[nd][ln].getSize());
+         }
+#endif
+         for (int il = 0; il < npatches; il++) {
+            tbox::List<hier::Box>::Iterator lb;
+
+            for (int eb = 0; eb < dim.getValue(); eb++) {
+               lb = ((d_nonoverlapping_edge_boxes[eb][ln])[il]).listStart();
+               for ( ; lb; lb++) {
+                  entries += lb().size();
+               }
+            }
+         }
+      }
+
+      entries *= dfact->getDepth();
+
+   } else {
+
+      for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::Pointer<pdat::EdgeData<int> > d =
+               (*ip)->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            entries += d_patch_ops.numberOfEntries(d, d->getGhostBox());
+         }
+      }
+
+      int global_entries = entries;
+      if (mpi.getSize() > 1) {
+         mpi.Allreduce(&entries, &global_entries, 1, MPI_INT, MPI_SUM);
+      }
+      entries = global_entries;
+
+   }
+
+   return entries;
+}
+
+void HierarchyEdgeDataOpsInteger::copyData(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<int> > s = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.copyData(d, s, box);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsInteger::swapData(
+   const int data1_id,
+   const int data2_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   tbox::Pointer<pdat::EdgeDataFactory<int> >
+   d1fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data1_id);
+   TBOX_ASSERT(!d1fact.isNull());
+   tbox::Pointer<pdat::EdgeDataFactory<int> >
+   d2fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data2_id);
+   TBOX_ASSERT(!d2fact.isNull());
+   TBOX_ASSERT(d1fact->getDepth() == d2fact->getDepth());
+   TBOX_ASSERT(d1fact->getGhostCellWidth() == d2fact->getGhostCellWidth());
+#endif
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         d_patch_ops.swapData(p, data1_id, data2_id);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsInteger::printData(
+   const int data_id,
+   std::ostream& s,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   s << "Patch descriptor id = " << data_id << std::endl;
+   s << "Factory = " << typeid(d_hierarchy->getPatchDescriptor()->
+                               getPatchDataFactory(data_id)).name()
+     << std::endl;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      s << "Level number = " << ln << std::endl;
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<int> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.printData(d, box, s);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsInteger::setToScalar(
+   const int data_id,
+   const int& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<int> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.setToScalar(d, alpha, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic arithmetic operations.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HierarchyEdgeDataOpsInteger::scale(
+   const int dst_id,
+   const int& alpha,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<int> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<int> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.scale(dst, alpha, src, box);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsInteger::addScalar(
+   const int dst_id,
+   const int src_id,
+   const int& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<int> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<int> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.addScalar(dst, src, alpha, box);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsInteger::add(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::EdgeData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.add(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsInteger::subtract(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::EdgeData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.subtract(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsInteger::multiply(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::EdgeData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.multiply(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsInteger::divide(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::EdgeData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.divide(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsInteger::reciprocal(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<int> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.reciprocal(d, src, box);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsInteger::linearSum(
+   const int dst_id,
+   const int& alpha,
+   const int src1_id,
+   const int& beta,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::EdgeData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.linearSum(d, alpha, s1, beta, s2, box);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsInteger::axpy(
+   const int dst_id,
+   const int& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::EdgeData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.axpy(d, alpha, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsInteger::axmy(
+   const int dst_id,
+   const int& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::EdgeData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.axmy(d, alpha, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyEdgeDataOpsInteger::abs(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<int> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.abs(d, src, box);
+      }
+   }
+}
+
+int HierarchyEdgeDataOpsInteger::min(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int minval = tbox::MathUtilities<int>::getMax();
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<int> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         minval = tbox::MathUtilities<int>::Min(minval,
+               d_patch_ops.min(d, box));
+      }
+   }
+
+   int global_min = minval;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&minval, &global_min, 1, MPI_INT, MPI_MIN);
+   }
+   return global_min;
+}
+
+int HierarchyEdgeDataOpsInteger::max(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int maxval = -(tbox::MathUtilities<int>::getMax());
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<int> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         maxval = tbox::MathUtilities<int>::Max(maxval,
+               d_patch_ops.min(d, box));
+      }
+   }
+
+   int global_max = maxval;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&maxval, &global_max, 1, MPI_INT, MPI_MAX);
+   }
+   return global_max;
+}
+
+void HierarchyEdgeDataOpsInteger::setRandomValues(
+   const int data_id,
+   const int& width,
+   const int& low,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<int> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.setRandomValues(d, width, low, box);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyEdgeDataOpsInteger.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyEdgeDataOpsInteger.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,323 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for integer edge data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyEdgeDataOpsInteger
+#define included_math_HierarchyEdgeDataOpsInteger
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/math/HierarchyDataOpsInteger.h"
+#include "SAMRAI/math/PatchEdgeDataOpsInteger.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class HierarchyEdgeDataOpsInteger provides a collection of
+ * operations that manipulate integer edge-centered patch data components over
+ * multiple levels in an AMR hierarchy.  It is derived from the abstract
+ * base class HierarchyDataOpsInteger which defines the interface to
+ * similar operations for edge-centered, edge-centered, edge-centered patch
+ * data objects where the data is of type integer.  The operations include
+ * basic arithmetic and some ordering operations.  On each patch, the
+ * operations are performed by the PatchEdgeDataOpsInteger data member.
+ *
+ * The patch hierarchy and set of levels within that hierarcy over which the
+ * operations will be performed are set in the constructor.  However, note
+ * that the constructor accepts default arguments for the coarsest and finest
+ * level numbers.  If the level numbers are not specified when calling the
+ * constructor the levels which exist in the hierarchy will be assumed in
+ * all operations.  The hierarchy and levels may be changed at any time using
+ * the proper member functions.
+ *
+ * Note that, when it makes sense, an operation accept a boolean argument
+ * which indicates whether the operation should be performed on all of the
+ * data or just those data elements corresponding to the patch interiors.
+ * If no boolean argument is provided, the default behavior is to treat only
+ * the patch interiors.  Also, a similar set of operations for real (double
+ * and float) and complex edge-centered data is provided in the classes
+ * HierarchyEdgeDataOpsReal and HierarchyEdgeDataOpsComplex,
+ * respectively.
+ *
+ * @see math::PatchEdgeDataOpsInteger
+ */
+
+class HierarchyEdgeDataOpsInteger:public HierarchyDataOpsInteger
+{
+public:
+   /**
+    * The constructor for the HierarchyEdgeDataOpsInteger class sets
+    * the default patch hierarchy and coarsest and finest patch levels
+    * in that hierarchy over which operations will be performed.  The
+    * hierarchy and operations may be reset using the member fuctions
+    * setPatchHierarchy() and resetLevels() below.  If no level number
+    * arguments are given here, the levels over which the operations will
+    * be performed are those already existing in the hierarchy.  If the
+    * hierarchy level configuration changes, the operations must be explicitly
+    * reset by calling the resetLevels() function.
+    */
+   explicit HierarchyEdgeDataOpsInteger(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int coarsest_level = -1,
+      const int finest_level = -1);
+
+   /**
+    * Virtual destructor for the HierarchyEdgeDataOpsInteger class.
+    */
+   virtual ~HierarchyEdgeDataOpsInteger();
+
+   /**
+    * Reset patch hierarchy over which operations occur.
+    */
+   void
+   setPatchHierarchy(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+   /**
+    * Reset range of patch levels over which operations occur.
+    * Levels must exist in hierarchy or an assertion will result.
+    */
+   void
+   resetLevels(
+      const int coarsest_level,
+      const int finest_level);
+
+   /**
+    * Return const pointer to patch hierarchy associated with operations.
+    */
+   const tbox::Pointer<hier::PatchHierarchy>
+   getPatchHierarchy() const;
+
+   /**
+    * Return the total number of data values for the component on the set
+    * of hierarchy levels.  If the boolean argument is true, the number of
+    * elements will be summed over patch interiors in a unique way which
+    * avoids multiple counting of redundant values (recall the definition
+    * of node points on a patch interior).  If the boolean argument is false,
+    * all elements will be counted (including ghost values) over all patches.
+    */
+   int
+   numberOfEntries(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Copy source data to destination data.
+    */
+   void
+   copyData(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Swap data pointers (i.e., storage) between two data components.
+    */
+   void
+   swapData(
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data over multiple levels to specified output stream.
+    */
+   void
+   printData(
+      const int data_id,
+      std::ostream& s,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data component to given scalar.
+    */
+   void
+   setToScalar(
+      const int data_id,
+      const int& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to source multiplied by given scalar, pointwise.
+    */
+   void
+   scale(
+      const int dst_id,
+      const int& alpha,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Add scalar to each entry in source data and set destination to result.
+    */
+   void
+   addScalar(
+      const int dst_id,
+      const int src_id,
+      const int& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to sum of two source components, pointwise.
+    */
+   void
+   add(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Subtract second source component from first source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   subtract(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination component to product of two source components, pointwise.
+    */
+   void
+   multiply(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Divide first data component by second source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   divide(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set each entry of destination component to reciprocal of corresponding
+    * source data component entry.
+    */
+   void
+   reciprocal(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + \beta s_2\f$, where \f$d\f$ is the destination patch
+    * data component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha, \beta\f$ are scalar values.
+    */
+   void
+   linearSum(
+      const int dst_id,
+      const int& alpha,
+      const int src1_id,
+      const int& beta,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axpy(
+      const int dst_id,
+      const int& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 - s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axmy(
+      const int dst_id,
+      const int& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination data to absolute value of source data, pointwise.
+    */
+   void
+   abs(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return minimum data value over all patches in the collection of levels.
+    */
+   int
+   min(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return maximum data value over all patches in the collection of levels.
+    */
+   int
+   max(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data entries to random values.  See the operations in the
+    * array data operation classes for details on the generation of
+    * the random values.
+    */
+   void
+   setRandomValues(
+      const int data_id,
+      const int& width,
+      const int& low,
+      const bool interior_only = true) const;
+
+private:
+   // The following are not implemented
+   HierarchyEdgeDataOpsInteger(
+      const HierarchyEdgeDataOpsInteger&);
+   void
+   operator = (
+      const HierarchyEdgeDataOpsInteger&);
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+   int d_coarsest_level;
+   int d_finest_level;
+   tbox::Array<tbox::Array<hier::BoxList> > d_nonoverlapping_edge_boxes[tbox::
+                                                                        Dimension
+                                                                        ::
+                                                                        MAXIMUM_DIMENSION_VALUE
+   ];
+
+   PatchEdgeDataOpsInteger d_patch_ops;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyEdgeDataOpsReal.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyEdgeDataOpsReal.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1351 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations for real edge data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyEdgeDataOpsReal_C
+#define included_math_HierarchyEdgeDataOpsReal_C
+
+#include "SAMRAI/math/HierarchyEdgeDataOpsReal.h"
+#include "SAMRAI/hier/BoxUtilities.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/pdat/EdgeDataFactory.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include <typeinfo>
+#include <stdlib.h>
+#include <float.h>
+#include <math.h>
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+HierarchyEdgeDataOpsReal<TYPE>::HierarchyEdgeDataOpsReal(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level):
+   HierarchyDataOpsReal<TYPE>()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+#endif
+   d_hierarchy = hierarchy;
+   if ((coarsest_level < 0) || (finest_level < 0)) {
+      if (d_hierarchy->getNumberOfLevels() == 0) {
+         d_coarsest_level = coarsest_level;
+         d_finest_level = finest_level;
+      } else {
+         resetLevels(0, d_hierarchy->getFinestLevelNumber());
+      }
+   } else {
+      resetLevels(coarsest_level, finest_level);
+   }
+}
+
+template<class TYPE>
+HierarchyEdgeDataOpsReal<TYPE>::~HierarchyEdgeDataOpsReal()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to set the hierarchy and level informtation.                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void HierarchyEdgeDataOpsReal<TYPE>::setPatchHierarchy(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+
+   d_hierarchy = hierarchy;
+}
+
+template<class TYPE>
+void HierarchyEdgeDataOpsReal<TYPE>::resetLevels(
+   const int coarsest_level,
+   const int finest_level)
+{
+   int i;
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (finest_level >= coarsest_level)
+      && (finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   const tbox::Dimension& dim(d_hierarchy->getDim());
+
+   d_coarsest_level = coarsest_level;
+   d_finest_level = finest_level;
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      d_nonoverlapping_edge_boxes[d].resizeArray(d_finest_level + 1);
+   }
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      hier::BoxArray edge_boxes(dim);
+      const int n = level->getNumberOfPatches();
+
+      for (int nd = 0; nd < dim.getValue(); nd++) {
+         edge_boxes = level->getBoxes();
+         for (i = 0; i < n; i++) {
+            edge_boxes[i] =
+               pdat::EdgeGeometry::toEdgeBox(edge_boxes[i], nd);
+         }
+         hier::BoxUtilities::makeNonOverlappingBoxLists(
+            d_nonoverlapping_edge_boxes[nd][ln],
+            edge_boxes);
+      }
+   }
+}
+
+template<class TYPE>
+const tbox::Pointer<hier::PatchHierarchy>
+HierarchyEdgeDataOpsReal<TYPE>::getPatchHierarchy() const
+{
+   return d_hierarchy;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The following are private and cannot be used, but they are defined    *
+ * here for compilers that require that every template declaration have  *
+ * a definition (a stupid requirement, if you ask me).                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+HierarchyEdgeDataOpsReal<TYPE>::HierarchyEdgeDataOpsReal(
+   const HierarchyEdgeDataOpsReal<TYPE>& foo):
+   HierarchyDataOpsReal<TYPE>()
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void HierarchyEdgeDataOpsReal<TYPE>::operator = (
+   const HierarchyEdgeDataOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic operations.                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void HierarchyEdgeDataOpsReal<TYPE>::copyData(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<TYPE> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.copyData(dst, src, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyEdgeDataOpsReal<TYPE>::swapData(
+   const int data1_id,
+   const int data2_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   tbox::Pointer<pdat::EdgeDataFactory<TYPE> >
+   d1fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data1_id);
+   TBOX_ASSERT(!d1fact.isNull());
+   tbox::Pointer<pdat::EdgeDataFactory<TYPE> >
+   d2fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data2_id);
+   TBOX_ASSERT(!d2fact.isNull());
+   TBOX_ASSERT(d1fact->getDepth() == d2fact->getDepth());
+   TBOX_ASSERT(d1fact->getGhostCellWidth() == d2fact->getGhostCellWidth());
+#endif
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         d_patch_ops.swapData(p, data1_id, data2_id);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyEdgeDataOpsReal<TYPE>::printData(
+   const int data_id,
+   std::ostream& s,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   s << "Patch descriptor id = " << data_id << std::endl;
+   s << "Factory = " << typeid(*d_hierarchy->getPatchDescriptor()->
+                               getPatchDataFactory(data_id)).name()
+     << std::endl;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      s << "Level number = " << ln << std::endl;
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.printData(d, box, s);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyEdgeDataOpsReal<TYPE>::setToScalar(
+   const int data_id,
+   const TYPE& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.setToScalar(d, alpha, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic arithmetic operations.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void HierarchyEdgeDataOpsReal<TYPE>::scale(
+   const int dst_id,
+   const TYPE& alpha,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<TYPE> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.scale(dst, alpha, src, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyEdgeDataOpsReal<TYPE>::addScalar(
+   const int dst_id,
+   const int src_id,
+   const TYPE& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<TYPE> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.addScalar(dst, src, alpha, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyEdgeDataOpsReal<TYPE>::add(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::EdgeData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.add(dst, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyEdgeDataOpsReal<TYPE>::subtract(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::EdgeData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.subtract(dst, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyEdgeDataOpsReal<TYPE>::multiply(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::EdgeData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.multiply(dst, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyEdgeDataOpsReal<TYPE>::divide(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::EdgeData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.divide(dst, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyEdgeDataOpsReal<TYPE>::reciprocal(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<TYPE> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.reciprocal(dst, src, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyEdgeDataOpsReal<TYPE>::linearSum(
+   const int dst_id,
+   const TYPE& alpha,
+   const int src1_id,
+   const TYPE& beta,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::EdgeData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.linearSum(dst, alpha, src1, beta, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyEdgeDataOpsReal<TYPE>::axpy(
+   const int dst_id,
+   const TYPE& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::EdgeData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.axpy(dst, alpha, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyEdgeDataOpsReal<TYPE>::axmy(
+   const int dst_id,
+   const TYPE& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::EdgeData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.axmy(dst, alpha, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyEdgeDataOpsReal<TYPE>::abs(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<TYPE> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.abs(dst, src, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyEdgeDataOpsReal<TYPE>::setRandomValues(
+   const int data_id,
+   const TYPE& width,
+   const TYPE& low,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > data = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!data.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : data->getGhostBox());
+
+         d_patch_ops.setRandomValues(data, width, low, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Generic norm and order operations.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+int HierarchyEdgeDataOpsReal<TYPE>::numberOfEntries(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+   const tbox::Dimension& dim(d_hierarchy->getDim());
+
+   int entries = 0;
+
+   if (interior_only) {
+
+      tbox::Pointer<pdat::EdgeDataFactory<TYPE> >
+      dfact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!dfact.isNull());
+#endif
+
+      for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+         const int npatches = level->getNumberOfPatches();
+#ifdef DEBUG_CHECK_ASSERTIONS
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            TBOX_ASSERT(npatches == d_nonoverlapping_edge_boxes[nd][ln].getSize());
+         }
+#endif
+         for (int il = 0; il < npatches; il++) {
+            tbox::List<hier::Box>::Iterator lb;
+
+            for (int eb = 0; eb < dim.getValue(); eb++) {
+               lb = ((d_nonoverlapping_edge_boxes[eb][ln])[il]).listStart();
+               for ( ; lb; lb++) {
+                  entries += lb().size();
+               }
+            }
+         }
+      }
+
+      entries *= dfact->getDepth();
+
+   } else {
+
+      for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::Pointer<pdat::EdgeData<TYPE> > d =
+               (*ip)->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            entries += d_patch_ops.numberOfEntries(d, d->getGhostBox());
+         }
+      }
+
+      int global_entries = entries;
+      if (mpi.getSize() > 1) {
+         mpi.Allreduce(&entries, &global_entries, 1, MPI_INT, MPI_SUM);
+      }
+      entries = global_entries;
+
+   }
+
+   return entries;
+}
+
+template<class TYPE>
+double HierarchyEdgeDataOpsReal<TYPE>::sumControlVolumes(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(vol_id >= 0);
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double sum = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > data = p->getPatchData(data_id);
+         tbox::Pointer<pdat::EdgeData<double> > cv = p->getPatchData(vol_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!cv.isNull());
+#endif
+         hier::Box box = cv->getGhostBox();
+
+         sum += d_patch_ops.sumControlVolumes(data, cv, box);
+      }
+   }
+
+   double global_sum = sum;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&sum, &global_sum, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   return global_sum;
+}
+
+template<class TYPE>
+double HierarchyEdgeDataOpsReal<TYPE>::L1Norm(
+   const int data_id,
+   const int vol_id,
+   bool local_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > data = p->getPatchData(data_id);
+         tbox::Pointer<pdat::EdgeData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!data.isNull());
+#endif
+            box = data->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         norm += d_patch_ops.L1Norm(data, box, cv);
+      }
+   }
+
+   if (!local_only) {
+      double global_norm = norm;
+      if (mpi.getSize() > 1) {
+         mpi.Allreduce(&norm, &global_norm, 1, MPI_DOUBLE, MPI_SUM);
+      }
+      norm = global_norm;
+   }
+   return norm;
+}
+
+template<class TYPE>
+double HierarchyEdgeDataOpsReal<TYPE>::L2Norm(
+   const int data_id,
+   const int vol_id,
+   bool local_only) const
+{
+   double norm_squared = HierarchyEdgeDataOpsReal<TYPE>::dot(data_id,
+         data_id,
+         vol_id,
+         local_only);
+
+   return sqrt(norm_squared);
+}
+
+template<class TYPE>
+double HierarchyEdgeDataOpsReal<TYPE>::weightedL2Norm(
+   const int data_id,
+   const int wgt_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm_squared = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > data = p->getPatchData(data_id);
+         tbox::Pointer<pdat::EdgeData<TYPE> > weight = p->getPatchData(wgt_id);
+         tbox::Pointer<pdat::EdgeData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!data.isNull());
+#endif
+            box = data->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         double pnorm = d_patch_ops.weightedL2Norm(data, weight, box, cv);
+
+         norm_squared += pnorm * pnorm;
+      }
+   }
+
+   double global_norm_squared = norm_squared;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&norm_squared, &global_norm_squared, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   return sqrt(global_norm_squared);
+}
+
+template<class TYPE>
+double HierarchyEdgeDataOpsReal<TYPE>::RMSNorm(
+   const int data_id,
+   const int vol_id) const
+{
+   double l2_norm = L2Norm(data_id, vol_id);
+
+   double volume = ((vol_id < 0) ? (double)numberOfEntries(data_id, true)
+                    : sumControlVolumes(data_id, vol_id));
+
+   double rms_norm = l2_norm / sqrt(volume);
+   return rms_norm;
+}
+
+template<class TYPE>
+double HierarchyEdgeDataOpsReal<TYPE>::weightedRMSNorm(
+   const int data_id,
+   const int wgt_id,
+   const int vol_id) const
+{
+
+   double l2_norm = weightedL2Norm(data_id, wgt_id, vol_id);
+
+   double volume = ((vol_id < 0) ? (double)numberOfEntries(data_id, true)
+                    : sumControlVolumes(data_id, vol_id));
+
+   double rms_norm = l2_norm / sqrt(volume);
+   return rms_norm;
+}
+
+template<class TYPE>
+double HierarchyEdgeDataOpsReal<TYPE>::maxNorm(
+   const int data_id,
+   const int vol_id,
+   bool local_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > data = p->getPatchData(data_id);
+         tbox::Pointer<pdat::EdgeData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!data.isNull());
+#endif
+            box = data->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         norm = tbox::MathUtilities<double>::Max(norm,
+               d_patch_ops.maxNorm(data, box, cv));
+      }
+   }
+
+   if (!local_only) {
+      double global_norm = norm;
+      if (mpi.getSize() > 1) {
+         mpi.Allreduce(&norm, &global_norm, 1, MPI_DOUBLE, MPI_MAX);
+      }
+      norm = global_norm;
+   }
+   return norm;
+}
+
+template<class TYPE>
+TYPE HierarchyEdgeDataOpsReal<TYPE>::dot(
+   const int data1_id,
+   const int data2_id,
+   const int vol_id,
+   bool local_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE dprod = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > data1 = p->getPatchData(data1_id);
+         tbox::Pointer<pdat::EdgeData<TYPE> > data2 = p->getPatchData(data2_id);
+         tbox::Pointer<pdat::EdgeData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!data1.isNull());
+#endif
+            box = data1->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         dprod += d_patch_ops.dot(data1, data2, box, cv);
+      }
+   }
+
+   if (!local_only) {
+      if (mpi.getSize() > 1) {
+         mpi.AllReduce(&dprod, 1, MPI_SUM);
+      }
+   }
+   return dprod;
+}
+
+template<class TYPE>
+TYPE HierarchyEdgeDataOpsReal<TYPE>::integral(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE local_integral = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > data =
+            p->getPatchData(data_id);
+         tbox::Pointer<pdat::EdgeData<double> > vol = p->getPatchData(vol_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!data.isNull());
+         TBOX_ASSERT(!vol.isNull());
+#endif
+
+         hier::Box box = data->getGhostBox();
+
+         local_integral += d_patch_ops.integral(data, box, vol);
+      }
+   }
+
+   TYPE global_integral = local_integral;
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&global_integral, 1, MPI_SUM);
+   }
+   return global_integral;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Generic miscellaneous operations for real data.                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+int HierarchyEdgeDataOpsReal<TYPE>::computeConstrProdPos(
+   const int data1_id,
+   const int data2_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int test = 1;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > data1 = p->getPatchData(data1_id);
+         tbox::Pointer<pdat::EdgeData<TYPE> > data2 = p->getPatchData(data2_id);
+         tbox::Pointer<pdat::EdgeData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!data1.isNull());
+#endif
+            box = data1->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         test = tbox::MathUtilities<int>::Min(test,
+               d_patch_ops.computeConstrProdPos(data1, data2, box, cv));
+      }
+   }
+
+   int global_test = test;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&test, &global_test, 1, MPI_INT, MPI_SUM);
+   }
+   return global_test;
+}
+
+template<class TYPE>
+void HierarchyEdgeDataOpsReal<TYPE>::compareToScalar(
+   const int dst_id,
+   const int src_id,
+   const TYPE& alpha,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<TYPE> > src = p->getPatchData(src_id);
+         tbox::Pointer<pdat::EdgeData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!dst.isNull());
+#endif
+            box = dst->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         d_patch_ops.compareToScalar(dst, src, alpha, box, cv);
+      }
+   }
+}
+
+template<class TYPE>
+int HierarchyEdgeDataOpsReal<TYPE>::testReciprocal(
+   const int dst_id,
+   const int src_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int test = 1;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::EdgeData<TYPE> > src = p->getPatchData(src_id);
+         tbox::Pointer<pdat::EdgeData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!dst.isNull());
+#endif
+            box = dst->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         test = tbox::MathUtilities<int>::Min(test,
+               d_patch_ops.testReciprocal(dst, src, box, cv));
+      }
+   }
+
+   int global_test = test;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&test, &global_test, 1, MPI_INT, MPI_SUM);
+   }
+   return global_test;
+}
+
+template<class TYPE>
+TYPE HierarchyEdgeDataOpsReal<TYPE>::maxPointwiseDivide(
+   const int numer_id,
+   const int denom_id,
+   bool local_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE max = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > numer = p->getPatchData(numer_id);
+         tbox::Pointer<pdat::EdgeData<TYPE> > denom = p->getPatchData(denom_id);
+
+         hier::Box box = p->getBox();
+
+         max = tbox::MathUtilities<TYPE>::Max(max,
+               d_patch_ops.maxPointwiseDivide(numer, denom, box));
+      }
+   }
+
+   if (!local_only) {
+      if (mpi.getSize() > 1) {
+         mpi.AllReduce(&max, 1, MPI_MAX);
+      }
+   }
+   return max;
+}
+
+template<class TYPE>
+TYPE HierarchyEdgeDataOpsReal<TYPE>::minPointwiseDivide(
+   const int numer_id,
+   const int denom_id,
+   bool local_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE min = tbox::MathUtilities<TYPE>::getMax();
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > numer = p->getPatchData(numer_id);
+         tbox::Pointer<pdat::EdgeData<TYPE> > denom = p->getPatchData(denom_id);
+
+         hier::Box box = p->getBox();
+
+         min = tbox::MathUtilities<TYPE>::Min(min,
+               d_patch_ops.minPointwiseDivide(numer, denom, box));
+      }
+   }
+
+   if (!local_only) {
+      if (mpi.getSize() > 1) {
+         mpi.AllReduce(&min, 1, MPI_MIN);
+      }
+   }
+   return min;
+}
+
+template<class TYPE>
+TYPE HierarchyEdgeDataOpsReal<TYPE>::min(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE minval = tbox::MathUtilities<TYPE>::getMax();
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         minval = tbox::MathUtilities<TYPE>::Min(minval, d_patch_ops.min(d, box));
+      }
+   }
+
+   TYPE global_min = minval;
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&global_min, 1, MPI_MIN);
+   }
+   return global_min;
+}
+
+template<class TYPE>
+TYPE HierarchyEdgeDataOpsReal<TYPE>::max(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE maxval = -tbox::MathUtilities<TYPE>::getMax();
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::EdgeData<TYPE> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         maxval = tbox::MathUtilities<TYPE>::Max(maxval, d_patch_ops.max(d, box));
+      }
+   }
+
+   TYPE global_max = maxval;
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&global_max, 1, MPI_MAX);
+   }
+   return global_max;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyEdgeDataOpsReal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyEdgeDataOpsReal.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,525 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations for real edge data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyEdgeDataOpsReal
+#define included_math_HierarchyEdgeDataOpsReal
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/math/HierarchyDataOpsReal.h"
+#include "SAMRAI/math/PatchEdgeDataOpsReal.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class HierarchyEdgeDataOpsReal provides a collection of operations
+ * that manipulate real (double and float) edge-centered patch data components
+ * over multiple levels in an AMR hierarchy.  It is derived from the abstract
+ * base class HierarchyDataOpsReal which defines the interface to
+ * similar operations for edge-centered, edge-centered, edge-centered patch
+ * data objects where the data is either double or float.  The operations
+ * include basic arithmetic, norms and ordering, and assorted miscellaneous
+ * operations.  On each patch, the operations are performed by the
+ * PatchEdgeDataOpsReal data member.
+ *
+ * The patch hierarchy and set of levels within that hierarcy over which the
+ * operations will be performed are set in the constructor.  However, note
+ * that the constructor accepts default arguments for the coarsest and finest
+ * level numbers.  If the level numbers are not specified when calling the
+ * constructor the levels which exist in the hierarchy will be assumed in
+ * all operations.  The hierarchy and levels may be changed at any time using
+ * the proper member functions.
+ *
+ * Note that, when it makes sense, an operation accept a boolean argument
+ * which indicates whether the operation should be performed on all of the
+ * data or just those data elements corresponding to the patch interiors.
+ * If no boolean argument is provided, the default behavior is to treat only
+ * the patch interiors.  Also, a similar set of operations for complex and
+ * integer edge-centered data is provided in the classes
+ * HierarchyEdgeDataOpsComplex and HierarchyEdgeDataOpsInteger,
+ * respectively.
+ *
+ * @see math::PatchEdgeDataOpsReal
+ */
+
+template<class TYPE>
+class HierarchyEdgeDataOpsReal:public HierarchyDataOpsReal<TYPE>
+{
+public:
+   /**
+    * The constructor for the HierarchyEdgeDataOpsReal class sets
+    * the default patch hierarchy and coarsest and finest patch levels
+    * in that hierarchy over which operations will be performed.  The
+    * hierarchy and operations may be reset using the member fuctions
+    * setPatchHierarchy() and resetLevels() below.  If no level number
+    * arguments are given here, the levels over which the operations will
+    * be performed are those already existing in the hierarchy.  If the
+    * hierarchy level configuration changes, the operations must be explicitly
+    * reset by calling the resetLevels() function.
+    */
+   explicit HierarchyEdgeDataOpsReal(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int coarsest_level = -1,
+      const int finest_level = -1);
+
+   /**
+    * Virtual destructor for the HierarchyEdgeDataOpsReal class.
+    */
+   virtual ~HierarchyEdgeDataOpsReal<TYPE>();
+
+   /**
+    * Reset patch hierarchy over which operations occur.
+    */
+   void
+   setPatchHierarchy(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+   /**
+    * Reset range of patch levels over which operations occur.
+    * Levels must exist in hierarchy or an assertion will result.
+    */
+   void
+   resetLevels(
+      const int coarsest_level,
+      const int finest_level);
+
+   /**
+    * Return const pointer to patch hierarchy associated with operations.
+    */
+   const tbox::Pointer<hier::PatchHierarchy>
+   getPatchHierarchy() const;
+
+   /**
+    * Copy source data to destination data.
+    */
+   void
+   copyData(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Swap data pointers (i.e., storage) between two data components.
+    */
+   void
+   swapData(
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data over multiple levels to specified output stream.
+    */
+   void
+   printData(
+      const int data_id,
+      std::ostream& s,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data component to given scalar.
+    */
+   void
+   setToScalar(
+      const int data_id,
+      const TYPE& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to source multiplied by given scalar, pointwise.
+    */
+   void
+   scale(
+      const int dst_id,
+      const TYPE& alpha,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Add scalar to each entry in source data and set destination to result.
+    */
+   void
+   addScalar(
+      const int dst_id,
+      const int src_id,
+      const TYPE& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to sum of two source components, pointwise.
+    */
+   void
+   add(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Subtract second source component from first source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   subtract(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination component to product of two source components, pointwise.
+    */
+   void
+   multiply(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Divide first data component by second source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   divide(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set each entry of destination component to reciprocal of corresponding
+    * source data component entry.
+    */
+   void
+   reciprocal(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + \beta s_2\f$, where \f$d\f$ is the destination patch
+    * data component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha, \beta\f$ are scalar values.
+    */
+   void
+   linearSum(
+      const int dst_id,
+      const TYPE& alpha,
+      const int src1_id,
+      const TYPE& beta,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axpy(
+      const int dst_id,
+      const TYPE& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 - s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axmy(
+      const int dst_id,
+      const TYPE& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination data to absolute value of source data, pointwise.
+    */
+   void
+   abs(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return minimum data value over all patches in the collection of levels.
+    */
+   TYPE
+   min(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return maximum data value over all patches in the collection of levels.
+    */
+   TYPE
+   max(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data entries to random values.  See the operations in the
+    * array data operation classes for each data type for details on the
+    * generation of the random values.
+    */
+   void
+   setRandomValues(
+      const int data_id,
+      const TYPE& width,
+      const TYPE& low,
+      const bool interior_only = true) const;
+
+   /**
+    * Return the total number of data values for the component on the set
+    * of hierarchy levels.  If the boolean argument is true, the number of
+    * elements will be summed over patch interiors in a unique way which
+    * avoids multiple counting of redundant values (recall the definition
+    * of node points on a patch interior).  If the boolean argument is false,
+    * all elements will be counted (including ghost values) over all patches.
+    */
+   int
+   numberOfEntries(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return sum of the control volumes associated with the data component.
+    * Note that if the ontrol volumes are set propery, this is equivalent to
+    * integrating a data component containing all ones over the collection of
+    * hierarchy levels.
+    */
+   double
+   sumControlVolumes(
+      const int data_id,
+      const int vol_id) const;
+
+   /**
+    * Return discrete \f$L_1\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( \| data_i \| cvol_i )\f$.  If the
+    * control volume is not defined (vol_id < 0), the return value is
+    * \f$\sum_i ( \| data_i \| )\f$.
+    * If local_only is true, the global reduction is not
+    * performed (thus each process will get only local results).
+    */
+   double
+   L1Norm(
+      const int data_id,
+      const int vol_id = -1,
+      bool local_only = false) const;
+
+   /**
+    * Return discrete \f$L_2\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sqrt{ \sum_i ( (data_i)^2 cvol_i ) }\f$.
+    * If the control volume is  not defined (vol_id < 0), the return value
+    * is \f$\sqrt{ \sum_i ( (data_i)^2 cvol_i ) }\f$.
+    * If local_only is true, the global reduction is not
+    * performed (thus each process will get only local results).
+    */
+   double
+   L2Norm(
+      const int data_id,
+      const int vol_id = -1,
+      bool local_only = false) const;
+
+   /**
+    * Return discrete weighted \f$L_2\f$-norm of the data using the control
+    * volume to weight the contribution of the data and weight entries to
+    * the sum.  That is, the return value is the sum \f$\sqrt{ \sum_i (
+    * (data_i * weight_i)^2 cvol_i ) }\f$.  If the control volume is not defined
+    * (vol_id < 0), the return value is
+    * \f$\sqrt{ \sum_i ( (data_i * weight_i)^2 ) }\f$.
+    */
+   double
+   weightedL2Norm(
+      const int data_id,
+      const int weight_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete root mean squared norm of the data.  If the control
+    * volume is defined, the return value is the \f$L_2\f$-norm divided by
+    * the square root of the sum of the control volumes.  Otherwise, the
+    * return value is the \f$L_2\f$-norm divided by the square root of the
+    * number of data entries.
+    */
+   double
+   RMSNorm(
+      const int data_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete weighted root mean squared norm of the data.  If the
+    * control volume is define, the return value is the weighted \f$L_2\f$-norm
+    * divided by the square root of the sum of the control volumes.  Otherwise,
+    * the return value is the weighted \f$L_2\f$-norm divided by the square root
+    * of the number of data entries.
+    */
+   double
+   weightedRMSNorm(
+      const int data_id,
+      const int weight_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return the \f$\max\f$-norm of the data using the control volume to weight
+    * the contribution of each data entry to the maximum.  That is, the return
+    * value is \f$\max_i ( \| data_i \| )\f$, where the max is over the data
+    * elements where \f$cvol_i > 0\f$.  If the control volume is undefined
+    * (vol_id < 0), it is ignored during the computation of the maximum.
+    * If local_only is true, the global reduction is not
+    * performed (thus each process will get only local results).
+    */
+   double
+   maxNorm(
+      const int data_id,
+      const int vol_id = -1,
+      bool local_only = false) const;
+
+   /**
+    * Return the dot product of the two data arrays using the control volume
+    * to weight the contribution of each product to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( data1_i * data2_i * cvol_i )\f$.
+    * If the control volume is undefined (vol_id < 0), it is ignored during
+    * the summation.  If local_only is true, the global reduction is not
+    * performed (thus each process will get only local results).
+    */
+   TYPE
+   dot(
+      const int data1_id,
+      const int data2_id,
+      const int vol_id = -1,
+      bool local_only = false) const;
+
+   /**
+    * Return the integral of the function represented by the data array.
+    * The return value is the sum \f$\sum_i ( data_i * vol_i )\f$.
+    */
+   TYPE
+   integral(
+      const int data_id,
+      const int vol_id) const;
+
+   /**
+    * Return 1 if \f$\|data2_i\| > 0\f$ and \f$data1_i * data2_i \leq 0\f$, for
+    * any \f$i\f$ in the set of patch data indices, where \f$cvol_i > 0\f$.  Otherwise,
+    * return 0.  If the control volume is undefined (vol_id < 0), all values
+    * on the patch interiors are considered.
+    */
+   int
+   computeConstrProdPos(
+      const int data1_id,
+      const int data2_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Wherever \f$cvol_i > 0\f$ in the set of patch data indices, set \f$dst_i = 1\f$
+    * if \f$\|src_i\| > \alpha\f$, and \f$dst_i = 0\f$ otherwise.  If the control
+    * volume is undefined (vol_id < 0), all values on the patch interiors
+    * are considered.
+    */
+   void
+   compareToScalar(
+      const int dst_id,
+      const int src_id,
+      const TYPE& alpha,
+      const int vol_id = -1) const;
+
+   /**
+    * Wherever \f$cvol_i > 0\f$ in the set of patch data indices, set
+    * \f$dst_i = 1/src_i\f$ if \f$src_i \neq 0\f$, and \f$dst_i = 0\f$ otherwise.
+    * If \f$dst_i = 0\f$ anywhere, 0 is the return value.  Otherwise 1 is returned.
+    * If the control volume is undefined (vol_id < 0), all values on the
+    * patch interiors are considered.
+    */
+   int
+   testReciprocal(
+      const int dst_id,
+      const int src_id,
+      const int vol_id = -1) const;
+
+   /*!
+    * @brief Compute max of "conditional" quotients of two arrays.
+    *
+    * Return the maximum of pointwise "conditional" quotients of the numerator
+    * and denominator.
+    *
+    * The "conditional" quotient is defined as |numerator/denominator|
+    * where the denominator is nonzero.  Otherwise, it is defined as
+    * |numerator|.
+    *
+    * @b Note: This method is currently intended to support the
+    * PETSc-2.1.6 vector wrapper only.  Please do not use it!
+    */
+   TYPE
+   maxPointwiseDivide(
+      const int numer_id,
+      const int denom_id,
+      bool local_only = false) const;
+
+   /*!
+    * @brief Compute min of quotients of two arrays.
+    *
+    * Return the minimum of pointwise quotients of the numerator
+    * and denominator.
+    *
+    * The quotient is defined as (numerator/denominator)
+    * where the denominator is nonzero.  When the denominator is zero, the
+    * entry is skipped.  If the denominator is always zero, the value of
+    * tbox_IEEE::getFLT_MAX() is returned (see @ref SAMRAI::tbox::IEEE).
+    *
+    * @b Note: This method is currently intended to support the
+    * SUNDIALS vector wrapper only.  Please do not use it!
+    */
+   TYPE
+   minPointwiseDivide(
+      const int numer_id,
+      const int denom_id,
+      bool local_only = false) const;
+
+private:
+   // The following are not implemented
+   HierarchyEdgeDataOpsReal(
+      const HierarchyEdgeDataOpsReal<TYPE>&);
+   void
+   operator = (
+      const HierarchyEdgeDataOpsReal<TYPE>&);
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+   int d_coarsest_level;
+   int d_finest_level;
+   tbox::Array<tbox::Array<hier::BoxList> > d_nonoverlapping_edge_boxes[tbox::
+                                                                        Dimension
+                                                                        ::
+                                                                        MAXIMUM_DIMENSION_VALUE];
+
+   PatchEdgeDataOpsReal<TYPE> d_patch_ops;
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/HierarchyEdgeDataOpsReal.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyFaceDataOpsComplex.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyFaceDataOpsComplex.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,995 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for complex face data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyFaceDataOpsComplex_C
+#define included_math_HierarchyFaceDataOpsComplex_C
+
+#include "SAMRAI/math/HierarchyFaceDataOpsComplex.h"
+#include "SAMRAI/hier/BoxUtilities.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/pdat/FaceDataFactory.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include <typeinfo>
+#include <stdlib.h>
+#include <float.h>
+#include <math.h>
+
+namespace SAMRAI {
+namespace math {
+
+HierarchyFaceDataOpsComplex::HierarchyFaceDataOpsComplex(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level):
+   HierarchyDataOpsComplex()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+#endif
+   d_hierarchy = hierarchy;
+   if ((coarsest_level < 0) || (finest_level < 0)) {
+      if (d_hierarchy->getNumberOfLevels() == 0) {
+         d_coarsest_level = coarsest_level;
+         d_finest_level = finest_level;
+      } else {
+         resetLevels(0, d_hierarchy->getFinestLevelNumber());
+      }
+   } else {
+      resetLevels(coarsest_level, finest_level);
+   }
+}
+
+HierarchyFaceDataOpsComplex::~HierarchyFaceDataOpsComplex()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to set the hierarchy and level information.                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HierarchyFaceDataOpsComplex::setPatchHierarchy(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+
+   d_hierarchy = hierarchy;
+}
+
+void HierarchyFaceDataOpsComplex::resetLevels(
+   const int coarsest_level,
+   const int finest_level)
+{
+   int i;
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (finest_level >= coarsest_level)
+      && (finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   const tbox::Dimension& dim(d_hierarchy->getDim());
+
+   d_coarsest_level = coarsest_level;
+   d_finest_level = finest_level;
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      d_nonoverlapping_face_boxes[d].resizeArray(d_finest_level + 1);
+   }
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      hier::BoxArray face_boxes(dim);
+      const int n = level->getNumberOfPatches();
+
+      for (int nd = 0; nd < dim.getValue(); nd++) {
+         face_boxes = level->getBoxes();
+         for (i = 0; i < n; i++) {
+            face_boxes[i] =
+               pdat::FaceGeometry::toFaceBox(face_boxes[i], nd);
+         }
+         hier::BoxUtilities::makeNonOverlappingBoxLists(
+            d_nonoverlapping_face_boxes[nd][ln],
+            face_boxes);
+      }
+   }
+}
+
+const tbox::Pointer<hier::PatchHierarchy>
+HierarchyFaceDataOpsComplex::getPatchHierarchy() const
+{
+   return d_hierarchy;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic operations.                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HierarchyFaceDataOpsComplex::copyData(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<dcomplex> > s = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.copyData(d, s, box);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsComplex::swapData(
+   const int data1_id,
+   const int data2_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   tbox::Pointer<pdat::FaceDataFactory<dcomplex> >
+   d1fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data1_id);
+   TBOX_ASSERT(!d1fact.isNull());
+   tbox::Pointer<pdat::FaceDataFactory<dcomplex> >
+   d2fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data2_id);
+   TBOX_ASSERT(!d2fact.isNull());
+   TBOX_ASSERT(d1fact->getDepth() == d2fact->getDepth());
+   TBOX_ASSERT(d1fact->getGhostCellWidth() == d2fact->getGhostCellWidth());
+#endif
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         d_patch_ops.swapData(p, data1_id, data2_id);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsComplex::printData(
+   const int data_id,
+   std::ostream& s,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   s << "Patch descriptor id = " << data_id << std::endl;
+   s << "Factory = " << typeid(*d_hierarchy->getPatchDescriptor()->
+                               getPatchDataFactory(data_id)).name()
+     << std::endl;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      s << "Level number = " << ln << std::endl;
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<dcomplex> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.printData(d, box, s);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsComplex::setToScalar(
+   const int data_id,
+   const dcomplex& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<dcomplex> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.setToScalar(d, alpha, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic arithmetic operations.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HierarchyFaceDataOpsComplex::scale(
+   const int dst_id,
+   const dcomplex& alpha,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<dcomplex> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<dcomplex> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.scale(dst, alpha, src, box);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsComplex::addScalar(
+   const int dst_id,
+   const int src_id,
+   const dcomplex& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<dcomplex> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<dcomplex> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.addScalar(dst, src, alpha, box);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsComplex::add(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::FaceData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.add(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsComplex::subtract(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::FaceData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.subtract(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsComplex::multiply(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::FaceData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.multiply(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsComplex::divide(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::FaceData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.divide(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsComplex::reciprocal(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<dcomplex> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.reciprocal(d, src, box);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsComplex::linearSum(
+   const int dst_id,
+   const dcomplex& alpha,
+   const int src1_id,
+   const dcomplex& beta,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::FaceData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.linearSum(d, alpha, s1, beta, s2, box);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsComplex::axpy(
+   const int dst_id,
+   const dcomplex& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::FaceData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.axpy(d, alpha, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsComplex::axmy(
+   const int dst_id,
+   const dcomplex& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::FaceData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.axmy(d, alpha, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsComplex::abs(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<double> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<dcomplex> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.abs(d, src, box);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsComplex::setRandomValues(
+   const int data_id,
+   const dcomplex& width,
+   const dcomplex& low,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<dcomplex> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.setRandomValues(d, width, low, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Generic norm and order operations.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int HierarchyFaceDataOpsComplex::numberOfEntries(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+   const tbox::Dimension& dim(d_hierarchy->getDim());
+
+   int entries = 0;
+
+   if (interior_only) {
+
+      tbox::Pointer<pdat::FaceDataFactory<dcomplex> >
+      dfact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!dfact.isNull());
+#endif
+
+      for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+         const int npatches = level->getNumberOfPatches();
+#ifdef DEBUG_CHECK_ASSERTIONS
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            TBOX_ASSERT(npatches == d_nonoverlapping_face_boxes[nd][ln].getSize());
+         }
+#endif
+         for (int il = 0; il < npatches; il++) {
+            tbox::List<hier::Box>::Iterator lb;
+            for (int eb = 0; eb < dim.getValue(); eb++) {
+               lb = ((d_nonoverlapping_face_boxes[eb][ln])[il]).listStart();
+               for ( ; lb; lb++) {
+                  entries += lb().size();
+               }
+            }
+         }
+      }
+
+      entries *= dfact->getDepth();
+
+   } else {
+
+      for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::Pointer<pdat::FaceData<dcomplex> > d =
+               (*ip)->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            entries += d_patch_ops.numberOfEntries(d, d->getGhostBox());
+         }
+      }
+
+      int global_entries = entries;
+      if (mpi.getSize() > 1) {
+         mpi.Allreduce(&entries, &global_entries, 1, MPI_INT, MPI_MAX);
+      }
+      entries = global_entries;
+
+   }
+
+   return entries;
+}
+
+double HierarchyFaceDataOpsComplex::sumControlVolumes(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(vol_id >= 0);
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double sum = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<dcomplex> > d = p->getPatchData(data_id);
+         tbox::Pointer<pdat::FaceData<double> > cv = p->getPatchData(vol_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!cv.isNull());
+#endif
+         hier::Box box = cv->getGhostBox();
+
+         sum += d_patch_ops.sumControlVolumes(d, cv, box);
+      }
+   }
+
+   double global_sum = sum;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&sum, &global_sum, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   return global_sum;
+}
+
+double HierarchyFaceDataOpsComplex::L1Norm(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<dcomplex> > d = p->getPatchData(data_id);
+         tbox::Pointer<pdat::FaceData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            box = d->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         norm += d_patch_ops.L1Norm(d, box, cv);
+      }
+   }
+
+   double global_norm = norm;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&norm, &global_norm, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   return global_norm;
+}
+
+double HierarchyFaceDataOpsComplex::L2Norm(
+   const int data_id,
+   const int vol_id) const
+{
+   dcomplex dotprod = HierarchyFaceDataOpsComplex::dot(data_id,
+         data_id,
+         vol_id);
+
+   return sqrt(real(dotprod));
+}
+
+double HierarchyFaceDataOpsComplex::weightedL2Norm(
+   const int data_id,
+   const int wgt_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm_squared = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<dcomplex> > d = p->getPatchData(data_id);
+         tbox::Pointer<pdat::FaceData<dcomplex> > w = p->getPatchData(wgt_id);
+         tbox::Pointer<pdat::FaceData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            box = d->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         double pnorm = d_patch_ops.weightedL2Norm(d, w, box, cv);
+
+         norm_squared += pnorm * pnorm;
+      }
+   }
+
+   double global_norm_squared = norm_squared;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&norm_squared, &global_norm_squared, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   return sqrt(global_norm_squared);
+}
+
+double HierarchyFaceDataOpsComplex::RMSNorm(
+   const int data_id,
+   const int vol_id) const
+{
+   double l2_norm = L2Norm(data_id, vol_id);
+
+   double volume = ((vol_id < 0) ? (double)numberOfEntries(data_id, true)
+                    : sumControlVolumes(data_id, vol_id));
+
+   double rms_norm = l2_norm / sqrt(volume);
+   return rms_norm;
+}
+
+double HierarchyFaceDataOpsComplex::weightedRMSNorm(
+   const int data_id,
+   const int wgt_id,
+   const int vol_id) const
+{
+
+   double l2_norm = weightedL2Norm(data_id, wgt_id, vol_id);
+
+   double volume = ((vol_id < 0) ? (double)numberOfEntries(data_id, true)
+                    : sumControlVolumes(data_id, vol_id));
+
+   double rms_norm = l2_norm / sqrt(volume);
+   return rms_norm;
+}
+
+double HierarchyFaceDataOpsComplex::maxNorm(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<dcomplex> > d = p->getPatchData(data_id);
+         tbox::Pointer<pdat::FaceData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            box = d->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         norm = tbox::MathUtilities<double>::Max(norm,
+               d_patch_ops.maxNorm(d, box, cv));
+      }
+   }
+
+   double global_norm = norm;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&norm, &global_norm, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   return global_norm;
+}
+
+dcomplex HierarchyFaceDataOpsComplex::dot(
+   const int data1_id,
+   const int data2_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   dcomplex dprod = dcomplex(0.0, 0.0);
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<dcomplex> > d1 =
+            p->getPatchData(data1_id);
+         tbox::Pointer<pdat::FaceData<dcomplex> > d2 =
+            p->getPatchData(data2_id);
+         tbox::Pointer<pdat::FaceData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d1.isNull());
+#endif
+            box = d1->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         dprod += d_patch_ops.dot(d1, d2, box, cv);
+      }
+   }
+
+   dcomplex global_dot = dprod;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&dprod, &global_dot, 1, MPI_DOUBLE_COMPLEX, MPI_SUM);
+   }
+   return global_dot;
+}
+
+dcomplex HierarchyFaceDataOpsComplex::integral(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   dcomplex local_integral = dcomplex(0.0, 0.0);
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<dcomplex> > data =
+            p->getPatchData(data_id);
+         tbox::Pointer<pdat::FaceData<double> > vol = p->getPatchData(vol_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!data.isNull());
+         TBOX_ASSERT(!vol.isNull());
+#endif
+
+         hier::Box box = data->getGhostBox();
+
+         local_integral += d_patch_ops.integral(data, box, vol);
+      }
+   }
+
+   dcomplex global_integral = local_integral;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&local_integral, &global_integral, 1, MPI_DOUBLE_COMPLEX, MPI_SUM);
+   }
+   return global_integral;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyFaceDataOpsComplex.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyFaceDataOpsComplex.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,420 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for complex face data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyFaceDataOpsComplex
+#define included_math_HierarchyFaceDataOpsComplex
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/math/HierarchyDataOpsComplex.h"
+#include "SAMRAI/math/PatchFaceDataOpsComplex.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class HierarchyFaceDataOpsComplex provides a collection of
+ * operations that manipulate complex face-centered patch data components over
+ * multiple levels in an AMR hierarchy.  It is derived from the abstract
+ * base class HierarchyDataOpsComplex which defines the interface to
+ * similar operations for face-centered, face-centered, face-centered patch
+ * data objects where the data is complex.   The operations include basic
+ * arithmetic and norms.  On each patch, the operations are performed by the
+ * PatchFaceDataOpsComplex data member.
+ *
+ * The patch hierarchy and set of levels within that hierarcy over which the
+ * operations will be performed are set in the constructor.  However, note
+ * that the constructor accepts default arguments for the coarsest and finest
+ * level numbers.  If the level numbers are not specified when calling the
+ * constructor the levels which exist in the hierarchy will be assumed in
+ * all operations.  The hierarchy and levels may be changed at any time using
+ * the proper member functions.
+ *
+ * Note that, when it makes sense, an operation accept a boolean argument
+ * which indicates whether the operation should be performed on all of the
+ * data or just those data elements corresponding to the patch interiors.
+ * If no boolean argument is provided, the default behavior is to treat only
+ * the patch interiors.  Also, a similar set of operations for real (double
+ * and float) and integer face-centered data is provided in the classes
+ * HierarchyFaceDataOpsReal and HierarchyFaceDataOpsInteger,
+ * respectively.
+ *
+ * @see math::PatchFaceDataOpsComplex
+ */
+
+class HierarchyFaceDataOpsComplex:public HierarchyDataOpsComplex
+{
+public:
+   /**
+    * The constructor for the HierarchyFaceDataOpsComplex class sets
+    * the default patch hierarchy and coarsest and finest patch levels
+    * in that hierarchy over which operations will be performed.  The
+    * hierarchy and operations may be reset using the member fuctions
+    * setPatchHierarchy() and resetLevels() below.  If no level number
+    * arguments are given here, the levels over which the operations will
+    * be performed are those already existing in the hierarchy.  If the
+    * hierarchy level configuration changes, the operations must be explicitly
+    * reset by calling the resetLevels() function.
+    */
+   explicit HierarchyFaceDataOpsComplex(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int coarsest_level = -1,
+      const int finest_level = -1);
+
+   /**
+    * Virtual destructor for the HierarchyFaceDataOpsComplex class.
+    */
+   virtual ~HierarchyFaceDataOpsComplex();
+
+   /**
+    * Reset patch hierarchy over which operations occur.
+    */
+   void
+   setPatchHierarchy(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+   /**
+    * Reset range of patch levels over which operations occur.
+    * Levels must exist in hierarchy or an assertion will result.
+    */
+   void
+   resetLevels(
+      const int coarsest_level,
+      const int finest_level);
+
+   /**
+    * Return const pointer to patch hierarchy associated with operations.
+    */
+   const tbox::Pointer<hier::PatchHierarchy>
+   getPatchHierarchy() const;
+
+   /**
+    * Copy source data to destination data.
+    */
+   void
+   copyData(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Swap data pointers (i.e., storage) between two data components.
+    */
+   void
+   swapData(
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data over multiple levels to specified output stream.
+    */
+   void
+   printData(
+      const int data_id,
+      std::ostream& s,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data component to given scalar.
+    */
+   void
+   setToScalar(
+      const int data_id,
+      const dcomplex& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to source multiplied by given scalar, pointwise.
+    */
+   void
+   scale(
+      const int dst_id,
+      const dcomplex& alpha,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Add scalar to each entry in source data and set destination to result.
+    */
+   void
+   addScalar(
+      const int dst_id,
+      const int src_id,
+      const dcomplex& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to sum of two source components, pointwise.
+    */
+   void
+   add(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Subtract second source component from first source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   subtract(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination component to product of two source components, pointwise.
+    */
+   void
+   multiply(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Divide first data component by second source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   divide(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set each entry of destination component to reciprocal of corresponding
+    * source data component entry.
+    */
+   void
+   reciprocal(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + \beta s_2\f$, where \f$d\f$ is the destination patch
+    * data component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha, \beta\f$ are scalar values.
+    */
+   void
+   linearSum(
+      const int dst_id,
+      const dcomplex& alpha,
+      const int src1_id,
+      const dcomplex& beta,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axpy(
+      const int dst_id,
+      const dcomplex& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 - s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axmy(
+      const int dst_id,
+      const dcomplex& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination data to absolute value of source data, pointwise.
+    * Note that the source data must be dcomplex and the destination must
+    * be double.
+    */
+   void
+   abs(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data entries to random values.  See the operations in the
+    * array data operation classes for details on the generation of
+    * the random values.
+    */
+   void
+   setRandomValues(
+      const int data_id,
+      const dcomplex& width,
+      const dcomplex& low,
+      const bool interior_only = true) const;
+
+   /**
+    * Return the total number of data values for the component on the set
+    * of hierarchy levels.  If the boolean argument is true, the number of
+    * elements will be summed over patch interiors in a unique way which
+    * avoids multiple counting of redundant values (recall the definition
+    * of node points on a patch interior).  If the boolean argument is false,
+    * all elements will be counted (including ghost values) over all patches.
+    */
+   int
+   numberOfEntries(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return sum of the control volumes associated with the data component.
+    * Note that if the ontrol volumes are set propery, this is equivalent to
+    * integrating a data component containing all ones over the collection of
+    * hierarchy levels.
+    */
+   double
+   sumControlVolumes(
+      const int data_id,
+      const int vol_id) const;
+
+   /**
+    * Return discrete \f$L_1\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( \sqrt{data_i * \bar{data_i}}*cvol_i )\f$.
+    * If the control volume is undefined (vol_id < 0), the
+    * return value is \f$\sum_i ( \sqrt{data_i * \bar{data_i}} )\f$.
+    */
+   double
+   L1Norm(
+      const int data_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete \f$L_2\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum
+    * \f$\sqrt{ \sum_i ( data_i * \bar{data_i} cvol_i ) }\f$.
+    * If the control volume is undefined (vol_id < 0), the return value is
+    * \f$\sqrt{ \sum_i ( data_i * \bar{data_i} ) }\f$.
+    */
+   double
+   L2Norm(
+      const int data_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete weighted \f$L_2\f$-norm of the data using the control
+    * volume to weight the contribution of the data and weight entries to
+    * the sum.  That is, the return value is the sum \f$\sqrt{ \sum_i (
+    * (data_i * wgt_i) * \bar{(data_i * wgt_i)} cvol_i ) }\f$.  If the control
+    * volume is undefined (vol_id < 0), the return value is
+    * \f$\sqrt{ \sum_i ( (data_i * wgt_i) * \bar{(data_i * wgt_i)} cvol_i ) }\f$.
+    */
+   double
+   weightedL2Norm(
+      const int data_id,
+      const int weight_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete root mean squared norm of the data.  If the control
+    * volume is specified (vol_id >= 0), the return value is the \f$L_2\f$-norm
+    * divided by the square root of the sum of the control volumes.  Otherwise,
+    * the return value is the \f$L_2\f$-norm divided by the square root of the
+    * number of data entries.
+    */
+   double
+   RMSNorm(
+      const int data_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete weighted root mean squared norm of the data.  If the
+    * control volume is specified (vol_id >= 0), the return value is the
+    * weighted \f$L_2\f$-norm divided by the square root of the sum of the
+    * control volumes.  Otherwise, the return value is the weighted \f$L_2\f$-norm
+    * divided by the square root of the number of data entries.
+    */
+   double
+   weightedRMSNorm(
+      const int data_id,
+      const int weight_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return the \f$\max\f$-norm of the data using the control volume to weight
+    * the contribution of each data entry to the maximum.  That is, the return
+    * value is \f$\max_i ( \sqrt{data_i * \bar{data_i}} )\f$, where the max is
+    * over the data elements where \f$cvol_i > 0\f$.  If the control volume is
+    * undefined (vol_id < 0), it is ignored during the computation of the
+    * maximum.
+    */
+   double
+   maxNorm(
+      const int data_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return the dot product of the two data arrays using the control volume
+    * to weight the contribution of each product to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( data1_i * \bar{data2_i} * cvol_i )\f$.
+    * If the control volume is undefined (vol_id < 0), it is ignored during
+    * the summation.
+    */
+   dcomplex
+   dot(
+      const int data1_id,
+      const int data2_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return the integral of the function represented by the data array.
+    * The return value is the sum \f$\sum_i ( data_i * vol_i )\f$.
+    */
+   dcomplex
+   integral(
+      const int data_id,
+      const int vol_id) const;
+
+private:
+   // The following are not implemented
+   HierarchyFaceDataOpsComplex(
+      const HierarchyFaceDataOpsComplex&);
+   void
+   operator = (
+      const HierarchyFaceDataOpsComplex&);
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+   int d_coarsest_level;
+   int d_finest_level;
+   tbox::Array<tbox::Array<hier::BoxList> > d_nonoverlapping_face_boxes[tbox::
+                                                                        Dimension
+                                                                        ::
+                                                                        MAXIMUM_DIMENSION_VALUE
+   ];
+
+   PatchFaceDataOpsComplex d_patch_ops;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyFaceDataOpsInteger.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyFaceDataOpsInteger.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,767 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for integer face data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyFaceDataOpsInteger_C
+#define included_math_HierarchyFaceDataOpsInteger_C
+
+#include "SAMRAI/math/HierarchyFaceDataOpsInteger.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/BoxUtilities.h"
+#include "SAMRAI/pdat/FaceDataFactory.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#include <typeinfo>
+#include <stdlib.h>
+#include <float.h>
+#include <math.h>
+
+namespace SAMRAI {
+namespace math {
+
+HierarchyFaceDataOpsInteger::HierarchyFaceDataOpsInteger(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level):
+   HierarchyDataOpsInteger()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+#endif
+   d_hierarchy = hierarchy;
+   if ((coarsest_level < 0) || (finest_level < 0)) {
+      if (d_hierarchy->getNumberOfLevels() == 0) {
+         d_coarsest_level = coarsest_level;
+         d_finest_level = finest_level;
+      } else {
+         resetLevels(0, d_hierarchy->getFinestLevelNumber());
+      }
+   } else {
+      resetLevels(coarsest_level, finest_level);
+   }
+}
+
+HierarchyFaceDataOpsInteger::~HierarchyFaceDataOpsInteger()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Rotuines to set the hierarchy and level information.                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HierarchyFaceDataOpsInteger::setPatchHierarchy(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+
+   d_hierarchy = hierarchy;
+}
+
+void HierarchyFaceDataOpsInteger::resetLevels(
+   const int coarsest_level,
+   const int finest_level)
+{
+   int i;
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (finest_level >= coarsest_level)
+      && (finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   const tbox::Dimension& dim(d_hierarchy->getDim());
+
+   d_coarsest_level = coarsest_level;
+   d_finest_level = finest_level;
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      d_nonoverlapping_face_boxes[d].resizeArray(d_finest_level + 1);
+   }
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      hier::BoxArray face_boxes(dim);
+      const int n = level->getNumberOfPatches();
+
+      for (int nd = 0; nd < dim.getValue(); nd++) {
+         face_boxes = level->getBoxes();
+         for (i = 0; i < n; i++) {
+            face_boxes[i] =
+               pdat::FaceGeometry::toFaceBox(face_boxes[i], nd);
+         }
+         hier::BoxUtilities::makeNonOverlappingBoxLists(
+            d_nonoverlapping_face_boxes[nd][ln],
+            face_boxes);
+      }
+   }
+}
+
+const tbox::Pointer<hier::PatchHierarchy>
+HierarchyFaceDataOpsInteger::getPatchHierarchy() const
+{
+   return d_hierarchy;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic operations.                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int HierarchyFaceDataOpsInteger::numberOfEntries(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+   const tbox::Dimension& dim(d_hierarchy->getDim());
+
+   int entries = 0;
+
+   if (interior_only) {
+
+      tbox::Pointer<pdat::FaceDataFactory<int> >
+      dfact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!dfact.isNull());
+#endif
+
+      for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+         const int npatches = level->getNumberOfPatches();
+#ifdef DEBUG_CHECK_ASSERTIONS
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            TBOX_ASSERT(npatches == d_nonoverlapping_face_boxes[nd][ln].getSize());
+         }
+#endif
+         for (int il = 0; il < npatches; il++) {
+            tbox::List<hier::Box>::Iterator lb;
+            for (int eb = 0; eb < dim.getValue(); eb++) {
+               lb = ((d_nonoverlapping_face_boxes[eb][ln])[il]).listStart();
+               for ( ; lb; lb++) {
+                  entries += lb().size();
+               }
+            }
+         }
+      }
+
+      entries *= dfact->getDepth();
+
+   } else {
+
+      for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::Pointer<pdat::FaceData<int> > d =
+               (*ip)->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            entries += d_patch_ops.numberOfEntries(d, d->getGhostBox());
+         }
+      }
+
+      int global_entries = entries;
+      if (mpi.getSize() > 1) {
+         mpi.Allreduce(&global_entries, &entries, 1, MPI_INT, MPI_SUM);
+      }
+      entries = global_entries;
+
+   }
+
+   return entries;
+}
+
+void HierarchyFaceDataOpsInteger::copyData(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<int> > s = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.copyData(d, s, box);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsInteger::swapData(
+   const int data1_id,
+   const int data2_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   tbox::Pointer<pdat::FaceDataFactory<int> >
+   d1fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data1_id);
+   TBOX_ASSERT(!d1fact.isNull());
+   tbox::Pointer<pdat::FaceDataFactory<int> >
+   d2fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data2_id);
+   TBOX_ASSERT(!d2fact.isNull());
+   TBOX_ASSERT(d1fact->getDepth() == d2fact->getDepth());
+   TBOX_ASSERT(d1fact->getGhostCellWidth() == d2fact->getGhostCellWidth());
+#endif
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         d_patch_ops.swapData(p, data1_id, data2_id);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsInteger::printData(
+   const int data_id,
+   std::ostream& s,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   s << "Patch descriptor id = " << data_id << std::endl;
+   s << "Factory = " << typeid(*d_hierarchy->getPatchDescriptor()->
+                               getPatchDataFactory(data_id)).name()
+     << std::endl;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      s << "Level number = " << ln << std::endl;
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<int> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.printData(d, box, s);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsInteger::setToScalar(
+   const int data_id,
+   const int& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<int> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.setToScalar(d, alpha, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic arithmetic operations.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HierarchyFaceDataOpsInteger::scale(
+   const int dst_id,
+   const int& alpha,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<int> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<int> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.scale(dst, alpha, src, box);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsInteger::addScalar(
+   const int dst_id,
+   const int src_id,
+   const int& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<int> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<int> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.addScalar(dst, src, alpha, box);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsInteger::add(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::FaceData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.add(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsInteger::subtract(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::FaceData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.subtract(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsInteger::multiply(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::FaceData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.multiply(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsInteger::divide(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::FaceData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.divide(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsInteger::reciprocal(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<int> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.reciprocal(d, src, box);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsInteger::linearSum(
+   const int dst_id,
+   const int& alpha,
+   const int src1_id,
+   const int& beta,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::FaceData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.linearSum(d, alpha, s1, beta, s2, box);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsInteger::axpy(
+   const int dst_id,
+   const int& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::FaceData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.axpy(d, alpha, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsInteger::axmy(
+   const int dst_id,
+   const int& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::FaceData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.axmy(d, alpha, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyFaceDataOpsInteger::abs(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<int> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.abs(d, src, box);
+      }
+   }
+}
+
+int HierarchyFaceDataOpsInteger::min(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int minval = tbox::MathUtilities<int>::getMax();
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<int> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         minval = tbox::MathUtilities<int>::Min(minval,
+               d_patch_ops.min(d, box));
+      }
+   }
+
+   int global_min = minval;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&minval, &global_min, 1, MPI_INT, MPI_MIN);
+   }
+   return global_min;
+}
+
+int HierarchyFaceDataOpsInteger::max(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int maxval = -(tbox::MathUtilities<int>::getMax());
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<int> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         maxval = tbox::MathUtilities<int>::Max(maxval,
+               d_patch_ops.min(d, box));
+      }
+   }
+
+   int global_max = maxval;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&maxval, &global_max, 1, MPI_INT, MPI_MAX);
+   }
+   return global_max;
+}
+
+void HierarchyFaceDataOpsInteger::setRandomValues(
+   const int data_id,
+   const int& width,
+   const int& low,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<int> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.setRandomValues(d, width, low, box);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyFaceDataOpsInteger.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyFaceDataOpsInteger.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,323 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for integer face data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyFaceDataOpsInteger
+#define included_math_HierarchyFaceDataOpsInteger
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/math/HierarchyDataOpsInteger.h"
+#include "SAMRAI/math/PatchFaceDataOpsInteger.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class HierarchyFaceDataOpsInteger provides a collection of
+ * operations that manipulate integer face-centered patch data components over
+ * multiple levels in an AMR hierarchy.  It is derived from the abstract
+ * base class HierarchyDataOpsInteger which defines the interface to
+ * similar operations for face-centered, face-centered, face-centered patch
+ * data objects where the data is of type integer.  The operations include
+ * basic arithmetic and some ordering operations.  On each patch, the
+ * operations are performed by the PatchFaceDataOpsInteger data member.
+ *
+ * The patch hierarchy and set of levels within that hierarcy over which the
+ * operations will be performed are set in the constructor.  However, note
+ * that the constructor accepts default arguments for the coarsest and finest
+ * level numbers.  If the level numbers are not specified when calling the
+ * constructor the levels which exist in the hierarchy will be assumed in
+ * all operations.  The hierarchy and levels may be changed at any time using
+ * the proper member functions.
+ *
+ * Note that, when it makes sense, an operation accept a boolean argument
+ * which indicates whether the operation should be performed on all of the
+ * data or just those data elements corresponding to the patch interiors.
+ * If no boolean argument is provided, the default behavior is to treat only
+ * the patch interiors.  Also, a similar set of operations for real (double
+ * and float) and complex face-centered data is provided in the classes
+ * HierarchyFaceDataOpsReal and HierarchyFaceDataOpsComplex,
+ * respectively.
+ *
+ * @see math::PatchFaceDataOpsInteger
+ */
+
+class HierarchyFaceDataOpsInteger:public HierarchyDataOpsInteger
+{
+public:
+   /**
+    * The constructor for the HierarchyFaceDataOpsInteger class sets
+    * the default patch hierarchy and coarsest and finest patch levels
+    * in that hierarchy over which operations will be performed.  The
+    * hierarchy and operations may be reset using the member fuctions
+    * setPatchHierarchy() and resetLevels() below.  If no level number
+    * arguments are given here, the levels over which the operations will
+    * be performed are those already existing in the hierarchy.  If the
+    * hierarchy level configuration changes, the operations must be explicitly
+    * reset by calling the resetLevels() function.
+    */
+   explicit HierarchyFaceDataOpsInteger(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int coarsest_level = -1,
+      const int finest_level = -1);
+
+   /**
+    * Virtual destructor for the HierarchyFaceDataOpsInteger class.
+    */
+   virtual ~HierarchyFaceDataOpsInteger();
+
+   /**
+    * Reset patch hierarchy over which operations occur.
+    */
+   void
+   setPatchHierarchy(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+   /**
+    * Reset range of patch levels over which operations occur.
+    * Levels must exist in hierarchy or an assertion will result.
+    */
+   void
+   resetLevels(
+      const int coarsest_level,
+      const int finest_level);
+
+   /**
+    * Return const pointer to patch hierarchy associated with operations.
+    */
+   const tbox::Pointer<hier::PatchHierarchy>
+   getPatchHierarchy() const;
+
+   /**
+    * Return the total number of data values for the component on the set
+    * of hierarchy levels.  If the boolean argument is true, the number of
+    * elements will be summed over patch interiors in a unique way which
+    * avoids multiple counting of redundant values (recall the definition
+    * of node points on a patch interior).  If the boolean argument is false,
+    * all elements will be counted (including ghost values) over all patches.
+    */
+   int
+   numberOfEntries(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Copy source data to destination data.
+    */
+   void
+   copyData(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Swap data pointers (i.e., storage) between two data components.
+    */
+   void
+   swapData(
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data over multiple levels to specified output stream.
+    */
+   void
+   printData(
+      const int data_id,
+      std::ostream& s,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data component to given scalar.
+    */
+   void
+   setToScalar(
+      const int data_id,
+      const int& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to source multiplied by given scalar, pointwise.
+    */
+   void
+   scale(
+      const int dst_id,
+      const int& alpha,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Add scalar to each entry in source data and set destination to result.
+    */
+   void
+   addScalar(
+      const int dst_id,
+      const int src_id,
+      const int& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to sum of two source components, pointwise.
+    */
+   void
+   add(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Subtract second source component from first source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   subtract(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination component to product of two source components, pointwise.
+    */
+   void
+   multiply(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Divide first data component by second source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   divide(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set each entry of destination component to reciprocal of corresponding
+    * source data component entry.
+    */
+   void
+   reciprocal(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + \beta s_2\f$, where \f$d\f$ is the destination patch
+    * data component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha, \beta\f$ are scalar values.
+    */
+   void
+   linearSum(
+      const int dst_id,
+      const int& alpha,
+      const int src1_id,
+      const int& beta,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axpy(
+      const int dst_id,
+      const int& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 - s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axmy(
+      const int dst_id,
+      const int& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination data to absolute value of source data, pointwise.
+    */
+   void
+   abs(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return minimum data value over all patches in the collection of levels.
+    */
+   int
+   min(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return maximum data value over all patches in the collection of levels.
+    */
+   int
+   max(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data entries to random values.  See the operations in the
+    * array data operation classes for details on the generation of
+    * the random values.
+    */
+   void
+   setRandomValues(
+      const int data_id,
+      const int& width,
+      const int& low,
+      const bool interior_only = true) const;
+
+private:
+   // The following are not implemented
+   HierarchyFaceDataOpsInteger(
+      const HierarchyFaceDataOpsInteger&);
+   void
+   operator = (
+      const HierarchyFaceDataOpsInteger&);
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+   int d_coarsest_level;
+   int d_finest_level;
+   tbox::Array<tbox::Array<hier::BoxList> > d_nonoverlapping_face_boxes[tbox::
+                                                                        Dimension
+                                                                        ::
+                                                                        MAXIMUM_DIMENSION_VALUE
+   ];
+
+   PatchFaceDataOpsInteger d_patch_ops;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyFaceDataOpsReal.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyFaceDataOpsReal.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1351 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations for real face data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyFaceDataOpsReal_C
+#define included_math_HierarchyFaceDataOpsReal_C
+
+#include "SAMRAI/math/HierarchyFaceDataOpsReal.h"
+#include "SAMRAI/hier/BoxUtilities.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/pdat/FaceDataFactory.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include <typeinfo>
+#include <stdlib.h>
+#include <float.h>
+#include <math.h>
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+HierarchyFaceDataOpsReal<TYPE>::HierarchyFaceDataOpsReal(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level):
+   HierarchyDataOpsReal<TYPE>()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+#endif
+   d_hierarchy = hierarchy;
+   if ((coarsest_level < 0) || (finest_level < 0)) {
+      if (d_hierarchy->getNumberOfLevels() == 0) {
+         d_coarsest_level = coarsest_level;
+         d_finest_level = finest_level;
+      } else {
+         resetLevels(0, d_hierarchy->getFinestLevelNumber());
+      }
+   } else {
+      resetLevels(coarsest_level, finest_level);
+   }
+}
+
+template<class TYPE>
+HierarchyFaceDataOpsReal<TYPE>::~HierarchyFaceDataOpsReal()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to set the hierarchy and level informtation.                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void HierarchyFaceDataOpsReal<TYPE>::setPatchHierarchy(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+
+   d_hierarchy = hierarchy;
+}
+
+template<class TYPE>
+void HierarchyFaceDataOpsReal<TYPE>::resetLevels(
+   const int coarsest_level,
+   const int finest_level)
+{
+   int i;
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (finest_level >= coarsest_level)
+      && (finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   const tbox::Dimension& dim(d_hierarchy->getDim());
+
+   d_coarsest_level = coarsest_level;
+   d_finest_level = finest_level;
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      d_nonoverlapping_face_boxes[d].resizeArray(d_finest_level + 1);
+   }
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      hier::BoxArray face_boxes(dim);
+      const int n = level->getNumberOfPatches();
+
+      for (int nd = 0; nd < dim.getValue(); nd++) {
+         face_boxes = level->getBoxes();
+         for (i = 0; i < n; i++) {
+            face_boxes[i] =
+               pdat::FaceGeometry::toFaceBox(face_boxes[i], nd);
+         }
+         hier::BoxUtilities::makeNonOverlappingBoxLists(
+            d_nonoverlapping_face_boxes[nd][ln],
+            face_boxes);
+      }
+   }
+}
+
+template<class TYPE>
+const tbox::Pointer<hier::PatchHierarchy>
+HierarchyFaceDataOpsReal<TYPE>::getPatchHierarchy() const
+{
+   return d_hierarchy;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The following are private and cannot be used, but they are defined    *
+ * here for compilers that require that every template declaration have  *
+ * a definition (a stupid requirement, if you ask me).                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+HierarchyFaceDataOpsReal<TYPE>::HierarchyFaceDataOpsReal(
+   const HierarchyFaceDataOpsReal<TYPE>& foo):
+   HierarchyDataOpsReal<TYPE>()
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void HierarchyFaceDataOpsReal<TYPE>::operator = (
+   const HierarchyFaceDataOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic operations.                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void HierarchyFaceDataOpsReal<TYPE>::copyData(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<TYPE> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.copyData(dst, src, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyFaceDataOpsReal<TYPE>::swapData(
+   const int data1_id,
+   const int data2_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   tbox::Pointer<pdat::FaceDataFactory<TYPE> >
+   d1fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data1_id);
+   TBOX_ASSERT(!d1fact.isNull());
+   tbox::Pointer<pdat::FaceDataFactory<TYPE> >
+   d2fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data2_id);
+   TBOX_ASSERT(!d2fact.isNull());
+   TBOX_ASSERT(d1fact->getDepth() == d2fact->getDepth());
+   TBOX_ASSERT(d1fact->getGhostCellWidth() == d2fact->getGhostCellWidth());
+#endif
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         d_patch_ops.swapData(p, data1_id, data2_id);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyFaceDataOpsReal<TYPE>::printData(
+   const int data_id,
+   std::ostream& s,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   s << "Patch descriptor id = " << data_id << std::endl;
+   s << "Factory = " << typeid(*d_hierarchy->getPatchDescriptor()->
+                               getPatchDataFactory(data_id)).name()
+     << std::endl;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      s << "Level number = " << ln << std::endl;
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.printData(d, box, s);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyFaceDataOpsReal<TYPE>::setToScalar(
+   const int data_id,
+   const TYPE& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.setToScalar(d, alpha, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic arithmetic operations.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void HierarchyFaceDataOpsReal<TYPE>::scale(
+   const int dst_id,
+   const TYPE& alpha,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<TYPE> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.scale(dst, alpha, src, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyFaceDataOpsReal<TYPE>::addScalar(
+   const int dst_id,
+   const int src_id,
+   const TYPE& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<TYPE> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.addScalar(dst, src, alpha, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyFaceDataOpsReal<TYPE>::add(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::FaceData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.add(dst, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyFaceDataOpsReal<TYPE>::subtract(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::FaceData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.subtract(dst, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyFaceDataOpsReal<TYPE>::multiply(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::FaceData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.multiply(dst, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyFaceDataOpsReal<TYPE>::divide(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::FaceData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.divide(dst, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyFaceDataOpsReal<TYPE>::reciprocal(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<TYPE> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.reciprocal(dst, src, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyFaceDataOpsReal<TYPE>::linearSum(
+   const int dst_id,
+   const TYPE& alpha,
+   const int src1_id,
+   const TYPE& beta,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::FaceData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.linearSum(dst, alpha, src1, beta, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyFaceDataOpsReal<TYPE>::axpy(
+   const int dst_id,
+   const TYPE& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::FaceData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.axpy(dst, alpha, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyFaceDataOpsReal<TYPE>::axmy(
+   const int dst_id,
+   const TYPE& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::FaceData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.axmy(dst, alpha, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyFaceDataOpsReal<TYPE>::abs(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<TYPE> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.abs(dst, src, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyFaceDataOpsReal<TYPE>::setRandomValues(
+   const int data_id,
+   const TYPE& width,
+   const TYPE& low,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > data = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!data.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : data->getGhostBox());
+
+         d_patch_ops.setRandomValues(data, width, low, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Generic norm and order operations.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+int HierarchyFaceDataOpsReal<TYPE>::numberOfEntries(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   const tbox::Dimension& dim(d_hierarchy->getDim());
+
+   int entries = 0;
+
+   if (interior_only) {
+
+      tbox::Pointer<pdat::FaceDataFactory<TYPE> >
+      dfact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!dfact.isNull());
+#endif
+
+      for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+         const int npatches = level->getNumberOfPatches();
+#ifdef DEBUG_CHECK_ASSERTIONS
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            TBOX_ASSERT(npatches == d_nonoverlapping_face_boxes[nd][ln].getSize());
+         }
+#endif
+         for (int il = 0; il < npatches; il++) {
+            tbox::List<hier::Box>::Iterator lb;
+            for (int eb = 0; eb < dim.getValue(); eb++) {
+               lb = ((d_nonoverlapping_face_boxes[eb][ln])[il]).listStart();
+               for ( ; lb; lb++) {
+                  entries += lb().size();
+               }
+            }
+         }
+      }
+
+      entries *= dfact->getDepth();
+
+   } else {
+
+      for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::Pointer<pdat::FaceData<TYPE> > d =
+               (*ip)->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            entries += d_patch_ops.numberOfEntries(d, d->getGhostBox());
+         }
+      }
+
+      int global_entries = entries;
+      if (mpi.getSize() > 1) {
+         mpi.Allreduce(&entries, &global_entries, 1, MPI_INT, MPI_SUM);
+      }
+      entries = global_entries;
+
+   }
+
+   return entries;
+}
+
+template<class TYPE>
+double HierarchyFaceDataOpsReal<TYPE>::sumControlVolumes(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(vol_id >= 0);
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double sum = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > data = p->getPatchData(data_id);
+         tbox::Pointer<pdat::FaceData<double> > cv = p->getPatchData(vol_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!cv.isNull());
+#endif
+         hier::Box box = cv->getGhostBox();
+
+         sum += d_patch_ops.sumControlVolumes(data, cv, box);
+      }
+   }
+
+   double global_sum = sum;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&sum, &global_sum, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   return global_sum;
+}
+
+template<class TYPE>
+double HierarchyFaceDataOpsReal<TYPE>::L1Norm(
+   const int data_id,
+   const int vol_id,
+   bool local_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > data = p->getPatchData(data_id);
+         tbox::Pointer<pdat::FaceData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!data.isNull());
+#endif
+            box = data->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         norm += d_patch_ops.L1Norm(data, box, cv);
+      }
+   }
+
+   if (!local_only) {
+      double global_norm = norm;
+      if (mpi.getSize() > 1) {
+         mpi.Allreduce(&norm, &global_norm, 1, MPI_DOUBLE, MPI_SUM);
+      }
+      norm = global_norm;
+   }
+   return norm;
+}
+
+template<class TYPE>
+double HierarchyFaceDataOpsReal<TYPE>::L2Norm(
+   const int data_id,
+   const int vol_id,
+   bool local_only) const
+{
+   double norm_squared = HierarchyFaceDataOpsReal<TYPE>::dot(data_id,
+         data_id,
+         vol_id,
+         local_only);
+
+   return sqrt(norm_squared);
+}
+
+template<class TYPE>
+double HierarchyFaceDataOpsReal<TYPE>::weightedL2Norm(
+   const int data_id,
+   const int wgt_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm_squared = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > data = p->getPatchData(data_id);
+         tbox::Pointer<pdat::FaceData<TYPE> > weight = p->getPatchData(wgt_id);
+         tbox::Pointer<pdat::FaceData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!data.isNull());
+#endif
+            box = data->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         double pnorm = d_patch_ops.weightedL2Norm(data, weight, box, cv);
+
+         norm_squared += pnorm * pnorm;
+      }
+   }
+
+   double global_norm_squared = norm_squared;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&norm_squared, &global_norm_squared, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   return sqrt(global_norm_squared);
+}
+
+template<class TYPE>
+double HierarchyFaceDataOpsReal<TYPE>::RMSNorm(
+   const int data_id,
+   const int vol_id) const
+{
+   double l2_norm = L2Norm(data_id, vol_id);
+
+   double volume = ((vol_id < 0) ? (double)numberOfEntries(data_id, true)
+                    : sumControlVolumes(data_id, vol_id));
+
+   double rms_norm = l2_norm / sqrt(volume);
+   return rms_norm;
+}
+
+template<class TYPE>
+double HierarchyFaceDataOpsReal<TYPE>::weightedRMSNorm(
+   const int data_id,
+   const int wgt_id,
+   const int vol_id) const
+{
+
+   double l2_norm = weightedL2Norm(data_id, wgt_id, vol_id);
+
+   double volume = ((vol_id < 0) ? (double)numberOfEntries(data_id, true)
+                    : sumControlVolumes(data_id, vol_id));
+
+   double rms_norm = l2_norm / sqrt(volume);
+   return rms_norm;
+}
+
+template<class TYPE>
+double HierarchyFaceDataOpsReal<TYPE>::maxNorm(
+   const int data_id,
+   const int vol_id,
+   bool local_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > data = p->getPatchData(data_id);
+         tbox::Pointer<pdat::FaceData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!data.isNull());
+#endif
+            box = data->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         norm = tbox::MathUtilities<double>::Max(norm,
+               d_patch_ops.maxNorm(data, box, cv));
+      }
+   }
+
+   if (!local_only) {
+      double global_norm = norm;
+      if (mpi.getSize() > 1) {
+         mpi.Allreduce(&norm, &global_norm, 1, MPI_DOUBLE, MPI_MAX);
+      }
+      norm = global_norm;
+   }
+   return norm;
+}
+
+template<class TYPE>
+TYPE HierarchyFaceDataOpsReal<TYPE>::dot(
+   const int data1_id,
+   const int data2_id,
+   const int vol_id,
+   bool local_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE dprod = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > data1 = p->getPatchData(data1_id);
+         tbox::Pointer<pdat::FaceData<TYPE> > data2 = p->getPatchData(data2_id);
+         tbox::Pointer<pdat::FaceData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!data1.isNull());
+#endif
+            box = data1->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         dprod += d_patch_ops.dot(data1, data2, box, cv);
+      }
+   }
+
+   if (!local_only) {
+      if (mpi.getSize() > 1) {
+         mpi.AllReduce(&dprod, 1, MPI_SUM);
+      }
+   }
+   return dprod;
+}
+
+template<class TYPE>
+TYPE HierarchyFaceDataOpsReal<TYPE>::integral(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE local_integral = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > data =
+            p->getPatchData(data_id);
+         tbox::Pointer<pdat::FaceData<double> > vol = p->getPatchData(vol_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!data.isNull());
+         TBOX_ASSERT(!vol.isNull());
+#endif
+
+         hier::Box box = data->getGhostBox();
+
+         local_integral += d_patch_ops.integral(data, box, vol);
+      }
+   }
+
+   TYPE global_integral = local_integral;
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&global_integral, 1, MPI_SUM);
+   }
+   return global_integral;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Generic miscellaneous operations for real data.                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+int HierarchyFaceDataOpsReal<TYPE>::computeConstrProdPos(
+   const int data1_id,
+   const int data2_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int test = 1;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > data1 = p->getPatchData(data1_id);
+         tbox::Pointer<pdat::FaceData<TYPE> > data2 = p->getPatchData(data2_id);
+         tbox::Pointer<pdat::FaceData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!data1.isNull());
+#endif
+            box = data1->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         test = tbox::MathUtilities<int>::Min(test,
+               d_patch_ops.computeConstrProdPos(data1, data2, box, cv));
+      }
+   }
+
+   int global_test = test;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&test, &global_test, 1, MPI_INT, MPI_MIN);
+   }
+   return global_test;
+}
+
+template<class TYPE>
+void HierarchyFaceDataOpsReal<TYPE>::compareToScalar(
+   const int dst_id,
+   const int src_id,
+   const TYPE& alpha,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<TYPE> > src = p->getPatchData(src_id);
+         tbox::Pointer<pdat::FaceData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!dst.isNull());
+#endif
+            box = dst->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         d_patch_ops.compareToScalar(dst, src, alpha, box, cv);
+      }
+   }
+}
+
+template<class TYPE>
+int HierarchyFaceDataOpsReal<TYPE>::testReciprocal(
+   const int dst_id,
+   const int src_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int test = 1;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::FaceData<TYPE> > src = p->getPatchData(src_id);
+         tbox::Pointer<pdat::FaceData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!dst.isNull());
+#endif
+            box = dst->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         test = tbox::MathUtilities<int>::Min(test,
+               d_patch_ops.testReciprocal(dst, src, box, cv));
+      }
+   }
+
+   int global_test = test;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&test, &global_test, 1, MPI_INT, MPI_MIN);
+   }
+   return global_test;
+}
+
+template<class TYPE>
+TYPE HierarchyFaceDataOpsReal<TYPE>::maxPointwiseDivide(
+   const int numer_id,
+   const int denom_id,
+   bool local_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE max = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > numer = p->getPatchData(numer_id);
+         tbox::Pointer<pdat::FaceData<TYPE> > denom = p->getPatchData(denom_id);
+
+         hier::Box box = p->getBox();
+
+         max = tbox::MathUtilities<TYPE>::Max(max,
+               d_patch_ops.maxPointwiseDivide(numer, denom, box));
+      }
+   }
+
+   if (!local_only) {
+      if (mpi.getSize() > 1) {
+         mpi.AllReduce(&max, 1, MPI_MAX);
+      }
+   }
+   return max;
+}
+
+template<class TYPE>
+TYPE HierarchyFaceDataOpsReal<TYPE>::minPointwiseDivide(
+   const int numer_id,
+   const int denom_id,
+   bool local_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE min = tbox::MathUtilities<TYPE>::getMax();
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > numer = p->getPatchData(numer_id);
+         tbox::Pointer<pdat::FaceData<TYPE> > denom = p->getPatchData(denom_id);
+
+         hier::Box box = p->getBox();
+
+         min = tbox::MathUtilities<TYPE>::Min(min,
+               d_patch_ops.minPointwiseDivide(numer, denom, box));
+      }
+   }
+
+   if (!local_only) {
+      if (mpi.getSize() > 1) {
+         mpi.AllReduce(&min, 1, MPI_MIN);
+      }
+   }
+   return min;
+}
+
+template<class TYPE>
+TYPE HierarchyFaceDataOpsReal<TYPE>::min(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE minval = tbox::MathUtilities<TYPE>::getMax();
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         minval = tbox::MathUtilities<TYPE>::Min(minval, d_patch_ops.min(d, box));
+      }
+   }
+
+   TYPE global_min = minval;
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&global_min, 1, MPI_MIN);
+   }
+   return global_min;
+}
+
+template<class TYPE>
+TYPE HierarchyFaceDataOpsReal<TYPE>::max(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE maxval = -tbox::MathUtilities<TYPE>::getMax();
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::FaceData<TYPE> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         maxval = tbox::MathUtilities<TYPE>::Max(maxval, d_patch_ops.max(d, box));
+      }
+   }
+
+   TYPE global_max = maxval;
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&global_max, 1, MPI_MAX);
+   }
+   return global_max;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyFaceDataOpsReal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyFaceDataOpsReal.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,525 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations for real face data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyFaceDataOpsReal
+#define included_math_HierarchyFaceDataOpsReal
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/math/HierarchyDataOpsReal.h"
+#include "SAMRAI/math/PatchFaceDataOpsReal.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class HierarchyFaceDataOpsReal provides a collection of operations
+ * that manipulate real (double and float) face-centered patch data components
+ * over multiple levels in an AMR hierarchy.  It is derived from the abstract
+ * base class HierarchyDataOpsReal which defines the interface to
+ * similar operations for face-centered, face-centered, face-centered patch
+ * data objects where the data is either double or float.  The operations
+ * include basic arithmetic, norms and ordering, and assorted miscellaneous
+ * operations.  On each patch, the operations are performed by the
+ * PatchFaceDataOpsReal data member.
+ *
+ * The patch hierarchy and set of levels within that hierarcy over which the
+ * operations will be performed are set in the constructor.  However, note
+ * that the constructor accepts default arguments for the coarsest and finest
+ * level numbers.  If the level numbers are not specified when calling the
+ * constructor the levels which exist in the hierarchy will be assumed in
+ * all operations.  The hierarchy and levels may be changed at any time using
+ * the proper member functions.
+ *
+ * Note that, when it makes sense, an operation accept a boolean argument
+ * which indicates whether the operation should be performed on all of the
+ * data or just those data elements corresponding to the patch interiors.
+ * If no boolean argument is provided, the default behavior is to treat only
+ * the patch interiors.  Also, a similar set of operations for complex and
+ * integer face-centered data is provided in the classes
+ * HierarchyFaceDataOpsComplex and HierarchyFaceDataOpsInteger,
+ * respectively.
+ *
+ * @see math::PatchFaceDataOpsReal
+ */
+
+template<class TYPE>
+class HierarchyFaceDataOpsReal:public HierarchyDataOpsReal<TYPE>
+{
+public:
+   /**
+    * The constructor for the HierarchyFaceDataOpsReal class sets
+    * the default patch hierarchy and coarsest and finest patch levels
+    * in that hierarchy over which operations will be performed.  The
+    * hierarchy and operations may be reset using the member fuctions
+    * setPatchHierarchy() and resetLevels() below.  If no level number
+    * arguments are given here, the levels over which the operations will
+    * be performed are those already existing in the hierarchy.  If the
+    * hierarchy level configuration changes, the operations must be explicitly
+    * reset by calling the resetLevels() function.
+    */
+   explicit HierarchyFaceDataOpsReal(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int coarsest_level = -1,
+      const int finest_level = -1);
+
+   /**
+    * Virtual destructor for the HierarchyFaceDataOpsReal class.
+    */
+   virtual ~HierarchyFaceDataOpsReal<TYPE>();
+
+   /**
+    * Reset patch hierarchy over which operations occur.
+    */
+   void
+   setPatchHierarchy(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+   /**
+    * Reset range of patch levels over which operations occur.
+    * Levels must exist in hierarchy or an assertion will result.
+    */
+   void
+   resetLevels(
+      const int coarsest_level,
+      const int finest_level);
+
+   /**
+    * Return const pointer to patch hierarchy associated with operations.
+    */
+   const tbox::Pointer<hier::PatchHierarchy>
+   getPatchHierarchy() const;
+
+   /**
+    * Copy source data to destination data.
+    */
+   void
+   copyData(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Swap data pointers (i.e., storage) between two data components.
+    */
+   void
+   swapData(
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data over multiple levels to specified output stream.
+    */
+   void
+   printData(
+      const int data_id,
+      std::ostream& s,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data component to given scalar.
+    */
+   void
+   setToScalar(
+      const int data_id,
+      const TYPE& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to source multiplied by given scalar, pointwise.
+    */
+   void
+   scale(
+      const int dst_id,
+      const TYPE& alpha,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Add scalar to each entry in source data and set destination to result.
+    */
+   void
+   addScalar(
+      const int dst_id,
+      const int src_id,
+      const TYPE& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to sum of two source components, pointwise.
+    */
+   void
+   add(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Subtract second source component from first source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   subtract(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination component to product of two source components, pointwise.
+    */
+   void
+   multiply(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Divide first data component by second source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   divide(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set each entry of destination component to reciprocal of corresponding
+    * source data component entry.
+    */
+   void
+   reciprocal(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + \beta s_2\f$, where \f$d\f$ is the destination patch
+    * data component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha, \beta\f$ are scalar values.
+    */
+   void
+   linearSum(
+      const int dst_id,
+      const TYPE& alpha,
+      const int src1_id,
+      const TYPE& beta,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axpy(
+      const int dst_id,
+      const TYPE& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 - s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axmy(
+      const int dst_id,
+      const TYPE& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination data to absolute value of source data, pointwise.
+    */
+   void
+   abs(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return minimum data value over all patches in the collection of levels.
+    */
+   TYPE
+   min(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return maximum data value over all patches in the collection of levels.
+    */
+   TYPE
+   max(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data entries to random values.  See the operations in the
+    * array data operation classes for each data type for details on the
+    * generation of the random values.
+    */
+   void
+   setRandomValues(
+      const int data_id,
+      const TYPE& width,
+      const TYPE& low,
+      const bool interior_only = true) const;
+
+   /**
+    * Return the total number of data values for the component on the set
+    * of hierarchy levels.  If the boolean argument is true, the number of
+    * elements will be summed over patch interiors in a unique way which
+    * avoids multiple counting of redundant values (recall the definition
+    * of node points on a patch interior).  If the boolean argument is false,
+    * all elements will be counted (including ghost values) over all patches.
+    */
+   int
+   numberOfEntries(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return sum of the control volumes associated with the data component.
+    * Note that if the ontrol volumes are set propery, this is equivalent to
+    * integrating a data component containing all ones over the collection of
+    * hierarchy levels.
+    */
+   double
+   sumControlVolumes(
+      const int data_id,
+      const int vol_id) const;
+
+   /**
+    * Return discrete \f$L_1\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( \| data_i \| cvol_i )\f$.  If the
+    * control volume is not defined (vol_id < 0), the return value is
+    * \f$\sum_i ( \| data_i \| )\f$.
+    * If local_only is true, the global reduction is not
+    * performed (thus each process will get only local results).
+    */
+   double
+   L1Norm(
+      const int data_id,
+      const int vol_id = -1,
+      bool local_only = false) const;
+
+   /**
+    * Return discrete \f$L_2\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sqrt{ \sum_i ( (data_i)^2 cvol_i ) }\f$.
+    * If the control volume is  not defined (vol_id < 0), the return value
+    * is \f$\sqrt{ \sum_i ( (data_i)^2 cvol_i ) }\f$.
+    * If local_only is true, the global reduction is not
+    * performed (thus each process will get only local results).
+    */
+   double
+   L2Norm(
+      const int data_id,
+      const int vol_id = -1,
+      bool local_only = false) const;
+
+   /**
+    * Return discrete weighted \f$L_2\f$-norm of the data using the control
+    * volume to weight the contribution of the data and weight entries to
+    * the sum.  That is, the return value is the sum \f$\sqrt{ \sum_i (
+    * (data_i * weight_i)^2 cvol_i ) }\f$.  If the control volume is not defined
+    * (vol_id < 0), the return value is
+    * \f$\sqrt{ \sum_i ( (data_i * weight_i)^2 ) }\f$.
+    */
+   double
+   weightedL2Norm(
+      const int data_id,
+      const int weight_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete root mean squared norm of the data.  If the control
+    * volume is defined, the return value is the \f$L_2\f$-norm divided by
+    * the square root of the sum of the control volumes.  Otherwise, the
+    * return value is the \f$L_2\f$-norm divided by the square root of the
+    * number of data entries.
+    */
+   double
+   RMSNorm(
+      const int data_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete weighted root mean squared norm of the data.  If the
+    * control volume is define, the return value is the weighted \f$L_2\f$-norm
+    * divided by the square root of the sum of the control volumes.  Otherwise,
+    * the return value is the weighted \f$L_2\f$-norm divided by the square root
+    * of the number of data entries.
+    */
+   double
+   weightedRMSNorm(
+      const int data_id,
+      const int weight_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return the \f$\max\f$-norm of the data using the control volume to weight
+    * the contribution of each data entry to the maximum.  That is, the return
+    * value is \f$\max_i ( \| data_i \| )\f$, where the max is over the data
+    * elements where \f$cvol_i > 0\f$.  If the control volume is undefined
+    * (vol_id < 0), it is ignored during the computation of the maximum.
+    * If local_only is true, the global reduction is not
+    * performed (thus each process will get only local results).
+    */
+   double
+   maxNorm(
+      const int data_id,
+      const int vol_id = -1,
+      bool local_only = false) const;
+
+   /**
+    * Return the dot product of the two data arrays using the control volume
+    * to weight the contribution of each product to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( data1_i * data2_i * cvol_i )\f$.
+    * If the control volume is undefined (vol_id < 0), it is ignored during
+    * the summation.  If local_only is true, the global reduction is not
+    * performed (thus each process will get only local results).
+    */
+   TYPE
+   dot(
+      const int data1_id,
+      const int data2_id,
+      const int vol_id = -1,
+      bool local_only = false) const;
+
+   /**
+    * Return the integral of the function represented by the data array.
+    * The return value is the sum \f$\sum_i ( data_i * vol_i )\f$.
+    */
+   TYPE
+   integral(
+      const int data_id,
+      const int vol_id) const;
+
+   /**
+    * Return 1 if \f$\|data2_i\| > 0\f$ and \f$data1_i * data2_i \leq 0\f$, for
+    * any \f$i\f$ in the set of patch data indices, where \f$cvol_i > 0\f$.  Otherwise,
+    * return 0.  If the control volume is undefined (vol_id < 0), all values
+    * on the patch interiors are considered.
+    */
+   int
+   computeConstrProdPos(
+      const int data1_id,
+      const int data2_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Wherever \f$cvol_i > 0\f$ in the set of patch data indices, set \f$dst_i = 1\f$
+    * if \f$\|src_i\| > \alpha\f$, and \f$dst_i = 0\f$ otherwise.  If the control
+    * volume is undefined (vol_id < 0), all values on the patch interiors
+    * are considered.
+    */
+   void
+   compareToScalar(
+      const int dst_id,
+      const int src_id,
+      const TYPE& alpha,
+      const int vol_id = -1) const;
+
+   /**
+    * Wherever \f$cvol_i > 0\f$ in the set of patch data indices, set
+    * \f$dst_i = 1/src_i\f$ if \f$src_i \neq 0\f$, and \f$dst_i = 0\f$ otherwise.
+    * If \f$dst_i = 0\f$ anywhere, 0 is the return value.  Otherwise 1 is returned.
+    * If the control volume is undefined (vol_id < 0), all values on the
+    * patch interiors are considered.
+    */
+   int
+   testReciprocal(
+      const int dst_id,
+      const int src_id,
+      const int vol_id = -1) const;
+
+   /*!
+    * @brief Compute max of "conditional" quotients of two arrays.
+    *
+    * Return the maximum of pointwise "conditional" quotients of the numerator
+    * and denominator.
+    *
+    * The "conditional" quotient is defined as |numerator/denominator|
+    * where the denominator is nonzero.  Otherwise, it is defined as
+    * |numerator|.
+    *
+    * @b Note: This method is currently intended to support the
+    * PETSc-2.1.6 vector wrapper only.  Please do not use it!
+    */
+   TYPE
+   maxPointwiseDivide(
+      const int numer_id,
+      const int denom_id,
+      bool local_only = false) const;
+
+   /*!
+    * @brief Compute min of quotients of two arrays.
+    *
+    * Return the minimum of pointwise quotients of the numerator
+    * and denominator.
+    *
+    * The quotient is defined as (numerator/denominator)
+    * where the denominator is nonzero.  When the denominator is zero, the
+    * entry is skipped.  If the denominator is always zero, the value of
+    * tbox_IEEE::getFLT_MAX() is returned (see @ref SAMRAI::tbox::IEEE).
+    *
+    * @b Note: This method is currently intended to support the
+    * SUNDIALS vector wrapper only.  Please do not use it!
+    */
+   TYPE
+   minPointwiseDivide(
+      const int numer_id,
+      const int denom_id,
+      bool local_only = false) const;
+
+private:
+   // The following are not implemented
+   HierarchyFaceDataOpsReal(
+      const HierarchyFaceDataOpsReal<TYPE>&);
+   void
+   operator = (
+      const HierarchyFaceDataOpsReal<TYPE>&);
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+   int d_coarsest_level;
+   int d_finest_level;
+   tbox::Array<tbox::Array<hier::BoxList> > d_nonoverlapping_face_boxes[tbox::
+                                                                        Dimension
+                                                                        ::
+                                                                        MAXIMUM_DIMENSION_VALUE];
+
+   PatchFaceDataOpsReal<TYPE> d_patch_ops;
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/HierarchyFaceDataOpsReal.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyNodeDataOpsComplex.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyNodeDataOpsComplex.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,979 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for complex node data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyNodeDataOpsComplex_C
+#define included_math_HierarchyNodeDataOpsComplex_C
+
+#include "SAMRAI/math/HierarchyNodeDataOpsComplex.h"
+#include "SAMRAI/hier/BoxUtilities.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/pdat/NodeDataFactory.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include <typeinfo>
+#include <stdlib.h>
+#include <float.h>
+#include <math.h>
+
+namespace SAMRAI {
+namespace math {
+
+HierarchyNodeDataOpsComplex::HierarchyNodeDataOpsComplex(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level):
+   HierarchyDataOpsComplex()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+#endif
+   d_hierarchy = hierarchy;
+   if ((coarsest_level < 0) || (finest_level < 0)) {
+      if (d_hierarchy->getNumberOfLevels() == 0) {
+         d_coarsest_level = coarsest_level;
+         d_finest_level = finest_level;
+      } else {
+         resetLevels(0, d_hierarchy->getFinestLevelNumber());
+      }
+   } else {
+      resetLevels(coarsest_level, finest_level);
+   }
+}
+
+HierarchyNodeDataOpsComplex::~HierarchyNodeDataOpsComplex()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to set the hierarchy and level information.                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HierarchyNodeDataOpsComplex::setPatchHierarchy(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+
+   d_hierarchy = hierarchy;
+}
+
+void HierarchyNodeDataOpsComplex::resetLevels(
+   const int coarsest_level,
+   const int finest_level)
+{
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (finest_level >= coarsest_level)
+      && (finest_level <= d_hierarchy->getFinestLevelNumber()));
+
+   d_coarsest_level = coarsest_level;
+   d_finest_level = finest_level;
+
+   d_nonoverlapping_node_boxes.resizeArray(d_finest_level + 1);
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      hier::BoxArray node_boxes = level->getBoxes();
+
+      const int n = node_boxes.getNumberOfBoxes();
+      for (int i = 0; i < n; i++) {
+         node_boxes[i] =
+            pdat::NodeGeometry::toNodeBox(node_boxes[i]);
+      }
+      hier::BoxUtilities::makeNonOverlappingBoxLists(
+         d_nonoverlapping_node_boxes[ln],
+         node_boxes);
+   }
+}
+
+const tbox::Pointer<hier::PatchHierarchy>
+HierarchyNodeDataOpsComplex::getPatchHierarchy() const
+{
+   return d_hierarchy;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic operations.                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HierarchyNodeDataOpsComplex::copyData(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<dcomplex> > s = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.copyData(d, s, box);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsComplex::swapData(
+   const int data1_id,
+   const int data2_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   tbox::Pointer<pdat::NodeDataFactory<dcomplex> >
+   d1fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data1_id);
+   TBOX_ASSERT(!d1fact.isNull());
+   tbox::Pointer<pdat::NodeDataFactory<dcomplex> >
+   d2fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data2_id);
+   TBOX_ASSERT(!d2fact.isNull());
+   TBOX_ASSERT(d1fact->getDepth() == d2fact->getDepth());
+   TBOX_ASSERT(d1fact->getGhostCellWidth() == d2fact->getGhostCellWidth());
+#endif
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         d_patch_ops.swapData(p, data1_id, data2_id);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsComplex::printData(
+   const int data_id,
+   std::ostream& s,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   s << "Patch descriptor id = " << data_id << std::endl;
+   s << "Factory = " << typeid(*d_hierarchy->getPatchDescriptor()->
+                               getPatchDataFactory(data_id)).name()
+     << std::endl;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      s << "Level number = " << ln << std::endl;
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<dcomplex> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.printData(d, box, s);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsComplex::setToScalar(
+   const int data_id,
+   const dcomplex& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<dcomplex> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.setToScalar(d, alpha, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic arithmetic operations.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HierarchyNodeDataOpsComplex::scale(
+   const int dst_id,
+   const dcomplex& alpha,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<dcomplex> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<dcomplex> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.scale(dst, alpha, src, box);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsComplex::addScalar(
+   const int dst_id,
+   const int src_id,
+   const dcomplex& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<dcomplex> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<dcomplex> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.addScalar(dst, src, alpha, box);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsComplex::add(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::NodeData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.add(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsComplex::subtract(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::NodeData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.subtract(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsComplex::multiply(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::NodeData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.multiply(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsComplex::divide(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::NodeData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.divide(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsComplex::reciprocal(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<dcomplex> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.reciprocal(d, src, box);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsComplex::linearSum(
+   const int dst_id,
+   const dcomplex& alpha,
+   const int src1_id,
+   const dcomplex& beta,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::NodeData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.linearSum(d, alpha, s1, beta, s2, box);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsComplex::axpy(
+   const int dst_id,
+   const dcomplex& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::NodeData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.axpy(d, alpha, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsComplex::axmy(
+   const int dst_id,
+   const dcomplex& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::NodeData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.axmy(d, alpha, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsComplex::abs(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<double> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<dcomplex> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.abs(d, src, box);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsComplex::setRandomValues(
+   const int data_id,
+   const dcomplex& width,
+   const dcomplex& low,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<dcomplex> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.setRandomValues(d, width, low, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Generic norm and order operations.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int HierarchyNodeDataOpsComplex::numberOfEntries(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int entries = 0;
+
+   if (interior_only) {
+
+      tbox::Pointer<pdat::NodeDataFactory<dcomplex> >
+      dfact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!dfact.isNull());
+#endif
+
+      for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+         const int npatches = level->getNumberOfPatches();
+#ifdef DEBUG_CHECK_ASSERTIONa
+         TBOX_ASSERT(npatches == d_nonoverlapping_node_boxes[ln].getSize());
+#endif
+         for (int il = 0; il < npatches; il++) {
+            tbox::List<hier::Box>::Iterator lb =
+               ((d_nonoverlapping_node_boxes[ln])[il]).listStart();
+            for ( ; lb; lb++) {
+               entries += lb().size();
+            }
+         }
+      }
+
+      entries *= dfact->getDepth();
+
+   } else {
+
+      for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::Pointer<pdat::NodeData<dcomplex> > d =
+               (*ip)->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            entries += d_patch_ops.numberOfEntries(d, d->getGhostBox());
+         }
+      }
+
+      int global_entries = entries;
+      if (mpi.getSize() > 1) {
+         mpi.Allreduce(&entries, &global_entries, 1, MPI_INT, MPI_MAX);
+      }
+      entries = global_entries;
+
+   }
+
+   return entries;
+}
+
+double HierarchyNodeDataOpsComplex::sumControlVolumes(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double sum = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<dcomplex> > d = p->getPatchData(data_id);
+         tbox::Pointer<pdat::NodeData<double> > cv = p->getPatchData(vol_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!cv.isNull());
+#endif
+         hier::Box box = cv->getGhostBox();
+
+         sum += d_patch_ops.sumControlVolumes(d, cv, box);
+      }
+   }
+
+   double global_sum = sum;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&sum, &global_sum, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   return global_sum;
+}
+
+double HierarchyNodeDataOpsComplex::L1Norm(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<dcomplex> > d = p->getPatchData(data_id);
+         tbox::Pointer<pdat::NodeData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            box = d->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         norm += d_patch_ops.L1Norm(d, box, cv);
+      }
+   }
+
+   double global_norm = norm;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&norm, &global_norm, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   return global_norm;
+}
+
+double HierarchyNodeDataOpsComplex::L2Norm(
+   const int data_id,
+   const int vol_id) const
+{
+   dcomplex dotprod = HierarchyNodeDataOpsComplex::dot(data_id,
+         data_id,
+         vol_id);
+
+   return sqrt(real(dotprod));
+}
+
+double HierarchyNodeDataOpsComplex::weightedL2Norm(
+   const int data_id,
+   const int wgt_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm_squared = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<dcomplex> > d = p->getPatchData(data_id);
+         tbox::Pointer<pdat::NodeData<dcomplex> > w = p->getPatchData(wgt_id);
+         tbox::Pointer<pdat::NodeData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            box = d->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         double pnorm = d_patch_ops.weightedL2Norm(d, w, box, cv);
+
+         norm_squared += pnorm * pnorm;
+      }
+   }
+
+   double global_norm_squared = norm_squared;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&norm_squared, &global_norm_squared, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   return sqrt(global_norm_squared);
+}
+
+double HierarchyNodeDataOpsComplex::RMSNorm(
+   const int data_id,
+   const int vol_id) const
+{
+   double l2_norm = L2Norm(data_id, vol_id);
+
+   double volume = ((vol_id < 0) ? (double)numberOfEntries(data_id, true)
+                    : sumControlVolumes(data_id, vol_id));
+
+   double rms_norm = l2_norm / sqrt(volume);
+   return rms_norm;
+}
+
+double HierarchyNodeDataOpsComplex::weightedRMSNorm(
+   const int data_id,
+   const int wgt_id,
+   const int vol_id) const
+{
+
+   double l2_norm = weightedL2Norm(data_id, wgt_id, vol_id);
+
+   double volume = ((vol_id < 0) ? (double)numberOfEntries(data_id, true)
+                    : sumControlVolumes(data_id, vol_id));
+
+   double rms_norm = l2_norm / sqrt(volume);
+   return rms_norm;
+}
+
+double HierarchyNodeDataOpsComplex::maxNorm(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<dcomplex> > d = p->getPatchData(data_id);
+         tbox::Pointer<pdat::NodeData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            box = d->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         norm = tbox::MathUtilities<double>::Max(norm,
+               d_patch_ops.maxNorm(d, box, cv));
+      }
+   }
+
+   double global_norm = norm;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&norm, &global_norm, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   return global_norm;
+}
+
+dcomplex HierarchyNodeDataOpsComplex::dot(
+   const int data1_id,
+   const int data2_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   dcomplex dprod = dcomplex(0.0, 0.0);
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<dcomplex> > d1 =
+            p->getPatchData(data1_id);
+         tbox::Pointer<pdat::NodeData<dcomplex> > d2 =
+            p->getPatchData(data2_id);
+         tbox::Pointer<pdat::NodeData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d1.isNull());
+#endif
+            box = d1->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         dprod += d_patch_ops.dot(d1, d2, box, cv);
+      }
+   }
+
+   dcomplex global_dot = dprod;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&dprod, &global_dot, 1, MPI_DOUBLE_COMPLEX, MPI_SUM);
+   }
+   return global_dot;
+}
+
+dcomplex HierarchyNodeDataOpsComplex::integral(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   dcomplex local_integral = dcomplex(0.0, 0.0);
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<dcomplex> > data =
+            p->getPatchData(data_id);
+         tbox::Pointer<pdat::NodeData<double> > vol = p->getPatchData(vol_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!data.isNull());
+         TBOX_ASSERT(!vol.isNull());
+#endif
+
+         hier::Box box = data->getGhostBox();
+
+         local_integral += d_patch_ops.integral(data, box, vol);
+      }
+   }
+
+   dcomplex global_integral = local_integral;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&local_integral, &global_integral, 1, MPI_DOUBLE_COMPLEX, MPI_SUM);
+   }
+   return global_integral;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyNodeDataOpsComplex.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyNodeDataOpsComplex.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,416 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for complex node data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyNodeDataOpsComplex
+#define included_math_HierarchyNodeDataOpsComplex
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/math/HierarchyDataOpsComplex.h"
+#include "SAMRAI/math/PatchNodeDataOpsComplex.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class HierarchyNodeDataOpsComplex provides a collection of
+ * operations that manipulate complex node-centered patch data components over
+ * multiple levels in an AMR hierarchy.  It is derived from the abstract
+ * base class HierarchyDataOpsComplex which defines the interface to
+ * similar operations for node-centered, face-centered, node-centered patch
+ * data objects where the data is complex.  The operations include basic
+ * arithmetic and norms.  On each patch, the operations are performed by the
+ * PatchNodeDataOpsComplex data member.
+ *
+ * The patch hierarchy and set of levels within that hierarcy over which the
+ * operations will be performed are set in the constructor.  However, note
+ * that the constructor accepts default arguments for the coarsest and finest
+ * level numbers.  If the level numbers are not specified when calling the
+ * constructor the levels which exist in the hierarchy will be assumed in
+ * all operations.  The hierarchy and levels may be changed at any time using
+ * the proper member functions.
+ *
+ * Note that, when it makes sense, an operation accept a boolean argument
+ * which indicates whether the operation should be performed on all of the
+ * data or just those data elements corresponding to the patch interiors.
+ * If no boolean argument is provided, the default behavior is to treat only
+ * the patch interiors.  Also, a similar set of operations for real (double
+ * and float) and integer node-centered data is provided in the classes
+ * HierarchyNodeDataOpsReal and HierarchyNodeDataOpsInteger,
+ * respectively.
+ *
+ * @see math::PatchNodeDataOpsComplex
+ */
+
+class HierarchyNodeDataOpsComplex:public HierarchyDataOpsComplex
+{
+public:
+   /**
+    * The constructor for the HierarchyNodeDataOpsComplex class sets
+    * the default patch hierarchy and coarsest and finest patch levels
+    * in that hierarchy over which operations will be performed.  The
+    * hierarchy and operations may be reset using the member fuctions
+    * setPatchHierarchy() and resetLevels() below.  If no level number
+    * arguments are given here, the levels over which the operations will
+    * be performed are those already existing in the hierarchy.  If the
+    * hierarchy level configuration changes, the operations must be explicitly
+    * reset by calling the resetLevels() function.
+    */
+   explicit HierarchyNodeDataOpsComplex(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int coarsest_level = -1,
+      const int finest_level = -1);
+
+   /**
+    * Virtual destructor for the HierarchyNodeDataOpsComplex class.
+    */
+   virtual ~HierarchyNodeDataOpsComplex();
+
+   /**
+    * Reset patch hierarchy over which operations occur.
+    */
+   void
+   setPatchHierarchy(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+   /**
+    * Reset range of patch levels over which operations occur.
+    * Levels must exist in hierarchy or an assertion will result.
+    */
+   void
+   resetLevels(
+      const int coarsest_level,
+      const int finest_level);
+
+   /**
+    * Return const pointer to patch hierarchy associated with operations.
+    */
+   const tbox::Pointer<hier::PatchHierarchy>
+   getPatchHierarchy() const;
+
+   /**
+    * Copy source data to destination data.
+    */
+   void
+   copyData(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Swap data pointers (i.e., storage) between two data components.
+    */
+   void
+   swapData(
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data over multiple levels to specified output stream.
+    */
+   void
+   printData(
+      const int data_id,
+      std::ostream& s,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data component to given scalar.
+    */
+   void
+   setToScalar(
+      const int data_id,
+      const dcomplex& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to source multiplied by given scalar, pointwise.
+    */
+   void
+   scale(
+      const int dst_id,
+      const dcomplex& alpha,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Add scalar to each entry in source data and set destination to result.
+    */
+   void
+   addScalar(
+      const int dst_id,
+      const int src_id,
+      const dcomplex& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to sum of two source components, pointwise.
+    */
+   void
+   add(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Subtract second source component from first source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   subtract(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination component to product of two source components, pointwise.
+    */
+   void
+   multiply(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Divide first data component by second source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   divide(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set each entry of destination component to reciprocal of corresponding
+    * source data component entry.
+    */
+   void
+   reciprocal(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + \beta s_2\f$, where \f$d\f$ is the destination patch
+    * data component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha, \beta\f$ are scalar values.
+    */
+   void
+   linearSum(
+      const int dst_id,
+      const dcomplex& alpha,
+      const int src1_id,
+      const dcomplex& beta,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axpy(
+      const int dst_id,
+      const dcomplex& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 - s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axmy(
+      const int dst_id,
+      const dcomplex& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination data to absolute value of source data, pointwise.
+    * Note that the source data must be dcomplex and the destination must
+    * be double.
+    */
+   void
+   abs(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data entries to random values.  See the operations in the
+    * array data operation classes for details on the generation of
+    * the random values.
+    */
+   void
+   setRandomValues(
+      const int data_id,
+      const dcomplex& width,
+      const dcomplex& low,
+      const bool interior_only = true) const;
+
+   /**
+    * Return the total number of data values for the component on the set
+    * of hierarchy levels.  If the boolean argument is true, the number of
+    * elements will be summed over patch interiors in a unique way which
+    * avoids multiple counting of redundant values (recall the definition
+    * of node points on a patch interior).  If the boolean argument is false,
+    * all elements will be counted (including ghost values) over all patches.
+    */
+   int
+   numberOfEntries(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return sum of the control volumes associated with the data component.
+    * Note that if the ontrol volumes are set propery, this is equivalent to
+    * integrating a data component containing all ones over the collection of
+    * hierarchy levels.
+    */
+   double
+   sumControlVolumes(
+      const int data_id,
+      const int vol_id) const;
+
+   /**
+    * Return discrete \f$L_1\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( \sqrt{data_i * \bar{data_i}}*cvol_i )\f$.
+    * If the control volume is undefined (vol_id < 0), the
+    * return value is \f$\sum_i ( \sqrt{data_i * \bar{data_i}} )\f$.
+    */
+   double
+   L1Norm(
+      const int data_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete \f$L_2\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum
+    * \f$\sqrt{ \sum_i ( data_i * \bar{data_i} cvol_i ) }\f$.
+    * If the control volume is undefined (vol_id < 0), the return value is
+    * \f$\sqrt{ \sum_i ( data_i * \bar{data_i} ) }\f$.
+    */
+   double
+   L2Norm(
+      const int data_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete weighted \f$L_2\f$-norm of the data using the control
+    * volume to weight the contribution of the data and weight entries to
+    * the sum.  That is, the return value is the sum \f$\sqrt{ \sum_i (
+    * (data_i * wgt_i) * \bar{(data_i * wgt_i)} cvol_i ) }\f$.  If the control
+    * volume is undefined (vol_id < 0), the return value is
+    * \f$\sqrt{ \sum_i ( (data_i * wgt_i) * \bar{(data_i * wgt_i)} cvol_i ) }\f$.
+    */
+   double
+   weightedL2Norm(
+      const int data_id,
+      const int weight_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete root mean squared norm of the data.  If the control
+    * volume is specified (vol_id >= 0), the return value is the \f$L_2\f$-norm
+    * divided by the square root of the sum of the control volumes.  Otherwise,
+    * the return value is the \f$L_2\f$-norm divided by the square root of the
+    * number of data entries.
+    */
+   double
+   RMSNorm(
+      const int data_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete weighted root mean squared norm of the data.  If the
+    * control volume is specified (vol_id >= 0), the return value is the
+    * weighted \f$L_2\f$-norm divided by the square root of the sum of the
+    * control volumes.  Otherwise, the return value is the weighted \f$L_2\f$-norm
+    * divided by the square root of the number of data entries.
+    */
+   double
+   weightedRMSNorm(
+      const int data_id,
+      const int weight_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return the \f$\max\f$-norm of the data using the control volume to weight
+    * the contribution of each data entry to the maximum.  That is, the return
+    * value is \f$\max_i ( \sqrt{data_i * \bar{data_i}} )\f$, where the max is
+    * over the data elements where \f$cvol_i > 0\f$.  If the control volume is
+    * undefined (vol_id < 0), it is ignored during the computation of the
+    * maximum.
+    */
+   double
+   maxNorm(
+      const int data_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return the dot product of the two data arrays using the control volume
+    * to weight the contribution of each product to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( data1_i * \bar{data2_i} * cvol_i )\f$.
+    * If the control volume is undefined (vol_id < 0), it is ignored during
+    * the summation.
+    */
+   dcomplex
+   dot(
+      const int data1_id,
+      const int data2_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return the integral of the function represented by the data array.
+    * The return value is the sum \f$\sum_i ( data_i * vol_i )\f$.
+    */
+   dcomplex
+   integral(
+      const int data_id,
+      const int vol_id) const;
+
+private:
+   // The following are not implemented
+   HierarchyNodeDataOpsComplex(
+      const HierarchyNodeDataOpsComplex&);
+   void
+   operator = (
+      const HierarchyNodeDataOpsComplex&);
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+   int d_coarsest_level;
+   int d_finest_level;
+   tbox::Array<tbox::Array<hier::BoxList> > d_nonoverlapping_node_boxes;
+
+   PatchNodeDataOpsComplex d_patch_ops;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyNodeDataOpsInteger.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyNodeDataOpsInteger.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,755 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for integer node data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyNodeDataOpsInteger_C
+#define included_math_HierarchyNodeDataOpsInteger_C
+
+#include "SAMRAI/math/HierarchyNodeDataOpsInteger.h"
+#include "SAMRAI/hier/BoxUtilities.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/pdat/NodeDataFactory.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#include <typeinfo>
+#include <stdlib.h>
+#include <float.h>
+#include <math.h>
+
+namespace SAMRAI {
+namespace math {
+
+HierarchyNodeDataOpsInteger::HierarchyNodeDataOpsInteger(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level):
+   HierarchyDataOpsInteger()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+#endif
+   d_hierarchy = hierarchy;
+   if ((coarsest_level < 0) || (finest_level < 0)) {
+      if (d_hierarchy->getNumberOfLevels() == 0) {
+         d_coarsest_level = coarsest_level;
+         d_finest_level = finest_level;
+      } else {
+         resetLevels(0, d_hierarchy->getFinestLevelNumber());
+      }
+   } else {
+      resetLevels(coarsest_level, finest_level);
+   }
+}
+
+HierarchyNodeDataOpsInteger::~HierarchyNodeDataOpsInteger()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to set the hierarchy and level information.                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HierarchyNodeDataOpsInteger::setPatchHierarchy(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+
+   d_hierarchy = hierarchy;
+}
+
+void HierarchyNodeDataOpsInteger::resetLevels(
+   const int coarsest_level,
+   const int finest_level)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (finest_level >= coarsest_level)
+      && (finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   d_coarsest_level = coarsest_level;
+   d_finest_level = finest_level;
+
+   d_nonoverlapping_node_boxes.resizeArray(d_finest_level + 1);
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level =
+         d_hierarchy->getPatchLevel(ln);
+      hier::BoxArray node_boxes = level->getBoxes();
+      const int n = node_boxes.getNumberOfBoxes();
+      for (int i = 0; i < n; i++) {
+         node_boxes[i] =
+            pdat::NodeGeometry::toNodeBox(node_boxes[i]);
+      }
+      hier::BoxUtilities::makeNonOverlappingBoxLists(
+         d_nonoverlapping_node_boxes[ln],
+         node_boxes);
+   }
+}
+
+const tbox::Pointer<hier::PatchHierarchy>
+HierarchyNodeDataOpsInteger::getPatchHierarchy() const
+{
+   return d_hierarchy;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic operations.                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int HierarchyNodeDataOpsInteger::numberOfEntries(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int entries = 0;
+
+   if (interior_only) {
+
+      tbox::Pointer<pdat::NodeDataFactory<int> >
+      dfact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!dfact.isNull());
+#endif
+
+      for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> level =
+            d_hierarchy->getPatchLevel(ln);
+         const int npatches = level->getNumberOfPatches();
+#ifdef DEBUG_CHECK_ASSERTIONa
+         TBOX_ASSERT(npatches == d_nonoverlapping_node_boxes[ln].getSize());
+#endif
+         for (int il = 0; il < npatches; il++) {
+            tbox::List<hier::Box>::Iterator lb =
+               ((d_nonoverlapping_node_boxes[ln])[il]).listStart();
+            for ( ; lb; lb++) {
+               entries += lb().size();
+            }
+         }
+      }
+
+      entries *= dfact->getDepth();
+
+   } else {
+
+      for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::Pointer<pdat::NodeData<int> > d =
+               (*ip)->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            entries += d_patch_ops.numberOfEntries(d, d->getGhostBox());
+         }
+      }
+
+      int global_entries = entries;
+      if (mpi.getSize() > 1) {
+         mpi.Allreduce(&entries, &global_entries, 1, MPI_INT, MPI_SUM);
+      }
+      entries = global_entries;
+
+   }
+
+   return entries;
+}
+
+void HierarchyNodeDataOpsInteger::copyData(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<int> > s = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.copyData(d, s, box);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsInteger::swapData(
+   const int data1_id,
+   const int data2_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   tbox::Pointer<pdat::NodeDataFactory<int> >
+   d1fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data1_id);
+   TBOX_ASSERT(!d1fact.isNull());
+   tbox::Pointer<pdat::NodeDataFactory<int> >
+   d2fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data2_id);
+   TBOX_ASSERT(!d2fact.isNull());
+   TBOX_ASSERT(d1fact->getDepth() == d2fact->getDepth());
+   TBOX_ASSERT(d1fact->getGhostCellWidth() == d2fact->getGhostCellWidth());
+#endif
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         d_patch_ops.swapData(p, data1_id, data2_id);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsInteger::printData(
+   const int data_id,
+   std::ostream& s,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   s << "Patch descriptor id = " << data_id << std::endl;
+   s << "Factory = " << typeid(*d_hierarchy->getPatchDescriptor()->
+                               getPatchDataFactory(data_id)).name()
+     << std::endl;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      s << "Level number = " << ln << std::endl;
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<int> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.printData(d, box, s);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsInteger::setToScalar(
+   const int data_id,
+   const int& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<int> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.setToScalar(d, alpha, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic arithmetic operations.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HierarchyNodeDataOpsInteger::scale(
+   const int dst_id,
+   const int& alpha,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<int> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<int> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.scale(dst, alpha, src, box);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsInteger::addScalar(
+   const int dst_id,
+   const int src_id,
+   const int& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<int> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<int> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.addScalar(dst, src, alpha, box);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsInteger::add(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::NodeData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.add(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsInteger::subtract(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::NodeData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.subtract(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsInteger::multiply(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::NodeData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.multiply(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsInteger::divide(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::NodeData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.divide(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsInteger::reciprocal(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<int> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.reciprocal(d, src, box);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsInteger::linearSum(
+   const int dst_id,
+   const int& alpha,
+   const int src1_id,
+   const int& beta,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::NodeData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.linearSum(d, alpha, s1, beta, s2, box);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsInteger::axpy(
+   const int dst_id,
+   const int& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::NodeData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.axpy(d, alpha, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsInteger::axmy(
+   const int dst_id,
+   const int& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::NodeData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.axmy(d, alpha, s1, s2, box);
+      }
+   }
+}
+
+void HierarchyNodeDataOpsInteger::abs(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<int> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.abs(d, src, box);
+      }
+   }
+}
+
+int HierarchyNodeDataOpsInteger::min(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int minval = tbox::MathUtilities<int>::getMax();
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<int> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         minval = tbox::MathUtilities<int>::Min(minval,
+               d_patch_ops.min(d, box));
+      }
+   }
+
+   int global_min = minval;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&minval, &global_min, 1, MPI_INT, MPI_MIN);
+   }
+   return global_min;
+}
+
+int HierarchyNodeDataOpsInteger::max(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int maxval = -(tbox::MathUtilities<int>::getMax());
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<int> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         maxval = tbox::MathUtilities<int>::Max(maxval,
+               d_patch_ops.min(d, box));
+      }
+   }
+
+   int global_max = maxval;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&maxval, &global_max, 1, MPI_INT, MPI_MAX);
+   }
+   return global_max;
+}
+
+void HierarchyNodeDataOpsInteger::setRandomValues(
+   const int data_id,
+   const int& width,
+   const int& low,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<int> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.setRandomValues(d, width, low, box);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyNodeDataOpsInteger.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyNodeDataOpsInteger.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,319 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for integer node data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyNodeDataOpsInteger
+#define included_math_HierarchyNodeDataOpsInteger
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/math/HierarchyDataOpsInteger.h"
+#include "SAMRAI/math/PatchNodeDataOpsInteger.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class HierarchyNodeDataOpsInteger provides a collection of
+ * operations that manipulate integer node-centered patch data components over
+ * multiple levels in an AMR hierarchy.  It is derived from the abstract
+ * base class HierarchyDataOpsInteger which defines the interface to
+ * similar operations for node-centered, face-centered, node-centered patch
+ * data objects where the data is of type integer.  The operations include
+ * basic arithmetic and some ordering operations.  On each patch, the
+ * operations are performed by the PatchNodeDataOpsInteger data member.
+ *
+ * The patch hierarchy and set of levels within that hierarcy over which the
+ * operations will be performed are set in the constructor.  However, note
+ * that the constructor accepts default arguments for the coarsest and finest
+ * level numbers.  If the level numbers are not specified when calling the
+ * constructor the levels which exist in the hierarchy will be assumed in
+ * all operations.  The hierarchy and levels may be changed at any time using
+ * the proper member functions.
+ *
+ * Note that, when it makes sense, an operation accept a boolean argument
+ * which indicates whether the operation should be performed on all of the
+ * data or just those data elements corresponding to the patch interiors.
+ * If no boolean argument is provided, the default behavior is to treat only
+ * the patch interiors.  Also, a similar set of operations for real (double
+ * and float) and complex node-centered data is provided in the classes
+ * HierarchyNodeDataOpsReal and HierarchyNodeDataOpsComplex,
+ * respectively.
+ *
+ * @see math::PatchNodeDataOpsInteger
+ */
+
+class HierarchyNodeDataOpsInteger:public HierarchyDataOpsInteger
+{
+public:
+   /**
+    * The constructor for the HierarchyNodeDataOpsInteger class sets
+    * the default patch hierarchy and coarsest and finest patch levels
+    * in that hierarchy over which operations will be performed.  The
+    * hierarchy and operations may be reset using the member fuctions
+    * setPatchHierarchy() and resetLevels() below. If no level number
+    * arguments are given here, the levels over which the operations will
+    * be performed are those already existing in the hierarchy.  If the
+    * hierarchy level configuration changes, the operations must be explicitly
+    * reset by calling the resetLevels() function.
+    */
+   explicit HierarchyNodeDataOpsInteger(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int coarsest_level = -1,
+      const int finest_level = -1);
+
+   /**
+    * Virtual destructor for the HierarchyNodeDataOpsInteger class.
+    */
+   virtual ~HierarchyNodeDataOpsInteger();
+
+   /**
+    * Reset patch hierarchy over which operations occur.
+    */
+   void
+   setPatchHierarchy(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+   /**
+    * Reset range of patch levels over which operations occur.
+    * Levels must exist in hierarchy or an assertion will result.
+    */
+   void
+   resetLevels(
+      const int coarsest_level,
+      const int finest_level);
+
+   /**
+    * Return const pointer to patch hierarchy associated with operations.
+    */
+   const tbox::Pointer<hier::PatchHierarchy>
+   getPatchHierarchy() const;
+
+   /**
+    * Return the total number of data values for the component on the set
+    * of hierarchy levels.  If the boolean argument is true, the number of
+    * elements will be summed over patch interiors in a unique way which
+    * avoids multiple counting of redundant values (recall the definition
+    * of node points on a patch interior).  If the boolean argument is false,
+    * all elements will be counted (including ghost values) over all patches.
+    */
+   int
+   numberOfEntries(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Copy source data to destination data.
+    */
+   void
+   copyData(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Swap data pointers (i.e., storage) between two data components.
+    */
+   void
+   swapData(
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data over multiple levels to specified output stream.
+    */
+   void
+   printData(
+      const int data_id,
+      std::ostream& s,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data component to given scalar.
+    */
+   void
+   setToScalar(
+      const int data_id,
+      const int& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to source multiplied by given scalar, pointwise.
+    */
+   void
+   scale(
+      const int dst_id,
+      const int& alpha,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Add scalar to each entry in source data and set destination to result.
+    */
+   void
+   addScalar(
+      const int dst_id,
+      const int src_id,
+      const int& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to sum of two source components, pointwise.
+    */
+   void
+   add(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Subtract second source component from first source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   subtract(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination component to product of two source components, pointwise.
+    */
+   void
+   multiply(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Divide first data component by second source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   divide(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set each entry of destination component to reciprocal of corresponding
+    * source data component entry.
+    */
+   void
+   reciprocal(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + \beta s_2\f$, where \f$d\f$ is the destination patch
+    * data component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha, \beta\f$ are scalar values.
+    */
+   void
+   linearSum(
+      const int dst_id,
+      const int& alpha,
+      const int src1_id,
+      const int& beta,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axpy(
+      const int dst_id,
+      const int& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 - s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axmy(
+      const int dst_id,
+      const int& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination data to absolute value of source data, pointwise.
+    */
+   void
+   abs(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return minimum data value over all patches in the collection of levels.
+    */
+   int
+   min(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return maximum data value over all patches in the collection of levels.
+    */
+   int
+   max(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data entries to random values.  See the operations in the
+    * array data operation classes for details on the generation of
+    * the random values.
+    */
+   void
+   setRandomValues(
+      const int data_id,
+      const int& width,
+      const int& low,
+      const bool interior_only = true) const;
+
+private:
+   // The following are not implemented
+   HierarchyNodeDataOpsInteger(
+      const HierarchyNodeDataOpsInteger&);
+   void
+   operator = (
+      const HierarchyNodeDataOpsInteger&);
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+   int d_coarsest_level;
+   int d_finest_level;
+   tbox::Array<tbox::Array<hier::BoxList> > d_nonoverlapping_node_boxes;
+
+   PatchNodeDataOpsInteger d_patch_ops;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyNodeDataOpsReal.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyNodeDataOpsReal.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1317 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations for real node data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyNodeDataOpsReal_C
+#define included_math_HierarchyNodeDataOpsReal_C
+
+#include "SAMRAI/math/HierarchyNodeDataOpsReal.h"
+#include "SAMRAI/hier/BoxUtilities.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/pdat/NodeDataFactory.h"
+#include "SAMRAI/pdat/NodeGeometry.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include <typeinfo>
+#include <stdlib.h>
+#include <float.h>
+#include <math.h>
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+HierarchyNodeDataOpsReal<TYPE>::HierarchyNodeDataOpsReal(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level):
+   HierarchyDataOpsReal<TYPE>()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+#endif
+   d_hierarchy = hierarchy;
+   if ((coarsest_level < 0) || (finest_level < 0)) {
+      if (d_hierarchy->getNumberOfLevels() == 0) {
+         d_coarsest_level = coarsest_level;
+         d_finest_level = finest_level;
+      } else {
+         resetLevels(0, d_hierarchy->getFinestLevelNumber());
+      }
+   } else {
+      resetLevels(coarsest_level, finest_level);
+   }
+}
+
+template<class TYPE>
+HierarchyNodeDataOpsReal<TYPE>::~HierarchyNodeDataOpsReal()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to set the hierarchy and level informtation.                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void HierarchyNodeDataOpsReal<TYPE>::setPatchHierarchy(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+
+   d_hierarchy = hierarchy;
+}
+
+template<class TYPE>
+void HierarchyNodeDataOpsReal<TYPE>::resetLevels(
+   const int coarsest_level,
+   const int finest_level)
+{
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (finest_level >= coarsest_level)
+      && (finest_level <= d_hierarchy->getFinestLevelNumber()));
+
+   d_coarsest_level = coarsest_level;
+   d_finest_level = finest_level;
+
+   d_nonoverlapping_node_boxes.resizeArray(d_finest_level + 1);
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      hier::BoxArray node_boxes = level->getBoxes();
+      const int n = node_boxes.getNumberOfBoxes();
+      for (int i = 0; i < n; i++) {
+         node_boxes[i] =
+            pdat::NodeGeometry::toNodeBox(node_boxes[i]);
+      }
+      hier::BoxUtilities::makeNonOverlappingBoxLists(
+         d_nonoverlapping_node_boxes[ln],
+         node_boxes);
+   }
+}
+
+template<class TYPE>
+const tbox::Pointer<hier::PatchHierarchy>
+HierarchyNodeDataOpsReal<TYPE>::getPatchHierarchy() const
+{
+   return d_hierarchy;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The following are private and cannot be used, but they are defined    *
+ * here for compilers that require that every template declaration have  *
+ * a definition (a stupid requirement, if you ask me).                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+HierarchyNodeDataOpsReal<TYPE>::HierarchyNodeDataOpsReal(
+   const HierarchyNodeDataOpsReal<TYPE>& foo):
+   HierarchyDataOpsReal<TYPE>()
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void HierarchyNodeDataOpsReal<TYPE>::operator = (
+   const HierarchyNodeDataOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic operations.                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void HierarchyNodeDataOpsReal<TYPE>::copyData(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<TYPE> > src = p->getPatchData(src_id);
+
+         TBOX_ASSERT(!dst.isNull());
+
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.copyData(dst, src, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyNodeDataOpsReal<TYPE>::swapData(
+   const int data1_id,
+   const int data2_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   tbox::Pointer<pdat::NodeDataFactory<TYPE> >
+   d1fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data1_id);
+   TBOX_ASSERT(!d1fact.isNull());
+   tbox::Pointer<pdat::NodeDataFactory<TYPE> >
+   d2fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data2_id);
+   TBOX_ASSERT(!d2fact.isNull());
+   TBOX_ASSERT(d1fact->getDepth() == d2fact->getDepth());
+   TBOX_ASSERT(d1fact->getGhostCellWidth() == d2fact->getGhostCellWidth());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         d_patch_ops.swapData(p, data1_id, data2_id);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyNodeDataOpsReal<TYPE>::printData(
+   const int data_id,
+   std::ostream& s,
+   const bool interior_only) const
+{
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+
+   s << "Patch descriptor id = " << data_id << std::endl;
+   s << "Factory = " << typeid(*d_hierarchy->getPatchDescriptor()->
+                               getPatchDataFactory(data_id)).name()
+     << std::endl;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      s << "Level number = " << ln << std::endl;
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > d = p->getPatchData(data_id);
+
+         TBOX_ASSERT(!d.isNull());
+
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.printData(d, box, s);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyNodeDataOpsReal<TYPE>::setToScalar(
+   const int data_id,
+   const TYPE& alpha,
+   const bool interior_only) const
+{
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > d = p->getPatchData(data_id);
+
+         TBOX_ASSERT(!d.isNull());
+
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.setToScalar(d, alpha, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic arithmetic operations.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void HierarchyNodeDataOpsReal<TYPE>::scale(
+   const int dst_id,
+   const TYPE& alpha,
+   const int src_id,
+   const bool interior_only) const
+{
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<TYPE> > src = p->getPatchData(src_id);
+
+         TBOX_ASSERT(!dst.isNull());
+
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.scale(dst, alpha, src, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyNodeDataOpsReal<TYPE>::addScalar(
+   const int dst_id,
+   const int src_id,
+   const TYPE& alpha,
+   const bool interior_only) const
+{
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<TYPE> > src = p->getPatchData(src_id);
+
+         TBOX_ASSERT(!dst.isNull());
+
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.addScalar(dst, src, alpha, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyNodeDataOpsReal<TYPE>::add(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::NodeData<TYPE> > src2 = p->getPatchData(src2_id);
+
+         TBOX_ASSERT(!dst.isNull());
+
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.add(dst, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyNodeDataOpsReal<TYPE>::subtract(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::NodeData<TYPE> > src2 = p->getPatchData(src2_id);
+
+         TBOX_ASSERT(!dst.isNull());
+
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.subtract(dst, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyNodeDataOpsReal<TYPE>::multiply(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::NodeData<TYPE> > src2 = p->getPatchData(src2_id);
+
+         TBOX_ASSERT(!dst.isNull());
+
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.multiply(dst, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyNodeDataOpsReal<TYPE>::divide(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::NodeData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.divide(dst, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyNodeDataOpsReal<TYPE>::reciprocal(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<TYPE> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.reciprocal(dst, src, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyNodeDataOpsReal<TYPE>::linearSum(
+   const int dst_id,
+   const TYPE& alpha,
+   const int src1_id,
+   const TYPE& beta,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::NodeData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.linearSum(dst, alpha, src1, beta, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyNodeDataOpsReal<TYPE>::axpy(
+   const int dst_id,
+   const TYPE& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::NodeData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.axpy(dst, alpha, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyNodeDataOpsReal<TYPE>::axmy(
+   const int dst_id,
+   const TYPE& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::NodeData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.axmy(dst, alpha, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyNodeDataOpsReal<TYPE>::abs(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<TYPE> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.abs(dst, src, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchyNodeDataOpsReal<TYPE>::setRandomValues(
+   const int data_id,
+   const TYPE& width,
+   const TYPE& low,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > data = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!data.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : data->getGhostBox());
+
+         d_patch_ops.setRandomValues(data, width, low, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Generic norm and order operations.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+int HierarchyNodeDataOpsReal<TYPE>::numberOfEntries(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int entries = 0;
+
+   if (interior_only) {
+
+      tbox::Pointer<pdat::NodeDataFactory<TYPE> >
+      dfact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!dfact.isNull());
+#endif
+
+      for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+         const int npatches = level->getNumberOfPatches();
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(npatches == d_nonoverlapping_node_boxes[ln].getSize());
+#endif
+         for (int il = 0; il < npatches; il++) {
+            tbox::List<hier::Box>::Iterator lb =
+               ((d_nonoverlapping_node_boxes[ln])[il]).listStart();
+            for ( ; lb; lb++) {
+               entries += lb().size();
+            }
+         }
+      }
+
+      entries *= dfact->getDepth();
+
+   } else {
+
+      for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::Pointer<pdat::NodeData<TYPE> > d =
+               (*ip)->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            entries += d_patch_ops.numberOfEntries(d, d->getGhostBox());
+         }
+      }
+
+      int global_entries = entries;
+      if (mpi.getSize() > 1) {
+         mpi.Allreduce(&entries, &global_entries, 1, MPI_INT, MPI_SUM);
+      }
+      entries = global_entries;
+
+   }
+
+   return entries;
+}
+
+template<class TYPE>
+double HierarchyNodeDataOpsReal<TYPE>::sumControlVolumes(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double sum = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > data = p->getPatchData(data_id);
+         tbox::Pointer<pdat::NodeData<double> > cv = p->getPatchData(vol_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!cv.isNull());
+#endif
+         hier::Box box = cv->getGhostBox();
+
+         sum += d_patch_ops.sumControlVolumes(data, cv, box);
+      }
+   }
+
+   double global_sum = sum;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&sum, &global_sum, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   return global_sum;
+}
+
+template<class TYPE>
+double HierarchyNodeDataOpsReal<TYPE>::L1Norm(
+   const int data_id,
+   const int vol_id,
+   bool local_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > d = p->getPatchData(data_id);
+         tbox::Pointer<pdat::NodeData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            box = d->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         norm += d_patch_ops.L1Norm(d, box, cv);
+      }
+   }
+
+   if (!local_only) {
+      double global_norm = norm;
+      if (mpi.getSize() > 1) {
+         mpi.Allreduce(&norm, &global_norm, 1, MPI_DOUBLE, MPI_SUM);
+      }
+      norm = global_norm;
+   }
+   return norm;
+}
+
+template<class TYPE>
+double HierarchyNodeDataOpsReal<TYPE>::L2Norm(
+   const int data_id,
+   const int vol_id,
+   bool local_only) const
+{
+   double norm_squared = HierarchyNodeDataOpsReal<TYPE>::dot(data_id,
+         data_id,
+         vol_id,
+         local_only);
+
+   return sqrt(norm_squared);
+}
+
+template<class TYPE>
+double HierarchyNodeDataOpsReal<TYPE>::weightedL2Norm(
+   const int data_id,
+   const int wgt_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm_squared = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > d = p->getPatchData(data_id);
+         tbox::Pointer<pdat::NodeData<TYPE> > w = p->getPatchData(wgt_id);
+         tbox::Pointer<pdat::NodeData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            box = d->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         double pnorm = d_patch_ops.weightedL2Norm(d, w, box, cv);
+
+         norm_squared += pnorm * pnorm;
+      }
+   }
+
+   double global_norm_squared = norm_squared;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&norm_squared, &global_norm_squared, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   return sqrt(global_norm_squared);
+}
+
+template<class TYPE>
+double HierarchyNodeDataOpsReal<TYPE>::RMSNorm(
+   const int data_id,
+   const int vol_id) const
+{
+   double l2_norm = L2Norm(data_id, vol_id);
+
+   double volume = ((vol_id < 0) ? (double)numberOfEntries(data_id, true)
+                    : sumControlVolumes(data_id, vol_id));
+
+   double rms_norm = l2_norm / sqrt(volume);
+   return rms_norm;
+}
+
+template<class TYPE>
+double HierarchyNodeDataOpsReal<TYPE>::weightedRMSNorm(
+   const int data_id,
+   const int wgt_id,
+   const int vol_id) const
+{
+
+   double l2_norm = weightedL2Norm(data_id, wgt_id, vol_id);
+
+   double volume = ((vol_id < 0) ? (double)numberOfEntries(data_id, true)
+                    : sumControlVolumes(data_id, vol_id));
+
+   double rms_norm = l2_norm / sqrt(volume);
+   return rms_norm;
+}
+
+template<class TYPE>
+double HierarchyNodeDataOpsReal<TYPE>::maxNorm(
+   const int data_id,
+   const int vol_id,
+   bool local_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > d = p->getPatchData(data_id);
+         tbox::Pointer<pdat::NodeData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            box = d->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         norm = tbox::MathUtilities<double>::Max(norm,
+               d_patch_ops.maxNorm(d, box, cv));
+      }
+   }
+
+   if (!local_only) {
+      double global_norm = norm;
+      if (mpi.getSize() > 1) {
+         mpi.Allreduce(&norm, &global_norm, 1, MPI_DOUBLE, MPI_MAX);
+      }
+      norm = global_norm;
+   }
+   return norm;
+}
+
+template<class TYPE>
+TYPE HierarchyNodeDataOpsReal<TYPE>::dot(
+   const int data1_id,
+   const int data2_id,
+   const int vol_id,
+   bool local_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE dprod = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > d1 = p->getPatchData(data1_id);
+         tbox::Pointer<pdat::NodeData<TYPE> > d2 = p->getPatchData(data2_id);
+         tbox::Pointer<pdat::NodeData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d1.isNull());
+#endif
+            box = d1->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         dprod += d_patch_ops.dot(d1, d2, box, cv);
+      }
+   }
+
+   if (!local_only) {
+      if (mpi.getSize() > 1) {
+         mpi.AllReduce(&dprod, 1, MPI_SUM);
+      }
+   }
+   return dprod;
+}
+
+template<class TYPE>
+TYPE HierarchyNodeDataOpsReal<TYPE>::integral(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE local_integral = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > data =
+            p->getPatchData(data_id);
+         tbox::Pointer<pdat::NodeData<double> > vol = p->getPatchData(vol_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!data.isNull());
+         TBOX_ASSERT(!vol.isNull());
+#endif
+
+         hier::Box box = data->getGhostBox();
+
+         local_integral += d_patch_ops.integral(data, box, vol);
+      }
+   }
+
+   TYPE global_integral = local_integral;
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&global_integral, 1, MPI_SUM);
+   }
+   return global_integral;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Generic miscellaneous operations for real data.                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+int HierarchyNodeDataOpsReal<TYPE>::computeConstrProdPos(
+   const int data1_id,
+   const int data2_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int test = 1;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > d1 = p->getPatchData(data1_id);
+         tbox::Pointer<pdat::NodeData<TYPE> > d2 = p->getPatchData(data2_id);
+         tbox::Pointer<pdat::NodeData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d1.isNull());
+#endif
+            box = d1->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         test = tbox::MathUtilities<int>::Min(test,
+               d_patch_ops.computeConstrProdPos(d1, d2, box, cv));
+      }
+   }
+
+   int global_test = test;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&test, &global_test, 1, MPI_INT, MPI_MIN);
+   }
+   return global_test;
+}
+
+template<class TYPE>
+void HierarchyNodeDataOpsReal<TYPE>::compareToScalar(
+   const int dst_id,
+   const int src_id,
+   const TYPE& alpha,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<TYPE> > src = p->getPatchData(src_id);
+         tbox::Pointer<pdat::NodeData<double> > cv = p->getPatchData(vol_id);
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!dst.isNull());
+#endif
+            box = dst->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         d_patch_ops.compareToScalar(dst, src, alpha, box, cv);
+      }
+   }
+}
+
+template<class TYPE>
+int HierarchyNodeDataOpsReal<TYPE>::testReciprocal(
+   const int dst_id,
+   const int src_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int test = 1;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::NodeData<TYPE> > src = p->getPatchData(src_id);
+         tbox::Pointer<pdat::NodeData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!dst.isNull());
+#endif
+            box = dst->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         test = tbox::MathUtilities<int>::Min(test,
+               d_patch_ops.testReciprocal(dst, src, box, cv));
+      }
+   }
+
+   int global_test = test;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&test, &global_test, 1, MPI_INT, MPI_MIN);
+   }
+   return global_test;
+}
+
+template<class TYPE>
+TYPE HierarchyNodeDataOpsReal<TYPE>::maxPointwiseDivide(
+   const int numer_id,
+   const int denom_id,
+   bool local_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE max = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > numer = p->getPatchData(numer_id);
+         tbox::Pointer<pdat::NodeData<TYPE> > denom = p->getPatchData(denom_id);
+
+         hier::Box box = p->getBox();
+
+         max = tbox::MathUtilities<TYPE>::Max(max,
+               d_patch_ops.maxPointwiseDivide(numer, denom, box));
+      }
+   }
+
+   if (!local_only) {
+      if (mpi.getSize() > 1) {
+         mpi.AllReduce(&max, 1, MPI_MAX);
+      }
+   }
+   return max;
+}
+
+template<class TYPE>
+TYPE HierarchyNodeDataOpsReal<TYPE>::minPointwiseDivide(
+   const int numer_id,
+   const int denom_id,
+   bool local_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE min = tbox::MathUtilities<TYPE>::getMax();
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > numer = p->getPatchData(numer_id);
+         tbox::Pointer<pdat::NodeData<TYPE> > denom = p->getPatchData(denom_id);
+
+         hier::Box box = p->getBox();
+
+         min = tbox::MathUtilities<TYPE>::Min(min,
+               d_patch_ops.minPointwiseDivide(numer, denom, box));
+      }
+   }
+
+   if (!local_only) {
+      if (mpi.getSize() > 1) {
+         mpi.AllReduce(&min, 1, MPI_MIN);
+      }
+   }
+   return min;
+}
+
+template<class TYPE>
+TYPE HierarchyNodeDataOpsReal<TYPE>::min(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE minval = tbox::MathUtilities<TYPE>::getMax();
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         minval = tbox::MathUtilities<TYPE>::Min(minval, d_patch_ops.min(d, box));
+      }
+   }
+
+   TYPE global_min = minval;
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&global_min, 1, MPI_MIN);
+   }
+   return global_min;
+}
+
+template<class TYPE>
+TYPE HierarchyNodeDataOpsReal<TYPE>::max(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE maxval = -tbox::MathUtilities<TYPE>::getMax();
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::NodeData<TYPE> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         maxval = tbox::MathUtilities<TYPE>::Max(maxval, d_patch_ops.max(d, box));
+      }
+   }
+
+   TYPE global_max = maxval;
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&global_max, 1, MPI_MAX);
+   }
+   return global_max;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchyNodeDataOpsReal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchyNodeDataOpsReal.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,523 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations for real node data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchyNodeDataOpsReal
+#define included_math_HierarchyNodeDataOpsReal
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/math/HierarchyDataOpsReal.h"
+#include "SAMRAI/math/PatchNodeDataOpsReal.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class HierarchyNodeDataOpsReal provides a collection of operations
+ * that manipulate real (double and float) node-centered patch data components
+ * over multiple levels in an AMR hierarchy.  It is derived from the abstract
+ * base class HierarchyDataOpsReal which defines the interface to
+ * similar operations for node-centered, face-centered, node-centered patch
+ * data objects where the data is either double or float.  The operations
+ * include basic arithmetic, norms and ordering, and assorted miscellaneous
+ * operations.  On each patch, the operations are performed by the
+ * PatchNodeDataOpsReal data member.
+ *
+ * The patch hierarchy and set of levels within that hierarcy over which the
+ * operations will be performed are set in the constructor.  However, note
+ * that the constructor accepts default arguments for the coarsest and finest
+ * level numbers.  If the level numbers are not specified when calling the
+ * constructor the levels which exist in the hierarchy will be assumed in
+ * all operations.  The hierarchy and levels may be changed at any time using
+ * the proper member functions.
+ *
+ * Note that, when it makes sense, an operation accept a boolean argument
+ * which indicates whether the operation should be performed on all of the
+ * data or just those data elements corresponding to the patch interiors.
+ * If no boolean argument is provided, the default behavior is to treat only
+ * the patch interiors.  Also, a similar set of operations for complex and
+ * integer node-centered data is provided in the classes
+ * HierarchyNodeDataOpsComplex and HierarchyNodeDataOpsInteger,
+ * respectively.
+ *
+ * @see math::PatchNodeDataOpsReal
+ */
+
+template<class TYPE>
+class HierarchyNodeDataOpsReal:public HierarchyDataOpsReal<TYPE>
+{
+public:
+   /**
+    * The constructor for the HierarchyNodeDataOpsReal class sets
+    * the default patch hierarchy and coarsest and finest patch levels
+    * in that hierarchy over which operations will be performed.  The
+    * hierarchy and operations may be reset using the member fuctions
+    * setPatchHierarchy() and resetLevels() below.  If no level number
+    * arguments are given here, the levels over which the operations will
+    * be performed are those already existing in the hierarchy.  If the
+    * hierarchy level configuration changes, the operations must be explicitly
+    * reset by calling the resetLevels() function.
+    */
+   explicit HierarchyNodeDataOpsReal(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int coarsest_level = -1,
+      const int finest_level = -1);
+
+   /**
+    * Virtual destructor for the HierarchyNodeDataOpsReal class.
+    */
+   virtual ~HierarchyNodeDataOpsReal<TYPE>();
+
+   /**
+    * Reset patch hierarchy over which operations occur.
+    */
+   void
+   setPatchHierarchy(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+   /**
+    * Reset range of patch levels over which operations occur.
+    * Levels must exist in hierarchy or an assertion will result.
+    */
+   void
+   resetLevels(
+      const int coarsest_level,
+      const int finest_level);
+
+   /**
+    * Return const pointer to patch hierarchy associated with operations.
+    */
+   const tbox::Pointer<hier::PatchHierarchy>
+   getPatchHierarchy() const;
+
+   /**
+    * Copy source data to destination data.
+    */
+   void
+   copyData(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Swap data pointers (i.e., storage) between two data components.
+    */
+   void
+   swapData(
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data over multiple levels to specified output stream.
+    */
+   void
+   printData(
+      const int data_id,
+      std::ostream& s,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data component to given scalar.
+    */
+   void
+   setToScalar(
+      const int data_id,
+      const TYPE& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to source multiplied by given scalar, pointwise.
+    */
+   void
+   scale(
+      const int dst_id,
+      const TYPE& alpha,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Add scalar to each entry in source data and set destination to result.
+    */
+   void
+   addScalar(
+      const int dst_id,
+      const int src_id,
+      const TYPE& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to sum of two source components, pointwise.
+    */
+   void
+   add(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Subtract second source component from first source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   subtract(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination component to product of two source components, pointwise.
+    */
+   void
+   multiply(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Divide first data component by second source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   divide(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set each entry of destination component to reciprocal of corresponding
+    * source data component entry.
+    */
+   void
+   reciprocal(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + \beta s_2\f$, where \f$d\f$ is the destination patch
+    * data component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha, \beta\f$ are scalar values.
+    */
+   void
+   linearSum(
+      const int dst_id,
+      const TYPE& alpha,
+      const int src1_id,
+      const TYPE& beta,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axpy(
+      const int dst_id,
+      const TYPE& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 - s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axmy(
+      const int dst_id,
+      const TYPE& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination data to absolute value of source data, pointwise.
+    */
+   void
+   abs(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return minimum data value over all patches in the collection of levels.
+    */
+   TYPE
+   min(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return maximum data value over all patches in the collection of levels.
+    */
+   TYPE
+   max(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data entries to random values.  See the operations in the
+    * array data operation classes for each data type for details on the
+    * generation of the random values.
+    */
+   void
+   setRandomValues(
+      const int data_id,
+      const TYPE& width,
+      const TYPE& low,
+      const bool interior_only = true) const;
+
+   /**
+    * Return the total number of data values for the component on the set
+    * of hierarchy levels.  If the boolean argument is true, the number of
+    * elements will be summed over patch interiors in a unique way which
+    * avoids multiple counting of redundant values (recall the definition
+    * of node points on a patch interior).  If the boolean argument is false,
+    * all elements will be counted (including ghost values) over all patches.
+    */
+   int
+   numberOfEntries(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return sum of the control volumes associated with the data component.
+    * Note that if the ontrol volumes are set propery, this is equivalent to
+    * integrating a data component containing all ones over the collection of
+    * hierarchy levels.
+    */
+   double
+   sumControlVolumes(
+      const int data_id,
+      const int vol_id) const;
+
+   /**
+    * Return discrete \f$L_1\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( \| data_i \| cvol_i )\f$.  If the
+    * control volume is not defined (vol_id < 0), the return value is
+    * \f$\sum_i ( \| data_i \| )\f$.
+    * If local_only is true, the global reduction is not
+    * performed (thus each process will get only local results).
+    */
+   double
+   L1Norm(
+      const int data_id,
+      const int vol_id = -1,
+      bool local_only = false) const;
+
+   /**
+    * Return discrete \f$L_2\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sqrt{ \sum_i ( (data_i)^2 cvol_i ) }\f$.
+    * If the control volume is  not defined (vol_id < 0), the return value
+    * is \f$\sqrt{ \sum_i ( (data_i)^2 cvol_i ) }\f$.
+    * If local_only is true, the global reduction is not
+    * performed (thus each process will get only local results).
+    */
+   double
+   L2Norm(
+      const int data_id,
+      const int vol_id = -1,
+      bool local_only = false) const;
+
+   /**
+    * Return discrete weighted \f$L_2\f$-norm of the data using the control
+    * volume to weight the contribution of the data and weight entries to
+    * the sum.  That is, the return value is the sum \f$\sqrt{ \sum_i (
+    * (data_i * weight_i)^2 cvol_i ) }\f$.  If the control volume is not defined
+    * (vol_id < 0), the return value is
+    * \f$\sqrt{ \sum_i ( (data_i * weight_i)^2 ) }\f$.
+    */
+   double
+   weightedL2Norm(
+      const int data_id,
+      const int weight_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete root mean squared norm of the data.  If the control
+    * volume is defined, the return value is the \f$L_2\f$-norm divided by
+    * the square root of the sum of the control volumes.  Otherwise, the
+    * return value is the \f$L_2\f$-norm divided by the square root of the
+    * number of data entries.
+    */
+   double
+   RMSNorm(
+      const int data_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete weighted root mean squared norm of the data.  If the
+    * control volume is define, the return value is the weighted \f$L_2\f$-norm
+    * divided by the square root of the sum of the control volumes.  Otherwise,
+    * the return value is the weighted \f$L_2\f$-norm divided by the square root
+    * of the number of data entries.
+    */
+   double
+   weightedRMSNorm(
+      const int data_id,
+      const int weight_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return the \f$\max\f$-norm of the data using the control volume to weight
+    * the contribution of each data entry to the maximum.  That is, the return
+    * value is \f$\max_i ( \| data_i \| )\f$, where the max is over the data
+    * elements where \f$cvol_i > 0\f$.  If the control volume is undefined
+    * (vol_id < 0), it is ignored during the computation of the maximum.
+    * If local_only is true, the global reduction is not
+    * performed (thus each process will get only local results).
+    */
+   double
+   maxNorm(
+      const int data_id,
+      const int vol_id = -1,
+      bool local_only = false) const;
+
+   /**
+    * Return the dot product of the two data arrays using the control volume
+    * to weight the contribution of each product to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( data1_i * data2_i * cvol_i )\f$.
+    * If the control volume is undefined (vol_id < 0), it is ignored during
+    * the summation.  If local_only is true, the global reduction is not
+    * performed (thus each process will get only local results).
+    */
+   TYPE
+   dot(
+      const int data1_id,
+      const int data2_id,
+      const int vol_id = -1,
+      bool local_only = false) const;
+
+   /**
+    * Return the integral of the function represented by the data array.
+    * The return value is the sum \f$\sum_i ( data_i * vol_i )\f$.
+    */
+   TYPE
+   integral(
+      const int data_id,
+      const int vol_id) const;
+
+   /**
+    * Return 1 if \f$\|data2_i\| > 0\f$ and \f$data1_i * data2_i \leq 0\f$, for
+    * any \f$i\f$ in the set of patch data indices, where \f$cvol_i > 0\f$.  Otherwise,
+    * return 0.  If the control volume is undefined (vol_id < 0), all values
+    * on the patch interiors are considered.
+    */
+   int
+   computeConstrProdPos(
+      const int data1_id,
+      const int data2_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Wherever \f$cvol_i > 0\f$ in the set of patch data indices, set \f$dst_i = 1\f$
+    * if \f$\|src_i\| > \alpha\f$, and \f$dst_i = 0\f$ otherwise.  If the control
+    * volume is undefined (vol_id < 0), all values on the patch interiors
+    * are considered.
+    */
+   void
+   compareToScalar(
+      const int dst_id,
+      const int src_id,
+      const TYPE& alpha,
+      const int vol_id = -1) const;
+
+   /**
+    * Wherever \f$cvol_i > 0\f$ in the set of patch data indices, set
+    * \f$dst_i = 1/src_i\f$ if \f$src_i \neq 0\f$, and \f$dst_i = 0\f$ otherwise.
+    * If \f$dst_i = 0\f$ anywhere, 0 is the return value.  Otherwise 1 is returned.
+    * If the control volume is undefined (vol_id < 0), all values on the
+    * patch interiors are considered.
+    */
+   int
+   testReciprocal(
+      const int dst_id,
+      const int src_id,
+      const int vol_id = -1) const;
+
+   /*!
+    * @brief Compute max of "conditional" quotients of two arrays.
+    *
+    * Return the maximum of pointwise "conditional" quotients of the numerator
+    * and denominator.
+    *
+    * The "conditional" quotient is defined as |numerator/denominator|
+    * where the denominator is nonzero.  Otherwise, it is defined as
+    * |numerator|.
+    *
+    * @b Note: This method is currently intended to support the
+    * PETSc-2.1.6 vector wrapper only.  Please do not use it!
+    */
+   TYPE
+   maxPointwiseDivide(
+      const int numer_id,
+      const int denom_id,
+      bool local_only = false) const;
+
+   /*!
+    * @brief Compute min of quotients of two arrays.
+    *
+    * Return the minimum of pointwise quotients of the numerator
+    * and denominator.
+    *
+    * The quotient is defined as (numerator/denominator)
+    * where the denominator is nonzero.  When the denominator is zero, the
+    * entry is skipped.  If the denominator is always zero, the value of
+    * tbox::IEEE::getFLT_MAX() is returned (see @ref SAMRAI::tbox::IEEE).
+    *
+    * @b Note: This method is currently intended to support the
+    * SUNDIALS vector wrapper only.  Please do not use it!
+    */
+   TYPE
+   minPointwiseDivide(
+      const int numer_id,
+      const int denom_id,
+      bool local_only = false) const;
+private:
+   // The following are not implemented
+   HierarchyNodeDataOpsReal(
+      const HierarchyNodeDataOpsReal<TYPE>&);
+   void
+   operator = (
+      const HierarchyNodeDataOpsReal<TYPE>&);
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+   int d_coarsest_level;
+   int d_finest_level;
+   tbox::Array<tbox::Array<hier::BoxList> > d_nonoverlapping_node_boxes;
+
+   PatchNodeDataOpsReal<TYPE> d_patch_ops;
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/HierarchyNodeDataOpsReal.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchySideDataOpsComplex.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchySideDataOpsComplex.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1000 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for complex side data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchySideDataOpsComplex_C
+#define included_math_HierarchySideDataOpsComplex_C
+
+#include "SAMRAI/math/HierarchySideDataOpsComplex.h"
+#include "SAMRAI/hier/BoxUtilities.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/pdat/SideDataFactory.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include <typeinfo>
+#include <stdlib.h>
+#include <float.h>
+#include <math.h>
+
+namespace SAMRAI {
+namespace math {
+
+HierarchySideDataOpsComplex::HierarchySideDataOpsComplex(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level):
+   HierarchyDataOpsComplex()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+#endif
+   d_hierarchy = hierarchy;
+   if ((coarsest_level < 0) || (finest_level < 0)) {
+      if (d_hierarchy->getNumberOfLevels() == 0) {
+         d_coarsest_level = coarsest_level;
+         d_finest_level = finest_level;
+      } else {
+         resetLevels(0, d_hierarchy->getFinestLevelNumber());
+      }
+   } else {
+      resetLevels(coarsest_level, finest_level);
+   }
+}
+
+HierarchySideDataOpsComplex::~HierarchySideDataOpsComplex()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to set the hierarchy and level information.                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HierarchySideDataOpsComplex::setPatchHierarchy(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+
+   d_hierarchy = hierarchy;
+}
+
+void HierarchySideDataOpsComplex::resetLevels(
+   const int coarsest_level,
+   const int finest_level)
+{
+   int i;
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (finest_level >= coarsest_level)
+      && (finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   const tbox::Dimension& dim(d_hierarchy->getDim());
+
+   d_coarsest_level = coarsest_level;
+   d_finest_level = finest_level;
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      d_nonoverlapping_side_boxes[d].resizeArray(d_finest_level + 1);
+   }
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      hier::BoxArray side_boxes(dim);
+      const int n = level->getNumberOfPatches();
+
+      for (int nd = 0; nd < dim.getValue(); nd++) {
+         side_boxes = level->getBoxes();
+         for (i = 0; i < n; i++) {
+            side_boxes[i] =
+               pdat::SideGeometry::toSideBox(side_boxes[i], nd);
+         }
+         hier::BoxUtilities::makeNonOverlappingBoxLists(
+            d_nonoverlapping_side_boxes[nd][ln],
+            side_boxes);
+      }
+   }
+}
+
+const tbox::Pointer<hier::PatchHierarchy>
+HierarchySideDataOpsComplex::getPatchHierarchy() const
+{
+   return d_hierarchy;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic operations.                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HierarchySideDataOpsComplex::copyData(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<dcomplex> > s = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.copyData(d, s, box);
+      }
+   }
+}
+
+void HierarchySideDataOpsComplex::swapData(
+   const int data1_id,
+   const int data2_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   tbox::Pointer<pdat::SideDataFactory<dcomplex> >
+   d1fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data1_id);
+   TBOX_ASSERT(!d1fact.isNull());
+   tbox::Pointer<pdat::SideDataFactory<dcomplex> >
+   d2fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data2_id);
+   TBOX_ASSERT(!d2fact.isNull());
+   TBOX_ASSERT(d1fact->getDepth() == d2fact->getDepth());
+   TBOX_ASSERT(d1fact->getGhostCellWidth() ==
+      d2fact->getGhostCellWidth());
+   TBOX_ASSERT(d1fact->getDirectionVector() == d2fact->getDirectionVector());
+#endif
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         d_patch_ops.swapData(p, data1_id, data2_id);
+      }
+   }
+}
+
+void HierarchySideDataOpsComplex::printData(
+   const int data_id,
+   std::ostream& s,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   s << "Patch descriptor id = " << data_id << std::endl;
+   s << "Factory = " << typeid(*d_hierarchy->getPatchDescriptor()->
+                               getPatchDataFactory(data_id)).name()
+     << std::endl;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      s << "Level number = " << ln << std::endl;
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<dcomplex> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.printData(d, box, s);
+      }
+   }
+}
+
+void HierarchySideDataOpsComplex::setToScalar(
+   const int data_id,
+   const dcomplex& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<dcomplex> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.setToScalar(d, alpha, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic arithmetic operations.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HierarchySideDataOpsComplex::scale(
+   const int dst_id,
+   const dcomplex& alpha,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<dcomplex> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<dcomplex> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.scale(dst, alpha, src, box);
+      }
+   }
+}
+
+void HierarchySideDataOpsComplex::addScalar(
+   const int dst_id,
+   const int src_id,
+   const dcomplex& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<dcomplex> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<dcomplex> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.addScalar(dst, src, alpha, box);
+      }
+   }
+}
+
+void HierarchySideDataOpsComplex::add(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::SideData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.add(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchySideDataOpsComplex::subtract(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::SideData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.subtract(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchySideDataOpsComplex::multiply(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::SideData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.multiply(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchySideDataOpsComplex::divide(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::SideData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.divide(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchySideDataOpsComplex::reciprocal(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<dcomplex> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.reciprocal(d, src, box);
+      }
+   }
+}
+
+void HierarchySideDataOpsComplex::linearSum(
+   const int dst_id,
+   const dcomplex& alpha,
+   const int src1_id,
+   const dcomplex& beta,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::SideData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.linearSum(d, alpha, s1, beta, s2, box);
+      }
+   }
+}
+
+void HierarchySideDataOpsComplex::axpy(
+   const int dst_id,
+   const dcomplex& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::SideData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.axpy(d, alpha, s1, s2, box);
+      }
+   }
+}
+
+void HierarchySideDataOpsComplex::axmy(
+   const int dst_id,
+   const dcomplex& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<dcomplex> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<dcomplex> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::SideData<dcomplex> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.axmy(d, alpha, s1, s2, box);
+      }
+   }
+}
+
+void HierarchySideDataOpsComplex::abs(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<double> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<dcomplex> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.abs(d, src, box);
+      }
+   }
+}
+
+void HierarchySideDataOpsComplex::setRandomValues(
+   const int data_id,
+   const dcomplex& width,
+   const dcomplex& low,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<dcomplex> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.setRandomValues(d, width, low, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Generic norm and order operations.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int HierarchySideDataOpsComplex::numberOfEntries(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+   const tbox::Dimension& dim(d_hierarchy->getDim());
+
+   int entries = 0;
+
+   if (interior_only) {
+
+      tbox::Pointer<pdat::SideDataFactory<dcomplex> >
+      dfact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!dfact.isNull());
+#endif
+      const hier::IntVector& directions = dfact->getDirectionVector();
+
+      for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+         const int npatches = level->getNumberOfPatches();
+#ifdef DEBUG_CHECK_ASSERTIONS
+         for (int dc = 0; dc < dim.getValue(); dc++) {
+            TBOX_ASSERT(npatches == d_nonoverlapping_side_boxes[dc][ln].getSize());
+         }
+#endif
+         for (int il = 0; il < npatches; il++) {
+            tbox::List<hier::Box>::Iterator lb;
+            for (int eb = 0; eb < dim.getValue(); eb++) {
+               if (directions(eb)) {
+                  lb = ((d_nonoverlapping_side_boxes[eb][ln])[il]).listStart();
+                  for ( ; lb; lb++) {
+                     entries += lb().size();
+                  }
+               }
+            }
+         }
+      }
+
+      entries *= dfact->getDepth();
+
+   } else {
+
+      for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::Pointer<pdat::SideData<dcomplex> > d =
+               (*ip)->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            entries += d_patch_ops.numberOfEntries(d, d->getGhostBox());
+         }
+      }
+
+      int global_entries = entries;
+      if (mpi.getSize() > 1) {
+         mpi.Allreduce(&entries, &global_entries, 1, MPI_INT, MPI_SUM);
+      }
+      entries = global_entries;
+
+   }
+
+   return entries;
+}
+
+double HierarchySideDataOpsComplex::sumControlVolumes(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(vol_id >= 0);
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double sum = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<dcomplex> > d = p->getPatchData(data_id);
+         tbox::Pointer<pdat::SideData<double> > cv = p->getPatchData(vol_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!cv.isNull());
+#endif
+         hier::Box box = cv->getGhostBox();
+
+         sum += d_patch_ops.sumControlVolumes(d, cv, box);
+      }
+   }
+
+   double global_sum = sum;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&sum, &global_sum, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   return global_sum;
+}
+
+double HierarchySideDataOpsComplex::L1Norm(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<dcomplex> > d = p->getPatchData(data_id);
+         tbox::Pointer<pdat::SideData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            box = d->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         norm += d_patch_ops.L1Norm(d, box, cv);
+      }
+   }
+
+   double global_norm = norm;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&norm, &global_norm, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   return global_norm;
+}
+
+double HierarchySideDataOpsComplex::L2Norm(
+   const int data_id,
+   const int vol_id) const
+{
+   dcomplex dotprod = HierarchySideDataOpsComplex::dot(data_id,
+         data_id,
+         vol_id);
+
+   return sqrt(real(dotprod));
+}
+
+double HierarchySideDataOpsComplex::weightedL2Norm(
+   const int data_id,
+   const int wgt_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm_squared = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<dcomplex> > d = p->getPatchData(data_id);
+         tbox::Pointer<pdat::SideData<dcomplex> > w = p->getPatchData(wgt_id);
+         tbox::Pointer<pdat::SideData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            box = d->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         double pnorm = d_patch_ops.weightedL2Norm(d, w, box, cv);
+
+         norm_squared += pnorm * pnorm;
+      }
+   }
+
+   double global_norm_squared = norm_squared;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&norm_squared, &global_norm_squared, 1, MPI_INT, MPI_SUM);
+   }
+   return sqrt(global_norm_squared);
+}
+
+double HierarchySideDataOpsComplex::RMSNorm(
+   const int data_id,
+   const int vol_id) const
+{
+   double l2_norm = L2Norm(data_id, vol_id);
+
+   double volume = ((vol_id < 0) ? (double)numberOfEntries(data_id, true)
+                    : sumControlVolumes(data_id, vol_id));
+
+   double rms_norm = l2_norm / sqrt(volume);
+   return rms_norm;
+}
+
+double HierarchySideDataOpsComplex::weightedRMSNorm(
+   const int data_id,
+   const int wgt_id,
+   const int vol_id) const
+{
+
+   double l2_norm = weightedL2Norm(data_id, wgt_id, vol_id);
+
+   double volume = ((vol_id < 0) ? (double)numberOfEntries(data_id, true)
+                    : sumControlVolumes(data_id, vol_id));
+
+   double rms_norm = l2_norm / sqrt(volume);
+   return rms_norm;
+}
+
+double HierarchySideDataOpsComplex::maxNorm(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<dcomplex> > d = p->getPatchData(data_id);
+         tbox::Pointer<pdat::SideData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            box = d->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         norm = tbox::MathUtilities<double>::Max(norm,
+               d_patch_ops.maxNorm(d, box, cv));
+      }
+   }
+
+   double global_norm = norm;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&norm, &global_norm, 1, MPI_DOUBLE, MPI_MAX);
+   }
+   return global_norm;
+}
+
+dcomplex HierarchySideDataOpsComplex::dot(
+   const int data1_id,
+   const int data2_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   dcomplex dprod = dcomplex(0.0, 0.0);
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<dcomplex> > d1 =
+            p->getPatchData(data1_id);
+         tbox::Pointer<pdat::SideData<dcomplex> > d2 =
+            p->getPatchData(data2_id);
+         tbox::Pointer<pdat::SideData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d1.isNull());
+#endif
+            box = d1->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         dprod += d_patch_ops.dot(d1, d2, box, cv);
+      }
+   }
+
+   dcomplex global_dot = dprod;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&dprod, &global_dot, 1, MPI_DOUBLE_COMPLEX, MPI_SUM);
+   }
+   return global_dot;
+}
+
+dcomplex HierarchySideDataOpsComplex::integral(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   dcomplex local_integral = dcomplex(0.0, 0.0);
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<dcomplex> > data =
+            p->getPatchData(data_id);
+         tbox::Pointer<pdat::SideData<double> > vol = p->getPatchData(vol_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!data.isNull());
+         TBOX_ASSERT(!vol.isNull());
+#endif
+
+         hier::Box box = data->getGhostBox();
+
+         local_integral += d_patch_ops.integral(data, box, vol);
+      }
+   }
+
+   dcomplex global_integral = local_integral;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&local_integral, &global_integral, 1, MPI_DOUBLE_COMPLEX, MPI_SUM);
+   }
+   return global_integral;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchySideDataOpsComplex.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchySideDataOpsComplex.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,420 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for complex side data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchySideDataOpsComplex
+#define included_math_HierarchySideDataOpsComplex
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/math/HierarchyDataOpsComplex.h"
+#include "SAMRAI/math/PatchSideDataOpsComplex.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class HierarchySideDataOpsComplex provides a collection of
+ * operations that manipulate complex side-centered patch data components over
+ * multiple levels in an AMR hierarchy.  It is derived from the abstract
+ * base class HierarchyDataOpsComplex which defines the interface to
+ * similar operations for side-centered, side-centered, side-centered patch
+ * data objects where the data is complex.   The operations include basic
+ * arithmetic and norms.  On each patch, the operations are performed by the
+ * PatchSideDataOpsComplex data member.
+ *
+ * The patch hierarchy and set of levels within that hierarcy over which the
+ * operations will be performed are set in the constructor.  However, note
+ * that the constructor accepts default arguments for the coarsest and finest
+ * level numbers.  If the level numbers are not specified when calling the
+ * constructor the levels which exist in the hierarchy will be assumed in
+ * all operations.  The hierarchy and levels may be changed at any time using
+ * the proper member functions.
+ *
+ * Note that, when it makes sense, an operation accept a boolean argument
+ * which indicates whether the operation should be performed on all of the
+ * data or just those data elements corresponding to the patch interiors.
+ * If no boolean argument is provided, the default behavior is to treat only
+ * the patch interiors.  Also, a similar set of operations for real (double
+ * and float) and integer side-centered data is provided in the classes
+ * HierarchySideDataOpsReal and HierarchySideDataOpsInteger,
+ * respectively.
+ *
+ * @see math::PatchSideDataOpsComplex
+ */
+
+class HierarchySideDataOpsComplex:public HierarchyDataOpsComplex
+{
+public:
+   /**
+    * The constructor for the HierarchySideDataOpsComplex class sets
+    * the default patch hierarchy and coarsest and finest patch levels
+    * in that hierarchy over which operations will be performed.  The
+    * hierarchy and operations may be reset using the member fuctions
+    * setPatchHierarchy() and resetLevels() below.  If no level number
+    * arguments are given here, the levels over which the operations will
+    * be performed are those already existing in the hierarchy.  If the
+    * hierarchy level configuration changes, the operations must be explicitly
+    * reset by calling the resetLevels() function.
+    */
+   explicit HierarchySideDataOpsComplex(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int coarsest_level = -1,
+      const int finest_level = -1);
+
+   /**
+    * Virtual destructor for the HierarchySideDataOpsComplex class.
+    */
+   virtual ~HierarchySideDataOpsComplex();
+
+   /**
+    * Reset patch hierarchy over which operations occur.
+    */
+   void
+   setPatchHierarchy(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+   /**
+    * Reset range of patch levels over which operations occur.
+    * Levels must exist in hierarchy or an assertion will result.
+    */
+   void
+   resetLevels(
+      const int coarsest_level,
+      const int finest_level);
+
+   /**
+    * Return const pointer to patch hierarchy associated with operations.
+    */
+   const tbox::Pointer<hier::PatchHierarchy>
+   getPatchHierarchy() const;
+
+   /**
+    * Copy source data to destination data.
+    */
+   void
+   copyData(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Swap data pointers (i.e., storage) between two data components.
+    */
+   void
+   swapData(
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data over multiple levels to specified output stream.
+    */
+   void
+   printData(
+      const int data_id,
+      std::ostream& s,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data component to given scalar.
+    */
+   void
+   setToScalar(
+      const int data_id,
+      const dcomplex& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to source multiplied by given scalar, pointwise.
+    */
+   void
+   scale(
+      const int dst_id,
+      const dcomplex& alpha,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Add scalar to each entry in source data and set destination to result.
+    */
+   void
+   addScalar(
+      const int dst_id,
+      const int src_id,
+      const dcomplex& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to sum of two source components, pointwise.
+    */
+   void
+   add(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Subtract second source component from first source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   subtract(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination component to product of two source components, pointwise.
+    */
+   void
+   multiply(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Divide first data component by second source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   divide(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set each entry of destination component to reciprocal of corresponding
+    * source data component entry.
+    */
+   void
+   reciprocal(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + \beta s_2\f$, where \f$d\f$ is the destination patch
+    * data component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha, \beta\f$ are scalar values.
+    */
+   void
+   linearSum(
+      const int dst_id,
+      const dcomplex& alpha,
+      const int src1_id,
+      const dcomplex& beta,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axpy(
+      const int dst_id,
+      const dcomplex& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 - s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axmy(
+      const int dst_id,
+      const dcomplex& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination data to absolute value of source data, pointwise.
+    * Note that the source data must be dcomplex and the destination must
+    * be double.
+    */
+   void
+   abs(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data entries to random values.  See the operations in the
+    * array data operation classes for details on the generation of
+    * the random values.
+    */
+   void
+   setRandomValues(
+      const int data_id,
+      const dcomplex& width,
+      const dcomplex& low,
+      const bool interior_only = true) const;
+
+   /**
+    * Return the total number of data values for the component on the set
+    * of hierarchy levels.  If the boolean argument is true, the number of
+    * elements will be summed over patch interiors in a unique way which
+    * avoids multiple counting of redundant values (recall the definition
+    * of node points on a patch interior).  If the boolean argument is false,
+    * all elements will be counted (including ghost values) over all patches.
+    */
+   int
+   numberOfEntries(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return sum of the control volumes associated with the data component.
+    * Note that if the ontrol volumes are set propery, this is equivalent to
+    * integrating a data component containing all ones over the collection of
+    * hierarchy levels.
+    */
+   double
+   sumControlVolumes(
+      const int data_id,
+      const int vol_id) const;
+
+   /**
+    * Return discrete \f$L_1\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( \sqrt{data_i * \bar{data_i}}*cvol_i )\f$.
+    * If the control volume is undefined (vol_id < 0), the
+    * return value is \f$\sum_i ( \sqrt{data_i * \bar{data_i}} )\f$.
+    */
+   double
+   L1Norm(
+      const int data_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete \f$L_2\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum
+    * \f$\sqrt{ \sum_i ( data_i * \bar{data_i} cvol_i ) }\f$.
+    * If the control volume is undefined (vol_id < 0), the return value is
+    * \f$\sqrt{ \sum_i ( data_i * \bar{data_i} ) }\f$.
+    */
+   double
+   L2Norm(
+      const int data_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete weighted \f$L_2\f$-norm of the data using the control
+    * volume to weight the contribution of the data and weight entries to
+    * the sum.  That is, the return value is the sum \f$\sqrt{ \sum_i (
+    * (data_i * wgt_i) * \bar{(data_i * wgt_i)} cvol_i ) }\f$.  If the control
+    * volume is undefined (vol_id < 0), the return value is
+    * \f$\sqrt{ \sum_i ( (data_i * wgt_i) * \bar{(data_i * wgt_i)} cvol_i ) }\f$.
+    */
+   double
+   weightedL2Norm(
+      const int data_id,
+      const int weight_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete root mean squared norm of the data.  If the control
+    * volume is specified (vol_id >= 0), the return value is the \f$L_2\f$-norm
+    * divided by the square root of the sum of the control volumes.  Otherwise,
+    * the return value is the \f$L_2\f$-norm divided by the square root of the
+    * number of data entries.
+    */
+   double
+   RMSNorm(
+      const int data_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete weighted root mean squared norm of the data.  If the
+    * control volume is specified (vol_id >= 0), the return value is the
+    * weighted \f$L_2\f$-norm divided by the square root of the sum of the
+    * control volumes.  Otherwise, the return value is the weighted \f$L_2\f$-norm
+    * divided by the square root of the number of data entries.
+    */
+   double
+   weightedRMSNorm(
+      const int data_id,
+      const int weight_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return the \f$\max\f$-norm of the data using the control volume to weight
+    * the contribution of each data entry to the maximum.  That is, the return
+    * value is \f$\max_i ( \sqrt{data_i * \bar{data_i}} )\f$, where the max is
+    * over the data elements where \f$cvol_i > 0\f$.  If the control volume is
+    * undefined (vol_id < 0), it is ignored during the computation of the
+    * maximum.
+    */
+   double
+   maxNorm(
+      const int data_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return the dot product of the two data arrays using the control volume
+    * to weight the contribution of each product to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( data1_i * \bar{data2_i} * cvol_i )\f$.
+    * If the control volume is undefined (vol_id < 0), it is ignored during
+    * the summation.
+    */
+   dcomplex
+   dot(
+      const int data1_id,
+      const int data2_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return the integral of the function represented by the data array.
+    * The return value is the sum \f$\sum_i ( data_i * vol_i )\f$.
+    */
+   dcomplex
+   integral(
+      const int data_id,
+      const int vol_id) const;
+
+private:
+   // The following are not implemented
+   HierarchySideDataOpsComplex(
+      const HierarchySideDataOpsComplex&);
+   void
+   operator = (
+      const HierarchySideDataOpsComplex&);
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+   int d_coarsest_level;
+   int d_finest_level;
+   tbox::Array<tbox::Array<hier::BoxList> > d_nonoverlapping_side_boxes[tbox::
+                                                                        Dimension
+                                                                        ::
+                                                                        MAXIMUM_DIMENSION_VALUE
+   ];
+
+   PatchSideDataOpsComplex d_patch_ops;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchySideDataOpsInteger.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchySideDataOpsInteger.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,772 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for integer side data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchySideDataOpsInteger_C
+#define included_math_HierarchySideDataOpsInteger_C
+
+#include "SAMRAI/math/HierarchySideDataOpsInteger.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/BoxUtilities.h"
+#include "SAMRAI/pdat/SideDataFactory.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#include <typeinfo>
+#include <stdlib.h>
+#include <float.h>
+#include <math.h>
+
+namespace SAMRAI {
+namespace math {
+
+HierarchySideDataOpsInteger::HierarchySideDataOpsInteger(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level):
+   HierarchyDataOpsInteger()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+#endif
+   d_hierarchy = hierarchy;
+   if ((coarsest_level < 0) || (finest_level < 0)) {
+      if (d_hierarchy->getNumberOfLevels() == 0) {
+         d_coarsest_level = coarsest_level;
+         d_finest_level = finest_level;
+      } else {
+         resetLevels(0, d_hierarchy->getFinestLevelNumber());
+      }
+   } else {
+      resetLevels(coarsest_level, finest_level);
+   }
+}
+
+HierarchySideDataOpsInteger::~HierarchySideDataOpsInteger()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Rotuines to set the hierarchy and level information.                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HierarchySideDataOpsInteger::setPatchHierarchy(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+
+   d_hierarchy = hierarchy;
+}
+
+void HierarchySideDataOpsInteger::resetLevels(
+   const int coarsest_level,
+   const int finest_level)
+{
+   int i;
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (finest_level >= coarsest_level)
+      && (finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   const tbox::Dimension& dim(d_hierarchy->getDim());
+
+   d_coarsest_level = coarsest_level;
+   d_finest_level = finest_level;
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      d_nonoverlapping_side_boxes[d].resizeArray(d_finest_level + 1);
+   }
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      hier::BoxArray side_boxes(dim);
+      const int n = level->getNumberOfPatches();
+
+      for (int nd = 0; nd < dim.getValue(); nd++) {
+         side_boxes = level->getBoxes();
+         for (i = 0; i < n; i++) {
+            side_boxes[i] =
+               pdat::SideGeometry::toSideBox(side_boxes[i], nd);
+         }
+         hier::BoxUtilities::makeNonOverlappingBoxLists(
+            d_nonoverlapping_side_boxes[nd][ln],
+            side_boxes);
+      }
+   }
+}
+
+const tbox::Pointer<hier::PatchHierarchy>
+HierarchySideDataOpsInteger::getPatchHierarchy() const
+{
+   return d_hierarchy;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic operations.                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int HierarchySideDataOpsInteger::numberOfEntries(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+   const tbox::Dimension& dim(d_hierarchy->getDim());
+
+   int entries = 0;
+
+   if (interior_only) {
+
+      tbox::Pointer<pdat::SideDataFactory<int> >
+      dfact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!dfact.isNull());
+#endif
+      const hier::IntVector& directions = dfact->getDirectionVector();
+
+      for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+         const int npatches = level->getNumberOfPatches();
+#ifdef DEBUG_CHECK_ASSERTIONS
+         for (int dc = 0; dc < dim.getValue(); dc++) {
+            TBOX_ASSERT(npatches == d_nonoverlapping_side_boxes[dc][ln].getSize());
+         }
+#endif
+         for (int il = 0; il < npatches; il++) {
+            tbox::List<hier::Box>::Iterator lb;
+            for (int eb = 0; eb < dim.getValue(); eb++) {
+               if (directions(eb)) {
+                  lb = ((d_nonoverlapping_side_boxes[eb][ln])[il]).listStart();
+                  for ( ; lb; lb++) {
+                     entries += lb().size();
+                  }
+               }
+            }
+         }
+      }
+
+      entries *= dfact->getDepth();
+
+   } else {
+
+      for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::Pointer<pdat::SideData<int> > d =
+               (*ip)->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            entries += d_patch_ops.numberOfEntries(d, d->getGhostBox());
+         }
+      }
+
+      int global_entries = entries;
+      if (mpi.getSize() > 1) {
+         mpi.Allreduce(&entries, &global_entries, 1, MPI_INT, MPI_SUM);
+      }
+      entries = global_entries;
+
+   }
+
+   return entries;
+}
+
+void HierarchySideDataOpsInteger::copyData(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<int> > s = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.copyData(d, s, box);
+      }
+   }
+}
+
+void HierarchySideDataOpsInteger::swapData(
+   const int data1_id,
+   const int data2_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   tbox::Pointer<pdat::SideDataFactory<int> >
+   d1fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data1_id);
+   TBOX_ASSERT(!d1fact.isNull());
+   tbox::Pointer<pdat::SideDataFactory<int> >
+   d2fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data2_id);
+   TBOX_ASSERT(!d2fact.isNull());
+   TBOX_ASSERT(d1fact->getDepth() == d2fact->getDepth());
+   TBOX_ASSERT(d1fact->getGhostCellWidth() ==
+      d2fact->getGhostCellWidth());
+   TBOX_ASSERT(d1fact->getDirectionVector() == d2fact->getDirectionVector());
+#endif
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         d_patch_ops.swapData(p, data1_id, data2_id);
+      }
+   }
+}
+
+void HierarchySideDataOpsInteger::printData(
+   const int data_id,
+   std::ostream& s,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   s << "Patch descriptor id = " << data_id << std::endl;
+   s << "Factory = " << typeid(*d_hierarchy->getPatchDescriptor()->
+                               getPatchDataFactory(data_id)).name()
+     << std::endl;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      s << "Level number = " << ln << std::endl;
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<int> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.printData(d, box, s);
+      }
+   }
+}
+
+void HierarchySideDataOpsInteger::setToScalar(
+   const int data_id,
+   const int& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<int> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.setToScalar(d, alpha, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic arithmetic operations.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HierarchySideDataOpsInteger::scale(
+   const int dst_id,
+   const int& alpha,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<int> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<int> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.scale(dst, alpha, src, box);
+      }
+   }
+}
+
+void HierarchySideDataOpsInteger::addScalar(
+   const int dst_id,
+   const int src_id,
+   const int& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<int> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<int> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.addScalar(dst, src, alpha, box);
+      }
+   }
+}
+
+void HierarchySideDataOpsInteger::add(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::SideData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.add(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchySideDataOpsInteger::subtract(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::SideData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.subtract(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchySideDataOpsInteger::multiply(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::SideData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.multiply(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchySideDataOpsInteger::divide(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::SideData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.divide(d, s1, s2, box);
+      }
+   }
+}
+
+void HierarchySideDataOpsInteger::reciprocal(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<int> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.reciprocal(d, src, box);
+      }
+   }
+}
+
+void HierarchySideDataOpsInteger::linearSum(
+   const int dst_id,
+   const int& alpha,
+   const int src1_id,
+   const int& beta,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::SideData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.linearSum(d, alpha, s1, beta, s2, box);
+      }
+   }
+}
+
+void HierarchySideDataOpsInteger::axpy(
+   const int dst_id,
+   const int& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::SideData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.axpy(d, alpha, s1, s2, box);
+      }
+   }
+}
+
+void HierarchySideDataOpsInteger::axmy(
+   const int dst_id,
+   const int& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<int> > s1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::SideData<int> > s2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.axmy(d, alpha, s1, s2, box);
+      }
+   }
+}
+
+void HierarchySideDataOpsInteger::abs(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<int> > d = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<int> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.abs(d, src, box);
+      }
+   }
+}
+
+int HierarchySideDataOpsInteger::min(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int minval = tbox::MathUtilities<int>::getMax();
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<int> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         minval = tbox::MathUtilities<int>::Min(minval,
+               d_patch_ops.min(d, box));
+      }
+   }
+
+   int global_min = minval;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&minval, &global_min, 1, MPI_INT, MPI_MIN);
+   }
+   return global_min;
+}
+
+int HierarchySideDataOpsInteger::max(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int maxval = -(tbox::MathUtilities<int>::getMax());
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<int> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         maxval = tbox::MathUtilities<int>::Max(maxval,
+               d_patch_ops.min(d, box));
+      }
+   }
+
+   int global_max = maxval;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&maxval, &global_max, 1, MPI_INT, MPI_MAX);
+   }
+   return global_max;
+}
+
+void HierarchySideDataOpsInteger::setRandomValues(
+   const int data_id,
+   const int& width,
+   const int& low,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<int> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.setRandomValues(d, width, low, box);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchySideDataOpsInteger.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchySideDataOpsInteger.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,323 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for integer side data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchySideDataOpsInteger
+#define included_math_HierarchySideDataOpsInteger
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/math/HierarchyDataOpsInteger.h"
+#include "SAMRAI/math/PatchSideDataOpsInteger.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class HierarchySideDataOpsInteger provides a collection of
+ * operations that manipulate integer side-centered patch data components over
+ * multiple levels in an AMR hierarchy.  It is derived from the abstract
+ * base class HierarchyDataOpsInteger which defines the interface to
+ * similar operations for side-centered, side-centered, side-centered patch
+ * data objects where the data is of type integer.  The operations include
+ * basic arithmetic and some ordering operations.  On each patch, the
+ * operations are performed by the PatchSideDataOpsInteger data member.
+ *
+ * The patch hierarchy and set of levels within that hierarcy over which the
+ * operations will be performed are set in the constructor.  However, note
+ * that the constructor accepts default arguments for the coarsest and finest
+ * level numbers.  If the level numbers are not specified when calling the
+ * constructor the levels which exist in the hierarchy will be assumed in
+ * all operations.  The hierarchy and levels may be changed at any time using
+ * the proper member functions.
+ *
+ * Note that, when it makes sense, an operation accept a boolean argument
+ * which indicates whether the operation should be performed on all of the
+ * data or just those data elements corresponding to the patch interiors.
+ * If no boolean argument is provided, the default behavior is to treat only
+ * the patch interiors.  Also, a similar set of operations for real (double
+ * and float) and complex side-centered data is provided in the classes
+ * HierarchySideDataOpsReal and HierarchySideDataOpsComplex,
+ * respectively.
+ *
+ * @see math::PatchSideDataOpsInteger
+ */
+
+class HierarchySideDataOpsInteger:public HierarchyDataOpsInteger
+{
+public:
+   /**
+    * The constructor for the HierarchySideDataOpsInteger class sets
+    * the default patch hierarchy and coarsest and finest patch levels
+    * in that hierarchy over which operations will be performed.  The
+    * hierarchy and operations may be reset using the member fuctions
+    * setPatchHierarchy() and resetLevels() below.  If no level number
+    * arguments are given here, the levels over which the operations will
+    * be performed are those already existing in the hierarchy.  If the
+    * hierarchy level configuration changes, the operations must be explicitly
+    * reset by calling the resetLevels() function.
+    */
+   explicit HierarchySideDataOpsInteger(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int coarsest_level = -1,
+      const int finest_level = -1);
+
+   /**
+    * Virtual destructor for the HierarchySideDataOpsInteger class.
+    */
+   virtual ~HierarchySideDataOpsInteger();
+
+   /**
+    * Reset patch hierarchy over which operations occur.
+    */
+   void
+   setPatchHierarchy(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+   /**
+    * Reset range of patch levels over which operations occur.
+    * Levels must exist in hierarchy or an assertion will result.
+    */
+   void
+   resetLevels(
+      const int coarsest_level,
+      const int finest_level);
+
+   /**
+    * Return const pointer to patch hierarchy associated with operations.
+    */
+   const tbox::Pointer<hier::PatchHierarchy>
+   getPatchHierarchy() const;
+
+   /**
+    * Return the total number of data values for the component on the set
+    * of hierarchy levels.  If the boolean argument is true, the number of
+    * elements will be summed over patch interiors in a unique way which
+    * avoids multiple counting of redundant values (recall the definition
+    * of node points on a patch interior).  If the boolean argument is false,
+    * all elements will be counted (including ghost values) over all patches.
+    */
+   int
+   numberOfEntries(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Copy source data to destination data.
+    */
+   void
+   copyData(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Swap data pointers (i.e., storage) between two data components.
+    */
+   void
+   swapData(
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data over multiple levels to specified output stream.
+    */
+   void
+   printData(
+      const int data_id,
+      std::ostream& s,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data component to given scalar.
+    */
+   void
+   setToScalar(
+      const int data_id,
+      const int& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to source multiplied by given scalar, pointwise.
+    */
+   void
+   scale(
+      const int dst_id,
+      const int& alpha,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Add scalar to each entry in source data and set destination to result.
+    */
+   void
+   addScalar(
+      const int dst_id,
+      const int src_id,
+      const int& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to sum of two source components, pointwise.
+    */
+   void
+   add(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Subtract second source component from first source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   subtract(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination component to product of two source components, pointwise.
+    */
+   void
+   multiply(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Divide first data component by second source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   divide(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set each entry of destination component to reciprocal of corresponding
+    * source data component entry.
+    */
+   void
+   reciprocal(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + \beta s_2\f$, where \f$d\f$ is the destination patch
+    * data component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha, \beta\f$ are scalar values.
+    */
+   void
+   linearSum(
+      const int dst_id,
+      const int& alpha,
+      const int src1_id,
+      const int& beta,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axpy(
+      const int dst_id,
+      const int& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 - s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axmy(
+      const int dst_id,
+      const int& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination data to absolute value of source data, pointwise.
+    */
+   void
+   abs(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return minimum data value over all patches in the collection of levels.
+    */
+   int
+   min(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return maximum data value over all patches in the collection of levels.
+    */
+   int
+   max(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data entries to random values.  See the operations in the
+    * array data operation classes for details on the generation of
+    * the random values.
+    */
+   void
+   setRandomValues(
+      const int data_id,
+      const int& width,
+      const int& low,
+      const bool interior_only = true) const;
+
+private:
+   // The following are not implemented
+   HierarchySideDataOpsInteger(
+      const HierarchySideDataOpsInteger&);
+   void
+   operator = (
+      const HierarchySideDataOpsInteger&);
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+   int d_coarsest_level;
+   int d_finest_level;
+   tbox::Array<tbox::Array<hier::BoxList> > d_nonoverlapping_side_boxes[tbox::
+                                                                        Dimension
+                                                                        ::
+                                                                        MAXIMUM_DIMENSION_VALUE
+   ];
+
+   PatchSideDataOpsInteger d_patch_ops;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchySideDataOpsReal.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchySideDataOpsReal.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1355 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations for real side data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchySideDataOpsReal_C
+#define included_math_HierarchySideDataOpsReal_C
+
+#include "SAMRAI/math/HierarchySideDataOpsReal.h"
+#include "SAMRAI/hier/BoxUtilities.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/pdat/SideDataFactory.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include <typeinfo>
+#include <stdlib.h>
+#include <float.h>
+#include <math.h>
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+HierarchySideDataOpsReal<TYPE>::HierarchySideDataOpsReal(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level):
+   HierarchyDataOpsReal<TYPE>()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+#endif
+   d_hierarchy = hierarchy;
+   if ((coarsest_level < 0) || (finest_level < 0)) {
+      if (d_hierarchy->getNumberOfLevels() == 0) {
+         d_coarsest_level = coarsest_level;
+         d_finest_level = finest_level;
+      } else {
+         resetLevels(0, d_hierarchy->getFinestLevelNumber());
+      }
+   } else {
+      resetLevels(coarsest_level, finest_level);
+   }
+}
+
+template<class TYPE>
+HierarchySideDataOpsReal<TYPE>::~HierarchySideDataOpsReal()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to set the hierarchy and level informtation.                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void HierarchySideDataOpsReal<TYPE>::setPatchHierarchy(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+
+   d_hierarchy = hierarchy;
+}
+
+template<class TYPE>
+void HierarchySideDataOpsReal<TYPE>::resetLevels(
+   const int coarsest_level,
+   const int finest_level)
+{
+   int i;
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (finest_level >= coarsest_level)
+      && (finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   const tbox::Dimension& dim(d_hierarchy->getDim());
+
+   d_coarsest_level = coarsest_level;
+   d_finest_level = finest_level;
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      d_nonoverlapping_side_boxes[d].resizeArray(d_finest_level + 1);
+   }
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      hier::BoxArray side_boxes(dim);
+      const int n = level->getNumberOfPatches();
+
+      for (int nd = 0; nd < dim.getValue(); nd++) {
+         side_boxes = level->getBoxes();
+         for (i = 0; i < n; i++) {
+            side_boxes[i] =
+               pdat::SideGeometry::toSideBox(side_boxes[i], nd);
+         }
+         hier::BoxUtilities::makeNonOverlappingBoxLists(
+            d_nonoverlapping_side_boxes[nd][ln],
+            side_boxes);
+      }
+   }
+}
+
+template<class TYPE>
+const tbox::Pointer<hier::PatchHierarchy>
+HierarchySideDataOpsReal<TYPE>::getPatchHierarchy() const
+{
+   return d_hierarchy;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The following are private and cannot be used, but they are defined    *
+ * here for compilers that require that every template declaration have  *
+ * a definition (a stupid requirement, if you ask me).                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+HierarchySideDataOpsReal<TYPE>::HierarchySideDataOpsReal(
+   const HierarchySideDataOpsReal<TYPE>& foo):
+   HierarchyDataOpsReal<TYPE>()
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void HierarchySideDataOpsReal<TYPE>::operator = (
+   const HierarchySideDataOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic operations.                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void HierarchySideDataOpsReal<TYPE>::copyData(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<TYPE> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.copyData(dst, src, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchySideDataOpsReal<TYPE>::swapData(
+   const int data1_id,
+   const int data2_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   tbox::Pointer<pdat::SideDataFactory<TYPE> >
+   d1fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data1_id);
+   TBOX_ASSERT(!d1fact.isNull());
+   tbox::Pointer<pdat::SideDataFactory<TYPE> >
+   d2fact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data2_id);
+   TBOX_ASSERT(!d2fact.isNull());
+   TBOX_ASSERT(d1fact->getDepth() == d2fact->getDepth());
+   TBOX_ASSERT(d1fact->getGhostCellWidth() ==
+      d2fact->getGhostCellWidth());
+   TBOX_ASSERT(d1fact->getDirectionVector() == d2fact->getDirectionVector());
+#endif
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         d_patch_ops.swapData(p, data1_id, data2_id);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchySideDataOpsReal<TYPE>::printData(
+   const int data_id,
+   std::ostream& s,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   s << "Patch descriptor id = " << data_id << std::endl;
+   s << "Factory = " << typeid(*d_hierarchy->getPatchDescriptor()->
+                               getPatchDataFactory(data_id)).name()
+     << std::endl;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      s << "Level number = " << ln << std::endl;
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.printData(d, box, s);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchySideDataOpsReal<TYPE>::setToScalar(
+   const int data_id,
+   const TYPE& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         d_patch_ops.setToScalar(d, alpha, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Basic generic arithmetic operations.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void HierarchySideDataOpsReal<TYPE>::scale(
+   const int dst_id,
+   const TYPE& alpha,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<TYPE> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.scale(dst, alpha, src, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchySideDataOpsReal<TYPE>::addScalar(
+   const int dst_id,
+   const int src_id,
+   const TYPE& alpha,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<TYPE> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.addScalar(dst, src, alpha, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchySideDataOpsReal<TYPE>::add(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::SideData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.add(dst, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchySideDataOpsReal<TYPE>::subtract(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::SideData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.subtract(dst, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchySideDataOpsReal<TYPE>::multiply(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::SideData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.multiply(dst, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchySideDataOpsReal<TYPE>::divide(
+   const int dst_id,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::SideData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.divide(dst, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchySideDataOpsReal<TYPE>::reciprocal(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<TYPE> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.reciprocal(dst, src, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchySideDataOpsReal<TYPE>::linearSum(
+   const int dst_id,
+   const TYPE& alpha,
+   const int src1_id,
+   const TYPE& beta,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::SideData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.linearSum(dst, alpha, src1, beta, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchySideDataOpsReal<TYPE>::axpy(
+   const int dst_id,
+   const TYPE& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::SideData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.axpy(dst, alpha, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchySideDataOpsReal<TYPE>::axmy(
+   const int dst_id,
+   const TYPE& alpha,
+   const int src1_id,
+   const int src2_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<TYPE> > src1 = p->getPatchData(src1_id);
+         tbox::Pointer<pdat::SideData<TYPE> > src2 = p->getPatchData(src2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.axmy(dst, alpha, src1, src2, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchySideDataOpsReal<TYPE>::abs(
+   const int dst_id,
+   const int src_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<TYPE> > src = p->getPatchData(src_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!dst.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : dst->getGhostBox());
+
+         d_patch_ops.abs(dst, src, box);
+      }
+   }
+}
+
+template<class TYPE>
+void HierarchySideDataOpsReal<TYPE>::setRandomValues(
+   const int data_id,
+   const TYPE& width,
+   const TYPE& low,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > data = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!data.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : data->getGhostBox());
+
+         d_patch_ops.setRandomValues(data, width, low, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Generic norm and order operations.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+int HierarchySideDataOpsReal<TYPE>::numberOfEntries(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+   const tbox::Dimension& dim(d_hierarchy->getDim());
+
+   int entries = 0;
+
+   if (interior_only) {
+
+      tbox::Pointer<pdat::SideDataFactory<TYPE> >
+      dfact = d_hierarchy->getPatchDescriptor()->getPatchDataFactory(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!dfact.isNull());
+#endif
+      const hier::IntVector& directions = dfact->getDirectionVector();
+
+      for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+         const int npatches = level->getNumberOfPatches();
+#ifdef DEBUG_CHECK_ASSERTIONS
+         for (int dc = 0; dc < dim.getValue(); dc++) {
+            TBOX_ASSERT(npatches == d_nonoverlapping_side_boxes[dc][ln].getSize());
+         }
+#endif
+         for (int il = 0; il < npatches; il++) {
+            tbox::List<hier::Box>::Iterator lb;
+            for (int eb = 0; eb < dim.getValue(); eb++) {
+               if (directions(eb)) {
+                  lb = ((d_nonoverlapping_side_boxes[eb][ln])[il]).listStart();
+                  for ( ; lb; lb++) {
+                     entries += lb().size();
+                  }
+               }
+            }
+         }
+      }
+
+      entries *= dfact->getDepth();
+
+   } else {
+
+      for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::Pointer<pdat::SideData<TYPE> > d =
+               (*ip)->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!d.isNull());
+#endif
+            entries += d_patch_ops.numberOfEntries(d, d->getGhostBox());
+         }
+      }
+
+      int global_entries = entries;
+      if (mpi.getSize() > 1) {
+         mpi.Allreduce(&entries, &global_entries, 1, MPI_INT, MPI_SUM);
+      }
+      entries = global_entries;
+
+   }
+
+   return entries;
+}
+
+template<class TYPE>
+double HierarchySideDataOpsReal<TYPE>::sumControlVolumes(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(vol_id >= 0);
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double sum = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > data = p->getPatchData(data_id);
+         tbox::Pointer<pdat::SideData<double> > cv = p->getPatchData(vol_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!cv.isNull());
+#endif
+         hier::Box box = cv->getGhostBox();
+
+         sum += d_patch_ops.sumControlVolumes(data, cv, box);
+      }
+   }
+
+   double global_sum = sum;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&sum, &global_sum, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   return global_sum;
+}
+
+template<class TYPE>
+double HierarchySideDataOpsReal<TYPE>::L1Norm(
+   const int data_id,
+   const int vol_id,
+   bool local_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > data = p->getPatchData(data_id);
+         tbox::Pointer<pdat::SideData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!data.isNull());
+#endif
+            box = data->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         norm += d_patch_ops.L1Norm(data, box, cv);
+      }
+   }
+
+   if (!local_only) {
+      double global_norm = norm;
+      if (mpi.getSize() > 1) {
+         mpi.Allreduce(&norm, &global_norm, 1, MPI_DOUBLE, MPI_SUM);
+      }
+      norm = global_norm;
+   }
+   return norm;
+}
+
+template<class TYPE>
+double HierarchySideDataOpsReal<TYPE>::L2Norm(
+   const int data_id,
+   const int vol_id,
+   bool local_only) const
+{
+   double norm_squared = HierarchySideDataOpsReal<TYPE>::dot(data_id,
+         data_id,
+         vol_id,
+         local_only);
+
+   return sqrt(norm_squared);
+}
+
+template<class TYPE>
+double HierarchySideDataOpsReal<TYPE>::weightedL2Norm(
+   const int data_id,
+   const int wgt_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm_squared = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > data = p->getPatchData(data_id);
+         tbox::Pointer<pdat::SideData<TYPE> > weight = p->getPatchData(wgt_id);
+         tbox::Pointer<pdat::SideData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!data.isNull());
+#endif
+            box = data->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         double pnorm = d_patch_ops.weightedL2Norm(data, weight, box, cv);
+
+         norm_squared += pnorm * pnorm;
+      }
+   }
+
+   double global_norm_squared = norm_squared;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&norm_squared, &global_norm_squared, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   return sqrt(global_norm_squared);
+}
+
+template<class TYPE>
+double HierarchySideDataOpsReal<TYPE>::RMSNorm(
+   const int data_id,
+   const int vol_id) const
+{
+   double l2_norm = L2Norm(data_id, vol_id);
+
+   double volume = ((vol_id < 0) ? (double)numberOfEntries(data_id, true)
+                    : sumControlVolumes(data_id, vol_id));
+
+   double rms_norm = l2_norm / sqrt(volume);
+   return rms_norm;
+}
+
+template<class TYPE>
+double HierarchySideDataOpsReal<TYPE>::weightedRMSNorm(
+   const int data_id,
+   const int wgt_id,
+   const int vol_id) const
+{
+
+   double l2_norm = weightedL2Norm(data_id, wgt_id, vol_id);
+
+   double volume = ((vol_id < 0) ? (double)numberOfEntries(data_id, true)
+                    : sumControlVolumes(data_id, vol_id));
+
+   double rms_norm = l2_norm / sqrt(volume);
+   return rms_norm;
+}
+
+template<class TYPE>
+double HierarchySideDataOpsReal<TYPE>::maxNorm(
+   const int data_id,
+   const int vol_id,
+   bool local_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   double norm = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > data = p->getPatchData(data_id);
+         tbox::Pointer<pdat::SideData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!data.isNull());
+#endif
+            box = data->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         norm = tbox::MathUtilities<double>::Max(norm,
+               d_patch_ops.maxNorm(data, box, cv));
+      }
+   }
+
+   if (!local_only) {
+      double global_norm = norm;
+      if (mpi.getSize() > 1) {
+         mpi.Allreduce(&norm, &global_norm, 1, MPI_DOUBLE, MPI_MAX);
+      }
+      norm = global_norm;
+   }
+   return norm;
+}
+
+template<class TYPE>
+TYPE HierarchySideDataOpsReal<TYPE>::dot(
+   const int data1_id,
+   const int data2_id,
+   const int vol_id,
+   bool local_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE dprod = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > data1 = p->getPatchData(data1_id);
+         tbox::Pointer<pdat::SideData<TYPE> > data2 = p->getPatchData(data2_id);
+         tbox::Pointer<pdat::SideData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!data1.isNull());
+#endif
+            box = data1->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         dprod += d_patch_ops.dot(data1, data2, box, cv);
+      }
+   }
+
+   if (!local_only) {
+      if (mpi.getSize() > 1) {
+         mpi.AllReduce(&dprod, 1, MPI_SUM);
+      }
+   }
+   return dprod;
+}
+
+template<class TYPE>
+TYPE HierarchySideDataOpsReal<TYPE>::integral(
+   const int data_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE local_integral = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > data =
+            p->getPatchData(data_id);
+         tbox::Pointer<pdat::SideData<double> > vol = p->getPatchData(vol_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!data.isNull());
+         TBOX_ASSERT(!vol.isNull());
+#endif
+
+         hier::Box box = data->getGhostBox();
+
+         local_integral += d_patch_ops.integral(data, box, vol);
+      }
+   }
+
+   TYPE global_integral = local_integral;
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&global_integral, 1, MPI_SUM);
+   }
+   return global_integral;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Generic miscellaneous operations for real data.                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+int HierarchySideDataOpsReal<TYPE>::computeConstrProdPos(
+   const int data1_id,
+   const int data2_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int test = 1;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > data1 = p->getPatchData(data1_id);
+         tbox::Pointer<pdat::SideData<TYPE> > data2 = p->getPatchData(data2_id);
+         tbox::Pointer<pdat::SideData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!data1.isNull());
+#endif
+            box = data1->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         test = tbox::MathUtilities<int>::Min(test,
+               d_patch_ops.computeConstrProdPos(data1, data2, box, cv));
+      }
+   }
+
+   int global_test = test;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&test, &global_test, 1, MPI_INT, MPI_MIN);
+   }
+   return global_test;
+}
+
+template<class TYPE>
+void HierarchySideDataOpsReal<TYPE>::compareToScalar(
+   const int dst_id,
+   const int src_id,
+   const TYPE& alpha,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<TYPE> > src = p->getPatchData(src_id);
+         tbox::Pointer<pdat::SideData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!dst.isNull());
+#endif
+            box = dst->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         d_patch_ops.compareToScalar(dst, src, alpha, box, cv);
+      }
+   }
+}
+
+template<class TYPE>
+int HierarchySideDataOpsReal<TYPE>::testReciprocal(
+   const int dst_id,
+   const int src_id,
+   const int vol_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   int test = 1;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > dst = p->getPatchData(dst_id);
+         tbox::Pointer<pdat::SideData<TYPE> > src = p->getPatchData(src_id);
+         tbox::Pointer<pdat::SideData<double> > cv;
+
+         hier::Box box = p->getBox();
+         if (vol_id >= 0) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!dst.isNull());
+#endif
+            box = dst->getGhostBox();
+            cv = p->getPatchData(vol_id);
+         }
+
+         test = tbox::MathUtilities<int>::Min(test,
+               d_patch_ops.testReciprocal(dst, src, box, cv));
+      }
+   }
+
+   int global_test = test;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&test, &global_test, 1, MPI_INT, MPI_MIN);
+   }
+   return global_test;
+}
+
+template<class TYPE>
+TYPE HierarchySideDataOpsReal<TYPE>::maxPointwiseDivide(
+   const int numer_id,
+   const int denom_id,
+   bool local_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE max = 0.0;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > numer = p->getPatchData(numer_id);
+         tbox::Pointer<pdat::SideData<TYPE> > denom = p->getPatchData(denom_id);
+
+         hier::Box box = p->getBox();
+
+         max = tbox::MathUtilities<TYPE>::Max(max,
+               d_patch_ops.maxPointwiseDivide(numer, denom, box));
+      }
+   }
+
+   if (!local_only) {
+      if (mpi.getSize() > 1) {
+         mpi.AllReduce(&max, 1, MPI_MAX);
+      }
+   }
+   return max;
+}
+
+template<class TYPE>
+TYPE HierarchySideDataOpsReal<TYPE>::minPointwiseDivide(
+   const int numer_id,
+   const int denom_id,
+   bool local_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE min = tbox::MathUtilities<TYPE>::getMax();
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > numer = p->getPatchData(numer_id);
+         tbox::Pointer<pdat::SideData<TYPE> > denom = p->getPatchData(denom_id);
+
+         hier::Box box = p->getBox();
+
+         min = tbox::MathUtilities<TYPE>::Min(min,
+               d_patch_ops.minPointwiseDivide(numer, denom, box));
+      }
+   }
+
+   if (!local_only) {
+      if (mpi.getSize() > 1) {
+         mpi.AllReduce(&min, 1, MPI_MIN);
+      }
+   }
+   return min;
+}
+
+template<class TYPE>
+TYPE HierarchySideDataOpsReal<TYPE>::min(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE minval = tbox::MathUtilities<TYPE>::getMax();
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         minval = tbox::MathUtilities<TYPE>::Min(minval, d_patch_ops.min(d, box));
+      }
+   }
+
+   TYPE global_min = minval;
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&global_min, 1, MPI_MIN);
+   }
+   return global_min;
+}
+
+template<class TYPE>
+TYPE HierarchySideDataOpsReal<TYPE>::max(
+   const int data_id,
+   const bool interior_only) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   TYPE maxval = -tbox::MathUtilities<TYPE>::getMax();
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> p = *ip;
+
+         tbox::Pointer<pdat::SideData<TYPE> > d = p->getPatchData(data_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!d.isNull());
+#endif
+         hier::Box box = (interior_only ? p->getBox() : d->getGhostBox());
+
+         maxval = tbox::MathUtilities<TYPE>::Max(maxval, d_patch_ops.max(d, box));
+      }
+   }
+
+   TYPE global_max = maxval;
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&global_max, 1, MPI_MAX);
+   }
+   return global_max;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/HierarchySideDataOpsReal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/HierarchySideDataOpsReal.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,525 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations for real side data on multiple levels. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_HierarchySideDataOpsReal
+#define included_math_HierarchySideDataOpsReal
+
+#include "SAMRAI/SAMRAI_config.h"
+#ifndef included_iostream
+#include <iostream>
+#endif
+#include "SAMRAI/math/HierarchyDataOpsReal.h"
+#include "SAMRAI/math/PatchSideDataOpsReal.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class HierarchySideDataOpsReal provides a collection of operations
+ * that manipulate real (double and float) side-centered patch data components
+ * over multiple levels in an AMR hierarchy.  It is derived from the abstract
+ * base class HierarchyDataOpsReal which defines the interface to
+ * similar operations for side-centered, side-centered, side-centered patch
+ * data objects where the data is either double or float.  The operations
+ * include basic arithmetic, norms and ordering, and assorted miscellaneous
+ * operations.  On each patch, the operations are performed by the
+ * PatchSideDataOpsReal data member.
+ *
+ * The patch hierarchy and set of levels within that hierarcy over which the
+ * operations will be performed are set in the constructor.  However, note
+ * that the constructor accepts default arguments for the coarsest and finest
+ * level numbers.  If the level numbers are not specified when calling the
+ * constructor the levels which exist in the hierarchy will be assumed in
+ * all operations.  The hierarchy and levels may be changed at any time using
+ * the proper member functions.
+ *
+ * Note that, when it makes sense, an operation accept a boolean argument
+ * which indicates whether the operation should be performed on all of the
+ * data or just those data elements corresponding to the patch interiors.
+ * If no boolean argument is provided, the default behavior is to treat only
+ * the patch interiors.  Also, a similar set of operations for complex and
+ * integer side-centered data is provided in the classes
+ * HierarchySideDataOpsComplex and HierarchySideDataOpsInteger,
+ * respectively.
+ *
+ * @see math::PatchSideDataOpsReal
+ */
+
+template<class TYPE>
+class HierarchySideDataOpsReal:public HierarchyDataOpsReal<TYPE>
+{
+public:
+   /**
+    * The constructor for the HierarchySideDataOpsReal class sets
+    * the default patch hierarchy and coarsest and finest patch levels
+    * in that hierarchy over which operations will be performed.  The
+    * hierarchy and operations may be reset using the member fuctions
+    * setPatchHierarchy() and resetLevels() below.  If no level number
+    * arguments are given here, the levels over which the operations will
+    * be performed are those already existing in the hierarchy.  If the
+    * hierarchy level configuration changes, the operations must be explicitly
+    * reset by calling the resetLevels() function.
+    */
+   explicit HierarchySideDataOpsReal(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int coarsest_level = -1,
+      const int finest_level = -1);
+
+   /**
+    * Virtual destructor for the HierarchySideDataOpsReal class.
+    */
+   virtual ~HierarchySideDataOpsReal<TYPE>();
+
+   /**
+    * Reset patch hierarchy over which operations occur.
+    */
+   void
+   setPatchHierarchy(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+   /**
+    * Reset range of patch levels over which operations occur.
+    * Levels must exist in hierarchy or an assertion will result.
+    */
+   void
+   resetLevels(
+      const int coarsest_level,
+      const int finest_level);
+
+   /**
+    * Return const pointer to patch hierarchy associated with operations.
+    */
+   const tbox::Pointer<hier::PatchHierarchy>
+   getPatchHierarchy() const;
+
+   /**
+    * Copy source data to destination data.
+    */
+   void
+   copyData(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Swap data pointers (i.e., storage) between two data components.
+    */
+   void
+   swapData(
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data over multiple levels to specified output stream.
+    */
+   void
+   printData(
+      const int data_id,
+      std::ostream& s,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data component to given scalar.
+    */
+   void
+   setToScalar(
+      const int data_id,
+      const TYPE& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to source multiplied by given scalar, pointwise.
+    */
+   void
+   scale(
+      const int dst_id,
+      const TYPE& alpha,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Add scalar to each entry in source data and set destination to result.
+    */
+   void
+   addScalar(
+      const int dst_id,
+      const int src_id,
+      const TYPE& alpha,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination to sum of two source components, pointwise.
+    */
+   void
+   add(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Subtract second source component from first source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   subtract(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination component to product of two source components, pointwise.
+    */
+   void
+   multiply(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Divide first data component by second source component pointwise
+    * and set destination data component to result.
+    */
+   void
+   divide(
+      const int dst_id,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set each entry of destination component to reciprocal of corresponding
+    * source data component entry.
+    */
+   void
+   reciprocal(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + \beta s_2\f$, where \f$d\f$ is the destination patch
+    * data component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha, \beta\f$ are scalar values.
+    */
+   void
+   linearSum(
+      const int dst_id,
+      const TYPE& alpha,
+      const int src1_id,
+      const TYPE& beta,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 + s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axpy(
+      const int dst_id,
+      const TYPE& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set \f$d = \alpha s_1 - s_2\f$, where \f$d\f$ is the destination patch data
+    * component and \f$s_1, s_2\f$ are the first and second source components,
+    * respectively.  Here \f$\alpha\f$ is a scalar.
+    */
+   void
+   axmy(
+      const int dst_id,
+      const TYPE& alpha,
+      const int src1_id,
+      const int src2_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set destination data to absolute value of source data, pointwise.
+    */
+   void
+   abs(
+      const int dst_id,
+      const int src_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return minimum data value over all patches in the collection of levels.
+    */
+   TYPE
+   min(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return maximum data value over all patches in the collection of levels.
+    */
+   TYPE
+   max(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Set data entries to random values.  See the operations in the
+    * array data operation classes for each data type for details on the
+    * generation of the random values.
+    */
+   void
+   setRandomValues(
+      const int data_id,
+      const TYPE& width,
+      const TYPE& low,
+      const bool interior_only = true) const;
+
+   /**
+    * Return the total number of data values for the component on the set
+    * of hierarchy levels.  If the boolean argument is true, the number of
+    * elements will be summed over patch interiors in a unique way which
+    * avoids multiple counting of redundant values (recall the definition
+    * of node points on a patch interior).  If the boolean argument is false,
+    * all elements will be counted (including ghost values) over all patches.
+    */
+   int
+   numberOfEntries(
+      const int data_id,
+      const bool interior_only = true) const;
+
+   /**
+    * Return sum of the control volumes associated with the data component.
+    * Note that if the ontrol volumes are set propery, this is equivalent to
+    * integrating a data component containing all ones over the collection of
+    * hierarchy levels.
+    */
+   double
+   sumControlVolumes(
+      const int data_id,
+      const int vol_id) const;
+
+   /**
+    * Return discrete \f$L_1\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( \| data_i \| cvol_i )\f$.  If the
+    * control volume is not defined (vol_id < 0), the return value is
+    * \f$\sum_i ( \| data_i \| )\f$.
+    * If local_only is true, the global reduction is not
+    * performed (thus each process will get only local results).
+    */
+   double
+   L1Norm(
+      const int data_id,
+      const int vol_id = -1,
+      bool local_only = false) const;
+
+   /**
+    * Return discrete \f$L_2\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sqrt{ \sum_i ( (data_i)^2 cvol_i ) }\f$.
+    * If the control volume is  not defined (vol_id < 0), the return value
+    * is \f$\sqrt{ \sum_i ( (data_i)^2 cvol_i ) }\f$.
+    * If local_only is true, the global reduction is not
+    * performed (thus each process will get only local results).
+    */
+   double
+   L2Norm(
+      const int data_id,
+      const int vol_id = -1,
+      bool local_only = false) const;
+
+   /**
+    * Return discrete weighted \f$L_2\f$-norm of the data using the control
+    * volume to weight the contribution of the data and weight entries to
+    * the sum.  That is, the return value is the sum \f$\sqrt{ \sum_i (
+    * (data_i * weight_i)^2 cvol_i ) }\f$.  If the control volume is not defined
+    * (vol_id < 0), the return value is
+    * \f$\sqrt{ \sum_i ( (data_i * weight_i)^2 ) }\f$.
+    */
+   double
+   weightedL2Norm(
+      const int data_id,
+      const int weight_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete root mean squared norm of the data.  If the control
+    * volume is defined, the return value is the \f$L_2\f$-norm divided by
+    * the square root of the sum of the control volumes.  Otherwise, the
+    * return value is the \f$L_2\f$-norm divided by the square root of the
+    * number of data entries.
+    */
+   double
+   RMSNorm(
+      const int data_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return discrete weighted root mean squared norm of the data.  If the
+    * control volume is define, the return value is the weighted \f$L_2\f$-norm
+    * divided by the square root of the sum of the control volumes.  Otherwise,
+    * the return value is the weighted \f$L_2\f$-norm divided by the square root
+    * of the number of data entries.
+    */
+   double
+   weightedRMSNorm(
+      const int data_id,
+      const int weight_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Return the \f$\max\f$-norm of the data using the control volume to weight
+    * the contribution of each data entry to the maximum.  That is, the return
+    * value is \f$\max_i ( \| data_i \| )\f$, where the max is over the data
+    * elements where \f$cvol_i > 0\f$.  If the control volume is undefined
+    * (vol_id < 0), it is ignored during the computation of the maximum.
+    * If local_only is true, the global reduction is not
+    * performed (thus each process will get only local results).
+    */
+   double
+   maxNorm(
+      const int data_id,
+      const int vol_id = -1,
+      bool local_only = false) const;
+
+   /**
+    * Return the dot product of the two data arrays using the control volume
+    * to weight the contribution of each product to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( data1_i * data2_i * cvol_i )\f$.
+    * If the control volume is undefined (vol_id < 0), it is ignored during
+    * the summation.  If local_only is true, the global reduction is not
+    * performed (thus each process will get only local results).
+    */
+   TYPE
+   dot(
+      const int data1_id,
+      const int data2_id,
+      const int vol_id = -1,
+      bool local_only = false) const;
+
+   /**
+    * Return the integral of the function represented by the data array.
+    * The return value is the sum \f$\sum_i ( data_i * vol_i )\f$.
+    */
+   TYPE
+   integral(
+      const int data_id,
+      const int vol_id) const;
+
+   /**
+    * Return 1 if \f$\|data2_i\| > 0\f$ and \f$data1_i * data2_i \leq 0\f$, for
+    * any \f$i\f$ in the set of patch data indices, where \f$cvol_i > 0\f$.  Otherwise,
+    * return 0.  If the control volume is undefined (vol_id < 0), all values
+    * on the patch interiors are considered.
+    */
+   int
+   computeConstrProdPos(
+      const int data1_id,
+      const int data2_id,
+      const int vol_id = -1) const;
+
+   /**
+    * Wherever \f$cvol_i > 0\f$ in the set of patch data indices, set \f$dst_i = 1\f$
+    * if \f$\|src_i\| > \alpha\f$, and \f$dst_i = 0\f$ otherwise.  If the control
+    * volume is undefined (vol_id < 0), all values on the patch interiors
+    * are considered.
+    */
+   void
+   compareToScalar(
+      const int dst_id,
+      const int src_id,
+      const TYPE& alpha,
+      const int vol_id = -1) const;
+
+   /**
+    * Wherever \f$cvol_i > 0\f$ in the set of patch data indices, set
+    * \f$dst_i = 1/src_i\f$ if \f$src_i \neq 0\f$, and \f$dst_i = 0\f$ otherwise.
+    * If \f$dst_i = 0\f$ anywhere, 0 is the return value.  Otherwise 1 is returned.
+    * If the control volume is undefined (vol_id < 0), all values on the
+    * patch interiors are considered.
+    */
+   int
+   testReciprocal(
+      const int dst_id,
+      const int src_id,
+      const int vol_id = -1) const;
+
+   /*!
+    * @brief Compute max of "conditional" quotients of two arrays.
+    *
+    * Return the maximum of pointwise "conditional" quotients of the numerator
+    * and denominator.
+    *
+    * The "conditional" quotient is defined as |numerator/denominator|
+    * where the denominator is nonzero.  Otherwise, it is defined as
+    * |numerator|.
+    *
+    * @b Note: This method is currently intended to support the
+    * PETSc-2.1.6 vector wrapper only.  Please do not use it!
+    */
+   TYPE
+   maxPointwiseDivide(
+      const int numer_id,
+      const int denom_id,
+      bool local_only = false) const;
+
+   /*!
+    * @brief Compute min of quotients of two arrays.
+    *
+    * Return the minimum of pointwise quotients of the numerator
+    * and denominator.
+    *
+    * The quotient is defined as (numerator/denominator)
+    * where the denominator is nonzero.  When the denominator is zero, the
+    * entry is skipped.  If the denominator is always zero, the value of
+    * tbox::IEEE::getFLT_MAX() is returned (see @ref SAMRAI::tbox::IEEE).
+    *
+    * @b Note: This method is currently intended to support the
+    * SUNDIALS vector wrapper only.  Please do not use it!
+    */
+   TYPE
+   minPointwiseDivide(
+      const int numer_id,
+      const int denom_id,
+      bool local_only = false) const;
+
+private:
+   // The following are not implemented
+   HierarchySideDataOpsReal(
+      const HierarchySideDataOpsReal<TYPE>&);
+   void
+   operator = (
+      const HierarchySideDataOpsReal<TYPE>&);
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+   int d_coarsest_level;
+   int d_finest_level;
+   tbox::Array<tbox::Array<hier::BoxList> > d_nonoverlapping_side_boxes[tbox::
+                                                                        Dimension
+                                                                        ::
+                                                                        MAXIMUM_DIMENSION_VALUE];
+
+   PatchSideDataOpsReal<TYPE> d_patch_ops;
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/HierarchySideDataOpsReal.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,7587 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=ArrayDataBasicOps.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h ArrayDataBasicOps.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=ArrayDataMiscellaneousOpsReal.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	ArrayDataMiscellaneousOpsReal.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=ArrayDataNormOpsComplex.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h ArrayDataNormOpsComplex.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=ArrayDataNormOpsInteger.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h ArrayDataNormOpsInteger.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
+FILE_4=ArrayDataNormOpsReal.o
+DEPENDS_4:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h ArrayDataNormOpsReal.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_4 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_4:X.o=${NDIM}.o}: ${DEPENDS_4}
+
+FILE_5=HierarchyCellDataOpsComplex.o
+DEPENDS_5:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	HierarchyCellDataOpsComplex.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_5 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_5:X.o=${NDIM}.o}: ${DEPENDS_5}
+
+FILE_6=HierarchyCellDataOpsInteger.o
+DEPENDS_6:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsInteger.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	HierarchyCellDataOpsInteger.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_6 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_6:X.o=${NDIM}.o}: ${DEPENDS_6}
+
+FILE_7=HierarchyCellDataOpsReal.o
+DEPENDS_7:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	HierarchyCellDataOpsReal.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_7 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_7:X.o=${NDIM}.o}: ${DEPENDS_7}
+
+FILE_8=HierarchyDataOpsComplex.o
+DEPENDS_8:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h HierarchyDataOpsComplex.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_8 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_8:X.o=${NDIM}.o}: ${DEPENDS_8}
+
+FILE_9=HierarchyDataOpsInteger.o
+DEPENDS_9:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h HierarchyDataOpsInteger.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_9 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_9:X.o=${NDIM}.o}: ${DEPENDS_9}
+
+FILE_10=HierarchyDataOpsManager.o
+DEPENDS_10:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsInteger.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsInteger.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsInteger.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsInteger.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsInteger.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h HierarchyDataOpsManager.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_10 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_10:X.o=${NDIM}.o}: ${DEPENDS_10}
+
+FILE_11=HierarchyDataOpsReal.o
+DEPENDS_11:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h HierarchyDataOpsReal.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_11 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_11:X.o=${NDIM}.o}: ${DEPENDS_11}
+
+FILE_12=HierarchyEdgeDataOpsComplex.o
+DEPENDS_12:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	HierarchyEdgeDataOpsComplex.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_12 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_12:X.o=${NDIM}.o}: ${DEPENDS_12}
+
+FILE_13=HierarchyEdgeDataOpsInteger.o
+DEPENDS_13:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsInteger.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	HierarchyEdgeDataOpsInteger.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_13 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_13:X.o=${NDIM}.o}: ${DEPENDS_13}
+
+FILE_14=HierarchyEdgeDataOpsReal.o
+DEPENDS_14:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	HierarchyEdgeDataOpsReal.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_14 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_14:X.o=${NDIM}.o}: ${DEPENDS_14}
+
+FILE_15=HierarchyFaceDataOpsComplex.o
+DEPENDS_15:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	HierarchyFaceDataOpsComplex.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_15 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_15:X.o=${NDIM}.o}: ${DEPENDS_15}
+
+FILE_16=HierarchyFaceDataOpsInteger.o
+DEPENDS_16:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsInteger.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	HierarchyFaceDataOpsInteger.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_16 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_16:X.o=${NDIM}.o}: ${DEPENDS_16}
+
+FILE_17=HierarchyFaceDataOpsReal.o
+DEPENDS_17:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	HierarchyFaceDataOpsReal.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_17 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_17:X.o=${NDIM}.o}: ${DEPENDS_17}
+
+FILE_18=HierarchyNodeDataOpsComplex.o
+DEPENDS_18:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	HierarchyNodeDataOpsComplex.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_18 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_18:X.o=${NDIM}.o}: ${DEPENDS_18}
+
+FILE_19=HierarchyNodeDataOpsInteger.o
+DEPENDS_19:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsInteger.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	HierarchyNodeDataOpsInteger.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_19 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_19:X.o=${NDIM}.o}: ${DEPENDS_19}
+
+FILE_20=HierarchyNodeDataOpsReal.o
+DEPENDS_20:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	HierarchyNodeDataOpsReal.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_20 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_20:X.o=${NDIM}.o}: ${DEPENDS_20}
+
+FILE_21=HierarchySideDataOpsComplex.o
+DEPENDS_21:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	HierarchySideDataOpsComplex.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_21 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_21:X.o=${NDIM}.o}: ${DEPENDS_21}
+
+FILE_22=HierarchySideDataOpsInteger.o
+DEPENDS_22:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsInteger.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	HierarchySideDataOpsInteger.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_22 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_22:X.o=${NDIM}.o}: ${DEPENDS_22}
+
+FILE_23=HierarchySideDataOpsReal.o
+DEPENDS_23:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	HierarchySideDataOpsReal.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_23 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_23:X.o=${NDIM}.o}: ${DEPENDS_23}
+
+FILE_24=PatchCellDataBasicOps.o
+DEPENDS_24:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchCellDataBasicOps.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_24 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_24:X.o=${NDIM}.o}: ${DEPENDS_24}
+
+FILE_25=PatchCellDataMiscellaneousOpsReal.o
+DEPENDS_25:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	PatchCellDataMiscellaneousOpsReal.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_25 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_25:X.o=${NDIM}.o}: ${DEPENDS_25}
+
+FILE_26=PatchCellDataNormOpsComplex.o
+DEPENDS_26:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	PatchCellDataNormOpsComplex.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_26 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_26:X.o=${NDIM}.o}: ${DEPENDS_26}
+
+FILE_27=PatchCellDataNormOpsReal.o
+DEPENDS_27:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	PatchCellDataNormOpsReal.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_27 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_27:X.o=${NDIM}.o}: ${DEPENDS_27}
+
+FILE_28=PatchCellDataOpsComplex.o
+DEPENDS_28:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchCellDataOpsComplex.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_28 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_28:X.o=${NDIM}.o}: ${DEPENDS_28}
+
+FILE_29=PatchCellDataOpsInteger.o
+DEPENDS_29:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchCellDataOpsInteger.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_29 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_29:X.o=${NDIM}.o}: ${DEPENDS_29}
+
+FILE_30=PatchCellDataOpsReal.o
+DEPENDS_30:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchCellDataOpsReal.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_30 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_30:X.o=${NDIM}.o}: ${DEPENDS_30}
+
+FILE_31=PatchEdgeDataBasicOps.o
+DEPENDS_31:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchEdgeDataBasicOps.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_31 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_31:X.o=${NDIM}.o}: ${DEPENDS_31}
+
+FILE_32=PatchEdgeDataMiscellaneousOpsReal.o
+DEPENDS_32:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	PatchEdgeDataMiscellaneousOpsReal.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_32 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_32:X.o=${NDIM}.o}: ${DEPENDS_32}
+
+FILE_33=PatchEdgeDataNormOpsComplex.o
+DEPENDS_33:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	PatchEdgeDataNormOpsComplex.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_33 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_33:X.o=${NDIM}.o}: ${DEPENDS_33}
+
+FILE_34=PatchEdgeDataNormOpsReal.o
+DEPENDS_34:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	PatchEdgeDataNormOpsReal.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_34 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_34:X.o=${NDIM}.o}: ${DEPENDS_34}
+
+FILE_35=PatchEdgeDataOpsComplex.o
+DEPENDS_35:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchEdgeDataOpsComplex.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_35 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_35:X.o=${NDIM}.o}: ${DEPENDS_35}
+
+FILE_36=PatchEdgeDataOpsInteger.o
+DEPENDS_36:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchEdgeDataOpsInteger.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_36 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_36:X.o=${NDIM}.o}: ${DEPENDS_36}
+
+FILE_37=PatchEdgeDataOpsReal.o
+DEPENDS_37:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchEdgeDataOpsReal.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_37 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_37:X.o=${NDIM}.o}: ${DEPENDS_37}
+
+FILE_38=PatchFaceDataBasicOps.o
+DEPENDS_38:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchFaceDataBasicOps.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_38 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_38:X.o=${NDIM}.o}: ${DEPENDS_38}
+
+FILE_39=PatchFaceDataMiscellaneousOpsReal.o
+DEPENDS_39:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	PatchFaceDataMiscellaneousOpsReal.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_39 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_39:X.o=${NDIM}.o}: ${DEPENDS_39}
+
+FILE_40=PatchFaceDataNormOpsComplex.o
+DEPENDS_40:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	PatchFaceDataNormOpsComplex.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_40 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_40:X.o=${NDIM}.o}: ${DEPENDS_40}
+
+FILE_41=PatchFaceDataNormOpsReal.o
+DEPENDS_41:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	PatchFaceDataNormOpsReal.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_41 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_41:X.o=${NDIM}.o}: ${DEPENDS_41}
+
+FILE_42=PatchFaceDataOpsComplex.o
+DEPENDS_42:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchFaceDataOpsComplex.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_42 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_42:X.o=${NDIM}.o}: ${DEPENDS_42}
+
+FILE_43=PatchFaceDataOpsInteger.o
+DEPENDS_43:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchFaceDataOpsInteger.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_43 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_43:X.o=${NDIM}.o}: ${DEPENDS_43}
+
+FILE_44=PatchFaceDataOpsReal.o
+DEPENDS_44:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchFaceDataOpsReal.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_44 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_44:X.o=${NDIM}.o}: ${DEPENDS_44}
+
+FILE_45=PatchNodeDataBasicOps.o
+DEPENDS_45:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchNodeDataBasicOps.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_45 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_45:X.o=${NDIM}.o}: ${DEPENDS_45}
+
+FILE_46=PatchNodeDataMiscellaneousOpsReal.o
+DEPENDS_46:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	PatchNodeDataMiscellaneousOpsReal.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_46 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_46:X.o=${NDIM}.o}: ${DEPENDS_46}
+
+FILE_47=PatchNodeDataNormOpsComplex.o
+DEPENDS_47:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	PatchNodeDataNormOpsComplex.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_47 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_47:X.o=${NDIM}.o}: ${DEPENDS_47}
+
+FILE_48=PatchNodeDataNormOpsReal.o
+DEPENDS_48:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	PatchNodeDataNormOpsReal.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_48 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_48:X.o=${NDIM}.o}: ${DEPENDS_48}
+
+FILE_49=PatchNodeDataOpsComplex.o
+DEPENDS_49:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchNodeDataOpsComplex.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_49 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_49:X.o=${NDIM}.o}: ${DEPENDS_49}
+
+FILE_50=PatchNodeDataOpsInteger.o
+DEPENDS_50:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchNodeDataOpsInteger.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_50 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_50:X.o=${NDIM}.o}: ${DEPENDS_50}
+
+FILE_51=PatchNodeDataOpsReal.o
+DEPENDS_51:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchNodeDataOpsReal.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_51 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_51:X.o=${NDIM}.o}: ${DEPENDS_51}
+
+FILE_52=PatchSideDataBasicOps.o
+DEPENDS_52:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchSideDataBasicOps.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_52 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_52:X.o=${NDIM}.o}: ${DEPENDS_52}
+
+FILE_53=PatchSideDataMiscellaneousOpsReal.o
+DEPENDS_53:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	PatchSideDataMiscellaneousOpsReal.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_53 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_53:X.o=${NDIM}.o}: ${DEPENDS_53}
+
+FILE_54=PatchSideDataNormOpsComplex.o
+DEPENDS_54:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	PatchSideDataNormOpsComplex.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_54 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_54:X.o=${NDIM}.o}: ${DEPENDS_54}
+
+FILE_55=PatchSideDataNormOpsReal.o
+DEPENDS_55:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	PatchSideDataNormOpsReal.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_55 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_55:X.o=${NDIM}.o}: ${DEPENDS_55}
+
+FILE_56=PatchSideDataOpsComplex.o
+DEPENDS_56:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchSideDataOpsComplex.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_56 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_56:X.o=${NDIM}.o}: ${DEPENDS_56}
+
+FILE_57=PatchSideDataOpsInteger.o
+DEPENDS_57:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchSideDataOpsInteger.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_57 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_57:X.o=${NDIM}.o}: ${DEPENDS_57}
+
+FILE_58=PatchSideDataOpsReal.o
+DEPENDS_58:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PatchSideDataOpsReal.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_58 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_58:X.o=${NDIM}.o}: ${DEPENDS_58}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,64 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   primary makefile for compiling the SAMRAI math package 
+##
+#########################################################################
+
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/SAMRAI/math
+VPATH         = @srcdir@
+OBJECT        = ../../..
+
+default: library
+
+include $(OBJECT)/config/Makefile.config
+
+SUBDIRS = fortran
+
+OBJS = 		\
+	PatchSideDataOpsInteger.o \
+	PatchFaceDataOpsInteger.o \
+	PatchEdgeDataOpsInteger.o \
+	PatchCellDataOpsInteger.o \
+	PatchNodeDataOpsInteger.o \
+	PatchSideDataOpsComplex.o \
+	PatchNodeDataNormOpsComplex.o \
+	PatchSideDataNormOpsComplex.o \
+	PatchFaceDataOpsComplex.o \
+	PatchFaceDataNormOpsComplex.o \
+	PatchNodeDataOpsComplex.o \
+	PatchEdgeDataOpsComplex.o \
+	PatchEdgeDataNormOpsComplex.o \
+	PatchCellDataOpsComplex.o \
+	PatchCellDataNormOpsComplex.o \
+	HierarchyCellDataOpsInteger.o \
+	HierarchyEdgeDataOpsInteger.o \
+	HierarchyFaceDataOpsInteger.o \
+	HierarchySideDataOpsInteger.o \
+	HierarchyNodeDataOpsInteger.o \
+	HierarchyDataOpsManager.o \
+	HierarchyDataOpsInteger.o \
+	HierarchyCellDataOpsComplex.o \
+	HierarchyEdgeDataOpsComplex.o \
+	HierarchyFaceDataOpsComplex.o \
+	HierarchySideDataOpsComplex.o \
+	HierarchyNodeDataOpsComplex.o \
+	HierarchyDataOpsComplex.o \
+	HierarchyDataOpsComplex.o \
+	HierarchyDataOpsComplex.o \
+	ArrayDataNormOpsComplex.o \
+	ArrayDataNormOpsInteger.o
+
+library: $(OBJS)
+	for DIR in $(SUBDIRS); do if test -d $$DIR; then (cd $$DIR && $(MAKE) $@) ; fi || exit 1; done
+clean:
+	$(SAMCLEAN)
+	for DIR in $(SUBDIRS); do if test -d $$DIR; then (cd $$DIR && $(MAKE) $@) ; fi || exit 1; done
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchCellDataBasicOps.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchCellDataBasicOps.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,256 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Basic templated cell-centered patch data operations. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchCellDataBasicOps_C
+#define included_math_PatchCellDataBasicOps_C
+
+#include "SAMRAI/math/PatchCellDataBasicOps.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+PatchCellDataBasicOps<TYPE>::PatchCellDataBasicOps()
+{
+}
+
+template<class TYPE>
+PatchCellDataBasicOps<TYPE>::~PatchCellDataBasicOps()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The const constructor and assignment operator are not actually used   *
+ * but are defined here for compilers that require an implementation for *
+ * every declaration.                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+PatchCellDataBasicOps<TYPE>::PatchCellDataBasicOps(
+   const PatchCellDataBasicOps<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void PatchCellDataBasicOps<TYPE>::operator = (
+   const PatchCellDataBasicOps<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Generic templated basic operations for cell-centered patch data.      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void PatchCellDataBasicOps<TYPE>::scale(
+   tbox::Pointer<pdat::CellData<TYPE> >& dst,
+   const TYPE& alpha,
+   const tbox::Pointer<pdat::CellData<TYPE> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   d_array_ops.scale(dst->getArrayData(),
+      alpha, src->getArrayData(),
+      box);
+}
+
+template<class TYPE>
+void PatchCellDataBasicOps<TYPE>::addScalar(
+   tbox::Pointer<pdat::CellData<TYPE> >& dst,
+   const tbox::Pointer<pdat::CellData<TYPE> >& src,
+   const TYPE& alpha,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   d_array_ops.addScalar(dst->getArrayData(),
+      src->getArrayData(), alpha,
+      box);
+}
+
+template<class TYPE>
+void PatchCellDataBasicOps<TYPE>::add(
+   tbox::Pointer<pdat::CellData<TYPE> >& dst,
+   const tbox::Pointer<pdat::CellData<TYPE> >& src1,
+   const tbox::Pointer<pdat::CellData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   d_array_ops.add(dst->getArrayData(),
+      src1->getArrayData(), src2->getArrayData(),
+      box);
+}
+
+template<class TYPE>
+void PatchCellDataBasicOps<TYPE>::subtract(
+   tbox::Pointer<pdat::CellData<TYPE> >& dst,
+   const tbox::Pointer<pdat::CellData<TYPE> >& src1,
+   const tbox::Pointer<pdat::CellData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   d_array_ops.subtract(dst->getArrayData(),
+      src1->getArrayData(), src2->getArrayData(),
+      box);
+}
+
+template<class TYPE>
+void PatchCellDataBasicOps<TYPE>::multiply(
+   tbox::Pointer<pdat::CellData<TYPE> >& dst,
+   const tbox::Pointer<pdat::CellData<TYPE> >& src1,
+   const tbox::Pointer<pdat::CellData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   d_array_ops.multiply(dst->getArrayData(),
+      src1->getArrayData(), src2->getArrayData(),
+      box);
+}
+
+template<class TYPE>
+void PatchCellDataBasicOps<TYPE>::divide(
+   tbox::Pointer<pdat::CellData<TYPE> >& dst,
+   const tbox::Pointer<pdat::CellData<TYPE> >& src1,
+   const tbox::Pointer<pdat::CellData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   d_array_ops.divide(dst->getArrayData(),
+      src1->getArrayData(), src2->getArrayData(),
+      box);
+}
+
+template<class TYPE>
+void PatchCellDataBasicOps<TYPE>::reciprocal(
+   tbox::Pointer<pdat::CellData<TYPE> >& dst,
+   const tbox::Pointer<pdat::CellData<TYPE> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   d_array_ops.reciprocal(dst->getArrayData(),
+      src->getArrayData(),
+      box);
+}
+
+template<class TYPE>
+void PatchCellDataBasicOps<TYPE>::linearSum(
+   tbox::Pointer<pdat::CellData<TYPE> >& dst,
+   const TYPE& alpha,
+   const tbox::Pointer<pdat::CellData<TYPE> >& src1,
+   const TYPE& beta,
+   const tbox::Pointer<pdat::CellData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   d_array_ops.linearSum(dst->getArrayData(),
+      alpha, src1->getArrayData(),
+      beta, src2->getArrayData(),
+      box);
+}
+
+template<class TYPE>
+void PatchCellDataBasicOps<TYPE>::axpy(
+   tbox::Pointer<pdat::CellData<TYPE> >& dst,
+   const TYPE& alpha,
+   const tbox::Pointer<pdat::CellData<TYPE> >& src1,
+   const tbox::Pointer<pdat::CellData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   d_array_ops.axpy(dst->getArrayData(),
+      alpha, src1->getArrayData(),
+      src2->getArrayData(),
+      box);
+}
+
+template<class TYPE>
+void PatchCellDataBasicOps<TYPE>::axmy(
+   tbox::Pointer<pdat::CellData<TYPE> >& dst,
+   const TYPE& alpha,
+   const tbox::Pointer<pdat::CellData<TYPE> >& src1,
+   const tbox::Pointer<pdat::CellData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   d_array_ops.axmy(dst->getArrayData(),
+      alpha, src1->getArrayData(),
+      src2->getArrayData(),
+      box);
+}
+
+template<class TYPE>
+TYPE PatchCellDataBasicOps<TYPE>::min(
+   const tbox::Pointer<pdat::CellData<TYPE> >& data,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   return d_array_ops.min(data->getArrayData(), box);
+}
+
+template<class TYPE>
+TYPE PatchCellDataBasicOps<TYPE>::max(
+   const tbox::Pointer<pdat::CellData<TYPE> >& data,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   return d_array_ops.max(data->getArrayData(), box);
+}
+
+template<class TYPE>
+void PatchCellDataBasicOps<TYPE>::setRandomValues(
+   tbox::Pointer<pdat::CellData<TYPE> >& dst,
+   const TYPE& width,
+   const TYPE& low,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*dst, box);
+
+   d_array_ops.setRandomValues(dst->getArrayData(),
+      width, low, box);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchCellDataBasicOps.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchCellDataBasicOps.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,211 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Basic templated cell-centered patch data operations. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchCellDataBasicOps
+#define included_math_PatchCellDataBasicOps
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/math/ArrayDataBasicOps.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchCellDataBasicOps provides access to a collection
+ * of basic numerical operations that may be applied to numerical cell-
+ * centered patch data.  These operations include simple arithmetic
+ * operations as well as min and max, etc.  The primary intent of this
+ * class is to provide the interface to these standard operations for
+ * an PatchCellDataOpsi<DIM> object which provides access to a complete set
+ * of operations that may be used to manipulate cell-centered patch data
+ * objects.   Each member function accepts a box argument indicating the
+ * region of index space on which the operation should be performed.  The
+ * operation will be performed on the intersection of this box and those
+ * boxes corresponding to the patch data objects involved.
+ *
+ * These operations typically apply only to the numerical standard built-in
+ * types, such as double, float, and int, and the complex type (which may or
+ * may not be a built-in type depending on the C++ compiler).  Thus, this
+ * templated class should only be used to instantiate objects with those
+ * types as the template parameter.  None of the operations are implemented
+ * for any other type.
+ *
+ * @see math::ArrayDataBasicOps
+ */
+
+template<class TYPE>
+class PatchCellDataBasicOps
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchCellDataBasicOps();
+
+   virtual ~PatchCellDataBasicOps<TYPE>();
+
+   /**
+    * Set dst = alpha * src, elementwise.
+    */
+   void
+   scale(
+      tbox::Pointer<pdat::CellData<TYPE> >& dst,
+      const TYPE& alpha,
+      const tbox::Pointer<pdat::CellData<TYPE> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src + alpha, elementwise.
+    */
+   void
+   addScalar(
+      tbox::Pointer<pdat::CellData<TYPE> >& dst,
+      const tbox::Pointer<pdat::CellData<TYPE> >& src,
+      const TYPE& alpha,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src1 + src2, elementwise.
+    */
+   void
+   add(
+      tbox::Pointer<pdat::CellData<TYPE> >& dst,
+      const tbox::Pointer<pdat::CellData<TYPE> >& src1,
+      const tbox::Pointer<pdat::CellData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src1 - src2, elementwise.
+    */
+   void
+   subtract(
+      tbox::Pointer<pdat::CellData<TYPE> >& dst,
+      const tbox::Pointer<pdat::CellData<TYPE> >& src1,
+      const tbox::Pointer<pdat::CellData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src1 * src2, elementwise.
+    */
+   void
+   multiply(
+      tbox::Pointer<pdat::CellData<TYPE> >& dst,
+      const tbox::Pointer<pdat::CellData<TYPE> >& src1,
+      const tbox::Pointer<pdat::CellData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src1 / src2, elementwise.  No check for division by zero.
+    */
+   void
+   divide(
+      tbox::Pointer<pdat::CellData<TYPE> >& dst,
+      const tbox::Pointer<pdat::CellData<TYPE> >& src1,
+      const tbox::Pointer<pdat::CellData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = 1 / src, elementwise.  No check for division by zero.
+    */
+   void
+   reciprocal(
+      tbox::Pointer<pdat::CellData<TYPE> >& dst,
+      const tbox::Pointer<pdat::CellData<TYPE> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = alpha * src1 + beta * src2, elementwise.
+    */
+   void
+   linearSum(
+      tbox::Pointer<pdat::CellData<TYPE> >& dst,
+      const TYPE& alpha,
+      const tbox::Pointer<pdat::CellData<TYPE> >& src1,
+      const TYPE& beta,
+      const tbox::Pointer<pdat::CellData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = alpha * src1 + src2, elementwise.
+    */
+   void
+   axpy(
+      tbox::Pointer<pdat::CellData<TYPE> >& dst,
+      const TYPE& alpha,
+      const tbox::Pointer<pdat::CellData<TYPE> >& src1,
+      const tbox::Pointer<pdat::CellData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = alpha * src1 - src2, elementwise.
+    */
+   void
+   axmy(
+      tbox::Pointer<pdat::CellData<TYPE> >& dst,
+      const TYPE& alpha,
+      const tbox::Pointer<pdat::CellData<TYPE> >& src1,
+      const tbox::Pointer<pdat::CellData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Return the minimum patch data component entry  When the data is
+    * complex, the result is the data element with the smallest norm.
+    */
+   TYPE
+   min(
+      const tbox::Pointer<pdat::CellData<TYPE> >& data,
+      const hier::Box& box) const;
+
+   /**
+    * Return the maximum patch data component entry  When the data is
+    * complex, the result is the data element with the largest norm.
+    */
+   TYPE
+   max(
+      const tbox::Pointer<pdat::CellData<TYPE> >& data,
+      const hier::Box& box) const;
+
+   /**
+    * Set patch data to random values.  See the operations in the
+    * ArrayDataBasicOps class for details on the generation
+    * of the random values for each data type.
+    */
+   void
+   setRandomValues(
+      tbox::Pointer<pdat::CellData<TYPE> >& dst,
+      const TYPE& width,
+      const TYPE& low,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   PatchCellDataBasicOps(
+      const PatchCellDataBasicOps<TYPE>&);
+   void
+   operator = (
+      const PatchCellDataBasicOps<TYPE>&);
+
+   ArrayDataBasicOps<TYPE> d_array_ops;
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/PatchCellDataBasicOps.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,177 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated miscellaneous operations for real cell-centered data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchCellDataMiscellaneousOpsReal_C
+#define included_math_PatchCellDataMiscellaneousOpsReal_C
+
+#include "SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+PatchCellDataMiscellaneousOpsReal<TYPE>::PatchCellDataMiscellaneousOpsReal()
+{
+}
+
+template<class TYPE>
+PatchCellDataMiscellaneousOpsReal<TYPE>::~PatchCellDataMiscellaneousOpsReal()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The const constructor and assignment operator are not actually used   *
+ * but are defined here for compilers that require an implementation for *
+ * every declaration.                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+PatchCellDataMiscellaneousOpsReal<TYPE>::PatchCellDataMiscellaneousOpsReal(
+   const PatchCellDataMiscellaneousOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void PatchCellDataMiscellaneousOpsReal<TYPE>::operator = (
+   const PatchCellDataMiscellaneousOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Templated miscellaneous operations for real cell-centered data.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+int PatchCellDataMiscellaneousOpsReal<TYPE>::computeConstrProdPos(
+   const tbox::Pointer<pdat::CellData<TYPE> >& data1,
+   const tbox::Pointer<pdat::CellData<TYPE> >& data2,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::CellData<double> > cvol) const
+{
+   TBOX_ASSERT(!data1.isNull() && !data2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*data1, *data2, box);
+
+   int retval;
+   if (cvol.isNull()) {
+      retval = d_array_ops.computeConstrProdPos(data1->getArrayData(),
+            data2->getArrayData(),
+            box);
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data1, *cvol);
+
+      retval = d_array_ops.computeConstrProdPosWithControlVolume(
+            data1->getArrayData(),
+            data2->getArrayData(),
+            cvol->getArrayData(),
+            box);
+   }
+   return retval;
+}
+
+template<class TYPE>
+void PatchCellDataMiscellaneousOpsReal<TYPE>::compareToScalar(
+   tbox::Pointer<pdat::CellData<TYPE> >& dst,
+   const tbox::Pointer<pdat::CellData<TYPE> >& src,
+   const TYPE& alpha,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::CellData<double> > cvol) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   if (cvol.isNull()) {
+      d_array_ops.compareToScalar(dst->getArrayData(),
+         src->getArrayData(),
+         alpha,
+         box);
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*dst, *cvol);
+      d_array_ops.compareToScalarWithControlVolume(dst->getArrayData(),
+         src->getArrayData(),
+         alpha,
+         cvol->getArrayData(),
+         box);
+   }
+}
+
+template<class TYPE>
+int PatchCellDataMiscellaneousOpsReal<TYPE>::testReciprocal(
+   tbox::Pointer<pdat::CellData<TYPE> >& dst,
+   const tbox::Pointer<pdat::CellData<TYPE> >& src,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::CellData<double> > cvol) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   int retval;
+   if (cvol.isNull()) {
+      retval = d_array_ops.testReciprocal(dst->getArrayData(),
+            src->getArrayData(),
+            box);
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*dst, *cvol);
+
+      retval = d_array_ops.testReciprocalWithControlVolume(
+            dst->getArrayData(),
+            src->getArrayData(),
+            cvol->getArrayData(),
+            box);
+   }
+   return retval;
+}
+
+template<class TYPE>
+TYPE PatchCellDataMiscellaneousOpsReal<TYPE>::maxPointwiseDivide(
+   const tbox::Pointer<pdat::CellData<TYPE> >& numer,
+   const tbox::Pointer<pdat::CellData<TYPE> >& denom,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!numer.isNull() && !denom.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*numer, *denom, box);
+
+   TYPE retval;
+   retval = d_array_ops.maxPointwiseDivide(numer->getArrayData(),
+         denom->getArrayData(),
+         box);
+   return retval;
+}
+
+template<class TYPE>
+TYPE PatchCellDataMiscellaneousOpsReal<TYPE>::minPointwiseDivide(
+   const tbox::Pointer<pdat::CellData<TYPE> >& numer,
+   const tbox::Pointer<pdat::CellData<TYPE> >& denom,
+   const hier::Box& box) const
+{
+
+   TBOX_ASSERT(!numer.isNull() && !denom.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*numer, *denom, box);
+
+   TYPE retval;
+   retval = d_array_ops.minPointwiseDivide(numer->getArrayData(),
+         denom->getArrayData(),
+         box);
+   return retval;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,166 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated miscellaneous operations for real cell-centered data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchCellDataMiscellaneousOpsReal
+#define included_math_PatchCellDataMiscellaneousOpsReal
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/math/ArrayDataMiscellaneousOpsReal.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchCellDataMiscellaneousOpsReal provides access to a
+ * collection of operations that may be applied to numerical cell-centered
+ * patch data of type double and float.  The primary intent of this class is
+ * to provide the interface to these operations for the class
+ * PatchCellDataOpsReal which provides access to a more complete
+ * set of operations that may be used to manipulate cell-centered
+ * patch data.  Each member function accepts a box argument
+ * indicating the region of index space on which the operation should be
+ * performed.  The operation will be performed on the intersection of this
+ * box and those boxes corresponding to the patch data objects.  Also, each
+ * operation allows an additional cell-centered patch data object to be used
+ * to represent a control volume that weights the contribution of each data
+ * entry in the given norm calculation.  Note that the control volume patch
+ * data must be of type double and have cell-centered geometry (i.e., the
+ * same as the data itself).  The use of control volumes is important when
+ * these operations are used in vector kernels where the data resides over
+ * multiple levels of spatial resolution in an AMR hierarchy.  If the control
+ * volume is not given in the function call, it will be ignored in the
+ * calculation.  Also, note that the depth of the control volume patch data
+ * object must be either 1 or be equal to the depth of the other data objects.
+ *
+ * Since these operations are used only by the vector kernels for the KINSOL
+ * and CVODE solver packages at this time, they are intended to be instantiated
+ * for the standard built-in types double and float (since those solvers only
+ * treat double and float data).  To extend this class to other data types or
+ * to include other operations, the member functions must be specialized or the
+ * new operations must be added.
+ *
+ * @see math::ArrayDataMiscellaneousOpsReal
+ */
+
+template<class TYPE>
+class PatchCellDataMiscellaneousOpsReal
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchCellDataMiscellaneousOpsReal();
+
+   virtual ~PatchCellDataMiscellaneousOpsReal<TYPE>();
+
+   /**
+    * Return 1 if \f$\|data2_i\| > 0\f$ and \f$data1_i * data2_i \leq 0\f$, for
+    * any \f$i\f$ in the index region, where \f$cvol_i > 0\f$.  Otherwise return 0.
+    * If the control volume is NULL, all values in the index set are used.
+    */
+   int
+   computeConstrProdPos(
+      const tbox::Pointer<pdat::CellData<TYPE> >& data1,
+      const tbox::Pointer<pdat::CellData<TYPE> >& data2,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::CellData<double> > cvol =
+         tbox::Pointer<pdat::CellData<double> >(NULL)) const;
+
+   /**
+    * Wherever \f$cvol_i > 0\f$ in the index region, set \f$dst_i = 1\f$
+    * if \f$\|src_i\| > \alpha\f$, and \f$dst_i = 0\f$ otherwise.  If the control
+    * volume is NULL, all values in the index set are considered.
+    */
+   void
+   compareToScalar(
+      tbox::Pointer<pdat::CellData<TYPE> >& dst,
+      const tbox::Pointer<pdat::CellData<TYPE> >& src,
+      const TYPE& alpha,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::CellData<double> > cvol =
+         tbox::Pointer<pdat::CellData<double> >(NULL)) const;
+
+   /**
+    * Wherever \f$cvol_i > 0\f$ in the index region, set \f$dst_i = 1/src_i\f$ if
+    * \f$src_i \neq 0\f$, and \f$dst_i = 0\f$ otherwise.  If \f$dst_i = 0\f$ anywhere,
+    * 0 is the return value.  Otherwise 1 is returned.  If the control volume
+    * all values in the index set are considered.
+    */
+   int
+   testReciprocal(
+      tbox::Pointer<pdat::CellData<TYPE> >& dst,
+      const tbox::Pointer<pdat::CellData<TYPE> >& src,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::CellData<double> > cvol =
+         tbox::Pointer<pdat::CellData<double> >(NULL)) const;
+
+   /*!
+    * @brief Compute max of "conditional" quotients of two arrays.
+    *
+    * Return the maximum of pointwise "conditional" quotients of the numerator
+    * and denominator.
+    *
+    * The "conditional" quotient is defined as |numerator/denominator|
+    * where the denominator is nonzero.  Otherwise, it is defined as
+    * |numerator|.
+    *
+    * @b Note: This method is currently intended to support the
+    * PETSc-2.1.6 vector wrapper only.  Please do not use it!
+    */
+   TYPE
+   maxPointwiseDivide(
+      const tbox::Pointer<pdat::CellData<TYPE> >& numer,
+      const tbox::Pointer<pdat::CellData<TYPE> >& denom,
+      const hier::Box& box) const;
+
+   /*!
+    * @brief Compute min of quotients of two arrays.
+    *
+    * Return the minimum of pointwise quotients of the numerator
+    * and denominator.
+    *
+    * The quotient is defined as (numerator/denominator)
+    * where the denominator is nonzero.  When the denominator is zero, the
+    * entry is skipped.  If the denominator is always zero, the value of
+    * tbox::IEEE::getFLT_MAX() is returned (see @ref SAMRAI::tbox::IEEE).
+    *
+    * @b Note: This method is currently intended to support the
+    * SUNDIALS vector wrapper only.  Please do not use it!
+    */
+   TYPE
+   minPointwiseDivide(
+      const tbox::Pointer<pdat::CellData<TYPE> >& numer,
+      const tbox::Pointer<pdat::CellData<TYPE> >& denom,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   PatchCellDataMiscellaneousOpsReal(
+      const PatchCellDataMiscellaneousOpsReal<TYPE>&);
+   void
+   operator = (
+      const PatchCellDataMiscellaneousOpsReal<TYPE>&);
+
+   ArrayDataMiscellaneousOpsReal<TYPE> d_array_ops;
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchCellDataNormOpsComplex.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchCellDataNormOpsComplex.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,258 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Norm operations for complex cell-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchCellDataNormOpsComplex_C
+#define included_math_PatchCellDataNormOpsComplex_C
+
+#include "SAMRAI/math/PatchCellDataNormOpsComplex.h"
+#ifdef DEBUG_CHECK_ASSERTIONS
+#include "SAMRAI/tbox/Utilities.h"
+#endif
+
+namespace SAMRAI {
+namespace math {
+
+PatchCellDataNormOpsComplex::PatchCellDataNormOpsComplex()
+{
+}
+
+PatchCellDataNormOpsComplex::~PatchCellDataNormOpsComplex()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute the number of data entries on a patch in the given box.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int PatchCellDataNormOpsComplex::numberOfEntries(
+   const tbox::Pointer<pdat::CellData<dcomplex> >& data,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const hier::Box ibox = box * data->getGhostBox();
+   int retval = ibox.size() * data->getDepth();
+   return retval;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Norm operations for complex cell-centered data.                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double PatchCellDataNormOpsComplex::sumControlVolumes(
+   const tbox::Pointer<pdat::CellData<dcomplex> >& data,
+   const tbox::Pointer<pdat::CellData<double> >& cvol,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull() && !cvol.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*data, *cvol, box);
+
+   return d_array_ops.sumControlVolumes(data->getArrayData(),
+      cvol->getArrayData(),
+      box);
+}
+
+void PatchCellDataNormOpsComplex::abs(
+   tbox::Pointer<pdat::CellData<double> >& dst,
+   const tbox::Pointer<pdat::CellData<dcomplex> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   d_array_ops.abs(dst->getArrayData(),
+      src->getArrayData(),
+      box);
+}
+
+double PatchCellDataNormOpsComplex::L1Norm(
+   const tbox::Pointer<pdat::CellData<dcomplex> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::CellData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   double retval;
+   if (cvol.isNull()) {
+      retval = d_array_ops.L1Norm(data->getArrayData(), box);
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      retval = d_array_ops.L1NormWithControlVolume(data->getArrayData(),
+            cvol->getArrayData(),
+            box);
+   }
+   return retval;
+}
+
+double PatchCellDataNormOpsComplex::L2Norm(
+   const tbox::Pointer<pdat::CellData<dcomplex> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::CellData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   double retval;
+   if (cvol.isNull()) {
+      retval = d_array_ops.L2Norm(data->getArrayData(), box);
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      retval = d_array_ops.L2NormWithControlVolume(data->getArrayData(),
+            cvol->getArrayData(),
+            box);
+   }
+   return retval;
+}
+
+double PatchCellDataNormOpsComplex::weightedL2Norm(
+   const tbox::Pointer<pdat::CellData<dcomplex> >& data,
+   const tbox::Pointer<pdat::CellData<dcomplex> >& weight,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::CellData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull() && !weight.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*data, *weight, box);
+
+   double retval;
+   if (cvol.isNull()) {
+      retval = d_array_ops.weightedL2Norm(data->getArrayData(),
+            weight->getArrayData(),
+            box);
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      retval = d_array_ops.weightedL2NormWithControlVolume(
+            data->getArrayData(),
+            weight->getArrayData(),
+            cvol->getArrayData(),
+            box);
+   }
+   return retval;
+}
+
+double PatchCellDataNormOpsComplex::RMSNorm(
+   const tbox::Pointer<pdat::CellData<dcomplex> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::CellData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   double retval = L2Norm(data, box, cvol);
+   if (cvol.isNull()) {
+      retval /= sqrt((double)numberOfEntries(data, box));
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      retval /= sqrt(sumControlVolumes(data, cvol, box));
+   }
+   return retval;
+}
+
+double PatchCellDataNormOpsComplex::weightedRMSNorm(
+   const tbox::Pointer<pdat::CellData<dcomplex> >& data,
+   const tbox::Pointer<pdat::CellData<dcomplex> >& weight,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::CellData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull() && !weight.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*data, *weight, box);
+
+   double retval = weightedL2Norm(data, weight, box, cvol);
+   if (cvol.isNull()) {
+      retval /= sqrt((double)numberOfEntries(data, box));
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      retval /= sqrt(sumControlVolumes(data, cvol, box));
+   }
+   return retval;
+}
+
+double PatchCellDataNormOpsComplex::maxNorm(
+   const tbox::Pointer<pdat::CellData<dcomplex> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::CellData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   double retval;
+   if (cvol.isNull()) {
+      retval = d_array_ops.maxNorm(data->getArrayData(), box);
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      retval = d_array_ops.maxNormWithControlVolume(data->getArrayData(),
+            cvol->getArrayData(),
+            box);
+   }
+   return retval;
+}
+
+dcomplex PatchCellDataNormOpsComplex::dot(
+   const tbox::Pointer<pdat::CellData<dcomplex> >& data1,
+   const tbox::Pointer<pdat::CellData<dcomplex> >& data2,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::CellData<double> > cvol) const
+{
+   TBOX_ASSERT(!data1.isNull() && !data2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*data1, *data2, box);
+
+   dcomplex retval;
+   if (cvol.isNull()) {
+      retval = d_array_ops.dot(data1->getArrayData(),
+            data2->getArrayData(),
+            box);
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data1, *cvol);
+
+      retval = d_array_ops.dotWithControlVolume(
+            data1->getArrayData(),
+            data2->getArrayData(),
+            cvol->getArrayData(),
+            box);
+   }
+   return retval;
+}
+
+dcomplex PatchCellDataNormOpsComplex::integral(
+   const tbox::Pointer<pdat::CellData<dcomplex> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::CellData<double> > vol) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_ASSERT(!vol.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*data, box, *vol);
+
+   dcomplex retval = dcomplex(0.0, 0.0);
+
+   retval = d_array_ops.integral(data->getArrayData(),
+         vol->getArrayData(),
+         box);
+
+   return retval;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchCellDataNormOpsComplex.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchCellDataNormOpsComplex.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,216 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Norm operations for complex cell-centered data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchCellDataNormOpsComplex
+#define included_math_PatchCellDataNormOpsComplex
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/math/ArrayDataNormOpsComplex.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchCellDataNormOpsComplex provides a collection of common
+ * norm operations that may be applied to complex cell-centered patch data.
+ * The primary intent of this class is to define part of the interface for the
+ * PatchCellDataOpsComplex class which provides access to operations
+ * that may be used to manipulate complex cell-centered patch data.  Each
+ * member function accepts a box argument indicating the region of index space
+ * on which the operation should be performed.  The operation will be performed
+ * on the intersection of this box and those boxes corresponding to the patch
+ * data objects.  Also, each operation allows an additional cell-centered
+ * patch data object to be used to represent a control volume that weights the
+ * contribution of each data entry in the given norm calculation.  Note that
+ * the control volume patch data must be of type double and have cell-centered
+ * geometry (i.e., the same as the data itself).  The use of control volumes
+ * is important when these operations are used in vector kernels where the
+ * data resides over multiple levels of spatial resolution in an AMR hierarchy.
+ * If the control volume is not given in the function call, it will be ignored
+ * in the calculation.  Also, note that the depth of the control volume patch
+ * data object must be either 1 or be equal to the depth of the other data
+ * objects.
+ *
+ * Note that a similar set of norm operations is implemented for real
+ * patch data (double and float) in the class PatchCellDataNormOpsReal.
+ *
+ * @see math::ArrayDataNormOpsComplex
+ */
+
+class PatchCellDataNormOpsComplex
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchCellDataNormOpsComplex();
+
+   virtual ~PatchCellDataNormOpsComplex();
+
+   /**
+    * Return the number of data values for the cell-centered data object
+    * in the given box.
+    */
+   int
+   numberOfEntries(
+      const tbox::Pointer<pdat::CellData<dcomplex> >& data,
+      const hier::Box& box) const;
+
+   /**
+    * Return sum of control volume entries for the cell-centered data object.
+    */
+   double
+   sumControlVolumes(
+      const tbox::Pointer<pdat::CellData<dcomplex> >& data,
+      const tbox::Pointer<pdat::CellData<double> >& cvol,
+      const hier::Box& box) const;
+
+   /**
+    * Set destination component to norm of source component.  That is,
+    * each destination entry is set to
+    * \f$d_i = \sqrt{ {real(s_i)}^2 + {imag(s_i)}^2 }\f$.
+    */
+   void
+   abs(
+      tbox::Pointer<pdat::CellData<double> >& dst,
+      const tbox::Pointer<pdat::CellData<dcomplex> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Return discrete \f$L_1\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( \sqrt{data_i * \bar{data_i}}*cvol_i )\f$.
+    * If the control volume is NULL, the return value is
+    * \f$\sum_i ( \sqrt{data_i * \bar{data_i}} )\f$.
+    */
+   double
+   L1Norm(
+      const tbox::Pointer<pdat::CellData<dcomplex> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::CellData<double> > cvol =
+         tbox::Pointer<pdat::CellData<double> >(NULL)) const;
+
+   /**
+    * Return discrete \f$L_2\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum
+    * \f$\sqrt{ \sum_i ( data_i * \bar{data_i} cvol_i ) }\f$.
+    * If the control volume is NULL, the return value is
+    * \f$\sqrt{ \sum_i ( data_i * \bar{data_i} ) }\f$.
+    */
+   double
+   L2Norm(
+      const tbox::Pointer<pdat::CellData<dcomplex> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::CellData<double> > cvol =
+         tbox::Pointer<pdat::CellData<double> >(NULL)) const;
+
+   /**
+    * Return discrete weighted \f$L_2\f$-norm of the data using the control
+    * volume to weight the contribution of the data and weight entries to
+    * the sum.  That is, the return value is the sum \f$\sqrt{ \sum_i (
+    * (data_i * wgt_i) * \bar{(data_i * wgt_i)} cvol_i ) }\f$.  If the control
+    * volume is NULL, the return value is
+    * \f$\sqrt{ \sum_i ( (data_i * wgt_i) * \bar{(data_i * wgt_i)} cvol_i ) }\f$.
+    */
+   double
+   weightedL2Norm(
+      const tbox::Pointer<pdat::CellData<dcomplex> >& data,
+      const tbox::Pointer<pdat::CellData<dcomplex> >& weight,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::CellData<double> > cvol =
+         tbox::Pointer<pdat::CellData<double> >(NULL)) const;
+
+   /**
+    * Return discrete root mean squared norm of the data.  If the control
+    * volume is not NULL, the return value is the \f$L_2\f$-norm divided by
+    * the square root of the sum of the control volumes.  Otherwise, the
+    * return value is the \f$L_2\f$-norm divided by the square root of the
+    * number of data entries.
+    */
+   double
+   RMSNorm(
+      const tbox::Pointer<pdat::CellData<dcomplex> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::CellData<double> > cvol =
+         tbox::Pointer<pdat::CellData<double> >(NULL)) const;
+
+   /**
+    * Return discrete weighted root mean squared norm of the data.  If the
+    * control volume is not NULL, the return value is the weighted \f$L_2\f$-norm
+    * divided by the square root of the sum of the control volumes.  Otherwise,
+    * the return value is the weighted \f$L_2\f$-norm divided by the square root
+    * of the number of data entries.
+    */
+   double
+   weightedRMSNorm(
+      const tbox::Pointer<pdat::CellData<dcomplex> >& data,
+      const tbox::Pointer<pdat::CellData<dcomplex> >& weight,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::CellData<double> > cvol =
+         tbox::Pointer<pdat::CellData<double> >(NULL)) const;
+
+   /**
+    * Return the \f$\max\f$-norm of the data using the control volume to weight
+    * the contribution of each data entry to the maximum.  That is, the return
+    * value is \f$\max_i ( \sqrt{data_i * \bar{data_i}} )\f$, where the max is
+    * over the data elements where \f$cvol_i > 0\f$.  If the control volume is
+    * NULL, it is ignored during the computation of the maximum.
+    */
+   double
+   maxNorm(
+      const tbox::Pointer<pdat::CellData<dcomplex> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::CellData<double> > cvol =
+         tbox::Pointer<pdat::CellData<double> >(NULL)) const;
+
+   /**
+    * Return the dot product of the two data arrays using the control volume
+    * to weight the contribution of each product to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( data1_i * \bar{data2_i} * cvol_i )\f$.
+    * If the control volume is NULL, it is ignored during the summation.
+    */
+   dcomplex
+   dot(
+      const tbox::Pointer<pdat::CellData<dcomplex> >& data1,
+      const tbox::Pointer<pdat::CellData<dcomplex> >& data2,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::CellData<double> > cvol =
+         tbox::Pointer<pdat::CellData<double> >(NULL)) const;
+
+   /**
+    * Return the integral of the function represented by the data array.
+    * The return value is the sum \f$\sum_i ( data_i * vol_i )\f$.
+    */
+   dcomplex
+   integral(
+      const tbox::Pointer<pdat::CellData<dcomplex> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::CellData<double> > vol) const;
+
+private:
+   // The following are not implemented:
+   PatchCellDataNormOpsComplex(
+      const PatchCellDataNormOpsComplex&);
+   void
+   operator = (
+      const PatchCellDataNormOpsComplex&);
+
+   ArrayDataNormOpsComplex d_array_ops;
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchCellDataNormOpsReal.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchCellDataNormOpsReal.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,284 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated norm operations for real cell-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchCellDataNormOpsReal_C
+#define included_math_PatchCellDataNormOpsReal_C
+
+#include "SAMRAI/math/PatchCellDataNormOpsReal.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+PatchCellDataNormOpsReal<TYPE>::PatchCellDataNormOpsReal()
+{
+}
+
+template<class TYPE>
+PatchCellDataNormOpsReal<TYPE>::~PatchCellDataNormOpsReal()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The const constructor and assignment operator are not actually used   *
+ * but are defined here for compilers that require an implementation for *
+ * every declaration.                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+PatchCellDataNormOpsReal<TYPE>::PatchCellDataNormOpsReal(
+   const PatchCellDataNormOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void PatchCellDataNormOpsReal<TYPE>::operator = (
+   const PatchCellDataNormOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute the number of data entries on a patch in the given box.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+int PatchCellDataNormOpsReal<TYPE>::numberOfEntries(
+   const tbox::Pointer<pdat::CellData<TYPE> >& data,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const hier::Box ibox = box * data->getGhostBox();
+   int retval = (ibox.size() * data->getDepth());
+   return retval;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Templated norm operations for real cell-centered data.                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+double PatchCellDataNormOpsReal<TYPE>::sumControlVolumes(
+   const tbox::Pointer<pdat::CellData<TYPE> >& data,
+   const tbox::Pointer<pdat::CellData<double> >& cvol,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull() && !cvol.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   return d_array_ops.sumControlVolumes(data->getArrayData(),
+      cvol->getArrayData(),
+      box);
+}
+
+template<class TYPE>
+void PatchCellDataNormOpsReal<TYPE>::abs(
+   tbox::Pointer<pdat::CellData<TYPE> >& dst,
+   const tbox::Pointer<pdat::CellData<TYPE> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   d_array_ops.abs(dst->getArrayData(),
+      src->getArrayData(),
+      box);
+}
+
+template<class TYPE>
+double PatchCellDataNormOpsReal<TYPE>::L1Norm(
+   const tbox::Pointer<pdat::CellData<TYPE> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::CellData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   double retval;
+   if (cvol.isNull()) {
+      retval = d_array_ops.L1Norm(data->getArrayData(), box);
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      retval = d_array_ops.L1NormWithControlVolume(data->getArrayData(),
+            cvol->getArrayData(),
+            box);
+   }
+   return retval;
+}
+
+template<class TYPE>
+double PatchCellDataNormOpsReal<TYPE>::L2Norm(
+   const tbox::Pointer<pdat::CellData<TYPE> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::CellData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   double retval;
+   if (cvol.isNull()) {
+      retval = d_array_ops.L2Norm(data->getArrayData(), box);
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      retval = d_array_ops.L2NormWithControlVolume(data->getArrayData(),
+            cvol->getArrayData(),
+            box);
+   }
+   return retval;
+}
+
+template<class TYPE>
+double PatchCellDataNormOpsReal<TYPE>::weightedL2Norm(
+   const tbox::Pointer<pdat::CellData<TYPE> >& data,
+   const tbox::Pointer<pdat::CellData<TYPE> >& weight,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::CellData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull() && !weight.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*data, *weight, box);
+
+   double retval;
+   if (cvol.isNull()) {
+      retval = d_array_ops.weightedL2Norm(data->getArrayData(),
+            weight->getArrayData(),
+            box);
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      retval = d_array_ops.weightedL2NormWithControlVolume(
+            data->getArrayData(),
+            weight->getArrayData(),
+            cvol->getArrayData(),
+            box);
+   }
+   return retval;
+}
+
+template<class TYPE>
+double PatchCellDataNormOpsReal<TYPE>::RMSNorm(
+   const tbox::Pointer<pdat::CellData<TYPE> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::CellData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   double retval = L2Norm(data, box, cvol);
+   if (cvol.isNull()) {
+      retval /= sqrt((double)numberOfEntries(data, box));
+   } else {
+      retval /= sqrt(sumControlVolumes(data, cvol, box));
+   }
+   return retval;
+}
+
+template<class TYPE>
+double PatchCellDataNormOpsReal<TYPE>::weightedRMSNorm(
+   const tbox::Pointer<pdat::CellData<TYPE> >& data,
+   const tbox::Pointer<pdat::CellData<TYPE> >& weight,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::CellData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull() && !weight.isNull());
+#endif
+   double retval = weightedL2Norm(data, weight, box, cvol);
+   if (cvol.isNull()) {
+      retval /= sqrt((double)numberOfEntries(data, box));
+   } else {
+      retval /= sqrt(sumControlVolumes(data, cvol, box));
+   }
+   return retval;
+}
+
+template<class TYPE>
+double PatchCellDataNormOpsReal<TYPE>::maxNorm(
+   const tbox::Pointer<pdat::CellData<TYPE> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::CellData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   double retval;
+   if (cvol.isNull()) {
+      retval = d_array_ops.maxNorm(data->getArrayData(), box);
+   } else {
+      retval = d_array_ops.maxNormWithControlVolume(data->getArrayData(),
+            cvol->getArrayData(),
+            box);
+   }
+   return retval;
+}
+
+template<class TYPE>
+TYPE PatchCellDataNormOpsReal<TYPE>::dot(
+   const tbox::Pointer<pdat::CellData<TYPE> >& data1,
+   const tbox::Pointer<pdat::CellData<TYPE> >& data2,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::CellData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data1.isNull() && !data2.isNull());
+#endif
+   TYPE retval;
+   if (cvol.isNull()) {
+      retval = d_array_ops.dot(data1->getArrayData(),
+            data2->getArrayData(),
+            box);
+   } else {
+      retval = d_array_ops.dotWithControlVolume(
+            data1->getArrayData(),
+            data2->getArrayData(),
+            cvol->getArrayData(),
+            box);
+   }
+   return retval;
+}
+
+template<class TYPE>
+TYPE PatchCellDataNormOpsReal<TYPE>::integral(
+   const tbox::Pointer<pdat::CellData<TYPE> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::CellData<double> > vol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   TYPE retval = 0.0;
+
+   retval = d_array_ops.integral(data->getArrayData(),
+         vol->getArrayData(),
+         box);
+
+   return retval;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchCellDataNormOpsReal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchCellDataNormOpsReal.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,223 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated norm operations for real cell-centered data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchCellDataNormOpsReal
+#define included_math_PatchCellDataNormOpsReal
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/math/ArrayDataNormOpsReal.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchCellDataNormOpsReal provides a collection of common
+ * norm operations that may be applied to real (double or float)
+ * numerical cell-centered patch data.  The primary intent of this class is
+ * to define part of the interface for an PatchCellDataOpsReal object
+ * which provides access operations that may be used to manipulate
+ * cell-centered patch data.  Each member function accepts a box argument
+ * indicating the region of index space on which the operation should be
+ * performed.  The operation will be performed on the intersection of this
+ * box and those boxes corresponding to the patch data objects.  Also, each
+ * operation allows an additional cell-centered patch data object to be used
+ * to represent a control volume that weights the contribution of each data
+ * entry in the given norm calculation.  Note that the control volume patch
+ * data must be of type double and have cell-centered geometry (i.e., the
+ * same as the data itself).  The use of control volumes is important when
+ * these operations are used in vector kernels where the data resides over
+ * multiple levels of spatial resolution in an AMR hierarchy.  If the control
+ * volume is not given in the function call, it will be ignored in the
+ * calculation.  Also, note that the depth of the control volume patch data
+ * object must be either 1 or be equal to the depth of the other data objects.
+ *
+ * These operations typically apply only to the numerical standard built-in
+ * types, such as double, float, and the complex type (which may or may not
+ * be a built-in type depending on the C++ compiler).  This templated
+ * class should only be used to instantiate objects with double or float as
+ * the template parameter.  Note that a similar set of norm operations is
+ * implemented for complex patch data in the class
+ * PatchCellDataNormOpsComplex.
+ *
+ * @see math::ArrayDataNormOpsReal
+ */
+
+template<class TYPE>
+class PatchCellDataNormOpsReal
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchCellDataNormOpsReal();
+
+   virtual ~PatchCellDataNormOpsReal<TYPE>();
+
+   /**
+    * Return the number of data values for the cell-centered data object
+    * in the given box.
+    */
+   int
+   numberOfEntries(
+      const tbox::Pointer<pdat::CellData<TYPE> >& data,
+      const hier::Box& box) const;
+
+   /**
+    * Return sum of control volume entries for the cell-centered data object.
+    */
+   double
+   sumControlVolumes(
+      const tbox::Pointer<pdat::CellData<TYPE> >& data,
+      const tbox::Pointer<pdat::CellData<double> >& cvol,
+      const hier::Box& box) const;
+
+   /**
+    * Set destination component to absolute value of source component.
+    * That is, each destination entry is set to \f$d_i = \| s_i \|\f$.
+    */
+   void
+   abs(
+      tbox::Pointer<pdat::CellData<TYPE> >& dst,
+      const tbox::Pointer<pdat::CellData<TYPE> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Return discrete \f$L_1\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( \| data_i \| cvol_i )\f$.  If the
+    * control volume is NULL, the return value is \f$\sum_i ( \| data_i \| )\f$.
+    */
+   double
+   L1Norm(
+      const tbox::Pointer<pdat::CellData<TYPE> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::CellData<double> > cvol =
+         tbox::Pointer<pdat::CellData<double> >(NULL)) const;
+
+   /**
+    * Return discrete \f$L_2\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sqrt{ \sum_i ( (data_i)^2 cvol_i ) }\f$.
+    * If the control volume is NULL, the return value is
+    * \f$\sqrt{ \sum_i ( (data_i)^2 cvol_i ) }\f$.
+    */
+   double
+   L2Norm(
+      const tbox::Pointer<pdat::CellData<TYPE> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::CellData<double> > cvol =
+         tbox::Pointer<pdat::CellData<double> >(NULL)) const;
+
+   /**
+    * Return discrete weighted \f$L_2\f$-norm of the data using the control
+    * volume to weight the contribution of the data and weight entries to
+    * the sum.  That is, the return value is the sum \f$\sqrt{ \sum_i (
+    * (data_i * weight_i)^2 cvol_i ) }\f$.  If the control volume is NULL,
+    * the return value is \f$\sqrt{ \sum_i ( (data_i * weight_i)^2 ) }\f$.
+    */
+   double
+   weightedL2Norm(
+      const tbox::Pointer<pdat::CellData<TYPE> >& data,
+      const tbox::Pointer<pdat::CellData<TYPE> >& weight,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::CellData<double> > cvol =
+         tbox::Pointer<pdat::CellData<double> >(NULL)) const;
+
+   /**
+    * Return discrete root mean squared norm of the data.  If the control
+    * volume is not NULL, the return value is the \f$L_2\f$-norm divided by
+    * the square root of the sum of the control volumes.  Otherwise, the
+    * return value is the \f$L_2\f$-norm divided by the square root of the
+    * number of data entries.
+    */
+   double
+   RMSNorm(
+      const tbox::Pointer<pdat::CellData<TYPE> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::CellData<double> > cvol =
+         tbox::Pointer<pdat::CellData<double> >(NULL)) const;
+
+   /**
+    * Return discrete weighted root mean squared norm of the data.  If the
+    * control volume is not NULL, the return value is the weighted \f$L_2\f$-norm
+    * divided by the square root of the sum of the control volumes.  Otherwise,
+    * the return value is the weighted \f$L_2\f$-norm divided by the square root
+    * of the number of data entries.
+    */
+   double
+   weightedRMSNorm(
+      const tbox::Pointer<pdat::CellData<TYPE> >& data,
+      const tbox::Pointer<pdat::CellData<TYPE> >& weight,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::CellData<double> > cvol =
+         tbox::Pointer<pdat::CellData<double> >(NULL)) const;
+
+   /**
+    * Return the \f$\max\f$-norm of the data using the control volume to weight
+    * the contribution of each data entry to the maximum.  That is, the return
+    * value is \f$\max_i ( \| data_i \| )\f$, where the max is over the data
+    * elements where \f$cvol_i > 0\f$.  If the control volume is NULL, it is
+    * ignored during the computation of the maximum.
+    */
+   double
+   maxNorm(
+      const tbox::Pointer<pdat::CellData<TYPE> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::CellData<double> > cvol =
+         tbox::Pointer<pdat::CellData<double> >(NULL)) const;
+
+   /**
+    * Return the dot product of the two data arrays using the control volume
+    * to weight the contribution of each product to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( data1_i * data2_i * cvol_i )\f$.
+    * If the control volume is NULL, it is ignored during the summation.
+    */
+   TYPE
+   dot(
+      const tbox::Pointer<pdat::CellData<TYPE> >& data1,
+      const tbox::Pointer<pdat::CellData<TYPE> >& data2,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::CellData<double> > cvol =
+         tbox::Pointer<pdat::CellData<double> >(NULL)) const;
+
+   /**
+    * Return the integral of the function represented by the data array.
+    * The return value is the sum \f$\sum_i ( data_i * vol_i )\f$.
+    */
+   TYPE
+   integral(
+      const tbox::Pointer<pdat::CellData<TYPE> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::CellData<double> > vol) const;
+
+private:
+   // The following are not implemented:
+   PatchCellDataNormOpsReal(
+      const PatchCellDataNormOpsReal<TYPE>&);
+   void
+   operator = (
+      const PatchCellDataNormOpsReal<TYPE>&);
+
+   ArrayDataNormOpsReal<TYPE> d_array_ops;
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/PatchCellDataNormOpsReal.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchCellDataOpsComplex.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchCellDataOpsComplex.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,94 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for complex cell-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchCellDataOpsComplex_C
+#define included_math_PatchCellDataOpsComplex_C
+
+#include "SAMRAI/math/PatchCellDataOpsComplex.h"
+#ifdef DEBUG_CHECK_ASSERTIONS
+#include "SAMRAI/tbox/Utilities.h"
+#endif
+
+namespace SAMRAI {
+namespace math {
+
+PatchCellDataOpsComplex::PatchCellDataOpsComplex()
+{
+}
+
+PatchCellDataOpsComplex::~PatchCellDataOpsComplex()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * General operations for complex cell-centered patch data.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchCellDataOpsComplex::swapData(
+   tbox::Pointer<hier::Patch> patch,
+   const int data1_id,
+   const int data2_id) const
+{
+   TBOX_ASSERT(!patch.isNull());
+
+   tbox::Pointer<pdat::CellData<dcomplex> > d1 = patch->getPatchData(data1_id);
+   tbox::Pointer<pdat::CellData<dcomplex> > d2 = patch->getPatchData(data2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d1.isNull() && !d2.isNull());
+   TBOX_ASSERT(d1->getDepth() && d2->getDepth());
+   TBOX_ASSERT(d1->getBox() == d2->getBox());
+   TBOX_ASSERT(d1->getGhostBox() == d2->getGhostBox());
+#endif
+   patch->setPatchData(data1_id, d2);
+   patch->setPatchData(data2_id, d1);
+}
+
+void PatchCellDataOpsComplex::printData(
+   const tbox::Pointer<pdat::CellData<dcomplex> >& data,
+   const hier::Box& box,
+   std::ostream& s) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   s << "Data box = " << box << std::endl;
+   data->print(box, s);
+   s << "\n";
+}
+
+void PatchCellDataOpsComplex::copyData(
+   tbox::Pointer<pdat::CellData<dcomplex> >& dst,
+   const tbox::Pointer<pdat::CellData<dcomplex> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   (dst->getArrayData()).copy(src->getArrayData(), box);
+}
+
+void PatchCellDataOpsComplex::setToScalar(
+   tbox::Pointer<pdat::CellData<dcomplex> >& dst,
+   const dcomplex& alpha,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*dst, box);
+
+   dst->fillAll(alpha, box);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchCellDataOpsComplex.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchCellDataOpsComplex.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for complex cell-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchCellDataOpsComplex
+#define included_math_PatchCellDataOpsComplex
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/math/PatchCellDataBasicOps.h"
+#include "SAMRAI/math/PatchCellDataNormOpsComplex.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchCellDataOpsComplex provides a collection of operations
+ * that may be used to manipulate complex cell-centered patch data.  The
+ * operations include basic arithmetic and norms.  With the
+ * assertion of a few basic routines, this class inherits its interface (and
+ * thus its functionality) from the base classes PatchCellDataBasicOps,
+ * PatchCellDataNormOpsComplex from which it is derived.  The
+ * name of each of these base classes is indicative of the set of
+ * cell-centered patch data operations that it provides.
+ *
+ * A similar set of operations is implemented for real (double and float) and
+ * integer patch data in the classes PatchCellDataOpsReal and
+ * PatchCellDataOpsInteger, respectively.
+ *
+ * @see math::PatchCellDataBasicOps
+ * @see math::PatchCellDataNormOpsComplex
+ */
+
+class PatchCellDataOpsComplex:
+   public tbox::DescribedClass,
+   public PatchCellDataBasicOps<dcomplex>,
+   public PatchCellDataNormOpsComplex
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchCellDataOpsComplex();
+
+   virtual ~PatchCellDataOpsComplex();
+
+   /**
+    * Copy dst data to src data over given box.
+    */
+   void
+   copyData(
+      tbox::Pointer<pdat::CellData<dcomplex> >& dst,
+      const tbox::Pointer<pdat::CellData<dcomplex> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Swap pointers for patch data objects.  Objects are checked for
+    * consistency of depth, box, and ghost box.
+    */
+   void
+   swapData(
+      tbox::Pointer<hier::Patch> patch,
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data entries over given box to given output stream.
+    */
+   void
+   printData(
+      const tbox::Pointer<pdat::CellData<dcomplex> >& data,
+      const hier::Box& box,
+      std::ostream& s = tbox::plog) const;
+
+   /**
+    * Initialize data to given scalar over given box.
+    */
+   void
+   setToScalar(
+      tbox::Pointer<pdat::CellData<dcomplex> >& dst,
+      const dcomplex& alpha,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   PatchCellDataOpsComplex(
+      const PatchCellDataOpsComplex&);
+   void
+   operator = (
+      const PatchCellDataOpsComplex&);
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchCellDataOpsInteger.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchCellDataOpsInteger.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,127 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for integer cell-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchCellDataOpsInteger_C
+#define included_math_PatchCellDataOpsInteger_C
+
+#include "SAMRAI/math/PatchCellDataOpsInteger.h"
+#ifdef DEBUG_CHECK_ASSERTIONS
+#include "SAMRAI/tbox/Utilities.h"
+#endif
+
+namespace SAMRAI {
+namespace math {
+
+PatchCellDataOpsInteger::PatchCellDataOpsInteger()
+{
+}
+
+PatchCellDataOpsInteger::~PatchCellDataOpsInteger()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute the number of data entries on a patch in the given box.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int PatchCellDataOpsInteger::numberOfEntries(
+   const tbox::Pointer<pdat::CellData<int> >& data,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const hier::Box ibox = box * data->getGhostBox();
+   int retval = ibox.size() * data->getDepth();
+   return retval;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * General operations for integer cell-centered patch data.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchCellDataOpsInteger::swapData(
+   tbox::Pointer<hier::Patch> patch,
+   const int data1_id,
+   const int data2_id) const
+{
+   TBOX_ASSERT(!patch.isNull());
+
+   tbox::Pointer<pdat::CellData<int> > d1 = patch->getPatchData(data1_id);
+   tbox::Pointer<pdat::CellData<int> > d2 = patch->getPatchData(data2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d1.isNull() && !d2.isNull());
+   TBOX_ASSERT(d1->getDepth() && d2->getDepth());
+   TBOX_ASSERT(d1->getBox() == d2->getBox());
+   TBOX_ASSERT(d1->getGhostBox() == d2->getGhostBox());
+#endif
+   patch->setPatchData(data1_id, d2);
+   patch->setPatchData(data2_id, d1);
+}
+
+void PatchCellDataOpsInteger::printData(
+   const tbox::Pointer<pdat::CellData<int> >& data,
+   const hier::Box& box,
+   std::ostream& s) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   s << "Data box = " << box << std::endl;
+   data->print(box, s);
+   s << "\n";
+}
+
+void PatchCellDataOpsInteger::copyData(
+   tbox::Pointer<pdat::CellData<int> >& dst,
+   const tbox::Pointer<pdat::CellData<int> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   (dst->getArrayData()).copy(src->getArrayData(), box);
+}
+
+void PatchCellDataOpsInteger::setToScalar(
+   tbox::Pointer<pdat::CellData<int> >& dst,
+   const int& alpha,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*dst, box);
+
+   dst->fillAll(alpha, box);
+}
+
+void PatchCellDataOpsInteger::abs(
+   tbox::Pointer<pdat::CellData<int> >& dst,
+   const tbox::Pointer<pdat::CellData<int> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   d_array_ops.abs(dst->getArrayData(),
+      src->getArrayData(),
+      box);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchCellDataOpsInteger.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchCellDataOpsInteger.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,126 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for integer cell-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchCellDataOpsInteger
+#define included_math_PatchCellDataOpsInteger
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/math/PatchCellDataBasicOps.h"
+#include "SAMRAI/math/ArrayDataNormOpsInteger.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchCellDataOpsInteger provides a collection of operations
+ * that may be used to manipulate integer cell-centered patch data.  The
+ * operations include basic arithmetic, min, max, etc.  With the assertion
+ * of a few basic routines, this class inherits its interface (and
+ * thus its functionality) from the base class PatchCellDataBasicOps
+ * from which it is derived.
+ *
+ * A more extensive set of operations is implemented for real (double and
+ * float) and complex patch data in the classes PatchCellDataOpsReal
+ * and PatchCellDataOpsComplex, respectively.
+ *
+ * @see math::PatchCellDataBasicOps
+ */
+
+class PatchCellDataOpsInteger:
+   public tbox::DescribedClass,
+   public PatchCellDataBasicOps<int>
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchCellDataOpsInteger();
+
+   virtual ~PatchCellDataOpsInteger();
+
+   /**
+    * Return the number of data values for the cell-centered data object
+    * in the given box.
+    */
+   int
+   numberOfEntries(
+      const tbox::Pointer<pdat::CellData<int> >& data,
+      const hier::Box& box) const;
+
+   /**
+    * Copy dst data to src data over given box.
+    */
+   void
+   copyData(
+      tbox::Pointer<pdat::CellData<int> >& dst,
+      const tbox::Pointer<pdat::CellData<int> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Swap pointers for patch data objects.  Objects are checked for
+    * consistency of depth, box, and ghost box.
+    */
+   void
+   swapData(
+      tbox::Pointer<hier::Patch> patch,
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data entries over given box to given output stream.
+    */
+   void
+   printData(
+      const tbox::Pointer<pdat::CellData<int> >& data,
+      const hier::Box& box,
+      std::ostream& s = tbox::plog) const;
+
+   /**
+    * Initialize data to given scalar over given box.
+    */
+   void
+   setToScalar(
+      tbox::Pointer<pdat::CellData<int> >& dst,
+      const int& alpha,
+      const hier::Box& box) const;
+
+   /**
+    * Set destination component to absolute value of source component.
+    * That is, each destination entry is set to \f$d_i = \| s_i \|\f$.
+    */
+   void
+   abs(
+      tbox::Pointer<pdat::CellData<int> >& dst,
+      const tbox::Pointer<pdat::CellData<int> >& src,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   PatchCellDataOpsInteger(
+      const PatchCellDataOpsInteger&);
+   void
+   operator = (
+      const PatchCellDataOpsInteger&);
+
+   ArrayDataNormOpsInteger d_array_ops;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchCellDataOpsReal.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchCellDataOpsReal.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,128 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations for real cell-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchCellDataOpsReal_C
+#define included_math_PatchCellDataOpsReal_C
+
+#include "SAMRAI/math/PatchCellDataOpsReal.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+PatchCellDataOpsReal<TYPE>::PatchCellDataOpsReal()
+{
+}
+
+#if 0
+/*
+ * This was moved into the header due to what looks like bug in the
+ * XLC compiler.
+ */
+template<class TYPE>
+PatchCellDataOpsReal<TYPE>::~PatchCellDataOpsReal()
+{
+}
+#endif
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The const constructor and assignment operator are not actually used   *
+ * but are defined here for compilers that require an implementation for *
+ * every declaration.                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+PatchCellDataOpsReal<TYPE>::PatchCellDataOpsReal(
+   const PatchCellDataOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void PatchCellDataOpsReal<TYPE>::operator = (
+   const PatchCellDataOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * General templated operations for real cell-centered patch data.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void PatchCellDataOpsReal<TYPE>::swapData(
+   tbox::Pointer<hier::Patch> patch,
+   const int data1_id,
+   const int data2_id) const
+{
+   TBOX_ASSERT(!patch.isNull());
+
+   tbox::Pointer<pdat::CellData<TYPE> > d1 = patch->getPatchData(data1_id);
+   tbox::Pointer<pdat::CellData<TYPE> > d2 = patch->getPatchData(data2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d1.isNull() && !d2.isNull());
+   TBOX_ASSERT(d1->getDepth() && d2->getDepth());
+   TBOX_ASSERT(d1->getBox() == d2->getBox());
+   TBOX_ASSERT(d1->getGhostBox() == d2->getGhostBox());
+#endif
+   patch->setPatchData(data1_id, d2);
+   patch->setPatchData(data2_id, d1);
+}
+
+template<class TYPE>
+void PatchCellDataOpsReal<TYPE>::printData(
+   const tbox::Pointer<pdat::CellData<TYPE> >& data,
+   const hier::Box& box,
+   std::ostream& s) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   s << "Data box = " << box << std::endl;
+   data->print(box, s);
+   s << "\n";
+}
+
+template<class TYPE>
+void PatchCellDataOpsReal<TYPE>::copyData(
+   tbox::Pointer<pdat::CellData<TYPE> >& dst,
+   const tbox::Pointer<pdat::CellData<TYPE> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   (dst->getArrayData()).copy(src->getArrayData(), box);
+}
+
+template<class TYPE>
+void PatchCellDataOpsReal<TYPE>::setToScalar(
+   tbox::Pointer<pdat::CellData<TYPE> >& dst,
+   const TYPE& alpha,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*dst, box);
+
+   dst->fillAll(alpha, box);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchCellDataOpsReal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchCellDataOpsReal.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations for real cell-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchCellDataOpsReal
+#define included_math_PatchCellDataOpsReal
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/math/PatchCellDataBasicOps.h"
+#include "SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h"
+#include "SAMRAI/math/PatchCellDataNormOpsReal.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchCellDataOpsReal provides a collection of operations
+ * to manipulate float and double numerical cell-centered patch data.  The
+ * operations include basic arithmetic, norms and ordering, and assorted
+ * miscellaneous operations.  With the assertion of a few basic routines,
+ * this class inherits its interface (and thus its functionality) from the
+ * base classes PatchCellDataBasicOps, PatchCellDataNormOpsReal,
+ * and PatchCellDataMiscellaneousOpsReal from which it is derived.  The
+ * name of each of these base classes is indicative of the set of
+ * cell-centered patch data operations that it provides.
+ *
+ * Note that this templated class should only be used to instantiate
+ * objects with double or float as the template parameter.  A similar set of
+ * operations is implemented for complex and integer patch data in the classes
+ * PatchCellDataOpsComplex and PatchCellDataOpsInteger,
+ * respectively.
+ *
+ * @see math::PatchCellDataBasicOps
+ * @see math::PatchCellDataMiscellaneousOpsReal
+ * @see math::PatchCellDataNormOpsReal
+ */
+
+template<class TYPE>
+class PatchCellDataOpsReal:
+   public tbox::DescribedClass,
+   public PatchCellDataBasicOps<TYPE>,
+   public PatchCellDataMiscellaneousOpsReal<TYPE>,
+   public PatchCellDataNormOpsReal<TYPE>
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchCellDataOpsReal();
+
+   virtual ~PatchCellDataOpsReal<TYPE>() {}
+
+   /**
+    * Copy dst data to src data over given box.
+    */
+   void
+   copyData(
+      tbox::Pointer<pdat::CellData<TYPE> >& dst,
+      const tbox::Pointer<pdat::CellData<TYPE> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Swap pointers for patch data objects.  Objects are checked for
+    * consistency of depth, box, and ghost box.
+    */
+   void
+   swapData(
+      tbox::Pointer<hier::Patch> patch,
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data entries over given box to given output stream.
+    */
+   void
+   printData(
+      const tbox::Pointer<pdat::CellData<TYPE> >& data,
+      const hier::Box& box,
+      std::ostream& s = tbox::plog) const;
+
+   /**
+    * Initialize data to given scalar over given box.
+    */
+   void
+   setToScalar(
+      tbox::Pointer<pdat::CellData<TYPE> >& dst,
+      const TYPE& alpha,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   PatchCellDataOpsReal(
+      const PatchCellDataOpsReal<TYPE>&);
+   void
+   operator = (
+      const PatchCellDataOpsReal<TYPE>&);
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/PatchCellDataOpsReal.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchEdgeDataBasicOps.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchEdgeDataBasicOps.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,329 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Basic templated edge-centered patch data operations. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchEdgeDataBasicOps_C
+#define included_math_PatchEdgeDataBasicOps_C
+
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/math/PatchEdgeDataBasicOps.h"
+#include "SAMRAI/pdat/EdgeGeometry.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+PatchEdgeDataBasicOps<TYPE>::PatchEdgeDataBasicOps()
+{
+}
+
+template<class TYPE>
+PatchEdgeDataBasicOps<TYPE>::~PatchEdgeDataBasicOps()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The const constructor and assignment operator are not actually used   *
+ * but are defined here for compilers that require an implementation for *
+ * every declaration.                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+PatchEdgeDataBasicOps<TYPE>::PatchEdgeDataBasicOps(
+   const PatchEdgeDataBasicOps<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void PatchEdgeDataBasicOps<TYPE>::operator = (
+   const PatchEdgeDataBasicOps<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * General basic templated operations for edge data.                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void PatchEdgeDataBasicOps<TYPE>::scale(
+   tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+   const TYPE& alpha,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+      d_array_ops.scale(dst->getArrayData(d),
+         alpha, src->getArrayData(d),
+         edge_box);
+   }
+}
+
+template<class TYPE>
+void PatchEdgeDataBasicOps<TYPE>::addScalar(
+   tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& src,
+   const TYPE& alpha,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+      d_array_ops.addScalar(dst->getArrayData(d),
+         src->getArrayData(d), alpha,
+         edge_box);
+   }
+}
+
+template<class TYPE>
+void PatchEdgeDataBasicOps<TYPE>::add(
+   tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& src1,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+      d_array_ops.add(dst->getArrayData(d),
+         src1->getArrayData(d), src2->getArrayData(d),
+         edge_box);
+   }
+}
+
+template<class TYPE>
+void PatchEdgeDataBasicOps<TYPE>::subtract(
+   tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& src1,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+      d_array_ops.subtract(dst->getArrayData(d),
+         src1->getArrayData(d), src2->getArrayData(d),
+         edge_box);
+   }
+}
+
+template<class TYPE>
+void PatchEdgeDataBasicOps<TYPE>::multiply(
+   tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& src1,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+      d_array_ops.multiply(dst->getArrayData(d),
+         src1->getArrayData(d), src2->getArrayData(d),
+         edge_box);
+   }
+}
+
+template<class TYPE>
+void PatchEdgeDataBasicOps<TYPE>::divide(
+   tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& src1,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+      d_array_ops.divide(dst->getArrayData(d),
+         src1->getArrayData(d), src2->getArrayData(d),
+         edge_box);
+   }
+}
+
+template<class TYPE>
+void PatchEdgeDataBasicOps<TYPE>::reciprocal(
+   tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+      d_array_ops.reciprocal(dst->getArrayData(d),
+         src->getArrayData(d),
+         edge_box);
+   }
+}
+
+template<class TYPE>
+void PatchEdgeDataBasicOps<TYPE>::linearSum(
+   tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+   const TYPE& alpha,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& src1,
+   const TYPE& beta,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+      d_array_ops.linearSum(dst->getArrayData(d),
+         alpha, src1->getArrayData(d),
+         beta, src2->getArrayData(d),
+         edge_box);
+   }
+}
+
+template<class TYPE>
+void PatchEdgeDataBasicOps<TYPE>::axpy(
+   tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+   const TYPE& alpha,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& src1,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+      d_array_ops.axpy(dst->getArrayData(d),
+         alpha, src1->getArrayData(d),
+         src2->getArrayData(d),
+         edge_box);
+   }
+}
+
+template<class TYPE>
+void PatchEdgeDataBasicOps<TYPE>::axmy(
+   tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+   const TYPE& alpha,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& src1,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+      d_array_ops.axmy(dst->getArrayData(d),
+         alpha, src1->getArrayData(d),
+         src2->getArrayData(d),
+         edge_box);
+   }
+}
+
+template<class TYPE>
+void PatchEdgeDataBasicOps<TYPE>::setRandomValues(
+   tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+   const TYPE& width,
+   const TYPE& low,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*dst, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+      d_array_ops.setRandomValues(dst->getArrayData(d),
+         width, low, edge_box);
+   }
+}
+
+template<class TYPE>
+TYPE PatchEdgeDataBasicOps<TYPE>::min(
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& data,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(box.getDim());
+   TYPE minval = tbox::MathUtilities<TYPE>::getMax();
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+      minval = tbox::MathUtilities<TYPE>::Min(
+            minval, d_array_ops.min(data->getArrayData(d), edge_box));
+   }
+   return minval;
+}
+
+template<class TYPE>
+TYPE PatchEdgeDataBasicOps<TYPE>::max(
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& data,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   TYPE maxval = -tbox::MathUtilities<TYPE>::getMax();
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+      maxval = tbox::MathUtilities<TYPE>::Max(
+            maxval, d_array_ops.max(data->getArrayData(d), edge_box));
+   }
+   return maxval;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchEdgeDataBasicOps.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchEdgeDataBasicOps.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,210 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Basic templated edge-centered patch data operations. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchEdgeDataBasicOps
+#define included_math_PatchEdgeDataBasicOps
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/math/ArrayDataBasicOps.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchEdgeDataBasicOps provides access to a collection
+ * of basic numerical operations that may be applied to numerical edge-
+ * centered patch data.  These operations include simple arithmetic
+ * operations as well as min and max, etc.  The primary intent of this
+ * class is to provide the interface to these standard operations for
+ * an PatchEdgeDataOps<DIM> object which provides access to a complete set
+ * of operations that may be used to manipulate edge-centered patch data
+ * objects.   Each member function accepts a box argument indicating the
+ * region of index space on which the operation should be performed.  The
+ * operation will be performed on the intersection of this box and those
+ * boxes corresponding to the patch data objects involved.
+ *
+ * These operations typically apply only to the numerical standard built-in
+ * types, such as double, float, and int, and the complex type (which may or
+ * may not be a built-in type depending on the C++ compiler).  Thus, this
+ * templated class should only be used to instantiate objects with those
+ * types as the template parameter.  None of the operations are implemented
+ * for any other type.
+ *
+ * @see math::ArrayDataBasicOps
+ */
+
+template<class TYPE>
+class PatchEdgeDataBasicOps
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchEdgeDataBasicOps();
+
+   virtual ~PatchEdgeDataBasicOps<TYPE>();
+
+   /**
+    * Set dst = alpha * src, elementwise.
+    */
+   void
+   scale(
+      tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+      const TYPE& alpha,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src + alpha, elementwise.
+    */
+   void
+   addScalar(
+      tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& src,
+      const TYPE& alpha,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src1 + src2, elementwise.
+    */
+   void
+   add(
+      tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& src1,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src1 - src2, elementwise.
+    */
+   void
+   subtract(
+      tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& src1,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src1 * src2, elementwise.
+    */
+   void
+   multiply(
+      tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& src1,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src1 / src2, elementwise.  No check for division by zero.
+    */
+   void
+   divide(
+      tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& src1,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = 1 / src, elementwise.  No check for division by zero.
+    */
+   void
+   reciprocal(
+      tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = alpha * src1 + beta * src2, elementwise.
+    */
+   void
+   linearSum(
+      tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+      const TYPE& alpha,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& src1,
+      const TYPE& beta,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = alpha * src1 + src2, elementwise.
+    */
+   void
+   axpy(
+      tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+      const TYPE& alpha,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& src1,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = alpha * src1 - src2, elementwise.
+    */
+   void
+   axmy(
+      tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+      const TYPE& alpha,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& src1,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Return the minimum patch data component entry  When the data is
+    * complex, the result is the data element with the smallest norm.
+    */
+   TYPE
+   min(
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& data,
+      const hier::Box& box) const;
+
+   /**
+    * Return the maximum patch data component entry  When the data is
+    * complex, the result is the data element with the largest norm.
+    */
+   TYPE
+   max(
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& data,
+      const hier::Box& box) const;
+
+   /**
+    * Set patch data to random values.  See the operations in the
+    * ArrayDataBasicOps class for details on the generation
+    * of the random values for each data type.
+    */
+   void
+   setRandomValues(
+      tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+      const TYPE& width,
+      const TYPE& low,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   PatchEdgeDataBasicOps(
+      const PatchEdgeDataBasicOps<TYPE>&);
+   void
+   operator = (
+      const PatchEdgeDataBasicOps<TYPE>&);
+
+   ArrayDataBasicOps<TYPE> d_array_ops;
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/PatchEdgeDataBasicOps.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,219 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated miscellaneous operations for real edge-centered data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchEdgeDataMiscellaneousOpsReal_C
+#define included_math_PatchEdgeDataMiscellaneousOpsReal_C
+
+#include "SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/pdat/EdgeGeometry.h"
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+PatchEdgeDataMiscellaneousOpsReal<TYPE>::PatchEdgeDataMiscellaneousOpsReal()
+{
+}
+
+template<class TYPE>
+PatchEdgeDataMiscellaneousOpsReal<TYPE>::~PatchEdgeDataMiscellaneousOpsReal()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The const constructor and assignment operator are not actually used   *
+ * but are defined here for compilers that require an implementation for *
+ * every declaration.                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+PatchEdgeDataMiscellaneousOpsReal<TYPE>::PatchEdgeDataMiscellaneousOpsReal(
+   const PatchEdgeDataMiscellaneousOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void PatchEdgeDataMiscellaneousOpsReal<TYPE>::operator = (
+   const PatchEdgeDataMiscellaneousOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Templated miscellaneous opertions for real edge-centered data.        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+int PatchEdgeDataMiscellaneousOpsReal<TYPE>::computeConstrProdPos(
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& data1,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& data2,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::EdgeData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data1.isNull() && !data2.isNull());
+#endif
+   const tbox::Dimension& dim(data1->getDim());
+
+   int retval = 1;
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box edge_box =
+            pdat::EdgeGeometry::toEdgeBox(box, d);
+         retval = tbox::MathUtilities<int>::Min(retval,
+               d_array_ops.computeConstrProdPos(
+                  data1->getArrayData(d),
+                  data2->getArrayData(d),
+                  edge_box));
+      }
+   } else {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box edge_box =
+            pdat::EdgeGeometry::toEdgeBox(box, d);
+         retval = tbox::MathUtilities<int>::Min(retval,
+               d_array_ops.computeConstrProdPosWithControlVolume(
+                  data1->getArrayData(d),
+                  data2->getArrayData(d),
+                  cvol->getArrayData(d),
+                  edge_box));
+      }
+   }
+   return retval;
+}
+
+template<class TYPE>
+void PatchEdgeDataMiscellaneousOpsReal<TYPE>::compareToScalar(
+   tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& src,
+   const TYPE& alpha,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::EdgeData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+#endif
+   const tbox::Dimension& dim(dst->getDim());
+
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+         d_array_ops.compareToScalar(dst->getArrayData(d),
+            src->getArrayData(d),
+            alpha,
+            edge_box);
+      }
+   } else {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+         d_array_ops.compareToScalarWithControlVolume(dst->getArrayData(d),
+            src->getArrayData(d),
+            alpha,
+            cvol->getArrayData(d),
+            edge_box);
+      }
+   }
+}
+
+template<class TYPE>
+int PatchEdgeDataMiscellaneousOpsReal<TYPE>::testReciprocal(
+   tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& src,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::EdgeData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+#endif
+   const tbox::Dimension& dim(dst->getDim());
+
+   int retval = 1;
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box edge_box =
+            pdat::EdgeGeometry::toEdgeBox(box, d);
+         retval = tbox::MathUtilities<int>::Min(retval,
+               d_array_ops.testReciprocal(
+                  dst->getArrayData(d),
+                  src->getArrayData(d),
+                  edge_box));
+      }
+   } else {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box edge_box =
+            pdat::EdgeGeometry::toEdgeBox(box, d);
+         retval = tbox::MathUtilities<int>::Min(retval,
+               d_array_ops.testReciprocalWithControlVolume(
+                  dst->getArrayData(d),
+                  src->getArrayData(d),
+                  cvol->getArrayData(d),
+                  edge_box));
+      }
+   }
+   return retval;
+}
+
+template<class TYPE>
+TYPE PatchEdgeDataMiscellaneousOpsReal<TYPE>::maxPointwiseDivide(
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& numer,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& denom,
+   const hier::Box& box) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!numer.isNull() && !denom.isNull());
+#endif
+   const tbox::Dimension& dim(numer->getDim());
+
+   TYPE retval = 0.0;
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+      TYPE dirval = d_array_ops.maxPointwiseDivide(numer->getArrayData(d),
+            denom->getArrayData(d),
+            edge_box);
+      retval = tbox::MathUtilities<TYPE>::Max(retval, dirval);
+   }
+   return retval;
+}
+
+template<class TYPE>
+TYPE PatchEdgeDataMiscellaneousOpsReal<TYPE>::minPointwiseDivide(
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& numer,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& denom,
+   const hier::Box& box) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!numer.isNull() && !denom.isNull());
+#endif
+   const tbox::Dimension& dim(numer->getDim());
+
+   TYPE retval = 0.0;
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+      TYPE dirval = d_array_ops.minPointwiseDivide(numer->getArrayData(d),
+            denom->getArrayData(d),
+            edge_box);
+      retval = tbox::MathUtilities<TYPE>::Min(retval, dirval);
+   }
+   return retval;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,165 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated miscellaneous operations for real edge-centered data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchEdgeDataMiscellaneousOpsReal
+#define included_math_PatchEdgeDataMiscellaneousOpsReal
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/math/ArrayDataMiscellaneousOpsReal.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchEdgeDataMiscellaneousOpsReal provides access to a
+ * collection of operations that may be applied to numerical edge-centered
+ * patch data of type double and float.  The primary intent of this class is
+ * to provide the interface to these operations for the class
+ * PatchEdgeDataOpsReal which provides access to a more complete
+ * set of operations that may be used to manipulate edge-centered
+ * patch data.  Each member function accepts a box argument
+ * indicating the region of index space on which the operation should be
+ * performed.  The operation will be performed on the intersection of this
+ * box and those boxes corresponding to the patch data objects.  Also, each
+ * operation allows an additional edge-centered patch data object to be used
+ * to represent a control volume that weights the contribution of each data
+ * entry in the given norm calculation.  Note that the control volume patch
+ * data must be of type double and have edge-centered geometry (i.e., the
+ * same as the data itself).  The use of control volumes is important when
+ * these operations are used in vector kernels where the data resides over
+ * multiple levels of spatial resolution in an AMR hierarchy.  If the control
+ * volume is not given in the function call, it will be ignored in the
+ * calculation.  Also, note that the depth of the control volume patch data
+ * object must be either 1 or be equal to the depth of the other data objects.
+ *
+ * Since these operations are used only by the vector kernels for the KINSOL
+ * and CVODE solver packages at this time, they are intended to be instantiated
+ * for the standard built-in types double and float (since those solvers only
+ * treat double and float data).  To extend this class to other data types or
+ * to include other operations, the member functions must be specialized or the
+ * new operations must be added.
+ *
+ * @see math::ArrayDataMiscellaneousOpsReal
+ */
+
+template<class TYPE>
+class PatchEdgeDataMiscellaneousOpsReal
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchEdgeDataMiscellaneousOpsReal();
+
+   virtual ~PatchEdgeDataMiscellaneousOpsReal<TYPE>();
+
+   /**
+    * Return 1 if \f$\|data2_i\| > 0\f$ and \f$data1_i * data2_i \leq 0\f$, for
+    * any \f$i\f$ in the index region, where \f$cvol_i > 0\f$.  Otherwise return 0.
+    * If the control volume is NULL, all values in the index set are used.
+    */
+   int
+   computeConstrProdPos(
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& data1,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& data2,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::EdgeData<double> > cvol =
+         tbox::Pointer<pdat::EdgeData<double> >(NULL)) const;
+
+   /**
+    * Wherever \f$cvol_i > 0\f$ in the index region, set \f$dst_i = 1\f$
+    * if \f$\|src_i\| > \alpha\f$, and \f$dst_i = 0\f$ otherwise.  If the control
+    * volume is NULL, all values in the index set are considered.
+    */
+   void
+   compareToScalar(
+      tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& src,
+      const TYPE& alpha,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::EdgeData<double> > cvol =
+         tbox::Pointer<pdat::EdgeData<double> >(NULL)) const;
+
+   /**
+    * Wherever \f$cvol_i > 0\f$ in the index region, set \f$dst_i = 1/src_i\f$ if
+    * \f$src_i \neq 0\f$, and \f$dst_i = 0\f$ otherwise.  If \f$dst_i = 0\f$ anywhere,
+    * 0 is the return value.  Otherwise 1 is returned.  If the control volume
+    * all values in the index set are considered.
+    */
+   int
+   testReciprocal(
+      tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& src,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::EdgeData<double> > cvol =
+         tbox::Pointer<pdat::EdgeData<double> >(NULL)) const;
+
+   /*!
+    * @brief Compute max of "conditional" quotients of two arrays.
+    *
+    * Return the maximum of pointwise "conditional" quotients of the numerator
+    * and denominator.
+    *
+    * The "conditional" quotient is defined as |numerator/denominator|
+    * where the denominator is nonzero.  Otherwise, it is defined as
+    * |numerator|.
+    *
+    * @b Note: This method is currently intended to support the
+    * PETSc-2.1.6 vector wrapper only.  Please do not use it!
+    */
+   TYPE
+   maxPointwiseDivide(
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& numer,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& denom,
+      const hier::Box& box) const;
+
+   /*!
+    * @brief Compute min of quotients of two arrays.
+    *
+    * Return the minimum of pointwise quotients of the numerator
+    * and denominator.
+    *
+    * The quotient is defined as (numerator/denominator)
+    * where the denominator is nonzero.  When the denominator is zero, the
+    * entry is skipped.  If the denominator is always zero, the value of
+    * tbox::IEEE::getFLT_MAX() is returned (see @ref SAMRAI::tbox::IEEE).
+    *
+    * @b Note: This method is currently intended to support the
+    * SUNDIALS vector wrapper only.  Please do not use it!
+    */
+   TYPE
+   minPointwiseDivide(
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& numer,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& denom,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   PatchEdgeDataMiscellaneousOpsReal(
+      const PatchEdgeDataMiscellaneousOpsReal<TYPE>&);
+   void
+   operator = (
+      const PatchEdgeDataMiscellaneousOpsReal<TYPE>&);
+
+   ArrayDataMiscellaneousOpsReal<TYPE> d_array_ops;
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchEdgeDataNormOpsComplex.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchEdgeDataNormOpsComplex.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,323 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Norm operations for complex edge-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchEdgeDataNormOpsComplex_C
+#define included_math_PatchEdgeDataNormOpsComplex_C
+
+#include "SAMRAI/math/PatchEdgeDataNormOpsComplex.h"
+#include "SAMRAI/pdat/EdgeGeometry.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#ifdef DEBUG_CHECK_ASSERTIONS
+#include "SAMRAI/tbox/Utilities.h"
+#endif
+
+namespace SAMRAI {
+namespace math {
+
+PatchEdgeDataNormOpsComplex::PatchEdgeDataNormOpsComplex()
+{
+}
+
+PatchEdgeDataNormOpsComplex::~PatchEdgeDataNormOpsComplex()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute the number of data entries on a patch in the given box.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int PatchEdgeDataNormOpsComplex::numberOfEntries(
+   const tbox::Pointer<pdat::EdgeData<dcomplex> >& data,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   int retval = 0;
+   const hier::Box ibox = box * data->getGhostBox();
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box dbox = pdat::EdgeGeometry::toEdgeBox(ibox, d);
+      retval += (dbox.size() * data->getDepth());
+   }
+   return retval;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Norm operations for complex edge-centered data.                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double PatchEdgeDataNormOpsComplex::sumControlVolumes(
+   const tbox::Pointer<pdat::EdgeData<dcomplex> >& data,
+   const tbox::Pointer<pdat::EdgeData<double> >& cvol,
+   const hier::Box& box) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull() && !cvol.isNull());
+#endif
+   const tbox::Dimension& dim(box.getDim());
+
+   double retval = 0.0;
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+      retval += d_array_ops.sumControlVolumes(data->getArrayData(d),
+            cvol->getArrayData(d),
+            edge_box);
+   }
+   return retval;
+}
+
+void PatchEdgeDataNormOpsComplex::abs(
+   tbox::Pointer<pdat::EdgeData<double> >& dst,
+   const tbox::Pointer<pdat::EdgeData<dcomplex> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+      d_array_ops.abs(dst->getArrayData(d),
+         src->getArrayData(d),
+         edge_box);
+   }
+}
+
+double PatchEdgeDataNormOpsComplex::L1Norm(
+   const tbox::Pointer<pdat::EdgeData<dcomplex> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::EdgeData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   double retval = 0.0;
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+         retval += d_array_ops.L1Norm(data->getArrayData(d), edge_box);
+      }
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+         retval += d_array_ops.L1NormWithControlVolume(data->getArrayData(d),
+               cvol->getArrayData(d),
+               edge_box);
+      }
+   }
+   return retval;
+}
+
+double PatchEdgeDataNormOpsComplex::L2Norm(
+   const tbox::Pointer<pdat::EdgeData<dcomplex> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::EdgeData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   double retval = 0.0;
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+         double aval = d_array_ops.L2Norm(data->getArrayData(d), edge_box);
+         retval += aval * aval;
+      }
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+         double aval = d_array_ops.L2NormWithControlVolume(
+               data->getArrayData(d),
+               cvol->getArrayData(d),
+               edge_box);
+         retval += aval * aval;
+      }
+   }
+   return sqrt(retval);
+}
+
+double PatchEdgeDataNormOpsComplex::weightedL2Norm(
+   const tbox::Pointer<pdat::EdgeData<dcomplex> >& data,
+   const tbox::Pointer<pdat::EdgeData<dcomplex> >& weight,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::EdgeData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull() && !weight.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*data, *weight, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   double retval = 0.0;
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+         double aval = d_array_ops.weightedL2Norm(data->getArrayData(d),
+               weight->getArrayData(d),
+               edge_box);
+         retval += aval * aval;
+      }
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+         double aval = d_array_ops.weightedL2NormWithControlVolume(
+               data->getArrayData(d),
+               weight->getArrayData(d),
+               cvol->getArrayData(d),
+               edge_box);
+         retval += aval * aval;
+      }
+   }
+   return sqrt(retval);
+}
+
+double PatchEdgeDataNormOpsComplex::RMSNorm(
+   const tbox::Pointer<pdat::EdgeData<dcomplex> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::EdgeData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   double retval = L2Norm(data, box, cvol);
+   if (cvol.isNull()) {
+      retval /= sqrt((double)numberOfEntries(data, box));
+   } else {
+      retval /= sqrt(sumControlVolumes(data, cvol, box));
+   }
+   return retval;
+}
+
+double PatchEdgeDataNormOpsComplex::weightedRMSNorm(
+   const tbox::Pointer<pdat::EdgeData<dcomplex> >& data,
+   const tbox::Pointer<pdat::EdgeData<dcomplex> >& weight,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::EdgeData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull() && !weight.isNull());
+#endif
+   double retval = weightedL2Norm(data, weight, box, cvol);
+   if (cvol.isNull()) {
+      retval /= sqrt((double)numberOfEntries(data, box));
+   } else {
+      retval /= sqrt(sumControlVolumes(data, cvol, box));
+   }
+   return retval;
+}
+
+double PatchEdgeDataNormOpsComplex::maxNorm(
+   const tbox::Pointer<pdat::EdgeData<dcomplex> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::EdgeData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   const tbox::Dimension& dim(box.getDim());
+
+   double retval = 0.0;
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box edge_box =
+            pdat::EdgeGeometry::toEdgeBox(box, d);
+         retval = tbox::MathUtilities<double>::Max(retval,
+               d_array_ops.maxNorm(data->getArrayData(d), edge_box));
+      }
+   } else {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box edge_box =
+            pdat::EdgeGeometry::toEdgeBox(box, d);
+         retval = tbox::MathUtilities<double>::Max(retval,
+               d_array_ops.maxNormWithControlVolume(
+                  data->getArrayData(d), cvol->getArrayData(d), edge_box));
+      }
+   }
+   return retval;
+}
+
+dcomplex PatchEdgeDataNormOpsComplex::dot(
+   const tbox::Pointer<pdat::EdgeData<dcomplex> >& data1,
+   const tbox::Pointer<pdat::EdgeData<dcomplex> >& data2,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::EdgeData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data1.isNull() && !data2.isNull());
+#endif
+   const tbox::Dimension& dim(box.getDim());
+
+   dcomplex retval = dcomplex(0.0, 0.0);
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+         retval += d_array_ops.dot(data1->getArrayData(d),
+               data2->getArrayData(d),
+               edge_box);
+      }
+   } else {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+         retval += d_array_ops.dotWithControlVolume(
+               data1->getArrayData(d),
+               data2->getArrayData(d),
+               cvol->getArrayData(d),
+               edge_box);
+      }
+   }
+   return retval;
+}
+
+dcomplex PatchEdgeDataNormOpsComplex::integral(
+   const tbox::Pointer<pdat::EdgeData<dcomplex> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::EdgeData<double> > vol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   const tbox::Dimension& dim(box.getDim());
+
+   dcomplex retval = dcomplex(0.0, 0.0);
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box side_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+      retval += d_array_ops.integral(
+            data->getArrayData(d),
+            vol->getArrayData(d),
+            side_box);
+   }
+
+   return retval;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchEdgeDataNormOpsComplex.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchEdgeDataNormOpsComplex.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,217 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Norm operations for complex edge-centered data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchEdgeDataNormOpsComplex
+#define included_math_PatchEdgeDataNormOpsComplex
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/math/ArrayDataNormOpsComplex.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchEdgeDataNormOpsComplex provides a collection of common
+ * norm operations that may be applied to complex edge-centered patch data.
+ * The primary intent of this class is to define part of the interface for the
+ * PatchEdgeDataOpsComplex class which provides access to operations
+ * that may be used to manipulate complex edge-centered patch data.  Each
+ * member function accepts a box argument indicating the region of index space
+ * on which the operation should be performed.  The operation will be performed
+ * on the intersection of this box and those boxes corresponding to the patch
+ * data objects.  Also, each operation allows an additional edge-centered
+ * patch data object to be used to represent a control volume that weights the
+ * contribution of each data entry in the given norm calculation.  Note that
+ * the control volume patch data must be of type double and have edge-centered
+ * geometry (i.e., the same as the data itself).  The use of control volumes
+ * is important when these operations are used in vector kernels where the
+ * data resides over multiple levels of spatial resolution in an AMR hierarchy.
+ * If the control volume is not given in the function call, it will be ignored
+ * in the calculation.  Also, note that the depth of the control volume patch
+ * data object must be either 1 or be equal to the depth of the other data
+ * objects.
+ *
+ * Note that a similar set of norm operations is implemented for real
+ * patch data (double and float) in the class PatchEdgeDataNormOpsReal.
+ *
+ * @see math::ArrayDataNormOpsComplex
+ */
+
+class PatchEdgeDataNormOpsComplex
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchEdgeDataNormOpsComplex();
+
+   virtual ~PatchEdgeDataNormOpsComplex();
+
+   /**
+    * Return the number of data values for the edge-centered data object
+    * in the given box.  Note that it is assumed that the box refers to
+    * the cell-centered index space corresponding to the patch hierarchy.
+    */
+   int
+   numberOfEntries(
+      const tbox::Pointer<pdat::EdgeData<dcomplex> >& data,
+      const hier::Box& box) const;
+
+   /**
+    * Return sum of control volume entries for the edge-centered data object.
+    */
+   double
+   sumControlVolumes(
+      const tbox::Pointer<pdat::EdgeData<dcomplex> >& data,
+      const tbox::Pointer<pdat::EdgeData<double> >& cvol,
+      const hier::Box& box) const;
+
+   /**
+    * Set destination component to norm of source component.  That is,
+    * each destination entry is set to
+    * \f$d_i = \sqrt{ {real(s_i)}^2 + {imag(s_i)}^2 }\f$.
+    */
+   void
+   abs(
+      tbox::Pointer<pdat::EdgeData<double> >& dst,
+      const tbox::Pointer<pdat::EdgeData<dcomplex> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Return discrete \f$L_1\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( \sqrt{data_i * \bar{data_i}}*cvol_i )\f$.
+    * If the control volume is NULL, the return value is
+    * \f$\sum_i ( \sqrt{data_i * \bar{data_i}} )\f$.
+    */
+   double
+   L1Norm(
+      const tbox::Pointer<pdat::EdgeData<dcomplex> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::EdgeData<double> > cvol =
+         tbox::Pointer<pdat::EdgeData<double> >(NULL)) const;
+
+   /**
+    * Return discrete \f$L_2\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum
+    * \f$\sqrt{ \sum_i ( data_i * \bar{data_i} cvol_i ) }\f$.
+    * If the control volume is NULL, the return value is
+    * \f$\sqrt{ \sum_i ( data_i * \bar{data_i} ) }\f$.
+    */
+   double
+   L2Norm(
+      const tbox::Pointer<pdat::EdgeData<dcomplex> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::EdgeData<double> > cvol =
+         tbox::Pointer<pdat::EdgeData<double> >(NULL)) const;
+
+   /**
+    * Return discrete weighted \f$L_2\f$-norm of the data using the control
+    * volume to weight the contribution of the data and weight entries to
+    * the sum.  That is, the return value is the sum \f$\sqrt{ \sum_i (
+    * (data_i * wgt_i) * \bar{(data_i * wgt_i)} cvol_i ) }\f$.  If the control
+    * volume is NULL, the return value is
+    * \f$\sqrt{ \sum_i ( (data_i * wgt_i) * \bar{(data_i * wgt_i)} cvol_i ) }\f$.
+    */
+   double
+   weightedL2Norm(
+      const tbox::Pointer<pdat::EdgeData<dcomplex> >& data,
+      const tbox::Pointer<pdat::EdgeData<dcomplex> >& weight,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::EdgeData<double> > cvol =
+         tbox::Pointer<pdat::EdgeData<double> >(NULL)) const;
+
+   /**
+    * Return discrete root mean squared norm of the data.  If the control
+    * volume is not NULL, the return value is the \f$L_2\f$-norm divided by
+    * the square root of the sum of the control volumes.  Otherwise, the
+    * return value is the \f$L_2\f$-norm divided by the square root of the
+    * number of data entries.
+    */
+   double
+   RMSNorm(
+      const tbox::Pointer<pdat::EdgeData<dcomplex> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::EdgeData<double> > cvol =
+         tbox::Pointer<pdat::EdgeData<double> >(NULL)) const;
+
+   /**
+    * Return discrete weighted root mean squared norm of the data.  If the
+    * control volume is not NULL, the return value is the weighted \f$L_2\f$-norm
+    * divided by the square root of the sum of the control volumes.  Otherwise,
+    * the return value is the weighted \f$L_2\f$-norm divided by the square root
+    * of the number of data entries.
+    */
+   double
+   weightedRMSNorm(
+      const tbox::Pointer<pdat::EdgeData<dcomplex> >& data,
+      const tbox::Pointer<pdat::EdgeData<dcomplex> >& weight,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::EdgeData<double> > cvol =
+         tbox::Pointer<pdat::EdgeData<double> >(NULL)) const;
+
+   /**
+    * Return the \f$\max\f$-norm of the data using the control volume to weight
+    * the contribution of each data entry to the maximum.  That is, the return
+    * value is \f$\max_i ( \sqrt{data_i * \bar{data_i}} )\f$, where the max is
+    * over the data elements where \f$cvol_i > 0\f$.  If the control volume is
+    * NULL, it is ignored during the computation of the maximum.
+    */
+   double
+   maxNorm(
+      const tbox::Pointer<pdat::EdgeData<dcomplex> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::EdgeData<double> > cvol =
+         tbox::Pointer<pdat::EdgeData<double> >(NULL)) const;
+
+   /**
+    * Return the dot product of the two data arrays using the control volume
+    * to weight the contribution of each product to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( data1_i * \bar{data2_i} * cvol_i )\f$.
+    * If the control volume is NULL, it is ignored during the summation.
+    */
+   dcomplex
+   dot(
+      const tbox::Pointer<pdat::EdgeData<dcomplex> >& data1,
+      const tbox::Pointer<pdat::EdgeData<dcomplex> >& data2,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::EdgeData<double> > cvol =
+         tbox::Pointer<pdat::EdgeData<double> >(NULL)) const;
+
+   /**
+    * Return the integral of the function represented by the data array.
+    * The return value is the sum \f$\sum_i ( data_i * vol_i )\f$.
+    */
+   dcomplex
+   integral(
+      const tbox::Pointer<pdat::EdgeData<dcomplex> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::EdgeData<double> > vol) const;
+
+private:
+   // The following are not implemented:
+   PatchEdgeDataNormOpsComplex(
+      const PatchEdgeDataNormOpsComplex&);
+   void
+   operator = (
+      const PatchEdgeDataNormOpsComplex&);
+
+   ArrayDataNormOpsComplex d_array_ops;
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchEdgeDataNormOpsReal.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchEdgeDataNormOpsReal.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,361 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated norm operations for real edge-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchEdgeDataNormOpsReal_C
+#define included_math_PatchEdgeDataNormOpsReal_C
+
+#include "SAMRAI/math/PatchEdgeDataNormOpsReal.h"
+
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/pdat/EdgeGeometry.h"
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+PatchEdgeDataNormOpsReal<TYPE>::PatchEdgeDataNormOpsReal()
+{
+}
+
+template<class TYPE>
+PatchEdgeDataNormOpsReal<TYPE>::~PatchEdgeDataNormOpsReal()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The const constructor and assignment operator are not actually used   *
+ * but are defined here for compilers that require an implementation for *
+ * every declaration.                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+PatchEdgeDataNormOpsReal<TYPE>::PatchEdgeDataNormOpsReal(
+   const PatchEdgeDataNormOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void PatchEdgeDataNormOpsReal<TYPE>::operator = (
+   const PatchEdgeDataNormOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute the number of data entries on a patch in the given box.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+int PatchEdgeDataNormOpsReal<TYPE>::numberOfEntries(
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& data,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   int retval = 0;
+   const hier::Box ibox = box * data->getGhostBox();
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box dbox = pdat::EdgeGeometry::toEdgeBox(ibox, d);
+      retval += (dbox.size() * data->getDepth());
+   }
+   return retval;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Templated norm operations for real edge-centered data.                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+double PatchEdgeDataNormOpsReal<TYPE>::sumControlVolumes(
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& data,
+   const tbox::Pointer<pdat::EdgeData<double> >& cvol,
+   const hier::Box& box) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull() && !cvol.isNull());
+#endif
+   const tbox::Dimension& dim(data->getDim());
+
+   double retval = 0.0;
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+      retval += d_array_ops.sumControlVolumes(data->getArrayData(d),
+            cvol->getArrayData(d),
+            edge_box);
+   }
+   return retval;
+}
+
+template<class TYPE>
+void PatchEdgeDataNormOpsReal<TYPE>::abs(
+   tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+      d_array_ops.abs(dst->getArrayData(d),
+         src->getArrayData(d),
+         edge_box);
+   }
+}
+
+template<class TYPE>
+double PatchEdgeDataNormOpsReal<TYPE>::L1Norm(
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::EdgeData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(data->getDim());
+
+   double retval = 0.0;
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+         retval += d_array_ops.L1Norm(data->getArrayData(d), edge_box);
+      }
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+         retval += d_array_ops.L1NormWithControlVolume(data->getArrayData(d),
+               cvol->getArrayData(d),
+               edge_box);
+      }
+   }
+   return retval;
+}
+
+template<class TYPE>
+double PatchEdgeDataNormOpsReal<TYPE>::L2Norm(
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::EdgeData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(data->getDim());
+
+   double retval = 0.0;
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+         double aval = d_array_ops.L2Norm(data->getArrayData(d), edge_box);
+         retval += aval * aval;
+      }
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+         double aval = d_array_ops.L2NormWithControlVolume(
+               data->getArrayData(d),
+               cvol->getArrayData(d),
+               edge_box);
+         retval += aval * aval;
+      }
+   }
+   return sqrt(retval);
+}
+
+template<class TYPE>
+double PatchEdgeDataNormOpsReal<TYPE>::weightedL2Norm(
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& data,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& weight,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::EdgeData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull() && !weight.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*data, *weight, box);
+
+   const tbox::Dimension& dim(data->getDim());
+
+   double retval = 0.0;
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+         double aval = d_array_ops.weightedL2Norm(data->getArrayData(d),
+               weight->getArrayData(d),
+               edge_box);
+         retval += aval * aval;
+      }
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+         double aval = d_array_ops.weightedL2NormWithControlVolume(
+               data->getArrayData(d),
+               weight->getArrayData(d),
+               cvol->getArrayData(d),
+               edge_box);
+         retval += aval * aval;
+      }
+   }
+   return sqrt(retval);
+}
+
+template<class TYPE>
+double PatchEdgeDataNormOpsReal<TYPE>::RMSNorm(
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::EdgeData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   double retval = L2Norm(data, box, cvol);
+   if (cvol.isNull()) {
+      retval /= sqrt((double)numberOfEntries(data, box));
+   } else {
+      retval /= sqrt(sumControlVolumes(data, cvol, box));
+   }
+   return retval;
+}
+
+template<class TYPE>
+double PatchEdgeDataNormOpsReal<TYPE>::weightedRMSNorm(
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& data,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& weight,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::EdgeData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull() && !weight.isNull());
+#endif
+   double retval = weightedL2Norm(data, weight, box, cvol);
+   if (cvol.isNull()) {
+      retval /= sqrt((double)numberOfEntries(data, box));
+   } else {
+      retval /= sqrt(sumControlVolumes(data, cvol, box));
+   }
+   return retval;
+}
+
+template<class TYPE>
+double PatchEdgeDataNormOpsReal<TYPE>::maxNorm(
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::EdgeData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   const tbox::Dimension& dim(data->getDim());
+
+   double retval = 0.0;
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box edge_box =
+            pdat::EdgeGeometry::toEdgeBox(box, d);
+         retval = tbox::MathUtilities<double>::Max(retval,
+               d_array_ops.maxNorm(data->getArrayData(d), edge_box));
+      }
+   } else {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box edge_box =
+            pdat::EdgeGeometry::toEdgeBox(box, d);
+         retval = tbox::MathUtilities<double>::Max(retval,
+               d_array_ops.maxNormWithControlVolume(
+                  data->getArrayData(d),
+                  cvol->getArrayData(d),
+                  edge_box));
+      }
+   }
+   return retval;
+}
+
+template<class TYPE>
+TYPE PatchEdgeDataNormOpsReal<TYPE>::dot(
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& data1,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& data2,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::EdgeData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data1.isNull() && !data2.isNull());
+#endif
+   const tbox::Dimension& dim(data1->getDim());
+
+   TYPE retval = 0.0;
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+         retval += d_array_ops.dot(data1->getArrayData(d),
+               data2->getArrayData(d),
+               edge_box);
+      }
+   } else {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+         retval += d_array_ops.dotWithControlVolume(
+               data1->getArrayData(d),
+               data2->getArrayData(d),
+               cvol->getArrayData(d),
+               edge_box);
+      }
+   }
+   return retval;
+}
+
+template<class TYPE>
+TYPE PatchEdgeDataNormOpsReal<TYPE>::integral(
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::EdgeData<double> > vol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   const tbox::Dimension& dim(data->getDim());
+
+   TYPE retval = 0.0;
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box side_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+      retval += d_array_ops.integral(
+            data->getArrayData(d),
+            vol->getArrayData(d),
+            side_box);
+   }
+
+   return retval;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchEdgeDataNormOpsReal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchEdgeDataNormOpsReal.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,223 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated norm operations for real edge-centered data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchEdgeDataNormOpsReal
+#define included_math_PatchEdgeDataNormOpsReal
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/math/ArrayDataNormOpsReal.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchEdgeDataNormOpsReal provides a collection of common
+ * norm operations that may be applied to real (double or float)
+ * numerical edge-centered patch data.  The primary intent of this class is
+ * to define part of the interface for an PatchEdgeDataOpsReal object
+ * which provides access operations that may be used to manipulate
+ * edge-centered patch data.  Each member function accepts a box argument
+ * indicating the region of index space on which the operation should be
+ * performed.  The operation will be performed on the intersection of this
+ * box and those boxes corresponding to the patch data objects.  Also, each
+ * operation allows an additional edge-centered patch data object to be used
+ * to represent a control volume that weights the contribution of each data
+ * entry in the given norm calculation.  Note that the control volume patch
+ * data must be of type double and have edge-centered geometry (i.e., the
+ * same as the data itself).  The use of control volumes is important when
+ * these operations are used in vector kernels where the data resides over
+ * multiple levels of spatial resolution in an AMR hierarchy.  If the control
+ * volume is not given in the function call, it will be ignored in the
+ * calculation.  Also, note that the depth of the control volume patch data
+ * object must be either 1 or be equal to the depth of the other data objects.
+ *
+ * These operations typically apply only to the numerical standard built-in
+ * types, such as double, float, and the complex type (which may or may not
+ * be a built-in type depending on the C++ compiler).  This templated
+ * class should only be used to instantiate objects with double or float as
+ * the template parameter.  Note that a similar set of norm operations is
+ * implemented for complex patch data in the class
+ * PatchEdgeDataNormOpsComplex.
+ *
+ * @see math::ArrayDataNormOpsReal
+ */
+
+template<class TYPE>
+class PatchEdgeDataNormOpsReal
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchEdgeDataNormOpsReal();
+
+   virtual ~PatchEdgeDataNormOpsReal<TYPE>();
+
+   /**
+    * Return the number of data values for the edge-centered data object
+    * in the given box.  Note that it is assumed that the box refers to
+    * the cell-centered index space corresponding to the patch hierarchy.
+    */
+   int
+   numberOfEntries(
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& data,
+      const hier::Box& box) const;
+
+   /**
+    * Return sum of control volume entries for the edge-centered data object.
+    */
+   double
+   sumControlVolumes(
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& data,
+      const tbox::Pointer<pdat::EdgeData<double> >& cvol,
+      const hier::Box& box) const;
+
+   /**
+    * Set destination component to absolute value of source component.
+    * That is, each destination entry is set to \f$d_i = \| s_i \|\f$.
+    */
+   void
+   abs(
+      tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Return discrete \f$L_1\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( \| data_i \| cvol_i )\f$.  If the
+    * control volume is NULL, the return value is \f$\sum_i ( \| data_i \| )\f$.
+    */
+   double
+   L1Norm(
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::EdgeData<double> > cvol =
+         tbox::Pointer<pdat::EdgeData<double> >(NULL)) const;
+
+   /**
+    * Return discrete \f$L_2\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sqrt{ \sum_i ( (data_i)^2 cvol_i ) }\f$.
+    * If the control volume is NULL, the return value is
+    * \f$\sqrt{ \sum_i ( (data_i)^2 cvol_i ) }\f$.
+    */
+   double
+   L2Norm(
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::EdgeData<double> > cvol =
+         tbox::Pointer<pdat::EdgeData<double> >(NULL)) const;
+
+   /**
+    * Return discrete weighted \f$L_2\f$-norm of the data using the control
+    * volume to weight the contribution of the data and weight entries to
+    * the sum.  That is, the return value is the sum \f$\sqrt{ \sum_i (
+    * (data_i * weight_i)^2 cvol_i ) }\f$.  If the control volume is NULL,
+    * the return value is \f$\sqrt{ \sum_i ( (data_i * weight_i)^2 ) }\f$.
+    */
+   double
+   weightedL2Norm(
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& data,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& weight,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::EdgeData<double> > cvol =
+         tbox::Pointer<pdat::EdgeData<double> >(NULL)) const;
+
+   /**
+    * Return discrete root mean squared norm of the data.  If the control
+    * volume is not NULL, the return value is the \f$L_2\f$-norm divided by
+    * the square root of the sum of the control volumes.  Otherwise, the
+    * return value is the \f$L_2\f$-norm divided by the square root of the
+    * number of data entries.
+    */
+   double
+   RMSNorm(
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::EdgeData<double> > cvol =
+         tbox::Pointer<pdat::EdgeData<double> >(NULL)) const;
+
+   /**
+    * Return discrete weighted root mean squared norm of the data.  If the
+    * control volume is not NULL, the return value is the weighted \f$L_2\f$-norm
+    * divided by the square root of the sum of the control volumes.  Otherwise,
+    * the return value is the weighted \f$L_2\f$-norm divided by the square root
+    * of the number of data entries.
+    */
+   double
+   weightedRMSNorm(
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& data,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& weight,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::EdgeData<double> > cvol =
+         tbox::Pointer<pdat::EdgeData<double> >(NULL)) const;
+
+   /**
+    * Return the \f$\max\f$-norm of the data using the control volume to weight
+    * the contribution of each data entry to the maximum.  That is, the return
+    * value is \f$\max_i ( \| data_i \| )\f$, where the max is over the data
+    * elements where \f$cvol_i > 0\f$.  If the control volume is NULL, it is
+    * ignored during the computation of the maximum.
+    */
+   double
+   maxNorm(
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::EdgeData<double> > cvol =
+         tbox::Pointer<pdat::EdgeData<double> >(NULL)) const;
+
+   /**
+    * Return the dot product of the two data arrays using the control volume
+    * to weight the contribution of each product to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( data1_i * data2_i * cvol_i )\f$.
+    * If the control volume is NULL, it is ignored during the summation.
+    */
+   TYPE
+   dot(
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& data1,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& data2,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::EdgeData<double> > cvol =
+         tbox::Pointer<pdat::EdgeData<double> >(NULL)) const;
+
+   /**
+    * Return the integral of the function represented by the data array.
+    * The return value is the sum \f$\sum_i ( data_i * vol_i )\f$.
+    */
+   TYPE
+   integral(
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::EdgeData<double> > vol) const;
+
+private:
+   // The following are not implemented:
+   PatchEdgeDataNormOpsReal(
+      const PatchEdgeDataNormOpsReal<TYPE>&);
+   void
+   operator = (
+      const PatchEdgeDataNormOpsReal<TYPE>&);
+
+   ArrayDataNormOpsReal<TYPE> d_array_ops;
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/PatchEdgeDataNormOpsReal.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchEdgeDataOpsComplex.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchEdgeDataOpsComplex.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,100 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for complex edge-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchEdgeDataOpsComplex_C
+#define included_math_PatchEdgeDataOpsComplex_C
+
+#include "SAMRAI/math/PatchEdgeDataOpsComplex.h"
+#include "SAMRAI/pdat/EdgeGeometry.h"
+#ifdef DEBUG_CHECK_ASSERTIONS
+#include "SAMRAI/tbox/Utilities.h"
+#endif
+
+namespace SAMRAI {
+namespace math {
+
+PatchEdgeDataOpsComplex::PatchEdgeDataOpsComplex()
+{
+}
+
+PatchEdgeDataOpsComplex::~PatchEdgeDataOpsComplex()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * General operations for complex edge-centered patch data.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchEdgeDataOpsComplex::swapData(
+   tbox::Pointer<hier::Patch> patch,
+   const int data1_id,
+   const int data2_id) const
+{
+   TBOX_ASSERT(!patch.isNull());
+
+   tbox::Pointer<pdat::EdgeData<dcomplex> > d1 = patch->getPatchData(data1_id);
+   tbox::Pointer<pdat::EdgeData<dcomplex> > d2 = patch->getPatchData(data2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d1.isNull() && !d2.isNull());
+   TBOX_ASSERT(d1->getDepth() && d2->getDepth());
+   TBOX_ASSERT(d1->getBox() == d2->getBox());
+   TBOX_ASSERT(d1->getGhostBox() == d2->getGhostBox());
+#endif
+   patch->setPatchData(data1_id, d2);
+   patch->setPatchData(data2_id, d1);
+}
+
+void PatchEdgeDataOpsComplex::printData(
+   const tbox::Pointer<pdat::EdgeData<dcomplex> >& data,
+   const hier::Box& box,
+   std::ostream& s) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   s << "Data box = " << box << std::endl;
+   data->print(box, s);
+   s << "\n";
+}
+
+void PatchEdgeDataOpsComplex::copyData(
+   tbox::Pointer<pdat::EdgeData<dcomplex> >& dst,
+   const tbox::Pointer<pdat::EdgeData<dcomplex> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+      (dst->getArrayData(d)).copy(src->getArrayData(d), edge_box);
+   }
+}
+
+void PatchEdgeDataOpsComplex::setToScalar(
+   tbox::Pointer<pdat::EdgeData<dcomplex> >& dst,
+   const dcomplex& alpha,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*dst, box);
+
+   dst->fillAll(alpha, box);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchEdgeDataOpsComplex.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchEdgeDataOpsComplex.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for complex edge-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchEdgeDataOpsComplex
+#define included_math_PatchEdgeDataOpsComplex
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/math/PatchEdgeDataBasicOps.h"
+#include "SAMRAI/math/PatchEdgeDataNormOpsComplex.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchEdgeDataOpsComplex provides a collection of operations
+ * that may be used to manipulate complex edge-centered patch data.  The
+ * operations include basic arithmetic and norms.  With the
+ * assertion of a few basic routines, this class inherits its interface (and
+ * thus its functionality) from the base classes PatchEdgeDataBasicOps,
+ * PatchEdgeDataNormOpsComplex from which it is derived.  The
+ * name of each of these base classes is indicative of the set of
+ * edge-centered patch data operations that it provides.
+ *
+ * A similar set of operations is implemented for real (double and float) and
+ * integer patch data in the classes PatchEdgeDataOpsReal and
+ * PatchEdgeDataOpsInteger, repsectively.
+ *
+ * @see math::PatchEdgeDataBasicOps
+ * @see math::PatchEdgeDataNormOpsComplex
+ */
+
+class PatchEdgeDataOpsComplex:
+   public tbox::DescribedClass,
+   public PatchEdgeDataBasicOps<dcomplex>,
+   public PatchEdgeDataNormOpsComplex
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchEdgeDataOpsComplex();
+
+   virtual ~PatchEdgeDataOpsComplex();
+
+   /**
+    * Copy dst data to src data over given box.
+    */
+   void
+   copyData(
+      tbox::Pointer<pdat::EdgeData<dcomplex> >& dst,
+      const tbox::Pointer<pdat::EdgeData<dcomplex> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Swap pointers for patch data objects.  Objects are checked for
+    * consistency of depth, box, and ghost box.
+    */
+   void
+   swapData(
+      tbox::Pointer<hier::Patch> patch,
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data entries over given box to given output stream.
+    */
+   void
+   printData(
+      const tbox::Pointer<pdat::EdgeData<dcomplex> >& data,
+      const hier::Box& box,
+      std::ostream& s = tbox::plog) const;
+
+   /**
+    * Initialize data to given scalar over given box.
+    */
+   void
+   setToScalar(
+      tbox::Pointer<pdat::EdgeData<dcomplex> >& dst,
+      const dcomplex& alpha,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   PatchEdgeDataOpsComplex(
+      const PatchEdgeDataOpsComplex&);
+   void
+   operator = (
+      const PatchEdgeDataOpsComplex&);
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchEdgeDataOpsInteger.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchEdgeDataOpsInteger.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,144 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for integer edge-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchEdgeDataOpsInteger_C
+#define included_math_PatchEdgeDataOpsInteger_C
+
+#include "SAMRAI/math/PatchEdgeDataOpsInteger.h"
+#include "SAMRAI/pdat/EdgeGeometry.h"
+#ifdef DEBUG_CHECK_ASSERTIONS
+#include "SAMRAI/tbox/Utilities.h"
+#endif
+
+namespace SAMRAI {
+namespace math {
+
+PatchEdgeDataOpsInteger::PatchEdgeDataOpsInteger()
+{
+}
+
+PatchEdgeDataOpsInteger::~PatchEdgeDataOpsInteger()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute the number of data entries on a patch in the given box.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int PatchEdgeDataOpsInteger::numberOfEntries(
+   const tbox::Pointer<pdat::EdgeData<int> >& data,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   int retval = 0;
+   const hier::Box ibox = box * data->getGhostBox();
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box dbox = pdat::EdgeGeometry::toEdgeBox(ibox, d);
+      retval += (dbox.size() * data->getDepth());
+   }
+   return retval;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * General operations for integer edge-centered patch data.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchEdgeDataOpsInteger::swapData(
+   tbox::Pointer<hier::Patch> patch,
+   const int data1_id,
+   const int data2_id) const
+{
+   TBOX_ASSERT(!patch.isNull());
+
+   tbox::Pointer<pdat::EdgeData<int> > d1 = patch->getPatchData(data1_id);
+   tbox::Pointer<pdat::EdgeData<int> > d2 = patch->getPatchData(data2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d1.isNull() && !d2.isNull());
+   TBOX_ASSERT(d1->getDepth() && d2->getDepth());
+   TBOX_ASSERT(d1->getBox() == d2->getBox());
+   TBOX_ASSERT(d1->getGhostBox() == d2->getGhostBox());
+#endif
+   patch->setPatchData(data1_id, d2);
+   patch->setPatchData(data2_id, d1);
+}
+
+void PatchEdgeDataOpsInteger::printData(
+   const tbox::Pointer<pdat::EdgeData<int> >& data,
+   const hier::Box& box,
+   std::ostream& s) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   s << "Data box = " << box << std::endl;
+   data->print(box, s);
+   s << "\n";
+}
+
+void PatchEdgeDataOpsInteger::copyData(
+   tbox::Pointer<pdat::EdgeData<int> >& dst,
+   const tbox::Pointer<pdat::EdgeData<int> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+      (dst->getArrayData(d)).copy(src->getArrayData(d), edge_box);
+   }
+}
+
+void PatchEdgeDataOpsInteger::setToScalar(
+   tbox::Pointer<pdat::EdgeData<int> >& dst,
+   const int& alpha,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*dst, box);
+
+   dst->fillAll(alpha, box);
+}
+
+void PatchEdgeDataOpsInteger::abs(
+   tbox::Pointer<pdat::EdgeData<int> >& dst,
+   const tbox::Pointer<pdat::EdgeData<int> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+      d_array_ops.abs(dst->getArrayData(d),
+         src->getArrayData(d),
+         edge_box);
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchEdgeDataOpsInteger.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchEdgeDataOpsInteger.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,127 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for integer edge-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchEdgeDataOpsInteger
+#define included_math_PatchEdgeDataOpsInteger
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/math/PatchEdgeDataBasicOps.h"
+#include "SAMRAI/math/ArrayDataNormOpsInteger.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchEdgeDataOpsInteger provides a collection of operations
+ * that may be used to manipulate integer edge-centered patch data.  The
+ * operations include basic arithmetic, min, max, etc.  With the assertion
+ * of a few basic routines, this class inherits its interface (and
+ * thus its functionality) from the base class PatchEdgeDataBasicOps
+ * from which it is derived.
+ *
+ * A more extensive set of operations is implemented for real (double and
+ * float) and complex patch data in the classes PatchEdgeDataOpsReal
+ * and PatchEdgeDataOpsComplex, repsectively.
+ *
+ * @see math::PatchEdgeDataBasicOps
+ */
+
+class PatchEdgeDataOpsInteger:
+   public tbox::DescribedClass,
+   public PatchEdgeDataBasicOps<int>
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchEdgeDataOpsInteger();
+
+   virtual ~PatchEdgeDataOpsInteger();
+
+   /**
+    * Return the number of data values for the edge-centered data object
+    * in the given box.  Note that it is assumed that the box refers to
+    * the cell-centered index space corresponding to the patch hierarchy.
+    */
+   int
+   numberOfEntries(
+      const tbox::Pointer<pdat::EdgeData<int> >& data,
+      const hier::Box& box) const;
+
+   /**
+    * Copy dst data to src data over given box.
+    */
+   void
+   copyData(
+      tbox::Pointer<pdat::EdgeData<int> >& dst,
+      const tbox::Pointer<pdat::EdgeData<int> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Swap pointers for patch data objects.  Objects are checked for
+    * consistency of depth, box, and ghost box.
+    */
+   void
+   swapData(
+      tbox::Pointer<hier::Patch> patch,
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data entries over given box to given output stream.
+    */
+   void
+   printData(
+      const tbox::Pointer<pdat::EdgeData<int> >& data,
+      const hier::Box& box,
+      std::ostream& s = tbox::plog) const;
+
+   /**
+    * Initialize data to given scalar over given box.
+    */
+   void
+   setToScalar(
+      tbox::Pointer<pdat::EdgeData<int> >& dst,
+      const int& alpha,
+      const hier::Box& box) const;
+
+   /**
+    * Set destination component to absolute value of source component.
+    * That is, each destination entry is set to \f$d_i = \| s_i \|\f$.
+    */
+   void
+   abs(
+      tbox::Pointer<pdat::EdgeData<int> >& dst,
+      const tbox::Pointer<pdat::EdgeData<int> >& src,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   PatchEdgeDataOpsInteger(
+      const PatchEdgeDataOpsInteger&);
+   void
+   operator = (
+      const PatchEdgeDataOpsInteger&);
+
+   ArrayDataNormOpsInteger d_array_ops;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchEdgeDataOpsReal.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchEdgeDataOpsReal.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,134 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations for real edge-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchEdgeDataOpsReal_C
+#define included_math_PatchEdgeDataOpsReal_C
+
+#include "SAMRAI/math/PatchEdgeDataOpsReal.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/pdat/EdgeGeometry.h"
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+PatchEdgeDataOpsReal<TYPE>::PatchEdgeDataOpsReal()
+{
+}
+
+#if 0
+/*
+ * This was moved into the header due to what looks like bug in the
+ * XLC compiler.
+ */
+template<class TYPE>
+PatchEdgeDataOpsReal<TYPE>::~PatchEdgeDataOpsReal()
+{
+}
+#endif
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The const constructor and assignment operator are not actually used   *
+ * but are defined here for compilers that require an implementation for *
+ * every declaration.                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+PatchEdgeDataOpsReal<TYPE>::PatchEdgeDataOpsReal(
+   const PatchEdgeDataOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void PatchEdgeDataOpsReal<TYPE>::operator = (
+   const PatchEdgeDataOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * General templated operations for real edge-centered patch data.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void PatchEdgeDataOpsReal<TYPE>::swapData(
+   tbox::Pointer<hier::Patch> patch,
+   const int data1_id,
+   const int data2_id) const
+{
+   TBOX_ASSERT(!patch.isNull());
+
+   tbox::Pointer<pdat::EdgeData<TYPE> > d1 = patch->getPatchData(data1_id);
+   tbox::Pointer<pdat::EdgeData<TYPE> > d2 = patch->getPatchData(data2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d1.isNull() && !d2.isNull());
+   TBOX_ASSERT(d1->getDepth() && d2->getDepth());
+   TBOX_ASSERT(d1->getBox() == d2->getBox());
+   TBOX_ASSERT(d1->getGhostBox() == d2->getGhostBox());
+#endif
+   patch->setPatchData(data1_id, d2);
+   patch->setPatchData(data2_id, d1);
+}
+
+template<class TYPE>
+void PatchEdgeDataOpsReal<TYPE>::printData(
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& data,
+   const hier::Box& box,
+   std::ostream& s) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   s << "Data box = " << box << std::endl;
+   data->print(box, s);
+   s << "\n";
+}
+
+template<class TYPE>
+void PatchEdgeDataOpsReal<TYPE>::copyData(
+   tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+   const tbox::Pointer<pdat::EdgeData<TYPE> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(dst->getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, d);
+      (dst->getArrayData(d)).copy(src->getArrayData(d), edge_box);
+   }
+}
+
+template<class TYPE>
+void PatchEdgeDataOpsReal<TYPE>::setToScalar(
+   tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+   const TYPE& alpha,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*dst, box);
+
+   dst->fillAll(alpha, box);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchEdgeDataOpsReal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchEdgeDataOpsReal.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations for real edge-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchEdgeDataOpsReal
+#define included_math_PatchEdgeDataOpsReal
+
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/math/PatchEdgeDataBasicOps.h"
+#include "SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h"
+#include "SAMRAI/math/PatchEdgeDataNormOpsReal.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Patch.h"
+
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchEdgeDataOpsReal provides a collection of operations
+ * to manipulate float and double numerical edge-centered patch data.  The
+ * operations include basic arithmetic, norms and ordering, and assorted
+ * miscellaneous operations.  With the assertion of a few basic routines,
+ * this class inherits its interface (and thus its functionality) from the
+ * base classes PatchEdgeDataBasicOps, PatchEdgeDataNormOpsReal,
+ * and PatchEdgeDataMiscellaneousOpsReal from which it is derived.  The
+ * name of each of these base classes is indicative of the set of
+ * edge-centered patch data operations that it provides.
+ *
+ * Note that this templated class should only be used to instantiate
+ * objects with double or float as the template parameter.  A similar set of
+ * operations is implemented for complex and integer patch data in the classes
+ * PatchEdgeDataOpsComplex and PatchEdgeDataOpsInteger,
+ * repsectively.
+ *
+ * @see math::PatchEdgeDataBasicOps
+ * @see math::PatchEdgeDataMiscellaneousOpsReal
+ * @see math::PatchEdgeDataNormOpsReal
+ */
+
+template<class TYPE>
+class PatchEdgeDataOpsReal:
+   public tbox::DescribedClass,
+   public PatchEdgeDataBasicOps<TYPE>,
+   public PatchEdgeDataMiscellaneousOpsReal<TYPE>,
+   public PatchEdgeDataNormOpsReal<TYPE>
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchEdgeDataOpsReal();
+
+   virtual ~PatchEdgeDataOpsReal<TYPE>() {}
+
+   /**
+    * Copy dst data to src data over given box.
+    */
+   void
+   copyData(
+      tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Swap pointers for patch data objects.  Objects are checked for
+    * consistency of depth, box, and ghost box.
+    */
+   void
+   swapData(
+      tbox::Pointer<hier::Patch> patch,
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data entries over given box to given output stream.
+    */
+   void
+   printData(
+      const tbox::Pointer<pdat::EdgeData<TYPE> >& data,
+      const hier::Box& box,
+      std::ostream& s = tbox::plog) const;
+
+   /**
+    * Initialize data to given scalar over given box.
+    */
+   void
+   setToScalar(
+      tbox::Pointer<pdat::EdgeData<TYPE> >& dst,
+      const TYPE& alpha,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   PatchEdgeDataOpsReal(
+      const PatchEdgeDataOpsReal<TYPE>&);
+   void
+   operator = (
+      const PatchEdgeDataOpsReal<TYPE>&);
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/PatchEdgeDataOpsReal.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchFaceDataBasicOps.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchFaceDataBasicOps.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,329 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Basic templated face-centered patch data operations. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchFaceDataBasicOps_C
+#define included_math_PatchFaceDataBasicOps_C
+
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/math/PatchFaceDataBasicOps.h"
+#include "SAMRAI/pdat/FaceGeometry.h"
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+PatchFaceDataBasicOps<TYPE>::PatchFaceDataBasicOps()
+{
+}
+
+template<class TYPE>
+PatchFaceDataBasicOps<TYPE>::~PatchFaceDataBasicOps()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The const constructor and assignment operator are not actually used   *
+ * but are defined here for compilers that require an implementation for *
+ * every declaration.                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+PatchFaceDataBasicOps<TYPE>::PatchFaceDataBasicOps(
+   const PatchFaceDataBasicOps<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void PatchFaceDataBasicOps<TYPE>::operator = (
+   const PatchFaceDataBasicOps<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * General basic templated opertions for face data.                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void PatchFaceDataBasicOps<TYPE>::scale(
+   tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+   const TYPE& alpha,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(dst->getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+      d_array_ops.scale(dst->getArrayData(d),
+         alpha, src->getArrayData(d),
+         face_box);
+   }
+}
+
+template<class TYPE>
+void PatchFaceDataBasicOps<TYPE>::addScalar(
+   tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& src,
+   const TYPE& alpha,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(dst->getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+      d_array_ops.addScalar(dst->getArrayData(d),
+         src->getArrayData(d), alpha,
+         face_box);
+   }
+}
+
+template<class TYPE>
+void PatchFaceDataBasicOps<TYPE>::add(
+   tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& src1,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const tbox::Dimension& dim(dst->getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+      d_array_ops.add(dst->getArrayData(d),
+         src1->getArrayData(d), src2->getArrayData(d),
+         face_box);
+   }
+}
+
+template<class TYPE>
+void PatchFaceDataBasicOps<TYPE>::subtract(
+   tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& src1,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const tbox::Dimension& dim(dst->getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+      d_array_ops.subtract(dst->getArrayData(d),
+         src1->getArrayData(d), src2->getArrayData(d),
+         face_box);
+   }
+}
+
+template<class TYPE>
+void PatchFaceDataBasicOps<TYPE>::multiply(
+   tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& src1,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const tbox::Dimension& dim(dst->getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+      d_array_ops.multiply(dst->getArrayData(d),
+         src1->getArrayData(d), src2->getArrayData(d),
+         face_box);
+   }
+}
+
+template<class TYPE>
+void PatchFaceDataBasicOps<TYPE>::divide(
+   tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& src1,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const tbox::Dimension& dim(dst->getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+      d_array_ops.divide(dst->getArrayData(d),
+         src1->getArrayData(d), src2->getArrayData(d),
+         face_box);
+   }
+}
+
+template<class TYPE>
+void PatchFaceDataBasicOps<TYPE>::reciprocal(
+   tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(dst->getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+      d_array_ops.reciprocal(dst->getArrayData(d),
+         src->getArrayData(d),
+         face_box);
+   }
+}
+
+template<class TYPE>
+void PatchFaceDataBasicOps<TYPE>::linearSum(
+   tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+   const TYPE& alpha,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& src1,
+   const TYPE& beta,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const tbox::Dimension& dim(dst->getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+      d_array_ops.linearSum(dst->getArrayData(d),
+         alpha, src1->getArrayData(d),
+         beta, src2->getArrayData(d),
+         face_box);
+   }
+}
+
+template<class TYPE>
+void PatchFaceDataBasicOps<TYPE>::axpy(
+   tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+   const TYPE& alpha,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& src1,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const tbox::Dimension& dim(dst->getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+      d_array_ops.axpy(dst->getArrayData(d),
+         alpha, src1->getArrayData(d),
+         src2->getArrayData(d),
+         face_box);
+   }
+}
+
+template<class TYPE>
+void PatchFaceDataBasicOps<TYPE>::axmy(
+   tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+   const TYPE& alpha,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& src1,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const tbox::Dimension& dim(dst->getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+      d_array_ops.axmy(dst->getArrayData(d),
+         alpha, src1->getArrayData(d),
+         src2->getArrayData(d),
+         face_box);
+   }
+}
+
+template<class TYPE>
+void PatchFaceDataBasicOps<TYPE>::setRandomValues(
+   tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+   const TYPE& width,
+   const TYPE& low,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*dst, box);
+
+   const tbox::Dimension& dim(dst->getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+      d_array_ops.setRandomValues(dst->getArrayData(d),
+         width, low, face_box);
+   }
+}
+
+template<class TYPE>
+TYPE PatchFaceDataBasicOps<TYPE>::min(
+   const tbox::Pointer<pdat::FaceData<TYPE> >& data,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(data->getDim());
+
+   TYPE minval = tbox::MathUtilities<TYPE>::getMax();
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+      minval = tbox::MathUtilities<TYPE>::Min(
+            minval, d_array_ops.min(data->getArrayData(d), face_box));
+   }
+   return minval;
+}
+
+template<class TYPE>
+TYPE PatchFaceDataBasicOps<TYPE>::max(
+   const tbox::Pointer<pdat::FaceData<TYPE> >& data,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(data->getDim());
+
+   TYPE maxval = -tbox::MathUtilities<TYPE>::getMax();
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+      maxval = tbox::MathUtilities<TYPE>::Max(
+            maxval, d_array_ops.max(data->getArrayData(d), face_box));
+   }
+   return maxval;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchFaceDataBasicOps.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchFaceDataBasicOps.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,210 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Basic templated face-centered patch data operations. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchFaceDataBasicOps
+#define included_math_PatchFaceDataBasicOps
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/math/ArrayDataBasicOps.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchFaceDataBasicOps provides access to a collection
+ * of basic numerical operations that may be applied to numerical face-
+ * centered patch data.  These operations include simple arithmetic
+ * operations as well as min and max, etc.  The primary intent of this
+ * class is to provide the interface to these standard operations for
+ * an PatchFaceDataOps<DIM> object which provides access to a complete set
+ * of operations that may be used to manipulate face-centered patch data
+ * objects.   Each member function accepts a box argument indicating the
+ * region of index space on which the operation should be performed.  The
+ * operation will be performed on the intersection of this box and those
+ * boxes corresponding to the patch data objects involved.
+ *
+ * These operations typically apply only to the numerical standard built-in
+ * types, such as double, float, and int, and the complex type (which may or
+ * may not be a built-in type depending on the C++ compiler).  Thus, this
+ * templated class should only be used to instantiate objects with those
+ * types as the template parameter.  None of the operations are implemented
+ * for any other type.
+ *
+ * @see math::ArrayDataBasicOps
+ */
+
+template<class TYPE>
+class PatchFaceDataBasicOps
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchFaceDataBasicOps();
+
+   virtual ~PatchFaceDataBasicOps<TYPE>();
+
+   /**
+    * Set dst = alpha * src, elementwise.
+    */
+   void
+   scale(
+      tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+      const TYPE& alpha,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src + alpha, elementwise.
+    */
+   void
+   addScalar(
+      tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& src,
+      const TYPE& alpha,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src1 + src2, elementwise.
+    */
+   void
+   add(
+      tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& src1,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src1 - src2, elementwise.
+    */
+   void
+   subtract(
+      tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& src1,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src1 * src2, elementwise.
+    */
+   void
+   multiply(
+      tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& src1,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src1 / src2, elementwise.  No check for division by zero.
+    */
+   void
+   divide(
+      tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& src1,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = 1 / src, elementwise.  No check for division by zero.
+    */
+   void
+   reciprocal(
+      tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = alpha * src1 + beta * src2, elementwise.
+    */
+   void
+   linearSum(
+      tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+      const TYPE& alpha,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& src1,
+      const TYPE& beta,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = alpha * src1 + src2, elementwise.
+    */
+   void
+   axpy(
+      tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+      const TYPE& alpha,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& src1,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = alpha * src1 - src2, elementwise.
+    */
+   void
+   axmy(
+      tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+      const TYPE& alpha,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& src1,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Return the minimum patch data component entry  When the data is
+    * complex, the result is the data element with the smallest norm.
+    */
+   TYPE
+   min(
+      const tbox::Pointer<pdat::FaceData<TYPE> >& data,
+      const hier::Box& box) const;
+
+   /**
+    * Return the maximum patch data component entry  When the data is
+    * complex, the result is the data element with the largest norm.
+    */
+   TYPE
+   max(
+      const tbox::Pointer<pdat::FaceData<TYPE> >& data,
+      const hier::Box& box) const;
+
+   /**
+    * Set patch data to random values.  See the operations in the
+    * ArrayDataBasicOps class for details on the generation
+    * of the random values for each data type.
+    */
+   void
+   setRandomValues(
+      tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+      const TYPE& width,
+      const TYPE& low,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   PatchFaceDataBasicOps(
+      const PatchFaceDataBasicOps<TYPE>&);
+   void
+   operator = (
+      const PatchFaceDataBasicOps<TYPE>&);
+
+   ArrayDataBasicOps<TYPE> d_array_ops;
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/PatchFaceDataBasicOps.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,220 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated miscellaneous operations for real face-centered data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchFaceDataMiscellaneousOpsReal_C
+#define included_math_PatchFaceDataMiscellaneousOpsReal_C
+
+#include "SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/pdat/FaceGeometry.h"
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+PatchFaceDataMiscellaneousOpsReal<TYPE>::PatchFaceDataMiscellaneousOpsReal()
+{
+}
+
+template<class TYPE>
+PatchFaceDataMiscellaneousOpsReal<TYPE>::~PatchFaceDataMiscellaneousOpsReal()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The const constructor and assignment operator are not actually used   *
+ * but are defined here for compilers that require an implementation for *
+ * every declaration.                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+PatchFaceDataMiscellaneousOpsReal<TYPE>::PatchFaceDataMiscellaneousOpsReal(
+   const PatchFaceDataMiscellaneousOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void PatchFaceDataMiscellaneousOpsReal<TYPE>::operator = (
+   const PatchFaceDataMiscellaneousOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Templated miscellaneous opertions for real face-centered data.        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+int PatchFaceDataMiscellaneousOpsReal<TYPE>::computeConstrProdPos(
+   const tbox::Pointer<pdat::FaceData<TYPE> >& data1,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& data2,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::FaceData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data1.isNull() && !data2.isNull());
+#endif
+   const tbox::Dimension& dim(data1->getDim());
+
+   int retval = 1;
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box face_box =
+            pdat::FaceGeometry::toFaceBox(box, d);
+         retval = tbox::MathUtilities<int>::Min(retval,
+               d_array_ops.computeConstrProdPos(
+                  data1->getArrayData(d),
+                  data2->getArrayData(d),
+                  face_box));
+      }
+   } else {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box face_box =
+            pdat::FaceGeometry::toFaceBox(box, d);
+         retval = tbox::MathUtilities<int>::Min(retval,
+               d_array_ops.computeConstrProdPosWithControlVolume(
+                  data1->getArrayData(d),
+                  data2->getArrayData(d),
+                  cvol->getArrayData(d),
+                  face_box));
+      }
+   }
+   return retval;
+}
+
+template<class TYPE>
+void PatchFaceDataMiscellaneousOpsReal<TYPE>::compareToScalar(
+   tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& src,
+   const TYPE& alpha,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::FaceData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+#endif
+   const tbox::Dimension& dim(dst->getDim());
+
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+         d_array_ops.compareToScalar(dst->getArrayData(d),
+            src->getArrayData(d),
+            alpha,
+            face_box);
+      }
+   } else {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+         d_array_ops.compareToScalarWithControlVolume(dst->getArrayData(d),
+            src->getArrayData(d),
+            alpha,
+            cvol->getArrayData(d),
+            face_box);
+      }
+   }
+}
+
+template<class TYPE>
+int PatchFaceDataMiscellaneousOpsReal<TYPE>::testReciprocal(
+   tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& src,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::FaceData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+#endif
+   const tbox::Dimension& dim(dst->getDim());
+
+   int retval = 1;
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box face_box =
+            pdat::FaceGeometry::toFaceBox(box, d);
+         retval = tbox::MathUtilities<int>::Min(retval,
+               d_array_ops.testReciprocal(
+                  dst->getArrayData(d),
+                  src->getArrayData(d),
+                  face_box));
+      }
+   } else {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box face_box =
+            pdat::FaceGeometry::toFaceBox(box, d);
+         retval = tbox::MathUtilities<int>::Min(retval,
+               d_array_ops.testReciprocalWithControlVolume(
+                  dst->getArrayData(d),
+                  src->getArrayData(d),
+                  cvol->getArrayData(d),
+                  face_box));
+      }
+   }
+   return retval;
+}
+
+template<class TYPE>
+TYPE PatchFaceDataMiscellaneousOpsReal<TYPE>::maxPointwiseDivide(
+   const tbox::Pointer<pdat::FaceData<TYPE> >& numer,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& denom,
+   const hier::Box& box) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!numer.isNull() && !denom.isNull());
+#endif
+   const tbox::Dimension& dim(numer->getDim());
+
+   TYPE retval = 0.0;
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box face_box =
+         pdat::FaceGeometry::toFaceBox(box, d);
+      TYPE dirval = d_array_ops.maxPointwiseDivide(numer->getArrayData(d),
+            denom->getArrayData(d),
+            face_box);
+      retval = tbox::MathUtilities<TYPE>::Max(retval, dirval);
+   }
+   return retval;
+}
+
+template<class TYPE>
+TYPE PatchFaceDataMiscellaneousOpsReal<TYPE>::minPointwiseDivide(
+   const tbox::Pointer<pdat::FaceData<TYPE> >& numer,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& denom,
+   const hier::Box& box) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!numer.isNull() && !denom.isNull());
+#endif
+   const tbox::Dimension& dim(numer->getDim());
+
+   TYPE retval = 0.0;
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+      TYPE dirval = d_array_ops.minPointwiseDivide(numer->getArrayData(d),
+            denom->getArrayData(d),
+            face_box);
+      retval = tbox::MathUtilities<TYPE>::Min(retval, dirval);
+   }
+   return retval;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,165 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated miscellaneous operations for real face-centered data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchFaceDataMiscellaneousOpsReal
+#define included_math_PatchFaceDataMiscellaneousOpsReal
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/math/ArrayDataMiscellaneousOpsReal.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchFaceDataMiscellaneousOpsReal provides access to a
+ * collection of operations that may be applied to numerical face-centered
+ * patch data of type double and float.  The primary intent of this class is
+ * to provide the interface to these operations for the class
+ * PatchFaceDataOpsReal which provides access to a more complete
+ * set of operations that may be used to manipulate face-centered
+ * patch data.  Each member function accepts a box argument
+ * indicating the region of index space on which the operation should be
+ * performed.  The operation will be performed on the intersection of this
+ * box and those boxes corresponding to the patch data objects.  Also, each
+ * operation allows an additional face-centered patch data object to be used
+ * to represent a control volume that weights the contribution of each data
+ * entry in the given norm calculation.  Note that the control volume patch
+ * data must be of type double and have face-centered geometry (i.e., the
+ * same as the data itself).  The use of control volumes is important when
+ * these operations are used in vector kernels where the data resides over
+ * multiple levels of spatial resolution in an AMR hierarchy.  If the control
+ * volume is not given in the function call, it will be ignored in the
+ * calculation.  Also, note that the depth of the control volume patch data
+ * object must be either 1 or be equal to the depth of the other data objects.
+ *
+ * Since these operations are used only by the vector kernels for the KINSOL
+ * and CVODE solver packages at this time, they are intended to be instantiated
+ * for the standard built-in types double and float (since those solvers only
+ * treat double and float data).  To extend this class to other data types or
+ * to include other operations, the member functions must be specialized or the
+ * new operations must be added.
+ *
+ * @see math::ArrayDataMiscellaneousOpsReal
+ */
+
+template<class TYPE>
+class PatchFaceDataMiscellaneousOpsReal
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchFaceDataMiscellaneousOpsReal();
+
+   virtual ~PatchFaceDataMiscellaneousOpsReal<TYPE>();
+
+   /**
+    * Return 1 if \f$\|data2_i\| > 0\f$ and \f$data1_i * data2_i \leq 0\f$, for
+    * any \f$i\f$ in the index region, where \f$cvol_i > 0\f$.  Otherwise return 0.
+    * If the control volume is NULL, all values in the index set are used.
+    */
+   int
+   computeConstrProdPos(
+      const tbox::Pointer<pdat::FaceData<TYPE> >& data1,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& data2,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::FaceData<double> > cvol =
+         tbox::Pointer<pdat::FaceData<double> >(NULL)) const;
+
+   /**
+    * Wherever \f$cvol_i > 0\f$ in the index region, set \f$dst_i = 1\f$
+    * if \f$\|src_i\| > \alpha\f$, and \f$dst_i = 0\f$ otherwise.  If the control
+    * volume is NULL, all values in the index set are considered.
+    */
+   void
+   compareToScalar(
+      tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& src,
+      const TYPE& alpha,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::FaceData<double> > cvol =
+         tbox::Pointer<pdat::FaceData<double> >(NULL)) const;
+
+   /**
+    * Wherever \f$cvol_i > 0\f$ in the index region, set \f$dst_i = 1/src_i\f$ if
+    * \f$src_i \neq 0\f$, and \f$dst_i = 0\f$ otherwise.  If \f$dst_i = 0\f$ anywhere,
+    * 0 is the return value.  Otherwise 1 is returned.  If the control volume
+    * all values in the index set are considered.
+    */
+   int
+   testReciprocal(
+      tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& src,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::FaceData<double> > cvol =
+         tbox::Pointer<pdat::FaceData<double> >(NULL)) const;
+
+   /*!
+    * @brief Compute max of "conditional" quotients of two arrays.
+    *
+    * Return the maximum of pointwise "conditional" quotients of the numerator
+    * and denominator.
+    *
+    * The "conditional" quotient is defined as |numerator/denominator|
+    * where the denominator is nonzero.  Otherwise, it is defined as
+    * |numerator|.
+    *
+    * @b Note: This method is currently intended to support the
+    * PETSc-2.1.6 vector wrapper only.  Please do not use it!
+    */
+   TYPE
+   maxPointwiseDivide(
+      const tbox::Pointer<pdat::FaceData<TYPE> >& numer,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& denom,
+      const hier::Box& box) const;
+
+   /*!
+    * @brief Compute min of quotients of two arrays.
+    *
+    * Return the minimum of pointwise quotients of the numerator
+    * and denominator.
+    *
+    * The quotient is defined as (numerator/denominator)
+    * where the denominator is nonzero.  When the denominator is zero, the
+    * entry is skipped.  If the denominator is always zero, the value of
+    * tbox::IEEE::getFLT_MAX() is returned (see @ref SAMRAI::tbox::IEEE).
+    *
+    * @b Note: This method is currently intended to support the
+    * SUNDIALS vector wrapper only.  Please do not use it!
+    */
+   TYPE
+   minPointwiseDivide(
+      const tbox::Pointer<pdat::FaceData<TYPE> >& numer,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& denom,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   PatchFaceDataMiscellaneousOpsReal(
+      const PatchFaceDataMiscellaneousOpsReal<TYPE>&);
+   void
+   operator = (
+      const PatchFaceDataMiscellaneousOpsReal<TYPE>&);
+
+   ArrayDataMiscellaneousOpsReal<TYPE> d_array_ops;
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchFaceDataNormOpsComplex.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchFaceDataNormOpsComplex.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,322 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Norm operations for complex face-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchFaceDataNormOpsComplex_C
+#define included_math_PatchFaceDataNormOpsComplex_C
+
+#include "SAMRAI/math/PatchFaceDataNormOpsComplex.h"
+#include "SAMRAI/pdat/FaceGeometry.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#ifdef DEBUG_CHECK_ASSERTIONS
+#include "SAMRAI/tbox/Utilities.h"
+#endif
+
+namespace SAMRAI {
+namespace math {
+
+PatchFaceDataNormOpsComplex::PatchFaceDataNormOpsComplex()
+{
+}
+
+PatchFaceDataNormOpsComplex::~PatchFaceDataNormOpsComplex()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute the number of data entries on a patch in the given box.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int PatchFaceDataNormOpsComplex::numberOfEntries(
+   const tbox::Pointer<pdat::FaceData<dcomplex> >& data,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   int retval = 0;
+   const hier::Box ibox = box * data->getGhostBox();
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box dbox = pdat::FaceGeometry::toFaceBox(ibox, d);
+      retval += (dbox.size() * data->getDepth());
+   }
+   return retval;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Norm operations for complex face-centered data.                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double PatchFaceDataNormOpsComplex::sumControlVolumes(
+   const tbox::Pointer<pdat::FaceData<dcomplex> >& data,
+   const tbox::Pointer<pdat::FaceData<double> >& cvol,
+   const hier::Box& box) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull() && !cvol.isNull());
+#endif
+   const tbox::Dimension& dim(box.getDim());
+
+   double retval = 0.0;
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+      retval += d_array_ops.sumControlVolumes(data->getArrayData(d),
+            cvol->getArrayData(d),
+            face_box);
+   }
+   return retval;
+}
+
+void PatchFaceDataNormOpsComplex::abs(
+   tbox::Pointer<pdat::FaceData<double> >& dst,
+   const tbox::Pointer<pdat::FaceData<dcomplex> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+      d_array_ops.abs(dst->getArrayData(d),
+         src->getArrayData(d),
+         face_box);
+   }
+}
+
+double PatchFaceDataNormOpsComplex::L1Norm(
+   const tbox::Pointer<pdat::FaceData<dcomplex> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::FaceData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   double retval = 0.0;
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+         retval += d_array_ops.L1Norm(data->getArrayData(d), face_box);
+      }
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+         retval += d_array_ops.L1NormWithControlVolume(data->getArrayData(d),
+               cvol->getArrayData(d),
+               face_box);
+      }
+   }
+   return retval;
+}
+
+double PatchFaceDataNormOpsComplex::L2Norm(
+   const tbox::Pointer<pdat::FaceData<dcomplex> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::FaceData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   double retval = 0.0;
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+         double aval = d_array_ops.L2Norm(data->getArrayData(d), face_box);
+         retval += aval * aval;
+      }
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+         double aval = d_array_ops.L2NormWithControlVolume(
+               data->getArrayData(d),
+               cvol->getArrayData(d),
+               face_box);
+         retval += aval * aval;
+      }
+   }
+   return sqrt(retval);
+}
+
+double PatchFaceDataNormOpsComplex::weightedL2Norm(
+   const tbox::Pointer<pdat::FaceData<dcomplex> >& data,
+   const tbox::Pointer<pdat::FaceData<dcomplex> >& weight,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::FaceData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull() && !weight.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*data, *weight, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   double retval = 0.0;
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+         double aval = d_array_ops.weightedL2Norm(data->getArrayData(d),
+               weight->getArrayData(d),
+               face_box);
+         retval += aval * aval;
+      }
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+         double aval = d_array_ops.weightedL2NormWithControlVolume(
+               data->getArrayData(d),
+               weight->getArrayData(d),
+               cvol->getArrayData(d),
+               face_box);
+         retval += aval * aval;
+      }
+   }
+   return sqrt(retval);
+}
+
+double PatchFaceDataNormOpsComplex::RMSNorm(
+   const tbox::Pointer<pdat::FaceData<dcomplex> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::FaceData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   double retval = L2Norm(data, box, cvol);
+   if (cvol.isNull()) {
+      retval /= sqrt((double)numberOfEntries(data, box));
+   } else {
+      retval /= sqrt(sumControlVolumes(data, cvol, box));
+   }
+   return retval;
+}
+
+double PatchFaceDataNormOpsComplex::weightedRMSNorm(
+   const tbox::Pointer<pdat::FaceData<dcomplex> >& data,
+   const tbox::Pointer<pdat::FaceData<dcomplex> >& weight,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::FaceData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull() && !weight.isNull());
+#endif
+   double retval = weightedL2Norm(data, weight, box, cvol);
+   if (cvol.isNull()) {
+      retval /= sqrt((double)numberOfEntries(data, box));
+   } else {
+      retval /= sqrt(sumControlVolumes(data, cvol, box));
+   }
+   return retval;
+}
+
+double PatchFaceDataNormOpsComplex::maxNorm(
+   const tbox::Pointer<pdat::FaceData<dcomplex> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::FaceData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   const tbox::Dimension& dim(box.getDim());
+
+   double retval = 0.0;
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box face_box =
+            pdat::FaceGeometry::toFaceBox(box, d);
+         retval = tbox::MathUtilities<double>::Max(retval,
+               d_array_ops.maxNorm(data->getArrayData(d), face_box));
+      }
+   } else {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box face_box =
+            pdat::FaceGeometry::toFaceBox(box, d);
+         retval = tbox::MathUtilities<double>::Max(retval,
+               d_array_ops.maxNormWithControlVolume(
+                  data->getArrayData(d), cvol->getArrayData(d), face_box));
+      }
+   }
+   return retval;
+}
+
+dcomplex PatchFaceDataNormOpsComplex::dot(
+   const tbox::Pointer<pdat::FaceData<dcomplex> >& data1,
+   const tbox::Pointer<pdat::FaceData<dcomplex> >& data2,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::FaceData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data1.isNull() && !data2.isNull());
+#endif
+   const tbox::Dimension& dim(box.getDim());
+
+   dcomplex retval = dcomplex(0.0, 0.0);
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+         retval += d_array_ops.dot(data1->getArrayData(d),
+               data2->getArrayData(d),
+               face_box);
+      }
+   } else {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+         retval += d_array_ops.dotWithControlVolume(
+               data1->getArrayData(d),
+               data2->getArrayData(d),
+               cvol->getArrayData(d),
+               face_box);
+      }
+   }
+   return retval;
+}
+
+dcomplex PatchFaceDataNormOpsComplex::integral(
+   const tbox::Pointer<pdat::FaceData<dcomplex> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::FaceData<double> > vol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   const tbox::Dimension& dim(box.getDim());
+
+   dcomplex retval = dcomplex(0.0, 0.0);
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+      retval += d_array_ops.integral(data->getArrayData(d),
+            vol->getArrayData(d),
+            face_box);
+   }
+
+   return retval;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchFaceDataNormOpsComplex.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchFaceDataNormOpsComplex.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,217 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Norm operations for complex face-centered data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchFaceDataNormOpsComplex
+#define included_math_PatchFaceDataNormOpsComplex
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/math/ArrayDataNormOpsComplex.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchFaceDataNormOpsComplex provides a collection of common
+ * norm operations that may be applied to complex face-centered patch data.
+ * The primary intent of this class is to define part of the interface for the
+ * PatchFaceDataOpsComplex class which provides access to operations
+ * that may be used to manipulate complex face-centered patch data.  Each
+ * member function accepts a box argument indicating the region of index space
+ * on which the operation should be performed.  The operation will be performed
+ * on the intersection of this box and those boxes corresponding to the patch
+ * data objects.  Also, each operation allows an additional face-centered
+ * patch data object to be used to represent a control volume that weights the
+ * contribution of each data entry in the given norm calculation.  Note that
+ * the control volume patch data must be of type double and have face-centered
+ * geometry (i.e., the same as the data itself).  The use of control volumes
+ * is important when these operations are used in vector kernels where the
+ * data resides over multiple levels of spatial resolution in an AMR hierarchy.
+ * If the control volume is not given in the function call, it will be ignored
+ * in the calculation.  Also, note that the depth of the control volume patch
+ * data object must be either 1 or be equal to the depth of the other data
+ * objects.
+ *
+ * Note that a similar set of norm operations is implemented for real
+ * patch data (double and float) in the class PatchFaceDataNormOpsReal.
+ *
+ * @see math::ArrayDataNormOpsComplex
+ */
+
+class PatchFaceDataNormOpsComplex
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchFaceDataNormOpsComplex();
+
+   virtual ~PatchFaceDataNormOpsComplex();
+
+   /**
+    * Return the number of data values for the face-centered data object
+    * in the given box.  Note that it is assumed that the box refers to
+    * the cell-centered index space corresponding to the patch hierarchy.
+    */
+   int
+   numberOfEntries(
+      const tbox::Pointer<pdat::FaceData<dcomplex> >& data,
+      const hier::Box& box) const;
+
+   /**
+    * Return sum of control volume entries for the face-centered data object.
+    */
+   double
+   sumControlVolumes(
+      const tbox::Pointer<pdat::FaceData<dcomplex> >& data,
+      const tbox::Pointer<pdat::FaceData<double> >& cvol,
+      const hier::Box& box) const;
+
+   /**
+    * Set destination component to norm of source component.  That is,
+    * each destination entry is set to
+    * \f$d_i = \sqrt{ {real(s_i)}^2 + {imag(s_i)}^2 }\f$.
+    */
+   void
+   abs(
+      tbox::Pointer<pdat::FaceData<double> >& dst,
+      const tbox::Pointer<pdat::FaceData<dcomplex> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Return discrete \f$L_1\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( \sqrt{data_i * \bar{data_i}}*cvol_i )\f$.
+    * If the control volume is NULL, the return value is
+    * \f$\sum_i ( \sqrt{data_i * \bar{data_i}} )\f$.
+    */
+   double
+   L1Norm(
+      const tbox::Pointer<pdat::FaceData<dcomplex> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::FaceData<double> > cvol =
+         tbox::Pointer<pdat::FaceData<double> >(NULL)) const;
+
+   /**
+    * Return discrete \f$L_2\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum
+    * \f$\sqrt{ \sum_i ( data_i * \bar{data_i} cvol_i ) }\f$.
+    * If the control volume is NULL, the return value is
+    * \f$\sqrt{ \sum_i ( data_i * \bar{data_i} ) }\f$.
+    */
+   double
+   L2Norm(
+      const tbox::Pointer<pdat::FaceData<dcomplex> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::FaceData<double> > cvol =
+         tbox::Pointer<pdat::FaceData<double> >(NULL)) const;
+
+   /**
+    * Return discrete weighted \f$L_2\f$-norm of the data using the control
+    * volume to weight the contribution of the data and weight entries to
+    * the sum.  That is, the return value is the sum \f$\sqrt{ \sum_i (
+    * (data_i * wgt_i) * \bar{(data_i * wgt_i)} cvol_i ) }\f$.  If the control
+    * volume is NULL, the return value is
+    * \f$\sqrt{ \sum_i ( (data_i * wgt_i) * \bar{(data_i * wgt_i)} cvol_i ) }\f$.
+    */
+   double
+   weightedL2Norm(
+      const tbox::Pointer<pdat::FaceData<dcomplex> >& data,
+      const tbox::Pointer<pdat::FaceData<dcomplex> >& weight,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::FaceData<double> > cvol =
+         tbox::Pointer<pdat::FaceData<double> >(NULL)) const;
+
+   /**
+    * Return discrete root mean squared norm of the data.  If the control
+    * volume is not NULL, the return value is the \f$L_2\f$-norm divided by
+    * the square root of the sum of the control volumes.  Otherwise, the
+    * return value is the \f$L_2\f$-norm divided by the square root of the
+    * number of data entries.
+    */
+   double
+   RMSNorm(
+      const tbox::Pointer<pdat::FaceData<dcomplex> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::FaceData<double> > cvol =
+         tbox::Pointer<pdat::FaceData<double> >(NULL)) const;
+
+   /**
+    * Return discrete weighted root mean squared norm of the data.  If the
+    * control volume is not NULL, the return value is the weighted \f$L_2\f$-norm
+    * divided by the square root of the sum of the control volumes.  Otherwise,
+    * the return value is the weighted \f$L_2\f$-norm divided by the square root
+    * of the number of data entries.
+    */
+   double
+   weightedRMSNorm(
+      const tbox::Pointer<pdat::FaceData<dcomplex> >& data,
+      const tbox::Pointer<pdat::FaceData<dcomplex> >& weight,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::FaceData<double> > cvol =
+         tbox::Pointer<pdat::FaceData<double> >(NULL)) const;
+
+   /**
+    * Return the \f$\max\f$-norm of the data using the control volume to weight
+    * the contribution of each data entry to the maximum.  That is, the return
+    * value is \f$\max_i ( \sqrt{data_i * \bar{data_i}} )\f$, where the max is
+    * over the data elements where \f$cvol_i > 0\f$.  If the control volume is
+    * NULL, it is ignored during the computation of the maximum.
+    */
+   double
+   maxNorm(
+      const tbox::Pointer<pdat::FaceData<dcomplex> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::FaceData<double> > cvol =
+         tbox::Pointer<pdat::FaceData<double> >(NULL)) const;
+
+   /**
+    * Return the dot product of the two data arrays using the control volume
+    * to weight the contribution of each product to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( data1_i * \bar{data2_i} * cvol_i )\f$.
+    * If the control volume is NULL, it is ignored during the summation.
+    */
+   dcomplex
+   dot(
+      const tbox::Pointer<pdat::FaceData<dcomplex> >& data1,
+      const tbox::Pointer<pdat::FaceData<dcomplex> >& data2,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::FaceData<double> > cvol =
+         tbox::Pointer<pdat::FaceData<double> >(NULL)) const;
+
+   /**
+    * Return the integral of the function represented by the data array.
+    * The return value is the sum \f$\sum_i ( data_i * vol_i )\f$.
+    */
+   dcomplex
+   integral(
+      const tbox::Pointer<pdat::FaceData<dcomplex> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::FaceData<double> > vol) const;
+
+private:
+   // The following are not implemented:
+   PatchFaceDataNormOpsComplex(
+      const PatchFaceDataNormOpsComplex&);
+   void
+   operator = (
+      const PatchFaceDataNormOpsComplex&);
+
+   ArrayDataNormOpsComplex d_array_ops;
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchFaceDataNormOpsReal.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchFaceDataNormOpsReal.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,359 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated norm operations for real face-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchFaceDataNormOpsReal_C
+#define included_math_PatchFaceDataNormOpsReal_C
+
+#include "SAMRAI/math/PatchFaceDataNormOpsReal.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/pdat/FaceGeometry.h"
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+PatchFaceDataNormOpsReal<TYPE>::PatchFaceDataNormOpsReal()
+{
+}
+
+template<class TYPE>
+PatchFaceDataNormOpsReal<TYPE>::~PatchFaceDataNormOpsReal()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The const constructor and assignment operator are not actually used   *
+ * but are defined here for compilers that require an implementation for *
+ * every declaration.                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+PatchFaceDataNormOpsReal<TYPE>::PatchFaceDataNormOpsReal(
+   const PatchFaceDataNormOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void PatchFaceDataNormOpsReal<TYPE>::operator = (
+   const PatchFaceDataNormOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute the number of data entries on a patch in the given box.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+int PatchFaceDataNormOpsReal<TYPE>::numberOfEntries(
+   const tbox::Pointer<pdat::FaceData<TYPE> >& data,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   int retval = 0;
+   const hier::Box ibox = box * data->getGhostBox();
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box dbox = pdat::FaceGeometry::toFaceBox(ibox, d);
+      retval += (dbox.size() * data->getDepth());
+   }
+   return retval;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Templated norm operations for real face-centered data.                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+double PatchFaceDataNormOpsReal<TYPE>::sumControlVolumes(
+   const tbox::Pointer<pdat::FaceData<TYPE> >& data,
+   const tbox::Pointer<pdat::FaceData<double> >& cvol,
+   const hier::Box& box) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull() && !cvol.isNull());
+#endif
+   const tbox::Dimension& dim(data->getDim());
+
+   double retval = 0.0;
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+      retval += d_array_ops.sumControlVolumes(data->getArrayData(d),
+            cvol->getArrayData(d),
+            face_box);
+   }
+   return retval;
+}
+
+template<class TYPE>
+void PatchFaceDataNormOpsReal<TYPE>::abs(
+   tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+      d_array_ops.abs(dst->getArrayData(d),
+         src->getArrayData(d),
+         face_box);
+   }
+}
+
+template<class TYPE>
+double PatchFaceDataNormOpsReal<TYPE>::L1Norm(
+   const tbox::Pointer<pdat::FaceData<TYPE> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::FaceData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(data->getDim());
+
+   double retval = 0.0;
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+         retval += d_array_ops.L1Norm(data->getArrayData(d), face_box);
+      }
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+         retval += d_array_ops.L1NormWithControlVolume(data->getArrayData(d),
+               cvol->getArrayData(d),
+               face_box);
+      }
+   }
+   return retval;
+}
+
+template<class TYPE>
+double PatchFaceDataNormOpsReal<TYPE>::L2Norm(
+   const tbox::Pointer<pdat::FaceData<TYPE> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::FaceData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(data->getDim());
+
+   double retval = 0.0;
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+         double aval = d_array_ops.L2Norm(data->getArrayData(d), face_box);
+         retval += aval * aval;
+      }
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+         double aval = d_array_ops.L2NormWithControlVolume(
+               data->getArrayData(d),
+               cvol->getArrayData(d),
+               face_box);
+         retval += aval * aval;
+      }
+   }
+   return sqrt(retval);
+}
+
+template<class TYPE>
+double PatchFaceDataNormOpsReal<TYPE>::weightedL2Norm(
+   const tbox::Pointer<pdat::FaceData<TYPE> >& data,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& weight,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::FaceData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull() && !weight.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*data, *weight, box);
+
+   const tbox::Dimension& dim(data->getDim());
+
+   double retval = 0.0;
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+         double aval = d_array_ops.weightedL2Norm(data->getArrayData(d),
+               weight->getArrayData(d),
+               face_box);
+         retval += aval * aval;
+      }
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+         double aval = d_array_ops.weightedL2NormWithControlVolume(
+               data->getArrayData(d),
+               weight->getArrayData(d),
+               cvol->getArrayData(d),
+               face_box);
+         retval += aval * aval;
+      }
+   }
+   return sqrt(retval);
+}
+
+template<class TYPE>
+double PatchFaceDataNormOpsReal<TYPE>::RMSNorm(
+   const tbox::Pointer<pdat::FaceData<TYPE> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::FaceData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   double retval = L2Norm(data, box, cvol);
+   if (cvol.isNull()) {
+      retval /= sqrt((double)numberOfEntries(data, box));
+   } else {
+      retval /= sqrt(sumControlVolumes(data, cvol, box));
+   }
+   return retval;
+}
+
+template<class TYPE>
+double PatchFaceDataNormOpsReal<TYPE>::weightedRMSNorm(
+   const tbox::Pointer<pdat::FaceData<TYPE> >& data,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& weight,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::FaceData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull() && !weight.isNull());
+#endif
+   double retval = weightedL2Norm(data, weight, box, cvol);
+   if (cvol.isNull()) {
+      retval /= sqrt((double)numberOfEntries(data, box));
+   } else {
+      retval /= sqrt(sumControlVolumes(data, cvol, box));
+   }
+   return retval;
+}
+
+template<class TYPE>
+double PatchFaceDataNormOpsReal<TYPE>::maxNorm(
+   const tbox::Pointer<pdat::FaceData<TYPE> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::FaceData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   const tbox::Dimension& dim(data->getDim());
+
+   double retval = 0.0;
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box face_box =
+            pdat::FaceGeometry::toFaceBox(box, d);
+         retval = tbox::MathUtilities<double>::Max(retval,
+               d_array_ops.maxNorm(data->getArrayData(d), face_box));
+      }
+   } else {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box face_box =
+            pdat::FaceGeometry::toFaceBox(box, d);
+         retval = tbox::MathUtilities<double>::Max(retval,
+               d_array_ops.maxNormWithControlVolume(
+                  data->getArrayData(d),
+                  cvol->getArrayData(d),
+                  face_box));
+      }
+   }
+   return retval;
+}
+
+template<class TYPE>
+TYPE PatchFaceDataNormOpsReal<TYPE>::dot(
+   const tbox::Pointer<pdat::FaceData<TYPE> >& data1,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& data2,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::FaceData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data1.isNull() && !data2.isNull());
+#endif
+   const tbox::Dimension& dim(data1->getDim());
+
+   TYPE retval = 0.0;
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+         retval += d_array_ops.dot(data1->getArrayData(d),
+               data2->getArrayData(d),
+               face_box);
+      }
+   } else {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+         retval += d_array_ops.dotWithControlVolume(
+               data1->getArrayData(d),
+               data2->getArrayData(d),
+               cvol->getArrayData(d),
+               face_box);
+      }
+   }
+   return retval;
+}
+
+template<class TYPE>
+TYPE PatchFaceDataNormOpsReal<TYPE>::integral(
+   const tbox::Pointer<pdat::FaceData<TYPE> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::FaceData<double> > vol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   const tbox::Dimension& dim(data->getDim());
+
+   TYPE retval = 0.0;
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+      retval += d_array_ops.integral(data->getArrayData(d),
+            vol->getArrayData(d),
+            face_box);
+   }
+
+   return retval;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchFaceDataNormOpsReal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchFaceDataNormOpsReal.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,223 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated norm operations for real face-centered data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchFaceDataNormOpsReal
+#define included_math_PatchFaceDataNormOpsReal
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/math/ArrayDataNormOpsReal.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchFaceDataNormOpsReal provides a collection of common
+ * norm operations that may be applied to real (double or float)
+ * numerical face-centered patch data.  The primary intent of this class is
+ * to define part of the interface for an PatchFaceDataOpsReal object
+ * which provides access operations that may be used to manipulate
+ * face-centered patch data.  Each member function accepts a box argument
+ * indicating the region of index space on which the operation should be
+ * performed.  The operation will be performed on the intersection of this
+ * box and those boxes corresponding to the patch data objects.  Also, each
+ * operation allows an additional face-centered patch data object to be used
+ * to represent a control volume that weights the contribution of each data
+ * entry in the given norm calculation.  Note that the control volume patch
+ * data must be of type double and have face-centered geometry (i.e., the
+ * same as the data itself).  The use of control volumes is important when
+ * these operations are used in vector kernels where the data resides over
+ * multiple levels of spatial resolution in an AMR hierarchy.  If the control
+ * volume is not given in the function call, it will be ignored in the
+ * calculation.  Also, note that the depth of the control volume patch data
+ * object must be either 1 or be equal to the depth of the other data objects.
+ *
+ * These operations typically apply only to the numerical standard built-in
+ * types, such as double, float, and the complex type (which may or may not
+ * be a built-in type depending on the C++ compiler).  This templated
+ * class should only be used to instantiate objects with double or float as
+ * the template parameter.  Note that a similar set of norm operations is
+ * implemented for complex patch data in the class
+ * PatchFaceDataNormOpsComplex.
+ *
+ * @see math::ArrayDataNormOpsReal
+ */
+
+template<class TYPE>
+class PatchFaceDataNormOpsReal
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchFaceDataNormOpsReal();
+
+   virtual ~PatchFaceDataNormOpsReal<TYPE>();
+
+   /**
+    * Return the number of data values for the face-centered data object
+    * in the given box.  Note that it is assumed that the box refers to
+    * the cell-centered index space corresponding to the patch hierarchy.
+    */
+   int
+   numberOfEntries(
+      const tbox::Pointer<pdat::FaceData<TYPE> >& data,
+      const hier::Box& box) const;
+
+   /**
+    * Return sum of control volume entries for the face-centered data object.
+    */
+   double
+   sumControlVolumes(
+      const tbox::Pointer<pdat::FaceData<TYPE> >& data,
+      const tbox::Pointer<pdat::FaceData<double> >& cvol,
+      const hier::Box& box) const;
+
+   /**
+    * Set destination component to absolute value of source component.
+    * That is, each destination entry is set to \f$d_i = \| s_i \|\f$.
+    */
+   void
+   abs(
+      tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Return discrete \f$L_1\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( \| data_i \| cvol_i )\f$.  If the
+    * control volume is NULL, the return value is \f$\sum_i ( \| data_i \| )\f$.
+    */
+   double
+   L1Norm(
+      const tbox::Pointer<pdat::FaceData<TYPE> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::FaceData<double> > cvol =
+         tbox::Pointer<pdat::FaceData<double> >(NULL)) const;
+
+   /**
+    * Return discrete \f$L_2\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sqrt{ \sum_i ( (data_i)^2 cvol_i ) }\f$.
+    * If the control volume is NULL, the return value is
+    * \f$\sqrt{ \sum_i ( (data_i)^2 cvol_i ) }\f$.
+    */
+   double
+   L2Norm(
+      const tbox::Pointer<pdat::FaceData<TYPE> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::FaceData<double> > cvol =
+         tbox::Pointer<pdat::FaceData<double> >(NULL)) const;
+
+   /**
+    * Return discrete weighted \f$L_2\f$-norm of the data using the control
+    * volume to weight the contribution of the data and weight entries to
+    * the sum.  That is, the return value is the sum \f$\sqrt{ \sum_i (
+    * (data_i * weight_i)^2 cvol_i ) }\f$.  If the control volume is NULL,
+    * the return value is \f$\sqrt{ \sum_i ( (data_i * weight_i)^2 ) }\f$.
+    */
+   double
+   weightedL2Norm(
+      const tbox::Pointer<pdat::FaceData<TYPE> >& data,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& weight,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::FaceData<double> > cvol =
+         tbox::Pointer<pdat::FaceData<double> >(NULL)) const;
+
+   /**
+    * Return discrete root mean squared norm of the data.  If the control
+    * volume is not NULL, the return value is the \f$L_2\f$-norm divided by
+    * the square root of the sum of the control volumes.  Otherwise, the
+    * return value is the \f$L_2\f$-norm divided by the square root of the
+    * number of data entries.
+    */
+   double
+   RMSNorm(
+      const tbox::Pointer<pdat::FaceData<TYPE> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::FaceData<double> > cvol =
+         tbox::Pointer<pdat::FaceData<double> >(NULL)) const;
+
+   /**
+    * Return discrete weighted root mean squared norm of the data.  If the
+    * control volume is not NULL, the return value is the weighted \f$L_2\f$-norm
+    * divided by the square root of the sum of the control volumes.  Otherwise,
+    * the return value is the weighted \f$L_2\f$-norm divided by the square root
+    * of the number of data entries.
+    */
+   double
+   weightedRMSNorm(
+      const tbox::Pointer<pdat::FaceData<TYPE> >& data,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& weight,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::FaceData<double> > cvol =
+         tbox::Pointer<pdat::FaceData<double> >(NULL)) const;
+
+   /**
+    * Return the \f$\max\f$-norm of the data using the control volume to weight
+    * the contribution of each data entry to the maximum.  That is, the return
+    * value is \f$\max_i ( \| data_i \| )\f$, where the max is over the data
+    * elements where \f$cvol_i > 0\f$.  If the control volume is NULL, it is
+    * ignored during the computation of the maximum.
+    */
+   double
+   maxNorm(
+      const tbox::Pointer<pdat::FaceData<TYPE> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::FaceData<double> > cvol =
+         tbox::Pointer<pdat::FaceData<double> >(NULL)) const;
+
+   /**
+    * Return the dot product of the two data arrays using the control volume
+    * to weight the contribution of each product to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( data1_i * data2_i * cvol_i )\f$.
+    * If the control volume is NULL, it is ignored during the summation.
+    */
+   TYPE
+   dot(
+      const tbox::Pointer<pdat::FaceData<TYPE> >& data1,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& data2,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::FaceData<double> > cvol =
+         tbox::Pointer<pdat::FaceData<double> >(NULL)) const;
+
+   /**
+    * Return the integral of the function represented by the data array.
+    * The return value is the sum \f$\sum_i ( data_i * vol_i )\f$.
+    */
+   TYPE
+   integral(
+      const tbox::Pointer<pdat::FaceData<TYPE> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::FaceData<double> > vol) const;
+
+private:
+   // The following are not implemented:
+   PatchFaceDataNormOpsReal(
+      const PatchFaceDataNormOpsReal<TYPE>&);
+   void
+   operator = (
+      const PatchFaceDataNormOpsReal<TYPE>&);
+
+   ArrayDataNormOpsReal<TYPE> d_array_ops;
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/PatchFaceDataNormOpsReal.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchFaceDataOpsComplex.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchFaceDataOpsComplex.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,100 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for complex face-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchFaceDataOpsComplex_C
+#define included_math_PatchFaceDataOpsComplex_C
+
+#include "SAMRAI/math/PatchFaceDataOpsComplex.h"
+#include "SAMRAI/pdat/FaceGeometry.h"
+#ifdef DEBUG_CHECK_ASSERTIONS
+#include "SAMRAI/tbox/Utilities.h"
+#endif
+
+namespace SAMRAI {
+namespace math {
+
+PatchFaceDataOpsComplex::PatchFaceDataOpsComplex()
+{
+}
+
+PatchFaceDataOpsComplex::~PatchFaceDataOpsComplex()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * General operations for complex face-centered patch data.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchFaceDataOpsComplex::swapData(
+   tbox::Pointer<hier::Patch> patch,
+   const int data1_id,
+   const int data2_id) const
+{
+   TBOX_ASSERT(!patch.isNull());
+
+   tbox::Pointer<pdat::FaceData<dcomplex> > d1 = patch->getPatchData(data1_id);
+   tbox::Pointer<pdat::FaceData<dcomplex> > d2 = patch->getPatchData(data2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d1.isNull() && !d2.isNull());
+   TBOX_ASSERT(d1->getDepth() && d2->getDepth());
+   TBOX_ASSERT(d1->getBox() == d2->getBox());
+   TBOX_ASSERT(d1->getGhostBox() == d2->getGhostBox());
+#endif
+   patch->setPatchData(data1_id, d2);
+   patch->setPatchData(data2_id, d1);
+}
+
+void PatchFaceDataOpsComplex::printData(
+   const tbox::Pointer<pdat::FaceData<dcomplex> >& data,
+   const hier::Box& box,
+   std::ostream& s) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   s << "Data box = " << box << std::endl;
+   data->print(box, s);
+   s << "\n";
+}
+
+void PatchFaceDataOpsComplex::copyData(
+   tbox::Pointer<pdat::FaceData<dcomplex> >& dst,
+   const tbox::Pointer<pdat::FaceData<dcomplex> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+      (dst->getArrayData(d)).copy(src->getArrayData(d), face_box);
+   }
+}
+
+void PatchFaceDataOpsComplex::setToScalar(
+   tbox::Pointer<pdat::FaceData<dcomplex> >& dst,
+   const dcomplex& alpha,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*dst, box);
+
+   dst->fillAll(alpha, box);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchFaceDataOpsComplex.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchFaceDataOpsComplex.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for complex face-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchFaceDataOpsComplex
+#define included_math_PatchFaceDataOpsComplex
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/math/PatchFaceDataBasicOps.h"
+#include "SAMRAI/math/PatchFaceDataNormOpsComplex.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchFaceDataOpsComplex provides a collection of operations
+ * that may be used to manipulate complex face-centered patch data.  The
+ * operations include basic arithmetic and norms.  With the
+ * assertion of a few basic routines, this class inherits its interface (and
+ * thus its functionality) from the base classes PatchFaceDataBasicOps,
+ * PatchFaceDataNormOpsComplex from which it is derived.  The
+ * name of each of these base classes is indicative of the set of
+ * face-centered patch data operations that it provides.
+ *
+ * A similar set of operations is implemented for real (double and float) and
+ * integer patch data in the classes PatchFaceDataOpsReal and
+ * PatchFaceDataOpsInteger, repsectively.
+ *
+ * @see math::PatchFaceDataBasicOps
+ * @see math::PatchFaceDataNormOpsComplex
+ */
+
+class PatchFaceDataOpsComplex:
+   public tbox::DescribedClass,
+   public PatchFaceDataBasicOps<dcomplex>,
+   public PatchFaceDataNormOpsComplex
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchFaceDataOpsComplex();
+
+   virtual ~PatchFaceDataOpsComplex();
+
+   /**
+    * Copy dst data to src data over given box.
+    */
+   void
+   copyData(
+      tbox::Pointer<pdat::FaceData<dcomplex> >& dst,
+      const tbox::Pointer<pdat::FaceData<dcomplex> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Swap pointers for patch data objects.  Objects are checked for
+    * consistency of depth, box, and ghost box.
+    */
+   void
+   swapData(
+      tbox::Pointer<hier::Patch> patch,
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data entries over given box to given output stream.
+    */
+   void
+   printData(
+      const tbox::Pointer<pdat::FaceData<dcomplex> >& data,
+      const hier::Box& box,
+      std::ostream& s = tbox::plog) const;
+
+   /**
+    * Initialize data to given scalar over given box.
+    */
+   void
+   setToScalar(
+      tbox::Pointer<pdat::FaceData<dcomplex> >& dst,
+      const dcomplex& alpha,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   PatchFaceDataOpsComplex(
+      const PatchFaceDataOpsComplex&);
+   void
+   operator = (
+      const PatchFaceDataOpsComplex&);
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchFaceDataOpsInteger.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchFaceDataOpsInteger.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,144 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for integer face-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchFaceDataOpsInteger_C
+#define included_math_PatchFaceDataOpsInteger_C
+
+#include "SAMRAI/math/PatchFaceDataOpsInteger.h"
+#include "SAMRAI/pdat/FaceGeometry.h"
+#ifdef DEBUG_CHECK_ASSERTIONS
+#include "SAMRAI/tbox/Utilities.h"
+#endif
+
+namespace SAMRAI {
+namespace math {
+
+PatchFaceDataOpsInteger::PatchFaceDataOpsInteger()
+{
+}
+
+PatchFaceDataOpsInteger::~PatchFaceDataOpsInteger()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute the number of data entries on a patch in the given box.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int PatchFaceDataOpsInteger::numberOfEntries(
+   const tbox::Pointer<pdat::FaceData<int> >& data,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   int retval = 0;
+   const hier::Box ibox = box * data->getGhostBox();
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box dbox = pdat::FaceGeometry::toFaceBox(ibox, d);
+      retval += (dbox.size() * data->getDepth());
+   }
+   return retval;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * General operations for integer face-centered patch data.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchFaceDataOpsInteger::swapData(
+   tbox::Pointer<hier::Patch> patch,
+   const int data1_id,
+   const int data2_id) const
+{
+   TBOX_ASSERT(!patch.isNull());
+
+   tbox::Pointer<pdat::FaceData<int> > d1 = patch->getPatchData(data1_id);
+   tbox::Pointer<pdat::FaceData<int> > d2 = patch->getPatchData(data2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d1.isNull() && !d2.isNull());
+   TBOX_ASSERT(d1->getDepth() && d2->getDepth());
+   TBOX_ASSERT(d1->getBox() == d2->getBox());
+   TBOX_ASSERT(d1->getGhostBox() == d2->getGhostBox());
+#endif
+   patch->setPatchData(data1_id, d2);
+   patch->setPatchData(data2_id, d1);
+}
+
+void PatchFaceDataOpsInteger::printData(
+   const tbox::Pointer<pdat::FaceData<int> >& data,
+   const hier::Box& box,
+   std::ostream& s) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   s << "Data box = " << box << std::endl;
+   data->print(box, s);
+   s << "\n";
+}
+
+void PatchFaceDataOpsInteger::copyData(
+   tbox::Pointer<pdat::FaceData<int> >& dst,
+   const tbox::Pointer<pdat::FaceData<int> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+      (dst->getArrayData(d)).copy(src->getArrayData(d), face_box);
+   }
+}
+
+void PatchFaceDataOpsInteger::setToScalar(
+   tbox::Pointer<pdat::FaceData<int> >& dst,
+   const int& alpha,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*dst, box);
+
+   dst->fillAll(alpha, box);
+}
+
+void PatchFaceDataOpsInteger::abs(
+   tbox::Pointer<pdat::FaceData<int> >& dst,
+   const tbox::Pointer<pdat::FaceData<int> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+      d_array_ops.abs(dst->getArrayData(d),
+         src->getArrayData(d),
+         face_box);
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchFaceDataOpsInteger.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchFaceDataOpsInteger.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,127 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for integer face-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchFaceDataOpsInteger
+#define included_math_PatchFaceDataOpsInteger
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/math/PatchFaceDataBasicOps.h"
+#include "SAMRAI/math/ArrayDataNormOpsInteger.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchFaceDataOpsInteger provides a collection of operations
+ * that may be used to manipulate integer face-centered patch data.  The
+ * operations include basic arithmetic, min, max, etc.  With the assertion
+ * of a few basic routines, this class inherits its interface (and
+ * thus its functionality) from the base class PatchFaceDataBasicOps
+ * from which it is derived.
+ *
+ * A more extensive set of operations is implemented for real (double and
+ * float) and complex patch data in the classes PatchFaceDataOpsReal
+ * and PatchFaceDataOpsComplex, repsectively.
+ *
+ * @see math::PatchFaceDataBasicOps
+ */
+
+class PatchFaceDataOpsInteger:
+   public tbox::DescribedClass,
+   public PatchFaceDataBasicOps<int>
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchFaceDataOpsInteger();
+
+   virtual ~PatchFaceDataOpsInteger();
+
+   /**
+    * Return the number of data values for the face-centered data object
+    * in the given box.  Note that it is assumed that the box refers to
+    * the cell-centered index space corresponding to the patch hierarchy.
+    */
+   int
+   numberOfEntries(
+      const tbox::Pointer<pdat::FaceData<int> >& data,
+      const hier::Box& box) const;
+
+   /**
+    * Copy dst data to src data over given box.
+    */
+   void
+   copyData(
+      tbox::Pointer<pdat::FaceData<int> >& dst,
+      const tbox::Pointer<pdat::FaceData<int> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Swap pointers for patch data objects.  Objects are checked for
+    * consistency of depth, box, and ghost box.
+    */
+   void
+   swapData(
+      tbox::Pointer<hier::Patch> patch,
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data entries over given box to given output stream.
+    */
+   void
+   printData(
+      const tbox::Pointer<pdat::FaceData<int> >& data,
+      const hier::Box& box,
+      std::ostream& s = tbox::plog) const;
+
+   /**
+    * Initialize data to given scalar over given box.
+    */
+   void
+   setToScalar(
+      tbox::Pointer<pdat::FaceData<int> >& dst,
+      const int& alpha,
+      const hier::Box& box) const;
+
+   /**
+    * Set destination component to absolute value of source component.
+    * That is, each destination entry is set to \f$d_i = \| s_i \|\f$.
+    */
+   void
+   abs(
+      tbox::Pointer<pdat::FaceData<int> >& dst,
+      const tbox::Pointer<pdat::FaceData<int> >& src,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   PatchFaceDataOpsInteger(
+      const PatchFaceDataOpsInteger&);
+   void
+   operator = (
+      const PatchFaceDataOpsInteger&);
+
+   ArrayDataNormOpsInteger d_array_ops;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchFaceDataOpsReal.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchFaceDataOpsReal.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,134 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations for real face-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchFaceDataOpsReal_C
+#define included_math_PatchFaceDataOpsReal_C
+
+#include "SAMRAI/math/PatchFaceDataOpsReal.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/pdat/FaceGeometry.h"
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+PatchFaceDataOpsReal<TYPE>::PatchFaceDataOpsReal()
+{
+}
+
+#if 0
+/*
+ * This was moved into the header due to what looks like bug in the
+ * XLC compiler.
+ */
+template<class TYPE>
+PatchFaceDataOpsReal<TYPE>::~PatchFaceDataOpsReal()
+{
+}
+#endif
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The const constructor and assignment operator are not actually used   *
+ * but are defined here for compilers that require an implementation for *
+ * every declaration.                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+PatchFaceDataOpsReal<TYPE>::PatchFaceDataOpsReal(
+   const PatchFaceDataOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void PatchFaceDataOpsReal<TYPE>::operator = (
+   const PatchFaceDataOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * General templated operations for real face-centered patch data.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void PatchFaceDataOpsReal<TYPE>::swapData(
+   tbox::Pointer<hier::Patch> patch,
+   const int data1_id,
+   const int data2_id) const
+{
+   TBOX_ASSERT(!patch.isNull());
+
+   tbox::Pointer<pdat::FaceData<TYPE> > d1 = patch->getPatchData(data1_id);
+   tbox::Pointer<pdat::FaceData<TYPE> > d2 = patch->getPatchData(data2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d1.isNull() && !d2.isNull());
+   TBOX_ASSERT(d1->getDepth() && d2->getDepth());
+   TBOX_ASSERT(d1->getBox() == d2->getBox());
+   TBOX_ASSERT(d1->getGhostBox() == d2->getGhostBox());
+#endif
+   patch->setPatchData(data1_id, d2);
+   patch->setPatchData(data2_id, d1);
+}
+
+template<class TYPE>
+void PatchFaceDataOpsReal<TYPE>::printData(
+   const tbox::Pointer<pdat::FaceData<TYPE> >& data,
+   const hier::Box& box,
+   std::ostream& s) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   s << "Data box = " << box << std::endl;
+   data->print(box, s);
+   s << "\n";
+}
+
+template<class TYPE>
+void PatchFaceDataOpsReal<TYPE>::copyData(
+   tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+   const tbox::Pointer<pdat::FaceData<TYPE> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(dst->getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box face_box = pdat::FaceGeometry::toFaceBox(box, d);
+      (dst->getArrayData(d)).copy(src->getArrayData(d), face_box);
+   }
+}
+
+template<class TYPE>
+void PatchFaceDataOpsReal<TYPE>::setToScalar(
+   tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+   const TYPE& alpha,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*dst, box);
+
+   dst->fillAll(alpha, box);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchFaceDataOpsReal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchFaceDataOpsReal.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations for real face-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchFaceDataOpsReal
+#define included_math_PatchFaceDataOpsReal
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/math/PatchFaceDataBasicOps.h"
+#include "SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h"
+#include "SAMRAI/math/PatchFaceDataNormOpsReal.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchFaceDataOpsReal provides a collection of operations
+ * to manipulate float and double numerical face-centered patch data.  The
+ * operations include basic arithmetic, norms and ordering, and assorted
+ * miscellaneous operations.  With the assertion of a few basic routines,
+ * this class inherits its interface (and thus its functionality) from the
+ * base classes PatchFaceDataBasicOps, PatchFaceDataNormOpsReal,
+ * and PatchFaceDataMiscellaneousOpsReal from which it is derived.  The
+ * name of each of these base classes is indicative of the set of
+ * face-centered patch data operations that it provides.
+ *
+ * Note that this templated class should only be used to instantiate
+ * objects with double or float as the template parameter.  A similar set of
+ * operations is implemented for complex and integer patch data in the classes
+ * PatchFaceDataOpsComplex and PatchFaceDataOpsInteger,
+ * repsectively.
+ *
+ * @see math::PatchFaceDataBasicOps
+ * @see math::PatchFaceDataMiscellaneousOpsReal
+ * @see math::PatchFaceDataNormOpsReal
+ */
+
+template<class TYPE>
+class PatchFaceDataOpsReal:
+   public tbox::DescribedClass,
+   public PatchFaceDataBasicOps<TYPE>,
+   public PatchFaceDataMiscellaneousOpsReal<TYPE>,
+   public PatchFaceDataNormOpsReal<TYPE>
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchFaceDataOpsReal();
+
+   virtual ~PatchFaceDataOpsReal<TYPE>() {}
+
+   /**
+    * Copy dst data to src data over given box.
+    */
+   void
+   copyData(
+      tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+      const tbox::Pointer<pdat::FaceData<TYPE> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Swap pointers for patch data objects.  Objects are checked for
+    * consistency of depth, box, and ghost box.
+    */
+   void
+   swapData(
+      tbox::Pointer<hier::Patch> patch,
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data entries over given box to given output stream.
+    */
+   void
+   printData(
+      const tbox::Pointer<pdat::FaceData<TYPE> >& data,
+      const hier::Box& box,
+      std::ostream& s = tbox::plog) const;
+
+   /**
+    * Initialize data to given scalar over given box.
+    */
+   void
+   setToScalar(
+      tbox::Pointer<pdat::FaceData<TYPE> >& dst,
+      const TYPE& alpha,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   PatchFaceDataOpsReal(
+      const PatchFaceDataOpsReal<TYPE>&);
+   void
+   operator = (
+      const PatchFaceDataOpsReal<TYPE>&);
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/PatchFaceDataOpsReal.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchNodeDataBasicOps.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchNodeDataBasicOps.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,270 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Basic templated node-centered patch data operations. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchNodeDataBasicOps_C
+#define included_math_PatchNodeDataBasicOps_C
+
+#include "SAMRAI/math/PatchNodeDataBasicOps.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/pdat/NodeGeometry.h"
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+PatchNodeDataBasicOps<TYPE>::PatchNodeDataBasicOps()
+{
+}
+
+template<class TYPE>
+PatchNodeDataBasicOps<TYPE>::~PatchNodeDataBasicOps()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The const constructor and assignment operator are not actually used   *
+ * but are defined here for compilers that require an implementation for *
+ * every declaration.                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+PatchNodeDataBasicOps<TYPE>::PatchNodeDataBasicOps(
+   const PatchNodeDataBasicOps<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void PatchNodeDataBasicOps<TYPE>::operator = (
+   const PatchNodeDataBasicOps<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Generic basic templated operations for node-centered patch data.      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void PatchNodeDataBasicOps<TYPE>::scale(
+   tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+   const TYPE& alpha,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   d_array_ops.scale(dst->getArrayData(),
+      alpha, src->getArrayData(),
+      node_box);
+}
+
+template<class TYPE>
+void PatchNodeDataBasicOps<TYPE>::addScalar(
+   tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& src,
+   const TYPE& alpha,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   d_array_ops.addScalar(dst->getArrayData(),
+      src->getArrayData(), alpha,
+      node_box);
+}
+
+template<class TYPE>
+void PatchNodeDataBasicOps<TYPE>::add(
+   tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& src1,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   d_array_ops.add(dst->getArrayData(),
+      src1->getArrayData(), src2->getArrayData(),
+      node_box);
+}
+
+template<class TYPE>
+void PatchNodeDataBasicOps<TYPE>::subtract(
+   tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& src1,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   d_array_ops.subtract(dst->getArrayData(),
+      src1->getArrayData(), src2->getArrayData(),
+      node_box);
+}
+
+template<class TYPE>
+void PatchNodeDataBasicOps<TYPE>::multiply(
+   tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& src1,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   d_array_ops.multiply(dst->getArrayData(),
+      src1->getArrayData(), src2->getArrayData(),
+      node_box);
+}
+
+template<class TYPE>
+void PatchNodeDataBasicOps<TYPE>::divide(
+   tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& src1,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   d_array_ops.divide(dst->getArrayData(),
+      src1->getArrayData(), src2->getArrayData(),
+      node_box);
+}
+
+template<class TYPE>
+void PatchNodeDataBasicOps<TYPE>::reciprocal(
+   tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   d_array_ops.reciprocal(dst->getArrayData(),
+      src->getArrayData(),
+      node_box);
+}
+
+template<class TYPE>
+void PatchNodeDataBasicOps<TYPE>::linearSum(
+   tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+   const TYPE& alpha,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& src1,
+   const TYPE& beta,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   d_array_ops.linearSum(dst->getArrayData(),
+      alpha, src1->getArrayData(),
+      beta, src2->getArrayData(),
+      node_box);
+}
+
+template<class TYPE>
+void PatchNodeDataBasicOps<TYPE>::axpy(
+   tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+   const TYPE& alpha,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& src1,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   d_array_ops.axpy(dst->getArrayData(),
+      alpha, src1->getArrayData(),
+      src2->getArrayData(),
+      node_box);
+}
+
+template<class TYPE>
+void PatchNodeDataBasicOps<TYPE>::axmy(
+   tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+   const TYPE& alpha,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& src1,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   d_array_ops.axmy(dst->getArrayData(),
+      alpha, src1->getArrayData(),
+      src2->getArrayData(),
+      node_box);
+}
+
+template<class TYPE>
+TYPE PatchNodeDataBasicOps<TYPE>::min(
+   const tbox::Pointer<pdat::NodeData<TYPE> >& data,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   return d_array_ops.min(data->getArrayData(), node_box);
+}
+
+template<class TYPE>
+TYPE PatchNodeDataBasicOps<TYPE>::max(
+   const tbox::Pointer<pdat::NodeData<TYPE> >& data,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   return d_array_ops.max(data->getArrayData(), node_box);
+}
+
+template<class TYPE>
+void PatchNodeDataBasicOps<TYPE>::setRandomValues(
+   tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+   const TYPE& width,
+   const TYPE& low,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*dst, box);
+
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   d_array_ops.setRandomValues(dst->getArrayData(),
+      width, low, node_box);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchNodeDataBasicOps.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchNodeDataBasicOps.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,210 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Basic templated node-centered patch data operations. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchNodeDataBasicOps
+#define included_math_PatchNodeDataBasicOps
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/math/ArrayDataBasicOps.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchNodeDataBasicOps provides access to a collection
+ * of basic numerical operations that may be applied to numerical node-
+ * centered patch data.   These operations include simple arithmetic
+ * operations as well as minand max, etc.  The primary intent of this
+ * class is to provide the interface to these standard operations for
+ * an PatchNodeDataOps<DIM> object which provides access to a complete set
+ * of operations that may be used to manipulate node-centered patch data
+ * objects.   Each member function accepts a box argument indicating the
+ * region of index space on which the operation should be performed.  The
+ * operation will be performed on the intersection of this box and those
+ * boxes corresponding to the patch data objects involved.
+ *
+ * These operations typically apply only to the numerical standard built-in
+ * types, such as double, float, and int, and the complex type (which may or
+ * may not be a built-in type depending on the C++ compiler).  Thus, this
+ * templated class should only be used to instantiate objects with those
+ * types as the template parameter.  None of the operations are implemented
+ * for any other type.
+ *
+ * @see math::ArrayDataBasicOps
+ */
+
+template<class TYPE>
+class PatchNodeDataBasicOps
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchNodeDataBasicOps();
+
+   virtual ~PatchNodeDataBasicOps<TYPE>();
+
+   /**
+    * Set dst = alpha * src, elementwise.
+    */
+   void
+   scale(
+      tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+      const TYPE& alpha,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src + alpha, elementwise.
+    */
+   void
+   addScalar(
+      tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& src,
+      const TYPE& alpha,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src1 + src2, elementwise.
+    */
+   void
+   add(
+      tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& src1,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src1 - src2, elementwise.
+    */
+   void
+   subtract(
+      tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& src1,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src1 * src2, elementwise.
+    */
+   void
+   multiply(
+      tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& src1,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src1 / src2, elementwise.  No check for division by zero.
+    */
+   void
+   divide(
+      tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& src1,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = 1 / src, elementwise.  No check for division by zero.
+    */
+   void
+   reciprocal(
+      tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = alpha * src1 + beta * src2, elementwise.
+    */
+   void
+   linearSum(
+      tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+      const TYPE& alpha,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& src1,
+      const TYPE& beta,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = alpha * src1 + src2, elementwise.
+    */
+   void
+   axpy(
+      tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+      const TYPE& alpha,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& src1,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = alpha * src1 - src2, elementwise.
+    */
+   void
+   axmy(
+      tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+      const TYPE& alpha,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& src1,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Return the minimum patch data component entry  When the data is
+    * complex, the result is the data element with the smallest norm.
+    */
+   TYPE
+   min(
+      const tbox::Pointer<pdat::NodeData<TYPE> >& data,
+      const hier::Box& box) const;
+
+   /**
+    * Return the maximum patch data component entry  When the data is
+    * complex, the result is the data element with the largest norm.
+    */
+   TYPE
+   max(
+      const tbox::Pointer<pdat::NodeData<TYPE> >& data,
+      const hier::Box& box) const;
+
+   /**
+    * Set patch data to random values.  See the operations in the
+    * ArrayDataBasicOps class for details on the generation
+    * of the random values for each data type.
+    */
+   void
+   setRandomValues(
+      tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+      const TYPE& width,
+      const TYPE& low,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   PatchNodeDataBasicOps(
+      const PatchNodeDataBasicOps<TYPE>&);
+   void
+   operator = (
+      const PatchNodeDataBasicOps<TYPE>&);
+
+   ArrayDataBasicOps<TYPE> d_array_ops;
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/PatchNodeDataBasicOps.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,177 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated miscellaneous operations for real node-centered data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchNodeDataMiscellaneousOpsReal_C
+#define included_math_PatchNodeDataMiscellaneousOpsReal_C
+
+#include "SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/pdat/NodeGeometry.h"
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+PatchNodeDataMiscellaneousOpsReal<TYPE>::PatchNodeDataMiscellaneousOpsReal()
+{
+}
+
+template<class TYPE>
+PatchNodeDataMiscellaneousOpsReal<TYPE>::~PatchNodeDataMiscellaneousOpsReal()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The const constructor and assignment operator are not actually used   *
+ * but are defined here for compilers that require an implementation for *
+ * every declaration.                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+PatchNodeDataMiscellaneousOpsReal<TYPE>::PatchNodeDataMiscellaneousOpsReal(
+   const PatchNodeDataMiscellaneousOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void PatchNodeDataMiscellaneousOpsReal<TYPE>::operator = (
+   const PatchNodeDataMiscellaneousOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Templated miscellaneous opertions for real node-centered data.        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+int PatchNodeDataMiscellaneousOpsReal<TYPE>::computeConstrProdPos(
+   const tbox::Pointer<pdat::NodeData<TYPE> >& data1,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& data2,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::NodeData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data1.isNull() && !data2.isNull());
+#endif
+   int retval;
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   if (cvol.isNull()) {
+      retval = d_array_ops.computeConstrProdPos(data1->getArrayData(),
+            data2->getArrayData(),
+            node_box);
+   } else {
+      retval = d_array_ops.computeConstrProdPosWithControlVolume(
+            data1->getArrayData(),
+            data2->getArrayData(),
+            cvol->getArrayData(),
+            node_box);
+   }
+   return retval;
+}
+
+template<class TYPE>
+void PatchNodeDataMiscellaneousOpsReal<TYPE>::compareToScalar(
+   tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& src,
+   const TYPE& alpha,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::NodeData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+#endif
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   if (cvol.isNull()) {
+      d_array_ops.compareToScalar(dst->getArrayData(),
+         src->getArrayData(),
+         alpha,
+         node_box);
+   } else {
+      d_array_ops.compareToScalarWithControlVolume(dst->getArrayData(),
+         src->getArrayData(),
+         alpha,
+         cvol->getArrayData(),
+         node_box);
+   }
+}
+
+template<class TYPE>
+int PatchNodeDataMiscellaneousOpsReal<TYPE>::testReciprocal(
+   tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& src,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::NodeData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+#endif
+   int retval;
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   if (cvol.isNull()) {
+      retval = d_array_ops.testReciprocal(dst->getArrayData(),
+            src->getArrayData(),
+            node_box);
+   } else {
+      retval = d_array_ops.testReciprocalWithControlVolume(
+            dst->getArrayData(),
+            src->getArrayData(),
+            cvol->getArrayData(),
+            node_box);
+   }
+   return retval;
+}
+
+template<class TYPE>
+TYPE PatchNodeDataMiscellaneousOpsReal<TYPE>::maxPointwiseDivide(
+   const tbox::Pointer<pdat::NodeData<TYPE> >& numer,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& denom,
+   const hier::Box& box) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!numer.isNull() && !denom.isNull());
+#endif
+   TYPE retval;
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   retval = d_array_ops.maxPointwiseDivide(numer->getArrayData(),
+         denom->getArrayData(),
+         node_box);
+   return retval;
+}
+
+template<class TYPE>
+TYPE PatchNodeDataMiscellaneousOpsReal<TYPE>::minPointwiseDivide(
+   const tbox::Pointer<pdat::NodeData<TYPE> >& numer,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& denom,
+   const hier::Box& box) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!numer.isNull() && !denom.isNull());
+#endif
+   TYPE retval;
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   retval = d_array_ops.minPointwiseDivide(numer->getArrayData(),
+         denom->getArrayData(),
+         node_box);
+   return retval;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,165 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated miscellaneous operations for real node-centered data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchNodeDataMiscellaneousOpsReal
+#define included_math_PatchNodeDataMiscellaneousOpsReal
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/math/ArrayDataMiscellaneousOpsReal.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchNodeDataMiscellaneousOpsReal provides access to a
+ * collection of operations that may be applied to numerical node-centered
+ * patch data of type double and float.  The primary intent of this class is
+ * to provide the interface to these operations for the class
+ * PatchNodeDataOpsReal which provides access to a more complete
+ * set of operations that may be used to manipulate node-centered
+ * patch data.  Each member function accepts a box argument
+ * indicating the region of index space on which the operation should be
+ * performed.  The operation will be performed on the intersection of this
+ * box and those boxes corresponding to the patch data objects.  Also, each
+ * operation allows an additional node-centered patch data object to be used
+ * to represent a control volume that weights the contribution of each data
+ * entry in the given norm calculation.  Note that the control volume patch
+ * data must be of type double and have node-centered geometry (i.e., the
+ * same as the data itself).  The use of control volumes is important when
+ * these operations are used in vector kernels where the data resides over
+ * multiple levels of spatial resolution in an AMR hierarchy.  If the control
+ * volume is not given in the function call, it will be ignored in the
+ * calculation.  Also, note that the depth of the control volume patch data
+ * object must be either 1 or be equal to the depth of the other data objects.
+ *
+ * Since these operations are used only by the vector kernels for the KINSOL
+ * and CVODE solver packages at this time, they are intended to be instantiated
+ * for the standard built-in types double and float (since those solvers only
+ * treat double and float data).  To extend this class to other data types or
+ * to include other operations, the member functions must be specialized or the
+ * new operations must be added.
+ *
+ * @see math::ArrayDataMiscellaneousOpsReal
+ */
+
+template<class TYPE>
+class PatchNodeDataMiscellaneousOpsReal
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchNodeDataMiscellaneousOpsReal();
+
+   virtual ~PatchNodeDataMiscellaneousOpsReal<TYPE>();
+
+   /**
+    * Return 1 if \f$\|data2_i\| > 0\f$ and \f$data1_i * data2_i \leq 0\f$, for
+    * any \f$i\f$ in the index region, where \f$cvol_i > 0\f$.  Otherwise return 0.
+    * If the control volume is NULL, all values in the index set are used.
+    */
+   int
+   computeConstrProdPos(
+      const tbox::Pointer<pdat::NodeData<TYPE> >& data1,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& data2,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::NodeData<double> > cvol =
+         tbox::Pointer<pdat::NodeData<double> >(NULL)) const;
+
+   /**
+    * Wherever \f$cvol_i > 0\f$ in the index region, set \f$dst_i = 1\f$
+    * if \f$\|src_i\| > \alpha\f$, and \f$dst_i = 0\f$ otherwise.  If the control
+    * volume is NULL, all values in the index set are considered.
+    */
+   void
+   compareToScalar(
+      tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& src,
+      const TYPE& alpha,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::NodeData<double> > cvol =
+         tbox::Pointer<pdat::NodeData<double> >(NULL)) const;
+
+   /**
+    * Wherever \f$cvol_i > 0\f$ in the index region, set \f$dst_i = 1/src_i\f$ if
+    * \f$src_i \neq 0\f$, and \f$dst_i = 0\f$ otherwise.  If \f$dst_i = 0\f$ anywhere,
+    * 0 is the return value.  Otherwise 1 is returned.  If the control volume
+    * all values in the index set are considered.
+    */
+   int
+   testReciprocal(
+      tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& src,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::NodeData<double> > cvol =
+         tbox::Pointer<pdat::NodeData<double> >(NULL)) const;
+
+   /*!
+    * @brief Compute max of "conditional" quotients of two arrays.
+    *
+    * Return the maximum of pointwise "conditional" quotients of the numerator
+    * and denominator.
+    *
+    * The "conditional" quotient is defined as |numerator/denominator|
+    * where the denominator is nonzero.  Otherwise, it is defined as
+    * |numerator|.
+    *
+    * @b Note: This method is currently intended to support the
+    * PETSc-2.1.6 vector wrapper only.  Please do not use it!
+    */
+   TYPE
+   maxPointwiseDivide(
+      const tbox::Pointer<pdat::NodeData<TYPE> >& numer,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& denom,
+      const hier::Box& box) const;
+
+   /*!
+    * @brief Compute min of quotients of two arrays.
+    *
+    * Return the minimum of pointwise quotients of the numerator
+    * and denominator.
+    *
+    * The quotient is defined as (numerator/denominator)
+    * where the denominator is nonzero.  When the denominator is zero, the
+    * entry is skipped.  If the denominator is always zero, the value of
+    * tbox::IEEE::getFLT_MAX() is returned (see @ref SAMRAI::tbox::IEEE).
+    *
+    * @b Note: This method is currently intended to support the
+    * SUNDIALS vector wrapper only.  Please do not use it!
+    */
+   TYPE
+   minPointwiseDivide(
+      const tbox::Pointer<pdat::NodeData<TYPE> >& numer,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& denom,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   PatchNodeDataMiscellaneousOpsReal(
+      const PatchNodeDataMiscellaneousOpsReal<TYPE>&);
+   void
+   operator = (
+      const PatchNodeDataMiscellaneousOpsReal<TYPE>&);
+
+   ArrayDataMiscellaneousOpsReal<TYPE> d_array_ops;
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchNodeDataNormOpsComplex.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchNodeDataNormOpsComplex.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,260 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Norm operations for complex node-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchNodeDataNormOpsComplex_C
+#define included_math_PatchNodeDataNormOpsComplex_C
+
+#include "SAMRAI/math/PatchNodeDataNormOpsComplex.h"
+#include "SAMRAI/pdat/NodeGeometry.h"
+#ifdef DEBUG_CHECK_ASSERTIONS
+#include "SAMRAI/tbox/Utilities.h"
+#endif
+
+namespace SAMRAI {
+namespace math {
+
+PatchNodeDataNormOpsComplex::PatchNodeDataNormOpsComplex()
+{
+}
+
+PatchNodeDataNormOpsComplex::~PatchNodeDataNormOpsComplex()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute the number of data entries on a patch in the given box.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int PatchNodeDataNormOpsComplex::numberOfEntries(
+   const tbox::Pointer<pdat::NodeData<dcomplex> >& data,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const hier::Box ibox =
+      pdat::NodeGeometry::toNodeBox(box * data->getGhostBox());
+   int retval = ibox.size() * data->getDepth();
+   return retval;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Norm operations for complex node-centered data.                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double PatchNodeDataNormOpsComplex::sumControlVolumes(
+   const tbox::Pointer<pdat::NodeData<dcomplex> >& data,
+   const tbox::Pointer<pdat::NodeData<double> >& cvol,
+   const hier::Box& box) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull() && !cvol.isNull());
+#endif
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   return d_array_ops.sumControlVolumes(data->getArrayData(),
+      cvol->getArrayData(),
+      node_box);
+}
+
+void PatchNodeDataNormOpsComplex::abs(
+   tbox::Pointer<pdat::NodeData<double> >& dst,
+   const tbox::Pointer<pdat::NodeData<dcomplex> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   d_array_ops.abs(dst->getArrayData(),
+      src->getArrayData(),
+      node_box);
+}
+
+double PatchNodeDataNormOpsComplex::L1Norm(
+   const tbox::Pointer<pdat::NodeData<dcomplex> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::NodeData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   double retval;
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   if (cvol.isNull()) {
+      retval = d_array_ops.L1Norm(data->getArrayData(), node_box);
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      retval = d_array_ops.L1NormWithControlVolume(data->getArrayData(),
+            cvol->getArrayData(),
+            node_box);
+   }
+   return retval;
+}
+
+double PatchNodeDataNormOpsComplex::L2Norm(
+   const tbox::Pointer<pdat::NodeData<dcomplex> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::NodeData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   double retval;
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   if (cvol.isNull()) {
+      retval = d_array_ops.L2Norm(data->getArrayData(), node_box);
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      retval = d_array_ops.L2NormWithControlVolume(data->getArrayData(),
+            cvol->getArrayData(),
+            node_box);
+   }
+   return retval;
+}
+
+double PatchNodeDataNormOpsComplex::weightedL2Norm(
+   const tbox::Pointer<pdat::NodeData<dcomplex> >& data,
+   const tbox::Pointer<pdat::NodeData<dcomplex> >& weight,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::NodeData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull() && !weight.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*data, *weight, box);
+
+   double retval;
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   if (cvol.isNull()) {
+      retval = d_array_ops.weightedL2Norm(data->getArrayData(),
+            weight->getArrayData(),
+            node_box);
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      retval = d_array_ops.weightedL2NormWithControlVolume(
+            data->getArrayData(),
+            weight->getArrayData(),
+            cvol->getArrayData(),
+            node_box);
+   }
+   return retval;
+}
+
+double PatchNodeDataNormOpsComplex::RMSNorm(
+   const tbox::Pointer<pdat::NodeData<dcomplex> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::NodeData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   double retval = L2Norm(data, box, cvol);
+   if (cvol.isNull()) {
+      retval /= sqrt((double)numberOfEntries(data, box));
+   } else {
+      retval /= sqrt(sumControlVolumes(data, cvol, box));
+   }
+   return retval;
+}
+
+double PatchNodeDataNormOpsComplex::weightedRMSNorm(
+   const tbox::Pointer<pdat::NodeData<dcomplex> >& data,
+   const tbox::Pointer<pdat::NodeData<dcomplex> >& weight,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::NodeData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull() && !weight.isNull());
+#endif
+   double retval = weightedL2Norm(data, weight, box, cvol);
+   if (cvol.isNull()) {
+      retval /= sqrt((double)numberOfEntries(data, box));
+   } else {
+      retval /= sqrt(sumControlVolumes(data, cvol, box));
+   }
+   return retval;
+}
+
+double PatchNodeDataNormOpsComplex::maxNorm(
+   const tbox::Pointer<pdat::NodeData<dcomplex> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::NodeData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   double retval;
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   if (cvol.isNull()) {
+      retval = d_array_ops.maxNorm(data->getArrayData(), node_box);
+   } else {
+      retval = d_array_ops.maxNormWithControlVolume(data->getArrayData(),
+            cvol->getArrayData(),
+            node_box);
+   }
+   return retval;
+}
+
+dcomplex PatchNodeDataNormOpsComplex::dot(
+   const tbox::Pointer<pdat::NodeData<dcomplex> >& data1,
+   const tbox::Pointer<pdat::NodeData<dcomplex> >& data2,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::NodeData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data1.isNull() && !data2.isNull());
+#endif
+   dcomplex retval;
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   if (cvol.isNull()) {
+      retval = d_array_ops.dot(data1->getArrayData(),
+            data2->getArrayData(),
+            node_box);
+   } else {
+      retval = d_array_ops.dotWithControlVolume(
+            data1->getArrayData(),
+            data2->getArrayData(),
+            cvol->getArrayData(),
+            node_box);
+   }
+   return retval;
+}
+
+dcomplex PatchNodeDataNormOpsComplex::integral(
+   const tbox::Pointer<pdat::NodeData<dcomplex> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::NodeData<double> > vol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   dcomplex retval;
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+
+   retval = d_array_ops.integral(
+         data->getArrayData(),
+         vol->getArrayData(),
+         node_box);
+
+   return retval;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchNodeDataNormOpsComplex.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchNodeDataNormOpsComplex.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,217 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Norm operations for complex node-centered data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchNodeDataNormOpsComplex
+#define included_math_PatchNodeDataNormOpsComplex
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/math/ArrayDataNormOpsComplex.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchNodeDataNormOpsComplex provides a collection of common
+ * norm operations that may be applied to complex node-centered patch data.
+ * The primary intent of this class is to define part of the interface for the
+ * PatchNodeDataOpsComplex class which provides access to operations
+ * that may be used to manipulate complex node-centered patch data.  Each
+ * member function accepts a box argument indicating the region of index space
+ * on which the operation should be performed.  The operation will be performed
+ * on the intersection of this box and those boxes corresponding to the patch
+ * data objects.  Also, each operation allows an additional node-centered
+ * patch data object to be used to represent a control volume that weights the
+ * contribution of each data entry in the given norm calculation.  Note that
+ * the control volume patch data must be of type double and have node-centered
+ * geometry (i.e., the same as the data itself).  The use of control volumes
+ * is important when these operations are used in vector kernels where the
+ * data resides over multiple levels of spatial resolution in an AMR hierarchy.
+ * If the control volume is not given in the function call, it will be ignored
+ * in the calculation.  Also, note that the depth of the control volume patch
+ * data object must be either 1 or be equal to the depth of the other data
+ * objects.
+ *
+ * Note that a similar set of norm operations is implemented for real
+ * patch data (double and float) in the class PatchNodeDataNormOpsReal.
+ *
+ * @see math::ArrayDataNormOpsComplex
+ */
+
+class PatchNodeDataNormOpsComplex
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchNodeDataNormOpsComplex();
+
+   virtual ~PatchNodeDataNormOpsComplex();
+
+   /**
+    * Return the number of data values for the node-centered data object
+    * in the given box.  Note that it is assumed that the box refers to
+    * the cell-centered index space corresponding to the patch hierarchy.
+    */
+   int
+   numberOfEntries(
+      const tbox::Pointer<pdat::NodeData<dcomplex> >& data,
+      const hier::Box& box) const;
+
+   /**
+    * Return sum of control volume entries for the node-centered data object.
+    */
+   double
+   sumControlVolumes(
+      const tbox::Pointer<pdat::NodeData<dcomplex> >& data,
+      const tbox::Pointer<pdat::NodeData<double> >& cvol,
+      const hier::Box& box) const;
+
+   /**
+    * Set destination component to norm of source component.  That is,
+    * each destination entry is set to
+    * \f$d_i = \sqrt{ {real(s_i)}^2 + {imag(s_i)}^2 }\f$.
+    */
+   void
+   abs(
+      tbox::Pointer<pdat::NodeData<double> >& dst,
+      const tbox::Pointer<pdat::NodeData<dcomplex> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Return discrete \f$L_1\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( \sqrt{data_i * \bar{data_i}}*cvol_i )\f$.
+    * If the control volume is NULL, the return value is
+    * \f$\sum_i ( \sqrt{data_i * \bar{data_i}} )\f$.
+    */
+   double
+   L1Norm(
+      const tbox::Pointer<pdat::NodeData<dcomplex> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::NodeData<double> > cvol =
+         tbox::Pointer<pdat::NodeData<double> >(NULL)) const;
+
+   /**
+    * Return discrete \f$L_2\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum
+    * \f$\sqrt{ \sum_i ( data_i * \bar{data_i} cvol_i ) }\f$.
+    * If the control volume is NULL, the return value is
+    * \f$\sqrt{ \sum_i ( data_i * \bar{data_i} ) }\f$.
+    */
+   double
+   L2Norm(
+      const tbox::Pointer<pdat::NodeData<dcomplex> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::NodeData<double> > cvol =
+         tbox::Pointer<pdat::NodeData<double> >(NULL)) const;
+
+   /**
+    * Return discrete weighted \f$L_2\f$-norm of the data using the control
+    * volume to weight the contribution of the data and weight entries to
+    * the sum.  That is, the return value is the sum \f$\sqrt{ \sum_i (
+    * (data_i * wgt_i) * \bar{(data_i * wgt_i)} cvol_i ) }\f$.  If the control
+    * volume is NULL, the return value is
+    * \f$\sqrt{ \sum_i ( (data_i * wgt_i) * \bar{(data_i * wgt_i)} cvol_i ) }\f$.
+    */
+   double
+   weightedL2Norm(
+      const tbox::Pointer<pdat::NodeData<dcomplex> >& data,
+      const tbox::Pointer<pdat::NodeData<dcomplex> >& weight,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::NodeData<double> > cvol =
+         tbox::Pointer<pdat::NodeData<double> >(NULL)) const;
+
+   /**
+    * Return discrete root mean squared norm of the data.  If the control
+    * volume is not NULL, the return value is the \f$L_2\f$-norm divided by
+    * the square root of the sum of the control volumes.  Otherwise, the
+    * return value is the \f$L_2\f$-norm divided by the square root of the
+    * number of data entries.
+    */
+   double
+   RMSNorm(
+      const tbox::Pointer<pdat::NodeData<dcomplex> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::NodeData<double> > cvol =
+         tbox::Pointer<pdat::NodeData<double> >(NULL)) const;
+
+   /**
+    * Return discrete weighted root mean squared norm of the data.  If the
+    * control volume is not NULL, the return value is the weighted \f$L_2\f$-norm
+    * divided by the square root of the sum of the control volumes.  Otherwise,
+    * the return value is the weighted \f$L_2\f$-norm divided by the square root
+    * of the number of data entries.
+    */
+   double
+   weightedRMSNorm(
+      const tbox::Pointer<pdat::NodeData<dcomplex> >& data,
+      const tbox::Pointer<pdat::NodeData<dcomplex> >& weight,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::NodeData<double> > cvol =
+         tbox::Pointer<pdat::NodeData<double> >(NULL)) const;
+
+   /**
+    * Return the \f$\max\f$-norm of the data using the control volume to weight
+    * the contribution of each data entry to the maximum.  That is, the return
+    * value is \f$\max_i ( \sqrt{data_i * \bar{data_i}} )\f$, where the max is
+    * over the data elements where \f$cvol_i > 0\f$.  If the control volume is
+    * NULL, it is ignored during the computation of the maximum.
+    */
+   double
+   maxNorm(
+      const tbox::Pointer<pdat::NodeData<dcomplex> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::NodeData<double> > cvol =
+         tbox::Pointer<pdat::NodeData<double> >(NULL)) const;
+
+   /**
+    * Return the dot product of the two data arrays using the control volume
+    * to weight the contribution of each product to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( data1_i * \bar{data2_i} * cvol_i )\f$.
+    * If the control volume is NULL, it is ignored during the summation.
+    */
+   dcomplex
+   dot(
+      const tbox::Pointer<pdat::NodeData<dcomplex> >& data1,
+      const tbox::Pointer<pdat::NodeData<dcomplex> >& data2,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::NodeData<double> > cvol =
+         tbox::Pointer<pdat::NodeData<double> >(NULL)) const;
+
+   /**
+    * Return the integral of the function represented by the data array.
+    * The return value is the sum \f$\sum_i ( data_i * vol_i )\f$.
+    */
+   dcomplex
+   integral(
+      const tbox::Pointer<pdat::NodeData<dcomplex> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::NodeData<double> > vol) const;
+
+private:
+   // The following are not implemented:
+   PatchNodeDataNormOpsComplex(
+      const PatchNodeDataNormOpsComplex&);
+   void
+   operator = (
+      const PatchNodeDataNormOpsComplex&);
+
+   ArrayDataNormOpsComplex d_array_ops;
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchNodeDataNormOpsReal.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchNodeDataNormOpsReal.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,295 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated norm operations for real node-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchNodeDataNormOpsReal_C
+#define included_math_PatchNodeDataNormOpsReal_C
+
+#include "SAMRAI/math/PatchNodeDataNormOpsReal.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/pdat/NodeGeometry.h"
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+PatchNodeDataNormOpsReal<TYPE>::PatchNodeDataNormOpsReal()
+{
+}
+
+template<class TYPE>
+PatchNodeDataNormOpsReal<TYPE>::~PatchNodeDataNormOpsReal()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The const constructor and assignment operator are not actually used   *
+ * but are defined here for compilers that require an implementation for *
+ * every declaration.                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+PatchNodeDataNormOpsReal<TYPE>::PatchNodeDataNormOpsReal(
+   const PatchNodeDataNormOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void PatchNodeDataNormOpsReal<TYPE>::operator = (
+   const PatchNodeDataNormOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute the number of data entries on a patch in the given box.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+int PatchNodeDataNormOpsReal<TYPE>::numberOfEntries(
+   const tbox::Pointer<pdat::NodeData<TYPE> >& data,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const hier::Box ibox =
+      pdat::NodeGeometry::toNodeBox(box * data->getGhostBox());
+   int retval = ibox.size() * data->getDepth();
+   return retval;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Templated norm operations for real node-centered data.                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+double PatchNodeDataNormOpsReal<TYPE>::sumControlVolumes(
+   const tbox::Pointer<pdat::NodeData<TYPE> >& data,
+   const tbox::Pointer<pdat::NodeData<double> >& cvol,
+   const hier::Box& box) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull() && !cvol.isNull());
+#endif
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   return d_array_ops.sumControlVolumes(data->getArrayData(),
+      cvol->getArrayData(),
+      node_box);
+}
+
+template<class TYPE>
+void PatchNodeDataNormOpsReal<TYPE>::abs(
+   tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   d_array_ops.abs(dst->getArrayData(),
+      src->getArrayData(),
+      node_box);
+}
+
+template<class TYPE>
+double PatchNodeDataNormOpsReal<TYPE>::L1Norm(
+   const tbox::Pointer<pdat::NodeData<TYPE> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::NodeData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   double retval;
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   if (cvol.isNull()) {
+      retval = d_array_ops.L1Norm(data->getArrayData(), node_box);
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      retval = d_array_ops.L1NormWithControlVolume(data->getArrayData(),
+            cvol->getArrayData(),
+            node_box);
+   }
+   return retval;
+}
+
+template<class TYPE>
+double PatchNodeDataNormOpsReal<TYPE>::L2Norm(
+   const tbox::Pointer<pdat::NodeData<TYPE> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::NodeData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   double retval;
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   if (cvol.isNull()) {
+      retval = d_array_ops.L2Norm(data->getArrayData(), node_box);
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      retval = d_array_ops.L2NormWithControlVolume(data->getArrayData(),
+            cvol->getArrayData(),
+            node_box);
+   }
+   return retval;
+}
+
+template<class TYPE>
+double PatchNodeDataNormOpsReal<TYPE>::weightedL2Norm(
+   const tbox::Pointer<pdat::NodeData<TYPE> >& data,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& weight,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::NodeData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull() && !weight.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*data, *weight, box);
+
+   double retval;
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   if (cvol.isNull()) {
+      retval = d_array_ops.weightedL2Norm(data->getArrayData(),
+            weight->getArrayData(),
+            node_box);
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      retval = d_array_ops.weightedL2NormWithControlVolume(
+            data->getArrayData(),
+            weight->getArrayData(),
+            cvol->getArrayData(),
+            node_box);
+   }
+   return retval;
+}
+
+template<class TYPE>
+double PatchNodeDataNormOpsReal<TYPE>::RMSNorm(
+   const tbox::Pointer<pdat::NodeData<TYPE> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::NodeData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   double retval = L2Norm(data, box, cvol);
+   if (cvol.isNull()) {
+      retval /= sqrt((double)numberOfEntries(data, box));
+   } else {
+      retval /= sqrt(sumControlVolumes(data, cvol, box));
+   }
+   return retval;
+}
+
+template<class TYPE>
+double PatchNodeDataNormOpsReal<TYPE>::weightedRMSNorm(
+   const tbox::Pointer<pdat::NodeData<TYPE> >& data,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& weight,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::NodeData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull() && !weight.isNull());
+#endif
+   double retval = weightedL2Norm(data, weight, box, cvol);
+   if (cvol.isNull()) {
+      retval /= sqrt((double)numberOfEntries(data, box));
+   } else {
+      retval /= sqrt(sumControlVolumes(data, cvol, box));
+   }
+   return retval;
+}
+
+template<class TYPE>
+double PatchNodeDataNormOpsReal<TYPE>::maxNorm(
+   const tbox::Pointer<pdat::NodeData<TYPE> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::NodeData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   double retval;
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   if (cvol.isNull()) {
+      retval = d_array_ops.maxNorm(data->getArrayData(), node_box);
+   } else {
+      retval = d_array_ops.maxNormWithControlVolume(data->getArrayData(),
+            cvol->getArrayData(),
+            node_box);
+   }
+   return retval;
+}
+
+template<class TYPE>
+TYPE PatchNodeDataNormOpsReal<TYPE>::dot(
+   const tbox::Pointer<pdat::NodeData<TYPE> >& data1,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& data2,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::NodeData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data1.isNull() && !data2.isNull());
+#endif
+   TYPE retval;
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   if (cvol.isNull()) {
+      retval = d_array_ops.dot(data1->getArrayData(),
+            data2->getArrayData(),
+            node_box);
+   } else {
+      retval = d_array_ops.dotWithControlVolume(
+            data1->getArrayData(),
+            data2->getArrayData(),
+            cvol->getArrayData(),
+            node_box);
+   }
+   return retval;
+}
+
+template<class TYPE>
+TYPE PatchNodeDataNormOpsReal<TYPE>::integral(
+   const tbox::Pointer<pdat::NodeData<TYPE> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::NodeData<double> > vol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   TYPE retval;
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+
+   retval = d_array_ops.integral(
+         data->getArrayData(),
+         vol->getArrayData(),
+         node_box);
+
+   return retval;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchNodeDataNormOpsReal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchNodeDataNormOpsReal.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,223 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated norm operations for real node-centered data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchNodeDataNormOpsReal
+#define included_math_PatchNodeDataNormOpsReal
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/math/ArrayDataNormOpsReal.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchNodeDataNormOpsReal provides a collection of common
+ * norm operations that may be applied to real (double or float)
+ * numerical node-centered patch data.  The primary intent of this class is
+ * to define part of the interface for an PatchNodeDataOpsReal object
+ * which provides access operations that may be used to manipulate
+ * node-centered patch data.  Each member function accepts a box argument
+ * indicating the region of index space on which the operation should be
+ * performed.  The operation will be performed on the intersection of this
+ * box and those boxes corresponding to the patch data objects.  Also, each
+ * operation allows an additional node-centered patch data object to be used
+ * to represent a control volume that weights the contribution of each data
+ * entry in the given norm calculation.  Note that the control volume patch
+ * data must be of type double and have node-centered geometry (i.e., the
+ * same as the data itself).  The use of control volumes is important when
+ * these operations are used in vector kernels where the data resides over
+ * multiple levels of spatial resolution in an AMR hierarchy.  If the control
+ * volume is not given in the function call, it will be ignored in the
+ * calculation.  Also, note that the depth of the control volume patch data
+ * object must be either 1 or be equal to the depth of the other data objects.
+ *
+ * These operations typically apply only to the numerical standard built-in
+ * types, such as double, float, and the complex type (which may or may not
+ * be a built-in type depending on the C++ compiler).  This templated
+ * class should only be used to instantiate objects with double or float as
+ * the template parameter.  Note that a similar set of norm operations is
+ * implemented for complex patch data in the class
+ * PatchNodeDataNormOpsComplex.
+ *
+ * @see math::ArrayDataNormOpsReal
+ */
+
+template<class TYPE>
+class PatchNodeDataNormOpsReal
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchNodeDataNormOpsReal();
+
+   virtual ~PatchNodeDataNormOpsReal<TYPE>();
+
+   /**
+    * Return the number of data values for the node-centered data object
+    * in the given box.  Note that it is assumed that the box refers to
+    * the cell-centered index space corresponding to the patch hierarchy.
+    */
+   int
+   numberOfEntries(
+      const tbox::Pointer<pdat::NodeData<TYPE> >& data,
+      const hier::Box& box) const;
+
+   /**
+    * Return sum of control volume entries for the node-centered data object.
+    */
+   double
+   sumControlVolumes(
+      const tbox::Pointer<pdat::NodeData<TYPE> >& data,
+      const tbox::Pointer<pdat::NodeData<double> >& cvol,
+      const hier::Box& box) const;
+
+   /**
+    * Set destination component to absolute value of source component.
+    * That is, each destination entry is set to \f$d_i = \| s_i \|\f$.
+    */
+   void
+   abs(
+      tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Return discrete \f$L_1\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( \| data_i \| cvol_i )\f$.  If the
+    * control volume is NULL, the return value is \f$\sum_i ( \| data_i \| )\f$.
+    */
+   double
+   L1Norm(
+      const tbox::Pointer<pdat::NodeData<TYPE> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::NodeData<double> > cvol =
+         tbox::Pointer<pdat::NodeData<double> >(NULL)) const;
+
+   /**
+    * Return discrete \f$L_2\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sqrt{ \sum_i ( (data_i)^2 cvol_i ) }\f$.
+    * If the control volume is NULL, the return value is
+    * \f$\sqrt{ \sum_i ( (data_i)^2 cvol_i ) }\f$.
+    */
+   double
+   L2Norm(
+      const tbox::Pointer<pdat::NodeData<TYPE> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::NodeData<double> > cvol =
+         tbox::Pointer<pdat::NodeData<double> >(NULL)) const;
+
+   /**
+    * Return discrete weighted \f$L_2\f$-norm of the data using the control
+    * volume to weight the contribution of the data and weight entries to
+    * the sum.  That is, the return value is the sum \f$\sqrt{ \sum_i (
+    * (data_i * weight_i)^2 cvol_i ) }\f$.  If the control volume is NULL,
+    * the return value is \f$\sqrt{ \sum_i ( (data_i * weight_i)^2 ) }\f$.
+    */
+   double
+   weightedL2Norm(
+      const tbox::Pointer<pdat::NodeData<TYPE> >& data,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& weight,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::NodeData<double> > cvol =
+         tbox::Pointer<pdat::NodeData<double> >(NULL)) const;
+
+   /**
+    * Return discrete root mean squared norm of the data.  If the control
+    * volume is not NULL, the return value is the \f$L_2\f$-norm divided by
+    * the square root of the sum of the control volumes.  Otherwise, the
+    * return value is the \f$L_2\f$-norm divided by the square root of the
+    * number of data entries.
+    */
+   double
+   RMSNorm(
+      const tbox::Pointer<pdat::NodeData<TYPE> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::NodeData<double> > cvol =
+         tbox::Pointer<pdat::NodeData<double> >(NULL)) const;
+
+   /**
+    * Return discrete weighted root mean squared norm of the data.  If the
+    * control volume is not NULL, the return value is the weighted \f$L_2\f$-norm
+    * divided by the square root of the sum of the control volumes.  Otherwise,
+    * the return value is the weighted \f$L_2\f$-norm divided by the square root
+    * of the number of data entries.
+    */
+   double
+   weightedRMSNorm(
+      const tbox::Pointer<pdat::NodeData<TYPE> >& data,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& weight,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::NodeData<double> > cvol =
+         tbox::Pointer<pdat::NodeData<double> >(NULL)) const;
+
+   /**
+    * Return the \f$\max\f$-norm of the data using the control volume to weight
+    * the contribution of each data entry to the maximum.  That is, the return
+    * value is \f$\max_i ( \| data_i \| )\f$, where the max is over the data
+    * elements where \f$cvol_i > 0\f$.  If the control volume is NULL, it is
+    * ignored during the computation of the maximum.
+    */
+   double
+   maxNorm(
+      const tbox::Pointer<pdat::NodeData<TYPE> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::NodeData<double> > cvol =
+         tbox::Pointer<pdat::NodeData<double> >(NULL)) const;
+
+   /**
+    * Return the dot product of the two data arrays using the control volume
+    * to weight the contribution of each product to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( data1_i * data2_i * cvol_i )\f$.
+    * If the control volume is NULL, it is ignored during the summation.
+    */
+   TYPE
+   dot(
+      const tbox::Pointer<pdat::NodeData<TYPE> >& data1,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& data2,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::NodeData<double> > cvol =
+         tbox::Pointer<pdat::NodeData<double> >(NULL)) const;
+
+   /**
+    * Return the integral of the function represented by the data array.
+    * The return value is the sum \f$\sum_i ( data_i * vol_i )\f$.
+    */
+   TYPE
+   integral(
+      const tbox::Pointer<pdat::NodeData<TYPE> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::NodeData<double> > vol) const;
+
+private:
+   // The following are not implemented:
+   PatchNodeDataNormOpsReal(
+      const PatchNodeDataNormOpsReal<TYPE>&);
+   void
+   operator = (
+      const PatchNodeDataNormOpsReal<TYPE>&);
+
+   ArrayDataNormOpsReal<TYPE> d_array_ops;
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/PatchNodeDataNormOpsReal.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchNodeDataOpsComplex.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchNodeDataOpsComplex.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,96 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for complex node-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchNodeDataOpsComplex_C
+#define included_math_PatchNodeDataOpsComplex_C
+
+#include "SAMRAI/math/PatchNodeDataOpsComplex.h"
+#include "SAMRAI/pdat/NodeGeometry.h"
+#ifdef DEBUG_CHECK_ASSERTIONS
+#include "SAMRAI/tbox/Utilities.h"
+#endif
+
+namespace SAMRAI {
+namespace math {
+
+PatchNodeDataOpsComplex::PatchNodeDataOpsComplex()
+{
+}
+
+PatchNodeDataOpsComplex::~PatchNodeDataOpsComplex()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * General operations for complex node-centered patch data.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchNodeDataOpsComplex::swapData(
+   tbox::Pointer<hier::Patch> patch,
+   const int data1_id,
+   const int data2_id) const
+{
+   TBOX_ASSERT(!patch.isNull());
+
+   tbox::Pointer<pdat::NodeData<dcomplex> > d1 = patch->getPatchData(data1_id);
+   tbox::Pointer<pdat::NodeData<dcomplex> > d2 = patch->getPatchData(data2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d1.isNull() && !d2.isNull());
+   TBOX_ASSERT(d1->getDepth() && d2->getDepth());
+   TBOX_ASSERT(d1->getBox() == d2->getBox());
+   TBOX_ASSERT(d1->getGhostBox() == d2->getGhostBox());
+#endif
+   patch->setPatchData(data1_id, d2);
+   patch->setPatchData(data2_id, d1);
+}
+
+void PatchNodeDataOpsComplex::printData(
+   const tbox::Pointer<pdat::NodeData<dcomplex> >& data,
+   const hier::Box& box,
+   std::ostream& s) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   s << "Data box = " << box << std::endl;
+   data->print(box, s);
+   s << "\n";
+}
+
+void PatchNodeDataOpsComplex::copyData(
+   tbox::Pointer<pdat::NodeData<dcomplex> >& dst,
+   const tbox::Pointer<pdat::NodeData<dcomplex> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   (dst->getArrayData()).copy(src->getArrayData(), node_box);
+}
+
+void PatchNodeDataOpsComplex::setToScalar(
+   tbox::Pointer<pdat::NodeData<dcomplex> >& dst,
+   const dcomplex& alpha,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*dst, box);
+
+   dst->fillAll(alpha, box);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchNodeDataOpsComplex.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchNodeDataOpsComplex.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for complex node-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchNodeDataOpsComplex
+#define included_math_PatchNodeDataOpsComplex
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/math/PatchNodeDataBasicOps.h"
+#include "SAMRAI/math/PatchNodeDataNormOpsComplex.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchNodeDataOpsComplex provides a collection of operations
+ * that may be used to manipulate complex node-centered patch data.  The
+ * operations include basic arithmetic and norms.  With the
+ * assertion of a few basic routines, this class inherits its interface (and
+ * thus its functionality) from the base classes PatchNodeDataBasicOps,
+ * PatchNodeDataNormOpsComplex from which it is derived.  The
+ * name of each of these base classes is indicative of the set of
+ * node-centered patch data operations that it provides.
+ *
+ * A similar set of operations is implemented for real (double and float) and
+ * integer patch data in the classes PatchNodeDataOpsReal and
+ * PatchNodeDataOpsInteger, repsectively.
+ *
+ * @see math::PatchNodeDataBasicOps
+ * @see math::PatchNodeDataNormOpsComplex
+ */
+
+class PatchNodeDataOpsComplex:
+   public tbox::DescribedClass,
+   public PatchNodeDataBasicOps<dcomplex>,
+   public PatchNodeDataNormOpsComplex
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchNodeDataOpsComplex();
+
+   virtual ~PatchNodeDataOpsComplex();
+
+   /**
+    * Copy dst data to src data over given box.
+    */
+   void
+   copyData(
+      tbox::Pointer<pdat::NodeData<dcomplex> >& dst,
+      const tbox::Pointer<pdat::NodeData<dcomplex> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Swap pointers for patch data objects.  Objects are checked for
+    * consistency of depth, box, and ghost box.
+    */
+   void
+   swapData(
+      tbox::Pointer<hier::Patch> patch,
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data entries over given box to given output stream.
+    */
+   void
+   printData(
+      const tbox::Pointer<pdat::NodeData<dcomplex> >& data,
+      const hier::Box& box,
+      std::ostream& s = tbox::plog) const;
+
+   /**
+    * Initialize data to given scalar over given box.
+    */
+   void
+   setToScalar(
+      tbox::Pointer<pdat::NodeData<dcomplex> >& dst,
+      const dcomplex& alpha,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   PatchNodeDataOpsComplex(
+      const PatchNodeDataOpsComplex&);
+   void
+   operator = (
+      const PatchNodeDataOpsComplex&);
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchNodeDataOpsInteger.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchNodeDataOpsInteger.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,131 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for integer node-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchNodeDataOpsInteger_C
+#define included_math_PatchNodeDataOpsInteger_C
+
+#include "SAMRAI/math/PatchNodeDataOpsInteger.h"
+#include "SAMRAI/pdat/NodeGeometry.h"
+#ifdef DEBUG_CHECK_ASSERTIONS
+#include "SAMRAI/tbox/Utilities.h"
+#endif
+
+namespace SAMRAI {
+namespace math {
+
+PatchNodeDataOpsInteger::PatchNodeDataOpsInteger()
+{
+}
+
+PatchNodeDataOpsInteger::~PatchNodeDataOpsInteger()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute the number of data entries on a patch in the given box.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int PatchNodeDataOpsInteger::numberOfEntries(
+   const tbox::Pointer<pdat::NodeData<int> >& data,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const hier::Box ibox =
+      pdat::NodeGeometry::toNodeBox(box * data->getGhostBox());
+   int retval = ibox.size() * data->getDepth();
+   return retval;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * General operations for integer node-centered patch data.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchNodeDataOpsInteger::swapData(
+   tbox::Pointer<hier::Patch> patch,
+   const int data1_id,
+   const int data2_id) const
+{
+   TBOX_ASSERT(!patch.isNull());
+
+   tbox::Pointer<pdat::NodeData<int> > d1 = patch->getPatchData(data1_id);
+   tbox::Pointer<pdat::NodeData<int> > d2 = patch->getPatchData(data2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d1.isNull() && !d2.isNull());
+   TBOX_ASSERT(d1->getDepth() && d2->getDepth());
+   TBOX_ASSERT(d1->getBox() == d2->getBox());
+   TBOX_ASSERT(d1->getGhostBox() == d2->getGhostBox());
+#endif
+   patch->setPatchData(data1_id, d2);
+   patch->setPatchData(data2_id, d1);
+}
+
+void PatchNodeDataOpsInteger::printData(
+   const tbox::Pointer<pdat::NodeData<int> >& data,
+   const hier::Box& box,
+   std::ostream& s) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   s << "Data box = " << box << std::endl;
+   data->print(box, s);
+   s << "\n";
+}
+
+void PatchNodeDataOpsInteger::copyData(
+   tbox::Pointer<pdat::NodeData<int> >& dst,
+   const tbox::Pointer<pdat::NodeData<int> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   (dst->getArrayData()).copy(src->getArrayData(), node_box);
+}
+
+void PatchNodeDataOpsInteger::setToScalar(
+   tbox::Pointer<pdat::NodeData<int> >& dst,
+   const int& alpha,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*dst, box);
+
+   dst->fillAll(alpha, box);
+}
+
+void PatchNodeDataOpsInteger::abs(
+   tbox::Pointer<pdat::NodeData<int> >& dst,
+   const tbox::Pointer<pdat::NodeData<int> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   d_array_ops.abs(dst->getArrayData(),
+      src->getArrayData(),
+      node_box);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchNodeDataOpsInteger.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchNodeDataOpsInteger.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,127 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for integer node-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchNodeDataOpsInteger
+#define included_math_PatchNodeDataOpsInteger
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/math/PatchNodeDataBasicOps.h"
+#include "SAMRAI/math/ArrayDataNormOpsInteger.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchNodeDataOpsInteger provides a collection of operations
+ * that may be used to manipulate integer node-centered patch data.  The
+ * operations include basic arithmetic, min, max, etc.  With the assertion
+ * of a few basic routines, this class inherits its interface (and
+ * thus its functionality) from the base class PatchNodeDataBasicOps
+ * from which it is derived.
+ *
+ * A more extensive set of operations is implemented for real (double and
+ * float) and complex patch data in the classes PatchNodeDataOpsReal
+ * and PatchNodeDataOpsComplex, repsectively.
+ *
+ * @see math::PatchNodeDataBasicOps
+ */
+
+class PatchNodeDataOpsInteger:
+   public tbox::DescribedClass,
+   public PatchNodeDataBasicOps<int>
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchNodeDataOpsInteger();
+
+   virtual ~PatchNodeDataOpsInteger();
+
+   /**
+    * Return the number of data values for the node-centered data object
+    * in the given box.  Note that it is assumed that the box refers to
+    * the cell-centered index space corresponding to the patch hierarchy.
+    */
+   int
+   numberOfEntries(
+      const tbox::Pointer<pdat::NodeData<int> >& data,
+      const hier::Box& box) const;
+
+   /**
+    * Copy dst data to src data over given box.
+    */
+   void
+   copyData(
+      tbox::Pointer<pdat::NodeData<int> >& dst,
+      const tbox::Pointer<pdat::NodeData<int> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Swap pointers for patch data objects.  Objects are checked for
+    * consistency of depth, box, and ghost box.
+    */
+   void
+   swapData(
+      tbox::Pointer<hier::Patch> patch,
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data entries over given box to given output stream.
+    */
+   void
+   printData(
+      const tbox::Pointer<pdat::NodeData<int> >& data,
+      const hier::Box& box,
+      std::ostream& s = tbox::plog) const;
+
+   /**
+    * Initialize data to given scalar over given box.
+    */
+   void
+   setToScalar(
+      tbox::Pointer<pdat::NodeData<int> >& dst,
+      const int& alpha,
+      const hier::Box& box) const;
+
+   /**
+    * Set destination component to absolute value of source component.
+    * That is, each destination entry is set to \f$d_i = \| s_i \|\f$.
+    */
+   void
+   abs(
+      tbox::Pointer<pdat::NodeData<int> >& dst,
+      const tbox::Pointer<pdat::NodeData<int> >& src,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   PatchNodeDataOpsInteger(
+      const PatchNodeDataOpsInteger&);
+   void
+   operator = (
+      const PatchNodeDataOpsInteger&);
+
+   ArrayDataNormOpsInteger d_array_ops;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchNodeDataOpsReal.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchNodeDataOpsReal.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,131 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations for real node-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchNodeDataOpsReal_C
+#define included_math_PatchNodeDataOpsReal_C
+
+#include "SAMRAI/math/PatchNodeDataOpsReal.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/pdat/NodeGeometry.h"
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+PatchNodeDataOpsReal<TYPE>::PatchNodeDataOpsReal()
+{
+}
+
+#if 0
+/*
+ * This was moved into the header due to what looks like bug in the
+ * XLC compiler.
+ */
+
+template<class TYPE>
+PatchNodeDataOpsReal<TYPE>::~PatchNodeDataOpsReal()
+{
+}
+#endif
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The const constructor and assignment operator are not actually used   *
+ * but are defined here for compilers that require an implementation for *
+ * every declaration.                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+PatchNodeDataOpsReal<TYPE>::PatchNodeDataOpsReal(
+   const PatchNodeDataOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void PatchNodeDataOpsReal<TYPE>::operator = (
+   const PatchNodeDataOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * General templated operations for real node-centered patch data.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void PatchNodeDataOpsReal<TYPE>::swapData(
+   tbox::Pointer<hier::Patch> patch,
+   const int data1_id,
+   const int data2_id) const
+{
+   TBOX_ASSERT(!patch.isNull());
+
+   tbox::Pointer<pdat::NodeData<TYPE> > d1 = patch->getPatchData(data1_id);
+   tbox::Pointer<pdat::NodeData<TYPE> > d2 = patch->getPatchData(data2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d1.isNull() && !d2.isNull());
+   TBOX_ASSERT(d1->getDepth() && d2->getDepth());
+   TBOX_ASSERT(d1->getBox() == d2->getBox());
+   TBOX_ASSERT(d1->getGhostBox() == d2->getGhostBox());
+#endif
+   patch->setPatchData(data1_id, d2);
+   patch->setPatchData(data2_id, d1);
+}
+
+template<class TYPE>
+void PatchNodeDataOpsReal<TYPE>::printData(
+   const tbox::Pointer<pdat::NodeData<TYPE> >& data,
+   const hier::Box& box,
+   std::ostream& s) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   s << "Data box = " << box << std::endl;
+   data->print(box, s);
+   s << "\n";
+}
+
+template<class TYPE>
+void PatchNodeDataOpsReal<TYPE>::copyData(
+   tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+   const tbox::Pointer<pdat::NodeData<TYPE> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+   (dst->getArrayData()).copy(src->getArrayData(), node_box);
+}
+
+template<class TYPE>
+void PatchNodeDataOpsReal<TYPE>::setToScalar(
+   tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+   const TYPE& alpha,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*dst, box);
+
+   dst->fillAll(alpha, box);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchNodeDataOpsReal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchNodeDataOpsReal.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations for real node-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchNodeDataOpsReal
+#define included_math_PatchNodeDataOpsReal
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/math/PatchNodeDataBasicOps.h"
+#include "SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h"
+#include "SAMRAI/math/PatchNodeDataNormOpsReal.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchNodeDataOpsReal provides a collection of operations
+ * to manipulate float and double numerical node-centered patch data.  The
+ * operations include basic arithmetic, norms and ordering, and assorted
+ * miscellaneous operations.  With the assertion of a few basic routines,
+ * this class inherits its interface (and thus its functionality) from the
+ * base classes PatchNodeDataBasicOps, PatchNodeDataNormOpsReal,
+ * and PatchNodeDataMiscellaneousOpsReal from which it is derived.  The
+ * name of each of these base classes is indicative of the set of
+ * node-centered patch data operations that it provides.
+ *
+ * Note that this templated class should only be used to instantiate
+ * objects with double or float as the template parameter.  A similar set of
+ * operations is implemented for complex and integer patch data in the classes
+ * PatchNodeDataOpsComplex and PatchNodeDataOpsInteger,
+ * repsectively.
+ *
+ * @see math::PatchNodeDataBasicOps
+ * @see math::PatchNodeDataMiscellaneousOpsReal
+ * @see math::PatchNodeDataNormOpsReal
+ */
+
+template<class TYPE>
+class PatchNodeDataOpsReal:
+   public tbox::DescribedClass,
+   public PatchNodeDataBasicOps<TYPE>,
+   public PatchNodeDataMiscellaneousOpsReal<TYPE>,
+   public PatchNodeDataNormOpsReal<TYPE>
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchNodeDataOpsReal();
+
+   virtual ~PatchNodeDataOpsReal<TYPE>() {}
+
+   /**
+    * Copy dst data to src data over given box.
+    */
+   void
+   copyData(
+      tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+      const tbox::Pointer<pdat::NodeData<TYPE> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Swap pointers for patch data objects.  Objects are checked for
+    * consistency of depth, box, and ghost box.
+    */
+   void
+   swapData(
+      tbox::Pointer<hier::Patch> patch,
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data entries over given box to given output stream.
+    */
+   void
+   printData(
+      const tbox::Pointer<pdat::NodeData<TYPE> >& data,
+      const hier::Box& box,
+      std::ostream& s = tbox::plog) const;
+
+   /**
+    * Initialize data to given scalar over given box.
+    */
+   void
+   setToScalar(
+      tbox::Pointer<pdat::NodeData<TYPE> >& dst,
+      const TYPE& alpha,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   PatchNodeDataOpsReal(
+      const PatchNodeDataOpsReal<TYPE>&);
+   void
+   operator = (
+      const PatchNodeDataOpsReal<TYPE>&);
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/PatchNodeDataOpsReal.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchSideDataBasicOps.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchSideDataBasicOps.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,385 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Basic templated side-centered patch data operations. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchSideDataBasicOps_C
+#define included_math_PatchSideDataBasicOps_C
+
+#include "SAMRAI/math/PatchSideDataBasicOps.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/pdat/SideGeometry.h"
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+PatchSideDataBasicOps<TYPE>::PatchSideDataBasicOps()
+{
+}
+
+template<class TYPE>
+PatchSideDataBasicOps<TYPE>::~PatchSideDataBasicOps()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The const constructor and assignment operator are not actually used   *
+ * but are defined here for compilers that require an implementation for *
+ * every declaration.                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+PatchSideDataBasicOps<TYPE>::PatchSideDataBasicOps(
+   const PatchSideDataBasicOps<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void PatchSideDataBasicOps<TYPE>::operator = (
+   const PatchSideDataBasicOps<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * General basic templated opertions for side data.                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void PatchSideDataBasicOps<TYPE>::scale(
+   tbox::Pointer<pdat::SideData<TYPE> >& dst,
+   const TYPE& alpha,
+   const tbox::Pointer<pdat::SideData<TYPE> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_ASSERT(dst->getDirectionVector() == src->getDirectionVector());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(dst->getDim());
+
+   const hier::IntVector& directions = dst->getDirectionVector();
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+         d_array_ops.scale(dst->getArrayData(d),
+            alpha, src->getArrayData(d),
+            side_box);
+      }
+   }
+}
+
+template<class TYPE>
+void PatchSideDataBasicOps<TYPE>::addScalar(
+   tbox::Pointer<pdat::SideData<TYPE> >& dst,
+   const tbox::Pointer<pdat::SideData<TYPE> >& src,
+   const TYPE& alpha,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_ASSERT(dst->getDirectionVector() == src->getDirectionVector());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(dst->getDim());
+
+   const hier::IntVector& directions = dst->getDirectionVector();
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+         d_array_ops.addScalar(dst->getArrayData(d),
+            src->getArrayData(d), alpha,
+            side_box);
+      }
+   }
+}
+
+template<class TYPE>
+void PatchSideDataBasicOps<TYPE>::add(
+   tbox::Pointer<pdat::SideData<TYPE> >& dst,
+   const tbox::Pointer<pdat::SideData<TYPE> >& src1,
+   const tbox::Pointer<pdat::SideData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_ASSERT(dst->getDirectionVector() == src1->getDirectionVector());
+   TBOX_ASSERT(dst->getDirectionVector() == src2->getDirectionVector());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const tbox::Dimension& dim(dst->getDim());
+
+   const hier::IntVector& directions = dst->getDirectionVector();
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+         d_array_ops.add(dst->getArrayData(d),
+            src1->getArrayData(d), src2->getArrayData(d),
+            side_box);
+      }
+   }
+}
+
+template<class TYPE>
+void PatchSideDataBasicOps<TYPE>::subtract(
+   tbox::Pointer<pdat::SideData<TYPE> >& dst,
+   const tbox::Pointer<pdat::SideData<TYPE> >& src1,
+   const tbox::Pointer<pdat::SideData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_ASSERT(dst->getDirectionVector() == src1->getDirectionVector());
+   TBOX_ASSERT(dst->getDirectionVector() == src2->getDirectionVector());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const tbox::Dimension& dim(dst->getDim());
+
+   const hier::IntVector& directions = dst->getDirectionVector();
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+         d_array_ops.subtract(dst->getArrayData(d),
+            src1->getArrayData(d), src2->getArrayData(d),
+            side_box);
+      }
+   }
+}
+
+template<class TYPE>
+void PatchSideDataBasicOps<TYPE>::multiply(
+   tbox::Pointer<pdat::SideData<TYPE> >& dst,
+   const tbox::Pointer<pdat::SideData<TYPE> >& src1,
+   const tbox::Pointer<pdat::SideData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_ASSERT(dst->getDirectionVector() == src1->getDirectionVector());
+   TBOX_ASSERT(dst->getDirectionVector() == src2->getDirectionVector());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const tbox::Dimension& dim(dst->getDim());
+
+   const hier::IntVector& directions = dst->getDirectionVector();
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+         d_array_ops.multiply(dst->getArrayData(d),
+            src1->getArrayData(d), src2->getArrayData(d),
+            side_box);
+      }
+   }
+}
+
+template<class TYPE>
+void PatchSideDataBasicOps<TYPE>::divide(
+   tbox::Pointer<pdat::SideData<TYPE> >& dst,
+   const tbox::Pointer<pdat::SideData<TYPE> >& src1,
+   const tbox::Pointer<pdat::SideData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_ASSERT(dst->getDirectionVector() == src1->getDirectionVector());
+   TBOX_ASSERT(dst->getDirectionVector() == src2->getDirectionVector());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const tbox::Dimension& dim(dst->getDim());
+
+   const hier::IntVector& directions = dst->getDirectionVector();
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+         d_array_ops.divide(dst->getArrayData(d),
+            src1->getArrayData(d), src2->getArrayData(d),
+            side_box);
+      }
+   }
+}
+
+template<class TYPE>
+void PatchSideDataBasicOps<TYPE>::reciprocal(
+   tbox::Pointer<pdat::SideData<TYPE> >& dst,
+   const tbox::Pointer<pdat::SideData<TYPE> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_ASSERT(dst->getDirectionVector() == src->getDirectionVector());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(dst->getDim());
+
+   const hier::IntVector& directions = dst->getDirectionVector();
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+         d_array_ops.reciprocal(dst->getArrayData(d),
+            src->getArrayData(d),
+            side_box);
+      }
+   }
+}
+
+template<class TYPE>
+void PatchSideDataBasicOps<TYPE>::linearSum(
+   tbox::Pointer<pdat::SideData<TYPE> >& dst,
+   const TYPE& alpha,
+   const tbox::Pointer<pdat::SideData<TYPE> >& src1,
+   const TYPE& beta,
+   const tbox::Pointer<pdat::SideData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_ASSERT(dst->getDirectionVector() == src1->getDirectionVector());
+   TBOX_ASSERT(dst->getDirectionVector() == src2->getDirectionVector());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const tbox::Dimension& dim(dst->getDim());
+
+   const hier::IntVector& directions = dst->getDirectionVector();
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+         d_array_ops.linearSum(dst->getArrayData(d),
+            alpha, src1->getArrayData(d),
+            beta, src2->getArrayData(d),
+            side_box);
+      }
+   }
+}
+
+template<class TYPE>
+void PatchSideDataBasicOps<TYPE>::axpy(
+   tbox::Pointer<pdat::SideData<TYPE> >& dst,
+   const TYPE& alpha,
+   const tbox::Pointer<pdat::SideData<TYPE> >& src1,
+   const tbox::Pointer<pdat::SideData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_ASSERT(dst->getDirectionVector() == src1->getDirectionVector());
+   TBOX_ASSERT(dst->getDirectionVector() == src2->getDirectionVector());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const tbox::Dimension& dim(dst->getDim());
+
+   const hier::IntVector& directions = dst->getDirectionVector();
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+         d_array_ops.axpy(dst->getArrayData(d),
+            alpha, src1->getArrayData(d),
+            src2->getArrayData(d),
+            side_box);
+      }
+   }
+}
+
+template<class TYPE>
+void PatchSideDataBasicOps<TYPE>::axmy(
+   tbox::Pointer<pdat::SideData<TYPE> >& dst,
+   const TYPE& alpha,
+   const tbox::Pointer<pdat::SideData<TYPE> >& src1,
+   const tbox::Pointer<pdat::SideData<TYPE> >& src2,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src1.isNull() && !src2.isNull());
+   TBOX_ASSERT(dst->getDirectionVector() == src1->getDirectionVector());
+   TBOX_ASSERT(dst->getDirectionVector() == src2->getDirectionVector());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst, *src1, *src2, box);
+
+   const tbox::Dimension& dim(dst->getDim());
+
+   const hier::IntVector& directions = dst->getDirectionVector();
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+         d_array_ops.axmy(dst->getArrayData(d),
+            alpha, src1->getArrayData(d),
+            src2->getArrayData(d),
+            side_box);
+      }
+   }
+}
+
+template<class TYPE>
+void PatchSideDataBasicOps<TYPE>::setRandomValues(
+   tbox::Pointer<pdat::SideData<TYPE> >& dst,
+   const TYPE& width,
+   const TYPE& low,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*dst, box);
+
+   const tbox::Dimension& dim(dst->getDim());
+
+   const hier::IntVector& directions = dst->getDirectionVector();
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+         d_array_ops.setRandomValues(dst->getArrayData(d),
+            width, low, side_box);
+      }
+   }
+}
+
+template<class TYPE>
+TYPE PatchSideDataBasicOps<TYPE>::min(
+   const tbox::Pointer<pdat::SideData<TYPE> >& data,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(data->getDim());
+
+   TYPE minval = tbox::MathUtilities<TYPE>::getMax();
+   const hier::IntVector& directions = data->getDirectionVector();
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+         minval = tbox::MathUtilities<TYPE>::Min(
+               minval, d_array_ops.min(data->getArrayData(d), side_box));
+      }
+   }
+   return minval;
+}
+
+template<class TYPE>
+TYPE PatchSideDataBasicOps<TYPE>::max(
+   const tbox::Pointer<pdat::SideData<TYPE> >& data,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(data->getDim());
+
+   TYPE maxval = -tbox::MathUtilities<TYPE>::getMax();
+   const hier::IntVector& directions = data->getDirectionVector();
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+         maxval = tbox::MathUtilities<TYPE>::Max(
+               maxval, d_array_ops.max(data->getArrayData(d), side_box));
+      }
+   }
+   return maxval;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchSideDataBasicOps.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchSideDataBasicOps.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,210 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Basic templated side-centered patch data operations. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchSideDataBasicOps
+#define included_math_PatchSideDataBasicOps
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/math/ArrayDataBasicOps.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchSideDataBasicOps provides access to a collection
+ * of basic numerical operations that may be applied to numerical side-
+ * centered patch data.  These operations include simple arithmetic
+ * operations as well as min and max, etc.  The primary intent of this
+ * class is to provide the interface to these standard operations for
+ * an PatchSideDataOps<DIM> object which provides access to a complete set
+ * of operations that may be used to manipulate side-centered patch data
+ * objects.   Each member function accepts a box argument indicating the
+ * region of index space on which the operation should be performed.  The
+ * operation will be performed on the intersection of this box and those
+ * boxes corresponding to the patch data objects involved.
+ *
+ * These operations typically apply only to the numerical standard built-in
+ * types, such as double, float, and int, and the complex type (which may or
+ * may not be a built-in type depending on the C++ compiler).  Thus, this
+ * templated class should only be used to instantiate objects with those
+ * types as the template parameter.  None of the operations are implemented
+ * for any other type.
+ *
+ * @see math::ArrayDataBasicOps
+ */
+
+template<class TYPE>
+class PatchSideDataBasicOps
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchSideDataBasicOps();
+
+   virtual ~PatchSideDataBasicOps<TYPE>();
+
+   /**
+    * Set dst = alpha * src, elementwise.
+    */
+   void
+   scale(
+      tbox::Pointer<pdat::SideData<TYPE> >& dst,
+      const TYPE& alpha,
+      const tbox::Pointer<pdat::SideData<TYPE> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src + alpha, elementwise.
+    */
+   void
+   addScalar(
+      tbox::Pointer<pdat::SideData<TYPE> >& dst,
+      const tbox::Pointer<pdat::SideData<TYPE> >& src,
+      const TYPE& alpha,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src1 + src2, elementwise.
+    */
+   void
+   add(
+      tbox::Pointer<pdat::SideData<TYPE> >& dst,
+      const tbox::Pointer<pdat::SideData<TYPE> >& src1,
+      const tbox::Pointer<pdat::SideData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src1 - src2, elementwise.
+    */
+   void
+   subtract(
+      tbox::Pointer<pdat::SideData<TYPE> >& dst,
+      const tbox::Pointer<pdat::SideData<TYPE> >& src1,
+      const tbox::Pointer<pdat::SideData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src1 * src2, elementwise.
+    */
+   void
+   multiply(
+      tbox::Pointer<pdat::SideData<TYPE> >& dst,
+      const tbox::Pointer<pdat::SideData<TYPE> >& src1,
+      const tbox::Pointer<pdat::SideData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = src1 / src2, elementwise.  No check for division by zero.
+    */
+   void
+   divide(
+      tbox::Pointer<pdat::SideData<TYPE> >& dst,
+      const tbox::Pointer<pdat::SideData<TYPE> >& src1,
+      const tbox::Pointer<pdat::SideData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = 1 / src, elementwise.  No check for division by zero.
+    */
+   void
+   reciprocal(
+      tbox::Pointer<pdat::SideData<TYPE> >& dst,
+      const tbox::Pointer<pdat::SideData<TYPE> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = alpha * src1 + beta * src2, elementwise.
+    */
+   void
+   linearSum(
+      tbox::Pointer<pdat::SideData<TYPE> >& dst,
+      const TYPE& alpha,
+      const tbox::Pointer<pdat::SideData<TYPE> >& src1,
+      const TYPE& beta,
+      const tbox::Pointer<pdat::SideData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = alpha * src1 + src2, elementwise.
+    */
+   void
+   axpy(
+      tbox::Pointer<pdat::SideData<TYPE> >& dst,
+      const TYPE& alpha,
+      const tbox::Pointer<pdat::SideData<TYPE> >& src1,
+      const tbox::Pointer<pdat::SideData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Set dst = alpha * src1 - src2, elementwise.
+    */
+   void
+   axmy(
+      tbox::Pointer<pdat::SideData<TYPE> >& dst,
+      const TYPE& alpha,
+      const tbox::Pointer<pdat::SideData<TYPE> >& src1,
+      const tbox::Pointer<pdat::SideData<TYPE> >& src2,
+      const hier::Box& box) const;
+
+   /**
+    * Return the minimum patch data component entry  When the data is
+    * complex, the result is the data element with the smallest norm.
+    */
+   TYPE
+   min(
+      const tbox::Pointer<pdat::SideData<TYPE> >& data,
+      const hier::Box& box) const;
+
+   /**
+    * Return the maximum patch data component entry  When the data is
+    * complex, the result is the data element with the largest norm.
+    */
+   TYPE
+   max(
+      const tbox::Pointer<pdat::SideData<TYPE> >& data,
+      const hier::Box& box) const;
+
+   /**
+    * Set patch data to random values.  See the operations in the
+    * ArrayDataBasicOps class for details on the generation
+    * of the random values for each data type.
+    */
+   void
+   setRandomValues(
+      tbox::Pointer<pdat::SideData<TYPE> >& dst,
+      const TYPE& width,
+      const TYPE& low,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   PatchSideDataBasicOps(
+      const PatchSideDataBasicOps<TYPE>&);
+   void
+   operator = (
+      const PatchSideDataBasicOps<TYPE>&);
+
+   ArrayDataBasicOps<TYPE> d_array_ops;
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/PatchSideDataBasicOps.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,250 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated miscellaneous operations for real side-centered data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchSideDataMiscellaneousOpsReal_C
+#define included_math_PatchSideDataMiscellaneousOpsReal_C
+
+#include "SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/pdat/SideGeometry.h"
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+PatchSideDataMiscellaneousOpsReal<TYPE>::PatchSideDataMiscellaneousOpsReal()
+{
+}
+
+template<class TYPE>
+PatchSideDataMiscellaneousOpsReal<TYPE>::~PatchSideDataMiscellaneousOpsReal()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The const constructor and assignment operator are not actually used   *
+ * but are defined here for compilers that require an implementation for *
+ * every declaration.                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+PatchSideDataMiscellaneousOpsReal<TYPE>::PatchSideDataMiscellaneousOpsReal(
+   const PatchSideDataMiscellaneousOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void PatchSideDataMiscellaneousOpsReal<TYPE>::operator = (
+   const PatchSideDataMiscellaneousOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Templated miscellaneous opertions for real side-centered data.        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+int PatchSideDataMiscellaneousOpsReal<TYPE>::computeConstrProdPos(
+   const tbox::Pointer<pdat::SideData<TYPE> >& data1,
+   const tbox::Pointer<pdat::SideData<TYPE> >& data2,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::SideData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data1.isNull() && !data2.isNull());
+   TBOX_ASSERT(data1->getDirectionVector() == data2->getDirectionVector());
+#endif
+   int retval = 1;
+   const tbox::Dimension& dim(data1->getDim());
+
+   const hier::IntVector& directions = data1->getDirectionVector();
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (directions(d)) {
+            const hier::Box side_box =
+               pdat::SideGeometry::toSideBox(box, d);
+            retval = tbox::MathUtilities<int>::Min(retval,
+                  d_array_ops.computeConstrProdPos(
+                     data1->getArrayData(d),
+                     data2->getArrayData(d),
+                     side_box));
+         }
+      }
+   } else {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(directions ==
+         hier::IntVector::min(directions, cvol->getDirectionVector()));
+#endif
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (directions(d)) {
+            const hier::Box side_box =
+               pdat::SideGeometry::toSideBox(box, d);
+            retval = tbox::MathUtilities<int>::Min(retval,
+                  d_array_ops.computeConstrProdPosWithControlVolume(
+                     data1->getArrayData(d),
+                     data2->getArrayData(d),
+                     cvol->getArrayData(d),
+                     side_box));
+         }
+      }
+   }
+   return retval;
+}
+
+template<class TYPE>
+void PatchSideDataMiscellaneousOpsReal<TYPE>::compareToScalar(
+   tbox::Pointer<pdat::SideData<TYPE> >& dst,
+   const tbox::Pointer<pdat::SideData<TYPE> >& src,
+   const TYPE& alpha,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::SideData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_ASSERT(dst->getDirectionVector() == src->getDirectionVector());
+#endif
+   const tbox::Dimension& dim(dst->getDim());
+
+   const hier::IntVector& directions = dst->getDirectionVector();
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (directions(d)) {
+            const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+            d_array_ops.compareToScalar(dst->getArrayData(d),
+               src->getArrayData(d),
+               alpha,
+               side_box);
+         }
+      }
+   } else {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(directions ==
+         hier::IntVector::min(directions, cvol->getDirectionVector()));
+#endif
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (directions(d)) {
+            const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+            d_array_ops.compareToScalarWithControlVolume(dst->getArrayData(d),
+               src->getArrayData(d),
+               alpha,
+               cvol->getArrayData(d),
+               side_box);
+         }
+      }
+   }
+}
+
+template<class TYPE>
+int PatchSideDataMiscellaneousOpsReal<TYPE>::testReciprocal(
+   tbox::Pointer<pdat::SideData<TYPE> >& dst,
+   const tbox::Pointer<pdat::SideData<TYPE> >& src,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::SideData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_ASSERT(dst->getDirectionVector() == src->getDirectionVector());
+#endif
+   const tbox::Dimension& dim(dst->getDim());
+
+   const hier::IntVector& directions = dst->getDirectionVector();
+   int retval = 1;
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (directions(d)) {
+            const hier::Box side_box =
+               pdat::SideGeometry::toSideBox(box, d);
+            retval = tbox::MathUtilities<int>::Min(retval,
+                  d_array_ops.testReciprocal(
+                     dst->getArrayData(d),
+                     src->getArrayData(d),
+                     side_box));
+         }
+      }
+   } else {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(directions ==
+         hier::IntVector::min(directions, cvol->getDirectionVector()));
+#endif
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (directions(d)) {
+            const hier::Box side_box =
+               pdat::SideGeometry::toSideBox(box, d);
+            retval = tbox::MathUtilities<int>::Min(retval,
+                  d_array_ops.testReciprocalWithControlVolume(
+                     dst->getArrayData(d),
+                     src->getArrayData(d),
+                     cvol->getArrayData(d),
+                     side_box));
+         }
+      }
+   }
+   return retval;
+}
+
+template<class TYPE>
+TYPE PatchSideDataMiscellaneousOpsReal<TYPE>::maxPointwiseDivide(
+   const tbox::Pointer<pdat::SideData<TYPE> >& numer,
+   const tbox::Pointer<pdat::SideData<TYPE> >& denom,
+   const hier::Box& box) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!numer.isNull() && !denom.isNull());
+#endif
+   const tbox::Dimension& dim(numer->getDim());
+
+   TYPE retval = 0.0;
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box side_box =
+         pdat::SideGeometry::toSideBox(box, d);
+      TYPE dirval = d_array_ops.maxPointwiseDivide(numer->getArrayData(d),
+            denom->getArrayData(d),
+            side_box);
+      retval = tbox::MathUtilities<TYPE>::Max(retval, dirval);
+   }
+   return retval;
+}
+
+template<class TYPE>
+TYPE PatchSideDataMiscellaneousOpsReal<TYPE>::minPointwiseDivide(
+   const tbox::Pointer<pdat::SideData<TYPE> >& numer,
+   const tbox::Pointer<pdat::SideData<TYPE> >& denom,
+   const hier::Box& box) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!numer.isNull() && !denom.isNull());
+#endif
+   const tbox::Dimension& dim(numer->getDim());
+
+   TYPE retval = 0.0;
+   for (int d = 0; d < dim.getValue(); d++) {
+      const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+      TYPE dirval = d_array_ops.minPointwiseDivide(numer->getArrayData(d),
+            denom->getArrayData(d),
+            side_box);
+      retval = tbox::MathUtilities<TYPE>::Min(retval, dirval);
+   }
+   return retval;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,165 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated miscellaneous operations for real side-centered data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchSideDataMiscellaneousOpsReal
+#define included_math_PatchSideDataMiscellaneousOpsReal
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/math/ArrayDataMiscellaneousOpsReal.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchSideDataMiscellaneousOpsReal provides access to a
+ * collection of operations that may be applied to numerical side-centered
+ * patch data of type double and float.  The primary intent of this class is
+ * to provide the interface to these operations for the class
+ * PatchSideDataOpsReal which provides access to a more complete
+ * set of operations that may be used to manipulate side-centered
+ * patch data.  Each member function accepts a box argument
+ * indicating the region of index space on which the operation should be
+ * performed.  The operation will be performed on the intersection of this
+ * box and those boxes corresponding to the patch data objects.  Also, each
+ * operation allows an additional side-centered patch data object to be used
+ * to represent a control volume that weights the contribution of each data
+ * entry in the given norm calculation.  Note that the control volume patch
+ * data must be of type double and have side-centered geometry (i.e., the
+ * same as the data itself).  The use of control volumes is important when
+ * these operations are used in vector kernels where the data resides over
+ * multiple levels of spatial resolution in an AMR hierarchy.  If the control
+ * volume is not given in the function call, it will be ignored in the
+ * calculation.  Also, note that the depth of the control volume patch data
+ * object must be either 1 or be equal to the depth of the other data objects.
+ *
+ * Since these operations are used only by the vector kernels for the KINSOL
+ * and CVODE solver packages at this time, they are intended to be instantiated
+ * for the standard built-in types double and float (since those solvers only
+ * treat double and float data).  To extend this class to other data types or
+ * to include other operations, the member functions must be specialized or the
+ * new operations must be added.
+ *
+ * @see math::ArrayDataMiscellaneousOpsReal
+ */
+
+template<class TYPE>
+class PatchSideDataMiscellaneousOpsReal
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchSideDataMiscellaneousOpsReal();
+
+   virtual ~PatchSideDataMiscellaneousOpsReal<TYPE>();
+
+   /**
+    * Return 1 if \f$\|data2_i\| > 0\f$ and \f$data1_i * data2_i \leq 0\f$, for
+    * any \f$i\f$ in the index region, where \f$cvol_i > 0\f$.  Otherwise return 0.
+    * If the control volume is NULL, all values in the index set are used.
+    */
+   int
+   computeConstrProdPos(
+      const tbox::Pointer<pdat::SideData<TYPE> >& data1,
+      const tbox::Pointer<pdat::SideData<TYPE> >& data2,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::SideData<double> > cvol =
+         tbox::Pointer<pdat::SideData<double> >(NULL)) const;
+
+   /**
+    * Wherever \f$cvol_i > 0\f$ in the index region, set \f$dst_i = 1\f$
+    * if \f$\|src_i\| > \alpha\f$, and \f$dst_i = 0\f$ otherwise.  If the control
+    * volume is NULL, all values in the index set are considered.
+    */
+   void
+   compareToScalar(
+      tbox::Pointer<pdat::SideData<TYPE> >& dst,
+      const tbox::Pointer<pdat::SideData<TYPE> >& src,
+      const TYPE& alpha,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::SideData<double> > cvol =
+         tbox::Pointer<pdat::SideData<double> >(NULL)) const;
+
+   /**
+    * Wherever \f$cvol_i > 0\f$ in the index region, set \f$dst_i = 1/src_i\f$ if
+    * \f$src_i \neq 0\f$, and \f$dst_i = 0\f$ otherwise.  If \f$dst_i = 0\f$ anywhere,
+    * 0 is the return value.  Otherwise 1 is returned.  If the control volume
+    * all values in the index set are considered.
+    */
+   int
+   testReciprocal(
+      tbox::Pointer<pdat::SideData<TYPE> >& dst,
+      const tbox::Pointer<pdat::SideData<TYPE> >& src,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::SideData<double> > cvol =
+         tbox::Pointer<pdat::SideData<double> >(NULL)) const;
+
+   /*!
+    * @brief Compute max of "conditional" quotients of two arrays.
+    *
+    * Return the maximum of pointwise "conditional" quotients of the numerator
+    * and denominator.
+    *
+    * The "conditional" quotient is defined as |numerator/denominator|
+    * where the denominator is nonzero.  Otherwise, it is defined as
+    * |numerator|.
+    *
+    * @b Note: This method is currently intended to support the
+    * PETSc-2.1.6 vector wrapper only.  Please do not use it!
+    */
+   TYPE
+   maxPointwiseDivide(
+      const tbox::Pointer<pdat::SideData<TYPE> >& numer,
+      const tbox::Pointer<pdat::SideData<TYPE> >& denom,
+      const hier::Box& box) const;
+
+   /*!
+    * @brief Compute min of quotients of two arrays.
+    *
+    * Return the minimum of pointwise quotients of the numerator
+    * and denominator.
+    *
+    * The quotient is defined as (numerator/denominator)
+    * where the denominator is nonzero.  When the denominator is zero, the
+    * entry is skipped.  If the denominator is always zero, the value of
+    * tbox::IEEE::getFLT_MAX() is returned (see @ref SAMRAI::tbox::IEEE).
+    *
+    * @b Note: This method is currently intended to support the
+    * SUNDIALS vector wrapper only.  Please do not use it!
+    */
+   TYPE
+   minPointwiseDivide(
+      const tbox::Pointer<pdat::SideData<TYPE> >& numer,
+      const tbox::Pointer<pdat::SideData<TYPE> >& denom,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   PatchSideDataMiscellaneousOpsReal(
+      const PatchSideDataMiscellaneousOpsReal<TYPE>&);
+   void
+   operator = (
+      const PatchSideDataMiscellaneousOpsReal<TYPE>&);
+
+   ArrayDataMiscellaneousOpsReal<TYPE> d_array_ops;
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchSideDataNormOpsComplex.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchSideDataNormOpsComplex.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,389 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Norm operations for complex side-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchSideDataNormOpsComplex_C
+#define included_math_PatchSideDataNormOpsComplex_C
+
+#include "SAMRAI/math/PatchSideDataNormOpsComplex.h"
+#include "SAMRAI/pdat/SideGeometry.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#ifdef DEBUG_CHECK_ASSERTIONS
+#include "SAMRAI/tbox/Utilities.h"
+#endif
+
+namespace SAMRAI {
+namespace math {
+
+PatchSideDataNormOpsComplex::PatchSideDataNormOpsComplex()
+{
+}
+
+PatchSideDataNormOpsComplex::~PatchSideDataNormOpsComplex()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute the number of data entries on a patch in the given box.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int PatchSideDataNormOpsComplex::numberOfEntries(
+   const tbox::Pointer<pdat::SideData<dcomplex> >& data,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   int retval = 0;
+   const hier::Box ibox = box * data->getGhostBox();
+   const hier::IntVector& directions = data->getDirectionVector();
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box dbox = pdat::SideGeometry::toSideBox(ibox, d);
+         retval += (dbox.size() * data->getDepth());
+      }
+   }
+   return retval;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Norm operations for complex side-centered data.                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double PatchSideDataNormOpsComplex::sumControlVolumes(
+   const tbox::Pointer<pdat::SideData<dcomplex> >& data,
+   const tbox::Pointer<pdat::SideData<double> >& cvol,
+   const hier::Box& box) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull() && !cvol.isNull());
+#endif
+   double retval = 0.0;
+   const hier::IntVector& directions = data->getDirectionVector();
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(directions ==
+      hier::IntVector::min(directions, cvol->getDirectionVector()));
+#endif
+   const tbox::Dimension& dim(box.getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+         retval += d_array_ops.sumControlVolumes(data->getArrayData(d),
+               cvol->getArrayData(d),
+               side_box);
+      }
+   }
+   return retval;
+}
+
+void PatchSideDataNormOpsComplex::abs(
+   tbox::Pointer<pdat::SideData<double> >& dst,
+   const tbox::Pointer<pdat::SideData<dcomplex> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_ASSERT(dst->getDirectionVector() == src->getDirectionVector());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   const hier::IntVector& directions = dst->getDirectionVector();
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+         d_array_ops.abs(dst->getArrayData(d),
+            src->getArrayData(d),
+            side_box);
+      }
+   }
+}
+
+double PatchSideDataNormOpsComplex::L1Norm(
+   const tbox::Pointer<pdat::SideData<dcomplex> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::SideData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   double retval = 0.0;
+   const hier::IntVector& directions = data->getDirectionVector();
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (directions(d)) {
+            const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+            retval += d_array_ops.L1Norm(data->getArrayData(d), side_box);
+         }
+      }
+   } else {
+      TBOX_ASSERT(directions ==
+         hier::IntVector::min(directions, cvol->getDirectionVector()));
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (directions(d)) {
+            const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+            retval += d_array_ops.L1NormWithControlVolume(data->getArrayData(d),
+                  cvol->getArrayData(d),
+                  side_box);
+         }
+      }
+   }
+   return retval;
+}
+
+double PatchSideDataNormOpsComplex::L2Norm(
+   const tbox::Pointer<pdat::SideData<dcomplex> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::SideData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   double retval = 0.0;
+   const hier::IntVector& directions = data->getDirectionVector();
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (directions(d)) {
+            const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+            double aval = d_array_ops.L2Norm(data->getArrayData(d), side_box);
+            retval += aval * aval;
+         }
+      }
+   } else {
+      TBOX_ASSERT(directions ==
+         hier::IntVector::min(directions, cvol->getDirectionVector()));
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (directions(d)) {
+            const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+            double aval = d_array_ops.L2NormWithControlVolume(
+                  data->getArrayData(d),
+                  cvol->getArrayData(d),
+                  side_box);
+            retval += aval * aval;
+         }
+      }
+   }
+   return sqrt(retval);
+}
+
+double PatchSideDataNormOpsComplex::weightedL2Norm(
+   const tbox::Pointer<pdat::SideData<dcomplex> >& data,
+   const tbox::Pointer<pdat::SideData<dcomplex> >& weight,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::SideData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull() && !weight.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*data, *weight, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   double retval = 0.0;
+   const hier::IntVector& directions = data->getDirectionVector();
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(directions ==
+      hier::IntVector::min(directions, weight->getDirectionVector()));
+#endif
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (directions(d)) {
+            const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+            double aval = d_array_ops.weightedL2Norm(data->getArrayData(d),
+                  weight->getArrayData(d),
+                  side_box);
+            retval += aval * aval;
+         }
+      }
+   } else {
+      TBOX_ASSERT(directions ==
+         hier::IntVector::min(directions, cvol->getDirectionVector()));
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (directions(d)) {
+            const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+            double aval = d_array_ops.weightedL2NormWithControlVolume(
+                  data->getArrayData(d),
+                  weight->getArrayData(d),
+                  cvol->getArrayData(d),
+                  side_box);
+            retval += aval * aval;
+         }
+      }
+   }
+   return sqrt(retval);
+}
+
+double PatchSideDataNormOpsComplex::RMSNorm(
+   const tbox::Pointer<pdat::SideData<dcomplex> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::SideData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   double retval = L2Norm(data, box, cvol);
+   if (cvol.isNull()) {
+      retval /= sqrt((double)numberOfEntries(data, box));
+   } else {
+      retval /= sqrt(sumControlVolumes(data, cvol, box));
+   }
+   return retval;
+}
+
+double PatchSideDataNormOpsComplex::weightedRMSNorm(
+   const tbox::Pointer<pdat::SideData<dcomplex> >& data,
+   const tbox::Pointer<pdat::SideData<dcomplex> >& weight,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::SideData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull() && !weight.isNull());
+#endif
+   double retval = weightedL2Norm(data, weight, box, cvol);
+   if (cvol.isNull()) {
+      retval /= sqrt((double)numberOfEntries(data, box));
+   } else {
+      retval /= sqrt(sumControlVolumes(data, cvol, box));
+   }
+   return retval;
+}
+
+double PatchSideDataNormOpsComplex::maxNorm(
+   const tbox::Pointer<pdat::SideData<dcomplex> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::SideData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   const tbox::Dimension& dim(box.getDim());
+
+   double retval = 0.0;
+   const hier::IntVector& directions = data->getDirectionVector();
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (directions(d)) {
+            const hier::Box side_box =
+               pdat::SideGeometry::toSideBox(box, d);
+            retval = tbox::MathUtilities<double>::Max(retval,
+                  d_array_ops.maxNorm(data->getArrayData(d), side_box));
+         }
+      }
+   } else {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(directions ==
+         hier::IntVector::min(directions, cvol->getDirectionVector()));
+#endif
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (directions(d)) {
+            const hier::Box side_box =
+               pdat::SideGeometry::toSideBox(box, d);
+            retval = tbox::MathUtilities<double>::Max(retval,
+                  d_array_ops.maxNormWithControlVolume(
+                     data->getArrayData(d),
+                     cvol->getArrayData(d), side_box));
+         }
+      }
+   }
+   return retval;
+}
+
+dcomplex PatchSideDataNormOpsComplex::dot(
+   const tbox::Pointer<pdat::SideData<dcomplex> >& data1,
+   const tbox::Pointer<pdat::SideData<dcomplex> >& data2,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::SideData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data1.isNull() && !data2.isNull());
+   TBOX_ASSERT(data1->getDirectionVector() == data2->getDirectionVector());
+#endif
+   const tbox::Dimension& dim(box.getDim());
+
+   dcomplex retval = dcomplex(0.0, 0.0);
+   const hier::IntVector& directions = data1->getDirectionVector();
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (directions(d)) {
+            const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+            retval += d_array_ops.dot(data1->getArrayData(d),
+                  data2->getArrayData(d),
+                  side_box);
+         }
+      }
+   } else {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(directions ==
+         hier::IntVector::min(directions, cvol->getDirectionVector()));
+#endif
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (directions(d)) {
+            const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+            retval += d_array_ops.dotWithControlVolume(
+                  data1->getArrayData(d),
+                  data2->getArrayData(d),
+                  cvol->getArrayData(d),
+                  side_box);
+         }
+      }
+   }
+   return retval;
+}
+
+dcomplex PatchSideDataNormOpsComplex::integral(
+   const tbox::Pointer<pdat::SideData<dcomplex> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::SideData<double> > vol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   const tbox::Dimension& dim(box.getDim());
+
+   dcomplex retval = dcomplex(0.0, 0.0);
+   const hier::IntVector& directions = data->getDirectionVector();
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(directions ==
+      hier::IntVector::min(directions, vol->getDirectionVector()));
+#endif
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+         retval += d_array_ops.integral(
+               data->getArrayData(d),
+               vol->getArrayData(d),
+               side_box);
+      }
+   }
+
+   return retval;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchSideDataNormOpsComplex.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchSideDataNormOpsComplex.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,217 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Norm operations for complex side-centered data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchSideDataNormOpsComplex
+#define included_math_PatchSideDataNormOpsComplex
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/math/ArrayDataNormOpsComplex.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchSideDataNormOpsComplex provides a collection of common
+ * norm operations that may be applied to complex side-centered patch data.
+ * The primary intent of this class is to define part of the interface for the
+ * PatchSideDataOpsComplex class which provides access to operations
+ * that may be used to manipulate complex side-centered patch data.  Each
+ * member function accepts a box argument indicating the region of index space
+ * on which the operation should be performed.  The operation will be performed
+ * on the intersection of this box and those boxes corresponding to the patch
+ * data objects.  Also, each operation allows an additional side-centered
+ * patch data object to be used to represent a control volume that weights the
+ * contribution of each data entry in the given norm calculation.  Note that
+ * the control volume patch data must be of type double and have side-centered
+ * geometry (i.e., the same as the data itself).  The use of control volumes
+ * is important when these operations are used in vector kernels where the
+ * data resides over multiple levels of spatial resolution in an AMR hierarchy.
+ * If the control volume is not given in the function call, it will be ignored
+ * in the calculation.  Also, note that the depth of the control volume patch
+ * data object must be either 1 or be equal to the depth of the other data
+ * objects.
+ *
+ * Note that a similar set of norm operations is implemented for real
+ * patch data (double and float) in the class PatchSideDataNormOpsReal.
+ *
+ * @see math::ArrayDataNormOpsComplex
+ */
+
+class PatchSideDataNormOpsComplex
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchSideDataNormOpsComplex();
+
+   virtual ~PatchSideDataNormOpsComplex();
+
+   /**
+    * Return the number of data values for the side-centered data object
+    * in the given box.  Note that it is assumed that the box refers to
+    * the cell-centered index space corresponding to the patch hierarchy.
+    */
+   int
+   numberOfEntries(
+      const tbox::Pointer<pdat::SideData<dcomplex> >& data,
+      const hier::Box& box) const;
+
+   /**
+    * Return sum of control volume entries for the side-centered data object.
+    */
+   double
+   sumControlVolumes(
+      const tbox::Pointer<pdat::SideData<dcomplex> >& data,
+      const tbox::Pointer<pdat::SideData<double> >& cvol,
+      const hier::Box& box) const;
+
+   /**
+    * Set destination component to norm of source component.  That is,
+    * each destination entry is set to
+    * \f$d_i = \sqrt{ {real(s_i)}^2 + {imag(s_i)}^2 }\f$.
+    */
+   void
+   abs(
+      tbox::Pointer<pdat::SideData<double> >& dst,
+      const tbox::Pointer<pdat::SideData<dcomplex> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Return discrete \f$L_1\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( \sqrt{data_i * \bar{data_i}}*cvol_i )\f$.
+    * If the control volume is NULL, the return value is
+    * \f$\sum_i ( \sqrt{data_i * \bar{data_i}} )\f$.
+    */
+   double
+   L1Norm(
+      const tbox::Pointer<pdat::SideData<dcomplex> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::SideData<double> > cvol =
+         tbox::Pointer<pdat::SideData<double> >(NULL)) const;
+
+   /**
+    * Return discrete \f$L_2\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum
+    * \f$\sqrt{ \sum_i ( data_i * \bar{data_i} cvol_i ) }\f$.
+    * If the control volume is NULL, the return value is
+    * \f$\sqrt{ \sum_i ( data_i * \bar{data_i} ) }\f$.
+    */
+   double
+   L2Norm(
+      const tbox::Pointer<pdat::SideData<dcomplex> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::SideData<double> > cvol =
+         tbox::Pointer<pdat::SideData<double> >(NULL)) const;
+
+   /**
+    * Return discrete weighted \f$L_2\f$-norm of the data using the control
+    * volume to weight the contribution of the data and weight entries to
+    * the sum.  That is, the return value is the sum \f$\sqrt{ \sum_i (
+    * (data_i * wgt_i) * \bar{(data_i * wgt_i)} cvol_i ) }\f$.  If the control
+    * volume is NULL, the return value is
+    * \f$\sqrt{ \sum_i ( (data_i * wgt_i) * \bar{(data_i * wgt_i)} cvol_i ) }\f$.
+    */
+   double
+   weightedL2Norm(
+      const tbox::Pointer<pdat::SideData<dcomplex> >& data,
+      const tbox::Pointer<pdat::SideData<dcomplex> >& weight,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::SideData<double> > cvol =
+         tbox::Pointer<pdat::SideData<double> >(NULL)) const;
+
+   /**
+    * Return discrete root mean squared norm of the data.  If the control
+    * volume is not NULL, the return value is the \f$L_2\f$-norm divided by
+    * the square root of the sum of the control volumes.  Otherwise, the
+    * return value is the \f$L_2\f$-norm divided by the square root of the
+    * number of data entries.
+    */
+   double
+   RMSNorm(
+      const tbox::Pointer<pdat::SideData<dcomplex> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::SideData<double> > cvol =
+         tbox::Pointer<pdat::SideData<double> >(NULL)) const;
+
+   /**
+    * Return discrete weighted root mean squared norm of the data.  If the
+    * control volume is not NULL, the return value is the weighted \f$L_2\f$-norm
+    * divided by the square root of the sum of the control volumes.  Otherwise,
+    * the return value is the weighted \f$L_2\f$-norm divided by the square root
+    * of the number of data entries.
+    */
+   double
+   weightedRMSNorm(
+      const tbox::Pointer<pdat::SideData<dcomplex> >& data,
+      const tbox::Pointer<pdat::SideData<dcomplex> >& weight,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::SideData<double> > cvol =
+         tbox::Pointer<pdat::SideData<double> >(NULL)) const;
+
+   /**
+    * Return the \f$\max\f$-norm of the data using the control volume to weight
+    * the contribution of each data entry to the maximum.  That is, the return
+    * value is \f$\max_i ( \sqrt{data_i * \bar{data_i}} )\f$, where the max is
+    * over the data elements where \f$cvol_i > 0\f$.  If the control volume is
+    * NULL, it is ignored during the computation of the maximum.
+    */
+   double
+   maxNorm(
+      const tbox::Pointer<pdat::SideData<dcomplex> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::SideData<double> > cvol =
+         tbox::Pointer<pdat::SideData<double> >(NULL)) const;
+
+   /**
+    * Return the dot product of the two data arrays using the control volume
+    * to weight the contribution of each product to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( data1_i * \bar{data2_i} * cvol_i )\f$.
+    * If the control volume is NULL, it is ignored during the summation.
+    */
+   dcomplex
+   dot(
+      const tbox::Pointer<pdat::SideData<dcomplex> >& data1,
+      const tbox::Pointer<pdat::SideData<dcomplex> >& data2,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::SideData<double> > cvol =
+         tbox::Pointer<pdat::SideData<double> >(NULL)) const;
+
+   /**
+    * Return the integral of the function represented by the data array.
+    * The return value is the sum \f$\sum_i ( data_i * vol_i )\f$.
+    */
+   dcomplex
+   integral(
+      const tbox::Pointer<pdat::SideData<dcomplex> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::SideData<double> > vol) const;
+
+private:
+   // The following are not implemented:
+   PatchSideDataNormOpsComplex(
+      const PatchSideDataNormOpsComplex&);
+   void
+   operator = (
+      const PatchSideDataNormOpsComplex&);
+
+   ArrayDataNormOpsComplex d_array_ops;
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchSideDataNormOpsReal.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchSideDataNormOpsReal.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,429 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated norm operations for real side-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchSideDataNormOpsReal_C
+#define included_math_PatchSideDataNormOpsReal_C
+
+#include "SAMRAI/math/PatchSideDataNormOpsReal.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/pdat/SideGeometry.h"
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+PatchSideDataNormOpsReal<TYPE>::PatchSideDataNormOpsReal()
+{
+}
+
+template<class TYPE>
+PatchSideDataNormOpsReal<TYPE>::~PatchSideDataNormOpsReal()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The const constructor and assignment operator are not actually used   *
+ * but are defined here for compilers that require an implementation for *
+ * every declaration.                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+PatchSideDataNormOpsReal<TYPE>::PatchSideDataNormOpsReal(
+   const PatchSideDataNormOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void PatchSideDataNormOpsReal<TYPE>::operator = (
+   const PatchSideDataNormOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute the number of data entries on a patch in the given box.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+int PatchSideDataNormOpsReal<TYPE>::numberOfEntries(
+   const tbox::Pointer<pdat::SideData<TYPE> >& data,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   int retval = 0;
+   const hier::Box ibox = box * data->getGhostBox();
+   const hier::IntVector& directions = data->getDirectionVector();
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box dbox = pdat::SideGeometry::toSideBox(ibox, d);
+         retval += (dbox.size() * data->getDepth());
+      }
+   }
+   return retval;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Templated norm operations for real side-centered data.                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+double PatchSideDataNormOpsReal<TYPE>::sumControlVolumes(
+   const tbox::Pointer<pdat::SideData<TYPE> >& data,
+   const tbox::Pointer<pdat::SideData<double> >& cvol,
+   const hier::Box& box) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull() && !cvol.isNull());
+#endif
+   double retval = 0.0;
+   const hier::IntVector& directions = data->getDirectionVector();
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(directions ==
+      hier::IntVector::min(directions, cvol->getDirectionVector()));
+#endif
+   const tbox::Dimension& dim(data->getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+         retval += d_array_ops.sumControlVolumes(data->getArrayData(d),
+               cvol->getArrayData(d),
+               side_box);
+      }
+   }
+   return retval;
+}
+
+template<class TYPE>
+void PatchSideDataNormOpsReal<TYPE>::abs(
+   tbox::Pointer<pdat::SideData<TYPE> >& dst,
+   const tbox::Pointer<pdat::SideData<TYPE> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_ASSERT(dst->getDirectionVector() == src->getDirectionVector());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(dst->getDim());
+
+   const hier::IntVector& directions = dst->getDirectionVector();
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+         d_array_ops.abs(dst->getArrayData(d),
+            src->getArrayData(d),
+            side_box);
+      }
+   }
+}
+
+template<class TYPE>
+double PatchSideDataNormOpsReal<TYPE>::L1Norm(
+   const tbox::Pointer<pdat::SideData<TYPE> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::SideData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(data->getDim());
+
+   double retval = 0.0;
+   const hier::IntVector& directions = data->getDirectionVector();
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (directions(d)) {
+            const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+            retval += d_array_ops.L1Norm(data->getArrayData(d), side_box);
+         }
+      }
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+      TBOX_ASSERT(directions ==
+         hier::IntVector::min(directions, cvol->getDirectionVector()));
+
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (directions(d)) {
+            const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+            retval += d_array_ops.L1NormWithControlVolume(data->getArrayData(d),
+                  cvol->getArrayData(d),
+                  side_box);
+         }
+      }
+   }
+   return retval;
+}
+
+template<class TYPE>
+double PatchSideDataNormOpsReal<TYPE>::L2Norm(
+   const tbox::Pointer<pdat::SideData<TYPE> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::SideData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(data->getDim());
+
+   double retval = 0.0;
+   const hier::IntVector& directions = data->getDirectionVector();
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (directions(d)) {
+            const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+            double aval = d_array_ops.L2Norm(data->getArrayData(d), side_box);
+            retval += aval * aval;
+         }
+      }
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+      TBOX_ASSERT(directions ==
+         hier::IntVector::min(directions, cvol->getDirectionVector()));
+
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (directions(d)) {
+            const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+            double aval = d_array_ops.L2NormWithControlVolume(
+                  data->getArrayData(d),
+                  cvol->getArrayData(d),
+                  side_box);
+            retval += aval * aval;
+         }
+      }
+   }
+   return sqrt(retval);
+}
+
+template<class TYPE>
+double PatchSideDataNormOpsReal<TYPE>::weightedL2Norm(
+   const tbox::Pointer<pdat::SideData<TYPE> >& data,
+   const tbox::Pointer<pdat::SideData<TYPE> >& weight,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::SideData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull() && !weight.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*data, *weight, box);
+
+   const tbox::Dimension& dim(data->getDim());
+
+   double retval = 0.0;
+   const hier::IntVector& directions = data->getDirectionVector();
+
+   TBOX_ASSERT(directions ==
+      hier::IntVector::min(directions, weight->getDirectionVector()));
+
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (directions(d)) {
+            const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+            double aval = d_array_ops.weightedL2Norm(data->getArrayData(d),
+                  weight->getArrayData(d),
+                  side_box);
+            retval += aval * aval;
+         }
+      }
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+      TBOX_ASSERT(directions ==
+         hier::IntVector::min(directions, cvol->getDirectionVector()));
+
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (directions(d)) {
+            const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+            double aval = d_array_ops.weightedL2NormWithControlVolume(
+                  data->getArrayData(d),
+                  weight->getArrayData(d),
+                  cvol->getArrayData(d),
+                  side_box);
+            retval += aval * aval;
+         }
+      }
+   }
+   return sqrt(retval);
+}
+
+template<class TYPE>
+double PatchSideDataNormOpsReal<TYPE>::RMSNorm(
+   const tbox::Pointer<pdat::SideData<TYPE> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::SideData<double> > cvol) const
+{
+// SGS
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   double retval = L2Norm(data, box, cvol);
+   if (cvol.isNull()) {
+      retval /= sqrt((double)numberOfEntries(data, box));
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+      retval /= sqrt(sumControlVolumes(data, cvol, box));
+   }
+   return retval;
+}
+
+template<class TYPE>
+double PatchSideDataNormOpsReal<TYPE>::weightedRMSNorm(
+   const tbox::Pointer<pdat::SideData<TYPE> >& data,
+   const tbox::Pointer<pdat::SideData<TYPE> >& weight,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::SideData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull() && !weight.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   double retval = weightedL2Norm(data, weight, box, cvol);
+   if (cvol.isNull()) {
+      retval /= sqrt((double)numberOfEntries(data, box));
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+      retval /= sqrt(sumControlVolumes(data, cvol, box));
+   }
+   return retval;
+}
+
+template<class TYPE>
+double PatchSideDataNormOpsReal<TYPE>::maxNorm(
+   const tbox::Pointer<pdat::SideData<TYPE> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::SideData<double> > cvol) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(data->getDim());
+
+   double retval = 0.0;
+   const hier::IntVector& directions = data->getDirectionVector();
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (directions(d)) {
+            const hier::Box side_box =
+               pdat::SideGeometry::toSideBox(box, d);
+            retval = tbox::MathUtilities<double>::Max(retval,
+                  d_array_ops.maxNorm(data->getArrayData(d), side_box));
+         }
+      }
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data, *cvol);
+      TBOX_ASSERT(directions ==
+         hier::IntVector::min(directions, cvol->getDirectionVector()));
+
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (directions(d)) {
+            const hier::Box side_box =
+               pdat::SideGeometry::toSideBox(box, d);
+            retval = tbox::MathUtilities<double>::Max(retval,
+                  d_array_ops.maxNormWithControlVolume(
+                     data->getArrayData(d),
+                     cvol->getArrayData(d),
+                     side_box));
+         }
+      }
+   }
+   return retval;
+}
+
+template<class TYPE>
+TYPE PatchSideDataNormOpsReal<TYPE>::dot(
+   const tbox::Pointer<pdat::SideData<TYPE> >& data1,
+   const tbox::Pointer<pdat::SideData<TYPE> >& data2,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::SideData<double> > cvol) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data1.isNull() && !data2.isNull());
+   TBOX_ASSERT(data1->getDirectionVector() == data2->getDirectionVector());
+#endif
+   const tbox::Dimension& dim(data1->getDim());
+
+   TYPE retval = 0.0;
+   const hier::IntVector& directions = data1->getDirectionVector();
+   if (cvol.isNull()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (directions(d)) {
+            const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+            retval += d_array_ops.dot(data1->getArrayData(d),
+                  data2->getArrayData(d),
+                  side_box);
+         }
+      }
+   } else {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*data1, *cvol);
+      TBOX_ASSERT(directions ==
+         hier::IntVector::min(directions, cvol->getDirectionVector()));
+
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (directions(d)) {
+            const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+            retval += d_array_ops.dotWithControlVolume(
+                  data1->getArrayData(d),
+                  data2->getArrayData(d),
+                  cvol->getArrayData(d),
+                  side_box);
+         }
+      }
+   }
+   return retval;
+}
+
+template<class TYPE>
+TYPE PatchSideDataNormOpsReal<TYPE>::integral(
+   const tbox::Pointer<pdat::SideData<TYPE> >& data,
+   const hier::Box& box,
+   const tbox::Pointer<pdat::SideData<double> > vol) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_ASSERT(!vol.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*data, box, *vol);
+
+   const tbox::Dimension& dim(data->getDim());
+
+   TYPE retval = 0.0;
+   const hier::IntVector& directions = data->getDirectionVector();
+
+   TBOX_ASSERT(directions ==
+      hier::IntVector::min(directions, vol->getDirectionVector()));
+
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+         retval += d_array_ops.integral(
+               data->getArrayData(d),
+               vol->getArrayData(d),
+               side_box);
+      }
+   }
+
+   return retval;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchSideDataNormOpsReal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchSideDataNormOpsReal.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,223 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated norm operations for real side-centered data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchSideDataNormOpsReal
+#define included_math_PatchSideDataNormOpsReal
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/math/ArrayDataNormOpsReal.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchSideDataNormOpsReal provides a collection of common
+ * norm operations that may be applied to real (double or float)
+ * numerical side-centered patch data.  The primary intent of this class is
+ * to define part of the interface for an PatchSideDataOpsReal object
+ * which provides access operations that may be used to manipulate
+ * side-centered patch data.  Each member function accepts a box argument
+ * indicating the region of index space on which the operation should be
+ * performed.  The operation will be performed on the intersection of this
+ * box and those boxes corresponding to the patch data objects.  Also, each
+ * operation allows an additional side-centered patch data object to be used
+ * to represent a control volume that weights the contribution of each data
+ * entry in the given norm calculation.  Note that the control volume patch
+ * data must be of type double and have side-centered geometry (i.e., the
+ * same as the data itself).  The use of control volumes is important when
+ * these operations are used in vector kernels where the data resides over
+ * multiple levels of spatial resolution in an AMR hierarchy.  If the control
+ * volume is not given in the function call, it will be ignored in the
+ * calculation.  Also, note that the depth of the control volume patch data
+ * object must be either 1 or be equal to the depth of the other data objects.
+ *
+ * These operations typically apply only to the numerical standard built-in
+ * types, such as double, float, and the complex type (which may or may not
+ * be a built-in type depending on the C++ compiler).  This templated
+ * class should only be used to instantiate objects with double or float as
+ * the template parameter.  Note that a similar set of norm operations is
+ * implemented for complex patch data in the class
+ * PatchSideDataNormOpsComplex.
+ *
+ * @see math::ArrayDataNormOpsReal
+ */
+
+template<class TYPE>
+class PatchSideDataNormOpsReal
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchSideDataNormOpsReal();
+
+   virtual ~PatchSideDataNormOpsReal<TYPE>();
+
+   /**
+    * Return the number of data values for the side-centered data object
+    * in the given box.  Note that it is assumed that the box refers to
+    * the cell-centered index space corresponding to the patch hierarchy.
+    */
+   int
+   numberOfEntries(
+      const tbox::Pointer<pdat::SideData<TYPE> >& data,
+      const hier::Box& box) const;
+
+   /**
+    * Return sum of control volume entries for the side-centered data object.
+    */
+   double
+   sumControlVolumes(
+      const tbox::Pointer<pdat::SideData<TYPE> >& data,
+      const tbox::Pointer<pdat::SideData<double> >& cvol,
+      const hier::Box& box) const;
+
+   /**
+    * Set destination component to absolute value of source component.
+    * That is, each destination entry is set to \f$d_i = \| s_i \|\f$.
+    */
+   void
+   abs(
+      tbox::Pointer<pdat::SideData<TYPE> >& dst,
+      const tbox::Pointer<pdat::SideData<TYPE> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Return discrete \f$L_1\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( \| data_i \| cvol_i )\f$.  If the
+    * control volume is NULL, the return value is \f$\sum_i ( \| data_i \| )\f$.
+    */
+   double
+   L1Norm(
+      const tbox::Pointer<pdat::SideData<TYPE> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::SideData<double> > cvol =
+         tbox::Pointer<pdat::SideData<double> >(NULL)) const;
+
+   /**
+    * Return discrete \f$L_2\f$-norm of the data using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum \f$\sqrt{ \sum_i ( (data_i)^2 cvol_i ) }\f$.
+    * If the control volume is NULL, the return value is
+    * \f$\sqrt{ \sum_i ( (data_i)^2 cvol_i ) }\f$.
+    */
+   double
+   L2Norm(
+      const tbox::Pointer<pdat::SideData<TYPE> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::SideData<double> > cvol =
+         tbox::Pointer<pdat::SideData<double> >(NULL)) const;
+
+   /**
+    * Return discrete weighted \f$L_2\f$-norm of the data using the control
+    * volume to weight the contribution of the data and weight entries to
+    * the sum.  That is, the return value is the sum \f$\sqrt{ \sum_i (
+    * (data_i * weight_i)^2 cvol_i ) }\f$.  If the control volume is NULL,
+    * the return value is \f$\sqrt{ \sum_i ( (data_i * weight_i)^2 ) }\f$.
+    */
+   double
+   weightedL2Norm(
+      const tbox::Pointer<pdat::SideData<TYPE> >& data,
+      const tbox::Pointer<pdat::SideData<TYPE> >& weight,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::SideData<double> > cvol =
+         tbox::Pointer<pdat::SideData<double> >(NULL)) const;
+
+   /**
+    * Return discrete root mean squared norm of the data.  If the control
+    * volume is not NULL, the return value is the \f$L_2\f$-norm divided by
+    * the square root of the sum of the control volumes.  Otherwise, the
+    * return value is the \f$L_2\f$-norm divided by the square root of the
+    * number of data entries.
+    */
+   double
+   RMSNorm(
+      const tbox::Pointer<pdat::SideData<TYPE> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::SideData<double> > cvol =
+         tbox::Pointer<pdat::SideData<double> >(NULL)) const;
+
+   /**
+    * Return discrete weighted root mean squared norm of the data.  If the
+    * control volume is not NULL, the return value is the weighted \f$L_2\f$-norm
+    * divided by the square root of the sum of the control volumes.  Otherwise,
+    * the return value is the weighted \f$L_2\f$-norm divided by the square root
+    * of the number of data entries.
+    */
+   double
+   weightedRMSNorm(
+      const tbox::Pointer<pdat::SideData<TYPE> >& data,
+      const tbox::Pointer<pdat::SideData<TYPE> >& weight,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::SideData<double> > cvol =
+         tbox::Pointer<pdat::SideData<double> >(NULL)) const;
+
+   /**
+    * Return the \f$\max\f$-norm of the data using the control volume to weight
+    * the contribution of each data entry to the maximum.  That is, the return
+    * value is \f$\max_i ( \| data_i \| )\f$, where the max is over the data
+    * elements where \f$cvol_i > 0\f$.  If the control volume is NULL, it is
+    * ignored during the computation of the maximum.
+    */
+   double
+   maxNorm(
+      const tbox::Pointer<pdat::SideData<TYPE> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::SideData<double> > cvol =
+         tbox::Pointer<pdat::SideData<double> >(NULL)) const;
+
+   /**
+    * Return the dot product of the two data arrays using the control volume
+    * to weight the contribution of each product to the sum.  That is, the
+    * return value is the sum \f$\sum_i ( data1_i * data2_i * cvol_i )\f$.
+    * If the control volume is NULL, it is ignored during the summation.
+    */
+   TYPE
+   dot(
+      const tbox::Pointer<pdat::SideData<TYPE> >& data1,
+      const tbox::Pointer<pdat::SideData<TYPE> >& data2,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::SideData<double> > cvol =
+         tbox::Pointer<pdat::SideData<double> >(NULL)) const;
+
+   /**
+    * Return the integral of the function represented by the data array.
+    * The return value is the sum \f$\sum_i ( data_i * vol_i )\f$.
+    */
+   TYPE
+   integral(
+      const tbox::Pointer<pdat::SideData<TYPE> >& data,
+      const hier::Box& box,
+      const tbox::Pointer<pdat::SideData<double> > vol) const;
+
+private:
+   // The following are not implemented:
+   PatchSideDataNormOpsReal(
+      const PatchSideDataNormOpsReal<TYPE>&);
+   void
+   operator = (
+      const PatchSideDataNormOpsReal<TYPE>&);
+
+   ArrayDataNormOpsReal<TYPE> d_array_ops;
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/PatchSideDataNormOpsReal.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchSideDataOpsComplex.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchSideDataOpsComplex.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,105 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for complex side-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchSideDataOpsComplex_C
+#define included_math_PatchSideDataOpsComplex_C
+
+#include "SAMRAI/math/PatchSideDataOpsComplex.h"
+#include "SAMRAI/pdat/SideGeometry.h"
+#ifdef DEBUG_CHECK_ASSERTIONS
+#include "SAMRAI/tbox/Utilities.h"
+#endif
+
+namespace SAMRAI {
+namespace math {
+
+PatchSideDataOpsComplex::PatchSideDataOpsComplex()
+{
+}
+
+PatchSideDataOpsComplex::~PatchSideDataOpsComplex()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * General operations for complex side-centered patch data.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchSideDataOpsComplex::swapData(
+   tbox::Pointer<hier::Patch> patch,
+   const int data1_id,
+   const int data2_id) const
+{
+   TBOX_ASSERT(!patch.isNull());
+
+   tbox::Pointer<pdat::SideData<dcomplex> > d1 = patch->getPatchData(data1_id);
+   tbox::Pointer<pdat::SideData<dcomplex> > d2 = patch->getPatchData(data2_id);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d1.isNull() && !d2.isNull());
+   TBOX_ASSERT(d1->getDepth() && d2->getDepth());
+   TBOX_ASSERT(d1->getBox() == d2->getBox());
+   TBOX_ASSERT(d1->getDirectionVector() == d2->getDirectionVector());
+   TBOX_ASSERT(d1->getGhostBox() == d2->getGhostBox());
+#endif
+   patch->setPatchData(data1_id, d2);
+   patch->setPatchData(data2_id, d1);
+}
+
+void PatchSideDataOpsComplex::printData(
+   const tbox::Pointer<pdat::SideData<dcomplex> >& data,
+   const hier::Box& box,
+   std::ostream& s) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   s << "Data box = " << box << std::endl;
+   data->print(box, s);
+   s << "\n";
+}
+
+void PatchSideDataOpsComplex::copyData(
+   tbox::Pointer<pdat::SideData<dcomplex> >& dst,
+   const tbox::Pointer<pdat::SideData<dcomplex> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_ASSERT(dst->getDirectionVector() == src->getDirectionVector());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   const hier::IntVector& directions = dst->getDirectionVector();
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+         (dst->getArrayData(d)).copy(src->getArrayData(d), side_box);
+      }
+   }
+}
+
+void PatchSideDataOpsComplex::setToScalar(
+   tbox::Pointer<pdat::SideData<dcomplex> >& dst,
+   const dcomplex& alpha,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*dst, box);
+
+   dst->fillAll(alpha, box);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchSideDataOpsComplex.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchSideDataOpsComplex.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for complex side-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchSideDataOpsComplex
+#define included_math_PatchSideDataOpsComplex
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/math/PatchSideDataBasicOps.h"
+#include "SAMRAI/math/PatchSideDataNormOpsComplex.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchSideDataOpsComplex provides a collection of operations
+ * that may be used to manipulate complex side-centered patch data.  The
+ * operations include basic arithmetic and norms.  With the
+ * assertion of a few basic routines, this class inherits its interface (and
+ * thus its functionality) from the base classes PatchSideDataBasicOps,
+ * PatchSideDataNormOpsComplex from which it is derived.  The
+ * name of each of these base classes is indicative of the set of
+ * side-centered patch data operations that it provides.
+ *
+ * A similar set of operations is implemented for real (double and float) and
+ * integer patch data in the classes PatchSideDataOpsReal and
+ * PatchSideDataOpsInteger, repsectively.
+ *
+ * @see math::PatchSideDataBasicOps
+ * @see math::PatchSideDataNormOpsComplex
+ */
+
+class PatchSideDataOpsComplex:
+   public tbox::DescribedClass,
+   public PatchSideDataBasicOps<dcomplex>,
+   public PatchSideDataNormOpsComplex
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchSideDataOpsComplex();
+
+   virtual ~PatchSideDataOpsComplex();
+
+   /**
+    * Copy dst data to src data over given box.
+    */
+   void
+   copyData(
+      tbox::Pointer<pdat::SideData<dcomplex> >& dst,
+      const tbox::Pointer<pdat::SideData<dcomplex> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Swap pointers for patch data objects.  Objects are checked for
+    * consistency of depth, box, and ghost box.
+    */
+   void
+   swapData(
+      tbox::Pointer<hier::Patch> patch,
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data entries over given box to given output stream.
+    */
+   void
+   printData(
+      const tbox::Pointer<pdat::SideData<dcomplex> >& data,
+      const hier::Box& box,
+      std::ostream& s = tbox::plog) const;
+
+   /**
+    * Initialize data to given scalar over given box.
+    */
+   void
+   setToScalar(
+      tbox::Pointer<pdat::SideData<dcomplex> >& dst,
+      const dcomplex& alpha,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   PatchSideDataOpsComplex(
+      const PatchSideDataOpsComplex&);
+   void
+   operator = (
+      const PatchSideDataOpsComplex&);
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchSideDataOpsInteger.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchSideDataOpsInteger.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,156 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for integer side-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchSideDataOpsInteger_C
+#define included_math_PatchSideDataOpsInteger_C
+
+#include "SAMRAI/math/PatchSideDataOpsInteger.h"
+#include "SAMRAI/pdat/SideGeometry.h"
+#ifdef DEBUG_CHECK_ASSERTIONS
+#include "SAMRAI/tbox/Utilities.h"
+#endif
+
+namespace SAMRAI {
+namespace math {
+
+PatchSideDataOpsInteger::PatchSideDataOpsInteger()
+{
+}
+
+PatchSideDataOpsInteger::~PatchSideDataOpsInteger()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute the number of data entries on a patch in the given box.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int PatchSideDataOpsInteger::numberOfEntries(
+   const tbox::Pointer<pdat::SideData<int> >& data,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   int retval = 0;
+   const hier::Box ibox = box * data->getGhostBox();
+   const hier::IntVector& directions = data->getDirectionVector();
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box dbox = pdat::SideGeometry::toSideBox(ibox, d);
+         retval += (dbox.size() * data->getDepth());
+      }
+   }
+   return retval;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * General operations for integer side-centered patch data.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchSideDataOpsInteger::swapData(
+   tbox::Pointer<hier::Patch> patch,
+   const int data1_id,
+   const int data2_id) const
+{
+   TBOX_ASSERT(!patch.isNull());
+
+   tbox::Pointer<pdat::SideData<int> > d1 = patch->getPatchData(data1_id);
+   tbox::Pointer<pdat::SideData<int> > d2 = patch->getPatchData(data2_id);
+
+   TBOX_ASSERT(!d1.isNull() && !d2.isNull());
+   TBOX_ASSERT(d1->getDepth() && d2->getDepth());
+   TBOX_ASSERT(d1->getBox() == d2->getBox());
+   TBOX_ASSERT(d1->getDirectionVector() == d2->getDirectionVector());
+   TBOX_ASSERT(d1->getGhostBox() == d2->getGhostBox());
+
+   patch->setPatchData(data1_id, d2);
+   patch->setPatchData(data2_id, d1);
+}
+
+void PatchSideDataOpsInteger::printData(
+   const tbox::Pointer<pdat::SideData<int> >& data,
+   const hier::Box& box,
+   std::ostream& s) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   s << "Data box = " << box << std::endl;
+   data->print(box, s);
+   s << "\n";
+}
+
+void PatchSideDataOpsInteger::copyData(
+   tbox::Pointer<pdat::SideData<int> >& dst,
+   const tbox::Pointer<pdat::SideData<int> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_ASSERT(dst->getDirectionVector() == src->getDirectionVector());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   const hier::IntVector& directions = dst->getDirectionVector();
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+         (dst->getArrayData(d)).copy(src->getArrayData(d), side_box);
+      }
+   }
+}
+
+void PatchSideDataOpsInteger::setToScalar(
+   tbox::Pointer<pdat::SideData<int> >& dst,
+   const int& alpha,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*dst, box);
+
+   dst->fillAll(alpha, box);
+}
+
+void PatchSideDataOpsInteger::abs(
+   tbox::Pointer<pdat::SideData<int> >& dst,
+   const tbox::Pointer<pdat::SideData<int> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_ASSERT(dst->getDirectionVector() == src->getDirectionVector());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   const hier::IntVector& directions = dst->getDirectionVector();
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+         d_array_ops.abs(dst->getArrayData(d),
+            src->getArrayData(d),
+            side_box);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchSideDataOpsInteger.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchSideDataOpsInteger.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,127 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operations for integer side-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchSideDataOpsInteger
+#define included_math_PatchSideDataOpsInteger
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/math/PatchSideDataBasicOps.h"
+#include "SAMRAI/math/ArrayDataNormOpsInteger.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchSideDataOpsInteger provides a collection of operations
+ * that may be used to manipulate integer side-centered patch data.  The
+ * operations include basic arithmetic, min, max, etc.  With the assertion
+ * of a few basic routines, this class inherits its interface (and
+ * thus its functionality) from the base class PatchSideDataBasicOps
+ * from which it is derived.
+ *
+ * A more extensive set of operations is implemented for real (double and
+ * float) and complex patch data in the classes PatchSideDataOpsReal
+ * and PatchSideDataOpsComplex, repsectively.
+ *
+ * @see math::PatchSideDataBasicOps
+ */
+
+class PatchSideDataOpsInteger:
+   public tbox::DescribedClass,
+   public PatchSideDataBasicOps<int>
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchSideDataOpsInteger();
+
+   virtual ~PatchSideDataOpsInteger();
+
+   /**
+    * Return the number of data values for the side-centered data object
+    * in the given box.  Note that it is assumed that the box refers to
+    * the cell-centered index space corresponding to the patch hierarchy.
+    */
+   int
+   numberOfEntries(
+      const tbox::Pointer<pdat::SideData<int> >& data,
+      const hier::Box& box) const;
+
+   /**
+    * Copy dst data to src data over given box.
+    */
+   void
+   copyData(
+      tbox::Pointer<pdat::SideData<int> >& dst,
+      const tbox::Pointer<pdat::SideData<int> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Swap pointers for patch data objects.  Objects are checked for
+    * consistency of depth, box, and ghost box.
+    */
+   void
+   swapData(
+      tbox::Pointer<hier::Patch> patch,
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data entries over given box to given output stream.
+    */
+   void
+   printData(
+      const tbox::Pointer<pdat::SideData<int> >& data,
+      const hier::Box& box,
+      std::ostream& s = tbox::plog) const;
+
+   /**
+    * Initialize data to given scalar over given box.
+    */
+   void
+   setToScalar(
+      tbox::Pointer<pdat::SideData<int> >& dst,
+      const int& alpha,
+      const hier::Box& box) const;
+
+   /**
+    * Set destination component to absolute value of source component.
+    * That is, each destination entry is set to \f$d_i = \| s_i \|\f$.
+    */
+   void
+   abs(
+      tbox::Pointer<pdat::SideData<int> >& dst,
+      const tbox::Pointer<pdat::SideData<int> >& src,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   PatchSideDataOpsInteger(
+      const PatchSideDataOpsInteger&);
+   void
+   operator = (
+      const PatchSideDataOpsInteger&);
+
+   ArrayDataNormOpsInteger d_array_ops;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchSideDataOpsReal.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchSideDataOpsReal.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,139 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations for real side-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchSideDataOpsReal_C
+#define included_math_PatchSideDataOpsReal_C
+
+#include "SAMRAI/math/PatchSideDataOpsReal.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/pdat/SideGeometry.h"
+
+namespace SAMRAI {
+namespace math {
+
+template<class TYPE>
+PatchSideDataOpsReal<TYPE>::PatchSideDataOpsReal()
+{
+}
+
+#if 0
+/*
+ * This was moved into the header due to what looks like bug in the
+ * XLC compiler.
+ */
+template<class TYPE>
+PatchSideDataOpsReal<TYPE>::~PatchSideDataOpsReal()
+{
+}
+#endif
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The const constructor and assignment operator are not actually used   *
+ * but are defined here for compilers that require an implementation for *
+ * every declaration.                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+PatchSideDataOpsReal<TYPE>::PatchSideDataOpsReal(
+   const PatchSideDataOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void PatchSideDataOpsReal<TYPE>::operator = (
+   const PatchSideDataOpsReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * General templated operations for real side-centered patch data.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void PatchSideDataOpsReal<TYPE>::swapData(
+   tbox::Pointer<hier::Patch> patch,
+   const int data1_id,
+   const int data2_id) const
+{
+   TBOX_ASSERT(!patch.isNull());
+
+   tbox::Pointer<pdat::SideData<TYPE> > d1 = patch->getPatchData(data1_id);
+   tbox::Pointer<pdat::SideData<TYPE> > d2 = patch->getPatchData(data2_id);
+
+   TBOX_ASSERT(!d1.isNull() && !d2.isNull());
+   TBOX_ASSERT(d1->getDepth() && d2->getDepth());
+   TBOX_ASSERT(d1->getBox() == d2->getBox());
+   TBOX_ASSERT(d1->getDirectionVector() == d2->getDirectionVector());
+   TBOX_ASSERT(d1->getGhostBox() == d2->getGhostBox());
+
+   patch->setPatchData(data1_id, d2);
+   patch->setPatchData(data2_id, d1);
+}
+
+template<class TYPE>
+void PatchSideDataOpsReal<TYPE>::printData(
+   const tbox::Pointer<pdat::SideData<TYPE> >& data,
+   const hier::Box& box,
+   std::ostream& s) const
+{
+   TBOX_ASSERT(!data.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*data, box);
+
+   s << "Data box = " << box << std::endl;
+   data->print(box, s);
+   s << "\n";
+}
+
+template<class TYPE>
+void PatchSideDataOpsReal<TYPE>::copyData(
+   tbox::Pointer<pdat::SideData<TYPE> >& dst,
+   const tbox::Pointer<pdat::SideData<TYPE> >& src,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull() && !src.isNull());
+   TBOX_ASSERT(dst->getDirectionVector() == src->getDirectionVector());
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst, *src, box);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   const hier::IntVector& directions = dst->getDirectionVector();
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box side_box = pdat::SideGeometry::toSideBox(box, d);
+         (dst->getArrayData(d)).copy(src->getArrayData(d), side_box);
+      }
+   }
+}
+
+template<class TYPE>
+void PatchSideDataOpsReal<TYPE>::setToScalar(
+   tbox::Pointer<pdat::SideData<TYPE> >& dst,
+   const TYPE& alpha,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT(!dst.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*dst, box);
+
+   dst->fillAll(alpha, box);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/PatchSideDataOpsReal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/PatchSideDataOpsReal.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations for real side-centered patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_math_PatchSideDataOpsReal
+#define included_math_PatchSideDataOpsReal
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/math/PatchSideDataBasicOps.h"
+#include "SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h"
+#include "SAMRAI/math/PatchSideDataNormOpsReal.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace math {
+
+/**
+ * Class PatchSideDataOpsReal provides a collection of operations
+ * to manipulate float and double numerical side-centered patch data.  The
+ * operations include basic arithmetic, norms and ordering, and assorted
+ * miscellaneous operations.  With the assertion of a few basic routines,
+ * this class inherits its interface (and thus its functionality) from the
+ * base classes PatchSideDataBasicOps, PatchSideDataNormOpsReal,
+ * and PatchSideDataMiscellaneousOpsReal from which it is derived.  The
+ * name of each of these base classes is indicative of the set of
+ * side-centered patch data operations that it provides.
+ *
+ * Note that this templated class should only be used to instantiate
+ * objects with double or float as the template parameter.  A similar set of
+ * operations is implemented for complex and integer patch data in the classes
+ * PatchSideDataOpsComplex and PatchSideDataOpsInteger,
+ * repsectively.
+ *
+ * @see math::PatchSideDataBasicOps
+ * @see math::PatchSideDataMiscellaneousOpsReal
+ * @see math::PatchSideDataNormOpsReal
+ */
+
+template<class TYPE>
+class PatchSideDataOpsReal:
+   public tbox::DescribedClass,
+   public PatchSideDataBasicOps<TYPE>,
+   public PatchSideDataMiscellaneousOpsReal<TYPE>,
+   public PatchSideDataNormOpsReal<TYPE>
+{
+public:
+   /**
+    * Empty constructor and destructor.
+    */
+   PatchSideDataOpsReal();
+
+   virtual ~PatchSideDataOpsReal<TYPE>() {}
+
+   /**
+    * Copy dst data to src data over given box.
+    */
+   void
+   copyData(
+      tbox::Pointer<pdat::SideData<TYPE> >& dst,
+      const tbox::Pointer<pdat::SideData<TYPE> >& src,
+      const hier::Box& box) const;
+
+   /**
+    * Swap pointers for patch data objects.  Objects are checked for
+    * consistency of depth, box, and ghost box.
+    */
+   void
+   swapData(
+      tbox::Pointer<hier::Patch> patch,
+      const int data1_id,
+      const int data2_id) const;
+
+   /**
+    * Print data entries over given box to given output stream.
+    */
+   void
+   printData(
+      const tbox::Pointer<pdat::SideData<TYPE> >& data,
+      const hier::Box& box,
+      std::ostream& s = tbox::plog) const;
+
+   /**
+    * Initialize data to given scalar over given box.
+    */
+   void
+   setToScalar(
+      tbox::Pointer<pdat::SideData<TYPE> >& dst,
+      const TYPE& alpha,
+      const hier::Box& box) const;
+
+private:
+   // The following are not implemented:
+   PatchSideDataOpsReal(
+      const PatchSideDataOpsReal<TYPE>&);
+   void
+   operator = (
+      const PatchSideDataOpsReal<TYPE>&);
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/math/PatchSideDataOpsReal.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/dox/manual.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/dox/manual.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,65 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace math {
+
+/*!
+  @page package_mathematical_operations Mathematical Operations Package
+ 
+  The Mathematical Operations Package contains classes that provide basic
+  numerical operations for array-based (i.e., cell-centered, face-centered, 
+  side-centered, node-centered, and edge-centered quantities) data on an 
+  AMR patch hierarchy.  Routines include arithmetic as well as other 
+  operations, such as dot products and norms.   Operations may be applied 
+  on individual patches or collections of patch levels in an AMR hierarchy.
+  For each patch data type, two sets of classes are provided.  One provides 
+  operations for a single patch.  The other performs operations on hierarchy 
+  levels.  The hierarchy operation classes are implemented using the patch 
+  operation classes.  The patch operation classes are implemented using 
+  the array data operation classes.  The array operation classes apply to all 
+  array-based patch data types.
+ 
+  The operations are used mostly in the vector kernel classes provided 
+  in the "Solvers" package.  However, they are just as easily used 
+  independent of the vectors.  Many of the operations allow one to define 
+  control volume elements that weight the contribution of each data entry 
+  in the particular operation and geometry of the variable involved.  This 
+  is particularly useful for computing quantities such as norms on a 
+  locally-refined AMR hierarchy where it may be necessary to mask out regions 
+  on coarser levels that are covered by refined cells.
+ 
+  For ease of use, a simple operation manager is provided so that one may 
+  obtain a pointer to an appropriate operator object by querying the manager 
+  object with the variable of interest.  At this time, the manager deals
+  with hierarchy operation objects only.  It is assumed that routines 
+  that treat individual patches will be aware of the form of the data and
+  so these routines can generate the proper operation objects directly.
+  Additional operation manager capabilities may be provided in the future.
+ 
+  Support for mathematical operations is divided into seven categories:
+  -# @ref package_mathops_array "operations for array data (all others depend on these)"
+  -# @ref package_mathops_cell "cell-centered data operations"
+  -# edge-centered data operations
+  -# face-centered data operations
+  -# node-centered data operations
+  -# side-centered data operations
+  -# @ref package_mathops_hierarchy "hierarchy operations independent of centering (used in vectors)"
+ 
+  All class names in the Mathematical Operations package are in the
+  namespace SAMRAI::math.
+ 
+  In the interest of brevity, we include documentation for the array 
+  operation classes and those that treat cell-centered patch data only.   
+  The operation classes for the other array-based patch data types are
+  similar.
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/dox/manual_array.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/dox/manual_array.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,30 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace math {
+
+/*! 
+  @page package_mathops_array Basic Array Data Operations
+
+  These classes provide the fundamental operation support for all patch
+  data operation classes.  They perform operations on array data objects
+  which form the basis for all array-based patch data types in SAMRAI.
+  Note that some operations are shared by all numerical types (int, double,
+  float, and dcomplex), while others are implemented in a manner specific
+  to the type.
+  - SAMRAI::math::ArrayDataBasicOps
+  - SAMRAI::math::ArrayDataNormOpsComplex
+  - SAMRAI::math::ArrayDataNormOpsReal
+  - SAMRAI::math::ArrayDataMiscellaneousOpsReal
+  - SAMRAI::math::ArrayDataNormOpsInteger
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/dox/manual_cell.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/dox/manual_cell.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,39 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace math {
+
+/*!
+  @page package_mathops_cell Cell Patch Data Operations 
+
+  These classes provide the pieces which comprise the cell-centered patch 
+  data operation functionality.  Recall that two types of operation classes  
+  are available, those that treat data on a single patch and those that 
+  perform operations on a set of hierarchy levels.  Also recall that some 
+  operations are shared by all numerical types (int, double, float, and 
+  dcomplex), while others are implemented in a manner specific to the type.
+  Thus, the interface to operations for each data type is unique.
+
+  Important note: The classes for edge, face, node and side patch data are 
+                  similar and are omitted in the documentation for brevity. 
+  - SAMRAI::math::PatchCellDataOpsReal
+  - SAMRAI::math::PatchCellDataOpsComplex
+  - SAMRAI::math::PatchCellDataOpsInteger
+  - SAMRAI::math::PatchCellDataBasicOps
+  - SAMRAI::math::PatchCellDataNormOpsReal
+  - SAMRAI::math::PatchCellDataNormOpsComplex
+  - SAMRAI::math::PatchCellDataMiscellaneousOpsReal
+  - SAMRAI::math::HierarchyCellDataOpsReal
+  - SAMRAI::math::HierarchyCellDataOpsComplex
+  - SAMRAI::math::HierarchyCellDataOpsInteger
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/math/dox/manual_hierarchy.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/math/dox/manual_hierarchy.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,27 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace math {
+
+/*!
+  @page package_mathops_hierarchy Hierarchy Data Operation Base Classes
+
+  These classes serve as abstract base classes for concrete patch data 
+  hierarchy operations classes.  A base class is provided for each numerical 
+  type since the collection of operations which applies to each type is
+  unique.  A hierarchy data operation manager class is also provided here.
+  - SAMRAI::math::HierarchyDataOpsComplex
+  - SAMRAI::math::HierarchyDataOpsInteger
+  - SAMRAI::math::HierarchyDataOpsReal
+  - SAMRAI::math::HierarchyDataOpsManager
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/BalanceUtilities.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/BalanceUtilities.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1713 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   utility routines useful for load balancing operations 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_BalanceUtilities_C
+#define included_mesh_BalanceUtilities_C
+
+#include "SAMRAI/mesh/BalanceUtilities.h"
+
+#include "SAMRAI/hier/BoxUtilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace mesh {
+
+math::PatchCellDataNormOpsReal<double> BalanceUtilities::s_norm_ops;
+
+/*
+ *************************************************************************
+ *									*
+ * Two internal functions for heap sorting an array of doubles           *
+ * and an array of spatial key information.  See any standard sorting    *
+ * references for more information about heapsort.                       *
+ *									*
+ *************************************************************************
+ */
+
+void BalanceUtilities::privateHeapify(
+   tbox::Array<int>& permutation,
+   tbox::Array<double>& workload,
+   const int index,
+   const int heap_size)
+{
+   const int l = 2 * index + 1;
+   const int r = l + 1;
+   int s = index;
+   if ((l < heap_size) &&
+       (workload[permutation[s]] > workload[permutation[l]])) s = l;
+   if ((r < heap_size) &&
+       (workload[permutation[s]] > workload[permutation[r]])) s = r;
+   if (s != index) {
+      const int tmp = permutation[s];
+      permutation[s] = permutation[index];
+      permutation[index] = tmp;
+      privateHeapify(permutation, workload, s, heap_size);
+   }
+}
+
+void BalanceUtilities::privateHeapify(
+   tbox::Array<int>& permutation,
+   tbox::Array<SpatialKey>& spatial_keys,
+   const int index,
+   const int heap_size)
+{
+   const int l = 2 * index + 1;
+   const int r = l + 1;
+   int s = index;
+   if ((l < heap_size) &&
+       (spatial_keys[permutation[s]] < spatial_keys[permutation[l]])) s = l;
+   if ((r < heap_size) &&
+       (spatial_keys[permutation[s]] < spatial_keys[permutation[r]])) s = r;
+   if (s != index) {
+      const int tmp = permutation[s];
+      permutation[s] = permutation[index];
+      permutation[index] = tmp;
+      privateHeapify(permutation, spatial_keys, s, heap_size);
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Internal functions that recursively assigns weights to                *
+ * processors (used in the spatial bin packing procedure).               *
+ *									*
+ *************************************************************************
+ */
+void BalanceUtilities::privateRecursiveProcAssign(
+   const int wt_index_lo,
+   const int wt_index_hi,
+   tbox::Array<double>& weights,
+   const int proc_index_lo,
+   const int proc_index_hi,
+   hier::ProcessorMapping& mapping,
+   const double avg_weight)
+{
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(wt_index_hi >= wt_index_lo);
+   TBOX_ASSERT(proc_index_hi >= proc_index_lo);
+   TBOX_ASSERT((wt_index_hi - wt_index_lo) >= (proc_index_hi - proc_index_lo));
+#endif
+
+   int i;
+
+   /*
+    * if there is only one processor in range, then assign all boxes
+    * in the weight index range to the processor
+    */
+   if (proc_index_hi == proc_index_lo) {
+      for (i = wt_index_lo; i <= wt_index_hi; i++) {
+         mapping.setProcessorAssignment(i, proc_index_lo);
+      }
+   } else {  // otherwise recurse
+
+      int nproc = proc_index_hi - proc_index_lo + 1;
+      int left = nproc / 2;
+
+      double cut_weight = left * avg_weight;
+
+      int cut_index = wt_index_lo;
+      double acc_weight = 0.0;
+
+      /*
+       * the loop ends with (cut_index-1) referring to the last
+       * index that contributed to acc_weight (this is the convention
+       * that is used for box cut points throughout the library)
+       */
+      while ((cut_index <= wt_index_hi) && (acc_weight < cut_weight)) {
+         acc_weight += weights[cut_index];
+         cut_index++;
+      }
+
+      /*
+       * move cut_index back if cumulative weight without last weight
+       * added is closer to cut_weight, but only if cut_index is strictly
+       * greater than (wt_index_lo + 1) so that we don't accidentally
+       * get a cut_index of wt_index_lo which makes no sense.
+       */
+      double prev_weight = acc_weight - weights[cut_index - 1];
+      if ((cut_index > wt_index_lo + 1) &&
+          ((acc_weight - cut_weight) > (cut_weight - prev_weight))) {
+         cut_index--;
+      }
+
+      /*
+       * shift processors around to make sure that there are more procs
+       * than weights for each of the smaller pieces
+       */
+      if (cut_index - wt_index_lo < left) {
+         cut_index = left + wt_index_lo;
+      } else if (wt_index_hi - cut_index + 1 < nproc - left) {
+         cut_index = wt_index_hi + 1 - nproc + left;
+      }
+
+      /*
+       * recurse on smaller segments of the processor mapping and weights
+       * array.
+       */
+      privateRecursiveProcAssign(wt_index_lo, (cut_index - 1), weights,
+         proc_index_lo, (proc_index_lo + left - 1), mapping, avg_weight);
+      privateRecursiveProcAssign(cut_index, wt_index_hi, weights,
+         (proc_index_lo + left), proc_index_hi, mapping, avg_weight);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Two internal functions for computing arrays of prime numbers.         *
+ *									*
+ * The first computes a prime factorization of N and stores the primes   *
+ * in the array p.  The factorization algorithm uses trial division      *
+ * described by Donald E. Knuth, The Art of Computer Programming,        *
+ * 3rd edition, volume 2 Seminumerical Algorithms (Addison-Wesley,       *
+ * 1998), section 4.5.4 (Factoring Into Primes), pp. 380-381.            *
+ *									*
+ * The second resets an array of primes by removing all instances of "1".*
+ *									*
+ *************************************************************************
+ */
+
+void BalanceUtilities::privatePrimeFactorization(
+   const int N,
+   tbox::Array<int>& p)
+{
+   /*
+    * Input: N
+    * Output: p[] - array of prime factors of N
+    */
+
+   // Step 1 - Initialization
+
+   int k = 0;
+   int t = 0;
+   int n = N;
+   int q;
+   int r;
+   if (p.getSize() < 1) p.resizeArray(1);
+   p[0] = 1;
+
+   //  NOTE: d must hold the list of prime numbers up to sqrt(n).  We
+   //  store prime numbers up to 101 which assures this method will work
+   //  for up to 10201 processors.
+   int d[] =
+   { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61,
+     67,
+     71, 73, 79, 83, 89, 97, 101 };
+
+   // Step 2 - once n is 1, terminate the algorithm
+
+   while (n > 1) {
+
+      // Step 3 - divide to form quotient, remainder:
+      //          q = n/d[k],  r = n mod d[k]
+
+      q = n / d[k];
+      r = n % d[k];
+
+      // Step 4 - zero remainder?
+
+      if (r == 0) {
+
+         // Step 5 - factor found. Increase t by 1, set p[t] = d[k], n = q.
+
+         t++;
+         p.resizeArray(t + 1);
+         p[t] = d[k];
+         n = q;
+
+      } else {
+
+         // Step 6 - low quotient? Increment k to try next prime.
+
+         if (q > d[k]) {
+
+            k++;
+
+         } else {
+
+            // Step 7 - n is prime.  Increment t by 1, set p[t] = n, and terminate.
+
+            t++;
+            p.resizeArray(t + 1);
+            p[t] = n;
+            break;
+         }
+
+      }
+
+   }
+
+}
+
+void BalanceUtilities::privateResetPrimesArray(
+   tbox::Array<int>& p)
+{
+   // keep a copy of the original p in array "temp"
+   tbox::Array<int> temp;
+   temp.resizeArray(p.getSize());
+   int i;
+   for (i = 0; i < p.getSize(); i++) temp[i] = p[i];
+
+   // resize p to only keep values > 1
+   int newsize = 0;
+   for (i = 0; i < p.getSize(); i++) {
+      if (p[i] > 1) newsize++;
+   }
+
+   p.resizeArray(newsize);
+   newsize = 0;
+
+   // set values in the new p array
+   for (i = 0; i < temp.getSize(); i++) {
+      if (temp[i] > 1) {
+         p[newsize] = temp[i];
+         newsize++;
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Internal function to determine whether bad cut points exist for       *
+ * domain.  Note that no error checking is done.                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool BalanceUtilities::privateBadCutPointsExist(
+   const hier::BoxArray& physical_domain)
+{
+   hier::BoxList tmp_domain(physical_domain);
+   hier::BoxList bounding_box(tmp_domain.getBoundingBox());
+   bounding_box.removeIntersections(tmp_domain);
+
+   return bounding_box.getNumberOfItems() > 0;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Internal function to initialize bad cut points along each coordinate  *
+ * direction of given box based on relation to domain boundary.          *
+ * Note that no error checking is done.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BalanceUtilities::privateInitializeBadCutPointsForBox(
+   tbox::Array<tbox::Array<bool> >& bad_cut_points,
+   hier::Box& box,
+   bool bad_domain_boundaries_exist,
+   const hier::IntVector& bad_interval,
+   const hier::BoxArray& physical_domain)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(box, bad_interval, physical_domain);
+
+   const tbox::Dimension dim(box.getDim());
+
+   int ic, id;
+
+   bool set_dummy_cut_points = true;
+
+   if (bad_domain_boundaries_exist) {
+
+      hier::IntVector tmp_max_gcw =
+         hier::VariableDatabase::getDatabase()->
+         getPatchDescriptor()->getMaxGhostWidth(dim);
+
+      hier::BoxList tmp_domain(physical_domain);
+      hier::BoxList bdry_list(hier::Box::grow(box, tmp_max_gcw));
+      bdry_list.removeIntersections(tmp_domain);
+      if (bdry_list.getNumberOfItems() > 0) {
+         set_dummy_cut_points = false;
+      }
+
+   }
+
+   if (set_dummy_cut_points) {
+
+      for (id = 0; id < dim.getValue(); id++) {
+         const int ncells = box.numberCells(id);
+         bad_cut_points[id].resizeArray(ncells);
+         tbox::Array<bool>& arr_ref = bad_cut_points[id];
+         for (ic = 0; ic < ncells; ic++) {
+            arr_ref[ic] = false;
+         }
+      }
+
+   } else {
+
+      for (id = 0; id < dim.getValue(); id++) {
+         hier::BoxUtilities::
+         findBadCutPointsForDirection(id,
+            bad_cut_points[id],
+            box,
+            physical_domain,
+            bad_interval);
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Internal function to determine best cut dimension for a box based     *
+ * on constraints and adjust bad cut points as needed.  Return           *
+ * value is true if some dimension can be cut; false, otherwise.         *
+ * If the box can be cut along some dimension, then cut_dim_out is       *
+ * set to the longest box dimension that can be cut; otherwise,          *
+ * cut_dim_out is set to -1 (an invalid box dimension.                   *
+ * Note no error checking is done.                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool BalanceUtilities::privateFindBestCutDimension(
+   int& cut_dim_out,
+   const hier::Box& in_box,
+   const hier::IntVector& min_size,
+   const hier::IntVector& cut_factor,
+   tbox::Array<tbox::Array<bool> >& bad_cut_points)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(in_box, min_size, cut_factor);
+
+   const tbox::Dimension& dim(in_box.getDim());
+
+   bool can_cut_box = false;
+   cut_dim_out = -1;
+
+   hier::Box size_test_box(in_box);
+
+   for (int id = 0; id < dim.getValue(); id++) {
+      int ncells = in_box.numberCells(id);
+      if ((ncells < 2 * min_size(id)) ||
+          (ncells % cut_factor(id))) {
+         size_test_box.lower(id) = size_test_box.upper(id);
+      }
+   }
+
+   if (size_test_box.size() > 1) {
+
+      /*
+       * Find good cut points along some box dimension, starting with longest
+       * dimension, then trying next longest, etc., until good cut points found.
+       */
+
+      hier::Box test_box(size_test_box);
+      int cutdim = test_box.longestDimension();
+      int numcells = test_box.numberCells(cutdim);
+      int cutfact = cut_factor(cutdim);
+      int mincut = tbox::MathUtilities<int>::Max(min_size(cutdim), cutfact);
+
+      int i;
+      bool found_cut_point = false;
+      while (!found_cut_point && (test_box.numberCells(cutdim) > 1)) {
+
+         /*
+          * Make potential cut points bad if they are sufficiently near the
+          * box boundary or if they are are not divisible by cut factor.
+          * Then, determine whether any good cut points exist along chosen
+          * coordinate direction.
+          */
+
+         tbox::Array<bool>& bad_cuts_for_dir = bad_cut_points[cutdim];
+
+         for (i = 0; i < mincut; i++) {
+            bad_cuts_for_dir[i] = true;
+         }
+         for (i = (numcells - mincut + 1); i < numcells; i++) {
+            bad_cuts_for_dir[i] = true;
+         }
+         for (i = 0; i < numcells; i++) {
+            if (i % cutfact) {
+               bad_cuts_for_dir[i] = true;
+            }
+            found_cut_point = found_cut_point || !bad_cuts_for_dir[i];
+         }
+
+         if (!found_cut_point) {
+            test_box.lower(cutdim) = test_box.upper(cutdim);
+         }
+
+         cutdim = test_box.longestDimension();
+         numcells = test_box.numberCells(cutdim);
+         cutfact = cut_factor(cutdim);
+         mincut = tbox::MathUtilities<int>::Max(min_size(cutdim), cutfact);
+
+      }
+
+      if (found_cut_point) {
+         can_cut_box = true;
+         cut_dim_out = cutdim;
+      }
+
+   }
+
+   return can_cut_box;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Internal function to determine cut point for a single dimension       *
+ * given min cut, ideal workload, bad cut point constraints.             *
+ * Note no error checking is done.                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int BalanceUtilities::privateFindCutPoint(
+   double total_work,
+   double ideal_workload,
+   int mincut,
+   int numcells,
+   const tbox::Array<double>& work_in_slice,
+   const tbox::Array<bool>& bad_cut_points)
+{
+
+   int cut_index = 0;
+
+   int half_num_pieces = (int)(total_work / ideal_workload + 1) / 2;
+   double work_cutpt = half_num_pieces * ideal_workload;
+
+   /*
+    * Search for cutpoint closest to "work cutpoint"; i.e.,
+    * point where work to "left" is closest to ideal workload.
+    */
+
+   double acc_work = 0.0;
+
+   while (cut_index < mincut) {
+      acc_work += work_in_slice[cut_index];
+      cut_index++;
+   }
+
+   int last = numcells - mincut;
+   while ((acc_work < work_cutpt) && (cut_index < last)) {
+      acc_work += work_in_slice[cut_index];
+      cut_index++;
+   }
+
+   /*
+    * If estimated cutpoint is bad, search to left and right for a
+    * good cut point.  Choose the one that will split box closer to the
+    * work cut point.
+    */
+
+   if (bad_cut_points[cut_index]) {
+
+      int l_index = cut_index;
+      double l_work = acc_work;
+      while ((bad_cut_points[l_index]) && (l_index > 2)) {
+         l_work -= work_in_slice[l_index - 1];
+         l_index--;
+      }
+
+      int r_index = cut_index;
+      double r_work = acc_work;
+      while ((bad_cut_points[r_index]) && (r_index < numcells - 1)) {
+         r_work += work_in_slice[r_index];
+         r_index++;
+      }
+
+      if ((work_cutpt - l_work) < (r_work - work_cutpt)) {
+         if (bad_cut_points[l_index]) {
+            cut_index = r_index;
+         } else {
+            cut_index = l_index;
+         }
+      } else {
+         if (bad_cut_points[r_index]) {
+            cut_index = l_index;
+         } else {
+            cut_index = r_index;
+         }
+      }
+
+   }
+
+   return cut_index;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Internal function to cut box in two at given cut point along given    *
+ * dimension.  box_lo, box_hi will be new disjoint boxes whose union     *
+ * is the box to be cut (in_box).  bad_cut_points_for_boxlo, and         *
+ * bad_cut_points_for_boxhi are associated arrays of bad cut points      *
+ * defined by given bad cut point arrays for in_box.                     *
+ * Note no error checking is done.                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BalanceUtilities::privateCutBoxesAndSetBadCutPoints(
+   hier::Box& box_lo,
+   tbox::Array<tbox::Array<bool> >& bad_cut_points_for_boxlo,
+   hier::Box& box_hi,
+   tbox::Array<tbox::Array<bool> >& bad_cut_points_for_boxhi,
+   const hier::Box& in_box,
+   int cutdim,
+   int cut_index,
+   const tbox::Array<tbox::Array<bool> >& bad_cut_points)
+{
+
+   TBOX_DIM_ASSERT_CHECK_ARGS3(box_lo, box_hi, in_box);
+
+   const tbox::Dimension& dim(box_lo.getDim());
+
+   box_lo = in_box;
+   box_lo.upper(cutdim) = cut_index - 1;
+
+   box_hi = in_box;
+   box_hi.lower(cutdim) = cut_index;
+
+   int i;
+   for (int id = 0; id < dim.getValue(); id++) {
+
+      const tbox::Array<bool>& arr_ref_in = bad_cut_points[id];
+
+      const int ncellslo = box_lo.numberCells(id);
+      const int ncellshi = box_hi.numberCells(id);
+
+      bad_cut_points_for_boxlo[id].resizeArray(ncellslo);
+      bad_cut_points_for_boxhi[id].resizeArray(ncellshi);
+
+      tbox::Array<bool>& arr_ref_cutlo = bad_cut_points_for_boxlo[id];
+      for (i = 0; i < ncellslo; i++) {
+         arr_ref_cutlo[i] = arr_ref_in[i];
+      }
+
+      tbox::Array<bool>& arr_ref_cuthi = bad_cut_points_for_boxhi[id];
+
+      if (id == cutdim) {
+         int mark = box_lo.numberCells(cutdim);
+         for (i = 0; i < ncellshi; i++) {
+            arr_ref_cuthi[i] = arr_ref_in[i + mark];
+         }
+      } else {
+         for (i = 0; i < ncellshi; i++) {
+            arr_ref_cuthi[i] = arr_ref_in[i];
+         }
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Internal recursive function to chop a single box into two             *
+ * boxes, if possible, based on uniform workload estimates.  It is       *
+ * assumed that the bad-cut-point arrays are set properly according      *
+ * to the physical domain constraints.  Note no error checking is done.  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BalanceUtilities::privateRecursiveBisectionUniformSingleBox(
+   hier::BoxList& out_boxes,
+   tbox::List<double>& out_workloads,
+   const hier::Box& in_box,
+   double in_box_workload,
+   double ideal_workload,
+   const double workload_tolerance,
+   const hier::IntVector& min_size,
+   const hier::IntVector& cut_factor,
+   tbox::Array<tbox::Array<bool> >& bad_cut_points)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(in_box, min_size, cut_factor);
+
+   const tbox::Dimension dim(in_box.getDim());
+
+   if (in_box_workload <= ((1. + workload_tolerance) * ideal_workload)) {
+
+      out_boxes.addItem(in_box);
+      out_workloads.addItem(in_box_workload);
+
+   } else {
+
+      /*
+       * Determine best dimension to chop box.
+       */
+      int cut_dim;
+      bool can_cut_box = privateFindBestCutDimension(cut_dim,
+            in_box,
+            min_size,
+            cut_factor,
+            bad_cut_points);
+
+      if (can_cut_box) {
+
+         int i;
+
+         const int numcells = in_box.numberCells(cut_dim);
+         int mincut =
+            tbox::MathUtilities<int>::Max(min_size(cut_dim), cut_factor(cut_dim));
+
+         /*
+          * Search for chop point along chosen dimension.
+          */
+
+         double work_in_single_slice = 1.0;
+         for (int id = 0; id < dim.getValue(); id++) {
+            if (id != cut_dim) {
+               work_in_single_slice *= (double)in_box.numberCells(id);
+            }
+         }
+
+         tbox::Array<double> work_in_slices(numcells);
+         for (i = 0; i < numcells; i++) {
+            work_in_slices[i] = work_in_single_slice;
+         }
+
+         int cut_index = privateFindCutPoint(in_box_workload,
+               ideal_workload,
+               mincut,
+               numcells,
+               work_in_slices,
+               bad_cut_points[cut_dim]);
+         cut_index += in_box.lower(cut_dim);
+
+         /*
+          * Create two new boxes based on cut index and define new
+          * bad cut point arrays.  Then apply recursive bisection
+          * to each new box.
+          */
+
+         hier::Box box_lo(dim);
+         hier::Box box_hi(dim);
+
+         tbox::Array<tbox::Array<bool> > bad_cut_points_for_boxlo(dim.getValue());
+         tbox::Array<tbox::Array<bool> > bad_cut_points_for_boxhi(dim.getValue());
+
+         privateCutBoxesAndSetBadCutPoints(box_lo,
+            bad_cut_points_for_boxlo,
+            box_hi,
+            bad_cut_points_for_boxhi,
+            in_box,
+            cut_dim,
+            cut_index,
+            bad_cut_points);
+
+         double box_lo_workload = (double)box_lo.size();
+         privateRecursiveBisectionUniformSingleBox(out_boxes,
+            out_workloads,
+            box_lo,
+            box_lo_workload,
+            ideal_workload,
+            workload_tolerance,
+            min_size,
+            cut_factor,
+            bad_cut_points_for_boxlo);
+
+         hier::BoxList boxes_hi;
+         tbox::List<double> work_hi;
+
+         double box_hi_workload = (double)box_hi.size();
+         privateRecursiveBisectionUniformSingleBox(boxes_hi,
+            work_hi,
+            box_hi,
+            box_hi_workload,
+            ideal_workload,
+            workload_tolerance,
+            min_size,
+            cut_factor,
+            bad_cut_points_for_boxhi);
+
+         out_boxes.catenateItems(boxes_hi);
+         out_workloads.catenateItems(work_hi);
+
+      } else {  // !can_cut_box
+
+         out_boxes.addItem(in_box);
+         out_workloads.addItem(in_box_workload);
+
+      }
+
+   } // in_box_workload > ideal_workload
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Internal recursive function to chop a single box into two             *
+ * boxes, if possible, based on nonuniform workload estimates.  It is    *
+ * assumed that the bad-cut-point arrays are set properly according      *
+ * to the physical domain constraints.  Note no error checking is done.  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BalanceUtilities::privateRecursiveBisectionNonuniformSingleBox(
+   hier::BoxList& out_boxes,
+   tbox::List<double>& out_workloads,
+   const tbox::Pointer<hier::Patch>& patch,
+   const hier::Box& in_box,
+   double in_box_workload,
+   int work_data_index,
+   double ideal_workload,
+   const double workload_tolerance,
+   const hier::IntVector& min_size,
+   const hier::IntVector& cut_factor,
+   tbox::Array<tbox::Array<bool> >& bad_cut_points)
+{
+   TBOX_ASSERT(!patch.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*patch, in_box, min_size, cut_factor);
+
+   const tbox::Dimension dim(in_box.getDim());
+
+   if (in_box_workload <= ((1. + workload_tolerance) * ideal_workload)) {
+
+      out_boxes.addItem(in_box);
+      out_workloads.addItem(in_box_workload);
+
+   } else {
+
+      /*
+       * Determine best dimension to chop box.
+       */
+      int cut_dim;
+      bool can_cut_box = privateFindBestCutDimension(cut_dim,
+            in_box,
+            min_size,
+            cut_factor,
+            bad_cut_points);
+
+      if (can_cut_box) {
+
+         int i;
+
+         const int numcells = in_box.numberCells(cut_dim);
+         int mincut =
+            tbox::MathUtilities<int>::Max(min_size(cut_dim), cut_factor(cut_dim));
+
+         /*
+          * Search for chop point along chosen dimension.
+          */
+
+         hier::Box slice_box = in_box;
+         slice_box.upper(cut_dim) = slice_box.lower(cut_dim);
+
+         tbox::Array<double> work_in_slices(numcells);
+         for (i = 0; i < numcells; i++) {
+            work_in_slices[i] =
+               BalanceUtilities::computeNonUniformWorkload(patch,
+                  work_data_index,
+                  slice_box);
+            slice_box.lower(cut_dim) += 1;
+            slice_box.upper(cut_dim) = slice_box.lower(cut_dim);
+
+         }
+
+         int cut_index = privateFindCutPoint(in_box_workload,
+               ideal_workload,
+               mincut,
+               numcells,
+               work_in_slices,
+               bad_cut_points[cut_dim]);
+         cut_index += in_box.lower(cut_dim);
+
+         /*
+          * Create two new boxes based on cut index and define new
+          * bad cut point arrays.  Then apply recursive bisection
+          * to each new box.
+          */
+
+         hier::Box box_lo(dim);
+         hier::Box box_hi(dim);
+
+         tbox::Array<tbox::Array<bool> > bad_cut_points_for_boxlo(dim.getValue());
+         tbox::Array<tbox::Array<bool> > bad_cut_points_for_boxhi(dim.getValue());
+
+         privateCutBoxesAndSetBadCutPoints(box_lo,
+            bad_cut_points_for_boxlo,
+            box_hi,
+            bad_cut_points_for_boxhi,
+            in_box,
+            cut_dim,
+            cut_index,
+            bad_cut_points);
+
+         const int box_lo_ncells = box_lo.numberCells(cut_dim);
+         double box_lo_workload = 0.0;
+         for (i = 0; i < box_lo_ncells; i++) {
+            box_lo_workload += work_in_slices[i];
+         }
+         privateRecursiveBisectionNonuniformSingleBox(out_boxes,
+            out_workloads,
+            patch,
+            box_lo,
+            box_lo_workload,
+            work_data_index,
+            ideal_workload,
+            workload_tolerance,
+            min_size,
+            cut_factor,
+            bad_cut_points_for_boxlo);
+
+         hier::BoxList boxes_hi;
+         tbox::List<double> work_hi;
+
+         double box_hi_workload = in_box_workload - box_lo_workload;
+         privateRecursiveBisectionNonuniformSingleBox(boxes_hi,
+            work_hi,
+            patch,
+            box_hi,
+            box_hi_workload,
+            work_data_index,
+            ideal_workload,
+            workload_tolerance,
+            min_size,
+            cut_factor,
+            bad_cut_points_for_boxhi);
+
+         out_boxes.catenateItems(boxes_hi);
+         out_workloads.catenateItems(work_hi);
+
+      } else {  // !can_cut_box
+
+         out_boxes.addItem(in_box);
+         out_workloads.addItem(in_box_workload);
+
+      }
+
+   } // in_box_workload > ideal_workload
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute workload in box region of patch.                              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double BalanceUtilities::computeNonUniformWorkload(
+   tbox::Pointer<hier::Patch> patch,
+   int wrk_indx,
+   const hier::Box& box)
+{
+   TBOX_ASSERT(!patch.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*patch, box);
+
+   const tbox::Pointer<pdat::CellData<double> > work_data =
+      patch->getPatchData(wrk_indx);
+
+   double workload = s_norm_ops.L1Norm(work_data, box);
+
+   return workload;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Construct a processor mapping using the collection of weights and	*
+ * the number of processors.  The return value provides an estimate of	*
+ * the load balance efficiency from zero through one hundred.		*
+ *									*
+ *************************************************************************
+ */
+
+double BalanceUtilities::binPack(
+   hier::ProcessorMapping& mapping,
+   tbox::Array<double>& weights,
+   const int nproc)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(nproc > 0);
+#endif
+
+   /*
+    * Create the mapping array, find the average workload, and zero weights
+    */
+
+   const int nboxes = weights.getSize();
+   mapping.setMappingSize(nboxes);
+
+   double avg_work = 0.0;
+   for (int w = 0; w < nboxes; w++) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(weights[w] >= 0.0);
+#endif
+      avg_work += weights[w];
+   }
+   avg_work /= nproc;
+
+   tbox::Array<double> work(nproc);
+   for (int p = 0; p < nproc; p++) {
+      work[p] = 0.0;
+   }
+
+   /*
+    * Assign each box to the processor with the lowest workload
+    */
+   for (int b = 0; b < nboxes; b++) {
+      const double weight = weights[b];
+
+      int proc = 0;
+      double diff = avg_work - (work[0] + weight);
+      for (int p = 1; p < nproc; p++) {
+         const double d = avg_work - (work[p] + weight);
+         if (((diff > 0.0) && (d >= 0.0) &&
+              (d < diff)) || ((diff < 0.0) && (d > diff))) {
+            diff = d;
+            proc = p;
+         }
+      }
+
+      work[proc] += weight;
+      mapping.setProcessorAssignment(b, proc);
+   }
+
+   /*
+    * Estimate load balance efficiency
+    */
+
+   double max_work = 0.0;
+   for (int iw = 0; iw < nproc; iw++) {
+      if (work[iw] > max_work) max_work = work[iw];
+   }
+
+// Disable Intel warning on real comparison
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1572)
+#endif
+   return max_work == 0.0 ? 100.0 : 100.0 * avg_work / max_work;
+
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Construct a processor mapping using the collection of weights,        *
+ * the number of processors, and the spatial distribution of the boxes.  *
+ * The algorithm has two steps: (1) order the boxes based on the         *
+ * location of the center of the box and (2) partition the boxes in      *
+ * order so that the workload is fairly evenly distributed over the      *
+ * processors.                                                           *
+ * The return value provides an estimate of the load balance efficiency  *
+ * from zero through one hundred percent.                                *
+ *									*
+ *************************************************************************
+ */
+
+double BalanceUtilities::spatialBinPack(
+   hier::ProcessorMapping& mapping,
+   tbox::Array<double>& weights,
+   hier::BoxArray& boxes,
+   const int nproc)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(nproc > 0);
+   TBOX_ASSERT(weights.getSize() == boxes.getNumberOfBoxes());
+#endif
+
+   const int nboxes = boxes.getNumberOfBoxes();
+
+   const tbox::Dimension dim(boxes.getDim());
+
+   /*
+    * compute offset which guarantees that the index space for all boxes
+    * is positive.
+    */
+   int i;
+   hier::IntVector offset(boxes[0].lower());
+   for (i = 1; i < nboxes; i++) {
+      offset.min(boxes[i].lower());
+   }
+
+   /* construct array of spatialKeys */
+   tbox::Array<SpatialKey> spatial_keys(nboxes);
+   for (i = 0; i < nboxes; i++) {
+
+      /* compute center of box */
+      hier::IntVector center = (boxes[i].upper() + boxes[i].lower()) / 2;
+
+      if (dim == tbox::Dimension(1)) {
+         spatial_keys[i].setKey(center(0) - offset(0));
+      } else if (dim == tbox::Dimension(2)) {
+         spatial_keys[i].setKey(center(0) - offset(0), center(1) - offset(1));
+      } else if (dim == tbox::Dimension(3)) {
+         spatial_keys[i].setKey(center(0) - offset(0), center(1) - offset(1),
+            center(2) - offset(2));
+      } else {
+         TBOX_ERROR("BalanceUtilities::spatialBinPack error ..."
+            << "\n not implemented for DIM>3" << std::endl);
+      }
+
+   }
+
+   /*
+    * Sort boxes according to their spatial keys using a heapsort.
+    */
+
+   tbox::Array<int> permutation(nboxes);
+
+   for (i = 0; i < nboxes; i++) {
+      permutation[i] = i;
+   }
+
+   for (i = nboxes / 2 - 1; i >= 0; i--) {
+      privateHeapify(permutation, spatial_keys, i, nboxes);
+   }
+   for (i = nboxes - 1; i >= 1; i--) {
+      const int tmp = permutation[0];
+      permutation[0] = permutation[i];
+      permutation[i] = tmp;
+      privateHeapify(permutation, spatial_keys, 0, i);
+   }
+
+   /*
+    * Copy unsorted data into temporaries and permute into sorted order
+    */
+
+   hier::BoxArray unsorted_boxes(dim, nboxes);
+   tbox::Array<double> unsorted_weights(nboxes);
+
+   for (i = 0; i < nboxes; i++) {
+      unsorted_boxes[i] = boxes[i];
+      unsorted_weights[i] = weights[i];
+   }
+
+   for (i = 0; i < nboxes; i++) {
+      boxes[i] = unsorted_boxes[permutation[i]];
+      weights[i] = unsorted_weights[permutation[i]];
+   }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   /*
+    * Verify that the spatial keys are sorted in non-decreasing order
+    */
+
+   tbox::Array<SpatialKey> unsorted_keys(nboxes);
+   for (i = 0; i < nboxes; i++) {
+      unsorted_keys[i] = spatial_keys[i];
+   }
+
+   for (i = 0; i < nboxes; i++) {
+      spatial_keys[i] = unsorted_keys[permutation[i]];
+   }
+
+   for (i = 0; i < nboxes - 1; i++) {
+      TBOX_ASSERT(spatial_keys[i] <= spatial_keys[i + 1]);
+   }
+#endif
+
+   /* Find average workload */
+
+   double avg_work = 0.0;
+   for (i = 0; i < nboxes; i++) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(weights[i] >= 0.0);
+#endif
+      avg_work += weights[i];
+   }
+   avg_work /= nproc;
+
+   /*
+    * Generate processor mapping.  (nboxes-1) as the maximum
+    * processor number assignable if the number of processors
+    * exceeds the number of boxes.
+    */
+   mapping.setMappingSize(nboxes);
+   if (nproc <= nboxes) {
+      privateRecursiveProcAssign(0, nboxes - 1, weights,
+         0, nproc - 1, mapping, avg_work);
+   } else {
+      privateRecursiveProcAssign(0, nboxes - 1, weights,
+         0, nboxes - 1, mapping, avg_work);
+   }
+
+   /* compute work load for each processor */
+   tbox::Array<double> work(nproc);
+   for (i = 0; i < nproc; i++) {
+      work[i] = 0.0;
+   }
+   for (i = 0; i < nboxes; i++) {
+      work[mapping.getProcessorAssignment(i)] += weights[i];
+   }
+
+   /*
+    * Estimate load balance efficiency
+    */
+
+   double max_work = 0.0;
+   for (i = 0; i < nproc; i++) {
+      if (work[i] > max_work) max_work = work[i];
+   }
+
+// Disable Intel warning on real comparison
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1572)
+#endif
+   return max_work == 0.0 ? 100.0 : 100.0 * avg_work / max_work;
+
+}
+
+/*
+ **************************************************************************
+ *                                                                        *
+ * Recursively chops boxes in input list until all pieces have workload   *
+ * less than the prescribed ideal workload or no more chopping is allowed *
+ * by the given constraints.   A spatially-uniform workload is assumed;   *
+ * i.e., all cells are weighted equally.                                  *
+ *                                                                        *
+ **************************************************************************
+ */
+
+void BalanceUtilities::recursiveBisectionUniform(
+   hier::BoxList& out_boxes,
+   tbox::List<double>& out_workloads,
+   const hier::BoxList& in_boxes,
+   const double ideal_workload,
+   const double workload_tolerance,
+   const hier::IntVector& min_size,
+   const hier::IntVector& cut_factor,
+   const hier::IntVector& bad_interval,
+   const hier::BoxArray& physical_domain)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(min_size, cut_factor, bad_interval);
+
+   const tbox::Dimension dim(min_size.getDim());
+
+   TBOX_ASSERT(ideal_workload > 0);
+   TBOX_ASSERT((workload_tolerance >= 0) && (workload_tolerance < 1.0));
+   TBOX_ASSERT(min_size > hier::IntVector::getZero(dim));
+   TBOX_ASSERT(cut_factor > hier::IntVector::getZero(dim));
+   TBOX_ASSERT(bad_interval >= hier::IntVector::getZero(dim));
+   TBOX_ASSERT(physical_domain.getNumberOfBoxes() > 0);
+
+   out_boxes.clearItems();
+   out_workloads.clearItems();
+
+   bool bad_domain_boundaries_exist =
+      privateBadCutPointsExist(physical_domain);
+
+   for (hier::BoxList::Iterator ib(in_boxes); ib; ib++) {
+
+      hier::Box box2chop = ib();
+
+      TBOX_ASSERT(!box2chop.empty());
+
+      double boxwork = (double)box2chop.size();
+
+      if (boxwork <= ((1.0 + workload_tolerance) * ideal_workload)) {
+
+         out_boxes.addItem(box2chop);
+         out_workloads.addItem(boxwork);
+
+      } else {
+
+         tbox::Array<tbox::Array<bool> > bad_cut_points(dim.getValue());
+
+         privateInitializeBadCutPointsForBox(bad_cut_points,
+            box2chop,
+            bad_domain_boundaries_exist,
+            bad_interval,
+            physical_domain);
+
+         hier::BoxList tempboxes;
+         tbox::List<double> temploads;
+         privateRecursiveBisectionUniformSingleBox(
+            tempboxes,
+            temploads,
+            box2chop,
+            boxwork,
+            ideal_workload,
+            workload_tolerance,
+            min_size,
+            cut_factor,
+            bad_cut_points);
+
+         out_boxes.catenateItems(tempboxes);
+         out_workloads.catenateItems(temploads);
+
+      }
+   }
+
+}
+
+/*
+ **************************************************************************
+ *                                                                        *
+ * Recursively chops boxes described by patches in input patch level      *
+ * until all pieces have workload less than the prescribed ideal workload *
+ * or no more chopping is allowed by the given constraints.  A spatially- *
+ * nonuniform workload is assumed; i.e., cell weights are given by the    *
+ * patch data defined by the weight patch data id.                        *
+ *                                                                        *
+ **************************************************************************
+ */
+
+void BalanceUtilities::recursiveBisectionNonuniform(
+   hier::BoxList& out_boxes,
+   tbox::List<double>& out_workloads,
+   const tbox::Pointer<hier::PatchLevel>& in_level,
+   int work_id,
+   double ideal_workload,
+   const double workload_tolerance,
+   const hier::IntVector& min_size,
+   const hier::IntVector& cut_factor,
+   const hier::IntVector& bad_interval,
+   const hier::BoxArray& physical_domain)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(min_size, cut_factor, bad_interval);
+
+   const tbox::Dimension dim(min_size.getDim());
+
+   TBOX_ASSERT(ideal_workload > 0);
+   TBOX_ASSERT((workload_tolerance >= 0) && (workload_tolerance < 1.0));
+   TBOX_ASSERT(min_size > hier::IntVector::getZero(dim));
+   TBOX_ASSERT(cut_factor > hier::IntVector::getZero(dim));
+   TBOX_ASSERT(bad_interval >= hier::IntVector::getZero(dim));
+   TBOX_ASSERT(physical_domain.getNumberOfBoxes() > 0);
+
+   out_boxes.clearItems();
+   out_workloads.clearItems();
+
+   bool bad_domain_boundaries_exist =
+      privateBadCutPointsExist(physical_domain);
+
+   for (hier::PatchLevel::Iterator ip(in_level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      hier::Box box2chop = patch->getBox();
+
+      double boxwork = computeNonUniformWorkload(patch,
+            work_id,
+            box2chop);
+
+      if (boxwork <= ((1. + workload_tolerance) * ideal_workload)) {
+
+         out_boxes.addItem(box2chop);
+         out_workloads.addItem(boxwork);
+
+      } else {
+
+         tbox::Array<tbox::Array<bool> > bad_cut_points(dim.getValue());
+
+         privateInitializeBadCutPointsForBox(bad_cut_points,
+            box2chop,
+            bad_domain_boundaries_exist,
+            bad_interval,
+            physical_domain);
+
+         hier::BoxList tempboxes;
+         tbox::List<double> temploads;
+         privateRecursiveBisectionNonuniformSingleBox(
+            tempboxes,
+            temploads,
+            patch,
+            box2chop,
+            boxwork,
+            work_id,
+            ideal_workload,
+            workload_tolerance,
+            min_size,
+            cut_factor,
+            bad_cut_points);
+
+         out_boxes.catenateItems(tempboxes);
+         out_workloads.catenateItems(temploads);
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *
+ * Computes processor layout that corresponds, as closely as possible,
+ * to the dimensions of the supplied box.
+ *
+ * Inputs:
+ *   num_procs - number of processors
+ *   box - box which is to be layed out on processors
+ * Output:
+ *   proc_dist - vector describing processor layout
+ *
+ *************************************************************************
+ */
+
+void BalanceUtilities::computeDomainDependentProcessorLayout(
+   hier::IntVector& proc_dist,
+   int num_procs,
+   const hier::Box& box)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(proc_dist, box);
+
+   const tbox::Dimension& dim(proc_dist.getDim());
+
+   int i;
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(num_procs > 0);
+   for (i = 0; i < dim.getValue(); i++) {
+      TBOX_ASSERT(box.numberCells(i) > 0);
+   }
+#endif
+
+   /*
+    * Initialize:
+    *  - compute p[] - array of prime factors of tot_procs
+    *  - set d[] initially set to box dims in each direction.
+    *  - set proc_dist[] = 1 in each direction
+    *  - set pnew[] (recomputed set of primes) initially to p
+    */
+   tbox::Array<int> p;
+   privatePrimeFactorization(num_procs, p);
+
+   hier::IntVector d = box.numberCells();
+   for (i = 0; i < dim.getValue(); i++) {
+      proc_dist(i) = 1;
+   }
+
+   tbox::Array<int> pnew;
+   pnew.resizeArray(p.getSize());
+   for (i = 0; i < p.getSize(); i++) {
+      pnew[i] = p[i];
+   }
+   privateResetPrimesArray(pnew);
+
+   /*
+    *  main loop:  build up processor count with prime
+    *              factors until # processors is reached
+    *              or we have run out of prime factors.
+    *  NOTE:  infinite loop conditions occur if no
+    *         box dimensions can be divided by any of the prime factors
+    *         of num_procs.  Adding a counter prevents this condition.
+    */
+   int counter = 0;
+   while ((proc_dist.getProduct() < num_procs) &&
+          (pnew.getSize() > 0) && (counter < num_procs)) {
+
+      //  Loop over prime factors - largest to smallest
+      for (int k = pnew.getSize() - 1; k >= 0; k--) {
+
+         //  determine i - direction in which d is largest
+         i = 0;
+         int nx = d[i];
+         for (int j = 0; j < dim.getValue(); j++) {
+            if (d[j] > nx) i = j;
+         }
+
+         // Divide the dimension by the largest possible prime
+         // factor and update processors accordingly. Remove the
+         // chosen prime factor from the prime factors array.
+         if (d[i] % pnew[k] == 0) {
+            d[i] = d[i] / pnew[k];
+            proc_dist[i] = proc_dist[i] * pnew[k];
+
+            // Once a prime factor is used, remove it from the array of
+            // primes by setting to one and calling the privateResetPrimesArray
+            // (which removes any prime = 1).
+            pnew[k] = 1;
+            privateResetPrimesArray(pnew);
+         }
+
+         // Check if our iteration to build processor counts has
+         // reach total_procs count.  If so, break out of loop.
+         if (proc_dist.getProduct() == num_procs) break;
+
+      } // loop over prime factors
+
+      counter++;
+   } // while loop
+
+   /*
+    * This routine can fail under certain circumstances, such as
+    * when no box dimension exactly divides by any of the prime factors.
+    * In this case, revert to the less stringent routine which simply
+    * breaks up the domain into prime factors.
+    */
+   if (proc_dist.getProduct() != num_procs) {
+      TBOX_WARNING("computeDomainDependentProcessorLayout(): could not \n"
+         << "construct valid processor array - calling \n"
+         << "computeDomainIndependentProcessorLayout() " << std::endl);
+      computeDomainIndependentProcessorLayout(proc_dist, num_procs, box);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *
+ * Computes processor layout that simply uses largest prime factors in
+ * the decomposition.  The box is only used to determine the largest
+ * dimensions in each direction.  The processor decomposition will NOT
+ * necessarily correspond to box dimensions.
+ *
+ *************************************************************************
+ */
+
+void BalanceUtilities::computeDomainIndependentProcessorLayout(
+   hier::IntVector& proc_dist,
+   int num_procs,
+   const hier::Box& box)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(proc_dist, box);
+
+   int i;
+   const tbox::Dimension& dim(proc_dist.getDim());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(num_procs > 0);
+   for (i = 0; i < dim.getValue(); i++) {
+      TBOX_ASSERT(box.numberCells(i) > 0);
+   }
+#endif
+
+   /*
+    * Input:
+    *   box - box which is to be layed out on processors
+    * Returned:
+    *   proc_dist - processors in each direction
+    *
+    *
+    * Initialize:
+    *  - compute p[] - array of prime factors of num_procs
+    *  - set d[] initially set to box dims in each direction.
+    *  - set proc_dist[] = 1 in each direction
+    *  - set pnew[] (recomputed set of primes) initially to p
+    */
+
+   tbox::Array<int> p;
+   privatePrimeFactorization(num_procs, p);
+
+   hier::IntVector d = box.numberCells();
+   for (i = 0; i < dim.getValue(); i++) {
+      proc_dist(i) = 1;
+   }
+
+   tbox::Array<int> pnew;
+   pnew.resizeArray(p.getSize());
+   for (i = 0; i < p.getSize(); i++) pnew[i] = p[i];
+   privateResetPrimesArray(pnew);
+
+   /*
+    *  main loop:  build up processor count with prime
+    *              factors until # processors is reached
+    *              or we have run out of prime factors.
+    */
+   while ((proc_dist.getProduct() < num_procs) &&
+          (pnew.getSize() > 0)) {
+
+      //  determine i - direction in which d is largest
+      i = 0;
+      int nx = d[i];
+      for (int j = 0; j < dim.getValue(); j++) {
+         if (d[j] > nx) i = j;
+      }
+
+      // Set proc_dist(i) to the largest prime factor
+      int k = pnew.getSize() - 1;
+      d[i] = d[i] / pnew[k];
+      proc_dist[i] = proc_dist[i] * pnew[k];
+
+      // Once a prime factor is used, remove it from the array of
+      // primes by setting to one and calling the privateResetPrimesArray
+      // (which removes any prime = 1).
+      pnew[k] = 1;
+      privateResetPrimesArray(pnew);
+
+      // Check if our iteration to build processor count has
+      // reach total_procs count.  If so, break out of loop.
+      if (proc_dist.getProduct() == num_procs) break;
+
+   } // while loop
+
+   // error check - in case any cases pop up where we have
+   // run out of prime factors but have not yet built a valid
+   // processor array.
+   if (proc_dist.getProduct() != num_procs) {
+      TBOX_ERROR(
+         "BalanceUtilities::computeDomainIndependentProcessorLayout() error"
+         << "\n  invalid processor array computed" << std::endl);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Sort box work loads in decreasing order using a heapsort.  Both       *
+ * the box array and the work array will be returned in sorted order.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BalanceUtilities::sortDescendingBoxWorkloads(
+   hier::BoxArray& boxes,
+   tbox::Array<double>& workload)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(boxes.getNumberOfBoxes() == workload.getSize());
+#endif
+
+   const tbox::Dimension dim(boxes.getDim());
+
+   /*
+    * Create the permutation array that represents indices in sorted order
+    */
+
+   const int nboxes = workload.getSize();
+   tbox::Array<int> permutation(nboxes);
+
+   for (int i = 0; i < nboxes; i++) {
+      permutation[i] = i;
+   }
+
+   /*
+    * Execute the heapsort using static member function privateHeapify()
+    */
+
+   for (int j = nboxes / 2 - 1; j >= 0; j--) {
+      privateHeapify(permutation, workload, j, nboxes);
+   }
+   for (int k = nboxes - 1; k >= 1; k--) {
+      const int tmp = permutation[0];
+      permutation[0] = permutation[k];
+      permutation[k] = tmp;
+      privateHeapify(permutation, workload, 0, k);
+   }
+
+   /*
+    * Copy unsorted data into temporaries and permute into sorted order
+    */
+
+   hier::BoxArray unsorted_boxes(dim, nboxes);
+   tbox::Array<double> unsorted_workload(nboxes);
+
+   for (int l = 0; l < nboxes; l++) {
+      unsorted_boxes[l] = boxes[l];
+      unsorted_workload[l] = workload[l];
+   }
+
+   for (int m = 0; m < nboxes; m++) {
+      boxes[m] = unsorted_boxes[permutation[m]];
+      workload[m] = unsorted_workload[permutation[m]];
+   }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   /*
+    * Verify that the workload is sorted in nonincreasing order
+    */
+
+   for (int n = 0; n < nboxes - 1; n++) {
+      TBOX_ASSERT(workload[n] >= workload[n + 1]);
+   }
+#endif
+}
+
+/*
+ **************************************************************************
+ *                                                                        *
+ * Compute and return load balance efficiency for a level.                *
+ *                                                                        *
+ **************************************************************************
+ */
+
+double BalanceUtilities::computeLoadBalanceEfficiency(
+   const tbox::Pointer<hier::PatchLevel>& level,
+   std::ostream& os,
+   int workload_data_id)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!level.isNull());
+#endif
+
+   NULL_USE(os);
+   const tbox::SAMRAI_MPI& mpi(level->getMappedBoxLevel()->getMPI());
+
+   int i;
+
+   const hier::ProcessorMapping& mapping = level->getProcessorMapping();
+
+   const int nprocs = mpi.getSize();
+   tbox::Array<double> work(nprocs);
+
+   for (i = 0; i < nprocs; i++) {
+      work[i] = 0.0;
+   }
+
+   if (workload_data_id < 0) {
+
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         work[mapping.getProcessorAssignment(ip->getLocalId().getValue())] +=
+            (*ip)->getBox().size();
+      }
+
+   } else {
+
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> patch = *ip;
+         tbox::Pointer<pdat::CellData<double> > weight =
+            patch->getPatchData(workload_data_id);
+
+         work[mapping.getProcessorAssignment(ip->getLocalId().getValue())] +=
+            s_norm_ops.L1Norm(weight, patch->getBox());
+      }
+
+   }
+
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(work.getPointer(), 1, MPI_SUM);
+   }
+
+   double max_work = 0.0;
+   double total_work = 0.0;
+   for (i = 0; i < nprocs; i++) {
+      total_work += work[i];
+      if (work[i] > max_work) max_work = work[i];
+   }
+
+   double efficiency = 100.0 * total_work / (max_work * nprocs);
+
+   return efficiency;
+
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/BalanceUtilities.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/BalanceUtilities.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,394 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   utility routines useful for load balancing operations 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_BalanceUtilities
+#define included_mesh_BalanceUtilities
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/math/PatchCellDataNormOpsReal.h"
+#include "SAMRAI/mesh/SpatialKey.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/ProcessorMapping.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace mesh {
+
+/*!
+ * @brief Utility class BalanceUtilities provides several functions
+ * useful in various load balancing operations.  These utilities include
+ * bin packing operations, box chopping by recursive bisection, and
+ * computation of effective processor layouts for boxes.
+ */
+
+struct BalanceUtilities {
+   /*!
+    * Assign workloads to processors using a greedy algorithm that attempts
+    * to distribute the sum of weights on each processor evenly across
+    * the given number of processors.
+    *
+    * @return         double-valued estimate of the load balance efficiency
+    *                 (ranges from zero to one hundred percent)
+    *
+    * @param mapping  Output processor mapping.
+    * @param weights  tbox::Array of double-valued weights to distribute.
+    * @param nproc    Integer number of processors, must be > 0.
+    */
+   static double
+   binPack(
+      hier::ProcessorMapping& mapping,
+      tbox::Array<double>& weights,
+      int nproc);
+
+   /*!
+    * Assign boxes to processors so that boxes spatially near each
+    * other are likely to be assigned to processors near each other
+    * (assuming that processor ordering is reflected in processor rank)
+    * and so that the workload is approximately evenly distributed among
+    * the processors.  The routine uses a Morton space-filling curve
+    * algorithm.
+    *
+    * Note that this routine potentially reorders the boxes passed in to
+    * achieve the first goal.
+    *
+    * @return         Double-valued estimate of the load balance efficiency
+    *                 (ranges from zero to one hundred percent)
+    *
+    * @param mapping  Output processor mapping.
+    * @param weights  tbox::Array of double-valued box weights to distribute.
+    * @param boxes    tbox::Array of boxes to distribute to processors.
+    * @param nproc    Integer number of processors, must be > 0.
+    *
+    * Note that the wight and box arrrays must be the same size.
+    */
+   static double
+   spatialBinPack(
+      hier::ProcessorMapping& mapping,
+      tbox::Array<double>& weights,
+      hier::BoxArray& boxes,
+      const int nproc);
+
+   /*!
+    * Recursively chop chops boxes in input boxlist until each box has
+    * a workload less than the prescribed ideal workload or no more more
+    * chopping is allowed by the given constraints.   A spatially-uniform
+    * workload is assumed; i.e., all cells are weighted equally.  This routine
+    * attempts to create as many boxes as possible with loads equal to or
+    * slightly less than the ideal workload value so that they can be
+    * mapped to processors effectively.
+    *
+    * @param out_boxes       Output box list.
+    * @param out_workloads   Output list of box workloads.
+    * @param in_boxes        Input boxlist for chopping.
+    * @param ideal_workload  Input double ideal box workload, must be > 0.
+    * @param workload_tolerance Input double workload tolerance, must be >= 0 and < 1.0
+    * @param min_size        Input integer vector of minimum dimensions for
+    *                        output boxes. All entries must be > 0.
+    * @param cut_factor      Input integer vector used to create boxes with
+    *                        correct dimensions.  The length of each box
+    *                        dimension will be an integer multiple of the
+    *                        corresponding cut factor vector entry.  All
+    *                        vector entries must be > 0.  See hier::BoxUtilities
+    *                        documentation for more details.
+    * @param bad_interval    Input integer vector used to create boxes near
+    *                        physical domain boundary with sufficient number
+    *                        of cells.  No box face will be closer to the
+    *                        boundary than the corresponding interval of cells
+    *                        to the boundary (the corresponding value is given
+    *                        by the normal direction of the box face) unless
+    *                        the face coincides with the boundary itself.  The
+    *                        point of this argument is to have no patch live
+    *                        within a certain ghost cell width of the boundary
+    *                        if its boundary does not coincide with that
+    *                        boundary .  That is, all ghost cells along a face
+    *                        will be either in the domain interior or outside
+    *                        the domain.  All entries must be >= 0. See
+    *                        hier::BoxUtilities documentation for more details.
+    * @param physical_domain tbox::Array of boxes describing the physical extent of
+    *                        the index space associated with the in_boxes.
+    *                        This box array cannot be empty.
+    */
+   static void
+   recursiveBisectionUniform(
+      hier::BoxList& out_boxes,
+      tbox::List<double>& out_workloads,
+      const hier::BoxList& in_boxes,
+      double ideal_workload,
+      const double workload_tolerance,
+      const hier::IntVector& min_size,
+      const hier::IntVector& cut_factor,
+      const hier::IntVector& bad_interval,
+      const hier::BoxArray& physical_domain);
+
+   /*!
+    * Recursively chops boxes given by patches on input patch level until each
+    * box has a workload less than the prescribed ideal workload or no more more
+    * chopping is allowed by the given constraints.   A spatially-nonuniform
+    * workload is assumed.  Cell weights must be given bydata defined by the
+    * given patch data id on the given patch level.  This routine attempts to
+    * create as many boxes as possible with loads equal to or slightly less
+    * than the ideal workload value so that they can be mapped to processors
+    * effectively.
+    *
+    * @param out_boxes       Output box list.
+    * @param out_workloads   Output list of box workloads.
+    * @param in_level        Input patch level whose patches describe input
+    *                        box regions and whose patch data contain workload
+    *                        estimate for each cell.
+    * @param work_id         Input integer patch data id for cell-centered
+    *                        double work estimate for each cell.
+    * @param ideal_workload  Input double ideal box workload, must be > 0.
+    * @param workload_tolerance Input double workload tolerance, must be >= 0 and < 1.0
+    * @param min_size        Input integer vector of minimum dimensions for
+    *                        output boxes. All entries must be > 0.
+    * @param cut_factor      Input integer vector used to create boxes with
+    *                        correct dimensions.  The length of each box
+    *                        dimension will be an integer multiple of the
+    *                        corresponding cut factor vector entry.  All
+    *                        vector entries must be > 0.  See hier::BoxUtilities
+    *                        documentation for more details.
+    * @param bad_interval    Input integer vector used to create boxes near
+    *                        physical domain boundary with sufficient number
+    *                        of cells.  No box face will be closer to the
+    *                        boundary than the corresponding interval of cells
+    *                        to the boundary (the corresponding value is given
+    *                        by the normal direction of the box face) unless
+    *                        the face coincides with the boundary itself.  The
+    *                        point of this argument is to have no patch live
+    *                        within a certain ghost cell width of the boundary
+    *                        if its boundary does not coincide with that
+    *                        boundary .  That is, all ghost cells along a face
+    *                        will be either in the domain interior or outside
+    *                        the domain.  All entries must be >= 0. See
+    *                        hier::BoxUtilities documentation for more details.
+    * @param physical_domain tbox::Array of boxes describing the physical extent of
+    *                        the index space associated with the in_boxes.
+    *                        This box array cannot be empty.
+    */
+   static void
+   recursiveBisectionNonuniform(
+      hier::BoxList& out_boxes,
+      tbox::List<double>& out_workloads,
+      const tbox::Pointer<hier::PatchLevel>& in_level,
+      int work_id,
+      double ideal_workload,
+      const double workload_tolerance,
+      const hier::IntVector& min_size,
+      const hier::IntVector& cut_factor,
+      const hier::IntVector& bad_interval,
+      const hier::BoxArray& physical_domain);
+
+   /*!
+    * Compute factorization of processors corresponding to
+    * dimensions of given box.
+    *
+    * @param proc_dist  Output number of processors for each
+    *                   coordinate direction.
+    * @param num_procs  Input integer number of processors, must be > 0.
+    * @param box        Input box to be distributed.
+    */
+   static void
+   computeDomainDependentProcessorLayout(
+      hier::IntVector& proc_dist,
+      int num_procs,
+      const hier::Box& box);
+
+   /*!
+    * Compute a factorization of processors that does NOT necessarily
+    * correspond to the dimensions of the supplied box.  For example, the
+    * processor distribution in each direction may simply be a square root
+    * (cube root in 3D) of the number of processors.  The box information
+    * is used simply to determine a maximum number of processors in each
+    * coordinate direction.
+    *
+    * @param proc_dist  Output number of processors for each
+    *                   coordinate direction.
+    * @param num_procs  Input integer number of processors, must be > 0.
+    * @param box        Input box to be distributed.
+    */
+   static void
+   computeDomainIndependentProcessorLayout(
+      hier::IntVector& proc_dist,
+      int num_procs,
+      const hier::Box& box);
+
+   /*!
+    * Sort box array in descending order of workload according to the
+    * workload array.  Both the box array and the work array will be
+    * sorted on return.
+    *
+    * Note that if you simply want to sort boxes based on their size,
+    * see hier::BoxUtilities.
+    *
+    * @param boxes     Boxes to be sorted based on workload array.
+    * @param workload  Workloads to use for sorting boxes.
+    *
+    * Note that both arrays must be the same size.
+    */
+   static void
+   sortDescendingBoxWorkloads(
+      hier::BoxArray& boxes,
+      tbox::Array<double>& workload);
+
+   /*!
+    * Compute total workload in region of argument box based on patch
+    * data defined by given integer index.  The sum is computed on the
+    * intersection of argument box and box over which data associated with
+    * workload is defined.
+    *
+    * @return          Double-valued sum of workload values in box region.
+    *
+    * @param patch     Input patch on which workload data is defined.
+    * @param wrk_indx  Input integer patch data identifier for work data.
+    * @param box       Input box region
+    *
+    * Note that wrk_indx must refer to a valid cell-centered patch data entry.
+    */
+   static double
+   computeNonUniformWorkload(
+      tbox::Pointer<hier::Patch> patch,
+      int wrk_indx,
+      const hier::Box& box);
+
+   /*!
+    * Compute and return load balance efficiency for a level.
+    *
+    * @return         Double-valued estimate of the load balance efficiency
+    *                 (ranges from zero to one hundred percent)
+    *
+    * @param level            Input patch level to consider, can't be null.
+    * @param os               Output stream for reporting load balance
+    *                         details.
+    * @param workload_data_id (Optional) Input integer id for workload
+    *                         data on level.  If no value is given, the
+    *                         calculation assumes spatially-uniform load.
+    */
+   static double
+   computeLoadBalanceEfficiency(
+      const tbox::Pointer<hier::PatchLevel>& level,
+      std::ostream& os,
+      int workload_data_id = -1);
+
+private:
+   static math::PatchCellDataNormOpsReal<double> s_norm_ops;
+
+   static void
+   privateHeapify(
+      tbox::Array<int>& permutation,
+      tbox::Array<double>& workload,
+      const int index,
+      const int heap_size);
+
+   static void
+   privateHeapify(
+      tbox::Array<int>& permutation,
+      tbox::Array<SpatialKey>& spatial_keys,
+      const int index,
+      const int heap_size);
+
+   static void
+   privateRecursiveProcAssign(
+      const int wt_index_lo,
+      const int wt_index_hi,
+      tbox::Array<double>& weights,
+      const int proc_index_lo,
+      const int proc_index_hi,
+      hier::ProcessorMapping& mapping,
+      const double avg_weight);
+
+   static void
+   privatePrimeFactorization(
+      const int N,
+      tbox::Array<int>& p);
+
+   static void
+   privateResetPrimesArray(
+      tbox::Array<int>& p);
+
+   static bool
+   privateBadCutPointsExist(
+      const hier::BoxArray& physical_domain);
+
+   static void
+   privateInitializeBadCutPointsForBox(
+      tbox::Array<tbox::Array<bool> >& bad_cut_points,
+      hier::Box& box,
+      bool bad_domain_boundaries_exist,
+      const hier::IntVector& bad_interval,
+      const hier::BoxArray& physical_domain);
+
+   static bool
+   privateFindBestCutDimension(
+      int& cut_dim_out,
+      const hier::Box& in_box,
+      const hier::IntVector& min_size,
+      const hier::IntVector& cut_factor,
+      tbox::Array<tbox::Array<bool> >& bad_cut_points);
+
+   static int
+   privateFindCutPoint(
+      double total_work,
+      double ideal_workload,
+      int mincut,
+      int numcells,
+      const tbox::Array<double>& work_in_slice,
+      const tbox::Array<bool>& bad_cut_points);
+
+   static void
+   privateCutBoxesAndSetBadCutPoints(
+      hier::Box& box_lo,
+      tbox::Array<tbox::Array<bool> >& bad_cut_points_for_boxlo,
+      hier::Box& box_hi,
+      tbox::Array<tbox::Array<bool> >& bad_cut_points_for_boxhi,
+      const hier::Box& in_box,
+      int cutdim,
+      int cut_index,
+      const tbox::Array<tbox::Array<bool> >& bad_cut_points);
+
+   static void
+   privateRecursiveBisectionUniformSingleBox(
+      hier::BoxList& out_boxes,
+      tbox::List<double>& out_workloads,
+      const hier::Box& in_box,
+      double in_box_workload,
+      double ideal_workload,
+      const double workload_tolerance,
+      const hier::IntVector& min_size,
+      const hier::IntVector& cut_factor,
+      tbox::Array<tbox::Array<bool> >& bad_cut_points);
+
+   static void
+   privateRecursiveBisectionNonuniformSingleBox(
+      hier::BoxList& out_boxes,
+      tbox::List<double>& out_workloads,
+      const tbox::Pointer<hier::Patch>& patch,
+      const hier::Box& in_box,
+      double in_box_workload,
+      int work_data_index,
+      double ideal_workload,
+      const double workload_tolerance,
+      const hier::IntVector& min_size,
+      const hier::IntVector& cut_factor,
+      tbox::Array<tbox::Array<bool> >& bad_cut_points);
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/BaseGriddingAlgorithm.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/BaseGriddingAlgorithm.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,62 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR hierarchy generation and regridding routines. 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_BaseGriddingAlgorithm_C
+#define included_mesh_BaseGriddingAlgorithm_C
+
+#include "SAMRAI/mesh/BaseGriddingAlgorithm.h"
+
+namespace SAMRAI {
+namespace mesh {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor and destructor for BaseGriddingAlgorithm.            *
+ *                                                                       *
+ *************************************************************************
+ */
+BaseGriddingAlgorithm::BaseGriddingAlgorithm(
+   const tbox::Pointer<hier::BasePatchHierarchy> &base_hierarchy )
+   : d_base_hierarchy(base_hierarchy)
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destructor tells the tbox_RestartManager to remove this object from   *
+ * the list of restart items.                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+BaseGriddingAlgorithm::~BaseGriddingAlgorithm()
+{
+}
+
+/*
+ *************************************************************************
+ *
+ * Provide default for override_mapping.
+ *
+ *************************************************************************
+ */
+void BaseGriddingAlgorithm::makeCoarsestLevel(
+   const double level_time)
+
+{
+   makeCoarsestLevel(
+      level_time,
+      hier::MappedBoxLevel(d_base_hierarchy->getDim()));
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/BaseGriddingAlgorithm.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/BaseGriddingAlgorithm.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,253 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR hierarchy generation and regridding routines. 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_BaseGriddingAlgorithm
+#define included_mesh_BaseGriddingAlgorithm
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/BasePatchHierarchy.h"
+#include "SAMRAI/mesh/TagAndInitializeStrategy.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Serializable.h"
+
+namespace SAMRAI {
+namespace mesh {
+
+/*!
+ * @brief Virtual base class providing interface for gridding algorithm.
+ *
+ * Class BaseGriddingAlgorithm in a virtual base class that provides
+ * an abstract interface for a gridding algorithm.  This allows higher-level
+ * classes in SAMRAI and in applications that use SAMRAI to interface
+ * with a gridding algorithm in an abstract manner without knowing whether
+ * it is a mesh::GriddingAlgorithm that handles gridding operations on a
+ * rectangular domain or if it is an algorithm for gridding on, for example,
+ * a multiblock domain.
+ *
+ * @see mesh::GriddingAlgorithm
+ */
+
+class BaseGriddingAlgorithm:
+   public tbox::Serializable
+{
+public:
+   /*!
+    * @brief Default constructor
+    *
+    * @param base_hierarchy The hierarchy that this gridding algorithm
+    * will operate on.  All hierarchy operations and data refers to
+    * this hierarchy.
+    */
+   BaseGriddingAlgorithm(
+      const tbox::Pointer<hier::BasePatchHierarchy> &base_hierarchy );
+
+   /*!
+    * @brief Virtual destructor for BaseGriddingAlgorithm.
+    */
+   virtual ~BaseGriddingAlgorithm();
+
+   /*!
+    * @brief Construct the coarsest level in the hierarchy (i.e., level 0).
+    *
+    * If level 0 does not already exist, then the domain specification is
+    * checked against the constraints of the grid generation procedures.
+    * The level gridding strategy data member defines these constraints.
+    * Recall that the domain specification is maintained by the grid geometry
+    * associated with the hierarchy.  Generally, an unrecoverable
+    * assertion will result if the constraints are not satisfied.
+    *
+    * If level 0 already exists in the hierarchy, then the routine will
+    * generate a new level by re-applying the load balancing procedure to
+    * the existing level.  Data will be moved from the old level to the
+    * new level and the pre-existing level 0 will be discarded.  Note that
+    * this routine is different than the routine makeFinerLevel() below,
+    * which is used to construct levels 1 and finer.  In particular, this
+    * routine does not select cells for refinement, whereas the other
+    * routine does.
+    *
+    * The two optional arguments are only to be used for a special case where
+    * the user wishes to manually specify a box decomposition and load
+    * balance for the coarsest level of the hierarchy.  The BoxArray argument
+    * must be a decomposition of the the coarsest level, and must exactly
+    * fill the index space of the physical domain of the hierarchy.  The
+    * ProcessorMapping must be constructed to map each box in the BoxArray
+    * to a processor.  The size of the mapping must be equal to the length
+    * of the box array, or an assertion failure will result.
+    *
+    * @param level_time Simulation time when level is constructed
+    * @param override_mapped_box_level mapped_box_level representing a decomposition of level
+    *                       zero of the hierarchy.
+    */
+   virtual void
+   makeCoarsestLevel(
+      const double level_time,
+      const hier::MappedBoxLevel& override_mapped_box_level) = 0;
+
+   /*
+    * Same as previous method but no level zero of the hierarchy is supplied.
+    */
+   virtual void
+   makeCoarsestLevel(
+      const double level_time);
+
+   /*!
+    * @brief This routine attempts to create a new level in the hierarchy
+    * finer than the finest level currently residing in the hierarchy.
+    *
+    * It will select cells for refinement on the finest level and construct
+    * a new finest level, if necessary.  If no cells are selected for
+    * refinement, no new level will be added to the hierarchy.   The boolean
+    * argument initial_time indicates whether the routine is called at the
+    * initial simulation time.  If true, this routine is used to build
+    * individual levels during the construction of the AMR hierarchy at the
+    * initial simulation time.  If false, the routine is being used to add
+    * new levels to the hierarchy at some later point.  In either case, the
+    * time value is the current simulation time.  Note that this routine
+    * cannot be used to construct the coarsest level in the hierarchy
+    * (i.e., level 0).  The routine makeCoarsestLevel() above must be used
+    * for that purpose.
+    *
+    * The tag buffer indicates the number of cells by which cells selected
+    * for refinement will be buffered before new finer level boxes are
+    * constructed.  The buffer is important to keep phenomena of interest
+    * on refined regions of the mesh until adaptive regridding occurs next.
+    * Thus, the buffer size should take into account how the simulation may
+    * evolve before regridding occurs (e.g., number of timesteps taken).
+    *
+    * Important note: If assertion checking is activated, several checks
+    * are applied to the functions arguments.  If any check is violated,
+    * an unrecoverable assertion will result.  In particular, the hierarchy
+    * pointer must be non-NULL and the given level number must match that of
+    * the finest level currently residing in the hierarchy.  Also, the
+    * the tag buffer must be positive.
+    *
+    * @param level_time Simulation time when level is constructed
+    * @param initial_time Must be true if level_time is the initial time
+    *                     of the simulation, false otherwise
+    * @param tag_buffer Size of buffer around tagged cells that will be
+    *                   covered by the fine level
+    * @param regrid_start_time The simulation time when the regridding
+    *                          operation began (this parameter is ignored
+    *                          except when using Richardson extrapolation)
+    */
+   virtual void
+   makeFinerLevel(
+      const double level_time,
+      const bool initial_time,
+      const int tag_buffer,
+      const double regrid_start_time = 0.0) = 0;
+
+   /*!
+    * @brief This routine attempts to reconfigure the patches on each level in
+    * the AMR patch hierarchy which is finer than the specified level.
+    *
+    * The given level number is that of the coarsest level on which cells
+    * will be selected for refinement.  In other words, that level is the
+    * finest level that will not be subject to a change in its patch
+    * configuration during the regridding process.  Generally, this routine
+    * should be used to alter the pre-existing AMR patch hierarchy based on
+    * the need to adapt the computational mesh around some phenomenon of
+    * interest.  The routine makeFinerLevel() above should be used to
+    * construct the initial hierarchy configuration or to add more than one
+    * new level into the hierarchy.  Also, this routine will not reconfigure
+    * the patches on level 0 (i.e., the coarsest in the hierarchy).  The
+    * routine makeCoarsestLevel() above is provided for that purpose.
+    *
+    * Note that the current algorithm permits at most one new finest level
+    * to be added to the hierarchy with each invocation of the regridding
+    * process.  This constraint, though seemingly restrictive makes the
+    * process of maintaining properly nested levels much easier.
+    *
+    * The tag buffer array indicates the number of cells by which cells
+    * selected for refinement on a level will be buffered before new finer
+    * level boxes are constructed.  The buffer is important to keep phenomena
+    * of interest on refined regions of the mesh until adaptive regridding
+    * occurs next.  Thus, the buffer size should take into account how the
+    * simulation may evolve before regridding occurs (e.g., number of
+    * timesteps taken on each level).
+    *
+    * The boolean argument is used for regridding in time-dependent
+    * problems.  When true, it indicates that the specified level is
+    * the coarsest level to synchronize at the current regrid time
+    * before this regridding method is called.  This is a pretty
+    * idiosyncratic argument but allows some flexibility in the way
+    * memory is managed during time-dependent regridding operations.
+    *
+    * Important note: If assertion checking is activated, several checks
+    * are applied to the functions arguments.  If any check is violated,
+    * an unrecoverable assertion will result.  In particular,
+    * the given level number must match that of
+    * of some level in the hierarchy.  Also, the tag buffer array must
+    * contain a positive value for each level in the hierarchy.
+    *
+    * @param level_number Coarsest level on which cells will be tagged for
+    *                     refinement
+    * @param regrid_time Simulaition time when regridding occurs
+    * @param tag_buffer Size of buffer on each level around tagged cells
+    *                   that will be covered by the next finer level
+    * @param regrid_start_time The simulation time when the regridding
+    *                          operation began on each level (this parameter is
+    *                          ignored except when using Richardson
+    *                          extrapolation)
+    * @param level_is_coarsest_to_sync Level is the coarsest to sync
+    */
+   virtual void
+   regridAllFinerLevels(
+      const int level_number,
+      const double regrid_time,
+      const tbox::Array<int>& tag_buffer,
+      tbox::Array<double> regrid_start_time = tbox::Array<double>(),
+      const bool level_is_coarsest_to_sync = true) = 0;
+
+   /*!
+    * @brief Return true if error estimation process uses time integration;
+    * otherwise, return false.
+    */
+   virtual bool
+   errorEstimationUsesTimeIntegration() const = 0;
+
+   /*!
+    * @brief Return pointer to level gridding strategy data member.
+    */
+   virtual
+   tbox::Pointer<TagAndInitializeStrategy>
+   getTagAndInitializeStrategy() const = 0;
+
+   /*!
+    * @brief Return efficiency tolerance for clustering tags on level.
+    */
+   virtual double
+   getEfficiencyTolerance(
+      const int level_number) const = 0;
+
+   /*!
+    * @brief Return combine efficiency for clustering tags on level.
+    */
+   virtual double
+   getCombineEfficiency(
+      const int level_number) const = 0;
+
+   /*!
+    * @brief Write object state out to the given database.
+    *
+    * When assertion checking is active, the database pointer must be non-null.
+    */
+   virtual void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> db) = 0;
+
+private:
+
+   tbox::Pointer<hier::BasePatchHierarchy> d_base_hierarchy;
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/BergerRigoutsos.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/BergerRigoutsos.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,528 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Asynchronous Berger-Rigoutsos algorithm wrapper 
+ *
+ ************************************************************************/
+#ifndef included_mesh_BergerRigoutsos_C
+#define included_mesh_BergerRigoutsos_C
+
+#include <stdlib.h>
+
+#include "SAMRAI/mesh/BergerRigoutsos.h"
+
+#include "SAMRAI/hier/MappingConnectorAlgorithm.h"
+#include "SAMRAI/hier/OverlapConnectorAlgorithm.h"
+#include "SAMRAI/mesh/BergerRigoutsosNode.h"
+#include "SAMRAI/hier/MappedBoxLevelConnectorUtils.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/TimerManager.h"
+
+namespace SAMRAI {
+namespace mesh {
+
+tbox::Pointer<tbox::Timer> BergerRigoutsos::t_barrier_before;
+tbox::Pointer<tbox::Timer> BergerRigoutsos::t_barrier_after;
+tbox::Pointer<tbox::Timer> BergerRigoutsos::t_find_boxes_with_tags;
+tbox::Pointer<tbox::Timer> BergerRigoutsos::t_run_abr;
+tbox::Pointer<tbox::Timer> BergerRigoutsos::t_global_reductions;
+tbox::Pointer<tbox::Timer> BergerRigoutsos::t_sort_output_nodes;
+
+tbox::StartupShutdownManager::Handler
+BergerRigoutsos::s_initialize_finalize_handler(
+   BergerRigoutsos::initializeCallback,
+   0,
+   0,
+   BergerRigoutsos::finalizeCallback,
+   tbox::StartupShutdownManager::priorityTimers);
+
+/*
+ ************************************************************************
+ * Constructor stores parameters of options for ussing                  *
+ * the asynchronous Berger-Rigoutsos implementation.                    *
+ ************************************************************************
+ */
+BergerRigoutsos::BergerRigoutsos(
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> database):
+   d_dim(dim),
+   d_mpi(tbox::SAMRAI_MPI::commNull),
+   d_max_box_size(hier::IntVector(d_dim, tbox::MathUtilities<int>::getMax())),
+   d_max_lap_cut_from_center(1.0),
+   d_log_node_history(false),
+   d_log_cluster_summary(false),
+   d_log_cluster(false),
+   d_owner_mode("MOST_OVERLAP"),
+   d_algo_advance_mode("ADVANCE_SOME"),
+   d_sort_output_nodes(false),
+   d_check_min_box_size('w'),
+   d_barrier_before(false),
+   d_barrier_after(false)
+{
+
+   /*
+    * Set database-dependent parameters or cache them for use
+    * when we construct a dendogram root.
+    */
+   if (!database.isNull()) {
+      if (database->isInteger("max_box_size")) {
+         database->getIntegerArray("max_box_size", &d_max_box_size[0], d_dim.getValue());
+      }
+      d_max_lap_cut_from_center =
+         database->getDoubleWithDefault("max_lap_cut_from_center",
+            d_max_lap_cut_from_center);
+      d_log_node_history =
+         database->getBoolWithDefault("log_node_history",
+            d_log_node_history);
+      d_log_cluster_summary =
+         database->getBoolWithDefault("log_cluster_summary",
+            d_log_cluster_summary);
+      d_log_cluster =
+         database->getBoolWithDefault("log_cluster",
+            d_log_cluster);
+      d_algo_advance_mode =
+         database->getStringWithDefault("algo_advance_mode",
+            d_algo_advance_mode);
+      d_owner_mode =
+         database->getStringWithDefault("owner_mode",
+            d_owner_mode);
+      d_sort_output_nodes =
+         database->getBoolWithDefault("sort_output_nodes",
+            d_sort_output_nodes);
+
+      std::string tmp_str;
+
+      tmp_str = database->getStringWithDefault("check_min_box_size",
+                                               std::string("WARN"));
+      d_check_min_box_size = char(tolower(*tmp_str.c_str()));
+      if (d_check_min_box_size != 'i' &&
+          d_check_min_box_size != 'w' &&
+          d_check_min_box_size != 'e') {
+         TBOX_ERROR("BergerRigoutsos: input parameter check_min_box_size\n"
+                    << "can only be \"IGNORE\", \"WARN\" or \"ERROR\"");
+      }
+
+      d_barrier_before =
+         database->getBoolWithDefault("barrier_before",
+            d_barrier_before);
+      d_barrier_after =
+         database->getBoolWithDefault("barrier_after",
+            d_barrier_after);
+   }
+
+}
+
+BergerRigoutsos::~BergerRigoutsos(
+   void)
+{
+   if (d_mpi.getCommunicator() != tbox::SAMRAI_MPI::commNull) {
+      // Free the private communicator (if SAMRAI_MPI has not been finalized).
+      int flag;
+      tbox::SAMRAI_MPI::Finalized(&flag);
+      if (!flag) {
+         d_mpi.freeCommunicator();
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ * Set the MPI communicator.
+ *************************************************************************
+ */
+void BergerRigoutsos::setMPI(
+   const tbox::SAMRAI_MPI& mpi)
+{
+   if (d_mpi.getCommunicator() != tbox::SAMRAI_MPI::commNull) {
+      d_mpi.freeCommunicator();
+   }
+   if (mpi.getCommunicator() != tbox::SAMRAI_MPI::commNull) {
+      d_mpi.dupCommunicator(mpi);
+   }
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Implement the BoxGeneratorStrategy interface method using            *
+ * the asynchronous Berger-Rigoutsos implementation.                    *
+ *                                                                      *
+ * Create objects for using the ABR recursion tree, set options for     *
+ * using the ABR implementation, then run it.                           *
+ *                                                                      *
+ * The output boxes from the dendogram root is in the form of a         *
+ * MappedBoxLevel.  This method postprocess that data to                         *
+ * convert the output to the box list form required by the              *
+ * box clustering strategy interface.                                   *
+ *                                                                      *
+ ************************************************************************
+ */
+void BergerRigoutsos::findBoxesContainingTags(
+   hier::MappedBoxLevel& new_mapped_box_level,
+   hier::Connector& tag_to_new,
+   hier::Connector& new_to_tag,
+   const tbox::Pointer<hier::PatchLevel> tag_level,
+   const int tag_data_index,
+   const int tag_val,
+   const hier::Box& bound_box,
+   const hier::IntVector& min_box,
+   const double efficiency_tol,
+   const double combine_tol,
+   const hier::IntVector& max_gcw) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS5(new_mapped_box_level,
+      *tag_level,
+      bound_box,
+      min_box,
+      max_gcw);
+
+   tbox::SAMRAI_MPI mpi(tag_level->getMappedBoxLevel()->getMPI());
+
+   if ( !(bound_box.numberCells() >= min_box) ) {
+      if ( d_check_min_box_size == 'e' ) {
+         TBOX_ERROR("BergerRigoutsos::findBoxesContainingTags input error:\n"
+                    <<"Input box " << bound_box << " has size " << bound_box.numberCells()
+                    <<"\nwhich is already smaller than the minimum box size\n"
+                    <<min_box << "\n\n"
+                    <<"To ignore or just issue a warning, see the input parameter\n"
+                    <<"check_min_box_size.\n");
+      }
+      else if ( d_check_min_box_size == 'w' ) {
+         TBOX_WARNING("BergerRigoutsos::findBoxesContainingTags input warning:\n"
+                    <<"Input box " << bound_box << " has size " << bound_box.numberCells()
+                    <<"\nwhich is already smaller than the minimum box size\n"
+                    <<min_box << "\n\n"
+                    <<"To ignore or issue error, see the input parameter\n"
+                    <<"check_min_box_size.\n");
+      }
+   }
+
+   if (d_barrier_before) {
+      t_barrier_before->start();
+      mpi.Barrier();
+      t_barrier_before->stop();
+   }
+
+   if (bound_box.empty()) {
+      TBOX_ERROR("BergerRigoutsos: empty bounding box not allowed.");
+   }
+
+   const hier::MappedBoxLevel& tag_mapped_box_level =
+      *tag_level->getMappedBoxLevel();
+
+   /*
+    * If using a duplicate MPI communicator, check that the duplicate
+    * and the communicator of the tag_mapped_box_level are congruent.
+    */
+   if (d_mpi.getCommunicator() != tbox::SAMRAI_MPI::commNull) {
+      tbox::SAMRAI_MPI mpi1(d_mpi);
+      tbox::SAMRAI_MPI mpi2(tag_mapped_box_level.getMPI());
+      TBOX_ASSERT(mpi1.getSize() == mpi2.getSize());
+      TBOX_ASSERT(mpi1.getRank() == mpi2.getRank());
+      if (mpi1.getSize() > 1) {
+         int compare_result;
+         tbox::SAMRAI_MPI::Comm_compare(
+            d_mpi.getCommunicator(),
+            tag_mapped_box_level.getMPI().getCommunicator(),
+            &compare_result);
+         if (compare_result != MPI_CONGRUENT) {
+            TBOX_ERROR("BergerRigoutsos set-up error: MPI communicator\n"
+               << "set by setMPI() (" << d_mpi.getCommunicator()
+               << ") and the communicator of the input tag_mapped_box_level ("
+               << tag_mapped_box_level.getMPI().getCommunicator() << ") are not congruent.");
+         }
+      }
+   }
+
+   t_find_boxes_with_tags->start();
+
+   BergerRigoutsosNode root_node(d_dim);
+
+   // Set standard Berger-Rigoutsos clustering parameters.
+   root_node.setClusteringParameters(tag_data_index,
+      tag_val,
+      min_box,
+      efficiency_tol,
+      combine_tol,
+      d_max_box_size,
+      d_max_lap_cut_from_center);
+
+   // Set the parallel algorithm and DLBG parameters.
+   root_node.setAlgorithmAdvanceMode(d_algo_advance_mode);
+   root_node.setOwnerMode(d_owner_mode);
+   root_node.setComputeRelationships("BIDIRECTIONAL", max_gcw);
+
+   // Set debugging/verbosity parameters.
+   root_node.setLogNodeHistory(d_log_node_history);
+
+   root_node.clusterAndComputeRelationships(new_mapped_box_level,
+      tag_to_new,
+      new_to_tag,
+      bound_box,
+      tag_level,
+      d_mpi);
+
+   if (d_sort_output_nodes == true) {
+      /*
+       * Sorting the node indices is not required.
+       * This optional step makes the results order
+       * deterministic, which makes the results repeatable.
+       * (The natural order of the output of the asynchronous
+       * clustering algorithm is non-deterministic because
+       * it depends on the order of asynchronous messages.)
+       */
+      sortOutputMappedBoxes(new_mapped_box_level,
+         tag_to_new,
+         new_to_tag);
+   }
+
+   /*
+    * Get some global parameters.  Do it before logging to prevent
+    * the logging flag from having an undue side effect on performance.
+    */
+   t_global_reductions->start();
+   new_mapped_box_level.getGlobalNumberOfBoxes();
+   new_mapped_box_level.getGlobalNumberOfCells();
+   new_mapped_box_level.getGlobalBoundingBox();
+   t_global_reductions->stop();
+
+   if (d_log_cluster) {
+      tbox::plog
+         << "New mapped_box_level clustered by BergerRigoutsos:\n" << new_mapped_box_level.format("", 2)
+         << "BergerRigoutsos tag_to_new:\n" << tag_to_new.format("", 2)
+         << "BergerRigoutsos new_to_tag:\n" << new_to_tag.format("", 2);
+   }
+   if (d_log_cluster_summary) {
+      /*
+       * Log summary of clustering and dendogram.
+       */
+      tbox::plog << "Async BR on proc " << mpi.getRank()
+                 << " owned "
+                 << root_node.getMaxOwnership() << " participating in "
+                 << root_node.getMaxNodes() << " nodes ("
+                 << (double)root_node.getMaxOwnership() / root_node.getMaxNodes()
+                 << ") in " << root_node.getMaxGeneration() << " generations,"
+                 << "   " << root_node.getNumBoxesGenerated()
+                 << " boxes generated.\n"
+                 << root_node.getMaxTagsOwned() << " locally owned tags.\n"
+                 << "Initial bounding box = " << bound_box << ", "
+                 << bound_box.size() << " cells, "
+                 << "final global bounding box = "
+                 << new_mapped_box_level.getGlobalBoundingBox()
+                 << ", "
+                 << new_mapped_box_level.getGlobalBoundingBox().size()
+                 << " cells\n"
+                 << "Final output has " << root_node.getNumTags()
+                 << " tags in "
+                 << new_mapped_box_level.getGlobalNumberOfCells()
+                 << " global cells [" << new_mapped_box_level.getMinNumberOfCells()
+                 << "-" << new_mapped_box_level.getMaxNumberOfCells() << "], "
+                 << new_mapped_box_level.getGlobalNumberOfBoxes()
+                 << " global mapped boxes [" << new_mapped_box_level.getMinNumberOfBoxes()
+                 << "-" << new_mapped_box_level.getMaxNumberOfBoxes() << "]\n"
+                 << "Number of continuations: avg = "
+                 << root_node.getAvgNumberOfCont()
+                 << "   max = " << root_node.getMaxNumberOfCont() << "\n";
+   }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   assertNoMessageForPrivateCommunicator();
+#endif
+
+   if (d_barrier_after) {
+      t_barrier_after->start();
+      mpi.Barrier();
+      t_barrier_after->stop();
+   }
+
+   t_find_boxes_with_tags->stop();
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void BergerRigoutsos::sortOutputMappedBoxes(
+   hier::MappedBoxLevel& new_mapped_box_level,
+   hier::Connector& tag_to_new,
+   hier::Connector& new_to_tag) const
+{
+
+   t_sort_output_nodes->start();
+
+   hier::OverlapConnectorAlgorithm oca;
+
+   if (0) {
+      // Check inputs.
+      int errs = 0;
+      if (oca.checkOverlapCorrectness(tag_to_new, false, true)) {
+         ++errs;
+         tbox::perr << "Error found in tag_to_new!\n";
+      }
+      if (oca.checkOverlapCorrectness(new_to_tag, false, true)) {
+         ++errs;
+         tbox::perr << "Error found in new_to_tag!\n";
+      }
+      if (errs != 0) {
+         TBOX_ERROR(
+            "Errors found before sorting nodes."
+            << "new_mapped_box_level:\n" << new_mapped_box_level.format("", 2)
+            << "tag mapped_box_level:\n" << tag_to_new.getBase().format("", 2)
+            << "tag_to_new:\n" << tag_to_new.format("", 2)
+            << "new_to_tag:\n" << new_to_tag.format("", 2));
+      }
+   }
+
+   /*
+    * Sort local indices by corners to make the output deterministic.
+    */
+   hier::Connector sorting_map;
+   hier::MappedBoxLevel sorted_mapped_box_level(d_dim);
+   hier::MappedBoxLevelConnectorUtils dlbg_edge_utils;
+   dlbg_edge_utils.makeSortingMap(
+      sorted_mapped_box_level,
+      sorting_map,
+      new_mapped_box_level,
+      true /* sort nodes by corners */,
+      false /* don't sequentialize indices globally */);
+   if (0) {
+      tbox::plog
+         << "tag mapped_box_level:\n" << tag_to_new.getBase().format("", 2)
+         << "tag_to_new:\n" << tag_to_new.format("", 2)
+         << "new_to_tag:\n" << new_to_tag.format("", 2)
+         << "Sorting map:\n" << sorting_map.format("", 2);
+   }
+   if (0) {
+      // Check sorting_map before using it.
+      int errs = 0;
+      if (oca.checkOverlapCorrectness(sorting_map, false, true)) {
+         ++errs;
+         tbox::perr << "Error found in sorting_map!\n";
+      }
+      if (errs != 0) {
+         TBOX_ERROR(
+            "Errors in load balance mapping found."
+            << "presorted mapped_box_level:\n" << new_mapped_box_level.format("", 2)
+            << "sorted mapped_box_level:\n" << sorted_mapped_box_level.format("", 2)
+            << "sorting_map:\n" << sorting_map.format("", 2));
+      }
+   }
+   hier::MappingConnectorAlgorithm mca;
+   mca.modify(tag_to_new,
+      new_to_tag,
+      sorting_map,
+      &new_mapped_box_level);
+   if (0) {
+      // Check result of mapping.
+      int errs = 0;
+      if (oca.checkOverlapCorrectness(tag_to_new, false, true)) {
+         ++errs;
+         tbox::perr << "Error found in tag_to_new!\n";
+      }
+      if (oca.checkOverlapCorrectness(new_to_tag, false, true)) {
+         ++errs;
+         tbox::perr << "Error found in new_to_tag!\n";
+      }
+      if (errs != 0) {
+         TBOX_ERROR(
+            "Errors found after sorting nodes."
+            << "new_mapped_box_level:\n" << new_mapped_box_level.format("", 2)
+            << "tag mapped_box_level:\n" << tag_to_new.getBase().format("", 2)
+            << "tag_to_new:\n" << tag_to_new.format("", 2)
+            << "new_to_tag:\n" << new_to_tag.format("", 2));
+      }
+   }
+
+   t_sort_output_nodes->stop();
+}
+
+/*
+ ***************************************************************************
+ *                                                                         *
+ ***************************************************************************
+ */
+void BergerRigoutsos::assertNoMessageForPrivateCommunicator() const
+{
+   /*
+    * If using a private communicator, double check to make sure
+    * there are no remaining messages.  This is not a guarantee
+    * that there is no messages in transit, but it can find
+    * messages that have arrived but not received.
+    */
+   if (d_mpi.getCommunicator() != tbox::SAMRAI_MPI::commNull) {
+      int flag;
+      tbox::SAMRAI_MPI::Status mpi_status;
+      int mpi_err = d_mpi.Iprobe(MPI_ANY_SOURCE,
+            MPI_ANY_TAG,
+            &flag,
+            &mpi_status);
+      if (mpi_err != MPI_SUCCESS) {
+         TBOX_ERROR("Error probing for possible lost messages.");
+      }
+      if (flag == true) {
+         int count = -1;
+         mpi_err = tbox::SAMRAI_MPI::Get_count(&mpi_status, MPI_INT, &count);
+         TBOX_ERROR("Library error!\n"
+            << "BergerRigoutsos detected before or after\n"
+            << "running BergerRigoutsosNode that there\n"
+            << "is a message yet to be received.  This is\n"
+            << "an error because all messages using the\n"
+            << "private communicator should have been\n"
+            << "accounted for.  Message status:\n"
+            << "source " << mpi_status.MPI_SOURCE << '\n'
+            << "tag " << mpi_status.MPI_TAG << '\n'
+            << "count " << count << " (assuming integers)\n");
+      }
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void BergerRigoutsos::initializeCallback()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(t_global_reductions.isNull());
+#endif
+   t_run_abr = tbox::TimerManager::getManager()->
+      getTimer("mesh::BergerRigoutsos::run_abr");
+   t_find_boxes_with_tags = tbox::TimerManager::getManager()->
+      getTimer("mesh::BergerRigoutsos::find_boxes_with_tags");
+   t_global_reductions = tbox::TimerManager::getManager()->
+      getTimer("mesh::BergerRigoutsos::global_reductions");
+   t_sort_output_nodes = tbox::TimerManager::getManager()->
+      getTimer("mesh::BergerRigoutsos::sort_output_nodes");
+   t_barrier_before = tbox::TimerManager::getManager()->
+      getTimer("mesh::BergerRigoutsos::barrier_before");
+   t_barrier_after = tbox::TimerManager::getManager()->
+      getTimer("mesh::BergerRigoutsos::barrier_after");
+}
+
+/*
+ ***************************************************************************
+ *                                                                         *
+ * Release static timers.  To be called by shutdown registry to make sure  *
+ * memory for timers does not leak.                                        *
+ *                                                                         *
+ ***************************************************************************
+ */
+void BergerRigoutsos::finalizeCallback()
+{
+   t_barrier_before.setNull();
+   t_barrier_after.setNull();
+   t_find_boxes_with_tags.setNull();
+   t_run_abr.setNull();
+   t_global_reductions.setNull();
+   t_sort_output_nodes.setNull();
+}
+
+}
+}
+#endif
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/BergerRigoutsos.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/BergerRigoutsos.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,238 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Asynchronous Berger-Rigoutsos clustering algorithm. 
+ *
+ ************************************************************************/
+#ifndef included_mesh_BergerRigoutsos
+#define included_mesh_BergerRigoutsos
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/mesh/BoxGeneratorStrategy.h"
+#include "SAMRAI/hier/Connector.h"
+#include "SAMRAI/hier/MappedBoxLevel.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace mesh {
+
+/*!
+ * @brief Asynchronous Berger-Rigoutsos implementation.
+ * This class is derived from the abstract base class
+ * mesh::BoxGeneratorStrategy.  Thus, it serves as a concrete
+ * implementation of the box generator Strategy pattern interface.
+ *
+ * This class uses the BergerRigoutsosNode class
+ * to carry out the asynchronous Berger-Rigoutsos algorithm.
+ * It handles aspects not central to that algorithm.  It:
+ * - Implements the box generator Strategy pattern interface.
+ * - Provides an interface with the input database for setting
+ *   parameters influencing the implementation.
+ * - Sorts the output data (if user requests).
+ * - Performs some additional error checking.
+ * For more details on the parallel implementation,
+ * see mesh::BergerRigoutsosNode.
+ *
+ * User inputs (default):
+ * - string @b algo_advance_mode ("ADVANCE_SOME"):
+ *   Asynchronous algorithm advance mode.  The default has been
+ *   empirically determined to scale best to higher numbers of
+ *   processors and work adequately for lower numbers of processors.
+ * - std::string @b owner_mode ("MOST_OVERLAP"):
+ *   How to chose the owner from a dendogram node group.
+ *   This std::string is used in BergerRigoutsosNode::setOwnerMode().
+ * - bool @b sort_output_nodes (false):
+ *   Whether to sort the output.  This makes the normally
+ *   non-deterministic ordering deterministic and the results repeatable.
+ * - bool @b max_box_size:
+ *   The maximum cluster dimension allowed.  This parameter is not
+ *   critical to clustering but limiting the cluster size may improve
+ *   performance of load balancing algorithms (due to the excessive work
+ *   required by the owner of huge clusters).
+ * - bool @b check_min_box_size:
+ *   A flag to control how to resolve an initial box that violates the
+ *   minimum box size.  Set to one of these strings:
+ *   @b "IGNORE" - violations will be quietly disregarded.
+ *   @b "WARN" - violations will cause a warning but the
+ *   code will continue anyway.
+ *   @b "ERROR" - violations will cause an unrecoverable assertion.
+ *   The default is "WARN".
+ * - double @b max_lap_cut_from_center (1.0): Limit the Laplace cut to this
+ *   fraction of the distance from the center plane to the end.
+ *   Zero means cut only at the center plane.  One means unlimited.
+ *   Under most situations, one is fine.  A lower setting helps prevent
+ *   parallel slivers.
+ *
+ * Debugging inputs (default):
+ * - bool @b log_node_history (false):
+ *   Whether to log what certain actions of nodes in the dendogram.
+ *   This degrades the performance but is a very useful debugging
+ *   tool.
+ * - bool @b log_cluster_summary (false):
+ *   Whether to briefly log the results of the clustering.
+ * - bool @b log_cluster (false):
+ *   Whether to log the results of the clustering.
+ */
+class BergerRigoutsos:public mesh::BoxGeneratorStrategy
+{
+
+public:
+   /*!
+    * @brief Constructor.
+    */
+   BergerRigoutsos(
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> database =
+         tbox::Pointer<tbox::Database>(NULL));
+
+   /*!
+    * @brief Destructor.
+    *
+    * Deallocate internal data.
+    */
+   ~BergerRigoutsos(
+      void);
+
+   /*!
+    * @brief Set the MPI communication object.
+    *
+    * Duplicate the communicator in the given for private use.  A private
+    * communicator isolates the complex communications used by the
+    * asynchronous algorithm from other communications.  Duplicating
+    * the communicator is expensive but should only be need once.  All
+    * processes in the communicator must participate.  The duplicate
+    * communicator is active until this object is destructed.
+    * Using a duplicated MPI communicator is optional but recommended.
+    * When a duplicate MPI communicator is in use, it must be congruent
+    * with the communicator associated with the tag level.
+    *
+    * If the communicator is not set, the parallel clustering
+    * algorithm uses the communicator of the input tag
+    * mapped_box_level.  If it is set, then the algorithm only works
+    * for input tag mapped_box_levels with a congruent communicator.
+    *
+    * If communicator is SAMRAI_MPI::commNull, it is the same as not
+    * using a duplicate communicator.
+    */
+   void
+   setMPI(
+      const tbox::SAMRAI_MPI& mpi);
+
+   /*!
+    * @brief Implement the mesh::BoxGeneratorStrategy interface
+    * method of the same name.
+    *
+    * Create a set of boxes that covers all integer tags on
+    * the patch level that match the specified tag value.
+    * Each box will be at least as large as the given minimum
+    * size and the tolerances will be met.
+    *
+    * The efficiency tolerance is a threshold value for the percentage of
+    * tagged cells in each box.  If this percentage is below the tolerance,
+    * the box will continue to be split into smaller boxes.
+    *
+    * The combine tolerance is a threshold value for the sum of the volumes
+    * of two boxes into which a box may be potentially split.  If ratio of
+    * that sum and the volume of the original box, the box will not be split.
+    */
+   void
+   findBoxesContainingTags(
+      hier::MappedBoxLevel& new_mapped_box_level,
+      hier::Connector& tag_to_new,
+      hier::Connector& new_to_tag,
+      const tbox::Pointer<hier::PatchLevel> tag_level,
+      const int tag_data_index,
+      const int tag_val,
+      const hier::Box& bound_box,
+      const hier::IntVector& min_box,
+      const double efficiency_tol,
+      const double combine_tol,
+      const hier::IntVector& max_gcw) const;
+
+private:
+   const tbox::Dimension d_dim;
+
+   void
+   assertNoMessageForPrivateCommunicator() const;
+
+   void
+   sortOutputMappedBoxes(
+      hier::MappedBoxLevel& new_mapped_box_level,
+      hier::Connector& tag_to_new,
+      hier::Connector& new_to_tag) const;
+
+   /*!
+    * @brief Set up things for the entire class.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   initializeCallback();
+
+   /*!
+    * @brief Free static timers.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   finalizeCallback();
+
+   //! @brief Communication object.
+   tbox::SAMRAI_MPI d_mpi;
+
+   //! @brief Max box size constraint used by BergerRigoutsosNode.
+   hier::IntVector d_max_box_size;
+
+   //! @brief Max distance from center for Laplace cut.
+   double d_max_lap_cut_from_center;
+
+   //! @brief Whether to log execution node allocation and deallocation.
+   bool d_log_node_history;
+
+   //! @brief Whether to briefly log cluster summary.
+   bool d_log_cluster_summary;
+
+   //! @brief Whether to log cluster summary.
+   bool d_log_cluster;
+
+   //! @brief How to select the owner of a node.
+   std::string d_owner_mode;
+
+   //! @brief Asynchronous mode for advancing algorithm.
+   std::string d_algo_advance_mode;
+
+   //! @brief Whether to sort results to make them deterministic.
+   bool d_sort_output_nodes;
+
+   //! @brief How to resolve initial boxes smaller than min box size.
+   char d_check_min_box_size;
+
+   //@{
+   //! @name Used for evaluating performance;
+   bool d_barrier_before;
+   bool d_barrier_after;
+   //@}
+
+   static tbox::Pointer<tbox::Timer> t_barrier_before;
+   static tbox::Pointer<tbox::Timer> t_barrier_after;
+   static tbox::Pointer<tbox::Timer> t_find_boxes_with_tags;
+   static tbox::Pointer<tbox::Timer> t_run_abr;
+   static tbox::Pointer<tbox::Timer> t_global_reductions;
+   static tbox::Pointer<tbox::Timer> t_sort_output_nodes;
+
+   static tbox::StartupShutdownManager::Handler
+   s_initialize_finalize_handler;
+
+};
+
+}
+}
+
+#endif  // included_mesh_BergerRigoutsos
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/BergerRigoutsosNode.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/BergerRigoutsosNode.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,3310 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Node in asynchronous Berger-Rigoutsos dendogram 
+ *
+ ************************************************************************/
+#ifndef included_mesh_BergerRigoutsosNode_C
+#define included_mesh_BergerRigoutsosNode_C
+
+#include <cstring>
+#include <set>
+#include <algorithm>
+
+#include "SAMRAI/mesh/BergerRigoutsosNode.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/hier/RealMappedBoxConstIterator.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace mesh {
+
+#define BAD_INTEGER (-9999999)
+
+tbox::StartupShutdownManager::Handler
+BergerRigoutsosNode::s_initialize_handler(
+   BergerRigoutsosNode::initializeCallback,
+   0,
+   0,
+   BergerRigoutsosNode::finalizeCallback,
+   tbox::StartupShutdownManager::priorityTimers);
+
+tbox::Pointer<tbox::Timer> BergerRigoutsosNode::CommonParams::t_cluster;
+tbox::Pointer<tbox::Timer> BergerRigoutsosNode::CommonParams::t_cluster_and_compute_relationships;
+tbox::Pointer<tbox::Timer> BergerRigoutsosNode::CommonParams::t_continue_algorithm;
+tbox::Pointer<tbox::Timer> BergerRigoutsosNode::CommonParams::t_compute;
+tbox::Pointer<tbox::Timer> BergerRigoutsosNode::CommonParams::t_comm_wait;
+tbox::Pointer<tbox::Timer> BergerRigoutsosNode::CommonParams::t_MPI_wait;
+tbox::Pointer<tbox::Timer> BergerRigoutsosNode::CommonParams::t_compute_new_graph_relationships;
+tbox::Pointer<tbox::Timer> BergerRigoutsosNode::CommonParams::t_share_new_relationships;
+tbox::Pointer<tbox::Timer> BergerRigoutsosNode::CommonParams::t_share_new_relationships_send;
+tbox::Pointer<tbox::Timer> BergerRigoutsosNode::CommonParams::t_share_new_relationships_recv;
+tbox::Pointer<tbox::Timer> BergerRigoutsosNode::CommonParams::t_share_new_relationships_unpack;
+tbox::Pointer<tbox::Timer> BergerRigoutsosNode::CommonParams::t_local_tasks;
+tbox::Pointer<tbox::Timer> BergerRigoutsosNode::CommonParams::t_local_histogram;
+tbox::Pointer<tbox::Timer> BergerRigoutsosNode::CommonParams::t_reduce_histogram;
+tbox::Pointer<tbox::Timer> BergerRigoutsosNode::CommonParams::t_bcast_acceptability;
+tbox::Pointer<tbox::Timer> BergerRigoutsosNode::CommonParams::t_gather_grouping_criteria;
+tbox::Pointer<tbox::Timer> BergerRigoutsosNode::CommonParams::t_bcast_child_groups;
+tbox::Pointer<tbox::Timer> BergerRigoutsosNode::CommonParams::t_bcast_to_dropouts;
+
+/*
+ *******************************************************************
+ * Construct root node of the dendogram.
+ *******************************************************************
+ */
+BergerRigoutsosNode::BergerRigoutsosNode(
+   const tbox::Dimension& dim):
+   d_dim(dim),
+   d_pos(1),
+   d_common(new CommonParams(d_dim)),
+   d_parent(NULL),
+   d_lft_child(NULL),
+   d_rht_child(NULL),
+   d_box(d_dim),
+   d_owner(0),
+   d_group(0),
+   d_mpi_tag(-1),
+   d_overlap(-1),
+   d_box_acceptance(undetermined),
+   d_mapped_box(d_dim),
+   d_mapped_box_iterator(),
+   d_wait_phase(to_be_launched),
+   d_send_msg(),
+   d_recv_msg(),
+   d_comm_group(NULL),
+   d_generation(1),
+   d_n_cont(0)
+{
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   d_mapped_box_iterator = MappedBoxSet().end();
+#endif
+
+   ++(d_common->num_nodes_owned);
+   ++(d_common->max_nodes_owned);
+   ++(d_common->num_nodes_allocated);
+   ++(d_common->max_nodes_allocated);
+   if (d_common->max_generation < d_generation) {
+      d_common->max_generation = d_generation;
+   }
+
+   if (d_common->log_node_history) {
+      tbox::plog << d_common->num_nodes_allocated << "-allocated  "
+                 << d_common->num_nodes_active << "-active  "
+                 << d_common->num_nodes_owned << "-owned  "
+                 << d_common->num_nodes_completed << "-completed  "
+                 << "Construct " << d_generation << ':' << d_pos
+                 << ".\n";
+   }
+}
+
+/*
+ *******************************************************************
+ * Construct non-root node of the dendogram.  This is private!
+ * Public constructors are only for root nodes.
+ *******************************************************************
+ */
+BergerRigoutsosNode::BergerRigoutsosNode(
+   CommonParams* common_params,
+   BergerRigoutsosNode* parent,
+   const int child_number):
+   d_dim(parent->d_dim),
+   d_pos((parent->d_pos > 0 && parent->d_pos <
+          tbox::MathUtilities<int>::getMax() / 2) ?
+         2 * parent->d_pos + child_number:
+            (child_number == 0 ? -1:-2)),
+   d_common(common_params),
+   d_parent(parent),
+   d_lft_child(NULL),
+   d_rht_child(NULL),
+   d_box(d_dim),
+   d_owner(-1),
+   d_group(0),
+   d_mpi_tag(-1),
+   d_overlap(-1),
+   d_box_acceptance(undetermined),
+   d_mapped_box(d_dim),
+   d_mapped_box_iterator(),
+   d_wait_phase(for_data_only),
+   d_send_msg(),
+   d_recv_msg(),
+   d_comm_group(NULL),
+   d_generation(d_parent->d_generation + 1),
+   d_n_cont(0)
+{
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_parent->d_pos >= 0 && d_pos < 0) {
+      TBOX_WARNING("Too many generations for node identification.\n"
+         << "The node id cannot be increased any further.\n"
+         << "This affects only the node id, which is only\n"
+         << "used for analysis and debugging and does not\n"
+         << "affect the algorithm.\n"
+         << "Last valid node id is " << d_parent->d_pos << '\n');
+   }
+#endif
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   d_mapped_box_iterator = MappedBoxSet().end();
+#endif
+
+   ++(d_common->num_nodes_allocated);
+   ++(d_common->max_nodes_allocated);
+   if (d_common->max_generation < d_generation) {
+      d_common->max_generation = d_generation;
+   }
+
+   if (d_common->log_node_history) {
+      tbox::plog << d_common->num_nodes_allocated << "-allocated  "
+                 << d_common->num_nodes_active << "-active  "
+                 << d_common->num_nodes_owned << "-owned  "
+                 << d_common->num_nodes_completed << "-completed  "
+                 << "Construct " << d_generation << ':' << d_pos
+                 << ", child of "
+                 << d_parent->d_generation << ':' << d_parent->d_pos
+                 << "   " << d_parent->d_mapped_box
+                 << ".\n";
+   }
+}
+
+BergerRigoutsosNode::~BergerRigoutsosNode(
+   void)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   /*
+    * Forbid deleting a node that is running because there may
+    * be pending communication (by the node or its children).
+    * Note that this is NOT an extra restriction over the
+    * recursive implementation.
+    */
+   if (d_wait_phase != for_data_only &&
+       d_wait_phase != to_be_launched &&
+       d_wait_phase != completed) {
+      TBOX_ERROR("Should not delete a node that is currently running\n"
+         << "the Berger-Rigoutsos algorithm because there\n"
+         << "may be pending communications.");
+   }
+#endif
+
+   if (d_comm_group != NULL) {
+      if (!d_comm_group->isDone()) {
+         TBOX_ERROR("Library error: Destructing a node with an unfinished\n"
+            << "communication tree is bad because it leaves\n"
+            << "pending MPI messages.");
+      }
+      delete d_comm_group;
+      d_comm_group = NULL;
+   }
+
+   --(d_common->num_nodes_allocated);
+
+   if (d_parent != NULL && d_common->log_node_history) {
+      tbox::plog << d_common->num_nodes_allocated << "-allocated  "
+                 << d_common->num_nodes_active << "-active  "
+                 << d_common->num_nodes_owned << "-owned  "
+                 << d_common->num_nodes_completed << "-completed  "
+                 << "Destruct " << d_generation << ':' << d_pos
+                 << "  " << d_mapped_box
+                 << "  " << d_box
+                 << ".\n";
+   }
+
+   if (d_parent == NULL) {
+      delete d_common;
+   }
+
+   d_wait_phase = deallocated;
+}
+
+/*
+ ********************************************************************
+ ********************************************************************
+ */
+void BergerRigoutsosNode::setClusteringParameters(
+   const int tag_data_index,
+   const int tag_val,
+   const hier::IntVector min_box,
+   const double efficiency_tol,
+   const double combine_tol,
+   const hier::IntVector& max_box_size,
+   const double max_lap_cut_from_center)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim, min_box, max_box_size);
+
+   d_common->tag_data_index = tag_data_index;
+   d_common->tag_val = tag_val;
+   d_common->min_box = min_box;
+   d_common->efficiency_tol = efficiency_tol;
+   d_common->combine_tol = combine_tol;
+   d_common->max_box_size = max_box_size;
+   d_common->max_lap_cut_from_center = max_lap_cut_from_center;
+}
+
+/*
+ ********************************************************************
+ ********************************************************************
+ */
+void BergerRigoutsosNode::clusterAndComputeRelationships(
+   hier::MappedBoxLevel& new_mapped_box_level,
+   hier::Connector& tag_to_new,
+   hier::Connector& new_to_tag,
+   const hier::Box& bound_box,
+   const tbox::Pointer<hier::PatchLevel> tag_level,
+   const tbox::SAMRAI_MPI& mpi_object)
+{
+   TBOX_ASSERT(d_parent == NULL);
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS3(d_dim,
+      new_mapped_box_level,
+      bound_box,
+      *tag_level);
+
+   d_common->tag_level = tag_level;
+   d_common->tag_mapped_box_level = tag_level->getMappedBoxLevel().getPointer();
+
+   setMPI(mpi_object);
+
+   d_box = bound_box;
+   clusterAndComputeRelationships();
+
+   /*
+    * During the algorithm, we kept the results in primitive
+    * containers to avoid the overhead of fine-grain changes to the
+    * output objects.  Now initialize the outputs using those
+    * primitive containers.
+    */
+
+   new_mapped_box_level.initialize(
+      d_common->new_mapped_box_set,
+      d_common->tag_level->getRatioToLevelZero(),
+      d_common->tag_mapped_box_level->getMPI(),
+      hier::MappedBoxLevel::DISTRIBUTED);
+
+   if (d_common->compute_relationships >= 1) {
+      tag_to_new.swapInitialize(
+         *tag_level->getMappedBoxLevel(),
+         new_mapped_box_level,
+         d_common->max_gcw,
+         d_common->tag_eto_new,
+         hier::MappedBoxLevel::DISTRIBUTED);
+   }
+   if (d_common->compute_relationships >= 2) {
+      new_to_tag.swapInitialize(
+         new_mapped_box_level,
+         *tag_level->getMappedBoxLevel(),
+         d_common->max_gcw,
+         d_common->new_eto_tag,
+         hier::MappedBoxLevel::DISTRIBUTED);
+   }
+
+   /*
+    * Clear temporary parameters that are only used during active
+    * clustering.
+    */
+   d_common->new_eto_tag.clear();
+   d_common->tag_eto_new.clear();
+   d_common->new_mapped_box_set.clear();
+   d_common->tag_mapped_box_level = NULL;
+   d_common->tag_level.setNull();
+}
+
+/*
+ ********************************************************************
+ * Preprocess, run the asynchronous algorithm and postprocess.
+ ********************************************************************
+ */
+void BergerRigoutsosNode::clusterAndComputeRelationships()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(d_parent == NULL);
+#endif
+   tbox::SAMRAI_MPI mpi(d_common->mpi_object);
+
+   d_common->t_cluster_and_compute_relationships->start();
+   d_common->t_cluster->start();
+
+   /*
+    * If compute_relationships == 1:
+    *   - Compute relationships from tagged level to new levels.
+    *     These relationships are organized around the tagged nodes.
+    *     They do not need to be shared with the owners of the
+    *     new nodes.
+
+    * If compute_relationships == 2:
+    *   - Compute relationships as in compute_relationships == 1 case.
+    *   - Owners of new relationships send new relationship data to owners
+    *     of new nodes.  This creates the neighbor data
+    *     organized around the new nodes.
+    */
+
+   if (d_common->compute_relationships > 0) {
+
+      /*
+       * Create empty neighbor lists for nodes on tagged mapped_box_level.
+       * As new nodes are finalized, they will be added to
+       * these lists.
+       */
+      const MappedBoxSet& tag_mapped_boxes =
+         d_common->tag_mapped_box_level->getMappedBoxes();
+      for (hier::RealMappedBoxConstIterator ni(tag_mapped_boxes); ni.isValid();
+           ++ni) {
+         d_common->tag_eto_new[ni->getGlobalId()];
+      }
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(
+         d_common->tag_mapped_box_level->getLocalNumberOfBoxes() ==
+         d_common->tag_eto_new.size());
+#endif
+
+   }
+
+
+   TBOX_ASSERT(d_common->algo_advance_mode == ADVANCE_SOME ||
+      d_common->algo_advance_mode == ADVANCE_ANY ||
+      d_common->algo_advance_mode == SYNCHRONOUS);            // No other supported currently.
+   {
+      int n_comm_group_completed = 0;
+      // d_common->relaunch_queue.appendItem(this);
+      d_common->relaunch_queue.push_back(this);
+
+      tbox::AsyncCommStage::MemberVec completed_comms;
+
+      do {
+
+         d_common->t_compute->start();
+         while (!d_common->relaunch_queue.empty()) {
+            BergerRigoutsosNode* node_for_relaunch =
+               d_common->relaunch_queue.front();
+            d_common->relaunch_queue.pop_front();
+            if (0) {
+               tbox::plog << "Continuing from queue ";
+               node_for_relaunch->printState(tbox::plog);
+               tbox::plog << std::endl;
+            }
+            node_for_relaunch->continueAlgorithm();
+            if (0) {
+               tbox::plog << "Exiting continueAlgorithm ";
+               node_for_relaunch->printState(tbox::plog);
+               tbox::plog << std::endl;
+            }
+         }
+         d_common->t_compute->stop();
+
+         d_common->t_comm_wait->start();
+         n_comm_group_completed =
+            static_cast<int>(d_common->comm_stage.advanceSome(completed_comms));
+         d_common->t_comm_wait->stop();
+
+         d_common->t_compute->start();
+         for (int n = 0; n < n_comm_group_completed; ++n) {
+            BergerRigoutsosNode* node_for_relaunch =
+               (BergerRigoutsosNode *)(completed_comms[n]->getHandler());
+            if (0) {
+               tbox::plog << "Continuing from stage ";
+               node_for_relaunch->printState(tbox::plog);
+               tbox::plog << std::endl;
+            }
+            node_for_relaunch->continueAlgorithm();
+            if (0) {
+               tbox::plog << "Exiting continueAlgorithm ";
+               node_for_relaunch->printState(tbox::plog);
+               tbox::plog << std::endl;
+            }
+         }
+         d_common->t_compute->stop();
+
+         if (0) {
+            tbox::plog << "relaunch_queue size "
+                       << d_common->relaunch_queue.size()
+                       << "   groups completed: " << n_comm_group_completed
+                       << std::endl;
+            tbox::plog << "Stage has " << d_common->comm_stage.numberOfMembers()
+                       << " members, "
+                       << d_common->comm_stage.numberOfPendingMembers()
+                       << " pending members, "
+                       << d_common->comm_stage.numberOfPendingRequests()
+                       << " pending requests." << std::endl;
+         }
+      } while (!d_common->relaunch_queue.empty() || n_comm_group_completed > 0);
+
+   }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_wait_phase != completed) {
+      printDendogramState(tbox::plog, "ERR->");
+      TBOX_ERROR(
+         "Root node finished but d_wait_phase is not set to completed.\n"
+         << "d_wait_phase=" << d_wait_phase);
+   }
+   if (d_common->compute_relationships > 2) {
+      // Each new node should have its own neighbor list.
+      TBOX_ASSERT(d_common->new_mapped_box_set.size() ==
+         d_common->new_eto_tag.size());
+   }
+#endif
+
+   // Barrier to separate clustering cost from relationship sharing cost.
+   mpi.Barrier();
+
+   d_common->t_cluster->stop();
+
+   /*
+    * Share relationships with owners, if requested.
+    * This is a one-time operation that is not considered a part
+    * of continueAlgorithm(), so it lies outside that timimg.
+    */
+   if (d_common->compute_relationships > 1) {
+      shareNewNeighborhoodSetsWithOwners();
+   }
+
+   d_common->t_cluster_and_compute_relationships->stop();
+}
+
+/*
+ **************************************************************************
+ * This private method sets multiple internal data and presumes that
+ * d_common->tag_level has been set.
+ **************************************************************************
+ */
+void BergerRigoutsosNode::setMPI(
+   const tbox::SAMRAI_MPI& mpi_object)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(d_parent == NULL);
+   TBOX_ASSERT(d_common->tag_mapped_box_level != NULL);
+#endif
+
+   /*
+    * If a valid MPI communicator is given, use it instead of the
+    * tag_mapped_box_level's communicator.  It must be congruent with
+    * the tag_mapped_box_level's.
+    */
+   if (mpi_object.getCommunicator() != tbox::SAMRAI_MPI::commNull) {
+#if defined(DEBUG_CHECK_ASSERTIONS)
+      /*
+       * If user supply a communicator to use, make sure it is
+       * compatible with the MappedBoxLevel involved.
+       */
+      tbox::SAMRAI_MPI mpi1(mpi_object);
+      tbox::SAMRAI_MPI mpi2(d_common->tag_mapped_box_level->getMPI());
+      TBOX_ASSERT(mpi1.getSize() == mpi2.getSize());
+      TBOX_ASSERT(mpi1.getRank() == mpi2.getRank());
+      if (mpi1.getSize() > 1) {
+         int compare_result;
+         tbox::SAMRAI_MPI::Comm_compare(
+            mpi_object.getCommunicator(),
+            d_common->tag_mapped_box_level->getMPI().getCommunicator(),
+            &compare_result);
+         if (compare_result != MPI_CONGRUENT) {
+            TBOX_ERROR("BergerRigoutsosNode::clusterAndComputeRelationships:\n"
+               << "MPI communicator (" << mpi_object.getCommunicator()
+               << ") and the communicator of the input tag_mapped_box_level ("
+               << d_common->tag_mapped_box_level->getMPI().getCommunicator()
+               << ") are not congruent.");
+         }
+      }
+#endif
+      d_common->mpi_object = mpi_object;
+   } else {
+      d_common->mpi_object =
+         d_common->tag_mapped_box_level->getMPI();
+   }
+
+   tbox::SAMRAI_MPI mpi(d_common->mpi_object);
+
+   /*
+    * Reserve the tag upper bound for the relationship-sharing phase.
+    * Divide the rest into tag pools divided among all processes.
+    */
+   if (tbox::SAMRAI_MPI::usingMPI()) {
+      /*
+       * For some MPI implementations, I cannot get the attribute for
+       * any communicator except for MPI_COMM_WORLD.  Assuming the tag
+       * upper bound is the same for all communicators, I will try
+       * some other communicators to get it.
+       */
+      int* tag_upper_bound_ptr, flag;
+      mpi.Attr_get(MPI_TAG_UB,
+         &tag_upper_bound_ptr,
+         &flag);
+      if (tag_upper_bound_ptr == NULL) {
+         tbox::SAMRAI_MPI mpi1(tbox::SAMRAI_MPI::getSAMRAIWorld().getCommunicator());
+         mpi1.Attr_get(MPI_TAG_UB,
+            &tag_upper_bound_ptr,
+            &flag);
+      }
+      if (tag_upper_bound_ptr == NULL) {
+         tbox::SAMRAI_MPI mpi1(tbox::SAMRAI_MPI::commWorld);
+         mpi1.Attr_get(MPI_TAG_UB,
+            &tag_upper_bound_ptr,
+            &flag);
+      }
+      TBOX_ASSERT(tag_upper_bound_ptr != NULL);
+      d_common->tag_upper_bound = *tag_upper_bound_ptr;
+
+   } else {
+      d_common->tag_upper_bound = 1000000;
+   }
+
+   d_common->nproc = mpi.getSize();
+   d_common->rank = mpi.getRank();
+
+   d_common->available_mpi_tag =
+      d_common->tag_upper_bound / d_common->nproc * d_common->rank;
+
+#if 0
+   if (tbox::SAMRAI_MPI::usingMPI()) {
+      int* tag_upper_bound_ptr, flag;
+      mpi.Attr_get(MPI_TAG_UB,
+         &tag_upper_bound_ptr,
+         &flag);
+      d_common->tag_upper_bound = *tag_upper_bound_ptr;
+   } else {
+      d_common->tag_upper_bound = 1000000; // Parameter only used with MPI.
+   }
+#endif
+
+   // Divide the rest into tag pools divided among all processes.
+   d_common->available_mpi_tag = d_common->tag_upper_bound / d_common->nproc
+      * d_common->rank;
+
+   if (d_common->rank == 0) {
+      claimMPITag();
+   } else {
+      d_mpi_tag = 0;
+   }
+#ifdef DEBUG_CHECK_ASSERTIONS
+   /*
+    * Even though owner has different way of getting MPI tag,
+    * all processes should start with the same mpi tag.
+    */
+   TBOX_ASSERT(d_mpi_tag == 0);
+#endif
+
+   /*
+    * Set the processor group (for the root dendogram node).
+    */
+   d_group.resize(d_common->nproc, BAD_INTEGER);
+   for (unsigned int i = 0; i < d_group.size(); ++i) {
+      d_group[i] = i;
+   }
+}
+
+/*
+ ********************************************************************
+ * This method looks messy, but it is just the BR agorithm,
+ * with multiple pause and continue points implemented by
+ * the goto and labels.  Each pause point is accompanied by
+ * a line setting d_wait_phase so that the algorithm can
+ * continue where it left off when this method is called again.
+ * The BR algorithm is not completed until this method returns
+ * the WaitPhase value "completed".
+ ********************************************************************
+ */
+BergerRigoutsosNode::WaitPhase
+BergerRigoutsosNode::continueAlgorithm()
+{
+   d_common->t_continue_algorithm->start();
+   ++d_n_cont;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(d_parent == NULL || d_parent->d_wait_phase != completed);
+   // TBOX_ASSERT( ! inRelaunchQueue(this) );
+   TBOX_ASSERT(inRelaunchQueue(this) == d_common->relaunch_queue.end());
+#endif
+
+   /*
+    * Skip right to where we left off,
+    * which is specified by the wait phase variable.
+    */
+   switch (d_wait_phase) {
+      case for_data_only :
+         TBOX_ERROR("Library error: Attempt to execute data-only node.");
+      case to_be_launched :
+         goto TO_BE_LAUNCHED;
+      case reduce_histogram:
+         goto REDUCE_HISTOGRAM;
+      case bcast_acceptability:
+         goto BCAST_ACCEPTABILITY;
+      case gather_grouping_criteria:
+         goto GATHER_GROUPING_CRITERIA;
+      case bcast_child_groups:
+         goto BCAST_CHILD_GROUPS;
+      case run_children:
+         goto RUN_CHILDREN;
+      case bcast_to_dropouts:
+         goto BCAST_TO_DROPOUTS;
+      case completed:
+         TBOX_ERROR("Library error: Senseless continuation of completed node.");
+      default:
+         TBOX_ERROR("Library error: Nonexistent phase.");
+   }
+
+   bool sub_completed;
+
+   /*
+    * Delegated tasks: Major tasks are delegated to private methods.
+    * These methods may check whether the process is the owner or
+    * just a contributor and fork appropriately.  The communication
+    * checking tasks return whether communication is completed, but
+    * they do NOT change the d_wait_phase variable, which is done
+    * in this function.
+    */
+
+TO_BE_LAUNCHED:
+
+   ++(d_common->num_nodes_active);
+   if (d_common->max_nodes_active < d_common->num_nodes_active) {
+      d_common->max_nodes_active = d_common->num_nodes_active;
+   }
+
+   if (d_common->log_node_history) {
+      tbox::plog << d_common->num_nodes_allocated << "-allocated  "
+                 << d_common->num_nodes_active << "-active  "
+                 << d_common->num_nodes_owned << "-owned  "
+                 << d_common->num_nodes_completed << "-completed  "
+                 << "Commence " << d_generation << ':' << d_pos
+                 << "  " << d_box
+                 << "  accept=" << d_box_acceptance
+                 << "  ovlap=" << d_overlap
+                 << "  owner=" << d_owner
+                 << "  gsize=" << d_group.size()
+                 << ".\n";
+   }
+
+   if (d_parent == NULL || d_overlap > 0 || d_common->rank == d_owner) {
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(inGroup(d_group));
+#endif
+
+      // Set up communication group for operations in participating group.
+      d_comm_group = new tbox::AsyncCommGroup(
+            computeCommunicationTreeDegree(static_cast<int>(d_group.size())),
+            &d_common->comm_stage,
+            this);
+      d_comm_group->setGroupAndRootRank(d_common->mpi_object,
+         &d_group[0], static_cast<int>(d_group.size()), d_owner);
+      if (d_parent == NULL) {
+         /*
+          * For the global group, MPI collective functions are presumably
+          * faster than the peer-to-peer collective implementation in
+          * AsyncCommGroup.
+
+          * Enable this mode only for the root node.  Child nodes are
+          * not guaranteed to execute the communication operation at
+          * the same point on all processors (even if all proccessors
+          * participate).
+          */
+         d_comm_group->setUseMPICollectiveForFullGroups(true);
+      }
+
+      d_common->t_local_tasks->start();
+      makeLocalTagHistogram();
+      d_common->t_local_tasks->stop();
+
+      if (d_group.size() > 1) {
+         d_common->t_reduce_histogram->start();
+         reduceHistogram_start();
+REDUCE_HISTOGRAM:
+         if (!d_common->t_reduce_histogram->isRunning())
+            d_common->t_reduce_histogram->start();
+         if (d_common->algo_advance_mode == SYNCHRONOUS) {
+            d_comm_group->completeCurrentOperation();
+         }
+         sub_completed = reduceHistogram_check();
+         d_common->t_reduce_histogram->stop();
+         if (!sub_completed) {
+#if 0
+            tbox::plog << d_comm_group->numberOfPendingRequests()
+                       << '/' << d_common->comm_stage.numberOfPendingRequests()
+                       << " requests." << std::endl;
+            if (d_comm_group->numberOfPendingRequests() == 0) {
+               tbox::perr << "Unfinished reduction without pending request: \n";
+               printDendogramState(tbox::perr, "ERR->");
+            }
+#endif
+            d_wait_phase = reduce_histogram;
+            goto RETURN;
+         }
+      }
+
+      if (d_common->rank == d_owner) {
+         /*
+          * The owner node saves the tag count.  Participant nodes get
+          * tag count from broadcastAcceptability().  This data is just for
+          * analysis (not required) and I expect it to have trivial cost.
+          */
+         int narrowest_dir = 0;
+         for (int d = 0; d < d_dim.getValue(); ++d) {
+            if (d_histogram[d].size() < d_histogram[narrowest_dir].size())
+               narrowest_dir = d;
+         }
+         d_num_tags = 0;
+         for (size_t i = 0; i < d_histogram[narrowest_dir].size(); ++i) {
+            d_num_tags += d_histogram[narrowest_dir][i];
+         }
+      }
+
+      if (d_common->rank == d_owner) {
+         d_common->t_local_tasks->start();
+         computeMinimalBoundingBoxForTags();
+         acceptOrSplitBox();
+         d_common->t_local_tasks->stop();
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(boxAccepted() || boxRejected() ||
+            (boxHasNoTag() && d_parent == 0));
+#endif
+         if (!boxHasNoTag()) {
+            /*
+             * A mapped_box_level node is created even if box is not acceptable,
+             * so that the children can reference its local index in case
+             * the box is later accepted based on the combined tolerance
+             * of the children.  The node would be erased later if
+             * it is not finally accepted.
+             */
+            createMappedBox();
+         }
+      }
+
+      if (d_group.size() > 1) {
+         d_common->t_bcast_acceptability->start();
+         broadcastAcceptability_start();
+BCAST_ACCEPTABILITY:
+         if (!d_common->t_bcast_acceptability->isRunning())
+            d_common->t_bcast_acceptability->start();
+         if (d_common->algo_advance_mode == SYNCHRONOUS) {
+            d_comm_group->completeCurrentOperation();
+         }
+         sub_completed = broadcastAcceptability_check();
+         d_common->t_bcast_acceptability->stop();
+         if (!sub_completed) {
+            d_wait_phase = bcast_acceptability;
+            goto RETURN;
+         }
+      }
+#ifdef DEBUG_CHECK_ASSERTIONS
+      if (d_common->rank == d_owner) {
+         TBOX_ASSERT(d_box_acceptance == accepted_by_calculation ||
+            d_box_acceptance == rejected_by_calculation ||
+            d_box_acceptance == hasnotag_by_owner);
+      } else {
+         TBOX_ASSERT(d_box_acceptance == accepted_by_owner ||
+            d_box_acceptance == rejected_by_owner ||
+            d_box_acceptance == hasnotag_by_owner);
+      }
+#endif
+
+      /*
+       * If this is the root node, d_num_tags is the total tag count
+       * in all nodes.
+       */
+      if (d_parent == NULL) {
+         d_common->num_tags_in_all_nodes = d_num_tags;
+      }
+
+      if (boxRejected()) {
+
+         /*
+          * Compute children groups and owners without assuming
+          * entire mesh structure is known locally.
+          */
+         d_common->t_local_tasks->start();
+         countOverlapWithLocalPatches();
+         d_common->t_local_tasks->stop();
+
+         if (d_group.size() > 1) {
+            d_common->t_gather_grouping_criteria->start();
+            gatherGroupingCriteria_start();
+GATHER_GROUPING_CRITERIA:
+            if (!d_common->t_gather_grouping_criteria->isRunning())
+               d_common->t_gather_grouping_criteria->start();
+            if (d_common->algo_advance_mode == SYNCHRONOUS) {
+               d_comm_group->completeCurrentOperation();
+            }
+            sub_completed = gatherGroupingCriteria_check();
+            d_common->t_gather_grouping_criteria->stop();
+            if (!sub_completed) {
+               d_wait_phase = gather_grouping_criteria;
+               goto RETURN;
+            }
+         }
+
+         if (d_common->rank == d_owner) {
+            d_common->t_local_tasks->start();
+            formChildGroups();
+            d_common->t_local_tasks->stop();
+         }
+
+         if (d_group.size() > 1) {
+            d_common->t_bcast_child_groups->start();
+            broadcastChildGroups_start();
+BCAST_CHILD_GROUPS:
+            if (!d_common->t_bcast_child_groups->isRunning())
+               d_common->t_bcast_child_groups->start();
+            if (d_common->algo_advance_mode == SYNCHRONOUS) {
+               d_comm_group->completeCurrentOperation();
+            }
+            sub_completed = broadcastChildGroups_check();
+            d_common->t_bcast_child_groups->stop();
+            if (!sub_completed) {
+               d_wait_phase = bcast_child_groups;
+               goto RETURN;
+            }
+         }
+
+         if (d_lft_child->d_owner == d_common->rank) {
+            ++(d_common->num_nodes_owned);
+            ++(d_common->max_nodes_owned);
+         }
+         if (d_rht_child->d_owner == d_common->rank) {
+            ++(d_common->num_nodes_owned);
+            ++(d_common->max_nodes_owned);
+         }
+
+         runChildren_start();
+RUN_CHILDREN:
+         sub_completed = runChildren_check();
+         if (!sub_completed) {
+            d_wait_phase = run_children;
+            goto RETURN;
+         }
+      } else if (boxAccepted()) {
+         if (d_common->rank == d_owner) {
+            ++(d_common->num_boxes_generated);
+         }
+      } else {
+         // Box has no tag.
+      }
+
+      // All done with communication within participating group.
+      delete d_comm_group;
+      d_comm_group = NULL;
+
+   } else {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      /*
+       * This process is not in the group that decides on the box for
+       * this dendogram node.
+       */
+      TBOX_ASSERT(!inGroup(d_group));
+#endif
+   }
+
+   if (d_parent == NULL) {
+      /*
+       * Compute relationships and set up relationship sharing data.
+       * This is usually done by a node's parent in the
+       * runChildren_check() method because only the
+       * parent can know if the node's box will be
+       * kept or recombined with the sibling.
+       * But the root node must do this itself because it has no parent.
+       */
+      if (d_common->compute_relationships > 0 && boxAccepted()) {
+         computeNewNeighborhoodSets();
+      }
+   }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(d_lft_child == NULL);
+   TBOX_ASSERT(d_rht_child == NULL);
+   // TBOX_ASSERT( ! inRelaunchQueue(this) );
+   TBOX_ASSERT(inRelaunchQueue(this) == d_common->relaunch_queue.end());
+#endif
+
+   /*
+    * Broadcast the result to dropouts.
+    * Dropout processes are those that participated in the
+    * parent but not in this dendogram node.  They need the
+    * result to perform combined efficiency check for the
+    * parent.
+    *
+    * Processes that should participate in the dropout broadcast
+    * are the dropouts (processes with zero overlap) and the owner.
+    *
+    * Broadcast to dropouts is only needed if:
+    *
+    *    - In multi-owner mode and relationship-computing mode.
+    *      In single-owner mode, only the original owner needs
+    *      the final result, and it participates everywhere,
+    *      so there is no need for this phase.
+    *      When computing relationships, participant processors must
+    *      know results to do recombination check, to determine
+    *      if parent box is preferred.
+    *
+    *    - This is NOT the root dendogram node.  The root node
+    *      has no parent and no corresponding dropout group.
+    *
+    *    - Dropout group is not empty.  Number of dropouts
+    *      is the difference between parent group size and this
+    *      group size.
+    */
+   if (d_overlap == 0 || d_common->rank == d_owner) {
+
+      if ((d_common->owner_mode != SINGLE_OWNER ||
+           d_common->compute_relationships > 0) &&
+          d_parent != NULL &&
+          d_parent->d_group.size() > d_group.size()) {
+
+         d_common->t_bcast_to_dropouts->start();
+         {
+            // Create the communication group for the dropouts.
+            VectorOfInts dropouts(0);
+            d_common->t_local_tasks->start();
+            computeDropoutGroup(d_parent->d_group,
+               d_group,
+               dropouts,
+               d_owner);
+            d_comm_group = new tbox::AsyncCommGroup(
+                  computeCommunicationTreeDegree(
+                     static_cast<int>(d_group.size())),
+                  &d_common->comm_stage,
+                  this);
+            d_comm_group->setGroupAndRootIndex(d_common->mpi_object,
+               &dropouts[0], static_cast<int>(dropouts.size()), 0);
+            d_common->t_local_tasks->stop();
+         }
+
+         broadcastToDropouts_start();
+BCAST_TO_DROPOUTS:
+         if (!d_common->t_bcast_to_dropouts->isRunning())
+            d_common->t_bcast_to_dropouts->start();
+         sub_completed = broadcastToDropouts_check();
+         d_common->t_bcast_to_dropouts->stop();
+
+         if (!sub_completed) {
+            d_wait_phase = bcast_to_dropouts;
+            goto RETURN;
+         }
+
+         if (d_common->log_node_history && d_common->rank != d_owner) {
+            tbox::plog << d_common->num_nodes_allocated << "-allocated  "
+                       << d_common->num_nodes_active << "-active  "
+                       << d_common->num_nodes_owned << "-owned  "
+                       << d_common->num_nodes_completed << "-completed  "
+                       << "DO Recv " << d_generation << ':' << d_pos
+                       << "  " << d_mapped_box
+                       << "  accept=" << d_box_acceptance
+                       << ".\n";
+         }
+
+         delete d_comm_group;
+         d_comm_group = NULL;
+      }
+   }
+
+   d_wait_phase = completed;
+
+   if (d_comm_group != NULL) {
+      // No further communication.  Deallocate the communication group.
+      delete d_comm_group;
+      d_comm_group = NULL;
+   }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(d_common->num_nodes_owned >= 0);
+#endif
+
+   // Adjust counters.
+   --(d_common->num_nodes_active);
+   ++(d_common->num_nodes_completed);
+   if (d_owner == d_common->rank) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(d_common->num_nodes_owned > 0);
+#endif
+      --(d_common->num_nodes_owned);
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(d_common->num_nodes_owned >= 0);
+#endif
+   }
+   d_common->num_conts_to_complete += d_n_cont;
+   if (d_common->max_conts_to_complete < d_n_cont) {
+      d_common->max_conts_to_complete = d_n_cont;
+   }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(d_common->num_nodes_owned >= 0);
+#endif
+
+   if (d_common->log_node_history) {
+      tbox::plog << d_common->num_nodes_allocated << "-allocated  "
+                 << d_common->num_nodes_active << "-active  "
+                 << d_common->num_nodes_owned << "-owned  "
+                 << d_common->num_nodes_completed << "-completed  "
+                 << "Complete " << d_generation << ':' << d_pos
+                 << "  " << d_mapped_box
+                 << "  accept=" << d_box_acceptance
+                 << ".\n";
+   }
+
+   /*
+    * Recall that an dendogram node waiting for its children
+    * is not placed in the relaunch queue (because it is
+    * pointless to relaunch it until the children are completed).
+    * Therefore, to eventually continue that node, its last
+    * child to complete must put it on the queue.  If this node
+    * and its sibling are completed, put the parent on the FRONT
+    * queue to be checked immediately (required for synchronous
+    * mode).
+    */
+   if (d_parent != NULL &&
+       d_parent->d_lft_child->d_wait_phase == completed &&
+       d_parent->d_rht_child->d_wait_phase == completed) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(d_parent->d_wait_phase == run_children);
+      // TBOX_ASSERT( ! inRelaunchQueue(d_parent) );
+      TBOX_ASSERT(inRelaunchQueue(d_parent) == d_common->relaunch_queue.end());
+#endif
+      // d_common->relaunch_queue.addItem(d_parent);
+      d_common->relaunch_queue.push_front(d_parent);
+      if (d_common->log_node_history) {
+         tbox::plog << d_common->num_nodes_allocated << "-allocated  "
+                    << d_common->num_nodes_active << "-active  "
+                    << d_common->num_nodes_owned << "-owned  "
+                    << d_common->num_nodes_completed << "-completed  "
+                    << "Parent " << d_parent->d_generation << ':'
+                    << d_parent->d_pos
+                    << " awoken by last child of "
+                    << d_parent->d_lft_child->d_generation << ':'
+                    << d_parent->d_lft_child->d_pos
+                    << ", "
+                    << d_parent->d_rht_child->d_generation << ':'
+                    << d_parent->d_rht_child->d_pos
+                    << " queue size " << d_common->relaunch_queue.size()
+                    << ".\n";
+      }
+   }
+
+RETURN:
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_wait_phase != completed && d_wait_phase != run_children) {
+      TBOX_ASSERT(!d_comm_group->isDone());
+      TBOX_ASSERT(d_common->comm_stage.hasPendingRequests());
+   }
+   if (d_wait_phase == run_children) {
+      // TBOX_ASSERT( ! d_common->relaunch_queue.isEmpty() );
+      TBOX_ASSERT(!d_common->relaunch_queue.empty());
+   }
+#endif
+
+   d_common->t_continue_algorithm->stop();
+
+   return d_wait_phase;
+}
+
+void BergerRigoutsosNode::runChildren_start()
+{
+   /*
+    * Children were created to store temporary data
+    * and determine participation. Now, run them.
+    */
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   /*
+    * Should only be here if box is rejected based on calculation.
+    */
+   TBOX_ASSERT(d_box_acceptance == rejected_by_calculation ||
+      d_box_acceptance == rejected_by_owner);
+#endif
+
+   d_lft_child->d_wait_phase = to_be_launched;
+   d_rht_child->d_wait_phase = to_be_launched;
+
+   /*
+    * Queue the children so they get executed.
+    * Put them at the front so that in synchronous
+    * mode, they can complete first before moving
+    * to another task (important in synchronous mode).
+    * It also does not hurt to put children at the
+    * front of the queue because they have
+    * immediate computation (compute histogram)
+    * to perform.  Put the left child in front
+    * of the right to more closely match the
+    * progression of the recursive BR (not essential).
+    */
+   d_common->relaunch_queue.push_front(d_rht_child);
+   d_common->relaunch_queue.push_front(d_lft_child);
+}
+
+/*
+ ********************************************************************
+ * Check for combined tolerance.
+ * If both children accepted their boxes without further splitting
+ * but their combined efficiency is not good enough to make
+ * the splitting worth accepting, use the current box instead
+ * of the children boxes.  Otherwise, use the children boxes.
+ ********************************************************************
+ */
+bool BergerRigoutsosNode::runChildren_check()
+{
+   if (d_lft_child->d_wait_phase != completed ||
+       d_rht_child->d_wait_phase != completed) {
+      return false;
+   }
+
+   if (d_lft_child->boxAccepted() &&
+       d_rht_child->boxAccepted() &&
+       d_box.numberCells() <= d_common->max_box_size &&
+       (d_lft_child->d_box.size() + d_rht_child->d_box.size() >=
+        d_common->combine_tol * d_box.size())) {
+
+      // Discard childrens' graph nodes in favor of recombination.
+
+      d_box_acceptance = accepted_by_recombination;
+
+      if (d_common->log_node_history) {
+         tbox::plog << d_common->num_nodes_allocated << "-allocated  "
+                    << d_common->num_nodes_active << "-active  "
+                    << d_common->num_nodes_owned << "-owned  "
+                    << d_common->num_nodes_completed << "-completed  "
+                    << "Recombine " << d_generation << ':' << d_pos
+                    << "  " << d_mapped_box
+                    << " <= " << d_lft_child->d_mapped_box
+                    << " + " << d_rht_child->d_mapped_box
+                    << "  " << "accept=" << d_box_acceptance
+                    << ".\n";
+      }
+
+      if (d_lft_child->d_owner == d_common->rank) {
+         d_lft_child->eraseMappedBox();
+         d_lft_child->d_box_acceptance = rejected_by_recombination;
+         --(d_common->num_boxes_generated);
+      }
+
+      if (d_rht_child->d_owner == d_common->rank) {
+         d_rht_child->eraseMappedBox();
+         d_rht_child->d_box_acceptance = rejected_by_recombination;
+         --(d_common->num_boxes_generated);
+      }
+
+      if (d_owner == d_common->rank) {
+         ++(d_common->num_boxes_generated);
+      }
+
+   } else {
+
+      // Accept childrens' results, discarding graph node.
+
+      if (d_owner == d_common->rank) {
+         eraseMappedBox();
+      }
+      if (d_common->compute_relationships > 0) {
+         if (d_lft_child->boxAccepted() &&
+             d_lft_child->d_box_acceptance != accepted_by_dropout_bcast) {
+            d_lft_child->computeNewNeighborhoodSets();
+         }
+         if (d_rht_child->boxAccepted() &&
+             d_rht_child->d_box_acceptance != accepted_by_dropout_bcast) {
+            d_rht_child->computeNewNeighborhoodSets();
+         }
+         if (d_common->log_node_history) {
+            tbox::plog << d_common->num_nodes_allocated << "-allocated  "
+                       << d_common->num_nodes_active << "-active  "
+                       << d_common->num_nodes_owned << "-owned  "
+                       << d_common->num_nodes_completed << "-completed  "
+                       << "Discard " << d_generation << ':' << d_pos
+                       << "  " << d_mapped_box
+                       << " => " << d_lft_child->d_mapped_box
+                       << " + " << d_rht_child->d_mapped_box
+                       << "  " << "accept=" << d_box_acceptance
+                       << ".\n";
+         }
+      }
+
+   }
+
+   /*
+    * No longer need children nodes after this point.
+    */
+   delete d_lft_child;
+   delete d_rht_child;
+   d_lft_child = d_rht_child = NULL;
+
+   return true;
+}
+
+BergerRigoutsosNode::CommonParams::CommonParams(
+   const tbox::Dimension& dim):
+   d_dim(dim),
+   tag_level(NULL),
+   tag_mapped_box_level(NULL),
+   new_mapped_box_set(),
+   tag_eto_new(),
+   relationship_senders(),
+   relationship_messages(),
+   // Parameters not from clustering algorithm interface ...
+   max_box_size(d_dim, tbox::MathUtilities<int>::getMax()),
+   // Parameters from clustering algorithm interface ...
+   tag_data_index(-1),
+   tag_val(0),
+   min_box(d_dim, 1),
+   efficiency_tol(tbox::MathUtilities<double>::getMax()),
+   combine_tol(tbox::MathUtilities<double>::getMax()),
+   // Implementation flags ...
+   compute_relationships(2),
+   max_gcw(d_dim, 1),
+   owner_mode(MOST_OVERLAP),
+   // Communication parameters ...
+   mpi_object(tbox::SAMRAI_MPI::commNull),
+   rank(-1),
+   nproc(-1),
+   available_mpi_tag(-1),
+   // Analysis support ...
+   log_node_history(false),
+   num_tags_in_all_nodes(0),
+   max_tags_owned(0),
+   num_nodes_allocated(0),
+   max_nodes_allocated(0),
+   num_nodes_active(0),
+   max_nodes_active(0),
+   num_nodes_owned(0),
+   max_nodes_owned(0),
+   num_nodes_completed(0),
+   max_generation(0),
+   num_boxes_generated(0),
+   num_conts_to_complete(0),
+   max_conts_to_complete(0)
+{
+   // Set the timer for the communication stage's MPI waiting.
+   comm_stage.setCommunicationWaitTimer(t_MPI_wait);
+}
+
+/*
+ ********************************************************************
+ *
+ * Asynchronous methods: these methods have _start and _check
+ * suffices.  They involve initiating some task and checking
+ * whether that task is completed.
+ *
+ ********************************************************************
+ */
+
+void BergerRigoutsosNode::reduceHistogram_start()
+{
+   if (d_group.size() == 1) {
+      return;
+   }
+   d_comm_group->setMPITag(d_mpi_tag + reduce_histogram_tag);
+   const int hist_size = getHistogramBufferSize(d_box);
+   if (d_common->rank == d_owner) {
+      d_recv_msg.resize(hist_size, BAD_INTEGER);
+      putHistogramToBuffer(&d_recv_msg[0]);
+      d_comm_group->beginSumReduce(&d_recv_msg[0], hist_size);
+   } else {
+      d_send_msg.resize(hist_size, BAD_INTEGER);
+      putHistogramToBuffer(&d_send_msg[0]);
+      d_comm_group->beginSumReduce(&d_send_msg[0], hist_size);
+   }
+}
+
+bool BergerRigoutsosNode::reduceHistogram_check()
+{
+   if (d_group.size() == 1) {
+      return true;
+   }
+   if (d_comm_group->proceedToNextWait() && d_common->rank == d_owner) {
+      getHistogramFromBuffer(&d_recv_msg[0]);
+   }
+   return d_comm_group->isDone();
+}
+
+void BergerRigoutsosNode::broadcastAcceptability_start()
+{
+   if (d_group.size() == 1) {
+      return;
+   }
+   d_comm_group->setMPITag(d_mpi_tag + bcast_acceptability_tag);
+   /*
+    * Items communicated:
+    * - local index of node
+    * - whether box is accepted
+    * - in case box is accepted:
+    *   . box (which may have been trimmed to minimal tag bounding box)
+    * - in case box is rejected:
+    *   . left/right child boxes
+    *   . left/right child MPI tags
+    */
+
+   const int buffer_size = 1          // Number of tags in candidate
+      + 1                             // Acceptability flag.
+      + 1                             // Local index of node.
+      + d_dim.getValue() * 2       // Box.
+      + d_dim.getValue() * 4       // Children boxes.
+      + 2                             // Children MPI tags
+   ;
+
+   if (d_common->rank == d_owner) {
+#ifdef DEBUG_CHECK_ASSERTION
+      TBOX_ASSERT(d_box_acceptance == rejected_by_calculation ||
+         d_box_acceptance == accepted_by_calculation ||
+         (d_parent == NULL && d_box_acceptance == hasnotag_by_owner)
+         );
+#endif
+      d_send_msg.resize(buffer_size, BAD_INTEGER);
+      int* ptr = &d_send_msg[0];
+      *(ptr++) = d_num_tags;
+      *(ptr++) = d_box_acceptance >= 0 ?
+         d_box_acceptance + 2 /* indicate remote decision */ :
+         d_box_acceptance;
+      if (!boxHasNoTag()) {
+         *(ptr++) = d_mapped_box.getLocalId().getValue();
+         ptr = putBoxToBuffer(d_box, ptr);
+         if (boxRejected()) {
+            ptr = putBoxToBuffer(d_lft_child->d_box, ptr);
+            ptr = putBoxToBuffer(d_rht_child->d_box, ptr);
+            *(ptr++) = d_lft_child->d_mpi_tag;
+            *(ptr++) = d_rht_child->d_mpi_tag;
+         }
+      }
+#ifdef DEBUG_CHECK_ASSERTIONS
+      else {
+         // This may not be needed now that the messages are in vector<int>.
+         // Suppress memory check warnings about uninitialized data.
+         for (size_t c = ptr - (&d_send_msg[0]); c < d_send_msg.size(); ++c) {
+            d_send_msg[c] = -1;
+         }
+      }
+#endif
+      d_comm_group->beginBcast(&d_send_msg[0], buffer_size);
+   } else {
+      d_recv_msg.resize(buffer_size, BAD_INTEGER);
+      d_comm_group->beginBcast(&d_recv_msg[0], buffer_size);
+   }
+}
+
+bool BergerRigoutsosNode::broadcastAcceptability_check()
+{
+   if (d_group.size() == 1) {
+      return true;
+   }
+   if (d_comm_group->checkBcast() && d_common->rank != d_owner) {
+
+      int* ptr = &d_recv_msg[0];
+      d_num_tags = *(ptr++);
+      if (d_parent == NULL) {
+         d_common->num_tags_in_all_nodes = d_num_tags;
+      }
+      d_box_acceptance = intToBoxAcceptance(*(ptr++));
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(boxAccepted() || boxRejected() ||
+         (boxHasNoTag() && d_parent == NULL));
+#endif
+      if (!boxHasNoTag()) {
+         const hier::LocalId node_local_id(*(ptr++));
+         ptr = getBoxFromBuffer(d_box, ptr);
+         d_mapped_box = MappedBox(d_box, node_local_id, d_owner);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(d_mapped_box.getLocalId() >= 0);
+         if ( d_parent != NULL ) {
+            /*
+             * Do not check for min_box violation in root node.  That
+             * check should be done outside of this class in order to
+             * have flexibility regarding how to handle it.
+             */
+            TBOX_ASSERT(d_box.numberCells() >= d_common->min_box);
+         }
+#endif
+      }
+
+      if (boxRejected()) {
+
+         /*
+          * The owner formed its children earlier so it can
+          * use their parameters while determining which to run.
+          * Contributors create the children when the receive
+          * the d_box_acceptance flag indicates tha further
+          * branching is required.
+          */
+         d_lft_child = new BergerRigoutsosNode(d_common,
+               this,
+               0);
+         d_rht_child = new BergerRigoutsosNode(d_common,
+               this,
+               1);
+
+         ptr = getBoxFromBuffer(d_lft_child->d_box, ptr);
+         ptr = getBoxFromBuffer(d_rht_child->d_box, ptr);
+
+         d_lft_child->d_mpi_tag = *(ptr++);
+         d_rht_child->d_mpi_tag = *(ptr++);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(d_lft_child->d_box.numberCells() >= d_common->min_box);
+         TBOX_ASSERT(d_rht_child->d_box.numberCells() >= d_common->min_box);
+         TBOX_ASSERT(d_lft_child->d_mpi_tag > -1);
+         TBOX_ASSERT(d_rht_child->d_mpi_tag > -1);
+#endif
+         if (d_common->log_node_history) {
+            tbox::plog << d_common->num_nodes_allocated << "-allocated  "
+                       << d_common->num_nodes_active << "-active  "
+                       << d_common->num_nodes_owned << "-owned  "
+                       << d_common->num_nodes_completed << "-completed  "
+                       << "Rm Split " << d_generation << ':' << d_pos
+                       << "  " << d_mapped_box
+                       << " => " << d_lft_child->d_box
+                       << " + " << d_rht_child->d_box
+                       << ".\n";
+         }
+
+      }
+   }
+   return d_comm_group->isDone();
+}
+
+void BergerRigoutsosNode::gatherGroupingCriteria_start()
+{
+   if (d_group.size() == 1) {
+      return;
+   }
+   d_comm_group->setMPITag(d_mpi_tag + gather_grouping_criteria_tag);
+
+   if (d_common->rank == d_owner) {
+      d_recv_msg.resize(4 * d_group.size(), BAD_INTEGER);
+      d_comm_group->beginGather(&d_recv_msg[0], 4);
+   } else {
+      d_send_msg.resize(4, BAD_INTEGER);
+      d_send_msg[0] = d_lft_child->d_overlap;
+      d_send_msg[1] = d_rht_child->d_overlap;
+      // Use negative burden measures for uniformity of criteria comparison.
+      d_send_msg[2] = -d_common->num_nodes_owned;
+      d_send_msg[3] = -d_common->num_nodes_active;
+      d_comm_group->beginGather(&d_send_msg[0], 4);
+   }
+}
+
+bool BergerRigoutsosNode::gatherGroupingCriteria_check()
+{
+   if (d_group.size() == 1) {
+      return true;
+   }
+   d_comm_group->checkGather();
+   /*
+    * Do nothing yet with the overlap data d_recv_msg.
+    * We extract it in formChildGroups().
+    */
+   return d_comm_group->isDone();
+}
+
+void BergerRigoutsosNode::broadcastChildGroups_start()
+{
+   if (d_group.size() == 1) {
+      return;
+   }
+   /*
+    * Items communicated:
+    * - left/right owner
+    * - left/right group
+    */
+   d_comm_group->setMPITag(d_mpi_tag + bcast_child_groups_tag);
+
+   if (d_common->rank == d_owner) {
+
+      /*
+       * When d_parent == NULL, use d_comm_group's MPI collective call option.
+       * The option uses MPI_Bcast, which requires the buffer size is the same
+       * on all processors.  When this is not the case, use the child group
+       * sizes to save memory and possibly improve performance.
+       */
+      const int buffer_size = 2                // Left/right owners.
+         + 2                                   // Left/right group sizes.
+         + (d_parent == NULL ? static_cast<int>(d_group.size())
+            : static_cast<int>(d_lft_child->d_group.size()))    // Left group.
+         + (d_parent == NULL ? static_cast<int>(d_group.size())
+            : static_cast<int>(d_rht_child->d_group.size()))    // Right group.
+      ;
+
+      d_send_msg.resize(buffer_size, BAD_INTEGER);
+      int* ptr = &d_send_msg[0];
+
+      *(ptr++) = d_lft_child->d_owner;
+      *(ptr++) = static_cast<int>(d_lft_child->d_group.size());
+      for (size_t i = 0; i < d_lft_child->d_group.size(); ++i) {
+         *(ptr++) = d_lft_child->d_group[i];
+      }
+      *(ptr++) = d_rht_child->d_owner;
+      *(ptr++) = static_cast<int>(d_rht_child->d_group.size());
+      for (size_t i = 0; i < d_rht_child->d_group.size(); ++i) {
+         *(ptr++) = d_rht_child->d_group[i];
+      }
+      if (d_parent == NULL) {
+         // Initialize unused data to avoid warnings and weird numbers.
+         for (size_t i =
+                 (d_lft_child->d_group.size() + d_rht_child->d_group.size());
+              i < 2 * d_group.size(); ++i) {
+            *(ptr++) = -1;
+         }
+      }
+
+      d_comm_group->beginBcast(&d_send_msg[0], buffer_size);
+   } else {
+      const int buffer_size = 2                // Left/right owners.
+         + 2                                   // Left/right group sizes.
+         + 2 * static_cast<int>(d_group.size())   // Left/right groups.
+      ;
+      d_recv_msg.resize(buffer_size, BAD_INTEGER);
+
+      d_comm_group->beginBcast(&d_recv_msg[0], buffer_size);
+   }
+}
+
+bool BergerRigoutsosNode::broadcastChildGroups_check()
+{
+   if (d_group.size() == 1) {
+      return true;
+   }
+   if (d_comm_group->checkBcast() && d_common->rank != d_owner) {
+
+      int* ptr = &d_recv_msg[0];
+
+      d_lft_child->d_owner = *(ptr++);
+      d_lft_child->d_group.resize(*(ptr++), BAD_INTEGER);
+      for (size_t i = 0; i < d_lft_child->d_group.size(); ++i) {
+         d_lft_child->d_group[i] = *(ptr++);
+      }
+      d_rht_child->d_owner = *(ptr++);
+      d_rht_child->d_group.resize(*(ptr++), BAD_INTEGER);
+      for (size_t i = 0; i < d_rht_child->d_group.size(); ++i) {
+         d_rht_child->d_group[i] = *(ptr++);
+      }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(d_lft_child->d_owner >= 0);
+      TBOX_ASSERT(d_lft_child->d_group.size() > 0);
+      TBOX_ASSERT((d_lft_child->d_overlap > 0) ==
+         inGroup(d_lft_child->d_group));
+      TBOX_ASSERT(d_rht_child->d_owner >= 0);
+      TBOX_ASSERT(d_rht_child->d_group.size() > 0);
+      TBOX_ASSERT((d_rht_child->d_overlap > 0) ==
+         inGroup(d_rht_child->d_group));
+#endif
+
+   }
+
+   return d_comm_group->isDone();
+}
+
+void BergerRigoutsosNode::broadcastToDropouts_start()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(d_common->rank == d_owner || d_overlap == 0);
+#endif
+   d_comm_group->setMPITag(d_mpi_tag + bcast_to_dropouts_tag);
+
+   const int buffer_size = 1      // d_box_acceptance
+      + 1                         // local index of graph node
+      + d_dim.getValue() * 2   // d_box (in case it got reduced)
+   ;
+   d_send_msg.clear();
+   d_recv_msg.clear();
+   if (d_common->rank == d_owner) {
+      d_send_msg.resize(buffer_size, BAD_INTEGER);
+      d_send_msg[0] = d_box_acceptance;
+      d_send_msg[1] = d_mapped_box.getLocalId().getValue();
+      putBoxToBuffer(d_box, &d_send_msg[2]);
+      d_comm_group->beginBcast(&d_send_msg[0],
+         buffer_size);
+   } else {
+      d_recv_msg.resize(buffer_size, BAD_INTEGER);
+      d_comm_group->beginBcast(&d_recv_msg[0],
+         buffer_size);
+   }
+}
+
+bool BergerRigoutsosNode::broadcastToDropouts_check()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(d_common->rank == d_owner || d_overlap == 0);
+#endif
+   if (d_comm_group->checkBcast()) {
+      if (d_common->rank != d_owner) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+         /*
+          * We check for the case of the box having no tags,
+          * to keeps things explicit and help detect bugs.
+          * But in fact, having no tags is impossible
+          * in the broadcastToDropout step, because it is
+          * only possible for the root dendogram node,
+          * which has no dropout group.
+          */
+         TBOX_ASSERT(d_recv_msg[0] >= 0);
+#endif
+         d_box_acceptance = intToBoxAcceptance((d_recv_msg[0] % 2)
+               + rejected_by_dropout_bcast);
+         const hier::LocalId local_id(d_recv_msg[1]);
+         getBoxFromBuffer(d_box, &d_recv_msg[2]);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         if ( d_parent != NULL ) {
+            /*
+             * Do not check for min_box violation in root node.  That
+             * check should be done outside of this class in order to
+             * have flexibility regarding how to handle it.
+             */
+            TBOX_ASSERT(d_box.numberCells() >= d_common->min_box);
+         }
+#endif
+         d_mapped_box = MappedBox(d_box, local_id, d_owner);
+      }
+   }
+   return d_comm_group->isDone();
+}
+
+/*
+ ********************************************************************
+ * Utility computations using local data.
+ ********************************************************************
+ */
+
+void BergerRigoutsosNode::makeLocalTagHistogram()
+{
+   d_common->t_local_histogram->start();
+
+   /*
+    * Compute the histogram size and allocate space for it.
+    */
+   for (int d = 0; d < d_dim.getValue(); ++d) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(d_box.numberCells(d) > 0);
+#endif
+      d_histogram[d].clear();
+      d_histogram[d].insert(d_histogram[d].end(), d_box.numberCells(d), 0);
+   }
+
+   /*
+    * Accumulate tag counts in the histogram variable.
+    */
+   const hier::PatchLevel& tag_level = *d_common->tag_level;
+   for (hier::PatchLevel::Iterator ip(tag_level); ip; ip++) {
+     hier::Patch& patch = **ip;
+
+      const hier::Box intersection = patch.getBox() * d_box;
+      const hier::IntVector& lower = d_box.lower();
+
+      if (!(intersection.empty())) {
+
+         tbox::Pointer<pdat::CellData<int> >
+         tag_data_ = patch.getPatchData(d_common->tag_data_index);
+
+         pdat::CellData<int>& tag_data = *tag_data_;
+
+         for (pdat::CellIterator ci(intersection); ci; ci++) {
+            if (tag_data(*ci) == d_common->tag_val) {
+               const hier::IntVector& idx = *ci;
+               for (int d = 0; d < d_dim.getValue(); ++d) {
+                  ++(d_histogram[d][idx(d) - lower(d)]);
+               }
+            }
+         }
+      }
+   }
+   d_common->t_local_histogram->stop();
+}
+
+/*
+ ********************************************************************
+ * Change d_box to that of the minimal bounding box for tags.
+ * If d_box is changed, reduce d_histogram to new d_box.
+ ********************************************************************
+ */
+void BergerRigoutsosNode::computeMinimalBoundingBoxForTags()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_box.empty());
+#endif
+
+   int d;
+
+   hier::Index new_lower = d_box.lower();
+   hier::Index new_upper = d_box.upper();
+
+   const hier::IntVector& min_box = d_common->min_box;
+   hier::IntVector box_size = d_box.numberCells();
+
+   /*
+    * Bring the lower side of the box up past untagged index planes.
+    * Bring the upper side of the box down past untagged index planes.
+    * Do not make the box smaller than the min_box requirement.
+    */
+   for (d = 0; d < d_dim.getValue(); ++d) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(d_histogram[d].size() != 0);
+#endif
+      int* histogram_beg = &d_histogram[d][0];
+      int* histogram_end = histogram_beg + d_box.numberCells(d) - 1;
+      while (*histogram_beg == 0 &&
+             box_size(d) > min_box(d)) {
+         ++new_lower(d);
+         ++histogram_beg;
+         --box_size(d);
+      }
+      while (*histogram_end == 0 &&
+             box_size(d) > min_box(d)) {
+         --new_upper(d);
+         --histogram_end;
+         --box_size(d);
+      }
+   }
+
+   const hier::Box new_box(new_lower, new_upper);
+   const hier::IntVector new_size = new_box.numberCells();
+
+   if (new_box != d_box) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      if ( d_parent != NULL ) {
+         /*
+          * Do not check for min_box violation in root node.  That
+          * check should be done outside of this class in order to
+          * have flexibility regarding how to handle it.
+          */
+         TBOX_ASSERT(new_box.numberCells() >= d_common->min_box);
+      }
+#endif
+      /*
+       * Save tagged part of the current histogram and reset the box.
+       * Is this step really required?  No, we can just keep the
+       * shift in a hier::IntVector and adjust.
+       */
+      for (d = 0; d < d_dim.getValue(); ++d) {
+         VectorOfInts& h = d_histogram[d];
+         const int shift = new_lower(d) - d_box.lower() (d);
+         if (shift > 0) {
+            int i;
+            for (i = 0; i < new_size(d); ++i) {
+               h[i] = h[i + shift];
+            }
+         }
+         h.resize(new_size(d), BAD_INTEGER);
+      }
+      if (d_common->log_node_history) {
+         tbox::plog << d_common->num_nodes_allocated << "-allocated  "
+                    << d_common->num_nodes_active << "-active  "
+                    << d_common->num_nodes_owned << "-owned  "
+                    << d_common->num_nodes_completed << "-completed  "
+                    << "Shrunken " << d_generation << ':' << d_pos
+                    << "  " << d_box << " -> " << new_box
+                    << ".\n";
+      }
+      d_box = new_box;
+   }
+}
+
+/*
+ *********************************************************************
+ * Accept the box or split it, setting d_box_acceptance accordingly.
+ *********************************************************************
+ */
+void BergerRigoutsosNode::acceptOrSplitBox()
+{
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_owner != d_common->rank) {
+      TBOX_ERROR("Only the owner can determine\n"
+         "whether to accept or split a box.\n");
+   }
+   TBOX_ASSERT(d_box_acceptance == undetermined);
+#endif
+
+   const hier::IntVector boxdims(d_box.numberCells());
+   const hier::IntVector oversize(boxdims - d_common->max_box_size);
+
+   /*
+    * Box d_box is acceptable if
+    * - it has a high enough fraction of tagged cells, or
+    * - it cannot be split without breaking the minimum
+    *   box requirement, or
+
+    * If d_box has no tags:
+    * - set d_box_acceptance = hasnotag_by_owner
+    * If accepting d_box:
+    * - set d_box_acceptance = accepted_by_calculation
+    * If rejecting d_box:
+    * - set d_box_acceptance = rejected_by_calculation
+    * - create left and right children
+    * - set children boxes
+    * - claim MPI tags for communication by children nodes
+
+    * Instead of writing from scratch,
+    * the code to find the split plane was copied
+    * from mesh::BergerRigoutsos<DIM>::splitTagBoundBox()
+    * and modified.
+    */
+
+   if (d_box_acceptance == undetermined) {
+      if (oversize <= hier::IntVector::getZero(d_dim)) {
+         /*
+          * See if d_box should be accepted based on efficiency.
+          */
+         int num_tagged = 0;
+         for (size_t i = 0; i < d_histogram[0].size(); ++i) {
+            num_tagged += d_histogram[0][i];
+         }
+         int boxsize = d_box.size();
+         double efficiency = (boxsize == 0 ? 1.e0 :
+                              ((double)num_tagged) / boxsize);
+
+         if (d_common->max_tags_owned < num_tagged) {
+            d_common->max_tags_owned = num_tagged;
+         }
+
+         if (efficiency >= d_common->efficiency_tol) {
+            d_box_acceptance = accepted_by_calculation;
+         } else if (num_tagged == 0) {
+            // No tags!  This should be caught at the dendogram root.
+            TBOX_ASSERT(d_parent == NULL);
+            d_box_acceptance = hasnotag_by_owner;
+            if (d_common->log_node_history) {
+               tbox::plog << d_common->num_nodes_allocated << "-allocated  "
+                          << d_common->num_nodes_active << "-active  "
+                          << d_common->num_nodes_owned << "-owned  "
+                          << d_common->num_nodes_completed << "-completed  "
+                          << "HasNoTag " << d_generation << ':' << d_pos
+                          << "  " << d_box
+                          << ".\n";
+            }
+         }
+      }
+   }
+
+   /*
+    * If cut_margin is negative in any direction, we cannot cut d_box
+    * across that direction without violating min_box.
+    */
+   const hier::IntVector cut_margin = boxdims - (d_common->min_box) * 2;
+
+   if (d_box_acceptance == undetermined) {
+      /*
+       * If d_box cannot be split without violating min_box, it should
+       * be accepted.
+       */
+      if (cut_margin < hier::IntVector::getZero(d_dim)) {
+         d_box_acceptance = accepted_by_calculation;
+      }
+   }
+
+   hier::IntVector sorted_boxdims(d_dim);
+
+   if (d_box_acceptance == undetermined) {
+      /*
+       * Sort the bounding box dimensions from largest to smallest cut
+       * margin.  If there are multiple cuttable directions, we will
+       * favor the direction with the greatest cut_margin.
+       */
+      int dim;
+      for (dim = 0; dim < d_dim.getValue(); dim++) {
+         sorted_boxdims(dim) = dim;
+      }
+      for (int d0 = 0; d0 < d_dim.getValue() - 1; d0++) {
+         for (int d1 = d0 + 1; d1 < d_dim.getValue(); d1++) {
+            if (cut_margin(sorted_boxdims(d0)) <
+                cut_margin(sorted_boxdims(d1))) {
+               int tmp_dim = sorted_boxdims(d0);
+               sorted_boxdims(d0) = sorted_boxdims(d1);
+               sorted_boxdims(d1) = tmp_dim;
+            }
+         }
+      }
+#ifdef DEBUG_CHECK_ASSERTIONS
+      for (dim = 0; dim < d_dim.getValue() - 1; dim++) {
+         TBOX_ASSERT(cut_margin(sorted_boxdims(dim)) >=
+            cut_margin(sorted_boxdims(dim + 1)));
+      }
+#endif
+   }
+
+   int num_cuttable_dim = 0;
+
+   if (d_box_acceptance == undetermined) {
+      /*
+       * Determine number of coordinate directions that are cuttable
+       * according to the cut_margin.
+       */
+      for (num_cuttable_dim = 0; num_cuttable_dim < d_dim.getValue();
+           num_cuttable_dim++) {
+         if (cut_margin(sorted_boxdims(num_cuttable_dim)) < 0) {
+            break;
+         }
+      }
+      TBOX_ASSERT(num_cuttable_dim > 0);   // We already accounted for un-cuttable case before this point.
+   }
+
+   if (d_box_acceptance == undetermined) {
+
+      /*
+       * Attempt to split box at a zero interior point in the
+       * histogram.  Check each cuttable direction, from
+       * largest to smallest, until zero point found.
+       */
+
+      int cut_lo, cut_hi;
+      int cut_pt = -(tbox::MathUtilities<int>::getMax());
+      int cut_dir = -1;
+      int dir = -1;
+      const hier::Index box_lo(d_box.lower());
+      const hier::Index box_hi(d_box.upper());
+      hier::Index lft_hi(box_hi);
+      hier::Index rht_lo(box_lo);
+
+      for (dir = 0; dir < d_dim.getValue(); dir++) {
+         cut_dir = sorted_boxdims(dir);
+         if (cut_margin(cut_dir) < 0) {
+            continue;  // This direction is too small to cut.
+         }
+         if (findZeroCutSwath(cut_lo, cut_hi, cut_dir)) {
+            // Split bound box at cut_pt; cut_dir is splitting dimension.
+            TBOX_ASSERT(cut_hi - cut_lo >= 0);
+            lft_hi(cut_dir) = cut_lo - 1;
+            rht_lo(cut_dir) = cut_hi + 1;
+            if (d_common->log_node_history) {
+               tbox::plog << d_common->num_nodes_allocated << "-allocated  "
+                          << d_common->num_nodes_active << "-active  "
+                          << d_common->num_nodes_owned << "-owned  "
+                          << d_common->num_nodes_completed << "-completed  "
+                          << "HoleCut " << d_generation << ':' << d_pos
+                          << "  " << d_box << " d=" << cut_dir
+                          << " at " << cut_lo << '-' << cut_hi
+                          << ".\n";
+            }
+            break;
+         }
+      }
+
+      /*
+       * If no zero point found, try Laplacian cut on side with the
+       * widest cut_margin.
+       */
+
+      if (dir == d_dim.getValue()) {
+         const hier::IntVector margins = boxdims - (d_common->min_box) * 2;
+         cut_dir = 0;
+         for (int d = 1; d < d_dim.getValue(); ++d) {
+            if (margins(cut_dir) < margins(d)) {
+               cut_dir = d;
+            }
+         }
+         cutAtLaplacian(cut_pt, cut_dir);
+         // Split bound box at cut_pt; cut_dir is splitting dimension.
+         lft_hi(cut_dir) = cut_pt - 1;
+         rht_lo(cut_dir) = cut_pt;
+         if (d_common->log_node_history) {
+            tbox::plog << d_common->num_nodes_allocated << "-allocated  "
+                       << d_common->num_nodes_active << "-active  "
+                       << d_common->num_nodes_owned << "-owned  "
+                       << d_common->num_nodes_completed << "-completed  "
+                       << "LapCut " << d_generation << ':' << d_pos
+                       << "  " << d_box
+                       << " d=" << cut_dir << " at " << cut_pt
+                       << ".\n";
+         }
+      }
+
+      /*
+       * The owner forms its children now so it can use their
+       * parameters while determining which to run.
+       * Contributors create the children when they receive
+       * the d_box_acceptance flag from the owner.
+       */
+      d_lft_child = new BergerRigoutsosNode(d_common, this, 0);
+      d_rht_child = new BergerRigoutsosNode(d_common, this, 1);
+
+      d_lft_child->d_box = hier::Box(box_lo, lft_hi);
+      d_rht_child->d_box = hier::Box(rht_lo, box_hi);
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(d_lft_child->d_box.numberCells() >= d_common->min_box);
+      TBOX_ASSERT(d_rht_child->d_box.numberCells() >= d_common->min_box);
+#endif
+
+      d_lft_child->claimMPITag();
+      d_rht_child->claimMPITag();
+
+      d_box_acceptance = rejected_by_calculation;
+
+      if (d_common->log_node_history) {
+         tbox::plog << d_common->num_nodes_allocated << "-allocated  "
+                    << d_common->num_nodes_active << "-active  "
+                    << d_common->num_nodes_owned << "-owned  "
+                    << d_common->num_nodes_completed << "-completed  "
+                    << "Lc Split "
+                    << d_generation << ':' << d_pos << "  " << d_box
+                    << " => " << d_lft_child->d_generation << ':'
+                    << d_lft_child->d_pos << d_lft_child->d_box
+                    << " + " << d_rht_child->d_generation << ':'
+                    << d_rht_child->d_pos << d_rht_child->d_box
+                    << ".\n";
+      }
+
+   }
+}
+
+/*
+ ********************************************************************
+ *
+ * Attempt to find a range with zero histogram value near the
+ * middle of d_box in the given coordinate direction.
+ * Note that the hole is kept more than a minimium distance from
+ * the endpoints of of the index interval.
+ *
+ * Note that it is assumed that box indices are cell indices.
+ *
+ * If a hole is found, cut_lo and cut_hi are set to the
+ * range of zero tag cells.
+ *
+ ********************************************************************
+ */
+
+bool BergerRigoutsosNode::findZeroCutSwath(
+   int& cut_lo,
+   int& cut_hi,
+   const int dim)
+{
+   const int lo = d_box.lower(dim);
+   const int hi = d_box.upper(dim);
+   // Compute the limit for the swath.
+   const int cut_lo_lim = lo + d_common->min_box(dim);
+   const int cut_hi_lim = hi - d_common->min_box(dim);
+
+   /*
+    * Start in the middle of the box.
+    * Move cut_lo down and cut_hi up until a hole is found.
+    * Keep moving in same direction of the hole until the
+    * other side of the hole is found.  The two planes form
+    * the widest cut possible at the hole.
+    */
+   cut_lo = cut_hi = (lo + hi) / 2;
+   while ((cut_lo >= cut_lo_lim) && (cut_hi <= cut_hi_lim)) {
+      if (d_histogram[dim][cut_lo - lo] == 0) {
+         /* The narrow cut is at cut_lo.  Initialize the cut swath here
+          * and move cut_lo down until the far side the hole is found.
+          */
+         cut_hi = cut_lo;
+         while (((cut_lo > cut_lo_lim)) &&
+                (d_histogram[dim][cut_lo - lo - 1] == 0)) {
+            --cut_lo;
+         }
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(cut_hi >= cut_lo);
+         TBOX_ASSERT(cut_lo - lo >= d_common->min_box(dim));
+         TBOX_ASSERT(hi - cut_hi >= d_common->min_box(dim));
+         for (int i = cut_lo; i <= cut_hi; ++i) {
+            TBOX_ASSERT(d_histogram[dim][i - lo] == 0);
+         }
+#endif
+         return true;
+      }
+      if (d_histogram[dim][cut_hi - lo] == 0) {
+         /* The narrow cut is at cut_hi.  Initialize the cut swath here
+          * and move cut_hi up until the far side the hole is found.
+          */
+         cut_lo = cut_hi;
+         while (((cut_hi < cut_hi_lim)) &&
+                (d_histogram[dim][cut_hi - lo + 1] == 0)) {
+            ++cut_hi;
+         }
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(cut_hi >= cut_lo);
+         TBOX_ASSERT(cut_lo - lo >= d_common->min_box(dim));
+         TBOX_ASSERT(hi - cut_hi >= d_common->min_box(dim));
+         for (int i = cut_lo; i <= cut_hi; ++i) {
+            TBOX_ASSERT(d_histogram[dim][i - lo] == 0);
+         }
+#endif
+         return true;
+      }
+      --cut_lo;
+      ++cut_hi;
+   }
+
+   return false;
+}
+
+/*
+ ***********************************************************************
+ *
+ * Attempt to find a point in the given coordinate direction near an
+ * inflection point in the histogram for that direction. Note that the
+ * cut point is kept more than a minimium distance from the endpoints
+ * of the index interval (lo, hi).  Also, the box must have at least
+ * three cells along a side to apply the Laplacian test.  If no
+ * inflection point is found, the mid-point of the interval is
+ * returned as the cut point.
+ *
+ * Note that it is assumed that box indices are cell indices.
+ *
+ ***********************************************************************
+ */
+
+void BergerRigoutsosNode::cutAtLaplacian(
+   int& cut_pt,
+   const int dim)
+{
+   /*
+    * New implementation prefers and possibly restricts the Laplace cut
+    * to the center part of the box.
+
+    * The cuts refer to face indices, not cell indices.
+
+    * Note that we work in the index space centered on the box's lower
+    * cell and add the box lower cell index at the end.
+    */
+
+   const VectorOfInts& hist = d_histogram[dim];
+   const unsigned int hist_size = static_cast<int>(hist.size());
+   TBOX_ASSERT(d_box.upper() (dim) - d_box.lower() (dim) + 1 == static_cast<int>(hist_size));
+   TBOX_ASSERT(hist_size >= 2);
+
+   /*
+    * Laplacian cut requires at least 4 cells of histogram, so it can
+    * compare at 2 Laplacians.  Without 4 cells, we just cut across the
+    * largest change in the histogram.
+    */
+   if (hist_size < 4) {
+      cut_pt = 1;
+      for (unsigned int i = 2; i < hist_size; ++i) {
+         if (tbox::MathUtilities<int>::Abs(hist[cut_pt] - hist[cut_pt - 1]) <
+             tbox::MathUtilities<int>::Abs(hist[i] - hist[i - 1])) {
+            cut_pt = i;
+         }
+      }
+      cut_pt += d_box.lower() (dim);
+      return;
+   }
+
+   const int box_lo = 0;
+   const int box_hi = hist_size - 1;
+   const int max_dist_from_center =
+      int(d_common->max_lap_cut_from_center * hist_size / 2);
+   const int box_mid = (box_lo + box_hi + 1) / 2;
+
+   const int cut_lo_lim = tbox::MathUtilities<int>::Max(
+         box_lo + d_common->min_box(dim),
+         box_mid - max_dist_from_center);
+
+   const int cut_hi_lim = tbox::MathUtilities<int>::Min(
+         box_hi - d_common->min_box(dim) + 1,
+         box_mid + max_dist_from_center);
+
+   /*
+    * Initial cut point and differences between the Laplaces on either
+    * side of it.  We want to cut where this difference is biggest.
+    */
+   cut_pt = box_mid;
+   int diff_laplace =
+      (hist[cut_pt - 1] - 2 * hist[cut_pt] + hist[cut_pt + 1])
+      - (hist[cut_pt - 2] - 2 * hist[cut_pt - 1] + hist[cut_pt]);
+   diff_laplace = tbox::MathUtilities<int>::Abs(diff_laplace);
+
+   int ic = 1;
+   int cut_lo = box_mid - ic;
+   int cut_hi = box_mid + ic;
+
+   while (cut_lo > cut_lo_lim || cut_hi < cut_hi_lim) {
+      if (cut_lo > cut_lo_lim) {
+         int try_diff_laplace =
+            (hist[cut_lo - 1] - 2 * hist[cut_lo] + hist[cut_lo + 1])
+            - (hist[cut_lo - 2] - 2 * hist[cut_lo - 1] + hist[cut_lo]);
+         try_diff_laplace = tbox::MathUtilities<int>::Abs(try_diff_laplace);
+         if (try_diff_laplace > diff_laplace) {
+            cut_pt = cut_lo;
+            diff_laplace = try_diff_laplace;
+         }
+      }
+      if (cut_hi < cut_hi_lim) {
+         int try_diff_laplace =
+            (hist[cut_hi - 1] - 2 * hist[cut_hi] + hist[cut_hi + 1])
+            - (hist[cut_hi - 2] - 2 * hist[cut_hi - 1] + hist[cut_hi]);
+         try_diff_laplace = tbox::MathUtilities<int>::Abs(try_diff_laplace);
+         if (try_diff_laplace > diff_laplace) {
+            cut_pt = cut_hi;
+            diff_laplace = try_diff_laplace;
+         }
+      }
+      --cut_lo;
+      ++cut_hi;
+   }
+
+   cut_pt += d_box.lower() (dim);
+}
+
+/*
+ ********************************************************************
+ * Create a DLBG MappedBox in d_common->new_mapped_box_set,
+ * where the output boxes of the algorithm is saved.
+
+ * Only the owner should create the mapped_box_level node this way.
+ * Other processes build mapped_box_level node using data from owner.
+ ********************************************************************
+ */
+void BergerRigoutsosNode::createMappedBox()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(d_common->rank == d_owner);
+#endif
+   hier::LocalId last_index =
+      d_common->new_mapped_box_set.empty() ? hier::LocalId::getZero() :
+      d_common->new_mapped_box_set.rbegin()->getLocalId();
+
+   d_mapped_box_iterator = d_common->new_mapped_box_set.insert(
+      d_common->new_mapped_box_set.end(),
+      hier::MappedBox(d_box, last_index+1, d_common->rank ) );
+
+   d_mapped_box = *d_mapped_box_iterator;
+}
+
+/*
+ ********************************************************************
+ * Discard the MappedBox.  On the owner, this MappedBox is a part of
+ * d_common->new_mapped_box_set where it must be removed.  On
+ * contributors the MappedBox can just be ignored.  To prevent bugs,
+ * the node and its iterator are set to unusable values.
+ ********************************************************************
+ */
+void BergerRigoutsosNode::eraseMappedBox()
+{
+   if (d_common->rank == d_owner) {
+      d_common->new_mapped_box_set.erase(d_mapped_box_iterator);
+   }
+#ifdef DEBUG_CHECK_ASSERTIONS
+   d_mapped_box_iterator = MappedBoxSet().end();
+   d_mapped_box = MappedBox(d_dim);
+#endif
+}
+
+void BergerRigoutsosNode::countOverlapWithLocalPatches()
+{
+   /*
+    * Count overlaps for the left and right sides.
+
+    * Remove the child if it has zero overlap.
+    */
+   hier::Box lft_grown_box = d_lft_child->d_box;
+   lft_grown_box.grow(d_common->max_gcw);
+   hier::Box rht_grown_box = d_rht_child->d_box;
+   rht_grown_box.grow(d_common->max_gcw);
+   int& lft_overlap = d_lft_child->d_overlap;
+   int& rht_overlap = d_rht_child->d_overlap;
+   lft_overlap = rht_overlap = 0;
+
+   const hier::PatchLevel& tag_level = *d_common->tag_level;
+   for (hier::PatchLevel::Iterator ip(tag_level); ip; ip++) {
+
+      const hier::Box& patch_box = (*ip)->getBox();
+
+      hier::Box lft_intersection = patch_box * lft_grown_box;
+      lft_overlap += lft_intersection.size();
+
+      hier::Box rht_intersection = patch_box * rht_grown_box;
+      rht_overlap += rht_intersection.size();
+
+   }
+}
+
+/*
+ *************************************************************************
+ * Child groups are subsets of current group.  Each child group
+ * includes processes owning patches that overlap the box of that child.
+ * The overlap data has been gathered in d_recv_msg.
+ * See gatherGroupingCriteria_start() for the format of the message.
+ *************************************************************************
+ */
+void BergerRigoutsosNode::formChildGroups()
+{
+   /*
+    * Form child groups and determine owners from data gathered
+    * in the gather_overlap_counts phase.
+    */
+   if (d_group.size() == 1) {
+      // Short cut for trivial groups.
+      d_lft_child->d_group.resize(1, BAD_INTEGER);
+      d_rht_child->d_group.resize(1, BAD_INTEGER);
+      d_lft_child->d_group[0] = d_group[0];
+      d_rht_child->d_group[0] = d_group[0];
+      d_lft_child->d_owner = d_owner;
+      d_rht_child->d_owner = d_owner;
+      return;
+   }
+
+   d_lft_child->d_group.resize(d_group.size(), BAD_INTEGER);
+   d_rht_child->d_group.resize(d_group.size(), BAD_INTEGER);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   /*
+    * Only owner process should be here.
+    */
+   if (d_common->rank != d_owner) {
+      TBOX_ERROR("Library error!");
+   }
+   TBOX_ASSERT(d_recv_msg.size() == 4 * d_group.size());
+#endif
+
+   int* lft_overlap = &d_recv_msg[0];
+   int* rht_overlap = &d_recv_msg[1];
+
+   const int imyself = findOwnerInGroup(d_common->rank, d_group);
+   lft_overlap[imyself * 4] = d_lft_child->d_overlap;
+   rht_overlap[imyself * 4] = d_rht_child->d_overlap;
+
+   int* lft_criteria = NULL;
+   int* rht_criteria = NULL;
+   switch (d_common->owner_mode) {
+      case SINGLE_OWNER:
+         lft_criteria = &d_recv_msg[0];
+         rht_criteria = &d_recv_msg[1];
+         lft_criteria[imyself * 4] = tbox::MathUtilities<int>::getMax();
+         rht_criteria[imyself * 4] = tbox::MathUtilities<int>::getMax();
+         break;
+      case MOST_OVERLAP:
+         lft_criteria = &d_recv_msg[0];
+         rht_criteria = &d_recv_msg[1];
+         lft_criteria[imyself * 4] = d_lft_child->d_overlap;
+         rht_criteria[imyself * 4] = d_rht_child->d_overlap;
+         break;
+      case FEWEST_OWNED:
+         lft_criteria = &d_recv_msg[2];
+         rht_criteria = &d_recv_msg[2];
+         lft_criteria[imyself * 4] = -d_common->num_nodes_owned;
+         rht_criteria[imyself * 4] = -d_common->num_nodes_owned;
+         break;
+      case LEAST_ACTIVE:
+         lft_criteria = &d_recv_msg[3];
+         rht_criteria = &d_recv_msg[3];
+         lft_criteria[imyself * 4] = -d_common->num_nodes_active;
+         rht_criteria[imyself * 4] = -d_common->num_nodes_active;
+         break;
+      default:
+         TBOX_ERROR("LIBRARY error");
+         break;
+   }
+
+   int n_lft = 0;
+   int n_rht = 0;
+
+   int lft_owner_score = tbox::MathUtilities<int>::getMin();
+   int rht_owner_score = tbox::MathUtilities<int>::getMin();
+
+   /*
+    * Loop through the group to see which process should participate
+    * on the left/right sides.  Also see which process should be the
+    * owner of the left/right sides.  For efficiency in some searches
+    * through d_groups, make sure that d_group is ordered.
+    */
+   for (unsigned int i = 0; i < d_group.size(); ++i) {
+      int i4 = i * 4;
+      if (lft_overlap[i4] != 0) {
+         d_lft_child->d_group[n_lft++] = d_group[i];
+         if (lft_criteria[i4] > lft_owner_score) {
+            d_lft_child->d_owner = d_group[i];
+            lft_owner_score = lft_criteria[i4];
+         }
+      }
+      if (rht_overlap[i4] != 0) {
+         d_rht_child->d_group[n_rht++] = d_group[i];
+         if (rht_criteria[i4] > rht_owner_score) {
+            d_rht_child->d_owner = d_group[i];
+            rht_owner_score = rht_criteria[i4];
+         }
+      }
+   }
+
+   d_lft_child->d_group.resize(n_lft, BAD_INTEGER);
+   d_rht_child->d_group.resize(n_rht, BAD_INTEGER);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   // Recall that only the owner should execute this code.
+   TBOX_ASSERT(d_lft_child->d_owner >= 0);
+   TBOX_ASSERT(d_lft_child->d_group.size() > 0);
+   TBOX_ASSERT(d_lft_child->d_group.size() <= d_group.size());
+   TBOX_ASSERT(d_common->owner_mode == SINGLE_OWNER ||
+      ((d_lft_child->d_overlap == 0) !=
+       inGroup(d_lft_child->d_group)));
+   TBOX_ASSERT(d_rht_child->d_owner >= 0);
+   TBOX_ASSERT(d_rht_child->d_group.size() > 0);
+   TBOX_ASSERT(d_rht_child->d_group.size() <= d_group.size());
+   TBOX_ASSERT(d_common->owner_mode == SINGLE_OWNER ||
+      ((d_rht_child->d_overlap == 0) !=
+       inGroup(d_rht_child->d_group)));
+   if (d_common->owner_mode == SINGLE_OWNER) {
+      TBOX_ASSERT(inGroup(d_lft_child->d_group, d_owner));
+      TBOX_ASSERT(inGroup(d_rht_child->d_group, d_owner));
+   }
+   for (size_t i = 0; i < d_group.size(); ++i) {
+      TBOX_ASSERT(i == 0 || d_group[i] > d_group[i - 1]);
+      TBOX_ASSERT((lft_overlap[i * 4] > 0 ||
+                   (d_group[i] == d_lft_child->d_owner))
+         == inGroup(d_lft_child->d_group, d_group[i]));
+      TBOX_ASSERT((rht_overlap[i * 4] > 0 ||
+                   (d_group[i] == d_rht_child->d_owner))
+         == inGroup(d_rht_child->d_group, d_group[i]));
+   }
+#endif
+}
+
+/*
+ *************************************************************************
+ *
+ * Compute overlaps between the new graph node and nodes on
+ * the tagged level, saving that data in the form of relationships.
+ *
+ * Note that the relationship data may be duplicated in two objects.
+ * - tag_eto_new stores the relationships organized around each node
+ *   in the tagged level.  For each node on the tagged level,
+ *   we store a container of neighbors on the new mapped_box_level.
+ * - new_eto_tags stores the relationships organized around each NEW node.
+ *   For each new node we store a container of neighbors on the
+ *   tagged level.
+ *
+ * If compute_relationships > 0, we store tag_eto_new.
+ *
+ * If compute_relationships > 1, we also compute new_eto_tags.
+ * The data in new_eto_tags are
+ * computed by the particant processes but eventually stored on the
+ * owners of the new nodes, so their computation requires caching
+ * the relationship data in relationship_messages for sending to the appropriate
+ * processes later.
+ *
+ *************************************************************************
+ */
+void BergerRigoutsosNode::computeNewNeighborhoodSets()
+{
+   d_common->t_compute_new_graph_relationships->start();
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(d_common->compute_relationships > 0);
+   TBOX_ASSERT(d_mapped_box.getLocalId() >= 0);
+   TBOX_ASSERT(boxAccepted());
+   TBOX_ASSERT(d_box_acceptance != accepted_by_dropout_bcast);
+   if ( d_parent != NULL ) {
+      /*
+       * Do not check for min_box violation in root node.  That
+       * check should be done outside of this class in order to
+       * have flexibility regarding how to handle it.
+       */
+      TBOX_ASSERT(d_box.numberCells() >= d_common->min_box);
+   }
+   /*
+    * We should not compute nabrs if we got the node
+    * by a dropout broadcast because we already know
+    * there is no overlap!
+    */
+   TBOX_ASSERT(d_box_acceptance != accepted_by_dropout_bcast);
+#endif
+
+   // Create an expanded box for intersection check.
+   hier::Box grown_box = d_box;
+   grown_box.grow(d_common->max_gcw);
+
+   /*
+    * On the owner process, we store the neighbors of the new node.
+    * This data is NOT required on other processes.
+    */
+   GraphNeighborSet* nabrs_of_new_node = NULL;
+   if (d_common->rank == d_owner) {
+      nabrs_of_new_node = &(d_common->new_eto_tag[d_mapped_box.getGlobalId()]);
+   }
+
+   // Data to send to d_owner regarding new relationships found by local process.
+   VectorOfInts* relationship_message = NULL;
+   if (d_common->compute_relationships > 1 && d_common->rank != d_owner) {
+      /*
+       * Will have to send to d_owner the relationships found locally for
+       * graph node d_mapped_box.
+       * Label the id of the new node and the (yet unknown) number
+       * of relationship found for it.
+
+       * The message to be sent to owner is appended the following
+       * data:
+       * - index of new node
+       * - number of relationships found for the new node
+       * - index of nodes on the tagged level overlapping new node.
+       */
+      relationship_message = &d_common->relationship_messages[d_owner];
+      relationship_message->insert(relationship_message->end(), d_mapped_box.getLocalId().getValue());
+      relationship_message->insert(relationship_message->end(), 0);
+   }
+
+   const int index_of_counter =
+      (relationship_message != NULL ? static_cast<int>(relationship_message->size()) : 0) - 1;
+   const int ints_per_node = MappedBox::commBufferSize(d_dim);
+
+   const MappedBoxSet& tag_mapped_boxes =
+      d_common->tag_mapped_box_level->getMappedBoxes();
+
+   for (hier::RealMappedBoxConstIterator ni(tag_mapped_boxes); ni.isValid(); ++ni) {
+
+      const MappedBox& tag_mapped_box = *ni;
+
+      hier::Box intersection = tag_mapped_box.getBox() * grown_box;
+
+      if (!intersection.empty()) {
+
+         // Add d_mapped_box as a neighbor of tag_mapped_box.
+         GraphNeighborSet& new_nabrs_of_tag_mapped_box =
+            d_common->tag_eto_new[tag_mapped_box.getGlobalId()];
+         new_nabrs_of_tag_mapped_box.insert(d_mapped_box);
+
+         if (nabrs_of_new_node != NULL) {
+            // Owner adds tag_mapped_box as a neighbor of d_mapped_box.
+            (*nabrs_of_new_node).insert(tag_mapped_box);
+         }
+
+         if (relationship_message != NULL) {
+            /* Non-owners put found relationship in the message
+             * to (eventually) send to d_owner.
+             */
+            relationship_message->insert(relationship_message->end(), ints_per_node, 0);
+            int* ptr = &(*relationship_message)[relationship_message->size() - ints_per_node];
+            tag_mapped_box.putToIntBuffer(ptr);
+            ++(*relationship_message)[index_of_counter];
+         }
+
+      }
+   }
+
+   if (d_common->compute_relationships > 1 &&
+       d_common->rank == d_owner) {
+      /*
+       * If box was accepted, the owner should remember
+       * which process will be sending relationship data.
+       * Update the list of relationship senders to make sure
+       * it includes all processes in the group.
+       * We use this list in shareNewNeighborhoodSetsWithOwners to
+       * tell us which processors are sending us new relationships.
+       * The relationship senders are the participants of the group.
+       */
+      d_common->relationship_senders.insert(d_group.begin(), d_group.end());
+   }
+
+   d_common->t_compute_new_graph_relationships->stop();
+}
+
+/*
+ **********************************************************************
+ *
+ * Send new relationships found by local process to owners of the new nodes
+ * associated with those relationships.  Receive similar data from other
+ * processes.
+ *
+ * Messages to be sent out were placed in d_common->relationship_messages by
+ * computeNewNeighborhoodSets().  This method sends out these messages
+ * and receives anticipated messages from processes listed in
+ * d_common->relationship_senders.  Received messages are unpacked to get
+ * data on new relationships.
+ *
+ **********************************************************************
+ */
+void BergerRigoutsosNode::shareNewNeighborhoodSetsWithOwners()
+{
+   tbox::SAMRAI_MPI mpi(d_common->mpi_object);
+   if (mpi.getSize() == 1) {
+      return;
+   }
+
+   d_common->t_share_new_relationships->start();
+
+   IntSet relationship_senders = d_common->relationship_senders;
+   std::map<int, VectorOfInts>& relationship_messages = d_common->relationship_messages;
+   hier::NeighborhoodSet& new_eto_tag = d_common->new_eto_tag;
+
+   const int ints_per_node = MappedBox::commBufferSize(d_dim);
+
+   int ierr;
+   tbox::SAMRAI_MPI::Status mpi_status;
+
+   // Nonblocking send of relationship data.
+   d_common->t_share_new_relationships_send->start();
+   tbox::Array<tbox::SAMRAI_MPI::Request> mpi_request(
+      static_cast<int>(relationship_messages.size()));
+   std::map<int, VectorOfInts>::iterator send_i;
+   int nsend = 0;
+   for (send_i = relationship_messages.begin(), nsend = 0;
+        send_i != relationship_messages.end();
+        ++send_i, ++nsend) {
+      const int& owner = (*send_i).first;
+      VectorOfInts& msg = (*send_i).second;
+      ierr = mpi.Isend(&msg[0],
+            static_cast<int>(msg.size()),
+            MPI_INT,
+            owner,
+            d_common->tag_upper_bound,
+            &mpi_request[nsend]);
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(ierr == MPI_SUCCESS);
+#else
+      NULL_USE(ierr);
+#endif
+   }
+   d_common->t_share_new_relationships_send->stop();
+
+   {
+      /*
+       * The rest of this method assumes current process is NOT
+       * in relationship_senders, so remove it.  For efficiency, method
+       * computeNewNeighborhoodSets() (which created the relationship senders)
+       * did not remove it.
+       */
+      IntSet::iterator local = relationship_senders.find(d_common->rank);
+      if (local != relationship_senders.end()) {
+         relationship_senders.erase(local);
+      }
+   }
+
+   /*
+    * Create set recved_from which is to contain ranks of
+    * processes from which we've received the expected relationship data.
+    * The while loop goes until all expected messages have
+    * been received from relationship_senders.
+    *
+    * In the while loop:
+    *    - Probe for an incomming message.
+    *    - Determine its size allocate memory for receiving the message.
+    *    - Receive the message.
+    *    - Get relationship data from the message.
+    */
+   IntSet recved_from;
+   while (recved_from.size() < relationship_senders.size()) {
+
+      d_common->t_share_new_relationships_recv->start();
+      ierr = mpi.Probe(MPI_ANY_SOURCE,
+            d_common->tag_upper_bound,
+            &mpi_status);
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(ierr == MPI_SUCCESS);
+#endif
+
+      const int sender = mpi_status.MPI_SOURCE;
+      int mesg_size = -1;
+      mpi.Get_count(&mpi_status, MPI_INT, &mesg_size);
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(relationship_senders.find(sender) != relationship_senders.end());
+      TBOX_ASSERT(recved_from.find(sender) == recved_from.end());
+      TBOX_ASSERT(mesg_size >= 0);
+#endif
+
+      tbox::Array<int> buf(mesg_size);
+      int* ptr = buf.getPointer();
+      ierr = mpi.Recv(ptr,
+            mesg_size,
+            MPI_INT,
+            sender,
+            d_common->tag_upper_bound,
+            &mpi_status);
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(ierr == MPI_SUCCESS);
+#endif
+      d_common->t_share_new_relationships_recv->stop();
+
+      d_common->t_share_new_relationships_unpack->start();
+      int consumed = 0;
+      while (ptr < buf.getPointer() + buf.size()) {
+         const hier::LocalId new_local_id(*(ptr++));
+         int n_new_relationships = *(ptr++);
+         hier::NeighborhoodSet::iterator nn =
+            new_eto_tag.find(hier::GlobalId(new_local_id, d_common->rank));
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(nn != new_eto_tag.end());
+#endif
+         GraphNeighborSet& nabrs = (*nn).second;
+         for (int n = 0; n < n_new_relationships; ++n) {
+            MappedBox node(d_dim);
+            node.getFromIntBuffer(ptr);
+            ptr += ints_per_node;
+            nabrs.insert(node);
+         }
+         consumed += 2 + n_new_relationships * ints_per_node;
+      }
+      recved_from.insert(sender);
+      d_common->t_share_new_relationships_unpack->stop();
+   }
+
+   if (nsend > 0) {
+      // Make sure all nonblocking sends completed.
+      d_common->t_share_new_relationships_send->start();
+      tbox::Array<tbox::SAMRAI_MPI::Status> mpi_statuses(
+         static_cast<int>(relationship_messages.size()));
+      ierr = mpi.Waitall(static_cast<int>(relationship_messages.size()),
+            mpi_request.getPointer(),
+            mpi_statuses.getPointer());
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(ierr == MPI_SUCCESS);
+#endif
+      d_common->t_share_new_relationships_send->stop();
+   }
+
+   d_common->t_share_new_relationships->stop();
+
+}
+
+/*
+ ********************************************************************
+ * Utility methods.
+ ********************************************************************
+ */
+
+// tbox::List<BergerRigoutsosNode*>::Iterator
+std::list<BergerRigoutsosNode *>::const_iterator
+BergerRigoutsosNode::inRelaunchQueue(
+   BergerRigoutsosNode* node_ptr) const
+{
+   std::list<BergerRigoutsosNode *>::const_iterator li =
+      std::find(d_common->relaunch_queue.begin(),
+         d_common->relaunch_queue.end(),
+         node_ptr);
+   return li;
+}
+
+int BergerRigoutsosNode::getHistogramBufferSize(
+   const hier::Box& box) const
+{
+   int d, size = box.numberCells(0);
+   for (d = 1; d < d_dim.getValue(); ++d) {
+      size += box.numberCells(d);
+   }
+   return size;
+}
+
+int *BergerRigoutsosNode::putHistogramToBuffer(
+   int* buffer)
+{
+   for (int d = 0; d < d_dim.getValue(); ++d) {
+      d_histogram[d].resize(d_box.numberCells(d), BAD_INTEGER);
+      memcpy(buffer,
+         &d_histogram[d][0],
+         d_box.numberCells(d) * sizeof(int));
+      buffer += d_box.numberCells(d);
+   }
+   return buffer;
+}
+
+int *BergerRigoutsosNode::getHistogramFromBuffer(
+   int* buffer)
+{
+   for (unsigned int d = 0; d < d_dim.getValue(); ++d) {
+      TBOX_ASSERT((int)d_histogram[d].size() == d_box.numberCells(d));
+      // d_histogram[d].resizeArray( d_box.numberCells(d) );
+      memcpy(&d_histogram[d][0],
+         buffer,
+         d_box.numberCells(d) * sizeof(int));
+      buffer += d_box.numberCells(d);
+   }
+   return buffer;
+}
+
+int *BergerRigoutsosNode::putBoxToBuffer(
+   const hier::Box& box,
+   int* buffer) const
+{
+   const hier::IntVector& l = box.lower();
+   const hier::IntVector& u = box.upper();
+   int d;
+   for (d = 0; d < d_dim.getValue(); ++d) {
+      *(buffer++) = l(d);
+      *(buffer++) = u(d);
+   }
+   return buffer;
+}
+
+int *BergerRigoutsosNode::getBoxFromBuffer(
+   hier::Box& box,
+   int* buffer) const
+{
+   hier::IntVector& l = box.lower();
+   hier::IntVector& u = box.upper();
+   int d;
+   for (d = 0; d < d_dim.getValue(); ++d) {
+      l(d) = *(buffer++);
+      u(d) = *(buffer++);
+   }
+   return buffer;
+}
+
+/*
+ ***********************************************************************
+ * Put in dropouts things that are in main_group but
+ * not in sub_group.
+ *
+ * Assume that sub_group is a subset of elements in main_group.
+ * Assume that sub_group and main_group are sorted in ascending order.
+ *
+ * Assume add_root is NOT in the dropout and add it anyway.
+ ***********************************************************************
+ */
+void BergerRigoutsosNode::computeDropoutGroup(
+   const VectorOfInts& main_group,
+   const VectorOfInts& sub_group,
+   VectorOfInts& dropout_group,
+   int add_root) const
+{
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(main_group.size() >= sub_group.size());
+#endif
+
+   dropout_group.resize(main_group.size(), BAD_INTEGER);
+
+   size_t i, j, k = 0;
+   dropout_group[k++] = add_root;
+   for (i = 0, j = 0; i < main_group.size(); ++i) {
+      if (main_group[i] != sub_group[j]) {
+         dropout_group[k++] = main_group[i];
+      } else {
+         ++j;
+         if (j == sub_group.size()) {
+            // No more in the sub_group so the rest of main_group
+            // goes in dropout_group.
+            for (i = i + 1; i < main_group.size(); ++i, ++k) {
+               dropout_group[k] = main_group[i];
+            }
+         }
+      }
+   }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(j = sub_group.size());
+#endif
+   dropout_group.resize(k, BAD_INTEGER);
+}
+
+/*
+ **********************************************************************
+ * Determine if the given rank is in the given group.
+ **********************************************************************
+ */
+bool BergerRigoutsosNode::inGroup(
+   VectorOfInts& group,
+   int rank) const
+{
+   if (rank < 0) rank = d_common->rank;
+   for (size_t i = 0; i < group.size(); ++i) {
+      if (rank == group[i]) {
+         return true;
+      }
+   }
+   return false;
+}
+
+/*
+ **********************************************************************
+ * Heuristically determine the "best" tree degree for
+ * the communication group.
+ * Use binary tree for less than 2^4 processes.
+ * After that, for each 2^3 multiplying of group size,
+ * increase tree degree by 1.
+ **********************************************************************
+ */
+int BergerRigoutsosNode::computeCommunicationTreeDegree(
+   int group_size) const
+{
+   int tree_deg = 2;
+   int shifted_size = group_size >> 3;
+   while (shifted_size > 0) {
+      shifted_size >>= 3;
+      ++tree_deg;
+   }
+   return tree_deg;
+}
+
+int BergerRigoutsosNode::findOwnerInGroup(
+   int owner,
+   const VectorOfInts& group) const
+{
+   for (unsigned int i = 0; i < group.size(); ++i) {
+      if (group[i] == owner) return i;
+   }
+   return -1;
+}
+/*
+ **********************************************************************
+ * Claim a unique tag from the processor's available tag pool.
+ * Check that the pool is not overused.
+ **********************************************************************
+ */
+void BergerRigoutsosNode::claimMPITag()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   /*
+    * Each dendogram node should claim no more than one MPI tag
+    * so make sure it does not already have one.
+    */
+   TBOX_ASSERT(d_mpi_tag < 0);
+#endif
+   d_mpi_tag = d_common->available_mpi_tag;
+   d_common->available_mpi_tag = d_mpi_tag + total_phase_tags;
+   if (d_mpi_tag + total_phase_tags - 1 >
+       d_common->tag_upper_bound / (d_common->nproc) * (d_common->rank + 1)) {
+      /*
+       * Each process is alloted tag_upper_bound/(d_common->nproc)
+       * tag values.  If it needs more than this, it will encroach
+       * on the tag pool of the next process and may lead to using
+       * non-unique tags.
+       */
+      TBOX_ERROR("Out of MPI tag values need to ensure that\n"
+         << "messages are properly differentiated."
+         << "\nd_mpi_tag = " << d_mpi_tag
+         << "\ntag_upper_bound = " << d_common->tag_upper_bound
+         << "\nmber of nodes = " << d_common->nproc
+         << "\nmax tag required = " << d_mpi_tag + total_phase_tags - 1
+         << "\nmax tag available = "
+         << d_common->tag_upper_bound / (d_common->nproc) * (d_common->rank + 1));
+      /*
+       * It is probably safe to recycle tags if we run out of MPI tags.
+       * This is not implemented because thus far, there is no need for it.
+       * Recycling is starting over from the initial tag set aside for the
+       * local process.  To make sure that recycled tags are not still
+       * in use, we should claim a new (or recycled) tag for the dropout
+       * broadcast phase.  This is because descendant nodes may recycle
+       * the current claimed tag before this phase starts.  All other
+       * phases are not interupted by descendant communications, so we
+       * are assured that their tag is not doubly claimed.
+       */
+   }
+}
+
+/*
+ **********************************************************************
+ * Convert an integer value to BoxAcceptance.
+ * This is needed because the compiler cannot
+ * cast an integer to an enum type.
+ **********************************************************************
+ */
+BergerRigoutsosNode::BoxAcceptance
+BergerRigoutsosNode::intToBoxAcceptance(
+   int i) const
+{
+   switch (i) {
+      case undetermined: return undetermined;
+
+      case hasnotag_by_owner: return hasnotag_by_owner;
+
+      case rejected_by_calculation: return rejected_by_calculation;
+
+      case accepted_by_calculation: return accepted_by_calculation;
+
+      case rejected_by_owner: return rejected_by_owner;
+
+      case accepted_by_owner: return accepted_by_owner;
+
+      case rejected_by_recombination: return rejected_by_recombination;
+
+      case accepted_by_recombination: return accepted_by_recombination;
+
+      case rejected_by_dropout_bcast: return rejected_by_dropout_bcast;
+
+      case accepted_by_dropout_bcast: return accepted_by_dropout_bcast;
+
+      default:
+         TBOX_ERROR("Library error: bad BoxAcceptance data of " << i << ".\n");
+   }
+   return undetermined;
+}
+
+void BergerRigoutsosNode::printClassData(
+   std::ostream& os,
+   int detail_level) const
+{
+   os << "ID              " << d_pos << " owner=" << d_owner << " box="
+      << d_box
+   ;
+   if (detail_level > 0) {
+      os << "\nfamily          " << (d_parent == NULL ? 0 : d_parent->d_pos)
+         << ' ' << (d_lft_child ? (d_lft_child->d_pos) : -1)
+         << ' ' << (d_rht_child ? (d_rht_child->d_pos) : -1)
+      ;
+   }
+   if (detail_level > 1) {
+      os << "\nthis           " << this
+         << "\ngeneration     " << d_generation << " place="
+         << ((d_pos % 2) ? 'r' : 'l')
+         << "\nnode           " << d_mapped_box
+         << "\nbox_acceptance " << d_box_acceptance
+         << "\noverlap        " << d_overlap
+         << "\ngroup          " << d_group.size() << ':'
+      ;
+      for (size_t i = 0; i < d_group.size(); ++i) {
+         os << ' ' << d_group[i];
+      }
+      os << std::endl;
+   }
+}
+
+/*
+ **********************************************************************
+ *
+ * Methods for setting algorithm parameters before running.
+ *
+ **********************************************************************
+ */
+
+void BergerRigoutsosNode::setAlgorithmAdvanceMode(
+   const std::string& mode)
+{
+   if (mode == "ADVANCE_ANY") {
+      d_common->algo_advance_mode = ADVANCE_ANY;
+   } else if (mode == "ADVANCE_SOME") {
+      d_common->algo_advance_mode = ADVANCE_SOME;
+   } else if (mode == "SYNCHRONOUS") {
+      d_common->algo_advance_mode = SYNCHRONOUS;
+   } else {
+      TBOX_ERROR("No such algorithm choice: " << mode << "\n");
+   }
+}
+
+void BergerRigoutsosNode::setOwnerMode(
+   const std::string& mode)
+{
+   if (mode == "SINGLE_OWNER") {
+      d_common->owner_mode = SINGLE_OWNER;
+   } else if (mode == "MOST_OVERLAP") {
+      d_common->owner_mode = MOST_OVERLAP;
+   } else if (mode == "FEWEST_OWNED") {
+      d_common->owner_mode = FEWEST_OWNED;
+   } else if (mode == "LEAST_ACTIVE") {
+      d_common->owner_mode = LEAST_ACTIVE;
+   } else {
+      TBOX_ERROR("BergerRigoutsosNode: Unrecognized owner mode request: "
+         << mode);
+   }
+}
+
+void BergerRigoutsosNode::setComputeRelationships(
+   const std::string mode,
+   const hier::IntVector& ghost_cell_width)
+{
+   if (mode == "NONE") {
+      d_common->compute_relationships = 0;
+   } else if (mode == "TAG_TO_NEW") {
+      d_common->compute_relationships = 1;
+   } else if (mode == "BIDIRECTIONAL") {
+      d_common->compute_relationships = 2;
+   } else {
+      TBOX_ERROR("BergerRigoutsosNode::setComputeRelationships error:\n"
+         << "bad mode '" << mode << "' specified.\n"
+         << "Should be one of NONE, TAG_TO_NEW, BIDIRECTIONAL");
+   }
+   TBOX_ASSERT(ghost_cell_width >= hier::IntVector::getZero(d_dim));
+   d_common->max_gcw = ghost_cell_width;
+}
+
+void BergerRigoutsosNode::setLogNodeHistory(
+   bool flag)
+{
+   d_common->log_node_history = flag;
+}
+
+/*
+ **********************************************************************
+ *
+ * Methods for collecting data on dendogram after it completes.
+ *
+ **********************************************************************
+ */
+
+int BergerRigoutsosNode::getNumTags() const
+{
+   return d_common->num_tags_in_all_nodes;
+}
+
+int BergerRigoutsosNode::getMaxTagsOwned() const
+{
+   return d_common->max_tags_owned;
+}
+
+int BergerRigoutsosNode::getMaxNodes() const
+{
+   return d_common->max_nodes_allocated;
+}
+
+int BergerRigoutsosNode::getMaxGeneration() const
+{
+   return d_common->max_generation;
+}
+
+int BergerRigoutsosNode::getMaxOwnership() const
+{
+   return d_common->max_nodes_owned;
+}
+
+double BergerRigoutsosNode::getAvgNumberOfCont() const
+{
+   if (d_common->num_nodes_completed > 0) {
+      return (double)d_common->num_conts_to_complete
+             / d_common->num_nodes_completed;
+   }
+   return 0;
+}
+
+int BergerRigoutsosNode::getMaxNumberOfCont() const
+{
+   return d_common->max_conts_to_complete;
+}
+
+int BergerRigoutsosNode::getNumBoxesGenerated() const
+{
+   return d_common->num_boxes_generated;
+}
+
+/*
+ **********************************************************************
+ *
+ * Methods for accessing output from BR algorithm.
+ *
+ **********************************************************************
+ */
+
+const hier::NeighborhoodSet
+& BergerRigoutsosNode::getNeighborhoodSetsToNew() const
+{
+#ifdef DEBUG_CHECK_ASSERTION
+   if (d_wait_phase != completed) {
+      TBOX_ERROR("Cannot get results until algorithm completes running.");
+   }
+#endif
+   return d_common->tag_eto_new;
+}
+
+const hier::NeighborhoodSet
+& BergerRigoutsosNode::getNeighborhoodSetsFromNew() const
+{
+#ifdef DEBUG_CHECK_ASSERTION
+   if (d_wait_phase != completed) {
+      TBOX_ERROR("Cannot get results until algorithm completes running.");
+   }
+#endif
+   return d_common->new_eto_tag;
+}
+
+void BergerRigoutsosNode::printDendogramState(
+   std::ostream& co,
+   const std::string& border) const
+{
+   co << border;
+   for (int i = 0; i < d_generation; ++i) {
+      co << "  ";
+   }
+   printState(co);
+   co << std::endl;
+   if (d_lft_child) {
+      d_lft_child->printDendogramState(co, border);
+   }
+   if (d_rht_child) {
+      d_rht_child->printDendogramState(co, border);
+   }
+}
+
+void BergerRigoutsosNode::printState(
+   std::ostream& co) const
+{
+   co << d_generation << ':' << d_pos << '=' << d_mapped_box
+      << "  o=" << d_owner << ',' << (d_common->rank == d_owner)
+      << "  a=" << d_box_acceptance
+      << "  w=" << d_wait_phase << '/' << bool(d_comm_group)
+      << (d_comm_group ? d_comm_group->isDone() : true)
+      << "  t=" << d_num_tags;
+   if (d_lft_child)
+      co << "  l=" << d_lft_child->d_generation << ':' << d_lft_child->d_pos
+         << '=' << d_lft_child->d_mapped_box;
+   if (d_rht_child)
+      co << "  r=" << d_rht_child->d_generation << ':' << d_rht_child->d_pos
+         << '=' << d_rht_child->d_mapped_box;
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void BergerRigoutsosNode::initializeCallback()
+{
+   // Timers
+   CommonParams::t_cluster = tbox::TimerManager::getManager()->
+      getTimer("mesh::BergerRigoutsosNode::cluster");
+   CommonParams::t_cluster_and_compute_relationships = tbox::TimerManager::getManager()->
+      getTimer("mesh::BergerRigoutsosNode::clusterAndComputeRelationships()");
+   CommonParams::t_continue_algorithm = tbox::TimerManager::getManager()->
+      getTimer("mesh::BergerRigoutsosNode::continueAlgorithm()");
+
+   CommonParams::t_compute = tbox::TimerManager::getManager()->
+      getTimer("mesh::BergerRigoutsosNode::compute");
+   CommonParams::t_comm_wait = tbox::TimerManager::getManager()->
+      getTimer("mesh::BergerRigoutsosNode::Comm_wait");
+   CommonParams::t_MPI_wait = tbox::TimerManager::getManager()->
+      getTimer("mesh::BergerRigoutsosNode::MPI_wait");
+
+   CommonParams::t_compute_new_graph_relationships = tbox::TimerManager::getManager()->
+      getTimer("mesh::BergerRigoutsosNode::computeNewNeighborhoodSets()");
+   CommonParams::t_share_new_relationships = tbox::TimerManager::getManager()->
+      getTimer("mesh::BergerRigoutsosNode::shareNewNeighborhoodSetsWithOwners()");
+   CommonParams::t_share_new_relationships_send = tbox::TimerManager::getManager()->
+      getTimer("mesh::BergerRigoutsosNode::shareNewNeighborhoodSetsWithOwners()_send");
+   CommonParams::t_share_new_relationships_recv = tbox::TimerManager::getManager()->
+      getTimer("mesh::BergerRigoutsosNode::shareNewNeighborhoodSetsWithOwners()_recv");
+   CommonParams::t_share_new_relationships_unpack = tbox::TimerManager::getManager()->
+      getTimer("mesh::BergerRigoutsosNode::shareNewNeighborhoodSetsWithOwners()_unpack");
+
+   CommonParams::t_local_histogram = tbox::TimerManager::getManager()->
+      getTimer("mesh::BergerRigoutsosNode::makeLocalTagHistogram()");
+   CommonParams::t_local_tasks = tbox::TimerManager::getManager()->
+      getTimer("mesh::BergerRigoutsosNode::continueAlgorithm()_local_tasks");
+
+   // Multi-stage timers.
+   CommonParams::t_reduce_histogram = tbox::TimerManager::getManager()->
+      getTimer("mesh::BergerRigoutsosNode::reduce_histogram");
+   CommonParams::t_bcast_acceptability = tbox::TimerManager::getManager()->
+      getTimer("mesh::BergerRigoutsosNode::bcast_acceptability");
+   CommonParams::t_gather_grouping_criteria = tbox::TimerManager::getManager()->
+      getTimer("mesh::BergerRigoutsosNode::gather_grouping_criteria");
+   CommonParams::t_bcast_child_groups = tbox::TimerManager::getManager()->
+      getTimer("mesh::BergerRigoutsosNode::bcast_child_groups");
+   CommonParams::t_bcast_to_dropouts = tbox::TimerManager::getManager()->
+      getTimer("mesh::BergerRigoutsosNode::bcast_to_dropouts");
+
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void BergerRigoutsosNode::finalizeCallback()
+{
+   CommonParams::t_cluster.setNull();
+   CommonParams::t_cluster_and_compute_relationships.setNull();
+   CommonParams::t_continue_algorithm.setNull();
+   CommonParams::t_compute.setNull();
+   CommonParams::t_comm_wait.setNull();
+   CommonParams::t_MPI_wait.setNull();
+   CommonParams::t_compute_new_graph_relationships.setNull();
+   CommonParams::t_share_new_relationships.setNull();
+   CommonParams::t_share_new_relationships_send.setNull();
+   CommonParams::t_share_new_relationships_recv.setNull();
+   CommonParams::t_share_new_relationships_unpack.setNull();
+   CommonParams::t_local_tasks.setNull();
+   CommonParams::t_local_histogram.setNull();
+   CommonParams::t_reduce_histogram.setNull();
+   CommonParams::t_bcast_acceptability.setNull();
+   CommonParams::t_gather_grouping_criteria.setNull();
+   CommonParams::t_bcast_child_groups.setNull();
+   CommonParams::t_bcast_to_dropouts.setNull();
+}
+
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/BergerRigoutsosNode.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/BergerRigoutsosNode.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1017 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Asynchronous Berger-Rigoutsos dendogram 
+ *
+ ************************************************************************/
+#ifndef included_mesh_BergerRigoutsosNode
+#define included_mesh_BergerRigoutsosNode
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/IntVector.h"
+
+#include "SAMRAI/hier/Connector.h"
+#include "SAMRAI/hier/MappedBoxLevel.h"
+#include "SAMRAI/hier/MappedBoxSet.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/AsyncCommGroup.h"
+#include "SAMRAI/tbox/AsyncCommStage.h"
+#include "SAMRAI/tbox/List.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/vector.h"
+
+#include <set>
+#include <list>
+
+namespace SAMRAI {
+namespace mesh {
+
+/*!
+ * @brief Node in the asynchronous Berger-Rigoutsos (BR) dendogram.
+ * Do not directly use this class; for clustering, use BergerRigoutsos
+ * instead.
+ *
+ * In mesh generation, the BR algorithm can be used to cluster
+ * tagged cells into boxes.
+ * This algorithm is described in Berger and Rigoutsos,
+ * IEEE Trans. on Sys, Man, and Cyber (21)5:1278-1286.
+ *
+ * This class implements the BR algorithm to execute
+ * in a non-recursive way, in order to improve parallel
+ * efficiency over recursive implementations.
+ * To facilitate a non-recursive implementation,
+ * data in the recursive tree is maintained in a "BR dendogram",
+ * nodes of which are instances of this class.
+ *
+ * Clarification on the uses of the word "node":
+ * - Dendogram node: Node in the BR dendogram (this class).
+ * - Graph node: Node in a box graph.  The box graph is the form
+ *   of the outputs of this class.  Each output graph node
+ *   corresponds to a box generated by the BR algorithm.
+ * - Processor: MPI process id.  This is called a node in some
+ *   context.  For clarity, we avoid this use of "node".
+ *
+ * Each dendogram node is associated with a candidate box,
+ * an owner process coordinating distributed computations on the box
+ * and a group of processors participating in those computations.
+ * Should the candidate box be one of the final output boxes,
+ * the owner also owns the graph node associated with the box.
+ *
+ * To use this class:
+ * -# Construct the root dendogram node, an object of type
+ *    BergerRigoutsosNode.
+ * -# Set the clustering parameters using setClusteringParameters().
+ * -# Finetune the algorithm settings using the methods under
+ *    "Algorithm settings".
+ * -# Start clustering by calling clusterAndComputeRelationships().
+ *
+ * The 2 primary outputs of this implementation are:
+ * -# A MappedBoxLevel of MappedBoxes containing input tags.  Each node
+ *    corresponds to an output box.
+ * -# Connector between the tag MappedBoxLevel and the new MappedBoxLevel.
+ *
+ * TODO:
+ * -# Implement MOST_TAGS ownership option.  This may be an
+ *    improvement over the MOST_OVERLAP and is easy to do
+ *    because the number of local tags in the candidate box
+ *    is already computed.
+ */
+
+class BergerRigoutsosNode:
+   private tbox::AsyncCommStage::Handler
+{
+
+public:
+   enum OwnerMode { SINGLE_OWNER = 0,
+                    MOST_OVERLAP = 1,
+                    FEWEST_OWNED = 2,
+                    LEAST_ACTIVE = 3 };
+
+   /*!
+    * @brief Method for advancing the algorithm.
+    *
+    * Each corresponds to a choice permitted by setAlgorithmAdvanceMode().
+    */
+   enum AlgoAdvanceMode { ADVANCE_ANY,
+                          ADVANCE_SOME,
+                          SYNCHRONOUS };
+
+   /*!
+    * @brief Construct the root node of a BR dendogram.
+    *
+    * The root node is used to run the BR algorithm and
+    * obtain outputs.
+    */
+   explicit BergerRigoutsosNode(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Destructor.
+    *
+    * Deallocate internal data.
+    */
+   ~BergerRigoutsosNode(
+      void);
+
+   /*!
+    * @brief Set parameters for (our slight variation of) the
+    * Berger-Rigoutsos algorithm.
+    *
+    * These parameters are not specific to the asynchronous algorithm
+    * or DLBG.
+    *
+    * @param max_lap_cut_from_center: Limit the Laplace cut to this
+    *   fraction of the distance from the center plane to the end.
+    *   Zero means cut only at the center plane.  One means unlimited.
+    *   Under most situations, one is fine.
+    */
+   void
+   setClusteringParameters(
+      const int tag_data_index,
+      const int tag_val,
+      const hier::IntVector min_box,
+      const double efficiency_tol,
+      const double combine_tol,
+      const hier::IntVector& max_box_size,
+      const double max_lap_cut_from_center);
+
+   //@{
+   //! @name Algorithm mode settings
+
+   /*!
+    * @brief Set the mode for advancing the asynchronous implementation.
+    *
+    * Choices are:
+    * - @b "SYNCHRONOUS" --> wait for each communication stage to complete
+    *   before moving on, thus resulting in synchronous execution.
+    * - @b "ADVANCE_ANY" --> advance an dendogram node through its
+    *   communication stage by using tbox::AsyncCommStage::advanceAny().
+    * - @b "ADVANCE_SOME" --> advance an dendogram node through its
+    *   communication stage by using tbox::AsyncCommStage::advanceSome().
+    *
+    * The default is "ADVANCE_SOME".
+    *
+    * Asynchronous modes are NOT guaranteed to compute the output
+    * graph nodes in any particular order.  The order depends on
+    * the ordering of message completion, which is not deterministic.
+    * If you require consistent outputs, we suggest you have a scheme
+    * for reordering the output boxes.
+    */
+   void
+   setAlgorithmAdvanceMode(
+      const std::string& algo_advance_mode);
+
+   /*!
+    * @brief Set the method for choosing the owner.
+    * Choices:
+    * - "MOST_OVERLAP"
+    *   Ownership is given to the processor with the most
+    *   overlap on the candidate box.  Default.
+    * - "SINGLE_OWNER"
+    *   In single-owner mode, the initial owner (process 0)
+    *   always participates and owns all dendogram nodes.
+    * - "FEWEST_OWNED"
+    *   Choose the processor that owns the fewest dendogram
+    *   nodes when the choice is made.  This is meant to
+    *   relieve bottle-necks caused by excessive ownership.
+    *   This option may lead to non-deterministic ownerships.
+    * - "LEAST_ACTIVE"
+    *   Choose the processor that participates in the fewest
+    *   number of dendogram nodes when the choice is made.
+    *   This is meant to relieve bottle-necks caused by
+    *   excessive participation. This option may lead to
+    *   non-deterministic ownerships.
+    *
+    * Experiments show that "MOST_OVERLAP" gives the best
+    * clustering speed, while "SINGLE_OWNER" may give a faster
+    * output globalization (since you don't need an all-gather).
+    */
+   void
+   setOwnerMode(
+      const std::string& mode);
+
+   /*!
+    * @brief Relationship computation flag.
+    *
+    * Valid mode values to set are:
+    *
+    * - "NONE" = No relationship computation.
+    *
+    * - "TAG_TO_NEW": Compute directed relationships from input (tagged) to
+    * output (new) graph nodes.  With this option, it is possible to
+    * determine output nodes neighboring any input nodes, but not
+    * possible to determine input nodes neighboring a specific output
+    * node.
+    *
+    * - "BIDIRECTIONAL": Compute directed relationships from input (tagged) to
+    * output (new) graph nodes as well as the reverse.  With this
+    * option, it is possible to determine output nodes neighboring any
+    * input nodes, as well as input nodes neighboring any output node.
+    * This is accomplished using an additional relationship-sharing
+    * communication after all graph nodes have been created.
+    *
+    * The ghost_cell_width specifies the growth for the overlap
+    * checks.  Overlap checking is done to determine nearest-neighbor
+    * relationships when generating connectivity to new graph nodes.
+    * If a box grown by this ammount intersects another box, the two
+    * boxes are considered neighbors.
+    *
+    * By default, compute bidirectional relationships with a ghost cell width
+    * of 1.
+    */
+   void
+   setComputeRelationships(
+      const std::string mode,
+      const hier::IntVector& ghost_cell_width);
+
+   //@}
+
+   /*
+    * @brief Run the clustering algorithm to generate the new MappedBoxLevel
+    * and compute relationships (if specified by setComputeRelationships()).
+    *
+    * If relationships computation is not specified, the Connectors are
+    * unchanged.
+    *
+    * @param mpi_communicator Alternative MPI communicator.  If given,
+    *   must be congruent with the tag mapped_box_level's MPI communicator.
+    *   Specify tbox::SAMRAI_MPI::commNull if unused.  Highly recommend
+    *   using an isolated communicator to prevent message mix-ups.
+    */
+   void
+   clusterAndComputeRelationships(
+      hier::MappedBoxLevel& new_mapped_box_level,
+      hier::Connector& tag_to_new,
+      hier::Connector& new_to_tag,
+      const hier::Box& bound_box,
+      const tbox::Pointer<hier::PatchLevel> tag_level,
+      const tbox::SAMRAI_MPI& mpi_object);
+
+   //@{
+   //! @name Access to outputs
+
+   /*!
+    * @brief Get the connectivity from the tagged nodes to the new nodes.
+    *
+    * The connectivity data generated depend on the flag set using
+    * setComputeRelationships().
+    */
+   const hier::NeighborhoodSet&
+   getNeighborhoodSetsToNew() const;
+
+   /*!
+    * @brief Get the connectivity from the new nodes back to the tagged nodes.
+    *
+    * The connectivity data generated depend on the flag set using
+    * setComputeRelationships().
+    */
+   const hier::NeighborhoodSet&
+   getNeighborhoodSetsFromNew() const;
+
+   //@}
+
+   //@{
+
+   //! @name Developer's methods for analysis and debugging this class.
+   virtual void
+   printClassData(
+      std::ostream& os,
+      int detail_level = 0) const;
+
+   //! @brief Global number of tags in clusters.
+   int
+   getNumTags() const;
+
+   //! @brief Max number of tags owned.
+   int
+   getMaxTagsOwned() const;
+
+   //! @brief Max number of local nodes for dendogram.
+   int
+   getMaxNodes() const;
+
+   //! @brief max generation count for the local nodes in the dendogram.
+   int
+   getMaxGeneration() const;
+
+   //! @brief Max number of locally owned nodes in the dendogram.
+   int
+   getMaxOwnership() const;
+
+   //! @brief Average number of continuations for local nodes in dendogram.
+   double
+   getAvgNumberOfCont() const;
+
+   //! @brief Max number of continuations for local nodes in dendogram.
+   int
+   getMaxNumberOfCont() const;
+
+   /*!
+    * @brief Number of boxes generated (but not necessarily owned)
+    * on the local process.
+    */
+   int
+   getNumBoxesGenerated() const;
+
+   /*!
+    * @brief Set whether to log dendogram node action history
+    * (useful for debugging).
+    */
+   void
+   setLogNodeHistory(
+      bool flag);
+   //@}
+
+private:
+   /*!
+    * @brief Shorthand for the box-graph node corresponding
+    * to boxes.
+    */
+   typedef hier::MappedBox MappedBox;
+
+   //! @brief Shorthand for a container of graph-nodes.
+   typedef hier::MappedBoxSet MappedBoxSet;
+
+   //! @brief Shorthand for a container of neighbor graph-nodes.
+   typedef hier::Connector::NeighborSet GraphNeighborSet;
+
+   //! @brief Shorthand for a sorted, possibly incontiguous, set of integers.
+   typedef std::set<int> IntSet;
+
+   /*!
+    * @brief Type of vector<int> for internal use.
+    *
+    * Choose either std::vector or tbox::vector.  tbox::vector is a
+    * wrapper for std::vector, adding array bounds checking.
+    */
+#ifdef DEBUG_CHECK_ASSERTIONS
+   typedef tbox::vector<int> VectorOfInts;
+#else
+   typedef std::vector<int> VectorOfInts;
+#endif
+
+   /*!
+    * @brief Parameters shared among all dendogram nodes in
+    * a dendogram and collectively managed by those nodes.
+    *
+    * In the implementation of the BR algorithm, some parameters
+    * are to be shared among all nodes in the dendogram,
+    * either for efficiency or coordinating the dendogram nodes.
+    * All such parameters are contained in a single CommonParams
+    * object.
+    */
+   class CommonParams {
+     public :
+      CommonParams(
+         const tbox::Dimension& dim);
+
+      const tbox::Dimension d_dim;
+
+      /*!
+       * @brief Queue on which to append jobs to be
+       * launched or relaunched.
+       *
+       * What is placed on the queue depends on the version of
+       * clusterAndComputeRelationships_...() used.
+       *
+       * We use void* to avoid having to explicitly instantiate
+       * multiple types, although we only place BergerRigoutsosNode
+       * pointers in the relaunch_queue.
+       */
+      std::list<BergerRigoutsosNode *> relaunch_queue;
+
+      /*!
+       * @brief Stage handling multiple asynchronous communication groups.
+       */
+      tbox::AsyncCommStage comm_stage;
+
+      AlgoAdvanceMode algo_advance_mode;
+
+      /*!
+       * @brief Level where tags live.
+       */
+      tbox::Pointer<hier::PatchLevel> tag_level;
+
+      /*!
+       * @brief MappedBoxLevel associated with tag_level.
+       *
+       * If relationships are computed (see setComputeRelationships()), the relationships
+       * go between the graph nodes on the tagged level and the
+       * generated graph nodes.
+       */
+      const hier::MappedBoxLevel* tag_mapped_box_level;
+
+      /*!
+       * @brief New MappedBoxSet generated by BR.
+       *
+       * This is where we store the boxes as we progress in the BR
+       * algorithm.
+       */
+      hier::MappedBoxSet new_mapped_box_set;
+
+      /*!
+       * @brief NeighborhoodSet from tag_mapped_box_level to new_mapped_box_level.
+       *
+       * This is where we store the relationships resulting from the BR algorithm.
+       * The relationships are created locally for local nodes in tag_mapped_box_level.
+       */
+      hier::NeighborhoodSet tag_eto_new;
+
+      /*!
+       * @brief NeighborhoodSet from new_mapped_box_level to tag_mapped_box_level.
+       *
+       * The relationships are created when the owners of nodes in tag_mapped_box_level
+       * share relationship data with owners of nodes in new_mapped_box_level.
+       */
+      hier::NeighborhoodSet new_eto_tag;
+
+      /*!
+       * @brief List of processes that will send neighbor data
+       * for locally owned boxes after the BR algorithm completes.
+       */
+      IntSet relationship_senders;
+
+      /*!
+       * @brief Outgoing messages to be sent to graph node owners
+       * describing new relationships found by local process.
+       */
+      std::map<int, VectorOfInts> relationship_messages;
+
+      /*!
+       * @brief If a candidate box does not fit in this limit,
+       * it will be split.
+       *
+       * Boxes will not be recombined (@see combine_tol) if the
+       * combination breaks this limit.
+       *
+       * This is meant to prevent huge boxes that degrades worst-case
+       * performances in when later processing the box.
+       */
+      hier::IntVector max_box_size;
+
+      //@{
+      //@name Parameters from clustering algorithm interface
+      int tag_data_index;
+      int tag_val;
+      hier::IntVector min_box;
+      double efficiency_tol;
+      double combine_tol;
+      double max_lap_cut_from_center;
+      //@}
+
+      /*!
+       * @brief Relationship computation flag.
+       *
+       * See setComputeRelationships().
+       */
+      int compute_relationships;
+
+      //! @brief Ammount to grow a box when checking for overlap.
+      hier::IntVector max_gcw;
+
+      //! @brief How to chose the group's owner.
+      OwnerMode owner_mode;
+
+      //@{
+      //! @name Communication parameters
+      /*!
+       * @brief MPI communicator used in all communications in
+       * the dendogram.
+       */
+      tbox::SAMRAI_MPI mpi_object;
+      int rank;
+      int nproc;
+      //! @brief Upperbound of valid tags.
+      int tag_upper_bound;
+      //! @brief Smallest unclaimed MPI tag in pool given to local process.
+      int available_mpi_tag;
+      //@}
+
+      //@{
+      //! @name Performance monitors
+      static tbox::Pointer<tbox::Timer> t_cluster;
+      static tbox::Pointer<tbox::Timer> t_cluster_and_compute_relationships;
+      static tbox::Pointer<tbox::Timer> t_continue_algorithm;
+      static tbox::Pointer<tbox::Timer> t_compute;
+      static tbox::Pointer<tbox::Timer> t_comm_wait;
+      static tbox::Pointer<tbox::Timer> t_MPI_wait;
+      static tbox::Pointer<tbox::Timer> t_compute_new_graph_relationships;
+      static tbox::Pointer<tbox::Timer> t_share_new_relationships;
+      static tbox::Pointer<tbox::Timer> t_share_new_relationships_send;
+      static tbox::Pointer<tbox::Timer> t_share_new_relationships_recv;
+      static tbox::Pointer<tbox::Timer> t_share_new_relationships_unpack;
+      static tbox::Pointer<tbox::Timer> t_local_tasks;
+      static tbox::Pointer<tbox::Timer> t_local_histogram;
+      /*
+       * Multi-stage timers.  These are used in continueAlgorithm()
+       * instead of the methods they time, because what they time may
+       * include waiting for messages.  They are included in the
+       * timer t_continue_algorithm.  They provide timing breakdown
+       * for the different stages.
+       */
+      static tbox::Pointer<tbox::Timer> t_reduce_histogram;
+      static tbox::Pointer<tbox::Timer> t_bcast_acceptability;
+      static tbox::Pointer<tbox::Timer> t_gather_grouping_criteria;
+      static tbox::Pointer<tbox::Timer> t_bcast_child_groups;
+      static tbox::Pointer<tbox::Timer> t_bcast_to_dropouts;
+      //@}
+
+      //@{
+      //! @name Auxiliary data for analysis and debugging.
+
+      //! @brief Whether to log major actions of dendogram node.
+      bool log_node_history;
+      //! @brief Number of tags.
+      int num_tags_in_all_nodes;
+      //! @brief Max number of tags owned.
+      int max_tags_owned;
+      //! @brief Current number of dendogram nodes allocated.
+      int num_nodes_allocated;
+      //! @brief Highest number of dendogram nodes.
+      int max_nodes_allocated;
+      //! @brief Current number of dendogram nodes active.
+      int num_nodes_active;
+      //! @brief Highest number of dendogram nodes active.
+      int max_nodes_active;
+      //! @brief Current number of dendogram nodes owned.
+      int num_nodes_owned;
+      //! @brief Highest number of dendogram nodes owned.
+      int max_nodes_owned;
+      //! @brief Current number of dendogram nodes completed.
+      int num_nodes_completed;
+      //! @brief Highest number of generation.
+      int max_generation;
+      //! @brief Current number of boxes generated.
+      int num_boxes_generated;
+      //! @brief Number of continueAlgorithm calls for to complete nodes.
+      int num_conts_to_complete;
+      //! @brief Highest number of continueAlgorithm calls to complete nodes.
+      int max_conts_to_complete;
+      //@}
+   };
+
+   /*!
+    * @brief Construct a non-root node.
+    *
+    * This is private because the object requires setting up
+    * after constructing.  Nodes constructed this way are
+    * only meant for internal use by the recursion mechanism.
+    */
+   BergerRigoutsosNode(
+      CommonParams* common_params,
+      mesh::BergerRigoutsosNode* parent,
+      const int child_number);
+
+   /*
+    * @brief Duplicate given MPI communicator for private use
+    * and various dependent parameters.
+    *
+    * Requires that d_common->tag_mapped_box_level is already set!
+    */
+   void
+   setMPI(
+      const tbox::SAMRAI_MPI& mpi);
+
+   /*!
+    * @brief Run the BR algorithm to find boxes, then generate the relationships
+    * between the tag mapped_box_level and the new mapped_box_level.
+    */
+   void
+   clusterAndComputeRelationships();
+
+   /*!
+    * @brief Names of algorithmic phases while outside of
+    * continueAlgorithm().
+    *
+    * "For_data_only" phase is when the dendogram node is only used to
+    * store data. If the node is to be executed, it enters the
+    * "to_be_launched" phase.
+    *
+    * All names beginning with "reduce", "gather" or "bcast"
+    * refer to communication phases, where control is
+    * returned before the algorithm completes.
+    *
+    * The "children" phase does not explicitly contain communication,
+    * but the children may perform communication.
+    *
+    * The "completed" phase is when the algorithm has run to completion.
+    * This is where the recursive implementation would return.
+    *
+    * The "deallocated" phase is for debugging.  This phase is
+    * set by the destructor, just to help find dendogram nodes that
+    * are deallocated but somehow was referenced.
+    */
+   enum WaitPhase { for_data_only,
+                    to_be_launched,
+                    reduce_histogram,
+                    bcast_acceptability,
+                    gather_grouping_criteria,
+                    bcast_child_groups,
+                    run_children,
+                    bcast_to_dropouts,
+                    completed,
+                    deallocated };
+
+   /*!
+    * @brief MPI tags identifying messages.
+    *
+    * Each message tag is the d_mpi_tag plus a PhaseTag.
+    * Originally, there were different tags for different
+    * communication phases, determined by d_mpi_tag plus
+    * a PhaseTag.  But this is not really needed,
+    * so all phases use the tag d_mpi_tag.  The PhaseTag
+    * type is just here in case we have to go back to using
+    * them.
+    */
+   enum PhaseTag { reduce_histogram_tag = 0,
+                   bcast_acceptability_tag = 0,
+                   gather_grouping_criteria_tag = 0,
+                   bcast_child_groups_tag = 0,
+                   bcast_to_dropouts_tag = 0,
+                   total_phase_tags = 1 };
+
+   /*!
+    * @brief Continue the the BR algorithm.
+    *
+    * Parameters for finding boxes are internal.
+    * They should be set in the constructor.
+    *
+    * In parallel, this the method may return before
+    * algorithm is completed.  In serial, no communication
+    * is done, so the algorithm IS completed when this
+    * method returns.  The method is completed if it
+    * returns WaitPhase::completed.  This method may
+    * and @em should be called multiple times as long as
+    * the algorithm has not completed.
+    *
+    * If this method returns before the algorithm is
+    * complete, this object will have put itself on
+    * the leaf queue to be checked for completion later.
+    *
+    * @return The communication phase currently running.
+    */
+   WaitPhase
+   continueAlgorithm();
+
+   /*!
+    * @brief Candidate box acceptance state.
+    *
+    * Note that accepted values are odd and rejected
+    * and undetermined values are even!  See boxAccepted(),
+    * boxRejected() and boxHasNoTag().
+    *
+    * It is not critical to have all values shown,
+    * but the values help in debugging.
+    *
+    * Meaning of values:
+    * - "hasnotag_by_owner": histogram is truly empty (after sum reduction).
+    *   We don't accept the box, but we don't split it either.
+    *   (This can only happen at the root dendogram node, as child
+    *   boxes are guaranteed to have tags.)
+    * - "(rejected|accepted)_by_calculation": decision by calculation
+    *   on the owner process.
+    * - "(rejected|accepted)_by_owner": decision by owner process,
+    *   broadcast to participants.
+    * - "(rejected|accepted)_by_recombination": decision by recombination
+    *   on local process.
+    * - "(rejected|accepted)_by_dropout_bcast": decision by participant group,
+    *   broadcast
+    *    to the dropout group.
+    */
+   enum BoxAcceptance { undetermined = -2,
+                        hasnotag_by_owner = -1,
+                        rejected_by_calculation = 0,
+                        accepted_by_calculation = 1,
+                        rejected_by_owner = 2,
+                        accepted_by_owner = 3,
+                        rejected_by_recombination = 4,
+                        accepted_by_recombination = 5,
+                        rejected_by_dropout_bcast = 6,
+                        accepted_by_dropout_bcast = 7 };
+
+   //@{
+   //! @name Delegated tasks for various phases of running algorithm.
+   void
+   makeLocalTagHistogram();
+   void
+   reduceHistogram_start();
+   bool
+   reduceHistogram_check();
+   void
+   computeMinimalBoundingBoxForTags();
+   void
+   acceptOrSplitBox();
+   void
+   broadcastAcceptability_start();
+   bool
+   broadcastAcceptability_check();
+   void
+   countOverlapWithLocalPatches();
+   void
+   gatherGroupingCriteria_start();
+   bool
+   gatherGroupingCriteria_check();
+   //! @brief Form child groups from gathered overlap counts.
+   void
+   formChildGroups();
+   //! @brief Form child groups from local copy of all level boxes.
+   void
+   broadcastChildGroups_start();
+   bool
+   broadcastChildGroups_check();
+   void
+   runChildren_start();
+   bool
+   runChildren_check();
+   void
+   broadcastToDropouts_start();
+   bool
+   broadcastToDropouts_check();
+   void
+   createMappedBox();
+   void
+   eraseMappedBox();
+   //! @brief Compute new graph relationships touching local tag nodes.
+   void
+   computeNewNeighborhoodSets();
+   //! @brief Participants send new relationship data to graph node owners.
+   void
+   shareNewNeighborhoodSetsWithOwners();
+   //@}
+
+   //@{
+   //! @name Utilities for implementing algorithm
+
+   //! @brief Find the index of the owner in the group.
+   int
+   findOwnerInGroup(
+      int owner,
+      const VectorOfInts& group) const;
+   //! @brief Claim a unique tag from process's available tag pool.
+   void
+   claimMPITag();
+   /*!
+    * @brief Heuristically determine "best" tree degree for
+    * communication group size.
+    */
+   int
+   computeCommunicationTreeDegree(
+      int group_size) const;
+
+   bool
+   findZeroCutSwath(
+      int& cut_lo,
+      int& cut_hi,
+      const int dim);
+
+   void
+   cutAtLaplacian(
+      int& cut_pt,
+      const int dim);
+
+   int
+   getHistogramBufferSize(
+      const hier::Box& box) const;
+   int *
+   putHistogramToBuffer(
+      int* buffer);
+   int *
+   getHistogramFromBuffer(
+      int* buffer);
+   int *
+   putBoxToBuffer(
+      const hier::Box& box,
+      int* buffer) const;
+   int *
+   getBoxFromBuffer(
+      hier::Box& box,
+      int* buffer) const;
+   //! @brief Compute list of non-participating processes.
+   void
+   computeDropoutGroup(
+      const VectorOfInts& main_group,
+      const VectorOfInts& sub_group,
+      VectorOfInts& dropouts,
+      const int add_group) const;
+   BoxAcceptance
+   intToBoxAcceptance(
+      int i) const;
+   bool boxAccepted() const {
+      return bool(d_box_acceptance >= 0 &&
+                  d_box_acceptance % 2);
+   }
+   bool boxRejected() const {
+      return bool(d_box_acceptance >= 0 &&
+                  d_box_acceptance % 2 == 0);
+   }
+   bool boxHasNoTag() const {
+      return bool(d_box_acceptance == -1);
+   }
+   //@}
+
+   //@{
+   //! @name Utilities to help analysis and debugging
+   // tbox::List<BergerRigoutsosNode*>::Iterator
+   std::list<BergerRigoutsosNode *>::const_iterator
+   inRelaunchQueue(
+      BergerRigoutsosNode* node_ptr) const;
+   bool
+   inGroup(
+      VectorOfInts& group,
+      int rank = -1) const;
+   void
+   printState(
+      std::ostream& co) const;
+   void
+   printDendogramState(
+      std::ostream& co,
+      const std::string& border) const;
+   //@}
+
+
+   /*!
+    * @brief Initialize static objects and register shutdown routine.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   initializeCallback();
+
+   /*!
+    * @brief Method registered with ShutdownRegister to cleanup statics.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   finalizeCallback();
+
+   const tbox::Dimension d_dim;
+
+   /*!
+    * @brief Unique id in the binary dendogram.
+    *
+    * - To have succinct formula, the root dendogram node has d_pos of 1.
+    * - Parent id is d_pos/2
+    * - Left child id is 2*d_pos
+    * - Right child id is 2*d_pos+1
+    * - Generation number is ln(d_pos)
+    *
+    * This parameter is only used for debugging.
+    *
+    * The id of a node grows exponentially with each generation.
+    * If the position in the binary tree is too big to be represented
+    * by an integer, d_pos is set to -1 for a left child and -2 for a
+    * right child.
+    */
+   const int d_pos;
+
+   /*!
+    * @brief Common parameters shared with descendents and ancestors.
+    *
+    * Only the root of the tree allocates the common parameters.
+    * For all others, this pointer is set by the parent.
+    */
+   CommonParams* d_common;
+
+   //@{
+   /*!
+    * @name Tree-related data
+    */
+
+   //! @brief Parent node (or NULL for the root node).
+   BergerRigoutsosNode* d_parent;
+
+   //! @brief Left child.
+   BergerRigoutsosNode* d_lft_child;
+
+   //! @brief Right child.
+   BergerRigoutsosNode* d_rht_child;
+
+   //@}
+
+   //@{
+   /*!
+    * @name Data for one recursion of the BR algorithm
+    */
+
+   /*
+    * These parameters are listed roughly in order of usage.
+    */
+
+   hier::Box d_box;
+   int d_owner;
+
+   /*!
+    * @name Id of participating processes.
+    */
+   VectorOfInts d_group;
+
+   /*!
+    * @brief MPI tag for message within a dendogram node.
+    *
+    * The tag is determined by on the process that owns the parent
+    * when the parent decides to split its box.  The tags are broadcasted
+    * along with the children boxes.
+    */
+   int d_mpi_tag;
+
+   /*!
+    * @brief Overlap count with d_box.
+    */
+   int d_overlap;
+
+   /*!
+    * @brief Whether and how box is accepted.
+    *
+    * @see BoxAcceptance.
+    */
+   BoxAcceptance d_box_acceptance;
+
+   /*!
+    * @brief Histogram for all dimensions of box d_box.
+    *
+    * If local process is d_owner, this is initially the
+    * local histogram, then later, the reduced histogram.
+    * If not, it is just the local histogram.
+    */
+   VectorOfInts d_histogram[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   /*!
+    * @brief Number of tags in the candidate box.
+    */
+   int d_num_tags;
+
+   /*!
+    * @brief Distributed graph node corresponding to an accepted box.
+    *
+    * On the owner process, this belongs in a hier::MappedBoxLevel
+    * object.  On contributor nodes, this is used to identify the
+    * MappedBox assigned by the owner.  The MappedBox is important for
+    * computing neighbor data.
+    */
+   MappedBox d_mapped_box;
+
+   /*!
+    * @brief MappedBox iterator corresponding to an accepted box on
+    * the owner.
+    *
+    * This is relevant only on the owner, where the d_mapped_box is
+    * in a container.  On contributors, the graph node is non-local
+    * and stands alone.
+    */
+   MappedBoxSet::iterator d_mapped_box_iterator;
+
+   /*!
+    * @brief Name of wait phase when continueAlgorithm()
+    * exits before completion.
+    */
+   WaitPhase d_wait_phase;
+
+   //@}
+
+   //@{
+   /*!
+    * @name Lower-level parameters for communication.
+    */
+
+   //! @brief Buffer for organizing outgoing data.
+   VectorOfInts d_send_msg;
+   //! @brief Buffer for organizing incoming data.
+   VectorOfInts d_recv_msg;
+
+   tbox::AsyncCommGroup* d_comm_group;
+   //@}
+
+   //@{
+   //! @name Deubgging aid
+
+   /*!
+    * @brief Generation number.
+    *
+    * The generation number is the parent's generation number plus 1.
+    * The root has generation number 1.
+    */
+   const int d_generation;
+
+   //! @brief Number of times continueAlgorithm was called.
+   int d_n_cont;
+
+   //@}
+
+   /* 
+    * Static initialization and cleanup handler.
+    */
+
+   static tbox::StartupShutdownManager::Handler
+   s_initialize_handler;
+};
+
+}
+}
+
+#endif  // included_mesh::BergerRigoutsosNode
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/BoxGeneratorStrategy.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/BoxGeneratorStrategy.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,38 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Strategy interface for box generation routines. 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_BoxGeneratorStrategy_C
+#define included_mesh_BoxGeneratorStrategy_C
+
+#include "SAMRAI/mesh/BoxGeneratorStrategy.h"
+
+namespace SAMRAI {
+namespace mesh {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default constructor and destructor for BoxGeneratorStrategy.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+BoxGeneratorStrategy::BoxGeneratorStrategy()
+{
+}
+
+BoxGeneratorStrategy::~BoxGeneratorStrategy()
+{
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/BoxGeneratorStrategy.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/BoxGeneratorStrategy.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Strategy interface for box generation routines. 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_BoxGeneratorStrategy
+#define included_mesh_BoxGeneratorStrategy
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/MappedBoxLevel.h"
+#include "SAMRAI/hier/Connector.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace mesh {
+
+/**
+ * Class BoxGeneratorStrategy is an abstract base class that defines
+ * a Strategy pattern interface for operations to build boxes that cover a
+ * collection of tagged cells on a single AMR patch hierarchy level.
+ *
+ * @see hier::PatchLevel
+ */
+
+class BoxGeneratorStrategy:public tbox::DescribedClass
+{
+public:
+   /**
+    * Default constructor.
+    */
+   BoxGeneratorStrategy();
+
+   /**
+    * Virtual destructor.
+    */
+   virtual ~BoxGeneratorStrategy();
+
+   /*!
+    * @brief Cluster tags using the DLBG interfaces.
+    */
+   virtual void
+   findBoxesContainingTags(
+      hier::MappedBoxLevel& new_mapped_box_level,
+      hier::Connector& tag_to_new,
+      hier::Connector& new_to_tag,
+      const tbox::Pointer<hier::PatchLevel> tag_level,
+      const int tag_data_index,
+      const int tag_val,
+      const hier::Box& bound_box,
+      const hier::IntVector& min_box,
+      const double efficiency_tol,
+      const double combine_tol,
+      const hier::IntVector& max_gcw) const = 0;
+
+private:
+   // The following are not implemented:
+   BoxGeneratorStrategy(
+      const BoxGeneratorStrategy&);
+   void
+   operator = (
+      const BoxGeneratorStrategy&);
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/ChopAndPackLoadBalancer.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/ChopAndPackLoadBalancer.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1419 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Load balance routines for uniform and non-uniform workloads. 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_ChopAndPackLoadBalancer_C
+#define included_mesh_ChopAndPackLoadBalancer_C
+
+#define ChopAndPackLoadBalancer_MARKLOADFORPOSTPROCESSING
+
+#include "SAMRAI/mesh/ChopAndPackLoadBalancer.h"
+
+#include "SAMRAI/hier/BoxUtilities.h"
+#include "SAMRAI/hier/MappedBoxContainerUtils.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/mesh/BalanceUtilities.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellDataFactory.h"
+#include "SAMRAI/pdat/CellDoubleConstantRefine.h"
+#include "SAMRAI/hier/OverlapConnectorAlgorithm.h"
+#include "SAMRAI/xfer/RefineAlgorithm.h"
+#include "SAMRAI/xfer/RefineSchedule.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/List.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#include <cstdlib>
+#include <fstream>
+
+namespace SAMRAI {
+namespace mesh {
+
+tbox::StartupShutdownManager::Handler
+ChopAndPackLoadBalancer::s_initialize_handler(
+   ChopAndPackLoadBalancer::initializeCallback,
+   0,
+   0,
+   ChopAndPackLoadBalancer::finalizeCallback,
+   tbox::StartupShutdownManager::priorityTimers);
+
+tbox::Pointer<tbox::Timer> ChopAndPackLoadBalancer::t_load_balance_boxes;
+tbox::Pointer<tbox::Timer> ChopAndPackLoadBalancer::t_load_balance_boxes_remove_intersection;
+tbox::Pointer<tbox::Timer> ChopAndPackLoadBalancer::t_bin_pack_boxes;
+tbox::Pointer<tbox::Timer> ChopAndPackLoadBalancer::t_bin_pack_boxes_sort;
+tbox::Pointer<tbox::Timer> ChopAndPackLoadBalancer::t_bin_pack_boxes_pack;
+tbox::Pointer<tbox::Timer> ChopAndPackLoadBalancer::t_chop_boxes;
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructors and destructor for ChopAndPackLoadBalancer.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+ChopAndPackLoadBalancer::ChopAndPackLoadBalancer(
+   const tbox::Dimension& dim,
+   const std::string& name,
+   tbox::Pointer<tbox::Database> input_db):
+   d_dim(dim),
+   d_object_name(name),
+   d_processor_layout_specified(false),
+   d_processor_layout(d_dim),
+   d_ignore_level_box_union_is_single_box(false),
+   d_master_workload_data_id(-1),
+   d_master_max_workload_factor(1.0),
+   d_master_workload_tolerance(0.0),
+   d_master_bin_pack_method("SPATIAL")
+{
+   TBOX_ASSERT(!name.empty());
+
+   d_workload_data_id.resizeArray(0);
+   d_max_workload_factor.resizeArray(0);
+   d_workload_tolerance.resizeArray(0);
+   d_bin_pack_method.resizeArray(0);
+
+   getFromInput(input_db);
+}
+
+ChopAndPackLoadBalancer::ChopAndPackLoadBalancer(
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> input_db):
+   d_dim(dim),
+   d_object_name("ChopAndPackLoadBalancer"),
+   d_processor_layout_specified(false),
+   d_processor_layout(hier::IntVector::getZero(d_dim)),
+   d_master_workload_data_id(-1),
+   d_master_max_workload_factor(1.0),
+   d_master_workload_tolerance(0.0),
+   d_master_bin_pack_method("SPATIAL")
+
+{
+
+   d_workload_data_id.resizeArray(0);
+   d_max_workload_factor.resizeArray(0);
+   d_workload_tolerance.resizeArray(0);
+   d_bin_pack_method.resizeArray(0);
+
+   d_ignore_level_box_union_is_single_box = false;
+
+   getFromInput(input_db);
+}
+
+ChopAndPackLoadBalancer::~ChopAndPackLoadBalancer()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Accessory functions to get/set load balancing parameters.             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool ChopAndPackLoadBalancer::getLoadBalanceDependsOnPatchData(
+   int level_number) const
+{
+   return getWorkloadDataId(level_number) < 0 ? false : true;
+}
+
+void ChopAndPackLoadBalancer::setMaxWorkloadFactor(
+   double factor,
+   int level_number)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(factor > 0.0);
+#endif
+   if (level_number >= 0) {
+      int asize = d_max_workload_factor.getSize();
+      if (asize < level_number + 1) {
+         d_max_workload_factor.resizeArray(level_number + 1);
+         for (int i = asize; i < level_number - 1; i++) {
+            d_max_workload_factor[i] =
+               d_master_max_workload_factor;
+         }
+         d_max_workload_factor[level_number] = factor;
+      }
+   } else {
+      d_master_max_workload_factor = factor;
+      for (int ln = 0; ln < d_max_workload_factor.getSize(); ln++) {
+         d_max_workload_factor[ln] = d_master_max_workload_factor;
+      }
+   }
+}
+
+void ChopAndPackLoadBalancer::setWorkloadTolerance(
+   double tolerance,
+   int level_number)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(tolerance > 0.0);
+#endif
+   if (level_number >= 0) {
+      int asize = d_workload_tolerance.getSize();
+      if (asize < level_number + 1) {
+         d_workload_tolerance.resizeArray(level_number + 1);
+         for (int i = asize; i < level_number - 1; i++) {
+            d_workload_tolerance[i] =
+               d_master_workload_tolerance;
+         }
+         d_workload_tolerance[level_number] = tolerance;
+      }
+   } else {
+      d_master_workload_tolerance = tolerance;
+      for (int ln = 0; ln < d_workload_tolerance.getSize(); ln++) {
+         d_workload_tolerance[ln] = d_master_workload_tolerance;
+      }
+   }
+}
+
+void ChopAndPackLoadBalancer::setWorkloadPatchDataIndex(
+   int data_id,
+   int level_number)
+{
+   tbox::Pointer<pdat::CellDataFactory<double> > datafact =
+      hier::VariableDatabase::getDatabase()->getPatchDescriptor()->
+      getPatchDataFactory(data_id);
+   if (datafact.isNull()) {
+      TBOX_ERROR(
+         d_object_name << " error: "
+         << "\n   data_id " << data_id << " passed to "
+         << "setWorkloadPatchDataIndex()"
+         <<
+         " does not refer to cell-centered double patch data. " << std::endl);
+   }
+
+   if (level_number >= 0) {
+      int asize = d_workload_data_id.getSize();
+      if (asize < level_number + 1) {
+         d_workload_data_id.resizeArray(level_number + 1);
+         for (int i = asize; i < level_number - 1; i++) {
+            d_workload_data_id[i] =
+               d_master_workload_data_id;
+         }
+         d_workload_data_id[level_number] = data_id;
+      }
+   } else {
+      d_master_workload_data_id = data_id;
+      for (int ln = 0; ln < d_workload_data_id.getSize(); ln++) {
+         d_workload_data_id[ln] = d_master_workload_data_id;
+      }
+   }
+}
+
+void ChopAndPackLoadBalancer::setUniformWorkload(
+   int level_number)
+{
+   if (level_number >= 0) {
+      int asize = d_workload_data_id.getSize();
+      if (asize < level_number + 1) {
+         d_workload_data_id.resizeArray(level_number + 1);
+         for (int i = asize; i < level_number - 1; i++) {
+            d_workload_data_id[i] =
+               d_master_workload_data_id;
+         }
+         d_workload_data_id[level_number] = -1;
+      }
+   } else {
+      d_master_workload_data_id = -1;
+      for (int ln = 0; ln < d_workload_data_id.getSize(); ln++) {
+         d_workload_data_id[ln] = d_master_workload_data_id;
+      }
+   }
+}
+
+void ChopAndPackLoadBalancer::setBinPackMethod(
+   const std::string& method,
+   int level_number)
+{
+
+   if (!(method == "GREEDY" ||
+         method == "SPATIAL")) {
+      TBOX_ERROR(
+         d_object_name << " error: "
+         << "\n   String " << method
+         << " passed to setBinPackMethod()"
+         << " is not a valid method string identifier."
+         << std::endl);
+
+   }
+
+   if (level_number >= 0) {
+      int asize = d_bin_pack_method.getSize();
+      if (asize < level_number + 1) {
+         d_bin_pack_method.resizeArray(level_number + 1);
+         for (int i = asize; i < level_number - 1; i++) {
+            d_bin_pack_method[i] = d_master_bin_pack_method;
+         }
+         d_bin_pack_method[level_number] = method;
+      }
+   } else {
+      d_master_bin_pack_method = method;
+      for (int ln = 0; ln < d_bin_pack_method.getSize(); ln++) {
+         d_bin_pack_method[ln] = d_master_bin_pack_method;
+      }
+   }
+}
+
+void
+ChopAndPackLoadBalancer::setIgnoreLevelDomainIsSingleBox(
+   bool flag)
+{
+   d_ignore_level_box_union_is_single_box = flag;
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void ChopAndPackLoadBalancer::loadBalanceMappedBoxLevel(
+   hier::MappedBoxLevel& balance_mapped_box_level,
+   hier::Connector& balance_to_anchor,
+   hier::Connector& anchor_to_balance,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int level_number,
+   const hier::Connector& balance_to_attractor,
+   const hier::Connector& attractor_to_balance,
+   const hier::IntVector& min_size,
+   const hier::IntVector& max_size,
+   const hier::MappedBoxLevel& domain_mapped_box_level,
+   const hier::IntVector& bad_interval,
+   const hier::IntVector& cut_factor,
+   const tbox::RankGroup& rank_group) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS6(d_dim,
+      balance_mapped_box_level,
+      min_size,
+      max_size,
+      domain_mapped_box_level,
+      bad_interval,
+      cut_factor);
+   NULL_USE(balance_to_attractor);
+   NULL_USE(attractor_to_balance);
+   NULL_USE(rank_group);
+
+   hier::IntVector actual_max_size = max_size;
+   for (int d = 0; d < d_dim.getValue(); ++d) {
+      if (actual_max_size(d) < 0) {
+         actual_max_size(d) = tbox::MathUtilities<int>::getMax();
+      }
+   }
+
+   hier::MappedBoxLevel globalized_input_mapped_box_level(
+      balance_mapped_box_level);
+   globalized_input_mapped_box_level.setParallelState(
+      hier::MappedBoxLevel::GLOBALIZED);
+
+   hier::BoxList in_boxes;
+   hier::MappedBoxContainerUtils::convertMappedBoxSetToBoxList(
+      in_boxes,
+      globalized_input_mapped_box_level.getGlobalMappedBoxes());
+
+   hier::BoxArray physical_domain(d_dim);
+   hier::MappedBoxContainerUtils::convertMappedBoxSetToBoxArray(
+      physical_domain,
+      domain_mapped_box_level.getGlobalMappedBoxes());
+
+   hier::BoxArray out_boxes(d_dim);
+   hier::ProcessorMapping mapping;
+
+   loadBalanceBoxes(
+      out_boxes,
+      mapping,
+      in_boxes,
+      hierarchy,
+      level_number,
+      physical_domain,
+      balance_mapped_box_level.getRefinementRatio(),
+      min_size,
+      actual_max_size,
+      cut_factor,
+      bad_interval);
+
+   // Build up balance_mapped_box_level from old-style data.
+   balance_mapped_box_level.initialize(
+      balance_mapped_box_level.getRefinementRatio(),
+      balance_mapped_box_level.getMPI(),
+      hier::MappedBoxLevel::GLOBALIZED);
+   for (int i = 0; i < out_boxes.size(); ++i) {
+      hier::MappedBox node(out_boxes[i], hier::LocalId(i),
+                           mapping.getProcessorAssignment(i));
+      balance_mapped_box_level.addMappedBox(node);
+   }
+   // Reinitialize Connectors due to changed balance_mapped_box_level.
+   balance_to_anchor.initialize(
+      balance_mapped_box_level,
+      balance_to_anchor.getHead(),
+      balance_to_anchor.getConnectorWidth());
+   anchor_to_balance.initialize(
+      anchor_to_balance.getBase(),
+      balance_mapped_box_level,
+      anchor_to_balance.getConnectorWidth());
+   hier::OverlapConnectorAlgorithm oca;
+   oca.findOverlaps(balance_to_anchor);
+   oca.findOverlaps(anchor_to_balance, balance_mapped_box_level);
+
+   balance_mapped_box_level.setParallelState(hier::MappedBoxLevel::DISTRIBUTED);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * This main load balance routine performs either uniform or             *
+ * non-uniform load balancing operations on the given level depending    *
+ * on user specifications.   In either case, the goal is to produce      *
+ * a set of boxes and a mapping of those boxes to processors so that     *
+ * the workload on each processor is close to the average workload.      *
+ * The average workload is the total computational workload divided      *
+ * by the number of processors.  In the uniform load balance case        *
+ * (default), the workload is the number of cells in each box.  In the   *
+ * non-uniform case, the workload is computed using weight data on the   *
+ * grid hierarchy (i.e., a cell-centered double array on each patch.     *
+ *                                                                       *
+ * Typically, any box whose load is larger than the average is chopped.  *
+ * A user can prescribe a parameter (the 'max workload factor') to alter *
+ * average load used in this computation. Chopping is done using the     *
+ * BalanceUtilities::recursiveBisection()) method which is similar *
+ * to the Berger-Rigoutsos algorithm.                                    *
+ *                                                                       *
+ * Once the boxes are chopped into a collection os smaller boxes, they   *
+ * are assigned to processors by a bin packing algorithm.                *
+ *                                                                       *
+ * The algorithm is summarized as follows:
+ *                                                                       *
+ * 1) Compute the estimated workload associated with each box.  In the   *
+ *    uniform workload case, the load in each box region is the number   *
+ *    of cells in the region.  Otherwise, the workload is computed using *
+ *    patch data defined by the d_workload_data_id array set by the user.*
+ *                                                                       *
+ * 2) Compute the maximum workload allowed on any box.  This quantity is *
+ *    by default the total workload divided by the number of processors. *
+ *    The user may provide a maximum workload factor, either through the *
+ *    input file or through a member function, which can alter the       *
+ *    average workload used in this computation.                         *
+ *                                                                       *
+ * 3) Chop each box whose workload is more than the max allowed into a   *
+ *    smaller set of boxes.                                              *
+ *                                                                       *
+ * 4) Check constraints placed on the boxes by the problem - i.e.        *
+ *    verify boxes are within the maximum and minimum box size           *
+ *    constraints and maintain a correct cut factor.                     *
+ *                                                                       *
+ * 5) Sort boxes largest to smallest and form an array.  Also form an    *
+ *    array of the workloads associated with each box.                   *
+ *                                                                       *
+ * 6) Use a bin packing procedure to construct a processor mapping for   *
+ *    the set of boxes.                                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ChopAndPackLoadBalancer::loadBalanceBoxes(
+   hier::BoxArray& out_boxes,
+   hier::ProcessorMapping& mapping,
+   const hier::BoxList& in_boxes,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number,
+   const hier::BoxArray& physical_domain,
+   const hier::IntVector& ratio_to_hierarchy_level_zero,
+   const hier::IntVector& min_size,
+   const hier::IntVector& max_size,
+   const hier::IntVector& cut_factor,
+   const hier::IntVector& bad_interval) const
+{
+   t_load_balance_boxes->start();
+
+   TBOX_DIM_ASSERT_CHECK_ARGS5(ratio_to_hierarchy_level_zero,
+      min_size,
+      max_size,
+      cut_factor,
+      bad_interval);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT(level_number >= 0);
+   TBOX_ASSERT(physical_domain.getNumberOfBoxes() > 0);
+   TBOX_ASSERT(min_size > hier::IntVector::getZero(d_dim));
+   TBOX_ASSERT(max_size >= min_size);
+   TBOX_ASSERT(cut_factor > hier::IntVector::getZero(d_dim));
+   TBOX_ASSERT(bad_interval >= hier::IntVector::getZero(d_dim));
+#endif
+
+   /*
+    * This method assumes in_boxes is not empty and will fail
+    * if it is.  So shortcut it for empty in_boxes.
+    */
+   if (in_boxes.isEmpty()) {
+      out_boxes = hier::BoxArray(d_dim, 0);
+      return;
+   }
+
+   const tbox::SAMRAI_MPI &mpi(hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   /*
+    * If uniform load balancing is used and the level domain can be
+    * expressed as a single box, we can construct an optimal box
+    * layout across processors without more involved chopping operations.
+    *
+    * Otherwise, we chop each box individually to construct the new array
+    * of boxes and associated array of workloads based on either uniform
+    * or nonuniform workload estimates.
+    */
+
+   int wrk_indx = getWorkloadDataId(level_number);
+
+   tbox::Array<double> workloads;
+
+   if ((wrk_indx < 0) || (hierarchy->getNumberOfLevels() == 0)) {
+
+      if (!d_ignore_level_box_union_is_single_box) {
+         hier::Box bbox = in_boxes.getBoundingBox();
+         hier::BoxList difference(bbox);
+         t_load_balance_boxes_remove_intersection->start();
+         difference.removeIntersections(in_boxes);
+         t_load_balance_boxes_remove_intersection->stop();
+
+         if (difference.isEmpty()) {
+
+            t_chop_boxes->start();
+            chopUniformSingleBox(out_boxes,
+               workloads,
+               bbox,
+               min_size,
+               max_size,
+               cut_factor,
+               bad_interval,
+                                 physical_domain,
+                                 mpi);
+            t_chop_boxes->stop();
+
+         } else {
+
+            t_chop_boxes->start();
+            chopBoxesWithUniformWorkload(out_boxes,
+               workloads,
+               in_boxes,
+               hierarchy,
+               level_number,
+               min_size,
+               max_size,
+               cut_factor,
+               bad_interval,
+                                         physical_domain,
+                                         mpi);
+            t_chop_boxes->stop();
+
+         }
+      } else {
+         t_chop_boxes->start();
+         chopBoxesWithUniformWorkload(out_boxes,
+            workloads,
+            in_boxes,
+            hierarchy,
+            level_number,
+            min_size,
+            max_size,
+            cut_factor,
+            bad_interval,
+            physical_domain,
+                                         mpi);
+         t_chop_boxes->stop();
+      }
+
+   } else {
+
+      t_chop_boxes->start();
+      chopBoxesWithNonuniformWorkload(out_boxes,
+         workloads,
+         in_boxes,
+         hierarchy,
+         level_number,
+         ratio_to_hierarchy_level_zero,
+         wrk_indx,
+         min_size,
+         max_size,
+         cut_factor,
+         bad_interval,
+                                      physical_domain,
+                                      mpi);
+      t_chop_boxes->stop();
+
+   }
+
+#if 0
+   /*
+    * Assertion check for additional debugging - make sure new boxes
+    * satisfy min size, cut_factor, bad_interval, and physical domain
+    * constraints.
+    */
+#ifdef DEBUG_CHECK_ASSERTIONS
+   const int nboxes = out_boxes.getNumberOfBoxes();
+   for (int ib = 0; ib < nboxes; ib++) {
+      hier::BoxUtilities::checkBoxConstraints(out_boxes.getBox(ib),
+         min_size,
+         cut_factor,
+         bad_interval,
+         physical_domain);
+
+   }
+#endif
+#endif
+
+   /*
+    * Generate mapping of boxes to processors using workload estimates.
+    * Note boxes in array may be reordered during this operation.
+    */
+
+   binPackBoxes(out_boxes,
+      mapping,
+      workloads,
+      getBinPackMethod(level_number));
+
+   t_load_balance_boxes->stop();
+
+#if 0
+   /*
+    * For debugging, output load balance statistics
+    * (assuming uniform load).
+    */
+   tbox::Array<double> procloads(tbox::SAMRAI_MPI::getNodes());
+   for (int i = 0; i < procloads.size(); ++i) {
+      procloads[i] = 0;
+   }
+   for (int i = 0; i < out_boxes.size(); ++i) {
+      int p = mapping.getProcessorAssignment(i);
+      procloads[p] += out_boxes(i).size();
+   }
+   tbox::plog << "ChopAndPackLoadBalancer results (after):\n";
+   reportLoadBalance(procloads);
+#endif
+
+#ifdef ChopAndPackLoadBalancer_MARKLOADFORPOSTPROCESSING
+   // Performance: Output loads for global postprocessing.
+   const tbox::Array<int>& local_indices = mapping.getLocalIndices();
+   double local_load = 0;
+   for (int i = 0; i < local_indices.size(); ++i) {
+      local_load += out_boxes[local_indices[i]].size();
+   }
+   this->markLoadForPostprocessing(mpi.getSize(),
+      local_load,
+      local_indices.size());
+#endif
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private function that chops a single box into a set of boxes          *
+ * that will map to the array of processors as uniformly as possible.    *
+ * The routine assumes a spatially-uniform workload distribution.        *
+ * Note that no error checking is done.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ChopAndPackLoadBalancer::chopUniformSingleBox(
+   hier::BoxArray& out_boxes,
+   tbox::Array<double>& out_workloads,
+   const hier::Box& in_box,
+   const hier::IntVector& min_size,
+   const hier::IntVector& max_size,
+   const hier::IntVector& cut_factor,
+   const hier::IntVector& bad_interval,
+   const hier::BoxArray& physical_domain,
+   const tbox::SAMRAI_MPI &mpi) const
+{
+
+   TBOX_DIM_ASSERT_CHECK_ARGS4(min_size, max_size, cut_factor, bad_interval);
+
+   /*
+    * Determine processor layout that corresponds to box dimensions.
+    */
+
+   hier::IntVector processor_distribution(d_dim);
+   if (d_processor_layout_specified) {
+      processor_distribution = d_processor_layout;
+   } else {
+      BalanceUtilities::computeDomainDependentProcessorLayout(
+         processor_distribution,
+         mpi.getSize(),
+         in_box);
+   }
+
+   /*
+    * The ideal box size will be the dimensions of the input box divided
+    * by the number of processors in each direction.  Compute this
+    * ideal size and then adjust as necessary to fit within min/max size
+    * constraints.
+    */
+
+   hier::IntVector ideal_box_size(d_dim);
+   for (int i = 0; i < d_dim.getValue(); i++) {
+      ideal_box_size(i) = (int)ceil((double)in_box.numberCells(
+               i) / (double)processor_distribution(i));
+
+      ideal_box_size(i) = (ideal_box_size(i) > max_size(i) ?
+                           max_size(i) : ideal_box_size(i));
+      ideal_box_size(i) = (ideal_box_size(i) < min_size(i) ?
+                           min_size(i) : ideal_box_size(i));
+   }
+
+   /*
+    * Chop the single input box into a set of smaller boxes using the
+    * ideal_box_size as the maximum size of each of the smaller boxes.
+    */
+
+   hier::BoxList tmp_box_list(in_box);
+
+   hier::BoxUtilities::chopBoxes(tmp_box_list,
+      ideal_box_size,
+      min_size,
+      cut_factor,
+      bad_interval,
+      physical_domain);
+
+   /*
+    * Set output box array to list of chopped boxes and set workload array.
+    */
+
+   out_boxes = tmp_box_list;
+
+   const int nboxes = out_boxes.getNumberOfBoxes();
+   out_workloads.resizeArray(nboxes);
+   for (int ib = 0; ib < nboxes; ib++) {
+      out_workloads[ib] = (double)(out_boxes[ib].size());
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private function that chops boxes on a list into another list of      *
+ * boxes all of which have approximately or less than an average         *
+ * workload estimate.  The routine assumes a spatially-uniform           *
+ * workload distribution.   Note that no error checking is done.         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ChopAndPackLoadBalancer::chopBoxesWithUniformWorkload(
+   hier::BoxArray& out_boxes,
+   tbox::Array<double>& out_workloads,
+   const hier::BoxList& in_boxes,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number,
+   const hier::IntVector& min_size,
+   const hier::IntVector& max_size,
+   const hier::IntVector& cut_factor,
+   const hier::IntVector& bad_interval,
+   const hier::BoxArray& physical_domain,
+   const tbox::SAMRAI_MPI &mpi) const
+{
+   NULL_USE(hierarchy);
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS5(d_dim,
+      *hierarchy,
+      min_size,
+      max_size,
+      cut_factor,
+      bad_interval);
+
+   /*
+    * Create copy of input box list to prevent changing it.
+    */
+
+   hier::BoxList tmp_in_boxes_list(in_boxes);
+
+   /*
+    * Chop any boxes in input box list that are larger than max box size
+    * if possible.
+    */
+
+   hier::BoxUtilities::chopBoxes(tmp_in_boxes_list,
+      max_size,
+      min_size,
+      cut_factor,
+      bad_interval,
+      physical_domain);
+
+   double total_work = 0.0;
+   for (hier::BoxList::Iterator ib0(tmp_in_boxes_list); ib0; ib0++) {
+      total_work += ib0().size();
+   }
+
+   double work_factor = getMaxWorkloadFactor(level_number);
+   double average_work = work_factor * total_work / mpi.getSize();
+
+   hier::BoxList tmp_box_list;
+   tbox::List<double> tmp_work_list;
+   BalanceUtilities::recursiveBisectionUniform(tmp_box_list,
+      tmp_work_list,
+      tmp_in_boxes_list,
+      average_work,
+      getWorkloadTolerance(level_number),
+      min_size,
+      cut_factor,
+      bad_interval,
+      physical_domain);
+
+   if (tmp_box_list.getNumberOfItems() != tmp_work_list.getNumberOfItems()) {
+      TBOX_ERROR(
+         d_object_name << ": "
+         <<
+         "Number of boxes generated != number of workload values generated."
+         << std::endl);
+   }
+
+   /*
+    * Set output box array to list of chopped boxes and set workload array.
+    */
+
+   out_boxes = tmp_box_list;
+
+   out_workloads.resizeArray(out_boxes.getNumberOfBoxes());
+   int i = 0;
+   for (tbox::List<double>::Iterator il(tmp_work_list); il; il++) {
+      out_workloads[i] = il();
+      i++;
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private function that chops boxes on a list into another list of      *
+ * boxes all of which have approximately or less than an average         *
+ * workload estimate.  The routine assumes a spatially-nonuniform        *
+ * workload distribution.  Note that no error checking is done.          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ChopAndPackLoadBalancer::chopBoxesWithNonuniformWorkload(
+   hier::BoxArray& out_boxes,
+   tbox::Array<double>& out_workloads,
+   const hier::BoxList& in_boxes,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number,
+   const hier::IntVector& ratio_to_hierarchy_level_zero,
+   int wrk_indx,
+   const hier::IntVector& min_size,
+   const hier::IntVector& max_size,
+   const hier::IntVector& cut_factor,
+   const hier::IntVector& bad_interval,
+   const hier::BoxArray& physical_domain,
+   const tbox::SAMRAI_MPI &mpi) const
+{
+
+   TBOX_DIM_ASSERT_CHECK_ARGS5(ratio_to_hierarchy_level_zero,
+      min_size,
+      max_size,
+      cut_factor,
+      bad_interval);
+
+   /*
+    * Create copy of input box list to prevent changing it.
+    */
+
+   hier::BoxList tmp_in_boxes_list(in_boxes);
+
+   hier::BoxUtilities::chopBoxes(tmp_in_boxes_list,
+      max_size,
+      min_size,
+      cut_factor,
+      bad_interval,
+      physical_domain);
+
+   /*
+    * Create temporary patch level from in_boxes, distributed using simple
+    * uniform workload estimate.  Then, fill the patch data on the level
+    * corresponding to the non-uniform workload estimate.  Next, accumulate
+    * the total work for the set of boxes.
+    */
+
+   hier::BoxArray tmp_level_boxes(d_dim, tmp_in_boxes_list);
+
+   const int num_tmp_patches = tmp_level_boxes.getNumberOfBoxes();
+   tbox::Array<double> tmp_level_workloads(num_tmp_patches);
+   for (int i = 0; i < num_tmp_patches; i++) {
+      tmp_level_workloads[i] = tmp_level_boxes[i].size();
+   }
+
+   hier::ProcessorMapping tmp_level_mapping;
+
+   binPackBoxes(tmp_level_boxes,
+      tmp_level_mapping,
+      tmp_level_workloads,
+      "GREEDY");
+
+   tbox::Pointer<hier::MappedBoxLevel> tmp_mapped_box_level(
+      new hier::MappedBoxLevel(ratio_to_hierarchy_level_zero,
+                               mpi,
+         hier::MappedBoxLevel::GLOBALIZED));
+   for (int i = 0; i < tmp_level_boxes.size(); ++i) {
+      hier::MappedBox node(tmp_level_boxes[i], hier::LocalId(i),
+                           tmp_level_mapping.getProcessorAssignment(i));
+      tmp_mapped_box_level->addMappedBox(node);
+   }
+
+   tbox::Pointer<hier::PatchLevel> tmp_level(
+      new hier::PatchLevel(*tmp_mapped_box_level,
+         hierarchy->getGridGeometry(),
+         hierarchy->getPatchDescriptor()));
+
+   tmp_level->allocatePatchData(wrk_indx);
+
+   xfer::RefineAlgorithm fill_work_algorithm(d_dim);
+
+   tbox::Pointer<xfer::RefineOperator> work_refine_op(
+      new pdat::CellDoubleConstantRefine(d_dim));
+
+   fill_work_algorithm.registerRefine(wrk_indx,
+      wrk_indx,
+      wrk_indx,
+      work_refine_op);
+
+   tbox::Pointer<hier::PatchLevel> current_level(NULL);
+   if (level_number <= hierarchy->getFinestLevelNumber()) {
+      current_level = hierarchy->getPatchLevel(level_number);
+   }
+
+   tbox::Pointer<hier::PatchLevel>
+   coarse_level = hierarchy->getPatchLevel(level_number - 1);
+   hier::Connector tmp_to_current(
+      *tmp_mapped_box_level,
+      *current_level->getMappedBoxLevel(),
+      hier::IntVector::getZero(d_dim));
+   hier::Connector current_to_tmp(
+      *current_level->getMappedBoxLevel(),
+      *tmp_mapped_box_level,
+      hier::IntVector::getZero(d_dim));
+   hier::Connector tmp_to_coarse(
+      *tmp_mapped_box_level,
+      *coarse_level->getMappedBoxLevel(),
+      hier::IntVector::getZero(d_dim));
+   hier::Connector coarse_to_tmp(
+      *coarse_level->getMappedBoxLevel(),
+      *tmp_mapped_box_level,
+      hier::IntVector::getZero(d_dim));
+   hier::OverlapConnectorAlgorithm oca;
+   oca.findOverlaps(tmp_to_current);
+   oca.findOverlaps(current_to_tmp);
+   oca.findOverlaps(tmp_to_coarse);
+   oca.findOverlaps(coarse_to_tmp);
+   fill_work_algorithm.createSchedule(tmp_level,
+      current_level,
+      level_number - 1,
+      hierarchy,
+      (xfer::RefinePatchStrategy *)NULL)->fillData(0.0);
+
+   double local_work = 0;
+   for (hier::PatchLevel::Iterator ip(tmp_level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      double patch_work =
+         BalanceUtilities::computeNonUniformWorkload(patch,
+            wrk_indx,
+            patch->getBox());
+
+      local_work += patch_work;
+   }
+
+   double total_work = local_work;
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&total_work, 1, MPI_SUM);
+   }
+
+   double work_factor = getMaxWorkloadFactor(level_number);
+   double average_work = work_factor * total_work / mpi.getSize();
+
+   hier::BoxList tmp_box_list;
+   tbox::List<double> tmp_work_list;
+   BalanceUtilities::recursiveBisectionNonuniform(tmp_box_list,
+      tmp_work_list,
+      tmp_level,
+      wrk_indx,
+      average_work,
+      getWorkloadTolerance(level_number),
+      min_size,
+      cut_factor,
+      bad_interval,
+      physical_domain);
+
+   tmp_level->deallocatePatchData(wrk_indx);
+   tmp_level.setNull();
+
+   if (tmp_box_list.getNumberOfItems() != tmp_work_list.getNumberOfItems()) {
+      TBOX_ERROR(
+         d_object_name << ": "
+         <<
+         "Number of boxes generated != number of workload values generated."
+         << std::endl);
+   }
+
+   /*
+    * Set local box array to list of chopped boxes and set local workload array.
+    */
+
+   hier::BoxArray local_out_boxes(d_dim, tmp_box_list);
+
+   tbox::Array<double> local_out_workloads(local_out_boxes.getNumberOfBoxes());
+
+   int i = 0;
+   for (tbox::List<double>::Iterator il(tmp_work_list); il; il++) {
+      local_out_workloads[i] = il();
+      i++;
+   }
+
+   /*
+    * Gather local box and work arrays so that each processor has a copy.
+    */
+   exchangeBoxArraysAndWeightArrays(local_out_boxes,
+                                    local_out_workloads,
+                                    out_boxes,
+                                    out_workloads,
+                                    mpi);
+
+}
+
+/*
+ *************************************************************************
+ *
+ * all-to-all exchange of box arrays and associated weights
+ *
+ *************************************************************************
+ */
+void ChopAndPackLoadBalancer::exchangeBoxArraysAndWeightArrays(
+   const hier::BoxArray& box_array_in,
+   const tbox::Array<double>& weights_in,
+   hier::BoxArray& box_array_out,
+   tbox::Array<double>& weights_out,
+   const tbox::SAMRAI_MPI &mpi) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(box_array_in, box_array_out);
+   TBOX_ASSERT(box_array_in.getNumberOfBoxes() == weights_in.getSize());
+
+   const tbox::Dimension& dim(box_array_in.getDim());
+
+   /*
+    * allocate send and receive buffers, and set array sizes
+    * for the output arrays.
+    */
+   int size_in = box_array_in.getNumberOfBoxes();
+   int size_out = size_in;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&size_in, &size_out, 1, MPI_INT, MPI_SUM);
+   }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (size_out <= 0) {
+      TBOX_ERROR("ChopAndPackLoadBalancer::exchangeBoxArraysAndWeightArrays() error"
+         << "\n All box arrays have zero length!" << std::endl);
+   }
+#endif
+
+   int buf_size_in = size_in * dim.getValue() * 2;
+   int buf_size_out = size_out * dim.getValue() * 2;
+
+   box_array_out.resizeBoxArray(size_out);
+   weights_out.resizeArray(size_out);
+
+   tbox::Array<int> buf_in(buf_size_in);
+   tbox::Array<int> buf_out(buf_size_out);
+
+   int* buf_in_ptr = (int *)NULL;
+   int* buf_out_ptr = (int *)NULL;
+   const double* wgts_in_ptr = (const double *)NULL;
+   double* wgts_out_ptr = (double *)NULL;
+
+   if (size_in > 0) {
+      buf_in_ptr = buf_in.getPointer();
+      wgts_in_ptr = weights_in.getPointer();
+   }
+   if (size_out > 0) {
+      wgts_out_ptr = weights_out.getPointer();
+      buf_out_ptr = buf_out.getPointer();
+   }
+
+   /*
+    * populate the buffers with data for sending
+    */
+   int offset = 0;
+   for (int x = 0; x < size_in; ++x) {
+      for (int i = 0; i < dim.getValue(); ++i) {
+         buf_in_ptr[offset++] = box_array_in[x].lower(i);
+         buf_in_ptr[offset++] = box_array_in[x].upper(i);
+      }
+   }
+
+   /*
+    * exchange the data
+    */
+   std::vector<int> counts(mpi.getSize());
+   mpi.Allgather(&size_in, 1, MPI_INT, &counts[0], 1, MPI_INT);
+   std::vector<int> displs(mpi.getSize());
+   displs[0] = 0;
+   size_t total_count = counts[0];
+   for (size_t i = 1; i < counts.size(); ++i) {
+      displs[i] = displs[i - 1] + counts[i - 1];
+      total_count += counts[i];
+   }
+   TBOX_ASSERT(static_cast<unsigned int>(weights_out.size()) == total_count);
+
+   mpi.Allgatherv((void *)wgts_in_ptr,
+      size_in,
+      MPI_INT,
+      wgts_out_ptr,
+      &counts[0],
+      &displs[0],
+      MPI_INT);
+
+   const int ints_per_box = dim.getValue() * 2;
+   for (size_t i = 0; i < displs.size(); ++i) {
+      counts[i] *= ints_per_box;
+      displs[i] *= ints_per_box;
+   }
+   mpi.Allgatherv(buf_in_ptr, buf_size_in, MPI_INT, buf_out_ptr, &counts[0], &displs[0], MPI_INT);
+
+   /*
+    * assemble the output array of boxes
+    */
+   offset = 0;
+   for (int b = 0; b < size_out; ++b) {
+      for (int j = 0; j < dim.getValue(); ++j) {
+         box_array_out[b].lower(j) = buf_out_ptr[offset++];
+         box_array_out[b].upper(j) = buf_out_ptr[offset++];
+      }
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print out all attributes of class instance for debugging.             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ChopAndPackLoadBalancer::printClassData(
+   std::ostream& os) const
+{
+   os << "\nChopAndPackLoadBalancer::printClassData..." << std::endl;
+   os << "\nChopAndPackLoadBalancer: this = "
+      << (ChopAndPackLoadBalancer *)this << std::endl;
+   os << "d_object_name = " << d_object_name << std::endl;
+   os << "d_processor_layout_specified = "
+      << d_processor_layout_specified << std::endl;
+   os << "d_processor_layout = "
+      << d_processor_layout << std::endl;
+   os << "d_master_workload_data_id = "
+      << d_master_workload_data_id << std::endl;
+   os << "d_master_max_workload_factor = "
+      << d_master_max_workload_factor << std::endl;
+   os << "d_workload_tolerance = "
+      << d_master_workload_tolerance << std::endl;
+   os << "d_master_bin_pack_method = "
+      << d_master_bin_pack_method << std::endl;
+
+   int ln;
+
+   os << "d_workload_data_id..." << std::endl;
+   for (ln = 0; ln < d_workload_data_id.getSize(); ln++) {
+      os << "    d_workload_data_id[" << ln << "] = "
+      << d_workload_data_id[ln] << std::endl;
+   }
+   os << "d_max_workload_factor..." << std::endl;
+   for (ln = 0; ln < d_max_workload_factor.getSize(); ln++) {
+      os << "    d_max_workload_factor[" << ln << "] = "
+      << d_max_workload_factor[ln] << std::endl;
+   }
+   os << "d_workload_tolerance..." << std::endl;
+   for (ln = 0; ln < d_workload_tolerance.getSize(); ln++) {
+      os << "    d_workload_tolerance[" << ln << "] = "
+      << d_workload_tolerance[ln] << std::endl;
+   }
+   os << "d_bin_pack_method..." << std::endl;
+   for (ln = 0; ln < d_bin_pack_method.getSize(); ln++) {
+      os << "    d_bin_pack_method[" << ln << "] = "
+      << d_bin_pack_method[ln] << std::endl;
+   }
+   os << "d_ignore_level_box_union_is_single_box = "
+      << d_ignore_level_box_union_is_single_box << std::endl;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Read values (described in the class header) from input database.      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ChopAndPackLoadBalancer::getFromInput(
+   tbox::Pointer<tbox::Database> db)
+{
+
+   if (!db.isNull()) {
+
+      const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+      d_master_bin_pack_method =
+         db->getStringWithDefault("bin_pack_method",
+            d_master_bin_pack_method);
+      if (!(d_master_bin_pack_method == "GREEDY" ||
+            d_master_bin_pack_method == "SPATIAL")) {
+         TBOX_WARNING(
+            d_object_name << ": "
+            << "Unknown 'bin_pack_method' "
+            << d_master_bin_pack_method
+            <<
+            " found in input. \nDefault 'GREEDY' will be used." << std::endl);
+         d_master_bin_pack_method = "GREEDY";
+      }
+
+      if (db->keyExists("max_workload_factor")) {
+         d_max_workload_factor = db->getDoubleArray("max_workload_factor");
+         for (int i = 0; i < d_max_workload_factor.getSize(); i++) {
+            if (d_max_workload_factor[i] < 0.0) {
+               TBOX_ERROR(
+                  d_object_name
+                  << "Max workload values should be greater than 0");
+            }
+         }
+
+         // Use last entry in array as value for finer levels
+         d_master_max_workload_factor =
+            d_max_workload_factor[d_max_workload_factor.getSize() - 1];
+      }
+
+      if (db->keyExists("workload_tolerance")) {
+         d_workload_tolerance = db->getDoubleArray("workload_tolerance");
+         for (int i = 0; i < d_workload_tolerance.getSize(); i++) {
+            if (d_workload_tolerance[i] < 0.0 || d_workload_tolerance[i] >=
+                1.0) {
+               TBOX_ERROR(
+                  d_object_name
+                  << "Workload tolerance should be >= 0 and < 1.0");
+            }
+         }
+
+         // Use last entry in array as value for finer levels
+         d_master_workload_tolerance =
+            d_workload_tolerance[d_workload_tolerance.getSize() - 1];
+      }
+
+      d_ignore_level_box_union_is_single_box =
+         db->getBoolWithDefault("ignore_level_box_union_is_single_box",
+            d_ignore_level_box_union_is_single_box);
+
+      d_processor_layout_specified = false;
+      int temp_processor_layout[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      if (db->keyExists("processor_layout")) {
+         db->getIntegerArray("processor_layout", temp_processor_layout, d_dim.getValue());
+
+         /* consistency check */
+         int totprocs = 1;
+         for (int n = 0; n < d_dim.getValue(); n++) {
+            totprocs *= temp_processor_layout[n];
+         }
+
+         if (totprocs != mpi.getSize()) {
+            TBOX_WARNING(
+               d_object_name << ": "
+               <<
+               "Input values for 'processor_layout' are inconsistent with"
+               <<
+               "\nnumber of processors.  Processor layout information will"
+               << "\nbe generated when needed."
+               << std::endl);
+         } else {
+            for (int n = 0; n < d_dim.getValue(); n++) {
+               d_processor_layout(n) = temp_processor_layout[n];
+            }
+            d_processor_layout_specified = true;
+         }
+      }
+
+      d_ignore_level_box_union_is_single_box =
+         db->getBoolWithDefault("ignore_level_box_union_is_single_box",
+            d_ignore_level_box_union_is_single_box);
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private utility function to map boxes to processors.                  *
+ * Note that no error checking is done.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ChopAndPackLoadBalancer::binPackBoxes(
+   hier::BoxArray& boxes,
+   hier::ProcessorMapping& mapping,
+   tbox::Array<double>& workloads,
+   const std::string& bin_pack_method) const
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   t_bin_pack_boxes->start();
+   /*
+    * Sort boxes in order of highest to lowest workload and assign
+    * boxes to processors by bin packing.
+    */
+   t_bin_pack_boxes_sort->start();
+   BalanceUtilities::sortDescendingBoxWorkloads(boxes,
+      workloads);
+   t_bin_pack_boxes_sort->stop();
+
+   /*
+    * Finally, assign boxes to processors by bin packing.
+    */
+
+   int num_procs = mpi.getSize();
+
+   t_bin_pack_boxes_pack->start();
+   if (bin_pack_method == "SPATIAL") {
+
+      (void)BalanceUtilities::spatialBinPack(mapping,
+         workloads,
+         boxes,
+         num_procs);
+
+   } else if (bin_pack_method == "GREEDY") {
+
+      (void)BalanceUtilities::binPack(mapping,
+         workloads,
+         num_procs);
+
+   } else {
+
+      TBOX_ERROR(
+         d_object_name << ": "
+         << "Unknown bin pack method "
+         << bin_pack_method << " found." << std::endl);
+
+   }
+   t_bin_pack_boxes_pack->stop();
+
+   t_bin_pack_boxes->stop();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private utility functions to determine parameter values for level.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int ChopAndPackLoadBalancer::getWorkloadDataId(
+   int level_number) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(level_number >= 0);
+#endif
+   int wrk_id = (level_number < d_workload_data_id.getSize() ?
+                 d_workload_data_id[level_number] :
+                 d_master_workload_data_id);
+
+   return wrk_id;
+}
+
+double ChopAndPackLoadBalancer::getMaxWorkloadFactor(
+   int level_number) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(level_number >= 0);
+#endif
+   double factor = (level_number < d_max_workload_factor.getSize() ?
+                    d_max_workload_factor[level_number] :
+                    d_master_max_workload_factor);
+
+   return factor;
+}
+
+double ChopAndPackLoadBalancer::getWorkloadTolerance(
+   int level_number) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(level_number >= 0);
+#endif
+   double tolerance = (level_number < d_workload_tolerance.getSize() ?
+                       d_workload_tolerance[level_number] :
+                       d_master_workload_tolerance);
+
+   return tolerance;
+}
+
+std::string ChopAndPackLoadBalancer::getBinPackMethod(
+   int level_number) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(level_number >= 0);
+#endif
+   std::string factor = (level_number < d_bin_pack_method.getSize() ?
+                         d_bin_pack_method[level_number] :
+                         d_master_bin_pack_method);
+
+   return factor;
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void ChopAndPackLoadBalancer::initializeCallback()
+{
+   t_load_balance_boxes = tbox::TimerManager::getManager()->
+      getTimer("mesh::ChopAndPackLoadBalancer::loadBalanceBoxes()");
+   t_load_balance_boxes_remove_intersection =
+      tbox::TimerManager::getManager()->
+      getTimer(
+         "mesh::ChopAndPackLoadBalancer::loadBalanceBoxes()_remove_intersection");
+   t_bin_pack_boxes = tbox::TimerManager::getManager()->
+      getTimer("mesh::ChopAndPackLoadBalancer::binPackBoxes()");
+   t_bin_pack_boxes_sort = tbox::TimerManager::getManager()->
+      getTimer("mesh::ChopAndPackLoadBalancer::binPackBoxes()_sort");
+   t_bin_pack_boxes_pack = tbox::TimerManager::getManager()->
+      getTimer("mesh::ChopAndPackLoadBalancer::binPackBoxes()_pack");
+   t_chop_boxes = tbox::TimerManager::getManager()->
+      getTimer("mesh::ChopAndPackLoadBalancer::chop_boxes");
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void ChopAndPackLoadBalancer::finalizeCallback()
+{
+   t_load_balance_boxes.setNull();
+   t_load_balance_boxes_remove_intersection.setNull();
+   t_bin_pack_boxes.setNull();
+   t_bin_pack_boxes_sort.setNull();
+   t_bin_pack_boxes_pack.setNull();
+   t_chop_boxes.setNull();
+}
+
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/ChopAndPackLoadBalancer.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/ChopAndPackLoadBalancer.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,625 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Load balance routines for uniform and non-uniform workloads. 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_ChopAndPackLoadBalancer
+#define included_mesh_ChopAndPackLoadBalancer
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/mesh/LoadBalanceStrategy.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Timer.h"
+
+namespace SAMRAI {
+namespace mesh {
+
+/*!
+ * @brief Class ChopAndPackLoadBalancer provides load balancing routines for
+ * AMR hierarchy levels based on either uniform or non-uniform
+ * workload estimates.
+ *
+ * This class is derived from the abstract base class
+ * LoadBalanceStrategy; thus, it is a concrete implementation of
+ * the load balance Strategy pattern interface.
+ *
+ * Load balancing operations, whether based on uniform or non-uniform
+ * workloads, can be specified for each level in the hierarchy
+ * individually or for the entire hierarchy.  Basic load balance
+ * parameters can be set from an input file, while more complex
+ * behavior can be set at run-time via member functions, including
+ * dynamic reconfiguration of balance operations.
+ *
+ * Required input keys: NONE
+ *
+ * Optional input keys, data types, and defaults:
+ *
+ *    - \b processor_layout Integer array (length = DIM) indicating
+ *    the way in which the domain should be chopped when a level can
+ *    be described as a single parallelepiped region (i.e., a box). If
+ *    no input value is provided, or if the product of these entries
+ *    does not equal the number of processors, then the processor
+ *    layout computed will be computed from the dimensions of the
+ *    domain box and the number of processors in use if necessary.
+ *
+ *       NOTE: The largest patch size constraint specified in the
+ *       input for the GriddingAlgorithm object takes precedence
+ *       over the processor layout specification.  That is, if the
+ *       processor layout indicates that the resulting level patches
+ *       would be larger than the largest patch size, the layout will
+ *       be ignored and boxes obeying the patch size constrint will
+ *       result.
+ *
+ *    - \b bin_pack_method String value indicating the type of bin
+ *    packing to use to map patches to processors.  Currently, two
+ *    options are supported: "GREEDY", "SPATIAL". The "GREEDY" process
+ *    simply maps each patch (box) to the first processor (bin), in
+ *    ascending tbox::MPI process number, whose difference between the
+ *    average workload and its current workload is less than the
+ *    workload of the patch in question. The "SPATIAL" process first
+ *    constructs an ordering of the patches (boxes) by passing a
+ *    Morton-type curve through the center of each box.  Then, it
+ *    attempts to map the patches to processors by assigning patches
+ *    that are near each other on the curve to the same processor.  If
+ *    no input value is specified, a default value of "SPATIAL" is
+ *    used.  The input value will be used for all levels and will
+ *    remain so until reset via the setBinPackMethod() member function
+ *    below.
+ *
+ *    - \b max_workload_factor Double array (length = number of
+ *    levels) used during the box-splitting phase to determine which
+ *    boxes to split.  Specifically, boxes will be chopped if their
+ *    estimated workload is greater than max_workload_factor * A,
+ *    where A is the average workload (i.e., A = (total work)/(nume
+ *    processors)).  The default value for this parameter is 1.0. It
+ *    can be set to any value greater than zero, either in the input
+ *    file or via the setMaxWorkloadFactor() member function below.
+ *
+ *    Example input:
+ *
+ *       max_workload_factor = 0.8
+ *
+ *       Sets the workload factor to 0.8 for all levels.
+ *
+ *       max_workload_factor = 0.8 , 0.9
+ *
+ *       Sets the workload factor to 0.8 for level 0 and 0.9 for all
+ *       other levels.
+ *
+ *       NOTE: If a length is less than max levels then finest value
+ *       specified is use for finer levels.  If length is greater
+ *       than max levels, the values are ignored.
+ *
+ *       NOTE: Setting this value > 1.0 increases the splitting
+ *       threshold which effectively reduces the total number of boxes
+ *       generated.  Setting it less than 1.0 decreases the splitting
+ *       threshold and will generally increase the total number of
+ *       boxes.
+ *
+ *    - \b workload_tolerance Double array (length = number of levels)
+ *    used during the box-splitting phase to determine which boxes to
+ *    split.  The tolerance value can be use to prevent splitting of
+ *    boxes when the computed box workload is close to the computed
+ *    ideal workload.  A box is split if:
+ *
+ *    ( box_workload <= ( (1. + workload_tolerance) * ideal_workload ) )
+ *
+ *    Tolerance values should be greater than or equal to 0.0 and less
+ *    then 1.0.  Large values will probably have undesirable results.
+ *    The default value for this parameter is 0.0. It can be set to
+ *    either in the input file or via the setWorkloadTolerance()
+ *    member function below.
+ *
+ *       NOTE: If a length is less than max levels then finest value
+ *       specified is use for finer levels.  If length is greater
+ *       than max levels, the values are ignored.
+ *
+ *    - \b ignore_level_box_union_is_single_box Boolean flag to
+ *    control chopping of level boxes when the union of the input
+ *    boxes passed to the loadBalanceBoxes() routine is a single box.
+ *    The default value is false, which means that the domain will be
+ *    chopped to make patch boxes based on the (single box) union of
+ *    the boxes describing the level regardless of the input boxes.
+ *    When the value is set to true, either via the
+ *    setIgnoreLevelDomainIsSingleBox() function or an input file, the
+ *    domain will be chopped by chopping each of the input boxes.
+ *
+ *
+ * A sample input file entry might look like:
+ *
+ * \verbatim
+ *
+ *    processor_layout = 4 , 4 , 4    // number of processors is 64
+ *    bin_pack = "GREEDY"
+ *    max_workload_factor = 0.9
+ *    ignore_level_box_union_is_single_box = TRUE
+ *
+ * \endverbatim
+ *
+ * Performance warning: This class implements a sequential algorithm.
+ * The time it takes to this balancer increases with processor count.
+ * However, you can probably use this load balancer on up to 1K
+ * processors before its performance degrades noticably.
+ *
+ * @see mesh::LoadBalanceStrategy
+ */
+
+class ChopAndPackLoadBalancer:
+   public LoadBalanceStrategy
+{
+
+public:
+   /*!
+    * Construct load balancer object, including setting default object state
+    * and reading input data from the input data base, if required.
+    *
+    * @param name       User-defined string identifier used for error
+    *                   reporting.  This string must be non-empty.
+    * @param input_db   (optional) database pointer providing parameters from
+    *                   input file.  This pointer may be null indicating no
+    *                   input will be read.
+    */
+   ChopAndPackLoadBalancer(
+      const tbox::Dimension& dim,
+      const std::string& name,
+      tbox::Pointer<tbox::Database> input_db =
+         tbox::Pointer<tbox::Database>(NULL));
+
+   /*!
+    * Construct load balancer object, including setting default object state
+    * and reading input data from the input data base, if required.  The only
+    * difference between this constructor and the previous one is the string
+    * identifier input.  If this constructor is used, the default object name
+    * "ChopAndPackLoadBalancer" applies.
+    *
+    * @param input_db   (optional) database pointer providing parameters from
+    *                   input file.  This pointer may be null indicating no
+    *                   input will be read.
+    */
+   ChopAndPackLoadBalancer(
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> input_db =
+         tbox::Pointer<tbox::Database>(NULL));
+
+   /*!
+    * The virtual destructor releases all internal storage.
+    */
+   virtual ~ChopAndPackLoadBalancer();
+
+   /*!
+    * Set the max workload factor for either the specified level or all
+    * hierarchy levels.  See discussion about inputs above for information
+    * on how this value is used during load balancing operations.
+    *
+    * @param factor        Double value of multiplier for average workload
+    *                      used in box chopping.  The default value is 1.0.
+    * @param level_number  Optional integer number for level to which factor
+    *                      is applied. If no value is given, the factor will
+    *                      be used for all levels.
+    */
+   void
+   setMaxWorkloadFactor(
+      double factor,
+      int level_number = -1);
+
+   /*!
+    * Set the workload tolerance for either the specified level or all
+    * hierarchy levels.  See discussion about inputs above for information
+    * on how this value is used during load balancing operations.
+    *
+    * @param factor        Double value of tolerance. The default value is 0.0;
+    *
+    * @param level_number  Optional integer number for level to which factor
+    *                      is applied. If no value is given, the value will
+    *                      be used for all levels.
+    */
+   void
+   setWorkloadTolerance(
+      double tolerance,
+      int level_number = -1);
+
+   /*!
+    * Configure the load balancer to use the data stored in the hierarchy at
+    * the specified descriptor index for estimating the workload on each cell.
+    *
+    * @param data_id       Integer value of patch data identifier for workload
+    *                      estimate on each cell.
+    * @param level_number  Optional integer number for level on which data id
+    *                      is used.  If no value is given, the data will be
+    *                      used for all levels.
+    */
+   void
+   setWorkloadPatchDataIndex(
+      int data_id,
+      int level_number = -1);
+
+   /*!
+    * Configure the load balancer to load balance boxes by assuming all cells
+    * on the specified level or all hierarchy levels are weighted equally.
+    *
+    * @param level_number  Optional integer number for level on which uniform
+    *                      workload estimate will be used.  If the level
+    *                      number is not specified, a uniform workload
+    *                      estimate will be used on all levels.
+    */
+   void
+   setUniformWorkload(
+      int level_number = -1);
+
+   /*!
+    * Configure the load balancer to use the bin-packing procedure for
+    * mapping patches to processors indicated by the string.
+    *
+    * @param method        String value indicating bin-packing method to use.
+    *                      See input file description above for valid options.
+    *                      The default value is "GREEDY".
+    * @param level_number  Optional integer number for level on which
+    *                      bin-packing method will be used. If no value is
+    *                      given, the prescribed methods will be used on all
+    *                      levels.
+    */
+   void
+   setBinPackMethod(
+      const std::string& method,
+      int level_number = -1);
+
+   /*!
+    * Set the boolean flag to control chopping of level boxes when the union of
+    * the input boxes passed to the loadBalanceBoxes() routine is a single box.
+    * The default value is false, which means that the domain will be chopped
+    * to make patch boxes based on the (single box) union of the boxes describing
+    * the level regardless of the input boxes.  When the value is set to true,
+    * the domain will be chopped by chopping each of the input boxes.
+    *
+    * @param flag          Boolean value indicating whether to ignore the set of
+    *                      input boxes to the loadBalanceBoxes() routine when the
+    *                      union of those boxes is a single box.
+    */
+   void
+   setIgnoreLevelDomainIsSingleBox(
+      bool flag);
+
+   /*!
+    * Return true if load balancing procedure for given level depends on
+    * patch data on mesh; otherwise return false.  This can be used to
+    * determine whether a level needs to be rebalanced although its box
+    * configuration is unchanged.  This function is pure virtual in
+    * the LoadBalanceStrategy base class.
+    *
+    * @return Boolean value indicating whether load balance depends on
+    *         patch data.
+    *
+    * @param level_number  Integer patch level number.
+    */
+   bool
+   getLoadBalanceDependsOnPatchData(
+      int level_number) const;
+
+   /*!
+    * Given a list of boxes, representing the domain of a level in the AMR
+    * hierarchy, generate an array of boxes and an associated processor
+    * mapping from which the patches for the level will be generated and
+    * assigned.  The resulting boxes and processor mapping will be determined
+    * based on parameters set via input or member functions above.  This
+    * function is pure virtual in the LoadBalanceStrategy base class.
+    *
+    * The load balancing algorithm should ignore any periodic image MappedBoxes
+    * in the input balance_mapped_box_level.
+    *
+    * @param out_boxes       Output box array for generating patches on level.
+    * @param mapping         Output processor mapping for patches on level.
+    * @param in_boxes        Input box list representing union of patches on level.
+    * @param hierarchy       Input patch hierarchy in which level will reside.
+    * @param level_number    Input integer number of level in patch hierarchy.
+    *                        This value must be >= 0.
+    * @param physical_domain Array of boxes describing the physical extent of
+    *                        the problem domain in the index space associated
+    *                        with the level.  This box array cannot be empty.
+    * @param ratio_to_hierarchy_level_zero  Input integer vector indicating
+    *                        ratio between index space of level to load balance
+    *                        and hierarchy level 0 (i.e., coarsest hierarchy level).
+    * @param min_size        Input integer vector of minimum dimensions for
+    *                        output boxes. All entries must be > 0.
+    * @param max_size        Input integer vector of maximum dimensions for
+    *                        output boxes. All entries must be >= min_size.
+    * @param cut_factor      Input integer vector used to create boxes with
+    *                        correct dimensions.  The length of each box
+    *                        dimension will be an integer multiple of the
+    *                        corresponding cut factor vector entry.  All
+    *                        vector entries must be > 0.  See hier::BoxUtilities
+    *                        documentation for more details.
+    * @param bad_interval    Input integer vector used to create boxes near
+    *                        physical domain boundary with sufficient number
+    *                        of cells.  No box face will be closer to the
+    *                        boundary than the corresponding interval of cells
+    *                        to the boundary (the corresponding value is given
+    *                        by the normal direction of the box face) unless
+    *                        the face coincides with the boundary itself.  The
+    *                        point of this argument is to have no patch live
+    *                        within a certain ghost cell width of the boundary
+    *                        if its boundary does not coincide with that
+    *                        boundary .  That is, all ghost cells along a face
+    *                        will be either in the domain interior or outside
+    *                        the domain.  All entries must be >= 0. See
+    *                        hier::BoxUtilities documentation for more details.
+    * @param rank_group      Needed for compatibility with parent class.
+    *                        This argument is ignored.
+    */
+   void
+   loadBalanceMappedBoxLevel(
+      hier::MappedBoxLevel& balance_mapped_box_level,
+      hier::Connector& balance_to_anchor,
+      hier::Connector& anchor_to_balance,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int level_number,
+      const hier::Connector& unbalanced_to_attractor,
+      const hier::Connector& attractor_to_unbalanced,
+      const hier::IntVector& min_size,
+      const hier::IntVector& max_size,
+      const hier::MappedBoxLevel& domain_mapped_box_level,
+      const hier::IntVector& bad_interval,
+      const hier::IntVector& cut_factor, // Default v2.x.x = hier::IntVector::getOne(tbox::Dimension(DIM))
+      const tbox::RankGroup& rank_group = tbox::RankGroup()) const;
+
+   /*!
+    * Print out all members of the class instance to given output stream.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os) const;
+
+private:
+   // The following are not implemented, but are provided here for
+   // dumb compilers.
+   ChopAndPackLoadBalancer(
+      const ChopAndPackLoadBalancer&);
+   void
+   operator = (
+      const ChopAndPackLoadBalancer&);
+
+   /*
+    * Read parameters from input database.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db);
+
+   /*!
+    * Given a list of boxes, representing the domain of a level in the AMR
+    * hierarchy, generate an array of boxes and an associated processor
+    * mapping from which the patches for the level will be generated and
+    * assigned.  The resulting boxes and processor mapping will be determined
+    * based on parameters set via input or member functions above.  This
+    * function is pure virtual in the LoadBalanceStrategy base class.
+    *
+    * @param out_boxes       Output box array for generating patches on level.
+    * @param mapping         Output processor mapping for patches on level.
+    * @param in_boxes        Input box list representing union of patches on level.
+    * @param hierarchy       Input patch hierarchy in which level will reside.
+    * @param level_number    Input integer number of level in patch hierarchy.
+    *                        This value must be >= 0.
+    * @param physical_domain Array of boxes describing the physical extent of
+    *                        the problem domain in the index space associated
+    *                        with the level.  This box array cannot be empty.
+    * @param ratio_to_hierarchy_level_zero  Input integer vector indicating
+    *                        ratio between index space of level to load balance
+    *                        and hierarchy level 0 (i.e., coarsest hierarchy level).
+    * @param min_size        Input integer vector of minimum dimensions for
+    *                        output boxes. All entries must be > 0.
+    * @param max_size        Input integer vector of maximum dimensions for
+    *                        output boxes. All entries must be >= min_size.
+    * @param cut_factor      Input integer vector used to create boxes with
+    *                        correct dimensions.  The length of each box
+    *                        dimension will be an integer multiple of the
+    *                        corresponding cut factor vector entry.  All
+    *                        vector entries must be > 0.  See hier::BoxUtilities
+    *                        documentation for more details.
+    * @param bad_interval    Input integer vector used to create boxes near
+    *                        physical domain boundary with sufficient number
+    *                        of cells.  No box face will be closer to the
+    *                        boundary than the corresponding interval of cells
+    *                        to the boundary (the corresponding value is given
+    *                        by the normal direction of the box face) unless
+    *                        the face coincides with the boundary itself.  The
+    *                        point of this argument is to have no patch live
+    *                        within a certain ghost cell width of the boundary
+    *                        if its boundary does not coincide with that
+    *                        boundary .  That is, all ghost cells along a face
+    *                        will be either in the domain interior or outside
+    *                        the domain.  All entries must be >= 0. See
+    *                        hier::BoxUtilities documentation for more details.
+    */
+   void
+   loadBalanceBoxes(
+      hier::BoxArray& out_boxes,
+      hier::ProcessorMapping& mapping,
+      const hier::BoxList& in_boxes,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number,
+      const hier::BoxArray& physical_domain,
+      const hier::IntVector& ratio_to_hierarchy_level_zero,
+      const hier::IntVector& min_size,
+      const hier::IntVector& max_size,
+      const hier::IntVector& cut_factor,
+      const hier::IntVector& bad_interval) const;
+
+   /*
+    * Chop single box using uniform workload estimate.
+    */
+   void
+   chopUniformSingleBox(
+      hier::BoxArray& out_boxes,
+      tbox::Array<double>& out_workloads,
+      const hier::Box& in_box,
+      const hier::IntVector& min_size,
+      const hier::IntVector& max_size,
+      const hier::IntVector& cut_factor,
+      const hier::IntVector& bad_interval,
+      const hier::BoxArray& physical_domain,
+      const tbox::SAMRAI_MPI &mpi) const;
+
+   /*
+    * Chop boxes in list using uniform workload estimate.
+    */
+   void
+   chopBoxesWithUniformWorkload(
+      hier::BoxArray& out_boxes,
+      tbox::Array<double>& out_workloads,
+      const hier::BoxList& in_boxes,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number,
+      const hier::IntVector& min_size,
+      const hier::IntVector& max_size,
+      const hier::IntVector& cut_factor,
+      const hier::IntVector& bad_interval,
+      const hier::BoxArray& physical_domain,
+      const tbox::SAMRAI_MPI &mpi) const;
+
+   /*
+    * Chop boxes in list using non-uniform workload estimate.
+    */
+   void
+   chopBoxesWithNonuniformWorkload(
+      hier::BoxArray& out_boxes,
+      tbox::Array<double>& out_workloads,
+      const hier::BoxList& in_boxes,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number,
+      const hier::IntVector& ratio_to_coarsest_hierarchy_level,
+      int wrk_indx,
+      const hier::IntVector& min_size,
+      const hier::IntVector& max_size,
+      const hier::IntVector& cut_factor,
+      const hier::IntVector& bad_interval,
+      const hier::BoxArray& physical_domain,
+      const tbox::SAMRAI_MPI &mpi) const;
+
+   /*
+    * Map boxes to processors using chosen bin pack method.
+    */
+   void
+   binPackBoxes(
+      hier::BoxArray& boxes,
+      hier::ProcessorMapping& mapping,
+      tbox::Array<double>& workloads,
+      const std::string& bin_pack_method) const;
+
+   /*!
+    * @brief All-to-all communication of box arrays and associated weights.
+    *
+    * On invocation, each processor has a (possibly empty) array of
+    * 'owned' boxes, and each box has a weight.  On return,
+    * each processor has a array that contains all boxes owned
+    * by all processors, and their associated weights.
+    * If all processors input arrays have zero length, an error
+    * is thrown.
+    */
+   void
+   exchangeBoxArraysAndWeightArrays(
+      const hier::BoxArray& box_array_in,
+      const tbox::Array<double>& weights_in,
+      hier::BoxArray& box_array_out,
+      tbox::Array<double>& weights_out,
+      const tbox::SAMRAI_MPI &mpi) const;
+
+   /*
+    * Utility functions to determine parameter values for level.
+    */
+   int
+   getWorkloadDataId(
+      int level_number) const;
+   double
+   getMaxWorkloadFactor(
+      int level_number) const;
+   double
+   getWorkloadTolerance(
+      int level_number) const;
+   std::string
+   getBinPackMethod(
+      int level_number) const;
+
+   /*!
+    * @brief Initialize static objects and register shutdown routine.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   initializeCallback();
+
+   /*!
+    * @brief Method registered with ShutdownRegister to cleanup statics.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   finalizeCallback();
+
+   /*
+    * Object dimension.
+    */
+   const tbox::Dimension d_dim;
+
+   /*
+    * String identifier for load balancer object.
+    */
+   std::string d_object_name;
+
+   /*
+    * Specification of processor layout.
+    */
+   bool d_processor_layout_specified;
+   hier::IntVector d_processor_layout;
+
+   /*
+    * Flag to control domain chopping when union of boxes for level
+    * is a single box.
+    */
+   bool d_ignore_level_box_union_is_single_box;
+
+   /*
+    * Values for workload estimate data, workload factor, and bin pack method
+    * that will be used for all levels unless specified for individual levels.
+    */
+   int d_master_workload_data_id;
+   double d_master_max_workload_factor;
+   double d_master_workload_tolerance;
+   std::string d_master_bin_pack_method;
+
+   /*
+    * Values for workload estimate data, workload factor, and bin pack method
+    * used on individual levels when specified as such.
+    */
+   tbox::Array<int> d_workload_data_id;
+   tbox::Array<double> d_max_workload_factor;
+   tbox::Array<double> d_workload_tolerance;
+   tbox::Array<std::string> d_bin_pack_method;
+
+   bool d_opt_for_single_box;
+
+   /*
+    * Performance timers.
+    */
+   static tbox::Pointer<tbox::Timer> t_load_balance_boxes;
+   static tbox::Pointer<tbox::Timer> t_load_balance_boxes_remove_intersection;
+   static tbox::Pointer<tbox::Timer> t_bin_pack_boxes;
+   static tbox::Pointer<tbox::Timer> t_bin_pack_boxes_sort;
+   static tbox::Pointer<tbox::Timer> t_bin_pack_boxes_pack;
+   static tbox::Pointer<tbox::Timer> t_chop_boxes;
+
+   /* 
+    * Static initialization and cleanup handler.
+    */
+
+   static tbox::StartupShutdownManager::Handler
+   s_initialize_handler;
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/GriddingAlgorithm.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/GriddingAlgorithm.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,4759 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR hierarchy generation and regridding routines. 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_GriddingAlgorithm_C
+#define included_mesh_GriddingAlgorithm_C
+
+#include "SAMRAI/mesh/GriddingAlgorithm.h"
+
+#include "SAMRAI/math/PatchCellDataBasicOps.h"
+#include "SAMRAI/math/PatchCellDataOpsInteger.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/xfer/RefineAlgorithm.h"
+#include "SAMRAI/xfer/RefineSchedule.h"
+#include "SAMRAI/xfer/RefineScheduleConnectorWidthRequestor.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/BoxUtilities.h"
+#include "SAMRAI/hier/MappedBoxLevelConnectorUtils.h"
+#include "SAMRAI/hier/MappedBoxContainerUtils.h"
+#include "SAMRAI/hier/MappingConnectorAlgorithm.h"
+#include "SAMRAI/hier/MappedBoxSet.h"
+#include "SAMRAI/hier/OverlapConnectorAlgorithm.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/MappedBoxTree.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/hier/PeriodicShiftCatalog.h"
+#include "SAMRAI/mesh/StandardTagAndInitialize.h"
+#include "SAMRAI/mesh/StandardTagAndInitializeConnectorWidthRequestor.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/IEEE.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <iomanip>
+
+#define PATCHLEVEL_DATANAME_BUFSIZE 32
+
+#define ALGS_GRIDDING_ALGORITHM_VERSION (3)
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/mesh/GriddingAlgorithm.I"
+#endif
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace mesh {
+
+char GriddingAlgorithm::s_check_overflow_nesting = 0;
+char GriddingAlgorithm::s_check_proper_nesting = 0;
+char GriddingAlgorithm::s_check_connectors = 0;
+char GriddingAlgorithm::s_print_hierarchy = 0;
+char GriddingAlgorithm::s_print_steps = 0;
+
+/*
+ *************************************************************************
+ *
+ * Initialize the static data members.
+ *
+ *************************************************************************
+ */
+
+tbox::Array<int> * GriddingAlgorithm::s_tag_indx = 0;
+tbox::Array<int> * GriddingAlgorithm::s_buf_tag_indx = 0;
+
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_find_domain_complement;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_load_balance;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_load_balance0;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_load_balance_setup;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_bdry_fill_tags_create;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_make_coarsest;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_make_finer;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_make_finer_setup;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_make_finer_tagging;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_make_finer_create;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_regrid_all_finer;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_regrid_finer_create;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_bridge_links;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_fill_tags_from_mapped_box_level;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_tag_cells_for_refinement;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_buffer_tags;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_bdry_fill_tags_comm;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_second_finer_tagging;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_find_refinement;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_bridge_new_to_new;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_find_new_to_new;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_bridge_new_to_coarser;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_bridge_new_to_finer;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_bridge_new_to_old;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_find_boxes_containing_tags;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_enforce_nesting;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_make_nesting_map;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_make_nesting_map_compute;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_make_nesting_map_convert;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_use_nesting_map;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_make_overflow_map;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_make_overflow_map_compute;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_make_overflow_map_convert;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_use_overflow_map;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_compute_external_parts;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_compute_nesting_violator;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_extend_to_domain_boundary;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_extend_within_domain;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_grow_boxes_within_domain;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_sort_nodes;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_modify_connector;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_misc1;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_misc2;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_misc3;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_misc4;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_misc5;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_make_domain;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_get_balance;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_use_balance;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_make_new;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_process_error;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_limit_overflow;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_reset_hier;
+tbox::Pointer<tbox::Timer> GriddingAlgorithm::t_box_massage;
+
+tbox::StartupShutdownManager::Handler
+GriddingAlgorithm::s_startup_shutdown_handler(
+   0,
+   GriddingAlgorithm::startupCallback,
+   GriddingAlgorithm::shutdownCallback,
+   0,
+   tbox::StartupShutdownManager::priorityListElements);
+
+
+tbox::StartupShutdownManager::Handler
+GriddingAlgorithm::s_initialize_handler(
+   GriddingAlgorithm::initializeCallback,
+   0,
+   0,
+   GriddingAlgorithm::finalizeCallback,
+   tbox::StartupShutdownManager::priorityTimers);
+
+/*
+ *************************************************************************
+ *
+ * Constructor and destructor for GriddingAlgorithm.
+ *
+ *************************************************************************
+ */
+GriddingAlgorithm::GriddingAlgorithm(
+   const tbox::Pointer<hier::PatchHierarchy> &hierarchy,
+   const std::string& object_name,
+   tbox::Pointer<tbox::Database> input_db,
+   tbox::Pointer<TagAndInitializeStrategy> tag_init_strategy,
+   tbox::Pointer<BoxGeneratorStrategy> generator,
+   tbox::Pointer<LoadBalanceStrategy> balancer,
+   tbox::Pointer<LoadBalanceStrategy> balancer0,
+   bool register_for_restart):
+   BaseGriddingAlgorithm( hierarchy ),
+   d_hierarchy(hierarchy),
+   d_dim(hierarchy->getDim()),
+   d_max_stencil_width(),
+   d_max_ghost_data_width(),
+   d_domain_complement_tree(d_dim),
+   d_check_nonrefined_tags('w'),
+   d_check_overlapping_patches('i'),
+   d_check_nonnesting_user_boxes('e'),
+   d_check_boundary_proximity_violation('e'),
+   d_sequentialize_patch_indices(true),
+   d_enforce_proper_nesting(true),
+   d_extend_to_domain_boundary(true),
+   d_load_balance(true),
+   d_barrier_and_time(false)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!input_db.isNull());
+   TBOX_ASSERT(!tag_init_strategy.isNull());
+   TBOX_ASSERT(!generator.isNull());
+   TBOX_ASSERT(!balancer.isNull());
+
+   d_object_name = object_name;
+   d_registered_for_restart = register_for_restart;
+
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->
+      registerRestartItem(d_object_name, this);
+   }
+
+   d_tag_init_strategy = tag_init_strategy;
+   d_box_generator = generator;
+   d_load_balancer = balancer;
+   d_load_balancer0 = balancer0;
+   if (d_load_balancer0.isNull()) {
+      d_load_balancer0 = d_load_balancer;
+   }
+
+   d_hierarchy->registerConnectorWidthRequestor(
+      d_connector_width_requestor );
+
+   /*
+    * Construct integer tag variables and add to variable database.
+    * Note that variables and patch data indices are shared among
+    * all GriddingAlgorithm instances.  The VariableDatabase
+    * holds the variables, once contructed and registered via the
+    * VariableDatabase::makeInternalSAMRAIWorkVariablePatchDataIndex()
+    * function call.  Note that variables are registered and patch data
+    * indices are made only for the first time through the constructor.
+    */
+   hier::VariableDatabase* var_db =
+      hier::VariableDatabase::getDatabase();
+
+   std::string tag_interior_variable_name("GriddingAlgorithm__tag-interior");
+   std::string tag_buffer_variable_name("GriddingAlgorithm__tag-buffer");
+
+   std::ostringstream dim_extension;
+   dim_extension << "_" << d_dim.getValue();
+
+   tag_interior_variable_name += dim_extension.str();
+   tag_buffer_variable_name += dim_extension.str();
+
+   d_tag = var_db->getVariable(tag_interior_variable_name);
+   if (d_tag.isNull()) {
+      d_tag = new pdat::CellVariable<int>(d_dim, tag_interior_variable_name, 1);
+   }
+
+   d_buf_tag = var_db->getVariable(tag_buffer_variable_name);
+   if (d_buf_tag.isNull()) {
+      d_buf_tag = new pdat::CellVariable<int>(d_dim,
+                                              tag_buffer_variable_name,
+                                              1);
+   }
+
+   if ((*s_tag_indx)[d_dim.getValue() - 1] < 0) {
+      (*s_tag_indx)[d_dim.getValue() - 1] =
+         var_db->registerInternalSAMRAIVariable(d_tag,
+            hier::IntVector::getZero(d_dim));
+   }
+   if ((*s_buf_tag_indx)[d_dim.getValue() - 1] < 0) {
+      (*s_buf_tag_indx)[d_dim.getValue() - 1] =
+         var_db->registerInternalSAMRAIVariable(d_buf_tag,
+            hier::IntVector::getOne(d_dim));
+   }
+
+   d_tag_indx = (*s_tag_indx)[d_dim.getValue() - 1];
+   d_buf_tag_indx = (*s_buf_tag_indx)[d_dim.getValue() - 1];
+
+   /*
+    * Tag value for refined cells is one; others are zero.
+    */
+   d_true_tag = 1;
+   d_false_tag = 0;
+
+   /*
+    * Initialize communication algorithm for exchanging buffered tag data.
+    */
+   d_bdry_fill_tags = new xfer::RefineAlgorithm(d_dim);
+
+   d_bdry_fill_tags->
+   registerRefine(d_buf_tag_indx,
+      d_buf_tag_indx,
+      d_buf_tag_indx,
+      ((tbox::Pointer<xfer::RefineOperator>)NULL));
+
+
+   d_base_ln = -1;
+
+   d_efficiency_tolerance.resizeArray(d_hierarchy->getMaxNumberOfLevels());
+   d_combine_efficiency.resizeArray(d_hierarchy->getMaxNumberOfLevels());
+
+   for (int ln = 0; ln < d_hierarchy->getMaxNumberOfLevels(); ln++) {
+      d_efficiency_tolerance[ln] = 0.8e0;
+      d_combine_efficiency[ln] = 0.8e0;
+   }
+
+   d_proper_nesting_complement.resize(d_hierarchy->getMaxNumberOfLevels(), hier::MappedBoxLevel(d_dim));
+   d_to_nesting_complement.resize(d_hierarchy->getMaxNumberOfLevels());
+   d_from_nesting_complement.resize(d_hierarchy->getMaxNumberOfLevels());
+
+   /*
+    * Initialize object with data read from input and restart databases.
+    */
+   bool is_from_restart = tbox::RestartManager::getManager()->isFromRestart();
+   if (is_from_restart && d_registered_for_restart) {
+      getFromRestart();
+   }
+
+   getFromInput(input_db, is_from_restart);
+
+   /*
+    * This part must go after getFromInput(), where
+    * d_tag_init_strategy has a critical modification using
+    * TagAndInitializeStrategy::checkCoarsenRatios().
+    */
+   if (d_hierarchy->getMaxNumberOfLevels() > 1) {
+      tbox::Array<hier::IntVector> ratio_to_coarser(d_hierarchy->getMaxNumberOfLevels(),
+                                                    hier::IntVector::getOne(d_dim));
+      for ( int ln=0; ln<d_hierarchy->getMaxNumberOfLevels(); ++ln ) {
+         ratio_to_coarser[ln] = d_hierarchy->getRatioToCoarserLevel(ln);
+      }
+      d_tag_init_strategy->checkCoarsenRatios(ratio_to_coarser);
+      // checkCoarsenRatios() must precede getErrorCoarsenRatio().
+   }
+   if ( d_tag_init_strategy->getErrorCoarsenRatio() > 1 ) {
+      tbox::Pointer<StandardTagAndInitialize> std_tag_init(d_tag_init_strategy);
+      if ( ! std_tag_init.isNull() ) {
+         d_hierarchy->registerConnectorWidthRequestor(
+            std_tag_init->getConnectorWidthRequestor() );
+      }
+   }
+
+   d_bdry_sched_tags.resizeArray(d_hierarchy->getMaxNumberOfLevels());
+
+   /*
+    * If user overrides for max stencil width and max ghost data is given,
+    * for missing d_max_stencil_width and d_max_ghost_data_width overrides,
+    * use the last specified value for up to d_hierarchy->getMaxNumberOfLevels().
+    *
+    * If overriding is given, overriding is taken to happen on all levels.
+    */
+   if (!d_max_stencil_width.empty() &&
+       d_max_stencil_width.size() < d_hierarchy->getMaxNumberOfLevels()) {
+      int tmp = d_max_stencil_width.size() - 1;
+      d_max_stencil_width.resizeArray(d_hierarchy->getMaxNumberOfLevels(), hier::IntVector(d_dim));
+      for (int ln = tmp + 1; ln < d_hierarchy->getMaxNumberOfLevels(); ++ln) {
+         d_max_stencil_width[ln] = d_max_stencil_width[tmp];
+      }
+   }
+   if (!d_max_ghost_data_width.empty() &&
+       d_max_ghost_data_width.size() < d_hierarchy->getMaxNumberOfLevels()) {
+      int tmp = d_max_ghost_data_width.size() - 1;
+      d_max_ghost_data_width.resizeArray(d_hierarchy->getMaxNumberOfLevels(), hier::IntVector(d_dim));
+      for (int ln = tmp + 1; ln < d_hierarchy->getMaxNumberOfLevels(); ++ln) {
+         d_max_ghost_data_width[ln] = d_max_ghost_data_width[tmp];
+      }
+   }
+
+#ifdef GA_RECORD_STATS
+
+   d_boxes_stat.resizeArray(d_hierarchy->getMaxNumberOfLevels());
+   d_cells_stat.resizeArray(d_hierarchy->getMaxNumberOfLevels());
+   d_timestamp_stat.resizeArray(d_hierarchy->getMaxNumberOfLevels());
+
+   for (int ln = 0; ln < d_hierarchy->getMaxNumberOfLevels(); ++ln) {
+      std::string ln_text = tbox::Utilities::intToString(ln, 2);
+      const std::string num_boxes_str = std::string("GA_BoxesL") + ln_text;
+      const std::string num_cells_str = std::string("GA_CellsL") + ln_text;
+      const std::string timestamp_str = std::string("GA_TimeL") + ln_text;
+      d_boxes_stat[ln] = tbox::Statistician::getStatistician()->
+         getStatistic(num_boxes_str, "PROC_STAT");
+      d_cells_stat[ln] = tbox::Statistician::getStatistician()->
+         getStatistic(num_cells_str, "PROC_STAT");
+      d_timestamp_stat[ln] = tbox::Statistician::getStatistician()->
+         getStatistic(timestamp_str, "PROC_STAT");
+   }
+
+#endif
+
+}
+
+/*
+ *************************************************************************
+ *
+ * Destructor tells the tbox::RestartManager to remove this object from
+ * the list of restart items.
+ *
+ *************************************************************************
+ */
+GriddingAlgorithm::~GriddingAlgorithm()
+{
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->unregisterRestartItem(d_object_name);
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ * Construct coarsest level in the patch hierarchy (i.e., level 0).
+ * This routine operates in two modes:
+ *
+ * (1) If level 0 does not exist in the hierarchy, then a new level
+ *  will be created based on the domain description provided by
+ *  the grid geometry associated with the hierarchy.
+ * (2) If level 0 exists in the hierarchy, then a new level is made
+ *  by re-applying the load balancing routines to the existing level.
+ *  The pre-existing level will be removed from the hierarchy.
+ *
+ * In either case, the new level is placed in the hierarchy as level 0.
+ * If level 0 can be refined (i.e., it will be subject to tagging cells
+ * for refinement), the domain boxes are checked against the constraints
+ * of regridding process.
+ *
+ *************************************************************************
+ */
+
+void GriddingAlgorithm::makeCoarsestLevel(
+   const double level_time,
+   const hier::MappedBoxLevel& override_mapped_box_level)
+{
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim, *d_hierarchy, override_mapped_box_level);
+
+   if (override_mapped_box_level.isInitialized()) {
+      TBOX_ERROR("GriddingAlgorithm::makeCoarsestLevel is not\n"
+         "supporting override_mapped_box_level yet, due to incomplete coding.");
+   }
+
+   if (d_barrier_and_time) {
+      t_make_coarsest->barrierAndStart();
+   }
+
+   const hier::IntVector& zero_vec(hier::IntVector::getZero(d_dim));
+
+   const hier::MappedBoxLevelConnectorUtils dlbg_edge_utils;
+   const hier::IntVector& one_vec = hier::IntVector::getOne(d_dim);
+
+   TBOX_ASSERT(d_hierarchy->getMaxNumberOfLevels() > 0);
+
+   t_make_domain->start();
+
+   const int ln = 0;
+
+   bool level_zero_exists = false;
+   if ((d_hierarchy->getNumberOfLevels() > 0)) {
+      if (!(d_hierarchy->getPatchLevel(ln).isNull())) {
+         level_zero_exists = true;
+      }
+   }
+
+   hier::BoxArray domain_boxes =
+      d_hierarchy->getGridGeometry()->getPhysicalDomain();
+
+   hier::IntVector smallest_patch(d_dim);
+   hier::IntVector largest_patch(d_dim);
+   hier::IntVector extend_ghosts(d_dim);
+   {
+   hier::IntVector smallest_box_to_refine(d_dim);
+   // "false" argument: for_building_finer level = false
+   getGriddingParameters(smallest_patch,
+      smallest_box_to_refine,
+      largest_patch,
+      extend_ghosts,
+      ln,
+      false);
+   }
+
+   warnIfDomainTooSmallInPeriodicDir(
+      smallest_patch,
+      d_hierarchy->getDomainMappedBoxLevel().getGlobalBoundingBox().numberCells());
+
+   /*
+    * If there is no level 0 in the patch hierarchy, then check
+    * constraints on domain description.
+    */
+
+   if (!level_zero_exists) {
+
+      for (int i = 0; i < domain_boxes.size(); ++i) {
+         hier::Box test_box = domain_boxes[i];
+         for (int dir = 0; dir < d_dim.getValue(); dir++) {
+            if (test_box.numberCells(dir) < smallest_patch(dir)) {
+               int error_coarsen_ratio =
+                  d_tag_init_strategy->getErrorCoarsenRatio();
+               if (error_coarsen_ratio > 1) {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     << "\nBox " << i << ", " << test_box
+                     << ", from the input file violates"
+                     <<
+                     "the minimum patch size constraints."
+                     <<
+                     "\nVerify that boxes are larger than"
+                     << "the maximum ghost width and/or"
+                     <<
+                     "\nthe specified minimum patch size."
+                     <<
+                     "\nNOTE: to assure the constraints are"
+                     <<
+                     "properly enforced during coarsening for"
+                     <<
+                     "\nerror computation, the minimum patch"
+                     <<
+                     "size is the smallest patch size multiplied"
+                     <<
+                     "\nby the error coarsen ratio, which is "
+                     << error_coarsen_ratio
+                     << " in this case."
+                     << std::endl);
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     << "\nBox " << i << ", " << test_box
+                     << ", from the input file violates"
+                     <<
+                     "the minimum patch size constraints."
+                     <<
+                     "\nVerify that boxes are larger than"
+                     << "the maximum ghost width and/or"
+                     <<
+                     "\nthe specified minimum patch size."
+                     << std::endl);
+               }
+            }
+         }
+      }
+
+      hier::BoxList domain_list(domain_boxes);
+      if (domain_list.boxesIntersect()) {
+         TBOX_ERROR(d_object_name << ":  "
+                                  << "Boxes specified for coarsest level "
+                                  << "contain intersections with each other!");
+      }
+
+      if ((d_hierarchy->getMaxNumberOfLevels() > 1)
+          && (!d_tag_init_strategy->coarsestLevelBoxesOK(domain_boxes))) {
+         TBOX_ERROR(d_object_name << ":  "
+                                  << "level gridding strategy encountered"
+                                  << " a problem with the domain boxes!");
+      }
+
+   }
+
+   /*
+    * Apply load balancing algorithm to boxes describing domain
+    * to determine configuration of patches on level 0.
+    *
+    * FIXME: domain_mapped_box_level is just d_hierarchy->getDomainMappedBoxLevel(),
+    * so use the copy constructor instead.
+    */
+
+   hier::MappedBoxLevel domain_mapped_box_level(d_dim);
+   {
+      /* Initialize domain_mapped_box_level. */
+      domain_mapped_box_level.initialize(hier::IntVector::getOne(d_dim),
+                                         d_hierarchy->getDomainMappedBoxLevel().getMPI(),
+                                         hier::MappedBoxLevel::GLOBALIZED);
+      hier::MappedBoxSet domain_mapped_boxes;
+      d_hierarchy->getGridGeometry()->computePhysicalDomain(
+         domain_mapped_boxes, one_vec);
+      for (hier::MappedBoxSet::const_iterator bi = domain_mapped_boxes.begin();
+           bi != domain_mapped_boxes.end(); ++bi) {
+         domain_mapped_box_level.addMappedBox(*bi);
+      }
+   }
+   t_make_domain->stop();
+
+   /*
+    * domain_to_domain is a temporary connector for domain used for:
+    * - the required bias_attractor used by loadBalanceMappedBoxLevel.
+    * This attractor is a kludge providing no useful information.
+    * The load balancer interface should be modified not to
+    * require it.
+    * - a center for bridging the balanced mapped_box_level to itself.
+    * Since domain is small, owned by just proc 0
+    * and already globalized, it is fast and does not require
+    * communication to findOverlaps for domain_to_domain.
+    */
+
+   hier::Connector domain_to_domain(
+      domain_mapped_box_level,
+      domain_mapped_box_level,
+      hier::IntVector::max(
+         hier::IntVector::getOne(d_dim),
+         d_hierarchy->getRequiredConnectorWidth(0,0)));
+
+   const hier::OverlapConnectorAlgorithm oca;
+   oca.findOverlaps(domain_to_domain);
+   if (0) {
+      tbox::plog
+         << "makeCoarsestLevel: domain_mapped_box_level:\n" << domain_mapped_box_level.format("--> ", 3)
+         << "makeCoarsestLevel: domain_to_domain:\n" << domain_to_domain.format("--> ", 3);
+   }
+
+   if (d_barrier_and_time) {
+      t_load_balance0->barrierAndStart();
+   }
+
+   t_load_balance_setup->start();
+
+   // hier::IntVector patch_cut_factor(d_tag_init_strategy-> getErrorCoarsenRatio());
+   const hier::IntVector patch_cut_factor(d_dim, 1);
+
+   /*
+    * FIXME: The code for generating the coarsest level's boxes is not
+    * scalable because we involve the domain mapped_box_level in bridges and
+    * Connector modifications, forcing proc 0 (which owns all domain
+    * nodes) to do all of the searches.  This problem will show up in
+    * the performance data if we load balance the coarsest level
+    * regularly.
+    *
+    * A proper fix for this problem may be to use the existing coarse
+    * level in Connector operations, since it is more evenly distributed.
+    */
+
+   hier::MappedBoxLevel new_mapped_box_level(domain_mapped_box_level);
+   hier::Connector domain_to_new(
+      domain_mapped_box_level,
+      new_mapped_box_level,
+      domain_to_domain.getConnectorWidth(),
+      domain_to_domain.getNeighborhoodSets(),
+      hier::MappedBoxLevel::DISTRIBUTED);
+   hier::Connector new_to_domain(
+      new_mapped_box_level,
+      domain_mapped_box_level,
+      domain_to_domain.getConnectorWidth(),
+      domain_to_domain.getNeighborhoodSets(),
+      hier::MappedBoxLevel::DISTRIBUTED);
+   t_load_balance_setup->stop();
+   d_load_balancer0->loadBalanceMappedBoxLevel(
+      new_mapped_box_level,
+      new_to_domain,
+      domain_to_new,
+      d_hierarchy,
+      ln,
+      hier::Connector(),
+      hier::Connector(),
+      smallest_patch,
+      largest_patch,
+      domain_mapped_box_level,
+      extend_ghosts,
+      patch_cut_factor);
+
+   if (d_barrier_and_time) {
+      t_load_balance0->stop();
+   }
+
+   if (0) {
+      tbox::plog
+         << "After load balance: new_to_domain:" << new_to_domain.format("ND-> ", 3)
+         << "After load balance: domain_to_new:" << domain_to_new.format("DN-> ", 3);
+   }
+
+   if (d_sequentialize_patch_indices) {
+      sortNodes(new_mapped_box_level,
+         domain_to_new,
+         new_to_domain,
+         false,
+         true);
+      if (0) {
+         tbox::plog << "After sorting MappedBoxes:"
+                    << "new_to_domain:\n" << new_to_domain.format("DBG-> ", 3)
+                    << "domain_to_new:\n" << domain_to_new.format("DBG-> ", 3);
+      }
+   }
+
+   dlbg_edge_utils.addPeriodicImagesAndRelationships(
+      new_mapped_box_level,
+      new_to_domain,
+      domain_to_new,
+      d_hierarchy->getDomainSearchTree(),
+      domain_to_domain);
+
+   if (s_check_connectors == 'y') {
+      TBOX_ASSERT(oca.checkOverlapCorrectness(new_to_domain) == 0);
+      TBOX_ASSERT(oca.checkOverlapCorrectness(domain_to_new) == 0);
+   }
+
+   hier::Connector new_to_new;
+   if (domain_mapped_box_level.getLocalNumberOfBoxes(0) ==
+       (size_t)domain_mapped_box_level.getGlobalNumberOfBoxes()) {
+      /*
+       * If proc 0 owns all new boxes, it is faster find new<==>new by
+       * globalizing the new boxes.
+       *
+       * The standard approach of bridging basically does the same,
+       * but forces proc 0 to compute all the overlaps and send that
+       * info to each processor one at a time.
+       */
+      if (d_barrier_and_time) {
+         t_find_new_to_new->barrierAndStart();
+      }
+      new_to_new.initialize(new_mapped_box_level,
+         new_mapped_box_level,
+         d_hierarchy->getRequiredConnectorWidth(0,0));
+      oca.findOverlaps(new_to_new);
+      if (d_barrier_and_time) {
+         t_find_new_to_new->stop();
+      }
+   } else {
+      if (d_barrier_and_time) {
+         t_bridge_new_to_new->barrierAndStart();
+      }
+      oca.bridgeWithNesting(
+         new_to_new,
+         new_to_new,
+         new_to_domain,
+         domain_to_new,
+         new_to_domain,
+         domain_to_new,
+         zero_vec,
+         zero_vec,
+         d_hierarchy->getRequiredConnectorWidth(0, 0));
+      if (d_barrier_and_time) {
+         t_bridge_new_to_new->stop();
+      }
+      TBOX_ASSERT(new_to_new.getConnectorWidth() ==
+         d_hierarchy->getRequiredConnectorWidth(0,0));
+      TBOX_ASSERT(&new_to_new.getBase() == &new_mapped_box_level);
+      TBOX_ASSERT(&new_to_new.getHead() == &new_mapped_box_level);
+      if (0) {
+         int err = static_cast<int>(oca.checkOverlapCorrectness(new_to_new));
+         if (err) {
+            TBOX_ERROR(
+               "GriddingAlgorithm found " << err << " errors\n"
+               << "in new_to_new after bridging through domain.\n"
+               << "new_to_new:\n" << new_to_new.format("ERR-> ", 3)
+               << "domain_mapped_box_level:\n" << domain_mapped_box_level.format("ERR-> ", 3)
+               << "new_mapped_box_level:\n" << new_mapped_box_level.format("ERR-> ", 3)
+               << "domain_to_new:\n" << domain_to_new.format("ERR-> ", 3)
+               << "new_to_domain:\n" << new_to_domain.format("ERR-> ", 3));
+         }
+      }
+   }
+
+   if (d_check_overlapping_patches != 'i') {
+      checkOverlappingPatches(new_to_new);
+   }
+
+   t_make_new->start();
+   if (!level_zero_exists) {
+
+      d_hierarchy->makeNewPatchLevel(ln,
+         new_mapped_box_level);
+      /*
+       * Add computed Connectors to new MappedBoxLevel's
+       * collection of persistent overlap Connectors.
+       */
+      tbox::Pointer<hier::PatchLevel> new_level =
+         d_hierarchy->getPatchLevel(ln);
+      new_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+      createConnector(
+         *new_level->getMappedBoxLevel(),
+         new_to_new.getConnectorWidth(),
+         new_to_new.getNeighborhoodSets());
+
+      if (s_print_hierarchy == 'y') {
+         tbox::plog << "GriddingAlgorithm::makeCoarsestLevel produced:\n";
+         d_hierarchy->recursivePrint(tbox::plog, "", 4);
+      }
+
+      // "true" argument: const bool initial_time = true;
+      d_tag_init_strategy->initializeLevelData(d_hierarchy,
+         ln,
+         level_time,
+         d_hierarchy->levelCanBeRefined(ln),
+         true);
+
+   } else {
+
+      /*
+       * Save old data before they are overwritten by the new MappedBoxLevel.
+       */
+      hier::MappedBoxLevel old_mapped_box_level = *d_hierarchy->getMappedBoxLevel(0);
+
+      tbox::Pointer<hier::PatchLevel> old_level =
+         d_hierarchy->getPatchLevel(ln);
+
+      d_hierarchy->removePatchLevel(ln);
+
+      d_hierarchy->makeNewPatchLevel(ln,
+         new_mapped_box_level);
+
+      if (s_print_hierarchy == 'y') {
+         tbox::plog << "GriddingAlgorithm::makeCoarsestLevel produced:\n";
+         d_hierarchy->recursivePrint(tbox::plog, "", 4);
+      }
+
+      /*
+       * Compute old<==>new.  Doing it this way is not scalable,
+       * but we only do this for the coarsest level.  The old approach
+       * of bridging across the domain MappedBoxLevel is probably not scalable
+       * anyway, because the domain isusually owned by just one
+       * processor.
+       */
+      old_mapped_box_level.getPersistentOverlapConnectors().createConnector(
+         new_mapped_box_level,
+         d_hierarchy->getRequiredConnectorWidth(0, 0));
+      new_mapped_box_level.getPersistentOverlapConnectors().createConnector(
+         old_mapped_box_level,
+         d_hierarchy->getRequiredConnectorWidth(0, 0));
+
+      // "false" argument: const bool initial_time = false;
+      d_tag_init_strategy->initializeLevelData(d_hierarchy,
+         ln,
+         level_time,
+         d_hierarchy->levelCanBeRefined(ln),
+         false,
+         old_level);
+
+      old_level.setNull();
+
+   }
+   t_make_new->stop();
+
+   if (d_barrier_and_time) {
+      t_reset_hier->barrierAndStart();
+   }
+   d_tag_init_strategy->resetHierarchyConfiguration(d_hierarchy, ln, ln);
+   if (d_barrier_and_time) {
+      t_reset_hier->barrierAndStop();
+   }
+
+#ifdef GA_RECORD_STATS
+   recordStatistics(level_time);
+#endif
+
+   /*
+    * Clear out Connectors to avoid dangling pointers when their
+    * head/base MappedBoxLevels go out of scope first.
+    */
+   domain_to_domain.clear();
+   domain_to_new.clear();
+   new_to_domain.clear();
+
+   if (d_barrier_and_time) {
+      t_make_coarsest->stop();
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ * Perform error estimation process on the finest hierarchy level to
+ * determine if and where a new finest level is needed.  If it is
+ * determined  that a new finest level should exist, it is created and
+ * its patch data is allocated and initialized.  The algorithm is
+ * summarized as follows:
+ *
+ * (1) Compute boxes whose union constitutes the region within the level
+ *  in which the next finer level may reside (i.e., proper nesting).
+ *
+ * (2) Set tags on the level to indicate which cells should be refined.
+ *
+ * (3) Buffer the tags.  This prevents disturbances from moving off
+ *  refined regions before the next remesh occurs.
+ *
+ * (4) Determine boxes for new patches that will cover the tagged cells.
+ *  This step includes load balancing of the patches.
+ *
+ * (5) If there exist some regions to refine, construct the next finer
+ *  level and insert it in the hierarchy.  Then, initialize the data
+ *  on that level.
+ *
+ *************************************************************************
+ */
+
+void GriddingAlgorithm::makeFinerLevel(
+   const double level_time,
+   const bool initial_time,
+   const int tag_buffer,
+   const double regrid_start_time)
+{
+   if (s_print_steps == 'y') {
+      tbox::plog
+      << "GriddingAlgorithm::makeFinerLevel entered with finest ln = "
+      << d_hierarchy->getFinestLevelNumber() << "\n";
+   }
+
+   TBOX_ASSERT(!(d_hierarchy.isNull()));
+   TBOX_ASSERT(!(d_hierarchy->getPatchLevel(
+                    d_hierarchy->getFinestLevelNumber()).isNull()));
+   TBOX_ASSERT(tag_buffer >= 0);
+
+   if (d_barrier_and_time) {
+      t_make_finer->barrierAndStart();
+   }
+
+   const hier::IntVector& zero_vector(hier::IntVector::getZero(d_dim));
+
+   const hier::MappedBoxLevelConnectorUtils dlbg_edge_utils;
+
+   const int tag_ln = d_hierarchy->getFinestLevelNumber();
+   const int new_ln = tag_ln + 1;
+
+   if (d_hierarchy->levelCanBeRefined(tag_ln)) {
+
+      t_make_finer_setup->start();
+
+      /*
+       * d_base_ln is used by private methods during regrid.
+       */
+      d_base_ln = tag_ln;
+
+      /*
+       * Compute nesting data at d_base_ln for use in constructing
+       * level d_base_ln+1;
+       */
+      computeNestingData(d_base_ln);
+
+      const tbox::Pointer<hier::PatchLevel>
+      tag_level = d_hierarchy->getPatchLevel(tag_ln);
+
+      hier::BoxArray fine_boxes(d_dim);
+
+      hier::MappedBoxLevel new_mapped_box_level(d_dim);
+      hier::Connector tag_to_new;
+      hier::Connector new_to_tag;
+      hier::Connector new_to_new;
+
+      /*
+       * The boolean "do_tagging" specifies whether or not tagging will
+       * be performed. This will be true except in two circumstances:
+       *   1) only user supplied refine boxes are used
+       *   2) the boxes are read from a previously dumped file.
+       *
+       * If either of these circumstances is true, tagging operations
+       * are NOT necessary so do_tagging will be set to false.
+       */
+      bool do_tagging = true;
+      if (d_tag_init_strategy->refineUserBoxInputOnly()) do_tagging = false;
+      t_make_finer_setup->stop();
+
+      /*
+       * Tag cells, determine refine boxes from tagged regions, and
+       * load balance in preparation for constructing new refined level.
+       */
+      if (do_tagging) {
+
+         t_make_finer_tagging->start();
+         /*
+          * Create communication schedule for buffer tags on this level.
+          */
+         t_bdry_fill_tags_create->start();
+         d_bdry_sched_tags[tag_ln] =
+            d_bdry_fill_tags->createSchedule(tag_level);
+         t_bdry_fill_tags_create->stop();
+
+         /*
+          * Initialize integer tag arrays on level to false.
+          */
+
+         tag_level->allocatePatchData(d_tag_indx);
+         /*
+          * FIXME: fillTagsFromMappedBoxLevel is more complex than needed here.
+          * because we want to fill up the whole level, not fill selectively.
+          */
+         fillTagsFromMappedBoxLevel(
+            d_false_tag,
+            tag_level,
+            d_tag_indx,
+            d_hierarchy->getConnector(tag_ln, tag_ln),
+            true,
+            zero_vector);
+         /*
+          * Perform pre-processing of error estimation data, if appropriate.
+          */
+         if (errorEstimationUsesTimeIntegration()) {
+            d_tag_init_strategy->
+            preprocessErrorEstimation(d_hierarchy,
+               tag_ln,
+               level_time,
+               regrid_start_time,
+               initial_time);
+         }
+
+         /*
+          * Determine cells needing refinement on level and set tags to true.
+          * Because we are constructing a new level, not regridding the level,
+          * the coarsest_sync_level argument is always false.
+          */
+         bool coarsest_sync_level = false;
+         d_tag_init_strategy->
+         tagCellsForRefinement(d_hierarchy,
+            tag_ln,
+            level_time,
+            d_tag_indx,
+            initial_time,
+            coarsest_sync_level,
+            d_hierarchy->levelCanBeRefined(tag_ln),
+            regrid_start_time);
+
+         /*
+          * Check for user-tagged cells that violate proper nesting.
+          * except if user specified that the violating tags be ignored.
+          */
+         if (d_check_nonrefined_tags != 'i') {
+            checkNonrefinedTags(*tag_level, tag_ln);
+         }
+
+         /*
+          * Buffer true tagged cells by specified amount which should be
+          * sufficient to keep disturbance on refined region until next regrid
+          * of the level occurs.
+          */
+         tag_level->allocatePatchData(d_buf_tag_indx);
+         bufferTagsOnLevel(d_true_tag, tag_level, tag_buffer);
+         tag_level->deallocatePatchData(d_buf_tag_indx);
+         t_make_finer_tagging->stop();
+
+         /*
+          * Determine box array and processor mapping for new fine level.
+          */
+         findRefinementBoxes(new_mapped_box_level,
+            tag_to_new,
+            new_to_tag,
+            tag_ln);
+         if (new_mapped_box_level.isInitialized()) {
+
+            if (s_check_proper_nesting == 'y') {
+               /*
+                * Check that the new mapped_box_level nests inside the tag level.
+                *
+                * SAMRAI convention (my best understanding of it) supported
+                * (or should have been supported) by grid generation:
+                * - L0 must be equivalent to the domain.
+                * - L1 must nest in L0 by the max ghost width in L1 index space,
+                *   except where L1 touches physical boundary.
+                * - L(n) must nest in L(n-1) by getProperNestingBuffer(n-1),
+                *   except where L(n) touches physical boundary.
+                */
+               hier::IntVector required_nesting(d_dim);
+               if (tag_ln > 0) {
+                  required_nesting = hier::IntVector(d_dim,
+                        d_hierarchy->getProperNestingBuffer(tag_ln));
+                  required_nesting *= d_hierarchy->getRatioToCoarserLevel(new_ln);
+               } else {
+                  required_nesting =
+                     d_hierarchy->getPatchDescriptor()->getMaxGhostWidth(
+                        d_dim);
+               }
+               bool locally_nests = false;
+               const bool new_nests_in_tag =
+                  dlbg_edge_utils.baseNestsInHead(
+                     &locally_nests,
+                     new_mapped_box_level,
+                     *d_hierarchy->getMappedBoxLevel(tag_ln),
+                     required_nesting,
+                     hier::IntVector::getZero(d_dim),
+                     hier::IntVector::getZero(d_dim),
+                     &d_hierarchy->getPeriodicDomainSearchTree());
+               if (!new_nests_in_tag) {
+                  hier::MappedBoxLevel violator(d_dim);
+                  hier::Connector new_to_violator;
+                  hier::MappedBoxLevelConnectorUtils edge_utils;
+                  t_compute_external_parts->start();
+                  edge_utils.computeExternalParts(
+                     violator,
+                     new_to_violator,
+                     new_to_tag,
+                     hier::IntVector(d_dim, -d_hierarchy->getProperNestingBuffer(tag_ln)),
+                     d_hierarchy->getDomainSearchTree());
+                  t_compute_external_parts->stop();
+                  TBOX_ERROR(
+                     "Internal library error: Failed to produce proper nesting."
+                     << "GriddingAlgorithm::makeFinerLevel:\n"
+                     << "tag_ln=" << tag_ln << ":\n"
+                     << "new mapped_box_level does not properly nest\n"
+                     << "in tag mapped_box_level by the required nesting buffer of "
+                     << d_hierarchy->getProperNestingBuffer(tag_ln)
+                     << ".\nLocal nestingness: " << locally_nests
+                     << ".\nProper nesting violation with new_mapped_box_level of\n"
+                     << new_mapped_box_level.format("N->", 2)
+                     << "Proper nesting violation with tag mapped_box_level of\n"
+                     << d_hierarchy->getMappedBoxLevel(tag_ln)->format("F->", 2)
+                     << "tag_to_new:\n" << tag_to_new.format("N->", 2)
+                     << "new_to_tag:\n" << new_to_tag.format("N->", 2)
+                     << "violator:\n" << violator.format("N->", 2)
+                     << "new_to_violator:\n" << new_to_violator.format("N->", 2));
+               }
+            }
+
+            t_bridge_links->start();
+            t_bridge_new_to_new->start();
+            const hier::OverlapConnectorAlgorithm oca;
+            oca.bridgeWithNesting(
+               new_to_new,
+               new_to_new,
+               new_to_tag,
+               tag_to_new,
+               new_to_tag,
+               tag_to_new,
+               zero_vector,
+               zero_vector,
+               d_hierarchy->getRequiredConnectorWidth(new_ln, new_ln));
+            TBOX_ASSERT(new_to_new.getConnectorWidth() ==
+               d_hierarchy->getRequiredConnectorWidth(new_ln, new_ln));
+            t_bridge_new_to_new->stop();
+            t_bridge_links->stop();
+         }
+
+         /*
+          * Deallocate tag arrays and schedule -- no longer needed.
+          */
+         tag_level->deallocatePatchData(d_tag_indx);
+         d_bdry_sched_tags[tag_ln].setNull();
+
+      } else {
+
+         /*
+          * If tagging is not necessary (do_tagging = false) we simply
+          * need to access the level boxes, either from a dumped file or
+          * from user-supplied refine boxes, and load balance them before
+          * constructing the finer level.
+          */
+         bool remove_old_fine_level = false;
+         readLevelBoxes(fine_boxes,
+            new_mapped_box_level,
+            tag_to_new,
+            new_to_tag,
+            tag_ln,
+            level_time,
+            remove_old_fine_level);
+
+         /*
+          * Check for user-specified boxes that violate nesting requirements.
+          */
+         const hier::MappedBoxTree& periodic_domain_search_tree =
+            d_hierarchy->getPeriodicDomainSearchTree();
+
+         if (d_check_nonnesting_user_boxes != 'i') {
+
+            hier::MappedBoxLevel violating_parts(d_dim);
+            hier::Connector new_to_violating_parts;
+
+            hier::MappedBoxLevelConnectorUtils edge_utils;
+            edge_utils.computeExternalParts(
+               violating_parts,
+               new_to_violating_parts,
+               new_to_tag,
+               hier::IntVector(d_dim, -d_hierarchy->getProperNestingBuffer(tag_ln)),
+               periodic_domain_search_tree);
+            if (violating_parts.getGlobalNumberOfBoxes() > 0) {
+               tbox::perr << "GriddingAlgorihtm: user-specified refinement boxes\n"
+                          << "violates nesting requirement.  Diagnostics will be\n"
+                          << "writen to log files." << std::endl;
+               const std::string left_margin("ERR: ");
+               tbox::plog
+                  << left_margin << "Tag MappedBoxLevel:\n" << new_to_tag.getHead().format(left_margin, 2)
+                  << left_margin << "User-specified boxes:\n" << new_mapped_box_level.format(left_margin, 2)
+                  << left_margin << "Violating parts:\n" << violating_parts.format(left_margin, 2)
+                  << left_margin << "User-specified boxes and their violating parts:\n" << new_to_violating_parts.format(left_margin, 2);
+               if (d_check_nonnesting_user_boxes == 'e') {
+                  TBOX_ERROR("Exiting due to above error");
+               }
+               if (d_check_nonnesting_user_boxes == 'w') {
+                  TBOX_WARNING("Proceeding with nesting violation as requested.\n"
+                     << "SAMRAI is not guaranteed to work with nesting"
+                     << "violations!");
+               }
+            }
+
+         }
+
+         if (d_check_boundary_proximity_violation != 'i') {
+
+            hier::IntVector extend_ghosts(d_dim);
+            hier::IntVector smallest_patch(d_dim);
+            hier::IntVector smallest_box_to_refine(d_dim);
+            hier::IntVector largest_patch(d_dim);
+            getGriddingParameters(smallest_patch,
+                                  smallest_box_to_refine,
+                                  largest_patch,
+                                  extend_ghosts,
+                                  tag_ln,
+                                  false);
+
+            const size_t nerr(
+               checkBoundaryProximityViolation(
+                  new_mapped_box_level,
+                  periodic_domain_search_tree,
+                  extend_ghosts));
+            if (nerr > 0 && d_check_boundary_proximity_violation == 'e') {
+               TBOX_ERROR("GriddingAlgorithm::makeFinerLevel: User error:\n"
+                  << "Making level " << new_ln << ".\n"
+                  << "New boxes violate boundary proximity.\n"
+                  << "All boxes must be at least " << extend_ghosts
+                  << " from physical boundaries or touching the physical boundary.");
+            }
+         }
+
+         if (new_mapped_box_level.isInitialized()) {
+            t_bridge_new_to_new->start();
+            hier::OverlapConnectorAlgorithm oca;
+            oca.setSanityCheckMethodPreconditions(true);
+            oca.setSanityCheckMethodPostconditions(true);
+            oca.bridgeWithNesting(
+               new_to_new,
+               new_to_new,
+               new_to_tag,
+               tag_to_new,
+               new_to_tag,
+               tag_to_new,
+               zero_vector,
+               zero_vector,
+               d_hierarchy->getRequiredConnectorWidth(new_ln, new_ln));
+            t_bridge_new_to_new->stop();
+            TBOX_ASSERT(new_to_new.getConnectorWidth() ==
+               d_hierarchy->getRequiredConnectorWidth(new_ln, new_ln));
+         }
+      }
+
+      /*
+       * Make new finer level (new_ln == tag_ln+1),
+       * if appropriate.
+       */
+      if (new_mapped_box_level.isInitialized()) {
+
+         if (d_check_overlapping_patches != 'i') {
+            checkOverlappingPatches(new_to_new);
+         }
+
+         t_make_finer_create->start();
+
+         TBOX_ASSERT(tag_to_new.checkConsistencyWithHead() == 0);
+         TBOX_ASSERT(tag_to_new.checkConsistencyWithBase() == 0);
+         TBOX_ASSERT(new_to_tag.checkConsistencyWithHead() == 0);
+         TBOX_ASSERT(new_to_tag.checkConsistencyWithBase() == 0);
+         TBOX_ASSERT(new_to_new.checkConsistencyWithHead() == 0);
+         TBOX_ASSERT(new_to_new.checkConsistencyWithBase() == 0);
+         d_hierarchy->makeNewPatchLevel(new_ln,
+            new_mapped_box_level);
+
+         tbox::Pointer<hier::PatchLevel> new_level =
+            d_hierarchy->getPatchLevel(new_ln);
+         new_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+         createConnector(
+            *new_level->getMappedBoxLevel(),
+            new_to_new.getConnectorWidth(),
+            new_to_new.getNeighborhoodSets());
+         new_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+         createConnector(
+            *tag_level->getMappedBoxLevel(),
+            new_to_tag.getConnectorWidth(),
+            new_to_tag.getNeighborhoodSets());
+         tag_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+         createConnector(
+            *new_level->getMappedBoxLevel(),
+            tag_to_new.getConnectorWidth(),
+            tag_to_new.getNeighborhoodSets());
+
+         if (s_print_hierarchy == 'y') {
+            tbox::plog << "GriddingAlgorithm::makeFinerLevel produced:\n";
+            d_hierarchy->recursivePrint(tbox::plog, "", 4);
+         }
+
+         d_tag_init_strategy->initializeLevelData(d_hierarchy,
+            new_ln,
+            level_time,
+            d_hierarchy->levelCanBeRefined(new_ln),
+            initial_time);
+
+         t_reset_hier->barrierAndStart();
+         d_tag_init_strategy->resetHierarchyConfiguration(d_hierarchy,
+            new_ln,
+            new_ln);
+         t_reset_hier->barrierAndStop();
+         t_make_finer_create->stop();
+      }
+
+      d_base_ln = -1;
+
+   }  // if level cannot be refined, the routine drops through...
+
+   if (d_barrier_and_time) {
+      t_make_finer->barrierAndStop();
+   }
+
+}
+
+/*
+ *************************************************************************
+ *
+ * Regrid each level in the hierarchy which is finer than the specified
+ * level.  First, we recursively compute proper nesting boxes for each
+ * level that will be subject to regridding. If the regridding procedure
+ * employs time integration, we perform any pre-processing necessary
+ * to regrid the levels.  Then, each level finer than the specified
+ * level is regridded from fine to coarse.  The recursive regridding
+ * procedure is performed by the function regridFinerLevel().  Finally,
+ * after the new hierarchy configuration is set, the application-
+ * specific operations for resetting hierarchy-dependent infomation is
+ * called.
+ *
+ *************************************************************************
+ */
+
+void GriddingAlgorithm::regridAllFinerLevels(
+   const int level_number,
+   const double regrid_time,
+   const tbox::Array<int>& tag_buffer,
+   const tbox::Array<double> regrid_start_time,
+   const bool level_is_coarsest_sync_level)
+{
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= d_hierarchy->getFinestLevelNumber()));
+   TBOX_ASSERT(!(d_hierarchy->getPatchLevel(level_number).isNull()));
+   TBOX_ASSERT(tag_buffer.getSize() >= level_number + 1);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   for (int i = 0; i < tag_buffer.getSize(); i++) {
+      TBOX_ASSERT(tag_buffer[i] >= 0);
+   }
+#endif
+   if (d_barrier_and_time) {
+      t_regrid_all_finer->barrierAndStart();
+   }
+   t_misc5->start();
+
+   if (d_hierarchy->levelCanBeRefined(level_number)) {
+
+      if (s_print_steps == 'y') {
+         tbox::plog
+         << "GriddingAlgorithm::regridAllFinerLevels: regridding finer than "
+         << level_number << "\n";
+      }
+
+      /*
+       * d_base_ln is used by private methods during regrid.
+       */
+      d_base_ln = level_number;
+
+      const tbox::Pointer<hier::PatchLevel> patch_level =
+         d_hierarchy->getPatchLevel(level_number);
+
+      t_process_error->start();
+      /*
+       * Perform pre-processing of error estimation data, if
+       * appropriate.
+       */
+      if (errorEstimationUsesTimeIntegration()) {
+         for (int ln = level_number;
+              ln <= d_hierarchy->getFinestLevelNumber(); ln++) {
+            if (d_hierarchy->levelCanBeRefined(ln)) {
+               bool initial_time = false;
+               double level_regrid_start_time = 0.;
+               if (regrid_start_time.getSize() < ln + 1) {
+                  tbox::IEEE::setNaN(level_regrid_start_time);
+               } else {
+                  level_regrid_start_time = regrid_start_time[ln];
+               }
+
+               d_tag_init_strategy->
+               preprocessErrorEstimation(d_hierarchy,
+                  ln,
+                  regrid_time,
+                  level_regrid_start_time,
+                  initial_time);
+            }
+         }
+      }
+      t_process_error->stop();
+
+      t_misc5->stop();
+      /*
+       * Recursively regrid each finer level.
+       */
+      const int finest_level_not_regridded = level_number;
+      regridFinerLevel(
+         level_number,
+         regrid_time,
+         finest_level_not_regridded,
+         level_is_coarsest_sync_level,
+         tag_buffer,
+         regrid_start_time);
+
+      t_misc5->start();
+
+      /*
+       * Invoke application-specific routines to reset information for those
+       * levels which have been modified.
+       */
+
+      if (d_hierarchy->getFinestLevelNumber() >= (level_number + 1)) {
+         if (d_barrier_and_time) {
+            t_reset_hier->barrierAndStart();
+         }
+         d_tag_init_strategy->
+         resetHierarchyConfiguration(d_hierarchy,
+            level_number + 1,
+            d_hierarchy->getFinestLevelNumber());
+         if (d_barrier_and_time) {
+            t_reset_hier->barrierAndStop();
+         }
+      }
+
+      d_base_ln = -1;
+
+      if (s_print_steps == 'y') {
+         tbox::plog
+         << "GriddingAlgorithm::regridAllFinerLevels: regridded finer than "
+         << level_number << "\n";
+      }
+
+   } //  if level cannot be refined, the routine drops through...
+
+#ifdef GA_RECORD_STATS
+   // Verified that this does not use much time.
+   recordStatistics(regrid_time);
+#endif
+
+   t_misc5->stop();
+
+   if (d_barrier_and_time) {
+      t_regrid_all_finer->barrierAndStop();
+   }
+
+   if (s_print_hierarchy == 'y') {
+      tbox::plog << "GriddingAlgorithm::regridAllFinerLevels produced:\n";
+      d_hierarchy->recursivePrint(tbox::plog, "", 4);
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ * Recursively, regrid each AMR hierarchy level finer than the specified
+ * level (indexed by level_number).  The process is as follows:
+ *
+ * (1) Initialize tags to false on the level.
+ *
+ * (2) If a finer level exists, set tag to true on level for each cell
+ *  that is refined.
+ *
+ * (3) Tag cells for refinement on level by applying application-
+ *  specific error estimation routines.
+ *
+ * (4) If a finer level exists, invoke process recursively (i.e.,
+ *  invoke step 1 on next finer level).
+ *
+ * (5) (Note we have popped out of recursion at this point).  Buffer
+ *  true tags on current level to keep disturbances on fine grids
+ *  until regridding occurs next.
+ *
+ * (6) Determine box configuration for new finer level, by calling
+ *  findRefinementBoxes() function.
+ *
+ * (7) If a finer level should exist in the hierarchy, create its
+ *  patches from the box description and initialize its data.  If
+ *  necessary, discard old level.
+ *
+ *************************************************************************
+ */
+
+void GriddingAlgorithm::regridFinerLevel(
+   const int tag_ln,
+   const double regrid_time,
+   const int finest_level_not_regridded,
+   const bool level_is_coarsest_sync_level,
+   const tbox::Array<int>& tag_buffer,
+   const tbox::Array<double>& regrid_start_time)
+{
+   TBOX_ASSERT((tag_ln >= 0)
+      && (tag_ln <= d_hierarchy->getFinestLevelNumber()));
+   TBOX_ASSERT(!(d_hierarchy->getPatchLevel(tag_ln).isNull()));
+   TBOX_ASSERT(finest_level_not_regridded >= 0
+      && finest_level_not_regridded <= tag_ln);
+   TBOX_ASSERT(tag_buffer.getSize() >= tag_ln + 1);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   for (int i = 0; i < tag_buffer.getSize(); i++) {
+      TBOX_ASSERT(tag_buffer[i] >= 0);
+   }
+#endif
+
+   const hier::IntVector& zero_vector(hier::IntVector::getZero(d_dim));
+
+   if (s_print_steps == 'y') {
+      tbox::plog
+      << "GriddingAlgorithm::regridFinerLevel: entered with tag_ln = "
+      << tag_ln << "\n";
+   }
+
+   hier::MappedBoxLevelConnectorUtils dlbg_edge_utils;
+
+   if (d_hierarchy->levelCanBeRefined(tag_ln)) {
+
+      if (d_barrier_and_time) {
+         t_misc4->start();
+      }
+
+      int new_ln = tag_ln + 1;
+
+      tbox::Pointer<hier::PatchLevel>
+      tag_level = d_hierarchy->getPatchLevel(tag_ln);
+
+      const hier::MappedBoxTree& domain_search_tree = d_hierarchy->getDomainSearchTree();
+      const hier::Connector& tag_to_tag = d_hierarchy->getConnector(tag_ln, tag_ln);
+
+      /*
+       * Compute nesting data at tag_ln for use in constructing
+       * level tag_ln+1;
+       */
+      computeNestingData(tag_ln);
+
+      /*
+       * The boolean "do_tagging" specifies whether or not tagging will
+       * be performed. This will be true except in two circumstances:
+       *   1) only user supplied refine boxes are used
+       *   2) the boxes are read from a previously dumped file.
+       *
+       * If either of these circumstances is true, tagging operations
+       * are NOT necessary so do_tagging will be set to false.
+       *
+       * The old level is generally removed when regridding, but
+       * some circumstances may warrant keeping the old level.  For
+       * example, if the refine region has not changed, there is no
+       * need to regenerate the finer level.  The boolean
+       * "remove_old_fine_level" specifies if the old level should
+       * be removed.
+       */
+      bool do_tagging = true;
+      if (d_tag_init_strategy->refineUserBoxInputOnly()) do_tagging = false;
+      bool remove_old_fine_level = true;
+
+      hier::MappedBoxLevel new_mapped_box_level(d_dim);
+      hier::Connector tag_to_new;
+      hier::Connector new_to_tag;
+      hier::Connector new_to_new;
+
+      if (d_barrier_and_time) {
+         t_misc4->barrierAndStop();
+      }
+
+      /*
+       * tag_to_finer is [tag_ln]->[tag_ln+2].
+       * finer_to_tag is [tag_ln]->[tag_ln+2].
+       *
+       * These are declared in this scope, computed and cached if
+       * [tag_ln+2] exists.  They are used to tag the footprint of
+       * [tag_ln+2] on level tag_ln.  Later on, they are used to
+       * bridge for [new_ln] <-> [tag_ln+2].
+       */
+      hier::Connector tag_to_finer, finer_to_tag;
+
+      /*
+       * Tag cells, determine refine boxes from tagged regions, and
+       * load balance in preparation for constructing new refined level.
+       */
+      if (do_tagging) {
+
+         /*
+          * Create communication schedule for buffer tags and set tags to
+          * false.
+          */
+
+         if (d_barrier_and_time) {
+            t_misc1->start();
+         }
+
+         t_bdry_fill_tags_create->start();
+         d_bdry_sched_tags[tag_ln] =
+            d_bdry_fill_tags->createSchedule(tag_level);
+         t_bdry_fill_tags_create->stop();
+
+         tag_level->allocatePatchData(d_tag_indx);
+         /*
+          * FIXME: fillTagsFromMappedBoxLevel is more complex than needed here.
+          * because we want to fill up the whole level, not fill selectively.
+          */
+         fillTagsFromMappedBoxLevel(
+            d_false_tag,
+            tag_level,
+            d_tag_indx,
+            d_hierarchy->getConnector(tag_ln, tag_ln),
+            true,
+            zero_vector);
+
+         /*
+          * Set tags to true for cells that currently cover next finer level.
+          * Note that this is not needed for all regridding strategies.  But
+          * knowledge of currently refined cells is generally useful to avoid
+          * repeated refining and coarsening of cells near boundaries of
+          * refined regions where error estimates may hover around the error
+          * tolerance. For example, the regridding scheme may require that
+          * the error in a cell that is currently refined fall below a
+          * certain tolerance  (generally different than the tolerance to
+          * refine the cell in the first place) before the cell will be
+          * de-refined.
+          */
+
+         if (d_hierarchy->finerLevelExists(tag_ln)) {
+            fillTagsFromMappedBoxLevel(
+               d_true_tag,
+               tag_level,
+               d_tag_indx,
+               d_hierarchy->getConnector(tag_ln, tag_ln + 1),
+               true,
+               zero_vector);
+         }
+
+         /*
+          * Determine cells needing refinement according to a specific
+          * error estimation procedure and set to true.
+          *
+          * The "level_is_coarsest_sync_level" is provided as an argument
+          * to this method.  Provide the additional check of whether the
+          * level is not the coarsest level and that it is not a new level
+          * in the hierarchy.  If all three conditions are true, the
+          * "coarsest_sync_level" argument passed into the tagCells method
+          * will be true.  Otherwise, it will be false.
+          */
+
+         bool coarsest_sync_level =
+            level_is_coarsest_sync_level &&
+            tag_ln > 0 &&
+            tag_ln <= finest_level_not_regridded;
+
+         bool initial_time = false;
+         double level_regrid_start_time = 0.;
+         if (regrid_start_time.getSize() < tag_ln + 1) {
+            tbox::IEEE::setNaN(level_regrid_start_time);
+         } else {
+            level_regrid_start_time = regrid_start_time[tag_ln];
+         }
+
+         if (d_barrier_and_time) {
+            t_misc1->barrierAndStop();
+         }
+
+         if (d_barrier_and_time) {
+            t_tag_cells_for_refinement->barrierAndStart();
+         }
+         d_tag_init_strategy->
+         tagCellsForRefinement(d_hierarchy,
+            tag_ln,
+            regrid_time,
+            d_tag_indx,
+            initial_time,
+            coarsest_sync_level,
+            d_hierarchy->levelCanBeRefined(tag_ln),
+            level_regrid_start_time);
+         if (d_barrier_and_time) {
+            t_tag_cells_for_refinement->barrierAndStop();
+         }
+
+         /*
+          * Check for user-tagged cells that violate proper nesting.
+          * except if user specified that the violating tags be ignored.
+          */
+         if (d_check_nonrefined_tags != 'i') {
+            checkNonrefinedTags(*tag_level, tag_ln);
+         }
+
+         /*
+          * Perform regridding recursively on finer levels, if appropriate.
+          */
+         if (d_hierarchy->finerLevelExists(tag_ln)
+             && d_hierarchy->levelCanBeRefined(new_ln)) {
+            if (s_print_steps == 'y') {
+               tbox::plog
+                  << "GriddingAlgorithm::regridFinerLevel: recursing to tag_ln = "
+                  << new_ln << "\n";
+            }
+            regridFinerLevel(
+               new_ln,
+               regrid_time,
+               finest_level_not_regridded,
+               false,
+               tag_buffer,
+               regrid_start_time);
+            if (s_print_steps == 'y') {
+               tbox::plog
+                  << "GriddingAlgorithm::regridFinerLevel: recursion returned to tag_ln = "
+                  << tag_ln << "\n";
+            }
+         }
+
+         if (d_barrier_and_time) {
+            t_misc2->barrierAndStart();
+         }
+
+         /*
+          * Buffer true tagged cells by specified amount which should be
+          * sufficient to keep disturbance on refined region until next
+          * regrid of the level occurs.
+          */
+         tag_level->allocatePatchData(d_buf_tag_indx);
+         bufferTagsOnLevel(d_true_tag, tag_level, tag_buffer[tag_ln]);
+
+         if (d_hierarchy->finerLevelExists(new_ln)) {
+
+            if (d_barrier_and_time) {
+               t_second_finer_tagging->start();
+            }
+            const hier::IntVector fill_box_growth =
+               d_hierarchy->getRatioToCoarserLevel(tag_ln + 2) * d_hierarchy->getProperNestingBuffer(
+                  tag_ln + 1);
+
+            tbox::Pointer<hier::PatchLevel> second_fine_level =
+               d_hierarchy->getPatchLevel(new_ln + 1);
+            /*
+             * We require [tag_ln+1]+tag_buffer to nest
+             * [tag_ln+2]+overflow.
+             * If the fine Connector width >= tag_buffer+overflow,
+             * the [tag_ln] -> [tag_ln+2] should see all the edges
+             * it needs to see for second_fine nesting.  (Note that
+             * we currently allow zero overflow.)
+             */
+            const hier::Connector& tag_to_old = d_hierarchy->getConnector(tag_ln, new_ln);
+            const hier::Connector& old_to_finer = d_hierarchy->getConnector(new_ln,
+                  new_ln + 1);
+            const hier::Connector& finer_to_old = d_hierarchy->getConnector(new_ln + 1,
+                  new_ln);
+            const hier::Connector& old_to_tag = d_hierarchy->getConnector(new_ln, tag_ln);
+            const hier::OverlapConnectorAlgorithm oca;
+            oca.bridge(tag_to_finer,
+               finer_to_tag,
+               tag_to_old,
+               old_to_finer,
+               finer_to_old,
+               old_to_tag);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+            oca.assertOverlapCorrectness(tag_to_finer, false, true, true);
+            oca.assertOverlapCorrectness(finer_to_tag, false, true, true);
+            TBOX_ASSERT(
+               tag_to_finer.getConnectorWidth()
+               * d_hierarchy->getRatioToCoarserLevel(tag_ln
+                  + 1) * d_hierarchy->getRatioToCoarserLevel(tag_ln + 2) >= fill_box_growth);
+#endif
+
+            hier::MappedBoxLevel dummy_finer_mapped_box_level = finer_to_old.getBase();
+            dlbg_edge_utils.addPeriodicImagesAndRelationships(
+               dummy_finer_mapped_box_level,
+               finer_to_tag,
+               tag_to_finer,
+               domain_search_tree,
+               tag_to_tag);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+            oca.assertOverlapCorrectness(tag_to_finer, false, true, false);
+            oca.assertOverlapCorrectness(finer_to_tag, false, true, false);
+#endif
+
+            fillTagsFromMappedBoxLevel(
+               d_true_tag,
+               tag_level,
+               d_tag_indx,
+               tag_to_finer,
+               true,
+               fill_box_growth);
+            if (d_barrier_and_time) {
+               t_second_finer_tagging->barrierAndStop();
+            }
+         }
+
+         tag_level->deallocatePatchData(d_buf_tag_indx);
+
+         if (d_barrier_and_time) {
+            t_misc2->stop();
+         }
+
+         /*
+          * Determine box array containing cells on level with a true tag
+          * value.  The box array must be contained in array of proper
+          * nesting boxes.
+          */
+         findRefinementBoxes(new_mapped_box_level,
+            tag_to_new,
+            new_to_tag,
+            tag_ln);
+
+         if (d_barrier_and_time) {
+            t_misc3->start();
+         }
+
+         if (s_print_steps == 'y') {
+            if (new_mapped_box_level.isInitialized()) {
+               tbox::plog
+               <<
+               "GriddingAlgorithm::regridFinerLevel got inititalized new_mapped_box_level\n";
+            } else {
+               tbox::plog
+               <<
+               "GriddingAlgorithm::regridFinerLevel got un-inititalized new_mapped_box_level\n";
+            }
+         }
+
+         if (new_mapped_box_level.isInitialized()) {
+            if (s_print_steps == 'y') {
+               tbox::plog
+               << "GriddingAlgorithm::findRefinementBoxes: bridge links\n";
+            }
+            t_bridge_links->start();
+            t_bridge_new_to_new->start();
+            const hier::OverlapConnectorAlgorithm oca;
+            oca.bridgeWithNesting(
+               new_to_new,
+               new_to_new,
+               new_to_tag,
+               tag_to_new,
+               new_to_tag,
+               tag_to_new,
+               zero_vector,
+               zero_vector,
+               d_hierarchy->getRequiredConnectorWidth(new_ln, new_ln));
+            t_bridge_new_to_new->stop();
+            t_bridge_links->stop();
+            TBOX_ASSERT(new_to_new.getConnectorWidth() ==
+               d_hierarchy->getRequiredConnectorWidth(new_ln, new_ln));
+         }
+
+         /*
+          * Deallocate tag arrays and schedule; no longer needed on current
+          * level.
+          */
+
+         tag_level->deallocatePatchData(d_tag_indx);
+         d_bdry_sched_tags[tag_ln].setNull();
+
+         if (d_barrier_and_time) {
+            t_misc3->barrierAndStop();
+         }
+
+      } else {
+
+         if (d_hierarchy->finerLevelExists(tag_ln)
+             && d_hierarchy->levelCanBeRefined(new_ln)) {
+            regridFinerLevel(
+               new_ln,
+               regrid_time,
+               finest_level_not_regridded,
+               false,
+               tag_buffer,
+               regrid_start_time);
+         }
+
+         /*
+          * If tagging is not necessary (do_tagging = false) we simply
+          * need to access the level boxes, either from a dumped file or
+          * from user-supplied refine boxes, and load balance them before
+          * constructing the finer level.
+          */
+         hier::BoxArray fine_boxes(d_dim);
+         readLevelBoxes(fine_boxes,
+            new_mapped_box_level,
+            tag_to_new,
+            new_to_tag,
+            tag_ln,
+            regrid_time,
+            remove_old_fine_level);
+
+         if (new_mapped_box_level.isInitialized()) {
+            if (s_print_steps == 'y') {
+               tbox::plog
+               << "GriddingAlgorithm::findRefinementBoxes: bridge links\n";
+            }
+            t_bridge_links->start();
+            t_bridge_new_to_new->start();
+            const hier::OverlapConnectorAlgorithm oca;
+            oca.bridgeWithNesting(
+               new_to_new,
+               new_to_new,
+               new_to_tag,
+               tag_to_new,
+               new_to_tag,
+               tag_to_new,
+               zero_vector,
+               zero_vector,
+               d_hierarchy->getRequiredConnectorWidth(new_ln, new_ln));
+            t_bridge_new_to_new->stop();
+            t_bridge_links->stop();
+            TBOX_ASSERT(new_to_new.getConnectorWidth() ==
+               d_hierarchy->getRequiredConnectorWidth(new_ln, new_ln));
+         }
+      }
+
+      /*
+       * Make new finer level (new_ln) if necessary, or remove
+       * next finer level if it is no longer needed.
+       */
+
+      if (new_mapped_box_level.isInitialized()) {
+
+         if (d_check_overlapping_patches != 'i') {
+            checkOverlappingPatches(new_to_new);
+         }
+
+         if (d_barrier_and_time) {
+            t_regrid_finer_create->barrierAndStart();
+         }
+         /*
+          * Either remove pre-existing fine level from hierarchy and make
+          * a new level, or just make a new fine level for hierarchy.
+          */
+
+         tbox::Pointer<hier::PatchLevel> old_fine_level;
+
+         tbox::ConstPointer<hier::MappedBoxLevel> old_mapped_box_level;
+         const hier::Connector* old_to_tag = NULL;
+         const hier::Connector* tag_to_old = NULL;
+
+         hier::IntVector ratio(tag_level->getRatioToLevelZero()
+                               * d_hierarchy->getRatioToCoarserLevel(new_ln));
+
+         if (d_hierarchy->finerLevelExists(tag_ln)) {
+            // Save a reference to old mapped_box_level before hierarchy dumps it.
+            old_mapped_box_level = d_hierarchy->getMappedBoxLevel(new_ln);
+            old_to_tag = &d_hierarchy->getConnector(new_ln, tag_ln);
+            tag_to_old = &d_hierarchy->getConnector(tag_ln, new_ln);
+
+            old_fine_level = d_hierarchy->getPatchLevel(new_ln);
+            d_hierarchy->removePatchLevel(new_ln);
+            ratio = old_fine_level->getRatioToLevelZero();
+         }
+
+         if (d_hierarchy->levelExists(new_ln + 1)) {
+            if (s_check_proper_nesting == 'y') {
+               /*
+                * Check that the new mapped_box_level nests the finer
+                * level (new_ln+1).  The mechanism for causing this
+                * nest to happen is that the footprint of
+                * mapped_box_level (new_ln+1) was used to tag for the
+                * new mapped_box_level.
+                */
+               const hier::IntVector required_nesting(d_dim, d_hierarchy->getProperNestingBuffer(new_ln) );
+               bool locally_nests = false;
+               const bool finer_nests_in_new =
+                  dlbg_edge_utils.baseNestsInHead(
+                     &locally_nests,
+                     *d_hierarchy->getMappedBoxLevel(new_ln + 1),
+                     new_mapped_box_level,
+                     required_nesting,
+                     hier::IntVector::getZero(d_dim),
+                     hier::IntVector::getZero(d_dim),
+                     &d_hierarchy->getPeriodicDomainSearchTree());
+               if (!finer_nests_in_new) {
+                  tbox::perr << "GriddingAlgorithm: new mapped_box_level\n"
+                             << "at ln=" << new_ln
+                             << " does not properly nest\n"
+                             << "existing finer mapped_box_level at ln="
+                             << new_ln + 1
+                             << " by the required nesting buffer of "
+                             << required_nesting
+                             << ".\nLocal nestingness: " << locally_nests
+                             << ".\nWriting MappedBoxLevels out to log file."
+                             << std::endl;
+                  tbox::plog
+                     << "Proper nesting violation with new_mapped_box_level of\n"
+                     << new_mapped_box_level.format("N->", 2)
+                     << "Proper nesting violation with finer mapped_box_level of\n"
+                     << d_hierarchy->getMappedBoxLevel(new_ln + 1)->format("F->", 2);
+                  hier::MappedBoxLevel external(d_dim);
+                  hier::Connector finer_to_new, finer_to_external;
+                  finer_to_new.initialize(
+                     *d_hierarchy->getMappedBoxLevel(new_ln + 1),
+                     new_mapped_box_level,
+                     required_nesting);
+                  const hier::OverlapConnectorAlgorithm oca;
+                  oca.findOverlaps(finer_to_new);
+                  tbox::plog << "Finer to new:\n" << finer_to_new.format("FN->", 3);
+                  dlbg_edge_utils.computeExternalParts(
+                     external,
+                     finer_to_external,
+                     finer_to_new,
+                     -required_nesting,
+                     d_hierarchy->getDomainSearchTree());
+                  tbox::plog << "External parts:\n" << finer_to_external.format("FE->", 3);
+                  TBOX_ERROR(
+                     "Internal library error: Failed to produce proper nesting.");
+               }
+            }
+         }
+
+         d_hierarchy->makeNewPatchLevel(new_ln,
+            new_mapped_box_level);
+
+         /*
+          * Cache Connectors for new level.
+          */
+         tbox::Pointer<hier::PatchLevel> new_level =
+            d_hierarchy->getPatchLevel(new_ln);
+         new_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+         createConnector(
+            *new_level->getMappedBoxLevel(),
+            new_to_new.getConnectorWidth(),
+            new_to_new.getNeighborhoodSets());
+         new_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+         createConnector(
+            *tag_level->getMappedBoxLevel(),
+            new_to_tag.getConnectorWidth(),
+            new_to_tag.getNeighborhoodSets());
+         tag_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+         createConnector(
+            *new_level->getMappedBoxLevel(),
+            tag_to_new.getConnectorWidth(),
+            tag_to_new.getNeighborhoodSets());
+
+         if (d_hierarchy->levelExists(new_ln + 1)) {
+            /*
+             * Connect the new level to the finer level.
+             */
+            hier::Connector new_to_finer;
+            hier::Connector finer_to_new;
+            t_bridge_new_to_finer->start();
+            const hier::OverlapConnectorAlgorithm oca;
+            oca.bridgeWithNesting(
+               new_to_finer,
+               finer_to_new,
+               new_to_tag,
+               tag_to_finer,
+               finer_to_tag,
+               tag_to_new,
+               zero_vector,
+               -hier::IntVector::getOne(d_dim),
+               d_hierarchy->getRequiredConnectorWidth(new_ln, new_ln + 1));
+            t_bridge_new_to_finer->stop();
+            TBOX_ASSERT(
+               new_to_finer.getConnectorWidth() ==
+               d_hierarchy->getRequiredConnectorWidth(new_ln, new_ln + 1));
+            TBOX_ASSERT(
+               finer_to_new.getConnectorWidth() ==
+               d_hierarchy->getRequiredConnectorWidth(new_ln + 1, new_ln));
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+            oca.assertOverlapCorrectness(new_to_finer, false, true, true);
+            oca.assertOverlapCorrectness(finer_to_new, false, true, true);
+#endif
+            tbox::Pointer<hier::PatchLevel> finer_level =
+               d_hierarchy->getPatchLevel(new_ln + 1);
+            new_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+            createConnector(
+               *finer_level->getMappedBoxLevel(),
+               new_to_finer.getConnectorWidth(),
+               new_to_finer.getNeighborhoodSets());
+            finer_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+            createConnector(
+               *new_level->getMappedBoxLevel(),
+               finer_to_new.getConnectorWidth(),
+               finer_to_new.getNeighborhoodSets());
+         }
+
+         if (!old_mapped_box_level.isNull()) {
+            /*
+             * Connect old to new.  First compute edges by
+             * bridging, then create persistent Connectors
+             * for schedule generation.
+             */
+            hier::Connector old_to_new, new_to_old;
+            t_bridge_new_to_old->start();
+            const hier::OverlapConnectorAlgorithm oca;
+            oca.bridgeWithNesting(
+               old_to_new,
+               new_to_old,
+               *old_to_tag,
+               d_hierarchy->getConnector(tag_ln, tag_ln + 1),
+               d_hierarchy->getConnector(tag_ln + 1, tag_ln),
+               *tag_to_old,
+               zero_vector,
+               zero_vector,
+               d_hierarchy->getRequiredConnectorWidth(new_ln, new_ln));
+            t_bridge_new_to_old->stop();
+            new_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+            createConnector(
+               *old_fine_level->getMappedBoxLevel(),
+               new_to_old.getConnectorWidth(),
+               new_to_old.getNeighborhoodSets());
+            old_fine_level->getMappedBoxLevel()->getPersistentOverlapConnectors()
+            .createConnector(
+               *new_level->getMappedBoxLevel(),
+               old_to_new.getConnectorWidth(),
+               old_to_new.getNeighborhoodSets());
+         }
+
+         // "false" argument": const bool initial_time = false;
+         d_tag_init_strategy->initializeLevelData(d_hierarchy,
+            new_ln,
+            regrid_time,
+            d_hierarchy->levelCanBeRefined(new_ln),
+            false,
+            old_fine_level);
+
+         /*
+          * Destroy old patch level, if such a level existed prior to regrid.
+          */
+         old_fine_level.setNull();
+         if (d_barrier_and_time) {
+            t_regrid_finer_create->barrierAndStop();
+         }
+
+      } else {
+
+         /*
+          * If there are no boxes for the new fine level, remove the
+          * pre-existing fine level if it existed.
+          */
+
+         if (d_hierarchy->finerLevelExists(tag_ln)
+             && remove_old_fine_level) {
+            d_hierarchy->removePatchLevel(new_ln);
+         }
+
+      } // if we are not re-gridding the level
+
+   } //  if level cannot be refined, the routine drops through...
+
+}
+
+/*
+ *************************************************************************
+ * Check for boundary proximity violations.  Boxes may not be within
+ * extend_ghosts of a physical boundary without touching the physical
+ * boundary.
+ *************************************************************************
+ */
+size_t GriddingAlgorithm::checkBoundaryProximityViolation(
+   const hier::MappedBoxLevel& mapped_box_level,
+   const hier::MappedBoxTree& periodic_domain_search_tree,
+   const hier::IntVector& extend_ghosts) const
+{
+   /*
+    * 1. Compute the boundary regions of the boxes.
+    *    a. Grow temporary boxes by the max ghost width.
+    *    b. Remove orig boxes from the grown boxes to get ghost regions.
+    *    c. Remove domain from the ghost region.
+    * 2. Physical boundary regions which should not
+    *    be less wide than the max ghost width.  If they are,
+    *    it means they are partially inside the domain.
+    */
+
+   tbox::Pointer<hier::MappedBoxTree> refined_periodic_domain_search_tree(
+      periodic_domain_search_tree.createRefinedTree(mapped_box_level.getRefinementRatio()));
+
+   size_t nerr(0);
+
+   for (hier::RealMappedBoxConstIterator bi(mapped_box_level.getMappedBoxes());
+        bi.isValid(); ++bi) {
+
+      hier::BoxList external_parts(hier::Box::grow(bi->getBox(), extend_ghosts));
+      external_parts.removeIntersections(*refined_periodic_domain_search_tree);
+
+      for (hier::BoxList::Iterator bli(external_parts); bli; bli++) {
+         hier::IntVector leftover_size((*bli).numberCells());
+         for (int d = 0; d < d_dim.getValue(); ++d) {
+            if (leftover_size(d) != 0 && leftover_size(d) < extend_ghosts(d)) {
+               ++nerr;
+               TBOX_WARNING("GriddingAlgorithm::makeFinerLevel:\n"
+                  << "User-specified box (refined) " << *bi
+                  << " violates boundary proximity.\n"
+                  << "In dimension " << d << ", it is "
+                  << extend_ghosts(d) - leftover_size(d)
+                  << " cells from a physical domain boundary.\n"
+                  << "All boxes must be at least " << extend_ghosts
+                  << " from physical boundaries or touching the physical boundary.");
+            }
+         }
+      }
+
+   }
+
+   return nerr;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+void GriddingAlgorithm::recordStatistics(
+   double current_time)
+{
+#ifdef GA_RECORD_STATS
+// GA_RECORD_STATS is defined in GriddingAlgorithm.h
+/*
+ * For statistics, record number of cells and patches on new level.
+ */
+   for (int ln = 0; ln < d_hierarchy->getMaxNumberOfLevels(); ++ln) {
+      int level_gridcells = 0;
+      int level_local_patches = 0;
+      if (ln < d_hierarchy->getNumberOfLevels()) {
+         tbox::Pointer<hier::PatchLevel> patch_level =
+            d_hierarchy->getPatchLevel(ln);
+         level_gridcells += patch_level->getLocalNumberOfCells();
+         level_local_patches += patch_level->getLocalNumberOfPatches();
+         for (hier::PatchLevel::Iterator ip(patch_level); ip; ip++) {
+            tbox::Pointer<hier::Patch> patch = *ip;
+            level_gridcells += patch->getBox().size();
+            level_local_patches += 1;
+         }
+      }
+      d_boxes_stat[ln]->recordProcStat(double(level_local_patches));
+      d_cells_stat[ln]->recordProcStat(double(level_gridcells));
+      d_timestamp_stat[ln]->recordProcStat(double(current_time));
+   }
+#endif
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+void GriddingAlgorithm::printStatistics(
+   std::ostream& s) const
+{
+#ifdef GA_RECORD_STATS
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+   /*
+    * Output statistics.
+    */
+   // Collect statistic on mesh size.
+   tbox::Statistician* statn = tbox::Statistician::getStatistician();
+
+   statn->finalize(false);
+   // statn->printLocalStatData(s);
+   if (mpi.getRank() == 0) {
+      // statn->printAllGlobalStatData(s);
+      for (int ln = 0; ln < d_hierarchy->getMaxNumberOfLevels(); ++ln) {
+         tbox::Statistic& cstat = *d_cells_stat[ln];
+         tbox::Statistic& bstat = *d_boxes_stat[ln];
+         tbox::Statistic& tstat = *d_timestamp_stat[ln];
+         s << "statistic " << cstat.getName() << ":" << std::endl;
+         if (0) {
+            s << "Global: \n";
+            statn->printGlobalProcStatDataFormatted(cstat.getInstanceId(), s);
+         }
+         s
+         <<
+         " Seq#  SimTime       C-Sum      C-Avg      C-Min   ->    C-Max  C-NormDiff  B-Sum B-Avg B-Min -> B-Max B-NormDiff C/B-Avg\n";
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1572)
+#endif
+         for (int sn = 0; sn < cstat.getStatSequenceLength(); ++sn) {
+            double csum = statn->getGlobalProcStatSum(cstat.getInstanceId(), sn);
+            double cmax = statn->getGlobalProcStatMax(cstat.getInstanceId(), sn);
+            double cmin = statn->getGlobalProcStatMin(cstat.getInstanceId(), sn);
+            double cdiffnorm = cmax != 0 ? 1.0 - cmin / cmax : 0;
+            double bsum = statn->getGlobalProcStatSum(bstat.getInstanceId(), sn);
+            double bmax = statn->getGlobalProcStatMax(bstat.getInstanceId(), sn);
+            double bmin = statn->getGlobalProcStatMin(bstat.getInstanceId(), sn);
+            double bdiffnorm = bmax != 0 ? 1.0 - bmin / bmax : 0;
+            double stime = statn->getGlobalProcStatMin(
+                  tstat.getInstanceId(), sn);
+            s << std::setw(3) << sn << "  "
+              << std::scientific << std::setprecision(6) << std::setw(12)
+              << stime
+              << " "
+              << std::fixed << std::setprecision(0)
+              << std::setw(10) << csum << " "
+              << std::setw(10) << csum / mpi.getSize() << " "
+              << std::setw(10) << cmin << " -> "
+              << std::setw(10) << cmax
+              << "  " << std::setw(4) << std::setprecision(4) << cdiffnorm
+              << "  "
+              << std::fixed << std::setprecision(0)
+              << std::setw(6) << bsum << " "
+              << std::setw(5) << bsum / mpi.getSize() << " "
+              << std::setw(5) << bmin << "  ->"
+              << std::setw(5) << bmax
+              << "   " << std::setw(4) << std::setprecision(4) << bdiffnorm
+              << std::setw(10) << std::setprecision(0)
+              << (bsum != 0 ? csum / bsum : 0)
+              << std::endl;
+         }
+      }
+   }
+#endif
+}
+
+/*
+ *************************************************************************
+ * All tags reside in the given level.  But due to nesting restrictions,
+ * not all cells in the level are allowed to be refined.  We look for the
+ * portions of the level that would violate nesting if refined.  Any tags
+ * there are nonnesting tags.
+ *************************************************************************
+ */
+void GriddingAlgorithm::checkNonrefinedTags(
+   const hier::PatchLevel& level,
+   int tag_ln) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, level);
+
+   const hier::MappedBoxLevel& tag_mapped_box_level = *d_hierarchy->getMappedBoxLevel(tag_ln);
+   hier::MappedBoxLevel violator(d_dim);
+   hier::Connector tag_to_violator;
+   const hier::Connector& tag_mapped_box_level_to_self = d_hierarchy->getConnector(tag_ln,
+         tag_ln);
+   computeNestingViolator(tag_mapped_box_level,
+      violator,
+      tag_to_violator,
+      tag_mapped_box_level_to_self,
+      tag_mapped_box_level_to_self,
+      tag_ln + 1);
+
+   /*
+    * Check for user-tagged cells in the violating parts of the tag level.
+    */
+   math::PatchCellDataBasicOps<int> dataop;
+   math::PatchCellDataOpsInteger dataopi;
+   int maxval = 0;
+   const hier::NeighborhoodSet& tag_eto_violator = tag_to_violator.getNeighborhoodSets();
+   for (hier::NeighborhoodSet::const_iterator ei = tag_eto_violator.begin();
+        ei != tag_eto_violator.end(); ++ei) {
+      const hier::LocalId &patch_index = (*ei).first.getLocalId();
+      tbox::Pointer<hier::Patch> patch = level.getPatch(patch_index);
+      tbox::Pointer<pdat::CellData<int> > tag_data =
+         patch->getPatchData(d_tag_indx);
+      const NeighborSet& nabrs = (*ei).second;
+      for (NeighborSet::const_iterator na = nabrs.begin();
+           na != nabrs.end(); ++na) {
+         const hier::MappedBox& vio_mapped_box = *na;
+         maxval = dataop.max(tag_data, vio_mapped_box.getBox());
+         if (maxval > 0) {
+            // std::cout << "violator found in vio_mapped_box " << vio_mapped_box << std::endl;
+            // dataopi.printData( tag_data, tag_data->getBox(), std::cout );
+            break;
+         }
+      }
+      if (maxval > 0) {
+         // std::cout << "Violator found" << std::endl;
+         break;
+      }
+   }
+   const tbox::SAMRAI_MPI mpi(tag_mapped_box_level.getMPI());
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&maxval, 1, MPI_MAX);
+   }
+
+   if (maxval > 0) {
+      if (d_check_nonrefined_tags == 'w') {
+         TBOX_WARNING("User code has tagged cells in\n"
+            << "violation of nesting requirements.\n"
+            << "Violating tags will be discarded.\n"
+            << "See GriddingAlgorithm::checkNonrefinedTags()\n");
+      } else if (d_check_nonrefined_tags == 'e') {
+         TBOX_ERROR("User code has tagged cells in\n"
+            << "violation of nesting requirements.\n"
+            << "See GriddingAlgorithm::checkNonrefinedTags()\n");
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void GriddingAlgorithm::checkOverlappingPatches(
+   const hier::Connector& mapped_box_level_to_self) const
+{
+   int has_overlap = 0;
+   const hier::MappedBoxLevel& mapped_box_level = mapped_box_level_to_self.getBase();
+   const hier::NeighborhoodSet& edges = mapped_box_level_to_self.getNeighborhoodSets();
+   for (hier::NeighborhoodSet::const_iterator ei = edges.begin();
+        ei != edges.end(); ++ei) {
+      const hier::MappedBox& mapped_box = *mapped_box_level.getMappedBoxStrict(ei->first);
+      const NeighborSet& nabrs = ei->second;
+      for (NeighborSet::const_iterator na = nabrs.begin();
+           na != nabrs.end();
+           ++na) {
+         const hier::MappedBox& nabr = *na;
+         if (nabr != mapped_box) {
+            if (nabr.getBox().intersects(mapped_box.getBox())) {
+               has_overlap = 1;
+               break;
+            }
+         }
+      }
+      if (has_overlap) {
+         break;
+      }
+   }
+
+   if (has_overlap > 0) {
+      if (d_check_overlapping_patches == 'w') {
+         TBOX_WARNING(
+            "PatchLevel has patches which overlap in index space\n"
+            << "See GriddingAlgorithm::checkOverlappingPatches().\n"
+            <<
+            "Note that setting allow_patches_smaller_than_minimum_size_to_prevent_overlaps = FALSE\n"
+            << "in the PatchHierarchy can allow some patches to violate min size in order to prevent overlap.\n");
+      } else if (d_check_overlapping_patches == 'e') {
+         TBOX_ERROR(
+            "PatchLevel has patches which overlap in index space\n"
+            << "See GriddingAlgorithm::checkOverlappingPatches().\n"
+            <<
+            "Note that setting allow_patches_smaller_than_minimum_size_to_prevent_overlaps = FALSE\n"
+            << "in the PatchHierarchy can allow some patches to violate min size in order to prevent overlap.\n");
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ * For cases where tagging is not performed read the new level boxes
+ * either from user input or from stored level boxes.
+ *
+ *************************************************************************
+ */
+void GriddingAlgorithm::readLevelBoxes(
+   hier::BoxArray& new_level_boxes,
+   hier::MappedBoxLevel& new_mapped_box_level,
+   hier::Connector& coarser_to_new,
+   hier::Connector& new_to_coarser,
+   const int level_number,
+   const double regrid_time,
+   bool& remove_old_fine_level)
+{
+   (void)new_level_boxes;
+
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= d_hierarchy->getFinestLevelNumber()));
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim, *d_hierarchy, new_mapped_box_level);
+
+   const hier::MappedBoxLevel& coarser_mapped_box_level = *d_hierarchy->getMappedBoxLevel(
+         level_number);
+
+   int fine_level_number = level_number + 1;
+   hier::BoxArray boxes_to_refine(d_dim);
+
+   /*
+    * Access the user supplied refine boxes.  The
+    * "new_level_has_new_boxes" boolean specifies whether the
+    * level boxes have changed from the last time
+    * getUserSuppliedRefineBoxes() was called.  If they have changed,
+    * it returns true.  If they are unchanged, it returns false.
+    */
+   bool new_level_has_new_boxes = true;
+   if (d_tag_init_strategy->refineUserBoxInputOnly()) {
+
+      new_level_has_new_boxes = d_tag_init_strategy->
+         getUserSuppliedRefineBoxes(boxes_to_refine,
+            level_number,
+            regrid_time);
+
+   }
+
+   /*
+    * If "new_level_has_new_boxes" is false we wish to keep the
+    * existing fine level intact.  Avoid further work by setting
+    * the parameter "compute_load_balanced_level_boxes" to false
+    * and indicate that we want to avoid removing the old fine level
+    * by setting "remove_old_fine_level" to false.
+    */
+   bool compute_load_balanced_level_boxes = true;
+   if (!new_level_has_new_boxes) {
+      compute_load_balanced_level_boxes = false;
+      remove_old_fine_level = false;
+   }
+
+   /*
+    * If we are using the nonuniform load balance option, we
+    * still need to redo the load balance and construct a new level,
+    * even if the level boxes have not changed.
+    */
+
+   if (d_load_balancer->getLoadBalanceDependsOnPatchData(fine_level_number)
+       && boxes_to_refine.getNumberOfBoxes() > 0) {
+      compute_load_balanced_level_boxes = true;
+      remove_old_fine_level = true;
+   }
+
+   /*
+    * If the boxes_to_refine are empty, this implies that no
+    * refinement is desired so a new finer level will NOT be
+    * constructed.  In this case, avoid load balance steps and
+    * specify that we want to remove the old fine level.
+    */
+   if (boxes_to_refine.getNumberOfBoxes() == 0) {
+      compute_load_balanced_level_boxes = false;
+      remove_old_fine_level = true;
+   }
+
+   if (compute_load_balanced_level_boxes) {
+
+      hier::BoxList fine_box_list(boxes_to_refine);
+      fine_box_list.refine(d_hierarchy->getRatioToCoarserLevel(fine_level_number));
+      tbox::Pointer<hier::PatchLevel> patch_level =
+         d_hierarchy->getPatchLevel(level_number);
+
+      hier::IntVector ratio_to_level_zero =
+         patch_level->getRatioToLevelZero() * d_hierarchy->getRatioToCoarserLevel(fine_level_number);
+
+      hier::BoxArray physical_domain(d_dim);
+      d_hierarchy->getGridGeometry()->
+      computePhysicalDomain(physical_domain,
+         ratio_to_level_zero);
+
+      hier::MappedBoxLevel unbalanced_mapped_box_level(d_dim);
+      unbalanced_mapped_box_level.initialize(
+         coarser_mapped_box_level.getRefinementRatio(),
+         d_hierarchy->getDomainMappedBoxLevel().getMPI(),
+         hier::MappedBoxLevel::GLOBALIZED);
+      for (hier::LocalId i(0); i < boxes_to_refine.size(); ++i) {
+         hier::MappedBox unbalanced_mapped_box(boxes_to_refine[i.getValue()], i, 0);
+         unbalanced_mapped_box_level.addMappedBox(unbalanced_mapped_box);
+      }
+
+      const hier::IntVector& ratio =
+         d_hierarchy->getRatioToCoarserLevel(fine_level_number);
+
+      new_mapped_box_level = unbalanced_mapped_box_level;
+      coarser_to_new.initialize(
+         coarser_mapped_box_level,
+         new_mapped_box_level,
+         d_hierarchy->getRequiredConnectorWidth(level_number, level_number + 1));
+      new_to_coarser.initialize(
+         new_mapped_box_level,
+         coarser_mapped_box_level,
+         hier::IntVector::ceiling(d_hierarchy->getRequiredConnectorWidth(level_number + 1,
+               level_number), ratio));
+      const hier::OverlapConnectorAlgorithm oca;
+      oca.findOverlaps(coarser_to_new);
+      oca.findOverlaps(new_to_coarser);
+#if 0
+      new_to_coarser.assertConsistencyWithBase();
+      new_to_coarser.assertConsistencyWithHead();
+      coarser_to_new.assertConsistencyWithBase();
+      coarser_to_new.assertConsistencyWithHead();
+      tbox::plog << "coarser\n"; << coarser_mapped_box_level.format("C->", 2)
+      << "new\n" << new_mapped_box_level.format("N->", 2)
+      << "coarser_to_new\n" << coarser_to_new.format("CN->", 2)
+      << "new_to_coarser\n" << new_to_coarser.format("NC->", 2);
+      coarser_to_new.assertTransposeCorrectness(new_to_coarser);
+#endif
+
+      hier::IntVector smallest_patch(d_dim);
+      hier::IntVector largest_patch(d_dim);
+      hier::IntVector extend_ghosts(d_dim);
+      {
+      hier::IntVector smallest_box_to_refine(d_dim);
+      // "false" argument: for_building_finer level = false
+      getGriddingParameters(smallest_patch,
+         smallest_box_to_refine,
+         largest_patch,
+         extend_ghosts,
+         fine_level_number,
+         false);
+      }
+
+      hier::IntVector patch_cut_factor(d_dim, 1);
+
+      t_load_balance0->start();
+      d_load_balancer0->loadBalanceMappedBoxLevel(
+         new_mapped_box_level,
+         new_to_coarser,
+         coarser_to_new,
+         d_hierarchy,
+         level_number,
+         hier::Connector(),
+         hier::Connector(),
+         smallest_patch,
+         largest_patch,
+         d_hierarchy->getDomainMappedBoxLevel(),
+         extend_ghosts,
+         patch_cut_factor);
+      t_load_balance0->stop();
+
+      refineNewMappedBoxLevel(new_mapped_box_level,
+         coarser_to_new,
+         new_to_coarser,
+         ratio);
+      if (d_sequentialize_patch_indices) {
+         sortNodes(new_mapped_box_level,
+            coarser_to_new,
+            new_to_coarser,
+            false,
+            true);
+      }
+      const hier::Connector& coarser_to_coarser =
+         d_hierarchy->getConnector(level_number,
+            level_number);
+      const hier::MappedBoxLevelConnectorUtils dlbg_edge_utils;
+      dlbg_edge_utils.addPeriodicImagesAndRelationships(
+         new_mapped_box_level,
+         new_to_coarser,
+         coarser_to_new,
+         d_hierarchy->getDomainSearchTree(),
+         coarser_to_coarser);
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ * Set each integer value in specified tag array to tag_value where
+ * patch level intersects given box array.
+ *
+ *************************************************************************
+ */
+
+void GriddingAlgorithm::fillTagsFromMappedBoxLevel(
+   const int tag_value,
+   const tbox::Pointer<hier::PatchLevel> level,
+   const int tag_index,
+   const hier::Connector& level_to_fill_mapped_box_level,
+   const bool interior_only,
+   const hier::IntVector& fill_box_growth) const
+{
+   TBOX_ASSERT((tag_value == d_true_tag) || (tag_value == d_false_tag));
+   TBOX_ASSERT(!(level.isNull()));
+   TBOX_ASSERT(tag_index == d_tag_indx || tag_index == d_buf_tag_indx);
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim, *level, fill_box_growth);
+
+   t_fill_tags_from_mapped_box_level->start();
+
+   const hier::OverlapConnectorAlgorithm oca;
+
+   hier::IntVector ratio =
+      level_to_fill_mapped_box_level.getHead().getRefinementRatio()
+      / level_to_fill_mapped_box_level.getBase().getRefinementRatio();
+   TBOX_ASSERT(ratio == level_to_fill_mapped_box_level.getRatio());
+
+   const hier::IntVector width =
+      hier::IntVector::ceiling(fill_box_growth,
+         level_to_fill_mapped_box_level.getRatio());
+
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      tbox::Pointer<pdat::CellData<int> >
+      tag_data = patch->getPatchData(tag_index);
+
+      TBOX_ASSERT(!(tag_data.isNull()));
+
+      const hier::GlobalId& global_id(patch->getGlobalId());
+
+      NeighborSet neighbors;
+
+      oca.extractNeighbors(
+         neighbors,
+         level_to_fill_mapped_box_level,
+         global_id,
+         width);
+
+      for (NeighborSet::const_iterator
+           ni = neighbors.begin(); ni != neighbors.end(); ++ni) {
+         hier::Box box = (*ni).getBox();
+         box.grow(fill_box_growth);
+         box.coarsen(ratio);
+         if (interior_only) {
+            box = box * tag_data->getBox();
+         }
+         tag_data->fill(tag_value, box);
+      }
+
+   }
+   t_fill_tags_from_mapped_box_level->stop();
+}
+
+/*
+ *************************************************************************
+ *
+ * Buffer each integer tag with given value on the patch level by the
+ * specified buffer size.  Note that the patch data indexed by
+ * d_buf_tag_indx is used temporarily to buffer the tag data. The
+ * communication of ghost cell (i.e., buffer) information forces all
+ * tags on all patch interiors to represent a consistent buffering of
+ * the original configuration of tagged cells.
+ *
+ *************************************************************************
+ */
+
+void GriddingAlgorithm::bufferTagsOnLevel(
+   const int tag_value,
+   const tbox::Pointer<hier::PatchLevel> level,
+   const int buffer_size) const
+{
+   TBOX_ASSERT((tag_value == d_true_tag) || (tag_value == d_false_tag));
+   TBOX_ASSERT(!(level.isNull()));
+   TBOX_ASSERT(buffer_size >= 0);
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *level);
+   /*
+    * Start timer for this method.
+    */
+   t_buffer_tags->start();
+
+   /*
+    * Set temporary buffered tags based on buffer width and
+    * distance from actual tags.
+    */
+   const int not_tag = ((tag_value == d_true_tag) ? d_false_tag : d_true_tag);
+   for (hier::PatchLevel::Iterator ip1(level); ip1; ip1++) {
+      tbox::Pointer<hier::Patch> patch = *ip1;
+
+      tbox::Pointer<pdat::CellData<int> >
+      buf_tag_data = patch->getPatchData(d_buf_tag_indx);
+      tbox::Pointer<pdat::CellData<int> >
+      tag_data = patch->getPatchData(d_tag_indx);
+
+      buf_tag_data->fillAll(not_tag);
+
+      hier::Box interior = patch->getBox();
+
+      for (int bc = buffer_size; bc >= 0; bc--) {
+
+         int fill_val = buffer_size - bc + 1;
+
+         for (pdat::CellIterator ic(interior); ic; ic++) {
+            if ((*tag_data)(ic()) == tag_value) {
+               hier::Box buf_box(ic() - bc, ic() + bc);
+               buf_tag_data->fill(fill_val, buf_box * interior);
+            }
+         }
+
+      }
+
+   }
+
+   /*
+    * Communicate boundary data for buffered tag array so that tags
+    * near patch boundaries will become buffered properly.
+    */
+   const double dummy_time = 0.0;
+
+   t_bdry_fill_tags_comm->start();
+   d_bdry_sched_tags[level->getLevelNumber()]->fillData(dummy_time);
+   t_bdry_fill_tags_comm->stop();
+
+   /*
+    * Buffer tags on patch interior according to buffered tag data.
+    */
+   for (hier::PatchLevel::Iterator ip2(level); ip2; ip2++) {
+      tbox::Pointer<hier::Patch> patch = *ip2;
+
+      tbox::Pointer<pdat::CellData<int> > buf_tag_data =
+         patch->getPatchData(d_buf_tag_indx);
+      tbox::Pointer<pdat::CellData<int> > tag_data =
+         patch->getPatchData(d_tag_indx);
+
+      hier::Box buf_tag_box = buf_tag_data->getGhostBox();
+      hier::Box tag_box = tag_data->getBox();
+
+      /*
+       * Set all interior tags to tag value where buffer tags non-zero.
+       */
+      for (pdat::CellIterator ic(tag_box); ic; ic++) {
+         (*tag_data)(ic()) = ((*buf_tag_data)(ic()) ? tag_value : not_tag);
+      }
+
+      /*
+       * Set all interior tags in buffers around tags in ghosts.
+       */
+      for (pdat::CellIterator ic2(buf_tag_box); ic2; ic2++) {
+         int tval = (*buf_tag_data)(ic2());
+         if (tval > 1) {
+            int buf_size = tval - 1;
+            hier::Box buf_box(ic2() - buf_size, ic2() + buf_size);
+            tag_data->fill(tag_value, buf_box);
+         }
+      }
+   }
+
+   t_buffer_tags->stop();
+}
+
+/*
+ *************************************************************************
+ *
+ * Given a patch level, determine an appropriate array of boxes from
+ * which a new finer level may be constructed.  That is, find an array
+ * of boxes that covers all tags having the specified tag value.  Note
+ * that it is assumed that the integer tag arrays have been set
+ * properly; i.e., cells have been tagged through error estimation and
+ * the tags have been buffered to ensure disturbances remain on fine
+ * level until next regrid occurs.  Note that load balancing is
+ * performed once an appropriate list of boxes containing the tags is
+ * found.  This procedure massages the list of boxes further and then
+ * assigns each to a single processor (i.e., the mapping).
+ *
+ *************************************************************************
+ */
+
+void GriddingAlgorithm::findRefinementBoxes(
+   hier::MappedBoxLevel& new_mapped_box_level,
+   hier::Connector& tag_to_new,
+   hier::Connector& new_to_tag,
+   const int tag_ln) const
+{
+   TBOX_ASSERT((tag_ln >= 0)
+      && (tag_ln <= d_hierarchy->getFinestLevelNumber()));
+   TBOX_ASSERT(!(d_hierarchy->getPatchLevel(tag_ln).isNull()));
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim, new_mapped_box_level, *d_hierarchy);
+
+   if (s_print_steps == 'y') {
+      tbox::plog
+      << "GriddingAlgorithm::findRefinementBoxes entered with tag_ln = "
+      << tag_ln << "\n";
+   }
+
+   const hier::OverlapConnectorAlgorithm oca;
+   const hier::MappedBoxLevelConnectorUtils dlbg_edge_utils;
+
+   /*
+    * Start timer for this method.
+    */
+   if (d_barrier_and_time) {
+      t_find_refinement->barrierAndStart();
+   }
+
+   const hier::MappedBoxLevel& tag_mapped_box_level = *d_hierarchy->getMappedBoxLevel(tag_ln);
+
+   const int new_ln = tag_ln + 1;
+
+   /*
+    * Construct list of boxes covering the true tags on the level.
+    * Note that box list will be contained in the bounding box
+    * but will not be contained in the list of proper nesting boxes,
+    * in general.  So we intersect the box list against the list of
+    * nesting boxes.  Note that this may produce boxes which are too
+    * small.  Thus, boxes are regrown later.
+    */
+
+   hier::IntVector smallest_patch(d_dim);
+   hier::IntVector smallest_box_to_refine(d_dim);
+   hier::IntVector largest_patch(d_dim);
+   hier::IntVector extend_ghosts(d_dim);
+   // "true" argument: for_building_finer level = true
+   getGriddingParameters(smallest_patch,
+      smallest_box_to_refine,
+      largest_patch,
+      extend_ghosts,
+      new_ln,
+      true);
+
+   const hier::IntVector smallest_patch_in_tag_space =
+      hier::IntVector::ceiling(smallest_patch,
+                               d_hierarchy->getRatioToCoarserLevel(new_ln));
+   const hier::IntVector largest_patch_in_tag_space =
+      largest_patch/d_hierarchy->getRatioToCoarserLevel(new_ln);
+   const hier::IntVector extend_ghosts_in_tag_space =
+      hier::IntVector::ceiling(extend_ghosts,
+                               d_hierarchy->getRatioToCoarserLevel(new_ln));
+
+   tbox::Pointer<hier::PatchLevel> level =
+      d_hierarchy->getPatchLevel(tag_ln);
+
+   /*
+    * Determine single smallest bounding box for all nesting boxes.
+    */
+   hier::Box bounding_box(d_dim);
+   bounding_box =
+      d_hierarchy->getMappedBoxLevel(tag_ln)->getGlobalBoundingBox();
+
+   if (s_print_steps == 'y') {
+      tbox::plog << "GriddingAlgorithm::findRefinementBoxes: clustering\n";
+   }
+
+   t_find_boxes_containing_tags->barrierAndStart();
+   hier::IntVector ratio = d_hierarchy->getRatioToCoarserLevel(new_ln);
+
+   /*
+    * Compute the width for tag<==>cluster.  This width be wide enough to
+    * guarantee completeness for tag<==>new when we massage the
+    * cluster into the new level.  In the massage step, we grow the new boxes.
+    * The width of tag<==>cluster must be big enough to see new overlaps
+    * generated by the growths.
+    */
+   hier::IntVector tag_to_cluster_width =
+      d_hierarchy->getRequiredConnectorWidth(tag_ln, tag_ln + 1);
+   if (d_extend_to_domain_boundary) {
+      // For extending boxes to domain boundary by amount of extend_ghosts_in_tag_space.
+      tag_to_cluster_width += extend_ghosts_in_tag_space;
+   }
+   // For growing within domain by amount of smallest_box_to_refine.
+   tag_to_cluster_width += smallest_box_to_refine;
+
+   d_box_generator->findBoxesContainingTags(
+      new_mapped_box_level,
+      tag_to_new,
+      new_to_tag,
+      level, d_tag_indx, d_true_tag, bounding_box,
+      smallest_box_to_refine,
+      getEfficiencyTolerance(tag_ln),
+      getCombineEfficiency(tag_ln),
+      tag_to_cluster_width);
+   t_find_boxes_containing_tags->stop();
+
+   if (new_mapped_box_level.getGlobalNumberOfBoxes() > 0) {
+
+      if (s_check_connectors == 'y') {
+         /*
+          * At this stage, there are no edges to periodic images yet, so
+          * don't check for them.
+          */
+         if (s_print_steps == 'y') {
+            tbox::plog
+            <<
+            "GriddingAlgorithm::findRefinementBoxes: checking new-->tag from findBoxesContainingTags\n";
+         }
+         TBOX_ASSERT(oca.checkOverlapCorrectness(new_to_tag,
+               false,
+               true,
+               true) == 0);
+         if (s_print_steps == 'y') {
+            tbox::plog
+            <<
+            "GriddingAlgorithm::findRefinementBoxes: checking tag-->new from findBoxesContainingTags\n";
+         }
+         TBOX_ASSERT(oca.checkOverlapCorrectness(tag_to_new,
+               false,
+               true,
+               true) == 0);
+      }
+
+      t_box_massage->start();
+
+
+      {
+         if (s_print_steps == 'y') {
+            tbox::plog
+            <<
+            "GriddingAlgorithm::findRefinementBoxes: enforcing overflow nesting\n";
+         }
+
+         if (d_barrier_and_time) {
+            t_limit_overflow->barrierAndStart();
+         }
+         /*
+          * Do not allow the new mapped_box_level to overflow the tag mapped_box_level.
+          * If we want to allow the overflow, we have to add the
+          * overflow ammount to width of tag->new.  Such additions
+          * may make the ABR algorithm slower, because more
+          * non-contributing processors would have to be included
+          * in the contributing group (unless ABR keep track of
+          * the non-contributing processors and don't seek tag
+          * histogram from them).
+          */
+         const hier::IntVector allowed_overflow(d_dim, 0);
+         hier::MappedBoxLevel nested_mapped_box_level(d_dim);
+         hier::Connector unnested_to_nested;
+         makeOverflowNestingMap(new_mapped_box_level,
+            new_to_tag,
+            nested_mapped_box_level,
+            unnested_to_nested,
+            allowed_overflow);
+         if (s_print_steps == 'y') {
+            tbox::plog
+            << "GriddingAlgorithm::findRefinementBoxes applying overflow nesting map."
+            << std::endl;
+            tbox::plog << "Overflow nesting map:\n" << unnested_to_nested.format("", 3);
+         }
+         t_use_overflow_map->start();
+         t_modify_connector->start();
+         hier::MappingConnectorAlgorithm mca;
+         mca.modify(tag_to_new,
+            new_to_tag,
+            unnested_to_nested,
+            &new_mapped_box_level);
+         t_modify_connector->stop();
+         t_use_overflow_map->stop();
+         if (d_barrier_and_time) {
+            t_limit_overflow->stop();
+         }
+         if (s_print_steps == 'y') {
+            tbox::plog
+            << "GriddingAlgorithm::findRefinementBoxes finished applying overflow nesting map."
+            << std::endl;
+         }
+
+         if (s_check_overflow_nesting == 'y') {
+            if (s_print_steps == 'y') {
+               tbox::plog << "GriddingAlgorithm::findRefinementBoxes checking overflow."
+                          << std::endl;
+            }
+            bool locally_nested = false;
+            bool nested = dlbg_edge_utils.baseNestsInHead(
+                  &locally_nested,
+                  new_mapped_box_level,
+                  tag_mapped_box_level,
+                  allowed_overflow,
+                  hier::IntVector::getZero(d_dim),
+                  hier::IntVector::getZero(d_dim),
+                  &d_hierarchy->getDomainSearchTree());
+            if (!nested) {
+               TBOX_ERROR(
+                  "Failed overflow nesting: new mapped_box_level does not nest in tagged mapped_box_level.\n"
+                  << "allowed_overflow = " << allowed_overflow << std::endl
+                  << "Local nestedness = " << locally_nested << std::endl
+                  << "tag_mapped_box_level:\n" << tag_mapped_box_level.format("", 2)
+                  << "new_mapped_box_level:\n" << new_mapped_box_level.format("", 2)
+                  << "tag_to_new:\n" << tag_to_new.format("", 2)
+                  << "new_to_tag:\n" << new_to_tag.format("", 2));
+            }
+         }
+      }
+
+
+      if (d_enforce_proper_nesting) {
+
+         if (s_print_steps == 'y') {
+            tbox::plog
+            <<
+            "GriddingAlgorithm::findRefinementBoxes: enforcing proper nesting\n";
+         }
+         if (d_barrier_and_time) {
+            t_enforce_nesting->barrierAndStart();
+         }
+
+         hier::Connector unnested_to_nested;
+         /*
+          * Copy the input new_mapped_box_level so we can later connect
+          * new_mapped_box_level to its properly nested version.
+          */
+         hier::MappedBoxLevel nested_mapped_box_level(d_dim);
+         makeProperNestingMap(new_mapped_box_level,
+            tag_to_new,
+            new_to_tag,
+            new_ln,
+            nested_mapped_box_level,
+            unnested_to_nested);
+         if (s_print_steps == 'y') {
+            tbox::plog << "GriddingAlgorithm::findRefinementBoxes applying proper nesting map.\n"
+                       << "Proper nesting map:\n" << unnested_to_nested.format("", 3);
+         }
+         t_use_nesting_map->start();
+         t_modify_connector->start();
+         const hier::MappingConnectorAlgorithm mca;
+         mca.modify(tag_to_new,
+            new_to_tag,
+            unnested_to_nested,
+            &new_mapped_box_level);
+         t_modify_connector->stop();
+         t_use_nesting_map->stop();
+
+         if (d_barrier_and_time) {
+            t_enforce_nesting->stop();
+         }
+
+         if (tag_ln == d_base_ln && s_check_proper_nesting == 'y') {
+            /*
+             * Tag level will be regridded when we exit the current
+             * recursion if tag_ln is not d_base_ln, so do not check
+             * proper nesting in that case.
+             *
+             * Check that the new mapped_box_level nest in the tag
+             * level (tag_ln).
+             */
+            hier::IntVector required_nesting(d_dim);
+            if (tag_ln > 0) {
+               required_nesting =
+                  hier::IntVector(d_dim, d_hierarchy->getProperNestingBuffer(tag_ln));
+            } else {
+               required_nesting =
+                  d_hierarchy->getPatchDescriptor()->getMaxGhostWidth(d_dim);
+            }
+            bool locally_nests = false;
+            const bool new_nests_in_tag =
+               dlbg_edge_utils.baseNestsInHead(
+                  &locally_nests,
+                  new_mapped_box_level,
+                  tag_mapped_box_level,
+                  required_nesting,
+                  hier::IntVector::getZero(d_dim),
+                  hier::IntVector::getZero(d_dim),
+                  &d_hierarchy->getPeriodicDomainSearchTree());
+            if (!new_nests_in_tag) {
+               tbox::perr << "GriddingAlgorithm: new MappedBoxLevel\n"
+                          << "at ln=" << new_ln
+                          << " does not properly nest in\n"
+                          << "tag level at tag_ln=" << tag_ln
+                          << " by the required nesting buffer of "
+                          << required_nesting
+                          << ".\nLocal nestingness: " << locally_nests
+                          << ".\nWriting MappedBoxLevels out to log file."
+                          << std::endl;
+               tbox::plog
+                  << "Proper nesting violation with new MappedBoxLevel of\n" << new_mapped_box_level.format("N->", 2)
+                  << "Proper nesting violation with tag MappedBoxLevel of\n" << tag_mapped_box_level.format("T->", 2);
+               hier::MappedBoxLevel external(d_dim);
+               hier::Connector tmp_new_to_tag(
+                  new_mapped_box_level,
+                  tag_mapped_box_level,
+                  required_nesting);
+               oca.findOverlaps(tmp_new_to_tag);
+               tbox::plog << "tmp_new_to_tag:\n" << tmp_new_to_tag.format("NT->", 3);
+               hier::Connector new_to_external;
+               dlbg_edge_utils.computeExternalParts(
+                  external,
+                  new_to_external,
+                  tmp_new_to_tag,
+                  -required_nesting,
+                  d_hierarchy->getDomainSearchTree());
+               tbox::plog << "External parts:\n" << new_to_external.format("NE->", 3);
+               TBOX_ERROR(
+                  "Internal library error: Failed to produce proper nesting.");
+            }
+         }
+      }
+
+      if (d_extend_to_domain_boundary) {
+
+         if (s_print_steps == 'y') {
+            tbox::plog
+            << "GriddingAlgorithm::findRefinementBoxes: extending nodes\n";
+         }
+
+         t_extend_to_domain_boundary->barrierAndStart();
+         extendMappedBoxesToDomainBoundary(
+            new_mapped_box_level,
+            tag_to_new,
+            new_to_tag,
+            level->getPhysicalDomain(),
+            extend_ghosts_in_tag_space,
+            tag_ln);
+         t_extend_to_domain_boundary->stop();
+      }
+
+      bool allow_patches_smaller_than_minimum_size_to_prevent_overlaps =
+         d_hierarchy->allowPatchesSmallerThanMinimumSize();
+
+      // BTNG: these if-else blocks can be significantly simplified by factoring.
+      if (!allow_patches_smaller_than_minimum_size_to_prevent_overlaps) {
+         if (s_print_steps == 'y') {
+            tbox::plog
+            << "GriddingAlgorithm::findRefinementBoxes: growing boxes\n";
+         }
+         t_extend_within_domain->start();
+         hier::MappedBoxLevel grown_mapped_box_level(d_dim);
+         hier::Connector new_to_grown;
+         makeBoxGrowingMap(
+            new_mapped_box_level,
+            tag_to_new,
+            new_to_tag,
+            tag_ln,
+            grown_mapped_box_level,
+            new_to_grown,
+            smallest_box_to_refine);
+         if (s_print_steps == 'y') {
+            tbox::plog << "GriddingAlgorithm::findRefinementBoxes applying box growing map.\n"
+                       << "Box growing map:\n" << new_to_grown.format("", 3);
+         }
+
+         t_modify_connector->start();
+         const hier::MappingConnectorAlgorithm mca;
+         mca.modify(tag_to_new,
+            new_to_tag,
+            new_to_grown,
+            &new_mapped_box_level);
+         t_modify_connector->stop();
+         t_extend_within_domain->stop();
+      } else {
+         const hier::IntVector& periodic_dirs(
+            d_hierarchy->getGridGeometry()->getPeriodicShift(
+               hier::IntVector::getOne(d_dim)));
+
+         bool need_to_grow = false;
+         hier::IntVector min_size(hier::IntVector::getOne(d_dim));
+         for (int i = 0; i < d_dim.getValue(); i++) {
+            if (periodic_dirs(i)) {
+               need_to_grow = true;
+               min_size(i) = smallest_box_to_refine(i);
+            }
+         }
+
+         if (need_to_grow) {
+            t_extend_within_domain->start();
+            hier::MappedBoxLevel grown_mapped_box_level(d_dim);
+            hier::Connector new_to_grown;
+            makeBoxGrowingMap(
+               new_mapped_box_level,
+               tag_to_new,
+               new_to_tag,
+               tag_ln,
+               grown_mapped_box_level,
+               new_to_grown,
+               min_size);
+            t_modify_connector->start();
+            const hier::MappingConnectorAlgorithm mca;
+            mca.modify(tag_to_new,
+               new_to_tag,
+               new_to_grown,
+               &new_mapped_box_level);
+            t_modify_connector->stop();
+            t_extend_within_domain->stop();
+         } else {
+            /*
+             * Had we need to grow, the growth would have shrunken the widths.
+             * We must manually shrink the widths as if we used the growing map
+             * (matching the result of an empty map).
+             */
+            oca.shrinkConnectorWidth(tag_to_new,
+               tag_to_new.getConnectorWidth() - smallest_box_to_refine);
+            oca.shrinkConnectorWidth(new_to_tag,
+               new_to_tag.getConnectorWidth() - smallest_box_to_refine);
+         }
+      }
+
+      t_box_massage->stop();
+
+      if (d_load_balance) {
+         if (s_print_steps == 'y') {
+            tbox::plog
+            << "GriddingAlgorithm::findRefinementBoxes: load balancing\n";
+         }
+
+         t_load_balance->barrierAndStart();
+         t_load_balance_setup->start();
+
+         hier::IntVector patch_cut_factor(d_dim, 1);
+
+         t_load_balance_setup->stop();
+
+         d_load_balancer->loadBalanceMappedBoxLevel(
+            new_mapped_box_level,
+            new_to_tag,
+            tag_to_new,
+            d_hierarchy,
+            new_ln,
+            new_to_tag, // FIXME: try using finer as the attractor.
+            tag_to_new, // FIXME: try using finer as the attractor.
+            smallest_patch_in_tag_space,
+            largest_patch_in_tag_space,
+            d_hierarchy->getDomainMappedBoxLevel(),
+            extend_ghosts_in_tag_space,
+            patch_cut_factor);
+
+         t_load_balance->stop();
+
+         if (s_check_connectors == 'y') {
+            tbox::plog << "GriddingAlgorithm checking new-tag" << std::endl;
+            int errs = 0;
+            if (oca.checkOverlapCorrectness(new_to_tag, false, true, true)) {
+               ++errs;
+               tbox::perr << "Error found in new_to_tag!\n";
+            }
+            if (oca.checkOverlapCorrectness(tag_to_new, false, true, true)) {
+               ++errs;
+               tbox::perr << "Error found in tag_to_new!\n";
+            }
+            if (new_to_tag.checkTransposeCorrectness(tag_to_new)) {
+               ++errs;
+               tbox::perr << "Error found in new-tag transpose!\n";
+            }
+            if (errs != 0) {
+               TBOX_ERROR(
+                  "Errors found after using load balance map."
+                  << "new_mapped_box_level:\n" << new_mapped_box_level.format("", 2)
+                  << "tag_mapped_box_level:\n" << tag_mapped_box_level.format("", 2)
+                  << "new_to_tag:\n" << new_to_tag.format("", 2)
+                  << "tag_to_new:\n" << tag_to_new.format("", 2));
+            }
+         }
+      }
+
+      if (d_sequentialize_patch_indices) {
+         if (s_check_connectors == 'y') {
+            tbox::plog << "GriddingAlgorithm begin sorting nodes." << std::endl;
+         }
+         sortNodes(new_mapped_box_level,
+            tag_to_new,
+            new_to_tag,
+            false,
+            true);
+         if (s_check_connectors == 'y') {
+            tbox::plog << "GriddingAlgorithm end sorting nodes." << std::endl;
+         }
+      }
+
+      /*
+       * Add periodic image MappedBoxes to new_mapped_box_level and add edges
+       * incident on those nodes.
+       */
+      const hier::Connector& tag_to_tag =
+         d_hierarchy->getConnector(tag_ln, tag_ln);
+      if (s_check_connectors == 'y') {
+         tbox::plog << "GriddingAlgorithm begin adding periodic images."
+                    << std::endl;
+      }
+      dlbg_edge_utils.addPeriodicImagesAndRelationships(
+         new_mapped_box_level,
+         new_to_tag,
+         tag_to_new,
+         d_hierarchy->getDomainSearchTree(),
+         tag_to_tag);
+      if (s_check_connectors == 'y') {
+         tbox::plog << "GriddingAlgorithm begin adding periodic images."
+                    << std::endl;
+      }
+
+      if (s_check_connectors == 'y') {
+         TBOX_ASSERT(oca.checkOverlapCorrectness(new_to_tag) == 0);
+         TBOX_ASSERT(oca.checkOverlapCorrectness(tag_to_new) == 0);
+      }
+
+      /*
+       * We have been working with new_mapped_box_level in the tag_mapped_box_level's index space.
+       * Now, refine it so we can build the new level.
+       */
+      refineNewMappedBoxLevel(new_mapped_box_level,
+         tag_to_new,
+         new_to_tag,
+         ratio);
+
+      if (s_check_connectors == 'y') {
+         TBOX_ASSERT(oca.checkOverlapCorrectness(new_to_tag) == 0);
+         TBOX_ASSERT(oca.checkOverlapCorrectness(tag_to_new) == 0);
+      }
+
+   } else {
+
+      /*
+       * On return, new_mapped_box_level should be initialized if we generated boxes,
+       * deallocated if we didnt.
+       */
+      new_mapped_box_level.clear();
+
+   }
+
+   d_hierarchy->getDomainMappedBoxLevel().getMPI().Barrier();
+
+   if (d_barrier_and_time) {
+      t_find_refinement->stop();
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void GriddingAlgorithm::sortNodes(
+   hier::MappedBoxLevel& new_mapped_box_level,
+   hier::Connector& tag_to_new,
+   hier::Connector& new_to_tag,
+   bool sort_by_corners,
+   bool sequentialize_global_indices) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, new_mapped_box_level);
+
+   t_sort_nodes->start();
+
+   hier::OverlapConnectorAlgorithm oca;
+   hier::MappingConnectorAlgorithm mca;
+
+   hier::Connector sorting_map;
+   hier::MappedBoxLevel seq_mapped_box_level(d_dim);
+   hier::MappedBoxLevelConnectorUtils dlbg_edge_utils;
+   dlbg_edge_utils.makeSortingMap(
+      seq_mapped_box_level,
+      sorting_map,
+      new_mapped_box_level,
+      sort_by_corners /* sort nodes by corners */,
+      sequentialize_global_indices /* do not sequentialize indices globally */);
+
+   if (0) {
+      // Check sorting_map before using it.
+      int errs = 0;
+      if (mca.findMappingErrors(sorting_map, 'n')) {
+         ++errs;
+         tbox::perr << "sorting_map is not a valid mapping!\n";
+      }
+      /*
+       * Don't check sorting_map as an overlap Connector.
+       * It will have missing overlaps if the unsorted MappedBoxLevel
+       * have overlapping MappedBoxes.
+       */
+      if (errs != 0) {
+         TBOX_ERROR(
+            "Errors in sort mapping found."
+            << "unsorted mapped_box_level:\n" << new_mapped_box_level.format("", 2)
+            << "sorted mapped_box_level:\n" << seq_mapped_box_level.format("", 2)
+            << "sorting_map:\n" << sorting_map.format("", 2));
+      }
+   }
+   t_modify_connector->start();
+   mca.modify(tag_to_new,
+      new_to_tag,
+      sorting_map,
+      &new_mapped_box_level);
+   t_modify_connector->stop();
+   if (0) {
+      // Check result of mapping.
+      int err1 = static_cast<int>(
+         oca.checkOverlapCorrectness(tag_to_new, false, true, true));
+      if (err1 != 0) {
+         tbox::perr << "Error found in tag_to_new!\n";
+      }
+      int err2 = static_cast<int>(
+         oca.checkOverlapCorrectness(new_to_tag, false, true, true));
+      if (err2 != 0) {
+         tbox::perr << "Error found in new_to_tag!\n";
+      }
+      if (err1 != 0 || err2 != 0) {
+         TBOX_ERROR(
+            "Errors found after sequentializing nodes."
+            << "new_mapped_box_level:\n" << new_mapped_box_level.format("", 2)
+            << "tag mapped_box_level:\n" << tag_to_new.getBase().format("", 2)
+            << "tag_to_new:\n" << tag_to_new.format("", 2)
+            << "new_to_tag:\n" << new_to_tag.format("", 2));
+      }
+   }
+
+#if 0
+   TBOX_ASSERT(new_to_tag.checkOverlapCorrectness(false, true) == 0);
+   TBOX_ASSERT(tag_to_new.checkOverlapCorrectness(false, true) == 0);
+#endif
+
+   t_sort_nodes->stop();
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void GriddingAlgorithm::refineNewMappedBoxLevel(
+   hier::MappedBoxLevel& new_mapped_box_level,
+   hier::Connector& tag_to_new,
+   hier::Connector& new_to_tag,
+   const hier::IntVector& ratio) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim, new_mapped_box_level, ratio);
+
+   hier::MappedBoxSet refined_nodes;
+   hier::MappedBoxContainerUtils::refineMappedBoxSet(
+      refined_nodes,
+      new_mapped_box_level.getMappedBoxes(),
+      ratio);
+   new_mapped_box_level.swapInitialize(
+      refined_nodes,
+      ratio * new_mapped_box_level.getRefinementRatio(),
+      new_mapped_box_level.getMPI());
+
+   new_to_tag.initialize(
+      new_mapped_box_level,
+      new_to_tag.getHead(),
+      ratio * new_to_tag.getConnectorWidth(),
+      new_to_tag.getNeighborhoodSets(),
+      hier::MappedBoxLevel::DISTRIBUTED);
+
+   hier::NeighborhoodSet refined_tag_eto_new;
+   const hier::NeighborhoodSet cur_tag_eto_new = tag_to_new.getNeighborhoodSets();
+   for (hier::NeighborhoodSet::const_iterator ei = cur_tag_eto_new.begin();
+        ei != cur_tag_eto_new.end(); ++ei) {
+      hier::MappedBoxContainerUtils::refineMappedBoxSet(
+         refined_tag_eto_new[ei->first],
+         ei->second,
+         ratio);
+   }
+   tag_to_new.swapInitialize(
+      tag_to_new.getBase(),
+      new_mapped_box_level,
+      tag_to_new.getConnectorWidth(),
+      refined_tag_eto_new,
+      hier::MappedBoxLevel::DISTRIBUTED);
+#if 0
+   const hier::OverlapConnectorAlgorithm oca;
+   TBOX_ASSERT(oca.checkOverlapCorrectness(tag_to_new) == 0);
+   TBOX_ASSERT(oca.checkOverlapCorrectness(new_to_tag) == 0);
+#endif
+}
+
+/*
+ *************************************************************************
+ *
+ * Extend nodes to domain boundary if they are too close.
+ *
+ *************************************************************************
+ */
+
+void GriddingAlgorithm::extendMappedBoxesToDomainBoundary(
+   hier::MappedBoxLevel& new_mapped_box_level,
+   hier::Connector& tag_to_new,
+   hier::Connector& new_to_tag,
+   const hier::BoxArray& physical_domain_array,
+   const hier::IntVector& extend_ghosts,
+   const int new_ln) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, new_mapped_box_level);
+
+   (void)new_ln;
+
+   tbox::SAMRAI_MPI mpi(new_mapped_box_level.getMPI());
+
+   const hier::BoxList physical_domain_list(physical_domain_array);
+   /*
+    * Extend boxes to domain boundary if they are too close to one.  I
+    * think there is no need to modify connectivities when a box is
+    * extended to the domain boundary.  There is no increased overlap
+    * to a finer level, because the finer level already nests in the
+    * nodes being extended.  There is increased overlap with the
+    * coarser level, but it should not result in additional relationships,
+    * because there would not be enough room for an unseen coarse MappedBox
+    * to live in the small gap across which the MappedBox is being extended.
+    */
+   const hier::MappedBoxSet& before_nodes =
+      new_mapped_box_level.getMappedBoxes();
+
+   hier::MappedBoxLevel after_mapped_box_level(d_dim);
+   after_mapped_box_level.initialize(
+      new_mapped_box_level.getRefinementRatio(),
+      new_mapped_box_level.getMPI());
+   hier::NeighborhoodSet before_eto_after, after_eto_before;
+
+   int n_local_nodes_extended = 0;
+   for (hier::MappedBoxSet::const_iterator
+        nn = before_nodes.begin(); nn != before_nodes.end(); ++nn) {
+      const hier::MappedBox& before_mapped_box = *nn;
+      hier::MappedBox after_mapped_box = before_mapped_box;
+      bool extended =
+         hier::BoxUtilities::extendBoxToDomainBoundary(
+            after_mapped_box.getBox(),
+            physical_domain_list,
+            extend_ghosts);
+      if (extended) {
+         ++n_local_nodes_extended;
+      }
+      after_mapped_box_level.addMappedBox(after_mapped_box);
+      before_eto_after[
+         before_mapped_box.getGlobalId()].insert(after_mapped_box);
+      after_eto_before[
+         after_mapped_box.getGlobalId()].insert(before_mapped_box);
+   }
+
+   hier::Connector before_to_after, after_to_before;
+   before_to_after.swapInitialize(
+      new_mapped_box_level,
+      after_mapped_box_level,
+      extend_ghosts,
+      before_eto_after);
+   after_to_before.swapInitialize(
+      after_mapped_box_level,
+      new_mapped_box_level,
+      extend_ghosts,
+      after_eto_before);
+
+   /*
+    * BTNG: n_local_nodes_extended and n_global_nodes_extended are not
+    * needed.  Remove them.  There may be a slight performance
+    * improvement when the Allreduce is removed.
+    */
+   int n_global_nodes_extended;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(
+         &n_local_nodes_extended,
+         &n_global_nodes_extended,
+         1,
+         MPI_INT,
+         MPI_SUM);
+   } else {
+      n_global_nodes_extended = n_local_nodes_extended;
+   }
+
+   const hier::MappingConnectorAlgorithm mca;
+   mca.modify(tag_to_new,
+      new_to_tag,
+      before_to_after,
+      &new_mapped_box_level);
+
+#if 0
+   TBOX_WARNING("Performing extensive error checking due to using new code!");
+   TBOX_ASSERT(new_to_tag.checkOverlapCorrectness() == 0);
+   TBOX_ASSERT(tag_to_new.checkOverlapCorrectness() == 0);
+#endif
+}
+
+/*
+ *************************************************************************
+ * Make a map that can be used to enforce overflow nesting.
+ *************************************************************************
+ */
+
+void GriddingAlgorithm::makeOverflowNestingMap(
+   const hier::MappedBoxLevel& unnested_mapped_box_level,
+   const hier::Connector& unnested_to_nominal,
+   hier::MappedBoxLevel& nested_mapped_box_level,
+   hier::Connector& unnested_to_nested,
+   const hier::IntVector& allowed_overflow) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS3(d_dim,
+      unnested_mapped_box_level,
+      nested_mapped_box_level,
+      allowed_overflow);
+
+   (void)unnested_mapped_box_level;
+
+   t_make_overflow_map->start();
+
+   hier::MappedBoxLevel violator_mapped_box_level(d_dim);
+   hier::Connector unnested_to_violator;
+   if (s_print_steps == 'y') {
+      tbox::plog << " GriddingAlgorithm::makeOverflowNestingMap computing external parts."
+                 << std::endl;
+   }
+   t_make_overflow_map_compute->start();
+   hier::MappedBoxLevelConnectorUtils edge_utils;
+   t_compute_external_parts->start();
+   edge_utils.computeExternalParts(
+      violator_mapped_box_level,
+      unnested_to_violator,
+      unnested_to_nominal,
+      allowed_overflow,
+      d_hierarchy->getDomainSearchTree());
+   t_compute_external_parts->stop();
+   t_make_overflow_map_compute->stop();
+
+   TBOX_ASSERT(unnested_to_violator.isLocal());
+
+   if (s_print_steps == 'y') {
+      tbox::plog << " GriddingAlgorithm::makeOverflowNestingMap making remainer map." << std::endl;
+   }
+   t_make_overflow_map_convert->start();
+   edge_utils.makeRemainderMap(
+      nested_mapped_box_level,
+      unnested_to_nested,
+      unnested_to_violator);
+   t_make_overflow_map_convert->stop();
+   t_make_overflow_map->stop();
+
+   if (s_print_steps == 'y') {
+      tbox::plog << " GriddingAlgorithm::makeOverflowNestingMap checking remainer map."
+                 << std::endl;
+   }
+#if 0
+   hier::MappingConnectorAlgorithm mca;
+   mca.assertMappingValidity(unnested_to_nested);
+#endif
+   if (s_print_steps == 'y') {
+      tbox::plog << " GriddingAlgorithm::makeOverflowNestingMap finished." << std::endl;
+   }
+}
+
+/*
+ *************************************************************************
+ * Make a map that can be used to enforce proper nesting.
+ * @param unnested_ln Level number for refinenement ratio of unnested_mapped_box_level.
+ *************************************************************************
+ */
+
+void GriddingAlgorithm::makeProperNestingMap(
+   const hier::MappedBoxLevel& unnested_mapped_box_level,
+   const hier::Connector& hierarchy_to_unnested,
+   const hier::Connector& unnested_to_hierarchy,
+   const int unnested_ln,
+   hier::MappedBoxLevel& nested_mapped_box_level,
+   hier::Connector& unnested_to_nested) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS3(d_dim,
+      unnested_mapped_box_level,
+      nested_mapped_box_level,
+      nested_mapped_box_level);
+
+   t_make_nesting_map->start();
+
+   hier::Connector unnested_to_violator;
+   hier::MappedBoxLevel violator(d_dim);
+   t_make_nesting_map_compute->start();
+   computeNestingViolator(unnested_mapped_box_level,
+      violator,
+      unnested_to_violator,
+      unnested_to_hierarchy,
+      hierarchy_to_unnested,
+      unnested_ln);
+   t_make_nesting_map_compute->stop();
+
+   /*
+    * unnested_to_violator is the Connector from the nodes
+    * that violate nesting to their violating parts.
+    * Convert it to the mapping from unnested to nested.
+    */
+   const hier::MappedBoxLevelConnectorUtils edge_utils;
+   t_make_nesting_map_convert->start();
+   edge_utils.makeRemainderMap(
+      nested_mapped_box_level,
+      unnested_to_nested,
+      unnested_to_violator);
+   t_make_nesting_map_convert->stop();
+
+   t_make_nesting_map->stop();
+}
+
+/*
+ *************************************************************************
+ * Make a map from a MappedBoxLevel to parts of that MappedBoxLevel
+ * that violate proper nesting.
+ *
+ * The violating MappedBoxes are found by comparing candidate
+ * MappedBoxes to d_to_nesting_complement's head MappedBoxLevel.  Boxes
+ * inside the nesting complement violate nesting.
+ *************************************************************************
+ */
+void GriddingAlgorithm::computeNestingViolator(
+   const hier::MappedBoxLevel& candidate,
+   hier::MappedBoxLevel& violator,
+   hier::Connector& candidate_to_violator,
+   const hier::Connector& candidate_to_hierarchy,
+   const hier::Connector& hierarchy_to_candidate,
+   const int candidate_ln) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim, candidate, violator);
+
+   const hier::IntVector& zero_vector(hier::IntVector::getZero(d_dim));
+
+   // Check requirements on arguments.
+   TBOX_ASSERT(candidate_to_hierarchy.getRatio() ==
+      hier::IntVector::getOne(d_dim));
+   TBOX_ASSERT(hierarchy_to_candidate.getRatio() ==
+      hier::IntVector::getOne(d_dim));
+
+   t_compute_nesting_violator->start();
+
+   const hier::MappedBoxLevelConnectorUtils edge_utils;
+   const hier::OverlapConnectorAlgorithm oca;
+
+   const hier::MappedBoxSet& candidate_mapped_boxes = candidate.getMappedBoxes();
+
+   /*
+    * Bridge candidate to d_nesting_complement.
+    */
+   hier::Connector candidate_to_complement, complement_to_candidate;
+   oca.bridge(candidate_to_complement,
+      complement_to_candidate,
+      candidate_to_hierarchy,
+      d_to_nesting_complement[candidate_ln - 1],
+      d_from_nesting_complement[candidate_ln - 1],
+      hierarchy_to_candidate);
+
+   edge_utils.computeInternalParts(
+      violator,
+      candidate_to_violator,
+      candidate_to_complement,
+      zero_vector,
+      d_hierarchy->getDomainSearchTree());
+   /*
+    * Above step ignored the domain complement components of nesting
+    * definition (by necessity).  Where the candidate overlaps
+    * with the domain complement, it violates nesting.
+    */
+   tbox::Pointer<hier::MappedBoxTree> refined_domain_complement_tree =
+      d_domain_complement_tree.createRefinedTree(candidate.getRefinementRatio());
+   hier::NeighborhoodSet candidate_eto_violator;
+   candidate_to_violator.swapInitialize(
+      candidate_to_violator.getBase(),
+      candidate_to_violator.getHead(),
+      candidate_to_violator.getConnectorWidth(),
+      candidate_eto_violator);
+   for (hier::MappedBoxSet::const_iterator ni = candidate_mapped_boxes.begin();
+        ni != candidate_mapped_boxes.end(); ++ni) {
+      const hier::MappedBox& cmb = *ni;
+      hier::BoxList addl_violators(cmb.getBox());
+      addl_violators.intersectBoxes(*refined_domain_complement_tree);
+      if (!addl_violators.isEmpty()) {
+         if (candidate_eto_violator.find(cmb.getGlobalId()) !=
+             candidate_eto_violator.end()) {
+            /*
+             * Remove parts that we already know are non-nesting.
+             * Leftovers are non-nesting parts not found using
+             * candidate_to_complement.
+             */
+            NeighborSet& current_violators =
+               candidate_eto_violator[cmb.getGlobalId()];
+            for (NeighborSet::const_iterator na =
+                    current_violators.begin();
+                 na != current_violators.end() && !addl_violators.isEmpty();
+                 ++na) {
+               addl_violators.removeIntersections(na->getBox());
+            }
+            if (!addl_violators.isEmpty()) {
+               for (hier::BoxList::Iterator bi(addl_violators); bi; bi++) {
+                  hier::MappedBoxSet::iterator new_violator = violator.addBox(
+                        *bi);
+                  current_violators.insert(*new_violator);
+               }
+            }
+         }
+      }
+   }
+   candidate_to_violator.swapInitialize(
+      candidate_to_violator.getBase(),
+      candidate_to_violator.getHead(),
+      candidate_to_violator.getConnectorWidth(),
+      candidate_eto_violator);
+
+   t_compute_nesting_violator->stop();
+}
+
+/*
+ *************************************************************************
+ * Precompute data used to define proper nesting.  Data is associated
+ * with level number ln, to be used for constructing level number ln+1.
+ *
+ * If ln > d_base_ln, assume data at ln-1 is already set.
+ *************************************************************************
+ */
+
+void GriddingAlgorithm::computeNestingData(
+   const int ln)
+{
+   TBOX_ASSERT(d_base_ln >= 0 && ln >= d_base_ln);
+
+   const hier::MappedBoxTree& domain_search_tree = d_hierarchy->getDomainSearchTree();
+
+   const hier::MappedBoxLevelConnectorUtils edge_utils;
+   const hier::OverlapConnectorAlgorithm oca;
+
+   hier::IntVector tmp_gcw(d_dim);
+
+   if (ln == d_base_ln) {
+      /*
+       * At the base level, nesting domain is level d_base_ln,
+       * shrunken by d_proper_nesting_buffer[d_base_ln].
+       */
+      hier::MappedBoxLevel& proper_nesting_complement =
+         d_proper_nesting_complement[ln];
+      const hier::Connector& self_connector =
+         d_hierarchy->getConnector(ln, ln);
+
+      edge_utils.computeExternalParts(
+         proper_nesting_complement,
+         d_to_nesting_complement[ln],
+         self_connector,
+         hier::IntVector(d_dim, -d_hierarchy->getProperNestingBuffer(ln)),
+         d_hierarchy->getDomainSearchTree());
+
+      d_from_nesting_complement[ln].initializeToLocalTranspose(
+         d_to_nesting_complement[ln]);
+
+      /*
+       * By necessity, computeExternalParts neglected parts of the
+       * proper nesting complement that are outside the domain.  We
+       * must also build a search tree of the domain's complement
+       * which will be used to detect non-nesting cells lying outside
+       * the domain.
+       */
+      hier::Box universe(d_hierarchy->getDomainMappedBoxLevel().getGlobalBoundingBox());
+      universe.grow(hier::IntVector::getOne(d_dim));
+      hier::BoxList domain_complement_list(universe);
+      domain_complement_list.removeIntersections(domain_search_tree);
+      std::vector<hier::MappedBox> domain_complement_vector;
+      hier::MappedBoxContainerUtils::convertBoxListToMappedBoxVector(domain_complement_vector,
+            domain_complement_list);
+      d_domain_complement_tree.generateTree(domain_complement_vector);
+
+   } else {
+
+      TBOX_ASSERT(d_to_nesting_complement[ln - 1].isInitialized());
+
+      /*
+       * How to build d_proper_nesting_complement[ln] and connect it to level ln:
+       *
+       * In the left column are the MappedBoxLevels in the hierarchy.
+       * In the right are their associated proper nesting complements.
+       *
+       *                   (new
+       *                 Connector)
+       *                     |
+       *             Mapped  |   Proper
+       *               box   |   nesting
+       *             levels  | complements
+       *             ======  | ===========
+       *                     v
+       *               ln <-----> ln
+       *                ^        ^
+       *                |       /
+       *                |      /
+       *                |     /
+       * (existing      |    / <--(temporary
+       *  Connector)--> |   /      Connector)
+       *                |  /
+       *                | /
+       *                |/
+       *                v
+       *             ln-1 <-----> ln-1
+       *                     ^
+       *                     |
+       *                 (existing
+       *                  Connector)
+       *
+       * We have existing Connectors between ln and ln-1 and also between
+       * level ln-1 and the nesting complement at ln-1.
+       *
+       * 1. Build the complement at ln (d_proper_nesting_complement[ln])
+       *    from the complement at ln-1 (d_proper_nesting_complement[ln-1])
+       *    by a simple refinement of boxes.
+       *
+       * 2. Build the temporary Connector from level ln-1 to
+       *    complements at ln by using the fact that the complement at ln
+       *    is similar to the one at ln-1.
+       *
+       * 3. Bridge for the new Connector from level ln to the
+       *    complement at ln, using the temporary Connector.
+       */
+
+      /*
+       * 1. Build the complement at ln (d_proper_nesting_complement[ln])
+       *    from the complement at ln-1 (d_proper_nesting_complement[ln-1]).
+       */
+      d_proper_nesting_complement[ln].initialize(
+         d_hierarchy->getMappedBoxLevel(ln)->getRefinementRatio(),
+         d_to_nesting_complement[ln - 1].getMPI());
+      const hier::MappedBoxSet& lnm1_complement_mapped_boxes =
+         d_proper_nesting_complement[ln - 1].getMappedBoxes();
+      for (hier::MappedBoxSet::const_iterator ni =
+              lnm1_complement_mapped_boxes.begin();
+           ni != lnm1_complement_mapped_boxes.end(); ++ni) {
+         hier::MappedBox tmp_mapped_box = *ni;
+         TBOX_ASSERT(!tmp_mapped_box.isPeriodicImage());
+         tmp_mapped_box.getBox().refine(d_hierarchy->getRatioToCoarserLevel(ln));
+         tmp_mapped_box.getBox().grow(
+            hier::IntVector(d_dim, d_hierarchy->getProperNestingBuffer(ln)));
+         d_proper_nesting_complement[ln].addMappedBox(tmp_mapped_box);
+      }
+
+      /*
+       * 2. Temporarily connect level ln-1 and d_proper_nesting_complement[ln].
+       */
+      tmp_gcw = d_to_nesting_complement[ln - 1].getConnectorWidth();
+      tmp_gcw -= hier::IntVector::ceiling(
+            hier::IntVector(d_dim, d_hierarchy->getProperNestingBuffer(ln - 1)),
+            d_hierarchy->getRatioToCoarserLevel(ln));
+      hier::NeighborhoodSet lnm1_eto_ln_complement;
+      const hier::NeighborhoodSet& lnm1_eto_lnm1_complement =
+         d_to_nesting_complement[ln - 1].getNeighborhoodSets();
+      for (hier::NeighborhoodSet::const_iterator ei = lnm1_eto_lnm1_complement.begin();
+           ei != lnm1_eto_lnm1_complement.end(); ++ei) {
+         const NeighborSet& lnm1_nabrs = ei->second;
+         NeighborSet& ln_nabrs =
+            lnm1_eto_ln_complement[ei->first];
+         for (NeighborSet::const_iterator na =
+                 lnm1_nabrs.begin();
+              na != lnm1_nabrs.end(); ++na) {
+            hier::MappedBox tmp_mapped_box = *na;
+            tmp_mapped_box.getBox().refine(d_hierarchy->getRatioToCoarserLevel(ln));
+            tmp_mapped_box.getBox().grow(
+               hier::IntVector(d_dim, d_hierarchy->getProperNestingBuffer(ln)));
+            ln_nabrs.insert(ln_nabrs.end(), tmp_mapped_box);
+         }
+      }
+      tmp_gcw *= d_hierarchy->getRatioToCoarserLevel(ln);
+      hier::Connector lnm1_to_ln_complement;
+      lnm1_to_ln_complement.swapInitialize(
+         *d_hierarchy->getMappedBoxLevel(ln - 1),
+         d_proper_nesting_complement[ln],
+         d_to_nesting_complement[ln - 1].getConnectorWidth(),
+         lnm1_eto_ln_complement);
+      hier::Connector ln_complement_to_lnm1(
+         d_proper_nesting_complement[ln],
+         *d_hierarchy->getMappedBoxLevel(ln - 1),
+         d_from_nesting_complement[ln - 1].getConnectorWidth() * d_hierarchy->getRatioToCoarserLevel(ln),
+         d_from_nesting_complement[ln - 1].getNeighborhoodSets(),
+         hier::MappedBoxLevel::DISTRIBUTED);
+
+      /*
+       * 3. Bridge for Connector between level ln and d_proper_nesting_complement[ln].
+       */
+      oca.bridge(
+         d_to_nesting_complement[ln],
+         d_from_nesting_complement[ln],
+         d_hierarchy->getConnector(ln, ln - 1),
+         lnm1_to_ln_complement,
+         ln_complement_to_lnm1,
+         d_hierarchy->getConnector(ln - 1, ln),
+         d_hierarchy->getRequiredConnectorWidth(ln - 1, ln));
+   }
+}
+
+/*
+ *************************************************************************
+ * Make a map that can be used to grow a box within the domain where
+ * necessary.
+ *************************************************************************
+ */
+
+void GriddingAlgorithm::makeBoxGrowingMap(
+   const hier::MappedBoxLevel& new_mapped_box_level,
+   const hier::Connector& tag_to_new,
+   const hier::Connector& new_to_tag,
+   const int tag_ln,
+   hier::MappedBoxLevel& grown_mapped_box_level,
+   hier::Connector& new_to_grown,
+   const hier::IntVector& min_size) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS3(d_dim,
+      new_mapped_box_level,
+      grown_mapped_box_level,
+      min_size);
+
+   const hier::OverlapConnectorAlgorithm oca;
+
+   const hier::IntVector& one_vec = hier::IntVector::getOne(d_dim);
+
+   const hier::MappedBoxSet& new_mapped_boxes =
+      new_mapped_box_level.getMappedBoxes();
+   const hier::Connector& tag_to_nesting_complement =
+      d_to_nesting_complement[tag_ln];
+   const hier::Connector& nesting_complement_to_tag =
+      d_from_nesting_complement[tag_ln];
+
+   hier::Connector new_to_nesting_complement;
+   oca.bridge(
+      new_to_nesting_complement,
+      new_to_tag,
+      tag_to_nesting_complement,
+      nesting_complement_to_tag,
+      tag_to_new);
+
+   grown_mapped_box_level.initialize(
+      new_mapped_box_level.getRefinementRatio(),
+      new_mapped_box_level.getMPI());
+
+   hier::NeighborhoodSet new_eto_grown;
+
+   /*
+    * Above step ignored the domain complement components of nesting
+    * definition (by necessity).  We must add the domain's complement
+    * to neighbors in candidate_to_complement.
+    */
+   tbox::Pointer<hier::MappedBoxTree> refined_domain_complement_tree =
+      d_domain_complement_tree.createRefinedTree(
+         new_mapped_box_level.getRefinementRatio());
+
+   std::vector<hier::MappedBox> tmp_mapped_box_vector;
+   tmp_mapped_box_vector.reserve(10);
+
+   for (hier::MappedBoxSet::const_iterator ni = new_mapped_boxes.begin();
+        ni != new_mapped_boxes.end(); ++ni) {
+      const hier::MappedBox& omb = *ni;
+      TBOX_ASSERT(!omb.isPeriodicImage());
+
+      /*
+       * Build the domain complement as seen in omb's locality,
+       * consisting of omb's neighbors in new_to_nesting_complement
+       * and the domain's complement.
+       */
+
+      hier::BoxList local_nesting_complement;
+      if (new_to_nesting_complement.hasNeighborSet(omb.getLocalId())) {
+         hier::MappedBoxContainerUtils::convertMappedBoxSetToBoxList(
+            local_nesting_complement,
+            new_to_nesting_complement.getNeighborSet(omb.getLocalId()));
+      }
+
+      hier::Box box = omb.getBox();
+      box.grow(one_vec);
+      tmp_mapped_box_vector.clear();
+      refined_domain_complement_tree->findOverlapMappedBoxes(
+         tmp_mapped_box_vector,
+         box);
+      if (!tmp_mapped_box_vector.empty()) {
+         hier::MappedBoxContainerUtils::convertMappedBoxVectorToBoxList(
+            local_nesting_complement,
+            tmp_mapped_box_vector);
+         // tmp_mapped_box_vector.clear();
+      }
+
+      hier::MappedBox grown_mapped_box = omb;
+      hier::BoxUtilities::growBoxWithinDomain(
+         grown_mapped_box.getBox(),
+         local_nesting_complement,
+         min_size);
+
+      if (omb.getBox() != grown_mapped_box.getBox()) {
+         grown_mapped_box_level.addMappedBox(grown_mapped_box);
+         new_eto_grown[omb.getGlobalId()].insert(grown_mapped_box);
+      } else {
+         grown_mapped_box_level.addMappedBox(omb);
+      }
+
+   }
+
+   new_to_grown.swapInitialize(
+      new_mapped_box_level,
+      grown_mapped_box_level,
+      min_size,
+      new_eto_grown);
+}
+
+void GriddingAlgorithm::getGriddingParameters(
+   hier::IntVector& smallest_patch,
+   hier::IntVector& smallest_box_to_refine,
+   hier::IntVector& largest_patch,
+   hier::IntVector& extend_ghosts,
+   const int level_number,
+   const bool for_building_finer) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(d_dim,
+      smallest_patch,
+      smallest_box_to_refine,
+      largest_patch,
+      extend_ghosts);
+
+   TBOX_ASSERT((level_number >= 0) && (level_number < d_hierarchy->getMaxNumberOfLevels()));
+
+   /*
+    * Determine maximum ghost cell width needed over all variables
+    * currently known to the patch descriptor, and set the smallest
+    * patch size.  The maximum number of ghosts is multiplied by the
+    * error coarsen ratio (which should always be 1 unless regridding
+    * uses error estimation).  This assures that when levels are
+    * coarsened during error estimation, the coarser level patches
+    * will meet the ghost cell constraint.
+    */
+   bool allow_patches_smaller_than_ghost_width =
+      d_hierarchy->allowPatchesSmallerThanGhostWidth();
+
+   smallest_patch = d_hierarchy->getSmallestPatchSize(level_number);
+   hier::IntVector max_ghosts(
+      d_hierarchy->getPatchDescriptor()->getMaxGhostWidth(d_dim));
+   if (!d_max_ghost_data_width.empty()) {
+      max_ghosts = d_max_ghost_data_width[level_number];
+   }
+   max_ghosts = max_ghosts * d_tag_init_strategy->getErrorCoarsenRatio();
+   smallest_patch = d_hierarchy->getSmallestPatchSize(level_number);
+   if (!allow_patches_smaller_than_ghost_width) {
+      smallest_patch.max(max_ghosts);
+   } else {
+      const hier::IntVector& periodic_dirs(
+         d_hierarchy->getGridGeometry()->getPeriodicShift(hier::IntVector::getOne(
+               d_dim)));
+
+      for (int i = 0; i < d_dim.getValue(); i++) {
+         if (periodic_dirs(i)) {
+            smallest_patch(i) =
+               tbox::MathUtilities<int>::Max(smallest_patch(i), max_ghosts(i));
+         }
+      }
+   }
+
+   /*
+    * Set largest patch size.
+    */
+   largest_patch = d_hierarchy->getLargestPatchSize(level_number);
+
+   /*
+    * Following if-check prevents changing a negative largest_patch
+    * bacause TreeLoadBalancer interprets the non-negative value as
+    * dissabling the upper limit on patch size.
+    */
+   if (largest_patch > hier::IntVector::getZero(d_dim)) {
+      largest_patch.max(smallest_patch);
+   }
+
+   /*
+    * Set the smallest box to refine based on the number of cells that
+    * coarsened patches must accomodate to meet ghost cell needs of variables.
+    * On the finest level, the smallest box to refine is the smallest patch.
+    * On coarser levels, it is a function of the error coarsen ratio and
+    * the ratio to the next finer level.
+    *
+    * If we are accessing gridding parameters for a level that is being
+    * reconstructed, the smallest box to refine is not applicable so we
+    * set it to -1 to indicate an invalid entry in case it is used.
+    */
+   if (for_building_finer) {
+
+      smallest_box_to_refine = smallest_patch;
+
+      /*
+       * Shouldn't this division be rounded up because it
+       * represents a coarsening?  BTNG.
+       */
+      smallest_box_to_refine /=
+         d_hierarchy->getRatioToCoarserLevel(level_number);
+      /*
+       * den = ratio from level_number to Richardson-coarsened
+       * version of level_number+1.
+       */
+      const hier::IntVector den(
+         d_hierarchy->getRatioToCoarserLevel(level_number)
+         / d_tag_init_strategy->getErrorCoarsenRatio());
+      /*
+       * sz = max ghosts on Richardson-coarsened level_number+1, as
+       * seen on level_number.
+       */
+      const hier::IntVector sz(hier::IntVector::ceiling(max_ghosts, den));
+      smallest_box_to_refine.max(sz);
+
+   } else {
+
+      smallest_box_to_refine = hier::IntVector(d_dim, -1);
+
+   }
+
+   /*
+    * Determine number of cells box may be extended to physical
+    * domain boundary to accomodate ghost cells.
+    */
+   extend_ghosts = max_ghosts;
+
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+
+void GriddingAlgorithm::warnIfDomainTooSmallInPeriodicDir(
+   const hier::IntVector& smallest_patch_size,
+   const hier::IntVector& domain_bounding_box_size) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim,
+      smallest_patch_size,
+      domain_bounding_box_size);
+
+   const hier::PeriodicShiftCatalog* shift_catalog =
+      hier::PeriodicShiftCatalog::getCatalog(d_dim);
+   if (shift_catalog->isPeriodic()) {
+      hier::IntVector min_nonzero_shift(d_dim, tbox::MathUtilities<int>::getMax());
+      for (int n = 1; n < shift_catalog->getNumberOfShifts(); ++n) {
+         const hier::IntVector& shift(shift_catalog->shiftNumberToShiftDistance(n));
+         for (int d = 0; d < d_dim.getValue(); ++d) {
+            const int shift_mag = tbox::MathUtilities<int>::Abs(shift(d));
+            if (min_nonzero_shift(d) < shift_mag) {
+               min_nonzero_shift = hier::IntVector(d_dim, shift_mag);
+            }
+         }
+      }
+      TBOX_ASSERT(domain_bounding_box_size >= smallest_patch_size);
+      if (domain_bounding_box_size == smallest_patch_size) {
+         TBOX_ERROR("Domains should be bigger than smallest patch size in\n"
+            << "any periodic index direction or bad things will happen\n"
+            << "with Connector data and overlap computations.\n"
+            << "Domain bounding box size = " << domain_bounding_box_size
+            << "\nSmallest patch size = " << smallest_patch_size << "\n");
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ * Print out all attributes of class instance for debugging.
+ *
+ *************************************************************************
+ */
+
+void GriddingAlgorithm::printClassData(
+   std::ostream& os) const
+{
+   os << "\nGriddingAlgorithm::printClassData..." << std::endl;
+   os << "   static data members:" << std::endl;
+   for (int d = 0; d < tbox::Dimension::MAXIMUM_DIMENSION_VALUE; d++) {
+      os << "      (*s_tag_indx)[" << d << "] = "
+      << (*s_tag_indx)[d] << std::endl;
+      os << "      (*s_buf_tag_indx)[" << d << "] = "
+      << (*s_buf_tag_indx)[d] << std::endl;
+   }
+   os << "GriddingAlgorithm: this = "
+      << (GriddingAlgorithm *)this << std::endl;
+   os << "d_object_name = " << d_object_name << std::endl;
+   os << "d_tag_init_strategy = "
+      << (TagAndInitializeStrategy *)d_tag_init_strategy << std::endl;
+   os << "d_box_generator = "
+      << (BoxGeneratorStrategy *)d_box_generator << std::endl;
+   os << "d_load_balancer = "
+      << (LoadBalanceStrategy *)d_load_balancer << std::endl;
+   os << "d_load_balancer0 = "
+      << (LoadBalanceStrategy *)d_load_balancer0 << std::endl;
+   os << "d_tag = " << d_tag.getPointer() << std::endl;
+   os << "d_tag_indx = " << d_tag_indx << std::endl;
+   os << "d_buf_tag_indx = " << d_buf_tag_indx << std::endl;
+   os << "d_true_tag = " << d_true_tag << std::endl;
+   os << "d_false_tag = " << d_false_tag << std::endl;
+
+   int ln;
+
+   os << "d_efficiency_tolerance..." << std::endl;
+   for (ln = 0; ln < d_efficiency_tolerance.getSize(); ln++) {
+      os << "    d_efficiency_tolerance[" << ln << "] = "
+      << d_efficiency_tolerance[ln] << std::endl;
+   }
+   os << "d_combine_efficiency..." << std::endl;
+   for (ln = 0; ln < d_combine_efficiency.getSize(); ln++) {
+      os << "    d_combine_efficiency[" << ln << "] = "
+      << d_combine_efficiency[ln] << std::endl;
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ * Write out class version number and data members to database.
+ *
+ *************************************************************************
+ */
+
+void GriddingAlgorithm::putToDatabase(
+   tbox::Pointer<tbox::Database> db)
+{
+   TBOX_ASSERT(!db.isNull());
+
+   db->putInteger("ALGS_GRIDDING_ALGORITHM_VERSION",
+      ALGS_GRIDDING_ALGORITHM_VERSION);
+
+   db->putInteger("d_true_tag", d_true_tag);
+   db->putInteger("d_false_tag", d_false_tag);
+
+   TBOX_ASSERT(PATCHLEVEL_DATANAME_BUFSIZE > (5 + 1 + 4 + 1));
+
+   db->putDoubleArray("d_efficiency_tolerance", d_efficiency_tolerance);
+   db->putDoubleArray("d_combine_efficiency", d_combine_efficiency);
+
+   db->putBool("d_sequentialize_patch_indices", d_sequentialize_patch_indices);
+}
+
+/*
+ *************************************************************************
+ *
+ * If simulation is not from restart, read data from input database.
+ * Otherwise, override data members initialized from restart with
+ * values in the input database.
+ *
+ *************************************************************************
+ */
+
+void GriddingAlgorithm::getFromInput(
+   tbox::Pointer<tbox::Database> db,
+   bool is_from_restart)
+{
+   NULL_USE(is_from_restart);
+
+   TBOX_ASSERT(!db.isNull());
+
+   if (s_check_connectors == 0) {
+      s_check_overflow_nesting = 'n';
+      s_check_proper_nesting = 'n';
+      s_check_connectors = 'n';
+      s_print_hierarchy = 'n';
+      s_print_steps = 'n';
+   }
+
+   s_check_overflow_nesting =
+      db->getCharWithDefault("check_overflow_nesting", s_check_overflow_nesting);
+   s_check_proper_nesting =
+      db->getCharWithDefault("check_proper_nesting", s_check_proper_nesting);
+   s_check_connectors =
+      db->getCharWithDefault("check_connectors", s_check_connectors);
+   s_print_hierarchy =
+      db->getCharWithDefault("print_hierarchy",
+         s_print_hierarchy);
+   s_print_steps =
+      db->getCharWithDefault("print_steps", s_print_steps);
+
+   int ln;
+
+
+   // FIXME: replace this with strings.
+   TBOX_ASSERT(PATCHLEVEL_DATANAME_BUFSIZE > (5 + 1 + 4 + 1));
+
+
+   /*
+    * Read input for max stencil widths.
+    */
+
+   if (db->keyExists("max_stencil_width")) {
+      tbox::Pointer<tbox::Database> max_stencil_width_db =
+         db->getDatabase("max_stencil_width");
+
+      tbox::Array<std::string> keys = max_stencil_width_db->getAllKeys();
+      int num_keys = keys.getSize();
+
+      if (num_keys < 1) {
+         TBOX_ERROR(
+            d_object_name << ":  "
+            <<
+            "No keys in `max_stencil_width' input section.");
+      } else {
+         d_max_stencil_width.resizeArray(num_keys, hier::IntVector(d_dim));
+         for (ln = 0; ln < num_keys; ln++) {
+            int* temp_array = &d_max_stencil_width[ln][0];
+            max_stencil_width_db->getIntegerArray(keys[ln],
+               temp_array, d_dim.getValue());
+         }
+      }
+   }
+
+   /*
+    * Read input for max ghost data widths.
+    */
+
+   if (db->keyExists("max_ghost_data_width")) {
+      tbox::Pointer<tbox::Database> max_ghost_data_width_db =
+         db->getDatabase("max_ghost_data_width");
+
+      tbox::Array<std::string> keys = max_ghost_data_width_db->getAllKeys();
+      int num_keys = keys.getSize();
+
+      if (num_keys < 1) {
+         TBOX_ERROR(
+            d_object_name << ":  "
+            <<
+            "No keys in `max_ghost_data_width' input section.");
+      } else {
+         d_max_ghost_data_width.resizeArray(num_keys, hier::IntVector(d_dim));
+         for (ln = 0; ln < num_keys; ln++) {
+            int* temp_array = &d_max_ghost_data_width[ln][0];
+            max_ghost_data_width_db->getIntegerArray(keys[ln],
+               temp_array, d_dim.getValue());
+         }
+      }
+   }
+
+   /*
+    * Read input for efficiency tolerance.
+    */
+
+   if (db->keyExists("efficiency_tolerance")) {
+      d_efficiency_tolerance = db->getDoubleArray("efficiency_tolerance");
+
+      for (ln = 0; ln < d_efficiency_tolerance.getSize(); ln++) {
+         if ((d_efficiency_tolerance[ln] <= 0.0e0)
+             || (d_efficiency_tolerance[ln] >= 1.0e0)) {
+            TBOX_ERROR(
+               d_object_name << ":  "
+               <<
+               "Key data `efficiency_tolerance' has values"
+               << " out of range 0.0 < tol < 1.0.");
+
+         }
+      }
+
+   }
+
+   /*
+    * Read input for combine efficiency.
+    */
+
+   if (db->keyExists("combine_efficiency")) {
+      d_combine_efficiency = db->getDoubleArray("combine_efficiency");
+
+      for (ln = 0; ln < d_combine_efficiency.getSize(); ln++) {
+         if ((d_combine_efficiency[ln] <= 0.0e0)
+             || (d_combine_efficiency[ln] >= 1.0e0)) {
+            TBOX_ERROR(
+               d_object_name << ":  "
+               <<
+               "Key data `combine_efficiency' has values"
+               << " out of range 0.0 < tol < 1.0.");
+
+         }
+      }
+
+   }
+
+   d_proper_nesting_complement.resize(d_hierarchy->getMaxNumberOfLevels(), hier::MappedBoxLevel(d_dim));
+   d_to_nesting_complement.resize(d_hierarchy->getMaxNumberOfLevels());
+   d_from_nesting_complement.resize(d_hierarchy->getMaxNumberOfLevels());
+
+#if 0
+   if (d_hierarchy->getMaxNumberOfLevels() > 1) {
+      d_tag_init_strategy->checkCoarsenRatios(d_ratio_to_coarser);
+   }
+#endif
+
+   std::string tmp_str;
+
+   tmp_str = db->getStringWithDefault("check_nonrefined_tags",
+                                       std::string("WARN"));
+   d_check_nonrefined_tags = char(tolower(*tmp_str.c_str()));
+   if (d_check_nonrefined_tags != 'i' &&
+       d_check_nonrefined_tags != 'w' &&
+       d_check_nonrefined_tags != 'e') {
+      TBOX_ERROR("GriddingAlgorithm: input parameter check_nonrefined_tags\n"
+         << "can only be \"IGNORE\", \"WARN\" or \"ERROR\"");
+   }
+
+   tmp_str = db->getStringWithDefault("check_overlapping_patches",
+                                       std::string("IGNORE"));
+   d_check_overlapping_patches = char(tolower(*tmp_str.c_str()));
+   if (d_check_overlapping_patches != 'i' &&
+       d_check_overlapping_patches != 'w' &&
+       d_check_overlapping_patches != 'e') {
+      TBOX_ERROR(
+         "GriddingAlgorithm: input parameter check_overlapping_patches\n"
+         << "can only be \"IGNORE\", \"WARN\" or \"ERROR\"");
+   }
+
+   tmp_str = db->getStringWithDefault("check_nonnesting_user_boxes",
+                                       std::string("ERROR"));
+   d_check_nonnesting_user_boxes = char(tolower(*tmp_str.c_str()));
+   if (d_check_nonnesting_user_boxes != 'i' &&
+       d_check_nonnesting_user_boxes != 'w' &&
+       d_check_nonnesting_user_boxes != 'e') {
+      TBOX_ERROR("GriddingAlgorithm: input parameter check_nonnesting_user_boxes\n"
+         << "can only be \"IGNORE\", \"WARN\" or \"ERROR\"");
+   }
+
+   tmp_str = db->getStringWithDefault("check_boundary_proximity_violation",
+                                       std::string("ERROR"));
+   d_check_boundary_proximity_violation = char(tolower(*tmp_str.c_str()));
+   if (d_check_boundary_proximity_violation != 'i' &&
+       d_check_boundary_proximity_violation != 'w' &&
+       d_check_boundary_proximity_violation != 'e') {
+      TBOX_ERROR("GriddingAlgorithm: input parameter check_boundary_proximity_violation\n"
+         << "can only be \"IGNORE\", \"WARN\" or \"ERROR\"");
+   }
+
+   d_sequentialize_patch_indices =
+      db->getBoolWithDefault("sequentialize_patch_indices",
+         d_sequentialize_patch_indices);
+
+   d_enforce_proper_nesting =
+      db->getBoolWithDefault("enforce_proper_nesting", d_enforce_proper_nesting);
+   d_extend_to_domain_boundary =
+      db->getBoolWithDefault("extend_to_domain_boundary",
+         d_extend_to_domain_boundary);
+   d_load_balance =
+      db->getBoolWithDefault("load_balance", d_load_balance);
+
+   d_barrier_and_time =
+      db->getBoolWithDefault("barrier_and_time", d_barrier_and_time);
+}
+
+/*
+ *************************************************************************
+ *
+ * Gets the database in the root database that corresponds to the object
+ * name.  This method then checks to make sure that the version number
+ * of the class is that same as the version number in the restart file.
+ * If these values are equal, the data members are read in from the
+ * restart database.
+ *
+ *************************************************************************
+ */
+
+void GriddingAlgorithm::getFromRestart()
+{
+   tbox::Pointer<tbox::Database> root_db =
+      tbox::RestartManager::getManager()->getRootDatabase();
+
+   tbox::Pointer<tbox::Database> db;
+   if (root_db->isDatabase(d_object_name)) {
+      db = root_db->getDatabase(d_object_name);
+   } else {
+      TBOX_ERROR("Restart database corresponding to "
+         << d_object_name << " not found in restart file.");
+   }
+
+   int ver = db->getInteger("ALGS_GRIDDING_ALGORITHM_VERSION");
+   if (ver != ALGS_GRIDDING_ALGORITHM_VERSION) {
+      TBOX_ERROR(
+         d_object_name << ":  "
+         <<
+         "Restart file version different than class version.");
+   }
+
+   d_proper_nesting_complement.resize(d_hierarchy->getMaxNumberOfLevels(), hier::MappedBoxLevel(d_dim));
+
+   TBOX_ASSERT(PATCHLEVEL_DATANAME_BUFSIZE > (5 + 1 + 4 + 1));
+
+   d_efficiency_tolerance = db->getDoubleArray("d_efficiency_tolerance");
+   d_combine_efficiency = db->getDoubleArray("d_combine_efficiency");
+
+   d_sequentialize_patch_indices = db->getBool("d_sequentialize_patch_indices");
+
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void GriddingAlgorithm::startupCallback()
+{
+   s_tag_indx = new tbox::Array<int>(tbox::Dimension::MAXIMUM_DIMENSION_VALUE, -1);
+   s_buf_tag_indx = new tbox::Array<int>(tbox::Dimension::MAXIMUM_DIMENSION_VALUE, -1);
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void GriddingAlgorithm::shutdownCallback()
+{
+   delete s_tag_indx;
+   delete s_buf_tag_indx;
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void GriddingAlgorithm::initializeCallback()
+{
+   /*
+    * Timers:  for gathering performance information about box
+    * calculus and other regridding operations.
+    */
+   t_load_balance = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::load_balance");
+   t_load_balance0 = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::load_balance0");
+   t_load_balance_setup = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::load_balance_setup");
+   t_bdry_fill_tags_create = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::bdry_fill_tags_create");
+   t_make_coarsest = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::makeCoarsestLevel()");
+   t_make_finer = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::makeFinerLevel()");
+   t_make_finer_setup = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::makeFinerLevel()_setup");
+   t_make_finer_tagging = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::makeFinerLevel()_tagging");
+   t_make_finer_create = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::makeFinerLevel()_create");
+   t_regrid_all_finer = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::regridAllFinerLevels()");
+   t_regrid_finer_create = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::regridFinerLevel()_create");
+   t_fill_tags_from_mapped_box_level = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::fillTagsFromMappedBoxLevel()");
+   t_tag_cells_for_refinement = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::tag_cells_for_refinement");
+   t_buffer_tags = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::bufferTagsOnLevel()");
+   t_second_finer_tagging = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::second_finer_tagging");
+   t_bdry_fill_tags_comm = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::bdry_fill_tags_comm");
+   t_find_refinement = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::findRefinementBoxes()");
+   t_find_boxes_containing_tags = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::find_boxes_containing_tags");
+   t_enforce_nesting = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::enforce_nesting");
+   t_make_nesting_map = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::makeProperNestingMap()");
+   t_make_nesting_map_compute = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::makeProperNestingMap()_compute");
+   t_make_nesting_map_convert = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::makeProperNestingMap()_convert");
+   t_use_nesting_map = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::use_nesting_map");
+   t_make_overflow_map = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::makeOverflowNestingMap()");
+   t_make_overflow_map_compute = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::makeOverflowNestingMap()_compute");
+   t_make_overflow_map_convert = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::makeOverflowNestingMap()_convert");
+   t_use_overflow_map = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::use_overflow_map");
+   t_compute_external_parts = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::compute_external_parts");
+   t_compute_nesting_violator = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::computeNestingViolator()");
+   t_extend_to_domain_boundary = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::extend_to_domain_boundary");
+   t_extend_within_domain = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::extend_within_domain");
+   t_grow_boxes_within_domain = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::grow_boxes_within_domain");
+   t_sort_nodes = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::sortNodes()");
+   t_find_new_to_new = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::find_new_to_new");
+   t_bridge_new_to_new = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::bridge_new_to_new");
+   t_bridge_new_to_coarser = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::bridge_new_to_coarser");
+   t_bridge_new_to_finer = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::bridge_new_to_finer");
+   t_bridge_new_to_old = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::bridge_new_to_old");
+   t_bridge_links = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::bridge_links");
+   t_modify_connector = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::modify_connector");
+   t_make_domain = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::makeCoarsestLevel()_make_domain");
+   t_get_balance = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::get_balance");
+   t_use_balance = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::use_balance");
+   t_make_new = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::makeCoarsestLevel()_make_new");
+   t_process_error = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::process_error");
+   t_reset_hier = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::reset_hierarchy_config");
+   t_misc1 = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::misc1");
+   t_misc2 = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::misc2");
+   t_misc3 = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::misc3");
+   t_misc4 = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::misc4");
+   t_misc5 = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::misc5");
+   t_limit_overflow = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::limit_overflow");
+   t_box_massage = tbox::TimerManager::getManager()->
+      getTimer("mesh::GriddingAlgorithm::box_massage");
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void GriddingAlgorithm::finalizeCallback()
+{
+   t_find_domain_complement.setNull();
+   t_load_balance.setNull();
+   t_load_balance0.setNull();
+   t_load_balance_setup.setNull();
+   t_bdry_fill_tags_create.setNull();
+   t_make_coarsest.setNull();
+   t_make_finer.setNull();
+   t_make_finer_setup.setNull();
+   t_make_finer_tagging.setNull();
+   t_make_finer_create.setNull();
+   t_regrid_all_finer.setNull();
+   t_regrid_finer_create.setNull();
+   t_bridge_links.setNull();
+   t_fill_tags_from_mapped_box_level.setNull();
+   t_tag_cells_for_refinement.setNull();
+   t_buffer_tags.setNull();
+   t_bdry_fill_tags_comm.setNull();
+   t_second_finer_tagging.setNull();
+   t_find_refinement.setNull();
+   t_bridge_new_to_new.setNull();
+   t_find_new_to_new.setNull();
+   t_bridge_new_to_coarser.setNull();
+   t_bridge_new_to_finer.setNull();
+   t_bridge_new_to_old.setNull();
+   t_find_boxes_containing_tags.setNull();
+   t_enforce_nesting.setNull();
+   t_make_nesting_map.setNull();
+   t_make_nesting_map_compute.setNull();
+   t_make_nesting_map_convert.setNull();
+   t_use_nesting_map.setNull();
+   t_make_overflow_map.setNull();
+   t_make_overflow_map_compute.setNull();
+   t_make_overflow_map_convert.setNull();
+   t_use_overflow_map.setNull();
+   t_compute_external_parts.setNull();
+   t_compute_nesting_violator.setNull();
+   t_extend_to_domain_boundary.setNull();
+   t_extend_within_domain.setNull();
+   t_grow_boxes_within_domain.setNull();
+   t_sort_nodes.setNull();
+   t_modify_connector.setNull();
+   t_misc1.setNull();
+   t_misc2.setNull();
+   t_misc3.setNull();
+   t_misc4.setNull();
+   t_misc5.setNull();
+   t_make_domain.setNull();
+   t_get_balance.setNull();
+   t_use_balance.setNull();
+   t_make_new.setNull();
+   t_process_error.setNull();
+   t_limit_overflow.setNull();
+   t_reset_hier.setNull();
+   t_box_massage.setNull();
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/GriddingAlgorithm.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/GriddingAlgorithm.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,98 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR hierarchy generation and regridding routines. 
+ *
+ ************************************************************************/
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+#ifndef included_assert
+#define included_assert
+#include <cassert>
+#endif
+#endif
+
+namespace SAMRAI {
+namespace mesh {
+
+SAMRAI_INLINE_KEYWORD
+bool
+GriddingAlgorithm::errorEstimationUsesTimeIntegration()
+const
+{
+   return d_tag_init_strategy->usesTimeIntegration();
+}
+
+#if 0
+SAMRAI_INLINE_KEYWORD
+int
+GriddingAlgorithm::getErrorCoarsenRatio()
+const
+{
+   return d_tag_init_strategy->getErrorCoarsenRatio();
+}
+#endif
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<TagAndInitializeStrategy>
+GriddingAlgorithm::getTagAndInitializeStrategy() const
+{
+   return d_tag_init_strategy;
+}
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<LoadBalanceStrategy>
+GriddingAlgorithm::getLoadBalanceStrategy() const
+{
+   return d_load_balancer;
+}
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<LoadBalanceStrategy>
+GriddingAlgorithm::getLoadBalanceStrategy0() const
+{
+   return d_load_balancer0;
+}
+
+#if 0
+SAMRAI_INLINE_KEYWORD
+int
+GriddingAlgorithm::getMaxLevels() const
+{
+   return d_hierarchy->getMaxNumberOfLevels();
+}
+#endif
+
+SAMRAI_INLINE_KEYWORD
+double
+GriddingAlgorithm::getEfficiencyTolerance(
+   const int level_number) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   assert((level_number >= 0) && (level_number < d_hierarchy->getMaxNumberOfLevels()));
+#endif
+   int size = d_efficiency_tolerance.getSize();
+   return (level_number < size)
+          ? d_efficiency_tolerance[level_number]
+          : d_efficiency_tolerance[size - 1];
+}
+
+SAMRAI_INLINE_KEYWORD
+double
+GriddingAlgorithm::getCombineEfficiency(
+   const int level_number) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   assert((level_number >= 0) && (level_number < d_hierarchy->getMaxNumberOfLevels()));
+#endif
+   int size = d_combine_efficiency.getSize();
+   return (level_number < size)
+          ? d_combine_efficiency[level_number]
+          : d_combine_efficiency[size - 1];
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/GriddingAlgorithm.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/GriddingAlgorithm.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1146 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR hierarchy generation and regridding routines. 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_GriddingAlgorithm
+#define included_mesh_GriddingAlgorithm
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/mesh/BaseGriddingAlgorithm.h"
+#include "SAMRAI/mesh/BoxGeneratorStrategy.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h"
+#include "SAMRAI/mesh/TagAndInitializeStrategy.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/mesh/LoadBalanceStrategy.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/xfer/RefineAlgorithm.h"
+#include "SAMRAI/xfer/RefineSchedule.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Serializable.h"
+#include "SAMRAI/tbox/Timer.h"
+
+#include <iostream>
+#include <string>
+#include <vector>
+
+#define GA_RECORD_STATS
+// #undef GA_RECORD_STATS
+
+#ifdef GA_RECORD_STATS
+#include "SAMRAI/tbox/Statistic.h"
+#include "SAMRAI/tbox/Statistician.h"
+#endif
+
+namespace SAMRAI {
+namespace mesh {
+
+/*!
+ * @brief Class GriddingAlgorithm manages AMR patch hierarchy construction 
+ * operations in SAMRAI.  Specifically, it provides AMR patch hierarchy 
+ * generation and regridding routines that may be used with a variety 
+ * of AMR solution algorithms and application codes.
+ *
+ * The three main functions provided by this class are:
+ *   - @b    makeCoarsestLevel()
+ *      This routine constructs or repartitions
+ *      the coarsest hierarchy level (level 0).
+ *
+ *   - @b    makeFinerLevel()
+ *      This routine will attempt to add a new
+ *      finest level to the hierarchy if the
+ *      maximum number of levels allows it and
+ *      cells on the current finest level are
+ *      tagged for refinement.
+ *
+ *   - @b    regridAllFinerLevels()
+ *      This routine will regrid all levels finer
+ *      than some specified level based on cells
+ *      that are tagged for refinement on each
+ *      level finer than and including the given
+ *      level.  This routine may add a new finest
+ *      hierarchy level if the maximum number of
+ *      levels allows it and cells on the current
+ *      finest level are tagged for refinement.
+ *      Levels may also be removed from the
+ *      hierarchy if no cells are tagged.
+ *
+ *
+ * These basic AMR operations are used to generate of individual levels in
+ * the AMR patch hierarchy at the beginning of a simulation, and regridding
+ * collections of levels during an adaptive calculation.  More details are
+ * found in the comments accompanying each member function below.
+ *
+ * Each GriddingAlgorithm object is provided a PatchHierarchy when
+ * constructed.  The GriddingAlgorithm object is then responsible for
+ * manipulating levels in that hierarchy.  Other objects passed to the
+ * constructor provide the gridding algorithm with particular operations
+ * needed during meshing operations.  Operations that tag cells for 
+ * refinement on a patch level and initialize data on new levels are
+ * provided by the TagAndInitializeStrategy argument.  Operations that 
+ * cluster tagged cells into a boxes are provided by the 
+ * BoxGeneratorStrategy argument.  Routines that load balance patches 
+ * on a level are provided by the LoadBalanceStrategy constructor argument.
+ *
+ * Initialization of a GriddingAlgorithm object is performed via a
+ * combination of default parameters and values read from an input 
+ * database.  Data read from input is summarized as follows:
+ *
+ * Optional input keys, data types, and defaults:
+ *
+ *   - \b    efficiency_tolerance
+ *      An array of double values, each of which specifies the minimum
+ *      fraction of tagged cells to total cells in boxes used to 
+ *      construct patches on a new level.  If the ratio is below the 
+ *      tolerance value, the box may be split into smaller boxes and 
+ *      pieces removed until the ratio becomes greater than or equal to 
+ *      the tolerance.  This tolerance helps users control the amount
+ *      of extra refined cells created (beyond those tagged explicitly)
+ *      that is typical in patch-based AMR computations.
+ *      The index of the value in the array corresponds to 
+ *      the number of the level to which the tolerance value applies.  If 
+ *      more values are given than the maximum number of levels allowed in 
+ *      the hierarchy, the extra values will be ignored.  If fewer
+ *      values are given, then the last value given will be used
+ *      for each level without a specified input value.  For example,
+ *      if only a single value is specified, then that value will be used on
+ *      all levels.  If no input values are given, a default of 0.8 is used.
+ *      See sample input below for input file format.
+ *
+ *   - \b    combine_efficiency
+ *      An array of double values, each of which serves as a threshold
+ *      for the ratio of the total number of cells in two boxes into which
+ *      a box may be split and the number of cells in the original box.
+ *      If that ratio is greater than the combine efficiency, the box will not
+ *      be split.  This tolerance helps users avoids splitting up portions 
+ *      of the domain into into very small patches which can increase
+ *      the overhead of AMR operations.  The index of the value in
+ *      the array corresponds to the number of the level to which the
+ *      efficiency value applies.  If more values are given than
+ *      the maximum number of levels allowed in the hierarchy, extra values 
+ *      will be ignored.  If fewer values are given, then the last value given
+ *      will be used for each level without a specified input value.  For 
+ *      example, if only a single value is specified, then that value will 
+ *      be used on all levels.  If no input values are given, a default of 
+ *      0.8 is used.  See sample input below for input file format.
+ *
+ *   - @b check_nonnesting_user_boxes
+ *      A flag to control how user-specified refinement boxes that violate
+ *      proper nesting are handled.
+ *      Set to one of these characters:
+ *      @b "IGNORE" - nesting violations will be quietly disregarded.
+ *      @b "WARN" - nesting violations will cause a warning but the
+ *      code will continue anyway.
+ *      @b "ERROR" - nesting violations will cause an unrecoverable
+ *      assertion.
+ *      The default is "ERROR".  We highly recommend making nesting violation
+ *      an error.  The code may work anyway, but there are no guarantees.
+ *
+ *   - @b check_boundary_proximity_violation
+ *      A flag to control how to resolve refinement boxes that violate
+ *      boundary proximity (are less than the max ghost cell width of
+ *      physical boundaries without touching the boundary).
+ *      Set to one of these characters:
+ *      @b "IGNORE" - violations will be quietly disregarded.
+ *      @b "WARN" - violations will cause a warning but the
+ *      code will continue anyway.
+ *      @b "ERROR" - violations will cause an unrecoverable
+ *      assertion.
+ *      The default is "ERROR".  We highly recommend making boundary 
+ *      proximity violation an error.  The code may work anyway, but there 
+ *      are no guarantees.
+ *
+ *   - \b    check_nonrefined_tags
+ *      A flag to control how to resolve user-specified tags that violate 
+ *      proper nesting.
+ *
+ *      If a tag violates the nesting requirements, its location in index space
+ *      will not be refined when creating the finer level.  This flag allows the
+ *      user to determine what to do when this occurs
+ *
+ *      Set to one of these characters:
+ *      @b "IGNORE" - violating tags will be quietly disregarded.
+ *      @b "WARN" - violating tags will cause a warning and be
+ *      disregarded.
+ *      @b "ERROR" - violating tags will cause an unrecoverable
+ *      assertion.
+ *      The default is "WARN".  It is fastest to ignore non-nesting tags
+ *      because no checking has to be done.
+ *
+ *   - \b    check_overlapping_patches
+ *      A flag to control checking for overlapping patches on a new level.
+ *      Set to one of these characters:
+ *      @b "IGNORE" - there is no check for overlapping patches,
+ *      and they will be quietly disregarded.
+ *      @b "WARN" - overlapping patches will cause a warning and be
+ *      disregarded.
+ *      @b "ERROR" - violating tags will cause an unrecoverable
+ *      assertion.
+ *      The default is "IGNORE".  The check for overlapping patches may be
+ *      expensive, so the use of "WARN" and "ERROR" is recommended only 
+ *      for debugging purposes.  To prevent the creation of levels 
+ *      with overlapping patches, see the input flag
+ *      "allow_patches_smaller_than_minimum_size_to_prevent_overlaps"
+ *
+ *   - \b   sequentialize_patch_indices
+ *      A flag to specify whether patch indices will be globally sequentialized.
+ *      This is not scalable, but is required for writing correct VisIt files.
+ *      Due to the current VisIt requirement, this is currently true by default.
+ *      It will evetually be set back to false after we remove the VisIt
+ *      requirement.
+ *
+ *
+ * Note that when continuing from restart, the input values in the
+ * input file override all values read in from the restart database.
+ *
+ * The following represents sample input data for a three-level problem:
+ *
+ * \verbatim
+ *
+ *   // Optional input: different efficiency tolerance for each coarser level
+ *   efficiency_tolerance = 0.80e0, 0.85e0, 0.90e0
+ *
+ *   // Optional input: combine efficiency is same for all levels.
+ *   combine_efficiency = 0.95e0
+ *
+ * \endverbatim
+ *
+ * @see mesh::TagAndInitializeStrategy
+ * @see mesh::LoadBalanceStrategy
+ * @see mesh::BoxGeneratorStrategy
+ */
+
+class GriddingAlgorithm:
+      public BaseGriddingAlgorithm
+{
+public:
+   /*!
+    * @brief The constructor for GriddingAlgorithm configures the
+    * gridding algorithm with the patch hierarchy and concrete algorithm 
+    * strategy objects in the argument list.
+    *
+    * Gridding parameters are initialized from values provided in the
+    * specified input and in the restart database corresponding to the
+    * specified object_name argument.  The constructor also registers
+    * this object for restart using the specified object name when the
+    * boolean argument is true (default).
+    *
+    * If assertion checking is turned on, an unrecoverable assertion will
+    * result if any of the input database, level strategy,
+    * box generator, or load balancer pointers is null.  Assertions
+    * may also be thrown if any checks for consistency among input
+    * parameters fail.
+    *
+    * @param[in] hierarchy The hierarchy that this GriddingAlgorithm will
+    * work on.  The pointer is cached.  All hierarchy operations will
+    * be on this hierarchy.
+    *
+    * @param[in] object_name For registering the object in the restart
+    * database.
+    *
+    * @param[in] input_db
+    *
+    * @param[in] level_strategy
+    *
+    * @param[in] generator
+    *
+    * @param[in] balancer Load balancer
+    *
+    * @param[in] balancer0 Special load balancer to use for level zero
+    * only when a single process owns all the unbalanced load (such as during
+    * initialization).  If omitted, will use @c balancer instead.
+    *
+    * @param[in] register_for_restart
+    */
+   GriddingAlgorithm(
+      const tbox::Pointer<hier::PatchHierarchy> &hierarchy,
+      const std::string& object_name,
+      tbox::Pointer<tbox::Database> input_db,
+      tbox::Pointer<TagAndInitializeStrategy> level_strategy,
+      tbox::Pointer<BoxGeneratorStrategy> generator,
+      tbox::Pointer<LoadBalanceStrategy> balancer,
+      tbox::Pointer<LoadBalanceStrategy> balancer0 = tbox::Pointer<LoadBalanceStrategy>(NULL),
+      bool register_for_restart = true);
+
+   /*!
+    * @brief Destructor
+    *
+    * Virtual destructor is for inheritance purposes.
+    */
+   virtual ~GriddingAlgorithm();
+
+   /*!
+    * @brief Create or rebalnce the coarsest level.
+    *
+    * This is an implementation of interface defined in BaseGriddingAlgorithm.
+    *
+    * This routine will attempt to construct the coarsest level in the AMR
+    * patch hierarchy (i.e., level 0).  If level 0 does not already exist,
+    * then the domain specification is checked against the constraints of
+    * the grid generation procedures.  Recall that the domain specification
+    * is maintained by the grid geometry object associated with the hierarchy.
+    * Generally, an unrecoverable assertion will result if the constraints
+    * are not satisfied.
+    *
+    * If level 0 already exists in the hierarchy, then the routine will
+    * generate a new level zero by re-applying the load balancing procedure to
+    * the existing level.  Data will be moved from the old level to the
+    * new level and the pre-existing level 0 will be discarded.  Note that
+    * this routine is different than the routine makeFinerLevel() below,
+    * which is used to construct levels finer than level zero.  
+    *
+    * @param[in] level_time Simulation time.
+    *
+    * @param[in] override_mapped_box_level For specifying the
+    * configuration of the new level (instead of applying the load
+    * balancer).  If not using the override, use the other alternate
+    * version of this method, defined in BaseGriddingAlgorithm.
+    */
+   void
+   makeCoarsestLevel(
+      const double level_time,
+      const hier::MappedBoxLevel& override_mapped_box_level);
+
+   using BaseGriddingAlgorithm::makeCoarsestLevel;
+
+   /*!
+    * @brief Attempt to create a new level in the hierarchy finer
+    * than the finest level currently residing in the hierarchy.
+    *
+    * This is an implementation of interface defined in BaseGriddingAlgorithm.
+    *
+    * This routine attempts to create a new level in the AMR patch hierarchy
+    * finer than the finest level currently residing in the hierarchy.
+    * It will tag cells for refinement on the finest level and construct
+    * a new finest level, if necessary.  If no cells are tagged for
+    * refinement, no new level will be added to the hierarchy.   The boolean
+    * argument initial_time indicates whether the routine is called at the
+    * initial simulation time.  This value is passed to level initialization
+    * routines in the TagAndInitializeStrategy object given to the constructor.
+    * The level time value is the current simulation time.  Note that this 
+    * routine cannot be used to construct the coarsest level in the hierarchy
+    * (i.e., level 0).  The routine makeCoarsestLevel() above must be used
+    * for that purpose.
+    *
+    * The tag buffer indicates the number of cells by which cells tagged
+    * for refinement will be buffered before new finer level boxes are
+    * constructed.  The buffer is important to keep phenomena of interest
+    * on refined regions of the mesh until adaptive regridding occurs next.
+    * Thus, the buffer size should take into account how the simulation may
+    * evolve before regridding occurs (e.g., number of timesteps taken).
+    *
+    * Important note: If assertion checking is activated, several
+    * checks are applied to the functions arguments.  If any check is
+    * violated, an unrecoverable assertion will result.  Also, the the
+    * tag buffer must be positive.
+    *
+    * @param[in] level_time See text.
+    *
+    * @param[in] initial_time See text.
+    *
+    * @param[in] tag_buffer See text.
+    *
+    * @param regrid_start_time[in] The simulation time when the
+    * regridding operation began (this parameter is ignored except
+    * when using Richardson extrapolation)
+    */
+   void
+   makeFinerLevel(
+      const double level_time,
+      const bool initial_time,
+      const int tag_buffer,
+      const double regrid_start_time = 0.0);
+
+   /*!
+    * @brief Attempt to regrid each level in the AMR patch hierarchy 
+    * that is finer than the specified level.
+    *
+    * The given level number is that of the coarsest level on which
+    * cells will be tagged for refinement.  In other words,
+    * that level is the finest level that will not be subject to a
+    * change in its patch configuration during the regridding process.
+    * Generally, this routine should be used for adaptive meshing during
+    * a simulation. The routine makeFinerLevel() above should be used to 
+    * construct the initial hierarchy configuration or to add more than 
+    * one new level into the hierarchy (added one at a time).  Also, this 
+    * routine will not change the patches on level zero (i.e., the coarsest 
+    * in the hierarchy).  The routine makeCoarsestLevel() above is 
+    * provided for that purpose.
+    *
+    * Note that the current algorithm permits at most one new finest level
+    * to be added to the hierarchy with each call to this method.
+    * This constraint, though seemingly restrictive makes the
+    * process of maintaining properly nested levels much easier.
+    *
+    * The tag buffer array indicates the number of cells by which cells
+    * tagged for refinement on a level will be buffered before new finer
+    * level boxes are constructed.  The buffer is important to keep phenomena
+    * of interest on refined regions of the mesh until adaptive regridding
+    * occurs next.  Thus, the buffer size should take into account how the
+    * simulation may evolve before regridding occurs (e.g., number of
+    * timesteps taken between regrids).
+    *
+    * The boolean argument is used for regridding in time-dependent
+    * problems.  When true, it indicates that the specified level is
+    * the coarsest level to synchronize at the current regrid time
+    * before this regridding method is called.  This is a pretty
+    * idiosyncratic argument but allows some flexibility in the way
+    * memory is managed during time-dependent regridding operations.
+    *
+    * Important note: If assertion checking is activated, several checks
+    * are applied to the functions arguments.  If any check is violated,
+    * an unrecoverable assertion will result.  In particular,
+    * the given level number must match that of
+    * of some level in the hierarchy.  Also, the tag buffer array must
+    * contain a positive value for each level in the hierarchy.
+    *
+    * @param[in] level_number Coarsest level on which cells will be
+    * tagged for refinement
+    *
+    * @param[in] regrid_time Simulaition time when regridding occurs
+    *
+    * @param[in] tag_buffer Size of buffer on each level around tagged
+    * cells that will be covered by the next finer level
+    *
+    * @param[in] regrid_start_time The simulation time when the
+    * regridding operation began on each level (this parameter is
+    * ignored except when using Richardson extrapolation)
+    *
+    * @param[in] level_is_coarsest_to_sync Level is the coarsest to sync
+    */
+   void
+   regridAllFinerLevels(
+      const int level_number,
+      const double regrid_time,
+      const tbox::Array<int>& tag_buffer,
+      tbox::Array<double> regrid_start_time = tbox::Array<double>(),
+      const bool level_is_coarsest_to_sync = true);
+
+   /*!
+    * @brief Return true if error estimation process uses time integration;
+    * otherwise, return false.
+    *
+    * @return true if error estimation process uses time integration;
+    * otherwise, return false.
+    */
+   bool
+   errorEstimationUsesTimeIntegration() const;
+
+   /*!
+    * @brief Return pointer to level gridding strategy data member.
+    *
+    * @return pointer to level gridding strategy data member.
+    */
+   virtual
+   tbox::Pointer<TagAndInitializeStrategy>
+   getTagAndInitializeStrategy() const;
+
+   /*!
+    * @brief Return pointer to load balance strategy data member.
+    */
+   virtual
+   tbox::Pointer<LoadBalanceStrategy>
+   getLoadBalanceStrategy() const;
+
+   /*!
+    * @brief Return pointer to load balance strategy specialized for the case
+    * where one processor owns all the initial loads.
+    *
+    * @return pointer to load balance strategy specialized for the case
+    * where one processor owns all the initial loads.
+    */
+   virtual
+   tbox::Pointer<LoadBalanceStrategy>
+   getLoadBalanceStrategy0() const;
+
+   /*!
+    * @brief Return efficiency tolerance for clustering tags on level.
+    *
+    * @return efficiency tolerance for clustering tags on level.
+    */
+   double
+   getEfficiencyTolerance(
+      const int level_number) const;
+
+   /*!
+    * @brief Return combine efficiency for clustering tags on level.
+    *
+    * @return combine efficiency for clustering tags on level.
+    */
+   double
+   getCombineEfficiency(
+      const int level_number) const;
+
+   /*!
+    * @brief Print all data members of the class instance to given output stream.
+    */
+   void
+   printClassData(
+      std::ostream& os) const;
+
+   /*!
+    * @brief Write object state out to the gien database.
+    *
+    * When assertion checking is active, the database pointer must be non-null.
+    */
+   void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> db);
+
+   /*
+    * @brief Write out statistics recorded on numbers of cells and patches generated.
+    */
+   void
+   printStatistics(
+      std::ostream& s = tbox::plog) const;
+
+private:
+   //! @brief Shorthand typedef.
+   typedef hier::Connector::NeighborSet NeighborSet;
+
+   /*
+    * @brief Read input data from specified database and initialize class members.
+    *
+    * When assertion checking is active, the database pointer must be non-null.
+    *
+    * @param[in] db
+    *
+    * @param[in] is_from_restart Should be set to true if the
+    * simulation is from restart.  Otherwise, it should be set to
+    * false.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db,
+      bool is_from_restart);
+
+   /*
+    * @brief Read object state from the restart file and initialize
+    * class data members.
+    *
+    * The database from which the restart data is read is determined
+    * by the object_name specified in the constructor.
+    *
+    * Unrecoverable Errors:
+    *
+    *   -The database corresponding to object_name is not found
+    *    in the restart file.
+    *
+    *   -The class version number and restart version number do not
+    *    match.
+    */
+   void
+   getFromRestart();
+
+   /*
+    * @brief Recursively regrid the hierarchy level and all finer
+    * levels in the hierarchy.
+    *
+    * This private member function is invoked by the
+    * regridAllFinerLevels() routine.
+    */
+   void
+   regridFinerLevel(
+      const int level_number,
+      const double regrid_time,
+      const int finest_level_not_regridded,
+      const bool level_is_coarsest_to_sync,
+      const tbox::Array<int>& tag_buffer,
+      const tbox::Array<double>& regrid_start_time = tbox::Array<double>(0));
+
+   /*
+    * @brief Set integer tags to specified value on intersection
+    * between patch level and the MappedBoxLevel provided by the
+    * Connector.
+    *
+    * The index value corresponds to the patch descriptor entry of the
+    * cell-centered integer tag array.  The boolean flag indicates
+    * whether tags are to be set on the regions corresponding to the
+    * interior of the level only, if the tag arrays contain ghosts.
+    *
+    * @param[in] tag_value
+    *
+    * @param[in] level
+    *
+    * @param[in] index
+    *
+    * @param[in] level_to_fill_mapped_box_level Connector from the level with
+    * the tags to the MappedBoxLevel describing where to fill.
+    *
+    * @param[in] interior_only
+    *
+    * @param fill_box_growth How much to grow fill boxes before using them
+    *       to tag.  Must be in index space of level holding tags..
+    */
+   void
+   fillTagsFromMappedBoxLevel(
+      const int tag_value,
+      const tbox::Pointer<hier::PatchLevel> level,
+      const int index,
+      const hier::Connector& level_to_fill_mapped_box_level,
+      const bool interior_only, 
+      const hier::IntVector& fill_box_growth) const;
+
+   /*
+    * @brief Make a map that, when applied to an improperly nested MappedBoxLevel,
+    * removes the nonnesting parts.
+    */
+   void
+   makeProperNestingMap(
+      const hier::MappedBoxLevel& unnested_mapped_box_level,
+      const hier::Connector& hierarchy_to_unnested,
+      const hier::Connector& unnested_to_hierarchy,
+      const int unnested_ln,
+      hier::MappedBoxLevel& nested_mapped_box_level,
+      hier::Connector& unnested_to_nested) const;
+
+   /*
+    * @brief Make a map that, when applied to an MappedBoxLevel that extends 
+    * too far outside of a nominal mapped_box_level, removes those parts too        * far outside.
+    */
+   void
+   makeOverflowNestingMap(
+      const hier::MappedBoxLevel& unnested_mapped_box_level,
+      const hier::Connector& unnested_to_nominal,
+      hier::MappedBoxLevel& nested_mapped_box_level,
+      hier::Connector& unnested_to_nested,
+      const hier::IntVector& allowed_overflow ) const;
+
+   /*!
+    * @brief Make a map from a MappedBoxLevel to parts of that MappedBoxLevel 
+    * that violate proper nesting.
+    *
+    * @param[in] candidate MappedBoxLevel being examined for nesting violation.
+    *
+    * @param[out] violator MappedBoxLevel containing violating parts of candidate.
+    *
+    * @param[in] candidate_ln Level number corresponding to candidate's refinement ratio.
+    *
+    * @param[in] candidate_to_hierarchy Connector to mapped_box_level number
+    *       candidate_ln in the hierarchy.
+    *
+    * @param[in] hierarchy_to_candidate Connector from mapped_box_level number
+    *       candidate_ln in the hierarchy.
+    */
+   void
+   computeNestingViolator(
+      const hier::MappedBoxLevel& candidate,
+      hier::MappedBoxLevel& violator,
+      hier::Connector& candidate_to_violator,
+      const hier::Connector& candidate_to_hierarchy,
+      const hier::Connector& hierarchy_to_candidate,
+      const int candidate_ln) const;
+
+   /*
+    *  TODO: Add documentation.
+    */
+   void
+   extendMappedBoxesToDomainBoundary(
+      hier::MappedBoxLevel& new_mapped_box_level,
+      hier::Connector& tag_to_new,
+      hier::Connector& new_to_tag,
+      const hier::BoxArray& physical_domain_array,
+      const hier::IntVector& extend_ghosts,
+      const int new_ln) const;
+
+   /*!
+    * @brief Precompute data used to define proper nesting.
+    *
+    * Data is associated with level number ln, to be used for
+    * constructing level number ln+1.
+    */
+   void
+   computeNestingData(
+      const int ln);
+
+   /*!
+    * @brief Make a mapping Connector that can be used to grow boxes
+    * within domain by the minimum amount needed to make all boxes in a
+    * MappedBoxLevel satisfy the min_size requirement.
+    *
+    * The map is local.
+    */
+   void
+   makeBoxGrowingMap(
+      const hier::MappedBoxLevel& new_mapped_box_level,
+      const hier::Connector& tag_to_new,
+      const hier::Connector& new_to_tag,
+      const int tag_ln,
+      hier::MappedBoxLevel& grown_mapped_box_level,
+      hier::Connector& new_to_grown,
+      const hier::IntVector& min_size) const;
+
+   /*
+    *  TODO: Add documentation.
+    */
+   void
+   refineNewMappedBoxLevel(
+      hier::MappedBoxLevel& new_mapped_box_level,
+      hier::Connector& tag_to_new,
+      hier::Connector& new_to_tag,
+      const hier::IntVector& ratio) const;
+
+   /*
+    * @brief Sort the nodes in the new MappedBoxLevel.
+    *
+    * Sorting by the corners of the MappedBoxes removes randomness in
+    * the MappedBoxLevel.  Sequentializing the global indices numbers
+    * them sequentially, like Patch numbering in the traditional SAMR
+    * approach.
+    */
+   void
+   sortNodes(
+      hier::MappedBoxLevel& new_mapped_box_level,
+      hier::Connector& tag_to_new,
+      hier::Connector& new_to_tag,
+      bool sort_by_corners,
+      bool sequentialize_global_indices) const;
+
+   /*
+    * @brief Buffer each integer tag on patch level matching given tag
+    * value with a border of matching tags.
+    */
+   void
+   bufferTagsOnLevel(
+      const int tag_value,
+      const tbox::Pointer<hier::PatchLevel> level,
+      const int buffer_size) const;
+
+   /*
+    * @brief Set the new level boxes using information stored in a file.
+    *
+    * If cell tagging is not performed, the new level boxes may
+    * be specified either from user input (by specifying "REFINE_BOXES"
+    * input) or from output from a previous run stored in an
+    * HDF file.  This method sets the "new_level_boxes" based on
+    * the information in the file.  It also sets the boolean
+    * parameter "remove_old_fine_level" which indicates whether
+    * the level box configuration has changed and, consequently,
+    * whether we need to remove the old level.
+    */
+   void
+   readLevelBoxes(
+      hier::BoxArray& new_level_boxes,
+      hier::MappedBoxLevel& new_mapped_box_level,
+      hier::Connector& coarser_to_new,
+      hier::Connector& new_to_coarser,
+      const int level_number,
+      const double regrid_time,
+      bool& remove_old_fine_level);
+
+   /*
+    * @brief Given a level number, determine an array of boxes from
+    * which a refinement of the level may be constructed.
+    *
+    * It is assumed that the integer tags that identify cells for
+    * refinement have been set on the level before this routine is
+    * called.  At the end of this function, new_mapped_box_level will
+    * represent the box extents of a new fine level on the given
+    * block, but in the index space of the coarser level (that is, the
+    * level that was tagged).
+    */
+   void
+   findRefinementBoxes(
+      hier::MappedBoxLevel& new_mapped_box_level,
+      hier::Connector& tag_to_new,
+      hier::Connector& new_to_tag,
+      const int coarse_level_number) const;
+
+   /*
+    * @brief Set patch size and ghost cell information needed to
+    * create new refinement levels.
+    *
+    * This method applies to levels that are being used to build new
+    * finer levels (i.e. level_number is a coarser level in the
+    * hierarchy) and to levels which are simply being reconstructed
+    * (i.e. the same level in the hierarchy).  The boolean value
+    * "for_building_finer" controls the logic for the two cases - in
+    * the former case, it is true while in the latter case it is
+    * false.
+    *
+    * When a finer level is being constructed, the maximum number of ghost
+    * cells needed in any variable is used to compute the smallest patch
+    * size allowed and the extent to which patches may be extended to touch
+    * the physical boundary.  This avoids problems in setting ghost cell
+    * data that may occur when ghost cell regions intersect the physical
+    * boundary in strange ways.
+    *
+    * This routine sets the smallest and largest patch sizes for the specified
+    * level, the smallest box to refine on the next coarser level, and the
+    * number of cells that a patch may be extended to the boundary if it
+    * sufficiently close to the boundary (extend_ghosts).
+    */
+   void
+   getGriddingParameters(
+      hier::IntVector& smallest_patch,
+      hier::IntVector& smallest_box_to_refine,
+      hier::IntVector& largest_patch,
+      hier::IntVector& extend_ghosts,
+      const int level_number,
+      const bool for_building_finer) const;
+
+   /*!
+    * @brief Check for boxes that are too close to the physical
+    * boundary without touching it.
+    *
+    * Boxes close to the physical boundaries causes ghost boxes to
+    * intersect the boundary in weird ways, so we disallow it.  This
+    * method writes a warning describing each violation found.
+    *
+    * Return the number of violations found.
+    */
+   size_t
+   checkBoundaryProximityViolation(
+      const hier::MappedBoxLevel& mapped_box_level,
+      const hier::MappedBoxTree& periodic_domain_search_tree,
+      const hier::IntVector& extend_ghosts) const;
+
+   /*!
+    * @brief Check for user tags that violate proper nesting.
+    */
+   void
+   checkNonrefinedTags(
+      const hier::PatchLevel& level,
+      int tag_ln) const;
+
+   /*!
+    * @brief Check for overlapping patches within the level.
+    */
+   void
+   checkOverlappingPatches(
+      const hier::Connector& mapped_box_level_to_self) const;
+
+   void
+   warnIfDomainTooSmallInPeriodicDir(
+      const hier::IntVector& smallest_patch_size,
+      const hier::IntVector& domain_bounding_box_size) const;
+
+   /*!
+    * @brief Initialize static objects and register shutdown routine.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   startupCallback();
+
+   /*!
+    * @brief Method registered with ShutdownRegister to cleanup statics.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   shutdownCallback();
+
+   /*!
+    * @brief Initialize static objects and register shutdown routine.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   initializeCallback();
+
+   /*!
+    * @brief Method registered with ShutdownRegister to cleanup statics.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   finalizeCallback();
+
+   /*
+    * @brief Record statistics on how many patches and cells were generated.
+    */
+   void
+   recordStatistics(
+      double current_time);
+
+   /*!
+    * @brief The hierarchy that this GriddingAlgorithm works on.
+    */
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+
+   /*!
+    * @brief Implementation registered with the hierarchy, telling the
+    * hierarchy what width the GriddingAlgorithm will be requesting.
+    */
+   GriddingAlgorithmConnectorWidthRequestor d_connector_width_requestor;
+
+   /*
+    * Static members for managing shared tag data among multiple
+    * GriddingAlgorithm objects.
+    */
+   static tbox::Array<int>* s_tag_indx;
+   static tbox::Array<int>* s_buf_tag_indx;
+
+   const tbox::Dimension d_dim;
+
+   /*
+    * The object name is used for error reporting and accessing
+    * restart file information.  Whether the object writes restart
+    * file data depends on the value of this boolean which is
+    * set in the constructor.
+    */
+   std::string d_object_name;
+   bool d_registered_for_restart;
+
+   /*
+    * Data members that manage application-specific level initialization
+    * and cell tagging, clustering of tagged cells into boxes, and load
+    * balancing of patches to processors, respectively.
+    */
+   tbox::Pointer<TagAndInitializeStrategy> d_tag_init_strategy;
+   tbox::Pointer<BoxGeneratorStrategy> d_box_generator;
+   tbox::Pointer<LoadBalanceStrategy> d_load_balancer;
+   tbox::Pointer<LoadBalanceStrategy> d_load_balancer0;
+
+   /*
+    * Cell-centered integer variables use to tag cells for refinement.
+    * The descriptor index d_tag_indx is used to obtain tag information
+    * from user-defined routines on patch interiors.  The descriptor index
+    * d_buf_tag_indx is used to buffer tags on patches that may be
+    * distributed across processors.  The refine algorithm and schedule are
+    * used for interprocessor communication.
+    */
+   tbox::Pointer<pdat::CellVariable<int> > d_tag;
+   tbox::Pointer<pdat::CellVariable<int> > d_buf_tag;
+   int d_tag_indx;
+   int d_buf_tag_indx;
+
+   tbox::Pointer<xfer::RefineAlgorithm> d_bdry_fill_tags;
+   tbox::Array<tbox::Pointer<xfer::RefineSchedule> > d_bdry_sched_tags;
+
+   /*
+    * True and false integer tag values set in constructor and used to
+    * set and compare integer tag values on the patch hierarchy.  Generally,
+    * these variables are easier to read in the code than integer constants,
+    * such as 0 and 1.
+    */
+   int d_true_tag;
+   int d_false_tag;
+
+   /*!
+    * @brief Finest level not changed during regrid.
+    *
+    * This member is temporary, used to coordinate with private methods.
+    */
+   int d_base_ln;
+
+   /*
+    * Parameters for box generation routines that govern the splitting
+    * of boxes containing tagged cells into smaller boxes:
+    *
+    * The efficiency tolerance is a threshold value for the percentage of
+    * tagged cells in each box.  If this percentage is below the tolerance,
+    * the box will continue to be split into smaller boxes.
+    *
+    * The combine efficiency is a threshold value for the sum of the volumes
+    * of two boxes into which a box may be potentially split.  If that sum
+    * is greater than the combine efficiency multiplied by the volume of
+    * the original box, the box will not be split.
+    *
+    * For each of these parameters, an array of values may be given.  Each
+    * value in the array will be used for cell clustering on the level whose
+    * number matches the index of the value in the array.   If more values
+    * are given than the maximum number of levels, extra values will
+    * be ignored.  If fewer values are given, then the last element in the
+    * array will be used on each level without a specified input value.
+    * For example, if only a single value is specified, then that value
+    * will be used for all levels.
+    *
+    * These values are optional input parameters.  If not given, a default
+    * value of 0.8 is set for each parameter.
+    */
+   tbox::Array<double> d_efficiency_tolerance;
+   tbox::Array<double> d_combine_efficiency;
+
+   /*
+    * User-specified overrides for the max stencil and ghost
+    * data widths.  These quantities are computed automatically
+    * from registered data but users can override them via input
+    * parameters.  Empty arrays mean no user-override.
+    */
+   tbox::Array<hier::IntVector> d_max_stencil_width;
+   tbox::Array<hier::IntVector> d_max_ghost_data_width;
+
+   /*
+    * @brief When regridding level ln+1, the new level ln must not flow into
+    * d_proper_nesting_complement[ln].
+    *
+    * Has length d_hierarchy->getMaxNumberOfLevels().  The objects are
+    * initialized only during gridding/regridding.
+    */
+   std::vector<SAMRAI::hier::MappedBoxLevel> d_proper_nesting_complement;
+
+   /*
+    * @brief Connectors from the hierarchy to d_proper_nesting_complement.
+    */
+   std::vector<SAMRAI::hier::Connector> d_to_nesting_complement;
+
+   /*
+    * @brief Connectors from d_proper_nesting_complement to the hierarchy.
+    */
+   std::vector<SAMRAI::hier::Connector> d_from_nesting_complement;
+   hier::MappedBoxTree d_domain_complement_tree;
+
+   /*!
+    * @brief How to resolve user tags that violate nesting requirements.
+    *
+    * See input parameter "check_nonrefined_tags".
+    */
+   char d_check_nonrefined_tags;
+
+   /*!
+    * @brief Whether or not to check for overlapping patches on a level.
+    *
+    * See input parameter "check_overlapping_patches".
+    */
+   char d_check_overlapping_patches;
+
+   /*!
+    * @brief Whether or not to check for non-nesting user-specified
+    * refine boxes.
+    *
+    * See input parameter "check_nonnesting_user_boxes".
+    */
+   char d_check_nonnesting_user_boxes;
+
+   /*!
+    * @brief Whether or not to check for user-specified
+    * refine boxes that violate boundary proximity.
+    *
+    * See input parameter "check_boundary_proximity_violation".
+    */
+   char d_check_boundary_proximity_violation;
+
+   /*!
+    * @brief Whether to globally sequentialize patch indices on every level.
+    */
+   bool d_sequentialize_patch_indices;
+
+   /*
+    * Switches for massaging boxes after clustering.
+    * Should be on for most AMR applications.
+    * Turning off is mainly for debugging purposes.
+    */
+   bool d_enforce_proper_nesting;
+   bool d_extend_to_domain_boundary;
+   bool d_load_balance;
+
+   //@{
+   //! @name Used for evaluating peformance.
+   bool d_barrier_and_time;
+   //@}
+
+   /*
+    * Timers interspersed throughout the class.
+    */
+   static tbox::Pointer<tbox::Timer> t_find_domain_complement;
+   static tbox::Pointer<tbox::Timer> t_load_balance;
+   static tbox::Pointer<tbox::Timer> t_load_balance0;
+   static tbox::Pointer<tbox::Timer> t_load_balance_setup;
+   static tbox::Pointer<tbox::Timer> t_bdry_fill_tags_create;
+   static tbox::Pointer<tbox::Timer> t_make_coarsest;
+   static tbox::Pointer<tbox::Timer> t_make_finer;
+   static tbox::Pointer<tbox::Timer> t_make_finer_setup;
+   static tbox::Pointer<tbox::Timer> t_make_finer_tagging;
+   static tbox::Pointer<tbox::Timer> t_make_finer_create;
+   static tbox::Pointer<tbox::Timer> t_regrid_all_finer;
+   static tbox::Pointer<tbox::Timer> t_regrid_finer_create;
+   static tbox::Pointer<tbox::Timer> t_bridge_links;
+   static tbox::Pointer<tbox::Timer> t_fill_tags_from_mapped_box_level;
+   static tbox::Pointer<tbox::Timer> t_tag_cells_for_refinement;
+   static tbox::Pointer<tbox::Timer> t_buffer_tags;
+   static tbox::Pointer<tbox::Timer> t_bdry_fill_tags_comm;
+   static tbox::Pointer<tbox::Timer> t_second_finer_tagging;
+   static tbox::Pointer<tbox::Timer> t_find_refinement;
+   static tbox::Pointer<tbox::Timer> t_bridge_new_to_new;
+   static tbox::Pointer<tbox::Timer> t_find_new_to_new;
+   static tbox::Pointer<tbox::Timer> t_bridge_new_to_coarser;
+   static tbox::Pointer<tbox::Timer> t_bridge_new_to_finer;
+   static tbox::Pointer<tbox::Timer> t_bridge_new_to_old;
+   static tbox::Pointer<tbox::Timer> t_find_boxes_containing_tags;
+   static tbox::Pointer<tbox::Timer> t_enforce_nesting;
+   static tbox::Pointer<tbox::Timer> t_make_nesting_map;
+   static tbox::Pointer<tbox::Timer> t_make_nesting_map_compute;
+   static tbox::Pointer<tbox::Timer> t_make_nesting_map_convert;
+   static tbox::Pointer<tbox::Timer> t_use_nesting_map;
+   static tbox::Pointer<tbox::Timer> t_make_overflow_map;
+   static tbox::Pointer<tbox::Timer> t_make_overflow_map_compute;
+   static tbox::Pointer<tbox::Timer> t_make_overflow_map_convert;
+   static tbox::Pointer<tbox::Timer> t_use_overflow_map;
+   static tbox::Pointer<tbox::Timer> t_compute_external_parts;
+   static tbox::Pointer<tbox::Timer> t_compute_nesting_violator;
+   static tbox::Pointer<tbox::Timer> t_extend_to_domain_boundary;
+   static tbox::Pointer<tbox::Timer> t_extend_within_domain;
+   static tbox::Pointer<tbox::Timer> t_grow_boxes_within_domain;
+   static tbox::Pointer<tbox::Timer> t_sort_nodes;
+   static tbox::Pointer<tbox::Timer> t_modify_connector;
+   static tbox::Pointer<tbox::Timer> t_misc1;
+   static tbox::Pointer<tbox::Timer> t_misc2;
+   static tbox::Pointer<tbox::Timer> t_misc3;
+   static tbox::Pointer<tbox::Timer> t_misc4;
+   static tbox::Pointer<tbox::Timer> t_misc5;
+   static tbox::Pointer<tbox::Timer> t_make_domain;
+   static tbox::Pointer<tbox::Timer> t_get_balance;
+   static tbox::Pointer<tbox::Timer> t_use_balance;
+   static tbox::Pointer<tbox::Timer> t_make_new;
+   static tbox::Pointer<tbox::Timer> t_process_error;
+   static tbox::Pointer<tbox::Timer> t_limit_overflow;
+   static tbox::Pointer<tbox::Timer> t_reset_hier;
+   static tbox::Pointer<tbox::Timer> t_box_massage;
+
+#ifdef GA_RECORD_STATS
+   /*
+    * Statistics on number of cells and patches generated.
+    */
+   tbox::Array<tbox::Pointer<tbox::Statistic> > d_boxes_stat;
+   tbox::Array<tbox::Pointer<tbox::Statistic> > d_cells_stat;
+   tbox::Array<tbox::Pointer<tbox::Statistic> > d_timestamp_stat;
+#endif
+
+   // The following are not yet implemented:
+   GriddingAlgorithm(
+      const GriddingAlgorithm&);
+   void
+   operator = (
+      const GriddingAlgorithm&);
+
+   // Verbose flags.
+   static char s_check_overflow_nesting;
+   static char s_check_proper_nesting;
+   static char s_check_connectors;
+   static char s_print_hierarchy;
+   static char s_print_steps;
+
+   /*
+    * Static initialization and cleanup handler.
+    */
+   static tbox::StartupShutdownManager::Handler
+   s_initialize_handler;
+
+   /*
+    *
+    */
+   static tbox::StartupShutdownManager::Handler
+   s_startup_shutdown_handler;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/mesh/GriddingAlgorithm.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,189 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   GriddingAlgorihtm's implementation of PatchHierarchy 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_GriddingAlgorithmConnectorWidthRequestor_C
+#define included_mesh_GriddingAlgorithmConnectorWidthRequestor_C
+
+#include "SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace mesh {
+
+
+/*
+ **************************************************************************
+ **************************************************************************
+ */
+GriddingAlgorithmConnectorWidthRequestor::GriddingAlgorithmConnectorWidthRequestor()
+{
+   return;
+}
+
+
+/*
+ **************************************************************************
+ * Compute Connector widths that this class requires in order to work
+ * properly on a given hierarchy.
+ **************************************************************************
+ */
+void GriddingAlgorithmConnectorWidthRequestor::computeRequiredConnectorWidths(
+   std::vector<hier::IntVector>& self_connector_widths,
+   std::vector<hier::IntVector>& fine_connector_widths,
+   const hier::PatchHierarchy& patch_hierarchy) const
+{
+   const tbox::Dimension &dim(patch_hierarchy.getDim());
+   const int max_levels(patch_hierarchy.getMaxNumberOfLevels());
+
+   const hier::IntVector max_ghost_width(
+      patch_hierarchy.getPatchDescriptor()->getMaxGhostWidth(dim));
+
+   const hier::IntVector max_stencil_width(
+      patch_hierarchy.getGridGeometry()->getMaxTransferOpStencilWidth());
+
+   fine_connector_widths.resize(max_levels-1, hier::IntVector(dim));
+   self_connector_widths.resize(max_levels, hier::IntVector(dim));
+
+   /*
+    * Compute the Connector width needed to ensure all edges are found
+    * during mesh generation.  It is safe to be conservative, but
+    * carrying around a larger than necessary width requires more
+    * memory and slows down Connector operations.
+    *
+    * We compute the finest level's requirement first because coarser
+    * levels' requirements depend on finer levels'.  Connector widths
+    * at coarser levels are computed in
+    * computeCoarserLevelConnectorWidthsFromFines() once the finer
+    * level's Connector widths are computed.
+    */
+   self_connector_widths[max_levels - 1] = max_ghost_width;
+   for (int ln = max_levels - 2; ln > -1; --ln) {
+
+      computeCoarserLevelConnectorWidthsFromFines(
+         fine_connector_widths[ln],
+         self_connector_widths[ln],
+         self_connector_widths[ln + 1],
+         patch_hierarchy.getRatioToCoarserLevel(ln+1),
+         hier::IntVector(dim, patch_hierarchy.getProperNestingBuffer(ln+1)),
+         max_stencil_width,
+         max_ghost_width);
+   }
+}
+
+
+/*
+ *************************************************************************
+ * During mesh generation, coarse-to-fine Connectors are commonly
+ * used to compute fine-to-fine Connectors.  As a result, the
+ * required coarse-to-fine width is a function of the required
+ * fine-to-fine width, which is why the fine-level width data is
+ * required for this method.
+ *
+ * Given the Connector width required to support mesh operations on a
+ * fine level (and other relevant parameters), compute the width
+ * required of Connectors at the next coarser level.  The width at the
+ * coarer level must be big enough to support mesh generation
+ * operations for itself and all finer levels.  We base the
+ * computations on knowledge of how the GriddingAlgorithm generates
+ * the mesh.  If those change, then this method should be updated.
+ *
+ * The formula for computing the width for coarse-level Connectors
+ * reflects how SAMRAI generates the mesh.  This formula would have to
+ * change if what it is based on changes.
+ *************************************************************************
+ */
+
+void GriddingAlgorithmConnectorWidthRequestor::computeCoarserLevelConnectorWidthsFromFines(
+   hier::IntVector& coarse_to_fine_width,
+   hier::IntVector& coarse_to_coarse_width,
+   const hier::IntVector& fine_to_fine_width,
+   const hier::IntVector& fine_to_coarse_ratio,
+   const hier::IntVector& nesting_buffer_at_fine,
+   const hier::IntVector& max_stencil_width_at_coarse,
+   const hier::IntVector& max_ghost_width_at_coarse) const
+{
+   NULL_USE(max_stencil_width_at_coarse);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   const tbox::Dimension &dim(fine_to_fine_width.getDim());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS7(dim,
+      coarse_to_fine_width,
+      coarse_to_coarse_width,
+      fine_to_fine_width,
+      fine_to_coarse_ratio,
+      nesting_buffer_at_fine,
+      max_stencil_width_at_coarse,
+      max_ghost_width_at_coarse);
+#endif
+
+   /*
+    * Coarse-to-fine width must be big enough to cover the width at the
+    * finer level.  For example, the coarse level is used to bridge for
+    * the fine-to-fine Connectors.  All requirements for width at the
+    * finer level and above should be reflected in the fine-to-fine
+    * width.
+    */
+   coarse_to_fine_width =
+      hier::IntVector::ceiling(fine_to_fine_width, fine_to_coarse_ratio);
+   /*
+    * Coarse-to-fine width must be big enough for the [ln] -> [ln+1]
+    * Connector to see all the [ln+1] MappedBoxes that are used to add
+    * tags to [ln-1] MappedBoxes for ensuring [ln] properly nests
+    * [ln+1] when [ln] is being regenerated.
+    *
+    * The rationale for this adjustment is illustrated by the following
+    * worst case example in 1D.  We are tagging on L0 to regenerate L1.
+    * We must tag wherever [L2 grown by nesting buffer] intersects L0.
+    *
+    *          |--|         L2, 1-cell wide in this example.
+    *
+    *    |..|..|--|..|..|   L2, plus 2-cell nesting buffer
+    *
+    *          |--|         Current L1, to be replaced.
+    *
+    *    |--------------|   Minimal L1 to properly nest L2
+    *
+    *    |--|--|--|--|--|   Current L0, with 5 cells.  All cells must
+    *                       be fully tagged to ensure new L1 meets it
+    *                       minimal coverage.
+    *
+    * To determine where L0 must be tagged, we must bridge for
+    * Connector L0--->L2.  And to make sure the left-most patch of L0
+    * sees the patch on L2 via this Connector, Connector L0--->L1 must
+    * be have at least a 2-cell GCW (in L2 index space).
+    */
+   coarse_to_fine_width.max(
+      hier::IntVector::ceiling(nesting_buffer_at_fine, fine_to_coarse_ratio));
+
+   /*
+    * Coarse-to-coarse Connectors must cover all data that the finer
+    * level depends on.
+    */
+   coarse_to_coarse_width = coarse_to_fine_width;
+
+   /*
+    * Must cover coarse level's own ghost cells.
+    */
+   coarse_to_coarse_width.max( max_ghost_width_at_coarse );
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   GriddingAlgorihtm's implementation of PatchHierarchy 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_GriddingAlgorithmConnectorWidthRequestor
+#define included_mesh_GriddingAlgorithmConnectorWidthRequestor
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/PatchHierarchy.h"
+
+namespace SAMRAI {
+namespace mesh {
+
+
+/*!
+ * @brief Implementation of the strategy class
+ * hier::PatchHierarchy::ConnectorWidthRequestorStrategy to tell the
+ * hier::PatchHierarchy how wide GriddingAlgorithm needs Connectors
+ * between hierarchy levels to be.
+ */
+class GriddingAlgorithmConnectorWidthRequestor
+   : public hier::PatchHierarchy::ConnectorWidthRequestorStrategy {
+
+public:
+
+   /*!
+    * @brief Constructor.
+    */
+   GriddingAlgorithmConnectorWidthRequestor();
+
+   /*!
+    * @brief Compute Connector widths that this class requires in
+    * order to work properly on a given hierarchy.
+    *
+    * Implements the pure virtual method
+    * hier::PatchHierarchy::ConnectorWidthRequestorStrategy::computeRequiredConnectorWidths()
+    *
+    * @param[out] self_connector_width Array of widths for Connectors
+    * from a level to itself.
+    *
+    * @param[out] fine_connector_width Array of widths for Connectors
+    * from a level to the next finer level.
+    *
+    * @param[in]  patch_hierarchy
+    */
+   void computeRequiredConnectorWidths(
+      std::vector<hier::IntVector>& self_connector_widths,
+      std::vector<hier::IntVector>& fine_connector_widths,
+      const hier::PatchHierarchy& patch_hierarchy) const;
+
+private:
+
+   /*!
+    * @brief Compute the Connector widths needed at a given level
+    * number to support generating given Connector width at finer
+    * levels.
+    *
+    * @param[out] coarse_to_fine_width Required width for the
+    * coarse--->fine Connector.
+    *
+    * @param[out] coarse_to_coarse_width Required width for the
+    * coarse--->coarse Connector.
+    *
+    * @param[in] fine_to_fine_width Fine--->fine width which the
+    * coarse--->fine Connector must support.
+    *
+    * @param[in] fine_to_coarse_ratio The refinement ratio.
+    *
+    * @param[in] nesting_buffer_at_fine The nesting buffer between
+    * fine and next finer level, measured in the fine index space.
+    *
+    * @param[in] max_stencil_width_at_coarse The maximum stencil width
+    * to be used on the coarse level.
+    *
+    * @param[in] max_ghost_width_at_coarse The maximum ghost cell
+    * width to be used on the coarse level.
+    */
+   void
+   computeCoarserLevelConnectorWidthsFromFines(
+      hier::IntVector& coarse_to_fine_width,
+      hier::IntVector& coarse_to_coarse_width,
+      const hier::IntVector& fine_to_fine_width,
+      const hier::IntVector& fine_to_coarse_ratio,
+      const hier::IntVector& nesting_buffer_at_fine,
+      const hier::IntVector& max_stencil_width_at_coarse,
+      const hier::IntVector& max_ghost_width_at_coarse) const;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/LoadBalanceStrategy.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/LoadBalanceStrategy.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,302 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Strategy interface for box load balancing routines. 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_LoadBalanceStrategy_C
+#define included_mesh_LoadBalanceStrategy_C
+
+#include "SAMRAI/mesh/LoadBalanceStrategy.h"
+
+#include <cstdlib>
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace mesh {
+
+// using namespace std;
+
+int LoadBalanceStrategy::s_sequence_number = 0;
+
+/*
+ *************************************************************************
+ *									*
+ * The constructor and destructor for LoadBalanceStrategy do        *
+ * nothing that could be considered even remotely interesting.		*
+ *									*
+ *************************************************************************
+ */
+
+LoadBalanceStrategy::LoadBalanceStrategy()
+{
+}
+
+LoadBalanceStrategy::~LoadBalanceStrategy()
+{
+}
+
+void LoadBalanceStrategy::loadBalanceMappedBoxLevel(
+   hier::MappedBoxLevel& balance_mapped_box_level,
+   hier::Connector& balance_to_anchor,
+   hier::Connector& anchor_to_balance,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int level_number,
+   const hier::Connector& unbalanced_to_attractor,
+   const hier::Connector& attractor_to_unbalanced,
+   const hier::IntVector& min_size,
+   const hier::IntVector& max_size,
+   const hier::MappedBoxLevel& domain_mapped_box_level,
+   const hier::IntVector& bad_interval,
+   const hier::IntVector& cut_factor,
+   const tbox::RankGroup& rank_group) const
+{
+   NULL_USE(balance_mapped_box_level);
+   NULL_USE(balance_to_anchor);
+   NULL_USE(anchor_to_balance);
+   NULL_USE(hierarchy);
+   NULL_USE(level_number);
+   NULL_USE(unbalanced_to_attractor);
+   NULL_USE(attractor_to_unbalanced);
+   NULL_USE(min_size);
+   NULL_USE(max_size);
+   NULL_USE(domain_mapped_box_level);
+   NULL_USE(bad_interval);
+   NULL_USE(cut_factor);
+   NULL_USE(rank_group);
+   TBOX_ERROR(
+      "Unusable base method LoadBalanceStrategy::loadBalanceMappedBoxLevel used.");
+}
+
+/*
+ *************************************************************************
+ * Report the load balance on processor, primarily
+ * for debugging and checking load balance quality.
+ *************************************************************************
+ */
+void LoadBalanceStrategy::markLoadForPostprocessing(
+   int rank,
+   double load,
+   int nbox)
+{
+   tbox::plog << "Load mark " << s_sequence_number++
+              << " proc " << rank
+              << " load " << load
+              << " nbox " << nbox
+              << "\n";
+}
+
+/*
+ *************************************************************************
+ * Gather and report load balance for a single balancing.
+ *************************************************************************
+ */
+void LoadBalanceStrategy::gatherAndReportLoadBalance(
+   double local_load,
+   const tbox::SAMRAI_MPI& mpi,
+   std::ostream& os) const
+{
+   int nproc = mpi.getSize();
+   std::vector<double> workloads(nproc);
+   if (mpi.getSize() > 1) {
+      mpi.Allgather(&local_load,
+         1,
+         MPI_DOUBLE,
+         &workloads[0],
+         1,
+         MPI_DOUBLE);
+   } else {
+      workloads[0] = local_load;
+   }
+   this->reportLoadBalance(workloads, os);
+}
+
+/*
+ *************************************************************************
+ * Gather and report load balance for multiple balancings.
+ *************************************************************************
+ */
+void LoadBalanceStrategy::gatherAndReportLoadBalance(
+   const std::vector<double>& local_loads,
+   const tbox::SAMRAI_MPI& mpi,
+   std::ostream& os) const
+{
+   if (mpi.getSize() > 1) {
+      int nproc = mpi.getSize();
+      std::vector<double> mutable_local_loads(local_loads);
+      std::vector<double> global_workloads(nproc * local_loads.size());
+      mpi.Allgather(&mutable_local_loads[0],
+         static_cast<int>(local_loads.size()),
+         MPI_DOUBLE,
+         &global_workloads[0],
+         static_cast<int>(local_loads.size()),
+         MPI_DOUBLE);
+      std::vector<double> workloads_at_seq_i(nproc);
+      for (size_t i = 0; i < local_loads.size(); ++i) {
+         for (int n = 0; n < nproc; ++n) {
+            workloads_at_seq_i[n] = global_workloads[i + n * local_loads.size()];
+         }
+         os << "================ Sequence " << i << " ===============\n";
+         this->reportLoadBalance(workloads_at_seq_i, os);
+      }
+   } else {
+      std::vector<double> workloads(1);
+      workloads[0] = local_loads[0];
+      this->reportLoadBalance(workloads, os);
+   }
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void LoadBalanceStrategy::reportLoadBalance(
+   const std::vector<double>& workloads,
+   std::ostream& os)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   const int nproc = mpi.getSize();
+
+   const double demarks[] = { 0.50,
+                              0.70,
+                              0.85,
+                              0.92,
+                              0.98,
+                              1.02,
+                              1.08,
+                              1.15,
+                              1.30,
+                              1.50,
+                              2.00 };
+   const int ndemarks = 11;
+
+   TBOX_ASSERT((int)workloads.size() == nproc);
+
+   RankAndLoad* rank_and_load = new RankAndLoad[nproc];
+
+   double total_load = 0.0;
+
+   for (int i = 0; i < nproc; ++i) {
+      rank_and_load[i].rank = i;
+      rank_and_load[i].load = workloads[i];
+      total_load += workloads[i];
+   }
+   qsort((void *)rank_and_load,
+      nproc,
+      sizeof(RankAndLoad),
+      qsortRankAndLoadCompareAscending);
+
+   const double avg_load = total_load / nproc;
+   const double min_load = rank_and_load[0].load;
+   const int r_min_load = rank_and_load[0].rank;
+   const double max_load = rank_and_load[nproc - 1].load;
+   const int r_max_load = rank_and_load[nproc - 1].rank;
+
+   os << "total/avg loads: "
+      << total_load << " / "
+      << avg_load << "\n";
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1572)
+#endif
+   os << std::setprecision(2)
+      << "min/max loads: "
+      << min_load << " @ P" << r_min_load << " / "
+      << max_load << " @ P" << r_max_load << "   "
+      << "diffs: "
+      << min_load - avg_load << " / "
+      << max_load - avg_load << "   "
+      << std::setprecision(3)
+      << "normalized: "
+      << (avg_load != 0 ? min_load / avg_load : 0.0) << " / "
+      << (avg_load != 0 ? max_load / avg_load : 0.0) << "\n";
+
+   const char bars[] = "----";
+   const char space[] = "   ";
+   os.setf(std::ios_base::fixed);
+   os << bars;
+   for (int n = 0; n < ndemarks; ++n) {
+      os << std::setw(4) << std::setprecision(2) << demarks[n] << bars;
+   }
+   os << '\n';
+
+   double population;
+   int irank = 0;
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1572)
+#endif
+   for (int n = 0; n < ndemarks; ++n) {
+      double top = demarks[n];
+      int old_irank = irank;
+      for ( ; irank < nproc; ++irank)
+         if (avg_load == 0 ||
+             rank_and_load[irank].load / avg_load > top) break;
+      int nrank = irank - old_irank;
+      population = 100.0 * nrank / nproc;
+      os << std::setw(5) << population << space;
+   }
+   population = 100.0 * (nproc - irank) / nproc;
+   os << population << space;
+   os << '\n';
+
+   delete[] rank_and_load;
+}
+
+/*
+ *************************************************************************
+ * for use when sorting loads using the C-library qsort
+ *************************************************************************
+ */
+int LoadBalanceStrategy::qsortRankAndLoadCompareDescending(
+   const void* v,
+   const void* w)
+{
+   const RankAndLoad* lv = (const RankAndLoad *)v;
+   const RankAndLoad* lw = (const RankAndLoad *)w;
+   if (lv->load > lw->load) return -1;
+
+   if (lv->load < lw->load) return 1;
+
+   return 0;
+}
+
+/*
+ *************************************************************************
+ * for use when sorting loads using the C-library qsort
+ *************************************************************************
+ */
+int LoadBalanceStrategy::qsortRankAndLoadCompareAscending(
+   const void* v,
+   const void* w)
+{
+   const RankAndLoad* lv = (const RankAndLoad *)v;
+   const RankAndLoad* lw = (const RankAndLoad *)w;
+   if (lv->load < lw->load) return -1;
+
+   if (lv->load > lw->load) return 1;
+
+   return 0;
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/LoadBalanceStrategy.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/LoadBalanceStrategy.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,268 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Strategy interface for box load balancing routines. 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_LoadBalanceStrategy
+#define included_mesh_LoadBalanceStrategy
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/ProcessorMapping.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/RankGroup.h"
+
+namespace SAMRAI {
+namespace mesh {
+
+/*!
+ * @brief Class LoadBalanceStrategy is an abstract base class that
+ * defines a Strategy pattern interface for operations that load
+ * balance patches on a single AMR patch hierarchy level.  Typically,
+ * such operations are invoked after the domain of a new hierarchy
+ * level is determined (e.g., via some error estimation procedure) and
+ * is applied to the collection of boxes that describe the domain.  The
+ * load balancing process produces a set of boxes from which patches on
+ * the new level are created and a processor mapping describing how the
+ * new patches are mapped to processors.
+ *
+ * @see hier::PatchLevel
+ * @see hier::ProcessorMapping
+ */
+
+class LoadBalanceStrategy:public tbox::DescribedClass
+{
+public:
+   /*!
+    * Construct load balance strategy object.
+    */
+   LoadBalanceStrategy();
+
+   /*!
+    * This virtual destructor does nothing interesting.
+    */
+   virtual ~LoadBalanceStrategy();
+
+   /*!
+    * Indicate whether load balancing procedure for given level depends on
+    * patch data on mesh.  This can be used to determine whether a level
+    * needs to be rebalanced although its box configuration is unchanged.
+    *
+    * @return Boolean value of true if load balance routines for level
+    *        depend on patch data; false otherwise.
+    *
+    * @param level_number Integer level number.
+    */
+   virtual bool
+   getLoadBalanceDependsOnPatchData(
+      int level_number) const = 0;
+
+   /*!
+    * @brief Given a MappedBoxLevel, representing the domain of a specified
+    * level in the AMR hierarchy, generate a new MappedBoxLevel from which the
+    * patches for the level may be formed and update two Connectors
+    * incident on the changed MappedBoxLevel.
+    *
+    * The union of the boxes in the balance_mapped_box_level is the same
+    * before and after the the method call.
+    *
+    * @param[in,out] balance_mapped_box_level Input MappedBoxLevel.  On input, this is the pre-balance
+    *  MappedBoxLevel.  On output, it is the balanced MappedBoxLevel.
+    *
+    * @param[in,out] balance_to_anchor Connector between the balance_mapped_box_level and
+    *  some given "anchor mapped_box_level".
+    *  This must be accurate on input.  On putput, connects the newly
+    *  balanced balance_mapped_box_level to the anchor mapped_box_level.
+    *
+    * @param[in,out] anchor_to_balance Transpose of balance_to_anchor.
+    *
+    * @param[in] hierarchy The hierarchy where the work distribution
+    * data lives.
+    *
+    * @param[in] level_number The number of the level where the work
+    * distribution data lives.
+    *
+    * @param[in] unbalanced_to_attractor Connector between the
+    * balance_mapped_box_level and an "attractor" MappedBoxLevel.
+    * This data may be used to indicate preference for data locality.
+    * The implementation should try to maximize overlaps between
+    * attractor and balance cells owned by the same process.
+    *
+    * @param[in] attractor_to_unbalanced Transpose of unbalanced_to_attractor.
+    *
+    * @param[in] min_size hier::IntVector representing mimimum box size.
+    *
+    * @param[in] max_size hier::IntVector representing maximum box size.
+    *
+    * @param[in] domain_mapped_box_level Description of the domain.
+    *
+    * @param[in] bad_interval
+    *  hier::IntVector indicating the length of an interval
+    *  of cells along each side of the box where chopping
+    *  the box may produce boxes with certain "bad" properties.
+    *  For example, this is primiarily used to avoid generating
+    *  ghost regions for patches that intersect the domain
+    *  boundary in ways that may it difficult for a use to
+    *  provide boundary values.  Thus, it is typically related
+    *  to the maximum ghost cell width in the problem.  See
+    *  hier::BoxUtilities header file for more information.
+    *
+    * @param[in] cut_factor
+    *  hier::IntVector indicating factor for chopping
+    *  each side of a box; i.e., after chopping a box,
+    *  the number of cells along each direction of each
+    *  piece must be an integer multiple of the corresponding
+    *  entry in the cut factor vector.  For example, the
+    *  cut factor may be related to the coarsen ratio between
+    *  levels in the hierarchy in which case it may be used
+    *  to produce boxes that can be coarsened by a certain
+    *  factor if needed.  See hier::BoxUtilities header file
+    *  for more information.
+    *
+    * @param[in] rank_group
+    *  Input tbox::RankGroup indicating a set of ranks on which all boxes
+    *  in the output balance_mapped_box_level will be restricted.  Some
+    *  child classes may not make use of this argument.
+    */
+   virtual void
+   loadBalanceMappedBoxLevel(
+      hier::MappedBoxLevel& balance_mapped_box_level,
+      hier::Connector& balance_to_anchor,
+      hier::Connector& anchor_to_balance,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int level_number,
+      const hier::Connector& unbalanced_to_attractor,
+      const hier::Connector& attractor_to_unbalanced,
+      const hier::IntVector& min_size,
+      const hier::IntVector& max_size,
+      const hier::MappedBoxLevel& domain_mapped_box_level,
+      const hier::IntVector& bad_interval,
+      const hier::IntVector& cut_factor, // Default v 2.x.x = hier::IntVector::getOne(tbox::Dimension(DIM))
+      const tbox::RankGroup& rank_group = tbox::RankGroup()) const;
+
+   /*!
+    * @brief Gather workloads in an MPI group and write out a summary
+    * of load balance efficiency.
+    *
+    * To be used for performance evaluation.  Not recommended for general use.
+    *
+    * @param[in] local_workload Workload of the local process
+    *
+    * @param[in] mpi Represents all processes involved in the load balancing.
+    *
+    * @param[in] output_stream
+    *
+    * TODO: This method is a utility that doesn't strictly belong in a
+    * strategy design pattern.  It should be moved elsewhere.
+    */
+   void
+   gatherAndReportLoadBalance(
+      double local_workload,
+      const tbox::SAMRAI_MPI& mpi,
+      std::ostream& output_stream = tbox::plog) const;
+
+   /*!
+    * @brief Gather a sequence of workloads in an MPI group and write
+    * out a summary of load balance efficiency.
+    *
+    * Each value in the sequence of workloads represent a certain load
+    * the local process had over a sequence of load balancings.
+    *
+    * To be used for performance evaluation.  Not recommended for general use.
+    *
+    * @param[in] local_workloads Sequence of workloads of the local
+    * process.  The size of @c local_loads is the number times load
+    * balancing has been used.  It must be the same across all
+    * processors in @c mpi.
+    *
+    * @param[in] mpi Represents all processes involved in the load balancing.
+    *
+    * @param[in] output_stream
+    *
+    * TODO: This method is a utility that doesn't strictly belong in a
+    * strategy design pattern.  It should be moved elsewhere.
+    */
+   void
+   gatherAndReportLoadBalance(
+      const std::vector<double>& local_loads,
+      const tbox::SAMRAI_MPI& mpi,
+      std::ostream& output_stream = tbox::plog) const;
+
+protected:
+
+   /*!
+    * @brief Write load data to log for postprocessing later.
+    *
+    * For development only.  Not for general use.
+    *
+    * @param[in] rank
+    *
+    * @param[in] load
+    *
+    * @param[in] nbox
+    *
+    * TODO: This method does not belong in a strategy base class and
+    * should be moved elsewhere.
+    */
+   static void
+   markLoadForPostprocessing(
+      int rank,
+      double load,
+      int nbox);
+
+   /*!
+    * @brief Write out a short report of how well load is balanced.
+    *
+    * Given the workloads of a number of processes, format and write
+    * out a brief report for assessing how well balanced the workloads
+    * are.
+    *
+    * @param[in] workloads One value for each process.  The number of
+    * processes is taken to be the size of this container.
+    *
+    * @param[in] output_stream
+    *
+    * TODO: This method does not belong in a strategy base class and
+    * should be moved elsewhere.
+    */
+   static void
+   reportLoadBalance(
+      const std::vector<double>& workloads,
+      std::ostream& output_stream);
+
+private:
+   // The following are not implemented:
+   LoadBalanceStrategy(
+      const LoadBalanceStrategy&);
+   void
+   operator = (
+      const LoadBalanceStrategy&);
+
+   struct RankAndLoad { int rank;
+                        double load;
+   };
+
+   static int s_sequence_number;
+   static int
+   qsortRankAndLoadCompareAscending(
+      const void* v,
+      const void* w);
+   static int
+   qsortRankAndLoadCompareDescending(
+      const void* v,
+      const void* w);
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,2518 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=BalanceUtilities.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BalanceUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/SpatialKey.I				\
+	$(INCLUDE_SAM)/SAMRAI/mesh/SpatialKey.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h BalanceUtilities.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=BaseGriddingAlgorithm.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h BaseGriddingAlgorithm.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=BergerRigoutsos.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelConnectorUtils.I	\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelConnectorUtils.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappingConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/OverlapConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BergerRigoutsos.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BergerRigoutsosNode.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommGroup.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommGroup.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/vector.h BergerRigoutsos.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=BergerRigoutsosNode.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BergerRigoutsosNode.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommGroup.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommGroup.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/vector.h BergerRigoutsosNode.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
+FILE_4=BoxGeneratorStrategy.o
+DEPENDS_4:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h BoxGeneratorStrategy.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_4 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_4:X.o=${NDIM}.o}: ${DEPENDS_4}
+
+FILE_5=ChopAndPackLoadBalancer.o
+DEPENDS_5:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/OverlapConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BalanceUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/ChopAndPackLoadBalancer.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/SpatialKey.I				\
+	$(INCLUDE_SAM)/SAMRAI/mesh/SpatialKey.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	ChopAndPackLoadBalancer.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_5 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_5:X.o=${NDIM}.o}: ${DEPENDS_5}
+
+FILE_6=GriddingAlgorithm.o
+DEPENDS_6:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelConnectorUtils.I	\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelConnectorUtils.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappingConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/OverlapConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitializeConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IEEE.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IEEE.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineScheduleConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	GriddingAlgorithm.C						\
+	StandardTagAndInitializeConnectorWidthRequestor.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_6 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_6:X.o=${NDIM}.o}: ${DEPENDS_6}
+
+FILE_7=GriddingAlgorithmConnectorWidthRequestor.o
+DEPENDS_7:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	GriddingAlgorithmConnectorWidthRequestor.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_7 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_7:X.o=${NDIM}.o}: ${DEPENDS_7}
+
+FILE_8=LoadBalanceStrategy.o
+DEPENDS_8:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h LoadBalanceStrategy.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_8 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_8:X.o=${NDIM}.o}: ${DEPENDS_8}
+
+FILE_9=MultiblockGriddingAlgorithm.o
+DEPENDS_9:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelConnectorUtils.I	\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelConnectorUtils.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappingConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/OverlapConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingAlgorithm.I	\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingAlgorithm.h	\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingTagger.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IEEE.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IEEE.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineScheduleConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	MultiblockGriddingAlgorithm.C					\
+	StandardTagAndInitializeConnectorWidthRequestor.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_9 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_9:X.o=${NDIM}.o}: ${DEPENDS_9}
+
+FILE_10=MultiblockGriddingTagger.o
+DEPENDS_10:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingTagger.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	MultiblockGriddingTagger.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_10 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_10:X.o=${NDIM}.o}: ${DEPENDS_10}
+
+FILE_11=SpatialKey.o
+DEPENDS_11:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/SpatialKey.I				\
+	$(INCLUDE_SAM)/SAMRAI/mesh/SpatialKey.h SpatialKey.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_11 +=\
+	
+endif
+
+${FILE_11:X.o=${NDIM}.o}: ${DEPENDS_11}
+
+FILE_12=StandardTagAndInitStrategy.o
+DEPENDS_12:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	StandardTagAndInitStrategy.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_12 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_12:X.o=${NDIM}.o}: ${DEPENDS_12}
+
+FILE_13=StandardTagAndInitialize.o
+DEPENDS_13:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/OverlapConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIntegerConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	StandardTagAndInitialize.C					\
+	StandardTagAndInitializeConnectorWidthRequestor.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_13 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_13:X.o=${NDIM}.o}: ${DEPENDS_13}
+
+FILE_14=StandardTagAndInitializeConnectorWidthRequestor.o
+DEPENDS_14:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitializeConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineScheduleConnectorWidthRequestor.h\
+	StandardTagAndInitializeConnectorWidthRequestor.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_14 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_14:X.o=${NDIM}.o}: ${DEPENDS_14}
+
+FILE_15=TagAndInitializeStrategy.o
+DEPENDS_15:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	TagAndInitializeStrategy.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_15 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_15:X.o=${NDIM}.o}: ${DEPENDS_15}
+
+FILE_16=TreeLoadBalancer.o
+DEPENDS_16:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappingConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/OverlapConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BalanceUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/SpatialKey.I				\
+	$(INCLUDE_SAM)/SAMRAI/mesh/SpatialKey.h				\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommGroup.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommGroup.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/BalancedDepthFirstTree.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h TreeLoadBalancer.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_16 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_16:X.o=${NDIM}.o}: ${DEPENDS_16}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,49 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   primary makefile for compiling the SAMRAI mesh package 
+##
+#########################################################################
+
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/SAMRAI/mesh
+VPATH         = @srcdir@
+OBJECT        = ../../..
+
+default: library
+
+include $(OBJECT)/config/Makefile.config
+
+SUBDIRS = fortran
+
+OBJS = 	\
+	SpatialKey.o \
+	BoxGeneratorStrategy.o \
+	GriddingAlgorithm.o \
+	GriddingAlgorithmConnectorWidthRequestor.o \
+	StandardTagAndInitStrategy.o \
+        StandardTagAndInitialize.o \
+        StandardTagAndInitializeConnectorWidthRequestor.o \
+	TagAndInitializeStrategy.o \
+	BalanceUtilities.o \
+	TreeLoadBalancer.o \
+	ChopAndPackLoadBalancer.o \
+	LoadBalanceStrategy.o \
+	BaseGriddingAlgorithm.o \
+	BergerRigoutsos.o \
+	BergerRigoutsosNode.o \
+	MultiblockGriddingAlgorithm.o \
+	MultiblockGriddingTagger.o
+
+library: $(OBJS)
+	for DIR in $(SUBDIRS); do if test -d $$DIR; then (cd $$DIR && $(MAKE) $@) ; fi || exit 1; done
+clean:
+	$(SAMCLEAN)
+	for DIR in $(SUBDIRS); do if test -d $$DIR; then (cd $$DIR && $(MAKE) $@) ; fi || exit 1; done
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/MultiblockGriddingAlgorithm.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/MultiblockGriddingAlgorithm.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,4928 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR hierarchy generation and regridding routines. 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_MultiblockGriddingAlgorithm_C
+#define included_mesh_MultiblockGriddingAlgorithm_C
+
+#include "SAMRAI/mesh/MultiblockGriddingAlgorithm.h"
+
+#include "SAMRAI/math/PatchCellDataBasicOps.h"
+#include "SAMRAI/math/PatchCellDataOpsInteger.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/xfer/MultiblockRefineAlgorithm.h"
+#include "SAMRAI/xfer/RefineSchedule.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/BoxUtilities.h"
+#include "SAMRAI/hier/MappedBoxLevelConnectorUtils.h"
+#include "SAMRAI/hier/MappedBoxContainerUtils.h"
+#include "SAMRAI/hier/MappingConnectorAlgorithm.h"
+#include "SAMRAI/hier/MappedBoxSet.h"
+#include "SAMRAI/hier/OverlapConnectorAlgorithm.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/MappedBoxTree.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/hier/PeriodicShiftCatalog.h"
+#include "SAMRAI/mesh/StandardTagAndInitialize.h"
+#include "SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/IEEE.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/xfer/RefineScheduleConnectorWidthRequestor.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <iomanip>
+
+#define PATCHLEVEL_DATANAME_BUFSIZE 32
+
+#define ALGS_GRIDDING_ALGORITHM_VERSION (3)
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/mesh/MultiblockGriddingAlgorithm.I"
+#endif
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace mesh {
+
+char MultiblockGriddingAlgorithm::s_check_overflow_nesting = 0;
+char MultiblockGriddingAlgorithm::s_check_proper_nesting = 0;
+char MultiblockGriddingAlgorithm::s_check_connectors = 0;
+char MultiblockGriddingAlgorithm::s_print_mapped_box_level_hierarchy = 0;
+char MultiblockGriddingAlgorithm::s_print_steps = 0;
+
+
+
+/*
+ *************************************************************************
+ *
+ * Initialize the static data members.
+ *
+ *************************************************************************
+ */
+tbox::Array<int> * MultiblockGriddingAlgorithm::s_tag_indx = 0;
+tbox::Array<int> * MultiblockGriddingAlgorithm::s_buf_tag_indx = 0;
+
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_find_domain_complement;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_load_balance;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_load_balance0;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_load_balance_setup;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_bdry_fill_tags_create;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_make_coarsest;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_make_finer;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_make_finer_setup;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_make_finer_tagging;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_make_finer_create;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_regrid_all_finer;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_regrid_finer_create;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_bridge_links;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_fill_tags_from_mapped_box_level;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_tag_cells_for_refinement;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_buffer_tags;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_bdry_fill_tags_comm;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_second_finer_tagging;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_find_refinement;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_bridge_new_to_new;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_find_new_to_new;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_bridge_new_to_coarser;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_bridge_new_to_finer;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_bridge_new_to_old;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_find_boxes_containing_tags;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_enforce_nesting;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_make_nesting_map;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_make_nesting_map_compute;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_make_nesting_map_convert;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_use_nesting_map;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_make_overflow_map;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_make_overflow_map_compute;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_make_overflow_map_convert;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_use_overflow_map;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_compute_external_parts;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_compute_nesting_violator;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_extend_to_domain_boundary;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_extend_within_domain;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_grow_boxes_within_domain;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_sort_nodes;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_modify_connector;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_misc1;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_misc2;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_misc3;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_misc4;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_misc5;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_make_domain;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_get_balance;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_use_balance;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_make_new;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_process_error;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_limit_overflow;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_reset_hier;
+tbox::Pointer<tbox::Timer> MultiblockGriddingAlgorithm::t_box_massage;
+
+tbox::StartupShutdownManager::Handler
+MultiblockGriddingAlgorithm::s_startup_shutdown_handler(
+   0,
+   MultiblockGriddingAlgorithm::startupCallback,
+   MultiblockGriddingAlgorithm::shutdownCallback,
+   0,
+   tbox::StartupShutdownManager::priorityListElements);
+
+tbox::StartupShutdownManager::Handler
+MultiblockGriddingAlgorithm::s_initialize_handler(
+   MultiblockGriddingAlgorithm::initializeCallback,
+   0,
+   0,
+   MultiblockGriddingAlgorithm::finalizeCallback,
+   tbox::StartupShutdownManager::priorityTimers);
+
+/*
+ *************************************************************************
+ *
+ * Constructor and destructor for MultiblockGriddingAlgorithm.
+ *
+ *************************************************************************
+ */
+MultiblockGriddingAlgorithm::MultiblockGriddingAlgorithm(
+   const tbox::Pointer<hier::MultiblockPatchHierarchy> &mb_hierarchy,
+   const std::string& object_name,
+   tbox::Pointer<tbox::Database> input_db,
+   tbox::Pointer<TagAndInitializeStrategy> tag_init_strategy,
+   tbox::Pointer<BoxGeneratorStrategy> generator,
+   tbox::Pointer<LoadBalanceStrategy> balancer,
+   tbox::Pointer<LoadBalanceStrategy> balancer0,
+   MultiblockGriddingTagger* mb_tagger_strategy,
+   bool register_for_restart):
+   BaseGriddingAlgorithm(mb_hierarchy),
+   d_mb_hierarchy(mb_hierarchy),
+   d_dim(mb_hierarchy->getDim()),
+   d_domain_complement_tree(0, hier::MappedBoxTree(d_dim)),
+   d_check_nonrefined_tags('w'),
+   d_check_overlapping_patches('i'),
+   d_sequentialize_patch_indices(false),
+   d_enforce_proper_nesting(true),
+   d_extend_to_domain_boundary(true),
+   d_load_balance(true)
+{
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!input_db.isNull());
+   TBOX_ASSERT(!tag_init_strategy.isNull());
+   TBOX_ASSERT(!generator.isNull());
+   TBOX_ASSERT(!balancer.isNull());
+
+   d_object_name = object_name;
+   d_registered_for_restart = register_for_restart;
+
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->
+      registerRestartItem(d_object_name, this);
+   }
+
+   d_tag_init_strategy = tag_init_strategy;
+   d_box_generator = generator;
+   d_load_balancer = balancer;
+   d_load_balancer0 = balancer0;
+   if (d_load_balancer0.isNull()) {
+      d_load_balancer0 = d_load_balancer;
+   }
+   d_mb_tagger_strategy = mb_tagger_strategy;
+
+   if (mb_tagger_strategy) {
+      d_mb_tagger_strategy = mb_tagger_strategy;
+      d_internal_tagger_strategy = false;
+   } else {
+      d_mb_tagger_strategy = new MultiblockGriddingTagger(d_dim);
+      d_internal_tagger_strategy = true;
+   }
+
+   /*
+    * Construct integer tag variables and add to variable database.
+    * Note that variables and patch data indices are shared among
+    * all MultiblockGriddingAlgorithm instances.  The VariableDatabase
+    * holds the variables, once contructed and registered via the
+    * VariableDatabase::makeInternalSAMRAIWorkVariablePatchDataIndex()
+    * function call.  Note that variables are registered and patch data
+    * indices are made only for the first time through the constructor.
+    */
+   hier::VariableDatabase* var_db =
+      hier::VariableDatabase::getDatabase();
+
+   static std::string tag_interior_variable_name(
+      "MultiblockGriddingAlgorithm__tag-interior");
+   static std::string tag_buffer_variable_name(
+      "MultiblockGriddingAlgorithm__tag-buffer");
+
+   d_tag = var_db->getVariable(tag_interior_variable_name);
+   if (d_tag.isNull()) {
+      d_tag = new pdat::CellVariable<int>(d_dim, tag_interior_variable_name, 1);
+   }
+
+   d_buf_tag = var_db->getVariable(tag_buffer_variable_name);
+   if (d_buf_tag.isNull()) {
+      d_buf_tag = new pdat::CellVariable<int>(d_dim,
+                                              tag_buffer_variable_name,
+                                              1);
+   }
+
+   if ((*s_tag_indx)[d_dim.getValue() - 1] < 0) {
+      (*s_tag_indx)[d_dim.getValue() - 1] =
+         var_db->registerInternalSAMRAIVariable(d_tag,
+            hier::IntVector::getZero(d_dim));
+   }
+   if ((*s_buf_tag_indx)[d_dim.getValue() - 1] < 0) {
+      (*s_buf_tag_indx)[d_dim.getValue() - 1] =
+         var_db->registerInternalSAMRAIVariable(d_buf_tag,
+            hier::IntVector::getOne(d_dim));
+   }
+
+   d_tag_indx = (*s_tag_indx)[d_dim.getValue() - 1];
+   d_buf_tag_indx = (*s_buf_tag_indx)[d_dim.getValue() - 1];
+
+   d_mb_tagger_strategy->setScratchTagPatchDataIndex(d_buf_tag_indx);
+
+   /*
+    * Tag value for refined cells is one; others are zero.
+    */
+   d_true_tag = 1;
+   d_false_tag = 0;
+
+   /*
+    * Initialize communication algorithm for exchanging buffered tag data.
+    */
+   d_mblk_bdry_fill_tags = new xfer::MultiblockRefineAlgorithm(d_mb_hierarchy,
+                                                               d_dim);
+
+   d_mblk_bdry_fill_tags->
+   registerRefine(d_buf_tag_indx,
+      d_buf_tag_indx,
+      d_buf_tag_indx,
+      ((tbox::Pointer<xfer::RefineOperator>)NULL));
+
+
+   d_base_ln = -1;
+
+   d_efficiency_tolerance.resizeArray(d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels());
+   d_combine_efficiency.resizeArray(d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels());
+
+   for (int ln = 0; ln < d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels(); ln++) {
+      d_efficiency_tolerance[ln] = 0.8e0;
+      d_combine_efficiency[ln] = 0.8e0;
+   }
+
+   //d_proper_nesting_complement.resize(d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels(), hier::MappedBoxLevel(d_dim));
+   d_proper_nesting_complement.resize(0);
+   d_to_nesting_complement.resize(0);
+   d_from_nesting_complement.resize(0);
+
+   /*
+    * Initialize object with data read from input and restart databases.
+    */
+   bool is_from_restart = tbox::RestartManager::getManager()->isFromRestart();
+   if (is_from_restart && d_registered_for_restart) {
+      getFromRestart();
+   }
+
+   getFromInput(input_db, is_from_restart);
+
+   /*
+    * This part must go after getFromInput(), where d_tag_init_strategy
+    * has a critical modification.
+    */
+   if ( d_tag_init_strategy->getErrorCoarsenRatio() > 1 ) {
+      tbox::Pointer<StandardTagAndInitialize> std_tag_init(d_tag_init_strategy);
+      if ( ! std_tag_init.isNull() ) {
+         for ( int bn=0; bn<d_mb_hierarchy->getNumberOfBlocks(); ++bn ) {
+            tbox::Pointer<hier::PatchHierarchy> patch_hierarchy(
+               d_mb_hierarchy->getHierarchy(bn));
+            patch_hierarchy->registerConnectorWidthRequestor(
+               std_tag_init->getConnectorWidthRequestor() );
+         }
+      }
+   }
+
+   d_bdry_sched_tags.resizeArray(d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels());
+
+#ifdef MGA_RECORD_STATS
+
+   d_boxes_stat.resizeArray(d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels());
+   d_cells_stat.resizeArray(d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels());
+   d_timestamp_stat.resizeArray(d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels());
+
+   for (int ln = 0; ln < d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels(); ++ln) {
+      std::string ln_text = tbox::Utilities::intToString(ln, 2);
+      const std::string num_boxes_str = std::string("MGA_BoxesL") + ln_text;
+      const std::string num_cells_str = std::string("MGA_CellsL") + ln_text;
+      const std::string timestamp_str = std::string("MGA_TimeL") + ln_text;
+      d_boxes_stat[ln] = tbox::Statistician::getStatistician()->
+         getStatistic(num_boxes_str, "PROC_STAT");
+      d_cells_stat[ln] = tbox::Statistician::getStatistician()->
+         getStatistic(num_cells_str, "PROC_STAT");
+      d_timestamp_stat[ln] = tbox::Statistician::getStatistician()->
+         getStatistic(timestamp_str, "PROC_STAT");
+   }
+
+#endif
+
+}
+
+/*
+ *************************************************************************
+ *
+ * Destructor tells the tbox::RestartManager to remove this object from
+ * the list of restart items.
+ *
+ *************************************************************************
+ */
+MultiblockGriddingAlgorithm::~MultiblockGriddingAlgorithm()
+{
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->unregisterRestartItem(d_object_name);
+   }
+
+   if (d_internal_tagger_strategy && d_mb_tagger_strategy) {
+      delete d_mb_tagger_strategy;
+   }
+
+}
+
+/*
+ *************************************************************************
+ *
+ * Construct coarsest level in the patch hierarchy (i.e., level 0).
+ * This routine operates in two modes:
+ *
+ * (1) If level 0 does not exist in the hierarchy, then a new level
+ *  will be created based on the domain description provided by
+ *  the grid geometry associated with the hierarchy.
+ * (2) If level 0 exists in the hierarchy, then a new level is made
+ *  by re-applying the load balancing routines to the existing level.
+ *  The pre-existing level will be removed from the hierarchy.
+ *
+ * In either case, the new level is placed in the hierarchy as level 0.
+ * If level 0 can be refined (i.e., it will be subject to tagging cells
+ * for refinement), the domain boxes are checked against the constraints
+ * of regridding process.
+ *
+ *************************************************************************
+ */
+
+void MultiblockGriddingAlgorithm::makeCoarsestLevel(
+   const double level_time,
+   const hier::MappedBoxLevel& override_mapped_box_level)
+{
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim, *d_mb_hierarchy, override_mapped_box_level);
+
+   if (override_mapped_box_level.isInitialized()) {
+      TBOX_ERROR("MultiblockGriddingAlgorithm::makeCoarsestLevel is not\n"
+         "supporting override_mapped_box_level yet, due to incomplete coding.");
+   }
+
+   t_make_coarsest->barrierAndStart();
+
+   const hier::MappedBoxLevelConnectorUtils dlbg_edge_utils;
+   const hier::IntVector& one_vec = hier::IntVector::getOne(d_dim);
+
+
+   TBOX_ASSERT(d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels() > 0);
+
+   const int level_number = 0;
+   const unsigned int nblocks = d_mb_hierarchy->getNumberOfBlocks();
+
+   if (d_proper_nesting_complement.size() < nblocks) {
+      const int old_size = static_cast<int>(d_proper_nesting_complement.size());
+      d_proper_nesting_complement.resize(nblocks);
+      for (unsigned int nb = old_size; nb < nblocks; nb++) {
+         if (d_proper_nesting_complement[nb].size() !=
+             (unsigned int)d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels()) {
+            d_proper_nesting_complement[nb].resize(
+               d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels(), hier::MappedBoxLevel(d_dim));
+         }
+      }
+   }
+   if (d_to_nesting_complement.size() < nblocks) {
+      const int old_size = static_cast<int>(d_to_nesting_complement.size());
+      d_to_nesting_complement.resize(nblocks);
+      for (unsigned int nb = old_size; nb < nblocks; nb++) {
+         if (d_to_nesting_complement[nb].size() !=
+             (unsigned int)d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels()) {
+            d_to_nesting_complement[nb].resize(d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels());
+         }
+      }
+   }
+   if (d_from_nesting_complement.size() < nblocks) {
+      const int old_size = static_cast<int>(d_from_nesting_complement.size());
+      d_from_nesting_complement.resize(nblocks);
+      for (unsigned int nb = old_size; nb < nblocks; nb++) {
+         if (d_from_nesting_complement[nb].size() !=
+             (unsigned int)d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels()) {
+            d_from_nesting_complement[nb].resize(d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels());
+         }
+      }
+   }
+
+   if (static_cast<unsigned int>(d_domain_complement_tree.size()) < nblocks) {
+      d_domain_complement_tree.resizeArray(nblocks, hier::MappedBoxTree(d_dim));
+   }
+
+   bool level_zero_exists = false;
+   for (unsigned int b = 0; b < nblocks; b++) {
+      tbox::Pointer<hier::PatchHierarchy> patch_hierarchy =
+         d_mb_hierarchy->getHierarchy(b);
+      if ((patch_hierarchy->getNumberOfLevels() > 0)) {
+         if (!(patch_hierarchy->getPatchLevel(level_number).isNull())) {
+            level_zero_exists = true;
+         }
+      }
+   }
+
+   hier::Connector* domain_to_domain = new hier::Connector[nblocks];
+   hier::Connector* domain_to_new = new hier::Connector[nblocks];
+   hier::Connector* new_to_domain = new hier::Connector[nblocks];
+
+   tbox::Array<tbox::Pointer<hier::PatchLevel> > old_level(nblocks);
+
+   for (unsigned int nb = 0; nb < nblocks; nb++) {
+
+      tbox::Pointer<hier::PatchHierarchy> patch_hierarchy =
+         d_mb_hierarchy->getHierarchy(nb);
+
+      TBOX_ASSERT(!(patch_hierarchy.isNull()));
+      TBOX_ASSERT(!(patch_hierarchy->getGridGeometry().isNull()));
+
+      hier::BoxArray domain_boxes =
+         patch_hierarchy->getGridGeometry()->getPhysicalDomain();
+
+      hier::IntVector smallest_patch(d_dim);
+      hier::IntVector largest_patch(d_dim);
+      hier::IntVector extend_ghosts(d_dim);
+      {
+      hier::IntVector smallest_box_to_refine(d_dim);
+      // "false" argument: for_building_finer level = false
+      getGriddingParameters(smallest_patch,
+         smallest_box_to_refine,
+         largest_patch,
+         extend_ghosts,
+         *patch_hierarchy,
+         level_number,
+         false);
+      }
+
+      /*
+       * If there is no level 0 in the patch hierarchy, then check
+       * constraints on domain description.
+       */
+
+      if (!level_zero_exists) {
+
+         for (int i = 0; i < domain_boxes.size(); ++i) {
+            hier::Box test_box = domain_boxes[i];
+            for (int dir = 0; dir < d_dim.getValue(); dir++) {
+               if (test_box.numberCells(dir) < smallest_patch(dir)) {
+                  int error_coarsen_ratio =
+                     d_tag_init_strategy->getErrorCoarsenRatio();
+                  if (error_coarsen_ratio > 1) {
+                     TBOX_ERROR(
+                        d_object_name << ": "
+                        << "\nBox " << i << ", "
+                        << test_box
+                        <<
+                        ", from the input file violates"
+                        <<
+                        "the minimum patch size constraints."
+                        <<
+                        "\nVerify that boxes are larger than"
+                        <<
+                        "the maximum ghost width and/or"
+                        <<
+                        "\nthe specified minimum patch size."
+                        <<
+                        "\nNOTE: to assure the constraints are"
+                        <<
+                        "properly enforced during coarsening for"
+                        <<
+                        "\nerror computation, the minimum patch"
+                        <<
+                        "size is the smallest patch size multiplied"
+                        <<
+                        "\nby the error coarsen ratio, which is "
+                        << error_coarsen_ratio
+                        << " in this case."
+                        << std::endl);
+                  } else {
+                     TBOX_ERROR(
+                        d_object_name << ": "
+                        << "\nBox " << i << ", "
+                        << test_box
+                        <<
+                        ", from the input file violates"
+                        <<
+                        "the minimum patch size constraints."
+                        <<
+                        "\nVerify that boxes are larger than"
+                        <<
+                        "the maximum ghost width and/or"
+                        <<
+                        "\nthe specified minimum patch size."
+                        << std::endl);
+                  }
+               }
+            }
+         }
+
+         hier::BoxList domain_list(domain_boxes);
+         if (domain_list.boxesIntersect()) {
+            TBOX_ERROR(
+               d_object_name << ":  "
+               << "Boxes specified for coarsest level "
+               <<
+               "contain intersections with each other!");
+         }
+
+         if ((d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels() > 1)
+             && (!d_tag_init_strategy->coarsestLevelBoxesOK(domain_boxes))) {
+            TBOX_ERROR(d_object_name << ":  "
+                                     << "level gridding strategy encountered"
+                                     << " a problem with the domain boxes!");
+         }
+
+      }
+
+      /*
+       * Apply load balancing algorithm to boxes describing domain
+       * to determine configuration of patches on level 0.
+       */
+
+      hier::MappedBoxLevel domain_mapped_box_level(d_dim);
+      {
+         /* Initialize domain_mapped_box_level. */
+         hier::MappedBoxSet domain_nodes;
+         patch_hierarchy->getGridGeometry()->computePhysicalDomain(
+            domain_nodes, one_vec);
+         domain_mapped_box_level.swapInitialize(
+            domain_nodes,
+            hier::IntVector::getOne(d_dim),
+            patch_hierarchy->getDomainMappedBoxLevel().getMPI(),
+            hier::MappedBoxLevel::GLOBALIZED);
+      }
+
+      /*
+       * domain_to_domain is a temporary peer connector
+       * for domain used for:
+       * - the required bias_attractor used by loadBalanceMappedBoxLevel.
+       * This attractor is a kludge providing no useful information.
+       * The load balancer interface should be modified not to
+       * require it.
+       * - a center for bridging the balanced mapped_box_level to itself.
+       * Since domain is small, owned by just proc 0
+       * and already globalized, it is fast and does not require
+       * communication to findOverlaps for domain_to_domain.
+       */
+
+      domain_to_domain[nb].initialize(
+         domain_mapped_box_level,
+         domain_mapped_box_level,
+         hier::IntVector::max(
+            hier::IntVector::getOne(d_dim),
+            patch_hierarchy->getRequiredConnectorWidth(0,0)));
+
+      hier::OverlapConnectorAlgorithm oca;
+      oca.findOverlaps(domain_to_domain[nb]);
+
+      t_load_balance->barrierAndStart();
+
+      t_load_balance_setup->start();
+
+      const hier::IntVector patch_cut_factor(d_dim, 1);
+
+      /*
+       * FIXME: The code for generating the coarsest level's boxes is not
+       * scalable because we involve the domain mapped_box_level in bridges and
+       * Connector modifications, forcing proc 0 (which owns all domain
+       * nodes) to do all of the searches.  This problem will show up in
+       * the performance data if we load balance the coarsest level
+       * regularly.
+       *
+       * A proper fix for this problem may be to use the existing coarse
+       * level in Connector operations, since it is more evenly distributed.
+       */
+
+      hier::MappedBoxLevel new_mapped_box_level(d_dim);
+      new_mapped_box_level = domain_mapped_box_level;
+      domain_to_new[nb].initialize(
+         domain_mapped_box_level,
+         new_mapped_box_level,
+         domain_to_domain[nb].getConnectorWidth(),
+         domain_to_domain[nb].getNeighborhoodSets(),
+         hier::MappedBoxLevel::DISTRIBUTED);
+      domain_to_new[nb].setConnectorType(hier::Connector::COMPLETE_OVERLAP);
+      new_to_domain[nb].initialize(
+         new_mapped_box_level,
+         domain_mapped_box_level,
+         domain_to_domain[nb].getConnectorWidth(),
+         domain_to_domain[nb].getNeighborhoodSets(),
+         hier::MappedBoxLevel::DISTRIBUTED);
+      new_to_domain[nb].setConnectorType(hier::Connector::COMPLETE_OVERLAP);
+      t_load_balance_setup->stop();
+      d_load_balancer0->loadBalanceMappedBoxLevel(
+         new_mapped_box_level,
+         new_to_domain[nb],
+         domain_to_new[nb],
+         patch_hierarchy,
+         level_number,
+         hier::Connector(),
+         hier::Connector(),
+         smallest_patch,
+         largest_patch,
+         domain_mapped_box_level,
+         extend_ghosts,
+         patch_cut_factor);
+      t_load_balance->stop();
+
+      if (d_sequentialize_patch_indices) {
+         /*
+          * Map to globalized sequential indices to interface with
+          * current parts of the library that take patch indices.
+          * This is a temporary measure needed to interface with
+          * some parts of SAMRAI that requires knowing the patch
+          * indices.  This step causes the patch indices to match
+          * the corresponding local mapped_box indices.
+          */
+         sortNodes(new_mapped_box_level,
+            domain_to_new[nb],
+            new_to_domain[nb],
+            false,
+            true);
+      }
+
+      if (s_check_connectors == 'y') {
+         TBOX_ASSERT(oca.checkOverlapCorrectness(new_to_domain[nb]) == 0);
+         TBOX_ASSERT(oca.checkOverlapCorrectness(domain_to_new[nb]) == 0);
+      }
+
+      hier::Connector new_to_new;
+      if (domain_mapped_box_level.getLocalNumberOfBoxes(0) ==
+          (size_t)domain_mapped_box_level.getGlobalNumberOfBoxes()) {
+         /*
+          * If proc 0 owns all new boxes, it is faster find new<==>new by
+          * globalizing the new boxes.
+          *
+          * The standard approach of bridging basically do the same,
+          * but forces proc 0 to compute all the overlaps and send that
+          * info to each processor one at a time.
+          */
+         t_find_new_to_new->barrierAndStart();
+         new_to_new.initialize(new_mapped_box_level,
+            new_mapped_box_level,
+            patch_hierarchy->getRequiredConnectorWidth(0,0));
+         oca.findOverlaps(new_to_new);
+         t_find_new_to_new->stop();
+      } else {
+         t_bridge_new_to_new->barrierAndStart();
+         oca.bridge(new_to_new,
+            new_to_domain[nb],
+            domain_to_new[nb],
+            new_to_domain[nb],
+            domain_to_new[nb]);
+         t_bridge_new_to_new->stop();
+         TBOX_ASSERT(new_to_new.getConnectorWidth() ==
+            patch_hierarchy->getRequiredConnectorWidth(0,0));
+         TBOX_ASSERT(&new_to_new.getBase() == &new_mapped_box_level);
+         TBOX_ASSERT(&new_to_new.getHead() == &new_mapped_box_level);
+      }
+
+      if (d_check_overlapping_patches != 'i') {
+         checkOverlappingPatches(new_to_new);
+      }
+
+      t_make_new->start();
+      if (!level_zero_exists) {
+
+         patch_hierarchy->makeNewPatchLevel(level_number,
+            new_mapped_box_level);
+         /*
+          * Add computed Connectors to new MappedBoxLevel's cache.
+          */
+         tbox::Pointer<hier::PatchLevel> new_level =
+            patch_hierarchy->getPatchLevel(level_number);
+         new_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+         createConnector(
+            *new_level->getMappedBoxLevel(),
+            new_to_new.getConnectorWidth(),
+            new_to_new.getNeighborhoodSets());
+
+         if (s_print_mapped_box_level_hierarchy == 'y') {
+            tbox::plog
+            << "MultiblockGriddingAlgorithm::makeCoarsestLevel produced:\n";
+            patch_hierarchy->recursivePrint(tbox::plog, "", 4);
+         }
+
+      } else {
+
+         /*
+          * Save old data before they are overwritten by the new mapped_box_level.
+          */
+         hier::MappedBoxLevel old_mapped_box_level = *patch_hierarchy->getMappedBoxLevel(0);
+
+         old_level[nb] =
+            patch_hierarchy->getPatchLevel(level_number);
+
+         patch_hierarchy->removePatchLevel(level_number);
+
+         patch_hierarchy->makeNewPatchLevel(level_number,
+            new_mapped_box_level);
+
+         if (s_print_mapped_box_level_hierarchy == 'y') {
+            tbox::plog
+            << "MultiblockGriddingAlgorithm::makeCoarsestLevel produced:\n";
+            patch_hierarchy->recursivePrint(tbox::plog, "", 4);
+         }
+
+         /*
+          * Compute old<==>new.  Doing it this way is not scalable,
+          * but we only do this for the coarsest level.  The old approach
+          * of bridging across the domain mapped_box_level is probably not scalable
+          * anyway, because the domain isusually owned by just one
+          * processor.
+          */
+         old_mapped_box_level.getPersistentOverlapConnectors().createConnector(
+            new_mapped_box_level,
+            patch_hierarchy->getRequiredConnectorWidth(0, 0));
+         new_mapped_box_level.getPersistentOverlapConnectors().createConnector(
+            old_mapped_box_level,
+            patch_hierarchy->getRequiredConnectorWidth(0, 0));
+      }
+      t_make_new->stop();
+   }
+
+   bool initial_time;
+   tbox::Pointer<hier::MultiblockPatchLevel> old_mb_level;
+   if (!level_zero_exists) {
+      initial_time = true;
+      old_mb_level = (tbox::Pointer<hier::MultiblockPatchLevel>)NULL;
+   } else {
+      initial_time = false;
+      old_mb_level = new hier::MultiblockPatchLevel(d_dim, old_level);
+   }
+
+   if (initial_time) {
+      d_tag_init_strategy->initializeLevelData(d_mb_hierarchy, level_number,
+         level_time,
+         d_mb_hierarchy->levelCanBeRefined(level_number),
+         initial_time,
+         (tbox::Pointer<hier::BasePatchLevel>)NULL);
+   } else {
+      d_tag_init_strategy->initializeLevelData(d_mb_hierarchy, level_number,
+         level_time,
+         d_mb_hierarchy->levelCanBeRefined(level_number),
+         false,
+         old_mb_level);
+   }
+
+   if (level_zero_exists) {
+      old_mb_level.setNull();
+   }
+
+   t_reset_hier->barrierAndStart();
+   d_tag_init_strategy->resetHierarchyConfiguration(d_mb_hierarchy,
+      level_number,
+      level_number);
+   t_reset_hier->barrierAndStop();
+
+#ifdef MGA_RECORD_STATS
+   recordStatistics( level_time );
+#endif
+
+   /*
+    * Clear out Connectors to avoid dangling pointers when their
+    * head/base MappedBoxLevels go out of scope first.
+    */
+   for (unsigned int nb = 0; nb < nblocks; nb++) {
+      domain_to_domain[nb].clear();
+      domain_to_new[nb].clear();
+      new_to_domain[nb].clear();
+   }
+   delete[] domain_to_domain;
+   delete[] domain_to_new;
+   delete[] new_to_domain;
+
+   d_mb_hierarchy->adjustMultiblockPatchLevelBoundaries(
+      d_mb_hierarchy->getPatchLevel(0));
+
+   t_make_coarsest->stop();
+}
+
+/*
+ *************************************************************************
+ *
+ * Perform error estimation process on the finest hierarchy level to
+ * determine if and where a new finest level is needed.  If it is
+ * determined  that a new finest level should exist, it is created and
+ * its patch data is allocated and initialized.  The algorithm is
+ * summarized as follows:
+ *
+ * (1) Compute boxes whose union constitutes the region within the level
+ *  in which the next finer level may reside (i.e., proper nesting).
+ *
+ * (2) Set tags on the level to indicate which cells should be refined.
+ *
+ * (3) Buffer the tags.  This prevents disturbances from moving off
+ *  refined regions before the next remesh occurs.
+ *
+ * (4) Determine boxes for new patches that will cover the tagged cells.
+ *  This step includes load balancing of the patches.
+ *
+ * (5) If there exist some regions to refine, construct the next finer
+ *  level and insert it in the hierarchy.  Then, initialize the data
+ *  on that level.
+ *
+ *************************************************************************
+ */
+
+void MultiblockGriddingAlgorithm::makeFinerLevel(
+   const double level_time,
+   const bool initial_time,
+   const int tag_buffer,
+   const double regrid_start_time)
+{
+   TBOX_ASSERT(!(d_mb_hierarchy->getPatchLevel(
+                    d_mb_hierarchy->getFinestLevelNumber()).isNull()));
+   TBOX_ASSERT(tag_buffer >= 0);
+
+   if (s_print_steps == 'y') {
+      tbox::plog
+      <<
+      "MultiblockGriddingAlgorithm::makeFinerLevel entered with finest ln = "
+      << d_mb_hierarchy->getFinestLevelNumber() << "\n";
+   }
+
+   t_make_finer->barrierAndStart();
+
+   const unsigned int nblocks = d_mb_hierarchy->getNumberOfBlocks();
+
+   if (d_proper_nesting_complement.size() < nblocks) {
+      const int old_size = static_cast<int>(d_proper_nesting_complement.size());
+      d_proper_nesting_complement.resize(nblocks);
+      for (unsigned int nb = old_size; nb < nblocks; nb++) {
+         if (d_proper_nesting_complement[nb].size() !=
+             (unsigned int)d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels()) {
+            d_proper_nesting_complement[nb].resize(
+               d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels(), hier::MappedBoxLevel(d_dim));
+         }
+      }
+   }
+   if (d_to_nesting_complement.size() < nblocks) {
+      const int old_size = static_cast<int>(d_to_nesting_complement.size());
+      d_to_nesting_complement.resize(nblocks);
+      for (unsigned int nb = old_size; nb < nblocks; nb++) {
+         if (d_to_nesting_complement[nb].size() !=
+             (unsigned int)d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels()) {
+            d_to_nesting_complement[nb].resize(d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels());
+         }
+      }
+   }
+   if (d_from_nesting_complement.size() < nblocks) {
+      const int old_size = static_cast<int>(d_from_nesting_complement.size());
+      d_from_nesting_complement.resize(nblocks);
+      for (unsigned int nb = old_size; nb < nblocks; nb++) {
+         if (d_from_nesting_complement[nb].size() !=
+             (unsigned int)d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels()) {
+            d_from_nesting_complement[nb].resize(d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels());
+         }
+      }
+   }
+
+   if (static_cast<unsigned int>(d_domain_complement_tree.size()) < nblocks) {
+      d_domain_complement_tree.resizeArray(nblocks, hier::MappedBoxTree(d_dim));
+   }
+
+   const hier::IntVector& zero_vector(hier::IntVector::getZero(d_dim));
+
+   const hier::MappedBoxLevelConnectorUtils dlbg_edge_utils;
+
+   const int tag_ln = d_mb_hierarchy->getFinestLevelNumber();
+   const int new_ln = tag_ln + 1;
+
+   if (d_mb_hierarchy->levelCanBeRefined(tag_ln)) {
+      t_make_finer_setup->start();
+
+      /*
+       * d_base_ln is used by private methods during regrid.
+       */
+      d_base_ln = tag_ln;
+
+      for (unsigned int nb = 0; nb < nblocks; nb++) {
+         tbox::Pointer<hier::PatchHierarchy> patch_hierarchy =
+            d_mb_hierarchy->getHierarchy(nb);
+
+         if (patch_hierarchy->getNumberOfLevels() > d_base_ln) {
+            /*
+             * Compute nesting data at d_base_ln for use in constructing
+             * level d_base_ln+1;
+             */
+            computeNestingData(d_base_ln, nb);
+         }
+      }
+
+      const tbox::Pointer<hier::MultiblockPatchLevel>
+      mb_patch_level = d_mb_hierarchy->getPatchLevel(tag_ln);
+
+      tbox::Array<hier::BoxArray> fine_boxes(nblocks, hier::BoxArray(d_dim));
+
+      tbox::Array<hier::MappedBoxLevel> new_mapped_box_level(
+         nblocks,
+         hier::MappedBoxLevel(d_dim));
+      std::vector<hier::Connector> mb_new_to_new(nblocks);
+      std::vector<hier::Connector> mb_new_to_tag(nblocks);
+      std::vector<hier::Connector> mb_tag_to_new(nblocks);
+
+      /*
+       * The boolean "do_tagging" specifies whether or not tagging will
+       * be performed. This will be true except in two circumstances:
+       *   1) only user supplied refine boxes are used
+       *   2) the boxes are read from a previously dumped file.
+       *
+       * If either of these circumstances is true, tagging operations
+       * are NOT necessary so do_tagging will be set to false.
+       */
+      bool do_tagging = true;
+      if (d_tag_init_strategy->refineUserBoxInputOnly()) do_tagging = false;
+      t_make_finer_setup->stop();
+
+      /*
+       * Tag cells, determine refine boxes from tagged regions, and
+       * load balance in preparation for constructing new refined level.
+       */
+      if (do_tagging) {
+
+         t_make_finer_tagging->start();
+
+         /*
+          * Create communication schedule for buffer tags on this level.
+          */
+         t_bdry_fill_tags_create->start();
+         d_bdry_sched_tags[tag_ln] =
+            d_mblk_bdry_fill_tags->createSchedule(mb_patch_level,
+               d_mb_tagger_strategy);
+         t_bdry_fill_tags_create->stop();
+
+         /*
+          * Initialize integer tag arrays on level to false.
+          */
+
+         mb_patch_level->allocatePatchData(d_tag_indx);
+         /*
+          * FIXME: fillTagsFromMappedBoxLevel is more complex than needed here.
+          * because we want to fill up the whole level, not fill selectively.
+          */
+
+         for (unsigned int nb = 0; nb < nblocks; nb++) {
+            tbox::Pointer<hier::PatchHierarchy> patch_hierarchy =
+               d_mb_hierarchy->getHierarchy(nb);
+            tbox::Pointer<hier::PatchLevel> patch_level =
+               mb_patch_level->getPatchLevelForBlock(nb);
+
+            if (!patch_level.isNull()) {
+               fillTagsFromMappedBoxLevel(
+                  d_false_tag,
+                  patch_level,
+                  d_tag_indx,
+                  patch_hierarchy->getConnector(tag_ln, tag_ln),
+                  true,
+                  zero_vector);
+            }
+         }
+
+         /*
+          * Perform pre-processing of error estimation data, if appropriate.
+          */
+         if (errorEstimationUsesTimeIntegration()) {
+            d_tag_init_strategy->
+            preprocessErrorEstimation(d_mb_hierarchy,
+               tag_ln,
+               level_time,
+               regrid_start_time,
+               initial_time);
+         }
+
+         /*
+          * Determine cells needing refinement on level and set tags to true.
+          * Because we are constructing a new level, not regridding the level,
+          * the coarsest_sync_level argument is always false.
+          */
+         bool coarsest_sync_level = false;
+         d_tag_init_strategy->
+         tagCellsForRefinement(d_mb_hierarchy,
+            tag_ln,
+            level_time,
+            d_tag_indx,
+            initial_time,
+            coarsest_sync_level,
+            d_mb_hierarchy->levelCanBeRefined(tag_ln),
+            regrid_start_time);
+
+         /*
+          * Check for user-tagged cells that violate proper nesting.
+          * except if user specified that the violating tags be ignored.
+          */
+         if (d_check_nonrefined_tags != 'i') {
+            for (unsigned int nb = 0; nb < nblocks; nb++) {
+               tbox::Pointer<hier::PatchHierarchy> patch_hierarchy =
+                  d_mb_hierarchy->getHierarchy(nb);
+               tbox::Pointer<hier::PatchLevel> patch_level =
+                  mb_patch_level->getPatchLevelForBlock(nb);
+
+               if (!patch_level.isNull()) {
+                  checkNonrefinedTags(*patch_level, tag_ln, nb);
+               }
+            }
+         }
+
+         /*
+          * Buffer true tagged cells by specified amount which should be
+          * sufficient to keep disturbance on refined region until next regrid
+          * of the level occurs.
+          */
+         mb_patch_level->allocatePatchData(d_buf_tag_indx);
+         bufferTagsOnLevel(d_true_tag, mb_patch_level, tag_buffer);
+         mb_patch_level->deallocatePatchData(d_buf_tag_indx);
+         t_make_finer_tagging->stop();
+
+         tbox::SAMRAI_MPI mpi(tbox::SAMRAI_MPI::commNull);
+         tbox::Array<int> work_on_block(nblocks, 0);
+         for (unsigned int nb = 0; nb < nblocks; nb++) {
+            tbox::Pointer<hier::PatchHierarchy> patch_hierarchy =
+               d_mb_hierarchy->getHierarchy(nb);
+
+            if (patch_hierarchy->getNumberOfLevels() > d_base_ln) {
+
+               hier::Connector& tag_to_new = mb_tag_to_new[nb];
+               hier::Connector& new_to_tag = mb_new_to_tag[nb];
+
+               /*
+                * Determine box array and processor mapping for new fine level.
+                */
+               findRefinementBoxes(new_mapped_box_level[nb],
+                  tag_to_new,
+                  new_to_tag,
+                  tag_ln,
+                  nb);
+
+               work_on_block[nb] =
+                  static_cast<int>(
+                     new_mapped_box_level[nb].getLocalNumberOfCells());
+
+               /*
+                * All MappedBoxLevels within the hierarchy should
+                * have the same SAMRAI_MPI, so just get it from one.
+                */
+               if (mpi.getCommunicator() == tbox::SAMRAI_MPI::commNull) {
+                  mpi = new_mapped_box_level[nb].getMPI();
+               }
+            }
+         }
+
+         if (mpi.usingMPI()) {
+            TBOX_ASSERT(mpi.getCommunicator() != tbox::SAMRAI_MPI::commNull);
+            mpi.AllReduce(work_on_block.getPointer(), nblocks, MPI_SUM);
+         }
+
+         tbox::Array<tbox::RankGroup> rank_group(nblocks,
+                                                 tbox::RankGroup(mpi));
+
+         if (nblocks > 1) {
+            setRankGroups(rank_group, work_on_block, mpi);
+         }
+
+         for (unsigned int nb = 0; nb < nblocks; nb++) {
+            tbox::Pointer<hier::PatchHierarchy> patch_hierarchy =
+               d_mb_hierarchy->getHierarchy(nb);
+
+            if (patch_hierarchy->getNumberOfLevels() > d_base_ln) {
+
+               hier::Connector& tag_to_new = mb_tag_to_new[nb];
+               hier::Connector& new_to_tag = mb_new_to_tag[nb];
+               hier::Connector& new_to_new = mb_new_to_new[nb];
+
+               loadBalanceAndRefineBoxes(new_mapped_box_level[nb],
+                  tag_to_new,
+                  new_to_tag,
+                  tag_ln,
+                  rank_group[nb],
+                  nb);
+
+               if (new_mapped_box_level[nb].isInitialized()) {
+
+                  if (s_check_proper_nesting == 'y') {
+                     /*
+                      * Check that the new mapped_box_level nests inside the tag level.
+                      *
+                      * SAMRAI convention (my best understanding of it) supported
+                      * (or should have been supported) by grid generation:
+                      * - L0 must be equivalent to the domain.
+                      * - L1 must nest in L0 by the max ghost width in L1 index space.
+                      * - L(n) must nest in L(n-1) by getProperNestingBuffer(n-1)
+                      */
+                     hier::IntVector required_nesting(d_dim);
+                     if (tag_ln > 0) {
+                        required_nesting = hier::IntVector(d_dim, getProperNestingBuffer(tag_ln));
+                        required_nesting *= getRatioToCoarserLevel(new_ln);
+                     } else {
+                        required_nesting =
+                           patch_hierarchy->getPatchDescriptor()->getMaxGhostWidth(d_dim);
+                     }
+                     bool locally_nests = false;
+                     const bool new_nests_in_tag =
+                        dlbg_edge_utils.baseNestsInHead(
+                           &locally_nests,
+                           new_mapped_box_level[nb],
+                           *patch_hierarchy->getMappedBoxLevel(tag_ln),
+                           required_nesting,
+                           hier::IntVector::getZero(d_dim),
+                           hier::IntVector::getZero(d_dim),
+                           &patch_hierarchy->getPeriodicDomainSearchTree());
+                     if (!new_nests_in_tag) {
+                        tbox::perr << "MultiblockGriddingAlgorithm::makeFinerLevel:\n"
+                                   << "tag_ln=" << tag_ln << ":\n"
+                                   << "new mapped_box_level does not properly nest\n"
+                                   << "in tag mapped_box_level by the required nesting buffer of "
+                                   << getProperNestingBuffer(tag_ln)
+                                   << ".\nLocal nestingness: " << locally_nests
+                                   << ".\nWriting MappedBoxLevels out to log file.\n"
+                                   << "new_mapped_box_level of:\n" << new_mapped_box_level[nb].format("N->", 2)
+                                   << "tag mapped_box_level of:\n" << patch_hierarchy->getMappedBoxLevel(tag_ln)->format("F->", 2)
+                                   << "tag_to_new:\n" << tag_to_new.format("N->", 2)
+                                   << "new_to_tag:\n" << new_to_tag.format("N->", 2);
+                        hier::MappedBoxLevel violator(d_dim);
+                        hier::Connector new_to_violator;
+                        hier::MappedBoxLevelConnectorUtils edge_utils;
+                        t_compute_external_parts->start();
+                        edge_utils.computeExternalParts(
+                           violator,
+                           new_to_violator,
+                           new_to_tag,
+                           hier::IntVector(d_dim, -getProperNestingBuffer(tag_ln)),
+                           patch_hierarchy->getDomainSearchTree());
+                        t_compute_external_parts->stop();
+                        TBOX_ERROR(
+                           "Internal library error: Failed to produce proper nesting."
+                           << "violator:\n" << violator.format("N->", 2)
+                           << "new_to_violator:\n" << new_to_violator.format("N->", 2));
+                     }
+                  }
+
+                  t_bridge_links->start();
+                  t_bridge_new_to_new->start();
+                  const hier::OverlapConnectorAlgorithm oca;
+                  oca.bridge(new_to_new,
+                     new_to_tag,
+                     tag_to_new,
+                     new_to_tag,
+                     tag_to_new);
+                  t_bridge_new_to_new->stop();
+                  t_bridge_links->stop();
+               }
+            }
+         }
+
+         /*
+          * Deallocate tag arrays and schedule -- no longer needed.
+          */
+         mb_patch_level->deallocatePatchData(d_tag_indx);
+         d_bdry_sched_tags[tag_ln].setNull();
+
+      } else {
+
+         for (unsigned int nb = 0; nb < nblocks; nb++) {
+            hier::Connector& tag_to_new = mb_tag_to_new[nb];
+            hier::Connector& new_to_tag = mb_new_to_tag[nb];
+            hier::Connector& new_to_new = mb_new_to_new[nb];
+
+            /*
+             * If tagging is not necessary (do_tagging = false) we simply
+             * need to access the level boxes, either from a dumped file or
+             * from user-supplied refine boxes, and load balance them before
+             * constructing the finer level.
+             */
+            bool remove_old_fine_level = false;
+            readLevelBoxes(fine_boxes[nb],
+               new_mapped_box_level[nb],
+               tag_to_new,
+               new_to_tag,
+               nb,
+               tag_ln,
+               level_time,
+               remove_old_fine_level);
+            if (new_mapped_box_level[nb].isInitialized()) {
+               t_bridge_new_to_new->start();
+               const hier::OverlapConnectorAlgorithm oca;
+               oca.bridge(new_to_new,
+                  new_to_tag,
+                  tag_to_new,
+                  new_to_tag,
+                  tag_to_new);
+               t_bridge_new_to_new->stop();
+            }
+         }
+      }
+
+      /*
+       * Make new finer level (new_ln == tag_ln+1),
+       * if appropriate.
+       */
+      bool new_level_created = false;
+
+      for (unsigned int nb = 0; nb < nblocks; nb++) {
+
+         hier::Connector& tag_to_new = mb_tag_to_new[nb];
+         hier::Connector& new_to_tag = mb_new_to_tag[nb];
+         hier::Connector& new_to_new = mb_new_to_new[nb];
+
+         tbox::Pointer<hier::PatchHierarchy> patch_hierarchy =
+            d_mb_hierarchy->getHierarchy(nb);
+         tbox::Pointer<hier::PatchLevel> tag_level =
+            mb_patch_level->getPatchLevelForBlock(nb);
+
+         if (new_mapped_box_level[nb].isInitialized() &&
+             !tag_level.isNull()) {
+
+            if (d_check_overlapping_patches != 'i') {
+               checkOverlappingPatches(new_to_new);
+            }
+
+            t_make_finer_create->start();
+
+            TBOX_ASSERT(tag_to_new.checkConsistencyWithHead() == 0);
+            TBOX_ASSERT(tag_to_new.checkConsistencyWithBase() == 0);
+            TBOX_ASSERT(new_to_tag.checkConsistencyWithHead() == 0);
+            TBOX_ASSERT(new_to_tag.checkConsistencyWithBase() == 0);
+            TBOX_ASSERT(new_to_new.checkConsistencyWithHead() == 0);
+            TBOX_ASSERT(new_to_new.checkConsistencyWithBase() == 0);
+            patch_hierarchy->makeNewPatchLevel(new_ln,
+               new_mapped_box_level[nb]);
+
+            tbox::Pointer<hier::PatchLevel> new_level =
+               patch_hierarchy->getPatchLevel(new_ln);
+            new_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+            createConnector(
+               *new_level->getMappedBoxLevel(),
+               new_to_new.getConnectorWidth(),
+               new_to_new.getNeighborhoodSets());
+            new_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+            createConnector(
+               *tag_level->getMappedBoxLevel(),
+               new_to_tag.getConnectorWidth(),
+               new_to_tag.getNeighborhoodSets());
+            tag_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+            createConnector(
+               *new_level->getMappedBoxLevel(),
+               tag_to_new.getConnectorWidth(),
+               tag_to_new.getNeighborhoodSets());
+
+            new_level_created = true;
+            if (s_print_mapped_box_level_hierarchy == 'y') {
+               tbox::plog
+               << "MultiblockGriddingAlgorithm::makeFinerLevel produced:\n";
+               patch_hierarchy->recursivePrint( tbox::plog, "", 4);
+            }
+
+            t_make_finer_create->stop();
+         }
+      }
+
+      if (new_level_created) {
+         d_tag_init_strategy->initializeLevelData(d_mb_hierarchy,
+            new_ln,
+            level_time,
+            d_mb_hierarchy->levelCanBeRefined(
+               new_ln),
+            initial_time,
+            (tbox::Pointer<hier::BasePatchLevel>)NULL);
+
+         t_reset_hier->barrierAndStart();
+         d_tag_init_strategy->resetHierarchyConfiguration(d_mb_hierarchy,
+            new_ln,
+            new_ln);
+         t_reset_hier->barrierAndStop();
+      }
+
+      d_base_ln = -1;
+
+      d_mb_hierarchy->adjustMultiblockPatchLevelBoundaries(
+         d_mb_hierarchy->getMultiblockPatchLevel(new_ln));
+
+   }  // if level cannot be refined, the routine drops through...
+
+   t_make_finer->barrierAndStop();
+
+}
+
+/*
+ *************************************************************************
+ *
+ * Regrid each level in the hierarchy which is finer than the specified
+ * level.  First, we recursively compute proper nesting boxes for each
+ * level that will be subject to regridding. If the regridding procedure
+ * employs time integration, we perform any pre-processing necessary
+ * to regrid the levels.  Then, each level finer than the specified
+ * level is regridded from fine to coarse.  The recursive regridding
+ * procedure is performed by the function regridFinerLevel().  Finally,
+ * after the new hierarchy configuration is set, the application-
+ * specific operations for resetting hierarchy-dependent infomation is
+ * called.
+ *
+ *************************************************************************
+ */
+
+void MultiblockGriddingAlgorithm::regridAllFinerLevels(
+   const int level_number,
+   const double regrid_time,
+   const tbox::Array<int>& tag_buffer,
+   const tbox::Array<double> regrid_start_time,
+   const bool level_is_coarsest_sync_level)
+{
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= d_mb_hierarchy->getFinestLevelNumber()));
+   TBOX_ASSERT(!(d_mb_hierarchy->getPatchLevel(level_number).isNull()));
+   TBOX_ASSERT(tag_buffer.getSize() >= level_number + 1);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   for (int i = 0; i < tag_buffer.getSize(); i++) {
+      TBOX_ASSERT(tag_buffer[i] >= 0);
+   }
+#endif
+   t_regrid_all_finer->barrierAndStart();
+
+   if (d_mb_hierarchy->levelCanBeRefined(level_number)) {
+
+      if (s_print_steps == 'y') {
+         tbox::plog
+         <<
+         "MultiblockGriddingAlgorithm::regridAllFinerLevels: regridding finer than "
+         << level_number << "\n";
+      }
+
+      /*
+       * d_base_ln is used by private methods during regrid.
+       */
+      d_base_ln = level_number;
+
+      t_process_error->start();
+      /*
+       * Perform pre-processing of error estimation data, if
+       * appropriate.
+       */
+      if (errorEstimationUsesTimeIntegration()) {
+         for (int ln = level_number;
+              ln <= d_mb_hierarchy->getFinestLevelNumber(); ln++) {
+            if (d_mb_hierarchy->levelCanBeRefined(ln)) {
+               bool initial_time = false;
+               double level_regrid_start_time = 0.;
+               if (regrid_start_time.getSize() < ln + 1) {
+                  tbox::IEEE::setNaN(level_regrid_start_time);
+               } else {
+                  level_regrid_start_time = regrid_start_time[ln];
+               }
+
+               d_tag_init_strategy->
+               preprocessErrorEstimation(d_mb_hierarchy,
+                  ln,
+                  regrid_time,
+                  level_regrid_start_time,
+                  initial_time);
+            }
+         }
+      }
+      t_process_error->stop();
+
+      /*
+       * Recursively regrid each finer level.
+       */
+      const int finest_level_not_regridded = level_number;
+      regridFinerLevel(
+         level_number,
+         regrid_time,
+         finest_level_not_regridded,
+         level_is_coarsest_sync_level,
+         tag_buffer,
+         regrid_start_time);
+
+      /*
+       * Invoke application-specific routines to reset information for those
+       * levels which have been modified.
+       */
+
+      if (d_mb_hierarchy->getFinestLevelNumber() >= (level_number + 1)) {
+         t_reset_hier->barrierAndStart();
+         d_tag_init_strategy->
+         resetHierarchyConfiguration(d_mb_hierarchy,
+            level_number + 1,
+            d_mb_hierarchy->
+            getFinestLevelNumber());
+         t_reset_hier->barrierAndStop();
+      }
+
+      d_base_ln = -1;
+
+      if (s_print_steps == 'y') {
+         tbox::plog
+         <<
+         "MultiblockGriddingAlgorithm::regridAllFinerLevels: regridded finer than "
+         << level_number << "\n";
+      }
+
+   } //  if level cannot be refined, the routine drops through...
+
+#ifdef MGA_RECORD_STATS
+   // Verified that this does not use much time.
+   recordStatistics( regrid_time );
+#endif
+
+   t_regrid_all_finer->barrierAndStop();
+
+}
+
+/*
+ *************************************************************************
+ *
+ * Recursively, regrid each AMR hierarchy level finer than the specified
+ * level (indexed by level_number).  The process is as follows:
+ *
+ * (1) Initialize tags to false on the level.
+ *
+ * (2) If a finer level exists, set tag to true on level for each cell
+ *  that is refined.
+ *
+ * (3) Tag cells for refinement on level by applying application-
+ *  specific error estimation routines.
+ *
+ * (4) If a finer level exists, invoke process recursively (i.e.,
+ *  invoke step 1 on next finer level).
+ *
+ * (5) (Note we have popped out of recursion at this point).  Buffer
+ *  true tags on current level to keep disturbances on fine grids
+ *  until regridding occurs next.
+ *
+ * (6) Determine box configuration for new finer level, by calling
+ *  findRefinementBoxes() function.
+ *
+ * (7) If a finer level should exist in the hierarchy, create its
+ *  patches from the box description and initialize its data.  If
+ *  necessary, discard old level.
+ *
+ *************************************************************************
+ */
+
+void MultiblockGriddingAlgorithm::regridFinerLevel(
+   const int tag_ln,
+   const double regrid_time,
+   const int finest_level_not_regridded,
+   const bool level_is_coarsest_sync_level,
+   const tbox::Array<int>& tag_buffer,
+   const tbox::Array<double>& regrid_start_time)
+{
+   TBOX_ASSERT((tag_ln >= 0)
+      && (tag_ln <= d_mb_hierarchy->getFinestLevelNumber()));
+   TBOX_ASSERT(!(d_mb_hierarchy->getPatchLevel(tag_ln).isNull()));
+   TBOX_ASSERT(finest_level_not_regridded >= 0
+      && finest_level_not_regridded <= tag_ln);
+   TBOX_ASSERT(tag_buffer.getSize() >= tag_ln + 1);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   for (int i = 0; i < tag_buffer.getSize(); i++) {
+      TBOX_ASSERT(tag_buffer[i] >= 0);
+   }
+#endif
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *d_mb_hierarchy);
+
+   const hier::IntVector& zero_vector(hier::IntVector::getZero(d_dim));
+   const hier::IntVector neg1_vector(d_dim, -1);
+
+   if (s_print_steps == 'y') {
+      tbox::plog
+      <<
+      "MultiblockGriddingAlgorithm::regridFinerLevel: entered with tag_ln = "
+      << tag_ln << "\n";
+   }
+
+   hier::MappedBoxLevelConnectorUtils dlbg_edge_utils;
+
+   const unsigned int nblocks = d_mb_hierarchy->getNumberOfBlocks();
+
+   if (d_proper_nesting_complement.size() < nblocks) {
+      const int old_size = static_cast<int>(d_proper_nesting_complement.size());
+      d_proper_nesting_complement.resize(nblocks);
+      for (unsigned int nb = old_size; nb < nblocks; nb++) {
+         if (d_proper_nesting_complement[nb].size() !=
+             (unsigned int)d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels()) {
+            d_proper_nesting_complement[nb].resize(
+               d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels(), hier::MappedBoxLevel(d_dim));
+         }
+      }
+   }
+   if (d_to_nesting_complement.size() < nblocks) {
+      const int old_size = static_cast<int>(d_to_nesting_complement.size());
+      d_to_nesting_complement.resize(nblocks);
+      for (unsigned int nb = old_size; nb < nblocks; nb++) {
+         if (d_to_nesting_complement[nb].size() !=
+             (unsigned int)d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels()) {
+            d_to_nesting_complement[nb].resize(d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels());
+         }
+      }
+   }
+   if (d_from_nesting_complement.size() < nblocks) {
+      const int old_size = static_cast<int>(d_from_nesting_complement.size());
+      d_from_nesting_complement.resize(nblocks);
+      for (unsigned int nb = old_size; nb < nblocks; nb++) {
+         if (d_from_nesting_complement[nb].size() !=
+             (unsigned int)d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels()) {
+            d_from_nesting_complement[nb].resize(d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels());
+         }
+      }
+   }
+
+   if (static_cast<unsigned int>(d_domain_complement_tree.size()) < nblocks) {
+      d_domain_complement_tree.resizeArray(nblocks, hier::MappedBoxTree(d_dim));
+   }
+
+   if (d_mb_hierarchy->levelCanBeRefined(tag_ln)) {
+
+      t_misc4->start();
+
+      int new_ln = tag_ln + 1;
+
+      tbox::Pointer<hier::MultiblockPatchLevel>
+      mb_patch_level = d_mb_hierarchy->getPatchLevel(tag_ln);
+
+      for (unsigned int nb = 0; nb < nblocks; nb++) {
+         tbox::Pointer<hier::PatchHierarchy> block_hierarchy =
+            d_mb_hierarchy->getHierarchy(nb);
+
+         /*
+          * Compute nesting data at tag_ln for use in constructing
+          * level tag_ln+1;
+          */
+         if (block_hierarchy->getNumberOfLevels() > tag_ln) {
+            computeNestingData(tag_ln, nb);
+         }
+      }
+
+      /*
+       * The boolean "do_tagging" specifies whether or not tagging will
+       * be performed. This will be true except in two circumstances:
+       *   1) only user supplied refine boxes are used
+       *   2) the boxes are read from a previously dumped file.
+       *
+       * If either of these circumstances is true, tagging operations
+       * are NOT necessary so do_tagging will be set to false.
+       *
+       * The old level is generally removed when regridding, but
+       * some circumstances may warrant keeping the old level.  For
+       * example, if the refine region has not changed, there is no
+       * need to regenerate the finer level.  The boolean
+       * "remove_old_fine_level" specifies if the old level should
+       * be removed.
+       */
+      bool do_tagging = true;
+      if (d_tag_init_strategy->refineUserBoxInputOnly()) do_tagging = false;
+      bool remove_old_fine_level = true;
+
+      tbox::Array<hier::MappedBoxLevel> new_mapped_box_level(
+         nblocks,
+         hier::MappedBoxLevel(d_dim));
+      std::vector<hier::Connector> mb_new_to_new(nblocks);
+      std::vector<hier::Connector> mb_new_to_tag(nblocks);
+      std::vector<hier::Connector> mb_tag_to_new(nblocks);
+
+      t_misc4->stop();
+
+      /*
+       * tag_to_finer is [tag_ln]->[tag_ln+2].
+       * finer_to_tag is [tag_ln]->[tag_ln+2].
+       *
+       * These are declared in this scope, computed and cached if
+       * [tag_ln+2] exists.  They are used to tag the footprint of
+       * [tag_ln+2] on level tag_ln.  Later on, they are used to
+       * bridge for [new_ln] <-> [tag_ln+2].
+       */
+      hier::Connector* tag_to_finer = new hier::Connector[nblocks];
+      hier::Connector* finer_to_tag = new hier::Connector[nblocks];
+
+      /*
+       * Tag cells, determine refine boxes from tagged regions, and
+       * load balance in preparation for constructing new refined level.
+       */
+      if (do_tagging) {
+
+         /*
+          * Create communication schedule for buffer tags and set tags to
+          * false.
+          */
+
+         t_misc1->start();
+
+         t_bdry_fill_tags_create->start();
+         d_bdry_sched_tags[tag_ln] =
+            d_mblk_bdry_fill_tags->createSchedule(mb_patch_level,
+               d_mb_tagger_strategy);
+         t_bdry_fill_tags_create->stop();
+
+         mb_patch_level->allocatePatchData(d_tag_indx);
+         /*
+          * FIXME: fillTagsFromMappedBoxLevel is more complex than needed here.
+          * because we want to fill up the whole level, not fill selectively.
+          */
+
+         for (unsigned int nb = 0; nb < nblocks; nb++) {
+            tbox::Pointer<hier::PatchHierarchy> patch_hierarchy =
+               d_mb_hierarchy->getHierarchy(nb);
+            tbox::Pointer<hier::PatchLevel> patch_level =
+               mb_patch_level->getPatchLevelForBlock(nb);
+
+            if (!patch_level.isNull()) {
+               fillTagsFromMappedBoxLevel(
+                  d_false_tag,
+                  patch_level,
+                  d_tag_indx,
+                  patch_hierarchy->getConnector(tag_ln, tag_ln),
+                  true,
+                  zero_vector);
+            }
+         }
+
+         /*
+          * Set tags to true for cells that currently cover next finer level.
+          * Note that this is not needed for all regridding strategies.  But
+          * knowledge of currently refined cells is generally useful to avoid
+          * repeated refining and coarsening of cells near boundaries of
+          * refined regions where error estimates may hover around the error
+          * tolerance. For example, the regridding scheme may require that
+          * the error in a cell that is currently refined fall below a
+          * certain tolerance  (generally different than the tolerance to
+          * refine the cell in the first place) before the cell will be
+          * de-refined.
+          */
+
+         if (d_mb_hierarchy->finerLevelExists(tag_ln)) {
+            for (unsigned int nb = 0; nb < nblocks; nb++) {
+               tbox::Pointer<hier::PatchHierarchy> patch_hierarchy =
+                  d_mb_hierarchy->getHierarchy(nb);
+
+               if (patch_hierarchy->finerLevelExists(tag_ln)) {
+                  tbox::Pointer<hier::PatchLevel> patch_level =
+                     mb_patch_level->getPatchLevelForBlock(nb);
+
+                  if (!patch_level.isNull()) {
+                     fillTagsFromMappedBoxLevel(
+                        d_true_tag,
+                        patch_level,
+                        d_tag_indx,
+                        patch_hierarchy->getConnector(tag_ln, tag_ln + 1),
+                        true,
+                        zero_vector);
+                  }
+               }
+            }
+         }
+
+         /*
+          * Determine cells needing refinement according to a specific
+          * error estimation procedure and set to true.
+          *
+          * The "level_is_coarsest_sync_level" is provided as an argument
+          * to this method.  Provide the additional check of whether the
+          * level is not the coarsest level and that it is not a new level
+          * in the d_mb_hierarchy.  If all three conditions are true, the
+          * "coarsest_sync_level" argument passed into the tagCells method
+          * will be true.  Otherwise, it will be false.
+          */
+
+         bool coarsest_sync_level =
+            level_is_coarsest_sync_level &&
+            tag_ln > 0 &&
+            tag_ln <= finest_level_not_regridded;
+
+         bool initial_time = false;
+         double level_regrid_start_time = 0.;
+         if (regrid_start_time.getSize() < tag_ln + 1) {
+            tbox::IEEE::setNaN(level_regrid_start_time);
+         } else {
+            level_regrid_start_time = regrid_start_time[tag_ln];
+         }
+
+         t_misc1->barrierAndStop();
+
+         t_tag_cells_for_refinement->barrierAndStart();
+         d_tag_init_strategy->
+         tagCellsForRefinement(d_mb_hierarchy,
+            tag_ln,
+            regrid_time,
+            d_tag_indx,
+            initial_time,
+            coarsest_sync_level,
+            d_mb_hierarchy->levelCanBeRefined(tag_ln),
+            level_regrid_start_time);
+         t_tag_cells_for_refinement->barrierAndStop();
+
+         /*
+          * Check for user-tagged cells that violate proper nesting.
+          * except if user specified that the violating tags be ignored.
+          */
+         if (d_check_nonrefined_tags != 'i') {
+            for (unsigned int nb = 0; nb < nblocks; nb++) {
+               tbox::Pointer<hier::PatchHierarchy> patch_hierarchy =
+                  d_mb_hierarchy->getHierarchy(nb);
+               tbox::Pointer<hier::PatchLevel> patch_level =
+                  mb_patch_level->getPatchLevelForBlock(nb);
+
+               if (!patch_level.isNull()) {
+                  checkNonrefinedTags(*patch_level, tag_ln, nb);
+               }
+            }
+         }
+
+         /*
+          * Perform regridding recursively on finer levels, if appropriate.
+          */
+         if (d_mb_hierarchy->finerLevelExists(tag_ln)
+             && d_mb_hierarchy->levelCanBeRefined(new_ln)) {
+            regridFinerLevel(
+               new_ln,
+               regrid_time,
+               finest_level_not_regridded,
+               false,
+               tag_buffer,
+               regrid_start_time);
+         }
+
+         t_misc2->barrierAndStart();
+
+         if (d_mb_hierarchy->finerLevelExists(new_ln)) {
+
+            t_second_finer_tagging->start();
+            const hier::IntVector fill_box_growth =
+               getRatioToCoarserLevel(tag_ln + 2) * getProperNestingBuffer(
+                  tag_ln + 1);
+
+            tbox::Pointer<hier::PatchLevel> second_fine_level =
+               d_mb_hierarchy->getPatchLevel(new_ln + 1);
+            /*
+             * We require [tag_ln+1]+tag_buffer to nest
+             * [tag_ln+2]+overflow.
+             * If the fine Connector width >= tag_buffer+overflow,
+             * the [tag_ln] -> [tag_ln+2] should see all the edges
+             * it needs to see for second_fine nesting.  (Note that
+             * we currently allow zero overflow.)
+             *
+             * FIXME: potential problem.  tag_to_finer and finer_to_tag
+             * may miss some edges to periodic images (I forgot
+             * why--need to verify this statement).  This is not a
+             * problem for tagging, but these Connectors are also used
+             * to bridge for new_to_finer and finer_to_new later on.
+             */
+            for (unsigned int nb = 0; nb < nblocks; nb++) {
+               tbox::Pointer<hier::PatchHierarchy> patch_hierarchy =
+                  d_mb_hierarchy->getHierarchy(nb);
+
+               if (patch_hierarchy->finerLevelExists(new_ln)) {
+
+                  const hier::Connector& tag_to_old = patch_hierarchy->getConnector(tag_ln,
+                        new_ln);
+                  const hier::Connector& old_to_finer = patch_hierarchy->getConnector(new_ln,
+                        new_ln + 1);
+                  const hier::Connector& finer_to_old = patch_hierarchy->getConnector(new_ln + 1,
+                        new_ln);
+                  const hier::Connector& old_to_tag = patch_hierarchy->getConnector(new_ln,
+                        tag_ln);
+                  const hier::OverlapConnectorAlgorithm oca;
+                  oca.bridge(tag_to_finer[nb],
+                     finer_to_tag[nb],
+                     tag_to_old,
+                     old_to_finer,
+                     finer_to_old,
+                     old_to_tag);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+                  oca.assertOverlapCorrectness(tag_to_finer[nb], false, true, true);
+                  oca.assertOverlapCorrectness(finer_to_tag[nb], false, true, true);
+                  TBOX_ASSERT(
+                     tag_to_finer[nb].getConnectorWidth()
+                     * getRatioToCoarserLevel(
+                        tag_ln + 1) * getRatioToCoarserLevel(
+                        tag_ln + 2) >= fill_box_growth);
+#endif
+
+                  fillTagsFromMappedBoxLevel(
+                     d_true_tag,
+                     mb_patch_level->getPatchLevelForBlock(nb),
+                     d_tag_indx,
+                     tag_to_finer[nb],
+                     true,
+                     fill_box_growth);
+               }
+            }
+            t_second_finer_tagging->barrierAndStop();
+         }
+
+         /*
+          * Buffer true tagged cells by specified amount which should be
+          * sufficient to keep disturbance on refined region until next
+          * regrid of the level occurs.
+          */
+         mb_patch_level->allocatePatchData(d_buf_tag_indx);
+         bufferTagsOnLevel(d_true_tag, mb_patch_level, tag_buffer[tag_ln]);
+         mb_patch_level->deallocatePatchData(d_buf_tag_indx);
+
+         t_misc2->stop();
+
+         /*
+          * Determine box array containing cells on level with a true tag
+          * value.  The box array must be contained in array of proper
+          * nesting boxes.
+          */
+
+         tbox::SAMRAI_MPI mpi(tbox::SAMRAI_MPI::commNull);
+         tbox::Array<int> work_on_block(nblocks, 0);
+         for (unsigned int nb = 0; nb < nblocks; nb++) {
+            tbox::Pointer<hier::PatchHierarchy> patch_hierarchy =
+               d_mb_hierarchy->getHierarchy(nb);
+
+            hier::Connector& tag_to_new = mb_tag_to_new[nb];
+            hier::Connector& new_to_tag = mb_new_to_tag[nb];
+
+            if (patch_hierarchy->getFinestLevelNumber() >= tag_ln) {
+
+               findRefinementBoxes(new_mapped_box_level[nb],
+                  tag_to_new,
+                  new_to_tag,
+                  tag_ln,
+                  nb);
+
+               if (s_print_steps == 'y') {
+                  if (new_mapped_box_level[nb].isInitialized()) {
+                     tbox::plog
+                     <<
+                     "MultiblockGriddingAlgorithm::regridFinerLevel got inititalized new_mapped_box_level\n";
+                  } else {
+                     tbox::plog
+                     <<
+                     "MultiblockGriddingAlgorithm::regridFinerLevel got un-inititalized new_mapped_box_level\n";
+                  }
+               }
+
+               if (new_mapped_box_level[nb].isInitialized()) {
+                  work_on_block[nb] =
+                     static_cast<int>(
+                        new_mapped_box_level[nb].getLocalNumberOfCells());
+
+                  mpi = new_mapped_box_level[nb].getMPI();
+               }
+            }
+         }
+
+         if (mpi.usingMPI()) {
+            TBOX_ASSERT(mpi.getCommunicator() != tbox::SAMRAI_MPI::commNull);
+            mpi.AllReduce(work_on_block.getPointer(), nblocks, MPI_SUM);
+         }
+
+         tbox::Array<tbox::RankGroup> rank_group(nblocks,
+                                                 tbox::RankGroup(mpi));
+
+         if (nblocks > 1) {
+            setRankGroups(rank_group, work_on_block, mpi);
+         }
+
+         for (unsigned int nb = 0; nb < nblocks; nb++) {
+            tbox::Pointer<hier::PatchHierarchy> patch_hierarchy =
+               d_mb_hierarchy->getHierarchy(nb);
+
+            hier::Connector& tag_to_new = mb_tag_to_new[nb];
+            hier::Connector& new_to_tag = mb_new_to_tag[nb];
+            hier::Connector& new_to_new = mb_new_to_new[nb];
+
+            if (patch_hierarchy->getFinestLevelNumber() >= tag_ln) {
+
+               loadBalanceAndRefineBoxes(new_mapped_box_level[nb],
+                  tag_to_new,
+                  new_to_tag,
+                  tag_ln,
+                  rank_group[nb],
+                  nb);
+
+               if (new_mapped_box_level[nb].isInitialized()) {
+                  if (s_print_steps == 'y') {
+                     tbox::plog
+                     <<
+                     "MultiblockGriddingAlgorithm::findRefinementBoxes: bridge links\n";
+                  }
+                  t_bridge_links->start();
+                  if (tag_ln == 0) {
+                     t_bridge_new_to_new->start();
+                     const hier::OverlapConnectorAlgorithm oca;
+                     oca.bridge(new_to_new,
+                        new_to_tag,
+                        tag_to_new,
+                        new_to_tag,
+                        tag_to_new);
+                     const hier::IntVector& gcw_new_to_new =
+                        patch_hierarchy->getRequiredConnectorWidth(new_ln, new_ln);
+                     oca.shrinkConnectorWidth(new_to_new, gcw_new_to_new);
+                     t_bridge_new_to_new->stop();
+                  } else {
+                     /*
+                      * I think we can bypass bridging to the coarser level
+                      * first because the new mapped_box_level (after overflow restriction)
+                      * and growth by the required gcw(new->new) still nests
+                      * in tag^gcw(tag->new).  This is guaranteed if
+                      * gcw(overflow) + gcw(new->new) <= gcw(tag->new).
+                      */
+                     const hier::IntVector& gcw_new_to_new =
+                        patch_hierarchy->getRequiredConnectorWidth(new_ln, new_ln);
+                     t_bridge_new_to_new->start();
+                     const hier::OverlapConnectorAlgorithm oca;
+                     oca.bridgeWithNesting(
+                        new_to_new,
+                        new_to_new,
+                        new_to_tag,
+                        tag_to_new,
+                        new_to_tag,
+                        tag_to_new,
+                        zero_vector,
+                        zero_vector,
+                        gcw_new_to_new);
+                     t_bridge_new_to_new->stop();
+                  }
+                  t_bridge_links->stop();
+               }
+            }
+         }
+
+         /*
+          * Deallocate tag arrays and schedule; no longer needed on current
+          * level.
+          */
+
+         mb_patch_level->deallocatePatchData(d_tag_indx);
+         d_bdry_sched_tags[tag_ln].setNull();
+
+      } else {
+         TBOX_ERROR("Disabled because we don't support reading for new boxes.");
+      }
+
+      /*
+       * Make new finer level (new_ln) if necessary, or remove
+       * next finer level if it is no longer needed.
+       */
+      for (int nb = 0; nb < d_mb_hierarchy->getNumberOfBlocks(); nb++) {
+         if (new_mapped_box_level[nb].isInitialized()) {
+            hier::Connector& new_to_new = mb_new_to_new[nb];
+
+            if (d_check_overlapping_patches != 'i') {
+               checkOverlappingPatches(new_to_new);
+            }
+         }
+      }
+
+      bool initialize_level = false;
+      tbox::Pointer<hier::MultiblockPatchLevel> old_fine_mblk_level(NULL);
+      if (d_mb_hierarchy->getNumberOfLevels() > new_ln) {
+         old_fine_mblk_level = d_mb_hierarchy->getPatchLevel(new_ln);
+      }
+
+      tbox::Array<tbox::Pointer<hier::Connector> > old_to_new(nblocks);
+      tbox::Array<tbox::Pointer<hier::Connector> > new_to_old(nblocks);
+
+      for (int nb = 0; nb < d_mb_hierarchy->getNumberOfBlocks(); nb++) {
+
+         tbox::Pointer<hier::PatchHierarchy> patch_hierarchy =
+            d_mb_hierarchy->getHierarchy(nb);
+
+         if (new_mapped_box_level[nb].isInitialized()) {
+            initialize_level = true;
+
+            t_regrid_finer_create->start();
+            /*
+             * Either remove pre-existing fine level from hierarchy and make
+             * a new level, or just make a new fine level for hierarchy.
+             */
+
+            tbox::Pointer<hier::PatchLevel> old_fine_level;
+
+            tbox::ConstPointer<hier::MappedBoxLevel> old_mapped_box_level;
+            const hier::Connector* old_to_tag = NULL;
+            const hier::Connector* tag_to_old = NULL;
+
+            if (patch_hierarchy->finerLevelExists(tag_ln)) {
+
+               // Save a reference to old mapped_box_level before patch_hierarchy dumps it.
+               old_mapped_box_level = patch_hierarchy->getMappedBoxLevel(new_ln);
+               old_to_tag = &patch_hierarchy->getConnector(new_ln, tag_ln);
+               tag_to_old = &patch_hierarchy->getConnector(tag_ln, new_ln);
+
+               old_fine_level = old_fine_mblk_level->getPatchLevelForBlock(nb);
+               patch_hierarchy->removePatchLevel(new_ln);
+            }
+
+            if (patch_hierarchy->levelExists(new_ln + 1)) {
+               if (s_check_proper_nesting == 'y') {
+                  /*
+                   * Check that the new mapped_box_level nests the finer
+                   * level (new_ln+1).  The mechanism for causing this
+                   * nest to happen is that the footprint of
+                   * mapped_box_level (new_ln+1) was used to tag for the
+                   * new mapped_box_level.
+                   */
+                  const hier::IntVector required_nesting =
+                     getRatioToCoarserLevel(new_ln
+                        + 1) * getProperNestingBuffer(new_ln);
+                  bool locally_nests = false;
+                  const bool finer_nests_in_new =
+                     dlbg_edge_utils.baseNestsInHead(
+                        &locally_nests,
+                        *patch_hierarchy->getMappedBoxLevel(new_ln + 1),
+                        new_mapped_box_level[nb],
+                        required_nesting,
+                        hier::IntVector::getZero(d_dim),
+                        hier::IntVector::getZero(d_dim),
+                        &patch_hierarchy->getPeriodicDomainSearchTree());
+                  if (!finer_nests_in_new) {
+                     tbox::perr
+                     << "MultiblockGriddingAlgorithm: new mapped_box_level\n"
+                     << "at ln=" << new_ln
+                     << " does not properly nest\n"
+                     << "existing finer mapped_box_level at ln="
+                     << new_ln + 1
+                     << " by the required nesting buffer of "
+                     << required_nesting
+                     << ".\nLocal nestingness: " << locally_nests
+                     << ".\nWriting MappedBoxLevels out to log file.\n"
+                     << "new_mapped_box_level of\n" << new_mapped_box_level[nb].format("N->", 2)
+                     << "finer mapped_box_level of\n" << patch_hierarchy->getMappedBoxLevel(new_ln + 1)->format("F->", 2);
+                     hier::MappedBoxLevel external(d_dim);
+                     hier::Connector finer_to_new, finer_to_external;
+                     finer_to_new.initialize(
+                        *patch_hierarchy->getMappedBoxLevel(new_ln + 1),
+                        new_mapped_box_level[nb],
+                        required_nesting);
+                     const hier::OverlapConnectorAlgorithm oca;
+                     oca.findOverlaps(finer_to_new);
+                     tbox::plog << "Finer to new:\n" << finer_to_new.format("FN->", 3);
+                     dlbg_edge_utils.computeExternalParts(
+                        external,
+                        finer_to_external,
+                        finer_to_new,
+                        -required_nesting,
+                        patch_hierarchy->getDomainSearchTree());
+                     tbox::plog << "External parts:\n" << finer_to_external.format("FE->", 3);
+                     TBOX_ERROR(
+                        "Internal library error: Failed to produce proper nesting.");
+                  }
+               }
+            }
+
+            patch_hierarchy->makeNewPatchLevel(new_ln,
+               new_mapped_box_level[nb]);
+
+            /*
+             * Cache Connectors for new level.
+             */
+            const tbox::Pointer<hier::PatchLevel>
+            tag_level = patch_hierarchy->getPatchLevel(tag_ln);
+            hier::Connector& tag_to_new = mb_tag_to_new[nb];
+            hier::Connector& new_to_tag = mb_new_to_tag[nb];
+            hier::Connector& new_to_new = mb_new_to_new[nb];
+
+            tbox::Pointer<hier::PatchLevel> new_level =
+               patch_hierarchy->getPatchLevel(new_ln);
+            new_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+            createConnector(
+               *new_level->getMappedBoxLevel(),
+               new_to_new.getConnectorWidth(),
+               new_to_new.getNeighborhoodSets());
+            new_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+            createConnector(
+               *tag_level->getMappedBoxLevel(),
+               new_to_tag.getConnectorWidth(),
+               new_to_tag.getNeighborhoodSets());
+            tag_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+            createConnector(
+               *new_level->getMappedBoxLevel(),
+               tag_to_new.getConnectorWidth(),
+               tag_to_new.getNeighborhoodSets());
+
+            if (patch_hierarchy->levelExists(new_ln + 1)) {
+
+               /*
+                * Connect the new level to the finer level.
+                */
+#if 0
+               precomputed_connectors[nb].resizeArray(2 + precomputed_connectors[nb].size());
+               precomputed_connectors[nb][precomputed_connectors[nb].size() - 2] =
+                  new hier::Connector;
+               precomputed_connectors[nb][precomputed_connectors[nb].size() - 1] =
+                  new hier::Connector;
+               hier::Connector& new_to_finer =
+                  *precomputed_connectors[nb][precomputed_connectors[nb].size() - 2];
+               hier::Connector& finer_to_new =
+                  *precomputed_connectors[nb][precomputed_connectors[nb].size() - 1];
+#endif
+               hier::Connector new_to_finer;
+               hier::Connector finer_to_new;
+               t_bridge_new_to_finer->start();
+
+               /*
+                * FIXME: We should use gcw_limit in this bridge to make sure
+                * new_to_finer and finer_to_new do not have more edges than
+                * needed (and resulting in degraded performance.
+                */
+               const hier::OverlapConnectorAlgorithm oca;
+               oca.bridgeWithNesting(
+                  new_to_finer,
+                  finer_to_new,
+                  new_to_tag,
+                  tag_to_finer[nb],
+                  finer_to_tag[nb],
+                  tag_to_new,
+                  zero_vector,
+                  neg1_vector,
+                  patch_hierarchy->getRequiredConnectorWidth(new_ln, new_ln + 1));
+               t_bridge_new_to_finer->stop();
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+               oca.assertOverlapCorrectness(new_to_finer, false, true, true);
+               oca.assertOverlapCorrectness(finer_to_new, false, true, true);
+#endif
+               tbox::Pointer<hier::PatchLevel> finer_level =
+                  patch_hierarchy->getPatchLevel(new_ln + 1);
+               new_level->getMappedBoxLevel()->getPersistentOverlapConnectors()
+               .createConnector(
+                  *finer_level->getMappedBoxLevel(),
+                  new_to_finer.getConnectorWidth(),
+                  new_to_finer.getNeighborhoodSets());
+               finer_level->getMappedBoxLevel()->getPersistentOverlapConnectors()
+               .createConnector(
+                  *new_level->getMappedBoxLevel(),
+                  finer_to_new.getConnectorWidth(),
+                  finer_to_new.getNeighborhoodSets());
+            }
+
+            old_to_new[nb] = new hier::Connector;
+            new_to_old[nb] = new hier::Connector;
+            if (!old_mapped_box_level.isNull()) {
+               t_bridge_new_to_old->start();
+               const hier::OverlapConnectorAlgorithm oca;
+               oca.bridgeWithNesting(
+                  *(old_to_new[nb]),
+                  *(new_to_old[nb]),
+                  *old_to_tag,
+                  patch_hierarchy->getConnector(tag_ln, tag_ln + 1),
+                  patch_hierarchy->getConnector(tag_ln + 1, tag_ln),
+                  *tag_to_old,
+                  zero_vector,
+                  zero_vector,
+                  patch_hierarchy->getRequiredConnectorWidth(new_ln, new_ln));
+               t_bridge_new_to_old->stop();
+
+               new_level->getMappedBoxLevel()->getPersistentOverlapConnectors()
+               .createConnector(
+                  *old_fine_level->getMappedBoxLevel(),
+                  new_to_old[nb]->getConnectorWidth(),
+                  new_to_old[nb]->getNeighborhoodSets());
+               old_fine_level->getMappedBoxLevel()->
+               getPersistentOverlapConnectors().createConnector(
+                  *new_level->getMappedBoxLevel(),
+                  old_to_new[nb]->getConnectorWidth(),
+                  old_to_new[nb]->getNeighborhoodSets());
+            }
+
+            t_regrid_finer_create->barrierAndStop();
+
+         } else {
+            /*
+             * Here if a block had patches at level new_ln before this
+             * regrid but will not after this regrid, we remove the old
+             * level from the PatchHierarchy for this block.
+             */
+            if (patch_hierarchy->finerLevelExists(tag_ln)) {
+               patch_hierarchy->removePatchLevel(new_ln);
+            }
+         }
+      }
+
+      d_mb_hierarchy->adjustMultiblockPatchLevelBoundaries(
+         d_mb_hierarchy->getMultiblockPatchLevel(new_ln));
+
+      if (initialize_level) {
+
+         // "false" argument": const bool initial_time = false;
+         d_tag_init_strategy->initializeLevelData(d_mb_hierarchy,
+            new_ln,
+            regrid_time,
+            d_mb_hierarchy->levelCanBeRefined(
+               new_ln),
+            false,
+            old_fine_mblk_level);
+
+         /*
+          * Destroy old patch level, if such a level existed prior to regrid.
+          */
+         if (!old_fine_mblk_level.isNull()) {
+            for (unsigned int nb = 0; nb < nblocks; nb++) {
+               tbox::Pointer<hier::PatchLevel> old_fine_level =
+                  old_fine_mblk_level->getPatchLevelForBlock(nb);
+               old_fine_level.setNull();
+            }
+
+            old_fine_mblk_level.setNull();
+         }
+      }
+
+      if (!initialize_level) {
+
+         /*
+          * If there are no boxes for the new fine level, remove the
+          * pre-existing fine level if it existed.
+          */
+
+         for (unsigned int nb = 0; nb < nblocks; nb++) {
+            tbox::Pointer<hier::PatchHierarchy> patch_hierarchy =
+               d_mb_hierarchy->getHierarchy(nb);
+
+            if (patch_hierarchy->finerLevelExists(tag_ln)
+                && remove_old_fine_level) {
+               patch_hierarchy->removePatchLevel(new_ln);
+            }
+         }
+
+      } // if we are not re-gridding the level
+
+      delete[] tag_to_finer;
+      delete[] finer_to_tag;
+
+   } //  if level cannot be refined, the routine drops through...
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+void MultiblockGriddingAlgorithm::recordStatistics(
+   double current_time)
+{
+#ifdef MGA_RECORD_STATS
+// MGA_RECORD_STATS is defined in MultiblockGriddingAlgorithm.h
+/*
+ * For statistics, record number of cells and patches on new level.
+ */
+   for (int ln = 0; ln < d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels(); ++ln) {
+
+      int level_gridcells = 0;
+      int level_local_patches = 0;
+
+      tbox::Pointer<hier::MultiblockPatchLevel> mb_patch_level =
+         d_mb_hierarchy->getMultiblockPatchLevel(ln);
+
+      for ( int bn=0; bn < d_mb_hierarchy->getNumberOfBlocks(); ++bn ) {
+         tbox::Pointer<hier::PatchLevel> patch_level =
+            mb_patch_level->getPatchLevelForBlock(bn);
+         if ( ! patch_level.isNull() ) {
+            level_gridcells += patch_level->getLocalNumberOfCells();
+            level_local_patches += patch_level->getLocalNumberOfPatches();
+         }
+      }
+
+      d_boxes_stat[ln]->recordProcStat(double(level_local_patches));
+      d_cells_stat[ln]->recordProcStat(double(level_gridcells));
+      d_timestamp_stat[ln]->recordProcStat(double(current_time));
+   }
+#endif
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+void MultiblockGriddingAlgorithm::printStatistics(
+   std::ostream& s) const
+{
+#ifdef MGA_RECORD_STATS
+   tbox::Pointer<hier::PatchHierarchy> hierarchy0(
+      d_mb_hierarchy->getHierarchy(0));
+   tbox::Pointer<hier::PatchLevel> level0(
+      hierarchy0->getPatchLevel(0));
+
+   const tbox::SAMRAI_MPI& mpi(level0->getMappedBoxLevel()->getMPI());
+   /*
+    * Output statistics.
+    */
+   // Collect statistic on mesh size.
+   tbox::Statistician* statn = tbox::Statistician::getStatistician();
+
+   statn->finalize();
+   // statn->printLocalStatData(s);
+   if (mpi.getRank() == 0) {
+      // statn->printAllGlobalStatData(s);
+      for (int ln = 0; ln < d_mb_hierarchy->getMaxNumberOfLevels(); ++ln) {
+         tbox::Statistic& cstat = *d_cells_stat[ln];
+         tbox::Statistic& bstat = *d_boxes_stat[ln];
+         tbox::Statistic& tstat = *d_timestamp_stat[ln];
+         s << "statistic " << cstat.getName() << ":" << std::endl;
+         if (0) {
+            s << "Global: \n";
+            statn->printGlobalProcStatDataFormatted(cstat.getInstanceId(), s);
+         }
+         s
+         <<
+         " Seq#  SimTime       C-Sum      C-Avg      C-Min   ->    C-Max  C-NormDiff  B-Sum B-Avg B-Min -> B-Max B-NormDiff C/B-Avg\n";
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1572)
+#endif
+         for (int sn = 0; sn < cstat.getStatSequenceLength(); ++sn) {
+            double csum = statn->getGlobalProcStatSum(cstat.getInstanceId(), sn);
+            double cmax = statn->getGlobalProcStatMax(cstat.getInstanceId(), sn);
+            double cmin = statn->getGlobalProcStatMin(cstat.getInstanceId(), sn);
+            double cdiffnorm = cmax != 0 ? 1.0 - cmin / cmax : 0;
+            double bsum = statn->getGlobalProcStatSum(bstat.getInstanceId(), sn);
+            double bmax = statn->getGlobalProcStatMax(bstat.getInstanceId(), sn);
+            double bmin = statn->getGlobalProcStatMin(bstat.getInstanceId(), sn);
+            double bdiffnorm = bmax != 0 ? 1.0 - bmin / bmax : 0;
+            double stime = statn->getGlobalProcStatMin(
+                  tstat.getInstanceId(), sn);
+            s << std::setw(3) << sn << "  "
+              << std::scientific << std::setprecision(6) << std::setw(12)
+              << stime
+              << " "
+              << std::fixed << std::setprecision(0)
+              << std::setw(10) << csum << " "
+              << std::setw(10) << csum / mpi.getSize() << " "
+              << std::setw(10) << cmin << " -> "
+              << std::setw(10) << cmax
+              << "  " << std::setw(4) << std::setprecision(4) << cdiffnorm
+              << "  "
+              << std::fixed << std::setprecision(0)
+              << std::setw(6) << bsum << " "
+              << std::setw(5) << bsum / mpi.getSize() << " "
+              << std::setw(5) << bmin << "  ->"
+              << std::setw(5) << bmax
+              << "   " << std::setw(4) << std::setprecision(4) << bdiffnorm
+              << std::setw(10) << std::setprecision(0)
+              << (bsum != 0 ? csum / bsum : 0)
+              << std::endl;
+         }
+      }
+   }
+#endif
+}
+
+/*
+ *************************************************************************
+ * All tags reside in the given level.  But due to nesting restrictions,
+ * not all cells in the level are allowed to be refined.  We look for the
+ * portions of the level that would violate nesting if refined.  Any tags
+ * there are nonnesting tags.
+ *************************************************************************
+ */
+void MultiblockGriddingAlgorithm::checkNonrefinedTags(
+   const hier::PatchLevel& level,
+   int tag_ln,
+   const int block_num) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim, level, *d_mb_hierarchy);
+
+   const tbox::Pointer<hier::PatchHierarchy> patch_hierarchy(d_mb_hierarchy->getHierarchy(block_num));
+   const tbox::Pointer<hier::PatchLevel> tag_level = patch_hierarchy->getPatchLevel(tag_ln);
+   const hier::MappedBoxLevel& tag_mapped_box_level = *tag_level->getMappedBoxLevel();
+   hier::MappedBoxLevel violator(d_dim);
+   hier::Connector tag_to_violator;
+   const hier::Connector& tag_mapped_box_level_to_self = patch_hierarchy->getConnector(tag_ln,
+         tag_ln);
+   computeNestingViolator(tag_mapped_box_level,
+      violator,
+      tag_to_violator,
+      tag_mapped_box_level_to_self,
+      tag_mapped_box_level_to_self,
+      tag_ln + 1,
+      block_num);
+
+   /*
+    * Check for user-tagged cells in the violating parts of the tag level.
+    */
+   math::PatchCellDataBasicOps<int> dataop;
+   math::PatchCellDataOpsInteger dataopi;
+   int maxval = 0;
+   const hier::NeighborhoodSet& tag_eto_violator = tag_to_violator.getNeighborhoodSets();
+   for (hier::NeighborhoodSet::const_iterator ei = tag_eto_violator.begin();
+        ei != tag_eto_violator.end(); ++ei) {
+      const hier::LocalId &local_id = ei->first.getLocalId();
+      tbox::Pointer<hier::Patch> patch = level.getPatch(local_id);
+      tbox::Pointer<pdat::CellData<int> > tag_data =
+         patch->getPatchData(d_tag_indx);
+      const NeighborSet& nabrs = (*ei).second;
+      for (NeighborSet::const_iterator na = nabrs.begin();
+           na != nabrs.end(); ++na) {
+         const hier::MappedBox& vio_mapped_box = *na;
+         maxval = dataop.max(tag_data, vio_mapped_box.getBox());
+         if (maxval > 0) {
+            // std::cout << "violator found in vio_mapped_box " << vio_mapped_box << std::endl;
+            // dataopi.printData( tag_data, tag_data->getBox(), std::cout );
+            break;
+         }
+      }
+      if (maxval > 0) {
+         // std::cout << "Violator found" << std::endl;
+         break;
+      }
+   }
+   const tbox::SAMRAI_MPI mpi(violator.getMPI());
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&maxval, 1, MPI_MAX);
+   }
+
+   if (maxval > 0) {
+      if (d_check_nonrefined_tags == 'w') {
+         TBOX_WARNING("User code has tagged cells in\n"
+            << "violation of nesting requirements.\n"
+            << "Violating tags will be discarded.\n"
+            << "See MultiblockGriddingAlgorithm::checkNonrefinedTags()\n");
+      } else if (d_check_nonrefined_tags == 'e') {
+         TBOX_ERROR("User code has tagged cells in\n"
+            << "violation of nesting requirements.\n"
+            << "See MultiblockGriddingAlgorithm::checkNonrefinedTags()\n");
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void MultiblockGriddingAlgorithm::checkOverlappingPatches(
+   const hier::Connector& mapped_box_level_to_self) const
+{
+   int has_overlap = 0;
+   const hier::MappedBoxLevel& mapped_box_level = mapped_box_level_to_self.getBase();
+   const hier::NeighborhoodSet& edges = mapped_box_level_to_self.getNeighborhoodSets();
+   for (hier::NeighborhoodSet::const_iterator ei = edges.begin();
+        ei != edges.end(); ++ei) {
+      const hier::MappedBox& mapped_box = *mapped_box_level.getMappedBoxStrict(ei->first);
+      const NeighborSet& nabrs = ei->second;
+      for (NeighborSet::const_iterator na = nabrs.begin();
+           na != nabrs.end();
+           ++na) {
+         const hier::MappedBox& nabr = *na;
+         if (nabr != mapped_box) {
+            if (nabr.getBox().intersects(mapped_box.getBox())) {
+               has_overlap = 1;
+               break;
+            }
+         }
+      }
+      if (has_overlap) {
+         break;
+      }
+   }
+   const tbox::SAMRAI_MPI mpi(mapped_box_level.getMPI());
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&has_overlap, 1, MPI_MAX);
+   }
+
+   if (has_overlap > 0) {
+      if (d_check_overlapping_patches == 'w') {
+         TBOX_WARNING("PatchLevel has patches which overlap in index space\n"
+            << "See MultiblockGriddingAlgorithm::checkOverlappingPatches()\n");
+      } else if (d_check_overlapping_patches == 'e') {
+         TBOX_ERROR("PatchLevel has patches which overlap in index space\n"
+            << "See MultiblockGriddingAlgorithm::checkOverlappingPatches()\n");
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ * For cases where tagging is not performed read the new level boxes
+ * either from user input or from stored level boxes.
+ *
+ *************************************************************************
+ */
+void MultiblockGriddingAlgorithm::readLevelBoxes(
+   hier::BoxArray& new_level_boxes,
+   hier::MappedBoxLevel& new_mapped_box_level,
+   hier::Connector& coarser_to_new,
+   hier::Connector& new_to_coarser,
+   const int block_number,
+   const int level_number,
+   const double regrid_time,
+   bool& remove_old_fine_level)
+{
+   (void)new_level_boxes;
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy(d_mb_hierarchy->getHierarchy(block_number));
+
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= hierarchy->getFinestLevelNumber()));
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim, *hierarchy, new_mapped_box_level);
+
+   const hier::MappedBoxLevel& coarser_mapped_box_level = *hierarchy->getMappedBoxLevel(level_number);
+
+   int fine_level_number = level_number + 1;
+   hier::BoxArray boxes_to_refine(d_dim);
+
+   /*
+    * Access the user supplied refine boxes.  The
+    * "new_level_has_new_boxes" boolean specifies whether the
+    * level boxes have changed from the last time
+    * getUserSuppliedRefineBoxes() was called.  If they have changed,
+    * it returns true.  If they are unchanged, it returns false.
+    */
+   bool new_level_has_new_boxes = true;
+   if (d_tag_init_strategy->refineUserBoxInputOnly()) {
+
+      new_level_has_new_boxes = d_tag_init_strategy->
+         getUserSuppliedRefineBoxes(boxes_to_refine,
+            level_number,
+            regrid_time);
+
+   }
+
+   /*
+    * If "new_level_has_new_boxes" is false we wish to keep the
+    * existing fine level intact.  Avoid further work by setting
+    * the parameter "compute_load_balanced_level_boxes" to false
+    * and indicate that we want to avoid removing the old fine level
+    * by setting "remove_old_fine_level" to false.
+    */
+   bool compute_load_balanced_level_boxes = true;
+   if (!new_level_has_new_boxes) {
+      compute_load_balanced_level_boxes = false;
+      remove_old_fine_level = false;
+   }
+
+   /*
+    * If we are using the nonuniform load balance option, we
+    * still need to redo the load balance and construct a new level,
+    * even if the level boxes have not changed.
+    */
+
+   if (d_load_balancer->getLoadBalanceDependsOnPatchData(fine_level_number)
+       && boxes_to_refine.getNumberOfBoxes() > 0) {
+      compute_load_balanced_level_boxes = true;
+      remove_old_fine_level = true;
+   }
+
+   /*
+    * If the boxes_to_refine are empty, this implies that no
+    * refinement is desired so a new finer level will NOT be
+    * constructed.  In this case, avoid load balance steps and
+    * specify that we want to remove the old fine level.
+    */
+   if (boxes_to_refine.getNumberOfBoxes() == 0) {
+      compute_load_balanced_level_boxes = false;
+      remove_old_fine_level = true;
+   }
+
+   if (compute_load_balanced_level_boxes) {
+
+      hier::BoxList fine_box_list(boxes_to_refine);
+      fine_box_list.refine(getRatioToCoarserLevel(fine_level_number));
+      tbox::Pointer<hier::PatchLevel> patch_level =
+         hierarchy->getPatchLevel(level_number);
+
+      hier::IntVector ratio_to_level_zero =
+         patch_level->getRatioToLevelZero()
+         * getRatioToCoarserLevel(fine_level_number);
+
+      hier::BoxArray physical_domain(d_dim);
+      hierarchy->getGridGeometry()->
+      computePhysicalDomain(physical_domain,
+         ratio_to_level_zero);
+
+      // hier::IntVector patch_cut_factor(getRatioToCoarserLevel(fine_level_number));
+      hier::IntVector patch_cut_factor(d_dim, 1);
+
+      hier::IntVector smallest_patch(d_dim);
+      hier::IntVector largest_patch(d_dim);
+      hier::IntVector extend_ghosts(d_dim);
+      {
+      hier::IntVector smallest_box_to_refine(d_dim);
+      // "false" argument: for_building_finer level = false
+      getGriddingParameters(smallest_patch,
+         smallest_box_to_refine,
+         largest_patch,
+         extend_ghosts,
+         *hierarchy,
+         fine_level_number,
+         false);
+      }
+
+      hier::MappedBoxLevel unbalanced_mapped_box_level(d_dim);
+      unbalanced_mapped_box_level.initialize(
+         coarser_mapped_box_level.getRefinementRatio(),
+         coarser_mapped_box_level.getMPI(),
+         hier::MappedBoxLevel::GLOBALIZED);
+      for (hier::LocalId i(0); i < boxes_to_refine.size(); ++i) {
+         hier::MappedBox unbalanced_mapped_box(boxes_to_refine[i.getValue()], i, 0);
+         unbalanced_mapped_box_level.addMappedBox(unbalanced_mapped_box);
+      }
+
+      // Get the max gcw required for peer and cross Connectors.
+      hier::IntVector gcw =
+         hierarchy->getRequiredConnectorWidth(level_number + 1, level_number + 1);
+      gcw =
+         hier::IntVector::ceiling(gcw, getRatioToCoarserLevel(fine_level_number));
+      gcw.max(hierarchy->getRequiredConnectorWidth(level_number, level_number + 1));
+      gcw.max(hierarchy->getRequiredConnectorWidth(level_number, level_number));
+
+      new_mapped_box_level = unbalanced_mapped_box_level;
+      coarser_to_new.initialize(
+         coarser_mapped_box_level,
+         new_mapped_box_level,
+         gcw);
+      new_to_coarser.initialize(
+         new_mapped_box_level,
+         coarser_mapped_box_level,
+         gcw);
+      const hier::OverlapConnectorAlgorithm oca;
+      oca.findOverlaps(coarser_to_new);
+      oca.findOverlaps(new_to_coarser);
+
+      t_load_balance->start();
+      d_load_balancer0->loadBalanceMappedBoxLevel(
+         new_mapped_box_level,
+         new_to_coarser,
+         coarser_to_new,
+         hierarchy,
+         level_number,
+         hier::Connector(),
+         hier::Connector(),
+         smallest_patch,
+         largest_patch,
+         hierarchy->getDomainMappedBoxLevel(),
+         extend_ghosts,
+         patch_cut_factor);
+      t_load_balance->stop();
+
+      const hier::IntVector& ratio =
+         getRatioToCoarserLevel(fine_level_number);
+      refineNewMappedBoxLevel(new_mapped_box_level,
+         coarser_to_new,
+         new_to_coarser,
+         ratio);
+      if (d_sequentialize_patch_indices) {
+         sortNodes(new_mapped_box_level,
+            coarser_to_new,
+            new_to_coarser,
+            false,
+            true);
+      }
+      const hier::Connector& coarser_to_coarser =
+         hierarchy->getConnector(level_number,
+            level_number);
+      const hier::MappedBoxLevelConnectorUtils dlbg_edge_utils;
+      dlbg_edge_utils.addPeriodicImagesAndRelationships(
+         new_mapped_box_level,
+         new_to_coarser,
+         coarser_to_new,
+         hierarchy->getDomainSearchTree(),
+         coarser_to_coarser);
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ * Set each integer value in specified tag array to tag_value where
+ * patch level intersects given box array.
+ *
+ *************************************************************************
+ */
+
+void MultiblockGriddingAlgorithm::fillTagsFromMappedBoxLevel(
+   const int tag_value,
+   const tbox::Pointer<hier::PatchLevel> level,
+   const int tag_index,
+   const hier::Connector& level_to_fill_mapped_box_level,
+   const bool interior_only,
+   const hier::IntVector& fill_box_growth) const
+{
+   TBOX_ASSERT((tag_value == d_true_tag) || (tag_value == d_false_tag));
+   TBOX_ASSERT(!(level.isNull()));
+   TBOX_ASSERT(tag_index == d_tag_indx || tag_index == d_buf_tag_indx);
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim, *level, fill_box_growth);
+
+   t_fill_tags_from_mapped_box_level->start();
+
+   const hier::OverlapConnectorAlgorithm oca;
+
+   hier::IntVector ratio =
+      level_to_fill_mapped_box_level.getHead().getRefinementRatio()
+      / level_to_fill_mapped_box_level.getBase().getRefinementRatio();
+   TBOX_ASSERT(ratio == level_to_fill_mapped_box_level.getRatio());
+
+   const hier::IntVector gcw =
+      hier::IntVector::ceiling(fill_box_growth,
+         level_to_fill_mapped_box_level.getRatio());
+
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      tbox::Pointer<pdat::CellData<int> >
+      tag_data = patch->getPatchData(tag_index);
+
+      TBOX_ASSERT(!(tag_data.isNull()));
+
+      const hier::GlobalId& global_id(patch->getGlobalId());
+
+      hier::Connector::NeighborSet neighbors;
+
+      oca.extractNeighbors(
+         neighbors,
+         level_to_fill_mapped_box_level,
+         global_id,
+         gcw);
+
+      for (hier::Connector::NeighborSet::const_iterator
+           ni = neighbors.begin(); ni != neighbors.end(); ++ni) {
+         hier::Box box = (*ni).getBox();
+         box.grow(fill_box_growth);
+         box.coarsen(ratio);
+         if (interior_only) {
+            box = box * tag_data->getBox();
+         }
+         tag_data->fill(tag_value, box);
+      }
+
+   }
+   t_fill_tags_from_mapped_box_level->stop();
+}
+
+/*
+ *************************************************************************
+ *
+ * Buffer each integer tag with given value on the patch level by the
+ * specified buffer size.  Note that the patch data indexed by
+ * d_buf_tag_indx is used temporarily to buffer the tag data. The
+ * communication of ghost cell (i.e., buffer) information forces all
+ * tags on all patch interiors to represent a consistent buffering of
+ * the original configuration of tagged cells.
+ *
+ *************************************************************************
+ */
+
+void MultiblockGriddingAlgorithm::bufferTagsOnLevel(
+   const int tag_value,
+   const tbox::Pointer<hier::MultiblockPatchLevel> level,
+   const int buffer_size) const
+{
+   TBOX_ASSERT((tag_value == d_true_tag) || (tag_value == d_false_tag));
+   TBOX_ASSERT(!(level.isNull()));
+   TBOX_ASSERT(buffer_size >= 0);
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *level);
+   /*
+    * Start timer for this method.
+    */
+   t_buffer_tags->start();
+
+   /*
+    * Set temporary buffered tags based on buffer width and
+    * distance from actual tags.
+    */
+   const int not_tag = ((tag_value == d_true_tag) ? d_false_tag : d_true_tag);
+   for (int nb = 0; nb < level->getNumberOfBlocks(); nb++) {
+      tbox::Pointer<hier::PatchLevel> block_level =
+         level->getPatchLevelForBlock(nb);
+
+      if (!block_level.isNull()) {
+         for (hier::PatchLevel::Iterator ip1(block_level); ip1; ip1++) {
+            tbox::Pointer<hier::Patch> patch = *ip1;
+
+            tbox::Pointer<pdat::CellData<int> >
+            buf_tag_data = patch->getPatchData(d_buf_tag_indx);
+            tbox::Pointer<pdat::CellData<int> >
+            tag_data = patch->getPatchData(d_tag_indx);
+
+            buf_tag_data->fillAll(not_tag);
+
+            hier::Box interior = patch->getBox();
+
+            for (int bc = buffer_size; bc >= 0; bc--) {
+
+               int fill_val = buffer_size - bc + 1;
+
+               for (pdat::CellIterator ic(interior); ic; ic++) {
+                  if ((*tag_data)(ic()) == tag_value) {
+                     hier::Box buf_box(ic() - bc, ic() + bc);
+                     buf_tag_data->fill(fill_val, buf_box * interior);
+                  }
+               }
+            }
+         }
+
+      }
+
+   }
+
+   /*
+    * Communicate boundary data for buffered tag array so that tags
+    * near patch boundaries will become buffered properly.
+    */
+   const double dummy_time = 0.0;
+
+   t_bdry_fill_tags_comm->start();
+   d_bdry_sched_tags[level->getLevelNumber()]->fillData(dummy_time, false);
+   t_bdry_fill_tags_comm->stop();
+
+   /*
+    * Buffer tags on patch interior according to buffered tag data.
+    */
+   for (int bc = 0; bc < level->getNumberOfBlocks(); bc++) {
+      tbox::Pointer<hier::PatchLevel> block_level =
+         level->getPatchLevelForBlock(bc);
+      if (!block_level.isNull()) {
+         for (hier::PatchLevel::Iterator ip2(block_level); ip2; ip2++) {
+            tbox::Pointer<hier::Patch> patch = *ip2;
+
+            tbox::Pointer<pdat::CellData<int> > buf_tag_data =
+               patch->getPatchData(d_buf_tag_indx);
+            tbox::Pointer<pdat::CellData<int> > tag_data =
+               patch->getPatchData(d_tag_indx);
+
+            hier::Box buf_tag_box = buf_tag_data->getGhostBox();
+            hier::Box tag_box = tag_data->getBox();
+
+            /*
+             * Set all interior tags to tag value where buffer tags non-zero.
+             */
+            for (pdat::CellIterator ic(tag_box); ic; ic++) {
+               (*tag_data)(ic()) = ((*buf_tag_data)(ic()) ? tag_value : not_tag);
+            }
+
+            /*
+             * Set all interior tags in buffers around tags in ghosts.
+             */
+            for (pdat::CellIterator ic2(buf_tag_box); ic2; ic2++) {
+               int tval = (*buf_tag_data)(ic2());
+               if (tval > 1) {
+                  int buf_size = tval - 1;
+                  hier::Box buf_box(ic2() - buf_size, ic2() + buf_size);
+                  tag_data->fill(tag_value, buf_box);
+               }
+            }
+         }
+      }
+   }
+
+   t_buffer_tags->stop();
+}
+
+/*
+ *************************************************************************
+ *
+ * Given a patch level, determine an appropriate array of boxes from
+ * which a new finer level may be constructed.  That is, find an array
+ * of boxes that covers all tags having the specified tag value.  Note
+ * that it is assumed that the integer tag arrays have been set
+ * properly; i.e., cells have been tagged through error estimation and
+ * the tags have been buffered to ensure disturbances remain on fine
+ * level until next regrid occurs.  Note that load balancing is
+ * performed once an appropriate list of boxes containing the tags is
+ * found.  This procedure massages the list of boxes further and then
+ * assigns each to a single processor (i.e., the mapping).
+ *
+ *************************************************************************
+ */
+
+void MultiblockGriddingAlgorithm::findRefinementBoxes(
+   hier::MappedBoxLevel& new_mapped_box_level,
+   hier::Connector& tag_to_new,
+   hier::Connector& new_to_tag,
+   const int tag_ln,
+   const int block_number) const
+{
+   TBOX_ASSERT((tag_ln >= 0)
+      && (tag_ln <= d_mb_hierarchy->getFinestLevelNumber()));
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy(d_mb_hierarchy->getHierarchy(block_number));
+   TBOX_ASSERT(!(hierarchy.isNull()));
+   TBOX_ASSERT(!(hierarchy->getPatchLevel(tag_ln).isNull()));
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim, new_mapped_box_level, *hierarchy);
+
+   if (s_print_steps == 'y') {
+      tbox::plog
+      <<
+      "MultiblockGriddingAlgorithm::findRefinementBoxes entered with tag_ln = "
+      << tag_ln << "\n";
+   }
+
+   tbox::SAMRAI_MPI mpi(hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   const hier::OverlapConnectorAlgorithm oca;
+   const hier::MappedBoxLevelConnectorUtils dlbg_edge_utils;
+
+   /*
+    * Start timer for this method.
+    */
+   t_find_refinement->barrierAndStart();
+
+   const hier::MappedBoxLevel& tag_mapped_box_level = *hierarchy->getMappedBoxLevel(tag_ln);
+
+   const int new_ln = tag_ln + 1;
+
+
+   /*
+    * Construct list of boxes covering the true tags on the level.
+    * Note that box list will be contained in the bounding box
+    * but will not be contained in the list of proper nesting boxes,
+    * in general.  So we intersect the box list against the list of
+    * nesting boxes.  Note that this may produce boxes which are too
+    * small.  Thus, boxes are regrown later.
+    */
+
+   hier::IntVector smallest_box_to_refine(d_dim);
+   hier::IntVector extend_ghosts(d_dim);
+   hier::IntVector largest_patch(d_dim);
+   hier::IntVector smallest_patch(d_dim);
+   // "true" argument: for_building_finer level = true
+   getGriddingParameters(smallest_patch,
+      smallest_box_to_refine,
+      largest_patch,
+      extend_ghosts,
+      *hierarchy,
+      new_ln,
+      true);
+
+   const hier::IntVector extend_ghosts_in_tag_space =
+      hier::IntVector::ceiling(extend_ghosts,
+                               hierarchy->getRatioToCoarserLevel(new_ln));
+
+   tbox::Pointer<hier::PatchLevel> level =
+      hierarchy->getPatchLevel(tag_ln);
+
+   /*
+    * Determine single smallest bounding box for all nesting boxes.
+    */
+   hier::Box bounding_box(d_dim);
+   bounding_box =
+      hierarchy->getMappedBoxLevel(tag_ln)->getGlobalBoundingBox();
+
+   if (s_print_steps == 'y') {
+      tbox::plog
+      << "MultiblockGriddingAlgorithm::findRefinementBoxes: clustering\n";
+   }
+
+   t_find_boxes_containing_tags->barrierAndStart();
+   hier::IntVector ratio = getRatioToCoarserLevel(new_ln);
+   /*
+    * Get the max gcw required for cross Connectors from tag to new level.
+    * Because new <-> new has a smaller gcw than this ammount, we have
+    * enough gcw to compute new <-> new later.
+    */
+   hier::IntVector gcw =
+      hierarchy->getRequiredConnectorWidth(tag_ln, tag_ln + 1);
+   d_box_generator->findBoxesContainingTags(
+      new_mapped_box_level,
+      tag_to_new,
+      new_to_tag,
+      level, d_tag_indx, d_true_tag, bounding_box,
+      smallest_box_to_refine,
+      getEfficiencyTolerance(tag_ln),
+      getCombineEfficiency(tag_ln),
+      gcw);
+   t_find_boxes_containing_tags->stop();
+
+   if (new_mapped_box_level.getGlobalNumberOfBoxes() > 0) {
+
+      if (s_check_connectors == 'y') {
+         /*
+          * At this stage, there are no edges to periodic images yet, so
+          * don't check for them.
+          */
+         TBOX_ASSERT(oca.checkOverlapCorrectness(new_to_tag,
+               false,
+               true,
+               true) == 0);
+         TBOX_ASSERT(oca.checkOverlapCorrectness(tag_to_new,
+               false,
+               true,
+               true) == 0);
+      }
+
+      t_box_massage->start();
+
+      {
+         if (s_print_steps == 'y') {
+            tbox::plog
+            <<
+            "MultiblockGriddingAlgorithm::findRefinementBoxes: enforcing overflow nesting\n";
+         }
+
+         t_limit_overflow->start();
+         /*
+          * Do not allow the new mapped_box_level to overflow the tag mapped_box_level.
+          * If we want to allow the overflow, we have to add the
+          * overflow ammount to gcw(tag->new).  Such additions
+          * may make the ABR algorithm slower, because more
+          * non-contributing processors would have to be included
+          * in the contributing group (unless ABR keep track of
+          * the non-contributing processors and don't seek tag
+          * histogram from them).
+          */
+         const hier::IntVector allowed_overflow(d_dim, 0);
+         hier::MappedBoxLevel nested_mapped_box_level(d_dim);
+         hier::Connector unnested_to_nested;
+         makeOverflowNestingMap(new_mapped_box_level,
+            new_to_tag,
+            nested_mapped_box_level,
+            unnested_to_nested,
+                                block_number,
+            allowed_overflow);
+         t_use_overflow_map->barrierAndStart();
+         t_modify_connector->start();
+         const hier::MappingConnectorAlgorithm mca;
+         mca.modify(tag_to_new,
+            new_to_tag,
+            unnested_to_nested,
+            &new_mapped_box_level);
+         t_modify_connector->stop();
+         t_use_overflow_map->stop();
+         t_limit_overflow->stop();
+
+         if (s_check_overflow_nesting == 'y') {
+            bool locally_nested = false;
+            bool nested = dlbg_edge_utils.baseNestsInHead(
+                  &locally_nested,
+                  new_mapped_box_level,
+                  tag_mapped_box_level,
+                  allowed_overflow,
+                  hier::IntVector::getZero(d_dim),
+                  hier::IntVector::getZero(d_dim),
+                  &hierarchy->getDomainSearchTree());
+            if (!nested) {
+               TBOX_ERROR(
+                  "Error found."
+                  << "Failed overflow nesting: new mapped_box_level does not nest in tagged mapped_box_level.\n"
+                  << "allowed_overflow = " << allowed_overflow << std::endl
+                  << "Local nestedness = " << locally_nested << std::endl
+                  << "tag_mapped_box_level:\n" << tag_mapped_box_level.format("", 2)
+                  << "new_mapped_box_level:\n" << new_mapped_box_level.format("", 2)
+                  << "tag_to_new:\n" << tag_to_new.format("", 2)
+                  << "new_to_tag:\n" << new_to_tag.format("", 2));
+            }
+         }
+      }
+
+      if (d_enforce_proper_nesting) {
+
+         if (s_print_steps == 'y') {
+            tbox::plog
+            <<
+            "MultiblockGriddingAlgorithm::findRefinementBoxes: enforcing proper nesting\n";
+         }
+         t_enforce_nesting->barrierAndStart();
+
+         hier::Connector unnested_to_nested;
+         /*
+          * Copy the input new_mapped_box_level so we can later connect
+          * new_mapped_box_level to its properly nested version.
+          */
+         hier::MappedBoxLevel nested_mapped_box_level(d_dim);
+         makeProperNestingMap(new_mapped_box_level,
+            tag_to_new,
+            new_to_tag,
+            new_ln,
+            block_number,
+            nested_mapped_box_level,
+            unnested_to_nested);
+         t_use_nesting_map->start();
+         t_modify_connector->start();
+         const hier::MappingConnectorAlgorithm mca;
+         mca.modify(tag_to_new,
+            new_to_tag,
+            unnested_to_nested,
+            &new_mapped_box_level);
+         t_modify_connector->stop();
+         t_use_nesting_map->stop();
+
+         t_enforce_nesting->stop();
+
+         if (tag_ln == d_base_ln && s_check_proper_nesting == 'y') {
+            /*
+             * Tag level will be regridded when we exit the current
+             * recursion if tag_ln is not d_base_ln, so do not check
+             * proper nesting in that case.
+             *
+             * Check that the new mapped_box_level nest in the tag
+             * level (tag_ln).
+             */
+            hier::IntVector required_nesting(d_dim);
+            if (tag_ln > 0) {
+               required_nesting =
+                  hier::IntVector(d_dim, getProperNestingBuffer(tag_ln));
+               required_nesting *= getRatioToCoarserLevel(new_ln);
+            } else {
+               required_nesting =
+                  hierarchy->getPatchDescriptor()->getMaxGhostWidth(d_dim);
+            }
+            bool locally_nests = false;
+            const bool new_nests_in_tag =
+               dlbg_edge_utils.baseNestsInHead(
+                  &locally_nests,
+                  new_mapped_box_level,
+                  tag_mapped_box_level,
+                  required_nesting,
+                  hier::IntVector::getZero(d_dim),
+                  hier::IntVector::getZero(d_dim),
+                  &hierarchy->getPeriodicDomainSearchTree());
+            if (!new_nests_in_tag) {
+               tbox::perr
+               << "MultiblockGriddingAlgorithm: new mapped_box_level\n"
+               << "at ln=" << new_ln
+               << " does not properly nest in\n"
+               << "tag level at tag_ln=" << tag_ln
+               << " by the required nesting buffer of "
+               << required_nesting
+               << ".\nLocal nestingness: " << locally_nests
+               << ".\nWriting MappedBoxLevels out to log file."
+               << std::endl;
+               tbox::plog << "Proper nesting violation with new_mapped_box_level of\n" << new_mapped_box_level.format("N->", 2);
+               tbox::plog << "Proper nesting violation with tag mapped_box_level of\n" << tag_mapped_box_level.format("T->", 2);
+               hier::MappedBoxLevel external(d_dim);
+               hier::Connector tmp_new_to_tag(
+                  new_mapped_box_level,
+                  tag_mapped_box_level,
+                  required_nesting);
+               oca.findOverlaps(tmp_new_to_tag);
+               tbox::plog << "tmp_new_to_tag:\n" << tmp_new_to_tag.format("NT->", 3);
+               hier::Connector new_to_external;
+               dlbg_edge_utils.computeExternalParts(
+                  external,
+                  new_to_external,
+                  tmp_new_to_tag,
+                  -required_nesting,
+                  hierarchy->getDomainSearchTree());
+               tbox::plog << "External parts:\n" << new_to_external.format("NE->", 3);
+               TBOX_ERROR(
+                  "Internal library error: Failed to produce proper nesting.");
+            }
+         }
+      }
+
+      if (d_extend_to_domain_boundary) {
+
+         if (s_print_steps == 'y') {
+            tbox::plog
+            <<
+            "MultiblockGriddingAlgorithm::findRefinementBoxes: extending nodes\n";
+         }
+
+         t_extend_to_domain_boundary->barrierAndStart();
+         extendMappedBoxesToDomainBoundary(
+            new_mapped_box_level,
+            tag_to_new,
+            new_to_tag,
+            hierarchy->getConnector(tag_ln, tag_ln),
+            level->getPhysicalDomain(),
+            extend_ghosts_in_tag_space,
+            *hierarchy,
+            tag_ln);
+         t_extend_to_domain_boundary->stop();
+      }
+
+      bool allow_patches_smaller_than_minimum_size_to_prevent_overlaps
+         = hierarchy->allowPatchesSmallerThanMinimumSize();
+
+      // BTNG: these if-else blocks can be significantly simplified by factoring.
+      if (!allow_patches_smaller_than_minimum_size_to_prevent_overlaps) {
+         if (s_print_steps == 'y') {
+            tbox::plog
+            <<
+            "MultiblockGriddingAlgorithm::findRefinementBoxes: growing boxes\n";
+         }
+         t_extend_within_domain->start();
+         hier::MappedBoxLevel grown_mapped_box_level(d_dim);
+         hier::Connector new_to_grown;
+         makeBoxGrowingMap(
+            new_mapped_box_level,
+            tag_to_new,
+            new_to_tag,
+            tag_ln,
+            block_number,
+            grown_mapped_box_level,
+            new_to_grown,
+            smallest_box_to_refine);
+         t_modify_connector->start();
+         const hier::MappingConnectorAlgorithm mca;
+         mca.modify(tag_to_new,
+            new_to_tag,
+            new_to_grown,
+            &new_mapped_box_level);
+         t_modify_connector->stop();
+         t_extend_within_domain->stop();
+      } else {
+         const hier::IntVector& periodic_dirs(
+            hierarchy->getGridGeometry()->getPeriodicShift(
+               hier::IntVector::getOne(d_dim)));
+
+         bool need_to_grow = false;
+         hier::IntVector min_size(hier::IntVector::getOne(d_dim));
+         for (int i = 0; i < d_dim.getValue(); i++) {
+            if (periodic_dirs(i)) {
+               need_to_grow = true;
+               min_size(i) = smallest_box_to_refine(i);
+            }
+         }
+
+         if (need_to_grow) {
+            t_extend_within_domain->start();
+            hier::MappedBoxLevel grown_mapped_box_level(d_dim);
+            hier::Connector new_to_grown;
+            makeBoxGrowingMap(
+               new_mapped_box_level,
+               tag_to_new,
+               new_to_tag,
+               tag_ln,
+               block_number,
+               grown_mapped_box_level,
+               new_to_grown,
+               min_size);
+            t_modify_connector->start();
+            const hier::MappingConnectorAlgorithm mca;
+            mca.modify(tag_to_new,
+               new_to_tag,
+               new_to_grown,
+               &new_mapped_box_level);
+            t_modify_connector->stop();
+            t_extend_within_domain->stop();
+         }
+      }
+
+      t_box_massage->stop();
+   }
+
+   mpi.Barrier();
+
+   t_find_refinement->stop();
+}
+
+/*
+ *******************************************************************
+ * Load balance a level and refine it to the new index space.
+ *******************************************************************
+ */
+
+void MultiblockGriddingAlgorithm::loadBalanceAndRefineBoxes(
+   hier::MappedBoxLevel& new_mapped_box_level,
+   hier::Connector& tag_to_new,
+   hier::Connector& new_to_tag,
+   const int tag_ln,
+   const tbox::RankGroup& rank_group,
+   const int block_number) const
+{
+   TBOX_ASSERT((tag_ln >= 0)
+      && (tag_ln <= d_mb_hierarchy->getFinestLevelNumber()));
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy(d_mb_hierarchy->getHierarchy(block_number));
+   TBOX_ASSERT(!(hierarchy.isNull()));
+   TBOX_ASSERT(!(hierarchy->getPatchLevel(tag_ln).isNull()));
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim, new_mapped_box_level, *hierarchy);
+
+   const hier::OverlapConnectorAlgorithm oca;
+
+   tbox::SAMRAI_MPI mpi(hierarchy->getDomainMappedBoxLevel().getMPI());
+
+   const int new_ln = tag_ln + 1;
+
+   /*
+    * Start timer for this method.
+    */
+   t_find_refinement->barrierAndStart();
+
+   const hier::MappedBoxLevel& tag_mapped_box_level =
+      *hierarchy->getMappedBoxLevel(tag_ln);
+
+   hier::IntVector ratio(getRatioToCoarserLevel(new_ln));
+
+   if (new_mapped_box_level.getGlobalNumberOfBoxes() > 0) {
+
+      if (d_load_balance) {
+         if (s_print_steps == 'y') {
+            tbox::plog
+            <<
+            "MultiblockGriddingAlgorithm::findRefinementBoxes: load balancing\n";
+         }
+
+         hier::IntVector smallest_box_to_refine(d_dim);
+         hier::IntVector extend_ghosts(d_dim);
+         hier::IntVector largest_patch(d_dim);
+         hier::IntVector smallest_patch(d_dim);
+         // "true" argument: for_building_finer level = true
+         getGriddingParameters(smallest_patch,
+            smallest_box_to_refine,
+            largest_patch,
+            extend_ghosts,
+            *hierarchy,
+            new_ln,
+            true);
+
+         const hier::IntVector smallest_patch_in_tag_space =
+            hier::IntVector::ceiling(smallest_patch,
+                                     hierarchy->getRatioToCoarserLevel(new_ln));
+         const hier::IntVector largest_patch_in_tag_space =
+            largest_patch/hierarchy->getRatioToCoarserLevel(new_ln);
+
+         const hier::IntVector extend_ghosts_in_tag_space =
+            hier::IntVector::ceiling(extend_ghosts,
+                                     hierarchy->getRatioToCoarserLevel(new_ln));
+
+         t_load_balance->barrierAndStart();
+         t_load_balance_setup->start();
+
+         const hier::IntVector& patch_cut_factor =
+            hier::IntVector::getOne(d_dim);
+
+         t_load_balance_setup->stop();
+
+         d_load_balancer->loadBalanceMappedBoxLevel(
+            new_mapped_box_level,
+            new_to_tag,
+            tag_to_new,
+            hierarchy,
+            new_ln,
+            new_to_tag, // FIXME: try using finer as the attractor.
+            tag_to_new, // FIXME: try using finer as the attractor.
+            smallest_patch_in_tag_space,
+            largest_patch_in_tag_space,
+            hierarchy->getDomainMappedBoxLevel(),
+            extend_ghosts_in_tag_space,
+            patch_cut_factor,
+            rank_group);
+
+         t_load_balance->stop();
+
+         if (s_check_connectors == 'y') {
+            tbox::plog << "MultiblockGriddingAlgorithm checking new-tag"
+                       << std::endl;
+            int errs = 0;
+            if (oca.checkOverlapCorrectness(new_to_tag, false, true, true)) {
+               ++errs;
+               tbox::perr << "Error found in new_to_tag!\n";
+            }
+            if (oca.checkOverlapCorrectness(tag_to_new, false, true, true)) {
+               ++errs;
+               tbox::perr << "Error found in tag_to_new!\n";
+            }
+            if (new_to_tag.checkTransposeCorrectness(tag_to_new)) {
+               ++errs;
+               tbox::perr << "Error found in new-tag transpose!\n";
+            }
+            if (errs != 0) {
+               TBOX_ERROR(
+                  "Errors found after using load balance map."
+                  << "new_mapped_box_level:\n" << new_mapped_box_level.format("", 2)
+                  << "tag_mapped_box_level:\n" << tag_mapped_box_level.format("", 2)
+                  << "new_to_tag:\n" << new_to_tag.format("", 2)
+                  << "tag_to_new:\n" << tag_to_new.format("", 2));
+            }
+         }
+      }
+
+      if (d_sequentialize_patch_indices) {
+         if (s_check_connectors == 'y') {
+            tbox::plog << "MultiblockGriddingAlgorithm begin sorting nodes."
+                       << std::endl;
+         }
+         /*
+          * Sequentializing the indices is not required.
+          * But while transitioning between the old global-boxes
+          * approach and the new DLBG approaches, this makes the
+          * indices the same as the patch indices, which
+          * helps in code development and debugging.
+          */
+         sortNodes(new_mapped_box_level,
+            tag_to_new,
+            new_to_tag,
+            false,
+            true);
+         if (s_check_connectors == 'y') {
+            tbox::plog << "MultiblockGriddingAlgorithm end sorting nodes."
+                       << std::endl;
+         }
+      }
+
+      /*
+       * Add periodic image MappedBoxes to new_mapped_box_level and add edges
+       * incident on those nodes.
+       */
+      if (s_check_connectors == 'y') {
+         TBOX_ASSERT(oca.checkOverlapCorrectness(new_to_tag) == 0);
+         TBOX_ASSERT(oca.checkOverlapCorrectness(tag_to_new) == 0);
+      }
+
+      /*
+       * We have been working with new_mapped_box_level in the tag_mapped_box_level's index space.
+       * Now, refine it so we can build the new level.
+       */
+      refineNewMappedBoxLevel(new_mapped_box_level,
+         tag_to_new,
+         new_to_tag,
+         ratio);
+
+      if (s_check_connectors == 'y') {
+         TBOX_ASSERT(oca.checkOverlapCorrectness(new_to_tag) == 0);
+         TBOX_ASSERT(oca.checkOverlapCorrectness(tag_to_new) == 0);
+      }
+
+   } else {
+
+      /*
+       * On return, new_mapped_box_level should be initialized if we generated boxes,
+       * deallocated if we didnt.
+       */
+      new_mapped_box_level.clear();
+
+   }
+
+   mpi.Barrier();
+
+   t_find_refinement->stop();
+}
+
+
+/*
+ ***********************************************************************
+ * Set RankGroups, allocating ranks to blocks based on a fraction of work
+ ***********************************************************************
+ */
+void MultiblockGriddingAlgorithm::setRankGroups(
+   tbox::Array<tbox::RankGroup>& rank_groups,
+   const tbox::Array<int>& work_on_block,
+   const tbox::SAMRAI_MPI& mpi) const
+{
+   const unsigned int nblocks = rank_groups.size();
+   const int num_ranks = mpi.getSize();
+
+   int active_blocks = 0;
+   int total_work = 0;
+   unsigned int max_active_block = tbox::MathUtilities<int>::getMax();
+   for (unsigned int nb = 0; nb < nblocks; nb++) {
+      if (work_on_block[nb]) {
+         active_blocks++;
+         total_work += work_on_block[nb];
+         max_active_block = nb;
+      }
+   }
+
+   if (active_blocks > 1 && num_ranks > active_blocks) {
+
+      int min_rank = 0;
+      int max_rank;
+      for (unsigned int nb = 0; nb < nblocks; nb++) {
+
+         if (work_on_block[nb]) {
+            if (nb != max_active_block) {
+               double work_fraction = (double)work_on_block[nb]/
+                                      (double)total_work;
+
+               double est_ranks = (work_fraction * num_ranks);
+               int procs_for_block = (int)(est_ranks + 0.5) ;
+               if (procs_for_block == 0) {
+                  procs_for_block = 1;
+               }
+
+               max_rank = min_rank + procs_for_block - 1;
+               if (max_rank >= num_ranks) {
+                  max_rank = num_ranks - 1;
+               }
+            } else {
+               max_rank = num_ranks - 1;
+            }
+
+            if (min_rank > max_rank) {
+               min_rank = max_rank;
+            }
+
+            rank_groups[nb].setMinMax(min_rank, max_rank);
+
+            min_rank = max_rank + 1;
+         }
+      }
+   }
+}
+
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void MultiblockGriddingAlgorithm::sortNodes(
+   hier::MappedBoxLevel& new_mapped_box_level,
+   hier::Connector& tag_to_new,
+   hier::Connector& new_to_tag,
+   bool sort_by_corners,
+   bool sequentialize_global_indices) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, new_mapped_box_level);
+
+   t_sort_nodes->start();
+
+   const hier::OverlapConnectorAlgorithm oca;
+   const hier::MappingConnectorAlgorithm mca;
+
+   hier::Connector sorting_map;
+   hier::MappedBoxLevel seq_mapped_box_level(d_dim);
+   hier::MappedBoxLevelConnectorUtils dlbg_edge_utils;
+   dlbg_edge_utils.makeSortingMap(
+      seq_mapped_box_level,
+      sorting_map,
+      new_mapped_box_level,
+      sort_by_corners /* sort nodes by corners */,
+      sequentialize_global_indices /* do not sequentialize indices globally */);
+
+   if (0) {
+      // Check sorting_map before using it.
+      int errs = 0;
+      if (mca.findMappingErrors(sorting_map, 'n')) {
+         ++errs;
+         tbox::perr << "sorting_map is not a valid mapping!\n";
+      }
+      if (oca.checkOverlapCorrectness(sorting_map, false, true, true)) {
+         ++errs;
+         tbox::perr << "Error found in sorting_map!\n";
+      }
+      if (errs != 0) {
+         TBOX_ERROR(
+            "Errors in load balance mapping found."
+            << "unsequentialized mapped_box_level:\n" << new_mapped_box_level.format("", 2)
+            << "sequentialized mapped_box_level:\n" << seq_mapped_box_level.format("", 2)
+            << "sorting_map:\n" << sorting_map.format("", 2));
+      }
+   }
+   t_modify_connector->start();
+   mca.modify(tag_to_new,
+      new_to_tag,
+      sorting_map,
+      &new_mapped_box_level);
+   t_modify_connector->stop();
+   if (0) {
+      // Check result of mapping.
+      int errs = 0;
+      if (oca.checkOverlapCorrectness(tag_to_new, true, false)) {
+         ++errs;
+         tbox::perr << "Error found in tag_to_new!\n";
+      }
+      if (oca.checkOverlapCorrectness(new_to_tag, true, false)) {
+         ++errs;
+         tbox::perr << "Error found in new_to_tag!\n";
+      }
+      if (errs != 0) {
+         TBOX_ERROR(
+            "Errors found after sequentializing nodes."
+            << "new_mapped_box_level:\n" << new_mapped_box_level.format("", 2)
+            << "tag mapped_box_level:\n" << tag_to_new.getBase().format("", 2)
+            << "tag_to_new:\n" << tag_to_new.format("", 2)
+            << "new_to_tag:\n" << new_to_tag.format("", 2));
+      }
+   }
+
+#if 0
+   TBOX_ASSERT(new_to_tag.checkOverlapCorrectness(false, true) == 0);
+   TBOX_ASSERT(tag_to_new.checkOverlapCorrectness(false, true) == 0);
+#endif
+
+   t_sort_nodes->stop();
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void MultiblockGriddingAlgorithm::refineNewMappedBoxLevel(
+   hier::MappedBoxLevel& new_mapped_box_level,
+   hier::Connector& tag_to_new,
+   hier::Connector& new_to_tag,
+   const hier::IntVector& ratio) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim, new_mapped_box_level, ratio);
+
+   hier::MappedBoxSet refined_nodes;
+   hier::MappedBoxContainerUtils::refineMappedBoxSet(
+      refined_nodes,
+      new_mapped_box_level.getMappedBoxes(),
+      ratio);
+   new_mapped_box_level.swapInitialize(
+      refined_nodes,
+      ratio * new_mapped_box_level.getRefinementRatio(),
+      new_mapped_box_level.getMPI());
+
+   new_to_tag.initialize(
+      new_mapped_box_level,
+      new_to_tag.getHead(),
+      ratio * new_to_tag.getConnectorWidth(),
+      new_to_tag.getNeighborhoodSets(),
+      hier::MappedBoxLevel::DISTRIBUTED);
+
+   hier::NeighborhoodSet tag_eto_new;
+   tag_to_new.swapInitialize(
+      tag_to_new.getBase(),
+      new_mapped_box_level,
+      tag_to_new.getConnectorWidth(),
+      tag_eto_new,
+      hier::MappedBoxLevel::DISTRIBUTED);
+   for (hier::NeighborhoodSet::const_iterator ei = tag_eto_new.begin();
+        ei != tag_eto_new.end(); ++ei) {
+      hier::MappedBoxContainerUtils::refineMappedBoxSet(
+         tag_eto_new[ei->first],
+         ei->second,
+         ratio);
+   }
+   tag_to_new.swapInitialize(
+      tag_to_new.getBase(),
+      new_mapped_box_level,
+      tag_to_new.getConnectorWidth(),
+      tag_eto_new,
+      hier::MappedBoxLevel::DISTRIBUTED);
+#if 0
+   const hier::OverlapConnectorAlgorithm oca;
+   TBOX_ASSERT(oca.checkOverlapCorrectness(tag_to_new) == 0);
+   TBOX_ASSERT(oca.checkOverlapCorrectness(new_to_tag) == 0);
+#endif
+}
+
+/*
+ *************************************************************************
+ *
+ * Extend nodes to domain boundary if they are too close.
+ *
+ *************************************************************************
+ */
+
+void MultiblockGriddingAlgorithm::extendMappedBoxesToDomainBoundary(
+   hier::MappedBoxLevel& new_mapped_box_level,
+   hier::Connector& tag_to_new,
+   hier::Connector& new_to_tag,
+   const hier::Connector& tag_to_tag,
+   const hier::BoxArray& physical_domain_array,
+   const hier::IntVector& extend_ghosts,
+   const hier::PatchHierarchy& hierarchy,
+   const int new_ln) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, new_mapped_box_level);
+
+   (void)hierarchy;
+   (void)new_ln;
+
+   tbox::SAMRAI_MPI mpi(new_mapped_box_level.getMPI());
+
+   const hier::BoxList physical_domain_list(physical_domain_array);
+   /*
+    * Extend boxes to domain boundary if they are too close to one.  I
+    * think there is no need to modify connectivities when a box is
+    * extended to the domain boundary.  There is no increased overlap
+    * to a finer level, because the finer level already nests in the
+    * nodes being extended.  There is increased overlap with the
+    * coarser level, but it should not result in additional edges,
+    * because there would not be enough room for an unseen coarse MappedBox
+    * to live in the small gap across which the MappedBox is being extended.
+    */
+   const hier::MappedBoxSet& before_nodes =
+      new_mapped_box_level.getMappedBoxes();
+
+   hier::MappedBoxLevel after_mapped_box_level(d_dim);
+   after_mapped_box_level.initialize(
+      new_mapped_box_level.getRefinementRatio(),
+      new_mapped_box_level.getMPI());
+   hier::NeighborhoodSet before_eto_after, after_eto_before;
+   int n_local_nodes_extended = 0;
+   for (hier::MappedBoxSet::const_iterator
+        nn = before_nodes.begin(); nn != before_nodes.end(); ++nn) {
+      const hier::MappedBox& before_mapped_box = *nn;
+      hier::MappedBox after_mapped_box = before_mapped_box;
+      bool extended =
+         hier::BoxUtilities::extendBoxToDomainBoundary(
+            after_mapped_box.getBox(),
+            physical_domain_list,
+            extend_ghosts);
+      if (extended) {
+         ++n_local_nodes_extended;
+      }
+      after_mapped_box_level.addMappedBox(after_mapped_box);
+      before_eto_after[
+         before_mapped_box.getGlobalId()].insert(after_mapped_box);
+      after_eto_before[
+         after_mapped_box.getGlobalId()].insert(before_mapped_box);
+   }
+   hier::Connector before_to_after, after_to_before;
+   before_to_after.initialize(
+      new_mapped_box_level,
+      after_mapped_box_level,
+      hier::IntVector::getZero(d_dim),
+      before_eto_after);
+   before_to_after.setConnectorType(hier::Connector::BASE_GENERATED);
+   after_to_before.initialize(
+      after_mapped_box_level,
+      new_mapped_box_level,
+      hier::IntVector::getZero(d_dim),
+      after_eto_before);
+   after_to_before.setConnectorType(hier::Connector::BASE_GENERATED);
+
+   int n_global_nodes_extended;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(
+         &n_local_nodes_extended,
+         &n_global_nodes_extended,
+         1,
+         MPI_INT,
+         MPI_SUM);
+   } else {
+      n_global_nodes_extended = n_local_nodes_extended;
+   }
+   if (n_global_nodes_extended > 0) {
+      /*
+       * If there are changed nodes, modify the tag<->new Connectors.
+       * Because the modified nodes were extended and the new nodes
+       * may not sufficiently nest in the tag mapped_box_level, tag<->new may be
+       * missing some edges.  Fix this using a peer bridge.
+       */
+      const hier::MappingConnectorAlgorithm mca;
+      mca.modify(tag_to_new,
+         new_to_tag,
+         before_to_after,
+         &new_mapped_box_level);
+      hier::Connector tmp_new_to_tag = new_to_tag;
+      hier::Connector tmp_tag_to_new = tag_to_new;
+      const hier::OverlapConnectorAlgorithm oca;
+      oca.bridge(new_to_tag,
+         tag_to_new,
+         tmp_new_to_tag,
+         tag_to_tag,
+         tag_to_tag,
+         tmp_tag_to_new);
+      oca.shrinkConnectorWidth(new_to_tag, tmp_new_to_tag.getConnectorWidth());
+      oca.shrinkConnectorWidth(tag_to_new, tmp_tag_to_new.getConnectorWidth());
+#if 0
+      TBOX_WARNING("Performing extensive error checking due to using new code!");
+      TBOX_ASSERT(new_to_tag.checkOverlapCorrectness() == 0);
+      TBOX_ASSERT(tag_to_new.checkOverlapCorrectness() == 0);
+#endif
+   }
+}
+
+/*
+ *************************************************************************
+ * Make a map that can be used to enforce overflow nesting.
+ *************************************************************************
+ */
+
+void MultiblockGriddingAlgorithm::makeOverflowNestingMap(
+   const hier::MappedBoxLevel& unnested_mapped_box_level,
+   const hier::Connector& unnested_to_nominal,
+   hier::MappedBoxLevel& nested_mapped_box_level,
+   hier::Connector& unnested_to_nested,
+   const int block_num,
+   const hier::IntVector& allowed_overflow) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS3(d_dim,
+      unnested_mapped_box_level,
+      nested_mapped_box_level,
+      allowed_overflow);
+
+   (void)unnested_mapped_box_level;
+
+   tbox::Pointer<hier::PatchHierarchy> hierarchy(d_mb_hierarchy->getHierarchy(block_num));
+
+   t_make_overflow_map->start();
+
+   hier::MappedBoxLevel violator_mapped_box_level(d_dim);
+   hier::Connector unnested_to_violator;
+   t_make_overflow_map_compute->start();
+   hier::MappedBoxLevelConnectorUtils edge_utils;
+   t_compute_external_parts->start();
+   edge_utils.computeExternalParts(
+      violator_mapped_box_level,
+      unnested_to_violator,
+      unnested_to_nominal,
+      allowed_overflow,
+      hierarchy->getDomainSearchTree());
+   t_compute_external_parts->stop();
+   t_make_overflow_map_compute->stop();
+
+   TBOX_ASSERT(unnested_to_violator.isLocal());
+
+   t_make_overflow_map_convert->start();
+   edge_utils.makeRemainderMap(
+      nested_mapped_box_level,
+      unnested_to_nested,
+      unnested_to_violator);
+   t_make_overflow_map_convert->stop();
+   t_make_overflow_map->stop();
+}
+
+/*
+ *************************************************************************
+ * Make a map that can be used to enforce proper nesting.
+ * @param unnested_ln Level number for refinenement ratio of unnested_mapped_box_level.
+ *************************************************************************
+ */
+
+void MultiblockGriddingAlgorithm::makeProperNestingMap(
+   const hier::MappedBoxLevel& unnested_mapped_box_level,
+   const hier::Connector& hierarchy_to_unnested,
+   const hier::Connector& unnested_to_hierarchy,
+   const int unnested_ln,
+   const int block_num,
+   hier::MappedBoxLevel& nested_mapped_box_level,
+   hier::Connector& unnested_to_nested) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS3(d_dim,
+      unnested_mapped_box_level,
+      nested_mapped_box_level,
+      nested_mapped_box_level);
+
+   t_make_nesting_map->start();
+
+   hier::Connector unnested_to_violator;
+   hier::MappedBoxLevel violator(d_dim);
+   t_make_nesting_map_compute->start();
+   computeNestingViolator(unnested_mapped_box_level,
+      violator,
+      unnested_to_violator,
+      unnested_to_hierarchy,
+      hierarchy_to_unnested,
+      unnested_ln,
+      block_num);
+   t_make_nesting_map_compute->stop();
+
+
+   /*
+    * unnested_to_violator is the Connector from the nodes
+    * that violate nesting to their violating parts.
+    * Convert it to the mapping from unnested to nested.
+    */
+   const hier::MappedBoxLevelConnectorUtils edge_utils;
+   t_make_nesting_map_convert->start();
+   edge_utils.makeRemainderMap(
+      nested_mapped_box_level,
+      unnested_to_nested,
+      unnested_to_violator);
+   t_make_nesting_map_convert->stop();
+
+   t_make_nesting_map->stop();
+}
+
+/*
+ *************************************************************************
+ * Make a map from a mapped_box_level to parts of that mapped_box_level
+ * that violate proper nesting.
+ *
+ * The violating mapped_boxes are found by comparing candidate
+ * mapped_boxes to d_to_nesting_complement's head MappedBoxLevel.  Boxes
+ * inside the nesting complement violate nesting.
+ *************************************************************************
+ */
+void MultiblockGriddingAlgorithm::computeNestingViolator(
+   const hier::MappedBoxLevel& candidate,
+   hier::MappedBoxLevel& violator,
+   hier::Connector& candidate_to_violator,
+   const hier::Connector& candidate_to_hierarchy,
+   const hier::Connector& hierarchy_to_candidate,
+   const int candidate_ln,
+   const int block_number) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim, candidate, violator);
+
+   const hier::IntVector& zero_vector(hier::IntVector::getZero(d_dim));
+
+   // Check requirements on arguments.
+   TBOX_ASSERT(candidate_to_hierarchy.getRatio() ==
+      hier::IntVector::getOne(d_dim));
+   TBOX_ASSERT(hierarchy_to_candidate.getRatio() ==
+      hier::IntVector::getOne(d_dim));
+
+   t_compute_nesting_violator->start();
+
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy(d_mb_hierarchy->getHierarchy(block_number));
+
+   const hier::MappedBoxLevelConnectorUtils edge_utils;
+   const hier::OverlapConnectorAlgorithm oca;
+
+   const hier::MappedBoxSet& candidate_mapped_boxes = candidate.getMappedBoxes();
+
+   /*
+    * Bridge candidate to d_nesting_complement.
+    */
+   hier::Connector candidate_to_complement, complement_to_candidate;
+   oca.bridge(candidate_to_complement,
+      complement_to_candidate,
+      candidate_to_hierarchy,
+      d_to_nesting_complement[block_number][candidate_ln - 1],
+      d_from_nesting_complement[block_number][candidate_ln - 1],
+      hierarchy_to_candidate);
+
+   edge_utils.computeInternalParts(
+      violator,
+      candidate_to_violator,
+      candidate_to_complement,
+      zero_vector,
+      hierarchy->getDomainSearchTree());
+   hier::NeighborhoodSet candidate_eto_violator;
+   candidate_to_violator.swapInitialize(
+      candidate_to_violator.getBase(),
+      candidate_to_violator.getHead(),
+      candidate_to_violator.getConnectorWidth(),
+      candidate_eto_violator);
+   /*
+    * Above step ignored the domain complement components of nesting
+    * definition (by necessity).  Where the candidate overlaps
+    * with the domain complement, it violates nesting.
+    */
+   tbox::Pointer<hier::MappedBoxTree> refined_domain_complement_tree =
+      d_domain_complement_tree[block_number].createRefinedTree(candidate.getRefinementRatio());
+   for (hier::MappedBoxSet::const_iterator ni = candidate_mapped_boxes.begin();
+        ni != candidate_mapped_boxes.end(); ++ni) {
+      const hier::MappedBox& cmb = *ni;
+      hier::BoxList addl_violators(cmb.getBox());
+      addl_violators.intersectBoxes(*refined_domain_complement_tree);
+      if (!addl_violators.isEmpty()) {
+         if (candidate_eto_violator.find(cmb.getGlobalId()) !=
+             candidate_eto_violator.end()) {
+            /*
+             * Remove parts that we already know are non-nesting.
+             * Leftovers are non-nesting parts not found using
+             * candidate_to_complement.
+             */
+            hier::Connector::NeighborSet& current_violators =
+               candidate_eto_violator[cmb.getGlobalId()];
+            for (hier::Connector::NeighborSet::const_iterator na =
+                    current_violators.begin();
+                 na != current_violators.end() && !addl_violators.isEmpty();
+                 ++na) {
+               addl_violators.removeIntersections(na->getBox());
+            }
+            if (!addl_violators.isEmpty()) {
+               for (hier::BoxList::Iterator bi(addl_violators); bi; bi++) {
+                  hier::MappedBoxSet::iterator new_violator = violator.addBox(
+                        *bi);
+                  current_violators.insert(*new_violator);
+               }
+            }
+         }
+      }
+   }
+
+   candidate_to_violator.swapInitialize(
+      candidate_to_violator.getBase(),
+      candidate_to_violator.getHead(),
+      candidate_to_violator.getConnectorWidth(),
+      candidate_eto_violator);
+
+   t_compute_nesting_violator->stop();
+}
+
+/*
+ *************************************************************************
+ * Precompute data used to define proper nesting.  Data is associated
+ * with level number ln, to be used for constructing level number ln+1.
+ *
+ * If ln > d_base_ln, assume data at ln-1 is already set.
+ *************************************************************************
+ */
+
+void MultiblockGriddingAlgorithm::computeNestingData(
+   const int ln,
+   const int block_number)
+{
+   TBOX_ASSERT(d_base_ln >= 0 && ln >= d_base_ln);
+
+   const hier::IntVector& zero_vector(hier::IntVector::getZero(d_dim));
+
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy(d_mb_hierarchy->getHierarchy(block_number));
+
+   const hier::MappedBoxTree& domain_search_tree = hierarchy->getDomainSearchTree();
+
+   const hier::MappedBoxLevelConnectorUtils edge_utils;
+   const hier::OverlapConnectorAlgorithm oca;
+
+   hier::IntVector tmp_gcw(d_dim);
+
+   if (ln == d_base_ln) {
+      /*
+       * At the base level, nesting domain is domain of d_base_ln,
+       * shrunken by d_proper_nesting_buffer[d_base_ln].
+       */
+      hier::MappedBoxLevel& proper_nesting_complement =
+         d_proper_nesting_complement[block_number][ln];
+      const hier::Connector& peer_connector =
+         hierarchy->getConnector(ln, ln);
+
+      edge_utils.computeExternalParts(
+         proper_nesting_complement,
+         d_to_nesting_complement[block_number][ln],
+         peer_connector,
+         hier::IntVector(d_dim, -getProperNestingBuffer(ln)),
+         hierarchy->getDomainSearchTree());
+
+      d_from_nesting_complement[block_number][ln].initializeToLocalTranspose(
+         d_to_nesting_complement[block_number][ln]);
+
+      /*
+       * computeExternalParts neglected parts of the proper nesting
+       * complement that are outside the domain (by necessity).  We
+       * must also build a search tree of the domain's complement which
+       * will be used to detect non-nesting cells lying outside the
+       * domain.
+       */
+      hier::Box universe(hierarchy->getDomainMappedBoxLevel().getGlobalBoundingBox());
+      universe.grow(hier::IntVector::getOne(d_dim));
+      hier::BoxList domain_complement_list(universe);
+      domain_complement_list.removeIntersections(domain_search_tree);
+      std::vector<hier::MappedBox> domain_complement_vector;
+      hier::MappedBoxContainerUtils::convertBoxListToMappedBoxVector(domain_complement_vector,
+            domain_complement_list);
+      d_domain_complement_tree[block_number].generateTree(domain_complement_vector);
+
+   } else {
+
+      TBOX_ASSERT(d_to_nesting_complement[block_number][ln - 1].isInitialized());
+
+      /*
+       * How to build d_proper_nesting_complement[ln] and connect it to level ln:
+       *
+       *                  (new
+       *               Connectors)
+       |
+       *            Mapped  |   Proper
+       *              box   |   nesting
+       *            levels  | complements
+       |    |     |
+       *               v    v     v
+       *              ln <-----> ln
+       *               ^        ^
+       |       /
+       |      /
+       |     /
+       * (existing     |    / <--(temporary
+       * Connectors)--> |   /     Connectors)
+       |  /
+       | /
+       |/
+       *               v
+       *            ln-1 <-----> ln-1
+       *                    ^
+       |
+       *                (existing
+       *               Connectors)
+       *
+       * We have existing Connectors between ln and ln-1 and also between
+       * level ln-1 and the nesting complement at ln-1.
+       *
+       * 1. Build the complement at ln from the complement at ln-1.
+       *
+       * 2. Build the temporary Connector from level ln-1 to
+       *   complements at ln by using the fact that the complement at ln
+       *   is similar to the one at ln-1.
+       *
+       * 3. Bridge for the new Connector from level ln to the
+       *   complement at ln, using the temporary Connector.
+       */
+
+      /*
+       * 1. Build d_proper_nesting_complement[ln] from d_proper_nesting_complement[ln-1].
+       */
+      d_proper_nesting_complement[block_number][ln].initialize(
+         hierarchy->getMappedBoxLevel(ln)->getRefinementRatio(),
+         d_to_nesting_complement[block_number][ln - 1].getMPI());
+      const hier::MappedBoxSet& lnm1_complement_mapped_boxes =
+         d_proper_nesting_complement[block_number][ln - 1].getMappedBoxes();
+      for (hier::MappedBoxSet::const_iterator ni =
+              lnm1_complement_mapped_boxes.begin();
+           ni != lnm1_complement_mapped_boxes.end(); ++ni) {
+         hier::MappedBox tmp_mapped_box = *ni;
+         TBOX_ASSERT(!tmp_mapped_box.isPeriodicImage());
+         tmp_mapped_box.getBox().refine(getRatioToCoarserLevel(ln));
+         tmp_mapped_box.getBox().grow(
+            hier::IntVector(d_dim, getProperNestingBuffer(ln)));
+         d_proper_nesting_complement[block_number][ln].addMappedBox(
+            tmp_mapped_box);
+      }
+
+      /*
+       * 2. Temporarily connect level ln-1 and d_proper_nesting_complement[ln].
+       */
+      tmp_gcw = d_to_nesting_complement[block_number][ln - 1].getConnectorWidth();
+      tmp_gcw -= hier::IntVector::ceiling(
+            hier::IntVector(d_dim, getProperNestingBuffer(ln - 1)),
+            getRatioToCoarserLevel(ln));
+      hier::NeighborhoodSet lnm1_eto_ln_complement;
+      const hier::NeighborhoodSet& lnm1_eto_lnm1_complement =
+         d_to_nesting_complement[block_number][ln - 1].getNeighborhoodSets();
+      for (hier::NeighborhoodSet::const_iterator ei = lnm1_eto_lnm1_complement.begin();
+           ei != lnm1_eto_lnm1_complement.end(); ++ei) {
+         const hier::Connector::NeighborSet& lnm1_nabrs = ei->second;
+         hier::Connector::NeighborSet& ln_nabrs =
+            lnm1_eto_ln_complement[ei->first];
+         for (hier::Connector::NeighborSet::const_iterator na =
+                 lnm1_nabrs.begin();
+              na != lnm1_nabrs.end(); ++na) {
+            hier::MappedBox tmp_mapped_box = *na;
+            tmp_mapped_box.getBox().refine(getRatioToCoarserLevel(ln));
+            tmp_mapped_box.getBox().grow(
+               hier::IntVector(d_dim, getProperNestingBuffer(ln)));
+            ln_nabrs.insert(ln_nabrs.end(), tmp_mapped_box);
+         }
+      }
+      tmp_gcw *= getRatioToCoarserLevel(ln);
+      hier::Connector lnm1_to_ln_complement;
+      lnm1_to_ln_complement.swapInitialize(
+         *hierarchy->getMappedBoxLevel(ln - 1),
+         d_proper_nesting_complement[block_number][ln],
+         zero_vector,
+         lnm1_eto_ln_complement);
+      lnm1_to_ln_complement.setConnectorType(hier::Connector::COMPLETE_OVERLAP);
+      hier::Connector ln_complement_to_lnm1(
+         d_proper_nesting_complement[block_number][ln],
+         *hierarchy->getMappedBoxLevel(ln - 1),
+         zero_vector,
+         d_from_nesting_complement[block_number][ln - 1].getNeighborhoodSets(),
+         hier::MappedBoxLevel::DISTRIBUTED);
+      ln_complement_to_lnm1.setConnectorType(hier::Connector::COMPLETE_OVERLAP);
+
+      /*
+       * 3. Bridge for Connector between level ln and d_proper_nesting_complement[ln].
+       */
+      oca.bridge(d_to_nesting_complement[block_number][ln],
+         d_from_nesting_complement[block_number][ln],
+         hierarchy->getConnector(ln, ln - 1),
+         lnm1_to_ln_complement,
+         ln_complement_to_lnm1,
+         hierarchy->getConnector(ln - 1, ln),
+         hierarchy->getRequiredConnectorWidth(ln - 1, ln));
+   }
+}
+
+/*
+ *************************************************************************
+ * Make a map that can be used to grow a box within the domain where
+ * necessary.
+ *************************************************************************
+ */
+
+void MultiblockGriddingAlgorithm::makeBoxGrowingMap(
+   const hier::MappedBoxLevel& orig_mapped_box_level,
+   const hier::Connector& hierarchy_to_orig,
+   const hier::Connector& orig_to_hierarchy,
+   const int ln,
+   const int block_number,
+   hier::MappedBoxLevel& grown_mapped_box_level,
+   hier::Connector& orig_to_grown,
+   const hier::IntVector& min_size) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS3(d_dim,
+      orig_mapped_box_level,
+      grown_mapped_box_level,
+      min_size);
+
+   const hier::OverlapConnectorAlgorithm oca;
+
+   const hier::IntVector& zero_vec = hier::IntVector::getZero(d_dim);
+   const hier::IntVector& one_vec = hier::IntVector::getOne(d_dim);
+
+   const hier::MappedBoxSet& orig_mapped_boxes =
+      orig_mapped_box_level.getMappedBoxes();
+   const hier::Connector& hierarchy_to_nesting_complement =
+      d_to_nesting_complement[block_number][ln];
+   const hier::Connector& nesting_complement_to_hierarchy =
+      d_from_nesting_complement[block_number][ln];
+
+   hier::Connector orig_to_nesting_complement;
+   oca.bridge(
+      orig_to_nesting_complement,
+      orig_to_hierarchy,
+      hierarchy_to_nesting_complement,
+      nesting_complement_to_hierarchy,
+      hierarchy_to_orig);
+
+   grown_mapped_box_level.initialize(
+      orig_mapped_box_level.getRefinementRatio(),
+      orig_mapped_box_level.getMPI());
+
+   hier::NeighborhoodSet orig_eto_grown;
+
+   /*
+    * Above step ignored the domain complement components of nesting
+    * definition (by necessity).  We must add the domain's complement
+    * to neighbors in candidate_to_complement.
+    */
+   tbox::Pointer<hier::MappedBoxTree> refined_domain_complement_tree =
+      d_domain_complement_tree[block_number].createRefinedTree(
+         orig_mapped_box_level.getRefinementRatio());
+
+   std::vector<hier::MappedBox> tmp_mapped_box_vector;
+   tmp_mapped_box_vector.reserve(10);
+
+   for (hier::MappedBoxSet::const_iterator ni = orig_mapped_boxes.begin();
+        ni != orig_mapped_boxes.end(); ++ni) {
+      const hier::MappedBox& omb = *ni;
+      TBOX_ASSERT(!omb.isPeriodicImage());
+
+      /*
+       * Build the domain complement as seen in omb's locality,
+       * consisting of omb's neighbors in orig_to_nesting_complement
+       * and the domain's complement.
+       */
+
+      hier::BoxList local_nesting_complement;
+      if (orig_to_nesting_complement.hasNeighborSet(omb.getLocalId())) {
+         hier::MappedBoxContainerUtils::convertMappedBoxSetToBoxList(
+            local_nesting_complement,
+            orig_to_nesting_complement.getNeighborSet(omb.getLocalId()));
+      }
+
+      hier::Box box = omb.getBox();
+      box.grow(one_vec);
+      refined_domain_complement_tree->findOverlapMappedBoxes(
+         tmp_mapped_box_vector,
+         box);
+      if (!tmp_mapped_box_vector.empty()) {
+         hier::MappedBoxContainerUtils::convertMappedBoxVectorToBoxList(
+               local_nesting_complement,
+               tmp_mapped_box_vector);
+         tmp_mapped_box_vector.clear();
+      }
+
+      hier::MappedBox grown_mapped_box = omb;
+      hier::BoxUtilities::growBoxWithinDomain(
+         grown_mapped_box.getBox(),
+         local_nesting_complement,
+         min_size);
+
+      if (omb.getBox() != grown_mapped_box.getBox()) {
+         grown_mapped_box_level.addMappedBox(grown_mapped_box);
+         orig_eto_grown[omb.getGlobalId()].insert(grown_mapped_box);
+      } else {
+         grown_mapped_box_level.addMappedBox(omb);
+      }
+
+   }
+
+   orig_to_grown.swapInitialize(
+      orig_mapped_box_level,
+      grown_mapped_box_level,
+      zero_vec,
+      orig_eto_grown);
+   orig_to_grown.setConnectorType(hier::Connector::MAPPING);
+}
+
+/*
+ *************************************************************************
+ *
+ * Set patch size and ghost cell information needed to create new
+ * mesh levels.  The maximum number of ghost cells over all variables
+ * is used to compute the smallest patch size allowed and the extent to
+ * which patches may be extended to touch the physical boundary.  This
+ * avoids problems in setting ghost cell data that may occur when ghost
+ * cell regions intersect the physical boundary in strange ways.
+ *
+ *************************************************************************
+ */
+
+void MultiblockGriddingAlgorithm::getGriddingParameters(
+   hier::IntVector& smallest_patch,
+   hier::IntVector& smallest_box_to_refine,
+   hier::IntVector& largest_patch,
+   hier::IntVector& extend_ghosts,
+   const hier::PatchHierarchy& hierarchy,
+   const int level_number,
+   const bool for_building_finer) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(d_dim,
+      smallest_patch,
+      smallest_box_to_refine,
+      largest_patch,
+      extend_ghosts);
+
+   TBOX_ASSERT((level_number >= 0) && (level_number < d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels()));
+
+   /*
+    * Determine maximum ghost cell width needed over all variables
+    * currently known to the patch descriptor, and set the smallest
+    * patch size.  The maximum number of ghosts is multiplied by the
+    * error coarsen ratio (which should always be 1 unless regridding
+    * uses error estimation).  This assures that when levels are
+    * coarsened during error estimation, the coarser level patches
+    * will meet the ghost cell constraint.
+    */
+   bool allow_patches_smaller_than_ghost_width =
+      hierarchy.allowPatchesSmallerThanGhostWidth();
+   smallest_patch = getSmallestPatchSize(level_number);
+   hier::IntVector max_ghosts(
+      hierarchy.getPatchDescriptor()->getMaxGhostWidth(d_dim));
+   max_ghosts = max_ghosts * d_tag_init_strategy->getErrorCoarsenRatio();
+   smallest_patch = getSmallestPatchSize(level_number);
+   if (!allow_patches_smaller_than_ghost_width) {
+      smallest_patch.max(max_ghosts);
+   } else {
+      const hier::IntVector& periodic_dirs(
+         hierarchy.getGridGeometry()->getPeriodicShift(hier::IntVector::getOne(
+               d_dim)));
+
+      for (int i = 0; i < d_dim.getValue(); i++) {
+         if (periodic_dirs(i)) {
+            smallest_patch(i) =
+               tbox::MathUtilities<int>::Max(smallest_patch(i), max_ghosts(i));
+         }
+      }
+   }
+
+   /*
+    * Set largest patch size.
+    */
+   largest_patch = getLargestPatchSize(level_number);
+
+   /*
+    * Following if-check prevents changing a negative largest_patch
+    * bacause TreeLoadBalancer interprets the non-negative value as
+    * dissabling the upper limit on patch size.
+    */
+   if (largest_patch > hier::IntVector::getZero(d_dim)) {
+      largest_patch.max(smallest_patch);
+   }
+
+   /*
+    * Set the smallest box to refine based on the number of cells that
+    * coarsened patches must accomodate to meet ghost cell needs of variables.
+    * On the finest level, the smallest box to refine is the smallest patch.
+    * On coarser levels, it is a function of the error coarsen ratio and
+    * the ratio to the next finer level.
+    *
+    * If we are accessing gridding parameters for a level that is being
+    * reconstructed, the smallest box to refine is not applicable so we
+    * set it to -1 to indicate an invalid entry in case it is used.
+    */
+   if (for_building_finer) {
+
+      smallest_box_to_refine = smallest_patch;
+
+      smallest_box_to_refine /= getRatioToCoarserLevel(level_number);
+      const hier::IntVector den(
+         getRatioToCoarserLevel(level_number)
+         / d_tag_init_strategy->getErrorCoarsenRatio());
+      const hier::IntVector sz(hier::IntVector::ceiling(max_ghosts, den));
+      smallest_box_to_refine.max(sz);
+
+   } else {
+
+      smallest_box_to_refine = hier::IntVector(d_dim, -1);
+
+   }
+
+   /*
+    * Determine number of cells box may be extended to physical
+    * domain boundary to accomodate ghost cells.
+    */
+   extend_ghosts = max_ghosts;
+
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+
+void MultiblockGriddingAlgorithm::warnIfDomainTooSmallInPeriodicDir(
+   const hier::IntVector& smallest_patch_size,
+   const hier::IntVector& domain_bounding_box_size) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim,
+      smallest_patch_size,
+      domain_bounding_box_size);
+
+   const hier::PeriodicShiftCatalog* shift_catalog =
+      hier::PeriodicShiftCatalog::getCatalog(d_dim);
+   if (shift_catalog->isPeriodic()) {
+      hier::IntVector min_nonzero_shift(d_dim, tbox::MathUtilities<int>::getMax());
+      for (int n = 1; n < shift_catalog->getNumberOfShifts(); ++n) {
+         const hier::IntVector& shift(shift_catalog->shiftNumberToShiftDistance(n));
+         for (int d = 0; d < d_dim.getValue(); ++d) {
+            const int shift_mag = tbox::MathUtilities<int>::Abs(shift(d));
+            if (min_nonzero_shift(d) < shift_mag) {
+               min_nonzero_shift = hier::IntVector(d_dim, shift_mag);
+            }
+         }
+      }
+      TBOX_ASSERT(domain_bounding_box_size >= smallest_patch_size);
+      if (domain_bounding_box_size == smallest_patch_size) {
+         TBOX_ERROR("Domains should be bigger than smallest patch size in\n"
+            << "any periodic index direction or bad things will happen\n"
+            << "with Connector data and overlap computations.\n"
+            << "Domain bounding box size = " << domain_bounding_box_size
+            << "\nSmallest patch size = " << smallest_patch_size << "\n");
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ * Print out all attributes of class instance for debugging.
+ *
+ *************************************************************************
+ */
+
+void MultiblockGriddingAlgorithm::printClassData(
+   std::ostream& os) const
+{
+   os << "\nMultiblockGriddingAlgorithm::printClassData..." << std::endl;
+   os << "   static data members:" << std::endl;
+   for (int d = 0; d < tbox::Dimension::MAXIMUM_DIMENSION_VALUE; d++) {
+      os << "      (*s_tag_indx)[" << d << "] = "
+      << (*s_tag_indx)[d] << std::endl;
+      os << "      (*s_buf_tag_indx)[" << d << "] = "
+      << (*s_buf_tag_indx)[d] << std::endl;
+   }
+   os << "MultiblockGriddingAlgorithm: this = "
+      << (MultiblockGriddingAlgorithm *)this << std::endl;
+   os << "d_object_name = " << d_object_name << std::endl;
+   os << "d_tag_init_strategy = "
+      << (TagAndInitializeStrategy *)d_tag_init_strategy << std::endl;
+   os << "d_box_generator = "
+      << (BoxGeneratorStrategy *)d_box_generator << std::endl;
+   os << "d_load_balancer = "
+      << (LoadBalanceStrategy *)d_load_balancer << std::endl;
+   os << "d_load_balancer0 = "
+      << (LoadBalanceStrategy *)d_load_balancer0 << std::endl;
+   os << "d_tag = " << d_tag.getPointer() << std::endl;
+   os << "d_tag_indx = " << d_tag_indx << std::endl;
+   os << "d_buf_tag_indx = " << d_buf_tag_indx << std::endl;
+   os << "d_true_tag = " << d_true_tag << std::endl;
+   os << "d_false_tag = " << d_false_tag << std::endl;
+   os << "d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels() = " << d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels() << std::endl;
+
+   int ln;
+
+   os << "d_efficiency_tolerance..." << std::endl;
+   for (ln = 0; ln < d_efficiency_tolerance.getSize(); ln++) {
+      os << "    d_efficiency_tolerance[" << ln << "] = "
+      << d_efficiency_tolerance[ln] << std::endl;
+   }
+   os << "d_combine_efficiency..." << std::endl;
+   for (ln = 0; ln < d_combine_efficiency.getSize(); ln++) {
+      os << "    d_combine_efficiency[" << ln << "] = "
+      << d_combine_efficiency[ln] << std::endl;
+   }
+
+}
+
+/*
+ *************************************************************************
+ *
+ * Write out class version number and data members to database.
+ *
+ *************************************************************************
+ */
+
+void MultiblockGriddingAlgorithm::putToDatabase(
+   tbox::Pointer<tbox::Database> db)
+{
+   TBOX_ASSERT(!db.isNull());
+
+   db->putInteger("ALGS_GRIDDING_ALGORITHM_VERSION",
+      ALGS_GRIDDING_ALGORITHM_VERSION);
+
+   db->putInteger("d_true_tag", d_true_tag);
+   db->putInteger("d_false_tag", d_false_tag);
+   db->putInteger("d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels()", d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels());
+
+   TBOX_ASSERT(PATCHLEVEL_DATANAME_BUFSIZE > (5 + 1 + 4 + 1));
+
+   db->putDoubleArray("d_efficiency_tolerance", d_efficiency_tolerance);
+   db->putDoubleArray("d_combine_efficiency", d_combine_efficiency);
+
+   db->putBool("d_sequentialize_patch_indices", d_sequentialize_patch_indices);
+}
+
+/*
+ *************************************************************************
+ *
+ * If simulation is not from restart, read data from input database.
+ * Otherwise, override data members initialized from restart with
+ * values in the input database.
+ *
+ *************************************************************************
+ */
+
+void MultiblockGriddingAlgorithm::getFromInput(
+   tbox::Pointer<tbox::Database> db,
+   bool is_from_restart)
+{
+   TBOX_ASSERT(!db.isNull());
+
+   NULL_USE(is_from_restart);
+
+   if (s_check_connectors == 0) {
+      s_check_overflow_nesting = 'n';
+      s_check_proper_nesting = 'n';
+      s_check_connectors = 'n';
+      s_print_mapped_box_level_hierarchy = 'n';
+      s_print_steps = 'n';
+   }
+
+   s_check_overflow_nesting =
+      db->getCharWithDefault("check_overflow_nesting", s_check_overflow_nesting);
+   s_check_proper_nesting =
+      db->getCharWithDefault("check_proper_nesting", s_check_proper_nesting);
+   s_check_connectors =
+      db->getCharWithDefault("check_connectors", s_check_connectors);
+   s_print_mapped_box_level_hierarchy =
+      db->getCharWithDefault("print_mapped_box_level_hierarchy",
+         s_print_mapped_box_level_hierarchy);
+   s_print_steps =
+      db->getCharWithDefault("print_steps", s_print_steps);
+
+
+   TBOX_ASSERT(PATCHLEVEL_DATANAME_BUFSIZE > (5 + 1 + 4 + 1));
+
+   /*
+    * Read input for efficiency tolerance.
+    */
+
+   if (db->keyExists("efficiency_tolerance")) {
+      d_efficiency_tolerance = db->getDoubleArray("efficiency_tolerance");
+
+      for (int ln = 0; ln < d_efficiency_tolerance.getSize(); ln++) {
+         if ((d_efficiency_tolerance[ln] <= 0.0e0)
+             || (d_efficiency_tolerance[ln] >= 1.0e0)) {
+            TBOX_ERROR(
+               d_object_name << ":  "
+               <<
+               "Key data `efficiency_tolerance' has values"
+               << " out of range 0.0 < tol < 1.0.");
+
+         }
+      }
+
+   }
+
+   /*
+    * Read input for combine efficiency.
+    */
+
+   if (db->keyExists("combine_efficiency")) {
+      d_combine_efficiency = db->getDoubleArray("combine_efficiency");
+
+      for (int ln = 0; ln < d_combine_efficiency.getSize(); ln++) {
+         if ((d_combine_efficiency[ln] <= 0.0e0)
+             || (d_combine_efficiency[ln] >= 1.0e0)) {
+            TBOX_ERROR(
+               d_object_name << ":  "
+               <<
+               "Key data `combine_efficiency' has values"
+               << " out of range 0.0 < tol < 1.0.");
+
+         }
+      }
+
+   }
+
+
+   //d_proper_nesting_complement.resize(d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels(), hier::MappedBoxLevel(d_dim));
+   d_proper_nesting_complement.resize(0);
+   d_to_nesting_complement.resize(0);
+   d_from_nesting_complement.resize(0);
+   d_domain_complement_tree.resizeArray(0, hier::MappedBoxTree(d_dim));
+
+   if (d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels() > 1) {
+      tbox::Pointer<hier::PatchHierarchy> hierarchy(d_mb_hierarchy->getHierarchy(0));
+      tbox::Array<hier::IntVector> ratio_to_coarser(hierarchy->getMaxNumberOfLevels(),
+                                                    hier::IntVector::getOne(d_dim));
+      for ( int ln=0; ln<hierarchy->getMaxNumberOfLevels(); ++ln ) {
+         ratio_to_coarser[ln] = hierarchy->getRatioToCoarserLevel(ln);
+      }
+      d_tag_init_strategy->checkCoarsenRatios(ratio_to_coarser);
+   }
+
+   std::string tmp_str;
+
+   if ( db->isChar("check_nonrefined_tags") ) {
+      // Temporary backward compatibility.
+      tmp_str = db->getChar("check_nonrefined_tags");
+   } else {
+      tmp_str = db->getStringWithDefault("check_nonrefined_tags",
+                                         std::string("WARN"));
+   }
+   d_check_nonrefined_tags = char(tolower(*tmp_str.c_str()));
+   if (d_check_nonrefined_tags != 'i' &&
+       d_check_nonrefined_tags != 'w' &&
+       d_check_nonrefined_tags != 'e') {
+      TBOX_ERROR("GriddingAlgorithm: input parameter check_nonrefined_tags\n"
+         << "can only be \"IGNORE\", \"WARN\" or \"ERROR\"");
+   }
+
+   if ( db->isChar("check_overlapping_patches") ) {
+      // Temporary backward compatibility.
+      tmp_str = db->getChar("check_overlapping_patches");
+   } else {
+      tmp_str = db->getStringWithDefault("check_overlapping_patches",
+                                         std::string("IGNORE"));
+   }
+   d_check_overlapping_patches = char(tolower(*tmp_str.c_str()));
+   if (d_check_overlapping_patches != 'i' &&
+       d_check_overlapping_patches != 'w' &&
+       d_check_overlapping_patches != 'e') {
+      TBOX_ERROR(
+         "GriddingAlgorithm: input parameter check_overlapping_patches\n"
+         << "can only be \"IGNORE\", \"WARN\" or \"ERROR\"");
+   }
+
+   d_sequentialize_patch_indices =
+      db->getBoolWithDefault("sequentialize_patch_indices",
+         d_sequentialize_patch_indices);
+
+   d_enforce_proper_nesting =
+      db->getBoolWithDefault("enforce_proper_nesting", d_enforce_proper_nesting);
+   d_extend_to_domain_boundary =
+      db->getBoolWithDefault("extend_to_domain_boundary",
+         d_extend_to_domain_boundary);
+   d_load_balance =
+      db->getBoolWithDefault("load_balance", d_load_balance);
+
+}
+
+/*
+ *************************************************************************
+ *
+ * Gets the database in the root database that corresponds to the object
+ * name.  This method then checks to make sure that the version number
+ * of the class is that same as the version number in the restart file.
+ * If these values are equal, the data members are read in from the
+ * restart database.
+ *
+ *************************************************************************
+ */
+
+void MultiblockGriddingAlgorithm::getFromRestart()
+{
+   tbox::Pointer<tbox::Database> root_db =
+      tbox::RestartManager::getManager()->getRootDatabase();
+
+   tbox::Pointer<tbox::Database> db;
+   if (root_db->isDatabase(d_object_name)) {
+      db = root_db->getDatabase(d_object_name);
+   } else {
+      TBOX_ERROR("Restart database corresponding to "
+         << d_object_name << " not found in restart file.");
+   }
+
+   int ver = db->getInteger("ALGS_GRIDDING_ALGORITHM_VERSION");
+   if (ver != ALGS_GRIDDING_ALGORITHM_VERSION) {
+      TBOX_ERROR(
+         d_object_name << ":  "
+         <<
+         "Restart file version different than class version.");
+   }
+
+   //d_proper_nesting_complement.resize(d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels(), hier::MappedBoxLevel(d_dim));
+   d_proper_nesting_complement.resize(0);
+
+   TBOX_ASSERT(PATCHLEVEL_DATANAME_BUFSIZE > (5 + 1 + 4 + 1));
+
+   d_efficiency_tolerance = db->getDoubleArray("d_efficiency_tolerance");
+   d_combine_efficiency = db->getDoubleArray("d_combine_efficiency");
+
+   d_sequentialize_patch_indices = db->getBool("d_sequentialize_patch_indices");
+
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void MultiblockGriddingAlgorithm::startupCallback()
+{
+   s_tag_indx = new tbox::Array<int>(tbox::Dimension::MAXIMUM_DIMENSION_VALUE, -1);
+   s_buf_tag_indx = new tbox::Array<int>(tbox::Dimension::MAXIMUM_DIMENSION_VALUE, -1);
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void MultiblockGriddingAlgorithm::shutdownCallback()
+{
+   delete s_tag_indx;
+   delete s_buf_tag_indx;
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void MultiblockGriddingAlgorithm::initializeCallback()
+{
+   /*
+    * Timers:  for gathering performance information about box
+    * calculus and other regridding operations.
+    */
+   t_load_balance = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::load_balance");
+   t_load_balance0 = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::load_balance0");
+   t_load_balance_setup = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::load_balance_setup");
+   t_bdry_fill_tags_create = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::bdry_fill_tags_create");
+   t_make_coarsest = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::makeCoarsestLevel()");
+   t_make_finer = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::makeFinerLevel()");
+   t_make_finer_setup = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::makeFinerLevel()_setup");
+   t_make_finer_tagging = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::makeFinerLevel()_tagging");
+   t_make_finer_create = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::makeFinerLevel()_create");
+   t_regrid_all_finer = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::regridAllFinerLevels()");
+   t_regrid_finer_create = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::regridFinerLevel()_create");
+   t_fill_tags_from_mapped_box_level = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::fillTagsFromMappedBoxLevel()");
+   t_tag_cells_for_refinement = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::tag_cells_for_refinement");
+   t_buffer_tags = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::bufferTagsOnLevel()");
+   t_second_finer_tagging = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::second_finer_tagging");
+   t_bdry_fill_tags_comm = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::bdry_fill_tags_comm");
+   t_find_refinement = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::findRefinementBoxes()");
+   t_find_boxes_containing_tags = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::find_boxes_containing_tags");
+   t_enforce_nesting = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::enforce_nesting");
+   t_make_nesting_map = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::makeProperNestingMap()");
+   t_make_nesting_map_compute = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::makeProperNestingMap()_compute");
+   t_make_nesting_map_convert = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::makeProperNestingMap()_convert");
+   t_use_nesting_map = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::use_nesting_map");
+   t_make_overflow_map = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::makeOverflowNestingMap()");
+   t_make_overflow_map_compute = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::makeOverflowNestingMap()_compute");
+   t_make_overflow_map_convert = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::makeOverflowNestingMap()_convert");
+   t_use_overflow_map = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::use_overflow_map");
+   t_compute_external_parts = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::compute_external_parts");
+   t_compute_nesting_violator = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::computeNestingViolator()");
+   t_extend_to_domain_boundary = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::extend_to_domain_boundary");
+   t_extend_within_domain = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::extend_within_domain");
+   t_grow_boxes_within_domain = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::grow_boxes_within_domain");
+   t_sort_nodes = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::sortNodes()");
+   t_find_new_to_new = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::find_new_to_new");
+   t_bridge_new_to_new = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::bridge_new_to_new");
+   t_bridge_new_to_coarser = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::bridge_new_to_coarser");
+   t_bridge_new_to_finer = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::bridge_new_to_finer");
+   t_bridge_new_to_old = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::bridge_new_to_old");
+   t_bridge_links = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::bridge_links");
+   t_modify_connector = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::modify_connector");
+   t_make_domain = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::makeCoarsestLevel()_make_domain");
+   t_get_balance = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::get_balance");
+   t_use_balance = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::use_balance");
+   t_make_new = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::makeCoarsestLevel()_make_new");
+   t_process_error = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::process_error");
+   t_reset_hier = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::reset_hierarchy_config");
+   t_misc1 = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::misc1");
+   t_misc2 = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::misc2");
+   t_misc3 = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::misc3");
+   t_misc4 = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::misc4");
+   t_misc5 = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::misc5");
+   t_limit_overflow = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::limit_overflow");
+   t_box_massage = tbox::TimerManager::getManager()->
+      getTimer("mesh::MultiblockGriddingAlgorithm::box_massage");
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void MultiblockGriddingAlgorithm::finalizeCallback()
+{
+   t_find_domain_complement.setNull();
+   t_load_balance.setNull();
+   t_load_balance0.setNull();
+   t_load_balance_setup.setNull();
+   t_bdry_fill_tags_create.setNull();
+   t_make_coarsest.setNull();
+   t_make_finer.setNull();
+   t_make_finer_setup.setNull();
+   t_make_finer_tagging.setNull();
+   t_make_finer_create.setNull();
+   t_regrid_all_finer.setNull();
+   t_regrid_finer_create.setNull();
+   t_bridge_links.setNull();
+   t_fill_tags_from_mapped_box_level.setNull();
+   t_tag_cells_for_refinement.setNull();
+   t_buffer_tags.setNull();
+   t_bdry_fill_tags_comm.setNull();
+   t_second_finer_tagging.setNull();
+   t_find_refinement.setNull();
+   t_bridge_new_to_new.setNull();
+   t_find_new_to_new.setNull();
+   t_bridge_new_to_coarser.setNull();
+   t_bridge_new_to_finer.setNull();
+   t_bridge_new_to_old.setNull();
+   t_find_boxes_containing_tags.setNull();
+   t_enforce_nesting.setNull();
+   t_make_nesting_map.setNull();
+   t_make_nesting_map_compute.setNull();
+   t_make_nesting_map_convert.setNull();
+   t_use_nesting_map.setNull();
+   t_make_overflow_map.setNull();
+   t_make_overflow_map_compute.setNull();
+   t_make_overflow_map_convert.setNull();
+   t_use_overflow_map.setNull();
+   t_compute_external_parts.setNull();
+   t_compute_nesting_violator.setNull();
+   t_extend_to_domain_boundary.setNull();
+   t_extend_within_domain.setNull();
+   t_grow_boxes_within_domain.setNull();
+   t_sort_nodes.setNull();
+   t_modify_connector.setNull();
+   t_misc1.setNull();
+   t_misc2.setNull();
+   t_misc3.setNull();
+   t_misc4.setNull();
+   t_misc5.setNull();
+   t_make_domain.setNull();
+   t_get_balance.setNull();
+   t_use_balance.setNull();
+   t_make_new.setNull();
+   t_process_error.setNull();
+   t_limit_overflow.setNull();
+   t_reset_hier.setNull();
+   t_box_massage.setNull();
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/MultiblockGriddingAlgorithm.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/MultiblockGriddingAlgorithm.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,104 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR hierarchy generation and regridding routines. 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace mesh {
+
+SAMRAI_INLINE_KEYWORD
+bool
+MultiblockGriddingAlgorithm::errorEstimationUsesTimeIntegration()
+const
+{
+   return d_tag_init_strategy->usesTimeIntegration();
+}
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<TagAndInitializeStrategy>
+MultiblockGriddingAlgorithm::getTagAndInitializeStrategy() const
+{
+   return d_tag_init_strategy;
+}
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<LoadBalanceStrategy>
+MultiblockGriddingAlgorithm::getLoadBalanceStrategy() const
+{
+   return d_load_balancer;
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::IntVector&
+MultiblockGriddingAlgorithm::getRatioToCoarserLevel(
+   const int level_number) const
+{
+   TBOX_ASSERT((level_number >= 0) && (level_number < d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels()));
+   return d_mb_hierarchy->getHierarchy(0)->getRatioToCoarserLevel(level_number);
+}
+
+SAMRAI_INLINE_KEYWORD
+double
+MultiblockGriddingAlgorithm::getEfficiencyTolerance(
+   const int level_number) const
+{
+   TBOX_ASSERT((level_number >= 0) && (level_number < d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels()));
+   int size = d_efficiency_tolerance.getSize();
+   return (level_number < size)
+          ? d_efficiency_tolerance[level_number]
+          : d_efficiency_tolerance[size - 1];
+}
+
+SAMRAI_INLINE_KEYWORD
+double
+MultiblockGriddingAlgorithm::getCombineEfficiency(
+   const int level_number) const
+{
+   TBOX_ASSERT((level_number >= 0) && (level_number < d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels()));
+   int size = d_combine_efficiency.getSize();
+   return (level_number < size)
+          ? d_combine_efficiency[level_number]
+          : d_combine_efficiency[size - 1];
+}
+
+/*!
+ * Return proper nesting buffer width for level.
+ *
+ * Level number level_number+1 must nest inside level level_number
+ * by the width returned (except where the levels touch the domain
+ * boundary).
+ */
+SAMRAI_INLINE_KEYWORD
+int
+MultiblockGriddingAlgorithm::getProperNestingBuffer(
+   const int level_number) const
+{
+   TBOX_ASSERT((level_number >= 0) && (level_number < d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels()));
+   return d_mb_hierarchy->getHierarchy(0)->getProperNestingBuffer(level_number);
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::IntVector&
+MultiblockGriddingAlgorithm::getSmallestPatchSize(
+   const int level_number) const
+{
+   TBOX_ASSERT((level_number >= 0) && (level_number < d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels()));
+   return d_mb_hierarchy->getHierarchy(0)->getSmallestPatchSize(level_number);
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::IntVector&
+MultiblockGriddingAlgorithm::getLargestPatchSize(
+   const int level_number) const
+{
+   TBOX_ASSERT((level_number >= 0) && (level_number < d_mb_hierarchy->getHierarchy(0)->getMaxNumberOfLevels()));
+   return d_mb_hierarchy->getHierarchy(0)->getLargestPatchSize(level_number);
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/MultiblockGriddingAlgorithm.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/MultiblockGriddingAlgorithm.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1169 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR hierarchy generation and regridding routines. 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_MultiblockGriddingAlgorithm
+#define included_mesh_MultiblockGriddingAlgorithm
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/mesh/BaseGriddingAlgorithm.h"
+#include "SAMRAI/mesh/BoxGeneratorStrategy.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/mesh/TagAndInitializeStrategy.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/mesh/LoadBalanceStrategy.h"
+#include "SAMRAI/mesh/MultiblockGriddingTagger.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/xfer/RefineAlgorithm.h"
+#include "SAMRAI/xfer/RefineSchedule.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Serializable.h"
+#include "SAMRAI/tbox/Timer.h"
+
+#include <iostream>
+#include <string>
+#include <vector>
+
+#define MGA_RECORD_STATS
+// #undef MGA_RECORD_STATS
+
+#ifdef MGA_RECORD_STATS
+#include "SAMRAI/tbox/Statistic.h"
+#include "SAMRAI/tbox/Statistician.h"
+#endif
+
+namespace SAMRAI {
+namespace mesh {
+
+/*!
+ * @brief Class MultiblockGriddingAlgorithm manages gridding operations in
+ * SAMRAI.  Specifically, it provides AMR patch hierarchy generation and
+ * regridding routines that may be used with a variety of AMR solution
+ * algorithms and application-specific numerical routines.
+ *
+ * The three main functions provided by this class are:
+ *   - @b    makeCoarsestLevel()
+ *      This routine constructs or repartitions
+ *      the coarsest hierarchy level (level 0).
+ *
+ *   - @b    makeFinerLevel()
+ *      This routine will attempt to add a new
+ *      finest level to the hierarchy if the
+ *      maximum number of levels allows it and
+ *      cells on the current finest level are
+ *      selected for refinement.
+ *
+ *   - @b    regridAllFinerLevels()
+ *      This routine will regrid all levels finer
+ *      than some specified level based on cells
+ *      that are selected for refinement on each
+ *      level finer than and including the given
+ *      level.  This routine may add a new finest
+ *      hierarchy level if the maximum number of
+ *      levels allows it and cells on the current
+ *      finest level are selected for refinement.
+ *      Levels may also be removed from the
+ *      hierarchy if no cells are tagged.
+ *
+ *
+ * These basic AMR operations are used to generate of individual levels in
+ * the AMR patch hierarchy at the beginning of a simulation, and regridding
+ * collections of levels during an adaptive calculation.  More details are
+ * found in the comments accompanying each member function below.
+ *
+ * The operations that identify cells for refinement on a single level and
+ * initialize data and solution algorithm-specific information that depend
+ * on the AMR hierarchy configuration are provided by the data member of
+ * type TagAndInitializeStrategy.  Operations that cluster
+ * tagged cells into a collection of box regions are provided by the
+ * BoxGeneratorStrategy data member.  Routines that load balancing
+ * patches on each level are provided by the LoadBalanceStrategy data
+ * member.  The collaboration between this class and each of those objects
+ * follows the Strategy design pattern.  Each instantiation of this gridding
+ * algorithm class is configured with concrete implementations of those
+ * routines by passing appropriate objects into this constructor.
+ *
+ * Initialization of an MultiblockGriddingAlgorithm object is performed via a
+ * combination of default parameters and values read from input.  Data
+ * read from input is summarized as follows:
+ *
+ * Optional input keys, data types, and defaults:
+ *
+ *   - \b    efficiency_tolerance
+ *      An array of double values, each of which specifies the minimum
+ *      percentage of tagged cells in each box used to construct patches
+ *      on a finer level.  If the ratio of the number of tagged cells in
+ *      a box to total cells in the box is below the tolerance value, the
+ *      box may be split into smaller boxes and pieces removed until the
+ *      ratio becomes greater than or equal to the the tolerance.  The index
+ *      of the value in the array corresponds to the number of the level to
+ *      which the tolerance value applies.  If more values are given
+ *      than max_levels - 1 , extra entries will be ignored.  If fewer
+ *      values are given, then the last element in the array will be used
+ *      on each level without a specified input value.  For example,
+ *      if only a single value is specified, then that value will be used on
+ *      all levels.  If no input values are given, a default of 0.8 is used.
+ *      See sample input below for input file format.
+ *
+ *   - \b    combine_efficiency
+ *      An array of double values, each of which serves as a threshold
+ *      for the ratio of the total number of cells in two boxes into which
+ *      a box may be split and the number of cells in the original box.
+ *      If that ratio is greater than combine efficiency, the box will not
+ *      be split.  This avoids splitting up portions of the domain into
+ *      potentially more costly smaller pieces if there appears to be little
+ *      to be gained by splitting up the boxes.  The index of the value in
+ *      the array corresponds to the number of the level to which the
+ *      efficiency value applies.  If more values are given than
+ *      max_levels - 1 , extra entries will be ignored.  If fewer values
+ *      are given, then the last element in the array will be used on each
+ *      level without a specified input value.  For example, if only a single
+ *      value is specified, then that value will be used on all levels.  If
+ *      no input values are given, a default of 0.8 is used.  See
+ *      sample input below for input file format.
+ *
+ *   - \b    check_nonrefined_tags
+ *      How to resolve user-specified tags that violates proper nesting.
+ *      Set to one of these characters:
+ *      @b "IGNORE" - violating tags will be quietly disregarded.
+ *      @b "WARN" - violating tags will cause a warning and be
+ *      disregarded.
+ *      @b "ERROR" - violating tags will cause an unrecoverable
+ *      assertion.
+ *      The default is "WARN".  It is fastest to ignore non-nesting tags
+ *      because no checking has to be done.
+ *
+ *   - \b    check_overlapping_patches
+ *      Specify whether to check for overlapping patches on a newly created
+ *      level, and what to do if any are found.
+ *      Set to one of these characters:
+ *      @b "IGNORE" - there is no check for overlapping patches,
+ *      and they will be quietly disregarded.
+ *      @b "WARN" - overlapping patches will cause a warning and be
+ *      disregarded.
+ *      @b "ERROR" - violating tags will cause an unrecoverable
+ *      assertion.
+ *      The default is "IGNORE".  The check for overlapping patches may be
+ *      expensive, so the use of "WARN" and "ERROR" is recommended only for debugging
+ *      purposes.  To prevent the creation of any levels with overlapping
+ *      patches, see the input flag
+ *      "allow_patches_smaller_than_minimum_size_to_prevent_overlaps"
+ *
+ *   - \b   sequentialize_patch_indices
+ *      Whether to globally sequentialize patch indices.  This is not
+ *      scalable, but is required for writing correct VisIt files.
+ *      Due to the current VisIt requirement, this is currently true by default.
+ *      It will evetually be set back to false after we remove the VisIt
+ *      requirement.
+ *
+ *
+ * Note that when continuing from restart, the input values in the
+ * input file override all values read in from the restart database.
+ *
+ * The following represents sample input data for a three-dimensional
+ * problem:
+ *
+ * \verbatim
+ *
+ *   // Optional input: different efficiency tolerance for each coarser level
+ *   efficiency_tolerance = 0.80e0, 0.85e0, 0.90e0
+ *
+ *   // Optional input: combine efficiency is same for all levels.
+ *   combine_efficiency = 0.95e0
+ *
+ * \endverbatim
+ *
+ * @see mesh::TagAndInitializeStrategy
+ * @see mesh::LoadBalanceStrategy
+ * @see mesh::BoxGeneratorStrategy
+ */
+
+class MultiblockGriddingAlgorithm:
+   public BaseGriddingAlgorithm
+{
+public:
+   /*!
+    * The constructor for MultiblockGriddingAlgorithm configures the
+    * gridding algorithm with the concrete strategy objects in the
+    * argument list.
+    *
+    * Gridding parameters are initialized from values provided in the
+    * specified input and in the restart database corresponding to the
+    * specified object_name argument.  The constructor also registers
+    * this object for restart using the specified object name when the
+    * boolean argument is true.  Whether object will write its state
+    * to restart files during program execution is determined by this
+    * argument.  Note that it has a default state of true.
+    *
+    * If assertion checking is turned on, an unrecoverable assertion will
+    * result if any of the input database, level strategy,
+    * box generator, or load balancer pointers is null.  Assertions
+    * may also be thrown if any checks for consistency among input
+    * parameters fail.
+    *
+    * @param mb_hierarchy The hierarchy that this
+    * MultiblockGriddingAlgorithm will work on.  The pointer cached.
+    * All hierarchy operations will be on this hierarchy.
+    *
+    * @param[in] object_name For registering the object in the restart
+    * database.
+    *
+    * @param[in] input_db
+    *
+    * @param[in] level_strategy
+    *
+    * @param[in] generator
+    *
+    * @param[in] balancer Load balancer
+    *
+    * @param balancer0 Special load balancer to use when a single
+    * process owns all the unbalanced load (such as during
+    * initialization).  If omitted, will use @c balancer instead.
+    *
+    * @param[in] mb_tagger_strategy
+    *
+    * @param[in] register_for_restart
+    */
+   MultiblockGriddingAlgorithm(
+      const tbox::Pointer<hier::MultiblockPatchHierarchy> &mb_hierarchy,
+      const std::string& object_name,
+      tbox::Pointer<tbox::Database> input_db,
+      tbox::Pointer<TagAndInitializeStrategy> tag_init_strategy,
+      tbox::Pointer<BoxGeneratorStrategy> generator,
+      tbox::Pointer<LoadBalanceStrategy> balancer,
+      tbox::Pointer<LoadBalanceStrategy> balancer0,
+      MultiblockGriddingTagger* mb_tagger_strategy =
+         (MultiblockGriddingTagger *)NULL,
+      bool register_for_restart = true);
+
+   /*!
+    * @brief Destructor
+    *
+    * Virtual destructor for MultiblockGriddingAlgorithm.
+    */
+   virtual ~MultiblockGriddingAlgorithm();
+
+   /*!
+    * @brief Create or recreate the coarsest level.
+    *
+    * This is an implementation of interface defined in BaseGriddingAlgorithm.
+    *
+    * This routine will attempt to construct the coarsest level in the AMR
+    * patch hierarchy (i.e., level 0).  If level 0 does not already exist,
+    * then the domain specification is checked against the constraints of
+    * the grid generation procedures.  The level gridding strategy data
+    * member defines these constraints.  Recall that the domain specification
+    * is maintained by the grid geometry object associated with the hierarchy.
+    * Generally, an unrecoverable assertion will result if the constraints
+    * are not satisfied.
+    *
+    * If level 0 already exists in the hierarchy, then the routine will
+    * generate a new level by re-applying the load balancing procedure to
+    * the existing level.  Data will be moved from the old level to the
+    * new level and the pre-existing level 0 will be discarded.  Note that
+    * this routine is different than the routine makeFinerLevel() below,
+    * which is used to construct levels 1 and finer.  In particular, this
+    * routine does not select cells for refinement, whereas the other
+    * routine does.
+    *
+    * @param[in] level_time Simulation time.
+    *
+    * @param[in] override_mapped_box_level For specifying the
+    * configuration of the new level (instead of applying the load
+    * balancer).  If not using the override, use the other alternate
+    * version of this method, defined in BaseGriddingAlgorithm.
+    */
+   void
+   makeCoarsestLevel(
+      const double level_time,
+      const hier::MappedBoxLevel& override_mapped_box_level);
+
+   using BaseGriddingAlgorithm::makeCoarsestLevel;
+
+   /*!
+    * @brief Attempts to create a new level in the hierarchy finer
+    * than the finest level currently residing in the hierarchy.
+    *
+    * This is an implementation of interface defined in BaseGriddingAlgorithm.
+    *
+    * This routine attempts to create a new level in the AMR patch hierarchy
+    * finer than the finest level currently residing in the hierarchy.
+    * It will select cells for refinement on the finest level and construct
+    * a new finest level, if necessary.  If no cells are selected for
+    * refinement, no new level will be added to the hierarchy.   The boolean
+    * argument initial_time indicates whether the routine is called at the
+    * initial simulation time.  If true, this routine is used to build
+    * individual levels during the construction of the AMR hierarchy at the
+    * initial simulation time.  If false, the routine is being used to add
+    * new levels to the hierarchy at some later point.  In either case, the
+    * time value is the current simulation time.  Note that this routine
+    * cannot be used to construct the coarsest level in the hierarchy
+    * (i.e., level 0).  The routine makeCoarsestLevel() above must be used
+    * for that purpose.
+    *
+    * The tag buffer indicates the number of cells by which cells selected
+    * for refinement will be buffered before new finer level boxes are
+    * constructed.  The buffer is important to keep phenomena of interest
+    * on refined regions of the mesh until adaptive regridding occurs next.
+    * Thus, the buffer size should take into account how the simulation may
+    * evolve before regridding occurs (e.g., number of timesteps taken).
+    *
+    * Important note: If assertion checking is activated, several checks
+    * are applied to the functions arguments.  If any check is violated,
+    * an unrecoverable assertion will result.  In particular,
+    * the tag buffer must be non-negative.
+    *
+    * @param[in] level_time See text.
+    *
+    * @param[in] initial_time See text.
+    *
+    * @param[in] tag_buffer See text.
+    *
+    * @param regrid_start_time[in] The simulation time when the
+    * regridding operation began (this parameter is ignored except
+    * when using Richardson extrapolation)
+    */
+   void
+   makeFinerLevel(
+      const double level_time,
+      const bool initial_time,
+      const int tag_buffer,
+      const double regrid_start_time = 0.);
+
+   /*!
+    * @brief Attempts to reconfigure the patches on each level in the
+    * AMR patch hierarchy which is finer than the specified level.
+    *
+    * The given level number is that of the coarsest level on which
+    * cells will be will be selected for refinement.  In other words,
+    * that level is the finest level that will not be subject to a
+    * change in its patch configuration during the regridding process.
+    * Generally, this routine should be used to alter a pre-existing
+    * AMR patch hierarchy based on the need to adapt the computational
+    * mesh around some phenomenon of interest.  The routine
+    * makeFinerLevel() above should be used to construct the initial
+    * hierarchy configuration or to add more than one new level into
+    * the hierarchy.  Also, this routine will not reconfigure the
+    * patches on level 0 (i.e., the coarsest in any hierarchy).  The
+    * routine makeCoarsestLevel() above is provided for that purpose.
+    *
+    * Note that the current algorithm permits at most one new finest level
+    * to be added to the hierarchy with each invocation of the regridding
+    * process.  This constraint, though seemingly restrictive makes the
+    * process of maintaining properly nested levels much easier.
+    *
+    * The tag buffer array indicates the number of cells by which cells
+    * selected for refinement on a level will be buffered before new finer
+    * level boxes are constructed.  The buffer is important to keep phenomena
+    * of interest on refined regions of the mesh until adaptive regridding
+    * occurs next.  Thus, the buffer size should take into account how the
+    * simulation may evolve before regridding occurs (e.g., number of
+    * timesteps taken on each level).
+    *
+    * The boolean argument is used for regridding in time-dependent
+    * problems.  When true, it indicates that the specified level is
+    * the coarsest level to synchronize at the current regrid time
+    * before this regridding method is called.  This is a pretty
+    * idiosyncratic argument but allows some flexibility in the way
+    * memory is managed during time-dependent regridding operations.
+    *
+    * Important note: If assertion checking is activated, several checks
+    * are applied to the functions arguments.  If any check is violated,
+    * an unrecoverable assertion will result.  In particular,
+    * and the given level number must match that of an existing level
+    * in the hierarchy.  Also, the tag buffer array must
+    * contain a non-negative value for each level in the hierarchy.
+    *
+    * @param[in] level_number Coarsest level on which cells will be
+    * tagged for refinement
+    *
+    * @param[in] regrid_time Simulaition time when regridding occurs
+    *
+    * @param[in] tag_buffer Size of buffer on each level around tagged
+    * cells that will be covered by the next finer level
+    *
+    * @param[in] regrid_start_time The simulation time when the
+    * regridding operation began on each level (this parameter is
+    * ignored except when using Richardson extrapolation)
+    *
+    * @param[in] level_is_coarsest_to_sync Level is the coarsest to sync
+    */
+   void
+   regridAllFinerLevels(
+      const int level_number,
+      const double regrid_time,
+      const tbox::Array<int>& tag_buffer,
+      tbox::Array<double> regrid_start_time = tbox::Array<double>(),
+      const bool level_is_coarsest_to_sync = true);
+
+   /*!
+    * @brief Return true if error estimation process uses time integration;
+    * otherwise, return false.
+    *
+    * @return true if error estimation process uses time integration;
+    * otherwise, return false.
+    */
+   bool
+   errorEstimationUsesTimeIntegration() const;
+
+   /*!
+    * @brief Return pointer to level gridding strategy data member.
+    *
+    * @return pointer to level gridding strategy data member.
+    */
+   virtual
+   tbox::Pointer<TagAndInitializeStrategy>
+   getTagAndInitializeStrategy() const;
+
+   /*!
+    * Return pointer to load balance strategy data member.
+    */
+   virtual
+   tbox::Pointer<LoadBalanceStrategy>
+   getLoadBalanceStrategy() const;
+
+   /*!
+    * @brief Return efficiency tolerance for clustering tags on level.
+    *
+    * @return efficiency tolerance for clustering tags on level.
+    */
+   double
+   getEfficiencyTolerance(
+      const int level_number) const;
+
+   /*!
+    * @brief Return combine efficiency for clustering tags on level.
+    *
+    * @return combine efficiency for clustering tags on level.
+    */
+   double
+   getCombineEfficiency(
+      const int level_number) const;
+
+   /*!
+    * Print out all members of the class instance to given output stream.
+    */
+   void
+   printClassData(
+      std::ostream& os) const;
+
+   /*!
+    * Write object state out to the given database.
+    *
+    * When assertion checking is active, the database pointer must be non-null.
+    */
+   void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> db);
+
+   /*
+    * Write out statistics recorded on numbers of cells and patches generated.
+    */
+   void
+   printStatistics(
+      std::ostream& s = tbox::plog) const;
+
+private:
+   //! @brief Shorthand typedef.
+   typedef hier::Connector::NeighborSet NeighborSet;
+
+   /*
+    * @brief Read input data from specified database and initialize class members.
+    *
+    * When assertion checking is active, the database pointer must be non-null.
+    *
+    * @param[in] db
+    *
+    * @param[in] is_from_restart Should be set to true if the
+    * simulation is from restart.  Otherwise, it should be set to
+    * false.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db,
+      bool is_from_restart);
+
+   /*
+    * @brief Read object state from the restart file and initialize
+    * class data members.
+    *
+    * The database from which the restart data is read is determined
+    * by the object_name specified in the constructor.
+    *
+    * Unrecoverable Errors:
+    *
+    *   -The database corresponding to object_name is not found
+    *    in the restart file.
+    *
+    *   -The class version number and restart version number do not
+    *    match.
+    */
+   void
+   getFromRestart();
+
+   /*
+    * @brief Recursively regrid the hierarchy level and all finer
+    * levels in the hierarchy.
+    *
+    * This private member function is invoked by the
+    * regridAllFinerLevels() routine.
+    */
+   void
+   regridFinerLevel(
+      const int level_number,
+      const double regrid_time,
+      const int finest_level_not_regridded,
+      const bool level_is_coarsest_to_sync,
+      const tbox::Array<int>& tag_buffer,
+      const tbox::Array<double>& regrid_start_time = tbox::Array<double>(0));
+
+   /*
+    * @brief Set integer tags to specified value on intersection
+    * between patch level and the MappedBoxLevel provided by the
+    * Connector.
+    *
+    * The index value corresponds to the patch descriptor entry of the
+    * cell-centered integer tag array.  The boolean flag indicates
+    * whether tags are to be set on the regions corresponding to the
+    * interior of the level only, if the tag arrays contain ghosts.
+    *
+    * @param[in] tag_value
+    *
+    * @param[in] level
+    *
+    * @param[in] index
+    *
+    * @param[in] level_to_fill_mapped_box_level Connector from the level with
+    * the tags to the MappedBoxLevel describing where to fill.
+    *
+    * @param[in] interior_only
+    *
+    * @param fill_box_growth How much to grow fill boxes before using them
+    *       to tag.  Must be in index space of level holding tags..
+    */
+   void
+   fillTagsFromMappedBoxLevel(
+      const int tag_value,
+      const tbox::Pointer<hier::PatchLevel> level,
+      const int index,
+      const hier::Connector& level_to_fill_mapped_box_level,
+      const bool interior_only, // Default v2.x.x  = true
+      const hier::IntVector& fill_box_growth // Default v2.x.x = hier::IntVector::getZero(tbox::Dimension(DIM))
+      ) const;
+
+   /*
+    * @brief Make a map that, when applied to an improperly nested MappedBoxLevel,
+    * removes the nonnesting parts.
+    */
+   void
+   makeProperNestingMap(
+      const hier::MappedBoxLevel& unnested_mapped_box_level,
+      const hier::Connector& hierarchy_to_unnested,
+      const hier::Connector& unnested_to_hierarchy,
+      const int unnested_ln,
+      const int block_num,
+      hier::MappedBoxLevel& nested_mapped_box_level,
+      hier::Connector& unnested_to_nested) const;
+
+   /*
+    * @brief Make a map that, when applied to an MappedBoxLevel that extends too far
+    * outside of a nominal mapped_box_level, removes those parts too far outside.
+    */
+   void
+   makeOverflowNestingMap(
+      const hier::MappedBoxLevel& unnested_mapped_box_level,
+      const hier::Connector& unnested_to_nominal,
+      hier::MappedBoxLevel& nested_mapped_box_level,
+      hier::Connector& unnested_to_nested,
+      const int block_num,
+      const hier::IntVector& allowed_overflow) const;
+
+   /*!
+    * @brief Make a map from a MappedBoxLevel to parts of that MappedBoxLevel that
+    * violate proper nesting.
+    *
+    * @param[in] candidate MappedBoxLevel being examined for nesting violation.
+    *
+    * @param[out] violator MappedBoxLevel containing violating parts of candidate.
+    *
+    * @param[in] candidate_ln Level number corresponding to candidate's refinement ratio.
+    *
+    * @param[in] candidate_to_hierarchy Connector to mapped_box_level number
+    *       candidate_ln in the hierarchy.
+    *
+    * @param[in] hierarchy_to_candidate Connector from mapped_box_level number
+    *       candidate_ln in the hierarchy.
+    */
+   void
+   computeNestingViolator(
+      const hier::MappedBoxLevel& candidate,
+      hier::MappedBoxLevel& violator,
+      hier::Connector& candidate_to_violator,
+      const hier::Connector& candidate_to_hierarchy,
+      const hier::Connector& hierarchy_to_candidate,
+      const int candidate_ln,
+      const int block_number) const;
+
+   void
+   extendMappedBoxesToDomainBoundary(
+      hier::MappedBoxLevel& new_mapped_box_level,
+      hier::Connector& tag_to_new,
+      hier::Connector& new_to_tag,
+      const hier::Connector& tag_to_tag,
+      const hier::BoxArray& physical_domain_array,
+      const hier::IntVector& extend_ghosts,
+      const hier::PatchHierarchy& hierarchy,
+      const int new_ln) const;
+
+   /*!
+    * @brief Precompute data used to define proper nesting.
+    *
+    * Data is associated with level number ln, to be used for
+    * constructing level number ln+1.
+    */
+   void
+   computeNestingData(
+      const int ln,
+      const int block_number);
+
+   /*!
+    * @brief Make a mapping Connector that can be used to grow boxes
+    * within domain by the minimum amount needed to make all boxes in a
+    * MappedBoxLevel satisfy the min_size requirement.
+    *
+    * The map is local.
+    */
+   void
+   makeBoxGrowingMap(
+      const hier::MappedBoxLevel& orig_mapped_box_level,
+      const hier::Connector& hierarchy_to_orig,
+      const hier::Connector& orig_to_hierarchy,
+      const int ln,
+      const int block_number,
+      hier::MappedBoxLevel& grown_mapped_box_level,
+      hier::Connector& orig_to_grown,
+      const hier::IntVector& min_size) const;
+
+   void
+   refineNewMappedBoxLevel(
+      hier::MappedBoxLevel& new_mapped_box_level,
+      hier::Connector& tag_to_new,
+      hier::Connector& new_to_tag,
+      const hier::IntVector& ratio) const;
+
+   /*
+    * @brief Sort the nodes in the new MappedBoxLevel.
+    *
+    * Sorting by the corners of the MappedBoxes removes randomness in
+    * the MappedBoxLevel.  Sequentializing the global indices numbers
+    * them sequentially, like Patch numbering in the traditional SAMR
+    * approach.
+    */
+   void
+   sortNodes(
+      hier::MappedBoxLevel& new_mapped_box_level,
+      hier::Connector& tag_to_new,
+      hier::Connector& new_to_tag,
+      bool sort_by_corners,
+      bool sequentialize_global_indices) const;
+
+   /*
+    * @brief Buffer each integer tag on patch level matching given tag
+    * value with a border of matching tags.
+    */
+   void
+   bufferTagsOnLevel(
+      const int tag_value,
+      const tbox::Pointer<hier::MultiblockPatchLevel> level,
+      const int buffer_size) const;
+
+   /*
+    * @brief Set the new level boxes using information stored in a file.
+    *
+    * If cell tagging is not performed, the new level boxes may
+    * be specified either from user input (by specifying "REFINE_BOXES"
+    * input) or from output from a previous run stored in an
+    * HDF file.  This method sets the "new_level_boxes" based on
+    * the information in the file.  It also sets the boolean
+    * parameter "remove_old_fine_level" which indicates whether
+    * the level box configuration has changed and, consequently,
+    * whether we need to remove the old level.
+    */
+   void
+   readLevelBoxes(
+      hier::BoxArray& new_level_boxes,
+      hier::MappedBoxLevel& new_mapped_box_level,
+      hier::Connector& coarser_to_new,
+      hier::Connector& new_to_coarser,
+      const int block_number,
+      const int level_number,
+      const double regrid_time,
+      bool& remove_old_fine_level);
+
+   /*
+    * @brief Given a level number, determine an array of boxes from
+    * which a refinement of the level may be constructed.
+    *
+    * It is assumed that the integer tags that identify cells for
+    * refinement have been set on the level before this routine is
+    * called.  At the end of this function, new_mapped_box_level will
+    * represent the box extents of a new fine level on the given
+    * block, but in the index space of the coarser level (that is, the
+    * level that was tagged).
+    */
+   void
+   findRefinementBoxes(
+      hier::MappedBoxLevel& new_mapped_box_level,
+      hier::Connector& tag_to_new,
+      hier::Connector& new_to_tag,
+      const int coarse_level_number,
+      const int block_number) const;
+
+   /*
+    * @brief Set patch size and ghost cell information needed to create new
+    * refinement levels.
+    *
+    * This method applies to levels that are being used to build new
+    * finer levels (i.e. level_number is a coarser level in the
+    * hierarchy) and to levels which are simply being reconstructed
+    * (i.e. the same level in the hierarchy).  The boolean value
+    * "for_building_finer" controls the logic for the two cases - in
+    * the former case, it is true while in the latter case it is
+    * false.
+    *
+    * When a finer level is being constructed, the maximum number of ghost
+    * cells needed in any variable is used to compute the smallest patch
+    * size allowed and the extent to which patches may be extended to touch
+    * the physical boundary.  This avoids problems in setting ghost cell
+    * data that may occur when ghost cell regions intersect the physical
+    * boundary in strange ways.
+    *
+    * This routine sets the smallest and largest patch sizes for the specified
+    * level, the smallest box to refine on the next coarser level, and the
+    * number of cells that a patch may be extended to the boundary if it
+    * sufficiently close to the boundary (extend_ghosts).
+    */
+   void
+   getGriddingParameters(
+      hier::IntVector& smallest_patch,
+      hier::IntVector& smallest_box_to_refine,
+      hier::IntVector& largest_patch,
+      hier::IntVector& extend_ghosts,
+      const hier::PatchHierarchy& hierarchy,
+      const int level_number,
+      const bool for_building_finer) const;
+
+   /*
+    * @brief Given a new_mapped_box_level that is outputted from
+    * findRefinementBoxes, load balance the boxes and refine them to the
+    * resolution of level tag_ln+1.
+    *
+    * If the rank_group has been set to
+    * a non-default state, it will restrict the load balance to a certain
+    * set of processors.  The Connector agruments should be references to
+    * the same objects that were passed into findRefinementBoxes.
+    */
+   void
+   loadBalanceAndRefineBoxes(
+      hier::MappedBoxLevel& new_mapped_box_level,
+      hier::Connector& tag_to_new,
+      hier::Connector& new_to_tag,
+      const int tag_ln,
+      const tbox::RankGroup& rank_group,
+      const int block_number) const;
+
+   /*
+    * @brief Set an array of RankGroup objects in order to assign processors to
+    * specific blocks when load balancing a new level.
+    *
+    * Each entry in
+    * work_on_block contains an integer representing the amount of work
+    * expected to be on a specific block within the new level.  Each entry
+    * of rank_groups will contain a RankGroup that determines which processors
+    * will receive patches for a specific block.
+    *
+    * If the number of active blocks on the new level (defined as the number
+    * of blocks that have nonzero work according to the work_on_block array),
+    * is greater than or equal to the number of ranks in the SAMRAI_MPI
+    * object, then all entries of the rank_groups array will be set to a
+    * default state, meaning that all processors will be eligible to receive
+    * patches on all blocks.
+    */
+   void
+   setRankGroups(
+      tbox::Array<tbox::RankGroup>& rank_groups,
+      const tbox::Array<int>& work_on_block,
+      const tbox::SAMRAI_MPI& mpi) const;
+
+   /*!
+    * @brief Return proper nesting buffer width for level.
+    *
+    * Level number level_number+1 must nest inside level level_number
+    * by the width returned (except where the levels touch the domain
+    * boundary).
+    */
+   int
+   getProperNestingBuffer(
+      const int level_number) const;
+
+   /*!
+    * @brief Return const reference to smallest patch size for level.
+    */
+   const hier::IntVector&
+   getSmallestPatchSize(
+      const int level_number) const;
+
+   /*!
+    * @brief Return const reference to largest patch size for level.
+    */
+   const hier::IntVector&
+   getLargestPatchSize(
+      const int level_number) const;
+
+   /*!
+    * @brief Return pointer to load balance strategy specialized for the case
+    * where one processor owns all the initial loads.
+    *
+    * @return pointer to load balance strategy specialized for the case
+    * where one processor owns all the initial loads.
+    */
+   const hier::IntVector&
+   getRatioToCoarserLevel(
+      const int level_number) const;
+
+   /*!
+    * @brief Check for user tags that violate proper nesting.
+    */
+   void
+   checkNonrefinedTags(
+      const hier::PatchLevel& level,
+      int tag_ln,
+      const int block_num) const;
+
+   /*!
+    * @brief Check for overlapping patches within the level.
+    */
+   void
+   checkOverlappingPatches(
+      const hier::Connector& mapped_box_level_to_self) const;
+
+   void
+   warnIfDomainTooSmallInPeriodicDir(
+      const hier::IntVector& smallest_patch_size,
+      const hier::IntVector& domain_bounding_box_size) const;
+
+   /*
+    * @brief Record statistics on how many patches and cells were generated.
+    */
+   void
+   recordStatistics(
+      double current_time);
+
+   /*!
+    * @brief Initialize static objects and register shutdown routine.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   startupCallback();
+
+   /*!
+    * @brief Method registered with ShutdownRegister to cleanup statics.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   shutdownCallback();
+
+   /*!
+    * @brief Initialize static objects and register shutdown routine.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   initializeCallback();
+
+   /*!
+    * @brief Method registered with ShutdownRegister to cleanup statics.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   finalizeCallback();
+
+   /*!
+    * @brief The hierarchy that this GriddingAlgorithm works on.
+    */
+   const tbox::Pointer<hier::MultiblockPatchHierarchy> d_mb_hierarchy;
+
+   /*
+    * Static members for managing shared tag data among multiple
+    * GriddingAlgorithm objects.
+    */
+   static tbox::Array<int>* s_tag_indx;
+   static tbox::Array<int>* s_buf_tag_indx;
+
+   const tbox::Dimension d_dim;
+
+   /*
+    * The object name is used for error reporting and accessing
+    * restart file information.  Whether the object writes restart
+    * file data depends on the value of this boolean which is
+    * set in the constructor.
+    */
+   std::string d_object_name;
+   bool d_registered_for_restart;
+
+   /*
+    * Data members that manage application-specific level initialization
+    * and cell tagging, clustering of tagged cells into boxes, and load
+    * balancing of patches to processors, respectively.
+    */
+   tbox::Pointer<TagAndInitializeStrategy> d_tag_init_strategy;
+   tbox::Pointer<BoxGeneratorStrategy> d_box_generator;
+   tbox::Pointer<LoadBalanceStrategy> d_load_balancer;
+   tbox::Pointer<LoadBalanceStrategy> d_load_balancer0;
+   MultiblockGriddingTagger* d_mb_tagger_strategy;
+   bool d_internal_tagger_strategy;
+
+   /*
+    * Cell-centered integer variables use to tag cells for refinement.
+    * The descriptor index d_tag_indx is used to obtain tag information
+    * from user-defined routines on patch interiors.  The descriptor index
+    * d_buf_tag_indx is used to buffer tags on patches that may be
+    * distributed across processors.  The refine algorithm and schedule are
+    * used for interprocessor communication.
+    */
+   tbox::Pointer<pdat::CellVariable<int> > d_tag;
+   tbox::Pointer<pdat::CellVariable<int> > d_buf_tag;
+   int d_tag_indx;
+   int d_buf_tag_indx;
+
+   tbox::Pointer<xfer::MultiblockRefineAlgorithm> d_mblk_bdry_fill_tags;
+   tbox::Array<tbox::Pointer<xfer::MultiblockRefineSchedule> >
+   d_bdry_sched_tags;
+
+   /*
+    * True and false integer tag values set in constructor and used to
+    * set and compare integer tag values on the patch hierarchy.  Generally,
+    * these variables are easier to read in the code than integer constants,
+    * such as 0 and 1.
+    */
+   int d_true_tag;
+   int d_false_tag;
+
+   /*!
+    * @brief Finest level not changed during regrid.
+    *
+    * This member is temporary, used to coordinate with private methods.
+    */
+   int d_base_ln;
+
+   /*
+    * Parameters for box generation routines that govern the splitting
+    * of boxes containing tagged cells into smaller boxes:
+    *
+    * The efficiency tolerance is a threshold value for the percentage of
+    * tagged cells in each box.  If this percentage is below the tolerance,
+    * the box will continue to be split into smaller boxes.
+    *
+    * The combine efficiency is a threshold value for the sum of the volumes
+    * of two boxes into which a box may be potentially split.  If that sum
+    * is greater than the combine efficiency multiplied by the volume of
+    * the original box, the box will not be split.
+    *
+    * For each of these parameters, an array of values may be given.  Each
+    * value in the array will be used for cell clustering on the level whose
+    * number matches the index of the value in the array.   If more values
+    * are given than the maximum number of levels, extra values will
+    * be ignored.  If fewer values are given, then the last element in the
+    * array will be used on each level without a specified input value.
+    * For example, if only a single value is specified, then that value
+    * will be used for all levels.
+    *
+    * These values are optional input parameters.  If not given, a default
+    * value of 0.8 is set for each parameter.
+    */
+   tbox::Array<double> d_efficiency_tolerance;
+   tbox::Array<double> d_combine_efficiency;
+
+   /*
+    * @brief When regridding level ln+1, the new level ln must not flow into
+    * d_proper_nesting_complement[ln].
+    *
+    * Has length d_mb_hierarchy->getMaxNumberOfLevels().  The objects
+    * are initialized only during gridding/regridding.
+    */
+   std::vector<std::vector<SAMRAI::hier::MappedBoxLevel> >
+   d_proper_nesting_complement;
+
+   /*
+    * @brief Connectors from the hierarchy to d_proper_nesting_complement.
+    */
+   std::vector<std::vector<SAMRAI::hier::Connector> > d_to_nesting_complement;
+   /*
+    * @brief Connectors from d_proper_nesting_complement to the hierarchy.
+    */
+   std::vector<std::vector<SAMRAI::hier::Connector> > d_from_nesting_complement;
+   tbox::Array<hier::MappedBoxTree> d_domain_complement_tree;
+
+   /*!
+    * @brief How to resolve user tags that violate nesting requirements.
+    *
+    * If a tag violates the nesting requirements, its location in index space
+    * will not be refined when creating a finer level.  This flag allows the
+    * user to determine what to do when this occurs
+    *
+    * Values can be:
+    * - 'i' Ignore (violating tags will be quietly disregarded)
+    * - 'w' Warn (violating tags will cause a warning and be disregarded)
+    * - 'e' Error (violating tags will cause an unrecoverable assertion)
+    *
+    * This defaults to 'w' and set by input parameter
+    * "check_nonrefined_tags".
+    */
+   char d_check_nonrefined_tags;
+
+   /*!
+    * @brief Whether or not to check for overlapping patches on a level.
+    *
+    * This determines whether to check if a new level has any patches that
+    * overlap in indes space.
+    *
+    * Values can be:
+    * - 'i' Ignore (overlapping patches will be quietly disregarded)
+    * - 'w' Warn (overlapping patches will cause a warning and be disregarded)
+    * - 'e' Error (overlapping patches will cause an unrecoverable assertion)
+    *
+    * This defaults to 'i' and set by input parameter
+    * "check_overlapping_patches".
+    */
+   char d_check_overlapping_patches;
+
+   /*!
+    * @brief Whether to globally sequentialize patch indices on every level.
+    */
+   bool d_sequentialize_patch_indices;
+
+   /*
+    * Switches for massaging boxes after clustering.
+    * Should be on for most AMR applications.
+    * Turning off is mainly for debugging purposes.
+    */
+   bool d_enforce_proper_nesting;
+   bool d_extend_to_domain_boundary;
+   bool d_load_balance;
+
+   /*
+    * Timers interspersed throughout the class.
+    */
+   static tbox::Pointer<tbox::Timer> t_find_domain_complement;
+   static tbox::Pointer<tbox::Timer> t_load_balance;
+   static tbox::Pointer<tbox::Timer> t_load_balance0;
+   static tbox::Pointer<tbox::Timer> t_load_balance_setup;
+   static tbox::Pointer<tbox::Timer> t_bdry_fill_tags_create;
+   static tbox::Pointer<tbox::Timer> t_make_coarsest;
+   static tbox::Pointer<tbox::Timer> t_make_finer;
+   static tbox::Pointer<tbox::Timer> t_make_finer_setup;
+   static tbox::Pointer<tbox::Timer> t_make_finer_tagging;
+   static tbox::Pointer<tbox::Timer> t_make_finer_create;
+   static tbox::Pointer<tbox::Timer> t_regrid_all_finer;
+   static tbox::Pointer<tbox::Timer> t_regrid_finer_create;
+   static tbox::Pointer<tbox::Timer> t_bridge_links;
+   static tbox::Pointer<tbox::Timer> t_fill_tags_from_mapped_box_level;
+   static tbox::Pointer<tbox::Timer> t_tag_cells_for_refinement;
+   static tbox::Pointer<tbox::Timer> t_buffer_tags;
+   static tbox::Pointer<tbox::Timer> t_bdry_fill_tags_comm;
+   static tbox::Pointer<tbox::Timer> t_second_finer_tagging;
+   static tbox::Pointer<tbox::Timer> t_find_refinement;
+   static tbox::Pointer<tbox::Timer> t_bridge_new_to_new;
+   static tbox::Pointer<tbox::Timer> t_find_new_to_new;
+   static tbox::Pointer<tbox::Timer> t_bridge_new_to_coarser;
+   static tbox::Pointer<tbox::Timer> t_bridge_new_to_finer;
+   static tbox::Pointer<tbox::Timer> t_bridge_new_to_old;
+   static tbox::Pointer<tbox::Timer> t_find_boxes_containing_tags;
+   static tbox::Pointer<tbox::Timer> t_enforce_nesting;
+   static tbox::Pointer<tbox::Timer> t_make_nesting_map;
+   static tbox::Pointer<tbox::Timer> t_make_nesting_map_compute;
+   static tbox::Pointer<tbox::Timer> t_make_nesting_map_convert;
+   static tbox::Pointer<tbox::Timer> t_use_nesting_map;
+   static tbox::Pointer<tbox::Timer> t_make_overflow_map;
+   static tbox::Pointer<tbox::Timer> t_make_overflow_map_compute;
+   static tbox::Pointer<tbox::Timer> t_make_overflow_map_convert;
+   static tbox::Pointer<tbox::Timer> t_use_overflow_map;
+   static tbox::Pointer<tbox::Timer> t_compute_external_parts;
+   static tbox::Pointer<tbox::Timer> t_compute_nesting_violator;
+   static tbox::Pointer<tbox::Timer> t_extend_to_domain_boundary;
+   static tbox::Pointer<tbox::Timer> t_extend_within_domain;
+   static tbox::Pointer<tbox::Timer> t_grow_boxes_within_domain;
+   static tbox::Pointer<tbox::Timer> t_sort_nodes;
+   static tbox::Pointer<tbox::Timer> t_modify_connector;
+   static tbox::Pointer<tbox::Timer> t_misc1;
+   static tbox::Pointer<tbox::Timer> t_misc2;
+   static tbox::Pointer<tbox::Timer> t_misc3;
+   static tbox::Pointer<tbox::Timer> t_misc4;
+   static tbox::Pointer<tbox::Timer> t_misc5;
+   static tbox::Pointer<tbox::Timer> t_make_domain;
+   static tbox::Pointer<tbox::Timer> t_get_balance;
+   static tbox::Pointer<tbox::Timer> t_use_balance;
+   static tbox::Pointer<tbox::Timer> t_make_new;
+   static tbox::Pointer<tbox::Timer> t_process_error;
+   static tbox::Pointer<tbox::Timer> t_limit_overflow;
+   static tbox::Pointer<tbox::Timer> t_reset_hier;
+   static tbox::Pointer<tbox::Timer> t_box_massage;
+
+#ifdef MGA_RECORD_STATS
+   /*
+    * Statistics on number of cells and patches generated.
+    */
+   tbox::Array<tbox::Pointer<tbox::Statistic> > d_boxes_stat;
+   tbox::Array<tbox::Pointer<tbox::Statistic> > d_cells_stat;
+   tbox::Array<tbox::Pointer<tbox::Statistic> > d_timestamp_stat;
+#endif
+
+   // The following are not yet implemented:
+   MultiblockGriddingAlgorithm(
+      const MultiblockGriddingAlgorithm&);
+   void
+   operator = (
+      const MultiblockGriddingAlgorithm&);
+
+   // Verbose flags.
+   static char s_check_overflow_nesting;
+   static char s_check_proper_nesting;
+   static char s_check_connectors;
+   static char s_print_mapped_box_level_hierarchy;
+   static char s_print_steps;
+
+   /* 
+    * Static initialization and cleanup handler.
+    */
+   static tbox::StartupShutdownManager::Handler
+   s_initialize_handler;
+
+   /* 
+    * 
+    */
+   static tbox::StartupShutdownManager::Handler
+   s_startup_shutdown_handler;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/mesh/MultiblockGriddingAlgorithm.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/MultiblockGriddingTagger.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/MultiblockGriddingTagger.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,218 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Strategy interface to user routines for refining AMR data. 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_MultiblockGriddingTagger_C
+#define included_mesh_MultiblockGriddingTagger_C
+
+#include "SAMRAI/mesh/MultiblockGriddingTagger.h"
+
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace mesh {
+
+/*
+ *************************************************************************
+ *									*
+ * The default constructor and virtual destructor do nothing             *
+ * particularly interesting.		                                *
+ *									*
+ *************************************************************************
+ */
+
+MultiblockGriddingTagger::MultiblockGriddingTagger(
+   const tbox::Dimension& dim):
+   xfer::MultiblockRefinePatchStrategy(dim),
+   d_dim(dim)
+{
+}
+
+MultiblockGriddingTagger::~MultiblockGriddingTagger()
+{
+}
+
+void MultiblockGriddingTagger::setScratchTagPatchDataIndex(
+   int buf_tag_indx)
+{
+
+   tbox::Pointer<hier::Variable> check_var;
+   bool indx_maps_to_variable =
+      hier::VariableDatabase::getDatabase()->mapIndexToVariable(buf_tag_indx,
+         check_var);
+   if (!indx_maps_to_variable || check_var.isNull()) {
+      TBOX_ERROR(
+         "MultiblockGriddingTagger::setScratchTagPatchDataIndex error...\n"
+         << "Given patch data index = " << buf_tag_indx
+         << " is not in VariableDatabase."
+         << std::endl);
+   } else {
+      tbox::Pointer<pdat::CellVariable<int> > t_check_var = check_var;
+      if (t_check_var.isNull()) {
+         TBOX_ERROR(
+            "MultiblockGriddingTagger::setScratchTagPatchDataIndex error...\n"
+            << "Given patch data index = " << buf_tag_indx
+            << " does not map to cell-centered"
+            << "\ninteger data in VariableDatabase." << std::endl);
+      }
+   }
+
+   d_buf_tag_indx = buf_tag_indx;
+}
+
+void MultiblockGriddingTagger::setPhysicalBoundaryConditions(
+   hier::Patch& patch,
+   const double fill_time,
+   const hier::IntVector& ghost_width_to_fill)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, patch);
+
+   NULL_USE(fill_time);
+
+   const tbox::Pointer<pdat::CellData<int> > tag_data =
+      patch.getPatchData(d_buf_tag_indx);
+
+   hier::IntVector gcw =
+      hier::IntVector::min(ghost_width_to_fill,
+         tag_data->getGhostCellWidth());
+
+   tbox::Pointer<hier::PatchGeometry> pgeom = patch.getPatchGeometry();
+
+   for (int d = 0; d < d_dim.getValue(); d++) {
+
+      tbox::Array<hier::BoundaryBox> bbox =
+         pgeom->getCodimensionBoundaries(d + 1);
+
+      for (int b = 0; b < bbox.size(); b++) {
+         if (!bbox[b].getIsMultiblockSingularity()) {
+            hier::Box fill_box = pgeom->getBoundaryFillBox(bbox[b],
+                  patch.getBox(),
+                  gcw);
+
+            tag_data->fillAll(0, fill_box);
+         }
+      }
+   }
+}
+
+void MultiblockGriddingTagger::fillSingularityBoundaryConditions(
+   hier::Patch& patch,
+   tbox::List<tbox::Pointer<hier::Patch> >& singularity_patches,
+   const double fill_time,
+   const hier::Box& fill_box,
+   const hier::BoundaryBox& boundary_box)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS3(d_dim, patch, fill_box, boundary_box);
+
+   NULL_USE(boundary_box);
+   NULL_USE(fill_time);
+
+   const tbox::Dimension dim(fill_box.getDim());
+
+   const tbox::Pointer<pdat::CellData<int> > tag_data =
+      patch.getPatchData(d_buf_tag_indx);
+
+   int num_sing_patches = singularity_patches.getNumberOfItems();
+   tbox::Pointer<pdat::CellData<int> >* sing_tag_data;
+   sing_tag_data =
+      new tbox::Pointer<pdat::CellData<int> >[num_sing_patches];
+
+   int sn = 0;
+
+   for (tbox::List<tbox::Pointer<hier::Patch> >::Iterator
+        sp(singularity_patches); sp; sp++) {
+      sing_tag_data[sn] =
+         sp()->getPatchData(d_buf_tag_indx);
+      sn++;
+   }
+
+   hier::Box sing_box(dim);
+   if (num_sing_patches == 0) {
+      sing_box = fill_box;
+   } else {
+      sing_box = sing_tag_data[0]->getBox();
+      for (int i = 1; i < num_sing_patches; i++) {
+         sing_box = sing_box * sing_tag_data[i]->getBox();
+      }
+   }
+
+   const hier::Box tag_fill_box =
+      fill_box * sing_box * tag_data->getGhostBox();
+
+   for (pdat::CellData<int>::Iterator cdi(tag_fill_box);
+        cdi; cdi++) {
+      for (int n = 0; n < num_sing_patches; n++) {
+         int sing_tag_val = (*sing_tag_data[n])(cdi());
+         if (sing_tag_val != 0) {
+            (*tag_data)(cdi()) = sing_tag_val;
+            break;
+         }
+      }
+   }
+
+   if (num_sing_patches > 1) {
+      for (int st = 0; st < num_sing_patches; st++) {
+         if ((sing_tag_data[st]->getBox() + sing_box) != sing_box) {
+            hier::Box sing_tag_box(sing_tag_data[st]->getBox());
+
+            hier::Box new_fill_box = fill_box * sing_tag_box
+               * tag_data->getGhostBox();
+            for (pdat::CellData<int>::Iterator cdi(new_fill_box);
+                 cdi; cdi++) {
+               if (!sing_box.contains(cdi())) {
+                  int sing_tag_val = (*sing_tag_data[st])(cdi());
+                  if (sing_tag_val != 0) {
+                     (*tag_data)(cdi()) = sing_tag_val;
+                  }
+               }
+            }
+         }
+      }
+   }
+
+   delete[] sing_tag_data;
+}
+
+void MultiblockGriddingTagger::postprocessRefine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(d_dim, fine, coarse, fine_box, ratio);
+
+   NULL_USE(fine);
+   NULL_USE(coarse);
+   NULL_USE(fine_box);
+   NULL_USE(ratio);
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/MultiblockGriddingTagger.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/MultiblockGriddingTagger.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,187 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Strategy interface to user routines for refining AMR data. 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_MultiblockGriddingTagger
+#define included_mesh_MultiblockGriddingTagger
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/xfer/MultiblockRefinePatchStrategy.h"
+
+namespace SAMRAI {
+namespace mesh {
+
+/*!
+ * @brief Class MultiblockGriddingTagger is a concrete implementation
+ * of MultiblockRefinePatchStrategy<DIMI> that is used for boundary filling
+ * of patch data representing cells tagged for refinement.
+ *
+ * This class is needed for the calls to MultiblockRefineSchedule in
+ * the MultiblockGriddingAlgorithm.
+ *
+ * This class implements the interface from MultiblockRefinePatchStrategy for
+ * fillSingularityBoundaryConditions(), so that boundary conditions for
+ * tag data that abuts a singularity can be properly filled.  Also
+ * implemented are the interfaces for xfer::RefinePatchStrategy, needed
+ * primarily for physical boundary filling.
+ *
+ * @see mesh::MultiblockGriddingAlgorithm
+ * @see xfer::MultiblockRefineSchedule
+ * @see xfer::MultiblockRefinePatchStrategy
+ * @see xfer::RefinePatchStrategy
+ */
+
+class MultiblockGriddingTagger:
+   public xfer::MultiblockRefinePatchStrategy
+{
+public:
+   /*!
+    * @brief The constructor does nothing interesting.
+    */
+   MultiblockGriddingTagger(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief The virtual destructor does nothing interesting.
+    */
+   virtual ~MultiblockGriddingTagger();
+
+   /*!
+    * @brief Set the patch data index for tag data.  This routine
+    * must be called with a valid cell-centered integer patch data
+    * index.
+    */
+   virtual void
+   setScratchTagPatchDataIndex(
+      int buf_tag_indx);
+
+   /*!
+    * @brief Physical boundary fill
+    *
+    * Implementation of interface defined in xfer::RefinePatchStrategy.
+    * Fills ghost cells of patch data at physical boundaries.
+    *
+    * @param patch               Patch where data is stored
+    * @param fill_time           Simulation time when filling occurs
+    * @param ghost_width_to_fill Maximum ghost width of all data to be filled
+    */
+   virtual void
+   setPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const double fill_time,
+      const hier::IntVector& ghost_width_to_fill);
+
+   /*!
+    * @brief Set the ghost data at a multiblock singularity.
+    *
+    * Implementation of interface defined in MultiblockRefinePatchStrategy.
+    * Fills ghost cells of patch data that abut multiblock singularities.
+    * The list of singularity patches contains the data from neighboring
+    * blocks that also abut the singularity, and that data from the neighbors
+    * is used to fill data on the local patch.
+    *
+    * @param patch               Local patch containing data to be filled
+    * @param singularity_patches List of structures that contain data from
+    *                             neighboring blocks.  See
+    *                             MultiblockRefineSchedule for more
+    *                             information on struct SingularityPatch
+    * @param fill_time            Simulation time when filling occurs
+    * @param fill_box             All ghost data to be filled will be within
+    *                             this box
+    * @param boundary_box         BoundaryBox object that stores information
+    *                             about the type and location of the boundary
+    *                             where ghost cells will be filled
+    */
+   virtual void
+   fillSingularityBoundaryConditions(
+      hier::Patch& patch,
+      tbox::List<tbox::Pointer<hier::Patch> >&
+      singularity_patches,
+      const double fill_time,
+      const hier::Box& fill_box,
+      const hier::BoundaryBox& boundary_box);
+
+   /*!
+    * @brief Return maximum stencil width needed for user-defined
+    * data interpolation operations.  This is needed to
+    * determine the correct interpolation data dependencies.
+    *
+    * Always returns an IntVector of ones, because that is the maximum
+    * stencil needed for the operations in MultiblockGriddingAlgorithm
+    */
+   virtual hier::IntVector getRefineOpStencilWidth() const
+   {
+      return hier::IntVector::getOne(d_dim);
+   }
+
+   /*!
+    * Perform user-defined refining operations.  This member function
+    * is called before standard refining operations (expressed using
+    * concrete subclasses of the xfer::RefineOperator base class).
+    * The preprocess function must refine data from the scratch components
+    * of the coarse patch into the scratch components of the fine patch on the
+    * specified fine box region.  Recall that the scratch components are
+    * specified in calls to the registerRefine() function in the
+    * xfer::RefineAlgorithm class.
+    *
+    * @param fine        Fine patch containing destination data.
+    * @param coarse      Coarse patch containing source data.
+    * @param fine_box    Box region on fine patch into which data is refined.
+    * @param ratio       Integer vector containing ratio relating index space
+    *                    between coarse and fine patches.
+    */
+   virtual void preprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio)
+   {
+      (void)fine;
+      (void)coarse;
+      (void)fine_box;
+      (void)ratio;
+   }
+
+   /*!
+    * Perform user-defined refining operations.  This member function
+    * is called before standard refining operations (expressed using
+    * concrete subclasses of the xfer::RefineOperator base class).
+    * The postprocess function must refine data from the scratch components
+    * of the coarse patch into the scratch components of the fine patch on the
+    * specified fine box region.  Recall that the scratch components are
+    * specified in calls to the registerRefine() function in the
+    * xfer::RefineAlgorithm class.
+    *
+    * @param fine        Fine patch containing destination data.
+    * @param coarse      Coarse patch containing source data.
+    * @param fine_box    Box region on fine patch into which data is refined.
+    * @param ratio       Integer vector containing ratio relating index space
+    *                    between coarse and fine patches.
+    */
+   virtual void
+   postprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio);
+
+private:
+   const tbox::Dimension d_dim;
+
+   /*
+    * Patch data index for
+    */
+   int d_buf_tag_indx;
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/SpatialKey.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/SpatialKey.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,277 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Spatial Key used for generating space-filling curves. 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_SpatialKey_C
+#define included_mesh_SpatialKey_C
+
+#include "SAMRAI/mesh/SpatialKey.h"
+
+#include <stdio.h>
+#include <iomanip>
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/mesh/SpatialKey.I"
+#endif
+
+#define BITS_PER_BYTE 8
+#define BITS_PER_HEX_CHAR 4
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace mesh {
+
+// using namespace std;
+
+/*
+ ****************************************************************************
+ *                                                                          *
+ * Default Constructor.  Creates a spatial key with value 0 for all         *
+ * entries in d_key.                                                        *
+ *                                                                          *
+ ****************************************************************************
+ */
+SpatialKey::SpatialKey()
+{
+   d_bits_per_int = BITS_PER_BYTE * sizeof(unsigned int);
+   setToZero();
+}
+
+/*
+ ****************************************************************************
+ *                                                                          *
+ * Creates a spatial key from the i,j,k coordinates by invoking             *
+ * setKey().                                                                *
+ *                                                                          *
+ ****************************************************************************
+ */
+SpatialKey::SpatialKey(
+   const unsigned int i,
+   const unsigned int j,
+   const unsigned int k,
+   const unsigned int level_num)
+{
+   d_bits_per_int = BITS_PER_BYTE * sizeof(unsigned int);
+   setKey(i, j, k, level_num);
+}
+
+/*
+ ****************************************************************************
+ *                                                                          *
+ * Creates a SpatialKey by copying the value from a pre-existing       *
+ * SpatialKey.                                                         *
+ *                                                                          *
+ ****************************************************************************
+ */
+SpatialKey::SpatialKey(
+   const SpatialKey& spatial_key)
+{
+   d_bits_per_int = BITS_PER_BYTE * sizeof(unsigned int);
+   for (int i = 0; i < NUM_COORDS_MIXED_FOR_SPATIAL_KEY; i++) {
+      d_key[i] = spatial_key.d_key[i];
+   }
+}
+
+/*
+ ****************************************************************************
+ *                                                                          *
+ * The destructor for a spatial key does nothing interesting.               *
+ *                                                                          *
+ ****************************************************************************
+ */
+SpatialKey::~SpatialKey()
+{
+}
+
+/*
+ ****************************************************************************
+ *                                                                          *
+ * Less than operator for spatial keys.  Returns true if the first          *
+ * integer in the d_key arrays that differs is such that                    *
+ * this.d_key[i] < spatial_key.d_key[i].                                    *
+ *                                                                          *
+ ****************************************************************************
+ */
+bool SpatialKey::operator < (
+   const SpatialKey& spatial_key) const
+{
+   int i = NUM_COORDS_MIXED_FOR_SPATIAL_KEY - 1;
+
+   while (i >= 0) {
+      if (d_key[i] < spatial_key.d_key[i]) {
+         return true;
+      } else if (d_key[i] > spatial_key.d_key[i]) {
+         return false;
+      }
+      i--;
+   }
+
+   // the two spatial keys are equal, so return false
+   return false;
+}
+
+/*
+ ****************************************************************************
+ *                                                                          *
+ * Less than or equal operator for spatial keys.  Returns true if           *
+ * this key is less or equal to the argument key.                           *
+ *                                                                          *
+ ****************************************************************************
+ */
+bool SpatialKey::operator <= (
+   const SpatialKey& spatial_key) const
+{
+   return ((*this) < spatial_key) || ((*this) == spatial_key);
+}
+
+/*
+ ****************************************************************************
+ *                                                                          *
+ * Greater than operator for spatial keys. Returns true if this key is      *
+ * is greater than the argument key.                                        *
+ *                                                                          *
+ ****************************************************************************
+ */
+bool SpatialKey::operator > (
+   const SpatialKey& spatial_key) const
+{
+   return !((*this) < spatial_key) && ((*this) != spatial_key);
+}
+
+/*
+ ****************************************************************************
+ *                                                                          *
+ * Greater than or equal operator for spatial keys.  Returns true if this   *
+ * key is greater than or equal to the argument key.                        *
+ *                                                                          *
+ ****************************************************************************
+ */
+bool SpatialKey::operator >= (
+   const SpatialKey& spatial_key) const
+{
+   return ((*this) > spatial_key) || ((*this) == spatial_key);
+}
+
+/*
+ ****************************************************************************
+ *                                                                          *
+ * Write a spatial key to an output stream.  The spatial key is             *
+ * output in hex to avoid the binary to decimal conversion of the           *
+ * extended integer key.                                                    *
+ *                                                                          *
+ * Uses sprintf() to create std::string because the behavior of C++ stream       *
+ * manipulators not standardized yet.                                       *
+ *                                                                          *
+ ****************************************************************************
+ */
+std::ostream& operator << (
+   std::ostream& s,
+   const SpatialKey& spatial_key)
+{
+   char* buf = new char[spatial_key.d_bits_per_int / BITS_PER_HEX_CHAR
+                        * NUM_COORDS_MIXED_FOR_SPATIAL_KEY + 1];
+
+   for (int i = NUM_COORDS_MIXED_FOR_SPATIAL_KEY - 1; i >= 0; i--) {
+      sprintf(&(buf[spatial_key.d_bits_per_int / BITS_PER_HEX_CHAR
+                    * ((NUM_COORDS_MIXED_FOR_SPATIAL_KEY - 1) - i)]),
+         "%08x", spatial_key.d_key[i]);
+   }
+
+   s << buf;
+   delete[] buf;
+
+   return s;
+}
+
+/*
+ ****************************************************************************
+ *                                                                          *
+ * Blends one coordinate into the spatial key.  coord is the                *
+ * value of the coordinate and coord_offset is the offset for the           *
+ * coordinate being  blended in.                                            *
+ *                                                                          *
+ ****************************************************************************
+ */
+void SpatialKey::blendOneCoord(
+   const unsigned int coord,
+   const int coord_offset)
+{
+   unsigned int shifted_coord = coord;
+
+   int bit_in_int;
+   for (bit_in_int = 0; bit_in_int < d_bits_per_int; bit_in_int++) {
+      if (shifted_coord & ((unsigned int)1)) {
+         unsigned int bit_index;
+         int int_index;
+         int bit_offset;
+
+         bit_index = NUM_COORDS_MIXED_FOR_SPATIAL_KEY * bit_in_int
+            + coord_offset;
+         int_index = bit_index / d_bits_per_int;
+         bit_offset = bit_index & (d_bits_per_int - 1);
+         d_key[int_index] |= (((unsigned int)1) << bit_offset);
+
+      }
+      shifted_coord = shifted_coord >> 1;
+   }
+}
+
+/*
+ ****************************************************************************
+ *                                                                          *
+ * setKey() takes the index space coordinates and the level number          *
+ * and sets the value of the spatial key.  If the coordinates have          *
+ * binary representation given by                                           *
+ * (i32)(i31)...(i1)(i0), etc., the resulting spatial key                   *
+ * has the following form:                                                  *
+ * (i32)(j32)(k32)(ln32)(i31)(j31)(k31)(ln31)...(i0)(j0)(k0)(ln0).          *
+ * This result is stored as an array of four unsigned integers.             *
+ *                                                                          *
+ ****************************************************************************
+ */
+void SpatialKey::setKey(
+   const unsigned int i,
+   const unsigned int j,
+   const unsigned int k,
+   const unsigned int level_num)
+{
+   setToZero();
+
+   /* blend in x coordinate */
+   blendOneCoord(i, 3);
+
+   /* blend in y coordinate */
+   blendOneCoord(j, 2);
+
+   /* blend in z coordinate */
+   blendOneCoord(k, 1);
+
+   /* blend in level number */
+   blendOneCoord(level_num, 0);
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/SpatialKey.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/SpatialKey.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Spatial Key used for generating space-filling curves. 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace mesh {
+
+/*
+ ****************************************************************************
+ *                                                                          *
+ * Copies the spatial key.                                                  *
+ *                                                                          *
+ ****************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+SpatialKey& SpatialKey::operator = (
+   const SpatialKey& spatial_key)
+{
+   for (int i = 0; i < NUM_COORDS_MIXED_FOR_SPATIAL_KEY; i++) {
+      d_key[i] = spatial_key.d_key[i];
+   }
+   return *this;
+}
+
+/*
+ ****************************************************************************
+ *                                                                          *
+ * Compare two spatial keys for equality.  All values in d_key must be      *
+ * equal for this to return true.                                           *
+ *                                                                          *
+ ****************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+bool SpatialKey::operator == (
+   const SpatialKey& spatial_key) const
+{
+   bool are_equal = true;
+   for (int i = 0; i < NUM_COORDS_MIXED_FOR_SPATIAL_KEY; i++) {
+      if (d_key[i] != spatial_key.d_key[i]) are_equal = false;
+   }
+   return are_equal;
+}
+
+/*
+ ****************************************************************************
+ *                                                                          *
+ * Compare two spatial keys for inequality.  Returns true if the keys are   *
+ * not equal.                                                               *
+ *                                                                          *
+ ****************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+bool SpatialKey::operator != (
+   const SpatialKey& spatial_key) const
+{
+   return !((*this) == spatial_key);
+}
+
+/*
+ ****************************************************************************
+ *                                                                          *
+ * Zeroes key by setting all values in d_key to 0.                          *
+ *                                                                          *
+ ****************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+void SpatialKey::setToZero()
+{
+   for (int i = 0; i < NUM_COORDS_MIXED_FOR_SPATIAL_KEY; i++) {
+      d_key[i] = 0;
+   }
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/SpatialKey.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/SpatialKey.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,177 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   spatial key used for generating space-filling curves. 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_SpatialKey
+#define included_mesh_SpatialKey
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <iostream>
+
+#ifndef NUM_COORDS_MIXED_FOR_SPATIAL_KEY
+#define NUM_COORDS_MIXED_FOR_SPATIAL_KEY 4
+#endif
+
+namespace SAMRAI {
+namespace mesh {
+
+/**
+ * Class SpatialKey provides a mapping from coordinates in
+ * an abstract index space to a key that can be used to order the
+ * the points with a Morton-type space filling curve (See Gutman,
+ * Dr Dobb's Journal, July 1999, pg 115-21 for an introduction).
+ * This curve orders a set of points in space so that points near
+ * each other in space are likely, but not guaranteed, to be near
+ * each other in the ordering.
+ */
+
+class SpatialKey
+{
+public:
+   /**
+    * The default constructor creates a spatial key with zero value.
+    */
+   SpatialKey();
+
+   /**
+    * Create a spatial key from given index space coordinates and
+    * level number.
+    */
+   SpatialKey(
+      const unsigned int i,
+      const unsigned int j = 0,
+      const unsigned int k = 0,
+      const unsigned int level_num = 0);
+
+   /**
+    * Copy constructor for spatial key.
+    */
+   SpatialKey(
+      const SpatialKey& spatial_key);
+
+   /**
+    * The destructor for a spatial key does nothing interesting.
+    */
+   ~SpatialKey();
+
+   /**
+    * Assignment operator for spatial key.
+    */
+   SpatialKey&
+   operator = (
+      const SpatialKey& spatial_key);
+
+   /**
+    * Return true if argument key is equal to this key.  Otherwise,
+    * return false.
+    */
+   bool
+   operator == (
+      const SpatialKey& spatial_key) const;
+
+   /**
+    * Return true if argument key is not equal to this key.  Otherwise,
+    * return false.
+    */
+   bool
+   operator != (
+      const SpatialKey& spatial_key) const;
+
+   /**
+    * Return true if this key is less than argument key.  Otherwise,
+    * return false.
+    */
+   bool
+   operator < (
+      const SpatialKey& spatial_key) const;
+
+   /**
+    * Return true if this key is less than or equal to argument key.
+    * Otherwise, return false.
+    */
+   bool
+   operator <= (
+      const SpatialKey& spatial_key) const;
+
+   /**
+    * Return true if this key is greater than argument key.  Otherwise,
+    * return false.
+    */
+   bool
+   operator > (
+      const SpatialKey& spatial_key) const;
+
+   /**
+    * Return true if this key is greater than or equal to argument key.
+    * Otherwise, return false.
+    */
+   bool
+   operator >= (
+      const SpatialKey& spatial_key) const;
+
+   /**
+    * Set this key to zero key.
+    */
+   void
+   setToZero();
+
+   /**
+    * Set this key from the index space coordinates and the level number.
+    *
+    * The values of i, j, and k default to 0 to handle cases
+    * where the number of dimensions in the problem is not 3.
+    * The default value of level_num is also 0.
+    */
+   void
+   setKey(
+      const unsigned int i = 0,
+      const unsigned int j = 0,
+      const unsigned int k = 0,
+      const unsigned int level_num = 0);
+
+   /**
+    * Write a spatial key to an output stream.  The spatial key is
+    * output in hex to avoid the binary to decimal conversion of the
+    * key.
+    *
+    * Note that the proper functioning of this method depends on
+    * having 32 bits per integer (more specifically, 8 hex characters
+    * per integer).
+    *
+    */
+   friend std::ostream&
+   operator << (
+      std::ostream& s,
+      const SpatialKey& spatial_key);
+
+private:
+   /*
+    * Mix in one index space coordinate into the spatial
+    * key.  coord is the value of the coordinate, and
+    * coord_offset refers which coordinate is being blended
+    * in.  coord_offset values of 3,2,1 indicate the
+    * i,j,k coordinates respectively.  A coord_offset value
+    * of 0 indicate the level number.
+    */
+   void
+   blendOneCoord(
+      const unsigned int coord,
+      const int coord_offset);
+
+   int d_bits_per_int;
+   unsigned int d_key[NUM_COORDS_MIXED_FOR_SPATIAL_KEY];
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/mesh/SpatialKey.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/StandardTagAndInitStrategy.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/StandardTagAndInitStrategy.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,166 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Strategy interface for Richardson extrapolation error detection. 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_StandardTagAndInitStrategy_C
+#define included_mesh_StandardTagAndInitStrategy_C
+
+#include "SAMRAI/mesh/StandardTagAndInitStrategy.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace mesh {
+
+// using namespace std;
+
+StandardTagAndInitStrategy::StandardTagAndInitStrategy()
+{
+}
+
+StandardTagAndInitStrategy::~StandardTagAndInitStrategy()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default virtual function implementations.                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void StandardTagAndInitStrategy::applyGradientDetector(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const double error_data_time,
+   const int tag_index,
+   const bool initial_time,
+   const bool uses_richardson_extrapolation_too)
+{
+   NULL_USE(hierarchy);
+   NULL_USE(level_number);
+   NULL_USE(error_data_time);
+   NULL_USE(tag_index);
+   NULL_USE(initial_time);
+   NULL_USE(uses_richardson_extrapolation_too);
+   TBOX_WARNING("StandardTagAndInitStrategy::applyGradientDetector()"
+      << "\nNo class supplies a concrete implementation for "
+      << "\nthis method.  The default abstract method (which "
+      << "\ndoes no cell tagging) is executed" << std::endl);
+}
+
+void StandardTagAndInitStrategy::coarsenDataForRichardsonExtrapolation(
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int level_number,
+   const tbox::Pointer<hier::PatchLevel> coarser_level,
+   const double coarsen_data_time,
+   const bool before_advance)
+{
+   NULL_USE(hierarchy);
+   NULL_USE(level_number);
+   NULL_USE(coarser_level);
+   NULL_USE(coarsen_data_time);
+   NULL_USE(before_advance);
+   TBOX_WARNING("StandardTagAndInitStrategy::"
+      << "coarsenDataForRichardsonExtrapolation()"
+      << "\nNo class supplies a concrete implementation for "
+      << "\nthis method.  The default abstract method (which "
+      << "\ndoes nothing) is executed" << std::endl);
+}
+
+void StandardTagAndInitStrategy::applyRichardsonExtrapolation(
+   const tbox::Pointer<hier::PatchLevel> level,
+   const double error_data_time,
+   const int tag_index,
+   const double deltat,
+   const int error_coarsen_ratio,
+   const bool initial_time,
+   const bool uses_gradient_detector_too)
+{
+   NULL_USE(level);
+   NULL_USE(error_data_time);
+   NULL_USE(tag_index);
+   NULL_USE(deltat);
+   NULL_USE(error_coarsen_ratio);
+   NULL_USE(initial_time);
+   NULL_USE(uses_gradient_detector_too);
+   TBOX_WARNING("StandardTagAndInitStrategy::"
+      << "applyRichardsonExtrapolation()"
+      << "\nNo class supplies a concrete implementation for "
+      << "\nthis method.  The default abstract method (which "
+      << "\ndoes nothing) is executed" << std::endl);
+}
+
+double StandardTagAndInitStrategy::getLevelDt(
+   const tbox::Pointer<hier::BasePatchLevel> level,
+   const double dt_time,
+   const bool initial_time)
+{
+   NULL_USE(level);
+   NULL_USE(dt_time);
+   NULL_USE(initial_time);
+   TBOX_WARNING("StandardTagAndInitStrategy::getLevelDt()"
+      << "\nNo class supplies a concrete implementation for "
+      << "\nthis method.  The default abstract method (which "
+      << "\nsimply returns 0.) is executed" << std::endl);
+   return 0.0;
+}
+
+void StandardTagAndInitStrategy::resetTimeDependentData(
+   const tbox::Pointer<hier::BasePatchLevel> level,
+   const double new_time,
+   const bool can_be_refined)
+{
+   NULL_USE(level);
+   NULL_USE(new_time);
+   NULL_USE(can_be_refined);
+   TBOX_WARNING("StandardTagAndInitStrategy::resetTimeDependentData()"
+      << "\nNo class supplies a concrete implementation for "
+      << "\nthis method.  The default abstract method (which "
+      << "\ndoes nothing) is executed" << std::endl);
+}
+
+double StandardTagAndInitStrategy::advanceLevel(
+   const tbox::Pointer<hier::BasePatchLevel> level,
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const double current_time,
+   const double new_time,
+   const bool first_step,
+   const bool last_step,
+   const bool regrid_advance)
+{
+   NULL_USE(level);
+   NULL_USE(hierarchy);
+   NULL_USE(current_time);
+   NULL_USE(new_time);
+   NULL_USE(first_step);
+   NULL_USE(last_step);
+   NULL_USE(regrid_advance);
+   TBOX_WARNING("StandardTagAndInitStrategy::advanceLevel()"
+      << "\nNo class supplies a concrete implementation for "
+      << "\nthis method.  The default abstract method (which "
+      << "\ndoes nothing) is executed" << std::endl);
+   return 0.0;
+}
+
+void StandardTagAndInitStrategy::resetDataToPreadvanceState(
+   const tbox::Pointer<hier::BasePatchLevel> level)
+{
+   NULL_USE(level);
+   TBOX_WARNING("StandardTagAndInitStrategy::"
+      << "resetDataToPreadvanceState()"
+      << "\nNo class supplies a concrete implementation for "
+      << "\nthis method.  The default abstract method (which "
+      << "\ndoes nothing) is executed" << std::endl);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/StandardTagAndInitStrategy.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/StandardTagAndInitStrategy.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,337 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Strategy interface for Richardson Extrapolation algorithm. 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_StandardTagAndInitStrategy
+#define included_mesh_StandardTagAndInitStrategy
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace mesh {
+
+/**
+ * Class StandardTagAndInitStrategy is an abstract base class
+ * that defines a Strategy pattern interface for concrete cell tagging
+ * and level initialization operations that are needed by the
+ * StandardTagAndInitialize class.  This base class insulates
+ * that algorithm class from routines for initializing a new level in
+ * the hierarchy and for tagging cells to be refined.  Generally, these
+ * operations are specific to the problem being solved and the solution
+ * methods being employed.  An object of this type is passed into the
+ * StandardTagAndInitialize constructor.
+ *
+ * This base class has two pure virtual functions:
+ * initializeLevelData(), and resetHierarchyConfiguration() that must
+ * be implemented for any regridding method.  The first function sets
+ * data on a new level after regridding.  The second function is called
+ * at the end of the regridding process and can be used to set communication
+ * schedules, for example, which depend on the configuration of the AMR
+ * patch hierarchy.  Other routines are virtual here and given default
+ * implementations as they are specific to only one type of error estimation
+ * method.  Gradient detector functionality requires an implementation of
+ * the applyGradientDetector() routine.  The Richardson extrapolation method
+ * requires implementations of the methods: applyRichardsonExtrapolation(),
+ * coarsenDataForRichardsonExtrapolation(), getLevelDt(), advanceLevel(),
+ * resetTimeDependentData(), and resetDataToPreadvanceState().
+ *
+ * @see mesh::StandardTagAndInitialize.
+ */
+
+class StandardTagAndInitStrategy:
+   public virtual tbox::DescribedClass
+{
+public:
+   /**
+    * Default constructor for
+    * StandardTagAndInitStrategy.
+    */
+   StandardTagAndInitStrategy();
+
+   /**
+    * Empty destructor for
+    * StandardTagAndInitStrategy.
+    */
+   virtual ~StandardTagAndInitStrategy();
+
+   /**
+    * Determine time increment to advance data on level. The
+    * recompute_dt option specifies whether to compute
+    * the timestep using the current level data or to return the value
+    * stored by the time integrator. The default true setting means
+    * the timestep will be computed if no value is supplied.
+    *
+    * This routine is only when Richardson extrapolation is being used.
+    * It is virtual with an empty implementation here (rather than pure
+    * virtual) so that users are not required to provide an implementation
+    * when the function is not needed.
+    */
+   virtual double
+   getLevelDt(
+      const tbox::Pointer<hier::BasePatchLevel> level,
+      const double dt_time,
+      const bool initial_time);
+
+   /**
+    * Advance data on all patches on specified patch level from current time
+    * (current_time) to new time (new_time).   This routine is called only
+    * during time-dependent regridding procedures, such as Richardson
+    * extrapolation.  It is virtual with an empty implementation here (rather
+    * than pure virtual) so that users are not required to provide an
+    * implementation when the function is not needed.  The boolean arguments
+    * are used to determine the state of the algorithm and the data when the
+    * advance routine is called.  Note that this advance function is also
+    * used during normal time integration steps.
+    *
+    * When this function is called, the level data required to begin the
+    * advance must be allocated and be defined appropriately.  Typically,
+    * this is equivalent to what is needed to initialize a new level after
+    * regridding.  Upon exiting this routine, both current and new data may
+    * exist on the level.  This data is needed until level synchronization
+    * occurs, in general. Current and new data may be reset by calling
+    * the member function resetTimeDependentData().
+    *
+    * This routine is called from two different points within the Richardson
+    * exptrapolation process: to advance a temporary level that is coarser
+    * than the hierarchy level on which error estimation is performed, and
+    * to advance the hierarchy level itself.  In the first case, the values of
+    * the boolean flags are:
+    *
+    *
+    *
+    *    - \b  first_step
+    *        = true.
+    *    - \b  last_step
+    *        = true.
+    *    - \b  regrid_advance
+    *        = true.
+    *
+    *
+    *
+    * In the second case, the values of the boolean flags are:
+    *
+    *
+    *
+    *    - \b  first_step
+    *      (when regridding during time integration sequence)
+    *        = true when the level is not coarsest level to synchronize
+    *          immediately before the regridding process; else, false.
+    *      (when generating initial hierarchy construction)
+    *        = true, even though there may be multiple advance steps.
+    *    - \b  last_step
+    *        = true when the advance is the last in the Richardson
+    *          extrapolation step sequence; else false.
+    *    - \b  regrid_advance
+    *        = true.
+    *
+    *
+    *
+    */
+   virtual double
+   advanceLevel(
+      const tbox::Pointer<hier::BasePatchLevel> level,
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const double current_time,
+      const double new_time,
+      const bool first_step,
+      const bool last_step,
+      const bool regrid_advance = false);
+
+   /**
+    * Reset time-dependent data storage for the specified patch level.
+    *
+    * This routine only applies when Richardson extrapolation is being used.
+    * It is virtual with an empty implementation here (rather than pure
+    * virtual) so that users are not required to provide an implementation
+    * when the function is not needed.
+    */
+   virtual void
+   resetTimeDependentData(
+      const tbox::Pointer<hier::BasePatchLevel> level,
+      const double new_time,
+      const bool can_be_refined);
+
+   /**
+    * Reset data on the patch level by destroying all patch data other
+    * than that which is needed to initialize the solution on that level.
+    * In other words, this is the data needed to begin a time integration
+    * step on the level.
+    *
+    * This routine is only when Richardson extrapolation is being used.
+    * It is virtual with an empty implementation here (rather than pure
+    * virtual) so that users are not required to provide an implementation
+    * when the function is not needed.
+    */
+   virtual void
+   resetDataToPreadvanceState(
+      const tbox::Pointer<hier::BasePatchLevel> level);
+
+   /**
+    * Initialize data on a new level after it is inserted into an AMR patch
+    * hierarchy by the gridding algorithm.  The level number indicates
+    * that of the new level.
+    *
+    * Generally, when data is set, it is interpolated from coarser levels
+    * in the hierarchy.  If the old level pointer in the argument list is
+    * non-null, then data is copied from the old level to the new level
+    * on regions of intersection between those levels before interpolation
+    * occurs.   In this case, the level number must match that of the old
+    * level.  The specific operations that occur when initializing level
+    * data are determined by the particular solution methods in use; i.e.,
+    * in the subclass of this abstract base class.
+    *
+    * The boolean argument initial_time indicates whether the level is
+    * being introduced for the first time (i.e., at initialization time),
+    * or after some regrid process during the calculation beyond the initial
+    * hierarchy construction.  This information is provided since the
+    * initialization of the data may be different in each of those
+    * circumstances.  The can_be_refined boolean argument indicates whether
+    * the level is the finest allowable level in the hierarchy.
+    */
+   virtual void
+   initializeLevelData(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double init_data_time,
+      const bool can_be_refined,
+      const bool initial_time,
+      const tbox::Pointer<hier::BasePatchLevel> old_level =
+         tbox::Pointer<hier::BasePatchLevel>(NULL),
+      const bool allocate_data = true) = 0;
+
+   /**
+    * After hierarchy levels have changed and data has been initialized on
+    * the new levels, this routine can be used to reset any information
+    * needed by the solution method that is particular to the hierarchy
+    * configuration.  For example, the solution procedure may cache
+    * communication schedules to amortize the cost of data movement on the
+    * AMR patch hierarchy.  This function will be called by the gridding
+    * algorithm after the initialization occurs so that the algorithm-specific
+    * subclass can reset such things.  Also, if the solution method must
+    * make the solution consistent across multiple levels after the hierarchy
+    * is changed, this process may be invoked by this routine.  Of course the
+    * details of these processes are determined by the particular solution
+    * methods in use.
+    *
+    * The level number arguments indicate the coarsest and finest levels
+    * in the current hierarchy configuration that have changed.  It should
+    * be assumed that all intermediate levels have changed as well.
+    */
+   virtual void
+   resetHierarchyConfiguration(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level) = 0;
+
+   /**
+    * Set integer tags to "one" in cells where refinement of the given
+    * level should occur according to some user-supplied gradient criteria.
+    * The double time argument is the regrid time.  The integer "tag_index"
+    * argument is the patch descriptor index of the cell-centered integer tag
+    * array on each patch in the hierarchy.  The boolean argument
+    * initial_time indicates whether the level is being subject to refinement
+    * at the initial simulation time.  If it is false, then the error
+    * estimation process is being invoked at some later time after the AMR
+    * hierarchy was initially constructed.  Typically, this information is
+    * passed to the user's patch tagging routines since the error
+    * estimator or gradient detector may be different in each case.
+    *
+    * The boolean uses_richardson_extrapolation_too is true when Richardson
+    * extrapolation error estimation is used in addition to the gradient
+    * detector, and false otherwise.  This argument helps the user to
+    * manage multiple regridding criteria.
+    *
+    * This routine is only when gradient detector is being used.
+    * It is virtual with an empty implementation here (rather than pure
+    * virtual) so that users are not required to provide an implementation
+    * when the function is not needed.
+    */
+   virtual void
+   applyGradientDetector(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double error_data_time,
+      const int tag_index,
+      const bool initial_time,
+      const bool uses_richardson_extrapolation_too);
+
+   /**
+    * Set integer tags to "one" in cells where refinement of the given
+    * level should occur according to some user-supplied Richardson
+    * extrapolation criteria.  The "error_data_time" argument is the
+    * regrid time.  The "deltat" argument is the time increment to advance
+    * the solution on the level to be refined.  Note that that level is
+    * finer than the level in the argument list, in general.  The
+    * ratio between the argument level and the actual hierarchy level
+    * is given by the integer "coarsen ratio".
+    *
+    * The integer "tag_index" argument is the patch descriptor index of
+    * the cell-centered integer tag array on each patch in the hierarchy.
+    *
+    * The boolean argument initial_time indicates whether the level is being
+    * subject to refinement at the initial simulation time.  If it is false,
+    * then the error estimation process is being invoked at some later time
+    * after the AMR hierarchy was initially constructed.  Typically, this
+    * information is passed to the user's patch tagging routines since the
+    * application of the Richardson extrapolation process may be different
+    * in each case.
+    *
+    * The boolean uses_gradient_detector_too is true when a gradient
+    * detector procedure is used in addition to Richardson extrapolation,
+    * and false otherwise.  This argument helps the user to manage multiple
+    * regridding criteria.
+    *
+    * This routine is only when Richardson extrapolation is being used.
+    * It is virtual with an empty implementation here (rather than pure
+    * virtual) so that users are not required to provide an implementation
+    * when the function is not needed.
+    */
+   virtual void
+   applyRichardsonExtrapolation(
+      const tbox::Pointer<hier::PatchLevel> level,
+      const double error_data_time,
+      const int tag_index,
+      const double deltat,
+      const int error_coarsen_ratio,
+      const bool initial_time,
+      const bool uses_gradient_detector_too);
+
+   /**
+    * Coarsen solution data from level to coarse_level for Richardson
+    * extrapolation.  Note that this routine will be called twice during
+    * the Richardson extrapolation error estimation process, once to set
+    * data on the coarser level and once to coarsen data from after
+    * advancing the fine level.  The init_coarse_level boolean argument
+    * indicates whether data is set on the coarse level by coarsening the
+    * "old" time level solution or by coarsening the "new" solution on the
+    * fine level (i.e., after it has been advanced).
+    *
+    * This routine is only when Richardson extrapolation is being used.
+    * It is virtual with an empty implementation here (rather than pure
+    * virtual) so that users are not required to provide an implementation
+    * when the function is not needed.
+    */
+   virtual void
+   coarsenDataForRichardsonExtrapolation(
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int level_number,
+      const tbox::Pointer<hier::PatchLevel> coarser_level,
+      const double coarsen_data_time,
+      const bool before_advance);
+
+private:
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/StandardTagAndInitialize.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/StandardTagAndInitialize.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1139 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Routines for performing cell-tagging and initializing
+ *                a new level. 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_StandardTagAndInitialize_C
+#define included_mesh_StandardTagAndInitialize_C
+
+#include "SAMRAI/mesh/StandardTagAndInitialize.h"
+
+#include "SAMRAI/pdat/CellIntegerConstantRefine.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/MappedBoxContainerUtils.h"
+#include "SAMRAI/hier/NeighborhoodSet.h"
+#include "SAMRAI/hier/OverlapConnectorAlgorithm.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/mesh/StandardTagAndInitialize.I"
+#endif
+
+#include <stdio.h>
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN 77 routines used in Richardson      *
+ * extrapolation algorithm to coarsen tagged cells from fine to coarse   *
+ * level.                                                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+extern "C" {
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+// in coarsentags1d.f:
+void F77_FUNC(coarsentags1d, COARSENTAGS1D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const int *, int *);
+// in coarsentags2d.f:
+void F77_FUNC(coarsentags2d, COARSENTAGS2D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const int *, int *);
+// in coarsentags3d.f:
+void F77_FUNC(coarsentags3d, COARSENTAGS3D) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const int *, int *);
+}
+
+#define DEBUG_TIMES
+//#undef DEBUG_TIMES
+
+namespace SAMRAI {
+namespace mesh {
+
+// using namespace std;
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Static function that computes greatest common divisor.                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+static int
+GCD(
+   const int a,
+   const int b);
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructors and destructor for StandardTagAndInitialize.        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+StandardTagAndInitialize::StandardTagAndInitialize(
+   const tbox::Dimension& dim,
+   const std::string& object_name,
+   StandardTagAndInitStrategy* tag_strategy,
+   tbox::Pointer<tbox::Database> input_db):
+   TagAndInitializeStrategy(dim)
+{
+   TBOX_ASSERT(!object_name.empty());
+
+   d_object_name = object_name;
+   d_tag_strategy = tag_strategy;
+
+   d_error_coarsen_ratio = 1;
+
+   d_use_gradient_detector = false;
+   d_use_richardson_extrapolation = false;
+   d_use_refine_boxes = false;
+
+   /*
+    * If no input database is provided, no criteria is set to tag cells
+    * so cell-tagging will not occur.  Print a warning to indicate if
+    * this is the case.
+    */
+   if (input_db.isNull()) {
+      TBOX_WARNING(
+         d_object_name << ":constructor \n"
+         <<
+         "no input database specified - NO METHOD IS SPECIFIED TO TAG \n"
+         <<
+         "CELLS FOR REFINEMENT so no tagging is performed.");
+   } else {
+      getFromInput(input_db);
+   }
+
+   /*
+    * If the user wishes to only use the REFINE_BOXES tagging option,
+    * the registered strategy class may be null.  In order to use
+    * the GRADIENT_DETECTOR or RICHARDSON_EXTRAPOLATION options, the
+    * registered StandardTagAndInitStrategy must be non-NULL.
+    */
+   if (d_use_gradient_detector || d_use_richardson_extrapolation) {
+      if (tag_strategy == ((mesh::StandardTagAndInitStrategy *)NULL)) {
+         TBOX_ERROR(
+            d_object_name << ":constructor "
+            << "\nThe supplied implementation of the "
+            <<
+            "\nStandardTagAndInitStrategy is NULL.  It must be"
+            <<
+            "\nnon-NULL to use the GRADIENT_DETECTOR or"
+            <<
+            "\nRICHARDSON_EXTRAPOLATION tagging options." << std::endl);
+      }
+   }
+}
+
+StandardTagAndInitialize::~StandardTagAndInitialize()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Pass requests to initialize level data, reset hierarchy information,  *
+ * and apply an application-specific gradient detector to                *
+ * the subclass of the StandardTagAndInitStrategX data member.      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void StandardTagAndInitialize::initializeLevelData(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const double init_data_time,
+   const bool can_be_refined,
+   const bool initial_time,
+   const tbox::Pointer<hier::BasePatchLevel> old_level,
+   const bool allocate_data)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= hierarchy->getFinestLevelNumber()));
+   if (!(old_level.isNull())) {
+      TBOX_ASSERT(level_number == old_level->getLevelNumber());
+   }
+   TBOX_ASSERT(!(hierarchy->getPatchLevel(level_number)).isNull());
+#endif
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(getDim(), *hierarchy);
+
+   if (d_tag_strategy != ((mesh::StandardTagAndInitStrategy *)NULL)) {
+      d_tag_strategy->initializeLevelData(hierarchy,
+         level_number,
+         init_data_time,
+         can_be_refined,
+         initial_time,
+         old_level,
+         allocate_data);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Reset hierarchy configuration information where the range of new      *
+ * hierarchy levels is specified.                                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void StandardTagAndInitialize::resetHierarchyConfiguration(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level)
+{
+
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (coarsest_level <= finest_level)
+      && (finest_level <= hierarchy->getFinestLevelNumber()));
+#ifdef DEBUG_CHECK_ASSERTIONS
+   for (int ln0 = 0; ln0 <= finest_level; ln0++) {
+      TBOX_ASSERT(!(hierarchy->getPatchLevel(ln0)).isNull());
+   }
+#endif
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(getDim(), *hierarchy);
+
+   if (d_tag_strategy != ((mesh::StandardTagAndInitStrategy *)NULL)) {
+      d_tag_strategy->resetHierarchyConfiguration(hierarchy,
+         coarsest_level,
+         finest_level);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Tag cells on level where refinement should occur.   The method can    *
+ * tag cells using either of three options:                              *
+ *                                                                       *
+ *    1) Richardson extrapolation                                        *
+ *    2) gradient detection                                              *
+ *    3) user supplied refine boxes.                                     *
+ *                                                                       *
+ * These options may be used individually or in combination.  If used in *
+ * combination,  it is IMPORTANT TO PRESERVE THE ORDER of the calls      *
+ * (Richardson extrapolation 1st, gradient detection 2nd, user-supplied  *
+ * refine boxes 3rd) in this method because users may have logic in      *
+ * their code to compare how cells are tagged and changing the order     *
+ * could destroy this logic.                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void StandardTagAndInitialize::tagCellsForRefinement(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const double regrid_time,
+   const int tag_index,
+   const bool initial_time,
+   const bool coarsest_sync_level,
+   const bool can_be_refined,
+   const double regrid_start_time)
+{
+   TBOX_ASSERT(!(hierarchy.isNull()));
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= hierarchy->getFinestLevelNumber()));
+   TBOX_ASSERT(!(hierarchy->getPatchLevel(level_number).isNull()));
+   TBOX_ASSERT(tag_index >= 0);
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(getDim(), *hierarchy);
+
+   const tbox::Dimension& dim(getDim());
+
+   if (d_use_richardson_extrapolation) {
+      tagCellsUsingRichardsonExtrapolation(hierarchy,
+         level_number,
+         regrid_time,
+         regrid_start_time,
+         tag_index,
+         initial_time,
+         coarsest_sync_level,
+         can_be_refined);
+   }
+
+   if (d_use_gradient_detector) {
+
+      NULL_USE(regrid_start_time);
+      NULL_USE(can_be_refined);
+      NULL_USE(coarsest_sync_level);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(d_tag_strategy != ((mesh::StandardTagAndInitStrategy *)NULL));
+#endif
+      d_tag_strategy->applyGradientDetector(hierarchy,
+         level_number,
+         regrid_time,
+         tag_index,
+         initial_time,
+         d_use_richardson_extrapolation);
+   }
+
+   /*
+    * If user-supplied refine boxes are to be used, get refine box information
+    * from the TagAndInitializeStrategy class, from which this class is
+    * derived.
+    */
+   if (d_use_refine_boxes) {
+
+      hier::BoxArray refine_boxes(dim);
+      this->getUserSuppliedRefineBoxes(refine_boxes, level_number, regrid_time);
+
+      tbox::Pointer<hier::PatchLevel> level =
+         hierarchy->getPatchLevel(level_number);
+
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         tbox::Pointer<hier::Patch> patch = *ip;
+
+         tbox::Pointer<pdat::CellData<int> > tag_data =
+            patch->getPatchData(tag_index);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!(tag_data.isNull()));
+#endif
+
+         for (int ib = 0; ib < refine_boxes.getNumberOfBoxes(); ib++) {
+            hier::Box intersection =
+               refine_boxes[ib] * tag_data->getBox();
+            if (!(intersection.empty())) {
+               tag_data->fill(1, intersection);
+            }
+         }
+      }
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The Richardson extrapolation error estimation tags cells according    *
+ * to differences in the solution computed on two different levels of    *
+ * refinement.  The preprocessRichardsonExtrapolation method advanced    *
+ * data on a COARSENED VERSION of the hierarchy level where regridding   *
+ * is applied.  This method advances data on the level itself and        *
+ * compares the solutions on the level and the coarsened version of the  *
+ * level at the advanced time.                                           *
+ *                                                                       *
+ * The steps are summarized as follows:                                  *
+ *                                                                       *
+ * 0) Advance data on the level                                          *
+ *    0a) if (initial_time) {                                            *
+ *           advance level for ErrorCoarsenRatio steps with time         *
+ *           increment dt                                                *
+ *        } else {                                                       *
+ *           advance level by 1 step (see discussion                     *
+ *           under 2b for reasons for the difference).                   *
+ *        }                                                              *
+ *        NOTE: The "first_step" argument in the                         *
+ *        tag_strategy->advanceLevel() method sets the conditions of     *
+ *        the advance.  The following conditions define the state of     *
+ *        "first_step":                                                  *
+ *           - first_step is always true at the initial time.            *
+ *           - at subsequent times, it is true only if:                  *
+ *                    level <=  finest level that has not been regridded *
+ *              -AND- the level is the coarsest used in flux syncs       *
+ *    0b) reset the time dependent data for all but the last step.  The  *
+ *        reason we don't do it on the last step is that we are going to *
+ *        use the allocated space for step 4.                            *
+ *                                                                       *
+ * 1) Coarsen data computed on the level to the coarsened version of the *
+ *    level.  Apply the                                                  *
+ *    tag_strategy->coarsenDataForRichardsonExtrapolation() method again.*
+ *    This time, before_advance set to false since data has already been *
+ *    advanced on both levels.                                           *
+ *                                                                       *
+ * 2) Allocate tags and apply the                                        *
+ *    tag_strategy->applyRichardsonExtrapolation() method.  This method  *
+ *    sets tags on the COARSENED VERSION of the level according to the   *
+ *    criteria set in the tag_strategy.                                  *
+ *                                                                       *
+ * 3) Refine tags from the coarsened version of the level to the level   *
+ *    where tagging is performed.                                        *
+ *                                                                       *
+ * 4) Put data back into the state it was before calling the RE routine. *
+ *    4a) Apply the d_tag_strategy->resetDataToPreAdvanceState() to take *
+ *        care of resetting data after the last advance step (see 3b     *
+ *        discussion).                                                   *
+ *    4b) Reset the timestamp of the data if we are at the initial time  *
+ *        by calling the initializeLevelData() method with               *
+ *        "allocate_data"                                                *
+ *        set to false. We have already allocated and operated on the    *
+ *        initialized data, we just want to reset the timestamp of it.   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+StandardTagAndInitialize::tagCellsUsingRichardsonExtrapolation(
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int level_number,
+   const double regrid_time,
+   const double regrid_start_time,
+   const int tag_index,
+   const bool initial_time,
+   const bool coarsest_sync_level,
+   const bool can_be_refined)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(getDim(), *hierarchy);
+   TBOX_ASSERT(regrid_start_time <= regrid_time);
+   TBOX_ASSERT(d_tag_strategy != ((mesh::StandardTagAndInitStrategy *)NULL));
+
+   const tbox::Dimension& dim(getDim());
+
+   tbox::Pointer<hier::PatchLevel> patch_level =
+      hierarchy->getPatchLevel(level_number);
+
+   /*
+    * Determine the level timestep.  If the error coarsen ratio is 2
+    * (i.e. even refinement ratio) only a single step has been taken
+    * between the regrid_start_time and regrid_time, so the timestep is
+    * the difference between the regrid_time and the regrid_start_time.
+    * If the error coarsen ratio is 3 (i.e. factor 3 refine ratio)
+    * then two timesteps have been taken between the regrid_start_time
+    * and the regrid_time, so the timestep will be one-half the difference
+    * between the regrid_start_time and the regrid_time.
+    */
+   double dt = (regrid_time - regrid_start_time)
+      / (double)(d_error_coarsen_ratio - 1);
+
+   /*
+    * Determine number of advance steps for time integration on the level.
+    */
+   int n_steps;
+   if (initial_time) {
+      n_steps = d_error_coarsen_ratio;
+   } else {
+      n_steps = 1;
+      d_tag_strategy->resetTimeDependentData(patch_level,
+         regrid_time,
+         can_be_refined);
+   }
+
+   /*
+    * Arguments to the advanceLevel() method
+    * are set as follows:
+    *   first_step - if the level is NOT the coarsest sync level (that is
+    *                the coarsest level to synchronize at the regridding
+    *                time), first step is true.  Otherwise, it is false.
+    *   last_step - true or false: depends on step count
+    *   regrid_advance - true: this is a time-dependent regrid advance
+    */
+
+   bool first_step = !coarsest_sync_level;
+   bool regrid_advance = true;
+
+   double start_time = regrid_time;
+   double end_time = 0.0;
+   for (int step_cnt = 0; step_cnt < n_steps; step_cnt++) {
+
+      end_time = start_time + dt;
+      bool last_step = (step_cnt == (n_steps - 1));
+
+#ifdef DEBUG_TIMES
+      tbox::plog << "\nAdvancing Data on level in Rich. Extrap" << std::endl;
+      tbox::plog << "level number = " << patch_level->getLevelNumber()
+                 << std::endl;
+      tbox::plog << "level in hierarchy? " << patch_level->inHierarchy()
+                 << std::endl;
+      tbox::plog << "start time = " << start_time << std::endl;
+      tbox::plog << "end time = " << end_time << std::endl;
+      tbox::plog << "first step? = " << first_step << std::endl;
+      tbox::plog << "last step? = " << last_step << std::endl;
+      tbox::plog << "regrid advance? = " << regrid_advance << std::endl;
+#endif
+
+      (void)d_tag_strategy->advanceLevel(patch_level,
+         hierarchy,
+         start_time,
+         end_time,
+         first_step,
+         last_step,
+         regrid_advance);
+
+      if (step_cnt < (n_steps - 1)) {
+         d_tag_strategy->resetTimeDependentData(patch_level,
+            end_time,
+            can_be_refined);
+      }
+
+      start_time = end_time;
+   }
+
+   tbox::Pointer<hier::PatchLevel> coarser_level =
+      d_rich_extrap_coarsened_levels[level_number];
+
+   /*
+    * Coarsen data from hierarchy level to coarser level.
+    */
+   bool before_advance = false;
+   d_tag_strategy->coarsenDataForRichardsonExtrapolation(hierarchy,
+      level_number,
+      coarser_level,
+      end_time,
+      before_advance);
+
+   coarser_level->allocatePatchData(tag_index, end_time);
+
+   /*
+    * Coarsen tags from level to coarser level.
+    */
+   hier::IntVector coarsen_ratio(dim, d_error_coarsen_ratio);
+   for (hier::PatchLevel::Iterator ip(coarser_level); ip; ip++) {
+      tbox::Pointer<hier::Patch> coarse_patch = *ip;
+      tbox::Pointer<hier::Patch> fine_patch = patch_level->getPatch(coarse_patch->getGlobalId());
+      tbox::Pointer<pdat::CellData<int> >
+      ftags = fine_patch->getPatchData(tag_index);
+      tbox::Pointer<pdat::CellData<int> >
+      ctags = coarse_patch->getPatchData(tag_index);
+
+      TBOX_ASSERT(!ftags.isNull());
+      TBOX_ASSERT(!ctags.isNull());
+      TBOX_ASSERT(ctags->getDepth() == ftags->getDepth());
+
+      const hier::Index filo = ftags->getGhostBox().lower();
+      const hier::Index fihi = ftags->getGhostBox().upper();
+      const hier::Index cilo = ctags->getGhostBox().lower();
+      const hier::Index cihi = ctags->getGhostBox().upper();
+
+      const hier::Index ifirstc = coarse_patch->getBox().lower();
+      const hier::Index ilastc = coarse_patch->getBox().upper();
+
+      for (int d = 0; d < ctags->getDepth(); d++) {
+         if (dim == tbox::Dimension(1)) {
+            F77_FUNC(coarsentags1d, COARSENTAGS1D) (ifirstc(0), ilastc(0),
+               filo(0), fihi(0),
+               cilo(0), cihi(0),
+               &coarsen_ratio[0],
+               ftags->getPointer(d),
+               ctags->getPointer(d));
+         } else if ((dim == tbox::Dimension(2))) {
+            F77_FUNC(coarsentags2d, COARSENTAGS2D) (ifirstc(0), ifirstc(1),
+               ilastc(0), ilastc(1),
+               filo(0), filo(1), fihi(0), fihi(1),
+               cilo(0), cilo(1), cihi(0), cihi(1),
+               &coarsen_ratio[0],
+               ftags->getPointer(d),
+               ctags->getPointer(d));
+         } else if ((dim == tbox::Dimension(3))) {
+            F77_FUNC(coarsentags3d, COARSENTAGS3D) (ifirstc(0), ifirstc(1),
+               ifirstc(2),
+               ilastc(0), ilastc(1), ilastc(2),
+               filo(0), filo(1), filo(2),
+               fihi(0), fihi(1), fihi(2),
+               cilo(0), cilo(1), cilo(2),
+               cihi(0), cihi(1), cihi(2),
+               &coarsen_ratio[0],
+               ftags->getPointer(d),
+               ctags->getPointer(d));
+
+         } else {
+            TBOX_ERROR("StandardTagAndInitialize error...\n"
+               << "DIM > 3 not supported." << std::endl);
+
+         }
+
+      }
+   }
+
+   /*
+    * Tag cells on coarser level.
+    */
+   d_tag_strategy->applyRichardsonExtrapolation(coarser_level,
+      end_time,
+      tag_index,
+      dt,
+      d_error_coarsen_ratio,
+      initial_time,
+      d_use_gradient_detector);
+
+   /*
+    * Refine tags from coarser level to level.
+    */
+   pdat::CellIntegerConstantRefine copytags(dim);
+   for (hier::PatchLevel::Iterator ip(coarser_level); ip; ip++) {
+
+      tbox::Pointer<hier::Patch> coarse_patch = *ip;
+      tbox::Pointer<hier::Patch> fine_patch = patch_level->getPatch(coarse_patch->getGlobalId());
+      copytags.refine(*fine_patch, *coarse_patch,
+         tag_index, tag_index,
+         fine_patch->getBox(), coarsen_ratio);
+   }
+
+   /*
+    * Final cleanup.  Reset data to initial state before entering this routine.
+    */
+   d_tag_strategy->resetDataToPreadvanceState(patch_level);
+
+   if (initial_time) {
+      bool allocate_data = false;
+      initializeLevelData(hierarchy, level_number, regrid_time,
+         can_be_refined, initial_time,
+         tbox::Pointer<hier::PatchLevel>(NULL),
+         allocate_data);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Preprocess data before cell tagging, if appropriate.  For the options *
+ * provided in this class, only Richardson extrapolation requires        *
+ * any pre-processing.                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+StandardTagAndInitialize::preprocessErrorEstimation(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const double regrid_time,
+   const double regrid_start_time,
+   const bool initial_time)
+{
+   TBOX_ASSERT(!(hierarchy.isNull()));
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= hierarchy->getFinestLevelNumber()));
+   TBOX_ASSERT(!(hierarchy->getPatchLevel(level_number).isNull()));
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(getDim(), *hierarchy);
+
+   if (d_use_richardson_extrapolation) {
+      preprocessRichardsonExtrapolation(hierarchy,
+         level_number,
+         regrid_time,
+         regrid_start_time,
+         initial_time);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The preprocess method for Richardson extrapolation error estimation   *
+ * creates a coarsened version of a level in the hierarchy and advances  *
+ * data on the coarsened level to a prescribed time.                     *
+ *                                                                       *
+ * The steps are summarized as follows:                                  *
+ *                                                                       *
+ * 0) Create a coarser version of the patch level where tagging is       *
+ *    being performed. The coarser level is coarsened by the             *
+ *    "error coarsen ratio", which is the greatest common divisor of the *
+ *    refinement ratio (e.g. GCD of ratio 4 refinement would be 2).      *
+ *                                                                       *
+ * 1) Initialize data on the coarser level by applying the               *
+ *    tag_strategy->coarsenDataForRichardsonExtrapolation() method.      *
+ *    Note that "before_advance" is set true in this call since we have  *
+ *    not yet advanced data on the coarser level.                        *
+ *                                                                       *
+ * 2) Advance data on the coarsened version of the level:                *
+ *    2a) get timestep (dt) for level where tagging is performed         *
+ *    2b) if (initial_time) {                                            *
+ *          Advance coarse level by ErrorCoarsenRatio*dt                 *
+ *        } else {                                                       *
+ *          Advance coarse level by dt                                   *
+ *        }                                                              *
+ *    2c) reset the time dependent data on the coarser level by calling  *
+ *        the tag_strategy's resetTimeDependentData() function.          *
+ *                                                                       *
+ * The constructed coarsened levels are stored and used in the           *
+ * tagCellsUsingRichardsonExtrapolation() method.                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+StandardTagAndInitialize::preprocessRichardsonExtrapolation(
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int level_number,
+   const double regrid_time,
+   const double regrid_start_time,
+   const bool initial_time)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(getDim(), *hierarchy);
+   TBOX_ASSERT(regrid_start_time <= regrid_time);
+   TBOX_ASSERT(d_tag_strategy != ((mesh::StandardTagAndInitStrategy *)NULL));
+
+   const tbox::Dimension& dim(getDim());
+
+   tbox::Pointer<hier::PatchLevel> patch_level =
+      hierarchy->getPatchLevel(level_number);
+
+   /*
+    * Determine the level timestep.  If the error coarsen ratio is 2
+    * (i.e. even refinement ratio) only a single step has been taken
+    * between the regrid_start_time and regrid_time, so the timestep is
+    * the difference between the regrid_time and the regrid_start_time.
+    * If the error coarsen ratio is 3 (i.e. factor 3 refine ratio)
+    * then two timesteps have been taken between the regrid_start_time
+    * and the regrid_time, so the timestep will be one-half the difference
+    * between the regrid_start_time and the regrid_time.
+    */
+   double dt = (regrid_time - regrid_start_time)
+      / (double)(d_error_coarsen_ratio - 1);
+
+   /*
+    * Determine start and end times for integration on the coarsened level.
+    *
+    * At the initial time, the start time is the regrid_time and the end
+    * time is the regrid_time + error_coarsen_ratio*dt.
+    *
+    * In subsequent to the initial time, the start time is the
+    * regrid_start_time and the end time is the regrid_time + dt.
+    */
+   double coarse_start_time;
+   double coarse_end_time;
+
+   if (initial_time) {
+      coarse_start_time = regrid_time;
+      coarse_end_time =
+         regrid_time + dt * d_error_coarsen_ratio;
+   } else {
+      coarse_start_time = regrid_start_time;
+      coarse_end_time = regrid_time + dt;
+   }
+
+#ifdef DEBUG_TIMES
+   tbox::plog << "\nRegridding on level using Rich. Extrap" << std::endl;
+   tbox::plog << "level number = " << patch_level->getLevelNumber()
+              << std::endl;
+   tbox::plog << "level in hierarchy? " << patch_level->inHierarchy()
+              << std::endl;
+   tbox::plog << "coarsened hier level = " << level_number - 1 << std::endl;
+   tbox::plog << "coarsened start time = " << coarse_start_time << std::endl;
+   tbox::plog << "coarsened end time = " << coarse_end_time << std::endl;
+#endif
+
+   /*
+    * Generate coarsened version and initialize data on it.  If coarsened
+    * level aligns with next coarsened level in hierarchy, set level number
+    * so user routines can use this information.
+    */
+
+   tbox::Pointer<hier::PatchLevel> coarsened_level(new hier::PatchLevel(dim));
+   hier::IntVector coarsen_ratio(dim, d_error_coarsen_ratio);
+   coarsened_level->setCoarsenedPatchLevel(patch_level, coarsen_ratio);
+
+   if ((level_number > 0)
+       && (hierarchy->getPatchLevel(level_number - 1)->getRatioToLevelZero() ==
+           coarsened_level->getRatioToLevelZero())) {
+      coarsened_level->setLevelNumber(level_number - 1);
+   }
+
+   /*
+    * Generate Connector patch_level<==>coarsened_level and
+    * coarsened_level--->coarsened_level.  To support recursive data
+    * transfer, these Connectors should have gcw equivalent to
+    * patch_level<==>patch_level.
+    */
+   const hier::IntVector level_to_level_gcw =
+      hierarchy->getRequiredConnectorWidth(level_number,
+         level_number);
+
+   const hier::Connector level_to_level =
+      patch_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+      findConnector(
+         *patch_level->getMappedBoxLevel(),
+         level_to_level_gcw);
+
+   const hier::Connector coarsened_to_level(
+      *coarsened_level->getMappedBoxLevel(),
+      *patch_level->getMappedBoxLevel(),
+      hier::IntVector::ceiling(level_to_level_gcw, coarsen_ratio),
+      level_to_level.getNeighborhoodSets(),
+      hier::MappedBoxLevel::DISTRIBUTED);
+
+   hier::NeighborhoodSet new_edges;
+   hier::MappedBoxContainerUtils::coarsenNeighborsInNeighborhoodSet(
+      new_edges,
+      level_to_level.getNeighborhoodSets(),
+      coarsen_ratio);
+
+   const tbox::ConstPointer<hier::MappedBoxLevel>& mapped_box_level_ptr =
+      patch_level->getMappedBoxLevel();
+   const hier::MappedBoxLevel& mapped_box_level = *mapped_box_level_ptr;
+   hier::PersistentOverlapConnectors& persistent_overlap_connectors =
+      mapped_box_level.getPersistentOverlapConnectors();
+   const hier::Connector& level_to_coarsened =
+      persistent_overlap_connectors.createConnector(
+         *coarsened_level->getMappedBoxLevel(),
+         level_to_level_gcw,
+         new_edges);
+
+   coarsened_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+   createConnector(
+      *coarsened_level->getMappedBoxLevel(),
+      hier::IntVector::ceiling(level_to_level_gcw, coarsen_ratio),
+      new_edges);
+
+   new_edges.clear();
+
+   /*
+    * Get Connectors coarsened<==>coarser, which are used for recursive
+    * refinement filling of the coarsened level's ghosts.
+    */
+   hier::Connector coarsened_to_coarser, coarser_to_coarsened;
+   if (level_number > 0) {
+      tbox::Pointer<hier::PatchLevel> coarser_level = hierarchy->getPatchLevel(
+            level_number - 1);
+      const hier::Connector& level_to_coarser =
+         patch_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+         findConnector(
+            *coarser_level->getMappedBoxLevel(),
+            hierarchy->getRequiredConnectorWidth(
+               level_number, level_number - 1));
+      const hier::Connector& coarser_to_level =
+         coarser_level->getMappedBoxLevel()->getPersistentOverlapConnectors()
+         .findConnector(
+            *patch_level->getMappedBoxLevel(),
+            hierarchy->getRequiredConnectorWidth(
+               level_number - 1, level_number));
+      hier::OverlapConnectorAlgorithm oca;
+      oca.bridge(coarsened_to_coarser,
+         coarser_to_coarsened,
+         coarsened_to_level,
+         level_to_coarser,
+         coarser_to_level,
+         level_to_coarsened);
+      coarsened_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+      createConnector(
+         *coarser_level->getMappedBoxLevel(),
+         coarsened_to_coarser.getConnectorWidth(),
+         coarsened_to_coarser.getNeighborhoodSets());
+      coarser_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+      createConnector(
+         *coarsened_level->getMappedBoxLevel(),
+         coarser_to_coarsened.getConnectorWidth(),
+         coarser_to_coarsened.getNeighborhoodSets());
+   }
+
+   bool before_advance = true;
+   d_tag_strategy->coarsenDataForRichardsonExtrapolation(hierarchy,
+      level_number,
+      coarsened_level,
+      coarse_start_time,
+      before_advance);
+
+   /*
+    * Advance data on coarsened level.  Arguments to the advanceLevel() method
+    * are set as follows:
+    *   first_step - true: this is the first step on the coarsened level
+    *                so it is necessary to do any required
+    *                setup in the advance method.
+    *   last_step - true: only one step will occur on the the coarsened level
+    *   regrid_advance - true: this is a time-dependent regrid advance
+    */
+   bool first_step = true;
+   bool last_step = true;
+   bool regrid_advance = true;
+
+#ifdef DEBUG_TIMES
+   tbox::plog << "\nAdvancing Data on coarsened in Rich. Extrap" << std::endl;
+   tbox::plog << "level number = " << coarsened_level->getLevelNumber()
+              << std::endl;
+   tbox::plog << "level in hierarchy? " << patch_level->inHierarchy()
+              << std::endl;
+   tbox::plog << "start time = " << coarse_start_time << std::endl;
+   tbox::plog << "end time = " << coarse_end_time << std::endl;
+   tbox::plog << "first step? = " << first_step << std::endl;
+   tbox::plog << "last step? = " << last_step << std::endl;
+   tbox::plog << "regrid advance? = " << regrid_advance << std::endl;
+#endif
+
+   (void)d_tag_strategy->advanceLevel(coarsened_level,
+      hierarchy,
+      coarse_start_time,
+      coarse_end_time,
+      first_step,
+      last_step,
+      regrid_advance);
+
+   /*
+    * Reset data on the coarse level.  Since this level does not reside
+    * in the hierarchy, it cannot be refined (and no special storage
+    * manipulation is needed; so we set this to false.
+    */
+   bool level_can_be_refined = false;
+   d_tag_strategy->resetTimeDependentData(coarsened_level,
+      coarse_end_time,
+      level_can_be_refined);
+
+   /*
+    * Add the constructed coarsened level to the array of maintained
+    * coarsened levels for Richardson extrapolation.
+    */
+   if (d_rich_extrap_coarsened_levels.getSize() < level_number + 1) {
+      d_rich_extrap_coarsened_levels.resizeArray(level_number + 1);
+   }
+
+   d_rich_extrap_coarsened_levels[level_number] = coarsened_level;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Boxes on the coarsest level must be able to be coarsened by the       *
+ * error coarsen ratio to apply Richardson Extrapolation.  This method   *
+ * simply checks that this is the case.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool StandardTagAndInitialize::coarsestLevelBoxesOK(
+   const hier::BoxArray& boxes) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(getDim(), boxes);
+   TBOX_ASSERT(boxes.getNumberOfBoxes() > 0);
+
+   bool boxes_ok = true;
+   if (d_use_richardson_extrapolation) {
+
+      const int n_boxes = boxes.getNumberOfBoxes();
+      for (int ib = 0; ib < n_boxes; ib++) {
+         hier::IntVector n_cells = boxes[ib].numberCells();
+         for (int i = 0; i < getDim().getValue(); i++) {
+            int error_coarsen_ratio = getErrorCoarsenRatio();
+            if (!((n_cells(i) % error_coarsen_ratio) == 0)) {
+               tbox::perr << "Bad domain box: " << boxes[ib] << std::endl;
+               TBOX_WARNING(
+                  d_object_name << "At least one box on the \n"
+                  <<
+                  "coarsest level could not be coarsened by the ratio: "
+                  << error_coarsen_ratio);
+               boxes_ok = false;
+            }
+         }
+      }
+   }
+   return boxes_ok;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute Error coarsen ratio for Richardson extrapolation. For a given *
+ * level, the error coarsen ratio should be the greatest common divisor  *
+ * (GCD) of the refinement ratio applied to the level.  This value       *
+ * should generally be 2 or 3 (e.g. refinement ratio=2 gives GCD=2;      *
+ * rr=3 gives GCD=3; rr=4 gives GCD=2; etc.).                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void StandardTagAndInitialize::checkCoarsenRatios(
+   const tbox::Array<hier::IntVector>& ratio_to_coarser)
+{
+   if (d_use_richardson_extrapolation) {
+
+      /*
+       * Compute GCD on first dimension of level 1
+       */
+      int error_coarsen_ratio = 0;
+      int gcd_level1 = ratio_to_coarser[1](0);
+      if ((gcd_level1 % 2) == 0) {
+         error_coarsen_ratio = 2;
+      } else if ((gcd_level1 % 3) == 0) {
+         error_coarsen_ratio = 3;
+      } else {
+         TBOX_ERROR("Unable to perform Richardson extrapolation algorithm "
+            << "with ratio_to_coarser[1](0) = " << gcd_level1);
+      }
+
+      /*
+       * Iterate through levels and check the coarsen ratios to make sure the
+       * error coarsen ratios computed in every dimension on every
+       * level are between the supported 2 or 3, and that the error coarsen
+       * ratios are constant over the hierarchy.
+       */
+      for (int ln = 1; ln < ratio_to_coarser.getSize(); ln++) {
+
+         for (int d = 0; d < getDim().getValue(); d++) {
+            int gcd =
+               SAMRAI::mesh::GCD(error_coarsen_ratio, ratio_to_coarser[ln](d));
+            if ((gcd % error_coarsen_ratio) != 0) {
+               gcd = ratio_to_coarser[ln](d);
+               TBOX_ERROR(
+                  d_object_name << "\n"
+                  <<
+                  "Unable to perform Richardson extrapolation because\n"
+                  <<
+                  "the error coarsen ratio computed from the\n"
+                  <<
+                  "ratio_to_coarser entries is not constant across all\n"
+                  <<
+                  "levels, in all dimensions, of the hierarchy. In\n"
+                  <<
+                  "order to use Richardson extrapolation, the minimum\n"
+                  <<
+                  "divisor (> 1) of all the ratio_to_coarser entries must\n"
+                  << "be 2 -or- 3:\n"
+                  << "   level 1(0): minimum divisor: "
+                  << error_coarsen_ratio
+                  << "\n   level " << ln << "(" << d
+                  << "):"
+                  << ": ratio_to_coarser = " << gcd);
+            }
+         }
+      }
+
+      d_error_coarsen_ratio = error_coarsen_ratio;
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Read cell tagging option and, if required, specified refinement boxes.*
+ *                                                                       *
+ *************************************************************************
+ */
+
+void StandardTagAndInitialize::getFromInput(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   tbox::Array<std::string> tagging_method;
+   if (db->keyExists("tagging_method")) {
+      tagging_method = db->getStringArray("tagging_method");
+   }
+
+   if (tagging_method.getSize() > 3) {
+      TBOX_ERROR(d_object_name << ":getFromInput\n"
+                               << tagging_method.getSize()
+                               << "entries specified"
+                               <<
+         "in `tagging_method' input.  Maximum allowable is 3.");
+   }
+
+   d_use_gradient_detector = false;
+   d_use_richardson_extrapolation = false;
+   d_use_refine_boxes = false;
+
+   /*
+    * Check tagging method input.
+    */
+
+   bool found_method = false;
+   for (int i = 0; i < tagging_method.getSize(); i++) {
+
+      if (tagging_method[i] == "GRADIENT_DETECTOR") {
+
+         d_use_gradient_detector = true;
+         found_method = true;
+
+      }
+
+      if (tagging_method[i] == "RICHARDSON_EXTRAPOLATION") {
+
+         d_use_richardson_extrapolation = true;
+         found_method = true;
+
+      }
+
+      if (tagging_method[i] == "REFINE_BOXES") {
+
+         d_use_refine_boxes = true;
+         found_method = true;
+
+      }
+   }
+
+   /*
+    * Check for valid entries
+    */
+   if (!found_method) {
+      TBOX_WARNING(
+         d_object_name << ":getFromInput \n"
+         <<
+         "No `tagging_method' entry specified, so cell tagging \n"
+         <<
+         "will NOT be performed.  If you wish to invoke cell \n"
+         <<
+         "tagging, you must enter one or more valid tagging \n"
+         << "methods, of type GRADIENT_DETECTOR, "
+         <<
+         "RICHARDSON_EXTRAPOLATION, or REFINE_BOXES\n"
+         << "See class header for details.\n");
+   }
+
+   /*
+    * If user-supplied refine boxes are to be used, get refine box information
+    * from input using the TagAndInitializeStrategy class, from which
+    * this class is derived.
+    */
+   if (d_use_refine_boxes) {
+      TagAndInitializeStrategy::getFromInput(d_object_name, db);
+   }
+
+}
+
+static int GCD(
+   const int a,
+   const int b)
+{
+   int at = tbox::MathUtilities<int>::Min(a, b);
+   int bt = tbox::MathUtilities<int>::Max(a, b);
+
+   if (at == 0 || bt == 0) return bt;
+
+   at = (at > 0 ? at : -at);
+   bt = (bt > 0 ? bt : -bt);
+
+   int r0 = at;
+   int r1 = at;
+   int r2 = bt;
+
+   while (!(r2 == 0)) {
+      r0 = r1;
+      r1 = r2;
+      int q = r0 / r1;
+      r2 = r0 - r1 * q;
+   }
+
+   return r1;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/StandardTagAndInitialize.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/StandardTagAndInitialize.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Routines for performing cell-tagging and initializing
+ *                a new level. 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace mesh {
+
+SAMRAI_INLINE_KEYWORD
+bool StandardTagAndInitialize::usesTimeIntegration() const
+{
+   return d_use_richardson_extrapolation;
+}
+
+SAMRAI_INLINE_KEYWORD
+int StandardTagAndInitialize::getErrorCoarsenRatio() const
+{
+   return d_error_coarsen_ratio;
+}
+
+SAMRAI_INLINE_KEYWORD
+void StandardTagAndInitialize::turnOnGradientDetector()
+{
+   d_use_gradient_detector = true;
+}
+
+SAMRAI_INLINE_KEYWORD
+void StandardTagAndInitialize::turnOffGradientDetector()
+{
+   d_use_gradient_detector = false;
+}
+
+SAMRAI_INLINE_KEYWORD
+void StandardTagAndInitialize::turnOnRichardsonExtrapolation()
+{
+   d_use_richardson_extrapolation = true;
+}
+
+SAMRAI_INLINE_KEYWORD
+void StandardTagAndInitialize::turnOffRichardsonExtrapolation()
+{
+   d_use_richardson_extrapolation = false;
+}
+
+SAMRAI_INLINE_KEYWORD
+void StandardTagAndInitialize::turnOnRefineBoxes()
+{
+   d_use_refine_boxes = true;
+}
+
+SAMRAI_INLINE_KEYWORD
+void StandardTagAndInitialize::turnOffRefineBoxes()
+{
+   d_use_refine_boxes = false;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool StandardTagAndInitialize::refineUserBoxInputOnly() const
+{
+   bool use_only_refine_boxes = false;
+   if (d_use_refine_boxes) {
+      use_only_refine_boxes = true;
+      if (d_use_gradient_detector || d_use_richardson_extrapolation) {
+         use_only_refine_boxes = false;
+      }
+   }
+   return use_only_refine_boxes;
+}
+
+SAMRAI_INLINE_KEYWORD
+const StandardTagAndInitializeConnectorWidthRequestor
+&StandardTagAndInitialize::getConnectorWidthRequestor() const
+{
+   return d_staicwri;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/StandardTagAndInitialize.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/StandardTagAndInitialize.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,334 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Gridding routines and params for Richardson Extrapolation. 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_StandardTagAndInitialize
+#define included_mesh_StandardTagAndInitialize
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/mesh/StandardTagAndInitStrategy.h"
+#include "StandardTagAndInitializeConnectorWidthRequestor.h"
+#include "SAMRAI/mesh/TagAndInitializeStrategy.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace mesh {
+
+/*!
+ * Class StandardTagAndInitialize defines an implementation
+ * for level initialization and cell tagging routines needed by
+ * the GriddingAlgorithm class.  This class is derived from
+ * the abstract base class TagAndInitializeStrategy. It invokes
+ * problem-specific level initialization routines after AMR patch
+ * hierarchy levels change and routines for tagging cells for refinement
+ * using one (or more) of the following methods:
+ *
+ *   - Gradient Detection
+ *   - Richardson Extrapolation
+ *   - Explicitly defined refine boxes
+ *
+ * It is possible to use combinations of these three methods (e.g.,
+ * use gradient detection, Richardson extrapolation, and static refine boxes
+ * at the same time). The order in which they are executed is fixed (
+ * Richardson extrapolation first, gradient detection second, and refine
+ * boxes third).  An input entry for this class is optional.
+ * If none is provided, the class will by default not use any criteria
+ * to tag cells for refinement.
+ *
+ * Required input keys and data types: NONE
+ *
+ * Optional input keys, data types, and defaults:
+ *
+ *
+ *    - \b    tagging_method
+ *       std::string array specification of the type of cell-tagging used.  Valid
+ *       choices include:
+ *          - ``GRADIENT_DETECTOR''
+ *          - ``RICHARDSON_EXTRAPOLATION''
+ *          - ``REFINE_BOXES''
+ *          - ``RICHARDSON_EXTRAPOLATION'', ``GRADIENT_DETECTOR'',
+ *                ``REFINE_BOXES''
+ *       (i.e. a combination of any or all of the above - the choices may
+ *       be placed in any order). If no input is given, no tagging will be
+ *       performed.
+ *
+ *    - \b    input section describing the refine boxes for each level.
+ *      (@see mesh::TagAndInitializeStrategy for details on format)
+ *
+ * A sample input file entry might look like:
+ *
+ * \verbatim
+ *
+ *    tagging_method = "GRADIENT_DETECTOR", "REFINE_BOXES"
+ *    <refine boxes input> (@see mesh::TagAndInitializeStrategy)
+ *
+ * \endverbatim
+ *
+ * This class supplies the routines for tagging cells
+ * and invoking problem-specific level initialization routines after AMR
+ * patch hierarchy levels change.  A number of problem-specific operations
+ * are performed in the StandardTagAndInitStrategy
+ * data member, for which methods are specified in a derived subclass.
+ *
+ * @see mesh::TagAndInitializeStrategy
+ * @see mesh::GriddingAlgorithm
+ * @see mesh::StandardTagAndInitStrategy
+ */
+
+class StandardTagAndInitialize:
+   public TagAndInitializeStrategy
+{
+public:
+   /*!
+    * Constructor for StandardTagAndInitialize which
+    * may read inputs from the provided input_db.  If no input
+    * database is provided, the class interprets that no tagging
+    * is desired so no cell-tagging will be performed.
+    */
+   StandardTagAndInitialize(
+      const tbox::Dimension& dim,
+      const std::string& object_name,
+      StandardTagAndInitStrategy* tag_strategy,
+      tbox::Pointer<tbox::Database> input_db =
+         tbox::Pointer<tbox::Database>(NULL));
+
+   /*!
+    * Virtual destructor for StandardTagAndInitialize.
+    */
+   virtual ~StandardTagAndInitialize();
+
+   /*!
+    * Specifies whether the chosen method advances the solution data
+    * in the regridding process (Richardson extrapolation does, the
+    * others will not).
+    */
+   bool
+   usesTimeIntegration() const;
+
+   /*!
+    * Return coarsen ratio used for applying cell tagging. An error
+    * coarsen ratio other than 2 or 3 will throw an error.
+    */
+   int
+   getErrorCoarsenRatio() const;
+
+   /*!
+    * Some restrictions may be placed on the coarsen ratio used for
+    * cell tagging.  Check these here.
+    */
+   void
+   checkCoarsenRatios(
+      const tbox::Array<hier::IntVector>& ratio_to_coarser);
+
+   /*!
+    * Pass the request to initialize the data on a new level in the
+    * hierarchy to the StandardTagAndInitStrategy data member. Required
+    * arguments specify the grid hierarchy, level number being initialized,
+    * simulation time at which the data is initialized, whether the level
+    * can be refined, and whether it is the initial time.  Optional arguments
+    * include an old level, from which data may be used to initialize this
+    * level, and a flag that indicates whether data on the initialized level
+    * must first be allocated.  For more information on the operations that
+    * must be performed, see the
+    * TagAndInitializeStrategy::initializeLevelData() method.
+    */
+   void
+   initializeLevelData(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double init_data_time,
+      const bool can_be_refined,
+      const bool initial_time,
+      const tbox::Pointer<hier::BasePatchLevel> old_level =
+         tbox::Pointer<hier::BasePatchLevel>(NULL),
+      const bool allocate_data = true);
+
+   /*!
+    * Pass the request to reset information that depends on the hierarchy
+    * configuration to the StandardTagAndInitStrategy data member.
+    * For more information on the operations that must be performed, see
+    * the TagAndInitializeStrategy::resetHierarchyConfiguration()
+    * method.
+    */
+   void
+   resetHierarchyConfiguration(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level);
+
+   /*!
+    * Certain cases may require pre-processing of error estimation data
+    * before tagging cells, which is handled by this method.  For more
+    * information on the operations that must be performed, see the
+    * TagAndInitializeStrategy::preprocessErrorEstimation()
+    * method
+    */
+   void
+   preprocessErrorEstimation(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double regrid_time,
+      const double regrid_start_time,
+      const bool initial_time);
+
+   /*!
+    * Pass the request to set tags on the given level where refinement of
+    * that level should occur.  Gradient detection, Richardson extrapolation,
+    * and tagging on static refine boxes is performed here.
+    *
+    * For more information on the operations that must be performed, see the
+    * TagAndInitializeStrategy::tagCellsForRefinement() routine.
+    */
+   void
+   tagCellsForRefinement(
+      const tbox::Pointer<hier::BasePatchHierarchy> level,
+      const int level_number,
+      const double regrid_time,
+      const int tag_index,
+      const bool initial_time,
+      const bool coarsest_sync_level,
+      const bool can_be_refined,
+      const double regrid_start_time = 0);
+
+   /*!
+    * Return true if boxes for coarsest hierarchy level are not appropriate
+    * for gridding strategy.  Otherwise, return false.  If false is returned,
+    * it is useful to provide a detailed explanatory message describing the
+    * problems with the boxes.
+    */
+   bool
+   coarsestLevelBoxesOK(
+      const hier::BoxArray& boxes) const;
+
+   /*!
+    * Return whether refinement is being performed using ONLY
+    * user-supplied refine boxes.  If any method is used that invokes
+    * tagging, this will return false.
+    */
+   bool
+   refineUserBoxInputOnly() const;
+
+   /*!
+    * Turn on gradient detector to tag cells for refinement.
+    */
+   void
+   turnOnGradientDetector();
+
+   /*!
+    * Turn off gradient detector.
+    */
+   void
+   turnOffGradientDetector();
+
+   /*!
+    * Turn on Richardson extrapolation to tag cells for refinement.
+    */
+   void
+   turnOnRichardsonExtrapolation();
+
+   /*!
+    * Turn off Richardson extrapolation.
+    */
+   void
+   turnOffRichardsonExtrapolation();
+
+   /*!
+    * Turn on static refine box regions where refinement should occur.
+    */
+   void
+   turnOnRefineBoxes();
+
+   /*!
+    * Turn off static refine box regions.
+    */
+   void
+   turnOffRefineBoxes();
+
+   /*!
+    * Read input values, indicated above, from given database.
+    *
+    * When assertion checking is active, the database pointer must be non-null.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db);
+
+   const StandardTagAndInitializeConnectorWidthRequestor
+   &getConnectorWidthRequestor() const;
+
+private:
+   /*
+    * Apply preprocessing for Richardson extrapolation.
+    */
+   void
+   preprocessRichardsonExtrapolation(
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int level_number,
+      const double regrid_time,
+      const double regrid_start_time,
+      const bool initial_time);
+
+   /*
+    * Apply Richardson extrapolation algorithm.
+    */
+   void
+   tagCellsUsingRichardsonExtrapolation(
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int level_number,
+      const double regrid_time,
+      const double regrid_start_time,
+      const int tag_index,
+      const bool initial_time,
+      const bool coarsest_sync_level,
+      const bool can_be_refined);
+
+   /*
+    * Object name.
+    */
+   std::string d_object_name;
+
+   /*
+    * Booleans specifying the tagging method.  Any combination of the
+    * three methods may be used.
+    */
+   bool d_use_refine_boxes;
+   bool d_use_gradient_detector;
+   bool d_use_richardson_extrapolation;
+
+   /*
+    * Concrete object that supplies problem-specific initialization
+    * and regridding operations.
+    */
+   StandardTagAndInitStrategy* d_tag_strategy;
+
+   /*
+    * The error_coarsen_ratio used for all levels in the hierarchy.
+    * If Richardson extrapolation is not used, the error coarsen ratio
+    * is 1.  If Richardson extrapolation is used, the error coarsen ratio
+    * is set in the method coarsestLevelBoxesOK().
+    */
+   int d_error_coarsen_ratio;
+
+   /*
+    * tbox::Array of patch levels containing coarsened versions of the patch
+    * levels, for use with Richardson extrapolation.
+    */
+   tbox::Array<tbox::Pointer<hier::PatchLevel> > d_rich_extrap_coarsened_levels;
+
+   StandardTagAndInitializeConnectorWidthRequestor d_staicwri;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/mesh/StandardTagAndInitialize.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/StandardTagAndInitializeConnectorWidthRequestor.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/StandardTagAndInitializeConnectorWidthRequestor.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,209 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   StandardTagAndInitialize's implementation of PatchHierarchy 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_StandardTagAndInitializeConnectorWidthRequestor_C
+#define included_mesh_StandardTagAndInitializeConnectorWidthRequestor_C
+
+#include "SAMRAI/mesh/StandardTagAndInitializeConnectorWidthRequestor.h"
+
+#include "SAMRAI/xfer/RefineScheduleConnectorWidthRequestor.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace mesh {
+
+/*
+ *************************************************************************
+ * Static function that computes greatest common divisor.
+ *************************************************************************
+ */
+
+
+static int GCD(
+   const int a,
+   const int b)
+{
+   int at = tbox::MathUtilities<int>::Min(a, b);
+   int bt = tbox::MathUtilities<int>::Max(a, b);
+
+   if (at == 0 || bt == 0) return bt;
+
+   at = (at > 0 ? at : -at);
+   bt = (bt > 0 ? bt : -bt);
+
+   int r0 = at;
+   int r1 = at;
+   int r2 = bt;
+
+   while (!(r2 == 0)) {
+      r0 = r1;
+      r1 = r2;
+      int q = r0 / r1;
+      r2 = r0 - r1 * q;
+   }
+
+   return r1;
+}
+
+
+/*
+ **************************************************************************
+ **************************************************************************
+ */
+StandardTagAndInitializeConnectorWidthRequestor::StandardTagAndInitializeConnectorWidthRequestor(
+   )
+{
+   return;
+}
+
+
+/*
+ **************************************************************************
+ * Compute Connector widths that this class requires in order to work
+ * properly on a given hierarchy.
+ *
+ * StandardTagAndInitialize generates coarsened versions of levels on
+ * the hierarchy and uses RefineSchedule to fill its ghost data.
+ * It is the RefineSchedule that drives the need for Connector width
+ * when using StandardTagAndInitialize.
+ *
+ * Coarsening in Richardson extrapolation has the effect of making the
+ * ghost cells look bigger when RefineSchedule computes data
+ * dependency.  The required Connector widths are equivalent to those
+ * that RefineSchedule generates for the additional ghost widths.
+ * Therefore, this class requires the same Connector widths that
+ * RefineSchedule requires, except for bigger ghost cells.
+ *
+ **************************************************************************
+ */
+void StandardTagAndInitializeConnectorWidthRequestor::computeRequiredConnectorWidths(
+   std::vector<hier::IntVector>& self_connector_widths,
+   std::vector<hier::IntVector>& fine_connector_widths,
+   const hier::PatchHierarchy& patch_hierarchy) const
+{
+   const tbox::Dimension &dim(patch_hierarchy.getDim());
+
+   /*
+    * Get the refinement ratios on the hierarchy.  This is the ratio
+    * by which StandardTagAndInitialize may coarsen a level in the
+    * hierarchy.  It is the growth factor for ghost data.
+    */
+   tbox::Array<hier::IntVector> ratios_to_coarser(
+      patch_hierarchy.getMaxNumberOfLevels(),
+      hier::IntVector(dim));
+
+   for ( int ln=0; ln<patch_hierarchy.getMaxNumberOfLevels(); ++ln ) {
+      ratios_to_coarser[ln] = patch_hierarchy.getRatioToCoarserLevel(ln);
+   }
+
+   int error_coarsen_ratio = computeCoarsenRatio(ratios_to_coarser);
+
+   /*
+    * Use the error coarsen ratio to compute the Connector widths
+    * associated with the coarsened ghost regions.
+    */
+   xfer::RefineScheduleConnectorWidthRequestor rscwri;
+   rscwri.setGhostCellWidthFactor( error_coarsen_ratio );
+   rscwri.computeRequiredConnectorWidths(
+      self_connector_widths,
+      fine_connector_widths,
+      patch_hierarchy);
+
+   return;
+}
+
+/*
+ *************************************************************************
+ * Compute Error coarsen ratio for Richardson extrapolation. For a given
+ * level, the error coarsen ratio should be the greatest common divisor
+ * (GCD) of the refinement ratio applied to the level.  This value
+ * should generally be 2 or 3 (e.g. refinement ratio=2 gives GCD=2;
+ * rr=3 gives GCD=3; rr=4 gives GCD=2; etc.).
+ *
+ * Note that this algorithm was lifted from StandardTagAndInitialize.
+ *************************************************************************
+ */
+
+int StandardTagAndInitializeConnectorWidthRequestor::computeCoarsenRatio(
+   const tbox::Array<hier::IntVector>& ratios_to_coarser) const
+{
+   const tbox::Dimension &dim(ratios_to_coarser[0].getDim());
+   /*
+    * Compute GCD on first dimension of level 1
+    */
+   int error_coarsen_ratio = 0;
+   int gcd_level1 = ratios_to_coarser[1](0);
+   if ((gcd_level1 % 2) == 0) {
+      error_coarsen_ratio = 2;
+   } else if ((gcd_level1 % 3) == 0) {
+      error_coarsen_ratio = 3;
+   } else {
+      TBOX_ERROR("Unable to perform Richardson extrapolation algorithm "
+                 << "with ratios_to_coarser[1](0) = " << gcd_level1 << "\n"
+                 <<"Did you intend to use Richardson extrapolation?\n"
+                 <<"If no, you don't have to be here.  If yes, fix\n"
+                 <<"the refinement ratios in your hierarchy.");
+   }
+
+   /*
+    * Iterate through levels and check the coarsen ratios to make sure the
+    * error coarsen ratios computed in every dimension on every
+    * level are between the supported 2 or 3, and that the error coarsen
+    * ratios are constant over the hierarchy.
+    */
+   for (int ln = 1; ln < ratios_to_coarser.getSize(); ln++) {
+
+      for (int d = 0; d < dim.getValue(); d++) {
+         int gcd =
+            SAMRAI::mesh::GCD(error_coarsen_ratio, ratios_to_coarser[ln](d));
+         if ((gcd % error_coarsen_ratio) != 0) {
+            gcd = ratios_to_coarser[ln](d);
+            TBOX_ERROR(
+               "StandardTagAndInitialize::ConnectorWidthRequestor::computeCoarsenRatio:\n"
+               <<
+               "Unable to perform Richardson extrapolation because\n"
+               <<
+               "the error coarsen ratio computed from the\n"
+               <<
+               "ratios_to_coarser entries is not constant across all\n"
+               <<
+               "levels, in all dimensions, of the hierarchy. In\n"
+               <<
+               "order to use Richardson extrapolation, the minimum\n"
+               <<
+               "divisor (> 1) of all the ratios_to_coarser entries must\n"
+               << "be 2 -or- 3:\n"
+               << "   level 1(0): minimum divisor: "
+               << error_coarsen_ratio
+               << "\n   level " << ln << "(" << d
+               << "):"
+               << ": ratios_to_coarser = " << gcd << "\n"
+               <<"Did you intend to use Richardson extrapolation?\n"
+               <<"If no, you don't have to be here.  If yes, fix\n"
+               <<"the refinement ratios in your hierarchy.");
+         }
+      }
+   }
+
+   return error_coarsen_ratio;
+}
+
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/StandardTagAndInitializeConnectorWidthRequestor.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/StandardTagAndInitializeConnectorWidthRequestor.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   StandardTagAndInitialize's implementation of PatchHierarchy 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_StandardTagAndInitializeConnectorWidthRequestor
+#define included_mesh_StandardTagAndInitializeConnectorWidthRequestor
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/PatchHierarchy.h"
+
+namespace SAMRAI {
+namespace mesh {
+
+
+/*!
+ * @brief Implementation of the strategy class
+ * hier::PatchHierarchy::ConnectorWidthRequestorStrategy to tell the
+ * hier::PatchHierarchy how wide StandardTagAndInitialize needs
+ * Connectors between hierarchy levels to be.
+ *
+ * To do Richardson extrapolation, StandardTagAndInitialize will
+ * coarsen a level and populate it with data.  A coarsened level has a
+ * bigger ghost region because the coarse cells are bigger.  This
+ * class is for telling the PatchHierarchy that
+ * StandardTagAndInitialize will request Connectors based on the width
+ * of the coarsened level.
+ */
+class StandardTagAndInitializeConnectorWidthRequestor
+   : public hier::PatchHierarchy::ConnectorWidthRequestorStrategy {
+
+public:
+
+   /*!
+    * @brief Constructor.
+    */
+   StandardTagAndInitializeConnectorWidthRequestor();
+
+   /*!
+    * @brief Compute Connector widths that this class requires in
+    * order to work properly on a given hierarchy.
+    *
+    * Implements the pure virtual method
+    * hier::PatchHierarchy::ConnectorWidthRequestorStrategy::computeRequiredConnectorWidths()
+    *
+    * @param[out] self_connector_width Array of widths for Connectors
+    * from a level to itself.
+    *
+    * @param[out] fine_connector_width Array of widths for Connectors
+    * from a level to the next finer level.
+    *
+    * @param[in]  patch_hierarchy
+    */
+   void computeRequiredConnectorWidths(
+      std::vector<hier::IntVector>& self_connector_widths,
+      std::vector<hier::IntVector>& fine_connector_widths,
+      const hier::PatchHierarchy& patch_hierarchy) const;
+
+private:
+
+   /*!
+    * @brief Return the coarsen ratio to be used with Richardson
+    * extrapolation on the PatchHierarchy.
+    *
+    * @param[in] ratios_to_coarser Refinement ratios in a hierarchy.
+    * @c ratios_to_coarser[ln] is the ratio between level ln and level
+    * ln-1.
+    */
+   int computeCoarsenRatio(
+      const tbox::Array<hier::IntVector>& ratio_to_coarser) const;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/TagAndInitializeStrategy.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/TagAndInitializeStrategy.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,418 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Strategy interface for params, tagging, init for gridding. 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_TagAndInitializeStrategy_C
+#define included_mesh_TagAndInitializeStrategy_C
+
+#include "SAMRAI/mesh/TagAndInitializeStrategy.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <stdio.h>
+
+namespace SAMRAI {
+namespace mesh {
+
+TagAndInitializeStrategy::TagAndInitializeStrategy(
+   const tbox::Dimension& dim):
+   d_dim(dim)
+{
+}
+
+TagAndInitializeStrategy::~TagAndInitializeStrategy()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Sets refine boxes for case where refine region is specified by the    *
+ * user.  The bool return value specifies whether or not the refine      *
+ * boxes have been reset from the last time the method was called        *
+ * (true = they are reset, false = they have NOT changed).               *
+ *                                                                       *
+ * Note that if any method which invokes tagging is performed there      *
+ * is always potential that the boxes have changed so this method will   *
+ * always return true in this case.                                      *
+ *                                                                       *
+ *************************************************************************
+ */
+bool TagAndInitializeStrategy::getUserSuppliedRefineBoxes(
+   hier::BoxArray& refine_boxes,
+   const int level_num,
+   const double time)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(level_num >= 0);
+   TBOX_ASSERT(time >= 0.);
+#endif
+
+   /*
+    * The cycle counter and boolean array specifying whether times
+    * are used are initialially set based on inputs. There could be
+    * circumstances where a set of refine boxes is requested for a
+    * level number greater than the number of entries the user
+    * supplied in input.  If this occurs, resize the cycle counter
+    * and boolean times arrays and set appropriate defaults to
+    * avoid logic errors elsewhere.
+    */
+   if (level_num >= d_refine_boxes_cycle_counter.getSize()) {
+
+      d_refine_boxes_times.resizeArray(level_num + 1);
+      d_refine_boxes_cycles.resizeArray(level_num + 1);
+      d_refine_boxes_use_times.resizeArray(level_num + 1);
+      d_refine_boxes_cycle_counter.resizeArray(level_num + 1);
+      d_refine_boxes_old_seq_num.resizeArray(level_num + 1);
+
+      d_refine_boxes_times[level_num].resizeArray(1);
+      d_refine_boxes_cycles[level_num].resizeArray(1);
+      d_refine_boxes_times[level_num][0] = 0.;
+      d_refine_boxes_cycles[level_num][0] = 0;
+      d_refine_boxes_use_times[level_num] = false;
+      d_refine_boxes_cycle_counter[level_num] = 0;
+      d_refine_boxes_old_seq_num[level_num] = -1;
+
+   }
+
+   /*
+    * Increment step counter.
+    */
+   d_refine_boxes_cycle_counter[level_num]++;
+
+   /*
+    * Determine which sequence entry in the refine_boxes box array
+    * to use.
+    */
+   int seq_num = 0;
+   if (d_refine_boxes_use_times[level_num]) {
+
+      /*
+       * If we are using times, the user has supplied an array
+       * times = {time1, time2, ...} that corresponds with the
+       * refine box array boxes = {boxarr1, boxarr2, ...}. Pick
+       * the appropriate sequence number based on the specified
+       * time.
+       */
+      for (int i = 0; i < d_refine_boxes_times[level_num].getSize();
+           i++) {
+         if (time > d_refine_boxes_times[level_num][i]) seq_num = i;
+      }
+   } else {
+
+      /*
+       * If we are using steps, the user has supplied an array
+       * cycles = {cycle1, cycle2, ...} that corresponds with the
+       * refine box array boxes = {boxarr1, boxarr2, ...}.  Pick
+       * the appropriate seq number based on the counter.
+       */
+      for (int i = 0; i < d_refine_boxes_cycles[level_num].getSize();
+           i++) {
+         if (d_refine_boxes_cycle_counter[level_num] >
+             d_refine_boxes_cycles[level_num][i])
+            seq_num = i;
+      }
+   }
+
+   /*
+    * Print some warnings if the user-supplied entries will not
+    * generate any refined boxes for the level.
+    */
+   hier::BoxArray empty_boxes(d_dim);
+   if ((d_refine_boxes.getSize() <= level_num) ||
+       (d_refine_boxes[level_num][seq_num].getNumberOfBoxes() == 0)) {
+
+      TBOX_WARNING(
+         d_object_name << ": getRefineBoxes\n"
+         << "No refine boxes specified for level "
+         << level_num);
+      refine_boxes = empty_boxes;
+
+   } else if (d_refine_boxes[level_num].getSize() <= seq_num) {
+
+      if (d_refine_boxes_use_times[level_num]) {
+         TBOX_WARNING(
+            d_object_name << ": getRefineBoxes\n"
+            <<
+            "No refine boxes specified for time sequence "
+            << seq_num << " on level " << level_num
+            << ".\n No refinement will be performed.");
+      } else {
+         TBOX_WARNING(
+            d_object_name << ": getRefineBoxes\n"
+            <<
+            "No refine boxes specified for step sequence "
+            << seq_num << " on level " << level_num
+            << ".\n No refinement will be performed.");
+      }
+      refine_boxes = empty_boxes;
+
+   } else {
+
+      refine_boxes = d_refine_boxes[level_num][seq_num];
+
+   }
+
+   /*
+    * If the user has requested their own particular set of refine
+    * boxes (i.e. by calling resetRefineBoxes()), overwrite any previously
+    * determined refine boxes with their requested set.
+    */
+   bool use_reset = false;
+   if (d_refine_boxes_reset.getSize() > level_num) {
+      if (d_refine_boxes_reset[level_num]) {
+         use_reset = true;
+         refine_boxes = d_reset_refine_boxes[level_num];
+      }
+   }
+
+   /*
+    * If we have not moved to a new sequence number, or otherwise reset
+    * boxes from the last time this method was called, then we return
+    * "false", indicating boxes have NOT been reset.  If we have reset
+    * the boxes, return "true".
+    */
+   bool modified_refine_boxes;
+   if (!use_reset && d_refine_boxes_old_seq_num[level_num] == seq_num) {
+      modified_refine_boxes = false;
+   } else {
+      d_refine_boxes_old_seq_num[level_num] = seq_num;
+      modified_refine_boxes = true;
+   }
+
+   /*
+    * If one of the tagging methods (e.g. gradient detector or
+    * Richardson extrapolation) is used, the boxes may be modified
+    * even if they have not been modified by user input.
+    */
+   if (!refineUserBoxInputOnly()) modified_refine_boxes = true;
+
+   return modified_refine_boxes;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Resets refine boxes for specified level.                              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void TagAndInitializeStrategy::resetRefineBoxes(
+   const hier::BoxArray& refine_boxes,
+   const int level_num)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(level_num >= 0);
+#endif
+
+   int i = d_reset_refine_boxes.getSize();
+   if (i <= level_num) {
+      d_reset_refine_boxes.resizeArray(level_num + 1, hier::BoxArray(d_dim));
+      d_refine_boxes_reset.resizeArray(level_num + 1);
+      for ( ; i < d_reset_refine_boxes.getSize(); ++i) {
+         d_refine_boxes_reset[i] = false;
+      }
+   }
+
+   d_refine_boxes_reset[level_num] = true;
+   d_reset_refine_boxes[level_num] = refine_boxes;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Read specified refinement boxes, if any.                              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void TagAndInitializeStrategy::getFromInput(
+   const std::string& object_name,
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   d_object_name = object_name;
+
+   /*
+    * Read refine boxes.
+    */
+   if (!db->keyExists("RefineBoxes")) {
+      TBOX_ERROR("If REFINE_BOXES is used as a tagging_method, you must\n"
+         << "provide a `RefineBoxes' database entry in the input\n"
+         << "to specify the level boxes to be refined.  See header\n"
+         << "for TagAndInitializeStrategy class for \n"
+         << "discussion of the entry format." << std::endl);
+   }
+   tbox::Pointer<tbox::Database> refine_box_db =
+      db->getDatabase("RefineBoxes");
+   tbox::Array<std::string> box_keys = refine_box_db->getAllKeys();
+   int nkeys = box_keys.getSize();
+
+   d_refine_boxes.resizeArray(nkeys);
+   d_refine_boxes_cycles.resizeArray(nkeys);
+   d_refine_boxes_times.resizeArray(nkeys);
+   d_refine_boxes_use_times.resizeArray(nkeys);
+   d_refine_boxes_cycle_counter.resizeArray(nkeys);
+   d_refine_boxes_old_seq_num.resizeArray(nkeys);
+
+   /*
+    * Do a check here to see if we are using the "old" version of input
+    * (i.e. v1.3.1 or before) which only allows you to specify a single
+    * set of refine boxes, or the "new" input format which allows you
+    * to specify a specified sequence of refine boxes.
+    */
+   bool use_new_input = false;
+   for (int ln = 0; ln < nkeys; ln++) {
+      std::string level_boxes_name = "level_" + tbox::Utilities::intToString(ln);
+      if (refine_box_db->isDatabase(level_boxes_name)) {
+         use_new_input = true;
+      }
+   }
+
+   for (int ln = 0; ln < nkeys; ln++) {
+      /*
+       * Set counter for each level to zero.
+       */
+      d_refine_boxes_cycle_counter[ln] = 0;
+
+      /*
+       * Set old sequence number to -1, assuring it will always
+       * interpret a new sequence at initialization, when the
+       * counter is zero.
+       */
+      d_refine_boxes_old_seq_num[ln] = -1;
+   }
+
+   if (use_new_input) {
+      /*
+       * We are using the updated input format that allows multiple
+       * sequence entries.
+       */
+      for (int ln = 0; ln < nkeys; ln++) {
+         std::string level_boxes_name = "level_" + tbox::Utilities::intToString(
+               ln);
+         if (!refine_box_db->keyExists(level_boxes_name)) {
+            TBOX_ERROR(
+               d_object_name << "\n"
+               <<
+               ": Expected sub-database level entries in the\n"
+               <<
+               " 'RefineBoxes' database to specify boxes for\n"
+               <<
+               "  different time or cycle sequences: \n"
+               <<
+               "  e.g.  Level0 { boxes_0 = <box array> \n"
+               <<
+               "                 boxes_1 = <box array> \n"
+               << "                 ...} \n"
+               <<
+               "        Level1 { boxes_0 = <box array> \n"
+               << "                 ...} \n"
+               <<
+               "See header for this class for further discussion\n"
+               << "of the expected input format."
+               << std::endl);
+         }
+         tbox::Pointer<tbox::Database> level_refine_box_db =
+            refine_box_db->getDatabase(level_boxes_name);
+
+         /*
+          * Read cycles.
+          */
+         bool use_cycles = false;
+         if (level_refine_box_db->keyExists("cycles")) {
+            d_refine_boxes_cycles[ln] =
+               level_refine_box_db->getIntegerArray("cycles");
+            use_cycles = true;
+         } else {
+            d_refine_boxes_cycles[ln].resizeArray(1);
+            d_refine_boxes_cycles[ln][0] = 0;
+         }
+
+         /*
+          * Read times.
+          */
+         if (level_refine_box_db->keyExists("times")) {
+            d_refine_boxes_use_times[ln] = true;
+            d_refine_boxes_times[ln] =
+               level_refine_box_db->getDoubleArray("times");
+            if (use_cycles) {
+               TBOX_WARNING(
+                  d_object_name << ": You have entries for "
+                  <<
+                  "both 'cycles' and 'times' for level " << ln
+                  <<
+                  ".\n Because 'times' takes precedence, the "
+                  <<
+                  "'cycles' entries will be ignored." << std::endl);
+            }
+         } else {
+            d_refine_boxes_times[ln].resizeArray(1);
+            d_refine_boxes_times[ln][0] = 0.;
+            d_refine_boxes_use_times[ln] = false;
+         }
+
+         /*
+          * Use the size of the "cycles" or "times" arrays to govern
+          * how many boxes entries there may be.
+          */
+         int max_seq = 1;
+         if (d_refine_boxes_use_times[ln]) {
+            max_seq = d_refine_boxes_times[ln].getSize();
+         } else {
+            max_seq = d_refine_boxes_cycles[ln].getSize();
+         }
+         d_refine_boxes[ln].resizeArray(max_seq, hier::BoxArray(d_dim));
+
+         /*
+          * Read boxes.
+          */
+         for (int i = 0; i < max_seq; i++) {
+            std::string boxes_name = "boxes_" + tbox::Utilities::intToString(i);
+            if (level_refine_box_db->keyExists(boxes_name)) {
+               d_refine_boxes[ln][i] =
+                  level_refine_box_db->getDatabaseBoxArray(boxes_name);
+            }
+         }
+
+      } // loop over levels
+   } else {
+
+      for (int ln = 0; ln < nkeys; ln++) {
+         std::string level_boxes_name = "level_" + tbox::Utilities::intToString(
+               ln);
+         d_refine_boxes[ln].resizeArray(1, hier::BoxArray(d_dim));
+         d_refine_boxes_cycles[ln].resizeArray(1);
+         d_refine_boxes_times[ln].resizeArray(1);
+
+         if (refine_box_db->keyExists(level_boxes_name)) {
+            d_refine_boxes[ln][0] =
+               refine_box_db->getDatabaseBoxArray(level_boxes_name);
+         }
+         d_refine_boxes_cycles[ln][0] = 0;
+         d_refine_boxes_times[ln][0] = 0.;
+         d_refine_boxes_use_times[ln] = false;
+      }
+   } // not using new input format
+}
+
+const tbox::Dimension& TagAndInitializeStrategy::getDim() const
+{
+   return d_dim;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/TagAndInitializeStrategy.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/TagAndInitializeStrategy.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,385 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Strategy interface for params, tagging, init for gridding. 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_TagAndInitializeStrategy
+#define included_mesh_TagAndInitializeStrategy
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/BasePatchHierarchy.h"
+#include "SAMRAI/hier/BasePatchLevel.h"
+#include "SAMRAI/hier/MappedBoxLevel.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace mesh {
+
+/*!
+ * Class TagAndInitializeStrategy is a base class that defines a
+ * Strategy pattern interface for level initialization and cell tagging
+ * routines that are needed by the adaptive meshing algorithms provided
+ * by the class GriddingAlgorithm or MultiblockGriddingAlgorithm.  The class
+ * maintains functionality to construct refined regions based on a
+ * user-supplied set of boxes, but its main role is to provide interfaces
+ * for level initialization and cell tagging operations.
+ *
+ * The operations that identify mesh cells for refinement or initialize
+ * data on a new hierarchy level are problem-specific and must be
+ * supplied by a concrete sub-class of this base class.
+ *
+ * If user supplied refine boxes are used, they may be supplied through
+ * input.  Alternatively, they may be supplied through the "resetRefineBoxes()"
+ * method.  If they are supplied through input, the format is as follows:
+ *
+ *    - \b    RefineBoxes
+ *      input section describing the refine boxes for each level.
+ *          - \b  level_0
+ *             input section providing the hier::Box arrays
+ *             describing where user-specified refinement is to occur on
+ *             Level 0.
+ *          - \b  level_1
+ *             input section providing the hier::Box arrays
+ *             describing where user-specified refinement is to occur on
+ *             Level 1.
+ *            \b . . .
+ *          - \b  level_n
+ *             input section providing the hier::Box arrays
+ *             describing where user-specified refinement is to occur on
+ *             Level N.
+ *
+ *       For each level, the input section can have the following entries:
+ *
+ *               - \b times = optional entry, a double array specifying times
+ *                            at which a particular set of boxes is to be used
+ *                            as a region of refinement.
+ *               - \b cycles = optional entry, an integer array specifying
+ *                             regrid cycles at which a particular set of boxes
+ *                             is to be used as a region of refinement.
+ *               - \b boxes_0 = box array specifying refine boxes for element
+ *                              0 of the times or cycles array.
+ *               - \b boxes_1 = box array specifying refine boxes for element
+ *                              1 of the times or cycles array.
+ *               - \b boxes_n = box array specifying refine boxes for element
+ *                              n of the times or cycles array.
+ *
+ *       The @b times and @b cycles entries are optional.  If neither
+ *       is provided, a uniform set of refine boxes specified in the
+ *       boxes_0 entry will be used over the entire calculation.  If no
+ *       boxes_0 entry is provided, no refinement will occur on that level.
+ *
+ *       If both @b times or @b cycles entries are supplied, the times entry
+ *       takes precedence so the cycles entry is ignored. The particular
+ *       box array chosen during regridding is determined by a ``greater-than''
+ *       convention.  That is, if boxes are accessed at regridding time t,
+ *       where t is greater-than the specified times[n] entry, then the array
+ *       given for boxes_n is used.  Otherwise, the corresponding previous
+ *       box array that satisfies the criteria is used.  The same convention is
+ *       followed for regridding cycles.  To avoid errant behavior, the times
+ *       and cycles entries should always be supplied in increasing order.
+ *
+ *       The hier::BoxArray entries withing each level's input section
+ *       must be of the form ``boxes_n'' (where n is the corresponds to the
+ *       elements of the times or cycles array), or the input parser will
+ *       ignore the entry.  If there is no ``boxes_n'' entry corresponding
+ *       to element n of the times or cycles array, then no refinement will
+ *       occur on that level at the given time or cycle.
+ *
+ * A sample input file entry might look like:
+ *
+ * \verbatim
+ *
+ *    RefineBoxes {
+ *       level_0 {
+ *          cycles = 0, 10
+ *          boxes_0 = [(5,5),(9,9)],[(12,15),(18,19)]
+ *          boxes_1 = [(7,7),(11,11)],[(14,17),(20,21)]
+ *       }
+ *       level_1 {
+ *          times  = 0., 0.05, 0.10
+ *          boxes_0 = [(25,30),(29,35)]
+ *          boxes_1 = [(30,35),(34,40)]
+ *          boxes_2 = [(35,40),(39,45)]
+ *       }
+ *       level_2 {
+ *          boxes_0 = [(60,70),(70,80)]
+ *       }
+ *    }
+ * \endverbatim
+ *
+ * The virtual methods in this class may place constraints on the patch
+ * hierarchy by the particluar error estimation procedure in use.  Those
+ * constraints and operations must be honored in the concrete subclass
+ * implementations of these methods.  The constraints are discussed in
+ * the method descriptions below.
+ *
+ * @see mesh::GriddingAlgorithm
+ */
+
+class TagAndInitializeStrategy:
+   public virtual tbox::DescribedClass
+{
+public:
+   /*!
+    * Empty constructor for TagAndInitializeStrategy.
+    */
+   explicit TagAndInitializeStrategy(
+      const tbox::Dimension& dim);
+
+   /*!
+    * Empty destructor for TagAndInitializeStrategy.
+    */
+   virtual ~TagAndInitializeStrategy();
+
+   /*!
+    * Return user supplied set of refine boxes for specified level number
+    * and time.  The boolean return value specifies whether the boxes
+    * have been reset from the last time this method was called.  If they
+    * have been reset, it returns true.  If they are unchanged, it returns
+    * false.
+    */
+   bool
+   getUserSuppliedRefineBoxes(
+      hier::BoxArray& refine_boxes,
+      const int level_number,
+      const double time);
+
+   /*!
+    * Reset the static refine boxes for the specified level number in the
+    * hierarchy.  The level number must be greater than or equal to zero.
+    */
+   void
+   resetRefineBoxes(
+      const hier::BoxArray& refine_boxes,
+      const int level_number);
+
+   /*!
+    * Initialize data on a new level after it is inserted into an AMR patch
+    * hierarchy by the gridding algorithm.  The level number indicates
+    * that of the new level.  The old_level pointer corresponds to
+    * the level that resided in the hierarchy before the level with the
+    * specified number was introduced.  If this pointer is null, there was
+    * no level in the hierarchy prior to the call and the data on the new
+    * level is set by interpolating data from coarser levels in the hierarchy.
+    * Otherwise, the the new level is initialized by interpolating data from
+    * coarser levels and copying data from the old level before it is
+    * destroyed.
+    *
+    * The boolean argument initial_time indicates whether the integration
+    * time corresponds to the initial simulation time.  If true, the level
+    * should be initialized with initial simulation values.  Otherwise, it
+    * should be assumed that the simulation time is at some point after the
+    * start of the simulation.  This information is provided since the
+    * initialization of the data may be different in each of those
+    * circumstances.  In any case, the double "time" value is the current
+    * simulation time for the level.  The can_be_refined boolean argument
+    * indicates whether the level is the finest allowable level in the
+    * hierarchy.  This flag is included since data management on the finest
+    * level may be different than other levels in the hierarchy in some cases.
+    *
+    * The last two (optional) arguments specify an old level from which the
+    * data may be used to initialize data on this level, and a flag that
+    * indicates whether data on the initialized level must first be allocated.
+    * The allocate_data argument is used in cases where one wishes to
+    * simply reset data to an initialized state on a level that has already
+    * been allocated.
+    */
+   virtual void
+   initializeLevelData(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double init_data_time,
+      const bool can_be_refined,
+      const bool initial_time,
+      const tbox::Pointer<hier::BasePatchLevel> old_level =
+         tbox::Pointer<hier::BasePatchLevel>(NULL),
+      const bool allocate_data = true) = 0;
+
+   /*!
+    * After hierarchy levels have changed and data has been initialized on
+    * the new levels, this routine can be used to reset any information
+    * needed by the solution method that is particular to the hierarchy
+    * configuration.  For example, the solution procedure may cache
+    * communication schedules to amortize the cost of data movement on the
+    * AMR patch hierarchy.  This function will be called by the gridding
+    * algorithm after the initialization occurs so that the algorithm-specific
+    * subclass can reset such things.  Also, if the solution method must
+    * make the solution consistent across multiple levels after the hierarchy
+    * is changed, this process may be invoked by this routine.  Of course the
+    * details of these processes are determined by the particular solution
+    * methods in use.
+    *
+    * The level number arguments indicate the coarsest and finest levels
+    * in the current hierarchy configuration that have changed.  It should
+    * be assumed that all intermediate levels have changed as well.
+    */
+   virtual void
+   resetHierarchyConfiguration(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level) = 0;
+
+   /*!
+    * Set integer tags to "one" on the given level to identify
+    * where refinement of that level should occur.  The index is that of the
+    * cell-centered integer tag array on each patch.  The boolean argument
+    * initial_time indicates whether cells are being tagged at
+    * initialization time, or at some later time during the calculation.
+    * If it is false, it should be assumed that the error estimation process
+    * is being invoked at some later time after the AMR hierarchy was
+    * initially constructed.  This information is provided since application
+    * of the error estimator may be different in each of those circumstances.
+    *
+    * The cell-tagging operation may use time advancement to determine
+    * tag regions. The argument coarsest_sync_level provides information
+    * for the tagging method to coordinate time advance with an integrator.
+    * When time integration is used during regridding, this value is true
+    * if the level is the coarsest level involved in level synchronization
+    * immediately preceeding the regrid process; otherwise it is false.
+    * If time advancement is not used, this argument are ignored.
+    *
+    * The boolean can_be_refined is used to coordinate data reset operations
+    * with the time integrator when time-dependent regridding is used.  This
+    * is provided since data may be managed differently on the finest hierarchy
+    * level than on coarser levels.
+    */
+   virtual void
+   tagCellsForRefinement(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double error_data_time,
+      const int tag_index,
+      const bool initial_time,
+      const bool coarsest_sync_level,
+      const bool can_be_refined = true,
+      const double regrid_start_time = 0.) = 0;
+
+   /*!
+    * Certain cases may require pre-processing of error estimation data
+    * before tagging cells, which is handled by this method. For example,
+    * Richardson extrapolation may require advances of data in time before
+    * the error estimation procedure is implemented.
+    *
+    * The level number indicates the level in which pre-process steps
+    * are applied, time is the time at which the operation is performed
+    * (generally the regrid time), and the boolean argument indicates
+    * whether the operation is performed at the initial time.
+    */
+   virtual void
+   preprocessErrorEstimation(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double regrid_time,
+      const double regrid_start_time,
+      const bool initial_time) = 0;
+
+   /*!
+    * Return true if regridding process advances the data using some time
+    * integration procedure; otherwise, return false.
+    */
+   virtual bool
+   usesTimeIntegration() const = 0;
+
+   /*!
+    * Return true if boxes for coarsest hierarchy level are not appropriate
+    * for gridding strategy.  Otherwise, return false.  If false is returned,
+    * it is useful to provide a detailed explanatory message describing the
+    * problems with the boxes.
+    */
+   virtual bool
+   coarsestLevelBoxesOK(
+      const hier::BoxArray& boxes) const = 0;
+
+   /*!
+    * Return ratio by which level may be coarsened during the error
+    * estimation process.  Generally, this is needed by the gridding
+    * algorithm class so that the new patch levels that it constructs can
+    * be coarsened properly (if needed) during the error estimation process.
+    */
+   virtual int
+   getErrorCoarsenRatio() const = 0;
+
+   /*!
+    * Check ratios between hierarchy levels against any constraints that
+    * may be required for the error estimation scheme.
+    */
+   virtual void
+   checkCoarsenRatios(
+      const tbox::Array<hier::IntVector>& ratio_to_coarser) = 0;
+
+   /*!
+    * Return whether refinement is being performed using ONLY
+    * user-supplied refine boxes.  If any method is used that invokes
+    * tagging, this will return false.
+    */
+   virtual bool
+   refineUserBoxInputOnly() const = 0;
+
+   /*!
+    * Read user supplied refine boxes from the provided database.  The
+    * database must be non-null, or an unrecoverable assertion will be thrown.
+    */
+   void
+   getFromInput(
+      const std::string& object_name,
+      tbox::Pointer<tbox::Database> db);
+
+   /**
+    * Return the dimension of this object.
+    */
+   const tbox::Dimension&
+   getDim() const;
+
+private:
+   const tbox::Dimension d_dim;
+
+   std::string d_object_name;
+
+   /*
+    * Arrays of data for user-specified refinement.  The user controls
+    * the particular boxes to be used for refinement by specifying
+    * "cycles" -or- "times" and "refine_boxes".  The arrays below hold
+    * hold entries for each level and seq number.  The boolean array
+    * specifies whether to use time or cycles as the guiding criteria
+    * (by default, time is used).  The integer cycle counter holds
+    * internally the number of times the getRefineBoxes() method has
+    * been accessed for each level.
+    */
+   tbox::Array<tbox::Array<hier::BoxArray> > d_refine_boxes;
+   tbox::Array<tbox::Array<int> > d_refine_boxes_cycles;
+   tbox::Array<tbox::Array<double> > d_refine_boxes_times;
+   tbox::Array<bool> d_refine_boxes_use_times;
+   tbox::Array<int> d_refine_boxes_cycle_counter;
+
+   /*
+    * Arrays to hold boxes that are specifically reset by the user (via the
+    * resetRefineBoxes() method).  The boolean array specifies which levels
+    * have been reset while the box array specifies the new set of refine
+    * boxes for the level. The int array holds the sequence number from
+    * the last time getRefineBoxes() was called, allowing us to
+    * determine when refine boxes change between steps.
+    */
+   tbox::Array<bool> d_refine_boxes_reset;
+   tbox::Array<hier::BoxArray> d_reset_refine_boxes;
+   tbox::Array<int> d_refine_boxes_old_seq_num;
+
+   // The following are not implemented:
+   TagAndInitializeStrategy(
+      const TagAndInitializeStrategy&);
+   void
+   operator = (
+      const TagAndInitializeStrategy&);
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/TreeLoadBalancer.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/TreeLoadBalancer.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,5184 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Scalable load balancer using tree algorithm. 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_TreeLoadBalancer_C
+#define included_mesh_TreeLoadBalancer_C
+
+#include "SAMRAI/mesh/TreeLoadBalancer.h"
+#include "SAMRAI/hier/BoxUtilities.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+
+#include "SAMRAI/hier/MappingConnectorAlgorithm.h"
+#include "SAMRAI/hier/MappedBoxSet.h"
+#include "SAMRAI/hier/OverlapConnectorAlgorithm.h"
+#include "SAMRAI/hier/BoxUtilities.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/mesh/BalanceUtilities.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellDataFactory.h"
+#include "SAMRAI/hier/MappedBoxContainerUtils.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/BalancedDepthFirstTree.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/AsyncCommStage.h"
+#include "SAMRAI/tbox/AsyncCommGroup.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Statistician.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <algorithm>
+#include <cstdlib>
+#include <fstream>
+#include <cmath>
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/mesh/TreeLoadBalancer.I"
+#endif
+
+#define TreeLoadBalancer_LOADTAG0 12120001
+#define TreeLoadBalancer_LOADTAG1 12120002
+#define TreeLoadBalancer_EDGETAG0 12120003
+#define TreeLoadBalancer_EDGETAG1 12120004
+#define TreeLoadBalancer_PREBALANCE0 12120005
+#define TreeLoadBalancer_PREBALANCE1 12120006
+#define TreeLoadBalancer_FIRSTDATALEN 1000
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace mesh {
+
+// Extra checks independent of optimization/debug.
+char TreeLoadBalancer::s_print_steps = 0;
+char TreeLoadBalancer::s_print_break_steps = 0;
+char TreeLoadBalancer::s_print_swap_steps = 0;
+char TreeLoadBalancer::s_print_edge_steps = 0;
+char TreeLoadBalancer::s_check_connectivity = 0;
+char TreeLoadBalancer::s_check_map = 0;
+
+const int TreeLoadBalancer::d_default_data_id = -1;
+
+/*
+ *************************************************************************
+ *
+ * Constructors and destructor for TreeLoadBalancer.
+ *
+ *************************************************************************
+ */
+
+TreeLoadBalancer::TreeLoadBalancer(
+   const tbox::Dimension& dim,
+   const std::string& name,
+   tbox::Pointer<tbox::Database> input_db):
+   d_dim(dim),
+   d_mpi_dup(tbox::SAMRAI_MPI::commNull),
+   d_n_root_cycles(-1),
+   d_degree(2),
+   d_master_workload_data_id(d_default_data_id),
+   d_balance_penalty_wt(1.0),
+   d_surface_penalty_wt(1.0),
+   d_slender_penalty_wt(1.0),
+   d_slender_penalty_threshold(3.0),
+   d_precut_penalty_wt(1.0),
+   // Data shared during balancing.
+   d_mpi(tbox::SAMRAI_MPI::commNull),
+   d_rank(tbox::MathUtilities<int>::getMax()),
+   d_nproc(tbox::MathUtilities<int>::getMax()),
+   d_min_size(d_dim),
+   d_max_size(d_dim),
+   d_domain_boxes(d_dim),
+   d_bad_interval(d_dim),
+   d_cut_factor(d_dim),
+   // Output control.
+   d_report_load_balance(false),
+   // Performance evaluation.
+   d_barrier_before(false),
+   d_barrier_after(false)
+{
+   TBOX_ASSERT(!name.empty());
+
+   d_object_name = name;
+   d_using_all_procs = true;
+
+   getFromInput(input_db);
+
+   setTimers();
+
+}
+
+TreeLoadBalancer::~TreeLoadBalancer()
+{
+   freeMPICommunicator();
+}
+
+/*
+ *************************************************************************
+ *
+ * Accessory functions to get/set load balancing parameters.
+ *
+ *************************************************************************
+ */
+
+bool TreeLoadBalancer::getLoadBalanceDependsOnPatchData(
+   int level_number) const
+{
+   return getWorkloadDataId(level_number) < 0 ? false : true;
+}
+
+void TreeLoadBalancer::setWorkloadPatchDataIndex(
+   int data_id,
+   int level_number)
+{
+   tbox::Pointer<pdat::CellDataFactory<double> > datafact =
+      hier::VariableDatabase::getDatabase()->getPatchDescriptor()->
+      getPatchDataFactory(data_id);
+   if (datafact.isNull()) {
+      TBOX_ERROR(
+         d_object_name << " error: "
+         << "\n   data_id " << data_id << " passed to "
+         << "setWorkloadPatchDataIndex()"
+         <<
+         " does not refer to cell-centered double patch data. " << std::endl);
+   }
+
+   if (level_number >= 0) {
+      int asize = d_workload_data_id.getSize();
+      if (asize < level_number + 1) {
+         d_workload_data_id.resizeArray(level_number + 1);
+         for (int i = asize; i < level_number - 1; i++) {
+            d_workload_data_id[i] =
+               d_master_workload_data_id;
+         }
+         d_workload_data_id[level_number] = data_id;
+      }
+   } else {
+      d_master_workload_data_id = data_id;
+      for (int ln = 0; ln < d_workload_data_id.getSize(); ln++) {
+         d_workload_data_id[ln] = d_master_workload_data_id;
+      }
+   }
+}
+
+void TreeLoadBalancer::setUniformWorkload(
+   int level_number)
+{
+   d_workload_data_id[level_number] = -1;
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void TreeLoadBalancer::loadBalanceMappedBoxLevel(
+   hier::MappedBoxLevel& balance_mapped_box_level,
+   hier::Connector& balance_to_anchor,
+   hier::Connector& anchor_to_balance,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int level_number,
+   const hier::Connector& balance_to_attractor,
+   const hier::Connector& attractor_to_balance,
+   const hier::IntVector& min_size,
+   const hier::IntVector& max_size,
+   const hier::MappedBoxLevel& domain_mapped_box_level,
+   const hier::IntVector& bad_interval,
+   const hier::IntVector& cut_factor,
+   const tbox::RankGroup& rank_group) const
+{
+   NULL_USE(balance_to_attractor);
+   NULL_USE(attractor_to_balance);
+   NULL_USE(hierarchy);
+   NULL_USE(level_number);
+   TBOX_ASSERT(anchor_to_balance.isTransposeOf(balance_to_anchor));
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS6(d_dim,
+      balance_mapped_box_level,
+      min_size,
+      max_size,
+      domain_mapped_box_level,
+      bad_interval,
+      cut_factor);
+   if (!hierarchy.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *hierarchy);
+   }
+
+   d_mpi =
+      d_mpi_dup.getCommunicator() == tbox::SAMRAI_MPI::commNull ?
+      balance_mapped_box_level.getMPI() : d_mpi_dup;
+
+   d_nproc = d_mpi.getSize();
+   d_rank = d_mpi.getRank();
+
+   if (s_print_steps == 'y' ||
+       s_print_break_steps == 'y') {
+      tbox::plog << "TreeLoadBalancer::loadBalanceMappedBoxLevel called with:"
+                 << "\n  min_size = " << min_size
+                 << "\n  max_size = " << max_size
+                 << "\n  bad_interval = " << bad_interval
+                 << "\n  cut_factor = " << cut_factor
+                 << std::endl << balance_mapped_box_level.format("", 2);
+   }
+
+   {
+      /*
+       * Periodic image MappedBox should be ignored during load
+       * balancing.  The load-balanced results should contain no
+       * periodic images.
+       *
+       * To avoid need for special logic to skip periodic
+       * images while load balancing, we just remove
+       * periodic images in the balance_mapped_box_level and
+       * all periodic edges in anchor<==>balance.
+       */
+
+      hier::MappedBoxSet tmp_mapped_boxes;
+      hier::MappedBoxContainerUtils::removePeriodicImageMappedBoxes(
+         tmp_mapped_boxes,
+         balance_mapped_box_level.getMappedBoxes());
+      balance_mapped_box_level.swapInitialize(
+         tmp_mapped_boxes,
+         balance_mapped_box_level.getRefinementRatio(),
+         balance_mapped_box_level.getMPI());
+
+      hier::NeighborhoodSet tmp_edges;
+      hier::MappedBoxContainerUtils::removePeriodicNeighbors(
+         tmp_edges,
+         anchor_to_balance.getNeighborhoodSets());
+      anchor_to_balance.swapInitialize(
+         anchor_to_balance.getBase(),
+         balance_mapped_box_level,
+         anchor_to_balance.getConnectorWidth(),
+         tmp_edges,
+         hier::MappedBoxLevel::DISTRIBUTED);
+      tmp_edges.clear();
+      hier::MappedBoxContainerUtils::removePeriodicNeighbors(
+         tmp_edges,
+         balance_to_anchor.getNeighborhoodSets());
+      balance_to_anchor.swapInitialize(
+         balance_mapped_box_level,
+         balance_to_anchor.getHead(),
+         balance_to_anchor.getConnectorWidth(),
+         tmp_edges,
+         hier::MappedBoxLevel::DISTRIBUTED);
+   }
+
+   const hier::OverlapConnectorAlgorithm oca;
+
+   if (d_barrier_before) {
+      t_barrier_before->start();
+      d_mpi.Barrier();
+      t_barrier_before->stop();
+   }
+
+   if (!rank_group.containsAllRanks()) {
+      prebalanceMappedBoxLevel(balance_mapped_box_level,
+         balance_to_anchor,
+         anchor_to_balance,
+         rank_group);
+   }
+
+   t_load_balance_mapped_box_level->start();
+
+   /*
+    * Shadow data is internal duplicates of some parameters
+    * so they do not have to appear in all the interfaces.
+    */
+   setShadowData(min_size,
+      max_size,
+      domain_mapped_box_level,
+      bad_interval,
+      cut_factor,
+      balance_mapped_box_level.getRefinementRatio());
+
+   if (s_print_steps == 'y') {
+      tbox::plog << "Pre balanced:\n" << balance_mapped_box_level.format("", 2);
+   }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (balance_to_attractor.isInitialized()) {
+      /*
+       * If balance_to_attractor is given, sanity-check it.
+       */
+      if (&balance_mapped_box_level != &balance_to_attractor.getBase() &&
+          !(balance_mapped_box_level == balance_to_attractor.getBase())) {
+         TBOX_ERROR(
+            "TreeLoadBalancer::loadBalanceMappedBoxLevel: balance_mapped_box_level\n"
+            << "does not match the base of balance_to_attractor.");
+      }
+      if (!balance_to_attractor.isTransposeOf(attractor_to_balance)) {
+         TBOX_ERROR("TreeLoadBalancer::loadBalanceMappedBoxLevel:\n"
+            << "attractor_to_balance and balance_to_attractor\n"
+            << "are not transposes of each other.");
+      }
+   }
+#endif
+
+   double local_load, global_sum_load;
+
+   t_compute_local_load->start();
+   local_load = computeLocalLoads(balance_mapped_box_level);
+   t_compute_local_load->stop();
+
+   size_t nproc_with_initial_load =
+      balance_mapped_box_level.getLocalNumberOfBoxes() == 0 ? 0 : 1;
+
+   {
+      /*
+       * Global reduction for total load and number of procs that has
+       * any initial load.
+       */
+      t_compute_global_load->start();
+      if (d_mpi.getSize() > 1) {
+         double dtmp[2], dtmp_sum[2];
+         dtmp[0] = local_load;
+         dtmp[1] = (double)nproc_with_initial_load;
+         d_mpi.Allreduce(dtmp,
+            dtmp_sum,
+            2,
+            MPI_DOUBLE,
+            MPI_SUM);
+         global_sum_load = dtmp_sum[0];
+         nproc_with_initial_load = (size_t)dtmp_sum[1];
+      } else {
+         global_sum_load = local_load;
+      }
+      t_compute_global_load->stop();
+      if (s_print_steps == 'y') {
+         tbox::plog << "TreeLoadBalancer::loadBalanceMappedBoxLevel balancing "
+                    << global_sum_load << " (initially born on "
+                    << nproc_with_initial_load << " procs) across all "
+                    << d_nproc
+                    << " procs, averaging " << global_sum_load / d_nproc
+                    << " or " << pow(global_sum_load / d_nproc, 1.0 / d_dim.getValue())
+                    << "^" << d_dim << " per proc." << std::endl;
+      }
+   }
+
+   int output_nproc = rank_group.size();
+   d_global_avg_load = global_sum_load / output_nproc;
+
+   int number_of_cycles = d_n_root_cycles;
+   if (number_of_cycles < 0) {
+      /*
+       * User requested automatic number of cycles.
+       *
+       * Heuristic algorithm: Use 1 cycle unless too few (less than
+       * sqrt(nproc)) processors own the initial load.  Exception: use
+       * 1 cycle if nproc is small.
+       */
+      if (balance_mapped_box_level.getNproc() < 64 ||
+          int(nproc_with_initial_load * nproc_with_initial_load) >
+          balance_mapped_box_level.getNproc()) {
+         number_of_cycles = 1;
+      } else {
+         number_of_cycles = 2;
+      }
+   }
+
+   // Temporary object.
+   hier::MappedBoxLevel tmp_mapped_box_level(d_dim);
+
+   for (int n = 0; n < number_of_cycles; ++n) {
+
+      if (n > 0) {
+         t_compute_local_load->start();
+         local_load = computeLocalLoads(balance_mapped_box_level);
+         t_compute_local_load->stop();
+      }
+
+      if (d_report_load_balance) {
+         // Debugging: check overall load balance at intermediate cycles.
+         tbox::plog
+         << "TreeLoadBalancer::loadBalanceMappedBoxLevel results before cycle "
+         << n << ":" << std::endl;
+         TreeLoadBalancer::gatherAndReportLoadBalance(
+            local_load,
+            balance_mapped_box_level.getMPI());
+      }
+
+      bool using_this_rank = rank_group.isMember(d_rank);
+
+      /*
+       * 1.  Rebalance balance_mapped_box_level and store in temporary tmp_mapped_box_level.
+       * 2.  Use the balancing map to modify connectors to anchor.
+       * 3.  Reset balance_mapped_box_level to tmp_mapped_box_level.
+       */
+      hier::Connector balance_to_tmp, tmp_to_balance;
+      t_get_map->start();
+      if (using_this_rank) {
+         loadBalanceMappedBoxLevel_rootCycle(n,
+            number_of_cycles,
+            local_load,
+            global_sum_load,
+            balance_mapped_box_level,
+            rank_group,
+            tmp_mapped_box_level,
+            balance_to_tmp,
+            tmp_to_balance);
+      } else {
+         //initialize empty last 3 args
+         tmp_mapped_box_level.initialize(
+            balance_mapped_box_level.getRefinementRatio(),
+            balance_mapped_box_level.getMPI());
+         balance_to_tmp.initialize(
+            balance_mapped_box_level,
+            tmp_mapped_box_level,
+            hier::IntVector::getZero(d_dim));
+         tmp_to_balance.initialize(
+            tmp_mapped_box_level,
+            balance_mapped_box_level,
+            hier::IntVector::getZero(d_dim));
+      }
+      if (d_barrier_after) {
+         t_barrier_after->start();
+         d_mpi.Barrier();
+         t_barrier_after->stop();
+      }
+      t_get_map->stop();
+
+      t_use_map->start();
+      if (0) {
+         tbox::plog << "loadBalanceMappedBoxLevel: unbalanced:\n" << balance_mapped_box_level.format("--> ", 3)
+                    << "loadBalanceMappedBoxLevel: balanced:\n" << tmp_mapped_box_level.format("--> ", 3)
+                    << "loadBalanceMappedBoxLevel: unbalanced_to_balanced:\n" << balance_to_tmp.format("--> ", 3)
+                    << "loadBalanceMappedBoxLevel: balanced_to_unbalanced:\n" << tmp_to_balance.format("--> ", 3);
+      }
+      const hier::MappingConnectorAlgorithm mca;
+      mca.modify(anchor_to_balance,
+         balance_to_anchor,
+         balance_to_tmp,
+         tmp_to_balance,
+         &balance_mapped_box_level,
+         &tmp_mapped_box_level);
+      if (0) {
+         tbox::plog << "loadBalanceMappedBoxLevel: anchor:\n" << anchor_to_balance.getBase().format("--> ", 3)
+                    << "loadBalanceMappedBoxLevel: balanced:\n" << tmp_mapped_box_level.format("--> ", 3)
+                    << "loadBalanceMappedBoxLevel: balance_to_anchor:\n" << balance_to_anchor.format("--> ", 3)
+                    << "loadBalanceMappedBoxLevel: anchor_to_balance:\n" << anchor_to_balance.format("--> ", 3);
+      }
+      if (d_barrier_after) {
+         t_barrier_after->start();
+         d_mpi.Barrier();
+         t_barrier_after->stop();
+      }
+      t_use_map->stop();
+
+   }
+
+   /*
+    * If max_size is given (positive), constrain boxes to the given
+    * max_size.  If not given, skip the enforcement step to save some
+    * communications.
+    */
+   if (max_size > hier::IntVector::getZero(d_dim)) {
+      t_constrain_size->start();
+      hier::Connector unconstrained_to_constrained;
+      mapOversizedBoxes(
+         balance_mapped_box_level,
+         tmp_mapped_box_level,
+         unconstrained_to_constrained);
+      const hier::MappingConnectorAlgorithm mca;
+      mca.modify(anchor_to_balance,
+         balance_to_anchor,
+         unconstrained_to_constrained,
+         &balance_mapped_box_level,
+         &tmp_mapped_box_level);
+      t_constrain_size->stop();
+      if (s_print_steps == 'y') {
+         tbox::plog << " TreeLoadBalancer completed applying unconstrained_to_constrained map"
+                    << "\n";
+      }
+   }
+
+   unsetShadowData();
+
+   t_load_balance_mapped_box_level->stop();
+
+   local_load = computeLocalLoads(balance_mapped_box_level);
+   d_load_stat.push_back(local_load);
+   d_box_count_stat.push_back(
+      static_cast<int>(balance_mapped_box_level.getMappedBoxes().size()));
+
+   if (d_report_load_balance) {
+      t_report_loads->start();
+      tbox::plog
+      << "TreeLoadBalancer::loadBalanceMappedBoxLevel results after "
+      << number_of_cycles << " cycles:" << std::endl;
+      TreeLoadBalancer::gatherAndReportLoadBalance(local_load,
+         balance_mapped_box_level.getMPI());
+      t_report_loads->stop();
+   }
+
+   if (s_check_connectivity == 'y') {
+      tbox::plog << "TreeLoadBalancer checking balance-anchor connectivity."
+                 << std::endl;
+      int errs = 0;
+      if (oca.checkOverlapCorrectness(anchor_to_balance, false, true, true)) {
+         ++errs;
+         tbox::perr << "Error found in anchor_to_balance!\n";
+      }
+      if (oca.checkOverlapCorrectness(balance_to_anchor, false, true, true)) {
+         ++errs;
+         tbox::perr << "Error found in balance_to_anchor!\n";
+      }
+      if (anchor_to_balance.checkTransposeCorrectness(
+             balance_to_anchor)) {
+         ++errs;
+         tbox::perr << "Error found in balance-anchor transpose!\n";
+      }
+      if (errs != 0) {
+         TBOX_ERROR(
+            "Errors in load balance mapping found."
+            << "anchor_mapped_box_level:\n" << anchor_to_balance.getBase().format("", 2)
+            << "balance_mapped_box_level:\n" << balance_mapped_box_level.format("", 2)
+            << "anchor_to_balance:\n" << anchor_to_balance.format("", 2)
+            << "balance_to_anchor:\n" << balance_to_anchor.format("", 2));
+      }
+      tbox::plog << "TreeLoadBalancer checked balance-anchor connectivity."
+                 << std::endl;
+   }
+
+   if (d_barrier_after) {
+      t_barrier_after->start();
+      d_mpi.Barrier();
+      t_barrier_after->stop();
+   }
+
+   d_mpi.setCommunicator(tbox::SAMRAI_MPI::commNull);
+   d_nproc = d_rank = tbox::MathUtilities<int>::getMax();
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void TreeLoadBalancer::mapOversizedBoxes(
+   const hier::MappedBoxLevel& unconstrained,
+   hier::MappedBoxLevel& constrained,
+   hier::Connector& unconstrained_to_constrained) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim, unconstrained, constrained);
+
+   t_map_big_boxes->start();
+
+   if (s_print_break_steps == 'y') {
+      tbox::plog << "Mapping oversized boxes starting with "
+                 << unconstrained.getMappedBoxes().size() << " boxes."
+                 << std::endl;
+   }
+
+   const hier::IntVector& zero_vector(hier::IntVector::getZero(d_dim));
+
+   constrained.initialize(unconstrained.getRefinementRatio(),
+      unconstrained.getMPI());
+   hier::NeighborhoodSet unconstrained_eto_constrained;
+
+   const hier::MappedBoxSet& unconstrained_mapped_boxes = unconstrained.getMappedBoxes();
+
+   hier::LocalId next_available_index = unconstrained.getLastLocalId() + 1;
+
+   for (hier::MappedBoxSet::const_iterator ni = unconstrained_mapped_boxes.begin();
+        ni != unconstrained_mapped_boxes.end(); ++ni) {
+
+      const MappedBox& mapped_box = *ni;
+
+      const hier::IntVector mapped_box_size = mapped_box.getBox().numberCells();
+
+      if (mapped_box_size <= d_max_size) {
+         if (s_print_break_steps == 'y') {
+            tbox::plog << "    Not oversized: " << mapped_box
+                       << mapped_box.getBox().numberCells() << "\n";
+         }
+         constrained.addMappedBox(mapped_box);
+      } else {
+
+         if (s_print_break_steps == 'y') {
+            tbox::plog << "    Breaking oversized " << mapped_box
+                       << mapped_box.getBox().numberCells() << " ->";
+         }
+         hier::BoxList chopped(mapped_box.getBox());
+         hier::BoxUtilities::chopBoxes(chopped,
+            d_max_size,
+            d_min_size,
+            d_cut_factor,
+            d_bad_interval,
+            d_domain_boxes);
+
+         if (true || chopped.size() != 1) {
+
+            hier::MappedBoxSet& constrained_nabrs =
+               unconstrained_eto_constrained[mapped_box.getGlobalId()];
+
+            for (hier::BoxList::Iterator li(chopped);
+                 li; li++) {
+
+               const hier::Box new_box = *li;
+
+               const MappedBox new_mapped_box(new_box,
+                                   next_available_index++,
+                                   d_rank);
+
+               if (s_print_break_steps == 'y') {
+                  tbox::plog << "  " << new_mapped_box
+                             << new_mapped_box.getBox().numberCells();
+               }
+
+               constrained.addMappedBox(new_mapped_box);
+
+               constrained_nabrs.insert(constrained_nabrs.end(),
+                  new_mapped_box);
+
+            }
+
+            if (s_print_break_steps == 'y') {
+               tbox::plog << "\n";
+            }
+
+         } else {
+            if (s_print_break_steps == 'y') {
+               tbox::plog << " Unbreakable!" << "\n";
+            }
+            constrained.addMappedBox(mapped_box);
+         }
+
+      }
+
+   }
+
+   unconstrained_to_constrained.swapInitialize(
+      unconstrained,
+      constrained,
+      zero_vector,
+      unconstrained_eto_constrained);
+   unconstrained_to_constrained.setConnectorType(hier::Connector::MAPPING);
+
+   if (s_print_steps == 'y') {
+      tbox::plog
+      << " TreeLoadBalancer::mapOversizedBoxes completed building unconstrained_to_constrained"
+      << "\n";
+   }
+   t_map_big_boxes->stop();
+}
+
+/*
+ *************************************************************************
+ * Balance a mapped_box_level by using a single cycle of the tree load
+ * balancer algorithm.
+ *
+ *************************************************************************
+ */
+void TreeLoadBalancer::loadBalanceMappedBoxLevel_rootCycle(
+   const int cycle_number,
+   const int number_of_cycles,
+   const double local_load,
+   const double global_sum_load,
+   const hier::MappedBoxLevel& unbalanced_mapped_box_level,
+   const tbox::RankGroup& rank_group,
+   hier::MappedBoxLevel& balanced_mapped_box_level,
+   hier::Connector& unbalanced_to_balanced,
+   hier::Connector& balanced_to_unbalanced) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim,
+      unbalanced_mapped_box_level,
+      balanced_mapped_box_level);
+
+   const tbox::SAMRAI_MPI mpi(unbalanced_mapped_box_level.getMPI());
+
+   tbox::AsyncCommStage comm_stage;
+   tbox::AsyncCommPeer<int>* child_comms = NULL;
+   tbox::AsyncCommPeer<int>* parent_send = NULL;
+   tbox::AsyncCommPeer<int>* parent_recv = NULL;
+   int num_children = 0;
+
+   int g_count, g_id, g_rank, g_nproc;
+   createBalanceSubgroups(cycle_number,
+      number_of_cycles,
+      rank_group,
+      g_count,
+      g_id,
+      g_rank,
+      g_nproc,
+      num_children,
+      child_comms,
+      parent_send,
+      parent_recv,
+      comm_stage);
+
+   double group_sum_load, group_avg_load;
+
+   comm_stage.setCommunicationWaitTimer(t_MPI_wait);
+
+   t_compute_tree_load->start();
+   if (cycle_number == number_of_cycles - 1) {
+      /*
+       * The last cycle must have all processors in one group.
+       */
+      group_sum_load = global_sum_load;
+   } else {
+      switch (cycle_number) {
+         case 0: t_compute_tree_load0->start();
+            break;
+         case 1: t_compute_tree_load1->start();
+            break;
+         case 2: t_compute_tree_load2->start();
+            break;
+      }
+      /*
+       * Use MPI's vector all-reduce to get individual group loads.
+       * This gives more info than the process needs, but because the
+       * number of groups << number of procs, it is still faster
+       * (probably) than hand coded conmunication.
+       */
+      std::vector<double> group_loads(g_count, 0.0);
+      group_loads[g_id] = local_load;
+      if (mpi.getSize() > 1) {
+         mpi.AllReduce(&group_loads[0],
+                       static_cast<int>(group_loads.size()),
+                       MPI_SUM);
+      }
+      group_sum_load = group_loads[g_id];
+      switch (cycle_number) {
+         case 0: t_compute_tree_load0->stop();
+            break;
+         case 1: t_compute_tree_load1->stop();
+            break;
+         case 2: t_compute_tree_load2->stop();
+            break;
+      }
+   }
+   t_compute_tree_load->stop();
+
+   group_avg_load = group_sum_load / g_nproc;
+
+   if (s_print_steps == 'y') {
+      tbox::plog << "Initial local,group_sum,group_avg loads:"
+                 << "  " << local_load
+                 << "  " << group_sum_load
+                 << "  " << group_avg_load
+                 << std::endl;
+   }
+
+   /*
+    * Before the last cycle, it is possible for the group average load
+    * to be below the global average, if the group just happens to have
+    * underloaded processors.  However, there is no point in driving the
+    * processor loads down below the global average just to have it
+    * brought back up by the last cycle.  It just unnecessarily fragments
+    * the boxes and costs more to do.  To prevent this, set the group
+    * average to the global average if it is below.
+    */
+   group_avg_load =
+      tbox::MathUtilities<double>::Max(group_avg_load, d_global_avg_load);
+
+   // List of all ranks we communicate with.
+   std::vector<int> peer_ranks(num_children + 1);
+   for (int i = 0; i < num_children; ++i) {
+      peer_ranks[i] = child_comms[i].getPeerRank();
+   }
+   peer_ranks[num_children] = parent_send ==
+      NULL ? -1 : parent_send->getPeerRank();
+
+#if 0
+   if (s_print_steps == 'y') {
+      /*
+       * Warn about potentially large unbreakable box size,
+       * that may lead to poor load balancing results.
+       * It is not an error, just a limitation of the algorithm.
+       */
+      hier::IntVector largest_unbreakable_size = d_min_size;
+      largest_unbreakable_size *= 2;
+      largest_unbreakable_size -= hier::IntVector(1);
+      const int largest_unbreakable_load = largest_unbreakable_size.getProduct();
+      const double fraction = double(largest_unbreakable_load)
+         / (group_avg_load);
+      tbox::plog << "Largest unbreakable size: " << largest_unbreakable_size
+                 << '|' << largest_unbreakable_load << " is " << 100 * fraction
+                 << "% of average load."
+                 << "\nPoor balancing may result if largest unbreakable is too big!\n"
+                 << unbalanced_mapped_box_level.format(2);
+   }
+#endif
+
+   const hier::MappedBoxSet& unbalanced_mapped_boxes =
+      unbalanced_mapped_box_level.getMappedBoxes();
+
+   /*
+    * Outline for load balancing:
+    *
+    * 1. For each child:
+    * Receive data from subtree rooted at child (number in
+    * subtree, excess work, remaining work in subtree, etc.).
+    * 3. If parent exists:
+    * Compute subtree info (number in subtree, excess work,
+    * remaining work in subtree, etc.) and send to parent.
+    * 4. If not root:
+    * Receive additional work (if any) from parent.
+    * 5. Partition additional work among children and self.
+    * 6. For each child:
+    * Send additional work (if any).
+    *
+    * Outline for connecting pre-balance and post-balance MappedBoxes:
+    */
+
+   tbox::AsyncCommStage::MemberVec completed;
+
+   /*
+    * Post receive for data from subtree rooted at children.
+    * We have to do a few local setups, but post the receive
+    * now to overlap communication.
+    */
+   t_get_load_from_children->start();
+   for (int c = 0; c < num_children; ++c) {
+      child_comms[c].beginRecv();
+      if (child_comms[c].isDone()) {
+         completed.insert(completed.end(), &child_comms[c]);
+      }
+   }
+   t_get_load_from_children->stop();
+
+   t_misc1->start();
+
+   /*
+    * Data for storing and transfering subtree info.
+    */
+   SubtreeLoadData* child_load_data = new SubtreeLoadData[num_children];
+   SubtreeLoadData my_load_data;
+
+   t_misc1->stop();
+   t_misc2->start();
+
+   /*
+    * For tracking available indices that can be assigned to newly
+    * created MappedBoxes: The indices for MappedBoxes from this proc
+    * and those from children procs are interlaced to remove results'
+    * dependence on which message arrives first.
+    *
+    * Nodes from the first child start with the first unused index
+    * divisible by (2+d_degree).  Nodes from child c start with the
+    * same number plus c.  Locally created MappedBoxes start with the
+    * same number plus d_degree.  Nodes from parent start with the
+    * same number plus d_degree+1.
+    *
+    * Each time an index is used, next_available_index is increased by 2+degree.
+    */
+   std::vector<hier::LocalId> next_available_index(2 + d_degree);
+   next_available_index[0] = unbalanced_mapped_box_level.getLastLocalId() + 1;
+   next_available_index[0] += (next_available_index[0] % (1 + d_degree));
+   for (int c = 1; c < d_degree + 2; ++c) {
+      next_available_index[c] = next_available_index[0] + c;
+   }
+
+   /*
+    * Initialize output objects.
+    */
+   balanced_mapped_box_level.initialize(
+      unbalanced_mapped_box_level.getRefinementRatio(),
+      unbalanced_mapped_box_level.getMPI());
+   hier::NeighborhoodSet balanced_eto_unbalanced, unbalanced_eto_balanced;
+   balanced_to_unbalanced.initialize(
+      balanced_mapped_box_level,
+      unbalanced_mapped_box_level,
+      hier::IntVector::getZero(d_dim));
+   unbalanced_to_balanced.initialize(
+      unbalanced_mapped_box_level,
+      balanced_mapped_box_level,
+      hier::IntVector::getZero(d_dim));
+
+   t_misc2->stop();
+   t_misc3->start();
+
+   /*
+    * Unassigned NodeInTransit.  First set to local excess MappedBox
+    * (if any).  If children send up excess NodeInTransit, add them.  Result
+    * should be taken by local proc and sent down the tree to children
+    * (if needed).  The rest (if any) are sent up to parent.
+    */
+   TransitSet unassigned;
+
+   /*
+    * Compute local proc's MappedBoxes and loads and store in
+    * my_load_data.  This really should store data for the subtree.
+    * Wwe will add the rest of the subtree's work when we receive that
+    * data from the children.
+    */
+   my_load_data.total_work = 0;
+   my_load_data.num_procs = 1;
+   my_load_data.total_work += (int)computeLocalLoads(
+         unbalanced_mapped_box_level);
+
+   t_misc3->stop();
+
+   /*
+    * Decide whether local parts of unbalanced_mapped_box_level should
+    * be reassigned.  Populate balanced_mapped_box_level from local loads.
+    */
+
+   t_local_balancing->start();
+
+   if (my_load_data.total_work /* currently excluding children */ <=
+       group_avg_load) {
+      /*
+       * Local process is underloaded, so put all of unbalanced_mapped_box_level into
+       * the balanced mapped_box_level (and add more later).
+       */
+      for (hier::MappedBoxSet::const_iterator ni = unbalanced_mapped_boxes.begin();
+           ni != unbalanced_mapped_boxes.end(); ++ni) {
+         const MappedBox& mapped_box = *ni;
+         balanced_mapped_box_level.addMappedBox(mapped_box);
+      }
+   } else {
+      /*
+       * Local process is overloaded, so reassign some loads:
+       * - sort NodeInTransit by load
+       * - reassignLoads (put excess loads in unassigned container) and
+       * - put remainder in balanced_mapped_box_level.
+       *
+       * Note: This algorithm would also work if we put all local
+       * MappedBoxes into unassigned (instead of just the excess load).
+       * In the end,
+       * all remaining unassigned MappedBoxes get assigned to the local
+       * process anyway.  In fact, having more MappedBoxes in unassigned
+       * may let reassignLoads do a better job in reassigning loads
+       * to children and parents, because it would have more choices.
+       * The reason we place only the excess load into unassigned
+       * is to help preserve locality, assuming that current local
+       * MappedBoxes may have more local neighbors.  However, practical
+       * evidence so far suggest that locality is not that
+       * important to performance.  Transfering all local MappedBoxes
+       * into unassigned at the start may affect the performance
+       * of this algorithms though, because it bypasses one
+       * reassignLoads call but makes the unassigned MappedBox set
+       * bigger, which may make other calls to reassignLoads
+       * work harder.  Which one is a bigger effect and whether
+       * there are any significant effects at all remains to
+       * be seen.
+       */
+      TransitSet
+      sorted_loads(unbalanced_mapped_boxes.begin(), unbalanced_mapped_boxes.end());
+      int ideal_transfer = int(0.5 + my_load_data.total_work - group_avg_load);
+      // I forgot why I felt the need to try the following:
+      // int ideal_transfer = int( 1 + my_load_data.total_work - group_avg_load );
+      int actual_transfer;
+      if (s_print_steps == 'y') {
+         tbox::plog << "  Reassigning initial overload of " << ideal_transfer
+                    << " to unassigned.\n";
+      }
+      reassignLoads(sorted_loads,
+         unassigned,
+         ideal_transfer,
+         actual_transfer,
+         next_available_index[d_degree]);
+      for (TransitSet::const_iterator
+           ni = sorted_loads.begin(); ni != sorted_loads.end(); ++ni) {
+         const MappedBoxInTransit& mapped_box_in_transit = *ni;
+         balanced_mapped_box_level.addMappedBox(mapped_box_in_transit.mapped_box);
+         /*
+          * Create local edges only if mapped_box_in_transit changes.
+          * Unchanged MappedBoxes should not have edges.
+          * Semilocal edges are created by final owner
+          * and sent back.
+          */
+         if (mapped_box_in_transit.mapped_box.getLocalId() != mapped_box_in_transit.orig_mapped_box.getLocalId()) {
+            balanced_eto_unbalanced[mapped_box_in_transit.mapped_box.getGlobalId()].insert(
+               mapped_box_in_transit.orig_mapped_box);
+            unbalanced_eto_balanced[mapped_box_in_transit.orig_mapped_box.getGlobalId()].insert(
+               mapped_box_in_transit.mapped_box);
+         }
+      }
+
+      if (s_print_steps == 'y') {
+         tbox::plog << "    Unassigning " << unassigned.size()
+                    << " boxes (" << actual_transfer << " / "
+                    << ideal_transfer << " units) "
+                    << "for " << (g_nproc - 1) << " procs:";
+         for (TransitSet::const_iterator
+              ni = unassigned.begin(); ni != unassigned.end(); ++ni) {
+            tbox::plog << "  " << *ni;
+         }
+         tbox::plog << std::endl;
+      }
+   }
+
+   t_local_balancing->stop();
+
+   /*
+    * Complete load communications with children.
+    * Add imported MappedBoxInTransit to unassigned bin.
+    */
+   t_get_load_from_children->start();
+   do {
+      for (unsigned int i = 0; i < completed.size(); ++i) {
+         tbox::AsyncCommPeer<int>* peer_comm =
+            dynamic_cast<tbox::AsyncCommPeer<int> *>(completed[i]);
+         TBOX_ASSERT(peer_comm >= child_comms);
+         TBOX_ASSERT(peer_comm <= child_comms + num_children);
+         const int* received_data = peer_comm->getRecvData();
+         int received_data_length = peer_comm->getRecvSize();
+         const int cindex = static_cast<int>(peer_comm - child_comms);
+
+         TBOX_ASSERT(cindex >= 0 && cindex < num_children);
+
+         /*
+          * Extract data from the children.  Initialize data for tree
+          * rooted at children.  If child sent up any excess
+          * MappedBox, put them in unassigned.
+          */
+         int old_size = static_cast<int>(unassigned.size());
+         unpackSubtreeLoadData(received_data,
+            received_data_length,
+            child_load_data[cindex],
+            unassigned,
+            next_available_index[cindex]);
+         child_load_data[cindex].ideal_work =
+            int(group_avg_load * child_load_data[cindex].num_procs + 0.5);
+         if (s_print_steps == 'y') {
+            TransitSet::const_iterator
+            ni = unassigned.begin();
+            for (int ii = 0; ii < old_size; ++ii) {
+               ++ni;
+            }
+            if (s_print_steps == 'y') {
+               tbox::plog << "    Got " << unassigned.size() - old_size
+               << " boxes (" << child_load_data[cindex].load_imported
+               << " units) from child "
+               << peer_comm->getPeerRank() << ":";
+               for ( ; ni != unassigned.end(); ++ni) {
+                  const MappedBoxInTransit& mapped_box_in_transit = *ni;
+                  tbox::plog << "  " << mapped_box_in_transit;
+               }
+               tbox::plog << std::endl;
+            }
+         }
+         // Sum children load into my_load_data.
+         my_load_data.num_procs += child_load_data[cindex].num_procs;
+         my_load_data.total_work +=
+            child_load_data[cindex].total_work
+            + child_load_data[cindex].load_imported;
+      }
+      completed.clear();
+      t_children_load_comm->start();
+      comm_stage.advanceSome(completed);
+      t_children_load_comm->stop();
+   } while (!completed.empty());
+
+   // We should have received everything at this point.
+   TBOX_ASSERT(!comm_stage.hasPendingRequests());
+
+   my_load_data.ideal_work = int(group_avg_load * my_load_data.num_procs + 0.5);
+
+   if (s_print_steps == 'y') {
+      tbox::plog << "Received children subtree data." << std::endl;
+      for (int c = 0; c < num_children; ++c) {
+         tbox::plog << "Child " << child_comms[c].getPeerRank()
+         << " subtree data: " << child_load_data[c].total_work
+         << "/" << child_load_data[c].ideal_work
+         << " for " << child_load_data[c].num_procs << " procs averaging "
+         << child_load_data[c].total_work / child_load_data[c].num_procs
+         << " after sending up " << child_load_data[c].load_imported
+         << std::endl;
+      }
+      tbox::plog << "Initial subtree data: " << my_load_data.total_work
+                 << " / " << my_load_data.ideal_work
+                 << " for " << my_load_data.num_procs << " procs averaging "
+                 << my_load_data.total_work / my_load_data.num_procs
+                 << " before sending up anything."
+                 << std::endl;
+   }
+
+   t_get_load_from_children->stop();
+
+   /*
+    * Send subtree info and excess work (if any) up to parent.
+    */
+   t_send_load_to_parent->start();
+   if (parent_send != NULL) {
+      /*
+       * Compute the excess work we want to send to parent.
+       */
+      int ideal_transfer = my_load_data.total_work > my_load_data.ideal_work ?
+         my_load_data.total_work - my_load_data.ideal_work : 0;
+      if (ideal_transfer > 0) {
+         if (s_print_steps == 'y') {
+            tbox::plog << "  Attempting to reassign " << ideal_transfer
+                       << " of unassigned load to parent.\n";
+         }
+         int actual_transfer;
+         reassignLoads(unassigned,
+            my_load_data.for_export /* to parent */,
+            ideal_transfer,
+            actual_transfer,
+            next_available_index[d_degree]);
+         my_load_data.load_exported = actual_transfer;
+         my_load_data.total_work -= actual_transfer;
+
+         if (s_print_steps == 'y') {
+            tbox::plog << "  Giving " << my_load_data.for_export.size()
+                       << " boxes (" << actual_transfer << " / "
+                       << ideal_transfer << " units) to parent "
+                       << parent_send->getPeerRank() << " for "
+                       << (g_nproc - my_load_data.num_procs) << " procs:";
+            for (TransitSet::const_iterator
+                 ni = my_load_data.for_export.begin();
+                 ni != my_load_data.for_export.end(); ++ni) {
+               tbox::plog << "  " << *ni;
+            }
+            tbox::plog << std::endl;
+         }
+      }
+      /*
+       * Send local process's load info up to parent.
+       */
+      std::vector<int> msg;
+      packSubtreeLoadData(msg, my_load_data);
+      parent_send->beginSend(&msg[0], static_cast<int>(msg.size()));
+   }
+   t_send_load_to_parent->stop();
+
+   /*
+    * Finish the send-up.
+    * To preclude sending work in both directions, the parent
+    * will *not* send a work message down if we sent work up.
+    */
+   if (parent_send != NULL && my_load_data.load_exported == 0) {
+      t_parent_load_comm->start();
+
+#if 0
+      if (!parent_send->isDone()) {
+         t_send_load_to_parent->start();
+         parent_send->completeCurrentOperation();
+         t_send_load_to_parent->stop();
+      }
+#endif
+      t_get_load_from_parent->start();
+      parent_recv->beginRecv();
+      t_get_load_from_parent->stop();
+
+      t_parent_load_comm->stop();
+   }
+
+   /*
+    * May do some things here that do not depend on message from parents.
+    */
+
+   if (parent_recv != NULL && my_load_data.load_exported == 0) {
+      t_get_load_from_parent->start();
+
+      t_parent_load_comm->start();
+      parent_recv->completeCurrentOperation();
+      t_parent_load_comm->stop();
+
+      int old_size = static_cast<int>(unassigned.size());
+      SubtreeLoadData parent_load_data;
+      unpackSubtreeLoadData(parent_recv->getRecvData(),
+         parent_recv->getRecvSize(),
+         parent_load_data,
+         unassigned,
+         next_available_index[1 + d_degree]);
+      my_load_data.load_imported = parent_load_data.load_imported;
+      my_load_data.total_work += parent_load_data.load_imported;
+
+      if (s_print_steps == 'y') {
+         TransitSet::const_iterator
+         ni = unassigned.begin();
+         for (int i = 0; i < old_size; ++i) {
+            ++ni;
+         }
+         if (s_print_steps == 'y') {
+            tbox::plog << "    Got " << unassigned.size() - old_size
+                       << " boxes (" << parent_load_data.load_imported
+                       << " units) from parent "
+                       << parent_recv->getPeerRank() << ":";
+            for ( ; ni != unassigned.end(); ++ni) {
+               const MappedBoxInTransit& mapped_box_in_transit = *ni;
+               tbox::plog << "  " << mapped_box_in_transit;
+            }
+            tbox::plog << std::endl;
+         }
+      }
+
+      t_get_load_from_parent->stop();
+   }
+
+   if (s_print_steps == 'y') {
+      tbox::plog << "  After parent/children, my total work is "
+                 << my_load_data.total_work << " / "
+                 << my_load_data.ideal_work << std::endl;
+   }
+
+   /*
+    * Divide unassigned between self and children subtrees.
+    *
+    * Give as much as possible of the excess work to children trees
+    * so they can start their partitioning process.  The remaining
+    * excess is to be kept locally.
+    */
+
+   t_send_load_to_children->start();
+
+   /*
+    * Compute number of processors that would have to share
+    * the unassigned loads.  (Processor subtrees that have
+    * detached themselves do not count because they will
+    * not receive any unassigned loads.)
+    */
+   int remaining_num_procs = 1;
+   for (int c = 0; c < num_children; ++c) {
+      if (child_load_data[c].load_imported == 0) {
+         remaining_num_procs += child_load_data[c].num_procs;
+      }
+   }
+
+   for (int c = 0; c < num_children; ++c) {
+
+      SubtreeLoadData& recip_data = child_load_data[c];
+
+      /*
+       * To preclude unneeded messages,
+       * we do *not* send a work message down if the child
+       * sent work up to us.
+       */
+      if (recip_data.load_imported == 0) {
+         int ideal_transfer = recip_data.ideal_work - recip_data.total_work;
+         int actual_transfer = 0;
+         if (s_print_steps == 'y') {
+            tbox::plog << "  Attempting to reassign " << ideal_transfer
+            << " of unassigned load to child "
+            << child_comms[c].getPeerRank() << "\n";
+         }
+         if (ideal_transfer > 0) {
+            remaining_num_procs -= recip_data.num_procs;
+            reassignLoads(unassigned,
+               recip_data.for_export,
+               ideal_transfer,
+               actual_transfer,
+               next_available_index[d_degree]);
+            recip_data.load_exported += actual_transfer;
+            recip_data.total_work += actual_transfer;
+         }
+
+         if (s_print_steps == 'y') {
+            tbox::plog << "  Giving " << recip_data.for_export.size()
+            << " boxes (" << actual_transfer << " / " << ideal_transfer
+            << " units) to child " << c << ':'
+            << child_comms[c].getPeerRank() << " for "
+                                            << recip_data.num_procs
+                                            << " procs:";
+            for (TransitSet::const_iterator
+                 ni = recip_data.for_export.begin();
+                 ni != recip_data.for_export.end(); ++ni) {
+               tbox::plog << "  " << *ni;
+            }
+            tbox::plog << std::endl;
+         }
+         std::vector<int> msg;
+         packSubtreeLoadData(msg, recip_data);
+         child_comms[c].beginSend(&msg[0], static_cast<int>(msg.size()));
+
+      }
+
+   }
+
+   t_send_load_to_children->stop();
+
+   /*
+    * Unassigned MappedBoxInTransit that differ from their orig_mapped_box
+    * are imported or left-overs from breaking.  These MappedBoxes
+    * should have relationships.
+    *
+    * Unassigned MappedBoxInTransit that are identical to their
+    * orig_mapped_box are MappedBoxes that were intended for export but
+    * never exported.  These MappedBoxes should NOT have edges.
+    *
+    * We build mapping relationships for the former, but the latter
+    * should not have relationships.
+    */
+   t_local_balancing->start();
+
+   for (TransitSet::iterator
+        ni = unassigned.begin();
+        ni != unassigned.end(); /* incremented in loop */) {
+      const MappedBoxInTransit& mapped_box_in_transit = *ni;
+      balanced_mapped_box_level.addMappedBox(mapped_box_in_transit.mapped_box);
+      if (mapped_box_in_transit.mapped_box != mapped_box_in_transit.orig_mapped_box) {
+         // Create relationship for changed MappedBox.
+         balanced_eto_unbalanced[mapped_box_in_transit.mapped_box.getGlobalId()].insert(mapped_box_in_transit.orig_mapped_box);
+         ++ni;
+      } else {
+         // Remove unchanged mapped_box_in_transit so packedgeMessages
+         // will not create edge.
+         TransitSet::iterator sni = ni;
+         ++ni;
+         unassigned.erase(sni);
+      }
+   }
+
+   balanced_to_unbalanced.swapInitialize(
+      balanced_mapped_box_level,
+      unbalanced_mapped_box_level,
+      hier::IntVector::getZero(d_dim),
+      balanced_eto_unbalanced);
+   balanced_to_unbalanced.setConnectorType(hier::Connector::MAPPING);
+   unbalanced_to_balanced.swapInitialize(
+      unbalanced_mapped_box_level,
+      balanced_mapped_box_level,
+      hier::IntVector::getZero(d_dim),
+      unbalanced_eto_balanced);
+   unbalanced_to_balanced.setConnectorType(hier::Connector::MAPPING);
+
+   t_local_balancing->stop();
+
+   /*
+    * Now that unchanged MappedBoxInTransit have been removed from
+    * unassigned, call it "changed", for clarity.  Changed
+    * MappedBoxInTransit need to have edges built.
+    */
+   TransitSet& changed = unassigned;
+
+   /*
+    * Finish messages before starting edge info exchange.
+    * We have only sends to complete, so it should not take
+    * long to advance them all to completion.
+    */
+   t_finish_comms->start();
+   comm_stage.advanceAll(completed);
+   t_finish_comms->stop();
+   completed.clear();
+#ifdef DEBUG_CHECK_ASSERTIONS
+   for (int i = 0; i < num_children; ++i) {
+      TBOX_ASSERT(child_comms[i].isDone());
+   }
+   if (parent_send != NULL) {
+      TBOX_ASSERT(parent_send->isDone());
+      TBOX_ASSERT(parent_recv->isDone());
+   }
+#endif
+
+#if 1
+   /*
+    * This is not needed if the communications are bug-free.
+    * As a debugging measure, switch the MPI tags for edge communication.
+    */
+   for (int i = 0; i < num_children; ++i) {
+      child_comms[i].setMPITag(TreeLoadBalancer_EDGETAG0,
+         TreeLoadBalancer_EDGETAG1);
+   }
+   if (parent_send != NULL) {
+      parent_send->setMPITag(TreeLoadBalancer_EDGETAG0,
+         TreeLoadBalancer_EDGETAG1);
+      parent_recv->setMPITag(TreeLoadBalancer_EDGETAG0,
+         TreeLoadBalancer_EDGETAG1);
+   }
+#endif
+
+   /*
+    * Determine edges from unbalanced to balanced MappedBoxLevels
+    * by sending balanced MappedBoxes back to the owners of
+    * the unbalanced MappedBoxes that originated them.  Use
+    * the proc_hist data from the balanced MappedBoxInTransit
+    * to send along the tree.
+    *
+    * Post receives for edge data sent from children.
+    * Pack relationship data for locally owned MappedBoxes.
+    * Then complete receives  from children and send
+    * data up to parents.
+    *
+    * Four steps for passing relationship data to the owners of
+    * originating MappedBoxes:
+    * 1. Receive relationships from all children to whom we exported work.
+    * 1a. Note relationships to local MappedBoxes on balanced_mapped_box_level.
+    * 2. Send relationship data to parent if we imported work from parent.
+    * 3. Receive relationship data from parent if we exported work to parent.
+    * 4. Send relationships to children from whom we imported work.
+    *
+    * TODO: Implement alternate edge generation method where terminal
+    * owners send edge info directly back to initial owners.  No need
+    * for trails.  Initial owners receive from MPI_ANY and stops
+    * receiving when it can account for the number of cells it started
+    * with.  We should retain both methods for edge generation because
+    * we don't know which is faster on any given machine.  BTNG.
+    */
+
+   std::vector<int>* messages = new std::vector<int>[num_children + 1];
+
+   t_get_edge_from_children->start();
+   for (int c = 0; c < num_children; ++c) {
+      if (child_load_data[c].load_exported > 0) {
+         /*
+          * May have to wait for the send to complete before
+          * doing this.  Or we can set up another array of
+          * peer communication objects.
+          */
+         child_comms[c].beginRecv();
+         if (child_comms[c].isDone()) {
+            completed.insert(completed.end(), &child_comms[c]);
+         }
+      }
+   }
+
+   t_local_edges->start();
+   packNeighborhoodSetMessages(messages,
+      unbalanced_to_balanced,
+      changed,
+      peer_ranks);
+   t_local_edges->stop();
+
+   /*
+    * Advance edge messages from children.
+    */
+
+   if (completed.empty()) {
+      t_children_edge_comm->start();
+      comm_stage.advanceSome(completed);
+      t_children_edge_comm->stop();
+   }
+   while (!completed.empty()) {
+      for (unsigned int i = 0; i < completed.size(); ++i) {
+         tbox::AsyncCommPeer<int>* peer_comm =
+            dynamic_cast<tbox::AsyncCommPeer<int> *>(completed[i]);
+         const int* received_data = peer_comm->getRecvData();
+         int received_data_length = peer_comm->getRecvSize();
+         unpackAndRouteNeighborhoodSets(received_data,
+            received_data_length,
+            messages,
+            unbalanced_to_balanced,
+            peer_ranks);
+      }
+      completed.clear();
+      t_children_edge_comm->start();
+      comm_stage.advanceSome(completed);
+      t_children_edge_comm->stop();
+   }
+   t_get_edge_from_children->stop();
+
+   if (my_load_data.load_imported > 0) {
+      /*
+       * We have received MappedBoxInTransit from the parent,
+       * so the parent is expecting relationship data.
+       */
+      t_send_edge_to_parent->start();
+      t_parent_edge_comm->start();
+      parent_send->completeCurrentOperation();
+      parent_send->beginSend(&messages[num_children][0],
+         static_cast<int>(messages[num_children].size()));
+      t_parent_edge_comm->stop();
+      t_send_edge_to_parent->stop();
+   } else if (my_load_data.load_exported > 0) {
+      /*
+       * We have sent MappedBoxInTransit to the parent,
+       * so the parent will send back relationship data.
+       */
+      t_get_edge_from_parent->start();
+      t_parent_edge_comm->start();
+      parent_recv->beginRecv();
+      parent_recv->completeCurrentOperation();
+      t_parent_edge_comm->stop();
+      unpackAndRouteNeighborhoodSets(parent_recv->getRecvData(),
+         parent_recv->getRecvSize(),
+         messages,
+         unbalanced_to_balanced,
+         peer_ranks);
+      t_get_edge_from_parent->stop();
+   }
+
+   t_send_edge_to_children->start();
+   for (int c = 0; c < num_children; ++c) {
+      if (child_load_data[c].load_imported > 0) {
+         child_comms[c].beginSend(&messages[c][0],
+            static_cast<int>(messages[c].size()));
+      }
+   }
+   t_send_edge_to_children->stop();
+
+   if (s_check_connectivity == 'y') {
+      const hier::OverlapConnectorAlgorithm oca;
+      tbox::plog
+      << "TreeLoadBalancer checking unbalanced-balanced connectivity."
+      << std::endl;
+      int errs = 0;
+      if (oca.checkOverlapCorrectness(unbalanced_to_balanced, true, true)) {
+         ++errs;
+         tbox::perr << "Error found in unbalanced_to_balanced!\n";
+      }
+      if (oca.checkOverlapCorrectness(balanced_to_unbalanced, true, true)) {
+         ++errs;
+         tbox::perr << "Error found in balanced_to_unbalanced!\n";
+      }
+      if (unbalanced_to_balanced.checkTransposeCorrectness(
+             balanced_to_unbalanced)) {
+         ++errs;
+         tbox::perr << "Error found in balanced-unbalanced transpose!\n";
+      }
+      if (errs != 0) {
+         TBOX_ERROR(
+            "Errors in load balance mapping found."
+            << "unbalanced_mapped_box_level:\n" << unbalanced_mapped_box_level.format("", 2)
+            << "balanced_mapped_box_level:\n" << balanced_mapped_box_level.format("", 2)
+            << "unbalanced_to_balanced:\n" << unbalanced_to_balanced.format("", 2)
+            << "balanced_to_unbalanced:\n" << balanced_to_unbalanced.format("", 2));
+      }
+   }
+
+   if (s_check_map == 'y') {
+      const hier::MappingConnectorAlgorithm mca;
+      if (mca.findMappingErrors(unbalanced_to_balanced) != 0) {
+         TBOX_ERROR(
+            "TreeLoadBalancer::loadBalanceMappedBoxLevel_rootCycle Mapping errors found in unbalanced_to_balanced!");
+      }
+      if (unbalanced_to_balanced.checkTransposeCorrectness(
+             balanced_to_unbalanced)) {
+         TBOX_ERROR(
+            "TreeLoadBalancer::loadBalanceMappedBoxLevel_rootCycle Transpose errors found!");
+      }
+   }
+
+   delete[] child_load_data;
+   delete[] messages;
+
+   /*
+    * Wrap up communications.
+    * No follow-up needed because all the receives have been
+    * processed--only the sends may still be out.
+    *
+    * TODO: This step should take no significant time, because the sends
+    * should all be well on their way.  However, I'm seeing some
+    * aparent scaling issues.  I may want to use MPI_Request_free
+    * to just let the sends finish quietly without furthe actions.
+    * Not sure if that would help.
+    */
+   t_finish_comms->start();
+   comm_stage.advanceAll(completed);
+   t_finish_comms->stop();
+
+   destroyBalanceSubgroups(child_comms, parent_send, parent_recv);
+}
+
+/*
+ *************************************************************************
+ *
+ * The tree load balancer's reassignment method, essentially a two-bin
+ * load balancer.  Given two sets of MappedBoxInTransit (the bins) and
+ * an amount of work to move from one set to the other, this method
+ * makes a best effort to effect the work transfer between the two
+ * bins.  This can move MappedBoxInTransit between given sets and, if
+ * needed, breaking some NodeInTransit up to move part of the work.
+ *
+ * Reassign some MappedBoxInTransit from one set into another by moving
+ * them between src and dst containers of MappedBoxInTransit objects.
+ * This method is purely local, doing no actual communications.
+ *
+ * Effectiveness of reassignLoads is key to getting good balance.
+ * Any deviation from the ideal can accumulate each generation in
+ * the tree.
+ *
+ *************************************************************************
+ */
+void TreeLoadBalancer::reassignLoads(
+   TransitSet& src,
+   TransitSet& dst,
+   int ideal_transfer,
+   int& actual_transfer,
+   hier::LocalId& next_available_index) const
+{
+   if (s_print_steps == 'y') {
+      tbox::plog << "  reassignLoads attempting to reassign "
+                 << ideal_transfer << " from src to dst."
+                 << std::endl;
+   }
+
+   actual_transfer = 0;
+
+   if ((ideal_transfer >= 0 && src.empty()) ||
+       (ideal_transfer <= 0 && dst.empty())) {
+      return;
+   }
+
+   t_reassign_loads->start();
+
+   /*
+    * The algorithm cycles through a do-loop.  Each time around, we try
+    * to swap some MappedBoxInTransit between src and dst until we cannot improve the
+    * actual_transfer any further.  Then, we try breaking up some MappedBoxInTransit to
+    * improve the results.  If we break some MappedBoxInTransit, we generate some more
+    * swapping options that were not there before, so we loop back to
+    * try swapping again.
+    *
+    * If a break phase does not break any MappedBox (and does not generate more
+    * swap options), the loop will stop making changes.  We exit the loop
+    * at that point (and whenever we reached the ideal transfer).
+    */
+   do {
+
+      double balance_penalty;
+
+      /*
+       * Try to balance load through swapping.
+       */
+      int swap_transfer;
+      shiftLoadsBySwapping(
+         src,
+         dst,
+         ideal_transfer - actual_transfer,
+         swap_transfer);
+      actual_transfer += swap_transfer;
+
+      balance_penalty = computeBalancePenalty(src,
+            dst,
+            actual_transfer - ideal_transfer);
+
+      if (s_print_steps == 'y') {
+         tbox::plog << "  Balance penalty after shiftLoadsBySwapping = "
+                    << balance_penalty
+                    << ", needs " << (ideal_transfer - actual_transfer)
+                    << " more with " << src.size() << " source and "
+                    << dst.size() << " dst MappedBoxes remaining."
+                    << std::endl;
+      }
+
+      if (actual_transfer == ideal_transfer) break;
+
+      /*
+       * Assuming that we did the best we could, swapping
+       * some MappedBoxInTransit without breaking any, we now break up a MappedBox
+       * in the overloaded side for partial transfer to the
+       * underloaded side.
+       */
+      int brk_transfer;
+      shiftLoadsByBreaking(src,
+         dst,
+         ideal_transfer - actual_transfer,
+         brk_transfer,
+         next_available_index);
+      actual_transfer += brk_transfer;
+
+      balance_penalty = computeBalancePenalty(src,
+            dst,
+            actual_transfer - ideal_transfer);
+
+      if (s_print_steps == 'y') {
+         tbox::plog << "    Balance penalty after shiftLoadsByBreaking = "
+                    << balance_penalty
+                    << ", needs " << (ideal_transfer - actual_transfer)
+                    << " more with " << src.size() << " source and "
+                    << dst.size() << " dst MappedBoxes remaining."
+                    << std::endl;
+      }
+      if (brk_transfer == 0) {
+         /*
+          * If no MappedBox can be broken to improve the actual_transfer,
+          * there is nothing further we can do.  (The swap phase, tried
+          * before the break phase, also generated no transfer.)
+          */
+         break;
+      }
+
+      /*
+       * Now that we have broken up a MappedBox, redo this loop to
+       * see if swapping can produce a better result.
+       */
+   } while (ideal_transfer != actual_transfer);
+
+   t_reassign_loads->stop();
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void TreeLoadBalancer::packSubtreeLoadData(
+   std::vector<int>& msg,
+   const SubtreeLoadData& load_data) const
+{
+   t_pack_load->start();
+   msg.insert(msg.end(), load_data.num_procs);
+   msg.insert(msg.end(), load_data.total_work);
+   msg.insert(msg.end(), load_data.load_exported);
+   const TransitSet& for_export = load_data.for_export;
+   msg.insert(msg.end(), static_cast<int>(for_export.size()));
+   for (TransitSet::const_iterator
+        ni = for_export.begin(); ni != for_export.end(); ++ni) {
+      const MappedBoxInTransit& mapped_box_in_transit = *ni;
+      int i0 = static_cast<int>(msg.size());
+      msg.insert(msg.end(), mapped_box_in_transit.commBufferSize(), 0);
+      mapped_box_in_transit.putToIntBuffer(&msg[i0]);
+   }
+   t_pack_load->stop();
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void TreeLoadBalancer::unpackSubtreeLoadData(
+   const int* received_data,
+   int received_data_length,
+   SubtreeLoadData& load_data,
+   TransitSet& receiving_bin,
+   hier::LocalId& next_available_index) const
+{
+   (void)received_data_length;
+   t_unpack_load->start();
+   load_data.num_procs = *(received_data++);
+   load_data.total_work = *(received_data++);
+   load_data.load_imported = *(received_data++);
+   const int num_transits = *(received_data++);
+   for (int i = 0; i < num_transits; ++i) {
+      MappedBoxInTransit received_mapped_box_in_transit(d_dim);
+      received_mapped_box_in_transit.getFromIntBuffer(received_data);
+      MappedBoxInTransit renamed_mapped_box_in_transit(received_mapped_box_in_transit,
+                                 received_mapped_box_in_transit.getBox(),
+                                 d_rank,
+                                 next_available_index);
+      next_available_index += 2 + d_degree;
+      receiving_bin.insert(renamed_mapped_box_in_transit);
+      received_data += received_mapped_box_in_transit.commBufferSize();
+   }
+   t_unpack_load->stop();
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void TreeLoadBalancer::packNeighborhoodSetMessages(
+   std::vector<int> messages[],
+   hier::Connector& unbalanced_to_balanced,
+   const TransitSet& mapped_boxes_in_transit,
+   const std::vector<int>& peer_ranks) const
+{
+   t_pack_edge->start();
+
+   const int num_children = static_cast<int>(peer_ranks.size()) - 1;
+   const int parent_rank = peer_ranks[num_children];
+   const std::vector<int>& child_ranks = peer_ranks;
+
+   hier::NeighborhoodSet unbalanced_eto_balanced;
+   unbalanced_to_balanced.swapInitialize(
+      unbalanced_to_balanced.getBase(),
+      unbalanced_to_balanced.getHead(),
+      unbalanced_to_balanced.getConnectorWidth(),
+      unbalanced_eto_balanced);
+
+   for (TransitSet::const_iterator
+        ni = mapped_boxes_in_transit.begin(); ni != mapped_boxes_in_transit.end(); ++ni) {
+
+      MappedBoxInTransit mapped_box_in_transit = *ni;
+
+      // If there is no process history, then local process must be originator.
+      if (mapped_box_in_transit.proc_hist.empty()) {
+
+         if (s_print_edge_steps == 'y') {
+            tbox::plog << "Keeping edge " << mapped_box_in_transit << std::endl;
+         }
+         TBOX_ASSERT(mapped_box_in_transit.orig_mapped_box.getOwnerRank() == d_rank);
+         unbalanced_eto_balanced[
+            mapped_box_in_transit.orig_mapped_box.getGlobalId()].insert(mapped_box_in_transit.mapped_box);
+
+      } else {
+
+         TBOX_ASSERT(mapped_box_in_transit.orig_mapped_box.getOwnerRank() != d_rank);
+
+         // Remember the previous owner and remove it from the proc_hist.
+         const int prev_owner = mapped_box_in_transit.proc_hist.back();
+         std::vector<int>::iterator eri = mapped_box_in_transit.proc_hist.end();
+         mapped_box_in_transit.proc_hist.erase(--eri);
+
+         // Find message corresponding to prev_owner.
+         int source_i = -1;
+         if (parent_rank != -1 && prev_owner == parent_rank) {
+            source_i = num_children; // Means source is parent.
+         } else {
+            for (source_i = 0; source_i != num_children; ++source_i) {
+               if (prev_owner == child_ranks[source_i]) {
+                  break;
+               }
+            }
+         }
+
+         TBOX_ASSERT(source_i < num_children + 1);
+
+         std::vector<int>& msg = messages[source_i];
+
+         // Pack mapped_box_in_transit into msg.
+         if (s_print_edge_steps == 'y') {
+            tbox::plog << "Pack edge to "
+            << (source_i < num_children ? "child " : "parent ")
+            << (source_i < num_children ? child_ranks[source_i] : parent_rank)
+            << ": " << mapped_box_in_transit
+            << std::endl;
+         }
+         msg.insert(msg.end(), mapped_box_in_transit.commBufferSize(), 0);
+         mapped_box_in_transit.putToIntBuffer(&msg[msg.size() - mapped_box_in_transit.commBufferSize()]);
+      }
+
+   }
+   unbalanced_to_balanced.swapInitialize(
+      unbalanced_to_balanced.getBase(),
+      unbalanced_to_balanced.getHead(),
+      unbalanced_to_balanced.getConnectorWidth(),
+      unbalanced_eto_balanced);
+   t_pack_edge->stop();
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void TreeLoadBalancer::unpackAndRouteNeighborhoodSets(
+   const int* received_data,
+   int received_data_length,
+   std::vector<int> outgoing_messages[],
+   hier::Connector& unbalanced_to_balanced,
+   const std::vector<int>& peer_ranks) const
+{
+   t_unpack_edge->start();
+
+   const int num_children = static_cast<int>(peer_ranks.size()) - 1;
+   const int parent_rank = peer_ranks[num_children];
+   const std::vector<int>& child_ranks = peer_ranks;
+
+   hier::NeighborhoodSet unbalanced_eto_balanced;
+   unbalanced_to_balanced.swapInitialize(
+      unbalanced_to_balanced.getBase(),
+      unbalanced_to_balanced.getHead(),
+      unbalanced_to_balanced.getConnectorWidth(),
+      unbalanced_eto_balanced);
+
+   const int* beg = received_data;
+   const int* end = received_data + received_data_length;
+
+   while (beg < end) {
+
+      MappedBoxInTransit mapped_box_in_transit(d_dim);
+      mapped_box_in_transit.getFromIntBuffer(beg);
+      beg += mapped_box_in_transit.commBufferSize();
+      if (s_print_edge_steps == 'y') {
+         tbox::plog << "Unpacked edge " << mapped_box_in_transit << std::endl;
+      }
+
+      TBOX_ASSERT(beg <= end);
+
+      if (mapped_box_in_transit.proc_hist.empty()) {
+
+         if (s_print_edge_steps == 'y') {
+            tbox::plog << "Keeping edge " << mapped_box_in_transit << std::endl;
+         }
+
+         TBOX_ASSERT(mapped_box_in_transit.orig_mapped_box.getOwnerRank() == d_rank);
+
+         unbalanced_eto_balanced[
+            mapped_box_in_transit.orig_mapped_box.getGlobalId()].insert(mapped_box_in_transit.mapped_box);
+
+      } else {
+
+         TBOX_ASSERT(mapped_box_in_transit.orig_mapped_box.getOwnerRank() != d_rank);
+
+         // Remember the previous owner and remove it from the proc_hist.
+         const int prev_owner = mapped_box_in_transit.proc_hist.back();
+         std::vector<int>::iterator eri = mapped_box_in_transit.proc_hist.end();
+         mapped_box_in_transit.proc_hist.erase(--eri);
+
+         // Find outgoing message corresponding to prev_owner.
+         int source_i = -1;
+         if (parent_rank != -1 && prev_owner == parent_rank) {
+            source_i = num_children; // Means source is parent.
+         } else {
+            for (source_i = 0; source_i != num_children; ++source_i) {
+               if (prev_owner == child_ranks[source_i]) {
+                  break;
+               }
+            }
+         }
+
+         TBOX_ASSERT(source_i < num_children + 1);
+
+         std::vector<int>& msg = outgoing_messages[source_i];
+
+         // Pack mapped_box_in_transit into msg.
+         if (s_print_edge_steps == 'y') {
+            tbox::plog << "Pack edge to "
+            << (source_i < num_children ? "child " : "parent ")
+            << (source_i < num_children ? child_ranks[source_i] : parent_rank)
+            << ": " << mapped_box_in_transit
+            << std::endl;
+         }
+         msg.insert(msg.end(), mapped_box_in_transit.commBufferSize(), 0);
+         mapped_box_in_transit.putToIntBuffer(&msg[msg.size() - mapped_box_in_transit.commBufferSize()]);
+      }
+   }
+   unbalanced_to_balanced.swapInitialize(
+      unbalanced_to_balanced.getBase(),
+      unbalanced_to_balanced.getHead(),
+      unbalanced_to_balanced.getConnectorWidth(),
+      unbalanced_eto_balanced);
+   t_unpack_edge->stop();
+}
+
+/*
+ *************************************************************************
+ * Set the MPI commuicator.  If there's a private communicator, free
+ * it first.  It's safe to free the private communicator because no
+ * other code have access to it.
+ *************************************************************************
+ */
+void TreeLoadBalancer::setSAMRAI_MPI(
+   const tbox::SAMRAI_MPI& samrai_mpi)
+{
+   if ( samrai_mpi.getCommunicator() == tbox::SAMRAI_MPI::commNull ) {
+      TBOX_ERROR("TreeLoadBalancer::setMPICommunicator error: Given\n"
+                 <<"communicator is invalid.");
+   }
+
+   d_mpi_dup.freeCommunicator();
+
+   // Enable private communicator.
+   d_mpi_dup.dupCommunicator(samrai_mpi);
+}
+
+/*
+ *************************************************************************
+ * Set the MPI commuicator.
+ *************************************************************************
+ */
+void TreeLoadBalancer::freeMPICommunicator()
+{
+   // Free the private communicator (if MPI has not been finalized).
+   int flag;
+   tbox::SAMRAI_MPI::Finalized(&flag);
+   if (!flag) {
+      d_mpi_dup.freeCommunicator();
+   }
+}
+
+/*
+ *************************************************************************
+ * Divide all d_nproc ranks into groups.  With each cycle,
+ * the group size grows geometrically while the number of groups
+ * shrink geometrically.
+ * The last cycle_number has a single group of d_nproc processors.
+ *
+ * Let m = number of cycles
+ * i = cycle number, [0,m)
+ * p = communicator size
+ * r = rank in communicator
+ * q = group size
+ * c = number of groups
+ * g = group id
+ * s = rank in group
+ * d = tree degree (d==2 means binary tree)
+ *
+ * c = p^( 1-(i+1)/m )
+ *
+ * With interlacing
+ * g = r%q
+ * r = q*s + g
+ * s = (r+g)/q
+ *
+ * Without interlacing
+ * q = ceil(p/c)
+ * g=r/q
+ * s = r%c
+ *
+ * Note that for the last cycle, p == q and r == s.
+ *
+ * The tree is built from the processor ranks in its group, as shown:
+ *         0
+ *        / \
+ *       /   \
+ *      /     \
+ *     1       2
+ *    / \     / \
+ *   3   4   5   6
+ *  /|  /|   |
+ * 7 8 9 10 11 ...
+ *
+ * Communication with children are separated by communication
+ * with parents, so we can reuse child_comms.  Sends and
+ * receives with parents can overlap, so we have two objects
+ * (parent_send and parent_recv) whose activities may
+ * overlap.
+ *
+ *************************************************************************
+ */
+void TreeLoadBalancer::createBalanceSubgroups(
+   const int cycle_number,
+   const int number_of_cycles,
+   const tbox::RankGroup& rank_group,
+   int& g_count,
+   int& g_id,
+   int& g_rank,
+   int& g_nproc,
+   int& num_children,
+   tbox::AsyncCommPeer<int> *& child_comms,
+   tbox::AsyncCommPeer<int> *& parent_send,
+   tbox::AsyncCommPeer<int> *& parent_recv,
+   tbox::AsyncCommStage& comm_stage) const
+{
+   if (d_nproc == 1) {
+      child_comms = parent_send = parent_recv = NULL;
+      g_count = 1;
+      g_nproc = d_nproc;
+      g_id = 0;
+      g_rank = 0;
+      return;
+   }
+
+   TBOX_ASSERT(d_mpi.getCommunicator() != tbox::SAMRAI_MPI::commNull);
+   TBOX_ASSERT(child_comms == NULL);
+   TBOX_ASSERT(parent_send == NULL);
+   TBOX_ASSERT(parent_recv == NULL);
+
+   /*
+    * Groups can be contiguous intervals in [0..nproc) or they can be
+    * interlaced.
+    *
+    * We assume that contiguous numbers of processors tend to be closer
+    * on the network.  We usually want contiguous cycles to help reduce
+    * the communication hops made by transfered loads.  However,
+    * multiple cycles, used for severe initial imbalances, are meant to
+    * spread the load across the machine as fast as possible so we want
+    * contiguous groups only in the final cycle.
+    */
+   const bool interlace_groups = cycle_number < number_of_cycles - 1;
+
+   TBOX_ASSERT(rank_group.isMember(d_rank));
+   int my_output_id = rank_group.getMapIndex(d_rank);
+   int output_nproc = rank_group.size();
+
+   /*
+    * Compute group sizes, membership, etc.
+    *
+    * Tiny groups tend to leave the members with
+    * possibly large overloads.
+    * In order to make all groups similar in size
+    * we tend to round down the number of groups
+    * (and round up the group size).
+    */
+   // Number of groups:
+   g_count = (int)pow((double)output_nproc,
+         1.0 - double(cycle_number + 1) / number_of_cycles);
+   if (interlace_groups) {
+      // Group id (group number):
+      g_id = my_output_id % g_count;
+      // Rank in group g_id:
+      g_rank = my_output_id / g_count;
+      // Population of group g_id:
+      g_nproc = output_nproc / g_count + (g_id < (output_nproc % g_count));
+   } else {
+      /*
+       * All groups will have a nominal population count.
+       * Remainder is distributed to a subset of groups, starting from group 0,
+       * so these groups will have one more than nominal.
+       */
+      int nominal_g_nproc = output_nproc / g_count;
+      int first_nominal_group = output_nproc % g_count;
+      int first_nominal_rank_id = first_nominal_group * (1 + nominal_g_nproc);
+      if (my_output_id < first_nominal_rank_id) {
+         // Group id (group number):
+         g_id = my_output_id / (1 + nominal_g_nproc);
+         // Rank in group g_id:
+         g_rank = my_output_id % (1 + nominal_g_nproc);
+         // Population of group g_id:
+         g_nproc = nominal_g_nproc + 1;
+      } else {
+         // Group id (group number):
+         g_id = first_nominal_group
+            + (my_output_id - first_nominal_rank_id) / nominal_g_nproc;
+         // Rank in group g_id:
+         g_rank = (my_output_id - first_nominal_rank_id) % nominal_g_nproc;
+         // Population of group g_id:
+         g_nproc = nominal_g_nproc;
+      }
+   }
+
+#if 1
+   /*
+    * Arrange the group ranks in a BalancedDepthFirstTree in order to get
+    * the parent/children in the group.
+    *
+    * By the way, the BalancedDepthFirstTree currently assumes a binary
+    * tree, d_degree = 2.
+    */
+   TBOX_ASSERT(d_degree == 2);
+   //tbox::BalancedDepthFirstTree bdfs(0, g_nproc - 1, g_rank, true);
+   tbox::BalancedDepthFirstTree bdfs(0, g_nproc - 1, g_rank, true);
+   num_children = bdfs.getNumberOfChildren();
+   child_comms = new tbox::AsyncCommPeer<int>[num_children];
+   for (int i = 0; i < num_children; ++i) {
+      const int child_g_rank = bdfs.getChildRank(i);
+      int child_true_rank;
+      if (interlace_groups) {
+         child_true_rank = rank_group.getMappedRank(child_g_rank * g_count + g_id);
+      } else {
+         int nominal_g_nproc = output_nproc / g_count;
+         int first_nominal_group = output_nproc % g_count;
+         int group_first_rank = g_id < first_nominal_group ?
+            g_id * (1 + nominal_g_nproc) :
+            first_nominal_group
+            * (1
+               + nominal_g_nproc)
+            + (g_id - first_nominal_group) * nominal_g_nproc;
+         child_true_rank = rank_group.getMappedRank(child_g_rank + group_first_rank);
+      }
+      child_comms[i].initialize(&comm_stage);
+      child_comms[i].setPeerRank(child_true_rank);
+      child_comms[i].setMPI(d_mpi);
+      child_comms[i].setMPITag(TreeLoadBalancer_LOADTAG0,
+         TreeLoadBalancer_LOADTAG1);
+      child_comms[i].limitFirstDataLength(TreeLoadBalancer_FIRSTDATALEN);
+   }
+   if (bdfs.getParentRank() != bdfs.getInvalidRank()) {
+      const int parent_g_rank = bdfs.getParentRank();
+      int parent_true_rank;
+      if (interlace_groups) {
+         parent_true_rank = rank_group.getMappedRank(parent_g_rank * g_count + g_id);
+      } else {
+         int nominal_g_nproc = output_nproc / g_count;
+         int first_nominal_group = output_nproc % g_count;
+         int group_first_rank = g_id < first_nominal_group ?
+            g_id * (1 + nominal_g_nproc) :
+            first_nominal_group
+            * (1
+               + nominal_g_nproc)
+            + (g_id - first_nominal_group) * nominal_g_nproc;
+         parent_true_rank = rank_group.getMappedRank(parent_g_rank + group_first_rank);
+      }
+
+      parent_send = new tbox::AsyncCommPeer<int>;
+      parent_send->initialize(&comm_stage);
+      parent_send->setPeerRank(parent_true_rank);
+      parent_send->setMPI(d_mpi);
+      parent_send->setMPITag(TreeLoadBalancer_LOADTAG0,
+         TreeLoadBalancer_LOADTAG1);
+      parent_send->limitFirstDataLength(TreeLoadBalancer_FIRSTDATALEN);
+
+      parent_recv = new tbox::AsyncCommPeer<int>;
+      parent_recv->initialize(&comm_stage);
+      parent_recv->setPeerRank(parent_true_rank);
+      parent_recv->setMPI(d_mpi);
+      parent_recv->setMPITag(TreeLoadBalancer_LOADTAG0,
+         TreeLoadBalancer_LOADTAG1);
+      parent_recv->limitFirstDataLength(TreeLoadBalancer_FIRSTDATALEN);
+   }
+#else
+   /*
+    * Arrange the group ranks in a breadth-first tree in order to get
+    * the parent/children in the group.
+    */
+   for (num_children = 0; num_children < d_degree; ++num_children) {
+      const int child_g_rank = d_degree * (g_rank + 1) + num_children - 1;
+      const int child_true_rank = child_g_rank * g_count + g_id;
+      if (child_true_rank >= d_nproc) break;
+   }
+   child_comms = new tbox::AsyncCommPeer<int>[num_children];
+   for (int i = 0; i < num_children; ++i) {
+      const int child_g_rank = d_degree * (g_rank + 1) + i - 1;
+      int child_true_rank;
+      if (interlace_groups) {
+         child_true_rank = child_g_rank * g_count + g_id;
+      } else {
+         int nominal_g_nproc = d_nproc / g_count;
+         int first_nominal_group = d_nproc % g_count;
+         // int first_nominal_rank = first_nominal_group*(1+nominal_g_nproc);
+         int group_first_rank = g_id < first_nominal_group ?
+            g_id * (1 + nominal_g_nproc) :
+            first_nominal_group
+            * (1
+               + nominal_g_nproc)
+            + (g_id - first_nominal_group) * nominal_g_nproc;
+         child_true_rank = child_g_rank + group_first_rank;
+      }
+      child_comms[i].initialize(&comm_stage);
+      child_comms[i].setPeerRank(child_true_rank);
+      child_comms[i].setSAMRAI_MPI(d_mpi);
+      child_comms[i].setMPITag(TreeLoadBalancer_LOADTAG0,
+         TreeLoadBalancer_LOADTAG1);
+      child_comms[i].limitFirstDataLength(TreeLoadBalancer_FIRSTDATALEN);
+   }
+   if (g_rank > 0) {
+      const int parent_g_rank = (g_rank + 1) / d_degree - 1;
+      int parent_true_rank;
+      if (interlace_groups) {
+         parent_true_rank = parent_g_rank * g_count + g_id;
+      } else {
+         int nominal_g_nproc = d_nproc / g_count;
+         int first_nominal_group = d_nproc % g_count;
+         // int first_nominal_rank = first_nominal_group*(1+nominal_g_nproc);
+         int group_first_rank = g_id < first_nominal_group ?
+            g_id * (1 + nominal_g_nproc) :
+            first_nominal_group
+            * (1
+               + nominal_g_nproc)
+            + (g_id - first_nominal_group) * nominal_g_nproc;
+         parent_true_rank = parent_g_rank + group_first_rank;
+      }
+      parent_send = new tbox::AsyncCommPeer<int>;
+      parent_send->initialize(&comm_stage);
+      parent_send->setPeerRank(parent_true_rank);
+      parent_send->setSAMRAI_MPI(d_mpi);
+      parent_send->setMPITag(TreeLoadBalancer_LOADTAG0,
+         TreeLoadBalancer_LOADTAG1);
+      parent_send->limitFirstDataLength(TreeLoadBalancer_FIRSTDATALEN);
+
+      parent_recv = new tbox::AsyncCommPeer<int>;
+      parent_recv->initialize(&comm_stage);
+      parent_recv->setPeerRank(parent_true_rank);
+      parent_recv->setSAMRAI_MPI(d_mpi);
+      parent_recv->setMPITag(TreeLoadBalancer_LOADTAG0,
+         TreeLoadBalancer_LOADTAG1);
+      parent_recv->limitFirstDataLength(TreeLoadBalancer_FIRSTDATALEN);
+   }
+#endif
+   if (s_print_steps == 'y') {
+      tbox::plog << "Groups for cycle " << cycle_number
+                 << '/' << number_of_cycles
+                 << ": g_count=" << g_count
+                 << "  g_nproc=" << g_nproc
+                 << "  g_id=" << g_id
+                 << "  g_rank=" << g_rank
+                 << "  parent="
+                 << (parent_send ? parent_send->getPeerRank() : -1)
+                 << "  children (" << num_children << ") =";
+      for (int i = 0; i < num_children; ++i) {
+         tbox::plog << ' ' << child_comms[i].getPeerRank();
+      }
+      tbox::plog << "\n";
+   }
+
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void TreeLoadBalancer::destroyBalanceSubgroups(
+   tbox::AsyncCommPeer<int> *& child_comms,
+   tbox::AsyncCommPeer<int> *& parent_send,
+   tbox::AsyncCommPeer<int> *& parent_recv) const
+{
+   if (d_nproc == 1) {
+      TBOX_ASSERT(child_comms == NULL);
+      TBOX_ASSERT(parent_send == NULL);
+      TBOX_ASSERT(parent_recv == NULL);
+   } else {
+      delete[] child_comms;
+      delete parent_send;
+      delete parent_recv;
+      child_comms = parent_send = parent_recv = NULL;
+   }
+}
+
+/*
+ *************************************************************************
+ * Sort the sizes of an IntVector.
+ *************************************************************************
+ */
+void TreeLoadBalancer::sortIntVector(
+   hier::IntVector& order,
+   const hier::IntVector& vector) const
+{
+   const hier::IntVector num_cells = vector;
+
+   for (int d = 0; d < d_dim.getValue(); d++) {
+      order(d) = d;
+   }
+   for (int d0 = 0; d0 < d_dim.getValue() - 1; d0++) {
+      for (int d1 = d0 + 1; d1 < d_dim.getValue(); d1++) {
+         if (num_cells(order(d0)) > num_cells(order(d1))) {
+            int tmp_d = order(d0);
+            order(d0) = order(d1);
+            order(d1) = tmp_d;
+         }
+      }
+   }
+#ifdef DEBUG_CHECK_ASSERTIONS
+   for (int d = 0; d < d_dim.getValue() - 1; d++) {
+      TBOX_ASSERT(num_cells(order(d)) <= num_cells(order(d + 1)));
+   }
+#endif
+}
+
+/*
+ *************************************************************************
+ * Attempt to shift a specified ammount of load from one TransitSet to
+ * another by breaking a single box from the overloades set.  Examine
+ * multiple NodeInTransit and breakages to
+ *
+ * - filter out the ones that worsens the balance (see breakOffLoad) for
+ * reasons why this can happen.
+ *
+ * - find the one that results in the smallest combinedBreakingPenalty.
+ *
+ * Return whether any changes were made.
+ *************************************************************************
+ */
+bool TreeLoadBalancer::shiftLoadsByBreaking(
+   TransitSet& src,
+   TransitSet& dst,
+   const int ideal_transfer,
+   int& actual_transfer,
+   hier::LocalId& next_available_index) const
+{
+   if (ideal_transfer < 0) {
+      bool rval = shiftLoadsByBreaking(dst,
+            src,
+            -ideal_transfer,
+            actual_transfer,
+            next_available_index);
+      actual_transfer = -actual_transfer;
+      return rval;
+   }
+
+   TBOX_ASSERT(src.size() + dst.size() > 0);
+
+   t_shift_loads_by_breaking->start();
+
+   if (s_print_steps == 'y') {
+      tbox::plog << "    shiftLoadsByBreaking asked to break off "
+                 << ideal_transfer
+                 << " from one of " << src.size()
+                 << " source MappedBoxes to add to set of " << dst.size()
+                 << " MappedBoxes."
+                 << std::endl;
+   }
+
+   actual_transfer = 0;
+
+   /*
+    * The best results so far (from not transfering anything).
+    */
+   TransitSet best_src = src;
+   TransitSet best_dst = dst;
+   int best_actual_transfer = 0;
+
+   double best_combined_penalty = combinedBreakingPenalty(
+         computeBalancePenalty(best_src, best_dst, (double)ideal_transfer
+            - best_actual_transfer),
+         computeSurfacePenalty(best_src, best_dst),
+         computeSlenderPenalty(best_src, best_dst));
+
+   /*
+    * Scale the pre-cut penalty.  Scaling makes this method more
+    * agressive about producing a cut.  Sometimes the uncut penalty can
+    * be low enough to prevent a cut, but the cut may be required for
+    * reasonable balancing.  The down side of agressive cutting is that
+    * it tends to produce more slivers (but not terribly many).
+    * This exchange of load balance and slivers may not be easily
+    * eliminated by the weights in the penalty functions.
+    */
+   if (s_print_steps == 'y') {
+      tbox::plog.unsetf(std::ios::fixed | std::ios::scientific);
+      tbox::plog.precision(6);
+      tbox::plog << "    Uncut penalty: " << best_combined_penalty
+                 << " scaled by " << d_precut_penalty_wt << " to "
+                 << best_combined_penalty * d_precut_penalty_wt
+                 << std::endl;
+   }
+   best_combined_penalty *= d_precut_penalty_wt;
+
+   bool found_breakage = false;
+
+   std::vector<hier::Box> breakoff;
+   std::vector<hier::Box> leftover;
+   double breakoff_amt;
+   for (TransitSet::iterator si = src.begin();
+        si != src.end() &&
+        (!found_breakage || si->load >= ideal_transfer); ++si) {
+
+      const MappedBoxInTransit& candidate = *si;
+
+      breakOffLoad(
+         candidate.mapped_box,
+         ideal_transfer,
+         breakoff,
+         leftover,
+         breakoff_amt);
+
+      if (!breakoff.empty()) {
+
+         const MappedBoxInTransit& brk_mapped_box_in_transit = *si;
+
+         const bool improves_balance =
+            tbox::MathUtilities<double>::Abs(
+               (double)ideal_transfer - breakoff_amt) <
+            (ideal_transfer - tbox::MathUtilities<double>::getEpsilon());
+
+         if (s_print_steps == 'y') {
+            tbox::plog << "    Potential to replace " << brk_mapped_box_in_transit << " with "
+                       << breakoff.size() << " breakoff MappedBoxes and "
+                       << leftover.size() << " leftover MappedBoxes."
+                       << "  improves_balance=" << improves_balance
+                       << std::endl;
+         }
+
+         if (!improves_balance) {
+            /*
+             * Consider only options that changes the balance for the
+             * better.  Options that degrades or leave alone the
+             * balance put us in an infinite loop bouncing between
+             * better balance and better combined penalty.
+             */
+            continue;
+         }
+
+         /*
+          * Trial modifications of src and dst, for evaluating penalties.
+          */
+         TransitSet trial_src = src;
+         TransitSet trial_dst = dst;
+         TBOX_ASSERT(trial_src.size() + trial_dst.size() > 0);
+         int trial_actual_transfer = actual_transfer;
+
+         /*
+          * Put breakoff in trial_dst and put leftover back into trial_src.
+          */
+         for (std::vector<hier::Box>::const_iterator bi = breakoff.begin();
+              bi != breakoff.end();
+              ++bi) {
+            MappedBoxInTransit give_mapped_box_in_transit(
+               brk_mapped_box_in_transit,
+               *bi,
+               d_rank,
+               next_available_index);
+            give_mapped_box_in_transit.load = (int)computeLoad(give_mapped_box_in_transit.orig_mapped_box,
+                  give_mapped_box_in_transit.getBox());
+            next_available_index += 2 + d_degree;
+            trial_dst.insert(give_mapped_box_in_transit);
+            trial_actual_transfer += give_mapped_box_in_transit.load;
+            if (s_print_steps == 'y') {
+               tbox::plog << "    Breakoff box " << *bi << " -> " << give_mapped_box_in_transit
+                          << std::endl;
+            }
+         }
+         TBOX_ASSERT(trial_src.size() + trial_dst.size() > 0);
+         for (std::vector<hier::Box>::const_iterator bi = leftover.begin();
+              bi != leftover.end();
+              ++bi) {
+            MappedBoxInTransit keep_mapped_box_in_transit(
+               brk_mapped_box_in_transit,
+               *bi,
+               d_rank,
+               next_available_index);
+            keep_mapped_box_in_transit.load = (int)computeLoad(keep_mapped_box_in_transit.orig_mapped_box,
+                  keep_mapped_box_in_transit.getBox());
+            next_available_index += 2 + d_degree;
+            trial_src.insert(keep_mapped_box_in_transit);
+            if (s_print_steps == 'y') {
+               tbox::plog << "    Leftover box " << *bi << " -> " << keep_mapped_box_in_transit
+                          << std::endl;
+            }
+         }
+         TBOX_ASSERT(trial_src.size() + trial_dst.size() > 0);
+         trial_src.erase(brk_mapped_box_in_transit);
+
+         /*
+          * Compute the new penalty to see if it improves our best result so far.
+          */
+         TBOX_ASSERT(trial_src.size() + trial_dst.size() > 0);
+         double trial_balance_penalty = computeBalancePenalty(trial_src,
+               trial_dst,
+               (double)ideal_transfer - trial_actual_transfer);
+         double trial_surface_penalty = computeSurfacePenalty(trial_src,
+               trial_dst);
+         double trial_slender_penalty = computeSlenderPenalty(trial_src,
+               trial_dst);
+         double trial_combined_penalty = combinedBreakingPenalty(
+               trial_balance_penalty,
+               trial_surface_penalty,
+               trial_slender_penalty);
+         if (s_print_steps == 'y') {
+            tbox::plog.unsetf(std::ios::fixed | std::ios::scientific);
+            tbox::plog.precision(6);
+            tbox::plog << "    Trial's imbalance: "
+                       << (ideal_transfer - trial_actual_transfer)
+                       << " balance,surface,slender,combined penalty: "
+                       << trial_balance_penalty << ' '
+                       << trial_surface_penalty << ' '
+                       << trial_slender_penalty << ' '
+                       << trial_combined_penalty
+                       << std::endl;
+         }
+
+         if (trial_combined_penalty < best_combined_penalty) {
+            if (s_print_steps == 'y') {
+               tbox::plog << "    Keeping this trial." << std::endl;
+            }
+            found_breakage = true;
+            best_actual_transfer = (int)breakoff_amt;
+            best_src = trial_src;
+            best_dst = trial_dst;
+            best_combined_penalty = trial_combined_penalty;
+         } else {
+            if (s_print_steps == 'y') {
+               tbox::plog << "    Rejecting this trial." << std::endl;
+            }
+         }
+
+      } else {
+         if (s_print_steps == 'y') {
+            tbox::plog << "    Break step could not break " << ideal_transfer
+                       << std::endl;
+         }
+      }
+
+   }
+
+   if (found_breakage) {
+      src.swap(best_src);
+      dst.swap(best_dst);
+      actual_transfer = best_actual_transfer;
+   }
+
+   t_shift_loads_by_breaking->stop();
+   return found_breakage;
+}
+
+/*
+ *************************************************************************
+ * Attempt to swap some NodesInTransit between 2 sets of
+ * NodesInTransit (src and dst) to shift ideal_transfer work units.
+ *
+ * Transfering a MappedBoxInTransit from one TransitSet to another
+ * is considered a degenerate "swap" (a MappedBoxInTransit is
+ * swapped for nothing) handled by this function.
+ * The reason we do not handle degenerate case
+ * in another function is that even if we guarantee
+ * that the first swap in the iterative do loop is
+ * non-degenerate, further swapping may encounter
+ * situations where the best swap is the degenerate
+ * swap.
+ *
+ * This method can transfer load both ways.
+ * ideal_transfer > 0 means to raise the load of dst
+ * ideal_transfer < 0 means to raise the load of src
+ * The iterative do loop may overshoot the ideal_transfer
+ * and may have to swap to shift some of the load
+ * back.
+ *
+ * Return whether any changes were made.
+ *************************************************************************
+ */
+bool TreeLoadBalancer::shiftLoadsBySwapping(
+   TransitSet& src,
+   TransitSet& dst,
+   int ideal_transfer,
+   int& actual_transfer) const
+{
+   t_shift_loads_by_swapping->start();
+
+   if (s_print_steps == 'y') {
+      tbox::plog << "  Attempting to swap " << ideal_transfer << std::endl;
+   }
+
+   bool return_value = false;
+   bool found_swap;
+
+   actual_transfer = 0;
+
+   do {
+
+      /*
+       * Ammount we seek to transfer from hi to lo
+       * (the "ideal" for this particular iteration).
+       * Unlike ideal_transfer and actual_transfer, this quantity is positive.
+       */
+      int rem_transfer = ideal_transfer - actual_transfer;
+      if (s_print_steps == 'y') {
+         tbox::plog << "    Swap progress: " << actual_transfer
+                    << " / " << ideal_transfer << " remaining transfer = "
+                    << rem_transfer << std::endl;
+      }
+
+      found_swap = false;
+
+      TransitSet::iterator isrc;
+      TransitSet::iterator idst;
+      int swap_transfer;
+      found_swap = findLoadSwapPair(src,
+            dst,
+            rem_transfer,
+            swap_transfer,
+            isrc,
+            idst);
+      if (found_swap) {
+         // We can improve balance_penalty by swapping isrc with idst.
+         if (s_print_steps == 'y') {
+            tbox::plog << "    Swapping " << swap_transfer << " units using ";
+            if (isrc != src.end()) tbox::plog << *isrc;
+            else tbox::plog << "X";
+            tbox::plog << " <--> ";
+            if (idst != dst.end()) tbox::plog << *idst;
+            else tbox::plog << "X";
+            tbox::plog << std::endl;
+         }
+         if (isrc != src.end()) dst.insert(*isrc);
+         if (idst != dst.end()) src.insert(*idst);
+         if (isrc != src.end()) src.erase(isrc);
+         if (idst != dst.end()) dst.erase(idst);
+         actual_transfer += swap_transfer;
+         return_value = true;
+      } else {
+         if (s_print_steps == 'y') {
+            tbox::plog << "    Cannot find swap pair for " << rem_transfer
+                       << " units." << std::endl;
+         }
+      }
+
+   } while (found_swap && (actual_transfer != ideal_transfer));
+
+   if (s_print_steps == 'y') {
+      tbox::plog << "  Final imbalance for swap " << ideal_transfer
+      - actual_transfer << std::endl;
+   }
+
+   t_shift_loads_by_swapping->stop();
+
+   return return_value;
+}
+
+/*
+ *************************************************************************
+ * Find a MappedBoxInTransit in src and a MappedBoxInTransit in dst which when swapped
+ * results in shifting close to ideal_shift from src to dst.
+ * Return whether a swap pair was found.
+ *
+ * If isrc is set but idst is not, it means that isrc should
+ * be moved to dst, but no dst should be moved back.  This is
+ * the degenerate case of swapping isrc for a MappedBoxInTransit with zero
+ * load.
+ *************************************************************************
+ */
+bool TreeLoadBalancer::findLoadSwapPair(
+   TransitSet& src,
+   TransitSet& dst,
+   int ideal_transfer,
+   int& actual_transfer,
+   TransitSet::iterator& isrc,
+   TransitSet::iterator& idst) const
+{
+   if (ideal_transfer < 0) {
+      // The logic below does not handle bi-directional so handle it here.
+      bool rval = findLoadSwapPair(dst,
+            src,
+            -ideal_transfer,
+            actual_transfer,
+            idst,
+            isrc);
+      actual_transfer = -actual_transfer;
+      return rval;
+   }
+
+   t_find_swap_pair->start();
+
+   if (s_print_steps == 'y') {
+      tbox::plog << "  findLoadSwapPair looking for transfer of "
+                 << ideal_transfer
+                 << " between " << src.size() << "-MappedBoxInTransit src and "
+                 << dst.size() << "-MappedBoxInTransit dst." << std::endl;
+   }
+   if (s_print_swap_steps == 'y') {
+      tbox::plog << "    src (" << src.size() << "):" << std::endl;
+      for (TransitSet::iterator si = src.begin(); si != src.end(); ++si) {
+         tbox::plog << *si << std::endl;
+      }
+      tbox::plog << "    dst (" << dst.size() << "):" << std::endl;
+      for (TransitSet::iterator si = dst.begin(); si != dst.end(); ++si) {
+         tbox::plog << *si << std::endl;
+      }
+   }
+
+   /*
+    * Look for a high and a low NodeInTransit to swap, subject to condition
+    *
+    * 0 < load(high) - load(low) < lim_transfer.
+    *
+    * Compute the
+    * balance_penalty if high and low were swapped.  Keep looking
+    * until we find the pair giving the lowest balance_penalty on swapping.
+    *
+    * isrc and idst point to the current best pair to swap.  new_balance_penalty
+    * is the balance_penalty if we swap them.
+    *
+    * jsrc and jdst are trial pairs to check to see if we can improve on
+    * new_balance_penalty.
+    *
+    * We will look for two "best" pairs:
+    *
+    * On the high side, swapping more than ideal_transfer:
+    * (jsrc_hiside , jdst_hiside) are the best swap pair such that
+    * (*jsrc_hiside).load - (*jdst_hiside).load >= ideal_transfer
+    *
+    * On the low side, swapping less than ideal_transfer:
+    * (jsrc_loside, jdst_loside are the best swap pair such that
+    * (*jsrc_loside.load - (*jdst_loside.load < ideal_transfer
+    *
+    * Then we decide on whether to choose the hig-hside swap or the
+    * low-side swap based on balance_penalty of each candidate swap.
+    */
+
+   // Initialization indicating no swap pair found.
+   TransitSet::iterator jsrc_hiside = src.end();
+   TransitSet::iterator jdst_hiside = dst.end();
+   TransitSet::iterator jsrc_loside = src.end();
+   TransitSet::iterator jdst_loside = dst.end();
+
+   // A dummy MappedBoxInTransit for set searches.
+   hier::Box dummy_box(d_dim);
+   MappedBoxInTransit dummy_search_target(d_dim);
+
+   // Distance between ideal and candidate, >= 0
+   int imbalance_loside = tbox::MathUtilities<int>::getMax();
+   int imbalance_hiside = tbox::MathUtilities<int>::getMax();
+
+   if (dst.empty()) {
+      /*
+       * There is no dst MappedBoxInTransit, so the swap would
+       * degnerate to moving a src MappedBoxInTransit to dst.  Find
+       * the best src MappedBoxInTransit to move.
+       */
+      dummy_search_target = MappedBoxInTransit(MappedBox(dummy_box, hier::LocalId::getZero(), 0));
+      dummy_search_target.load = ideal_transfer;
+      TransitSet::iterator jsrc = src.lower_bound(dummy_search_target);
+
+      if (s_print_swap_steps == 'y') {
+         tbox::plog << "  findLoadSwapPair with empty dst: ";
+      }
+      if (jsrc != src.begin()) {
+         jsrc_hiside = jsrc;
+         --jsrc_hiside;
+         imbalance_hiside = (*jsrc_hiside).load - ideal_transfer;
+         if (s_print_swap_steps == 'y') {
+            tbox::plog << "  hi src: " << (*jsrc_hiside)
+                       << " with transfer " << (*jsrc_hiside).load
+                       << " missing by " << imbalance_hiside;
+         }
+      }
+
+      if (jsrc != src.end()) {
+         jsrc_loside = jsrc;
+         imbalance_loside = ideal_transfer - (*jsrc_loside).load;
+         if (s_print_swap_steps == 'y') {
+            tbox::plog << "  lo src: " << (*jsrc_loside)
+                       << " with transfer " << (*jsrc_loside).load
+                       << " missing by " << imbalance_loside;
+         }
+      }
+      if (s_print_swap_steps == 'y') {
+         tbox::plog << std::endl;
+      }
+
+   } else {
+
+      /*
+       * Start search through src beginning with the NodeInTransit
+       * whose load exceed the biggest dst MappedBoxInTransit by at
+       * least ideal_transfer.
+       */
+      dummy_search_target = *dst.begin();
+      dummy_search_target.load += ideal_transfer;
+      TransitSet::iterator jsrc_beg = src.lower_bound(dummy_search_target);
+
+      for (TransitSet::iterator jsrc = jsrc_beg; jsrc != src.end(); ++jsrc) {
+
+         /*
+          * Set jdst pointing to where we should start looking in dst.
+          * Look for a load less than the load of jsrc by
+          * ideal_transfer.
+          */
+         dummy_search_target = MappedBoxInTransit(MappedBox(dummy_box, hier::LocalId::getZero(), 0));
+         dummy_search_target.load = tbox::MathUtilities<int>::Max(
+               (*jsrc).load - ideal_transfer,
+               0);
+         TransitSet::iterator jdst = dst.lower_bound(dummy_search_target);
+
+         if (jdst != dst.end()) {
+
+            /*
+             * lower_bound returns jdst that gives >= ideal_transfer
+             * when swapped with jsrc.  Check transfererence between
+             * jsrc and two dst NodeInTransit on either side of the
+             * ideal dst MappedBoxInTransit to swap.
+             */
+            int tmp_miss = ((*jsrc).load - (*jdst).load) - ideal_transfer;
+            TBOX_ASSERT(tmp_miss >= 0);
+            if ((tmp_miss < imbalance_hiside)) {
+               jsrc_hiside = jsrc;
+               jdst_hiside = jdst;
+               imbalance_hiside = tmp_miss;
+               if (s_print_swap_steps == 'y') {
+                  tbox::plog << "    new hi-swap pair: " << (*jsrc_hiside)
+                             << " & " << (*jdst_hiside) << " with transfer "
+                             << (*jsrc_hiside).load - (*jdst_hiside).load
+                             << " missing by " << imbalance_hiside
+                             << std::endl;
+               }
+            }
+
+            if (jdst != dst.begin()) {
+               --jdst; // Now, jsrc and jdst transferer by *less* than ideal_transfer.
+               tmp_miss = ideal_transfer - ((*jsrc).load - (*jdst).load);
+               TBOX_ASSERT(tmp_miss >= 0);
+               if (tmp_miss < imbalance_loside) {
+                  jsrc_loside = jsrc;
+                  jdst_loside = jdst;
+                  imbalance_loside = tmp_miss;
+                  if (s_print_swap_steps == 'y') {
+                     tbox::plog << "    new lo-swap pair: " << (*jsrc_loside)
+                                << " & " << (*jdst_loside) << " with transfer "
+                                << (*jsrc_loside).load - (*jdst_loside).load
+                                << " missing by " << imbalance_loside
+                                << std::endl;
+                  }
+               }
+            }
+
+         } else {
+
+            /*
+             * The ideal dst to swap is smaller than the smallest dst
+             * MappedBoxInTransit.  Check the transfererence between
+             * jsrc and smallest MappedBoxInTransit, the case of
+             * moving jsrc in whole.
+             */
+            if ((*jsrc).load > ideal_transfer) {
+               // Moving jsrc to src is moving too much--hiside.
+               int tmp_miss = (*jsrc).load - ideal_transfer;
+               TBOX_ASSERT(tmp_miss >= 0);
+               if (tmp_miss < imbalance_hiside) {
+                  jsrc_hiside = jsrc;
+                  jdst_hiside = dst.end();
+                  imbalance_hiside = tmp_miss;
+                  if (s_print_swap_steps == 'y') {
+                     tbox::plog << "    new hi-swap source: " << (*jsrc_hiside)
+                                << " & " << "no dst" << " with transfer "
+                                << ((*jsrc_hiside).load)
+                                << " missing by " << imbalance_hiside
+                                << std::endl;
+                  }
+               }
+            } else {
+               // Moving jsrc to src is moving (just right or) too little--loside.
+               int tmp_miss = ideal_transfer - (*jsrc).load;
+               TBOX_ASSERT(tmp_miss >= 0);
+               if (tmp_miss < imbalance_loside) {
+                  jsrc_loside = jsrc;
+                  jdst_loside = dst.end();
+                  imbalance_loside = tmp_miss;
+                  if (s_print_swap_steps == 'y') {
+                     tbox::plog << "    new lo-swap source: " << (*jsrc_loside)
+                                << " & " << "no dst" << " with transfer "
+                                << ((*jsrc_loside).load)
+                                << " missing by " << imbalance_loside
+                                << std::endl;
+                  }
+               }
+               /*
+                * Break out of the loop early because there is no
+                * point checking smaller src NodeInTransit.
+                */
+               break;
+            }
+         }
+      }
+
+   }
+
+   /*
+    * Swapping does not produce new cuts, so it is ok to omit the penalties
+    * arising from cutting.
+    */
+   double current_balance_penalty = (double)ideal_transfer;
+   double balance_penalty_loside = (double)imbalance_loside;
+   double balance_penalty_hiside = (double)imbalance_hiside;
+
+   if (s_print_swap_steps == 'y') {
+      tbox::plog << "    Swap candidates give penalties (unswap,lo,hi): "
+                 << current_balance_penalty << " , " << balance_penalty_loside
+                 << " , " << balance_penalty_hiside << std::endl;
+   }
+
+   bool return_value = false;
+   if (balance_penalty_loside < current_balance_penalty &&
+       balance_penalty_loside <= balance_penalty_hiside) {
+      isrc = jsrc_loside;
+      idst = jdst_loside;
+      return_value = true;
+      if (s_print_swap_steps == 'y') {
+         tbox::plog << "    Taking loside." << std::endl;
+      }
+   } else if (balance_penalty_hiside < current_balance_penalty &&
+              balance_penalty_hiside <= balance_penalty_loside) {
+      isrc = jsrc_hiside;
+      idst = jdst_hiside;
+      return_value = true;
+      if (s_print_swap_steps == 'y') {
+         tbox::plog << "    Taking hiside." << std::endl;
+      }
+   } else {
+      if (s_print_swap_steps == 'y') {
+         tbox::plog << "    Keeping original (no swap)." << std::endl;
+      }
+   }
+
+   if (return_value) {
+      actual_transfer = (*isrc).load;
+      if (idst != dst.end()) {
+         actual_transfer -= (*idst).load;
+      }
+   }
+
+   t_find_swap_pair->stop();
+   return return_value;
+}
+
+/*
+ *************************************************************************
+ * Master method for breaking off a load.
+ *
+ * Try different heuristics and pick the "best" way to break off a load.
+ * The best is defined as the one with the lowest combined penalty.
+ *
+ * Justification: Each break has potential to decrease the efficiency
+ * of the entire load balance by forcing at least one processor to have
+ * too much load.  Therefore it is important to try different breaking
+ * algorithms to find the one that produces the most ideal.
+ *
+ * Return whether a successful break was made.
+ *************************************************************************
+ */
+bool TreeLoadBalancer::breakOffLoad(
+   const MappedBox& mapped_box,
+   double ideal_load_to_break,
+   std::vector<hier::Box>& breakoff,
+   std::vector<hier::Box>& leftover,
+   double& brk_load) const
+{
+   TBOX_ASSERT(ideal_load_to_break > 0);
+
+   /*
+    * NOTE: We need in this method a way to weigh the
+    * value of proximity to the ideal breakoff vs the
+    * increased area of the cuts.  However, the weight
+    * given to area-optimized cuts should be considered
+    * only with real application performance data.
+    *
+    * NOTE: We can compute the amount of new box boundaries
+    * generated by computing the box boundary before and
+    * after, and subtracting.  Easier than reconstructing
+    * the cuts from the box definitions.
+    *
+    * NOTE: We should weight negatively the production of
+    * high surface-to-volume boxes.
+    */
+
+   t_break_off_load->start();
+
+   breakoff.clear();
+   leftover.clear();
+
+   if (ideal_load_to_break < d_min_size.getProduct()) {
+      /*
+       * Assuming uniform load balancing, there is no hope
+       * if breaking off a piece of the desired size.
+       */
+      if (s_print_break_steps == 'y') {
+         tbox::plog << "      ideal_load_to_break " << ideal_load_to_break
+                    << " < " << d_min_size.getProduct() << d_min_size
+                    << ":  Cannot break MappedBox " << mapped_box << std::endl;
+      }
+      t_break_off_load->stop();
+      return false;
+   }
+
+   /*
+    * To avoid repeated computations of bad cuts,
+    * we precompute bad_cuts here to provide to
+    * methods that actually use the information.
+    */
+   tbox::Array<tbox::Array<bool> > bad_cuts(d_dim.getValue());
+   t_find_bad_cuts->start();
+   hier::BoxUtilities::findBadCutPoints(bad_cuts,
+      mapped_box.getBox(),
+      d_domain_boxes,
+      d_bad_interval);
+   t_find_bad_cuts->stop();
+
+   // Penalty for not transfering ideal load.
+   double best_balance_penalty = computeBalancePenalty(mapped_box.getBox(),
+         ideal_load_to_break);
+   // Penalty for new surfaces generated (none generated yet).
+   double best_surface_penalty = computeSurfacePenalty(mapped_box.getBox());
+   // Penalty for slender boxes.
+   double best_slender_penalty = computeSlenderPenalty(mapped_box.getBox());
+
+   double best_combined_penalty = tbox::MathUtilities<double>::getMax();
+
+   if (s_print_break_steps == 'y') {
+      tbox::plog.unsetf(std::ios::fixed | std::ios::scientific);
+      tbox::plog.precision(6);
+      tbox::plog << "      pre-break imbalance: " << ideal_load_to_break
+                 << " balance,surface,slender,combined penalties: "
+                 << best_balance_penalty << ", " << best_surface_penalty
+                 << ", "
+                 << best_slender_penalty << ", " << best_combined_penalty
+                 << std::endl;
+   }
+
+   brk_load = 0;
+   bool found_any_break = false;
+
+   {
+      std::vector<hier::Box> planar_breakoff;
+      std::vector<hier::Box> planar_leftover;
+      double planar_brk_load;
+
+      bool found_this_break = breakOffLoad_planar(
+            mapped_box,
+            ideal_load_to_break,
+            bad_cuts,
+            planar_breakoff,
+            planar_leftover,
+            planar_brk_load);
+
+      if (found_this_break) {
+         found_any_break = true;
+         double planar_balance_penalty = computeBalancePenalty(planar_breakoff,
+               planar_leftover,
+               (double)(planar_brk_load - ideal_load_to_break));
+         double planar_surface_penalty = computeSurfacePenalty(planar_breakoff,
+               planar_leftover);
+         double planar_slender_penalty = computeSlenderPenalty(planar_breakoff,
+               planar_leftover);
+         double planar_combined_penalty =
+            combinedBreakingPenalty(planar_balance_penalty,
+               planar_surface_penalty,
+               planar_slender_penalty);
+         if (s_print_break_steps == 'y') {
+            tbox::plog.unsetf(std::ios::fixed | std::ios::scientific);
+            tbox::plog.precision(6);
+            tbox::plog << "      Planar-break broke off "
+                       << planar_brk_load << " / " << ideal_load_to_break
+                       << " from " << mapped_box << '|'
+                       << mapped_box.getBox().numberCells() << '|'
+                       << mapped_box.getBox().size() << " into "
+                       << planar_breakoff.size()
+                       << " breakoff: ";
+            for (std::vector<hier::Box>::const_iterator bi =
+                    planar_breakoff.begin();
+                 bi != planar_breakoff.end();
+                 ++bi) {
+               tbox::plog << " " << *bi << '|' << bi->numberCells() << '|'
+                          << bi->size();
+            }
+            tbox::plog << "\n        and " << planar_leftover.size()
+                       << " leftover boxes:";
+            for (std::vector<hier::Box>::const_iterator bi =
+                    planar_leftover.begin();
+                 bi != planar_leftover.end();
+                 ++bi) {
+               tbox::plog << " " << *bi << '|' << bi->numberCells() << '|'
+                          << bi->size();
+            }
+            tbox::plog << "\n        imbalance: "
+                       << (planar_brk_load - ideal_load_to_break)
+                       << " balance,surface,slender,combined penalties: "
+                       << planar_balance_penalty << ", "
+                       << planar_surface_penalty << ", "
+                       << planar_slender_penalty
+                       << ", " << planar_combined_penalty << std::endl;
+         }
+         if (planar_combined_penalty < best_combined_penalty) {
+            if (s_print_break_steps == 'y') {
+               tbox::plog << "      Keeping planar cut result." << std::endl;
+            }
+            breakoff.swap(planar_breakoff);
+            leftover.swap(planar_leftover);
+            brk_load = planar_brk_load;
+            best_balance_penalty = planar_balance_penalty;
+            best_surface_penalty = planar_surface_penalty;
+            best_slender_penalty = planar_slender_penalty;
+            best_combined_penalty = planar_combined_penalty;
+         } else {
+            if (s_print_break_steps == 'y') {
+               tbox::plog << "      Rejecting planar cut result." << std::endl;
+            }
+         }
+      }
+   }
+
+   /*
+    * If above cut algorithms fail to break or improve the penalty, try
+    * more cutting algorithms.
+    */
+   {
+
+      std::vector<hier::Box> cubic1_breakoff;
+      std::vector<hier::Box> cubic1_leftover;
+      double cubic1_brk_load;
+
+      bool found_this_break = breakOffLoad_cubic1(
+            mapped_box,
+            ideal_load_to_break,
+            bad_cuts,
+            cubic1_breakoff,
+            cubic1_leftover,
+            cubic1_brk_load);
+
+      if (found_this_break) {
+         found_any_break = true;
+         double cubic1_balance_penalty = computeBalancePenalty(
+               cubic1_breakoff,
+               cubic1_leftover,
+               (double)(cubic1_brk_load - ideal_load_to_break));
+         double cubic1_surface_penalty = computeSurfacePenalty(cubic1_breakoff,
+               cubic1_leftover);
+         double cubic1_slender_penalty = computeSlenderPenalty(cubic1_breakoff,
+               cubic1_leftover);
+         double cubic1_combined_penalty =
+            combinedBreakingPenalty(cubic1_balance_penalty,
+               cubic1_surface_penalty,
+               cubic1_slender_penalty);
+         if (s_print_break_steps == 'y') {
+            tbox::plog.unsetf(std::ios::fixed | std::ios::scientific);
+            tbox::plog.precision(6);
+            tbox::plog << "      Cubic-break broke off "
+                       << cubic1_brk_load << " / " << ideal_load_to_break
+                       << " from " << mapped_box << '|'
+                       << mapped_box.getBox().numberCells() << '|'
+                       << mapped_box.getBox().size() << " into "
+                       << cubic1_breakoff.size()
+                       << " breakoff: ";
+            for (std::vector<hier::Box>::const_iterator bi =
+                    cubic1_breakoff.begin();
+                 bi != cubic1_breakoff.end();
+                 ++bi) {
+               tbox::plog << " " << *bi << '|' << bi->numberCells() << '|'
+                          << bi->size();
+            }
+            tbox::plog << "\n        and " << cubic1_leftover.size()
+                       << " leftover boxes:";
+            for (std::vector<hier::Box>::const_iterator bi =
+                    cubic1_leftover.begin();
+                 bi != cubic1_leftover.end();
+                 ++bi) {
+               tbox::plog << " " << *bi << '|' << bi->numberCells() << '|'
+                          << bi->size();
+            }
+            tbox::plog << "\n        imbalance: "
+                       << (cubic1_brk_load - ideal_load_to_break)
+                       << " balance,surface,slender,combined penalties: "
+                       << cubic1_balance_penalty << ", "
+                       << cubic1_surface_penalty << ", "
+                       << cubic1_slender_penalty
+                       << ", " << cubic1_combined_penalty << std::endl;
+         }
+         if (cubic1_combined_penalty < best_combined_penalty) {
+            if (s_print_break_steps == 'y') {
+               tbox::plog << "      choosing breakOffLoad_cubic1 result."
+                          << std::endl;
+            }
+            breakoff.swap(cubic1_breakoff);
+            leftover.swap(cubic1_leftover);
+            brk_load = cubic1_brk_load;
+            best_balance_penalty = cubic1_balance_penalty;
+            best_surface_penalty = cubic1_surface_penalty;
+            best_slender_penalty = cubic1_slender_penalty;
+            best_combined_penalty = cubic1_combined_penalty;
+         } else {
+            if (s_print_break_steps == 'y') {
+               tbox::plog << "      Rejecting cubic1 cut result." << std::endl;
+            }
+         }
+      } else {
+         if (s_print_break_steps == 'y') {
+            tbox::plog << "      breakOffLoad_cubic1 could not break "
+                       << ideal_load_to_break << " from " << mapped_box
+                       << '/' << mapped_box.getBox().numberCells()
+                       << '/' << mapped_box.getBox().numberCells().getProduct()
+                       << std::endl;
+         }
+      }
+
+   }
+
+   t_break_off_load->stop();
+
+   return found_any_break;
+}
+
+/*
+ *************************************************************************
+ * Measuring surface area of boxes is used in penalizing
+ * the creation of new surfaces.
+ *************************************************************************
+ */
+
+double TreeLoadBalancer::computeBoxSurfaceArea(
+   const std::vector<hier::Box>& boxes) const
+{
+   int surface_area = 0;
+   for (std::vector<hier::Box>::const_iterator bi = boxes.begin();
+        bi != boxes.end();
+        ++bi) {
+      const hier::Box& box = *bi;
+      int volume = box.size();
+      for (int d = 0; d < d_dim.getValue(); ++d) {
+         surface_area += volume / box.numberCells(d);
+      }
+   }
+   surface_area *= 2;
+   return surface_area;
+}
+
+/*
+ *************************************************************************
+ * Measuring surface area of boxes is used in penalizing
+ * the creation of new surfaces.
+ *************************************************************************
+ */
+
+int TreeLoadBalancer::computeBoxSurfaceArea(
+   const hier::Box& box) const
+{
+   int surface_area = 0;
+   int volume = box.size();
+   for (int d = 0; d < d_dim.getValue(); ++d) {
+      surface_area += volume / box.numberCells(d);
+   }
+   surface_area *= 2;
+   return surface_area;
+}
+
+/*
+ *************************************************************************
+ * Compute the total combined penalty associated with box cutting.
+ * Any kind of binary function can be used.  I am just experimenting
+ * with various types and weights.
+ *
+ * All input penalties should all be non-dimensional.
+ *************************************************************************
+ */
+
+double TreeLoadBalancer::combinedBreakingPenalty(
+   double balance_penalty,
+   double surface_penalty,
+   double slender_penalty) const
+{
+   double combined_penalty =
+      d_balance_penalty_wt * balance_penalty * balance_penalty
+      + d_surface_penalty_wt * surface_penalty * surface_penalty
+      + d_slender_penalty_wt * slender_penalty * slender_penalty;
+   return combined_penalty;
+}
+
+/*
+ *************************************************************************
+ * Compute the limiter function applied to box shape penalty when
+ * cutting.  We limit the quality checks to boxes with a volume in a
+ * certain range.  Outside the range, we relax the shape penalty to have
+ * more freedom improve the load balance.
+ *
+ * We care most about box quality near box sizes near the
+ * d_global_avg_load.  A box with volume well above this value is going
+ * to be broken again, so we don't care yet about its shape.  A box with
+ * volume well below this value is small enough to allow to have poor
+ * form (we prefer not to restrict small boxes to good shapes, so we can
+ * have more flexibility to improve load balance).
+ *
+ * The limiter is a function of the ratio x = box_volume/d_global_avg_load.
+ *
+ *   y^
+ *    |
+ *   1|
+ *    |  / \
+ *    | /  \
+ *    |/    \
+ *   b/      \
+ *    |       \
+ *    +------------>
+ *        a    c   x
+ *
+ * It is piece-wise linear, passing through (x,y) coordinates (0,b),
+ * (a,1), (c,0).  Typically a<1 and c>1.
+ *
+ * The values a, b, c are set by experimentation.
+ *************************************************************************
+ */
+
+double TreeLoadBalancer::shapePenaltyLimiter(
+   double box_volume) const
+{
+   TBOX_ASSERT(box_volume >= 0.0);
+   const double a = 0.5;
+   const double b = 1.0;
+   const double c = 1.5;
+   const double x = box_volume / d_global_avg_load;
+   const double rval = x < a ? b + x * (1 - b) / a : x <
+      c ? (c - x) / (c - a) : 0.0;
+   return rval;
+}
+
+#define TreeLoadBalancer_BalancePenaltyType 1
+
+/*
+ *************************************************************************
+ * Return non-dimensional volume-weighted balance penalty for
+ * two containers of boxes and how imbalanced they are.
+ *************************************************************************
+ */
+
+double TreeLoadBalancer::computeBalancePenalty(
+   const std::vector<hier::Box>& a,
+   const std::vector<hier::Box>& b,
+   double imbalance) const
+{
+#if TreeLoadBalancer_BalancePenaltyType == 1
+   NULL_USE(a);
+   NULL_USE(b);
+   return tbox::MathUtilities<double>::Abs(imbalance);
+
+#elif TreeLoadBalancer_BalancePenaltyType == 2
+   int total_volume = 0;
+   for (std::vector<hier::Box>::const_iterator bi = a.begin();
+        bi != a.end();
+        ++bi) {
+      total_volume += bi->size();
+   }
+   for (std::vector<hier::Box>::const_iterator bi = b.begin();
+        bi != b.end();
+        ++bi) {
+      total_volume += bi->size();
+   }
+   const double balance_penalty =
+      tbox::MathUtilities<double>::Abs(imbalance) / total_volume;
+   return balance_penalty;
+
+#elif TreeLoadBalancer_BalancePenaltyType == 3
+   NULL_USE(a);
+   NULL_USE(b);
+   return tbox::MathUtilities<double>::Abs(imbalance) / d_global_avg_load;
+
+#elif TreeLoadBalancer_BalancePenaltyType == 4
+   NULL_USE(a);
+   NULL_USE(b);
+   double balance_penalty = tbox::MathUtilities<double>::Abs(imbalance)
+      / d_global_avg_load;
+   balance_penalty += balance_penalty * balance_penalty;  // Add non-linear growth.
+   return balance_penalty;
+
+#endif
+}
+
+/*
+ *************************************************************************
+ * Return non-dimensional volume-weighted balance penalty for
+ * two containers of boxes and how imbalanced they are.
+ *************************************************************************
+ */
+
+double TreeLoadBalancer::computeBalancePenalty(
+   const TransitSet& a,
+   const TransitSet& b,
+   double imbalance) const
+{
+#if TreeLoadBalancer_BalancePenaltyType == 1
+   NULL_USE(a);
+   NULL_USE(b);
+   return tbox::MathUtilities<double>::Abs(imbalance);
+
+#elif TreeLoadBalancer_BalancePenaltyType == 2
+   int total_volume = 0;
+   for (TransitSet::const_iterator bi = a.begin(); bi != a.end(); ++bi) {
+      total_volume += bi->mapped_box.getBox().size();
+   }
+   for (TransitSet::const_iterator bi = b.begin(); bi != b.end(); ++bi) {
+      total_volume += bi->mapped_box.getBox().size();
+   }
+   const double balance_penalty =
+      tbox::MathUtilities<double>::Abs(imbalance) / total_volume;
+   return balance_penalty;
+
+#elif TreeLoadBalancer_BalancePenaltyType == 3
+   NULL_USE(a);
+   NULL_USE(b);
+   return tbox::MathUtilities<double>::Abs(imbalance) / d_global_avg_load;
+
+#elif TreeLoadBalancer_BalancePenaltyType == 4
+   NULL_USE(a);
+   NULL_USE(b);
+   double balance_penalty = tbox::MathUtilities<double>::Abs(imbalance)
+      / d_global_avg_load;
+   balance_penalty += balance_penalty * balance_penalty;  // Add non-linear growth.
+   return balance_penalty;
+
+#endif
+}
+
+/*
+ *************************************************************************
+ * Return non-dimensional volume-weighted balance penalty for
+ * a box and how imbalanced it is.
+ *************************************************************************
+ */
+
+double TreeLoadBalancer::computeBalancePenalty(
+   const hier::Box& a,
+   double imbalance) const
+{
+#if TreeLoadBalancer_BalancePenaltyType == 1
+   NULL_USE(a);
+   return tbox::MathUtilities<double>::Abs(imbalance);
+
+#elif TreeLoadBalancer_BalancePenaltyType == 2
+   int total_volume = a.size();
+   const double balance_penalty =
+      tbox::MathUtilities<double>::Abs(imbalance) / total_volume;
+   return balance_penalty;
+
+#elif TreeLoadBalancer_BalancePenaltyType == 3
+   NULL_USE(a);
+   return tbox::MathUtilities<double>::Abs(imbalance) / d_global_avg_load;
+
+#elif TreeLoadBalancer_BalancePenaltyType == 4
+   double balance_penalty = tbox::MathUtilities<double>::Abs(imbalance)
+      / d_global_avg_load;
+   balance_penalty += balance_penalty * balance_penalty;  // Add non-linear growth.
+   return balance_penalty;
+
+#endif
+}
+
+#define TreeLoadBalancer_SurfacePenaltyType 4
+
+/*
+ *************************************************************************
+ * Return non-dimensional volume-weighted surface penalty for a box.  The
+ * reference zero penalty is for a box of equal sides having the same
+ * volume.
+ *************************************************************************
+ */
+
+double TreeLoadBalancer::computeSurfacePenalty(
+   const std::vector<hier::Box>& a,
+   const std::vector<hier::Box>& b) const
+{
+#if TreeLoadBalancer_SurfacePenaltyType == 1
+   double surface_area = 0;
+   for (std::vector<hier::Box>::const_iterator bi = a.begin();
+        bi != a.end();
+        ++bi) {
+      surface_area += computeBoxSurfaceArea(*bi);
+   }
+   for (std::vector<hier::Box>::const_iterator bi = b.begin();
+        bi != b.end();
+        ++bi) {
+      surface_area += computeBoxSurfaceArea(*bi);
+   }
+   double surface_penalty = pow(surface_area, (double)(d_dim) / (d_dim.getValue() - 1)));
+   return surface_penalty;
+
+#elif TreeLoadBalancer_SurfacePenaltyType == 2
+   double surface_area = 0;
+   int total_volume = 0;
+   for (std::vector<hier::Box>::const_iterator bi = a.begin();
+        bi != a.end();
+        ++bi) {
+      int boxvol = bi->size();
+      surface_area += computeBoxSurfaceArea(*bi);
+      total_volume += boxvol;
+   }
+   for (std::vector<hier::Box>::const_iterator bi = b.begin();
+        bi != b.end();
+        ++bi) {
+      int boxvol = bi->size();
+      surface_area += computeBoxSurfaceArea(*bi);
+      total_volume += boxvol;
+   }
+   double best_surface = 2 * d_dim * pow(total_volume,
+                                         (double)(d_dim.getValue() - 1)) / d_dim);
+   double surface_penalty = surface_area / best_surface - 1.0;
+   return surface_penalty;
+
+#elif TreeLoadBalancer_SurfacePenaltyType == 3
+   double surface_penalty = 0;
+   double total_volume = 0;
+   for (std::vector<hier::Box>::const_iterator bi = a.begin();
+        bi != a.end();
+        ++bi) {
+      int boxvol = bi->size();
+      double surface_area = computeBoxSurfaceArea(*bi);
+      double best_surface = 2 * d_dim * pow((double)boxvol,
+                                            (double)(d_dim.getValue() - 1)) / d_dim);
+      surface_penalty += surface_area / best_surface - 1.0;
+      total_volume += boxvol;
+   }
+   for (std::vector<hier::Box>::const_iterator bi = b.begin();
+        bi != b.end();
+        ++bi) {
+      int boxvol = bi->size();
+      double surface_area = computeBoxSurfaceArea(*bi);
+      double best_surface = 2 * d_dim * pow((double)boxvol,
+                                            (double)(d_dim.getValue() - 1)) / d_dim);
+      surface_penalty += surface_area / best_surface - 1.0;
+      total_volume += boxvol;
+   }
+   double relative_importance = d_global_avg_load / total_volume;
+   surface_penalty *= relative_importance;
+   return surface_penalty;
+
+#elif TreeLoadBalancer_SurfacePenaltyType == 4
+   double surface_penalty = 0;
+   for (std::vector<hier::Box>::const_iterator bi = a.begin();
+        bi != a.end();
+        ++bi) {
+      surface_penalty += computeSurfacePenalty(*bi);
+   }
+   for (std::vector<hier::Box>::const_iterator bi = b.begin();
+        bi != b.end();
+        ++bi) {
+      surface_penalty += computeSurfacePenalty(*bi);
+   }
+   return surface_penalty;
+
+#else
+#endif
+}
+
+/*
+ *************************************************************************
+ * Return non-dimensional volume-weighted surface penalty for a box.  The
+ * reference zero penalty is for a box of equal sides having the same
+ * volume.
+ *************************************************************************
+ */
+
+double TreeLoadBalancer::computeSurfacePenalty(
+   const TransitSet& a,
+   const TransitSet& b) const
+{
+#if TreeLoadBalancer_SurfacePenaltyType == 1
+   double surface_area = 0;
+   for (TransitSet::const_iterator bi = a.begin(); bi != a.end(); ++bi) {
+      surface_area += computeBoxSurfaceArea(bi->mapped_box.getBox());
+   }
+   for (TransitSet::const_iterator bi = b.begin(); bi != b.end(); ++bi) {
+      surface_area += computeBoxSurfaceArea(bi->mapped_box.getBox());
+   }
+   double surface_penalty = pow(surface_area, (double)(d_dim) / (d_dim.getValue() - 1)));
+   return surface_penalty;
+
+#elif TreeLoadBalancer_SurfacePenaltyType == 2
+   double surface_area = 0;
+   int total_volume = 0;
+   for (TransitSet::const_iterator bi = a.begin(); bi != a.end(); ++bi) {
+      int boxvol = bi->mapped_box.getBox().size();
+      surface_area += computeBoxSurfaceArea(bi->mapped_box.getBox());
+      total_volume += boxvol;
+   }
+   for (TransitSet::const_iterator bi = b.begin(); bi != b.end(); ++bi) {
+      int boxvol = bi->mapped_box.getBox().size();
+      surface_area += computeBoxSurfaceArea(bi->mapped_box.getBox());
+      total_volume += boxvol;
+   }
+   double best_surface = 2 * d_dim * pow(total_volume,
+                                         (double)(d_dim.getValue() - 1)) / d_dim);
+   double surface_penalty = surface_area / best_surface - 1.0;
+   return surface_penalty;
+
+#elif TreeLoadBalancer_SurfacePenaltyType == 3
+   double surface_penalty = 0;
+   double total_volume = 0;
+   for (TransitSet::const_iterator bi = a.begin(); bi != a.end(); ++bi) {
+      int boxvol = bi->mapped_box.getBox().size();
+      double surface_area = computeBoxSurfaceArea(bi->mapped_box.getBox());
+      double best_surface = 2 * d_dim * pow((double)boxvol,
+                                            (double)(d_dim.getValue() - 1)) / d_dim);
+      surface_penalty += surface_area / best_surface - 1.0;
+      total_volume += boxvol;
+   }
+   for (TransitSet::const_iterator bi = b.begin(); bi != b.end(); ++bi) {
+      int boxvol = bi->mapped_box.getBox().size();
+      double surface_area = computeBoxSurfaceArea(bi->mapped_box.getBox());
+      double best_surface = 2 * d_dim * pow((double)boxvol,
+                                            (double)(d_dim.getValue() - 1)) / d_dim);
+      surface_penalty += surface_area / best_surface - 1.0;
+      total_volume += boxvol;
+   }
+   double relative_importance = d_global_avg_load / total_volume;
+   surface_penalty *= relative_importance;
+   return surface_penalty;
+
+#elif TreeLoadBalancer_SurfacePenaltyType == 4
+   double surface_penalty = 0;
+   for (TransitSet::const_iterator bi = a.begin(); bi != a.end(); ++bi) {
+      surface_penalty += computeSurfacePenalty(bi->mapped_box.getBox());
+   }
+   for (TransitSet::const_iterator bi = b.begin(); bi != b.end(); ++bi) {
+      surface_penalty += computeSurfacePenalty(bi->mapped_box.getBox());
+   }
+   return surface_penalty;
+
+#else
+#endif
+}
+
+/*
+ *************************************************************************
+ * Return non-dimensional volume-weighted surface penalty for a box.  The
+ * reference zero penalty is for a box of equal sides having the same
+ * volume.
+ *************************************************************************
+ */
+
+double TreeLoadBalancer::computeSurfacePenalty(
+   const hier::Box& a) const
+{
+#if TreeLoadBalancer_SurfacePenaltyType == 1
+   double surface_area = computeBoxSurfaceArea(a);
+   double surface_penalty = pow(surface_area, (double)(d_dim) / (d_dim.getValue() - 1)));
+   return surface_penalty;
+
+#elif TreeLoadBalancer_SurfacePenaltyType == 2
+   if (d_dim == tbox::Dimension(1)) ) {
+         return 0.0;
+      }
+      double surface_area = computeBoxSurfaceArea(a);
+   int total_volume = a.size();
+   double best_surface = 2 * d_dim * pow(total_volume,
+                                         (double)(d_dim.getValue() - 1)) / d_dim);
+   double surface_penalty = surface_area / best_surface - 1.0;
+   return surface_penalty;
+
+#elif TreeLoadBalancer_SurfacePenaltyType == 3
+   int boxvol = a.size();
+   double surface_area = computeBoxSurfaceArea(a);
+   double best_surface = 2 * d_dim * pow((double)boxvol,
+                                         (double)(d_dim.getValue() - 1)) / d_dim);
+   double surface_penalty = surface_area / best_surface - 1.0;
+   double total_volume = boxvol;
+   double relative_importance = d_global_avg_load / total_volume;
+   surface_penalty *= relative_importance;
+   return surface_penalty;
+
+#elif TreeLoadBalancer_SurfacePenaltyType == 4
+   int boxvol = a.size();
+   double surface_area = computeBoxSurfaceArea(a);
+   double best_surface = 2 * d_dim.getValue() * pow((double)boxvol,
+         (double)(d_dim.getValue() - 1) / d_dim.getValue());
+   double surface_penalty = surface_area / best_surface - 1.0;
+   surface_penalty = surface_penalty * surface_penalty; // Make it blow up.
+   // double shape_penalty_limiter = shapePenaltyLimiter(boxvol);
+   // surface_penalty *= shape_penalty_limiter;
+   return surface_penalty;
+
+#endif
+}
+
+#define TreeLoadBalancer_SlenderPenaltyType 4
+
+/*
+ *************************************************************************
+ * Return non-dimensional volume-weighted slenderness penalty for two
+ * containers of boxes.  The reference zero penalty refers to a box with
+ * all sides the same length.
+ *************************************************************************
+ */
+
+double TreeLoadBalancer::computeSlenderPenalty(
+   const std::vector<hier::Box>& a,
+   const std::vector<hier::Box>& b) const
+{
+#if TreeLoadBalancer_SlenderPenaltyType == 1
+   double slender_penalty = 0;
+   int total_volume = 0;
+   for (std::vector<hier::Box>::const_iterator bi = a.begin();
+        bi != a.end();
+        ++bi) {
+      const hier::IntVector boxdim = bi->numberCells();
+      double slender = (double)boxdim.max() / boxdim.min() - 1.0;
+      const int boxvol = boxdim.getProduct();
+      slender_penalty += boxvol * slender;
+      total_volume += boxvol;
+   }
+   for (std::vector<hier::Box>::const_iterator bi = b.begin();
+        bi != b.end();
+        ++bi) {
+      const hier::IntVector boxdim = bi->numberCells();
+      double slender = (double)boxdim.max() / boxdim.min() - 1.0;
+      const int boxvol = boxdim.getProduct();
+      slender_penalty += boxvol * slender;
+      total_volume += boxvol;
+   }
+   slender_penalty /= total_volume;
+   // tbox::plog << " volume-weighted boxes has slender = " << slender_penalty << std::endl;
+   return slender_penalty;
+
+#elif TreeLoadBalancer_SlenderPenaltyType == 3
+   double slender_penalty = 0;
+   double total_volume = 0;
+   for (std::vector<hier::Box>::const_iterator bi = a.begin();
+        bi != a.end();
+        ++bi) {
+      const hier::IntVector boxdim = bi->numberCells();
+      slender_penalty += tbox::MathUtilities<double>::Min(0.0,
+            (double)boxdim.max() / boxdim.min() - 1.0
+            - d_slender_penalty_threshold);
+      total_volume += boxdim.getProduct();
+   }
+   for (std::vector<hier::Box>::const_iterator bi = b.begin();
+        bi != b.end();
+        ++bi) {
+      const hier::IntVector boxdim = bi->numberCells();
+      slender_penalty += (double)boxdim.max() / boxdim.min() - 1.0;
+      slender_penalty += tbox::MathUtilities<double>::Min(0.0,
+            (double)boxdim.max() / boxdim.min() - 1.0
+            - d_slender_penalty_threshold);
+      total_volume += boxdim.getProduct();
+   }
+   double relative_importance = d_global_avg_load / total_volume;
+   slender_penalty *= relative_importance;
+   return slender_penalty;
+
+#elif TreeLoadBalancer_SlenderPenaltyType == 4
+   double slender_penalty = 0;
+   for (std::vector<hier::Box>::const_iterator bi = a.begin();
+        bi != a.end();
+        ++bi) {
+      slender_penalty += computeSlenderPenalty(*bi);
+   }
+   for (std::vector<hier::Box>::const_iterator bi = b.begin();
+        bi != b.end();
+        ++bi) {
+      slender_penalty += computeSlenderPenalty(*bi);
+   }
+   return slender_penalty;
+
+#endif
+}
+
+/*
+ *************************************************************************
+ * Return non-dimensional volume-weighted slenderness penalty for two
+ * containers of boxes.  The reference zero penalty refers to a box with
+ * all sides the same length.
+ *************************************************************************
+ */
+
+double TreeLoadBalancer::computeSlenderPenalty(
+   const TransitSet& a,
+   const TransitSet& b) const
+{
+#if TreeLoadBalancer_SlenderPenaltyType == 1
+   double slender_penalty = 0;
+   int total_volume = 0;
+   for (TransitSet::const_iterator bi = a.begin(); bi != a.end(); ++bi) {
+      const hier::IntVector boxdim = bi->mapped_box.getBox().numberCells();
+      double slender = (double)boxdim.max() / boxdim.min() - 1.0;
+      const int boxvol = boxdim.getProduct();
+      slender_penalty += boxvol * slender;
+      total_volume += boxvol;
+   }
+   for (TransitSet::const_iterator bi = b.begin(); bi != b.end(); ++bi) {
+      const hier::IntVector boxdim = bi->mapped_box.getBox().numberCells();
+      double slender = (double)boxdim.max() / boxdim.min() - 1.0;
+      const int boxvol = boxdim.getProduct();
+      slender_penalty += boxvol * slender;
+      total_volume += boxvol;
+   }
+   slender_penalty /= total_volume;
+   // tbox::plog << " volume-weighted boxes has slender = " << slender_penalty << std::endl;
+   return slender_penalty;
+
+#elif TreeLoadBalancer_SlenderPenaltyType == 3
+   double slender_penalty = 0;
+   double total_volume = 0;
+   for (TransitSet::const_iterator bi = a.begin(); bi != a.end(); ++bi) {
+      const hier::IntVector boxdim = bi->mapped_box.getBox().numberCells();
+      slender_penalty += tbox::MathUtilities<double>::Min(0.0,
+            (double)boxdim.max() / boxdim.min() - 1.0
+            - d_slender_penalty_threshold);
+      total_volume += boxdim.getProduct();
+   }
+   for (TransitSet::const_iterator bi = b.begin(); bi != b.end(); ++bi) {
+      const hier::IntVector boxdim = bi->mapped_box.getBox().numberCells();
+      slender_penalty += tbox::MathUtilities<double>::Min(0.0,
+            (double)boxdim.max() / boxdim.min() - 1.0
+            - d_slender_penalty_threshold);
+      total_volume += boxdim.getProduct();
+   }
+   double relative_importance = d_global_avg_load / total_volume;
+   slender_penalty *= relative_importance;
+   return slender_penalty;
+
+#elif TreeLoadBalancer_SlenderPenaltyType == 4
+   double slender_penalty = 0;
+   for (TransitSet::const_iterator bi = a.begin(); bi != a.end(); ++bi) {
+      slender_penalty += computeSlenderPenalty(bi->mapped_box.getBox());
+   }
+   for (TransitSet::const_iterator bi = b.begin(); bi != b.end(); ++bi) {
+      slender_penalty += computeSlenderPenalty(bi->mapped_box.getBox());
+   }
+   return slender_penalty;
+
+#else
+#endif
+}
+
+/*
+ *************************************************************************
+ * Return non-dimensional volume-weighted slenderness penalty for two
+ * containers of boxes.  The reference zero penalty refers to a box with
+ * all sides the same length.
+ *************************************************************************
+ */
+
+double TreeLoadBalancer::computeSlenderPenalty(
+   const hier::Box& a) const
+{
+#if TreeLoadBalancer_SlenderPenaltyType == 1
+   const hier::IntVector boxdim = a.numberCells();
+   double slender = (double)boxdim.max() / boxdim.min() - 1.0;
+   // tbox::plog << "box " << a << " dims " << boxdim << " has slender = " << slender << std::endl;
+   return slender;
+
+#elif TreeLoadBalancer_SlenderPenaltyType == 3
+   const hier::IntVector boxdim = a.numberCells();
+   double total_volume = boxdim.getProduct();
+   double slender_penalty = (double)boxdim.max() / boxdim.min() - 1.0;
+   slender_penalty = tbox::MathUtilities<double>::Min(0.0,
+         slender_penalty - d_slender_penalty_threshold);
+   // tbox::plog << "box " << a << " dims " << boxdim << " has slender = " << slender << std::endl;
+   double relative_importance = d_global_avg_load / total_volume;
+   slender_penalty *= relative_importance;
+   return slender_penalty;
+
+#elif TreeLoadBalancer_SlenderPenaltyType == 4
+   const hier::IntVector boxdim = a.numberCells();
+   // double total_volume = boxdim.getProduct();
+   double slender_penalty = (double)boxdim.max() / boxdim.min() - 1.0;
+   slender_penalty = slender_penalty * slender_penalty; // Make it blow up.
+   // tbox::plog << "box " << a << " dims " << boxdim << " has slender_penalty = " << slender << std::endl;
+   // double shape_penalty_limiter = shapePenaltyLimiter(total_volume);
+   // slender_penalty *= shape_penalty_limiter;
+   return slender_penalty;
+
+#endif
+}
+
+/*
+ *************************************************************************
+ * Break up box bursty against box solid and adds the pieces to list.
+ * This version differs from that in BoxList in that it tries to minimize
+ * slivers.
+ *
+ * TODO: Change BoxList type to vector to reduce number of memory
+ * allocations.
+ *************************************************************************
+ */
+
+void TreeLoadBalancer::burstBox(
+   const hier::Box& bursty,
+   const hier::Box& solid,
+   std::vector<hier::Box>& boxes) const
+{
+   /*
+    * Lacking logic to handle the case of solid not being completely
+    * inside bursty.  That feature is not currently needed.
+    */
+   TBOX_ASSERT(bursty.contains(solid));
+
+   const hier::IntVector solid_size = solid.numberCells();
+
+   boxes.clear();
+   hier::Box cutme = bursty;
+   while (cutme != solid) {
+
+      int cut_dir = 999999;
+      bool cut_above_solid = false; // Whether to slice off the piece above solid (vs below).
+      /*
+       * Find direction and place to cut.  To minimize slivers, cut
+       * from cutme the thickest (in direction normal to cut) slab
+       * possible.
+       */
+      int thickest = 0;
+      for (int d = 0; d < d_dim.getValue(); ++d) {
+         if (cutme.numberCells(d) > solid_size(d)) {
+            const int thickness_from_upper_cut = cutme.upper() (d)
+               - solid.upper() (d);
+            if (thickness_from_upper_cut > thickest) {
+               thickest = thickness_from_upper_cut;
+               cut_dir = d;
+               cut_above_solid = true;
+            }
+            const int thickness_from_lower_cut = solid.lower() (d)
+               - cutme.lower() (d);
+            if (thickness_from_lower_cut > thickest) {
+               thickest = thickness_from_lower_cut;
+               cut_dir = d;
+               cut_above_solid = false;
+            }
+         }
+      }
+      TBOX_ASSERT(cut_dir >= 0 && cut_dir < d_dim.getValue());
+
+      hier::Box removeme = cutme;
+      if (cut_above_solid) {
+         cutme.upper() (cut_dir) = solid.upper() (cut_dir);
+         removeme.lower() (cut_dir) = solid.upper() (cut_dir) + 1;
+      } else {
+         cutme.lower() (cut_dir) = solid.lower() (cut_dir);
+         removeme.upper() (cut_dir) = solid.lower() (cut_dir) - 1;
+      }
+
+      boxes.push_back(removeme);
+
+   }
+
+   if (s_print_break_steps == 'y') {
+      tbox::plog << "      burstBox: " << bursty << " = " << solid;
+      for (std::vector<hier::Box>::const_iterator bi = boxes.begin();
+           bi != boxes.end();
+           bi++) {
+         tbox::plog << " + " << *bi;
+      }
+      tbox::plog << std::endl;
+   }
+#ifdef DEBUG_CHECK_ASSERTIONS
+   for (std::vector<hier::Box>::const_iterator bi = boxes.begin();
+        bi != boxes.end();
+        bi++) {
+      for (std::vector<hier::Box>::const_iterator bj = boxes.begin();
+           bj != boxes.end();
+           bj++) {
+         if (bi != bj) {
+            TBOX_ASSERT(!bi->intersects(*bj));
+         }
+      }
+   }
+   hier::BoxList l1(bursty);
+   hier::BoxList l2(solid);
+   for (std::vector<hier::Box>::const_iterator bi = boxes.begin();
+        bi != boxes.end();
+        bi++) {
+      l2.addItem(*bi);
+   }
+   l1.removeIntersections(l2);
+   TBOX_ASSERT(l1.size() == 0);
+   l2.removeIntersections(bursty);
+   TBOX_ASSERT(l2.size() == 0);
+#endif
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+double TreeLoadBalancer::computeLocalLoads(
+   const hier::MappedBoxLevel& mapped_box_level) const
+{
+   // Count up workload.
+   double load = 0.0;
+   const hier::MappedBoxSet& mapped_boxes = mapped_box_level.getMappedBoxes();
+   for (hier::MappedBoxSet::const_iterator ni = mapped_boxes.begin();
+        ni != mapped_boxes.end();
+        ++ni) {
+      double mapped_box_load = computeLoad(*ni);
+      load += mapped_box_load;
+   }
+   return (double)load;
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+double TreeLoadBalancer::computeLoad(
+   const hier::MappedBox& mapped_box,
+   const hier::Box& box) const
+{
+   /*
+    * Currently only for uniform loads, where the load is equal
+    * to the number of cells.  For non-uniform loads, this method
+    * needs the patch data index for the load.  It would summ up
+    * the individual cell loads in the overlap region.
+    */
+   hier::Box overlap = mapped_box.getBox() * box;
+   return double(overlap.size());
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+double TreeLoadBalancer::computeLoad(
+   const hier::MappedBox& mapped_box) const
+{
+   /*
+    * Currently only for uniform loads, where the load is equal
+    * to the number of cells.  For non-uniform loads, this method
+    * needs the patch data index for the load.  It would summ up
+    * the individual cell loads in the cell.
+    */
+   return double(mapped_box.getBox().size());
+}
+
+/*
+ *************************************************************************
+ *
+ * Print out all attributes of class instance for debugging.
+ *
+ *************************************************************************
+ */
+
+void TreeLoadBalancer::printClassData(
+   std::ostream& os) const
+{
+   os << "\nTreeLoadBalancer::printClassData..." << std::endl;
+   os << "\nTreeLoadBalancer: this = "
+      << (TreeLoadBalancer *)this << std::endl;
+   os << "d_object_name = " << d_object_name << std::endl;
+
+   int ln;
+
+   os << "d_workload_data_id..." << std::endl;
+   for (ln = 0; ln < d_workload_data_id.getSize(); ln++) {
+      os << "    d_workload_data_id[" << ln << "] = "
+      << d_workload_data_id[ln] << std::endl;
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ * Read values (described in the class header) from input database.
+ *
+ *************************************************************************
+ */
+
+void TreeLoadBalancer::getFromInput(
+   tbox::Pointer<tbox::Database> db)
+{
+
+   if (s_print_steps == 0) {
+      s_print_steps = 'n';
+      s_print_break_steps = 'n';
+      s_print_swap_steps = 'n';
+      s_print_edge_steps = 'n';
+      s_check_connectivity = 'n';
+      s_check_map = 'n';
+   }
+
+   if (!db.isNull()) {
+
+      s_print_steps =
+         db->getCharWithDefault("print_steps",
+            s_print_steps);
+      s_print_break_steps =
+         db->getCharWithDefault("print_break_steps",
+            s_print_break_steps);
+      s_print_swap_steps =
+         db->getCharWithDefault("print_swap_steps",
+            s_print_swap_steps);
+      s_print_edge_steps =
+         db->getCharWithDefault("print_edge_steps",
+            s_print_edge_steps);
+      s_check_connectivity =
+         db->getCharWithDefault("check_connectivity",
+            s_check_connectivity);
+      s_check_map =
+         db->getCharWithDefault("check_map",
+            s_check_map);
+
+      d_report_load_balance = db->getBoolWithDefault("report_load_balance",
+            d_report_load_balance);
+      d_barrier_before = db->getBoolWithDefault("barrier_before",
+            d_barrier_before);
+      d_barrier_after = db->getBoolWithDefault("barrier_after",
+            d_barrier_after);
+
+      d_n_root_cycles = db->getIntegerWithDefault("n_root_cycles",
+            d_n_root_cycles);
+
+      d_balance_penalty_wt = db->getDoubleWithDefault("balance_penalty_wt",
+            d_balance_penalty_wt);
+      d_surface_penalty_wt = db->getDoubleWithDefault("surface_penalty_wt",
+            d_surface_penalty_wt);
+      d_slender_penalty_wt = db->getDoubleWithDefault("slender_penalty_wt",
+            d_slender_penalty_wt);
+      d_precut_penalty_wt = db->getDoubleWithDefault("precut_penalty_wt",
+            d_precut_penalty_wt);
+
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ * Private utility functions to determine parameter values for level.
+ *
+ *************************************************************************
+ */
+
+int TreeLoadBalancer::getWorkloadDataId(
+   int level_number) const
+{
+
+   TBOX_ASSERT(level_number >= 0);
+
+   int wrk_id = (level_number < d_workload_data_id.getSize() ?
+                 d_workload_data_id[level_number] :
+                 d_master_workload_data_id);
+
+   return wrk_id;
+}
+
+/*
+ ***************************************************************************
+ *
+ ***************************************************************************
+ */
+void TreeLoadBalancer::assertNoMessageForPrivateCommunicator() const
+{
+   /*
+    * If using a private communicator, double check to make sure
+    * there are no remaining messages.  This is not a guarantee
+    * that there is no messages in transit, but it can find
+    * messages that have arrived but not received.
+    */
+   if (d_mpi_dup.getCommunicator() != tbox::SAMRAI_MPI::commNull) {
+      int flag;
+      tbox::SAMRAI_MPI::Status mpi_status;
+      int mpi_err = d_mpi_dup.Iprobe(MPI_ANY_SOURCE,
+            MPI_ANY_TAG,
+            &flag,
+            &mpi_status);
+      if (mpi_err != MPI_SUCCESS) {
+         TBOX_ERROR("Error probing for possible lost messages.");
+      }
+      if (flag == true) {
+         int count = -1;
+         mpi_err = tbox::SAMRAI_MPI::Get_count(&mpi_status, MPI_INT, &count);
+         TBOX_ERROR(
+            "Library error!\n"
+            << "TreeLoadBalancer detected before or\n"
+            << "after using a private communicator that there\n"
+            << "is a message yet to be received.  This is\n"
+            << "an error because all messages using the\n"
+            << "private communicator should have been\n"
+            << "accounted for.  Message status:\n"
+            << "source " << mpi_status.MPI_SOURCE << '\n'
+            << "tag " << mpi_status.MPI_TAG << '\n'
+            << "count " << count << " (assuming integers)\n"
+            << "current tags: "
+            << ' ' << TreeLoadBalancer_LOADTAG0 << ' '
+            << TreeLoadBalancer_LOADTAG1
+            );
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ * Currently assuming uniform load of one unit per cell.
+ *
+ * Return whether a successful break was made.
+ *************************************************************************
+ */
+bool TreeLoadBalancer::breakOffLoad_planar(
+   const MappedBox& mapped_box,
+   double ideal_load_to_break,
+   const tbox::Array<tbox::Array<bool> >& bad_cuts,
+   std::vector<hier::Box>& breakoff,
+   std::vector<hier::Box>& leftover,
+   double& brk_load) const
+{
+
+   const tbox::Dimension dim(d_dim);
+
+   if (s_print_break_steps == 'y') {
+      tbox::plog << "      breakOffLoad_planar attempting to break "
+                 << ideal_load_to_break << " from MappedBox " << mapped_box
+                 << " min_size=" << d_min_size << std::endl;
+   }
+
+   brk_load = 0;
+   breakoff.clear();
+   leftover.clear();
+
+   const hier::IntVector& box_dims = mapped_box.getBox().numberCells();
+
+   const int box_vol = box_dims.getProduct();
+
+   if (box_vol <= ideal_load_to_break) {
+      // Easy: break off everything.
+      breakoff.push_back(mapped_box.getBox());
+      brk_load = box_vol;
+      if (s_print_break_steps == 'y') {
+         tbox::plog << "      breakOffload_planar broke off entire MappedBox "
+                    << mapped_box
+                    << std::endl;
+      }
+      return true;
+   }
+
+   hier::IntVector sorted_size(dim);
+   sortIntVector(sorted_size, box_dims);
+
+   /*
+    * Search directions from longest to shortest
+    * because we prefer to break across longest dir.
+    */
+
+   /*
+    * Missing ideal results in overload.
+    * Initialize overload for zero breakoff.
+    */
+   double best_overload = (double)ideal_load_to_break;
+   hier::Box best_breakoff_box(dim);
+   hier::Box best_leftover_box(dim);
+   bool return_value = false;
+
+   for (int d = d_dim.getValue() - 1; d >= 0; --d) {
+
+      const int brk_dir = sorted_size(d_dim.getValue() - 1);
+
+      const int brk_area = box_vol / box_dims(brk_dir);
+
+      const tbox::Array<bool>& bad = bad_cuts[brk_dir];
+
+      for (int round = 0; round <= 1; ++round) {
+
+         /*
+          * Round break length down (round==0) or up (round==1).
+          *
+          * Rounding up or down heeds d_cut_factor
+          * so brk_len is an integer multiple of d_cut_factor.
+          */
+         const int brk_len =
+            (((int)(ideal_load_to_break / brk_area))
+             / d_cut_factor(brk_dir) + round)
+            * d_cut_factor(brk_dir);
+
+         if (brk_len < d_min_size(brk_dir)) {
+            if (brk_len + 1 < d_min_size(brk_dir)) {
+               // No chance rounding up would satisfy minimum size.
+               return false;
+            }
+            continue;
+         }
+
+         if (box_dims(brk_dir) - brk_len > 0 &&
+             box_dims(brk_dir) - brk_len < d_min_size(brk_dir)) {
+            // Leftover box violates minimum size.
+            continue;
+         }
+
+         const int brk_volume = brk_area * brk_len;
+
+         /*
+          * Compute overload.
+          */
+         const double overload = brk_volume <= ideal_load_to_break ?
+            ((double)ideal_load_to_break - brk_volume) :
+            ((double)brk_volume - ideal_load_to_break);
+
+         if (overload < best_overload) {
+            // This cut gives better overload, if it can be done.
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(brk_len >= 0 && brk_len <= bad.size());
+#endif
+            if (brk_len ==
+                box_dims(brk_dir) /* brk_len out of range in bad */ ||
+                bad[brk_len] == false) {
+               // Cutting brk_len from low side is ok.
+               best_overload = overload;
+               best_breakoff_box = mapped_box.getBox();
+               best_breakoff_box.upper() (brk_dir) =
+                  best_breakoff_box.lower() (brk_dir) + brk_len - 1;
+               best_leftover_box = mapped_box.getBox();
+               best_leftover_box.lower() (brk_dir) =
+                  best_breakoff_box.upper() (brk_dir) + 1;
+               return_value = true;
+               break;
+            } else if (bad[box_dims(brk_dir) - brk_len] == false) {
+               // Cutting brk_len from high side is ok.
+               best_overload = overload;
+               best_breakoff_box = mapped_box.getBox();
+               best_breakoff_box.lower() (brk_dir) =
+                  best_breakoff_box.upper() (brk_dir) - brk_len + 1;
+               best_leftover_box = mapped_box.getBox();
+               best_leftover_box.upper() (brk_dir) =
+                  best_breakoff_box.lower() (brk_dir) - 1;
+               return_value = true;
+               break;
+            }
+         }
+      }
+
+   }
+
+   if (!best_breakoff_box.empty()) {
+      breakoff.push_back(best_breakoff_box);
+      brk_load = best_breakoff_box.size();
+      if (s_print_break_steps == 'y') {
+         tbox::plog << "      breakOffload_planar broke off box " << mapped_box
+                    << " for breakoff box " << best_breakoff_box
+                    << " and leftover " << best_leftover_box << std::endl;
+      }
+   } else {
+      if (s_print_break_steps == 'y') {
+         tbox::plog << "      breakOffload_planar could not break "
+                    << ideal_load_to_break << " from MappedBox " << mapped_box
+                    << std::endl;
+      }
+   }
+   if (!best_leftover_box.empty()) {
+      leftover.push_back(best_leftover_box);
+   }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   for (std::vector<hier::Box>::iterator bi = breakoff.begin();
+        bi != breakoff.end();
+        ++bi) {
+      const hier::Box& b = *bi;
+      const hier::IntVector s = b.numberCells();
+      for (int d = 0; d < d_dim.getValue(); ++d) {
+         if (((s(d) < d_min_size(d)) && (s(d) != box_dims(d))) ||
+             (s(d) > box_dims(d))) {
+            TBOX_ERROR("TreeLoadBalancer library error:\n"
+               << "breakoff box " << b << ", size " << s
+               << "\nis not between the min size " << d_min_size
+               << "\nand the original box size " << box_dims << "\n"
+               << "break box size " << best_breakoff_box.numberCells() << "\n"
+               << "ideal brk load " << ideal_load_to_break);
+         }
+      }
+   }
+   for (std::vector<hier::Box>::iterator bi = leftover.begin();
+        bi != leftover.end();
+        ++bi) {
+      const hier::Box& b = *bi;
+      const hier::IntVector s = b.numberCells();
+      for (int d = 0; d < d_dim.getValue(); ++d) {
+         if (((s(d) < d_min_size(d)) && (s(d) != box_dims(d))) ||
+             (s(d) > box_dims(d))) {
+            TBOX_ERROR("TreeLoadBalancer library error:\n"
+               << "leftover box " << b << ", size " << s
+               << "\nis not between the min size " << d_min_size
+               << "\nand the original box size " << box_dims << "\n"
+               << "break box size " << best_breakoff_box.numberCells() << "\n"
+               << "ideal brk load " << ideal_load_to_break);
+         }
+      }
+   }
+#endif
+
+   return return_value;
+}
+
+/*
+ *************************************************************************
+ * Currently assuming uniform load of one unit per cell.
+ *
+ * Return whether a successful break was made.
+ *
+ * Differs from breakOffLoad in that it will always
+ * performs a break and if needed, break off more than
+ * the ideal.  The calling method should take this into
+ * account.
+ *************************************************************************
+ */
+bool TreeLoadBalancer::breakOffLoad_cubic1(
+   const MappedBox& mapped_box,
+   double ideal_load_to_break,
+   const tbox::Array<tbox::Array<bool> >& bad_cuts,
+   std::vector<hier::Box>& breakoff,
+   std::vector<hier::Box>& leftover,
+   double& brk_load) const
+{
+
+   const tbox::Dimension dim(d_dim);
+
+   const hier::IntVector box_dims(mapped_box.getBox().numberCells());
+
+   const double mapped_box_load(box_dims.getProduct());
+
+   if (ideal_load_to_break >= mapped_box_load) {
+      // Easy: break off everything.
+      leftover.clear();
+      breakoff.clear();
+      breakoff.push_back(mapped_box.getBox());
+      brk_load = mapped_box_load;
+      if (s_print_break_steps == 'y') {
+         tbox::plog << "      breakOffload_cubic1 broke off entire MappedBox "
+                    << mapped_box
+                    << std::endl;
+      }
+      return true;
+   }
+
+   if (ideal_load_to_break > 0.5 * mapped_box_load) {
+      /*
+       * This algorithm is better when breaking off a small portion.
+       * Since the ideal is a bigger portion, switch breakoff with leftover.
+       */
+      if (s_print_break_steps == 'y') {
+         tbox::plog
+         << "      breakOffload_cubic1 reversing direction to break "
+         << (box_dims.getProduct() - ideal_load_to_break)
+         << " instead of " << ideal_load_to_break << " / "
+         << box_dims.getProduct() << std::endl;
+      }
+      bool success =
+         breakOffLoad_cubic1(mapped_box,
+            box_dims.getProduct() - ideal_load_to_break,
+            bad_cuts,
+            leftover,
+            breakoff,
+            brk_load);
+      if (success) {
+         brk_load = box_dims.getProduct() - brk_load;
+      }
+      return success;
+   }
+
+   if (s_print_break_steps == 'y') {
+      tbox::plog << "      breakOffload_cubic1 attempting to break "
+                 << ideal_load_to_break << " from MappedBox " << mapped_box
+                 << " min_size=" << d_min_size << std::endl;
+   }
+
+   breakoff.clear();
+   leftover.clear();
+
+   hier::IntVector brk_size(d_min_size);
+   brk_size.max(d_cut_factor);
+   brk_size.min(box_dims);
+   /*
+    * If remainder is too small, zero it out to avoid
+    * having non-zero remainder smaller than d_min_size.
+    */
+   // tbox::plog << "box,brk,min = " << box_dims << ' ' << brk_size << ' ' << d_min_size << std::endl;
+   for (int d = 0; d < d_dim.getValue(); ++d) {
+      // tbox::plog << "bef d=" << d << " box,brk,min = " << box_dims(d) << ' ' << brk_size(d) << ' ' << d_min_size(d) << std::endl;
+      if ((box_dims(d) - brk_size(d) > 0) &&
+          (box_dims(d) - brk_size(d) < d_min_size(d))) {
+         brk_size(d) = box_dims(d);
+      }
+      // tbox::plog << "aft d=" << d << " box,brk,min = " << box_dims(d) << ' ' << brk_size(d) << ' ' << d_min_size(d) << std::endl;
+   }
+   // tbox::plog << "box,brk,min = " << box_dims << ' ' << brk_size << ' ' << d_min_size << std::endl;
+   brk_load = brk_size.getProduct();
+
+   if (s_print_break_steps == 'y') {
+      tbox::plog << "      brk: " << std::flush;
+      tbox::plog << "  " << brk_size << "->" << brk_load << std::flush;
+   }
+
+   /*
+    * stop_growing: whether dimensions of brk_size is already
+    * big engough so that it cannot not be grown without breaking
+    * off too much.
+    */
+   hier::IntVector stop_growing(dim, 0);
+   for (int d = 0; d < d_dim.getValue(); ++d) {
+      if (brk_size[d] == box_dims[d]) stop_growing[d] = 1;
+   }
+
+   if (brk_load < ideal_load_to_break) {
+      do {
+
+         /*
+          * Select dimension to increase in size.
+          * Use the smallest dimension that is still allowed to grow.
+          */
+         int inc_d = -1;
+         for (int d = 0; d < d_dim.getValue(); ++d) {
+            if (!stop_growing(d) &&
+                (inc_d == -1 || brk_size(inc_d) > brk_size(d))) inc_d = d;
+         }
+         if (inc_d == -1) break;
+
+         TBOX_ASSERT(brk_size(inc_d) < box_dims(inc_d));
+
+         hier::IntVector new_brk_size(brk_size);
+         /*
+          * new_brk_size(inc_d) is incremented by d_cut_factor(inc_d)
+          * so that we cut only on integer multiples of d_cut_factor(inc_d).
+          */
+         new_brk_size(inc_d) += d_cut_factor(inc_d);
+         if (s_print_break_steps == 'y') {
+            tbox::plog << "  " << brk_size << "=>" << brk_load << std::flush;
+         }
+
+         // Prevent remainder being smaller than d_min_size.
+         if (box_dims(inc_d) - new_brk_size(inc_d) < d_min_size(inc_d)) {
+            new_brk_size(inc_d) = box_dims(inc_d);
+            if (s_print_break_steps == 'y') {
+               tbox::plog << "  " << brk_size << "==>" << brk_load
+                          << std::flush;
+            }
+         }
+
+         if (new_brk_size(inc_d) == box_dims(inc_d)) stop_growing(inc_d) = 1;
+
+         int new_brk_load = new_brk_size.getProduct();
+
+         if (new_brk_load <= ideal_load_to_break) {
+            brk_size = new_brk_size;
+            brk_load = new_brk_load;
+            if (s_print_break_steps == 'y') {
+               tbox::plog << "  " << brk_size << "===>" << brk_load
+                          << std::flush;
+            }
+         } else if ((new_brk_load - ideal_load_to_break) <
+                    ((double)ideal_load_to_break - brk_load)) {
+            brk_size = new_brk_size;
+            brk_load = new_brk_load;
+            if (s_print_break_steps == 'y') {
+               tbox::plog << "  " << brk_size << "====>" << brk_load
+                          << std::flush;
+            }
+            break;
+         } else {
+            /*
+             * Even though dimension inc_d has not reached the box dimension,
+             * stop growing it because any further growth leads to too big
+             * a load.
+             */
+            stop_growing(inc_d) = 1;
+            /*
+             * We could try to reshape brk_size so we can increase brk_load
+             * closer to the ideal, but for simplicity, we do not.
+             */
+         }
+
+      } while (1);
+   }
+
+   if (s_print_break_steps == 'y') {
+      tbox::plog << std::endl;
+   }
+
+   const hier::Box& box = mapped_box.getBox();
+   /*
+    * Find a place to put the break-away box so that it does not
+    * lie across a bad cut.
+    *
+    * First, try each corner of the input box.
+    */
+   hier::Box brk_box(dim);
+   const hier::IntVector& lower(box.lower());
+   const hier::IntVector& upper(box.upper());
+   bool bad_cut_crossed = false;
+   if (s_print_break_steps == 'y') {
+      tbox::plog << "      Placing " << brk_size
+                 << " to avoid bad cut points" << std::flush;
+   }
+   for (int d = 0; d < d_dim.getValue(); ++d) {
+      /*
+       * To minimize the number of boxes remaining after brk_box is
+       * removed, try to place brk_box against the upper or lower side
+       * of the MappedBox.  First try putting the brk_box along the
+       * upper side of dimension d.  If it cuts the box at a bad point,
+       * try the lower side.  If it still cuts at a bad points, slide
+       * the box toward the upper side until it does not cut at any bad
+       * points, being careful not to be so close to the box boundaries
+       * that the remainder is smaller than the minimum size.  If no
+       * place can be found to put brk_box, give up.  (We could go back
+       * an reshape the box at this point, but we won't because there is
+       * probably another box that would work without reshaping.)
+       */
+      const tbox::Array<bool>& bad = bad_cuts[d];
+
+      int& gl = brk_box.lower()[d];
+      int& gu = brk_box.upper()[d];
+
+      gu = upper[d];
+      gl = gu - (brk_size[d] - 1);
+      if (!bad[gl - lower[d]]) {
+         if (s_print_break_steps == 'y') {
+            tbox::plog << "  d=" << d << " upper" << std::flush;
+         }
+         continue;
+      }
+
+      gl = lower[d];
+      gu = gl + (brk_size[d] - 1);
+      if (gu + 1 - lower[d] < bad.size() && !bad[gu + 1 - lower[d]]) {
+         if (s_print_break_steps == 'y') {
+            tbox::plog << "  d=" << d << " lower" << std::flush;
+         }
+         continue;
+      }
+
+      gl = lower[d] + d_min_size[d];
+      gu = gl + (brk_size[d] - 1);
+      while (gu <= upper[d] - d_min_size[d] &&
+             (bad[gl - lower[d]] || bad[gu + 1 - lower[d]])) {
+         ++gl;
+         ++gu;
+      }
+      if (gu <= upper[d] - d_min_size[d]) {
+         if (s_print_break_steps == 'y') {
+            tbox::plog << "  d=" << d << " middle" << std::flush;
+         }
+         continue;
+      }
+
+      if (s_print_break_steps == 'y') {
+         tbox::plog << "  cannot place dim " << d
+                    << " without creating bad cuts."
+                    << std::flush;
+      }
+      bad_cut_crossed = true;
+      /*
+       * Cannot find place for brk_box along dimension d.
+       * No point in looking at higher dimensions.
+       */
+      break;
+   }
+   if (s_print_break_steps == 'y') {
+      tbox::plog << std::endl;
+   }
+   if (bad_cut_crossed) {
+      return false;
+   }
+
+   breakoff.clear();
+   breakoff.push_back(brk_box);
+
+   burstBox(mapped_box.getBox(),
+      brk_box,
+      leftover);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   for (std::vector<hier::Box>::iterator bi = breakoff.begin();
+        bi != breakoff.end();
+        ++bi) {
+      const hier::Box& b = *bi;
+      const hier::IntVector s = b.numberCells();
+      for (int d = 0; d < d_dim.getValue(); ++d) {
+         if (((s(d) < d_min_size(d)) && (s(d) != box_dims(d))) ||
+             (s(d) > box_dims(d))) {
+            TBOX_ERROR("TreeLoadBalancer library error:\n"
+               << "breakoff box " << b << ", with size " << s
+               << "\nis not between the min size " << d_min_size
+               << "\nand the original box size " << box_dims << "\n"
+               << "orig box " << mapped_box.getBox() << "\n"
+               << "break box " << brk_box << "\n"
+               << "break box size " << brk_size << "\n"
+               << "ideal brk load " << ideal_load_to_break);
+         }
+      }
+   }
+   for (std::vector<hier::Box>::iterator bi = leftover.begin();
+        bi != leftover.end();
+        ++bi) {
+      const hier::Box& b = *bi;
+      const hier::IntVector s = b.numberCells();
+      for (int d = 0; d < d_dim.getValue(); ++d) {
+         if (((s(d) < d_min_size(d)) && (s(d) != box_dims(d))) ||
+             (s(d) > box_dims(d))) {
+            TBOX_ERROR("TreeLoadBalancer library error:\n"
+               << "leftover box " << b << ", with size " << s
+               << "\nis not between the min size " << d_min_size
+               << "\nand the original box size " << box_dims << "\n"
+               << "orig box " << mapped_box.getBox() << "\n"
+               << "break box " << brk_box << "\n"
+               << "break box size " << brk_size << "\n"
+               << "ideal brk load " << ideal_load_to_break);
+         }
+      }
+   }
+#endif
+
+   return true;
+}
+
+void TreeLoadBalancer::setShadowData(
+   const hier::IntVector& min_size,
+   const hier::IntVector& max_size,
+   const hier::MappedBoxLevel& domain_mapped_box_level,
+   const hier::IntVector& bad_interval,
+   const hier::IntVector& cut_factor,
+   const hier::IntVector& refinement_ratio) const
+{
+   d_min_size = min_size;
+   d_max_size = max_size;
+   d_bad_interval = bad_interval;
+   d_cut_factor = cut_factor;
+   /*
+    * Domain boxes are used by breakOffLoad to determine where
+    * the bad cuts are.  Computing domain_boxes from domain_mapped_box_level
+    * should be moved above the this method.
+    */
+
+   /*
+    * We expect the domain mapped_box_level to be in globalized state.
+    */
+   TBOX_ASSERT(
+      domain_mapped_box_level.getParallelState() ==
+      hier::MappedBoxLevel::GLOBALIZED);
+
+   d_domain_boxes.resizeBoxArray(
+      static_cast<int>(domain_mapped_box_level.getGlobalMappedBoxes().size()));
+   {
+      const hier::MappedBoxSet& domain_mapped_boxes =
+         domain_mapped_box_level.getGlobalMappedBoxes();
+      const int n = static_cast<int>(domain_mapped_boxes.size());
+      hier::MappedBoxSet::const_iterator ni = domain_mapped_boxes.begin();
+      for (int i = 0; i < n; ++i, ++ni) {
+         d_domain_boxes[i] = (*ni).getBox();
+      }
+      d_domain_boxes.refine(refinement_ratio);
+   }
+}
+
+void TreeLoadBalancer::unsetShadowData() const {
+   d_min_size = hier::IntVector(d_dim, -1);
+   d_max_size = hier::IntVector(d_dim, -1);
+   d_domain_boxes.resizeBoxArray(0);
+   d_bad_interval = hier::IntVector(d_dim, -1);
+   d_cut_factor = hier::IntVector(d_dim, -1);
+}
+
+void TreeLoadBalancer::prebalanceMappedBoxLevel(
+   hier::MappedBoxLevel& balance_mapped_box_level,
+   hier::Connector& balance_to_anchor,
+   hier::Connector& anchor_to_balance,
+   const tbox::RankGroup& rank_group) const
+{
+   hier::OverlapConnectorAlgorithm oca;
+
+   TBOX_ASSERT(anchor_to_balance.checkTransposeCorrectness(balance_to_anchor) == 0);
+   TBOX_ASSERT(balance_to_anchor.checkTransposeCorrectness(anchor_to_balance) == 0);
+
+   /*
+    * tmp_mapped_box_level will contain the same boxes as
+    * balance_mapped_box_level, but all will live on the processors
+    * specified in rank_group.
+    */
+   hier::MappedBoxLevel tmp_mapped_box_level(d_dim);
+   tmp_mapped_box_level.initialize(
+      balance_mapped_box_level.getRefinementRatio(),
+      balance_mapped_box_level.getMPI());
+
+   /*
+    * If a rank is not in rank_group it is called a "sending" rank, as
+    * it will send any MappedBoxes it has to a rank in rank_group.
+    */
+   bool is_sending_rank = rank_group.isMember(d_rank) ? false : true;
+
+   int output_nproc = rank_group.size();
+
+   /*
+    * the send and receive comm objects
+    */
+   tbox::AsyncCommStage comm_stage;
+   tbox::AsyncCommPeer<int>* box_send = NULL;
+   tbox::AsyncCommPeer<int>* box_recv = NULL;
+   tbox::AsyncCommPeer<int>* id_send = NULL;
+   tbox::AsyncCommPeer<int>* id_recv = NULL;
+
+   /*
+    * A sending rank will send its MappedBoxes to a receiving rank, and
+    * that receiving processor will add it to its local set of MappedBoxes.
+    * When the box is added on the receiving processor, it will receive
+    * a new LocalId.  This LocalId value needs to be sent back to
+    * the sending processor, in order to construct the mapping connectors.
+    *
+    * Therefore the sending ranks construct comm objects for sending boxes
+    * and receiving LocalIdes.
+    *
+    * Sending processors send to ranks in the rank_group determined by
+    * a modulo heuristic.
+    */
+   if (is_sending_rank) {
+      box_send = new tbox::AsyncCommPeer<int>;
+      box_send->initialize(&comm_stage);
+      box_send->setPeerRank(rank_group.getMappedRank(d_rank % output_nproc));
+      box_send->setMPI(d_mpi);
+      box_send->setMPITag(TreeLoadBalancer_PREBALANCE0 + 2 * d_rank,
+         TreeLoadBalancer_PREBALANCE1 + 2 * d_rank);
+
+      id_recv = new tbox::AsyncCommPeer<int>;
+      id_recv->initialize(&comm_stage);
+      id_recv->setPeerRank(rank_group.getMappedRank(d_rank % output_nproc));
+      id_recv->setMPI(d_mpi);
+      id_recv->setMPITag(TreeLoadBalancer_PREBALANCE0 + 2 * d_rank,
+         TreeLoadBalancer_PREBALANCE1 + 2 * d_rank);
+   }
+
+   /*
+    * The receiving ranks construct comm objects for receiving boxes
+    * and sending LocalIdes.
+    */
+   int num_recvs = 0;
+   if (rank_group.isMember(d_rank)) {
+      tbox::List<int> recv_ranks;
+      for (int i = 0; i < d_nproc; i++) {
+         if (!rank_group.isMember(i) &&
+             rank_group.getMappedRank(i % output_nproc) == d_rank) {
+            recv_ranks.appendItem(i);
+         }
+      }
+      num_recvs = recv_ranks.size();
+      if (num_recvs > 0) {
+         box_recv = new tbox::AsyncCommPeer<int>[num_recvs];
+         id_send = new tbox::AsyncCommPeer<int>[num_recvs];
+         int recv_count = 0;
+         for (tbox::List<int>::Iterator ri(recv_ranks); ri; ri++) {
+            box_recv[recv_count].initialize(&comm_stage);
+            box_recv[recv_count].setPeerRank(ri());
+            box_recv[recv_count].setMPI(d_mpi);
+            box_recv[recv_count].setMPITag(TreeLoadBalancer_PREBALANCE0 + 2 * ri(),
+               TreeLoadBalancer_PREBALANCE1 + 2 * ri());
+
+            id_send[recv_count].initialize(&comm_stage);
+            id_send[recv_count].setPeerRank(ri());
+            id_send[recv_count].setMPI(d_mpi);
+            id_send[recv_count].setMPITag(TreeLoadBalancer_PREBALANCE0 + 2 * ri(),
+               TreeLoadBalancer_PREBALANCE1 + 2 * ri());
+
+            recv_count++;
+         }
+         TBOX_ASSERT(num_recvs == recv_count);
+      }
+   }
+
+   /*
+    * These NeighborhoodSets are used to create mapping Connectors which
+    * describe the mapping from the box configuration of the given
+    * balance_mapped_box_level, to the new configuration stored in
+    * tmp_mapped_box_level.  These mapping Connectors are necessary to
+    * modify the two Connectors given in the argument list, so that on
+    * return from this method, they will be correct for the new
+    * balance_mapped_box_level.
+    */
+   hier::NeighborhoodSet balance_to_tmp_edges;
+   hier::NeighborhoodSet tmp_to_balance_edges;
+
+   /*
+    * Where MappedBoxes already exist on ranks in rank_group,
+    * move them directly to tmp_mapped_box_level.
+    */
+   if (!is_sending_rank) {
+      const hier::MappedBoxSet& unchanged_mapped_boxes =
+         balance_mapped_box_level.getMappedBoxes();
+
+      for (hier::MappedBoxSet::const_iterator ni =
+              unchanged_mapped_boxes.begin();
+           ni != unchanged_mapped_boxes.end(); ++ni) {
+
+         const hier::MappedBox& mapped_box = *ni;
+         tmp_mapped_box_level.addMappedBox(mapped_box);
+      }
+   }
+
+   const int buf_size = hier::MappedBox::commBufferSize(d_dim);
+
+   /*
+    * On sending ranks, pack the MappedBoxes into buffers and send.
+    */
+   if (is_sending_rank) {
+      const hier::MappedBoxSet& sending_mapped_boxes =
+         balance_mapped_box_level.getMappedBoxes();
+      const int num_sending_boxes = 
+         static_cast<int>(sending_mapped_boxes.size());
+
+      int* buffer = new int[buf_size * num_sending_boxes];
+      int box_count = 0;
+      for (hier::MappedBoxSet::const_iterator ni = sending_mapped_boxes.begin();
+           ni != sending_mapped_boxes.end(); ++ni) {
+
+         const hier::MappedBox& mapped_box = *ni;
+
+         mapped_box.putToIntBuffer(&buffer[box_count * buf_size]);
+         box_count++;
+      }
+      box_send->beginSend(buffer, buf_size * num_sending_boxes);
+
+      delete[] buffer;
+   }
+
+   /*
+    * On receiving ranks, complete the receives, add the boxes to local
+    * tmp_mapped_box_level, insert boxes into tmp_to_balance_edges, and then
+    * send the new LocalIdes back to the sending processors.
+    */
+   if (!is_sending_rank && num_recvs > 0) {
+      for (int i = 0; i < num_recvs; i++) {
+         box_recv[i].beginRecv();
+      }
+      int num_completed_recvs = 0;
+      tbox::Array<bool> completed(num_recvs, false);
+      while (num_completed_recvs < num_recvs) {
+         for (int i = 0; i < num_recvs; i++) {
+            if (!completed[i] && box_recv[i].checkRecv()) {
+               num_completed_recvs++;
+               completed[i] = true;
+               const int num_boxes = box_recv[i].getRecvSize() / buf_size;
+               const int* buffer = box_recv[i].getRecvData();
+               int* id_buffer = new int[num_boxes];
+
+               for (int b = 0; b < num_boxes; b++) {
+                  hier::MappedBox mapped_box(d_dim);
+
+                  mapped_box.getFromIntBuffer(&buffer[b * buf_size]);
+
+                  hier::MappedBoxSet::iterator tmp_iter =
+                     tmp_mapped_box_level.addBox(mapped_box.getBox());
+
+                  hier::GlobalId tmp_global_id = (*tmp_iter).getGlobalId();
+
+                  tmp_to_balance_edges[tmp_global_id].insert(mapped_box);
+
+                  id_buffer[b] = tmp_global_id.getLocalId().getValue();
+               }
+               id_send[i].beginSend(id_buffer, num_boxes);
+
+               delete[] id_buffer;
+            }
+         }
+      }
+      for (int i = 0; i < num_recvs; i++) {
+         if (!id_send[i].checkSend()) {
+            id_send[i].completeCurrentOperation();
+         }
+      }
+   }
+
+   /*
+    * On sending ranks, receive the LocalIdes, and add the edges
+    * to balance_to_tmp_edges.
+    */
+   if (is_sending_rank) {
+      if (!box_send->checkSend()) {
+         box_send->completeCurrentOperation();
+      }
+
+      id_recv->beginRecv();
+
+      if (!id_recv->checkRecv()) {
+         id_recv->completeCurrentOperation();
+      }
+      const int* buffer = id_recv->getRecvData();
+
+      const hier::MappedBoxSet& sending_mapped_boxes =
+         balance_mapped_box_level.getMappedBoxes();
+      TBOX_ASSERT(static_cast<unsigned int>(id_recv->getRecvSize()) == sending_mapped_boxes.size());
+
+      int box_count = 0;
+      for (hier::MappedBoxSet::const_iterator ni =
+              sending_mapped_boxes.begin();
+           ni != sending_mapped_boxes.end(); ++ni) {
+
+         hier::MappedBox new_mapped_box(
+            (*ni).getBox(),
+            (hier::LocalId)buffer[box_count],
+            rank_group.getMappedRank(d_rank % output_nproc));
+
+         balance_to_tmp_edges[(*ni).getGlobalId()].insert(new_mapped_box);
+         box_count++;
+      }
+   }
+
+   /*
+    * Construct the mapping Connectors with the appropriate NeighborhoodSets.
+    */
+   hier::Connector balance_to_tmp(balance_mapped_box_level,
+                                  tmp_mapped_box_level,
+                                  hier::IntVector::getZero(d_dim),
+                                  balance_to_tmp_edges);
+
+   hier::Connector tmp_to_balance(tmp_mapped_box_level,
+                                  balance_mapped_box_level,
+                                  hier::IntVector::getZero(d_dim),
+                                  tmp_to_balance_edges);
+
+   /*
+    * This modify operation copies tmp_mapped_box_level to
+    * balance_mapped_box_level, and changes anchor_to_balance and
+    * balance_to_anchor such that they are correct for the new state
+    * of balance_mapped_box_level.
+    */
+   const hier::MappingConnectorAlgorithm mca;
+   mca.modify(anchor_to_balance,
+      balance_to_anchor,
+      balance_to_tmp,
+      tmp_to_balance,
+      &balance_mapped_box_level,
+      &tmp_mapped_box_level);
+
+   TBOX_ASSERT(anchor_to_balance.checkTransposeCorrectness(balance_to_anchor) == 0);
+   TBOX_ASSERT(balance_to_anchor.checkTransposeCorrectness(anchor_to_balance) == 0);
+
+   /*
+    * Clean up raw pointer allocation.
+    */
+   if (is_sending_rank) {
+      delete box_send;
+      delete id_recv;
+   }
+   if (num_recvs) {
+      delete[] box_recv;
+      delete[] id_send;
+   }
+}
+
+std::ostream& operator << (
+   std::ostream& co,
+   const MappedBoxInTransit& r)
+{
+   co << r.mapped_box
+      << r.mapped_box.getBox().numberCells() << '|'
+      << r.mapped_box.getBox().numberCells().getProduct();
+   for (int i = static_cast<int>(r.proc_hist.size()) - 1; i >= 0; --i) {
+      co << '-' << r.proc_hist[i];
+   }
+   co << '-' << r.orig_mapped_box
+      << r.mapped_box.getBox().numberCells() << '|'
+      << r.mapped_box.getBox().numberCells().getProduct();
+   return co;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void TreeLoadBalancer::setTimers()
+{
+   /*
+    * The first constructor gets timers from the TimerManager.
+    * and sets up their deallocation.
+    */
+   if (t_load_balance_mapped_box_level.isNull()) {
+      t_load_balance_mapped_box_level = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::loadBalanceMappedBoxLevel()");
+      t_get_map = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::get_map");
+      t_use_map = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::use_map");
+      t_constrain_size = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::constrain_size");
+      t_map_big_boxes = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::mapOversizedBoxes()");
+      t_compute_local_load = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::compute_local_load");
+      t_compute_global_load = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::compute_global_load");
+      t_compute_tree_load = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::compute_tree_load");
+      t_compute_tree_load0 = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::compute_tree_load0");
+      t_compute_tree_load1 = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::compute_tree_load1");
+      t_compute_tree_load2 = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::compute_tree_load2");
+      t_break_off_load = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::breakOffLoad()");
+      t_find_bad_cuts = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::find_bad_cuts");
+      t_reassign_loads = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::reassignLoads()");
+      t_shift_loads_by_swapping = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::shiftLoadsBySwapping()");
+      t_shift_loads_by_breaking = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::shiftLoadsByBreaking()");
+      t_find_swap_pair = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::findLoadSwapPair()");
+      t_send_load_to_children = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::send_load_to_children");
+      t_send_load_to_parent = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::send_load_to_parent");
+      t_get_load_from_children = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::get_load_from_children");
+      t_get_load_from_parent = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::get_load_from_parent");
+      t_send_edge_to_children = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::send_edge_to_children");
+      t_send_edge_to_parent = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::send_edge_to_parent");
+      t_get_edge_from_children = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::get_edge_from_children");
+      t_get_edge_from_parent = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::get_edge_from_parent");
+      t_report_loads = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::report_loads");
+      t_misc1 = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::misc1");
+      t_misc2 = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::misc2");
+      t_misc3 = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::misc3");
+      t_finish_comms = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::finish_comms");
+      t_local_balancing = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::local_balancing");
+      t_local_edges = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::local_edges");
+      t_pack_load = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::pack_load");
+      t_unpack_load = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::unpack_load");
+      t_pack_edge = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::pack_edge");
+      t_unpack_edge = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::unpack_edge");
+      t_parent_load_comm = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::parent_load_comm");
+      t_children_load_comm = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::children_load_comm");
+      t_parent_edge_comm = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::parent_edge_comm");
+      t_children_edge_comm = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::children_edge_comm");
+      t_barrier_before = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::barrier_before");
+      t_barrier_after = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::barrier_after");
+      t_MPI_wait = tbox::TimerManager::getManager()->
+         getTimer(d_object_name + "::MPI_wait");
+   }
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void TreeLoadBalancer::printStatistics(
+   std::ostream& s) const
+{
+   gatherAndReportLoadBalance(d_load_stat,
+      tbox::SAMRAI_MPI::getSAMRAIWorld(),
+      s);
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/TreeLoadBalancer.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/TreeLoadBalancer.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,22 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Scalable load balancer using tree algorithm. 
+ *
+ ************************************************************************/
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+#ifndef included_assert
+#define included_assert
+#include <cassert>
+#endif
+#endif
+
+namespace SAMRAI {
+namespace mesh {
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/TreeLoadBalancer.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/TreeLoadBalancer.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,987 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Scalable load balancer using tree algorithm. 
+ *
+ ************************************************************************/
+
+#ifndef included_mesh_TreeLoadBalancer
+#define included_mesh_TreeLoadBalancer
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/mesh/LoadBalanceStrategy.h"
+#include "SAMRAI/tbox/AsyncCommPeer.h"
+#include "SAMRAI/tbox/AsyncCommStage.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/RankGroup.h"
+#include "SAMRAI/tbox/Statistic.h"
+#include "SAMRAI/tbox/Statistician.h"
+#include "SAMRAI/tbox/Timer.h"
+
+#include <iostream>
+#include <vector>
+#include <set>
+
+namespace SAMRAI {
+namespace mesh {
+
+/*!
+ * @brief Data to save for each MappedBox that gets passed along the
+ * tree edges.
+ *
+ * The purpose of the MappedBoxInTransit is to associate extra data
+ * with a MappedBox as the it is broken up and passed from processor
+ * to processor.  A MappedBoxInTransit is a MappedBox going through
+ * these changes.  It has a current work load and an orginating
+ * MappedBox.  It is passed from process to process and keeps a
+ * history of the processes it passed through.  It is assigned a
+ * LocalId on every process it passes through, but the LocalId history
+ * is not kept.
+ */
+struct MappedBoxInTransit {
+   typedef hier::MappedBox MappedBox;
+   typedef hier::LocalId LocalId;
+
+   /*!
+    * @brief Constructor
+    *
+    * @param[in] dim
+    */
+   MappedBoxInTransit(
+      const tbox::Dimension& dim):
+      mapped_box(dim),
+      orig_mapped_box(dim)
+   {
+   }
+
+   /*!
+    * @brief Construct a newly birthed MappedBoxInTransit.
+    *
+    * @param[in] other
+    */
+   MappedBoxInTransit(
+      const MappedBox& other):
+      mapped_box(other),
+      orig_mapped_box(other),
+      load(other.getBox().size()),
+      proc_hist()
+   {
+   }
+
+   /*!
+    * @brief Construct new object with a new process added to the
+    * process history.  Copy the history from an existing object.
+    *
+    * @param[in] other
+    *
+    * @param[in] box
+    *
+    * @param[in] rank
+    *
+    * @param[in] local_id
+    */
+   MappedBoxInTransit(
+      const MappedBoxInTransit& other,
+      const hier::Box& box,
+      int rank,
+      LocalId local_id):
+      mapped_box(box, local_id, rank),
+      orig_mapped_box(other.orig_mapped_box),
+      load(box.size()),
+      proc_hist(other.proc_hist)
+   {
+      if (rank != other.getOwnerRank()) {
+         proc_hist.push_back(other.getOwnerRank());
+      }
+   }
+
+   /*!
+    * @brief Assignment operator
+    *
+    * @param[in] other
+    */
+   const MappedBoxInTransit& operator = (
+      const MappedBoxInTransit& other) {
+      mapped_box = other.mapped_box;
+      orig_mapped_box = other.orig_mapped_box;
+      load = other.load;
+      proc_hist = other.proc_hist;
+      return *this;
+   }
+
+   //! @brief The MappedBox.
+   MappedBox mapped_box;
+
+   //! @brief Originating MappedBox.
+   MappedBox orig_mapped_box;
+
+   //! @brief Normalized work load.
+   int load;
+
+   /*!
+    * @brief History of processors passed in transit.  Each time a
+    * processor passes on a MappedBox, it should append its rank to
+    * the proc_hist.
+    */
+   std::vector<int> proc_hist;
+
+   //! @brief Return the owner rank.
+   int getOwnerRank() const {
+      return mapped_box.getOwnerRank();
+   }
+
+   //! @brief Return the LocalId.
+   LocalId getLocalId() const {
+      return mapped_box.getLocalId();
+   }
+
+   //! @brief Return the Box.
+   hier::Box& getBox() {
+      return mapped_box.getBox();
+   }
+
+   //! @brief Return the Box.
+   const hier::Box& getBox() const {
+      return mapped_box.getBox();
+   }
+
+   /*!
+    * @brief Return number of ints required for putting a putting the
+    * object in message passing buffer.
+    */
+   int commBufferSize() const {
+      const tbox::Dimension& dim(mapped_box.getDim());
+      return 2 * MappedBox::commBufferSize(dim) + 2 + static_cast<int>(proc_hist.size());
+   }
+
+   /*!
+    * @brief Put self into a int buffer.
+    *
+    * This is the opposite of getFromIntBuffer().  Number of ints
+    * written is given by commBufferSize().
+    */
+   void putToIntBuffer(
+      int* buffer) const {
+      const tbox::Dimension& dim(mapped_box.getDim());
+      mapped_box.putToIntBuffer(buffer);
+      buffer += MappedBox::commBufferSize(dim);
+      orig_mapped_box.putToIntBuffer(buffer);
+      buffer += MappedBox::commBufferSize(dim);
+      *(buffer++) = load;
+      *(buffer++) = static_cast<int>(proc_hist.size());
+      for (unsigned int i = 0; i < proc_hist.size(); ++i) {
+         buffer[i] = proc_hist[i];
+      }
+   }
+
+   /*!
+    * @brief Set attributes according to data in int buffer.
+    *
+    * This is the opposite of putToIntBuffer().  Number of ints read
+    * is given by what commBufferSize() AFTER this method is called.
+    */
+   void getFromIntBuffer(
+      const int* buffer) {
+      const tbox::Dimension& dim(mapped_box.getDim());
+      mapped_box.getFromIntBuffer(buffer);
+      buffer += MappedBox::commBufferSize(dim);
+      orig_mapped_box.getFromIntBuffer(buffer);
+      buffer += MappedBox::commBufferSize(dim);
+      load = *(buffer++);
+      proc_hist.clear();
+      proc_hist.insert(proc_hist.end(), *(buffer++), 0);
+      for (unsigned int i = 0; i < proc_hist.size(); ++i) {
+         proc_hist[i] = buffer[i];
+      }
+   }
+
+   //! @brief Stream-insert operator.
+   friend std::ostream&
+   operator << (
+      std::ostream& co,
+      const MappedBoxInTransit& r);
+};
+
+/*!
+ * @brief Comparison functor for sorting MappedBoxInTransit
+ * from bigger to smaller boxes.
+ */
+struct MappedBoxInTransitMoreLoad {
+   bool operator () (
+      const MappedBoxInTransit& a,
+      const MappedBoxInTransit& b) const {
+      if (a.getBox().size() != b.getBox().size()) {
+         return a.load > b.load;
+      }
+      return a.mapped_box < b.mapped_box;
+   }
+};
+
+/*!
+ * @brief Provides load balancing routines for AMR hierarchy by
+ * implemementing the LoadBalancerStrategy.
+ *
+ * Currently, only uniform load balancing is supported.  Eventually,
+ * non-uniform load balancing should be supported.  (Non-uniform load
+ * balancing is supported by the CutAndPackLoadBalancer class.)
+ *
+ * Inputs and their default values:
+ *
+ * No special inputs are required for this class.
+ *
+ * @verbatim
+ * report_load_balance = TRUE // Write out load balance report in log
+ * n_root_cycles = -1         // Number of root cycles to use for
+ *                            // reaching final partitioning. Nominally 1.
+ *                            // Can be set higher to reduce negative
+ *                            // performance effects of very poor initial
+ *                            // load balance.  Set to -1 for "automatic".
+ *                            // Set to zero to effectively bypass load balancing.
+ * balance_penalty_wt = 1.0   // Relative weight for computing combined box breaking
+ *                            // penalty:  How much to penalize imbalance.
+ * surface_penalty_wt = 1.0   // Relative weight for computing combined box breaking
+ *                            // penalty:  How much to penalize new surfaces.
+ * slender_penalty_wt = 1.0   // Relative weight for computing combined box breaking
+ *                            // penalty:  How much to penalize slender boxes.
+ * @endverbatim
+ *
+ * @see mesh::LoadBalanceStrategy
+ */
+
+class TreeLoadBalancer:
+   public LoadBalanceStrategy
+{
+public:
+
+   /*!
+    * @brief Initializing constructor sets object state to default or,
+    * if provided, to parameters in database.
+    *
+    * @param[in] dim
+    *
+    * @param[in] name User-defined std::string identifier used for error
+    * reporting and timer names.  If omitted, "TreeLoadBalancer"
+    * is used.
+    *
+    * @param[in] input_db (optional) database pointer providing
+    * parameters from input file.  This pointer may be null indicating
+    * no input is used.
+    */
+   TreeLoadBalancer(
+      const tbox::Dimension& dim,
+      const std::string& name = std::string("TreeLoadBalancer"),
+      tbox::Pointer<tbox::Database> input_db =
+         tbox::Pointer<tbox::Database>(NULL));
+
+   /*!
+    * @brief Virtual destructor releases all internal storage.
+    */
+   virtual ~TreeLoadBalancer();
+
+   /*!
+    * @brief Set the internal communicator to a duplicate of the given
+    * communicator.
+    *
+    * The given communicator must be a valid communicator.
+    *
+    * The given communicator is duplicated for private use.  This
+    * requires a global communication, so all processes in the
+    * communicator must call it.  The advantage of a duplicate
+    * communicator is that it ensures the communications for the
+    * object won't accidentally interact with other communications.
+    *
+    * If the duplicate MPI communicator it is set, the
+    * TreeLoadBalancer will only balance MappedBoxLevels with
+    * congruent SAMRAI_MPI objects and will use the duplicate
+    * communicator for communications.  Otherwise, the communicator of
+    * the MappedBoxLevel will be used.  The duplicate MPI communicator
+    * is freed when the object is destructed, or freeMPICommunicator()
+    * is called.
+    *
+    * TODO: For uniformity, we should pass in a SAMRAI_MPI instead of
+    * a communicator.  This class is the only one that still uses the
+    * communicator instead of the SAMRAI_MPI.
+    */
+   void
+   setSAMRAI_MPI(
+      const tbox::SAMRAI_MPI& samrai_mpi);
+
+   /*!
+    * @brief Free the internal MPI communicator, if any has been set.
+    *
+    * @see setSAMRAI_MPI().
+    */
+   void
+   freeMPICommunicator();
+
+   /*!
+    * @brief Configure the load balancer to use the data stored
+    * in the hierarchy at the specified descriptor index
+    * for estimating the workload on each cell.
+    *
+    * Note: This method currently does not affect the results because
+    * this class does not yet support uniform load balancing.
+    *
+    * @param data_id
+    * Integer value of patch data identifier for workload
+    * estimate on each cell.  An invalid value (i.e., < 0)
+    * indicates that a spatially-uniform work estimate
+    * will be used.  The default value is -1 (undefined)
+    * implying the uniform work estimate.
+    *
+    * @param level_number
+    * Optional integer number for level on which data id
+    * is used.  If no value is given, the data will be
+    * used for all levels.
+    */
+   void
+   setWorkloadPatchDataIndex(
+      int data_id,
+      int level_number = -1);
+
+   /*!
+    * @brief Configure the load balancer to load balance boxes by
+    * assuming all cells on the specified level or all hierarchy
+    * levels are weighted equally.
+    *
+    * @param level_number
+    * Optional integer number for level on which uniform
+    * workload estimate will be used.  If the level
+    * number is not specified, a uniform workload
+    * estimate will be used on all levels.
+    */
+   void
+   setUniformWorkload(
+      int level_number = -1);
+
+   /*!
+    * @brief Return true if load balancing procedure for given level
+    * depends on patch data on mesh; otherwise return false.
+    *
+    * This can be used to determine whether a level needs to be
+    * rebalanced although its box configuration is unchanged.  This
+    * function is pure virtual in the LoadBalanceStrategy base class.
+    *
+    * @param[in] level_number  Integer patch level number.
+    */
+   bool
+   getLoadBalanceDependsOnPatchData(
+      int level_number) const;
+
+   /*!
+    * @copydoc LoadBalanceStrategy::loadBalanceMappedBoxLevel()
+    *
+    * Note: This implementation does not yet support non-uniform load
+    * balancing.
+    */
+   void
+   loadBalanceMappedBoxLevel(
+      hier::MappedBoxLevel& balance_mapped_box_level,
+      hier::Connector& balance_to_anchor,
+      hier::Connector& anchor_to_balance,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int level_number,
+      const hier::Connector& unbalanced_to_attractor,
+      const hier::Connector& attractor_to_unbalanced,
+      const hier::IntVector& min_size,
+      const hier::IntVector& max_size,
+      const hier::MappedBoxLevel& domain_mapped_box_level,
+      const hier::IntVector& bad_interval,
+      const hier::IntVector& cut_factor,
+      const tbox::RankGroup& = tbox::RankGroup()) const;
+
+   /*!
+    * @brief Print out all members of the class instance to given
+    * output stream.
+    *
+    * @param[in] output_stream
+    */
+   virtual void
+   printClassData(
+      std::ostream& output_stream) const;
+
+   /*!
+    * @brief Write out statistics recorded for the most recent load
+    * balancing result.
+    *
+    * @param[in] output_stream
+    */
+   void
+   printStatistics(
+      std::ostream& output_stream = tbox::plog) const;
+
+
+private:
+
+   typedef hier::MappedBox MappedBox;
+
+   typedef hier::LocalId LocalId;
+
+   typedef hier::MappedBoxLevel MappedBoxLevel;
+
+   typedef mesh::MappedBoxInTransitMoreLoad MappedBoxInTransitMoreLoad;
+
+   // The following are not implemented, but are provided here for
+   // dumb compilers.
+
+   TreeLoadBalancer(
+      const TreeLoadBalancer&);
+
+   void
+   operator = (
+      const TreeLoadBalancer&);
+
+   /*!
+    * @brief A set of MappedBoxInTransit, sorted from highest load to lowest load.
+    */
+   typedef std::set<MappedBoxInTransit, MappedBoxInTransitMoreLoad> TransitSet;
+
+   /*!
+    * @brief Data to save for each processor.
+    */
+   struct SubtreeLoadData {
+      SubtreeLoadData():num_procs(0),
+         total_work(0),
+         load_exported(0),
+         load_imported(0) {
+      }
+      /*!
+       * @brief Number of nodes in child's subtree
+       * (unused for parent's data).
+       */
+      int num_procs;
+      /*!
+       * @brief Current total work amount in child's subtree
+       */
+      int total_work;
+      /*!
+       * @brief Work exported (or scheduled for export) to nonlocal process.
+       *
+       * Value is often used to determine if more communication is needed.
+       *
+       * For local data, this refers to the work exported to parent.
+       */
+      int load_exported;
+      /*!
+       * @brief Work imported from nonlocal process.
+       *
+       * Value is often used to determine if more communication is needed.
+       *
+       * For local data, this refers to the work imported from parent.
+       */
+      int load_imported;
+      /*!
+       * @brief Ideal work amount in subtree
+       */
+      int ideal_work;
+      /*!
+       * @brief Nodes to export.
+       *
+       * For local data, this refers to exporting to parent.
+       */
+      TransitSet for_export;
+   };
+
+   void
+   assertNoMessageForPrivateCommunicator() const;
+
+   /*
+    * Read parameters from input database.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db);
+
+   void
+   sortIntVector(
+      hier::IntVector& order,
+      const hier::IntVector& vector) const;
+
+   /*!
+    * Move MappedBoxes in balance_mapped_box_level from ranks outside of
+    * rank_group to ranks inside rank_group.  Modify the given connectors
+    * to make them correct following this moving of boxes.
+    */
+   void
+   prebalanceMappedBoxLevel(
+      hier::MappedBoxLevel& balance_mapped_box_level,
+      hier::Connector& balance_to_anchor,
+      hier::Connector& anchor_to_balance,
+      const tbox::RankGroup& rank_group) const;
+
+   /*!
+    * @brief Reassign loads from one TransitSet to another.
+    *
+    * @param ideal_transfer Amount of load to reassign from src to
+    * dst.  If negative, reassign the load from dst to src.
+    *
+    * @param actual_transfer Amount of load transfered.  If positive,
+    * transfer load from src to dst (if negative, from dst to src).
+    *
+    * @param next_available_index Index for guaranteeing new
+    * MappedBoxes are uniquely numbered.
+    */
+   void
+   reassignLoads(
+      TransitSet& src,
+      TransitSet& dst,
+      const int ideal_transfer,
+      int& actual_transfer,
+      hier::LocalId& next_available_index) const;
+
+   /*
+    * @brief Shift load from src to dst by swapping MappedBoxInTransit
+    * between them.
+    *
+    * @param ideal_transfer Amount of load to reassign from src to
+    * dst.  If negative, reassign the load from dst to src.
+    *
+    * @param actual_transfer Amount of load transfered.  If positive,
+    * transfer load from src to dst (if negative, from dst to src).
+    *
+    * @param actual_transfer Amount of load transfered.  If positive,
+    * transfer load from src to dst (if negative, from dst to src).
+    */
+   bool
+   shiftLoadsBySwapping(
+      TransitSet& src,
+      TransitSet& dst,
+      const int ideal_transfer,
+      int& actual_transfer) const;
+
+   /*
+    * @brief Shift load from src to dst by various box breaking strategies.
+    * choosing the break that gives the best overall penalty.
+    *
+    * @param ideal_transfer Amount of load to reassign from src to
+    * dst.  If negative, reassign the load from dst to src.
+    *
+    * @param actual_transfer Amount of load transfered.  If positive,
+    * transfer load from src to dst (if negative, from dst to src).
+    *
+    * @param next_available_index Index for guaranteeing new
+    * MappedBoxes are uniquely numbered.
+    */
+   bool
+   shiftLoadsByBreaking(
+      TransitSet& src,
+      TransitSet& dst,
+      const int ideal_transfer,
+      int& actual_transfer,
+      hier::LocalId& next_available_index) const;
+
+   bool
+   findLoadSwapPair(
+      TransitSet& src,
+      TransitSet& dst,
+      const int ideal_transfer,
+      int& actual_transfer,
+      TransitSet::iterator& isrc,
+      TransitSet::iterator& idst) const;
+
+   /*!
+    * @brief Pack load/boxes for sending.
+    */
+   void
+   packSubtreeLoadData(
+      std::vector<int>& msg,
+      const SubtreeLoadData& load_data) const;
+
+   /*!
+    * @brief Unpack load/boxes received.
+    */
+   void
+   unpackSubtreeLoadData(
+      const int* received_data,
+      int received_data_length,
+      SubtreeLoadData& proc_data,
+      TransitSet& receiving_bin,
+      hier::LocalId& next_available_index) const;
+
+   void
+   packNeighborhoodSetMessages(
+      std::vector<int> messages[],
+      hier::Connector& unbalanced_to_balanced,
+      const TransitSet& mapped_boxes_in_transit,
+      const std::vector<int>& peer_ranks) const;
+
+   void
+   unpackAndRouteNeighborhoodSets(
+      const int* received_data,
+      int received_data_length,
+      std::vector<int> outgoing_messages[],
+      hier::Connector& unbalanced_to_balanced,
+      const std::vector<int>& peer_ranks) const;
+
+   /*!
+    * @brief Break off a given load size from a given MappedBox.
+    *
+    * Try various breaking schemes and choose the best one.  This
+    * method always return a breakage if at all possible, without
+    * considering whether the break should be used.  For example,
+    * requesting breakage of 1 cell in a 100x100 box will return a
+    * breakage of 100 cells!  The decision to use such a breakage
+    * requires context that breakOffLoad does not have.
+    *
+    * @param mapped_box MappedBox to break.
+    * @param @ideal_load_to_break Ideal load to break.
+    * This is not guaranteed to be met.  The actual
+    * amount broken off may be slightly over or under.
+    * @param breakoff Boxes broken off (usually just one).
+    * @parem leftover Remainder of MappedBox after breakoff is gone.
+    */
+   bool
+   breakOffLoad(
+      const MappedBox& mapped_box,
+      double ideal_load_to_break,
+      std::vector<hier::Box>& breakoff,
+      std::vector<hier::Box>& leftover,
+      double& brk_load) const;
+
+   /*!
+    * @brief Computes surface area of a list of boxes.
+    */
+   double
+   computeBoxSurfaceArea(
+      const std::vector<hier::Box>& boxes) const;
+
+   /*!
+    * @brief Computes the surface area of a box.
+    */
+   int
+   computeBoxSurfaceArea(
+      const hier::Box& box) const;
+
+   double
+   combinedBreakingPenalty(
+      double balance_penalty,
+      double surface_penalty,
+      double slender_penalty) const;
+
+   double
+   shapePenaltyLimiter(
+      double box_volume) const;
+
+   double
+   computeBalancePenalty(
+      const std::vector<hier::Box>& a,
+      const std::vector<hier::Box>& b,
+      double off_balance) const;
+   double
+   computeBalancePenalty(
+      const TransitSet& a,
+      const TransitSet& b,
+      double off_balance) const;
+   double
+   computeBalancePenalty(
+      const hier::Box& a,
+      double off_balance) const;
+
+   double
+   computeSurfacePenalty(
+      const std::vector<hier::Box>& a,
+      const std::vector<hier::Box>& b) const;
+   double
+   computeSurfacePenalty(
+      const TransitSet& a,
+      const TransitSet& b) const;
+   double
+   computeSurfacePenalty(
+      const hier::Box& a) const;
+
+   double
+   computeSlenderPenalty(
+      const std::vector<hier::Box>& a,
+      const std::vector<hier::Box>& b) const;
+   double
+   computeSlenderPenalty(
+      const TransitSet& a,
+      const TransitSet& b) const;
+   double
+   computeSlenderPenalty(
+      const hier::Box& a) const;
+
+   bool
+   breakOffLoad_planar(
+      const MappedBox& mapped_box,
+      double ideal_load_to_break,
+      const tbox::Array<tbox::Array<bool> >& bad_cuts,
+      std::vector<hier::Box>& breakoff,
+      std::vector<hier::Box>& leftover,
+      double& brk_load) const;
+
+   bool
+   breakOffLoad_cubic1(
+      const MappedBox& mapped_box,
+      double ideal_load_to_give,
+      const tbox::Array<tbox::Array<bool> >& bad_cuts,
+      std::vector<hier::Box>& breakoff,
+      std::vector<hier::Box>& leftover,
+      double& brk_load) const;
+
+   void
+   burstBox(
+      const hier::Box& bursty,
+      const hier::Box& solid,
+      std::vector<hier::Box>& boxes) const;
+
+   /*
+    * Utility functions to determine parameter values for level.
+    */
+   int
+   getWorkloadDataId(
+      int level_number) const;
+
+   /*!
+    * @brief Compute the load for a MappedBox.
+    */
+   double
+   computeLoad(
+      const hier::MappedBox& mapped_box) const;
+
+   /*!
+    * @brief Compute the load for the MappedBox where it intersects the given box.
+    */
+   double
+   computeLoad(
+      const hier::MappedBox& mapped_box,
+      const hier::Box& box) const;
+
+   /*
+    * Count the local workload.
+    */
+   double
+   computeLocalLoads(
+      const hier::MappedBoxLevel& mapped_box_level) const;
+
+   /*!
+    * @brief Load balance within a subset of the communicator.
+    */
+   void
+   loadBalanceMappedBoxLevel_rootCycle(
+      const int cycle_number,
+      const int number_of_cycles,
+      const double local_load,
+      const double global_sum_load,
+      const hier::MappedBoxLevel& unbalanced_mapped_box_level,
+      const tbox::RankGroup& rank_group,
+      hier::MappedBoxLevel& balanced_mapped_box_level,
+      hier::Connector& unbalanced_to_balanced,
+      hier::Connector& balanced_to_unbalanced) const;
+
+   /*!
+    * @brief Create mapping to break up oversized boxes.
+    *
+    * The mapping is entirely local (no transfering of work).
+    */
+   void
+   mapOversizedBoxes(
+      const hier::MappedBoxLevel& unconstrained,
+      hier::MappedBoxLevel& constrained,
+      hier::Connector& unconstrained_to_constrained) const;
+
+   /*!
+    * @brief Create the rank groups that load-balances within their membership
+    * and ignores other groups.
+    */
+   void
+   createBalanceSubgroups(
+      const int cycle_number,
+      const int number_of_cycles,
+      const tbox::RankGroup& rank_group,
+      int& g_count,
+      int& g_id,
+      int& g_rank,
+      int& g_nproc,
+      int& num_children,
+      tbox::AsyncCommPeer<int> *& child_comms,
+      tbox::AsyncCommPeer<int> *& parent_send,
+      tbox::AsyncCommPeer<int> *& parent_recv,
+      tbox::AsyncCommStage& comm_stage) const;
+
+   void
+   destroyBalanceSubgroups(
+      tbox::AsyncCommPeer<int> *& child_comms,
+      tbox::AsyncCommPeer<int> *& parent_send,
+      tbox::AsyncCommPeer<int> *& parent_recv) const;
+
+   void
+   setShadowData(
+      const hier::IntVector& min_size,
+      const hier::IntVector& max_size,
+      const hier::MappedBoxLevel& domain_mapped_box_level,
+      const hier::IntVector& bad_interval,
+      const hier::IntVector& cut_factor,
+      const hier::IntVector& refinement_ratio) const;
+   void
+   unsetShadowData() const;
+
+   /*!
+    * @brief Set up timers for the object.
+    */
+   void
+   setTimers();
+
+   /*
+    * Object dimension.
+    */
+   const tbox::Dimension d_dim;
+
+   /*
+    * String identifier for load balancer object.
+    */
+   std::string d_object_name;
+
+   //! @brief Duplicated communicator object.  See setSAMRAI_MPI().
+   tbox::SAMRAI_MPI d_mpi_dup;
+
+   int d_n_root_cycles;
+
+   const int d_degree;
+
+   /*
+    * Values for workload estimate data, workload factor, and bin pack method
+    * used on individual levels when specified as such.
+    */
+   tbox::Array<int> d_workload_data_id;
+
+   int d_master_workload_data_id;
+
+   /*!
+    * @brief Weighting factor for penalizing imbalance.
+    *
+    * @see combinedBreakingPenalty().
+    */
+   double d_balance_penalty_wt;
+
+   /*!
+    * @brief Weighting factor for penalizing new suraces.
+    *
+    * @see combinedBreakingPenalty().
+    */
+   double d_surface_penalty_wt;
+
+   /*!
+    * @brief Weighting factor for penalizing slenderness.
+    *
+    * @see combinedBreakingPenalty().
+    */
+   double d_slender_penalty_wt;
+
+   /*!
+    * @brief How high a slenderness ratio we can tolerate before penalizing.
+    */
+   double d_slender_penalty_threshold;
+
+   /*!
+    * @brief Extra penalty weighting applied before cutting.
+    *
+    * Set to range [1,ininity).
+    * Higher value forces more agressive cutting but can produce more slivers.
+    */
+   double d_precut_penalty_wt;
+
+   //@{
+   //! @name Data shared with private methods during balancing.
+   mutable tbox::SAMRAI_MPI d_mpi;
+   mutable int d_rank;
+   mutable int d_nproc;
+   mutable hier::IntVector d_min_size;
+   mutable hier::IntVector d_max_size;
+   mutable hier::BoxArray d_domain_boxes;
+   mutable hier::IntVector d_bad_interval;
+   mutable hier::IntVector d_cut_factor;
+   mutable double d_global_avg_load;
+   //@}
+
+   mutable tbox::Array<int> d_output_procs;
+   bool d_using_all_procs;
+
+   /*!
+    * @brief Whether to immediately report the results of the load balancing cycles
+    * in the log files.
+    */
+   bool d_report_load_balance;
+
+   //@{
+   //! @name Used for evaluating peformance.
+   bool d_barrier_before;
+   bool d_barrier_after;
+   //@}
+
+   static const int d_default_data_id;
+
+   /*
+    * Performance timers.
+    */
+   tbox::Pointer<tbox::Timer> t_load_balance_mapped_box_level;
+   tbox::Pointer<tbox::Timer> t_get_map;
+   tbox::Pointer<tbox::Timer> t_use_map;
+   tbox::Pointer<tbox::Timer> t_constrain_size;
+   tbox::Pointer<tbox::Timer> t_map_big_boxes;
+   tbox::Pointer<tbox::Timer> t_compute_local_load;
+   tbox::Pointer<tbox::Timer> t_compute_global_load;
+   tbox::Pointer<tbox::Timer> t_compute_tree_load;
+   tbox::Pointer<tbox::Timer> t_compute_tree_load0;
+   tbox::Pointer<tbox::Timer> t_compute_tree_load1;
+   tbox::Pointer<tbox::Timer> t_compute_tree_load2;
+   tbox::Pointer<tbox::Timer> t_reassign_loads;
+   tbox::Pointer<tbox::Timer> t_shift_loads_by_swapping;
+   tbox::Pointer<tbox::Timer> t_shift_loads_by_breaking;
+   tbox::Pointer<tbox::Timer> t_find_swap_pair;
+   tbox::Pointer<tbox::Timer> t_break_off_load;
+   tbox::Pointer<tbox::Timer> t_find_bad_cuts;
+   tbox::Pointer<tbox::Timer> t_send_load_to_children;
+   tbox::Pointer<tbox::Timer> t_send_load_to_parent;
+   tbox::Pointer<tbox::Timer> t_get_load_from_children;
+   tbox::Pointer<tbox::Timer> t_get_load_from_parent;
+   tbox::Pointer<tbox::Timer> t_send_edge_to_children;
+   tbox::Pointer<tbox::Timer> t_send_edge_to_parent;
+   tbox::Pointer<tbox::Timer> t_get_edge_from_children;
+   tbox::Pointer<tbox::Timer> t_get_edge_from_parent;
+   tbox::Pointer<tbox::Timer> t_report_loads;
+   tbox::Pointer<tbox::Timer> t_local_balancing;
+   tbox::Pointer<tbox::Timer> t_local_edges;
+   tbox::Pointer<tbox::Timer> t_finish_comms;
+   tbox::Pointer<tbox::Timer> t_misc1;
+   tbox::Pointer<tbox::Timer> t_misc2;
+   tbox::Pointer<tbox::Timer> t_misc3;
+   tbox::Pointer<tbox::Timer> t_pack_load;
+   tbox::Pointer<tbox::Timer> t_unpack_load;
+   tbox::Pointer<tbox::Timer> t_pack_edge;
+   tbox::Pointer<tbox::Timer> t_unpack_edge;
+   tbox::Pointer<tbox::Timer> t_children_load_comm;
+   tbox::Pointer<tbox::Timer> t_parent_load_comm;
+   tbox::Pointer<tbox::Timer> t_children_edge_comm;
+   tbox::Pointer<tbox::Timer> t_parent_edge_comm;
+   tbox::Pointer<tbox::Timer> t_barrier_before;
+   tbox::Pointer<tbox::Timer> t_barrier_after;
+   tbox::Pointer<tbox::Timer> t_MPI_wait;
+
+   /*
+    * Statistics on number of cells and patches generated.
+    */
+   mutable std::vector<double> d_load_stat;
+   mutable std::vector<int> d_box_count_stat;
+
+   // Extra checks independent of optimization/debug.
+   static char s_print_steps;
+   static char s_print_break_steps;
+   static char s_print_swap_steps;
+   static char s_print_edge_steps;
+   static char s_check_connectivity;
+   static char s_check_map;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/mesh/TreeLoadBalancer.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/dox/manual.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/dox/manual.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,28 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace mesh {
+
+/*!
+  @page package_mesh The Mesh Package
+ 
+  The Mesh package provides basic support for constructing and dynamically
+  regridding a structured AMR patch hierarchy.  This support is
+  divided into four categories:
+  -# @ref package_mesh_gridding "AMR patch hierarchy construction and dynamic regridding"
+  -# @ref package_mesh_load_balance "load balancing routines"
+  -# @ref package_mesh_clustering "clustering cells into logically-rectangular regions"
+  -# @ref package_mesh_multiblock "dynamic regridding for multiblock hierarchies"
+  
+  All class names in the Mesh package are in the namespace SAMRAI::mesh. 
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/dox/manual_clustering.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/dox/manual_clustering.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,27 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace mesh {
+
+/*!
+  @page package_mesh_clustering Box Generation
+
+  These classes are used to generate a union of boxes covering a collection 
+  of tagged cells on a single AMR.  The procedure implemented here includes
+  some extensions to the algorithm introduced by Berger and Rigoutsos.
+  - SAMRAI::mesh::BergerRigoutsos
+  - SAMRAI::mesh::BoxGeneratorStrategy
+  - SAMRAI::mesh::HistogramBox
+  - SAMRAI::mesh::AsyncBergerRigoutsos.h
+  - SAMRAI::mesh::AsyncBergerRigoutsosNode.h
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/dox/manual_gridding.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/dox/manual_gridding.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,37 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace mesh {
+
+/*!
+  @page package_mesh_gridding Patch Hierarchy Construction and Adaptive Meshing 
+
+  The gridding algorithm classes provid patch hierarchy generation and 
+  regridding routines that apply to a variety of structured adaptive 
+  mesh refinement problems.  Specifically, the gridding class can be used
+  to generate individual levels in an AMR patch hierarchy at the beginning 
+  of a simulation and to regrid collections of levels during an adaptive 
+  calculation.  Other classes are provided to apply different methods for
+  selecting cells for refinement on the patch hierarchy.   These include
+  basic gradient detection and Richardson extrapolation.
+
+  The gridding class is coupled to application-specific routines that 
+  initialize data on new levels and identify cells for refinement on each 
+  level via the Strategy object-oriented design pattern.  The gridding 
+  class is coupled to particular load balancing and cell clustering routines 
+  using this pattern as well.  
+  - SAMRAI::mesh::GriddingAlgorithm
+  - SAMRAI::mesh::TagAndInitializeStrategy
+  - SAMRAI::mesh::StandardTagAndInitialize
+  - SAMRAI::mesh::StandardTagAndInitStrategy
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/dox/manual_load_balance.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/dox/manual_load_balance.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,39 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace mesh {
+
+/*!
+  @page package_mesh_load_balance Load Balancing
+
+  These classes are used to determine a how the set of patches on each
+  patch level in an AMR hierarchy is built and how those patches will
+  be distributed across processors on a parallel machine.  Given a collection
+  of boxes whose union represents the domain of a level, these routines 
+  construct another set of boxes and a mapping of each box to a processor.
+  The new hierarchy level will be constructed using this information.
+  In other words, the load balance routines attempt to distribute work
+  across processors according to a set of prescribed parameters.  Currently 
+  available routines use spatially-uniform and non-uniform workload 
+  distributions.  For a spatially-uniform work distribution, the workload 
+  estimate for each box is proportional to the number of cells in the box.  
+  For the non-uniform work distribution routines, the workload is determined
+  by the user who specifies a numerical value for each cell (e.g., the 
+  amount of work needed to update the solution in the cell).  In addition, 
+  load balancing routines attempt to assign patches near each other in 
+  space to the same processor when possible.
+  - SAMRAI::mesh::LoadBalancer
+  - SAMRAI::mesh::LoadBalanceStrategy
+  - SAMRAI::mesh::BalanceUtilities
+  - SAMRAI::mesh::SpatialKey
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/dox/manual_multiblock.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/dox/manual_multiblock.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,22 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace mesh {
+
+/*!
+  @page package_mesh_multiblock Multiblock Hierarchy Construction and Adaptive Meshing 
+
+  A gridding algorithm is provided for multiblock hierarchies.
+  - SAMRAI::mesh::MultiblockGriddingAlgorithm
+  - SAMRAI::mesh::MultiblockGriddingTagger
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/fortran/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/fortran/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,47 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=mesh_coarsentags1d.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h mesh_coarsentags1d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=mesh_coarsentags2d.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h mesh_coarsentags2d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=mesh_coarsentags3d.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h mesh_coarsentags3d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/fortran/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/fortran/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,31 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for fortran files for mesh directory 
+##
+#########################################################################
+
+SAMRAI	      =	@top_srcdir@
+SRCDIR	      =	@srcdir@
+SUBDIR        = source/SAMRAI/mesh/fortran
+VPATH	      =	@srcdir@
+OBJECT        = ../../../..
+
+# For classes that are non-dimensional.
+OBJS= 	 mesh_coarsentags1d.o mesh_coarsentags2d.o\
+	mesh_coarsentags3d.o\
+
+
+default: library
+
+include $(OBJECT)/config/Makefile.config
+
+library: $(OBJS)
+
+clean:
+	$(SAMCLEAN)
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/fortran/mesh_coarsentags1d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/fortran/mesh_coarsentags1d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,65 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/mesh/fortran/mesh_coarsentags1d.m4 $
+c  Package:     SAMRAI mesh
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Release:     
+c  Revision:    
+c  Modified:    
+c  Description: F77 routines for coarsening 1d integer tag values.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim1d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 1d arrays in FORTRAN routines.
+c
+c
+c***********************************************************************
+c Constant averaging for 1d cell-centered int tag data. The operation
+c uses the rule that if any value on the fine mesh contained in a cell of 
+c the coarse mesh is not equal to zero, the value on the coarse mesh is 
+c set to one.
+c***********************************************************************
+c
+      subroutine coarsentags1d(
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      integer zero, one
+      parameter (zero=0)
+      parameter (one=1)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:1-1)
+      integer
+     &  arrayf(filo0:fihi0),
+     &  arrayc(cilo0:cihi0)
+      integer ic0,if0,ir0
+c
+c***********************************************************************
+c
+
+      do ic0=ifirstc0,ilastc0
+         arrayc(ic0) = zero
+      enddo
+
+      do ir0=0,ratio(0)-1
+         do ic0=ifirstc0,ilastc0
+            if0=ic0*ratio(0)+ir0
+            if (arrayf(if0) .ne. zero) 
+     &         arrayc(ic0)=one
+         enddo
+      enddo
+c
+      return
+      end
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/fortran/mesh_coarsentags1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/fortran/mesh_coarsentags1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,60 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/mesh/fortran/mesh_coarsentags1d.m4 $
+c  Package:     SAMRAI mesh
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Release:     
+c  Revision:    
+c  Modified:    
+c  Description: F77 routines for coarsening 1d integer tag values.
+c
+define(NDIM,1)dnl
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim1d.i)dnl
+c
+c***********************************************************************
+c Constant averaging for 1d cell-centered int tag data. The operation
+c uses the rule that if any value on the fine mesh contained in a cell of 
+c the coarse mesh is not equal to zero, the value on the coarse mesh is 
+c set to one.
+c***********************************************************************
+c
+      subroutine coarsentags1d(
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      integer zero, one
+      parameter (zero=0)
+      parameter (one=1)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:NDIM-1)
+      integer
+     &  arrayf(CELL1d(filo,fihi,0)),
+     &  arrayc(CELL1d(cilo,cihi,0))
+      integer ic0,if0,ir0
+c
+c***********************************************************************
+c
+
+      do ic0=ifirstc0,ilastc0
+         arrayc(ic0) = zero
+      enddo
+
+      do ir0=0,ratio(0)-1
+         do ic0=ifirstc0,ilastc0
+            if0=ic0*ratio(0)+ir0
+            if (arrayf(if0) .ne. zero) 
+     &         arrayc(ic0)=one
+         enddo
+      enddo
+c
+      return
+      end
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/fortran/mesh_coarsentags2d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/fortran/mesh_coarsentags2d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,73 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/mesh/fortran/mesh_coarsentags2d.m4 $
+c  Package:     SAMRAI mesh
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Release:     
+c  Revision:    
+c  Modified:    
+c  Description:    F77 routines for coarsening 2d integer tag values.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim2d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 2d arrays in FORTRAN routines.
+c
+c
+c***********************************************************************
+c Constant averaging for 2d cell-centered double data.   The operation
+c uses the rule that if any value on the fine mesh contained in a cell of 
+c the coarse mesh is not equal to zero, the value on the coarse mesh is 
+c set to one.
+c***********************************************************************
+c
+      subroutine coarsentags2d(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      integer zero, one
+      parameter (zero=0)
+      parameter (one=1)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      integer
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1)
+      integer ic0,ic1,if0,if1,ir0,ir1
+c
+c***********************************************************************
+c
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            arrayc(ic0,ic1)=zero
+         enddo
+      enddo
+
+      do ir1=0,ratio(1)-1
+         do ir0=0,ratio(0)-1
+            do ic1=ifirstc1,ilastc1
+               if1=ic1*ratio(1)+ir1
+               do ic0=ifirstc0,ilastc0
+                  if0=ic0*ratio(0)+ir0
+                  if (arrayf(if0,if1) .ne. zero)
+     &               arrayc(ic0,ic1)=one
+               enddo
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/fortran/mesh_coarsentags2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/fortran/mesh_coarsentags2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,66 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/mesh/fortran/mesh_coarsentags2d.m4 $
+c  Package:     SAMRAI mesh
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Release:     
+c  Revision:    
+c  Modified:    
+c  Description:    F77 routines for coarsening 2d integer tag values.
+c
+define(NDIM,2)dnl
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+c
+c***********************************************************************
+c Constant averaging for 2d cell-centered double data.   The operation
+c uses the rule that if any value on the fine mesh contained in a cell of 
+c the coarse mesh is not equal to zero, the value on the coarse mesh is 
+c set to one.
+c***********************************************************************
+c
+      subroutine coarsentags2d(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      integer zero, one
+      parameter (zero=0)
+      parameter (one=1)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:NDIM-1)
+      integer
+     &  arrayf(CELL2d(filo,fihi,0)),
+     &  arrayc(CELL2d(cilo,cihi,0))
+      integer ic0,ic1,if0,if1,ir0,ir1
+c
+c***********************************************************************
+c
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            arrayc(ic0,ic1)=zero
+         enddo
+      enddo
+
+      do ir1=0,ratio(1)-1
+         do ir0=0,ratio(0)-1
+            do ic1=ifirstc1,ilastc1
+               if1=ic1*ratio(1)+ir1
+               do ic0=ifirstc0,ilastc0
+                  if0=ic0*ratio(0)+ir0
+                  if (arrayf(if0,if1) .ne. zero)
+     &               arrayc(ic0,ic1)=one
+               enddo
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/fortran/mesh_coarsentags3d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/fortran/mesh_coarsentags3d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,83 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/mesh/fortran/mesh_coarsentags3d.m4 $
+c  Package:     SAMRAI mesh
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Release:     
+c  Revision:    
+c  Modified:    
+c  Description:    F77 routines for coarsening 3d integer tag values.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim3d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 3d arrays in FORTRAN routines.
+c
+c
+c***********************************************************************
+c Constant averaging for 3d cell-centered double data.   The operation
+c uses the rule that if any value on the fine mesh contained in a cell of 
+c the coarse mesh is not equal to zero, the value on the coarse mesh is 
+c set to one.
+c***********************************************************************
+c
+      subroutine coarsentags3d(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      integer zero, one
+      parameter (zero=0)
+      parameter (one=1)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      integer
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1,
+     &          filo2:fihi2),
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2)
+      integer ic0,ic1,ic2,if0,if1,if2,ir0,ir1,ir2
+c
+c***********************************************************************
+c
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            do ic0=ifirstc0,ilastc0
+               arrayc(ic0,ic1,ic2)=zero
+            enddo
+         enddo
+      enddo
+
+      do ir2=0,ratio(2)-1
+         do ir1=0,ratio(1)-1
+            do ir0=0,ratio(0)-1
+               do ic2=ifirstc2,ilastc2
+                  if2=ic2*ratio(2)+ir2
+                  do ic1=ifirstc1,ilastc1
+                     if1=ic1*ratio(1)+ir1
+                     do ic0=ifirstc0,ilastc0
+                        if0=ic0*ratio(0)+ir0
+                        if (arrayf(if0,if1,if2) .ne. zero) 
+     &                     arrayc(ic0,ic1,ic2) = one
+                     enddo
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/mesh/fortran/mesh_coarsentags3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/mesh/fortran/mesh_coarsentags3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,74 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/mesh/fortran/mesh_coarsentags3d.m4 $
+c  Package:     SAMRAI mesh
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Release:     
+c  Revision:    
+c  Modified:    
+c  Description:    F77 routines for coarsening 3d integer tag values.
+c
+define(NDIM,3)dnl
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+c
+c***********************************************************************
+c Constant averaging for 3d cell-centered double data.   The operation
+c uses the rule that if any value on the fine mesh contained in a cell of 
+c the coarse mesh is not equal to zero, the value on the coarse mesh is 
+c set to one.
+c***********************************************************************
+c
+      subroutine coarsentags3d(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      integer zero, one
+      parameter (zero=0)
+      parameter (one=1)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:NDIM-1)
+      integer
+     &  arrayf(CELL3d(filo,fihi,0)),
+     &  arrayc(CELL3d(cilo,cihi,0))
+      integer ic0,ic1,ic2,if0,if1,if2,ir0,ir1,ir2
+c
+c***********************************************************************
+c
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            do ic0=ifirstc0,ilastc0
+               arrayc(ic0,ic1,ic2)=zero
+            enddo
+         enddo
+      enddo
+
+      do ir2=0,ratio(2)-1
+         do ir1=0,ratio(1)-1
+            do ir0=0,ratio(0)-1
+               do ic2=ifirstc2,ilastc2
+                  if2=ic2*ratio(2)+ir2
+                  do ic1=ifirstc1,ilastc1
+                     if1=ic1*ratio(1)+ir1
+                     do ic0=ifirstc0,ilastc0
+                        if0=ic0*ratio(0)+ir0
+                        if (arrayf(if0,if1,if2) .ne. zero) 
+     &                     arrayc(ic0,ic1,ic2) = one
+                     enddo
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/ArrayData.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/ArrayData.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,951 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated array data structure supporting patch data types 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_ArrayData_C
+#define included_pdat_ArrayData_C
+
+#include "SAMRAI/tbox/MessageStream.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/pdat/ArrayDataOperationUtilities.h"
+#include "SAMRAI/pdat/CopyOperation.h"
+#include "SAMRAI/pdat/SumOperation.h"
+
+#define PDAT_ARRAYDATA_VERSION 1
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/ArrayData.I"
+#endif
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *
+ * Default constructor creates an object that absolutely should
+ * not be used until it is initialized using initializeArray().
+ *
+ *************************************************************************
+ */
+template<class TYPE>
+ArrayData<TYPE>::ArrayData():
+   d_dim(tbox::Dimension::getInvalidDimension()),
+   d_depth(0),
+   d_offset(0),
+   d_array(0)
+{
+}
+
+/*
+ *************************************************************************
+ *
+ * The main constructor allocates data for the given box and depth.  It
+ * does not initialize the memory.  The destructor automatically
+ * deallocates memory via the array destructor.
+ *
+ *************************************************************************
+ */
+
+template<class TYPE>
+ArrayData<TYPE>::ArrayData(
+   const hier::Box& box,
+   int depth):
+   d_dim(box.getDim()),
+   d_depth(depth),
+   d_offset(box.size()),
+   d_box(box),
+   d_array(d_depth * d_offset)
+{
+   TBOX_ASSERT(depth > 0);
+
+#ifdef DEBUG_INITIALIZE_UNDEFINED
+   undefineData();
+#endif
+}
+
+template<class TYPE>
+ArrayData<TYPE>::~ArrayData()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * The const constructor and assignment operator are not actually used	*
+ * but are defined here for compilers that require an implementation for	*
+ * every declaration.							*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+ArrayData<TYPE>::ArrayData(
+   const ArrayData<TYPE>& foo):
+   d_dim(foo.d_dim),
+   d_depth(0),
+   d_offset(0),
+   d_box(d_dim),
+   d_array(0)
+{
+   /*
+    * Throw an assertion if this method is used.
+    */
+   TBOX_ASSERT(true);
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void ArrayData<TYPE>::operator = (
+   const ArrayData<TYPE>& foo)
+{
+   /*
+    * Throw an assertion if this method is used.
+    */
+   TBOX_ASSERT(true);
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *
+ * Initialize the array using the specified box, depth.
+ *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void ArrayData<TYPE>::initializeArray(
+   const hier::Box& box,
+   int depth)
+{
+   TBOX_ASSERT(depth > 0);
+
+   d_dim = box.getDim();
+   d_depth = depth;
+   d_offset = box.size();
+   d_box = box;
+
+   /*
+    * If array is a different size then create a new one, otherwise
+    * just use existing array; there is no reason to
+    * deallocate/allocate if existing is the correct size.
+    *
+    * Also note that the array is not initialized to anything.  This is
+    * to avoid the performance hit of initializing but is potentially
+    * bad.  In debug mode will explicitly initialize the array.
+    *
+    * Performance timing of some sample applications (LinAdv) showed
+    * the impact of initialization was significant.  This is probably
+    * not the safest programming practice.
+    */
+   if (d_array.size() != depth * d_offset) {
+      d_array = tbox::Array<TYPE>(depth * d_offset,
+                                  tbox::Array<TYPE>::UNINITIALIZED);
+   }
+
+#ifdef DEBUG_INITIALIZE_UNDEFINED
+   undefineData();
+#endif
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Copy data between two array data objects on a specified box domain.	*
+ * Don't use C++ indexing member functions, since compilers are probably	*
+ * too stupid to do strength reduction on the loops to get performance.	*
+ *									*
+ * If the source box, destination box, and copy box are the same and the	*
+ * source and destination have the same depth, then perform a fast copy	*
+ * of all data.								*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void ArrayData<TYPE>::copy(
+   const ArrayData<TYPE>& src,
+   const hier::Box& box)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*this, src, box);
+
+   CopyOperation<TYPE> copyop;
+
+   /*
+    * Do a fast copy of data if all data aligns with copy region
+    */
+
+   if ((d_depth == src.d_depth) &&
+       (d_box == src.d_box) &&
+       (box == d_box)) {
+
+      TYPE * const dst_ptr = d_array.getPointer();
+      const TYPE * const src_ptr = src.d_array.getPointer();
+      const int n = d_offset * d_depth;
+      for (int i = 0; i < n; i++) {
+         copyop(dst_ptr[i], src_ptr[i]);
+      }
+
+   } else {
+
+      const hier::Box copybox = box * d_box * src.d_box;
+
+      if (!copybox.empty()) {
+
+         const int dst_start_depth = 0;
+         const int src_start_depth = 0;
+         const int num_depth = (d_depth < src.d_depth ? d_depth : src.d_depth);
+         const hier::IntVector src_shift(d_dim, 0);
+
+         ArrayDataOperationUtilities<TYPE, CopyOperation<TYPE> >::
+         doArrayDataOperationOnBox(*this,
+            src,
+            copybox,
+            src_shift,
+            dst_start_depth,
+            src_start_depth,
+            num_depth,
+            copyop);
+
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Copy data from source ArrayData object to this (destination)          *
+ * ArrayData object on given box domain.                                 *
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void ArrayData<TYPE>::copy(
+   const ArrayData<TYPE>& src,
+   const hier::Box& box,
+   const hier::IntVector& src_shift)
+{
+
+   if (src_shift == hier::IntVector::getZero(d_dim)) {
+
+      copy(src, box);
+
+   } else {
+
+      const hier::Box copybox =
+         box * d_box * hier::Box::shift(src.d_box, src_shift);
+
+      if (!copybox.empty()) {
+
+         const int dst_start_depth = 0;
+         const int src_start_depth = 0;
+         const int num_depth = (d_depth < src.d_depth ? d_depth : src.d_depth);
+
+         CopyOperation<TYPE> copyop;
+
+         ArrayDataOperationUtilities<TYPE, CopyOperation<TYPE> >::
+         doArrayDataOperationOnBox(*this,
+            src,
+            copybox,
+            src_shift,
+            dst_start_depth,
+            src_start_depth,
+            num_depth,
+            copyop);
+
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Copy over the boxlist by calling the single-box copy for each box in	*
+ * the boxlist.								*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void ArrayData<TYPE>::copy(
+   const ArrayData<TYPE>& src,
+   const hier::BoxList& boxes,
+   const hier::IntVector& src_shift)
+{
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      this->copy(src, b(), src_shift);
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Copy data between two array data objects on a specified box domain.	*
+ *									*
+ * If the source box, destination box, and copy box are the same and the	*
+ * source and destination have the same depth, then perform a fast copy	*
+ * of all data.								*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void ArrayData<TYPE>::copyDepth(
+   int dst_depth,
+   const ArrayData<TYPE>& src,
+   int src_depth,
+   const hier::Box& box)
+{
+   TBOX_ASSERT((0 <= dst_depth) && (dst_depth <= d_depth));
+   TBOX_ASSERT((0 <= src_depth) && (src_depth <= src.d_depth));
+
+   CopyOperation<TYPE> copyop;
+
+   /*
+    * Do a fast copy of data if all data aligns with copy region
+    */
+
+   if ((d_box == src.d_box) && (box == d_box)) {
+
+      TYPE * const dst_ptr = d_array.getPointer();
+      const TYPE * const src_ptr = src.d_array.getPointer();
+
+      TYPE * const dst_ptr_d = dst_ptr + dst_depth * d_offset;
+      const TYPE * const src_ptr_d = src_ptr + src_depth * d_offset;
+      for (int i = 0; i < d_offset; i++) {
+         copyop(dst_ptr_d[i], src_ptr_d[i]);
+      }
+
+   } else {
+
+      const hier::Box copybox = box * d_box * src.d_box;
+
+      if (!copybox.empty()) {
+
+         const int dst_start_depth = dst_depth;
+         const int src_start_depth = src_depth;
+         const int num_depth = 1;
+         const hier::IntVector src_shift(d_dim, 0);
+
+         ArrayDataOperationUtilities<TYPE, CopyOperation<TYPE> >::
+         doArrayDataOperationOnBox(*this,
+            src,
+            copybox,
+            src_shift,
+            dst_start_depth,
+            src_start_depth,
+            num_depth,
+            copyop);
+
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Add data from source ArrayData object to this (destination)           *
+ * ArrayData object on given box region.                                 *
+ *									*
+ * If the source box, destination box, and copy box are the same and the	*
+ * source and destination have the same depth, then perform a fast sum	*
+ * on all data rather than performing explicit looping operations.       *
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void ArrayData<TYPE>::sum(
+   const pdat::ArrayData<TYPE>& src,
+   const hier::Box& box)
+{
+
+   SumOperation<TYPE> sumop;
+
+   /*
+    * Do a fast copy and add if all data aligns with copy region
+    */
+
+   if ((d_depth == src.d_depth) &&
+       (d_box == src.d_box) &&
+       (box == d_box)) {
+
+      TYPE * const dst_ptr = d_array.getPointer();
+      const TYPE * const src_ptr = src.d_array.getPointer();
+      const int n = d_offset * d_depth;
+      for (int i = 0; i < n; i++) {
+         sumop(dst_ptr[i], src_ptr[i]);
+      }
+
+   } else {
+
+      const hier::Box copybox = box * d_box * src.d_box;
+
+      if (!copybox.empty()) {
+
+         const int dst_start_depth = 0;
+         const int src_start_depth = 0;
+         const int num_depth = (d_depth < src.d_depth ? d_depth : src.d_depth);
+         const hier::IntVector src_shift(d_dim, 0);
+
+         ArrayDataOperationUtilities<TYPE, SumOperation<TYPE> >::
+         doArrayDataOperationOnBox(*this,
+            src,
+            copybox,
+            src_shift,
+            dst_start_depth,
+            src_start_depth,
+            num_depth,
+            sumop);
+
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Add data from source ArrayData object to this (destination)           *
+ * ArrayData object on region described by given box and offset.         *
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void ArrayData<TYPE>::sum(
+   const pdat::ArrayData<TYPE>& src,
+   const hier::Box& box,
+   const hier::IntVector& src_shift)
+{
+
+   if (src_shift == hier::IntVector::getZero(d_dim)) {
+
+      sum(src, box);
+
+   } else {
+
+      const hier::Box copybox =
+         box * d_box * hier::Box::shift(src.d_box, src_shift);
+
+      if (!copybox.empty()) {
+
+         const int dst_start_depth = 0;
+         const int src_start_depth = 0;
+         const int num_depth = (d_depth < src.d_depth ? d_depth : src.d_depth);
+
+         SumOperation<TYPE> sumop;
+
+         ArrayDataOperationUtilities<TYPE, SumOperation<TYPE> >::
+         doArrayDataOperationOnBox(*this,
+            src,
+            copybox,
+            src_shift,
+            dst_start_depth,
+            src_start_depth,
+            num_depth,
+            sumop);
+
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Add data from source ArrayData object to this (destination)           *
+ * ArrayData object on regions described by given boxes and offset.      *
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void ArrayData<TYPE>::sum(
+   const ArrayData<TYPE>& src,
+   const hier::BoxList& boxes,
+   const hier::IntVector& src_shift)
+{
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      this->sum(src, b(), src_shift);
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Pack data into the message stream.  Both packing routines add one	*
+ * level of copy into a temporary buffer to reduce the number of calls	*
+ * to the abstract stream packing routines.  These definitions will only	*
+ * work for the standard built-in types of bool, char, double, float,	*
+ * and int.								*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void ArrayData<TYPE>::packStream(
+   tbox::MessageStream& stream,
+   const hier::Box& dest_box,
+   const hier::IntVector& src_shift) const
+{
+
+   const int size = d_depth * dest_box.size();
+   tbox::Array<TYPE> buffer(size);
+
+   packBuffer(buffer.getPointer(),
+      hier::Box::shift(dest_box, -src_shift));
+
+   stream.pack(buffer.getPointer(), size);
+
+}
+
+template<class TYPE>
+void ArrayData<TYPE>::packStream(
+   tbox::MessageStream& stream,
+   const hier::BoxList& dest_boxes,
+   const hier::IntVector& src_shift) const
+{
+
+   const int size = d_depth * dest_boxes.getTotalSizeOfBoxes();
+   tbox::Array<TYPE> buffer(size);
+
+   int ptr = 0;
+   for (hier::BoxList::Iterator b(dest_boxes); b; b++) {
+      packBuffer(buffer.getPointer(ptr),
+         hier::Box::shift(b(), -src_shift));
+      ptr += d_depth * b().size();
+   }
+
+   TBOX_ASSERT(ptr == size);
+
+   stream.pack(buffer.getPointer(), size);
+
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Unpack data from the message stream.  Both unpacking routines add one	*
+ * level of copy into a temporary buffer to reduce the number of calls	*
+ * to the abstract stream packing routines.  These definitions will only	*
+ * work for the standard built-in types of bool, char, double, float,	*
+ * and int.								*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void ArrayData<TYPE>::unpackStream(
+   tbox::MessageStream& stream,
+   const hier::Box& dest_box,
+   const hier::IntVector& src_shift)
+{
+
+   NULL_USE(src_shift);
+
+   const int size = d_depth * dest_box.size();
+   tbox::Array<TYPE> buffer(size);
+
+   stream.unpack(buffer.getPointer(), size);
+   unpackBuffer(buffer.getPointer(), dest_box);
+
+}
+
+template<class TYPE>
+void ArrayData<TYPE>::unpackStream(
+   tbox::MessageStream& stream,
+   const hier::BoxList& dest_boxes,
+   const hier::IntVector& src_shift)
+{
+
+   NULL_USE(src_shift);
+
+   const int size = d_depth * dest_boxes.getTotalSizeOfBoxes();
+   tbox::Array<TYPE> buffer(size);
+
+   stream.unpack(buffer.getPointer(), size);
+
+   int ptr = 0;
+   for (hier::BoxList::Iterator b(dest_boxes); b; b++) {
+      unpackBuffer(buffer.getPointer(ptr), b());
+      ptr += d_depth * b().size();
+   }
+
+   TBOX_ASSERT(ptr == size);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Unpack data from the message stream and add to this array data object.*
+ * Both unpacking routines add one level of copy into a temporary buffer *
+ * to reduce the number of calls	to the abstract stream packing routines.*
+ * These definitions will only work for the standard built-in types of   *
+ * bool, char, double, float, and int.					*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void ArrayData<TYPE>::unpackStreamAndSum(
+   tbox::MessageStream& stream,
+   const hier::Box& dest_box,
+   const hier::IntVector& src_shift)
+{
+
+   NULL_USE(src_shift);
+
+   const int size = d_depth * dest_box.size();
+   tbox::Array<TYPE> buffer(size);
+
+   stream.unpack(buffer.getPointer(), size);
+   unpackBufferAndSum(buffer.getPointer(), dest_box);
+
+}
+
+template<class TYPE>
+void ArrayData<TYPE>::unpackStreamAndSum(
+   tbox::MessageStream& stream,
+   const hier::BoxList& dest_boxes,
+   const hier::IntVector& src_shift)
+{
+
+   NULL_USE(src_shift);
+
+   const int size = d_depth * dest_boxes.getTotalSizeOfBoxes();
+   tbox::Array<TYPE> buffer(size);
+
+   stream.unpack(buffer.getPointer(), size);
+
+   int ptr = 0;
+   for (hier::BoxList::Iterator b(dest_boxes); b; b++) {
+      unpackBufferAndSum(buffer.getPointer(ptr), b());
+      ptr += d_depth * b().size();
+   }
+
+   TBOX_ASSERT(ptr == size);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Fill all or portions of the array with the specified data value.	*
+ * The templated TYPE must define the assignment operator.		*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void ArrayData<TYPE>::fillAll(
+   const TYPE& t)
+{
+   if (!d_box.empty()) {
+      TYPE* ptr = d_array.getPointer();
+      const int n = d_depth * d_offset;
+      for (int i = 0; i < n; i++) {
+         ptr[i] = t;
+      }
+   }
+}
+
+template<class TYPE>
+void ArrayData<TYPE>::fillAll(
+   const TYPE& t,
+   const hier::Box& box)
+{
+   for (int d = 0; d < d_depth; d++) {
+      fill(t, box, d);
+   }
+}
+
+template<class TYPE>
+void ArrayData<TYPE>::fill(
+   const TYPE& t,
+   const int d)
+{
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   if (!d_box.empty()) {
+      TYPE* ptr = d_array.getPointer(d * d_offset);
+      const int n = d_offset;
+      for (int i = 0; i < n; i++) {
+         ptr[i] = t;
+      }
+   }
+}
+
+template<class TYPE>
+void ArrayData<TYPE>::fill(
+   const TYPE& t,
+   const hier::Box& box,
+   const int d)
+{
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   const hier::Box ispace = d_box * box;
+
+   if (!ispace.empty()) {
+
+      int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dst_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < d_dim.getValue(); i++) {
+         box_w[i] = ispace.numberCells(i);
+         dst_w[i] = d_box.numberCells(i);
+         dim_counter[i] = 0;
+      }
+
+      const int num_d0_blocks = ispace.size() / box_w[0];
+
+      int dst_counter = d_box.offset(ispace.lower()) + d * d_offset;
+
+      int dst_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int nd = 0; nd < d_dim.getValue(); nd++) {
+         dst_b[nd] = dst_counter;
+      }
+
+      TYPE * const dst_ptr = d_array.getPointer();
+
+      for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+         for (int i0 = 0; i0 < box_w[0]; i0++) {
+            dst_ptr[dst_counter + i0] = t;
+         }
+         int dim_jump = 0;
+
+         for (int j = 1; j < d_dim.getValue(); j++) {
+            if (dim_counter[j] < box_w[j] - 1) {
+               ++dim_counter[j];
+               dim_jump = j;
+               break;
+            } else {
+               dim_counter[j] = 0;
+            }
+         }
+
+         if (dim_jump > 0) {
+            int dst_step = 1;
+            for (int k = 0; k < dim_jump; k++) {
+               dst_step *= dst_w[k];
+            }
+            dst_counter = dst_b[dim_jump - 1] + dst_step;
+
+            for (int m = 0; m < dim_jump; m++) {
+               dst_b[m] = dst_counter;
+            }
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Checks to make sure that class and restart file version numbers are   *
+ * equal.  If so, reads in d_depth, d_offset, and d_box from the        *
+ * database.  Then calls getSpecializedFromDatabase() to read in the	*
+ * actual data.								*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void ArrayData<TYPE>::getFromDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   int ver = database->getInteger("PDAT_ARRAYDATA_VERSION");
+   if (ver != PDAT_ARRAYDATA_VERSION) {
+      TBOX_ERROR("ArrayData::getFromDatabase error...\n"
+         << " : Restart file version different than class version" << std::endl);
+   }
+
+   d_depth = database->getInteger("d_depth");
+   d_offset = database->getInteger("d_offset");
+   d_box = database->getDatabaseBox("d_box");
+
+   getSpecializedFromDatabase(database);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Write out the class version number, d_depth, d_offset, and d_box	*
+ * to the database.  Then calls putSpecializedToDatabase() to write	*
+ * in the actual data.                                                          *
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void ArrayData<TYPE>::putToDatabase(
+   tbox::Pointer<tbox::Database> database,
+   bool data_only)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   if (!data_only) {
+      database->putInteger("PDAT_ARRAYDATA_VERSION", PDAT_ARRAYDATA_VERSION);
+
+      database->putInteger("d_depth", d_depth);
+      database->putInteger("d_offset", d_offset);
+      database->putDatabaseBox("d_box", d_box);
+   }
+
+   putSpecializedToDatabase(database);
+}
+
+template<class TYPE>
+void ArrayData<TYPE>::putSpecializedToDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+   database->putArray("d_array", d_array);
+}
+
+template<class TYPE>
+void ArrayData<TYPE>::getSpecializedFromDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+   database->getArray("d_array", d_array);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Set all array data to undefined values.                               *
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void ArrayData<TYPE>::undefineData()
+{
+   fillAll(tbox::MathUtilities<TYPE>::getSignalingNaN());
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Private member functions to pack and unpack data on the specified box *
+ * (for all components) into/from the buffer.	                        *
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void ArrayData<TYPE>::packBuffer(
+   TYPE* buffer,
+   const hier::Box& box) const
+{
+   TBOX_ASSERT((box * d_box) == box);
+
+   bool src_is_buffer = false;
+
+   CopyOperation<TYPE> copyop;
+
+   ArrayDataOperationUtilities<TYPE, CopyOperation<TYPE> >::
+   doArrayDataBufferOperationOnBox(*this,
+      buffer,
+      box,
+      src_is_buffer,
+      copyop);
+
+}
+
+template<class TYPE>
+void ArrayData<TYPE>::unpackBuffer(
+   const TYPE* buffer,
+   const hier::Box& box)
+{
+   TBOX_ASSERT((box * d_box) == box);
+
+   bool src_is_buffer = true;
+
+   CopyOperation<TYPE> copyop;
+
+   ArrayDataOperationUtilities<TYPE, CopyOperation<TYPE> >::
+   doArrayDataBufferOperationOnBox(*this,
+      buffer,
+      box,
+      src_is_buffer,
+      copyop);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Private member function to unpack data on the specified box           *
+ * (all components) from the buffer and add to this array data object.	*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void ArrayData<TYPE>::unpackBufferAndSum(
+   const TYPE* buffer,
+   const hier::Box& box)
+{
+   TBOX_ASSERT((box * d_box) == box);
+
+   bool src_is_buffer = true;
+
+   SumOperation<TYPE> sumop;
+
+   ArrayDataOperationUtilities<TYPE, SumOperation<TYPE> >::
+   doArrayDataBufferOperationOnBox(*this,
+      buffer,
+      box,
+      src_is_buffer,
+      sumop);
+}
+
+template<class TYPE>
+void ArrayData<TYPE>::invalidateArray(
+   const tbox::Dimension& dim) {
+   d_dim = dim;
+   d_depth = 0;
+   d_offset = 0;
+   d_box = hier::Box::getEmptyBox(dim);
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/ArrayData.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/ArrayData.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,181 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated array data structure supporting patch data types 
+ *
+ ************************************************************************/
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace pdat {
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const tbox::Dimension& ArrayData<TYPE>::getDim() const
+{
+   return d_dim;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const hier::Box& ArrayData<TYPE>::getBox() const
+{
+   return d_box;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+bool ArrayData<TYPE>::isInitialized() const
+{
+   return d_depth > 0;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int ArrayData<TYPE>::getDepth() const
+{
+   return d_depth;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int ArrayData<TYPE>::getOffset() const
+{
+   return d_offset;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE * ArrayData<TYPE>::getPointer(
+   int d)
+{
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   return d_array.getPointer(d * d_offset);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE * ArrayData<TYPE>::getPointer(
+   int d) const
+{
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   return d_array.getPointer(d * d_offset);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE & ArrayData<TYPE>::operator () (
+   const hier::Index& i,
+   int d)
+{
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   const int index = d_box.offset(i) + d * d_offset;
+
+   TBOX_ASSERT((index >= 0) && (index < d_depth * d_offset));
+
+   return d_array[index];
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE &
+ArrayData<TYPE>::operator () (
+   const hier::Index& i,
+   int d) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, i);
+
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   const int index = d_box.offset(i) + d * d_offset;
+
+   TBOX_ASSERT((index >= 0) && (index < d_depth * d_offset));
+
+   return d_array[index];
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+size_t ArrayData<TYPE>::getSizeOfData(
+   const hier::Box& box,
+   int depth)
+{
+   return tbox::MemoryUtilities::align(box.size() * depth * sizeof(TYPE));
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int ArrayData<TYPE>::getDataStreamSize(
+   const hier::BoxList& boxes,
+   const hier::IntVector& source_shift) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, source_shift);
+
+   (void)source_shift;
+
+   const int nelements = boxes.getTotalSizeOfBoxes();
+
+   if (typeid(TYPE) == typeid(bool)) {
+      return tbox::MessageStream::getSizeof<bool>(d_depth * nelements);
+   } else if (typeid(TYPE) == typeid(char)) {
+      return tbox::MessageStream::getSizeof<char>(d_depth * nelements);
+   } else if (typeid(TYPE) == typeid(dcomplex)) {
+      return tbox::MessageStream::getSizeof<dcomplex>(d_depth * nelements);
+   } else if (typeid(TYPE) == typeid(double)) {
+      return tbox::MessageStream::getSizeof<double>(d_depth * nelements);
+   } else if (typeid(TYPE) == typeid(float)) {
+      return tbox::MessageStream::getSizeof<float>(d_depth * nelements);
+   } else if (typeid(TYPE) == typeid(int)) {
+      return tbox::MessageStream::getSizeof<int>(d_depth * nelements);
+   }
+
+   TBOX_ERROR("ArrayData::getDataStreamSize() -- Invalid type" << std::endl);
+   return 0;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+bool ArrayData<TYPE>::canEstimateStreamSizeFromBox()
+{
+   if ((typeid(TYPE) == typeid(bool))
+       | (typeid(TYPE) == typeid(char))
+       | (typeid(TYPE) == typeid(double))
+       | (typeid(TYPE) == typeid(float))
+       | (typeid(TYPE) == typeid(int))
+       | (typeid(TYPE) == typeid(dcomplex))) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+bool ArrayData<TYPE>::isValid()
+{
+   return !d_box.isEmpty();
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/ArrayData.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/ArrayData.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,657 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated array data structure supporting patch data types 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_ArrayData
+#define included_pdat_ArrayData
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/ArrayDataIterator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/MessageStream.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/MemoryUtilities.h"
+
+#include <typeinfo>
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * @brief Class ArrayData<TYPE> is a basic templated array structure defined
+ * over the index space of a box (with a specified depth) that provides
+ * the support for the various standard array-based patch data subclasses.
+ *
+ * The data storage is in (i,...,k,d) order, where i,...,k indicates
+ * spatial indices and the d indicates the component at that location.
+ * Memory allocation is in column-major ordering (e.g., Fortran style)
+ * so that the leftmost index runs fastest in memory.
+ *
+ * The data type TYPE must define a default constructor (that takes no
+ * arguments) and also the assignment operator.  Note that a number of
+ * functions only work for standard built-in types (bool, char, double,
+ * float, and int).  To use this class with other user-defined types,
+ * many of these functions will need to be specialized, especially those
+ * that deal with message packing and unpacking.
+ */
+
+template<class TYPE>
+class ArrayData
+{
+public:
+   /*!
+    * Static member function that returns tru when the amount of buffer space in a
+    * message stream can be estimated from box only.  For built-in types (bool, char,
+    * double, float, int, and dcomplex), this routine returns true.  For other
+    * data types (template paramters) that may require special handling,
+    * a different implementation must be provided.
+    */
+   static bool
+   canEstimateStreamSizeFromBox();
+
+   /*!
+    * Static member function that returns the amount of memory space needed to
+    * store data of given depth on a box.
+    *
+    * Note that this function is only defined for the standard data types:
+    * bool, char, double, float, int, and dcomplex.  It must be provided for other
+    * template parameter types.
+    *
+    * @return size_t value indicating the amount of memory space needed for the data.
+    *
+    * @param box   Const reference to box object describing the spatial extents
+    *              of the array data index region of interest.
+    * @param depth Integer number of data values at each spatial location in
+    *              the array.
+    */
+   static size_t
+   getSizeOfData(
+      const hier::Box& box,
+      int depth);
+
+   /*!
+    * The default constructor creates an empty array data object.
+    * The initializeArray() member function must be called before the
+    * array can be used.
+    */
+   ArrayData();
+
+   /*!
+    * Construct an array data object.
+    *
+    * @param box   Const reference to box object describing the spatial extents
+    *              of the index space associated with the array data object.
+    * @param depth Integer number of data values at each spatial location in
+    *              the array.
+    */
+   explicit ArrayData(
+      const hier::Box& box,
+      int depth);
+
+   /*!
+    * The destructor for an array data object releases all memory allocated
+    * for the array elements.
+    */
+   ~ArrayData();
+
+   /*!
+    * Initialize the size of array data and depth.  This method is
+    * somewhat poorly named as the data is NOT initialized to anything
+    * to avoid the performance cost of the data initialization.
+    *
+    * Use undefineData to initialize the data.
+    *
+    * @param box   Const reference to box object describing the spatial extents
+    *              of the index space associated with the array data object.
+    * @param depth Integer number of data values at each spatial location in
+    *              the array.
+    */
+   void
+   initializeArray(
+      const hier::Box& box,
+      int depth);
+
+   /*!
+    * @brief Returns true when the array has been properly initialized
+    * and storage has been allocated; otherwise, return false.
+    *
+    * Note: Only arrays that have been initialized can do anything useful.
+    * Initialize an uninitialized array by calling the initializeArray() method.
+    */
+   bool
+   isInitialized() const;
+
+   /*!
+    * Set the array data to an ``undefined'' state appropriate for the data type.
+    * For example, for float and double, this means setting data to signaling NaNs
+    * that cause a floating point assertion when used in a numerical expression
+    * without being set to valid values.
+    */
+   void
+   undefineData();
+
+   /*!
+    * Return the box over which the array is defined.
+    */
+   const hier::Box&
+   getBox() const;
+
+   /*!
+    * Return the depth (e.g., the number of data values at each spatial
+    * location) of this array.
+    */
+   int
+   getDepth() const;
+
+   /*!
+    * Return the offset (e.g., the number of data values for each
+    * depth component) of this array.
+    */
+   int
+   getOffset() const;
+
+   /*!
+    * Get a non-const pointer to the beginning of the given depth
+    * component of this data array.
+    */
+   TYPE *
+   getPointer(
+      const int d = 0);
+
+   /*!
+    * Get a const pointer to the beginning of the given depth
+    * component of this data array.
+    */
+   const TYPE *
+   getPointer(
+      const int d = 0) const;
+
+   /*!
+    * Return reference to value in this array associated with the given
+    * box index and depth component.
+    */
+   TYPE&
+   operator () (
+      const hier::Index& i,
+      const int d);
+
+   /*!
+    * Return const reference to value in this array associated with the given
+    * box index and depth component.
+    */
+   const TYPE&
+   operator () (
+      const hier::Index& i,
+      const int d) const;
+
+   /*!
+    * Copy data from the source array data object to this array data object
+    * on the specified index space region.
+    *
+    * Note that this routine assumes that the source and destination
+    * box regions require no shifting to make them consistent.  This routine
+    * will intersect the specified box with the source and destination boxes
+    * to find the region of intersection.
+    *
+    * @param src   Const reference to source array data object.
+    * @param box   Const reference to box object describing the spatial extents
+    *              of the index space region over which to perform the copy operation.
+    *              Note: the box is in either the source or destination index space
+    *                    (which are assumed to be the same).
+    */
+   void
+   copy(
+      const ArrayData<TYPE>& src,
+      const hier::Box& box);
+
+   /*!
+    * Copy data from the source array data object to this array data object
+    * on the specified index space region.
+    *
+    * Note that this routine assumes that the source array box region must
+    * be shifted to be consistent with the destination (this) array box region.
+    * This routine will intersect the specified box with the destination box and
+    * shifted source box to find the region of intersection.
+    *
+    * @param src   Const reference to source array data object.
+    * @param box   Const reference to box object describing the spatial extents
+    *              of the index space region over which to perform the copy operation.
+    *              Note: the box is in the destination index space.
+    * @param src_shift Const reference to shift vector used to put the source
+    *              array data box into the index space region of this array data object.
+    */
+   void
+   copy(
+      const ArrayData<TYPE>& src,
+      const hier::Box& box,
+      const hier::IntVector& src_shift);
+
+   /*!
+    * Copy data from the source array data object to this array data object
+    * on the specified index space regions.
+    *
+    * Note that this routine assumes that the source array box region must
+    * be shifted to be consistent with the destination (this) array box region.
+    * This routine will intersect the specified boxes with the destination box and
+    * shifted source box to find the regions of intersection.
+    *
+    * @param src   Const reference to source array data object.
+    * @param boxes Const reference to box list describing the spatial extents
+    *              of the index space regions over which to perform the copy operation.
+    *              Note: the boxes are in the destination index space.
+    * @param src_shift Const reference to shift vector used to put the source
+    *              array data box into the index space region of this array data object.
+    */
+   void
+   copy(
+      const ArrayData<TYPE>& src,
+      const hier::BoxList& boxes,
+      const hier::IntVector& src_shift);
+
+   /*!
+    * Copy given source depth of source array data object to given destination
+    * depth of this array data object on the specified index space region.
+    *
+    * Note that this routine assumes that the source and destination
+    * box regions require no shifting to make them consistent.  This routine
+    * will intersect the specified box with the source and destination boxes
+    * to find the region of intersection.
+    *
+    * @param dst_depth Integer depth of destination array.
+    * @param src       Const reference to source array data object.
+    * @param src_depth Integer depth of source array.
+    * @param box       Const reference to box object describing the spatial extents
+    *                  of the index space region over which to perform the copy operation.
+    *                  Note: the box is in either the source or destination index space
+    *                        (which are assumed to be the same).
+    */
+   void
+   copyDepth(
+      int dst_depth,
+      const ArrayData<TYPE>& src,
+      int src_depth,
+      const hier::Box& box);
+
+   /*!
+    * Add data from the source array data object to this array data object
+    * on the specified index space region.
+    *
+    * Note that this routine assumes that the source and destination
+    * box regions require no shifting to make them consistent.  This routine
+    * will intersect the specified box with the source and destination boxes
+    * to find the region of intersection.
+    *
+    * @param src   Const reference to source array data object.
+    * @param box   Const reference to box object describing the spatial extents
+    *              of the index space region over which to perform the sum operation.
+    *              Note: the box is in either the source or destination index space
+    *                    (which are assumed to be the same).
+    */
+   void
+   sum(
+      const ArrayData<TYPE>& src,
+      const hier::Box& box);
+
+   /*!
+    * Add data from the source array data object to this array data object
+    * on the specified index space region.
+    *
+    * Note that this routine assumes that the source array box region must
+    * be shifted to be consistent with the destination (this) array box region.
+    * This routine will intersect the specified box with the destination box and
+    * shifted source box to find the region of intersection.
+    *
+    * @param src   Const reference to source array data object.
+    * @param box   Const reference to box object describing the spatial extents
+    *              of the index space region over which to perform the sum operation.
+    *              Note: the box is in the destination index space.
+    * @param src_shift Const reference to shift vector used to put the source
+    *              array data box into the index space region of this array data object.
+    */
+   void
+   sum(
+      const ArrayData<TYPE>& src,
+      const hier::Box& box,
+      const hier::IntVector& src_shift);
+
+   /*!
+    * Add data from the source array data object to this array data object
+    * on the specified index space regions.
+    *
+    * Note that this routine assumes that the source array box region must
+    * be shifted to be consistent with the destination (this) array box region.
+    * This routine will intersect the specified boxes with the destination box and
+    * shifted source box to find the regions of intersection.
+    *
+    * @param src   Const reference to source array data object.
+    * @param boxes Const reference to box list describing the spatial extents
+    *              of the index space regions over which to perform the sum operation.
+    *              Note: the boxes are in the destination index space.
+    * @param src_shift Const reference to shift vector used to put the source
+    *              array data box into the index space region of this array data object.
+    */
+   void
+   sum(
+      const ArrayData<TYPE>& src,
+      const hier::BoxList& boxes,
+      const hier::IntVector& src_shift);
+
+   /*!
+    * Calculate the number of bytes needed to stream the data living
+    * in the specified box domains.  This routine is only defined for
+    * the built-in types of bool, char, double, float, int, and dcomplex.  For
+    * all other types, a specialized implementation must be provided.
+    *
+    * @param boxes Const reference to box list describing the spatial extents
+    *              of the index space regions of interest.
+    *              Note: the boxes are assumed to be in the index space of this
+    *              array data object.
+    * @param src_shift Const reference to vector used to shift the given
+    *              boxes into the index space region of this array data object.
+    *              Note: this argument is currently ignored.
+    */
+   int
+   getDataStreamSize(
+      const hier::BoxList& boxes,
+      const hier::IntVector& src_shift) const;
+
+   /*!
+    * Pack data living on the specified index region into the stream.
+    *
+    * Note that this routine assumes that the given box region must
+    * be shifted to be consistent with the source (this) array box region.
+    *
+    * @param stream Reference to stream into which to pack data.
+    * @param dest_box Const reference to box describing the spatial extent
+    *              of the destination index space region of interest.
+    * @param src_shift Const reference to vector used to shift the given
+    *              box into the index space region of this (source) array data
+    *              object.
+    *
+    * Note: The shifted box must lie completely within the index space of this
+    * array data object.  When assertion checking is active, the routine will
+    * abort if the box is not contained in the index space of this array.
+    */
+   void
+   packStream(
+      tbox::MessageStream& stream,
+      const hier::Box& dest_box,
+      const hier::IntVector& src_shift) const;
+
+   /*!
+    * Pack data living on the specified index regions into the stream.
+    *
+    * Note that this routine assumes that the given box regions must
+    * be shifted to be consistent with the source (this) array box region.
+    *
+    * @param stream Reference to stream into which to pack data.
+    * @param dest_boxes Const reference to boxes describing the spatial extents
+    *              of the destination index space regions of interest.
+    * @param src_shift Const reference to vector used to shift the given
+    *              boxes into the index space region of this (source) array data
+    *              object.
+    *
+    * Note: The shifted boxes must lie completely within the index space of this
+    * array.  If compiled with assertions enabled, the routine will abort if
+    * the shifted boxes are not contained in the index space of this array.
+    */
+   void
+   packStream(
+      tbox::MessageStream& stream,
+      const hier::BoxList& dest_boxes,
+      const hier::IntVector& src_shift) const;
+
+   /*!
+    * Unpack data from the stream into the index region specified.
+    *
+    * @param stream Reference to stream from which to unpack data.
+    * @param dest_box Const reference to box describing the spatial extent
+    *              of the destination index space region of interest.
+    * @param src_offset Const reference to vector used to offset
+    *              box into the index space region of some (source) array data
+    *              object. Currently, this argument is ignored.
+    *
+    * Note: The given box must lie completely within the index space of this
+    * array data object.  When assertion checking is active, the routine will
+    * abort if the box is not contained in the index space of this array.
+    */
+   void
+   unpackStream(
+      tbox::MessageStream& stream,
+      const hier::Box& dest_box,
+      const hier::IntVector& src_offset);
+
+   /*!
+    * Unpack data from the stream into the index regions specified.
+    *
+    * @param stream Reference to stream from which to unpack data.
+    * @param dest_boxes Const reference to box list describing the spatial extents
+    *              of the destination index space regions of interest.
+    * @param src_offset Const reference to vector used to offset the given
+    *              boxes into the index space region of some (source) array data
+    *              object. Currently, this argument is ignored.
+    *
+    * Note: The given boxes must lie completely within the index space of this
+    * array data object.  When assertion checking is active, the routine will
+    * abort if some box is not contained in the index space of this array.
+    */
+   void
+   unpackStream(
+      tbox::MessageStream& stream,
+      const hier::BoxList& dest_boxes,
+      const hier::IntVector& src_offset);
+
+   /*!
+    * Unpack data from the stream and add to the array in the index region specified.
+    *
+    * @param stream Reference to stream from which to unpack data.
+    * @param dest_box Const reference to box describing the spatial extent
+    *              of the destination index space region of interest.
+    * @param src_offset Const reference to vector used to offset the given
+    *              box into the index space region of some (source) array data
+    *              object. Currently, this argument is ignored.
+    *
+    * Note: The given box must lie completely within the index space of this
+    * array data object.  When assertion checking is active, the routine will
+    * abort if the box is not contained in the index space of this array.
+    */
+   void
+   unpackStreamAndSum(
+      tbox::MessageStream& stream,
+      const hier::Box& dest_box,
+      const hier::IntVector& src_offset);
+
+   /*!
+    * Unpack data from the stream and ad to the array in the index region specified.
+    *
+    * @param stream Reference to stream from which to unpack data.
+    * @param dest_boxes Const reference to box list describing the spatial extents
+    *              of the destination index space regions of interest.
+    * @param src_offset Const reference to vector used to offset the given
+    *              boxes into the index space region of some (source) array data
+    *              object. Currently, this argument is ignored.
+    *
+    * Note: The given boxes must lie completely within the index space of this
+    * array.  If compiled with assertions enabled, the routine will abort if
+    * some box is not contained in the index space of this array.
+    */
+   void
+   unpackStreamAndSum(
+      tbox::MessageStream& stream,
+      const hier::BoxList& dest_boxes,
+      const hier::IntVector& src_offset);
+
+   /*!
+    * Fill all array values with value t.
+    */
+   void
+   fillAll(
+      const TYPE& t);
+
+   /*!
+    * Fill all array values within the box with value t.
+    */
+   void
+   fillAll(
+      const TYPE& t,
+      const hier::Box& box);
+
+   /*!
+    * Fill all array values associated with depth component d with the value t.
+    */
+   void
+   fill(
+      const TYPE& t,
+      const int d = 0);
+
+   /*!
+    * Fill all array values associated with depth component d
+    * within the box with the value t.
+    */
+   void
+   fill(
+      const TYPE& t,
+      const hier::Box& box,
+      const int d = 0);
+
+   /*!
+    * Check to make sure that the class version and restart file
+    * version are equal.  If so, read in data from database.  This
+    * routine calls getSpecializedFromDatabase() to read in the
+    * proper data type.
+    *
+    * Assertions:  database must be a non-null pointer.
+    */
+   void
+   getFromDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+   /*!
+    * Write out array data object data to database.  This
+    * routine calls putSpecializedToDatabase() to read in the
+    * proper data type.  The default behavior (boolean argument is
+    * false) is to put all data members in database.  Otherwise, only
+    * the array contents are written out.
+    *
+    * Assertions:  database must be a non-null pointer.
+    */
+   void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> database,
+      bool data_only = false);
+
+   /*!
+    * Use specialized template method to get the correct behavior
+    * when reading in the array of data.
+    */
+   void
+   getSpecializedFromDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+   /*!
+    * Use specialized template method to get the correct behavior
+    * when writing out the array of data.
+    */
+   void
+   putSpecializedToDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+   /**
+    * Return the dimension of this object.
+    */
+   const tbox::Dimension&
+   getDim() const;
+
+   /**
+    * @brief Invalidate an array as opposed to initializing it.
+    *
+    * The box associated with the array will be set to empty so
+    * intersections will be the empty set.
+    *
+    */
+   void
+   invalidateArray(
+      const tbox::Dimension& dim);
+
+   /**
+    * @brief Returns true if the array is valid.
+    *
+    * Invalid state can be set using the invalidateArray method.
+    */
+   bool
+   isValid();
+
+   /*!
+    * The array data iterator iterates over the elements of a box
+    * associated with an ArrayData object.  This typedef is
+    * convenient link to the ArrayDataIterator class.
+    */
+   typedef ArrayDataIterator Iterator;
+
+   friend class tbox::Array<ArrayData<TYPE> >;
+
+private:
+   ArrayData(
+      const ArrayData<TYPE>&);          // not implemented
+   void
+   operator = (
+      const ArrayData<TYPE>&);                  // not implemented
+
+   /*
+    * Private member functions to pack/unpack data to/from buffer.
+    *
+    * Note: box of this array data object must completely contain given box.
+    */
+   void
+   packBuffer(
+      TYPE* buffer,
+      const hier::Box& box) const;
+   void
+   unpackBuffer(
+      const TYPE* buffer,
+      const hier::Box& box);
+
+   /*
+    * Private member functions to unpack data from buffer and add to
+    * this array data object.
+    *
+    * Note: box of this array data object must completely contain given box.
+    */
+   void
+   unpackBufferAndSum(
+      const TYPE* buffer,
+      const hier::Box& box);
+
+   tbox::Dimension d_dim;
+
+   int d_depth;
+   int d_offset;
+   hier::Box d_box;
+   tbox::Array<TYPE> d_array;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/ArrayData.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/ArrayData.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/ArrayDataAccess.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/ArrayDataAccess.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,35 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:    
+ *
+ ************************************************************************/
+
+#include "SAMRAI/pdat/ArrayDataAccess.h"
+
+template<int DIM>
+MDA_Access<double, DIM, MDA_OrderColMajor<DIM> > access(
+   SAMRAI::pdat::ArrayData<double>& array_data,
+   int depth)
+{
+   MDA_Access<double, DIM, MDA_OrderColMajor<DIM> >
+   r(array_data.getPointer(depth),
+     (const int *)array_data.getBox().lower(),
+     (const int *)array_data.getBox().upper());
+   return r;
+}
+
+template<int DIM>
+const MDA_AccessConst<double, DIM, MDA_OrderColMajor<DIM> > access(
+   const SAMRAI::pdat::ArrayData<double>& array_data,
+   int depth)
+{
+   MDA_AccessConst<double, DIM, MDA_OrderColMajor<DIM> >
+   r(array_data.getPointer(depth),
+     (const int *)array_data.getBox().lower(),
+     (const int *)array_data.getBox().upper());
+   return r;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/ArrayDataAccess.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/ArrayDataAccess.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,65 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Light weight array class. 
+ *
+ ************************************************************************/
+#ifndef included_ArrayDataAccess_h
+#define included_ArrayDataAccess_h
+
+#include "SAMRAI/pdat/ArrayData.h"
+
+#include "SAMRAI/pdat/MDA_Access.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * @brief Utility for wrapping data from ArrayData class in an
+ * MDA_Access or MDA_AccessConst object.
+ *
+ * This, and other classes in the folder array_access are meant
+ * only for certain SAMRAI development efforts.  Please do not
+ * use in user code.
+ */
+class ArrayDataAccess
+{
+
+public:
+   /*!
+    * @brief Create an MDA_Access version of an ArrayData object.
+    */
+   template<int DIM, class TYPE>
+   static MDA_Access<TYPE, DIM, MDA_OrderColMajor<DIM> >
+   access(
+      ArrayData<TYPE>& array_data,
+      int depth = 0) {
+      return MDA_Access<TYPE, DIM, MDA_OrderColMajor<DIM> >(
+                array_data.getPointer(depth),
+                &array_data.getBox().lower()[0],
+                &array_data.getBox().upper()[0]);
+   }
+
+   /*!
+    * @brief Create an MDA_AccessConst version of a const ArrayData object.
+    */
+   template<int DIM, class TYPE>
+   static MDA_AccessConst<TYPE, DIM, MDA_OrderColMajor<DIM> >
+   access(
+      const ArrayData<TYPE>& array_data,
+      int depth = 0) {
+      return MDA_AccessConst<TYPE, DIM, MDA_OrderColMajor<DIM> >(
+                array_data.getPointer(depth),
+                &array_data.getBox().lower()[0],
+                &array_data.getBox().upper()[0]);
+   }
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/ArrayDataIterator.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/ArrayDataIterator.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,20 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Iterator for array patch data types 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_ArrayDataIterator_C
+#define included_pdat_ArrayDataIterator_C
+
+#include "SAMRAI/pdat/ArrayDataIterator.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/ArrayDataIterator.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/ArrayDataIterator.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/ArrayDataIterator.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,117 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Iterator for array patch data types 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+SAMRAI_INLINE_KEYWORD
+ArrayDataIterator::ArrayDataIterator(
+   const hier::Box& box):
+   d_index(box.lower()),
+   d_box(box)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+ArrayDataIterator::ArrayDataIterator(
+   const ArrayDataIterator& iter):
+   d_index(iter.d_index),
+   d_box(iter.d_box)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+ArrayDataIterator&
+ArrayDataIterator::operator = (
+   const ArrayDataIterator& iter)
+{
+   d_index = iter.d_index;
+   d_box = iter.d_box;
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+ArrayDataIterator::~ArrayDataIterator()
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::Index& ArrayDataIterator::operator * () const
+{
+   return d_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::Index& ArrayDataIterator::operator () () const
+{
+   return d_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+ArrayDataIterator::operator bool () const
+{
+   const tbox::Dimension& dim(d_box.getDim());
+   bool retval = true;
+   for (int i = 0; i < dim.getValue(); i++) {
+      if (d_index(i) > d_box.upper(i)) {
+         retval = false;
+         break;
+      }
+   }
+
+   return retval;
+}
+
+#ifndef LACKS_BOOL_VOID_RESOLUTION
+SAMRAI_INLINE_KEYWORD
+ArrayDataIterator::operator const void* () const
+{
+   return ArrayDataIterator::operator bool () ? this : NULL;
+}
+#endif
+
+SAMRAI_INLINE_KEYWORD
+bool ArrayDataIterator::operator ! () const
+{
+   return !ArrayDataIterator::operator bool ();
+}
+
+SAMRAI_INLINE_KEYWORD
+void ArrayDataIterator::operator ++ (
+   int)
+{
+   const tbox::Dimension& dim(d_box.getDim());
+   d_index(0)++;
+   for (int i = 0; i < dim.getValue() - 1; i++) {
+      if (d_index(i) > d_box.upper(i)) {
+         d_index(i) = d_box.lower(i);
+         d_index(i + 1)++;
+      } else {
+         break;
+      }
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+bool ArrayDataIterator::operator == (
+   const ArrayDataIterator& iter) const
+{
+   return d_index == iter.d_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool ArrayDataIterator::operator != (
+   const ArrayDataIterator& iter) const
+{
+   return d_index != iter.d_index;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/ArrayDataIterator.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/ArrayDataIterator.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,135 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Iterator for array patch data types 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_ArrayDataIterator
+#define included_pdat_ArrayDataIterator
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Index.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class ArrayDataIterator is an iterator that provides methods for
+ * stepping through the index space associated with a pdat_ArrayData object.
+ * The indices are enumerated in column-major (e.g., Fortran) order.
+ * The iterator should be used as follows:
+ *
+ * \verbatim
+ * hier::Box box;
+ * ...
+ * for (ArrayDataIterator c(box); c; c++) {
+ *    // use index c of the box
+ * }
+ * \endverbatim
+ *
+ * Note that the array data iterator may not compile to efficient code,
+ * depending on your compiler.  Many compilers are not smart enough to
+ * optimize the looping constructs and indexing operations.
+ *
+ * @see pdat::ArrayData
+ * @see hier::Index
+ */
+
+class ArrayDataIterator
+{
+public:
+   /**
+    * Constructor for the array data iterator.  The iterator will enumerate
+    * the indices in the argument box.
+    */
+   explicit ArrayDataIterator(
+      const hier::Box& box);
+
+   /**
+    * Copy constructor for the array data iterator
+    */
+   ArrayDataIterator(
+      const ArrayDataIterator& iterator);
+
+   /**
+    * Assignment operator for the array data iterator.
+    */
+   ArrayDataIterator&
+   operator = (
+      const ArrayDataIterator& iterator);
+
+   /**
+    * Destructor for the array data iterator.
+    */
+   ~ArrayDataIterator();
+
+   /**
+    * Extract the index corresponding to the iterator position in the box.
+    */
+   const hier::Index&
+   operator * () const;
+
+   /**
+    * Extract the index corresponding to the iterator position in the box.
+    */
+   const hier::Index&
+   operator () () const;
+
+   /**
+    * Return true if the iterator points to a valid index within the box.
+    */
+   operator bool () const;
+
+#ifndef LACKS_BOOL_VOID_RESOLUTION
+   /**
+    * Return a non-NULL if the iterator points to a valid index within the box.
+    */
+   operator const void
+   * () const;
+#endif
+
+   /**
+    * Return whether the iterator points to a valid index within the box.
+    * This operator mimics the !p operation applied to a pointer p.
+    */
+   bool
+   operator ! () const;
+
+   /**
+    * Increment the iterator to point to the next index in the box.
+    */
+   void
+   operator ++ (
+      int);
+
+   /**
+    * Test two iterators for equality (same index value).
+    */
+   bool
+   operator == (
+      const ArrayDataIterator& iterator) const;
+
+   /**
+    * Test two iterators for inequality (different index values).
+    */
+   bool
+   operator != (
+      const ArrayDataIterator& iterator) const;
+
+private:
+   hier::Index d_index;
+   hier::Box d_box;
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/ArrayDataIterator.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/ArrayDataOperationUtilities.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/ArrayDataOperationUtilities.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,297 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated array data looping operations supporting patch data types 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_ArrayDataOperationUtilities_C
+#define included_pdat_ArrayDataOperationUtilities_C
+
+#include "SAMRAI/pdat/ArrayDataOperationUtilities.h"
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Function that performs specified operation involving source and       *
+ * destination array data objects and puts result in destination array   *
+ * data object using explicit dimension-generic looping constructs.      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE, class OP>
+void ArrayDataOperationUtilities<TYPE, OP>::doArrayDataOperationOnBox(
+   ArrayData<TYPE>& dst,
+   const ArrayData<TYPE>& src,
+   const hier::Box& opbox,
+   const hier::IntVector& src_shift,
+   int dst_start_depth,
+   int src_start_depth,
+   int num_depth,
+   const OP& op)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst, src, opbox, src_shift);
+   TBOX_ASSERT(num_depth >= 0);
+   TBOX_ASSERT((0 <= dst_start_depth) &&
+      (dst_start_depth + num_depth <= dst.getDepth()));
+   TBOX_ASSERT((0 <= src_start_depth) &&
+      (src_start_depth + num_depth <= src.getDepth()));
+
+   const tbox::Dimension& dim(dst.getDim());
+
+   TYPE * const dst_ptr = dst.getPointer();
+   const TYPE * const src_ptr = src.getPointer();
+
+   const hier::Box& dst_box(dst.getBox());
+   const hier::Box& src_box(src.getBox());
+
+   int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   int dst_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   int src_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   for (int i = 0; i < dim.getValue(); i++) {
+      box_w[i] = opbox.numberCells(i);
+      dst_w[i] = dst_box.numberCells(i);
+      src_w[i] = src_box.numberCells(i);
+      dim_counter[i] = 0;
+   }
+
+   const int dst_offset = dst.getOffset();
+   const int src_offset = src.getOffset();
+
+   /*
+    * Data on the opbox can be decomposed into a set of
+    * contiguous array sections representing data in a straight line
+    * in the 0 coordinate direction.
+    *
+    * num_d0_blocks is the number of such array sections.
+    * dst_begin, src_begin are the array indices for the first
+    * data items in each array section to be copied.
+    */
+
+   const int num_d0_blocks = opbox.size() / box_w[0];
+
+   int dst_begin = dst_box.offset(opbox.lower())
+      + dst_start_depth * dst_offset;
+   int src_begin = src_box.offset(opbox.lower() - src_shift)
+      + src_start_depth * src_offset;
+
+   /*
+    * Loop over the depth sections of the data arrays.
+    */
+
+   for (int d = 0; d < num_depth; ++d) {
+
+      int dst_counter = dst_begin;
+      int src_counter = src_begin;
+
+      int dst_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      int src_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int nd = 0; nd < dim.getValue(); nd++) {
+         dst_b[nd] = dst_counter;
+         src_b[nd] = src_counter;
+      }
+
+      /*
+       * Loop over each contiguous block of data.
+       */
+
+      for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+         for (int i0 = 0; i0 < box_w[0]; i0++) {
+            op(dst_ptr[dst_counter + i0], src_ptr[src_counter + i0]);
+         }
+         int dim_jump = 0;
+
+         /*
+          * After each contiguous block is copied, calculate the
+          * beginning array index for the next block.
+          */
+
+         for (int j = 1; j < dim.getValue(); j++) {
+            if (dim_counter[j] < box_w[j] - 1) {
+               ++dim_counter[j];
+               dim_jump = j;
+               break;
+            } else {
+               dim_counter[j] = 0;
+            }
+         }
+
+         if (dim_jump > 0) {
+
+            int dst_step = 1;
+            int src_step = 1;
+            for (int k = 0; k < dim_jump; k++) {
+               dst_step *= dst_w[k];
+               src_step *= src_w[k];
+            }
+            dst_counter = dst_b[dim_jump - 1] + dst_step;
+            src_counter = src_b[dim_jump - 1] + src_step;
+
+            for (int m = 0; m < dim_jump; m++) {
+               dst_b[m] = dst_counter;
+               src_b[m] = src_counter;
+            }
+
+         }  // if dim_jump > 0
+
+      }  // nb loop over contiguous data blocks
+
+      /*
+       * After copy is complete on a full box for one depth index,
+       * advance by the offset values.
+       */
+
+      dst_begin += dst_offset;
+      src_begin += src_offset;
+
+   }  // d loop over depth indices
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Function that performs specified operation involving source and       *
+ * destination data pointers and puts result in destination array        *
+ * data object using explicit dimension-generic looping constructs.      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE, class OP>
+void ArrayDataOperationUtilities<TYPE, OP>::doArrayDataBufferOperationOnBox(
+   const ArrayData<TYPE>& arraydata,
+   const TYPE* buffer,
+   const hier::Box& opbox,
+   bool src_is_buffer,
+   const OP& op)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(arraydata, opbox);
+   TBOX_ASSERT(buffer != (const TYPE *)NULL);
+   TBOX_ASSERT(opbox == (opbox * arraydata.getBox()));
+
+   const tbox::Dimension& dim(arraydata.getDim());
+
+   TYPE * const dst_ptr =
+      (src_is_buffer ? const_cast<TYPE *>(arraydata.getPointer())
+       : const_cast<TYPE *>(buffer));
+   const TYPE * const src_ptr =
+      (src_is_buffer ? buffer : arraydata.getPointer());
+
+   const hier::Box& array_d_box(arraydata.getBox());
+   const int array_d_depth = arraydata.getDepth();
+
+   int box_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   int dat_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   int dim_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   for (int i = 0; i < dim.getValue(); i++) {
+      box_w[i] = opbox.numberCells(i);
+      dat_w[i] = array_d_box.numberCells(i);
+      dim_counter[i] = 0;
+   }
+
+   const int dat_offset = arraydata.getOffset();
+   const int buf_offset = box_w[0];
+
+   /*
+    * Data on the opbox can be decomposed into a set of
+    * contiguous array sections representing data in a straight line
+    * in the 0 coordinate direction.
+    *
+    * num_d0_blocks is the number of such array sections.
+    * dat_begin, buf_begin are the array indices for the first
+    * data items in each array section to be copied.
+    */
+
+   const int num_d0_blocks = opbox.size() / box_w[0];
+
+   int dat_begin = array_d_box.offset(opbox.lower());
+   int buf_begin = 0;
+
+   /*
+    * Loop over the depth sections of the data arrays.
+    */
+
+   for (int d = 0; d < array_d_depth; d++) {
+
+      int dat_counter = dat_begin;
+      int buf_counter = buf_begin;
+
+      int& dst_counter = (src_is_buffer ? dat_counter : buf_counter);
+      int& src_counter = (src_is_buffer ? buf_counter : dat_counter);
+
+      int dat_b[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int nd = 0; nd < dim.getValue(); nd++) {
+         dat_b[nd] = dat_counter;
+      }
+
+      /*
+       * Loop over each contiguous block of data.
+       */
+
+      for (int nb = 0; nb < num_d0_blocks; nb++) {
+
+         for (int i0 = 0; i0 < box_w[0]; i0++) {
+            op(dst_ptr[dst_counter + i0], src_ptr[src_counter + i0]);
+         }
+         int dim_jump = 0;
+
+         /*
+          * After each contiguous block is packed, calculate the
+          * beginning array index for the next block.
+          */
+
+         for (int j = 1; j < dim.getValue(); j++) {
+            if (dim_counter[j] < box_w[j] - 1) {
+               ++dim_counter[j];
+               dim_jump = j;
+               break;
+            } else {
+               dim_counter[j] = 0;
+            }
+         }
+
+         if (dim_jump > 0) {
+
+            int dat_step = 1;
+            for (int k = 0; k < dim_jump; k++) {
+               dat_step *= dat_w[k];
+            }
+            dat_counter = dat_b[dim_jump - 1] + dat_step;
+
+            for (int m = 0; m < dim_jump; m++) {
+               dat_b[m] = dat_counter;
+            }
+
+         }  // if dim_jump > 0
+
+         buf_counter += buf_offset;
+
+      }  // nb loop over contiguous data blocks
+
+      /*
+       * After packing is complete on a full box for one depth index,
+       * advance by the offset value.
+       */
+
+      dat_begin += dat_offset;
+      buf_begin = buf_counter;
+
+   }  // d loop over depth indices
+
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/ArrayDataOperationUtilities.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/ArrayDataOperationUtilities.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,113 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated array data looping operations supporting patch data types 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_ArrayDataOperationUtilities
+#define included_pdat_ArrayDataOperationUtilities
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+template<class TYPE>
+class ArrayData;
+
+/*!
+ * @brief Struct ArrayDataOperationUtilities<DIM, TYPE, OP> provides
+ * generic looping operations for all array-based patch data types.
+ * The operations are templated on spatial dimension, data type,
+ * and the operation that will be performed on individual array
+ * elements in the innermost loop.
+ *
+ * @see ArrayData
+ */
+
+template<class TYPE, class OP>
+class ArrayDataOperationUtilities
+{
+public:
+   /*!
+    * Perform operation on a subset of data components of source and destination
+    * array data objects and put results in destination array data object.
+    *
+    * @param dst    Reference to destination array data object.
+    * @param src    Const reference to source array data object.
+    * @param opbox  Const reference to Box indicating index space region of operation.
+    * @param src_shift  Const reference to IntVector indicating shift required to put
+    *                   source index space region into destination index space region.
+    * @param dst_start_depth  Integer specifying starting depth component of
+    *                         operation in destination array.
+    * @param src_start_depth  Integer specifying starting depth component of
+    *                         operation in source array.
+    * @param num_depth  Integer number of depth components on which to perform operation.
+    * @param op  Const reference to object that performs operations on individual
+    *            data array elements.
+    *
+    * When assertion checking is active, assertion will result when any of the depth-related
+    * arguments are out-of-bounds for the given array data objects.
+    */
+   static void
+   doArrayDataOperationOnBox(
+      ArrayData<TYPE>& dst,
+      const ArrayData<TYPE>& src,
+      const hier::Box& opbox,
+      const hier::IntVector& src_shift,
+      int dst_start_depth,
+      int src_start_depth,
+      int num_depth,
+      const OP& op);
+
+   /*!
+    * Perform operation on all data components of array data object and corresponding
+    * buffer data, putting results in either the array data object or buffer.
+    *
+    * @param arraydata   Const reference to array data object.
+    * @param buffer      Const pointer to first element in buffer.
+    * @param opbox       Const reference to Box indicating operation region in
+    *                    index space of array data object.
+    * @param src_is_buffer  Boolean value indicating whether buffer is source data
+    *                       for operation; if true results will be placed in array
+    *                       data object, otherwise results will go in buffer.
+    * @param op  Const reference to object that performs operations on individual
+    *            data array elements.
+    *
+    * When assertion checking is active, assertion will result when buffer pointer
+    * is null or operation box is not the same as the array data box.
+    */
+   static void
+   doArrayDataBufferOperationOnBox(
+      const ArrayData<TYPE>& arraydata,
+      const TYPE* buffer,
+      const hier::Box& opbox,
+      bool src_is_buffer,
+      const OP& op);
+private:
+   // the following are not implemented:
+   ArrayDataOperationUtilities();
+   ~ArrayDataOperationUtilities();
+   ArrayDataOperationUtilities(
+      const ArrayDataOperationUtilities<TYPE, OP>&);
+   void
+   operator = (
+      const ArrayDataOperationUtilities<TYPE, OP>&);
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/ArrayDataOperationUtilities.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellComplexConstantRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellComplexConstantRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,209 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for cell-centered complex data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellComplexConstantRefine_C
+#define included_pdat_CellComplexConstantRefine_C
+
+#include "SAMRAI/pdat/CellComplexConstantRefine.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <float.h>
+#include <math.h>
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in conrefine1d.f:
+void F77_FUNC(conrefcellcplx1d, CONREFCELLCPLX1D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+// in conrefine2d.f:
+void F77_FUNC(conrefcellcplx2d, CONREFCELLCPLX2D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+// in conrefine3d.f:
+void F77_FUNC(conrefcellcplx3d, CONREFCELLCPLX3D) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+CellComplexConstantRefine::CellComplexConstantRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSTANT_REFINE"),
+   d_name_id("CONSTANT_REFINE")
+{
+
+}
+
+CellComplexConstantRefine::~CellComplexConstantRefine()
+{
+}
+
+bool CellComplexConstantRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<CellVariable<dcomplex> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CellComplexConstantRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int CellComplexConstantRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CellComplexConstantRefine::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void CellComplexConstantRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const pdat::CellOverlap* t_overlap =
+      dynamic_cast<const pdat::CellOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::BoxList& boxes = t_overlap->getDestinationBoxList();
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      refine(fine,
+         coarse,
+         dst_component,
+         src_component,
+         b(),
+         ratio);
+   }
+}
+
+void CellComplexConstantRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio) const
+{
+   tbox::Pointer<CellData<dcomplex> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<CellData<dcomplex> >
+   fdata = fine.getPatchData(dst_component);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+   TBOX_DIM_ASSERT_CHECK_ARGS5(*this, fine, coarse, fine_box, ratio);
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+   const hier::Index ifirstf = fine_box.lower();
+   const hier::Index ilastf = fine_box.upper();
+
+   for (int d = 0; d < fdata->getDepth(); d++) {
+      if (getDim() == tbox::Dimension(1)) {
+         F77_FUNC(conrefcellcplx1d, CONREFCELLCPLX1D) (ifirstc(0), ilastc(0),
+            ifirstf(0), ilastf(0),
+            cilo(0), cihi(0),
+            filo(0), fihi(0),
+            &ratio[0],
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else if (getDim() == tbox::Dimension(2)) {
+         F77_FUNC(conrefcellcplx2d, CONREFCELLCPLX2D) (ifirstc(0), ifirstc(1),
+            ilastc(0), ilastc(1),
+            ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            &ratio[0],
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else if (getDim() == tbox::Dimension(3)) {
+         F77_FUNC(conrefcellcplx3d, CONREFCELLCPLX3D) (ifirstc(0), ifirstc(1),
+            ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            ifirstf(0), ifirstf(1), ifirstf(2),
+            ilastf(0), ilastf(1), ilastf(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            &ratio[0],
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else {
+         TBOX_ERROR(
+            "CellComplexConstantRefine::refine dimension > 3 not supported"
+            << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellComplexConstantRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellComplexConstantRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,125 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for cell-centered complex data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellComplexConstantRefine
+#define included_pdat_CellComplexConstantRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/xfer/RefineOperator.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class CellComplexConstantRefine implements constant
+ * interpolation for cell-centered complex patch data defined over a
+ * mesh.  It is derived from the xfer::RefineOperator base class.
+ * The numerical operations for interpolation use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is cell-centered complex, and the string is "CONSTANT_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class CellComplexConstantRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CellComplexConstantRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CellComplexConstantRefine();
+
+   /**
+    * Return true if the variable and name string match cell-centered
+    * complex constant interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of cell-centered complex constant interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the constant interpolation operator is the vector
+    * of zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the cell-centered integer constant
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the boxes contained in fine_overlap.
+    * It is assumed that the coarse patch contains sufficient data for the
+    * stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the cell-centered complex constant
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the fine box.   It is assumed that the
+    * coarse patch contains sufficient data for the stencil width of the
+    * refinement operator.  This differs from the above refine() method
+    * only in that it operates on a single fine box instead of a BoxOverlap.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellComplexLinearTimeInterpolateOp.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellComplexLinearTimeInterpolateOp.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,194 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for cell-centered complex data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellComplexLinearTimeInterpolateOp_C
+#define included_pdat_CellComplexLinearTimeInterpolateOp_C
+
+#include "SAMRAI/pdat/CellComplexLinearTimeInterpolateOp.h"
+#include "SAMRAI/tbox/Complex.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN 77 routines.                        *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+// in lintimint1d.f:
+void F77_FUNC(lintimeintcellcmplx1d, LINTIMEINTCELLCMPLX1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+// in lintimint2d.f:
+void F77_FUNC(lintimeintcellcmplx2d, LINTIMEINTCELLCMPLX2D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+// in lintimint3d.f:
+void F77_FUNC(lintimeintcellcmplx3d, LINTIMEINTCELLCMPLX3D) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+CellComplexLinearTimeInterpolateOp::CellComplexLinearTimeInterpolateOp():
+   xfer::TimeInterpolateOperator()
+{
+}
+
+CellComplexLinearTimeInterpolateOp::~CellComplexLinearTimeInterpolateOp()
+{
+}
+
+bool CellComplexLinearTimeInterpolateOp::findTimeInterpolateOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   const tbox::Pointer<CellVariable<dcomplex> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == "STD_LINEAR_TIME_INTERPOLATE")) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+void CellComplexLinearTimeInterpolateOp::timeInterpolate(
+   hier::PatchData& dst_data,
+   const hier::Box& where,
+   const hier::PatchData& src_data_old,
+   const hier::PatchData& src_data_new) const
+{
+   const tbox::Dimension& dim(where.getDim());
+
+   const CellData<dcomplex>* old_dat =
+      dynamic_cast<const CellData<dcomplex> *>(&src_data_old);
+   const CellData<dcomplex>* new_dat =
+      dynamic_cast<const CellData<dcomplex> *>(&src_data_new);
+   CellData<dcomplex>* dst_dat =
+      dynamic_cast<CellData<dcomplex> *>(&dst_data);
+
+   TBOX_ASSERT(old_dat != NULL);
+   TBOX_ASSERT(new_dat != NULL);
+   TBOX_ASSERT(dst_dat != NULL);
+   TBOX_ASSERT(where * old_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * new_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * dst_dat->getGhostBox() == where);
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst_data, where, src_data_old, src_data_new);
+
+   const hier::Index old_ilo = old_dat->getGhostBox().lower();
+   const hier::Index old_ihi = old_dat->getGhostBox().upper();
+   const hier::Index new_ilo = new_dat->getGhostBox().lower();
+   const hier::Index new_ihi = new_dat->getGhostBox().upper();
+
+   const hier::Index dst_ilo = dst_dat->getGhostBox().lower();
+   const hier::Index dst_ihi = dst_dat->getGhostBox().upper();
+
+   const hier::Index ifirst = where.lower();
+   const hier::Index ilast = where.upper();
+
+   const double old_time = old_dat->getTime();
+   const double new_time = new_dat->getTime();
+   const double dst_time = dst_dat->getTime();
+
+   TBOX_ASSERT((old_time < dst_time ||
+                tbox::MathUtilities<double>::equalEps(old_time, dst_time)) &&
+      (dst_time < new_time ||
+       tbox::MathUtilities<double>::equalEps(dst_time, new_time)));
+
+   double tfrac = dst_time - old_time;
+   double denom = new_time - old_time;
+   if (denom > tbox::MathUtilities<double>::getMin()) {
+      tfrac /= denom;
+   } else {
+      tfrac = 0.0;
+   }
+
+   for (int d = 0; d < dst_dat->getDepth(); d++) {
+      if (dim == tbox::Dimension(1)) {
+         F77_FUNC(lintimeintcellcmplx1d, LINTIMEINTCELLCMPLX1D) (ifirst(0),
+            ilast(0),
+            old_ilo(0), old_ihi(0),
+            new_ilo(0), new_ihi(0),
+            dst_ilo(0), dst_ihi(0),
+            tfrac,
+            old_dat->getPointer(d),
+            new_dat->getPointer(d),
+            dst_dat->getPointer(d));
+      } else if (dim == tbox::Dimension(2)) {
+         F77_FUNC(lintimeintcellcmplx2d, LINTIMEINTCELLCMPLX2D) (ifirst(0),
+            ifirst(1), ilast(0), ilast(1),
+            old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+            new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+            dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+            tfrac,
+            old_dat->getPointer(d),
+            new_dat->getPointer(d),
+            dst_dat->getPointer(d));
+      } else if (dim == tbox::Dimension(3)) {
+         F77_FUNC(lintimeintcellcmplx3d, LINTIMEINTCELLCMPLX3D) (ifirst(0),
+            ifirst(1), ifirst(2),
+            ilast(0), ilast(1), ilast(2),
+            old_ilo(0), old_ilo(1), old_ilo(2),
+            old_ihi(0), old_ihi(1), old_ihi(2),
+            new_ilo(0), new_ilo(1), new_ilo(2),
+            new_ihi(0), new_ihi(1), new_ihi(2),
+            dst_ilo(0), dst_ilo(1), dst_ilo(2),
+            dst_ihi(0), dst_ihi(1), dst_ihi(2),
+            tfrac,
+            old_dat->getPointer(d),
+            new_dat->getPointer(d),
+            dst_dat->getPointer(d));
+      } else {
+         TBOX_ERROR(
+            "CellComplexLinearTimeInterpolateOp::TimeInterpolate dim > 3 not supported"
+            << std::endl);
+      }
+
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellComplexLinearTimeInterpolateOp.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellComplexLinearTimeInterpolateOp.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for cell-centered complex data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellComplexLinearTimeInterpolateOp
+#define included_pdat_CellComplexLinearTimeInterpolateOp
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class CellComplexLinearTimeInterpolateOp implements standard
+ * linear time interpolation for cell-centered complex patch data.
+ * It is derived from the xfer::TimeInterpolateOperator base class.
+ * The interpolation uses FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is a cell-centered complex, and the string is
+ * "STD_LINEAR_TIME_INTERPOLATE".
+ *
+ * @see xfer::TimeInterpolateOperator
+ */
+
+class CellComplexLinearTimeInterpolateOp:
+   public xfer::TimeInterpolateOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   CellComplexLinearTimeInterpolateOp();
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CellComplexLinearTimeInterpolateOp();
+
+   /**
+    * Return true if the variable and name string match the standard
+    * cell-centered complex interpolation; otherwise, return false.
+    */
+   bool
+   findTimeInterpolateOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Perform linear time interpolation between two cell-centered complex
+    * patch data sources and place result in the destination patch data.
+    * Time interpolation is performed on the intersection of the destination
+    * patch data and the input box.  The time to which data is interpolated
+    * is provided by the destination data.
+    */
+   void
+   timeInterpolate(
+      hier::PatchData& dst_data,
+      const hier::Box& where,
+      const hier::PatchData& src_data_old,
+      const hier::PatchData& src_data_new) const;
+
+private:
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellData.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellData.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,401 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated cell centered patch data type 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellData_C
+#define included_pdat_CellData_C
+
+#include "SAMRAI/pdat/CellData.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/pdat/CellGeometry.h"
+#include "SAMRAI/pdat/CellOverlap.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#define PDAT_CELLDATA_VERSION 1
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/CellData.I"
+#endif
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * Calculate the amount of memory space needed to represent the data	*
+ * for a cell centered grid.						*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+size_t CellData<TYPE>::getSizeOfData(
+   const hier::Box& box,
+   int depth,
+   const hier::IntVector& ghosts)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(box, ghosts);
+   TBOX_ASSERT(depth > 0);
+
+   const hier::Box ghost_box = hier::Box::grow(box, ghosts);
+   return ArrayData<TYPE>::getSizeOfData(ghost_box, depth);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Constructor and destructor for cell data objects.  The constructor	*
+ * simply initializes data variables and sets up the array data.		*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+CellData<TYPE>::CellData(
+   const hier::Box& box,
+   int depth,
+   const hier::IntVector& ghosts):
+   hier::PatchData(box, ghosts),
+   d_depth(depth),
+   d_data()
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(box, ghosts);
+   TBOX_ASSERT(depth > 0);
+   TBOX_ASSERT(ghosts.min() >= 0);
+
+   d_data.initializeArray(this->getGhostBox(), depth);
+}
+
+template<class TYPE>
+CellData<TYPE>::~CellData()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * The following are private and cannot be used, but they are defined	*
+ * here for compilers that require that every template declaration have	*
+ * a definition (a stupid requirement, if you ask me).			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+CellData<TYPE>::CellData(
+   const CellData<TYPE>& foo):
+   hier::PatchData(foo.getBox(), foo.getGhostCellWidth()),
+   d_data()
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void CellData<TYPE>::operator = (
+   const CellData<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Perform a fast copy between two cell centered arrays where their	*
+ * index spaces overlap.							*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void CellData<TYPE>::copy(
+   const hier::PatchData& src)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_data, src);
+
+   const CellData<TYPE>* t_src =
+      dynamic_cast<const CellData<TYPE> *>(&src);
+   if (t_src == NULL) {
+      src.copy2(*this);
+   } else {
+      const hier::Box box = d_data.getBox() * t_src->d_data.getBox();
+      if (!box.empty()) {
+         d_data.copy(t_src->d_data, box);
+      }
+   }
+}
+
+template<class TYPE>
+void CellData<TYPE>::copy2(
+   hier::PatchData& dst) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_data, dst);
+
+   CellData<TYPE>* t_dst = dynamic_cast<CellData<TYPE> *>(&dst);
+
+   TBOX_ASSERT(t_dst != NULL);
+
+   const hier::Box box = d_data.getBox() * t_dst->d_data.getBox();
+   if (!box.empty()) {
+      t_dst->d_data.copy(d_data, box);
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Copy data from the source into the destination according to the	*
+ * overlap descriptor.							*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void CellData<TYPE>::copy(
+   const hier::PatchData& src,
+   const hier::BoxOverlap& overlap)
+{
+   const CellData<TYPE>* t_src =
+      dynamic_cast<const CellData<TYPE> *>(&src);
+
+   const CellOverlap* t_overlap =
+      dynamic_cast<const CellOverlap *>(&overlap);
+
+   if ((t_src == NULL) || (t_overlap == NULL)) {
+      src.copy2(*this, overlap);
+   } else {
+      d_data.copy(t_src->d_data,
+         t_overlap->getDestinationBoxList(),
+         t_overlap->getSourceOffset());
+   }
+}
+
+template<class TYPE>
+void CellData<TYPE>::copy2(
+   hier::PatchData& dst,
+   const hier::BoxOverlap& overlap) const
+{
+   CellData<TYPE>* t_dst = dynamic_cast<CellData<TYPE> *>(&dst);
+   const CellOverlap* t_overlap =
+      dynamic_cast<const CellOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_dst != NULL);
+   TBOX_ASSERT(t_overlap != NULL);
+
+   t_dst->d_data.copy(d_data,
+      t_overlap->getDestinationBoxList(),
+      t_overlap->getSourceOffset());
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Perform a fast copy between two arrays at the                         *
+ * specified depths, where their	index spaces overlap.			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void CellData<TYPE>::copyDepth(
+   int dst_depth,
+   const CellData<TYPE>& src,
+   int src_depth)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_data, src);
+
+   const hier::Box box = d_data.getBox() * src.d_data.getBox();
+   if (!box.empty()) {
+      d_data.copyDepth(dst_depth, src.d_data, src_depth, box);
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Calculate the buffer space needed to pack/unpack messages on the box	*
+ * region using the overlap descriptor.					*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+bool CellData<TYPE>::canEstimateStreamSizeFromBox() const
+{
+   return ArrayData<TYPE>::canEstimateStreamSizeFromBox();
+}
+
+template<class TYPE>
+int CellData<TYPE>::getDataStreamSize(
+   const hier::BoxOverlap& overlap) const
+{
+   const CellOverlap* t_overlap =
+      dynamic_cast<const CellOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   return d_data.getDataStreamSize(t_overlap->getDestinationBoxList(),
+      t_overlap->getSourceOffset());
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Pack/unpack data into/out of the message streams using the index	*
+ * space in the overlap descriptor.					*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void CellData<TYPE>::packStream(
+   tbox::MessageStream& stream,
+   const hier::BoxOverlap& overlap) const
+{
+   const CellOverlap* t_overlap =
+      dynamic_cast<const CellOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   d_data.packStream(stream, t_overlap->getDestinationBoxList(),
+      t_overlap->getSourceOffset());
+}
+
+template<class TYPE>
+void CellData<TYPE>::unpackStream(
+   tbox::MessageStream& stream,
+   const hier::BoxOverlap& overlap)
+{
+   const CellOverlap* t_overlap =
+      dynamic_cast<const CellOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   d_data.unpackStream(stream, t_overlap->getDestinationBoxList(),
+      t_overlap->getSourceOffset());
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Print cell centered data.  Note:  makes call to specialized print     *
+ * routine in CellDataSpecialized.C                                     *
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void CellData<TYPE>::print(
+   const hier::Box& box,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   for (int d = 0; d < d_depth; d++) {
+      os << "Array depth = " << d << std::endl;
+      print(box, d, os, prec);
+   }
+}
+
+template<class TYPE>
+void CellData<TYPE>::print(
+   const hier::Box& box,
+   int depth,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   os.precision(prec);
+   for (CellIterator i(box); i; i++) {
+      os << "array" << i() << " = "
+         << d_data(i(), depth) << std::endl << std::flush;
+      os << std::flush;
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Checks that class version and restart file version are equal.  If so,	*
+ * reads in the d_depth data member to the database.  Then tells		*
+ * d_data to read itself in from the database.				*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void CellData<TYPE>::getSpecializedFromDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+
+   TBOX_ASSERT(!database.isNull());
+
+   int ver = database->getInteger("PDAT_CELLDATA_VERSION");
+   if (ver != PDAT_CELLDATA_VERSION) {
+      TBOX_ERROR("CellData<DIM>::getSpecializedFromDatabase error...\n"
+         << "Restart file version different than class version" << std::endl);
+   }
+
+   d_depth = database->getInteger("d_depth");
+
+   tbox::Pointer<tbox::Database> array_database;
+   array_database = database->getDatabase("d_data");
+   d_data.getFromDatabase(array_database);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Write out the class version number, d_depth data member to the	*
+ * database.  Then tells d_data to write itself to the database.		*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void CellData<TYPE>::putSpecializedToDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   database->putInteger("PDAT_CELLDATA_VERSION", PDAT_CELLDATA_VERSION);
+
+   database->putInteger("d_depth", d_depth);
+
+   tbox::Pointer<tbox::Database> array_database;
+   array_database = database->putDatabase("d_data");
+   d_data.putToDatabase(array_database);
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellData.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellData.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,131 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated cell centered patch data type 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int CellData<TYPE>::getDepth() const
+{
+   return d_depth;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ArrayData<TYPE>& CellData<TYPE>::getArrayData()
+{
+   return d_data;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const ArrayData<TYPE>& CellData<TYPE>::getArrayData() const
+{
+   return d_data;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE * CellData<TYPE>::getPointer(
+   int depth)
+{
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data.getPointer(depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE * CellData<TYPE>::getPointer(
+   int depth) const
+{
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data.getPointer(depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE & CellData<TYPE>::operator () (
+   const CellIndex& i,
+   int depth)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, i);
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data(i, depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE &CellData<TYPE>::operator () (
+   const CellIndex& i,
+   int depth) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, i);
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data(i, depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void CellData<TYPE>::fill(
+   const TYPE& t,
+   int d)
+{
+
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   d_data.fill(t, d);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void CellData<TYPE>::fill(
+   const TYPE& t,
+   const hier::Box& box,
+   int d)
+{
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   d_data.fill(t, box, d);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void CellData<TYPE>::fillAll(
+   const TYPE& t)
+{
+   d_data.fillAll(t);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD void CellData<TYPE>::fillAll(
+   const TYPE& t,
+   const hier::Box& box)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   d_data.fillAll(t, box);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD void CellData<TYPE>::copyOnBox(
+   const CellData<TYPE>& src,
+   const hier::Box& box)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*this, src, box);
+   const hier::Box cell_box = CellGeometry::toCellBox(box);
+   d_data.copy(src.getArrayData(), cell_box);
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellData.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellData.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,410 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated cell centered patch data type 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellData
+#define included_pdat_CellData
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * @brief Class CellData<DIM> provides an implementation for data defined
+ * at cell centers on AMR patches.  It is derived from the
+ * hier::PatchData interface common to all SAMRAI patch data types.
+ * Given a CELL-centered AMR index space box, a cell data object represents
+ * data of some template TYPE and depth at the centers of the cells in the box.
+ * Here, depth indicates the number of data values at each cell index location.
+ * The CellGeometry class provides the translation between the standard SAMRAI
+ * cell-centered AMR index space and cell-centered data.
+ *
+ * A cell-centerd data array is stored in (i,...,k,d) order, where
+ * i,...,k are spatial indices and d indicates the depth at that location.
+ * Memory allocation is in column-major ordering (e.g., Fortran style)
+ * so that the leftmost index runs fastest in memory.  For example, a
+ * three-dimensional cell data object defined over a box
+ * [l0:u0,l1:u1,l2:u2] holds a data array dimensioned as
+ * \verbatim
+ *
+ *   [ l0 : u0 ,
+ *     l1 : u1 ,
+ *     l2 : u2 , d ]
+ *
+ * \endverbatim
+ * Other spatial dimensions are represented similarly.
+ *
+ * The data type TYPE must define a default constructor (i.e., taking no
+ * arguments) and also the copy assignment operator.
+ *
+ * @see pdat::ArrayData
+ * @see hier::PatchData
+ * @see pdat::CellDataFactory
+ * @see pdat::CellIndex
+ * @see pdat::CellIterator
+ * @see pdat::CellGeometry
+ */
+
+template<class TYPE>
+class CellData:public hier::PatchData
+{
+public:
+   /*!
+    * @brief Calculate the amount of memory needed to represent cell-
+    * centered data over a CELL-centered AMR index space box.
+    *
+    * This function assumes that the amount of memory
+    * needed for TYPE is sizeof(TYPE).  If this is not the case, then a
+    * specialized function must be defined.
+    *
+    * @param box const Box reference describing the interior of the
+    *            standard CELL-centered index box over which the
+    *            cell data object will be created.
+    * @param depth gives the number of components for each
+    *              spatial location in the array.
+    * @param ghosts const IntVector reference indicating the width
+    *              of the ghost cell region around the box over which
+    *              the node data will be allocated.
+    */
+   static size_t
+   getSizeOfData(
+      const hier::Box& box,
+      int depth,
+      const hier::IntVector& ghosts);
+
+   /*!
+    * @brief The constructor for an cell data object.
+    *
+    * @param box const Box reference describing the interior of the
+    *            standard CELL-centered index box over which the
+    *            cell data object will be created.
+    * @param depth gives the number of components for each
+    *              spatial location in the array.
+    * @param ghosts const IntVector reference indicating the width
+    *              of the ghost cell region around the box over which
+    *              the node data will be allocated.
+    */
+   explicit CellData(
+      const hier::Box& box,
+      int depth,
+      const hier::IntVector& ghosts);
+
+   /*!
+    * @brief The virtual destructor for a cell data object.
+    */
+   virtual ~CellData<TYPE>();
+
+   /*!
+    * @brief Return the depth (e.g., the number of components in each spatial
+    * location) of the array.
+    */
+   int
+   getDepth() const;
+
+   /*!
+    * @brief Get a pointer to the beginning of a depth
+    * component of the cell centered array.
+    */
+   TYPE *
+   getPointer(
+      int depth = 0);
+
+   /*!
+    * @brief Get a const pointer to the beginning of a depth
+    * component of the cell centered array.
+    */
+   const TYPE *
+   getPointer(
+      int depth = 0) const;
+
+   /*!
+    * @brief Return reference to cell data entry corresponding
+    * to a given cell index and depth.
+    */
+   TYPE&
+   operator () (
+      const CellIndex& i,
+      int depth = 0);
+
+   /*!
+    * @brief Return a const reference to cell data entry corresponding
+    * to a given cell index and depth.
+    */
+   const TYPE&
+   operator () (
+      const CellIndex& i,
+      int depth = 0) const;
+
+   /*!
+    * @brief Return a reference to the array data object for
+    * the cell centered data object.
+    */
+   ArrayData<TYPE>&
+   getArrayData();
+
+   /*!
+    * @brief Return a const reference to the array data object for
+    * the cell centered data object.
+    */
+   const ArrayData<TYPE>&
+   getArrayData() const;
+
+   /*!
+    * @brief A fast copy from source to destination (i.e., this)
+    * patch data object.
+    *
+    * Data is copied where there is overlap in the underlying index space.
+    * The copy is performed on the interior plus the ghost cell width (for
+    * both the source and destination).  Currently, source data must be
+    * CellData of the same DIM and TYPE.  If not, then an unrecoverable
+    * error results.
+    */
+   virtual void
+   copy(
+      const hier::PatchData& src);
+
+   /*!
+    * @brief A fast copy from source (i.e., this) to destination
+    * patch data object.
+    *
+    * Data is copied where there is overlap in the underlying index space.
+    * The copy is performed on the interior plus the ghost cell width (for
+    * both the source and destination).  Currently, destination data must be
+    * CellData of the same DIM and TYPE.  If not, then an unrecoverable
+    * error results.
+    */
+   virtual void
+   copy2(
+      hier::PatchData& dst) const;
+
+   /*!
+    * @brief Copy data from source to destination (i.e., this)
+    * patch data object on the given overlap.
+    *
+    * Currently, source data must be CellData of the same DIM and TYPE
+    * and the overlap must be a CellOverlap of the same DIM.
+    * If not, then an unrecoverable error results.
+    */
+   virtual void
+   copy(
+      const hier::PatchData& src,
+      const hier::BoxOverlap& overlap);
+
+   /*!
+    * @brief Copy data from source (i.e., this) to destination
+    * patch data object on the given overlap.
+    *
+    * Currently, destination data must be CellData of the same DIM and TYPE
+    * and the overlap must be a CellOverlap of the same DIM.
+    * If not, then an unrecoverable error results.
+    */
+   virtual void
+   copy2(
+      hier::PatchData& dst,
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Copy data from source to destination (i.e., this)
+    * patch data object on the given CELL-centered AMR index box.
+    */
+   void
+   copyOnBox(
+      const CellData<TYPE>& src,
+      const hier::Box& box);
+
+   /*!
+    * @brief Fast copy (i.e., source and this cell data objects are
+    * defined over the same box) to this destination cell data object
+    * from the given source cell data object at the specified depths.
+    */
+   virtual void
+   copyDepth(
+      int dst_depth,
+      const CellData<TYPE>& src,
+      int src_depth);
+
+   /*!
+    * @brief Return true if the patch data object can estimate the
+    * stream size required to fit its data using only index
+    * space information (i.e., a box).
+    *
+    * This routine is defined for the standard types (bool, char,
+    * double, float, int, and dcomplex).
+    */
+   virtual bool
+   canEstimateStreamSizeFromBox() const;
+
+   /*!
+    * @brief Return the number of bytes needed to stream the data
+    * in this patch data object lying in the specified box overlap
+    * region.
+    *
+    * This routine is defined for the standard types (bool, char,
+    * double, float, int, and dcomplex).
+    */
+   virtual int
+   getDataStreamSize(
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Unpack data from stream into this patch data object over
+    * the specified box overlap region.  The overlap must be a
+    * CellOverlap of the same DIM.
+    */
+   virtual void
+   packStream(
+      tbox::MessageStream& stream,
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Unpack data from stream into this patch data object
+    * over the specified box overlap region.  The overlap must be a
+    * CellOverlap of the same DIM.
+    */
+   virtual void
+   unpackStream(
+      tbox::MessageStream& stream,
+      const hier::BoxOverlap& overlap);
+
+   /*!
+    * @brief Fill all values at depth d with the value t.
+    */
+   void
+   fill(
+      const TYPE& t,
+      int d = 0);
+
+   /*!
+    * @brief Fill all values at depth d within the box with the value t.
+    */
+   void
+   fill(
+      const TYPE& t,
+      const hier::Box& box,
+      int d = 0);
+
+   /*!
+    * @brief Fill all depth components with value t.
+    */
+   void
+   fillAll(
+      const TYPE& t);
+
+   /*!
+    * @brief Fill all depth components within the box with value t.
+    */
+   void
+   fillAll(
+      const TYPE& t,
+      const hier::Box& box);
+
+   /*!
+    * @brief Print all cell data values residing in the specified box.
+    * If the depth of the array is greater than one, all depths are printed.
+    *
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to cell index space.
+    * @param os   reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   print(
+      const hier::Box& box,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Print all cell data values at the given array depth in
+    * the specified box.
+    *
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to cell index space.
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    * @param os   reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   print(
+      const hier::Box& box,
+      int depth,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * Check that class version and restart file version are equal.
+    * If so, read data members from the database.
+    *
+    * Assertions: database must be a non-null pointer.
+    */
+   virtual void
+   getSpecializedFromDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+   /*!
+    * Write out the class version number and other data members to
+    * the database.
+    *
+    * Assertions: database must be a non-null pointer.
+    */
+   virtual void
+   putSpecializedToDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+   /*!
+    * The cell iterator iterates over the elements of a cell
+    * centered box geometry.  This typedef is a convenience
+    * for using the CellIterator class.
+    */
+   typedef CellIterator Iterator;
+
+private:
+   CellData(
+      const CellData<TYPE>&);           // not implemented
+   void
+   operator = (
+      const CellData<TYPE>&);                           // not implemented
+
+   int d_depth;
+   ArrayData<TYPE> d_data;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/CellData.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/CellData.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellDataFactory.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellDataFactory.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,182 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating cell data objects 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellDataFactory_C
+#define included_pdat_CellDataFactory_C
+
+#include "SAMRAI/pdat/CellDataFactory.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellGeometry.h"
+#include "SAMRAI/hier/Patch.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/CellDataFactory.I"
+#endif
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * The constructor simply caches the default ghost cell width and depth.	*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+CellDataFactory<TYPE>::CellDataFactory(
+   int depth,
+   const hier::IntVector& ghosts):
+   hier::PatchDataFactory(ghosts),
+   d_depth(depth),
+   d_mb_trans(NULL)
+{
+   TBOX_ASSERT(depth > 0);
+   TBOX_ASSERT(ghosts.min() >= 0);
+
+   d_mb_trans = NULL;
+}
+
+template<class TYPE>
+CellDataFactory<TYPE>::~CellDataFactory()
+{
+   if (d_mb_trans) {
+      delete d_mb_trans;
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Clone the factory and copy the default parameters to the new factory.	*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::PatchDataFactory>
+CellDataFactory<TYPE>::cloneFactory(
+   const hier::IntVector& ghosts)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, ghosts);
+
+   return tbox::Pointer<hier::PatchDataFactory>(new CellDataFactory<TYPE>(
+                                                   d_depth, ghosts));
+}
+
+/*
+ *************************************************************************
+ *
+ * Allocate the concrete cell data classes.
+ *
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::PatchData>
+CellDataFactory<TYPE>::allocate(
+   const hier::Patch& patch) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, patch);
+
+   hier::PatchData* patchdata =
+      new CellData<TYPE>(patch.getBox(), this->d_depth, this->d_ghosts);
+   return tbox::Pointer<hier::PatchData>(patchdata);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Return the box geometry type for cell data objects.			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::BoxGeometry>
+CellDataFactory<TYPE>::getBoxGeometry(
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   hier::BoxGeometry* boxgeometry = new CellGeometry(box, this->d_ghosts);
+   return tbox::Pointer<hier::BoxGeometry>(boxgeometry);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Calculate the amount of memory needed to allocate the data object.	*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+size_t CellDataFactory<TYPE>::getSizeOfMemory(
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   const size_t obj =
+      tbox::MemoryUtilities::align(sizeof(CellData<TYPE>));
+   const size_t data =
+      CellData<TYPE>::getSizeOfData(box, d_depth, this->d_ghosts);
+   return obj + data;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Determine whether this is a valid copy operation to/from CellData     *
+ * between the supplied datatype.                                        *
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+bool CellDataFactory<TYPE>::validCopyTo(
+   const tbox::Pointer<hier::PatchDataFactory>& dst_pdf) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *dst_pdf);
+
+   bool valid_copy = false;
+
+   /*
+    * Only valid option is CellData.
+    */
+   tbox::Pointer<CellDataFactory<TYPE> > cdf = dst_pdf;
+   if (!cdf.isNull()) {
+      valid_copy = true;
+   }
+   return valid_copy;
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellDataFactory.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellDataFactory.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,33 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating cell data objects 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int CellDataFactory<TYPE>::getDepth() const
+{
+   return d_depth;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+hier::MultiblockDataTranslator *
+CellDataFactory<TYPE>::getMultiblockDataTranslator()
+{
+   if (d_mb_trans == NULL) {
+      d_mb_trans = new MultiblockCellDataTranslator<TYPE>();
+   }
+   return d_mb_trans;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellDataFactory.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellDataFactory.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,153 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating cell data objects 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellDataFactory
+#define included_pdat_CellDataFactory
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/MultiblockCellDataTranslator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/MultiblockDataTranslator.h"
+#include "SAMRAI/hier/PatchDataFactory.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class CellDataFactory is a factory class used to allocate new
+ * instances of CellData objects.  It is a subclass of the patch
+ * data factory class and cell data is a subclass of patch data.  Both
+ * the factory and data classes are templated on the type of the contained
+ * object (e.g., double or int).
+ *
+ * @see pdat::CellData
+ * @see pdat::PatchDataFactory
+ */
+
+template<class TYPE>
+class CellDataFactory:public hier::PatchDataFactory
+{
+public:
+   /**
+    * The default constructor for the cell data factory class.  The ghost
+    * cell width and depth (number of components) arguments give the defaults
+    * for all cell data objects created with this factory.
+    */
+   explicit CellDataFactory(
+      int depth,
+      const hier::IntVector& ghosts);
+
+   /**
+    * Virtual destructor for the cell data factory class.
+    */
+   virtual ~CellDataFactory<TYPE>();
+
+   /**
+    * @brief Abstract virtual function to clone a patch data factory.
+    *
+    * This will return a new instantiation of the abstract factory
+    * with the same properties.  The properties of the cloned factory
+    * can then be changed without modifying the original.
+    *
+    * @param ghosts default ghost cell width for concrete classes created from
+    * the factory.
+    */
+   virtual tbox::Pointer<hier::PatchDataFactory>
+   cloneFactory(
+      const hier::IntVector& ghosts);
+
+   /**
+    * Virtual factory function to allocate a concrete cell data object.
+    * The default information about the object (e.g., ghost cell width)
+    * is taken from the factory.
+    */
+   virtual tbox::Pointer<hier::PatchData>
+   allocate(
+      const hier::Patch& patch) const;
+
+   /**
+    * Allocate the box geometry object associated with the patch data.
+    * This information will be used in the computation of intersections
+    * and data dependencies between objects.
+    */
+
+   virtual tbox::Pointer<hier::BoxGeometry>
+   getBoxGeometry(
+      const hier::Box& box) const;
+
+   /**
+    * Get the depth (number of components).  This is the depth that
+    * will be used in the instantiation of cell data objects.
+    */
+   int
+   getDepth() const;
+
+   /**
+    * Calculate the amount of memory needed to store the cell data object,
+    * including object data and dynamically allocated data.
+    */
+   virtual size_t
+   getSizeOfMemory(
+      const hier::Box& box) const;
+
+   /**
+    * Return a boolean true value indicating that the cell data quantities will always
+    * be treated as though fine values represent them on coarse-fine interfaces.
+    * See the CellVariable<DIM> class header file for more information.
+    */
+   bool fineBoundaryRepresentsVariable() const {
+      return true;
+   }
+
+   /**
+    * Return false since the cell data index space matches the cell-centered
+    * index space for AMR patches.  Thus, cell data does not live on patch borders.
+    */
+   bool dataLivesOnPatchBorder() const {
+      return false;
+   }
+
+   /**
+    * Return whether it is valid to copy this CellDataFactory to the
+    * supplied destination patch data factory. It will return true if
+    * dst_pdf is a CellDataFactory, false otherwise.
+    */
+   bool
+   validCopyTo(
+      const tbox::Pointer<hier::PatchDataFactory>& dst_pdf) const;
+
+   /**
+    * Return pointer to a multiblock data translator
+    */
+   hier::MultiblockDataTranslator *
+   getMultiblockDataTranslator();
+
+private:
+   int d_depth;
+
+   MultiblockCellDataTranslator<TYPE>* d_mb_trans;
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/CellDataFactory.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/CellDataFactory.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellDoubleConstantRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellDoubleConstantRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,206 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for cell-centered double data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellDoubleConstantRefine_C
+#define included_pdat_CellDoubleConstantRefine_C
+
+#include "SAMRAI/pdat/CellDoubleConstantRefine.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <float.h>
+#include <math.h>
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in conrefine1d.f:
+void F77_FUNC(conrefcelldoub1d, CONREFCELLDOUB1D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const double *, double *);
+// in conrefine2d.f:
+void F77_FUNC(conrefcelldoub2d, CONREFCELLDOUB2D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const double *, double *);
+// in conrefine3d.f:
+void F77_FUNC(conrefcelldoub3d, CONREFCELLDOUB3D) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const double *, double *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+CellDoubleConstantRefine::CellDoubleConstantRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSTANT_REFINE"),
+   d_name_id("CONSTANT_REFINE")
+{
+}
+
+CellDoubleConstantRefine::~CellDoubleConstantRefine()
+{
+}
+
+bool CellDoubleConstantRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<CellVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CellDoubleConstantRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int CellDoubleConstantRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CellDoubleConstantRefine::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void CellDoubleConstantRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const pdat::CellOverlap* t_overlap =
+      dynamic_cast<const pdat::CellOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::BoxList& boxes = t_overlap->getDestinationBoxList();
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      refine(fine,
+         coarse,
+         dst_component,
+         src_component,
+         b(),
+         ratio);
+   }
+}
+
+void CellDoubleConstantRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio) const
+{
+   tbox::Pointer<CellData<double> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<CellData<double> >
+   fdata = fine.getPatchData(dst_component);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+   TBOX_DIM_ASSERT_CHECK_ARGS5(*this, fine, coarse, fine_box, ratio);
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+   const hier::Index ifirstf = fine_box.lower();
+   const hier::Index ilastf = fine_box.upper();
+
+   for (int d = 0; d < fdata->getDepth(); d++) {
+      if (getDim() == tbox::Dimension(1)) {
+         F77_FUNC(conrefcelldoub1d, CONREFCELLDOUB1D) (ifirstc(0), ilastc(0),
+            ifirstf(0), ilastf(0),
+            cilo(0), cihi(0),
+            filo(0), fihi(0),
+            &ratio[0],
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else if (getDim() == tbox::Dimension(2)) {
+         F77_FUNC(conrefcelldoub2d, CONREFCELLDOUB2D) (ifirstc(0), ifirstc(1),
+            ilastc(0), ilastc(1),
+            ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            &ratio[0],
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else if (getDim() == tbox::Dimension(3)) {
+         F77_FUNC(conrefcelldoub3d, CONREFCELLDOUB3D) (ifirstc(0), ifirstc(1),
+            ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            ifirstf(0), ifirstf(1), ifirstf(2),
+            ilastf(0), ilastf(1), ilastf(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            &ratio[0],
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else {
+         TBOX_ERROR(
+            "CellDoubleConstantRefine::refine dimension > 3 not supported"
+            << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellDoubleConstantRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellDoubleConstantRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,126 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for cell-centered double data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellDoubleConstantRefine
+#define included_pdat_CellDoubleConstantRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class CellDoubleConstantRefine implements constant
+ * interpolation for cell-centered double patch data defined over a
+ * mesh.  It is derived from the xfer::RefineOperator base class.
+ * The numerical operations for interpolation use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is cell-centered double, and the string is "CONSTANT_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class CellDoubleConstantRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CellDoubleConstantRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CellDoubleConstantRefine();
+
+   /**
+    * Return true if the variable and name string match cell-centered
+    * double constant interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of cell-centered double constant interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the constant interpolation operator is the vector
+    * of zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the cell-centered double constant
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the boxes contained in fine_overlap.
+    * It is assumed that the coarse patch contains sufficient data for the
+    * stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the cell-centered double constant
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the fine box.   It is assumed that the
+    * coarse patch contains sufficient data for the stencil width of the
+    * refinement operator.  This differs from the above refine() method
+    * only in that it operates on a single fine box instead of a BoxOverlap.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellDoubleLinearTimeInterpolateOp.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellDoubleLinearTimeInterpolateOp.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,195 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for cell-centered double patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellDoubleLinearTimeInterpolateOp_C
+#define included_pdat_CellDoubleLinearTimeInterpolateOp_C
+
+#include "SAMRAI/pdat/CellDoubleLinearTimeInterpolateOp.h"
+
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in lintimint1d.f:
+void F77_FUNC(lintimeintcelldoub1d, LINTIMEINTCELLDOUB1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+// in lintimint2d.f:
+void F77_FUNC(lintimeintcelldoub2d, LINTIMEINTCELLDOUB2D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+// in lintimint3d.f:
+void F77_FUNC(lintimeintcelldoub3d, LINTIMEINTCELLDOUB3D) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+CellDoubleLinearTimeInterpolateOp::CellDoubleLinearTimeInterpolateOp():
+   xfer::TimeInterpolateOperator()
+{
+}
+
+CellDoubleLinearTimeInterpolateOp::~CellDoubleLinearTimeInterpolateOp()
+{
+}
+
+bool CellDoubleLinearTimeInterpolateOp::findTimeInterpolateOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   const tbox::Pointer<CellVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == "STD_LINEAR_TIME_INTERPOLATE")) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+void CellDoubleLinearTimeInterpolateOp::timeInterpolate(
+   hier::PatchData& dst_data,
+   const hier::Box& where,
+   const hier::PatchData& src_data_old,
+   const hier::PatchData& src_data_new) const
+{
+   const tbox::Dimension& dim(where.getDim());
+
+   const CellData<double>* old_dat =
+      dynamic_cast<const CellData<double> *>(&src_data_old);
+   const CellData<double>* new_dat =
+      dynamic_cast<const CellData<double> *>(&src_data_new);
+   CellData<double>* dst_dat =
+      dynamic_cast<CellData<double> *>(&dst_data);
+
+   TBOX_ASSERT(old_dat != NULL);
+   TBOX_ASSERT(new_dat != NULL);
+   TBOX_ASSERT(dst_dat != NULL);
+   TBOX_ASSERT(where * old_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * new_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * dst_dat->getGhostBox() == where);
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst_data, where, src_data_old, src_data_new);
+
+   const hier::Index old_ilo = old_dat->getGhostBox().lower();
+   const hier::Index old_ihi = old_dat->getGhostBox().upper();
+   const hier::Index new_ilo = new_dat->getGhostBox().lower();
+   const hier::Index new_ihi = new_dat->getGhostBox().upper();
+
+   const hier::Index dst_ilo = dst_dat->getGhostBox().lower();
+   const hier::Index dst_ihi = dst_dat->getGhostBox().upper();
+
+   const hier::Index ifirst = where.lower();
+   const hier::Index ilast = where.upper();
+
+   const double old_time = old_dat->getTime();
+   const double new_time = new_dat->getTime();
+   const double dst_time = dst_dat->getTime();
+
+   TBOX_ASSERT((old_time < dst_time ||
+                tbox::MathUtilities<double>::equalEps(old_time, dst_time)) &&
+      (dst_time < new_time ||
+       tbox::MathUtilities<double>::equalEps(dst_time, new_time)));
+
+   double tfrac = dst_time - old_time;
+   double denom = new_time - old_time;
+   if (denom > tbox::MathUtilities<double>::getMin()) {
+      tfrac /= denom;
+   } else {
+      tfrac = 0.0;
+   }
+
+   for (int d = 0; d < dst_dat->getDepth(); d++) {
+      if (dim == tbox::Dimension(1)) {
+         F77_FUNC(lintimeintcelldoub1d, LINTIMEINTCELLDOUB1D) (ifirst(0),
+            ilast(0),
+            old_ilo(0), old_ihi(0),
+            new_ilo(0), new_ihi(0),
+            dst_ilo(0), dst_ihi(0),
+            tfrac,
+            old_dat->getPointer(d),
+            new_dat->getPointer(d),
+            dst_dat->getPointer(d));
+      } else if (dim == tbox::Dimension(2)) {
+         F77_FUNC(lintimeintcelldoub2d, LINTIMEINTCELLDOUB2D) (ifirst(0),
+            ifirst(1), ilast(0), ilast(1),
+            old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+            new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+            dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+            tfrac,
+            old_dat->getPointer(d),
+            new_dat->getPointer(d),
+            dst_dat->getPointer(d));
+      } else if (dim == tbox::Dimension(3)) {
+         F77_FUNC(lintimeintcelldoub3d, LINTIMEINTCELLDOUB3D) (ifirst(0),
+            ifirst(1), ifirst(2),
+            ilast(0), ilast(1), ilast(2),
+            old_ilo(0), old_ilo(1), old_ilo(2),
+            old_ihi(0), old_ihi(1), old_ihi(2),
+            new_ilo(0), new_ilo(1), new_ilo(2),
+            new_ihi(0), new_ihi(1), new_ihi(2),
+            dst_ilo(0), dst_ilo(1), dst_ilo(2),
+            dst_ihi(0), dst_ihi(1), dst_ihi(2),
+            tfrac,
+            old_dat->getPointer(d),
+            new_dat->getPointer(d),
+            dst_dat->getPointer(d));
+      } else {
+         TBOX_ERROR(
+            "CellDoubleLinearTimeInterpolateOp::TimeInterpolate dim > 3 not supported"
+            << std::endl);
+      }
+
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellDoubleLinearTimeInterpolateOp.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellDoubleLinearTimeInterpolateOp.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for cell-centered double patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellDoubleLinearTimeInterpolateOp
+#define included_pdat_CellDoubleLinearTimeInterpolateOp
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class CellDoubleLinearTimeInterpolateOp implements standard
+ * linear time interpolation for cell-centered double patch data.
+ * It is derived from the xfer::TimeInterpolateOperator base class.
+ * The interpolation uses FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is a cell-centered double, and the string is
+ * "STD_LINEAR_TIME_INTERPOLATE".
+ *
+ * @see xfer::TimeInterpolateOperator
+ */
+
+class CellDoubleLinearTimeInterpolateOp:
+   public xfer::TimeInterpolateOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   CellDoubleLinearTimeInterpolateOp();
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CellDoubleLinearTimeInterpolateOp();
+
+   /**
+    * Return true if the variable and name string match the standard
+    * cell-centered double interpolation; otherwise, return false.
+    */
+   bool
+   findTimeInterpolateOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Perform linear time interpolation between two cell-centered double
+    * patch data sources and place result in the destination patch data.
+    * Time interpolation is performed on the intersection of the destination
+    * patch data and the input box.  The time to which data is interpolated
+    * is provided by the destination data.
+    */
+   void
+   timeInterpolate(
+      hier::PatchData& dst_data,
+      const hier::Box& where,
+      const hier::PatchData& src_data_old,
+      const hier::PatchData& src_data_new) const;
+
+private:
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellFloatConstantRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellFloatConstantRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,203 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for cell-centered float data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellFloatConstantRefine_C
+#define included_pdat_CellFloatConstantRefine_C
+
+#include "SAMRAI/pdat/CellFloatConstantRefine.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in conrefine1d.f:
+void F77_FUNC(conrefcellflot1d, CONREFCELLFLOT1D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const float *, float *);
+// in conrefine2d.f:
+void F77_FUNC(conrefcellflot2d, CONREFCELLFLOT2D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const float *, float *);
+// in conrefine3d.f:
+void F77_FUNC(conrefcellflot3d, CONREFCELLFLOT3D) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const float *, float *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+CellFloatConstantRefine::CellFloatConstantRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSTANT_REFINE"),
+   d_name_id("CONSTANT_REFINE")
+{
+}
+
+CellFloatConstantRefine::~CellFloatConstantRefine()
+{
+}
+
+bool CellFloatConstantRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<CellVariable<float> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CellFloatConstantRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int CellFloatConstantRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CellFloatConstantRefine::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void CellFloatConstantRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const pdat::CellOverlap* t_overlap =
+      dynamic_cast<const pdat::CellOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::BoxList& boxes = t_overlap->getDestinationBoxList();
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      refine(fine,
+         coarse,
+         dst_component,
+         src_component,
+         b(),
+         ratio);
+   }
+}
+
+void CellFloatConstantRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio) const
+{
+   tbox::Pointer<CellData<float> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<CellData<float> >
+   fdata = fine.getPatchData(dst_component);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+   TBOX_DIM_ASSERT_CHECK_ARGS5(*this, fine, coarse, fine_box, ratio);
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+   const hier::Index ifirstf = fine_box.lower();
+   const hier::Index ilastf = fine_box.upper();
+
+   for (int d = 0; d < fdata->getDepth(); d++) {
+      if (getDim() == tbox::Dimension(1)) {
+         F77_FUNC(conrefcellflot1d, CONREFCELLFLOT1D) (ifirstc(0), ilastc(0),
+            ifirstf(0), ilastf(0),
+            cilo(0), cihi(0),
+            filo(0), fihi(0),
+            &ratio[0],
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else if (getDim() == tbox::Dimension(2)) {
+         F77_FUNC(conrefcellflot2d, CONREFCELLFLOT2D) (ifirstc(0), ifirstc(1),
+            ilastc(0), ilastc(1),
+            ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            &ratio[0],
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else if (getDim() == tbox::Dimension(3)) {
+         F77_FUNC(conrefcellflot3d, conrefcellflot3d) (ifirstc(0), ifirstc(1),
+            ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            ifirstf(0), ifirstf(1), ifirstf(2),
+            ilastf(0), ilastf(1), ilastf(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            &ratio[0],
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else {
+         TBOX_ERROR(
+            "CellFloatConstantRefine::refine dimension > 3 not supported"
+            << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellFloatConstantRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellFloatConstantRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,126 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for cell-centered float data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellFloatConstantRefine
+#define included_pdat_CellFloatConstantRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class CellFloatConstantRefine implements constant
+ * interpolation for cell-centered float patch data defined over a
+ * mesh.  It is derived from the xfer::RefineOperator base class.
+ * The numerical operations for interpolation use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is cell-centered float, and the string is "CONSTANT_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class CellFloatConstantRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CellFloatConstantRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CellFloatConstantRefine();
+
+   /**
+    * Return true if the variable and name string match cell-centered
+    * float constant interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of cell-centered float constant interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the constant interpolation operator is the vector
+    * of zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the cell-centered float constant
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the boxes contained in fine_overlap.
+    * It is assumed that the coarse patch contains sufficient data for the
+    * stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the cell-centered float constant
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the fine box.   It is assumed that the
+    * coarse patch contains sufficient data for the stencil width of the
+    * refinement operator.  This differs from the above refine() method
+    * only in that it operates on a single fine box instead of a BoxOverlap.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellFloatLinearTimeInterpolateOp.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellFloatLinearTimeInterpolateOp.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,194 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for cell-centered float patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellFloatLinearTimeInterpolateOp_C
+#define included_pdat_CellFloatLinearTimeInterpolateOp_C
+
+#include "SAMRAI/pdat/CellFloatLinearTimeInterpolateOp.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN 77 routines.                        *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in lintimint1d.f:
+void F77_FUNC(lintimeintcellfloat1d, LINTIMEINTCELLFLOAT1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+// in lintimint2d.f:
+void F77_FUNC(lintimeintcellfloat2d, LINTIMEINTCELLFLOAT2D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+// in lintimint3d.f:
+void F77_FUNC(lintimeintcellfloat3d, LINTIMEINTCELLFLOAT3D) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+CellFloatLinearTimeInterpolateOp::CellFloatLinearTimeInterpolateOp():
+   xfer::TimeInterpolateOperator()
+{
+}
+
+CellFloatLinearTimeInterpolateOp::~CellFloatLinearTimeInterpolateOp()
+{
+}
+
+bool CellFloatLinearTimeInterpolateOp::findTimeInterpolateOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   const tbox::Pointer<CellVariable<float> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == "STD_LINEAR_TIME_INTERPOLATE")) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+void CellFloatLinearTimeInterpolateOp::timeInterpolate(
+   hier::PatchData& dst_data,
+   const hier::Box& where,
+   const hier::PatchData& src_data_old,
+   const hier::PatchData& src_data_new) const
+{
+   const tbox::Dimension& dim(where.getDim());
+
+   const CellData<float>* old_dat =
+      dynamic_cast<const CellData<float> *>(&src_data_old);
+   const CellData<float>* new_dat =
+      dynamic_cast<const CellData<float> *>(&src_data_new);
+   CellData<float>* dst_dat =
+      dynamic_cast<CellData<float> *>(&dst_data);
+
+   TBOX_ASSERT(old_dat != NULL);
+   TBOX_ASSERT(new_dat != NULL);
+   TBOX_ASSERT(dst_dat != NULL);
+   TBOX_ASSERT(where * old_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * new_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * dst_dat->getGhostBox() == where);
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst_data, where, src_data_old, src_data_new);
+
+   const hier::Index old_ilo = old_dat->getGhostBox().lower();
+   const hier::Index old_ihi = old_dat->getGhostBox().upper();
+   const hier::Index new_ilo = new_dat->getGhostBox().lower();
+   const hier::Index new_ihi = new_dat->getGhostBox().upper();
+
+   const hier::Index dst_ilo = dst_dat->getGhostBox().lower();
+   const hier::Index dst_ihi = dst_dat->getGhostBox().upper();
+
+   const hier::Index ifirst = where.lower();
+   const hier::Index ilast = where.upper();
+
+   const double old_time = old_dat->getTime();
+   const double new_time = new_dat->getTime();
+   const double dst_time = dst_dat->getTime();
+
+   TBOX_ASSERT((old_time < dst_time ||
+                tbox::MathUtilities<double>::equalEps(old_time, dst_time)) &&
+      (dst_time < new_time ||
+       tbox::MathUtilities<double>::equalEps(dst_time, new_time)));
+
+   double tfrac = dst_time - old_time;
+   double denom = new_time - old_time;
+   if (denom > tbox::MathUtilities<double>::getMin()) {
+      tfrac /= denom;
+   } else {
+      tfrac = 0.0;
+   }
+
+   for (int d = 0; d < dst_dat->getDepth(); d++) {
+      if (dim == tbox::Dimension(1)) {
+         F77_FUNC(lintimeintcellfloat1d, LINTIMEINTCELLFLOAT1D) (ifirst(0),
+            ilast(0),
+            old_ilo(0), old_ihi(0),
+            new_ilo(0), new_ihi(0),
+            dst_ilo(0), dst_ihi(0),
+            tfrac,
+            old_dat->getPointer(d),
+            new_dat->getPointer(d),
+            dst_dat->getPointer(d));
+      } else if (dim == tbox::Dimension(2)) {
+         F77_FUNC(lintimeintcellfloat2d, LINTIMEINTCELLFLOAT2D) (ifirst(0),
+            ifirst(1), ilast(0), ilast(1),
+            old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+            new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+            dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+            tfrac,
+            old_dat->getPointer(d),
+            new_dat->getPointer(d),
+            dst_dat->getPointer(d));
+      } else if (dim == tbox::Dimension(3)) {
+         F77_FUNC(lintimeintcellfloat3d, LINTIMEINTCELLFLOAT3D) (ifirst(0),
+            ifirst(1), ifirst(2),
+            ilast(0), ilast(1), ilast(2),
+            old_ilo(0), old_ilo(1), old_ilo(2),
+            old_ihi(0), old_ihi(1), old_ihi(2),
+            new_ilo(0), new_ilo(1), new_ilo(2),
+            new_ihi(0), new_ihi(1), new_ihi(2),
+            dst_ilo(0), dst_ilo(1), dst_ilo(2),
+            dst_ihi(0), dst_ihi(1), dst_ihi(2),
+            tfrac,
+            old_dat->getPointer(d),
+            new_dat->getPointer(d),
+            dst_dat->getPointer(d));
+      } else {
+         TBOX_ERROR(
+            "CellFloatLinearTimeInterpolateOp::TimeInterpolate dim > 3 not supported"
+            << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellFloatLinearTimeInterpolateOp.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellFloatLinearTimeInterpolateOp.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for cell-centered float patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellFloatLinearTimeInterpolateOp
+#define included_pdat_CellFloatLinearTimeInterpolateOp
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class CellFloatLinearTimeInterpolateOp implements standard
+ * linear time interpolation for cell-centered float patch data.
+ * It is derived from the xfer::TimeInterpolateOperator base class.
+ * The interpolation uses FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is a cell-centered float, and the string is
+ * "STD_LINEAR_TIME_INTERPOLATE".
+ *
+ * @see xfer::TimeInterpolateOperator
+ */
+
+class CellFloatLinearTimeInterpolateOp:
+   public xfer::TimeInterpolateOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   CellFloatLinearTimeInterpolateOp();
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CellFloatLinearTimeInterpolateOp();
+
+   /**
+    * Return true if the variable and name string match the standard
+    * cell-centered float interpolation; otherwise, return false.
+    */
+   bool
+   findTimeInterpolateOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Perform time linear interpolation between two cell-centered float
+    * patch data sources and place result in the destination patch data.
+    * Time interpolation is performed on the intersection of the destination
+    * patch data and the input box.  The time to which data is interpolated
+    * is provided by the destination data.
+    */
+   void
+   timeInterpolate(
+      hier::PatchData& dst_data,
+      const hier::Box& where,
+      const hier::PatchData& src_data_old,
+      const hier::PatchData& src_data_new) const;
+
+private:
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellGeometry.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellGeometry.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,194 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellGeometry_C
+#define included_pdat_CellGeometry_C
+
+#include "SAMRAI/pdat/CellGeometry.h"
+#include "SAMRAI/pdat/CellOverlap.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/CellGeometry.I"
+#endif
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * Create a cell geometry object given the box and ghost cell width.	*
+ *									*
+ *************************************************************************
+ */
+
+CellGeometry::CellGeometry(
+   const hier::Box& box,
+   const hier::IntVector& ghosts):
+   d_box(box),
+   d_ghosts(ghosts)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(box, ghosts);
+   TBOX_ASSERT(ghosts.min() >= 0);
+}
+
+CellGeometry::~CellGeometry()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Attempt to calculate the intersection between two cell centered box	*
+ * geometries.  The calculateOverlap() checks whether both arguments are	*
+ * cell geometries; if so, it computes the intersection.  If not, then	*
+ * it calls calculateOverlap() on the source object (if retry is true)	*
+ * to allow the source a chance to calculate the intersection.  See the	*
+ * hier::BoxGeometry base class for more information about the protocol.	*
+ * A pointer to null is returned if the intersection cannot be computed.	*
+ *                                                                      *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap> CellGeometry::calculateOverlap(
+   const hier::BoxGeometry& dst_geometry,
+   const hier::BoxGeometry& src_geometry,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset,
+   const bool retry,
+   const hier::BoxList& dst_restrict_boxes) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(d_box, src_mask, src_offset);
+
+   const CellGeometry* t_dst =
+      dynamic_cast<const CellGeometry *>(&dst_geometry);
+   const CellGeometry* t_src =
+      dynamic_cast<const CellGeometry *>(&src_geometry);
+
+   tbox::Pointer<hier::BoxOverlap> over(NULL);
+   if ((t_src != NULL) && (t_dst != NULL)) {
+      over = doOverlap(*t_dst, *t_src, src_mask, overwrite_interior,
+            src_offset, dst_restrict_boxes);
+   } else if (retry) {
+      over = src_geometry.calculateOverlap(dst_geometry, src_geometry,
+            src_mask, overwrite_interior,
+            src_offset, false,
+            dst_restrict_boxes);
+   }
+   return over;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Compute the overlap between two cell centered boxes.  The two boxes	*
+ * are intersected and, if necessary, the interior section is removed	*
+ * from the destination box.						*
+ *									*
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap> CellGeometry::doOverlap(
+   const CellGeometry& dst_geometry,
+   const CellGeometry& src_geometry,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset,
+   const hier::BoxList& dst_restrict_boxes)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(src_mask, src_offset);
+
+   hier::BoxList dst_boxes;
+   dst_geometry.computeDestinationBoxes(dst_boxes,
+      src_geometry,
+      src_mask,
+      overwrite_interior,
+      src_offset,
+      dst_restrict_boxes);
+
+   // Create the cell overlap data object using the boxes and source shift
+
+   hier::BoxOverlap* overlap = new CellOverlap(dst_boxes, src_offset);
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute the boxes that will be used to contstruct an overlap object   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CellGeometry::computeDestinationBoxes(
+   hier::BoxList& dst_boxes,
+   const CellGeometry& src_geometry,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset,
+   const hier::BoxList& dst_restrict_boxes) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(d_box, src_mask, src_offset);
+
+   // Translate the source box and grow the destination box by the ghost cells
+
+   const hier::Box src_box =
+      hier::Box::grow(src_geometry.d_box, src_geometry.d_ghosts) * src_mask;
+   const hier::Box src_shift =
+      hier::Box::shift(src_box, src_offset);
+   const hier::Box dst_ghost =
+      hier::Box::grow(d_box, d_ghosts);
+
+   // Convert the boxes into cell space and compute the intersection
+
+   const hier::Box dst_cell = CellGeometry::toCellBox(dst_ghost);
+   const hier::Box src_cell = CellGeometry::toCellBox(src_shift);
+   const hier::Box together = dst_cell * src_cell;
+
+   if (!together.empty()) {
+      if (!overwrite_interior) {
+         const hier::Box int_cell = toCellBox(d_box);
+         dst_boxes.removeIntersections(together, int_cell);
+      } else {
+         dst_boxes.appendItem(together);
+      }
+   }
+
+   if (dst_boxes.size() && dst_restrict_boxes.size()) {
+      dst_boxes.intersectBoxes(dst_restrict_boxes);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set up a CellOverlap oject using the given boxes and offset           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap>
+CellGeometry::setUpOverlap(
+   const hier::BoxList& boxes,
+   const hier::IntVector& src_offset) const
+{
+   // Create the cell overlap data object using the boxes and source shift
+
+   hier::BoxOverlap* overlap = new CellOverlap(boxes, src_offset);
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellGeometry.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellGeometry.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,34 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+SAMRAI_INLINE_KEYWORD
+const hier::Box& CellGeometry::getBox() const
+{
+   return d_box;
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::IntVector& CellGeometry::getGhosts() const
+{
+   return d_ghosts;
+}
+
+SAMRAI_INLINE_KEYWORD
+hier::Box CellGeometry::toCellBox(
+   const hier::Box& box)
+{
+   return box;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellGeometry.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellGeometry.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,150 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellGeometry
+#define included_pdat_CellGeometry
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/CellOverlap.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * Class CellGeometry manages the mapping between the AMR index space
+ * and the cell-centered geometry index space.  It is a subclass of
+ * hier::BoxGeometry and it computes intersections between cell-
+ * centered box geometries for communication operations.
+ *
+ * See header file for CellData<DIM> class for a more detailed
+ * description of the data layout.
+ *
+ * @see hier::BoxGeometry
+ * @see pdat::CellOverlap
+ */
+
+class CellGeometry:public hier::BoxGeometry
+{
+public:
+   /*!
+    * The BoxOverlap implemenation for this geometry.
+    */
+   typedef CellOverlap Overlap;
+
+   /*!
+    * @brief Convert an AMR index box space box into a cell geometry box.
+    * A cell geometry box is the same as the given AMR index box space box.
+    */
+   static hier::Box
+   toCellBox(
+      const hier::Box& box);
+
+   /*!
+    * @brief Construct the cell geometry object given an AMR index
+    * space box and ghost cell width.
+    */
+   explicit CellGeometry(
+      const hier::Box& box,
+      const hier::IntVector& ghosts);
+
+   /*!
+    * @brief The virtual destructor does nothing interesting.
+    */
+   virtual ~CellGeometry();
+
+   /*!
+    * @brief Compute the overlap in cell-centered index space between
+    * the source box geometry and the destination box geometry.
+    */
+   virtual tbox::Pointer<hier::BoxOverlap>
+   calculateOverlap(
+      const hier::BoxGeometry& dst_geometry,
+      const hier::BoxGeometry& src_geometry,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset,
+      const bool retry,
+      const hier::BoxList& dst_restrict_boxes = hier::BoxList()) const;
+
+   /*!
+    * @brief Compute the cell-centered destination boxes that represent
+    * the overlap between the source box geometry and the destination
+    * box geometry.
+    */
+   void
+   computeDestinationBoxes(
+      hier::BoxList& dst_boxes,
+      const CellGeometry& src_geometry,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset,
+      const hier::BoxList& dst_restrict_boxes) const;
+
+   /*!
+    * @brief Set up a CellOverlap object that consists simply of the given
+    * boxes and the offset.
+    */
+   virtual tbox::Pointer<hier::BoxOverlap>
+   setUpOverlap(
+      const hier::BoxList& boxes,
+      const hier::IntVector& src_offset) const;
+
+   /*!
+    * @brief Return the box for this cell centered box geometry
+    * object.
+    */
+   const hier::Box&
+   getBox() const;
+
+   /*!
+    * @brief Return the ghost cell width for this cell centered box
+    * geometry object.
+    */
+   const hier::IntVector&
+   getGhosts() const;
+
+private:
+   /**
+    * Function doOverlap() is the function that computes the overlap
+    * between the source and destination objects, where both box geometry
+    * objects are guaranteed to have cell centered geometry.
+    */
+   static tbox::Pointer<hier::BoxOverlap>
+   doOverlap(
+      const CellGeometry& dst_geometry,
+      const CellGeometry& src_geometry,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset,
+      const hier::BoxList& dst_restrict_boxes);
+
+   CellGeometry(
+      const CellGeometry&);             // not implemented
+   void
+   operator = (
+      const CellGeometry&);                     // not implemented
+
+   hier::Box d_box;
+   hier::IntVector d_ghosts;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/CellGeometry.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellIndex.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellIndex.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,20 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellIndex_C
+#define included_pdat_CellIndex_C
+
+#include "SAMRAI/pdat/CellIndex.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/CellIndex.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellIndex.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellIndex.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,174 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+SAMRAI_INLINE_KEYWORD
+CellIndex::CellIndex(
+   const tbox::Dimension& dim):
+   hier::Index(dim)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+CellIndex::CellIndex(
+   const hier::Index& rhs):hier::Index(rhs)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+CellIndex::CellIndex(
+   const CellIndex& rhs):hier::Index(rhs)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+CellIndex& CellIndex::operator = (
+   const CellIndex& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+   hier::Index::operator = (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+CellIndex::~CellIndex()
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+CellIndex& CellIndex::operator += (
+   const hier::IntVector& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+   hier::Index::operator += (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+CellIndex CellIndex::operator + (
+   const hier::IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+   CellIndex tmp = *this;
+   tmp += rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+CellIndex& CellIndex::operator += (
+   const int rhs)
+{
+   hier::Index::operator += (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+CellIndex CellIndex::operator + (
+   const int rhs) const
+{
+   CellIndex tmp = *this;
+   tmp += rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+CellIndex& CellIndex::operator -= (
+   const hier::IntVector& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+   hier::Index::operator -= (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+CellIndex CellIndex::operator - (
+   const hier::IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+   CellIndex tmp = *this;
+   tmp -= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+CellIndex& CellIndex::operator -= (
+   const int rhs)
+{
+   hier::Index::operator -= (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+CellIndex CellIndex::operator - (
+   const int rhs) const
+{
+   CellIndex tmp = *this;
+   tmp -= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+CellIndex& CellIndex::operator *= (
+   const hier::IntVector& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+   hier::Index::operator *= (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+CellIndex CellIndex::operator * (
+   const hier::IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+   CellIndex tmp = *this;
+   tmp *= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+CellIndex& CellIndex::operator *= (
+   const int rhs)
+{
+   hier::Index::operator *= (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+CellIndex CellIndex::operator * (
+   const int rhs) const
+{
+   CellIndex tmp = *this;
+   tmp *= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool CellIndex::operator == (
+   const CellIndex& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+   return ((hier::Index *)this)->operator == (rhs);
+}
+
+SAMRAI_INLINE_KEYWORD
+bool CellIndex::operator != (
+   const CellIndex& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+   return ((hier::Index *)this)->operator != (rhs);
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellIndex.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellIndex.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,173 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellIndex
+#define included_pdat_CellIndex
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Index.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class CellIndex implements a simple n-dimensional integer
+ * vector for cell centered variables.  Cell indices contain an integer
+ * index location in AMR index space and are identical to the AMR indices.
+ *
+ * @see hier::Index
+ * @see pdat::CellData
+ * @see pdat::CellGeometry
+ * @see pdat::CellIterator
+ */
+
+class CellIndex:public hier::Index
+{
+public:
+   /**
+    * The default constructor for a cell index creates an uninitialized index.
+    */
+   explicit CellIndex(
+      const tbox::Dimension& dim);
+
+   /**
+    * Construct a cell index from a regular AMR index.
+    *
+    */
+   explicit CellIndex(
+      const hier::Index& rhs);
+
+   /**
+    * The copy constructor creates a cell index equal to the argument.
+    */
+   CellIndex(
+      const CellIndex& rhs);
+
+   /**
+    * The assignment operator sets the cell index equal to the argument.
+    */
+   CellIndex&
+   operator = (
+      const CellIndex& rhs);
+
+   /**
+    * The cell index destructor does nothing interesting.
+    */
+   ~CellIndex();
+
+   /**
+    * Plus-equals operator for a cell index and an integer vector.
+    */
+   CellIndex&
+   operator += (
+      const hier::IntVector& rhs);
+
+   /**
+    * Plus operator for a cell index and an integer vector.
+    */
+   CellIndex
+   operator + (
+      const hier::IntVector& rhs) const;
+
+   /**
+    * Plus-equals operator for a cell index and an integer.
+    */
+   CellIndex&
+   operator += (
+      const int rhs);
+
+   /**
+    * Plus operator for a cell index and an integer.
+    */
+   CellIndex
+   operator + (
+      const int rhs) const;
+
+   /**
+    * Minus-equals operator for a cell index and an integer vector.
+    */
+   CellIndex&
+   operator -= (
+      const hier::IntVector& rhs);
+
+   /**
+    * Minus operator for a cell index and an integer vector.
+    */
+   CellIndex
+   operator - (
+      const hier::IntVector& rhs) const;
+
+   /**
+    * Minus-equals operator for a cell index and an integer.
+    */
+   CellIndex&
+   operator -= (
+      const int rhs);
+
+   /**
+    * Minus operator for a cell index and an integer.
+    */
+   CellIndex
+   operator - (
+      const int rhs) const;
+
+   /**
+    * Times-equals operator for a cell index and an integer vector.
+    */
+   CellIndex&
+   operator *= (
+      const hier::IntVector& rhs);
+
+   /**
+    * Times operator for a cell index and an integer vector.
+    */
+   CellIndex
+   operator * (
+      const hier::IntVector& rhs) const;
+
+   /**
+    * Times-equals operator for a cell index and an integer.
+    */
+   CellIndex&
+   operator *= (
+      const int rhs);
+
+   /**
+    * Times operator for a cell index and an integer.
+    */
+   CellIndex
+   operator * (
+      const int rhs) const;
+
+   /**
+    * Returns true if two cell index objects are equal.  All components
+    * must be the same for equality.
+    */
+   bool
+   operator == (
+      const CellIndex& rhs) const;
+
+   /**
+    * Returns true if two cell index objects are not equal.  Any of
+    * the components may be different for inequality.
+    */
+   bool
+   operator != (
+      const CellIndex& rhs) const;
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/CellIndex.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellIntegerConstantRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellIntegerConstantRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,207 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for cell-centered integer data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellIntegerConstantRefine_C
+#define included_pdat_CellIntegerConstantRefine_C
+
+#include "SAMRAI/pdat/CellIntegerConstantRefine.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <float.h>
+#include <math.h>
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in conrefine1d.f:
+void F77_FUNC(conrefcellintg1d, CONREFCELLINTG1D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const int *, int *);
+// in conrefine2d.f:
+void F77_FUNC(conrefcellintg2d, CONREFCELLINTG2D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const int *, int *);
+// in conrefine3d.f:
+void F77_FUNC(conrefcellintg3d, CONREFCELLINTG3D) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const int *, int *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+CellIntegerConstantRefine::CellIntegerConstantRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSTANT_REFINE"),
+   d_name_id("CONSTANT_REFINE")
+{
+
+}
+
+CellIntegerConstantRefine::~CellIntegerConstantRefine()
+{
+}
+
+bool CellIntegerConstantRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<CellVariable<int> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+CellIntegerConstantRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int CellIntegerConstantRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+CellIntegerConstantRefine::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void CellIntegerConstantRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const pdat::CellOverlap* t_overlap =
+      dynamic_cast<const pdat::CellOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::BoxList& boxes = t_overlap->getDestinationBoxList();
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      refine(fine,
+         coarse,
+         dst_component,
+         src_component,
+         b(),
+         ratio);
+   }
+}
+
+void CellIntegerConstantRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio) const
+{
+   tbox::Pointer<CellData<int> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<CellData<int> >
+   fdata = fine.getPatchData(dst_component);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+   TBOX_DIM_ASSERT_CHECK_ARGS5(*this, fine, coarse, fine_box, ratio);
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+   const hier::Index ifirstf = fine_box.lower();
+   const hier::Index ilastf = fine_box.upper();
+
+   for (int d = 0; d < fdata->getDepth(); d++) {
+      if (getDim() == tbox::Dimension(1)) {
+         F77_FUNC(conrefcellintg1d, CONREFCELLINTG1D) (ifirstc(0), ilastc(0),
+            ifirstf(0), ilastf(0),
+            cilo(0), cihi(0),
+            filo(0), fihi(0),
+            &ratio[0],
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else if (getDim() == tbox::Dimension(2)) {
+         F77_FUNC(conrefcellintg2d, CONREFCELLINTG2D) (ifirstc(0), ifirstc(1),
+            ilastc(0), ilastc(1),
+            ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            &ratio[0],
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else if (getDim() == tbox::Dimension(3)) {
+         F77_FUNC(conrefcellintg3d, CONREFCELLINTG3D) (ifirstc(0), ifirstc(1),
+            ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            ifirstf(0), ifirstf(1), ifirstf(2),
+            ilastf(0), ilastf(1), ilastf(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            &ratio[0],
+            cdata->getPointer(d),
+            fdata->getPointer(d));
+      } else {
+         TBOX_ERROR(
+            "CellIntegerConstantRefine getDim()::refine dimension > 3 not supported"
+            << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellIntegerConstantRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellIntegerConstantRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,125 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for cell-centered integer data on
+ *                a mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellIntegerConstantRefine
+#define included_pdat_CellIntegerConstantRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/xfer/RefineOperator.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class CellIntegerConstantRefine implements constant
+ * interpolation for cell-centered integer patch data defined over a
+ * mesh.  It is derived from the xfer::RefineOperator base class.
+ * The numerical operations for interpolation use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is cell-centered integer, and the string is "CONSTANT_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class CellIntegerConstantRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit CellIntegerConstantRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~CellIntegerConstantRefine();
+
+   /**
+    * Return true if the variable and name string match cell-centered
+    * integer constant interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of cell-centered integer constant interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the constant interpolation operator is the vector
+    * of zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the cell-centered integer constant
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the boxes contained in fine_overlap.
+    * It is assumed that the coarse patch contains sufficient data for the
+    * stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the cell-centered integer constant
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the fine box.   It is assumed that the
+    * coarse patch contains sufficient data for the stencil width of the
+    * refinement operator.  This differs from the above refine() method
+    * only in that it operates on a single fine box instead of a BoxOverlap.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellIterator.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellIterator.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,20 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Iterator for cell centered patch data types 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellIterator_C
+#define included_pdat_CellIterator_C
+
+#include "SAMRAI/pdat/CellIterator.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/CellIterator.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellIterator.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellIterator.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Iterator for cell centered patch data types 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+SAMRAI_INLINE_KEYWORD
+CellIterator::CellIterator(
+   const hier::Box& box):
+   d_index(box.lower()),
+   d_box(box)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+CellIterator::CellIterator(
+   const CellIterator& iter):
+   d_index(iter.d_index),
+   d_box(iter.d_box)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+CellIterator&
+CellIterator::operator = (
+   const CellIterator& iter)
+{
+   d_index = iter.d_index;
+   d_box = iter.d_box;
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+CellIterator::~CellIterator()
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+const CellIndex& CellIterator::operator * () const
+{
+   return d_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+const CellIndex& CellIterator::operator () () const
+{
+   return d_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+CellIterator::operator bool () const
+{
+   bool retval = true;
+   for (int i = 0; i < d_box.getDim().getValue(); i++) {
+      if (d_index(i) > d_box.upper(i)) {
+         retval = false;
+         break;
+      }
+   }
+
+   return retval;
+}
+
+#ifndef LACKS_BOOL_VOID_RESOLUTION
+SAMRAI_INLINE_KEYWORD
+CellIterator::operator const void* () const
+{
+   return CellIterator::operator bool () ? this : NULL;
+}
+#endif
+
+SAMRAI_INLINE_KEYWORD
+bool CellIterator::operator ! () const
+{
+   return !CellIterator::operator bool ();
+}
+
+SAMRAI_INLINE_KEYWORD
+void CellIterator::operator ++ (
+   int)
+{
+   d_index(0)++;
+   for (int i = 0; i < d_box.getDim().getValue() - 1; i++) {
+      if (d_index(i) > d_box.upper(i)) {
+         d_index(i) = d_box.lower(i);
+         d_index(i + 1)++;
+      } else {
+         break;
+      }
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+bool CellIterator::operator == (
+   const CellIterator& iter) const
+{
+   return d_index == iter.d_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool CellIterator::operator != (
+   const CellIterator& iter) const
+{
+   return d_index != iter.d_index;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellIterator.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellIterator.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,135 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Iterator for cell centered patch data types 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellIterator
+#define included_pdat_CellIterator
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/CellGeometry.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/hier/Box.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class CellIterator is an iterator that provides methods for
+ * stepping through the index space associated with a cell centered box.
+ * The indices are enumerated in column-major (e.g., Fortran) order.
+ * The iterator should be used as follows:
+ * \verbatim
+ * hier::Box box;
+ * ...
+ * for (CellIterator c(box); c; c++) {
+ *    // use index c of the box
+ * }
+ * \endverbatim
+ * Note that the cell iterator may not compile to efficient code, depending
+ * on your compiler.  Many compilers are not smart enough to optimize the
+ * looping constructs and indexing operations.
+ *
+ * @see pdat::CellData
+ * @see pdat::CellGeometry
+ * @see pdat::CellIndex
+ */
+
+class CellIterator
+{
+public:
+   /**
+    * Constructor for the cell iterator.  The iterator will enumerate
+    * the indices in the argument box.
+    */
+   explicit CellIterator(
+      const hier::Box& box);
+
+   /**
+    * Copy constructor for the cell iterator
+    */
+   CellIterator(
+      const CellIterator& iterator);
+
+   /**
+    * Assignment operator for the cell iterator.
+    */
+   CellIterator&
+   operator = (
+      const CellIterator& iterator);
+
+   /**
+    * Destructor for the cell iterator.
+    */
+   ~CellIterator();
+
+   /**
+    * Extract the cell index corresponding to the iterator position in the box.
+    */
+   const CellIndex&
+   operator * () const;
+
+   /**
+    * Extract the cell index corresponding to the iterator position in the box.
+    */
+   const CellIndex&
+   operator () () const;
+
+   /**
+    * Return true if the iterator points to a valid index within the box.
+    */
+   operator bool () const;
+
+#ifndef LACKS_BOOL_VOID_RESOLUTION
+   /**
+    * Return a non-NULL if the iterator points to a valid index within the box.
+    */
+   operator const void
+   * () const;
+#endif
+
+   /**
+    * Return whether the iterator points to a valid index within the box.
+    * This operator mimics the !p operation applied to a pointer p.
+    */
+   bool
+   operator ! () const;
+
+   /**
+    * Increment the iterator to point to the next index in the box.
+    */
+   void
+   operator ++ (
+      int);
+
+   /**
+    * Test two iterators for equality (same index value).
+    */
+   bool
+   operator == (
+      const CellIterator& iterator) const;
+
+   /**
+    * Test two iterators for inequality (different index values).
+    */
+   bool
+   operator != (
+      const CellIterator& iterator) const;
+
+private:
+   CellIndex d_index;
+   hier::Box d_box;
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/CellIterator.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellOverlap.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellOverlap.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,53 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellOverlap_C
+#define included_pdat_CellOverlap_C
+
+#include "SAMRAI/pdat/CellOverlap.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/CellOverlap.I"
+#endif
+
+namespace SAMRAI {
+namespace pdat {
+
+CellOverlap::CellOverlap(
+   const hier::BoxList& boxes,
+   const hier::IntVector& src_offset):
+   d_is_overlap_empty(boxes.isEmpty()),
+   d_offset(src_offset),
+   d_dst_boxes(boxes)
+{
+}
+
+CellOverlap::~CellOverlap()
+{
+}
+
+bool CellOverlap::isOverlapEmpty() const
+{
+   return d_is_overlap_empty;
+}
+
+void CellOverlap::print(
+   std::ostream& os) const
+{
+   os << "CellOverlap boxes:";
+   for (hier::BoxList::Iterator b(d_dst_boxes); b; b++) {
+      const hier::Box& box = b();
+      os << "  " << box << std::endl;
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellOverlap.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellOverlap.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,28 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+SAMRAI_INLINE_KEYWORD
+const hier::BoxList&
+CellOverlap::getDestinationBoxList() const
+{
+   return d_dst_boxes;
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::IntVector& CellOverlap::getSourceOffset() const
+{
+   return d_offset;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellOverlap.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellOverlap.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,101 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellOverlap
+#define included_pdat_CellOverlap
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class CellOverlap represents the intersection between two cell
+ * centered geometry boxes.  It is a subclass of hier::BoxOverlap
+ * and records the portions of index space that needs to be copied
+ * between two objects with cell centered geometry.  Note that
+ * CellOverlap does NOT compute the overlap of the arguments. It
+ * stores the arguments as given and assumes that they already
+ * represent an overlap previously computed.
+ *
+ * @see hier::BoxOverlap
+ * @see pdat::CellOverlap
+ */
+
+class CellOverlap:public hier::BoxOverlap
+{
+public:
+   /**
+    * The constructor takes the list of boxes and the source offset between
+    * the source and destination index spaces.  This information is used later
+    * in the generation of communication schedules.
+    */
+   explicit CellOverlap(
+      const hier::BoxList& boxes,
+      const hier::IntVector& src_offset);
+
+   /**
+    * The virtual destructor does nothing interesting except deallocate
+    * box data.
+    */
+   virtual ~CellOverlap();
+
+   /**
+    * Return whether there is an empty intersection between the two
+    * cell centered boxes.  This method over-rides the virtual function
+    * in the hier::BoxOverlap base class.
+    */
+   virtual bool
+   isOverlapEmpty() const;
+
+   /**
+    * Return the list of boxes (in cell centered index space) that constitute
+    * the intersection.  The boxes are given in the destination coordinate
+    * space and must be shifted by -(getSourceOffset()) to lie in the source
+    * index space.
+    */
+   virtual const hier::BoxList&
+   getDestinationBoxList() const;
+
+   /**
+    * Return the offset between the destination and source index spaces.
+    * The destination index space is the source index space shifted
+    * by this amount.
+    */
+   virtual const hier::IntVector&
+   getSourceOffset() const;
+
+   /**
+    * Output the boxes in the overlap region.
+    */
+   virtual void
+   print(
+      std::ostream& os) const;
+
+private:
+   bool d_is_overlap_empty;
+   hier::IntVector d_offset;
+   hier::BoxList d_dst_boxes;
+   int d_count;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/CellOverlap.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellVariable.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellVariable.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellVariable_C
+#define included_pdat_CellVariable_C
+
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/pdat/CellDataFactory.h"
+#include "SAMRAI/hier/PatchDataFactory.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * Constructor and destructor for cell variable objects			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+CellVariable<TYPE>::CellVariable(
+   const tbox::Dimension& dim,
+   const std::string& name,
+   int depth):
+   hier::Variable(name,
+                  SAMRAI::tbox::Pointer<SAMRAI::hier::PatchDataFactory>(
+                     new CellDataFactory<TYPE>(depth,
+                                               hier::IntVector::getZero(dim)))) // default zero ghost cells
+{
+}
+
+template<class TYPE>
+CellVariable<TYPE>::~CellVariable()
+{
+}
+
+template<class TYPE>
+int CellVariable<TYPE>::getDepth() const
+{
+   tbox::Pointer<CellDataFactory<TYPE> > cell_factory =
+      this->getPatchDataFactory();
+   TBOX_ASSERT(cell_factory);
+   return cell_factory->getDepth();
+}
+
+/*
+ *************************************************************************
+ *									*
+ * These are private and should not be used.  They are defined here	*
+ * because some template instantiation methods fail if some member	*
+ * functions are left undefined.						*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+CellVariable<TYPE>::CellVariable(
+   const CellVariable<TYPE>& foo):
+   hier::Variable(NULL, tbox::Pointer<SAMRAI::hier::PatchDataFactory>(NULL))
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void CellVariable<TYPE>::operator = (
+   const CellVariable<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CellVariable.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CellVariable.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,98 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellVariable
+#define included_pdat_CellVariable
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/tbox/Complex.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * Class CellVariable<DIM> is a templated variable class used to define
+ * cell-centered quantities on an AMR mesh.   It is a subclass of
+ * hier::Variable and is templated on the type of the underlying data
+ * (e.g., double, int, bool, etc.).
+ *
+ * See header file for CellData<DIM> class for a more detailed
+ * description of the data layout.
+ *
+ * @see pdat::CellData
+ * @see pdat::CellDataFactory
+ * @see hier::Variable
+ */
+
+template<class TYPE>
+class CellVariable:public hier::Variable
+{
+public:
+   /*!
+    * @brief Create a cell-centered variable object with the given name and
+    * depth (i.e., number of data values at each cell index location).
+    * A default depth of one is provided.
+    */
+   explicit CellVariable(
+      const tbox::Dimension& dim,
+      const std::string& name,
+      int depth = 1);
+
+   /*!
+    * @brief Virtual destructor for cell variable objects.
+    */
+   virtual ~CellVariable<TYPE>();
+
+   /*!
+    * @brief Return true indicating that cell data quantities will always
+    * be treated as though fine values take precedence on coarse-fine
+    * interfaces.  Note that this is really artificial since the cell
+    * data index space matches the cell-centered index space for AMR
+    * patches.  However, some value must be supplied for communication
+    * operations.
+    */
+   bool fineBoundaryRepresentsVariable() const {
+      return true;
+   }
+
+   /*!
+    * @brief Return false indicating that cell data on a patch interior
+    * does not exist on the patch boundary.
+    */
+   bool dataLivesOnPatchBorder() const {
+      return false;
+   }
+
+   /*!
+    * @brief Return the the depth (number of components).
+    */
+   int
+   getDepth() const;
+
+private:
+   CellVariable(
+      const CellVariable<TYPE>&);          // not implemented
+   void
+   operator = (
+      const CellVariable<TYPE>&);               // not implemented
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/CellVariable.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CopyOperation.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CopyOperation.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,20 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Copy operation on single array data elements templated on data type 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CopyOperation_C
+#define included_pdat_CopyOperation_C
+
+#include "SAMRAI/pdat/CopyOperation.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/CopyOperation.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CopyOperation.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CopyOperation.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,40 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Copy operation on single array data elements templated on data type 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ * Member functions for CopyOperation
+ */
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+CopyOperation<TYPE>::CopyOperation()
+{
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+CopyOperation<TYPE>::~CopyOperation()
+{
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void CopyOperation<TYPE>::operator () (
+   TYPE& vdst,
+   const TYPE& vsrc) const
+{
+   vdst = vsrc;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/CopyOperation.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/CopyOperation.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,65 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Copy operation on single array data elements templated on data type 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CopyOperation
+#define included_pdat_CopyOperation
+
+#include "SAMRAI/SAMRAI_config.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * @brief Class CopyOperation<TYPE> encapsulates a copy
+ * operation into an object.
+ */
+
+template<class TYPE>
+class CopyOperation
+{
+public:
+   /*!
+    * The default constructor does nothing interesting.
+    */
+   CopyOperation();
+
+   /*!
+    * The destructor does nothing interesting.
+    */
+   ~CopyOperation();
+
+   /*!
+    * The operator copies the source value to the destination.
+    */
+   void
+   operator () (
+      TYPE& vdst,
+      const TYPE& vsrc) const;
+
+private:
+   CopyOperation(
+      const CopyOperation<TYPE>&);              // not implemented
+   void
+   operator = (
+      const CopyOperation<TYPE>&);              // not implemented
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/CopyOperation.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/CopyOperation.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeComplexConstantRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeComplexConstantRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,272 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for edge-centered complex data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeComplexConstantRefine_C
+#define included_pdat_EdgeComplexConstantRefine_C
+
+#include "SAMRAI/pdat/EdgeComplexConstantRefine.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/pdat/EdgeVariable.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in conrefine1d.f:
+void F77_FUNC(conrefedgecplx1d, CONREFEDGECPLX1D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+// in conrefine2d.f:
+void F77_FUNC(conrefedgecplx2d0, CONREFEDGECPLX2D0) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+void F77_FUNC(conrefedgecplx2d1, CONREFEDGECPLX2D1) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+// in conrefine3d.f:
+void F77_FUNC(conrefedgecplx3d0, CONREFEDGECPLX3D0) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+void F77_FUNC(conrefedgecplx3d1, CONREFEDGECPLX3D1) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+void F77_FUNC(conrefedgecplx3d2, CONREFEDGECPLX3D2) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+EdgeComplexConstantRefine::EdgeComplexConstantRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSTANT_REFINE")
+{
+   d_name_id = "CONSTANT_REFINE";
+}
+
+EdgeComplexConstantRefine::~EdgeComplexConstantRefine()
+{
+}
+
+bool EdgeComplexConstantRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<EdgeVariable<dcomplex> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+EdgeComplexConstantRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int EdgeComplexConstantRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+EdgeComplexConstantRefine::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void EdgeComplexConstantRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   tbox::Pointer<EdgeData<dcomplex> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<EdgeData<dcomplex> >
+   fdata = fine.getPatchData(dst_component);
+
+   const pdat::EdgeOverlap* t_overlap =
+      dynamic_cast<const pdat::EdgeOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*this, fine, coarse, ratio);
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   for (int axis = 0; axis < dim.getValue(); axis++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(axis);
+
+      for (hier::BoxList::Iterator b(boxes); b; b++) {
+
+         hier::Box fine_box(b());
+         TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, fine_box);
+
+         for (int i = 0; i < dim.getValue(); i++) {
+            if (i != axis) {
+               fine_box.upper(i) -= 1;
+            }
+         }
+
+         const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+         const hier::Index ifirstc = coarse_box.lower();
+         const hier::Index ilastc = coarse_box.upper();
+         const hier::Index ifirstf = fine_box.lower();
+         const hier::Index ilastf = fine_box.upper();
+
+         for (int d = 0; d < fdata->getDepth(); d++) {
+            if (dim == tbox::Dimension(1)) {
+               F77_FUNC(conrefedgecplx1d, CONREFEDGECPLX1D) (
+                  ifirstc(0), ilastc(0),
+                  ifirstf(0), ilastf(0),
+                  cilo(0), cihi(0),
+                  filo(0), fihi(0),
+                  &ratio[0],
+                  cdata->getPointer(0, d),
+                  fdata->getPointer(0, d));
+            } else if (dim == tbox::Dimension(2)) {
+               if (axis == 0) {
+                  F77_FUNC(conrefedgecplx2d0, CONREFEDGECPLX2D0) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               } else if (axis == 1) {
+                  F77_FUNC(conrefedgecplx2d1, CONREFEDGECPLX2D1) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d));
+               }
+            } else if (dim == tbox::Dimension(3)) {
+               if (axis == 0) {
+                  F77_FUNC(conrefedgecplx3d0, CONREFEDGECPLX3D0) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               } else if (axis == 1) {
+                  F77_FUNC(conrefedgecplx3d1, CONREFEDGECPLX3D1) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d));
+               } else if (axis == 2) {
+                  F77_FUNC(conrefedgecplx3d2, CONREFEDGECPLX3D2) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(2, d),
+                     fdata->getPointer(2, d));
+               }
+            } else {
+               TBOX_ERROR(
+                  "EdgeComplexConstantRefine::refine dimension > 3 not supported"
+                  << std::endl);
+            }
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeComplexConstantRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeComplexConstantRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,109 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for edge-centered complex data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeComplexConstantRefine
+#define included_pdat_EdgeComplexConstantRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class EdgeComplexConstantRefine implements constant
+ * interpolation for edge-centered complex patch data defined over a
+ * mesh.  It is derived from the xfer::RefineOperator base class.
+ * The numerical operations for interpolation use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is edge-centered complex, and the string is "CONSTANT_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class EdgeComplexConstantRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit EdgeComplexConstantRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~EdgeComplexConstantRefine();
+
+   /**
+    * Return true if the variable and name string match edge-centered
+    * complex constant interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name string identifier of this refinement operation.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of edge-centered complex constant interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the constant interpolation operator is the vector
+    * of zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the edge-centered complex constant
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the boxes contained in fine_overlap.
+    * It is assumed that the coarse patch contains sufficient data for the
+    * stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeComplexLinearTimeInterpolateOp.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeComplexLinearTimeInterpolateOp.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,266 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for edge-centered complex data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeComplexLinearTimeInterpolateOp_C
+#define included_pdat_EdgeComplexLinearTimeInterpolateOp_C
+
+#include "SAMRAI/pdat/EdgeComplexLinearTimeInterpolateOp.h"
+#include "SAMRAI/tbox/Complex.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/pdat/EdgeVariable.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in lintimint1d.f:
+void F77_FUNC(lintimeintedgecmplx1d, LINTIMEINTEDGECMPLX1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+// in lintimint2d.f:
+void F77_FUNC(lintimeintedgecmplx2d0, LINTIMEINTEDGECMPLX2D0) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+void F77_FUNC(lintimeintedgecmplx2d1, LINTIMEINTEDGECMPLX2D1) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+// in lintimint3d.f:
+void F77_FUNC(lintimeintedgecmplx3d0, LINTIMEINTEDGECMPLX3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+void F77_FUNC(lintimeintedgecmplx3d1, LINTIMEINTEDGECMPLX3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+void F77_FUNC(lintimeintedgecmplx3d2, LINTIMEINTEDGECMPLX3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+EdgeComplexLinearTimeInterpolateOp::EdgeComplexLinearTimeInterpolateOp():
+   xfer::TimeInterpolateOperator()
+{
+}
+
+EdgeComplexLinearTimeInterpolateOp::~EdgeComplexLinearTimeInterpolateOp()
+{
+}
+
+bool EdgeComplexLinearTimeInterpolateOp::findTimeInterpolateOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   const tbox::Pointer<EdgeVariable<dcomplex> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == "STD_LINEAR_TIME_INTERPOLATE")) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+void EdgeComplexLinearTimeInterpolateOp::timeInterpolate(
+   hier::PatchData& dst_data,
+   const hier::Box& where,
+   const hier::PatchData& src_data_old,
+   const hier::PatchData& src_data_new) const
+{
+   const tbox::Dimension& dim(where.getDim());
+
+   const EdgeData<dcomplex>* old_dat =
+      dynamic_cast<const EdgeData<dcomplex> *>(&src_data_old);
+   const EdgeData<dcomplex>* new_dat =
+      dynamic_cast<const EdgeData<dcomplex> *>(&src_data_new);
+   EdgeData<dcomplex>* dst_dat =
+      dynamic_cast<EdgeData<dcomplex> *>(&dst_data);
+
+   TBOX_ASSERT(old_dat != NULL);
+   TBOX_ASSERT(new_dat != NULL);
+   TBOX_ASSERT(dst_dat != NULL);
+   TBOX_ASSERT(where * old_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * new_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * dst_dat->getGhostBox() == where);
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst_data, where, src_data_old, src_data_new);
+
+   const hier::Index old_ilo = old_dat->getGhostBox().lower();
+   const hier::Index old_ihi = old_dat->getGhostBox().upper();
+   const hier::Index new_ilo = new_dat->getGhostBox().lower();
+   const hier::Index new_ihi = new_dat->getGhostBox().upper();
+
+   const hier::Index dst_ilo = dst_dat->getGhostBox().lower();
+   const hier::Index dst_ihi = dst_dat->getGhostBox().upper();
+
+   const hier::Index ifirst = where.lower();
+   const hier::Index ilast = where.upper();
+
+   const double old_time = old_dat->getTime();
+   const double new_time = new_dat->getTime();
+   const double dst_time = dst_dat->getTime();
+
+   TBOX_ASSERT((old_time < dst_time ||
+                tbox::MathUtilities<double>::equalEps(old_time, dst_time)) &&
+      (dst_time < new_time ||
+       tbox::MathUtilities<double>::equalEps(dst_time, new_time)));
+
+   double tfrac = dst_time - old_time;
+   double denom = new_time - old_time;
+   if (denom > tbox::MathUtilities<double>::getMin()) {
+      tfrac /= denom;
+   } else {
+      tfrac = 0.0;
+   }
+
+   for (int d = 0; d < dst_dat->getDepth(); d++) {
+      if (dim == tbox::Dimension(1)) {
+         F77_FUNC(lintimeintedgecmplx1d, LINTIMEINTEDGECMPLX1D) (ifirst(0),
+            ilast(0),
+            old_ilo(0), old_ihi(0),
+            new_ilo(0), new_ihi(0),
+            dst_ilo(0), dst_ihi(0),
+            tfrac,
+            old_dat->getPointer(0, d),
+            new_dat->getPointer(0, d),
+            dst_dat->getPointer(0, d));
+      } else if (dim == tbox::Dimension(2)) {
+         F77_FUNC(lintimeintedgecmplx2d0, LINTIMEINTEDGECMPLX2D0) (ifirst(0),
+            ifirst(1), ilast(0), ilast(1),
+            old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+            new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+            dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+            tfrac,
+            old_dat->getPointer(0, d),
+            new_dat->getPointer(0, d),
+            dst_dat->getPointer(0, d));
+         F77_FUNC(lintimeintedgecmplx2d1, LINTIMEINTEDGECMPLX2D1) (ifirst(0),
+            ifirst(1), ilast(0), ilast(1),
+            old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+            new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+            dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+            tfrac,
+            old_dat->getPointer(1, d),
+            new_dat->getPointer(1, d),
+            dst_dat->getPointer(1, d));
+      } else if (dim == tbox::Dimension(3)) {
+         F77_FUNC(lintimeintedgecmplx3d0, LINTIMEINTEDGECMPLX3D0) (ifirst(0),
+            ifirst(1), ifirst(2),
+            ilast(0), ilast(1), ilast(2),
+            old_ilo(0), old_ilo(1), old_ilo(2),
+            old_ihi(0), old_ihi(1), old_ihi(2),
+            new_ilo(0), new_ilo(1), new_ilo(2),
+            new_ihi(0), new_ihi(1), new_ihi(2),
+            dst_ilo(0), dst_ilo(1), dst_ilo(2),
+            dst_ihi(0), dst_ihi(1), dst_ihi(2),
+            tfrac,
+            old_dat->getPointer(0, d),
+            new_dat->getPointer(0, d),
+            dst_dat->getPointer(0, d));
+         F77_FUNC(lintimeintedgecmplx3d1, LINTIMEINTEDGECMPLX3D1) (ifirst(0),
+            ifirst(1), ifirst(2),
+            ilast(0), ilast(1), ilast(2),
+            old_ilo(0), old_ilo(1), old_ilo(2),
+            old_ihi(0), old_ihi(1), old_ihi(2),
+            new_ilo(0), new_ilo(1), new_ilo(2),
+            new_ihi(0), new_ihi(1), new_ihi(2),
+            dst_ilo(0), dst_ilo(1), dst_ilo(2),
+            dst_ihi(0), dst_ihi(1), dst_ihi(2),
+            tfrac,
+            old_dat->getPointer(1, d),
+            new_dat->getPointer(1, d),
+            dst_dat->getPointer(1, d));
+         F77_FUNC(lintimeintedgecmplx3d2, LINTIMEINTEDGECMPLX3D2) (ifirst(0),
+            ifirst(1), ifirst(2),
+            ilast(0), ilast(1), ilast(2),
+            old_ilo(0), old_ilo(1), old_ilo(2),
+            old_ihi(0), old_ihi(1), old_ihi(2),
+            new_ilo(0), new_ilo(1), new_ilo(2),
+            new_ihi(0), new_ihi(1), new_ihi(2),
+            dst_ilo(0), dst_ilo(1), dst_ilo(2),
+            dst_ihi(0), dst_ihi(1), dst_ihi(2),
+            tfrac,
+            old_dat->getPointer(2, d),
+            new_dat->getPointer(2, d),
+            dst_dat->getPointer(2, d));
+      } else {
+         TBOX_ERROR(
+            "EdgeComplexLinearTimeInterpolateOp::TimeInterpolate dim > 3 not supported"
+            << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeComplexLinearTimeInterpolateOp.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeComplexLinearTimeInterpolateOp.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for edge-centered complex data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeComplexLinearTimeInterpolateOp
+#define included_pdat_EdgeComplexLinearTimeInterpolateOp
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class EdgeComplexLinearTimeInterpolateOp implements standard
+ * linear time interpolation for edge-centered complex patch data.
+ * It is derived from the xfer::TimeInterpolateOperator base class.
+ * The interpolation uses FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is a edge-centered complex, and the string is
+ * "STD_LINEAR_TIME_INTERPOLATE".
+ *
+ * @see xfer::TimeInterpolateOperator
+ */
+
+class EdgeComplexLinearTimeInterpolateOp:
+   public xfer::TimeInterpolateOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   EdgeComplexLinearTimeInterpolateOp();
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~EdgeComplexLinearTimeInterpolateOp();
+
+   /**
+    * Return true if the variable and name string match the standard
+    * edge-centered complex interpolation; otherwise, return false.
+    */
+   bool
+   findTimeInterpolateOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Perform linear time interpolation between two edge-centered complex
+    * patch data sources and place result in the destination patch data.
+    * Time interpolation is performed on the intersection of the destination
+    * patch data and the input box.  The time to which data is interpolated
+    * is provided by the destination data.
+    */
+   void
+   timeInterpolate(
+      hier::PatchData& dst_data,
+      const hier::Box& where,
+      const hier::PatchData& src_data_old,
+      const hier::PatchData& src_data_new) const;
+
+private:
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeData.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeData.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,515 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated edge centered patch data type 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeData_C
+#define included_pdat_EdgeData_C
+
+#include "SAMRAI/pdat/EdgeData.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/pdat/EdgeGeometry.h"
+#include "SAMRAI/pdat/EdgeOverlap.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#define PDAT_EDGEDATA_VERSION 1
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/EdgeData.I"
+#endif
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * Constructor and destructor for edge data objects.  The constructor	*
+ * simply initializes data variables and sets up the array data.		*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+EdgeData<TYPE>::EdgeData(
+   const hier::Box& box,
+   int depth,
+   const hier::IntVector& ghosts):
+   hier::PatchData(box, ghosts),
+   d_depth(depth)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(box, ghosts);
+
+   TBOX_ASSERT(depth > 0);
+   TBOX_ASSERT(ghosts.min() >= 0);
+
+   for (int d = 0; d < getDim().getValue(); d++) {
+      const hier::Box edge_box =
+         EdgeGeometry::toEdgeBox(this->getGhostBox(), d);
+      d_data[d].initializeArray(edge_box, depth);
+   }
+}
+
+template<class TYPE>
+EdgeData<TYPE>::~EdgeData()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * The following are private and cannot be used, but they are defined	*
+ * here for compilers that require that every template declaration have	*
+ * a definition (a stupid requirement, if you ask me).			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+EdgeData<TYPE>::EdgeData(
+   const EdgeData<TYPE>& foo):
+   hier::PatchData(foo.getBox(), foo.getGhostCellWidth())
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void EdgeData<TYPE>::operator = (
+   const EdgeData<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Perform a fast copy between two edge centered arrays where their	*
+ * index spaces overlap.							*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void EdgeData<TYPE>::copy(
+   const hier::PatchData& src)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   const EdgeData<TYPE>* t_src =
+      dynamic_cast<const EdgeData<TYPE> *>(&src);
+   if (t_src == NULL) {
+      src.copy2(*this);
+   } else {
+      for (int d = 0; d < getDim().getValue(); d++) {
+         const hier::Box box = d_data[d].getBox() * t_src->d_data[d].getBox();
+         if (!box.empty()) {
+            d_data[d].copy(t_src->d_data[d], box);
+         }
+      }
+   }
+}
+
+template<class TYPE>
+void EdgeData<TYPE>::copy2(
+   hier::PatchData& dst) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   EdgeData<TYPE>* t_dst =
+      dynamic_cast<EdgeData<TYPE> *>(&dst);
+
+   TBOX_ASSERT(t_dst != NULL);
+
+   for (int d = 0; d < getDim().getValue(); d++) {
+      const hier::Box box = d_data[d].getBox() * t_dst->d_data[d].getBox();
+      if (!box.empty()) {
+         t_dst->d_data[d].copy(d_data[d], box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Copy data from the source into the destination according to the	*
+ * overlap descriptor.							*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void EdgeData<TYPE>::copy(
+   const hier::PatchData& src,
+   const hier::BoxOverlap& overlap)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   const EdgeData<TYPE>* t_src =
+      dynamic_cast<const EdgeData<TYPE> *>(&src);
+
+   const EdgeOverlap* t_overlap =
+      dynamic_cast<const EdgeOverlap *>(&overlap);
+
+   if ((t_src == NULL) || (t_overlap == NULL)) {
+      src.copy2(*this, overlap);
+   } else {
+      const hier::IntVector& src_offset = t_overlap->getSourceOffset();
+      for (int d = 0; d < getDim().getValue(); d++) {
+         const hier::BoxList& box_list = t_overlap->getDestinationBoxList(d);
+         d_data[d].copy(t_src->d_data[d], box_list, src_offset);
+      }
+   }
+}
+
+template<class TYPE>
+void EdgeData<TYPE>::copy2(
+   hier::PatchData& dst,
+   const hier::BoxOverlap& overlap) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   EdgeData<TYPE>* t_dst =
+      dynamic_cast<EdgeData<TYPE> *>(&dst);
+   const EdgeOverlap* t_overlap =
+      dynamic_cast<const EdgeOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_dst != NULL);
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::IntVector& src_offset = t_overlap->getSourceOffset();
+   for (int d = 0; d < getDim().getValue(); d++) {
+      const hier::BoxList& box_list = t_overlap->getDestinationBoxList(d);
+      t_dst->d_data[d].copy(d_data[d], box_list, src_offset);
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Perform a fast copy from an edge data object to this edge data        *
+ * object at the specified depths, where their index spaces overlap.     *
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void EdgeData<TYPE>::copyDepth(
+   int dst_depth,
+   const EdgeData<TYPE>& src,
+   int src_depth)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   for (int d = 0; d < getDim().getValue(); d++) {
+      const hier::Box box = d_data[d].getBox() * src.d_data[d].getBox();
+      if (!box.empty()) {
+         d_data[d].copyDepth(dst_depth, src.d_data[d], src_depth, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Calculate the buffer space needed to pack/unpack messages on the box	*
+ * region using the overlap descriptor.					*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+bool EdgeData<TYPE>::canEstimateStreamSizeFromBox() const
+{
+   return ArrayData<TYPE>::canEstimateStreamSizeFromBox();
+}
+
+template<class TYPE>
+int EdgeData<TYPE>::getDataStreamSize(
+   const hier::BoxOverlap& overlap) const
+{
+   const EdgeOverlap* t_overlap =
+      dynamic_cast<const EdgeOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::IntVector& offset = t_overlap->getSourceOffset();
+
+   int size = 0;
+   for (int d = 0; d < getDim().getValue(); d++) {
+      size += d_data[d].getDataStreamSize(t_overlap->getDestinationBoxList(d),
+            offset);
+   }
+   return size;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Pack/unpack data into/out of the message streams using the index	*
+ * space in the overlap descriptor.					*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void EdgeData<TYPE>::packStream(
+   tbox::MessageStream& stream,
+   const hier::BoxOverlap& overlap) const
+{
+   const EdgeOverlap* t_overlap =
+      dynamic_cast<const EdgeOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::IntVector& offset = t_overlap->getSourceOffset();
+   for (int d = 0; d < getDim().getValue(); d++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(d);
+      if (boxes.getNumberOfItems() > 0) {
+         d_data[d].packStream(stream, boxes, offset);
+      }
+   }
+}
+
+template<class TYPE>
+void EdgeData<TYPE>::unpackStream(
+   tbox::MessageStream& stream,
+   const hier::BoxOverlap& overlap)
+{
+   const EdgeOverlap* t_overlap =
+      dynamic_cast<const EdgeOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::IntVector& offset = t_overlap->getSourceOffset();
+   for (int d = 0; d < getDim().getValue(); d++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(d);
+      if (boxes.getNumberOfItems() > 0) {
+         d_data[d].unpackStream(stream, boxes, offset);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Calculate the amount of memory space needed to represent the data	*
+ * for a  edge centered grid.						*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+size_t EdgeData<TYPE>::getSizeOfData(
+   const hier::Box& box,
+   int depth,
+   const hier::IntVector& ghosts)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(box, ghosts);
+   TBOX_ASSERT(depth > 0);
+
+   size_t size = 0;
+   const hier::Box ghost_box = hier::Box::grow(box, ghosts);
+   for (int d = 0; d < box.getDim().getValue(); d++) {
+      const hier::Box edge_box = EdgeGeometry::toEdgeBox(ghost_box, d);
+      size += ArrayData<TYPE>::getSizeOfData(edge_box, depth);
+   }
+   return size;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Fill the edge centered box with the given value.			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void EdgeData<TYPE>::fill(
+   const TYPE& t,
+   int d)
+{
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   for (int i = 0; i < getDim().getValue(); i++) {
+      d_data[i].fill(t, d);
+   }
+}
+
+template<class TYPE>
+void EdgeData<TYPE>::fill(
+   const TYPE& t,
+   const hier::Box& box,
+   int d)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   for (int i = 0; i < getDim().getValue(); i++) {
+      d_data[i].fill(t, EdgeGeometry::toEdgeBox(box, i), d);
+   }
+}
+
+template<class TYPE>
+void EdgeData<TYPE>::fillAll(
+   const TYPE& t)
+{
+   for (int i = 0; i < getDim().getValue(); i++) {
+      d_data[i].fillAll(t);
+   }
+}
+
+template<class TYPE>
+void EdgeData<TYPE>::fillAll(
+   const TYPE& t,
+   const hier::Box& box)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   for (int i = 0; i < getDim().getValue(); i++) {
+      d_data[i].fillAll(t, EdgeGeometry::toEdgeBox(box, i));
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print edge centered data.  Note:  makes call to specialized printAxis *
+ * routine in EdgeDataSpecialized.C                                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void EdgeData<TYPE>::print(
+   const hier::Box& box,
+   std::ostream& os,
+   int prec) const
+{
+   for (int axis = 0; axis < getDim().getValue(); axis++) {
+      os << "Array axis = " << axis << std::endl;
+      printAxis(axis, box, os, prec);
+   }
+}
+
+template<class TYPE>
+void EdgeData<TYPE>::print(
+   const hier::Box& box,
+   int depth,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   for (int axis = 0; axis < getDim().getValue(); axis++) {
+      os << "Array axis = " << axis << std::endl;
+      printAxis(axis, box, depth, os, prec);
+   }
+}
+
+template<class TYPE>
+void EdgeData<TYPE>::printAxis(
+   int axis,
+   const hier::Box& box,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   TBOX_ASSERT((axis >= 0) && (axis < getDim().getValue()));
+
+   for (int d = 0; d < d_depth; d++) {
+      os << "Array depth = " << d << std::endl;
+      printAxis(axis, box, d, os, prec);
+   }
+}
+
+template<class TYPE>
+void EdgeData<TYPE>::printAxis(
+   int axis,
+   const hier::Box& box,
+   int depth,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+   TBOX_ASSERT((axis >= 0) && (axis < getDim().getValue()));
+
+   os.precision(prec);
+   for (EdgeIterator i(box, axis); i; i++) {
+      os << "array" << i() << " = " << d_data[axis](i(), depth)
+      << std::endl << std::flush;
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Checks that class version and restart file version are equal.  If so, *
+ * reads in the d_depth data member to the database.  Then tells		*
+ * d_data to read itself in from the database.				*
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void EdgeData<TYPE>::getSpecializedFromDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   int ver = database->getInteger("PDAT_EDGEDATA_VERSION");
+   if (ver != PDAT_EDGEDATA_VERSION) {
+      TBOX_ERROR("EdgeData<getDim()>::getSpecializedFromDatabase error...\n"
+         << " : Restart file version different than class version" << std::endl);
+   }
+
+   d_depth = database->getInteger("d_depth");
+
+   tbox::Pointer<tbox::Database> array_database;
+   for (int i = 0; i < getDim().getValue(); i++) {
+      std::string array_name = "d_data" + tbox::Utilities::intToString(i);
+      array_database = database->getDatabase(array_name);
+      (d_data[i]).getFromDatabase(array_database);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Write out the class version number, d_depth data member to the	*
+ * database.  Then tells d_data to write itself to the database.		*
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void EdgeData<TYPE>::putSpecializedToDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   database->putInteger("PDAT_EDGEDATA_VERSION", PDAT_EDGEDATA_VERSION);
+
+   database->putInteger("d_depth", d_depth);
+
+   tbox::Pointer<tbox::Database> array_database;
+   for (int i = 0; i < getDim().getValue(); i++) {
+      std::string array_name = "d_data" + tbox::Utilities::intToString(i);
+      array_database = database->putDatabase(array_name);
+      (d_data[i]).putToDatabase(array_database);
+   }
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeData.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeData.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,116 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated edge centered patch data type 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int EdgeData<TYPE>::getDepth() const
+{
+   return d_depth;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE * EdgeData<TYPE>::getPointer(
+   int axis,
+   int depth)
+{
+   TBOX_ASSERT((axis >= 0) && (axis < getDim().getValue()));
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data[axis].getPointer(depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE * EdgeData<TYPE>::getPointer(
+   int axis,
+   int depth) const
+{
+   TBOX_ASSERT((axis >= 0) && (axis < getDim().getValue()));
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data[axis].getPointer(depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE & EdgeData<TYPE>::operator () (
+   const EdgeIndex& i,
+   int depth)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, i);
+
+   const int axis = i.getAxis();
+
+   TBOX_ASSERT((axis >= 0) && (axis < getDim().getValue()));
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data[axis](i, depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE &
+EdgeData<TYPE>::operator () (
+   const EdgeIndex& i,
+   int depth) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, i);
+
+   const int axis = i.getAxis();
+
+   TBOX_ASSERT((axis >= 0) && (axis < getDim().getValue()));
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data[axis](i, depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ArrayData<TYPE>&
+EdgeData<TYPE>::getArrayData(
+   int axis)
+{
+   TBOX_ASSERT((axis >= 0) && (axis < getDim().getValue()));
+
+   return d_data[axis];
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const ArrayData<TYPE>&
+EdgeData<TYPE>::getArrayData(
+   int axis) const
+{
+   TBOX_ASSERT((axis >= 0) && (axis < getDim().getValue()));
+
+   return d_data[axis];
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void EdgeData<TYPE>::copyOnBox(
+   const EdgeData<TYPE>& src,
+   const hier::Box& box)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*this, src, box);
+
+   for (int axis = 0; axis < getDim().getValue(); axis++) {
+      const hier::Box edge_box = EdgeGeometry::toEdgeBox(box, axis);
+      d_data[axis].copy(src.getArrayData(axis), edge_box);
+   }
+
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeData.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeData.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,483 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated edge centered patch data type 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeData
+#define included_pdat_EdgeData
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/pdat/EdgeIndex.h"
+#include "SAMRAI/pdat/EdgeIterator.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * @brief Class EdgeData<DIM> provides an implementation for data defined
+ * at cell edges on AMR patches.  It is derived from the hier::PatchData
+ * interface common to all SAMRAI patch data types.  Given a CELL-centered
+ * AMR index space box, an edge data object represents data of some template
+ * TYPE and depth on the edges of the cells in the box.  Here, depth
+ * indicates the number of data values at each edge index location.  The
+ * EdgeGeometry class provides the translation between the standard SAMRAI
+ * cell-centered AMR index space and edge-centered data.
+ *
+ * Edge data is stored in DIM arrays, each of which contains the
+ * data for the edges tangent to a corresponding coordinate direction.
+ * Within each array, data is stored in (i,...,k,d) order, where i,...,k
+ * indicates a spatial index and the d indicates the component depth at
+ * that locaion.  Memory allocation is in column-major ordering (e.g., Fortran
+ * style) so that the leftmost index runs fastest in memory.
+ * For example, a three-dimensional edge data object created over a
+ * CELL-centered AMR index space [l0:u0,l1:u1,l2:u2] allocates three data
+ * arrays dimensioned as follows:
+ * \verbatim
+ *
+ * axis 0
+ *   [ l0 : u0 ,
+ *     l1 : u1+1 ,
+ *     l2 : u2+1 , d ]   ,
+ *
+ * axis 1
+ *   [ l0 : u0+1 ,
+ *     l1 : u1 ,
+ *     l2 : u2+1 , d ]   ,
+ *
+ * axis 2
+ *   [ l0 : u0+1 ,
+ *     l1 : u1+1 ,
+ *     l2 : u2 , d ]   ,
+ *
+ * \endverbatim
+ * Here the axis directions 0, 1, 2 can be thought of as the x, y, and z
+ * edge directions, respectively, and d is the depth index (i.e., number
+ * of values at each face index location).  Other spatial dimensions are
+ * represented similarly.
+ *
+ * The data type TYPE must define a default constructor (that takes no
+ * arguments) and also the assignment operator.
+ *
+ * @see pdat::ArrayData
+ * @see hier::PatchData
+ * @see pdat::EdgeDataFactory
+ * @see pdat::EdgeIndex
+ * @see pdat::EdgeIterator
+ * @see pdat::EdgeGeometry
+ */
+
+template<class TYPE>
+class EdgeData:public hier::PatchData
+{
+public:
+   /*!
+    * @brief Calculate the amount of memory needed to represent edge-
+    * centered data over a CELL-centered AMR index space box.
+    *
+    * This function assumes that the amount of memory
+    * needed for TYPE is sizeof(TYPE).  If this is not the case, then a
+    * specialized function must be defined.
+    *
+    * @param box const Box reference describing the interior of the
+    *            standard CELL-centered index box over which the
+    *            edge data object will be created.
+    * @param depth gives the number of components for each
+    *              spatial location in the array.
+    * @param ghosts const IntVector reference indicating the width
+    *              of the ghost cell region around the box over which
+    *              the edge data will be allocated.
+    */
+   static size_t
+   getSizeOfData(
+      const hier::Box& box,
+      int depth,
+      const hier::IntVector& ghosts);
+
+   /*!
+    * @brief The constructor for an edge data object.
+    *
+    * @param box const Box reference describing the interior of the
+    *            standard CELL-centered index box over which the
+    *            edge data object will be created.
+    * @param depth gives the number of components for each
+    *              spatial location in the array.
+    * @param ghosts const IntVector reference indicating the width
+    *              of the ghost cell region around the box over which
+    *              the edge data will be allocated.
+    */
+   explicit EdgeData(
+      const hier::Box& box,
+      int depth,
+      const hier::IntVector& ghosts);
+
+   /*!
+    * @brief The virtual destructor for an edge data object.
+    */
+   virtual ~EdgeData<TYPE>();
+
+   /*!
+    * @brief Return the depth (e.g., the number of components in each spatial
+    * location) of the array.
+    */
+   int
+   getDepth() const;
+
+   /*!
+    * @brief Get a pointer to the beginning of a particular axis and
+    * depth component of the edge centered array.
+    */
+   TYPE *
+   getPointer(
+      int axis,
+      int depth = 0);
+
+   /*!
+    * @brief Get a const pointer to the beginning of a particular axis and
+    * depth component of the edge centered array.
+    */
+   const TYPE *
+   getPointer(
+      int axis,
+      int depth = 0) const;
+
+   /*!
+    * @brief Return a reference to the data entry corresponding
+    * to a given edge index and depth.
+    */
+   TYPE&
+   operator () (
+      const EdgeIndex& i,
+      int depth = 0);
+
+   /*!
+    * @brief Return a const reference to the data entry corresponding
+    * to a given edge index and depth.
+    */
+   const TYPE&
+   operator () (
+      const EdgeIndex& i,
+      int depth = 0) const;
+
+   /*!
+    * @brief Return a reference to the array data object for the
+    * given axis of the edge centered data object.
+    */
+   ArrayData<TYPE>&
+   getArrayData(
+      int axis);
+
+   /*!
+    * @brief Return a const reference to the array data object for the
+    * given axis of the edge centered data object.
+    */
+   const ArrayData<TYPE>&
+   getArrayData(
+      int axis) const;
+
+   /*!
+    * @brief A fast copy from source to destination (i.e., this)
+    * patch data object.
+    *
+    * Data is copied where there is overlap in the underlying index space.
+    * The copy is performed on the interior plus the ghost cell width (for
+    * both the source and destination).  Currently, source data must be
+    * an EdgeData of the same DIM and TYPE.  If not, then an unrecoverable
+    * error results.
+    */
+   virtual void
+   copy(
+      const hier::PatchData& src);
+
+   /*!
+    * @brief A fast copy from source (i.e., this) to destination
+    * patch data object.
+    *
+    * Data is copied where there is overlap in the underlying index space.
+    * The copy is performed on the interior plus the ghost cell width (for
+    * both the source and destination).  Currently, destination data must be
+    * an EdgeData of the same DIM and TYPE.  If not, then an unrecoverable
+    * error results.
+    */
+   virtual void
+   copy2(
+      hier::PatchData& dst) const;
+
+   /*!
+    * @brief Copy data from source to destination (i.e., this)
+    * patch data object on the given overlap.
+    *
+    * Currently, source data must be EdgeData of the same DIM and TYPE
+    * and the overlap must be a EdgeOverlap of the same DIM. If not,
+    * then an unrecoverable error results.
+    */
+   virtual void
+   copy(
+      const hier::PatchData& src,
+      const hier::BoxOverlap& overlap);
+
+   /*!
+    * @brief Copy data from source (i.e., this) to destination
+    * patch data object on the given overlap.
+    *
+    * Currently, destination data must be EdgeData of the same DIM and TYPE
+    * and the overlap must be a EdgeOverlap of the same DIM.  If not,
+    * then an unrecoverable error results.
+    */
+   virtual void
+   copy2(
+      hier::PatchData& dst,
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Copy data from source to destination (i.e., this)
+    * patch data object on the given CELL-centered AMR index box.
+    */
+   void
+   copyOnBox(
+      const EdgeData<TYPE>& src,
+      const hier::Box& box);
+
+   /*!
+    * @brief Fast copy (i.e., source and this edge data objects are
+    * defined over the same box) to this destination edge data object
+    * from the given source edge data object at the specified depths.
+    */
+   void
+   copyDepth(
+      int dst_depth,
+      const EdgeData<TYPE>& src,
+      int src_depth);
+
+   /*!
+    * @brief Return true if the patch data object can estimate the
+    * stream size required to fit its data using only index
+    * space information (i.e., a box).
+    *
+    * This routine is defined for the standard types (bool, char,
+    * double, float, int, and dcomplex).
+    */
+   virtual bool
+   canEstimateStreamSizeFromBox() const;
+
+   /*!
+    * @brief Return the number of bytes needed to stream the data
+    * in this patch data object lying in the specified box overlap
+    * region.
+    *
+    * This routine is defined for the standard types (bool, char,
+    * double, float, int, and dcomplex).
+    */
+   virtual int
+   getDataStreamSize(
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Pack data in this patch data object lying in the specified
+    * box overlap region into the stream.  The overlap must be an
+    * EdgeOverlap of the same DIM.
+    */
+   virtual void
+   packStream(
+      tbox::MessageStream& stream,
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Unpack data from stream into this patch data object over
+    * the specified box overlap region. The overlap must be an
+    * EdgeOverlap of the same DIM.
+    */
+   virtual void
+   unpackStream(
+      tbox::MessageStream& stream,
+      const hier::BoxOverlap& overlap);
+
+   /*!
+    * @brief Fill all values at depth d with the value t.
+    */
+   void
+   fill(
+      const TYPE& t,
+      int d = 0);
+
+   /*!
+    * @brief Fill all values at depth d within the box with the value t.
+    */
+   void
+   fill(
+      const TYPE& t,
+      const hier::Box& box,
+      int d = 0);
+
+   /*!
+    * @brief Fill all depth components with value t.
+    */
+   void
+   fillAll(
+      const TYPE& t);
+
+   /*!
+    * @brief Fill all depth components within the box with value t.
+    */
+   void
+   fillAll(
+      const TYPE& t,
+      const hier::Box& box);
+
+   /*!
+    * @brief Print all edge data values residing in the specified box.
+    * If the depth of the array is greater than one, all depths are printed.
+    *
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to edge index space.
+    * @param os   reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   print(
+      const hier::Box& box,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Print all edge data values at the given array depth in
+    * the specified box.
+    *
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to edge index space.
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    * @param os   reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   print(
+      const hier::Box& box,
+      int depth,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Print all edge centered data values for specified axis
+    * residing in the specified box.  If the depth of the data is
+    * greater than one, all depths are printed.
+    *
+    * @param axis  integer edge data coordinate axis,
+    *              must satisfy 0 <= axis < DIM
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to edge index space.
+    * @param os    reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   printAxis(
+      int axis,
+      const hier::Box& box,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Print all edge centered data values for specified axis
+    * residing in the specified box.  If the depth of the data is
+    * greater than one, all depths are printed.
+    *
+    * @param axis  integer edge data coordinate axis,
+    *              must satisfy 0 <= axis < DIM
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to edge index space.
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    * @param os    reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   printAxis(
+      int axis,
+      const hier::Box& box,
+      int depth,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * Check that class version and restart file version are equal.  If so,
+    * read data members from the database.
+    *
+    * Assertions: database must be non-null pointer.
+    */
+   virtual void
+   getSpecializedFromDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+   /*!
+    * Write out the class version number and other data members to
+    * the database.
+    *
+    * Assertions: database must be non-null pointer.
+    */
+   virtual void
+   putSpecializedToDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+   /*!
+    * The edge iterator iterates over the elements on one axis of an edge
+    * centered box geometry.  This typedef is a convenience for
+    * using the EdgeIterator class.
+    */
+   typedef EdgeIterator Iterator;
+
+private:
+   EdgeData(
+      const EdgeData<TYPE>&);           // not implemented
+   void
+   operator = (
+      const EdgeData<TYPE>&);                           // not implemented
+
+   int d_depth;
+   ArrayData<TYPE> d_data[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/EdgeData.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/EdgeData.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeDataFactory.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeDataFactory.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,180 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating edge data objects 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeDataFactory_C
+#define included_pdat_EdgeDataFactory_C
+
+#include "SAMRAI/pdat/EdgeDataFactory.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/pdat/EdgeGeometry.h"
+#include "SAMRAI/pdat/OuteredgeDataFactory.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/MemoryUtilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/EdgeDataFactory.I"
+#endif
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * The constructor simply caches the default ghost cell width and depth.	*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+EdgeDataFactory<TYPE>::EdgeDataFactory(
+   int depth,
+   const hier::IntVector& ghosts,
+   bool fine_boundary_represents_var):
+   hier::PatchDataFactory(ghosts),
+   d_depth(depth),
+   d_fine_boundary_represents_var(fine_boundary_represents_var),
+   d_mb_trans(NULL)
+{
+   TBOX_ASSERT(depth > 0);
+   TBOX_ASSERT(ghosts.min() >= 0);
+}
+
+template<class TYPE>
+EdgeDataFactory<TYPE>::~EdgeDataFactory()
+{
+   if (d_mb_trans) {
+      delete d_mb_trans;
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Clone the factory and copy the default parameters to the new factory.	*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::PatchDataFactory>
+EdgeDataFactory<TYPE>::cloneFactory(
+   const hier::IntVector& ghosts)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, ghosts);
+
+   return tbox::Pointer<hier::PatchDataFactory>(new EdgeDataFactory<TYPE>(
+                                                   d_depth,
+                                                   ghosts,
+                                                   d_fine_boundary_represents_var));
+}
+
+/*
+ *************************************************************************
+ *
+ * Allocate the concrete edge data classes.
+ *
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::PatchData>
+EdgeDataFactory<TYPE>::allocate(
+   const hier::Patch& patch) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, patch);
+
+   hier::PatchData* patchdata =
+      new EdgeData<TYPE>(patch.getBox(), d_depth, this->d_ghosts);
+   return tbox::Pointer<hier::PatchData>(patchdata);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Return the box geometry type for edge data objects.			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::BoxGeometry>
+EdgeDataFactory<TYPE>::getBoxGeometry(
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   hier::BoxGeometry* boxgeometry = new EdgeGeometry(box, this->d_ghosts);
+   return tbox::Pointer<hier::BoxGeometry>(boxgeometry);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Calculate the amount of memory needed to allocate the data object.	*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+size_t EdgeDataFactory<TYPE>::getSizeOfMemory(
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   const size_t obj =
+      tbox::MemoryUtilities::align(sizeof(EdgeData<TYPE>));
+   const size_t data =
+      EdgeData<TYPE>::getSizeOfData(box, d_depth, this->d_ghosts);
+   return obj + data;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Determine whether this is a valid copy operation to/from EdgeData     *
+ * between the supplied datatype.                                        *
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+bool EdgeDataFactory<TYPE>::validCopyTo(
+   const tbox::Pointer<hier::PatchDataFactory>& dst_pdf) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *dst_pdf);
+
+   bool valid_copy = false;
+
+   /*
+    * Valid options are EdgeData and OuteredgeData.
+    */
+   if (!valid_copy) {
+      tbox::Pointer<EdgeDataFactory<TYPE> > edf = dst_pdf;
+      if (!edf.isNull()) {
+         valid_copy = true;
+      }
+   }
+
+   if (!valid_copy) {
+      tbox::Pointer<OuteredgeDataFactory<TYPE> > oedf = dst_pdf;
+      if (!oedf.isNull()) {
+         valid_copy = true;
+      }
+   }
+
+   return valid_copy;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeDataFactory.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeDataFactory.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,33 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating edge data objects 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int EdgeDataFactory<TYPE>::getDepth() const
+{
+   return d_depth;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+hier::MultiblockDataTranslator *
+EdgeDataFactory<TYPE>::getMultiblockDataTranslator()
+{
+   if (d_mb_trans == NULL) {
+      d_mb_trans = new MultiblockEdgeDataTranslator<TYPE>();
+   }
+   return d_mb_trans;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeDataFactory.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeDataFactory.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,156 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating edge data objects 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeDataFactory
+#define included_pdat_EdgeDataFactory
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/MultiblockEdgeDataTranslator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/PatchDataFactory.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class EdgeDataFactory is a factory class used to allocate new
+ * instances of EdgeData objects.  It is a subclass of the patch
+ * data factory class and edge data is a subclass of patch data.  Both
+ * the factory and data classes are templated on the type of the contained
+ * object (e.g., double or int).
+ *
+ * @see pdat::EdgeData
+ * @see pdat::PatchDataFactory
+ */
+
+template<class TYPE>
+class EdgeDataFactory:public hier::PatchDataFactory
+{
+public:
+   /**
+    * The constructor for the edge data factory class.  The ghost cell width, depth
+    * (number of components), and fine boundary representation arguments give the
+    * defaults for all edge data objects created with this factory.  See
+    * the EdgeVariable<DIM> class header file for more information.
+    */
+   explicit EdgeDataFactory(
+      int depth,
+      const hier::IntVector& ghosts,
+      bool fine_boundary_represents_var);
+
+   /**
+    * Virtual destructor for the edge data factory class.
+    */
+   virtual ~EdgeDataFactory<TYPE>();
+
+   /**
+    * @brief Abstract virtual function to clone a patch data factory.
+    *
+    * This will return a new instantiation of the abstract factory
+    * with the same properties.  The properties of the cloned factory
+    * can then be changed without modifying the original.
+    *
+    * @param ghosts default ghost cell width for concrete classes created from
+    * the factory.
+    */
+   virtual tbox::Pointer<hier::PatchDataFactory>
+   cloneFactory(
+      const hier::IntVector& ghosts);
+
+   /**
+    * Virtual factory function to allocate a concrete edge data object.
+    * The default information about the object (e.g., ghost cell width)
+    * is taken from the factory.
+    */
+
+   virtual tbox::Pointer<hier::PatchData>
+   allocate(
+      const hier::Patch& patch) const;
+
+   /**
+    * Allocate the box geometry object associated with the patch data.
+    * This information will be used in the computation of intersections
+    * and data dependencies between objects.
+    */
+   virtual tbox::Pointer<hier::BoxGeometry>
+   getBoxGeometry(
+      const hier::Box& box) const;
+
+   /**
+    * Get the depth (number of components).  This is the depth that
+    * will be used in the instantiation of edge data objects.
+    */
+   int
+   getDepth() const;
+
+   /**
+    * Calculate the amount of memory needed to store the edge data object,
+    * including object data and dynamically allocated data.
+    */
+   virtual size_t
+   getSizeOfMemory(
+      const hier::Box& box) const;
+
+   /**
+    * Return a boolean value indicating how data for the edge quantity will be treated
+    * on coarse-fine interfaces.  This value is passed into the constructor.  See
+    * the EdgeVariable<DIM> class header file for more information.
+    */
+   bool fineBoundaryRepresentsVariable() const {
+      return d_fine_boundary_represents_var;
+   }
+
+   /**
+    * Return true since the edge data index space extends beyond the interior of
+    * patches.  That is, edge data lives on patch borders.
+    */
+   bool dataLivesOnPatchBorder() const {
+      return true;
+   }
+
+   /**
+    * Return whether it is valid to copy this EdgeDataFactory to the
+    * supplied destination patch data factory.  It will return true if
+    * dst_pdf is EdgeDataFactory or OuteredgeDataFactory, false otherwise.
+    */
+   bool
+   validCopyTo(
+      const tbox::Pointer<hier::PatchDataFactory>& dst_pdf) const;
+
+   /**
+    * Return pointer to a multiblock data translator
+    */
+   hier::MultiblockDataTranslator *
+   getMultiblockDataTranslator();
+
+private:
+   int d_depth;
+   bool d_fine_boundary_represents_var;
+
+   MultiblockEdgeDataTranslator<TYPE>* d_mb_trans;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/EdgeDataFactory.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/EdgeDataFactory.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeDoubleConstantRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeDoubleConstantRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,272 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for edge-centered double data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeDoubleConstantRefine_C
+#define included_pdat_EdgeDoubleConstantRefine_C
+
+#include "SAMRAI/pdat/EdgeDoubleConstantRefine.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/pdat/EdgeVariable.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in conrefine1d.f:
+void F77_FUNC(conrefedgedoub1d, CONREFEDGEDOUB1D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const double *, double *);
+// in conrefine2d.f:
+void F77_FUNC(conrefedgedoub2d0, CONREFEDGEDOUB2D0) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const double *, double *);
+void F77_FUNC(conrefedgedoub2d1, CONREFEDGEDOUB2D1) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const double *, double *);
+// in conrefine3d.f:
+void F77_FUNC(conrefedgedoub3d0, CONREFEDGEDOUB3D0) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const double *, double *);
+void F77_FUNC(conrefedgedoub3d1, CONREFEDGEDOUB3D1) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const double *, double *);
+void F77_FUNC(conrefedgedoub3d2, CONREFEDGEDOUB3D2) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const double *, double *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+EdgeDoubleConstantRefine::EdgeDoubleConstantRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSTANT_REFINE")
+{
+   d_name_id = "CONSTANT_REFINE";
+}
+
+EdgeDoubleConstantRefine::~EdgeDoubleConstantRefine()
+{
+}
+
+bool EdgeDoubleConstantRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<EdgeVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+EdgeDoubleConstantRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int EdgeDoubleConstantRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+EdgeDoubleConstantRefine::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void EdgeDoubleConstantRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   tbox::Pointer<EdgeData<double> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<EdgeData<double> >
+   fdata = fine.getPatchData(dst_component);
+
+   const pdat::EdgeOverlap* t_overlap =
+      dynamic_cast<const pdat::EdgeOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*this, fine, coarse, ratio);
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   for (int axis = 0; axis < dim.getValue(); axis++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(axis);
+
+      for (hier::BoxList::Iterator b(boxes); b; b++) {
+
+         hier::Box fine_box(b());
+         TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, fine_box);
+
+         for (int i = 0; i < dim.getValue(); i++) {
+            if (i != axis) {
+               fine_box.upper(i) -= 1;
+            }
+         }
+
+         const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+         const hier::Index ifirstc = coarse_box.lower();
+         const hier::Index ilastc = coarse_box.upper();
+         const hier::Index ifirstf = fine_box.lower();
+         const hier::Index ilastf = fine_box.upper();
+
+         for (int d = 0; d < fdata->getDepth(); d++) {
+            if (dim == tbox::Dimension(1)) {
+               F77_FUNC(conrefedgedoub1d, CONREFEDGEDOUB1D) (
+                  ifirstc(0), ilastc(0),
+                  ifirstf(0), ilastf(0),
+                  cilo(0), cihi(0),
+                  filo(0), fihi(0),
+                  &ratio[0],
+                  cdata->getPointer(0, d),
+                  fdata->getPointer(0, d));
+            } else if (dim == tbox::Dimension(2)) {
+               if (axis == 0) {
+                  F77_FUNC(conrefedgedoub2d0, CONREFEDGEDOUB2D0) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               } else if (axis == 1) {
+                  F77_FUNC(conrefedgedoub2d1, CONREFEDGEDOUB2D1) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d));
+               }
+            } else if (dim == tbox::Dimension(3)) {
+               if (axis == 0) {
+                  F77_FUNC(conrefedgedoub3d0, CONREFEDGEDOUB3D0) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               } else if (axis == 1) {
+                  F77_FUNC(conrefedgedoub3d1, CONREFEDGEDOUB3D1) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d));
+               } else if (axis == 2) {
+                  F77_FUNC(conrefedgedoub3d2, CONREFEDGEDOUB3D2) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(2, d),
+                     fdata->getPointer(2, d));
+               }
+            } else {
+               TBOX_ERROR(
+                  "EdgeDoubleConstantRefine::refine dimension > 3 not supported"
+                  << std::endl);
+            }
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeDoubleConstantRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeDoubleConstantRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for edge-centered double data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeDoubleConstantRefine
+#define included_pdat_EdgeDoubleConstantRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class EdgeDoubleConstantRefine implements constant
+ * interpolation for edge-centered double patch data defined over a
+ * mesh.  It is derived from the xfer::RefineOperator base class.
+ * The numerical operations for interpolation use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is edge-centered double, and the string is "CONSTANT_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class EdgeDoubleConstantRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit EdgeDoubleConstantRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~EdgeDoubleConstantRefine();
+
+   /**
+    * Return true if the variable and name string match edge-centered
+    * double constant interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name string identifier of this refinement operation.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of edge-centered double constant interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the constant interpolation operator is the vector
+    * of zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the edge-centered double constant
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the boxes contained in fine_overlap.
+    * It is assumed that the coarse patch contains sufficient data for the
+    * stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeDoubleLinearTimeInterpolateOp.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeDoubleLinearTimeInterpolateOp.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,265 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for edge-centered double patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeDoubleLinearTimeInterpolateOp_C
+#define included_pdat_EdgeDoubleLinearTimeInterpolateOp_C
+
+#include "SAMRAI/pdat/EdgeDoubleLinearTimeInterpolateOp.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/pdat/EdgeVariable.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in lintimint1d.f:
+void F77_FUNC(lintimeintedgedoub1d, LINTIMEINTEDGEDOUB1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+// in lintimint2d.f:
+void F77_FUNC(lintimeintedgedoub2d0, LINTIMEINTEDGEDOUB2D0) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+void F77_FUNC(lintimeintedgedoub2d1, LINTIMEINTEDGEDOUB2D1) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+// in lintimint3d.f:
+void F77_FUNC(lintimeintedgedoub3d0, LINTIMEINTEDGEDOUB3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+void F77_FUNC(lintimeintedgedoub3d1, LINTIMEINTEDGEDOUB3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+void F77_FUNC(lintimeintedgedoub3d2, LINTIMEINTEDGEDOUB3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+EdgeDoubleLinearTimeInterpolateOp::EdgeDoubleLinearTimeInterpolateOp():
+   xfer::TimeInterpolateOperator()
+{
+}
+
+EdgeDoubleLinearTimeInterpolateOp::~EdgeDoubleLinearTimeInterpolateOp()
+{
+}
+
+bool EdgeDoubleLinearTimeInterpolateOp::findTimeInterpolateOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   const tbox::Pointer<EdgeVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == "STD_LINEAR_TIME_INTERPOLATE")) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+void EdgeDoubleLinearTimeInterpolateOp::timeInterpolate(
+   hier::PatchData& dst_data,
+   const hier::Box& where,
+   const hier::PatchData& src_data_old,
+   const hier::PatchData& src_data_new) const
+{
+   const tbox::Dimension& dim(where.getDim());
+
+   const EdgeData<double>* old_dat =
+      dynamic_cast<const EdgeData<double> *>(&src_data_old);
+   const EdgeData<double>* new_dat =
+      dynamic_cast<const EdgeData<double> *>(&src_data_new);
+   EdgeData<double>* dst_dat =
+      dynamic_cast<EdgeData<double> *>(&dst_data);
+
+   TBOX_ASSERT(old_dat != NULL);
+   TBOX_ASSERT(new_dat != NULL);
+   TBOX_ASSERT(dst_dat != NULL);
+   TBOX_ASSERT(where * old_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * new_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * dst_dat->getGhostBox() == where);
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst_data, where, src_data_old, src_data_new);
+
+   const hier::Index old_ilo = old_dat->getGhostBox().lower();
+   const hier::Index old_ihi = old_dat->getGhostBox().upper();
+   const hier::Index new_ilo = new_dat->getGhostBox().lower();
+   const hier::Index new_ihi = new_dat->getGhostBox().upper();
+
+   const hier::Index dst_ilo = dst_dat->getGhostBox().lower();
+   const hier::Index dst_ihi = dst_dat->getGhostBox().upper();
+
+   const hier::Index ifirst = where.lower();
+   const hier::Index ilast = where.upper();
+
+   const double old_time = old_dat->getTime();
+   const double new_time = new_dat->getTime();
+   const double dst_time = dst_dat->getTime();
+
+   TBOX_ASSERT((old_time < dst_time ||
+                tbox::MathUtilities<double>::equalEps(old_time, dst_time)) &&
+      (dst_time < new_time ||
+       tbox::MathUtilities<double>::equalEps(dst_time, new_time)));
+
+   double tfrac = dst_time - old_time;
+   double denom = new_time - old_time;
+   if (denom > tbox::MathUtilities<double>::getMin()) {
+      tfrac /= denom;
+   } else {
+      tfrac = 0.0;
+   }
+
+   for (int d = 0; d < dst_dat->getDepth(); d++) {
+      if (dim == tbox::Dimension(1)) {
+         F77_FUNC(lintimeintedgedoub1d, LINTIMEINTEDGEDOUB1D) (ifirst(0),
+            ilast(0),
+            old_ilo(0), old_ihi(0),
+            new_ilo(0), new_ihi(0),
+            dst_ilo(0), dst_ihi(0),
+            tfrac,
+            old_dat->getPointer(0, d),
+            new_dat->getPointer(0, d),
+            dst_dat->getPointer(0, d));
+      } else if (dim == tbox::Dimension(2)) {
+         F77_FUNC(lintimeintedgedoub2d0, LINTIMEINTEDGEDOUB2D0) (ifirst(0),
+            ifirst(1), ilast(0), ilast(1),
+            old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+            new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+            dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+            tfrac,
+            old_dat->getPointer(0, d),
+            new_dat->getPointer(0, d),
+            dst_dat->getPointer(0, d));
+         F77_FUNC(lintimeintedgedoub2d1, LINTIMEINTEDGEDOUB2D1) (ifirst(0),
+            ifirst(1), ilast(0), ilast(1),
+            old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+            new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+            dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+            tfrac,
+            old_dat->getPointer(1, d),
+            new_dat->getPointer(1, d),
+            dst_dat->getPointer(1, d));
+      } else if (dim == tbox::Dimension(3)) {
+         F77_FUNC(lintimeintedgedoub3d0, LINTIMEINTEDGEDOUB3D0) (ifirst(0),
+            ifirst(1), ifirst(2),
+            ilast(0), ilast(1), ilast(2),
+            old_ilo(0), old_ilo(1), old_ilo(2),
+            old_ihi(0), old_ihi(1), old_ihi(2),
+            new_ilo(0), new_ilo(1), new_ilo(2),
+            new_ihi(0), new_ihi(1), new_ihi(2),
+            dst_ilo(0), dst_ilo(1), dst_ilo(2),
+            dst_ihi(0), dst_ihi(1), dst_ihi(2),
+            tfrac,
+            old_dat->getPointer(0, d),
+            new_dat->getPointer(0, d),
+            dst_dat->getPointer(0, d));
+         F77_FUNC(lintimeintedgedoub3d1, LINTIMEINTEDGEDOUB3D1) (ifirst(0),
+            ifirst(1), ifirst(2),
+            ilast(0), ilast(1), ilast(2),
+            old_ilo(0), old_ilo(1), old_ilo(2),
+            old_ihi(0), old_ihi(1), old_ihi(2),
+            new_ilo(0), new_ilo(1), new_ilo(2),
+            new_ihi(0), new_ihi(1), new_ihi(2),
+            dst_ilo(0), dst_ilo(1), dst_ilo(2),
+            dst_ihi(0), dst_ihi(1), dst_ihi(2),
+            tfrac,
+            old_dat->getPointer(1, d),
+            new_dat->getPointer(1, d),
+            dst_dat->getPointer(1, d));
+         F77_FUNC(lintimeintedgedoub3d2, LINTIMEINTEDGEDOUB3D2) (ifirst(0),
+            ifirst(1), ifirst(2),
+            ilast(0), ilast(1), ilast(2),
+            old_ilo(0), old_ilo(1), old_ilo(2),
+            old_ihi(0), old_ihi(1), old_ihi(2),
+            new_ilo(0), new_ilo(1), new_ilo(2),
+            new_ihi(0), new_ihi(1), new_ihi(2),
+            dst_ilo(0), dst_ilo(1), dst_ilo(2),
+            dst_ihi(0), dst_ihi(1), dst_ihi(2),
+            tfrac,
+            old_dat->getPointer(2, d),
+            new_dat->getPointer(2, d),
+            dst_dat->getPointer(2, d));
+      } else {
+         TBOX_ERROR(
+            "EdgeDoubleLinearTimeInterpolateOp::TimeInterpolate dim > 3 not supported"
+            << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeDoubleLinearTimeInterpolateOp.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeDoubleLinearTimeInterpolateOp.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for edge-centered double patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeDoubleLinearTimeInterpolateOp
+#define included_pdat_EdgeDoubleLinearTimeInterpolateOp
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class EdgeDoubleLinearTimeInterpolateOp implements standard
+ * linear time interpolation for edge-centered double patch data.
+ * It is derived from the xfer::TimeInterpolateOperator base class.
+ * The interpolation uses FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is a edge-centered double, and the string is
+ * "STD_LINEAR_TIME_INTERPOLATE".
+ *
+ * @see xfer::TimeInterpolateOperator
+ */
+
+class EdgeDoubleLinearTimeInterpolateOp:
+   public xfer::TimeInterpolateOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   EdgeDoubleLinearTimeInterpolateOp();
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~EdgeDoubleLinearTimeInterpolateOp();
+
+   /**
+    * Return true if the variable and name string match the standard
+    * edge-centered double interpolation; otherwise, return false.
+    */
+   bool
+   findTimeInterpolateOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Perform linear time interpolation between two edge-centered double
+    * patch data sources and place result in the destination patch data.
+    * Time interpolation is performed on the intersection of the destination
+    * patch data and the input box.  The time to which data is interpolated
+    * is provided by the destination data.
+    */
+   void
+   timeInterpolate(
+      hier::PatchData& dst_data,
+      const hier::Box& where,
+      const hier::PatchData& src_data_old,
+      const hier::PatchData& src_data_new) const;
+
+private:
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeFloatConstantRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeFloatConstantRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,272 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for edge-centered float data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeFloatConstantRefine_C
+#define included_pdat_EdgeFloatConstantRefine_C
+
+#include "SAMRAI/pdat/EdgeFloatConstantRefine.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/pdat/EdgeVariable.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in conrefine1d.f:
+void F77_FUNC(conrefedgeflot1d, CONREFEDGEFLOT1D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const float *, float *);
+// in conrefine2d.f:
+void F77_FUNC(conrefedgeflot2d0, CONREFEDGEFLOT2D0) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const float *, float *);
+void F77_FUNC(conrefedgeflot2d1, CONREFEDGEFLOT2D1) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const float *, float *);
+// in conrefine3d.f:
+void F77_FUNC(conrefedgeflot3d0, CONREFEDGEFLOT3D0) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const float *, float *);
+void F77_FUNC(conrefedgeflot3d1, CONREFEDGEFLOT3D1) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const float *, float *);
+void F77_FUNC(conrefedgeflot3d2, CONREFEDGEFLOT3D2) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const float *, float *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+EdgeFloatConstantRefine::EdgeFloatConstantRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSTANT_REFINE")
+{
+   d_name_id = "CONSTANT_REFINE";
+}
+
+EdgeFloatConstantRefine::~EdgeFloatConstantRefine()
+{
+}
+
+bool EdgeFloatConstantRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<EdgeVariable<float> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+EdgeFloatConstantRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int EdgeFloatConstantRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+EdgeFloatConstantRefine::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void EdgeFloatConstantRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   tbox::Pointer<EdgeData<float> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<EdgeData<float> >
+   fdata = fine.getPatchData(dst_component);
+
+   const pdat::EdgeOverlap* t_overlap =
+      dynamic_cast<const pdat::EdgeOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*this, fine, coarse, ratio);
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   for (int axis = 0; axis < dim.getValue(); axis++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(axis);
+
+      for (hier::BoxList::Iterator b(boxes); b; b++) {
+
+         hier::Box fine_box(b());
+         TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, fine_box);
+
+         for (int i = 0; i < dim.getValue(); i++) {
+            if (i != axis) {
+               fine_box.upper(i) -= 1;
+            }
+         }
+
+         const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+         const hier::Index ifirstc = coarse_box.lower();
+         const hier::Index ilastc = coarse_box.upper();
+         const hier::Index ifirstf = fine_box.lower();
+         const hier::Index ilastf = fine_box.upper();
+
+         for (int d = 0; d < fdata->getDepth(); d++) {
+            if (dim == tbox::Dimension(1)) {
+               F77_FUNC(conrefedgeflot1d, CONREFEDGEFLOT1D) (
+                  ifirstc(0), ilastc(0),
+                  ifirstf(0), ilastf(0),
+                  cilo(0), cihi(0),
+                  filo(0), fihi(0),
+                  &ratio[0],
+                  cdata->getPointer(0, d),
+                  fdata->getPointer(0, d));
+            } else if (dim == tbox::Dimension(2)) {
+               if (axis == 0) {
+                  F77_FUNC(conrefedgeflot2d0, CONREFEDGEFLOT2D0) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               } else if (axis == 1) {
+                  F77_FUNC(conrefedgeflot2d1, CONREFEDGEFLOT2D1) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d));
+               }
+            } else if (dim == tbox::Dimension(3)) {
+               if (axis == 0) {
+                  F77_FUNC(conrefedgeflot3d0, CONREFEDGEFLOT3D0) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               } else if (axis == 1) {
+                  F77_FUNC(conrefedgeflot3d1, CONREFEDGEFLOT3D1) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d));
+               } else if (axis == 2) {
+                  F77_FUNC(conrefedgeflot3d2, CONREFEDGEFLOT3D2) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(2, d),
+                     fdata->getPointer(2, d));
+               }
+            } else {
+               TBOX_ERROR(
+                  "EdgeFloatConstantRefine::refine dimension > 3 not supported"
+                  << std::endl);
+            }
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeFloatConstantRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeFloatConstantRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for edge-centered float data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeFloatConstantRefine
+#define included_pdat_EdgeFloatConstantRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class EdgeFloatConstantRefine implements constant
+ * interpolation for edge-centered float patch data defined over a
+ * mesh.  It is derived from the xfer::RefineOperator base class.
+ * The numerical operations for interpolation use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is edge-centered float, and the string is "CONSTANT_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class EdgeFloatConstantRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit EdgeFloatConstantRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~EdgeFloatConstantRefine();
+
+   /**
+    * Return true if the variable and name string match edge-centered
+    * float constant interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name string identifier of this refinement operation.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of edge-centered float constant interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the constant interpolation operator is the vector
+    * of zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the edge-centered float constant
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the boxes contained in fine_overlap.
+    * It is assumed that the coarse patch contains sufficient data for the
+    * stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeFloatLinearTimeInterpolateOp.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeFloatLinearTimeInterpolateOp.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,265 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for edge-centered float patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeFloatLinearTimeInterpolateOp_C
+#define included_pdat_EdgeFloatLinearTimeInterpolateOp_C
+
+#include "SAMRAI/pdat/EdgeFloatLinearTimeInterpolateOp.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/pdat/EdgeVariable.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in lintimint1d.f:
+void F77_FUNC(lintimeintedgefloat1d, LINTIMEINTEDGEFLOAT1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+// in lintimint2d.f:
+void F77_FUNC(lintimeintedgefloat2d0, LINTIMEINTEDGEFLOAT2D0) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+void F77_FUNC(lintimeintedgefloat2d1, LINTIMEINTEDGEFLOAT2D1) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+// in lintimint3d.f:
+void F77_FUNC(lintimeintedgefloat3d0, LINTIMEINTEDGEFLOAT3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+void F77_FUNC(lintimeintedgefloat3d1, LINTIMEINTEDGEFLOAT3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+void F77_FUNC(lintimeintedgefloat3d2, LINTIMEINTEDGEFLOAT3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+EdgeFloatLinearTimeInterpolateOp::EdgeFloatLinearTimeInterpolateOp():
+   xfer::TimeInterpolateOperator()
+{
+}
+
+EdgeFloatLinearTimeInterpolateOp::~EdgeFloatLinearTimeInterpolateOp()
+{
+}
+
+bool EdgeFloatLinearTimeInterpolateOp::findTimeInterpolateOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   const tbox::Pointer<EdgeVariable<float> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == "STD_LINEAR_TIME_INTERPOLATE")) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+void EdgeFloatLinearTimeInterpolateOp::timeInterpolate(
+   hier::PatchData& dst_data,
+   const hier::Box& where,
+   const hier::PatchData& src_data_old,
+   const hier::PatchData& src_data_new) const
+{
+   const tbox::Dimension& dim(where.getDim());
+
+   const EdgeData<float>* old_dat =
+      dynamic_cast<const EdgeData<float> *>(&src_data_old);
+   const EdgeData<float>* new_dat =
+      dynamic_cast<const EdgeData<float> *>(&src_data_new);
+   EdgeData<float>* dst_dat =
+      dynamic_cast<EdgeData<float> *>(&dst_data);
+
+   TBOX_ASSERT(old_dat != NULL);
+   TBOX_ASSERT(new_dat != NULL);
+   TBOX_ASSERT(dst_dat != NULL);
+   TBOX_ASSERT(where * old_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * new_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * dst_dat->getGhostBox() == where);
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst_data, where, src_data_old, src_data_new);
+
+   const hier::Index old_ilo = old_dat->getGhostBox().lower();
+   const hier::Index old_ihi = old_dat->getGhostBox().upper();
+   const hier::Index new_ilo = new_dat->getGhostBox().lower();
+   const hier::Index new_ihi = new_dat->getGhostBox().upper();
+
+   const hier::Index dst_ilo = dst_dat->getGhostBox().lower();
+   const hier::Index dst_ihi = dst_dat->getGhostBox().upper();
+
+   const hier::Index ifirst = where.lower();
+   const hier::Index ilast = where.upper();
+
+   const double old_time = old_dat->getTime();
+   const double new_time = new_dat->getTime();
+   const double dst_time = dst_dat->getTime();
+
+   TBOX_ASSERT((old_time < dst_time ||
+                tbox::MathUtilities<double>::equalEps(old_time, dst_time)) &&
+      (dst_time < new_time ||
+       tbox::MathUtilities<double>::equalEps(dst_time, new_time)));
+
+   double tfrac = dst_time - old_time;
+   double denom = new_time - old_time;
+   if (denom > tbox::MathUtilities<double>::getMin()) {
+      tfrac /= denom;
+   } else {
+      tfrac = 0.0;
+   }
+
+   for (int d = 0; d < dst_dat->getDepth(); d++) {
+      if (dim == tbox::Dimension(1)) {
+         F77_FUNC(lintimeintedgefloat1d, LINTIMEINTEDGEFLOAT1D) (ifirst(0),
+            ilast(0),
+            old_ilo(0), old_ihi(0),
+            new_ilo(0), new_ihi(0),
+            dst_ilo(0), dst_ihi(0),
+            tfrac,
+            old_dat->getPointer(0, d),
+            new_dat->getPointer(0, d),
+            dst_dat->getPointer(0, d));
+      } else if (dim == tbox::Dimension(2)) {
+         F77_FUNC(lintimeintedgefloat2d0, LINTIMEINTEDGEFLOAT2D0) (ifirst(0),
+            ifirst(1), ilast(0), ilast(1),
+            old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+            new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+            dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+            tfrac,
+            old_dat->getPointer(0, d),
+            new_dat->getPointer(0, d),
+            dst_dat->getPointer(0, d));
+         F77_FUNC(lintimeintedgefloat2d1, LINTIMEINTEDGEFLOAT2D1) (ifirst(0),
+            ifirst(1), ilast(0), ilast(1),
+            old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+            new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+            dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+            tfrac,
+            old_dat->getPointer(1, d),
+            new_dat->getPointer(1, d),
+            dst_dat->getPointer(1, d));
+      } else if (dim == tbox::Dimension(3)) {
+         F77_FUNC(lintimeintedgefloat3d0, LINTIMEINTEDGEFLOAT3D0) (ifirst(0),
+            ifirst(1), ifirst(2),
+            ilast(0), ilast(1), ilast(2),
+            old_ilo(0), old_ilo(1), old_ilo(2),
+            old_ihi(0), old_ihi(1), old_ihi(2),
+            new_ilo(0), new_ilo(1), new_ilo(2),
+            new_ihi(0), new_ihi(1), new_ihi(2),
+            dst_ilo(0), dst_ilo(1), dst_ilo(2),
+            dst_ihi(0), dst_ihi(1), dst_ihi(2),
+            tfrac,
+            old_dat->getPointer(0, d),
+            new_dat->getPointer(0, d),
+            dst_dat->getPointer(0, d));
+         F77_FUNC(lintimeintedgefloat3d1, LINTIMEINTEDGEFLOAT3D1) (ifirst(0),
+            ifirst(1), ifirst(2),
+            ilast(0), ilast(1), ilast(2),
+            old_ilo(0), old_ilo(1), old_ilo(2),
+            old_ihi(0), old_ihi(1), old_ihi(2),
+            new_ilo(0), new_ilo(1), new_ilo(2),
+            new_ihi(0), new_ihi(1), new_ihi(2),
+            dst_ilo(0), dst_ilo(1), dst_ilo(2),
+            dst_ihi(0), dst_ihi(1), dst_ihi(2),
+            tfrac,
+            old_dat->getPointer(1, d),
+            new_dat->getPointer(1, d),
+            dst_dat->getPointer(1, d));
+         F77_FUNC(lintimeintedgefloat3d2, LINTIMEINTEDGEFLOAT3D2) (ifirst(0),
+            ifirst(1), ifirst(2),
+            ilast(0), ilast(1), ilast(2),
+            old_ilo(0), old_ilo(1), old_ilo(2),
+            old_ihi(0), old_ihi(1), old_ihi(2),
+            new_ilo(0), new_ilo(1), new_ilo(2),
+            new_ihi(0), new_ihi(1), new_ihi(2),
+            dst_ilo(0), dst_ilo(1), dst_ilo(2),
+            dst_ihi(0), dst_ihi(1), dst_ihi(2),
+            tfrac,
+            old_dat->getPointer(2, d),
+            new_dat->getPointer(2, d),
+            dst_dat->getPointer(2, d));
+      } else {
+         TBOX_ERROR(
+            "EdgeFloatLinearTimeInterpolateOp dim::TimeInterpolate dim > 3 not supported"
+            << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeFloatLinearTimeInterpolateOp.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeFloatLinearTimeInterpolateOp.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for edge-centered float patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeFloatLinearTimeInterpolateOp
+#define included_pdat_EdgeFloatLinearTimeInterpolateOp
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class EdgeFloatLinearTimeInterpolateOp implements standard
+ * linear time interpolation for edge-centered float patch data.
+ * It is derived from the xfer::TimeInterpolateOperator base class.
+ * The interpolation uses FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is a edge-centered float, and the string is
+ * "STD_LINEAR_TIME_INTERPOLATE".
+ *
+ * @see xfer::TimeInterpolateOperator
+ */
+
+class EdgeFloatLinearTimeInterpolateOp:
+   public xfer::TimeInterpolateOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   EdgeFloatLinearTimeInterpolateOp();
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~EdgeFloatLinearTimeInterpolateOp();
+
+   /**
+    * Return true if the variable and name string match the standard
+    * edge-centered float interpolation; otherwise, return false.
+    */
+   bool
+   findTimeInterpolateOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Perform linear time interpolation between two edge-centered float
+    * patch data sources and place result in the destination patch data.
+    * Time interpolation is performed on the intersection of the destination
+    * patch data and the input box.  The time to which data is interpolated
+    * is provided by the destination data.
+    */
+   void
+   timeInterpolate(
+      hier::PatchData& dst_data,
+      const hier::Box& where,
+      const hier::PatchData& src_data_old,
+      const hier::PatchData& src_data_new) const;
+
+private:
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeGeometry.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeGeometry.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,236 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeGeometry_C
+#define included_pdat_EdgeGeometry_C
+
+#include "SAMRAI/pdat/EdgeGeometry.h"
+#include "SAMRAI/pdat/EdgeOverlap.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/EdgeGeometry.I"
+#endif
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * Create a edge geometry object given the box and ghost cell width.	*
+ *									*
+ *************************************************************************
+ */
+
+EdgeGeometry::EdgeGeometry(
+   const hier::Box& box,
+   const hier::IntVector& ghosts):
+   d_box(box),
+   d_ghosts(ghosts)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(box, ghosts);
+   TBOX_ASSERT(ghosts.min() >= 0);
+}
+
+EdgeGeometry::~EdgeGeometry()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Attempt to calculate the intersection between two edge centered box	*
+ * geometries.  The calculateOverlap() checks whether both arguments are	*
+ * edge geometries; if so, it compuates the intersection.  If not, then	*
+ * it calls calculateOverlap() on the source object (if retry is true)	*
+ * to allow the source a chance to calculate the intersection.  See the	*
+ * hier::BoxGeometry base class for more information about the protocol.	*
+ * A pointer to null is returned if the intersection cannot be computed.	*
+ *                                                                      *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap> EdgeGeometry::calculateOverlap(
+   const hier::BoxGeometry& dst_geometry,
+   const hier::BoxGeometry& src_geometry,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset,
+   const bool retry,
+   const hier::BoxList& dst_restrict_boxes) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(d_box, src_mask, src_offset);
+
+   const EdgeGeometry* t_dst =
+      dynamic_cast<const EdgeGeometry *>(&dst_geometry);
+   const EdgeGeometry* t_src =
+      dynamic_cast<const EdgeGeometry *>(&src_geometry);
+
+   tbox::Pointer<hier::BoxOverlap> over(NULL);
+
+   if ((t_src != NULL) && (t_dst != NULL)) {
+      over = doOverlap(*t_dst, *t_src, src_mask, overwrite_interior,
+            src_offset, dst_restrict_boxes);
+   } else if (retry) {
+      over = src_geometry.calculateOverlap(dst_geometry, src_geometry,
+            src_mask, overwrite_interior,
+            src_offset, false,
+            dst_restrict_boxes);
+   }
+   return over;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Convert an AMR-index space hier::Box into a edge-index space box by a	*
+ * cyclic shift of indices.						*
+ *									*
+ *************************************************************************
+ */
+
+hier::Box EdgeGeometry::toEdgeBox(
+   const hier::Box& box,
+   int axis)
+{
+   const tbox::Dimension& dim(box.getDim());
+
+   TBOX_ASSERT(0 <= axis && axis < dim.getValue());
+
+   hier::Box edge_box(dim);
+
+   if (!box.empty()) {
+      edge_box = box;
+      for (int i = 0; i < dim.getValue(); i++) {
+         if (axis != i) {
+            edge_box.upper(i) += 1;
+         }
+      }
+   }
+
+   return edge_box;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Compute the overlap between two edge centered boxes.  The algorithm	*
+ * is fairly straight-forward.  First, we perform a quick-and-dirty	*
+ * intersection to see if the boxes might overlap.  If that intersection	*
+ * is not empty, then we need to do a better job calculating the overlap	*
+ * for each dimension.  Note that the AMR index space boxes must be	*
+ * shifted into the edge centered space before we calculate the proper	*
+ * intersections.							*
+ *									*
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap> EdgeGeometry::doOverlap(
+   const EdgeGeometry& dst_geometry,
+   const EdgeGeometry& src_geometry,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset,
+   const hier::BoxList& dst_restrict_boxes)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(src_mask, src_offset);
+
+   const tbox::Dimension& dim(src_mask.getDim());
+
+   tbox::Array<hier::BoxList> dst_boxes(dim.getValue());
+
+   // Perform a quick-and-dirty intersection to see if the boxes might overlap
+
+   const hier::Box src_box =
+      hier::Box::grow(src_geometry.d_box, src_geometry.d_ghosts) * src_mask;
+   const hier::Box src_shift =
+      hier::Box::shift(src_box, src_offset);
+   const hier::Box dst_ghost =
+      hier::Box::grow(dst_geometry.d_box, dst_geometry.d_ghosts);
+
+   // Compute the intersection (if any) for each of the edge directions
+
+   const hier::IntVector one_vector(dim, 1);
+
+   const hier::Box quick_check =
+      hier::Box::grow(src_shift, one_vector) * hier::Box::grow(dst_ghost,
+         one_vector);
+
+   if (!quick_check.empty()) {
+
+      for (int d = 0; d < dim.getValue(); d++) {
+
+         const hier::Box dst_edge = toEdgeBox(dst_ghost, d);
+         const hier::Box src_edge = toEdgeBox(src_shift, d);
+         const hier::Box together = dst_edge * src_edge;
+
+         if (!together.empty()) {
+
+            dst_boxes[d].unionBoxes(together);
+            if (!overwrite_interior) {
+               const hier::Box int_edge = toEdgeBox(dst_geometry.d_box, d);
+               dst_boxes[d].removeIntersections(together, int_edge);
+            } else {
+               dst_boxes[d].appendItem(together);
+            }
+
+         }  // if (!together.empty())
+
+         if (dst_restrict_boxes.size() && dst_boxes[d].size()) {
+            hier::BoxList edge_restrict_boxes;
+            for (hier::BoxList::Iterator b(dst_restrict_boxes); b; b++) {
+               edge_restrict_boxes.appendItem(toEdgeBox(b(), d));
+            }
+            dst_boxes[d].intersectBoxes(edge_restrict_boxes);
+         }
+      }  // loop over dim
+
+   }  // if (!quick_check.empty())
+
+   // Create the edge overlap data object using the boxes and source shift
+
+   hier::BoxOverlap* overlap = new EdgeOverlap(dst_boxes, src_offset);
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set up a EdgeOverlap oject using the given boxes and offset           *
+ *                                                                       *
+ *************************************************************************
+ */
+tbox::Pointer<hier::BoxOverlap>
+EdgeGeometry::setUpOverlap(
+   const hier::BoxList& boxes,
+   const hier::IntVector& src_offset) const
+{
+   const tbox::Dimension& dim(src_offset.getDim());
+   tbox::Array<hier::BoxList> dst_boxes(dim.getValue());
+
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         hier::Box edge_box(EdgeGeometry::toEdgeBox(b(), d));
+         dst_boxes[d].appendItem(edge_box);
+      }
+   }
+
+   // Create the edge overlap data object using the boxes and source shift
+
+   hier::BoxOverlap* overlap = new EdgeOverlap(dst_boxes, src_offset);
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeGeometry.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeGeometry.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,27 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+SAMRAI_INLINE_KEYWORD
+const hier::Box& EdgeGeometry::getBox() const
+{
+   return d_box;
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::IntVector& EdgeGeometry::getGhosts() const
+{
+   return d_ghosts;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeGeometry.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeGeometry.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,139 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeGeometry
+#define included_pdat_EdgeGeometry
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/EdgeOverlap.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * Class EdgeGeometry manages the mapping between the AMR index space
+ * and the edge-centered geometry index space.  It is a subclass of
+ * hier::BoxGeometry and it computes intersections between edge-
+ * centered box geometries for communication operations.
+ *
+ * See header file for EdgeData<DIM> class for a more detailed
+ * description of the data layout.
+ *
+ * @see hier::BoxGeometry
+ * @see pdat::EdgeOverlap
+ */
+
+class EdgeGeometry:public hier::BoxGeometry
+{
+public:
+   /*!
+    * The BoxOverlap implemenation for this geometry.
+    */
+   typedef EdgeOverlap Overlap;
+
+   /*!
+    * @brief Convert an AMR index box space box into an edge geometry box.
+    * An edge geometry box extends the given AMR index box space box
+    * by one in upper dimension for each coordinate direction not equal
+    * to the axis direction.
+    */
+   static hier::Box
+   toEdgeBox(
+      const hier::Box& box,
+      int axis);
+
+   /*!
+    * @brief Construct the edge geometry object given an AMR index
+    * space box and ghost cell width.
+    */
+   explicit EdgeGeometry(
+      const hier::Box& box,
+      const hier::IntVector& ghosts);
+
+   /*!
+    * @brief The virtual destructor does nothing interesting.
+    */
+   virtual ~EdgeGeometry();
+
+   /*!
+    * @brief Compute the overlap in edge-centered index space between
+    * the source box geometry and the destination box geometry.
+    */
+   virtual tbox::Pointer<hier::BoxOverlap>
+   calculateOverlap(
+      const hier::BoxGeometry& dst_geometry,
+      const hier::BoxGeometry& src_geometry,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset,
+      const bool retry,
+      const hier::BoxList& dst_restrict_boxes = hier::BoxList()) const;
+
+   /*!
+    * @brief Set up a EdgeOverlap object based on the given boxes and the
+    * offset.
+    */
+   virtual tbox::Pointer<hier::BoxOverlap>
+   setUpOverlap(
+      const hier::BoxList& boxes,
+      const hier::IntVector& src_offset) const;
+
+   /*!
+    * @brief Return the box for this edge centered box geometry
+    * object.
+    */
+   const hier::Box&
+   getBox() const;
+
+   /*!
+    * @brief Return the ghost cell width for this edge centered box
+    * geometry object.
+    */
+   const hier::IntVector&
+   getGhosts() const;
+
+private:
+   /**
+    * Function doOverlap() is the function that computes the overlap
+    * between the source and destination objects, where both box geometry
+    * objects are guaranteed to have edge centered geometry.
+    */
+   static tbox::Pointer<hier::BoxOverlap>
+   doOverlap(
+      const EdgeGeometry& dst_geometry,
+      const EdgeGeometry& src_geometry,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset,
+      const hier::BoxList& dst_restrict_boxes);
+
+   EdgeGeometry(
+      const EdgeGeometry&);             // not implemented
+   void
+   operator = (
+      const EdgeGeometry&);                     // not implemented
+
+   hier::Box d_box;
+   hier::IntVector d_ghosts;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/EdgeGeometry.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeIndex.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeIndex.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,19 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeIndex_C
+#define included_pdat_EdgeIndex_C
+
+#include "SAMRAI/pdat/EdgeIndex.h"
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/EdgeIndex.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeIndex.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeIndex.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,227 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+SAMRAI_INLINE_KEYWORD
+EdgeIndex::EdgeIndex(
+   const tbox::Dimension& dim):
+   hier::Index(dim)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+EdgeIndex::EdgeIndex(
+   const hier::Index& rhs,
+   const int axis,
+   const int edge):
+   hier::Index(rhs),
+   d_axis(axis)
+{
+   if (getDim() > tbox::Dimension(1)) {
+      (*this)((d_axis + 1) % getDim().getValue()) += edge % 2;
+   }
+   for (int j = 2; j < getDim().getValue(); j++) {
+      (*this)((d_axis + j) % getDim().getValue()) += (edge / (1 << (j - 1))) % 2;
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+EdgeIndex::EdgeIndex(
+   const EdgeIndex& rhs):
+   hier::Index(rhs),
+   d_axis(rhs.d_axis)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+EdgeIndex& EdgeIndex::operator = (
+   const EdgeIndex& rhs)
+{
+   hier::Index::operator = (rhs);
+   d_axis = rhs.d_axis;
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+EdgeIndex::~EdgeIndex()
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+int EdgeIndex::getAxis() const
+{
+   return d_axis;
+}
+
+SAMRAI_INLINE_KEYWORD
+void EdgeIndex::setAxis(
+   const int axis)
+{
+   d_axis = axis;
+}
+
+SAMRAI_INLINE_KEYWORD
+hier::Index EdgeIndex::toCell(
+   const int edge) const
+{
+   const tbox::Dimension& dim(getDim());
+   hier::Index index(dim);
+
+   for (int i = 0; i < dim.getValue(); i++) {
+      index(i) = (*this)(i);
+   }
+
+   if (dim > tbox::Dimension(1)) {
+      index((d_axis + 1) % dim.getValue()) += ((edge % 2) - 1);
+   }
+   for (int j = 2; j < dim.getValue(); j++) {
+      index((d_axis + j) % dim.getValue()) += (((edge / (2 << (j - 1))) % 2) - 1);
+   }
+   return index;
+}
+
+SAMRAI_INLINE_KEYWORD
+EdgeIndex& EdgeIndex::operator += (
+   const hier::IntVector& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   hier::Index::operator += (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+EdgeIndex EdgeIndex::operator + (
+   const hier::IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   EdgeIndex tmp = *this;
+   tmp += rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+EdgeIndex& EdgeIndex::operator += (
+   const int rhs)
+{
+   hier::Index::operator += (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+EdgeIndex EdgeIndex::operator + (
+   const int rhs) const
+{
+   EdgeIndex tmp = *this;
+   tmp += rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+EdgeIndex& EdgeIndex::operator -= (
+   const hier::IntVector& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   hier::Index::operator -= (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+EdgeIndex EdgeIndex::operator - (
+   const hier::IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   EdgeIndex tmp = *this;
+   tmp -= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+EdgeIndex& EdgeIndex::operator -= (
+   const int rhs)
+{
+   hier::Index::operator -= (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+EdgeIndex EdgeIndex::operator - (
+   const int rhs) const
+{
+   EdgeIndex tmp = *this;
+   tmp -= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+EdgeIndex& EdgeIndex::operator *= (
+   const hier::IntVector& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   hier::Index::operator *= (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+EdgeIndex EdgeIndex::operator * (
+   const hier::IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   EdgeIndex tmp = *this;
+   tmp *= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+EdgeIndex& EdgeIndex::operator *= (
+   const int rhs)
+{
+   hier::Index::operator *= (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+EdgeIndex EdgeIndex::operator * (
+   const int rhs) const
+{
+   EdgeIndex tmp = *this;
+   tmp *= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool EdgeIndex::operator == (
+   const EdgeIndex& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   return ((hier::Index *)this)->operator == (rhs) && (d_axis == rhs.d_axis);
+}
+
+SAMRAI_INLINE_KEYWORD
+bool EdgeIndex::operator != (
+   const EdgeIndex& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   return ((hier::Index *)this)->operator != (rhs) || (d_axis != rhs.d_axis);
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeIndex.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeIndex.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,223 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeIndex
+#define included_pdat_EdgeIndex
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Index.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class EdgeIndex implements a simple n-dimensional integer
+ * vector for edge centered variables.  Edge indices contain an integer
+ * index location in AMR index space along with the designated edge axis
+ * (X=0, Y=1, or Z=2).  See the edge box geometry class for more information
+ * about the mapping between the AMR index space and the edge indices.
+ *
+ * @see hier::Index
+ * @see pdat::EdgeData
+ * @see pdat::EdgeGeometry
+ * @see pdat::EdgeIterator
+ */
+
+class EdgeIndex:public hier::Index
+{
+public:
+   /**
+    * The default constructor for a edge index creates an uninitialized index.
+    */
+   explicit EdgeIndex(
+      const tbox::Dimension& dim);
+
+   /**
+    * Construct a edge index from a regular index, axis, and edge.  The axis
+    * can be one of EdgeIndex::X (0), EdgeIndex::Y (1), or
+    * EdgeIndex::Z (2). The edge argument can be one of the constants
+    * EdgeIndex::LowerLeft (0), EdgeIndex::LowerRight(1),
+    * EdgeIndex::UpperLeft (2) or EdgeIndex::UpperRight(3).
+    */
+   explicit EdgeIndex(
+      const hier::Index& rhs,
+      const int axis,
+      const int edge);
+
+   /**
+    * The copy constructor creates a edge index equal to the argument.
+    */
+   EdgeIndex(
+      const EdgeIndex& rhs);
+
+   /**
+    * The assignment operator sets the edge index equal to the argument.
+    */
+   EdgeIndex&
+   operator = (
+      const EdgeIndex& rhs);
+
+   /**
+    * The edge index destructor does nothing interesting.
+    */
+   ~EdgeIndex();
+
+   /**
+    * Get the axis for which this edge index is defined (X=0, Y=1, Z=2).
+    */
+   int
+   getAxis() const;
+
+   /**
+    * Set the edge axis (X=0, Y=1, Z=2).
+    */
+   void
+   setAxis(
+      const int axis);
+
+   /**
+    * For dimension 2, converts the edge index into the index on the
+    * lower side (argument edge = 0) or the upper side (argument
+    * edge = 1) of the edge.
+    * For dimension 3, converts the edge index into the index on the lower
+    * left (argument edge == 0), the lower right (argument edge == 1),
+    * the upper left (argument edge == 2), or the upper right
+    * (argument edge == 3) of thw edge.
+    */
+   hier::Index
+   toCell(
+      const int edge) const;
+
+   /**
+    * Plus-equals operator for a edge index and an integer vector.
+    */
+   EdgeIndex&
+   operator += (
+      const hier::IntVector& rhs);
+
+   /**
+    * Plus operator for a edge index and an integer vector.
+    */
+   EdgeIndex
+   operator + (
+      const hier::IntVector& rhs) const;
+
+   /**
+    * Plus-equals operator for a edge index and an integer.
+    */
+   EdgeIndex&
+   operator += (
+      const int rhs);
+
+   /**
+    * Plus operator for a edge index and an integer.
+    */
+   EdgeIndex
+   operator + (
+      const int rhs) const;
+
+   /**
+    * Minus-equals operator for a edge index and an integer vector.
+    */
+   EdgeIndex&
+   operator -= (
+      const hier::IntVector& rhs);
+
+   /**
+    * Minus operator for a edge index and an integer vector.
+    */
+   EdgeIndex
+   operator - (
+      const hier::IntVector& rhs) const;
+
+   /**
+    * Minus-equals operator for a edge index and an integer.
+    */
+   EdgeIndex&
+   operator -= (
+      const int rhs);
+
+   /**
+    * Minus operator for a edge index and an integer.
+    */
+   EdgeIndex
+   operator - (
+      const int rhs) const;
+
+   /**
+    * Times-equals operator for a edge index and an integer vector.
+    */
+   EdgeIndex&
+   operator *= (
+      const hier::IntVector& rhs);
+
+   /**
+    * Times operator for a edge index and an integer vector.
+    */
+   EdgeIndex
+   operator * (
+      const hier::IntVector& rhs) const;
+
+   /**
+    * Times-equals operator for a edge index and an integer.
+    */
+   EdgeIndex&
+   operator *= (
+      const int rhs);
+
+   /**
+    * Times operator for a edge index and an integer.
+    */
+   EdgeIndex
+   operator * (
+      const int rhs) const;
+
+   /**
+    * Returns true if two edge index objects are equal.  All components
+    * and the corresponding edge axes must be the same for equality.
+    */
+   bool
+   operator == (
+      const EdgeIndex& rhs) const;
+
+   /**
+    * Returns true if two edge index objects are not equal.  Any of
+    * the components or axes may be different for inequality.
+    */
+   bool
+   operator != (
+      const EdgeIndex& rhs) const;
+
+   enum {
+
+      X = 0,
+      Y = 1,
+      Z = 2,
+      Lower = 0,
+      Upper = 1,
+      LowerLeft = 0,
+      LowerRight = 1,
+      UpperLeft = 2,
+      UpperRight = 3
+
+   };
+
+private:
+   int d_axis;
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/EdgeIndex.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeIntegerConstantRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeIntegerConstantRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,272 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for edge-centered int data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeIntegerConstantRefine_C
+#define included_pdat_EdgeIntegerConstantRefine_C
+
+#include "SAMRAI/pdat/EdgeIntegerConstantRefine.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/pdat/EdgeVariable.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in conrefine1d.f:
+void F77_FUNC(conrefedgeintg1d, CONREFEDGEINTG1D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const int *, int *);
+// in conrefine2d.f:
+void F77_FUNC(conrefedgeintg2d0, CONREFEDGEINTG2D0) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const int *, int *);
+void F77_FUNC(conrefedgeintg2d1, CONREFEDGEINTG2D1) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const int *, int *);
+// in conrefine3d.f:
+void F77_FUNC(conrefedgeintg3d0, CONREFEDGEINTG3D0) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const int *, int *);
+void F77_FUNC(conrefedgeintg3d1, CONREFEDGEINTG3D1) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const int *, int *);
+void F77_FUNC(conrefedgeintg3d2, CONREFEDGEINTG3D2) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const int *, int *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+EdgeIntegerConstantRefine::EdgeIntegerConstantRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSTANT_REFINE")
+{
+   d_name_id = "CONSTANT_REFINE";
+}
+
+EdgeIntegerConstantRefine::~EdgeIntegerConstantRefine()
+{
+}
+
+bool EdgeIntegerConstantRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<EdgeVariable<int> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+EdgeIntegerConstantRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int EdgeIntegerConstantRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+EdgeIntegerConstantRefine::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void EdgeIntegerConstantRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   tbox::Pointer<EdgeData<int> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<EdgeData<int> >
+   fdata = fine.getPatchData(dst_component);
+
+   const pdat::EdgeOverlap* t_overlap =
+      dynamic_cast<const pdat::EdgeOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*this, fine, coarse, ratio);
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   for (int axis = 0; axis < dim.getValue(); axis++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(axis);
+
+      for (hier::BoxList::Iterator b(boxes); b; b++) {
+
+         hier::Box fine_box(b());
+         TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, fine_box);
+
+         for (int i = 0; i < dim.getValue(); i++) {
+            if (i != axis) {
+               fine_box.upper(i) -= 1;
+            }
+         }
+
+         const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+         const hier::Index ifirstc = coarse_box.lower();
+         const hier::Index ilastc = coarse_box.upper();
+         const hier::Index ifirstf = fine_box.lower();
+         const hier::Index ilastf = fine_box.upper();
+
+         for (int d = 0; d < fdata->getDepth(); d++) {
+            if (dim == tbox::Dimension(1)) {
+               F77_FUNC(conrefedgeintg1d, CONREFEDGEINTG1D) (
+                  ifirstc(0), ilastc(0),
+                  ifirstf(0), ilastf(0),
+                  cilo(0), cihi(0),
+                  filo(0), fihi(0),
+                  &ratio[0],
+                  cdata->getPointer(0, d),
+                  fdata->getPointer(0, d));
+            } else if (dim == tbox::Dimension(2)) {
+               if (axis == 0) {
+                  F77_FUNC(conrefedgeintg2d0, CONREFEDGEINTG2D0) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               } else if (axis == 1) {
+                  F77_FUNC(conrefedgeintg2d1, CONREFEDGEINTG2D1) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d));
+               }
+            } else if (dim == tbox::Dimension(3)) {
+               if (axis == 0) {
+                  F77_FUNC(conrefedgeintg3d0, CONREFEDGEINTG3D0) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               } else if (axis == 1) {
+                  F77_FUNC(conrefedgeintg3d1, CONREFEDGEINTG3D1) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d));
+               } else if (axis == 2) {
+                  F77_FUNC(conrefedgeintg3d2, CONREFEDGEINTG3D2) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(2, d),
+                     fdata->getPointer(2, d));
+               }
+            } else {
+               TBOX_ERROR(
+                  "EdgeIntegerConstantRefine::refine dimension > 3 not supported"
+                  << std::endl);
+            }
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeIntegerConstantRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeIntegerConstantRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for edge-centered integer data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeIntegerConstantRefine
+#define included_pdat_EdgeIntegerConstantRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class EdgeIntegerConstantRefine implements constant
+ * interpolation for edge-centered integer patch data defined over a
+ * mesh.  It is derived from the xfer::RefineOperator base class.
+ * The numerical operations for interpolation use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is edge-centered integer, and the string is "CONSTANT_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class EdgeIntegerConstantRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit EdgeIntegerConstantRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~EdgeIntegerConstantRefine();
+
+   /**
+    * Return true if the variable and name string match edge-centered
+    * integer constant interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name string identifier of this refinement operation.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of edge-centered integer constant interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the constant interpolation operator is the vector
+    * of zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the edge-centered double constant
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the boxes contained in fine_overlap.
+    * It is assumed that the coarse patch contains sufficient data for the
+    * stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeIterator.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeIterator.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,19 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Iterator for edge centered patch data types 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeIterator_C
+#define included_pdat_EdgeIterator_C
+
+#include "SAMRAI/pdat/EdgeIterator.h"
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/EdgeIterator.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeIterator.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeIterator.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Iterator for edge centered patch data types 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+SAMRAI_INLINE_KEYWORD
+EdgeIterator::EdgeIterator(
+   const hier::Box& box,
+   const int axis):
+   d_index(box.lower(), axis, 0),
+   d_box(EdgeGeometry::toEdgeBox(box, axis))
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+EdgeIterator::EdgeIterator(
+   const EdgeIterator& iter):
+   d_index(iter.d_index),
+   d_box(iter.d_box)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+EdgeIterator&
+EdgeIterator::operator = (
+   const EdgeIterator& iter)
+{
+   d_index = iter.d_index;
+   d_box = iter.d_box;
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+EdgeIterator::~EdgeIterator()
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+const EdgeIndex& EdgeIterator::operator * () const
+{
+   return d_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+const EdgeIndex& EdgeIterator::operator () () const
+{
+   return d_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+EdgeIterator::operator bool () const
+{
+   bool retval = true;
+   for (int i = 0; i < d_box.getDim().getValue(); i++) {
+      if (d_index(i) > d_box.upper(i)) {
+         retval = false;
+         break;
+      }
+   }
+   return retval;
+}
+
+#ifndef LACKS_BOOL_VOID_RESOLUTION
+SAMRAI_INLINE_KEYWORD
+EdgeIterator::operator const void* () const
+{
+   return EdgeIterator::operator bool () ? this : NULL;
+}
+#endif
+
+SAMRAI_INLINE_KEYWORD
+bool EdgeIterator::operator ! () const
+{
+   return !EdgeIterator::operator bool ();
+}
+
+SAMRAI_INLINE_KEYWORD
+void EdgeIterator::operator ++ (
+   int)
+{
+   d_index(0)++;
+   for (int i = 0; i < d_box.getDim().getValue() - 1; i++) {
+      if (d_index(i) > d_box.upper(i)) {
+         d_index(i) = d_box.lower(i);
+         d_index(i + 1)++;
+      } else {
+         break;
+      }
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+bool EdgeIterator::operator == (
+   const EdgeIterator& iter) const
+{
+   return d_index == iter.d_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool EdgeIterator::operator != (
+   const EdgeIterator& iter) const
+{
+   return d_index != iter.d_index;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeIterator.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeIterator.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,136 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Iterator for edge centered patch data types 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeIterator
+#define included_pdat_EdgeIterator
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/EdgeGeometry.h"
+#include "SAMRAI/pdat/EdgeIndex.h"
+#include "SAMRAI/hier/Box.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class EdgeIterator is an iterator that provides methods for
+ * stepping through the index space associated with a edge centered box.
+ * The indices are enumerated in column-major (e.g., Fortran) order.
+ * The iterator should be used as follows:
+ * \verbatim
+ * hier::Box box;
+ * ...
+ * for (EdgeIterator c(box, axis); c; c++) {
+ *    // use index c of the box
+ * }
+ * \endverbatim
+ * Note that the edge iterator may not compile to efficient code, depending
+ * on your compiler.  Many compilers are not smart enough to optimize the
+ * looping constructs and indexing operations.
+ *
+ * @see pdat::EdgeData
+ * @see pdat::EdgeGeometry
+ * @see pdat::EdgeIndex
+ */
+
+class EdgeIterator
+{
+public:
+   /**
+    * Constructor for the edge iterator.  The iterator will enumerate
+    * the indices in the argument box.
+    */
+   explicit EdgeIterator(
+      const hier::Box& box,
+      const int axis);
+
+   /**
+    * Copy constructor for the edge iterator
+    */
+   EdgeIterator(
+      const EdgeIterator& iterator);
+
+   /**
+    * Assignment operator for the edge iterator.
+    */
+   EdgeIterator&
+   operator = (
+      const EdgeIterator& iterator);
+
+   /**
+    * Destructor for the edge iterator.
+    */
+   ~EdgeIterator();
+
+   /**
+    * Extract the edge index corresponding to the iterator position in the box.
+    */
+   const EdgeIndex&
+   operator * () const;
+
+   /**
+    * Extract the edge index corresponding to the iterator position in the box.
+    */
+   const EdgeIndex&
+   operator () () const;
+
+   /**
+    * Return true if the iterator points to a valid index within the box.
+    */
+   operator bool () const;
+
+#ifndef LACKS_BOOL_VOID_RESOLUTION
+   /**
+    * Return a non-NULL if the iterator points to a valid index within the box.
+    */
+   operator const void
+   * () const;
+#endif
+
+   /**
+    * Return whether the iterator points to a valid index within the box.
+    * This operator mimics the !p operation applied to a pointer p.
+    */
+   bool
+   operator ! () const;
+
+   /**
+    * Increment the iterator to point to the next index in the box.
+    */
+   void
+   operator ++ (
+      int);
+
+   /**
+    * Test two iterators for equality (same index value).
+    */
+   bool
+   operator == (
+      const EdgeIterator& iterator) const;
+
+   /**
+    * Test two iterators for inequality (different index values).
+    */
+   bool
+   operator != (
+      const EdgeIterator& iterator) const;
+
+private:
+   EdgeIndex d_index;
+   hier::Box d_box;
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/EdgeIterator.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeOverlap.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeOverlap.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,49 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeOverlap_C
+#define included_pdat_EdgeOverlap_C
+
+#include "SAMRAI/pdat/EdgeOverlap.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/EdgeOverlap.I"
+#endif
+
+namespace SAMRAI {
+namespace pdat {
+
+EdgeOverlap::EdgeOverlap(
+   const tbox::Array<hier::BoxList>& boxes,
+   const hier::IntVector& src_offset):
+   d_is_overlap_empty(true),
+   d_offset(src_offset)
+{
+
+   d_dst_boxes.resizeArray(boxes.getSize());
+
+   for (int d = 0; d < boxes.getSize(); d++) {
+      d_dst_boxes[d] = boxes[d];
+      if (!d_dst_boxes[d].isEmpty()) d_is_overlap_empty = false;
+   }
+}
+
+EdgeOverlap::~EdgeOverlap()
+{
+}
+
+bool EdgeOverlap::isOverlapEmpty() const
+{
+   return d_is_overlap_empty;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeOverlap.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeOverlap.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,33 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+SAMRAI_INLINE_KEYWORD
+const hier::BoxList&
+EdgeOverlap::getDestinationBoxList(
+   const int axis) const
+{
+   TBOX_ASSERT((axis >= 0) && (axis < d_dst_boxes.getSize()));
+
+   return d_dst_boxes[axis];
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::IntVector& EdgeOverlap::getSourceOffset() const
+{
+   return d_offset;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeOverlap.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeOverlap.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeOverlap
+#define included_pdat_EdgeOverlap
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class EdgeOverlap represents the intersection between two edge
+ * centered geometry boxes.  It is a subclass of hier::BoxOverlap and records
+ * the portions of index space that needs to be copied between two objects
+ * with edge centered geometry.
+ *
+ * @see hier::BoxOverlap
+ * @see pdat::EdgeOverlap
+ */
+
+class EdgeOverlap:public hier::BoxOverlap
+{
+public:
+   /**
+    * The constructor takes the list of boxes and the source offset between
+    * the source and destination index spaces.  This information is used later
+    * in the generation of communication schedules.
+    */
+   explicit EdgeOverlap(
+      const tbox::Array<hier::BoxList>& boxes,
+      const hier::IntVector& src_offset);
+
+   /**
+    * The virtual destructor does nothing interesting except deallocate
+    * box data.
+    */
+   virtual ~EdgeOverlap();
+
+   /**
+    * Return whether there is an empty intersection between the two
+    * edge centered boxes.  This method over-rides the virtual function
+    * in the hier::BoxOverlap base class.
+    */
+   virtual bool
+   isOverlapEmpty() const;
+
+   /**
+    * Return the list of boxes (in edge centered index space) that
+    * constitute the intersection.  The boxes are given in the
+    * destination coordinate space and must be shifted by
+    * -(getSourceOffset()) to lie in the source index space.  The axis
+    * argument represents which axis is desired: X=0, Y=1, and
+    * Z=2. This method over-rides the virtual function in the
+    * hier::BoxOverlap base class.
+    */
+   virtual const hier::BoxList&
+   getDestinationBoxList(
+      const int axis) const;
+
+   /**
+    * Return the offset between the destination and source index spaces.
+    * The destination index space is the source index space shifted
+    * by this amount.
+    */
+   virtual const hier::IntVector&
+   getSourceOffset() const;
+
+private:
+   bool d_is_overlap_empty;
+   hier::IntVector d_offset;
+   tbox::Array<hier::BoxList> d_dst_boxes;
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/EdgeOverlap.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeVariable.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeVariable.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,91 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeVariable_C
+#define included_pdat_EdgeVariable_C
+
+#include "SAMRAI/pdat/EdgeVariable.h"
+#include "SAMRAI/pdat/EdgeDataFactory.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * Constructor and destructor for edge variable objects			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+EdgeVariable<TYPE>::EdgeVariable(
+   const tbox::Dimension& dim,
+   const std::string& name,
+   int depth,
+   const bool fine_boundary_represents_var):
+   hier::Variable(name,
+                  tbox::Pointer<SAMRAI::hier::PatchDataFactory>(new
+                                                                EdgeDataFactory
+                                                                <TYPE>(depth,
+                                                                       // default zero ghost cells
+                                                                       hier
+                                                                       ::
+                                                                       IntVector
+                                                                       ::
+                                                                       getZero(
+                                                                          dim),
+                                                                       fine_boundary_represents_var))),
+   d_fine_boundary_represents_var(fine_boundary_represents_var)
+{
+}
+
+template<class TYPE>
+EdgeVariable<TYPE>::~EdgeVariable()
+{
+}
+
+template<class TYPE>
+int EdgeVariable<TYPE>::getDepth() const
+{
+   tbox::Pointer<EdgeDataFactory<TYPE> > factory = this->getPatchDataFactory();
+   TBOX_ASSERT(factory);
+   return factory->getDepth();
+}
+
+/*
+ *************************************************************************
+ *									*
+ * These are private and should not be used.  They are defined here	*
+ * because some template instantiation methods fail if some member	*
+ * functions are left undefined.						*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+EdgeVariable<TYPE>::EdgeVariable(
+   const EdgeVariable<TYPE>& foo):
+   hier::Variable(NULL, tbox::Pointer<SAMRAI::hier::PatchDataFactory>(NULL))
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void EdgeVariable<TYPE>::operator = (
+   const EdgeVariable<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/EdgeVariable.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/EdgeVariable.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,104 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeVariable
+#define included_pdat_EdgeVariable
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/tbox/Complex.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * Class EdgeVariable<DIM> is a templated variable class used to define
+ * edge-centered quantities on an AMR mesh.   It is a subclass of
+ * hier::Variable and is templated on the type of the underlying data
+ * (e.g., double, int, bool, etc.).
+ *
+ * See header file for EdgeData<DIM> class for a more detailed
+ * description of the data layout.
+ *
+ * @see pdat::EdgeData
+ * @see pdat::EdgeDataFactory
+ * @see hier::Variable
+ */
+
+template<class TYPE>
+class EdgeVariable:public hier::Variable
+{
+public:
+   /*!
+    * @brief Create an edge-centered variable object with the given name and
+    * depth (i.e., number of data values at each edge index location).
+    * A default depth of one is provided.   The fine boundary representation
+    * boolean argument indicates which values (either coarse or fine) take
+    * precedence at coarse-fine mesh boundaries during coarsen and refine
+    * operations.  The default is that fine data values take precedence
+    * on coarse-fine interfaces.
+    */
+   explicit EdgeVariable(
+      const tbox::Dimension& dim,
+      const std::string& name,
+      int depth = 1,
+      bool fine_boundary_represents_var = true);
+
+   /*!
+    * @brief Virtual destructor for edge variable objects.
+    */
+   virtual ~EdgeVariable<TYPE>();
+
+   /*!
+    * @brief Return boolean indicating which edge data values (coarse
+    * or fine) take precedence at coarse-fine mesh interfaces.  The
+    * value is set in the constructor.
+    */
+   bool fineBoundaryRepresentsVariable() const
+   {
+      return d_fine_boundary_represents_var;
+   }
+
+   /*!
+    * @brief Return true indicating that edge data on a patch interior
+    * exists on the patch boundary.
+    */
+   bool dataLivesOnPatchBorder() const {
+      return true;
+   }
+
+   /*!
+    * @brief Return the the depth (number of components).
+    */
+   int
+   getDepth() const;
+
+private:
+   bool d_fine_boundary_represents_var;
+
+   EdgeVariable(
+      const EdgeVariable<TYPE>&);          // not implemented
+   void
+   operator = (
+      const EdgeVariable<TYPE>&);               // not implemented
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/EdgeVariable.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceComplexConstantRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceComplexConstantRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,274 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for face-centered complex data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceComplexConstantRefine_C
+#define included_pdat_FaceComplexConstantRefine_C
+
+#include "SAMRAI/pdat/FaceComplexConstantRefine.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in refine1d.f:
+void F77_FUNC(conreffacecplx1d, CONREFFACECPLX1D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+// in refine2d.f:
+void F77_FUNC(conreffacecplx2d0, CONREFFACECPLX2D0) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+void F77_FUNC(conreffacecplx2d1, CONREFFACECPLX2D1) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+// in refine3d.f:
+void F77_FUNC(conreffacecplx3d0, CONREFFACECPLX3D0) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+void F77_FUNC(conreffacecplx3d1, CONREFFACECPLX3D1) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+void F77_FUNC(conreffacecplx3d2, CONREFFACECPLX3D2) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+FaceComplexConstantRefine::FaceComplexConstantRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSTANT_REFINE")
+{
+   d_name_id = "CONSTANT_REFINE";
+}
+
+FaceComplexConstantRefine::~FaceComplexConstantRefine()
+{
+}
+
+bool FaceComplexConstantRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<FaceVariable<dcomplex> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+FaceComplexConstantRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int FaceComplexConstantRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+FaceComplexConstantRefine::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void FaceComplexConstantRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   tbox::Pointer<FaceData<dcomplex> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<FaceData<dcomplex> >
+   fdata = fine.getPatchData(dst_component);
+
+   const pdat::FaceOverlap* t_overlap =
+      dynamic_cast<const pdat::FaceOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*this, fine, coarse, ratio);
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   for (int axis = 0; axis < dim.getValue(); axis++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(axis);
+
+      for (hier::BoxList::Iterator b(boxes); b; b++) {
+
+         const hier::Box& face_box = b();
+         TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, face_box);
+
+         hier::Box fine_box(dim);
+         for (int i = 0; i < dim.getValue(); i++) {
+            fine_box.lower((axis + i) % dim.getValue()) = face_box.lower(i);
+            fine_box.upper((axis + i) % dim.getValue()) = face_box.upper(i);
+         }
+
+         fine_box.upper(axis) -= 1;
+
+         const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+         const hier::Index ifirstc = coarse_box.lower();
+         const hier::Index ilastc = coarse_box.upper();
+         const hier::Index ifirstf = fine_box.lower();
+         const hier::Index ilastf = fine_box.upper();
+
+         for (int d = 0; d < fdata->getDepth(); d++) {
+            if (dim == tbox::Dimension(1)) {
+               F77_FUNC(conreffacecplx1d, CONREFFACECPLX1D) (
+                  ifirstc(0), ilastc(0),
+                  ifirstf(0), ilastf(0),
+                  cilo(0), cihi(0),
+                  filo(0), fihi(0),
+                  &ratio[0],
+                  cdata->getPointer(0, d),
+                  fdata->getPointer(0, d));
+            } else if (dim == tbox::Dimension(2)) {
+               if (axis == 0) {
+                  F77_FUNC(conreffacecplx2d0, CONREFFACECPLX2D0) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               } else if (axis == 1) {
+                  F77_FUNC(conreffacecplx2d1, CONREFFACECPLX2D1) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d));
+               }
+            } else if (dim == tbox::Dimension(3)) {
+               if (axis == 0) {
+                  F77_FUNC(conreffacecplx3d0, CONREFFACECPLX3D0) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               } else if (axis == 1) {
+                  F77_FUNC(conreffacecplx3d1, CONREFFACECPLX3D1) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d));
+               } else if (axis == 2) {
+                  F77_FUNC(conreffacecplx3d2, CONREFFACECPLX3D2) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(2, d),
+                     fdata->getPointer(2, d));
+               }
+            } else {
+               TBOX_ERROR(
+                  "FaceComplexConstantRefine::refine() dimension > 3 not supported"
+                  << std::endl);
+            }
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceComplexConstantRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceComplexConstantRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for face-centered complex data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceComplexConstantRefine
+#define included_pdat_FaceComplexConstantRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class FaceComplexConstantRefine implements constant
+ * interpolation for face-centered complex patch data defined over a
+ * mesh.  It is derived from the xfer::RefineOperator base class.
+ * The numerical operations for interpolation use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is face-centered complex, and the string is "CONSTANT_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class FaceComplexConstantRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit FaceComplexConstantRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~FaceComplexConstantRefine();
+
+   /**
+    * Return true if the variable and name string match face-centered
+    * complex constant interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of face-centered complex constant interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the constant interpolation operator is the vector
+    * of zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the face-centered complex constant
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the boxes contained in fine_overlap.
+    * It is assumed that the coarse patch contains sufficient data for the
+    * stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceComplexLinearTimeInterpolateOp.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceComplexLinearTimeInterpolateOp.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,265 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for face-centered complex data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceComplexLinearTimeInterpolateOp_C
+#define included_pdat_FaceComplexLinearTimeInterpolateOp_C
+
+#include "SAMRAI/pdat/FaceComplexLinearTimeInterpolateOp.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Complex.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in lintimint1d.f:
+void F77_FUNC(lintimeintfacecmplx1d, LINTIMEINTFACECMPLX1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+// in lintimint2d.f:
+void F77_FUNC(lintimeintfacecmplx2d0, LINTIMEINTFACECMPLX2D0) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+void F77_FUNC(lintimeintfacecmplx2d1, LINTIMEINTFACECMPLX2D1) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+// in lintimint3d.f:
+void F77_FUNC(lintimeintfacecmplx3d0, LINTIMEINTFACECMPLX3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+void F77_FUNC(lintimeintfacecmplx3d1, LINTIMEINTFACECMPLX3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+void F77_FUNC(lintimeintfacecmplx3d2, LINTIMEINTFACECMPLX3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+FaceComplexLinearTimeInterpolateOp::FaceComplexLinearTimeInterpolateOp():
+   xfer::TimeInterpolateOperator()
+{
+}
+
+FaceComplexLinearTimeInterpolateOp::~FaceComplexLinearTimeInterpolateOp()
+{
+}
+
+bool FaceComplexLinearTimeInterpolateOp::findTimeInterpolateOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   const tbox::Pointer<FaceVariable<dcomplex> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == "STD_LINEAR_TIME_INTERPOLATE")) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+void FaceComplexLinearTimeInterpolateOp::timeInterpolate(
+   hier::PatchData& dst_data,
+   const hier::Box& where,
+   const hier::PatchData& src_data_old,
+   const hier::PatchData& src_data_new) const
+{
+   const tbox::Dimension& dim(where.getDim());
+
+   const FaceData<dcomplex>* old_dat =
+      dynamic_cast<const FaceData<dcomplex> *>(&src_data_old);
+   const FaceData<dcomplex>* new_dat =
+      dynamic_cast<const FaceData<dcomplex> *>(&src_data_new);
+   FaceData<dcomplex>* dst_dat =
+      dynamic_cast<FaceData<dcomplex> *>(&dst_data);
+
+   TBOX_ASSERT(old_dat != NULL);
+   TBOX_ASSERT(new_dat != NULL);
+   TBOX_ASSERT(dst_dat != NULL);
+   TBOX_ASSERT(where * old_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * new_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * dst_dat->getGhostBox() == where);
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst_data, where, src_data_old, src_data_new);
+
+   const hier::Index old_ilo = old_dat->getGhostBox().lower();
+   const hier::Index old_ihi = old_dat->getGhostBox().upper();
+   const hier::Index new_ilo = new_dat->getGhostBox().lower();
+   const hier::Index new_ihi = new_dat->getGhostBox().upper();
+
+   const hier::Index dst_ilo = dst_dat->getGhostBox().lower();
+   const hier::Index dst_ihi = dst_dat->getGhostBox().upper();
+
+   const hier::Index ifirst = where.lower();
+   const hier::Index ilast = where.upper();
+
+   const double old_time = old_dat->getTime();
+   const double new_time = new_dat->getTime();
+   const double dst_time = dst_dat->getTime();
+
+   TBOX_ASSERT((old_time < dst_time ||
+                tbox::MathUtilities<double>::equalEps(old_time, dst_time)) &&
+      (dst_time < new_time ||
+       tbox::MathUtilities<double>::equalEps(dst_time, new_time)));
+
+   double tfrac = dst_time - old_time;
+   double denom = new_time - old_time;
+   if (denom > tbox::MathUtilities<double>::getMin()) {
+      tfrac /= denom;
+   } else {
+      tfrac = 0.0;
+   }
+
+   for (int d = 0; d < dst_dat->getDepth(); d++) {
+      if (dim == tbox::Dimension(1)) {
+         F77_FUNC(lintimeintfacecmplx1d, LINTIMEINTFACECMPLX1D) (ifirst(0),
+            ilast(0),
+            old_ilo(0), old_ihi(0),
+            new_ilo(0), new_ihi(0),
+            dst_ilo(0), dst_ihi(0),
+            tfrac,
+            old_dat->getPointer(0, d),
+            new_dat->getPointer(0, d),
+            dst_dat->getPointer(0, d));
+      } else if (dim == tbox::Dimension(2)) {
+         F77_FUNC(lintimeintfacecmplx2d0, LINTIMEINTFACECMPLX2D0) (ifirst(0),
+            ifirst(1), ilast(0), ilast(1),
+            old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+            new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+            dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+            tfrac,
+            old_dat->getPointer(0, d),
+            new_dat->getPointer(0, d),
+            dst_dat->getPointer(0, d));
+         F77_FUNC(lintimeintfacecmplx2d1, LINTIMEINTFACECMPLX2D1) (ifirst(0),
+            ifirst(1), ilast(0), ilast(1),
+            old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+            new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+            dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+            tfrac,
+            old_dat->getPointer(1, d),
+            new_dat->getPointer(1, d),
+            dst_dat->getPointer(1, d));
+      } else if (dim == tbox::Dimension(3)) {
+         F77_FUNC(lintimeintfacecmplx3d0, LINTIMEINTFACECMPLX3D0) (ifirst(0),
+            ifirst(1), ifirst(2),
+            ilast(0), ilast(1), ilast(2),
+            old_ilo(0), old_ilo(1), old_ilo(2),
+            old_ihi(0), old_ihi(1), old_ihi(2),
+            new_ilo(0), new_ilo(1), new_ilo(2),
+            new_ihi(0), new_ihi(1), new_ihi(2),
+            dst_ilo(0), dst_ilo(1), dst_ilo(2),
+            dst_ihi(0), dst_ihi(1), dst_ihi(2),
+            tfrac,
+            old_dat->getPointer(0, d),
+            new_dat->getPointer(0, d),
+            dst_dat->getPointer(0, d));
+         F77_FUNC(lintimeintfacecmplx3d1, LINTIMEINTFACECMPLX3D1) (ifirst(0),
+            ifirst(1), ifirst(2),
+            ilast(0), ilast(1), ilast(2),
+            old_ilo(0), old_ilo(1), old_ilo(2),
+            old_ihi(0), old_ihi(1), old_ihi(2),
+            new_ilo(0), new_ilo(1), new_ilo(2),
+            new_ihi(0), new_ihi(1), new_ihi(2),
+            dst_ilo(0), dst_ilo(1), dst_ilo(2),
+            dst_ihi(0), dst_ihi(1), dst_ihi(2),
+            tfrac,
+            old_dat->getPointer(1, d),
+            new_dat->getPointer(1, d),
+            dst_dat->getPointer(1, d));
+         F77_FUNC(lintimeintfacecmplx3d2, LINTIMEINTFACECMPLX3D2) (ifirst(0),
+            ifirst(1), ifirst(2),
+            ilast(0), ilast(1), ilast(2),
+            old_ilo(0), old_ilo(1), old_ilo(2),
+            old_ihi(0), old_ihi(1), old_ihi(2),
+            new_ilo(0), new_ilo(1), new_ilo(2),
+            new_ihi(0), new_ihi(1), new_ihi(2),
+            dst_ilo(0), dst_ilo(1), dst_ilo(2),
+            dst_ihi(0), dst_ihi(1), dst_ihi(2),
+            tfrac,
+            old_dat->getPointer(2, d),
+            new_dat->getPointer(2, d),
+            dst_dat->getPointer(2, d));
+      } else {
+         TBOX_ERROR(
+            "FaceComplexLinearTimeInterpolateOp::TimeInterpolate dim > 3 not supported"
+            << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceComplexLinearTimeInterpolateOp.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceComplexLinearTimeInterpolateOp.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for face-centered complex data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceComplexLinearTimeInterpolateOp
+#define included_pdat_FaceComplexLinearTimeInterpolateOp
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class FaceComplexLinearTimeInterpolateOp implements standard
+ * linear time interpolation for face-centered complex patch data.
+ * It is derived from the xfer::TimeInterpolateOperator base class.
+ * The interpolation uses FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is a face-centered complex, and the string is
+ * "STD_LINEAR_TIME_INTERPOLATE".
+ *
+ * @see xfer::TimeInterpolateOperator
+ */
+
+class FaceComplexLinearTimeInterpolateOp:
+   public xfer::TimeInterpolateOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   FaceComplexLinearTimeInterpolateOp();
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~FaceComplexLinearTimeInterpolateOp();
+
+   /**
+    * Return true if the variable and name string match the standard
+    * face-centered complex interpolation; otherwise, return false.
+    */
+   bool
+   findTimeInterpolateOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Perform linear time interpolation between two face-centered complex
+    * patch data sources and place result in the destination patch data.
+    * Time interpolation is performed on the intersection of the destination
+    * patch data and the input box.  The time to which data is interpolated
+    * is provided by the destination data.
+    */
+   void
+   timeInterpolate(
+      hier::PatchData& dst_data,
+      const hier::Box& where,
+      const hier::PatchData& src_data_old,
+      const hier::PatchData& src_data_new) const;
+
+private:
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceData.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceData.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,550 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated face centered patch data type 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceData_C
+#define included_pdat_FaceData_C
+
+#include "SAMRAI/pdat/FaceData.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/pdat/FaceGeometry.h"
+#include "SAMRAI/pdat/FaceOverlap.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <stdio.h>
+
+#define PDAT_FACEDATA_VERSION 1
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/FaceData.I"
+#endif
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * Constructor and destructor for face data objects.  The constructor	*
+ * simply initializes data variables and sets up the array data.		*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+FaceData<TYPE>::FaceData(
+   const hier::Box& box,
+   int depth,
+   const hier::IntVector& ghosts):
+   hier::PatchData(box, ghosts),
+   d_depth(depth)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(box, ghosts);
+   TBOX_ASSERT(depth > 0);
+   TBOX_ASSERT(ghosts.min() >= 0);
+
+   for (int d = 0; d < getDim().getValue(); d++) {
+      const hier::Box face = FaceGeometry::toFaceBox(this->getGhostBox(), d);
+      d_data[d].initializeArray(face, depth);
+   }
+}
+
+template<class TYPE>
+FaceData<TYPE>::~FaceData()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * The following are private and cannot be used, but they are defined	*
+ * here for compilers that require that every template declaration have	*
+ * a definition (a stupid requirement, if you ask me).			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+FaceData<TYPE>::FaceData(
+   const FaceData<TYPE>& foo):
+   hier::PatchData(foo.getBox(), foo.getGhostCellWidth())
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void FaceData<TYPE>::operator = (
+   const FaceData<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Perform a fast copy between two face centered arrays where their	*
+ * index spaces overlap.							*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void FaceData<TYPE>::copy(
+   const hier::PatchData& src)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   const FaceData<TYPE>* t_src =
+      dynamic_cast<const FaceData<TYPE> *>(&src);
+
+   if (t_src == NULL) {
+      src.copy2(*this);
+   } else {
+      for (int d = 0; d < getDim().getValue(); d++) {
+         const hier::Box box = d_data[d].getBox() * t_src->d_data[d].getBox();
+         if (!box.empty()) {
+            d_data[d].copy(t_src->d_data[d], box);
+         }
+      }
+   }
+}
+
+template<class TYPE>
+void FaceData<TYPE>::copy2(
+   hier::PatchData& dst) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   FaceData<TYPE>* t_dst =
+      dynamic_cast<FaceData<TYPE> *>(&dst);
+
+   TBOX_ASSERT(t_dst != NULL);
+
+   for (int d = 0; d < getDim().getValue(); d++) {
+      const hier::Box box = d_data[d].getBox() * t_dst->d_data[d].getBox();
+      if (!box.empty()) {
+         t_dst->d_data[d].copy(d_data[d], box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Copy data from the source into the destination according to the	*
+ * overlap descriptor.							*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void FaceData<TYPE>::copy(
+   const hier::PatchData& src,
+   const hier::BoxOverlap& overlap)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   const FaceData<TYPE>* t_src =
+      dynamic_cast<const FaceData<TYPE> *>(&src);
+   const FaceOverlap* t_overlap =
+      dynamic_cast<const FaceOverlap *>(&overlap);
+
+   if ((t_src == NULL) || (t_overlap == NULL)) {
+      src.copy2(*this, overlap);
+   } else {
+      const hier::IntVector& src_offset = t_overlap->getSourceOffset();
+      for (int d = 0; d < getDim().getValue(); d++) {
+         hier::IntVector face_offset(src_offset);
+         if (d > 0) {
+            for (int i = 0; i < getDim().getValue(); i++) {
+               face_offset(i) = src_offset((d + i) % getDim().getValue());
+            }
+         }
+         const hier::BoxList& box_list = t_overlap->getDestinationBoxList(d);
+         d_data[d].copy(t_src->d_data[d], box_list, face_offset);
+      }
+   }
+}
+
+template<class TYPE>
+void FaceData<TYPE>::copy2(
+   hier::PatchData& dst,
+   const hier::BoxOverlap& overlap) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   FaceData<TYPE>* t_dst =
+      dynamic_cast<FaceData<TYPE> *>(&dst);
+
+   const FaceOverlap* t_overlap =
+      dynamic_cast<const FaceOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_dst != NULL);
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::IntVector& src_offset = t_overlap->getSourceOffset();
+   for (int d = 0; d < getDim().getValue(); d++) {
+      hier::IntVector face_offset(src_offset);
+      if (d > 0) {
+         for (int i = 0; i < getDim().getValue(); i++) {
+            face_offset(i) = src_offset((d + i) % getDim().getValue());
+         }
+      }
+      const hier::BoxList& box_list = t_overlap->getDestinationBoxList(d);
+      t_dst->d_data[d].copy(d_data[d], box_list, face_offset);
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Perform a fast copy between two arrays at the                         *
+ * specified depths, where their	index spaces overlap.			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void FaceData<TYPE>::copyDepth(
+   int dst_depth,
+   const FaceData<TYPE>& src,
+   int src_depth)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   for (int d = 0; d < getDim().getValue(); d++) {
+      const hier::Box box = d_data[d].getBox() * src.d_data[d].getBox();
+      if (!box.empty()) {
+         d_data[d].copyDepth(dst_depth, src.d_data[d], src_depth, box);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Calculate the buffer space needed to pack/unpack messages on the box	*
+ * region using the overlap descriptor.					*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+bool FaceData<TYPE>::canEstimateStreamSizeFromBox() const
+{
+   return ArrayData<TYPE>::canEstimateStreamSizeFromBox();
+}
+
+template<class TYPE>
+int FaceData<TYPE>::getDataStreamSize(
+   const hier::BoxOverlap& overlap) const
+{
+   const FaceOverlap* t_overlap =
+      dynamic_cast<const FaceOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::IntVector& offset = t_overlap->getSourceOffset();
+
+   int size = 0;
+   for (int d = 0; d < getDim().getValue(); d++) {
+      hier::IntVector face_offset(offset);
+      if (d > 0) {
+         for (int i = 0; i < getDim().getValue(); i++) {
+            face_offset(i) = offset((d + i) % getDim().getValue());
+         }
+      }
+      size += d_data[d].getDataStreamSize(t_overlap->getDestinationBoxList(d),
+            face_offset);
+   }
+   return size;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Pack/unpack data into/out of the message streams using the index	*
+ * space in the overlap descriptor.					*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void FaceData<TYPE>::packStream(
+   tbox::MessageStream& stream,
+   const hier::BoxOverlap& overlap) const
+{
+   const FaceOverlap* t_overlap =
+      dynamic_cast<const FaceOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::IntVector& offset = t_overlap->getSourceOffset();
+   for (int d = 0; d < getDim().getValue(); d++) {
+      hier::IntVector face_offset(offset);
+      if (d > 0) {
+         for (int i = 0; i < getDim().getValue(); i++) {
+            face_offset(i) = offset((d + i) % getDim().getValue());
+         }
+      }
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(d);
+      if (boxes.getNumberOfItems() > 0) {
+         d_data[d].packStream(stream, boxes, face_offset);
+      }
+   }
+}
+
+template<class TYPE>
+void FaceData<TYPE>::unpackStream(
+   tbox::MessageStream& stream,
+   const hier::BoxOverlap& overlap)
+{
+   const FaceOverlap* t_overlap =
+      dynamic_cast<const FaceOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::IntVector& offset = t_overlap->getSourceOffset();
+   for (int d = 0; d < getDim().getValue(); d++) {
+      hier::IntVector face_offset(offset);
+      if (d > 0) {
+         for (int i = 0; i < getDim().getValue(); i++) {
+            face_offset(i) = offset((d + i) % getDim().getValue());
+         }
+      }
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(d);
+      if (boxes.getNumberOfItems() > 0) {
+         d_data[d].unpackStream(stream, boxes, face_offset);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Calculate the amount of memory space needed to represent the data	*
+ * for a  face centered grid.						*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+size_t FaceData<TYPE>::getSizeOfData(
+   const hier::Box& box,
+   int depth,
+   const hier::IntVector& ghosts)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(box, ghosts);
+
+   TBOX_ASSERT(depth > 0);
+
+   size_t size = 0;
+   const hier::Box ghost_box = hier::Box::grow(box, ghosts);
+   for (int d = 0; d < box.getDim().getValue(); d++) {
+      const hier::Box face_box = FaceGeometry::toFaceBox(ghost_box, d);
+      size += ArrayData<TYPE>::getSizeOfData(face_box, depth);
+   }
+   return size;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Fill the face centered box with the given value.			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void FaceData<TYPE>::fill(
+   const TYPE& t,
+   int d)
+{
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   for (int i = 0; i < getDim().getValue(); i++) {
+      d_data[i].fill(t, d);
+   }
+}
+
+template<class TYPE>
+void FaceData<TYPE>::fill(
+   const TYPE& t,
+   const hier::Box& box,
+   int d)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   for (int i = 0; i < getDim().getValue(); i++) {
+      d_data[i].fill(t, FaceGeometry::toFaceBox(box, i), d);
+   }
+}
+
+template<class TYPE>
+void FaceData<TYPE>::fillAll(
+   const TYPE& t)
+{
+   for (int i = 0; i < getDim().getValue(); i++) {
+      d_data[i].fillAll(t);
+   }
+}
+
+template<class TYPE>
+void FaceData<TYPE>::fillAll(
+   const TYPE& t,
+   const hier::Box& box)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   for (int i = 0; i < getDim().getValue(); i++) {
+      d_data[i].fillAll(t, FaceGeometry::toFaceBox(box, i));
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print face centered data.  Note:  makes call to specialized printAxis *
+ * routine in FaceDataSpecialized.C                                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void FaceData<TYPE>::print(
+   const hier::Box& box,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   for (int axis = 0; axis < getDim().getValue(); axis++) {
+      os << "Array face normal = " << axis << std::endl;
+      printAxis(axis, box, os, prec);
+   }
+}
+
+template<class TYPE>
+void FaceData<TYPE>::print(
+   const hier::Box& box,
+   int d,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   for (int axis = 0; axis < getDim().getValue(); axis++) {
+      os << "Array face normal = " << axis << std::endl;
+      printAxis(axis, box, d, os, prec);
+   }
+}
+
+template<class TYPE>
+void FaceData<TYPE>::printAxis(
+   int face_normal,
+   const hier::Box& box,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < getDim().getValue()));
+
+   for (int d = 0; d < d_depth; d++) {
+      os << "Array depth = " << d << std::endl;
+      printAxis(face_normal, box, d, os, prec);
+   }
+}
+
+template<class TYPE>
+void FaceData<TYPE>::printAxis(
+   int face_normal,
+   const hier::Box& box,
+   int depth,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < getDim().getValue()));
+
+   os.precision(prec);
+   for (FaceIterator i(box, face_normal); i; i++) {
+      os << "array" << i() << " = "
+      << d_data[face_normal](i(), depth) << std::endl << std::flush;
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Checks that class version and restart file version are equal.  If so, *
+ * reads in the d_depth data member to the database.  Then tells		*
+ * d_data to read itself in from the database.				*
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void FaceData<TYPE>::getSpecializedFromDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   int ver = database->getInteger("PDAT_FACEDATA_VERSION");
+   if (ver != PDAT_FACEDATA_VERSION) {
+      TBOX_ERROR("FaceData<getDim()>::getSpecializedFromDatabase error...\n"
+         << " : Restart file version different than class version" << std::endl);
+   }
+
+   d_depth = database->getInteger("d_depth");
+
+   tbox::Pointer<tbox::Database> array_database;
+   for (int i = 0; i < getDim().getValue(); i++) {
+      std::string array_name = "d_data" + tbox::Utilities::intToString(i);
+      array_database = database->getDatabase(array_name);
+      (d_data[i]).getFromDatabase(array_database);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Write out the class version number, d_depth data member to the	*
+ * database.  Then tells d_data to write itself to the database.		*
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void FaceData<TYPE>::putSpecializedToDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   database->putInteger("PDAT_FACEDATA_VERSION", PDAT_FACEDATA_VERSION);
+
+   database->putInteger("d_depth", d_depth);
+
+   tbox::Pointer<tbox::Database> array_database;
+   for (int i = 0; i < getDim().getValue(); i++) {
+      std::string array_name = "d_data" + tbox::Utilities::intToString(i);
+      array_database = database->putDatabase(array_name);
+      (d_data[i]).putToDatabase(array_database);
+   }
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceData.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceData.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,118 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated face centered patch data type 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int FaceData<TYPE>::getDepth() const
+{
+   return d_depth;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE * FaceData<TYPE>::getPointer(
+   int face_normal,
+   int depth)
+{
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < getDim().getValue()));
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data[face_normal].getPointer(depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE * FaceData<TYPE>::getPointer(
+   int face_normal,
+   int depth) const
+{
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < getDim().getValue()));
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data[face_normal].getPointer(depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE & FaceData<TYPE>::operator () (
+   const FaceIndex& i,
+   int depth)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, i);
+
+   const int axis = i.getAxis();
+
+   TBOX_ASSERT((axis >= 0) && (axis < getDim().getValue()));
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data[axis](i, depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE &
+FaceData<TYPE>::operator () (
+   const FaceIndex& i,
+   int depth) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, i);
+
+   const int axis = i.getAxis();
+
+   TBOX_ASSERT((axis >= 0) && (axis < getDim().getValue()));
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data[axis](i, depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ArrayData<TYPE>&
+FaceData<TYPE>::getArrayData(
+   int face_normal)
+{
+
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < getDim().getValue()));
+
+   return d_data[face_normal];
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const ArrayData<TYPE>&
+FaceData<TYPE>::getArrayData(
+   int face_normal) const
+{
+
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < getDim().getValue()));
+
+   return d_data[face_normal];
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void FaceData<TYPE>::copyOnBox(
+   const FaceData<TYPE>& src,
+   const hier::Box& box)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*this, src, box);
+
+   for (int axis = 0; axis < getDim().getValue(); axis++) {
+      const hier::Box face_box = FaceGeometry::toFaceBox(box, axis);
+      d_data[axis].copy(src.getArrayData(axis), face_box);
+   }
+
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceData.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceData.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,486 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated face centered patch data type 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceData
+#define included_pdat_FaceData
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/pdat/FaceIndex.h"
+#include "SAMRAI/pdat/FaceIterator.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * @brief Class FaceData<DIM> provides an implementation for data defined
+ * at cell faces on AMR patches.  It is derived from the hier::PatchData
+ * interface common to all SAMRAI patch data types.  Given a CELL-centered
+ * AMR index space box, a face data object represents data of some template
+ * TYPE and depth on the faces of the cells in the box.  Here, depth
+ * indicates the number of data values at each face index location.  The
+ * FaceGeometry class provides the translation between the standard SAMRAI
+ * cell-centered AMR index space and face-centered data.
+ *
+ * Face data is stored in DIM arrays, each of which contains the
+ * data for the faces normal to a corresponding coordinate direction.
+ * In addition, the array indices are permuted so that the fastest array
+ * dimension is the same as the normal direction of the face.
+ * Memory allocation is in column-major ordering (e.g., Fortran
+ * style) so that the leftmost index runs fastest in memory.
+ * For example, a three-dimensional face data object created over a
+ * CELL-centered AMR index space [l0:u0,l1:u1,l2:u2] allocates three data
+ * arrays dimensioned as follows:
+ * \verbatim
+ *
+ * face normal 0
+ *   [ l0 : u0+1 ,
+ *     l1 : u1 ,
+ *     l2 : u2 , d ]   ,
+ *
+ * face normal 1
+ *   [ l1 : u1+1 ,
+ *     l2 : u2 ,
+ *     l0 : u0 , d ]   ,
+ *
+ * face normal 2
+ *   [ l2 : u2+1 ,
+ *     l0 : u0 ,
+ *     l1 : u1 , d ]   ,
+ *
+ * \endverbatim
+ * Here the face normal directions 0, 1, 2 can be thought of as the x, y, and z
+ * face normal directions, respectively, and d is the depth index (i.e., number
+ * of values at each face index location).  Other spatial dimensions are
+ * represented similarly.
+ *
+ * The data type TYPE must define a default constructor (that takes no
+ * arguments) and also the assignment operator.
+ *
+ * IMPORTANT: The SideData<DIM> class provides the same storage
+ * as this face data class, except that the coordinate directions of the
+ * individual arrays are not permuted.
+ *
+ * @see pdat::ArrayData
+ * @see hier::PatchData
+ * @see pdat::FaceDataFactory
+ * @see pdat::FaceIndex
+ * @see pdat::FaceIterator
+ * @see pdat::FaceGeometry
+ */
+
+template<class TYPE>
+class FaceData:public hier::PatchData
+{
+public:
+   /*!
+    * @brief Calculate the amount of memory needed to represent face-
+    * centered data over a CELL-centered AMR index space box.
+    *
+    * This function assumes that the amount of memory
+    * needed for TYPE is sizeof(TYPE).  If this is not the case, then a
+    * specialized function must be defined.
+    *
+    * @param box const Box reference describing the interior of the
+    *            standard CELL-centered index box over which the
+    *            face data object will be created.
+    * @param depth gives the number of components for each
+    *              spatial location in the array.
+    * @param ghosts const IntVector reference indicating the width
+    *               of the ghost cell region around the box over which
+    *               the face data will be allocated.
+    */
+   static size_t
+   getSizeOfData(
+      const hier::Box& box,
+      int depth,
+      const hier::IntVector& ghosts);
+
+   /*!
+    * @brief The constructor for a face data object.
+    *
+    * @param box const Box reference describing the interior of the
+    *            standard CELL-centered index box over which the
+    *            face data object will be created.
+    * @param depth gives the number of components for each
+    *              spatial location in the array.
+    * @param ghosts const IntVector reference indicating the width
+    *               of the ghost cell region around the box over which
+    *               the face data will be allocated.
+    */
+   explicit FaceData(
+      const hier::Box& box,
+      int depth,
+      const hier::IntVector& ghosts);
+
+   /*!
+    * @brief The virtual destructor for a face data object.
+    */
+   virtual ~FaceData<TYPE>();
+
+   /*!
+    * @brief Return the depth (e.g., the number of components in each spatial
+    * location) of the array.
+    */
+   int
+   getDepth() const;
+
+   /*!
+    * @brief Get a pointer to the beginning of a particular face normal and
+    * depth component of the face centered array.
+    */
+   TYPE *
+   getPointer(
+      int face_normal,
+      int depth = 0);
+
+   /*!
+    * @brief Get a const pointer to the beginning of a particular face normal
+    * and depth component of the face centered array.
+    */
+   const TYPE *
+   getPointer(
+      int face_normal,
+      int depth = 0) const;
+
+   /*!
+    * @brief Return a reference to the data entry corresponding
+    * to a given face index and depth.
+    */
+   TYPE&
+   operator () (
+      const FaceIndex& i,
+      int depth = 0);
+
+   /*!
+    * @brief Return a const reference to the data entry corresponding
+    * to a given face index and depth.
+    */
+   const TYPE&
+   operator () (
+      const FaceIndex& i,
+      int depth = 0) const;
+
+   /*!
+    * @brief Return a reference to the array data object for the
+    * given face normal of the face centered data object.
+    */
+   ArrayData<TYPE>&
+   getArrayData(
+      int face_normal);
+
+   /*!
+    * @brief Return a const reference to the array data object for the
+    * given face normal of the face centered data object.
+    */
+   const ArrayData<TYPE>&
+   getArrayData(
+      int face_normal) const;
+
+   /*!
+    * @brief A fast copy from source to destination (i.e., this)
+    * patch data object.
+    *
+    * Data is copied where there is overlap in the underlying index space.
+    * The copy is performed on the interior plus the ghost cell width (for
+    * both the source and destination).  Currently, source data must be
+    * an FaceData of the same DIM and TYPE.  If not, then an unrecoverable
+    * error results.
+    */
+   virtual void
+   copy(
+      const hier::PatchData& src);
+
+   /*!
+    * @brief A fast copy from source (i.e., this) to destination
+    * patch data object.
+    *
+    * Data is copied where there is overlap in the underlying index space.
+    * The copy is performed on the interior plus the ghost cell width (for
+    * both the source and destination).  Currently, destination data must be
+    * an FaceData of the same DIM and TYPE.  If not, then an unrecoverable
+    * error results.
+    */
+   virtual void
+   copy2(
+      hier::PatchData& dst) const;
+
+   /*!
+    * @brief Copy data from source to destination (i.e., this)
+    * patch data object on the given overlap.
+    *
+    * Currently, source data must be FaceData of the same DIM and TYPE
+    * and the overlap must be a FaceOverlap of the same DIM. If not,
+    * then an unrecoverable error results.
+    */
+   virtual void
+   copy(
+      const hier::PatchData& src,
+      const hier::BoxOverlap& overlap);
+
+   /*!
+    * @brief Copy data from source (i.e., this) to destination
+    * patch data object on the given overlap.
+    *
+    * Currently, destination data must be FaceData of the same DIM and TYPE
+    * and the overlap must be a FaceOverlap of the same DIM.  If not,
+    * then an unrecoverable error results.
+    */
+   virtual void
+   copy2(
+      hier::PatchData& dst,
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Copy data from source to destination (i.e., this)
+    * patch data object on the given CELL-centered AMR index box.
+    */
+   void
+   copyOnBox(
+      const FaceData<TYPE>& src,
+      const hier::Box& box);
+
+   /*!
+    * @brief Fast copy (i.e., source and this face data objects are
+    * defined over the same box) to this destination face data object
+    * from the given source face data object at the specified depths.
+    */
+   void
+   copyDepth(
+      int dst_depth,
+      const FaceData<TYPE>& src,
+      int src_depth);
+
+   /*!
+    * @brief Return true if the patch data object can estimate the
+    * stream size required to fit its data using only index
+    * space information (i.e., a box).
+    *
+    * This routine is defined for the standard types (bool, char,
+    * double, float, int, and dcomplex).
+    */
+   virtual bool
+   canEstimateStreamSizeFromBox() const;
+
+   /*!
+    * @brief Return the number of bytes needed to stream the data
+    * in this patch data object lying in the specified box overlap
+    * region.
+    *
+    * This routine is defined for the standard types (bool, char,
+    * double, float, int, and dcomplex).
+    */
+   virtual int
+   getDataStreamSize(
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Pack data in this patch data object lying in the specified
+    * box overlap region into the stream.  The overlap must be an
+    * FaceOverlap of the same DIM.
+    */
+   virtual void
+   packStream(
+      tbox::MessageStream& stream,
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Unpack data from stream into this patch data object over
+    * the specified box overlap region. The overlap must be an
+    * FaceOverlap of the same DIM.
+    */
+   virtual void
+   unpackStream(
+      tbox::MessageStream& stream,
+      const hier::BoxOverlap& overlap);
+
+   /*!
+    * @brief Fill all values at depth d with the value t.
+    */
+   void
+   fill(
+      const TYPE& t,
+      int d = 0);
+
+   /*!
+    * @brief Fill all values at depth d within the box with the value t.
+    */
+   void
+   fill(
+      const TYPE& t,
+      const hier::Box& box,
+      int d = 0);
+
+   /*!
+    * @brief Fill all depth components with value t.
+    */
+   void
+   fillAll(
+      const TYPE& t);
+
+   /*!
+    * @brief Fill all depth components within the box with value t.
+    */
+   void
+   fillAll(
+      const TYPE& t,
+      const hier::Box& box);
+
+   /*!
+    * @brief Print all face data values residing in the specified box.
+    * If the depth of the array is greater than one, all depths are printed.
+    *
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to face index space.
+    * @param os   reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   print(
+      const hier::Box& box,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Print all face data values at the given array depth in
+    * the specified box.
+    *
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to face index space.
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    * @param os   reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   print(
+      const hier::Box& box,
+      int depth,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Print all face centered data values for specified face normal
+    * direction residing in the specified box.  If the depth of the data is
+    * greater than one, all depths are printed.
+    *
+    * @param face_normal  integer face normal coordinate direction,
+    *              must satisfy 0 <= face_normal < DIM
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to face index space.
+    * @param os    reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   printAxis(
+      int face_normal,
+      const hier::Box& box,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Print all face centered data values for specified face normal
+    * direction residing in the specified box.  If the depth of the data is
+    * greater than one, all depths are printed.
+    *
+    * @param face_normal  integer face normal coordinate direction,
+    *              must satisfy 0 <= face_normal < DIM
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to face index space.
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    * @param os    reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   printAxis(
+      int face_normal,
+      const hier::Box& box,
+      int depth,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * Check that class version and restart file version are equal.  If so,
+    * read data members from the database.
+    *
+    * Assertions: database must be non-null pointer.
+    */
+   virtual void
+   getSpecializedFromDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+   /*!
+    * Write out the class version number and other data members to
+    * the database.
+    *
+    * Assertions: database must be non-null pointer.
+    */
+   virtual void
+   putSpecializedToDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+   /*!
+    * The face iterator iterates over the elements on one face normal of a face
+    * centered box geometry.  This typedef is a convenience for using the
+    * FaceIterator class.
+    */
+   typedef FaceIterator Iterator;
+
+private:
+   FaceData(
+      const FaceData<TYPE>&);           // not implemented
+   void
+   operator = (
+      const FaceData<TYPE>&);                           // not implemented
+
+   int d_depth;
+   ArrayData<TYPE> d_data[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/FaceData.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/FaceData.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceDataFactory.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceDataFactory.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,179 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating face data objects 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceDataFactory_C
+#define included_pdat_FaceDataFactory_C
+
+#include "SAMRAI/pdat/FaceDataFactory.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceGeometry.h"
+#include "SAMRAI/pdat/OuterfaceDataFactory.h"
+#include "SAMRAI/hier/Patch.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/FaceDataFactory.I"
+#endif
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * The constructor simply caches the default ghost cell width and depth.	*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+FaceDataFactory<TYPE>::FaceDataFactory(
+   int depth,
+   const hier::IntVector& ghosts,
+   bool fine_boundary_represents_var):
+   hier::PatchDataFactory(ghosts),
+   d_depth(depth),
+   d_fine_boundary_represents_var(fine_boundary_represents_var),
+   d_mb_trans(NULL)
+{
+   TBOX_ASSERT(depth > 0);
+   TBOX_ASSERT(ghosts.min() >= 0);
+
+}
+
+template<class TYPE>
+FaceDataFactory<TYPE>::~FaceDataFactory()
+{
+   if (d_mb_trans) {
+      delete d_mb_trans;
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Clone the factory and copy the default parameters to the new factory.	*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::PatchDataFactory>
+FaceDataFactory<TYPE>::cloneFactory(
+   const hier::IntVector& ghosts)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, ghosts);
+
+   return tbox::Pointer<hier::PatchDataFactory>(new FaceDataFactory<TYPE>(
+                                                   d_depth,
+                                                   ghosts,
+                                                   d_fine_boundary_represents_var));
+}
+
+/*
+ *************************************************************************
+ *
+ * Allocate the concrete face data classes.
+ *
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::PatchData>
+FaceDataFactory<TYPE>::allocate(
+   const hier::Patch& patch) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, patch);
+
+   hier::PatchData* patchdata =
+      new FaceData<TYPE>(patch.getBox(), d_depth, this->d_ghosts);
+   return tbox::Pointer<hier::PatchData>(patchdata);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Return the box geometry type for face data objects.			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::BoxGeometry>
+FaceDataFactory<TYPE>::getBoxGeometry(
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   hier::BoxGeometry* boxgeometry = new FaceGeometry(box, this->d_ghosts);
+   return tbox::Pointer<hier::BoxGeometry>(boxgeometry);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Calculate the amount of memory needed to allocate the data object.	*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+size_t FaceDataFactory<TYPE>::getSizeOfMemory(
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   const size_t obj =
+      tbox::MemoryUtilities::align(sizeof(FaceData<TYPE>));
+   const size_t data =
+      FaceData<TYPE>::getSizeOfData(box, d_depth, this->d_ghosts);
+   return obj + data;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Determine whether this is a valid copy operation to/from FaceData     *
+ * between the supplied datatype.                                        *
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+bool FaceDataFactory<TYPE>::validCopyTo(
+   const tbox::Pointer<hier::PatchDataFactory>& dst_pdf) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *dst_pdf);
+
+   bool valid_copy = false;
+
+   /*
+    * Valid options are FaceData and OuterfaceData.
+    */
+   if (!valid_copy) {
+      tbox::Pointer<FaceDataFactory<TYPE> > fdf = dst_pdf;
+      if (!fdf.isNull()) {
+         valid_copy = true;
+      }
+   }
+
+   if (!valid_copy) {
+      tbox::Pointer<OuterfaceDataFactory<TYPE> > ofdf = dst_pdf;
+      if (!ofdf.isNull()) {
+         valid_copy = true;
+      }
+   }
+
+   return valid_copy;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceDataFactory.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceDataFactory.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,33 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating face data objects 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int FaceDataFactory<TYPE>::getDepth() const
+{
+   return d_depth;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+hier::MultiblockDataTranslator *
+FaceDataFactory<TYPE>::getMultiblockDataTranslator()
+{
+   if (d_mb_trans == NULL) {
+      d_mb_trans = new MultiblockFaceDataTranslator<TYPE>();
+   }
+   return d_mb_trans;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceDataFactory.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceDataFactory.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,154 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating face data objects 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceDataFactory
+#define included_pdat_FaceDataFactory
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/MultiblockFaceDataTranslator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/PatchDataFactory.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class FaceDataFactory is a factory class used to allocate new
+ * instances of FaceData objects.  It is a subclass of the patch
+ * data factory class and face data is a subclass of patch data.  Both
+ * the factory and data classes are templated on the type of the contained
+ * object (e.g., double or int).
+ *
+ * @see pdat::FaceData
+ * @see pdat::PatchDataFactory
+ */
+
+template<class TYPE>
+class FaceDataFactory:public hier::PatchDataFactory
+{
+public:
+   /**
+    * The constructor for the face data factory class.  The ghost cell width, depth
+    * (number of components), and fine boundary representation arguments give the
+    * defaults for all edge data objects created with this factory.  See
+    * the FaceVariable<DIM> class header file for more information.
+    */
+   explicit FaceDataFactory(
+      int depth,
+      const hier::IntVector& ghosts,
+      bool fine_boundary_represents_var);
+
+   /**
+    * Virtual destructor for the face data factory class.
+    */
+   virtual ~FaceDataFactory<TYPE>();
+
+   /**
+    * @brief Abstract virtual function to clone a patch data factory.
+    *
+    * This will return a new instantiation of the abstract factory
+    * with the same properties.  The properties of the cloned factory
+    * can then be changed without modifying the original.
+    *
+    * @param ghosts default ghost cell width for concrete classes created from
+    * the factory.
+    */
+   virtual tbox::Pointer<hier::PatchDataFactory>
+   cloneFactory(
+      const hier::IntVector& ghosts);
+
+   /**
+    * Virtual factory function to allocate a concrete face data object.
+    * The default information about the object (e.g., ghost cell width)
+    * is taken from the factory.
+    */
+   virtual tbox::Pointer<hier::PatchData>
+   allocate(
+      const hier::Patch& patch) const;
+
+   /**
+    * Allocate the box geometry object associated with the patch data.
+    * This information will be used in the computation of intersections
+    * and data dependencies between objects.
+    */
+   virtual tbox::Pointer<hier::BoxGeometry>
+   getBoxGeometry(
+      const hier::Box& box) const;
+
+   /**
+    * Get the depth (number of components).  This is the depth that
+    * will be used in the instantiation of face data objects.
+    */
+   int
+   getDepth() const;
+
+   /**
+    * Calculate the amount of memory needed to store the face data object,
+    * including object data and dynamically allocated data.
+    */
+   virtual size_t
+   getSizeOfMemory(
+      const hier::Box& box) const;
+
+   /**
+    * Return a boolean value indicating how data for the face quantity will be treated
+    * on coarse-fine interfaces.  This value is passed into the constructor.  See
+    * the FaceVariable<DIM> class header file for more information.
+    */
+   bool fineBoundaryRepresentsVariable() const {
+      return d_fine_boundary_represents_var;
+   }
+
+   /**
+    * Return true since the face data index space extends beyond the interior of
+    * patches.  That is, face data lives on patch borders.
+    */
+   bool dataLivesOnPatchBorder() const {
+      return true;
+   }
+
+   /**
+    * Return whether it is valid to copy this FaceDataFactory to the
+    * supplied destination patch data factory.  It will return true if
+    * dst_pdf is FaceDataFactory and OuterfaceDataFactory, false otherwise.
+    */
+   bool
+   validCopyTo(
+      const tbox::Pointer<hier::PatchDataFactory>& dst_pdf) const;
+
+   /**
+    * Return pointer to a multiblock data translator
+    */
+   hier::MultiblockDataTranslator *
+   getMultiblockDataTranslator();
+
+private:
+   int d_depth;
+   bool d_fine_boundary_represents_var;
+
+   MultiblockFaceDataTranslator<TYPE>* d_mb_trans;
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/FaceDataFactory.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/FaceDataFactory.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceDoubleConstantRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceDoubleConstantRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,274 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for face-centered double data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceDoubleConstantRefine_C
+#define included_pdat_FaceDoubleConstantRefine_C
+
+#include "SAMRAI/pdat/FaceDoubleConstantRefine.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in refine1d.f:
+void F77_FUNC(conreffacedoub1d, CONREFFACEDOUB1D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const double *, double *);
+// in refine2d.f:
+void F77_FUNC(conreffacedoub2d0, CONREFFACEDOUB2D0) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const double *, double *);
+void F77_FUNC(conreffacedoub2d1, CONREFFACEDOUB2D1) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const double *, double *);
+// in refine3d.f:
+void F77_FUNC(conreffacedoub3d0, CONREFFACEDOUB3D0) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const double *, double *);
+void F77_FUNC(conreffacedoub3d1, CONREFFACEDOUB3D1) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const double *, double *);
+void F77_FUNC(conreffacedoub3d2, CONREFFACEDOUB3D2) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const double *, double *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+FaceDoubleConstantRefine::FaceDoubleConstantRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSTANT_REFINE")
+{
+   d_name_id = "CONSTANT_REFINE";
+}
+
+FaceDoubleConstantRefine::~FaceDoubleConstantRefine()
+{
+}
+
+bool FaceDoubleConstantRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<FaceVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+FaceDoubleConstantRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int FaceDoubleConstantRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+FaceDoubleConstantRefine::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void FaceDoubleConstantRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   tbox::Pointer<FaceData<double> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<FaceData<double> >
+   fdata = fine.getPatchData(dst_component);
+
+   const pdat::FaceOverlap* t_overlap =
+      dynamic_cast<const pdat::FaceOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*this, fine, coarse, ratio);
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   for (int axis = 0; axis < dim.getValue(); axis++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(axis);
+
+      for (hier::BoxList::Iterator b(boxes); b; b++) {
+
+         const hier::Box& face_box = b();
+         TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, face_box);
+
+         hier::Box fine_box(dim);
+         for (int i = 0; i < dim.getValue(); i++) {
+            fine_box.lower((axis + i) % dim.getValue()) = face_box.lower(i);
+            fine_box.upper((axis + i) % dim.getValue()) = face_box.upper(i);
+         }
+
+         fine_box.upper(axis) -= 1;
+
+         const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+         const hier::Index ifirstc = coarse_box.lower();
+         const hier::Index ilastc = coarse_box.upper();
+         const hier::Index ifirstf = fine_box.lower();
+         const hier::Index ilastf = fine_box.upper();
+
+         for (int d = 0; d < fdata->getDepth(); d++) {
+            if (dim == tbox::Dimension(1)) {
+               F77_FUNC(conreffacedoub1d, CONREFFACEDOUB1D) (
+                  ifirstc(0), ilastc(0),
+                  ifirstf(0), ilastf(0),
+                  cilo(0), cihi(0),
+                  filo(0), fihi(0),
+                  &ratio[0],
+                  cdata->getPointer(0, d),
+                  fdata->getPointer(0, d));
+            } else if (dim == tbox::Dimension(2)) {
+               if (axis == 0) {
+                  F77_FUNC(conreffacedoub2d0, CONREFFACEDOUB2D0) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               } else if (axis == 1) {
+                  F77_FUNC(conreffacedoub2d1, CONREFFACEDOUB2D1) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d));
+               }
+            } else if (dim == tbox::Dimension(3)) {
+               if (axis == 0) {
+                  F77_FUNC(conreffacedoub3d0, CONREFFACEDOUB3D0) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               } else if (axis == 1) {
+                  F77_FUNC(conreffacedoub3d1, CONREFFACEDOUB3D1) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d));
+               } else if (axis == 2) {
+                  F77_FUNC(conreffacedoub3d2, CONREFFACEDOUB3D2) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(2, d),
+                     fdata->getPointer(2, d));
+               }
+            } else {
+               TBOX_ERROR(
+                  "FaceDoubleConstantRefine::refine() dimension > 3 not supported"
+                  << std::endl);
+            }
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceDoubleConstantRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceDoubleConstantRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for face-centered double data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceDoubleConstantRefine
+#define included_pdat_FaceDoubleConstantRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class FaceDoubleConstantRefine implements constant
+ * interpolation for face-centered double patch data defined over a
+ * mesh.  It is derived from the xfer::RefineOperator base class.
+ * The numerical operations for interpolation use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is face-centered double, and the string is "CONSTANT_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class FaceDoubleConstantRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit FaceDoubleConstantRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~FaceDoubleConstantRefine();
+
+   /**
+    * Return true if the variable and name string match face-centered
+    * double constant interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of face-centered double constant interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the constant interpolation operator is the vector
+    * of zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the face-centered double constant
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the boxes contained in fine_overlap.
+    * It is assumed that the coarse patch contains sufficient data for the
+    * stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceDoubleLinearTimeInterpolateOp.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceDoubleLinearTimeInterpolateOp.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,265 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for face-centered double patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceDoubleLinearTimeInterpolateOp_C
+#define included_pdat_FaceDoubleLinearTimeInterpolateOp_C
+
+#include "SAMRAI/pdat/FaceDoubleLinearTimeInterpolateOp.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in lintimint1d.f:
+void F77_FUNC(lintimeintfacedoub1d, LINTIMEINTFACEDOUB1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+// in lintimint2d.f:
+void F77_FUNC(lintimeintfacedoub2d0, LINTIMEINTFACEDOUB2D0) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+void F77_FUNC(lintimeintfacedoub2d1, LINTIMEINTFACEDOUB2D1) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+// in lintimint3d.f:
+void F77_FUNC(lintimeintfacedoub3d0, LINTIMEINTFACEDOUB3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+void F77_FUNC(lintimeintfacedoub3d1, LINTIMEINTFACEDOUB3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+void F77_FUNC(lintimeintfacedoub3d2, LINTIMEINTFACEDOUB3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+FaceDoubleLinearTimeInterpolateOp::FaceDoubleLinearTimeInterpolateOp():
+   xfer::TimeInterpolateOperator()
+{
+}
+
+FaceDoubleLinearTimeInterpolateOp::~FaceDoubleLinearTimeInterpolateOp()
+{
+}
+
+bool FaceDoubleLinearTimeInterpolateOp::findTimeInterpolateOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   const tbox::Pointer<FaceVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == "STD_LINEAR_TIME_INTERPOLATE")) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+void FaceDoubleLinearTimeInterpolateOp::timeInterpolate(
+   hier::PatchData& dst_data,
+   const hier::Box& where,
+   const hier::PatchData& src_data_old,
+   const hier::PatchData& src_data_new) const
+{
+   const tbox::Dimension& dim(where.getDim());
+
+   const FaceData<double>* old_dat =
+      dynamic_cast<const FaceData<double> *>(&src_data_old);
+   const FaceData<double>* new_dat =
+      dynamic_cast<const FaceData<double> *>(&src_data_new);
+   FaceData<double>* dst_dat =
+      dynamic_cast<FaceData<double> *>(&dst_data);
+
+   TBOX_ASSERT(old_dat != NULL);
+   TBOX_ASSERT(new_dat != NULL);
+   TBOX_ASSERT(dst_dat != NULL);
+   TBOX_ASSERT(where * old_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * new_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * dst_dat->getGhostBox() == where);
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst_data, where, src_data_old, src_data_new);
+
+   const hier::Index old_ilo = old_dat->getGhostBox().lower();
+   const hier::Index old_ihi = old_dat->getGhostBox().upper();
+   const hier::Index new_ilo = new_dat->getGhostBox().lower();
+   const hier::Index new_ihi = new_dat->getGhostBox().upper();
+
+   const hier::Index dst_ilo = dst_dat->getGhostBox().lower();
+   const hier::Index dst_ihi = dst_dat->getGhostBox().upper();
+
+   const hier::Index ifirst = where.lower();
+   const hier::Index ilast = where.upper();
+
+   const double old_time = old_dat->getTime();
+   const double new_time = new_dat->getTime();
+   const double dst_time = dst_dat->getTime();
+
+   TBOX_ASSERT((old_time < dst_time ||
+                tbox::MathUtilities<double>::equalEps(old_time, dst_time)) &&
+      (dst_time < new_time ||
+       tbox::MathUtilities<double>::equalEps(dst_time, new_time)));
+
+   double tfrac = dst_time - old_time;
+   double denom = new_time - old_time;
+   if (denom > tbox::MathUtilities<double>::getMin()) {
+      tfrac /= denom;
+   } else {
+      tfrac = 0.0;
+   }
+
+   for (int d = 0; d < dst_dat->getDepth(); d++) {
+      if (dim == tbox::Dimension(1)) {
+         F77_FUNC(lintimeintfacedoub1d, LINTIMEINTFACEDOUB1D) (ifirst(0),
+            ilast(0),
+            old_ilo(0), old_ihi(0),
+            new_ilo(0), new_ihi(0),
+            dst_ilo(0), dst_ihi(0),
+            tfrac,
+            old_dat->getPointer(0, d),
+            new_dat->getPointer(0, d),
+            dst_dat->getPointer(0, d));
+      } else if (dim == tbox::Dimension(2)) {
+         F77_FUNC(lintimeintfacedoub2d0, LINTIMEINTFACEDOUB2D0) (ifirst(0),
+            ifirst(1), ilast(0), ilast(1),
+            old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+            new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+            dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+            tfrac,
+            old_dat->getPointer(0, d),
+            new_dat->getPointer(0, d),
+            dst_dat->getPointer(0, d));
+         F77_FUNC(lintimeintfacedoub2d1, LINTIMEINTFACEDOUB2D1) (ifirst(0),
+            ifirst(1), ilast(0), ilast(1),
+            old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+            new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+            dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+            tfrac,
+            old_dat->getPointer(1, d),
+            new_dat->getPointer(1, d),
+            dst_dat->getPointer(1, d));
+      } else if (dim == tbox::Dimension(3)) {
+         F77_FUNC(lintimeintfacedoub3d0, LINTIMEINTFACEDOUB3D0) (ifirst(0),
+            ifirst(1), ifirst(2),
+            ilast(0), ilast(1), ilast(2),
+            old_ilo(0), old_ilo(1), old_ilo(2),
+            old_ihi(0), old_ihi(1), old_ihi(2),
+            new_ilo(0), new_ilo(1), new_ilo(2),
+            new_ihi(0), new_ihi(1), new_ihi(2),
+            dst_ilo(0), dst_ilo(1), dst_ilo(2),
+            dst_ihi(0), dst_ihi(1), dst_ihi(2),
+            tfrac,
+            old_dat->getPointer(0, d),
+            new_dat->getPointer(0, d),
+            dst_dat->getPointer(0, d));
+         F77_FUNC(lintimeintfacedoub3d1, LINTIMEINTFACEDOUB3D1) (ifirst(0),
+            ifirst(1), ifirst(2),
+            ilast(0), ilast(1), ilast(2),
+            old_ilo(0), old_ilo(1), old_ilo(2),
+            old_ihi(0), old_ihi(1), old_ihi(2),
+            new_ilo(0), new_ilo(1), new_ilo(2),
+            new_ihi(0), new_ihi(1), new_ihi(2),
+            dst_ilo(0), dst_ilo(1), dst_ilo(2),
+            dst_ihi(0), dst_ihi(1), dst_ihi(2),
+            tfrac,
+            old_dat->getPointer(1, d),
+            new_dat->getPointer(1, d),
+            dst_dat->getPointer(1, d));
+         F77_FUNC(lintimeintfacedoub3d2, LINTIMEINTFACEDOUB3D2) (ifirst(0),
+            ifirst(1), ifirst(2),
+            ilast(0), ilast(1), ilast(2),
+            old_ilo(0), old_ilo(1), old_ilo(2),
+            old_ihi(0), old_ihi(1), old_ihi(2),
+            new_ilo(0), new_ilo(1), new_ilo(2),
+            new_ihi(0), new_ihi(1), new_ihi(2),
+            dst_ilo(0), dst_ilo(1), dst_ilo(2),
+            dst_ihi(0), dst_ihi(1), dst_ihi(2),
+            tfrac,
+            old_dat->getPointer(2, d),
+            new_dat->getPointer(2, d),
+            dst_dat->getPointer(2, d));
+      } else {
+         TBOX_ERROR(
+            "FaceDoubleLinearTimeInterpolateOp::TimeInterpolate dim > 3 not supported"
+            << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceDoubleLinearTimeInterpolateOp.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceDoubleLinearTimeInterpolateOp.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for face-centered double patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceDoubleLinearTimeInterpolateOp
+#define included_pdat_FaceDoubleLinearTimeInterpolateOp
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class FaceDoubleLinearTimeInterpolateOp implements standard
+ * linear time interpolation for face-centered double patch data.
+ * It is derived from the xfer::TimeInterpolateOperator base class.
+ * The interpolation uses FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is a face-centered double, and the string is
+ * "STD_LINEAR_TIME_INTERPOLATE".
+ *
+ * @see xfer::TimeInterpolateOperator
+ */
+
+class FaceDoubleLinearTimeInterpolateOp:
+   public xfer::TimeInterpolateOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   FaceDoubleLinearTimeInterpolateOp();
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~FaceDoubleLinearTimeInterpolateOp();
+
+   /**
+    * Return true if the variable and name string match the standard
+    * face-centered double interpolation; otherwise, return false.
+    */
+   bool
+   findTimeInterpolateOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Perform linear time interpolation between two face-centered double
+    * patch data sources and place result in the destination patch data.
+    * Time interpolation is performed on the intersection of the destination
+    * patch data and the input box.  The time to which data is interpolated
+    * is provided by the destination data.
+    */
+   void
+   timeInterpolate(
+      hier::PatchData& dst_data,
+      const hier::Box& where,
+      const hier::PatchData& src_data_old,
+      const hier::PatchData& src_data_new) const;
+
+private:
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceFloatConstantRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceFloatConstantRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,274 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for face-centered float data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceFloatConstantRefine_C
+#define included_pdat_FaceFloatConstantRefine_C
+
+#include "SAMRAI/pdat/FaceFloatConstantRefine.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in refine1d.f:
+void F77_FUNC(conreffaceflot1d, CONREFFACEFLOT1D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const float *, float *);
+// in refine2d.f:
+void F77_FUNC(conreffaceflot2d0, CONREFFACEFLOT2D0) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const float *, float *);
+void F77_FUNC(conreffaceflot2d1, CONREFFACEFLOT2D1) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const float *, float *);
+// in refine3d.f:
+void F77_FUNC(conreffaceflot3d0, CONREFFACEFLOT3D0) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const float *, float *);
+void F77_FUNC(conreffaceflot3d1, CONREFFACEFLOT3D1) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const float *, float *);
+void F77_FUNC(conreffaceflot3d2, CONREFFACEFLOT3D2) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const float *, float *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+FaceFloatConstantRefine::FaceFloatConstantRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSTANT_REFINE")
+{
+   d_name_id = "CONSTANT_REFINE";
+}
+
+FaceFloatConstantRefine::~FaceFloatConstantRefine()
+{
+}
+
+bool FaceFloatConstantRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<FaceVariable<float> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+FaceFloatConstantRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int FaceFloatConstantRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+FaceFloatConstantRefine::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void FaceFloatConstantRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   tbox::Pointer<FaceData<float> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<FaceData<float> >
+   fdata = fine.getPatchData(dst_component);
+
+   const pdat::FaceOverlap* t_overlap =
+      dynamic_cast<const pdat::FaceOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*this, fine, coarse, ratio);
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   for (int axis = 0; axis < dim.getValue(); axis++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(axis);
+
+      for (hier::BoxList::Iterator b(boxes); b; b++) {
+
+         const hier::Box& face_box = b();
+         TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, face_box);
+
+         hier::Box fine_box(dim);
+         for (int i = 0; i < dim.getValue(); i++) {
+            fine_box.lower((axis + i) % dim.getValue()) = face_box.lower(i);
+            fine_box.upper((axis + i) % dim.getValue()) = face_box.upper(i);
+         }
+
+         fine_box.upper(axis) -= 1;
+
+         const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+         const hier::Index ifirstc = coarse_box.lower();
+         const hier::Index ilastc = coarse_box.upper();
+         const hier::Index ifirstf = fine_box.lower();
+         const hier::Index ilastf = fine_box.upper();
+
+         for (int d = 0; d < fdata->getDepth(); d++) {
+            if (dim == tbox::Dimension(1)) {
+               F77_FUNC(conreffaceflot1d, CONREFFACEFLOT1D) (
+                  ifirstc(0), ilastc(0),
+                  ifirstf(0), ilastf(0),
+                  cilo(0), cihi(0),
+                  filo(0), fihi(0),
+                  &ratio[0],
+                  cdata->getPointer(0, d),
+                  fdata->getPointer(0, d));
+            } else if (dim == tbox::Dimension(2)) {
+               if (axis == 0) {
+                  F77_FUNC(conreffaceflot2d0, CONREFFACEFLOT2D0) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               } else if (axis == 1) {
+                  F77_FUNC(conreffaceflot2d1, CONREFFACEFLOT2D1) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d));
+               }
+            } else if (dim == tbox::Dimension(3)) {
+               if (axis == 0) {
+                  F77_FUNC(conreffaceflot3d0, CONREFFACEFLOT3D0) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               } else if (axis == 1) {
+                  F77_FUNC(conreffaceflot3d1, CONREFFACEFLOT3D1) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d));
+               } else if (axis == 2) {
+                  F77_FUNC(conreffaceflot3d2, CONREFFACEFLOT3D2) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(2, d),
+                     fdata->getPointer(2, d));
+               }
+            } else {
+               TBOX_ERROR(
+                  "FaceFloatConstantRefine::refine() dimension > 3 not supported"
+                  << std::endl);
+            }
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceFloatConstantRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceFloatConstantRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for face-centered float data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceFloatConstantRefine
+#define included_pdat_FaceFloatConstantRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class FaceFloatConstantRefine implements constant
+ * interpolation for face-centered float patch data defined over a
+ * mesh.  It is derived from the xfer::RefineOperator base class.
+ * The numerical operations for interpolation use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is face-centered float, and the string is "CONSTANT_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class FaceFloatConstantRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit FaceFloatConstantRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~FaceFloatConstantRefine();
+
+   /**
+    * Return true if the variable and name string match face-centered
+    * float constant interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of face-centered float constant interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the constant interpolation operator is the vector
+    * of zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the face-centered float constant
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the boxes contained in fine_overlap.
+    * It is assumed that the coarse patch contains sufficient data for the
+    * stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceFloatLinearTimeInterpolateOp.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceFloatLinearTimeInterpolateOp.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,265 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for face-centered float patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceFloatLinearTimeInterpolateOp_C
+#define included_pdat_FaceFloatLinearTimeInterpolateOp_C
+
+#include "SAMRAI/pdat/FaceFloatLinearTimeInterpolateOp.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in lintimint1d.f:
+void F77_FUNC(lintimeintfacefloat1d, LINTIMEINTFACEFLOAT1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+// in lintimint2d.f:
+void F77_FUNC(lintimeintfacefloat2d0, LINTIMEINTFACEFLOAT2D0) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+void F77_FUNC(lintimeintfacefloat2d1, LINTIMEINTFACEFLOAT2D1) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+// in lintimint3d.f:
+void F77_FUNC(lintimeintfacefloat3d0, LINTIMEINTFACEFLOAT3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+void F77_FUNC(lintimeintfacefloat3d1, LINTIMEINTFACEFLOAT3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+void F77_FUNC(lintimeintfacefloat3d2, LINTIMEINTFACEFLOAT3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+FaceFloatLinearTimeInterpolateOp::FaceFloatLinearTimeInterpolateOp():
+   xfer::TimeInterpolateOperator()
+{
+}
+
+FaceFloatLinearTimeInterpolateOp::~FaceFloatLinearTimeInterpolateOp()
+{
+}
+
+bool FaceFloatLinearTimeInterpolateOp::findTimeInterpolateOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   const tbox::Pointer<FaceVariable<float> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == "STD_LINEAR_TIME_INTERPOLATE")) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+void FaceFloatLinearTimeInterpolateOp::timeInterpolate(
+   hier::PatchData& dst_data,
+   const hier::Box& where,
+   const hier::PatchData& src_data_old,
+   const hier::PatchData& src_data_new) const
+{
+   const tbox::Dimension& dim(where.getDim());
+
+   const FaceData<float>* old_dat =
+      dynamic_cast<const FaceData<float> *>(&src_data_old);
+   const FaceData<float>* new_dat =
+      dynamic_cast<const FaceData<float> *>(&src_data_new);
+   FaceData<float>* dst_dat =
+      dynamic_cast<FaceData<float> *>(&dst_data);
+
+   TBOX_ASSERT(old_dat != NULL);
+   TBOX_ASSERT(new_dat != NULL);
+   TBOX_ASSERT(dst_dat != NULL);
+   TBOX_ASSERT(where * old_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * new_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * dst_dat->getGhostBox() == where);
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst_data, where, src_data_old, src_data_new);
+
+   const hier::Index old_ilo = old_dat->getGhostBox().lower();
+   const hier::Index old_ihi = old_dat->getGhostBox().upper();
+   const hier::Index new_ilo = new_dat->getGhostBox().lower();
+   const hier::Index new_ihi = new_dat->getGhostBox().upper();
+
+   const hier::Index dst_ilo = dst_dat->getGhostBox().lower();
+   const hier::Index dst_ihi = dst_dat->getGhostBox().upper();
+
+   const hier::Index ifirst = where.lower();
+   const hier::Index ilast = where.upper();
+
+   const double old_time = old_dat->getTime();
+   const double new_time = new_dat->getTime();
+   const double dst_time = dst_dat->getTime();
+
+   TBOX_ASSERT((old_time < dst_time ||
+                tbox::MathUtilities<double>::equalEps(old_time, dst_time)) &&
+      (dst_time < new_time ||
+       tbox::MathUtilities<double>::equalEps(dst_time, new_time)));
+
+   double tfrac = dst_time - old_time;
+   double denom = new_time - old_time;
+   if (denom > tbox::MathUtilities<double>::getMin()) {
+      tfrac /= denom;
+   } else {
+      tfrac = 0.0;
+   }
+
+   for (int d = 0; d < dst_dat->getDepth(); d++) {
+      if (dim == tbox::Dimension(1)) {
+         F77_FUNC(lintimeintfacefloat1d, LINTIMEINTFACEFLOAT1D) (ifirst(0),
+            ilast(0),
+            old_ilo(0), old_ihi(0),
+            new_ilo(0), new_ihi(0),
+            dst_ilo(0), dst_ihi(0),
+            tfrac,
+            old_dat->getPointer(0, d),
+            new_dat->getPointer(0, d),
+            dst_dat->getPointer(0, d));
+      } else if (dim == tbox::Dimension(2)) {
+         F77_FUNC(lintimeintfacefloat2d0, LINTIMEINTFACEFLOAT2D0) (ifirst(0),
+            ifirst(1), ilast(0), ilast(1),
+            old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+            new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+            dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+            tfrac,
+            old_dat->getPointer(0, d),
+            new_dat->getPointer(0, d),
+            dst_dat->getPointer(0, d));
+         F77_FUNC(lintimeintfacefloat2d1, LINTIMEINTFACEFLOAT2D1) (ifirst(0),
+            ifirst(1), ilast(0), ilast(1),
+            old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+            new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+            dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+            tfrac,
+            old_dat->getPointer(1, d),
+            new_dat->getPointer(1, d),
+            dst_dat->getPointer(1, d));
+      } else if (dim == tbox::Dimension(3)) {
+         F77_FUNC(lintimeintfacefloat3d0, LINTIMEINTFACEFLOAT3D0) (ifirst(0),
+            ifirst(1), ifirst(2),
+            ilast(0), ilast(1), ilast(2),
+            old_ilo(0), old_ilo(1), old_ilo(2),
+            old_ihi(0), old_ihi(1), old_ihi(2),
+            new_ilo(0), new_ilo(1), new_ilo(2),
+            new_ihi(0), new_ihi(1), new_ihi(2),
+            dst_ilo(0), dst_ilo(1), dst_ilo(2),
+            dst_ihi(0), dst_ihi(1), dst_ihi(2),
+            tfrac,
+            old_dat->getPointer(0, d),
+            new_dat->getPointer(0, d),
+            dst_dat->getPointer(0, d));
+         F77_FUNC(lintimeintfacefloat3d1, LINTIMEINTFACEFLOAT3D1) (ifirst(0),
+            ifirst(1), ifirst(2),
+            ilast(0), ilast(1), ilast(2),
+            old_ilo(0), old_ilo(1), old_ilo(2),
+            old_ihi(0), old_ihi(1), old_ihi(2),
+            new_ilo(0), new_ilo(1), new_ilo(2),
+            new_ihi(0), new_ihi(1), new_ihi(2),
+            dst_ilo(0), dst_ilo(1), dst_ilo(2),
+            dst_ihi(0), dst_ihi(1), dst_ihi(2),
+            tfrac,
+            old_dat->getPointer(1, d),
+            new_dat->getPointer(1, d),
+            dst_dat->getPointer(1, d));
+         F77_FUNC(lintimeintfacefloat3d2, LINTIMEINTFACEFLOAT3D2) (ifirst(0),
+            ifirst(1), ifirst(2),
+            ilast(0), ilast(1), ilast(2),
+            old_ilo(0), old_ilo(1), old_ilo(2),
+            old_ihi(0), old_ihi(1), old_ihi(2),
+            new_ilo(0), new_ilo(1), new_ilo(2),
+            new_ihi(0), new_ihi(1), new_ihi(2),
+            dst_ilo(0), dst_ilo(1), dst_ilo(2),
+            dst_ihi(0), dst_ihi(1), dst_ihi(2),
+            tfrac,
+            old_dat->getPointer(2, d),
+            new_dat->getPointer(2, d),
+            dst_dat->getPointer(2, d));
+      } else {
+         TBOX_ERROR(
+            "FaceFloatLinearTimeInterpolateOp::TimeInterpolate dim > 3 not supported"
+            << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceFloatLinearTimeInterpolateOp.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceFloatLinearTimeInterpolateOp.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for face-centered float patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceFloatLinearTimeInterpolateOp
+#define included_pdat_FaceFloatLinearTimeInterpolateOp
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class FaceFloatLinearTimeInterpolateOp implements standard
+ * linear time interpolation for face-centered float patch data.
+ * It is derived from the xfer::TimeInterpolateOperator base class.
+ * The interpolation uses FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is a face-centered float, and the string is
+ * "STD_LINEAR_TIME_INTERPOLATE".
+ *
+ * @see xfer::TimeInterpolateOperator
+ */
+
+class FaceFloatLinearTimeInterpolateOp:
+   public xfer::TimeInterpolateOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   FaceFloatLinearTimeInterpolateOp();
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~FaceFloatLinearTimeInterpolateOp();
+
+   /**
+    * Return true if the variable and name string match the standard
+    * face-centered float interpolation; otherwise, return false.
+    */
+   bool
+   findTimeInterpolateOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Perform linear time interpolation between two face-centered float
+    * patch data sources and place result in the destination patch data.
+    * Time interpolation is performed on the intersection of the destination
+    * patch data and the input box.  The time to which data is interpolated
+    * is provided by the destination data.
+    */
+   void
+   timeInterpolate(
+      hier::PatchData& dst_data,
+      const hier::Box& where,
+      const hier::PatchData& src_data_old,
+      const hier::PatchData& src_data_new) const;
+
+private:
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceGeometry.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceGeometry.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,231 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceGeometry_C
+#define included_pdat_FaceGeometry_C
+
+#include "SAMRAI/pdat/FaceGeometry.h"
+#include "SAMRAI/pdat/FaceOverlap.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/FaceGeometry.I"
+#endif
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * Create a face geometry object given the box and ghost cell width.	*
+ *									*
+ *************************************************************************
+ */
+
+FaceGeometry::FaceGeometry(
+   const hier::Box& box,
+   const hier::IntVector& ghosts):
+   d_box(box),
+   d_ghosts(ghosts)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(box, ghosts);
+   TBOX_ASSERT(ghosts.min() >= 0);
+}
+
+FaceGeometry::~FaceGeometry()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Attempt to calculate the intersection between two face centered box	*
+ * geometries.  The calculateOverlap() checks whether both arguments are	*
+ * face geometries; if so, it compuates the intersection.  If not, then	*
+ * it calls calculateOverlap() on the source object (if retry is true)	*
+ * to allow the source a chance to calculate the intersection.  See the	*
+ * hier::BoxGeometry base class for more information about the protocol.	*
+ * A pointer to null is returned if the intersection cannot be computed.	*
+ *                                                                      *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap> FaceGeometry::calculateOverlap(
+   const hier::BoxGeometry& dst_geometry,
+   const hier::BoxGeometry& src_geometry,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset,
+   const bool retry,
+   const hier::BoxList& dst_restrict_boxes) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(d_box, src_mask, src_offset);
+
+   const FaceGeometry* t_dst =
+      dynamic_cast<const FaceGeometry *>(&dst_geometry);
+   const FaceGeometry* t_src =
+      dynamic_cast<const FaceGeometry *>(&src_geometry);
+
+   tbox::Pointer<hier::BoxOverlap> over(NULL);
+   if ((t_src != NULL) && (t_dst != NULL)) {
+      over = doOverlap(*t_dst, *t_src, src_mask, overwrite_interior,
+            src_offset, dst_restrict_boxes);
+   } else if (retry) {
+      over = src_geometry.calculateOverlap(dst_geometry, src_geometry,
+            src_mask, overwrite_interior,
+            src_offset, false,
+            dst_restrict_boxes);
+   }
+   return over;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Convert an AMR-index space hier::Box into a face-index space box by a	*
+ * cyclic shift of indices.						*
+ *									*
+ *************************************************************************
+ */
+
+hier::Box
+FaceGeometry::toFaceBox(
+   const hier::Box& box,
+   int face_normal)
+{
+   const tbox::Dimension& dim(box.getDim());
+
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < dim.getValue()));
+
+   hier::Box face_box(dim);
+
+   if (!box.empty()) {
+      const int x = face_normal;
+      face_box.lower(0) = box.lower(x);
+      face_box.upper(0) = box.upper(x) + 1;
+      for (int i = 1; i < dim.getValue(); i++) {
+         const int y = (face_normal + i) % dim.getValue();
+         face_box.lower(i) = box.lower(y);
+         face_box.upper(i) = box.upper(y);
+      }
+   }
+
+   return face_box;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Compute the overlap between two face centered boxes.  The algorithm	*
+ * is fairly straight-forward.  First, we perform a quick-and-dirty	*
+ * intersection to see if the boxes might overlap.  If that intersection	*
+ * is not empty, then we need to do a better job calculating the overlap	*
+ * for each dimension.  Note that the AMR index space boxes must be	*
+ * shifted into the face centered space before we calculate the proper	*
+ * intersections.							*
+ *									*
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap> FaceGeometry::doOverlap(
+   const FaceGeometry& dst_geometry,
+   const FaceGeometry& src_geometry,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset,
+   const hier::BoxList& dst_restrict_boxes)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(src_mask, src_offset);
+
+   const tbox::Dimension& dim(src_mask.getDim());
+
+   tbox::Array<hier::BoxList> dst_boxes(dim.getValue());
+
+   // Perform a quick-and-dirty intersection to see if the boxes might overlap
+
+   const hier::Box src_box =
+      hier::Box::grow(src_geometry.d_box, src_geometry.d_ghosts) * src_mask;
+   const hier::Box src_shift =
+      hier::Box::shift(src_box, src_offset);
+   const hier::Box dst_ghost =
+      hier::Box::grow(dst_geometry.d_box, dst_geometry.d_ghosts);
+
+   // Compute the intersection (if any) for each of the face directions
+
+   const hier::IntVector one_vector(dim, 1);
+
+   const hier::Box quick_check =
+      hier::Box::grow(src_shift, one_vector) * hier::Box::grow(dst_ghost,
+         one_vector);
+
+   if (!quick_check.empty()) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         const hier::Box dst_face = toFaceBox(dst_ghost, d);
+         const hier::Box src_face = toFaceBox(src_shift, d);
+         const hier::Box together = dst_face * src_face;
+         if (!together.empty()) {
+            dst_boxes[d].unionBoxes(together);
+            if (!overwrite_interior) {
+               const hier::Box int_face = toFaceBox(dst_geometry.d_box, d);
+               dst_boxes[d].removeIntersections(together, int_face);
+            } else {
+               dst_boxes[d].appendItem(together);
+            }
+         }  // if (!together.empty())
+
+         if (dst_restrict_boxes.size() && dst_boxes[d].size()) {
+            hier::BoxList face_restrict_boxes;
+            for (hier::BoxList::Iterator b(dst_restrict_boxes); b; b++) {
+               face_restrict_boxes.appendItem(toFaceBox(b(), d));
+            }
+            dst_boxes[d].intersectBoxes(face_restrict_boxes);
+         }
+      }  // loop over dim
+   }  // !quick_check.empty()
+
+   // Create the face overlap data object using the boxes and source shift
+
+   hier::BoxOverlap* overlap = new FaceOverlap(dst_boxes, src_offset);
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set up a FaceOverlap oject using the given boxes and offset           *
+ *                                                                       *
+ *************************************************************************
+ */
+tbox::Pointer<hier::BoxOverlap>
+FaceGeometry::setUpOverlap(
+   const hier::BoxList& boxes,
+   const hier::IntVector& src_offset) const
+{
+   const tbox::Dimension& dim(src_offset.getDim());
+   tbox::Array<hier::BoxList> dst_boxes(dim.getValue());
+
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         hier::Box face_box(FaceGeometry::toFaceBox(b(), d));
+         dst_boxes[d].appendItem(face_box);
+      }
+   }
+
+   // Create the face overlap data object using the boxes and source shift
+
+   hier::BoxOverlap* overlap = new FaceOverlap(dst_boxes, src_offset);
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceGeometry.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceGeometry.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,27 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+SAMRAI_INLINE_KEYWORD
+const hier::Box& FaceGeometry::getBox() const
+{
+   return d_box;
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::IntVector& FaceGeometry::getGhosts() const
+{
+   return d_ghosts;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceGeometry.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceGeometry.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,141 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceGeometry
+#define included_pdat_FaceGeometry
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/FaceOverlap.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * Class FaceGeometry manages the mapping between the AMR index space
+ * and the face-centered geometry index space.  It is a subclass of
+ * hier::BoxGeometry and it computes intersections between face-
+ * centered box geometries for communication operations.
+ *
+ * See header file for FaceData<DIM> class for a more detailed
+ * description of the data layout.
+ *
+ * @see hier::BoxGeometry
+ * @see pdat::FaceOverlap
+ */
+
+class FaceGeometry:public hier::BoxGeometry
+{
+public:
+   /*!
+    * The BoxOverlap implemenation for this geometry.
+    */
+   typedef FaceOverlap Overlap;
+
+   /*!
+    * @brief Convert an AMR index box space box into an face geometry box.
+    * An face geometry box extends the given AMR index box space box
+    * by one in upper dimension for the face normal coordinate direction.
+    *
+    * Recall that box indices are cyclically shifted such that the face normal
+    * direction is the first coordinate index.  See SideData header file.
+    */
+   static hier::Box
+   toFaceBox(
+      const hier::Box& box,
+      int face_normal);
+
+   /*!
+    * @brief Construct the face geometry object given an AMR index
+    * space box and ghost cell width.
+    */
+   explicit FaceGeometry(
+      const hier::Box& box,
+      const hier::IntVector& ghosts);
+
+   /*!
+    * @brief The virtual destructor does nothing interesting.
+    */
+   virtual ~FaceGeometry();
+
+   /*!
+    * @brief Compute the overlap in face-centered index space between
+    * the source box geometry and the destination box geometry.
+    */
+   virtual tbox::Pointer<hier::BoxOverlap>
+   calculateOverlap(
+      const hier::BoxGeometry& dst_geometry,
+      const hier::BoxGeometry& src_geometry,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset,
+      const bool retry,
+      const hier::BoxList& dst_restrict_boxes = hier::BoxList()) const;
+
+   /*!
+    * @brief Set up a FaceOverlap object based on the given boxes and the
+    * offset.
+    */
+   virtual tbox::Pointer<hier::BoxOverlap>
+   setUpOverlap(
+      const hier::BoxList& boxes,
+      const hier::IntVector& src_offset) const;
+
+   /*!
+    * @brief Return the box for this face centered box geometry
+    * object.
+    */
+   const hier::Box&
+   getBox() const;
+
+   /*!
+    * @brief Return the ghost cell width for this face centered box
+    * geometry object.
+    */
+   const hier::IntVector&
+   getGhosts() const;
+
+private:
+   /**
+    * Function doOverlap() is the function that computes the overlap
+    * between the source and destination objects, where both box geometry
+    * objects are guaranteed to have face centered geometry.
+    */
+   static tbox::Pointer<hier::BoxOverlap>
+   doOverlap(
+      const FaceGeometry& dst_geometry,
+      const FaceGeometry& src_geometry,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset,
+      const hier::BoxList& dst_restrict_boxes);
+
+   FaceGeometry(
+      const FaceGeometry&);             // not implemented
+   void
+   operator = (
+      const FaceGeometry&);                     // not implemented
+
+   hier::Box d_box;
+   hier::IntVector d_ghosts;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/FaceGeometry.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceIndex.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceIndex.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,19 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceIndex_C
+#define included_pdat_FaceIndex_C
+
+#include "SAMRAI/pdat/FaceIndex.h"
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/FaceIndex.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceIndex.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceIndex.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,219 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+SAMRAI_INLINE_KEYWORD
+FaceIndex::FaceIndex(
+   const tbox::Dimension& dim):
+   hier::Index(dim)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+FaceIndex::FaceIndex(
+   const hier::Index& rhs,
+   const int axis,
+   const int face):
+   hier::Index(rhs),
+   d_axis(axis)
+{
+   (*this)(0) = rhs(d_axis) + face;
+   for (int i = 1; i < getDim().getValue(); i++) {
+      (*this)(i) = rhs((d_axis + i) % getDim().getValue());
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+FaceIndex::FaceIndex(
+   const FaceIndex& rhs):
+   hier::Index(rhs),
+   d_axis(rhs.d_axis)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+FaceIndex& FaceIndex::operator = (
+   const FaceIndex& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   hier::Index::operator = (rhs);
+   d_axis = rhs.d_axis;
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+FaceIndex::~FaceIndex()
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+int FaceIndex::getAxis() const
+{
+   return d_axis;
+}
+
+SAMRAI_INLINE_KEYWORD
+void FaceIndex::setAxis(
+   const int axis)
+{
+   d_axis = axis;
+}
+
+SAMRAI_INLINE_KEYWORD
+hier::Index FaceIndex::toCell(
+   const int face) const
+{
+   hier::Index index(getDim());
+   index(d_axis) = (*this)(0) + face - 1;
+   for (int i = 1; i < getDim().getValue(); i++) {
+      index((d_axis + i) % getDim().getValue()) = (*this)(i);
+   }
+   return index;
+}
+
+SAMRAI_INLINE_KEYWORD
+FaceIndex& FaceIndex::operator += (
+   const hier::IntVector& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   hier::Index::operator += (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+FaceIndex FaceIndex::operator + (
+   const hier::IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   FaceIndex tmp = *this;
+   tmp += rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+FaceIndex& FaceIndex::operator += (
+   const int rhs)
+{
+   hier::Index::operator += (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+FaceIndex FaceIndex::operator + (
+   const int rhs) const
+{
+   FaceIndex tmp = *this;
+   tmp += rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+FaceIndex& FaceIndex::operator -= (
+   const hier::IntVector& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   hier::Index::operator -= (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+FaceIndex FaceIndex::operator - (
+   const hier::IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   FaceIndex tmp = *this;
+   tmp -= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+FaceIndex& FaceIndex::operator -= (
+   const int rhs)
+{
+   hier::Index::operator -= (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+FaceIndex FaceIndex::operator - (
+   const int rhs) const
+{
+   FaceIndex tmp = *this;
+   tmp -= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+FaceIndex& FaceIndex::operator *= (
+   const hier::IntVector& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   hier::Index::operator *= (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+FaceIndex FaceIndex::operator * (
+   const hier::IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   FaceIndex tmp = *this;
+   tmp *= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+FaceIndex& FaceIndex::operator *= (
+   const int rhs)
+{
+   hier::Index::operator *= (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+FaceIndex FaceIndex::operator * (
+   const int rhs) const
+{
+   FaceIndex tmp = *this;
+   tmp *= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool FaceIndex::operator == (
+   const FaceIndex& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   return ((hier::Index *)this)->operator == (rhs) && (d_axis == rhs.d_axis);
+}
+
+SAMRAI_INLINE_KEYWORD
+bool FaceIndex::operator != (
+   const FaceIndex& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   return ((hier::Index *)this)->operator != (rhs) || (d_axis != rhs.d_axis);
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceIndex.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceIndex.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,211 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceIndex
+#define included_pdat_FaceIndex
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Index.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class FaceIndex implements a simple n-dimensional integer
+ * vector for face centered variables.  Face indices contain an integer
+ * index location in AMR index space along with the designated face axis
+ * (X=0, Y=1, or Z=2).  See the face box geometry class for more information
+ * about the mapping between the AMR index space and the face indices.
+ *
+ * @see hier::Index
+ * @see pdat::FaceData
+ * @see pdat::FaceGeometry
+ * @see pdat::FaceIterator
+ */
+
+class FaceIndex:public hier::Index
+{
+public:
+   /**
+    * The default constructor for a face index creates an uninitialized index.
+    */
+   explicit FaceIndex(
+      const tbox::Dimension& dim);
+
+   /**
+    * Construct a face index from a regular index, axis, and face.  The axis
+    * can be one of FaceIndex::X (0), FaceIndex::Y (1), or
+    * FaceIndex::Z (2). The face argument can be one of the constants
+    * FaceIndex::Lower (0) or FaceIndex::Upper (1).
+    */
+   explicit FaceIndex(
+      const hier::Index& rhs,
+      const int axis,
+      const int face);
+
+   /**
+    * The copy constructor creates a face index equal to the argument.
+    */
+   FaceIndex(
+      const FaceIndex& rhs);
+
+   /**
+    * The assignment operator sets the face index equal to the argument.
+    */
+   FaceIndex&
+   operator = (
+      const FaceIndex& rhs);
+
+   /**
+    * The face index destructor does nothing interesting.
+    */
+   ~FaceIndex();
+
+   /**
+    * Get the axis for which this face index is defined (X=0, Y=1, Z=2).
+    */
+   int
+   getAxis() const;
+
+   /**
+    * Set the face axis (X=0, Y=1, Z=2).
+    */
+   void
+   setAxis(
+      const int axis);
+
+   /**
+    * Convert the face index into the index on the left hand face
+    * (argument face == 0) or the right hand face (argument face == 1).
+    */
+   hier::Index
+   toCell(
+      const int face) const;
+
+   /**
+    * Plus-equals operator for a face index and an integer vector.
+    */
+   FaceIndex&
+   operator += (
+      const hier::IntVector& rhs);
+
+   /**
+    * Plus operator for a face index and an integer vector.
+    */
+   FaceIndex
+   operator + (
+      const hier::IntVector& rhs) const;
+
+   /**
+    * Plus-equals operator for a face index and an integer.
+    */
+   FaceIndex&
+   operator += (
+      const int rhs);
+
+   /**
+    * Plus operator for a face index and an integer.
+    */
+   FaceIndex
+   operator + (
+      const int rhs) const;
+
+   /**
+    * Minus-equals operator for a face index and an integer vector.
+    */
+   FaceIndex&
+   operator -= (
+      const hier::IntVector& rhs);
+
+   /**
+    * Minus operator for a face index and an integer vector.
+    */
+   FaceIndex
+   operator - (
+      const hier::IntVector& rhs) const;
+
+   /**
+    * Minus-equals operator for a face index and an integer.
+    */
+   FaceIndex&
+   operator -= (
+      const int rhs);
+
+   /**
+    * Minus operator for a face index and an integer.
+    */
+   FaceIndex
+   operator - (
+      const int rhs) const;
+
+   /**
+    * Times-equals operator for a face index and an integer vector.
+    */
+   FaceIndex&
+   operator *= (
+      const hier::IntVector& rhs);
+
+   /**
+    * Times operator for a face index and an integer vector.
+    */
+   FaceIndex
+   operator * (
+      const hier::IntVector& rhs) const;
+
+   /**
+    * Times-equals operator for a face index and an integer.
+    */
+   FaceIndex&
+   operator *= (
+      const int rhs);
+
+   /**
+    * Times operator for a face index and an integer.
+    */
+   FaceIndex
+   operator * (
+      const int rhs) const;
+
+   /**
+    * Returns true if two face index objects are equal.  All components
+    * and the corresponding face axes must be the same for equality.
+    */
+   bool
+   operator == (
+      const FaceIndex& rhs) const;
+
+   /**
+    * Returns true if two face index objects are not equal.  Any of
+    * the components or axes may be different for inequality.
+    */
+   bool
+   operator != (
+      const FaceIndex& rhs) const;
+
+   enum {
+      X = 0,
+      Y = 1,
+      Z = 2,
+      Lower = 0,
+      Upper = 1
+   };
+
+private:
+   int d_axis;
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/FaceIndex.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceIntegerConstantRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceIntegerConstantRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,274 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for face-centered int data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceIntegerConstantRefine_C
+#define included_pdat_FaceIntegerConstantRefine_C
+
+#include "SAMRAI/pdat/FaceIntegerConstantRefine.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in refine1d.f:
+void F77_FUNC(conreffaceintg1d, CONREFFACEINTG1D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const int *, int *);
+// in refine2d.f:
+void F77_FUNC(conreffaceintg2d0, CONREFFACEINTG2D0) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const int *, int *);
+void F77_FUNC(conreffaceintg2d1, CONREFFACEINTG2D1) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const int *, int *);
+// in refine3d.f:
+void F77_FUNC(conreffaceintg3d0, CONREFFACEINTG3D0) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const int *, int *);
+void F77_FUNC(conreffaceintg3d1, CONREFFACEINTG3D1) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const int *, int *);
+void F77_FUNC(conreffaceintg3d2, CONREFFACEINTG3D2) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const int *, int *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+FaceIntegerConstantRefine::FaceIntegerConstantRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSTANT_REFINE")
+{
+   d_name_id = "CONSTANT_REFINE";
+}
+
+FaceIntegerConstantRefine::~FaceIntegerConstantRefine()
+{
+}
+
+bool FaceIntegerConstantRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<FaceVariable<int> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+FaceIntegerConstantRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int FaceIntegerConstantRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+FaceIntegerConstantRefine::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void FaceIntegerConstantRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   tbox::Pointer<FaceData<int> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<FaceData<int> >
+   fdata = fine.getPatchData(dst_component);
+
+   const pdat::FaceOverlap* t_overlap =
+      dynamic_cast<const pdat::FaceOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*this, fine, coarse, ratio);
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   for (int axis = 0; axis < dim.getValue(); axis++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(axis);
+
+      for (hier::BoxList::Iterator b(boxes); b; b++) {
+
+         const hier::Box& face_box = b();
+         TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, face_box);
+
+         hier::Box fine_box(dim);
+         for (int i = 0; i < dim.getValue(); i++) {
+            fine_box.lower((axis + i) % dim.getValue()) = face_box.lower(i);
+            fine_box.upper((axis + i) % dim.getValue()) = face_box.upper(i);
+         }
+
+         fine_box.upper(axis) -= 1;
+
+         const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+         const hier::Index ifirstc = coarse_box.lower();
+         const hier::Index ilastc = coarse_box.upper();
+         const hier::Index ifirstf = fine_box.lower();
+         const hier::Index ilastf = fine_box.upper();
+
+         for (int d = 0; d < fdata->getDepth(); d++) {
+            if (dim == tbox::Dimension(1)) {
+               F77_FUNC(conreffaceintg1d, CONREFFACEINTG1D) (
+                  ifirstc(0), ilastc(0),
+                  ifirstf(0), ilastf(0),
+                  cilo(0), cihi(0),
+                  filo(0), fihi(0),
+                  &ratio[0],
+                  cdata->getPointer(0, d),
+                  fdata->getPointer(0, d));
+            } else if (dim == tbox::Dimension(2)) {
+               if (axis == 0) {
+                  F77_FUNC(conreffaceintg2d0, CONREFFACEINTG2D0) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               } else if (axis == 1) {
+                  F77_FUNC(conreffaceintg2d1, CONREFFACEINTG2D1) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d));
+               }
+            } else if (dim == tbox::Dimension(3)) {
+               if (axis == 0) {
+                  F77_FUNC(conreffaceintg3d0, CONREFFACEINTG3D0) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               } else if (axis == 1) {
+                  F77_FUNC(conreffaceintg3d1, CONREFFACEINTG3D1) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d));
+               } else if (axis == 2) {
+                  F77_FUNC(conreffaceintg3d2, CONREFFACEINTG3D2) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(2, d),
+                     fdata->getPointer(2, d));
+               }
+            } else {
+               TBOX_ERROR(
+                  "FaceIntegerConstantRefine::refine() dimension > 3 not supported"
+                  << std::endl);
+            }
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceIntegerConstantRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceIntegerConstantRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,107 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for face-centered integer data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceIntegerConstantRefine
+#define included_pdat_FaceIntegerConstantRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/xfer/RefineOperator.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class FaceIntegerConstantRefine implements constant
+ * interpolation for face-centered integer patch data defined over a
+ * mesh.  It is derived from the xfer::RefineOperator base class.
+ * The numerical operations for interpolation use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is face-centered integer, and the string is "CONSTANT_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class FaceIntegerConstantRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit FaceIntegerConstantRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~FaceIntegerConstantRefine();
+
+   /**
+    * Return true if the variable and name string match face-centered
+    * integer constant interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of face-centered integer constant interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the constant interpolation operator is the vector
+    * of zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the face-centered integer constant
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the boxes contained in fine_overlap.
+    * It is assumed that the coarse patch contains sufficient data for the
+    * stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceIterator.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceIterator.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,19 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Iterator for face centered patch data types 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceIterator_C
+#define included_pdat_FaceIterator_C
+
+#include "SAMRAI/pdat/FaceIterator.h"
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/FaceIterator.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceIterator.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceIterator.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,116 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Iterator for face centered patch data types 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+SAMRAI_INLINE_KEYWORD
+FaceIterator::FaceIterator(
+   const hier::Box& box,
+   const int axis):
+   d_index(box.lower(), axis, FaceIndex::Lower),
+   d_box(FaceGeometry::toFaceBox(box, axis))
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+FaceIterator::FaceIterator(
+   const FaceIterator& iter):
+   d_index(iter.d_index),
+   d_box(iter.d_box)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+FaceIterator&
+FaceIterator::operator = (
+   const FaceIterator& iter)
+{
+   d_index = iter.d_index;
+   d_box = iter.d_box;
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+FaceIterator::~FaceIterator()
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+const FaceIndex& FaceIterator::operator * () const
+{
+   return d_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+const FaceIndex& FaceIterator::operator () () const
+{
+   return d_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+FaceIterator::operator bool () const
+{
+   bool retval = true;
+   for (int i = 0; i < d_box.getDim().getValue(); i++) {
+      if (d_index(i) > d_box.upper(i)) {
+         retval = false;
+         break;
+      }
+   }
+
+   return retval;
+}
+
+#ifndef LACKS_BOOL_VOID_RESOLUTION
+SAMRAI_INLINE_KEYWORD
+FaceIterator::operator const void* () const
+{
+   return FaceIterator::operator bool () ? this : NULL;
+}
+#endif
+
+SAMRAI_INLINE_KEYWORD
+bool FaceIterator::operator ! () const
+{
+   return !FaceIterator::operator bool ();
+}
+
+SAMRAI_INLINE_KEYWORD
+void FaceIterator::operator ++ (
+   int)
+{
+   d_index(0)++;
+   for (int i = 0; i < d_box.getDim().getValue() - 1; i++) {
+      if (d_index(i) > d_box.upper(i)) {
+         d_index(i) = d_box.lower(i);
+         d_index(i + 1)++;
+      } else {
+         break;
+      }
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+bool FaceIterator::operator == (
+   const FaceIterator& iter) const
+{
+   return d_index == iter.d_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool FaceIterator::operator != (
+   const FaceIterator& iter) const
+{
+   return d_index != iter.d_index;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceIterator.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceIterator.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,136 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Iterator for face centered patch data types 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceIterator
+#define included_pdat_FaceIterator
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/FaceGeometry.h"
+#include "SAMRAI/pdat/FaceIndex.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class FaceIterator is an iterator that provides methods for
+ * stepping through the index space associated with a face centered box.
+ * The indices are enumerated in column-major (e.g., Fortran) order.
+ * The iterator should be used as follows:
+ * \verbatim
+ * hier::Box box;
+ * ...
+ * for (FaceIterator c(box, axis); c; c++) {
+ *    // use index c of the box
+ * }
+ * \endverbatim
+ * Note that the face iterator may not compile to efficient code, depending
+ * on your compiler.  Many compilers are not smart enough to optimize the
+ * looping constructs and indexing operations.
+ *
+ * @see pdat::FaceData
+ * @see pdat::FaceGeometry
+ * @see pdat::FaceIndex
+ */
+
+class FaceIterator
+{
+public:
+   /**
+    * Constructor for the face iterator.  The iterator will enumerate
+    * the indices in the argument box.
+    */
+   explicit FaceIterator(
+      const hier::Box& box,
+      const int axis);
+
+   /**
+    * Copy constructor for the face iterator
+    */
+   FaceIterator(
+      const FaceIterator& iterator);
+
+   /**
+    * Assignment operator for the face iterator.
+    */
+   FaceIterator&
+   operator = (
+      const FaceIterator& iterator);
+
+   /**
+    * Destructor for the face iterator.
+    */
+   ~FaceIterator();
+
+   /**
+    * Extract the face index corresponding to the iterator position in the box.
+    */
+   const FaceIndex&
+   operator * () const;
+
+   /**
+    * Extract the face index corresponding to the iterator position in the box.
+    */
+   const FaceIndex&
+   operator () () const;
+
+   /**
+    * Return true if the iterator points to a valid index within the box.
+    */
+   operator bool () const;
+
+#ifndef LACKS_BOOL_VOID_RESOLUTION
+   /**
+    * Return a non-NULL if the iterator points to a valid index within the box.
+    */
+   operator const void
+   * () const;
+#endif
+
+   /**
+    * Return whether the iterator points to a valid index within the box.
+    * This operator mimics the !p operation applied to a pointer p.
+    */
+   bool
+   operator ! () const;
+
+   /**
+    * Increment the iterator to point to the next index in the box.
+    */
+   void
+   operator ++ (
+      int);
+
+   /**
+    * Test two iterators for equality (same index value).
+    */
+   bool
+   operator == (
+      const FaceIterator& iterator) const;
+
+   /**
+    * Test two iterators for inequality (different index values).
+    */
+   bool
+   operator != (
+      const FaceIterator& iterator) const;
+
+private:
+   FaceIndex d_index;
+   hier::Box d_box;
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/FaceIterator.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceOverlap.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceOverlap.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,49 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceOverlap_C
+#define included_pdat_FaceOverlap_C
+
+#include "SAMRAI/pdat/FaceOverlap.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/FaceOverlap.I"
+#endif
+
+namespace SAMRAI {
+namespace pdat {
+
+FaceOverlap::FaceOverlap(
+   const tbox::Array<hier::BoxList>& boxes,
+   const hier::IntVector& src_offset):
+   d_is_overlap_empty(true),
+   d_offset(src_offset)
+{
+   d_dst_boxes.resizeArray(boxes.getSize());
+
+   for (int d = 0; d < src_offset.getDim().getValue(); d++) {
+      d_dst_boxes[d] = boxes[d];
+      if (!d_dst_boxes[d].isEmpty()) d_is_overlap_empty = false;
+   }
+
+}
+
+FaceOverlap::~FaceOverlap()
+{
+}
+
+bool FaceOverlap::isOverlapEmpty() const
+{
+   return d_is_overlap_empty;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceOverlap.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceOverlap.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,33 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+SAMRAI_INLINE_KEYWORD
+const hier::BoxList&
+FaceOverlap::getDestinationBoxList(
+   const int axis) const
+{
+   TBOX_ASSERT((axis >= 0) && (axis < d_dst_boxes.getSize()));
+
+   return d_dst_boxes[axis];
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::IntVector& FaceOverlap::getSourceOffset() const
+{
+   return d_offset;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceOverlap.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceOverlap.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceOverlap
+#define included_pdat_FaceOverlap
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class FaceOverlap represents the intersection between two face
+ * centered geometry boxes.  It is a subclass of hier::BoxOverlap and records
+ * the portions of index space that needs to be copied between two objects
+ * with face centered geometry.
+ *
+ * @see hier::BoxOverlap
+ * @see pdat::FaceOverlap
+ */
+
+class FaceOverlap:public hier::BoxOverlap
+{
+public:
+   /**
+    * The constructor takes the list of boxes and the source offset between
+    * the source and destination index spaces.  This information is used later
+    * in the generation of communication schedules.
+    */
+   explicit FaceOverlap(
+      const tbox::Array<hier::BoxList>& boxes,
+      const hier::IntVector& src_offset);
+   /**
+    * The virtual destructor does nothing interesting except deallocate
+    * box data.
+    */
+   virtual ~FaceOverlap();
+
+   /**
+    * Return whether there is an empty intersection between the two
+    * face centered boxes.  This method over-rides the virtual function
+    * in the hier::BoxOverlap base class.
+    */
+   virtual bool
+   isOverlapEmpty() const;
+
+   /**
+    * Return the list of boxes (in face centered index space) that
+    * constitute the intersection.  The boxes are given in the
+    * destination coordinate space and must be shifted by
+    * -(getSourceOffset()) to lie in the source index space.  The axis
+    * argument represents which axis is desired: X=0, Y=1, and
+    * Z=2. This method over-rides the virtual function in the
+    * hier::BoxOverlap base class.
+    */
+   virtual const hier::BoxList&
+   getDestinationBoxList(
+      const int axis) const;
+
+   /**
+    * Return the offset between the destination and source index spaces.
+    * The destination index space is the source index space shifted
+    * by this amount.
+    */
+   virtual const hier::IntVector&
+   getSourceOffset() const;
+
+private:
+   bool d_is_overlap_empty;
+   hier::IntVector d_offset;
+   tbox::Array<hier::BoxList> d_dst_boxes;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/FaceOverlap.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceVariable.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceVariable.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,91 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceVariable_C
+#define included_pdat_FaceVariable_C
+
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/pdat/FaceDataFactory.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * Constructor and destructor for face variable objects			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+FaceVariable<TYPE>::FaceVariable(
+   const tbox::Dimension& dim,
+   const std::string& name,
+   int depth,
+   const bool fine_boundary_represents_var):
+   hier::Variable(name,
+                  tbox::Pointer<SAMRAI::hier::PatchDataFactory>(new
+                                                                FaceDataFactory
+                                                                <TYPE>(depth,
+                                                                       // default zero ghost cells
+                                                                       hier
+                                                                       ::
+                                                                       IntVector
+                                                                       ::
+                                                                       getZero(
+                                                                          dim),
+                                                                       fine_boundary_represents_var))),
+   d_fine_boundary_represents_var(fine_boundary_represents_var)
+{
+}
+
+template<class TYPE>
+FaceVariable<TYPE>::~FaceVariable()
+{
+}
+
+template<class TYPE>
+int FaceVariable<TYPE>::getDepth() const
+{
+   tbox::Pointer<FaceDataFactory<TYPE> > factory = this->getPatchDataFactory();
+   TBOX_ASSERT(factory);
+   return factory->getDepth();
+}
+
+/*
+ *************************************************************************
+ *									*
+ * These are private and should not be used.  They are defined here	*
+ * because some template instantiation methods fail if some member	*
+ * functions are left undefined.						*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+FaceVariable<TYPE>::FaceVariable(
+   const FaceVariable<TYPE>& foo):
+   hier::Variable(NULL, tbox::Pointer<SAMRAI::hier::PatchDataFactory>(NULL))
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void FaceVariable<TYPE>::operator = (
+   const FaceVariable<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FaceVariable.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FaceVariable.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,109 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceVariable
+#define included_pdat_FaceVariable
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/hier/Variable.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * Class FaceVariable<DIM> is a templated variable class used to define
+ * face-centered quantities on an AMR mesh.   It is a subclass of
+ * hier::Variable and is templated on the type of the underlying data
+ * (e.g., double, int, bool, etc.).
+ *
+ * Note that the indices in the face data arrays are permuted so that
+ * the leading index in each array corresponds to the associated face
+ * normal coordinate direction. See header file for FaceData<DIM> class
+ * for a more detailed description of the data layout.
+ *
+ * IMPORTANT: The class SideVariable<DIM> and associated "side data" classes
+ * define the same storage as this face variable class, except that the
+ * individual array indices are not permuted in the side data type.
+ *
+ * @see pdat::FaceData
+ * @see pdat::FaceDataFactory
+ * @see pdat::FaceGeometry
+ * @see hier::Variable
+ */
+
+template<class TYPE>
+class FaceVariable:public hier::Variable
+{
+public:
+   /*!
+    * @brief Create an face-centered variable object with the given name and
+    * depth (i.e., number of data values at each edge index location).
+    * A default depth of one is provided.   The fine boundary representation
+    * boolean argument indicates which values (either coarse or fine) take
+    * precedence at coarse-fine mesh boundaries during coarsen and refine
+    * operations.  The default is that fine data values take precedence
+    * on coarse-fine interfaces.
+    */
+   explicit FaceVariable(
+      const tbox::Dimension& dim,
+      const std::string& name,
+      int depth = 1,
+      bool fine_boundary_represents_var = true);
+
+   /*!
+    * @brief Virtual destructor for face variable objects.
+    */
+   virtual ~FaceVariable<TYPE>();
+
+   /*!
+    * @brief Return boolean indicating which face data values (coarse
+    * or fine) take precedence at coarse-fine mesh interfaces.  The
+    * value is set in the constructor.
+    */
+   bool fineBoundaryRepresentsVariable() const
+   {
+      return d_fine_boundary_represents_var;
+   }
+
+   /*!
+    * @brief Return true indicating that face data on a patch interior
+    * exists on the patch boundary.
+    */
+   bool dataLivesOnPatchBorder() const {
+      return true;
+   }
+
+   /*!
+    * @brief Return the the depth (number of components).
+    */
+   int
+   getDepth() const;
+
+private:
+   bool d_fine_boundary_represents_var;
+
+   FaceVariable(
+      const FaceVariable<TYPE>&);           // not implemented
+   void
+   operator = (
+      const FaceVariable<TYPE>&);               // not implemented
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/FaceVariable.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FirstLayerCellNoCornersVariableFillPattern.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FirstLayerCellNoCornersVariableFillPattern.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,171 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Fill pattern class to provide interface for stencils 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FirstLayerCellNoCornersVariableFillPattern_C
+#define included_pdat_FirstLayerCellNoCornersVariableFillPattern_C
+
+#include "SAMRAI/pdat/FirstLayerCellNoCornersVariableFillPattern.h"
+
+#include "SAMRAI/pdat/CellGeometry.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+const std::string FirstLayerCellNoCornersVariableFillPattern::s_name_id =
+   "FIRST_LAYER_CELL_NO_CORNERS_FILL_PATTERN";
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor                                                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+FirstLayerCellNoCornersVariableFillPattern::
+FirstLayerCellNoCornersVariableFillPattern(
+   const tbox::Dimension& dim):
+   d_dim(dim)
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destructor                                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+FirstLayerCellNoCornersVariableFillPattern::~
+FirstLayerCellNoCornersVariableFillPattern()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Calculate the overlap according to the desired pattern                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap>
+FirstLayerCellNoCornersVariableFillPattern::calculateOverlap(
+   const hier::BoxGeometry& dst_geometry,
+   const hier::BoxGeometry& src_geometry,
+   const hier::Box& dst_patch_box,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst_patch_box, src_mask, src_offset);
+
+   hier::BoxList stencil_boxes;
+   computeStencilBoxes(stencil_boxes, dst_patch_box);
+
+   return dst_geometry.calculateOverlap(src_geometry,
+      src_mask,
+      overwrite_interior,
+      src_offset,
+      stencil_boxes);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return the stencil width (1)                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+const hier::IntVector& FirstLayerCellNoCornersVariableFillPattern::
+getStencilWidth()
+{
+   return hier::IntVector::getOne(d_dim);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return the string name identifier                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+const std::string& FirstLayerCellNoCornersVariableFillPattern::getPatternName()
+const
+{
+   return s_name_id;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute the boxes for the stencil around a given patch box            *
+ *                                                                       *
+ *************************************************************************
+ */
+void FirstLayerCellNoCornersVariableFillPattern::computeStencilBoxes(
+   hier::BoxList& stencil_boxes,
+   const hier::Box& dst_box) const
+{
+   TBOX_ASSERT(stencil_boxes.size() == 0);
+
+   const tbox::Dimension& dim = dst_box.getDim();
+
+   for (unsigned short i = 0; i < dim.getValue(); i++) {
+      hier::Box low_box(dst_box);
+      low_box.lower(i) = dst_box.lower(i) - 1;
+      low_box.upper(i) = low_box.lower(i);
+      stencil_boxes.addItem(low_box);
+
+      hier::Box high_box(dst_box);
+      high_box.lower(i) = dst_box.upper(i) + 1;
+      high_box.upper(i) = high_box.lower(i);
+      stencil_boxes.addItem(high_box);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute BoxOverlap that specifies data to be filled by refinement     *
+ * operator.                                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+tbox::Pointer<hier::BoxOverlap>
+FirstLayerCellNoCornersVariableFillPattern::computeFillBoxesOverlap(
+   const hier::BoxList& fill_boxes,
+   const hier::Box& patch_box,
+   const hier::Box& data_box,
+   const hier::PatchDataFactory& pdf) const
+{
+   NULL_USE(pdf);
+
+   hier::BoxList stencil_boxes;
+   computeStencilBoxes(stencil_boxes, patch_box);
+
+   hier::BoxList overlap_boxes(fill_boxes);
+   overlap_boxes.intersectBoxes(data_box);
+   overlap_boxes.intersectBoxes(stencil_boxes);
+
+   hier::BoxOverlap* overlap =
+      new pdat::CellOverlap(
+         overlap_boxes,
+         hier::IntVector::getZero(patch_box.getDim()));
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FirstLayerCellNoCornersVariableFillPattern.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FirstLayerCellNoCornersVariableFillPattern.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,160 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   First layer cell fill pattern class 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FirstLayerCellNoCornersFillPattern
+#define included_pdat_FirstLayerCellNoCornersVariableFillPattern
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/xfer/VariableFillPattern.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * @brief Class FirstLayerCellNoCornersVariableFillPattern is a concrete
+ * implementation of the abstract base class VariableFillPattern.
+ *
+ * It is used to calculate overlaps according to a pattern which limits the
+ * overlaps to the cell-centered ghost region of width 1 surrounding a patch,
+ * excluding all edges and corners.
+ */
+
+class FirstLayerCellNoCornersVariableFillPattern:
+   public xfer::VariableFillPattern
+{
+public:
+   /*!
+    * @brief Constructor
+    *
+    * @param[in] dim     Dimension
+    */
+   explicit FirstLayerCellNoCornersVariableFillPattern(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Destructor
+    */
+   virtual ~FirstLayerCellNoCornersVariableFillPattern();
+
+   /*!
+    * @brief Calculate overlap between the destination and source geometries
+    * representing the fill pattern.
+    *
+    * This will return the portion of the intersection of the geometries
+    * that lies in the ghost region of width 1 surrounding the patch,
+    * excluding all edges and corners.  The patch is identified by the
+    * argument dst_patch_box.
+    *
+    * @param[in] dst_geometry    geometry object for destination box
+    * @param[in] src_geometry    geometry object for source box
+    * @param[in] dst_patch_box   box for the destination patch
+    * @param[in] src_mask        the source mask, the box resulting from
+    *                            shifting the source box by src_offset
+    * @param[in] overwrite_interior  controls whether or not to include the
+    *                                destination box interior in the overlap.
+    *                                This has no effect in this implementation,
+    *                                since all calculated overlaps will be
+    *                                on the destination box exterior.
+    * @param[in] src_offset      the offset between source and destination
+    *                            index space.  src + src_offset = dst
+    *
+    * @return                Pointer to the calculated overlap object
+    */
+   tbox::Pointer<hier::BoxOverlap>
+   calculateOverlap(
+      const hier::BoxGeometry& dst_geometry,
+      const hier::BoxGeometry& src_geometry,
+      const hier::Box& dst_patch_box,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset) const;
+
+   /*!
+    * @brief Computes a BoxOverlap object which defines the space to be filled
+    * by a refinement operation.
+    *
+    * For this implementation, that space is the intersection between
+    * fill_boxes (computed by the RefineSchedule), data_box, which specifies
+    * the extent of the destination data, and the first-layer ghost region
+    * that defines the stencil of this fill pattern.
+    *
+    * @param[in] fill_boxes  list representing the all of the space on a patch
+    *                        or its ghost region that may be filled by a
+    *                        refine operator (cell-centered represtentation)
+    * @param[in] patch_box   box representing the patch where a refine operator
+    *                        will fill data.  (cell-centered representation)
+    * @param[in] data box    box representing the full extent of the region
+    *                        covered by a patch data object, including all
+    *                        ghosts (cell-centered representation)
+    * @param[in] pdf         patch data factory for the data that is to be
+    *                        filled
+    */
+   tbox::Pointer<hier::BoxOverlap>
+   computeFillBoxesOverlap(
+      const hier::BoxList& fill_boxes,
+      const hier::Box& patch_box,
+      const hier::Box& data_box,
+      const hier::PatchDataFactory& pdf) const;
+
+   /*!
+    * @brief Returns the stencil width of 1 in all directions.
+    */
+   const hier::IntVector&
+   getStencilWidth();
+
+   /*!
+    * @brief Returns a string name identifier
+    * "FIRST_LAYER_CELL_NO_CORNERS_FILL_PATTERN".
+    */
+   const std::string&
+   getPatternName() const;
+
+private:
+   FirstLayerCellNoCornersVariableFillPattern(
+      const FirstLayerCellNoCornersVariableFillPattern&);    // not implemented
+   void
+   operator = (
+      const FirstLayerCellNoCornersVariableFillPattern&);    // not implemented
+
+   /*!
+    * @brief Computes a BoxList defining the stencil around a given box
+    * for this fill pattern
+    *
+    * The computed BoxList will cover a ghost region of width 1 around dst_box,
+    * excluding any edges or corners.
+    *
+    * @param[out] stencil_boxes   The computed stencil BoxList.
+    * @param[in]  dst_box         Input box around which stencil is computed.
+    */
+   void
+   computeStencilBoxes(
+      hier::BoxList& stencil_boxes,
+      const hier::Box& dst_box) const;
+
+   /*!
+    * @brief The dimension of this object.
+    */
+   const tbox::Dimension d_dim;
+
+   /*!
+    * @brief Static string holding name identifier for this class.
+    */
+   static const std::string s_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FirstLayerCellVariableFillPattern.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FirstLayerCellVariableFillPattern.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,156 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Fill pattern class to provide interface for stencils 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FirstLayerCellVariableFillPattern_C
+#define included_pdat_FirstLayerCellVariableFillPattern_C
+
+#include "SAMRAI/pdat/FirstLayerCellVariableFillPattern.h"
+
+#include "SAMRAI/pdat/CellGeometry.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+const std::string FirstLayerCellVariableFillPattern::s_name_id =
+   "FIRST_LAYER_CELL_FILL_PATTERN";
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor                                                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+FirstLayerCellVariableFillPattern::FirstLayerCellVariableFillPattern(
+   const tbox::Dimension& dim):
+   d_dim(dim)
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Destructor								*
+ *                                                                       *
+ *************************************************************************
+ */
+
+FirstLayerCellVariableFillPattern::~FirstLayerCellVariableFillPattern()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Calculate the overlap according to the desired pattern                *
+ *                                                                       *
+ *************************************************************************
+ */
+tbox::Pointer<hier::BoxOverlap>
+FirstLayerCellVariableFillPattern::calculateOverlap(
+   const hier::BoxGeometry& dst_geometry,
+   const hier::BoxGeometry& src_geometry,
+   const hier::Box& dst_patch_box,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst_patch_box, src_mask, src_offset);
+
+   hier::BoxList stencil_boxes;
+   computeStencilBoxes(stencil_boxes, dst_patch_box);
+
+   return dst_geometry.calculateOverlap(src_geometry,
+      src_mask,
+      overwrite_interior,
+      src_offset,
+      stencil_boxes);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return the stencil width (1)                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+const hier::IntVector& FirstLayerCellVariableFillPattern::getStencilWidth()
+{
+   return hier::IntVector::getOne(d_dim);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return the string name identifier                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+const std::string& FirstLayerCellVariableFillPattern::getPatternName() const
+{
+   return s_name_id;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute the boxes for the stencil around a given patch box            *
+ *                                                                       *
+ *************************************************************************
+ */
+void FirstLayerCellVariableFillPattern::computeStencilBoxes(
+   hier::BoxList& stencil_boxes,
+   const hier::Box& dst_box) const
+{
+   TBOX_ASSERT(stencil_boxes.size() == 0);
+
+   hier::Box ghost_box(
+      hier::Box::grow(dst_box,
+         hier::IntVector::getOne(dst_box.getDim())));
+   stencil_boxes.removeIntersections(ghost_box, dst_box);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute BoxOverlap that specifies data to be filled by refinement     *
+ * operator.                                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+tbox::Pointer<hier::BoxOverlap>
+FirstLayerCellVariableFillPattern::computeFillBoxesOverlap(
+   const hier::BoxList& fill_boxes,
+   const hier::Box& patch_box,
+   const hier::Box& data_box,
+   const hier::PatchDataFactory& pdf) const
+{
+   NULL_USE(pdf);
+
+   hier::BoxList stencil_boxes;
+   computeStencilBoxes(stencil_boxes, patch_box);
+
+   hier::BoxList overlap_boxes(fill_boxes);
+   overlap_boxes.intersectBoxes(data_box);
+   overlap_boxes.intersectBoxes(stencil_boxes);
+
+   hier::BoxOverlap* overlap =
+      new pdat::CellOverlap(
+         overlap_boxes,
+         hier::IntVector::getZero(patch_box.getDim()));
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FirstLayerCellVariableFillPattern.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FirstLayerCellVariableFillPattern.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,158 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   1Z fill pattern class 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FirstLayerCellVariableFillPattern
+#define included_pdat_FirstLayerCellVariableFillPattern
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/xfer/VariableFillPattern.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+
+/*!
+ * @brief Class FirstLayerCellVariableFillPattern is a concrete
+ * implementation of the abstract base class VariableFillPattern.
+ *
+ * It is used to calculate overlaps according to a pattern which limits the
+ * overlaps to the cell-centered ghost region of width 1 surrounding a patch,
+ * including all edges and corners.
+ */
+
+class FirstLayerCellVariableFillPattern:
+   public xfer::VariableFillPattern
+{
+public:
+   /*!
+    * @brief Constructor
+    *
+    * @param[in] dim     Dimension
+    */
+   explicit FirstLayerCellVariableFillPattern(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Destructor
+    */
+   virtual ~FirstLayerCellVariableFillPattern();
+
+   /*!
+    * @brief Calculate overlap between the destination and source geometries
+    * according to the fill pattern.
+    *
+    * This will return the portion of the intersection of the geometries
+    * that lies in the ghost region of width 1 surrounding the patch.
+    * The patch is identified by the argument dst_patch_box.
+    *
+    * @param[in] dst_geometry    geometry object for destination box
+    * @param[in] src_geometry    geometry object for source box
+    * @param[in] dst_patch_box   box for the destination patch
+    * @param[in] src_mask        the source mask, the box resulting from
+    *                            shifting the source box by src_offset
+    * @param[in] overwrite_interior  controls whether or not to include the
+    *                                destination box interior in the overlap.
+    *                                This has no effect in this implementation,
+    *                                since all calculated overlaps will be
+    *                                on the destination box exterior.
+    * @param[in] src_offset      the offset between source and destination
+    *                            index space.  src + src_offset = dst
+    *
+    * @return                Pointer to the calculated overlap object
+    */
+   tbox::Pointer<hier::BoxOverlap>
+   calculateOverlap(
+      const hier::BoxGeometry& dst_geometry,
+      const hier::BoxGeometry& src_geometry,
+      const hier::Box& dst_patch_box,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset) const;
+
+   /*!
+    * @brief Computes a BoxOverlap object which defines the space to be filled
+    * by a refinement operation.
+    *
+    * For this implementation, that space is the intersection between
+    * fill_boxes (computed by the RefineSchedule), data_box, which specifies
+    * the extent of the destination data, and the first-layer ghost region
+    * that defines the stencil of this fill pattern.
+    *
+    * @param[in] fill_boxes  list representing the all of the space on a patch
+    *                        or its ghost region that may be filled by a
+    *                        refine operator (cell-centered represtentation)
+    * @param[in] patch_box   box representing the patch where a refine operator
+    *                        will fill data.  (cell-centered representation)
+    * @param[in] data box    box representing the full extent of the region
+    *                        covered by a patch data object, including all
+    *                        ghosts (cell-centered representation)
+    * @param[in] pdf         patch data factory for the data that is to be
+    *                        filled
+    */
+   tbox::Pointer<hier::BoxOverlap>
+   computeFillBoxesOverlap(
+      const hier::BoxList& fill_boxes,
+      const hier::Box& patch_box,
+      const hier::Box& data_box,
+      const hier::PatchDataFactory& pdf) const;
+
+   /*!
+    * @brief Returns the stencil width of 1 in all directions.
+    */
+   const hier::IntVector&
+   getStencilWidth();
+
+   /*!
+    * @brief Returns a string name identifier "FIRST_LAYER_CELL_FILL_PATTERN".
+    */
+   const std::string&
+   getPatternName() const;
+
+private:
+   FirstLayerCellVariableFillPattern(
+      const FirstLayerCellVariableFillPattern&);    // not implemented
+   void
+   operator = (
+      const FirstLayerCellVariableFillPattern&);    // not implemented
+
+   /*!
+    * @brief Computes a BoxList defining the stencil around a given box
+    * for this fill pattern
+    *
+    * The computed BoxList will cover a ghost region of width 1 around dst_box.
+    *
+    * @param[out] stencil_boxes   The computed stencil BoxList.
+    * @param[in]  dst_box         Input box around which stencil is computed.
+    */
+   void
+   computeStencilBoxes(
+      hier::BoxList& stencil_boxes,
+      const hier::Box& dst_box) const;
+
+   /*!
+    * @brief The dimension of this object.
+    */
+   const tbox::Dimension d_dim;
+
+   /*!
+    * @brief Static string holding name identifier for this class.
+    */
+   static const std::string s_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FirstLayerNodeVariableFillPattern.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FirstLayerNodeVariableFillPattern.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,193 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Fill pattern class to provide interface for stencils 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FirstLayerNodeVariableFillPattern_C
+#define included_pdat_FirstLayerNodeVariableFillPattern_C
+
+#include "SAMRAI/pdat/FirstLayerNodeVariableFillPattern.h"
+
+#include "SAMRAI/pdat/NodeGeometry.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+const std::string FirstLayerNodeVariableFillPattern::s_name_id =
+   "FIRST_LAYER_NODE_FILL_PATTERN";
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor                                                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+FirstLayerNodeVariableFillPattern::FirstLayerNodeVariableFillPattern(
+   const tbox::Dimension& dim):
+   d_dim(dim)
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destructor                                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+FirstLayerNodeVariableFillPattern::~FirstLayerNodeVariableFillPattern()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Calculate the overlap according to the desired pattern                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap>
+FirstLayerNodeVariableFillPattern::calculateOverlap(
+   const hier::BoxGeometry& dst_geometry,
+   const hier::BoxGeometry& src_geometry,
+   const hier::Box& dst_patch_box,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst_patch_box, src_mask, src_offset);
+
+   hier::BoxList stencil_boxes;
+   computeStencilBoxes(stencil_boxes, dst_patch_box);
+
+   hier::BoxList dst_boxes;
+
+   const NodeGeometry* t_dst =
+      dynamic_cast<const NodeGeometry *>(&dst_geometry);
+   const NodeGeometry* t_src =
+      dynamic_cast<const NodeGeometry *>(&src_geometry);
+
+   TBOX_ASSERT(t_dst);
+   TBOX_ASSERT(t_src);
+
+   t_dst->computeDestinationBoxes(dst_boxes, *t_src, src_mask,
+      overwrite_interior, src_offset);
+
+   dst_boxes.intersectBoxes(stencil_boxes);
+
+   hier::BoxOverlap* overlap = new NodeOverlap(dst_boxes, src_offset);
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return the stencil width (0)                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+const hier::IntVector& FirstLayerNodeVariableFillPattern::getStencilWidth()
+{
+   return hier::IntVector::getZero(d_dim);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return the string name identifier                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+const std::string& FirstLayerNodeVariableFillPattern::getPatternName() const
+{
+   return s_name_id;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute the boxes for the stencil around a given patch box            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void FirstLayerNodeVariableFillPattern::computeStencilBoxes(
+   hier::BoxList& stencil_boxes,
+   const hier::Box& dst_box) const
+{
+   TBOX_ASSERT(stencil_boxes.size() == 0);
+
+   hier::Box dst_node_box(pdat::NodeGeometry::toNodeBox(dst_box));
+   hier::Box interior_node_box(dst_node_box);
+   interior_node_box.grow(hier::IntVector(dst_box.getDim(), -1));
+
+   stencil_boxes.removeIntersections(dst_node_box, interior_node_box);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute BoxOverlap that specifies data to be filled by refinement     *
+ * operator.                                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap>
+FirstLayerNodeVariableFillPattern::computeFillBoxesOverlap(
+   const hier::BoxList& fill_boxes,
+   const hier::Box& patch_box,
+   const hier::Box& data_box,
+   const hier::PatchDataFactory& pdf) const
+{
+   NULL_USE(pdf);
+
+   hier::BoxList stencil_boxes;
+   computeStencilBoxes(stencil_boxes, patch_box);
+
+   hier::BoxList overlap_boxes(fill_boxes);
+
+   /*
+    * This is the equivalent of converting every box in overlap_boxes
+    * to a node centering, which must be done before intersecting with
+    * stencil_boxes, which is node-centered.
+    */
+   for (hier::BoxList::Iterator b(overlap_boxes); b; b++) {
+      b().growUpper(hier::IntVector::getOne(patch_box.getDim()));
+   }
+
+   overlap_boxes.intersectBoxes(pdat::NodeGeometry::toNodeBox(data_box));
+
+   overlap_boxes.intersectBoxes(stencil_boxes);
+
+   /*
+    * We need to coalesce the boxes to prevent redundant nodes in the
+    * overlap, which can produce erroneous results accumulation
+    * communication.
+    */
+
+   overlap_boxes.coalesceBoxes();
+
+   hier::BoxOverlap* overlap =
+      new pdat::NodeOverlap(
+         overlap_boxes,
+         hier::IntVector::getZero(patch_box.getDim()));
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/FirstLayerNodeVariableFillPattern.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/FirstLayerNodeVariableFillPattern.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,160 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   First layer node fill pattern class 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FirstLayerNodeVariableFillPattern
+#define included_pdat_FirstLayerNodeVariableFillPattern
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/xfer/VariableFillPattern.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+
+/*!
+ * @brief Class FirstLayerNodeVariableFillPattern is a concrete
+ * implementation of the abstract base class VariableFillPattern.
+ *
+ * It is used to calculate overlaps according to a pattern which limits the
+ * overlaps to the first layer of boundary nodes, that is the nodes that
+ * lie on the patch boundary.
+ */
+
+class FirstLayerNodeVariableFillPattern:
+   public xfer::VariableFillPattern
+{
+public:
+   /*!
+    * @brief Constructor
+    *
+    * @param[in] dim     Dimension
+    */
+   explicit FirstLayerNodeVariableFillPattern(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Destructor
+    */
+   virtual ~FirstLayerNodeVariableFillPattern();
+
+   /*!
+    * @brief Calculate overlaps between the destination and source geometries
+    * according to the fill pattern.
+    *
+    * This will return the portion of the intersection of the node geometries
+    * that lies on the boundary of the patch.  The patch is identified by
+    * the argument dst_patch_box.  The argument overwrite_interior should be
+    * set to true, since the stencil defined by this class consists of
+    * boundary nodes, which SAMRAI by convention considers to be part of the
+    * patch interior.  If overwrite_interior is false, then the returned
+    * BoxOverlap will be empty.
+    *
+    * @param[in] dst_geometry    geometry object for destination box
+    * @param[in] src_geometry    geometry object for source box
+    * @param[in] dst_patch_box   box for the destination patch
+    * @param[in] src_mask        the source mask, the box resulting from
+    *                            shifting the source box by src_offset
+    * @param[in] overwrite_interior  controls whether or not to include the
+    *                                destination box interior in the overlap.
+    * @param[in] src_offset      the offset between source and destination
+    *                            index space.  src + src_offset = dst
+    *
+    * @return                Pointer to the calculated overlap object
+    */
+   tbox::Pointer<hier::BoxOverlap>
+   calculateOverlap(
+      const hier::BoxGeometry& dst_geometry,
+      const hier::BoxGeometry& src_geometry,
+      const hier::Box& dst_patch_box,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset) const;
+
+   /*!
+    * @brief Computes a BoxOverlap object which defines the space to be filled
+    * by a refinement operation.
+    *
+    * For this implementation, that space is the node-centered intersection
+    * between fill_boxes, (computed by the RefineSchedule), data_box, which
+    * specifies the extent of the destination data, and the boundary nodes
+    * that define the stencil of this fill pattern.
+    *
+    * @param[in] fill_boxes  list representing the all of the space on a patch
+    *                        or its ghost region that may be filled by a
+    *                        refine operator (cell-centered represtentation)
+    * @param[in] patch_box   box representing the patch where a refine operator
+    *                        will fill data.  (cell-centered representation)
+    * @param[in] data box    box representing the full extent of the region
+    *                        covered by a patch data object, including all
+    *                        ghosts (cell-centered representation)
+    * @param[in] pdf         patch data factory for the data that is to be
+    *                        filled
+    */
+   tbox::Pointer<hier::BoxOverlap>
+   computeFillBoxesOverlap(
+      const hier::BoxList& fill_boxes,
+      const hier::Box& patch_box,
+      const hier::Box& data_box,
+      const hier::PatchDataFactory& pdf) const;
+
+   /*!
+    * @brief Returns the stencil width of 0 in all directions.
+    */
+   const hier::IntVector&
+   getStencilWidth();
+
+   /*!
+    * @brief Returns a string name identifier "FIRST_LAYER_NODE_FILL_PATTERN".
+    */
+   const std::string&
+   getPatternName() const;
+
+private:
+   FirstLayerNodeVariableFillPattern(
+      const FirstLayerNodeVariableFillPattern&);    // not implemented
+   void
+   operator = (
+      const FirstLayerNodeVariableFillPattern&);    // not implemented
+
+   /*!
+    * @brief Computes a BoxList defining the stencil around a given box
+    * for this fill pattern
+    *
+    * The computed BoxList will consist of node-centered boxes representing
+    * the nodes on the boundary of the box.
+    *
+    * @param[out] stencil_boxes   The computed stencil BoxList.
+    * @param[in]  dst_box         Input box around which stencil is computed.
+    */
+   void
+   computeStencilBoxes(
+      hier::BoxList& stencil_boxes,
+      const hier::Box& dst_box) const;
+
+   /*!
+    * @brief The dimension of this object.
+    */
+   const tbox::Dimension d_dim;
+
+   /*!
+    * @brief Static string holding name identifier for this class.
+    */
+   static const std::string s_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/IndexData.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/IndexData.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,821 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_IndexData_C
+#define included_pdat_IndexData_C
+
+#include "SAMRAI/pdat/IndexData.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/IOStream.h"
+
+#define PDAT_INDEXDATA_VERSION 1
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/IndexData.I"
+#endif
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * The constructor for the irregular grid object simply initializes the	*
+ * irregular data list to be null (this is done implicitly).		*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE, class BOX_GEOMETRY>
+IndexData<TYPE, BOX_GEOMETRY>::IndexData(
+   const hier::Box& box,
+   const hier::IntVector& ghosts):
+   hier::PatchData(box, ghosts),
+   d_dim(box.getDim()),
+   d_data(hier::PatchData::getGhostBox().size()),
+   d_list_head(NULL),
+   d_list_tail(NULL),
+   d_number_items(0)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(box, ghosts);
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+IndexData<TYPE, BOX_GEOMETRY>::~IndexData()
+{
+   removeAllItems();
+}
+
+/*
+ *************************************************************************
+ *									*
+ * The following are private and cannot be used, but they are defined	*
+ * here for compilers that require that every template declaration have	*
+ * a definition (a stupid requirement, if you ask me).			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE, class BOX_GEOMETRY>
+IndexData<TYPE, BOX_GEOMETRY>::IndexData(
+   const IndexData<TYPE, BOX_GEOMETRY>& foo):
+   hier::PatchData(foo.getBox(), foo.getGhostCellWidth()),
+   d_dim(foo.getDim())
+{
+
+   // private and not used (but included for some compilers)
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+void IndexData<TYPE, BOX_GEOMETRY>::operator = (
+   const IndexData<TYPE, BOX_GEOMETRY>& foo)
+{
+   // private and not used (but included for some compilers)
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Copy into dst where src overlaps on interiors.			*
+ *									*
+ *************************************************************************
+ */
+template<class TYPE, class BOX_GEOMETRY>
+void IndexData<TYPE, BOX_GEOMETRY>::copy(
+   const hier::PatchData& src)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   const IndexData<TYPE, BOX_GEOMETRY>* t_src =
+      dynamic_cast<const IndexData<TYPE, BOX_GEOMETRY> *>(&src);
+
+   TBOX_ASSERT(t_src != NULL);
+
+   const hier::Box& src_ghost_box = t_src->getGhostBox();
+   removeInsideBox(src_ghost_box);
+   for (typename IndexData<TYPE, BOX_GEOMETRY>::Iterator
+        s(*t_src);
+        s;
+        s++) {
+      if (this->getGhostBox().contains(s.getNode().d_index)) {
+         appendItem(s.getNode().d_index, *s.getNode().d_item);
+      }
+   }
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+void IndexData<TYPE, BOX_GEOMETRY>::copy2(
+   hier::PatchData& dst) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   dst.copy(*this);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Copy data from the source into the destination according to the	*
+ * overlap descriptor.							*
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE, class BOX_GEOMETRY>
+void IndexData<TYPE, BOX_GEOMETRY>::copy(
+   const hier::PatchData& src,
+   const hier::BoxOverlap& overlap)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   const IndexData<TYPE, BOX_GEOMETRY>* t_src =
+      dynamic_cast<const IndexData<TYPE, BOX_GEOMETRY> *>(&src);
+   const typename BOX_GEOMETRY::Overlap * t_overlap =
+      dynamic_cast<const typename BOX_GEOMETRY::Overlap *>(&overlap);
+
+   TBOX_ASSERT(t_src != NULL);
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::IntVector& src_offset(t_overlap->getSourceOffset());
+   const hier::BoxList& box_list = t_overlap->getDestinationBoxList();
+   const hier::Box& src_ghost_box = t_src->getGhostBox();
+
+   for (hier::BoxList::Iterator b(box_list); b; b++) {
+      const hier::Box& dst_box = b();
+      const hier::Box src_box(hier::Box::shift(b(), -src_offset));
+      removeInsideBox(dst_box);
+      for (typename IndexData<TYPE, BOX_GEOMETRY>::Iterator s(*t_src);
+           s;
+           s++) {
+         if (src_box.contains(s.getNode().d_index)) {
+            TYPE new_item;
+            new_item.copySourceItem(
+               s.getNode().d_index,
+               src_offset,
+               *(t_src->d_data[src_ghost_box.offset(s.getNode().d_index)]->
+                 d_item));
+            appendItem(s.getNode().d_index + src_offset, new_item);
+         }
+      }
+   }
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+void IndexData<TYPE, BOX_GEOMETRY>::copy2(
+   hier::PatchData& dst,
+   const hier::BoxOverlap& overlap) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   dst.copy(*this, overlap);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Calculate the buffer space needed to pack/unpack messages on the box	*
+ * region using the overlap descriptor.					*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE, class BOX_GEOMETRY>
+bool IndexData<TYPE, BOX_GEOMETRY>::canEstimateStreamSizeFromBox() const
+{
+   return false;
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+int IndexData<TYPE, BOX_GEOMETRY>::getDataStreamSize(
+   const hier::BoxOverlap& overlap) const
+{
+   const typename BOX_GEOMETRY::Overlap * t_overlap =
+      dynamic_cast<const typename BOX_GEOMETRY::Overlap *>(&overlap);
+   TBOX_ASSERT(t_overlap != NULL);
+
+   size_t bytes = 0;
+   int num_items = 0;
+   const hier::BoxList& boxes = t_overlap->getDestinationBoxList();
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      hier::Box box = hier::PatchData::getBox()
+         * hier::Box::shift(b(), -(t_overlap->getSourceOffset()));
+      for (hier::Box::Iterator index(box); index; index++) {
+         TYPE* item = getItem(index());
+         if (item) {
+            num_items++;
+            bytes += item->getDataStreamSize();
+         }
+      }
+   }
+   const int index_size = d_dim.getValue() * tbox::MessageStream::getSizeof<int>();
+   bytes += (num_items * index_size + tbox::MessageStream::getSizeof<int>());
+   return static_cast<int>(bytes);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Pack/unpack data into/out of the message streams using the index	*
+ * space in the overlap descriptor.					*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE, class BOX_GEOMETRY>
+void IndexData<TYPE, BOX_GEOMETRY>::packStream(
+   tbox::MessageStream& stream,
+   const hier::BoxOverlap& overlap) const
+{
+   const typename BOX_GEOMETRY::Overlap * t_overlap =
+      dynamic_cast<const typename BOX_GEOMETRY::Overlap *>(&overlap);
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::BoxList& boxes = t_overlap->getDestinationBoxList();
+   int num_items = 0;
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      hier::Box box = hier::PatchData::getBox()
+         * hier::Box::shift(b(), -(t_overlap->getSourceOffset()));
+      for (typename IndexData<TYPE, BOX_GEOMETRY>::Iterator s(*this); s; s++) {
+         if (box.contains(s.getNode().d_index)) {
+            num_items++;
+         }
+      }
+   }
+
+   stream << num_items;
+
+   for (hier::BoxList::Iterator c(boxes); c; c++) {
+      hier::Box box = hier::PatchData::getBox()
+         * hier::Box::shift(c(), -(t_overlap->getSourceOffset()));
+      for (typename IndexData<TYPE, BOX_GEOMETRY>::Iterator t(*this); t; t++) {
+         if (box.contains(t.getNode().d_index)) {
+            TYPE* item = &t();
+            TBOX_ASSERT(item != NULL);
+
+            int index_buf[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+            for (int i = 0; i < d_dim.getValue(); i++) {
+               index_buf[i] = t.getNode().d_index(i);
+            }
+            stream.pack(index_buf, d_dim.getValue());
+            item->packStream(stream);
+         }
+      }
+   }
+
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+void IndexData<TYPE, BOX_GEOMETRY>::unpackStream(
+   tbox::MessageStream& stream,
+   const hier::BoxOverlap& overlap)
+{
+   const typename BOX_GEOMETRY::Overlap * t_overlap =
+      dynamic_cast<const typename BOX_GEOMETRY::Overlap *>(&overlap);
+   TBOX_ASSERT(t_overlap != NULL);
+
+   int num_items;
+   stream >> num_items;
+
+   const hier::BoxList& boxes = t_overlap->getDestinationBoxList();
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      removeInsideBox(b());
+   }
+
+   int i;
+   TYPE* items = new TYPE[num_items];
+   for (i = 0; i < num_items; i++) {
+      int index_buf[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      stream.unpack(index_buf, d_dim.getValue());
+      hier::Index index(d_dim);
+      for (int j = 0; j < d_dim.getValue(); j++) {
+         index(j) = index_buf[j];
+      }
+      (items + i)->unpackStream(stream, t_overlap->getSourceOffset());
+      addItem(index + (t_overlap->getSourceOffset()), items[i]);
+   }
+   delete[] items;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * tbox::List manipulation stuff.						*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE, class BOX_GEOMETRY>
+void IndexData<TYPE, BOX_GEOMETRY>::appendItem(
+   const hier::Index& index,
+   const TYPE& item)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, index);
+   TBOX_ASSERT(hier::PatchData::getGhostBox().contains(index));
+
+   int offset = hier::PatchData::getGhostBox().offset(index);
+   TBOX_ASSERT(offset >= 0 && offset <= hier::PatchData::getGhostBox().size());
+
+   if (isElement(offset)) {
+      removeItem(offset);
+   }
+
+   TYPE* new_item = new TYPE();
+   TBOX_ASSERT(new_item != NULL);
+
+   *new_item = item;
+   addItemToList(index, offset, *new_item);
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+void IndexData<TYPE, BOX_GEOMETRY>::appendItemPointer(
+   const hier::Index& index,
+   TYPE* item)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, index);
+   TBOX_ASSERT(hier::PatchData::getGhostBox().contains(index));
+
+   int offset = hier::PatchData::getGhostBox().offset(index);
+   TBOX_ASSERT(offset >= 0 && offset <= hier::PatchData::getGhostBox().size());
+
+   if (isElement(offset)) {
+      removeItem(offset);
+   }
+   appendItemToList(index, offset, *item);
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+void IndexData<TYPE, BOX_GEOMETRY>::addItem(
+   const hier::Index& index,
+   const TYPE& item)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, index);
+   TBOX_ASSERT(hier::PatchData::getGhostBox().contains(index));
+
+   int offset = hier::PatchData::getGhostBox().offset(index);
+   TBOX_ASSERT(offset >= 0 && offset <= hier::PatchData::getGhostBox().size());
+
+   if (isElement(offset)) {
+      removeItem(offset);
+   }
+   TYPE* new_item = new TYPE();
+   TBOX_ASSERT(new_item != NULL);
+
+   *new_item = item;
+   addItemToList(index, offset, *new_item);
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+void IndexData<TYPE, BOX_GEOMETRY>::addItemPointer(
+   const hier::Index& index,
+   TYPE* item)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, index);
+   TBOX_ASSERT(hier::PatchData::getGhostBox().contains(index));
+
+   int offset = hier::PatchData::getGhostBox().offset(index);
+   TBOX_ASSERT(offset >= 0 && offset <= hier::PatchData::getGhostBox().size());
+
+   if (isElement(offset)) {
+      removeItem(offset);
+   }
+   addItemToList(index, offset, *item);
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+void IndexData<TYPE, BOX_GEOMETRY>::replaceAddItem(
+   const hier::Index& index,
+   const TYPE& item)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, index);
+   TBOX_ASSERT(hier::PatchData::getGhostBox().contains(index));
+
+   int offset = hier::PatchData::getGhostBox().offset(index);
+   TBOX_ASSERT(offset >= 0 && offset <= hier::PatchData::getGhostBox().size());
+
+   IndexDataNode<TYPE, BOX_GEOMETRY>* node = d_data[offset];
+
+   TYPE* new_item = new TYPE();
+   TBOX_ASSERT(new_item != NULL);
+
+   *new_item = item;
+
+   if (node == NULL) {
+
+      addItemToList(index, offset, *new_item);
+
+   } else {
+      delete node->d_item;
+
+      node->d_item = new_item;
+   }
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+void IndexData<TYPE, BOX_GEOMETRY>::replaceAddItemPointer(
+   const hier::Index& index,
+   TYPE* item)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, index);
+   TBOX_ASSERT(hier::PatchData::getGhostBox().contains(index));
+
+   int offset = hier::PatchData::getGhostBox().offset(index);
+   TBOX_ASSERT(offset >= 0 && offset <= hier::PatchData::getGhostBox().size());
+
+   IndexDataNode<TYPE, BOX_GEOMETRY>* node = d_data[offset];
+
+   if (node == NULL) {
+
+      addItemToList(index, offset, *item);
+
+   } else {
+
+      delete node->d_item;
+
+      node->d_item = item;
+   }
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+void IndexData<TYPE, BOX_GEOMETRY>::replaceAppendItem(
+   const hier::Index& index,
+   const TYPE& item)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, index);
+   TBOX_ASSERT(hier::PatchData::getGhostBox().contains(index));
+
+   int offset = hier::PatchData::getGhostBox().offset(index);
+   TBOX_ASSERT(offset >= 0 && offset <= hier::PatchData::getGhostBox().size());
+
+   IndexDataNode<TYPE, BOX_GEOMETRY>* node = d_data[offset];
+
+   TYPE* new_item = new TYPE();
+   TBOX_ASSERT(new_item != NULL);
+
+   *new_item = item;
+
+   if (node == NULL) {
+
+      appendItemToList(index, offset, *new_item);
+
+   } else {
+      delete node->d_item;
+
+      node->d_item = new_item;
+   }
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+void IndexData<TYPE, BOX_GEOMETRY>::replaceAppendItemPointer(
+   const hier::Index& index,
+   TYPE* item)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, index);
+   TBOX_ASSERT(hier::PatchData::getGhostBox().contains(index));
+
+   int offset = hier::PatchData::getGhostBox().offset(index);
+   TBOX_ASSERT(offset >= 0 && offset <= hier::PatchData::getGhostBox().size());
+
+   IndexDataNode<TYPE, BOX_GEOMETRY>* node = d_data[offset];
+
+   if (node == NULL) {
+
+      appendItemToList(index, offset, *item);
+
+   } else {
+
+      delete node->d_item;
+
+      node->d_item = item;
+   }
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+void IndexData<TYPE, BOX_GEOMETRY>::removeItem(
+   const hier::Index& index)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, index);
+   TBOX_ASSERT(hier::PatchData::getGhostBox().contains(index));
+
+   int offset = hier::PatchData::getGhostBox().offset(index);
+   TBOX_ASSERT(offset >= 0 && offset <= hier::PatchData::getGhostBox().size());
+
+   removeItem(offset);
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+void IndexData<TYPE, BOX_GEOMETRY>::removeItem(
+   const int offset)
+{
+   TBOX_ASSERT(offset >= 0 && offset <= hier::PatchData::getGhostBox().size());
+
+   IndexDataNode<TYPE, BOX_GEOMETRY>* node = d_data[offset];
+
+   TBOX_ASSERT(node);
+
+   removeNodeFromList(node);
+
+   delete node->d_item;
+   delete node;
+
+   d_data[offset] = NULL;
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+void IndexData<TYPE, BOX_GEOMETRY>::addItemToList(
+   const hier::Index& index,
+   const int offset,
+   TYPE& item)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, index);
+   IndexDataNode<TYPE, BOX_GEOMETRY>* new_node =
+      new IndexDataNode<TYPE, BOX_GEOMETRY>(index,
+                                            offset,
+                                            item,
+                                            d_list_head,
+                                            NULL);
+
+   if (d_list_head) {
+      d_list_head->d_prev = new_node;
+   }
+
+   d_list_head = new_node;
+
+   if (!d_list_tail) {
+      d_list_tail = new_node;
+   }
+
+   d_data[offset] = new_node;
+
+   d_number_items++;
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+void IndexData<TYPE, BOX_GEOMETRY>::appendItemToList(
+   const hier::Index& index,
+   const int offset,
+   TYPE& item)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, index);
+   IndexDataNode<TYPE, BOX_GEOMETRY>* new_node =
+      new IndexDataNode<TYPE, BOX_GEOMETRY>(index,
+                                            offset,
+                                            item,
+                                            NULL,
+                                            d_list_tail);
+
+   if (d_list_tail) {
+      d_list_tail->d_next = new_node;
+   }
+
+   d_list_tail = new_node;
+
+   if (!d_list_head) {
+      d_list_head = new_node;
+   }
+
+   d_data[offset] = new_node;
+
+   d_number_items++;
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+void IndexData<TYPE, BOX_GEOMETRY>::removeNodeFromList(
+   IndexDataNode<TYPE, BOX_GEOMETRY>* node)
+{
+   if ((d_list_head == node) && (d_list_tail == node)) {
+      d_list_head = d_list_tail = NULL;
+
+   } else if (d_list_head == node) {
+      d_list_head = node->d_next;
+      node->d_next->d_prev = NULL;
+
+   } else if (d_list_tail == node) {
+      d_list_tail = node->d_prev;
+      node->d_prev->d_next = NULL;
+
+   } else {
+      node->d_next->d_prev = node->d_prev;
+      node->d_prev->d_next = node->d_next;
+   }
+
+   d_data[node->d_offset] = NULL;
+
+   d_number_items--;
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+int IndexData<TYPE, BOX_GEOMETRY>::getNumberOfItems() const
+{
+   return d_number_items;
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+void IndexData<TYPE, BOX_GEOMETRY>::removeInsideBox(
+   const hier::Box& box)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   typename IndexData<TYPE, BOX_GEOMETRY>::Iterator l(*this);
+
+   while (l) {
+      if (box.contains(l.getNode().d_index)) {
+         hier::Index index(l.getNode().d_index);
+         l++;
+         removeItem(index);
+      } else {
+         l++;
+      }
+   }
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+void IndexData<TYPE, BOX_GEOMETRY>::removeOutsideBox(
+   const hier::Box& box)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   typename IndexData<TYPE, BOX_GEOMETRY>::Iterator l(*this);
+
+   while (l) {
+      if (!box.contains(l.getNode().d_index)) {
+         hier::Index index(l.getNode().d_index);
+         l++;
+         removeItem(index);
+      } else {
+         l++;
+      }
+   }
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+void IndexData<TYPE, BOX_GEOMETRY>::removeGhostItems()
+{
+   removeOutsideBox(hier::PatchData::getBox());
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+void IndexData<TYPE, BOX_GEOMETRY>::removeAllItems()
+{
+   removeInsideBox(hier::PatchData::getGhostBox());
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+bool IndexData<TYPE, BOX_GEOMETRY>::isElement(
+   const hier::Index& index) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, index);
+   TBOX_ASSERT(hier::PatchData::getGhostBox().contains(index));
+
+   return d_data[hier::PatchData::getGhostBox().offset(index)] != NULL;
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+bool IndexData<TYPE, BOX_GEOMETRY>::isElement(
+   int offset) const
+{
+   return d_data[offset] != NULL;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Just checks to make sure that the class version is the same		*
+ * as the restart file version number.					*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE, class BOX_GEOMETRY>
+void IndexData<TYPE, BOX_GEOMETRY>::getSpecializedFromDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   int ver = database->getInteger("PDAT_INDEXDATA_VERSION");
+   if (ver != PDAT_INDEXDATA_VERSION) {
+      TBOX_ERROR("IndexData::getSpecializedFromDatabase error...\n"
+         << " : Restart file version different than class version" << std::endl);
+   }
+
+   int item_count = 0;
+   bool item_found = true;
+
+   do {
+      std::string index_keyword = "index_data_" + tbox::Utilities::intToString(
+            item_count,
+            6);
+
+      if (database->isDatabase(index_keyword)) {
+
+         tbox::Pointer<tbox::Database> item_db =
+            database->getDatabase(index_keyword);
+
+         tbox::Array<int> index_array = item_db->getIntegerArray(index_keyword);
+         hier::Index index(d_dim);
+         for (int j = 0; j < d_dim.getValue(); j++) {
+            index(j) = index_array[j];
+         }
+
+         TYPE item;
+         item.getFromDatabase(item_db);
+
+         appendItem(index, item);
+
+      } else {
+         item_found = false;
+      }
+
+      item_count++;
+
+   } while (item_found);
+
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Just writes out the class version number to the database.		*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE, class BOX_GEOMETRY>
+void IndexData<TYPE, BOX_GEOMETRY>::putSpecializedToDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   database->putInteger("PDAT_INDEXDATA_VERSION", PDAT_INDEXDATA_VERSION);
+
+   int item_count = 0;
+   for (typename IndexData<TYPE, BOX_GEOMETRY>::Iterator s(*this); s; s++) {
+
+      std::string index_keyword = "index_data_" + tbox::Utilities::intToString(
+            item_count,
+            6);
+      hier::Index index = s.getNode().d_index;
+      tbox::Array<int> index_array(d_dim.getValue());
+      for (int i = 0; i < d_dim.getValue(); i++) {
+         index_array[i] = index(i);
+      }
+
+      tbox::Pointer<tbox::Database> item_db =
+         database->putDatabase(index_keyword);
+
+      item_db->putIntegerArray(index_keyword, index_array);
+
+      TYPE* item = getItem(index);
+
+      item->putToDatabase(item_db);
+
+      item_count++;
+   }
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+TYPE * IndexData<TYPE, BOX_GEOMETRY>::getItem(
+   const hier::Index& index) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, index);
+
+   TYPE* item;
+   if (!isElement(index)) {
+      item = NULL;
+   } else {
+      item = d_data[hier::PatchData::getGhostBox().offset(index)]->d_item;
+   }
+
+   return item;
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/IndexData.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/IndexData.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,215 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+template<class TYPE, class BOX_GEOMETRY>
+SAMRAI_INLINE_KEYWORD
+IndexDataNode<TYPE, BOX_GEOMETRY>::IndexDataNode():
+   d_index(tbox::Dimension::getInvalidDimension())
+{
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+SAMRAI_INLINE_KEYWORD
+IndexDataNode<TYPE, BOX_GEOMETRY>::IndexDataNode(
+   const hier::Index& index,
+   const int offset,
+   TYPE& t,
+   IndexDataNode<TYPE, BOX_GEOMETRY>* n,
+   IndexDataNode<TYPE, BOX_GEOMETRY>* p):
+   d_index(index),
+   d_offset(offset),
+   d_item(&t),
+   d_next(n),
+   d_prev(p)
+{
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+SAMRAI_INLINE_KEYWORD
+IndexDataNode<TYPE, BOX_GEOMETRY>::~IndexDataNode()
+{
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+SAMRAI_INLINE_KEYWORD
+IndexIterator<TYPE, BOX_GEOMETRY>::IndexIterator()
+{
+   d_index_data = ((IndexData<TYPE, BOX_GEOMETRY> *)NULL);
+   d_node = ((IndexDataNode<TYPE, BOX_GEOMETRY> *)NULL);
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+SAMRAI_INLINE_KEYWORD
+IndexIterator<TYPE, BOX_GEOMETRY>::IndexIterator(
+   const IndexData<TYPE, BOX_GEOMETRY>& index_data)
+{
+   d_index_data = (IndexData<TYPE, BOX_GEOMETRY> *) & index_data;
+   d_node = d_index_data->d_list_head;
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+SAMRAI_INLINE_KEYWORD
+IndexIterator<TYPE, BOX_GEOMETRY>::IndexIterator(
+   IndexData<TYPE, BOX_GEOMETRY>* index_data,
+   IndexDataNode<TYPE, BOX_GEOMETRY>* node)
+{
+   d_index_data = index_data;
+   d_node = node;
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+SAMRAI_INLINE_KEYWORD
+IndexIterator<TYPE, BOX_GEOMETRY>::IndexIterator(
+   const IndexIterator<TYPE, BOX_GEOMETRY>& iter)
+{
+   d_index_data = iter.d_index_data;
+   d_node = iter.d_node;
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+SAMRAI_INLINE_KEYWORD
+IndexIterator<TYPE, BOX_GEOMETRY>&
+IndexIterator<TYPE, BOX_GEOMETRY>::operator = (
+   const IndexIterator<TYPE, BOX_GEOMETRY>& iter)
+{
+   d_index_data = iter.d_index_data;
+   d_node = iter.d_node;
+   return *this;
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+SAMRAI_INLINE_KEYWORD
+IndexIterator<TYPE, BOX_GEOMETRY>::~IndexIterator()
+{
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+SAMRAI_INLINE_KEYWORD
+TYPE & IndexIterator<TYPE, BOX_GEOMETRY>::operator * ()
+{
+   return *d_node->d_item;
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+SAMRAI_INLINE_KEYWORD
+const TYPE &IndexIterator<TYPE, BOX_GEOMETRY>::operator * () const
+{
+   return *d_node->d_item;
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+SAMRAI_INLINE_KEYWORD
+TYPE& IndexIterator<TYPE, BOX_GEOMETRY>::getItem()
+{
+   return *d_node->d_item;
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+SAMRAI_INLINE_KEYWORD
+const hier::Index& IndexIterator<TYPE, BOX_GEOMETRY>::getIndex() const
+{
+   return d_node->d_index;
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+SAMRAI_INLINE_KEYWORD
+TYPE & IndexIterator<TYPE, BOX_GEOMETRY>::operator () ()
+{
+   return getItem();
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+SAMRAI_INLINE_KEYWORD
+const TYPE &IndexIterator<TYPE, BOX_GEOMETRY>::operator () () const
+{
+   return *d_node->d_item;
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+SAMRAI_INLINE_KEYWORD
+IndexIterator<TYPE, BOX_GEOMETRY>::operator bool () const
+{
+   return d_node ? true : false;
+}
+
+#ifndef LACKS_BOOL_VOID_RESOLUTION
+template<class TYPE, class BOX_GEOMETRY>
+SAMRAI_INLINE_KEYWORD
+IndexIterator<TYPE, BOX_GEOMETRY>::operator const void* () const
+{
+   return d_node ? this : NULL;
+}
+#endif
+
+template<class TYPE, class BOX_GEOMETRY>
+SAMRAI_INLINE_KEYWORD
+bool IndexIterator<TYPE, BOX_GEOMETRY>::operator ! () const
+{
+   return d_node ? false : true;
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+SAMRAI_INLINE_KEYWORD
+void IndexIterator<TYPE, BOX_GEOMETRY>::operator ++ (
+   int)
+{
+   if (d_node) d_node = d_node->d_next;
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+SAMRAI_INLINE_KEYWORD
+void IndexIterator<TYPE, BOX_GEOMETRY>::operator -- (
+   int)
+{
+   if (d_node) d_node = d_node->d_prev;
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+SAMRAI_INLINE_KEYWORD
+void IndexIterator<TYPE, BOX_GEOMETRY>::rewindIterator()
+{
+   d_node = d_index_data->d_list_head;
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+SAMRAI_INLINE_KEYWORD
+void IndexIterator<TYPE, BOX_GEOMETRY>::fastforwardIterator()
+{
+   d_node = d_index_data->d_list_tail;
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+SAMRAI_INLINE_KEYWORD
+bool IndexIterator<TYPE, BOX_GEOMETRY>::operator == (
+   const IndexIterator<TYPE, BOX_GEOMETRY>& i) const
+{
+   return d_node == i.d_node;
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+SAMRAI_INLINE_KEYWORD
+bool IndexIterator<TYPE, BOX_GEOMETRY>::operator != (
+   const IndexIterator<TYPE, BOX_GEOMETRY>& i) const
+{
+   return d_node != i.d_node;
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+SAMRAI_INLINE_KEYWORD
+IndexDataNode<TYPE, BOX_GEOMETRY>& IndexIterator<TYPE, BOX_GEOMETRY>::getNode()
+{
+   return *d_node;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/IndexData.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/IndexData.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,768 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_IndexData
+#define included_pdat_IndexData
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/List.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Database.h"
+
+#include <vector>
+
+namespace SAMRAI {
+namespace pdat {
+
+template<class TYPE, class BOX_GEOMETRY>
+class IndexDataNode;
+template<class TYPE, class BOX_GEOMETRY>
+class IndexIterator;
+template<class TYPE, class BOX_GEOMETRY>
+class ConstIndexIterator;
+
+/**
+ * IndexData is used for storing sparse data.  The iteration over the
+ * data preserves insertion order similar to a linked list, hence data
+ * may be inserted at the front (AddItem) or tail (AppendItem).
+ *
+ * For example, this class is used to represent embedded * boundary
+ * features as a regular patch data type using the BoundaryCell class
+ * as the template type.  The iteration ordering property is used to
+ * visit the boundary cells in a well defined way.
+ *
+ * Additional insertion methods are provided for optimization in
+ * specific use cases.  An extra constructor call can be avoided if
+ * the "Pointer" versions of Add/AppendItem are used.   These methods
+ * assume that the items are being "given" to IndexData thus IndexData
+ * will delete them when needed.  The items must be dynamically
+ * allocated for this to work correctly, E.G.
+ *
+ * index_data.addItemPointer(someIndex, new ItemToInsert());
+ *
+ * The "replace" versions of the insert routines may be used when one
+ * wishes to preserve the existing iteration ordering.  If an item
+ * already exists the replace insert will delete the old item and put
+ * the item provided in it's place (inserting it into that location in
+ * the linked list).
+ *
+ * If one does not care about the iteration order and is frequently
+ * updating the items stored, the "replace" versions are significantly
+ * faster.
+ *
+ * The template parameter TYPE * defines the storage at each index
+ * location.  IndexDaga is derived from * hier::PatchData.
+ *
+ * The data type TYPE must define the following five methods which are
+ * require by this class:
+ *
+ *    - \b - Default constructor (taking no arguments).
+ *    - \b - Assignment operator; i.e.,  TYPE\& operator=(const TYPE\& rhs)
+ *    - \b - Copy; copySourceItem(const hier::Index\& index,
+ *                                const hier::IntVector\& src_offset,
+ *                                const TYPE\& src_item)
+ *    - \b - Return size of data; size_t getDataStreamSize()
+ *    - \b - Pack data into message stream; i.e.,
+ *             packStream(MessageStream\& stream,
+ *    - \b - Unpack data from message stream; i.e.,
+ *             unpackStream(MessageStream\& stream,
+ *             const hier::IntVector\& offset)
+ *    - \b - Write to restart;
+ *             putToDatabase(tbox::Pointer<tbox::Database>\& database)
+ *    - \b - Retrieve from restart;
+ *             getFromDatabase(tbox::Pointer<tbox::Database>\& database)
+ *
+ * The BOX_GEOMETRY template parameter defines the geometry.   BOX_GEOMETRY must
+ * have a nested class name Overlap that implements he following methods:
+ *
+ *   - \b - getSourceOffset
+ *   - \b - getDestinationBoxList
+ *
+ *
+ * More information about the templated TYPE is provided in the IndexData
+ * README file.
+ *
+ * IndexData<DIM> objects are created by the IndexDataFactory<DIM>
+ * factory object just as all other patch data types.
+ *
+ * @see pdat::IndexData
+ * @see hier::PatchData
+ * @see pdat::IndexDataFactory
+ */
+
+template<class TYPE, class BOX_GEOMETRY>
+class IndexData:public hier::PatchData
+{
+public:
+   /**
+    * Define the iterator.
+    */
+   typedef IndexIterator<TYPE, BOX_GEOMETRY> Iterator;
+   typedef ConstIndexIterator<TYPE, BOX_GEOMETRY> ConstIterator;
+
+   /**
+    * The constructor for an IndexData object.  The box describes the interior
+    * of the index space and the ghosts vector describes the ghost nodes in
+    * each coordinate direction.
+    */
+   explicit IndexData(
+      const hier::Box& box,
+      const hier::IntVector& ghosts);
+
+   /**
+    * The virtual destructor for an IndexData object.
+    */
+   virtual ~IndexData<TYPE, BOX_GEOMETRY>();
+
+   /**
+    * A fast copy between the source and destination.  All data is copied
+    * from the source into the destination where there is overlap in the
+    * index space.
+    */
+   virtual void
+   copy(
+      const hier::PatchData& src);
+   virtual void
+   copy2(
+      hier::PatchData& dst) const;
+
+   /**
+    * Copy data from the source into the destination using the designated
+    * overlap descriptor.  The overlap description should have been computed
+    * previously from computeIntersection().
+    */
+   virtual void
+   copy(
+      const hier::PatchData& src,
+      const hier::BoxOverlap& overlap);
+   virtual void
+   copy2(
+      hier::PatchData& dst,
+      const hier::BoxOverlap& overlap) const;
+
+   /**
+    * Determines whether the hier::PatchData subclass can estinate the necessary
+    * stream size using only index space information.
+    */
+   virtual bool
+   canEstimateStreamSizeFromBox() const;
+
+   /**
+    * Calculate the number of bytes needed to stream the data lying
+    * in the specified box domain.
+    */
+   virtual int
+   getDataStreamSize(
+      const hier::BoxOverlap& overlap) const;
+
+   /**
+    * Pack data lying on the specified index set into the output stream.
+    */
+   virtual void
+   packStream(
+      tbox::MessageStream& stream,
+      const hier::BoxOverlap& overlap) const;
+
+   /**
+    * Unpack data from the message stream into the specified index set.
+    */
+   virtual void
+   unpackStream(
+      tbox::MessageStream& stream,
+      const hier::BoxOverlap& overlap);
+
+   /**
+    * Add a new item to the tail of the irregular index set.
+    */
+   void
+   appendItem(
+      const hier::Index& index,
+      const TYPE& item);
+
+   /**
+    * Add a pointer to a new item to the tail of the irregular index
+    * set.  IndexData will delete the item when it is no longer needed
+    * by IndexData.  Due to this behavior item must be dynamically
+    * created (e.g. new) so that it may be deleted.
+    *
+    * NOTE: This is an optimization to avoid an extra constructor
+    * call.  It should be used with caution, the caller MUST NOT
+    * delete the referenced item.  Think of this as giving up control
+    * of the item to IndexData.
+    */
+   void
+   appendItemPointer(
+      const hier::Index& index,
+      TYPE* item);
+
+   /**
+    * Add a new item to the head of the irregular index set
+    */
+   void
+   addItem(
+      const hier::Index& index,
+      const TYPE& item);
+
+   /**
+    * Add a pointer to a new item to the head of the irregular index
+    * set.  IndexData will delete the item when it is no longer needed
+    * by IndexData.  Due to this behavior item must be dynamically
+    * created (e.g. new) so that it may be deleted.
+    *
+    * NOTE: This is an optimization to avoid an extra constructor
+    * call.  It should be used with caution, the caller MUST NOT
+    * delete the referenced item.  Think of this as giving up control
+    * of the item to IndexData.
+    */
+
+   void
+   addItemPointer(
+      const hier::Index& index,
+      TYPE* item);
+
+   /**
+    * Remove (deallocate) the item in the irregular index set located at
+    * the specified hier::Index and replace it with a new item.
+    *
+    * This preserves the iteration order of the orginal insertions.
+    *
+    * If an item does not already exist at index this is equivelent
+    * to addItem.
+    */
+   void
+   replaceAddItem(
+      const hier::Index& index,
+      const TYPE& item);
+
+   /**
+    * Remove (deallocate) the item in the irregular index set located at
+    * the specified hier::Index and replace it with a new item.
+    *
+    * This preserves the iteration order of the original insertions.
+    *
+    * If an item does not already exist at index this is equivelent
+    * to addItemPointer.
+    *
+    * See addItemPointer for additional comments on pointer semantics.
+    */
+   void
+   replaceAddItemPointer(
+      const hier::Index& index,
+      TYPE* item);
+
+   /**
+    * Remove (deallocate) the item in the irregular index set located at
+    * the specified hier::Index and replace it with a new item.
+    *
+    * This preserves the iteration order of the orginal insertions.
+    *
+    * If an item does not already exist at index this is equivelent
+    * to appendItem.
+    */
+   void
+   replaceAppendItem(
+      const hier::Index& index,
+      const TYPE& item);
+
+   /**
+    * Remove (deallocate) the item in the irregular index set located at
+    * the specified hier::Index and replace it with a new item.
+    *
+    * This preserves the iteration order of the original insertions.
+    *
+    * If an item does not already exist at index this is equivelent
+    * to appendItemPointer.
+    *
+    * See addItemPointer for additional comments on pointer semantics.
+    */
+   void
+   replaceAppendItemPointer(
+      const hier::Index& index,
+      TYPE* item);
+
+   /**
+    * Remove (deallocate) the item in the irregular index set located at
+    * the specified hier::Index.
+    *
+    */
+   void
+   removeItem(
+      const hier::Index& index);
+
+   /**
+    * Return the number of data items (i.e. the number of indices) in
+    * the index data list.
+    */
+   int
+   getNumberOfItems() const;
+
+   /**
+    * Remove (deallocate) any items in the irregular index set located in
+    * the index space of the hier::Box.
+    */
+   void
+   removeInsideBox(
+      const hier::Box& box);
+
+   /**
+    * Remove (deallocate) any items in the irregular index set located
+    * outside of the index space of the hier::Box.
+    */
+   void
+   removeOutsideBox(
+      const hier::Box& box);
+
+   /**
+    * Remove (deallocate) the items in the irregular index set located in
+    * the ghost region of the patch.
+    */
+   void
+   removeGhostItems();
+
+   /**
+    * Remove (deallocate) all items in the irregular index set.
+    */
+   void
+   removeAllItems();
+
+   /**
+    * Returns true if there is an element of the irregular index set at
+    * the specified hier::Index.
+    */
+   bool
+   isElement(
+      const hier::Index& index) const;
+
+   /**
+    * Given an index, return a pointer to the item located at that index.
+    * If there is no item at the index, null is returned.
+    */
+   TYPE *
+   getItem(
+      const hier::Index& index) const;
+
+   /**
+    * Check to make sure that the class version number is the same
+    * as the restart file version number.
+    *
+    * Assertions: database must be a non-null pointer.
+    */
+   virtual void
+   getSpecializedFromDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+   /**
+    * Write out the class version number to the database.
+    *
+    * Assertions: database must be a non-null pointer.
+    */
+   virtual void
+   putSpecializedToDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+private:
+   friend class IndexIterator<TYPE, BOX_GEOMETRY>;
+   friend class ConstIndexIterator<TYPE, BOX_GEOMETRY>;
+
+   /**
+    * Returns true if element exists at offset
+    */
+   bool
+   isElement(
+      int offset) const;
+
+   /**
+    * Remove (deallocate) the item in the irregular index set located at
+    * the offset.
+    *
+    * NOTE: This is for optimization to avoid computing
+    * offset repeatedly.
+    */
+   void
+   removeItem(
+      const int offset);
+
+   /**
+    * Internal routine to append item to the linked list
+    * representation.
+    *
+    * NOTE: Offset is not strictly necessary but was include to avoid
+    * computing it repeatedly.
+    */
+   void
+   addItemToList(
+      const hier::Index& index,
+      const int offset,
+      TYPE& item);
+   void
+   appendItemToList(
+      const hier::Index& index,
+      const int offset,
+      TYPE& item);
+
+   /**
+    * Remove the specified node from the linked list.
+    */
+   void
+   removeNodeFromList(
+      IndexDataNode<TYPE, BOX_GEOMETRY>* node);
+
+   IndexData(
+      const IndexData<TYPE, BOX_GEOMETRY>&);       // not implemented
+   void
+   operator = (
+      const IndexData<TYPE, BOX_GEOMETRY>&);              // not implemented
+
+   const tbox::Dimension d_dim;
+
+   std::vector<IndexDataNode<TYPE, BOX_GEOMETRY> *> d_data;
+
+   /*
+    * Doublely linked list of nodes.
+    */
+   IndexDataNode<TYPE, BOX_GEOMETRY>* d_list_head;
+   IndexDataNode<TYPE, BOX_GEOMETRY>* d_list_tail;
+   int d_number_items;
+};
+
+/**
+ * Class IndexDataNode holds items for the linked list.  This class should
+ * be defined inside the IndexData class, but nested template classes can
+ * cause some compilers to barf.  List nodes should never be seen by the
+ * user of a list.
+ *
+ */
+template<class TYPE, class BOX_GEOMETRY>
+class IndexDataNode
+{
+public:
+   friend class IndexData<TYPE, BOX_GEOMETRY>;
+   friend class IndexIterator<TYPE, BOX_GEOMETRY>;
+   friend class ConstIndexIterator<TYPE, BOX_GEOMETRY>;
+
+   IndexDataNode<TYPE, BOX_GEOMETRY>();
+
+   IndexDataNode<TYPE, BOX_GEOMETRY>(
+      const hier::Index & index,
+      const int d_offset,
+      TYPE & t,
+      IndexDataNode<TYPE, BOX_GEOMETRY>* n,
+      IndexDataNode<TYPE, BOX_GEOMETRY>* p);
+
+   virtual ~IndexDataNode<TYPE, BOX_GEOMETRY>();
+
+private:
+   hier::Index d_index;
+   int d_offset;
+   TYPE* d_item;
+
+   IndexDataNode<TYPE, BOX_GEOMETRY>* d_next;
+   IndexDataNode<TYPE, BOX_GEOMETRY>* d_prev;
+};
+
+/**
+ * Class IndexIterator is the iterator associated with the IndexData
+ * This class provides methods for stepping through the
+ * list that contains the irregular index set.  The user should
+ * access this class through the name IndexData<TYPE>::Iterator.
+ *
+ * This iterator should be used as follows:
+ * \verbatim
+ * IndexData<TYPE> data;
+ * ...
+ * for (IndexData<TYPE>::Iterator iter(data); iter; iter++ {
+ *    ... = iter();
+ * }
+ * \endverbatim
+ *
+ * @see tbox::List
+ * @see pdat::IndexData
+ * @see pdat::IndexIterator
+ */
+
+template<class TYPE, class BOX_GEOMETRY>
+class IndexIterator
+{
+public:
+   /**
+    * Default constructor for the index list iterator.  The iterator must
+    * be initialized before it can be used to iterate over an IndexData object.
+    */
+   IndexIterator();
+
+   /**
+    * Constructor for the index list iterator.  The iterator will iterate
+    * over the irregular index set of the argument data object.
+    */
+   IndexIterator(
+      const IndexData<TYPE, BOX_GEOMETRY>& data);
+
+   /**
+    * Copy constructor for the index list iterator.
+    */
+   IndexIterator(
+      const IndexIterator<TYPE, BOX_GEOMETRY>& iterator);
+
+   /**
+    * Assignment operator for the index list iterator.
+    */
+   IndexIterator<TYPE, BOX_GEOMETRY>&
+   operator = (
+      const IndexIterator<TYPE, BOX_GEOMETRY>& iterator);
+
+   /**
+    * Destructor for the index list iterator.
+    */
+   ~IndexIterator<TYPE, BOX_GEOMETRY>();
+
+   /**
+    * Return the current item in the irregular index set.
+    */
+   TYPE&
+   operator * ();
+
+   /**
+    * Return a const reference to the current item in the irregular
+    * index set.
+    */
+   const TYPE&
+   operator * () const;
+
+   /**
+    * Return the current item in the irregular index set.
+    */
+   TYPE&
+   operator () ();
+
+   /**
+    * Return a const refeferene to the current item in the irregular
+    * index set.
+    */
+   const TYPE&
+   operator () () const;
+
+   /**
+    * Return the current item in the irregular index set.
+    */
+   TYPE&
+   getItem();
+
+   /**
+    * Return the index of the current item in the irregular index set
+    */
+   const hier::Index&
+   getIndex() const;
+
+   /**
+    * Return true if the iterator points to a valid item in the index set.
+    */
+   operator bool () const;
+
+#ifndef LACKS_BOOL_VOID_RESOLUTION
+   /**
+    * Return a non-null if the iterator points to a valid item in the index
+    * set.
+    */
+   operator const void
+   * () const;
+#endif
+
+   /**
+    * Return whether the iterator points to a valid item in the index set.
+    * This operator mimics the !p operation applied to a pointer p.
+    */
+   bool
+   operator ! () const;
+
+   /**
+    * Increment the iterator to point to the next item in the index set.
+    */
+   void
+   operator ++ (
+      int);
+
+   /**
+    * Decrement the iterator to point to the previous item in the index set.
+    */
+   void
+   operator -- (
+      int);
+
+   /**
+    * Test two iterators for equality (pointing to the same item).
+    */
+   bool
+   operator == (
+      const IndexIterator<TYPE, BOX_GEOMETRY>& iterator) const;
+
+   /**
+    * Test two iterators for inequality (pointing to different items).
+    */
+   bool
+   operator != (
+      const IndexIterator<TYPE, BOX_GEOMETRY>& iterator) const;
+
+   void
+   rewindIterator();
+
+   void
+   fastforwardIterator();
+
+private:
+   friend class ConstIndexIterator<TYPE, BOX_GEOMETRY>;
+   friend class IndexData<TYPE, BOX_GEOMETRY>;
+
+   IndexIterator(
+      IndexData<TYPE, BOX_GEOMETRY>* index_data,
+      IndexDataNode<TYPE, BOX_GEOMETRY>* node);
+
+   IndexDataNode<TYPE, BOX_GEOMETRY>&
+   getNode();
+
+   IndexData<TYPE, BOX_GEOMETRY>* d_index_data;
+
+   IndexDataNode<TYPE, BOX_GEOMETRY>* d_node;
+};
+
+#if 0
+
+template<class TYPE, class BOX_GEOMETRY>
+class ConstIndexIterator
+{
+public:
+   /**
+    * Default constructor for the index list iterator.  The iterator must
+    * be initialized before it can be used to iterate over an IndexData object.
+    */
+   ConstIndexIterator();
+
+   /**
+    * Constructor for the index list iterator.  The iterator will iterate
+    * over the irregular index set of the argument data object.
+    */
+   ConstIndexIterator(
+      const IndexData<TYPE, BOX_GEOMETRY>& data);
+
+   /**
+    * Copy constructor for the index list iterator.
+    */
+   ConstIndexIterator(
+      const ConstIndexIterator<TYPE, BOX_GEOMETRY>& iterator);
+   ConstIndexIterator(
+      const IndexIterator<TYPE, BOX_GEOMETRY>& iterator);
+
+   /**
+    * Assignment operator for the index list iterator.
+    */
+   ConstIndexIterator<TYPE, BOX_GEOMETRY>&
+   operator = (
+      const ConstIndexIterator<TYPE, BOX_GEOMETRY>& iterator);
+   ConstIndexIterator<TYPE, BOX_GEOMETRY>&
+   operator = (
+      const IndexIterator<TYPE, BOX_GEOMETRY>& iterator);
+
+   /**
+    * Destructor for the index list iterator.
+    */
+   ~ConstIndexIterator<TYPE, BOX_GEOMETRY>();
+
+   /**
+    * Return the current item in the irregular index set.
+    */
+   const TYPE&
+   operator * ();
+
+   /**
+    * Return the current item in the irregular index set.
+    */
+   const TYPE&
+   operator () ();
+
+   /**
+    * Return the current item in the irregular index set.
+    */
+   const TYPE&
+   getItem();
+
+   /**
+    * Return the index of the current item in the irregular index set
+    */
+   const hier::Index&
+   getIndex() const;
+
+   /**
+    * Return true if the iterator points to a valid item in the index set.
+    */
+   operator bool () const;
+
+#ifndef LACKS_BOOL_VOID_RESOLUTION
+   /**
+    * Return a non-null if the iterator points to a valid item in the index
+    * set.
+    */
+   operator const void
+   * () const;
+#endif
+
+   /**
+    * Return whether the iterator points to a valid item in the index set.
+    * This operator mimics the !p operation applied to a pointer p.
+    */
+   bool
+   operator ! () const;
+
+   /**
+    * Increment the iterator to point to the next item in the index set.
+    */
+   void
+   operator ++ (
+      int);
+
+   /**
+    * Test two iterators for equality (pointing to the same item).
+    */
+   bool
+   operator == (
+      const ConstIndexIterator<TYPE, BOX_GEOMETRY>& iterator) const;
+
+   /**
+    * Test two iterators for inequality (pointing to different items).
+    */
+   bool
+   operator != (
+      const ConstIndexIterator<TYPE, BOX_GEOMETRY>& iterator) const;
+
+private:
+   friend class IndexIterator<TYPE, BOX_GEOMETRY>;
+
+   const IndexData<TYPE, BOX_GEOMETRY>* d_index_data;
+
+   IndexDataNode<TYPE, BOX_GEOMETRY>* d_node;
+}
+
+#endif
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/IndexData.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/IndexData.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/IndexDataFactory.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/IndexDataFactory.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,154 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_IndexDataFactory_C
+#define included_pdat_IndexDataFactory_C
+
+#include "SAMRAI/pdat/IndexDataFactory.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/xfer/Geometry.h"
+#include "SAMRAI/pdat/IndexData.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MemoryUtilities.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * The constructor simply caches the default ghost cell width.		*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE, class BOX_GEOMETRY>
+IndexDataFactory<TYPE, BOX_GEOMETRY>::IndexDataFactory(
+   const hier::IntVector& ghosts):
+   hier::PatchDataFactory(ghosts)
+{
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+IndexDataFactory<TYPE, BOX_GEOMETRY>::~IndexDataFactory()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Clone the factory and copy the default parameters to the new factory.	*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE, class BOX_GEOMETRY>
+tbox::Pointer<hier::PatchDataFactory>
+IndexDataFactory<TYPE, BOX_GEOMETRY>::cloneFactory(
+   const hier::IntVector& ghosts)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, ghosts);
+
+   return tbox::Pointer<hier::PatchDataFactory>(new IndexDataFactory<TYPE,
+                                                                     BOX_GEOMETRY>(
+                                                   ghosts));
+}
+
+/*
+ *************************************************************************
+ *
+ * Allocate the concrete irregular data class.
+ *
+ *************************************************************************
+ */
+
+template<class TYPE, class BOX_GEOMETRY>
+tbox::Pointer<hier::PatchData>
+IndexDataFactory<TYPE, BOX_GEOMETRY>::allocate(
+   const hier::Patch& patch) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, patch);
+
+   hier::PatchData* pd = new IndexData<TYPE, BOX_GEOMETRY>(patch.getBox(), this->d_ghosts);
+   return tbox::Pointer<hier::PatchData>(pd);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Return the box geometry type for index data objects.			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE, class BOX_GEOMETRY>
+tbox::Pointer<hier::BoxGeometry>
+IndexDataFactory<TYPE, BOX_GEOMETRY>::getBoxGeometry(
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   hier::BoxGeometry* boxgeometry = new BOX_GEOMETRY(box, this->d_ghosts);
+   return tbox::Pointer<hier::BoxGeometry>(boxgeometry);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Calculate the amount of memory needed to allocate the object.		*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE, class BOX_GEOMETRY>
+size_t IndexDataFactory<TYPE, BOX_GEOMETRY>::getSizeOfMemory(
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   NULL_USE(box);
+   return tbox::MemoryUtilities::align(sizeof(IndexData<TYPE, BOX_GEOMETRY>));
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Determine whether this is a valid copy operation to/from IndexData    *
+ * between the supplied datatype.                                        *
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE, class BOX_GEOMETRY>
+bool IndexDataFactory<TYPE, BOX_GEOMETRY>::validCopyTo(
+   const tbox::Pointer<hier::PatchDataFactory>& dst_pdf) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *dst_pdf);
+
+   bool valid_copy = false;
+
+   /*
+    * Valid option is another IndexData object of the same dimension
+    * and type.
+    */
+   if (!valid_copy) {
+      tbox::Pointer<IndexDataFactory<TYPE, BOX_GEOMETRY> > idf = dst_pdf;
+      if (!idf.isNull()) {
+         valid_copy = true;
+      }
+   }
+
+   return valid_copy;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/IndexDataFactory.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/IndexDataFactory.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,139 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_IndexDataFactory
+#define included_pdat_IndexDataFactory
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/hier/PatchDataFactory.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class IndexDataFactory<DIM> is the factory class used to allocate
+ * new instances of IndexData<DIM> objects.  It is a subclass of the
+ * hier::PatchDataFactory base class.
+ *
+ * @see pdat::IndexData
+ * @see pdat::IndexVariable
+ * @see hier::PatchDataFactory
+ */
+
+template<class TYPE, class BOX_GEOMETRY>
+class IndexDataFactory:public hier::PatchDataFactory
+{
+public:
+   /**
+    * The default constructor for the IndexDataFactory<DIM> class.
+    * The ghost cell width argument gives the default width for all
+    * irregular data objects created with this factory.
+    */
+   explicit IndexDataFactory(
+      const hier::IntVector& ghosts);
+
+   /**
+    * Virtual destructor for the irregular data factory class.
+    */
+   virtual ~IndexDataFactory<TYPE, BOX_GEOMETRY>();
+
+   /**
+    * @brief Abstract virtual function to clone a patch data factory.
+    *
+    * This will return a new instantiation of the abstract factory
+    * with the same properties.  The properties of the cloned factory
+    * can then be changed without modifying the original.
+    *
+    * @param ghosts default ghost cell width for concrete classes created from
+    * the factory.
+    */
+   virtual tbox::Pointer<hier::PatchDataFactory>
+   cloneFactory(
+      const hier::IntVector& ghosts);
+
+   /**
+    * Virtual factory function to allocate a concrete index data object.
+    * The default information about the object (e.g., ghost cell width) is
+    * taken from the factory.
+    */
+   virtual tbox::Pointer<hier::PatchData>
+   allocate(
+      const hier::Patch& patch) const;
+
+   /**
+    * Allocate the box geometry object associated with the patch data.
+    * This information will be used in the computation of intersections
+    * and data dependencies between objects.
+    */
+   virtual tbox::Pointer<hier::BoxGeometry>
+   getBoxGeometry(
+      const hier::Box& box) const;
+
+   /**
+    * Calculate the amount of memory needed to store the irregular data
+    * object, including object data but not dynamically allocated data.
+    * Because the irregular data list can grow and shrink, it would be
+    * impossible to estimate the necessary amount of memory.  Instead,
+    * dynamic data is allocated via the standard new/free mechanisms.
+    */
+   virtual size_t
+   getSizeOfMemory(
+      const hier::Box& box) const;
+
+   /**
+    * Return a boolean true value indicating that the index data quantities will always
+    * be treated as though fine values represent them on coarse-fine interfaces.
+    * See the IndexVariable<DIM> class header file for more information.
+    */
+   bool fineBoundaryRepresentsVariable() const {
+      return true;
+   }
+
+   /**
+    * Return false since the index data index space matches the cell-centered
+    * index space for AMR patches.  Thus, index data does not live on patch borders.
+    */
+   bool dataLivesOnPatchBorder() const {
+      return false;
+   }
+
+   /**
+    * Return whether it is valid to copy this IndexDataFactory to the
+    * supplied destination patch data factory.  It will return true if
+    * dst_pdf is an IndexDataFactory of the same type and dimension,
+    * false otherwise.
+    */
+   bool
+   validCopyTo(
+      const tbox::Pointer<hier::PatchDataFactory>& dst_pdf) const;
+
+private:
+   IndexDataFactory(
+      const IndexDataFactory<TYPE, BOX_GEOMETRY>&);
+   void
+   operator = (
+      const IndexDataFactory<TYPE, BOX_GEOMETRY>&);
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/IndexDataFactory.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/IndexVariable.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/IndexVariable.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_IndexVariable_C
+#define included_pdat_IndexVariable_C
+
+#include "SAMRAI/pdat/IndexVariable.h"
+#include "SAMRAI/pdat/IndexDataFactory.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * Constructor and destructor for irregular index variable objects	*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE, class BOX_GEOMETRY>
+IndexVariable<TYPE, BOX_GEOMETRY>::IndexVariable(
+   const tbox::Dimension& dim,
+   const std::string& name):
+   // default zero ghost cells
+   hier::Variable(
+      name,
+      tbox::Pointer<SAMRAI::hier::PatchDataFactory>(
+         new IndexDataFactory<TYPE, BOX_GEOMETRY>(hier::IntVector::getZero(dim))))
+{
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+IndexVariable<TYPE, BOX_GEOMETRY>::~IndexVariable()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * These are private and should not be used.  They are defined here	*
+ * because some template instantiation methods fail if some member	*
+ * functions are left undefined.						*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE, class BOX_GEOMETRY>
+IndexVariable<TYPE, BOX_GEOMETRY>::IndexVariable(
+   const IndexVariable<TYPE, BOX_GEOMETRY>& foo):
+   hier::Variable(NULL, tbox::Pointer<SAMRAI::hier::PatchDataFactory>(NULL))
+{
+   // not implemented
+   NULL_USE(foo);
+}
+
+template<class TYPE, class BOX_GEOMETRY>
+void IndexVariable<TYPE, BOX_GEOMETRY>::operator = (
+   const IndexVariable<TYPE, BOX_GEOMETRY>& foo)
+{
+   // not implemented
+   NULL_USE(foo);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/IndexVariable.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/IndexVariable.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,95 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_IndexVariable
+#define included_pdat_IndexVariable
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Variable.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class IndexVariable<TYPE,BOX_GEOMETRY> is a templated variable
+ * class used to define quantities that exist on an irregular
+ * cell-centered index set.  The template parameter TYPE defines the
+ * storage at each index location.  For example, this class is used to
+ * represent embedded boundary features as a regular patch data type
+ * using the BoundaryCell class as the template type.  The template
+ * parameter BOX_GEOMETRY allows IndexVariables to be instantiated
+ * with a provided centering and geometry in index space via a
+ * BoxGeometry (e.g. CellGeometry, NodeGeometry).
+ *
+ * Please consult the README file in the index data source directory for
+ * instructions on using this class to provide other irregular index set
+ * types.
+ *
+ * @see pdat::IndexData
+ * @see pdat::IndexDataFactory
+ * @see pdat::Variable
+ */
+
+template<class TYPE, class BOX_GEOMETRY>
+class IndexVariable:public hier::Variable
+{
+public:
+   /**
+    * Create an index variable object with the specified name.
+    */
+   explicit IndexVariable(
+      const tbox::Dimension& dim,
+      const std::string& name);
+
+   /**
+    * Virtual destructor for index variable objects.
+    */
+   virtual ~IndexVariable<TYPE, BOX_GEOMETRY>();
+
+   /**
+    * Return true so that the index data quantities will always be treated as cell-
+    * centered quantities as far as communication is concerned.  Note that this is
+    * really artificial since the cell data index space matches the cell-centered
+    * index space for AMR patches.  Thus, cell data does not live on patch borders
+    * and so there is no ambiguity reagrding coarse-fine interface values.
+    */
+   bool fineBoundaryRepresentsVariable() const {
+      return true;
+   }
+
+   /**
+    * Return false since the index data index space matches the cell-centered
+    * index space for AMR patches.  Thus, index data does not live on patch borders.
+    */
+   bool dataLivesOnPatchBorder() const {
+      return false;
+   }
+
+private:
+   IndexVariable(
+      const IndexVariable<TYPE, BOX_GEOMETRY>&);           // not implemented
+   void
+   operator = (
+      const IndexVariable<TYPE, BOX_GEOMETRY>&);                 // not implemented
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/IndexVariable.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/MBDataUtilities.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/MBDataUtilities.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1590 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations for copying patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_MBDataUtilities_C
+#define included_pdat_MBDataUtilities_C
+
+#include "SAMRAI/pdat/MBDataUtilities.h"
+
+#include "SAMRAI/hier/MBUtilities.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor and destructor do nothing, as all member functions in     *
+ * this class are static.                                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+MBDataUtilities<TYPE>::MBDataUtilities()
+{
+}
+
+template<class TYPE>
+MBDataUtilities<TYPE>::~MBDataUtilities()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Translation and copy for cell data                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void MBDataUtilities<TYPE>::translateAndCopyCellData(
+   pdat::CellData<TYPE>& dst,
+   const pdat::CellData<TYPE>& src,
+   const hier::IntVector& shift,
+   const hier::MultiblockPatchHierarchy::RotationIdentifier rotate)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst, src, shift);
+
+   const tbox::Dimension& dim(shift.getDim());
+
+   if (dim == tbox::Dimension(1) || dim > 3) {
+      TBOX_ERROR(
+         "MBDataUtilities<TYPE>::translateAndCopyCellData : dim = 1 or > 3 not implemented");
+   } else if (dim == tbox::Dimension(2)) {
+      translateAndCopyArrayData(dst.getArrayData(),
+         src.getArrayData(),
+         shift,
+         rotate);
+   } else if (dim == tbox::Dimension(3)) {
+      if (rotate == 0) {
+         translateAndCopyArrayData(dst.getArrayData(),
+            src.getArrayData(),
+            shift,
+            rotate);
+      } else {
+
+         const hier::MultiblockPatchHierarchy::RotationIdentifier back_rotate =
+            hier::MultiblockPatchHierarchy::getReverseRotationIdentifier(rotate);
+
+         hier::IntVector back_shift(dim, 0);
+
+         hier::MultiblockPatchHierarchy::calculateReverseShift(
+            (back_shift), shift, rotate);
+
+         TYPE * const dst_ptr = dst.getArrayData().getPointer();
+         const TYPE * const src_ptr = src.getArrayData().getPointer();
+
+         const int depth = ((dst.getDepth() < src.getDepth()) ?
+                            dst.getDepth() : src.getDepth());
+
+         const hier::Box dst_box = dst.getBox();
+         const hier::Box src_box = src.getBox();
+         const hier::Box dst_ghost_box = dst.getGhostBox();
+         const hier::Box src_ghost_box = src.getGhostBox();
+
+         int dst_lo[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int dst_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int src_glo[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int dst_gw[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int src_gw[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+         int bshift[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            dst_lo[nd] = dst_box.lower(nd);
+            dst_w[nd] = dst_box.numberCells(nd);
+            src_glo[nd] = src_ghost_box.lower(nd);
+            dst_gw[nd] = dst_ghost_box.numberCells(nd);
+            src_gw[nd] = src_ghost_box.numberCells(nd);
+
+            bshift[nd] = back_shift(nd);
+         }
+
+         const int dst_offset = dst_ghost_box.size();
+         const int src_offset = src_ghost_box.size();
+
+         int dst_bd = dst_ghost_box.offset(dst_box.lower());
+         int src_bd = 0;
+
+         int dst_ba;
+         int src_ba;
+
+         int src_in[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+         /*
+          * two_id and one_id used to avoid array-bounds warnings when
+          * compiling with dim < 3.  Since this is within a ((dim == tbox::Dimension(3)))
+          * conditional, two_id will always be 2 and one_id will always
+          * be 1. zero_id is used to keep the style consistent.
+          */
+         const int two_id = (dim > 2) ? 2 : (dim - 1);
+         const int one_id = (dim > 1) ? 1 : 0;
+         const int zero_id = 0;
+         for (int d = 0; d < depth; d++) {
+
+            for (int i2 = 0; i2 < dst_w[two_id]; i2++) {
+               for (int i1 = 0; i1 < dst_w[one_id]; i1++) {
+                  for (int i0 = 0; i0 < dst_w[zero_id]; i0++) {
+
+                     dst_ba = (i0
+                               + i1 * dst_gw[zero_id]
+                               + i2 * dst_gw[one_id] * dst_gw[zero_id]
+                               ) + dst_bd;
+
+                     src_in[zero_id] = dst_lo[zero_id] + i0;
+                     src_in[one_id] = dst_lo[one_id] + i1;
+                     src_in[two_id] = dst_lo[two_id] + i2;
+
+                     hier::MBUtilities::rotateIndex(dim, src_in, back_rotate);
+                     for (int sb = 0; sb < dim.getValue(); sb++) {
+                        src_in[sb] += bshift[sb];
+                     }
+
+                     src_ba = ((src_in[zero_id] - src_glo[zero_id])
+                               + (src_in[one_id] - src_glo[one_id])
+                               * src_gw[zero_id]
+                               + (src_in[two_id] - src_glo[two_id])
+                               * src_gw[one_id] * src_gw[zero_id]
+                               ) + src_bd;
+
+                     dst_ptr[dst_ba] = src_ptr[src_ba];
+                  }
+               }
+            }
+
+            dst_bd += dst_offset;
+            src_bd += src_offset;
+
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Translation and copy for node data                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void MBDataUtilities<TYPE>::translateAndCopyNodeData(
+   pdat::NodeData<TYPE>& dst,
+   const pdat::NodeData<TYPE>& src,
+   const hier::IntVector& shift,
+   const hier::MultiblockPatchHierarchy::RotationIdentifier rotate)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst, src, shift);
+
+   const tbox::Dimension& dim(shift.getDim());
+
+   bool no_rotate;
+   if (rotate != 0) {
+      no_rotate = false;
+   } else {
+      no_rotate = true;
+   }
+
+   if (no_rotate) {
+      dst.getArrayData().copy(src.getArrayData(),
+         dst.getArrayData().getBox(), shift);
+   } else if (dim == tbox::Dimension(2)) {
+      hier::Box rotatebox(src.getArrayData().getBox());
+      int num_rotations = rotate;
+
+      rotatebox.rotate(num_rotations);
+
+      const hier::Box copybox = dst.getArrayData().getBox()
+         * (pdat::NodeGeometry::toNodeBox(
+               hier::Box::shift(rotatebox, shift)));
+
+      if (!copybox.empty()) {
+         TYPE * const dst_ptr = dst.getArrayData().getPointer();
+         const TYPE * const src_ptr = src.getArrayData().getPointer();
+
+         const int depth = (dst.getArrayData().getDepth() <
+                            src.getArrayData().getDepth() ?
+                            dst.getArrayData().getDepth() :
+                            src.getArrayData().getDepth());
+
+         const int box_w0 = copybox.numberCells(0);
+
+         const int dst_w0 = dst.getArrayData().getBox().numberCells(0);
+         int src_w0 = src.getArrayData().getBox().numberCells(0);
+         if (num_rotations == 3) {
+            src_w0 = -src_w0;
+         }
+         const int box_w1 = copybox.numberCells(1);
+
+         const int dst_offset = dst.getArrayData().getOffset();
+         const int src_offset = src.getArrayData().getOffset();
+
+         int dst_bd = dst.getArrayData().getBox().offset(copybox.lower());
+         hier::Index src_index(copybox.lower() - shift);
+
+         // rotate src_index 4-num_rotations;
+         for (int r = 0; r < 4 - num_rotations; r++) {
+            hier::Index tmp_index(src_index);
+            src_index(0) = tmp_index(1);
+            src_index(1) = -tmp_index(0);
+         }
+
+         int src_bd_orig = src.getArrayData().getBox().offset(src_index);
+
+         for (int d = 0; d < depth; d++) {
+            int src_bd = src_bd_orig;
+            int dst_b2 = dst_bd;
+            int src_b2 = src_bd;
+            int dst_b1 = dst_b2;
+            int src_b1 = src_b2;
+
+            for (int i1 = 0; i1 < box_w1; i1++) {
+
+               for (int i0 = 0; i0 < box_w0; i0++) {
+                  if (i0) {
+                     if (num_rotations % 2) {
+                        src_b1 += src_w0;
+                     } else {
+                        src_b1--;
+                     }
+                  }
+                  dst_ptr[dst_b1 + i0] = src_ptr[src_b1];
+               }
+               dst_b1 += dst_w0;
+               if (num_rotations == 1) {
+                  src_b1 = --src_bd;
+               } else if (num_rotations == 2) {
+                  src_b1 = src_bd - src_w0;
+                  src_bd = src_b1;
+               } else if (num_rotations == 3) {
+                  src_b1 = ++src_bd;
+               }
+            }
+
+            dst_bd += dst_offset;
+            src_bd_orig += src_offset;
+         }
+      }
+   } else if (dim == tbox::Dimension(3)) {
+      for (pdat::NodeIterator ni(dst.getBox()); ni; ni++) {
+         pdat::NodeIndex dst_index(ni());
+
+         hier::MultiblockPatchHierarchy::RotationIdentifier back_rotate =
+            hier::MultiblockPatchHierarchy::getReverseRotationIdentifier(rotate);
+
+         hier::Box src_box(dst_index, dst_index);
+
+         src_box.rotate(back_rotate);
+
+         hier::IntVector back_shift(dim, 0);
+
+         hier::MultiblockPatchHierarchy::calculateReverseShift(
+            back_shift, shift, rotate);
+
+         src_box.shift(back_shift);
+
+         pdat::NodeIndex src_index(dim);
+         for (int n = 0; n < dim.getValue(); n++) {
+            src_index(n) = src_box.lower() (n);
+         }
+
+         switch (rotate) {
+
+            case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+            case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+            case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+               break;
+
+            case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+            case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+            case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+               src_index(0)++;
+               break;
+
+            case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+            case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+            case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+               src_index(2)++;
+               break;
+
+            case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+            case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+            case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+               src_index(0)++;
+               src_index(2)++;
+               break;
+
+            case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+            case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+            case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+               src_index(1)++;
+               break;
+
+            case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+            case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+            case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+               src_index(0)++;
+               src_index(1)++;
+               break;
+
+            case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+            case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+            case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+               src_index(1)++;
+               src_index(2)++;
+               break;
+
+            case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+            case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+            case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+               src_index(0)++;
+               src_index(1)++;
+               src_index(2)++;
+               break;
+
+            default:
+               TBOX_ERROR(" ");
+               break;
+         }
+
+         //back rotate src_index into src index space
+         //back shift src_index to needed location
+         //copy data from src_index to dst_index
+
+         for (int d = 0; d < dst.getDepth(); d++) {
+            dst(dst_index, d) = src(src_index, d);
+         }
+      }
+   } else {
+      TBOX_ERROR(
+         "MBDataUtilities<TYPE>::translateAndCopyNodeData : dim = 1 or > 3 not implemented");
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Translation and copy for face data                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void MBDataUtilities<TYPE>::translateAndCopyFaceData(
+   pdat::FaceData<TYPE>& dst,
+   const pdat::FaceData<TYPE>& src,
+   const hier::IntVector& shift,
+   const hier::MultiblockPatchHierarchy::RotationIdentifier rotate)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst, src, shift);
+
+   const tbox::Dimension& dim(shift.getDim());
+
+   if (rotate == 0) {
+      for (int axis = 0; axis < dim.getValue(); axis++) {
+         hier::Index face_shift(dim);
+         for (int d = 0; d < dim.getValue(); d++) {
+            face_shift(d) = shift((axis + d) % dim.getValue());
+         }
+         translateAndCopyArrayData(dst.getArrayData(axis),
+            src.getArrayData(axis),
+            face_shift,
+            rotate);
+      }
+   } else if (dim == tbox::Dimension(2)) {
+      for (int axis = 0; axis < dim.getValue(); axis++) {
+         for (pdat::FaceIterator fi(dst.getBox(), axis); fi; fi++) {
+            pdat::FaceIndex dst_index(fi());
+            hier::Index dst_xyz_index(dst_index);
+            if (axis == 1) {
+               dst_xyz_index(0) = dst_index(1);
+               dst_xyz_index(1) = dst_index(0);
+            }
+
+            hier::Index src_xyz_index(dst_xyz_index);
+
+            int num_rotations = (4 - rotate) % 4;
+            hier::IntVector copy_shift(shift);
+
+            int src_axis;
+            if (num_rotations % 2) {
+               src_axis = (axis + 1) % dim.getValue();
+            } else {
+               src_axis = axis;
+            }
+
+            for (int r = 0; r < num_rotations; r++) {
+               hier::Index tmp_index(src_xyz_index);
+               src_xyz_index(0) = tmp_index(1);
+               src_xyz_index(1) = -tmp_index(0) - 1;
+               hier::IntVector tmp_shift(copy_shift);
+               copy_shift(0) = tmp_shift(1);
+               copy_shift(1) = -tmp_shift(0);
+            }
+
+            for (int i = 0; i < dim.getValue(); i++) {
+               src_xyz_index(i) -= copy_shift(i);
+            }
+
+            pdat::FaceIndex src_index(dim);
+            if (src_axis == 1) {
+               src_index(0) = src_xyz_index(1);
+               if (num_rotations == 1 || num_rotations == 2) {
+                  src_index(0)++;
+               }
+               src_index(1) = src_xyz_index(0);
+            } else {
+               src_index(0) = src_xyz_index(0);
+               if ((num_rotations == 3) || (num_rotations == 2)) {
+                  src_index(0)++;
+               }
+               src_index(1) = src_xyz_index(1);
+            }
+            src_index.setAxis(src_axis);
+
+            for (int d = 0; d < dst.getDepth(); d++) {
+               dst(dst_index, d) = src(src_index, d);
+            }
+         }
+      }
+   } else if (dim == tbox::Dimension(3)) {
+      for (int axis = 0; axis < dim.getValue(); axis++) {
+         int src_axis;
+         if (axis == 0) {
+            switch (rotate) {
+
+               case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+               case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+               case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+               case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+               case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+               case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+               case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+               case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+
+                  src_axis = 0;
+                  break;
+
+               case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+               case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+               case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+               case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+               case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+               case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+               case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+               case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+
+                  src_axis = 1;
+                  break;
+
+               default:
+
+                  src_axis = 2;
+                  break;
+
+            }
+         } else if (axis == 1) {
+            switch (rotate) {
+               case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+               case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+               case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+               case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+               case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+               case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+               case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+               case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+
+                  src_axis = 0;
+                  break;
+
+               case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+               case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+               case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+               case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+               case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+               case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+               case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+               case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+
+                  src_axis = 1;
+                  break;
+
+               default:
+
+                  src_axis = 2;
+                  break;
+
+            }
+
+         } else {
+
+            switch (rotate) {
+               case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+               case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+               case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+               case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+               case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+               case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+               case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+               case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+                  src_axis = 0;
+                  break;
+
+               case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+               case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+               case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+               case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+               case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+               case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+               case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+               case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+
+                  src_axis = 1;
+                  break;
+
+               default:
+
+                  src_axis = 2;
+                  break;
+
+            }
+         }
+         for (pdat::FaceIterator fi(dst.getBox(), axis); fi; fi++) {
+            pdat::FaceIndex dst_index(fi());
+            hier::Index dst_xyz_index(dst_index);
+            if (axis == 1) {
+               dst_xyz_index(0) = dst_index(2);
+               dst_xyz_index(1) = dst_index(0);
+               dst_xyz_index(2) = dst_index(1);
+            } else if (axis == 2) {
+               dst_xyz_index(0) = dst_index(1);
+               dst_xyz_index(1) = dst_index(2);
+               dst_xyz_index(2) = dst_index(0);
+            }
+
+            hier::MultiblockPatchHierarchy::RotationIdentifier back_rotate =
+               hier::MultiblockPatchHierarchy::
+               getReverseRotationIdentifier(rotate);
+
+            hier::Box src_box(dst_xyz_index, dst_xyz_index);
+
+            src_box.rotate(back_rotate);
+
+            hier::IntVector back_shift(dim, 0);
+
+            hier::MultiblockPatchHierarchy::calculateReverseShift(
+               back_shift, shift, rotate);
+
+            src_box.shift(back_shift);
+
+            hier::Index src_xyz_index(dim);
+            for (int i = 0; i < dim.getValue(); i++) {
+               src_xyz_index(i) = src_box.lower() (i);
+            }
+
+            pdat::FaceIndex src_index(dim);
+            if (src_axis == 0) {
+               src_index(0) = src_xyz_index(0);
+               src_index(1) = src_xyz_index(1);
+               src_index(2) = src_xyz_index(2);
+            } else if (src_axis == 1) {
+               src_index(0) = src_xyz_index(1);
+               src_index(1) = src_xyz_index(2);
+               src_index(2) = src_xyz_index(0);
+            } else {
+               src_index(0) = src_xyz_index(2);
+               src_index(1) = src_xyz_index(0);
+               src_index(2) = src_xyz_index(1);
+            }
+
+            if (axis == 0) {
+               switch (rotate) {
+
+                  case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+                  case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+                  case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+                  case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+                  case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+                  case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+                  case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+                  case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+                  case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+                  case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+                  case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+                  case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+                     break;
+
+                  case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+                  case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+                  case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+                  case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+                  case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+                  case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+                  case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+                  case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+                  case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+                  case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+                  case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+                  case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+                     src_index(0)++;
+                     break;
+
+                  default:
+                     TBOX_ERROR(" ");
+                     break;
+               }
+            } else if (axis == 1) {
+               switch (rotate) {
+
+                  case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+                  case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+                  case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+                  case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+                  case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+                  case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+                  case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+                  case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+                  case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+                  case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+                  case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+                  case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+                     break;
+
+                  case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+                  case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+                  case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+                  case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+                  case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+                  case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+                  case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+                  case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+                  case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+                  case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+                  case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+                  case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+                     src_index(0)++;
+                     break;
+
+                  default:
+                     TBOX_ERROR(" ");
+                     break;
+               }
+            } else {
+               switch (rotate) {
+
+                  case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+                  case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+                  case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+                  case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+                  case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+                  case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+                  case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+                  case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+                  case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+                  case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+                  case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+                  case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+                     break;
+
+                  case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+                  case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+                  case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+                  case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+                  case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+                  case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+                  case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+                  case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+                  case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+                  case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+                  case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+                  case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+                     src_index(0)++;
+                     break;
+
+                  default:
+                     TBOX_ERROR(" ");
+                     break;
+               }
+            }
+
+            src_index.setAxis(src_axis);
+
+            for (int d = 0; d < dst.getDepth(); d++) {
+               dst(dst_index, d) = src(src_index, d);
+            }
+         }
+      }
+   } else {
+      TBOX_ERROR(
+         "MBDataUtilities<TYPE>::translateAndCopyFaceData : dim = 1 or > 3 not implemented");
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Translation and copy for side data                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void MBDataUtilities<TYPE>::translateAndCopySideData(
+   pdat::SideData<TYPE>& dst,
+   const pdat::SideData<TYPE>& src,
+   const hier::IntVector& shift,
+   const hier::MultiblockPatchHierarchy::RotationIdentifier rotate)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst, src, shift);
+   TBOX_ASSERT(dst.getDirectionVector() == src.getDirectionVector());
+
+   const tbox::Dimension& dim(shift.getDim());
+
+   hier::IntVector dir_vector(dst.getDirectionVector());
+   if (rotate == 0) {
+      for (int axis = 0; axis < dim.getValue(); axis++) {
+         if (dir_vector(axis)) {
+            translateAndCopyArrayData(dst.getArrayData(axis),
+               src.getArrayData(axis),
+               shift,
+               rotate);
+         }
+      }
+   } else if (dim == tbox::Dimension(2)) {
+      for (int axis = 0; axis < dim.getValue(); axis++) {
+         if (dir_vector(axis)) {
+            for (pdat::SideIterator fi(dst.getBox(), axis); fi; fi++) {
+               pdat::SideIndex dst_index(fi());
+               hier::Index dst_xyz_index(dst_index);
+
+               hier::Index src_xyz_index(dst_xyz_index);
+
+               int num_rotations = (4 - rotate) % 4;
+               hier::IntVector copy_shift(shift);
+
+               int src_axis;
+               if (num_rotations % 2) {
+                  src_axis = (axis + 1) % dim.getValue();
+               } else {
+                  src_axis = axis;
+               }
+
+               for (int r = 0; r < num_rotations; r++) {
+                  hier::Index tmp_index(src_xyz_index);
+                  src_xyz_index(0) = tmp_index(1);
+                  src_xyz_index(1) = -tmp_index(0) - 1;
+                  hier::IntVector tmp_shift(copy_shift);
+                  copy_shift(0) = tmp_shift(1);
+                  copy_shift(1) = -tmp_shift(0);
+               }
+
+               for (int i = 0; i < dim.getValue(); i++) {
+                  src_xyz_index(i) -= copy_shift(i);
+               }
+
+               pdat::SideIndex src_index(dim);
+               if (src_axis == 1) {
+                  src_index(0) = src_xyz_index(0);
+                  src_index(1) = src_xyz_index(1);
+                  if (num_rotations == 1 || num_rotations == 2) {
+                     src_index(1)++;
+                  }
+               } else {
+                  src_index(0) = src_xyz_index(0);
+                  if ((num_rotations == 3) || (num_rotations == 2)) {
+                     src_index(0)++;
+                  }
+                  src_index(1) = src_xyz_index(1);
+               }
+               src_index.setAxis(src_axis);
+
+               for (int d = 0; d < dst.getDepth(); d++) {
+                  dst(dst_index, d) = src(src_index, d);
+               }
+            }
+         }
+      }
+   } else if (dim == tbox::Dimension(3)) {
+      for (int axis = 0; axis < dim.getValue(); axis++) {
+         if (dir_vector(axis)) {
+            int src_axis;
+            if (axis == 0) {
+               switch (rotate) {
+
+                  case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+                  case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+                  case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+                  case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+                  case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+                  case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+                  case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+                  case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+
+                     src_axis = 0;
+                     break;
+
+                  case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+                  case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+                  case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+                  case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+                  case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+                  case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+                  case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+                  case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+
+                     src_axis = 1;
+                     break;
+
+                  default:
+
+                     src_axis = 2;
+                     break;
+
+               }
+            } else if (axis == 1) {
+
+               switch (rotate) {
+                  case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+                  case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+                  case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+                  case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+                  case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+                  case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+                  case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+                  case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+
+                     src_axis = 0;
+                     break;
+
+                  case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+                  case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+                  case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+                  case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+                  case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+                  case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+                  case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+                  case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+
+                     src_axis = 1;
+                     break;
+
+                  default:
+
+                     src_axis = 2;
+                     break;
+
+               }
+
+            } else {
+
+               switch (rotate) {
+                  case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+                  case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+                  case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+                  case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+                  case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+                  case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+                  case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+                  case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+                     src_axis = 0;
+                     break;
+
+                  case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+                  case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+                  case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+                  case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+                  case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+                  case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+                  case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+                  case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+
+                     src_axis = 1;
+                     break;
+
+                  default:
+
+                     src_axis = 2;
+                     break;
+
+               }
+            }
+
+            for (pdat::SideIterator si(dst.getBox(), axis); si; si++) {
+               pdat::SideIndex dst_index(si());
+               hier::Index dst_xyz_index(dst_index);
+
+               hier::MultiblockPatchHierarchy::RotationIdentifier back_rotate =
+                  hier::MultiblockPatchHierarchy::
+                  getReverseRotationIdentifier(rotate);
+
+               hier::Box src_box(dst_xyz_index, dst_xyz_index);
+
+               src_box.rotate(back_rotate);
+
+               hier::IntVector back_shift(dim, 0);
+               hier::MultiblockPatchHierarchy::calculateReverseShift(
+                  back_shift, shift, rotate);
+
+               src_box.shift(back_shift);
+
+               hier::Index src_xyz_index(dim);
+               for (int i = 0; i < dim.getValue(); i++) {
+                  src_xyz_index(i) = src_box.lower() (i);
+               }
+
+               pdat::SideIndex src_index(dim);
+               src_index(0) = src_xyz_index(0);
+               src_index(1) = src_xyz_index(1);
+               src_index(2) = src_xyz_index(2);
+
+               if (axis == 0) {
+                  switch (rotate) {
+
+                     case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+                     case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+                     case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+                     case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+                     case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+                     case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+                     case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+                     case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+                     case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+                     case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+                     case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+                     case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+                        break;
+
+                     case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+                     case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+                     case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+                     case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+                     case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+                     case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+                     case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+                     case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+                     case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+                     case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+                     case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+                     case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+                        src_index(src_axis)++;
+                        break;
+
+                     default:
+                        TBOX_ERROR(" ");
+                        break;
+                  }
+               } else if (axis == 1) {
+                  switch (rotate) {
+
+                     case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+                     case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+                     case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+                     case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+                     case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+                     case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+                     case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+                     case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+                     case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+                     case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+                     case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+                     case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+                        break;
+
+                     case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+                     case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+                     case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+                     case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+                     case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+                     case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+                     case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+                     case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+                     case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+                     case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+                     case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+                     case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+                        src_index(src_axis)++;
+                        break;
+
+                     default:
+                        TBOX_ERROR(" ");
+                        break;
+                  }
+               } else {
+                  switch (rotate) {
+
+                     case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+                     case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+                     case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+                     case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+                     case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+                     case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+                     case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+                     case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+                     case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+                     case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+                     case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+                     case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+                        break;
+
+                     case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+                     case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+                     case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+                     case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+                     case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+                     case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+                     case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+                     case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+                     case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+                     case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+                     case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+                     case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+                        src_index(src_axis)++;
+                        break;
+
+                     default:
+                        TBOX_ERROR(" ");
+                        break;
+                  }
+               }
+
+               src_index.setAxis(src_axis);
+
+               for (int d = 0; d < dst.getDepth(); d++) {
+                  dst(dst_index, d) = src(src_index, d);
+               }
+            }
+         }
+      }
+   } else {
+      TBOX_ERROR(
+         "MBDataUtilities<TYPE>::translateAndCopySideData : dim = 1 or > 3 not implemented");
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Translation and copy for edge data                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void MBDataUtilities<TYPE>::translateAndCopyEdgeData(
+   pdat::EdgeData<TYPE>& dst,
+   const pdat::EdgeData<TYPE>& src,
+   const hier::IntVector& shift,
+   const hier::MultiblockPatchHierarchy::RotationIdentifier rotate)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst, src, shift);
+
+   const tbox::Dimension& dim(shift.getDim());
+
+   if (rotate == 0) {
+      for (int axis = 0; axis < dim.getValue(); axis++) {
+         translateAndCopyArrayData(dst.getArrayData(axis),
+            src.getArrayData(axis),
+            shift,
+            rotate);
+      }
+   } else if (dim == tbox::Dimension(2)) {
+      for (int axis = 0; axis < dim.getValue(); axis++) {
+         for (pdat::EdgeIterator fi(dst.getBox(), axis); fi; fi++) {
+
+            pdat::EdgeIndex dst_index(fi());
+            hier::Index dst_xyz_index(dst_index);
+
+            hier::Index src_xyz_index(dst_xyz_index);
+
+            int num_rotations = (4 - rotate) % 4;
+            hier::IntVector copy_shift(shift);
+
+            int src_axis;
+            if (num_rotations % 2) {
+               src_axis = (axis + 1) % dim.getValue();
+            } else {
+               src_axis = axis;
+            }
+
+            for (int r = 0; r < num_rotations; r++) {
+               hier::Index tmp_index(src_xyz_index);
+               src_xyz_index(0) = tmp_index(1);
+               src_xyz_index(1) = -tmp_index(0) - 1;
+               hier::IntVector tmp_shift(copy_shift);
+               copy_shift(0) = tmp_shift(1);
+               copy_shift(1) = -tmp_shift(0);
+            }
+
+            for (int i = 0; i < dim.getValue(); i++) {
+               src_xyz_index(i) -= copy_shift(i);
+            }
+
+            pdat::EdgeIndex src_index(dim);
+            if (src_axis == 0) {
+               src_index(0) = src_xyz_index(0);
+               src_index(1) = src_xyz_index(1);
+               if (num_rotations == 1 || num_rotations == 2) {
+                  src_index(1)++;
+               }
+            } else {
+               src_index(0) = src_xyz_index(0);
+               if ((num_rotations == 3) || (num_rotations == 2)) {
+                  src_index(0)++;
+               }
+               src_index(1) = src_xyz_index(1);
+            }
+            src_index.setAxis(src_axis);
+
+            for (int d = 0; d < dst.getDepth(); d++) {
+               dst(dst_index, d) = src(src_index, d);
+            }
+         }
+      }
+   } else if (dim == tbox::Dimension(3)) {
+      for (int axis = 0; axis < dim.getValue(); axis++) {
+         int src_axis;
+         if (axis == 0) {
+
+            switch (rotate) {
+
+               case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+               case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+               case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+               case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+               case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+               case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+               case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+               case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+
+                  src_axis = 0;
+                  break;
+
+               case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+               case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+               case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+               case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+               case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+               case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+               case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+               case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+
+                  src_axis = 1;
+                  break;
+
+               default:
+
+                  src_axis = 2;
+                  break;
+
+            }
+         } else if (axis == 1) {
+            switch (rotate) {
+               case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+               case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+               case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+               case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+               case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+               case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+               case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+               case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+
+                  src_axis = 0;
+                  break;
+
+               case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+               case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+               case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+               case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+               case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+               case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+               case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+               case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+
+                  src_axis = 1;
+                  break;
+
+               default:
+
+                  src_axis = 2;
+                  break;
+
+            }
+         } else {
+            switch (rotate) {
+               case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+               case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+               case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+               case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+               case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+               case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+               case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+               case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+
+                  src_axis = 0;
+                  break;
+
+               case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+               case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+               case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+               case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+               case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+               case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+               case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+               case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+
+                  src_axis = 1;
+                  break;
+
+               default:
+
+                  src_axis = 2;
+                  break;
+
+            }
+         }
+
+         for (pdat::EdgeIterator fi(dst.getBox(), axis); fi; fi++) {
+            pdat::EdgeIndex dst_index(fi());
+
+            hier::MultiblockPatchHierarchy::RotationIdentifier back_rotate =
+               hier::MultiblockPatchHierarchy::
+               getReverseRotationIdentifier(rotate);
+
+            hier::Box src_box(dst_index, dst_index);
+
+            src_box.rotate(back_rotate);
+
+            hier::IntVector back_shift(dim);
+
+            hier::MultiblockPatchHierarchy::calculateReverseShift(back_shift,
+               shift,
+               rotate);
+
+            src_box.shift(back_shift);
+
+            pdat::EdgeIndex src_index(dim);
+            for (int i = 0; i < dim.getValue(); i++) {
+               src_index(i) = src_box.lower() (i);
+            }
+
+            switch (rotate) {
+
+               case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+               case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+               case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+                  break;
+
+               case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+                  if ((axis == 1) || (axis == 2)) {
+                     src_index(0)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+                  if ((axis == 0) || (axis == 1)) {
+                     src_index(0)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+                  if ((axis == 0) || (axis == 2)) {
+                     src_index(0)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+                  if ((axis == 1) || (axis == 2)) {
+                     src_index(2)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+                  if ((axis == 0) || (axis == 2)) {
+                     src_index(2)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+                  if ((axis == 0) || (axis == 1)) {
+                     src_index(2)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+                  if ((axis == 0) || (axis == 2)) {
+                     src_index(0)++;
+                  }
+                  if ((axis == 1) || (axis == 2)) {
+                     src_index(2)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+                  if ((axis == 0) || (axis == 1)) {
+                     src_index(2)++;
+                  }
+                  if ((axis == 1) || (axis == 2)) {
+                     src_index(0)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+                  if ((axis == 0) || (axis == 1)) {
+                     src_index(0)++;
+                  }
+                  if ((axis == 0) || (axis == 2)) {
+                     src_index(2)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+                  if ((axis == 1) || (axis == 2)) {
+                     src_index(1)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+                  if ((axis == 0) || (axis == 1)) {
+                     src_index(1)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+                  if ((axis == 0) || (axis == 2)) {
+                     src_index(1)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+                  if ((axis == 0) || (axis == 1)) {
+                     src_index(0)++;
+                  }
+                  if ((axis == 1) || (axis == 2)) {
+                     src_index(1)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+                  if ((axis == 0) || (axis == 2)) {
+                     src_index(1)++;
+                  }
+                  if ((axis == 1) || (axis == 2)) {
+                     src_index(0)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+                  if ((axis == 0) || (axis == 2)) {
+                     src_index(0)++;
+                  }
+                  if ((axis == 0) || (axis == 1)) {
+                     src_index(1)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+                  if ((axis == 0) || (axis == 2)) {
+                     src_index(2)++;
+                  }
+                  if ((axis == 1) || (axis == 2)) {
+                     src_index(1)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+                  if ((axis == 0) || (axis == 1)) {
+                     src_index(1)++;
+                  }
+                  if ((axis == 1) || (axis == 2)) {
+                     src_index(2)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+                  if ((axis == 0) || (axis == 2)) {
+                     src_index(1)++;
+                  }
+                  if ((axis == 0) || (axis == 1)) {
+                     src_index(2)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+                  if ((axis == 0) || (axis == 2)) {
+                     src_index(0)++;
+                  }
+                  if ((axis == 1) || (axis == 2)) {
+                     src_index(1)++;
+                  }
+                  if ((axis == 0) || (axis == 1)) {
+                     src_index(2)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+                  if ((axis == 0) || (axis == 1)) {
+                     src_index(0)++;
+                  }
+                  if ((axis == 0) || (axis == 2)) {
+                     src_index(1)++;
+                  }
+                  if ((axis == 1) || (axis == 2)) {
+                     src_index(2)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+                  if ((axis == 1) || (axis == 2)) {
+                     src_index(0)++;
+                  }
+                  if ((axis == 0) || (axis == 1)) {
+                     src_index(1)++;
+                  }
+                  if ((axis == 0) || (axis == 2)) {
+                     src_index(2)++;
+                  }
+                  break;
+
+               default:
+                  break;
+
+            }
+
+            src_index.setAxis(src_axis);
+
+            //back rotate src_index into src index space
+            //back shift src_index to needed location
+            //copy data from src_index to dst_index
+
+            for (int d = 0; d < dst.getDepth(); d++) {
+               dst(dst_index, d) = src(src_index, d);
+            }
+         }
+      }
+   } else {
+      TBOX_ERROR(
+         "MBDataUtilities<TYPE>::translateAndCopyEdgeData : dim = 1 or > 3 not implemented");
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Translation and copy for array data                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void MBDataUtilities<TYPE>::translateAndCopyArrayData(
+   pdat::ArrayData<TYPE>& dst,
+   const pdat::ArrayData<TYPE>& src,
+   const hier::IntVector& shift,
+   const hier::MultiblockPatchHierarchy::RotationIdentifier rotate)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst, src, shift);
+
+   const tbox::Dimension& dim(dst.getDim());
+
+   bool no_rotate = true;
+   if (rotate != 0) {
+      no_rotate = false;
+   }
+
+   if (no_rotate) {
+      dst.copy(src, dst.getBox(), shift);
+   } else if (dim < 3) {
+      hier::Box rotatebox(src.getBox());
+      int num_rotations = rotate;
+
+      rotatebox.rotate(num_rotations);
+
+      const hier::Box copybox = dst.getBox()
+         * hier::Box::shift(rotatebox, shift);
+
+      if (!copybox.empty()) {
+         TYPE * const dst_ptr = dst.getPointer();
+         const TYPE * const src_ptr = src.getPointer();
+
+         const int depth = (dst.getDepth() < src.getDepth() ?
+                            dst.getDepth() : src.getDepth());
+
+         const int box_w0 = copybox.numberCells(0);
+
+         const int dst_w0 = dst.getBox().numberCells(0);
+         int src_w0 = src.getBox().numberCells(0);
+         if (num_rotations == 3) {
+            src_w0 = -src_w0;
+         }
+         const int box_w1 = copybox.numberCells(1);
+
+         const int dst_offset = dst.getOffset();
+         const int src_offset = src.getOffset();
+
+         int dst_bd = dst.getBox().offset(copybox.lower());
+         hier::Index src_index(copybox.lower() - shift);
+
+         // rotate src_index 4-num_rotations;
+         for (int r = 0; r < 4 - num_rotations; r++) {
+            hier::Index tmp_index(src_index);
+            src_index(0) = tmp_index(1);
+            src_index(1) = -tmp_index(0) - 1;
+         }
+
+         int src_bd_orig = src.getBox().offset(src_index);
+
+         for (int d = 0; d < depth; d++) {
+            int src_bd = src_bd_orig;
+            int dst_b2 = dst_bd;
+            int src_b2 = src_bd;
+            int dst_b1 = dst_b2;
+            int src_b1 = src_b2;
+
+            for (int i1 = 0; i1 < box_w1; i1++) {
+
+               for (int i0 = 0; i0 < box_w0; i0++) {
+                  if (i0) {
+                     if (num_rotations % 2) {
+                        src_b1 += src_w0;
+                     } else {
+                        src_b1--;
+                     }
+                  }
+                  dst_ptr[dst_b1 + i0] = src_ptr[src_b1];
+               }
+
+               dst_b1 += dst_w0;
+               if (num_rotations == 1) {
+                  src_b1 = --src_bd;
+               } else if (num_rotations == 2) {
+                  src_b1 = src_bd - src_w0;
+                  src_bd = src_b1;
+               } else if (num_rotations == 3) {
+                  src_b1 = ++src_bd;
+               }
+            }
+
+            dst_bd += dst_offset;
+            src_bd_orig += src_offset;
+         }
+      }
+   } else {
+      TBOX_ERROR(
+         "MBDataUtilities<TYPE>::translateAndCopyEdgeData : dim = 1 or > 3 not implemented");
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/MBDataUtilities.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/MBDataUtilities.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,163 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations copying patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_MBDataUtilities
+#define included_pdat_MBDataUtilities
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/hier/MultiblockPatchHierarchy.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/SideData.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * @brief Class MBDataUtilities<TYPE> is a templated utilitiy class that
+ * contains a set of static member functions that can be used to copy
+ * patch data between index spaces that are not necessarily aligned
+ * on the same axes.
+ *
+ * This class currently contains functions to copy cell, edge, node, face,
+ * and side-centered data, as well as array data.
+ *
+ * @see hier::PatchData
+ * @see hier::MultiblockPatchHierarchy
+ * @see hier::MBUtilities
+ */
+
+template<class TYPE>
+class MBDataUtilities
+{
+public:
+   /*!
+    * Empty constructor and destructor.
+    */
+   MBDataUtilities();
+
+   virtual ~MBDataUtilities<TYPE>();
+
+   /*!
+    * @brief Translate and copy cell data from src to dst according the shift
+    * and rotation.
+    *
+    * @param dst destination data
+    * @param src source data
+    * @param shift shift needed after rotation
+    * @param rotate identifier of the rotation between two index spaces
+    */
+   static
+   void
+   translateAndCopyCellData(
+      pdat::CellData<TYPE>& dst,
+      const pdat::CellData<TYPE>& src,
+      const hier::IntVector& shift,
+      const hier::MultiblockPatchHierarchy::RotationIdentifier rotate);
+
+   /*!
+    * @brief Translate and copy node data from src to dst according the shift
+    * and rotation.
+    *
+    * @param dst destination data
+    * @param src source data
+    * @param shift shift needed after rotation
+    * @param rotate identifier of the rotation between two index spaces
+    */
+   static
+   void
+   translateAndCopyNodeData(
+      pdat::NodeData<TYPE>& dst,
+      const pdat::NodeData<TYPE>& src,
+      const hier::IntVector& shift,
+      const hier::MultiblockPatchHierarchy::RotationIdentifier rotate);
+
+   /*!
+    * @brief Translate and copy face data from src to dst according the shift
+    * and rotation.
+    *
+    * @param dst destination data
+    * @param src source data
+    * @param shift shift needed after rotation
+    * @param rotate identifier of the rotation between two index spaces
+    */
+   static
+   void
+   translateAndCopyFaceData(
+      pdat::FaceData<TYPE>& dst,
+      const pdat::FaceData<TYPE>& src,
+      const hier::IntVector& shift,
+      const hier::MultiblockPatchHierarchy::RotationIdentifier rotate);
+
+   /*!
+    * @brief Translate and copy side data from src to dst according the shift
+    * and rotation.
+    *
+    * @param dst destination data
+    * @param src source data
+    * @param shift shift needed after rotation
+    * @param rotate identifier of the rotation between two index spaces
+    */
+   static
+   void
+   translateAndCopySideData(
+      pdat::SideData<TYPE>& dst,
+      const pdat::SideData<TYPE>& src,
+      const hier::IntVector& shift,
+      const hier::MultiblockPatchHierarchy::RotationIdentifier rotate);
+
+   /*!
+    * @brief Translate and copy edge data from src to dst according the shift
+    * and rotation.
+    *
+    * @param dst destination data
+    * @param src source data
+    * @param shift shift needed after rotation
+    * @param rotate identifier of the rotation between two index spaces
+    */
+   static
+   void
+   translateAndCopyEdgeData(
+      pdat::EdgeData<TYPE>& dst,
+      const pdat::EdgeData<TYPE>& src,
+      const hier::IntVector& shift,
+      const hier::MultiblockPatchHierarchy::RotationIdentifier rotate);
+
+   /*!
+    * @brief Translate and copy array data from src to dst according the shift
+    * and rotation.
+    *
+    * @param dst destination data
+    * @param src source data
+    * @param shift shift needed after rotation
+    * @param rotate identifier of the rotation between two index spaces
+    */
+   static
+   void
+   translateAndCopyArrayData(
+      pdat::ArrayData<TYPE>& dst,
+      const pdat::ArrayData<TYPE>& src,
+      const hier::IntVector& shift,
+      const hier::MultiblockPatchHierarchy::RotationIdentifier rotate);
+
+private:
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/MBDataUtilities.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/MDA_Access.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/MDA_Access.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1411 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Light-weight array class 
+ *
+ ************************************************************************/
+#ifndef include_MDA_Access_h
+#define include_MDA_Access_h
+
+#include <sys/types.h>
+#include <cassert>
+#include <iostream>
+
+/* SGS TODO
+ * This file is not written to SAMRAI coding style guidelines
+ * And has horried commenting conventions (e.g. comments to left of code!)
+ */
+
+/*!
+ * @file
+ * @brief Provides classes supporting Fortran-style
+ * multidimensional array accessing in C++.
+ *
+ * The classes are written for performance (or at least
+ * to not degrade performance), so they are almost all
+ * inlined with no run-time toggle-able error checking.
+ * It is possible that this approach leads to long
+ * compile times and large binaries if you are using
+ * a not-so-smart compiler.  In theory though, because
+ * these classes are not doing any extraneous computations,
+ * it generates codes that are as optimizable as any
+ * other code doing similar functions, including Fortran
+ * codes.
+ *
+ * Five classes are defined in this file:
+ * -# MDA_IndexRange: a class to define and
+ *   manipulate index range objects.
+ * -# MDA_OrderRowMajor: class with functions
+ *   to compute order-dependent info from the index
+ *   range.  This version is for row-major order.
+ * -# MDA_OrderColMajor: the column-major
+ *   counterpart of MDA_OrderRowMajor.
+ * -# MDA_Access: class to allow access to individually
+ *   indexed elements of a multidimensional array.
+ * -# MDA_AccessConst: the const counterpart of
+ *   MDA_Access, to allow read-only access to data.
+ *
+ * To give the compiler the maximum amount of information
+ * with which to perform optimization, always use locally
+ * scoped objects.  These classes are very light-weight,
+ * so copying them is cheap.
+ */
+
+/*!
+ * @brief Defines index ranges for multidimensional arrays
+ *
+ * Defines the abstract index range and methods for setting
+ * and accessing it.
+ *
+ * Nothing is known about the ordering of the array.
+ */
+template<unsigned short MDA_DIM>
+class MDA_IndexRange
+{
+
+public:
+   /*!
+    * @brief Type for the dimension counter.
+    *
+    * Type dim_t could be "unsigned short" instead of "short",
+    * but using short causes the GNU compiler to issue unneeded
+    * warnings about certain comparisons always being false
+    * (when instantiating with MDA_DIM of 1).
+    */
+   typedef short dim_t;
+   /*!
+    * @brief Type for the index.
+    */
+   typedef int index_t;
+
+protected:
+   //! @brief Dimension number (to avoid compiler warnings, set to zero when unused).
+   enum { D0 = 0,
+          D1 = (MDA_DIM > 1 ? 1 : 0),
+          D2 = (MDA_DIM > 2 ? 2 : 0),
+          D3 = (MDA_DIM > 3 ? 3 : 0),
+          D4 = (MDA_DIM > 4 ? 4 : 0) };
+
+public:
+   /*!
+    * @brief Constructor for setting index data using size and
+    * starting points.
+    *
+    * Any pointers that are NULL are not used.
+    * The resulting default settings are:
+    * - Array sizes are 0
+    * - Array starting indices are 0
+    * Since all arguments have default values,
+    * this serves at the default constructor.
+    *
+    * There is another constructor which accepts the first and final
+    * indices instead of the sizes and first indices.
+    * @b NOTE: the place of the starting points is different than
+    * it is for the constructor taking final indices instead of sizes.
+    */
+   SAMRAI_INLINE_KEYWORD
+   MDA_IndexRange(
+      /*! Array sizes		*/const size_t* sz = ((size_t *)0),
+      /*! Array starting indices	*/const index_t* st = ((index_t *)0))
+   {
+      dim_t i;
+      if (st) {
+         for (i = 0; i < MDA_DIM; ++i) {
+            d_start[i] = st[i];
+         }
+      } else { for (i = 0; i < MDA_DIM; ++i) {
+                  d_start[i] = 0;
+               }
+      }
+      if (sz) {
+         for (i = 0; i < MDA_DIM; ++i) {
+            d_size[i] = sz[i];
+         }
+      } else { for (i = 0; i < MDA_DIM; ++i) {
+                  d_size[i] = 0;
+               }
+      }
+      setDependentData();
+   }
+
+   /*!
+    * @brief Constructor for setting index data to a range.
+    *
+    * This version takes two @c index_t* arguments, for the initial
+    * and final indices.  It does not support default arguments
+    * until after the indices argument.  @b NOTE: the place of the
+    * initial indices is different than it is for the constructor
+    * taking sizes instead of final indices.
+    *
+    * If @c si is @c NULL, starting indices are set to 0.
+    * If @c sf is @c NULL, sizes are set to zero.
+    */
+   SAMRAI_INLINE_KEYWORD
+   MDA_IndexRange(
+      /*! Array of initial indices	*/const index_t* si,
+      /*! Array of final indices	*/const index_t* sf)
+   {
+      index_t i;
+      if (si) {
+         for (i = 0; i < MDA_DIM; ++i) d_start[i] = si[i];
+      } else { for (i = 0; i < MDA_DIM; ++i) d_start[i] = 0;
+      }
+      if (sf) {
+         for (i = 0; i < MDA_DIM; ++i) d_size[i] = 1 + sf[i] - d_start[i];
+      } else { for (i = 0; i < MDA_DIM; ++i) d_size[i] = 0;
+      }
+      setDependentData();
+   }
+
+   /*!
+    * @brief Virtual destructor to support inheritance.
+    */
+   SAMRAI_INLINE_KEYWORD
+   virtual ~MDA_IndexRange() {
+   }
+
+   //@{ @name Functions to set indices
+
+   /*!
+    * Set size and starting indices.
+    */
+   SAMRAI_INLINE_KEYWORD
+   void setSizeAndStart(
+      /*! Array sizes (NULL for no change)		*/const size_t* sz = ((size_t *)0),
+      /*! Starting indices (NULL for no change)	*/ const index_t* st =
+         ((index_t *)0))
+   {
+      if (sz) for (dim_t i = 0; i < MDA_DIM; ++i) d_size[i] = sz[i];
+      if (st) for (dim_t i = 0; i < MDA_DIM; ++i) d_start[i] = st[i];
+      setDependentData();
+   }
+
+   /*!
+    * Set first and final indices (inclusive).
+    */
+   SAMRAI_INLINE_KEYWORD
+   void setInclusiveRange(
+      /*! First valid indices (NULL for no change)	*/const index_t first[
+         MDA_DIM],
+      /*! Final valid indices (NULL for no change)	*/const index_t final[
+         MDA_DIM])
+   {
+      if (first) for (dim_t i = 0; i < MDA_DIM; ++i) d_start[i] = first[i];
+      if (final) for (dim_t i = 0; i < MDA_DIM; ++i) d_size[i] = final[i]
+               - first[i] + 1;
+      setDependentData();
+   }
+
+   /*!
+    * @brief Adjust the dimensions
+    *
+    * Adjust the first and final indices.
+    * Set the dimension to adjust to >= MDA_DIM to adjust @em all dimensions.
+    * @b Note: The third argument is the increment to the final index
+    * and not the size.
+    *
+    * @b Note: No error checking is done, for example, to make sure that the
+    * resulting size is non-negative.
+    *
+    * @return Adjusted MDA_IndexRange object
+    */
+   SAMRAI_INLINE_KEYWORD
+   const MDA_IndexRange& adjustDim(
+      /*! Dimension to adjust	*/dim_t d,
+      /*! Increment to first index	*/index_t first,
+      /*! Increment to final index	*/index_t final)
+   {
+      if (d >= MDA_DIM) {
+         dim_t i;
+         for (i = 0; i < MDA_DIM; ++i) {
+            d_start[i] += first;
+            d_size[i] += final - first;
+         }
+      } else {
+         d_start[d] += first;
+         d_size[d] += final - first;
+      }
+      setDependentData();
+      return *this;
+   }
+
+   //@}
+
+   //@{ @name Comparison functions
+
+   /*!
+    * @brief Equivalence comparison
+    */
+   SAMRAI_INLINE_KEYWORD
+   bool operator == (
+      const MDA_IndexRange& r) const {
+      dim_t d;
+      for (d = 0; d < MDA_DIM; ++d) {
+         if (d_start[d] != r.d_start[d]) return false;
+
+         if (d_size[d] != r.d_size[d]) return false;
+      }
+      return true;
+   }
+
+   /*!
+    * @brief Inequivalence comparison
+    */
+   SAMRAI_INLINE_KEYWORD
+   bool operator != (
+      const MDA_IndexRange& r) const {
+      return !((*this) == r);
+   }
+
+   //@}
+
+   //@{ @name IO functions
+   /*!
+    * @brief Output to ostream.
+    */
+   std::ostream& streamPut(
+      std::ostream& os) const
+   {
+      os << MDA_DIM;
+      for (dim_t i = 0; i < MDA_DIM; ++i)
+         os << ' ' << d_start[i] << ' ' << d_size[i];
+      return os;
+   }
+   /*!
+    * @brief Input from istream.
+    */
+   std::istream& streamGet(
+      std::istream& is)
+   {
+      dim_t dim;
+      is >> dim;
+      assert(dim == MDA_DIM);
+      for (dim_t i = 0; i < MDA_DIM; ++i)
+         is >> d_start[i] >> d_size[i];
+      return is;
+   }
+
+   friend std::ostream& operator << (
+      std::ostream& os,
+      const MDA_IndexRange<MDA_DIM>& r) {
+      return r.streamPut(os);
+   }
+   friend std::istream& operator >> (
+      std::istream& is,
+      MDA_IndexRange<MDA_DIM>& r) {
+      return r.streamGet(is);
+   }
+   //@}
+
+   //@{ @name Functions to facilitate looping
+
+   /*!
+    * @brief Give starting index of a given dimension.
+    */
+   SAMRAI_INLINE_KEYWORD
+   const index_t& beg(
+      /*! index of dimension */ size_t i) const {
+      return d_start[i];
+   }
+
+   /*!
+    * @brief Give ending index (one more than the last valid index)
+    * of a given dimension.
+    */
+   SAMRAI_INLINE_KEYWORD
+   const index_t& end(
+      /*! index of dimension */ size_t i) const {
+      return d_stop[i];
+   }
+
+   /*!
+    * @brief Give size along a given dimension.
+    */
+   SAMRAI_INLINE_KEYWORD
+   const size_t& size(
+      /*! index of dimension */ size_t i) const {
+      return d_size[i];
+   }
+
+   /*!
+    * @brief Give size for all dimensions.
+    */
+   SAMRAI_INLINE_KEYWORD
+   size_t totalSize() const {
+      dim_t i = 0;
+      size_t total_size = d_size[i];
+      for (i = 1; i < MDA_DIM; ++i) total_size *= d_size[i];
+      return total_size;
+   }
+
+   //@}
+
+   //@{ @name Error checking functions
+
+   //! Check if indices are in range.
+   SAMRAI_INLINE_KEYWORD
+   bool has(
+      index_t i0) const {
+      return (MDA_DIM == 1)
+             && (i0 >= d_start[D0]) && (i0 < d_stop[D0]);
+   }
+
+   //! Check if indices are in range.
+   SAMRAI_INLINE_KEYWORD
+   bool has(
+      index_t i0,
+      index_t i1) const {
+      return (MDA_DIM == 2)
+             && (i0 >= d_start[D0]) && (i0 < d_stop[D0])
+             && (i1 >= d_start[D1]) && (i1 < d_stop[D1]);
+   }
+
+   //! Check if indices are in range.
+   SAMRAI_INLINE_KEYWORD
+   bool has(
+      index_t i0,
+      index_t i1,
+      index_t i2) const {
+      return (MDA_DIM == 3)
+             && (i0 >= d_start[D0]) && (i0 < d_stop[D0])
+             && (i1 >= d_start[D1]) && (i1 < d_stop[D1])
+             && (i2 >= d_start[D2]) && (i2 < d_stop[D2]);
+   }
+
+   //! Check if indices are in range.
+   SAMRAI_INLINE_KEYWORD
+   bool has(
+      index_t i0,
+      index_t i1,
+      index_t i2,
+      index_t i3) const {
+      return (MDA_DIM == 4)
+             && (i0 >= d_start[D0]) && (i0 < d_stop[D0])
+             && (i1 >= d_start[D1]) && (i1 < d_stop[D1])
+             && (i2 >= d_start[D2]) && (i2 < d_stop[D2])
+             && (i3 >= d_start[D3]) && (i3 < d_stop[D3]);
+   }
+
+   //@}
+
+private:
+//! Set dependent data.
+   void setDependentData() {
+      index_t i;
+      for (i = 0; i < MDA_DIM; ++i) {
+         d_stop[i] = d_start[i] + static_cast<int>(d_size[i]);
+      }
+   }
+
+protected:
+   //! @brief Array of starting indices
+   index_t d_start[MDA_DIM > 0 ? MDA_DIM : 1];
+
+   //! @brief Array of stopping indices
+   index_t d_stop[MDA_DIM > 0 ? MDA_DIM : 1];
+
+   //! @brief Array of sizes
+   size_t d_size[MDA_DIM > 0 ? MDA_DIM : 1];
+
+};
+
+/**********************************************************************/
+/**********************************************************************/
+
+/*!
+ * @brief Performs computations based for row-major arrays.
+ *
+ * This class computes things that are dependent on
+ * element order in memory, in this case, for the
+ * row-major order.
+ */
+template<unsigned short MDA_DIM>
+class MDA_OrderRowMajor:private MDA_IndexRange<MDA_DIM>
+{
+public:
+   typedef int index_t;
+   typedef MDA_IndexRange<MDA_DIM> range_t;
+   typedef typename range_t::dim_t dim_t;
+protected:
+   enum { D0 = range_t::D0,
+          D1 = range_t::D1,
+          D2 = range_t::D2,
+          D3 = range_t::D3 };
+public:
+   /*!
+    * @brief Quantity of (MDA_DIM-1), used only if MDA_DIM > 1.
+    * Otherwise defined to 1 to avoid out-of-range subscripts.
+    */
+   enum { MDA_Reduced_DIM = (MDA_DIM > 1 ? MDA_DIM - 1 : 1) };
+   typedef MDA_OrderRowMajor<MDA_Reduced_DIM> reduced_order_t;
+   //! @brief Similar to MDA_IndexRange constructor.
+   SAMRAI_INLINE_KEYWORD
+   MDA_OrderRowMajor(
+      /*! Array sizes		*/const size_t* sz = ((size_t *)0),
+      /*! Array starting indices	*/const index_t* st = ((index_t *)0)):
+      MDA_IndexRange<MDA_DIM>(sz, st) {
+      computeSizeDependentData();
+   }
+   //! @brief Similar to MDA_IndexRange constructor.
+   SAMRAI_INLINE_KEYWORD
+   MDA_OrderRowMajor(
+      /*! Array of initial indices	*/const index_t* si,
+      /*! Array of final indices	*/const index_t* sf):
+      MDA_IndexRange<MDA_DIM>(si, sf) {
+      computeSizeDependentData();
+   }
+
+   /*!
+    * @brief Constructor for specifying index range object
+    */
+   SAMRAI_INLINE_KEYWORD
+   MDA_OrderRowMajor(
+      /*! Array index object	*/const range_t& r):
+      MDA_IndexRange<MDA_DIM>(r) {
+      computeSizeDependentData();
+   }
+
+   //@{
+   //! @name Access to index range
+   /*!
+    * @brief Const access to the index range object.
+    *
+    * The index range cannot be modified through this reference.
+    * To modify the index range, use other member functions.
+    */
+   SAMRAI_INLINE_KEYWORD const range_t& range() const {
+      return *this;
+   }
+   //! @brief Similar to MDA_IndexRange::setSizeAndStart().
+   SAMRAI_INLINE_KEYWORD
+   const MDA_OrderRowMajor& setSizeAndStart(
+      const size_t* sz = ((size_t *)0),
+      const index_t* st = ((index_t *)0))
+   {
+      range_t::setSizeAndStart(sz, st);
+      computeSizeDependentData();
+      return *this;
+   }
+   //! @brief Similar to MDA_IndexRange::setInclusiveRange().
+   SAMRAI_INLINE_KEYWORD
+   const MDA_OrderRowMajor& setInclusiveRange(
+      const index_t first[MDA_DIM],
+      const index_t final[MDA_DIM])
+   {
+      range_t::setInclusiveRange(first, final);
+      computeSizeDependentData();
+      return *this;
+   }
+   //! @brief Similar to MDA_IndexRange::adjustDim().
+   SAMRAI_INLINE_KEYWORD
+   const MDA_OrderRowMajor& adjustDim(
+      dim_t d,
+      index_t first,
+      index_t final)
+   {
+      range_t::adjustDim(d, first, final);
+      computeSizeDependentData();
+      return *this;
+   }
+//@}
+
+//@{
+//! @name Logical comparisons
+/*!
+ * @brief Equivalence comparison.
+ *
+ * Only independent data is compared, not dependent (redundant) data.
+ */
+   SAMRAI_INLINE_KEYWORD
+   bool operator == (
+      const MDA_OrderRowMajor& r) const {
+      return range() == r.range();
+   }
+   /*!
+    * @brief Inequivalence comparison.
+    *
+    * Only independent data is compared, not dependent (redundant) data.
+    */
+   SAMRAI_INLINE_KEYWORD
+   bool operator != (
+      const MDA_OrderRowMajor& r) const {
+      return range() != r.range();
+   }
+//@}
+
+//@{
+//! @name Functions to compute offsets
+/*!
+ * @brief Compute offsets for arbitrary @c MDA_DIM
+ *
+ * This is flexible but not efficient!
+ * You should use dimension-specific offset computations whenever possible.
+ */
+   SAMRAI_INLINE_KEYWORD index_t offset(
+      const index_t i[MDA_DIM]) const {
+      int d;
+      size_t o = i[MDA_DIM > 0 ? MDA_DIM - 1 : 0] - this->beg(MDA_DIM - 1);
+      for (d = MDA_DIM - 2; d >= 0; --d) o +=
+            (i[d] - this->d_start[d]) * d_total_size[d + 1];
+      return o;
+   }
+   SAMRAI_INLINE_KEYWORD index_t offset(
+      index_t i0) const {
+      return i0 - this->beg(0);
+   }
+   SAMRAI_INLINE_KEYWORD index_t offset(
+      index_t i0,
+      index_t i1) const {
+      return (i0 - this->d_start[D0]) * d_total_size[D1]
+             + (i1 - this->d_start[D1]);
+   }
+   SAMRAI_INLINE_KEYWORD index_t offset(
+      index_t i0,
+      index_t i1,
+      index_t i2) const {
+      return (i0 - this->d_start[D0]) * d_total_size[D1]
+             + (i1 - this->d_start[D1]) * d_total_size[D2]
+             + (i2 - this->d_start[D2]);
+   }
+   SAMRAI_INLINE_KEYWORD index_t offset(
+      index_t i0,
+      index_t i1,
+      index_t i2,
+      index_t i3) const {
+      return (i0 - this->d_start[D0]) * d_total_size[D1]
+             + (i1 - this->d_start[D1]) * d_total_size[D2]
+             + (i2 - this->d_start[D2]) * d_total_size[D3]
+             + (i3 - this->d_start[D3]);
+   }
+   SAMRAI_INLINE_KEYWORD index_t fixedOffset() const {
+      return d_fixed_offset;
+   }
+   //@}
+/*!
+ * @brief Return the total size of subarray starting with dimension d
+ */
+   SAMRAI_INLINE_KEYWORD size_t totalSize(
+      unsigned short d) const {
+      return d_total_size[d];
+   }
+/*!
+ * @brief Computes the order object and offset for reducing the slowest
+ * dimension.
+ *
+ * A reduced array is the subarray resulting from fixing the slowest
+ * (first) index.  The reduced array has one fewer dimension, a different
+ * ordering object and its data starts at a different point in memory.
+ * The change in starting point is the returned offset value, and the
+ * new order object is returned in the referenced argument.
+ *
+ * @return Pointer offset (always positive) to the reduced array pointer.
+ */
+   SAMRAI_INLINE_KEYWORD size_t reduce(
+      index_t i,
+      reduced_order_t& new_order) const {
+      new_order.setSizeAndStart(&this->size(1), &this->beg(1));
+      return offset(i) * d_total_size[1];
+   }
+private:
+/*!
+ * @brief Recompute the total sizes array, which is dependent on sizes.
+ */
+   SAMRAI_INLINE_KEYWORD void computeSizeDependentData() {
+      d_total_size[MDA_DIM - 1] = this->d_size[MDA_DIM - 1];
+      d_fixed_offset = -this->d_start[MDA_DIM - 1];
+      int i = MDA_DIM - 2;
+      for ( ; i >= 0; --i) {
+         d_total_size[i] = this->d_size[i] * d_total_size[i + 1];
+         d_fixed_offset -= this->d_start[i] * d_total_size[i + 1];
+      }
+   }
+/*!
+ * @brief Total sizes of sub-dimensional arrays.
+ *
+ * @c d_total_size[i] is the size of the sub-matrix contained in the
+ * last (fast) i dimensions of the array.  Incidentally, the stride
+ * size of dimension @c i is @c d_total_size[i+1] (and the stride size
+ * for dimension @c MDA_DIM-1 is 1.
+ *
+ * @c d_total_size[i] is really equal to
+ * @f$ \prod_{j=i}^{MDA_DIM-1} size_j @f$
+ *
+ * This member simply caches size-dependent data.
+ */
+   size_t d_total_size[MDA_DIM > 0 ? MDA_DIM : 1];
+/*!
+ * @brief The fixed portions of offset calculations.
+ *
+ * Offsets can be separated into a fixed part (dependent only on range)
+ * and a variable part (dependent on dereferencing indices).  To prevent
+ * repeated computation of the fixed part, it is saved in this variable.
+ * Note that a good optimizing compiler should already do this,
+ * so doing it in the code may not really be needed.
+ *
+ * This member simply caches size-dependent data.
+ */
+   index_t d_fixed_offset;
+};      // end MDA_OrderRowMajor
+
+/**********************************************************************/
+/**********************************************************************/
+
+/*!
+ * @brief Performs computations based for column-major arrays.
+ *
+ * This class computes things that are dependent on
+ * element order in memory, in this case, for the
+ * column-major order.
+ */
+template<unsigned short MDA_DIM>
+class MDA_OrderColMajor:private MDA_IndexRange<MDA_DIM>
+{
+public:
+   typedef int index_t;
+   typedef MDA_IndexRange<MDA_DIM> range_t;
+   typedef typename range_t::dim_t dim_t;
+protected:
+   enum { D0 = range_t::D0,
+          D1 = range_t::D1,
+          D2 = range_t::D2,
+          D3 = range_t::D3 };
+public:
+   /*!
+    * @brief Quantity of (MDA_DIM-1), used only if MDA_DIM > 1.
+    * Otherwise defined to 1 to avoid out-of-range subscripts.
+    */
+   enum { MDA_Reduced_DIM = (MDA_DIM > 1 ? MDA_DIM - 1 : 1) };
+   typedef MDA_OrderColMajor<MDA_Reduced_DIM> reduced_order_t;
+   //! @brief Similar to MDA_IndexRange constructor.
+   SAMRAI_INLINE_KEYWORD
+   MDA_OrderColMajor(
+      /*! Array sizes		*/const size_t* sz = ((size_t *)0),
+      /*! Array starting indices	*/const index_t* st = ((index_t *)0)):
+      MDA_IndexRange<MDA_DIM>(sz, st) {
+      computeSizeDependentData();
+   }
+   //! @brief Similar to MDA_IndexRange constructor.
+   SAMRAI_INLINE_KEYWORD
+   MDA_OrderColMajor(
+      /*! Array of initial indices	*/const index_t* si,
+      /*! Array of final indices	*/const index_t* sf):
+      MDA_IndexRange<MDA_DIM>(si, sf) {
+      computeSizeDependentData();
+   }
+
+   /*!
+    * @brief Constructor for specifying index range object
+    */
+   SAMRAI_INLINE_KEYWORD
+   MDA_OrderColMajor(
+      /*! Array index object	*/const range_t& r):
+      MDA_IndexRange<MDA_DIM>(r) {
+      computeSizeDependentData();
+   }
+
+   //@{
+   //! @name Access to index range (see MDA_IndexRange)
+   /*!
+    * @brief Const access to the index range object.
+    *
+    * The index range cannot be modified through this reference.
+    * To modify the index range, use other member functions.
+    */
+   SAMRAI_INLINE_KEYWORD const range_t& range() const {
+      return *this;
+   }
+   //! @brief Similar to MDA_IndexRange::setSizeAndStart().
+   SAMRAI_INLINE_KEYWORD
+   const MDA_OrderColMajor& setSizeAndStart(
+      const size_t* sz = ((size_t *)0),
+      const index_t* st = ((index_t *)0))
+   {
+      range_t::setSizeAndStart(sz, st);
+      computeSizeDependentData();
+      return *this;
+   }
+   //! @brief Similar to MDA_IndexRange::setInclusiveRange().
+   SAMRAI_INLINE_KEYWORD
+   const MDA_OrderColMajor& setInclusiveRange(
+      const index_t first[MDA_DIM],
+      const index_t final[MDA_DIM])
+   {
+      range_t::setInclusiveRange(first, final);
+      computeSizeDependentData();
+      return *this;
+   }
+   //! @brief Similar to MDA_IndexRange::adjustDim().
+   SAMRAI_INLINE_KEYWORD
+   const MDA_OrderColMajor& adjustDim(
+      dim_t d,
+      index_t first,
+      index_t final)
+   {
+      range_t::adjustDim(d, first, final);
+      computeSizeDependentData();
+      return *this;
+   }
+//@}
+
+//@{
+//! @name Logical comparisons
+/*!
+ * @brief Equivalence comparison.
+ *
+ * Only independent data is compared, not dependent (redundant) data.
+ */
+   SAMRAI_INLINE_KEYWORD
+   bool operator == (
+      const MDA_OrderColMajor& r) const {
+      return range() == r.range();
+   }
+   /*!
+    * @brief Inequivalence comparison.
+    *
+    * Only independent data is compared, not dependent (redundant) data.
+    */
+   SAMRAI_INLINE_KEYWORD
+   bool operator != (
+      const MDA_OrderColMajor& r) const {
+      return range() != r.range();
+   }
+//@}
+
+//@{
+//! @name Functions to compute offsets
+/*!
+ * @brief Compute offsets for arbitrary @c MDA_DIM
+ *
+ * This is flexible but not efficient!
+ * You should use dimension-specific offset computations whenever possible.
+ */
+   SAMRAI_INLINE_KEYWORD index_t offset(
+      const index_t i[MDA_DIM]) const {
+      int d;
+      size_t o = i[0] - this->beg(0);
+      for (d = 1; d < MDA_DIM; ++d) o +=
+            (i[d] - this->d_start[d]) * d_total_size[d - 1];
+      return o;
+   }
+   SAMRAI_INLINE_KEYWORD index_t offset(
+      index_t i0) const {
+      return i0 - this->beg(0);
+   }
+   SAMRAI_INLINE_KEYWORD index_t offset(
+      index_t i0,
+      index_t i1) const {
+      return (i0 - this->d_start[D0])
+             + (i1 - this->d_start[D1]) *
+               static_cast<index_t>(d_total_size[D0]);
+   }
+   SAMRAI_INLINE_KEYWORD index_t offset(
+      index_t i0,
+      index_t i1,
+      index_t i2) const {
+      return (i0 - this->d_start[D0])
+             + (i1 - this->d_start[D1]) *
+               static_cast<index_t>(d_total_size[D0])
+             + (i2 - this->d_start[D2]) *
+               static_cast<index_t>(d_total_size[D1]);
+   }
+   SAMRAI_INLINE_KEYWORD index_t offset(
+      index_t i0,
+      index_t i1,
+      index_t i2,
+      index_t i3) const {
+      return (i0 - this->d_start[D0])
+             + (i1 - this->d_start[D1]) * d_total_size[D0]
+             + (i2 - this->d_start[D2]) * d_total_size[D1]
+             + (i3 - this->d_start[D3]) * d_total_size[D2];
+   }
+   SAMRAI_INLINE_KEYWORD index_t fixedOffset() const {
+      return d_fixed_offset;
+   }
+//@}
+/*!
+ * @brief Return the total size of subarray starting with dimension d
+ */
+   SAMRAI_INLINE_KEYWORD size_t totalSize(
+      unsigned short d) const {
+      return d_total_size[d];
+   }
+/*!
+ * @brief Computes the order object and offset for reducing the slowest
+ * dimension.
+ *
+ * A reduced array is the subarray resulting from fixing the slowest
+ * (last) index.  The reduced array has one fewer dimension, a different
+ * ordering object and its data starts at a different point in memory.
+ * The change in starting point is the returned offset value, and the
+ * new order object is returned in the referenced argument.
+ *
+ * @return Pointer offset (always positive) to the reduced array pointer.
+ */
+   SAMRAI_INLINE_KEYWORD size_t reduce(
+      index_t i,
+      reduced_order_t& new_order) const {
+      new_order.setSizeAndStart(&this->size(0), &this->beg(0));
+      return (i
+              - this->d_start[MDA_Reduced_DIM])
+             * d_total_size[MDA_DIM > 1 ? MDA_DIM - 2 : 0];
+      // return offset(i)*d_total_size[MDA_DIM-2];
+   }
+private:
+/*!
+ * @brief Recompute the total sizes array, which is dependent on sizes.
+ */
+   SAMRAI_INLINE_KEYWORD void computeSizeDependentData() {
+      d_total_size[0] = this->d_size[0];
+      d_fixed_offset = -this->d_start[0];
+      int i = 1;
+      for ( ; i < MDA_DIM; ++i) {
+         d_total_size[i] = this->d_size[i] * d_total_size[i - 1];
+         d_fixed_offset -= this->d_start[i] *
+                           static_cast<int>(d_total_size[i]);
+      }
+   }
+/*!
+ * @brief Total sizes of sub-dimensional arrays.
+ *
+ * @c d_total_size[i] is the size of the sub-matrix contained in the
+ * first (fast) i+1 dimensions of the array.  Incidentally, the stride
+ * size of dimension @c i is @c d_total_size[i-1] (and the stride size
+ * for dimension @c 0 is 1.
+ *
+ * @c d_total_size[i] is really equal to
+ * @f$ \prod_{j=0}^{i} size_j @f$
+ *
+ * This member simply caches size-dependent data.
+ */
+   size_t d_total_size[MDA_DIM > 0 ? MDA_DIM : 1];
+/*!
+ * @brief The fixed portions of offset calculations.
+ *
+ * Offsets can be separated into a fixed part (dependent only on range)
+ * and a variable part (dependent on indices).  To prevent repeated
+ * computation of the fixed part, it is saved in this variable.
+ * Note that a good optimizing compiler should already do this,
+ * so doing it in the code may not really be needed.
+ *
+ * This member simply caches size-dependent data.
+ */
+   index_t d_fixed_offset;
+};      // end MDA_OrderColMajor
+
+/**********************************************************************/
+/**********************************************************************/
+
+/*!
+ * @brief Non-const multidimensional array access.
+ *
+ * This class @em never allocates or deallocates data.
+ * It takes pointers to preallocated data
+ * and provides an interface to that data.
+ * Member functions are used to give that interface.
+ *
+ * This class provides functions for explicit index checking,
+ * but it does @em NO implicit error checking on either the
+ * dimensionality of the array or it size.
+ * Such may be done through subclassing.
+ *
+ * The member functions should all be inlined for better
+ * performance.
+ *
+ * This template class is set up to work with either
+ * row-major or column-major data, depending on the
+ * third template argument, which should be one of
+ * -# @c MDA_OrderRowMajor (default if omitted)
+ * -# @c MDA_OrderColMajor
+ *
+ * The reduce() function return a new array of smaller
+ * dimensional that require less integer arithmetic
+ * to access individual array members.  This should help
+ * in optimizing code.  (My preliminary performance tests
+ * using gcc and gprof on i686 Linux showed that the
+ * MDA_Access functions run at half to slightly
+ * faster than the speed of Fortran, depending on use of
+ * reduced arrays.  However, note that gcc is not great at
+ * optimizing Fortran.)
+ */
+template<class MDA_TYPE, unsigned short MDA_DIM, class OrderType =
+            MDA_OrderRowMajor<MDA_DIM> >
+class MDA_Access
+{
+
+public:
+   /*!
+    * @brief Type of data.
+    */
+   typedef MDA_TYPE value_t;
+   typedef MDA_IndexRange<MDA_DIM> range_t;
+   typedef typename range_t::dim_t dim_t;
+   typedef typename range_t::index_t index_t;
+   typedef OrderType order_t;
+   typedef typename OrderType::reduced_order_t reduced_order_t;
+
+   /*!
+    * @brief Constructor for setting all data, with default values.
+    *
+    * Any pointers that are NULL are not used.  The resulting default
+    * settings are:
+    * - Data pointer is NULL
+    * - Array sizes are 0
+    * - Array starting indices are 0
+    *
+    * There is another constructor which accepts the first and final
+    * indices instead of the sizes and first indices.
+    * @b NOTE: the place of the initial indices is different than
+    * it is for the constructor taking final indices instead of sizes.
+    */
+   SAMRAI_INLINE_KEYWORD
+   MDA_Access(
+      /*! Pointer to data		*/value_t* p = ((value_t *)0),
+      /*! Array sizes		*/const size_t* sz = ((size_t *)0),
+      /*! Array starting indices	*/const index_t* st = ((index_t *)0)):
+      d_ptr(p),
+      d_order(sz, st) {
+      setPtr1();
+   }
+
+   /*!
+    * @brief Constructor for setting all data, with default values.
+    *
+    * Any pointers that are NULL are not used.
+    * The resulting default settings are:
+    * - Data pointer is NULL
+    * - Array sizes are 0
+    * - Array starting indices are 0
+    *
+    * This version takes two @c int* arguments, for the initial
+    * and final indices.  It does not support default arguments
+    * until after the indices argument.  @b NOTE: the place of the
+    * initial indices is different than it is for the constructor
+    * taking sizes instead of final indices.
+    *
+    * If @c si is @c NULL, starting indices are set to 0.
+    * If @c sf is @c NULL, sizes are set to zero.
+    */
+   SAMRAI_INLINE_KEYWORD
+   MDA_Access(
+      /*! Pointer to data		*/value_t* p,
+      /*! Array of initial indices	*/const index_t* si,
+      /*! Array of final indices	*/const index_t* sf):
+      d_ptr(p),
+      d_order(si, sf) {
+      setPtr1();
+   }
+
+   /*!
+    * @brief Constructor for specifying pointer and ordering object
+    */
+   SAMRAI_INLINE_KEYWORD
+   MDA_Access(
+      /*! Pointer to data		*/value_t* p,
+      /*! Array index object	*/const order_t& r):
+      d_ptr(p),
+      d_order(r) {
+      setPtr1();
+   }
+
+   /*!
+    * @brief Copy constructor
+    */
+   SAMRAI_INLINE_KEYWORD
+   MDA_Access(
+      /*! Copyee object		*/const MDA_Access& r):
+      d_ptr(r.d_ptr),
+      d_order(r.d_order) {
+      setPtr1();
+   }
+
+   /*!
+    * @brief Virtual destructor to support inheritance.
+    */
+   SAMRAI_INLINE_KEYWORD
+   virtual ~MDA_Access() {
+   }
+
+   /*!
+    * @brief Conversion into boolean.
+    *
+    * @return true iff data pointer is not NULL.
+    */
+   SAMRAI_INLINE_KEYWORD
+   operator bool () const {
+      return d_ptr != (value_t *)0;
+   }
+
+   /*!
+    * @brief Conversion into pointer.
+    *
+    * @return the data pointer.
+    */
+   SAMRAI_INLINE_KEYWORD
+   operator value_t* () const {
+      return d_ptr;
+   }
+
+   /*!
+    * @brief Set the data pointer.
+    */
+   SAMRAI_INLINE_KEYWORD
+   void setPointer(
+      /*! Pointer value	*/ value_t* p) {
+      d_ptr = p;
+      setPtr1();
+   }
+
+   /*!
+    * Set size and starting indices.
+    *
+    * @see MDA_IndexRange
+    */
+   SAMRAI_INLINE_KEYWORD
+   void setSizeAndStart(
+      /*! Array sizes (NULL for no change)		*/const size_t* sz = ((size_t *)0),
+      /*! Starting indices (NULL for no change)	*/ const index_t* st =
+         ((index_t *)0))
+   {
+      d_order.setSizeAndStart(sz, st);
+      setPtr1();
+   }
+
+   /*!
+    * Set first and final indices (inclusive).
+    *
+    * @see MDA_IndexRange
+    */
+   SAMRAI_INLINE_KEYWORD
+   void setInclusiveRange(
+      /*! First valid indices (NULL for no change)	*/const index_t first[
+         MDA_DIM],
+      /*! Final valid indices (NULL for no change)	*/const index_t final[
+         MDA_DIM])
+   {
+      d_order.setInclusiveRange(first, final);
+      setPtr1();
+   }
+
+   /*!
+    * @brief Adjust the dimensions
+    *
+    * @see MDA_IndexRange::adjustDim.
+    */
+   SAMRAI_INLINE_KEYWORD
+   const range_t& adjustDim(
+      /*! Dimension to adjust	*/dim_t d,
+      /*! Increment to first index	*/index_t first,
+      /*! Increment to final index	*/index_t final)
+   {
+      d_order.adjustDim(d, first, final);
+      setPtr1();
+      return d_order.range();
+   }
+
+//@{ @name Comparison functions
+
+   /*!
+    * @name Equivalence comparison
+    */
+   SAMRAI_INLINE_KEYWORD
+   bool operator == (
+      const MDA_Access& r) const {
+      if (d_order != r.d_order) return false;
+
+      if (d_ptr != r.d_ptr) return false;
+
+      return true;
+   }
+
+   /*!
+    * @name Inequivalence comparison
+    */
+   SAMRAI_INLINE_KEYWORD
+   bool operator != (
+      const MDA_Access& r) const {
+      return !((*this) == r);
+   }
+
+//@}
+
+//@{ @name Functions for accessing items
+
+   SAMRAI_INLINE_KEYWORD
+   const range_t& range() const {
+      return d_order.range();
+   }
+   SAMRAI_INLINE_KEYWORD
+   const index_t& beg(
+      size_t i) const {
+      return d_order.range().beg(i);
+   }
+   SAMRAI_INLINE_KEYWORD
+   const index_t& end(
+      size_t i) const {
+      return d_order.range().end(i);
+   }
+   SAMRAI_INLINE_KEYWORD
+   const size_t& size(
+      size_t i) const {
+      return d_order.range().size(i);
+   }
+
+   /*!
+    * @brief Grant general access to item in an arbitrary dimensional array.
+    *
+    * This is flexible but not efficient!
+    * You should use dimension-specific accesses whenever possible.
+    */
+   SAMRAI_INLINE_KEYWORD
+   value_t& operator () (
+      const index_t i[MDA_DIM]) const {
+      return d_ptr[d_order.offset(i)];
+   }
+
+   /*!
+    * @brief Grant general access to item in a 1D array.
+    */
+   SAMRAI_INLINE_KEYWORD
+   value_t& operator () (
+      index_t i0) const {
+      return d_ptr[d_order.offset(i0)];
+      /*
+       * return d_ptr1[i0];
+       */
+   }
+
+   /*!
+    * @brief Grant general access to item in a 2D array.
+    */
+   SAMRAI_INLINE_KEYWORD
+   value_t& operator () (
+      index_t i0,
+      index_t i1) const {
+      return d_ptr[d_order.offset(i0, i1)];
+   }
+
+   /*!
+    * @brief Grant general access to item in a 3D array.
+    */
+   SAMRAI_INLINE_KEYWORD
+   value_t& operator () (
+      index_t i0,
+      index_t i1,
+      index_t i2) const {
+      return d_ptr[d_order.offset(i0, i1, i2)];
+   }
+
+   /*!
+    * @brief Grant general access to item in a 4D array.
+    */
+   SAMRAI_INLINE_KEYWORD
+   value_t& operator () (
+      index_t i0,
+      index_t i1,
+      index_t i2,
+      index_t i3) const {
+      return d_ptr[d_order.offset(i0, i1, i2, i3)];
+   }
+
+   /*!
+    * @brief Special case for 1D arrays, identical to @c operator(index_t),
+    * using pre-added fixed offsets.
+    *
+    * This @em may be more efficient than @c (i) but it only works in 1D.
+    * It is not guaranteed to work if the fixed offset is negative and
+    * has greater value than the pointer address, since the addition of
+    * the two gives a negative address, which the C standard leaves as
+    * undefined behavior.
+    */
+   SAMRAI_INLINE_KEYWORD
+   value_t& operator [] (
+      index_t i0) const {
+      return d_ptr1[i0];
+      /*
+       * return d_ptr[d_order.offset(i0)];
+       */
+   }
+
+//@}
+
+//@{ @name Functions to extract reduced-dimensional arrays.
+
+/*!
+ * @brief Fix the index of the slowest dimension and return
+ * the corresponding sub-array.
+ *
+ * This function is meant to facilitate optimization when using
+ * this class.  In nested loops, the inner loops executes many
+ * times with the indices corresponding to outer loops remaining
+ * constants.  This leads to many many repeated integer arithmetics
+ * operations that could be removed from the inner loop (but may
+ * not be removed automatically by the compiler optimization).
+ * To do this, reduce the array dimensionality one dimension at a time,
+ * by fixing index corresponding to the slowest varying dimension.
+ * (If you code is written to maximize cache data, this will NOT
+ * be the index of the innermost loop.)
+ *
+ * To reduce multiple dimensions, string these calls together,
+ * i.e. @c array.reduce(i).reduce(j).  However, since reduction
+ * contains loops that cost O(MDA_DIM) and may be difficult for
+ * compilers to optimize, you may want to save @c array.reduce(i)
+ * and reuse it.
+ *
+ * @param i Index in slowest dimension, which is the first
+ * dimension in a row-major array and the last dimension in a
+ * column-major array.
+ *
+ * @return The sub-array of dimension @c MDA_DIM-1, corresponding to
+ * the index given.
+ */
+   SAMRAI_INLINE_KEYWORD
+   MDA_Access<MDA_TYPE, OrderType::MDA_Reduced_DIM,
+              typename OrderType::reduced_order_t> reduce(
+      index_t i) const {
+      typename OrderType::reduced_order_t new_order;
+      int ptr_offset;
+      ptr_offset = d_order.reduce(i, new_order);
+      return MDA_Access<MDA_TYPE, OrderType::MDA_Reduced_DIM,
+                        typename OrderType::reduced_order_t>(
+                d_ptr + ptr_offset, new_order);
+   }
+
+//@}
+
+//! Pointer to data.
+private:
+   value_t* d_ptr;
+/*!
+ * @brief Value of @c d_ptr-beg(0), used for optimizing 1D access.
+ *
+ * The use of precomputed @c d_ptr1=d_ptr-beg(0) speeds up 1D offset
+ * computations by allowing us to compute  @c d_ptr1+i0 instead of
+ * @c d_ptr+(i0-beg(0)), saving one integer subtraction for each
+ * 1D access.  However, this could be a real problem if @c d_ptr<beg(0).
+ * So far, that has not happened, and we are keeping our fingers
+ * crossed.
+ *
+ * @see setPtr1()
+ */
+private:
+   value_t* d_ptr1;
+private:
+   void setPtr1() {
+      /*
+       * If the following assert fails, our d_ptr1 optimization may
+       * give undefined result.
+       * assert( d_order.fixedOffset() > 0 ||
+       *      (unsigned long)d_ptr > (unsigned long)(-d_order.fixedOffset()) );
+       */
+      d_ptr1 = d_ptr + d_order.fixedOffset();
+   }
+//! Offset computing object
+private:
+   order_t d_order;
+
+};      // class MDA_Access
+
+/**********************************************************************/
+/**********************************************************************/
+
+/*!
+ * @brief Const data version of the multidimensional array access
+ * template class MDA_Access.
+ *
+ * This class is almost exactly identical to its non-const
+ * counterpart, MDA_Access.  It is used when the data
+ * is const.
+ *
+ * This class differs only in that the value type is a const.
+ * In fact, this class is trivial,
+ * except for the public inheritance of MDA_Access
+ * with the const type for the first template argument,
+ * a constructor to build an object from a MDA_Access
+ * object and an assignment operator to assign from a
+ * MDA_Access object.
+ * Other than that, see MDA_Access for documentations.
+ *
+ * The interfaces that are added by this class are trivial,
+ * mirroring the interfaces defined in MDA_Access
+ * with minor changes.
+ *
+ * @see MDA_Access
+ */
+template<class MDA_TYPE, unsigned short MDA_DIM, class OrderType =
+            MDA_OrderRowMajor<MDA_DIM> >
+class MDA_AccessConst:public MDA_Access<const MDA_TYPE, MDA_DIM, OrderType>
+{
+public:
+   /*!
+    * @brief Type of data.
+    *
+    * This declaration is redundant because it should already be inherited,
+    * but the xlC compiler on ASCI Blue does not get it.
+    */
+   typedef const MDA_TYPE value_t;
+   typedef MDA_IndexRange<MDA_DIM> range_t;
+   typedef typename range_t::dim_t dim_t;
+   typedef typename range_t::index_t index_t;
+   typedef OrderType order_t;
+
+   /*!
+    * @brief See the MDA_Access version of this function.
+    * @see MDA_Access::MDA_Access(value_t*,const size_t*,const index_t*)
+    */
+   SAMRAI_INLINE_KEYWORD
+   MDA_AccessConst(
+      /*! Pointer to data		*/value_t* p = ((MDA_TYPE *)0),
+      /*! Array sizes		*/const size_t* sz = ((size_t *)0),
+      /*! Array starting indices	*/const index_t* st = ((index_t *)0)):
+      MDA_Access<const MDA_TYPE, MDA_DIM, OrderType>(p, sz, st)
+   {
+   }
+   /*!
+    * @brief See the MDA_Access version of this function.
+    * @see MDA_Access::MDA_Access(value_t*,const index_t*,const index_t*)
+    */
+   SAMRAI_INLINE_KEYWORD
+   MDA_AccessConst(
+      /*! Pointer to data		*/value_t* p,
+      /*! Array of initial indices	*/const index_t* si,
+      /*! Array of final indices	*/const index_t* sf):
+      MDA_Access<const MDA_TYPE, MDA_DIM, OrderType>(p, si, sf)
+   {
+   }
+   /*!
+    * @brief See the MDA_Access version of this function.
+    * @see MDA_Access::MDA_Access(value_t*,const MDA_IndexRange<MDA_DIM>&)
+    */
+   SAMRAI_INLINE_KEYWORD
+   MDA_AccessConst(
+      /*! Pointer to data		*/value_t* p,
+      /*! Array index object	*/const MDA_IndexRange<MDA_DIM>& r):
+      MDA_Access<const MDA_TYPE, MDA_DIM, OrderType>(p, r)
+   {
+   }
+   /*!
+    * @brief Construct from an object of the non-const version.
+    * @see MDA_Access::MDA_Access(const MDA_Access<const MDA_TYPE,MDA_DIM>&)
+    */
+   SAMRAI_INLINE_KEYWORD
+   MDA_AccessConst(
+      const MDA_Access<MDA_TYPE, MDA_DIM, OrderType>& r):
+      MDA_Access<const MDA_TYPE, MDA_DIM, OrderType>((const MDA_TYPE *)(r),
+                                                     r.range())
+   {
+   }
+   /*!
+    * @brief Assign value from an object of the non-const version.
+    */
+   SAMRAI_INLINE_KEYWORD
+   const MDA_AccessConst& operator = (
+      const MDA_Access<MDA_TYPE, MDA_DIM, OrderType>& r) {
+      (MDA_Access<MDA_TYPE, MDA_DIM, OrderType>&)(*this) = r;
+      return *this;
+   }
+};
+
+#endif  // include_MDA_Access_h
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,15393 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=ArrayData.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h ArrayData.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=ArrayDataAccess.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataAccess.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MDA_Access.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h ArrayDataAccess.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=ArrayDataIterator.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h ArrayDataIterator.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=ArrayDataOperationUtilities.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	ArrayDataOperationUtilities.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
+FILE_4=CellComplexConstantRefine.o
+DEPENDS_4:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellComplexConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	CellComplexConstantRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_4 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_4:X.o=${NDIM}.o}: ${DEPENDS_4}
+
+FILE_5=CellComplexLinearTimeInterpolateOp.o
+DEPENDS_5:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellComplexLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	CellComplexLinearTimeInterpolateOp.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_5 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_5:X.o=${NDIM}.o}: ${DEPENDS_5}
+
+FILE_6=CellData.o
+DEPENDS_6:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h CellData.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_6 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_6:X.o=${NDIM}.o}: ${DEPENDS_6}
+
+FILE_7=CellDataFactory.o
+DEPENDS_7:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h CellDataFactory.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_7 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_7:X.o=${NDIM}.o}: ${DEPENDS_7}
+
+FILE_8=CellDoubleConstantRefine.o
+DEPENDS_8:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	CellDoubleConstantRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_8 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_8:X.o=${NDIM}.o}: ${DEPENDS_8}
+
+FILE_9=CellDoubleLinearTimeInterpolateOp.o
+DEPENDS_9:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDoubleLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	CellDoubleLinearTimeInterpolateOp.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_9 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_9:X.o=${NDIM}.o}: ${DEPENDS_9}
+
+FILE_10=CellFloatConstantRefine.o
+DEPENDS_10:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellFloatConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	CellFloatConstantRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_10 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_10:X.o=${NDIM}.o}: ${DEPENDS_10}
+
+FILE_11=CellFloatLinearTimeInterpolateOp.o
+DEPENDS_11:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellFloatLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	CellFloatLinearTimeInterpolateOp.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_11 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_11:X.o=${NDIM}.o}: ${DEPENDS_11}
+
+FILE_12=CellGeometry.o
+DEPENDS_12:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h CellGeometry.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_12 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_12:X.o=${NDIM}.o}: ${DEPENDS_12}
+
+FILE_13=CellIndex.o
+DEPENDS_13:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h CellIndex.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_13 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_13:X.o=${NDIM}.o}: ${DEPENDS_13}
+
+FILE_14=CellIntegerConstantRefine.o
+DEPENDS_14:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIntegerConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	CellIntegerConstantRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_14 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_14:X.o=${NDIM}.o}: ${DEPENDS_14}
+
+FILE_15=CellIterator.o
+DEPENDS_15:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h CellIterator.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_15 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_15:X.o=${NDIM}.o}: ${DEPENDS_15}
+
+FILE_16=CellOverlap.o
+DEPENDS_16:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h CellOverlap.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_16 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_16:X.o=${NDIM}.o}: ${DEPENDS_16}
+
+FILE_17=CellVariable.o
+DEPENDS_17:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h CellVariable.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_17 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_17:X.o=${NDIM}.o}: ${DEPENDS_17}
+
+FILE_18=CopyOperation.o
+DEPENDS_18:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h CopyOperation.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_18 +=\
+	
+endif
+
+${FILE_18:X.o=${NDIM}.o}: ${DEPENDS_18}
+
+FILE_19=EdgeComplexConstantRefine.o
+DEPENDS_19:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeComplexConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	EdgeComplexConstantRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_19 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_19:X.o=${NDIM}.o}: ${DEPENDS_19}
+
+FILE_20=EdgeComplexLinearTimeInterpolateOp.o
+DEPENDS_20:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeComplexLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	EdgeComplexLinearTimeInterpolateOp.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_20 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_20:X.o=${NDIM}.o}: ${DEPENDS_20}
+
+FILE_21=EdgeData.o
+DEPENDS_21:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h EdgeData.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_21 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_21:X.o=${NDIM}.o}: ${DEPENDS_21}
+
+FILE_22=EdgeDataFactory.o
+DEPENDS_22:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h EdgeDataFactory.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_22 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_22:X.o=${NDIM}.o}: ${DEPENDS_22}
+
+FILE_23=EdgeDoubleConstantRefine.o
+DEPENDS_23:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	EdgeDoubleConstantRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_23 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_23:X.o=${NDIM}.o}: ${DEPENDS_23}
+
+FILE_24=EdgeDoubleLinearTimeInterpolateOp.o
+DEPENDS_24:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDoubleLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	EdgeDoubleLinearTimeInterpolateOp.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_24 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_24:X.o=${NDIM}.o}: ${DEPENDS_24}
+
+FILE_25=EdgeFloatConstantRefine.o
+DEPENDS_25:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeFloatConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	EdgeFloatConstantRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_25 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_25:X.o=${NDIM}.o}: ${DEPENDS_25}
+
+FILE_26=EdgeFloatLinearTimeInterpolateOp.o
+DEPENDS_26:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeFloatLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	EdgeFloatLinearTimeInterpolateOp.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_26 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_26:X.o=${NDIM}.o}: ${DEPENDS_26}
+
+FILE_27=EdgeGeometry.o
+DEPENDS_27:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h EdgeGeometry.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_27 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_27:X.o=${NDIM}.o}: ${DEPENDS_27}
+
+FILE_28=EdgeIndex.o
+DEPENDS_28:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h EdgeIndex.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_28 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_28:X.o=${NDIM}.o}: ${DEPENDS_28}
+
+FILE_29=EdgeIntegerConstantRefine.o
+DEPENDS_29:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIntegerConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	EdgeIntegerConstantRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_29 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_29:X.o=${NDIM}.o}: ${DEPENDS_29}
+
+FILE_30=EdgeIterator.o
+DEPENDS_30:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h EdgeIterator.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_30 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_30:X.o=${NDIM}.o}: ${DEPENDS_30}
+
+FILE_31=EdgeOverlap.o
+DEPENDS_31:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h EdgeOverlap.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_31 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_31:X.o=${NDIM}.o}: ${DEPENDS_31}
+
+FILE_32=EdgeVariable.o
+DEPENDS_32:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h EdgeVariable.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_32 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_32:X.o=${NDIM}.o}: ${DEPENDS_32}
+
+FILE_33=FaceComplexConstantRefine.o
+DEPENDS_33:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceComplexConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	FaceComplexConstantRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_33 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_33:X.o=${NDIM}.o}: ${DEPENDS_33}
+
+FILE_34=FaceComplexLinearTimeInterpolateOp.o
+DEPENDS_34:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceComplexLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	FaceComplexLinearTimeInterpolateOp.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_34 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_34:X.o=${NDIM}.o}: ${DEPENDS_34}
+
+FILE_35=FaceData.o
+DEPENDS_35:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h FaceData.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_35 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_35:X.o=${NDIM}.o}: ${DEPENDS_35}
+
+FILE_36=FaceDataFactory.o
+DEPENDS_36:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h FaceDataFactory.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_36 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_36:X.o=${NDIM}.o}: ${DEPENDS_36}
+
+FILE_37=FaceDoubleConstantRefine.o
+DEPENDS_37:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	FaceDoubleConstantRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_37 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_37:X.o=${NDIM}.o}: ${DEPENDS_37}
+
+FILE_38=FaceDoubleLinearTimeInterpolateOp.o
+DEPENDS_38:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDoubleLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	FaceDoubleLinearTimeInterpolateOp.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_38 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_38:X.o=${NDIM}.o}: ${DEPENDS_38}
+
+FILE_39=FaceFloatConstantRefine.o
+DEPENDS_39:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceFloatConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	FaceFloatConstantRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_39 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_39:X.o=${NDIM}.o}: ${DEPENDS_39}
+
+FILE_40=FaceFloatLinearTimeInterpolateOp.o
+DEPENDS_40:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceFloatLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	FaceFloatLinearTimeInterpolateOp.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_40 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_40:X.o=${NDIM}.o}: ${DEPENDS_40}
+
+FILE_41=FaceGeometry.o
+DEPENDS_41:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h FaceGeometry.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_41 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_41:X.o=${NDIM}.o}: ${DEPENDS_41}
+
+FILE_42=FaceIndex.o
+DEPENDS_42:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h FaceIndex.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_42 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_42:X.o=${NDIM}.o}: ${DEPENDS_42}
+
+FILE_43=FaceIntegerConstantRefine.o
+DEPENDS_43:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIntegerConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	FaceIntegerConstantRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_43 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_43:X.o=${NDIM}.o}: ${DEPENDS_43}
+
+FILE_44=FaceIterator.o
+DEPENDS_44:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h FaceIterator.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_44 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_44:X.o=${NDIM}.o}: ${DEPENDS_44}
+
+FILE_45=FaceOverlap.o
+DEPENDS_45:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h FaceOverlap.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_45 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_45:X.o=${NDIM}.o}: ${DEPENDS_45}
+
+FILE_46=FaceVariable.o
+DEPENDS_46:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h FaceVariable.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_46 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_46:X.o=${NDIM}.o}: ${DEPENDS_46}
+
+FILE_47=FirstLayerCellNoCornersVariableFillPattern.o
+DEPENDS_47:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FirstLayerCellNoCornersVariableFillPattern.h\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	FirstLayerCellNoCornersVariableFillPattern.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_47 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_47:X.o=${NDIM}.o}: ${DEPENDS_47}
+
+FILE_48=FirstLayerCellVariableFillPattern.o
+DEPENDS_48:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FirstLayerCellVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	FirstLayerCellVariableFillPattern.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_48 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_48:X.o=${NDIM}.o}: ${DEPENDS_48}
+
+FILE_49=FirstLayerNodeVariableFillPattern.o
+DEPENDS_49:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FirstLayerNodeVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	FirstLayerNodeVariableFillPattern.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_49 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_49:X.o=${NDIM}.o}: ${DEPENDS_49}
+
+FILE_50=IndexData.o
+DEPENDS_50:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h IndexData.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_50 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_50:X.o=${NDIM}.o}: ${DEPENDS_50}
+
+FILE_51=IndexDataFactory.o
+DEPENDS_51:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	IndexDataFactory.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_51 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_51:X.o=${NDIM}.o}: ${DEPENDS_51}
+
+FILE_52=IndexVariable.o
+DEPENDS_52:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	IndexVariable.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_52 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_52:X.o=${NDIM}.o}: ${DEPENDS_52}
+
+FILE_53=MBDataUtilities.o
+DEPENDS_53:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MBDataUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MBDataUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h MBDataUtilities.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_53 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_53:X.o=${NDIM}.o}: ${DEPENDS_53}
+
+FILE_54=MultiblockCellDataTranslator.o
+DEPENDS_54:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	MultiblockCellDataTranslator.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_54 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_54:X.o=${NDIM}.o}: ${DEPENDS_54}
+
+FILE_55=MultiblockEdgeDataTranslator.o
+DEPENDS_55:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	MultiblockEdgeDataTranslator.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_55 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_55:X.o=${NDIM}.o}: ${DEPENDS_55}
+
+FILE_56=MultiblockFaceDataTranslator.o
+DEPENDS_56:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	MultiblockFaceDataTranslator.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_56 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_56:X.o=${NDIM}.o}: ${DEPENDS_56}
+
+FILE_57=MultiblockNodeDataTranslator.o
+DEPENDS_57:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	MultiblockNodeDataTranslator.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_57 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_57:X.o=${NDIM}.o}: ${DEPENDS_57}
+
+FILE_58=MultiblockSideDataTranslator.o
+DEPENDS_58:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	MultiblockSideDataTranslator.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_58 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_58:X.o=${NDIM}.o}: ${DEPENDS_58}
+
+FILE_59=NodeComplexInjection.o
+DEPENDS_59:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeComplexInjection.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	NodeComplexInjection.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_59 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_59:X.o=${NDIM}.o}: ${DEPENDS_59}
+
+FILE_60=NodeComplexLinearTimeInterpolateOp.o
+DEPENDS_60:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeComplexLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	NodeComplexLinearTimeInterpolateOp.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_60 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_60:X.o=${NDIM}.o}: ${DEPENDS_60}
+
+FILE_61=NodeData.o
+DEPENDS_61:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h NodeData.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_61 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_61:X.o=${NDIM}.o}: ${DEPENDS_61}
+
+FILE_62=NodeDataFactory.o
+DEPENDS_62:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h NodeDataFactory.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_62 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_62:X.o=${NDIM}.o}: ${DEPENDS_62}
+
+FILE_63=NodeDoubleInjection.o
+DEPENDS_63:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDoubleInjection.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	NodeDoubleInjection.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_63 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_63:X.o=${NDIM}.o}: ${DEPENDS_63}
+
+FILE_64=NodeDoubleLinearTimeInterpolateOp.o
+DEPENDS_64:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDoubleLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	NodeDoubleLinearTimeInterpolateOp.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_64 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_64:X.o=${NDIM}.o}: ${DEPENDS_64}
+
+FILE_65=NodeFloatInjection.o
+DEPENDS_65:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeFloatInjection.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	NodeFloatInjection.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_65 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_65:X.o=${NDIM}.o}: ${DEPENDS_65}
+
+FILE_66=NodeFloatLinearTimeInterpolateOp.o
+DEPENDS_66:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeFloatLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	NodeFloatLinearTimeInterpolateOp.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_66 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_66:X.o=${NDIM}.o}: ${DEPENDS_66}
+
+FILE_67=NodeGeometry.o
+DEPENDS_67:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h NodeGeometry.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_67 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_67:X.o=${NDIM}.o}: ${DEPENDS_67}
+
+FILE_68=NodeIndex.o
+DEPENDS_68:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h NodeIndex.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_68 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_68:X.o=${NDIM}.o}: ${DEPENDS_68}
+
+FILE_69=NodeIntegerInjection.o
+DEPENDS_69:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIntegerInjection.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	NodeIntegerInjection.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_69 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_69:X.o=${NDIM}.o}: ${DEPENDS_69}
+
+FILE_70=NodeIterator.o
+DEPENDS_70:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h NodeIterator.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_70 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_70:X.o=${NDIM}.o}: ${DEPENDS_70}
+
+FILE_71=NodeOverlap.o
+DEPENDS_71:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h NodeOverlap.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_71 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_71:X.o=${NDIM}.o}: ${DEPENDS_71}
+
+FILE_72=NodeVariable.o
+DEPENDS_72:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h NodeVariable.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_72 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_72:X.o=${NDIM}.o}: ${DEPENDS_72}
+
+FILE_73=OuteredgeData.o
+DEPENDS_73:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h OuteredgeData.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_73 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_73:X.o=${NDIM}.o}: ${DEPENDS_73}
+
+FILE_74=OuteredgeDataFactory.o
+DEPENDS_74:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h OuteredgeDataFactory.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_74 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_74:X.o=${NDIM}.o}: ${DEPENDS_74}
+
+FILE_75=OuteredgeGeometry.o
+DEPENDS_75:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h OuteredgeGeometry.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_75 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_75:X.o=${NDIM}.o}: ${DEPENDS_75}
+
+FILE_76=OuteredgeVariable.o
+DEPENDS_76:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h OuteredgeVariable.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_76 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_76:X.o=${NDIM}.o}: ${DEPENDS_76}
+
+FILE_77=OuterfaceComplexConstantRefine.o
+DEPENDS_77:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceComplexConstantRefine.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	OuterfaceComplexConstantRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_77 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_77:X.o=${NDIM}.o}: ${DEPENDS_77}
+
+FILE_78=OuterfaceComplexLinearTimeInterpolateOp.o
+DEPENDS_78:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceComplexLinearTimeInterpolateOp.h\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	OuterfaceComplexLinearTimeInterpolateOp.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_78 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_78:X.o=${NDIM}.o}: ${DEPENDS_78}
+
+FILE_79=OuterfaceData.o
+DEPENDS_79:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h OuterfaceData.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_79 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_79:X.o=${NDIM}.o}: ${DEPENDS_79}
+
+FILE_80=OuterfaceDataFactory.o
+DEPENDS_80:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h OuterfaceDataFactory.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_80 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_80:X.o=${NDIM}.o}: ${DEPENDS_80}
+
+FILE_81=OuterfaceDoubleConstantRefine.o
+DEPENDS_81:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDoubleConstantRefine.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	OuterfaceDoubleConstantRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_81 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_81:X.o=${NDIM}.o}: ${DEPENDS_81}
+
+FILE_82=OuterfaceDoubleLinearTimeInterpolateOp.o
+DEPENDS_82:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDoubleLinearTimeInterpolateOp.h\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	OuterfaceDoubleLinearTimeInterpolateOp.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_82 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_82:X.o=${NDIM}.o}: ${DEPENDS_82}
+
+FILE_83=OuterfaceFloatConstantRefine.o
+DEPENDS_83:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceFloatConstantRefine.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	OuterfaceFloatConstantRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_83 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_83:X.o=${NDIM}.o}: ${DEPENDS_83}
+
+FILE_84=OuterfaceFloatLinearTimeInterpolateOp.o
+DEPENDS_84:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceFloatLinearTimeInterpolateOp.h\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	OuterfaceFloatLinearTimeInterpolateOp.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_84 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_84:X.o=${NDIM}.o}: ${DEPENDS_84}
+
+FILE_85=OuterfaceGeometry.o
+DEPENDS_85:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h OuterfaceGeometry.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_85 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_85:X.o=${NDIM}.o}: ${DEPENDS_85}
+
+FILE_86=OuterfaceIntegerConstantRefine.o
+DEPENDS_86:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceIntegerConstantRefine.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	OuterfaceIntegerConstantRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_86 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_86:X.o=${NDIM}.o}: ${DEPENDS_86}
+
+FILE_87=OuterfaceVariable.o
+DEPENDS_87:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h OuterfaceVariable.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_87 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_87:X.o=${NDIM}.o}: ${DEPENDS_87}
+
+FILE_88=OuternodeData.o
+DEPENDS_88:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h OuternodeData.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_88 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_88:X.o=${NDIM}.o}: ${DEPENDS_88}
+
+FILE_89=OuternodeDataFactory.o
+DEPENDS_89:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h OuternodeDataFactory.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_89 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_89:X.o=${NDIM}.o}: ${DEPENDS_89}
+
+FILE_90=OuternodeDoubleConstantCoarsen.o
+DEPENDS_90:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDoubleConstantCoarsen.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	OuternodeDoubleConstantCoarsen.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_90 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_90:X.o=${NDIM}.o}: ${DEPENDS_90}
+
+FILE_91=OuternodeGeometry.o
+DEPENDS_91:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h OuternodeGeometry.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_91 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_91:X.o=${NDIM}.o}: ${DEPENDS_91}
+
+FILE_92=OuternodeVariable.o
+DEPENDS_92:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h OuternodeVariable.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_92 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_92:X.o=${NDIM}.o}: ${DEPENDS_92}
+
+FILE_93=OutersideComplexLinearTimeInterpolateOp.o
+DEPENDS_93:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideComplexLinearTimeInterpolateOp.h\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	OutersideComplexLinearTimeInterpolateOp.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_93 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_93:X.o=${NDIM}.o}: ${DEPENDS_93}
+
+FILE_94=OutersideData.o
+DEPENDS_94:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h OutersideData.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_94 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_94:X.o=${NDIM}.o}: ${DEPENDS_94}
+
+FILE_95=OutersideDataFactory.o
+DEPENDS_95:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h OutersideDataFactory.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_95 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_95:X.o=${NDIM}.o}: ${DEPENDS_95}
+
+FILE_96=OutersideDoubleLinearTimeInterpolateOp.o
+DEPENDS_96:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDoubleLinearTimeInterpolateOp.h\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	OutersideDoubleLinearTimeInterpolateOp.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_96 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_96:X.o=${NDIM}.o}: ${DEPENDS_96}
+
+FILE_97=OutersideFloatLinearTimeInterpolateOp.o
+DEPENDS_97:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideFloatLinearTimeInterpolateOp.h\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	OutersideFloatLinearTimeInterpolateOp.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_97 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_97:X.o=${NDIM}.o}: ${DEPENDS_97}
+
+FILE_98=OutersideGeometry.o
+DEPENDS_98:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h OutersideGeometry.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_98 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_98:X.o=${NDIM}.o}: ${DEPENDS_98}
+
+FILE_99=OutersideVariable.o
+DEPENDS_99:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h OutersideVariable.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_99 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_99:X.o=${NDIM}.o}: ${DEPENDS_99}
+
+FILE_100=SecondLayerNodeNoCornersVariableFillPattern.o
+DEPENDS_100:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SecondLayerNodeNoCornersVariableFillPattern.h\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	SecondLayerNodeNoCornersVariableFillPattern.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_100 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_100:X.o=${NDIM}.o}: ${DEPENDS_100}
+
+FILE_101=SecondLayerNodeVariableFillPattern.o
+DEPENDS_101:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SecondLayerNodeVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	SecondLayerNodeVariableFillPattern.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_101 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_101:X.o=${NDIM}.o}: ${DEPENDS_101}
+
+FILE_102=SideComplexConstantRefine.o
+DEPENDS_102:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideComplexConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	SideComplexConstantRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_102 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_102:X.o=${NDIM}.o}: ${DEPENDS_102}
+
+FILE_103=SideComplexLinearTimeInterpolateOp.o
+DEPENDS_103:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideComplexLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	SideComplexLinearTimeInterpolateOp.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_103 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_103:X.o=${NDIM}.o}: ${DEPENDS_103}
+
+FILE_104=SideData.o
+DEPENDS_104:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h SideData.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_104 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_104:X.o=${NDIM}.o}: ${DEPENDS_104}
+
+FILE_105=SideDataFactory.o
+DEPENDS_105:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h SideDataFactory.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_105 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_105:X.o=${NDIM}.o}: ${DEPENDS_105}
+
+FILE_106=SideDoubleConstantRefine.o
+DEPENDS_106:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	SideDoubleConstantRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_106 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_106:X.o=${NDIM}.o}: ${DEPENDS_106}
+
+FILE_107=SideDoubleLinearTimeInterpolateOp.o
+DEPENDS_107:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDoubleLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	SideDoubleLinearTimeInterpolateOp.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_107 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_107:X.o=${NDIM}.o}: ${DEPENDS_107}
+
+FILE_108=SideFloatConstantRefine.o
+DEPENDS_108:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideFloatConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	SideFloatConstantRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_108 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_108:X.o=${NDIM}.o}: ${DEPENDS_108}
+
+FILE_109=SideFloatLinearTimeInterpolateOp.o
+DEPENDS_109:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideFloatLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	SideFloatLinearTimeInterpolateOp.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_109 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_109:X.o=${NDIM}.o}: ${DEPENDS_109}
+
+FILE_110=SideGeometry.o
+DEPENDS_110:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h SideGeometry.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_110 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_110:X.o=${NDIM}.o}: ${DEPENDS_110}
+
+FILE_111=SideIndex.o
+DEPENDS_111:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h SideIndex.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_111 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_111:X.o=${NDIM}.o}: ${DEPENDS_111}
+
+FILE_112=SideIntegerConstantRefine.o
+DEPENDS_112:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIntegerConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	SideIntegerConstantRefine.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_112 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_112:X.o=${NDIM}.o}: ${DEPENDS_112}
+
+FILE_113=SideIterator.o
+DEPENDS_113:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h SideIterator.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_113 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_113:X.o=${NDIM}.o}: ${DEPENDS_113}
+
+FILE_114=SideOverlap.o
+DEPENDS_114:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h SideOverlap.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_114 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_114:X.o=${NDIM}.o}: ${DEPENDS_114}
+
+FILE_115=SideVariable.o
+DEPENDS_115:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h SideVariable.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_115 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_115:X.o=${NDIM}.o}: ${DEPENDS_115}
+
+FILE_116=SumOperation.o
+DEPENDS_116:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h SumOperation.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_116 +=\
+	
+endif
+
+${FILE_116:X.o=${NDIM}.o}: ${DEPENDS_116}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,114 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   primary makefile for compiling the SAMRAI pdat package 
+##
+#########################################################################
+
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/SAMRAI/pdat
+VPATH         = @srcdir@
+OBJECT        = ../../..
+
+default: library
+
+include $(OBJECT)/config/Makefile.config
+
+SUBDIRS = fortran
+
+OBJS = 		\
+	CellComplexLinearTimeInterpolateOp.o \
+	CellDoubleLinearTimeInterpolateOp.o \
+	CellFloatLinearTimeInterpolateOp.o \
+	EdgeComplexLinearTimeInterpolateOp.o \
+	EdgeDoubleLinearTimeInterpolateOp.o \
+	EdgeFloatLinearTimeInterpolateOp.o \
+	FaceComplexLinearTimeInterpolateOp.o \
+	FaceDoubleLinearTimeInterpolateOp.o \
+	FaceFloatLinearTimeInterpolateOp.o \
+	NodeComplexLinearTimeInterpolateOp.o \
+	NodeDoubleLinearTimeInterpolateOp.o \
+	NodeFloatLinearTimeInterpolateOp.o \
+	OuterfaceComplexLinearTimeInterpolateOp.o \
+	OuterfaceDoubleLinearTimeInterpolateOp.o \
+	OuterfaceFloatLinearTimeInterpolateOp.o \
+	OutersideComplexLinearTimeInterpolateOp.o \
+	OutersideDoubleLinearTimeInterpolateOp.o \
+	OutersideFloatLinearTimeInterpolateOp.o \
+	SideComplexLinearTimeInterpolateOp.o \
+	SideDoubleLinearTimeInterpolateOp.o \
+	SideFloatLinearTimeInterpolateOp.o \
+	CellComplexConstantRefine.o \
+	CellDoubleConstantRefine.o \
+	CellFloatConstantRefine.o \
+	CellIntegerConstantRefine.o \
+	EdgeComplexConstantRefine.o \
+	EdgeDoubleConstantRefine.o \
+	EdgeFloatConstantRefine.o \
+	EdgeIntegerConstantRefine.o \
+	FaceComplexConstantRefine.o \
+	FaceDoubleConstantRefine.o \
+	FaceFloatConstantRefine.o \
+	FaceIntegerConstantRefine.o \
+	OuterfaceComplexConstantRefine.o \
+	OuterfaceDoubleConstantRefine.o \
+	OuterfaceFloatConstantRefine.o \
+	OuterfaceIntegerConstantRefine.o \
+	SideComplexConstantRefine.o \
+	SideDoubleConstantRefine.o \
+	SideFloatConstantRefine.o \
+	SideIntegerConstantRefine.o \
+	NodeComplexInjection.o \
+	NodeDoubleInjection.o \
+	NodeFloatInjection.o \
+	NodeIntegerInjection.o \
+	MultiblockCellDataTranslator.o \
+	MultiblockEdgeDataTranslator.o \
+	MultiblockFaceDataTranslator.o \
+	MultiblockNodeDataTranslator.o \
+	MultiblockSideDataTranslator.o \
+	OuternodeDoubleConstantCoarsen.o \
+	CellIterator.o \
+	EdgeIterator.o \
+	FaceIterator.o \
+	NodeIterator.o \
+	SideIterator.o \
+	CellIndex.o \
+	EdgeIndex.o \
+	FaceIndex.o \
+	NodeIndex.o \
+	SideIndex.o \
+	CellGeometry.o \
+	EdgeGeometry.o \
+	FaceGeometry.o \
+	NodeGeometry.o \
+	OuteredgeGeometry.o \
+	OuterfaceGeometry.o \
+	OuternodeGeometry.o \
+	OutersideGeometry.o \
+	SideGeometry.o \
+	CellOverlap.o \
+	EdgeOverlap.o \
+	FaceOverlap.o \
+	NodeOverlap.o \
+	SideOverlap.o \
+	ArrayDataIterator.o \
+        FirstLayerCellVariableFillPattern.o \
+        FirstLayerCellNoCornersVariableFillPattern.o \
+        FirstLayerNodeVariableFillPattern.o \
+        SecondLayerNodeVariableFillPattern.o \
+        SecondLayerNodeNoCornersVariableFillPattern.o
+
+library: $(OBJS)
+	for DIR in $(SUBDIRS); do if test -d $$DIR; then (cd $$DIR && $(MAKE) $@) ; fi || exit 1; done
+
+clean:
+	$(SAMCLEAN)
+	for DIR in $(SUBDIRS); do if test -d $$DIR; then (cd $$DIR && $(MAKE) $@) ; fi || exit 1; done
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/MultiblockCellDataTranslator.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/MultiblockCellDataTranslator.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,289 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations for copying patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_MultiblockCellDataTranslator_C
+#define included_pdat_MultiblockCellDataTranslator_C
+
+#include "SAMRAI/pdat/MultiblockCellDataTranslator.h"
+
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/hier/MBUtilities.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor and destructor do nothing, as all member functions in     *
+ * this class are static.                                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+MultiblockCellDataTranslator<TYPE>::MultiblockCellDataTranslator()
+{
+}
+
+template<class TYPE>
+MultiblockCellDataTranslator<TYPE>::~MultiblockCellDataTranslator()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Translation and copy for cell data                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void MultiblockCellDataTranslator<TYPE>::translateAndCopyData(
+   hier::Patch& dst_patch,
+   const int dst_id,
+   const hier::Patch& src_patch,
+   const int src_id,
+   const hier::IntVector& shift,
+   const hier::MultiblockPatchHierarchy::RotationIdentifier rotate)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst_patch, src_patch, shift);
+
+   const tbox::Dimension& dim(shift.getDim());
+
+   tbox::Pointer<CellData<TYPE> > dst = dst_patch.getPatchData(dst_id);
+   tbox::Pointer<CellData<TYPE> > src = src_patch.getPatchData(src_id);
+
+   TBOX_ASSERT(!(dst.isNull()));
+   TBOX_ASSERT(!(src.isNull()));
+
+   if (dim == tbox::Dimension(2)) {
+      translateAndCopyArrayData(dst->getArrayData(),
+         src->getArrayData(),
+         shift,
+         rotate);
+   } else if (dim == tbox::Dimension(3)) {
+      if (rotate == 0) {
+         translateAndCopyArrayData(dst->getArrayData(),
+            src->getArrayData(),
+            shift,
+            rotate);
+      } else {
+
+         const hier::MultiblockPatchHierarchy::RotationIdentifier back_rotate =
+            hier::MultiblockPatchHierarchy::getReverseRotationIdentifier(
+               rotate, dim);
+
+         hier::IntVector back_shift(dim);
+
+         hier::MultiblockPatchHierarchy::calculateReverseShift(
+            back_shift, shift, rotate);
+
+         TYPE * const dst_ptr = dst->getArrayData().getPointer();
+         const TYPE * const src_ptr = src->getArrayData().getPointer();
+
+         const int depth = ((dst->getDepth() < src->getDepth()) ?
+                            dst->getDepth() : src->getDepth());
+
+         const hier::Box dst_box = dst->getBox();
+         const hier::Box src_box = src->getBox();
+         const hier::Box dst_ghost_box = dst->getGhostBox();
+         const hier::Box src_ghost_box = src->getGhostBox();
+
+         int dst_lo[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int dst_w[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int src_glo[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int dst_gw[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+         int src_gw[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+         int bshift[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+         for (int nd = 0; nd < dim.getValue(); nd++) {
+            dst_lo[nd] = dst_box.lower(nd);
+            dst_w[nd] = dst_box.numberCells(nd);
+            src_glo[nd] = src_ghost_box.lower(nd);
+            dst_gw[nd] = dst_ghost_box.numberCells(nd);
+            src_gw[nd] = src_ghost_box.numberCells(nd);
+
+            bshift[nd] = back_shift(nd);
+         }
+
+         const int dst_offset = dst_ghost_box.size();
+         const int src_offset = src_ghost_box.size();
+
+         int dst_bd = dst_ghost_box.offset(dst_box.lower());
+         int src_bd = 0;
+
+         int dst_ba;
+         int src_ba;
+
+         int src_in[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+         /*
+          * two_id and one_id used to avoid array-bounds warnings when
+          * compiling with dim < 3.  Since this is within a ((dim == tbox::Dimension(3)))
+          * conditional, two_id will always be 2 and one_id will always
+          * be 1. zero_id is used to keep the style consistent.
+          */
+         const int two_id = (dim > tbox::Dimension(2)) ? 2 : (dim.getValue() - 1);
+         const int one_id = (dim > tbox::Dimension(1)) ? 1 : 0;
+         const int zero_id = 0;
+         for (int d = 0; d < depth; d++) {
+
+            for (int i2 = 0; i2 < dst_w[two_id]; i2++) {
+               for (int i1 = 0; i1 < dst_w[one_id]; i1++) {
+                  for (int i0 = 0; i0 < dst_w[zero_id]; i0++) {
+
+                     dst_ba = (i0
+                               + i1 * dst_gw[zero_id]
+                               + i2 * dst_gw[one_id] * dst_gw[zero_id]
+                               ) + dst_bd;
+
+                     src_in[zero_id] = dst_lo[zero_id] + i0;
+                     src_in[one_id] = dst_lo[one_id] + i1;
+                     src_in[two_id] = dst_lo[two_id] + i2;
+
+                     hier::MBUtilities::rotateIndex(src_in, dim, back_rotate);
+                     for (int sb = 0; sb < dim.getValue(); sb++) {
+                        src_in[sb] += bshift[sb];
+                     }
+
+                     src_ba = ((src_in[zero_id] - src_glo[zero_id])
+                               + (src_in[one_id] - src_glo[one_id])
+                               * src_gw[zero_id]
+                               + (src_in[two_id] - src_glo[two_id])
+                               * src_gw[one_id] * src_gw[zero_id]
+                               ) + src_bd;
+
+                     dst_ptr[dst_ba] = src_ptr[src_ba];
+                  }
+               }
+            }
+
+            dst_bd += dst_offset;
+            src_bd += src_offset;
+
+         }
+      }
+   } else {
+      TBOX_ERROR(
+         "MultiblockCellDataTranslator<TYPE>::translateAndCopyData : dim = 1 or > 3 not implemented");
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Translation and copy for array data                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void MultiblockCellDataTranslator<TYPE>::translateAndCopyArrayData(
+   ArrayData<TYPE>& dst,
+   const ArrayData<TYPE>& src,
+   const hier::IntVector& shift,
+   const hier::MultiblockPatchHierarchy::RotationIdentifier rotate)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst, src, shift);
+
+   const tbox::Dimension& dim(dst.getDim());
+
+   bool no_rotate = true;
+   if (rotate != 0) {
+      no_rotate = false;
+   }
+
+   if (no_rotate) {
+      dst.copy(src, dst.getBox(), shift);
+   } else if (dim < tbox::Dimension(3)) {
+      hier::Box rotatebox(src.getBox());
+      int num_rotations = rotate;
+
+      rotatebox.rotate(num_rotations);
+
+      const hier::Box copybox = dst.getBox()
+         * hier::Box::shift(rotatebox, shift);
+
+      if (!copybox.empty()) {
+         TYPE * const dst_ptr = dst.getPointer();
+         const TYPE * const src_ptr = src.getPointer();
+
+         const int depth = (dst.getDepth() < src.getDepth() ?
+                            dst.getDepth() : src.getDepth());
+
+         const int box_w0 = copybox.numberCells(0);
+
+         const int dst_w0 = dst.getBox().numberCells(0);
+         int src_w0 = src.getBox().numberCells(0);
+         if (num_rotations == 3) {
+            src_w0 = -src_w0;
+         }
+         const int box_w1 = copybox.numberCells(1);
+
+         const int dst_offset = dst.getOffset();
+         const int src_offset = src.getOffset();
+
+         int dst_bd = dst.getBox().offset(copybox.lower());
+         hier::Index src_index(copybox.lower() - shift);
+
+         // rotate src_index 4-num_rotations;
+         for (int r = 0; r < 4 - num_rotations; r++) {
+            hier::Index tmp_index(src_index);
+            src_index(0) = tmp_index(1);
+            src_index(1) = -tmp_index(0) - 1;
+         }
+
+         int src_bd_orig = src.getBox().offset(src_index);
+
+         for (int d = 0; d < depth; d++) {
+            int src_bd = src_bd_orig;
+            int dst_b2 = dst_bd;
+            int src_b2 = src_bd;
+            int dst_b1 = dst_b2;
+            int src_b1 = src_b2;
+
+            for (int i1 = 0; i1 < box_w1; i1++) {
+
+               for (int i0 = 0; i0 < box_w0; i0++) {
+                  if (i0) {
+                     if (num_rotations % 2) {
+                        src_b1 += src_w0;
+                     } else {
+                        src_b1--;
+                     }
+                  }
+                  dst_ptr[dst_b1 + i0] = src_ptr[src_b1];
+               }
+
+               dst_b1 += dst_w0;
+               if (num_rotations == 1) {
+                  src_b1 = --src_bd;
+               } else if (num_rotations == 2) {
+                  src_b1 = src_bd - src_w0;
+                  src_bd = src_b1;
+               } else if (num_rotations == 3) {
+                  src_b1 = ++src_bd;
+               }
+            }
+
+            dst_bd += dst_offset;
+            src_bd_orig += src_offset;
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/MultiblockCellDataTranslator.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/MultiblockCellDataTranslator.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_MultiblockCellDataTranslator
+#define included_pdat_MultiblockCellDataTranslator
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/MultiblockDataTranslator.h"
+#include "SAMRAI/pdat/ArrayData.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * Class MultiblockCellDataTranslator<DIM>
+ */
+
+template<class TYPE>
+class MultiblockCellDataTranslator:
+   public hier::MultiblockDataTranslator
+{
+public:
+   /*!
+    * @brief Constructor
+    */
+   MultiblockCellDataTranslator<TYPE>();
+
+   /*!
+    * @brief The virtual destructor does nothing interesting.
+    */
+   virtual ~MultiblockCellDataTranslator<TYPE>();
+
+   virtual void
+   translateAndCopyData(
+      hier::Patch& dst_patch,
+      const int dst_id,
+      const hier::Patch& src_patch,
+      const int src_id,
+      const hier::IntVector& shift,
+      const hier::MultiblockPatchHierarchy::RotationIdentifier rotate);
+
+   virtual void translateAndFillData(
+      hier::Patch& dst_patch,
+      const int dst_id,
+      const hier::Patch& src_patch,
+      const int src_id,
+      const hier::IntVector& shift,
+      const hier::MultiblockPatchHierarchy::RotationIdentifier rotate)
+   {
+      (void)dst_patch;
+      (void)dst_id;
+      (void)src_patch;
+      (void)src_id;
+      (void)shift;
+      (void)rotate;
+   }
+
+private:
+   void
+   translateAndCopyArrayData(
+      ArrayData<TYPE>& dst,
+      const ArrayData<TYPE>& src,
+      const hier::IntVector& shift,
+      const hier::MultiblockPatchHierarchy::RotationIdentifier rotate);
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/MultiblockCellDataTranslator.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/MultiblockEdgeDataTranslator.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,559 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations for copying patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_MultiblockEdgeDataTranslator_C
+#define included_pdat_MultiblockEdgeDataTranslator_C
+
+#include "SAMRAI/pdat/MultiblockEdgeDataTranslator.h"
+
+#include "SAMRAI/pdat/EdgeData.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor and destructor do nothing, as all member functions in     *
+ * this class are static.                                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+MultiblockEdgeDataTranslator<TYPE>::MultiblockEdgeDataTranslator()
+{
+}
+
+template<class TYPE>
+MultiblockEdgeDataTranslator<TYPE>::~MultiblockEdgeDataTranslator()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Translation and copy for edge data                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void MultiblockEdgeDataTranslator<TYPE>::translateAndCopyData(
+   hier::Patch& dst_patch,
+   const int dst_id,
+   const hier::Patch& src_patch,
+   const int src_id,
+   const hier::IntVector& shift,
+   const hier::MultiblockPatchHierarchy::RotationIdentifier rotate)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst_patch, src_patch, shift);
+
+   const tbox::Dimension& dim(dst_patch.getDim());
+
+   tbox::Pointer<EdgeData<TYPE> > dst = dst_patch.getPatchData(dst_id);
+   tbox::Pointer<EdgeData<TYPE> > src = src_patch.getPatchData(src_id);
+
+   TBOX_ASSERT(!(dst.isNull()));
+   TBOX_ASSERT(!(src.isNull()));
+
+   if (rotate == 0) {
+      for (int axis = 0; axis < dim.getValue(); axis++) {
+         translateAndCopyArrayData(dst->getArrayData(axis),
+            src->getArrayData(axis),
+            shift,
+            rotate);
+      }
+   } else if (dim == tbox::Dimension(2)) {
+      for (int axis = 0; axis < dim.getValue(); axis++) {
+         for (pdat::EdgeIterator fi(dst->getBox(), axis); fi; fi++) {
+
+            pdat::EdgeIndex dst_index(fi());
+            hier::Index dst_xyz_index(dst_index);
+
+            hier::Index src_xyz_index(dst_xyz_index);
+
+            int num_rotations = (4 - rotate) % 4;
+            hier::IntVector copy_shift(shift);
+
+            int src_axis;
+            if (num_rotations % 2) {
+               src_axis = (axis + 1) % dim.getValue();
+            } else {
+               src_axis = axis;
+            }
+
+            for (int r = 0; r < num_rotations; r++) {
+               hier::Index tmp_index(src_xyz_index);
+               src_xyz_index(0) = tmp_index(1);
+               src_xyz_index(1) = -tmp_index(0) - 1;
+               hier::IntVector tmp_shift(copy_shift);
+               copy_shift(0) = tmp_shift(1);
+               copy_shift(1) = -tmp_shift(0);
+            }
+
+            for (int i = 0; i < dim.getValue(); i++) {
+               src_xyz_index(i) -= copy_shift(i);
+            }
+
+            pdat::EdgeIndex src_index(dim);
+            if (src_axis == 0) {
+               src_index(0) = src_xyz_index(0);
+               src_index(1) = src_xyz_index(1);
+               if (num_rotations == 1 || num_rotations == 2) {
+                  src_index(1)++;
+               }
+            } else {
+               src_index(0) = src_xyz_index(0);
+               if ((num_rotations == 3) || (num_rotations == 2)) {
+                  src_index(0)++;
+               }
+               src_index(1) = src_xyz_index(1);
+            }
+            src_index.setAxis(src_axis);
+
+            for (int d = 0; d < dst->getDepth(); d++) {
+               (*dst)(dst_index, d) = (*src)(src_index, d);
+            }
+         }
+      }
+   } else if (dim == tbox::Dimension(3)) {
+      for (int axis = 0; axis < dim.getValue(); axis++) {
+         int src_axis;
+         if (axis == 0) {
+
+            switch (rotate) {
+
+               case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+               case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+               case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+               case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+               case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+               case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+               case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+               case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+
+                  src_axis = 0;
+                  break;
+
+               case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+               case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+               case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+               case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+               case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+               case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+               case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+               case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+
+                  src_axis = 1;
+                  break;
+
+               default:
+
+                  src_axis = 2;
+                  break;
+
+            }
+         } else if (axis == 1) {
+            switch (rotate) {
+               case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+               case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+               case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+               case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+               case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+               case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+               case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+               case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+
+                  src_axis = 0;
+                  break;
+
+               case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+               case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+               case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+               case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+               case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+               case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+               case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+               case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+
+                  src_axis = 1;
+                  break;
+
+               default:
+
+                  src_axis = 2;
+                  break;
+
+            }
+         } else {
+            switch (rotate) {
+               case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+               case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+               case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+               case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+               case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+               case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+               case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+               case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+
+                  src_axis = 0;
+                  break;
+
+               case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+               case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+               case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+               case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+               case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+               case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+               case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+               case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+
+                  src_axis = 1;
+                  break;
+
+               default:
+
+                  src_axis = 2;
+                  break;
+
+            }
+         }
+
+         for (pdat::EdgeIterator fi(dst->getBox(), axis); fi; fi++) {
+            pdat::EdgeIndex dst_index(fi());
+
+            hier::MultiblockPatchHierarchy::RotationIdentifier back_rotate =
+               hier::MultiblockPatchHierarchy::
+               getReverseRotationIdentifier(rotate, dim);
+
+            hier::Box src_box(dst_index, dst_index);
+
+            src_box.rotate(back_rotate);
+
+            hier::IntVector back_shift(dim);
+            hier::MultiblockPatchHierarchy::calculateReverseShift(
+               back_shift, shift, rotate);
+
+            src_box.shift(back_shift);
+
+            pdat::EdgeIndex src_index(dim);
+            for (int i = 0; i < dim.getValue(); i++) {
+               src_index(i) = src_box.lower() (i);
+            }
+
+            switch (rotate) {
+
+               case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+               case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+               case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+                  break;
+
+               case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+                  if ((axis == 1) || (axis == 2)) {
+                     src_index(0)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+                  if ((axis == 0) || (axis == 1)) {
+                     src_index(0)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+                  if ((axis == 0) || (axis == 2)) {
+                     src_index(0)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+                  if ((axis == 1) || (axis == 2)) {
+                     src_index(2)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+                  if ((axis == 0) || (axis == 2)) {
+                     src_index(2)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+                  if ((axis == 0) || (axis == 1)) {
+                     src_index(2)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+                  if ((axis == 0) || (axis == 2)) {
+                     src_index(0)++;
+                  }
+                  if ((axis == 1) || (axis == 2)) {
+                     src_index(2)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+                  if ((axis == 0) || (axis == 1)) {
+                     src_index(2)++;
+                  }
+                  if ((axis == 1) || (axis == 2)) {
+                     src_index(0)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+                  if ((axis == 0) || (axis == 1)) {
+                     src_index(0)++;
+                  }
+                  if ((axis == 0) || (axis == 2)) {
+                     src_index(2)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+                  if ((axis == 1) || (axis == 2)) {
+                     src_index(1)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+                  if ((axis == 0) || (axis == 1)) {
+                     src_index(1)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+                  if ((axis == 0) || (axis == 2)) {
+                     src_index(1)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+                  if ((axis == 0) || (axis == 1)) {
+                     src_index(0)++;
+                  }
+                  if ((axis == 1) || (axis == 2)) {
+                     src_index(1)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+                  if ((axis == 0) || (axis == 2)) {
+                     src_index(1)++;
+                  }
+                  if ((axis == 1) || (axis == 2)) {
+                     src_index(0)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+                  if ((axis == 0) || (axis == 2)) {
+                     src_index(0)++;
+                  }
+                  if ((axis == 0) || (axis == 1)) {
+                     src_index(1)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+                  if ((axis == 0) || (axis == 2)) {
+                     src_index(2)++;
+                  }
+                  if ((axis == 1) || (axis == 2)) {
+                     src_index(1)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+                  if ((axis == 0) || (axis == 1)) {
+                     src_index(1)++;
+                  }
+                  if ((axis == 1) || (axis == 2)) {
+                     src_index(2)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+                  if ((axis == 0) || (axis == 2)) {
+                     src_index(1)++;
+                  }
+                  if ((axis == 0) || (axis == 1)) {
+                     src_index(2)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+                  if ((axis == 0) || (axis == 2)) {
+                     src_index(0)++;
+                  }
+                  if ((axis == 1) || (axis == 2)) {
+                     src_index(1)++;
+                  }
+                  if ((axis == 0) || (axis == 1)) {
+                     src_index(2)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+                  if ((axis == 0) || (axis == 1)) {
+                     src_index(0)++;
+                  }
+                  if ((axis == 0) || (axis == 2)) {
+                     src_index(1)++;
+                  }
+                  if ((axis == 1) || (axis == 2)) {
+                     src_index(2)++;
+                  }
+                  break;
+
+               case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+                  if ((axis == 1) || (axis == 2)) {
+                     src_index(0)++;
+                  }
+                  if ((axis == 0) || (axis == 1)) {
+                     src_index(1)++;
+                  }
+                  if ((axis == 0) || (axis == 2)) {
+                     src_index(2)++;
+                  }
+                  break;
+
+               default:
+                  break;
+
+            }
+
+            src_index.setAxis(src_axis);
+
+            //back rotate src_index into src index space
+            //back shift src_index to needed location
+            //copy data from src_index to dst_index
+
+            for (int d = 0; d < dst->getDepth(); d++) {
+               (*dst)(dst_index, d) = (*src)(src_index, d);
+            }
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Translation and copy for array data                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void MultiblockEdgeDataTranslator<TYPE>::translateAndCopyArrayData(
+   pdat::ArrayData<TYPE>& dst,
+   const pdat::ArrayData<TYPE>& src,
+   const hier::IntVector& shift,
+   const hier::MultiblockPatchHierarchy::RotationIdentifier rotate)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst, src, shift);
+
+   const tbox::Dimension& dim(dst.getDim());
+
+   bool no_rotate = true;
+   if (rotate != 0) {
+      no_rotate = false;
+   }
+
+   if (no_rotate) {
+      dst.copy(src, dst.getBox(), shift);
+   } else if (dim < tbox::Dimension(3)) {
+      hier::Box rotatebox(src.getBox());
+      int num_rotations = rotate;
+
+      rotatebox.rotate(num_rotations);
+
+      const hier::Box copybox = dst.getBox()
+         * hier::Box::shift(rotatebox, shift);
+
+      if (!copybox.empty()) {
+         TYPE * const dst_ptr = dst.getPointer();
+         const TYPE * const src_ptr = src.getPointer();
+
+         const int depth = (dst.getDepth() < src.getDepth() ?
+                            dst.getDepth() : src.getDepth());
+
+         const int box_w0 = copybox.numberCells(0);
+
+         const int dst_w0 = dst.getBox().numberCells(0);
+         int src_w0 = src.getBox().numberCells(0);
+         if (num_rotations == 3) {
+            src_w0 = -src_w0;
+         }
+         const int box_w1 = copybox.numberCells(1);
+
+         const int dst_offset = dst.getOffset();
+         const int src_offset = src.getOffset();
+
+         int dst_bd = dst.getBox().offset(copybox.lower());
+         hier::Index src_index(copybox.lower() - shift);
+
+         // rotate src_index 4-num_rotations;
+         for (int r = 0; r < 4 - num_rotations; r++) {
+            hier::Index tmp_index(src_index);
+            src_index(0) = tmp_index(1);
+            src_index(1) = -tmp_index(0) - 1;
+         }
+
+         int src_bd_orig = src.getBox().offset(src_index);
+
+         for (int d = 0; d < depth; d++) {
+            int src_bd = src_bd_orig;
+            int dst_b2 = dst_bd;
+            int src_b2 = src_bd;
+            int dst_b1 = dst_b2;
+            int src_b1 = src_b2;
+
+            for (int i1 = 0; i1 < box_w1; i1++) {
+
+               for (int i0 = 0; i0 < box_w0; i0++) {
+                  if (i0) {
+                     if (num_rotations % 2) {
+                        src_b1 += src_w0;
+                     } else {
+                        src_b1--;
+                     }
+                  }
+                  dst_ptr[dst_b1 + i0] = src_ptr[src_b1];
+               }
+
+               dst_b1 += dst_w0;
+               if (num_rotations == 1) {
+                  src_b1 = --src_bd;
+               } else if (num_rotations == 2) {
+                  src_b1 = src_bd - src_w0;
+                  src_bd = src_b1;
+               } else if (num_rotations == 3) {
+                  src_b1 = ++src_bd;
+               }
+            }
+
+            dst_bd += dst_offset;
+            src_bd_orig += src_offset;
+         }
+      }
+   } else {
+      TBOX_ERROR(
+         "MultiblockEdgeDataTranslator<TYPE>::translateAndCopyData : dim = 1 or > 3 not implemented");
+   }
+
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/MultiblockEdgeDataTranslator.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_MultiblockEdgeDataTranslator
+#define included_pdat_MultiblockEdgeDataTranslator
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/hier/MultiblockDataTranslator.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * Class MultiblockEdgeDataTranslator<DIM>
+ */
+
+template<class TYPE>
+class MultiblockEdgeDataTranslator:
+   public hier::MultiblockDataTranslator
+{
+public:
+   /*!
+    * @brief Constructor
+    */
+   MultiblockEdgeDataTranslator<TYPE>();
+
+   /*!
+    * @brief The virtual destructor does nothing interesting.
+    */
+   virtual ~MultiblockEdgeDataTranslator<TYPE>();
+
+   virtual void
+   translateAndCopyData(
+      hier::Patch& dst_patch,
+      const int dst_id,
+      const hier::Patch& src_patch,
+      const int src_id,
+      const hier::IntVector& shift,
+      const hier::MultiblockPatchHierarchy::RotationIdentifier rotate);
+
+   virtual void translateAndFillData(
+      hier::Patch& dst_patch,
+      const int dst_id,
+      const hier::Patch& src_patch,
+      const int src_id,
+      const hier::IntVector& shift,
+      const hier::MultiblockPatchHierarchy::RotationIdentifier rotate)
+   {
+      (void)dst_patch;
+      (void)dst_id;
+      (void)src_patch;
+      (void)src_id;
+      (void)shift;
+      (void)rotate;
+   }
+
+private:
+   void
+   translateAndCopyArrayData(
+      ArrayData<TYPE>& dst,
+      const ArrayData<TYPE>& src,
+      const hier::IntVector& shift,
+      const hier::MultiblockPatchHierarchy::RotationIdentifier rotate);
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/MultiblockEdgeDataTranslator.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/MultiblockFaceDataTranslator.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/MultiblockFaceDataTranslator.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,512 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations for copying patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_MultiblockFaceDataTranslator_C
+#define included_pdat_MultiblockFaceDataTranslator_C
+
+#include "SAMRAI/pdat/MultiblockFaceDataTranslator.h"
+
+#include "SAMRAI/pdat/FaceData.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor and destructor do nothing, as all member functions in     *
+ * this class are static.                                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+MultiblockFaceDataTranslator<TYPE>::MultiblockFaceDataTranslator()
+{
+}
+
+template<class TYPE>
+MultiblockFaceDataTranslator<TYPE>::~MultiblockFaceDataTranslator()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Translation and copy for face data                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void MultiblockFaceDataTranslator<TYPE>::translateAndCopyData(
+   hier::Patch& dst_patch,
+   const int dst_id,
+   const hier::Patch& src_patch,
+   const int src_id,
+   const hier::IntVector& shift,
+   const hier::MultiblockPatchHierarchy::RotationIdentifier rotate)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst_patch, src_patch, shift);
+
+   const tbox::Dimension& dim(shift.getDim());
+
+   tbox::Pointer<FaceData<TYPE> > dst = dst_patch.getPatchData(dst_id);
+   tbox::Pointer<FaceData<TYPE> > src = src_patch.getPatchData(src_id);
+
+   TBOX_ASSERT(!(dst.isNull()));
+   TBOX_ASSERT(!(src.isNull()));
+
+   if (rotate == 0) {
+      for (int axis = 0; axis < dim.getValue(); axis++) {
+         hier::Index face_shift(dim);
+         for (int d = 0; d < dim.getValue(); d++) {
+            face_shift(d) = shift((axis + d) % dim.getValue());
+         }
+         translateAndCopyArrayData(dst->getArrayData(axis),
+            src->getArrayData(axis),
+            face_shift,
+            rotate);
+      }
+   } else if (dim == tbox::Dimension(2)) {
+      for (int axis = 0; axis < dim.getValue(); axis++) {
+         for (pdat::FaceIterator fi(dst->getBox(), axis); fi; fi++) {
+            pdat::FaceIndex dst_index(fi());
+            hier::Index dst_xyz_index(dst_index);
+            if (axis == 1) {
+               dst_xyz_index(0) = dst_index(1);
+               dst_xyz_index(1) = dst_index(0);
+            }
+
+            hier::Index src_xyz_index(dst_xyz_index);
+
+            int num_rotations = (4 - rotate) % 4;
+            hier::IntVector copy_shift(shift);
+
+            int src_axis;
+            if (num_rotations % 2) {
+               src_axis = (axis + 1) % dim.getValue();
+            } else {
+               src_axis = axis;
+            }
+
+            for (int r = 0; r < num_rotations; r++) {
+               hier::Index tmp_index(src_xyz_index);
+               src_xyz_index(0) = tmp_index(1);
+               src_xyz_index(1) = -tmp_index(0) - 1;
+               hier::IntVector tmp_shift(copy_shift);
+               copy_shift(0) = tmp_shift(1);
+               copy_shift(1) = -tmp_shift(0);
+            }
+
+            for (int i = 0; i < dim.getValue(); i++) {
+               src_xyz_index(i) -= copy_shift(i);
+            }
+
+            pdat::FaceIndex src_index(dim);
+            if (src_axis == 1) {
+               src_index(0) = src_xyz_index(1);
+               if (num_rotations == 1 || num_rotations == 2) {
+                  src_index(0)++;
+               }
+               src_index(1) = src_xyz_index(0);
+            } else {
+               src_index(0) = src_xyz_index(0);
+               if ((num_rotations == 3) || (num_rotations == 2)) {
+                  src_index(0)++;
+               }
+               src_index(1) = src_xyz_index(1);
+            }
+            src_index.setAxis(src_axis);
+
+            for (int d = 0; d < dst->getDepth(); d++) {
+               (*dst)(dst_index, d) = (*src)(src_index, d);
+            }
+         }
+      }
+   } else if (dim == tbox::Dimension(3)) {
+      for (int axis = 0; axis < dim.getValue(); axis++) {
+         int src_axis;
+         if (axis == 0) {
+            switch (rotate) {
+
+               case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+               case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+               case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+               case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+               case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+               case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+               case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+               case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+
+                  src_axis = 0;
+                  break;
+
+               case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+               case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+               case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+               case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+               case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+               case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+               case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+               case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+
+                  src_axis = 1;
+                  break;
+
+               default:
+
+                  src_axis = 2;
+                  break;
+
+            }
+         } else if (axis == 1) {
+            switch (rotate) {
+               case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+               case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+               case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+               case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+               case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+               case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+               case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+               case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+
+                  src_axis = 0;
+                  break;
+
+               case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+               case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+               case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+               case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+               case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+               case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+               case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+               case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+
+                  src_axis = 1;
+                  break;
+
+               default:
+
+                  src_axis = 2;
+                  break;
+
+            }
+
+         } else {
+
+            switch (rotate) {
+               case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+               case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+               case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+               case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+               case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+               case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+               case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+               case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+                  src_axis = 0;
+                  break;
+
+               case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+               case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+               case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+               case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+               case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+               case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+               case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+               case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+
+                  src_axis = 1;
+                  break;
+
+               default:
+
+                  src_axis = 2;
+                  break;
+
+            }
+         }
+         for (pdat::FaceIterator fi(dst->getBox(), axis); fi; fi++) {
+            pdat::FaceIndex dst_index(fi());
+            hier::Index dst_xyz_index(dst_index);
+            if (axis == 1) {
+               dst_xyz_index(0) = dst_index(2);
+               dst_xyz_index(1) = dst_index(0);
+               dst_xyz_index(2) = dst_index(1);
+            } else if (axis == 2) {
+               dst_xyz_index(0) = dst_index(1);
+               dst_xyz_index(1) = dst_index(2);
+               dst_xyz_index(2) = dst_index(0);
+            }
+
+            hier::MultiblockPatchHierarchy::RotationIdentifier back_rotate =
+               hier::MultiblockPatchHierarchy::
+               getReverseRotationIdentifier(rotate, dim);
+
+            hier::Box src_box(dst_xyz_index, dst_xyz_index);
+
+            src_box.rotate(back_rotate);
+
+            hier::IntVector back_shift(dim);
+            hier::MultiblockPatchHierarchy::calculateReverseShift(
+               back_shift, shift, rotate);
+
+            src_box.shift(back_shift);
+
+            hier::Index src_xyz_index(dim);
+            for (int i = 0; i < dim.getValue(); i++) {
+               src_xyz_index(i) = src_box.lower() (i);
+            }
+
+            pdat::FaceIndex src_index(dim);
+            if (src_axis == 0) {
+               src_index(0) = src_xyz_index(0);
+               src_index(1) = src_xyz_index(1);
+               src_index(2) = src_xyz_index(2);
+            } else if (src_axis == 1) {
+               src_index(0) = src_xyz_index(1);
+               src_index(1) = src_xyz_index(2);
+               src_index(2) = src_xyz_index(0);
+            } else {
+               src_index(0) = src_xyz_index(2);
+               src_index(1) = src_xyz_index(0);
+               src_index(2) = src_xyz_index(1);
+            }
+
+            if (axis == 0) {
+               switch (rotate) {
+
+                  case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+                  case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+                  case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+                  case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+                  case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+                  case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+                  case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+                  case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+                  case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+                  case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+                  case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+                  case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+                     break;
+
+                  case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+                  case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+                  case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+                  case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+                  case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+                  case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+                  case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+                  case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+                  case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+                  case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+                  case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+                  case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+                     src_index(0)++;
+                     break;
+
+                  default:
+                     TBOX_ERROR(" ");
+                     break;
+               }
+            } else if (axis == 1) {
+               switch (rotate) {
+
+                  case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+                  case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+                  case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+                  case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+                  case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+                  case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+                  case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+                  case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+                  case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+                  case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+                  case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+                  case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+                     break;
+
+                  case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+                  case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+                  case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+                  case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+                  case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+                  case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+                  case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+                  case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+                  case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+                  case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+                  case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+                  case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+                     src_index(0)++;
+                     break;
+
+                  default:
+                     TBOX_ERROR(" ");
+                     break;
+               }
+            } else {
+               switch (rotate) {
+
+                  case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+                  case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+                  case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+                  case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+                  case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+                  case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+                  case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+                  case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+                  case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+                  case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+                  case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+                  case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+                     break;
+
+                  case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+                  case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+                  case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+                  case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+                  case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+                  case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+                  case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+                  case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+                  case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+                  case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+                  case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+                  case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+                     src_index(0)++;
+                     break;
+
+                  default:
+                     TBOX_ERROR(" ");
+                     break;
+               }
+            }
+
+            src_index.setAxis(src_axis);
+
+            for (int d = 0; d < dst->getDepth(); d++) {
+               (*dst)(dst_index, d) = (*src)(src_index, d);
+            }
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Translation and copy for array data                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void MultiblockFaceDataTranslator<TYPE>::translateAndCopyArrayData(
+   pdat::ArrayData<TYPE>& dst,
+   const pdat::ArrayData<TYPE>& src,
+   const hier::IntVector& shift,
+   const hier::MultiblockPatchHierarchy::RotationIdentifier rotate)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst, src, shift);
+
+   const tbox::Dimension& dim(dst.getDim());
+
+   bool no_rotate = true;
+   if (rotate != 0) {
+      no_rotate = false;
+   }
+
+   if (no_rotate) {
+      dst.copy(src, dst.getBox(), shift);
+   } else if (dim < tbox::Dimension(3)) {
+      hier::Box rotatebox(src.getBox());
+      int num_rotations = rotate;
+
+      rotatebox.rotate(num_rotations);
+
+      const hier::Box copybox = dst.getBox()
+         * hier::Box::shift(rotatebox, shift);
+
+      if (!copybox.empty()) {
+         TYPE * const dst_ptr = dst.getPointer();
+         const TYPE * const src_ptr = src.getPointer();
+
+         const int depth = (dst.getDepth() < src.getDepth() ?
+                            dst.getDepth() : src.getDepth());
+
+         const int box_w0 = copybox.numberCells(0);
+
+         const int dst_w0 = dst.getBox().numberCells(0);
+         int src_w0 = src.getBox().numberCells(0);
+         if (num_rotations == 3) {
+            src_w0 = -src_w0;
+         }
+         const int box_w1 = copybox.numberCells(1);
+
+         const int dst_offset = dst.getOffset();
+         const int src_offset = src.getOffset();
+
+         int dst_bd = dst.getBox().offset(copybox.lower());
+         hier::Index src_index(copybox.lower() - shift);
+
+         // rotate src_index 4-num_rotations;
+         for (int r = 0; r < 4 - num_rotations; r++) {
+            hier::Index tmp_index(src_index);
+            src_index(0) = tmp_index(1);
+            src_index(1) = -tmp_index(0) - 1;
+         }
+
+         int src_bd_orig = src.getBox().offset(src_index);
+
+         for (int d = 0; d < depth; d++) {
+            int src_bd = src_bd_orig;
+            int dst_b2 = dst_bd;
+            int src_b2 = src_bd;
+            int dst_b1 = dst_b2;
+            int src_b1 = src_b2;
+
+            for (int i1 = 0; i1 < box_w1; i1++) {
+
+               for (int i0 = 0; i0 < box_w0; i0++) {
+                  if (i0) {
+                     if (num_rotations % 2) {
+                        src_b1 += src_w0;
+                     } else {
+                        src_b1--;
+                     }
+                  }
+                  dst_ptr[dst_b1 + i0] = src_ptr[src_b1];
+               }
+
+               dst_b1 += dst_w0;
+               if (num_rotations == 1) {
+                  src_b1 = --src_bd;
+               } else if (num_rotations == 2) {
+                  src_b1 = src_bd - src_w0;
+                  src_bd = src_b1;
+               } else if (num_rotations == 3) {
+                  src_b1 = ++src_bd;
+               }
+            }
+
+            dst_bd += dst_offset;
+            src_bd_orig += src_offset;
+         }
+      }
+   } else {
+      TBOX_ERROR(
+         "MultiblockFaceDataTranslator<TYPE>::translateAndCopyData : dim = 1 or > 3 not implemented");
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/MultiblockFaceDataTranslator.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/MultiblockFaceDataTranslator.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_MultiblockFaceDataTranslator
+#define included_pdat_MultiblockFaceDataTranslator
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/hier/MultiblockDataTranslator.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * Class MultiblockFaceDataTranslator<DIM>
+ */
+
+template<class TYPE>
+class MultiblockFaceDataTranslator:
+   public hier::MultiblockDataTranslator
+{
+public:
+   /*!
+    * @brief Constructor
+    */
+   MultiblockFaceDataTranslator<TYPE>();
+
+   /*!
+    * @brief The virtual destructor does nothing interesting.
+    */
+   virtual ~MultiblockFaceDataTranslator<TYPE>();
+
+   virtual void
+   translateAndCopyData(
+      hier::Patch& dst_patch,
+      const int dst_id,
+      const hier::Patch& src_patch,
+      const int src_id,
+      const hier::IntVector& shift,
+      const hier::MultiblockPatchHierarchy::RotationIdentifier rotate);
+
+   virtual void translateAndFillData(
+      hier::Patch& dst_patch,
+      const int dst_id,
+      const hier::Patch& src_patch,
+      const int src_id,
+      const hier::IntVector& shift,
+      const hier::MultiblockPatchHierarchy::RotationIdentifier rotate)
+   {
+      (void)dst_patch;
+      (void)dst_id;
+      (void)src_patch;
+      (void)src_id;
+      (void)shift;
+      (void)rotate;
+   }
+
+private:
+   void
+   translateAndCopyArrayData(
+      ArrayData<TYPE>& dst,
+      const ArrayData<TYPE>& src,
+      const hier::IntVector& shift,
+      const hier::MultiblockPatchHierarchy::RotationIdentifier rotate);
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/MultiblockFaceDataTranslator.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/MultiblockNodeDataTranslator.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/MultiblockNodeDataTranslator.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,251 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations for copying patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_MultiblockNodeDataTranslator_C
+#define included_pdat_MultiblockNodeDataTranslator_C
+
+#include "SAMRAI/pdat/MultiblockNodeDataTranslator.h"
+
+#include "SAMRAI/pdat/NodeData.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor and destructor do nothing, as all member functions in     *
+ * this class are static.                                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+MultiblockNodeDataTranslator<TYPE>::MultiblockNodeDataTranslator()
+{
+}
+
+template<class TYPE>
+MultiblockNodeDataTranslator<TYPE>::~MultiblockNodeDataTranslator()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Translation and copy for node data                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void MultiblockNodeDataTranslator<TYPE>::translateAndCopyData(
+   hier::Patch& dst_patch,
+   const int dst_id,
+   const hier::Patch& src_patch,
+   const int src_id,
+   const hier::IntVector& shift,
+   const hier::MultiblockPatchHierarchy::RotationIdentifier rotate)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst_patch, src_patch, shift);
+
+   const tbox::Dimension& dim(dst_patch.getDim());
+
+   tbox::Pointer<NodeData<TYPE> > dst = dst_patch.getPatchData(dst_id);
+   tbox::Pointer<NodeData<TYPE> > src = src_patch.getPatchData(src_id);
+
+   TBOX_ASSERT(!(dst.isNull()));
+   TBOX_ASSERT(!(src.isNull()));
+
+   bool no_rotate;
+   if (rotate != 0) {
+      no_rotate = false;
+   } else {
+      no_rotate = true;
+   }
+
+   if (no_rotate) {
+      dst->getArrayData().copy(src->getArrayData(),
+         dst->getArrayData().getBox(), shift);
+   } else if (dim == tbox::Dimension(2)) {
+      hier::Box rotatebox(src->getArrayData().getBox());
+      int num_rotations = rotate;
+
+      rotatebox.rotate(num_rotations);
+
+      const hier::Box copybox = dst->getArrayData().getBox()
+         * (pdat::NodeGeometry::toNodeBox(
+               hier::Box::shift(rotatebox, shift)));
+
+      if (!copybox.empty()) {
+         TYPE * const dst_ptr = dst->getArrayData().getPointer();
+         const TYPE * const src_ptr = src->getArrayData().getPointer();
+
+         const int depth = (dst->getArrayData().getDepth() <
+                            src->getArrayData().getDepth() ?
+                            dst->getArrayData().getDepth() :
+                            src->getArrayData().getDepth());
+
+         const int box_w0 = copybox.numberCells(0);
+
+         const int dst_w0 = dst->getArrayData().getBox().numberCells(0);
+         int src_w0 = src->getArrayData().getBox().numberCells(0);
+         if (num_rotations == 3) {
+            src_w0 = -src_w0;
+         }
+         const int box_w1 = copybox.numberCells(1);
+
+         const int dst_offset = dst->getArrayData().getOffset();
+         const int src_offset = src->getArrayData().getOffset();
+
+         int dst_bd = dst->getArrayData().getBox().offset(copybox.lower());
+         hier::Index src_index(copybox.lower() - shift);
+
+         // rotate src_index 4-num_rotations;
+         for (int r = 0; r < 4 - num_rotations; r++) {
+            hier::Index tmp_index(src_index);
+            src_index(0) = tmp_index(1);
+            src_index(1) = -tmp_index(0);
+         }
+
+         int src_bd_orig = src->getArrayData().getBox().offset(src_index);
+
+         for (int d = 0; d < depth; d++) {
+            int src_bd = src_bd_orig;
+            int dst_b2 = dst_bd;
+            int src_b2 = src_bd;
+            int dst_b1 = dst_b2;
+            int src_b1 = src_b2;
+
+            for (int i1 = 0; i1 < box_w1; i1++) {
+
+               for (int i0 = 0; i0 < box_w0; i0++) {
+                  if (i0) {
+                     if (num_rotations % 2) {
+                        src_b1 += src_w0;
+                     } else {
+                        src_b1--;
+                     }
+                  }
+                  dst_ptr[dst_b1 + i0] = src_ptr[src_b1];
+               }
+               dst_b1 += dst_w0;
+               if (num_rotations == 1) {
+                  src_b1 = --src_bd;
+               } else if (num_rotations == 2) {
+                  src_b1 = src_bd - src_w0;
+                  src_bd = src_b1;
+               } else if (num_rotations == 3) {
+                  src_b1 = ++src_bd;
+               }
+            }
+
+            dst_bd += dst_offset;
+            src_bd_orig += src_offset;
+         }
+      }
+   } else if (dim == tbox::Dimension(3)) {
+      for (pdat::NodeIterator ni(dst->getBox()); ni; ni++) {
+         pdat::NodeIndex dst_index(ni());
+
+         hier::MultiblockPatchHierarchy::RotationIdentifier back_rotate =
+            hier::MultiblockPatchHierarchy::getReverseRotationIdentifier(rotate, dim);
+
+         hier::Box src_box(dst_index, dst_index);
+
+         src_box.rotate(back_rotate);
+
+         hier::IntVector back_shift(dim);
+         hier::MultiblockPatchHierarchy::calculateReverseShift(
+            back_shift, shift, rotate);
+
+         src_box.shift(back_shift);
+
+         pdat::NodeIndex src_index(dim);
+         for (int n = 0; n < dim.getValue(); n++) {
+            src_index(n) = src_box.lower() (n);
+         }
+
+         switch (rotate) {
+
+            case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+            case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+            case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+               break;
+
+            case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+            case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+            case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+               src_index(0)++;
+               break;
+
+            case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+            case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+            case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+               src_index(2)++;
+               break;
+
+            case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+            case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+            case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+               src_index(0)++;
+               src_index(2)++;
+               break;
+
+            case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+            case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+            case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+               src_index(1)++;
+               break;
+
+            case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+            case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+            case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+               src_index(0)++;
+               src_index(1)++;
+               break;
+
+            case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+            case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+            case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+               src_index(1)++;
+               src_index(2)++;
+               break;
+
+            case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+            case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+            case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+               src_index(0)++;
+               src_index(1)++;
+               src_index(2)++;
+               break;
+
+            default:
+               TBOX_ERROR(" ");
+               break;
+         }
+
+         //back rotate src_index into src index space
+         //back shift src_index to needed location
+         //copy data from src_index to dst_index
+
+         for (int d = 0; d < dst->getDepth(); d++) {
+            (*dst)(dst_index, d) = (*src)(src_index, d);
+         }
+      }
+   } else {
+      TBOX_ERROR(
+         "MultiblockNodeDataTranslator<TYPE>::translateAndCopyData : dim = 1 or > 3 not implemented");
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/MultiblockNodeDataTranslator.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/MultiblockNodeDataTranslator.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,75 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_MultiblockNodeDataTranslator
+#define included_pdat_MultiblockNodeDataTranslator
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/MultiblockDataTranslator.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * Class MultiblockNodeDataTranslator<DIM>
+ */
+
+template<class TYPE>
+class MultiblockNodeDataTranslator:
+   public hier::MultiblockDataTranslator
+{
+public:
+   /*!
+    * @brief Constructor
+    */
+   MultiblockNodeDataTranslator<TYPE>();
+
+   /*!
+    * @brief The virtual destructor does nothing interesting.
+    */
+   virtual ~MultiblockNodeDataTranslator<TYPE>();
+
+   virtual void
+   translateAndCopyData(
+      hier::Patch& dst_patch,
+      const int dst_id,
+      const hier::Patch& src_patch,
+      const int src_id,
+      const hier::IntVector& shift,
+      const hier::MultiblockPatchHierarchy::RotationIdentifier rotate);
+
+   virtual void translateAndFillData(
+      hier::Patch& dst_patch,
+      const int dst_id,
+      const hier::Patch& src_patch,
+      const int src_id,
+      const hier::IntVector& shift,
+      const hier::MultiblockPatchHierarchy::RotationIdentifier rotate)
+   {
+      (void)dst_patch;
+      (void)dst_id;
+      (void)src_patch;
+      (void)src_id;
+      (void)shift;
+      (void)rotate;
+   }
+
+private:
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/MultiblockNodeDataTranslator.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/MultiblockSideDataTranslator.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/MultiblockSideDataTranslator.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,496 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated operations for copying patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_MultiblockSideDataTranslator_C
+#define included_pdat_MultiblockSideDataTranslator_C
+
+#include "SAMRAI/pdat/MultiblockSideDataTranslator.h"
+
+#include "SAMRAI/pdat/SideData.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor and destructor do nothing, as all member functions in     *
+ * this class are static.                                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+MultiblockSideDataTranslator<TYPE>::MultiblockSideDataTranslator()
+{
+}
+
+template<class TYPE>
+MultiblockSideDataTranslator<TYPE>::~MultiblockSideDataTranslator()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Translation and copy for side data                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void MultiblockSideDataTranslator<TYPE>::translateAndCopyData(
+   hier::Patch& dst_patch,
+   const int dst_id,
+   const hier::Patch& src_patch,
+   const int src_id,
+   const hier::IntVector& shift,
+   const hier::MultiblockPatchHierarchy::RotationIdentifier rotate)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst_patch, src_patch, shift);
+
+   const tbox::Dimension& dim(shift.getDim());
+
+   tbox::Pointer<SideData<TYPE> > dst = dst_patch.getPatchData(dst_id);
+   tbox::Pointer<SideData<TYPE> > src = src_patch.getPatchData(src_id);
+
+   TBOX_ASSERT(!(dst.isNull()));
+   TBOX_ASSERT(!(src.isNull()));
+   TBOX_ASSERT(dst->getDirectionVector() == src->getDirectionVector());
+
+   hier::IntVector dir_vector(dst->getDirectionVector());
+   if (rotate == 0) {
+      for (int axis = 0; axis < dim.getValue(); axis++) {
+         if (dir_vector(axis)) {
+            translateAndCopyArrayData(dst->getArrayData(axis),
+               src->getArrayData(axis),
+               shift,
+               rotate);
+         }
+      }
+   } else if (dim == tbox::Dimension(2)) {
+      for (int axis = 0; axis < dim.getValue(); axis++) {
+         if (dir_vector(axis)) {
+            for (pdat::SideIterator fi(dst->getBox(), axis); fi; fi++) {
+               pdat::SideIndex dst_index(fi());
+               hier::Index dst_xyz_index(dst_index);
+
+               hier::Index src_xyz_index(dst_xyz_index);
+
+               int num_rotations = (4 - rotate) % 4;
+               hier::IntVector copy_shift(shift);
+
+               int src_axis;
+               if (num_rotations % 2) {
+                  src_axis = (axis + 1) % dim.getValue();
+               } else {
+                  src_axis = axis;
+               }
+
+               for (int r = 0; r < num_rotations; r++) {
+                  hier::Index tmp_index(src_xyz_index);
+                  src_xyz_index(0) = tmp_index(1);
+                  src_xyz_index(1) = -tmp_index(0) - 1;
+                  hier::IntVector tmp_shift(copy_shift);
+                  copy_shift(0) = tmp_shift(1);
+                  copy_shift(1) = -tmp_shift(0);
+               }
+
+               for (int i = 0; i < dim.getValue(); i++) {
+                  src_xyz_index(i) -= copy_shift(i);
+               }
+
+               pdat::SideIndex src_index(dim);
+               if (src_axis == 1) {
+                  src_index(0) = src_xyz_index(0);
+                  src_index(1) = src_xyz_index(1);
+                  if (num_rotations == 1 || num_rotations == 2) {
+                     src_index(1)++;
+                  }
+               } else {
+                  src_index(0) = src_xyz_index(0);
+                  if ((num_rotations == 3) || (num_rotations == 2)) {
+                     src_index(0)++;
+                  }
+                  src_index(1) = src_xyz_index(1);
+               }
+               src_index.setAxis(src_axis);
+
+               for (int d = 0; d < dst->getDepth(); d++) {
+                  (*dst)(dst_index, d) = (*src)(src_index, d);
+               }
+            }
+         }
+      }
+   } else if (dim == tbox::Dimension(3)) {
+      for (int axis = 0; axis < dim.getValue(); axis++) {
+         if (dir_vector(axis)) {
+            int src_axis;
+            if (axis == 0) {
+               switch (rotate) {
+
+                  case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+                  case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+                  case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+                  case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+                  case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+                  case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+                  case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+                  case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+
+                     src_axis = 0;
+                     break;
+
+                  case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+                  case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+                  case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+                  case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+                  case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+                  case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+                  case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+                  case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+
+                     src_axis = 1;
+                     break;
+
+                  default:
+
+                     src_axis = 2;
+                     break;
+
+               }
+            } else if (axis == 1) {
+
+               switch (rotate) {
+                  case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+                  case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+                  case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+                  case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+                  case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+                  case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+                  case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+                  case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+
+                     src_axis = 0;
+                     break;
+
+                  case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+                  case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+                  case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+                  case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+                  case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+                  case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+                  case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+                  case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+
+                     src_axis = 1;
+                     break;
+
+                  default:
+
+                     src_axis = 2;
+                     break;
+
+               }
+
+            } else {
+
+               switch (rotate) {
+                  case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+                  case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+                  case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+                  case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+                  case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+                  case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+                  case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+                  case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+                     src_axis = 0;
+                     break;
+
+                  case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+                  case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+                  case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+                  case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+                  case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+                  case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+                  case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+                  case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+
+                     src_axis = 1;
+                     break;
+
+                  default:
+
+                     src_axis = 2;
+                     break;
+
+               }
+            }
+
+            for (pdat::SideIterator si(dst->getBox(), axis); si; si++) {
+               pdat::SideIndex dst_index(si());
+               hier::Index dst_xyz_index(dst_index);
+
+               hier::MultiblockPatchHierarchy::RotationIdentifier back_rotate =
+                  hier::MultiblockPatchHierarchy::
+                  getReverseRotationIdentifier(rotate, dim);
+
+               hier::Box src_box(dst_xyz_index, dst_xyz_index);
+
+               src_box.rotate(back_rotate);
+
+               hier::IntVector back_shift(dim);
+               hier::MultiblockPatchHierarchy::calculateReverseShift(
+                  back_shift, shift, rotate);
+
+               src_box.shift(back_shift);
+
+               hier::Index src_xyz_index(dim);
+               for (int i = 0; i < dim.getValue(); i++) {
+                  src_xyz_index(i) = src_box.lower() (i);
+               }
+
+               pdat::SideIndex src_index(dim);
+               src_index(0) = src_xyz_index(0);
+               src_index(1) = src_xyz_index(1);
+               src_index(2) = src_xyz_index(2);
+
+               if (axis == 0) {
+                  switch (rotate) {
+
+                     case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+                     case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+                     case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+                     case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+                     case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+                     case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+                     case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+                     case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+                     case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+                     case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+                     case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+                     case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+                        break;
+
+                     case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+                     case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+                     case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+                     case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+                     case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+                     case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+                     case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+                     case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+                     case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+                     case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+                     case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+                     case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+                        src_index(src_axis)++;
+                        break;
+
+                     default:
+                        TBOX_ERROR(" ");
+                        break;
+                  }
+               } else if (axis == 1) {
+                  switch (rotate) {
+
+                     case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+                     case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+                     case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+                     case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+                     case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+                     case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+                     case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+                     case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+                     case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+                     case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+                     case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+                     case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+                        break;
+
+                     case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+                     case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+                     case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+                     case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+                     case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+                     case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+                     case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+                     case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+                     case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+                     case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+                     case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+                     case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+                        src_index(src_axis)++;
+                        break;
+
+                     default:
+                        TBOX_ERROR(" ");
+                        break;
+                  }
+               } else {
+                  switch (rotate) {
+
+                     case hier::MultiblockPatchHierarchy::IUP_JUP_KUP:
+                     case hier::MultiblockPatchHierarchy::KUP_IUP_JUP:
+                     case hier::MultiblockPatchHierarchy::JUP_KUP_IUP:
+                     case hier::MultiblockPatchHierarchy::IDOWN_KUP_JUP:
+                     case hier::MultiblockPatchHierarchy::JUP_IDOWN_KUP:
+                     case hier::MultiblockPatchHierarchy::KDOWN_JUP_IUP:
+                     case hier::MultiblockPatchHierarchy::IUP_KDOWN_JUP:
+                     case hier::MultiblockPatchHierarchy::KDOWN_IDOWN_JUP:
+                     case hier::MultiblockPatchHierarchy::JDOWN_IUP_KUP:
+                     case hier::MultiblockPatchHierarchy::KUP_JDOWN_IUP:
+                     case hier::MultiblockPatchHierarchy::IDOWN_JDOWN_KUP:
+                     case hier::MultiblockPatchHierarchy::JDOWN_KDOWN_IUP:
+                        break;
+
+                     case hier::MultiblockPatchHierarchy::KUP_JUP_IDOWN:
+                     case hier::MultiblockPatchHierarchy::JUP_IUP_KDOWN:
+                     case hier::MultiblockPatchHierarchy::IDOWN_JUP_KDOWN:
+                     case hier::MultiblockPatchHierarchy::JUP_KDOWN_IDOWN:
+                     case hier::MultiblockPatchHierarchy::IUP_KUP_JDOWN:
+                     case hier::MultiblockPatchHierarchy::JDOWN_KUP_IDOWN:
+                     case hier::MultiblockPatchHierarchy::KUP_IDOWN_JDOWN:
+                     case hier::MultiblockPatchHierarchy::KDOWN_IUP_JDOWN:
+                     case hier::MultiblockPatchHierarchy::IUP_JDOWN_KDOWN:
+                     case hier::MultiblockPatchHierarchy::JDOWN_IDOWN_KDOWN:
+                     case hier::MultiblockPatchHierarchy::KDOWN_JDOWN_IDOWN:
+                     case hier::MultiblockPatchHierarchy::IDOWN_KDOWN_JDOWN:
+                        src_index(src_axis)++;
+                        break;
+
+                     default:
+                        TBOX_ERROR(" ");
+                        break;
+                  }
+               }
+
+               src_index.setAxis(src_axis);
+
+               for (int d = 0; d < dst->getDepth(); d++) {
+                  (*dst)(dst_index, d) = (*src)(src_index, d);
+               }
+            }
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Translation and copy for array data                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void MultiblockSideDataTranslator<TYPE>::translateAndCopyArrayData(
+   pdat::ArrayData<TYPE>& dst,
+   const pdat::ArrayData<TYPE>& src,
+   const hier::IntVector& shift,
+   const hier::MultiblockPatchHierarchy::RotationIdentifier rotate)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst, src, shift);
+
+   const tbox::Dimension& dim(dst.getDim());
+
+   bool no_rotate = true;
+   if (rotate != 0) {
+      no_rotate = false;
+   }
+
+   if (no_rotate) {
+      dst.copy(src, dst.getBox(), shift);
+   } else if (dim < tbox::Dimension(3)) {
+      hier::Box rotatebox(src.getBox());
+      int num_rotations = rotate;
+
+      rotatebox.rotate(num_rotations);
+
+      const hier::Box copybox = dst.getBox()
+         * hier::Box::shift(rotatebox, shift);
+
+      if (!copybox.empty()) {
+         TYPE * const dst_ptr = dst.getPointer();
+         const TYPE * const src_ptr = src.getPointer();
+
+         const int depth = (dst.getDepth() < src.getDepth() ?
+                            dst.getDepth() : src.getDepth());
+
+         const int box_w0 = copybox.numberCells(0);
+
+         const int dst_w0 = dst.getBox().numberCells(0);
+         int src_w0 = src.getBox().numberCells(0);
+         if (num_rotations == 3) {
+            src_w0 = -src_w0;
+         }
+         const int box_w1 = copybox.numberCells(1);
+
+         const int dst_offset = dst.getOffset();
+         const int src_offset = src.getOffset();
+
+         int dst_bd = dst.getBox().offset(copybox.lower());
+         hier::Index src_index(copybox.lower() - shift);
+
+         // rotate src_index 4-num_rotations;
+         for (int r = 0; r < 4 - num_rotations; r++) {
+            hier::Index tmp_index(src_index);
+            src_index(0) = tmp_index(1);
+            src_index(1) = -tmp_index(0) - 1;
+         }
+
+         int src_bd_orig = src.getBox().offset(src_index);
+
+         for (int d = 0; d < depth; d++) {
+            int src_bd = src_bd_orig;
+            int dst_b2 = dst_bd;
+            int src_b2 = src_bd;
+            int dst_b1 = dst_b2;
+            int src_b1 = src_b2;
+
+            for (int i1 = 0; i1 < box_w1; i1++) {
+
+               for (int i0 = 0; i0 < box_w0; i0++) {
+                  if (i0) {
+                     if (num_rotations % 2) {
+                        src_b1 += src_w0;
+                     } else {
+                        src_b1--;
+                     }
+                  }
+                  dst_ptr[dst_b1 + i0] = src_ptr[src_b1];
+               }
+
+               dst_b1 += dst_w0;
+               if (num_rotations == 1) {
+                  src_b1 = --src_bd;
+               } else if (num_rotations == 2) {
+                  src_b1 = src_bd - src_w0;
+                  src_bd = src_b1;
+               } else if (num_rotations == 3) {
+                  src_b1 = ++src_bd;
+               }
+            }
+
+            dst_bd += dst_offset;
+            src_bd_orig += src_offset;
+         }
+      }
+   } else {
+      TBOX_ERROR(
+         "MultiblockSideDataTranslator<TYPE>::translateAndCopyArrayData : dim = 1 or > 3 not implemented");
+
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/MultiblockSideDataTranslator.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/MultiblockSideDataTranslator.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_MultiblockSideDataTranslator
+#define included_pdat_MultiblockSideDataTranslator
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/hier/MultiblockDataTranslator.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * Class MultiblockSideDataTranslator<DIM>
+ */
+
+template<class TYPE>
+class MultiblockSideDataTranslator:
+   public hier::MultiblockDataTranslator
+{
+public:
+   /*!
+    * @brief Constructor
+    */
+   MultiblockSideDataTranslator<TYPE>();
+
+   /*!
+    * @brief The virtual destructor does nothing interesting.
+    */
+   virtual ~MultiblockSideDataTranslator<TYPE>();
+
+   virtual void
+   translateAndCopyData(
+      hier::Patch& dst_patch,
+      const int dst_id,
+      const hier::Patch& src_patch,
+      const int src_id,
+      const hier::IntVector& shift,
+      const hier::MultiblockPatchHierarchy::RotationIdentifier rotate);
+
+   virtual void translateAndFillData(
+      hier::Patch& dst_patch,
+      const int dst_id,
+      const hier::Patch& src_patch,
+      const int src_id,
+      const hier::IntVector& shift,
+      const hier::MultiblockPatchHierarchy::RotationIdentifier rotate)
+   {
+      (void)dst_patch;
+      (void)dst_id;
+      (void)src_patch;
+      (void)src_id;
+      (void)shift;
+      (void)rotate;
+   }
+
+private:
+   void
+   translateAndCopyArrayData(
+      ArrayData<TYPE>& dst,
+      const ArrayData<TYPE>& src,
+      const hier::IntVector& shift,
+      const hier::MultiblockPatchHierarchy::RotationIdentifier rotate);
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/MultiblockSideDataTranslator.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeComplexInjection.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeComplexInjection.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,171 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant averaging operator for node-centered complex data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeComplexInjection_C
+#define included_pdat_NodeComplexInjection_C
+
+#include "SAMRAI/pdat/NodeComplexInjection.h"
+#include "SAMRAI/tbox/Complex.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in concoarsen1d.f:
+void F77_FUNC(conavgnodecplx1d, CONAVGNODECPLX1D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+// in concoarsen2d.f:
+void F77_FUNC(conavgnodecplx2d, CONAVGNODECPLX2D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+// in concoarsen3d.f:
+void F77_FUNC(conavgnodecplx3d, CONAVGNODECPLX3D) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+NodeComplexInjection::NodeComplexInjection(
+   const tbox::Dimension& dim):
+   xfer::CoarsenOperator(dim, "CONSTANT_COARSEN"),
+   d_name_id("CONSTANT_COARSEN")
+{
+}
+
+NodeComplexInjection::~NodeComplexInjection()
+{
+}
+
+bool NodeComplexInjection::findCoarsenOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<NodeVariable<dcomplex> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+NodeComplexInjection::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int NodeComplexInjection::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+NodeComplexInjection::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void NodeComplexInjection::coarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS5(*this, coarse, fine, coarse_box, ratio);
+
+   tbox::Pointer<NodeData<dcomplex> >
+   fdata = fine.getPatchData(src_component);
+   tbox::Pointer<NodeData<dcomplex> >
+   cdata = coarse.getPatchData(dst_component);
+
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+   const hier::Index cilo = cdata->getGhostBox().lower();
+   const hier::Index cihi = cdata->getGhostBox().upper();
+
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+
+   for (int d = 0; d < cdata->getDepth(); d++) {
+      if (getDim() == tbox::Dimension(1)) {
+         F77_FUNC(conavgnodecplx1d, CONAVGNODECPLX1D) (ifirstc(0), ilastc(0),
+            filo(0), fihi(0),
+            cilo(0), cihi(0),
+            &ratio[0],
+            fdata->getPointer(d),
+            cdata->getPointer(d));
+      } else if (getDim() == tbox::Dimension(2)) {
+         F77_FUNC(conavgnodecplx2d, CONAVGNODECPLX2D) (ifirstc(0), ifirstc(1),
+            ilastc(0), ilastc(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            &ratio[0],
+            fdata->getPointer(d),
+            cdata->getPointer(d));
+      } else if (getDim() == tbox::Dimension(3)) {
+         F77_FUNC(conavgnodecplx3d, CONAVGNODECPLX3D) (ifirstc(0), ifirstc(1),
+            ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            &ratio[0],
+            fdata->getPointer(d),
+            cdata->getPointer(d));
+      } else {
+         TBOX_ERROR(
+            "NodeComplexInjection::coarsen dimension > 3 not supported"
+            << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeComplexInjection.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeComplexInjection.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,109 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant averaging operator for node-centered complex data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeComplexInjection
+#define included_pdat_NodeComplexInjection
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class NodeComplexInjection implements constant
+ * averaging (i.e., injection) for node-centered complex patch data defined
+ * over a  mesh.  It is derived from the xfer::CoarsenOperator base
+ * class.  The numerical operations for theaveraging use FORTRAN numerical
+ * routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is node-centered complex, and the string is "CONSTANT_COARSEN".
+ *
+ * @see xfer::CoarsenOperator
+ */
+
+class NodeComplexInjection:
+   public xfer::CoarsenOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit NodeComplexInjection(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~NodeComplexInjection();
+
+   /**
+    * Return true if the variable and name string match the node-centered
+    * constant averaging; otherwise, return false.
+    */
+   bool
+   findCoarsenOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name string identifier of this coarsening operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of node-centered constant averaging is 0.
+    * It will be performed before any user-defined coarsen operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the constant averaging operator is the vector of
+    * zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Coarsen the source component on the fine patch to the destination
+    * component on the coarse patch using the node-centered complex constant
+    * averaging operator.  Coarsening is performed on the intersection of
+    * the destination patch and the coarse box.  It is assumed that the
+    * fine patch contains sufficient data for the stencil width of the
+    * coarsening operator.
+    */
+   void
+   coarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeComplexLinearTimeInterpolateOp.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeComplexLinearTimeInterpolateOp.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,195 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for node-centered complex data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeComplexLinearTimeInterpolateOp_C
+#define included_pdat_NodeComplexLinearTimeInterpolateOp_C
+
+#include "SAMRAI/pdat/NodeComplexLinearTimeInterpolateOp.h"
+#include "SAMRAI/tbox/Complex.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN 77 routines.                        *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in lintimint1d.f:
+void F77_FUNC(lintimeintnodecmplx1d, LINTIMEINTNODECMPLX1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+// in lintimint2d.f:
+void F77_FUNC(lintimeintnodecmplx2d, LINTIMEINTNODECMPLX2D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+// in lintimint3d.f:
+void F77_FUNC(lintimeintnodecmplx3d, LINTIMEINTNODECMPLX3D) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+NodeComplexLinearTimeInterpolateOp::NodeComplexLinearTimeInterpolateOp():
+   xfer::TimeInterpolateOperator()
+{
+}
+
+NodeComplexLinearTimeInterpolateOp::~NodeComplexLinearTimeInterpolateOp()
+{
+}
+
+bool NodeComplexLinearTimeInterpolateOp::findTimeInterpolateOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   const tbox::Pointer<NodeVariable<dcomplex> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == "STD_LINEAR_TIME_INTERPOLATE")) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+void NodeComplexLinearTimeInterpolateOp::timeInterpolate(
+   hier::PatchData& dst_data,
+   const hier::Box& where,
+   const hier::PatchData& src_data_old,
+   const hier::PatchData& src_data_new) const
+{
+   const tbox::Dimension& dim(where.getDim());
+
+   const NodeData<dcomplex>* old_dat =
+      dynamic_cast<const NodeData<dcomplex> *>(&src_data_old);
+   const NodeData<dcomplex>* new_dat =
+      dynamic_cast<const NodeData<dcomplex> *>(&src_data_new);
+   NodeData<dcomplex>* dst_dat =
+      dynamic_cast<NodeData<dcomplex> *>(&dst_data);
+
+   TBOX_ASSERT(old_dat != NULL);
+   TBOX_ASSERT(new_dat != NULL);
+   TBOX_ASSERT(dst_dat != NULL);
+   TBOX_ASSERT(where * old_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * new_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * dst_dat->getGhostBox() == where);
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst_data, where, src_data_old, src_data_new);
+
+   const hier::Index old_ilo = old_dat->getGhostBox().lower();
+   const hier::Index old_ihi = old_dat->getGhostBox().upper();
+   const hier::Index new_ilo = new_dat->getGhostBox().lower();
+   const hier::Index new_ihi = new_dat->getGhostBox().upper();
+
+   const hier::Index dst_ilo = dst_dat->getGhostBox().lower();
+   const hier::Index dst_ihi = dst_dat->getGhostBox().upper();
+
+   const hier::Index ifirst = where.lower();
+   const hier::Index ilast = where.upper();
+
+   const double old_time = old_dat->getTime();
+   const double new_time = new_dat->getTime();
+   const double dst_time = dst_dat->getTime();
+
+   TBOX_ASSERT((old_time < dst_time ||
+                tbox::MathUtilities<double>::equalEps(old_time, dst_time)) &&
+      (dst_time < new_time ||
+       tbox::MathUtilities<double>::equalEps(dst_time, new_time)));
+
+   double tfrac = dst_time - old_time;
+   double denom = new_time - old_time;
+   if (denom > tbox::MathUtilities<double>::getMin()) {
+      tfrac /= denom;
+   } else {
+      tfrac = 0.0;
+   }
+
+   for (int d = 0; d < dst_dat->getDepth(); d++) {
+      if (dim == tbox::Dimension(1)) {
+         F77_FUNC(lintimeintnodecmplx1d, LINTIMEINTNODECMPLX1D) (ifirst(0),
+            ilast(0),
+            old_ilo(0), old_ihi(0),
+            new_ilo(0), new_ihi(0),
+            dst_ilo(0), dst_ihi(0),
+            tfrac,
+            old_dat->getPointer(d),
+            new_dat->getPointer(d),
+            dst_dat->getPointer(d));
+      } else if (dim == tbox::Dimension(2)) {
+         F77_FUNC(lintimeintnodecmplx2d, LINTIMEINTNODECMPLX2D) (ifirst(0),
+            ifirst(1), ilast(0), ilast(1),
+            old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+            new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+            dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+            tfrac,
+            old_dat->getPointer(d),
+            new_dat->getPointer(d),
+            dst_dat->getPointer(d));
+      } else if (dim == tbox::Dimension(3)) {
+         F77_FUNC(lintimeintnodecmplx3d, LINTIMEINTNODECMPLX3D) (ifirst(0),
+            ifirst(1), ifirst(2),
+            ilast(0), ilast(1), ilast(2),
+            old_ilo(0), old_ilo(1), old_ilo(2),
+            old_ihi(0), old_ihi(1), old_ihi(2),
+            new_ilo(0), new_ilo(1), new_ilo(2),
+            new_ihi(0), new_ihi(1), new_ihi(2),
+            dst_ilo(0), dst_ilo(1), dst_ilo(2),
+            dst_ihi(0), dst_ihi(1), dst_ihi(2),
+            tfrac,
+            old_dat->getPointer(d),
+            new_dat->getPointer(d),
+            dst_dat->getPointer(d));
+      } else {
+         TBOX_ERROR(
+            "NodeComplexLinearTimeInterpolateOp::TimeInterpolate dim > 3 not supported"
+            << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeComplexLinearTimeInterpolateOp.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeComplexLinearTimeInterpolateOp.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for node-centered complex data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeComplexLinearTimeInterpolateOp
+#define included_pdat_NodeComplexLinearTimeInterpolateOp
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class NodeComplexLinearTimeInterpolateOp implements standard
+ * linear time interpolation for node-centered complex patch data.
+ * It is derived from the xfer::TimeInterpolateOperator base class.
+ * The interpolation uses FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is a node-centered complex, and the string is
+ * "STD_LINEAR_TIME_INTERPOLATE".
+ *
+ * @see xfer::TimeInterpolateOperator
+ */
+
+class NodeComplexLinearTimeInterpolateOp:
+   public xfer::TimeInterpolateOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   NodeComplexLinearTimeInterpolateOp();
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~NodeComplexLinearTimeInterpolateOp();
+
+   /**
+    * Return true if the variable and name string match the standard
+    * node-centered complex interpolation; otherwise, return false.
+    */
+   bool
+   findTimeInterpolateOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Perform linear time interpolation between two node-centered complex
+    * patch data sources and place result in the destination patch data.
+    * Time interpolation is performed on the intersection of the destination
+    * patch data and the input box.  The time to which data is interpolated
+    * is provided by the destination data.
+    */
+   void
+   timeInterpolate(
+      hier::PatchData& dst_data,
+      const hier::Box& where,
+      const hier::PatchData& src_data_old,
+      const hier::PatchData& src_data_new) const;
+
+private:
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeData.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeData.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,388 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated node centered patch data type 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeData_C
+#define included_pdat_NodeData_C
+
+#include "SAMRAI/pdat/NodeData.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/pdat/NodeOverlap.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#define PDAT_NODEDATA_VERSION 1
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/NodeData.I"
+#endif
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * Constructor and destructor for node data objects.  The constructor	*
+ * simply initializes data variables and sets up the array data.		*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+NodeData<TYPE>::NodeData(
+   const hier::Box& box,
+   int depth,
+   const hier::IntVector& ghosts):
+   hier::PatchData(box, ghosts),
+   d_depth(depth)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(box, ghosts);
+   TBOX_ASSERT(depth > 0);
+   TBOX_ASSERT(ghosts.min() >= 0);
+
+   const hier::Box node = NodeGeometry::toNodeBox(this->getGhostBox());
+   d_data.initializeArray(node, depth);
+
+}
+
+template<class TYPE>
+NodeData<TYPE>::~NodeData()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * The following are private and cannot be used, but they are defined	*
+ * here for compilers that require that every template declaration have	*
+ * a definition (a stupid requirement, if you ask me).			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+NodeData<TYPE>::NodeData(
+   const NodeData<TYPE>& foo):
+   hier::PatchData(foo.getBox(), foo.getGhostCellWidth())
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void NodeData<TYPE>::operator = (
+   const NodeData<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Perform a fast copy between two node centered arrays where their	*
+ * index spaces overlap.							*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void NodeData<TYPE>::copy(
+   const hier::PatchData& src)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   const NodeData<TYPE>* t_src =
+      dynamic_cast<const NodeData<TYPE> *>(&src);
+   if (t_src == NULL) {
+      src.copy2(*this);
+   } else {
+      const hier::Box box = d_data.getBox() * t_src->d_data.getBox();
+      if (!box.empty()) {
+         d_data.copy(t_src->d_data, box);
+      }
+   }
+}
+
+template<class TYPE>
+void NodeData<TYPE>::copy2(
+   hier::PatchData& dst) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   NodeData<TYPE>* t_dst =
+      dynamic_cast<NodeData<TYPE> *>(&dst);
+
+   TBOX_ASSERT(t_dst != NULL);
+
+   const hier::Box box = d_data.getBox() * t_dst->d_data.getBox();
+   if (!box.empty()) {
+      t_dst->d_data.copy(d_data, box);
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Copy data from the source into the destination according to the	*
+ * overlap descriptor.							*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void NodeData<TYPE>::copy(
+   const hier::PatchData& src,
+   const hier::BoxOverlap& overlap)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   const NodeData<TYPE>* t_src =
+      dynamic_cast<const NodeData<TYPE> *>(&src);
+   const NodeOverlap* t_overlap =
+      dynamic_cast<const NodeOverlap *>(&overlap);
+
+   if ((t_src == NULL) || (t_overlap == NULL)) {
+      src.copy2(*this, overlap);
+   } else {
+      d_data.copy(t_src->d_data,
+         t_overlap->getDestinationBoxList(),
+         t_overlap->getSourceOffset());
+   }
+}
+
+template<class TYPE>
+void NodeData<TYPE>::copy2(
+   hier::PatchData& dst,
+   const hier::BoxOverlap& overlap) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   NodeData<TYPE>* t_dst =
+      dynamic_cast<NodeData<TYPE> *>(&dst);
+   const NodeOverlap* t_overlap =
+      dynamic_cast<const NodeOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_dst != NULL);
+   TBOX_ASSERT(t_overlap != NULL);
+
+   t_dst->d_data.copy(d_data,
+      t_overlap->getDestinationBoxList(),
+      t_overlap->getSourceOffset());
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Perform a fast copy from a node data object to this node data         *
+ * object at the specified depths, where their index spaces overlap.     *
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void NodeData<TYPE>::copyDepth(
+   int dst_depth,
+   const NodeData<TYPE>& src,
+   int src_depth)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   const hier::Box box = d_data.getBox() * src.d_data.getBox();
+   if (!box.empty()) {
+      d_data.copyDepth(dst_depth, src.d_data, src_depth, box);
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Calculate the buffer space needed to pack/unpack messages on the box	*
+ * region using the overlap descriptor.					*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+bool NodeData<TYPE>::canEstimateStreamSizeFromBox() const
+{
+   return ArrayData<TYPE>::canEstimateStreamSizeFromBox();
+}
+
+template<class TYPE>
+int NodeData<TYPE>::getDataStreamSize(
+   const hier::BoxOverlap& overlap) const
+{
+   const NodeOverlap* t_overlap =
+      dynamic_cast<const NodeOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   return d_data.getDataStreamSize(t_overlap->getDestinationBoxList(),
+      t_overlap->getSourceOffset());
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Pack/unpack data into/out of the message streams using the index	*
+ * space in the overlap descriptor.					*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void NodeData<TYPE>::packStream(
+   tbox::MessageStream& stream,
+   const hier::BoxOverlap& overlap) const
+{
+   const NodeOverlap* t_overlap =
+      dynamic_cast<const NodeOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   d_data.packStream(stream,
+      t_overlap->getDestinationBoxList(),
+      t_overlap->getSourceOffset());
+}
+
+template<class TYPE>
+void NodeData<TYPE>::unpackStream(
+   tbox::MessageStream& stream,
+   const hier::BoxOverlap& overlap)
+{
+   const NodeOverlap* t_overlap =
+      dynamic_cast<const NodeOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   d_data.unpackStream(stream,
+      t_overlap->getDestinationBoxList(),
+      t_overlap->getSourceOffset());
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Calculate the amount of memory space needed to represent the data	*
+ * for a node centered grid.						*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+size_t NodeData<TYPE>::getSizeOfData(
+   const hier::Box& box,
+   int depth,
+   const hier::IntVector& ghosts)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(box, ghosts);
+   TBOX_ASSERT(depth > 0);
+
+   const hier::Box ghost_box = hier::Box::grow(box, ghosts);
+   const hier::Box node_box = NodeGeometry::toNodeBox(ghost_box);
+   return ArrayData<TYPE>::getSizeOfData(node_box, depth);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print node-centered data.                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void NodeData<TYPE>::print(
+   const hier::Box& box,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   for (int d = 0; d < d_depth; d++) {
+      os << "Array depth = " << d << std::endl;
+      print(box, d, os, prec);
+   }
+}
+
+template<class TYPE>
+void NodeData<TYPE>::print(
+   const hier::Box& box,
+   int depth,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   os.precision(prec);
+   for (NodeIterator i(box); i; i++) {
+      os << "array" << i() << " = "
+         << d_data(i(), depth) << std::endl << std::flush;
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Checks to make sure that the class version and restart file		*
+ * version are equal.  If so, reads in d_depth and has d_data		*
+ * retrieve its own data from the database.				*
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void NodeData<TYPE>::getSpecializedFromDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   int ver = database->getInteger("PDAT_NODEDATA_VERSION");
+   if (ver != PDAT_NODEDATA_VERSION) {
+      TBOX_ERROR("NodeData<DIM>::getSpecializedFromDatabase error...\n"
+         << " : Restart file version different than class version" << std::endl);
+   }
+
+   d_depth = database->getInteger("d_depth");
+
+   tbox::Pointer<tbox::Database> array_database;
+   array_database = database->getDatabase("d_data");
+   (d_data).getFromDatabase(array_database);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Writes out the class version number and d_depth, Then has d_data	*
+ * write its own data to the database.					*
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void NodeData<TYPE>::putSpecializedToDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+
+   TBOX_ASSERT(!database.isNull());
+
+   database->putInteger("PDAT_NODEDATA_VERSION", PDAT_NODEDATA_VERSION);
+
+   database->putInteger("d_depth", d_depth);
+
+   tbox::Pointer<tbox::Database> array_database;
+   array_database = database->putDatabase("d_data");
+   (d_data).putToDatabase(array_database);
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeData.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeData.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,134 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated node centered patch data type 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int NodeData<TYPE>::getDepth() const
+{
+   return d_depth;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ArrayData<TYPE>& NodeData<TYPE>::getArrayData()
+{
+   return d_data;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const ArrayData<TYPE>& NodeData<TYPE>::getArrayData() const
+{
+   return d_data;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE * NodeData<TYPE>::getPointer(
+   int depth)
+{
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data.getPointer(depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE * NodeData<TYPE>::getPointer(
+   int depth) const
+{
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data.getPointer(depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE & NodeData<TYPE>::operator () (
+   const NodeIndex& i,
+   int depth)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, i);
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data(i, depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE &
+NodeData<TYPE>::operator () (
+   const NodeIndex& i,
+   int depth) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, i);
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data(i, depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void NodeData<TYPE>::fill(
+   const TYPE& t,
+   int d)
+{
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   d_data.fill(t, d);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void NodeData<TYPE>::fill(
+   const TYPE& t,
+   const hier::Box& box,
+   int d)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   d_data.fill(t, NodeGeometry::toNodeBox(box), d);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void NodeData<TYPE>::fillAll(
+   const TYPE& t)
+{
+   d_data.fillAll(t);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void NodeData<TYPE>::fillAll(
+   const TYPE& t,
+   const hier::Box& box)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   d_data.fillAll(t, NodeGeometry::toNodeBox(box));
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void NodeData<TYPE>::copyOnBox(
+   const NodeData<TYPE>& src,
+   const hier::Box& box)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*this, src, box);
+   const hier::Box node_box = NodeGeometry::toNodeBox(box);
+   d_data.copy(src.getArrayData(), node_box);
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeData.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeData.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,411 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated node centered patch data type 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeData
+#define included_pdat_NodeData
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/pdat/NodeIndex.h"
+#include "SAMRAI/pdat/NodeIterator.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * @brief Class NodeData<DIM> provides an implementation for data defined
+ * at nodes on AMR patches.  It is derived from the hier::PatchData
+ * interface common to all SAMRAI patch data types.  Given a CELL-centered
+ * AMR index space box, a node data object represents data of some template
+ * TYPE and depth at the nodes of the cells in the box.  Here, depth indicates
+ * the number of data values at each node index location.  The NodeGeometry
+ * class provides the translation between the standard SAMRAI cell-centered
+ * AMR index space and node-centered data.
+ *
+ * A node data array is stored in (i,...,k,d) order, where i,...,k indicates
+ * spatial indices and the d indicates the component depth at that locaion.
+ * Memory allocation is in column-major ordering (e.g., Fortran style)
+ * so that the leftmost index runs fastest in memory.  For example, a
+ * three-dimensional node data object created over a CELL-centered
+ * AMR index space box [l0:u0,l1:u1,l2:u2] allocates a data array
+ * dimensioned as
+ * \verbatim
+ *
+ *   [ l0 : u0+1 ,
+ *     l1 : u1+1,
+ *     l2 : u2+1 , d ]
+ *
+ * \endverbatim
+ * Other spatial dimensions are represented similarly.
+ *
+ * The data type TYPE must define a default constructor (that takes no
+ * arguments) and also the assignment operator.
+ *
+ * @see pdat::ArrayData
+ * @see hier::PatchData
+ * @see pdat::NodeDataFactory
+ * @see pdat::NodeIndex
+ * @see pdat::NodeIterator
+ * @see pdat::NodeGeometry
+ */
+
+template<class TYPE>
+class NodeData:public hier::PatchData
+{
+public:
+   /*!
+    * @brief  Calculate the amount of memory needed to represent node-
+    * centered data over a CELL-centered AMR index space box.
+    *
+    * This function assumes that the amount of memory
+    * needed for TYPE is sizeof(TYPE).  If this is not the case, then a
+    * specialized function must be defined.
+    *
+    * @param box const Box reference describing the interior of the
+    *            standard CELL-centered index box over which the
+    *            node data object will be created.
+    * @param depth gives the number of components for each
+    *              spatial location in the array.
+    * @param ghosts const IntVector reference indicating the width
+    *              of the ghost cell region around the box over which
+    *              the node data will be allocated.
+    */
+   static size_t
+   getSizeOfData(
+      const hier::Box& box,
+      int depth,
+      const hier::IntVector& ghosts);
+
+   /*!
+    * @brief The constructor for a node data object.
+    *
+    * @param box const Box reference describing the interior of the
+    *            standard CELL-centered index box over which the
+    *            node data object will be created.
+    * @param depth gives the number of components for each
+    *              spatial location in the array.
+    * @param ghosts const IntVector reference indicating the width
+    *              of the ghost cell region around the box over which
+    *              the node data will be allocated.
+    */
+   explicit NodeData(
+      const hier::Box& box,
+      int depth,
+      const hier::IntVector& ghosts);
+
+   /*!
+    * @brief The virtual destructor for a node data object.
+    */
+   virtual ~NodeData<TYPE>();
+
+   /*!
+    * @brief Return the depth (e.g., the number of components in each spatial
+    * location) of the array.
+    */
+   int
+   getDepth() const;
+
+   /*!
+    * @brief Get a pointer to the beginning of a particular depth
+    * component of the node centered array.
+    */
+   TYPE *
+   getPointer(
+      int depth = 0);
+
+   /*!
+    * @brief Get a const pointer to the beginning of a particular depth
+    * component of the node centered array.
+    */
+   const TYPE *
+   getPointer(
+      int depth = 0) const;
+
+   /*!
+    * @brief Return a reference to the data entry corresponding
+    * to a given node index and depth.
+    */
+   TYPE&
+   operator () (
+      const NodeIndex& i,
+      int depth = 0);
+
+   /*!
+    * @brief Return a const reference to the data entry corresponding
+    * to a given node index and depth.
+    */
+   const TYPE&
+   operator () (
+      const NodeIndex& i,
+      int depth = 0) const;
+
+   /*!
+    * @brief Return a reference to the array data object of
+    * the node centered array.
+    */
+   ArrayData<TYPE>&
+   getArrayData();
+
+   /*!
+    * @brief Return a const reference to the array data object of
+    * the node centered array.
+    */
+   const ArrayData<TYPE>&
+   getArrayData() const;
+
+   /*!
+    * @brief A fast copy from source to destination (i.e., this)
+    * patch data object.
+    *
+    * Data is copied where there is overlap in the underlying index space.
+    * The copy is performed on the interior plus the ghost cell width (for
+    * both the source and destination).  Currently, source data must be
+    * a NodeData of the same DIM and TYPE.  If not, then an unrecoverable
+    * error results.
+    */
+   virtual void
+   copy(
+      const hier::PatchData& src);
+
+   /*!
+    * @brief A fast copy from source (i.e., this) to destination
+    * patch data object.
+    *
+    * Data is copied where there is overlap in the underlying index space.
+    * The copy is performed on the interior plus the ghost cell width (for
+    * both the source and destination).  Currently, destination data must be
+    * a NodeData of the same DIM and TYPE.  If not, then an unrecoverable
+    * error results.
+    */
+   virtual void
+   copy2(
+      hier::PatchData& dst) const;
+
+   /*!
+    * @brief Copy data from source to destination (i.e., this)
+    * patch data object on the given overlap.
+    *
+    * Currently, source data must be NodeData of the same DIM and TYPE
+    * and the overlap must be a NodeOverlap of the same DIM.  If not,
+    * then an unrecoverable error results.
+    */
+   virtual void
+   copy(
+      const hier::PatchData& src,
+      const hier::BoxOverlap& overlap);
+
+   /*!
+    * @brief Copy data from source (i.e., this) to destination
+    * patch data object on the given overlap.
+    *
+    * Currently, destination data must be NodeData of the same DIM and TYPE
+    * and the overlap must be a NodeOverlap of the same DIM.  If not,
+    * then an unrecoverable error results.
+    */
+   virtual void
+   copy2(
+      hier::PatchData& dst,
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Copy data from source to destination (i.e., this)
+    * patch data object on the given CELL-centered AMR index box.
+    */
+   void
+   copyOnBox(
+      const NodeData<TYPE>& src,
+      const hier::Box& box);
+
+   /*!
+    * @brief Fast copy (i.e., source and this node data objects are
+    * defined over the same box) from the given node source data object to
+    * this destination node data object at the specified depths.
+    */
+   void
+   copyDepth(
+      int dst_depth,
+      const NodeData<TYPE>& src,
+      int src_depth);
+
+   /*!
+    * @brief Return true if the patch data object can estimate the
+    * stream size required to fit its data using only index
+    * space information (i.e., a box).
+    *
+    * This routine is defined for the standard types (bool, char,
+    * double, float, int, and dcomplex).
+    */
+   virtual bool
+   canEstimateStreamSizeFromBox() const;
+
+   /*!
+    * @brief Return the number of bytes needed to stream the data
+    * in this patch data object lying in the specified box overlap
+    * region.
+    *
+    * This routine is defined for the standard types (bool, char,
+    * double, float, int, and dcomplex).
+    */
+   virtual int
+   getDataStreamSize(
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Pack data in this patch data object lying in the specified
+    * box overlap region into the stream.  The overlap must be a
+    * NodeOverlap of the same DIM.
+    */
+   virtual void
+   packStream(
+      tbox::MessageStream& stream,
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Unpack data from stream into this patch data object over
+    * the specified box overlap region. The overlap must be a
+    * NodeOverlap of the same DIM.
+    */
+   virtual void
+   unpackStream(
+      tbox::MessageStream& stream,
+      const hier::BoxOverlap& overlap);
+
+   /*!
+    * @brief Fill all values at depth d with the value t.
+    */
+   void
+   fill(
+      const TYPE& t,
+      int d = 0);
+
+   /*!
+    * @brief Fill all values at depth d within the box with the value t.
+    */
+   void
+   fill(
+      const TYPE& t,
+      const hier::Box& box,
+      int d = 0);
+
+   /*!
+    * @brief Fill all depth components with value t.
+    */
+   void
+   fillAll(
+      const TYPE& t);
+
+   /*!
+    * @brief Fill all depth components within the box with value t.
+    */
+   void
+   fillAll(
+      const TYPE& t,
+      const hier::Box& box);
+
+   /*!
+    * @brief Print all node data values residing in the specified box.
+    * If the depth of the array is greater than one, all depths are printed.
+    *
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to node index space.
+    * @param os   reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   print(
+      const hier::Box& box,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Print all node data values at the given array depth in
+    * the specified box.
+    *
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to node index space.
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    * @param os   reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   print(
+      const hier::Box& box,
+      int depth,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Check that class version and restart file version are equal.
+    * If so, read data members from the database.
+    *
+    * Assertions: database must be non-null pointer.
+    */
+   virtual void
+   getSpecializedFromDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+   /*!
+    * @brief Write out the class version number and other data members to
+    * the database.
+    *
+    * Assertions: database must be non-null pointer.
+    */
+   virtual void
+   putSpecializedToDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+   /*!
+    * The node iterator iterates over the elements of a node
+    * centered box geometry.  This typedef is a convenience for
+    * using the NodeIterator class.
+    */
+   typedef NodeIterator Iterator;
+
+private:
+   NodeData(
+      const NodeData<TYPE>&);           // not implemented
+   void
+   operator = (
+      const NodeData<TYPE>&);                           // not implemented
+
+   int d_depth;
+   ArrayData<TYPE> d_data;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/NodeData.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/NodeData.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeDataFactory.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeDataFactory.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,178 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating node data objects 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeDataFactory_C
+#define included_pdat_NodeDataFactory_C
+
+#include "SAMRAI/pdat/NodeDataFactory.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeGeometry.h"
+#include "SAMRAI/pdat/OuternodeDataFactory.h"
+#include "SAMRAI/hier/Patch.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/NodeDataFactory.I"
+#endif
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * The constructor simply caches the default ghost cell width and depth.	*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+NodeDataFactory<TYPE>::NodeDataFactory(
+   int depth,
+   const hier::IntVector& ghosts,
+   bool fine_boundary_represents_var):
+   hier::PatchDataFactory(ghosts),
+   d_depth(depth),
+   d_fine_boundary_represents_var(fine_boundary_represents_var),
+   d_mb_trans(NULL)
+{
+   TBOX_ASSERT(depth > 0);
+   TBOX_ASSERT(ghosts.min() >= 0);
+}
+
+template<class TYPE>
+NodeDataFactory<TYPE>::~NodeDataFactory()
+{
+   if (d_mb_trans) {
+      delete d_mb_trans;
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Clone the factory and copy the default parameters to the new factory.	*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::PatchDataFactory>
+NodeDataFactory<TYPE>::cloneFactory(
+   const hier::IntVector& ghosts)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, ghosts);
+
+   return tbox::Pointer<hier::PatchDataFactory>(new NodeDataFactory<TYPE>(
+                                                   d_depth,
+                                                   ghosts,
+                                                   d_fine_boundary_represents_var));
+}
+
+/*
+ *************************************************************************
+ *
+ * Allocate the concrete node data classes.
+ *
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::PatchData>
+NodeDataFactory<TYPE>::allocate(
+   const hier::Patch& patch) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, patch);
+
+   hier::PatchData* patchdata =
+      new NodeData<TYPE>(patch.getBox(), d_depth, this->d_ghosts);
+   return tbox::Pointer<hier::PatchData>(patchdata);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Return the box geometry type for node data objects.			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::BoxGeometry>
+NodeDataFactory<TYPE>::getBoxGeometry(
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   hier::BoxGeometry* boxgeometry = new NodeGeometry(box, this->d_ghosts);
+   return tbox::Pointer<hier::BoxGeometry>(boxgeometry);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Calculate the amount of memory needed to allocate the data object.	*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+size_t NodeDataFactory<TYPE>::getSizeOfMemory(
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   const size_t obj =
+      tbox::MemoryUtilities::align(sizeof(NodeData<TYPE>));
+   const size_t data =
+      NodeData<TYPE>::getSizeOfData(box, d_depth, this->d_ghosts);
+   return obj + data;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Determine whether this is a valid copy operation to/from NodeData     *
+ * between the supplied datatype.                                        *
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+bool NodeDataFactory<TYPE>::validCopyTo(
+   const tbox::Pointer<hier::PatchDataFactory>& dst_pdf) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *dst_pdf);
+
+   bool valid_copy = false;
+
+   /*
+    * Valid options are NodeData and OuternodeData.
+    */
+   if (!valid_copy) {
+      tbox::Pointer<NodeDataFactory<TYPE> > ndf = dst_pdf;
+      if (!ndf.isNull()) {
+         valid_copy = true;
+      }
+   }
+
+   if (!valid_copy) {
+      tbox::Pointer<OuternodeDataFactory<TYPE> > ondf = dst_pdf;
+      if (!ondf.isNull()) {
+         valid_copy = true;
+      }
+   }
+
+   return valid_copy;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeDataFactory.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeDataFactory.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,33 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating node data objects 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int NodeDataFactory<TYPE>::getDepth() const
+{
+   return d_depth;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+hier::MultiblockDataTranslator *
+NodeDataFactory<TYPE>::getMultiblockDataTranslator()
+{
+   if (d_mb_trans == NULL) {
+      d_mb_trans = new MultiblockNodeDataTranslator<TYPE>();
+   }
+   return d_mb_trans;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeDataFactory.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeDataFactory.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,156 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating node data objects 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeDataFactory
+#define included_pdat_NodeDataFactory
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/MultiblockNodeDataTranslator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/PatchDataFactory.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class NodeDataFactory is a factory class used to allocate new
+ * instances of NodeData objects.  It is a subclass of the patch
+ * data factory class and node data is a subclass of patch data.  Both
+ * the factory and data classes are templated on the type of the contained
+ * object (e.g., double or int).
+ *
+ * @see pdat::NodeData
+ * @see pdat::PatchDataFactory
+ */
+
+template<class TYPE>
+class NodeDataFactory:public hier::PatchDataFactory
+{
+public:
+   /**
+    * The constructor for the node data factory class. The ghost cell width, depth
+    * (number of components), and fine boundary representation arguments give the
+    * defaults for all edge data objects created with this factory.  See
+    * the NodeVariable<DIM> class header file for more information.
+    */
+   explicit NodeDataFactory(
+      int depth,
+      const hier::IntVector& ghosts,
+      bool fine_boundary_represents_var);
+
+   /**
+    * Virtual destructor for the node data factory class.
+    */
+   virtual ~NodeDataFactory<TYPE>();
+
+   /**
+    * @brief Abstract virtual function to clone a patch data factory.
+    *
+    * This will return a new instantiation of the abstract factory
+    * with the same properties.  The properties of the cloned factory
+    * can then be changed without modifying the original.
+    *
+    * @param ghosts default ghost cell width for concrete classes created from
+    * the factory.
+    */
+   virtual tbox::Pointer<hier::PatchDataFactory>
+   cloneFactory(
+      const hier::IntVector& ghosts);
+
+   /**
+    * Virtual factory function to allocate a concrete node data object.
+    * The default information about the object (e.g., ghost cell width)
+    * is taken from the factory.
+    */
+   virtual tbox::Pointer<hier::PatchData>
+   allocate(
+      const hier::Patch& patch) const;
+
+   /**
+    * Allocate the box geometry object associated with the patch data.
+    * This information will be used in the computation of intersections
+    * and data dependencies between objects.
+    */
+
+   virtual tbox::Pointer<hier::BoxGeometry>
+   getBoxGeometry(
+      const hier::Box& box) const;
+
+   /**
+    * Get the depth (number of components).  This is the depth that
+    * will be used in the instantiation of node data objects.
+    */
+   int
+   getDepth() const;
+
+   /**
+    * Calculate the amount of memory needed to store the node data object,
+    * including object data and dynamically allocated data.
+    */
+   virtual size_t
+   getSizeOfMemory(
+      const hier::Box& box) const;
+
+   /**
+    * Return a boolean value indicating how data for the node quantity will be treated
+    * on coarse-fine interfaces.  This value is passed into the constructor.  See
+    * the NodeVariable<DIM> class header file for more information.
+    */
+   bool fineBoundaryRepresentsVariable() const {
+      return d_fine_boundary_represents_var;
+   }
+
+   /**
+    * Return true since the node data index space extends beyond the interior of
+    * patches.  That is, node data lives on patch borders.
+    */
+   bool dataLivesOnPatchBorder() const {
+      return true;
+   }
+
+   /**
+    * Return whether it is valid to copy this NodeDataFactory to the
+    * supplied destination patch data factory.  It will return true if
+    * dst_pdf is NodeDataFactory or OuternodeDataFactory, false otherwise.
+    */
+   bool
+   validCopyTo(
+      const tbox::Pointer<hier::PatchDataFactory>& dst_pdf) const;
+
+   /**
+    * Return pointer to a multiblock data translator
+    */
+   hier::MultiblockDataTranslator *
+   getMultiblockDataTranslator();
+
+private:
+   int d_depth;
+   bool d_fine_boundary_represents_var;
+
+   MultiblockNodeDataTranslator<TYPE>* d_mb_trans;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/NodeDataFactory.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/NodeDataFactory.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeDoubleInjection.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeDoubleInjection.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,169 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant averaging operator for node-centered double data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeDoubleInjection_C
+#define included_pdat_NodeDoubleInjection_C
+
+#include "SAMRAI/pdat/NodeDoubleInjection.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in concoarsen1d.f:
+void F77_FUNC(conavgnodedoub1d, CONAVGNODEDOUB1D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const double *, double *);
+// in concoarsen2d.f:
+void F77_FUNC(conavgnodedoub2d, CONAVGNODEDOUB2D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const double *, double *);
+// in concoarsen3d.f:
+void F77_FUNC(conavgnodedoub3d, CONAVGNODEDOUB3D) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const double *, double *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+NodeDoubleInjection::NodeDoubleInjection(
+   const tbox::Dimension& dim):
+   xfer::CoarsenOperator(dim, "CONSTANT_COARSEN"),
+   d_name_id("CONSTANT_COARSEN")
+{
+}
+
+NodeDoubleInjection::~NodeDoubleInjection()
+{
+}
+
+bool NodeDoubleInjection::findCoarsenOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<NodeVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+NodeDoubleInjection::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int NodeDoubleInjection::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+NodeDoubleInjection::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void NodeDoubleInjection::coarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   tbox::Pointer<NodeData<double> >
+   fdata = fine.getPatchData(src_component);
+   tbox::Pointer<NodeData<double> >
+   cdata = coarse.getPatchData(dst_component);
+
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+   TBOX_DIM_ASSERT_CHECK_ARGS5(*this, coarse, fine, coarse_box, ratio);
+
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+   const hier::Index cilo = cdata->getGhostBox().lower();
+   const hier::Index cihi = cdata->getGhostBox().upper();
+
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+
+   for (int d = 0; d < cdata->getDepth(); d++) {
+      if (getDim() == tbox::Dimension(1)) {
+         F77_FUNC(conavgnodedoub1d, CONAVGNODEDOUB1D) (ifirstc(0), ilastc(0),
+            filo(0), fihi(0),
+            cilo(0), cihi(0),
+            &ratio[0],
+            fdata->getPointer(d),
+            cdata->getPointer(d));
+      } else if (getDim() == tbox::Dimension(2)) {
+         F77_FUNC(conavgnodedoub2d, CONAVGNODEDOUB2D) (ifirstc(0), ifirstc(1),
+            ilastc(0), ilastc(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            &ratio[0],
+            fdata->getPointer(d),
+            cdata->getPointer(d));
+      } else if (getDim() == tbox::Dimension(3)) {
+         F77_FUNC(conavgnodedoub3d, CONAVGNODEDOUB3D) (ifirstc(0), ifirstc(1),
+            ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            &ratio[0],
+            fdata->getPointer(d),
+            cdata->getPointer(d));
+      } else {
+         TBOX_ERROR(
+            "NodeDoubleConstantRefine::coarsen dimension > 3 not supported"
+            << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeDoubleInjection.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeDoubleInjection.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,109 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant averaging operator for node-centered double data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeDoubleInjection
+#define included_pdat_NodeDoubleInjection
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class NodeDoubleInjection implements constant
+ * averaging (i.e., injection) for node-centered double patch data defined
+ * over a  mesh.  It is derived from the xfer::CoarsenOperator base
+ * class.  The numerical operations for theaveraging use FORTRAN numerical
+ * routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is node-centered double, and the string is "CONSTANT_COARSEN".
+ *
+ * @see xfer::CoarsenOperator
+ */
+
+class NodeDoubleInjection:
+   public xfer::CoarsenOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit NodeDoubleInjection(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~NodeDoubleInjection();
+
+   /**
+    * Return true if the variable and name string match the node-centered
+    * constant averaging; otherwise, return false.
+    */
+   bool
+   findCoarsenOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name string identifier of this coarsening operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of node-centered constant averaging is 0.
+    * It will be performed before any user-defined coarsen operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the constant averaging operator is the vector of
+    * zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Coarsen the source component on the fine patch to the destination
+    * component on the coarse patch using the node-centered double constant
+    * averaging operator.  Coarsening is performed on the intersection of
+    * the destination patch and the coarse box.  It is assumed that the
+    * fine patch contains sufficient data for the stencil width of the
+    * coarsening operator.
+    */
+   void
+   coarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeDoubleLinearTimeInterpolateOp.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeDoubleLinearTimeInterpolateOp.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,194 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for node-centered double patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeDoubleLinearTimeInterpolateOp_C
+#define included_pdat_NodeDoubleLinearTimeInterpolateOp_C
+
+#include "SAMRAI/pdat/NodeDoubleLinearTimeInterpolateOp.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in lintimint1d.f:
+void F77_FUNC(lintimeintnodedoub1d, LINTIMEINTNODEDOUB1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+// in lintimint2d.f:
+void F77_FUNC(lintimeintnodedoub2d, LINTIMEINTNODEDOUB2D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+// in lintimint3d.f:
+void F77_FUNC(lintimeintnodedoub3d, LINTIMEINTNODEDOUB3D) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+NodeDoubleLinearTimeInterpolateOp::NodeDoubleLinearTimeInterpolateOp():
+   xfer::TimeInterpolateOperator()
+{
+}
+
+NodeDoubleLinearTimeInterpolateOp::~NodeDoubleLinearTimeInterpolateOp()
+{
+}
+
+bool NodeDoubleLinearTimeInterpolateOp::findTimeInterpolateOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   const tbox::Pointer<NodeVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == "STD_LINEAR_TIME_INTERPOLATE")) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+void NodeDoubleLinearTimeInterpolateOp::timeInterpolate(
+   hier::PatchData& dst_data,
+   const hier::Box& where,
+   const hier::PatchData& src_data_old,
+   const hier::PatchData& src_data_new) const
+{
+   const tbox::Dimension& dim(where.getDim());
+
+   const NodeData<double>* old_dat =
+      dynamic_cast<const NodeData<double> *>(&src_data_old);
+   const NodeData<double>* new_dat =
+      dynamic_cast<const NodeData<double> *>(&src_data_new);
+   NodeData<double>* dst_dat =
+      dynamic_cast<NodeData<double> *>(&dst_data);
+
+   TBOX_ASSERT(old_dat != NULL);
+   TBOX_ASSERT(new_dat != NULL);
+   TBOX_ASSERT(dst_dat != NULL);
+   TBOX_ASSERT(where * old_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * new_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * dst_dat->getGhostBox() == where);
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst_data, where, src_data_old, src_data_new);
+
+   const hier::Index old_ilo = old_dat->getGhostBox().lower();
+   const hier::Index old_ihi = old_dat->getGhostBox().upper();
+   const hier::Index new_ilo = new_dat->getGhostBox().lower();
+   const hier::Index new_ihi = new_dat->getGhostBox().upper();
+
+   const hier::Index dst_ilo = dst_dat->getGhostBox().lower();
+   const hier::Index dst_ihi = dst_dat->getGhostBox().upper();
+
+   const hier::Index ifirst = where.lower();
+   const hier::Index ilast = where.upper();
+
+   const double old_time = old_dat->getTime();
+   const double new_time = new_dat->getTime();
+   const double dst_time = dst_dat->getTime();
+
+   TBOX_ASSERT((old_time < dst_time ||
+                tbox::MathUtilities<double>::equalEps(old_time, dst_time)) &&
+      (dst_time < new_time ||
+       tbox::MathUtilities<double>::equalEps(dst_time, new_time)));
+
+   double tfrac = dst_time - old_time;
+   double denom = new_time - old_time;
+   if (denom > tbox::MathUtilities<double>::getMin()) {
+      tfrac /= denom;
+   } else {
+      tfrac = 0.0;
+   }
+
+   for (int d = 0; d < dst_dat->getDepth(); d++) {
+      if (dim == tbox::Dimension(1)) {
+         F77_FUNC(lintimeintnodedoub1d, LINTIMEINTNODEDOUB1D) (ifirst(0),
+            ilast(0),
+            old_ilo(0), old_ihi(0),
+            new_ilo(0), new_ihi(0),
+            dst_ilo(0), dst_ihi(0),
+            tfrac,
+            old_dat->getPointer(d),
+            new_dat->getPointer(d),
+            dst_dat->getPointer(d));
+      } else if (dim == tbox::Dimension(2)) {
+         F77_FUNC(lintimeintnodedoub2d, LINTIMEINTNODEDOUB2D) (ifirst(0),
+            ifirst(1), ilast(0), ilast(1),
+            old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+            new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+            dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+            tfrac,
+            old_dat->getPointer(d),
+            new_dat->getPointer(d),
+            dst_dat->getPointer(d));
+      } else if (dim == tbox::Dimension(3)) {
+         F77_FUNC(lintimeintnodedoub3d, LINTIMEINTNODEDOUB3D) (ifirst(0),
+            ifirst(1), ifirst(2),
+            ilast(0), ilast(1), ilast(2),
+            old_ilo(0), old_ilo(1), old_ilo(2),
+            old_ihi(0), old_ihi(1), old_ihi(2),
+            new_ilo(0), new_ilo(1), new_ilo(2),
+            new_ihi(0), new_ihi(1), new_ihi(2),
+            dst_ilo(0), dst_ilo(1), dst_ilo(2),
+            dst_ihi(0), dst_ihi(1), dst_ihi(2),
+            tfrac,
+            old_dat->getPointer(d),
+            new_dat->getPointer(d),
+            dst_dat->getPointer(d));
+      } else {
+         TBOX_ERROR(
+            "NodeDoubleLinearTimeInterpolateOp::TimeInterpolate dim > 3 not supported"
+            << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeDoubleLinearTimeInterpolateOp.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeDoubleLinearTimeInterpolateOp.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for node-centered double patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeDoubleLinearTimeInterpolateOp
+#define included_pdat_NodeDoubleLinearTimeInterpolateOp
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class NodeDoubleLinearTimeInterpolateOp implements standard
+ * linear time interpolation for node-centered double patch data.
+ * It is derived from the xfer::TimeInterpolateOperator base class.
+ * The interpolation uses FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is a face-centered double, and the string is
+ * "STD_LINEAR_TIME_INTERPOLATE".
+ *
+ * @see xfer::TimeInterpolateOperator
+ */
+
+class NodeDoubleLinearTimeInterpolateOp:
+   public xfer::TimeInterpolateOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   NodeDoubleLinearTimeInterpolateOp();
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~NodeDoubleLinearTimeInterpolateOp();
+
+   /**
+    * Return true if the variable and name string match the standard
+    * node-centered double interpolation; otherwise, return false.
+    */
+   bool
+   findTimeInterpolateOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Perform linear time interpolation between two node-centered double
+    * patch data sources and place result in the destination patch data.
+    * Time interpolation is performed on the intersection of the destination
+    * patch data and the input box.  The time to which data is interpolated
+    * is provided by the destination data.
+    */
+   void
+   timeInterpolate(
+      hier::PatchData& dst_data,
+      const hier::Box& where,
+      const hier::PatchData& src_data_old,
+      const hier::PatchData& src_data_new) const;
+
+private:
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeFloatInjection.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeFloatInjection.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,170 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant averaging operator for node-centered float data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeFloatInjection_C
+#define included_pdat_NodeFloatInjection_C
+
+#include "SAMRAI/pdat/NodeFloatInjection.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in concoarsen1d.f:
+void F77_FUNC(conavgnodeflot1d, CONAVGNODEFLOT1D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const float *, float *);
+// in concoarsen2d.f:
+void F77_FUNC(conavgnodeflot2d, CONAVGNODEFLOT2D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const float *, float *);
+// in concoarsen3d.f:
+void F77_FUNC(conavgnodeflot3d, CONAVGNODEFLOT3D) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const float *, float *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+NodeFloatInjection::NodeFloatInjection(
+   const tbox::Dimension& dim):
+   xfer::CoarsenOperator(dim, "CONSTANT_COARSEN"),
+   d_name_id("CONSTANT_COARSEN")
+{
+
+}
+
+NodeFloatInjection::~NodeFloatInjection()
+{
+}
+
+bool NodeFloatInjection::findCoarsenOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<NodeVariable<float> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+NodeFloatInjection::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int NodeFloatInjection::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+NodeFloatInjection::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void NodeFloatInjection::coarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   tbox::Pointer<NodeData<float> >
+   fdata = fine.getPatchData(src_component);
+   tbox::Pointer<NodeData<float> >
+   cdata = coarse.getPatchData(dst_component);
+
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+   TBOX_DIM_ASSERT_CHECK_ARGS5(*this, coarse, fine, coarse_box, ratio);
+
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+   const hier::Index cilo = cdata->getGhostBox().lower();
+   const hier::Index cihi = cdata->getGhostBox().upper();
+
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+
+   for (int d = 0; d < cdata->getDepth(); d++) {
+      if (getDim() == tbox::Dimension(1)) {
+         F77_FUNC(conavgnodeflot1d, CONAVGNODEFLOT1D) (ifirstc(0), ilastc(0),
+            filo(0), fihi(0),
+            cilo(0), cihi(0),
+            &ratio[0],
+            fdata->getPointer(d),
+            cdata->getPointer(d));
+      } else if (getDim() == tbox::Dimension(2)) {
+         F77_FUNC(conavgnodeflot2d, CONAVGNODEFLOT2D) (ifirstc(0), ifirstc(1),
+            ilastc(0), ilastc(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            &ratio[0],
+            fdata->getPointer(d),
+            cdata->getPointer(d));
+      } else if (getDim() == tbox::Dimension(3)) {
+         F77_FUNC(conavgnodeflot3d, CONAVGNODEFLOT3D) (ifirstc(0), ifirstc(1),
+            ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            &ratio[0],
+            fdata->getPointer(d),
+            cdata->getPointer(d));
+      } else {
+         TBOX_ERROR(
+            "NodeFloatConstantRefine::coarsen dimension > 3 not supported"
+            << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeFloatInjection.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeFloatInjection.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,109 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant averaging operator for node-centered float data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeFloatInjection
+#define included_pdat_NodeFloatInjection
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class NodeFloatInjection implements constant
+ * averaging (i.e., injection) for node-centered float patch data defined
+ * over a  mesh.  It is derived from the xfer::CoarsenOperator base
+ * class.  The numerical operations for theaveraging use FORTRAN numerical
+ * routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is node-centered float, and the string is "CONSTANT_COARSEN".
+ *
+ * @see xfer::CoarsenOperator
+ */
+
+class NodeFloatInjection:
+   public xfer::CoarsenOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit NodeFloatInjection(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~NodeFloatInjection();
+
+   /**
+    * Return true if the variable and name string match the node-centered
+    * constant averaging; otherwise, return false.
+    */
+   bool
+   findCoarsenOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name string identifier of this coarsening operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of node-centered constant averaging is 0.
+    * It will be performed before any user-defined coarsen operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the constant averaging operator is the vector of
+    * zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Coarsen the source component on the fine patch to the destination
+    * component on the coarse patch using the node-centered float constant
+    * averaging operator.  Coarsening is performed on the intersection of
+    * the destination patch and the coarse box.  It is assumed that the
+    * fine patch contains sufficient data for the stencil width of the
+    * coarsening operator.
+    */
+   void
+   coarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeFloatLinearTimeInterpolateOp.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeFloatLinearTimeInterpolateOp.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,194 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for node-centered float patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeFloatLinearTimeInterpolateOp_C
+#define included_pdat_NodeFloatLinearTimeInterpolateOp_C
+
+#include "SAMRAI/pdat/NodeFloatLinearTimeInterpolateOp.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN 77 routines.                        *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in lintimint1d.f:
+void F77_FUNC(lintimeintnodefloat1d, LINTIMEINTNODEFLOAT1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+// in lintimint2d.f:
+void F77_FUNC(lintimeintnodefloat2d, LINTIMEINTNODEFLOAT2D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+// in lintimint3d.f:
+void F77_FUNC(lintimeintnodefloat3d, LINTIMEINTNODEFLOAT3D) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+NodeFloatLinearTimeInterpolateOp::NodeFloatLinearTimeInterpolateOp():
+   xfer::TimeInterpolateOperator()
+{
+}
+
+NodeFloatLinearTimeInterpolateOp::~NodeFloatLinearTimeInterpolateOp()
+{
+}
+
+bool NodeFloatLinearTimeInterpolateOp::findTimeInterpolateOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   const tbox::Pointer<NodeVariable<float> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == "STD_LINEAR_TIME_INTERPOLATE")) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+void NodeFloatLinearTimeInterpolateOp::timeInterpolate(
+   hier::PatchData& dst_data,
+   const hier::Box& where,
+   const hier::PatchData& src_data_old,
+   const hier::PatchData& src_data_new) const
+{
+   const tbox::Dimension& dim(where.getDim());
+
+   const NodeData<float>* old_dat =
+      dynamic_cast<const NodeData<float> *>(&src_data_old);
+   const NodeData<float>* new_dat =
+      dynamic_cast<const NodeData<float> *>(&src_data_new);
+   NodeData<float>* dst_dat =
+      dynamic_cast<NodeData<float> *>(&dst_data);
+
+   TBOX_ASSERT(old_dat != NULL);
+   TBOX_ASSERT(new_dat != NULL);
+   TBOX_ASSERT(dst_dat != NULL);
+   TBOX_ASSERT(where * old_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * new_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * dst_dat->getGhostBox() == where);
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst_data, where, src_data_old, src_data_new);
+
+   const hier::Index old_ilo = old_dat->getGhostBox().lower();
+   const hier::Index old_ihi = old_dat->getGhostBox().upper();
+   const hier::Index new_ilo = new_dat->getGhostBox().lower();
+   const hier::Index new_ihi = new_dat->getGhostBox().upper();
+
+   const hier::Index dst_ilo = dst_dat->getGhostBox().lower();
+   const hier::Index dst_ihi = dst_dat->getGhostBox().upper();
+
+   const hier::Index ifirst = where.lower();
+   const hier::Index ilast = where.upper();
+
+   const double old_time = old_dat->getTime();
+   const double new_time = new_dat->getTime();
+   const double dst_time = dst_dat->getTime();
+
+   TBOX_ASSERT((old_time < dst_time ||
+                tbox::MathUtilities<double>::equalEps(old_time, dst_time)) &&
+      (dst_time < new_time ||
+       tbox::MathUtilities<double>::equalEps(dst_time, new_time)));
+
+   double tfrac = dst_time - old_time;
+   double denom = new_time - old_time;
+   if (denom > tbox::MathUtilities<double>::getMin()) {
+      tfrac /= denom;
+   } else {
+      tfrac = 0.0;
+   }
+
+   for (int d = 0; d < dst_dat->getDepth(); d++) {
+      if (dim == tbox::Dimension(1)) {
+         F77_FUNC(lintimeintnodefloat1d, LINTIMEINTNODEFLOAT1D) (ifirst(0),
+            ilast(0),
+            old_ilo(0), old_ihi(0),
+            new_ilo(0), new_ihi(0),
+            dst_ilo(0), dst_ihi(0),
+            tfrac,
+            old_dat->getPointer(d),
+            new_dat->getPointer(d),
+            dst_dat->getPointer(d));
+      } else if (dim == tbox::Dimension(2)) {
+         F77_FUNC(lintimeintnodefloat2d, LINTIMEINTNODEFLOAT2D) (ifirst(0),
+            ifirst(1), ilast(0), ilast(1),
+            old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+            new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+            dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+            tfrac,
+            old_dat->getPointer(d),
+            new_dat->getPointer(d),
+            dst_dat->getPointer(d));
+      } else if (dim == tbox::Dimension(3)) {
+         F77_FUNC(lintimeintnodefloat3d, LINTIMEINTNODEFLOAT3D) (ifirst(0),
+            ifirst(1), ifirst(2),
+            ilast(0), ilast(1), ilast(2),
+            old_ilo(0), old_ilo(1), old_ilo(2),
+            old_ihi(0), old_ihi(1), old_ihi(2),
+            new_ilo(0), new_ilo(1), new_ilo(2),
+            new_ihi(0), new_ihi(1), new_ihi(2),
+            dst_ilo(0), dst_ilo(1), dst_ilo(2),
+            dst_ihi(0), dst_ihi(1), dst_ihi(2),
+            tfrac,
+            old_dat->getPointer(d),
+            new_dat->getPointer(d),
+            dst_dat->getPointer(d));
+      } else {
+         TBOX_ERROR(
+            "EdgeFloatLinearTimeInterpolateOp::TimeInterpolate dim > 3 not supported"
+            << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeFloatLinearTimeInterpolateOp.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeFloatLinearTimeInterpolateOp.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for node-centered float patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeFloatLinearTimeInterpolateOp
+#define included_pdat_NodeFloatLinearTimeInterpolateOp
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class NodeFloatLinearTimeInterpolateOp implements standard
+ * linear time interpolation for node-centered float patch data.
+ * It is derived from the xfer::TimeInterpolateOperator base class.
+ * The interpolation uses FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is a face-centered float, and the string is
+ * "STD_LINEAR_TIME_INTERPOLATE".
+ *
+ * @see xfer::TimeInterpolateOperator
+ */
+
+class NodeFloatLinearTimeInterpolateOp:
+   public xfer::TimeInterpolateOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   NodeFloatLinearTimeInterpolateOp();
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~NodeFloatLinearTimeInterpolateOp();
+
+   /**
+    * Return true if the variable and name string match the standard
+    * node-centered float interpolation; otherwise, return false.
+    */
+   bool
+   findTimeInterpolateOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Perform linear time interpolation between two node-centered float
+    * patch data sources and place result in the destination patch data.
+    * Time interpolation is performed on the intersection of the destination
+    * patch data and the input box.  The time to which data is interpolated
+    * is provided by the destination data.
+    */
+   void
+   timeInterpolate(
+      hier::PatchData& dst_data,
+      const hier::Box& where,
+      const hier::PatchData& src_data_old,
+      const hier::PatchData& src_data_new) const;
+
+private:
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeGeometry.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeGeometry.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,206 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeGeometry_C
+#define included_pdat_NodeGeometry_C
+
+#include "SAMRAI/pdat/NodeGeometry.h"
+#include "SAMRAI/pdat/NodeOverlap.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/NodeGeometry.I"
+#endif
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * Create a node geometry object given the box and ghost cell width.	*
+ *									*
+ *************************************************************************
+ */
+
+NodeGeometry::NodeGeometry(
+   const hier::Box& box,
+   const hier::IntVector& ghosts):
+   d_box(box),
+   d_ghosts(ghosts)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(box, ghosts);
+   TBOX_ASSERT(ghosts.min() >= 0);
+}
+
+NodeGeometry::~NodeGeometry()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Attempt to calculate the intersection between two node centered box	*
+ * geometries.  The calculateOverlap() checks whether both arguments are	*
+ * node geometries; if so, it computes the intersection.  If not, then	*
+ * it calls calculateOverlap() on the source object (if retry is true)	*
+ * to allow the source a chance to calculate the intersection.  See the	*
+ * hier::BoxGeometry base class for more information about the      *
+ * protocol. A pointer to null is returned if the intersection cannot    *
+ * be computed.	                                                        *
+ *                                                                      *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap> NodeGeometry::calculateOverlap(
+   const hier::BoxGeometry& dst_geometry,
+   const hier::BoxGeometry& src_geometry,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset,
+   const bool retry,
+   const hier::BoxList& dst_restrict_boxes) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(d_box, src_mask, src_offset);
+
+   const NodeGeometry* t_dst =
+      dynamic_cast<const NodeGeometry *>(&dst_geometry);
+   const NodeGeometry* t_src =
+      dynamic_cast<const NodeGeometry *>(&src_geometry);
+
+   tbox::Pointer<hier::BoxOverlap> over(NULL);
+   if ((t_src != NULL) && (t_dst != NULL)) {
+      over = doOverlap(*t_dst, *t_src, src_mask, overwrite_interior,
+            src_offset, dst_restrict_boxes);
+   } else if (retry) {
+      over = src_geometry.calculateOverlap(dst_geometry, src_geometry,
+            src_mask, overwrite_interior,
+            src_offset, false,
+            dst_restrict_boxes);
+   }
+   return over;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Compute the overlap between two node centered boxes.  The algorithm	*
+ * is fairly straight-forward.  First, the two boxes are converted into	*
+ * node coordinates.  Then, the boxes are intersected and, if necessary,	*
+ * the interior section is removed from the destination box.		*
+ *									*
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap> NodeGeometry::doOverlap(
+   const NodeGeometry& dst_geometry,
+   const NodeGeometry& src_geometry,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset,
+   const hier::BoxList& dst_restrict_boxes)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(src_mask, src_offset);
+
+   hier::BoxList dst_boxes;
+   dst_geometry.computeDestinationBoxes(dst_boxes,
+      src_geometry,
+      src_mask,
+      overwrite_interior,
+      src_offset,
+      dst_restrict_boxes);
+
+   // Create the node overlap data object using the boxes and source shift
+
+   hier::BoxOverlap* overlap = new NodeOverlap(dst_boxes, src_offset);
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute the boxes that will be used to contstruct an overlap object   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void NodeGeometry::computeDestinationBoxes(
+   hier::BoxList& dst_boxes,
+   const NodeGeometry& src_geometry,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset,
+   const hier::BoxList& dst_restrict_boxes) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(src_mask, src_offset);
+
+   // Translate the source box and grow the destination box by the ghost cells
+
+   const hier::Box src_box =
+      hier::Box::grow(src_geometry.d_box, src_geometry.d_ghosts) * src_mask;
+   const hier::Box src_shift =
+      hier::Box::shift(src_box, src_offset);
+   const hier::Box dst_ghost =
+      hier::Box::grow(d_box, d_ghosts);
+
+   // Convert the boxes into node space and compute the intersection
+
+   const hier::Box dst_node = NodeGeometry::toNodeBox(dst_ghost);
+   const hier::Box src_node = NodeGeometry::toNodeBox(src_shift);
+   const hier::Box together = dst_node * src_node;
+
+   if (!together.empty()) {
+      if (!overwrite_interior) {
+         const hier::Box int_node = toNodeBox(d_box);
+         dst_boxes.removeIntersections(together, int_node);
+      } else {
+         dst_boxes.appendItem(together);
+      }
+   }
+
+   if (dst_restrict_boxes.size() && dst_boxes.size()) {
+      hier::BoxList node_restrict_boxes;
+      for (hier::BoxList::Iterator b(dst_restrict_boxes); b; b++) {
+         node_restrict_boxes.appendItem(toNodeBox(b()));
+      }
+      dst_boxes.intersectBoxes(node_restrict_boxes);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set up a NodeOverlap oject using the given boxes and offset           *
+ *                                                                       *
+ *************************************************************************
+ */
+tbox::Pointer<hier::BoxOverlap>
+NodeGeometry::setUpOverlap(
+   const hier::BoxList& boxes,
+   const hier::IntVector& src_offset) const
+{
+   hier::BoxList dst_boxes;
+
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      hier::Box node_box(NodeGeometry::toNodeBox(b()));
+      dst_boxes.appendItem(node_box);
+   }
+
+   // Create the node overlap data object using the boxes and source shift
+
+   hier::BoxOverlap* overlap = new NodeOverlap(dst_boxes, src_offset);
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeGeometry.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeGeometry.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,34 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+SAMRAI_INLINE_KEYWORD
+const hier::Box& NodeGeometry::getBox() const
+{
+   return d_box;
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::IntVector& NodeGeometry::getGhosts() const
+{
+   return d_ghosts;
+}
+
+SAMRAI_INLINE_KEYWORD
+hier::Box NodeGeometry::toNodeBox(
+   const hier::Box& box)
+{
+   return box.empty() ? box : hier::Box(box.lower(), box.upper() + 1);
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeGeometry.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeGeometry.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,151 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeGeometry
+#define included_pdat_NodeGeometry
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/NodeOverlap.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * Class NodeGeometry manages the mapping between the AMR index space
+ * and the node-centered geometry index space.  It is a subclass of
+ * hier::BoxGeometry and it computes intersections between node-
+ * centered box geometries for communication operations.
+ *
+ * See header file for NodeData<DIM> class for a more detailed
+ * description of the data layout.
+ *
+ * @see hier::BoxGeometry
+ * @see pdat::NodeOverlap
+ */
+
+class NodeGeometry:public hier::BoxGeometry
+{
+public:
+   /*!
+    * The BoxOverlap implemenation for this geometry.
+    */
+   typedef NodeOverlap Overlap;
+
+   /*!
+    * @brief Convert an AMR index box space box into a node geometry box.
+    * A node geometry box is extends the given AMR index box space box
+    * by one in upper dimension for each coordinate direction.
+    */
+   static hier::Box
+   toNodeBox(
+      const hier::Box& box);
+
+   /*!
+    * @brief Construct the node geometry object given an AMR index
+    * space box and ghost cell width.
+    */
+   explicit NodeGeometry(
+      const hier::Box& box,
+      const hier::IntVector& ghosts);
+
+   /*!
+    * @brief The virtual destructor does nothing interesting.
+    */
+   virtual ~NodeGeometry();
+
+   /*!
+    * @brief Compute the overlap in node-centered index space between
+    * the source box geometry and the destination box geometry.
+    */
+   virtual tbox::Pointer<hier::BoxOverlap>
+   calculateOverlap(
+      const hier::BoxGeometry& dst_geometry,
+      const hier::BoxGeometry& src_geometry,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset,
+      const bool retry,
+      const hier::BoxList& dst_restrict_boxes = hier::BoxList()) const;
+
+   /*!
+    * @brief Compute the node-centered destination boxes that represent
+    * the overlap between the source box geometry and the destination
+    * box geometry.
+    */
+   void
+   computeDestinationBoxes(
+      hier::BoxList& dst_boxes,
+      const NodeGeometry& src_geometry,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset,
+      const hier::BoxList& dst_restrict_boxes = hier::BoxList()) const;
+
+   /*!
+    * @brief Set up a EdgeOverlap object based on the given boxes and the
+    * offset.
+    */
+   virtual tbox::Pointer<hier::BoxOverlap>
+   setUpOverlap(
+      const hier::BoxList& boxes,
+      const hier::IntVector& src_offset) const;
+
+   /*!
+    * @brief Return the box for this node centered box geometry
+    * object.
+    */
+   const hier::Box&
+   getBox() const;
+
+   /*!
+    * @brief Return the ghost cell width for this node centered box
+    * geometry object.
+    */
+   const hier::IntVector&
+   getGhosts() const;
+
+private:
+   /**
+    * Function doOverlap() is the function that computes the overlap
+    * between the source and destination objects, where both box geometry
+    * objects are guaranteed to have node centered geometry.
+    */
+   static tbox::Pointer<hier::BoxOverlap>
+   doOverlap(
+      const NodeGeometry& dst_geometry,
+      const NodeGeometry& src_geometry,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset,
+      const hier::BoxList& dst_restrict_boxes);
+
+   NodeGeometry(
+      const NodeGeometry&);             // not implemented
+   void
+   operator = (
+      const NodeGeometry&);                     // not implemented
+
+   hier::Box d_box;
+   hier::IntVector d_ghosts;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/NodeGeometry.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeIndex.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeIndex.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,28 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeIndex_C
+#define included_pdat_NodeIndex_C
+
+#include "SAMRAI/pdat/NodeIndex.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/NodeIndex.I"
+#endif
+namespace SAMRAI {
+namespace pdat {
+
+std::vector<hier::IntVector> NodeIndex::s_offsets[tbox::Dimension::
+                                                  MAXIMUM_DIMENSION_VALUE];
+bool NodeIndex::s_offsets_are_set[tbox::Dimension::MAXIMUM_DIMENSION_VALUE] = { false };
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeIndex.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeIndex.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,251 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Utilities.h"
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace pdat {
+
+SAMRAI_INLINE_KEYWORD
+void NodeIndex::setOffsets()
+{
+   const tbox::Dimension& dim(getDim());
+   int dim_index = dim.getValue() - 1;
+   if (!s_offsets_are_set[dim_index]) {
+      s_offsets[dim_index] = std::vector<hier::IntVector>(
+            2 << tbox::Dimension::MAXIMUM_DIMENSION_VALUE,
+            hier::IntVector(dim));
+      for (int i = 0; i < (1 << dim.getValue()); i++) {
+         hier::IntVector offset(dim, 0);
+
+         offset(0) = i % 2;
+         for (int j = 1; j < dim.getValue(); j++) {
+            offset(j) = (i / (1 << j)) % 2;
+         }
+         s_offsets[dim_index][i] = offset;
+      }
+      s_offsets_are_set[dim_index] = true;
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+NodeIndex::NodeIndex(
+   const tbox::Dimension& dim):
+   hier::Index(dim)
+{
+   setOffsets();
+}
+
+SAMRAI_INLINE_KEYWORD
+NodeIndex::NodeIndex(
+   const hier::Index& rhs,
+   const Corner corner):
+   hier::Index(rhs.getDim())
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   setOffsets();
+   hier::IntVector::operator = (
+      rhs + s_offsets[getDim().getValue() - 1][(int)corner]);
+}
+
+SAMRAI_INLINE_KEYWORD
+NodeIndex::NodeIndex(
+   const hier::Index& rhs,
+   const hier::IntVector& corner):
+   hier::Index(rhs.getDim())
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   for (int i = 0; i < getDim().getValue(); i++) {
+      TBOX_ASSERT(corner(i) == 0 || corner(i) == 1);
+   }
+#endif
+   setOffsets();
+   hier::IntVector::operator = (
+      rhs + corner);
+}
+
+SAMRAI_INLINE_KEYWORD
+NodeIndex::NodeIndex(
+   const NodeIndex& rhs):
+   hier::Index(rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   setOffsets();
+}
+
+SAMRAI_INLINE_KEYWORD
+NodeIndex& NodeIndex::operator = (
+   const NodeIndex& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   hier::Index::operator = (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+NodeIndex::~NodeIndex()
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+NodeIndex& NodeIndex::operator += (
+   const hier::IntVector& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   hier::Index::operator += (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+NodeIndex NodeIndex::operator + (
+   const hier::IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   NodeIndex tmp = *this;
+   tmp += rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+NodeIndex& NodeIndex::operator += (
+   const int rhs)
+{
+   hier::Index::operator += (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+NodeIndex NodeIndex::operator + (
+   const int rhs) const
+{
+   NodeIndex tmp = *this;
+   tmp += rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+NodeIndex& NodeIndex::operator -= (
+   const hier::IntVector& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   hier::Index::operator -= (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+NodeIndex NodeIndex::operator - (
+   const hier::IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   NodeIndex tmp = *this;
+   tmp -= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+NodeIndex& NodeIndex::operator -= (
+   const int rhs)
+{
+   hier::Index::operator -= (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+NodeIndex NodeIndex::operator - (
+   const int rhs) const
+{
+   NodeIndex tmp = *this;
+   tmp -= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+NodeIndex& NodeIndex::operator *= (
+   const hier::IntVector& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   hier::Index::operator *= (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+NodeIndex NodeIndex::operator * (
+   const hier::IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   NodeIndex tmp = *this;
+   tmp *= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+NodeIndex& NodeIndex::operator *= (
+   const int rhs)
+{
+   hier::Index::operator *= (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+NodeIndex NodeIndex::operator * (
+   const int rhs) const
+{
+   NodeIndex tmp = *this;
+   tmp *= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool NodeIndex::operator == (
+   const NodeIndex& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   return ((hier::Index *)this)->operator == (rhs);
+}
+
+SAMRAI_INLINE_KEYWORD
+bool NodeIndex::operator != (
+   const NodeIndex& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   return ((hier::Index *)this)->operator != (rhs);
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeIndex.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeIndex.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,218 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeIndex
+#define included_pdat_NodeIndex
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Index.h"
+
+#include <vector>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class NodeIndex implements a simple n-dimensional integer
+ * vector for node centered variables.  Given a hier::Box in the AMR abstract
+ * index space, the index space for a node-centered variable runs from the
+ * lower corner of the box to the upper corner of the box plus one in each
+ * dimension.  See the node box geometry class for more information about
+ * the mapping between the AMR index space and the node indices.
+ *
+ * @see hier::Index
+ * @see pdat::NodeData
+ * @see pdat::NodeGeometry
+ * @see pdat::NodeIterator
+ */
+
+class NodeIndex:public hier::Index
+{
+public:
+   /**
+    * The Corner enumerated type is used when converting from a cell centered
+    * index to a node centered index.  In 1d, use Left and Right.  In 2d, use
+    * LowerLeft, LowerRight, UpperLeft, and UpperRight.  In 3d, the naming is
+    * less intuitive, and use names LLL through UUU, where L means lower and
+    * U means upper.  Therefore, to get the box upper in X, lower in Y, and
+    * lower in Z, use corner name ULL.
+    */
+   enum Corner {
+      Left = 0, Right = 1,
+      LowerLeft = 0, LowerRight = 1, UpperLeft = 2, UpperRight = 3,
+      LLL = 0, ULL = 1, LUL = 2, UUL = 3, LLU = 4, ULU = 5, LUU = 6, UUU = 7
+   };
+
+   /**
+    * The default constructor for a node index creates an uninitialized index.
+    */
+   explicit NodeIndex(
+      const tbox::Dimension& dim);
+
+   /**
+    * Construct a node index from a regular index and a corner.
+    *
+    * The Corner enumerated type is only defined for 3D or lower, so use
+    * the next constructor with an hier::IntVector argument when using higher
+    * dimensions.
+    */
+   explicit NodeIndex(
+      const hier::Index& rhs,
+      const Corner corner);
+
+   /**
+    * Construct a node index from a regular index and an hier::IntVector.  The
+    * hier::IntVector is binary--an assertion failure will result if it contains
+    * any values other than 0 or 1.  For each dimension, if the hier::IntVector
+    * contains a 0, the node index will represent a lower bound in that
+    * dimensional direction, and if 1 will represent an upper bound in that
+    * direction.
+    */
+   explicit NodeIndex(
+      const hier::Index& rhs,
+      const hier::IntVector& corner);
+
+   /**
+    * The copy constructor creates a node index equal to the argument.
+    */
+   NodeIndex(
+      const NodeIndex& rhs);
+
+   /**
+    * The assignment operator sets the node index equal to the argument.
+    */
+   NodeIndex&
+   operator = (
+      const NodeIndex& rhs);
+
+   /**
+    * The node index destructor does nothing interesting.
+    */
+   ~NodeIndex();
+
+   /**
+    * Plus-equals operator for a node index and an integer vector.
+    */
+   NodeIndex&
+   operator += (
+      const hier::IntVector& rhs);
+
+   /**
+    * Plus operator for a node index and an integer vector.
+    */
+   NodeIndex
+   operator + (
+      const hier::IntVector& rhs) const;
+
+   /**
+    * Plus-equals operator for a node index and an integer.
+    */
+   NodeIndex&
+   operator += (
+      const int rhs);
+
+   /**
+    * Plus operator for a node index and an integer.
+    */
+   NodeIndex
+   operator + (
+      const int rhs) const;
+
+   /**
+    * Minus-equals operator for a node index and an integer vector.
+    */
+   NodeIndex&
+   operator -= (
+      const hier::IntVector& rhs);
+
+   /**
+    * Minus operator for a node index and an integer vector.
+    */
+   NodeIndex
+   operator - (
+      const hier::IntVector& rhs) const;
+
+   /**
+    * Minus-equals operator for a node index and an integer.
+    */
+   NodeIndex&
+   operator -= (
+      const int rhs);
+
+   /**
+    * Minus operator for a node index and an integer.
+    */
+   NodeIndex
+   operator - (
+      const int rhs) const;
+
+   /**
+    * Times-equals operator for a node index and an integer vector.
+    */
+   NodeIndex&
+   operator *= (
+      const hier::IntVector& rhs);
+
+   /**
+    * Times operator for a node index and an integer vector.
+    */
+   NodeIndex
+   operator * (
+      const hier::IntVector& rhs) const;
+
+   /**
+    * Times-equals operator for a node index and an integer.
+    */
+   NodeIndex&
+   operator *= (
+      const int rhs);
+
+   /**
+    * Times operator for a node index and an integer.
+    */
+   NodeIndex
+   operator * (
+      const int rhs) const;
+
+   /**
+    * Returns true if two node index objects are equal.
+    * All components must be the same for equality.
+    */
+   bool
+   operator == (
+      const NodeIndex& rhs) const;
+
+   /**
+    * Returns true if two node index objects are not equal.
+    * Any of the components may be different for inequality.
+    */
+   bool
+   operator != (
+      const NodeIndex& rhs) const;
+
+private:
+   /*
+    * Initializes the offsets if it has not yet been done
+    */
+   void
+   setOffsets();
+
+   static std::vector<hier::IntVector> s_offsets[tbox::Dimension::
+                                                 MAXIMUM_DIMENSION_VALUE];
+   static bool s_offsets_are_set[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/NodeIndex.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeIntegerInjection.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeIntegerInjection.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,169 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant averaging operator for node-centered integer data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeIntegerInjection_C
+#define included_pdat_NodeIntegerInjection_C
+
+#include "SAMRAI/pdat/NodeIntegerInjection.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in concoarsen1d.f:
+void F77_FUNC(conavgnodeintg1d, CONAVGNODEINTG1D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const int *, int *);
+// in concoarsen2d.f:
+void F77_FUNC(conavgnodeintg2d, CONAVGNODEINTG2D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const int *, int *);
+// in concoarsen3d.f:
+void F77_FUNC(conavgnodeintg3d, CONAVGNODEINTG3D) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const int *, int *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+NodeIntegerInjection::NodeIntegerInjection(
+   const tbox::Dimension& dim):
+   xfer::CoarsenOperator(dim, "CONSTANT_COARSEN"),
+   d_name_id("CONSTANT_COARSEN")
+{
+}
+
+NodeIntegerInjection::~NodeIntegerInjection()
+{
+}
+
+bool NodeIntegerInjection::findCoarsenOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<NodeVariable<int> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+NodeIntegerInjection::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int NodeIntegerInjection::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+NodeIntegerInjection::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void NodeIntegerInjection::coarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   tbox::Pointer<NodeData<int> >
+   fdata = fine.getPatchData(src_component);
+   tbox::Pointer<NodeData<int> >
+   cdata = coarse.getPatchData(dst_component);
+
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+   TBOX_DIM_ASSERT_CHECK_ARGS5(*this, coarse, fine, coarse_box, ratio);
+
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+   const hier::Index cilo = cdata->getGhostBox().lower();
+   const hier::Index cihi = cdata->getGhostBox().upper();
+
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+
+   for (int d = 0; d < cdata->getDepth(); d++) {
+      if (getDim() == tbox::Dimension(1)) {
+         F77_FUNC(conavgnodeintg1d, CONAVGNODEINTG1D) (ifirstc(0), ilastc(0),
+            filo(0), fihi(0),
+            cilo(0), cihi(0),
+            &ratio[0],
+            fdata->getPointer(d),
+            cdata->getPointer(d));
+      } else if (getDim() == tbox::Dimension(2)) {
+         F77_FUNC(conavgnodeintg2d, CONAVGNODEINTG2D) (ifirstc(0), ifirstc(1),
+            ilastc(0), ilastc(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            &ratio[0],
+            fdata->getPointer(d),
+            cdata->getPointer(d));
+      } else if (getDim() == tbox::Dimension(3)) {
+         F77_FUNC(conavgnodeintg3d, conavgnodeintg3d) (ifirstc(0), ifirstc(1),
+            ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            &ratio[0],
+            fdata->getPointer(d),
+            cdata->getPointer(d));
+      } else {
+         TBOX_ERROR(
+            "NodeIntegerConstantRefine::coarsen dimension > 3 not supported"
+            << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeIntegerInjection.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeIntegerInjection.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant averaging operator for node-centered integer data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeIntegerInjection
+#define included_pdat_NodeIntegerInjection
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/xfer/CoarsenOperator.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class NodeIntegerInjection implements constant
+ * averaging (i.e., injection) for node-centered integer patch data defined
+ * over a  mesh.  It is derived from the xfer::CoarsenOperator base
+ * class.  The numerical operations for theaveraging use FORTRAN numerical
+ * routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is node-centered integer, and the string is "CONSTANT_COARSEN".
+ *
+ * @see xfer::CoarsenOperator
+ */
+
+class NodeIntegerInjection:
+   public xfer::CoarsenOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit NodeIntegerInjection(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~NodeIntegerInjection();
+
+   /**
+    * Return true if the variable and name string match the node-centered
+    * constant averaging; otherwise, return false.
+    */
+   bool
+   findCoarsenOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name string identifier of this coarsening operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of node-centered constant averaging is 0.
+    * It will be performed before any user-defined coarsen operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the constant averaging operator is the vector of
+    * zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Coarsen the source component on the fine patch to the destination
+    * component on the coarse patch using the node-centered integer constant
+    * averaging operator.  Coarsening is performed on the intersection of
+    * the destination patch and the coarse box.  It is assumed that the
+    * fine patch contains sufficient data for the stencil width of the
+    * coarsening operator.
+    */
+   void
+   coarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeIterator.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeIterator.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,19 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Iterator for node centered patch data types 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeIterator_C
+#define included_pdat_NodeIterator_C
+
+#include "SAMRAI/pdat/NodeIterator.h"
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/NodeIterator.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeIterator.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeIterator.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Iterator for node centered patch data types 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+SAMRAI_INLINE_KEYWORD
+NodeIterator::NodeIterator(
+   const hier::Box& box):
+   d_index(box.lower(), hier::IntVector::getZero(box.getDim())),
+   d_box(NodeGeometry::toNodeBox(box))
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+NodeIterator::NodeIterator(
+   const NodeIterator& iter):
+   d_index(iter.d_index),
+   d_box(iter.d_box)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+NodeIterator&
+NodeIterator::operator = (
+   const NodeIterator& iter)
+{
+   d_index = iter.d_index;
+   d_box = iter.d_box;
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+NodeIterator::~NodeIterator()
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+const NodeIndex& NodeIterator::operator * () const
+{
+   return d_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+const NodeIndex& NodeIterator::operator () () const
+{
+   return d_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+NodeIterator::operator bool () const
+{
+   bool retval = true;
+   for (int i = 0; i < d_box.getDim().getValue(); i++) {
+      if (d_index(i) > d_box.upper(i)) {
+         retval = false;
+         break;
+      }
+   }
+
+   return retval;
+}
+
+#ifndef LACKS_BOOL_VOID_RESOLUTION
+SAMRAI_INLINE_KEYWORD
+NodeIterator::operator const void* () const
+{
+   return NodeIterator::operator bool () ? this : NULL;
+}
+#endif
+
+SAMRAI_INLINE_KEYWORD
+bool NodeIterator::operator ! () const
+{
+   return !NodeIterator::operator bool ();
+}
+
+SAMRAI_INLINE_KEYWORD
+void NodeIterator::operator ++ (
+   int)
+{
+   d_index(0)++;
+   for (int i = 0; i < d_box.getDim().getValue() - 1; i++) {
+      if (d_index(i) > d_box.upper(i)) {
+         d_index(i) = d_box.lower(i);
+         d_index(i + 1)++;
+      } else {
+         break;
+      }
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+bool NodeIterator::operator == (
+   const NodeIterator& iter) const
+{
+   return d_index == iter.d_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool NodeIterator::operator != (
+   const NodeIterator& iter) const
+{
+   return d_index != iter.d_index;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeIterator.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeIterator.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,135 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Iterator for node centered patch data types 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeIterator
+#define included_pdat_NodeIterator
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/NodeGeometry.h"
+#include "SAMRAI/pdat/NodeIndex.h"
+#include "SAMRAI/hier/Box.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class NodeIterator is an iterator that provides methods for
+ * stepping through the index space associated with a node centered box.
+ * The indices are enumerated in column-major (e.g., Fortran) order.
+ * The iterator should be used as follows:
+ * \verbatim
+ * hier::Box box;
+ * ...
+ * for (NodeIterator c(box); c; c++) {
+ *    // use index c of the box
+ * }
+ * \endverbatim
+ * Note that the node iterator may not compile to efficient code, depending
+ * on your compiler.  Many compilers are not smart enough to optimize the
+ * looping constructs and indexing operations.
+ *
+ * @see pdat::NodeData
+ * @see pdat::NodeGeometry
+ * @see pdat::NodeIndex
+ */
+
+class NodeIterator
+{
+public:
+   /**
+    * Constructor for the node iterator.  The iterator will enumerate
+    * the indices in the argument box.
+    */
+   explicit NodeIterator(
+      const hier::Box& box);
+
+   /**
+    * Copy constructor for the node iterator
+    */
+   NodeIterator(
+      const NodeIterator& iterator);
+
+   /**
+    * Assignment operator for the node iterator.
+    */
+   NodeIterator&
+   operator = (
+      const NodeIterator& iterator);
+
+   /**
+    * Destructor for the node iterator.
+    */
+   ~NodeIterator();
+
+   /**
+    * Extract the node index corresponding to the iterator position in the box.
+    */
+   const NodeIndex&
+   operator * () const;
+
+   /**
+    * Extract the node index corresponding to the iterator position in the box.
+    */
+   const NodeIndex&
+   operator () () const;
+
+   /**
+    * Return true if the iterator points to a valid index within the box.
+    */
+   operator bool () const;
+
+#ifndef LACKS_BOOL_VOID_RESOLUTION
+   /**
+    * Return a non-NULL if the iterator points to a valid index within the box.
+    */
+   operator const void
+   * () const;
+#endif
+
+   /**
+    * Return whether the iterator points to a valid index within the box.
+    * This operator mimics the !p operation applied to a pointer p.
+    */
+   bool
+   operator ! () const;
+
+   /**
+    * Increment the iterator to point to the next index in the box.
+    */
+   void
+   operator ++ (
+      int);
+
+   /**
+    * Test two iterators for equality (same index value).
+    */
+   bool
+   operator == (
+      const NodeIterator& iterator) const;
+
+   /**
+    * Test two iterators for inequality (different index values).
+    */
+   bool
+   operator != (
+      const NodeIterator& iterator) const;
+
+private:
+   NodeIndex d_index;
+   hier::Box d_box;
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/NodeIterator.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeOverlap.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeOverlap.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,43 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeOverlap_C
+#define included_pdat_NodeOverlap_C
+
+#include "SAMRAI/pdat/NodeOverlap.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/NodeOverlap.I"
+#endif
+
+namespace SAMRAI {
+namespace pdat {
+
+NodeOverlap::NodeOverlap(
+   const hier::BoxList& boxes,
+   const hier::IntVector& src_offset):
+   d_is_overlap_empty(boxes.isEmpty()),
+   d_offset(src_offset),
+   d_dst_boxes(boxes)
+{
+}
+
+NodeOverlap::~NodeOverlap()
+{
+}
+
+bool NodeOverlap::isOverlapEmpty() const
+{
+   return d_is_overlap_empty;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeOverlap.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeOverlap.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,28 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+SAMRAI_INLINE_KEYWORD
+const hier::BoxList&
+NodeOverlap::getDestinationBoxList() const
+{
+   return d_dst_boxes;
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::IntVector& NodeOverlap::getSourceOffset() const
+{
+   return d_offset;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeOverlap.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeOverlap.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeOverlap
+#define included_pdat_NodeOverlap
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class NodeOverlap represents the intersection between two node
+ * centered geometry boxes.  It is a subclass of hier::BoxOverlap and records
+ * the portions of index space that needs to be copied between two objects
+ * with node centered geometry.
+ *
+ * @see hier::BoxOverlap
+ * @see pdat::NodeOverlap
+ */
+
+class NodeOverlap:public hier::BoxOverlap
+{
+public:
+   /**
+    * The constructor takes the list of boxes and the source offset between
+    * the source and destination index spaces.  This information is used later
+    * in the generation of communication schedules.
+    */
+   explicit NodeOverlap(
+      const hier::BoxList& boxes,
+      const hier::IntVector& src_offset);
+
+   /**
+    * The virtual destructor does nothing interesting except deallocate
+    * box data.
+    */
+   virtual ~NodeOverlap();
+
+   /**
+    * Return whether there is an empty intersection between the two
+    * node centered boxes.  This method over-rides the virtual function
+    * in the hier::BoxOverlap base class.
+    */
+   virtual bool
+   isOverlapEmpty() const;
+
+   /**
+    * Return the list of boxes (in node centered index space) that
+    * constitute the intersection.  The boxes are given in the
+    * destination coordinate space and must be shifted by
+    * -(getSourceOffset()) to lie in the source index space.  This
+    * method over-rides the virtual function in the
+    * hier::BoxOverlap base class.
+    */
+   virtual const hier::BoxList&
+   getDestinationBoxList() const;
+
+   /**
+    * Return the offset between the destination and source index spaces.
+    * The destination index space is the source index spaced shifted
+    * by this amount.
+    */
+   virtual const hier::IntVector&
+   getSourceOffset() const;
+
+private:
+   bool d_is_overlap_empty;
+   hier::IntVector d_offset;
+   hier::BoxList d_dst_boxes;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/NodeOverlap.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeVariable.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeVariable.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeVariable_C
+#define included_pdat_NodeVariable_C
+
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "SAMRAI/pdat/NodeDataFactory.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * Constructor and destructor for node variable objects			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+NodeVariable<TYPE>::NodeVariable(
+   const tbox::Dimension& dim,
+   const std::string& name,
+   int depth,
+   bool fine_boundary_represents_var):
+   hier::Variable(name,
+                  tbox::Pointer<SAMRAI::hier::PatchDataFactory>(new
+                                                                NodeDataFactory
+                                                                <TYPE>(depth,
+                                                                       // default zero ghost cells
+                                                                       hier
+                                                                       ::
+                                                                       IntVector
+                                                                       ::
+                                                                       getZero(
+                                                                          dim),
+                                                                       fine_boundary_represents_var))),
+
+   d_fine_boundary_represents_var(fine_boundary_represents_var)
+{
+}
+
+template<class TYPE>
+NodeVariable<TYPE>::~NodeVariable()
+{
+}
+
+template<class TYPE>
+int NodeVariable<TYPE>::getDepth() const
+{
+   tbox::Pointer<NodeDataFactory<TYPE> > factory = this->getPatchDataFactory();
+   TBOX_ASSERT(factory);
+   return factory->getDepth();
+}
+
+/*
+ *************************************************************************
+ *									*
+ * These are private and should not be used.  They are defined here	*
+ * because some template instantiation methods fail if some member	*
+ * functions are left undefined.						*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+NodeVariable<TYPE>::NodeVariable(
+   const NodeVariable<TYPE>& foo):
+   hier::Variable(NULL, tbox::Pointer<SAMRAI::hier::PatchDataFactory>(NULL))
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void NodeVariable<TYPE>::operator = (
+   const NodeVariable<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/NodeVariable.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/NodeVariable.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,103 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeVariable
+#define included_pdat_NodeVariable
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/tbox/Complex.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * Class NodeVariable<DIM> is a templated variable class used to define
+ * node-centered quantities on an AMR mesh.   It is a subclass of
+ * hier::Variable and is templated on the type of the underlying data
+ * (e.g., double, int, bool, etc.).
+ *
+ * See header file for NodeData<DIM> class for a more detailed
+ * description of the data layout.
+ *
+ * @see pdat::NodeData
+ * @see pdat::NodeDataFactory
+ * @see hier::Variable
+ */
+
+template<class TYPE>
+class NodeVariable:public hier::Variable
+{
+public:
+   /*!
+    * @brief Create a cell-centered variable object with the given name and
+    * depth (i.e., number of data values at each cell index location).
+    * A default depth of one is provided.  The fine boundary representation
+    * boolean argument indicates which values (either coarse or fine) take
+    * precedence at coarse-fine mesh boundaries during coarsen and refine
+    * operations.  The default is that fine data values take precedence
+    * on coarse-fine interfaces.
+    */
+   explicit NodeVariable(
+      const tbox::Dimension& dim,
+      const std::string& name,
+      int depth = 1,
+      bool fine_boundary_represents_var = true);
+
+   /*!
+    * @brief Virtual destructor for node variable objects.
+    */
+   virtual ~NodeVariable<TYPE>();
+
+   /*!
+    * @brief Return boolean indicating which node data values (coarse
+    * or fine) take precedence at coarse-fine mesh interfaces.  The
+    * value is set in the constructor.
+    */
+   bool fineBoundaryRepresentsVariable() const
+   {
+      return d_fine_boundary_represents_var;
+   }
+
+   /*!
+    * @brief Return true indicating that node data on a patch interior
+    * exists on the patch boundary.
+    */
+   bool dataLivesOnPatchBorder() const {
+      return true;
+   }
+
+   /*!
+    * @brief Return the the depth (number of components).
+    */
+   int
+   getDepth() const;
+
+private:
+   bool d_fine_boundary_represents_var;
+
+   NodeVariable(
+      const NodeVariable<TYPE>&);          // not implemented
+   void
+   operator = (
+      const NodeVariable<TYPE>&);               // not implemented
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/NodeVariable.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuteredgeData.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuteredgeData.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1349 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated outeredge centered patch data type 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuteredgeData_C
+#define included_pdat_OuteredgeData_C
+
+#include "SAMRAI/pdat/OuteredgeData.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/pdat/EdgeGeometry.h"
+#include "SAMRAI/pdat/EdgeOverlap.h"
+#include "SAMRAI/pdat/OuteredgeGeometry.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <string>
+
+#define PDAT_OUTEREDGEDATA_VERSION 1
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/OuteredgeData.I"
+#endif
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor and destructor for outeredge data objects.  The           *
+ * constructor simply initializes data variables and sets up the         *
+ * array data.                                                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+OuteredgeData<TYPE>::OuteredgeData(
+   const hier::Box& box,
+   int depth):
+   hier::PatchData(box, hier::IntVector::getZero(box.getDim())),
+   d_depth(depth)
+{
+   TBOX_ASSERT(depth > 0);
+
+   for (int axis = 0; axis < getDim().getValue(); ++axis) {
+
+      for (int face_normal = 0; face_normal < getDim().getValue(); ++face_normal) {
+
+         if (face_normal != axis) {
+
+            for (int side = 0; side < 2; ++side) {
+
+               hier::Box oedge_data_box =
+                  OuteredgeGeometry::toOuteredgeBox(this->getGhostBox(),
+                     axis,
+                     face_normal,
+                     side);
+
+               if (!oedge_data_box.empty()) {
+                  d_data[axis][face_normal][side].
+                  initializeArray(oedge_data_box, depth);
+               } else {
+                  d_data[axis][face_normal][side].
+                  invalidateArray(getDim());
+               }
+
+            }   // iterate over lower/upper sides
+
+         }   // data is undefined when axis == face_normal
+
+      }  // iterate over face normal directions
+
+   }  // iterate over axis directions
+
+}
+
+template<class TYPE>
+OuteredgeData<TYPE>::~OuteredgeData()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The following are private and cannot be used, but they are defined    *
+ * here for compilers that require that every template declaration have  *
+ * a definition (a stupid requirement, if you ask me).                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+OuteredgeData<TYPE>::OuteredgeData(
+   const OuteredgeData<TYPE>& foo):
+   hier::PatchData(foo.getBox(), foo.getGhostCellWidth())
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void OuteredgeData<TYPE>::operator = (
+   const OuteredgeData<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Perform a fast copy between an outeredge patch data type (source) and *
+ * a edge patch data type (destination) where the index spaces overlap.  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuteredgeData<TYPE>::copy(
+   const hier::PatchData& src)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   const EdgeData<TYPE> * const t_edge_src =
+      dynamic_cast<const EdgeData<TYPE> *>(&src);
+   const OuteredgeData<TYPE> * const t_oedge_src =
+      dynamic_cast<const OuteredgeData<TYPE> *>(&src);
+
+   if (t_edge_src != NULL) {
+      copyFromEdge(*t_edge_src);
+   } else if (t_oedge_src != NULL) {
+      copyFromOuteredge(*t_oedge_src);
+   } else {
+      TBOX_ERROR("OuteredgeData<getDim()>::copy error!\n"
+         << "Can copy only from EdgeData<TYPE> or "
+         << "OuteredgeData<TYPE> of the same "
+         << "getDim() and TYPE.");
+   }
+
+}
+
+template<class TYPE>
+void OuteredgeData<TYPE>::copy2(
+   hier::PatchData& dst) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   EdgeData<TYPE>* t_edge_dst =
+      dynamic_cast<EdgeData<TYPE> *>(&dst);
+   OuteredgeData<TYPE>* t_oedge_dst =
+      dynamic_cast<OuteredgeData<TYPE> *>(&dst);
+
+   if (t_edge_dst != NULL) {
+      copyToEdge(*t_edge_dst);
+   } else if (t_oedge_dst != NULL) {
+      copyToOuteredge(*t_oedge_dst);
+   } else {
+      TBOX_ERROR("OuteredgeData<getDim()>::copy2 error!\n"
+         << "Can copy only to EdgeData<TYPE> or "
+         << "OuteredgeData<TYPE> of the same "
+         << "getDim() and TYPE.");
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Copy data from the source into the destination according to the       *
+ * overlap descriptor.                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuteredgeData<TYPE>::copy(
+   const hier::PatchData& src,
+   const hier::BoxOverlap& overlap)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   const EdgeOverlap* t_overlap =
+      dynamic_cast<const EdgeOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const EdgeData<TYPE>* t_edge_src =
+      dynamic_cast<const EdgeData<TYPE> *>(&src);
+   const OuteredgeData<TYPE>* t_oedge_src =
+      dynamic_cast<const OuteredgeData<TYPE> *>(&src);
+
+   if (t_edge_src != NULL) {
+      copyFromEdge(*t_edge_src, *t_overlap);
+   } else if (t_oedge_src != NULL) {
+      copyFromOuteredge(*t_oedge_src, *t_overlap);
+   } else {
+      TBOX_ERROR("OuternodeData<getDim()>::copy error!\n"
+         << "Can copy only from EdgeData<TYPE> or "
+         << "OuteredgeData<TYPE> of the same "
+         << "getDim() and TYPE.");
+   }
+
+}
+
+template<class TYPE>
+void OuteredgeData<TYPE>::copy2(
+   hier::PatchData& dst,
+   const hier::BoxOverlap& overlap) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   const EdgeOverlap* t_overlap =
+      dynamic_cast<const EdgeOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   EdgeData<TYPE>* t_edge_dst =
+      dynamic_cast<EdgeData<TYPE> *>(&dst);
+   OuteredgeData<TYPE>* t_oedge_dst =
+      dynamic_cast<OuteredgeData<TYPE> *>(&dst);
+
+   if (t_edge_dst != NULL) {
+      copyToEdge(*t_edge_dst, *t_overlap);
+   } else if (t_oedge_dst != NULL) {
+      copyToOuteredge(*t_oedge_dst, *t_overlap);
+   } else {
+      TBOX_ERROR("OuternodeData<getDim()>::copy2 error!\n"
+         << "Can copy only to EdgeData<TYPE> or "
+         << "OuteredgeData<TYPE> of the same "
+         << "getDim() and TYPE.");
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Perform a fast copy from an edge data object to this outeredge data   *
+ * object at the specified depths, where their index spaces overlap.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuteredgeData<TYPE>::copyDepth(
+   int dst_depth,
+   const EdgeData<TYPE>& src,
+   int src_depth)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   for (int axis = 0; axis < getDim().getValue(); ++axis) {
+
+      const ArrayData<TYPE>& src_edge_array = src.getArrayData(axis);
+
+      for (int face_normal = 0; face_normal < getDim().getValue(); ++face_normal) {
+
+         if (face_normal != axis) {
+
+            for (int side = 0; side < 2; ++side) {
+
+               ArrayData<TYPE>& dst_oedge_array =
+                  d_data[axis][face_normal][side];
+
+               /*
+                * Some d_data entries are not valid, don't try to copy
+                * them.
+                */
+               if (dst_oedge_array.getDim().isValid()) {
+                  dst_oedge_array.copyDepth(dst_depth,
+                     src_edge_array,
+                     src_depth,
+                     dst_oedge_array.getBox());
+               }
+
+            }  // iterate over lower/upper sides
+
+         }  // data is undefined when axis == face_normal
+
+      }  // iterate over face normal directions
+
+   }  // iterate over axis directions
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Perform a fast copy to an edge data object from this outeredge data   *
+ * object at the specified depths, where their index spaces overlap.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuteredgeData<TYPE>::copyDepth2(
+   int dst_depth,
+   EdgeData<TYPE>& dst,
+   int src_depth) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   for (int axis = 0; axis < getDim().getValue(); ++axis) {
+
+      ArrayData<TYPE>& dst_edge_array = dst.getArrayData(axis);
+
+      for (int face_normal = 0; face_normal < getDim().getValue(); ++face_normal) {
+
+         if (face_normal != axis) {
+
+            for (int side = 0; side < 2; ++side) {
+
+               const ArrayData<TYPE>& src_oedge_array =
+                  d_data[axis][face_normal][side];
+
+               dst_edge_array.copyDepth(dst_depth,
+                  src_oedge_array,
+                  src_depth,
+                  src_oedge_array.getBox());
+
+            }  // iterate over lower/upper sides
+
+         }  // data is undefined when axis == face_normal
+
+      }  // iterate over face normal directions
+
+   }  // iterate over axis directions
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Add source data to the destination according to overlap descriptor.   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuteredgeData<TYPE>::sum(
+   const hier::PatchData& src,
+   const hier::BoxOverlap& overlap)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   const EdgeOverlap* t_overlap =
+      dynamic_cast<const EdgeOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const OuteredgeData<TYPE>* t_oedge_src =
+      dynamic_cast<const OuteredgeData<TYPE> *>(&src);
+
+   // NOTE:  We assume this operation is only needed to
+   //        copy and add data to another outeredge data
+   //        object.  If we ever need to provide this for edge
+   //        data or other flavors of the copy operation, we
+   //        should refactor the routine similar to the way
+   //        the regular copy operations are implemented.
+   if (t_oedge_src == NULL) {
+      TBOX_ERROR("OuteredgeData<getDim()>::sum error!\n"
+         << "Can copy and add only from OuteredgeData<TYPE> "
+         << "of the same getDim() and TYPE.");
+   } else {
+
+      const hier::IntVector& src_offset = t_overlap->getSourceOffset();
+
+      for (int axis = 0; axis < getDim().getValue(); ++axis) {
+
+         const hier::BoxList& box_list =
+            t_overlap->getDestinationBoxList(axis);
+
+         for (int src_face_normal = 0;
+              src_face_normal < getDim().getValue();
+              ++src_face_normal) {
+
+            if (src_face_normal != axis) {
+
+               for (int src_side = 0; src_side < 2; ++src_side) {
+
+                  if (t_oedge_src->d_data[axis][src_face_normal][src_side].
+                      isInitialized()) {
+
+                     const ArrayData<TYPE>& src_array =
+                        t_oedge_src->d_data[axis][src_face_normal][src_side];
+
+                     for (int dst_face_normal = 0;
+                          dst_face_normal < getDim().getValue(); ++dst_face_normal) {
+
+                        if (dst_face_normal != axis) {
+
+                           for (int dst_side = 0; dst_side < 2; ++dst_side) {
+
+                              if (d_data[axis][dst_face_normal][dst_side].
+                                  isInitialized()) {
+
+                                 d_data[axis][dst_face_normal][dst_side].
+                                 sum(src_array,
+                                    box_list,
+                                    src_offset);
+
+                              }  // if dst data array is initialized
+
+                           }  // iterate over dst lower/upper sides
+
+                        }  // dst data is undefined when axis == face_normal
+
+                     }  // iterate over dst face normal directions
+
+                  }  // if src data array is initialized
+
+               }  // iterate over src lower/upper sides
+
+            }  // src data is undefined when axis == face_normal
+
+         }  // iterate over src face normal directions
+
+      }  // iterate over axis directions
+
+   } // else t_oedge_src != NULL
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Calculate the buffer space needed to pack/unpack messages on the box  *
+ * region using the overlap descriptor.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+bool OuteredgeData<TYPE>::canEstimateStreamSizeFromBox() const
+{
+   return ArrayData<TYPE>::canEstimateStreamSizeFromBox();
+}
+
+template<class TYPE>
+int OuteredgeData<TYPE>::getDataStreamSize(
+   const hier::BoxOverlap& overlap) const
+{
+   const EdgeOverlap* t_overlap =
+      dynamic_cast<const EdgeOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   int size = 0;
+
+   const hier::IntVector& src_offset = t_overlap->getSourceOffset();
+
+   for (int axis = 0; axis < getDim().getValue(); ++axis) {
+
+      const hier::BoxList& boxlist =
+         t_overlap->getDestinationBoxList(axis);
+
+      for (int face_normal = 0; face_normal < getDim().getValue(); ++face_normal) {
+
+         if (face_normal != axis) {
+
+            for (int side = 0; side < 2; ++side) {
+
+               if (d_data[axis][face_normal][side].isInitialized()) {
+
+                  size += d_data[axis][face_normal][side].
+                     getDataStreamSize(boxlist, src_offset);
+
+               }   // if data arrays is initialized
+
+            }   // iterate over lower/upper sides
+
+         }  // data is undefined when axis == face_normal
+
+      }  // iterate over face normal directions
+
+   }  // iterate over axis directions
+
+   return size;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Pack/unpack data into/out of the message streams using the index      *
+ * space in the overlap descriptor.                                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuteredgeData<TYPE>::packStream(
+   tbox::MessageStream& stream,
+   const hier::BoxOverlap& overlap) const
+{
+   const EdgeOverlap* t_overlap =
+      dynamic_cast<const EdgeOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::IntVector& src_offset = t_overlap->getSourceOffset();
+
+   for (int axis = 0; axis < getDim().getValue(); ++axis) {
+
+      const hier::BoxList& dst_boxes =
+         t_overlap->getDestinationBoxList(axis);
+
+      for (hier::BoxList::Iterator dst_box(dst_boxes);
+           dst_box; dst_box++) {
+
+         const hier::Box src_box = hier::Box::shift(dst_box(),
+               -src_offset);
+
+         for (int face_normal = 0; face_normal < getDim().getValue(); ++face_normal) {
+
+            if (face_normal != axis) {
+
+               for (int side = 0; side < 2; ++side) {
+
+                  const hier::Box intersection =
+                     src_box * d_data[axis][face_normal][side].getBox();
+
+                  if (!intersection.empty()) {
+
+                     d_data[axis][face_normal][side].
+                     packStream(stream,
+                        hier::Box::shift(intersection,
+                           src_offset),
+                        src_offset);
+
+                  } // if intersection non-empty
+
+               }  // iterate over lower/upper sides
+
+            }  // data is undefined when axis == face_normal
+
+         }  // iterate over face normal directions
+
+      }  // iterate over overlap boxes
+
+   }  // iterate over axis directions
+
+}
+
+template<class TYPE>
+void OuteredgeData<TYPE>::unpackStream(
+   tbox::MessageStream& stream,
+   const hier::BoxOverlap& overlap)
+{
+   const EdgeOverlap* t_overlap =
+      dynamic_cast<const EdgeOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::IntVector& src_offset = t_overlap->getSourceOffset();
+
+   for (int axis = 0; axis < getDim().getValue(); ++axis) {
+
+      const hier::BoxList& dst_boxes =
+         t_overlap->getDestinationBoxList(axis);
+
+      for (hier::BoxList::Iterator dst_box(dst_boxes);
+           dst_box; dst_box++) {
+
+         for (int face_normal = 0; face_normal < getDim().getValue(); ++face_normal) {
+
+            if (face_normal != axis) {
+
+               for (int side = 0; side < 2; ++side) {
+
+                  const hier::Box intersection =
+                     dst_box() * d_data[axis][face_normal][side].getBox();
+
+                  if (!intersection.empty()) {
+
+                     d_data[axis][face_normal][side].unpackStream(stream,
+                        intersection,
+                        src_offset);
+
+                  } // if intersection non-empty
+
+               }  // iterate over lower/upper sides
+
+            }  // data is undefined when axis == face_normal
+
+         }  // iterate over face normal directions
+
+      }  // iterate over overlap boxes
+
+   }  // iterate over axis directions
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Unpack data from the message stream and add to this outeredge data    *
+ * object using the index space in the overlap descriptor.               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuteredgeData<TYPE>::unpackStreamAndSum(
+   tbox::MessageStream& stream,
+   const hier::BoxOverlap& overlap)
+{
+   const EdgeOverlap* t_overlap =
+      dynamic_cast<const EdgeOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::IntVector& src_offset = t_overlap->getSourceOffset();
+
+   for (int axis = 0; axis < getDim().getValue(); ++axis) {
+
+      const hier::BoxList& dst_boxes =
+         t_overlap->getDestinationBoxList(axis);
+
+      for (hier::BoxList::Iterator dst_box(dst_boxes);
+           dst_box; dst_box++) {
+
+         for (int face_normal = 0; face_normal < getDim().getValue(); ++face_normal) {
+
+            if (face_normal != axis) {
+
+               for (int side = 0; side < 2; ++side) {
+
+                  const hier::Box intersection =
+                     dst_box() * d_data[axis][face_normal][side].getBox();
+
+                  if (!intersection.empty()) {
+
+                     d_data[axis][face_normal][side].
+                     unpackStreamAndSum(stream,
+                        intersection,
+                        src_offset);
+
+                  } // if intersection non-empty
+
+               }  // iterate over lower/upper sides
+
+            }  // data is undefined when axis == face_normal
+
+         }  // iterate over face normal directions
+
+      }  // iterate over overlap boxes
+
+   }  // iterate over axis directions
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Calculate the amount of memory space needed to represent the data     *
+ * for a  outeredge centered grid.                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+size_t OuteredgeData<TYPE>::getSizeOfData(
+   const hier::Box& box,
+   int depth)
+{
+   TBOX_ASSERT(depth > 0);
+
+   size_t size = 0;
+
+   for (int axis = 0; axis < box.getDim().getValue(); ++axis) {
+
+      for (int face_normal = 0; face_normal < box.getDim().getValue(); ++face_normal) {
+
+         if (face_normal != axis) {
+
+            for (int side = 0; side < 2; ++side) {
+
+               hier::Box oedge_data_box =
+                  OuteredgeGeometry::toOuteredgeBox(box,
+                     axis,
+                     face_normal,
+                     side);
+
+               size +=
+                  ArrayData<TYPE>::getSizeOfData(oedge_data_box, depth);
+
+            }   // iterate over lower/upper sides
+
+         }   // data is undefined when axis == face_normal
+
+      }  // iterate over face normal directions
+
+   }  // iterate over axis directions
+
+   return size;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute the box of valid edge indices given values of                 *
+ * dimension and side designating the set of data indices.               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+hier::Box
+OuteredgeData<TYPE>::getDataBox(
+   int axis,
+   int face_normal,
+   int side)
+{
+   return OuteredgeGeometry::toOuteredgeBox(this->getGhostBox(),
+      axis,
+      face_normal,
+      side)
+   ;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Fill the outeredge centered box with the given value.                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuteredgeData<TYPE>::fill(
+   const TYPE& t,
+   int d)
+{
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   for (int axis = 0; axis < getDim().getValue(); ++axis) {
+
+      for (int face_normal = 0; face_normal < getDim().getValue(); ++face_normal) {
+
+         if (face_normal != axis) {
+
+            for (int side = 0; side < 2; ++side) {
+
+               if (d_data[axis][face_normal][side].isInitialized()) {
+                  d_data[axis][face_normal][side].fill(t, d);
+               }
+
+            }   // iterate over lower/upper sides
+
+         }   // data is undefined when axis == face_normal
+
+      }  // iterate over face normal directions
+
+   }  // iterate over axis directions
+
+}
+
+template<class TYPE>
+void OuteredgeData<TYPE>::fill(
+   const TYPE& t,
+   const hier::Box& box,
+   int d)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   for (int axis = 0; axis < getDim().getValue(); ++axis) {
+
+      hier::Box databox = EdgeGeometry::toEdgeBox(box, axis);
+
+      for (int face_normal = 0; face_normal < getDim().getValue(); ++face_normal) {
+
+         if (face_normal != axis) {
+
+            for (int side = 0; side < 2; ++side) {
+
+               if (d_data[axis][face_normal][side].isInitialized()) {
+                  d_data[axis][face_normal][side].fill(t, databox, d);
+               }
+
+            }   // iterate over lower/upper sides
+
+         }   // data is undefined when axis == face_normal
+
+      }  // iterate over face normal directions
+
+   }  // iterate over axis directions
+
+}
+
+template<class TYPE>
+void OuteredgeData<TYPE>::fillAll(
+   const TYPE& t)
+{
+
+   for (int axis = 0; axis < getDim().getValue(); ++axis) {
+
+      for (int face_normal = 0; face_normal < getDim().getValue(); ++face_normal) {
+
+         if (face_normal != axis) {
+
+            for (int side = 0; side < 2; ++side) {
+
+               if (d_data[axis][face_normal][side].isInitialized()) {
+                  d_data[axis][face_normal][side].fillAll(t);
+               }
+
+            }   // iterate over lower/upper sides
+
+         }   // data is undefined when axis == face_normal
+
+      }  // iterate over face normal directions
+
+   }  // iterate over axis directions
+
+}
+
+template<class TYPE>
+void OuteredgeData<TYPE>::fillAll(
+   const TYPE& t,
+   const hier::Box& box)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   for (int axis = 0; axis < getDim().getValue(); ++axis) {
+
+      hier::Box databox = EdgeGeometry::toEdgeBox(box, axis);
+
+      for (int face_normal = 0; face_normal < getDim().getValue(); ++face_normal) {
+
+         if (face_normal != axis) {
+
+            for (int side = 0; side < 2; ++side) {
+
+               if (d_data[axis][face_normal][side].isInitialized()) {
+                  d_data[axis][face_normal][side].fillAll(t, databox);
+               }
+
+            }   // iterate over lower/upper sides
+
+         }   // data is undefined when axis == face_normal
+
+      }  // iterate over face normal directions
+
+   }  // iterate over axis directions
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Perform a fast copy between an outeredge patch data type (source) and *
+ * a edge patch data type (destination) where the index spaces overlap.  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuteredgeData<TYPE>::copyFromEdge(
+   const EdgeData<TYPE>& src)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   for (int axis = 0; axis < getDim().getValue(); ++axis) {
+
+      const ArrayData<TYPE>& src_edge_array = src.getArrayData(axis);
+
+      for (int face_normal = 0; face_normal < getDim().getValue(); ++face_normal) {
+
+         if (face_normal != axis) {
+
+            for (int side = 0; side < 2; ++side) {
+
+               ArrayData<TYPE>& dst_oedge_array =
+                  d_data[axis][face_normal][side];
+
+               dst_oedge_array.copy(src_edge_array,
+                  dst_oedge_array.getBox());
+
+            }  // iterate over lower/upper sides
+
+         }  // data is undefined when axis == face_normal
+
+      }  // iterate over face normal directions
+
+   }  // iterate over axis directions
+
+}
+
+template<class TYPE>
+void OuteredgeData<TYPE>::copyToEdge(
+   EdgeData<TYPE>& dst) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   for (int axis = 0; axis < getDim().getValue(); ++axis) {
+
+      ArrayData<TYPE>& dst_edge_array = dst.getArrayData(axis);
+
+      for (int face_normal = 0; face_normal < getDim().getValue(); ++face_normal) {
+
+         if (face_normal != axis) {
+
+            for (int side = 0; side < 2; ++side) {
+
+               const ArrayData<TYPE>& src_oedge_array =
+                  d_data[axis][face_normal][side];
+
+               dst_edge_array.copy(src_oedge_array,
+                  src_oedge_array.getBox());
+
+            }  // iterate over lower/upper sides
+
+         }  // data is undefined when axis == face_normal
+
+      }  // iterate over face normal directions
+
+   }   // iterate over axis directions
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Copy data from the source into the destination according to the       *
+ * overlap descriptor.                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuteredgeData<TYPE>::copyFromEdge(
+   const EdgeData<TYPE>& src,
+   const EdgeOverlap& overlap)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   const hier::IntVector& src_offset = overlap.getSourceOffset();
+
+   for (int axis = 0; axis < getDim().getValue(); ++axis) {
+
+      const hier::BoxList& box_list = overlap.getDestinationBoxList(axis);
+      const ArrayData<TYPE>& src_edge_array = src.getArrayData(axis);
+
+      for (int face_normal = 0; face_normal < getDim().getValue(); ++face_normal) {
+
+         if (face_normal != axis) {
+
+            for (int side = 0; side < 2; ++side) {
+
+               ArrayData<TYPE>& dst_oedge_array =
+                  d_data[axis][face_normal][side];
+
+               dst_oedge_array.copy(src_edge_array,
+                  box_list,
+                  src_offset);
+
+            }  // iterate over lower/upper sides
+
+         }  // data is undefined when axis == face_normal
+
+      }  // iterate over face normal directions
+
+   }  // iterate over axis directions
+
+}
+
+template<class TYPE>
+void OuteredgeData<TYPE>::copyToEdge(
+   EdgeData<TYPE>& dst,
+   const EdgeOverlap& overlap) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   const hier::IntVector& src_offset = overlap.getSourceOffset();
+
+   for (int axis = 0; axis < getDim().getValue(); ++axis) {
+
+      const hier::BoxList& box_list = overlap.getDestinationBoxList(axis);
+      ArrayData<TYPE>& dst_edge_array = dst.getArrayData(axis);
+
+      for (int face_normal = 0; face_normal < getDim().getValue(); ++face_normal) {
+
+         if (face_normal != axis) {
+
+            for (int side = 0; side < 2; ++side) {
+
+               const ArrayData<TYPE>& src_oedge_array =
+                  d_data[axis][face_normal][side];
+
+               dst_edge_array.copy(src_oedge_array,
+                  box_list,
+                  src_offset);
+
+            }  // iterate over lower/upper sides
+
+         }  // data is undefined when axis == face_normal
+
+      }  // iterate over face normal directions
+
+   }   // iterate over axis directions
+
+}
+
+template<class TYPE>
+void OuteredgeData<TYPE>::copyFromOuteredge(
+   const OuteredgeData<TYPE>& src)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   for (int axis = 0; axis < getDim().getValue(); ++axis) {
+
+      for (int src_face_normal = 0;
+           src_face_normal < getDim().getValue();
+           ++src_face_normal) {
+
+         if (src_face_normal != axis) {
+
+            for (int src_side = 0; src_side < 2; ++src_side) {
+
+               const ArrayData<TYPE>& src_oedge_array =
+                  src.d_data[axis][src_face_normal][src_side];
+
+               for (int dst_face_normal = 0;
+                    dst_face_normal < getDim().getValue();
+                    ++dst_face_normal) {
+
+                  if (dst_face_normal != axis) {
+
+                     for (int dst_side = 0; dst_side < 2; ++dst_side) {
+
+                        ArrayData<TYPE>& dst_oedge_array =
+                           d_data[axis][dst_face_normal][dst_side];
+
+                        dst_oedge_array.copy(src_oedge_array,
+                           dst_oedge_array.getBox());
+
+                     }  // iterate over dst lower/upper sides
+
+                  }  // dst data is undefined when axis == face_normal
+
+               }  // iterate over dst face normal directions
+
+            }  // iterate over src lower/upper sides
+
+         }  // src data is undefined when axis == face_normal
+
+      }  // iterate over src face normal directions
+
+   }  // iterate over axis directions
+
+}
+
+template<class TYPE>
+void OuteredgeData<TYPE>::copyFromOuteredge(
+   const OuteredgeData<TYPE>& src,
+   const EdgeOverlap& overlap)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   const hier::IntVector& src_offset = overlap.getSourceOffset();
+
+   for (int axis = 0; axis < getDim().getValue(); ++axis) {
+
+      const hier::BoxList& box_list =
+         overlap.getDestinationBoxList(axis);
+
+      for (int src_face_normal = 0;
+           src_face_normal < getDim().getValue();
+           ++src_face_normal) {
+
+         if (src_face_normal != axis) {
+
+            for (int src_side = 0; src_side < 2; ++src_side) {
+
+               const ArrayData<TYPE>& src_oedge_array =
+                  src.d_data[axis][src_face_normal][src_side];
+
+               for (int dst_face_normal = 0;
+                    dst_face_normal < getDim().getValue();
+                    ++dst_face_normal) {
+
+                  if (dst_face_normal != axis) {
+
+                     for (int dst_side = 0; dst_side < 2; ++dst_side) {
+
+                        ArrayData<TYPE>& dst_oedge_array =
+                           d_data[axis][dst_face_normal][dst_side];
+
+                        dst_oedge_array.copy(src_oedge_array,
+                           box_list,
+                           src_offset);
+
+                     }  // iterate over dst lower/upper sides
+
+                  }  // dst data is undefined when axis == face_normal
+
+               }  // iterate over dst face normal directions
+
+            }  // iterate over src lower/upper sides
+
+         }  // src data is undefined when axis == face_normal
+
+      }  // iterate over src face normal directions
+
+   }  // iterate over axis directions
+
+}
+
+template<class TYPE>
+void OuteredgeData<TYPE>::copyToOuteredge(
+   OuteredgeData<TYPE>& dst) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   dst.copyFromOuteredge(*this);
+}
+
+template<class TYPE>
+void OuteredgeData<TYPE>::copyToOuteredge(
+   OuteredgeData<TYPE>& dst,
+   const EdgeOverlap& overlap) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   dst.copyFromOuteredge(*this, overlap);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print routines for outeredge centered arrays.                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuteredgeData<TYPE>::print(
+   const hier::Box& box,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   for (int d = 0; d < d_depth; d++) {
+      print(box, d, os, prec);
+   }
+}
+
+template<class TYPE>
+void OuteredgeData<TYPE>::print(
+   const hier::Box& box,
+   int depth,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   for (int axis = 0; axis < getDim().getValue(); ++axis) {
+
+      for (int face_normal = 0; face_normal < getDim().getValue(); ++face_normal) {
+
+         os << "Array axis, face normal = "
+            << axis << "," << face_normal << std::endl;
+
+         for (int side = 0; side < 2; ++side) {
+
+            os << "side  = "
+               << ((side == 0) ? "lower" : "upper") << std::endl;
+
+            printAxisSide(axis, face_normal, side,
+               box, depth, os, prec);
+
+         }  // iterate over lower/upper sides
+
+      }  // iterate over face normal directions
+
+   }  // iterate over axis directions
+
+}
+
+template<class TYPE>
+void OuteredgeData<TYPE>::printAxisSide(
+   int axis,
+   int face_normal,
+   int side,
+   const hier::Box& box,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   TBOX_ASSERT((axis >= 0) && (axis < getDim().getValue()));
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+
+   for (int d = 0; d < d_depth; d++) {
+      os << "Array depth = " << d << std::endl;
+      printAxisSide(axis, face_normal, side,
+         box, d, os, prec);
+   }
+
+}
+
+template<class TYPE>
+void OuteredgeData<TYPE>::printAxisSide(
+   int axis,
+   int face_normal,
+   int side,
+   const hier::Box& box,
+   int depth,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+   TBOX_ASSERT((axis >= 0) && (axis < getDim().getValue()));
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+
+   NULL_USE(prec);
+
+   if (axis == face_normal) {
+
+      os << "array data undefined" << std::endl;
+
+   } else {
+
+      const hier::Box edgebox = EdgeGeometry::toEdgeBox(box, axis);
+      const hier::Box region =
+         edgebox * d_data[axis][face_normal][side].getBox();
+      for (hier::Box::Iterator ii(region); ii; ii++) {
+         os << "array" << ii() << " = "
+         << d_data[axis][face_normal][side](ii(), depth) << std::endl;
+         os << std::flush;
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Checks that class version and restart file version are equal.         *
+ * If so, reads in d_depth from the database.                            *
+ * Then has each item in d_data read in its data from the database.      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuteredgeData<TYPE>::getSpecializedFromDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   int ver = database->getInteger("PDAT_OUTEREDGEDATA_VERSION");
+   if (ver != PDAT_OUTEREDGEDATA_VERSION) {
+      TBOX_ERROR(
+         "OuteredgeData<getDim()>::getSpecializedFromDatabase error...\n"
+         << " : Restart file version different than class version" << std::endl);
+   }
+
+   d_depth = database->getInteger("d_depth");
+
+   tbox::Pointer<tbox::Database> array_database;
+
+   for (int axis = 0; axis < getDim().getValue(); ++axis) {
+
+      for (int face_normal = 0; face_normal < getDim().getValue(); ++face_normal) {
+
+         if (face_normal != axis) {
+
+            for (int side = 0; side < 2; ++side) {
+               std::string array_name = "d_data" + tbox::Utilities::intToString(
+                     axis)
+                  + "_" + tbox::Utilities::intToString(face_normal) + "_"
+                  + tbox::Utilities::intToString(side);
+               array_database = database->getDatabase(array_name);
+               (d_data[axis][face_normal][side]).getFromDatabase(array_database);
+
+            }  // iterate over lower/upper sides
+
+         }  // data is undefined when axis == face_normal
+
+      }  // iterate over face normal directions
+
+   }  // iterate over axis directions
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Writes out class version number, d_depth to the database.             *
+ * Then has each item in d_data write out its data to the database.      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuteredgeData<TYPE>::putSpecializedToDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   database->putInteger("PDAT_OUTEREDGEDATA_VERSION",
+      PDAT_OUTEREDGEDATA_VERSION);
+
+   database->putInteger("d_depth", d_depth);
+
+   tbox::Pointer<tbox::Database> array_database;
+
+   for (int axis = 0; axis < getDim().getValue(); ++axis) {
+
+      for (int face_normal = 0; face_normal < getDim().getValue(); ++face_normal) {
+
+         if (face_normal != axis) {
+
+            for (int side = 0; side < 2; ++side) {
+
+               std::string array_name = "d_data" + tbox::Utilities::intToString(
+                     axis)
+                  + "_" + tbox::Utilities::intToString(face_normal) + "_"
+                  + tbox::Utilities::intToString(side);
+               array_database = database->putDatabase(array_name);
+               (d_data[axis][face_normal][side]).putToDatabase(array_database);
+
+            }  // iterate over lower/upper sides
+
+         }  // data is undefined when axis == face_normal
+
+      }  // iterate over face normal directions
+
+   }  // iterate over axis directions
+
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuteredgeData.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuteredgeData.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,164 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated outeredge centered patch data type 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int OuteredgeData<TYPE>::getDepth() const
+{
+   return d_depth;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+bool OuteredgeData<TYPE>::dataExists(
+   int axis,
+   int face_normal) const
+{
+   TBOX_ASSERT((axis >= 0) && (axis < getDim().getValue()));
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < getDim().getValue()));
+
+   return d_data[axis][face_normal][0].isInitialized();
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE * OuteredgeData<TYPE>::getPointer(
+   int axis,
+   int face_normal,
+   int side,
+   int depth)
+{
+   TBOX_ASSERT((axis >= 0) && (axis < getDim().getValue()));
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data[axis][face_normal][side].getPointer(depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE * OuteredgeData<TYPE>::getPointer(
+   int axis,
+   int face_normal,
+   int side,
+   int depth) const
+{
+   TBOX_ASSERT((axis >= 0) && (axis < getDim().getValue()));
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data[axis][face_normal][side].getPointer(depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ArrayData<TYPE>&
+OuteredgeData<TYPE>::getArrayData(
+   int axis,
+   int face_normal,
+   int side)
+{
+   TBOX_ASSERT((axis >= 0) && (axis < getDim().getValue()));
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+
+   return d_data[axis][face_normal][side];
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const ArrayData<TYPE>&
+OuteredgeData<TYPE>::getArrayData(
+   int axis,
+   int face_normal,
+   int side) const
+{
+   TBOX_ASSERT((axis >= 0) && (axis < getDim().getValue()));
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+
+   return d_data[axis][face_normal][side];
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE & OuteredgeData<TYPE>::operator () (
+   const EdgeIndex& i,
+   int depth)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, i);
+
+   const int axis = i.getAxis();
+
+   TBOX_ASSERT((axis >= 0) && (axis < getDim().getValue()));
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   for (int face_normal = 0; face_normal < getDim().getValue(); ++face_normal) {
+
+      if (face_normal != axis) {
+
+         for (int side = 0; side < 2; ++side) {
+
+            if (d_data[axis][face_normal][side].getBox().contains(i)) {
+               return d_data[axis][face_normal][side](i, depth);
+            }
+
+         }  // iterate over lower/upper sides
+
+      }  // data is undefined when axis == face_normal
+
+   }  // iterate over face normal directions
+
+   TBOX_ERROR("Attempt to access OuteredgeData value with bad index"
+      " edge index " << i << " with axis = " << axis << std::endl);
+   return d_data[0][0][0](i, depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE &OuteredgeData<TYPE>::operator () (
+   const EdgeIndex& i,
+   int depth) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, i);
+
+   const int axis = i.getAxis();
+
+   TBOX_ASSERT((axis >= 0) && (axis < getDim().getValue()));
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   for (int face_normal = 0; face_normal < getDim().getValue(); ++face_normal) {
+
+      if (face_normal != axis) {
+
+         for (int side = 0; side < 2; ++side) {
+
+            if (d_data[axis][face_normal][side].getBox().contains(i)) {
+               return d_data[axis][face_normal][side](i, depth);
+            }
+
+         }  // iterate over lower/upper sides
+
+      }  // data is undefined when axis == face_normal
+
+   }  // iterate over face normal directions
+
+   TBOX_ERROR("Attempt to access OuteredgeData value with bad index"
+      " edge index " << i << " with axis = " << axis << std::endl);
+   return d_data[0][0][0](i, depth);
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuteredgeData.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuteredgeData.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,670 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated outeredge centered patch data type 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuteredgeData
+#define included_pdat_OuteredgeData
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/pdat/EdgeIndex.h"
+#include "SAMRAI/pdat/EdgeOverlap.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * @brief Class OuteredgeData<DIM> provides an implementation for data defined
+ * at cell edges on the boundaries of AMR patches.  It is derived from the
+ * hier::PatchData interface common to all SAMRAI patch data types.  Given
+ * a CELL-centered AMR index space box, an outeredge data object represents
+ * data of some template TYPE and depth on the cell edges on the boundary
+ * of the box.  Here, depth indicates the number of data values at each edge
+ * index location.  The OuteredgedgeGeometry class provides the translation
+ * between the standard SAMRAI cell-centered AMR index space and
+ * outeredge-centered data.
+ *
+ * Outeredge data is stored in 2*DIM*(DIM-2) arrays, each of which contains data
+ * associated with edge indices in a coordinate axis direction, an outward
+ * pointing face normal direction, and an upper or lower box face in the
+ * face normal direction.  The data layout in the outernode data arrays matches
+ * the corresponding array sections provided by the node data implementation.
+ * Note that outeredge data is NOT defined when the axis and face normal are equal.
+ * This is consistent with the edge data representation.  Where an edge index falls
+ * on more than one box face (patch boundary edges and corners), the outeredge
+ * data value belongs to only one data array so that there are no redundant data
+ * values. Specifically, when DIM > 2, outeredge data boxes are "trimmed" for each
+ * axis edge direction so that each edge index that lives on more than one
+ * face on the box boundary will be associated with the largest face normal
+ * direction and only that face.  Within each array, data is stored in
+ * (i,...,k,d) order, where i,...,k indicates a spatial index and the
+ * d indicates the component depth at that location.  Memory allocation is
+ * in column-major ordering (e.g., Fortran style) so that the leftmost
+ * index runs fastest in memory.
+ *
+ * To illustrate the outeredge data layout, in particular the "box trimming"
+ * that prevents redundant data values, we describe the data for a
+ * three-dimensional outeredge data object instantiated over a
+ * box [l0:u0,l1:u1,l2:u2] in the standard SAMRAI cell-centered AMR index space.
+ * Note: no boxes are trimmed when DIM < 3.
+ *
+ * \verbatim
+ *
+ *    a = edge axis (corresponds to the standard EdgeData axis)
+ *    f = face normal dir
+ *    s = lower/upper face
+ *    d = data depth (i.e., number of values at each edge index point).
+ *
+ *    Here axis and face normal values 0, 1, and 2 can be thought of as X, Y, Z
+ *    respectively.
+ *
+ *        (a,f,s)
+ *    axis 0:
+ *        (0,0,[0,1])  DATA IS NOT DEFINED when a == f
+ *        (0,1,0)      [l0:u0, l1:l1,     l2+1:u2,   d]
+ *        (0,1,1)      [l0:u0, u1+1:u1+1, l2+1:u2,   d]
+ *        (0,2,0)      [l0:u0, l1:u1+1,   l2:l2,     d]
+ *        (0,2,1)      [l0:u0, l1:u1+1,   u2+1:u2+1, d]
+ *        Note: Edge indices are duplicated at the intersection of faces normal
+ *              to directions 1 and 2.
+ *              So boxes for face normal direction 1 are trimmed in direction 2
+ *              so that edge indices shared with faces in direction 2 only
+ *              appear in face normal direction 2 boxes.
+ *
+ *    axis 1:
+ *        (1,0,0)      [l0:l0,     l1:u1, l2+1:u2,   d]
+ *        (1,0,1)      [u0+1:u0+1, l1:u1, l2+1:u2,   d]
+ *        (1,1,[0,1])  DATA IS NOT DEFINED when a == f
+ *        (1,2,0)      [l0:u0+1,   l1:u1, l2:l2,     d]
+ *        (1,2,1)      [l0:u0+1,   l1:u1, u2+1:u2+1, d]
+ *        Note: Edge indices are duplicated at the intersection of faces normal
+ *              to directions 0 and 2.
+ *              So boxes for face normal direction 0 are trimmed in direction 2
+ *              so that edge indices shared with faces in direction 2 only
+ *              appear in face normal direction 2 boxes.
+ *
+ *    axis 2:
+ *        (2,0,0)      [l0:l0,     l1+1:u1,   l2:u2, d]
+ *        (2,0,1)      [u0+1:u0+1, l1+1:u1,   l2:u2, d]
+ *        (2,1,0)      [l0:u0+1,   l1:l1,     l2:u2, d]
+ *        (2,1,1)      [l0:u0+1,   u1+1:u1+1, l2:u2, d]
+ *        (2,2,[0,1])  DATA IS NOT DEFINED when a == f
+ *        Note: Edge indices are duplicated at the intersection of faces normal
+ *              to directions 0 and 1.
+ *              So boxes for face normal direction 0 are trimmed in direction 1
+ *              so that edge indices shared with faces in direction 1 only
+ *              appear in face normal direction 1 boxes.
+ *
+ * \endverbatim
+ * Other spatial dimensions are represented similarly.
+ *
+ * The data type TYPE must define a default constructor (that takes no
+ * arguments) and also the assignment operator.
+ *
+ * @see pdat::ArrayData
+ * @see hier::PatchData
+ * @see pdat::OuteredgeDataFactory
+ * @see pdat::OuteredgeGeometry
+ * @see pdat::EdgeIterator
+ * @see pdat::EdgeIndex
+ */
+
+template<class TYPE>
+class OuteredgeData:public hier::PatchData
+{
+public:
+   /*!
+    * @brief Calculate the amount of memory needed to represent outeredge-
+    * centered data over a CELL-centered AMR index space box.
+    *
+    * This function assumes that the amount of
+    * memory needed for TYPE is sizeof(TYPE).
+    * If this is not the case, then a specialized function must be defined.
+    *
+    * @param box const Box reference describing the interior of the
+    *            standard CELL-centered index box over which the
+    *            outeredge data object will be created.
+    *            Note: the ghost cell width is assumed to be zero.
+    * @param depth gives the number of data values for each
+    *              spatial location in the array.
+    */
+   static size_t
+   getSizeOfData(
+      const hier::Box& box,
+      int depth);
+
+   /*!
+    * @brief Constructor for an outeredge data object.
+    *
+    * Note: Outeredge data always has ghost cell width of zero.
+    *
+    * @param box const Box reference describing the interior of the
+    *            standard CELL-centered index box over which the
+    *            outeredge data object will be created.
+    * @param depth gives the number of data values for each
+    *              spatial location in the array.
+    */
+   explicit OuteredgeData(
+      const hier::Box& box,
+      int depth);
+
+   /*!
+    * @brief Virtual destructor for a outeredge data object.
+    */
+   virtual ~OuteredgeData<TYPE>();
+
+   /*!
+    * @brief Return the depth (i.e., the number of data values for
+    * each spatial location) of the array.
+    */
+   int
+   getDepth() const;
+
+   /*!
+    * @brief Returns true if outeredge data exists for the given
+    * axis and face normal direction; false otherwise.
+    *
+    * @param axis  integer edge data coordinate axis,
+    *              must satisfy 0 <= axis < DIM
+    * @param face_normal  integer face normal direction for data,
+    *              must satisfy 0 <= face_normal < DIM
+    */
+   bool
+   dataExists(
+      int axis,
+      int face_normal) const;
+
+   /*!
+    * @brief Return the box of valid edge indices for
+    *        outeredge data.  Note: the returned box
+    *        will reside in the @em edge index space.
+    *
+    * @param axis  integer edge data coordinate axis,
+    *              must satisfy 0 <= axis < DIM
+    * @param face_normal  integer face normal direction for data,
+    *              must satisfy 0 <= face_normal < DIM
+    * @param side integer lower (0) or upper (1) side of outeredge
+    *             data array
+    */
+   hier::Box
+   getDataBox(
+      int axis,
+      int face_normal,
+      int side);
+
+   /*!
+    * @brief Get a pointer to the beginning of a particular axis,
+    * face normal, side, and depth component of the outeredge centered
+    * array.
+    *
+    * @param axis  integer edge data coordinate axis,
+    *              must satisfy 0 <= axis < DIM
+    * @param face_normal  integer face normal direction for data,
+    *              must satisfy 0 <= face_normal < DIM
+    * @param side integer lower (0) or upper (1) side of outeredge
+    *             data array
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    */
+   TYPE *
+   getPointer(
+      int axis,
+      int face_normal,
+      int side,
+      int depth = 0);
+
+   /*!
+    * @brief Get a const pointer to the beginning of a particular axis,
+    * face normal, side, and depth component of the outeredge centered
+    * array.
+    *
+    * @param axis  integer edge data coordinate axis,
+    *              must satisfy 0 <= axis < DIM
+    * @param face_normal  integer face normal direction for data,
+    *              must satisfy 0 <= face_normal < DIM
+    * @param side integer lower (0) or upper (1) side of outeredge
+    *             data array
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    */
+   const TYPE *
+   getPointer(
+      int axis,
+      int face_normal,
+      int side,
+      int depth = 0) const;
+
+   /*!
+    * @brief Return a reference to data entry corresponding
+    * to a given edge index and depth.
+    *
+    * @param i const reference to EdgeIndex, @em MUST be
+    *          an index on the outeredge of the box.
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    */
+   TYPE&
+   operator () (
+      const EdgeIndex& i,
+      int depth = 0);
+
+   /*!
+    * @brief Return a const reference to data entry corresponding
+    * to a given edge index and depth.
+    *
+    * @param i const reference to EdgeIndex, @em MUST be
+    *          an index on the outeredge of the box.
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    */
+   const TYPE&
+   operator () (
+      const EdgeIndex& i,
+      int depth = 0) const;
+
+   /*!
+    * @brief Return a reference to the array data object for
+    * given axis, face normal, and side index of the outeredge
+    * centered array.
+    *
+    * @param axis  integer edge data coordinate axis,
+    *              must satisfy 0 <= axis < DIM
+    * @param face_normal  integer face normal direction for data,
+    *              must satisfy 0 <= face_normal < DIM
+    * @param side integer lower (0) or upper (1) side of outeredge
+    *             data array
+    */
+   ArrayData<TYPE>&
+   getArrayData(
+      int axis,
+      int face_normal,
+      int side);
+
+   /*!
+    * @brief Return a const reference to the array data object for
+    * given axis, face normal, and side index of the outeredge
+    * centered array.
+    *
+    * @param axis  integer edge data coordinate axis,
+    *              must satisfy 0 <= axis < DIM
+    * @param face_normal  integer face normal direction for data,
+    *              must satisfy 0 <= face_normal < DIM
+    * @param side integer lower (0) or upper (1) side of outeredge
+    *             data array
+    */
+   const ArrayData<TYPE>&
+   getArrayData(
+      int axis,
+      int face_normal,
+      int side) const;
+
+   /*!
+    * @brief A fast copy from source to destination (i.e., this)
+    * patch data object.
+    *
+    * Data is copied where there is overlap in the underlying index space.
+    * The copy is performed on the interior plus the ghost cell width (for
+    * both the source and destination).  Currently, source data must be
+    * either EdgeData or OuteredgeData of the same DIM and TYPE.  If not,
+    * then an unrecoverable error results.
+    */
+   virtual void
+   copy(
+      const hier::PatchData& src);
+
+   /*!
+    * @brief A fast copy from source (i.e., this) to destination
+    * patch data object.
+    *
+    * Data is copied where there is overlap in the underlying index space.
+    * The copy is performed on the interior plus the ghost cell width (for
+    * both the source and destination).  Currently, destination data must be
+    * either EdgeData or OuteredgeData of the same DIM and TYPE.  If not,
+    * then an unrecoverable error results.
+    */
+   virtual void
+   copy2(
+      hier::PatchData& dst) const;
+
+   /*!
+    * @brief Copy data from source to destination (i.e., this)
+    * patch data object on the given overlap.
+    *
+    * Currently, source data must be either EdgeData or OuteredgeData
+    * of the same DIM and TYPE and the overlap must be an EdgeOverlap
+    * of the same DIM.  If not, then an unrecoverable error
+    * results.
+    */
+   virtual void
+   copy(
+      const hier::PatchData& src,
+      const hier::BoxOverlap& overlap);
+
+   /*!
+    * @brief Copy data from source (i.e., this) to destination
+    * patch data object on the given overlap.
+    *
+    * Currently, destination data must be either EdgeData or OuteredgeData
+    * of the same DIM and TYPE and the overlap must be an EdgeOverlap
+    * of the same DIM.  If not, then an unrecoverable error
+    * results.
+    */
+   virtual void
+   copy2(
+      hier::PatchData& dst,
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Fast copy (i.e., assumes edge and outeredge data objects are
+    * defined over the same box) from the given edge source data object to
+    * this destination outeredge data object at the specified depths.
+    */
+   void
+   copyDepth(
+      int dst_depth,
+      const EdgeData<TYPE>& src,
+      int src_depth);
+
+   /*!
+    * @brief Fast copy (i.e., assumes edge and outeredge data objects are
+    * defined over the same box) to the given edge destination data object
+    * from this source outeredge data object at the specified depths.
+    */
+   void
+   copyDepth2(
+      int dst_depth,
+      EdgeData<TYPE>& dst,
+      int src_depth) const;
+
+   /*!
+    * @brief Add data from source to destination (i.e., this)
+    * patch data object on the given overlap.
+    *
+    * Currently, source data must be OuteredgeData of the same DIM and
+    * TYPE and the overlap must be an EdgeOverlap of the same DIM.
+    * If not, then an unrecoverable error results.
+    */
+   virtual void
+   sum(
+      const hier::PatchData& src,
+      const hier::BoxOverlap& overlap);
+
+   /*!
+    * @brief Return true if the patch data object can estimate the
+    * stream size required to fit its data using only index
+    * space information (i.e., a box).
+    *
+    * This routine is defined for the standard types (bool, char,
+    * double, float, int, and dcomplex).
+    */
+   virtual bool
+   canEstimateStreamSizeFromBox() const;
+
+   /*!
+    * @brief Return the number of bytes needed to stream the data
+    * in this patch data object lying in the specified box overlap
+    * region.
+    *
+    * This routine is defined for the standard types (bool, char,
+    * double, float, int, and dcomplex).
+    */
+   virtual int
+   getDataStreamSize(
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Pack data in this patch data object lying in the specified
+    * box overlap region into the stream.  The overlap must be an
+    * EdgeOverlap of the same DIM.
+    */
+   virtual void
+   packStream(
+      tbox::MessageStream& stream,
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Unpack data from stream into this patch data object over
+    * the specified box overlap region. The overlap must be an
+    * EdgeOverlap of the same DIM.
+    */
+   virtual void
+   unpackStream(
+      tbox::MessageStream& stream,
+      const hier::BoxOverlap& overlap);
+
+   /*!
+    * @brief Unpack data from stream and add into this patch data object
+    * over the specified box overlap region.
+    */
+   virtual void
+   unpackStreamAndSum(
+      tbox::MessageStream& stream,
+      const hier::BoxOverlap& overlap);
+
+   /*!
+    * @brief Fill all values at depth d with the value t.
+    */
+   void
+   fill(
+      const TYPE& t,
+      int d = 0);
+
+   /*!
+    * @brief Fill all values at depth d within the box with the value t.
+    */
+   void
+   fill(
+      const TYPE& t,
+      const hier::Box& box,
+      int d = 0);
+
+   /*!
+    * @brief Fill all depth components with value t.
+    */
+   void
+   fillAll(
+      const TYPE& t);
+
+   /*!
+    * @brief Fill all depth components within the box with value t.
+    */
+   void
+   fillAll(
+      const TYPE& t,
+      const hier::Box& box);
+
+   /*!
+    * @brief Print all outeredge data values residing in the specified box.
+    * If the depth of the array is greater than one, all depths are printed.
+    *
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to edge index space.
+    * @param os   reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   print(
+      const hier::Box& box,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Print all outeredge data values at the given array depth in
+    * the specified box.
+    *
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to edge index space.
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    * @param os   reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   print(
+      const hier::Box& box,
+      int depth,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Print all outeredge centered data values for specified axis,
+    * face_normal, and side residing in the specified box.
+    * If the depth of the data is greater than one, all depths are printed.
+    *
+    * @param axis  integer edge data coordinate axis,
+    *              must satisfy 0 <= axis < DIM
+    * @param face_normal  integer face normal direction for data,
+    *              must satisfy 0 <= face_normal < DIM
+    * @param side integer lower (0) or upper (1) side of outeredge
+    *             data array
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to edge index space.
+    * @param os    reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   printAxisSide(
+      int axis,
+      int face_normal,
+      int side,
+      const hier::Box& box,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Print all outeredge centered data values for specified axis,
+    * face_normal, side, and depth residing in the specified box.
+    *
+    * @param axis  integer edge data coordinate axis,
+    *              must satisfy 0 <= axis < DIM
+    * @param face_normal  integer face normal direction for data,
+    *              must satisfy 0 <= face_normal < DIM
+    * @param side integer lower (0) or upper (1) side of outeredge
+    *             data array
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to edge index space.
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    * @param os    reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   printAxisSide(
+      int axis,
+      int face_normal,
+      int side,
+      const hier::Box& box,
+      int depth,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Check that class version and restart file version are equal.
+    * If so, read data members from the database.
+    *
+    * Assertions: database must be a non-null pointer.
+    */
+   virtual void
+   getSpecializedFromDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+   /*!
+    * @brief Write out the class version number and other data members to
+    * the database.
+    *
+    * Assertions: database must be a non-null pointer.
+    */
+   virtual void
+   putSpecializedToDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+private:
+   OuteredgeData<TYPE>(const OuteredgeData<TYPE>&); // not implemented
+   void
+   operator = (
+      const OuteredgeData<TYPE>&);                // not implemented
+
+   //@{
+   //! @name Internal implementations for data copy operations.
+   void
+   copyFromEdge(
+      const EdgeData<TYPE>& src);
+   void
+   copyFromEdge(
+      const EdgeData<TYPE>& src,
+      const EdgeOverlap& overlap);
+   void
+   copyToEdge(
+      EdgeData<TYPE>& dst) const;
+   void
+   copyToEdge(
+      EdgeData<TYPE>& dst,
+      const EdgeOverlap& overlap) const;
+   void
+   copyFromOuteredge(
+      const OuteredgeData<TYPE>& src);
+   void
+   copyFromOuteredge(
+      const OuteredgeData<TYPE>& src,
+      const EdgeOverlap& overlap);
+   void
+   copyToOuteredge(
+      OuteredgeData<TYPE>& dst) const;
+   void
+   copyToOuteredge(
+      OuteredgeData<TYPE>& dst,
+      const EdgeOverlap& overlap) const;
+   //@}
+
+   int d_depth;
+   ArrayData<TYPE> d_data[tbox::Dimension::MAXIMUM_DIMENSION_VALUE][tbox::Dimension::
+                                                              MAXIMUM_DIMENSION_VALUE
+   ][2];
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/OuteredgeData.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/OuteredgeData.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuteredgeDataFactory.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuteredgeDataFactory.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,172 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating outeredge data objects 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuteredgeDataFactory_C
+#define included_pdat_OuteredgeDataFactory_C
+
+#include "SAMRAI/pdat/EdgeDataFactory.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/OuteredgeData.h"
+#include "SAMRAI/pdat/OuteredgeDataFactory.h"
+#include "SAMRAI/pdat/OuteredgeGeometry.h"
+#include "SAMRAI/hier/Patch.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/OuteredgeDataFactory.I"
+#endif
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *
+ * The constructor simply caches the depth of the patch data.
+ *
+ *************************************************************************
+ */
+
+template<class TYPE>
+OuteredgeDataFactory<TYPE>::OuteredgeDataFactory(
+   const tbox::Dimension& dim,
+   int depth):
+   hier::PatchDataFactory(hier::IntVector::getZero(dim)),
+   d_depth(depth),
+   d_no_ghosts(hier::IntVector::getZero(dim))
+{
+   TBOX_ASSERT(depth > 0);
+}
+
+template<class TYPE>
+OuteredgeDataFactory<TYPE>::~OuteredgeDataFactory()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Clone the factory and copy the default parameters to the new factory. *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::PatchDataFactory>
+OuteredgeDataFactory<TYPE>::cloneFactory(
+   const hier::IntVector& ghosts)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, ghosts);
+
+   return tbox::Pointer<hier::PatchDataFactory>(new OuteredgeDataFactory<TYPE>(
+                                                   ghosts.getDim(), d_depth));
+}
+
+/*
+ *************************************************************************
+ *
+ * Allocate the concrete outeredge data classes.
+ *
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::PatchData>
+OuteredgeDataFactory<TYPE>::allocate(
+   const hier::Patch& patch) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, patch);
+
+   hier::PatchData* patchdata =
+      new OuteredgeData<TYPE>(patch.getBox(), d_depth);
+   return tbox::Pointer<hier::PatchData>(patchdata);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return the box geometry type for outeredge data objects.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::BoxGeometry>
+OuteredgeDataFactory<TYPE>::getBoxGeometry(
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   const hier::IntVector& zero_vector(hier::IntVector::getZero(getDim()));
+
+   hier::BoxGeometry* boxgeometry = new OuteredgeGeometry(box, zero_vector);
+   return tbox::Pointer<hier::BoxGeometry>(boxgeometry);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Calculate the amount of memory needed to allocate the data object.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+size_t OuteredgeDataFactory<TYPE>::getSizeOfMemory(
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   const size_t obj = tbox::MemoryUtilities::align(sizeof(OuteredgeData<TYPE>));
+   const size_t data = OuteredgeData<TYPE>::getSizeOfData(box,
+         d_depth);
+   return obj + data;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Determine whether this is a valid copy operation to/from EdgeData     *
+ * between the supplied datatype.                                        *
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+bool OuteredgeDataFactory<TYPE>::validCopyTo(
+   const tbox::Pointer<hier::PatchDataFactory>& dst_pdf) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *dst_pdf);
+
+   bool valid_copy = false;
+
+   /*
+    * Valid options are EdgeData and OuteredgeData.
+    */
+   if (!valid_copy) {
+      tbox::Pointer<EdgeDataFactory<TYPE> > edf = dst_pdf;
+      if (!edf.isNull()) {
+         valid_copy = true;
+      }
+   }
+
+   if (!valid_copy) {
+      tbox::Pointer<OuteredgeDataFactory<TYPE> > oedf = dst_pdf;
+      if (!oedf.isNull()) {
+         valid_copy = true;
+      }
+   }
+
+   return valid_copy;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuteredgeDataFactory.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuteredgeDataFactory.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,22 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating outeredge data objects 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int OuteredgeDataFactory<TYPE>::getDepth() const
+{
+   return d_depth;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuteredgeDataFactory.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuteredgeDataFactory.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,156 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating outeredge data objects 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuteredgeDataFactory
+#define included_pdat_OuteredgeDataFactory
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/PatchDataFactory.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * @brief
+ * Class OuteredgeDataFactory<DIM> is a factory class used to allocate new
+ * instances of OuteredgeData<DIM> objects.  It is a subclass of the patch
+ * data factory class and outeredge data is a subclass of patch data.  Both
+ * the factory and data classes are templated on the type of the contained
+ * object (e.g., double or int).
+ *
+ * @see pdat::OuteredgeData
+ * @see pdat::PatchDataFactory
+ */
+
+template<class TYPE>
+class OuteredgeDataFactory:public hier::PatchDataFactory
+{
+public:
+   /*!
+    * @brief
+    * The default constructor for the outeredge data factory class.
+    *
+    * The depth (number of components) gives the default for all of
+    * the outeredge data objects created with this factory.
+    */
+   explicit OuteredgeDataFactory(
+      const tbox::Dimension& dim,
+      int depth);
+
+   /*!
+    * @brief
+    * Virtual destructor for the outeredge data factory class.
+    */
+   virtual ~OuteredgeDataFactory<TYPE>();
+
+   /**
+    * @brief Abstract virtual function to clone a patch data factory.
+    *
+    * This will return a new instantiation of the abstract factory
+    * with the same properties.  The properties of the cloned factory
+    * can then be changed without modifying the original.
+    *
+    * @param ghosts default ghost cell width for concrete classes created from
+    * the factory.
+    */
+   virtual tbox::Pointer<hier::PatchDataFactory>
+   cloneFactory(
+      const hier::IntVector& ghosts);
+
+   /*!
+    * @brief
+    * Virtual factory function to allocate a concrete outeredge data object.
+    *
+    * The default information about the object (e.g., depth) is taken from
+    * the factory.
+    */
+   virtual tbox::Pointer<hier::PatchData>
+   allocate(
+      const hier::Patch& patch) const;
+
+   /*!
+    * @brief
+    * Allocate the box geometry object associated with the patch data.
+    *
+    * This information will be used in the computation of intersections
+    * and data dependencies between objects.
+    */
+   virtual tbox::Pointer<hier::BoxGeometry>
+   getBoxGeometry(
+      const hier::Box& box) const;
+
+   /*!
+    * @brief
+    * Get the depth (number of components).
+    *
+    * This is the depth that will be used in the instantiation of
+    * outeredge data objects.
+    */
+   int
+   getDepth() const;
+
+   /*!
+    * @brief
+    * Calculate the amount of memory needed to store the outeredge data
+    * object, including object data and dynamically allocated data.
+    */
+   virtual size_t
+   getSizeOfMemory(
+      const hier::Box& box) const;
+
+   /*!
+    * Return a boolean true value indicating that fine data for the outeredge quantity will
+    * take precedence on coarse-fine interfaces.  See the OuteredgeVariable<DIM> class
+    * header file for more information.
+    */
+   bool fineBoundaryRepresentsVariable() const {
+      return true;
+   }
+
+   /*!
+    * Return true since the outeredge data index space extends beyond the interior of
+    * patches.  That is, outeredge data lives on patch borders.
+    */
+   bool dataLivesOnPatchBorder() const {
+      return true;
+   }
+
+   /*!
+    * Return whether it is valid to copy this OuteredgeDataFactory to the
+    * supplied destination patch data factory.  It will return true if
+    * dst_pdf is EdgeDataFactory or OuteredgeDataFactory, false otherwise.
+    */
+   bool
+   validCopyTo(
+      const tbox::Pointer<hier::PatchDataFactory>& dst_pdf) const;
+
+private:
+   int d_depth;
+   hier::IntVector d_no_ghosts;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/OuteredgeDataFactory.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/OuteredgeDataFactory.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuteredgeGeometry.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuteredgeGeometry.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,426 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Box geometry information for outeredge centered objects 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuteredgeGeometry_C
+#define included_pdat_OuteredgeGeometry_C
+
+#include "SAMRAI/pdat/OuteredgeGeometry.h"
+
+#include "SAMRAI/pdat/EdgeGeometry.h"
+#include "SAMRAI/pdat/EdgeOverlap.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/OuteredgeGeometry.I"
+#endif
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * Create an outeredge geometry object given box and ghost cell width.	*
+ *									*
+ *************************************************************************
+ */
+
+OuteredgeGeometry::OuteredgeGeometry(
+   const hier::Box& box,
+   const hier::IntVector& ghosts):
+   d_box(box),
+   d_ghosts(ghosts)
+
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(box, ghosts);
+   TBOX_ASSERT(ghosts.min() >= 0);
+}
+
+OuteredgeGeometry::~OuteredgeGeometry()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Attempt to calculate the intersection between two edge centered box	*
+ * geometries.  The calculateOverlap() checks whether both arguments are	*
+ * edge geometries; if so, it compuates the intersection.  If not, then	*
+ * it calls calculateOverlap() on the source object (if retry is true)	*
+ * to allow the source a chance to calculate the intersection.  See the	*
+ * hier::BoxGeometry base class for more information about the protocol.	*
+ * A pointer to null is returned if the intersection cannot be computed.	*
+ *                                                                      *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap>
+OuteredgeGeometry::calculateOverlap(
+   const hier::BoxGeometry& dst_geometry,
+   const hier::BoxGeometry& src_geometry,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset,
+   const bool retry,
+   const hier::BoxList& dst_restrict_boxes) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(d_box, src_mask, src_offset);
+
+   const pdat::EdgeGeometry* t_dst_edge =
+      dynamic_cast<const pdat::EdgeGeometry *>(&dst_geometry);
+   const OuteredgeGeometry* t_dst_oedge =
+      dynamic_cast<const OuteredgeGeometry *>(&dst_geometry);
+   const OuteredgeGeometry* t_src =
+      dynamic_cast<const OuteredgeGeometry *>(&src_geometry);
+
+   tbox::Pointer<hier::BoxOverlap> over(NULL);
+
+   if ((t_src != NULL) && (t_dst_edge != NULL)) {
+      over = doOverlap(*t_dst_edge, *t_src, src_mask, overwrite_interior,
+            src_offset, dst_restrict_boxes);
+   } else if ((t_src != NULL) && (t_dst_oedge != NULL)) {
+      over = doOverlap(*t_dst_oedge, *t_src, src_mask, overwrite_interior,
+            src_offset, dst_restrict_boxes);
+   } else if (retry) {
+      over = src_geometry.calculateOverlap(dst_geometry, src_geometry,
+            src_mask, overwrite_interior,
+            src_offset, false,
+            dst_restrict_boxes);
+   }
+   return over;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Compute the overlap between an edge and an outeredge centered boxes.  *
+ * The algorithm is similar to the standard edge intersection algorithm  *
+ * except we operate only on the boundaries of the source box.           *
+ *									*
+ *************************************************************************
+ */
+tbox::Pointer<hier::BoxOverlap>
+OuteredgeGeometry::doOverlap(
+   const pdat::EdgeGeometry& dst_geometry,
+   const OuteredgeGeometry& src_geometry,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset,
+   const hier::BoxList& dst_restrict_boxes)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(src_mask, src_offset);
+
+   const tbox::Dimension& dim(src_mask.getDim());
+
+   tbox::Array<hier::BoxList> dst_boxes(dim.getValue());
+
+   // Perform a quick-and-dirty intersection to see if the boxes might overlap
+
+   const hier::Box src_box =
+      hier::Box::grow(src_geometry.d_box, src_geometry.d_ghosts) * src_mask;
+   const hier::Box src_box_shifted = hier::Box::shift(src_box, src_offset);
+   const hier::Box dst_box =
+      hier::Box::grow(dst_geometry.getBox(), dst_geometry.getGhosts());
+
+   // Compute the intersection (if any) for each of the edge directions
+
+   const hier::IntVector one_vector(dim, 1);
+
+   bool quick_boxes_intersect =
+      (hier::Box::grow(src_box_shifted, one_vector)).intersects(
+         hier::Box::grow(dst_box, one_vector));
+   if (quick_boxes_intersect) {
+
+      for (int axis = 0; axis < dim.getValue(); ++axis) {
+
+         const hier::Box dst_edge_box =
+            pdat::EdgeGeometry::toEdgeBox(dst_box, axis);
+         const hier::Box src_edge_box =
+            pdat::EdgeGeometry::toEdgeBox(src_box_shifted, axis);
+
+         bool boxes_intersect = dst_edge_box.intersects(src_edge_box);
+
+         if (boxes_intersect) {
+
+            for (int face_normal = 0; face_normal < dim.getValue(); ++face_normal) {
+
+               if (face_normal != axis) {
+
+                  for (int side = 0; side < 2; ++side) {
+                     hier::Box outeredge_src_box =
+                        toOuteredgeBox(src_box_shifted,
+                           axis,
+                           face_normal,
+                           side);
+                     dst_boxes[axis].unionBoxes(
+                        outeredge_src_box * dst_edge_box);
+                  }
+
+               }  // data is not defined when face_normal == axis
+
+            }  // iterate over face normal directions
+
+            if (!overwrite_interior) {
+               const hier::Box interior_edges =
+                  pdat::EdgeGeometry::toEdgeBox(dst_geometry.getBox(),
+                     axis);
+               dst_boxes[axis].removeIntersections(interior_edges);
+            }
+
+         }  // if source and destination edge boxes overlap in axis direction
+
+         if (dst_restrict_boxes.size() && dst_boxes[axis].size()) {
+            hier::BoxList edge_restrict_boxes;
+            for (hier::BoxList::Iterator b(dst_restrict_boxes); b; b++) {
+               edge_restrict_boxes.appendItem(EdgeGeometry::toEdgeBox(b(), axis));
+            }
+            dst_boxes[axis].intersectBoxes(edge_restrict_boxes);
+         }
+
+      }  // iterate over axis directions
+
+   }  // if quick check passes
+
+   // Create the edge overlap data object using the boxes and source shift
+   hier::BoxOverlap* overlap =
+      new pdat::EdgeOverlap(dst_boxes, src_offset);
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Compute the overlap between two outeredge centered boxes.             *
+ * The algorithm is similar to the standard edge intersection algorithm  *
+ * except we operate only on the boundaries of the source box.           *
+ *									*
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap>
+OuteredgeGeometry::doOverlap(
+   const OuteredgeGeometry& dst_geometry,
+   const OuteredgeGeometry& src_geometry,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset,
+   const hier::BoxList& dst_restrict_boxes)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(src_mask, src_offset);
+
+   const tbox::Dimension& dim(src_mask.getDim());
+
+   tbox::Array<hier::BoxList> dst_boxes(dim.getValue());
+
+   // Perform a quick-and-dirty intersection to see if the boxes might overlap
+
+   const hier::Box src_box =
+      hier::Box::grow(src_geometry.d_box, src_geometry.d_ghosts) * src_mask;
+   const hier::Box src_box_shifted = hier::Box::shift(src_box, src_offset);
+   const hier::Box dst_box =
+      hier::Box::grow(dst_geometry.getBox(), dst_geometry.getGhosts());
+
+   // Compute the intersection (if any) for each of the edge directions
+
+   const hier::IntVector one_vector(dim, 1);
+
+   bool quick_boxes_intersect =
+      (hier::Box::grow(src_box_shifted, one_vector)).intersects(
+         hier::Box::grow(dst_box, one_vector));
+   if (quick_boxes_intersect) {
+
+      for (int axis = 0; axis < dim.getValue(); ++axis) {
+
+         const hier::Box dst_edge_box =
+            pdat::EdgeGeometry::toEdgeBox(dst_box, axis);
+         const hier::Box src_edge_box =
+            pdat::EdgeGeometry::toEdgeBox(src_box_shifted, axis);
+
+         bool boxes_intersect = dst_edge_box.intersects(src_edge_box);
+
+         if (boxes_intersect) {
+
+            for (int src_face_normal = 0;
+                 src_face_normal < dim.getValue();
+                 ++src_face_normal) {
+
+               if (src_face_normal != axis) {
+
+                  hier::Box outeredge_src_box_lo = toOuteredgeBox(
+                        src_box_shifted,
+                        axis,
+                        src_face_normal,
+                        0);
+                  hier::Box outeredge_src_box_up = toOuteredgeBox(
+                        src_box_shifted,
+                        axis,
+                        src_face_normal,
+                        1);
+
+                  for (int dst_face_normal = 0;
+                       dst_face_normal < dim.getValue();
+                       ++dst_face_normal) {
+
+                     if (dst_face_normal != axis) {
+
+                        hier::Box outeredge_dst_box_lo = toOuteredgeBox(dst_box,
+                              axis,
+                              dst_face_normal,
+                              0);
+                        hier::Box outeredge_dst_box_up = toOuteredgeBox(dst_box,
+                              axis,
+                              dst_face_normal,
+                              1);
+
+                        dst_boxes[axis].unionBoxes(
+                           outeredge_src_box_lo * outeredge_dst_box_lo);
+                        dst_boxes[axis].unionBoxes(
+                           outeredge_src_box_lo * outeredge_dst_box_up);
+                        dst_boxes[axis].unionBoxes(
+                           outeredge_src_box_up * outeredge_dst_box_lo);
+                        dst_boxes[axis].unionBoxes(
+                           outeredge_src_box_up * outeredge_dst_box_up);
+
+                     }  // dst data undefined when dst_face_normal == axis
+
+                  }  // iterate over dst face normal directions
+
+               }  // src data undefined when src_face_normal == axis
+
+            }  // iterate over src face normal directions
+
+         }  // if source and destination edge boxes overlap in axis direction
+
+         if (!overwrite_interior) {
+            const hier::Box interior_edges =
+               pdat::EdgeGeometry::toEdgeBox(dst_geometry.getBox(),
+                  axis);
+            dst_boxes[axis].removeIntersections(interior_edges);
+         }
+
+         if (dst_restrict_boxes.size() && dst_boxes[axis].size()) {
+            hier::BoxList edge_restrict_boxes;
+            for (hier::BoxList::Iterator b(dst_restrict_boxes); b; b++) {
+               edge_restrict_boxes.appendItem(EdgeGeometry::toEdgeBox(b(), axis));
+            }
+            dst_boxes[axis].intersectBoxes(edge_restrict_boxes);
+         }
+
+      }  // iterate over axis directions
+
+   }  // if quick check passes
+
+   // Create the edge overlap data object using the boxes and source shift
+   hier::BoxOverlap* overlap =
+      new pdat::EdgeOverlap(dst_boxes, src_offset);
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Convert an AMR-index space hier::Box into a edge-index space box      *
+ * for an outeredge region.                                              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+hier::Box OuteredgeGeometry::toOuteredgeBox(
+   const hier::Box& box,
+   int axis,
+   int face_normal,
+   int side)
+{
+   const tbox::Dimension& dim(box.getDim());
+
+   TBOX_ASSERT(0 <= axis && axis < dim.getValue());
+   TBOX_ASSERT(0 <= face_normal && face_normal < dim.getValue());
+   TBOX_ASSERT(face_normal != axis);
+   TBOX_ASSERT(side == 0 || side == 1);
+
+   hier::Box oedge_box(dim);
+
+   /*
+    * If data is defined (i.e., face_normal != axis), then
+    *    1) Make an edge box for the given axis.
+    *    2) Trim box as needed to avoid redundant edge indices
+    *       for different face normal directions.
+    *    3) Restrict box to lower or upper face for given
+    *       face normal direction.
+    */
+
+   if ((face_normal != axis) && !box.empty()) {
+
+      oedge_box = EdgeGeometry::toEdgeBox(box, axis);
+
+      for (int d = 0; d < dim.getValue(); ++d) {
+
+         if (d != axis) {    // do not trim in axis direction
+
+            for (int dh = d + 1; dh < dim.getValue(); ++dh) { // trim in higher dimensions
+
+               if (dh != axis && dh != face_normal) {
+                  // do not trim in axis or face_normal direction
+
+                  ++oedge_box.lower(dh);
+                  --oedge_box.upper(dh);
+
+               }
+
+            }
+
+         }
+
+      }
+
+      if (side == 0) {   // lower side in face normal direction
+         oedge_box.upper(face_normal) = oedge_box.lower(face_normal);
+      } else {  // side == 1; upper side in face normal direction
+         oedge_box.lower(face_normal) = oedge_box.upper(face_normal);
+      }
+
+   }
+
+   return oedge_box;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set up a EdgeOverlap oject using the given boxes and offset           *
+ *                                                                       *
+ *************************************************************************
+ */
+tbox::Pointer<hier::BoxOverlap>
+OuteredgeGeometry::setUpOverlap(
+   const hier::BoxList& boxes,
+   const hier::IntVector& src_offset) const
+{
+   const tbox::Dimension& dim(src_offset.getDim());
+   tbox::Array<hier::BoxList> dst_boxes(dim.getValue());
+
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         hier::Box edge_box(EdgeGeometry::toEdgeBox(b(), d));
+         dst_boxes[d].appendItem(edge_box);
+      }
+   }
+
+   // Create the edge overlap data object using the boxes and source shift
+
+   hier::BoxOverlap* overlap = new EdgeOverlap(dst_boxes, src_offset);
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuteredgeGeometry.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuteredgeGeometry.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,27 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Box geometry information for outer edge centered objects 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+SAMRAI_INLINE_KEYWORD
+const hier::Box& OuteredgeGeometry::getBox() const
+{
+   return d_box;
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::IntVector& OuteredgeGeometry::getGhosts() const
+{
+   return d_ghosts;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuteredgeGeometry.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuteredgeGeometry.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,155 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Box geometry information for edge centered objects 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuteredgeGeometry
+#define included_pdat_OuteredgeGeometry
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/EdgeOverlap.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+class EdgeGeometry;
+
+/*!
+ * Class OuteredgeGeometry manages the mapping between the AMR index
+ * and the outeredge geometry index space.  It is a subclass of
+ * hier::BoxGeometry and it computes intersections between outeredge
+ * box geometries and edge or outeredge box geometries for communication
+ * operations.
+ *
+ * See header file for OuteredgeData<DIM> class for a more detailed
+ * description of the data layout.
+ *
+ * @see hier::BoxGeometry
+ * @see pdat::EdgeGeometry
+ * @see pdat::EdgeOverlap
+ */
+
+class OuteredgeGeometry:public hier::BoxGeometry
+{
+public:
+   /*!
+    * The BoxOverlap implemenation for this geometry.
+    */
+   typedef EdgeOverlap Overlap;
+
+   /*!
+    * Convert a given box in the standard cell-centered AMR index space to an
+    * outeredge geometry box for the specified axis, face normal, and
+    * lower/upper side.   See OuteredgeData header file for a detailed
+    * description of an outeredge box.
+    */
+   static hier::Box
+   toOuteredgeBox(
+      const hier::Box& box,
+      int axis,
+      int face_normal,
+      int side);
+
+   /*!
+    * @brief Construct an outeredge geometry object given an AMR index
+    * space box and ghost cell width.
+    */
+   explicit OuteredgeGeometry(
+      const hier::Box& box,
+      const hier::IntVector& ghosts);
+
+   /*!
+    * @brief The virtual destructor does nothing interesting.
+    */
+   virtual ~OuteredgeGeometry();
+
+   /*!
+    * @brief Compute the overlap in edge-centered index space on the
+    * boundaries of the source box geometry and the destination box geometry.
+    */
+   virtual tbox::Pointer<hier::BoxOverlap>
+   calculateOverlap(
+      const hier::BoxGeometry& dst_geometry,
+      const hier::BoxGeometry& src_geometry,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset,
+      const bool retry,
+      const hier::BoxList& dst_restrict_boxes = hier::BoxList()) const;
+
+   /*!
+    * @brief Set up a EdgeOverlap object based on the given boxes and the
+    * offset.
+    */
+   virtual tbox::Pointer<hier::BoxOverlap>
+   setUpOverlap(
+      const hier::BoxList& boxes,
+      const hier::IntVector& src_offset) const;
+
+   /*!
+    * @brief Return the box for this outeredge box geometry object.
+    */
+   const hier::Box&
+   getBox() const;
+
+   /*!
+    * @brief Return the ghost cell width for this outeredge box geometry object.
+    */
+   const hier::IntVector&
+   getGhosts() const;
+
+private:
+   /*!
+    * Compute overlap between a source outeredge geometry and a destination
+    * edge geometry.
+    */
+   static tbox::Pointer<hier::BoxOverlap>
+   doOverlap(
+      const pdat::EdgeGeometry& dst_geometry,
+      const OuteredgeGeometry& src_geometry,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset,
+      const hier::BoxList& dst_restrict_boxes);
+
+   /*!
+    * Compute overlap between a source outeredge geometry and a destination
+    * outeredge geometry.
+    */
+   static tbox::Pointer<hier::BoxOverlap>
+   doOverlap(
+      const OuteredgeGeometry& dst_geometry,
+      const OuteredgeGeometry& src_geometry,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset,
+      const hier::BoxList& dst_restrict_boxes);
+
+   OuteredgeGeometry(
+      const OuteredgeGeometry&);               // not implemented
+   void
+   operator = (
+      const OuteredgeGeometry&);                // not implemented
+
+   hier::Box d_box;
+   hier::IntVector d_ghosts;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/OuteredgeGeometry.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuteredgeVariable.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuteredgeVariable.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Variable class for defining outeredge centered variables 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuteredgeVariable_C
+#define included_pdat_OuteredgeVariable_C
+
+#include "SAMRAI/pdat/OuteredgeVariable.h"
+#include "SAMRAI/pdat/OuteredgeDataFactory.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor and destructor for side variable objects                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+OuteredgeVariable<TYPE>::OuteredgeVariable(
+   const tbox::Dimension& dim,
+   const std::string& name,
+   int depth):
+   hier::Variable(name,
+                  tbox::Pointer<SAMRAI::hier::PatchDataFactory>(new
+                                                                OuteredgeDataFactory
+                                                                <
+                                                                   TYPE>(dim,
+                                                                         depth)))
+{
+}
+
+template<class TYPE>
+OuteredgeVariable<TYPE>::~OuteredgeVariable()
+{
+}
+
+template<class TYPE>
+int OuteredgeVariable<TYPE>::getDepth() const
+{
+   tbox::Pointer<OuteredgeDataFactory<TYPE> > factory =
+      this->getPatchDataFactory();
+   TBOX_ASSERT(factory);
+   return factory->getDepth();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * These are private and should not be used.  They are defined here      *
+ * because some template instantiation methods fail if some member       *
+ * functions are left undefined.                                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+OuteredgeVariable<TYPE>::OuteredgeVariable(
+   const OuteredgeVariable<TYPE>& foo):
+   hier::Variable(NULL, tbox::Pointer<SAMRAI::hier::PatchDataFactory>(NULL))
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void OuteredgeVariable<TYPE>::operator = (
+   const OuteredgeVariable<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuteredgeVariable.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuteredgeVariable.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Variable class for defining outeredge centered variables 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuteredgeVariable
+#define included_pdat_OuteredgeVariable
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/tbox/Complex.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * @brief Class OuteredgeVariable<DIM> is a templated variable class
+ * used to define edge-centered data quantities only on patch boundaries.
+ * It is a subclass of hier::Variable and is templated on the type
+ * of the underlying data (e.g., double, int, bool, etc.).
+ *
+ * Note that the data layout in the outeredge data arrays matches the corresponding
+ * array sections provided by the edge data implementation.  See header file for
+ * the OuteredgeData<DIM> class for a more detailed description of the data layout.
+ *
+ * @see pdat::EdgeData
+ * @see pdat::OuteredgeData
+ * @see pdat::OuteredgeDataFactory
+ * @see hier::Variable
+ */
+
+template<class TYPE>
+class OuteredgeVariable:public hier::Variable
+{
+public:
+   /*!
+    * @brief Create an outeredge variable object having properties
+    * specified by the name and depth (i.e., number of data values
+    * at each index location).  The default depth is one.
+    *
+    * Note that The ghost cell width for all outeredge data is currently
+    * fixed at zero; this may be changed in the future if needed.
+    */
+   explicit OuteredgeVariable(
+      const tbox::Dimension& dim,
+      const std::string& name,
+      int depth = 1);
+
+   /*!
+    * @brief Virtual destructor for outeredge variable objects.
+    */
+   virtual ~OuteredgeVariable<TYPE>();
+
+   /*!
+    * @brief Return a boolean true value indicating that fine patch
+    * values take precedence on coarse-fine interfaces.
+    */
+   bool fineBoundaryRepresentsVariable() const {
+      return true;
+   }
+
+   /*!
+    * @brief Return true indicating that outeredge data
+    * exists on the patch boundary.
+    */
+   bool dataLivesOnPatchBorder() const {
+      return true;
+   }
+
+   /*!
+    * @brief Return the the depth (number of components).
+    */
+   int
+   getDepth() const;
+
+private:
+   // neither of the following functions are implemented
+   OuteredgeVariable(
+      const OuteredgeVariable<TYPE>&);
+   void
+   operator = (
+      const OuteredgeVariable<TYPE>&);
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/OuteredgeVariable.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuterfaceComplexConstantRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuterfaceComplexConstantRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,287 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for outerface complex data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuterfaceComplexConstantRefine_C
+#define included_pdat_OuterfaceComplexConstantRefine_C
+
+#include "SAMRAI/pdat/OuterfaceComplexConstantRefine.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/OuterfaceData.h"
+#include "SAMRAI/pdat/OuterfaceVariable.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in conrefine1d.f:
+void F77_FUNC(conrefoutfacecplx1d, CONREFOUTFACECPLX1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+// in conrefine2d.f:
+void F77_FUNC(conrefoutfacecplx2d0, CONREFOUTFACECPLX2D0) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+void F77_FUNC(conrefoutfacecplx2d1, CONREFOUTFACECPLX2D1) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+// in conrefine3d.f:
+void F77_FUNC(conrefoutfacecplx3d0, CONREFOUTFACECPLX3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+void F77_FUNC(conrefoutfacecplx3d1, CONREFOUTFACECPLX3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+void F77_FUNC(conrefoutfacecplx3d2, CONREFOUTFACECPLX3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+OuterfaceComplexConstantRefine::OuterfaceComplexConstantRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSTANT_REFINE"),
+   d_name_id("CONSTANT_REFINE")
+{
+
+}
+
+OuterfaceComplexConstantRefine::~OuterfaceComplexConstantRefine()
+{
+}
+
+bool OuterfaceComplexConstantRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<OuterfaceVariable<dcomplex> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+OuterfaceComplexConstantRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int OuterfaceComplexConstantRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+OuterfaceComplexConstantRefine::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void OuterfaceComplexConstantRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   tbox::Pointer<OuterfaceData<dcomplex> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<OuterfaceData<dcomplex> >
+   fdata = fine.getPatchData(dst_component);
+
+   const pdat::FaceOverlap* t_overlap =
+      dynamic_cast<const pdat::FaceOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*this, fine, coarse, ratio);
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   for (int axis = 0; axis < dim.getValue(); axis++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(axis);
+
+      for (hier::BoxList::Iterator b(boxes); b; b++) {
+
+         const hier::Box& face_box = b();
+         TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, face_box);
+
+         hier::Box fine_box(dim);
+         for (int i = 0; i < dim.getValue(); i++) {
+            fine_box.lower((axis + i) % dim.getValue()) = face_box.lower(i);
+            fine_box.upper((axis + i) % dim.getValue()) = face_box.upper(i);
+         }
+
+         fine_box.upper(axis) -= 1;
+
+         const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+         const hier::Index ifirstc = coarse_box.lower();
+         const hier::Index ilastc = coarse_box.upper();
+         const hier::Index ifirstf = fine_box.lower();
+         const hier::Index ilastf = fine_box.upper();
+
+         for (int d = 0; d < fdata->getDepth(); d++) {
+            // loop over lower and upper outerface arrays
+            for (int i = 0; i < 2; i++) {
+               if (dim == tbox::Dimension(1)) {
+                  F77_FUNC(conrefoutfacecplx1d, CONREFOUTFACECPLX1D) (
+                     ifirstc(0), ilastc(0),
+                     ifirstf(0), ilastf(0),
+                     cilo(0), cihi(0),
+                     filo(0), fihi(0),
+                     &ratio[0],
+                     cdata->getPointer(0, i, d),
+                     fdata->getPointer(0, i, d));
+               } else if (dim == tbox::Dimension(2)) {
+                  if (axis == 0) {
+                     F77_FUNC(conrefoutfacecplx2d0, CONREFOUTFACECPLX2D0) (
+                        ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                        ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                        cilo(0), cilo(1), cihi(0), cihi(1),
+                        filo(0), filo(1), fihi(0), fihi(1),
+                        &ratio[0],
+                        cdata->getPointer(0, i, d),
+                        fdata->getPointer(0, i, d));
+                  } else if (axis == 1) {
+                     F77_FUNC(conrefoutfacecplx2d1, CONREFOUTFACECPLX2D1) (
+                        ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                        ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                        cilo(0), cilo(1), cihi(0), cihi(1),
+                        filo(0), filo(1), fihi(0), fihi(1),
+                        &ratio[0],
+                        cdata->getPointer(1, i, d),
+                        fdata->getPointer(1, i, d));
+                  }
+               } else if (dim == tbox::Dimension(3)) {
+                  if (axis == 0) {
+                     F77_FUNC(conrefoutfacecplx3d0, CONREFOUTFACECPLX3D0) (
+                        ifirstc(0), ifirstc(1), ifirstc(2),
+                        ilastc(0), ilastc(1), ilastc(2),
+                        ifirstf(0), ifirstf(1), ifirstf(2),
+                        ilastf(0), ilastf(1), ilastf(2),
+                        cilo(0), cilo(1), cilo(2),
+                        cihi(0), cihi(1), cihi(2),
+                        filo(0), filo(1), filo(2),
+                        fihi(0), fihi(1), fihi(2),
+                        &ratio[0],
+                        cdata->getPointer(0, i, d),
+                        fdata->getPointer(0, i, d));
+                  } else if (axis == 1) {
+                     F77_FUNC(conrefoutfacecplx3d1, CONREFOUTFACECPLX3D1) (
+                        ifirstc(0), ifirstc(1), ifirstc(2),
+                        ilastc(0), ilastc(1), ilastc(2),
+                        ifirstf(0), ifirstf(1), ifirstf(2),
+                        ilastf(0), ilastf(1), ilastf(2),
+                        cilo(0), cilo(1), cilo(2),
+                        cihi(0), cihi(1), cihi(2),
+                        filo(0), filo(1), filo(2),
+                        fihi(0), fihi(1), fihi(2),
+                        &ratio[0],
+                        cdata->getPointer(1, i, d),
+                        fdata->getPointer(1, i, d));
+                  } else if (axis == 2) {
+                     F77_FUNC(conrefoutfacecplx3d2, CONREFOUTFACECPLX3D2) (
+                        ifirstc(0), ifirstc(1), ifirstc(2),
+                        ilastc(0), ilastc(1), ilastc(2),
+                        ifirstf(0), ifirstf(1), ifirstf(2),
+                        ilastf(0), ilastf(1), ilastf(2),
+                        cilo(0), cilo(1), cilo(2),
+                        cihi(0), cihi(1), cihi(2),
+                        filo(0), filo(1), filo(2),
+                        fihi(0), fihi(1), fihi(2),
+                        &ratio[0],
+                        cdata->getPointer(2, i, d),
+                        fdata->getPointer(2, i, d));
+                  }
+               } else {
+                  TBOX_ERROR(
+                     "OuterfaceComplexConstantRefine::refine dimension > 3 not supported"
+                     << std::endl);
+               }
+            }
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuterfaceComplexConstantRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuterfaceComplexConstantRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for outerface complex data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuterfaceComplexConstantRefine
+#define included_pdat_OuterfaceComplexConstantRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class OuterfaceComplexConstantRefine implements constant
+ * interpolation for outerface complex patch data defined over a
+ * mesh.  It is derived from the xfer::RefineOperator base class.
+ * The numerical operations for interpolation use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is outerface complex, and the string is "CONSTANT_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class OuterfaceComplexConstantRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit OuterfaceComplexConstantRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~OuterfaceComplexConstantRefine();
+
+   /**
+    * Return true if the variable and name string match outerface
+    * complex constant interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of outerface complex constant interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the constant interpolation operator is the vector
+    * of zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the outerface complex constant
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the boxes contained in fine_overlap.
+    * It is assumed that the coarse patch contains sufficient data for the
+    * stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuterfaceComplexLinearTimeInterpolateOp.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuterfaceComplexLinearTimeInterpolateOp.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,273 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for complex outerface data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuterfaceComplexLinearTimeInterpolateOp_C
+#define included_pdat_OuterfaceComplexLinearTimeInterpolateOp_C
+
+#include "SAMRAI/pdat/OuterfaceComplexLinearTimeInterpolateOp.h"
+#include "SAMRAI/tbox/Complex.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/OuterfaceData.h"
+#include "SAMRAI/pdat/OuterfaceVariable.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in lintimint1d.f:
+void F77_FUNC(lintimeintoutfacecmplx1d, LINTIMEINTOUTFACECMPLX1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+// in lintimint2d.f:
+void F77_FUNC(lintimeintoutfacecmplx2d0,
+              LINTIMEINTOUTFACECMPLX2D0) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+void F77_FUNC(lintimeintoutfacecmplx2d1,
+              LINTIMEINTOUTFACECMPLX2D1) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+// in lintimint3d.f:
+void F77_FUNC(lintimeintoutfacecmplx3d0,
+              LINTIMEINTOUTFACECMPLX3D0) (const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+void F77_FUNC(lintimeintoutfacecmplx3d1,
+              LINTIMEINTOUTFACECMPLX3D1) (const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+void F77_FUNC(lintimeintoutfacecmplx3d2,
+              LINTIMEINTOUTFACECMPLX3D2) (const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+OuterfaceComplexLinearTimeInterpolateOp::
+OuterfaceComplexLinearTimeInterpolateOp():
+   xfer::TimeInterpolateOperator()
+{
+}
+
+OuterfaceComplexLinearTimeInterpolateOp::~
+OuterfaceComplexLinearTimeInterpolateOp()
+{
+}
+
+bool OuterfaceComplexLinearTimeInterpolateOp::findTimeInterpolateOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   const tbox::Pointer<OuterfaceVariable<dcomplex> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == "STD_LINEAR_TIME_INTERPOLATE")) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+void OuterfaceComplexLinearTimeInterpolateOp::timeInterpolate(
+   hier::PatchData& dst_data,
+   const hier::Box& where,
+   const hier::PatchData& src_data_old,
+   const hier::PatchData& src_data_new) const
+{
+   const tbox::Dimension& dim(where.getDim());
+
+   const OuterfaceData<dcomplex>* old_dat =
+      dynamic_cast<const OuterfaceData<dcomplex> *>(&src_data_old);
+   const OuterfaceData<dcomplex>* new_dat =
+      dynamic_cast<const OuterfaceData<dcomplex> *>(&src_data_new);
+   OuterfaceData<dcomplex>* dst_dat =
+      dynamic_cast<OuterfaceData<dcomplex> *>(&dst_data);
+
+   TBOX_ASSERT(old_dat != NULL);
+   TBOX_ASSERT(new_dat != NULL);
+   TBOX_ASSERT(dst_dat != NULL);
+   TBOX_ASSERT(where * old_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * new_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * dst_dat->getGhostBox() == where);
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst_data, where, src_data_old, src_data_new);
+
+   const hier::Index old_ilo = old_dat->getGhostBox().lower();
+   const hier::Index old_ihi = old_dat->getGhostBox().upper();
+   const hier::Index new_ilo = new_dat->getGhostBox().lower();
+   const hier::Index new_ihi = new_dat->getGhostBox().upper();
+
+   const hier::Index dst_ilo = dst_dat->getGhostBox().lower();
+   const hier::Index dst_ihi = dst_dat->getGhostBox().upper();
+
+   const hier::Index ifirst = where.lower();
+   const hier::Index ilast = where.upper();
+
+   const double old_time = old_dat->getTime();
+   const double new_time = new_dat->getTime();
+   const double dst_time = dst_dat->getTime();
+
+   TBOX_ASSERT((old_time < dst_time ||
+                tbox::MathUtilities<double>::equalEps(old_time, dst_time)) &&
+      (dst_time < new_time ||
+       tbox::MathUtilities<double>::equalEps(dst_time, new_time)));
+
+   double tfrac = dst_time - old_time;
+   double denom = new_time - old_time;
+   if (denom > tbox::MathUtilities<double>::getMin()) {
+      tfrac /= denom;
+   } else {
+      tfrac = 0.0;
+   }
+
+   for (int d = 0; d < dst_dat->getDepth(); d++) {
+      // loop over lower and upper outerface arrays
+      for (int i = 0; i < 2; i++) {
+         if (dim == tbox::Dimension(1)) {
+            F77_FUNC(lintimeintoutfacecmplx1d,
+               LINTIMEINTOUTFACECMPLX1D) (ifirst(0), ilast(0),
+               old_ilo(0), old_ihi(0),
+               new_ilo(0), new_ihi(0),
+               dst_ilo(0), dst_ihi(0),
+               tfrac,
+               old_dat->getPointer(0, i, d),
+               new_dat->getPointer(0, i, d),
+               dst_dat->getPointer(0, i, d));
+         } else if (dim == tbox::Dimension(2)) {
+            F77_FUNC(lintimeintoutfacecmplx2d0,
+               LINTIMEINTOUTFACECMPLX2D0) (ifirst(0), ifirst(1), ilast(0),
+               ilast(1),
+               old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+               new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+               dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+               tfrac,
+               old_dat->getPointer(0, i, d),
+               new_dat->getPointer(0, i, d),
+               dst_dat->getPointer(0, i, d));
+            F77_FUNC(lintimeintoutfacecmplx2d1,
+               LINTIMEINTOUTFACECMPLX2D1) (ifirst(0), ifirst(1), ilast(0),
+               ilast(1),
+               old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+               new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+               dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+               tfrac,
+               old_dat->getPointer(1, i, d),
+               new_dat->getPointer(1, i, d),
+               dst_dat->getPointer(1, i, d));
+         } else if (dim == tbox::Dimension(3)) {
+            F77_FUNC(lintimeintoutfacecmplx3d0,
+               LINTIMEINTOUTFACECMPLX3D0) (ifirst(0), ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(0, i, d),
+               new_dat->getPointer(0, i, d),
+               dst_dat->getPointer(0, i, d));
+            F77_FUNC(lintimeintoutfacecmplx3d1,
+               LINTIMEINTOUTFACECMPLX3D1) (ifirst(0), ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(1, i, d),
+               new_dat->getPointer(1, i, d),
+               dst_dat->getPointer(1, i, d));
+            F77_FUNC(lintimeintoutfacecmplx3d2,
+               LINTIMEINTOUTFACECMPLX3D2) (ifirst(0), ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(2, i, d),
+               new_dat->getPointer(2, i, d),
+               dst_dat->getPointer(2, i, d));
+         } else {
+            TBOX_ERROR(
+               "OuterfaceComplexLinearTimeInterpolateOp::TimeInterpolate dim > 3 not supported"
+               << std::endl);
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuterfaceComplexLinearTimeInterpolateOp.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuterfaceComplexLinearTimeInterpolateOp.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for complex outerface data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuterfaceComplexLinearTimeInterpolateOp
+#define included_pdat_OuterfaceComplexLinearTimeInterpolateOp
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class OuterfaceComplexLinearTimeInterpolateOp implements standard
+ * linear time interpolation for complex outreface patch data.  Recall
+ * that outerface patch data uses the same indices as face-centered data
+ * but the data only exists on the faces that coincide with patch boundaries.
+ * It is derived from the xfer::TimeInterpolateOperator base class.
+ * The interpolation uses FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is an outerface complex type, and the string is
+ * "STD_LINEAR_TIME_INTERPOLATE".
+ *
+ * @see xfer::TimeInterpolateOperator
+ */
+
+class OuterfaceComplexLinearTimeInterpolateOp:
+   public xfer::TimeInterpolateOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   OuterfaceComplexLinearTimeInterpolateOp();
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~OuterfaceComplexLinearTimeInterpolateOp();
+
+   /**
+    * Return true if the variable and name string match the standard
+    * complex outreface interpolation; otherwise, return false.
+    */
+   bool
+   findTimeInterpolateOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Perform linear time interpolation between two complex outerface
+    * patch data sources and place result in the destination patch data.
+    * Time interpolation is performed on the intersection of the destination
+    * patch data and the input box.  The time to which data is interpolated
+    * is provided by the destination data.
+    */
+   void
+   timeInterpolate(
+      hier::PatchData& dst_data,
+      const hier::Box& where,
+      const hier::PatchData& src_data_old,
+      const hier::PatchData& src_data_new) const;
+
+private:
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuterfaceData.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuterfaceData.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,609 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated outerface centered patch data type 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuterfaceData_C
+#define included_pdat_OuterfaceData_C
+
+#include "SAMRAI/pdat/OuterfaceData.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceGeometry.h"
+#include "SAMRAI/pdat/FaceOverlap.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#define PDAT_OUTERFACEDATA_VERSION 1
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/OuterfaceData.I"
+#endif
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * Constructor and destructor for outerface data objects.  The		*
+ * constructor simply initializes data variables and sets up the		*
+ * array data.								*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+OuterfaceData<TYPE>::OuterfaceData(
+   const hier::Box& box,
+   int depth):
+   hier::PatchData(box, hier::IntVector::getZero(box.getDim())),
+   d_depth(depth)
+{
+
+   TBOX_ASSERT(depth > 0);
+
+   for (int d = 0; d < getDim().getValue(); d++) {
+      const hier::Box& ghosts = this->getGhostBox();
+      const hier::Box facebox = FaceGeometry::toFaceBox(ghosts, d);
+      hier::Box outerfacebox = facebox;
+      outerfacebox.upper(0) = facebox.lower(0);
+      d_data[d][0].initializeArray(outerfacebox, depth);
+      outerfacebox.lower(0) = facebox.upper(0);
+      outerfacebox.upper(0) = facebox.upper(0);
+      d_data[d][1].initializeArray(outerfacebox, depth);
+   }
+}
+
+template<class TYPE>
+OuterfaceData<TYPE>::~OuterfaceData()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * The following are private and cannot be used, but they are defined	*
+ * here for compilers that require that every template declaration have	*
+ * a definition (a stupid requirement, if you ask me).			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+OuterfaceData<TYPE>::OuterfaceData(
+   const OuterfaceData<TYPE>& foo):
+   hier::PatchData(foo.getBox(), foo.getGhostCellWidth())
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void OuterfaceData<TYPE>::operator = (
+   const OuterfaceData<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Perform a fast copy between an outerface patch data type (source) and	*
+ * a face patch data type (destination) where the index spaces overlap.	*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuterfaceData<TYPE>::copy(
+   const hier::PatchData& src)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   const FaceData<TYPE> * const t_src =
+      dynamic_cast<const FaceData<TYPE> *>(&src);
+
+   TBOX_ASSERT(t_src != NULL);
+
+   for (int axis = 0; axis < getDim().getValue(); axis++) {
+      const ArrayData<TYPE>& face_array = t_src->getArrayData(axis);
+      for (int loc = 0; loc < 2; loc++) {
+         ArrayData<TYPE>& oface_array = d_data[axis][loc];
+         oface_array.copy(face_array, oface_array.getBox());
+      }
+   }
+}
+
+template<class TYPE>
+void OuterfaceData<TYPE>::copy2(
+   hier::PatchData& dst) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   FaceData<TYPE>* t_dst =
+      dynamic_cast<FaceData<TYPE> *>(&dst);
+
+   TBOX_ASSERT(t_dst != NULL);
+
+   for (int d = 0; d < getDim().getValue(); d++) {
+      t_dst->getArrayData(d).copy(d_data[d][0], d_data[d][0].getBox());
+      t_dst->getArrayData(d).copy(d_data[d][1], d_data[d][1].getBox());
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Copy data from the source into the destination according to the	*
+ * overlap descriptor.							*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuterfaceData<TYPE>::copy(
+   const hier::PatchData& src,
+   const hier::BoxOverlap& overlap)
+{
+
+   NULL_USE(src);
+   NULL_USE(overlap);
+
+   TBOX_ERROR("Copy with outerface as destination is not defined yet...");
+}
+
+template<class TYPE>
+void OuterfaceData<TYPE>::copy2(
+   hier::PatchData& dst,
+   const hier::BoxOverlap& overlap) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   FaceData<TYPE>* t_dst =
+      dynamic_cast<FaceData<TYPE> *>(&dst);
+   const FaceOverlap* t_overlap =
+      dynamic_cast<const FaceOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_dst != NULL);
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::IntVector& src_offset = t_overlap->getSourceOffset();
+   for (int d = 0; d < getDim().getValue(); d++) {
+      hier::IntVector face_offset(src_offset);
+      if (d > 0) {
+         for (int i = 0; i < getDim().getValue(); i++) {
+            face_offset(i) = src_offset((d + i) % getDim().getValue());
+         }
+      }
+      const hier::BoxList& box_list = t_overlap->getDestinationBoxList(d);
+      t_dst->getArrayData(d).copy(d_data[d][0], box_list, face_offset);
+      t_dst->getArrayData(d).copy(d_data[d][1], box_list, face_offset);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Perform a fast copy from a face data object to this outerface data    *
+ * object at the specified depths, where their index spaces overlap.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuterfaceData<TYPE>::copyDepth(
+   int dst_depth,
+   const FaceData<TYPE>& src,
+   int src_depth)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   for (int axis = 0; axis < getDim().getValue(); axis++) {
+      const ArrayData<TYPE>& src_face_array = src.getArrayData(axis);
+      for (int loc = 0; loc < 2; loc++) {
+         ArrayData<TYPE>& dst_oface_array = d_data[axis][loc];
+         dst_oface_array.copyDepth(dst_depth,
+            src_face_array,
+            src_depth,
+            dst_oface_array.getBox());
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Perform a fast copy to a face data object from this outerface data    *
+ * object at the specified depths, where their index spaces overlap.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuterfaceData<TYPE>::copyDepth2(
+   int dst_depth,
+   FaceData<TYPE>& dst,
+   int src_depth) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   for (int axis = 0; axis < getDim().getValue(); axis++) {
+      ArrayData<TYPE>& dst_face_array = dst.getArrayData(axis);
+      for (int loc = 0; loc < 2; loc++) {
+         const ArrayData<TYPE>& src_oface_array = d_data[axis][loc];
+         dst_face_array.copyDepth(dst_depth,
+            src_oface_array,
+            src_depth,
+            src_oface_array.getBox());
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Calculate the buffer space needed to pack/unpack messages on the box	*
+ * region using the overlap descriptor.					*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+bool OuterfaceData<TYPE>::canEstimateStreamSizeFromBox() const
+{
+   return ArrayData<TYPE>::canEstimateStreamSizeFromBox();
+}
+
+template<class TYPE>
+int OuterfaceData<TYPE>::getDataStreamSize(
+   const hier::BoxOverlap& overlap) const
+{
+   const FaceOverlap* t_overlap =
+      dynamic_cast<const FaceOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::IntVector& offset = t_overlap->getSourceOffset();
+
+   int size = 0;
+   for (int d = 0; d < getDim().getValue(); d++) {
+      const hier::BoxList& boxlist = t_overlap->getDestinationBoxList(d);
+      hier::IntVector face_offset(offset);
+      if (d > 0) {
+         for (int i = 0; i < getDim().getValue(); i++) {
+            face_offset(i) = offset((d + i) % getDim().getValue());
+         }
+      }
+      size += d_data[d][0].getDataStreamSize(boxlist, face_offset);
+      size += d_data[d][1].getDataStreamSize(boxlist, face_offset);
+   }
+   return size;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Pack/unpack data into/out of the message streams using the index	*
+ * space in the overlap descriptor.					*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuterfaceData<TYPE>::packStream(
+   tbox::MessageStream& stream,
+   const hier::BoxOverlap& overlap) const
+{
+   const FaceOverlap* t_overlap =
+      dynamic_cast<const FaceOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::IntVector& offset = t_overlap->getSourceOffset();
+   for (int d = 0; d < getDim().getValue(); d++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(d);
+      hier::IntVector face_offset(offset);
+      if (d > 0) {
+         for (int i = 0; i < getDim().getValue(); i++) {
+            face_offset(i) = offset((d + i) % getDim().getValue());
+         }
+      }
+
+      for (hier::BoxList::Iterator b(boxes); b; b++) {
+         const hier::Box src_box = hier::Box::shift(b(), -face_offset);
+         for (int f = 0; f < 2; f++) {
+            const hier::Box intersect = src_box * d_data[d][f].getBox();
+            if (!intersect.empty()) {
+               d_data[d][f].packStream(stream,
+                  hier::Box::shift(intersect, face_offset),
+                  face_offset);
+            }
+         }
+      }
+
+   }
+}
+
+template<class TYPE>
+void OuterfaceData<TYPE>::unpackStream(
+   tbox::MessageStream& stream,
+   const hier::BoxOverlap& overlap)
+{
+   const FaceOverlap* t_overlap =
+      dynamic_cast<const FaceOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::IntVector& offset = t_overlap->getSourceOffset();
+   for (int d = 0; d < getDim().getValue(); d++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(d);
+      hier::IntVector face_offset(offset);
+      if (d > 0) {
+         for (int i = 0; i < getDim().getValue(); i++) {
+            face_offset(i) = offset((d + i) % getDim().getValue());
+         }
+      }
+
+      for (hier::BoxList::Iterator b(boxes); b; b++) {
+         for (int f = 0; f < 2; f++) {
+            const hier::Box intersect = b() * d_data[d][f].getBox();
+            if (!intersect.empty()) {
+               d_data[d][f].unpackStream(stream, intersect, face_offset);
+            }
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Calculate the amount of memory space needed to represent the data	*
+ * for a  outerface centered grid.					*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+size_t OuterfaceData<TYPE>::getSizeOfData(
+   const hier::Box& box,
+   int depth)
+{
+   TBOX_ASSERT(depth > 0);
+
+   size_t size = 0;
+   for (int d = 0; d < box.getDim().getValue(); d++) {
+      hier::Box lower = FaceGeometry::toFaceBox(box, d);
+      hier::Box upper = FaceGeometry::toFaceBox(box, d);
+      lower.upper(d) = box.lower(d);
+      upper.lower(d) = box.upper(d);
+      size += ArrayData<TYPE>::getSizeOfData(lower, depth);
+      size += ArrayData<TYPE>::getSizeOfData(upper, depth);
+   }
+   return size;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Fill the outerface centered box with the given value.			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuterfaceData<TYPE>::fill(
+   const TYPE& t,
+   int d)
+{
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   for (int i = 0; i < getDim().getValue(); i++) {
+      d_data[i][0].fill(t, d);
+      d_data[i][1].fill(t, d);
+   }
+}
+
+template<class TYPE>
+void OuterfaceData<TYPE>::fill(
+   const TYPE& t,
+   const hier::Box& box,
+   int d)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   for (int i = 0; i < getDim().getValue(); i++) {
+      d_data[i][0].fill(t, FaceGeometry::toFaceBox(box, i), d);
+      d_data[i][1].fill(t, FaceGeometry::toFaceBox(box, i), d);
+   }
+}
+
+template<class TYPE>
+void OuterfaceData<TYPE>::fillAll(
+   const TYPE& t)
+{
+   for (int i = 0; i < getDim().getValue(); i++) {
+      d_data[i][0].fillAll(t);
+      d_data[i][1].fillAll(t);
+   }
+}
+
+template<class TYPE>
+void OuterfaceData<TYPE>::fillAll(
+   const TYPE& t,
+   const hier::Box& box)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   for (int i = 0; i < getDim().getValue(); i++) {
+      d_data[i][0].fillAll(t, FaceGeometry::toFaceBox(box, i));
+      d_data[i][1].fillAll(t, FaceGeometry::toFaceBox(box, i));
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print routines for outerface centered arrays.				*
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuterfaceData<TYPE>::print(
+   const hier::Box& box,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   for (int d = 0; d < d_depth; d++) {
+      print(box, d, os, prec);
+   }
+}
+
+template<class TYPE>
+void OuterfaceData<TYPE>::print(
+   const hier::Box& box,
+   int depth,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   for (int face_normal = 0; face_normal < getDim().getValue(); face_normal++) {
+      os << "Array face normal = " << face_normal << std::endl;
+      for (int side = 0; side < 2; side++) {
+         os << "side = " << ((side == 0) ? "lower" : "upper") << std::endl;
+         printAxisFace(face_normal, side, box, depth, os, prec);
+      }
+   }
+}
+
+template<class TYPE>
+void OuterfaceData<TYPE>::printAxisFace(
+   int face_normal,
+   int side,
+   const hier::Box& box,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+
+   for (int d = 0; d < d_depth; d++) {
+      os << "Array depth = " << d << std::endl;
+      printAxisFace(face_normal, side, box, d, os, prec);
+   }
+}
+
+template<class TYPE>
+void OuterfaceData<TYPE>::printAxisFace(
+   int face_normal,
+   int side,
+   const hier::Box& box,
+   int depth,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+
+   const hier::Box facebox =
+      FaceGeometry::toFaceBox(box, face_normal);
+   const hier::Box region =
+      facebox * d_data[face_normal][side].getBox();
+   os.precision(prec);
+   for (hier::Box::Iterator i(region); i; i++) {
+      os << "array" << i() << " = "
+      << d_data[face_normal][side](i(), depth) << std::endl;
+      os << std::flush;
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Checks that class version and restart file version are equal.  If so,	*
+ * reads in d_depth from the database.  Then has each item in d_data	*
+ * read in its data from the database.					*
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuterfaceData<TYPE>::getSpecializedFromDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   int ver = database->getInteger("PDAT_OUTERFACEDATA_VERSION");
+   if (ver != PDAT_OUTERFACEDATA_VERSION) {
+      TBOX_ERROR(
+         "OuterfaceData<getDim()>::getSpecializedFromDatabase error...\n"
+         << " : Restart file version different than class version" << std::endl);
+   }
+
+   d_depth = database->getInteger("d_depth");
+
+   tbox::Pointer<tbox::Database> array_database;
+   for (int i = 0; i < getDim().getValue(); i++) {
+      std::string array_name = "d_data" + tbox::Utilities::intToString(i)
+         + "_1";
+      array_database = database->getDatabase(array_name);
+      (d_data[i][0]).getFromDatabase(array_database);
+
+      array_name = "d_data" + tbox::Utilities::intToString(i) + "_2";
+      array_database = database->getDatabase(array_name);
+      (d_data[i][1]).getFromDatabase(array_database);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Writes out class version number, d_depth to the database.		*
+ * Then has each item in d_data write out its data to the database.	*
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuterfaceData<TYPE>::putSpecializedToDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+
+   TBOX_ASSERT(!database.isNull());
+
+   database->putInteger("PDAT_OUTERFACEDATA_VERSION",
+      PDAT_OUTERFACEDATA_VERSION);
+
+   database->putInteger("d_depth", d_depth);
+
+   tbox::Pointer<tbox::Database> array_database;
+   for (int i = 0; i < getDim().getValue(); i++) {
+      std::string array_name = "d_data" + tbox::Utilities::intToString(i)
+         + "_1";
+      array_database = database->putDatabase(array_name);
+      (d_data[i][0]).putToDatabase(array_database);
+
+      array_name = "d_data" + tbox::Utilities::intToString(i) + "_2";
+      array_database = database->putDatabase(array_name);
+      (d_data[i][1]).putToDatabase(array_database);
+   }
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuterfaceData.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuterfaceData.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated outerface centered patch data type 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int OuterfaceData<TYPE>::getDepth() const
+{
+   return d_depth;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE * OuterfaceData<TYPE>::getPointer(
+   int face_normal,
+   int side,
+   int d)
+{
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   return d_data[face_normal][side].getPointer(d);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE * OuterfaceData<TYPE>::getPointer(
+   int face_normal,
+   int side,
+   int d) const
+{
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   return d_data[face_normal][side].getPointer(d);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ArrayData<TYPE>&
+OuterfaceData<TYPE>::getArrayData(
+   int face_normal,
+   int side)
+{
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+
+   return d_data[face_normal][side];
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const ArrayData<TYPE>&
+OuterfaceData<TYPE>::getArrayData(
+   int face_normal,
+   int side) const
+{
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+
+   return d_data[face_normal][side];
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE & OuterfaceData<TYPE>::operator () (
+   const FaceIndex& i,
+   int side,
+   int depth)
+{
+   const int axis = i.getAxis();
+
+   TBOX_ASSERT((axis >= 0) && (axis < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data[axis][side](i, depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE &OuterfaceData<TYPE>::operator () (
+   const FaceIndex& i,
+   int side,
+   int depth) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, i);
+
+   const int axis = i.getAxis();
+
+   TBOX_ASSERT((axis >= 0) && (axis < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data[axis][side](i, depth);
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuterfaceData.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuterfaceData.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,524 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated outerface centered patch data type 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuterfaceData
+#define included_pdat_OuterfaceData
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/pdat/FaceIndex.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * @brief Class OuterfaceData<DIM> provides an implementation for data defined
+ * at cell faces on the boundaries of AMR patches.  It is derived from the
+ * hier::PatchData interface common to all SAMRAI patch data types.  Given
+ * a CELL-centered AMR index space box, an outerface data object represents
+ * data of some template TYPE and depth on the cell faces on the boundary
+ * of the box.  Here, depth indicates the number of data values at each face
+ * index location.  The OuteredgfaceGeometry class provides the translation
+ * between the standard SAMRAI cell-centered AMR index space and
+ * outerface-centered data.
+ *
+ * Outerface data is stored in 2*DIM arrays, each of which contains data
+ * associated with face indices normal to a coordinate axis direction and an
+ * upper or lower box face in the face normal direction.  The data layout in the
+ * outerface data arrays matches the corresponding array sections provided by the
+ * face data implementation.  Specifically, within each array, the data indices are
+ * cyclically permuted to be consistent with the FaceData<DIM> implementation.
+ * Also, in each of array, memory allocation is in column-major ordering
+ * (e.g., Fortran style) so that the leftmost index runs fastest in memory.
+ * For example, a three-dimensional outerface data object created over a CELL-centered
+ * AMR index space [l0:u0,l1:u1,l2:u2] allocates six data arrays dimensioned as follows:
+ * \verbatim
+ *
+ * face normal 0:
+ *   lower face      [ l0:l0     , l1:u1 , l2:u2 , d ]
+ *   upper face      [ u0+1:u0+1 , l1:u1 , l2:u2 , d ]
+ *
+ * face normal 1:
+ *   lower face      [ l1:l1     , l2:u2 , l0:u0 , d ]
+ *   upper face      [ u1+1:u1+1 , l2:u2 , l0:u0 , d ]
+ *
+ * face normal 2:
+ *   lower face      [ l2:l2     , l0:u0 , l1:u1 , d ]
+ *   upper face      [ u2+1:u2+1 , l0:u0 , l1:u1 , d ]
+ *
+ * \endverbatim
+ * Here the face normal directions 0, 1, 2 can be thought of as the x, y, and z
+ * face normal directions, respectively, and d is the depth index (i.e., number
+ * of values at each face index location).  Other spatial dimensions are
+ * represented similarly.
+ *
+ * The data type TYPE must define a default constructor (that takes no
+ * arguments) and also the assignment operator.
+ *
+ * IMPORTANT: The OutersideData<DIM> class provides the same storage
+ * as this outerface data class, except that the coordinate directions of the
+ * individual arrays are not permuted; i.e., OutersideData is consistent
+ * with the SideData implementation.
+ *
+ * @see pdat::ArrayData
+ * @see hier::PatchData
+ * @see pdat::OuterfaceDataFactory
+ * @see pdat::OuterfaceGeometry
+ * @see pdat::FaceIterator
+ * @see pdat::FaceIndex
+ */
+
+template<class TYPE>
+class OuterfaceData:public hier::PatchData
+{
+public:
+   /*!
+    * @brief Calculate the amount of memory needed to represent outerface-
+    * centered data over a CELL-centered AMR index space box.
+    *
+    * This function assumes that the amount of
+    * memory needed for TYPE is sizeof(TYPE).
+    * If this is not the case, then a specialized function must be defined.
+    *
+    * @param box const Box reference describing the interior of the
+    *            standard CELL-centered index box over which the
+    *            outerface data object will be created.
+    *            Note: the ghost cell width is assumed to be zero.
+    * @param depth gives the number of data values for each
+    *              spatial location in the array.
+    */
+   static size_t
+   getSizeOfData(
+      const hier::Box& box,
+      int depth);
+
+   /*!
+    * @brief Constructor for an outerface data object.
+    *
+    * Note: Outerface data always has ghost cell width of zero.
+    *
+    * @param box const Box reference describing the interior of the
+    *            standard CELL-centered index box over which the
+    *            outerface data object will be created.
+    * @param depth gives the number of data values for each
+    *              spatial location in the array.
+    */
+   explicit OuterfaceData(
+      const hier::Box& box,
+      int depth);
+
+   /*!
+    * @brief Virtual destructor for a outerface data object.
+    */
+   virtual ~OuterfaceData<TYPE>();
+
+   /*!
+    * @brief Return the depth (i.e., the number of data values for
+    * each spatial location) of the array.
+    */
+   int
+   getDepth() const;
+
+   /*!
+    * @brief Get a pointer to the beginning of a particular
+    * face normal, side, and depth component of the outerface centered
+    * array.
+    *
+    * @param face_normal  integer face normal direction for data,
+    *              must satisfy 0 <= face_normal < DIM
+    * @param side integer lower (0) or upper (1) side of outerface
+    *             data array
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    */
+   TYPE *
+   getPointer(
+      int face_normal,
+      int side,
+      int depth = 0);
+
+   /*!
+    * @brief Get a const pointer to the beginning of a particular
+    * face normal, side location, and depth component of the outerface
+    * centered array.
+    *
+    * @param face_normal  integer face normal direction for data,
+    *              must satisfy 0 <= face_normal < DIM
+    * @param side integer lower (0) or upper (1) side of outerface
+    *             data array
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    */
+   const TYPE *
+   getPointer(
+      int face_normal,
+      int side,
+      int depth = 0) const;
+
+   /*!
+    * @brief Return a reference to data entry corresponding
+    * to a given face index, side location, and depth.
+    *
+    * @param i const reference to FaceIndex, @em MUST be
+    *          an index on the outerface of the box.
+    * @param side  integer (lower/upper location of outerface data),
+    *              must satisfy 0 <= side <= 1
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    */
+   TYPE&
+   operator () (
+      const FaceIndex& i,
+      int side,
+      int depth = 0);
+
+   /*!
+    * @brief Return a const reference to data entry corresponding
+    * to a given face index, side location, and depth.
+    *
+    * @param i const reference to FaceIndex, @em MUST be
+    *          an index on the outerface of the box.
+    * @param side  integer (lower/upper location of outerface data),
+    *              must satisfy 0 <= side <= 1
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    */
+   const TYPE&
+   operator () (
+      const FaceIndex& i,
+      int side,
+      int depth = 0) const;
+
+   /*!
+    * @brief Return a reference to the array data object for
+    * face normal and side location of the outerface centered array.
+    *
+    * @param face_normal  integer face normal direction for data,
+    *              must satisfy 0 <= face_normal < DIM
+    * @param side integer lower (0) or upper (1) side of outerface
+    *             data array
+    */
+   ArrayData<TYPE>&
+   getArrayData(
+      int face_normal,
+      int side);
+
+   /*!
+    * @brief Return a const reference to the array data object for
+    * face normal and side location of the outerface centered array.
+    *
+    * @param face_normal  integer face normal direction for data,
+    *              must satisfy 0 <= face_normal < DIM
+    * @param side integer lower (0) or upper (1) side of outerface
+    *             data array
+    */
+   const ArrayData<TYPE>&
+   getArrayData(
+      int face_normal,
+      int side) const;
+
+   /*!
+    * @brief A fast copy from source to destination (i.e., this)
+    * patch data object.
+    *
+    * Data is copied where there is overlap in the underlying index space.
+    * The copy is performed on the interior plus the ghost cell width (for
+    * both the source and destination).  Currently, source data must be
+    * FaceData the same DIM and TYPE.  If not, then an unrecoverable error
+    * results.
+    */
+   virtual void
+   copy(
+      const hier::PatchData& src);
+
+   /*!
+    * @brief A fast copy from source (i.e., this) to destination
+    * patch data object.
+    *
+    * Data is copied where there is overlap in the underlying index space.
+    * The copy is performed on the interior plus the ghost cell width (for
+    * both the source and destination).  Currently, destination data must be
+    * FaceData of the same DIM and TYPE.  If not, then an unrecoverable
+    * error results.
+    */
+   virtual void
+   copy2(
+      hier::PatchData& dst) const;
+
+   /*!
+    * @brief Copy data from source to destination (i.e., this)
+    * patch data object on the given overlap.
+    *
+    * IMPORTANT: this routine is @b not @b yet @b implemented!
+    */
+   virtual void
+   copy(
+      const hier::PatchData& src,
+      const hier::BoxOverlap& overlap);
+
+   /*!
+    * @brief Copy data from source (i.e., this) to destination
+    * patch data object on the given overlap.
+    *
+    * Currently, destination data must be FaceData of the same DIM
+    * and TYPE and the overlap must be a FaceOverlap of the same
+    * DIM.  If not, then an unrecoverable error results.
+    */
+   virtual void
+   copy2(
+      hier::PatchData& dst,
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Fast copy (i.e., assumes face and outerface data objects are
+    * defined over the same box) from the given face source data object to
+    * this destination outerface data object at the specified depths.
+    */
+   void
+   copyDepth(
+      int dst_depth,
+      const FaceData<TYPE>& src,
+      int src_depth);
+
+   /*!
+    * @brief Fast copy (i.e., assumes face and outerface data objects are
+    * defined over the same box) to the given face destination data object
+    * from this source outerface data object at the specified depths.
+    */
+   void
+   copyDepth2(
+      int dst_depth,
+      FaceData<TYPE>& dst,
+      int src_depth) const;
+
+   /*!
+    * @brief Return true if the patch data object can estimate the
+    * stream size required to fit its data using only index
+    * space information (i.e., a box).
+    *
+    * This routine is defined for the standard types (bool, char,
+    * double, float, int, and dcomplex).
+    */
+   virtual bool
+   canEstimateStreamSizeFromBox() const;
+
+   /*!
+    * @brief Return the number of bytes needed to stream the data
+    * in this patch data object lying in the specified box overlap
+    * region.
+    *
+    * This routine is defined for the standard types (bool, char,
+    * double, float, int, and dcomplex).
+    */
+   virtual int
+   getDataStreamSize(
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Pack data in this patch data object lying in the specified
+    * box overlap region into the stream.  The overlap must be an
+    * FaceOverlap of the same DIM.
+    */
+   virtual void
+   packStream(
+      tbox::MessageStream& stream,
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Unpack data from stream into this patch data object over
+    * the specified box overlap region. The overlap must be an
+    * FaceOverlap of the same DIM.
+    */
+   virtual void
+   unpackStream(
+      tbox::MessageStream& stream,
+      const hier::BoxOverlap& overlap);
+
+   /*!
+    * @brief Fill all values at depth d with the value t.
+    */
+   void
+   fill(
+      const TYPE& t,
+      int d = 0);
+
+   /*!
+    * @brief Fill all values at depth d within the box with the value t.
+    */
+   void
+   fill(
+      const TYPE& t,
+      const hier::Box& box,
+      int d = 0);
+
+   /*!
+    * @brief Fill all depth components with value t.
+    */
+   void
+   fillAll(
+      const TYPE& t);
+
+   /*!
+    * @brief Fill all depth components within the box with value t.
+    */
+   void
+   fillAll(
+      const TYPE& t,
+      const hier::Box& box);
+
+   /*!
+    * @brief Print all outerface data values residing in the specified box.
+    * If the depth of the array is greater than one, all depths are printed.
+    *
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to face index space.
+    * @param os   reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   print(
+      const hier::Box& box,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Print all outerface data values at the given array depth in
+    * the specified box.
+    *
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to face index space.
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    * @param os   reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   print(
+      const hier::Box& box,
+      int depth,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Print all outerface centered data values for specified
+    * face_normal and side residing in the specified box.
+    * If the depth of the data is greater than one, all depths are printed.
+    *
+    * @param face_normal  integer face normal direction for data,
+    *              must satisfy 0 <= face_normal < DIM
+    * @param side integer lower (0) or upper (1) side of outerface
+    *             data array
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to face index space.
+    * @param os    reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   printAxisFace(
+      int face_normal,
+      int side,
+      const hier::Box& box,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Print all outerface centered data values for specified
+    * face_normal, side, and depth residing in the specified box.
+    *
+    * @param face_normal  integer face normal direction for data,
+    *              must satisfy 0 <= face_normal < DIM
+    * @param side integer lower (0) or upper (1) side of outerface
+    *             data array
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to face index space.
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    * @param os    reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   printAxisFace(
+      int face_normal,
+      int side,
+      const hier::Box& box,
+      int depth,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Check that class version and restart file version are equal.
+    * If so, read data members from the database.
+    *
+    * Assertions: database must be a non-null pointer.
+    */
+   virtual void
+   getSpecializedFromDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+   /*!
+    * @brief Write out the class version number and other data members to
+    * the database.
+    *
+    * Assertions: database must be a non-null pointer.
+    */
+   virtual void
+   putSpecializedToDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+private:
+   OuterfaceData(
+      const OuterfaceData<TYPE>&);            // not implemented
+   void
+   operator = (
+      const OuterfaceData<TYPE>&);                // not implemented
+
+   int d_depth;
+   ArrayData<TYPE> d_data[tbox::Dimension::MAXIMUM_DIMENSION_VALUE][2];
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/OuterfaceData.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/OuterfaceData.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuterfaceDataFactory.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuterfaceDataFactory.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,170 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating outerface data objects 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuterfaceDataFactory_C
+#define included_pdat_OuterfaceDataFactory_C
+
+#include "SAMRAI/pdat/OuterfaceDataFactory.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/OuterfaceData.h"
+#include "SAMRAI/pdat/OuterfaceGeometry.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/pdat/FaceDataFactory.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/OuterfaceDataFactory.I"
+#endif
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *
+ * The constructor simply caches the depth of the patch data.
+ *
+ *************************************************************************
+ */
+
+template<class TYPE>
+OuterfaceDataFactory<TYPE>::OuterfaceDataFactory(
+   const tbox::Dimension& dim,
+   int depth):
+   hier::PatchDataFactory(hier::IntVector::getZero(dim)),
+   d_depth(depth),
+   d_no_ghosts(hier::IntVector::getZero(dim))
+{
+   TBOX_ASSERT(depth > 0);
+}
+
+template<class TYPE>
+OuterfaceDataFactory<TYPE>::~OuterfaceDataFactory()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Clone the factory and copy the default parameters to the new factory.	*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::PatchDataFactory>
+OuterfaceDataFactory<TYPE>::cloneFactory(
+   const hier::IntVector& ghosts)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, ghosts);
+
+   return tbox::Pointer<hier::PatchDataFactory>(new OuterfaceDataFactory<TYPE>(
+                                                   ghosts.getDim(), d_depth));
+}
+
+/*
+ *************************************************************************
+ *
+ * Allocate the concrete outerface data classes.
+ *
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::PatchData>
+OuterfaceDataFactory<TYPE>::allocate(
+   const hier::Patch& patch) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, patch);
+
+   hier::PatchData* patchdata =
+      new OuterfaceData<TYPE>(patch.getBox(), d_depth);
+   return tbox::Pointer<hier::PatchData>(patchdata);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Return the box geometry type for outerface data objects.		*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::BoxGeometry>
+OuterfaceDataFactory<TYPE>::getBoxGeometry(
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   const hier::IntVector zero_vector(hier::IntVector::getZero(getDim()));
+
+   hier::BoxGeometry* boxgeometry = new OuterfaceGeometry(box, zero_vector);
+   return tbox::Pointer<hier::BoxGeometry>(boxgeometry);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Calculate the amount of memory needed to allocate the data object.	*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+size_t OuterfaceDataFactory<TYPE>::getSizeOfMemory(
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   const size_t obj = tbox::MemoryUtilities::align(sizeof(OuterfaceData<TYPE>));
+   const size_t data = OuterfaceData<TYPE>::getSizeOfData(box, d_depth);
+   return obj + data;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Determine whether this is a valid copy operation to/from OuterfaceData*
+ * between the supplied datatype.                                        *
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+bool OuterfaceDataFactory<TYPE>::validCopyTo(
+   const tbox::Pointer<hier::PatchDataFactory>& dst_pdf) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *dst_pdf);
+
+   bool valid_copy = false;
+
+   /*
+    * Valid options are FaceData and OuterfaceData.
+    */
+   if (!valid_copy) {
+      tbox::Pointer<FaceDataFactory<TYPE> > fdf = dst_pdf;
+      if (!fdf.isNull()) {
+         valid_copy = true;
+      }
+   }
+
+   if (!valid_copy) {
+      tbox::Pointer<OuterfaceDataFactory<TYPE> > ofdf = dst_pdf;
+      if (!ofdf.isNull()) {
+         valid_copy = true;
+      }
+   }
+
+   return valid_copy;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuterfaceDataFactory.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuterfaceDataFactory.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,22 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating outerface data objects 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int OuterfaceDataFactory<TYPE>::getDepth() const
+{
+   return d_depth;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuterfaceDataFactory.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuterfaceDataFactory.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,144 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating outerface data objects 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuterfaceDataFactory
+#define included_pdat_OuterfaceDataFactory
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/PatchDataFactory.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class OuterfaceDataFactory is a factory class used to allocate new
+ * instances of OuterfaceData objects.  It is a subclass of the patch
+ * data factory class and outerface data is a subclass of patch data.  Both
+ * the factory and data classes are templated on the type of the contained
+ * object (e.g., double or int).
+ *
+ * @see pdat::OuterfaceData
+ * @see pdat::PatchDataFactory
+ */
+
+template<class TYPE>
+class OuterfaceDataFactory:public hier::PatchDataFactory
+{
+public:
+   /**
+    * The default constructor for the outerface data factory class.
+    * The depth (number of components) gives the default for all of
+    * the outerface data objects created with this factory.
+    */
+   explicit OuterfaceDataFactory(
+      const tbox::Dimension& dim,
+      int depth);
+
+   /**
+    * Virtual destructor for the outerface data factory class.
+    */
+   virtual ~OuterfaceDataFactory<TYPE>();
+
+   /**
+    * @brief Abstract virtual function to clone a patch data factory.
+    *
+    * This will return a new instantiation of the abstract factory
+    * with the same properties.  The properties of the cloned factory
+    * can then be changed without modifying the original.
+    *
+    * @param ghosts default ghost cell width for concrete classes created from
+    * the factory.
+    */
+   virtual tbox::Pointer<hier::PatchDataFactory>
+   cloneFactory(
+      const hier::IntVector& ghosts);
+
+   /**
+    * Virtual factory function to allocate a concrete outerface data object.
+    * The default information about the object (e.g., depth) is taken from
+    * the factory.
+    */
+   virtual tbox::Pointer<hier::PatchData>
+   allocate(
+      const hier::Patch& patch) const;
+
+   /**
+    * Allocate the box geometry object associated with the patch data.
+    * This information will be used in the computation of intersections
+    * and data dependencies between objects.
+    */
+   virtual tbox::Pointer<hier::BoxGeometry>
+   getBoxGeometry(
+      const hier::Box& box) const;
+
+   /**
+    * Get the depth (number of components).  This is the depth that
+    * will be used in the instantiation of outerface data objects.
+    */
+   int
+   getDepth() const;
+
+   /**
+    * Calculate the amount of memory needed to store the outerface data
+    * object, including object data and dynamically allocated data.
+    */
+   virtual size_t
+   getSizeOfMemory(
+      const hier::Box& box) const;
+
+   /**
+    * Return a boolean true value indicating that fine data for the outerface quantity will
+    * take precedence on coarse-fine interfaces.  See the OuterfaceVariable<DIM> class
+    * header file for more information.
+    */
+   bool fineBoundaryRepresentsVariable() const {
+      return true;
+   }
+
+   /**
+    * Return true since the outerface data index space extends beyond the interior of
+    * patches.  That is, outerface data lives on patch borders.
+    */
+   bool dataLivesOnPatchBorder() const {
+      return true;
+   }
+
+   /**
+    * Return whether it is valid to copy this OuterfaceDataFactory to the
+    * supplied destination patch data factory.  It will return true if
+    * dst_pdf is FaceDataFactory or OuterfaceDataFactory, false otherwise.
+    */
+   bool
+   validCopyTo(
+      const tbox::Pointer<hier::PatchDataFactory>& dst_pdf) const;
+
+private:
+   int d_depth;
+
+   hier::IntVector d_no_ghosts;
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/OuterfaceDataFactory.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/OuterfaceDataFactory.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuterfaceDoubleConstantRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuterfaceDoubleConstantRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,287 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for outerface double data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuterfaceDoubleConstantRefine_C
+#define included_pdat_OuterfaceDoubleConstantRefine_C
+
+#include "SAMRAI/pdat/OuterfaceDoubleConstantRefine.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/OuterfaceData.h"
+#include "SAMRAI/pdat/OuterfaceVariable.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in conrefine1d.f:
+void F77_FUNC(conrefoutfacedoub1d, CONREFOUTFACEDOUB1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const double *, double *);
+// in conrefine2d.f:
+void F77_FUNC(conrefoutfacedoub2d0, CONREFOUTFACEDOUB2D0) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const double *, double *);
+void F77_FUNC(conrefoutfacedoub2d1, CONREFOUTFACEDOUB2D1) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const double *, double *);
+// in conrefine3d.f:
+void F77_FUNC(conrefoutfacedoub3d0, CONREFOUTFACEDOUB3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const double *, double *);
+void F77_FUNC(conrefoutfacedoub3d1, CONREFOUTFACEDOUB3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const double *, double *);
+void F77_FUNC(conrefoutfacedoub3d2, CONREFOUTFACEDOUB3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const double *, double *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+OuterfaceDoubleConstantRefine::OuterfaceDoubleConstantRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSTANT_REFINE"),
+   d_name_id("CONSTANT_REFINE")
+{
+
+}
+
+OuterfaceDoubleConstantRefine::~OuterfaceDoubleConstantRefine()
+{
+}
+
+bool OuterfaceDoubleConstantRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<OuterfaceVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+OuterfaceDoubleConstantRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int OuterfaceDoubleConstantRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+OuterfaceDoubleConstantRefine::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void OuterfaceDoubleConstantRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   tbox::Pointer<OuterfaceData<double> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<OuterfaceData<double> >
+   fdata = fine.getPatchData(dst_component);
+
+   const pdat::FaceOverlap* t_overlap =
+      dynamic_cast<const pdat::FaceOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*this, fine, coarse, ratio);
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   for (int axis = 0; axis < dim.getValue(); axis++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(axis);
+
+      for (hier::BoxList::Iterator b(boxes); b; b++) {
+
+         const hier::Box& face_box = b();
+         TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, face_box);
+
+         hier::Box fine_box(dim);
+         for (int i = 0; i < dim.getValue(); i++) {
+            fine_box.lower((axis + i) % dim.getValue()) = face_box.lower(i);
+            fine_box.upper((axis + i) % dim.getValue()) = face_box.upper(i);
+         }
+
+         fine_box.upper(axis) -= 1;
+
+         const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+         const hier::Index ifirstc = coarse_box.lower();
+         const hier::Index ilastc = coarse_box.upper();
+         const hier::Index ifirstf = fine_box.lower();
+         const hier::Index ilastf = fine_box.upper();
+
+         for (int d = 0; d < fdata->getDepth(); d++) {
+            // loop over lower and upper outerface arrays
+            for (int i = 0; i < 2; i++) {
+               if (dim == tbox::Dimension(1)) {
+                  F77_FUNC(conrefoutfacedoub1d, CONREFOUTFACEDOUB1D) (
+                     ifirstc(0), ilastc(0),
+                     ifirstf(0), ilastf(0),
+                     cilo(0), cihi(0),
+                     filo(0), fihi(0),
+                     &ratio[0],
+                     cdata->getPointer(0, i, d),
+                     fdata->getPointer(0, i, d));
+               } else if (dim == tbox::Dimension(2)) {
+                  if (axis == 0) {
+                     F77_FUNC(conrefoutfacedoub2d0, CONREFOUTFACEDOUB2D0) (
+                        ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                        ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                        cilo(0), cilo(1), cihi(0), cihi(1),
+                        filo(0), filo(1), fihi(0), fihi(1),
+                        &ratio[0],
+                        cdata->getPointer(0, i, d),
+                        fdata->getPointer(0, i, d));
+                  } else if (axis == 1) {
+                     F77_FUNC(conrefoutfacedoub2d1, CONREFOUTFACEDOUB2D1) (
+                        ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                        ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                        cilo(0), cilo(1), cihi(0), cihi(1),
+                        filo(0), filo(1), fihi(0), fihi(1),
+                        &ratio[0],
+                        cdata->getPointer(1, i, d),
+                        fdata->getPointer(1, i, d));
+                  }
+               } else if (dim == tbox::Dimension(3)) {
+                  if (axis == 0) {
+                     F77_FUNC(conrefoutfacedoub3d0, CONREFOUTFACEDOUB3D0) (
+                        ifirstc(0), ifirstc(1), ifirstc(2),
+                        ilastc(0), ilastc(1), ilastc(2),
+                        ifirstf(0), ifirstf(1), ifirstf(2),
+                        ilastf(0), ilastf(1), ilastf(2),
+                        cilo(0), cilo(1), cilo(2),
+                        cihi(0), cihi(1), cihi(2),
+                        filo(0), filo(1), filo(2),
+                        fihi(0), fihi(1), fihi(2),
+                        &ratio[0],
+                        cdata->getPointer(0, i, d),
+                        fdata->getPointer(0, i, d));
+                  } else if (axis == 1) {
+                     F77_FUNC(conrefoutfacedoub3d1, CONREFOUTFACEDOUB3D1) (
+                        ifirstc(0), ifirstc(1), ifirstc(2),
+                        ilastc(0), ilastc(1), ilastc(2),
+                        ifirstf(0), ifirstf(1), ifirstf(2),
+                        ilastf(0), ilastf(1), ilastf(2),
+                        cilo(0), cilo(1), cilo(2),
+                        cihi(0), cihi(1), cihi(2),
+                        filo(0), filo(1), filo(2),
+                        fihi(0), fihi(1), fihi(2),
+                        &ratio[0],
+                        cdata->getPointer(1, i, d),
+                        fdata->getPointer(1, i, d));
+                  } else if (axis == 2) {
+                     F77_FUNC(conrefoutfacedoub3d2, CONREFOUTFACEDOUB3D2) (
+                        ifirstc(0), ifirstc(1), ifirstc(2),
+                        ilastc(0), ilastc(1), ilastc(2),
+                        ifirstf(0), ifirstf(1), ifirstf(2),
+                        ilastf(0), ilastf(1), ilastf(2),
+                        cilo(0), cilo(1), cilo(2),
+                        cihi(0), cihi(1), cihi(2),
+                        filo(0), filo(1), filo(2),
+                        fihi(0), fihi(1), fihi(2),
+                        &ratio[0],
+                        cdata->getPointer(2, i, d),
+                        fdata->getPointer(2, i, d));
+                  }
+               } else {
+                  TBOX_ERROR(
+                     "OuterfaceDoubleConstantRefine::refine dimension > 3 not supported"
+                     << std::endl);
+               }
+            }
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuterfaceDoubleConstantRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuterfaceDoubleConstantRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for outerface double data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuterfaceDoubleConstantRefine
+#define included_pdat_OuterfaceDoubleConstantRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class OuterfaceDoubleConstantRefine implements constant
+ * interpolation for outerface double patch data defined over a
+ * mesh.  It is derived from the xfer::RefineOperator base class.
+ * The numerical operations for interpolation use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is outerface double, and the string is "CONSTANT_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class OuterfaceDoubleConstantRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit OuterfaceDoubleConstantRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~OuterfaceDoubleConstantRefine();
+
+   /**
+    * Return true if the variable and name string match outerface
+    * double constant interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of outerface double constant interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the constant interpolation operator is the vector
+    * of zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the outerface double constant
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the boxes contained in fine_overlap.
+    * It is assumed that the coarse patch contains sufficient data for the
+    * stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuterfaceDoubleLinearTimeInterpolateOp.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuterfaceDoubleLinearTimeInterpolateOp.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,270 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for double outerface patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuterfaceDoubleLinearTimeInterpolateOp_C
+#define included_pdat_OuterfaceDoubleLinearTimeInterpolateOp_C
+
+#include "SAMRAI/pdat/OuterfaceDoubleLinearTimeInterpolateOp.h"
+
+#include "SAMRAI/pdat/OuterfaceData.h"
+#include "SAMRAI/pdat/OuterfaceVariable.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in lintimint1d.f:
+void F77_FUNC(lintimeintoutfacedoub1d, LINTIMEINTOUTFACEDOUB1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+// in lintimint2d.f:
+void F77_FUNC(lintimeintoutfacedoub2d0, LINTIMEINTOUTFACEDOUB2D0) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+void F77_FUNC(lintimeintoutfacedoub2d1, LINTIMEINTOUTFACEDOUB2D1) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+// in lintimint3d.f:
+void F77_FUNC(lintimeintoutfacedoub3d0, LINTIMEINTOUTFACEDOUB3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+void F77_FUNC(lintimeintoutfacedoub3d1, LINTIMEINTOUTFACEDOUB3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+void F77_FUNC(lintimeintoutfacedoub3d2, LINTIMEINTOUTFACEDOUB3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+OuterfaceDoubleLinearTimeInterpolateOp::OuterfaceDoubleLinearTimeInterpolateOp():
+   xfer::TimeInterpolateOperator()
+{
+}
+
+OuterfaceDoubleLinearTimeInterpolateOp::~OuterfaceDoubleLinearTimeInterpolateOp()
+{
+}
+
+bool OuterfaceDoubleLinearTimeInterpolateOp::findTimeInterpolateOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   const tbox::Pointer<OuterfaceVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == "STD_LINEAR_TIME_INTERPOLATE")) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+void OuterfaceDoubleLinearTimeInterpolateOp::timeInterpolate(
+   hier::PatchData& dst_data,
+   const hier::Box& where,
+   const hier::PatchData& src_data_old,
+   const hier::PatchData& src_data_new) const
+{
+   const tbox::Dimension& dim(where.getDim());
+
+   const OuterfaceData<double>* old_dat =
+      dynamic_cast<const OuterfaceData<double> *>(&src_data_old);
+   const OuterfaceData<double>* new_dat =
+      dynamic_cast<const OuterfaceData<double> *>(&src_data_new);
+   OuterfaceData<double>* dst_dat =
+      dynamic_cast<OuterfaceData<double> *>(&dst_data);
+
+   TBOX_ASSERT(old_dat != NULL);
+   TBOX_ASSERT(new_dat != NULL);
+   TBOX_ASSERT(dst_dat != NULL);
+   TBOX_ASSERT(where * old_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * new_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * dst_dat->getGhostBox() == where);
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst_data, where, src_data_old, src_data_new);
+
+   const hier::Index old_ilo = old_dat->getGhostBox().lower();
+   const hier::Index old_ihi = old_dat->getGhostBox().upper();
+   const hier::Index new_ilo = new_dat->getGhostBox().lower();
+   const hier::Index new_ihi = new_dat->getGhostBox().upper();
+
+   const hier::Index dst_ilo = dst_dat->getGhostBox().lower();
+   const hier::Index dst_ihi = dst_dat->getGhostBox().upper();
+
+   const hier::Index ifirst = where.lower();
+   const hier::Index ilast = where.upper();
+
+   const double old_time = old_dat->getTime();
+   const double new_time = new_dat->getTime();
+   const double dst_time = dst_dat->getTime();
+
+   TBOX_ASSERT((old_time < dst_time ||
+                tbox::MathUtilities<double>::equalEps(old_time, dst_time)) &&
+      (dst_time < new_time ||
+       tbox::MathUtilities<double>::equalEps(dst_time, new_time)));
+
+   double tfrac = dst_time - old_time;
+   double denom = new_time - old_time;
+   if (denom > tbox::MathUtilities<double>::getMin()) {
+      tfrac /= denom;
+   } else {
+      tfrac = 0.0;
+   }
+
+   for (int d = 0; d < dst_dat->getDepth(); d++) {
+      // loop over lower and upper outerface arrays
+      for (int i = 0; i < 2; i++) {
+         if (dim == tbox::Dimension(1)) {
+            F77_FUNC(lintimeintoutfacedoub1d,
+               LINTIMEINTOUTFACEDOUB1D) (ifirst(0), ilast(0),
+               old_ilo(0), old_ihi(0),
+               new_ilo(0), new_ihi(0),
+               dst_ilo(0), dst_ihi(0),
+               tfrac,
+               old_dat->getPointer(0, i, d),
+               new_dat->getPointer(0, i, d),
+               dst_dat->getPointer(0, i, d));
+         } else if (dim == tbox::Dimension(2)) {
+            F77_FUNC(lintimeintoutfacedoub2d0,
+               LINTIMEINTOUTFACEDOUB2D0) (ifirst(0), ifirst(1), ilast(0),
+               ilast(1),
+               old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+               new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+               dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+               tfrac,
+               old_dat->getPointer(0, i, d),
+               new_dat->getPointer(0, i, d),
+               dst_dat->getPointer(0, i, d));
+            F77_FUNC(lintimeintoutfacedoub2d1,
+               LINTIMEINTOUTFACEDOUB2D1) (ifirst(0), ifirst(1), ilast(0),
+               ilast(1),
+               old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+               new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+               dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+               tfrac,
+               old_dat->getPointer(1, i, d),
+               new_dat->getPointer(1, i, d),
+               dst_dat->getPointer(1, i, d));
+         } else if (dim == tbox::Dimension(3)) {
+            F77_FUNC(lintimeintoutfacedoub3d0,
+               LINTIMEINTOUTFACEDOUB3D0) (ifirst(0), ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(0, i, d),
+               new_dat->getPointer(0, i, d),
+               dst_dat->getPointer(0, i, d));
+            F77_FUNC(lintimeintoutfacedoub3d1,
+               LINTIMEINTOUTFACEDOUB3D1) (ifirst(0), ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(1, i, d),
+               new_dat->getPointer(1, i, d),
+               dst_dat->getPointer(1, i, d));
+            F77_FUNC(lintimeintoutfacedoub3d2,
+               LINTIMEINTOUTFACEDOUB3D2) (ifirst(0), ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(2, i, d),
+               new_dat->getPointer(2, i, d),
+               dst_dat->getPointer(2, i, d));
+         } else {
+            TBOX_ERROR(
+               "OuterfaceDoubleLinearTimeInterpolateOp::TimeInterpolate dim > 3 not supported"
+               << std::endl);
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuterfaceDoubleLinearTimeInterpolateOp.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuterfaceDoubleLinearTimeInterpolateOp.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for double outerface patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuterfaceDoubleLinearTimeInterpolateOp
+#define included_pdat_OuterfaceDoubleLinearTimeInterpolateOp
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class OuterfaceDoubleLinearTimeInterpolateOp implements standard
+ * linear time interpolation for double outerface patch data. Recall
+ * that outerface patch data uses the same indices as face-centered data
+ * but the data only exists on the faces that coincide with patch boundaries.
+ * It is derived from the xfer::TimeInterpolateOperator base class.
+ * The interpolation uses FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is an outerface double type, and the string is
+ * "STD_LINEAR_TIME_INTERPOLATE".
+ *
+ * @see xfer::TimeInterpolateOperator
+ */
+
+class OuterfaceDoubleLinearTimeInterpolateOp:
+   public xfer::TimeInterpolateOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   OuterfaceDoubleLinearTimeInterpolateOp();
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~OuterfaceDoubleLinearTimeInterpolateOp();
+
+   /**
+    * Return true if the variable and name string match the standard
+    * double outerface interpolation; otherwise, return false.
+    */
+   bool
+   findTimeInterpolateOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Perform linear time interpolation between two double outerface
+    * patch data sources and place result in the destination patch data.
+    * Time interpolation is performed on the intersection of the destination
+    * patch data and the input box.  The time to which data is interpolated
+    * is provided by the destination data.
+    */
+   void
+   timeInterpolate(
+      hier::PatchData& dst_data,
+      const hier::Box& where,
+      const hier::PatchData& src_data_old,
+      const hier::PatchData& src_data_new) const;
+
+private:
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuterfaceFloatConstantRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuterfaceFloatConstantRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,287 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for outerface float data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuterfaceFloatConstantRefine_C
+#define included_pdat_OuterfaceFloatConstantRefine_C
+
+#include "SAMRAI/pdat/OuterfaceFloatConstantRefine.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/OuterfaceData.h"
+#include "SAMRAI/pdat/OuterfaceVariable.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in conrefine1d.f:
+void F77_FUNC(conrefoutfaceflot1d, CONREFOUTFACEFLOT1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const float *, float *);
+// in conrefine2d.f:
+void F77_FUNC(conrefoutfaceflot2d0, CONREFOUTFACEFLOT2D0) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const float *, float *);
+void F77_FUNC(conrefoutfaceflot2d1, CONREFOUTFACEFLOT2D1) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const float *, float *);
+// in conrefine3d.f:
+void F77_FUNC(conrefoutfaceflot3d0, CONREFOUTFACEFLOT3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const float *, float *);
+void F77_FUNC(conrefoutfaceflot3d1, CONREFOUTFACEFLOT3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const float *, float *);
+void F77_FUNC(conrefoutfaceflot3d2, CONREFOUTFACEFLOT3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const float *, float *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+OuterfaceFloatConstantRefine::OuterfaceFloatConstantRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSTANT_REFINE"),
+   d_name_id("CONSTANT_REFINE")
+{
+
+}
+
+OuterfaceFloatConstantRefine::~OuterfaceFloatConstantRefine()
+{
+}
+
+bool OuterfaceFloatConstantRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<OuterfaceVariable<float> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+OuterfaceFloatConstantRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int OuterfaceFloatConstantRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+OuterfaceFloatConstantRefine::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void OuterfaceFloatConstantRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   tbox::Pointer<OuterfaceData<float> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<OuterfaceData<float> >
+   fdata = fine.getPatchData(dst_component);
+
+   const pdat::FaceOverlap* t_overlap =
+      dynamic_cast<const pdat::FaceOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*this, fine, coarse, ratio);
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   for (int axis = 0; axis < dim.getValue(); axis++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(axis);
+
+      for (hier::BoxList::Iterator b(boxes); b; b++) {
+
+         const hier::Box& face_box = b();
+         TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, face_box);
+
+         hier::Box fine_box(dim);
+         for (int i = 0; i < dim.getValue(); i++) {
+            fine_box.lower((axis + i) % dim.getValue()) = face_box.lower(i);
+            fine_box.upper((axis + i) % dim.getValue()) = face_box.upper(i);
+         }
+
+         fine_box.upper(axis) -= 1;
+
+         const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+         const hier::Index ifirstc = coarse_box.lower();
+         const hier::Index ilastc = coarse_box.upper();
+         const hier::Index ifirstf = fine_box.lower();
+         const hier::Index ilastf = fine_box.upper();
+
+         for (int d = 0; d < fdata->getDepth(); d++) {
+            // loop over lower and upper outerface arrays
+            for (int i = 0; i < 2; i++) {
+               if (dim == tbox::Dimension(1)) {
+                  F77_FUNC(conrefoutfaceflot1d, CONREFOUTFACEFLOT1D) (
+                     ifirstc(0), ilastc(0),
+                     ifirstf(0), ilastf(0),
+                     cilo(0), cihi(0),
+                     filo(0), fihi(0),
+                     &ratio[0],
+                     cdata->getPointer(0, i, d),
+                     fdata->getPointer(0, i, d));
+               } else if (dim == tbox::Dimension(2)) {
+                  if (axis == 0) {
+                     F77_FUNC(conrefoutfaceflot2d0, CONREFOUTFACEFLOT2D0) (
+                        ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                        ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                        cilo(0), cilo(1), cihi(0), cihi(1),
+                        filo(0), filo(1), fihi(0), fihi(1),
+                        &ratio[0],
+                        cdata->getPointer(0, i, d),
+                        fdata->getPointer(0, i, d));
+                  } else if (axis == 1) {
+                     F77_FUNC(conrefoutfaceflot2d1, CONREFOUTFACEFLOT2D1) (
+                        ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                        ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                        cilo(0), cilo(1), cihi(0), cihi(1),
+                        filo(0), filo(1), fihi(0), fihi(1),
+                        &ratio[0],
+                        cdata->getPointer(1, i, d),
+                        fdata->getPointer(1, i, d));
+                  }
+               } else if (dim == tbox::Dimension(3)) {
+                  if (axis == 0) {
+                     F77_FUNC(conrefoutfaceflot3d0, CONREFOUTFACEFLOT3D0) (
+                        ifirstc(0), ifirstc(1), ifirstc(2),
+                        ilastc(0), ilastc(1), ilastc(2),
+                        ifirstf(0), ifirstf(1), ifirstf(2),
+                        ilastf(0), ilastf(1), ilastf(2),
+                        cilo(0), cilo(1), cilo(2),
+                        cihi(0), cihi(1), cihi(2),
+                        filo(0), filo(1), filo(2),
+                        fihi(0), fihi(1), fihi(2),
+                        &ratio[0],
+                        cdata->getPointer(0, i, d),
+                        fdata->getPointer(0, i, d));
+                  } else if (axis == 1) {
+                     F77_FUNC(conrefoutfaceflot3d1, CONREFOUTFACEFLOT3D1) (
+                        ifirstc(0), ifirstc(1), ifirstc(2),
+                        ilastc(0), ilastc(1), ilastc(2),
+                        ifirstf(0), ifirstf(1), ifirstf(2),
+                        ilastf(0), ilastf(1), ilastf(2),
+                        cilo(0), cilo(1), cilo(2),
+                        cihi(0), cihi(1), cihi(2),
+                        filo(0), filo(1), filo(2),
+                        fihi(0), fihi(1), fihi(2),
+                        &ratio[0],
+                        cdata->getPointer(1, i, d),
+                        fdata->getPointer(1, i, d));
+                  } else if (axis == 2) {
+                     F77_FUNC(conrefoutfaceflot3d2, CONREFOUTFACEFLOT3D2) (
+                        ifirstc(0), ifirstc(1), ifirstc(2),
+                        ilastc(0), ilastc(1), ilastc(2),
+                        ifirstf(0), ifirstf(1), ifirstf(2),
+                        ilastf(0), ilastf(1), ilastf(2),
+                        cilo(0), cilo(1), cilo(2),
+                        cihi(0), cihi(1), cihi(2),
+                        filo(0), filo(1), filo(2),
+                        fihi(0), fihi(1), fihi(2),
+                        &ratio[0],
+                        cdata->getPointer(2, i, d),
+                        fdata->getPointer(2, i, d));
+                  }
+               } else {
+                  TBOX_ERROR(
+                     "OuterfaceFloatConstantRefine::refine dimension > 3 not supported"
+                     << std::endl);
+               }
+            }
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuterfaceFloatConstantRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuterfaceFloatConstantRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for outerface float data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuterfaceFloatConstantRefine
+#define included_pdat_OuterfaceFloatConstantRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class OuterfaceFloatConstantRefine implements constant
+ * interpolation for outerface float patch data defined over a
+ * mesh.  It is derived from the xfer::RefineOperator base class.
+ * The numerical operations for interpolation use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is outerface float, and the string is "CONSTANT_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class OuterfaceFloatConstantRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit OuterfaceFloatConstantRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~OuterfaceFloatConstantRefine();
+
+   /**
+    * Return true if the variable and name string match outerface
+    * float constant interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of outerface float constant interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the constant interpolation operator is the vector
+    * of zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the outerface float constant
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the boxes contained in fine_overlap.
+    * It is assumed that the coarse patch contains sufficient data for the
+    * stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuterfaceFloatLinearTimeInterpolateOp.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuterfaceFloatLinearTimeInterpolateOp.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,270 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for float outerface patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuterfaceFloatLinearTimeInterpolateOp_C
+#define included_pdat_OuterfaceFloatLinearTimeInterpolateOp_C
+
+#include "SAMRAI/pdat/OuterfaceFloatLinearTimeInterpolateOp.h"
+
+#include "SAMRAI/pdat/OuterfaceData.h"
+#include "SAMRAI/pdat/OuterfaceVariable.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in lintimint1d.f:
+void F77_FUNC(lintimeintoutfacefloat1d, LINTIMEINTOUTFACEFLOAT1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+// in lintimint2d.f:
+void F77_FUNC(lintimeintoutfacefloat2d0,
+              LINTIMEINTOUTFACEFLOAT2D0) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+void F77_FUNC(lintimeintoutfacefloat2d1,
+              LINTIMEINTOUTFACEFLOAT2D1) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+// in lintimint3d.f:
+void F77_FUNC(lintimeintoutfacefloat3d0,
+              LINTIMEINTOUTFACEFLOAT3D0) (const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+void F77_FUNC(lintimeintoutfacefloat3d1,
+              LINTIMEINTOUTFACEFLOAT3D1) (const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+void F77_FUNC(lintimeintoutfacefloat3d2,
+              LINTIMEINTOUTFACEFLOAT3D2) (const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+OuterfaceFloatLinearTimeInterpolateOp::OuterfaceFloatLinearTimeInterpolateOp():
+   xfer::TimeInterpolateOperator()
+{
+}
+
+OuterfaceFloatLinearTimeInterpolateOp::~OuterfaceFloatLinearTimeInterpolateOp()
+{
+}
+
+bool OuterfaceFloatLinearTimeInterpolateOp::findTimeInterpolateOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   const tbox::Pointer<OuterfaceVariable<float> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == "STD_LINEAR_TIME_INTERPOLATE")) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+void OuterfaceFloatLinearTimeInterpolateOp::timeInterpolate(
+   hier::PatchData& dst_data,
+   const hier::Box& where,
+   const hier::PatchData& src_data_old,
+   const hier::PatchData& src_data_new) const
+{
+   const tbox::Dimension& dim(where.getDim());
+
+   const OuterfaceData<float>* old_dat =
+      dynamic_cast<const OuterfaceData<float> *>(&src_data_old);
+   const OuterfaceData<float>* new_dat =
+      dynamic_cast<const OuterfaceData<float> *>(&src_data_new);
+   OuterfaceData<float>* dst_dat =
+      dynamic_cast<OuterfaceData<float> *>(&dst_data);
+
+   TBOX_ASSERT(old_dat != NULL);
+   TBOX_ASSERT(new_dat != NULL);
+   TBOX_ASSERT(dst_dat != NULL);
+   TBOX_ASSERT(where * old_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * new_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * dst_dat->getGhostBox() == where);
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst_data, where, src_data_old, src_data_new);
+
+   const hier::Index old_ilo = old_dat->getGhostBox().lower();
+   const hier::Index old_ihi = old_dat->getGhostBox().upper();
+   const hier::Index new_ilo = new_dat->getGhostBox().lower();
+   const hier::Index new_ihi = new_dat->getGhostBox().upper();
+
+   const hier::Index dst_ilo = dst_dat->getGhostBox().lower();
+   const hier::Index dst_ihi = dst_dat->getGhostBox().upper();
+
+   const hier::Index ifirst = where.lower();
+   const hier::Index ilast = where.upper();
+
+   const double old_time = old_dat->getTime();
+   const double new_time = new_dat->getTime();
+   const double dst_time = dst_dat->getTime();
+
+   TBOX_ASSERT((old_time < dst_time ||
+                tbox::MathUtilities<double>::equalEps(old_time, dst_time)) &&
+      (dst_time < new_time ||
+       tbox::MathUtilities<double>::equalEps(dst_time, new_time)));
+
+   double tfrac = dst_time - old_time;
+   double denom = new_time - old_time;
+   if (denom > tbox::MathUtilities<double>::getMin()) {
+      tfrac /= denom;
+   } else {
+      tfrac = 0.0;
+   }
+
+   for (int d = 0; d < dst_dat->getDepth(); d++) {
+      // loop over lower and upper outerface arrays
+      for (int i = 0; i < 2; i++) {
+         if (dim == tbox::Dimension(1)) {
+            F77_FUNC(lintimeintoutfacefloat1d,
+               LINTIMEINTOUTFACEFLOAT1D) (ifirst(0), ilast(0),
+               old_ilo(0), old_ihi(0),
+               new_ilo(0), new_ihi(0),
+               dst_ilo(0), dst_ihi(0),
+               tfrac,
+               old_dat->getPointer(0, i, d),
+               new_dat->getPointer(0, i, d),
+               dst_dat->getPointer(0, i, d));
+         } else if (dim == tbox::Dimension(2)) {
+            F77_FUNC(lintimeintoutfacefloat2d0,
+               LINTIMEINTOUTFACEFLOAT2D0) (ifirst(0), ifirst(1), ilast(0),
+               ilast(1),
+               old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+               new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+               dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+               tfrac,
+               old_dat->getPointer(0, i, d),
+               new_dat->getPointer(0, i, d),
+               dst_dat->getPointer(0, i, d));
+            F77_FUNC(lintimeintoutfacefloat2d1,
+               LINTIMEINTOUTFACEFLOAT2D1) (ifirst(0), ifirst(1), ilast(0),
+               ilast(1),
+               old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+               new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+               dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+               tfrac,
+               old_dat->getPointer(1, i, d),
+               new_dat->getPointer(1, i, d),
+               dst_dat->getPointer(1, i, d));
+         } else if (dim == tbox::Dimension(3)) {
+            F77_FUNC(lintimeintoutfacefloat3d0,
+               LINTIMEINTOUTFACEFLOAT3D0) (ifirst(0), ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(0, i, d),
+               new_dat->getPointer(0, i, d),
+               dst_dat->getPointer(0, i, d));
+            F77_FUNC(lintimeintoutfacefloat3d1,
+               LINTIMEINTOUTFACEFLOAT3D1) (ifirst(0), ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(1, i, d),
+               new_dat->getPointer(1, i, d),
+               dst_dat->getPointer(1, i, d));
+            F77_FUNC(lintimeintoutfacefloat3d2,
+               LINTIMEINTOUTFACEFLOAT3D2) (ifirst(0), ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(2, i, d),
+               new_dat->getPointer(2, i, d),
+               dst_dat->getPointer(2, i, d));
+         } else {
+            TBOX_ERROR(
+               "OuterfaceFloatLinearTimeInterpolateOp::TimeInterpolate dim > 3 not supported"
+               << std::endl);
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuterfaceFloatLinearTimeInterpolateOp.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuterfaceFloatLinearTimeInterpolateOp.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for float outerface patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuterfaceFloatLinearTimeInterpolateOp
+#define included_pdat_OuterfaceFloatLinearTimeInterpolateOp
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class OuterfaceFloatLinearTimeInterpolateOp implements standard
+ * linear time interpolation for float outerface patch data. Recall
+ * that outerface patch data uses the same indices as face-centered data
+ * but the data only exists on the faces that coincide with patch boundaries.
+ * It is derived from the xfer::TimeInterpolateOperator base class.
+ * The interpolation uses FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is an outerface float type, and the string is
+ * "STD_LINEAR_TIME_INTERPOLATE".
+ *
+ * @see xfer::TimeInterpolateOperator
+ */
+
+class OuterfaceFloatLinearTimeInterpolateOp:
+   public xfer::TimeInterpolateOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   OuterfaceFloatLinearTimeInterpolateOp();
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~OuterfaceFloatLinearTimeInterpolateOp();
+
+   /**
+    * Return true if the variable and name string match the standard
+    * float outerface interpolation; otherwise, return false.
+    */
+   bool
+   findTimeInterpolateOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Perform linear time interpolation between two float outerface
+    * patch data sources and place result in the destination patch data.
+    * Time interpolation is performed on the intersection of the destination
+    * patch data and the input box.  The time to which data is interpolated
+    * is provided by the destination data.
+    */
+   void
+   timeInterpolate(
+      hier::PatchData& dst_data,
+      const hier::Box& where,
+      const hier::PatchData& src_data_old,
+      const hier::PatchData& src_data_new) const;
+
+private:
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuterfaceGeometry.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuterfaceGeometry.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,216 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuterfaceGeometry_C
+#define included_pdat_OuterfaceGeometry_C
+
+#include "SAMRAI/pdat/OuterfaceGeometry.h"
+#include "SAMRAI/pdat/FaceGeometry.h"
+#include "SAMRAI/pdat/FaceOverlap.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/OuterfaceGeometry.I"
+#endif
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * Create a face geometry object given the box and ghost cell width.	*
+ *									*
+ *************************************************************************
+ */
+
+OuterfaceGeometry::OuterfaceGeometry(
+   const hier::Box& box,
+   const hier::IntVector& ghosts):
+   d_box(box),
+   d_ghosts(ghosts)
+{
+   TBOX_ASSERT(ghosts.min() >= 0);
+}
+
+OuterfaceGeometry::~OuterfaceGeometry()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Attempt to calculate the intersection between two outerface centered	*
+ * box geometries.  The calculateOverlap() checks whether both arguments	*
+ * are outerface geometries; if so, it compuates the intersection.  If	*
+ * not, then it calls calculateOverlap() on the source object (if retry	*
+ * is true) to allow the source a chance to calculate the intersection.	*
+ * See the hier::BoxGeometry base class for more information about  *
+ * the protocol.  A pointer to null is returned if the intersection      *
+ * cannot be computed.                                                   *
+ *                                                                      *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap> OuterfaceGeometry::calculateOverlap(
+   const hier::BoxGeometry& dst_geometry,
+   const hier::BoxGeometry& src_geometry,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset,
+   const bool retry,
+   const hier::BoxList& dst_restrict_boxes) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(d_box, src_mask, src_offset);
+
+   const FaceGeometry* t_dst =
+      dynamic_cast<const FaceGeometry *>(&dst_geometry);
+   const OuterfaceGeometry* t_src =
+      dynamic_cast<const OuterfaceGeometry *>(&src_geometry);
+
+   tbox::Pointer<hier::BoxOverlap> over(NULL);
+   if ((t_src != NULL) && (t_dst != NULL)) {
+      over = doOverlap(*t_dst, *t_src, src_mask, overwrite_interior,
+            src_offset, dst_restrict_boxes);
+   } else if (retry) {
+      over = src_geometry.calculateOverlap(
+            dst_geometry, src_geometry, src_mask,
+            overwrite_interior, src_offset, false, dst_restrict_boxes);
+   }
+   return over;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Compute the overlap between a face geometry destination box and an	*
+ * outerface geometry source box.  The intersection algorithm is similar	*
+ * the face geometry algorithm except that only the borders of source	*
+ * are used in the intersection computation.				*
+ *									*
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap> OuterfaceGeometry::doOverlap(
+   const FaceGeometry& dst_geometry,
+   const OuterfaceGeometry& src_geometry,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset,
+   const hier::BoxList& dst_restrict_boxes)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(src_mask, src_offset);
+
+   const tbox::Dimension& dim(src_mask.getDim());
+
+   tbox::Array<hier::BoxList> dst_boxes(dim.getValue());
+
+   // Perform a quick-and-dirty intersection to see if the boxes might overlap
+
+   const hier::Box src_box =
+      hier::Box::grow(src_geometry.d_box, src_geometry.d_ghosts) * src_mask;
+   const hier::Box src_shift =
+      hier::Box::shift(src_box, src_offset);
+   const hier::Box dst_ghost =
+      hier::Box::grow(dst_geometry.getBox(), dst_geometry.getGhosts());
+
+   // Compute the intersection (if any) for each of the face directions
+
+   const hier::IntVector one_vector(dim, 1);
+
+   const hier::Box quick_check =
+      hier::Box::grow(src_shift, one_vector) * hier::Box::grow(dst_ghost,
+         one_vector);
+
+   if (!quick_check.empty()) {
+
+      const hier::Box mask_shift = hier::Box::shift(src_mask, src_offset);
+
+      for (int d = 0; d < dim.getValue(); d++) {
+
+         const hier::Box msk_face =
+            FaceGeometry::toFaceBox(mask_shift, d);
+         const hier::Box dst_face =
+            FaceGeometry::toFaceBox(dst_ghost, d);
+         const hier::Box src_face =
+            FaceGeometry::toFaceBox(src_shift, d);
+
+         const hier::Box together = dst_face * src_face;
+
+         if (!together.empty()) {
+
+            // Add lower face intersection (if any) to the box list
+            hier::Box low_face = src_face;
+            low_face.upper(0) = low_face.lower(0);  //+ghosts;
+            dst_boxes[d].unionBoxes(low_face * msk_face * dst_face);
+
+            // Add upper face intersection (if any) to the box list
+            hier::Box hig_face = src_face;
+            hig_face.lower(0) = hig_face.upper(0);  //-ghosts;
+            dst_boxes[d].unionBoxes(hig_face * msk_face * dst_face);
+
+            // Take away the interior of over_write interior is not set
+            if (!overwrite_interior) {
+               dst_boxes[d].removeIntersections(
+                  FaceGeometry::toFaceBox(dst_geometry.getBox(), d));
+            }
+
+         }  // if (!together.empty())
+
+         if (dst_restrict_boxes.size() && dst_boxes[d].size()) {
+            hier::BoxList face_restrict_boxes;
+            for (hier::BoxList::Iterator b(dst_restrict_boxes); b; b++) {
+               face_restrict_boxes.appendItem(FaceGeometry::toFaceBox(b(), d));
+            }
+            dst_boxes[d].intersectBoxes(face_restrict_boxes);
+         }
+
+      }  // loop over dim
+
+   } // if (!quick_check.empty())
+
+   // Create the face overlap data object using the boxes and source shift
+
+   hier::BoxOverlap* overlap = new FaceOverlap(dst_boxes, src_offset);
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set up a FaceOverlap oject using the given boxes and offset           *
+ *                                                                       *
+ *************************************************************************
+ */
+tbox::Pointer<hier::BoxOverlap>
+OuterfaceGeometry::setUpOverlap(
+   const hier::BoxList& boxes,
+   const hier::IntVector& src_offset) const
+{
+   const tbox::Dimension& dim(src_offset.getDim());
+   tbox::Array<hier::BoxList> dst_boxes(dim.getValue());
+
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         hier::Box face_box(FaceGeometry::toFaceBox(b(), d));
+         dst_boxes[d].appendItem(face_box);
+      }
+   }
+
+   // Create the face overlap data object using the boxes and source shift
+
+   hier::BoxOverlap* overlap = new FaceOverlap(dst_boxes, src_offset);
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuterfaceGeometry.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuterfaceGeometry.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,27 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+SAMRAI_INLINE_KEYWORD
+const hier::Box& OuterfaceGeometry::getBox() const
+{
+   return d_box;
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::IntVector& OuterfaceGeometry::getGhosts() const
+{
+   return d_ghosts;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuterfaceGeometry.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuterfaceGeometry.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,130 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuterfaceGeometry
+#define included_pdat_OuterfaceGeometry
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/FaceOverlap.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+class FaceGeometry;
+
+/*!
+ * Class OuterfaceGeometry manages the mapping between the AMR index
+ * and the outerface geometry index space.  It is a subclass of
+ * hier::BoxGeometry and it computes intersections between outerface
+ * box geometries and face or outerface box geometries for communication
+ * operations.
+ *
+ * See header file for OuterfaceData<DIM> class for a more detailed
+ * description of the data layout.
+ *
+ * @see hier::BoxGeometry
+ * @see pdat::FaceGeometry
+ * @see pdat::FaceOverlap
+ */
+
+class OuterfaceGeometry:public hier::BoxGeometry
+{
+public:
+   /*!
+    * The BoxOverlap implemenation for this geometry.
+    */
+   typedef FaceOverlap Overlap;
+
+   /*!
+    * @brief Construct an outerface geometry object given an AMR index
+    * space box and ghost cell width.
+    */
+   explicit OuterfaceGeometry(
+      const hier::Box& box,
+      const hier::IntVector& ghosts);
+
+   /*!
+    * @brief The virtual destructor does nothing interesting.
+    */
+   virtual ~OuterfaceGeometry();
+
+   /*!
+    * @brief Compute the overlap in face-centered index space on the
+    * boundaries of the source box geometry and the destination box geometry.
+    */
+   virtual tbox::Pointer<hier::BoxOverlap>
+   calculateOverlap(
+      const hier::BoxGeometry& dst_geometry,
+      const hier::BoxGeometry& src_geometry,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset,
+      const bool retry,
+      const hier::BoxList& dst_restrict_boxes = hier::BoxList()) const;
+
+   /*!
+    * @brief Set up a FaceOverlap object based on the given boxes and the
+    * offset.
+    */
+   virtual tbox::Pointer<hier::BoxOverlap>
+   setUpOverlap(
+      const hier::BoxList& boxes,
+      const hier::IntVector& src_offset) const;
+
+   /*!
+    * @brief Return the box for this outerface box geometry object.
+    */
+   const hier::Box&
+   getBox() const;
+
+   /*!
+    * @brief Return the ghost cell width for this outerface box geometry object.
+    */
+   const hier::IntVector&
+   getGhosts() const;
+
+private:
+   /**
+    * Function doOverlap() is the function that computes the overlap
+    * between the source and destination objects, where the source
+    * has outerface geometry and the destination face geometry.
+    */
+   static tbox::Pointer<hier::BoxOverlap>
+   doOverlap(
+      const FaceGeometry& dst_geometry,
+      const OuterfaceGeometry& src_geometry,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset,
+      const hier::BoxList& dst_restrict_boxes);
+
+   OuterfaceGeometry(
+      const OuterfaceGeometry&);                // not implemented
+   void
+   operator = (
+      const OuterfaceGeometry&);                    // not implemented
+
+   hier::Box d_box;
+   hier::IntVector d_ghosts;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/OuterfaceGeometry.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuterfaceIntegerConstantRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuterfaceIntegerConstantRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,287 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for outerface int data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuterfaceIntegerConstantRefine_C
+#define included_pdat_OuterfaceIntegerConstantRefine_C
+
+#include "SAMRAI/pdat/OuterfaceIntegerConstantRefine.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/OuterfaceData.h"
+#include "SAMRAI/pdat/OuterfaceVariable.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in conrefine1d.f:
+void F77_FUNC(conrefoutfaceintg1d, CONREFOUTFACEINTG1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const int *, int *);
+// in conrefine2d.f:
+void F77_FUNC(conrefoutfaceintg2d0, CONREFOUTFACEINTG2D0) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const int *, int *);
+void F77_FUNC(conrefoutfaceintg2d1, CONREFOUTFACEINTG2D1) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const int *, int *);
+// in conrefine3d.f:
+void F77_FUNC(conrefoutfaceintg3d0, CONREFOUTFACEINTG3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const int *, int *);
+void F77_FUNC(conrefoutfaceintg3d1, CONREFOUTFACEINTG3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const int *, int *);
+void F77_FUNC(conrefoutfaceintg3d2, CONREFOUTFACEINTG3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const int *, int *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+OuterfaceIntegerConstantRefine::OuterfaceIntegerConstantRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSTANT_REFINE"),
+   d_name_id("CONSTANT_REFINE")
+{
+
+}
+
+OuterfaceIntegerConstantRefine::~OuterfaceIntegerConstantRefine()
+{
+}
+
+bool OuterfaceIntegerConstantRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<OuterfaceVariable<int> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+OuterfaceIntegerConstantRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int OuterfaceIntegerConstantRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+OuterfaceIntegerConstantRefine::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void OuterfaceIntegerConstantRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   tbox::Pointer<OuterfaceData<int> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<OuterfaceData<int> >
+   fdata = fine.getPatchData(dst_component);
+
+   const pdat::FaceOverlap* t_overlap =
+      dynamic_cast<const pdat::FaceOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*this, fine, coarse, ratio);
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   for (int axis = 0; axis < dim.getValue(); axis++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(axis);
+
+      for (hier::BoxList::Iterator b(boxes); b; b++) {
+
+         const hier::Box& face_box = b();
+         TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, face_box);
+
+         hier::Box fine_box(dim);
+         for (int i = 0; i < dim.getValue(); i++) {
+            fine_box.lower((axis + i) % dim.getValue()) = face_box.lower(i);
+            fine_box.upper((axis + i) % dim.getValue()) = face_box.upper(i);
+         }
+
+         fine_box.upper(axis) -= 1;
+
+         const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+         const hier::Index ifirstc = coarse_box.lower();
+         const hier::Index ilastc = coarse_box.upper();
+         const hier::Index ifirstf = fine_box.lower();
+         const hier::Index ilastf = fine_box.upper();
+
+         for (int d = 0; d < fdata->getDepth(); d++) {
+            // loop over lower and upper outerface arrays
+            for (int i = 0; i < 2; i++) {
+               if (dim == tbox::Dimension(1)) {
+                  F77_FUNC(conrefoutfaceintg1d, CONREFOUTFACEINTG1D) (
+                     ifirstc(0), ilastc(0),
+                     ifirstf(0), ilastf(0),
+                     cilo(0), cihi(0),
+                     filo(0), fihi(0),
+                     &ratio[0],
+                     cdata->getPointer(0, i, d),
+                     fdata->getPointer(0, i, d));
+               } else if (dim == tbox::Dimension(2)) {
+                  if (axis == 0) {
+                     F77_FUNC(conrefoutfaceintg2d0, CONREFOUTFACEINTG2D0) (
+                        ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                        ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                        cilo(0), cilo(1), cihi(0), cihi(1),
+                        filo(0), filo(1), fihi(0), fihi(1),
+                        &ratio[0],
+                        cdata->getPointer(0, i, d),
+                        fdata->getPointer(0, i, d));
+                  } else if (axis == 1) {
+                     F77_FUNC(conrefoutfaceintg2d1, CONREFOUTFACEINTG2D1) (
+                        ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                        ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                        cilo(0), cilo(1), cihi(0), cihi(1),
+                        filo(0), filo(1), fihi(0), fihi(1),
+                        &ratio[0],
+                        cdata->getPointer(1, i, d),
+                        fdata->getPointer(1, i, d));
+                  }
+               } else if (dim == tbox::Dimension(3)) {
+                  if (axis == 0) {
+                     F77_FUNC(conrefoutfaceintg3d0, CONREFOUTFACEINTG3D0) (
+                        ifirstc(0), ifirstc(1), ifirstc(2),
+                        ilastc(0), ilastc(1), ilastc(2),
+                        ifirstf(0), ifirstf(1), ifirstf(2),
+                        ilastf(0), ilastf(1), ilastf(2),
+                        cilo(0), cilo(1), cilo(2),
+                        cihi(0), cihi(1), cihi(2),
+                        filo(0), filo(1), filo(2),
+                        fihi(0), fihi(1), fihi(2),
+                        &ratio[0],
+                        cdata->getPointer(0, i, d),
+                        fdata->getPointer(0, i, d));
+                  } else if (axis == 1) {
+                     F77_FUNC(conrefoutfaceintg3d1, CONREFOUTFACEINTG3D1) (
+                        ifirstc(0), ifirstc(1), ifirstc(2),
+                        ilastc(0), ilastc(1), ilastc(2),
+                        ifirstf(0), ifirstf(1), ifirstf(2),
+                        ilastf(0), ilastf(1), ilastf(2),
+                        cilo(0), cilo(1), cilo(2),
+                        cihi(0), cihi(1), cihi(2),
+                        filo(0), filo(1), filo(2),
+                        fihi(0), fihi(1), fihi(2),
+                        &ratio[0],
+                        cdata->getPointer(1, i, d),
+                        fdata->getPointer(1, i, d));
+                  } else if (axis == 2) {
+                     F77_FUNC(conrefoutfaceintg3d2, CONREFOUTFACEINTG3D2) (
+                        ifirstc(0), ifirstc(1), ifirstc(2),
+                        ilastc(0), ilastc(1), ilastc(2),
+                        ifirstf(0), ifirstf(1), ifirstf(2),
+                        ilastf(0), ilastf(1), ilastf(2),
+                        cilo(0), cilo(1), cilo(2),
+                        cihi(0), cihi(1), cihi(2),
+                        filo(0), filo(1), filo(2),
+                        fihi(0), fihi(1), fihi(2),
+                        &ratio[0],
+                        cdata->getPointer(2, i, d),
+                        fdata->getPointer(2, i, d));
+                  }
+               } else {
+                  TBOX_ERROR(
+                     "OuterfaceIntegerConstantRefine::refine dimension > 3 not supported"
+                     << std::endl);
+               }
+            }
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuterfaceIntegerConstantRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuterfaceIntegerConstantRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for outerface integer data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuterfaceIntegerConstantRefine
+#define included_pdat_OuterfaceIntegerConstantRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class OuterfaceIntegerConstantRefine implements constant
+ * interpolation for outerface integer patch data defined over a
+ * mesh.  It is derived from the xfer::RefineOperator base class.
+ * The numerical operations for interpolation use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is outerface integer, and the string is "CONSTANT_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class OuterfaceIntegerConstantRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit OuterfaceIntegerConstantRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~OuterfaceIntegerConstantRefine();
+
+   /**
+    * Return true if the variable and name string match outerface
+    * integer constant interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of outerface integer constant interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the constant interpolation operator is the vector
+    * of zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the outerface integer constant
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the boxes contained in fine_overlap.
+    * It is assumed that the coarse patch contains sufficient data for the
+    * stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuterfaceVariable.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuterfaceVariable.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuterfaceVariable_C
+#define included_pdat_OuterfaceVariable_C
+
+#include "SAMRAI/pdat/OuterfaceVariable.h"
+#include "SAMRAI/pdat/OuterfaceDataFactory.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * Constructor and destructor for face variable objects			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+OuterfaceVariable<TYPE>::OuterfaceVariable(
+   const tbox::Dimension& dim,
+   const std::string& name,
+   int depth):
+   hier::Variable(name,
+                  tbox::Pointer<hier::PatchDataFactory>(new
+                                                        OuterfaceDataFactory<
+                                                           TYPE>(dim,
+                                                                 depth)))
+{
+}
+
+template<class TYPE>
+OuterfaceVariable<TYPE>::~OuterfaceVariable()
+{
+}
+
+template<class TYPE>
+int OuterfaceVariable<TYPE>::getDepth() const
+{
+   tbox::Pointer<OuterfaceDataFactory<TYPE> > factory =
+      this->getPatchDataFactory();
+   TBOX_ASSERT(factory);
+   return factory->getDepth();
+}
+
+/*
+ *************************************************************************
+ *									*
+ * These are private and should not be used.  They are defined here	*
+ * because some template instantiation methods fail if some member	*
+ * functions are left undefined.						*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+OuterfaceVariable<TYPE>::OuterfaceVariable(
+   const OuterfaceVariable<TYPE>& foo):
+   hier::Variable(NULL, tbox::Pointer<SAMRAI::hier::PatchDataFactory>(NULL))
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void OuterfaceVariable<TYPE>::operator = (
+   const OuterfaceVariable<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuterfaceVariable.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuterfaceVariable.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,105 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuterfaceVariable
+#define included_pdat_OuterfaceVariable
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/tbox/Complex.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * @brief Class OuterfaceVariable<DIM> is a templated variable class
+ * used to define face-centered data quantities only on patch boundaries.
+ * It is a subclass of hier::Variable and is templated on the type
+ * of the underlying data (e.g., double, int, bool, etc.).
+ *
+ * Note that the data layout in the outerface data arrays matches the corresponding
+ * array sections provided by the face data implementation. See header file for
+ * the OuterfaceData<DIM> class for a more detailed description of the data layout.
+ *
+ * IMPORTANT: The class OutersideVariable<DIM> and associated "outerside
+ * data" classes define the same storage as this outerface variable class,
+ * except that the individual array indices are not permuted in the outerside
+ * data type.
+ *
+ * @see pdat::FaceData
+ * @see pdat::OuterfaceData
+ * @see pdat::OuterfaceDataFactory
+ * @see hier::Variable
+ */
+
+template<class TYPE>
+class OuterfaceVariable:public hier::Variable
+{
+public:
+   /*!
+    * @brief Create an outerface variable object having properties
+    * specified by the name and depth (i.e., number of data values
+    * at each index location).  The default depth is one.
+    *
+    * Note that The ghost cell width for all outerface data is currently
+    * fixed at zero; this may be changed in the future if needed.
+    */
+   explicit OuterfaceVariable(
+      const tbox::Dimension& dim,
+      const std::string& name,
+      int depth = 1);
+
+   /*!
+    * @brief Virtual destructor for outerface variable objects.
+    */
+   virtual ~OuterfaceVariable<TYPE>();
+
+   /*!
+    * @brief Return a boolean true value indicating that fine patch
+    * values take precedence on coarse-fine interfaces.
+    */
+   bool fineBoundaryRepresentsVariable() const {
+      return true;
+   }
+
+   /*!
+    * @brief Return true indicating that outerface data
+    * exists on the patch boundary.
+    */
+   bool dataLivesOnPatchBorder() const {
+      return true;
+   }
+
+   /*!
+    * @brief Return the the depth (number of components).
+    */
+   int
+   getDepth() const;
+
+private:
+   // neither of the following functions are implemented
+   OuterfaceVariable(
+      const OuterfaceVariable<TYPE>&);
+   void
+   operator = (
+      const OuterfaceVariable<TYPE>&);
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/OuterfaceVariable.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuternodeData.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuternodeData.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1011 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated outernode centered patch data type 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuternodeData_C
+#define included_pdat_OuternodeData_C
+
+#include "SAMRAI/pdat/OuternodeData.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeGeometry.h"
+#include "SAMRAI/pdat/NodeOverlap.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#define PDAT_OUTERNODEDATA_VERSION 1
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/OuternodeData.I"
+#endif
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor and destructor for outernode data objects.  The           *
+ * constructor simply initializes data variables and sets up the         *
+ * array data.                                                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+OuternodeData<TYPE>::OuternodeData(
+   const hier::Box& box,
+   int depth):
+   hier::PatchData(box, hier::IntVector::getZero(box.getDim())),
+   d_depth(depth)
+{
+   TBOX_ASSERT(depth > 0);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   for (int d = 0; d < dim.getValue(); d++) {
+
+      hier::Box nodebox = NodeGeometry::toNodeBox(box);
+
+      for (int dh = d + 1; dh < dim.getValue(); dh++) {
+
+         /*
+          * For dimensions higher than d, narrow the box down to avoid
+          * representing edge and corner nodes multiple times.
+          *
+          *  i.e.    Y--Y--Y  outernodeX0 defined on nodes (0,1)
+          *          |  |  |  outernodeX1 defined on nodes (2,1)
+          *          X--o--X  outernodeY0 defined on node  (0,0)-(2,0)
+          *          |  |  |  outernodeY1 defined on node  (0,2)-(2,2)
+          *          Y--Y--Y
+          *         node box
+          */
+         nodebox.lower(dh) += 1;
+         nodebox.upper(dh) -= 1;
+      }
+
+      hier::Box outernodebox = nodebox;
+      outernodebox.upper(d) = nodebox.lower(d);
+      outernodebox.lower(d) = nodebox.lower(d);
+      if (outernodebox.size() > 0) {
+         d_data[d][0].initializeArray(outernodebox, depth);
+      } else {
+         d_data[d][0].invalidateArray(dim);
+      }
+
+      outernodebox = nodebox;
+      outernodebox.lower(d) = nodebox.upper(d);
+      outernodebox.upper(d) = nodebox.upper(d);
+      d_data[d][1].initializeArray(outernodebox, depth);
+
+   }
+}
+
+template<class TYPE>
+OuternodeData<TYPE>::~OuternodeData()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The following are private and cannot be used, but they are defined    *
+ * here for compilers that require that every template declaration have  *
+ * a definition (a stupid requirement, if you ask me).                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+OuternodeData<TYPE>::OuternodeData(
+   const OuternodeData<TYPE>& foo):
+   hier::PatchData(foo.getBox(), foo.getGhostCellWidth())
+
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void OuternodeData<TYPE>::operator = (
+   const OuternodeData<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Perform a fast copy between an outernode patch data type (source) and *
+ * a node patch data type (destination) where the index spaces overlap.  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuternodeData<TYPE>::copy(
+   const hier::PatchData& src)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   const NodeData<TYPE> * const t_node_src =
+      dynamic_cast<const NodeData<TYPE> *>(&src);
+   const OuternodeData<TYPE> * const t_onode_src =
+      dynamic_cast<const OuternodeData<TYPE> *>(&src);
+
+   if (t_node_src != NULL) {
+      copyFromNode(*t_node_src);
+   } else if (t_onode_src != NULL) {
+      copyFromOuternode(*t_onode_src);
+   } else {
+      TBOX_ERROR("OuternodeData<dim>::copy error!\n"
+         << "Can copy only from NodeData<TYPE> or "
+         << "OuternodeData<TYPE> of the same "
+         << "dim and TYPE.");
+   }
+
+}
+
+template<class TYPE>
+void OuternodeData<TYPE>::copy2(
+   hier::PatchData& dst) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   NodeData<TYPE>* t_node_dst =
+      dynamic_cast<NodeData<TYPE> *>(&dst);
+   OuternodeData<TYPE>* t_onode_dst =
+      dynamic_cast<OuternodeData<TYPE> *>(&dst);
+
+   if (t_node_dst != NULL) {
+      copyToNode(*t_node_dst);
+   } else if (t_onode_dst != NULL) {
+      copyToOuternode(*t_onode_dst);
+   } else {
+      TBOX_ERROR("OuternodeData<dim>::copy2 error!\n"
+         << "Can copy only to NodeData<TYPE> or "
+         << "OuternodeData<TYPE> of the same "
+         << "dim and TYPE.");
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Copy data from the source into the destination according to the       *
+ * overlap descriptor.                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuternodeData<TYPE>::copy(
+   const hier::PatchData& src,
+   const hier::BoxOverlap& overlap)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   const NodeOverlap* t_overlap =
+      dynamic_cast<const NodeOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const NodeData<TYPE>* t_node_src =
+      dynamic_cast<const NodeData<TYPE> *>(&src);
+   const OuternodeData<TYPE>* t_onode_src =
+      dynamic_cast<const OuternodeData<TYPE> *>(&src);
+
+   if (t_node_src != NULL) {
+      copyFromNode(*t_node_src, *t_overlap);
+   } else if (t_onode_src != NULL) {
+      copyFromOuternode(*t_onode_src, *t_overlap);
+   } else {
+      TBOX_ERROR("OuternodeData<dim>::copy error!\n"
+         << "Can copy only from NodeData<TYPE> or "
+         << "OuternodeData<TYPE> of the same "
+         << "dim and TYPE.");
+   }
+
+}
+
+template<class TYPE>
+void OuternodeData<TYPE>::copy2(
+   hier::PatchData& dst,
+   const hier::BoxOverlap& overlap) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   const NodeOverlap* t_overlap =
+      dynamic_cast<const NodeOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   NodeData<TYPE>* t_node_dst =
+      dynamic_cast<NodeData<TYPE> *>(&dst);
+   OuternodeData<TYPE>* t_onode_dst =
+      dynamic_cast<OuternodeData<TYPE> *>(&dst);
+
+   if (t_node_dst != NULL) {
+      copyToNode(*t_node_dst, *t_overlap);
+   } else if (t_onode_dst != NULL) {
+      copyToOuternode(*t_onode_dst, *t_overlap);
+   } else {
+      TBOX_ERROR("OuternodeData<dim>::copy2 error!\n"
+         << "Can copy only to NodeData<TYPE> or "
+         << "OuternodeData<TYPE> of the same "
+         << "dim and TYPE.");
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Perform a fast copy from a node data object to this outernode data    *
+ * object at the specified depths, where their index spaces overlap.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuternodeData<TYPE>::copyDepth(
+   int dst_depth,
+   const NodeData<TYPE>& src,
+   int src_depth)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   const ArrayData<TYPE>& node_array = src.getArrayData();
+   for (int d = 0; d < getDim().getValue(); d++) {
+      for (int loc = 0; loc < 2; loc++) {
+         ArrayData<TYPE>& onode_array = d_data[d][loc];
+         onode_array.copyDepth(dst_depth,
+            node_array,
+            src_depth,
+            onode_array.getBox());
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Perform a fast copy to a node data object from this outernode data    *
+ * object at the specified depths, where their index spaces overlap.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuternodeData<TYPE>::copyDepth2(
+   int dst_depth,
+   NodeData<TYPE>& dst,
+   int src_depth) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   ArrayData<TYPE>& node_array = dst.getArrayData();
+   for (int d = 0; d < getDim().getValue(); d++) {
+      for (int loc = 0; loc < 2; loc++) {
+         const ArrayData<TYPE>& onode_array = d_data[d][loc];
+         node_array.copyDepth(dst_depth,
+            onode_array,
+            src_depth,
+            onode_array.getBox());
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Add source data to the destination according to overlap descriptor.   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuternodeData<TYPE>::sum(
+   const hier::PatchData& src,
+   const hier::BoxOverlap& overlap)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   const NodeOverlap* t_overlap =
+      dynamic_cast<const NodeOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const OuternodeData<TYPE>* t_onode_src =
+      dynamic_cast<const OuternodeData<TYPE> *>(&src);
+
+   // NOTE:  We assume this operation is only needed to
+   //        copy and add data to another outernode data
+   //        object.  If we ever need to provide this for node
+   //        data or other flavors of the copy operation, we
+   //        should refactor the routine similar to the way
+   //        the regular copy operations are implemented.
+   if (t_onode_src == NULL) {
+      TBOX_ERROR("OuternodeData<dim>::sum error!\n"
+         << "Can copy and add only from OuternodeData<TYPE> "
+         << "of the same dim and TYPE.");
+   } else {
+
+      const hier::IntVector& src_offset = t_overlap->getSourceOffset();
+
+      for (int src_d = 0; src_d < getDim().getValue(); src_d++) {
+         for (int src_p = 0; src_p < 2; src_p++) {
+
+            const ArrayData<TYPE>& src_array =
+               t_onode_src->d_data[src_d][src_p];
+            const hier::BoxList& box_list =
+               t_overlap->getDestinationBoxList();
+
+            for (int dst_d = 0; dst_d < getDim().getValue(); dst_d++) {
+               for (int dst_p = 0; dst_p < 2; dst_p++) {
+                  if (d_data[dst_d][dst_p].isInitialized()) {
+                     d_data[dst_d][dst_p].sum(
+                        src_array, box_list, src_offset);
+                  }
+               }
+            }
+
+         }
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Calculate the buffer space needed to pack/unpack messages on the box  *
+ * region using the overlap descriptor.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+bool OuternodeData<TYPE>::canEstimateStreamSizeFromBox() const
+{
+   return ArrayData<TYPE>::canEstimateStreamSizeFromBox();
+}
+
+template<class TYPE>
+int OuternodeData<TYPE>::getDataStreamSize(
+   const hier::BoxOverlap& overlap) const
+{
+   const NodeOverlap* t_overlap =
+      dynamic_cast<const NodeOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   int size = 0;
+   const hier::BoxList& boxlist = t_overlap->getDestinationBoxList();
+   const hier::IntVector& src_offset = t_overlap->getSourceOffset();
+   for (int d = 0; d < getDim().getValue(); d++) {
+      size += d_data[d][0].getDataStreamSize(boxlist, src_offset);
+      size += d_data[d][1].getDataStreamSize(boxlist, src_offset);
+   }
+   return size;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Pack/unpack data into/out of the message streams using the index      *
+ * space in the overlap descriptor.                                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuternodeData<TYPE>::packStream(
+   tbox::MessageStream& stream,
+   const hier::BoxOverlap& overlap) const
+{
+   const NodeOverlap* t_overlap =
+      dynamic_cast<const NodeOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::BoxList& dst_boxes = t_overlap->getDestinationBoxList();
+   const hier::IntVector& src_offset = t_overlap->getSourceOffset();
+   for (hier::BoxList::Iterator dst_box(dst_boxes);
+        dst_box; dst_box++) {
+      const hier::Box src_box =
+         hier::Box::shift(dst_box(), -src_offset);
+      for (int d = 0; d < getDim().getValue(); d++) {
+         for (int loc = 0; loc < 2; loc++) {
+            const hier::Box intersect = src_box * d_data[d][loc].getBox();
+            if (!intersect.empty()) {
+               const hier::Box pack_box =
+                  hier::Box::shift(intersect, src_offset);
+               d_data[d][loc].packStream(stream, pack_box, src_offset);
+            }
+         }
+      }
+   }
+}
+
+template<class TYPE>
+void OuternodeData<TYPE>::unpackStream(
+   tbox::MessageStream& stream,
+   const hier::BoxOverlap& overlap)
+{
+   const NodeOverlap* t_overlap =
+      dynamic_cast<const NodeOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::BoxList& dst_boxes = t_overlap->getDestinationBoxList();
+   const hier::IntVector& src_offset = t_overlap->getSourceOffset();
+   for (hier::BoxList::Iterator dst_box(dst_boxes);
+        dst_box; dst_box++) {
+      for (int d = 0; d < getDim().getValue(); d++) {
+         for (int f = 0; f < 2; f++) {
+            const hier::Box intersect =
+               dst_box() * d_data[d][f].getBox();
+            if (!intersect.empty()) {
+               d_data[d][f].unpackStream(stream, intersect, src_offset);
+            }
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Unpack data from the message stream and add to this outernode data    *
+ * object using the index space in the overlap descriptor.               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuternodeData<TYPE>::unpackStreamAndSum(
+   tbox::MessageStream& stream,
+   const hier::BoxOverlap& overlap)
+{
+   const NodeOverlap* t_overlap =
+      dynamic_cast<const NodeOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::BoxList& dst_boxes = t_overlap->getDestinationBoxList();
+   const hier::IntVector& src_offset = t_overlap->getSourceOffset();
+   for (int d = 0; d < getDim().getValue(); d++) {
+      for (hier::BoxList::Iterator dst_box(dst_boxes);
+           dst_box; dst_box++) {
+         for (int f = 0; f < 2; f++) {
+            const hier::Box intersect =
+               dst_box() * d_data[d][f].getBox();
+            if (!intersect.empty()) {
+               d_data[d][f].unpackStreamAndSum(stream, intersect, src_offset);
+            }
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Calculate the amount of memory space needed to represent the data     *
+ * for a  outernode centered grid.                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+size_t OuternodeData<TYPE>::getSizeOfData(
+   const hier::Box& box,
+   int depth)
+{
+   TBOX_ASSERT(depth > 0);
+
+   size_t size = 0;
+   for (int d = 0; d < box.getDim().getValue(); d++) {
+      hier::Box loc0 = NodeGeometry::toNodeBox(box);
+      hier::Box loc1 = NodeGeometry::toNodeBox(box);
+      loc0.upper(d) = box.lower(d);
+      loc0.lower(d) = box.lower(d);
+      loc1.lower(d) = box.upper(d);
+      loc1.upper(d) = box.upper(d);
+
+      for (int dh = d + 1; dh < box.getDim().getValue(); dh++) {
+
+         /*
+          * For dimensions higher than d, narrow the box down to avoid
+          * representing edge and corner nodes multiple times.
+          */
+         loc0.lower(dh) += 1;
+         loc0.upper(dh) -= 1;
+         loc1.lower(dh) += 1;
+         loc1.upper(dh) -= 1;
+      }
+      size += ArrayData<TYPE>::getSizeOfData(loc0, depth)
+         + ArrayData<TYPE>::getSizeOfData(loc1, depth);
+   }
+   return size;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute the box of valid node indices given values of                 *
+ * dimension and side designating the set of data indices.               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+hier::Box
+OuternodeData<TYPE>::getDataBox(
+   int face_normal,
+   int side)
+{
+   if (face_normal < 0 || face_normal >= getDim().getValue() || side < 0 || side > 1) {
+      TBOX_ERROR("Bad values for face_normal and/or side in\n"
+         "OuternodeData<dim>::getDataBox().\n");
+   }
+
+   /*
+    * We start with the full box and chop it down to the databox
+    * corresponding to the given face_normal and side.
+    */
+   hier::Box databox = NodeGeometry::toNodeBox(this->getBox());
+   const hier::IntVector& ghosts = this->getGhostCellWidth();
+
+   for (int dh = face_normal + 1; dh < getDim().getValue(); dh++) {
+
+      /*
+       * For dimensions higher than d, narrow the box down to avoid
+       * representing edge and corner nodes multiple times.
+       */
+      databox.lower(dh) += 1;
+      databox.upper(dh) -= 1;
+   }
+
+   if (side == 0) {
+      databox.upper(face_normal) = databox.lower(face_normal);
+      databox.lower(face_normal) = databox.lower(face_normal)
+         - ghosts(face_normal);
+   } else { // side == 1
+      databox.lower(face_normal) = databox.upper(face_normal);
+      databox.upper(face_normal) = databox.upper(face_normal)
+         + ghosts(face_normal);
+   }
+   return databox;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Fill the outernode centered box with the given value.                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuternodeData<TYPE>::fill(
+   const TYPE& t,
+   int d)
+{
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   for (int i = 0; i < getDim().getValue(); i++) {
+      if (d_data[i][0].isInitialized()) {
+         d_data[i][0].fill(t, d);
+      }
+      if (d_data[i][1].isInitialized()) {
+         d_data[i][1].fill(t, d);
+      }
+   }
+}
+
+template<class TYPE>
+void OuternodeData<TYPE>::fill(
+   const TYPE& t,
+   const hier::Box& box,
+   int d)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   for (int i = 0; i < getDim().getValue(); i++) {
+      if (d_data[i][0].isInitialized()) {
+         d_data[i][0].fill(t, NodeGeometry::toNodeBox(box), d);
+      }
+      if (d_data[i][1].isInitialized()) {
+         d_data[i][1].fill(t, NodeGeometry::toNodeBox(box), d);
+      }
+   }
+}
+
+template<class TYPE>
+void OuternodeData<TYPE>::fillAll(
+   const TYPE& t)
+{
+   for (int i = 0; i < getDim().getValue(); i++) {
+      if (d_data[i][0].isInitialized()) {
+         d_data[i][0].fillAll(t);
+      }
+      if (d_data[i][1].isInitialized()) {
+         d_data[i][1].fillAll(t);
+      }
+   }
+}
+
+template<class TYPE>
+void OuternodeData<TYPE>::fillAll(
+   const TYPE& t,
+   const hier::Box& box)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   for (int i = 0; i < getDim().getValue(); i++) {
+      if (d_data[i][0].isInitialized()) {
+         d_data[i][0].fillAll(t, NodeGeometry::toNodeBox(box));
+      }
+      if (d_data[i][1].isInitialized()) {
+         d_data[i][1].fillAll(t, NodeGeometry::toNodeBox(box));
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Perform a fast copy between an outernode patch data type (source) and *
+ * a node patch data type (destination) where the index spaces overlap.  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuternodeData<TYPE>::copyFromNode(
+   const NodeData<TYPE>& src)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   const ArrayData<TYPE>& node_array = src.getArrayData();
+   for (int d = 0; d < getDim().getValue(); d++) {
+      for (int loc = 0; loc < 2; loc++) {
+         ArrayData<TYPE>& onode_array = d_data[d][loc];
+         if (onode_array.isInitialized()) {
+            onode_array.copy(node_array, onode_array.getBox());
+         }
+      }
+   }
+}
+
+template<class TYPE>
+void OuternodeData<TYPE>::copyToNode(
+   NodeData<TYPE>& dst) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   ArrayData<TYPE>& node_array = dst.getArrayData();
+   for (int d = 0; d < getDim().getValue(); d++) {
+      for (int loc = 0; loc < 2; loc++) {
+         if (d_data[d][loc].isInitialized()) {
+            node_array.copy(d_data[d][loc], d_data[d][loc].getBox());
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Copy data from the source into the destination according to the       *
+ * overlap descriptor.                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuternodeData<TYPE>::copyFromNode(
+   const NodeData<TYPE>& src,
+   const NodeOverlap& overlap)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   const hier::IntVector& src_offset = overlap.getSourceOffset();
+   for (int d = 0; d < getDim().getValue(); d++) {
+      const hier::BoxList& box_list = overlap.getDestinationBoxList();
+      if (d_data[d][0].isInitialized()) {
+         d_data[d][0].copy(src.getArrayData(), box_list, src_offset);
+      }
+      if (d_data[d][1].isInitialized()) {
+         d_data[d][1].copy(src.getArrayData(), box_list, src_offset);
+      }
+   }
+}
+
+template<class TYPE>
+void OuternodeData<TYPE>::copyToNode(
+   NodeData<TYPE>& dst,
+   const NodeOverlap& overlap) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   const hier::IntVector& src_offset = overlap.getSourceOffset();
+   const hier::BoxList& box_list = overlap.getDestinationBoxList();
+   for (int d = 0; d < getDim().getValue(); d++) {
+      if (d_data[d][0].isInitialized()) {
+         dst.getArrayData().copy(d_data[d][0], box_list, src_offset);
+      }
+      if (d_data[d][1].isInitialized()) {
+         dst.getArrayData().copy(d_data[d][1], box_list, src_offset);
+      }
+   }
+}
+
+template<class TYPE>
+void OuternodeData<TYPE>::copyFromOuternode(
+   const OuternodeData<TYPE>& src)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   for (int src_d = 0; src_d < getDim().getValue(); src_d++) {
+      for (int src_p = 0; src_p < 2; src_p++) {
+
+         const ArrayData<TYPE>& src_array = src.d_data[src_d][src_p];
+
+         for (int dst_d = 0; dst_d < getDim().getValue(); dst_d++) {
+            for (int dst_p = 0; dst_p < 2; dst_p++) {
+               ArrayData<TYPE>& onode_array = d_data[dst_d][dst_p];
+               if (onode_array.isInitialized()) {
+                  onode_array.copy(src_array, onode_array.getBox());
+               }
+            }
+         }
+      }
+   }
+}
+
+template<class TYPE>
+void OuternodeData<TYPE>::copyFromOuternode(
+   const OuternodeData<TYPE>& src,
+   const NodeOverlap& overlap)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   const hier::IntVector& src_offset = overlap.getSourceOffset();
+   for (int src_d = 0; src_d < getDim().getValue(); src_d++) {
+      for (int src_p = 0; src_p < 2; src_p++) {
+
+         const ArrayData<TYPE>& src_array = src.d_data[src_d][src_p];
+         const hier::BoxList& box_list = overlap.getDestinationBoxList();
+
+         for (int dst_d = 0; dst_d < getDim().getValue(); dst_d++) {
+            for (int dst_p = 0; dst_p < 2; dst_p++) {
+               if (d_data[dst_d][dst_p].isInitialized()) {
+                  d_data[dst_d][dst_p].copy(src_array, box_list, src_offset);
+               }
+            }
+         }
+      }
+   }
+}
+
+template<class TYPE>
+void OuternodeData<TYPE>::copyToOuternode(
+   OuternodeData<TYPE>& dst) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   for (int dst_d = 0; dst_d < getDim().getValue(); dst_d++) {
+      for (int dst_p = 0; dst_p < 2; dst_p++) {
+
+         ArrayData<TYPE>& dst_array = dst.d_data[dst_d][dst_p];
+
+         for (int src_d = 0; src_d < getDim().getValue(); src_d++) {
+            for (int src_p = 0; src_p < 2; src_p++) {
+               if (d_data[src_d][src_p].isInitialized()) {
+                  dst_array.copy(d_data[src_d][src_p],
+                     d_data[src_d][src_p].getBox());
+               }
+            }
+         }
+      }
+   }
+}
+
+template<class TYPE>
+void OuternodeData<TYPE>::copyToOuternode(
+   OuternodeData<TYPE>& dst,
+   const NodeOverlap& overlap) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   const hier::IntVector& src_offset = overlap.getSourceOffset();
+   const hier::BoxList& box_list = overlap.getDestinationBoxList();
+
+   for (int dst_d = 0; dst_d < getDim().getValue(); dst_d++) {
+      for (int dst_p = 0; dst_p < 2; dst_p++) {
+
+         ArrayData<TYPE>& dst_array = dst.d_data[dst_d][dst_p];
+         for (int src_d = 0; src_d < getDim().getValue(); src_d++) {
+            for (int src_p = 0; src_p < 2; src_p++) {
+               if (d_data[src_d][src_p].isInitialized()) {
+                  dst_array.copy(d_data[src_d][src_p], box_list, src_offset);
+               }
+            }
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print routines for outernode centered arrays.                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuternodeData<TYPE>::print(
+   const hier::Box& box,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   for (int d = 0; d < d_depth; d++) {
+      print(box, d, os, prec);
+   }
+}
+
+template<class TYPE>
+void OuternodeData<TYPE>::print(
+   const hier::Box& box,
+   int depth,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   for (int axis = 0; axis < getDim().getValue(); axis++) {
+      os << "Array axis = " << axis << std::endl;
+      for (int side = 0; side < 2; side++) {
+         os << "Side = " << ((side == 0) ? "lower" : "upper") << std::endl;
+         printAxisSide(axis, side, box, depth, os, prec);
+      }
+   }
+}
+
+template<class TYPE>
+void OuternodeData<TYPE>::printAxisSide(
+   int face_normal,
+   int side,
+   const hier::Box& box,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+
+   for (int d = 0; d < d_depth; d++) {
+      os << "Array depth = " << d << std::endl;
+      printAxisSide(face_normal, side, box, d, os, prec);
+   }
+}
+
+template<class TYPE>
+void OuternodeData<TYPE>::printAxisSide(
+   int face_normal,
+   int side,
+   const hier::Box& box,
+   int depth,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+
+   const hier::Box nodebox = NodeGeometry::toNodeBox(box);
+   const hier::Box region = nodebox * d_data[face_normal][side].getBox();
+   os.precision(prec);
+   for (hier::Box::Iterator i(region); i; i++) {
+      os << "array" << i() << " = "
+      << d_data[face_normal][side](i(), depth) << std::endl << std::flush;
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Checks that class version and restart file version are equal.         *
+ * If so, reads in d_depth from the database.                            *
+ * Then has each item in d_data read in its data from the database.      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuternodeData<TYPE>::getSpecializedFromDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   int ver = database->getInteger("PDAT_OUTERNODEDATA_VERSION");
+   if (ver != PDAT_OUTERNODEDATA_VERSION) {
+      TBOX_ERROR("OuternodeData<dim>::getSpecializedFromDatabase error...\n"
+         << " : Restart file version different than class version" << std::endl);
+   }
+
+   d_depth = database->getInteger("d_depth");
+
+   tbox::Pointer<tbox::Database> array_database;
+   for (int i = 0; i < getDim().getValue(); i++) {
+      std::string array_name = "d_data" + tbox::Utilities::intToString(i)
+         + "_1";
+      if (database->keyExists(array_name)) {
+         array_database = database->getDatabase(array_name);
+         (d_data[i][0]).getFromDatabase(array_database);
+      }
+
+      array_name = "d_data" + tbox::Utilities::intToString(i) + "_2";
+      if (database->keyExists(array_name)) {
+         array_database = database->getDatabase(array_name);
+         (d_data[i][1]).getFromDatabase(array_database);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Writes out class version number, d_depth to the database.             *
+ * Then has each item in d_data write out its data to the database.      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OuternodeData<TYPE>::putSpecializedToDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   database->putInteger("PDAT_OUTERNODEDATA_VERSION",
+      PDAT_OUTERNODEDATA_VERSION);
+
+   database->putInteger("d_depth", d_depth);
+
+   std::string array_name;
+   tbox::Pointer<tbox::Database> array_database;
+   for (int i = 0; i < getDim().getValue(); i++) {
+      if (d_data[i][0].isInitialized()) {
+         array_name = "d_data" + tbox::Utilities::intToString(i) + "_1";
+         array_database = database->putDatabase(array_name);
+         (d_data[i][0]).putToDatabase(array_database);
+      }
+      if (d_data[i][1].isInitialized()) {
+         array_name = "d_data" + tbox::Utilities::intToString(i) + "_2";
+         array_database = database->putDatabase(array_name);
+         (d_data[i][1]).putToDatabase(array_database);
+      }
+   }
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuternodeData.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuternodeData.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,135 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated outernode centered patch data type 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int OuternodeData<TYPE>::getDepth() const
+{
+   return d_depth;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+bool OuternodeData<TYPE>::dataExists(
+   int face_normal) const
+{
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < getDim().getValue()));
+
+   return d_data[face_normal][0].isInitialized();
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE * OuternodeData<TYPE>::getPointer(
+   int face_normal,
+   int side,
+   int depth)
+{
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data[face_normal][side].getPointer(depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE * OuternodeData<TYPE>::getPointer(
+   int face_normal,
+   int side,
+   int depth) const
+{
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data[face_normal][side].getPointer(depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ArrayData<TYPE>
+& OuternodeData<TYPE>::getArrayData(
+   int face_normal,
+   int side)
+{
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+
+   return d_data[face_normal][side];
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const ArrayData<TYPE>
+& OuternodeData<TYPE>::getArrayData(
+   int face_normal,
+   int side) const
+{
+   TBOX_ASSERT((face_normal >= 0) && (face_normal < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+
+   return d_data[face_normal][side];
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE & OuternodeData<TYPE>::operator () (
+   const NodeIndex& i,
+   int depth)
+{
+   for (int d = getDim().getValue() - 1; d >= 0; d--) {
+      if (i[d] == d_data[d][0].getBox().lower()[d]) {
+         return d_data[d][0](i, depth);
+      }
+      if (i[d] == d_data[d][1].getBox().upper()[d]) {
+         return d_data[d][1](i, depth);
+      }
+   }
+
+   /*
+    * The following lines should only be executed if there's a bug
+    * in the Outernode datatype.
+    */
+   TBOX_ERROR("Bad index used to access outernode data\n"
+      << "Given index is not an outernode of this instance.\n");
+   return d_data[0][0](i, depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE &OuternodeData<TYPE>::operator () (
+   const NodeIndex& i,
+   int depth) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, i);
+
+   for (int d = getDim() - 1; d >= 0; d--) {
+      if (i[d] == d_data[d][0].getBox().lower()[d]) {
+         return d_data[d][0](i, depth);
+      }
+      if (i[d] == d_data[d][1].getBox().upper()[d]) {
+         return d_data[d][1](i, depth);
+      }
+   }
+   /*
+    * The following lines should only be executed if there's a bug
+    * in the Outernode datatype.
+    */
+   TBOX_ERROR("Bad index used to access outernode data\n"
+      << "Given index is not an outernode of this instance.\n");
+   return d_data[0][0](i, depth);
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuternodeData.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuternodeData.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,616 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated outernode centered patch data type 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuternodeData
+#define included_pdat_OuternodeData
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeIndex.h"
+#include "SAMRAI/pdat/NodeOverlap.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * @brief Class OuternodeData<DIM> provides an implementation for data defined
+ * at cell nodes on the boundaries of AMR patches.  It is derived from the
+ * hier::PatchData interface common to all SAMRAI patch data types.  Given
+ * a CELL-centered AMR index space box, an outernode data object represents
+ * data of some template TYPE and depth on the cell nodes on the boundary
+ * of the box.  Here, depth indicates the number of data values at each node
+ * index location.  The OuternodnodeGeometry class provides the translation
+ * between the standard SAMRAI cell-centered AMR index space and
+ * outernode-centered data.
+ *
+ * Outernode data is stored in 2*DIM arrays, each of which contains data
+ * associated with node indices on an upper or lower box face in some
+ * corrdinate direction.  The data layout in the outernode data arrays matches
+ * the corresponding array sections provided by the node data implementation.
+ * Where a node index falls on more than one box face (patch boundary edges and
+ * corners), the outernode data value belongs to only one data array so that
+ * there are no redundant data values.  Specifically, when DIM > 1, outernode
+ * data boxes are "trimmed" so that each node index that lives on more than one
+ * face on the box boundary will be associated with the face of the largest
+ * coordinate direction and only that face.  Within each array, data is stored
+ * in (i,...,k,d) order, where i,...,k indicates a spatial index and the d
+ * indicates the component depth at that location.  Memory allocation is
+ * in column-major ordering (e.g., Fortran style) so that the leftmost
+ * index runs fastest in memory.
+ *
+ * To illustrate the outernode data layout, in particular the "box trimming"
+ * that prevents redundant data values, we describe the data for a
+ * three-dimensional outernode data object instantiated over a box
+ * [l0:u0,l1:u1,l2:u2] in the standard SAMRAI cell-centered AMR index space.
+ *
+ * \verbatim
+ *
+ *    Here face normal directions 0, 1, and 2 can be thought of as X, Y, Z
+ *    respectively, and d is the data depth.
+ *
+ *    face normal 0:
+ *        lower    [ l0 : l0     , l1+1 : u1   , l2+1 : u2 , d ]
+ *        upper    [ u0+1 : u0+1 , l1+1 : u1   , l2+1 : u2 , d ]
+ *        Note: Boxes are trimmed at edges intersecting faces with
+ *              normal directions 1 and 2 so that node indices shared
+ *              with those faces appear in data arrays associated with
+ *              higher dimension faces.
+ *
+ *    face normal 1:
+ *        lower    [ l0 : u0+1   , l1 : l1     , l2+1 : u2 , d ]
+ *        upper    [ l0 : u0+1   , u1+1 : u1+1 , l2+1 : u2 , d ]
+ *        Note: Boxes are trimmed at edges intersecting faces with
+ *              normal direction 2 so that node indices shared
+ *              with those faces appear in data arrays associated with
+ *              higher dimension faces.
+ *
+ *    face normal 2:
+ *        lower    [ l0 : u0+1   , l1 : u1+1   , l2 : l2     , d ]
+ *        upper    [ l0 : u0+1   , l1 : u1+1   , u2+1 : u2+1 , d ]
+ *        Note: Boxes are not trimmed.
+ *
+ * \endverbatim
+ * Other spatial dimensions are represented similarly.
+ *
+ * The data type TYPE must define a default constructor (that takes no
+ * arguments) and also the assignment operator.
+ *
+ * @see pdat::ArrayData
+ * @see hier::PatchData
+ * @see pdat::OuternodeDataFactory
+ * @see pdat::OuternodeGeometry
+ * @see pdat::NodeIterator
+ * @see pdat::NodeIndex
+ */
+
+template<class TYPE>
+class OuternodeData:public hier::PatchData
+{
+public:
+   /*!
+    * @brief Calculate the amount of memory needed to represent outernode-
+    * centered data over a CELL-centered AMR index space box.
+    *
+    * This function assumes that the amount of
+    * memory needed for TYPE is sizeof(TYPE).
+    * If this is not the case, then a specialized function must be defined.
+    *
+    * @param box const Box reference describing the interior of the
+    *            standard CELL-centered index box over which the
+    *            outernode data object will be created.
+    *            Note: the ghost cell width is assumed to be zero.
+    * @param depth gives the number of data values for each
+    *              spatial location in the array.
+    */
+   static size_t
+   getSizeOfData(
+      const hier::Box& box,
+      int depth);
+
+   /*!
+    * @brief Constructor for an outernode data object.
+    *
+    * Note: Outernode data always has ghost cell width of zero.
+    *
+    * @param box const Box reference describing the interior of the
+    *            standard CELL-centered index box over which the
+    *            outernode data object will be created.
+    * @param depth gives the number of data values for each
+    *              spatial location in the array.
+    */
+   explicit OuternodeData(
+      const hier::Box& box,
+      int depth);
+
+   /*!
+    * @brief Virtual destructor for a outernode data object.
+    */
+   virtual ~OuternodeData<TYPE>();
+
+   /*!
+    * @brief Return the depth (e.g., the number of components at each spatial
+    * location) of the array.
+    */
+   int
+   getDepth() const;
+
+   /*!
+    * @brief Returns true if outernode data exists for the given
+    * face normal direction; false otherwise.
+    *
+    * @param face_normal  integer face normal direction for data,
+    *              must satisfy 0 <= face_normal < DIM
+    */
+   bool
+   dataExists(
+      int face_normal) const;
+
+   /*!
+    * @brief Return the box of valid node indices for
+    *        outernode data.  Note: the returned box
+    *        will reside in the @em node index space.
+    *
+    * @param face_normal  integer face normal direction for data,
+    *              must satisfy 0 <= face_normal < DIM
+    * @param side integer lower (0) or upper (1) side of outernode
+    *             data array
+    */
+   hier::Box
+   getDataBox(
+      int face_normal,
+      int side);
+
+   /*!
+    * @brief Get a pointer to the beginning of a particular face normal,
+    * side, and depth component of the outernode centered array.
+    *
+    * @param face_normal  integer face normal direction for data,
+    *              must satisfy 0 <= face_normal < DIM
+    * @param side integer lower (0) or upper (1) side of outernode
+    *             data array
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    */
+   TYPE *
+   getPointer(
+      int face_normal,
+      int side,
+      int depth = 0);
+
+   /*!
+    * @brief Get a const pointer to the beginning of a particular face
+    * normal, side, and depth component of the outernode centered array.
+    *
+    * @param face_normal  integer face normal direction for data,
+    *              must satisfy 0 <= face_normal < DIM
+    * @param side integer lower (0) or upper (1) side of outernode
+    *             data array
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    */
+   const TYPE *
+   getPointer(
+      int face_normal,
+      int side,
+      int depth = 0) const;
+
+   /*!
+    * @brief Return a reference to data entry corresponding
+    * to a given node index and depth.
+    *
+    * @param i const reference to NodeIndex, @em MUST be
+    *          an index on the outernode of the box.
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    */
+   TYPE&
+   operator () (
+      const NodeIndex& i,
+      int depth = 0);
+
+   /*!
+    * @brief Return a const reference to data entry corresponding
+    * to a given node index and depth.
+    *
+    * @param i const reference to NodeIndex, @em MUST be
+    *          an index on the outernode of the box.
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    */
+   const TYPE&
+   operator () (
+      const NodeIndex& i,
+      int depth = 0) const;
+
+   /*!
+    * @brief Return a reference to the array data object for
+    * face normal, and side index of the outernode centered array.
+    *
+    * @param face_normal  integer face normal direction for data,
+    *              must satisfy 0 <= face_normal < DIM
+    * @param side integer lower (0) or upper (1) side of outeredge
+    *             data array
+    */
+   ArrayData<TYPE>&
+   getArrayData(
+      int face_normal,
+      int side);
+
+   /*!
+    * @brief Return a const reference to the array data object for
+    * face normal, and side index of the outernode centered array.
+    *
+    * @param face_normal  integer face normal direction for data,
+    *              must satisfy 0 <= face_normal < DIM
+    * @param side integer lower (0) or upper (1) side of outeredge
+    *             data array
+    */
+   const ArrayData<TYPE>&
+   getArrayData(
+      int face_normal,
+      int side) const;
+
+   /*!
+    * @brief A fast copy from source to destination (i.e., this)
+    * patch data object.
+    *
+    * Data is copied where there is overlap in the underlying index space.
+    * The copy is performed on the interior plus the ghost cell width (for
+    * both the source and destination).  Currently, source data must be
+    * either NodeData or OuternodeData of the same DIM and TYPE.  If not,
+    * then an unrecoverable error results.
+    */
+   virtual void
+   copy(
+      const hier::PatchData& src);
+
+   /*!
+    * @brief A fast copy from source (i.e., this) to destination
+    * patch data object.
+    *
+    * Data is copied where there is overlap in the underlying index space.
+    * The copy is performed on the interior plus the ghost cell width (for
+    * both the source and destination).  Currently, destination data must be
+    * either NodeData or OuternodeData of the same DIM and TYPE.  If not,
+    * then an unrecoverable error results.
+    */
+   virtual void
+   copy2(
+      hier::PatchData& dst) const;
+
+   /*!
+    * @brief Copy data from source to destination (i.e., this)
+    * patch data object on the given overlap.
+    *
+    * Currently, source data must be either NodeData or OuternodeData
+    * of the same DIM and TYPE and the overlap must be an NodeOverlap
+    * of the same DIM.  If not, then an unrecoverable error
+    * results.
+    */
+   virtual void
+   copy(
+      const hier::PatchData& src,
+      const hier::BoxOverlap& overlap);
+
+   /*!
+    * @brief Copy data from source (i.e., this) to destination
+    * patch data object on the given overlap.
+    *
+    * Currently, destination data must be either NodeData or OuternodeData
+    * of the same DIM and TYPE and the overlap must be an NodeOverlap
+    * of the same DIM.  If not, then an unrecoverable error
+    * results.
+    */
+   virtual void
+   copy2(
+      hier::PatchData& dst,
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Fast copy (i.e., assumes node and outernode data objects are
+    * defined over the same box) from the given node source data object to
+    * this destination outernode data object at the specified depths.
+    */
+   void
+   copyDepth(
+      int dst_depth,
+      const NodeData<TYPE>& src,
+      int src_depth);
+
+   /*!
+    * @brief Fast copy (i.e., assumes node and outernode data objects are
+    * defined over the same box) to the given node destination data object
+    * from this source outernode data object at the specified depths.
+    */
+   void
+   copyDepth2(
+      int dst_depth,
+      NodeData<TYPE>& dst,
+      int src_depth) const;
+
+   /*!
+    * @brief Add data from source to destination (i.e., this)
+    * patch data object on the given overlap.
+    *
+    * Currently, source data must be OuternodeData of the same DIM and
+    * TYPE and the overlap must be an EdgeOverlap of the same DIM.
+    * If not, then an unrecoverable error results.
+    */
+   virtual void
+   sum(
+      const hier::PatchData& src,
+      const hier::BoxOverlap& overlap);
+
+   /*!
+    * @brief Return true if the patch data object can estimate the
+    * stream size required to fit its data using only index
+    * space information (i.e., a box).
+    *
+    * This routine is defined for the standard types (bool, char,
+    * double, float, int, and dcomplex).
+    */
+   virtual bool
+   canEstimateStreamSizeFromBox() const;
+
+   /*!
+    * @brief Return the number of bytes needed to stream the data
+    * in this patch data object lying in the specified box overlap
+    * region.
+    *
+    * This routine is defined for the standard types (bool, char,
+    * double, float, int, and dcomplex).
+    */
+   virtual int
+   getDataStreamSize(
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Pack data in this patch data object lying in the specified
+    * box overlap region into the stream.  The overlap must be an
+    * NodeOverlap of the same DIM.
+    */
+   virtual void
+   packStream(
+      tbox::MessageStream& stream,
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Unpack data from stream into this patch data object over
+    * the specified box overlap region.  The overlap must be an
+    * NodeOverlap of the same DIM.
+    */
+   virtual void
+   unpackStream(
+      tbox::MessageStream& stream,
+      const hier::BoxOverlap& overlap);
+
+   /*!
+    * @brief Unpack data from stream and add into this patch data object
+    * over the specified box overlap region.  The overlap must be an
+    * NodeOverlap of the same DIM.
+    */
+   virtual void
+   unpackStreamAndSum(
+      tbox::MessageStream& stream,
+      const hier::BoxOverlap& overlap);
+
+   /*!
+    * @brief Fill all values at depth d with the value t.
+    */
+   void
+   fill(
+      const TYPE& t,
+      int d = 0);
+
+   /*!
+    * @brief Fill all values at depth d within the box with the value t.
+    */
+   void
+   fill(
+      const TYPE& t,
+      const hier::Box& box,
+      int d = 0);
+
+   /*!
+    * @brief Fill all depth components with value t.
+    */
+   void
+   fillAll(
+      const TYPE& t);
+
+   /*!
+    * @brief Fill all depth components within the box with value t.
+    */
+   void
+   fillAll(
+      const TYPE& t,
+      const hier::Box& box);
+
+   /*!
+    * @brief Print all outernode data values residing in the specified box.
+    * If the depth of the array is greater than one, all depths are printed.
+    *
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to node index space.
+    * @param os   reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   print(
+      const hier::Box& box,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Print all outernode data values at the given array depth in
+    * the specified box.
+    *
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to node index space.
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    * @param os   reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   print(
+      const hier::Box& box,
+      int depth,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Print all outernode centered data values for specified
+    * face_normal and side residing in the specified box.
+    * If the depth of the data is greater than one, all depths are printed.
+    *
+    * @param face_normal  integer face normal direction for data,
+    *              must satisfy 0 <= face_normal < DIM
+    * @param side integer lower (0) or upper (1) side of outernode
+    *             data array
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to node index space.
+    * @param os    reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   printAxisSide(
+      int face_normal,
+      int side,
+      const hier::Box& box,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Print all outernode centered data values for specified
+    * face_normal, side, and depth residing in the specified box.
+    *
+    * @param face_normal  integer face normal direction for data,
+    *              must satisfy 0 <= face_normal < DIM
+    * @param side integer lower (0) or upper (1) side of outernode
+    *             data array
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to node index space.
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    * @param os    reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   printAxisSide(
+      int face_normal,
+      int side,
+      const hier::Box& box,
+      int depth,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Check that class version and restart file version are equal.
+    * If so, read data members from the database.
+    *
+    * Assertions: database must be a non-null pointer.
+    */
+   virtual void
+   getSpecializedFromDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+   /*!
+    * @brief Write out the class version number and other data members to
+    * the database.
+    *
+    * Assertions: database must be a non-null pointer.
+    */
+   virtual void
+   putSpecializedToDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+private:
+   OuternodeData<TYPE>(const OuternodeData<TYPE>&); // not implemented
+   void
+   operator = (
+      const OuternodeData<TYPE>&);                // not implemented
+
+   //@
+   //! @name Internal implementations of data copy operations.
+   void
+   copyFromNode(
+      const NodeData<TYPE>& src);
+   void
+   copyFromNode(
+      const NodeData<TYPE>& src,
+      const NodeOverlap& overlap);
+   void
+   copyToNode(
+      NodeData<TYPE>& dst) const;
+   void
+   copyToNode(
+      NodeData<TYPE>& dst,
+      const NodeOverlap& overlap) const;
+   void
+   copyFromOuternode(
+      const OuternodeData<TYPE>& src);
+   void
+   copyFromOuternode(
+      const OuternodeData<TYPE>& src,
+      const NodeOverlap& overlap);
+   void
+   copyToOuternode(
+      OuternodeData<TYPE>& dst) const;
+   void
+   copyToOuternode(
+      OuternodeData<TYPE>& dst,
+      const NodeOverlap& overlap) const;
+   //@
+
+   int d_depth;
+   ArrayData<TYPE> d_data[tbox::Dimension::MAXIMUM_DIMENSION_VALUE][2];
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/OuternodeData.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/OuternodeData.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuternodeDataFactory.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuternodeDataFactory.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,172 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating outernode data objects 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuternodeDataFactory_C
+#define included_pdat_OuternodeDataFactory_C
+
+#include "SAMRAI/pdat/OuternodeDataFactory.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/NodeDataFactory.h"
+#include "SAMRAI/pdat/OuternodeData.h"
+#include "SAMRAI/pdat/OuternodeGeometry.h"
+#include "SAMRAI/hier/Patch.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/OuternodeDataFactory.I"
+#endif
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *
+ * The constructor simply caches the depth of the patch data.
+ *
+ *************************************************************************
+ */
+
+template<class TYPE>
+OuternodeDataFactory<TYPE>::OuternodeDataFactory(
+   const tbox::Dimension& dim,
+   int depth):
+   hier::PatchDataFactory(hier::IntVector::getZero(dim)),
+   d_depth(depth),
+   d_no_ghosts(hier::IntVector::getZero(dim))
+{
+   TBOX_ASSERT(depth > 0);
+}
+
+template<class TYPE>
+OuternodeDataFactory<TYPE>::~OuternodeDataFactory()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Clone the factory and copy the default parameters to the new factory. *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::PatchDataFactory>
+OuternodeDataFactory<TYPE>::cloneFactory(
+   const hier::IntVector& ghosts)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, ghosts);
+
+   return tbox::Pointer<hier::PatchDataFactory>(new OuternodeDataFactory<TYPE>(
+                                                   ghosts.getDim(), d_depth));
+}
+
+/*
+ *************************************************************************
+ *
+ * Allocate the concrete outernode data classes.
+ *
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::PatchData>
+OuternodeDataFactory<TYPE>::allocate(
+   const hier::Patch& patch) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, patch);
+
+   hier::PatchData* patchdata =
+      new OuternodeData<TYPE>(patch.getBox(), d_depth);
+   return tbox::Pointer<hier::PatchData>(patchdata);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return the box geometry type for outernode data objects.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::BoxGeometry>
+OuternodeDataFactory<TYPE>::getBoxGeometry(
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   const hier::IntVector& zero_vector(hier::IntVector::getZero(getDim()));
+
+   hier::BoxGeometry* boxgeometry = new OuternodeGeometry(box, zero_vector);
+   return tbox::Pointer<hier::BoxGeometry>(boxgeometry);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Calculate the amount of memory needed to allocate the data object.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+size_t OuternodeDataFactory<TYPE>::getSizeOfMemory(
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   const size_t obj = tbox::MemoryUtilities::align(sizeof(OuternodeData<TYPE>));
+   const size_t data = OuternodeData<TYPE>::getSizeOfData(box,
+         d_depth);
+   return obj + data;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Determine whether this is a valid copy operation to/from OuternodeData*
+ * between the supplied datatype.                                        *
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+bool OuternodeDataFactory<TYPE>::validCopyTo(
+   const tbox::Pointer<hier::PatchDataFactory>& dst_pdf) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *dst_pdf);
+
+   bool valid_copy = false;
+
+   /*
+    * Valid options are NodeData and OuternodeData.
+    */
+   if (!valid_copy) {
+      tbox::Pointer<NodeDataFactory<TYPE> > ndf = dst_pdf;
+      if (!ndf.isNull()) {
+         valid_copy = true;
+      }
+   }
+
+   if (!valid_copy) {
+      tbox::Pointer<OuternodeDataFactory<TYPE> > ondf = dst_pdf;
+      if (!ondf.isNull()) {
+         valid_copy = true;
+      }
+   }
+
+   return valid_copy;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuternodeDataFactory.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuternodeDataFactory.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,22 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating outernode data objects 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int OuternodeDataFactory<TYPE>::getDepth() const
+{
+   return d_depth;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuternodeDataFactory.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuternodeDataFactory.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,156 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating outernode data objects 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuternodeDataFactory
+#define included_pdat_OuternodeDataFactory
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/PatchDataFactory.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * @brief
+ * Class OuternodeDataFactory is a factory class used to allocate new
+ * instances of OuternodeData objects.  It is a subclass of the patch
+ * data factory class and outernode data is a subclass of patch data.  Both
+ * the factory and data classes are templated on the type of the contained
+ * object (e.g., double or int).
+ *
+ * @see pdat::OuternodeData
+ * @see pdat::PatchDataFactory
+ */
+
+template<class TYPE>
+class OuternodeDataFactory:public hier::PatchDataFactory
+{
+public:
+   /*!
+    * @brief
+    * The default constructor for the outernode data factory class.
+    *
+    * The depth (number of components) gives the default for all of
+    * the outernode data objects created with this factory.
+    */
+   explicit OuternodeDataFactory(
+      const tbox::Dimension& dim,
+      int depth);
+
+   /*!
+    * @brief
+    * Virtual destructor for the outernode data factory class.
+    */
+   virtual ~OuternodeDataFactory<TYPE>();
+
+   /**
+    * @brief Abstract virtual function to clone a patch data factory.
+    *
+    * This will return a new instantiation of the abstract factory
+    * with the same properties.  The properties of the cloned factory
+    * can then be changed without modifying the original.
+    *
+    * @param ghosts default ghost cell width for concrete classes created from
+    * the factory.
+    */
+   virtual tbox::Pointer<hier::PatchDataFactory>
+   cloneFactory(
+      const hier::IntVector& ghosts);
+
+   /*!
+    * @brief
+    * Virtual factory function to allocate a concrete outernode data object.
+    *
+    * The default information about the object (e.g., depth) is taken from
+    * the factory.
+    */
+   virtual tbox::Pointer<hier::PatchData>
+   allocate(
+      const hier::Patch& patch) const;
+
+   /*!
+    * @brief
+    * Allocate the box geometry object associated with the patch data.
+    *
+    * This information will be used in the computation of intersections
+    * and data dependencies between objects.
+    */
+   virtual tbox::Pointer<hier::BoxGeometry>
+   getBoxGeometry(
+      const hier::Box& box) const;
+
+   /*!
+    * @brief
+    * Get the depth (number of components).
+    *
+    * This is the depth that will be used in the instantiation of
+    * outernode data objects.
+    */
+   int
+   getDepth() const;
+
+   /*!
+    * @brief
+    * Calculate the amount of memory needed to store the outernode data
+    * object, including object data and dynamically allocated data.
+    */
+   virtual size_t
+   getSizeOfMemory(
+      const hier::Box& box) const;
+
+   /**
+    * Return a boolean true value indicating that fine data for the outernode
+    * quantity will take precedence on coarse-fine interfaces.  See the
+    * OuternodeVariable class header file for more information.
+    */
+   bool fineBoundaryRepresentsVariable() const {
+      return true;
+   }
+
+   /**
+    * Return true since the outernode data index space extends beyond the
+    * interior of patches.  That is, outernode data lives on patch borders.
+    */
+   bool dataLivesOnPatchBorder() const {
+      return true;
+   }
+
+   /**
+    * Return whether it is valid to copy this OuternodeDataFactory to the
+    * supplied destination patch data factory.  It will return true if
+    * dst_pdf is NodeDataFactory or OuternodeDataFactory, false otherwise.
+    */
+   bool
+   validCopyTo(
+      const tbox::Pointer<hier::PatchDataFactory>& dst_pdf) const;
+
+private:
+   int d_depth;
+   hier::IntVector d_no_ghosts;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/OuternodeDataFactory.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/OuternodeDataFactory.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuternodeDoubleConstantCoarsen.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuternodeDoubleConstantCoarsen.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,260 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   ConstantCoarsen averaging operator for outernode-centered
+ *                double data on a mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuternodeDoubleConstantCoarsen_C
+#define included_pdat_OuternodeDoubleConstantCoarsen_C
+
+#include "SAMRAI/pdat/OuternodeDoubleConstantCoarsen.h"
+
+#include "SAMRAI/pdat/OuternodeData.h"
+#include "SAMRAI/pdat/OuternodeVariable.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <cfloat>
+#include <cmath>
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in pdat_concoarsen1d.f:
+void F77_FUNC(conavgouternodedoub1d, CONAVGOUTERNODEDOUB1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const double *, double *);
+// in pdat_concoarsen2d.f:
+void F77_FUNC(conavgouternodedoub2d0, CONAVGOUTERNODEDOUB2D0) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const double *, double *);
+void F77_FUNC(conavgouternodedoub2d1, CONAVGOUTERNODEDOUB2D1) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const double *, double *);
+
+// in pdat_concoarsen3d.f:
+void F77_FUNC(conavgouternodedoub3d0, CONAVGOUTERNODEDOUB3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const double *, double *);
+void F77_FUNC(conavgouternodedoub3d1, CONAVGOUTERNODEDOUB3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const double *, double *);
+void F77_FUNC(conavgouternodedoub3d2, CONAVGOUTERNODEDOUB3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const double *, double *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+OuternodeDoubleConstantCoarsen::OuternodeDoubleConstantCoarsen(
+   const tbox::Dimension& dim):
+   xfer::CoarsenOperator(dim, "CONSTANT_COARSEN"),
+   d_name_id("CONSTANT_COARSEN")
+{
+}
+
+OuternodeDoubleConstantCoarsen::~OuternodeDoubleConstantCoarsen()
+{
+}
+
+bool OuternodeDoubleConstantCoarsen::findCoarsenOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<pdat::OuternodeVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+OuternodeDoubleConstantCoarsen::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int OuternodeDoubleConstantCoarsen::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+OuternodeDoubleConstantCoarsen::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void OuternodeDoubleConstantCoarsen::coarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   tbox::Pointer<pdat::OuternodeData<double> >
+   fdata = fine.getPatchData(src_component);
+   tbox::Pointer<pdat::OuternodeData<double> >
+   cdata = coarse.getPatchData(dst_component);
+
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+   TBOX_DIM_ASSERT_CHECK_ARGS5(*this, coarse, fine, coarse_box, ratio);
+
+   const hier::Index filo = fine.getBox().lower();
+   const hier::Index fihi = fine.getBox().upper();
+   const hier::Index cilo = coarse.getBox().lower();
+   const hier::Index cihi = coarse.getBox().upper();
+
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+
+   for (int i = 0; i < 2; i++) {
+
+      for (int axis = 0; axis < dim.getValue(); axis++) {
+
+         if (cdata->dataExists(axis)) {
+
+            for (int d = 0; d < cdata->getDepth(); d++) {
+
+               if (dim == tbox::Dimension(1)) {
+                  F77_FUNC(conavgouternodedoub1d,
+                     CONAVGOUTERNODEDOUB1D) (ifirstc(0), ilastc(0),
+                     filo(0), fihi(0),
+                     cilo(0), cihi(0),
+                     &ratio[0],
+                     fdata->getPointer(axis, i, d),
+                     cdata->getPointer(axis, i, d));
+               } else if (dim == tbox::Dimension(2)) {
+                  if (axis == 0) {
+                     F77_FUNC(conavgouternodedoub2d0,
+                        CONAVGOUTERNODEDOUB2D0) (ifirstc(0), ifirstc(1),
+                        ilastc(0), ilastc(1),
+                        filo(0), filo(1),
+                        fihi(0), fihi(1),
+                        cilo(0), cilo(1),
+                        cihi(0), cihi(1),
+                        &ratio[0],
+                        fdata->getPointer(axis, i, d),
+                        cdata->getPointer(axis, i, d));
+                  }
+
+                  if (axis == 1) {
+                     F77_FUNC(conavgouternodedoub2d1,
+                        CONAVGOUTERNODEDOUB2D1) (ifirstc(0), ifirstc(1),
+                        ilastc(0), ilastc(1),
+                        filo(0), filo(1),
+                        fihi(0), fihi(1),
+                        cilo(0), cilo(1),
+                        cihi(0), cihi(1),
+                        &ratio[0],
+                        fdata->getPointer(axis, i, d),
+                        cdata->getPointer(axis, i, d));
+                  }
+               } else if (dim == tbox::Dimension(3)) {
+                  if (axis == 0) {
+                     F77_FUNC(conavgouternodedoub3d0,
+                        CONAVGOUTERNODEDOUB3D0) (ifirstc(0), ifirstc(1),
+                        ifirstc(2),
+                        ilastc(0), ilastc(1), ilastc(2),
+                        filo(0), filo(1), filo(2),
+                        fihi(0), fihi(1), fihi(2),
+                        cilo(0), cilo(1), cilo(2),
+                        cihi(0), cihi(1), cihi(2),
+                        &ratio[0],
+                        fdata->getPointer(axis, i, d),
+                        cdata->getPointer(axis, i, d));
+                  }
+                  if (axis == 1) {
+                     F77_FUNC(conavgouternodedoub3d1,
+                        CONAVGOUTERNODEDOUB3D1) (ifirstc(0), ifirstc(1),
+                        ifirstc(2),
+                        ilastc(0), ilastc(1), ilastc(2),
+                        filo(0), filo(1), filo(2),
+                        fihi(0), fihi(1), fihi(2),
+                        cilo(0), cilo(1), cilo(2),
+                        cihi(0), cihi(1), cihi(2),
+                        &ratio[0],
+                        fdata->getPointer(axis, i, d),
+                        cdata->getPointer(axis, i, d));
+                  }
+                  if (axis == 2) {
+                     F77_FUNC(conavgouternodedoub3d2,
+                        CONAVGOUTERNODEDOUB3D2) (ifirstc(0), ifirstc(1),
+                        ifirstc(2),
+                        ilastc(0), ilastc(1), ilastc(2),
+                        filo(0), filo(1), filo(2),
+                        fihi(0), fihi(1), fihi(2),
+                        cilo(0), cilo(1), cilo(2),
+                        cihi(0), cihi(1), cihi(2),
+                        &ratio[0],
+                        fdata->getPointer(axis, i, d),
+                        cdata->getPointer(axis, i, d));
+                  }
+               }
+
+            }
+         }
+      }
+   }
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuternodeDoubleConstantCoarsen.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuternodeDoubleConstantCoarsen.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,125 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant averaging operator for node-centered double data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuternodeDoubleConstantCoarsen
+#define included_pdat_OuternodeDoubleConstantCoarsen
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * @brief
+ * Class OuternodeDoubleConstantCoarsen implements constant
+ * averaging (i.e., injection) for outernode-centered double patch data defined
+ * over a  mesh.
+ *
+ * It is derived from the xfer::CoarsenOperator base class.
+ * The numerical operations for the averaging use FORTRAN numerical
+ * routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is outernode-centered double, and the string is "CONSTANT_COARSEN".
+ *
+ * @see xfer::CoarsenOperator
+ */
+
+class OuternodeDoubleConstantCoarsen:
+   public xfer::CoarsenOperator
+{
+public:
+   /*!
+    * @brief Uninteresting default constructor.
+    */
+   explicit OuternodeDoubleConstantCoarsen(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Uninteresting virtual destructor.
+    */
+   virtual ~OuternodeDoubleConstantCoarsen();
+
+   /*!
+    * @brief Determine if object is for coarsening the specified
+    * hier_Variable type using the given descriptive operator name.
+    *
+    * @return True if the variable and name string match the outernode-centered
+    * constant averaging; otherwise, return false.
+    */
+   bool
+   findCoarsenOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /*!
+    * @brief Return descriptive name string identifier of this
+    * coarsening operator.
+    *
+    * @return descriptive name string identifier of this coarsening operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /*!
+    * @brief Give the operator priority.
+    *
+    * The priority of outernode-centered constant averaging is 0.
+    * It will be performed before any user-defined coarsen operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /*!
+    * @brief Give the operator stencil width.
+    *
+    * The stencil width of the constant averaging operator is the vector of
+    * zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /*!
+    * @brief Coarsen the source component on the fine patch to the destination
+    * component on the coarse patch using the outernode-centered double constant
+    * averaging operator.
+    *
+    * Coarsening is performed on the intersection of
+    * the destination patch and the coarse box.  It is assumed that the
+    * fine patch contains sufficient data for the stencil width of the
+    * coarsening operator.
+    */
+   void
+   coarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuternodeGeometry.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuternodeGeometry.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,425 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuternodeGeometry_C
+#define included_pdat_OuternodeGeometry_C
+
+#include "SAMRAI/pdat/OuternodeGeometry.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/pdat/NodeGeometry.h"
+#include "SAMRAI/pdat/NodeOverlap.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/OuternodeGeometry.I"
+#endif
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *
+ * Create a outernode geometry object given the box and ghost cell width.
+ *
+ *************************************************************************
+ */
+
+OuternodeGeometry::OuternodeGeometry(
+   const hier::Box& box,
+   const hier::IntVector& ghosts):
+   d_box(box),
+   d_ghosts(ghosts)
+
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(box, ghosts);
+   TBOX_ASSERT(ghosts.min() >= 0);
+}
+
+OuternodeGeometry::~OuternodeGeometry()
+{
+}
+
+/*
+ *************************************************************************
+ *
+ * Attempt to calculate the intersection between two outernode centered
+ * box geometries.  The calculateOverlap() checks whether both arguments
+ * are outernode geometries; if so, it computes the intersection.  If
+ * not, then it calls calculateOverlap() on the source object (if retry
+ * is true) to allow the source a chance to calculate the intersection.
+ * See the hier::BoxGeometry base class for more information about the
+ * protocol.  A pointer to null is returned if the intersection canot be
+ * computed.
+ *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap>
+OuternodeGeometry::calculateOverlap(
+   const hier::BoxGeometry& dst_geometry,
+   const hier::BoxGeometry& src_geometry,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset,
+   const bool retry,
+   const hier::BoxList& dst_restrict_boxes) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(d_box, src_mask, src_offset);
+
+   const NodeGeometry* t_dst_node =
+      dynamic_cast<const NodeGeometry *>(&dst_geometry);
+   const OuternodeGeometry* t_dst_onode =
+      dynamic_cast<const OuternodeGeometry *>(&dst_geometry);
+   const NodeGeometry* t_src_node =
+      dynamic_cast<const NodeGeometry *>(&src_geometry);
+   const OuternodeGeometry* t_src_onode =
+      dynamic_cast<const OuternodeGeometry *>(&src_geometry);
+
+   tbox::Pointer<hier::BoxOverlap> over(NULL);
+   if ((t_src_onode != NULL) && (t_dst_node != NULL)) {
+      over = doOverlap(*t_dst_node, *t_src_onode, src_mask, overwrite_interior,
+            src_offset, dst_restrict_boxes);
+   } else if ((t_dst_onode != NULL) && (t_src_node != NULL)) {
+      over = doOverlap(*t_dst_onode, *t_src_node, src_mask, overwrite_interior,
+            src_offset, dst_restrict_boxes);
+   } else if ((t_src_onode != NULL) && (t_dst_onode != NULL)) {
+      over = doOverlap(*t_dst_onode, *t_src_onode, src_mask, overwrite_interior,
+            src_offset, dst_restrict_boxes);
+   } else if (retry) {
+      over = src_geometry.calculateOverlap(
+            dst_geometry, src_geometry, src_mask,
+            overwrite_interior, src_offset, false, dst_restrict_boxes);
+   }
+   return over;
+}
+
+/*
+ *************************************************************************
+ *
+ * Compute the overlap between a node geometry destination box and an
+ * outernode geometry source box.  The intersection algorithm is similar
+ * the node geometry algorithm except that only the borders of source
+ * are used in the intersection computation.
+ *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap>
+OuternodeGeometry::doOverlap(
+   const NodeGeometry& dst_geometry,
+   const OuternodeGeometry& src_geometry,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset,
+   const hier::BoxList& dst_restrict_boxes)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(src_mask, src_offset);
+
+   const tbox::Dimension& dim(src_mask.getDim());
+
+   hier::BoxList dst_boxes;
+
+   // Perform a quick-and-dirty intersection to see if the boxes might overlap
+
+   const hier::Box src_box =
+      hier::Box::grow(src_geometry.d_box, src_geometry.d_ghosts) * src_mask;
+   const hier::Box src_box_shifted = hier::Box::shift(src_box, src_offset);
+   const hier::Box dst_box =
+      hier::Box::grow(dst_geometry.getBox(), dst_geometry.getGhosts());
+
+   const hier::Box dst_node_box = NodeGeometry::toNodeBox(dst_box);
+   const hier::Box src_node_box = NodeGeometry::toNodeBox(src_box_shifted);
+
+   // Compute the intersection (if any) for each of the side directions
+
+   if (dst_node_box.intersects(src_node_box)) {
+
+      const hier::Box msk_node_box =
+         NodeGeometry::toNodeBox(hier::Box::shift(src_mask, src_offset));
+
+      for (int d = 0; d < dim.getValue(); d++) {
+
+         hier::Box trimmed_src_node_box = src_node_box;
+         for (int dh = d + 1; dh < dim.getValue(); ++dh) {
+            /*
+             * For dimensions higher than d, narrow the box down to avoid
+             * representing edge and corner nodes multiple times.
+             */
+            ++trimmed_src_node_box.lower(dh);
+            --trimmed_src_node_box.upper(dh);
+         }
+
+         // Add lower side intersection (if any) to the box list
+         hier::Box low_node_box = trimmed_src_node_box;
+         low_node_box.upper(d) = low_node_box.lower(d);
+         dst_boxes.unionBoxes(low_node_box * msk_node_box * dst_node_box);
+
+         // Add upper side intersection (if any) to the box list
+         hier::Box hig_node_box = trimmed_src_node_box;
+         hig_node_box.lower(d) = hig_node_box.upper(d);
+         dst_boxes.unionBoxes(hig_node_box * msk_node_box * dst_node_box);
+
+         // Take away the interior if over_write interior is not set
+
+         if (!overwrite_interior) {
+            dst_boxes.removeIntersections(
+               NodeGeometry::toNodeBox(dst_geometry.getBox()));
+         }
+
+      }  // loop over dim
+
+      if (dst_restrict_boxes.size() && dst_boxes.size()) {
+         hier::BoxList node_restrict_boxes;
+         for (hier::BoxList::Iterator b(dst_restrict_boxes); b; b++) {
+            node_restrict_boxes.appendItem(NodeGeometry::toNodeBox(b()));
+         }
+         dst_boxes.intersectBoxes(node_restrict_boxes);
+      }
+
+   }  // src and dst boxes intersect
+
+   // Create the outernode overlap data object using the boxes and source shift
+
+   hier::BoxOverlap* overlap = new NodeOverlap(dst_boxes, src_offset);
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+}
+
+/*
+ *************************************************************************
+ *
+ * Compute the overlap between an outernode geometry destination box and a
+ * node geometry source box.  The intersection algorithm is similar
+ * the node geometry algorithm except that only the borders of the dest
+ * are used in the intersection computation.
+ *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap>
+OuternodeGeometry::doOverlap(
+   const OuternodeGeometry& dst_geometry,
+   const NodeGeometry& src_geometry,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset,
+   const hier::BoxList& dst_restrict_boxes)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(src_mask, src_offset);
+
+   const tbox::Dimension& dim(src_mask.getDim());
+
+   hier::BoxList src_boxes;
+
+   // Perform a quick-and-dirty intersection to see if the boxes might overlap
+
+   const hier::Box src_box =
+      hier::Box::grow(src_geometry.getBox(),
+         src_geometry.getGhosts()) * src_mask;
+   const hier::Box src_box_shifted = hier::Box::shift(src_box, src_offset);
+   const hier::Box dst_box =
+      hier::Box::grow(dst_geometry.d_box, dst_geometry.d_ghosts);
+
+   const hier::Box dst_node_box = NodeGeometry::toNodeBox(dst_box);
+   const hier::Box src_node_box = NodeGeometry::toNodeBox(src_box_shifted);
+
+   // Compute the intersection (if any) for each of the side directions
+
+   if (dst_node_box.intersects(src_node_box)) {
+
+      const hier::Box msk_node_box =
+         NodeGeometry::toNodeBox(hier::Box::shift(src_mask, src_offset));
+
+      for (int d = 0; d < dim.getValue(); d++) {
+
+         hier::Box trimmed_dst_node_box = dst_node_box;
+         for (int dh = d + 1; dh < dim.getValue(); ++dh) {
+            /*
+             * For dimensions higher than d, narrow the box down to avoid
+             * representing edge and corner nodes multiple times.
+             */
+            ++trimmed_dst_node_box.lower(dh);
+            --trimmed_dst_node_box.upper(dh);
+         }
+
+         // Add lower side intersection (if any) to the box list
+         hier::Box low_node_box = trimmed_dst_node_box;
+         low_node_box.upper(d) = low_node_box.lower(d);
+         src_boxes.unionBoxes(low_node_box * msk_node_box * src_node_box);
+
+         // Add upper side intersection (if any) to the box list
+         hier::Box hig_node_box = trimmed_dst_node_box;
+         hig_node_box.lower(d) = hig_node_box.upper(d);
+         src_boxes.unionBoxes(hig_node_box * msk_node_box * src_node_box);
+
+         // Take away the interior of over_write interior is not set
+
+         if (!overwrite_interior) {
+            src_boxes.removeIntersections(
+               NodeGeometry::toNodeBox(dst_geometry.getBox()));
+         }
+
+      }  // loop over dim
+
+      if (dst_restrict_boxes.size() && src_boxes.size()) {
+         hier::BoxList node_restrict_boxes;
+         for (hier::BoxList::Iterator b(dst_restrict_boxes); b; b++) {
+            node_restrict_boxes.appendItem(NodeGeometry::toNodeBox(b()));
+         }
+         src_boxes.intersectBoxes(node_restrict_boxes);
+      }
+
+   }  // src and dst boxes intersect
+
+   // Create the side overlap data object using the boxes and source shift
+
+   hier::BoxOverlap* overlap = new NodeOverlap(src_boxes, src_offset);
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+}
+
+/*
+ *************************************************************************
+ *
+ * Compute the overlap between an outernode geometry destination box and an
+ * outernode geometry source box.  The intersection algorithm is similar
+ * the node geometry algorithm except that only the borders of source
+ * are used in the intersection computation.
+ *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap>
+OuternodeGeometry::doOverlap(
+   const OuternodeGeometry& dst_geometry,
+   const OuternodeGeometry& src_geometry,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset,
+   const hier::BoxList& dst_restrict_boxes)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(src_mask, src_offset);
+
+   const tbox::Dimension& dim(src_mask.getDim());
+
+   hier::BoxList dst_boxes;
+
+   // Perform a quick-and-dirty intersection to see if the boxes might overlap
+
+   const hier::Box src_box =
+      hier::Box::grow(src_geometry.d_box, src_geometry.d_ghosts) * src_mask;
+   const hier::Box src_box_shifted = hier::Box::shift(src_box, src_offset);
+   const hier::Box dst_box =
+      hier::Box::grow(dst_geometry.getBox(), dst_geometry.getGhosts());
+
+   const hier::Box dst_node_box = NodeGeometry::toNodeBox(dst_box);
+   const hier::Box src_node_box = NodeGeometry::toNodeBox(src_box_shifted);
+
+   // Compute the intersection (if any) for each of the side directions
+
+   if (dst_node_box.intersects(src_node_box)) {
+
+      const hier::Box msk_node_box =
+         NodeGeometry::toNodeBox(hier::Box::shift(src_mask, src_offset));
+
+      int dst_d, src_d;
+
+      for (dst_d = 0; dst_d < dim.getValue(); ++dst_d) {
+
+         hier::Box trimmed_dst_node_box = dst_node_box;
+         for (int dh = dst_d + 1; dh < dim.getValue(); ++dh) {
+            ++trimmed_dst_node_box.lower(dh);
+            --trimmed_dst_node_box.upper(dh);
+         }
+
+         hier::Box lo_dst_node_box = trimmed_dst_node_box;
+         lo_dst_node_box.upper(dst_d) = lo_dst_node_box.lower(dst_d);
+
+         hier::Box hi_dst_node_box = trimmed_dst_node_box;
+         hi_dst_node_box.lower(dst_d) = hi_dst_node_box.upper(dst_d);
+
+         for (src_d = 0; src_d < dim.getValue(); ++src_d) {
+
+            hier::Box trimmed_src_node_box = src_node_box;
+            for (int dh = src_d + 1; dh < dim.getValue(); ++dh) {
+               ++trimmed_src_node_box.lower(dh);
+               --trimmed_src_node_box.upper(dh);
+            }
+
+            hier::Box lo_src_node_box = trimmed_src_node_box;
+            lo_src_node_box.upper(src_d) = lo_src_node_box.lower(src_d);
+
+            hier::Box hi_src_node_box = trimmed_src_node_box;
+            hi_src_node_box.lower(src_d) = hi_src_node_box.upper(src_d);
+
+            dst_boxes.unionBoxes(
+               lo_src_node_box * msk_node_box * lo_dst_node_box);
+            dst_boxes.unionBoxes(
+               hi_src_node_box * msk_node_box * lo_dst_node_box);
+            dst_boxes.unionBoxes(
+               lo_src_node_box * msk_node_box * hi_dst_node_box);
+            dst_boxes.unionBoxes(
+               hi_src_node_box * msk_node_box * hi_dst_node_box);
+
+            // Take away the interior of over_write interior is not set
+
+            if (!overwrite_interior) {
+               dst_boxes.removeIntersections(
+                  NodeGeometry::toNodeBox(dst_geometry.d_box));
+            }
+
+         }  // loop over src dim
+
+      }  // loop over dst dim
+
+      if (dst_restrict_boxes.size() && dst_boxes.size()) {
+         hier::BoxList node_restrict_boxes;
+         for (hier::BoxList::Iterator b(dst_restrict_boxes); b; b++) {
+            node_restrict_boxes.appendItem(NodeGeometry::toNodeBox(b()));
+         }
+         dst_boxes.intersectBoxes(node_restrict_boxes);
+      }
+
+   }  // if src and dst boxes intersect
+
+   // Create the side overlap data object using the boxes and source shift
+
+   hier::BoxOverlap* overlap = new NodeOverlap(dst_boxes, src_offset);
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set up a NodeOverlap oject using the given boxes and offset           *
+ *                                                                       *
+ *************************************************************************
+ */
+tbox::Pointer<hier::BoxOverlap>
+OuternodeGeometry::setUpOverlap(
+   const hier::BoxList& boxes,
+   const hier::IntVector& src_offset) const
+{
+   hier::BoxList dst_boxes;
+
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      hier::Box node_box(NodeGeometry::toNodeBox(b()));
+      dst_boxes.appendItem(node_box);
+   }
+
+   // Create the node overlap data object using the boxes and source shift
+
+   hier::BoxOverlap* overlap = new NodeOverlap(dst_boxes, src_offset);
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuternodeGeometry.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuternodeGeometry.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,27 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+SAMRAI_INLINE_KEYWORD
+const hier::Box& OuternodeGeometry::getBox() const
+{
+   return d_box;
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::IntVector& OuternodeGeometry::getGhosts() const
+{
+   return d_ghosts;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuternodeGeometry.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuternodeGeometry.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,163 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuternodeGeometry
+#define included_pdat_OuternodeGeometry
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/NodeOverlap.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+class NodeGeometry;
+
+/*!
+ * Class OuternodeGeometry manages the mapping between the AMR index
+ * and the outernode geometry index space.  It is a subclass of
+ * hier::BoxGeometry and it computes intersections between outernode
+ * box geometries and node or outernode box geometries for communication
+ * operations.
+ *
+ * See header file for OuternodeData<DIM> class for a more detailed
+ * description of the data layout.
+ *
+ * @see hier::BoxGeometry
+ * @see pdat::NodeGeometry
+ * @see pdat::NodeOverlap
+ */
+
+class OuternodeGeometry:public hier::BoxGeometry
+{
+public:
+   /*!
+    * The BoxOverlap implemenation for this geometry.
+    */
+   typedef NodeOverlap Overlap;
+
+   /*!
+    * @brief Construct an outernode geometry object given an AMR index
+    * space box and ghost cell width.
+    */
+   explicit OuternodeGeometry(
+      const hier::Box& box,
+      const hier::IntVector& ghosts);
+
+   /*!
+    * @brief The virtual destructor does nothing interesting.
+    */
+   virtual ~OuternodeGeometry();
+
+   /*!
+    * @brief Compute the overlap in node-centered index space on the
+    * boundaries of the source box geometry and the destination box geometry.
+    */
+   virtual tbox::Pointer<hier::BoxOverlap>
+   calculateOverlap(
+      const hier::BoxGeometry& dst_geometry,
+      const hier::BoxGeometry& src_geometry,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset,
+      const bool retry,
+      const hier::BoxList& dst_restrict_boxes = hier::BoxList()) const;
+
+   /*!
+    * @brief Set up a NodeOverlap object based on the given boxes and the
+    * offset.
+    */
+   virtual tbox::Pointer<hier::BoxOverlap>
+   setUpOverlap(
+      const hier::BoxList& boxes,
+      const hier::IntVector& src_offset) const;
+
+   /*!
+    * @brief Return the box for this outernode box geometry object.
+    */
+   const hier::Box&
+   getBox() const;
+
+   /*!
+    * @brief Return the ghost cell width for this outernode box geometry object.
+    */
+   const hier::IntVector&
+   getGhosts() const;
+
+private:
+   /*!
+    * @brief
+    * Compute the overlap
+    * between the source and destination objects, where the source
+    * has outernode geometry and the destination node geometry.
+    */
+   static tbox::Pointer<hier::BoxOverlap>
+   doOverlap(
+      const NodeGeometry& dst_geometry,
+      const OuternodeGeometry& src_geometry,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset,
+      const hier::BoxList& dst_restrict_boxes);
+
+   /*!
+    * @brief
+    * Compute the overlap
+    * between the source and destination objects, where the source
+    * has node geometry and the destination outernode geometry.
+    */
+   static tbox::Pointer<hier::BoxOverlap>
+   doOverlap(
+      const OuternodeGeometry& dst_geometry,
+      const NodeGeometry& src_geometry,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset,
+      const hier::BoxList& dst_restrict_boxes);
+
+   /*!
+    * @brief
+    * Compute the overlap
+    * between the source and destination objects, where the source
+    * has outernode geometry and the destination outernode geometry.
+    */
+   static tbox::Pointer<hier::BoxOverlap>
+   doOverlap(
+      const OuternodeGeometry& dst_geometry,
+      const OuternodeGeometry& src_geometry,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset,
+      const hier::BoxList& dst_restrict_boxes);
+
+   /*! Not implemented */
+   OuternodeGeometry(
+      const OuternodeGeometry&);
+   /*! Not implemented */
+   void
+   operator = (
+      const OuternodeGeometry&);
+
+   hier::Box d_box;
+   hier::IntVector d_ghosts;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/OuternodeGeometry.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuternodeVariable.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuternodeVariable.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Variable<DIM> class for defining outernode centered variables 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuternodeVariable_C
+#define included_pdat_OuternodeVariable_C
+
+#include "SAMRAI/pdat/OuternodeVariable.h"
+#include "SAMRAI/pdat/OuternodeDataFactory.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor and destructor for side variable objects                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+OuternodeVariable<TYPE>::OuternodeVariable(
+   const tbox::Dimension& dim,
+   const std::string& name,
+   int depth):
+   hier::Variable(name,
+                  tbox::Pointer<SAMRAI::hier::PatchDataFactory>(new
+                                                                OuternodeDataFactory
+                                                                <
+                                                                   TYPE>(dim,
+                                                                         depth)))
+{
+}
+
+template<class TYPE>
+OuternodeVariable<TYPE>::~OuternodeVariable()
+{
+}
+
+template<class TYPE>
+int OuternodeVariable<TYPE>::getDepth() const
+{
+   tbox::Pointer<OuternodeDataFactory<TYPE> > factory =
+      this->getPatchDataFactory();
+   TBOX_ASSERT(factory);
+   return factory->getDepth();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * These are private and should not be used.  They are defined here      *
+ * because some template instantiation methods fail if some member       *
+ * functions are left undefined.                                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+OuternodeVariable<TYPE>::OuternodeVariable(
+   const OuternodeVariable<TYPE>& foo):
+   hier::Variable(NULL, tbox::Pointer<SAMRAI::hier::PatchDataFactory>(NULL))
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void OuternodeVariable<TYPE>::operator = (
+   const OuternodeVariable<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OuternodeVariable.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OuternodeVariable.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Variable class for defining outernode centered variables 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuternodeVariable
+#define included_pdat_OuternodeVariable
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/hier/Variable.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * @brief Class OuternodeVariable<DIM> is a templated variable class
+ * used to define node-centered data quantities only on patch boundaries.
+ * It is a subclass of hier::Variable and is templated on the type
+ * of the underlying data (e.g., double, int, bool, etc.).
+ *
+ * Note that the data layout in the outernode data arrays matches the corresponding
+ * array sections provided by the node data implementation.  See header file for
+ * the OuternodeData<DIM> class for a more detailed description of the data layout.
+ *
+ * @see NodeData<DIM>
+ * @see OuternodeData<DIM>
+ * @see OuternodeDataFactory<DIM>
+ * @see hier::Variable
+ */
+
+template<class TYPE>
+class OuternodeVariable:public hier::Variable
+{
+public:
+   /*!
+    * @brief Create an outernode variable object having properties
+    * specified by the name and depth (i.e., number of data values
+    * at each index location).  The default depth is one.
+    *
+    * Note that The ghost cell width for all outernode data is currently
+    * fixed at zero; this may be changed in the future if needed.
+    */
+   explicit OuternodeVariable(
+      const tbox::Dimension& dim,
+      const std::string& name,
+      int depth = 1);
+
+   /*!
+    * @brief Virtual destructor for outernode variable objects.
+    */
+   virtual ~OuternodeVariable<TYPE>();
+
+   /*!
+    * @brief Return a boolean true value indicating that fine patch
+    * values take precedence on coarse-fine interfaces.
+    */
+   bool fineBoundaryRepresentsVariable() const {
+      return true;
+   }
+
+   /*!
+    * @brief Return true indicating that outernode data
+    * exists on the patch boundary.
+    */
+   bool dataLivesOnPatchBorder() const {
+      return true;
+   }
+
+   /*!
+    * @brief Return the the depth (number of components).
+    */
+   int
+   getDepth() const;
+
+private:
+   // neither of the following functions are implemented
+   OuternodeVariable<TYPE>(const OuternodeVariable<TYPE>&);
+   void
+   operator = (
+      const OuternodeVariable<TYPE>&);
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/OuternodeVariable.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OutersideComplexLinearTimeInterpolateOp.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OutersideComplexLinearTimeInterpolateOp.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,273 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for complex outerside data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OutersideComplexLinearTimeInterpolateOp_C
+#define included_pdat_OutersideComplexLinearTimeInterpolateOp_C
+
+#include "SAMRAI/pdat/OutersideComplexLinearTimeInterpolateOp.h"
+#include "SAMRAI/tbox/Complex.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/OutersideData.h"
+#include "SAMRAI/pdat/OutersideVariable.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in lintimint1d.f:
+void F77_FUNC(lintimeintoutsidecmplx1d, LINTIMEINTOUTSIDECMPLX1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+// in lintimint2d.f:
+void F77_FUNC(lintimeintoutsidecmplx2d0,
+              LINTIMEINTOUTSIDECMPLX2D0) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+void F77_FUNC(lintimeintoutsidecmplx2d1,
+              LINTIMEINTOUTSIDECMPLX2D1) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+// in lintimint3d.f:
+void F77_FUNC(lintimeintoutsidecmplx3d0,
+              LINTIMEINTOUTSIDECMPLX3D0) (const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+void F77_FUNC(lintimeintoutsidecmplx3d1,
+              LINTIMEINTOUTSIDECMPLX3D1) (const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+void F77_FUNC(lintimeintoutsidecmplx3d2,
+              LINTIMEINTOUTSIDECMPLX3D2) (const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+OutersideComplexLinearTimeInterpolateOp::
+OutersideComplexLinearTimeInterpolateOp():
+   xfer::TimeInterpolateOperator()
+{
+}
+
+OutersideComplexLinearTimeInterpolateOp::~
+OutersideComplexLinearTimeInterpolateOp()
+{
+}
+
+bool OutersideComplexLinearTimeInterpolateOp::findTimeInterpolateOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   const tbox::Pointer<OutersideVariable<dcomplex> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == "STD_LINEAR_TIME_INTERPOLATE")) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+void OutersideComplexLinearTimeInterpolateOp::timeInterpolate(
+   hier::PatchData& dst_data,
+   const hier::Box& where,
+   const hier::PatchData& src_data_old,
+   const hier::PatchData& src_data_new) const
+{
+   const tbox::Dimension& dim(where.getDim());
+
+   const OutersideData<dcomplex>* old_dat =
+      dynamic_cast<const OutersideData<dcomplex> *>(&src_data_old);
+   const OutersideData<dcomplex>* new_dat =
+      dynamic_cast<const OutersideData<dcomplex> *>(&src_data_new);
+   OutersideData<dcomplex>* dst_dat =
+      dynamic_cast<OutersideData<dcomplex> *>(&dst_data);
+
+   TBOX_ASSERT(old_dat != NULL);
+   TBOX_ASSERT(new_dat != NULL);
+   TBOX_ASSERT(dst_dat != NULL);
+   TBOX_ASSERT(where * old_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * new_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * dst_dat->getGhostBox() == where);
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst_data, where, src_data_old, src_data_new);
+
+   const hier::Index old_ilo = old_dat->getGhostBox().lower();
+   const hier::Index old_ihi = old_dat->getGhostBox().upper();
+   const hier::Index new_ilo = new_dat->getGhostBox().lower();
+   const hier::Index new_ihi = new_dat->getGhostBox().upper();
+
+   const hier::Index dst_ilo = dst_dat->getGhostBox().lower();
+   const hier::Index dst_ihi = dst_dat->getGhostBox().upper();
+
+   const hier::Index ifirst = where.lower();
+   const hier::Index ilast = where.upper();
+
+   const double old_time = old_dat->getTime();
+   const double new_time = new_dat->getTime();
+   const double dst_time = dst_dat->getTime();
+
+   TBOX_ASSERT((old_time < dst_time ||
+                tbox::MathUtilities<double>::equalEps(old_time, dst_time)) &&
+      (dst_time < new_time ||
+       tbox::MathUtilities<double>::equalEps(dst_time, new_time)));
+
+   double tfrac = dst_time - old_time;
+   double denom = new_time - old_time;
+   if (denom > tbox::MathUtilities<double>::getMin()) {
+      tfrac /= denom;
+   } else {
+      tfrac = 0.0;
+   }
+
+   for (int d = 0; d < dst_dat->getDepth(); d++) {
+      // loop over lower and upper outerside arrays
+      for (int i = 0; i < 2; i++) {
+         if (dim == tbox::Dimension(1)) {
+            F77_FUNC(lintimeintoutsidecmplx1d,
+               LINTIMEINTOUTSIDECMPLX1D) (ifirst(0), ilast(0),
+               old_ilo(0), old_ihi(0),
+               new_ilo(0), new_ihi(0),
+               dst_ilo(0), dst_ihi(0),
+               tfrac,
+               old_dat->getPointer(0, i, d),
+               new_dat->getPointer(0, i, d),
+               dst_dat->getPointer(0, i, d));
+         } else if (dim == tbox::Dimension(2)) {
+            F77_FUNC(lintimeintoutsidecmplx2d0,
+               LINTIMEINTOUTSIDECMPLX2D0) (ifirst(0), ifirst(1), ilast(0),
+               ilast(1),
+               old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+               new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+               dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+               tfrac,
+               old_dat->getPointer(0, i, d),
+               new_dat->getPointer(0, i, d),
+               dst_dat->getPointer(0, i, d));
+            F77_FUNC(lintimeintoutsidecmplx2d1,
+               LINTIMEINTOUTSIDECMPLX2D1) (ifirst(0), ifirst(1), ilast(0),
+               ilast(1),
+               old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+               new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+               dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+               tfrac,
+               old_dat->getPointer(1, i, d),
+               new_dat->getPointer(1, i, d),
+               dst_dat->getPointer(1, i, d));
+         } else if (dim == tbox::Dimension(3)) {
+            F77_FUNC(lintimeintoutsidecmplx3d0,
+               LINTIMEINTOUTSIDECMPLX3D0) (ifirst(0), ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(0, i, d),
+               new_dat->getPointer(0, i, d),
+               dst_dat->getPointer(0, i, d));
+            F77_FUNC(lintimeintoutsidecmplx3d1,
+               LINTIMEINTOUTSIDECMPLX3D1) (ifirst(0), ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(1, i, d),
+               new_dat->getPointer(1, i, d),
+               dst_dat->getPointer(1, i, d));
+            F77_FUNC(lintimeintoutsidecmplx3d2,
+               LINTIMEINTOUTSIDECMPLX3D2) (ifirst(0), ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(2, i, d),
+               new_dat->getPointer(2, i, d),
+               dst_dat->getPointer(2, i, d));
+         } else {
+            TBOX_ERROR(
+               "OutersideComplexLinearTimeInterpolateOp::TimeInterpolate dim > 3 not supported"
+               << std::endl);
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OutersideComplexLinearTimeInterpolateOp.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OutersideComplexLinearTimeInterpolateOp.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for complex outerside data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OutersideComplexLinearTimeInterpolateOp
+#define included_pdat_OutersideComplexLinearTimeInterpolateOp
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class OutersideComplexLinearTimeInterpolateOp implements standard
+ * linear time interpolation for complex outreside patch data.  Recall
+ * that outerside patch data uses the same indices as side-centered data
+ * but the data only exists on the sides that coincide with patch boundaries.
+ * It is derived from the xfer::TimeInterpolateOperator base class.
+ * The interpolation uses FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is an outerside complex type, and the string is
+ * "STD_LINEAR_TIME_INTERPOLATE".
+ *
+ * @see xfer::TimeInterpolateOperator
+ */
+
+class OutersideComplexLinearTimeInterpolateOp:
+   public xfer::TimeInterpolateOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   OutersideComplexLinearTimeInterpolateOp();
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~OutersideComplexLinearTimeInterpolateOp();
+
+   /**
+    * Return true if the variable and name string match the standard
+    * complex outreside interpolation; otherwise, return false.
+    */
+   bool
+   findTimeInterpolateOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Perform linear time interpolation between two complex outerside
+    * patch data sources and place result in the destination patch data.
+    * Time interpolation is performed on the intersection of the destination
+    * patch data and the input box.  The time to which data is interpolated
+    * is provided by the destination data.
+    */
+   void
+   timeInterpolate(
+      hier::PatchData& dst_data,
+      const hier::Box& where,
+      const hier::PatchData& src_data_old,
+      const hier::PatchData& src_data_new) const;
+
+private:
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OutersideData.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OutersideData.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,580 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated outerside centered patch data type 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OutersideData_C
+#define included_pdat_OutersideData_C
+
+#include "SAMRAI/pdat/OutersideData.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/SideGeometry.h"
+#include "SAMRAI/pdat/SideOverlap.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include <stdio.h>
+
+#define PDAT_OUTERSIDEDATA_VERSION 1
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/OutersideData.I"
+#endif
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * Constructor and destructor for outerside data objects.  The		*
+ * constructor simply initializes data variables and sets up the		*
+ * array data.								*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+OutersideData<TYPE>::OutersideData(
+   const hier::Box& box,
+   int depth):
+   hier::PatchData(box, hier::IntVector::getZero(box.getDim())),
+   d_depth(depth)
+{
+   TBOX_ASSERT(depth > 0);
+
+   for (int d = 0; d < getDim().getValue(); d++) {
+      const hier::Box& ghosts = this->getGhostBox();
+      const hier::Box sidebox = SideGeometry::toSideBox(ghosts, d);
+      hier::Box outersidebox = sidebox;
+      outersidebox.upper(d) = sidebox.lower(d);
+      d_data[d][0].initializeArray(outersidebox, depth);
+      outersidebox.lower(d) = sidebox.upper(d);
+      outersidebox.upper(d) = sidebox.upper(d);
+      d_data[d][1].initializeArray(outersidebox, depth);
+   }
+}
+
+template<class TYPE>
+OutersideData<TYPE>::~OutersideData()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * The following are private and cannot be used, but they are defined	*
+ * here for compilers that require that every template declaration have	*
+ * a definition (a stupid requirement, if you ask me).			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+OutersideData<TYPE>::OutersideData(
+   const OutersideData<TYPE>& foo):
+   hier::PatchData(foo.getBox(), foo.getGhostCellWidth())
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void OutersideData<TYPE>::operator = (
+   const OutersideData<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Perform a fast copy between an outerside patch data type (source) and	*
+ * a side patch data type (destination) where the index spaces overlap.	*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OutersideData<TYPE>::copy(
+   const hier::PatchData& src)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   const SideData<TYPE> * const t_src =
+      dynamic_cast<const SideData<TYPE> *>(&src);
+
+   TBOX_ASSERT(t_src != NULL);
+
+   for (int axis = 0; axis < getDim().getValue(); axis++) {
+      const ArrayData<TYPE>& side_array = t_src->getArrayData(axis);
+      for (int loc = 0; loc < 2; loc++) {
+         ArrayData<TYPE>& oside_array = d_data[axis][loc];
+         oside_array.copy(side_array, oside_array.getBox());
+      }
+   }
+
+}
+
+template<class TYPE>
+void OutersideData<TYPE>::copy2(
+   hier::PatchData& dst) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   SideData<TYPE>* t_dst =
+      dynamic_cast<SideData<TYPE> *>(&dst);
+
+   TBOX_ASSERT(t_dst != NULL);
+
+   for (int d = 0; d < getDim().getValue(); d++) {
+      t_dst->getArrayData(d).copy(d_data[d][0], d_data[d][0].getBox());
+      t_dst->getArrayData(d).copy(d_data[d][1], d_data[d][1].getBox());
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Copy data from the source into the destination according to the	*
+ * overlap descriptor.							*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OutersideData<TYPE>::copy(
+   const hier::PatchData& src,
+   const hier::BoxOverlap& overlap)
+{
+   NULL_USE(src);
+   NULL_USE(overlap);
+
+   TBOX_ERROR("Copy with outerside as destination is not defined yet...");
+}
+
+template<class TYPE>
+void OutersideData<TYPE>::copy2(
+   hier::PatchData& dst,
+   const hier::BoxOverlap& overlap) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   SideData<TYPE>* t_dst =
+      dynamic_cast<SideData<TYPE> *>(&dst);
+   const SideOverlap* t_overlap =
+      dynamic_cast<const SideOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_dst != NULL);
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::IntVector& src_offset = t_overlap->getSourceOffset();
+   for (int d = 0; d < getDim().getValue(); d++) {
+      const hier::BoxList& box_list = t_overlap->getDestinationBoxList(d);
+      t_dst->getArrayData(d).copy(d_data[d][0], box_list, src_offset);
+      t_dst->getArrayData(d).copy(d_data[d][1], box_list, src_offset);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Perform a fast copy from a side data object to this outerside data    *
+ * object at the specified depths, where their index spaces overlap.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OutersideData<TYPE>::copyDepth(
+   int dst_depth,
+   const SideData<TYPE>& src,
+   int src_depth)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, src);
+
+   for (int axis = 0; axis < getDim().getValue(); axis++) {
+      const ArrayData<TYPE>& src_side_array = src.getArrayData(axis);
+      for (int loc = 0; loc < 2; loc++) {
+         ArrayData<TYPE>& dst_oside_array = d_data[axis][loc];
+         dst_oside_array.copyDepth(dst_depth,
+            src_side_array,
+            src_depth,
+            dst_oside_array.getBox());
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Perform a fast copy to a side data object from this outerside data    *
+ * object at the specified depths, where their index spaces overlap.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OutersideData<TYPE>::copyDepth2(
+   int dst_depth,
+   SideData<TYPE>& dst,
+   int src_depth) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, dst);
+
+   for (int axis = 0; axis < getDim().getValue(); axis++) {
+      ArrayData<TYPE>& dst_side_array = dst.getArrayData(axis);
+      for (int loc = 0; loc < 2; loc++) {
+         const ArrayData<TYPE>& src_oside_array = d_data[axis][loc];
+         dst_side_array.copyDepth(dst_depth,
+            src_oside_array,
+            src_depth,
+            src_oside_array.getBox());
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Calculate the buffer space needed to pack/unpack messages on the box	*
+ * region using the overlap descriptor.					*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+bool OutersideData<TYPE>::canEstimateStreamSizeFromBox() const
+{
+   return ArrayData<TYPE>::canEstimateStreamSizeFromBox();
+}
+
+template<class TYPE>
+int OutersideData<TYPE>::getDataStreamSize(
+   const hier::BoxOverlap& overlap) const
+{
+   const SideOverlap* t_overlap =
+      dynamic_cast<const SideOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::IntVector& src_offset = t_overlap->getSourceOffset();
+
+   int size = 0;
+   for (int d = 0; d < getDim().getValue(); d++) {
+      const hier::BoxList& boxlist = t_overlap->getDestinationBoxList(d);
+      size += d_data[d][0].getDataStreamSize(boxlist, src_offset);
+      size += d_data[d][1].getDataStreamSize(boxlist, src_offset);
+   }
+   return size;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Pack/unpack data into/out of the message streams using the index	*
+ * space in the overlap descriptor.					*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OutersideData<TYPE>::packStream(
+   tbox::MessageStream& stream,
+   const hier::BoxOverlap& overlap) const
+{
+   const SideOverlap* t_overlap =
+      dynamic_cast<const SideOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::IntVector& src_offset = t_overlap->getSourceOffset();
+   for (int d = 0; d < getDim().getValue(); d++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(d);
+      for (hier::BoxList::Iterator b(boxes); b; b++) {
+         const hier::Box src_box = hier::Box::shift(b(), -src_offset);
+         for (int f = 0; f < 2; f++) {
+            const hier::Box intersect = src_box * d_data[d][f].getBox();
+            if (!intersect.empty()) {
+               d_data[d][f].packStream(stream,
+                  hier::Box::shift(intersect, src_offset),
+                  src_offset);
+            }
+         }
+      }
+   }
+}
+
+template<class TYPE>
+void OutersideData<TYPE>::unpackStream(
+   tbox::MessageStream& stream,
+   const hier::BoxOverlap& overlap)
+{
+   const SideOverlap* t_overlap =
+      dynamic_cast<const SideOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::IntVector& src_offset = t_overlap->getSourceOffset();
+   for (int d = 0; d < getDim().getValue(); d++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(d);
+      for (hier::BoxList::Iterator b(boxes); b; b++) {
+         for (int f = 0; f < 2; f++) {
+            const hier::Box intersect = b() * d_data[d][f].getBox();
+            if (!intersect.empty()) {
+               d_data[d][f].unpackStream(stream, intersect, src_offset);
+            }
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Calculate the amount of memory space needed to represent the data	*
+ * for a  outerside centered grid.					*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+size_t OutersideData<TYPE>::getSizeOfData(
+   const hier::Box& box,
+   int depth)
+{
+   TBOX_ASSERT(depth > 0);
+
+   size_t size = 0;
+   for (int d = 0; d < box.getDim().getValue(); d++) {
+      hier::Box lower = SideGeometry::toSideBox(box, d);
+      hier::Box upper = SideGeometry::toSideBox(box, d);
+      lower.upper(d) = box.lower(d);
+      upper.lower(d) = box.upper(d);
+      size += ArrayData<TYPE>::getSizeOfData(lower, depth);
+      size += ArrayData<TYPE>::getSizeOfData(upper, depth);
+   }
+   return size;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Fill the outerside centered box with the given value.			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OutersideData<TYPE>::fill(
+   const TYPE& t,
+   int d)
+{
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   for (int i = 0; i < getDim().getValue(); i++) {
+      d_data[i][0].fill(t, d);
+      d_data[i][1].fill(t, d);
+   }
+}
+
+template<class TYPE>
+void OutersideData<TYPE>::fill(
+   const TYPE& t,
+   const hier::Box& box,
+   int d)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   for (int i = 0; i < getDim().getValue(); i++) {
+      d_data[i][0].fill(t, SideGeometry::toSideBox(box, i), d);
+      d_data[i][1].fill(t, SideGeometry::toSideBox(box, i), d);
+   }
+}
+
+template<class TYPE>
+void OutersideData<TYPE>::fillAll(
+   const TYPE& t)
+{
+   for (int i = 0; i < getDim().getValue(); i++) {
+      d_data[i][0].fillAll(t);
+      d_data[i][1].fillAll(t);
+   }
+}
+
+template<class TYPE>
+void OutersideData<TYPE>::fillAll(
+   const TYPE& t,
+   const hier::Box& box)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   for (int i = 0; i < getDim().getValue(); i++) {
+      d_data[i][0].fillAll(t, SideGeometry::toSideBox(box, i));
+      d_data[i][1].fillAll(t, SideGeometry::toSideBox(box, i));
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print routines for outerside centered arrays.				*
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OutersideData<TYPE>::print(
+   const hier::Box& box,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   for (int d = 0; d < d_depth; d++) {
+      print(box, d, os, prec);
+   }
+}
+
+template<class TYPE>
+void OutersideData<TYPE>::print(
+   const hier::Box& box,
+   int depth,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   for (int side_normal = 0; side_normal < getDim().getValue(); side_normal++) {
+      os << "Array side normal  = " << side_normal << std::endl;
+      for (int side = 0; side < 2; side++) {
+         os << "side = " << ((side == 0) ? "lower" : "upper") << std::endl;
+         printAxisSide(side_normal, side, box, depth, os, prec);
+      }
+   }
+}
+
+template<class TYPE>
+void OutersideData<TYPE>::printAxisSide(
+   int side_normal,
+   int side,
+   const hier::Box& box,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   TBOX_ASSERT((side_normal >= 0) && (side_normal < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+
+   for (int d = 0; d < d_depth; d++) {
+      os << "Array depth = " << d << std::endl;
+      printAxisSide(side_normal, side, box, d, os, prec);
+   }
+}
+
+template<class TYPE>
+void OutersideData<TYPE>::printAxisSide(
+   int side_normal,
+   int side,
+   const hier::Box& box,
+   int depth,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+   TBOX_ASSERT((side_normal >= 0) && (side_normal < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+
+   const hier::Box sidebox =
+      SideGeometry::toSideBox(box, side_normal);
+   const hier::Box region =
+      sidebox * d_data[side_normal][side].getBox();
+   os.precision(prec);
+   for (hier::Box::Iterator i(region); i; i++) {
+      os << "array" << i() << " = "
+      << d_data[side_normal][side](i(), depth) << std::endl;
+      os << std::flush;
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Checks that class version and restart file version are equal.  If so,	*
+ * reads in d_depth from the database.  Then has each item in d_data	*
+ * read in its data from the database.					*
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OutersideData<TYPE>::getSpecializedFromDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   int ver = database->getInteger("PDAT_OUTERSIDEDATA_VERSION");
+   if (ver != PDAT_OUTERSIDEDATA_VERSION) {
+      TBOX_ERROR("OutersideData<DIM>::getSpecializedFromDatabase error...\n"
+         << " : Restart file version different than class version" << std::endl);
+   }
+
+   d_depth = database->getInteger("d_depth");
+
+   tbox::Pointer<tbox::Database> array_database;
+   for (int i = 0; i < getDim().getValue(); i++) {
+      std::string array_name = "d_data" + tbox::Utilities::intToString(i)
+         + "_1";
+      array_database = database->getDatabase(array_name);
+      (d_data[i][0]).getFromDatabase(array_database);
+
+      array_name = "d_data%d_" + tbox::Utilities::intToString(i) + "_2";
+      array_database = database->getDatabase(array_name);
+      (d_data[i][1]).getFromDatabase(array_database);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Writes out class version number, d_depth to the database.		*
+ * Then has each item in d_data write out its data to the database.	*
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void OutersideData<TYPE>::putSpecializedToDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   database->putInteger("PDAT_OUTERSIDEDATA_VERSION",
+      PDAT_OUTERSIDEDATA_VERSION);
+
+   database->putInteger("d_depth", d_depth);
+
+   tbox::Pointer<tbox::Database> array_database;
+   for (int i = 0; i < getDim().getValue(); i++) {
+      std::string array_name = "d_data%d_" + tbox::Utilities::intToString(i)
+         + "_1";
+      array_database = database->putDatabase(array_name);
+      (d_data[i][0]).putToDatabase(array_database);
+
+      array_name = "d_data%d_" + tbox::Utilities::intToString(i) + "_2";
+      array_database = database->putDatabase(array_name);
+      (d_data[i][1]).putToDatabase(array_database);
+   }
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OutersideData.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OutersideData.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated outerside centered patch data type 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int OutersideData<TYPE>::getDepth() const
+{
+   return d_depth;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE * OutersideData<TYPE>::getPointer(
+   int side_normal,
+   int side,
+   int depth)
+{
+   TBOX_ASSERT((side_normal >= 0) && (side_normal < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data[side_normal][side].getPointer(depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE * OutersideData<TYPE>::getPointer(
+   int side_normal,
+   int side,
+   int depth) const
+{
+   TBOX_ASSERT((side_normal >= 0) && (side_normal < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data[side_normal][side].getPointer(depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ArrayData<TYPE>&
+OutersideData<TYPE>::getArrayData(
+   int side_normal,
+   int side)
+{
+   TBOX_ASSERT((side_normal >= 0) && (side_normal < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+
+   return d_data[side_normal][side];
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const ArrayData<TYPE>&
+OutersideData<TYPE>::getArrayData(
+   int side_normal,
+   int side) const
+{
+   TBOX_ASSERT((side_normal >= 0) && (side_normal < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+
+   return d_data[side_normal][side];
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE & OutersideData<TYPE>::operator () (
+   const SideIndex& i,
+   int side,
+   int depth)
+{
+   const int axis = i.getAxis();
+
+   TBOX_ASSERT((axis >= 0) && (axis < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data[axis][side](i, depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE &OutersideData<TYPE>::operator () (
+   const SideIndex& i,
+   int side,
+   int depth) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, i);
+
+   const int axis = i.getAxis();
+
+   TBOX_ASSERT((axis >= 0) && (axis < getDim().getValue()));
+   TBOX_ASSERT((side == 0) || (side == 1));
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data[axis][side](i, depth);
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OutersideData.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OutersideData.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,525 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated outerside centered patch data type 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OutersideData
+#define included_pdat_OutersideData
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/SideIndex.h"
+#include "SAMRAI/pdat/SideIterator.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * @brief Class OutersideData<DIM> provides an implementation for data defined
+ * at cell sides (faces) on the boundaries of AMR patches.  It is derived from
+ * the hier::PatchData interface common to all SAMRAI patch data types.  Given
+ * a CELL-centered AMR index space box, an outerside data object represents
+ * data of some template TYPE and depth on the cell sides (faces) on the boundary
+ * of the box.  Here, depth indicates the number of data values at each face
+ * index location.  The OuteredgsideGeometry class provides the translation
+ * between the standard SAMRAI cell-centered AMR index space and
+ * outerside-centered data.
+ *
+ * Outerside data is stored in 2*DIM arrays, each of which contains data
+ * associated with side (face) indices normal to a coordinate axis direction
+ * and an upper or lower box side (face) in the face normal direction.
+ * The data layout in the outerside data arrays matches the corresponding array
+ * sections provided by the side data implementation.  Also, in each of array,
+ * memory allocation is in column-major ordering (e.g., Fortran style) so that
+ * the leftmost index runs fastest in memory.  For example, a three-dimensional
+ * outerside data object created over a CELL-centered AMR index space
+ * [l0:u0,l1:u1,l2:u2] allocates six data arrays dimensioned as follows:
+ * \verbatim
+ *
+ * face normal 0:
+ *   lower face      [ l0:l0     , l1:u1     , l2:u2     , d ]
+ *   upper face      [ u0+1:u0+1 , l1:u1     , l2:u2     , d ]
+ *
+ * face normal 1:
+ *   lower face      [ l0:u0     , l1:l1     , l2:u2     , d ]
+ *   upper face      [ l0:u0     , u1+1:u1+1 , l2:u2     , d ]
+ *
+ * face normal 2:
+ *   lower face      [ l0:u0     , l1:u1     , l2:l2     , d ]
+ *   upper face      [ l0:u0     , l1:u1     , u2+1:u2+1 , d ]
+ *
+ * \endverbatim
+ * Here the face normal directions 0, 1, 2 can be thought of as the x, y, and z
+ * face normal directions, respectively, and d is the depth index (i.e., number
+ * of values at each face index location).  Other spatial dimensions are
+ * represented similarly.
+ *
+ * The data type TYPE must define a default constructor (that takes no
+ * arguments) and also the assignment operator.
+ *
+ * IMPORTANT: The OuterfaceData<DIM> class provides the same storage
+ * as this outerside data class, except that the coordinate directions of the
+ * individual arrays are permuted; i.e., OuterfaceData is consistent
+ * with the FaceData implementation.
+ *
+ * @see pdat::ArrayData
+ * @see hier::PatchData
+ * @see pdat::OutersideDataFactory
+ * @see pdat::OutersideGeometry
+ * @see pdat::SideIterator
+ * @see pdat::SideIndex
+ */
+
+template<class TYPE>
+class OutersideData:public hier::PatchData
+{
+public:
+   /*!
+    * @brief Calculate the amount of memory needed to represent outerside-
+    * centered data over a CELL-centered AMR index space box.
+    *
+    * This function assumes that the amount of
+    * memory needed for TYPE is sizeof(TYPE).
+    * If this is not the case, then a specialized function must be defined.
+    *
+    * @param box const Box reference describing the interior of the
+    *            standard CELL-centered index box over which the
+    *            outerside data object will be created.
+    *            Note: the ghost cell width is assumed to be zero.
+    * @param depth gives the number of data values for each
+    *              spatial location in the array.
+    */
+   static size_t
+   getSizeOfData(
+      const hier::Box& box,
+      int depth);
+
+   /*!
+    * @brief Constructor for an outerside data object.
+    *
+    * Note: Outerside data always has ghost cell width of zero.
+    *
+    * @param box const Box reference describing the interior of the
+    *            standard CELL-centered index box over which the
+    *            outerside data object will be created.
+    * @param depth gives the number of data values for each
+    *              spatial location in the array.
+    */
+   explicit OutersideData(
+      const hier::Box& box,
+      int depth);
+
+   /*!
+    * @brief Virtual destructor for a outerside data object.
+    */
+   virtual ~OutersideData<TYPE>();
+
+   /*!
+    * @brief Return the depth (i.e., the number of data values for
+    * each spatial location) of the array.
+    */
+   int
+   getDepth() const;
+
+   /*!
+    * @brief Get a pointer to the beginning of a particular
+    * side normal, side, and depth component of the outerside centered
+    * array.
+    *
+    * @param side_normal  integer side normal direction for data,
+    *              must satisfy 0 <= side_normal < DIM
+    * @param side integer lower (0) or upper (1) side of outerside
+    *             data array
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    */
+   TYPE *
+   getPointer(
+      int side_normal,
+      int side,
+      int depth = 0);
+
+   /*!
+    * @brief Get a const pointer to the beginning of a particular
+    * side normal, side, and depth component of the outerside centered
+    * array.
+    *
+    * @param side_normal  integer side normal direction for data,
+    *              must satisfy 0 <= side_normal < DIM
+    * @param side integer lower (0) or upper (1) side of outerside
+    *             data array
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    */
+   const TYPE *
+   getPointer(
+      int side_normal,
+      int side,
+      int depth = 0) const;
+
+   /*!
+    * @brief Return a reference to data entry corresponding
+    * to a given side index, side location, and depth.
+    *
+    * @param i const reference to SideIndex, @em MUST be
+    *          an index on the outerside of the box.
+    * @param side  integer (lower/upper location of outerside data),
+    *              must satisfy 0 <= side <= 1
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    */
+   TYPE&
+   operator () (
+      const SideIndex& i,
+      int side,
+      int depth = 0);
+
+   /*!
+    * @brief Return a const reference to data entry corresponding
+    * to a given side index, side location, and depth.
+    *
+    * @param i const reference to SideIndex, @em MUST be
+    *          an index on the outerside of the box.
+    * @param side  integer (lower/upper location of outerside data),
+    *              must satisfy 0 <= side <= 1
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    */
+   const TYPE&
+   operator () (
+      const SideIndex& i,
+      int side,
+      int depth = 0) const;
+
+   /*!
+    * @brief Return a reference to the array data object for
+    * side normal and side location of the outerside centered array.
+    *
+    * @param side_normal  integer side normal direction for data,
+    *              must satisfy 0 <= side_normal < DIM
+    * @param side integer lower (0) or upper (1) side of outerside
+    *             data array
+    */
+   ArrayData<TYPE>&
+   getArrayData(
+      int side_normal,
+      int side);
+
+   /*!
+    * @brief Return a const reference to the array data object for
+    * side normal and side location of the outerside centered array.
+    *
+    * @param side_normal  integer side normal direction for data,
+    *              must satisfy 0 <= side_normal < DIM
+    * @param side integer lower (0) or upper (1) side of outerside
+    *             data array
+    */
+   const ArrayData<TYPE>&
+   getArrayData(
+      int side_normal,
+      int side) const;
+
+   /*!
+    * @brief A fast copy from source to destination (i.e., this)
+    * patch data object.
+    *
+    * Data is copied where there is overlap in the underlying index space.
+    * The copy is performed on the interior plus the ghost cell width (for
+    * both the source and destination).  Currently, source data must be
+    * SideData the same DIM and TYPE.  If not, then an unrecoverable error
+    * results.
+    */
+   virtual void
+   copy(
+      const hier::PatchData& src);
+
+   /*!
+    * @brief A fast copy from source (i.e., this) to destination
+    * patch data object.
+    *
+    * Data is copied where there is overlap in the underlying index space.
+    * The copy is performed on the interior plus the ghost cell width (for
+    * both the source and destination).  Currently, destination data must be
+    * SideData of the same DIM and TYPE.  If not, then an unrecoverable
+    * error results.
+    */
+   virtual void
+   copy2(
+      hier::PatchData& dst) const;
+
+   /*!
+    * @brief Copy data from source to destination (i.e., this)
+    * patch data object on the given overlap.
+    *
+    * IMPORTANT: this routine is @b not @b yet @b implemented!
+    */
+   virtual void
+   copy(
+      const hier::PatchData& src,
+      const hier::BoxOverlap& overlap);
+
+   /*!
+    * @brief Copy data from source (i.e., this) to destination
+    * patch data object on the given overlap.
+    *
+    * Currently, destination data must be SideData of the same DIM
+    * and TYPE and the overlap must be a SideOverlap of the same
+    * DIM.  If not, then an unrecoverable error results.
+    */
+   virtual void
+   copy2(
+      hier::PatchData& dst,
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Fast copy (i.e., assumes side and outerside data objects are
+    * defined over the same box) from the given side source data object to
+    * this destination outerside data object at the specified depths.
+    */
+   void
+   copyDepth(
+      int dst_depth,
+      const SideData<TYPE>& src,
+      int src_depth);
+
+   /*!
+    * @brief Fast copy (i.e., assumes side and outerside data objects are
+    * defined over the same box) to the given side destination data object
+    * from this source outerside data object at the specified depths.
+    */
+   void
+   copyDepth2(
+      int dst_depth,
+      SideData<TYPE>& dst,
+      int src_depth) const;
+
+   /*!
+    * @brief Return true if the patch data object can estimate the
+    * stream size required to fit its data using only index
+    * space information (i.e., a box).
+    *
+    * This routine is defined for the standard types (bool, char,
+    * double, float, int, and dcomplex).
+    */
+   virtual bool
+   canEstimateStreamSizeFromBox() const;
+
+   /*!
+    * @brief Return the number of bytes needed to stream the data
+    * in this patch data object lying in the specified box overlap
+    * region.
+    *
+    * This routine is defined for the standard types (bool, char,
+    * double, float, int, and dcomplex).
+    */
+   virtual int
+   getDataStreamSize(
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Pack data in this patch data object lying in the specified
+    * box overlap region into the stream.  The overlap must be an
+    * SideOverlap of the same DIM.
+    */
+   virtual void
+   packStream(
+      tbox::MessageStream& stream,
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Unpack data from stream into this patch data object over
+    * the specified box overlap region. The overlap must be an
+    * SideOverlap of the same DIM.
+    */
+   virtual void
+   unpackStream(
+      tbox::MessageStream& stream,
+      const hier::BoxOverlap& overlap);
+
+   /*!
+    * @brief Fill all values at depth d with the value t.
+    */
+   void
+   fill(
+      const TYPE& t,
+      int d = 0);
+
+   /*!
+    * @brief Fill all values at depth d within the box with the value t.
+    */
+   void
+   fill(
+      const TYPE& t,
+      const hier::Box& box,
+      int d = 0);
+
+   /*!
+    * @brief Fill all depth components with value t.
+    */
+   void
+   fillAll(
+      const TYPE& t);
+
+   /*!
+    * @brief Fill all depth components within the box with value t.
+    */
+   void
+   fillAll(
+      const TYPE& t,
+      const hier::Box& box);
+
+   /*!
+    * @brief Print all outerside data values residing in the specified box.
+    * If the depth of the array is greater than one, all depths are printed.
+    *
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to side index space.
+    * @param os   reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   print(
+      const hier::Box& box,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Print all outerside data values at the given array depth in
+    * the specified box.
+    *
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to side index space.
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    * @param os   reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   print(
+      const hier::Box& box,
+      int depth,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Print all outerside centered data values for specified
+    * side_normal and side location residing in the specified box.
+    * If the depth of the data is greater than one, all depths are printed.
+    *
+    * @param side_normal  integer side normal direction for data,
+    *              must satisfy 0 <= side_normal < DIM
+    * @param side integer lower (0) or upper (1) side of outerside
+    *             data array
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to side index space.
+    * @param os    reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   printAxisSide(
+      int side_normal,
+      int side,
+      const hier::Box& box,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Print all outerside centered data values for specified
+    * side_normal, side location, and depth residing in the specified box.
+    *
+    * @param side_normal  integer side normal direction for data,
+    *              must satisfy 0 <= side_normal < DIM
+    * @param side integer lower (0) or upper (1) side of outerside
+    *             data array
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to side index space.
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    * @param os    reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   printAxisSide(
+      int side_normal,
+      int side,
+      const hier::Box& box,
+      int depth,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Check that class version and restart file version are equal.
+    * If so, read data members from the database.
+    *
+    * Assertions: database must be a non-null pointer.
+    */
+   virtual void
+   getSpecializedFromDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+   /*!
+    * @brief Write out the class version number and other data members to
+    * the database.
+    *
+    * Assertions: database must be a non-null pointer.
+    */
+   virtual void
+   putSpecializedToDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+private:
+   OutersideData(
+      const OutersideData<TYPE>&);            // not implemented
+   void
+   operator = (
+      const OutersideData<TYPE>&);                // not implemented
+
+   int d_depth;
+   ArrayData<TYPE> d_data[tbox::Dimension::MAXIMUM_DIMENSION_VALUE][2];
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/OutersideData.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/OutersideData.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OutersideDataFactory.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OutersideDataFactory.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,170 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating outerside data objects 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OutersideDataFactory_C
+#define included_pdat_OutersideDataFactory_C
+
+#include "SAMRAI/pdat/OutersideDataFactory.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/OutersideData.h"
+#include "SAMRAI/pdat/OutersideGeometry.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/pdat/SideDataFactory.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/OutersideDataFactory.I"
+#endif
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *
+ * The constructor simply caches the depth of the patch data.
+ *
+ *************************************************************************
+ */
+
+template<class TYPE>
+OutersideDataFactory<TYPE>::OutersideDataFactory(
+   const tbox::Dimension& dim,
+   int depth):
+   hier::PatchDataFactory(hier::IntVector::getZero(dim)),
+   d_depth(depth),
+   d_no_ghosts(hier::IntVector::getZero(dim))
+{
+   TBOX_ASSERT(depth > 0);
+}
+
+template<class TYPE>
+OutersideDataFactory<TYPE>::~OutersideDataFactory()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Clone the factory and copy the default parameters to the new factory.	*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::PatchDataFactory>
+OutersideDataFactory<TYPE>::cloneFactory(
+   const hier::IntVector& ghosts)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, ghosts);
+
+   return tbox::Pointer<hier::PatchDataFactory>(new OutersideDataFactory<TYPE>(
+                                                   ghosts.getDim(), d_depth));
+}
+
+/*
+ *************************************************************************
+ *
+ * Allocate the concrete outerside data classes.
+ *
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::PatchData>
+OutersideDataFactory<TYPE>::allocate(
+   const hier::Patch& patch) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, patch);
+
+   hier::PatchData* patchdata =
+      new OutersideData<TYPE>(patch.getBox(), d_depth);
+   return tbox::Pointer<hier::PatchData>(patchdata);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Return the box geometry type for outerside data objects.		*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::BoxGeometry>
+OutersideDataFactory<TYPE>::getBoxGeometry(
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   const hier::IntVector& zero_vector(hier::IntVector::getZero(getDim()));
+
+   hier::BoxGeometry* boxgeometry = new OutersideGeometry(box, zero_vector);
+   return tbox::Pointer<hier::BoxGeometry>(boxgeometry);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Calculate the amount of memory needed to allocate the data object.	*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+size_t OutersideDataFactory<TYPE>::getSizeOfMemory(
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   const size_t obj = tbox::MemoryUtilities::align(sizeof(OutersideData<TYPE>));
+   const size_t data = OutersideData<TYPE>::getSizeOfData(box, d_depth);
+   return obj + data;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Determine whether this is a valid copy operation to/from NodeData     *
+ * between the supplied datatype.                                        *
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+bool OutersideDataFactory<TYPE>::validCopyTo(
+   const tbox::Pointer<hier::PatchDataFactory>& dst_pdf) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *dst_pdf);
+
+   bool valid_copy = false;
+
+   /*
+    * Valid options are SideData and OutersideData.
+    */
+   if (!valid_copy) {
+      tbox::Pointer<SideDataFactory<TYPE> > sdf = dst_pdf;
+      if (!sdf.isNull()) {
+         valid_copy = true;
+      }
+   }
+
+   if (!valid_copy) {
+      tbox::Pointer<OutersideDataFactory<TYPE> > osdf = dst_pdf;
+      if (!osdf.isNull()) {
+         valid_copy = true;
+      }
+   }
+
+   return valid_copy;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OutersideDataFactory.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OutersideDataFactory.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,22 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating outerside data objects 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int OutersideDataFactory<TYPE>::getDepth() const
+{
+   return d_depth;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OutersideDataFactory.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OutersideDataFactory.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,144 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating outerside data objects 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OutersideDataFactory
+#define included_pdat_OutersideDataFactory
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/PatchDataFactory.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class OutersideDataFactory is a factory class used to allocate new
+ * instances of OutersideData objects.  It is a subclass of the patch
+ * data factory class and outerside data is a subclass of patch data.  Both
+ * the factory and data classes are templated on the type of the contained
+ * object (e.g., double or int).
+ *
+ * @see pdat::OutersideData
+ * @see pdat::PatchDataFactory
+ */
+
+template<class TYPE>
+class OutersideDataFactory:public hier::PatchDataFactory
+{
+public:
+   /**
+    * The default constructor for the outerside data factory class.
+    * The depth (number of components) gives the default for all of
+    * the outerside data objects created with this factory.
+    */
+   explicit OutersideDataFactory(
+      const tbox::Dimension& dim,
+      const int depth);
+
+   /**
+    * Virtual destructor for the outerside data factory class.
+    */
+   virtual ~OutersideDataFactory<TYPE>();
+
+   /**
+    * @brief Abstract virtual function to clone a patch data factory.
+    *
+    * This will return a new instantiation of the abstract factory
+    * with the same properties.  The properties of the cloned factory
+    * can then be changed without modifying the original.
+    *
+    * @param ghosts default ghost cell width for concrete classes created from
+    * the factory.
+    */
+   virtual tbox::Pointer<hier::PatchDataFactory>
+   cloneFactory(
+      const hier::IntVector& ghosts);
+
+   /**
+    * Virtual factory function to allocate a concrete outerside data object.
+    * The default information about the object (e.g., depth) is taken from
+    * the factory.
+    */
+   virtual tbox::Pointer<hier::PatchData>
+   allocate(
+      const hier::Patch& patch) const;
+
+   /**
+    * Allocate the box geometry object associated with the patch data.
+    * This information will be used in the computation of intersections
+    * and data dependencies between objects.
+    */
+   virtual tbox::Pointer<hier::BoxGeometry>
+   getBoxGeometry(
+      const hier::Box& box) const;
+
+   /**
+    * Get the depth (number of components).  This is the depth that
+    * will be used in the instantiation of outerside data objects.
+    */
+   int
+   getDepth() const;
+
+   /**
+    * Calculate the amount of memory needed to store the outerside data
+    * object, including object data and dynamically allocated data.
+    */
+   virtual size_t
+   getSizeOfMemory(
+      const hier::Box& box) const;
+
+   /**
+    * Return a boolean true value indicating that fine data for the outerside quantity will
+    * take precedence on coarse-fine interfaces.  See the OutersideVariable<DIM> class
+    * header file for more information.
+    */
+   bool fineBoundaryRepresentsVariable() const {
+      return true;
+   }
+
+   /**
+    * Return true since the outerside data index space extends beyond the interior of
+    * patches.  That is, outerside data lives on patch borders.
+    */
+   bool dataLivesOnPatchBorder() const {
+      return true;
+   }
+
+   /**
+    * Return whether it is valid to copy this OutersideDataFactory to the
+    * supplied destination patch data factory.  It will return true if
+    * dst_pdf is SideDataFactory or OutersideDataFactory, false otherwise.
+    */
+   bool
+   validCopyTo(
+      const tbox::Pointer<hier::PatchDataFactory>& dst_pdf) const;
+
+private:
+   int d_depth;
+
+   hier::IntVector d_no_ghosts;
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/OutersideDataFactory.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/OutersideDataFactory.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OutersideDoubleLinearTimeInterpolateOp.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OutersideDoubleLinearTimeInterpolateOp.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,270 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for double outerside patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OutersideDoubleLinearTimeInterpolateOp_C
+#define included_pdat_OutersideDoubleLinearTimeInterpolateOp_C
+
+#include "SAMRAI/pdat/OutersideDoubleLinearTimeInterpolateOp.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/OutersideData.h"
+#include "SAMRAI/pdat/OutersideVariable.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in lintimint1d.f:
+void F77_FUNC(lintimeintoutsidedoub1d, LINTIMEINTOUTSIDEDOUB1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+// in lintimint2d.f:
+void F77_FUNC(lintimeintoutsidedoub2d0, LINTIMEINTOUTSIDEDOUB2D0) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+void F77_FUNC(lintimeintoutsidedoub2d1, LINTIMEINTOUTSIDEDOUB2D1) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+// in lintimint3d.f:
+void F77_FUNC(lintimeintoutsidedoub3d0, LINTIMEINTOUTSIDEDOUB3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+void F77_FUNC(lintimeintoutsidedoub3d1, LINTIMEINTOUTSIDEDOUB3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+void F77_FUNC(lintimeintoutsidedoub3d2, LINTIMEINTOUTSIDEDOUB3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+OutersideDoubleLinearTimeInterpolateOp::OutersideDoubleLinearTimeInterpolateOp():
+   xfer::TimeInterpolateOperator()
+{
+}
+
+OutersideDoubleLinearTimeInterpolateOp::~OutersideDoubleLinearTimeInterpolateOp()
+{
+}
+
+bool OutersideDoubleLinearTimeInterpolateOp::findTimeInterpolateOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   const tbox::Pointer<OutersideVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == "STD_LINEAR_TIME_INTERPOLATE")) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+void OutersideDoubleLinearTimeInterpolateOp::timeInterpolate(
+   hier::PatchData& dst_data,
+   const hier::Box& where,
+   const hier::PatchData& src_data_old,
+   const hier::PatchData& src_data_new) const
+{
+   const tbox::Dimension& dim(where.getDim());
+
+   const OutersideData<double>* old_dat =
+      dynamic_cast<const OutersideData<double> *>(&src_data_old);
+   const OutersideData<double>* new_dat =
+      dynamic_cast<const OutersideData<double> *>(&src_data_new);
+   OutersideData<double>* dst_dat =
+      dynamic_cast<OutersideData<double> *>(&dst_data);
+
+   TBOX_ASSERT(old_dat != NULL);
+   TBOX_ASSERT(new_dat != NULL);
+   TBOX_ASSERT(dst_dat != NULL);
+   TBOX_ASSERT(where * old_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * new_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * dst_dat->getGhostBox() == where);
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst_data, where, src_data_old, src_data_new);
+
+   const hier::Index old_ilo = old_dat->getGhostBox().lower();
+   const hier::Index old_ihi = old_dat->getGhostBox().upper();
+   const hier::Index new_ilo = new_dat->getGhostBox().lower();
+   const hier::Index new_ihi = new_dat->getGhostBox().upper();
+
+   const hier::Index dst_ilo = dst_dat->getGhostBox().lower();
+   const hier::Index dst_ihi = dst_dat->getGhostBox().upper();
+
+   const hier::Index ifirst = where.lower();
+   const hier::Index ilast = where.upper();
+
+   const double old_time = old_dat->getTime();
+   const double new_time = new_dat->getTime();
+   const double dst_time = dst_dat->getTime();
+
+   TBOX_ASSERT((old_time < dst_time ||
+                tbox::MathUtilities<double>::equalEps(old_time, dst_time)) &&
+      (dst_time < new_time ||
+       tbox::MathUtilities<double>::equalEps(dst_time, new_time)));
+
+   double tfrac = dst_time - old_time;
+   double denom = new_time - old_time;
+   if (denom > tbox::MathUtilities<double>::getMin()) {
+      tfrac /= denom;
+   } else {
+      tfrac = 0.0;
+   }
+
+   for (int d = 0; d < dst_dat->getDepth(); d++) {
+      // loop over lower and upper outerside arrays
+      for (int i = 0; i < 2; i++) {
+         if (dim == tbox::Dimension(1)) {
+            F77_FUNC(lintimeintoutsidedoub1d,
+               LINTIMEINTOUTSIDEDOUB1D) (ifirst(0), ilast(0),
+               old_ilo(0), old_ihi(0),
+               new_ilo(0), new_ihi(0),
+               dst_ilo(0), dst_ihi(0),
+               tfrac,
+               old_dat->getPointer(0, i, d),
+               new_dat->getPointer(0, i, d),
+               dst_dat->getPointer(0, i, d));
+         } else if (dim == tbox::Dimension(2)) {
+            F77_FUNC(lintimeintoutsidedoub2d0,
+               LINTIMEINTOUTSIDEDOUB2D0) (ifirst(0), ifirst(1), ilast(0),
+               ilast(1),
+               old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+               new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+               dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+               tfrac,
+               old_dat->getPointer(0, i, d),
+               new_dat->getPointer(0, i, d),
+               dst_dat->getPointer(0, i, d));
+            F77_FUNC(lintimeintoutsidedoub2d1,
+               LINTIMEINTOUTSIDEDOUB2D1) (ifirst(0), ifirst(1), ilast(0),
+               ilast(1),
+               old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+               new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+               dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+               tfrac,
+               old_dat->getPointer(1, i, d),
+               new_dat->getPointer(1, i, d),
+               dst_dat->getPointer(1, i, d));
+         } else if (dim == tbox::Dimension(3)) {
+            F77_FUNC(lintimeintoutsidedoub3d0,
+               LINTIMEINTOUTSIDEDOUB3D0) (ifirst(0), ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(0, i, d),
+               new_dat->getPointer(0, i, d),
+               dst_dat->getPointer(0, i, d));
+            F77_FUNC(lintimeintoutsidedoub3d1,
+               LINTIMEINTOUTSIDEDOUB3D1) (ifirst(0), ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(1, i, d),
+               new_dat->getPointer(1, i, d),
+               dst_dat->getPointer(1, i, d));
+            F77_FUNC(lintimeintoutsidedoub3d2,
+               LINTIMEINTOUTSIDEDOUB3D2) (ifirst(0), ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(2, i, d),
+               new_dat->getPointer(2, i, d),
+               dst_dat->getPointer(2, i, d));
+         } else {
+            TBOX_ERROR(
+               "OutersideDoubleLienarTimeInterpolate::TimeInterpolate dim > 3 not supported"
+               << std::endl);
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OutersideDoubleLinearTimeInterpolateOp.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OutersideDoubleLinearTimeInterpolateOp.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for double outerside patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OutersideDoubleLinearTimeInterpolateOp
+#define included_pdat_OutersideDoubleLinearTimeInterpolateOp
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class OutersideDoubleLinearTimeInterpolateOp implements standard
+ * linear time interpolation for double outerside patch data. Recall
+ * that outerside patch data uses the same indices as side-centered data
+ * but the data only exists on the sides that coincide with patch boundaries.
+ * It is derived from the xfer::TimeInterpolateOperator base class.
+ * The interpolation uses FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is an outerside double type, and the string is
+ * "STD_LINEAR_TIME_INTERPOLATE".
+ *
+ * @see xfer::TimeInterpolateOperator
+ */
+
+class OutersideDoubleLinearTimeInterpolateOp:
+   public xfer::TimeInterpolateOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   OutersideDoubleLinearTimeInterpolateOp();
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~OutersideDoubleLinearTimeInterpolateOp();
+
+   /**
+    * Return true if the variable and name string match the standard
+    * double outerside interpolation; otherwise, return false.
+    */
+   bool
+   findTimeInterpolateOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Perform linear time interpolation between two double outerside
+    * patch data sources and place result in the destination patch data.
+    * Time interpolation is performed on the intersection of the destination
+    * patch data and the input box.  The time to which data is interpolated
+    * is provided by the destination data.
+    */
+   void
+   timeInterpolate(
+      hier::PatchData& dst_data,
+      const hier::Box& where,
+      const hier::PatchData& src_data_old,
+      const hier::PatchData& src_data_new) const;
+
+private:
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OutersideFloatLinearTimeInterpolateOp.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OutersideFloatLinearTimeInterpolateOp.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,270 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for float outerside patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OutersideFloatLinearTimeInterpolateOp_C
+#define included_pdat_OutersideFloatLinearTimeInterpolateOp_C
+
+#include "SAMRAI/pdat/OutersideFloatLinearTimeInterpolateOp.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/OutersideData.h"
+#include "SAMRAI/pdat/OutersideVariable.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in lintimint1d.f:
+void F77_FUNC(lintimeintoutsidefloat1d, LINTIMEINTOUTSIDEFLOAT1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+// in lintimint2d.f:
+void F77_FUNC(lintimeintoutsidefloat2d0,
+              LINTIMEINTOUTSIDEFLOAT2D0) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+void F77_FUNC(lintimeintoutsidefloat2d1,
+              LINTIMEINTOUTSIDEFLOAT2D1) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+// in lintimint3d.f:
+void F77_FUNC(lintimeintoutsidefloat3d0,
+              LINTIMEINTOUTSIDEFLOAT3D0) (const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+void F77_FUNC(lintimeintoutsidefloat3d1,
+              LINTIMEINTOUTSIDEFLOAT3D1) (const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+void F77_FUNC(lintimeintoutsidefloat3d2,
+              LINTIMEINTOUTSIDEFLOAT3D2) (const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+OutersideFloatLinearTimeInterpolateOp::OutersideFloatLinearTimeInterpolateOp():
+   xfer::TimeInterpolateOperator()
+{
+}
+
+OutersideFloatLinearTimeInterpolateOp::~OutersideFloatLinearTimeInterpolateOp()
+{
+}
+
+bool OutersideFloatLinearTimeInterpolateOp::findTimeInterpolateOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   const tbox::Pointer<OutersideVariable<float> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == "STD_LINEAR_TIME_INTERPOLATE")) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+void OutersideFloatLinearTimeInterpolateOp::timeInterpolate(
+   hier::PatchData& dst_data,
+   const hier::Box& where,
+   const hier::PatchData& src_data_old,
+   const hier::PatchData& src_data_new) const
+{
+   const tbox::Dimension& dim(where.getDim());
+
+   const OutersideData<float>* old_dat =
+      dynamic_cast<const OutersideData<float> *>(&src_data_old);
+   const OutersideData<float>* new_dat =
+      dynamic_cast<const OutersideData<float> *>(&src_data_new);
+   OutersideData<float>* dst_dat =
+      dynamic_cast<OutersideData<float> *>(&dst_data);
+
+   TBOX_ASSERT(old_dat != NULL);
+   TBOX_ASSERT(new_dat != NULL);
+   TBOX_ASSERT(dst_dat != NULL);
+   TBOX_ASSERT(where * old_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * new_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * dst_dat->getGhostBox() == where);
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst_data, where, src_data_old, src_data_new);
+
+   const hier::Index old_ilo = old_dat->getGhostBox().lower();
+   const hier::Index old_ihi = old_dat->getGhostBox().upper();
+   const hier::Index new_ilo = new_dat->getGhostBox().lower();
+   const hier::Index new_ihi = new_dat->getGhostBox().upper();
+
+   const hier::Index dst_ilo = dst_dat->getGhostBox().lower();
+   const hier::Index dst_ihi = dst_dat->getGhostBox().upper();
+
+   const hier::Index ifirst = where.lower();
+   const hier::Index ilast = where.upper();
+
+   const double old_time = old_dat->getTime();
+   const double new_time = new_dat->getTime();
+   const double dst_time = dst_dat->getTime();
+
+   TBOX_ASSERT((old_time < dst_time ||
+                tbox::MathUtilities<double>::equalEps(old_time, dst_time)) &&
+      (dst_time < new_time ||
+       tbox::MathUtilities<double>::equalEps(dst_time, new_time)));
+
+   double tfrac = dst_time - old_time;
+   double denom = new_time - old_time;
+   if (denom > tbox::MathUtilities<double>::getMin()) {
+      tfrac /= denom;
+   } else {
+      tfrac = 0.0;
+   }
+
+   for (int d = 0; d < dst_dat->getDepth(); d++) {
+      // loop over lower and upper outerside arrays
+      for (int i = 0; i < 2; i++) {
+         if (dim == tbox::Dimension(1)) {
+            F77_FUNC(lintimeintoutsidefloat1d,
+               LINTIMEINTOUTSIDEFLOAT1D) (ifirst(0), ilast(0),
+               old_ilo(0), old_ihi(0),
+               new_ilo(0), new_ihi(0),
+               dst_ilo(0), dst_ihi(0),
+               tfrac,
+               old_dat->getPointer(0, i, d),
+               new_dat->getPointer(0, i, d),
+               dst_dat->getPointer(0, i, d));
+         } else if (dim == tbox::Dimension(2)) {
+            F77_FUNC(lintimeintoutsidefloat2d0,
+               LINTIMEINTOUTSIDEFLOAT2D0) (ifirst(0), ifirst(1), ilast(0),
+               ilast(1),
+               old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+               new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+               dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+               tfrac,
+               old_dat->getPointer(0, i, d),
+               new_dat->getPointer(0, i, d),
+               dst_dat->getPointer(0, i, d));
+            F77_FUNC(lintimeintoutsidefloat2d1,
+               LINTIMEINTOUTSIDEFLOAT2D1) (ifirst(0), ifirst(1), ilast(0),
+               ilast(1),
+               old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+               new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+               dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+               tfrac,
+               old_dat->getPointer(1, i, d),
+               new_dat->getPointer(1, i, d),
+               dst_dat->getPointer(1, i, d));
+         } else if (dim == tbox::Dimension(3)) {
+            F77_FUNC(lintimeintoutsidefloat3d0,
+               LINTIMEINTOUTSIDEFLOAT3D0) (ifirst(0), ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(0, i, d),
+               new_dat->getPointer(0, i, d),
+               dst_dat->getPointer(0, i, d));
+            F77_FUNC(lintimeintoutsidefloat3d1,
+               LINTIMEINTOUTSIDEFLOAT3D1) (ifirst(0), ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(1, i, d),
+               new_dat->getPointer(1, i, d),
+               dst_dat->getPointer(1, i, d));
+            F77_FUNC(lintimeintoutsidefloat3d2,
+               LINTIMEINTOUTSIDEFLOAT3D2) (ifirst(0), ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(2, i, d),
+               new_dat->getPointer(2, i, d),
+               dst_dat->getPointer(2, i, d));
+         } else {
+            TBOX_ERROR(
+               "OutersideFloatLinearTimeInterpolateOp::TimeInterpolate dim > 3 not supported"
+               << std::endl);
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OutersideFloatLinearTimeInterpolateOp.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OutersideFloatLinearTimeInterpolateOp.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for float outerside patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OutersideFloatLinearTimeInterpolateOp
+#define included_pdat_OutersideFloatLinearTimeInterpolateOp
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class OutersideFloatLinearTimeInterpolateOp implements standard
+ * linear time interpolation for float outerside patch data. Recall
+ * that outerside patch data uses the same indices as side-centered data
+ * but the data only exists on the sides that coincide with patch boundaries.
+ * It is derived from the xfer::TimeInterpolateOperator base class.
+ * The interpolation uses FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is an outerside float type, and the string is
+ * "STD_LINEAR_TIME_INTERPOLATE".
+ *
+ * @see xfer::TimeInterpolateOperator
+ */
+
+class OutersideFloatLinearTimeInterpolateOp:
+   public xfer::TimeInterpolateOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   OutersideFloatLinearTimeInterpolateOp();
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~OutersideFloatLinearTimeInterpolateOp();
+
+   /**
+    * Return true if the variable and name string match the standard
+    * float outerside interpolation; otherwise, return false.
+    */
+   bool
+   findTimeInterpolateOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Perform linear time interpolation between two float outerside
+    * patch data sources and place result in the destination patch data.
+    * Time interpolation is performed on the intersection of the destination
+    * patch data and the input box.  The time to which data is interpolated
+    * is provided by the destination data.
+    */
+   void
+   timeInterpolate(
+      hier::PatchData& dst_data,
+      const hier::Box& where,
+      const hier::PatchData& src_data_old,
+      const hier::PatchData& src_data_new) const;
+
+private:
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OutersideGeometry.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OutersideGeometry.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,222 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OutersideGeometry_C
+#define included_pdat_OutersideGeometry_C
+
+#include "SAMRAI/pdat/OutersideGeometry.h"
+#include "SAMRAI/pdat/SideGeometry.h"
+#include "SAMRAI/pdat/SideOverlap.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/OutersideGeometry.I"
+#endif
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * Create a side geometry object given the box and ghost cell width.	*
+ *									*
+ *************************************************************************
+ */
+
+OutersideGeometry::OutersideGeometry(
+   const hier::Box& box,
+   const hier::IntVector& ghosts):
+   d_box(box),
+   d_ghosts(ghosts)
+
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(box, ghosts);
+   TBOX_ASSERT(ghosts.min() >= 0);
+
+}
+
+OutersideGeometry::~OutersideGeometry()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Attempt to calculate the intersection between two outerside centered	*
+ * box geometries.  The calculateOverlap() checks whether both arguments	*
+ * are outerside geometries; if so, it compuates the intersection.  If	*
+ * not, then it calls calculateOverlap() on the source object (if retry	*
+ * is true) to allow the source a chance to calculate the intersection.	*
+ * See the hier::BoxGeometry base class for more information about the	*
+ * protocol.  A pointer to null is returned if the intersection canot be	*
+ * computed.								*
+ *                                                                      *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap> OutersideGeometry::calculateOverlap(
+   const hier::BoxGeometry& dst_geometry,
+   const hier::BoxGeometry& src_geometry,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset,
+   const bool retry,
+   const hier::BoxList& dst_restrict_boxes) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(d_box, src_mask, src_offset);
+
+   const SideGeometry* t_dst =
+      dynamic_cast<const SideGeometry *>(&dst_geometry);
+   const OutersideGeometry* t_src =
+      dynamic_cast<const OutersideGeometry *>(&src_geometry);
+
+   tbox::Pointer<hier::BoxOverlap> over(NULL);
+   if ((t_src != NULL) && (t_dst != NULL)) {
+      over = doOverlap(*t_dst, *t_src, src_mask, overwrite_interior,
+            src_offset, dst_restrict_boxes);
+   } else if (retry) {
+      over = src_geometry.calculateOverlap(
+            dst_geometry, src_geometry, src_mask,
+            overwrite_interior, src_offset, false, dst_restrict_boxes);
+   }
+   return over;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Compute the overlap between a side geometry destination box and an	*
+ * outerside geometry source box.  The intersection algorithm is similar	*
+ * the side geometry algorithm except that only the borders of source	*
+ * are used in the intersection computation.				*
+ *									*
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap> OutersideGeometry::doOverlap(
+   const SideGeometry& dst_geometry,
+   const OutersideGeometry& src_geometry,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset,
+   const hier::BoxList& dst_restrict_boxes)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(src_mask, src_offset);
+
+   const tbox::Dimension& dim(src_mask.getDim());
+
+   TBOX_ASSERT(dst_geometry.getDirectionVector() == hier::IntVector::getOne(dim));
+
+   tbox::Array<hier::BoxList> dst_boxes(dim.getValue());
+
+   // Perform a quick-and-dirty intersection to see if the boxes might overlap
+
+   const hier::Box src_box =
+      hier::Box::grow(src_geometry.d_box, src_geometry.d_ghosts) * src_mask;
+   const hier::Box src_shift =
+      hier::Box::shift(src_box, src_offset);
+   const hier::Box dst_ghost =
+      hier::Box::grow(dst_geometry.getBox(), dst_geometry.getGhosts());
+
+   // Compute the intersection (if any) for each of the side directions
+
+   const hier::IntVector one_vector(dim, 1);
+
+   const hier::Box quick_check =
+      hier::Box::grow(src_shift, one_vector) * hier::Box::grow(dst_ghost,
+         one_vector);
+
+   if (!quick_check.empty()) {
+
+      const hier::Box mask_shift = hier::Box::shift(src_mask, src_offset);
+
+      for (int d = 0; d < dim.getValue(); d++) {
+
+         const hier::Box msk_side =
+            SideGeometry::toSideBox(mask_shift, d);
+         const hier::Box dst_side =
+            SideGeometry::toSideBox(dst_ghost, d);
+         const hier::Box src_side =
+            SideGeometry::toSideBox(src_shift, d);
+
+         const hier::Box together = dst_side * src_side;
+
+         if (!together.empty()) {
+
+            // Add lower side intersection (if any) to the box list
+            hier::Box low_side = src_side;
+            low_side.upper(d) = low_side.lower(d); //+ghosts;
+            dst_boxes[d].unionBoxes(low_side * msk_side * dst_side);
+
+            // Add upper side intersection (if any) to the box list
+            hier::Box hig_side = src_side;
+            hig_side.lower(d) = hig_side.upper(d); //-ghosts;
+            dst_boxes[d].unionBoxes(hig_side * msk_side * dst_side);
+
+            // Take away the interior of over_write interior is not set
+            if (!overwrite_interior) {
+               dst_boxes[d].removeIntersections(
+                  SideGeometry::toSideBox(dst_geometry.getBox(), d));
+            }
+
+         }  // if (!together.empty())
+
+         if (dst_restrict_boxes.size() && dst_boxes[d].size()) {
+            hier::BoxList side_restrict_boxes;
+            for (hier::BoxList::Iterator b(dst_restrict_boxes); b; b++) {
+               side_restrict_boxes.appendItem(SideGeometry::toSideBox(b(), d));
+            }
+            dst_boxes[d].intersectBoxes(side_restrict_boxes);
+         }
+
+      }  // loop over dim
+
+   } // if (!quick_check.empty())
+
+   // Create the side overlap data object using the boxes and source shift
+
+   hier::BoxOverlap* overlap = new SideOverlap(dst_boxes, src_offset);
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set up a SideOverlap oject using the given boxes and offset           *
+ *                                                                       *
+ *************************************************************************
+ */
+tbox::Pointer<hier::BoxOverlap>
+OutersideGeometry::setUpOverlap(
+   const hier::BoxList& boxes,
+   const hier::IntVector& src_offset) const
+{
+   const tbox::Dimension& dim(src_offset.getDim());
+   tbox::Array<hier::BoxList> dst_boxes(dim.getValue());
+
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         hier::Box side_box(SideGeometry::toSideBox(b(), d));
+         dst_boxes[d].appendItem(side_box);
+      }
+   }
+
+   // Create the side overlap data object using the boxes and source shift
+
+   hier::BoxOverlap* overlap = new SideOverlap(dst_boxes, src_offset);
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OutersideGeometry.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OutersideGeometry.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,27 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+SAMRAI_INLINE_KEYWORD
+const hier::Box& OutersideGeometry::getBox() const
+{
+   return d_box;
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::IntVector& OutersideGeometry::getGhosts() const
+{
+   return d_ghosts;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OutersideGeometry.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OutersideGeometry.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,130 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OutersideGeometry
+#define included_pdat_OutersideGeometry
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/SideOverlap.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+class SideGeometry;
+
+/*!
+ * Class OutersideGeometry manages the mapping between the AMR index
+ * and the outerside geometry index space.  It is a subclass of
+ * hier::BoxGeometry and it computes intersections between outerside
+ * box geometries and side or outerside box geometries for communication
+ * operations.
+ *
+ * See header file for OutersideData<DIM> class for a more detailed
+ * description of the data layout.
+ *
+ * @see hier::BoxGeometry
+ * @see pdat::SideGeometry
+ * @see pdat::SideOverlap
+ */
+
+class OutersideGeometry:public hier::BoxGeometry
+{
+public:
+   /*!
+    * The BoxOverlap implemenation for this geometry.
+    */
+   typedef SideOverlap Overlap;
+
+   /*!
+    * @brief Construct an outerside geometry object given an AMR index
+    * space box and ghost cell width.
+    */
+   explicit OutersideGeometry(
+      const hier::Box& box,
+      const hier::IntVector& ghosts);
+
+   /*!
+    * @brief The virtual destructor does nothing interesting.
+    */
+   virtual ~OutersideGeometry();
+
+   /*!
+    * @brief Compute the overlap in side-centered index space on the
+    * boundaries of the source box geometry and the destination box geometry.
+    */
+   virtual tbox::Pointer<hier::BoxOverlap>
+   calculateOverlap(
+      const hier::BoxGeometry& dst_geometry,
+      const hier::BoxGeometry& src_geometry,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset,
+      const bool retry,
+      const hier::BoxList& dst_restrict_boxes = hier::BoxList()) const;
+
+   /*!
+    * @brief Set up a SideOverlap object based on the given boxes and the
+    * offset.
+    */
+   virtual tbox::Pointer<hier::BoxOverlap>
+   setUpOverlap(
+      const hier::BoxList& boxes,
+      const hier::IntVector& src_offset) const;
+
+   /*!
+    * @brief Return the box for this outerside box geometry object.
+    */
+   const hier::Box&
+   getBox() const;
+
+   /*!
+    * @brief Return the ghost cell width for this outerside box geometry object.
+    */
+   const hier::IntVector&
+   getGhosts() const;
+
+private:
+   /**
+    * Function doOverlap() is the function that computes the overlap
+    * between the source and destination objects, where the source
+    * has outerside geometry and the destination side geometry.
+    */
+   static tbox::Pointer<hier::BoxOverlap>
+   doOverlap(
+      const SideGeometry& dst_geometry,
+      const OutersideGeometry& src_geometry,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset,
+      const hier::BoxList& dst_restrict_boxes);
+
+   OutersideGeometry(
+      const OutersideGeometry&);                // not implemented
+   void
+   operator = (
+      const OutersideGeometry&);                    // not implemented
+
+   hier::Box d_box;
+   hier::IntVector d_ghosts;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/OutersideGeometry.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OutersideVariable.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OutersideVariable.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OutersideVariable_C
+#define included_pdat_OutersideVariable_C
+
+#include "SAMRAI/pdat/OutersideVariable.h"
+#include "SAMRAI/pdat/OutersideDataFactory.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * Constructor and destructor for side variable objects			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+OutersideVariable<TYPE>::OutersideVariable(
+   const tbox::Dimension& dim,
+   const std::string& name,
+   int depth):
+   hier::Variable(name,
+                  tbox::Pointer<SAMRAI::hier::PatchDataFactory>(new
+                                                                OutersideDataFactory
+                                                                <
+                                                                   TYPE>(dim,
+                                                                         depth)))
+{
+}
+
+template<class TYPE>
+OutersideVariable<TYPE>::~OutersideVariable()
+{
+}
+
+template<class TYPE>
+int OutersideVariable<TYPE>::getDepth() const
+{
+   tbox::Pointer<OutersideDataFactory<TYPE> > factory =
+      this->getPatchDataFactory();
+   TBOX_ASSERT(factory);
+   return factory->getDepth();
+}
+
+/*
+ *************************************************************************
+ *									*
+ * These are private and should not be used.  They are defined here	*
+ * because some template instantiation methods fail if some member	*
+ * functions are left undefined.						*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+OutersideVariable<TYPE>::OutersideVariable(
+   const OutersideVariable<TYPE>& foo):
+   hier::Variable(NULL, tbox::Pointer<SAMRAI::hier::PatchDataFactory>(NULL))
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void OutersideVariable<TYPE>::operator = (
+   const OutersideVariable<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/OutersideVariable.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/OutersideVariable.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,106 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OutersideVariable
+#define included_pdat_OutersideVariable
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/tbox/Complex.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * @brief Class OutersideVariable<DIM> is a templated variable class
+ * used to define side-centered data quantities only on patch boundaries.
+ * It is a subclass of hier::Variable and is templated on the type
+ * of the underlying data (e.g., double, int, bool, etc.).
+ *
+ * Note that the data layout in the outerside data arrays matches the corresponding
+ * array sections provided by the side data implementation. See header file for
+ * the OutersideData<DIM> class for a more detailed description of the data layout.
+ *
+ * IMPORTANT: The class OuterfaceVariable<DIM> and associated "outerface
+ * data" classes define the same storage as this outerside variable class,
+ * except that the individual array indices are permuted in the outerface
+ * data type.
+ *
+ * @see pdat::SideData
+ * @see pdat::OutersideData
+ * @see pdat::OutersideDataFactory
+ * @see hier::Variable
+ */
+
+template<class TYPE>
+class OutersideVariable:public hier::Variable
+{
+public:
+   /*!
+    * @brief Create an outerside variable object having properties
+    * specified by the name and depth (i.e., number of data values
+    * at each index location).  The default depth is one.
+    *
+    * Note that The ghost cell width for all outerside data is currently
+    * fixed at zero; this may be changed in the future if needed.
+    */
+   explicit OutersideVariable(
+      const tbox::Dimension& dim,
+      const std::string& name,
+      int depth = 1);
+
+   /*!
+    * @brief Virtual destructor for outerside variable objects.
+    */
+   virtual ~OutersideVariable<TYPE>();
+
+   /*!
+    * @brief Return a boolean true value indicating that fine patch
+    * values take precedence on coarse-fine interfaces.
+    */
+   bool fineBoundaryRepresentsVariable() const {
+      return true;
+   }
+
+   /*!
+    * @brief Return true indicating that outerside data
+    * exists on the patch boundary.
+    */
+   bool dataLivesOnPatchBorder() const {
+      return true;
+   }
+
+   /*!
+    * @brief Return the the depth (number of components).
+    */
+   int
+   getDepth() const;
+
+private:
+   // neither of the following functions are implemented
+   OutersideVariable(
+      const OutersideVariable<TYPE>&);
+   void
+   operator = (
+      const OutersideVariable<TYPE>&);
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/OutersideVariable.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SecondLayerNodeNoCornersVariableFillPattern.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SecondLayerNodeNoCornersVariableFillPattern.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,210 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Fill pattern class to provide interface for stencils 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SecondLayerNodeNoCornersVariableFillPattern_C
+#define included_pdat_SecondLayerNodeNoCornersVariableFillPattern_C
+
+#include "SAMRAI/pdat/SecondLayerNodeNoCornersVariableFillPattern.h"
+
+#include "SAMRAI/pdat/NodeGeometry.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+const std::string SecondLayerNodeNoCornersVariableFillPattern::s_name_id =
+   "SECOND_LAYER_NODE_NO_CORNERS_FILL_PATTERN";
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor                                                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SecondLayerNodeNoCornersVariableFillPattern::
+SecondLayerNodeNoCornersVariableFillPattern(
+   const tbox::Dimension& dim):
+   d_dim(dim)
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destructor                                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SecondLayerNodeNoCornersVariableFillPattern::~
+SecondLayerNodeNoCornersVariableFillPattern()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Calculate the overlap according to the desired pattern                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap>
+SecondLayerNodeNoCornersVariableFillPattern::calculateOverlap(
+   const hier::BoxGeometry& dst_geometry,
+   const hier::BoxGeometry& src_geometry,
+   const hier::Box& dst_patch_box,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst_patch_box, src_mask, src_offset);
+   NULL_USE(overwrite_interior);
+
+   hier::BoxList dst_boxes;
+
+   hier::Box dst_node_box(pdat::NodeGeometry::toNodeBox(dst_patch_box));
+   hier::Box src_node_mask(pdat::NodeGeometry::toNodeBox(src_mask));
+
+   bool corner_overlap = ((dst_node_box * src_node_mask).size() == 1)
+      ? true : false;
+
+   if (!corner_overlap) {
+      hier::BoxList stencil_boxes;
+      computeStencilBoxes(stencil_boxes, dst_patch_box);
+
+      const NodeGeometry* t_dst =
+         dynamic_cast<const NodeGeometry *>(&dst_geometry);
+      const NodeGeometry* t_src =
+         dynamic_cast<const NodeGeometry *>(&src_geometry);
+
+      TBOX_ASSERT(t_dst);
+      TBOX_ASSERT(t_src);
+
+      t_dst->computeDestinationBoxes(dst_boxes, *t_src, src_mask,
+         false, src_offset);
+
+      dst_boxes.intersectBoxes(stencil_boxes);
+   }
+
+   hier::BoxOverlap* overlap = new NodeOverlap(dst_boxes, src_offset);
+
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return the stencil width (1)                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+const hier::IntVector& SecondLayerNodeNoCornersVariableFillPattern::
+getStencilWidth()
+{
+   return hier::IntVector::getOne(d_dim);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return the string name identifier                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+const std::string& SecondLayerNodeNoCornersVariableFillPattern::getPatternName()
+const
+{
+   return s_name_id;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute the boxes for the stencil around a given patch box            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void SecondLayerNodeNoCornersVariableFillPattern::computeStencilBoxes(
+   hier::BoxList& stencil_boxes,
+   const hier::Box& dst_box) const
+{
+   TBOX_ASSERT(stencil_boxes.size() == 0);
+
+   const tbox::Dimension& dim = dst_box.getDim();
+   hier::Box dst_node_box(pdat::NodeGeometry::toNodeBox(dst_box));
+
+   for (unsigned short i = 0; i < dim.getValue(); i++) {
+      hier::Box low_box(dst_node_box);
+      low_box.lower(i) = dst_node_box.lower(i) - 1;
+      low_box.upper(i) = low_box.lower(i);
+      stencil_boxes.addItem(low_box);
+
+      hier::Box high_box(dst_node_box);
+      high_box.lower(i) = dst_node_box.upper(i) + 1;
+      high_box.upper(i) = high_box.lower(i);
+      stencil_boxes.addItem(high_box);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute BoxOverlap that specifies data to be filled by refinement     *
+ * operator.                                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap>
+SecondLayerNodeNoCornersVariableFillPattern::computeFillBoxesOverlap(
+   const hier::BoxList& fill_boxes,
+   const hier::Box& patch_box,
+   const hier::Box& data_box,
+   const hier::PatchDataFactory& pdf) const
+{
+   NULL_USE(pdf);
+
+   hier::BoxList stencil_boxes;
+   computeStencilBoxes(stencil_boxes, patch_box);
+
+   hier::BoxList overlap_boxes(fill_boxes);
+
+   /*
+    * This is the equivalent of converting every box in overlap_boxes
+    * to a node centering, which must be done before intersecting with
+    * stencil_boxes, which is node-centered.
+    */
+   for (hier::BoxList::Iterator b(overlap_boxes); b; b++) {
+      b().growUpper(hier::IntVector::getOne(patch_box.getDim()));
+   }
+
+   overlap_boxes.intersectBoxes(pdat::NodeGeometry::toNodeBox(data_box));
+
+   overlap_boxes.intersectBoxes(stencil_boxes);
+
+   overlap_boxes.coalesceBoxes();
+
+   hier::BoxOverlap* overlap =
+      new pdat::NodeOverlap(
+         overlap_boxes,
+         hier::IntVector::getZero(patch_box.getDim()));
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SecondLayerNodeNoCornersVariableFillPattern.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SecondLayerNodeNoCornersVariableFillPattern.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,164 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Second layer node fill pattern class 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SecondLayerNodeNoCornersVariableFillPattern
+#define included_pdat_SecondLayerNodeNoCornersVariableFillPattern
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/xfer/VariableFillPattern.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * @brief Class SecondLayerNodeNoCornersVariableFillPattern is a concrete
+ * implementation of the abstract base class VariableFillPattern.
+ *
+ * It is used to calculate overlaps according to a pattern which limits the
+ * overlaps to the second layer of boundary nodes, that is the nodes lying
+ * one cell width away from the patch boundary, but excluding nodes along
+ * the corners and edges of the patch.
+ */
+
+class SecondLayerNodeNoCornersVariableFillPattern:
+   public xfer::VariableFillPattern
+{
+public:
+   /*!
+    * @brief Constructor
+    *
+    * @param[in] dim     Dimension
+    */
+   explicit SecondLayerNodeNoCornersVariableFillPattern(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Destructor
+    */
+   virtual ~SecondLayerNodeNoCornersVariableFillPattern();
+
+   /*!
+    * @brief Calculate overlaps between the destination and source geometries
+    * according to the fill pattern.
+    *
+    * This will return the portion of the intersection of the node geometries
+    * of the intersection of the node geometries that lies in the second
+    * layer of boundary nodes, that is the nodes lying one cell width away
+    * from the patch boundary, but excluding nodes along the corners and
+    * edges of the patch.  The patch is identified by the argument
+    * dst_patch_box.
+    *
+    * @param[in] dst_geometry    geometry object for destination box
+    * @param[in] src_geometry    geometry object for source box
+    * @param[in] dst_patch_box   box for the destination patch
+    * @param[in] src_mask        the source mask, the box resulting from
+    *                            shifting the source box by src_offset
+    * @param[in] overwrite_interior  controls whether or not to include the
+    *                                destination box interior in the overlap.
+    *                                This has no effect in this implementation,
+    *                                since all calculated overlaps will be
+    *                                on the destination box exterior.
+    * @param[in] src_offset      the offset between source and destination
+    *                            index space.  src + src_offset = dst
+    *
+    * @return                Pointer to the calculated overlap object
+    */
+   tbox::Pointer<hier::BoxOverlap>
+   calculateOverlap(
+      const hier::BoxGeometry& dst_geometry,
+      const hier::BoxGeometry& src_geometry,
+      const hier::Box& dst_patch_box,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset) const;
+
+   /*!
+    * @brief Computes a BoxOverlap object which defines the space to be filled
+    * by a refinement operation.
+    *
+    * For this implementation, that space is the node-centered intersection
+    * between fill_boxes, (computed by the RefineSchedule), data_box, which
+    * specifies the extent of the destination data, and the boundary nodes
+    * that define the stencil of this fill pattern.
+    *
+    * @param[in] fill_boxes  list representing the all of the space on a patch
+    *                        or its ghost region that may be filled by a
+    *                        refine operator (cell-centered represtentation)
+    * @param[in] patch_box   box representing the patch where a refine operator
+    *                        will fill data.  (cell-centered representation)
+    * @param[in] data box    box representing the full extent of the region
+    *                        covered by a patch data object, including all
+    *                        ghosts (cell-centered representation)
+    * @param[in] pdf         patch data factory for the data that is to be
+    *                        filled
+    */
+   tbox::Pointer<hier::BoxOverlap>
+   computeFillBoxesOverlap(
+      const hier::BoxList& fill_boxes,
+      const hier::Box& patch_box,
+      const hier::Box& data_box,
+      const hier::PatchDataFactory& pdf) const;
+
+   /*!
+    * @brief Returns the stencil width of 1 in all directions.
+    */
+   const hier::IntVector&
+   getStencilWidth();
+
+   /*!
+    * @brief Returns a string name identifier
+    * "SECOND_LAYER_NODE_NO_CORNERS_FILL_PATTERN".
+    */
+   const std::string&
+   getPatternName() const;
+
+private:
+   SecondLayerNodeNoCornersVariableFillPattern(
+      const SecondLayerNodeNoCornersVariableFillPattern&);  // not implemented
+   void
+   operator = (
+      const SecondLayerNodeNoCornersVariableFillPattern&);  // not implemented
+
+   /*!
+    * @brief Computes a BoxList defining the stencil around a given box
+    * for this fill pattern
+    *
+    * The computed BoxList will consist of node-centered boxes representing
+    * the nodes lying one cell width away from the box boundary, not including
+    * those along the corners or edges of the box.
+    *
+    * @param[out] stencil_boxes   The computed stencil BoxList.
+    * @param[in]  dst_box         Input box around which stencil is computed.
+    */
+   void
+   computeStencilBoxes(
+      hier::BoxList& stencil_boxes,
+      const hier::Box& dst_box) const;
+
+   /*!
+    * @brief The dimension of this object.
+    */
+   const tbox::Dimension d_dim;
+
+   /*!
+    * @brief Static string holding name identifier for this class.
+    */
+   static const std::string s_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SecondLayerNodeVariableFillPattern.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SecondLayerNodeVariableFillPattern.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,208 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Fill pattern class to provide interface for stencils 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SecondLayerNodeVariableFillPattern_C
+#define included_pdat_SecondLayerNodeVariableFillPattern_C
+
+#include "SAMRAI/pdat/SecondLayerNodeVariableFillPattern.h"
+
+#include "SAMRAI/pdat/NodeGeometry.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+const std::string SecondLayerNodeVariableFillPattern::s_name_id =
+   "SECOND_LAYER_NODE_FILL_PATTERN";
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor                                                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SecondLayerNodeVariableFillPattern::SecondLayerNodeVariableFillPattern(
+   const tbox::Dimension& dim):
+   d_dim(dim)
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destructor                                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SecondLayerNodeVariableFillPattern::~SecondLayerNodeVariableFillPattern()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Calculate the overlap according to the desired pattern                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap>
+SecondLayerNodeVariableFillPattern::calculateOverlap(
+   const hier::BoxGeometry& dst_geometry,
+   const hier::BoxGeometry& src_geometry,
+   const hier::Box& dst_patch_box,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst_patch_box, src_mask, src_offset);
+   NULL_USE(overwrite_interior);
+
+   const tbox::Dimension dim(dst_patch_box.getDim());
+
+   hier::Box dst_node_box(pdat::NodeGeometry::toNodeBox(dst_patch_box));
+   hier::Box src_node_mask(pdat::NodeGeometry::toNodeBox(src_mask));
+   bool corner_overlap = ((dst_node_box * src_node_mask).size() == 1)
+      ? true : false;
+
+   hier::BoxList stencil_boxes;
+   computeStencilBoxes(stencil_boxes, dst_patch_box);
+   if (corner_overlap) {
+      hier::IntVector grow_vec(dim, 0);
+      hier::Box grow_box(dim);
+      hier::BoxList remove_list;
+      for (unsigned int i = 0; i < dim.getValue(); i++) {
+         grow_box = dst_node_box;
+         grow_vec(i) = 1;
+         grow_box.grow(grow_vec);
+         remove_list.addItem(grow_box);
+         grow_vec(i) = 0;
+      }
+      stencil_boxes.removeIntersections(remove_list);
+   }
+
+   hier::BoxList dst_boxes;
+
+   const NodeGeometry* t_dst =
+      dynamic_cast<const NodeGeometry *>(&dst_geometry);
+   const NodeGeometry* t_src =
+      dynamic_cast<const NodeGeometry *>(&src_geometry);
+
+   TBOX_ASSERT(t_dst);
+   TBOX_ASSERT(t_src);
+
+   t_dst->computeDestinationBoxes(dst_boxes, *t_src, src_mask,
+      false, src_offset);
+
+   dst_boxes.intersectBoxes(stencil_boxes);
+
+   hier::BoxOverlap* overlap = new NodeOverlap(dst_boxes, src_offset);
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return the stencil width (1)                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+const hier::IntVector& SecondLayerNodeVariableFillPattern::getStencilWidth()
+{
+   return hier::IntVector::getOne(d_dim);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return the string name identifier                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+const std::string& SecondLayerNodeVariableFillPattern::getPatternName() const
+{
+   return s_name_id;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute the boxes for the stencil around a given patch box            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void SecondLayerNodeVariableFillPattern::computeStencilBoxes(
+   hier::BoxList& stencil_boxes,
+   const hier::Box& dst_box) const
+{
+   TBOX_ASSERT(stencil_boxes.size() == 0);
+
+   hier::Box dst_node_box(pdat::NodeGeometry::toNodeBox(dst_box));
+
+   hier::Box ghost_box(dst_node_box);
+   ghost_box.grow(hier::IntVector::getOne(dst_box.getDim()));
+   stencil_boxes.removeIntersections(ghost_box, dst_node_box);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute BoxOverlap that specifies data to be filled by refinement     *
+ * operator.                                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap>
+SecondLayerNodeVariableFillPattern::computeFillBoxesOverlap(
+   const hier::BoxList& fill_boxes,
+   const hier::Box& patch_box,
+   const hier::Box& data_box,
+   const hier::PatchDataFactory& pdf) const
+{
+   NULL_USE(pdf);
+
+   hier::BoxList stencil_boxes;
+   computeStencilBoxes(stencil_boxes, patch_box);
+
+   hier::BoxList overlap_boxes(fill_boxes);
+
+   /*
+    * This is the equivalent of converting every box in overlap_boxes
+    * to a node centering, which must be done before intersecting with
+    * stencil_boxes, which is node-centered.
+    */
+   for (hier::BoxList::Iterator b(overlap_boxes); b; b++) {
+      b().growUpper(hier::IntVector::getOne(patch_box.getDim()));
+   }
+
+   overlap_boxes.intersectBoxes(pdat::NodeGeometry::toNodeBox(data_box));
+
+   overlap_boxes.intersectBoxes(stencil_boxes);
+
+   overlap_boxes.coalesceBoxes();
+
+   hier::BoxOverlap* overlap =
+      new pdat::NodeOverlap(
+         overlap_boxes,
+         hier::IntVector::getZero(patch_box.getDim()));
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SecondLayerNodeVariableFillPattern.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SecondLayerNodeVariableFillPattern.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,161 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Second layer node fill pattern class 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SecondLayerNodeVariableFillPattern
+#define included_pdat_SecondLayerNodeVariableFillPattern
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/xfer/VariableFillPattern.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+
+/*!
+ * @brief Class SecondLayerNodeVariableFillPattern is a concrete
+ * implementation of the abstract base class VariableFillPattern.
+ *
+ * It is used to calculate overlaps according to a pattern which limits the
+ * overlaps to the second layer of boundary nodes, that is the nodes lying
+ * one cell width away from the patch boundary.
+ */
+
+class SecondLayerNodeVariableFillPattern:
+   public xfer::VariableFillPattern
+{
+public:
+   /*!
+    * @brief Constructor
+    *
+    * @param[in] dim     Dimension
+    */
+   explicit SecondLayerNodeVariableFillPattern(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Destructor
+    */
+   virtual ~SecondLayerNodeVariableFillPattern();
+
+   /*!
+    * @brief Calculate overlaps between the destination and source geometries
+    * according to the fill pattern.
+    *
+    * This will return the portion of the intersection of the node geometries
+    * of the intersection of the node geometries that lies in the second
+    * layer of boundary nodes, that is the nodes lying one cell width away
+    * from the patch boundary.  The patch is identified by the argument
+    * dst_patch_box.
+    *
+    * @param[in] dst_geometry    geometry object for destination box
+    * @param[in] src_geometry    geometry object for source box
+    * @param[in] dst_patch_box   box for the destination patch
+    * @param[in] src_mask        the source mask, the box resulting from
+    *                            shifting the source box by src_offset
+    * @param[in] overwrite_interior  controls whether or not to include the
+    *                                destination box interior in the overlap.
+    *                                This has no effect in this implementation,
+    *                                since all calculated overlaps will be
+    *                                on the destination box exterior.
+    * @param[in] src_offset      the offset between source and destination
+    *                            index space.  src + src_offset = dst
+    *
+    * @return                Pointer to the calculated overlap object
+    */
+   tbox::Pointer<hier::BoxOverlap>
+   calculateOverlap(
+      const hier::BoxGeometry& dst_geometry,
+      const hier::BoxGeometry& src_geometry,
+      const hier::Box& dst_patch_box,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset) const;
+
+   /*!
+    * @brief Computes a BoxOverlap object which defines the space to be filled
+    * by a refinement operation.
+    *
+    * For this implementation, that space is the node-centered intersection
+    * between fill_boxes, (computed by the RefineSchedule), data_box, which
+    * specifies the extent of the destination data, and the boundary nodes
+    * that define the stencil of this fill pattern.
+    *
+    * @param[in] fill_boxes  list representing the all of the space on a patch
+    *                        or its ghost region that may be filled by a
+    *                        refine operator (cell-centered represtentation)
+    * @param[in] patch_box   box representing the patch where a refine operator
+    *                        will fill data.  (cell-centered representation)
+    * @param[in] data box    box representing the full extent of the region
+    *                        covered by a patch data object, including all
+    *                        ghosts (cell-centered representation)
+    * @param[in] pdf         patch data factory for the data that is to be
+    *                        filled
+    */
+   tbox::Pointer<hier::BoxOverlap>
+   computeFillBoxesOverlap(
+      const hier::BoxList& fill_boxes,
+      const hier::Box& patch_box,
+      const hier::Box& data_box,
+      const hier::PatchDataFactory& pdf) const;
+
+   /*!
+    * @brief Returns the stencil width of 1 in all directions.
+    */
+   const hier::IntVector&
+   getStencilWidth();
+
+   /*!
+    * @brief Returns a string name identifier "SECOND_LAYER_NODE_FILL_PATTERN".
+    */
+   const std::string&
+   getPatternName() const;
+
+private:
+   SecondLayerNodeVariableFillPattern(
+      const SecondLayerNodeVariableFillPattern&);    // not implemented
+   void
+   operator = (
+      const SecondLayerNodeVariableFillPattern&);    // not implemented
+
+   /*!
+    * @brief Computes a BoxList defining the stencil around a given box
+    * for this fill pattern
+    *
+    * The computed BoxList will consist of node-centered boxes representing
+    * the nodes lying one cell width away from the box boundary.
+    *
+    * @param[out] stencil_boxes   The computed stencil BoxList.
+    * @param[in]  dst_box         Input box around which stencil is computed.
+    */
+   void
+   computeStencilBoxes(
+      hier::BoxList& stencil_boxes,
+      const hier::Box& dst_box) const;
+
+   /*!
+    * @brief The dimension of this object.
+    */
+   const tbox::Dimension d_dim;
+
+   /*!
+    * @brief Static string holding name identifier for this class.
+    */
+   static const std::string s_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideComplexConstantRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideComplexConstantRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,280 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for side-centered complex data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideComplexConstantRefine_C
+#define included_pdat_SideComplexConstantRefine_C
+
+#include "SAMRAI/pdat/SideComplexConstantRefine.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/SideVariable.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in conrefine1d.f:
+void F77_FUNC(conrefsidecplx1d, CONREFSIDECPLX1D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+// in conrefine2d.f:
+void F77_FUNC(conrefsidecplx2d0, CONREFSIDECPLX2D0) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+void F77_FUNC(conrefsidecplx2d1, CONREFSIDECPLX2D1) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+// in conrefine3d.f:
+void F77_FUNC(conrefsidecplx3d0, CONREFSIDECPLX3D0) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+void F77_FUNC(conrefsidecplx3d1, CONREFSIDECPLX3D1) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+void F77_FUNC(conrefsidecplx3d2, CONREFSIDECPLX3D2) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const dcomplex *, dcomplex *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+SideComplexConstantRefine::SideComplexConstantRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSTANT_REFINE"),
+   d_name_id("CONSTANT_REFINE")
+{
+}
+
+SideComplexConstantRefine::~SideComplexConstantRefine()
+{
+}
+
+bool SideComplexConstantRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<SideVariable<dcomplex> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+SideComplexConstantRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int SideComplexConstantRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+SideComplexConstantRefine::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void SideComplexConstantRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   tbox::Pointer<SideData<dcomplex> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<SideData<dcomplex> >
+   fdata = fine.getPatchData(dst_component);
+
+   const pdat::SideOverlap* t_overlap =
+      dynamic_cast<const pdat::SideOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*this, fine, coarse, ratio);
+
+   const hier::IntVector& directions = fdata->getDirectionVector();
+
+   TBOX_ASSERT(directions ==
+      hier::IntVector::min(directions, cdata->getDirectionVector()));
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   for (int axis = 0; axis < dim.getValue(); axis++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(axis);
+
+      for (hier::BoxList::Iterator b(boxes); b; b++) {
+
+         hier::Box fine_box(b());
+         TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, fine_box);
+
+         fine_box.upper(axis) -= 1;
+
+         const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+         const hier::Index ifirstc = coarse_box.lower();
+         const hier::Index ilastc = coarse_box.upper();
+         const hier::Index ifirstf = fine_box.lower();
+         const hier::Index ilastf = fine_box.upper();
+
+         for (int d = 0; d < fdata->getDepth(); d++) {
+            if (dim == tbox::Dimension(1)) {
+               if (directions(axis)) {
+                  F77_FUNC(conrefsidecplx1d, CONREFSIDECPLX1D) (
+                     ifirstc(0), ilastc(0),
+                     ifirstf(0), ilastf(0),
+                     cilo(0), cihi(0),
+                     filo(0), fihi(0),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               }
+            } else if (dim == tbox::Dimension(2)) {
+               if (axis == 0 && directions(0)) {
+                  F77_FUNC(conrefsidecplx2d0, CONREFSIDECPLX2D0) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               }
+               if (axis == 1 && directions(1)) {
+                  F77_FUNC(conrefsidecplx2d1, CONREFSIDECPLX2D1) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d));
+               }
+            } else if (dim == tbox::Dimension(3)) {
+               if (axis == 0 && directions(0)) {
+                  F77_FUNC(conrefsidecplx3d0, CONREFSIDECPLX3D0) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               }
+               if (axis == 1 && directions(1)) {
+                  F77_FUNC(conrefsidecplx3d1, CONREFSIDECPLX3D1) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d));
+               }
+               if (axis == 2 && directions(2)) {
+                  F77_FUNC(conrefsidecplx3d2, CONREFSIDECPLX3D2) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(2, d),
+                     fdata->getPointer(2, d));
+               }
+            } else {
+               TBOX_ERROR(
+                  "SideComplexConstantRefine::refine dimension > 3 not supported"
+                  << std::endl);
+            }
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideComplexConstantRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideComplexConstantRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,107 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for side-centered complex data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideComplexConstantRefine
+#define included_pdat_SideComplexConstantRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/xfer/RefineOperator.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class SideComplexConstantRefine implements constant
+ * interpolation for side-centered complex patch data defined over a
+ * mesh.  It is derived from the xfer::RefineOperator base class.
+ * The numerical operations for interpolation use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is side-centered complex, and the string is "CONSTANT_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class SideComplexConstantRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit SideComplexConstantRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~SideComplexConstantRefine();
+
+   /**
+    * Return true if the variable and name string match side-centered
+    * complex constant interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of side-centered complex constant interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the constant interpolation operator is the vector
+    * of zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the side-centered complex constant
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the boxes contained in fine_overlap.
+    * It is assumed that the coarse patch contains sufficient data for the
+    * stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideComplexLinearTimeInterpolateOp.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideComplexLinearTimeInterpolateOp.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,286 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for side-centered complex data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideComplexLinearTimeInterpolateOp_C
+#define included_pdat_SideComplexLinearTimeInterpolateOp_C
+
+#include "SAMRAI/pdat/SideComplexLinearTimeInterpolateOp.h"
+#include "SAMRAI/tbox/Complex.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in lintimint1d.f:
+void F77_FUNC(lintimeintsidecmplx1d, LINTIMEINTSIDECMPLX1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+// in lintimint2d.f:
+void F77_FUNC(lintimeintsidecmplx2d0, LINTIMEINTSIDECMPLX2D0) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+void F77_FUNC(lintimeintsidecmplx2d1, LINTIMEINTSIDECMPLX2D1) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+// in lintimint3d.f:
+void F77_FUNC(lintimeintsidecmplx3d0, LINTIMEINTSIDECMPLX3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+void F77_FUNC(lintimeintsidecmplx3d1, LINTIMEINTSIDECMPLX3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+void F77_FUNC(lintimeintsidecmplx3d2, LINTIMEINTSIDECMPLX3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const dcomplex *, const dcomplex *,
+   dcomplex *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+SideComplexLinearTimeInterpolateOp::SideComplexLinearTimeInterpolateOp():
+   xfer::TimeInterpolateOperator()
+{
+}
+
+SideComplexLinearTimeInterpolateOp::~SideComplexLinearTimeInterpolateOp()
+{
+}
+
+bool SideComplexLinearTimeInterpolateOp::findTimeInterpolateOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   const tbox::Pointer<SideVariable<dcomplex> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == "STD_LINEAR_TIME_INTERPOLATE")) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+void SideComplexLinearTimeInterpolateOp::timeInterpolate(
+   hier::PatchData& dst_data,
+   const hier::Box& where,
+   const hier::PatchData& src_data_old,
+   const hier::PatchData& src_data_new) const
+{
+   const tbox::Dimension& dim(where.getDim());
+
+   const SideData<dcomplex>* old_dat =
+      dynamic_cast<const SideData<dcomplex> *>(&src_data_old);
+   const SideData<dcomplex>* new_dat =
+      dynamic_cast<const SideData<dcomplex> *>(&src_data_new);
+   SideData<dcomplex>* dst_dat =
+      dynamic_cast<SideData<dcomplex> *>(&dst_data);
+
+   TBOX_ASSERT(old_dat != NULL);
+   TBOX_ASSERT(new_dat != NULL);
+   TBOX_ASSERT(dst_dat != NULL);
+   TBOX_ASSERT(where * old_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * new_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * dst_dat->getGhostBox() == where);
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst_data, where, src_data_old, src_data_new);
+
+   const hier::IntVector& directions = dst_dat->getDirectionVector();
+
+   TBOX_ASSERT(directions ==
+      hier::IntVector::min(directions, old_dat->getDirectionVector()));
+   TBOX_ASSERT(directions ==
+      hier::IntVector::min(directions, new_dat->getDirectionVector()));
+
+   const hier::Index old_ilo = old_dat->getGhostBox().lower();
+   const hier::Index old_ihi = old_dat->getGhostBox().upper();
+   const hier::Index new_ilo = new_dat->getGhostBox().lower();
+   const hier::Index new_ihi = new_dat->getGhostBox().upper();
+
+   const hier::Index dst_ilo = dst_dat->getGhostBox().lower();
+   const hier::Index dst_ihi = dst_dat->getGhostBox().upper();
+
+   const hier::Index ifirst = where.lower();
+   const hier::Index ilast = where.upper();
+
+   const double old_time = old_dat->getTime();
+   const double new_time = new_dat->getTime();
+   const double dst_time = dst_dat->getTime();
+
+   TBOX_ASSERT((old_time < dst_time ||
+                tbox::MathUtilities<double>::equalEps(old_time, dst_time)) &&
+      (dst_time < new_time ||
+       tbox::MathUtilities<double>::equalEps(dst_time, new_time)));
+
+   double tfrac = dst_time - old_time;
+   double denom = new_time - old_time;
+   if (denom > tbox::MathUtilities<double>::getMin()) {
+      tfrac /= denom;
+   } else {
+      tfrac = 0.0;
+   }
+
+   for (int d = 0; d < dst_dat->getDepth(); d++) {
+      if (dim == tbox::Dimension(1)) {
+         if (directions(0)) {
+            F77_FUNC(lintimeintsidecmplx1d, LINTIMEINTSIDECMPLX1D) (ifirst(0),
+               ilast(0),
+               old_ilo(0), old_ihi(0),
+               new_ilo(0), new_ihi(0),
+               dst_ilo(0), dst_ihi(0),
+               tfrac,
+               old_dat->getPointer(0, d),
+               new_dat->getPointer(0, d),
+               dst_dat->getPointer(0, d));
+         }
+      } else if (dim == tbox::Dimension(2)) {
+         if (directions(0)) {
+            F77_FUNC(lintimeintsidecmplx2d0, LINTIMEINTSIDECMPLX2D0) (ifirst(0),
+               ifirst(1), ilast(0), ilast(1),
+               old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+               new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+               dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+               tfrac,
+               old_dat->getPointer(0, d),
+               new_dat->getPointer(0, d),
+               dst_dat->getPointer(0, d));
+         }
+         if (directions(1)) {
+            F77_FUNC(lintimeintsidecmplx2d1, LINTIMEINTSIDECMPLX2D1) (ifirst(0),
+               ifirst(1), ilast(0), ilast(1),
+               old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+               new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+               dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+               tfrac,
+               old_dat->getPointer(1, d),
+               new_dat->getPointer(1, d),
+               dst_dat->getPointer(1, d));
+         }
+      } else if (dim == tbox::Dimension(3)) {
+         if (directions(0)) {
+            F77_FUNC(lintimeintsidecmplx3d0, LINTIMEINTSIDECMPLX3D0) (ifirst(0),
+               ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(0, d),
+               new_dat->getPointer(0, d),
+               dst_dat->getPointer(0, d));
+         }
+         if (directions(1)) {
+            F77_FUNC(lintimeintsidecmplx3d1, LINTIMEINTSIDECMPLX3D1) (ifirst(0),
+               ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(1, d),
+               new_dat->getPointer(1, d),
+               dst_dat->getPointer(1, d));
+         }
+         if (directions(2)) {
+            F77_FUNC(lintimeintsidecmplx3d2, LINTIMEINTSIDECMPLX3D2) (ifirst(0),
+               ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(2, d),
+               new_dat->getPointer(2, d),
+               dst_dat->getPointer(2, d));
+         }
+      } else {
+         TBOX_ERROR(
+            "SideComplexLinearTimeInterpolateOp::TimeInterpolate dim > 3 not supported"
+            << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideComplexLinearTimeInterpolateOp.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideComplexLinearTimeInterpolateOp.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for side-centered complex data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideComplexLinearTimeInterpolateOp
+#define included_pdat_SideComplexLinearTimeInterpolateOp
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class SideComplexLinearTimeInterpolateOp implements standard
+ * linear time interpolation for side-centered complex patch data.
+ * It is derived from the xfer::TimeInterpolateOperator base class.
+ * The interpolation uses FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is a side-centered complex, and the string is
+ * "STD_LINEAR_TIME_INTERPOLATE".
+ *
+ * @see xfer::TimeInterpolateOperator
+ */
+
+class SideComplexLinearTimeInterpolateOp:
+   public xfer::TimeInterpolateOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   SideComplexLinearTimeInterpolateOp();
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~SideComplexLinearTimeInterpolateOp();
+
+   /**
+    * Return true if the variable and name string match the standard
+    * side-centered complex interpolation; otherwise, return false.
+    */
+   bool
+   findTimeInterpolateOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Perform linear time interpolation between two side-centered complex
+    * patch data sources and place result in the destination patch data.
+    * Time interpolation is performed on the intersection of the destination
+    * patch data and the input box.  The time to which data is interpolated
+    * is provided by the destination data.
+    */
+   void
+   timeInterpolate(
+      hier::PatchData& dst_data,
+      const hier::Box& where,
+      const hier::PatchData& src_data_old,
+      const hier::PatchData& src_data_new) const;
+
+private:
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideData.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideData.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,603 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated side centered patch data type 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideData_C
+#define included_pdat_SideData_C
+
+#include "SAMRAI/pdat/SideData.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/pdat/SideGeometry.h"
+#include "SAMRAI/pdat/SideOverlap.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#define PDAT_SIDEDATA_VERSION 1
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/SideData.I"
+#endif
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * Constructor and destructor for side data objects.  The constructor	*
+ * simply initializes data variables and sets up the array data.		*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+SideData<TYPE>::SideData(
+   const hier::Box& box,
+   int depth,
+   const hier::IntVector& ghosts,
+   const hier::IntVector& directions):
+   hier::PatchData(box, ghosts),
+   d_depth(depth),
+   d_directions(directions)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(box, ghosts, directions);
+   TBOX_ASSERT(depth > 0);
+   TBOX_ASSERT(ghosts.min() >= 0);
+   TBOX_ASSERT(directions.min() >= 0);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   for (int d = 0; d < getDim().getValue(); d++) {
+      if (d_directions(d)) {
+         const hier::Box side =
+            SideGeometry::toSideBox(this->getGhostBox(), d);
+         d_data[d].initializeArray(side, depth);
+      } else {
+         d_data[d].invalidateArray(dim);
+      }
+   }
+}
+
+template<class TYPE>
+SideData<TYPE>::SideData(
+   const hier::Box& box,
+   int depth,
+   const hier::IntVector& ghosts):
+
+   hier::PatchData(box, ghosts),
+   d_depth(depth),
+   d_directions(hier::IntVector::getOne(box.getDim()))
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(box, ghosts);
+   TBOX_ASSERT(depth > 0);
+   TBOX_ASSERT(ghosts.min() >= 0);
+   TBOX_ASSERT(d_directions.min() >= 0);
+
+   const tbox::Dimension& dim(box.getDim());
+
+   for (int d = 0; d < getDim().getValue(); d++) {
+      if (d_directions(d)) {
+         const hier::Box side =
+            SideGeometry::toSideBox(this->getGhostBox(), d);
+         d_data[d].initializeArray(side, depth);
+      } else {
+         d_data[d].invalidateArray(dim);
+      }
+   }
+}
+
+template<class TYPE>
+SideData<TYPE>::~SideData()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * The following are private and cannot be used, but they are defined	*
+ * here for compilers that require that every template declaration have	*
+ * a definition (a stupid requirement, if you ask me).			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+SideData<TYPE>::SideData(
+   const SideData<TYPE>& foo):
+   hier::PatchData(foo.getBox(),
+                   foo.getGhostCellWidth()),
+   d_directions(tbox::Dimension(getDim()))
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void SideData<TYPE>::operator = (
+   const SideData<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Perform a fast copy between two side centered arrays where their	*
+ * index spaces overlap.							*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void SideData<TYPE>::copy(
+   const hier::PatchData& src)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_directions, src);
+
+   const SideData<TYPE>* t_src =
+      dynamic_cast<const SideData<TYPE> *>(&src);
+
+   if (t_src == NULL) {
+      src.copy2(*this);
+   } else {
+
+      TBOX_ASSERT(t_src->getDirectionVector() == d_directions);
+
+      for (int d = 0; d < getDim().getValue(); d++) {
+         if (d_directions(d)) {
+            const hier::Box box =
+               d_data[d].getBox() * t_src->d_data[d].getBox();
+            if (!box.empty()) {
+               d_data[d].copy(t_src->d_data[d], box);
+            }
+         }
+      }
+   }
+}
+
+template<class TYPE>
+void SideData<TYPE>::copy2(
+   hier::PatchData& dst) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_directions, dst);
+
+   SideData<TYPE>* t_dst =
+      dynamic_cast<SideData<TYPE> *>(&dst);
+
+   TBOX_ASSERT(t_dst != NULL);
+   TBOX_ASSERT(t_dst->getDirectionVector() == d_directions);
+
+   for (int d = 0; d < getDim().getValue(); d++) {
+      if (d_directions(d)) {
+         const hier::Box box = d_data[d].getBox() * t_dst->d_data[d].getBox();
+         if (!box.empty()) {
+            t_dst->d_data[d].copy(d_data[d], box);
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Copy data from the source into the destination according to the	*
+ * overlap descriptor.							*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void SideData<TYPE>::copy(
+   const hier::PatchData& src,
+   const hier::BoxOverlap& overlap)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_directions, src);
+
+   const SideData<TYPE>* t_src =
+      dynamic_cast<const SideData<TYPE> *>(&src);
+   const SideOverlap* t_overlap =
+      dynamic_cast<const SideOverlap *>(&overlap);
+
+   if ((t_src == NULL) || (t_overlap == NULL)) {
+      src.copy2(*this, overlap);
+   } else {
+
+      TBOX_ASSERT(t_src->getDirectionVector() == d_directions);
+
+      const hier::IntVector& src_offset = t_overlap->getSourceOffset();
+      for (int d = 0; d < getDim().getValue(); d++) {
+         if (d_directions(d)) {
+            const hier::BoxList& box_list =
+               t_overlap->getDestinationBoxList(d);
+            d_data[d].copy(t_src->d_data[d], box_list, src_offset);
+         }
+      }
+   }
+}
+
+template<class TYPE>
+void SideData<TYPE>::copy2(
+   hier::PatchData& dst,
+   const hier::BoxOverlap& overlap) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_directions, dst);
+
+   SideData<TYPE>* t_dst =
+      dynamic_cast<SideData<TYPE> *>(&dst);
+   const SideOverlap* t_overlap =
+      dynamic_cast<const SideOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_dst != NULL);
+   TBOX_ASSERT(t_overlap != NULL);
+   TBOX_ASSERT(t_dst->getDirectionVector() == d_directions);
+
+   const hier::IntVector& src_offset = t_overlap->getSourceOffset();
+   for (int d = 0; d < getDim().getValue(); d++) {
+      if (d_directions(d)) {
+         const hier::BoxList& box_list = t_overlap->getDestinationBoxList(d);
+         t_dst->d_data[d].copy(d_data[d], box_list, src_offset);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Perform a fast copy between two arrays at the                         *
+ * specified depths, where their	index spaces overlap.			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void SideData<TYPE>::copyDepth(
+   int dst_depth,
+   const SideData<TYPE>& src,
+   int src_depth)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_directions, src);
+   TBOX_ASSERT(src.d_directions == d_directions);
+
+   for (int d = 0; d < getDim().getValue(); d++) {
+      if (d_directions(d)) {
+         const hier::Box box = d_data[d].getBox() * src.d_data[d].getBox();
+         if (!box.empty()) {
+            d_data[d].copyDepth(dst_depth, src.d_data[d], src_depth, box);
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Calculate the buffer space needed to pack/unpack messages on the box	*
+ * region using the overlap descriptor.					*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+bool SideData<TYPE>::canEstimateStreamSizeFromBox() const
+{
+   return ArrayData<TYPE>::canEstimateStreamSizeFromBox();
+}
+
+template<class TYPE>
+int SideData<TYPE>::getDataStreamSize(
+   const hier::BoxOverlap& overlap) const
+{
+   const SideOverlap* t_overlap =
+      dynamic_cast<const SideOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::IntVector& offset = t_overlap->getSourceOffset();
+
+   int size = 0;
+   for (int d = 0; d < getDim().getValue(); d++) {
+      if (d_directions(d)) {
+         size +=
+            d_data[d].getDataStreamSize(t_overlap->getDestinationBoxList(d),
+               offset);
+      }
+   }
+   return size;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Pack/unpack data into/out of the message streams using the index	*
+ * space in the overlap descriptor.					*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void SideData<TYPE>::packStream(
+   tbox::MessageStream& stream,
+   const hier::BoxOverlap& overlap) const
+{
+   const SideOverlap* t_overlap =
+      dynamic_cast<const SideOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::IntVector& offset = t_overlap->getSourceOffset();
+   for (int d = 0; d < getDim().getValue(); d++) {
+      if (d_directions(d)) {
+         const hier::BoxList& boxes = t_overlap->getDestinationBoxList(d);
+         if (boxes.getNumberOfItems() > 0) {
+            d_data[d].packStream(stream, boxes, offset);
+         }
+      }
+   }
+}
+
+template<class TYPE>
+void SideData<TYPE>::unpackStream(
+   tbox::MessageStream& stream,
+   const hier::BoxOverlap& overlap)
+{
+   const SideOverlap* t_overlap =
+      dynamic_cast<const SideOverlap *>(&overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::IntVector& offset = t_overlap->getSourceOffset();
+   for (int d = 0; d < getDim().getValue(); d++) {
+      if (d_directions(d)) {
+         const hier::BoxList& boxes = t_overlap->getDestinationBoxList(d);
+         if (boxes.getNumberOfItems() > 0) {
+            d_data[d].unpackStream(stream, boxes, offset);
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Calculate the amount of memory space needed to represent the data	*
+ * for a  side centered grid.						*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+size_t SideData<TYPE>::getSizeOfData(
+   const hier::Box& box,
+   int depth,
+   const hier::IntVector& ghosts,
+   const hier::IntVector& directions)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(box, ghosts, directions);
+   TBOX_ASSERT(depth > 0);
+   TBOX_ASSERT(directions.min() >= 0);
+
+   size_t size = 0;
+   const hier::Box ghost_box = hier::Box::grow(box, ghosts);
+   for (int d = 0; d < box.getDim().getValue(); d++) {
+      if (directions(d)) {
+         const hier::Box side_box = SideGeometry::toSideBox(ghost_box, d);
+         size += ArrayData<TYPE>::getSizeOfData(side_box, depth);
+      }
+   }
+   return size;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Fill the side centered box with the given value.			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+void SideData<TYPE>::fill(
+   const TYPE& t,
+   int d)
+{
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   for (int i = 0; i < getDim().getValue(); i++) {
+      if (d_directions(i)) {
+         d_data[i].fill(t, d);
+      }
+   }
+}
+
+template<class TYPE>
+void SideData<TYPE>::fill(
+   const TYPE& t,
+   const hier::Box& box,
+   int d)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_directions, box);
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   for (int i = 0; i < getDim().getValue(); i++) {
+      if (d_directions(i)) {
+         d_data[i].fill(t, SideGeometry::toSideBox(box, i), d);
+      }
+   }
+}
+
+template<class TYPE>
+void SideData<TYPE>::fillAll(
+   const TYPE& t)
+{
+   for (int i = 0; i < getDim().getValue(); i++) {
+      if (d_directions(i)) {
+         d_data[i].fillAll(t);
+      }
+   }
+}
+
+template<class TYPE>
+void SideData<TYPE>::fillAll(
+   const TYPE& t,
+   const hier::Box& box)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_directions, box);
+
+   for (int i = 0; i < getDim().getValue(); i++) {
+      if (d_directions(i)) {
+         d_data[i].fillAll(t, SideGeometry::toSideBox(box, i));
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print side centered data.  Note:  makes call to specialized printAxis *
+ * routine in SideDataSpecialized.C                                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void SideData<TYPE>::print(
+   const hier::Box& box,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_directions, box);
+
+   for (int axis = 0; axis < getDim().getValue(); axis++) {
+      os << "Array side normal = " << axis << std::endl;
+      printAxis(axis, box, os, prec);
+   }
+}
+
+template<class TYPE>
+void SideData<TYPE>::print(
+   const hier::Box& box,
+   int d,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_directions, box);
+   TBOX_ASSERT((d >= 0) && (d < d_depth));
+
+   for (int axis = 0; axis < getDim().getValue(); axis++) {
+      os << "Array side normal = " << axis << std::endl;
+      printAxis(axis, box, d, os, prec);
+   }
+}
+
+template<class TYPE>
+void SideData<TYPE>::printAxis(
+   int axis,
+   const hier::Box& box,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_directions, box);
+   TBOX_ASSERT((axis >= 0) && (axis < getDim().getValue()));
+
+   for (int d = 0; d < d_depth; d++) {
+      os << "Array depth = " << d << std::endl;
+      printAxis(axis, box, d, os, prec);
+   }
+}
+
+template<class TYPE>
+void SideData<TYPE>::printAxis(
+   int side_normal,
+   const hier::Box& box,
+   int depth,
+   std::ostream& os,
+   int prec) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_directions, box);
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+   TBOX_ASSERT((side_normal >= 0) && (side_normal < getDim().getValue()));
+
+   os.precision(prec);
+   if (d_directions(side_normal)) {
+      for (SideIterator i(box, side_normal); i; i++) {
+         os << "array" << i() << " = "
+         << d_data[side_normal](i(), depth) << std::endl << std::flush;
+      }
+   } else {
+      os << "No side data in " << side_normal << " side normal direction"
+         << std::endl << std::flush;
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Checks that class version and restart file version are equal.  If so, *
+ * reads in the d_depth data member to the database.  Then tells         *
+ * d_data to read itself in from the database.                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void SideData<TYPE>::getSpecializedFromDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   int ver = database->getInteger("PDAT_SIDEDATA_VERSION");
+   if (ver != PDAT_SIDEDATA_VERSION) {
+      TBOX_ERROR("SideData<DIM>::getSpecializedFromDatabase error...\n"
+         << " : Restart file version different than class version" << std::endl);
+   }
+
+   d_depth = database->getInteger("d_depth");
+
+   tbox::Pointer<tbox::Database> array_database;
+   for (int i = 0; i < getDim().getValue(); i++) {
+      if (d_directions(i)) {
+         std::string array_name = "d_data" + tbox::Utilities::intToString(i);
+         array_database = database->getDatabase(array_name);
+         (d_data[i]).getFromDatabase(array_database);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Write out the class version number, d_depth data member to the        *
+ * database.  Then tells d_data to write itself to the database.         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void SideData<TYPE>::putSpecializedToDatabase(
+   tbox::Pointer<tbox::Database> database)
+{
+   TBOX_ASSERT(!database.isNull());
+
+   database->putInteger("PDAT_SIDEDATA_VERSION", PDAT_SIDEDATA_VERSION);
+
+   database->putInteger("d_depth", d_depth);
+
+   tbox::Pointer<tbox::Database> array_database;
+   for (int i = 0; i < getDim().getValue(); i++) {
+      if (d_directions(i)) {
+         std::string array_name = "d_data" + tbox::Utilities::intToString(i);
+         array_database = database->putDatabase(array_name);
+         (d_data[i]).putToDatabase(array_database);
+      }
+   }
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideData.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideData.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,129 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated side centered patch data type 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const hier::IntVector& SideData<TYPE>::getDirectionVector() const
+{
+   return d_directions;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int SideData<TYPE>::getDepth() const
+{
+   return d_depth;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE * SideData<TYPE>::getPointer(
+   int side_normal,
+   int depth)
+{
+   TBOX_ASSERT((side_normal >= 0) && (side_normal < getDim().getValue()));
+   TBOX_ASSERT(d_directions(side_normal));
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data[side_normal].getPointer(depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE * SideData<TYPE>::getPointer(
+   int side_normal,
+   int depth) const
+{
+   TBOX_ASSERT((side_normal >= 0) && (side_normal < getDim().getValue()));
+   TBOX_ASSERT(d_directions(side_normal));
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data[side_normal].getPointer(depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE & SideData<TYPE>::operator () (
+   const SideIndex& i,
+   int depth)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, i);
+
+   const int axis = i.getAxis();
+
+   TBOX_ASSERT((axis >= 0) && (axis < getDim().getValue()));
+   TBOX_ASSERT(d_directions(axis));
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data[axis](i, depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE &
+SideData<TYPE>::operator () (
+   const SideIndex& i,
+   int depth) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, i);
+
+   const int axis = i.getAxis();
+
+   TBOX_ASSERT((axis >= 0) && (axis < getDim().getValue()));
+   TBOX_ASSERT(d_directions(axis));
+   TBOX_ASSERT((depth >= 0) && (depth < d_depth));
+
+   return d_data[axis](i, depth);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ArrayData<TYPE>&
+SideData<TYPE>::getArrayData(
+   int side_normal)
+{
+   TBOX_ASSERT((side_normal >= 0) && (side_normal < getDim().getValue()));
+   TBOX_ASSERT(d_directions(side_normal));
+
+   return d_data[side_normal];
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const ArrayData<TYPE>&
+SideData<TYPE>::getArrayData(
+   int side_normal) const
+{
+   TBOX_ASSERT((side_normal >= 0) && (side_normal < getDim().getValue()));
+   TBOX_ASSERT(d_directions(side_normal));
+
+   return d_data[side_normal];
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void SideData<TYPE>::copyOnBox(
+   const SideData<TYPE>& src,
+   const hier::Box& box)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*this, src, box);
+
+   for (int axis = 0; axis < getDim().getValue(); axis++) {
+      const hier::Box side_box = SideGeometry::toSideBox(box, axis);
+      d_data[axis].copy(src.getArrayData(axis), side_box);
+   }
+
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideData.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideData.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,520 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Templated side centered patch data type 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideData
+#define included_pdat_SideData
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/pdat/SideIndex.h"
+#include "SAMRAI/pdat/SideIterator.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * @brief Class SideData<DIM> provides an implementation for data defined
+ * at cell sides (faces) on AMR patches.  It is derived from the hier::PatchData
+ * interface common to all SAMRAI patch data types.  Given a CELL-centered
+ * AMR index space box, a side data object represents data of some template
+ * TYPE and depth on the sides (faces) of the cells in the box.  Here, depth
+ * indicates the number of data values at each side index location.  The
+ * SideGeometry class provides the translation between the standard SAMRAI
+ * cell-centered AMR index space and side-centered data.
+ *
+ * IMPORTANT: The FaceData<DIM> class provides the same storage
+ * as this side data class, except that the coordinate directions of the
+ * individual arrays are permuted in the face data implementation.
+ *
+ * Side data is stored in DIM arrays, each of which contains the
+ * data for the sides normal to a corresponding coordinate direction.
+ * Memory allocation is in column-major ordering (e.g., Fortran
+ * style) so that the leftmost index runs fastest in memory.
+ * For example, a three-dimensional side data object created over a
+ * CELL-centered AMR index space [l0:u0,l1:u1,l2:u2] allocates three data
+ * arrays dimensioned as follows:
+ * \verbatim
+ *
+ * side normal 0
+ *   [ l0 : u0+1 ,
+ *     l1 : u1 ,
+ *     l2 : u2 , d ]   ,
+ *
+ * side normal 1
+ *   [ l0 : u0 ,
+ *     l1 : u1+1 ,
+ *     l2 : u2 , d ]   ,
+ *
+ * side normal 2
+ *   [ l0 : u0 ,
+ *     l1 : u1 ,
+ *     l2 : u2+1 , d ]   ,
+ *
+ * \endverbatim
+ * Here the side normal directions 0, 1, 2 can be thought of as the x, y, and z
+ * side normal directions, respectively, and d is the depth index (i.e., number
+ * of values at each side index location).  Other spatial dimensions are
+ * represented similarly.
+ *
+ * Note also that it is possible to create a side data object for managing
+ * data at cell sides associated with a single coordinate direction only.
+ * See the constructor for more information.  All operations are defined
+ * only for the case where data storage is alike between two side data objects.
+ *
+ * The data type TYPE must define a default constructor (that takes no
+ * arguments) and also the assignment operator.
+ *
+ * @see pdat::ArrayData
+ * @see hier::PatchData
+ * @see pdat::SideDataFactory
+ * @see pdat::SideIndex
+ * @see pdat::SideIterator
+ * @see pdat::SideGeometry
+ */
+
+template<class TYPE>
+class SideData:public hier::PatchData
+{
+public:
+   /*!
+    * @brief Calculate the amount of memory needed to represent side-
+    * centered data over a CELL-centered AMR index space box.
+    *
+    * This function assumes that the amount of memory
+    * needed for TYPE is sizeof(TYPE).  If this is not the case, then a
+    * specialized function must be defined.
+    *
+    * @param box const Box reference describing the interior of the
+    *            standard CELL-centered index box over which the
+    *            side data object will be created.
+    * @param depth gives the number of components for each
+    *              spatial location in the array.
+    * @param ghosts const IntVector reference indicating the width
+    *               of the ghost cell region around the box over which
+    *               the side data will be allocated.
+    * @param directions const IntVector reference indicating which
+    *                   coordinate directions are assumed to have data
+    *                   for the purposes of the calculation.
+    */
+   static size_t
+   getSizeOfData(
+      const hier::Box& box,
+      int depth,
+      const hier::IntVector& ghosts,
+      const hier::IntVector& directions);
+
+   /*!
+    * @brief The constructor for a side data object.
+    *
+    * @param box const Box reference describing the interior of the
+    *            standard CELL-centered index box over which the
+    *            side data object will be created.
+    * @param depth gives the number of components for each
+    *              spatial location in the array.
+    * @param ghosts const IntVector reference indicating the width
+    *               of the ghost cell region around the box over which
+    *               the side data will be allocated.
+    * @param directions const IntVector reference indicating which
+    *                   coordinate directions will have data associated
+    *                   with them.
+    */
+   explicit SideData(
+      const hier::Box& box,
+      int depth,
+      const hier::IntVector& ghosts,
+      const hier::IntVector& directions);
+
+   /*!
+    * @brief Same as previous constructor but with directions
+    * vector of 1's.
+    *
+    */
+   explicit SideData(
+      const hier::Box& box,
+      int depth,
+      const hier::IntVector& ghosts);
+
+   /*!
+    * @brief The virtual destructor for a side data object.
+    */
+   virtual ~SideData<TYPE>();
+
+   /*!
+    * @brief Return constant reference to vector describing which coordinate
+    * directions have data associated with this side data object.
+    *
+    * A vector entry of zero indicates that there is no data array
+    * allocated for the corresponding coordinate direction.  A non-zero
+    * value indicates that a valid data array is maintained for that
+    * coordinate direction.
+    */
+   const hier::IntVector&
+   getDirectionVector() const;
+
+   /*!
+    * @brief Return the depth (e.g., the number of components in each spatial
+    * location) of the array.
+    */
+   int
+   getDepth() const;
+
+   /*!
+    * @brief Get a pointer to the beginning of a particular side normal and
+    * depth component of the side centered array.
+    */
+   TYPE *
+   getPointer(
+      int side_normal,
+      int depth = 0);
+
+   /*!
+    * @brief Get a const pointer to the beginning of a particular side normal
+    * and depth component of the side centered array.
+    */
+   const TYPE *
+   getPointer(
+      int side_normal,
+      int depth = 0) const;
+
+   /*!
+    * @brief Return a reference to the data entry corresponding
+    * to a given side index and depth.
+    */
+   TYPE&
+   operator () (
+      const SideIndex& i,
+      int depth = 0);
+
+   /*!
+    * @brief Return a const reference to the data entry corresponding
+    * to a given side index and depth.
+    */
+   const TYPE&
+   operator () (
+      const SideIndex& i,
+      int depth = 0) const;
+
+   /*!
+    * @brief Return a reference to the array data object for the
+    * given side normal of the side centered data object.
+    */
+   ArrayData<TYPE>&
+   getArrayData(
+      int side_normal);
+
+   /*!
+    * @brief Return a const reference to the array data object for the
+    * given side normal of the side centered data object.
+    */
+   const ArrayData<TYPE>&
+   getArrayData(
+      int side_normal) const;
+
+   /*!
+    * @brief A fast copy from source to destination (i.e., this)
+    * patch data object.
+    *
+    * Data is copied where there is overlap in the underlying index space.
+    * The copy is performed on the interior plus the ghost cell width (for
+    * both the source and destination).  Currently, source data must be
+    * an SideData of the same DIM and TYPE.  If not, then an unrecoverable
+    * error results.
+    */
+   virtual void
+   copy(
+      const hier::PatchData& src);
+
+   /*!
+    * @brief A fast copy from source (i.e., this) to destination
+    * patch data object.
+    *
+    * Data is copied where there is overlap in the underlying index space.
+    * The copy is performed on the interior plus the ghost cell width (for
+    * both the source and destination).  Currently, destination data must be
+    * an SideData of the same DIM and TYPE.  If not, then an unrecoverable
+    * error results.
+    */
+   virtual void
+   copy2(
+      hier::PatchData& dst) const;
+
+   /*!
+    * @brief Copy data from source to destination (i.e., this)
+    * patch data object on the given overlap.
+    *
+    * Currently, source data must be SideData of the same DIM and TYPE
+    * and the overlap must be a SideOverlap of the same DIM. If not,
+    * then an unrecoverable error results.
+    */
+   virtual void
+   copy(
+      const hier::PatchData& src,
+      const hier::BoxOverlap& overlap);
+
+   /*!
+    * @brief Copy data from source (i.e., this) to destination
+    * patch data object on the given overlap.
+    *
+    * Currently, destination data must be SideData of the same DIM and TYPE
+    * and the overlap must be a SideOverlap of the same DIM.  If not,
+    * then an unrecoverable error results.
+    */
+   virtual void
+   copy2(
+      hier::PatchData& dst,
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Copy data from source to destination (i.e., this)
+    * patch data object on the given CELL-centered AMR index box.
+    */
+   void
+   copyOnBox(
+      const SideData<TYPE>& src,
+      const hier::Box& box);
+
+   /*!
+    * @brief Fast copy (i.e., source and this side data objects are
+    * defined over the same box) to this destination side data object
+    * from the given source side data object at the specified depths.
+    */
+   void
+   copyDepth(
+      int dst_depth,
+      const SideData<TYPE>& src,
+      int src_depth);
+
+   /*!
+    * @brief Return true if the patch data object can estimate the
+    * stream size required to fit its data using only index
+    * space information (i.e., a box).
+    *
+    * This routine is defined for the standard types (bool, char,
+    * double, float, int, and dcomplex).
+    */
+   virtual bool
+   canEstimateStreamSizeFromBox() const;
+
+   /*!
+    * @brief Return the number of bytes needed to stream the data
+    * in this patch data object lying in the specified box overlap
+    * region.
+    *
+    * This routine is defined for the standard types (bool, char,
+    * double, float, int, and dcomplex).
+    */
+   virtual int
+   getDataStreamSize(
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Pack data in this patch data object lying in the specified
+    * box overlap region into the stream.  The overlap must be an
+    * SideOverlap of the same DIM.
+    */
+   virtual void
+   packStream(
+      tbox::MessageStream& stream,
+      const hier::BoxOverlap& overlap) const;
+
+   /*!
+    * @brief Unpack data from stream into this patch data object over
+    * the specified box overlap region. The overlap must be an
+    * SideOverlap of the same DIM.
+    */
+   virtual void
+   unpackStream(
+      tbox::MessageStream& stream,
+      const hier::BoxOverlap& overlap);
+
+   /*!
+    * @brief Fill all values at depth d with the value t.
+    */
+   void
+   fill(
+      const TYPE& t,
+      int d = 0);
+
+   /*!
+    * @brief Fill all values at depth d within the box with the value t.
+    */
+   void
+   fill(
+      const TYPE& t,
+      const hier::Box& box,
+      int d = 0);
+
+   /*!
+    * @brief Fill all depth components with value t.
+    */
+   void
+   fillAll(
+      const TYPE& t);
+
+   /*!
+    * @brief Fill all depth components within the box with value t.
+    */
+   void
+   fillAll(
+      const TYPE& t,
+      const hier::Box& box);
+
+   /*!
+    * @brief Print all side data values residing in the specified box.
+    * If the depth of the array is greater than one, all depths are printed.
+    *
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to side index space.
+    * @param os   reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   print(
+      const hier::Box& box,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Print all side data values at the given array depth in
+    * the specified box.
+    *
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to side index space.
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    * @param os   reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   print(
+      const hier::Box& box,
+      int depth,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Print all side centered data values for specified side normal
+    * direction residing in the specified box.  If the depth of the data is
+    * greater than one, all depths are printed.
+    *
+    * @param side_normal  integer side normal coordinate direction,
+    *              must satisfy 0 <= side_normal < DIM
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to side index space.
+    * @param os    reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   printAxis(
+      int side_normal,
+      const hier::Box& box,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * @brief Print all side centered data values for specified side normal
+    * direction residing in the specified box.  If the depth of the data is
+    * greater than one, all depths are printed.
+    *
+    * @param side_normal  integer side normal coordinate direction,
+    *              must satisfy 0 <= side_normal < DIM
+    * @param box  const reference to box over whioch to print data. Note box
+    *        is assumed to reside in standard cell-centered index space
+    *        and will be converted to side index space.
+    * @param depth integer depth component, must satisfy
+    *              0 <= depth < actual depth of data array
+    * @param os    reference to output stream.
+    * @param prec integer precision for printing floating point numbers
+    *        (i.e., TYPE = float, double, or dcomplex). The default
+    *        is 12 decimal places for double and complex floating point numbers,
+    *        and the default is 6 decimal places floats.  For other types, this
+    *        value is ignored.
+    */
+   void
+   printAxis(
+      int side_normal,
+      const hier::Box& box,
+      int depth,
+      std::ostream& os = tbox::plog,
+      int prec = 12) const;
+
+   /*!
+    * Check that class version and restart file version are equal.  If so,
+    * read data members from the database.
+    *
+    * Assertions: database must be a non-null pointer.
+    */
+   virtual void
+   getSpecializedFromDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+   /*!
+    * Write out the class version number and other data members to
+    * the database.
+    *
+    * Assertions: database must be a non-null pointer.
+    */
+   virtual void
+   putSpecializedToDatabase(
+      tbox::Pointer<tbox::Database> database);
+
+   /*!
+    * The side iterator iterates over the elements on one axis of a side
+    * centered box geometry.  This typedef is a convenience for using the
+    * SideIterator class.
+    */
+   typedef SideIterator Iterator;
+
+private:
+   SideData(
+      const SideData<TYPE>&);           // not implemented
+   void
+   operator = (
+      const SideData<TYPE>&);                           // not implemented
+
+   int d_depth;
+   hier::IntVector d_directions;
+
+   ArrayData<TYPE> d_data[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/SideData.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/SideData.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideDataFactory.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideDataFactory.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,209 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating side data objects 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideDataFactory_C
+#define included_pdat_SideDataFactory_C
+
+#include "SAMRAI/pdat/SideDataFactory.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/SideGeometry.h"
+#include "SAMRAI/pdat/OutersideDataFactory.h"
+#include "SAMRAI/hier/Patch.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/SideDataFactory.I"
+#endif
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * The constructor simply caches the default ghost cell width and depth.	*
+ *									*
+ *************************************************************************
+ */
+
+// SGS DODIM TODO
+// WARNING! WARNING! WARNING! WARNING!
+// This was hacked to replicate a bug in the SAMRAI.  The direction vector
+// should not be all ones but not having this causes the tests to fail
+// WARNING! WARNING! WARNING! WARNING!
+
+template<class TYPE>
+SideDataFactory<TYPE>::SideDataFactory(
+   const int depth,
+   const hier::IntVector& ghosts,
+   bool fine_boundary_represents_var,
+   const hier::IntVector& directions):
+   hier::PatchDataFactory(ghosts),
+   d_depth(depth),
+   d_fine_boundary_represents_var(fine_boundary_represents_var),
+   d_directions(hier::IntVector::getOne(ghosts.getDim())),
+   d_mb_trans(NULL)
+{
+   (void)directions;
+   TBOX_ASSERT(depth > 0);
+   TBOX_ASSERT(ghosts.min() >= 0);
+   TBOX_ASSERT(directions.min() >= 0);
+}
+
+template<class TYPE>
+SideDataFactory<TYPE>::SideDataFactory(
+   const int depth,
+   const hier::IntVector& ghosts,
+   bool fine_boundary_represents_var):
+   hier::PatchDataFactory(ghosts),
+   d_depth(depth),
+   d_fine_boundary_represents_var(fine_boundary_represents_var),
+   d_directions(ghosts.getDim(), 1),
+   d_mb_trans(NULL)
+{
+   TBOX_ASSERT(depth > 0);
+   TBOX_ASSERT(ghosts.min() >= 0);
+}
+
+template<class TYPE>
+SideDataFactory<TYPE>::~SideDataFactory()
+{
+   if (d_mb_trans) {
+      delete d_mb_trans;
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Clone the factory and copy the default parameters to the new factory.	*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::PatchDataFactory>
+SideDataFactory<TYPE>::cloneFactory(
+   const hier::IntVector& ghosts)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, ghosts);
+
+   return tbox::Pointer<hier::PatchDataFactory>(new SideDataFactory<TYPE>(
+                                                   d_depth,
+                                                   ghosts,
+                                                   d_fine_boundary_represents_var,
+                                                   d_directions));
+}
+
+/*
+ *************************************************************************
+ *
+ * Allocate the concrete side data classes.
+ *
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::PatchData>
+SideDataFactory<TYPE>::allocate(
+   const hier::Patch& patch) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, patch);
+
+   hier::PatchData* patchdata =
+      new SideData<TYPE>(patch.getBox(),
+                         d_depth,
+                         this->d_ghosts,
+                         d_directions);
+   return tbox::Pointer<hier::PatchData>(patchdata);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Return the box geometry type for side data objects.			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<hier::BoxGeometry>
+SideDataFactory<TYPE>::getBoxGeometry(
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   hier::BoxGeometry* boxgeometry = new SideGeometry(box,
+         this->d_ghosts,
+         d_directions);
+   return tbox::Pointer<hier::BoxGeometry>(boxgeometry);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Calculate the amount of memory needed to allocate the data object.	*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+size_t SideDataFactory<TYPE>::getSizeOfMemory(
+   const hier::Box& box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, box);
+
+   const size_t obj =
+      tbox::MemoryUtilities::align(sizeof(SideData<TYPE>));
+   const size_t data =
+      SideData<TYPE>::getSizeOfData(box, d_depth, this->d_ghosts, d_directions);
+   return obj + data;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Determine whether this is a valid copy operation to/from SideData     *
+ * between the supplied datatype.                                        *
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+bool SideDataFactory<TYPE>::validCopyTo(
+   const tbox::Pointer<hier::PatchDataFactory>& dst_pdf) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *dst_pdf);
+
+   bool valid_copy = false;
+
+   /*
+    * Valid options are SideData and OutersideData.
+    */
+   if (!valid_copy) {
+      tbox::Pointer<SideDataFactory<TYPE> > sdf = dst_pdf;
+      if (!sdf.isNull()) {
+         valid_copy = true;
+      }
+   }
+
+   if (!valid_copy) {
+      tbox::Pointer<OutersideDataFactory<TYPE> > osdf = dst_pdf;
+      if (!osdf.isNull()) {
+         valid_copy = true;
+      }
+   }
+
+   return valid_copy;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideDataFactory.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideDataFactory.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,40 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating side data objects 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int SideDataFactory<TYPE>::getDepth() const
+{
+   return d_depth;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const hier::IntVector& SideDataFactory<TYPE>::getDirectionVector() const
+{
+   return d_directions;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+hier::MultiblockDataTranslator *
+SideDataFactory<TYPE>::getMultiblockDataTranslator()
+{
+   if (d_mb_trans == NULL) {
+      d_mb_trans = new MultiblockSideDataTranslator<TYPE>();
+   }
+   return d_mb_trans;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideDataFactory.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideDataFactory.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,186 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Factory class for creating side data objects 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideDataFactory
+#define included_pdat_SideDataFactory
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/MultiblockSideDataTranslator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/PatchDataFactory.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class SideDataFactory is a factory class used to allocate new
+ * instances of SideData objects.  It is a subclass of the patch
+ * data factory class and side data is a subclass of patch data.  Both
+ * the factory and data classes are templated on the type of the contained
+ * object (e.g., double or int).
+ *
+ * Note that it is possible to create a side data factory to allocate
+ * and manage data for cell sides associated with a single coordinate
+ * direction only.  See the constructor for more information.
+ *
+ * @see pdat::SideData
+ * @see pdat::PatchDataFactory
+ */
+
+template<class TYPE>
+class SideDataFactory:public hier::PatchDataFactory
+{
+public:
+   /**
+    * The constructor for the side data factory class.  The ghost cell
+    * width, depth (number of components), and fine boundary representation arguments
+    * give the defaults for all edge data objects created with this factory.
+    * Also, the default data allocation scheme is to generate storage for sides
+    * in all coordinate directions (default integer vector of all 1's).  To
+    * use this factory to manage side data objects for sides associated
+    * with a single direction only, provide the directions vector argument.
+    * A zero entry indicates that data for that direction is not wanted.
+    * Otherwise, data will be created for that direction.  See the
+    * SideVariable<DIM> class header file for more information.
+    */
+   explicit SideDataFactory(
+      int depth,
+      const hier::IntVector& ghosts,
+      bool fine_boundary_represents_var);
+
+   /**
+    * Same as previous constructor but with directions vector of 1's
+    */
+   explicit SideDataFactory(
+      int depth,
+      const hier::IntVector& ghosts,
+      bool fine_boundary_represents_var,
+      const hier::IntVector& directions);
+
+   /**
+    * Virtual destructor for the side data factory class.
+    */
+   virtual ~SideDataFactory<TYPE>();
+
+   /**
+    * @brief Abstract virtual function to clone a patch data factory.
+    *
+    * This will return a new instantiation of the abstract factory
+    * with the same properties.  The properties of the cloned factory
+    * can then be changed without modifying the original.
+    *
+    * @param ghosts default ghost cell width for concrete classes created from
+    * the factory.
+    */
+   virtual tbox::Pointer<hier::PatchDataFactory>
+   cloneFactory(
+      const hier::IntVector& ghosts);
+
+   /**
+    * Virtual factory function to allocate a concrete side data object.
+    * The default information about the object (e.g., ghost cell width)
+    * is taken from the factory.
+    */
+   virtual tbox::Pointer<hier::PatchData>
+   allocate(
+      const hier::Patch& patch) const;
+
+   /**
+    * Allocate the box geometry object associated with the patch data.
+    * This information will be used in the computation of intersections
+    * and data dependencies between objects.
+    */
+   virtual tbox::Pointer<hier::BoxGeometry>
+   getBoxGeometry(
+      const hier::Box& box) const;
+
+   /**
+    * Get the depth (number of components).  This is the depth that
+    * will be used in the instantiation of side data objects.
+    */
+   int
+   getDepth() const;
+
+   /**
+    * Return constant reference to vector describing which coordinate
+    * directions have data associated with this side data object.
+    * A vector entry of zero indicates that there is no data array
+    * allocated for the corresponding coordinate direction.  A non-zero
+    * value indicates that a valid data array is maintained for that
+    * coordinate direction.
+    */
+   const hier::IntVector&
+   getDirectionVector() const;
+
+   /**
+    * Calculate the amount of memory needed to store the side data object,
+    * including object data and dynamically allocated data.
+    */
+   virtual size_t
+   getSizeOfMemory(
+      const hier::Box& box) const;
+
+   /**
+    * Return a boolean value indicating how data for the side quantity will be treated
+    * on coarse-fine interfaces.  This value is passed into the constructor.  See
+    * the FaceVariable<DIM> class header file for more information.
+    */
+   bool fineBoundaryRepresentsVariable() const {
+      return d_fine_boundary_represents_var;
+   }
+
+   /**
+    * Return true since the side data index space extends beyond the interior of
+    * patches.  That is, side data lives on patch borders.
+    */
+   bool dataLivesOnPatchBorder() const {
+      return true;
+   }
+
+   /**
+    * Return whether it is valid to copy this SideDataFactory to the
+    * supplied destination patch data factory.  It will return true if
+    * dst_pdf is SideDataFactory or OutersideDataFactory, false otherwise.
+    */
+   bool
+   validCopyTo(
+      const tbox::Pointer<hier::PatchDataFactory>& dst_pdf) const;
+
+   /**
+    * Return pointer to a multiblock data translator
+    */
+   hier::MultiblockDataTranslator *
+   getMultiblockDataTranslator();
+
+private:
+   int d_depth;
+   bool d_fine_boundary_represents_var;
+   hier::IntVector d_directions;
+
+   MultiblockSideDataTranslator<TYPE>* d_mb_trans;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/SideDataFactory.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/SideDataFactory.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideDoubleConstantRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideDoubleConstantRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,280 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for side-centered double data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideDoubleConstantRefine_C
+#define included_pdat_SideDoubleConstantRefine_C
+
+#include "SAMRAI/pdat/SideDoubleConstantRefine.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/SideVariable.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in conrefine1d.f:
+void F77_FUNC(conrefsidedoub1d, CONREFSIDEDOUB1D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const double *, double *);
+// in conrefine2d.f:
+void F77_FUNC(conrefsidedoub2d0, CONREFSIDEDOUB2D0) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const double *, double *);
+void F77_FUNC(conrefsidedoub2d1, CONREFSIDEDOUB2D1) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const double *, double *);
+// in conrefine3d.f:
+void F77_FUNC(conrefsidedoub3d0, CONREFSIDEDOUB3D0) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const double *, double *);
+void F77_FUNC(conrefsidedoub3d1, CONREFSIDEDOUB3D1) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const double *, double *);
+void F77_FUNC(conrefsidedoub3d2, CONREFSIDEDOUB3D2) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const double *, double *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+SideDoubleConstantRefine::SideDoubleConstantRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSTANT_REFINE"),
+   d_name_id("CONSTANT_REFINE")
+{
+}
+
+SideDoubleConstantRefine::~SideDoubleConstantRefine()
+{
+}
+
+bool SideDoubleConstantRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<SideVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+SideDoubleConstantRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int SideDoubleConstantRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+SideDoubleConstantRefine::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void SideDoubleConstantRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   tbox::Pointer<SideData<double> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<SideData<double> >
+   fdata = fine.getPatchData(dst_component);
+
+   const pdat::SideOverlap* t_overlap =
+      dynamic_cast<const pdat::SideOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*this, fine, coarse, ratio);
+
+   const hier::IntVector& directions = fdata->getDirectionVector();
+
+   TBOX_ASSERT(directions ==
+      hier::IntVector::min(directions, cdata->getDirectionVector()));
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   for (int axis = 0; axis < dim.getValue(); axis++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(axis);
+
+      for (hier::BoxList::Iterator b(boxes); b; b++) {
+
+         hier::Box fine_box(b());
+         TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, fine_box);
+
+         fine_box.upper(axis) -= 1;
+
+         const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+         const hier::Index ifirstc = coarse_box.lower();
+         const hier::Index ilastc = coarse_box.upper();
+         const hier::Index ifirstf = fine_box.lower();
+         const hier::Index ilastf = fine_box.upper();
+
+         for (int d = 0; d < fdata->getDepth(); d++) {
+            if (dim == tbox::Dimension(1)) {
+               if (directions(axis)) {
+                  F77_FUNC(conrefsidedoub1d, CONREFSIDEDOUB1D) (
+                     ifirstc(0), ilastc(0),
+                     ifirstf(0), ilastf(0),
+                     cilo(0), cihi(0),
+                     filo(0), fihi(0),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               }
+            } else if (dim == tbox::Dimension(2)) {
+               if (axis == 0 && directions(0)) {
+                  F77_FUNC(conrefsidedoub2d0, CONREFSIDEDOUB2D0) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               }
+               if (axis == 1 && directions(1)) {
+                  F77_FUNC(conrefsidedoub2d1, CONREFSIDEDOUB2D1) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d));
+               }
+            } else if (dim == tbox::Dimension(3)) {
+               if (axis == 0 && directions(0)) {
+                  F77_FUNC(conrefsidedoub3d0, CONREFSIDEDOUB3D0) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               }
+               if (axis == 1 && directions(1)) {
+                  F77_FUNC(conrefsidedoub3d1, CONREFSIDEDOUB3D1) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d));
+               }
+               if (axis == 2 && directions(2)) {
+                  F77_FUNC(conrefsidedoub3d2, CONREFSIDEDOUB3D2) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(2, d),
+                     fdata->getPointer(2, d));
+               }
+            } else {
+               TBOX_ERROR(
+                  "SideDoubleConstantRefine::refine dimension > 3 not supported"
+                  << std::endl);
+            }
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideDoubleConstantRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideDoubleConstantRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for side-centered double data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideDoubleConstantRefine
+#define included_pdat_SideDoubleConstantRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class SideDoubleConstantRefine implements constant
+ * interpolation for side-centered double patch data defined over a
+ * mesh.  It is derived from the xfer::RefineOperator base class.
+ * The numerical operations for interpolation use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is side-centered double, and the string is "CONSTANT_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class SideDoubleConstantRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit SideDoubleConstantRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~SideDoubleConstantRefine();
+
+   /**
+    * Return true if the variable and name string match side-centered
+    * double constant interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of side-centered double constant interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the constant interpolation operator is the vector
+    * of zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the side-centered double constant
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the boxes contained in fine_overlap.
+    * It is assumed that the coarse patch contains sufficient data for the
+    * stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideDoubleLinearTimeInterpolateOp.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideDoubleLinearTimeInterpolateOp.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,284 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for side-centered double patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideDoubleLinearTimeInterpolateOp_C
+#define included_pdat_SideDoubleLinearTimeInterpolateOp_C
+
+#include "SAMRAI/pdat/SideDoubleLinearTimeInterpolateOp.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in lintimint1d.f:
+void F77_FUNC(lintimeintsidedoub1d, LINTIMEINTSIDEDOUB1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+// in lintimint2d.f:
+void F77_FUNC(lintimeintsidedoub2d0, LINTIMEINTSIDEDOUB2D0) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+void F77_FUNC(lintimeintsidedoub2d1, LINTIMEINTSIDEDOUB2D1) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+// in lintimint3d.f:
+void F77_FUNC(lintimeintsidedoub3d0, LINTIMEINTSIDEDOUB3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+void F77_FUNC(lintimeintsidedoub3d1, LINTIMEINTSIDEDOUB3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+void F77_FUNC(lintimeintsidedoub3d2, LINTIMEINTSIDEDOUB3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const double *, const double *,
+   double *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+SideDoubleLinearTimeInterpolateOp::SideDoubleLinearTimeInterpolateOp():
+   xfer::TimeInterpolateOperator()
+{
+}
+
+SideDoubleLinearTimeInterpolateOp::~SideDoubleLinearTimeInterpolateOp()
+{
+}
+
+bool SideDoubleLinearTimeInterpolateOp::findTimeInterpolateOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   const tbox::Pointer<SideVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == "STD_LINEAR_TIME_INTERPOLATE")) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+void SideDoubleLinearTimeInterpolateOp::timeInterpolate(
+   hier::PatchData& dst_data,
+   const hier::Box& where,
+   const hier::PatchData& src_data_old,
+   const hier::PatchData& src_data_new) const
+{
+   const tbox::Dimension& dim(where.getDim());
+
+   const SideData<double>* old_dat =
+      dynamic_cast<const SideData<double> *>(&src_data_old);
+   const SideData<double>* new_dat =
+      dynamic_cast<const SideData<double> *>(&src_data_new);
+   SideData<double>* dst_dat =
+      dynamic_cast<SideData<double> *>(&dst_data);
+
+   TBOX_ASSERT(old_dat != NULL);
+   TBOX_ASSERT(new_dat != NULL);
+   TBOX_ASSERT(dst_dat != NULL);
+   TBOX_ASSERT(where * old_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * new_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * dst_dat->getGhostBox() == where);
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst_data, where, src_data_old, src_data_new);
+
+   const hier::IntVector& directions = dst_dat->getDirectionVector();
+
+   TBOX_ASSERT(directions ==
+      hier::IntVector::min(directions, old_dat->getDirectionVector()));
+   TBOX_ASSERT(directions ==
+      hier::IntVector::min(directions, new_dat->getDirectionVector()));
+
+   const hier::Index old_ilo = old_dat->getGhostBox().lower();
+   const hier::Index old_ihi = old_dat->getGhostBox().upper();
+   const hier::Index new_ilo = new_dat->getGhostBox().lower();
+   const hier::Index new_ihi = new_dat->getGhostBox().upper();
+
+   const hier::Index dst_ilo = dst_dat->getGhostBox().lower();
+   const hier::Index dst_ihi = dst_dat->getGhostBox().upper();
+
+   const hier::Index ifirst = where.lower();
+   const hier::Index ilast = where.upper();
+
+   const double old_time = old_dat->getTime();
+   const double new_time = new_dat->getTime();
+   const double dst_time = dst_dat->getTime();
+
+   TBOX_ASSERT((old_time < dst_time ||
+                tbox::MathUtilities<double>::equalEps(old_time, dst_time)) &&
+      (dst_time < new_time ||
+       tbox::MathUtilities<double>::equalEps(dst_time, new_time)));
+
+   double tfrac = dst_time - old_time;
+   double denom = new_time - old_time;
+   if (denom > tbox::MathUtilities<double>::getMin()) {
+      tfrac /= denom;
+   } else {
+      tfrac = 0.0;
+   }
+
+   for (int d = 0; d < dst_dat->getDepth(); d++) {
+      if (dim == tbox::Dimension(1)) {
+         if (directions(0)) {
+            F77_FUNC(lintimeintsidedoub1d, LINTIMEINTSIDEDOUB1D) (ifirst(0),
+               ilast(0),
+               old_ilo(0), old_ihi(0),
+               new_ilo(0), new_ihi(0),
+               dst_ilo(0), dst_ihi(0),
+               tfrac,
+               old_dat->getPointer(0, d),
+               new_dat->getPointer(0, d),
+               dst_dat->getPointer(0, d));
+         }
+      } else if (dim == tbox::Dimension(2)) {
+         if (directions(0)) {
+            F77_FUNC(lintimeintsidedoub2d0, LINTIMEINTSIDEDOUB2D0) (ifirst(0),
+               ifirst(1), ilast(0), ilast(1),
+               old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+               new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+               dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+               tfrac,
+               old_dat->getPointer(0, d),
+               new_dat->getPointer(0, d),
+               dst_dat->getPointer(0, d));
+         }
+         if (directions(1)) {
+            F77_FUNC(lintimeintsidedoub2d1, LINTIMEINTSIDEDOUB2D1) (ifirst(0),
+               ifirst(1), ilast(0), ilast(1),
+               old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+               new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+               dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+               tfrac,
+               old_dat->getPointer(1, d),
+               new_dat->getPointer(1, d),
+               dst_dat->getPointer(1, d));
+         }
+      } else if (dim == tbox::Dimension(3)) {
+         if (directions(0)) {
+            F77_FUNC(lintimeintsidedoub3d0, LINTIMEINTSIDEDOUB3D0) (ifirst(0),
+               ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(0, d),
+               new_dat->getPointer(0, d),
+               dst_dat->getPointer(0, d));
+         }
+         if (directions(1)) {
+            F77_FUNC(lintimeintsidedoub3d1, LINTIMEINTSIDEDOUB3D1) (ifirst(0),
+               ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(1, d),
+               new_dat->getPointer(1, d),
+               dst_dat->getPointer(1, d));
+         }
+         if (directions(2)) {
+            F77_FUNC(lintimeintsidedoub3d2, LINTIMEINTSIDEDOUB3D2) (ifirst(0),
+               ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(2, d),
+               new_dat->getPointer(2, d),
+               dst_dat->getPointer(2, d));
+         }
+      } else {
+         TBOX_ERROR(
+            "SideDoubleLinearTimeInterpolateOp::TimeInterpolate dim > 3 not supported"
+            << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideDoubleLinearTimeInterpolateOp.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideDoubleLinearTimeInterpolateOp.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for side-centered double patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideDoubleLinearTimeInterpolateOp
+#define included_pdat_SideDoubleLinearTimeInterpolateOp
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class SideDoubleLinearTimeInterpolateOp implements standard
+ * linear time interpolation for side-centered double patch data.
+ * It is derived from the xfer::TimeInterpolateOperator base class.
+ * The interpolation uses FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is a side-centered double, and the string is
+ * "STD_LINEAR_TIME_INTERPOLATE".
+ *
+ * @see xfer::TimeInterpolateOperator
+ */
+
+class SideDoubleLinearTimeInterpolateOp:
+   public xfer::TimeInterpolateOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   SideDoubleLinearTimeInterpolateOp();
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~SideDoubleLinearTimeInterpolateOp();
+
+   /**
+    * Return true if the variable and name string match the standard
+    * side-centered double interpolation; otherwise, return false.
+    */
+   bool
+   findTimeInterpolateOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Perform linear time interpolation between two side-centered double
+    * patch data sources and place result in the destination patch data.
+    * Time interpolation is performed on the intersection of the destination
+    * patch data and the input box.  The time to which data is interpolated
+    * is provided by the destination data.
+    */
+   void
+   timeInterpolate(
+      hier::PatchData& dst_data,
+      const hier::Box& where,
+      const hier::PatchData& src_data_old,
+      const hier::PatchData& src_data_new) const;
+
+private:
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideFloatConstantRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideFloatConstantRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,280 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for side-centered float data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideFloatConstantRefine_C
+#define included_pdat_SideFloatConstantRefine_C
+
+#include "SAMRAI/pdat/SideFloatConstantRefine.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/SideVariable.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in conrefine1d.f:
+void F77_FUNC(conrefsideflot1d, CONREFSIDEFLOT1D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const float *, float *);
+// in conrefine2d.f:
+void F77_FUNC(conrefsideflot2d0, CONREFSIDEFLOT2D0) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const float *, float *);
+void F77_FUNC(conrefsideflot2d1, CONREFSIDEFLOT2D1) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const float *, float *);
+// in conrefine3d.f:
+void F77_FUNC(conrefsideflot3d0, CONREFSIDEFLOT3D0) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const float *, float *);
+void F77_FUNC(conrefsideflot3d1, CONREFSIDEFLOT3D1) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const float *, float *);
+void F77_FUNC(conrefsideflot3d2, CONREFSIDEFLOT3D2) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const float *, float *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+SideFloatConstantRefine::SideFloatConstantRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSTANT_REFINE"),
+   d_name_id("CONSTANT_REFINE")
+{
+}
+
+SideFloatConstantRefine::~SideFloatConstantRefine()
+{
+}
+
+bool SideFloatConstantRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<SideVariable<float> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+SideFloatConstantRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int SideFloatConstantRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+SideFloatConstantRefine::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void SideFloatConstantRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   tbox::Pointer<SideData<float> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<SideData<float> >
+   fdata = fine.getPatchData(dst_component);
+
+   const pdat::SideOverlap* t_overlap =
+      dynamic_cast<const pdat::SideOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*this, fine, coarse, ratio);
+
+   const hier::IntVector& directions = fdata->getDirectionVector();
+
+   TBOX_ASSERT(directions ==
+      hier::IntVector::min(directions, cdata->getDirectionVector()));
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   for (int axis = 0; axis < dim.getValue(); axis++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(axis);
+
+      for (hier::BoxList::Iterator b(boxes); b; b++) {
+
+         hier::Box fine_box(b());
+         TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, fine_box);
+
+         fine_box.upper(axis) -= 1;
+
+         const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+         const hier::Index ifirstc = coarse_box.lower();
+         const hier::Index ilastc = coarse_box.upper();
+         const hier::Index ifirstf = fine_box.lower();
+         const hier::Index ilastf = fine_box.upper();
+
+         for (int d = 0; d < fdata->getDepth(); d++) {
+            if (dim == tbox::Dimension(1)) {
+               if (directions(axis)) {
+                  F77_FUNC(conrefsideflot1d, CONREFSIDEFLOT1D) (
+                     ifirstc(0), ilastc(0),
+                     ifirstf(0), ilastf(0),
+                     cilo(0), cihi(0),
+                     filo(0), fihi(0),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               }
+            } else if (dim == tbox::Dimension(2)) {
+               if (axis == 0 && directions(0)) {
+                  F77_FUNC(conrefsideflot2d0, CONREFSIDEFLOT2D0) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               }
+               if (axis == 1 && directions(1)) {
+                  F77_FUNC(conrefsideflot2d1, CONREFSIDEFLOT2D1) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d));
+               }
+            } else if (dim == tbox::Dimension(3)) {
+               if (axis == 0 && directions(0)) {
+                  F77_FUNC(conrefsideflot3d0, CONREFSIDEFLOT3D0) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               }
+               if (axis == 1 && directions(1)) {
+                  F77_FUNC(conrefsideflot3d1, CONREFSIDEFLOT3D1) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d));
+               }
+               if (axis == 2 && directions(2)) {
+                  F77_FUNC(conrefsideflot3d2, CONREFSIDEFLOT3D2) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(2, d),
+                     fdata->getPointer(2, d));
+               }
+            } else {
+               TBOX_ERROR(
+                  "SideFloatConstantRefine::refine dimension > 3 not supported"
+                  << std::endl);
+            }
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideFloatConstantRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideFloatConstantRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for side-centered float data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideFloatConstantRefine
+#define included_pdat_SideFloatConstantRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class SideFloatConstantRefine implements constant
+ * interpolation for side-centered float patch data defined over a
+ * mesh.  It is derived from the xfer::RefineOperator base class.
+ * The numerical operations for interpolation use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is side-centered float, and the string is "CONSTANT_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class SideFloatConstantRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit SideFloatConstantRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~SideFloatConstantRefine();
+
+   /**
+    * Return true if the variable and name string match side-centered
+    * float constant interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of side-centered float constant interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the constant interpolation operator is the vector
+    * of zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the side-centered float constant
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the boxes contained in fine_overlap.
+    * It is assumed that the coarse patch contains sufficient data for the
+    * stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideFloatLinearTimeInterpolateOp.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideFloatLinearTimeInterpolateOp.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,284 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for side-centered float patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideFloatLinearTimeInterpolateOp_C
+#define included_pdat_SideFloatLinearTimeInterpolateOp_C
+
+#include "SAMRAI/pdat/SideFloatLinearTimeInterpolateOp.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in lintimint1d.f:
+void F77_FUNC(lintimeintsidefloat1d, LINTIMEINTSIDEFLOAT1D) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+// in lintimint2d.f:
+void F77_FUNC(lintimeintsidefloat2d0, LINTIMEINTSIDEFLOAT2D0) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+void F77_FUNC(lintimeintsidefloat2d1, LINTIMEINTSIDEFLOAT2D1) (const int &,
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+// in lintimint3d.f:
+void F77_FUNC(lintimeintsidefloat3d0, LINTIMEINTSIDEFLOAT3D0) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+void F77_FUNC(lintimeintsidefloat3d1, LINTIMEINTSIDEFLOAT3D1) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+void F77_FUNC(lintimeintsidefloat3d2, LINTIMEINTSIDEFLOAT3D2) (const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   const float *, const float *,
+   float *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+SideFloatLinearTimeInterpolateOp::SideFloatLinearTimeInterpolateOp():
+   xfer::TimeInterpolateOperator()
+{
+}
+
+SideFloatLinearTimeInterpolateOp::~SideFloatLinearTimeInterpolateOp()
+{
+}
+
+bool SideFloatLinearTimeInterpolateOp::findTimeInterpolateOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   const tbox::Pointer<SideVariable<float> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == "STD_LINEAR_TIME_INTERPOLATE")) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+void SideFloatLinearTimeInterpolateOp::timeInterpolate(
+   hier::PatchData& dst_data,
+   const hier::Box& where,
+   const hier::PatchData& src_data_old,
+   const hier::PatchData& src_data_new) const
+{
+   const tbox::Dimension& dim(where.getDim());
+
+   const SideData<float>* old_dat =
+      dynamic_cast<const SideData<float> *>(&src_data_old);
+   const SideData<float>* new_dat =
+      dynamic_cast<const SideData<float> *>(&src_data_new);
+   SideData<float>* dst_dat =
+      dynamic_cast<SideData<float> *>(&dst_data);
+
+   TBOX_ASSERT(old_dat != NULL);
+   TBOX_ASSERT(new_dat != NULL);
+   TBOX_ASSERT(dst_dat != NULL);
+   TBOX_ASSERT(where * old_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * new_dat->getGhostBox() == where);
+   TBOX_ASSERT(where * dst_dat->getGhostBox() == where);
+   TBOX_DIM_ASSERT_CHECK_ARGS4(dst_data, where, src_data_old, src_data_new);
+
+   const hier::IntVector& directions = dst_dat->getDirectionVector();
+
+   TBOX_ASSERT(directions ==
+      hier::IntVector::min(directions, old_dat->getDirectionVector()));
+   TBOX_ASSERT(directions ==
+      hier::IntVector::min(directions, new_dat->getDirectionVector()));
+
+   const hier::Index old_ilo = old_dat->getGhostBox().lower();
+   const hier::Index old_ihi = old_dat->getGhostBox().upper();
+   const hier::Index new_ilo = new_dat->getGhostBox().lower();
+   const hier::Index new_ihi = new_dat->getGhostBox().upper();
+
+   const hier::Index dst_ilo = dst_dat->getGhostBox().lower();
+   const hier::Index dst_ihi = dst_dat->getGhostBox().upper();
+
+   const hier::Index ifirst = where.lower();
+   const hier::Index ilast = where.upper();
+
+   const double old_time = old_dat->getTime();
+   const double new_time = new_dat->getTime();
+   const double dst_time = dst_dat->getTime();
+
+   TBOX_ASSERT((old_time < dst_time ||
+                tbox::MathUtilities<double>::equalEps(old_time, dst_time)) &&
+      (dst_time < new_time ||
+       tbox::MathUtilities<double>::equalEps(dst_time, new_time)));
+
+   double tfrac = dst_time - old_time;
+   double denom = new_time - old_time;
+   if (denom > tbox::MathUtilities<double>::getMin()) {
+      tfrac /= denom;
+   } else {
+      tfrac = 0.0;
+   }
+
+   for (int d = 0; d < dst_dat->getDepth(); d++) {
+      if (dim == tbox::Dimension(1)) {
+         if (directions(0)) {
+            F77_FUNC(lintimeintsidefloat1d, LINTIMEINTSIDEFLOAT1D) (ifirst(0),
+               ilast(0),
+               old_ilo(0), old_ihi(0),
+               new_ilo(0), new_ihi(0),
+               dst_ilo(0), dst_ihi(0),
+               tfrac,
+               old_dat->getPointer(0, d),
+               new_dat->getPointer(0, d),
+               dst_dat->getPointer(0, d));
+         }
+      } else if (dim == tbox::Dimension(2)) {
+         if (directions(0)) {
+            F77_FUNC(lintimeintsidefloat2d0, LINTIMEINTSIDEFLOAT2D0) (ifirst(0),
+               ifirst(1), ilast(0), ilast(1),
+               old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+               new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+               dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+               tfrac,
+               old_dat->getPointer(0, d),
+               new_dat->getPointer(0, d),
+               dst_dat->getPointer(0, d));
+         }
+         if (directions(1)) {
+            F77_FUNC(lintimeintsidefloat2d1, LINTIMEINTSIDEFLOAT2D1) (ifirst(0),
+               ifirst(1), ilast(0), ilast(1),
+               old_ilo(0), old_ilo(1), old_ihi(0), old_ihi(1),
+               new_ilo(0), new_ilo(1), new_ihi(0), new_ihi(1),
+               dst_ilo(0), dst_ilo(1), dst_ihi(0), dst_ihi(1),
+               tfrac,
+               old_dat->getPointer(1, d),
+               new_dat->getPointer(1, d),
+               dst_dat->getPointer(1, d));
+         }
+      } else if (dim == tbox::Dimension(3)) {
+         if (directions(0)) {
+            F77_FUNC(lintimeintsidefloat3d0, LINTIMEINTSIDEFLOAT3D0) (ifirst(0),
+               ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(0, d),
+               new_dat->getPointer(0, d),
+               dst_dat->getPointer(0, d));
+         }
+         if (directions(1)) {
+            F77_FUNC(lintimeintsidefloat3d1, LINTIMEINTSIDEFLOAT3D1) (ifirst(0),
+               ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(1, d),
+               new_dat->getPointer(1, d),
+               dst_dat->getPointer(1, d));
+         }
+         if (directions(2)) {
+            F77_FUNC(lintimeintsidefloat3d2, LINTIMEINTSIDEFLOAT3D2) (ifirst(0),
+               ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               old_ilo(0), old_ilo(1), old_ilo(2),
+               old_ihi(0), old_ihi(1), old_ihi(2),
+               new_ilo(0), new_ilo(1), new_ilo(2),
+               new_ihi(0), new_ihi(1), new_ihi(2),
+               dst_ilo(0), dst_ilo(1), dst_ilo(2),
+               dst_ihi(0), dst_ihi(1), dst_ihi(2),
+               tfrac,
+               old_dat->getPointer(2, d),
+               new_dat->getPointer(2, d),
+               dst_dat->getPointer(2, d));
+         }
+      } else {
+         TBOX_ERROR(
+            "SideFloatLinearTimeInterpolateOp::TimeInterpolate dim > 3 not supported"
+            << std::endl);
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideFloatLinearTimeInterpolateOp.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideFloatLinearTimeInterpolateOp.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Linear time interp operator for side-centered float patch data. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideFloatLinearTimeInterpolateOp
+#define included_pdat_SideFloatLinearTimeInterpolateOp
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class SideFloatLinearTimeInterpolateOp implements standard
+ * linear time interpolation for side-centered float patch data.
+ * It is derived from the xfer::TimeInterpolateOperator base class.
+ * The interpolation uses FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is a side-centered float, and the string is
+ * "STD_LINEAR_TIME_INTERPOLATE".
+ *
+ * @see xfer::TimeInterpolateOperator
+ */
+
+class SideFloatLinearTimeInterpolateOp:
+   public xfer::TimeInterpolateOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   SideFloatLinearTimeInterpolateOp();
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~SideFloatLinearTimeInterpolateOp();
+
+   /**
+    * Return true if the variable and name string match the standard
+    * side-centered float interpolation; otherwise, return false.
+    */
+   bool
+   findTimeInterpolateOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Perform linear time interpolation between two side-centered float
+    * patch data sources and place result in the destination patch data.
+    * Time interpolation is performed on the intersection of the destination
+    * patch data and the input box.  The time to which data is interpolated
+    * is provided by the destination data.
+    */
+   void
+   timeInterpolate(
+      hier::PatchData& dst_data,
+      const hier::Box& where,
+      const hier::PatchData& src_data_old,
+      const hier::PatchData& src_data_new) const;
+
+private:
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideGeometry.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideGeometry.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,237 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideGeometry_C
+#define included_pdat_SideGeometry_C
+
+#include "SAMRAI/pdat/SideGeometry.h"
+#include "SAMRAI/pdat/SideOverlap.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/SideGeometry.I"
+#endif
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * Create a side geometry object given the box, ghost cell width, and    *
+ * direction information.                                                *
+ *									*
+ *************************************************************************
+ */
+
+SideGeometry::SideGeometry(
+   const hier::Box& box,
+   const hier::IntVector& ghosts,
+   const hier::IntVector& directions):
+   d_box(box),
+   d_ghosts(ghosts),
+   d_directions(directions)
+
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(box, ghosts);
+   TBOX_ASSERT(ghosts.min() >= 0);
+   TBOX_ASSERT(directions.min() >= 0);
+}
+
+SideGeometry::~SideGeometry()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Attempt to calculate the intersection between two side centered box	*
+ * geometries.  The calculateOverlap() checks whether both arguments are	*
+ * side geometries; if so, it compuates the intersection.  If not, then	*
+ * it calls calculateOverlap() on the source object (if retry is true)	*
+ * to allow the source a chance to calculate the intersection.  See the	*
+ * hier::BoxGeometry base class for more information about the protocol.	*
+ * A pointer to null is returned if the intersection cannot be computed.	*
+ *                                                                      *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap> SideGeometry::calculateOverlap(
+   const hier::BoxGeometry& dst_geometry,
+   const hier::BoxGeometry& src_geometry,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset,
+   const bool retry,
+   const hier::BoxList& dst_restrict_boxes) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(d_box, src_mask, src_offset);
+
+   const SideGeometry* t_dst =
+      dynamic_cast<const SideGeometry *>(&dst_geometry);
+   const SideGeometry* t_src =
+      dynamic_cast<const SideGeometry *>(&src_geometry);
+
+   tbox::Pointer<hier::BoxOverlap> over(NULL);
+   if ((t_src != NULL) && (t_dst != NULL)) {
+      over = doOverlap(*t_dst, *t_src, src_mask, overwrite_interior,
+            src_offset, dst_restrict_boxes);
+   } else if (retry) {
+      over = src_geometry.calculateOverlap(dst_geometry, src_geometry,
+            src_mask, overwrite_interior,
+            src_offset, false,
+            dst_restrict_boxes);
+   }
+   return over;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Convert an AMR-index space hier::Box into a side-index space box by a	*
+ * increasing the index size by one in the axis direction.		*
+ *									*
+ *************************************************************************
+ */
+
+hier::Box SideGeometry::toSideBox(
+   const hier::Box& box,
+   int side_normal)
+{
+   const tbox::Dimension& dim(box.getDim());
+
+   TBOX_ASSERT((side_normal >= 0) && (side_normal < dim.getValue()));
+
+   hier::Box side_box(dim);
+
+   if (!box.empty()) {
+      side_box = box;
+      side_box.upper(side_normal) += 1;
+   }
+
+   return side_box;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Compute the overlap between two side centered boxes.  The algorithm	*
+ * is fairly straight-forward.  First, we perform a quick-and-dirty	*
+ * intersection to see if the boxes might overlap.  If that intersection	*
+ * is not empty, then we need to do a better job calculating the overlap	*
+ * for each dimension.  Note that the AMR index space boxes must be	*
+ * shifted into the side centered space before we calculate the proper	*
+ * intersections.							*
+ *									*
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap> SideGeometry::doOverlap(
+   const SideGeometry& dst_geometry,
+   const SideGeometry& src_geometry,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset,
+   const hier::BoxList& dst_restrict_boxes)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(src_mask, src_offset);
+   TBOX_ASSERT(
+      dst_geometry.getDirectionVector() == src_geometry.getDirectionVector());
+
+   const tbox::Dimension& dim(src_mask.getDim());
+
+   tbox::Array<hier::BoxList> dst_boxes(dim.getValue());
+
+   // Perform a quick-and-dirty intersection to see if the boxes might overlap
+
+   const hier::Box src_box =
+      hier::Box::grow(src_geometry.d_box, src_geometry.d_ghosts) * src_mask;
+   const hier::Box src_shift =
+      hier::Box::shift(src_box, src_offset);
+   const hier::Box dst_ghost =
+      hier::Box::grow(dst_geometry.d_box, dst_geometry.d_ghosts);
+
+   // Compute the intersection (if any) for each of the side directions
+   const hier::IntVector one_vector(dim, 1);
+
+   const hier::Box quick_check =
+      hier::Box::grow(src_shift, one_vector) * hier::Box::grow(dst_ghost,
+         one_vector);
+
+   if (!quick_check.empty()) {
+
+      const hier::IntVector& dirs = src_geometry.getDirectionVector();
+      for (int d = 0; d < dim.getValue(); d++) {
+         if (dirs(d)) {
+            const hier::Box dst_side = toSideBox(dst_ghost, d);
+            const hier::Box src_side = toSideBox(src_shift, d);
+            const hier::Box together = dst_side * src_side;
+            if (!together.empty()) {
+               dst_boxes[d].unionBoxes(together);
+               if (!overwrite_interior) {
+                  const hier::Box int_side = toSideBox(dst_geometry.d_box, d);
+                  dst_boxes[d].removeIntersections(together, int_side);
+               } else {
+                  dst_boxes[d].appendItem(together);
+               }
+            }  // if (!together.empty())
+         } // if (dirs(d))
+
+         if (dst_restrict_boxes.size() && dst_boxes[d].size()) {
+            hier::BoxList side_restrict_boxes;
+            for (hier::BoxList::Iterator b(dst_restrict_boxes); b; b++) {
+               side_restrict_boxes.appendItem(toSideBox(b(), d));
+            }
+            dst_boxes[d].intersectBoxes(side_restrict_boxes);
+         }
+
+      }  // loop over dim && dirs(d)
+
+   }  // if (!quick_check.empty())
+
+   // Create the side overlap data object using the boxes and source shift
+
+   hier::BoxOverlap* overlap = new SideOverlap(dst_boxes, src_offset);
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set up a SideOverlap oject using the given boxes and offset           *
+ *                                                                       *
+ *************************************************************************
+ */
+tbox::Pointer<hier::BoxOverlap>
+SideGeometry::setUpOverlap(
+   const hier::BoxList& boxes,
+   const hier::IntVector& src_offset) const
+{
+   const tbox::Dimension& dim(src_offset.getDim());
+   tbox::Array<hier::BoxList> dst_boxes(dim.getValue());
+
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      for (int d = 0; d < dim.getValue(); d++) {
+         hier::Box side_box(SideGeometry::toSideBox(b(), d));
+         dst_boxes[d].appendItem(side_box);
+      }
+   }
+
+   // Create the side overlap data object using the boxes and source shift
+
+   hier::BoxOverlap* overlap = new SideOverlap(dst_boxes, src_offset);
+   return tbox::Pointer<hier::BoxOverlap>(overlap);
+
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideGeometry.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideGeometry.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,33 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+SAMRAI_INLINE_KEYWORD
+const hier::Box& SideGeometry::getBox() const
+{
+   return d_box;
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::IntVector& SideGeometry::getGhosts() const
+{
+   return d_ghosts;
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::IntVector& SideGeometry::getDirectionVector() const
+{
+   return d_directions;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideGeometry.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideGeometry.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,152 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideGeometry
+#define included_pdat_SideGeometry
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/SideOverlap.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * Class SideGeometry manages the mapping between the AMR index space
+ * and the side-centered geometry index space.  It is a subclass of
+ * hier::BoxGeometry and it computes intersections between side-
+ * centered box geometries for communication operations.
+ *
+ * See header file for SideData<DIM> class for a more detailed
+ * description of the data layout.
+ *
+ * @see hier::BoxGeometry
+ * @see pdat::SideOverlap
+ */
+
+class SideGeometry:public hier::BoxGeometry
+{
+public:
+   /*!
+    * The BoxOverlap implemenation for this geometry.
+    */
+   typedef SideOverlap Overlap;
+
+   /*!
+    * @brief Convert an AMR index box space box into an side geometry box.
+    * An side geometry box extends the given AMR index box space box
+    * by one in upper dimension for the side normal coordinate direction.
+    */
+   static hier::Box
+   toSideBox(
+      const hier::Box& box,
+      int side_normal);
+
+   /*!
+    * @brief Construct the side geometry object given an AMR index
+    * space box, ghost cell width and directions vector indicating
+    * which coordinate directions are allocated.
+    */
+   explicit SideGeometry(
+      const hier::Box& box,
+      const hier::IntVector& ghosts,
+      const hier::IntVector& directions);
+
+   /*!
+    * @brief The virtual destructor does nothing interesting.
+    */
+   virtual ~SideGeometry();
+
+   /*!
+    * @brief Compute the overlap in side-centered index space between
+    * the source box geometry and the destination box geometry.
+    */
+   virtual tbox::Pointer<hier::BoxOverlap>
+   calculateOverlap(
+      const hier::BoxGeometry& dst_geometry,
+      const hier::BoxGeometry& src_geometry,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset,
+      const bool retry,
+      const hier::BoxList& dst_restrict_boxes = hier::BoxList()) const;
+
+   /*!
+    * @brief Set up a SideOverlap object based on the given boxes and the
+    * offset.
+    */
+   virtual tbox::Pointer<hier::BoxOverlap>
+   setUpOverlap(
+      const hier::BoxList& boxes,
+      const hier::IntVector& src_offset) const;
+
+   /*!
+    * @brief Return the box for this side centered box geometry
+    * object.
+    */
+   const hier::Box&
+   getBox() const;
+
+   /*!
+    * @brief Return the ghost cell width for this side centered box
+    * geometry object.
+    */
+   const hier::IntVector&
+   getGhosts() const;
+
+   /*!
+    * Return constant reference to vector describing which coordinate
+    * directions managed by this side geometry object.
+    *
+    * A vector entry of zero indicates that this object will not perform
+    * operations involving the corresponding coordinate direction.
+    * A non-zero value indicates otherwise.
+    */
+   const hier::IntVector&
+   getDirectionVector() const;
+
+private:
+   /**
+    * Function doOverlap() is the function that computes the overlap
+    * between the source and destination objects, where both box geometry
+    * objects are guaranteed to have side centered geometry.
+    */
+   static tbox::Pointer<hier::BoxOverlap>
+   doOverlap(
+      const SideGeometry& dst_geometry,
+      const SideGeometry& src_geometry,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset,
+      const hier::BoxList& dst_restrict_boxes);
+
+   SideGeometry(
+      const SideGeometry&);             // not implemented
+   void
+   operator = (
+      const SideGeometry&);                     // not implemented
+
+   hier::Box d_box;
+   hier::IntVector d_ghosts;
+   hier::IntVector d_directions;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/SideGeometry.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideIndex.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideIndex.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,19 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideIndex_C
+#define included_pdat_SideIndex_C
+
+#include "SAMRAI/pdat/SideIndex.h"
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/SideIndex.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideIndex.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideIndex.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,221 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+SAMRAI_INLINE_KEYWORD
+SideIndex::SideIndex(
+   const tbox::Dimension& dim):
+   hier::Index(dim)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+SideIndex::SideIndex(
+   const hier::Index& rhs,
+   const int axis,
+   const int side):
+   hier::Index(rhs),
+   d_axis(axis)
+{
+   (*this)(d_axis) += side;
+}
+
+SAMRAI_INLINE_KEYWORD
+SideIndex::SideIndex(
+   const SideIndex& rhs):
+   hier::Index(rhs),
+   d_axis(rhs.d_axis)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+SideIndex& SideIndex::operator = (
+   const SideIndex& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   hier::Index::operator = (rhs);
+   d_axis = rhs.d_axis;
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+SideIndex::~SideIndex()
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+int SideIndex::getAxis() const
+{
+   return d_axis;
+}
+
+SAMRAI_INLINE_KEYWORD
+void SideIndex::setAxis(
+   const int axis)
+{
+   d_axis = axis;
+}
+
+SAMRAI_INLINE_KEYWORD
+hier::Index SideIndex::toCell(
+   const int side) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   hier::Index index(dim);
+
+   for (int i = 0; i < dim.getValue(); i++) {
+      index(i) = (*this)(i);
+   }
+
+   index(d_axis) += (side - 1);
+
+   return index;
+}
+
+SAMRAI_INLINE_KEYWORD
+SideIndex& SideIndex::operator += (
+   const hier::IntVector& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   hier::Index::operator += (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+SideIndex SideIndex::operator + (
+   const hier::IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   SideIndex tmp = *this;
+   tmp += rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+SideIndex& SideIndex::operator += (
+   const int rhs)
+{
+   hier::Index::operator += (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+SideIndex SideIndex::operator + (
+   const int rhs) const
+{
+   SideIndex tmp = *this;
+   tmp += rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+SideIndex& SideIndex::operator -= (
+   const hier::IntVector& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   hier::Index::operator -= (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+SideIndex SideIndex::operator - (
+   const hier::IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   SideIndex tmp = *this;
+   tmp -= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+SideIndex& SideIndex::operator -= (
+   const int rhs)
+{
+   hier::Index::operator -= (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+SideIndex SideIndex::operator - (
+   const int rhs) const
+{
+   SideIndex tmp = *this;
+   tmp -= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+SideIndex& SideIndex::operator *= (
+   const hier::IntVector& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   hier::Index::operator *= (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+SideIndex SideIndex::operator * (
+   const hier::IntVector& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   SideIndex tmp = *this;
+   tmp *= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+SideIndex& SideIndex::operator *= (
+   const int rhs)
+{
+   hier::Index::operator *= (rhs);
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+SideIndex SideIndex::operator * (
+   const int rhs) const
+{
+   SideIndex tmp = *this;
+   tmp *= rhs;
+   return tmp;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool SideIndex::operator == (
+   const SideIndex& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   return ((hier::Index *)this)->operator == (rhs) && (d_axis == rhs.d_axis);
+}
+
+SAMRAI_INLINE_KEYWORD
+bool SideIndex::operator != (
+   const SideIndex& rhs) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, rhs);
+
+   return ((hier::Index *)this)->operator != (rhs) || (d_axis != rhs.d_axis);
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideIndex.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideIndex.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,211 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideIndex
+#define included_pdat_SideIndex
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Index.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class SideIndex implements a simple n-dimensional integer
+ * vector for side centered variables.  Side indices contain an integer
+ * index location in AMR index space along with the designated side axis
+ * (X=0, Y=1, or Z=2).  See the side box geometry class for more information
+ * about the mapping between the AMR index space and the side indices.
+ *
+ * @see hier::Index
+ * @see pdat::SideData
+ * @see pdat::SideGeometry
+ * @see pdat::SideIterator
+ */
+
+class SideIndex:public hier::Index
+{
+public:
+   /**
+    * The default constructor for a side index creates an uninitialized index.
+    */
+   explicit SideIndex(
+      const tbox::Dimension& dim);
+
+   /**
+    * Construct a side index from a regular index, axis, and side.  The axis
+    * can be one of SideIndex::X (0), SideIndex::Y (1), or
+    * SideIndex::Z (2). The side argument can be one of the constants
+    * SideIndex::Lower (0) or SideIndex::Upper (1).
+    */
+   explicit SideIndex(
+      const hier::Index& rhs,
+      const int axis,
+      const int side);
+
+   /**
+    * The copy constructor creates a side index equal to the argument.
+    */
+   SideIndex(
+      const SideIndex& rhs);
+
+   /**
+    * The assignment operator sets the side index equal to the argument.
+    */
+   SideIndex&
+   operator = (
+      const SideIndex& rhs);
+
+   /**
+    * The side index destructor does nothing interesting.
+    */
+   ~SideIndex();
+
+   /**
+    * Get the axis for which this side index is defined (X=0, Y=1, Z=2).
+    */
+   int
+   getAxis() const;
+
+   /**
+    * Set the side axis (X=0, Y=1, Z=2).
+    */
+   void
+   setAxis(
+      const int axis);
+
+   /**
+    * Convert the side index into the index on the left hand side
+    * (argument side == 0) or the right hand side (argument side == 1).
+    */
+   hier::Index
+   toCell(
+      const int side) const;
+
+   /**
+    * Plus-equals operator for a side index and an integer vector.
+    */
+   SideIndex&
+   operator += (
+      const hier::IntVector& rhs);
+
+   /**
+    * Plus operator for a side index and an integer vector.
+    */
+   SideIndex
+   operator + (
+      const hier::IntVector& rhs) const;
+
+   /**
+    * Plus-equals operator for a side index and an integer.
+    */
+   SideIndex&
+   operator += (
+      const int rhs);
+
+   /**
+    * Plus operator for a side index and an integer.
+    */
+   SideIndex
+   operator + (
+      const int rhs) const;
+
+   /**
+    * Minus-equals operator for a side index and an integer vector.
+    */
+   SideIndex&
+   operator -= (
+      const hier::IntVector& rhs);
+
+   /**
+    * Minus operator for a side index and an integer vector.
+    */
+   SideIndex
+   operator - (
+      const hier::IntVector& rhs) const;
+
+   /**
+    * Minus-equals operator for a side index and an integer.
+    */
+   SideIndex&
+   operator -= (
+      const int rhs);
+
+   /**
+    * Minus operator for a side index and an integer.
+    */
+   SideIndex
+   operator - (
+      const int rhs) const;
+
+   /**
+    * Times-equals operator for a side index and an integer vector.
+    */
+   SideIndex&
+   operator *= (
+      const hier::IntVector& rhs);
+
+   /**
+    * Times operator for a side index and an integer vector.
+    */
+   SideIndex
+   operator * (
+      const hier::IntVector& rhs) const;
+
+   /**
+    * Times-equals operator for a side index and an integer.
+    */
+   SideIndex&
+   operator *= (
+      const int rhs);
+
+   /**
+    * Times operator for a side index and an integer.
+    */
+   SideIndex
+   operator * (
+      const int rhs) const;
+
+   /**
+    * Returns true if two side index objects are equal.  All components
+    * and the corresponding side axes must be the same for equality.
+    */
+   bool
+   operator == (
+      const SideIndex& rhs) const;
+
+   /**
+    * Returns true if two side index objects are not equal.  Any of
+    * the components or axes may be different for inequality.
+    */
+   bool
+   operator != (
+      const SideIndex& rhs) const;
+
+   enum {
+      X = 0,
+      Y = 1,
+      Z = 2,
+      Lower = 0,
+      Upper = 1
+   };
+
+private:
+   int d_axis;
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/SideIndex.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideIntegerConstantRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideIntegerConstantRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,280 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for side-centered int data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideIntegerConstantRefine_C
+#define included_pdat_SideIntegerConstantRefine_C
+
+#include "SAMRAI/pdat/SideIntegerConstantRefine.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/SideVariable.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+// in conrefine1d.f:
+void F77_FUNC(conrefsideintg1d, CONREFSIDEINTG1D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *,
+   const int *, int *);
+// in conrefine2d.f:
+void F77_FUNC(conrefsideintg2d0, CONREFSIDEINTG2D0) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const int *, int *);
+void F77_FUNC(conrefsideintg2d1, CONREFSIDEINTG2D1) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *,
+   const int *, int *);
+// in conrefine3d.f:
+void F77_FUNC(conrefsideintg3d0, CONREFSIDEINTG3D0) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const int *, int *);
+void F77_FUNC(conrefsideintg3d1, CONREFSIDEINTG3D1) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const int *, int *);
+void F77_FUNC(conrefsideintg3d2, CONREFSIDEINTG3D2) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *,
+   const int *, int *);
+}
+
+namespace SAMRAI {
+namespace pdat {
+
+SideIntegerConstantRefine::SideIntegerConstantRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "CONSTANT_REFINE"),
+   d_name_id("CONSTANT_REFINE")
+{
+}
+
+SideIntegerConstantRefine::~SideIntegerConstantRefine()
+{
+}
+
+bool SideIntegerConstantRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   const tbox::Pointer<SideVariable<int> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const std::string&
+SideIntegerConstantRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int SideIntegerConstantRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+SideIntegerConstantRefine::getStencilWidth() const {
+   return hier::IntVector::getZero(getDim());
+}
+
+void SideIntegerConstantRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(getDim());
+
+   tbox::Pointer<SideData<int> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<SideData<int> >
+   fdata = fine.getPatchData(dst_component);
+
+   const pdat::SideOverlap* t_overlap =
+      dynamic_cast<const pdat::SideOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*this, fine, coarse, ratio);
+
+   const hier::IntVector& directions = fdata->getDirectionVector();
+
+   TBOX_ASSERT(directions ==
+      hier::IntVector::min(directions, cdata->getDirectionVector()));
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   for (int axis = 0; axis < dim.getValue(); axis++) {
+      const hier::BoxList& boxes = t_overlap->getDestinationBoxList(axis);
+
+      for (hier::BoxList::Iterator b(boxes); b; b++) {
+
+         hier::Box fine_box(b());
+         TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, fine_box);
+
+         fine_box.upper(axis) -= 1;
+
+         const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+         const hier::Index ifirstc = coarse_box.lower();
+         const hier::Index ilastc = coarse_box.upper();
+         const hier::Index ifirstf = fine_box.lower();
+         const hier::Index ilastf = fine_box.upper();
+
+         for (int d = 0; d < fdata->getDepth(); d++) {
+            if (dim == tbox::Dimension(1)) {
+               if (directions(axis)) {
+                  F77_FUNC(conrefsideintg1d, CONREFSIDEINTG1D) (
+                     ifirstc(0), ilastc(0),
+                     ifirstf(0), ilastf(0),
+                     cilo(0), cihi(0),
+                     filo(0), fihi(0),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               }
+            } else if (dim == tbox::Dimension(2)) {
+               if (axis == 0 && directions(0)) {
+                  F77_FUNC(conrefsideintg2d0, CONREFSIDEINTG2D0) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               }
+               if (axis == 1 && directions(1)) {
+                  F77_FUNC(conrefsideintg2d1, CONREFSIDEINTG2D1) (
+                     ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+                     ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+                     cilo(0), cilo(1), cihi(0), cihi(1),
+                     filo(0), filo(1), fihi(0), fihi(1),
+                     &ratio[0],
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d));
+               }
+            } else if (dim == tbox::Dimension(3)) {
+               if (axis == 0 && directions(0)) {
+                  F77_FUNC(conrefsideintg3d0, CONREFSIDEINTG3D0) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(0, d),
+                     fdata->getPointer(0, d));
+               }
+               if (axis == 1 && directions(1)) {
+                  F77_FUNC(conrefsideintg3d1, CONREFSIDEINTG3D1) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(1, d),
+                     fdata->getPointer(1, d));
+               }
+               if (axis == 2 && directions(2)) {
+                  F77_FUNC(conrefsideintg3d2, CONREFSIDEINTG3D2) (
+                     ifirstc(0), ifirstc(1), ifirstc(2),
+                     ilastc(0), ilastc(1), ilastc(2),
+                     ifirstf(0), ifirstf(1), ifirstf(2),
+                     ilastf(0), ilastf(1), ilastf(2),
+                     cilo(0), cilo(1), cilo(2),
+                     cihi(0), cihi(1), cihi(2),
+                     filo(0), filo(1), filo(2),
+                     fihi(0), fihi(1), fihi(2),
+                     &ratio[0],
+                     cdata->getPointer(2, d),
+                     fdata->getPointer(2, d));
+               }
+            } else {
+               TBOX_ERROR(
+                  "SideIntegerConstantRefine::refine dimension > 3 not supported"
+                  << std::endl);
+            }
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideIntegerConstantRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideIntegerConstantRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,107 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Constant refine operator for side-centered integer data on
+ *                a  mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideIntegerConstantRefine
+#define included_pdat_SideIntegerConstantRefine
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/xfer/RefineOperator.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class SideIntegerConstantRefine implements constant
+ * interpolation for side-centered integer patch data defined over a
+ * mesh.  It is derived from the xfer::RefineOperator base class.
+ * The numerical operations for interpolation use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is side-centered integer, and the string is "CONSTANT_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class SideIntegerConstantRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   explicit SideIntegerConstantRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~SideIntegerConstantRefine();
+
+   /**
+    * Return true if the variable and name string match side-centered
+    * integer constant interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /**
+    * Return name string identifier of this refinement operator.
+    */
+   const std::string&
+   getOperatorName() const;
+
+   /**
+    * The priority of side-centered integer constant interpolation is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the constant interpolation operator is the vector
+    * of zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the side-centered integer constant
+    * interpolation operator.  Interpolation is performed on the intersection
+    * of the destination patch and the boxes contained in fine_overlap.
+    * It is assumed that the coarse patch contains sufficient data for the
+    * stencil width of the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+private:
+   std::string d_name_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideIterator.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideIterator.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,19 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Iterator for side centered patch data types 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideIterator_C
+#define included_pdat_SideIterator_C
+
+#include "SAMRAI/pdat/SideIterator.h"
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/SideIterator.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideIterator.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideIterator.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Iterator for side centered patch data types 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+SAMRAI_INLINE_KEYWORD
+SideIterator::SideIterator(
+   const hier::Box& box,
+   const int axis):
+   d_index(box.lower(), axis, SideIndex::Lower),
+   d_box(SideGeometry::toSideBox(box, axis))
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+SideIterator::SideIterator(
+   const SideIterator& iter):
+   d_index(iter.d_index),
+   d_box(iter.d_box)
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+SideIterator&
+SideIterator::operator = (
+   const SideIterator& iter)
+{
+   d_index = iter.d_index;
+   d_box = iter.d_box;
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+SideIterator::~SideIterator()
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+const SideIndex& SideIterator::operator * () const
+{
+   return d_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+const SideIndex& SideIterator::operator () () const
+{
+   return d_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+SideIterator::operator bool () const
+{
+   bool retval = true;
+   for (int i = 0; i < d_box.getDim().getValue(); i++) {
+      if (d_index(i) > d_box.upper(i)) {
+         retval = false;
+         break;
+      }
+   }
+   return retval;
+}
+
+#ifndef LACKS_BOOL_VOID_RESOLUTION
+SAMRAI_INLINE_KEYWORD
+SideIterator::operator const void* () const
+{
+   return SideIterator::operator bool () ? this : NULL;
+}
+#endif
+
+SAMRAI_INLINE_KEYWORD
+bool SideIterator::operator ! () const
+{
+   return !SideIterator::operator bool ();
+}
+
+SAMRAI_INLINE_KEYWORD
+void SideIterator::operator ++ (
+   int)
+{
+   d_index(0)++;
+   for (int i = 0; i < d_box.getDim().getValue() - 1; i++) {
+      if (d_index(i) > d_box.upper(i)) {
+         d_index(i) = d_box.lower(i);
+         d_index(i + 1)++;
+      } else {
+         break;
+      }
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+bool SideIterator::operator == (
+   const SideIterator& iter) const
+{
+   return d_index == iter.d_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool SideIterator::operator != (
+   const SideIterator& iter) const
+{
+   return d_index != iter.d_index;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideIterator.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideIterator.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,136 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Iterator for side centered patch data types 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideIterator
+#define included_pdat_SideIterator
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/SideGeometry.h"
+#include "SAMRAI/pdat/SideIndex.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class SideIterator is an iterator that provides methods for
+ * stepping through the index space associated with a side centered box.
+ * The indices are enumerated in column-major (e.g., Fortran) order.
+ * The iterator should be used as follows:
+ * \verbatim
+ * hier::Box box;
+ * ...
+ * for (SideIterator c(box, axis); c; c++) {
+ *    // use index c of the box
+ * }
+ * \endverbatim
+ * Note that the side iterator may not compile to efficient code, depending
+ * on your compiler.  Many compilers are not smart enough to optimize the
+ * looping constructs and indexing operations.
+ *
+ * @see pdat::SideData
+ * @see pdat::SideGeometry
+ * @see pdat::SideIndex
+ */
+
+class SideIterator
+{
+public:
+   /**
+    * Constructor for the side iterator.  The iterator will enumerate
+    * the indices in the argument box.
+    */
+   SideIterator(
+      const hier::Box& box,
+      const int axis);
+
+   /**
+    * Copy constructor for the side iterator
+    */
+   SideIterator(
+      const SideIterator& iterator);
+
+   /**
+    * Assignment operator for the side iterator.
+    */
+   SideIterator&
+   operator = (
+      const SideIterator& iterator);
+
+   /**
+    * Destructor for the side iterator.
+    */
+   ~SideIterator();
+
+   /**
+    * Extract the side index corresponding to the iterator position in the box.
+    */
+   const SideIndex&
+   operator * () const;
+
+   /**
+    * Extract the side index corresponding to the iterator position in the box.
+    */
+   const SideIndex&
+   operator () () const;
+
+   /**
+    * Return true if the iterator points to a valid index within the box.
+    */
+   operator bool () const;
+
+#ifndef LACKS_BOOL_VOID_RESOLUTION
+   /**
+    * Return a non-NULL if the iterator points to a valid index within the box.
+    */
+   operator const void
+   * () const;
+#endif
+
+   /**
+    * Return whether the iterator points to a valid index within the box.
+    * This operator mimics the !p operation applied to a pointer p.
+    */
+   bool
+   operator ! () const;
+
+   /**
+    * Increment the iterator to point to the next index in the box.
+    */
+   void
+   operator ++ (
+      int);
+
+   /**
+    * Test two iterators for equality (same index value).
+    */
+   bool
+   operator == (
+      const SideIterator& iterator) const;
+
+   /**
+    * Test two iterators for inequality (different index values).
+    */
+   bool
+   operator != (
+      const SideIterator& iterator) const;
+
+private:
+   SideIndex d_index;
+   hier::Box d_box;
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/SideIterator.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideOverlap.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideOverlap.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,49 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideOverlap_C
+#define included_pdat_SideOverlap_C
+
+#include "SAMRAI/pdat/SideOverlap.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/SideOverlap.I"
+#endif
+
+namespace SAMRAI {
+namespace pdat {
+
+SideOverlap::SideOverlap(
+   const tbox::Array<hier::BoxList>& boxes,
+   const hier::IntVector& src_offset):
+   d_is_overlap_empty(true),
+   d_offset(src_offset)
+{
+
+   d_dst_boxes.resizeArray(boxes.getSize());
+
+   for (int d = 0; d < src_offset.getDim().getValue(); d++) {
+      d_dst_boxes[d] = boxes[d];
+      if (!d_dst_boxes[d].isEmpty()) d_is_overlap_empty = false;
+   }
+}
+
+SideOverlap::~SideOverlap()
+{
+}
+
+bool SideOverlap::isOverlapEmpty() const
+{
+   return d_is_overlap_empty;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideOverlap.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideOverlap.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,33 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+SAMRAI_INLINE_KEYWORD
+const hier::BoxList&
+SideOverlap::getDestinationBoxList(
+   const int axis) const
+{
+   TBOX_ASSERT((axis >= 0) && (axis < d_dst_boxes.getSize()));
+
+   return d_dst_boxes[axis];
+}
+
+SAMRAI_INLINE_KEYWORD
+const hier::IntVector& SideOverlap::getSourceOffset() const
+{
+   return d_offset;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideOverlap.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideOverlap.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideOverlap
+#define included_pdat_SideOverlap
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/**
+ * Class SideOverlap represents the intersection between two side
+ * centered geometry boxes.  It is a subclass of hier::BoxOverlap and records
+ * the portions of index space that needs to be copied between two objects
+ * with side centered geometry.
+ *
+ * @see hier::BoxOverlap
+ * @see pdat::SideOverlap
+ */
+
+class SideOverlap:public hier::BoxOverlap
+{
+public:
+   /**
+    * The constructor takes the list of boxes and the source offset between
+    * the source and destination index spaces.  This information is used later
+    * in the generation of communication schedules.
+    */
+   explicit SideOverlap(
+      const tbox::Array<hier::BoxList>& boxes,
+      const hier::IntVector& src_offset);
+   /**
+    * The virtual destructor does nothing interesting except deallocate
+    * box data.
+    */
+   virtual ~SideOverlap();
+
+   /**
+    * Return whether there is an empty intersection between the two
+    * side centered boxes.  This method over-rides the virtual function
+    * in the hier::BoxOverlap base class.
+    */
+   virtual bool
+   isOverlapEmpty() const;
+
+   /**
+    * Return the list of boxes (in side centered index space) that
+    * constitute the intersection.  The boxes are given in the
+    * destination coordinate space and must be shifted by
+    * -(getSourceOffset()) to lie in the source index space.  The axis
+    * argument represents which axis is desired: X=0, Y=1, and Z=2.
+    * This method over-rides the virtual function in the
+    * hier::BoxOverlap base class.
+    */
+   virtual const hier::BoxList&
+   getDestinationBoxList(
+      const int axis) const;
+
+   /**
+    * Return the offset between the destination and source index spaces.
+    * The destination index space is the source index space shifted
+    * by this amount.
+    */
+   virtual const hier::IntVector&
+   getSourceOffset() const;
+
+private:
+   bool d_is_overlap_empty;
+   hier::IntVector d_offset;
+   tbox::Array<hier::BoxList> d_dst_boxes;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/SideOverlap.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideVariable.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideVariable.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,112 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideVariable_C
+#define included_pdat_SideVariable_C
+
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/pdat/SideDataFactory.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#define ALL_DIRECTIONS (-1)
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ *************************************************************************
+ *									*
+ * Constructor and destructor for side variable objects			*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+SideVariable<TYPE>::SideVariable(
+   const tbox::Dimension& dim,
+   const std::string& name,
+   int depth,
+   bool fine_boundary_represents_var,
+   int direction):
+   hier::Variable(name,
+                  tbox::Pointer<SAMRAI::hier::PatchDataFactory>(
+                     new SideDataFactory<TYPE>(depth,
+                                               // default zero ghost cells
+                                               hier::IntVector::getZero(dim),
+                                               fine_boundary_represents_var))),
+   d_fine_boundary_represents_var(fine_boundary_represents_var),
+   d_directions(dim)
+{
+   TBOX_ASSERT((direction >= ALL_DIRECTIONS) && (direction < getDim().getValue()));
+
+   d_directions = hier::IntVector::getOne(getDim());
+   if ((direction != ALL_DIRECTIONS)) {
+      // SGS this loop seems stupid, why not just set directions(direction) = 1?
+      for (int id = 0; id < getDim().getValue(); id++) {
+         d_directions(id) = ((direction == id) ? 1 : 0);
+      }
+      const hier::IntVector& zero_vector(hier::IntVector::getZero(getDim()));
+      setPatchDataFactory(tbox::Pointer<SAMRAI::hier::PatchDataFactory>(new
+            SideDataFactory<TYPE>(
+               depth,
+               zero_vector,
+               fine_boundary_represents_var,
+               d_directions)));
+   }
+}
+
+template<class TYPE>
+SideVariable<TYPE>::~SideVariable()
+{
+}
+
+template<class TYPE>
+const hier::IntVector& SideVariable<TYPE>::getDirectionVector() const
+{
+   return d_directions;
+}
+
+template<class TYPE>
+int SideVariable<TYPE>::getDepth() const
+{
+   tbox::Pointer<SideDataFactory<TYPE> > factory = this->getPatchDataFactory();
+   TBOX_ASSERT(factory);
+   return factory->getDepth();
+}
+
+/*
+ *************************************************************************
+ *									*
+ * These are private and should not be used.  They are defined here	*
+ * because some template instantiation methods fail if some member	*
+ * functions are left undefined.						*
+ *									*
+ *************************************************************************
+ */
+
+template<class TYPE>
+SideVariable<TYPE>::SideVariable(
+   const SideVariable<TYPE>& foo):
+   hier::Variable(NULL, tbox::Pointer<SAMRAI::hier::PatchDataFactory>(NULL)),
+   d_directions(hier::IntVector(foo.getDim()))
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void SideVariable<TYPE>::operator = (
+   const SideVariable<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SideVariable.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SideVariable.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,133 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   hier 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideVariable
+#define included_pdat_SideVariable
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/tbox/Complex.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * Class SideVariable<DIM> is a templated variable class used to define
+ * side-centered quantities on an AMR mesh.   It is a subclass of
+ * hier::Variable and is templated on the type of the underlying data
+ * (e.g., double, int, bool, etc.).  See header file for SideData<DIM> class
+ * for a more detailed description of the data layout.
+ *
+ * Note that it is possible to create a side data object for managing
+ * data at cell sides associated with a single coordinate direction only.
+ * See the constructor for more information.
+ *
+ * IMPORTANT: The class FaceVariable<DIM> and associated "face data" classes
+ * define the same storage as this side variable class, except that the
+ * individual array indices are permuted in the face data type.
+ *
+ * @see pdat::SideData
+ * @see pdat::SideDataFactory
+ * @see pdat::SideGeometry
+ * @see hier::Variable
+ */
+
+template<class TYPE>
+class SideVariable:public hier::Variable
+{
+public:
+   /*!
+    * @brief Create an side-centered variable object with the given name and
+    * depth (i.e., number of data values at each edge index location).
+    * A default depth of one is provided.   The fine boundary representation
+    * boolean argument indicates which values (either coarse or fine) take
+    * precedence at coarse-fine mesh boundaries during coarsen and refine
+    * operations.  The default is that fine data values take precedence
+    * on coarse-fine interfaces.
+    *
+    * The default data allocation scheme is that side data will
+    * be allocated for all side normal coordinate directions.  If this is
+    * desired, then the direction argument may be omitted.   If an integer
+    * direction argument is specified, the only data for the given
+    * side normal direction will be maintained and managed for this variable.
+    */
+   explicit SideVariable(
+      const tbox::Dimension& dim,
+      const std::string& name,
+      int depth = 1,
+      bool fine_boundary_represents_var = true,
+      int direction = -1);
+
+   /*!
+    * @brief Virtual destructor for side variable objects.
+    */
+   virtual ~SideVariable<TYPE>();
+
+   /*!
+    * @brief Return constant reference to vector describing which coordinate
+    * directions have data associated with this side variable object.
+    *
+    * A vector entry of zero indicates that there is no data array
+    * allocated for the corresponding coordinate direction for side data
+    * created via this side variable object.  A non-zero value indicates
+    * that a valid data array will be allocated for that coordinate
+    * direction.
+    */
+   const hier::IntVector&
+   getDirectionVector() const;
+
+   /*!
+    * @brief Return boolean indicating which side data values (coarse
+    * or fine) take precedence at coarse-fine mesh interfaces.  The
+    * value is set in the constructor.
+    */
+   bool fineBoundaryRepresentsVariable() const
+   {
+      return d_fine_boundary_represents_var;
+   }
+
+   /*!
+    * @brief Return true indicating that side data on a patch interior
+    * exists on the patch boundary.
+    */
+   bool dataLivesOnPatchBorder() const {
+      return true;
+   }
+
+   /*!
+    * @brief Return the the depth (number of components).
+    */
+   int
+   getDepth() const;
+
+private:
+   bool d_fine_boundary_represents_var;
+   hier::IntVector d_directions;
+
+   SideVariable(
+      const SideVariable<TYPE>&);            // not implemented
+   void
+   operator = (
+      const SideVariable<TYPE>&);               // not implemented
+
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/SideVariable.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SumOperation.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SumOperation.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Sum operation on single array data elements templated on data type 
+ *
+ ************************************************************************/
+
+/*
+ * Need this so includes script will think this is a templated class:
+ * template <class TYPE>
+ */
+
+#ifndef included_pdat_SumOperation_C
+#define included_pdat_SumOperation_C
+
+#include "SAMRAI/pdat/SumOperation.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/pdat/SumOperation.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SumOperation.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SumOperation.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Sum operation on single array data elements templated on data type 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace pdat {
+
+/*
+ * Member functions for SumOperation
+ */
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+SumOperation<TYPE>::SumOperation()
+{
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+SumOperation<TYPE>::~SumOperation()
+{
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void SumOperation<TYPE>::operator () (
+   TYPE& vdst,
+   const TYPE& vsrc) const
+{
+// Disable Intel warning about conversions
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:810)
+#endif
+   vdst += vsrc;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/SumOperation.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/SumOperation.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,65 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Sum operation on single array data elements templated on data type 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SumOperation
+#define included_pdat_SumOperation
+
+#include "SAMRAI/SAMRAI_config.h"
+
+namespace SAMRAI {
+namespace pdat {
+
+/*!
+ * @brief Class SumOperation<TYPE> encapsulates a summation
+ * operation into an object.
+ */
+
+template<class TYPE>
+class SumOperation
+{
+public:
+   /*!
+    * The default constructor does nothing interesting.
+    */
+   SumOperation();
+
+   /*!
+    * The destructor does nothing interesting.
+    */
+   ~SumOperation();
+
+   /*!
+    * The operator adds the source value to the destination.
+    */
+   void
+   operator () (
+      TYPE& vdst,
+      const TYPE& vsrc) const;
+
+private:
+   SumOperation(
+      const SumOperation<TYPE>&);             // not implemented
+   void
+   operator = (
+      const SumOperation<TYPE>&);              // not implemented
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/pdat/SumOperation.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/pdat/SumOperation.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/dox/manual.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/dox/manual.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,45 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace pdat {
+
+/*!
+  @page package_patchdata The Patchdata Package
+
+  The Patchdata package defines concrete patch data types used in 
+  structured AMR applications.  The data type support is divided into
+  eleven subdirectories containing:
+  -# @ref package_patchdata_array "fundamental array-based data type support"
+  -# @ref package_patchdata_boxgeometry "routines to compute box geometry information for data intersections"
+  -# @ref package_patchdata_cell "cell-centered data"
+  -# @ref package_patchdata_edge "edge-centered data"
+  -# @ref package_patchdata_face "face-centered data"
+  -# @ref package_patchdata_node "node-centered data"
+  -# @ref package_patchdata_outeredge "outeredge data"
+  -# @ref package_patchdata_outerface "outerface data"
+  -# @ref package_patchdata_outernode "outernode data"
+  -# @ref package_patchdata_outerside "outerside data"
+  -# @ref package_patchdata_side "side-centered data"
+  -# @ref package_patchdata_index "index data"
+  -# @ref package_patchdata_fortran "macros for indexing arrays in FORTRAN rotuines"
+ 
+  The package also defines a set of coarsen and refine operators that 
+  are independent of the mesh configuration:
+  -# @ref package_patchdata_operators mesh independent operators
+
+  Additionally there is a set of classes that handle data copying of various
+  patch data types between different blocks within a multiblock domain.
+  -# @ref package_patchdata_multiblock multiblock data translators
+
+  All class names in the Patchdata package are in the namespace SAMRAI::pdat.
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/dox/manual_array.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/dox/manual_array.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,26 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace pdat {
+
+/*!
+  @page package_patchdata_array Array-based Patch Data Support
+
+  All array-based patch data types are implemented using a single array 
+  data class.
+  - SAMRAI::pdat::ArrayData
+  - SAMRAI::pdat::ArrayDataIterator
+  - SAMRAI::pdat::ArrayDataOperationUtilities
+  - SAMRAI::pdat::CopyOperation
+  - SAMRAI::pdat::SumOperation
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/dox/manual_boxgeometry.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/dox/manual_boxgeometry.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,37 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace pdat {
+
+/*!
+  @page package_patchdata_boxgeometry Box Geometry Computation
+
+  These classes compute the intersections for various box geometries types,
+  such as cell, face, node, and outerface.  The results of these intersections
+  are used by the communication routines in the generation of communication
+  schedules.
+  - SAMRAI::pdat::CellGeometry
+  - SAMRAI::pdat::CellOverlap
+  - SAMRAI::pdat::EdgeGeometry
+  - SAMRAI::pdat::EdgeOverlap
+  - SAMRAI::pdat::FaceGeometry
+  - SAMRAI::pdat::FaceOverlap
+  - SAMRAI::pdat::NodeGeometry
+  - SAMRAI::pdat::NodeOverlap
+  - SAMRAI::pdat::OuteredgeGeometry
+  - SAMRAI::pdat::OuterfaceGeometry
+  - SAMRAI::pdat::OuternodeGeometry
+  - SAMRAI::pdat::OutersideGeometry
+  - SAMRAI::pdat::SideGeometry
+  - SAMRAI::pdat::SideOverlap
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/dox/manual_cell.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/dox/manual_cell.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,26 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace pdat {
+
+/*!
+  @page package_patchdata_cell Cell Patch Data
+
+  These classes implement a cell centered patch data type.  These are
+  normally used to represent AMR conserved quantities.
+  - SAMRAI::pdat::CellDataFactory
+  - SAMRAI::pdat::CellData
+  - SAMRAI::pdat::CellIndex
+  - SAMRAI::pdat::CellIterator
+  - SAMRAI::pdat::CellVariable
+*/
+
+}
+}
\ No newline at end of file
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/dox/manual_edge.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/dox/manual_edge.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,26 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace pdat {
+
+/*!
+  @page package_patchdata_edge Edge Patch Data
+
+  These classes implement a edge centered patch data type.  These are
+  normally used to represent circulation along a cell edge.
+  - SAMRAI::pdat::EdgeDataFactory
+  - SAMRAI::pdat::EdgeData
+  - SAMRAI::pdat::EdgeIndex
+  - SAMRAI::pdat::EdgeIterator
+  - SAMRAI::pdat::EdgeVariable
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/dox/manual_face.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/dox/manual_face.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,26 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace pdat {
+
+/*!
+  @page package_patchdata_face Face Patch Data
+
+  These classes implement a face centered patch data type.  These are
+  normally used to represent flux data between patches.
+  - SAMRAI::pdat::FaceDataFactory
+  - SAMRAI::pdat::FaceData
+  - SAMRAI::pdat::FaceIndex
+  - SAMRAI::pdat::FaceIterator
+  - SAMRAI::pdat::FaceVariable
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/dox/manual_fortran.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/dox/manual_fortran.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,21 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace pdat {
+/*!
+  @page package_patchdata_fortran Support for Patch Data Numerical Routines in FORTRAN 
+
+  Macros and basic debugging support to facilitate the interaction of 
+  SAMRAI data management (in C++) with FORTRAN numerical routines 
+  are located in the directory <TT>SAMRAI/source/patchdata/fortran</TT>.
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/dox/manual_index.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/dox/manual_index.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,23 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace pdat {
+/*!
+  @page package_patchdata_index Index Patch Data
+
+  These classes provide functionality for managing patch data over an
+  irregular set of cell-centered index locations.  
+  - SAMRAI::pdat::IndexDataFactory
+  - SAMRAI::pdat::IndexData
+  - SAMRAI::pdat::IndexVariable
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/dox/manual_multiblock.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/dox/manual_multiblock.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,30 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace pdat {
+
+/*!
+  @page package_patchdata_multiblock Multiblock Patch Data Operations
+
+  These classes handle the copying of data between different blocks in a
+  multiblock domain.  Each block has its own index space, so patches must
+  be rotated and shifted to create a mapping from one index space to the other.
+  - SAMRAI::pdat::MBDataUtilities
+  - SAMRAI::pdat::MultiblockCellDataTranslator 
+  - SAMRAI::pdat::MultiblockEdgeDataTranslator 
+  - SAMRAI::pdat::MultiblockFaceDataTranslator 
+  - SAMRAI::pdat::MultiblockNodeDataTranslator 
+  - SAMRAI::pdat::MultiblockSideDataTranslator 
+
+
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/dox/manual_node.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/dox/manual_node.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace pdat {
+
+/*!
+  @page package_patchdata_node Node Patch Data
+
+  These classes implement a node centered patch data type.
+  - SAMRAI::pdat::NodeDataFactory
+  - SAMRAI::pdat::NodeData
+  - SAMRAI::pdat::NodeIndex
+  - SAMRAI::pdat::NodeIterator
+  - SAMRAI::pdat::NodeVariable
+*/
+
+}
+}
\ No newline at end of file
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/dox/manual_operators.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/dox/manual_operators.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace pdat {
+
+/*!
+   @page package_patchdata_operators Mesh-Independent operators
+
+   Constant spatial refinement and time interpolation operators typically 
+   depend only on the datatype and not the mesh coordinate system.
+   The operators described here are for cell-centered data only (for brevity) 
+   but the descriptions apply to edge, face, node, side, outerface, and outerside
+   datatype operators as well.  The string identifiers can be used with the operator
+   look up mechanism provided by the xfer_GeometryX class.
+
+   <ul>
+   <li> Time refinement operators:
+      <ul>
+      <li> Cell-Centered patch data:
+        <ul>
+        <li> Time interpolated linear coarsen op for complex, double,
+             and float data.
+             String identifier is "STD_LINEAR_TIME_INTERPOLATE".
+        </ul>
+      <li> Edge-Centered patch data:
+        <ul>
+        <li> Time interpolated linear coarsen op for complex, double,
+             and float data.
+             String identifier is "STD_LINEAR_TIME_INTERPOLATE".
+        </ul>
+      <li> Face-Centered patch data:
+        <ul>
+        <li> Time interpolated linear coarsen op for complex, double,
+             and float data.
+             String identifier is "STD_LINEAR_TIME_INTERPOLATE".
+        </ul>
+      <li> Node-Centered patch data:
+        <ul>
+        <li> Constant averaging (i.e., injection) for complex, double,
+             float, integer data.
+             String identifier is "CONSTANT_COARSEN".
+        <li> Time interpolated linear coarsen op for complex, double,
+             and float data.
+             String identifier is "STD_LINEAR_TIME_INTERPOLATE".
+        </ul>
+      <li> Outerface patch data:
+        <ul>
+        <li> Time interpolated linear coarsen op for complex, double,
+             and float data.
+             String identifier is "STD_LINEAR_TIME_INTERPOLATE".
+        </ul>
+      <li> Outernode-Centered patch data:
+        <ul>
+        <li> Constant averaging (i.e., injection) for complex, double,
+             float, integer data.
+             String identifier is "CONSTANT_COARSEN".
+        </ul>
+      <li> Outerside patch data:
+        <ul>
+        <li> Time interpolated linear coarsen op for complex, double,
+             and float data.
+             String identifier is "STD_LINEAR_TIME_INTERPOLATE".
+        </ul>
+      <li> Side-centered patch data:
+        <ul>
+        <li> Time interpolated linear coarsen op for complex, double,
+             and float data.
+             String identifier is "STD_LINEAR_TIME_INTERPOLATE".
+        </ul>
+      </ul>
+   <li> Refine operators:
+      <ul>
+      <li> Cell-Centered patch data:
+        <ul>
+        <li> Constant refine op for complex, double, float, and int data.
+             String identifier is "CONSTANT_REFINE".
+        </ul>
+      <li> Edge-Centered patch data:
+        <ul>
+        <li> Constant refine op for complex, double, float, and int data.
+             String identifier is "CONSTANT_REFINE".
+        </ul>
+      <li> Face-Centered patch data:
+        <ul>
+        <li> Constant refine op for complex, double, float, and int data.
+             String identifier is "CONSTANT_REFINE".
+        </ul>
+      <li> Outerface patch data:
+        <ul>
+        <li> Constant refine op for complex, double, float, and int data.
+             String identifier is "CONSTANT_REFINE".
+        </ul>
+      <li> Side-Centered patch data:
+        <ul>
+        <li> Constant refine op for complex, double, float, and int data.
+             String identifier is "CONSTANT_REFINE".
+        </ul>
+      </ul>
+   </ul>
+
+   - @ref package_patchdata_operators_constant_cell
+   - @ref package_patchdata_operators_time_interpolate_cell
+   - @ref package_patchdata_operators_constant_outernode
+
+   For information on the options to use user-defined operators for
+   coarsening, refining, and time interpolation, or the option to use
+   no such operators, see @ref package_transfer_operators.
+
+   For information on use of Cartesian mesh dependent operators, see
+   @ref package_geometry_cartesian.
+*/
+
+}
+}
\ No newline at end of file
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/dox/manual_operators_constant_cell.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/dox/manual_operators_constant_cell.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,22 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace pdat {
+/*!
+  @page package_patchdata_operators_constant_cell Cell Data Constant Operators
+
+  Constant refine operators are provided for all standard cell-centered
+  patch data types.   Here, we only describe the constant operator
+  for data of type double.  All others are similar.
+  - SAMRAI::pdat::CellDoubleConstantRefine
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/dox/manual_operators_constant_fortran.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/dox/manual_operators_constant_fortran.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,23 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace pdat {
+/*!
+  @page package_patchdata_generic_ops_constant_fortran Constant Transfer Operator Numerical Routines
+
+  The routines that perform constant spatial refining/coarsening on
+  standard patch data types are located in the directory
+  <TT>SAMRAI/source/patchdata/generic_ops/constant/fortran</TT>.
+  These routines are written in FORTRAN 77 and are invoked from the
+  appropriate operator classes.
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/dox/manual_operators_constant_outernode.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/dox/manual_operators_constant_outernode.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,23 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace pdat {
+
+/*!
+  @page package_patchdata_operators_constant_outernode Outernode Data Constant Operators
+
+  Constant coarsen operators are provided for all standard outernode-centered
+  patch data types.   Here, we only describe the constant operator
+  for data of type double.  All others are similar.
+  - SAMRAI::pdat::OuternodeDoubleConstantCoarsen
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/dox/manual_operators_time_interpolate.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/dox/manual_operators_time_interpolate.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,48 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace pdat {
+
+/*!
+  @page package_patchdata_operators_time_interpolate Time Interpolation Operators
+
+  Standard time interpolation operators are provided here for each of the
+  SAMRAI array-based patch data types.  These operators interpolate linearly
+  in time between two patch data objects to another patch data object
+  whose data corresponds to an intermediate time between the times associated
+  with the two sources.  Typically, time interpolation is required to fill 
+  ghost cell data around patches from data on a coarser level.  During the 
+  course of integrating a time-dependent problem over an AMR mesh hierarchy, 
+  the times associated with data on successive levels may be different. 
+  Each operator defined for a data centering (e.g., cell, face, node)
+  and data type (e.g., double, float, complex) is implemented in a separate
+  class.  Each concrete operator class is derived from the abstract operator
+  base class in the <EM>transfer</EM> package.  The actual time interpolation
+  numerical routines are implemented in FORTRAN.
+
+  In the interest of brevity, we include header file documentation for
+  a single time interpolation operator.  This operator is representative of 
+  the interface for every other time interpolation operator class in the 
+  patchdata package. For reference, we note that linear time interpolation 
+  operators are provided for cell-centered, face-centered, edge-centered,
+  node-centered, side-centered, outerface, and outerside patch data types 
+  where the data may be complex, double, or float.
+  All operators have the string identifier "STD_LINEAR_TIME_INTERPOLATE".
+  The purpose of the name string is to distinguish these operators from others
+  that may be added in the future.  The string need not be specified to look
+  up time interpolation operators at this time.  It is important to note that 
+  new time interpolation operators may be added at any time without 
+  re-compilation of the patchdata package or SAMRAI library code.
+  - @ref package_patchdata_operators_time_interpolate_cell
+  - @ref package_patchdata_operators_time_interpolate_fortran
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/dox/manual_operators_time_interpolate_cell.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/dox/manual_operators_time_interpolate_cell.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,20 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace pdat {
+
+/*!
+  @page package_patchdata_operators_time_interpolate_cell Time Interpolation Operators for Cell Data
+
+  - SAMRAI::pdat::CellFloatLinearTimeInterpolateOp
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/dox/manual_operators_time_interpolate_fortran.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/dox/manual_operators_time_interpolate_fortran.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,24 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace pdat {
+
+/*!
+  @page package_patchdata_operators_time_interpolate_fortran Time Interpolation Numerical Routines 
+
+  The routines that perform time interpolation on standard patch data types 
+  are located in the directory 
+  @c SAMRAI/source/patchdata/time_interpolate/fortran.  
+  The numerical routines are written in FORTRAN and are called from the 
+  appropriate operator classes.  
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/dox/manual_outeredge.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/dox/manual_outeredge.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,22 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+
+/*!
+  @page package_patchdata_outeredge Outeredge Patch Data
+
+  These classes implement a node centered patch data type; however, the
+  domain is restricted to the boundary of each patch.
+  - SAMRAI::pdat::OuteredgeDataFactory
+  - SAMRAI::pdat::OuteredgeData
+  - SAMRAI::pdat::OuteredgeVariable
+*/
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/dox/manual_outerface.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/dox/manual_outerface.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace pdat {
+
+/*!
+  @page package_patchdata_outerface Outerface Patch Data
+
+  These classes implement a face centered patch data type; however, the 
+  domain is restricted to the faces on the boundary of each patch.  These 
+  are normally used to represent flux data on patch boundaries.
+  - SAMRAI::pdat::OuterfaceDataFactory
+  - SAMRAI::pdat::OuterfaceData
+  - SAMRAI::pdat::OuterfaceVariable
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/dox/manual_outernode.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/dox/manual_outernode.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,23 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace pdat {
+/*!
+  @page package_patchdata_outernode Outernode Patch Data
+
+  These classes implement a node centered patch data type; however, the
+  domain is restricted to the boundary of each patch.
+  - SAMRAI::pdat::OuternodeDataFactory
+  - SAMRAI::pdat::OuternodeData
+  - SAMRAI::pdat::OuternodeVariable
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/dox/manual_outerside.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/dox/manual_outerside.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace pdat {
+
+/*!
+  @page package_patchdata_outerside Outerside Patch Data
+
+  These classes implement an side centered patch data type; however, the
+  domain is restricted to the boundary of each patch.  These are normally 
+  used to represent flux data on the boundaries of patches.
+  - SAMRAI::pdat::OutersideDataFactory
+  - SAMRAI::pdat::OutersideData
+  - SAMRAI::pdat::OutersideVariable
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/dox/manual_side.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/dox/manual_side.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,26 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace pdat {
+
+/*!
+  @page package_patchdata_side Side Patch Data
+
+  These classes implement a side centered patch data type.  These are
+  normally used to represent flux data between patches.
+  - SAMRAI::pdat::SideDataFactory
+  - SAMRAI::pdat::SideData
+  - SAMRAI::pdat::SideIndex
+  - SAMRAI::pdat::SideIterator
+  - SAMRAI::pdat::SideVariable
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,146 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=pdat_concoarsen1d.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h pdat_concoarsen1d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=pdat_concoarsen2d.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h pdat_concoarsen2d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=pdat_concoarsen3d.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h pdat_concoarsen3d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=pdat_conrefine1d.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h pdat_conrefine1d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
+FILE_4=pdat_conrefine2d.o
+DEPENDS_4:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h pdat_conrefine2d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_4 +=\
+	
+endif
+
+${FILE_4:X.o=${NDIM}.o}: ${DEPENDS_4}
+
+FILE_5=pdat_conrefine3d.o
+DEPENDS_5:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h pdat_conrefine3d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_5 +=\
+	
+endif
+
+${FILE_5:X.o=${NDIM}.o}: ${DEPENDS_5}
+
+FILE_6=pdat_dbugfort1d.o
+DEPENDS_6:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h pdat_dbugfort1d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_6 +=\
+	
+endif
+
+${FILE_6:X.o=${NDIM}.o}: ${DEPENDS_6}
+
+FILE_7=pdat_dbugfort2d.o
+DEPENDS_7:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h pdat_dbugfort2d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_7 +=\
+	
+endif
+
+${FILE_7:X.o=${NDIM}.o}: ${DEPENDS_7}
+
+FILE_8=pdat_dbugfort3d.o
+DEPENDS_8:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h pdat_dbugfort3d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_8 +=\
+	
+endif
+
+${FILE_8:X.o=${NDIM}.o}: ${DEPENDS_8}
+
+FILE_9=pdat_lintimint1d.o
+DEPENDS_9:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h pdat_lintimint1d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_9 +=\
+	
+endif
+
+${FILE_9:X.o=${NDIM}.o}: ${DEPENDS_9}
+
+FILE_10=pdat_lintimint2d.o
+DEPENDS_10:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h pdat_lintimint2d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_10 +=\
+	
+endif
+
+${FILE_10:X.o=${NDIM}.o}: ${DEPENDS_10}
+
+FILE_11=pdat_lintimint3d.o
+DEPENDS_11:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h pdat_lintimint3d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_11 +=\
+	
+endif
+
+${FILE_11:X.o=${NDIM}.o}: ${DEPENDS_11}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,33 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for fortran files for pdat directory 
+##
+#########################################################################
+
+SAMRAI	      =	@top_srcdir@
+SRCDIR	      =	@srcdir@
+SUBDIR        = source/SAMRAI/pdat/fortran
+VPATH	      =	@srcdir@
+OBJECT        = ../../../..
+
+# For classes that are non-dimensional.
+OBJS= 	 pdat_dbugfort1d.o pdat_dbugfort2d.o pdat_dbugfort3d.o\
+	pdat_concoarsen1d.o pdat_concoarsen3d.o pdat_conrefine2d.o\
+	pdat_concoarsen2d.o pdat_conrefine1d.o pdat_conrefine3d.o\
+	pdat_lintimint1d.o pdat_lintimint2d.o pdat_lintimint3d.o\
+
+
+default: library
+
+include $(OBJECT)/config/Makefile.config
+
+library:	$(OBJS)
+
+clean:
+	$(SAMCLEAN)
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_concoarsen1d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_concoarsen1d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,298 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_concoarsen1d.m4 $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for spatial coarsening of 1d patch data
+c               on a regular Cartesian mesh.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4concoarsenops1d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 1d constant coarsen operators
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim1d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 1d arrays in FORTRAN routines.
+c
+c
+c
+c
+c
+
+c
+
+c
+c***********************************************************************
+c Constant coarsening for 1d node-centered double data
+c***********************************************************************
+c
+      subroutine conavgnodedoub1d(
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:1-1)
+      double precision
+     &  arrayf(filo0:fihi0+1),
+     &  arrayc(cilo0:cihi0+1)
+      integer ie0
+c
+c***********************************************************************
+c
+      do ie0=ifirstc0,ilastc0+1
+         arrayc(ie0)=arrayf(ie0*ratio(0))
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant coarsening for 1d node-centered float data 
+c***********************************************************************
+c
+      subroutine conavgnodeflot1d(
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:1-1)
+      real
+     &  arrayf(filo0:fihi0+1),
+     &  arrayc(cilo0:cihi0+1)
+      integer ie0
+c
+c***********************************************************************
+c
+      do ie0=ifirstc0,ilastc0+1
+         arrayc(ie0)=arrayf(ie0*ratio(0))
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant coarsening for 1d node-centered complex data
+c***********************************************************************
+c
+      subroutine conavgnodecplx1d(
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:1-1)
+      double complex
+     &  arrayf(filo0:fihi0+1),
+     &  arrayc(cilo0:cihi0+1)
+      integer ie0
+c
+c***********************************************************************
+c
+      do ie0=ifirstc0,ilastc0+1
+         arrayc(ie0)=arrayf(ie0*ratio(0))
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant coarsening for 1d node-centered integer data
+c***********************************************************************
+c
+      subroutine conavgnodeintg1d(
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:1-1)
+      integer
+     &  arrayf(filo0:fihi0+1),
+     &  arrayc(cilo0:cihi0+1)
+      integer ie0
+c
+c***********************************************************************
+c
+      do ie0=ifirstc0,ilastc0+1
+         arrayc(ie0)=arrayf(ie0*ratio(0))
+      enddo
+c
+      return
+      end
+c
+
+c***********************************************************************
+c Constant coarsening for 1d outernode-centered double data
+c***********************************************************************
+c
+      subroutine conavgouternodedoub1d(
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:1-1)
+      double precision
+     &  arrayf(1),
+     &  arrayc(1)
+c
+c***********************************************************************
+c
+      arrayc(1)=arrayf(1)
+
+      return
+      end
+
+c***********************************************************************
+c Constant coarsening for 1d outernode-centered float data
+c***********************************************************************
+c
+      subroutine conavgouternodeflot1d0(
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:1-1)
+      real
+     &  arrayf(1),
+     &  arrayc(1)
+c
+c***********************************************************************
+c
+      arrayc(1)=arrayf(1)
+
+      return
+      end
+
+c
+c***********************************************************************
+c Constant coarsening for 1d outernode-centered complex data
+c***********************************************************************
+c
+      subroutine conavgouternodecplx1d0(
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:1-1)
+      complex
+     &  arrayf(1),
+     &  arrayc(1)
+c
+c***********************************************************************
+c
+      arrayc(1)=arrayf(1)
+
+      return
+      end
+
+c
+c***********************************************************************
+c Constant coarsening for 1d outernode-centered integer data
+c***********************************************************************
+c
+      subroutine conavgouternodeint1d0(
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:1-1)
+      integer
+     &  arrayf(1),
+     &  arrayc(1)
+c
+c***********************************************************************
+c
+      arrayc(1)=arrayf(1)
+
+      return
+      end
+
+
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_concoarsen1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_concoarsen1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,72 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_concoarsen1d.m4 $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for spatial coarsening of 1d patch data
+c               on a regular Cartesian mesh.
+c
+include(pdat_m4concoarsenops1d.i)dnl
+c
+c***********************************************************************
+c Constant coarsening for 1d node-centered double data
+c***********************************************************************
+c
+      subroutine conavgnodedoub1d(
+conavg_op_node_1d(`double precision')dnl
+c
+c***********************************************************************
+c Constant coarsening for 1d node-centered float data 
+c***********************************************************************
+c
+      subroutine conavgnodeflot1d(
+conavg_op_node_1d(`real')dnl
+c
+c***********************************************************************
+c Constant coarsening for 1d node-centered complex data
+c***********************************************************************
+c
+      subroutine conavgnodecplx1d(
+conavg_op_node_1d(`double complex')dnl
+c
+c***********************************************************************
+c Constant coarsening for 1d node-centered integer data
+c***********************************************************************
+c
+      subroutine conavgnodeintg1d(
+conavg_op_node_1d(`integer')dnl
+c
+
+c***********************************************************************
+c Constant coarsening for 1d outernode-centered double data
+c***********************************************************************
+c
+      subroutine conavgouternodedoub1d(
+conavg_op_outernode_1d(`double precision')dnl
+
+c***********************************************************************
+c Constant coarsening for 1d outernode-centered float data
+c***********************************************************************
+c
+      subroutine conavgouternodeflot1d0(
+conavg_op_outernode_1d(`real')dnl
+
+c
+c***********************************************************************
+c Constant coarsening for 1d outernode-centered complex data
+c***********************************************************************
+c
+      subroutine conavgouternodecplx1d0(
+conavg_op_outernode_1d(`complex')dnl
+
+c
+c***********************************************************************
+c Constant coarsening for 1d outernode-centered integer data
+c***********************************************************************
+c
+      subroutine conavgouternodeint1d0(
+conavg_op_outernode_1d(`integer')dnl
+
+
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_concoarsen2d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_concoarsen2d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,458 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_concoarsen2d.m4 $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for spatial coarsening of 2d patch data
+c               on a regular Cartesian mesh.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4concoarsenops2d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 2d Cartesian coarsen operators
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim2d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 2d arrays in FORTRAN routines.
+c
+c
+c
+c
+c
+
+
+c
+c***********************************************************************
+c Constant coarsening for 2d node-centered double data
+c***********************************************************************
+c
+      subroutine conavgnodedoub2d(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1)
+      integer ie0,ie1,if1
+c
+c***********************************************************************
+c
+      do ie1=ifirstc1,ilastc1+1
+         if1=ie1*ratio(1)
+         do ie0=ifirstc0,ilastc0+1
+            arrayc(ie0,ie1)=arrayf(ie0*ratio(0),if1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant coarsening for 2d node-centered float data 
+c***********************************************************************
+c
+      subroutine conavgnodeflot2d(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      real
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1)
+      integer ie0,ie1,if1
+c
+c***********************************************************************
+c
+      do ie1=ifirstc1,ilastc1+1
+         if1=ie1*ratio(1)
+         do ie0=ifirstc0,ilastc0+1
+            arrayc(ie0,ie1)=arrayf(ie0*ratio(0),if1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant coarsening for 2d node-centered complex data
+c***********************************************************************
+c
+      subroutine conavgnodecplx2d(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double complex
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1)
+      integer ie0,ie1,if1
+c
+c***********************************************************************
+c
+      do ie1=ifirstc1,ilastc1+1
+         if1=ie1*ratio(1)
+         do ie0=ifirstc0,ilastc0+1
+            arrayc(ie0,ie1)=arrayf(ie0*ratio(0),if1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant coarsening for 2d node-centered integer data
+c***********************************************************************
+c
+      subroutine conavgnodeintg2d(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      integer
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1)
+      integer ie0,ie1,if1
+c
+c***********************************************************************
+c
+      do ie1=ifirstc1,ilastc1+1
+         if1=ie1*ratio(1)
+         do ie0=ifirstc0,ilastc0+1
+            arrayc(ie0,ie1)=arrayf(ie0*ratio(0),if1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c
+
+c***********************************************************************
+c Constant coarsening for 2d outernode-centered double data
+c***********************************************************************
+c
+      subroutine conavgouternodedoub2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  arrayf(filo1+1:fihi1),
+     &  arrayc(cilo1+1:cihi1)
+      integer ic1,if1
+c
+c***********************************************************************
+c
+      do ic1=ifirstc1+1,ilastc1
+         if1=ic1*ratio(1)
+         arrayc(ic1)=arrayf(if1)
+      enddo
+
+      return
+      end
+
+      subroutine conavgouternodedoub2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  arrayf(filo0:fihi0+1),
+     &  arrayc(cilo0:cihi0+1)
+      integer ic0,if0
+c
+c***********************************************************************
+c
+      do ic0=ifirstc0,ilastc0+1
+         if0=ic0*ratio(0)
+         arrayc(ic0)=arrayf(if0)
+      enddo
+
+      return
+      end
+
+c***********************************************************************
+c Constant coarsening for 2d outernode-centered float data
+c***********************************************************************
+c
+      subroutine conavgouternodeflot2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      real
+     &  arrayf(filo1+1:fihi1),
+     &  arrayc(cilo1+1:cihi1)
+      integer ic1,if1
+c
+c***********************************************************************
+c
+      do ic1=ifirstc1+1,ilastc1
+         if1=ic1*ratio(1)
+         arrayc(ic1)=arrayf(if1)
+      enddo
+
+      return
+      end
+
+      subroutine conavgouternodeflot2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      real
+     &  arrayf(filo0:fihi0+1),
+     &  arrayc(cilo0:cihi0+1)
+      integer ic0,if0
+c
+c***********************************************************************
+c
+      do ic0=ifirstc0,ilastc0+1
+         if0=ic0*ratio(0)
+         arrayc(ic0)=arrayf(if0)
+      enddo
+
+      return
+      end
+
+c
+c***********************************************************************
+c Constant coarsening for 2d outernode-centered complex data
+c***********************************************************************
+c
+      subroutine conavgouternodecplx2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      complex
+     &  arrayf(filo1+1:fihi1),
+     &  arrayc(cilo1+1:cihi1)
+      integer ic1,if1
+c
+c***********************************************************************
+c
+      do ic1=ifirstc1+1,ilastc1
+         if1=ic1*ratio(1)
+         arrayc(ic1)=arrayf(if1)
+      enddo
+
+      return
+      end
+
+      subroutine conavgouternodecplx2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      complex
+     &  arrayf(filo0:fihi0+1),
+     &  arrayc(cilo0:cihi0+1)
+      integer ic0,if0
+c
+c***********************************************************************
+c
+      do ic0=ifirstc0,ilastc0+1
+         if0=ic0*ratio(0)
+         arrayc(ic0)=arrayf(if0)
+      enddo
+
+      return
+      end
+
+c
+c***********************************************************************
+c Constant coarsening for 2d outernode-centered integer data
+c***********************************************************************
+c
+      subroutine conavgouternodeint2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      integer
+     &  arrayf(filo1+1:fihi1),
+     &  arrayc(cilo1+1:cihi1)
+      integer ic1,if1
+c
+c***********************************************************************
+c
+      do ic1=ifirstc1+1,ilastc1
+         if1=ic1*ratio(1)
+         arrayc(ic1)=arrayf(if1)
+      enddo
+
+      return
+      end
+
+      subroutine conavgouternodeint2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      integer
+     &  arrayf(filo0:fihi0+1),
+     &  arrayc(cilo0:cihi0+1)
+      integer ic0,if0
+c
+c***********************************************************************
+c
+      do ic0=ifirstc0,ilastc0+1
+         if0=ic0*ratio(0)
+         arrayc(ic0)=arrayf(if0)
+      enddo
+
+      return
+      end
+
+c
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_concoarsen2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_concoarsen2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,85 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_concoarsen2d.m4 $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for spatial coarsening of 2d patch data
+c               on a regular Cartesian mesh.
+c
+include(pdat_m4concoarsenops2d.i)dnl
+c
+c***********************************************************************
+c Constant coarsening for 2d node-centered double data
+c***********************************************************************
+c
+      subroutine conavgnodedoub2d(
+conavg_op_node_2d(`double precision')dnl
+c
+c***********************************************************************
+c Constant coarsening for 2d node-centered float data 
+c***********************************************************************
+c
+      subroutine conavgnodeflot2d(
+conavg_op_node_2d(`real')dnl
+c
+c***********************************************************************
+c Constant coarsening for 2d node-centered complex data
+c***********************************************************************
+c
+      subroutine conavgnodecplx2d(
+conavg_op_node_2d(`double complex')dnl
+c
+c***********************************************************************
+c Constant coarsening for 2d node-centered integer data
+c***********************************************************************
+c
+      subroutine conavgnodeintg2d(
+conavg_op_node_2d(`integer')dnl
+c
+c
+
+c***********************************************************************
+c Constant coarsening for 2d outernode-centered double data
+c***********************************************************************
+c
+      subroutine conavgouternodedoub2d0(
+conavg_op_outernode_2d0(`double precision')dnl
+
+      subroutine conavgouternodedoub2d1(
+conavg_op_outernode_2d1(`double precision')dnl
+
+c***********************************************************************
+c Constant coarsening for 2d outernode-centered float data
+c***********************************************************************
+c
+      subroutine conavgouternodeflot2d0(
+conavg_op_outernode_2d0(`real')dnl
+
+      subroutine conavgouternodeflot2d1(
+conavg_op_outernode_2d1(`real')dnl
+
+c
+c***********************************************************************
+c Constant coarsening for 2d outernode-centered complex data
+c***********************************************************************
+c
+      subroutine conavgouternodecplx2d0(
+conavg_op_outernode_2d0(`complex')dnl
+
+      subroutine conavgouternodecplx2d1(
+conavg_op_outernode_2d1(`complex')dnl
+
+c
+c***********************************************************************
+c Constant coarsening for 2d outernode-centered integer data
+c***********************************************************************
+c
+      subroutine conavgouternodeint2d0(
+conavg_op_outernode_2d0(`integer')dnl
+
+      subroutine conavgouternodeint2d1(
+conavg_op_outernode_2d1(`integer')dnl
+
+c
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_concoarsen3d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_concoarsen3d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,662 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_concoarsen3d.m4 $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for spatial coarsening of 3d patch data
+c               on a regular Cartesian mesh.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4concoarsenops3d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 3d Cartesian coarsen operators
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim3d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 3d arrays in FORTRAN routines.
+c
+c
+c
+
+c
+
+
+c
+c***********************************************************************
+c Constant coarsening for 3d node-centered double data
+c***********************************************************************
+c
+      subroutine conavgnodedoub3d(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2+1),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2+1)
+      integer ie0,ie1,ie2,if1,if2
+c
+c***********************************************************************
+c
+      do ie2=ifirstc2,ilastc2+1
+         if2=ie2*ratio(2)
+         do ie1=ifirstc1,ilastc1+1
+            if1=ie1*ratio(1)
+            do ie0=ifirstc0,ilastc0+1
+               arrayc(ie0,ie1,ie2)=arrayf(ie0*ratio(0),if1,if2)
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant coarsening for 3d node-centered float data 
+c***********************************************************************
+c
+      subroutine conavgnodeflot3d(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      real
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2+1),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2+1)
+      integer ie0,ie1,ie2,if1,if2
+c
+c***********************************************************************
+c
+      do ie2=ifirstc2,ilastc2+1
+         if2=ie2*ratio(2)
+         do ie1=ifirstc1,ilastc1+1
+            if1=ie1*ratio(1)
+            do ie0=ifirstc0,ilastc0+1
+               arrayc(ie0,ie1,ie2)=arrayf(ie0*ratio(0),if1,if2)
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant coarsening for 3d node-centered complex data
+c***********************************************************************
+c
+      subroutine conavgnodecplx3d(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double complex
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2+1),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2+1)
+      integer ie0,ie1,ie2,if1,if2
+c
+c***********************************************************************
+c
+      do ie2=ifirstc2,ilastc2+1
+         if2=ie2*ratio(2)
+         do ie1=ifirstc1,ilastc1+1
+            if1=ie1*ratio(1)
+            do ie0=ifirstc0,ilastc0+1
+               arrayc(ie0,ie1,ie2)=arrayf(ie0*ratio(0),if1,if2)
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant coarsening for 3d node-centered integer data
+c***********************************************************************
+c
+      subroutine conavgnodeintg3d(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      integer
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2+1),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2+1)
+      integer ie0,ie1,ie2,if1,if2
+c
+c***********************************************************************
+c
+      do ie2=ifirstc2,ilastc2+1
+         if2=ie2*ratio(2)
+         do ie1=ifirstc1,ilastc1+1
+            if1=ie1*ratio(1)
+            do ie0=ifirstc0,ilastc0+1
+               arrayc(ie0,ie1,ie2)=arrayf(ie0*ratio(0),if1,if2)
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+
+c***********************************************************************
+c Constant coarsening for 3d outernode-centered double data
+c***********************************************************************
+c
+      subroutine conavgouternodedoub3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  arrayf(filo1+1:fihi1,
+     &          filo2+1:fihi2),
+     &  arrayc(cilo1+1:cihi1,
+     &          cilo2+1:cihi2)
+      integer ic1,ic2,if1,if2
+c
+c***********************************************************************
+c
+      do ic2=ifirstc2+1,ilastc2
+         if2=ic2*ratio(2)
+         do ic1=ifirstc1+1,ilastc1
+            if1=ic1*ratio(1)
+            arrayc(ic1,ic2)=arrayf(if1,if2)
+         enddo
+      enddo
+
+      return
+      end
+
+      subroutine conavgouternodedoub3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  arrayf(filo0:fihi0+1,
+     &          filo2+1:fihi2),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo2+1:cihi2)
+      integer ic0,ic2,if0,if2
+c
+c***********************************************************************
+c
+      do ic2=ifirstc2+1,ilastc2
+         if2=ic2*ratio(2)
+         do ic0=ifirstc0,ilastc0+1
+            if0=ic0*ratio(0)
+            arrayc(ic0,ic2)=arrayf(if0,if2)
+         enddo
+      enddo
+
+      return
+      end
+
+      subroutine conavgouternodedoub3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      double precision
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do ic1=ifirstc1,ilastc1+1
+         if1=ic1*ratio(1)
+         do ic0=ifirstc0,ilastc0+1
+            if0=ic0*ratio(0)
+            arrayc(ic0,ic1)=arrayf(if0,if1)
+         enddo
+      enddo
+
+      return
+      end
+
+c***********************************************************************
+c Constant coarsening for 3d outernode-centered float data
+c***********************************************************************
+c
+      subroutine conavgouternodeflot3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      real
+     &  arrayf(filo1+1:fihi1,
+     &          filo2+1:fihi2),
+     &  arrayc(cilo1+1:cihi1,
+     &          cilo2+1:cihi2)
+      integer ic1,ic2,if1,if2
+c
+c***********************************************************************
+c
+      do ic2=ifirstc2+1,ilastc2
+         if2=ic2*ratio(2)
+         do ic1=ifirstc1+1,ilastc1
+            if1=ic1*ratio(1)
+            arrayc(ic1,ic2)=arrayf(if1,if2)
+         enddo
+      enddo
+
+      return
+      end
+
+      subroutine conavgouternodeflot3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      real
+     &  arrayf(filo0:fihi0+1,
+     &          filo2+1:fihi2),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo2+1:cihi2)
+      integer ic0,ic2,if0,if2
+c
+c***********************************************************************
+c
+      do ic2=ifirstc2+1,ilastc2
+         if2=ic2*ratio(2)
+         do ic0=ifirstc0,ilastc0+1
+            if0=ic0*ratio(0)
+            arrayc(ic0,ic2)=arrayf(if0,if2)
+         enddo
+      enddo
+
+      return
+      end
+
+      subroutine conavgouternodeflot3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      real
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do ic1=ifirstc1,ilastc1+1
+         if1=ic1*ratio(1)
+         do ic0=ifirstc0,ilastc0+1
+            if0=ic0*ratio(0)
+            arrayc(ic0,ic1)=arrayf(if0,if1)
+         enddo
+      enddo
+
+      return
+      end
+
+c
+c***********************************************************************
+c Constant coarsening for 3d outernode-centered complex data
+c***********************************************************************
+c
+      subroutine conavgouternodecplx3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      complex
+     &  arrayf(filo1+1:fihi1,
+     &          filo2+1:fihi2),
+     &  arrayc(cilo1+1:cihi1,
+     &          cilo2+1:cihi2)
+      integer ic1,ic2,if1,if2
+c
+c***********************************************************************
+c
+      do ic2=ifirstc2+1,ilastc2
+         if2=ic2*ratio(2)
+         do ic1=ifirstc1+1,ilastc1
+            if1=ic1*ratio(1)
+            arrayc(ic1,ic2)=arrayf(if1,if2)
+         enddo
+      enddo
+
+      return
+      end
+
+      subroutine conavgouternodecplx3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      complex
+     &  arrayf(filo0:fihi0+1,
+     &          filo2+1:fihi2),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo2+1:cihi2)
+      integer ic0,ic2,if0,if2
+c
+c***********************************************************************
+c
+      do ic2=ifirstc2+1,ilastc2
+         if2=ic2*ratio(2)
+         do ic0=ifirstc0,ilastc0+1
+            if0=ic0*ratio(0)
+            arrayc(ic0,ic2)=arrayf(if0,if2)
+         enddo
+      enddo
+
+      return
+      end
+
+      subroutine conavgouternodecplx3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      complex
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do ic1=ifirstc1,ilastc1+1
+         if1=ic1*ratio(1)
+         do ic0=ifirstc0,ilastc0+1
+            if0=ic0*ratio(0)
+            arrayc(ic0,ic1)=arrayf(if0,if1)
+         enddo
+      enddo
+
+      return
+      end
+
+
+c
+c***********************************************************************
+c Constant coarsening for 3d outernode-centered integer data
+c***********************************************************************
+c
+      subroutine conavgouternodeint3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      integer
+     &  arrayf(filo1+1:fihi1,
+     &          filo2+1:fihi2),
+     &  arrayc(cilo1+1:cihi1,
+     &          cilo2+1:cihi2)
+      integer ic1,ic2,if1,if2
+c
+c***********************************************************************
+c
+      do ic2=ifirstc2+1,ilastc2
+         if2=ic2*ratio(2)
+         do ic1=ifirstc1+1,ilastc1
+            if1=ic1*ratio(1)
+            arrayc(ic1,ic2)=arrayf(if1,if2)
+         enddo
+      enddo
+
+      return
+      end
+
+      subroutine conavgouternodeint3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      integer
+     &  arrayf(filo0:fihi0+1,
+     &          filo2+1:fihi2),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo2+1:cihi2)
+      integer ic0,ic2,if0,if2
+c
+c***********************************************************************
+c
+      do ic2=ifirstc2+1,ilastc2
+         if2=ic2*ratio(2)
+         do ic0=ifirstc0,ilastc0+1
+            if0=ic0*ratio(0)
+            arrayc(ic0,ic2)=arrayf(if0,if2)
+         enddo
+      enddo
+
+      return
+      end
+
+      subroutine conavgouternodeint3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:3-1)
+      integer
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1),
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do ic1=ifirstc1,ilastc1+1
+         if1=ic1*ratio(1)
+         do ic0=ifirstc0,ilastc0+1
+            if0=ic0*ratio(0)
+            arrayc(ic0,ic1)=arrayf(if0,if1)
+         enddo
+      enddo
+
+      return
+      end
+
+
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_concoarsen3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_concoarsen3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,97 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_concoarsen3d.m4 $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for spatial coarsening of 3d patch data
+c               on a regular Cartesian mesh.
+c
+include(pdat_m4concoarsenops3d.i)dnl
+c
+c***********************************************************************
+c Constant coarsening for 3d node-centered double data
+c***********************************************************************
+c
+      subroutine conavgnodedoub3d(
+conavg_op_node_3d(`double precision')dnl
+c
+c***********************************************************************
+c Constant coarsening for 3d node-centered float data 
+c***********************************************************************
+c
+      subroutine conavgnodeflot3d(
+conavg_op_node_3d(`real')dnl
+c
+c***********************************************************************
+c Constant coarsening for 3d node-centered complex data
+c***********************************************************************
+c
+      subroutine conavgnodecplx3d(
+conavg_op_node_3d(`double complex')dnl
+c
+c***********************************************************************
+c Constant coarsening for 3d node-centered integer data
+c***********************************************************************
+c
+      subroutine conavgnodeintg3d(
+conavg_op_node_3d(`integer')dnl
+c
+
+c***********************************************************************
+c Constant coarsening for 3d outernode-centered double data
+c***********************************************************************
+c
+      subroutine conavgouternodedoub3d0(
+conavg_op_outernode_3d0(`double precision')dnl
+
+      subroutine conavgouternodedoub3d1(
+conavg_op_outernode_3d1(`double precision')dnl
+
+      subroutine conavgouternodedoub3d2(
+conavg_op_outernode_3d2(`double precision')dnl
+
+c***********************************************************************
+c Constant coarsening for 3d outernode-centered float data
+c***********************************************************************
+c
+      subroutine conavgouternodeflot3d0(
+conavg_op_outernode_3d0(`real')dnl
+
+      subroutine conavgouternodeflot3d1(
+conavg_op_outernode_3d1(`real')dnl
+
+      subroutine conavgouternodeflot3d2(
+conavg_op_outernode_3d2(`real')dnl
+
+c
+c***********************************************************************
+c Constant coarsening for 3d outernode-centered complex data
+c***********************************************************************
+c
+      subroutine conavgouternodecplx3d0(
+conavg_op_outernode_3d0(`complex')dnl
+
+      subroutine conavgouternodecplx3d1(
+conavg_op_outernode_3d1(`complex')dnl
+
+      subroutine conavgouternodecplx3d2(
+conavg_op_outernode_3d2(`complex')dnl
+
+
+c
+c***********************************************************************
+c Constant coarsening for 3d outernode-centered integer data
+c***********************************************************************
+c
+      subroutine conavgouternodeint3d0(
+conavg_op_outernode_3d0(`integer')dnl
+
+      subroutine conavgouternodeint3d1(
+conavg_op_outernode_3d1(`integer')dnl
+
+      subroutine conavgouternodeint3d2(
+conavg_op_outernode_3d2(`integer')dnl
+
+
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_conrefine1d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_conrefine1d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,855 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_conrefine1d.m4 $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for spatial refining of 1d patch data
+c               on a regular Cartesian mesh.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4conrefineops1d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 1d Cartesian refine operators
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim1d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 1d arrays in FORTRAN routines.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4conopstuff.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for constant patchdata transfer routines.
+c
+c
+c
+c
+c
+c
+c
+c***********************************************************************
+c Constant interpolation for 1d cell-centered double data
+c***********************************************************************
+c
+      subroutine conrefcelldoub1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double precision
+     &  arrayc(cilo0:cihi0),
+     &  arrayf(filo0:fihi0)
+      integer ic0,if0
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         arrayf(if0)=arrayc(ic0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 1d cell-centered float data
+c***********************************************************************
+c
+      subroutine conrefcellflot1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      real
+     &  arrayc(cilo0:cihi0),
+     &  arrayf(filo0:fihi0)
+      integer ic0,if0
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         arrayf(if0)=arrayc(ic0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 1d cell-centered complex data
+c***********************************************************************
+c
+      subroutine conrefcellcplx1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double complex
+     &  arrayc(cilo0:cihi0),
+     &  arrayf(filo0:fihi0)
+      integer ic0,if0
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         arrayf(if0)=arrayc(ic0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 1d cell-centered integer data
+c***********************************************************************
+c
+      subroutine conrefcellintg1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      integer
+     &  arrayc(cilo0:cihi0),
+     &  arrayf(filo0:fihi0)
+      integer ic0,if0
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         arrayf(if0)=arrayc(ic0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 1d edge-centered double data
+c***********************************************************************
+c
+      subroutine conrefedgedoub1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double precision
+     &  arrayc(cilo0:cihi0),
+     &  arrayf(filo0:fihi0)
+      integer ie0,if0
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ie0=(if0+1)/ratio(0)-1
+         else
+            ie0=if0/ratio(0)
+         endif
+         arrayf(if0)=arrayc(ie0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 1d edge-centered float data
+c***********************************************************************
+c
+      subroutine conrefedgeflot1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      real
+     &  arrayc(cilo0:cihi0),
+     &  arrayf(filo0:fihi0)
+      integer ie0,if0
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ie0=(if0+1)/ratio(0)-1
+         else
+            ie0=if0/ratio(0)
+         endif
+         arrayf(if0)=arrayc(ie0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 1d edge-centered complex data
+c***********************************************************************
+c
+      subroutine conrefedgecplx1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double complex
+     &  arrayc(cilo0:cihi0),
+     &  arrayf(filo0:fihi0)
+      integer ie0,if0
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ie0=(if0+1)/ratio(0)-1
+         else
+            ie0=if0/ratio(0)
+         endif
+         arrayf(if0)=arrayc(ie0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 1d edge-centered integer data
+c***********************************************************************
+c
+      subroutine conrefedgeintg1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      integer
+     &  arrayc(cilo0:cihi0),
+     &  arrayf(filo0:fihi0)
+      integer ie0,if0
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ie0=(if0+1)/ratio(0)-1
+         else
+            ie0=if0/ratio(0)
+         endif
+         arrayf(if0)=arrayc(ie0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 1d face-centered double data
+c***********************************************************************
+c
+      subroutine conreffacedoub1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double precision
+     &  arrayc(cilo0:cihi0+1),
+     &  arrayf(filo0:fihi0+1)
+      integer ie0,if0,it
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0+1
+         it=2*if0+ratio(0)
+         if (it.le.0) then
+            ie0=it/(2*ratio(0))-1
+         else
+            ie0=(it-1)/(2*ratio(0))
+         endif
+         arrayf(if0)=arrayc(ie0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 1d face-centered float data
+c***********************************************************************
+c
+      subroutine conreffaceflot1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      real
+     &  arrayc(cilo0:cihi0+1),
+     &  arrayf(filo0:fihi0+1)
+      integer ie0,if0,it
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0+1
+         it=2*if0+ratio(0)
+         if (it.le.0) then
+            ie0=it/(2*ratio(0))-1
+         else
+            ie0=(it-1)/(2*ratio(0))
+         endif
+         arrayf(if0)=arrayc(ie0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 1d face-centered complex data
+c***********************************************************************
+c
+      subroutine conreffacecplx1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double complex
+     &  arrayc(cilo0:cihi0+1),
+     &  arrayf(filo0:fihi0+1)
+      integer ie0,if0,it
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0+1
+         it=2*if0+ratio(0)
+         if (it.le.0) then
+            ie0=it/(2*ratio(0))-1
+         else
+            ie0=(it-1)/(2*ratio(0))
+         endif
+         arrayf(if0)=arrayc(ie0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 1d face-centered integer data
+c***********************************************************************
+c
+      subroutine conreffaceintg1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      integer
+     &  arrayc(cilo0:cihi0+1),
+     &  arrayf(filo0:fihi0+1)
+      integer ie0,if0,it
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0+1
+         it=2*if0+ratio(0)
+         if (it.le.0) then
+            ie0=it/(2*ratio(0))-1
+         else
+            ie0=(it-1)/(2*ratio(0))
+         endif
+         arrayf(if0)=arrayc(ie0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 1d outerface double data
+c***********************************************************************
+c
+      subroutine conrefoutfacedoub1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double precision
+     &  arrayc(1),
+     &  arrayf(1)
+c
+c***********************************************************************
+c
+      arrayf(1)=arrayc(1)
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 1d outerface float data
+c***********************************************************************
+c
+      subroutine conrefoutfaceflot1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      real
+     &  arrayc(1),
+     &  arrayf(1)
+c
+c***********************************************************************
+c
+      arrayf(1)=arrayc(1)
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 1d outerface complex data
+c***********************************************************************
+c
+      subroutine conrefoutfacecplx1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double complex
+     &  arrayc(1),
+     &  arrayf(1)
+c
+c***********************************************************************
+c
+      arrayf(1)=arrayc(1)
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 1d outerface integer data
+c***********************************************************************
+c
+      subroutine conrefoutfaceintg1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      integer
+     &  arrayc(1),
+     &  arrayf(1)
+c
+c***********************************************************************
+c
+      arrayf(1)=arrayc(1)
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 1d side-centered double data
+c***********************************************************************
+c
+      subroutine conrefsidedoub1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double precision
+     &  arrayc(cilo0:cihi0+1),
+     &  arrayf(filo0:fihi0+1)
+      integer ie0,if0,it
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0+1
+         it=2*if0+ratio(0)
+         if (it.le.0) then
+            ie0=it/(2*ratio(0))-1
+         else
+            ie0=(it-1)/(2*ratio(0))
+         endif
+         arrayf(if0)=arrayc(ie0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 1d side-centered float data
+c***********************************************************************
+c
+      subroutine conrefsideflot1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      real
+     &  arrayc(cilo0:cihi0+1),
+     &  arrayf(filo0:fihi0+1)
+      integer ie0,if0,it
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0+1
+         it=2*if0+ratio(0)
+         if (it.le.0) then
+            ie0=it/(2*ratio(0))-1
+         else
+            ie0=(it-1)/(2*ratio(0))
+         endif
+         arrayf(if0)=arrayc(ie0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 1d side-centered complex data
+c***********************************************************************
+c
+      subroutine conrefsidecplx1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      double complex
+     &  arrayc(cilo0:cihi0+1),
+     &  arrayf(filo0:fihi0+1)
+      integer ie0,if0,it
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0+1
+         it=2*if0+ratio(0)
+         if (it.le.0) then
+            ie0=it/(2*ratio(0))-1
+         else
+            ie0=(it-1)/(2*ratio(0))
+         endif
+         arrayf(if0)=arrayc(ie0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 1d side-centered integer data
+c***********************************************************************
+c
+      subroutine conrefsideintg1d(
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:1-1)
+      integer
+     &  arrayc(cilo0:cihi0+1),
+     &  arrayf(filo0:fihi0+1)
+      integer ie0,if0,it
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0+1
+         it=2*if0+ratio(0)
+         if (it.le.0) then
+            ie0=it/(2*ratio(0))-1
+         else
+            ie0=(it-1)/(2*ratio(0))
+         endif
+         arrayf(if0)=arrayc(ie0)
+      enddo
+c
+      return
+      end
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_conrefine1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_conrefine1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,151 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_conrefine1d.m4 $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for spatial refining of 1d patch data
+c               on a regular Cartesian mesh.
+c
+include(pdat_m4conrefineops1d.i)dnl
+c
+c***********************************************************************
+c Constant interpolation for 1d cell-centered double data
+c***********************************************************************
+c
+      subroutine conrefcelldoub1d(
+conref_op_cell_1d(`double precision')dnl
+c
+c***********************************************************************
+c Constant interpolation for 1d cell-centered float data
+c***********************************************************************
+c
+      subroutine conrefcellflot1d(
+conref_op_cell_1d(`real')dnl
+c
+c***********************************************************************
+c Constant interpolation for 1d cell-centered complex data
+c***********************************************************************
+c
+      subroutine conrefcellcplx1d(
+conref_op_cell_1d(`double complex')dnl
+c
+c***********************************************************************
+c Constant interpolation for 1d cell-centered integer data
+c***********************************************************************
+c
+      subroutine conrefcellintg1d(
+conref_op_cell_1d(`integer')dnl
+c
+c***********************************************************************
+c Constant interpolation for 1d edge-centered double data
+c***********************************************************************
+c
+      subroutine conrefedgedoub1d(
+conref_op_edge_1d(`double precision')dnl
+c
+c***********************************************************************
+c Constant interpolation for 1d edge-centered float data
+c***********************************************************************
+c
+      subroutine conrefedgeflot1d(
+conref_op_edge_1d(`real')dnl
+c
+c***********************************************************************
+c Constant interpolation for 1d edge-centered complex data
+c***********************************************************************
+c
+      subroutine conrefedgecplx1d(
+conref_op_edge_1d(`double complex')dnl
+c
+c***********************************************************************
+c Constant interpolation for 1d edge-centered integer data
+c***********************************************************************
+c
+      subroutine conrefedgeintg1d(
+conref_op_edge_1d(`integer')dnl
+c
+c***********************************************************************
+c Constant interpolation for 1d face-centered double data
+c***********************************************************************
+c
+      subroutine conreffacedoub1d(
+conref_op_face_1d(`double precision')dnl
+c
+c***********************************************************************
+c Constant interpolation for 1d face-centered float data
+c***********************************************************************
+c
+      subroutine conreffaceflot1d(
+conref_op_face_1d(`real')dnl
+c
+c***********************************************************************
+c Constant interpolation for 1d face-centered complex data
+c***********************************************************************
+c
+      subroutine conreffacecplx1d(
+conref_op_face_1d(`double complex')dnl
+c
+c***********************************************************************
+c Constant interpolation for 1d face-centered integer data
+c***********************************************************************
+c
+      subroutine conreffaceintg1d(
+conref_op_face_1d(`integer')dnl
+c
+c***********************************************************************
+c Constant interpolation for 1d outerface double data
+c***********************************************************************
+c
+      subroutine conrefoutfacedoub1d(
+conref_op_outerface_1d(`double precision')dnl
+c
+c***********************************************************************
+c Constant interpolation for 1d outerface float data
+c***********************************************************************
+c
+      subroutine conrefoutfaceflot1d(
+conref_op_outerface_1d(`real')dnl
+c
+c***********************************************************************
+c Constant interpolation for 1d outerface complex data
+c***********************************************************************
+c
+      subroutine conrefoutfacecplx1d(
+conref_op_outerface_1d(`double complex')dnl
+c
+c***********************************************************************
+c Constant interpolation for 1d outerface integer data
+c***********************************************************************
+c
+      subroutine conrefoutfaceintg1d(
+conref_op_outerface_1d(`integer')dnl
+c
+c***********************************************************************
+c Constant interpolation for 1d side-centered double data
+c***********************************************************************
+c
+      subroutine conrefsidedoub1d(
+conref_op_side_1d(`double precision')dnl
+c
+c***********************************************************************
+c Constant interpolation for 1d side-centered float data
+c***********************************************************************
+c
+      subroutine conrefsideflot1d(
+conref_op_side_1d(`real')dnl
+c
+c***********************************************************************
+c Constant interpolation for 1d side-centered complex data
+c***********************************************************************
+c
+      subroutine conrefsidecplx1d(
+conref_op_side_1d(`double complex')dnl
+c
+c***********************************************************************
+c Constant interpolation for 1d side-centered integer data
+c***********************************************************************
+c
+      subroutine conrefsideintg1d(
+conref_op_side_1d(`integer')dnl
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_conrefine2d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_conrefine2d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1741 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_conrefine2d.m4 $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for spatial refining of 2d patch data
+c               on a regular Cartesian mesh.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4conrefineops2d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 2d constant refine operators
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim2d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 2d arrays in FORTRAN routines.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4conopstuff.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for constant patchdata transfer routines.
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c***********************************************************************
+c Constant interpolation for 2d cell-centered double data
+c***********************************************************************
+c
+      subroutine conrefcelldoub2d(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 2d cell-centered float data
+c***********************************************************************
+c
+      subroutine conrefcellflot2d(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      real
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 2d cell-centered complex data
+c***********************************************************************
+c
+      subroutine conrefcellcplx2d(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double complex
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 2d cell-centered integer data
+c***********************************************************************
+c
+      subroutine conrefcellintg2d(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      integer
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 2d edge-centered double data
+c***********************************************************************
+c
+      subroutine conrefedgedoub2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0+0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefedgedoub2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1+0
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 2d edge-centered float data
+c***********************************************************************
+c
+      subroutine conrefedgeflot2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      real
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0+0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefedgeflot2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      real
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1+0
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 2d edge-centered complex data
+c***********************************************************************
+
+      subroutine conrefedgecplx2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double complex
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0+0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefedgecplx2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double complex
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1+0
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 2d edge-centered integer data
+c***********************************************************************
+c
+      subroutine conrefedgeintg2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      integer
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0+0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefedgeintg2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      integer
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1+0
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 2d face-centered double data
+c***********************************************************************
+c
+      subroutine conreffacedoub2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1)
+      integer ie0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ie0=(if0+1)/ratio(0)-1
+         else
+            ie0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ie0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conreffacedoub2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  arrayc(cilo1:cihi1+1,
+     &          cilo0:cihi0),
+     &  arrayf(filo1:fihi1+1,
+     &          filo0:fihi0)
+      integer ie1,ic0,if1,if0
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ie1=(if1+1)/ratio(1)-1
+         else
+            ie1=if1/ratio(1)
+         endif
+            arrayf(if1,if0)=arrayc(ie1,ic0)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 2d face-centered float data
+c***********************************************************************
+c
+      subroutine conreffaceflot2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      real
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1)
+      integer ie0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ie0=(if0+1)/ratio(0)-1
+         else
+            ie0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ie0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conreffaceflot2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      real
+     &  arrayc(cilo1:cihi1+1,
+     &          cilo0:cihi0),
+     &  arrayf(filo1:fihi1+1,
+     &          filo0:fihi0)
+      integer ie1,ic0,if1,if0
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ie1=(if1+1)/ratio(1)-1
+         else
+            ie1=if1/ratio(1)
+         endif
+            arrayf(if1,if0)=arrayc(ie1,ic0)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 2d face-centered complex data
+c***********************************************************************
+
+      subroutine conreffacecplx2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double complex
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1)
+      integer ie0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ie0=(if0+1)/ratio(0)-1
+         else
+            ie0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ie0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conreffacecplx2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double complex
+     &  arrayc(cilo1:cihi1+1,
+     &          cilo0:cihi0),
+     &  arrayf(filo1:fihi1+1,
+     &          filo0:fihi0)
+      integer ie1,ic0,if1,if0
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ie1=(if1+1)/ratio(1)-1
+         else
+            ie1=if1/ratio(1)
+         endif
+            arrayf(if1,if0)=arrayc(ie1,ic0)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 2d face-centered integer data
+c***********************************************************************
+c
+      subroutine conreffaceintg2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      integer
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1)
+      integer ie0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ie0=(if0+1)/ratio(0)-1
+         else
+            ie0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ie0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conreffaceintg2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      integer
+     &  arrayc(cilo1:cihi1+1,
+     &          cilo0:cihi0),
+     &  arrayf(filo1:fihi1+1,
+     &          filo0:fihi0)
+      integer ie1,ic0,if1,if0
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ie1=(if1+1)/ratio(1)-1
+         else
+            ie1=if1/ratio(1)
+         endif
+            arrayf(if1,if0)=arrayc(ie1,ic0)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 2d outerface double data
+c***********************************************************************
+c
+      subroutine conrefoutfacedoub2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  arrayc(cilo1:cihi1),
+     &  arrayf(filo1:fihi1)
+      integer ic1,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         arrayf(if1)=arrayc(ic1)
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefoutfacedoub2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  arrayc(cilo0:cihi0),
+     &  arrayf(filo0:fihi0)
+      integer ic0,if0
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         arrayf(if0)=arrayc(ic0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 2d outerface float data
+c***********************************************************************
+c
+      subroutine conrefoutfaceflot2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      real
+     &  arrayc(cilo1:cihi1),
+     &  arrayf(filo1:fihi1)
+      integer ic1,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         arrayf(if1)=arrayc(ic1)
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefoutfaceflot2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      real
+     &  arrayc(cilo0:cihi0),
+     &  arrayf(filo0:fihi0)
+      integer ic0,if0
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         arrayf(if0)=arrayc(ic0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 2d outerface complex data
+c***********************************************************************
+
+      subroutine conrefoutfacecplx2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double complex
+     &  arrayc(cilo1:cihi1),
+     &  arrayf(filo1:fihi1)
+      integer ic1,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         arrayf(if1)=arrayc(ic1)
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefoutfacecplx2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double complex
+     &  arrayc(cilo0:cihi0),
+     &  arrayf(filo0:fihi0)
+      integer ic0,if0
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         arrayf(if0)=arrayc(ic0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 2d outerface integer data
+c***********************************************************************
+c
+      subroutine conrefoutfaceintg2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      integer
+     &  arrayc(cilo1:cihi1),
+     &  arrayf(filo1:fihi1)
+      integer ic1,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         arrayf(if1)=arrayc(ic1)
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefoutfaceintg2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      integer
+     &  arrayc(cilo0:cihi0),
+     &  arrayf(filo0:fihi0)
+      integer ic0,if0
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         arrayf(if0)=arrayc(ic0)
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 2d side-centered double data
+c***********************************************************************
+c
+      subroutine conrefsidedoub2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1+0
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefsidedoub2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double precision
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0+0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 2d side-centered float data
+c***********************************************************************
+c
+      subroutine conrefsideflot2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      real
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1+0
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefsideflot2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      real
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0+0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 2d side-centered complex data
+c***********************************************************************
+
+      subroutine conrefsidecplx2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double complex
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1+0
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefsidecplx2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      double complex
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0+0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 2d side-centered integer data
+c***********************************************************************
+c
+      subroutine conrefsideintg2d0(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      integer
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1+0
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefsideintg2d1(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:2-1)
+      integer
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0+0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_conrefine2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_conrefine2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,199 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_conrefine2d.m4 $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for spatial refining of 2d patch data
+c               on a regular Cartesian mesh.
+c
+include(pdat_m4conrefineops2d.i)dnl
+c
+c***********************************************************************
+c Constant interpolation for 2d cell-centered double data
+c***********************************************************************
+c
+      subroutine conrefcelldoub2d(
+conref_op_cell_2d(`double precision')dnl
+c
+c***********************************************************************
+c Constant interpolation for 2d cell-centered float data
+c***********************************************************************
+c
+      subroutine conrefcellflot2d(
+conref_op_cell_2d(`real')dnl
+c
+c***********************************************************************
+c Constant interpolation for 2d cell-centered complex data
+c***********************************************************************
+c
+      subroutine conrefcellcplx2d(
+conref_op_cell_2d(`double complex')dnl
+c
+c***********************************************************************
+c Constant interpolation for 2d cell-centered integer data
+c***********************************************************************
+c
+      subroutine conrefcellintg2d(
+conref_op_cell_2d(`integer')dnl
+c
+c***********************************************************************
+c Constant interpolation for 2d edge-centered double data
+c***********************************************************************
+c
+      subroutine conrefedgedoub2d0(
+conref_op_edge_2d(`double precision',0,1)dnl
+c
+      subroutine conrefedgedoub2d1(
+conref_op_edge_2d(`double precision',1,0)dnl
+c
+c***********************************************************************
+c Constant interpolation for 2d edge-centered float data
+c***********************************************************************
+c
+      subroutine conrefedgeflot2d0(
+conref_op_edge_2d(`real',0,1)dnl
+c
+      subroutine conrefedgeflot2d1(
+conref_op_edge_2d(`real',1,0)dnl
+c
+c***********************************************************************
+c Constant interpolation for 2d edge-centered complex data
+c***********************************************************************
+
+      subroutine conrefedgecplx2d0(
+conref_op_edge_2d(`double complex',0,1)dnl
+c
+      subroutine conrefedgecplx2d1(
+conref_op_edge_2d(`double complex',1,0)dnl
+c
+c***********************************************************************
+c Constant interpolation for 2d edge-centered integer data
+c***********************************************************************
+c
+      subroutine conrefedgeintg2d0(
+conref_op_edge_2d(`integer',0,1)dnl
+c
+      subroutine conrefedgeintg2d1(
+conref_op_edge_2d(`integer',1,0)dnl
+c
+c***********************************************************************
+c Constant interpolation for 2d face-centered double data
+c***********************************************************************
+c
+      subroutine conreffacedoub2d0(
+conref_op_face_2d(`double precision',0,1)dnl
+c
+      subroutine conreffacedoub2d1(
+conref_op_face_2d(`double precision',1,0)dnl
+c
+c***********************************************************************
+c Constant interpolation for 2d face-centered float data
+c***********************************************************************
+c
+      subroutine conreffaceflot2d0(
+conref_op_face_2d(`real',0,1)dnl
+c
+      subroutine conreffaceflot2d1(
+conref_op_face_2d(`real',1,0)dnl
+c
+c***********************************************************************
+c Constant interpolation for 2d face-centered complex data
+c***********************************************************************
+
+      subroutine conreffacecplx2d0(
+conref_op_face_2d(`double complex',0,1)dnl
+c
+      subroutine conreffacecplx2d1(
+conref_op_face_2d(`double complex',1,0)dnl
+c
+c***********************************************************************
+c Constant interpolation for 2d face-centered integer data
+c***********************************************************************
+c
+      subroutine conreffaceintg2d0(
+conref_op_face_2d(`integer',0,1)dnl
+c
+      subroutine conreffaceintg2d1(
+conref_op_face_2d(`integer',1,0)dnl
+c
+c***********************************************************************
+c Constant interpolation for 2d outerface double data
+c***********************************************************************
+c
+      subroutine conrefoutfacedoub2d0(
+conref_op_outerface_2d(`double precision',0,1)dnl
+c
+      subroutine conrefoutfacedoub2d1(
+conref_op_outerface_2d(`double precision',1,0)dnl
+c
+c***********************************************************************
+c Constant interpolation for 2d outerface float data
+c***********************************************************************
+c
+      subroutine conrefoutfaceflot2d0(
+conref_op_outerface_2d(`real',0,1)dnl
+c
+      subroutine conrefoutfaceflot2d1(
+conref_op_outerface_2d(`real',1,0)dnl
+c
+c***********************************************************************
+c Constant interpolation for 2d outerface complex data
+c***********************************************************************
+
+      subroutine conrefoutfacecplx2d0(
+conref_op_outerface_2d(`double complex',0,1)dnl
+c
+      subroutine conrefoutfacecplx2d1(
+conref_op_outerface_2d(`double complex',1,0)dnl
+c
+c***********************************************************************
+c Constant interpolation for 2d outerface integer data
+c***********************************************************************
+c
+      subroutine conrefoutfaceintg2d0(
+conref_op_outerface_2d(`integer',0,1)dnl
+c
+      subroutine conrefoutfaceintg2d1(
+conref_op_outerface_2d(`integer',1,0)dnl
+c
+c***********************************************************************
+c Constant interpolation for 2d side-centered double data
+c***********************************************************************
+c
+      subroutine conrefsidedoub2d0(
+conref_op_side_2d(`double precision',0,1)dnl
+c
+      subroutine conrefsidedoub2d1(
+conref_op_side_2d(`double precision',1,0)dnl
+c
+c***********************************************************************
+c Constant interpolation for 2d side-centered float data
+c***********************************************************************
+c
+      subroutine conrefsideflot2d0(
+conref_op_side_2d(`real',0,1)dnl
+c
+      subroutine conrefsideflot2d1(
+conref_op_side_2d(`real',1,0)dnl
+c
+c***********************************************************************
+c Constant interpolation for 2d side-centered complex data
+c***********************************************************************
+
+      subroutine conrefsidecplx2d0(
+conref_op_side_2d(`double complex',0,1)dnl
+c
+      subroutine conrefsidecplx2d1(
+conref_op_side_2d(`double complex',1,0)dnl
+c
+c***********************************************************************
+c Constant interpolation for 2d side-centered integer data
+c***********************************************************************
+c
+      subroutine conrefsideintg2d0(
+conref_op_side_2d(`integer',0,1)dnl
+c
+      subroutine conrefsideintg2d1(
+conref_op_side_2d(`integer',1,0)dnl
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_conrefine3d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_conrefine3d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,3117 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_conrefine3d.m4 $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for spatial refining of 3d patch data
+c               on a regular Cartesian mesh.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4conrefineops3d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 3d Cartesian refine operators
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim3d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 3d arrays in FORTRAN routines.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4conopstuff.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for constant patchdata transfer routines.
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c***********************************************************************
+c Constant interpolation for 3d cell-centered double data
+c***********************************************************************
+c
+      subroutine conrefcelldoub3d(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1,
+     &          filo2:fihi2)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 3d cell-centered float data
+c***********************************************************************
+c
+      subroutine conrefcellflot3d(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      real
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1,
+     &          filo2:fihi2)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 3d cell-centered complex data
+c***********************************************************************
+c
+      subroutine conrefcellcplx3d(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double complex
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1,
+     &          filo2:fihi2)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 3d cell-centered integer data
+c***********************************************************************
+c
+      subroutine conrefcellintg3d(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      integer
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1,
+     &          filo2:fihi2)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 3d edge-centered double data
+c***********************************************************************
+c
+      subroutine conrefedgedoub3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2+1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2+1)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+
+
+      do if2=ifirstf2,ilastf2+1
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+
+
+         do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+
+
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefedgedoub3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2+1)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+
+
+      do if2=ifirstf2,ilastf2+1
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+
+
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+
+
+            do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefedgedoub3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+
+
+         do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+
+
+            do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 3d edge-centered float data
+c***********************************************************************
+c
+      subroutine conrefedgeflot3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      real
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2+1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2+1)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+
+
+      do if2=ifirstf2,ilastf2+1
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+
+
+         do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+
+
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefedgeflot3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      real
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2+1)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+
+
+      do if2=ifirstf2,ilastf2+1
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+
+
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+
+
+            do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefedgeflot3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      real
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+
+
+         do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+
+
+            do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 3d edge-centered complex data
+c***********************************************************************
+c
+      subroutine conrefedgecplx3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double complex
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2+1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2+1)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+
+
+      do if2=ifirstf2,ilastf2+1
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+
+
+         do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+
+
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefedgecplx3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double complex
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2+1)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+
+
+      do if2=ifirstf2,ilastf2+1
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+
+
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+
+
+            do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefedgecplx3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double complex
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+
+
+         do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+
+
+            do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 3d edge-centered integer data
+c***********************************************************************
+c
+      subroutine conrefedgeintg3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      integer
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2+1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2+1)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+
+
+      do if2=ifirstf2,ilastf2+1
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+
+
+         do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+
+
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefedgeintg3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      integer
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2+1)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+
+
+      do if2=ifirstf2,ilastf2+1
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+
+
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+
+
+            do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefedgeintg3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      integer
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+
+
+         do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+
+
+            do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 3d face-centered double data
+c***********************************************************************
+c
+      subroutine conreffacedoub3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2)
+      integer ie0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ie0=(if0+1)/ratio(0)-1
+         else
+            ie0=if0/ratio(0)
+         endif
+               arrayf(if0,if1,if2)=arrayc(ie0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conreffacedoub3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  arrayc(cilo1:cihi1+1,
+     &          cilo2:cihi2,
+     &          cilo0:cihi0),
+     &  arrayf(filo1:fihi1+1,
+     &          filo2:fihi2,
+     &          filo0:fihi0)
+      integer ie1,ic2,ic0,if1,if2,if0
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+            do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ie1=(if1+1)/ratio(1)-1
+         else
+            ie1=if1/ratio(1)
+         endif
+               arrayf(if1,if2,if0)=arrayc(ie1,ic2,ic0)
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conreffacedoub3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  arrayc(cilo2:cihi2+1,
+     &          cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  arrayf(filo2:fihi2+1,
+     &          filo0:fihi0,
+     &          filo1:fihi1)
+      integer ie2,ic0,ic1,if2,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            do if2=ifirstf2,ilastf2+1
+         if (if2.lt.0) then
+            ie2=(if2+1)/ratio(2)-1
+         else
+            ie2=if2/ratio(2)
+         endif
+               arrayf(if2,if0,if1)=arrayc(ie2,ic0,ic1)
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 3d face-centered float data
+c***********************************************************************
+c
+      subroutine conreffaceflot3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      real
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2)
+      integer ie0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ie0=(if0+1)/ratio(0)-1
+         else
+            ie0=if0/ratio(0)
+         endif
+               arrayf(if0,if1,if2)=arrayc(ie0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conreffaceflot3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      real
+     &  arrayc(cilo1:cihi1+1,
+     &          cilo2:cihi2,
+     &          cilo0:cihi0),
+     &  arrayf(filo1:fihi1+1,
+     &          filo2:fihi2,
+     &          filo0:fihi0)
+      integer ie1,ic2,ic0,if1,if2,if0
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+            do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ie1=(if1+1)/ratio(1)-1
+         else
+            ie1=if1/ratio(1)
+         endif
+               arrayf(if1,if2,if0)=arrayc(ie1,ic2,ic0)
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conreffaceflot3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      real
+     &  arrayc(cilo2:cihi2+1,
+     &          cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  arrayf(filo2:fihi2+1,
+     &          filo0:fihi0,
+     &          filo1:fihi1)
+      integer ie2,ic0,ic1,if2,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            do if2=ifirstf2,ilastf2+1
+         if (if2.lt.0) then
+            ie2=(if2+1)/ratio(2)-1
+         else
+            ie2=if2/ratio(2)
+         endif
+               arrayf(if2,if0,if1)=arrayc(ie2,ic0,ic1)
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 3d face-centered complex data
+c***********************************************************************
+c
+      subroutine conreffacecplx3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double complex
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2)
+      integer ie0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ie0=(if0+1)/ratio(0)-1
+         else
+            ie0=if0/ratio(0)
+         endif
+               arrayf(if0,if1,if2)=arrayc(ie0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conreffacecplx3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double complex
+     &  arrayc(cilo1:cihi1+1,
+     &          cilo2:cihi2,
+     &          cilo0:cihi0),
+     &  arrayf(filo1:fihi1+1,
+     &          filo2:fihi2,
+     &          filo0:fihi0)
+      integer ie1,ic2,ic0,if1,if2,if0
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+            do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ie1=(if1+1)/ratio(1)-1
+         else
+            ie1=if1/ratio(1)
+         endif
+               arrayf(if1,if2,if0)=arrayc(ie1,ic2,ic0)
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conreffacecplx3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double complex
+     &  arrayc(cilo2:cihi2+1,
+     &          cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  arrayf(filo2:fihi2+1,
+     &          filo0:fihi0,
+     &          filo1:fihi1)
+      integer ie2,ic0,ic1,if2,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            do if2=ifirstf2,ilastf2+1
+         if (if2.lt.0) then
+            ie2=(if2+1)/ratio(2)-1
+         else
+            ie2=if2/ratio(2)
+         endif
+               arrayf(if2,if0,if1)=arrayc(ie2,ic0,ic1)
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 3d face-centered integer data
+c***********************************************************************
+c
+      subroutine conreffaceintg3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      integer
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2)
+      integer ie0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ie0=(if0+1)/ratio(0)-1
+         else
+            ie0=if0/ratio(0)
+         endif
+               arrayf(if0,if1,if2)=arrayc(ie0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conreffaceintg3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      integer
+     &  arrayc(cilo1:cihi1+1,
+     &          cilo2:cihi2,
+     &          cilo0:cihi0),
+     &  arrayf(filo1:fihi1+1,
+     &          filo2:fihi2,
+     &          filo0:fihi0)
+      integer ie1,ic2,ic0,if1,if2,if0
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+            do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ie1=(if1+1)/ratio(1)-1
+         else
+            ie1=if1/ratio(1)
+         endif
+               arrayf(if1,if2,if0)=arrayc(ie1,ic2,ic0)
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conreffaceintg3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      integer
+     &  arrayc(cilo2:cihi2+1,
+     &          cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  arrayf(filo2:fihi2+1,
+     &          filo0:fihi0,
+     &          filo1:fihi1)
+      integer ie2,ic0,ic1,if2,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            do if2=ifirstf2,ilastf2+1
+         if (if2.lt.0) then
+            ie2=(if2+1)/ratio(2)-1
+         else
+            ie2=if2/ratio(2)
+         endif
+               arrayf(if2,if0,if1)=arrayc(ie2,ic0,ic1)
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 3d outerface double data
+c***********************************************************************
+c
+      subroutine conrefoutfacedoub3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  arrayc(cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo1:fihi1,
+     &          filo2:fihi2)
+      integer ic1,ic2,if1,if2
+c
+c***********************************************************************
+c
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            arrayf(if1,if2)=arrayc(ic1,ic2)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefoutfacedoub3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  arrayc(cilo2:cihi2,
+     &          cilo0:cihi0),
+     &  arrayf(filo2:fihi2,
+     &          filo0:fihi0)
+      integer ic2,ic0,if2,if0
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+            arrayf(if2,if0)=arrayc(ic2,ic0)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefoutfacedoub3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 3d outerface float data
+c***********************************************************************
+c
+      subroutine conrefoutfaceflot3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      real
+     &  arrayc(cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo1:fihi1,
+     &          filo2:fihi2)
+      integer ic1,ic2,if1,if2
+c
+c***********************************************************************
+c
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            arrayf(if1,if2)=arrayc(ic1,ic2)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefoutfaceflot3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      real
+     &  arrayc(cilo2:cihi2,
+     &          cilo0:cihi0),
+     &  arrayf(filo2:fihi2,
+     &          filo0:fihi0)
+      integer ic2,ic0,if2,if0
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+            arrayf(if2,if0)=arrayc(ic2,ic0)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefoutfaceflot3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      real
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 3d outerface complex data
+c***********************************************************************
+c
+      subroutine conrefoutfacecplx3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double complex
+     &  arrayc(cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo1:fihi1,
+     &          filo2:fihi2)
+      integer ic1,ic2,if1,if2
+c
+c***********************************************************************
+c
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            arrayf(if1,if2)=arrayc(ic1,ic2)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefoutfacecplx3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double complex
+     &  arrayc(cilo2:cihi2,
+     &          cilo0:cihi0),
+     &  arrayf(filo2:fihi2,
+     &          filo0:fihi0)
+      integer ic2,ic0,if2,if0
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+            arrayf(if2,if0)=arrayc(ic2,ic0)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefoutfacecplx3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double complex
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 3d outerface integer data
+c***********************************************************************
+c
+      subroutine conrefoutfaceintg3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      integer
+     &  arrayc(cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo1:fihi1,
+     &          filo2:fihi2)
+      integer ic1,ic2,if1,if2
+c
+c***********************************************************************
+c
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+            arrayf(if1,if2)=arrayc(ic1,ic2)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefoutfaceintg3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      integer
+     &  arrayc(cilo2:cihi2,
+     &          cilo0:cihi0),
+     &  arrayf(filo2:fihi2,
+     &          filo0:fihi0)
+      integer ic2,ic0,if2,if0
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+         do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+            arrayf(if2,if0)=arrayc(ic2,ic0)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefoutfaceintg3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      integer
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1)
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+         do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 3d side-centered double data
+c***********************************************************************
+c
+      subroutine conrefsidedoub3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+
+
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+
+
+            do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefsidedoub3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+
+
+         do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+
+
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefsidedoub3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double precision
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1,
+     &          filo2:fihi2+1)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+
+
+      do if2=ifirstf2,ilastf2+1
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+
+
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+
+
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 3d side-centered float data
+c***********************************************************************
+c
+      subroutine conrefsideflot3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      real
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+
+
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+
+
+            do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefsideflot3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      real
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+
+
+         do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+
+
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefsideflot3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      real
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1,
+     &          filo2:fihi2+1)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+
+
+      do if2=ifirstf2,ilastf2+1
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+
+
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+
+
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 3d side-centered complex data
+c***********************************************************************
+c
+      subroutine conrefsidecplx3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double complex
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+
+
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+
+
+            do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefsidecplx3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double complex
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+
+
+         do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+
+
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefsidecplx3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      double complex
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1,
+     &          filo2:fihi2+1)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+
+
+      do if2=ifirstf2,ilastf2+1
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+
+
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+
+
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Constant interpolation for 3d side-centered integer data
+c***********************************************************************
+c
+      subroutine conrefsideintg3d0(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      integer
+     &  arrayc(cilo0:cihi0+1,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0+1,
+     &          filo1:fihi1,
+     &          filo2:fihi2)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+
+
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+
+
+            do if0=ifirstf0,ilastf0+1
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefsideintg3d1(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      integer
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1+1,
+     &          cilo2:cihi2),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1+1,
+     &          filo2:fihi2)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+
+
+      do if2=ifirstf2,ilastf2
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+
+
+         do if1=ifirstf1,ilastf1+1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+
+
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine conrefsideintg3d2(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:3-1)
+      integer
+     &  arrayc(cilo0:cihi0,
+     &          cilo1:cihi1,
+     &          cilo2:cihi2+1),
+     &  arrayf(filo0:fihi0,
+     &          filo1:fihi1,
+     &          filo2:fihi2+1)
+      integer ic0,ic1,ic2,if0,if1,if2
+c
+c***********************************************************************
+c
+
+
+      do if2=ifirstf2,ilastf2+1
+         if (if2.lt.0) then
+            ic2=(if2+1)/ratio(2)-1
+         else
+            ic2=if2/ratio(2)
+         endif
+
+
+         do if1=ifirstf1,ilastf1
+         if (if1.lt.0) then
+            ic1=(if1+1)/ratio(1)-1
+         else
+            ic1=if1/ratio(1)
+         endif
+
+
+            do if0=ifirstf0,ilastf0
+         if (if0.lt.0) then
+            ic0=(if0+1)/ratio(0)-1
+         else
+            ic0=if0/ratio(0)
+         endif
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_conrefine3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_conrefine3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,247 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_conrefine3d.m4 $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for spatial refining of 3d patch data
+c               on a regular Cartesian mesh.
+c
+include(pdat_m4conrefineops3d.i)dnl
+c
+c***********************************************************************
+c Constant interpolation for 3d cell-centered double data
+c***********************************************************************
+c
+      subroutine conrefcelldoub3d(
+conref_op_cell_3d(`double precision')dnl
+c
+c***********************************************************************
+c Constant interpolation for 3d cell-centered float data
+c***********************************************************************
+c
+      subroutine conrefcellflot3d(
+conref_op_cell_3d(`real')dnl
+c
+c***********************************************************************
+c Constant interpolation for 3d cell-centered complex data
+c***********************************************************************
+c
+      subroutine conrefcellcplx3d(
+conref_op_cell_3d(`double complex')dnl
+c
+c***********************************************************************
+c Constant interpolation for 3d cell-centered integer data
+c***********************************************************************
+c
+      subroutine conrefcellintg3d(
+conref_op_cell_3d(`integer')dnl
+c
+c***********************************************************************
+c Constant interpolation for 3d edge-centered double data
+c***********************************************************************
+c
+      subroutine conrefedgedoub3d0(
+conref_op_edge_3d(`double precision',0,1,2)dnl
+c
+      subroutine conrefedgedoub3d1(
+conref_op_edge_3d(`double precision',1,2,0)dnl
+c
+      subroutine conrefedgedoub3d2(
+conref_op_edge_3d(`double precision',2,0,1)dnl
+c
+c***********************************************************************
+c Constant interpolation for 3d edge-centered float data
+c***********************************************************************
+c
+      subroutine conrefedgeflot3d0(
+conref_op_edge_3d(`real',0,1,2)dnl
+c
+      subroutine conrefedgeflot3d1(
+conref_op_edge_3d(`real',1,2,0)dnl
+c
+      subroutine conrefedgeflot3d2(
+conref_op_edge_3d(`real',2,0,1)dnl
+c
+c***********************************************************************
+c Constant interpolation for 3d edge-centered complex data
+c***********************************************************************
+c
+      subroutine conrefedgecplx3d0(
+conref_op_edge_3d(`double complex',0,1,2)dnl
+c
+      subroutine conrefedgecplx3d1(
+conref_op_edge_3d(`double complex',1,2,0)dnl
+c
+      subroutine conrefedgecplx3d2(
+conref_op_edge_3d(`double complex',2,0,1)dnl
+c
+c***********************************************************************
+c Constant interpolation for 3d edge-centered integer data
+c***********************************************************************
+c
+      subroutine conrefedgeintg3d0(
+conref_op_edge_3d(`integer',0,1,2)dnl
+c
+      subroutine conrefedgeintg3d1(
+conref_op_edge_3d(`integer',1,2,0)dnl
+c
+      subroutine conrefedgeintg3d2(
+conref_op_edge_3d(`integer',2,0,1)dnl
+c
+c***********************************************************************
+c Constant interpolation for 3d face-centered double data
+c***********************************************************************
+c
+      subroutine conreffacedoub3d0(
+conref_op_face_3d(`double precision',0,1,2)dnl
+c
+      subroutine conreffacedoub3d1(
+conref_op_face_3d(`double precision',1,2,0)dnl
+c
+      subroutine conreffacedoub3d2(
+conref_op_face_3d(`double precision',2,0,1)dnl
+c
+c***********************************************************************
+c Constant interpolation for 3d face-centered float data
+c***********************************************************************
+c
+      subroutine conreffaceflot3d0(
+conref_op_face_3d(`real',0,1,2)dnl
+c
+      subroutine conreffaceflot3d1(
+conref_op_face_3d(`real',1,2,0)dnl
+c
+      subroutine conreffaceflot3d2(
+conref_op_face_3d(`real',2,0,1)dnl
+c
+c***********************************************************************
+c Constant interpolation for 3d face-centered complex data
+c***********************************************************************
+c
+      subroutine conreffacecplx3d0(
+conref_op_face_3d(`double complex',0,1,2)dnl
+c
+      subroutine conreffacecplx3d1(
+conref_op_face_3d(`double complex',1,2,0)dnl
+c
+      subroutine conreffacecplx3d2(
+conref_op_face_3d(`double complex',2,0,1)dnl
+c
+c***********************************************************************
+c Constant interpolation for 3d face-centered integer data
+c***********************************************************************
+c
+      subroutine conreffaceintg3d0(
+conref_op_face_3d(`integer',0,1,2)dnl
+c
+      subroutine conreffaceintg3d1(
+conref_op_face_3d(`integer',1,2,0)dnl
+c
+      subroutine conreffaceintg3d2(
+conref_op_face_3d(`integer',2,0,1)dnl
+c
+c***********************************************************************
+c Constant interpolation for 3d outerface double data
+c***********************************************************************
+c
+      subroutine conrefoutfacedoub3d0(
+conref_op_outerface_3d(`double precision',0,1,2)dnl
+c
+      subroutine conrefoutfacedoub3d1(
+conref_op_outerface_3d(`double precision',1,2,0)dnl
+c
+      subroutine conrefoutfacedoub3d2(
+conref_op_outerface_3d(`double precision',2,0,1)dnl
+c
+c***********************************************************************
+c Constant interpolation for 3d outerface float data
+c***********************************************************************
+c
+      subroutine conrefoutfaceflot3d0(
+conref_op_outerface_3d(`real',0,1,2)dnl
+c
+      subroutine conrefoutfaceflot3d1(
+conref_op_outerface_3d(`real',1,2,0)dnl
+c
+      subroutine conrefoutfaceflot3d2(
+conref_op_outerface_3d(`real',2,0,1)dnl
+c
+c***********************************************************************
+c Constant interpolation for 3d outerface complex data
+c***********************************************************************
+c
+      subroutine conrefoutfacecplx3d0(
+conref_op_outerface_3d(`double complex',0,1,2)dnl
+c
+      subroutine conrefoutfacecplx3d1(
+conref_op_outerface_3d(`double complex',1,2,0)dnl
+c
+      subroutine conrefoutfacecplx3d2(
+conref_op_outerface_3d(`double complex',2,0,1)dnl
+c
+c***********************************************************************
+c Constant interpolation for 3d outerface integer data
+c***********************************************************************
+c
+      subroutine conrefoutfaceintg3d0(
+conref_op_outerface_3d(`integer',0,1,2)dnl
+c
+      subroutine conrefoutfaceintg3d1(
+conref_op_outerface_3d(`integer',1,2,0)dnl
+c
+      subroutine conrefoutfaceintg3d2(
+conref_op_outerface_3d(`integer',2,0,1)dnl
+c
+c***********************************************************************
+c Constant interpolation for 3d side-centered double data
+c***********************************************************************
+c
+      subroutine conrefsidedoub3d0(
+conref_op_side_3d(`double precision',0,1,2)dnl
+c
+      subroutine conrefsidedoub3d1(
+conref_op_side_3d(`double precision',1,2,0)dnl
+c
+      subroutine conrefsidedoub3d2(
+conref_op_side_3d(`double precision',2,0,1)dnl
+c
+c***********************************************************************
+c Constant interpolation for 3d side-centered float data
+c***********************************************************************
+c
+      subroutine conrefsideflot3d0(
+conref_op_side_3d(`real',0,1,2)dnl
+c
+      subroutine conrefsideflot3d1(
+conref_op_side_3d(`real',1,2,0)dnl
+c
+      subroutine conrefsideflot3d2(
+conref_op_side_3d(`real',2,0,1)dnl
+c
+c***********************************************************************
+c Constant interpolation for 3d side-centered complex data
+c***********************************************************************
+c
+      subroutine conrefsidecplx3d0(
+conref_op_side_3d(`double complex',0,1,2)dnl
+c
+      subroutine conrefsidecplx3d1(
+conref_op_side_3d(`double complex',1,2,0)dnl
+c
+      subroutine conrefsidecplx3d2(
+conref_op_side_3d(`double complex',2,0,1)dnl
+c
+c***********************************************************************
+c Constant interpolation for 3d side-centered integer data
+c***********************************************************************
+c
+      subroutine conrefsideintg3d0(
+conref_op_side_3d(`integer',0,1,2)dnl
+c
+      subroutine conrefsideintg3d1(
+conref_op_side_3d(`integer',1,2,0)dnl
+c
+      subroutine conrefsideintg3d2(
+conref_op_side_3d(`integer',2,0,1)dnl
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_dbugfort1d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_dbugfort1d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,421 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_dbugfort1d.m4 $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: F77 routines for debugging 1d patch data types.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_dbugstuff1d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 1d patchdata debugging routines
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim1d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 1d arrays in FORTRAN routines.
+c
+c
+c
+c
+c***********************************************************************
+c Debugging routines for 1d cell-centered data
+c***********************************************************************
+c
+      subroutine dbugcelldoub1d(
+     &  fi0,la0,ng,ibeg0,iend0,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,ng,ibeg0,iend0
+      double precision
+     &  array(fi0-ng:la0+ng)
+      integer ic0
+c     =============================================================
+
+      do ic0=ibeg0,iend0
+         write(6,*) "array[",ic0,"] = ",array(ic0)
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugcellflot1d(
+     &  fi0,la0,ng,ibeg0,iend0,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,ng,ibeg0,iend0
+      real
+     &  array(fi0-ng:la0+ng)
+      integer ic0
+c     =============================================================
+
+      do ic0=ibeg0,iend0
+         write(6,*) "array[",ic0,"] = ",array(ic0)
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugcellcplx1d(
+     &  fi0,la0,ng,ibeg0,iend0,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,ng,ibeg0,iend0
+      double complex
+     &  array(fi0-ng:la0+ng)
+      integer ic0
+c     =============================================================
+
+      do ic0=ibeg0,iend0
+         write(6,*) "array[",ic0,"] = ",array(ic0)
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+c
+c***********************************************************************
+c Debugging routines for 1d face-centered data
+c***********************************************************************
+c
+      subroutine dbugfacedoub1d(
+     &  fi0,la0,ng,ibeg0,iend0,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,ng,ibeg0,iend0
+      double precision
+     &  array(fi0-ng:la0+1+ng)
+      integer ie0
+c     =============================================================
+
+      do ie0=ibeg0,iend0+1
+         write(6,*) "array[",ie0,"] = ",array(ie0)
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugfaceflot1d(
+     &  fi0,la0,ng,ibeg0,iend0,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,ng,ibeg0,iend0
+      real
+     &  array(fi0-ng:la0+1+ng)
+      integer ie0
+c     =============================================================
+
+      do ie0=ibeg0,iend0+1
+         write(6,*) "array[",ie0,"] = ",array(ie0)
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugfacecplx1d(
+     &  fi0,la0,ng,ibeg0,iend0,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,ng,ibeg0,iend0
+      double complex
+     &  array(fi0-ng:la0+1+ng)
+      integer ie0
+c     =============================================================
+
+      do ie0=ibeg0,iend0+1
+         write(6,*) "array[",ie0,"] = ",array(ie0)
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+c
+c***********************************************************************
+c Debugging routines for 1d node-centered data
+c***********************************************************************
+c
+      subroutine dbugnodedoub1d(
+     &  fi0,la0,ng,ibeg0,iend0,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,ng,ibeg0,iend0
+      double precision
+     &  array(fi0-ng:la0+1+ng)
+      integer ie0
+c     =============================================================
+
+      do ie0=ibeg0,iend0+1
+         write(6,*) "array[",ie0,"] = ",array(ie0)
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugnodeflot1d(
+     &  fi0,la0,ng,ibeg0,iend0,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,ng,ibeg0,iend0
+      real
+     &  array(fi0-ng:la0+1+ng)
+      integer ie0
+c     =============================================================
+
+      do ie0=ibeg0,iend0+1
+         write(6,*) "array[",ie0,"] = ",array(ie0)
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugnodecplx1d(
+     &  fi0,la0,ng,ibeg0,iend0,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,ng,ibeg0,iend0
+      double complex
+     &  array(fi0-ng:la0+1+ng)
+      integer ie0
+c     =============================================================
+
+      do ie0=ibeg0,iend0+1
+         write(6,*) "array[",ie0,"] = ",array(ie0)
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+c
+c***********************************************************************
+c Debugging routines for 1d outerface data
+c***********************************************************************
+c
+      subroutine dbugoutfacedoub1d(
+     &  fi0,la0,ng,ibeg0,iend0,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,ng,ibeg0,iend0
+      double precision
+     &  array(1)
+c     =============================================================
+
+      write(6,*) "array[",1,"] = ",array(1)
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutfaceflot1d(
+     &  fi0,la0,ng,ibeg0,iend0,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,ng,ibeg0,iend0
+      real
+     &  array(1)
+c     =============================================================
+
+      write(6,*) "array[",1,"] = ",array(1)
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutfacecplx1d(
+     &  fi0,la0,ng,ibeg0,iend0,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,ng,ibeg0,iend0
+      double complex
+     &  array(1)
+c     =============================================================
+
+      write(6,*) "array[",1,"] = ",array(1)
+
+      call flush(6)
+      return
+      end
+c
+c
+c***********************************************************************
+c Debugging routines for 1d outerside data
+c***********************************************************************
+c
+      subroutine dbugoutsidedoub1d(
+     &  fi0,la0,ng,ibeg0,iend0,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,ng,ibeg0,iend0
+      double precision
+     &  array(1)
+c     =============================================================
+
+      write(6,*) "array[",1,"] = ",array(1)
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutsideflot1d(
+     &  fi0,la0,ng,ibeg0,iend0,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,ng,ibeg0,iend0
+      real
+     &  array(1)
+c     =============================================================
+
+      write(6,*) "array[",1,"] = ",array(1)
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutsidecplx1d(
+     &  fi0,la0,ng,ibeg0,iend0,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,ng,ibeg0,iend0
+      double complex
+     &  array(1)
+c     =============================================================
+
+      write(6,*) "array[",1,"] = ",array(1)
+
+      call flush(6)
+      return
+      end
+c
+c
+c***********************************************************************
+c Debugging routines for 1d side-centered data
+c***********************************************************************
+c
+      subroutine dbugsidedoub1d(
+     &  fi0,la0,ng,ibeg0,iend0,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,ng,ibeg0,iend0
+      double precision
+     &  array(fi0-ng:la0+1+ng)
+      integer ie0
+c     =============================================================
+
+      do ie0=ibeg0,iend0+1
+         write(6,*) "array[",ie0,"] = ",array(ie0)
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugsideflot1d(
+     &  fi0,la0,ng,ibeg0,iend0,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,ng,ibeg0,iend0
+      real
+     &  array(fi0-ng:la0+1+ng)
+      integer ie0
+c     =============================================================
+
+      do ie0=ibeg0,iend0+1
+         write(6,*) "array[",ie0,"] = ",array(ie0)
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugsidecplx1d(
+     &  fi0,la0,ng,ibeg0,iend0,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,ng,ibeg0,iend0
+      double complex
+     &  array(fi0-ng:la0+1+ng)
+      integer ie0
+c     =============================================================
+
+      do ie0=ibeg0,iend0+1
+         write(6,*) "array[",ie0,"] = ",array(ie0)
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+c
+c***********************************************************************
+c Debugging routines for 1d edge-centered data
+c***********************************************************************
+c
+      subroutine dbugedgedoub1d(
+     &  fi0,la0,ng,ibeg0,iend0,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,ng,ibeg0,iend0
+      double precision
+     &  array(fi0-ng:la0+ng)
+      integer ie0
+c     =============================================================
+
+      do ie0=ibeg0,iend0
+         write(6,*) "array[",ie0,"] = ",array(ie0)
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugedgeflot1d(
+     &  fi0,la0,ng,ibeg0,iend0,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,ng,ibeg0,iend0
+      real
+     &  array(fi0-ng:la0+ng)
+      integer ie0
+c     =============================================================
+
+      do ie0=ibeg0,iend0
+         write(6,*) "array[",ie0,"] = ",array(ie0)
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugedgecplx1d(
+     &  fi0,la0,ng,ibeg0,iend0,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,ng,ibeg0,iend0
+      double complex
+     &  array(fi0-ng:la0+ng)
+      integer ie0
+c     =============================================================
+
+      do ie0=ibeg0,iend0
+         write(6,*) "array[",ie0,"] = ",array(ie0)
+      enddo
+
+      call flush(6)
+      return
+      end
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_dbugfort1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_dbugfort1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,107 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_dbugfort1d.m4 $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: F77 routines for debugging 1d patch data types.
+c
+include(pdat_dbugstuff1d.i)dnl
+c
+c***********************************************************************
+c Debugging routines for 1d cell-centered data
+c***********************************************************************
+c
+      subroutine dbugcelldoub1d(
+pdat_debug_cell_1d(`double precision')dnl
+c
+      subroutine dbugcellflot1d(
+pdat_debug_cell_1d(`real')dnl
+c
+      subroutine dbugcellcplx1d(
+pdat_debug_cell_1d(`double complex')dnl
+c
+c
+c***********************************************************************
+c Debugging routines for 1d face-centered data
+c***********************************************************************
+c
+      subroutine dbugfacedoub1d(
+pdat_debug_face_1d(`double precision')dnl
+c
+      subroutine dbugfaceflot1d(
+pdat_debug_face_1d(`real')dnl
+c
+      subroutine dbugfacecplx1d(
+pdat_debug_face_1d(`double complex')dnl
+c
+c
+c***********************************************************************
+c Debugging routines for 1d node-centered data
+c***********************************************************************
+c
+      subroutine dbugnodedoub1d(
+pdat_debug_node_1d(`double precision')dnl
+c
+      subroutine dbugnodeflot1d(
+pdat_debug_node_1d(`real')dnl
+c
+      subroutine dbugnodecplx1d(
+pdat_debug_node_1d(`double complex')dnl
+c
+c
+c***********************************************************************
+c Debugging routines for 1d outerface data
+c***********************************************************************
+c
+      subroutine dbugoutfacedoub1d(
+pdat_debug_outerface_1d(`double precision')dnl
+c
+      subroutine dbugoutfaceflot1d(
+pdat_debug_outerface_1d(`real')dnl
+c
+      subroutine dbugoutfacecplx1d(
+pdat_debug_outerface_1d(`double complex')dnl
+c
+c
+c***********************************************************************
+c Debugging routines for 1d outerside data
+c***********************************************************************
+c
+      subroutine dbugoutsidedoub1d(
+pdat_debug_outerside_1d(`double precision')dnl
+c
+      subroutine dbugoutsideflot1d(
+pdat_debug_outerside_1d(`real')dnl
+c
+      subroutine dbugoutsidecplx1d(
+pdat_debug_outerside_1d(`double complex')dnl
+c
+c
+c***********************************************************************
+c Debugging routines for 1d side-centered data
+c***********************************************************************
+c
+      subroutine dbugsidedoub1d(
+pdat_debug_side_1d(`double precision')dnl
+c
+      subroutine dbugsideflot1d(
+pdat_debug_side_1d(`real')dnl
+c
+      subroutine dbugsidecplx1d(
+pdat_debug_side_1d(`double complex')dnl
+c
+c
+c***********************************************************************
+c Debugging routines for 1d edge-centered data
+c***********************************************************************
+c
+      subroutine dbugedgedoub1d(
+pdat_debug_edge_1d(`double precision')dnl
+c
+      subroutine dbugedgeflot1d(
+pdat_debug_edge_1d(`real')dnl
+c
+      subroutine dbugedgecplx1d(
+pdat_debug_edge_1d(`double complex')dnl
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_dbugfort2d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_dbugfort2d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,853 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_dbugfort2d.m4 $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: F77 routines for debugging 2d patch data types.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_dbugstuff2d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 2d patchdata debugging routines
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim2d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 2d arrays in FORTRAN routines.
+c
+c
+c
+c
+c***********************************************************************
+c Debugging routines for 2d cell-centered data
+c***********************************************************************
+c
+      subroutine dbugcelldoub2d(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      double precision
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+ng)
+      integer ic0,ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1
+         do ic0=ibeg0,iend0 
+            write(6,*) "array[",ic0,",",ic1,"] = ",array(ic0,ic1)
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugcellflot2d(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      real
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+ng)
+      integer ic0,ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1
+         do ic0=ibeg0,iend0 
+            write(6,*) "array[",ic0,",",ic1,"] = ",array(ic0,ic1)
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugcellcplx2d(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      double complex
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+ng)
+      integer ic0,ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1
+         do ic0=ibeg0,iend0 
+            write(6,*) "array[",ic0,",",ic1,"] = ",array(ic0,ic1)
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+c
+c***********************************************************************
+c Debugging routines for 2d face-centered data
+c***********************************************************************
+c
+      subroutine dbugfacedoub2d0(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      double precision
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+ng)
+      integer ie0,ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1
+         do ie0=ibeg0,iend0+1 
+            write(6,*) "array[",ie0,",",ic1,"] = ",array(ie0,ic1)
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugfacedoub2d1(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      double precision
+     &  array(fi1-ng:la1+1+ng,
+     &          fi0-ng:la0+ng)
+      integer ie1,ic0
+c     =============================================================
+
+      do ic0=ibeg0,iend0
+         do ie1=ibeg1,iend1+1 
+            write(6,*) "array[",ie1,",",ic0,"] = ",array(ie1,ic0)
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugfaceflot2d0(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      real
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+ng)
+      integer ie0,ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1
+         do ie0=ibeg0,iend0+1 
+            write(6,*) "array[",ie0,",",ic1,"] = ",array(ie0,ic1)
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugfaceflot2d1(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      real
+     &  array(fi1-ng:la1+1+ng,
+     &          fi0-ng:la0+ng)
+      integer ie1,ic0
+c     =============================================================
+
+      do ic0=ibeg0,iend0
+         do ie1=ibeg1,iend1+1 
+            write(6,*) "array[",ie1,",",ic0,"] = ",array(ie1,ic0)
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugfacecplx2d0(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      double complex
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+ng)
+      integer ie0,ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1
+         do ie0=ibeg0,iend0+1 
+            write(6,*) "array[",ie0,",",ic1,"] = ",array(ie0,ic1)
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugfacecplx2d1(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      double complex
+     &  array(fi1-ng:la1+1+ng,
+     &          fi0-ng:la0+ng)
+      integer ie1,ic0
+c     =============================================================
+
+      do ic0=ibeg0,iend0
+         do ie1=ibeg1,iend1+1 
+            write(6,*) "array[",ie1,",",ic0,"] = ",array(ie1,ic0)
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+c
+c***********************************************************************
+c Debugging routines for 2d node-centered data
+c***********************************************************************
+c
+      subroutine dbugnodedoub2d(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      double precision
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+1+ng)
+      integer ie0,ie1
+c     =============================================================
+
+      do ie1=ibeg1,iend1+1
+         do ie0=ibeg0,iend0+1 
+            write(6,*) "array[",ie0,",",ie1,"] = ",array(ie0,ie1)
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugnodeflot2d(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      real
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+1+ng)
+      integer ie0,ie1
+c     =============================================================
+
+      do ie1=ibeg1,iend1+1
+         do ie0=ibeg0,iend0+1 
+            write(6,*) "array[",ie0,",",ie1,"] = ",array(ie0,ie1)
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugnodecplx2d(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      double complex
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+1+ng)
+      integer ie0,ie1
+c     =============================================================
+
+      do ie1=ibeg1,iend1+1
+         do ie0=ibeg0,iend0+1 
+            write(6,*) "array[",ie0,",",ie1,"] = ",array(ie0,ie1)
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+c
+c***********************************************************************
+c Debugging routines for 2d outerface data
+c***********************************************************************
+c
+      subroutine dbugoutfacedoub2d0(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      double precision
+     &  array(fi1-ng:la1+ng)
+      integer ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1
+         write(6,*) "array[",ic1,"] = ",array(ic1)
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutfacedoub2d1(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      double precision
+     &  array(fi0-ng:la0+ng)
+      integer ic0
+c     =============================================================
+
+      do ic0=ibeg0,iend0
+         write(6,*) "array[",ic0,"] = ",array(ic0)
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutfaceflot2d0(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      real
+     &  array(fi1-ng:la1+ng)
+      integer ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1
+         write(6,*) "array[",ic1,"] = ",array(ic1)
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutfaceflot2d1(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      real
+     &  array(fi0-ng:la0+ng)
+      integer ic0
+c     =============================================================
+
+      do ic0=ibeg0,iend0
+         write(6,*) "array[",ic0,"] = ",array(ic0)
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutfacecplx2d0(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      double complex
+     &  array(fi1-ng:la1+ng)
+      integer ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1
+         write(6,*) "array[",ic1,"] = ",array(ic1)
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutfacecplx2d1(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      double complex
+     &  array(fi0-ng:la0+ng)
+      integer ic0
+c     =============================================================
+
+      do ic0=ibeg0,iend0
+         write(6,*) "array[",ic0,"] = ",array(ic0)
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+c
+c***********************************************************************
+c Debugging routines for 2d outerside data
+c***********************************************************************
+c
+      subroutine dbugoutsidedoub2d0(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      double precision
+     &  array(fi1-ng:la1+ng)
+      integer ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1
+         write(6,*) "array[",ic1,"] = ",array(ic1)
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutsidedoub2d1(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      double precision
+     &  array(fi0-ng:la0+ng)
+      integer ic0
+c     =============================================================
+
+      do ic0=ibeg0,iend0
+         write(6,*) "array[",ic0,"] = ",array(ic0)
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutsideflot2d0(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      real
+     &  array(fi1-ng:la1+ng)
+      integer ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1
+         write(6,*) "array[",ic1,"] = ",array(ic1)
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutsideflot2d1(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      real
+     &  array(fi0-ng:la0+ng)
+      integer ic0
+c     =============================================================
+
+      do ic0=ibeg0,iend0
+         write(6,*) "array[",ic0,"] = ",array(ic0)
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutsidecplx2d0(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      double complex
+     &  array(fi1-ng:la1+ng)
+      integer ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1
+         write(6,*) "array[",ic1,"] = ",array(ic1)
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutsidecplx2d1(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      double complex
+     &  array(fi0-ng:la0+ng)
+      integer ic0
+c     =============================================================
+
+      do ic0=ibeg0,iend0
+         write(6,*) "array[",ic0,"] = ",array(ic0)
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+c
+c***********************************************************************
+c Debugging routines for 2d side-centered data
+c***********************************************************************
+c
+      subroutine dbugsidedoub2d0(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      double precision
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+ng)
+      integer ie0,ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1+0
+         do ie0=ibeg0,iend0+1 
+            write(6,*) "array[",ie0,",",ic1,"] = ",array(ie0,ic1)
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugsidedoub2d1(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      double precision
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+1+ng)
+      integer ie0,ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1+1
+         do ie0=ibeg0,iend0+0 
+            write(6,*) "array[",ie0,",",ic1,"] = ",array(ie0,ic1)
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugsideflot2d0(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      real
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+ng)
+      integer ie0,ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1+0
+         do ie0=ibeg0,iend0+1 
+            write(6,*) "array[",ie0,",",ic1,"] = ",array(ie0,ic1)
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugsideflot2d1(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      real
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+1+ng)
+      integer ie0,ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1+1
+         do ie0=ibeg0,iend0+0 
+            write(6,*) "array[",ie0,",",ic1,"] = ",array(ie0,ic1)
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugsidecplx2d0(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      double complex
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+ng)
+      integer ie0,ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1+0
+         do ie0=ibeg0,iend0+1 
+            write(6,*) "array[",ie0,",",ic1,"] = ",array(ie0,ic1)
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugsidecplx2d1(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      double complex
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+1+ng)
+      integer ie0,ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1+1
+         do ie0=ibeg0,iend0+0 
+            write(6,*) "array[",ie0,",",ic1,"] = ",array(ie0,ic1)
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+c
+c***********************************************************************
+c Debugging routines for 2d edge-centered data
+c***********************************************************************
+c
+      subroutine dbugedgedoub2d0(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      double precision
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+1+ng)
+      integer ie0,ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1+1
+         do ie0=ibeg0,iend0+0 
+            write(6,*) "array[",ie0,",",ic1,"] = ",array(ie0,ic1)
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugedgedoub2d1(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      double precision
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+ng)
+      integer ie0,ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1+0
+         do ie0=ibeg0,iend0+1 
+            write(6,*) "array[",ie0,",",ic1,"] = ",array(ie0,ic1)
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugedgeflot2d0(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      real
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+1+ng)
+      integer ie0,ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1+1
+         do ie0=ibeg0,iend0+0 
+            write(6,*) "array[",ie0,",",ic1,"] = ",array(ie0,ic1)
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugedgeflot2d1(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      real
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+ng)
+      integer ie0,ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1+0
+         do ie0=ibeg0,iend0+1 
+            write(6,*) "array[",ie0,",",ic1,"] = ",array(ie0,ic1)
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugedgecplx2d0(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      double complex
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+1+ng)
+      integer ie0,ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1+1
+         do ie0=ibeg0,iend0+0 
+            write(6,*) "array[",ie0,",",ic1,"] = ",array(ie0,ic1)
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugedgecplx2d1(
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+      double complex
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+ng)
+      integer ie0,ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1+0
+         do ie0=ibeg0,iend0+1 
+            write(6,*) "array[",ie0,",",ic1,"] = ",array(ie0,ic1)
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_dbugfort2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_dbugfort2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,152 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_dbugfort2d.m4 $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: F77 routines for debugging 2d patch data types.
+c
+include(pdat_dbugstuff2d.i)dnl
+c
+c***********************************************************************
+c Debugging routines for 2d cell-centered data
+c***********************************************************************
+c
+      subroutine dbugcelldoub2d(
+pdat_debug_cell_2d(`double precision')dnl
+c
+      subroutine dbugcellflot2d(
+pdat_debug_cell_2d(`real')dnl
+c
+      subroutine dbugcellcplx2d(
+pdat_debug_cell_2d(`double complex')dnl
+c
+c
+c***********************************************************************
+c Debugging routines for 2d face-centered data
+c***********************************************************************
+c
+      subroutine dbugfacedoub2d0(
+pdat_debug_face_2d(`double precision',0,1)dnl
+c
+      subroutine dbugfacedoub2d1(
+pdat_debug_face_2d(`double precision',1,0)dnl
+c
+      subroutine dbugfaceflot2d0(
+pdat_debug_face_2d(`real',0,1)dnl
+c
+      subroutine dbugfaceflot2d1(
+pdat_debug_face_2d(`real',1,0)dnl
+c
+      subroutine dbugfacecplx2d0(
+pdat_debug_face_2d(`double complex',0,1)dnl
+c
+      subroutine dbugfacecplx2d1(
+pdat_debug_face_2d(`double complex',1,0)dnl
+c
+c
+c***********************************************************************
+c Debugging routines for 2d node-centered data
+c***********************************************************************
+c
+      subroutine dbugnodedoub2d(
+pdat_debug_node_2d(`double precision')dnl
+c
+      subroutine dbugnodeflot2d(
+pdat_debug_node_2d(`real')dnl
+c
+      subroutine dbugnodecplx2d(
+pdat_debug_node_2d(`double complex')dnl
+c
+c
+c***********************************************************************
+c Debugging routines for 2d outerface data
+c***********************************************************************
+c
+      subroutine dbugoutfacedoub2d0(
+pdat_debug_outerface_2d(`double precision',0,1)dnl
+c
+      subroutine dbugoutfacedoub2d1(
+pdat_debug_outerface_2d(`double precision',1,0)dnl
+c
+      subroutine dbugoutfaceflot2d0(
+pdat_debug_outerface_2d(`real',0,1)dnl
+c
+      subroutine dbugoutfaceflot2d1(
+pdat_debug_outerface_2d(`real',1,0)dnl
+c
+      subroutine dbugoutfacecplx2d0(
+pdat_debug_outerface_2d(`double complex',0,1)dnl
+c
+      subroutine dbugoutfacecplx2d1(
+pdat_debug_outerface_2d(`double complex',1,0)dnl
+c
+c
+c***********************************************************************
+c Debugging routines for 2d outerside data
+c***********************************************************************
+c
+      subroutine dbugoutsidedoub2d0(
+pdat_debug_outerside_2d(`double precision',0,1)dnl
+c
+      subroutine dbugoutsidedoub2d1(
+pdat_debug_outerside_2d(`double precision',1,0)dnl
+c
+      subroutine dbugoutsideflot2d0(
+pdat_debug_outerside_2d(`real',0,1)dnl
+c
+      subroutine dbugoutsideflot2d1(
+pdat_debug_outerside_2d(`real',1,0)dnl
+c
+      subroutine dbugoutsidecplx2d0(
+pdat_debug_outerside_2d(`double complex',0,1)dnl
+c
+      subroutine dbugoutsidecplx2d1(
+pdat_debug_outerside_2d(`double complex',1,0)dnl
+c
+c
+c***********************************************************************
+c Debugging routines for 2d side-centered data
+c***********************************************************************
+c
+      subroutine dbugsidedoub2d0(
+pdat_debug_side_2d(`double precision',0,1)dnl
+c
+      subroutine dbugsidedoub2d1(
+pdat_debug_side_2d(`double precision',1,0)dnl
+c
+      subroutine dbugsideflot2d0(
+pdat_debug_side_2d(`real',0,1)dnl
+c
+      subroutine dbugsideflot2d1(
+pdat_debug_side_2d(`real',1,0)dnl
+c
+      subroutine dbugsidecplx2d0(
+pdat_debug_side_2d(`double complex',0,1)dnl
+c
+      subroutine dbugsidecplx2d1(
+pdat_debug_side_2d(`double complex',1,0)dnl
+c
+c
+c***********************************************************************
+c Debugging routines for 2d edge-centered data
+c***********************************************************************
+c
+      subroutine dbugedgedoub2d0(
+pdat_debug_edge_2d(`double precision',0,1)dnl
+c
+      subroutine dbugedgedoub2d1(
+pdat_debug_edge_2d(`double precision',1,0)dnl
+c
+      subroutine dbugedgeflot2d0(
+pdat_debug_edge_2d(`real',0,1)dnl
+c
+      subroutine dbugedgeflot2d1(
+pdat_debug_edge_2d(`real',1,0)dnl
+c
+      subroutine dbugedgecplx2d0(
+pdat_debug_edge_2d(`double complex',0,1)dnl
+c
+      subroutine dbugedgecplx2d1(
+pdat_debug_edge_2d(`double complex',1,0)dnl
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_dbugfort3d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_dbugfort3d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1386 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_dbugfort3d.m4 $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: F77 routines for debugging 3d patch data types.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_dbugstuff3d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 3d patchdata debugging routines
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim3d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 3d arrays in FORTRAN routines.
+c
+c
+c
+
+
+c
+c***********************************************************************
+c Debugging routines for 3d cell-centered data
+c***********************************************************************
+c
+      subroutine dbugcelldoub3d(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double precision
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+ng,
+     &          fi2-ng:la2+ng)
+      integer ic0,ic1,ic2
+c     =============================================================
+
+      do ic2=ibeg2,iend2
+         do ic1=ibeg1,iend1
+            do ic0=ibeg0,iend0 
+               write(6,*) "array[",ic0,",",ic1,",",ic2,"] = ",
+     &         array(ic0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugcellflot3d(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      real
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+ng,
+     &          fi2-ng:la2+ng)
+      integer ic0,ic1,ic2
+c     =============================================================
+
+      do ic2=ibeg2,iend2
+         do ic1=ibeg1,iend1
+            do ic0=ibeg0,iend0 
+               write(6,*) "array[",ic0,",",ic1,",",ic2,"] = ",
+     &         array(ic0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugcellcplx3d(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double complex
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+ng,
+     &          fi2-ng:la2+ng)
+      integer ic0,ic1,ic2
+c     =============================================================
+
+      do ic2=ibeg2,iend2
+         do ic1=ibeg1,iend1
+            do ic0=ibeg0,iend0 
+               write(6,*) "array[",ic0,",",ic1,",",ic2,"] = ",
+     &         array(ic0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+c
+c***********************************************************************
+c Debugging routines for 3d face-centered data
+c***********************************************************************
+c
+      subroutine dbugfacedoub3d0(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double precision
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+ng,
+     &          fi2-ng:la2+ng)
+      integer ie0,ic1,ic2
+c     =============================================================
+
+      do ic2=ibeg2,iend2
+         do ic1=ibeg1,iend1
+            do ie0=ibeg0,iend0+1 
+               write(6,*) "array[",ie0,",",ic1,",",ic2,"] = ",
+     &         array(ie0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugfacedoub3d1(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double precision
+     &  array(fi1-ng:la1+1+ng,
+     &          fi2-ng:la2+ng,
+     &          fi0-ng:la0+ng)
+      integer ie1,ic2,ic0
+c     =============================================================
+
+      do ic0=ibeg0,iend0
+         do ic2=ibeg2,iend2
+            do ie1=ibeg1,iend1+1 
+               write(6,*) "array[",ie1,",",ic2,",",ic0,"] = ",
+     &         array(ie1,ic2,ic0)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugfacedoub3d2(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double precision
+     &  array(fi2-ng:la2+1+ng,
+     &          fi0-ng:la0+ng,
+     &          fi1-ng:la1+ng)
+      integer ie2,ic0,ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1
+         do ic0=ibeg0,iend0
+            do ie2=ibeg2,iend2+1 
+               write(6,*) "array[",ie2,",",ic0,",",ic1,"] = ",
+     &         array(ie2,ic0,ic1)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugfaceflot3d0(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      real
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+ng,
+     &          fi2-ng:la2+ng)
+      integer ie0,ic1,ic2
+c     =============================================================
+
+      do ic2=ibeg2,iend2
+         do ic1=ibeg1,iend1
+            do ie0=ibeg0,iend0+1 
+               write(6,*) "array[",ie0,",",ic1,",",ic2,"] = ",
+     &         array(ie0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugfaceflot3d1(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      real
+     &  array(fi1-ng:la1+1+ng,
+     &          fi2-ng:la2+ng,
+     &          fi0-ng:la0+ng)
+      integer ie1,ic2,ic0
+c     =============================================================
+
+      do ic0=ibeg0,iend0
+         do ic2=ibeg2,iend2
+            do ie1=ibeg1,iend1+1 
+               write(6,*) "array[",ie1,",",ic2,",",ic0,"] = ",
+     &         array(ie1,ic2,ic0)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugfaceflot3d2(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      real
+     &  array(fi2-ng:la2+1+ng,
+     &          fi0-ng:la0+ng,
+     &          fi1-ng:la1+ng)
+      integer ie2,ic0,ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1
+         do ic0=ibeg0,iend0
+            do ie2=ibeg2,iend2+1 
+               write(6,*) "array[",ie2,",",ic0,",",ic1,"] = ",
+     &         array(ie2,ic0,ic1)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugfacecplx3d0(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double complex
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+ng,
+     &          fi2-ng:la2+ng)
+      integer ie0,ic1,ic2
+c     =============================================================
+
+      do ic2=ibeg2,iend2
+         do ic1=ibeg1,iend1
+            do ie0=ibeg0,iend0+1 
+               write(6,*) "array[",ie0,",",ic1,",",ic2,"] = ",
+     &         array(ie0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugfacecplx3d1(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double complex
+     &  array(fi1-ng:la1+1+ng,
+     &          fi2-ng:la2+ng,
+     &          fi0-ng:la0+ng)
+      integer ie1,ic2,ic0
+c     =============================================================
+
+      do ic0=ibeg0,iend0
+         do ic2=ibeg2,iend2
+            do ie1=ibeg1,iend1+1 
+               write(6,*) "array[",ie1,",",ic2,",",ic0,"] = ",
+     &         array(ie1,ic2,ic0)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugfacecplx3d2(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double complex
+     &  array(fi2-ng:la2+1+ng,
+     &          fi0-ng:la0+ng,
+     &          fi1-ng:la1+ng)
+      integer ie2,ic0,ic1
+c     =============================================================
+
+      do ic1=ibeg1,iend1
+         do ic0=ibeg0,iend0
+            do ie2=ibeg2,iend2+1 
+               write(6,*) "array[",ie2,",",ic0,",",ic1,"] = ",
+     &         array(ie2,ic0,ic1)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+c
+c***********************************************************************
+c Debugging routines for 3d node-centered data
+c***********************************************************************
+c
+      subroutine dbugnodedoub3d(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double precision
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+1+ng,
+     &          fi2-ng:la2+1+ng)
+      integer ie0,ie1,ie2
+c     =============================================================
+
+      do ie2=ibeg2,iend2+1
+         do ie1=ibeg1,iend1+1
+            do ie0=ibeg0,iend0+1 
+               write(6,*) "array[",ie0,",",ie1,",",ie2,"] = ",
+     &         array(ie0,ie1,ie2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugnodeflot3d(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      real
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+1+ng,
+     &          fi2-ng:la2+1+ng)
+      integer ie0,ie1,ie2
+c     =============================================================
+
+      do ie2=ibeg2,iend2+1
+         do ie1=ibeg1,iend1+1
+            do ie0=ibeg0,iend0+1 
+               write(6,*) "array[",ie0,",",ie1,",",ie2,"] = ",
+     &         array(ie0,ie1,ie2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugnodecplx3d(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double complex
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+1+ng,
+     &          fi2-ng:la2+1+ng)
+      integer ie0,ie1,ie2
+c     =============================================================
+
+      do ie2=ibeg2,iend2+1
+         do ie1=ibeg1,iend1+1
+            do ie0=ibeg0,iend0+1 
+               write(6,*) "array[",ie0,",",ie1,",",ie2,"] = ",
+     &         array(ie0,ie1,ie2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+c
+c***********************************************************************
+c Debugging routines for 3d outerface data
+c***********************************************************************
+c
+      subroutine dbugoutfacedoub3d0(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double precision
+     &  array(fi1-ng:la1+ng,
+     &          fi2-ng:la2+ng)
+      integer ic1,ic2  
+c     =============================================================
+
+      do ic2=ibeg2,iend2
+         do ic1=ibeg1,iend1
+            write(6,*) "array[",ic1,",",ic2,"] = ",
+     &      array(ic1,ic2)
+         enddo
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutfacedoub3d1(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double precision
+     &  array(fi2-ng:la2+ng,
+     &          fi0-ng:la0+ng)
+      integer ic2,ic0  
+c     =============================================================
+
+      do ic0=ibeg0,iend0
+         do ic2=ibeg2,iend2
+            write(6,*) "array[",ic2,",",ic0,"] = ",
+     &      array(ic2,ic0)
+         enddo
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutfacedoub3d2(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double precision
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+ng)
+      integer ic0,ic1  
+c     =============================================================
+
+      do ic1=ibeg1,iend1
+         do ic0=ibeg0,iend0
+            write(6,*) "array[",ic0,",",ic1,"] = ",
+     &      array(ic0,ic1)
+         enddo
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutfaceflot3d0(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      real
+     &  array(fi1-ng:la1+ng,
+     &          fi2-ng:la2+ng)
+      integer ic1,ic2  
+c     =============================================================
+
+      do ic2=ibeg2,iend2
+         do ic1=ibeg1,iend1
+            write(6,*) "array[",ic1,",",ic2,"] = ",
+     &      array(ic1,ic2)
+         enddo
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutfaceflot3d1(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      real
+     &  array(fi2-ng:la2+ng,
+     &          fi0-ng:la0+ng)
+      integer ic2,ic0  
+c     =============================================================
+
+      do ic0=ibeg0,iend0
+         do ic2=ibeg2,iend2
+            write(6,*) "array[",ic2,",",ic0,"] = ",
+     &      array(ic2,ic0)
+         enddo
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutfaceflot3d2(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      real
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+ng)
+      integer ic0,ic1  
+c     =============================================================
+
+      do ic1=ibeg1,iend1
+         do ic0=ibeg0,iend0
+            write(6,*) "array[",ic0,",",ic1,"] = ",
+     &      array(ic0,ic1)
+         enddo
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutfacecplx3d0(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double complex
+     &  array(fi1-ng:la1+ng,
+     &          fi2-ng:la2+ng)
+      integer ic1,ic2  
+c     =============================================================
+
+      do ic2=ibeg2,iend2
+         do ic1=ibeg1,iend1
+            write(6,*) "array[",ic1,",",ic2,"] = ",
+     &      array(ic1,ic2)
+         enddo
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutfacecplx3d1(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double complex
+     &  array(fi2-ng:la2+ng,
+     &          fi0-ng:la0+ng)
+      integer ic2,ic0  
+c     =============================================================
+
+      do ic0=ibeg0,iend0
+         do ic2=ibeg2,iend2
+            write(6,*) "array[",ic2,",",ic0,"] = ",
+     &      array(ic2,ic0)
+         enddo
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutfacecplx3d2(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double complex
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+ng)
+      integer ic0,ic1  
+c     =============================================================
+
+      do ic1=ibeg1,iend1
+         do ic0=ibeg0,iend0
+            write(6,*) "array[",ic0,",",ic1,"] = ",
+     &      array(ic0,ic1)
+         enddo
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+c
+c***********************************************************************
+c Debugging routines for 3d outerside data
+c***********************************************************************
+c
+      subroutine dbugoutsidedoub3d0(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double precision
+     &  array(fi1-ng:la1+ng,
+     &          fi2-ng:la2+ng)
+      integer ic1,ic2  
+c     =============================================================
+
+      do ic2=ibeg2,iend2
+         do ic1=ibeg1,iend1
+            write(6,*) "array[",ic1,",",ic2,"] = ",
+     &      array(ic1,ic2)
+         enddo
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutsidedoub3d1(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double precision
+     &  array(fi0-ng:la0+ng,
+     &          fi2-ng:la2+ng)
+      integer ic2,ic0  
+c     =============================================================
+
+      do ic0=ibeg0,iend0
+         do ic2=ibeg2,iend2
+            write(6,*) "array[",ic2,",",ic0,"] = ",
+     &      array(ic2,ic0)
+         enddo
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutsidedoub3d2(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double precision
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+ng)
+      integer ic0,ic1  
+c     =============================================================
+
+      do ic1=ibeg1,iend1
+         do ic0=ibeg0,iend0
+            write(6,*) "array[",ic0,",",ic1,"] = ",
+     &      array(ic0,ic1)
+         enddo
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutsideflot3d0(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      real
+     &  array(fi1-ng:la1+ng,
+     &          fi2-ng:la2+ng)
+      integer ic1,ic2  
+c     =============================================================
+
+      do ic2=ibeg2,iend2
+         do ic1=ibeg1,iend1
+            write(6,*) "array[",ic1,",",ic2,"] = ",
+     &      array(ic1,ic2)
+         enddo
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutsideflot3d1(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      real
+     &  array(fi0-ng:la0+ng,
+     &          fi2-ng:la2+ng)
+      integer ic2,ic0  
+c     =============================================================
+
+      do ic0=ibeg0,iend0
+         do ic2=ibeg2,iend2
+            write(6,*) "array[",ic2,",",ic0,"] = ",
+     &      array(ic2,ic0)
+         enddo
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutsideflot3d2(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      real
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+ng)
+      integer ic0,ic1  
+c     =============================================================
+
+      do ic1=ibeg1,iend1
+         do ic0=ibeg0,iend0
+            write(6,*) "array[",ic0,",",ic1,"] = ",
+     &      array(ic0,ic1)
+         enddo
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutsidecplx3d0(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double complex
+     &  array(fi1-ng:la1+ng,
+     &          fi2-ng:la2+ng)
+      integer ic1,ic2  
+c     =============================================================
+
+      do ic2=ibeg2,iend2
+         do ic1=ibeg1,iend1
+            write(6,*) "array[",ic1,",",ic2,"] = ",
+     &      array(ic1,ic2)
+         enddo
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutsidecplx3d1(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double complex
+     &  array(fi0-ng:la0+ng,
+     &          fi2-ng:la2+ng)
+      integer ic2,ic0  
+c     =============================================================
+
+      do ic0=ibeg0,iend0
+         do ic2=ibeg2,iend2
+            write(6,*) "array[",ic2,",",ic0,"] = ",
+     &      array(ic2,ic0)
+         enddo
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugoutsidecplx3d2(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double complex
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+ng)
+      integer ic0,ic1  
+c     =============================================================
+
+      do ic1=ibeg1,iend1
+         do ic0=ibeg0,iend0
+            write(6,*) "array[",ic0,",",ic1,"] = ",
+     &      array(ic0,ic1)
+         enddo
+      enddo
+ 
+      call flush(6)
+      return
+      end
+c
+c
+c***********************************************************************
+c Debugging routines for 3d side-centered data
+c***********************************************************************
+c
+      subroutine dbugsidedoub3d0(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double precision
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+ng,
+     &          fi2-ng:la2+ng)
+      integer ie0,ic1,ic2
+c     =============================================================
+
+      do ic2=ibeg2,iend2
+         do ic1=ibeg1,iend1
+            do ie0=ibeg0,iend0+1 
+               write(6,*) "array[",ie0,",",ic1,",",ic2,"] = ",
+     &         array(ie0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugsidedoub3d1(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double precision
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+1+ng,
+     &          fi2-ng:la2+ng)
+      integer ie0,ic1,ic2
+c     =============================================================
+
+      do ic2=ibeg2,iend2
+         do ic1=ibeg1,iend1+1
+            do ie0=ibeg0,iend0 
+               write(6,*) "array[",ie0,",",ic1,",",ic2,"] = ",
+     &         array(ie0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugsidedoub3d2(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double precision
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+ng,
+     &          fi2-ng:la2+1+ng)
+      integer ie0,ic1,ic2
+c     =============================================================
+
+      do ic2=ibeg2,iend2+1
+         do ic1=ibeg1,iend1
+            do ie0=ibeg0,iend0 
+               write(6,*) "array[",ie0,",",ic1,",",ic2,"] = ",
+     &         array(ie0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugsideflot3d0(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      real
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+ng,
+     &          fi2-ng:la2+ng)
+      integer ie0,ic1,ic2
+c     =============================================================
+
+      do ic2=ibeg2,iend2
+         do ic1=ibeg1,iend1
+            do ie0=ibeg0,iend0+1 
+               write(6,*) "array[",ie0,",",ic1,",",ic2,"] = ",
+     &         array(ie0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugsideflot3d1(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      real
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+1+ng,
+     &          fi2-ng:la2+ng)
+      integer ie0,ic1,ic2
+c     =============================================================
+
+      do ic2=ibeg2,iend2
+         do ic1=ibeg1,iend1+1
+            do ie0=ibeg0,iend0 
+               write(6,*) "array[",ie0,",",ic1,",",ic2,"] = ",
+     &         array(ie0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugsideflot3d2(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      real
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+ng,
+     &          fi2-ng:la2+1+ng)
+      integer ie0,ic1,ic2
+c     =============================================================
+
+      do ic2=ibeg2,iend2+1
+         do ic1=ibeg1,iend1
+            do ie0=ibeg0,iend0 
+               write(6,*) "array[",ie0,",",ic1,",",ic2,"] = ",
+     &         array(ie0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugsidecplx3d0(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double complex
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+ng,
+     &          fi2-ng:la2+ng)
+      integer ie0,ic1,ic2
+c     =============================================================
+
+      do ic2=ibeg2,iend2
+         do ic1=ibeg1,iend1
+            do ie0=ibeg0,iend0+1 
+               write(6,*) "array[",ie0,",",ic1,",",ic2,"] = ",
+     &         array(ie0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugsidecplx3d1(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double complex
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+1+ng,
+     &          fi2-ng:la2+ng)
+      integer ie0,ic1,ic2
+c     =============================================================
+
+      do ic2=ibeg2,iend2
+         do ic1=ibeg1,iend1+1
+            do ie0=ibeg0,iend0 
+               write(6,*) "array[",ie0,",",ic1,",",ic2,"] = ",
+     &         array(ie0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugsidecplx3d2(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double complex
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+ng,
+     &          fi2-ng:la2+1+ng)
+      integer ie0,ic1,ic2
+c     =============================================================
+
+      do ic2=ibeg2,iend2+1
+         do ic1=ibeg1,iend1
+            do ie0=ibeg0,iend0 
+               write(6,*) "array[",ie0,",",ic1,",",ic2,"] = ",
+     &         array(ie0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+c
+c***********************************************************************
+c Debugging routines for 3d edge-centered data
+c***********************************************************************
+c
+      subroutine dbugedgedoub3d0(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double precision
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+1+ng,
+     &          fi2-ng:la2+1+ng)
+      integer ie0,ic1,ic2
+c     =============================================================
+
+      do ic2=ibeg2,iend2+1
+         do ic1=ibeg1,iend1+1
+            do ie0=ibeg0,iend0 
+               write(6,*) "array[",ie0,",",ic1,",",ic2,"] = ",
+     &         array(ie0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugedgedoub3d1(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double precision
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+ng,
+     &          fi2-ng:la2+1+ng)
+      integer ie0,ic1,ic2
+c     =============================================================
+
+      do ic2=ibeg2,iend2+1
+         do ic1=ibeg1,iend1
+            do ie0=ibeg0,iend0+1 
+               write(6,*) "array[",ie0,",",ic1,",",ic2,"] = ",
+     &         array(ie0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugedgedoub3d2(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double precision
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+1+ng,
+     &          fi2-ng:la2+ng)
+      integer ie0,ic1,ic2
+c     =============================================================
+
+      do ic2=ibeg2,iend2
+         do ic1=ibeg1,iend1+1
+            do ie0=ibeg0,iend0+1 
+               write(6,*) "array[",ie0,",",ic1,",",ic2,"] = ",
+     &         array(ie0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugedgeflot3d0(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      real
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+1+ng,
+     &          fi2-ng:la2+1+ng)
+      integer ie0,ic1,ic2
+c     =============================================================
+
+      do ic2=ibeg2,iend2+1
+         do ic1=ibeg1,iend1+1
+            do ie0=ibeg0,iend0 
+               write(6,*) "array[",ie0,",",ic1,",",ic2,"] = ",
+     &         array(ie0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugedgeflot3d1(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      real
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+ng,
+     &          fi2-ng:la2+1+ng)
+      integer ie0,ic1,ic2
+c     =============================================================
+
+      do ic2=ibeg2,iend2+1
+         do ic1=ibeg1,iend1
+            do ie0=ibeg0,iend0+1 
+               write(6,*) "array[",ie0,",",ic1,",",ic2,"] = ",
+     &         array(ie0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugedgeflot3d2(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      real
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+1+ng,
+     &          fi2-ng:la2+ng)
+      integer ie0,ic1,ic2
+c     =============================================================
+
+      do ic2=ibeg2,iend2
+         do ic1=ibeg1,iend1+1
+            do ie0=ibeg0,iend0+1 
+               write(6,*) "array[",ie0,",",ic1,",",ic2,"] = ",
+     &         array(ie0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugedgecplx3d0(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double complex
+     &  array(fi0-ng:la0+ng,
+     &          fi1-ng:la1+1+ng,
+     &          fi2-ng:la2+1+ng)
+      integer ie0,ic1,ic2
+c     =============================================================
+
+      do ic2=ibeg2,iend2+1
+         do ic1=ibeg1,iend1+1
+            do ie0=ibeg0,iend0 
+               write(6,*) "array[",ie0,",",ic1,",",ic2,"] = ",
+     &         array(ie0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugedgecplx3d1(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double complex
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+ng,
+     &          fi2-ng:la2+1+ng)
+      integer ie0,ic1,ic2
+c     =============================================================
+
+      do ic2=ibeg2,iend2+1
+         do ic1=ibeg1,iend1
+            do ie0=ibeg0,iend0+1 
+               write(6,*) "array[",ie0,",",ic1,",",ic2,"] = ",
+     &         array(ie0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
+      subroutine dbugedgecplx3d2(
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      double complex
+     &  array(fi0-ng:la0+1+ng,
+     &          fi1-ng:la1+1+ng,
+     &          fi2-ng:la2+ng)
+      integer ie0,ic1,ic2
+c     =============================================================
+
+      do ic2=ibeg2,iend2
+         do ic1=ibeg1,iend1+1
+            do ie0=ibeg0,iend0+1 
+               write(6,*) "array[",ie0,",",ic1,",",ic2,"] = ",
+     &         array(ie0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_dbugfort3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_dbugfort3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,197 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_dbugfort3d.m4 $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: F77 routines for debugging 3d patch data types.
+c
+include(pdat_dbugstuff3d.i)dnl
+c
+c***********************************************************************
+c Debugging routines for 3d cell-centered data
+c***********************************************************************
+c
+      subroutine dbugcelldoub3d(
+pdat_debug_cell_3d(`double precision')dnl
+c
+      subroutine dbugcellflot3d(
+pdat_debug_cell_3d(`real')dnl
+c
+      subroutine dbugcellcplx3d(
+pdat_debug_cell_3d(`double complex')dnl
+c
+c
+c***********************************************************************
+c Debugging routines for 3d face-centered data
+c***********************************************************************
+c
+      subroutine dbugfacedoub3d0(
+pdat_debug_face_3d(`double precision',0,1,2)dnl
+c
+      subroutine dbugfacedoub3d1(
+pdat_debug_face_3d(`double precision',1,2,0)dnl
+c
+      subroutine dbugfacedoub3d2(
+pdat_debug_face_3d(`double precision',2,0,1)dnl
+c
+      subroutine dbugfaceflot3d0(
+pdat_debug_face_3d(`real',0,1,2)dnl
+c
+      subroutine dbugfaceflot3d1(
+pdat_debug_face_3d(`real',1,2,0)dnl
+c
+      subroutine dbugfaceflot3d2(
+pdat_debug_face_3d(`real',2,0,1)dnl
+c
+      subroutine dbugfacecplx3d0(
+pdat_debug_face_3d(`double complex',0,1,2)dnl
+c
+      subroutine dbugfacecplx3d1(
+pdat_debug_face_3d(`double complex',1,2,0)dnl
+c
+      subroutine dbugfacecplx3d2(
+pdat_debug_face_3d(`double complex',2,0,1)dnl
+c
+c
+c***********************************************************************
+c Debugging routines for 3d node-centered data
+c***********************************************************************
+c
+      subroutine dbugnodedoub3d(
+pdat_debug_node_3d(`double precision')dnl
+c
+      subroutine dbugnodeflot3d(
+pdat_debug_node_3d(`real')dnl
+c
+      subroutine dbugnodecplx3d(
+pdat_debug_node_3d(`double complex')dnl
+c
+c
+c***********************************************************************
+c Debugging routines for 3d outerface data
+c***********************************************************************
+c
+      subroutine dbugoutfacedoub3d0(
+pdat_debug_outerface_3d(`double precision',0,1,2)dnl
+c
+      subroutine dbugoutfacedoub3d1(
+pdat_debug_outerface_3d(`double precision',1,2,0)dnl
+c
+      subroutine dbugoutfacedoub3d2(
+pdat_debug_outerface_3d(`double precision',2,0,1)dnl
+c
+      subroutine dbugoutfaceflot3d0(
+pdat_debug_outerface_3d(`real',0,1,2)dnl
+c
+      subroutine dbugoutfaceflot3d1(
+pdat_debug_outerface_3d(`real',1,2,0)dnl
+c
+      subroutine dbugoutfaceflot3d2(
+pdat_debug_outerface_3d(`real',2,0,1)dnl
+c
+      subroutine dbugoutfacecplx3d0(
+pdat_debug_outerface_3d(`double complex',0,1,2)dnl
+c
+      subroutine dbugoutfacecplx3d1(
+pdat_debug_outerface_3d(`double complex',1,2,0)dnl
+c
+      subroutine dbugoutfacecplx3d2(
+pdat_debug_outerface_3d(`double complex',2,0,1)dnl
+c
+c
+c***********************************************************************
+c Debugging routines for 3d outerside data
+c***********************************************************************
+c
+      subroutine dbugoutsidedoub3d0(
+pdat_debug_outerside_3d(`double precision',0,1,2)dnl
+c
+      subroutine dbugoutsidedoub3d1(
+pdat_debug_outerside_3d(`double precision',1,2,0)dnl
+c
+      subroutine dbugoutsidedoub3d2(
+pdat_debug_outerside_3d(`double precision',2,0,1)dnl
+c
+      subroutine dbugoutsideflot3d0(
+pdat_debug_outerside_3d(`real',0,1,2)dnl
+c
+      subroutine dbugoutsideflot3d1(
+pdat_debug_outerside_3d(`real',1,2,0)dnl
+c
+      subroutine dbugoutsideflot3d2(
+pdat_debug_outerside_3d(`real',2,0,1)dnl
+c
+      subroutine dbugoutsidecplx3d0(
+pdat_debug_outerside_3d(`double complex',0,1,2)dnl
+c
+      subroutine dbugoutsidecplx3d1(
+pdat_debug_outerside_3d(`double complex',1,2,0)dnl
+c
+      subroutine dbugoutsidecplx3d2(
+pdat_debug_outerside_3d(`double complex',2,0,1)dnl
+c
+c
+c***********************************************************************
+c Debugging routines for 3d side-centered data
+c***********************************************************************
+c
+      subroutine dbugsidedoub3d0(
+pdat_debug_side_3d(`double precision',0,1,2)dnl
+c
+      subroutine dbugsidedoub3d1(
+pdat_debug_side_3d(`double precision',1,2,0)dnl
+c
+      subroutine dbugsidedoub3d2(
+pdat_debug_side_3d(`double precision',2,0,1)dnl
+c
+      subroutine dbugsideflot3d0(
+pdat_debug_side_3d(`real',0,1,2)dnl
+c
+      subroutine dbugsideflot3d1(
+pdat_debug_side_3d(`real',1,2,0)dnl
+c
+      subroutine dbugsideflot3d2(
+pdat_debug_side_3d(`real',2,0,1)dnl
+c
+      subroutine dbugsidecplx3d0(
+pdat_debug_side_3d(`double complex',0,1,2)dnl
+c
+      subroutine dbugsidecplx3d1(
+pdat_debug_side_3d(`double complex',1,2,0)dnl
+c
+      subroutine dbugsidecplx3d2(
+pdat_debug_side_3d(`double complex',2,0,1)dnl
+c
+c
+c***********************************************************************
+c Debugging routines for 3d edge-centered data
+c***********************************************************************
+c
+      subroutine dbugedgedoub3d0(
+pdat_debug_edge_3d(`double precision',0,1,2)dnl
+c
+      subroutine dbugedgedoub3d1(
+pdat_debug_edge_3d(`double precision',1,2,0)dnl
+c
+      subroutine dbugedgedoub3d2(
+pdat_debug_edge_3d(`double precision',2,0,1)dnl
+c
+      subroutine dbugedgeflot3d0(
+pdat_debug_edge_3d(`real',0,1,2)dnl
+c
+      subroutine dbugedgeflot3d1(
+pdat_debug_edge_3d(`real',1,2,0)dnl
+c
+      subroutine dbugedgeflot3d2(
+pdat_debug_edge_3d(`real',2,0,1)dnl
+c
+      subroutine dbugedgecplx3d0(
+pdat_debug_edge_3d(`double complex',0,1,2)dnl
+c
+      subroutine dbugedgecplx3d1(
+pdat_debug_edge_3d(`double complex',1,2,0)dnl
+c
+      subroutine dbugedgecplx3d2(
+pdat_debug_edge_3d(`double complex',2,0,1)dnl
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_dbugstuff1d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_dbugstuff1d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,92 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_dbugstuff1d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 1d patchdata debugging routines
+c
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim1d.i)dnl
+c
+define(pdat_debug_subroutine_head_1d,`dnl
+     &  fi0,la0,ng,ibeg0,iend0,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,ng,ibeg0,iend0
+')dnl
+c
+define(pdat_debug_body_1d,`dnl
+
+      do $1=$2
+         write(6,*) "array[",$1,"] = ",array($1)
+      enddo
+
+      call flush(6)
+      return
+      end
+')dnl
+define(pdat_debug_cell_1d,`dnl
+pdat_debug_subroutine_head_1d()dnl
+      $1
+     &  array(CELL1d(fi,la,ng))
+      integer ic0
+c     =============================================================
+pdat_debug_body_1d(`ic0',`ibeg0,iend0')dnl
+')dnl
+define(pdat_debug_face_1d,`dnl
+pdat_debug_subroutine_head_1d()dnl
+      $1
+     &  array(FACE1d(fi,la,ng))
+      integer ie0
+c     =============================================================
+pdat_debug_body_1d(`ie0',`ibeg0,iend0+1')dnl
+')dnl
+define(pdat_debug_node_1d,`dnl
+pdat_debug_subroutine_head_1d()dnl
+      $1
+     &  array(NODE1d(fi,la,ng))
+      integer ie0
+c     =============================================================
+pdat_debug_body_1d(`ie0',`ibeg0,iend0+1')dnl
+')dnl
+define(pdat_debug_outerface_1d,`dnl
+pdat_debug_subroutine_head_1d()dnl
+      $1
+     &  array(OUTERFACE1d(fi,la,ng))
+c     =============================================================
+
+      write(6,*) "array[",1,"] = ",array(1)
+
+      call flush(6)
+      return
+      end
+')dnl
+define(pdat_debug_outerside_1d,`dnl
+pdat_debug_subroutine_head_1d()dnl
+      $1
+     &  array(OUTERSIDE1d(fi,la,ng))
+c     =============================================================
+
+      write(6,*) "array[",1,"] = ",array(1)
+
+      call flush(6)
+      return
+      end
+')dnl
+define(pdat_debug_side_1d,`dnl
+pdat_debug_subroutine_head_1d()dnl
+      $1
+     &  array(SIDE1d(fi,la,ng))
+      integer ie0
+c     =============================================================
+pdat_debug_body_1d(`ie0',`ibeg0,iend0+1')dnl
+')dnl
+define(pdat_debug_edge_1d,`dnl
+pdat_debug_subroutine_head_1d()dnl
+      $1
+     &  array(EDGE1d(fi,la,ng))
+      integer ie0
+c     =============================================================
+pdat_debug_body_1d(`ie0',`ibeg0,iend0')dnl
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_dbugstuff2d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_dbugstuff2d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,102 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_dbugstuff2d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 2d patchdata debugging routines
+c
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+c
+define(pdat_debug_subroutine_head_2d,`dnl
+     &  fi0,la0,fi1,la1,ng,
+     &  ibeg0,iend0,ibeg1,iend1,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,ng,
+     &   ibeg0,iend0,ibeg1,iend1
+')dnl
+c
+define(pdat_debug_body_2d,`dnl
+
+      do $2=$4
+         do $1=$3 
+            write(6,*) "array[",$1,",",$2,"] = ",array($1,$2)
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+')dnl
+define(pdat_debug_cell_2d,`dnl
+pdat_debug_subroutine_head_2d()dnl
+      $1
+     &  array(CELL2d(fi,la,ng))
+      integer ic0,ic1
+c     =============================================================
+pdat_debug_body_2d(`ic0',`ic1',`ibeg0,iend0',`ibeg1,iend1')dnl
+')dnl
+define(pdat_debug_face_2d,`dnl
+pdat_debug_subroutine_head_2d()dnl
+      $1
+     &  array(FACE2d$2(fi,la,ng))
+      integer ie$2,ic$3
+c     =============================================================
+pdat_debug_body_2d(`ie$2',`ic$3',`ibeg$2,iend$2+1',`ibeg$3,iend$3')dnl
+')dnl
+define(pdat_debug_node_2d,`dnl
+pdat_debug_subroutine_head_2d()dnl
+      $1
+     &  array(NODE2d(fi,la,ng))
+      integer ie0,ie1
+c     =============================================================
+pdat_debug_body_2d(`ie0',`ie1',`ibeg0,iend0+1',`ibeg1,iend1+1')dnl
+')dnl
+define(pdat_debug_outerface_2d,`dnl
+pdat_debug_subroutine_head_2d()dnl
+      $1
+     &  array(OUTERFACE2d$2(fi,la,ng))
+      integer ic$3
+c     =============================================================
+
+      do ic$3=ibeg$3,iend$3
+         write(6,*) "array[",ic$3,"] = ",array(ic$3)
+      enddo
+ 
+      call flush(6)
+      return
+      end
+')dnl
+define(pdat_debug_outerside_2d,`dnl
+pdat_debug_subroutine_head_2d()dnl
+      $1
+     &  array(OUTERSIDE2d$2(fi,la,ng))
+      integer ic$3
+c     =============================================================
+
+      do ic$3=ibeg$3,iend$3
+         write(6,*) "array[",ic$3,"] = ",array(ic$3)
+      enddo
+ 
+      call flush(6)
+      return
+      end
+')dnl
+define(pdat_debug_side_2d,`dnl
+pdat_debug_subroutine_head_2d()dnl
+      $1
+     &  array(SIDE2d$2(fi,la,ng))
+      integer ie0,ic1
+c     =============================================================
+pdat_debug_body_2d(`ie0',`ic1',`ibeg0,iend0+$3',`ibeg1,iend1+$2')dnl
+')dnl
+define(pdat_debug_edge_2d,`dnl
+pdat_debug_subroutine_head_2d()dnl
+      $1
+     &  array(EDGE2d$2(fi,la,ng))
+      integer ie0,ic1
+c     =============================================================
+pdat_debug_body_2d(`ie0',`ic1',`ibeg0,iend0+$2',`ibeg1,iend1+$3')dnl
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_dbugstuff3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_dbugstuff3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,121 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_dbugstuff3d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 3d patchdata debugging routines
+c
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+c
+define(pdat_debug_subroutine_head_3d,`dnl
+     &  fi0,la0,fi1,la1,fi2,la2,ng,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,array)
+c     =============================================================
+      implicit none
+      integer fi0,la0,fi1,la1,fi2,la2,ng,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+')dnl
+c
+define(pdat_debug_body_3d,`dnl
+
+      do $3=$6
+         do $2=$5
+            do $1=$4 
+               write(6,*) "array[",$1,",",$2,",",$3,"] = ",
+     &         array($1,$2,$3)
+            enddo
+         enddo
+      enddo
+
+      call flush(6)
+      return
+      end
+')dnl
+define(pdat_debug_cell_3d,`dnl
+pdat_debug_subroutine_head_3d()dnl
+      $1
+     &  array(CELL3d(fi,la,ng))
+      integer ic0,ic1,ic2
+c     =============================================================
+pdat_debug_body_3d(`ic0',`ic1',`ic2',`ibeg0,iend0',`ibeg1,iend1',`ibeg2,iend2')dnl
+')dnl
+define(pdat_debug_face_3d,`dnl
+pdat_debug_subroutine_head_3d()dnl
+      $1
+     &  array(FACE3d$2(fi,la,ng))
+      integer ie$2,ic$3,ic$4
+c     =============================================================
+pdat_debug_body_3d(`ie$2',`ic$3',`ic$4',`ibeg$2,iend$2+1',`ibeg$3,iend$3',`ibeg$4,iend$4')dnl
+')dnl
+define(pdat_debug_node_3d,`dnl
+pdat_debug_subroutine_head_3d()dnl
+      $1
+     &  array(NODE3d(fi,la,ng))
+      integer ie0,ie1,ie2
+c     =============================================================
+pdat_debug_body_3d(`ie0',`ie1',`ie2',`ibeg0,iend0+1',`ibeg1,iend1+1',`ibeg2,iend2+1')dnl
+')dnl
+define(pdat_debug_outerface_3d,`dnl
+pdat_debug_subroutine_head_3d()dnl
+      $1
+     &  array(OUTERFACE3d$2(fi,la,ng))
+      integer ic$3,ic$4  
+c     =============================================================
+
+      do ic$4=ibeg$4,iend$4
+         do ic$3=ibeg$3,iend$3
+            write(6,*) "array[",ic$3,",",ic$4,"] = ",
+     &      array(ic$3,ic$4)
+         enddo
+      enddo
+ 
+      call flush(6)
+      return
+      end
+')dnl
+define(pdat_debug_outerside_3d,`dnl
+pdat_debug_subroutine_head_3d()dnl
+      $1
+     &  array(OUTERSIDE3d$2(fi,la,ng))
+      integer ic$3,ic$4  
+c     =============================================================
+
+      do ic$4=ibeg$4,iend$4
+         do ic$3=ibeg$3,iend$3
+            write(6,*) "array[",ic$3,",",ic$4,"] = ",
+     &      array(ic$3,ic$4)
+         enddo
+      enddo
+ 
+      call flush(6)
+      return
+      end
+')dnl
+define(pdat_debug_side_3d,`dnl
+pdat_debug_subroutine_head_3d()dnl
+      $1
+     &  array(SIDE3d$2(fi,la,ng))
+      integer ie0,ic1,ic2
+c     =============================================================
+ifelse($2,`0',`pdat_debug_body_3d(`ie0',`ic1',`ic2',`ibeg0,iend0+1',`ibeg1,iend1',`ibeg2,iend2')dnl
+',`')dnl
+ifelse($2,`1',`pdat_debug_body_3d(`ie0',`ic1',`ic2',`ibeg0,iend0',`ibeg1,iend1+1',`ibeg2,iend2')dnl
+',`')dnl
+ifelse($2,`2',`pdat_debug_body_3d(`ie0',`ic1',`ic2',`ibeg0,iend0',`ibeg1,iend1',`ibeg2,iend2+1')dnl
+',`')dnl
+')
+define(pdat_debug_edge_3d,`dnl
+pdat_debug_subroutine_head_3d()dnl
+      $1
+     &  array(EDGE3d$2(fi,la,ng))
+      integer ie0,ic1,ic2
+c     =============================================================
+ifelse($2,`0',`pdat_debug_body_3d(`ie0',`ic1',`ic2',`ibeg0,iend0',`ibeg1,iend1+1',`ibeg2,iend2+1')dnl
+',`')dnl
+ifelse($2,`1',`pdat_debug_body_3d(`ie0',`ic1',`ic2',`ibeg0,iend0+1',`ibeg1,iend1',`ibeg2,iend2+1')dnl
+',`')dnl
+ifelse($2,`2',`pdat_debug_body_3d(`ie0',`ic1',`ic2',`ibeg0,iend0+1',`ibeg1,iend1+1',`ibeg2,iend2')dnl
+',`')dnl
+')
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_lintimint1d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_lintimint1d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,898 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_lintimint1d.m4 $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for standard linear time interpolation 
+c               of 1d patch data types.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4lintimeintops1d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for standard 1d time interpolation operators.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim1d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 1d arrays in FORTRAN routines.
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c***********************************************************************
+c Linear time interpolation for 1d cell-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintcelldoub1d(
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo0:oihi0),
+     &  arraynew(nilo0:nihi0),
+     &  arraydst(dilo0:dihi0)
+      integer ic0
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic0=ifirst0,ilast0
+         arraydst(ic0)=arrayold(ic0)*oldfrac
+     &                +arraynew(ic0)*tfrac
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 1d cell-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintcellfloat1d(
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo0:oihi0),
+     &  arraynew(nilo0:nihi0),
+     &  arraydst(dilo0:dihi0)
+      integer ic0
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic0=ifirst0,ilast0
+         arraydst(ic0)=arrayold(ic0)*oldfrac
+     &                +arraynew(ic0)*tfrac
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 1d cell-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintcellcmplx1d(
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo0:oihi0),
+     &  arraynew(nilo0:nihi0),
+     &  arraydst(dilo0:dihi0)
+      integer ic0
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic0=ifirst0,ilast0
+         arraydst(ic0)=arrayold(ic0)*oldfrac
+     &                +arraynew(ic0)*tfrac
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 1d edge-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintedgedoub1d(
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo0:oihi0),
+     &  arraynew(nilo0:nihi0),
+     &  arraydst(dilo0:dihi0)
+      integer ie0
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie0=ifirst0,ilast0
+         arraydst(ie0)=arrayold(ie0)*oldfrac
+     &                +arraynew(ie0)*tfrac
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 1d edge-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintedgefloat1d(
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo0:oihi0),
+     &  arraynew(nilo0:nihi0),
+     &  arraydst(dilo0:dihi0)
+      integer ie0
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie0=ifirst0,ilast0
+         arraydst(ie0)=arrayold(ie0)*oldfrac
+     &                +arraynew(ie0)*tfrac
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 1d edge-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintedgecmplx1d(
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo0:oihi0),
+     &  arraynew(nilo0:nihi0),
+     &  arraydst(dilo0:dihi0)
+      integer ie0
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie0=ifirst0,ilast0
+         arraydst(ie0)=arrayold(ie0)*oldfrac
+     &                +arraynew(ie0)*tfrac
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 1d face-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintfacedoub1d(
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo0:oihi0+1),
+     &  arraynew(nilo0:nihi0+1),
+     &  arraydst(dilo0:dihi0+1)
+      integer ie0
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie0=ifirst0,ilast0+1
+         arraydst(ie0)=arrayold(ie0)*oldfrac
+     &                +arraynew(ie0)*tfrac
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 1d face-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintfacefloat1d(
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo0:oihi0+1),
+     &  arraynew(nilo0:nihi0+1),
+     &  arraydst(dilo0:dihi0+1)
+      integer ie0
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie0=ifirst0,ilast0+1
+         arraydst(ie0)=arrayold(ie0)*oldfrac
+     &                +arraynew(ie0)*tfrac
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 1d face-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintfacecmplx1d(
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo0:oihi0+1),
+     &  arraynew(nilo0:nihi0+1),
+     &  arraydst(dilo0:dihi0+1)
+      integer ie0
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie0=ifirst0,ilast0+1
+         arraydst(ie0)=arrayold(ie0)*oldfrac
+     &                +arraynew(ie0)*tfrac
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 1d node-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintnodedoub1d(
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo0:oihi0+1),
+     &  arraynew(nilo0:nihi0+1),
+     &  arraydst(dilo0:dihi0+1)
+      integer ie0
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie0=ifirst0,ilast0+1
+         arraydst(ie0)=arrayold(ie0)*oldfrac
+     &                +arraynew(ie0)*tfrac
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 1d node-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintnodefloat1d(
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo0:oihi0+1),
+     &  arraynew(nilo0:nihi0+1),
+     &  arraydst(dilo0:dihi0+1)
+      integer ie0
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie0=ifirst0,ilast0+1
+         arraydst(ie0)=arrayold(ie0)*oldfrac
+     &                +arraynew(ie0)*tfrac
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 1d node-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintnodecmplx1d(
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo0:oihi0+1),
+     &  arraynew(nilo0:nihi0+1),
+     &  arraydst(dilo0:dihi0+1)
+      integer ie0
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie0=ifirst0,ilast0+1
+         arraydst(ie0)=arrayold(ie0)*oldfrac
+     &                +arraynew(ie0)*tfrac
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 1d outerface double data
+c***********************************************************************
+c
+      subroutine lintimeintoutfacedoub1d(
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(1),
+     &  arraynew(1),
+     &  arraydst(1)
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      arraydst(1)=arrayold(1)*oldfrac
+     &           +arraynew(1)*tfrac
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 1d outerface float data
+c***********************************************************************
+c
+      subroutine lintimeintoutfacefloat1d(
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(1),
+     &  arraynew(1),
+     &  arraydst(1)
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      arraydst(1)=arrayold(1)*oldfrac
+     &           +arraynew(1)*tfrac
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 1d outerface complex data
+c***********************************************************************
+c
+      subroutine lintimeintoutfacecmplx1d(
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(1),
+     &  arraynew(1),
+     &  arraydst(1)
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      arraydst(1)=arrayold(1)*oldfrac
+     &           +arraynew(1)*tfrac
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 1d outerside double data
+c***********************************************************************
+c
+      subroutine lintimeintoutsidedoub1d(
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(1),
+     &  arraynew(1),
+     &  arraydst(1)
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      arraydst(1)=arrayold(1)*oldfrac
+     &           +arraynew(1)*tfrac
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 1d outerside float data
+c***********************************************************************
+c
+      subroutine lintimeintoutsidefloat1d(
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(1),
+     &  arraynew(1),
+     &  arraydst(1)
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      arraydst(1)=arrayold(1)*oldfrac
+     &           +arraynew(1)*tfrac
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 1d outerside complex data
+c***********************************************************************
+c
+      subroutine lintimeintoutsidecmplx1d(
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(1),
+     &  arraynew(1),
+     &  arraydst(1)
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      arraydst(1)=arrayold(1)*oldfrac
+     &           +arraynew(1)*tfrac
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 1d side-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintsidedoub1d(
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo0:oihi0+1),
+     &  arraynew(nilo0:nihi0+1),
+     &  arraydst(dilo0:dihi0+1)
+      integer ie0
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie0=ifirst0,ilast0+1
+         arraydst(ie0)=arrayold(ie0)*oldfrac
+     &                +arraynew(ie0)*tfrac
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 1d side-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintsidefloat1d(
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo0:oihi0+1),
+     &  arraynew(nilo0:nihi0+1),
+     &  arraydst(dilo0:dihi0+1)
+      integer ie0
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie0=ifirst0,ilast0+1
+         arraydst(ie0)=arrayold(ie0)*oldfrac
+     &                +arraynew(ie0)*tfrac
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 1d side-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintsidecmplx1d(
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo0:oihi0+1),
+     &  arraynew(nilo0:nihi0+1),
+     &  arraydst(dilo0:dihi0+1)
+      integer ie0
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie0=ifirst0,ilast0+1
+         arraydst(ie0)=arrayold(ie0)*oldfrac
+     &                +arraynew(ie0)*tfrac
+      enddo
+c
+      return
+      end
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_lintimint1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_lintimint1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,158 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_lintimint1d.m4 $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for standard linear time interpolation 
+c               of 1d patch data types.
+c
+include(pdat_m4lintimeintops1d.i)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 1d cell-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintcelldoub1d(
+lin_time_int_op_cell_1d(`double precision')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 1d cell-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintcellfloat1d(
+lin_time_int_op_cell_1d(`real')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 1d cell-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintcellcmplx1d(
+lin_time_int_op_cell_1d(`double complex')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 1d edge-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintedgedoub1d(
+lin_time_int_op_edge_1d(`double precision')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 1d edge-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintedgefloat1d(
+lin_time_int_op_edge_1d(`real',)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 1d edge-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintedgecmplx1d(
+lin_time_int_op_edge_1d(`double complex')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 1d face-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintfacedoub1d(
+lin_time_int_op_face_1d(`double precision')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 1d face-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintfacefloat1d(
+lin_time_int_op_face_1d(`real',)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 1d face-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintfacecmplx1d(
+lin_time_int_op_face_1d(`double complex')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 1d node-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintnodedoub1d(
+lin_time_int_op_node_1d(`double precision')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 1d node-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintnodefloat1d(
+lin_time_int_op_node_1d(`real')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 1d node-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintnodecmplx1d(
+lin_time_int_op_node_1d(`double complex')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 1d outerface double data
+c***********************************************************************
+c
+      subroutine lintimeintoutfacedoub1d(
+lin_time_int_op_outerface_1d(`double precision')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 1d outerface float data
+c***********************************************************************
+c
+      subroutine lintimeintoutfacefloat1d(
+lin_time_int_op_outerface_1d(`real')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 1d outerface complex data
+c***********************************************************************
+c
+      subroutine lintimeintoutfacecmplx1d(
+lin_time_int_op_outerface_1d(`double complex')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 1d outerside double data
+c***********************************************************************
+c
+      subroutine lintimeintoutsidedoub1d(
+lin_time_int_op_outerside_1d(`double precision')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 1d outerside float data
+c***********************************************************************
+c
+      subroutine lintimeintoutsidefloat1d(
+lin_time_int_op_outerside_1d(`real')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 1d outerside complex data
+c***********************************************************************
+c
+      subroutine lintimeintoutsidecmplx1d(
+lin_time_int_op_outerside_1d(`double complex')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 1d side-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintsidedoub1d(
+lin_time_int_op_side_1d(`double precision')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 1d side-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintsidefloat1d(
+lin_time_int_op_side_1d(`real',)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 1d side-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintsidecmplx1d(
+lin_time_int_op_side_1d(`double complex')dnl
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_lintimint2d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_lintimint2d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1606 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_lintimint2d.m4 $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for standard linear time interpolation 
+c               of 2d patch data types.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4lintimeintops2d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 2d std linear time interpolation operators.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim2d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 2d arrays in FORTRAN routines.
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c***********************************************************************
+c Linear time interpolation for 2d cell-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintcelldoub2d(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1)
+      integer ic0,ic1
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic1=ifirst1,ilast1
+         do ic0=ifirst0,ilast0
+            arraydst(ic0,ic1)=arrayold(ic0,ic1)*oldfrac
+     &                       +arraynew(ic0,ic1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 2d cell-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintcellfloat2d(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1)
+      integer ic0,ic1
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic1=ifirst1,ilast1
+         do ic0=ifirst0,ilast0
+            arraydst(ic0,ic1)=arrayold(ic0,ic1)*oldfrac
+     &                       +arraynew(ic0,ic1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 2d cell-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintcellcmplx2d(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1)
+      integer ic0,ic1
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic1=ifirst1,ilast1
+         do ic0=ifirst0,ilast0
+            arraydst(ic0,ic1)=arrayold(ic0,ic1)*oldfrac
+     &                       +arraynew(ic0,ic1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 2d edge-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintedgedoub2d0(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1+1),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1+1),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1+1)
+      integer ie0,ie1
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie1=ifirst1,ilast1+1
+         do ie0=ifirst0,ilast0+0
+            arraydst(ie0,ie1)=arrayold(ie0,ie1)*oldfrac
+     &                       +arraynew(ie0,ie1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintedgedoub2d1(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1)
+      integer ie0,ie1
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie1=ifirst1,ilast1+0
+         do ie0=ifirst0,ilast0+1
+            arraydst(ie0,ie1)=arrayold(ie0,ie1)*oldfrac
+     &                       +arraynew(ie0,ie1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 2d edge-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintedgefloat2d0(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1+1),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1+1),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1+1)
+      integer ie0,ie1
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie1=ifirst1,ilast1+1
+         do ie0=ifirst0,ilast0+0
+            arraydst(ie0,ie1)=arrayold(ie0,ie1)*oldfrac
+     &                       +arraynew(ie0,ie1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintedgefloat2d1(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1)
+      integer ie0,ie1
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie1=ifirst1,ilast1+0
+         do ie0=ifirst0,ilast0+1
+            arraydst(ie0,ie1)=arrayold(ie0,ie1)*oldfrac
+     &                       +arraynew(ie0,ie1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 2d edge-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintedgecmplx2d0(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1+1),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1+1),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1+1)
+      integer ie0,ie1
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie1=ifirst1,ilast1+1
+         do ie0=ifirst0,ilast0+0
+            arraydst(ie0,ie1)=arrayold(ie0,ie1)*oldfrac
+     &                       +arraynew(ie0,ie1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintedgecmplx2d1(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1)
+      integer ie0,ie1
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie1=ifirst1,ilast1+0
+         do ie0=ifirst0,ilast0+1
+            arraydst(ie0,ie1)=arrayold(ie0,ie1)*oldfrac
+     &                       +arraynew(ie0,ie1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 2d face-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintfacedoub2d0(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1)
+      integer ie0,ic1
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic1=ifirst1,ilast1
+         do ie0=ifirst0,ilast0+1
+            arraydst(ie0,ic1)=arrayold(ie0,ic1)*oldfrac
+     &                       +arraynew(ie0,ic1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintfacedoub2d1(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo1:oihi1+1,
+     &          oilo0:oihi0),
+     &  arraynew(nilo1:nihi1+1,
+     &          nilo0:nihi0),
+     &  arraydst(dilo1:dihi1+1,
+     &          dilo0:dihi0)
+      integer ie1,ic0
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic0=ifirst0,ilast0
+         do ie1=ifirst1,ilast1+1
+            arraydst(ie1,ic0)=arrayold(ie1,ic0)*oldfrac
+     &                       +arraynew(ie1,ic0)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 2d face-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintfacefloat2d0(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1)
+      integer ie0,ic1
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic1=ifirst1,ilast1
+         do ie0=ifirst0,ilast0+1
+            arraydst(ie0,ic1)=arrayold(ie0,ic1)*oldfrac
+     &                       +arraynew(ie0,ic1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintfacefloat2d1(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo1:oihi1+1,
+     &          oilo0:oihi0),
+     &  arraynew(nilo1:nihi1+1,
+     &          nilo0:nihi0),
+     &  arraydst(dilo1:dihi1+1,
+     &          dilo0:dihi0)
+      integer ie1,ic0
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic0=ifirst0,ilast0
+         do ie1=ifirst1,ilast1+1
+            arraydst(ie1,ic0)=arrayold(ie1,ic0)*oldfrac
+     &                       +arraynew(ie1,ic0)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 2d face-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintfacecmplx2d0(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1)
+      integer ie0,ic1
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic1=ifirst1,ilast1
+         do ie0=ifirst0,ilast0+1
+            arraydst(ie0,ic1)=arrayold(ie0,ic1)*oldfrac
+     &                       +arraynew(ie0,ic1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintfacecmplx2d1(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo1:oihi1+1,
+     &          oilo0:oihi0),
+     &  arraynew(nilo1:nihi1+1,
+     &          nilo0:nihi0),
+     &  arraydst(dilo1:dihi1+1,
+     &          dilo0:dihi0)
+      integer ie1,ic0
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic0=ifirst0,ilast0
+         do ie1=ifirst1,ilast1+1
+            arraydst(ie1,ic0)=arrayold(ie1,ic0)*oldfrac
+     &                       +arraynew(ie1,ic0)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 2d node-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintnodedoub2d(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1+1),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1+1),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1+1)
+      integer ie0,ie1
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie1=ifirst1,ilast1+1
+         do ie0=ifirst0,ilast0+1
+            arraydst(ie0,ie1)=arrayold(ie0,ie1)*oldfrac
+     &                       +arraynew(ie0,ie1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 2d node-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintnodefloat2d(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1+1),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1+1),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1+1)
+      integer ie0,ie1
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie1=ifirst1,ilast1+1
+         do ie0=ifirst0,ilast0+1
+            arraydst(ie0,ie1)=arrayold(ie0,ie1)*oldfrac
+     &                       +arraynew(ie0,ie1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 2d node-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintnodecmplx2d(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1+1),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1+1),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1+1)
+      integer ie0,ie1
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie1=ifirst1,ilast1+1
+         do ie0=ifirst0,ilast0+1
+            arraydst(ie0,ie1)=arrayold(ie0,ie1)*oldfrac
+     &                       +arraynew(ie0,ie1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 2d outerface double data
+c***********************************************************************
+c
+      subroutine lintimeintoutfacedoub2d0(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo1:oihi1),
+     &  arraynew(nilo1:nihi1),
+     &  arraydst(dilo1:dihi1)
+      integer ic1 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic1=ifirst1,ilast1
+         arraydst(ic1)=arrayold(ic1)*oldfrac
+     &                +arraynew(ic1)*tfrac
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintoutfacedoub2d1(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo0:oihi0),
+     &  arraynew(nilo0:nihi0),
+     &  arraydst(dilo0:dihi0)
+      integer ic0 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic0=ifirst0,ilast0
+         arraydst(ic0)=arrayold(ic0)*oldfrac
+     &                +arraynew(ic0)*tfrac
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 2d outerface float data
+c***********************************************************************
+c
+      subroutine lintimeintoutfacefloat2d0(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo1:oihi1),
+     &  arraynew(nilo1:nihi1),
+     &  arraydst(dilo1:dihi1)
+      integer ic1 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic1=ifirst1,ilast1
+         arraydst(ic1)=arrayold(ic1)*oldfrac
+     &                +arraynew(ic1)*tfrac
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintoutfacefloat2d1(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo0:oihi0),
+     &  arraynew(nilo0:nihi0),
+     &  arraydst(dilo0:dihi0)
+      integer ic0 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic0=ifirst0,ilast0
+         arraydst(ic0)=arrayold(ic0)*oldfrac
+     &                +arraynew(ic0)*tfrac
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 2d outerface complex data
+c***********************************************************************
+c
+      subroutine lintimeintoutfacecmplx2d0(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo1:oihi1),
+     &  arraynew(nilo1:nihi1),
+     &  arraydst(dilo1:dihi1)
+      integer ic1 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic1=ifirst1,ilast1
+         arraydst(ic1)=arrayold(ic1)*oldfrac
+     &                +arraynew(ic1)*tfrac
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintoutfacecmplx2d1(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo0:oihi0),
+     &  arraynew(nilo0:nihi0),
+     &  arraydst(dilo0:dihi0)
+      integer ic0 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic0=ifirst0,ilast0
+         arraydst(ic0)=arrayold(ic0)*oldfrac
+     &                +arraynew(ic0)*tfrac
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 2d outerside double data
+c***********************************************************************
+c
+      subroutine lintimeintoutsidedoub2d0(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo1:oihi1),
+     &  arraynew(nilo1:nihi1),
+     &  arraydst(dilo1:dihi1)
+      integer ic1 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic1=ifirst1,ilast1
+         arraydst(ic1)=arrayold(ic1)*oldfrac
+     &                +arraynew(ic1)*tfrac
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintoutsidedoub2d1(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo0:oihi0),
+     &  arraynew(nilo0:nihi0),
+     &  arraydst(dilo0:dihi0)
+      integer ic0 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic0=ifirst0,ilast0
+         arraydst(ic0)=arrayold(ic0)*oldfrac
+     &                +arraynew(ic0)*tfrac
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 2d outerside float data
+c***********************************************************************
+c
+      subroutine lintimeintoutsidefloat2d0(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo1:oihi1),
+     &  arraynew(nilo1:nihi1),
+     &  arraydst(dilo1:dihi1)
+      integer ic1 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic1=ifirst1,ilast1
+         arraydst(ic1)=arrayold(ic1)*oldfrac
+     &                +arraynew(ic1)*tfrac
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintoutsidefloat2d1(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo0:oihi0),
+     &  arraynew(nilo0:nihi0),
+     &  arraydst(dilo0:dihi0)
+      integer ic0 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic0=ifirst0,ilast0
+         arraydst(ic0)=arrayold(ic0)*oldfrac
+     &                +arraynew(ic0)*tfrac
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 2d outerside complex data
+c***********************************************************************
+c
+      subroutine lintimeintoutsidecmplx2d0(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo1:oihi1),
+     &  arraynew(nilo1:nihi1),
+     &  arraydst(dilo1:dihi1)
+      integer ic1 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic1=ifirst1,ilast1
+         arraydst(ic1)=arrayold(ic1)*oldfrac
+     &                +arraynew(ic1)*tfrac
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintoutsidecmplx2d1(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo0:oihi0),
+     &  arraynew(nilo0:nihi0),
+     &  arraydst(dilo0:dihi0)
+      integer ic0 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic0=ifirst0,ilast0
+         arraydst(ic0)=arrayold(ic0)*oldfrac
+     &                +arraynew(ic0)*tfrac
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 2d side-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintsidedoub2d0(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1)
+      integer ie0,ie1
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie1=ifirst1,ilast1+0
+         do ie0=ifirst0,ilast0+1
+            arraydst(ie0,ie1)=arrayold(ie0,ie1)*oldfrac
+     &                       +arraynew(ie0,ie1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintsidedoub2d1(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1+1),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1+1),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1+1)
+      integer ie0,ie1
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie1=ifirst1,ilast1+1
+         do ie0=ifirst0,ilast0+0
+            arraydst(ie0,ie1)=arrayold(ie0,ie1)*oldfrac
+     &                       +arraynew(ie0,ie1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 2d side-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintsidefloat2d0(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1)
+      integer ie0,ie1
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie1=ifirst1,ilast1+0
+         do ie0=ifirst0,ilast0+1
+            arraydst(ie0,ie1)=arrayold(ie0,ie1)*oldfrac
+     &                       +arraynew(ie0,ie1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintsidefloat2d1(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1+1),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1+1),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1+1)
+      integer ie0,ie1
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie1=ifirst1,ilast1+1
+         do ie0=ifirst0,ilast0+0
+            arraydst(ie0,ie1)=arrayold(ie0,ie1)*oldfrac
+     &                       +arraynew(ie0,ie1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 2d side-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintsidecmplx2d0(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1)
+      integer ie0,ie1
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie1=ifirst1,ilast1+0
+         do ie0=ifirst0,ilast0+1
+            arraydst(ie0,ie1)=arrayold(ie0,ie1)*oldfrac
+     &                       +arraynew(ie0,ie1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintsidecmplx2d1(
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1+1),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1+1),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1+1)
+      integer ie0,ie1
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie1=ifirst1,ilast1+1
+         do ie0=ifirst0,ilast0+0
+            arraydst(ie0,ie1)=arrayold(ie0,ie1)*oldfrac
+     &                       +arraynew(ie0,ie1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_lintimint2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_lintimint2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,203 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_lintimint2d.m4 $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for standard linear time interpolation 
+c               of 2d patch data types.
+c
+include(pdat_m4lintimeintops2d.i)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 2d cell-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintcelldoub2d(
+lin_time_int_op_cell_2d(`double precision')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 2d cell-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintcellfloat2d(
+lin_time_int_op_cell_2d(`real')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 2d cell-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintcellcmplx2d(
+lin_time_int_op_cell_2d(`double complex')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 2d edge-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintedgedoub2d0(
+lin_time_int_op_edge_2d(`double precision',0,1)dnl
+c
+      subroutine lintimeintedgedoub2d1(
+lin_time_int_op_edge_2d(`double precision',1,0)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 2d edge-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintedgefloat2d0(
+lin_time_int_op_edge_2d(`real',0,1)dnl
+c
+      subroutine lintimeintedgefloat2d1(
+lin_time_int_op_edge_2d(`real',1,0)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 2d edge-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintedgecmplx2d0(
+lin_time_int_op_edge_2d(`double complex',0,1)dnl
+c
+      subroutine lintimeintedgecmplx2d1(
+lin_time_int_op_edge_2d(`double complex',1,0)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 2d face-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintfacedoub2d0(
+lin_time_int_op_face_2d(`double precision',0,1)dnl
+c
+      subroutine lintimeintfacedoub2d1(
+lin_time_int_op_face_2d(`double precision',1,0)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 2d face-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintfacefloat2d0(
+lin_time_int_op_face_2d(`real',0,1)dnl
+c
+      subroutine lintimeintfacefloat2d1(
+lin_time_int_op_face_2d(`real',1,0)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 2d face-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintfacecmplx2d0(
+lin_time_int_op_face_2d(`double complex',0,1)dnl
+c
+      subroutine lintimeintfacecmplx2d1(
+lin_time_int_op_face_2d(`double complex',1,0)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 2d node-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintnodedoub2d(
+lin_time_int_op_node_2d(`double precision')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 2d node-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintnodefloat2d(
+lin_time_int_op_node_2d(`real')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 2d node-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintnodecmplx2d(
+lin_time_int_op_node_2d(`double complex')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 2d outerface double data
+c***********************************************************************
+c
+      subroutine lintimeintoutfacedoub2d0(
+lin_time_int_op_outerface_2d(`double precision',0,1)dnl
+c
+      subroutine lintimeintoutfacedoub2d1(
+lin_time_int_op_outerface_2d(`double precision',1,0)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 2d outerface float data
+c***********************************************************************
+c
+      subroutine lintimeintoutfacefloat2d0(
+lin_time_int_op_outerface_2d(`real',0,1)dnl
+c
+      subroutine lintimeintoutfacefloat2d1(
+lin_time_int_op_outerface_2d(`real',1,0)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 2d outerface complex data
+c***********************************************************************
+c
+      subroutine lintimeintoutfacecmplx2d0(
+lin_time_int_op_outerface_2d(`double complex',0,1)dnl
+c
+      subroutine lintimeintoutfacecmplx2d1(
+lin_time_int_op_outerface_2d(`double complex',1,0)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 2d outerside double data
+c***********************************************************************
+c
+      subroutine lintimeintoutsidedoub2d0(
+lin_time_int_op_outerside_2d(`double precision',0,1)dnl
+c
+      subroutine lintimeintoutsidedoub2d1(
+lin_time_int_op_outerside_2d(`double precision',1,0)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 2d outerside float data
+c***********************************************************************
+c
+      subroutine lintimeintoutsidefloat2d0(
+lin_time_int_op_outerside_2d(`real',0,1)dnl
+c
+      subroutine lintimeintoutsidefloat2d1(
+lin_time_int_op_outerside_2d(`real',1,0)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 2d outerside complex data
+c***********************************************************************
+c
+      subroutine lintimeintoutsidecmplx2d0(
+lin_time_int_op_outerside_2d(`double complex',0,1)dnl
+c
+      subroutine lintimeintoutsidecmplx2d1(
+lin_time_int_op_outerside_2d(`double complex',1,0)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 2d side-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintsidedoub2d0(
+lin_time_int_op_side_2d(`double precision',0,1)dnl
+c
+      subroutine lintimeintsidedoub2d1(
+lin_time_int_op_side_2d(`double precision',1,0)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 2d side-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintsidefloat2d0(
+lin_time_int_op_side_2d(`real',0,1)dnl
+c
+      subroutine lintimeintsidefloat2d1(
+lin_time_int_op_side_2d(`real',1,0)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 2d side-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintsidecmplx2d0(
+lin_time_int_op_side_2d(`double complex',0,1)dnl
+c
+      subroutine lintimeintsidecmplx2d1(
+lin_time_int_op_side_2d(`double complex',1,0)dnl
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_lintimint3d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_lintimint3d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,2510 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_lintimint3d.m4 $
+c  Package:     SAMRAI gerometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for standard linear time interpolation 
+c               of 3d patch data types.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4lintimeintops3d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 3d std linear time interpolation operators.
+c
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim3d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 3d arrays in FORTRAN routines.
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c***********************************************************************
+c Linear time interpolation for 3d cell-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintcelldoub3d(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1,
+     &          oilo2:oihi2),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1,
+     &          nilo2:nihi2),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1,
+     &          dilo2:dihi2)
+      integer ic0,ic1,ic2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic2=ifirst2,ilast2
+         do ic1=ifirst1,ilast1
+            do ic0=ifirst0,ilast0
+               arraydst(ic0,ic1,ic2)=
+     &                              +arrayold(ic0,ic1,ic2)*oldfrac
+     &                              +arraynew(ic0,ic1,ic2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 3d cell-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintcellfloat3d(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1,
+     &          oilo2:oihi2),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1,
+     &          nilo2:nihi2),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1,
+     &          dilo2:dihi2)
+      integer ic0,ic1,ic2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic2=ifirst2,ilast2
+         do ic1=ifirst1,ilast1
+            do ic0=ifirst0,ilast0
+               arraydst(ic0,ic1,ic2)=
+     &                              +arrayold(ic0,ic1,ic2)*oldfrac
+     &                              +arraynew(ic0,ic1,ic2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 3d cell-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintcellcmplx3d(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1,
+     &          oilo2:oihi2),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1,
+     &          nilo2:nihi2),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1,
+     &          dilo2:dihi2)
+      integer ic0,ic1,ic2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic2=ifirst2,ilast2
+         do ic1=ifirst1,ilast1
+            do ic0=ifirst0,ilast0
+               arraydst(ic0,ic1,ic2)=
+     &                              +arrayold(ic0,ic1,ic2)*oldfrac
+     &                              +arraynew(ic0,ic1,ic2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 3d edge-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintedgedoub3d0(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1+1,
+     &          oilo2:oihi2+1),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1+1,
+     &          nilo2:nihi2+1),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1+1,
+     &          dilo2:dihi2+1)
+      integer ie0,ie1,ie2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie2=ifirst2,ilast2+1
+         do ie1=ifirst1,ilast1+1
+            do ie0=ifirst0,ilast0
+               arraydst(ie0,ie1,ie2)=
+     &                              +arrayold(ie0,ie1,ie2)*oldfrac
+     &                              +arraynew(ie0,ie1,ie2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintedgedoub3d1(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1,
+     &          oilo2:oihi2+1),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1,
+     &          nilo2:nihi2+1),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1,
+     &          dilo2:dihi2+1)
+      integer ie0,ie1,ie2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie2=ifirst2,ilast2+1
+         do ie1=ifirst1,ilast1
+            do ie0=ifirst0,ilast0+1
+               arraydst(ie0,ie1,ie2)=
+     &                              +arrayold(ie0,ie1,ie2)*oldfrac
+     &                              +arraynew(ie0,ie1,ie2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintedgedoub3d2(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1+1,
+     &          oilo2:oihi2),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1+1,
+     &          nilo2:nihi2),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1+1,
+     &          dilo2:dihi2)
+      integer ie0,ie1,ie2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie2=ifirst2,ilast2
+         do ie1=ifirst1,ilast1+1
+            do ie0=ifirst0,ilast0+1
+               arraydst(ie0,ie1,ie2)=
+     &                              +arrayold(ie0,ie1,ie2)*oldfrac
+     &                              +arraynew(ie0,ie1,ie2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 3d edge-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintedgefloat3d0(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1+1,
+     &          oilo2:oihi2+1),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1+1,
+     &          nilo2:nihi2+1),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1+1,
+     &          dilo2:dihi2+1)
+      integer ie0,ie1,ie2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie2=ifirst2,ilast2+1
+         do ie1=ifirst1,ilast1+1
+            do ie0=ifirst0,ilast0
+               arraydst(ie0,ie1,ie2)=
+     &                              +arrayold(ie0,ie1,ie2)*oldfrac
+     &                              +arraynew(ie0,ie1,ie2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintedgefloat3d1(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1,
+     &          oilo2:oihi2+1),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1,
+     &          nilo2:nihi2+1),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1,
+     &          dilo2:dihi2+1)
+      integer ie0,ie1,ie2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie2=ifirst2,ilast2+1
+         do ie1=ifirst1,ilast1
+            do ie0=ifirst0,ilast0+1
+               arraydst(ie0,ie1,ie2)=
+     &                              +arrayold(ie0,ie1,ie2)*oldfrac
+     &                              +arraynew(ie0,ie1,ie2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintedgefloat3d2(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1+1,
+     &          oilo2:oihi2),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1+1,
+     &          nilo2:nihi2),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1+1,
+     &          dilo2:dihi2)
+      integer ie0,ie1,ie2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie2=ifirst2,ilast2
+         do ie1=ifirst1,ilast1+1
+            do ie0=ifirst0,ilast0+1
+               arraydst(ie0,ie1,ie2)=
+     &                              +arrayold(ie0,ie1,ie2)*oldfrac
+     &                              +arraynew(ie0,ie1,ie2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 3d edge-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintedgecmplx3d0(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1+1,
+     &          oilo2:oihi2+1),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1+1,
+     &          nilo2:nihi2+1),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1+1,
+     &          dilo2:dihi2+1)
+      integer ie0,ie1,ie2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie2=ifirst2,ilast2+1
+         do ie1=ifirst1,ilast1+1
+            do ie0=ifirst0,ilast0
+               arraydst(ie0,ie1,ie2)=
+     &                              +arrayold(ie0,ie1,ie2)*oldfrac
+     &                              +arraynew(ie0,ie1,ie2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintedgecmplx3d1(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1,
+     &          oilo2:oihi2+1),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1,
+     &          nilo2:nihi2+1),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1,
+     &          dilo2:dihi2+1)
+      integer ie0,ie1,ie2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie2=ifirst2,ilast2+1
+         do ie1=ifirst1,ilast1
+            do ie0=ifirst0,ilast0+1
+               arraydst(ie0,ie1,ie2)=
+     &                              +arrayold(ie0,ie1,ie2)*oldfrac
+     &                              +arraynew(ie0,ie1,ie2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintedgecmplx3d2(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1+1,
+     &          oilo2:oihi2),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1+1,
+     &          nilo2:nihi2),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1+1,
+     &          dilo2:dihi2)
+      integer ie0,ie1,ie2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie2=ifirst2,ilast2
+         do ie1=ifirst1,ilast1+1
+            do ie0=ifirst0,ilast0+1
+               arraydst(ie0,ie1,ie2)=
+     &                              +arrayold(ie0,ie1,ie2)*oldfrac
+     &                              +arraynew(ie0,ie1,ie2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 3d face-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintfacedoub3d0(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1,
+     &          oilo2:oihi2),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1,
+     &          nilo2:nihi2),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1,
+     &          dilo2:dihi2)
+      integer ie0,ic1,ic2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic2=ifirst2,ilast2
+         do ic1=ifirst1,ilast1
+            do ie0=ifirst0,ilast0+1
+               arraydst(ie0,ic1,ic2)=
+     &                              +arrayold(ie0,ic1,ic2)*oldfrac
+     &                              +arraynew(ie0,ic1,ic2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintfacedoub3d1(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo1:oihi1+1,
+     &          oilo2:oihi2,
+     &          oilo0:oihi0),
+     &  arraynew(nilo1:nihi1+1,
+     &          nilo2:nihi2,
+     &          nilo0:nihi0),
+     &  arraydst(dilo1:dihi1+1,
+     &          dilo2:dihi2,
+     &          dilo0:dihi0)
+      integer ie1,ic2,ic0
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic0=ifirst0,ilast0
+         do ic2=ifirst2,ilast2
+            do ie1=ifirst1,ilast1+1
+               arraydst(ie1,ic2,ic0)=
+     &                              +arrayold(ie1,ic2,ic0)*oldfrac
+     &                              +arraynew(ie1,ic2,ic0)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintfacedoub3d2(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo2:oihi2+1,
+     &          oilo0:oihi0,
+     &          oilo1:oihi1),
+     &  arraynew(nilo2:nihi2+1,
+     &          nilo0:nihi0,
+     &          nilo1:nihi1),
+     &  arraydst(dilo2:dihi2+1,
+     &          dilo0:dihi0,
+     &          dilo1:dihi1)
+      integer ie2,ic0,ic1
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic1=ifirst1,ilast1
+         do ic0=ifirst0,ilast0
+            do ie2=ifirst2,ilast2+1
+               arraydst(ie2,ic0,ic1)=
+     &                              +arrayold(ie2,ic0,ic1)*oldfrac
+     &                              +arraynew(ie2,ic0,ic1)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 3d face-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintfacefloat3d0(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1,
+     &          oilo2:oihi2),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1,
+     &          nilo2:nihi2),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1,
+     &          dilo2:dihi2)
+      integer ie0,ic1,ic2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic2=ifirst2,ilast2
+         do ic1=ifirst1,ilast1
+            do ie0=ifirst0,ilast0+1
+               arraydst(ie0,ic1,ic2)=
+     &                              +arrayold(ie0,ic1,ic2)*oldfrac
+     &                              +arraynew(ie0,ic1,ic2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintfacefloat3d1(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo1:oihi1+1,
+     &          oilo2:oihi2,
+     &          oilo0:oihi0),
+     &  arraynew(nilo1:nihi1+1,
+     &          nilo2:nihi2,
+     &          nilo0:nihi0),
+     &  arraydst(dilo1:dihi1+1,
+     &          dilo2:dihi2,
+     &          dilo0:dihi0)
+      integer ie1,ic2,ic0
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic0=ifirst0,ilast0
+         do ic2=ifirst2,ilast2
+            do ie1=ifirst1,ilast1+1
+               arraydst(ie1,ic2,ic0)=
+     &                              +arrayold(ie1,ic2,ic0)*oldfrac
+     &                              +arraynew(ie1,ic2,ic0)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintfacefloat3d2(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo2:oihi2+1,
+     &          oilo0:oihi0,
+     &          oilo1:oihi1),
+     &  arraynew(nilo2:nihi2+1,
+     &          nilo0:nihi0,
+     &          nilo1:nihi1),
+     &  arraydst(dilo2:dihi2+1,
+     &          dilo0:dihi0,
+     &          dilo1:dihi1)
+      integer ie2,ic0,ic1
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic1=ifirst1,ilast1
+         do ic0=ifirst0,ilast0
+            do ie2=ifirst2,ilast2+1
+               arraydst(ie2,ic0,ic1)=
+     &                              +arrayold(ie2,ic0,ic1)*oldfrac
+     &                              +arraynew(ie2,ic0,ic1)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 3d face-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintfacecmplx3d0(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1,
+     &          oilo2:oihi2),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1,
+     &          nilo2:nihi2),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1,
+     &          dilo2:dihi2)
+      integer ie0,ic1,ic2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic2=ifirst2,ilast2
+         do ic1=ifirst1,ilast1
+            do ie0=ifirst0,ilast0+1
+               arraydst(ie0,ic1,ic2)=
+     &                              +arrayold(ie0,ic1,ic2)*oldfrac
+     &                              +arraynew(ie0,ic1,ic2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintfacecmplx3d1(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo1:oihi1+1,
+     &          oilo2:oihi2,
+     &          oilo0:oihi0),
+     &  arraynew(nilo1:nihi1+1,
+     &          nilo2:nihi2,
+     &          nilo0:nihi0),
+     &  arraydst(dilo1:dihi1+1,
+     &          dilo2:dihi2,
+     &          dilo0:dihi0)
+      integer ie1,ic2,ic0
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic0=ifirst0,ilast0
+         do ic2=ifirst2,ilast2
+            do ie1=ifirst1,ilast1+1
+               arraydst(ie1,ic2,ic0)=
+     &                              +arrayold(ie1,ic2,ic0)*oldfrac
+     &                              +arraynew(ie1,ic2,ic0)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintfacecmplx3d2(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo2:oihi2+1,
+     &          oilo0:oihi0,
+     &          oilo1:oihi1),
+     &  arraynew(nilo2:nihi2+1,
+     &          nilo0:nihi0,
+     &          nilo1:nihi1),
+     &  arraydst(dilo2:dihi2+1,
+     &          dilo0:dihi0,
+     &          dilo1:dihi1)
+      integer ie2,ic0,ic1
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic1=ifirst1,ilast1
+         do ic0=ifirst0,ilast0
+            do ie2=ifirst2,ilast2+1
+               arraydst(ie2,ic0,ic1)=
+     &                              +arrayold(ie2,ic0,ic1)*oldfrac
+     &                              +arraynew(ie2,ic0,ic1)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 3d node-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintnodedoub3d(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1+1,
+     &          oilo2:oihi2+1),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1+1,
+     &          nilo2:nihi2+1),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1+1,
+     &          dilo2:dihi2+1)
+      integer ie0,ie1,ie2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie2=ifirst2,ilast2+1
+         do ie1=ifirst1,ilast1+1
+            do ie0=ifirst0,ilast0+1
+               arraydst(ie0,ie1,ie2)=
+     &                              +arrayold(ie0,ie1,ie2)*oldfrac
+     &                              +arraynew(ie0,ie1,ie2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 3d node-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintnodefloat3d(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1+1,
+     &          oilo2:oihi2+1),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1+1,
+     &          nilo2:nihi2+1),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1+1,
+     &          dilo2:dihi2+1)
+      integer ie0,ie1,ie2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie2=ifirst2,ilast2+1
+         do ie1=ifirst1,ilast1+1
+            do ie0=ifirst0,ilast0+1
+               arraydst(ie0,ie1,ie2)=
+     &                              +arrayold(ie0,ie1,ie2)*oldfrac
+     &                              +arraynew(ie0,ie1,ie2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 3d node-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintnodecmplx3d(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1+1,
+     &          oilo2:oihi2+1),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1+1,
+     &          nilo2:nihi2+1),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1+1,
+     &          dilo2:dihi2+1)
+      integer ie0,ie1,ie2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie2=ifirst2,ilast2+1
+         do ie1=ifirst1,ilast1+1
+            do ie0=ifirst0,ilast0+1
+               arraydst(ie0,ie1,ie2)=
+     &                              +arrayold(ie0,ie1,ie2)*oldfrac
+     &                              +arraynew(ie0,ie1,ie2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 3d outerface double data
+c***********************************************************************
+c
+      subroutine lintimeintoutfacedoub3d0(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo1:oihi1,
+     &          oilo2:oihi2),
+     &  arraynew(nilo1:nihi1,
+     &          nilo2:nihi2),
+     &  arraydst(dilo1:dihi1,
+     &          dilo2:dihi2)
+      integer ic1,ic2 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic2=ifirst2,ilast2
+         do ic1=ifirst1,ilast1
+            arraydst(ic1,ic2)=arrayold(ic1,ic2)*oldfrac
+     &                       +arraynew(ic1,ic2)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintoutfacedoub3d1(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo2:oihi2,
+     &          oilo0:oihi0),
+     &  arraynew(nilo2:nihi2,
+     &          nilo0:nihi0),
+     &  arraydst(dilo2:dihi2,
+     &          dilo0:dihi0)
+      integer ic2,ic0 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic0=ifirst0,ilast0
+         do ic2=ifirst2,ilast2
+            arraydst(ic2,ic0)=arrayold(ic2,ic0)*oldfrac
+     &                       +arraynew(ic2,ic0)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintoutfacedoub3d2(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1)
+      integer ic0,ic1 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic1=ifirst1,ilast1
+         do ic0=ifirst0,ilast0
+            arraydst(ic0,ic1)=arrayold(ic0,ic1)*oldfrac
+     &                       +arraynew(ic0,ic1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 3d outerface float data
+c***********************************************************************
+c
+      subroutine lintimeintoutfacefloat3d0(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo1:oihi1,
+     &          oilo2:oihi2),
+     &  arraynew(nilo1:nihi1,
+     &          nilo2:nihi2),
+     &  arraydst(dilo1:dihi1,
+     &          dilo2:dihi2)
+      integer ic1,ic2 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic2=ifirst2,ilast2
+         do ic1=ifirst1,ilast1
+            arraydst(ic1,ic2)=arrayold(ic1,ic2)*oldfrac
+     &                       +arraynew(ic1,ic2)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintoutfacefloat3d1(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo2:oihi2,
+     &          oilo0:oihi0),
+     &  arraynew(nilo2:nihi2,
+     &          nilo0:nihi0),
+     &  arraydst(dilo2:dihi2,
+     &          dilo0:dihi0)
+      integer ic2,ic0 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic0=ifirst0,ilast0
+         do ic2=ifirst2,ilast2
+            arraydst(ic2,ic0)=arrayold(ic2,ic0)*oldfrac
+     &                       +arraynew(ic2,ic0)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintoutfacefloat3d2(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1)
+      integer ic0,ic1 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic1=ifirst1,ilast1
+         do ic0=ifirst0,ilast0
+            arraydst(ic0,ic1)=arrayold(ic0,ic1)*oldfrac
+     &                       +arraynew(ic0,ic1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 3d outerface complex data
+c***********************************************************************
+c
+      subroutine lintimeintoutfacecmplx3d0(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo1:oihi1,
+     &          oilo2:oihi2),
+     &  arraynew(nilo1:nihi1,
+     &          nilo2:nihi2),
+     &  arraydst(dilo1:dihi1,
+     &          dilo2:dihi2)
+      integer ic1,ic2 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic2=ifirst2,ilast2
+         do ic1=ifirst1,ilast1
+            arraydst(ic1,ic2)=arrayold(ic1,ic2)*oldfrac
+     &                       +arraynew(ic1,ic2)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintoutfacecmplx3d1(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo2:oihi2,
+     &          oilo0:oihi0),
+     &  arraynew(nilo2:nihi2,
+     &          nilo0:nihi0),
+     &  arraydst(dilo2:dihi2,
+     &          dilo0:dihi0)
+      integer ic2,ic0 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic0=ifirst0,ilast0
+         do ic2=ifirst2,ilast2
+            arraydst(ic2,ic0)=arrayold(ic2,ic0)*oldfrac
+     &                       +arraynew(ic2,ic0)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintoutfacecmplx3d2(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1)
+      integer ic0,ic1 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic1=ifirst1,ilast1
+         do ic0=ifirst0,ilast0
+            arraydst(ic0,ic1)=arrayold(ic0,ic1)*oldfrac
+     &                       +arraynew(ic0,ic1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 3d outerside double data
+c***********************************************************************
+c
+      subroutine lintimeintoutsidedoub3d0(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo1:oihi1,
+     &          oilo2:oihi2),
+     &  arraynew(nilo1:nihi1,
+     &          nilo2:nihi2),
+     &  arraydst(dilo1:dihi1,
+     &          dilo2:dihi2)
+      integer ic1,ic2 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic2=ifirst2,ilast2
+         do ic1=ifirst1,ilast1
+            arraydst(ic1,ic2)=arrayold(ic1,ic2)*oldfrac
+     &                       +arraynew(ic1,ic2)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintoutsidedoub3d1(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo0:oihi0,
+     &          oilo2:oihi2),
+     &  arraynew(nilo0:nihi0,
+     &          nilo2:nihi2),
+     &  arraydst(dilo0:dihi0,
+     &          dilo2:dihi2)
+      integer ic0,ic2 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic2=ifirst2,ilast2
+         do ic0=ifirst0,ilast0
+            arraydst(ic0,ic2)=arrayold(ic0,ic2)*oldfrac
+     &                       +arraynew(ic0,ic2)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintoutsidedoub3d2(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1)
+      integer ic0,ic1 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic1=ifirst1,ilast1
+         do ic0=ifirst0,ilast0
+            arraydst(ic0,ic1)=arrayold(ic0,ic1)*oldfrac
+     &                       +arraynew(ic0,ic1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 3d outerside float data
+c***********************************************************************
+c
+      subroutine lintimeintoutsidefloat3d0(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo1:oihi1,
+     &          oilo2:oihi2),
+     &  arraynew(nilo1:nihi1,
+     &          nilo2:nihi2),
+     &  arraydst(dilo1:dihi1,
+     &          dilo2:dihi2)
+      integer ic1,ic2 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic2=ifirst2,ilast2
+         do ic1=ifirst1,ilast1
+            arraydst(ic1,ic2)=arrayold(ic1,ic2)*oldfrac
+     &                       +arraynew(ic1,ic2)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintoutsidefloat3d1(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo0:oihi0,
+     &          oilo2:oihi2),
+     &  arraynew(nilo0:nihi0,
+     &          nilo2:nihi2),
+     &  arraydst(dilo0:dihi0,
+     &          dilo2:dihi2)
+      integer ic0,ic2 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic2=ifirst2,ilast2
+         do ic0=ifirst0,ilast0
+            arraydst(ic0,ic2)=arrayold(ic0,ic2)*oldfrac
+     &                       +arraynew(ic0,ic2)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintoutsidefloat3d2(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1)
+      integer ic0,ic1 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic1=ifirst1,ilast1
+         do ic0=ifirst0,ilast0
+            arraydst(ic0,ic1)=arrayold(ic0,ic1)*oldfrac
+     &                       +arraynew(ic0,ic1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 3d outerside complex data
+c***********************************************************************
+c
+      subroutine lintimeintoutsidecmplx3d0(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo1:oihi1,
+     &          oilo2:oihi2),
+     &  arraynew(nilo1:nihi1,
+     &          nilo2:nihi2),
+     &  arraydst(dilo1:dihi1,
+     &          dilo2:dihi2)
+      integer ic1,ic2 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic2=ifirst2,ilast2
+         do ic1=ifirst1,ilast1
+            arraydst(ic1,ic2)=arrayold(ic1,ic2)*oldfrac
+     &                       +arraynew(ic1,ic2)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintoutsidecmplx3d1(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo0:oihi0,
+     &          oilo2:oihi2),
+     &  arraynew(nilo0:nihi0,
+     &          nilo2:nihi2),
+     &  arraydst(dilo0:dihi0,
+     &          dilo2:dihi2)
+      integer ic0,ic2 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic2=ifirst2,ilast2
+         do ic0=ifirst0,ilast0
+            arraydst(ic0,ic2)=arrayold(ic0,ic2)*oldfrac
+     &                       +arraynew(ic0,ic2)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintoutsidecmplx3d2(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1)
+      integer ic0,ic1 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic1=ifirst1,ilast1
+         do ic0=ifirst0,ilast0
+            arraydst(ic0,ic1)=arrayold(ic0,ic1)*oldfrac
+     &                       +arraynew(ic0,ic1)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 3d side-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintsidedoub3d0(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1,
+     &          oilo2:oihi2),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1,
+     &          nilo2:nihi2),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1,
+     &          dilo2:dihi2)
+      integer ie0,ie1,ie2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie2=ifirst2,ilast2
+         do ie1=ifirst1,ilast1
+            do ie0=ifirst0,ilast0+1
+               arraydst(ie0,ie1,ie2)=
+     &                              +arrayold(ie0,ie1,ie2)*oldfrac
+     &                              +arraynew(ie0,ie1,ie2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintsidedoub3d1(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1+1,
+     &          oilo2:oihi2),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1+1,
+     &          nilo2:nihi2),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1+1,
+     &          dilo2:dihi2)
+      integer ie0,ie1,ie2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie2=ifirst2,ilast2
+         do ie1=ifirst1,ilast1+1
+            do ie0=ifirst0,ilast0
+               arraydst(ie0,ie1,ie2)=
+     &                              +arrayold(ie0,ie1,ie2)*oldfrac
+     &                              +arraynew(ie0,ie1,ie2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintsidedoub3d2(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double precision
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1,
+     &          oilo2:oihi2+1),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1,
+     &          nilo2:nihi2+1),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1,
+     &          dilo2:dihi2+1)
+      integer ie0,ie1,ie2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie2=ifirst2,ilast2+1
+         do ie1=ifirst1,ilast1
+            do ie0=ifirst0,ilast0
+               arraydst(ie0,ie1,ie2)=
+     &                              +arrayold(ie0,ie1,ie2)*oldfrac
+     &                              +arraynew(ie0,ie1,ie2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 3d side-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintsidefloat3d0(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1,
+     &          oilo2:oihi2),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1,
+     &          nilo2:nihi2),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1,
+     &          dilo2:dihi2)
+      integer ie0,ie1,ie2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie2=ifirst2,ilast2
+         do ie1=ifirst1,ilast1
+            do ie0=ifirst0,ilast0+1
+               arraydst(ie0,ie1,ie2)=
+     &                              +arrayold(ie0,ie1,ie2)*oldfrac
+     &                              +arraynew(ie0,ie1,ie2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintsidefloat3d1(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1+1,
+     &          oilo2:oihi2),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1+1,
+     &          nilo2:nihi2),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1+1,
+     &          dilo2:dihi2)
+      integer ie0,ie1,ie2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie2=ifirst2,ilast2
+         do ie1=ifirst1,ilast1+1
+            do ie0=ifirst0,ilast0
+               arraydst(ie0,ie1,ie2)=
+     &                              +arrayold(ie0,ie1,ie2)*oldfrac
+     &                              +arraynew(ie0,ie1,ie2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintsidefloat3d2(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      real
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1,
+     &          oilo2:oihi2+1),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1,
+     &          nilo2:nihi2+1),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1,
+     &          dilo2:dihi2+1)
+      integer ie0,ie1,ie2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie2=ifirst2,ilast2+1
+         do ie1=ifirst1,ilast1
+            do ie0=ifirst0,ilast0
+               arraydst(ie0,ie1,ie2)=
+     &                              +arrayold(ie0,ie1,ie2)*oldfrac
+     &                              +arraynew(ie0,ie1,ie2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c***********************************************************************
+c Linear time interpolation for 3d side-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintsidecmplx3d0(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo0:oihi0+1,
+     &          oilo1:oihi1,
+     &          oilo2:oihi2),
+     &  arraynew(nilo0:nihi0+1,
+     &          nilo1:nihi1,
+     &          nilo2:nihi2),
+     &  arraydst(dilo0:dihi0+1,
+     &          dilo1:dihi1,
+     &          dilo2:dihi2)
+      integer ie0,ie1,ie2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie2=ifirst2,ilast2
+         do ie1=ifirst1,ilast1
+            do ie0=ifirst0,ilast0+1
+               arraydst(ie0,ie1,ie2)=
+     &                              +arrayold(ie0,ie1,ie2)*oldfrac
+     &                              +arraynew(ie0,ie1,ie2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintsidecmplx3d1(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1+1,
+     &          oilo2:oihi2),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1+1,
+     &          nilo2:nihi2),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1+1,
+     &          dilo2:dihi2)
+      integer ie0,ie1,ie2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie2=ifirst2,ilast2
+         do ie1=ifirst1,ilast1+1
+            do ie0=ifirst0,ilast0
+               arraydst(ie0,ie1,ie2)=
+     &                              +arrayold(ie0,ie1,ie2)*oldfrac
+     &                              +arraynew(ie0,ie1,ie2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine lintimeintsidecmplx3d2(
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+      double complex
+     &  arrayold(oilo0:oihi0,
+     &          oilo1:oihi1,
+     &          oilo2:oihi2+1),
+     &  arraynew(nilo0:nihi0,
+     &          nilo1:nihi1,
+     &          nilo2:nihi2+1),
+     &  arraydst(dilo0:dihi0,
+     &          dilo1:dihi1,
+     &          dilo2:dihi2+1)
+      integer ie0,ie1,ie2
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ie2=ifirst2,ilast2+1
+         do ie1=ifirst1,ilast1
+            do ie0=ifirst0,ilast0
+               arraydst(ie0,ie1,ie2)=
+     &                              +arrayold(ie0,ie1,ie2)*oldfrac
+     &                              +arraynew(ie0,ie1,ie2)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_lintimint3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_lintimint3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,248 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_lintimint3d.m4 $
+c  Package:     SAMRAI gerometry
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: FORTRAN routines for standard linear time interpolation 
+c               of 3d patch data types.
+c
+include(pdat_m4lintimeintops3d.i)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 3d cell-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintcelldoub3d(
+lin_time_int_op_cell_3d(`double precision')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 3d cell-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintcellfloat3d(
+lin_time_int_op_cell_3d(`real')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 3d cell-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintcellcmplx3d(
+lin_time_int_op_cell_3d(`double complex')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 3d edge-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintedgedoub3d0(
+lin_time_int_op_edge_3d(`double precision',0,1,2)dnl
+c
+      subroutine lintimeintedgedoub3d1(
+lin_time_int_op_edge_3d(`double precision',1,2,0)dnl
+c
+      subroutine lintimeintedgedoub3d2(
+lin_time_int_op_edge_3d(`double precision',2,0,1)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 3d edge-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintedgefloat3d0(
+lin_time_int_op_edge_3d(`real',0,1,2)dnl
+c
+      subroutine lintimeintedgefloat3d1(
+lin_time_int_op_edge_3d(`real',1,2,0)dnl
+c
+      subroutine lintimeintedgefloat3d2(
+lin_time_int_op_edge_3d(`real',2,0,1)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 3d edge-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintedgecmplx3d0(
+lin_time_int_op_edge_3d(`double complex',0,1,2)dnl
+c
+      subroutine lintimeintedgecmplx3d1(
+lin_time_int_op_edge_3d(`double complex',1,2,0)dnl
+c
+      subroutine lintimeintedgecmplx3d2(
+lin_time_int_op_edge_3d(`double complex',2,0,1)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 3d face-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintfacedoub3d0(
+lin_time_int_op_face_3d(`double precision',0,1,2)dnl
+c
+      subroutine lintimeintfacedoub3d1(
+lin_time_int_op_face_3d(`double precision',1,2,0)dnl
+c
+      subroutine lintimeintfacedoub3d2(
+lin_time_int_op_face_3d(`double precision',2,0,1)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 3d face-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintfacefloat3d0(
+lin_time_int_op_face_3d(`real',0,1,2)dnl
+c
+      subroutine lintimeintfacefloat3d1(
+lin_time_int_op_face_3d(`real',1,2,0)dnl
+c
+      subroutine lintimeintfacefloat3d2(
+lin_time_int_op_face_3d(`real',2,0,1)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 3d face-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintfacecmplx3d0(
+lin_time_int_op_face_3d(`double complex',0,1,2)dnl
+c
+      subroutine lintimeintfacecmplx3d1(
+lin_time_int_op_face_3d(`double complex',1,2,0)dnl
+c
+      subroutine lintimeintfacecmplx3d2(
+lin_time_int_op_face_3d(`double complex',2,0,1)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 3d node-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintnodedoub3d(
+lin_time_int_op_node_3d(`double precision')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 3d node-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintnodefloat3d(
+lin_time_int_op_node_3d(`real')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 3d node-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintnodecmplx3d(
+lin_time_int_op_node_3d(`double complex')dnl
+c
+c***********************************************************************
+c Linear time interpolation for 3d outerface double data
+c***********************************************************************
+c
+      subroutine lintimeintoutfacedoub3d0(
+lin_time_int_op_outerface_3d(`double precision',0,1,2)dnl
+c
+      subroutine lintimeintoutfacedoub3d1(
+lin_time_int_op_outerface_3d(`double precision',1,2,0)dnl
+c
+      subroutine lintimeintoutfacedoub3d2(
+lin_time_int_op_outerface_3d(`double precision',2,0,1)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 3d outerface float data
+c***********************************************************************
+c
+      subroutine lintimeintoutfacefloat3d0(
+lin_time_int_op_outerface_3d(`real',0,1,2)dnl
+c
+      subroutine lintimeintoutfacefloat3d1(
+lin_time_int_op_outerface_3d(`real',1,2,0)dnl
+c
+      subroutine lintimeintoutfacefloat3d2(
+lin_time_int_op_outerface_3d(`real',2,0,1)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 3d outerface complex data
+c***********************************************************************
+c
+      subroutine lintimeintoutfacecmplx3d0(
+lin_time_int_op_outerface_3d(`double complex',0,1,2)dnl
+c
+      subroutine lintimeintoutfacecmplx3d1(
+lin_time_int_op_outerface_3d(`double complex',1,2,0)dnl
+c
+      subroutine lintimeintoutfacecmplx3d2(
+lin_time_int_op_outerface_3d(`double complex',2,0,1)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 3d outerside double data
+c***********************************************************************
+c
+      subroutine lintimeintoutsidedoub3d0(
+lin_time_int_op_outerside_3d(`double precision',0,1,2)dnl
+c
+      subroutine lintimeintoutsidedoub3d1(
+lin_time_int_op_outerside_3d(`double precision',1,0,2)dnl
+c
+      subroutine lintimeintoutsidedoub3d2(
+lin_time_int_op_outerside_3d(`double precision',2,0,1)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 3d outerside float data
+c***********************************************************************
+c
+      subroutine lintimeintoutsidefloat3d0(
+lin_time_int_op_outerside_3d(`real',0,1,2)dnl
+c
+      subroutine lintimeintoutsidefloat3d1(
+lin_time_int_op_outerside_3d(`real',1,0,2)dnl
+c
+      subroutine lintimeintoutsidefloat3d2(
+lin_time_int_op_outerside_3d(`real',2,0,1)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 3d outerside complex data
+c***********************************************************************
+c
+      subroutine lintimeintoutsidecmplx3d0(
+lin_time_int_op_outerside_3d(`double complex',0,1,2)dnl
+c
+      subroutine lintimeintoutsidecmplx3d1(
+lin_time_int_op_outerside_3d(`double complex',1,0,2)dnl
+c
+      subroutine lintimeintoutsidecmplx3d2(
+lin_time_int_op_outerside_3d(`double complex',2,0,1)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 3d side-centered double data
+c***********************************************************************
+c
+      subroutine lintimeintsidedoub3d0(
+lin_time_int_op_side_3d(`double precision',0,1,2)dnl
+c
+      subroutine lintimeintsidedoub3d1(
+lin_time_int_op_side_3d(`double precision',1,2,0)dnl
+c
+      subroutine lintimeintsidedoub3d2(
+lin_time_int_op_side_3d(`double precision',2,0,1)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 3d side-centered float data
+c***********************************************************************
+c
+      subroutine lintimeintsidefloat3d0(
+lin_time_int_op_side_3d(`real',0,1,2)dnl
+c
+      subroutine lintimeintsidefloat3d1(
+lin_time_int_op_side_3d(`real',1,2,0)dnl
+c
+      subroutine lintimeintsidefloat3d2(
+lin_time_int_op_side_3d(`real',2,0,1)dnl
+c
+c***********************************************************************
+c Linear time interpolation for 3d side-centered complex data
+c***********************************************************************
+c
+      subroutine lintimeintsidecmplx3d0(
+lin_time_int_op_side_3d(`double complex',0,1,2)dnl
+c
+      subroutine lintimeintsidecmplx3d1(
+lin_time_int_op_side_3d(`double complex',1,2,0)dnl
+c
+      subroutine lintimeintsidecmplx3d2(
+lin_time_int_op_side_3d(`double complex',2,0,1)dnl
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_m4arrdim1d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_m4arrdim1d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,39 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim1d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 1d arrays in FORTRAN routines.
+c
+define(SAMRAICELL1d,`$1$4-$3:$2$4+$3')dnl
+define(SAMRAICELL1d0G,`$1$3:$2$3')dnl
+define(SAMRAICELL1dVECG,`$1$4-$3$4:$2$4+$3$4')dnl
+define(SAMRAIEDGE1d,`$1$4-$3:$2$4+$3')dnl
+define(SAMRAIEDGE1d0G,`$1$3:$2$3')dnl
+define(SAMRAIEDGE1dVECG,`$1$4-$3$4:$2$4+$3$4')dnl
+define(SAMRAIFACE1d,`$1$4-$3:$2$4+1+$3')dnl
+define(SAMRAIFACE1d0G,`$1$3:$2$3+1')dnl
+define(SAMRAIFACE1dVECG,`$1$4-$3$4:$2$4+1+$3$4')dnl
+define(SAMRAINODE1d,`$1$4-$3:$2$4+1+$3')dnl
+define(SAMRAINODE1d0G,`$1$3:$2$3+1')dnl
+define(SAMRAINODE1dVECG,`$1$4-$3$4:$2$4+1+$3$4')dnl
+define(SAMRAIOUTERFACE1d,`1')dnl
+define(SAMRAIOUTERSIDE1d,`1')dnl
+define(SAMRAIOUTERNODE1d,`1')dnl
+define(SAMRAISIDE1d,`$1$4-$3:$2$4+1+$3')dnl
+define(SAMRAISIDE1d0G,`$1$3:$2$3+1')dnl
+define(SAMRAISIDE1dVECG,`$1$4-$3$4:$2$4+1+$3$4')dnl
+define(CELL1d,`ifelse($3,`0',`SAMRAICELL1d0G($1,$2,0)',`SAMRAICELL1d($1,$2,$3,0)')')dnl 
+define(EDGE1d,`ifelse($3,`0',`SAMRAIEDGE1d0G($1,$2,0)',`SAMRAIEDGE1d($1,$2,$3,0)')')dnl 
+define(FACE1d,`ifelse($3,`0',`SAMRAIFACE1d0G($1,$2,0)',`SAMRAIFACE1d($1,$2,$3,0)')')dnl 
+define(NODE1d,`ifelse($3,`0',`SAMRAINODE1d0G($1,$2,0)',`SAMRAINODE1d($1,$2,$3,0)')')dnl 
+define(OUTERFACE1d,`SAMRAIOUTERFACE1d')dnl 
+define(OUTERSIDE1d,`SAMRAIOUTERSIDE1d')dnl 
+define(OUTERNODE1d,`SAMRAIOUTERNODE1d')dnl 
+define(SIDE1d,`ifelse($3,`0',`SAMRAISIDE1d0G($1,$2,0)',`SAMRAISIDE1d($1,$2,$3,0)')')dnl
+define(CELL1dVECG,`SAMRAICELL1dVECG($1,$2,$3,0)')dnl 
+define(EDGE1dVECG,`SAMRAIEDGE1dVECG($1,$2,$3,0)')dnl 
+define(FACE1dVECG,`SAMRAIFACE1dVECG($1,$2,$3,0)')dnl 
+define(NODE1dVECG,`SAMRAINODE1dVECG($1,$2,$3,0)')dnl
+define(SIDE1dVECG,`SAMRAIFACE1dVECG($1,$2,$3,0)')dnl 
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_m4arrdim2d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_m4arrdim2d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,79 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim2d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 2d arrays in FORTRAN routines.
+c
+define(SAMRAICELL2d,`$1$4-$3:$2$4+$3,
+     &          $1$5-$3:$2$5+$3')dnl
+define(SAMRAICELL2d0G,`$1$3:$2$3,
+     &          $1$4:$2$4')dnl
+define(SAMRAICELL2dVECG,`$1$4-$3$4:$2$4+$3$4,
+     &          $1$5-$3$5:$2$5+$3$5')dnl
+define(SAMRAIEDGE2d0,`$1`0'-$3:$2`0'+$3,
+     &          $1`1'-$3:$2`1'+1+$3')dnl
+define(SAMRAIEDGE2d1,`$1`0'-$3:$2`0'+1+$3,
+     &          $1`1'-$3:$2`1'+$3')dnl
+define(SAMRAIEDGE2d0G0,`$1`0':$2`0',
+     &          $1`1':$2`1'+1')dnl
+define(SAMRAIEDGE2d0G1,`$1`0':$2`0'+1,
+     &          $1`1':$2`1'')dnl
+define(SAMRAIEDGE2d0VECG,`$1`0'-$3`0':$2`0'+$3`0',
+     &          $1`1'-$3`1':$2`1'+1+$3`1'')dnl
+define(SAMRAIEDGE2d1VECG,`$1`0'-$3`0':$2`0'+1+$3`0',
+     &          $1`1'-$3`1':$2`1'+$3`1'')dnl
+define(SAMRAIFACE2d,`$1$4-$3:$2$4+1+$3,
+     &          $1$5-$3:$2$5+$3')dnl
+define(SAMRAIFACE2d0G,`$1$3:$2$3+1,
+     &          $1$4:$2$4')dnl
+define(SAMRAIFACE2dVECG,`$1$4-$3$4:$2$4+1+$3$4,
+     &          $1$5-$3$5:$2$5+$3$5')dnl
+define(SAMRAINODE2d,`$1$4-$3:$2$4+1+$3,
+     &          $1$5-$3:$2$5+1+$3')dnl
+define(SAMRAINODE2d0G,`$1$3:$2$3+1,
+     &          $1$4:$2$4+1')dnl
+define(SAMRAINODE2dVECG,`$1$4-$3$4:$2$4+1+$3$4,
+     &          $1$5-$3$5:$2$5+1+$3$5')dnl
+define(SAMRAIOUTERFACE2d,`$1$4-$3:$2$4+$3')dnl
+define(SAMRAIOUTERFACE2d0G,`$1$3:$2$3')dnl
+define(SAMRAIOUTERSIDE2d,`$1$4-$3:$2$4+$3')dnl
+define(SAMRAIOUTERSIDE2d0G,`$1$3:$2$3')dnl
+define(SAMRAIOUTERNODE2d0G,`$1$3+1:$2$3')dnl
+define(SAMRAIOUTERNODE2d1G,`$1$3:$2$3+1')dnl
+define(SAMRAISIDE2d0,`$1`0'-$3:$2`0'+1+$3,
+     &          $1`1'-$3:$2`1'+$3')dnl
+define(SAMRAISIDE2d1,`$1`0'-$3:$2`0'+$3,
+     &          $1`1'-$3:$2`1'+1+$3')dnl
+define(SAMRAISIDE2d0G0,`$1`0':$2`0'+1,
+     &          $1`1':$2`1'')dnl
+define(SAMRAISIDE2d0G1,`$1`0':$2`0',
+     &          $1`1':$2`1'+1')dnl
+define(SAMRAISIDE2d0VECG,`$1`0'-$3`0':$2`0'+1+$3`0',
+     &          $1`1'-$3`1':$2`1'+$3`1'')dnl
+define(SAMRAISIDE2d1VECG,`$1`0'-$3`0':$2`0'+$3`0',
+     &          $1`1'-$3`1':$2`1'+1+$3`1'')dnl
+define(CELL2d,`ifelse($3,`0',`SAMRAICELL2d0G($1,$2,0,1)',`SAMRAICELL2d($1,$2,$3,
+0,1)')')dnl
+define(EDGE2d0,`ifelse($3,`0',`SAMRAIEDGE2d0G0($1,$2)',`SAMRAIEDGE2d0($1,$2,$3)')')dnl 
+define(EDGE2d1,`ifelse($3,`0',`SAMRAIEDGE2d0G1($1,$2)',`SAMRAIEDGE2d1($1,$2,$3)')')dnl 
+define(FACE2d0,`ifelse($3,`0',`SAMRAIFACE2d0G($1,$2,0,1)',`SAMRAIFACE2d($1,$2,$3,0,1)')')dnl 
+define(FACE2d1,`ifelse($3,`0',`SAMRAIFACE2d0G($1,$2,1,0)',`SAMRAIFACE2d($1,$2,$3,1,0)')')dnl 
+define(NODE2d,`ifelse($3,`0',`SAMRAINODE2d0G($1,$2,0,1)',`SAMRAINODE2d($1,$2,$3,0,1)')')dnl 
+define(OUTERFACE2d0,`ifelse($3,`0',`SAMRAIOUTERFACE2d0G($1,$2,1)',`SAMRAIOUTERFACE2d($1,$2,$3,1)')')dnl 
+define(OUTERFACE2d1,`ifelse($3,`0',`SAMRAIOUTERFACE2d0G($1,$2,0)',`SAMRAIOUTERFACE2d($1,$2,$3,0)')')dnl
+define(OUTERSIDE2d0,`ifelse($3,`0',`SAMRAIOUTERSIDE2d0G($1,$2,1)',`SAMRAIOUTERSIDE2d($1,$2,$3,1)')')dnl 
+define(OUTERSIDE2d1,`ifelse($3,`0',`SAMRAIOUTERSIDE2d0G($1,$2,0)',`SAMRAIOUTERSIDE2d($1,$2,$3,0)')')dnl
+define(OUTERNODE2d0,`SAMRAIOUTERNODE2d0G($1,$2,1)')dnl 
+define(OUTERNODE2d1,`SAMRAIOUTERNODE2d1G($1,$2,0)')dnl 
+define(SIDE2d0,`ifelse($3,`0',`SAMRAISIDE2d0G0($1,$2)',`SAMRAISIDE2d0($1,$2,$3)')')dnl 
+define(SIDE2d1,`ifelse($3,`0',`SAMRAISIDE2d0G1($1,$2)',`SAMRAISIDE2d1($1,$2,$3)')')dnl 
+define(CELL2dVECG,`SAMRAICELL2dVECG($1,$2,$3,0,1)')dnl
+define(EDGE2d0VECG,`SAMRAIEDGE2d0VECG($1,$2,$3)')dnl
+define(EDGE2d1VECG,`SAMRAIEDGE2d1VECG($1,$2,$3)')dnl
+define(FACE2d0VECG,`SAMRAIFACE2dVECG($1,$2,$3,0,1)')dnl 
+define(FACE2d1VECG,`SAMRAIFACE2dVECG($1,$2,$3,1,0)')dnl 
+define(NODE2dVECG,`SAMRAINODE2dVECG($1,$2,$3,0,1)')dnl
+define(SIDE2d0VECG,`SAMRAISIDE2d0VECG($1,$2,$3)')dnl
+define(SIDE2d1VECG,`SAMRAISIDE2d1VECG($1,$2,$3)')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_m4arrdim3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_m4arrdim3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,134 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4arrdim3d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 3d arrays in FORTRAN routines.
+c
+define(SAMRAICELL3d,`$1$4-$3:$2$4+$3,
+     &          $1$5-$3:$2$5+$3,
+     &          $1$6-$3:$2$6+$3')dnl
+define(SAMRAICELL3d0G,`$1$3:$2$3,
+     &          $1$4:$2$4,
+     &          $1$5:$2$5')dnl
+define(SAMRAICELL3dVECG,`$1$4-$3$4:$2$4+$3$4,
+     &          $1$5-$3$5:$2$5+$3$5,
+     &          $1$6-$3$6:$2$6+$3$6')dnl
+define(SAMRAIEDGE3d0,`$1`0'-$3:$2`0'+$3,
+     &          $1`1'-$3:$2`1'+1+$3,
+     &          $1`2'-$3:$2`2'+1+$3')dnl
+define(SAMRAIEDGE3d1,`$1`0'-$3:$2`0'+1+$3,
+     &          $1`1'-$3:$2`1'+$3,
+     &          $1`2'-$3:$2`2'+1+$3')dnl
+define(SAMRAIEDGE3d2,`$1`0'-$3:$2`0'+1+$3,
+     &          $1`1'-$3:$2`1'+1+$3,
+     &          $1`2'-$3:$2`2'+$3')dnl
+define(SAMRAIEDGE3d0G0,`$1`0':$2`0',
+     &          $1`1':$2`1'+1,
+     &          $1`2':$2`2'+1')dnl
+define(SAMRAIEDGE3d0G1,`$1`0':$2`0'+1,
+     &          $1`1':$2`1',
+     &          $1`2':$2`2'+1')dnl
+define(SAMRAIEDGE3d0G2,`$1`0':$2`0'+1,
+     &          $1`1':$2`1'+1,
+     &          $1`2':$2`2'')dnl
+define(SAMRAIEDGE3d0VECG,`$1`0'-$3`0':$2`0'+$3`0',
+     &          $1`1'-$3`1':$2`1'+1+$3`1',
+     &          $1`2'-$3`2':$2`2'+1+$3`2'')dnl
+define(SAMRAIEDGE3d1VECG,`$1`0'-$3`0':$2`0'+1+$3`0',
+     &          $1`1'-$3`1':$2`1'+$3`1',
+     &          $1`2'-$3`2':$2`2'+1+$3`2'')dnl
+define(SAMRAIEDGE3d2VECG,`$1`0'-$3`0':$2`0'+1+$3`0',
+     &          $1`1'-$3`1':$2`1'+1+$3`1',
+     &          $1`2'-$3`2':$2`2'+$3`2'')dnl
+define(SAMRAIFACE3d,`$1$4-$3:$2$4+1+$3,
+     &          $1$5-$3:$2$5+$3,
+     &          $1$6-$3:$2$6+$3')dnl
+define(SAMRAIFACE3d0G,`$1$3:$2$3+1,
+     &          $1$4:$2$4,
+     &          $1$5:$2$5')dnl
+define(SAMRAIFACE3dVECG,`$1$4-$3$4:$2$4+1+$3$4,
+     &          $1$5-$3$5:$2$5+$3$5,
+     &          $1$6-$3$6:$2$6+$3$6')dnl
+define(SAMRAINODE3d,`$1$4-$3:$2$4+1+$3,
+     &          $1$5-$3:$2$5+1+$3,
+     &          $1$6-$3:$2$6+1+$3')dnl
+define(SAMRAINODE3d0G,`$1$3:$2$3+1,
+     &          $1$4:$2$4+1,
+     &          $1$5:$2$5+1')dnl
+define(SAMRAINODE3dVECG,`$1$4-$3$4:$2$4+1+$3$4,
+     &          $1$5-$3$5:$2$5+1+$3$5,
+     &          $1$6-$3$6:$2$6+1+$3$6')dnl
+define(SAMRAIOUTERFACE3d,`$1$4-$3:$2$4+$3,
+     &          $1$5-$3:$2$5+$3')dnl
+define(SAMRAIOUTERFACE3d0G,`$1$3:$2$3,
+     &          $1$4:$2$4')dnl
+define(SAMRAIOUTERSIDE3d,`$1$4-$3:$2$4+$3,
+     &          $1$5-$3:$2$5+$3')dnl
+define(SAMRAIOUTERSIDE3d0G,`$1$3:$2$3,
+     &          $1$4:$2$4')dnl
+define(SAMRAIOUTERNODE3d0G,`$1$3+1:$2$3,
+     &          $1$4+1:$2$4')dnl
+define(SAMRAIOUTERNODE3d1G,`$1$3:$2$3+1,
+     &          $1$4+1:$2$4')dnl
+define(SAMRAIOUTERNODE3d2G,`$1$3:$2$3+1,
+     &          $1$4:$2$4+1')dnl
+define(SAMRAISIDE3d0,`$1`0'-$3:$2`0'+1+$3,
+     &          $1`1'-$3:$2`1'+$3,
+     &          $1`2'-$3:$2`2'+$3')dnl
+define(SAMRAISIDE3d1,`$1`0'-$3:$2`0'+$3,
+     &          $1`1'-$3:$2`1'+1+$3,
+     &          $1`2'-$3:$2`2'+$3')dnl
+define(SAMRAISIDE3d2,`$1`0'-$3:$2`0'+$3,
+     &          $1`1'-$3:$2`1'+$3,
+     &          $1`2'-$3:$2`2'+1+$3')dnl
+define(SAMRAISIDE3d0G0,`$1`0':$2`0'+1,
+     &          $1`1':$2`1',
+     &          $1`2':$2`2'')dnl
+define(SAMRAISIDE3d0G1,`$1`0':$2`0',
+     &          $1`1':$2`1'+1,
+     &          $1`2':$2`2'')dnl
+define(SAMRAISIDE3d0G2,`$1`0':$2`0',
+     &          $1`1':$2`1',
+     &          $1`2':$2`2'+1')dnl
+define(SAMRAISIDE3d0VECG,`$1`0'-$3`0':$2`0'+1+$3`0',
+     &          $1`1'-$3`1':$2`1'+$3`1',
+     &          $1`2'-$3`2':$2`2'+$3`2'')dnl
+define(SAMRAISIDE3d1VECG,`$1`0'-$3`0':$2`0'+$3`0',
+     &          $1`1'-$3`1':$2`1'+1+$3`1',
+     &          $1`2'-$3`2':$2`2'+$3`2'')dnl
+define(SAMRAISIDE3d2VECG,`$1`0'-$3`0':$2`0'+$3`0',
+     &          $1`1'-$3`1':$2`1'+$3`1',
+     &          $1`2'-$3`2':$2`2'+1+$3`2'')dnl
+define(CELL3d,`ifelse($3,`0',`SAMRAICELL3d0G($1,$2,0,1,2)',`SAMRAICELL3d($1,$2,$3,0,1,2)')')dnl 
+define(EDGE3d0,`ifelse($3,`0',`SAMRAIEDGE3d0G0($1,$2)',`SAMRAIEDGE3d0($1,$2,$3)')')dnl 
+define(EDGE3d1,`ifelse($3,`0',`SAMRAIEDGE3d0G1($1,$2)',`SAMRAIEDGE3d1($1,$2,$3)')')dnl 
+define(EDGE3d2,`ifelse($3,`0',`SAMRAIEDGE3d0G2($1,$2)',`SAMRAIEDGE3d2($1,$2,$3)')')dnl 
+define(FACE3d0,`ifelse($3,`0',`SAMRAIFACE3d0G($1,$2,0,1,2)',`SAMRAIFACE3d($1,$2,$3,0,1,2)')')dnl 
+define(FACE3d1,`ifelse($3,`0',`SAMRAIFACE3d0G($1,$2,1,2,0)',`SAMRAIFACE3d($1,$2,$3,1,2,0)')')dnl 
+define(FACE3d2,`ifelse($3,`0',`SAMRAIFACE3d0G($1,$2,2,0,1)',`SAMRAIFACE3d($1,$2,$3,2,0,1)')')dnl
+define(NODE3d,`ifelse($3,`0',`SAMRAINODE3d0G($1,$2,0,1,2)',`SAMRAINODE3d($1,$2,$3,0,1,2)')')dnl 
+define(OUTERFACE3d0,`ifelse($3,`0',`SAMRAIOUTERFACE3d0G($1,$2,1,2)',`SAMRAIOUTERFACE3d($1,$2,$3,1,2)')')dnl 
+define(OUTERFACE3d1,`ifelse($3,`0',`SAMRAIOUTERFACE3d0G($1,$2,2,0)',`SAMRAIOUTERFACE3d($1,$2,$3,2,0)')')dnl 
+define(OUTERFACE3d2,`ifelse($3,`0',`SAMRAIOUTERFACE3d0G($1,$2,0,1)',`SAMRAIOUTERFACE3d($1,$2,$3,0,1)')')dnl
+define(OUTERSIDE3d0,`ifelse($3,`0',`SAMRAIOUTERSIDE3d0G($1,$2,1,2)',`SAMRAIOUTERSIDE3d($1,$2,$3,1,2)')')dnl 
+define(OUTERSIDE3d1,`ifelse($3,`0',`SAMRAIOUTERSIDE3d0G($1,$2,0,2)',`SAMRAIOUTERSIDE3d($1,$2,$3,0,2)')')dnl 
+define(OUTERSIDE3d2,`ifelse($3,`0',`SAMRAIOUTERSIDE3d0G($1,$2,0,1)',`SAMRAIOUTERSIDE3d($1,$2,$3,0,1)')')dnl
+define(OUTERNODE3d0,`SAMRAIOUTERNODE3d0G($1,$2,1,2)')dnl
+define(OUTERNODE3d1,`SAMRAIOUTERNODE3d1G($1,$2,0,2)')dnl
+define(OUTERNODE3d2,`SAMRAIOUTERNODE3d2G($1,$2,0,1)')dnl
+define(SIDE3d0,`ifelse($3,`0',`SAMRAISIDE3d0G0($1,$2)',`SAMRAISIDE3d0($1,$2,$3)')')dnl 
+define(SIDE3d1,`ifelse($3,`0',`SAMRAISIDE3d0G1($1,$2)',`SAMRAISIDE3d1($1,$2,$3)')')dnl 
+define(SIDE3d2,`ifelse($3,`0',`SAMRAISIDE3d0G2($1,$2)',`SAMRAISIDE3d2($1,$2,$3)')')dnl 
+define(CELL3dVECG,`SAMRAICELL3dVECG($1,$2,$3,0,1,2)')dnl 
+define(EDGE3d0VECG,`SAMRAIEDGE3d0VECG($1,$2,$3)')dnl
+define(EDGE3d1VECG,`SAMRAIEDGE3d1VECG($1,$2,$3)')dnl
+define(EDGE3d2VECG,`SAMRAIEDGE3d2VECG($1,$2,$3)')dnl 
+define(FACE3d0VECG,`SAMRAIFACE3dVECG($1,$2,$3,0,1,2)')dnl 
+define(FACE3d1VECG,`SAMRAIFACE3dVECG($1,$2,$3,1,2,0)')dnl 
+define(FACE3d2VECG,`SAMRAIFACE3dVECG($1,$2,$3,2,0,1)')dnl 
+define(NODE3dVECG,`SAMRAINODE3dVECG($1,$2,$3,0,1,2)')dnl
+define(SIDE3d0VECG,`SAMRAISIDE3d0VECG($1,$2,$3)')dnl
+define(SIDE3d1VECG,`SAMRAISIDE3d1VECG($1,$2,$3)')dnl
+define(SIDE3d2VECG,`SAMRAISIDE3d2VECG($1,$2,$3)')dnl 
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_m4concoarsenops1d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_m4concoarsenops1d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,67 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4concoarsenops1d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 1d constant coarsen operators
+c
+define(NDIM,1)dnl
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim1d.i)dnl
+define(con_coarsen_op_subroutine_head_1d,`dnl
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  filo0,fihi0,
+     &  cilo0,cihi0
+      integer ratio(0:NDIM-1)
+')dnl
+c
+define(con_injection_body_1d,`dnl
+c
+c***********************************************************************
+c
+      do $1=$2
+         arrayc($1)=arrayf($1*ratio(0))
+      enddo
+c
+      return
+      end
+')dnl
+c
+c
+define(conavg_op_node_1d,`dnl
+con_coarsen_op_subroutine_head_1d()dnl
+      $1
+     &  arrayf(NODE1d(filo,fihi,0)),
+     &  arrayc(NODE1d(cilo,cihi,0))
+      integer ie0
+con_injection_body_1d(`ie0',`ifirstc0,ilastc0+1')dnl
+')dnl
+c
+
+c
+define(conavg_op_outernode_1d,`dnl
+con_coarsen_op_subroutine_head_1d()dnl
+      $1
+     &  arrayf(OUTERNODE1d(filo,fihi,0)),
+     &  arrayc(OUTERNODE1d(cilo,cihi,0))
+c
+c***********************************************************************
+c
+      arrayc(1)=arrayf(1)
+
+      return
+      end
+')dnl
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_m4concoarsenops2d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_m4concoarsenops2d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,90 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4concoarsenops2d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 2d Cartesian coarsen operators
+c
+define(NDIM,2)dnl
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+define(con_coarsen_op_subroutine_head_2d,`dnl
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:NDIM-1)
+')dnl
+c
+define(conavg_node_body_2d,`dnl
+c
+c***********************************************************************
+c
+      do ie1=ifirstc1,ilastc1+1
+         if1=ie1*ratio(1)
+         do ie0=ifirstc0,ilastc0+1
+            arrayc(ie0,ie1)=arrayf(ie0*ratio(0),if1)
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(conavg_op_node_2d,`dnl
+con_coarsen_op_subroutine_head_2d()dnl
+      $1
+     &  arrayf(NODE2d(filo,fihi,0)),
+     &  arrayc(NODE2d(cilo,cihi,0))
+      integer ie0,ie1,if1
+conavg_node_body_2d()dnl
+')dnl
+c
+define(conavg_op_outernode_2d0,`dnl
+con_coarsen_op_subroutine_head_2d()dnl
+      $1
+     &  arrayf(OUTERNODE2d0(filo,fihi,0)),
+     &  arrayc(OUTERNODE2d0(cilo,cihi,0))
+      integer ic1,if1
+c
+c***********************************************************************
+c
+      do ic1=ifirstc1+1,ilastc1
+         if1=ic1*ratio(1)
+         arrayc(ic1)=arrayf(if1)
+      enddo
+
+      return
+      end
+')dnl
+c
+
+define(conavg_op_outernode_2d1,`dnl 
+con_coarsen_op_subroutine_head_2d()dnl 
+      $1
+     &  arrayf(OUTERNODE2d1(filo,fihi,0)),
+     &  arrayc(OUTERNODE2d1(cilo,cihi,0))
+      integer ic0,if0
+c
+c***********************************************************************
+c
+      do ic0=ifirstc0,ilastc0+1
+         if0=ic0*ratio(0)
+         arrayc(ic0)=arrayf(if0)
+      enddo
+
+      return
+      end
+')dnl
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_m4concoarsenops3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_m4concoarsenops3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,119 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4concoarsenops3d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 3d Cartesian coarsen operators
+c
+define(NDIM,3)dnl
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+define(con_coarsen_op_subroutine_head_3d,`dnl
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,
+     &  arrayf,arrayc)
+c***********************************************************************
+      implicit none
+      double precision zero
+      parameter (zero=0.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:NDIM-1)
+')dnl
+c
+define(conavg_node_body_3d,`dnl
+c
+c***********************************************************************
+c
+      do ie2=ifirstc2,ilastc2+1
+         if2=ie2*ratio(2)
+         do ie1=ifirstc1,ilastc1+1
+            if1=ie1*ratio(1)
+            do ie0=ifirstc0,ilastc0+1
+               arrayc(ie0,ie1,ie2)=arrayf(ie0*ratio(0),if1,if2)
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(conavg_op_node_3d,`dnl
+con_coarsen_op_subroutine_head_3d()dnl
+      $1
+     &  arrayf(NODE3d(filo,fihi,0)),
+     &  arrayc(NODE3d(cilo,cihi,0))
+      integer ie0,ie1,ie2,if1,if2
+conavg_node_body_3d()dnl
+')dnl
+
+define(conavg_op_outernode_3d0,`dnl
+con_coarsen_op_subroutine_head_3d()dnl
+      $1
+     &  arrayf(OUTERNODE3d0(filo,fihi,0)),
+     &  arrayc(OUTERNODE3d0(cilo,cihi,0))
+      integer ic1,ic2,if1,if2
+c
+c***********************************************************************
+c
+      do ic2=ifirstc2+1,ilastc2
+         if2=ic2*ratio(2)
+         do ic1=ifirstc1+1,ilastc1
+            if1=ic1*ratio(1)
+            arrayc(ic1,ic2)=arrayf(if1,if2)
+         enddo
+      enddo
+
+      return
+      end
+')dnl
+c
+
+define(conavg_op_outernode_3d1,`dnl 
+con_coarsen_op_subroutine_head_3d()dnl 
+      $1
+     &  arrayf(OUTERNODE3d1(filo,fihi,0)),
+     &  arrayc(OUTERNODE3d1(cilo,cihi,0))
+      integer ic0,ic2,if0,if2
+c
+c***********************************************************************
+c
+      do ic2=ifirstc2+1,ilastc2
+         if2=ic2*ratio(2)
+         do ic0=ifirstc0,ilastc0+1
+            if0=ic0*ratio(0)
+            arrayc(ic0,ic2)=arrayf(if0,if2)
+         enddo
+      enddo
+
+      return
+      end
+')dnl
+
+define(conavg_op_outernode_3d2,`dnl 
+con_coarsen_op_subroutine_head_3d()dnl 
+      $1
+     &  arrayf(OUTERNODE3d2(filo,fihi,0)),
+     &  arrayc(OUTERNODE3d2(cilo,cihi,0))
+      integer ic0,ic1,if0,if1
+c
+c***********************************************************************
+c
+      do ic1=ifirstc1,ilastc1+1
+         if1=ic1*ratio(1)
+         do ic0=ifirstc0,ilastc0+1
+            if0=ic0*ratio(0)
+            arrayc(ic0,ic1)=arrayf(if0,if1)
+         enddo
+      enddo
+
+      return
+      end
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_m4conopstuff.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_m4conopstuff.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,23 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4conopstuff.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for constant patchdata transfer routines.
+c
+define(coarsen_index,`dnl
+         if ($1.lt.0) then
+            $2=($1+1)/$3-1
+         else
+            $2=$1/$3
+         endif
+')dnl
+define(coarsen_face_index,`dnl
+         it=2*$1+$3
+         if (it.le.0) then
+            $2=it/(2*$3)-1
+         else
+            $2=(it-1)/(2*$3)
+         endif
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_m4conrefineops1d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_m4conrefineops1d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,118 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4conrefineops1d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 1d Cartesian refine operators
+c
+define(NDIM,1)dnl
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim1d.i)dnl
+include(pdat_m4conopstuff.i)dnl
+c
+define(con_refine_op_subroutine_head_1d,`dnl
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ilastc0,
+     &  ifirstf0,ilastf0,
+     &  cilo0,cihi0,
+     &  filo0,fihi0
+      integer ratio(0:NDIM-1)
+')dnl
+c
+define(conref_cell_body_1d,`dnl
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0
+coarsen_index(if0,ic0,ratio(0))dnl
+         arrayf(if0)=arrayc(ic0)
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(conref_edge_body_1d,`dnl
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0
+coarsen_index(if0,ie0,ratio(0))dnl
+         arrayf(if0)=arrayc(ie0)
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(conref_face_body_1d,`dnl
+c
+c***********************************************************************
+c
+      do if0=ifirstf0,ilastf0+1
+coarsen_face_index(if0,ie0,ratio(0))dnl
+         arrayf(if0)=arrayc(ie0)
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(conref_op_cell_1d,`dnl
+con_refine_op_subroutine_head_1d()dnl
+      $1
+     &  arrayc(CELL1d(cilo,cihi,0)),
+     &  arrayf(CELL1d(filo,fihi,0))
+      integer ic0,if0
+conref_cell_body_1d()dnl
+')dnl
+define(conref_op_edge_1d,`dnl
+con_refine_op_subroutine_head_1d()dnl
+      $1
+     &  arrayc(EDGE1d(cilo,cihi,0)),
+     &  arrayf(EDGE1d(filo,fihi,0))
+      integer ie0,if0
+conref_edge_body_1d()dnl
+')dnl
+define(conref_op_face_1d,`dnl
+con_refine_op_subroutine_head_1d()dnl
+      $1
+     &  arrayc(FACE1d(cilo,cihi,0)),
+     &  arrayf(FACE1d(filo,fihi,0))
+      integer ie0,if0,it
+conref_face_body_1d()dnl
+')dnl
+define(conref_op_side_1d,`dnl
+con_refine_op_subroutine_head_1d()dnl
+      $1
+     &  arrayc(SIDE1d(cilo,cihi,0)),
+     &  arrayf(SIDE1d(filo,fihi,0))
+      integer ie0,if0,it
+conref_face_body_1d()dnl
+')dnl
+define(conref_op_outerface_1d,`dnl
+con_refine_op_subroutine_head_1d()dnl
+      $1
+     &  arrayc(OUTERFACE1d(cilo,cihi,0)),
+     &  arrayf(OUTERFACE1d(filo,fihi,0))
+c
+c***********************************************************************
+c
+      arrayf(1)=arrayc(1)
+c
+      return
+      end
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_m4conrefineops2d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_m4conrefineops2d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,151 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4conrefineops2d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 2d constant refine operators
+c
+define(NDIM,2)dnl
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+include(pdat_m4conopstuff.i)dnl
+c
+define(con_refine_op_subroutine_head_2d,`dnl
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:NDIM-1)
+')dnl
+c
+define(conref_cell_body_2d,`dnl
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1
+coarsen_index(if1,ic1,ratio(1))dnl
+         do if0=ifirstf0,ilastf0
+coarsen_index(if0,ic0,ratio(0))dnl
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(conref_edge_body_2d,`dnl
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1+$2
+coarsen_index(if1,ic1,ratio(1))dnl
+         do if0=ifirstf0,ilastf0+$1
+coarsen_index(if0,ic0,ratio(0))dnl
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(conref_face_body_2d,`dnl
+c
+c***********************************************************************
+c
+      do if$2=ifirstf$2,ilastf$2
+coarsen_index(if$2,ic$2,ratio($2))dnl
+         do if$1=ifirstf$1,ilastf$1+1
+coarsen_index(if$1,ie$1,ratio($1))dnl
+            arrayf(if$1,if$2)=arrayc(ie$1,ic$2)
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(conref_side_body_2d,`dnl
+c
+c***********************************************************************
+c
+      do if1=ifirstf1,ilastf1+$1
+coarsen_index(if1,ic1,ratio(1))dnl
+         do if0=ifirstf0,ilastf0+$2
+coarsen_index(if0,ic0,ratio(0))dnl
+            arrayf(if0,if1)=arrayc(ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(conref_outerface_body_2d,`dnl
+c
+c***********************************************************************
+c
+      do if$2=ifirstf$2,ilastf$2
+coarsen_index(if$2,ic$2,ratio($2))dnl
+         arrayf(if$2)=arrayc(ic$2)
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(conref_op_cell_2d,`dnl
+con_refine_op_subroutine_head_2d()dnl
+      $1
+     &  arrayc(CELL2d(cilo,cihi,0)),
+     &  arrayf(CELL2d(filo,fihi,0))
+      integer ic0,ic1,if0,if1
+conref_cell_body_2d()dnl
+')dnl
+define(conref_op_edge_2d,`dnl
+con_refine_op_subroutine_head_2d()dnl
+      $1
+     &  arrayc(EDGE2d$2(cilo,cihi,0)),
+     &  arrayf(EDGE2d$2(filo,fihi,0))
+      integer ic0,ic1,if0,if1
+conref_edge_body_2d($2,$3)dnl
+')dnl
+define(conref_op_face_2d,`dnl
+con_refine_op_subroutine_head_2d()dnl
+      $1
+     &  arrayc(FACE2d$2(cilo,cihi,0)),
+     &  arrayf(FACE2d$2(filo,fihi,0))
+      integer ie$2,ic$3,if$2,if$3
+conref_face_body_2d($2,$3)dnl
+')dnl
+define(conref_op_side_2d,`dnl
+con_refine_op_subroutine_head_2d()dnl
+      $1
+     &  arrayc(SIDE2d$2(cilo,cihi,0)),
+     &  arrayf(SIDE2d$2(filo,fihi,0))
+      integer ic0,ic1,if0,if1
+conref_side_body_2d($2,$3)dnl
+')dnl
+define(conref_op_outerface_2d,`dnl
+con_refine_op_subroutine_head_2d()dnl
+      $1
+     &  arrayc(OUTERFACE2d$2(cilo,cihi,0)),
+     &  arrayf(OUTERFACE2d$2(filo,fihi,0))
+      integer ic$3,if$3
+conref_outerface_body_2d($2,$3)dnl
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_m4conrefineops3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_m4conrefineops3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,200 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4conrefineops3d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 3d Cartesian refine operators
+c
+define(NDIM,3)dnl
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+include(pdat_m4conopstuff.i)dnl
+c
+define(con_refine_op_subroutine_head_3d,`dnl
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,
+     &  arrayc,arrayf)
+c***********************************************************************
+      implicit none
+      double precision half,one
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:NDIM-1)
+')dnl
+c
+define(conref_cell_body_3d,`dnl
+c
+c***********************************************************************
+c
+      do if2=ifirstf2,ilastf2
+coarsen_index(if2,ic2,ratio(2))dnl
+         do if1=ifirstf1,ilastf1
+coarsen_index(if1,ic1,ratio(1))dnl
+            do if0=ifirstf0,ilastf0
+coarsen_index(if0,ic0,ratio(0))dnl
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+          enddo
+        enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(conref_edge_body_3d,`dnl
+c
+c***********************************************************************
+c
+
+ifelse($1,`2',`
+      do if2=ifirstf2,ilastf2
+',`
+      do if2=ifirstf2,ilastf2+1
+')dnl
+coarsen_index(if2,ic2,ratio(2))dnl
+
+ifelse($1,`1',`
+         do if1=ifirstf1,ilastf1
+',`
+         do if1=ifirstf1,ilastf1+1
+')dnl
+coarsen_index(if1,ic1,ratio(1))dnl
+
+ifelse($1,`0',`
+            do if0=ifirstf0,ilastf0
+',`
+            do if0=ifirstf0,ilastf0+1
+')dnl
+coarsen_index(if0,ic0,ratio(0))dnl
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(conref_face_body_3d,`dnl
+c
+c***********************************************************************
+c
+      do if$3=ifirstf$3,ilastf$3
+coarsen_index(if$3,ic$3,ratio($3))dnl
+         do if$2=ifirstf$2,ilastf$2
+coarsen_index(if$2,ic$2,ratio($2))dnl
+            do if$1=ifirstf$1,ilastf$1+1
+coarsen_index(if$1,ie$1,ratio($1))dnl
+               arrayf(if$1,if$2,if$3)=arrayc(ie$1,ic$2,ic$3)
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(conref_outerface_body_3d,`dnl
+c
+c***********************************************************************
+c
+      do if$3=ifirstf$3,ilastf$3
+coarsen_index(if$3,ic$3,ratio($3))dnl
+         do if$2=ifirstf$2,ilastf$2
+coarsen_index(if$2,ic$2,ratio($2))dnl
+            arrayf(if$2,if$3)=arrayc(ic$2,ic$3)
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(conref_side_body_3d,`dnl
+c
+c***********************************************************************
+c
+
+ifelse($1,`2',`
+      do if2=ifirstf2,ilastf2+1
+',`
+      do if2=ifirstf2,ilastf2
+')dnl
+coarsen_index(if2,ic2,ratio(2))dnl
+
+ifelse($1,`1',`
+         do if1=ifirstf1,ilastf1+1
+',`
+         do if1=ifirstf1,ilastf1
+')dnl
+coarsen_index(if1,ic1,ratio(1))dnl
+
+ifelse($1,`0',`
+            do if0=ifirstf0,ilastf0+1
+',`
+            do if0=ifirstf0,ilastf0
+')dnl
+coarsen_index(if0,ic0,ratio(0))dnl
+
+               arrayf(if0,if1,if2)=arrayc(ic0,ic1,ic2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(conref_op_cell_3d,`dnl
+con_refine_op_subroutine_head_3d()dnl
+      $1
+     &  arrayc(CELL3d(cilo,cihi,0)),
+     &  arrayf(CELL3d(filo,fihi,0))
+      integer ic0,ic1,ic2,if0,if1,if2
+conref_cell_body_3d()dnl
+')dnl
+define(conref_op_edge_3d,`dnl
+con_refine_op_subroutine_head_3d()dnl
+      $1
+     &  arrayc(EDGE3d$2(cilo,cihi,0)),
+     &  arrayf(EDGE3d$2(filo,fihi,0))
+      integer ic0,ic1,ic2,if0,if1,if2
+conref_edge_body_3d($2,$3,$4)dnl
+')dnl
+define(conref_op_face_3d,`dnl
+con_refine_op_subroutine_head_3d()dnl
+      $1
+     &  arrayc(FACE3d$2(cilo,cihi,0)),
+     &  arrayf(FACE3d$2(filo,fihi,0))
+      integer ie$2,ic$3,ic$4,if$2,if$3,if$4
+conref_face_body_3d($2,$3,$4)dnl
+')dnl
+define(conref_op_outerface_3d,`dnl
+con_refine_op_subroutine_head_3d()dnl
+      $1
+     &  arrayc(OUTERFACE3d$2(cilo,cihi,0)),
+     &  arrayf(OUTERFACE3d$2(filo,fihi,0))
+      integer ic$3,ic$4,if$3,if$4
+conref_outerface_body_3d($2,$3,$4)dnl
+')dnl
+define(conref_op_side_3d,`dnl
+con_refine_op_subroutine_head_3d()dnl
+      $1
+     &  arrayc(SIDE3d$2(cilo,cihi,0)),
+     &  arrayf(SIDE3d$2(filo,fihi,0))
+      integer ic0,ic1,ic2,if0,if1,if2
+conref_side_body_3d($2,$3,$4)dnl
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_m4lintimeintops1d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_m4lintimeintops1d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,132 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4lintimeintops1d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for standard 1d time interpolation operators.
+c
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim1d.i)dnl
+define(lin_time_int_subroutine_head_1d,`dnl
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ilast0,
+     &  oilo0,oihi0,
+     &  nilo0,nihi0,
+     &  dilo0,dihi0
+      double precision
+     &  tfrac, oldfrac
+')dnl
+c
+define(lin_time_int_body_1d,`dnl
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do $1=$2
+         arraydst($1)=arrayold($1)*oldfrac
+     &                +arraynew($1)*tfrac
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(lin_time_int_op_cell_1d,`dnl
+lin_time_int_subroutine_head_1d()dnl
+      $1
+     &  arrayold(CELL1d(oilo,oihi,0)),
+     &  arraynew(CELL1d(nilo,nihi,0)),
+     &  arraydst(CELL1d(dilo,dihi,0))
+      integer ic0
+lin_time_int_body_1d(`ic0',`ifirst0,ilast0')dnl
+')dnl
+c
+define(lin_time_int_op_edge_1d,`dnl
+lin_time_int_subroutine_head_1d()dnl
+      $1
+     &  arrayold(EDGE1d(oilo,oihi,0)),
+     &  arraynew(EDGE1d(nilo,nihi,0)),
+     &  arraydst(EDGE1d(dilo,dihi,0))
+      integer ie0
+lin_time_int_body_1d(`ie0',`ifirst0,ilast0')dnl
+')dnl
+c
+define(lin_time_int_op_face_1d,`dnl
+lin_time_int_subroutine_head_1d()dnl
+      $1
+     &  arrayold(FACE1d(oilo,oihi,0)),
+     &  arraynew(FACE1d(nilo,nihi,0)),
+     &  arraydst(FACE1d(dilo,dihi,0))
+      integer ie0
+lin_time_int_body_1d(`ie0',`ifirst0,ilast0+1')dnl
+')dnl
+c
+define(lin_time_int_op_node_1d,`dnl
+lin_time_int_subroutine_head_1d()dnl
+      $1
+     &  arrayold(NODE1d(oilo,oihi,0)),
+     &  arraynew(NODE1d(nilo,nihi,0)),
+     &  arraydst(NODE1d(dilo,dihi,0))
+      integer ie0
+lin_time_int_body_1d(`ie0',`ifirst0,ilast0+1')dnl
+')dnl
+c
+define(lin_time_int_op_outerface_1d,`dnl
+lin_time_int_subroutine_head_1d()dnl
+      $1
+     &  arrayold(OUTERFACE1d(oilo,oihi,0)),
+     &  arraynew(OUTERFACE1d(nilo,nihi,0)),
+     &  arraydst(OUTERFACE1d(dilo,dihi,0))
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      arraydst(1)=arrayold(1)*oldfrac
+     &           +arraynew(1)*tfrac
+c
+      return
+      end
+')dnl
+c
+define(lin_time_int_op_outerside_1d,`dnl
+lin_time_int_subroutine_head_1d()dnl
+      $1
+     &  arrayold(OUTERSIDE1d(oilo,oihi,0)),
+     &  arraynew(OUTERSIDE1d(nilo,nihi,0)),
+     &  arraydst(OUTERSIDE1d(dilo,dihi,0))
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      arraydst(1)=arrayold(1)*oldfrac
+     &           +arraynew(1)*tfrac
+c
+      return
+      end
+')dnl
+c
+define(lin_time_int_op_side_1d,`dnl
+lin_time_int_subroutine_head_1d()dnl
+      $1
+     &  arrayold(SIDE1d(oilo,oihi,0)),
+     &  arraynew(SIDE1d(nilo,nihi,0)),
+     &  arraydst(SIDE1d(dilo,dihi,0))
+      integer ie0
+lin_time_int_body_1d(`ie0',`ifirst0,ilast0+1')dnl
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_m4lintimeintops2d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_m4lintimeintops2d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,140 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4lintimeintops2d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 2d std linear time interpolation operators.
+c
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+define(lin_time_int_subroutine_head_2d,`dnl
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  oilo0,oilo1,oihi0,oihi1,
+     &  nilo0,nilo1,nihi0,nihi1,
+     &  dilo0,dilo1,dihi0,dihi1
+      double precision
+     &  tfrac, oldfrac
+')dnl
+c
+define(lin_time_int_body_2d,`dnl
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do $2=$4
+         do $1=$3
+            arraydst($1,$2)=arrayold($1,$2)*oldfrac
+     &                       +arraynew($1,$2)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(lin_time_int_op_cell_2d,`dnl
+lin_time_int_subroutine_head_2d()dnl
+      $1
+     &  arrayold(CELL2d(oilo,oihi,0)),
+     &  arraynew(CELL2d(nilo,nihi,0)),
+     &  arraydst(CELL2d(dilo,dihi,0))
+      integer ic0,ic1
+lin_time_int_body_2d(`ic0',`ic1',`ifirst0,ilast0',`ifirst1,ilast1')dnl
+')dnl
+c
+define(lin_time_int_op_edge_2d,`dnl
+lin_time_int_subroutine_head_2d()dnl
+      $1
+     &  arrayold(EDGE2d$2(oilo,oihi,0)),
+     &  arraynew(EDGE2d$2(nilo,nihi,0)),
+     &  arraydst(EDGE2d$2(dilo,dihi,0))
+      integer ie0,ie1
+lin_time_int_body_2d(`ie0',`ie1',`ifirst0,ilast0+$2',`ifirst1,ilast1+$3')dnl
+')dnl
+c
+define(lin_time_int_op_face_2d,`dnl
+lin_time_int_subroutine_head_2d()dnl
+      $1
+     &  arrayold(FACE2d$2(oilo,oihi,0)),
+     &  arraynew(FACE2d$2(nilo,nihi,0)),
+     &  arraydst(FACE2d$2(dilo,dihi,0))
+      integer ie$2,ic$3
+lin_time_int_body_2d(`ie$2',`ic$3',`ifirst$2,ilast$2+1',`ifirst$3,ilast$3')dnl
+')dnl
+c
+define(lin_time_int_op_node_2d,`dnl
+lin_time_int_subroutine_head_2d()dnl
+      $1
+     &  arrayold(NODE2d(oilo,oihi,0)),
+     &  arraynew(NODE2d(nilo,nihi,0)),
+     &  arraydst(NODE2d(dilo,dihi,0))
+      integer ie0,ie1
+lin_time_int_body_2d(`ie0',`ie1',`ifirst0,ilast0+1',`ifirst1,ilast1+1')dnl
+')dnl
+c
+define(lin_time_int_op_outerface_2d,`dnl
+lin_time_int_subroutine_head_2d()dnl
+      $1
+     &  arrayold(OUTERFACE2d$2(oilo,oihi,0)),
+     &  arraynew(OUTERFACE2d$2(nilo,nihi,0)),
+     &  arraydst(OUTERFACE2d$2(dilo,dihi,0))
+      integer ic$3 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic$3=ifirst$3,ilast$3
+         arraydst(ic$3)=arrayold(ic$3)*oldfrac
+     &                +arraynew(ic$3)*tfrac
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(lin_time_int_op_outerside_2d,`dnl
+lin_time_int_subroutine_head_2d()dnl
+      $1
+     &  arrayold(OUTERSIDE2d$2(oilo,oihi,0)),
+     &  arraynew(OUTERSIDE2d$2(nilo,nihi,0)),
+     &  arraydst(OUTERSIDE2d$2(dilo,dihi,0))
+      integer ic$3 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic$3=ifirst$3,ilast$3
+         arraydst(ic$3)=arrayold(ic$3)*oldfrac
+     &                +arraynew(ic$3)*tfrac
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(lin_time_int_op_side_2d,`dnl
+lin_time_int_subroutine_head_2d()dnl
+      $1
+     &  arrayold(SIDE2d$2(oilo,oihi,0)),
+     &  arraynew(SIDE2d$2(nilo,nihi,0)),
+     &  arraydst(SIDE2d$2(dilo,dihi,0))
+      integer ie0,ie1
+lin_time_int_body_2d(`ie0',`ie1',`ifirst0,ilast0+$3',`ifirst1,ilast1+$2')dnl
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/pdat/fortran/pdat_m4lintimeintops3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/pdat/fortran/pdat_m4lintimeintops3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,158 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/pdat/fortran/pdat_m4lintimeintops3d.i $
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for 3d std linear time interpolation operators.
+c
+define(SAMRAI_FORTDIR,../../pdat/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+define(lin_time_int_subroutine_head_3d,`dnl
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2,
+     &  tfrac,
+     &  arrayold,arraynew,
+     &  arraydst)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  oilo0,oilo1,oilo2,oihi0,oihi1,oihi2,
+     &  nilo0,nilo1,nilo2,nihi0,nihi1,nihi2,
+     &  dilo0,dilo1,dilo2,dihi0,dihi1,dihi2
+      double precision
+     &  tfrac, oldfrac
+')dnl
+c
+define(lin_time_int_body_3d,`dnl
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do $3=$6
+         do $2=$5
+            do $1=$4
+               arraydst($1,$2,$3)=
+     &                              +arrayold($1,$2,$3)*oldfrac
+     &                              +arraynew($1,$2,$3)*tfrac
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(lin_time_int_op_cell_3d,`dnl
+lin_time_int_subroutine_head_3d()dnl
+      $1
+     &  arrayold(CELL3d(oilo,oihi,0)),
+     &  arraynew(CELL3d(nilo,nihi,0)),
+     &  arraydst(CELL3d(dilo,dihi,0))
+      integer ic0,ic1,ic2
+lin_time_int_body_3d(`ic0',`ic1',`ic2',`ifirst0,ilast0',`ifirst1,ilast1',`ifirst2,ilast2')dnl
+')dnl
+c
+define(lin_time_int_op_edge_3d,`dnl
+lin_time_int_subroutine_head_3d()dnl
+      $1
+     &  arrayold(EDGE3d$2(oilo,oihi,0)),
+     &  arraynew(EDGE3d$2(nilo,nihi,0)),
+     &  arraydst(EDGE3d$2(dilo,dihi,0))
+      integer ie0,ie1,ie2
+ifelse($2,`0',`lin_time_int_body_3d(`ie0',`ie1',`ie2',`ifirst0,ilast0',`ifirst1,ilast1+1',`ifirst2,ilast2+1')dnl
+',`')dnl
+ifelse($2,`1',`lin_time_int_body_3d(`ie0',`ie1',`ie2',`ifirst0,ilast0+1',`ifirst1,ilast1',`ifirst2,ilast2+1')dnl
+',`')dnl
+ifelse($2,`2',`lin_time_int_body_3d(`ie0',`ie1',`ie2',`ifirst0,ilast0+1',`ifirst1,ilast1+1',`ifirst2,ilast2')dnl
+',`')dnl
+')dnl
+c
+define(lin_time_int_op_face_3d,`dnl
+lin_time_int_subroutine_head_3d()dnl
+      $1
+     &  arrayold(FACE3d$2(oilo,oihi,0)),
+     &  arraynew(FACE3d$2(nilo,nihi,0)),
+     &  arraydst(FACE3d$2(dilo,dihi,0))
+      integer ie$2,ic$3,ic$4
+lin_time_int_body_3d(`ie$2',`ic$3',`ic$4',`ifirst$2,ilast$2+1',`ifirst$3,ilast$3',`ifirst$4,ilast$4')dnl
+')dnl
+c
+define(lin_time_int_op_node_3d,`dnl
+lin_time_int_subroutine_head_3d()dnl
+      $1
+     &  arrayold(NODE3d(oilo,oihi,0)),
+     &  arraynew(NODE3d(nilo,nihi,0)),
+     &  arraydst(NODE3d(dilo,dihi,0))
+      integer ie0,ie1,ie2
+lin_time_int_body_3d(`ie0',`ie1',`ie2',`ifirst0,ilast0+1',`ifirst1,ilast1+1',`ifirst2,ilast2+1')dnl
+')dnl
+c
+define(lin_time_int_op_outerface_3d,`dnl
+lin_time_int_subroutine_head_3d()dnl
+      $1
+     &  arrayold(OUTERFACE3d$2(oilo,oihi,0)),
+     &  arraynew(OUTERFACE3d$2(nilo,nihi,0)),
+     &  arraydst(OUTERFACE3d$2(dilo,dihi,0))
+      integer ic$3,ic$4 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic$4=ifirst$4,ilast$4
+         do ic$3=ifirst$3,ilast$3
+            arraydst(ic$3,ic$4)=arrayold(ic$3,ic$4)*oldfrac
+     &                       +arraynew(ic$3,ic$4)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(lin_time_int_op_outerside_3d,`dnl
+lin_time_int_subroutine_head_3d()dnl
+      $1
+     &  arrayold(OUTERSIDE3d$2(oilo,oihi,0)),
+     &  arraynew(OUTERSIDE3d$2(nilo,nihi,0)),
+     &  arraydst(OUTERSIDE3d$2(dilo,dihi,0))
+      integer ic$3,ic$4 
+c
+c***********************************************************************
+c
+      oldfrac=one-tfrac
+
+      do ic$4=ifirst$4,ilast$4
+         do ic$3=ifirst$3,ilast$3
+            arraydst(ic$3,ic$4)=arrayold(ic$3,ic$4)*oldfrac
+     &                       +arraynew(ic$3,ic$4)*tfrac
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+define(lin_time_int_op_side_3d,`dnl
+lin_time_int_subroutine_head_3d()dnl
+      $1
+     &  arrayold(SIDE3d$2(oilo,oihi,0)),
+     &  arraynew(SIDE3d$2(nilo,nihi,0)),
+     &  arraydst(SIDE3d$2(dilo,dihi,0))
+      integer ie0,ie1,ie2
+ifelse($2,`0',`lin_time_int_body_3d(`ie0',`ie1',`ie2',`ifirst0,ilast0+1',`ifirst1,ilast1',`ifirst2,ilast2')dnl
+',`')dnl
+ifelse($2,`1',`lin_time_int_body_3d(`ie0',`ie1',`ie2',`ifirst0,ilast0',`ifirst1,ilast1+1',`ifirst2,ilast2')dnl
+',`')dnl
+ifelse($2,`2',`lin_time_int_body_3d(`ie0',`ie1',`ie2',`ifirst0,ilast0',`ifirst1,ilast1',`ifirst2,ilast2+1')dnl
+',`')dnl
+')dnl
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/CVODEAbstractFunctions.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/CVODEAbstractFunctions.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,29 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to user-specified functions for CVODE package 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/solv/CVODEAbstractFunctions.h"
+
+#ifdef HAVE_SUNDIALS
+
+namespace SAMRAI {
+namespace solv {
+
+CVODEAbstractFunctions::CVODEAbstractFunctions()
+{
+}
+
+CVODEAbstractFunctions::~CVODEAbstractFunctions()
+{
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/CVODEAbstractFunctions.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/CVODEAbstractFunctions.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,112 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to user-specified functions for CVODE package 
+ *
+ ************************************************************************/
+
+#ifndef included_solv_CVODEAbstractFunctions
+#define included_solv_CVODEAbstractFunctions
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/solv/SundialsAbstractVector.h"
+
+#ifdef HAVE_SUNDIALS
+
+namespace SAMRAI {
+namespace solv {
+
+/**
+ * Class CVODEAbstractFunctions is an abstract base class that defines
+ * an interface for the user-supplied RHSFunction and preconditioner
+ * routines to be used with CVODE and CVSpgmr via the C++ wrapper
+ * class CVODESolver.  To use CVODE with the C++ wrapper one must
+ * derive a subclass of this base class and pass it into the CVODESolver
+ * constructor.  The pure virtual member functions in this interface are
+ * used by CVODE and CVSpgmr during the ODE integration process.  The
+ * complete argument lists in the function signatures defined by CVODE
+ * for the user-supplied routines have been preserved for the most part.
+ * In a few cases, some arguments do not appear in the function signatures
+ * below since they are superfluous via this interface.
+ *
+ * @see solv::CVODESolver
+ * @see solv::SundialsAbstractVector
+ */
+
+class CVODEAbstractFunctions
+{
+public:
+   /**
+    * The constructor and destructor for CVODEAbstractFunctions
+    * is empty.
+    */
+   CVODEAbstractFunctions();
+   virtual ~CVODEAbstractFunctions();
+
+   /**
+    * User-supplied right-hand side function evaluation.
+    *
+    * The function arguments are:
+    *
+    *
+    *
+    * - \b t        (INPUT) {current value of the independent variable}
+    * - \b y        (INPUT) {current value of dependent variable vector}
+    * - \b y_dot   (OUTPUT){current value of the derivative of y}
+    *
+    *
+    *
+    *
+    * IMPORTANT: This function must not modify the vector y.
+    */
+   virtual int
+   evaluateRHSFunction(
+      double t,
+      SundialsAbstractVector* y,
+      SundialsAbstractVector* y_dot) = 0;
+
+   /**
+    * User-supplied function for setting up the preconditioner
+    * to be used in the solution of the linear system that arises
+    * during Newton iteration.
+    */
+   virtual int
+   CVSpgmrPrecondSet(
+      double t,
+      SundialsAbstractVector* y,
+      SundialsAbstractVector* fy,
+      int jok,
+      int* jcurPtr,
+      double gamma,
+      SundialsAbstractVector* vtemp1,
+      SundialsAbstractVector* vtemp2,
+      SundialsAbstractVector* vtemp3) = 0;
+
+   /**
+    * User-supplied function for setting up the preconditioner
+    * to be used in the solution of the linear system that arises
+    * during Newton iteration.
+    */
+   virtual int
+   CVSpgmrPrecondSolve(
+      double t,
+      SundialsAbstractVector* y,
+      SundialsAbstractVector* fy,
+      SundialsAbstractVector* r,
+      SundialsAbstractVector* z,
+      double gamma,
+      double delta,
+      int lr,
+      SundialsAbstractVector* vtemp) = 0;
+
+};
+
+}
+}
+
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/CVODESolver.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/CVODESolver.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1058 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   C++ Wrapper class for CVODE solver package 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/solv/CVODESolver.h"
+
+#ifdef HAVE_SUNDIALS
+
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+// CVODE includes
+extern "C" {
+#include "cvode/cvode.h"
+}
+
+extern "C" {
+#include "cvode/cvode_spgmr.h"
+}
+
+#ifndef STAT_OUTPUT_BUFFER_SIZE
+#define STAT_OUTPUT_BUFFER_SIZE 256
+#endif
+
+namespace SAMRAI {
+namespace solv {
+
+#define SABSVEC_CAST(v) \
+   (static_cast<SAMRAI::solv::SundialsAbstractVector *>(v \
+                                                        -> \
+                                                        content))
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Static member functions that provide linkage with CVODE package.      *
+ * See header file for CVODEAbstractFunctions for more information. *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int CVODESolver::CVODERHSFuncEval(
+   realtype t,
+   N_Vector y,
+   N_Vector y_dot,
+   void* my_solver)
+{
+   return ((CVODESolver *)my_solver)->getCVODEFunctions()->
+          evaluateRHSFunction(t, SABSVEC_CAST(y), SABSVEC_CAST(y_dot));
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Static member functions that provide linkage with CVSpgmr package.	*
+ *                                                                       *
+ *************************************************************************
+ */
+
+int CVODESolver::CVSpgmrPrecondSet(
+   realtype t,
+   N_Vector y,
+   N_Vector fy,
+   int jok,
+   booleantype* jcurPtr,
+   realtype gamma,
+   void* my_solver,
+   N_Vector vtemp1,
+   N_Vector vtemp2,
+   N_Vector vtemp3)
+{
+
+   int success;
+   success = ((CVODESolver *)my_solver)->getCVODEFunctions()->
+      CVSpgmrPrecondSet(t,
+         SABSVEC_CAST(y),
+         SABSVEC_CAST(fy),
+         jok,
+         jcurPtr,
+         gamma,
+         SABSVEC_CAST(vtemp1),
+         SABSVEC_CAST(vtemp2),
+         SABSVEC_CAST(vtemp3));
+
+   return success;
+}
+
+int CVODESolver::CVSpgmrPrecondSolve(
+   realtype t,
+   N_Vector y,
+   N_Vector fy,
+   N_Vector r,
+   N_Vector z,
+   realtype gamma,
+   realtype delta,
+   int lr,
+   void* my_solver,
+   N_Vector vtemp)
+{
+
+   int success;
+   success = ((CVODESolver *)my_solver)->getCVODEFunctions()->
+      CVSpgmrPrecondSolve(t,
+         SABSVEC_CAST(y),
+         SABSVEC_CAST(fy),
+         SABSVEC_CAST(r),
+         SABSVEC_CAST(z),
+         gamma,
+         delta,
+         lr,
+         SABSVEC_CAST(vtemp));
+
+   return success;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * CVODESolver constructor and destructor.                         *
+ *                                                                       *
+ *************************************************************************
+ */
+CVODESolver::CVODESolver(
+   const std::string& object_name,
+   CVODEAbstractFunctions* my_functions,
+   const bool uses_preconditioner)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!(my_functions == (CVODEAbstractFunctions *)NULL));
+#endif
+
+   d_object_name = object_name;
+   d_cvode_functions = my_functions;
+   d_uses_preconditioner = uses_preconditioner;
+
+   d_solution_vector = (SundialsAbstractVector *)NULL;
+
+   /*
+    * Set default parameters to safe values or to CVODE/CVSpgmr defaults.
+    */
+
+   /*
+    * CVODE memory record and log file.
+    */
+   d_cvode_mem = NULL;
+   d_cvode_log_file = NULL;
+   d_cvode_log_file_name = "cvode.log";
+
+   /*
+    * ODE parameters.
+    */
+   d_t_0 = 0.0;
+   d_user_t_f = 0.0;
+   d_actual_t_f = 0.0;
+   d_ic_vector = ((SundialsAbstractVector *)NULL);
+
+   /*
+    * ODE integration parameters.
+    */
+
+   setLinearMultistepMethod(CV_BDF);
+   setIterationType(CV_FUNCTIONAL);
+   setToleranceType(CV_SS);
+   setRelativeTolerance(0.0);
+   setAbsoluteTolerance(0.0);
+   d_absolute_tolerance_vector = (SundialsAbstractVector *)NULL;
+   setSteppingMethod(CV_NORMAL);
+
+   d_max_order = -1;
+   d_max_num_internal_steps = -1;
+   d_max_num_warnings = -1;
+   d_init_step_size = -1;
+   d_max_step_size = -1;
+   d_min_step_size = -1;
+
+   /*
+    * CVSpgmr parameters.
+    *
+    * Note that when the maximum krylov dimension and CVSpgmr
+    * tolerance scale factor are set to 0, CVSpgmr uses its
+    * internal default values.  These are described in the header for
+    * this class.
+    */
+   setPreconditioningType(PREC_NONE);
+   setGramSchmidtType(MODIFIED_GS);
+   setMaxKrylovDimension(0);
+   setCVSpgmrToleranceScaleFactor(0);
+
+   d_CVODE_needs_initialization = true;
+}
+
+CVODESolver::~CVODESolver()
+{
+   if (d_cvode_log_file) fclose(d_cvode_log_file);
+   if (d_cvode_mem) CVodeFree(&d_cvode_mem);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Functions to initialize linear solver and reset CVODE structure.      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CVODESolver::initialize(
+   SundialsAbstractVector* solution)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(solution == (SundialsAbstractVector *)NULL));
+   TBOX_ASSERT(d_solution_vector == (SundialsAbstractVector *)NULL);
+#endif
+   d_solution_vector = solution;
+   d_CVODE_needs_initialization = true;
+   initializeCVODE();
+}
+
+void CVODESolver::initializeCVODE()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(d_solution_vector == (SundialsAbstractVector *)NULL));
+#endif
+
+// Disable Intel warning on real comparison
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1572)
+#endif
+
+   if (d_CVODE_needs_initialization) {
+
+      /*
+       * Set CVODE log file.
+       */
+      if (d_cvode_log_file) {
+         fclose(d_cvode_log_file);
+      }
+      d_cvode_log_file = fopen(d_cvode_log_file_name.c_str(), "w");
+
+      /*
+       * Make sure that either the relative tolerance or the
+       * absolute tolerance has been set to a nonzero value.
+       */
+      bool tolerance_error = false;
+      if (d_use_scalar_absolute_tolerance) {
+         if ((d_relative_tolerance == 0.0) &&
+             (d_absolute_tolerance_scalar == 0.0)) {
+            tolerance_error = true;
+         }
+      } else {
+         if ((d_relative_tolerance == 0.0) &&
+             (d_absolute_tolerance_vector->maxNorm() == 0.0)) {
+            tolerance_error = true;
+         }
+      }
+
+      if (tolerance_error && d_cvode_log_file) {
+         fprintf(d_cvode_log_file,
+            "%s: Both relative and absolute tolerance have value 0.0",
+            d_object_name.c_str());
+      }
+
+      /*
+       * CVODE function pointer.
+       */
+      CVRhsFn RHSFunc = CVODESolver::CVODERHSFuncEval;
+
+      /*
+       * Free previously allocated CVode memory.  Note that the
+       * CVReInit() function is not used since the d_neq variable
+       * might have been changed from the previous initializeCVODE()
+       * call.
+       */
+      if (d_cvode_mem) CVodeFree(&d_cvode_mem);
+
+      /*
+       * Allocate main memory for CVODE package.
+       */
+
+      d_cvode_mem = CVodeCreate(d_linear_multistep_method, d_iteration_type);
+
+      /*
+       * Set tolerance parameter based on type
+       */
+      void* abstol;
+      if (d_tolerance_type == CV_SV) {
+         abstol = d_absolute_tolerance_vector->getNVector();
+      } else {
+         abstol = &d_absolute_tolerance_scalar;
+      }
+
+      int ierr = CVodeMalloc(d_cvode_mem,
+            RHSFunc,
+            d_t_0,
+            d_ic_vector->getNVector(),
+            d_tolerance_type,
+            d_relative_tolerance,
+            abstol);
+      CVODE_SAMRAI_ERROR(ierr);
+
+      ierr = CVodeSetFdata(d_cvode_mem, this);
+      CVODE_SAMRAI_ERROR(ierr);
+
+      /*
+       * If the iteration type is set to NEWTON, then initialize
+       * the CVSpgmr linear solver.
+       */
+      if (d_iteration_type == CV_NEWTON) {
+
+         ierr = CVSpgmr(d_cvode_mem,
+               d_precondition_type,
+               d_max_krylov_dim);
+         CVODE_SAMRAI_ERROR(ierr);
+
+         if (!(d_max_order < 1)) {
+            ierr = CVodeSetMaxOrd(d_cvode_mem, d_max_order);
+            CVODE_SAMRAI_ERROR(ierr);
+         }
+
+         /*
+          * Setup CVSpgmr function pointers.
+          */
+         CVSpilsPrecSetupFn precond_set = NULL;
+         CVSpilsPrecSolveFn precond_solve = NULL;
+
+         if (d_uses_preconditioner) {
+            precond_set = CVODESolver::CVSpgmrPrecondSet;
+            precond_solve = CVODESolver::CVSpgmrPrecondSolve;
+            CVSpilsSetPreconditioner(d_cvode_mem, precond_set,
+               precond_solve, this);
+         }
+
+         if (!(d_max_num_internal_steps < 0)) {
+            ierr = CVodeSetMaxNumSteps(d_cvode_mem, d_max_num_internal_steps);
+            CVODE_SAMRAI_ERROR(ierr);
+         }
+
+         if (!(d_max_num_warnings < 0)) {
+            ierr = CVodeSetMaxHnilWarns(d_cvode_mem, d_max_num_warnings);
+            CVODE_SAMRAI_ERROR(ierr);
+         }
+
+         if (!(d_init_step_size < 0)) {
+            ierr = CVodeSetInitStep(d_cvode_mem, d_init_step_size);
+            CVODE_SAMRAI_ERROR(ierr);
+         }
+
+         if (!(d_max_step_size < 0)) {
+            ierr = CVodeSetMaxStep(d_cvode_mem, d_max_step_size);
+            CVODE_SAMRAI_ERROR(ierr);
+         }
+
+         if (!(d_min_step_size < 0)) {
+            ierr = CVodeSetMinStep(d_cvode_mem, d_min_step_size);
+            CVODE_SAMRAI_ERROR(ierr);
+         }
+      }
+
+   } // if no need to initialize CVODE, function does nothing
+
+   d_CVODE_needs_initialization = false;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Integrate system of ODEs to d_t_f.  If necessary, re-initialize       *
+ * CVODE.                                                                *
+ *                                                                       *
+ *************************************************************************
+ */
+int CVODESolver::solve()
+{
+
+   int retval = CV_SUCCESS;
+
+   initializeCVODE();
+
+   /*
+    * Check to make sure that user specified final value for t
+    * is greater than initial value for t.
+    */
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(d_user_t_f > d_t_0);
+#endif
+
+   /*
+    * See cvode.h header file for definition of return types.
+    */
+
+   retval = CVode(d_cvode_mem,
+         d_user_t_f,
+         d_solution_vector->getNVector(),
+         &d_actual_t_f,
+         d_stepping_method);
+
+   return retval;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Setting CVODE log file name and print flag for CVODE statistics.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CVODESolver::setLogFileData(
+   const std::string& log_fname)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!log_fname.empty());
+#endif
+   if (!(log_fname == d_cvode_log_file_name)) {
+      d_cvode_log_file_name = log_fname;
+      d_CVODE_needs_initialization = true;
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Accessor functions for user-defined function and linear solver.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CVODESolver::setCVODEFunctions(
+   CVODEAbstractFunctions* my_functions,
+   const bool uses_preconditioner)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(my_functions == (CVODEAbstractFunctions *)NULL));
+#endif
+
+   d_cvode_functions = my_functions;
+   d_uses_preconditioner = uses_preconditioner;
+   d_CVODE_needs_initialization = true;
+}
+
+CVODEAbstractFunctions *CVODESolver::getCVODEFunctions() const
+{
+   return d_cvode_functions;
+}
+/*
+ *************************************************************************
+ *                                                                       *
+ * Accessor functions for CVODE integration parameters.                  *
+ *                                                                       *
+ *************************************************************************
+ */
+void CVODESolver::setLinearMultistepMethod(
+   int linear_multistep_method)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((linear_multistep_method == CV_ADAMS) ||
+      (linear_multistep_method == CV_BDF));
+#endif
+   d_linear_multistep_method = linear_multistep_method;
+   d_CVODE_needs_initialization = true;
+}
+
+void CVODESolver::setIterationType(
+   int iteration_type)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((iteration_type == CV_FUNCTIONAL) ||
+      (iteration_type == CV_NEWTON));
+#endif
+   d_iteration_type = iteration_type;
+   d_CVODE_needs_initialization = true;
+}
+
+void CVODESolver::setToleranceType(
+   int tolerance_type)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((tolerance_type == CV_SS) ||
+      (tolerance_type == CV_SV));
+#endif
+   d_tolerance_type = tolerance_type;
+   d_CVODE_needs_initialization = true;
+}
+
+void CVODESolver::setRelativeTolerance(
+   double relative_tolerance)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(relative_tolerance >= 0.0);
+#endif
+
+   d_relative_tolerance = relative_tolerance;
+   d_CVODE_needs_initialization = true;
+}
+
+void CVODESolver::setAbsoluteTolerance(
+   double absolute_tolerance)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(absolute_tolerance >= 0.0);
+#endif
+   d_absolute_tolerance_scalar = absolute_tolerance;
+   d_use_scalar_absolute_tolerance = true;
+   d_CVODE_needs_initialization = true;
+}
+
+void CVODESolver::setAbsoluteTolerance(
+   SundialsAbstractVector* absolute_tolerance)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(absolute_tolerance == (SundialsAbstractVector *)NULL));
+   TBOX_ASSERT(absolute_tolerance->vecMin() >= 0.0);
+#endif
+   d_absolute_tolerance_vector = absolute_tolerance;
+   d_use_scalar_absolute_tolerance = false;
+   d_CVODE_needs_initialization = true;
+}
+
+void CVODESolver::setSteppingMethod(
+   int stepping_method)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((stepping_method == CV_NORMAL) ||
+      (stepping_method == CV_ONE_STEP));
+#endif
+   d_stepping_method = stepping_method;
+   d_CVODE_needs_initialization = true;
+}
+
+void CVODESolver::setInitialValueOfIndependentVariable(
+   double t_0)
+{
+   d_t_0 = t_0;
+   d_CVODE_needs_initialization = true;
+}
+
+void CVODESolver::setFinalValueOfIndependentVariable(
+   double t_f,
+   bool cvode_needs_initialization)
+{
+   d_user_t_f = t_f;
+   d_CVODE_needs_initialization = cvode_needs_initialization;
+}
+
+void CVODESolver::setInitialConditionVector(
+   SundialsAbstractVector* ic_vector)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(ic_vector == (SundialsAbstractVector *)NULL));
+#endif
+   d_ic_vector = ic_vector;
+   d_CVODE_needs_initialization = true;
+}
+
+void CVODESolver::setMaximumLinearMultistepMethodOrder(
+   int max_order)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(max_order >= 0);
+#endif
+   d_max_order = max_order;
+   d_CVODE_needs_initialization = true;
+}
+
+void CVODESolver::setMaximumNumberOfInternalSteps(
+   int max_num_internal_steps)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(max_num_internal_steps >= 0);
+#endif
+
+   d_max_num_internal_steps = max_num_internal_steps;
+   d_CVODE_needs_initialization = true;
+}
+
+void CVODESolver::setMaximumNumberOfNilStepWarnings(
+   int max_num_warnings)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(max_num_warnings >= 0);
+#endif
+
+   d_max_num_warnings = max_num_warnings;
+   d_CVODE_needs_initialization = true;
+}
+
+void CVODESolver::setInitialStepSize(
+   double init_step_size)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(init_step_size >= 0.0);
+#endif
+   d_init_step_size = init_step_size;
+   d_CVODE_needs_initialization = true;
+}
+
+void CVODESolver::setMaximumAbsoluteStepSize(
+   double max_step_size)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(max_step_size >= 0.0);
+#endif
+   d_max_step_size = max_step_size;
+   d_CVODE_needs_initialization = true;
+}
+
+void CVODESolver::setMinimumAbsoluteStepSize(
+   double min_step_size)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(min_step_size >= 0.0);
+#endif
+   d_min_step_size = min_step_size;
+   d_CVODE_needs_initialization = true;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Accessor functions for CVSpgmr parameters.                            *
+ *                                                                       *
+ *************************************************************************
+ */
+void CVODESolver::setPreconditioningType(
+   int precondition_type)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((precondition_type == PREC_NONE) ||
+      (precondition_type == PREC_LEFT) ||
+      (precondition_type == PREC_RIGHT) ||
+      (precondition_type == PREC_BOTH));
+#endif
+   d_precondition_type = precondition_type;
+   d_CVODE_needs_initialization = true;
+}
+
+void CVODESolver::setGramSchmidtType(
+   int gs_type)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((gs_type == CLASSICAL_GS) ||
+      (gs_type == MODIFIED_GS));
+#endif
+   d_gram_schmidt_type = gs_type;
+   d_CVODE_needs_initialization = true;
+}
+
+void CVODESolver::setMaxKrylovDimension(
+   int max_krylov_dim)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(max_krylov_dim >= 0);
+#endif
+   d_max_krylov_dim = max_krylov_dim;
+   d_CVODE_needs_initialization = true;
+}
+
+void CVODESolver::setCVSpgmrToleranceScaleFactor(
+   double tol_scale_factor)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(tol_scale_factor >= 0);
+#endif
+   d_tol_scale_factor = tol_scale_factor;
+   d_CVODE_needs_initialization = true;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Accessor functions for results of CVODE integration step.             *
+ *                                                                       *
+ *************************************************************************
+ */
+SundialsAbstractVector *CVODESolver::getSolutionVector() const
+{
+   return d_solution_vector;
+}
+
+int CVODESolver::getDkyVector(
+   double t,
+   int k,
+   SundialsAbstractVector* dky) const
+{
+   int return_code;
+
+   return_code = CVodeGetDky(d_cvode_mem, t, k, dky->getNVector());
+
+   return return_code;
+}
+
+double CVODESolver::getActualFinalValueOfIndependentVariable() const
+{
+   return d_actual_t_f;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Access methods for CVODE statistics.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CVODESolver::printStatistics(
+   std::ostream& os) const
+{
+   printCVODEStatistics(os);
+   printCVSpgmrStatistics(os);
+}
+
+void CVODESolver::printCVODEStatistics(
+   std::ostream& os) const
+{
+
+   char buf[STAT_OUTPUT_BUFFER_SIZE];
+
+   os << "\nCVODESolver: CVODE statistics... " << std::endl;
+
+   sprintf(buf, "lenrw           = %5d     leniw            = %5d\n",
+      getCVODEMemoryUsageForDoubles(),
+      getCVODEMemoryUsageForIntegers());
+   os << buf;
+   sprintf(buf, "nst             = %5d     nfe              = %5d\n",
+      getNumberOfInternalStepsTaken(),
+      getNumberOfRHSFunctionCalls());
+   os << buf;
+   sprintf(buf, "nni             = %5d     nsetups          = %5d\n",
+      getNumberOfNewtonIterations(),
+      getNumberOfLinearSolverSetupCalls());
+   os << buf;
+   sprintf(buf, "netf            = %5d     ncfn             = %5d\n",
+      getNumberOfLocalErrorTestFailures(),
+      getNumberOfNonlinearConvergenceFailures());
+   os << buf;
+   sprintf(buf, "qu              = %5d     qcur             = %5d\n",
+      getOrderUsedDuringLastInternalStep(),
+      getOrderToBeUsedDuringNextInternalStep());
+   os << buf;
+   sprintf(buf, "\nhu              = %e      hcur             = %e\n",
+      getStepSizeForLastInternalStep(),
+      getStepSizeForNextInternalStep());
+   os << buf;
+   sprintf(buf, "tcur            = %e      tolsf            = %e\n",
+      getCurrentInternalValueOfIndependentVariable(),
+      getCVODESuggestedToleranceScalingFactor());
+   os << buf;
+}
+
+int CVODESolver::getNumberOfInternalStepsTaken() const
+{
+   long int r;
+   int ierr = CVodeGetNumSteps(d_cvode_mem, &r);
+   CVODE_SAMRAI_ERROR(ierr);
+   return static_cast<int>(r);
+}
+
+int CVODESolver::getNumberOfRHSFunctionCalls() const
+{
+   long int r;
+   int ierr = CVodeGetNumRhsEvals(d_cvode_mem, &r);
+   CVODE_SAMRAI_ERROR(ierr);
+   return static_cast<int>(r);
+}
+
+int CVODESolver::getNumberOfLinearSolverSetupCalls() const
+{
+   long int r;
+   int ierr = CVodeGetNumLinSolvSetups(d_cvode_mem, &r);
+   CVODE_SAMRAI_ERROR(ierr);
+   return static_cast<int>(r);
+}
+
+int CVODESolver::getNumberOfNewtonIterations() const
+{
+   long int r;
+   int ierr = CVodeGetNumNonlinSolvIters(d_cvode_mem, &r);
+   CVODE_SAMRAI_ERROR(ierr);
+   return static_cast<int>(r);
+}
+
+int CVODESolver::getNumberOfNonlinearConvergenceFailures() const
+{
+   long int r;
+   int ierr = CVodeGetNumNonlinSolvConvFails(d_cvode_mem, &r);
+   CVODE_SAMRAI_ERROR(ierr);
+   return static_cast<int>(r);
+}
+
+int CVODESolver::getNumberOfLocalErrorTestFailures() const
+{
+   long int r;
+   int ierr = CVodeGetNumErrTestFails(d_cvode_mem, &r);
+   CVODE_SAMRAI_ERROR(ierr);
+   return static_cast<int>(r);
+}
+
+int CVODESolver::getOrderUsedDuringLastInternalStep() const
+{
+   int r;
+   int ierr = CVodeGetLastOrder(d_cvode_mem, &r);
+   CVODE_SAMRAI_ERROR(ierr);
+   return static_cast<int>(r);
+}
+
+int CVODESolver::getOrderToBeUsedDuringNextInternalStep() const
+{
+   int r;
+   int ierr = CVodeGetCurrentOrder(d_cvode_mem, &r);
+   CVODE_SAMRAI_ERROR(ierr);
+   return static_cast<int>(r);
+}
+
+int CVODESolver::getCVODEMemoryUsageForDoubles() const
+{
+   long int r1;
+   long int r2;
+   int ierr = CVodeGetWorkSpace(d_cvode_mem, &r1, &r2);
+   CVODE_SAMRAI_ERROR(ierr);
+   return static_cast<int>(r1);
+}
+
+int CVODESolver::getCVODEMemoryUsageForIntegers() const
+{
+   long int r1;
+   long int r2;
+   int ierr = CVodeGetWorkSpace(d_cvode_mem, &r1, &r2);
+   CVODE_SAMRAI_ERROR(ierr);
+   return static_cast<int>(r2);
+}
+
+double CVODESolver::getStepSizeForLastInternalStep() const
+{
+   realtype r;
+   int ierr = CVodeGetLastStep(d_cvode_mem, &r);
+   CVODE_SAMRAI_ERROR(ierr);
+   return r;
+}
+
+double CVODESolver::getStepSizeForNextInternalStep() const
+{
+   realtype r;
+   int ierr = CVodeGetCurrentStep(d_cvode_mem, &r);
+   CVODE_SAMRAI_ERROR(ierr);
+   return r;
+}
+
+double CVODESolver::getCurrentInternalValueOfIndependentVariable() const
+{
+   realtype r;
+   int ierr = CVodeGetCurrentStep(d_cvode_mem, &r);
+   CVODE_SAMRAI_ERROR(ierr);
+   return r;
+}
+
+double CVODESolver::getCVODESuggestedToleranceScalingFactor() const
+{
+   realtype r;
+   int ierr = CVodeGetTolScaleFactor(d_cvode_mem, &r);
+   CVODE_SAMRAI_ERROR(ierr);
+   return r;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Access methods for CVSpgmr statistics.                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CVODESolver::printCVSpgmrStatistics(
+   std::ostream& os) const
+{
+   if (d_iteration_type == CV_NEWTON) {
+
+      os << "CVODESolver: CVSpgmr statistics... " << std::endl;
+
+      os << "spgmr_lrw       = "
+         << tbox::Utilities::intToString(getCVSpgmrMemoryUsageForDoubles(), 5)
+         << "     spgmr_liw        = "
+         << tbox::Utilities::intToString(getCVSpgmrMemoryUsageForIntegers(),
+         5) << std::endl;
+
+      os << "nli             = "
+         << tbox::Utilities::intToString(getNumberOfLinearIterations(), 5)
+         << "     ncfl             = "
+         << tbox::Utilities::intToString(
+         getNumberOfLinearConvergenceFailures(), 5) << std::endl;
+
+      os << "npe             = "
+         << tbox::Utilities::intToString(
+         getNumberOfPreconditionerEvaluations(), 5)
+         << "     nps              = "
+         << tbox::Utilities::intToString(getNumberOfPrecondSolveCalls(),
+         5) << std::endl;
+   } else {
+
+      os << "\nCVODESolver not set to use NEWTON iteration . . . \n"
+         << std::endl;
+
+   }
+}
+
+int CVODESolver::getNumberOfPreconditionerEvaluations() const
+{
+   long int r;
+   int ierr = CVSpilsGetNumPrecEvals(d_cvode_mem, &r);
+   CVODE_SAMRAI_ERROR(ierr);
+   return static_cast<int>(r);
+}
+
+int CVODESolver::getNumberOfLinearIterations() const
+{
+   long int r;
+   int ierr = CVSpilsGetNumLinIters(d_cvode_mem, &r);
+   CVODE_SAMRAI_ERROR(ierr);
+   return static_cast<int>(r);
+}
+
+int CVODESolver::getNumberOfPrecondSolveCalls() const
+{
+   long int r;
+   int ierr = CVSpilsGetNumPrecSolves(d_cvode_mem, &r);
+   CVODE_SAMRAI_ERROR(ierr);
+   return static_cast<int>(r);
+}
+
+int CVODESolver::getNumberOfLinearConvergenceFailures() const
+{
+   long int r;
+   int ierr = CVSpilsGetNumConvFails(d_cvode_mem, &r);
+   CVODE_SAMRAI_ERROR(ierr);
+   return static_cast<int>(r);
+}
+
+int CVODESolver::getCVSpgmrMemoryUsageForDoubles() const
+{
+   long int r1;
+   long int r2;
+   int ierr = CVodeGetWorkSpace(d_cvode_mem, &r1, &r2);
+   CVODE_SAMRAI_ERROR(ierr);
+   return static_cast<int>(r1);
+}
+
+int CVODESolver::getCVSpgmrMemoryUsageForIntegers() const
+{
+   long int r1;
+   long int r2;
+   int ierr = CVodeGetWorkSpace(d_cvode_mem, &r1, &r2);
+   CVODE_SAMRAI_ERROR(ierr);
+   return static_cast<int>(r2);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print CVODESolver object data to given output stream.            *
+ *                                                                       *
+ *************************************************************************
+ */
+void CVODESolver::printClassData(
+   std::ostream& os) const
+{
+   os << "\nCVODESolver object data members..." << std::endl;
+   os << "Object name = "
+      << d_object_name << std::endl;
+
+   os << "this = " << (CVODESolver *)this << std::endl;
+   os << "d_solution_vector = "
+      << (SundialsAbstractVector *)d_solution_vector << std::endl;
+
+   os << "d_CVODE_functions = "
+      << (CVODEAbstractFunctions *)d_cvode_functions << std::endl;
+
+   os << "&d_cvode_mem = " << d_cvode_mem << std::endl;
+   os << "d_cvode_log_file = " << (FILE *)d_cvode_log_file << std::endl;
+   os << "d_cvode_log_file_name = " << d_cvode_log_file_name << std::endl;
+
+   os << std::endl;
+   os << "CVODE parameters..." << std::endl;
+   os << "d_t_0 = "
+      << d_t_0 << std::endl;
+   os << "d_ic_vector = "
+      << (SundialsAbstractVector *)d_ic_vector << std::endl;
+
+   os << "d_linear_multistep_method = "
+      << d_linear_multistep_method << std::endl;
+   os << "d_iteration_type = "
+      << d_iteration_type << std::endl;
+   os << "d_tolerance_type = "
+      << d_tolerance_type << std::endl;
+   os << "d_relative_tolerance = "
+      << d_relative_tolerance << std::endl;
+   os << "d_use_scalar_absolute_tolerance = ";
+   if (d_use_scalar_absolute_tolerance) {
+      os << "true" << std::endl;
+   } else {
+      os << "false" << std::endl;
+   }
+   os << "d_absolute_tolerance_scalar = "
+      << d_absolute_tolerance_scalar << std::endl;
+   os << "d_absolute_tolerance_vector= " << std::endl;
+   d_absolute_tolerance_vector->printVector();
+
+   os << "Optional CVODE inputs (see CVODE docs for details):"
+      << std::endl;
+
+   os << "maximum linear multistep method order = "
+      << d_max_order << std::endl;
+   os << "maximum number of internal steps = "
+      << d_max_num_internal_steps << std::endl;
+   os << "maximum number of nil internal step warnings = "
+      << d_max_num_warnings << std::endl;
+
+   os << "initial step size = "
+      << d_init_step_size << std::endl;
+   os << "maximum absolute value of step size = "
+      << d_max_step_size << std::endl;
+   os << "minimum absolute value of step size = "
+      << d_min_step_size << std::endl;
+   os << "last step size = "
+      << getStepSizeForLastInternalStep() << std::endl;
+   os << "...end of CVODE parameters\n" << std::endl;
+
+   os << std::endl;
+   os << "CVSpgmr parameters..." << std::endl;
+   os << "d_precondition_type = "
+      << d_precondition_type << std::endl;
+   os << "d_gram_schmidt_type = "
+      << d_gram_schmidt_type << std::endl;
+   os << "d_max_krylov_dim = "
+      << d_max_krylov_dim << std::endl;
+   os << "d_tol_scale_factor = "
+      << d_tol_scale_factor << std::endl;
+   os << "...end of CVSpgmr parameters\n" << std::endl;
+
+   os << "d_CVODE_needs_initialization = ";
+   if (d_CVODE_needs_initialization) {
+      os << "true" << std::endl;
+   } else {
+      os << "false" << std::endl;
+   }
+
+   os << "...end of CVODESolver object data members\n" << std::endl;
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/CVODESolver.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/CVODESolver.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1332 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Wrapper class for CVODE solver function calls and data 
+ *
+ ************************************************************************/
+
+#ifndef included_solv_CVODESolver
+#define included_solv_CVODESolver
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#ifdef HAVE_SUNDIALS
+
+#include "SAMRAI/solv/CVODEAbstractFunctions.h"
+#include "SAMRAI/solv/SundialsAbstractVector.h"
+#include "SAMRAI/tbox/IOStream.h"
+
+extern "C" {
+#include "cvode/cvode.h"
+}
+
+#include <string>
+
+namespace SAMRAI {
+namespace solv {
+
+#ifndef LACKS_SSTREAM
+#define CVODE_SAMRAI_ERROR(ierr) \
+   do {                                           \
+      if (ierr != CV_SUCCESS) {                                                                 \
+         std::ostringstream tboxos;                                                     \
+         SAMRAI::tbox::Utilities::abort( \
+            tboxos.str().c_str(), __FILE__, __LINE__);      \
+      }                                                                         \
+   } while (0)
+#else
+#define CVODE_SAMRAI_ERROR(ierr) \
+   do {                                           \
+      if (ierr != CV_SUCCESS) {                                                                 \
+         std::ostrstream tboxos;                                                        \
+         SAMRAI::tbox::Utilities::abort(tboxos.str(), __FILE__, __LINE__);              \
+      }                                                                         \
+   } while (0)
+#endif
+
+/*!
+ * @brief Class CVODESolver serves as a C++ wrapper for the CVODE
+ * ordinary differential equation solver package.
+ *
+ * It is intended to be
+ * sufficiently generic to be used independently of the SAMRAI framework.
+ * This class declares one private static member function to link the
+ * user-defined routine for right-hand side function evaluation and
+ * two private statice member functions to link the user-defined
+ * preconditioner setup and solve routines.  The implementation of these
+ * functions is defined by the user in a subclass of the abstract base
+ * class CVODEAbstractFunctions.  The vector objects used within the
+ * solver are given in a subclass of the abstract class
+ * SundialsAbstractVector. The SundialsAbstractVector
+ * class defines the vector kernel operations required by the CVODE
+ * package so that they may be easily supplied by a user who opts not
+ * to use the vector kernel supplied by the CVODE package.  (It should be
+ * noted that the vector kernel used by CVODE is the same as the one
+ * used by the other packages in the Sundials of solvers).
+ *
+ * Note that this class provides no input or restart capabilities and
+ * relies on CVODE for output reporting.
+ *
+ * CVODESolver Usage:
+ *
+ *
+ *    -  In order to use the CVODESolver, the user must provide a
+ *           concrete subclass of CVODEAbstractFunctions abstract
+ *           base class which defines the evaluateRHSFunction(),
+ *           CVSpgmrPrecondSet(), and CVSpgmrPrecondSolve() methods.
+ *
+ *    -  Solving a system of ODEs using this CVODE C++ interface
+ *           requires four main stages.  First, a CVODESolver
+ *           object is created with a user-specified name and
+ *           CVODEAbstractFunctions object.  Second, the
+ *           user must specify the integration parameters that s/he
+ *           wishes to use.  Next, the user must call the CVODESolver
+ *           method initialize(solution_vector) with the
+ *           SundialsAbstractVector that s/he wants to put the solution
+ *           in.  Finally, the solve() method is invoked to solve the
+ *           system of ODEs to the specified value of the independent
+ *           variable.
+ *
+ *    -  The following is a list of integration parameters that
+ *           must be specified by the user before calling the solve()
+ *           method:
+ *
+ *
+ *            - Either relative or absolute tolerance must
+ *                  be set - setRelativeTolerance(relative_tolerance),
+ *                  setAbsoluteTolerance(absolute_tolerance)
+ *
+ *            - Initial value of independent variable -
+ *                  setInitialValueOfIndependentVariable(init_time)
+ *            - Final value of independent variable -
+ *                  setFinalValueOfIndependentVariable(final_time
+ *                      cvode_needs_initialization)
+ *            - Initial condition vector -
+ *                  setInitialConditionVector(ic_vector)
+ *
+ *
+ *
+ *    -  The following is a list of default values for integration
+ *           parameters:
+ *
+ *
+ *
+ *           - @b Linear Multistep Method
+ *                BDF
+ *
+ *           - @b Iteration Type
+ *                FUNCTIONAL
+ *
+ *           - @b Tolerance Type
+ *                SS (scalar relative and scalar absolute tolerances)
+ *
+ *           - @b Relative Tolerance
+ *                0.0
+ *
+ *           - @b Scalar Absolute Tolerance
+ *                0.0
+ *
+ *           - @b Vector Absolute Tolerance
+ *                NULL
+ *
+ *           - @b Stepping Method
+ *                NORMAL
+ *
+ *           - @b Maximum Order for Multistep Method
+ *                12 for ADAMS, 5 for BDF
+ *
+ *           - @b Maximum Number of Internal Steps
+ *                500
+ *
+ *           - @b Maximum Number of NIL Step Warnings
+ *                10
+ *
+ *           - @b Initial Step Size
+ *                determined by CVODE
+ *
+ *           - @b Maximum Absolute Value of Step Size
+ *                infinity
+ *
+ *           - @b Minimum Absolute Value of Step Size
+ *                0.0
+ *
+ *           - @b CVSpgmr Preconditioning Type
+ *                NONE
+ *
+ *           - @b CVSpgmr Gram Schmidt Algorithm
+ *                MODIFIED_GS
+ *
+ *           - @b CVSpgmr Maximum Krylov Dimension
+ *                MIN(num_equations, CVSPGMR_MAXL=5)
+ *
+ *           - @b CVSpgmr Tolerance Scale Factor
+ *                CVSPGMR_DELT = 0.05.
+ *
+ *
+ *
+ *
+ *
+ * CVODE was developed in the Center for Applied Scientific Computing (CASC)
+ * at Lawrence Livermore National Laboratory (LLNL).  Many of the comments
+ * in this class were taken verbatim from CVODE header files.  For more
+ * information about CVODE and a complete description of the operations
+ * and data structures used by this class, see S.D. Cohen and A.C. Hindmarsh,
+ * "CVODE User Guide", UCRL-MA-118618, Lawrence Livermore National
+ * Laboratory, 1994.
+ *
+ * @see solv::CVODEAbstractFunctions
+ * @see solv::SundialsAbstractVector
+ */
+
+class CVODESolver
+{
+public:
+   /**
+    * Constructor for CVODESolver sets default CVODE parameters
+    * and initializes the solver package with user-supplied functions
+    * CVODESolver parameters may be changed later using member
+    * functions described below.
+    *
+    * Notes:
+    *
+    *
+    *
+    *
+    *    -
+    *        The solution vector is not passed into the constructor.
+    *        Before the solver can be used, the initialize() function must
+    *        be called.
+    *
+    *
+    *
+    *
+    *
+    * Assertion checks:
+    *
+    *
+    *
+    *
+    *    -
+    *        my_functions must not be null
+    *
+    *    -
+    *        object_name must not be empty.
+    *
+    *
+    *
+    *
+    *
+    */
+   CVODESolver(
+      const std::string& object_name,
+      CVODEAbstractFunctions* my_functions,
+      const bool uses_preconditioner);
+
+   /**
+    * Virtual destructor for CVODESolver closes the
+    * CVODE log file and frees the memory allocated for the
+    * CVODE memory record.
+    */
+   virtual ~CVODESolver();
+
+   /**
+    * Initialize solver with solution vector.  The solution vector is
+    * required to initialize the memory record used internally within
+    * CVODE.  This routine must be called before the solver can be used.
+    *
+    * Assertion checks:
+    *
+    *
+    *
+    *
+    *    -
+    *        the solution vector must not be null
+    *
+    *    -
+    *        the solution vector must not have already been set
+    *
+    *
+    *
+    *
+    */
+   void
+   initialize(
+      SundialsAbstractVector* solution);
+
+   /**
+    * Integrate ODE system specified t_f.  The integer return value is
+    * a termination code defined by CVODE.  The following is a table
+    * of termination codes and a brief description of their meanings.
+    *
+    * CVODE Termination Codes:
+    *
+    *
+    *
+    *
+    *    - @b SUCCESS (=0)
+    *        CVode succeeded.
+    *
+    *    - @b CVODE_NO_MEM (=-1)
+    *        The cvode_mem argument was NULL.
+    *
+    *    - @b ILL_INPUT (=-2)
+    *        One of the inputs to CVode is illegal. This
+    *        includes the situation when a component of the
+    *        error weight vectors becomes < 0 during
+    *        internal time-stepping. The ILL_INPUT flag
+    *        will also be returned if the linear solver
+    *        routine CV--- (called by the user after
+    *        calling CVodeMalloc) failed to set one of the
+    *        linear solver-related fields in cvode_mem or
+    *        if the linear solver's init routine failed. In
+    *        any case, the user should see the printed
+    *        error message for more details.
+    *
+    *    - @b TOO_MUCH_WORK (=-3)
+    *        The solver took maxstep internal steps but
+    *        could not reach t_f. The default value for
+    *        mxstep is MXSTEP_DEFAULT = 500.
+    *
+    *    - @b TOO_MUCH_ACC (=-4)
+    *        The solver could not satisfy the accuracy
+    *        demanded by the user for some internal step.
+    *
+    *    - @b ERR_FAILURE (=-5)
+    *        Error test failures occurred too many times
+    *        (= MXNEF = 7) during one internal time step or
+    *        occurred with |h| = hmin.
+    *
+    *    - @b CONV_FAILURE (=-6)
+    *        Convergence test failures occurred too many
+    *        times (= MXNCF = 10) during one internal time
+    *        step or occurred with |h| = hmin.
+    *
+    *    - @b SETUP_FAILURE (=-7)
+    *        The linear solver's setup routine failed in an
+    *                 unrecoverable manner.
+    *
+    *    - @b SOLVE_FAILURE (=-8)
+    *        The linear solver's solve routine failed in an
+    *                 unrecoverable manner.
+    *
+    *
+    *
+    *
+    *
+    * See cvode.h header file for more information about return values.
+    *
+    * If CVODE or CVSpgmr requires re-initialization, it is
+    * automatically done before the solve.  This may be required if any
+    * of the CVODE or CVSpgmr data parameters have changed since the
+    * last call to the solver.
+    *
+    * Assertion checks:
+    *
+    *
+    *
+    *
+    *     -
+    *        The user specified final value for the independent variable t
+    *        must be greater than the specified initial value.
+    *
+    *
+    *
+    *
+    */
+   int
+   solve();
+
+   /**
+    * Accessor function for setting CVODE output log file name and output
+    * printing options.  Output file name and options may be changed
+    * throughout run as desired.
+    *
+    * If the file name string is empty the default file name "cvode.log"
+    * is used.
+    */
+   void
+   setLogFileData(
+      const std::string& log_fname = std::string());
+
+   /**
+    * Set CVODESolver to use my_functions as the concrete subclass
+    * of the CVODEAbstractFunctions class that defines the
+    * right-hand side evaluation and preconditioner functions.  The
+    * uses_preconditioner argument indicates whether or not the
+    * the user has defined preconditioner routines in their concrete
+    * subclass of the CVODEAbstractFunctions class.
+    *
+    * Assertion checks:
+    *
+    *
+    *
+    *
+    *    -
+    *        my_function must not be a null pointer
+    *
+    *
+    *
+    *
+    */
+   void
+   setCVODEFunctions(
+      CVODEAbstractFunctions* my_functions,
+      const bool uses_preconditioner);
+
+   /**
+    * Return pointer to object that provides user-defined functions for
+    * CVODE and CVSpgmr.
+    */
+   CVODEAbstractFunctions *
+   getCVODEFunctions() const;
+
+   // Methods for setting CVODE parameters.
+
+   /**
+    * Set linear multistep method.  The user can specify either
+    * ADAMS or BDF (backward differentiation formula) methods
+    * The BDF method is recommended  for stiff problems, and
+    * the ADAMS method is recommended for nonstiff problems.
+    *
+    * Assertion checks:
+    *
+    *
+    *
+    *
+    *    -
+    *        linear_multistep_method must be one of ADAMS or BDF.
+    *
+    *
+    *
+    *
+    *
+    * Note: the enumeration constants ADAMS and BDF are defined in cvode.h.
+    */
+   void
+   setLinearMultistepMethod(
+      int linear_multistep_method);
+
+   /**
+    * Set iteration type.  The user can specify either FUNCTIONAL
+    * iteration, which does not require linear algebra, or a
+    * NEWTON iteration, which requires the solution of linear
+    * systems. In the NEWTON case, the user must also specify a
+    * CVODE linear solver. NEWTON is recommended in case of
+    * stiff problems.
+    *
+    * Assertion checks:
+    *
+    *
+    *
+    *
+    *    -
+    *        iteration_type must be one of FUNCTIONAL or NEWTON
+    *
+    *
+    *
+    *
+    *
+    * Note: the enumeration constants FUNCTIONAL and NEWTON are defined
+    * in cvode.h.
+    */
+   void
+   setIterationType(
+      int iteration_type);
+
+   /**
+    * Set tolerance type.  This parameter specifies the relative
+    * and absolute tolerance types to be used. The SS tolerance type
+    * means a scalar relative and absolute tolerance, while the SV
+    * tolerance type means a scalar relative tolerance and a
+    * vector absolute tolerance (a potentially different
+    * absolute tolerance for each vector component).
+    *
+    * Assertion checks:
+    *
+    *
+    *
+    *
+    *    -
+    *        tolerance_type must be one of SS or SV
+    *
+    *
+    *
+    *
+    *
+    * Note: the enumeration constants SS and SV are defined in cvode.h.
+    */
+   void
+   setToleranceType(
+      int tolerance_type);
+
+   /**
+    * Set the relative tolerance level.
+    *
+    * Assertion checks:
+    *
+    *
+    *
+    *
+    *    -
+    *        relative_tolerance must be greater than or equal to 0.0
+    *
+    *
+    *
+    *
+    *
+    * Note that pure absolute tolerance can be used by
+    * setting the relative tolerance to 0.  However,
+    * it is an error to simultaneously set relative and
+    * absolute tolerances to 0.
+    */
+   void
+   setRelativeTolerance(
+      double relative_tolerance);
+
+   /**
+    * Set the scalar absolute tolerance level.
+    *
+    * Assertion checks:
+    *
+    *
+    *
+    *
+    *    -
+    *        absolute_tolerance must be greater than or equal to 0.0
+    *
+    *
+    *
+    *
+    *
+    * Note that pure relative tolerance can be used by
+    * setting the absolute tolerance to 0.  However,
+    * it is an error to simultaneously set relative and
+    * absolute tolerances to 0.
+    */
+   void
+   setAbsoluteTolerance(
+      double absolute_tolerance);
+
+   /**
+    * Set the vector absolute tolerance level.
+    *
+    * Assertion checks:
+    *
+    *
+    *
+    *
+    *    -
+    *        absolute_tolerance must not be a null pointer
+    *
+    *    -
+    *        each component of absolute_tolerance must be
+    *        greater than or equal to 0.0
+    *
+    *
+    *
+    *
+    *
+    * Note that pure relative tolerance can be used by
+    * setting the absolute tolerance to 0.  However,
+    * it is an error to simultaneously set relative and
+    * absolute tolerances to 0.
+    */
+   void
+   setAbsoluteTolerance(
+      SundialsAbstractVector* absolute_tolerance);
+
+   /**
+    * Set stepping method to use for integration.  There are
+    * stepping methods: NORMAL and ONE_STEP.  The NORMAL
+    * method has the solver take internal steps until
+    * it has reached or just passed the user specified t_f
+    * parameter. The solver then interpolates in order to
+    * return an approximate value of y(t_f). The ONE_STEP
+    * option tells the solver to just take one internal step
+    * and return the solution at the point reached by that
+    * step.
+    *
+    * Assertion checks:
+    *
+    *
+    *
+    *
+    *    -
+    *        stepping_method must be one of NORMAL or ONE_STEP
+    *
+    *
+    *
+    *
+    *
+    * Note: the enumeration constants NORMAL and ONE_STEP are
+    * defined in cvode.h.
+    */
+   void
+   setSteppingMethod(
+      int stepping_method);
+
+   /**
+    * Set initial value for independent variable.
+    */
+   void
+   setInitialValueOfIndependentVariable(
+      double t_0);
+
+   /**
+    * Set final value for independent variable (i.e. the value of
+    * independent variable to integrate the system to).  The boolean
+    * argument specifies whether CVODE should be re-initialized (i.e.
+    * on first step) or if we are taking subsequent steps in a
+    * sequence, in which case it is not initialized.
+    */
+   void
+   setFinalValueOfIndependentVariable(
+      double t_f,
+      bool cvode_needs_initialization);
+
+   /**
+    * Set initial condition vector.
+    *
+    * Assertion checks:
+    *
+    *
+    *
+    *
+    *    -
+    *        ic_vector must not be null
+    *
+    *
+    *
+    *
+    */
+   void
+   setInitialConditionVector(
+      SundialsAbstractVector* ic_vector);
+
+   /**
+    * Set maximum order for the linear multistep method.
+    * By default, this is set to 12 for ADAMS methods and 5 for BDF
+    * methods.
+    *
+    * Assertion checks:
+    *
+    *
+    *
+    *
+    *    -
+    *        max_order must be greater than or equal to 0
+    *
+    *
+    *
+    *
+    */
+   void
+   setMaximumLinearMultistepMethodOrder(
+      int max_order);
+
+   /**
+    * Set maximum number of internal steps to be taken by
+    * the solver in its attempt to reach t_f.
+    * By default, this is set to 500.
+    *
+    * Assertion checks:
+    *
+    *
+    *
+    *
+    *    -
+    *        max_num_internal_steps must be greater than or equal to 0
+    *
+    *
+    *
+    *
+    */
+   void
+   setMaximumNumberOfInternalSteps(
+      int max_num_internal_steps);
+
+   /**
+    * Set maximum number of warning messages issued by the solver
+    * that (t + h == t) on the next internal step.  By default,
+    * this is set to 10.
+    *
+    * Assertion checks:
+    *
+    *
+    *
+    *
+    *    -
+    *        max_num_warnings must be greater than or equal to 0
+    *
+    *
+    *
+    *
+    */
+   void
+   setMaximumNumberOfNilStepWarnings(
+      int max_num_warnings);
+
+   /**
+    * Set initial step size.
+    *
+    * Assertion checks:
+    *
+    *
+    *
+    *
+    *    -
+    *        init_step_size must be greater than or equal to 0.0
+    *
+    *
+    *
+    *
+    */
+   void
+   setInitialStepSize(
+      double init_step_size);
+
+   /**
+    * Set maximum absolute value of step size allowed.
+    * By default, there is no upper bound on the absolute value
+    * of step size.
+    *
+    * Assertion checks:
+    *
+    *
+    *
+    *
+    *    -
+    *        max_step_size must be greater than or equal to 0.0
+    *
+    *
+    *
+    *
+    */
+   void
+   setMaximumAbsoluteStepSize(
+      double max_step_size);
+
+   /**
+    * Set minimum absolute value of step size allowed.
+    * By default, this is set to 0.0.
+    *
+    * Assertion checks:
+    *
+    *
+    *
+    *
+    *    -
+    *        min_step_size must be greater than or equal to 0.0
+    *
+    *
+    *
+    *
+    */
+   void
+   setMinimumAbsoluteStepSize(
+      double min_step_size);
+
+   // Methods for setting CVSpgmr parameters.
+
+   /**
+    * Set the preconditioning type to be used by CVSpgmr.
+    * This must be one of the four enumeration constants
+    * NONE, LEFT, RIGHT, or BOTH defined in iterativ.h.
+    * These correspond to no preconditioning, left preconditioning only,
+    * right preconditioning only, and both left and right
+    * preconditioning, respectively.
+    *
+    * Assertion Checks:
+    *
+    *
+    *
+    *
+    *	 -
+    *	    precondition_type must be one of NONE, LEFT, RIGHT, or BOTH.
+    *
+    *
+    *
+    *
+    */
+   void
+   setPreconditioningType(
+      int precondition_type);
+
+   /**
+    * Set the Gram-Schmidt orthogonalization type to be used by CVSpgmr.
+    * This must be one of the two enumeration constants MODIFIED_GS
+    * or CLASSICAL_GS defined in iterativ.h. These correspond to
+    * using modified Gram-Schmidt and classical Gram-Schmidt, respectively.
+    *
+    * Assertion Checks:
+    *
+    *
+    *
+    *
+    *	 -
+    *	    gs_type must be one of CLASSICAL_GS or MODIFIED_GS.
+    *
+    *
+    *
+    *
+    */
+   void
+   setGramSchmidtType(
+      int gs_type);
+
+   /**
+    * Set the maximum Krylov dimension to be used by CVSpgmr.
+    * This is an optional input to the CVSPGMR solver. Pass 0 to
+    * use the default value MIN(num_equations, CVSPGMR_MAXL=5).
+    *
+    * Assertion Checks:
+    *
+    *
+    *
+    *
+    *	 -
+    *	    max_krylov_dim must be nonnegative
+    *
+    *
+    *
+    *
+    */
+   void
+   setMaxKrylovDimension(
+      int max_krylov_dim);
+
+   /**
+    * Set the factor by which the tolerance on the nonlinear
+    * iteration is multiplied to get a tolerance on the linear iteration.
+    * This is an optional input to the CVSPGMR solver. Pass 0 to
+    * use the default value CVSPGMR_DELT = 0.05.
+    *
+    * Assertion Checks:
+    *
+    *
+    *
+    *
+    *	 -
+    *	    tol_scale_factor must be nonnegative
+    *
+    *
+    *
+    *
+    */
+   void
+   setCVSpgmrToleranceScaleFactor(
+      double tol_scale_factor);
+
+   /**
+    * Get solution vector.
+    */
+   SundialsAbstractVector *
+   getSolutionVector() const;
+
+   /**
+    * Get k-th derivative vector at the specified value of the
+    * independent variable, t.  The integer return value is
+    * return code the CVODE CVodeDky() function.  The following is a table
+    * of termination codes and a brief description of their meanings.
+    *
+    * CVodeDky Return Codes:
+    *
+    *
+    *
+    *
+    *    - @b OKAY (=0)
+    *        CVodeDky succeeded.
+    *
+    *    - @b BAD_K (=-1)
+    *
+    *    - @b BAD_T (=-2)
+    *
+    *    - @b BAD_DKY (=-3)
+    *
+    *    - @b DKY_NO_MEM (=-4)
+    *
+    *
+    *
+    *
+    *
+    * Important Notes:
+    *
+    *
+    *
+    *
+    *    -
+    *       t must lie in the interval [t_cur - h, t_cur]
+    *       where t_cur is the current internal time reached
+    *       and h is the last internal step size successfully
+    *       used by the solver.
+    *
+    *    -
+    *       k may take on value 0, 1, . . . q where q is the order
+    *       of the current linear multistep method being used.
+    *
+    *    -
+    *       the dky vector must be allocated by the user.
+    *
+    *    -
+    *       it is only leagal to call this method after a
+    *       successful return from the solve() method.
+    *
+    *
+    *
+    *
+    *
+    */
+   int
+   getDkyVector(
+      double t,
+      int k,
+      SundialsAbstractVector* dky) const;
+
+   /**
+    * Get actual value of the independent variable that CVODE integrated
+    * to (i.e. the value of t that actually corresponds to the solution
+    * vector y).
+    */
+   double
+   getActualFinalValueOfIndependentVariable() const;
+
+   /**
+    * Print CVODE and CVSpgmr statistics.
+    */
+   void
+   printStatistics(
+      std::ostream& os) const;
+
+   /**
+    * Print CVODE statistics to the stream.
+    *
+    * The abbreviations printed out refer to the following
+    * quantities:
+    *
+    *
+    *
+    *
+    *    - @b lenrw
+    *       size (in double words) of memory used for doubles
+    *
+    *    - @b leniw
+    *       size (in integer words) of memory used for integers
+    *
+    *    - @b nst
+    *       cumulative number of internal steps taken by solver
+    *
+    *    - @b nfe
+    *       number of right-hand side function evaluations
+    *
+    *    - @b nni
+    *       number of NEWTON iterations performed
+    *
+    *    - @b nsetups
+    *       number of calls made to linear solver's setup routine
+    *
+    *    - @b netf
+    *       number of local error test failures
+    *
+    *    - @b ncfn
+    *       number of nonlinear convergence failures
+    *
+    *    - @b qu
+    *       order used during the last internal step
+    *
+    *    - @b qcur
+    *       order to be used on the next internal step
+    *
+    *    - @b hu
+    *       step size for the last internal step
+    *
+    *    - @b hcur
+    *       step size to be attempted on the next internal step
+    *
+    *    - @b tcur
+    *       current internal value of t reached by the solver
+    *
+    *    - @b tolsf
+    *       suggested tolerance scaling factor
+    *
+    *
+    *
+    *
+    */
+   void
+   printCVODEStatistics(
+      std::ostream& os) const;
+
+   // CVODE optional return values.
+
+   /**
+    * Return the cumulative number of internal steps taken by
+    * the solver.
+    *
+    * Note: if the solver was not set to collect statistics,
+    * a value of -1 is returned.
+    */
+   int
+   getNumberOfInternalStepsTaken() const;
+
+   /**
+    * Return the number of calls to the right-hand side function.
+    *
+    * Note: if the solver was not set to collect statistics,
+    * a value of -1 is returned.
+    */
+   int
+   getNumberOfRHSFunctionCalls() const;
+
+   /**
+    * Return the number of calls made to linear solver setup
+    * routines.
+    *
+    * Note: if the solver was not set to collect statistics,
+    * a value of -1 is returned.
+    */
+   int
+   getNumberOfLinearSolverSetupCalls() const;
+
+   /**
+    * Return the number of NEWTON iterations performed.
+    *
+    * Note: if the solver was not set to collect statistics,
+    * a value of -1 is returned.
+    */
+   int
+   getNumberOfNewtonIterations() const;
+
+   /**
+    * Return the number of nonlinear convergence failures that have
+    * occurred.
+    *
+    * Note: if the solver was not set to collect statistics,
+    * a value of -1 is returned.
+    */
+   int
+   getNumberOfNonlinearConvergenceFailures() const;
+
+   /**
+    * Return the number of local error test failures.
+    *
+    * Note: if the solver was not set to collect statistics,
+    * a value of -1 is returned.
+    */
+   int
+   getNumberOfLocalErrorTestFailures() const;
+
+   /**
+    * Return the order of the linear multistep method used during
+    * the last internal step.
+    *
+    * Note: if the solver was not set to collect statistics,
+    * a value of -1 is returned.
+    */
+   int
+   getOrderUsedDuringLastInternalStep() const;
+
+   /**
+    * Return the order of the linear multistep method to be used during
+    * the next internal step.
+    *
+    * Note: if the solver was not set to collect statistics,
+    * a value of -1 is returned.
+    */
+   int
+   getOrderToBeUsedDuringNextInternalStep() const;
+
+   /**
+    * Return the size (in LLNL_REAL words) of memory used
+    * for LLNL_REALS.
+    *
+    * Note: if the solver was not set to collect statistics,
+    * a value of -1 is returned.
+    */
+   int
+   getCVODEMemoryUsageForDoubles() const;
+
+   /**
+    * Return the size (in integer words) of memory used
+    * for integers.
+    *
+    * Note: if the solver was not set to collect statistics,
+    * a value of -1 is returned.
+    */
+   int
+   getCVODEMemoryUsageForIntegers() const;
+
+   /**
+    * Return the step size for the last internal step.
+    *
+    * Note: if the solver was not set to collect statistics,
+    * a value of -1 is returned.
+    */
+   double
+   getStepSizeForLastInternalStep() const;
+
+   /**
+    * Return the step size to be used in the next internal step.
+    *
+    * Note: if the solver was not set to collect statistics,
+    * a value of -1 is returned.
+    */
+   double
+   getStepSizeForNextInternalStep() const;
+
+   /**
+    * Return the current internal value of the independent
+    * variable reached by the solver.
+    *
+    * Note: if the solver was not set to collect statistics,
+    * the minimum double value (as defined in float.h) is
+    * returned.
+    */
+   double
+   getCurrentInternalValueOfIndependentVariable() const;
+
+   /**
+    * Return the suggested tolerance scaling factor.
+    *
+    * Note: if the solver was not set to collect statistics,
+    * a value of -1 is returned.
+    */
+   double
+   getCVODESuggestedToleranceScalingFactor() const;
+
+   // CVSpgmr optional return values.
+
+   /**
+    * Print CVSpgmr statistics to the stream.
+    *
+    * The abbreviations printed out refer to the following
+    * quantities:
+    *
+    *
+    *
+    *
+    *    - @b spgmr_lrw
+    *      size (in double words) of memory used for doubles
+    *
+    *    - @b spgmr_liw
+    *       size (in integer words) of memory used for integers
+    *
+    *    - @b nli
+    *       number of linear iterations
+    *
+    *    - @b ncfl
+    *       number of linear convergence failures
+    *
+    *    - @b npe
+    *       number of preconditioner evaluations
+    *
+    *    - @b nps
+    *       number of calls to CVSpgmrPrecondSolve()
+    *
+    *
+    *
+    *
+    */
+   void
+   printCVSpgmrStatistics(
+      std::ostream& os) const;
+
+   /**
+    * Return the number of preconditioner evaluations.
+    */
+   int
+   getNumberOfPreconditionerEvaluations() const;
+
+   /**
+    * Return the number of linear iterations.
+    */
+   int
+   getNumberOfLinearIterations() const;
+
+   /**
+    * Return the number of CVSpgmrPrecondSolve() calls.
+    */
+   int
+   getNumberOfPrecondSolveCalls() const;
+
+   /**
+    * Return the number of linear convergence failures.
+    */
+   int
+   getNumberOfLinearConvergenceFailures() const;
+
+   /**
+    * Return the size (in double words) of memory used for doubles.
+    */
+   int
+   getCVSpgmrMemoryUsageForDoubles() const;
+
+   /**
+    * Return the size (in integer words) of memory used for integers.
+    */
+   int
+   getCVSpgmrMemoryUsageForIntegers() const;
+
+   /**
+    * Print out all data members for this object.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os) const;
+
+private:
+   /*
+    * Static member function for linkage with CVODE routines.
+    */
+   static int
+   CVODERHSFuncEval(
+      realtype t,
+      N_Vector y,
+      N_Vector y_dot,
+      void* my_solver);
+
+   /*
+    * Static member functions for linkage with CVSpgmr routines.
+    */
+   static int
+   CVSpgmrPrecondSet(
+      realtype t,
+      N_Vector y,
+      N_Vector fy,
+      int jok,
+      booleantype* jcurPtr,
+      realtype gamma,
+      void* my_solver,
+      N_Vector vtemp1,
+      N_Vector vtemp2,
+      N_Vector vtemp3);
+
+   static int
+   CVSpgmrPrecondSolve(
+      realtype t,
+      N_Vector y,
+      N_Vector fy,
+      N_Vector r,
+      N_Vector z,
+      realtype gamma,
+      realtype delta,
+      int lr,
+      void* my_solver,
+      N_Vector vtemp);
+
+   /*
+    * Open CVODE log file, allocate main memory for CVODE and initialize
+    * CVODE memory record.  CVODE is initialized based on current state
+    * of solver parameter data members.  If any solver parameters have
+    * changed since last initialization, this function will be automatically
+    * invoked at next call to the solve() method.  Also, if NEWTON iteration
+    * is specified, this method also initializes the CVSpgmr linear solver.
+    *
+    * Assertion checks:
+    *
+    *
+    *
+    *
+    *    -
+    *       the solution vector must have already been set.
+    *
+    *
+    *
+    *
+    *
+    */
+   void
+   initializeCVODE();
+
+   std::string d_object_name;
+
+   /*
+    * The following data members are input or set to default values in
+    * the CVODESolver constructor.  Many of these can be altered at
+    * any time through class member functions.  When this occurs,
+    * CVODE may need to be re-initialized (e.g., if the linear solver
+    * changes, CVODE must change its memory record).  In this case,
+    * the initializeCVODE() member function is invoked in the next
+    * call to solve().
+    */
+
+   /*
+    * Solution vector.
+    */
+   SundialsAbstractVector* d_solution_vector;
+
+   /*
+    * Pointer to object which provides user-supplied functions to CVODE
+    * and CVSpgmr.
+    */
+   CVODEAbstractFunctions* d_cvode_functions;
+
+   /*
+    * CVODE memory record.
+    */
+   void* d_cvode_mem;                    // CVODE memory structure
+
+   /*
+    * CVODE log file information.
+    */
+   FILE* d_cvode_log_file;                   // CVODE message log file
+   std::string d_cvode_log_file_name;        // CVODE log file name
+
+   /*
+    * ODE parameters.
+    */
+   double d_t_0;        // initial value for independent variable
+   double d_user_t_f;   // user-specified final value for independent variable
+   double d_actual_t_f; // actual final value of indep. variable after a step
+   SundialsAbstractVector* d_ic_vector;
+
+   /*
+    * ODE integration parameters.
+    */
+   int d_linear_multistep_method;
+   int d_iteration_type;
+   int d_tolerance_type;
+   double d_relative_tolerance;
+   bool d_use_scalar_absolute_tolerance;
+   double d_absolute_tolerance_scalar;
+   SundialsAbstractVector* d_absolute_tolerance_vector;
+   int d_stepping_method;
+
+   /*
+    * Optional CVODE parameters.
+    */
+   int d_max_order;
+   int d_max_num_internal_steps;
+   int d_max_num_warnings;
+   double d_init_step_size;
+   double d_max_step_size;
+   double d_min_step_size;
+   /*
+    * CVSpgmr parameters
+    */
+   int d_precondition_type;
+   int d_gram_schmidt_type;
+   int d_max_krylov_dim;
+   double d_tol_scale_factor;
+
+   /*
+    * Boolean flag indicating whether CVODE needs initialization
+    * when solver is called.
+    */
+   bool d_CVODE_needs_initialization;
+
+   /*
+    * Boolean flag indicating whether user-supplied preconditioner
+    * routines are provided in the concrete subclass of
+    * CVODEAbstractFunctions.
+    */
+   bool d_uses_preconditioner;
+};
+
+}
+}
+
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/CartesianRobinBcHelper.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/CartesianRobinBcHelper.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,892 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Robin boundary condition support on cartesian grids. 
+ *
+ ************************************************************************/
+#ifndef included_solv_CartesianRobinBcHelper_C
+#define included_solv_CartesianRobinBcHelper_C
+
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/math/PatchCellDataOpsReal.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#include IOMANIP_HEADER_FILE
+
+#include "SAMRAI/solv/CartesianRobinBcHelper.h"
+
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+void F77_FUNC(settype1cells2d, SETTYPE1CELLS2D) (
+   double* data,
+   const int & difirst, const int & dilast,
+   const int & djfirst, const int & djlast,
+   const double* a, const double* b, const double* g,
+   const int & ifirst, const int & ilast,
+   const int & jfirst, const int & jlast,
+   const int & ibeg, const int & iend,
+   const int & jbeg, const int & jend,
+   const int & face, const int & ghos, const int & inte, const int & location,
+   const double & h, const int & zerog);
+void F77_FUNC(settype2cells2d, SETTYPE2CELLS2D) (
+   double* data,
+   const int & difirst, const int & dilast,
+   const int & djfirst, const int & djlast,
+   const int* lower, const int* upper, const int & location);
+void F77_FUNC(settype1cells3d, SETTYPE1CELLS3D) (
+   double* data,
+   const int & difirst, const int & dilast,
+   const int & djfirst, const int & djlast,
+   const int & dkfirst, const int & dklast,
+   const double* a, const double* b, const double* g,
+   const int & ifirst, const int & ilast,
+   const int & jfirst, const int & jlast,
+   const int & kfirst, const int & klast,
+   const int & ibeg, const int & iend,
+   const int & jbeg, const int & jend,
+   const int & kbeg, const int & kend,
+   const int & face, const int & ghos, const int & inte, const int & location,
+   const double & h, const int & zerog);
+void F77_FUNC(settype2cells3d, SETTYPE2CELLS3D) (
+   double* data,
+   const int & difirst, const int & dilast,
+   const int & djfirst, const int & djlast,
+   const int & dkfirst, const int & dklast,
+   const int* lower, const int* upper, const int & location);
+void F77_FUNC(settype3cells3d, SETTYPE3CELLS3D) (
+   double* data,
+   const int & difirst, const int & dilast,
+   const int & djfirst, const int & djlast,
+   const int & dkfirst, const int & dklast,
+   const int* lower, const int* upper, const int & location);
+}
+
+namespace SAMRAI {
+namespace solv {
+
+// using namespace std;
+
+/*
+ ************************************************************************
+ * Constructor                                                          *
+ ************************************************************************
+ */
+
+CartesianRobinBcHelper::CartesianRobinBcHelper(
+   const tbox::Dimension& dim,
+   std::string object_name,
+   RobinBcCoefStrategy* coef_strategy):
+   xfer::RefinePatchStrategy(dim),
+   d_dim(dim),
+   d_object_name(object_name),
+   d_coef_strategy(NULL),
+   d_target_data_id(-1),
+   d_homogeneous_bc(false)
+{
+
+   NULL_USE(coef_strategy);
+
+   t_set_boundary_values_in_cells = tbox::TimerManager::getManager()->
+      getTimer("solv::CartesianRobinBcHelper::setBoundaryValuesInCells()");
+   t_use_set_bc_coefs = tbox::TimerManager::getManager()->
+      getTimer(
+         "solv::CartesianRobinBcHelper::setBoundaryValuesInCells()_setBcCoefs");
+}
+
+/*
+ ************************************************************************
+ * Destructor                                                           *
+ ************************************************************************
+ */
+
+CartesianRobinBcHelper::~CartesianRobinBcHelper(
+   void) {
+}
+
+/*
+ ************************************************************************
+ *     Set physical boundary conditions in cells.                       *
+ ************************************************************************
+ */
+
+void CartesianRobinBcHelper::setBoundaryValuesInCells(
+   hier::Patch& patch,
+   const double fill_time,
+   const hier::IntVector& ghost_width_to_fill,
+   int target_data_id,
+   bool homogeneous_bc) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*this, patch, ghost_width_to_fill);
+
+   NULL_USE(fill_time);
+
+   t_set_boundary_values_in_cells->start();
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (!d_coef_strategy) {
+      TBOX_ERROR(d_object_name << ": coefficient strategy is not set.\n"
+                               << "Use setCoefImplementation() to set it.\n");
+   }
+#endif
+
+   if (d_dim == tbox::Dimension(1)) {
+      TBOX_ERROR(d_object_name << ": dim = 1 not supported");
+   }
+   math::PatchCellDataOpsReal<double> cops;
+
+   /*
+    * Get info on the data.
+    */
+   hier::VariableDatabase* vdb =
+      hier::VariableDatabase::getDatabase();
+   tbox::Pointer<hier::Variable> variable_ptr;
+   vdb->mapIndexToVariable(target_data_id, variable_ptr);
+   tbox::Pointer<pdat::CellVariable<double> > cell_variable_ptr =
+      variable_ptr;
+   if (!variable_ptr) {
+      TBOX_ERROR(d_object_name << ": No variable for index "
+                               << target_data_id);
+   }
+   if (!cell_variable_ptr) {
+      TBOX_ERROR(d_object_name << ": hier::Patch data index " << target_data_id
+                               << " does not correspond to\n"
+                               << "a cell-centered double variable.\n");
+   }
+
+   /*
+    * Get the data.
+    */
+   tbox::Pointer<hier::PatchData>
+   data_ptr = patch.getPatchData(target_data_id);
+   tbox::Pointer<pdat::CellData<double> >
+   cell_data_ptr = data_ptr;
+   if (!data_ptr) {
+      TBOX_ERROR(d_object_name << ": No data for index " << target_data_id);
+   }
+   if (!cell_data_ptr) {
+      TBOX_ERROR(d_object_name << ": hier::Patch data index " << target_data_id
+                               << " does not correspond to\n"
+                               << "cell-centered double data.\n");
+   }
+   pdat::CellData<double>& data = *cell_data_ptr;
+
+   const hier::IntVector& ghost_cells =
+      cell_data_ptr->getGhostCellWidth();
+   hier::IntVector gcw_to_fill = hier::IntVector::min(ghost_cells,
+         ghost_width_to_fill);
+   if (!(gcw_to_fill == hier::IntVector::getZero(d_dim))) {
+      /*
+       * Given a and g in a*u + (1-a)*un = g,
+       * where un is the derivative in the outward normal direction,
+       * and ui (the value of u in the first interior cell),
+       * we compute the value on the outer face
+       * uf = ...
+       * and the normal derivative on the outer face
+       * un = ...
+       * and the uo (the value in the first ghost cell)
+       * uo = ...
+       */
+      const hier::Box& patch_box(patch.getBox());
+
+      /*
+       * These definitions can go in the next block.
+       * They are kept her for debugging.
+       */
+      tbox::Pointer<geom::CartesianPatchGeometry> pg =
+         patch.getPatchGeometry();
+
+      const tbox::Array<hier::BoundaryBox>& codim1_boxes =
+         pg->getCodimensionBoundaries(1);
+
+      const int n_codim1_boxes = codim1_boxes.getSize();
+
+      const hier::Box& ghost_box = data.getGhostBox();
+      const double* h = pg->getDx();
+      const int num_coefs(homogeneous_bc ? 1 : 2);
+      const int zerog = num_coefs == 1;
+
+      for (int n = 0; n < n_codim1_boxes; ++n) {
+
+         const int location_index = codim1_boxes[n].getLocationIndex();
+         const int normal_dir = location_index / 2;
+         if (!gcw_to_fill(normal_dir)) {
+            // Zero ghost width to fill for this boundary box.
+            continue;
+         }
+         hier::IntVector extension_amount(d_dim, 1);
+         extension_amount(normal_dir) = 0;
+         const hier::BoundaryBox boundary_box =
+            d_coef_strategy->numberOfExtensionsFillable() >= extension_amount ?
+            trimBoundaryBox(codim1_boxes[n], ghost_box) :
+            trimBoundaryBox(codim1_boxes[n], patch_box);
+         const hier::Index& lower = boundary_box.getBox().lower();
+         const hier::Index& upper = boundary_box.getBox().upper();
+         const hier::Box coefbox = makeFaceBoundaryBox(boundary_box);
+         tbox::Pointer<pdat::ArrayData<double> >
+         acoef_data(new pdat::ArrayData<double>(coefbox, 1)),
+         bcoef_data(new pdat::ArrayData<double>(coefbox, 1)),
+         gcoef_data(homogeneous_bc ? NULL :
+            new pdat::ArrayData<double>(coefbox, 1));
+         t_use_set_bc_coefs->start();
+         d_coef_strategy->setBcCoefs(acoef_data,
+            bcoef_data,
+            gcoef_data,
+            variable_ptr,
+            patch,
+            boundary_box,
+            fill_time);
+         t_use_set_bc_coefs->stop();
+
+         int igho, ifac, iint, ibeg, iend;
+         double dx;
+         int jgho, jfac, jint, jbeg, jend;
+         double dy;
+         int kgho, kfac, kint, kbeg, kend;
+         double dz;
+
+         if (d_dim == tbox::Dimension(2)) {
+            switch (location_index) {
+               case 0:
+                  // min i edge
+                  dx = h[0];
+                  igho = lower[0]; // Lower and upper are the same.
+                  ifac = igho + 1;
+                  iint = igho + 1;
+                  jbeg = lower[1];
+                  jend = upper[1];
+                  F77_FUNC(settype1cells2d, SETTYPE1CELLS2D) (data.getPointer(0),
+                  ghost_box.lower()[0], ghost_box.upper()[0],
+                  ghost_box.lower()[1], ghost_box.upper()[1],
+                  acoef_data->getPointer(),
+                  bcoef_data->getPointer(),
+                  gcoef_data ? gcoef_data->getPointer() : NULL,
+                  coefbox.lower()[0], coefbox.upper()[0],
+                  coefbox.lower()[1], coefbox.upper()[1],
+                  igho, igho, jbeg, jend,
+                  ifac, igho, iint, location_index, dx, zerog
+                  );
+                  break;
+               case 1:
+                  // max i edge
+                  dx = h[0];
+                  igho = lower[0]; // Lower and upper are the same.
+                  ifac = igho;
+                  iint = igho - 1;
+                  jbeg = lower[1];
+                  jend = upper[1];
+                  F77_FUNC(settype1cells2d, SETTYPE1CELLS2D) (data.getPointer(0),
+                  ghost_box.lower()[0], ghost_box.upper()[0],
+                  ghost_box.lower()[1], ghost_box.upper()[1],
+                  acoef_data->getPointer(),
+                  bcoef_data->getPointer(),
+                  gcoef_data ? gcoef_data->getPointer() : NULL,
+                  coefbox.lower()[0], coefbox.upper()[0],
+                  coefbox.lower()[1], coefbox.upper()[1],
+                  igho, igho, jbeg, jend,
+                  ifac, igho, iint, location_index, dx, zerog
+                  );
+                  break;
+               case 2:
+                  // min j edge
+                  dy = h[1];
+                  jgho = lower[1]; // Lower and upper are the same.
+                  jfac = jgho + 1;
+                  jint = jgho + 1;
+                  ibeg = lower[0];
+                  iend = upper[0];
+                  F77_FUNC(settype1cells2d, SETTYPE1CELLS2D) (data.getPointer(0),
+                  ghost_box.lower()[0], ghost_box.upper()[0],
+                  ghost_box.lower()[1], ghost_box.upper()[1],
+                  acoef_data->getPointer(),
+                  bcoef_data->getPointer(),
+                  gcoef_data ? gcoef_data->getPointer() : NULL,
+                  coefbox.lower()[0], coefbox.upper()[0],
+                  coefbox.lower()[1], coefbox.upper()[1],
+                  ibeg, iend, jgho, jgho,
+                  jfac, jgho, jint, location_index, dy, zerog
+                  );
+                  break;
+               case 3:
+                  // max j edge
+                  dy = h[1];
+                  jgho = lower[1]; // Lower and upper are the same.
+                  jfac = jgho;
+                  jint = jgho - 1;
+                  ibeg = lower[0];
+                  iend = upper[0];
+                  F77_FUNC(settype1cells2d, SETTYPE1CELLS2D) (data.getPointer(0),
+                  ghost_box.lower()[0], ghost_box.upper()[0],
+                  ghost_box.lower()[1], ghost_box.upper()[1],
+                  acoef_data->getPointer(),
+                  bcoef_data->getPointer(),
+                  gcoef_data ? gcoef_data->getPointer() : NULL,
+                  coefbox.lower()[0], coefbox.upper()[0],
+                  coefbox.lower()[1], coefbox.upper()[1],
+                  ibeg, iend, jgho, jgho,
+                  jfac, jgho, jint, location_index, dy, zerog
+                  );
+                  break;
+               default:
+                  TBOX_ERROR(d_object_name << ": Invalid location index ("
+                  << location_index << ") in\n"
+                  << "setBoundaryValuesInCells");
+            }
+         } else if (d_dim == tbox::Dimension(3)) {
+            switch (location_index) {
+               case 0:
+                  // min i face
+                  dx = h[0];
+                  igho = lower[0]; // Lower and upper are the same.
+                  ifac = igho + 1;
+                  iint = igho + 1;
+                  jbeg = lower[1];
+                  jend = upper[1];
+                  kbeg = lower[2];
+                  kend = upper[2];
+                  F77_FUNC(settype1cells3d, SETTYPE1CELLS3D) (data.getPointer(0),
+                  ghost_box.lower()[0], ghost_box.upper()[0],
+                  ghost_box.lower()[1], ghost_box.upper()[1],
+                  ghost_box.lower()[2], ghost_box.upper()[2],
+                  acoef_data->getPointer(),
+                  bcoef_data->getPointer(),
+                  gcoef_data ? gcoef_data->getPointer() : NULL,
+                  coefbox.lower()[0], coefbox.upper()[0],
+                  coefbox.lower()[1], coefbox.upper()[1],
+                  coefbox.lower()[2], coefbox.upper()[2],
+                  igho, igho, jbeg, jend, kbeg, kend,
+                  ifac, igho, iint, location_index, dx, zerog
+                  );
+                  break;
+               case 1:
+                  // max i face
+                  dx = h[0];
+                  igho = lower[0]; // Lower and upper are the same.
+                  ifac = igho;
+                  iint = igho - 1;
+                  jbeg = lower[1];
+                  jend = upper[1];
+                  kbeg = lower[2];
+                  kend = upper[2];
+                  F77_FUNC(settype1cells3d, SETTYPE1CELLS3D) (data.getPointer(0),
+                  ghost_box.lower()[0], ghost_box.upper()[0],
+                  ghost_box.lower()[1], ghost_box.upper()[1],
+                  ghost_box.lower()[2], ghost_box.upper()[2],
+                  acoef_data->getPointer(),
+                  bcoef_data->getPointer(),
+                  gcoef_data ? gcoef_data->getPointer() : NULL,
+                  coefbox.lower()[0], coefbox.upper()[0],
+                  coefbox.lower()[1], coefbox.upper()[1],
+                  coefbox.lower()[2], coefbox.upper()[2],
+                  igho, igho, jbeg, jend, kbeg, kend,
+                  ifac, igho, iint, location_index, dx, zerog
+                  );
+                  break;
+               case 2:
+                  // min j face
+                  dy = h[1];
+                  jgho = lower[1]; // Lower and upper are the same.
+                  jfac = jgho + 1;
+                  jint = jgho + 1;
+                  ibeg = lower[0];
+                  iend = upper[0];
+                  kbeg = lower[2];
+                  kend = upper[2];
+                  F77_FUNC(settype1cells3d, SETTYPE1CELLS3D) (data.getPointer(0),
+                  ghost_box.lower()[0], ghost_box.upper()[0],
+                  ghost_box.lower()[1], ghost_box.upper()[1],
+                  ghost_box.lower()[2], ghost_box.upper()[2],
+                  acoef_data->getPointer(),
+                  bcoef_data->getPointer(),
+                  gcoef_data ? gcoef_data->getPointer() : NULL,
+                  coefbox.lower()[0], coefbox.upper()[0],
+                  coefbox.lower()[1], coefbox.upper()[1],
+                  coefbox.lower()[2], coefbox.upper()[2],
+                  ibeg, iend, jgho, jgho, kbeg, kend,
+                  jfac, jgho, jint, location_index, dy, zerog
+                  );
+                  break;
+               case 3:
+                  // max j face
+                  dy = h[1];
+                  jgho = lower[1]; // Lower and upper are the same.
+                  jfac = jgho;
+                  jint = jgho - 1;
+                  ibeg = lower[0];
+                  iend = upper[0];
+                  kbeg = lower[2];
+                  kend = upper[2];
+                  F77_FUNC(settype1cells3d, SETTYPE1CELLS3D) (data.getPointer(0),
+                  ghost_box.lower()[0], ghost_box.upper()[0],
+                  ghost_box.lower()[1], ghost_box.upper()[1],
+                  ghost_box.lower()[2], ghost_box.upper()[2],
+                  acoef_data->getPointer(),
+                  bcoef_data->getPointer(),
+                  gcoef_data ? gcoef_data->getPointer() : NULL,
+                  coefbox.lower()[0], coefbox.upper()[0],
+                  coefbox.lower()[1], coefbox.upper()[1],
+                  coefbox.lower()[2], coefbox.upper()[2],
+                  ibeg, iend, jgho, jgho, kbeg, kend,
+                  jfac, jgho, jint, location_index, dy, zerog
+                  );
+                  break;
+               case 4:
+                  // min k face
+                  dz = h[2];
+                  kgho = lower[2]; // Lower and upper are the same.
+                  kfac = kgho + 1;
+                  kint = kgho + 1;
+                  ibeg = lower[0];
+                  iend = upper[0];
+                  jbeg = lower[1];
+                  jend = upper[1];
+                  F77_FUNC(settype1cells3d, SETTYPE1CELLS3D) (data.getPointer(0),
+                  ghost_box.lower()[0], ghost_box.upper()[0],
+                  ghost_box.lower()[1], ghost_box.upper()[1],
+                  ghost_box.lower()[2], ghost_box.upper()[2],
+                  acoef_data->getPointer(),
+                  bcoef_data->getPointer(),
+                  gcoef_data ? gcoef_data->getPointer() : NULL,
+                  coefbox.lower()[0], coefbox.upper()[0],
+                  coefbox.lower()[1], coefbox.upper()[1],
+                  coefbox.lower()[2], coefbox.upper()[2],
+                  ibeg, iend, jbeg, jend, kgho, kgho,
+                  kfac, kgho, kint, location_index, dz, zerog
+                  );
+                  break;
+               case 5:
+                  // max k face
+                  dz = h[2];
+                  kgho = lower[2]; // Lower and upper are the same.
+                  kfac = kgho;
+                  kint = kgho - 1;
+                  ibeg = lower[0];
+                  iend = upper[0];
+                  jbeg = lower[1];
+                  jend = upper[1];
+                  F77_FUNC(settype1cells3d, SETTYPE1CELLS3D) (data.getPointer(0),
+                  ghost_box.lower()[0], ghost_box.upper()[0],
+                  ghost_box.lower()[1], ghost_box.upper()[1],
+                  ghost_box.lower()[2], ghost_box.upper()[2],
+                  acoef_data->getPointer(),
+                  bcoef_data->getPointer(),
+                  gcoef_data ? gcoef_data->getPointer() : NULL,
+                  coefbox.lower()[0], coefbox.upper()[0],
+                  coefbox.lower()[1], coefbox.upper()[1],
+                  coefbox.lower()[2], coefbox.upper()[2],
+                  ibeg, iend, jbeg, jend, kgho, kgho,
+                  kfac, kgho, kint, location_index, dz, zerog
+                  );
+                  break;
+               default:
+                  TBOX_ERROR(d_object_name << ": Invalid location index ("
+                  << location_index << ") in\n"
+                  << "setBoundaryValuesInCells");
+            }
+         }
+      }
+
+      /*
+       * Now that the surface boundary boxes have been set,
+       * the rest of this function set the lower-dimensional
+       * boundary boxes.  Users may not need to have these
+       * set, but refiners may.
+       */
+
+      if (d_dim == tbox::Dimension(2)) {
+         /*
+          * The node boundary conditions are set from a linear interpolation
+          * through the nearest interior cell and the two nearest edge values.
+          * This data may be used by refinement operators to do interpolation.
+          */
+
+         const tbox::Array<hier::BoundaryBox>& node_boxes =
+            pg->getNodeBoundaries();
+         const int n_node_boxes = node_boxes.getSize();
+         for (int n = 0; n < n_node_boxes; ++n) {
+            const hier::BoundaryBox& bb = node_boxes[n];
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(bb.getBoundaryType() == 2);        // Must be a node boundary.
+#endif
+            const hier::Box& bb_box = bb.getBox();
+            const hier::Index& lower = bb_box.lower();
+            const hier::Index& upper = bb_box.upper();
+            const int location_index = bb.getLocationIndex();
+            F77_FUNC(settype2cells2d, SETTYPE2CELLS2D) (data.getPointer(0),
+               ghost_box.lower()[0], ghost_box.upper()[0],
+               ghost_box.lower()[1], ghost_box.upper()[1],
+               &lower[0], &upper[0], location_index);
+         }
+      } else if (d_dim == tbox::Dimension(3)) {
+         /*
+          * The edge boundary conditions are set from a linear interpolation
+          * through the nearest interior cell and the two nearest side values.
+          * This data may be used by refinement operators to do interpolation.
+          */
+         const tbox::Array<hier::BoundaryBox>& edge_boxes =
+            pg->getEdgeBoundaries();
+         const int n_edge_boxes = edge_boxes.getSize();
+         for (int n = 0; n < n_edge_boxes; ++n) {
+            const int location_index = edge_boxes[n].getLocationIndex();
+            const int edge_dir = 2 - (location_index / 4);
+            hier::IntVector extension_amount(d_dim, 0);
+            extension_amount(edge_dir) = 1;
+            const hier::BoundaryBox boundary_box =
+               d_coef_strategy->numberOfExtensionsFillable() >= extension_amount ?
+               trimBoundaryBox(edge_boxes[n], ghost_box) :
+               trimBoundaryBox(edge_boxes[n], patch_box);
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(boundary_box.getBoundaryType() == 2);
+#endif
+            const hier::Index& lower = boundary_box.getBox().lower();
+            const hier::Index& upper = boundary_box.getBox().upper();
+            F77_FUNC(settype2cells3d, SETTYPE2CELLS3D) (data.getPointer(0),
+               ghost_box.lower()[0], ghost_box.upper()[0],
+               ghost_box.lower()[1], ghost_box.upper()[1],
+               ghost_box.lower()[2], ghost_box.upper()[2],
+               &lower[0], &upper[0], location_index);
+         }
+
+         /*
+          * The node boundary conditions are set from a linear interpolation
+          * through the nearest interior cell and the three nearest edge values.
+          * This data may be used by refinement operators to do interpolation.
+          */
+         const tbox::Array<hier::BoundaryBox>& node_boxes = pg->getNodeBoundaries();
+         const int n_node_boxes = node_boxes.getSize();
+         for (int n = 0; n < n_node_boxes; ++n) {
+            const hier::BoundaryBox& bb = node_boxes[n];
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(bb.getBoundaryType() == 3); // Must be an node boundary.
+#endif
+            const hier::Box& bb_box = bb.getBox();
+            const hier::Index& lower = bb_box.lower();
+            const hier::Index& upper = bb_box.upper();
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(lower == upper);
+#endif
+            const int location_index = bb.getLocationIndex();
+            F77_FUNC(settype3cells3d, SETTYPE3CELLS3D) (data.getPointer(0),
+               ghost_box.lower()[0], ghost_box.upper()[0],
+               ghost_box.lower()[1], ghost_box.upper()[1],
+               ghost_box.lower()[2], ghost_box.upper()[2],
+               &lower[0], &upper[0], location_index);
+         }
+      } else {
+         TBOX_ERROR("CartesianRobinBcHelper::setBoundaryValuesInCells error ..."
+            << "\n not implemented for dim>3" << std::endl);
+      }
+   }
+
+   t_set_boundary_values_in_cells->stop();
+}
+
+/*
+ ************************************************************************
+ * Set physical boundary conditions in cells, for all patches in a      *
+ * given level.                                                         *
+ ************************************************************************
+ */
+
+void CartesianRobinBcHelper::setBoundaryValuesInCells(
+   hier::PatchLevel& level,
+   const double fill_time,
+   const hier::IntVector& ghost_width_to_fill,
+   int target_data_id,
+   bool homogeneous_bc) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*this, level, ghost_width_to_fill);
+
+   for (hier::PatchLevel::Iterator p(level); p; p++) {
+      tbox::Pointer<hier::Patch> patch = *p;
+      setBoundaryValuesInCells(*patch,
+         fill_time,
+         ghost_width_to_fill,
+         target_data_id,
+         homogeneous_bc);
+   }
+}
+
+/*
+ ************************************************************************
+ * Set physical boundary conditions at nodes.                           *
+ ************************************************************************
+ */
+
+void CartesianRobinBcHelper::setBoundaryValuesAtNodes(
+   hier::Patch& patch,
+   const double fill_time,
+   int target_data_id,
+   bool homogeneous_bc) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, patch);
+
+   NULL_USE(patch);
+   NULL_USE(fill_time);
+   NULL_USE(target_data_id);
+   NULL_USE(homogeneous_bc);
+
+   TBOX_ERROR(
+      d_object_name << ": Using incomplete implementation"
+      <<
+      "CartesianRobinBcHelper::setBoundaryValuesAtNodes"
+      <<
+      "is not implemented because there is not a need for it (yet)"
+      << std::endl);
+}
+
+/*
+ ************************************************************************
+ * Set the coefficient strategy pointer that will be used to get        *
+ * Robin bc coefficients.  It should be some external implementation.   *
+ * This function implies that the simple mappings for                   *
+ * parallelpiped domains are not used and resets those arrays to null.  *
+ * is a parallelpiped (not checked) and that the boundary condition     *
+ * coefficients are functions only of the location index of the         *
+ * boundary.                                                            *
+ ************************************************************************
+ */
+
+void CartesianRobinBcHelper::setCoefImplementation(
+   const RobinBcCoefStrategy* coef_strategy)
+{
+   if (!coef_strategy) {
+      TBOX_ERROR(d_object_name << ": Invalid pointer value"
+                               << std::endl);
+   }
+   d_coef_strategy = coef_strategy;
+}
+
+void CartesianRobinBcHelper::setTargetDataId(
+   int target_data_id)
+{
+   d_target_data_id = target_data_id;
+}
+
+void CartesianRobinBcHelper::setHomogeneousBc(
+   bool is_homogeneous)
+{
+   d_homogeneous_bc = is_homogeneous;
+}
+
+/*
+ ***********************************************************************
+ *                                                                     *
+ *  Virtual functions or xfer::RefinePatchStrategy.                    *
+ *                                                                     *
+ ***********************************************************************
+ */
+
+void CartesianRobinBcHelper::setPhysicalBoundaryConditions(
+   hier::Patch& patch,
+   const double fill_time,
+   const hier::IntVector& ghost_width_to_fill)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*this, patch, ghost_width_to_fill);
+
+   setBoundaryValuesInCells(patch,
+      fill_time,
+      ghost_width_to_fill,
+      d_target_data_id,
+      d_homogeneous_bc);
+}
+
+hier::IntVector CartesianRobinBcHelper::getRefineOpStencilWidth() const
+{
+   return hier::IntVector::getZero(d_dim);
+}
+
+void CartesianRobinBcHelper::preprocessRefineBoxes(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const hier::BoxList& fine_boxes,
+   const hier::IntVector& ratio)
+{
+   NULL_USE(fine);
+   NULL_USE(coarse);
+   NULL_USE(fine_boxes);
+   NULL_USE(ratio);
+}
+void CartesianRobinBcHelper::preprocessRefine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio)
+{
+   NULL_USE(fine);
+   NULL_USE(coarse);
+   NULL_USE(fine_box);
+   NULL_USE(ratio);
+}
+void CartesianRobinBcHelper::postprocessRefineBoxes(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const hier::BoxList& fine_box,
+   const hier::IntVector& ratio)
+{
+   NULL_USE(fine);
+   NULL_USE(coarse);
+   NULL_USE(fine_box);
+   NULL_USE(ratio);
+}
+void CartesianRobinBcHelper::postprocessRefine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const hier::Box& fine_boxes,
+   const hier::IntVector& ratio)
+{
+   NULL_USE(fine);
+   NULL_USE(coarse);
+   NULL_USE(fine_boxes);
+   NULL_USE(ratio);
+}
+
+/*
+ ************************************************************************
+ * Trim a boundary box so it does not stick out past the corners of a   *
+ * given box.  This removes the extension parallel to the boundary,     *
+ * past the corner of the limit box.                                    *
+ ************************************************************************
+ */
+
+hier::BoundaryBox CartesianRobinBcHelper::trimBoundaryBox(
+   const hier::BoundaryBox& boundary_box,
+   const hier::Box& limit_box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*this, boundary_box, limit_box);
+
+   if (boundary_box.getBoundaryType() == d_dim.getValue()) {
+      // This is a node boundary box and cannot be trimmed anymore.
+      return boundary_box;
+   }
+
+   const hier::Box& bbox = boundary_box.getBox();
+   const hier::Index& plo = limit_box.lower();
+   const hier::Index& pup = limit_box.upper();
+   const hier::Index& blo = bbox.lower();
+   const hier::Index& bup = bbox.upper();
+   hier::Index newlo(d_dim), newup(d_dim);
+   int key_direction;
+   int d;
+   switch (boundary_box.getBoundaryType()) {
+      case 2:
+         key_direction = 2 - (boundary_box.getLocationIndex() / 4);
+         for (d = 0; d < d_dim.getValue(); ++d) {
+            if (d == key_direction) {
+               newlo(d) = tbox::MathUtilities<int>::Max(blo(d), plo(d));
+               newup(d) = tbox::MathUtilities<int>::Min(bup(d), pup(d));
+            } else {
+               newlo(d) = blo(d);
+               newup(d) = bup(d);
+            }
+         }
+         break;
+      case 1:
+         key_direction = boundary_box.getLocationIndex() / 2;
+         /*
+          * Loop through directions.
+          * Preserve box size in direction normal to boundary.
+          * Trim box size in direction transverse to boundary.
+          */
+         for (d = 0; d < d_dim.getValue(); ++d) {
+            if (d == key_direction) {
+               newlo(d) = blo(d);
+               newup(d) = bup(d);
+            } else {
+               // Min side.  Use max between boundary and patch boxes.
+               newlo(d) = tbox::MathUtilities<int>::Max(blo(d), plo(d));
+               // Max side.  Use min between boundary and patch boxes.
+               newup(d) = tbox::MathUtilities<int>::Min(bup(d), pup(d));
+            }
+         }
+         break;
+   }
+   const hier::Box newbox(newlo, newup);
+   const hier::BoundaryBox newbbox(newbox,
+                                   boundary_box.getBoundaryType(),
+                                   boundary_box.getLocationIndex());
+   return newbbox;
+}
+
+/*
+ ************************************************************************
+ * Make surface box on boundary using standard boundary box             *
+ ************************************************************************
+ */
+
+hier::Box CartesianRobinBcHelper::makeFaceBoundaryBox(
+   const hier::BoundaryBox& boundary_box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, boundary_box);
+
+   if (boundary_box.getBoundaryType() != 1) {
+      TBOX_ERROR(d_object_name << ": makeFaceBoundaryBox called with\n"
+                               << "improper boundary box\n"
+                               << "for " << d_object_name);
+   }
+   hier::Box face_indices = boundary_box.getBox();
+   int location_index = boundary_box.getLocationIndex();
+   if (location_index % 2 == 0) {
+      /*
+       * On the min index side, the face indices are one higher
+       * than the boundary cell indices, in the direction normal
+       * to the boundary.
+       */
+      face_indices.shift(location_index / 2, 1);
+   }
+   return face_indices;
+}
+
+/*
+ ************************************************************************
+ * Make node box on boundary using standard boundary box                *
+ ************************************************************************
+ */
+
+hier::Box CartesianRobinBcHelper::makeNodeBoundaryBox(
+   const hier::BoundaryBox& boundary_box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, boundary_box);
+
+   if (boundary_box.getBoundaryType() != 1) {
+      TBOX_ERROR(d_object_name << ": makeNodeBoundaryBox called with\n"
+                               << "improper boundary box\n"
+                               << "for " << d_object_name);
+   }
+   hier::Box node_indices = boundary_box.getBox();
+   int location_index = boundary_box.getLocationIndex();
+   if (location_index % 2 == 0) {
+      /*
+       * On the min index side, the node indices are one higher
+       * than the boundary cell indices, in the direction normal
+       * to the boundary.
+       */
+      node_indices.shift(location_index / 2, 1);
+   }
+   /*
+    * The node indices range one higher than the cell indices,
+    * in the directions parallel to the boundary.
+    */
+   hier::IntVector parallel_growth(d_dim, 1);
+   parallel_growth(location_index / 2) = 0;
+   node_indices.growUpper(parallel_growth);
+   return node_indices;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/CartesianRobinBcHelper.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/CartesianRobinBcHelper.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,424 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Robin boundary condition support on cartesian grids. 
+ *
+ ************************************************************************/
+#ifndef included_solv_CartesianRobinBcHelper
+#define included_solv_CartesianRobinBcHelper
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/solv/RobinBcCoefStrategy.h"
+#include "SAMRAI/xfer/RefinePatchStrategy.h"
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace solv {
+
+/*!
+ * @brief Helper utility for setting Robin boundary conditions.
+ *
+ * This class is intended as a helper for performing the tedious
+ * task of setting boundary values for scalar quantities for the
+ * general case of boundary conditions known as the Robin boundary
+ * condition.
+ *
+ * It uses the Robin boundary condition coefficients specified
+ * by a RobinBcCoefStrategy object to determine the boundary
+ * value to set.  The exact value set depends on the allignment of
+ * the data and is derived from various discrete approximations
+ * of the Robin formula.  This class currently supports cell-centered
+ * alignment and will support node-centered alignment in the future.
+ *
+ * See RobinBcCoefStrategy for the description of the Robin
+ * boundary condition.
+ *
+ * This class inherits and implements virtual functions from
+ * xfer::RefinePatchStrategy so it may be used to help create
+ * communication schedules if desired.
+ */
+class CartesianRobinBcHelper:
+   public xfer::RefinePatchStrategy
+{
+
+public:
+   /*!
+    * @brief Constructor using.
+    *
+    * Requires a concrete implementation of RobinBcCoefStrategy.
+    *
+    * @param object_name Name of the object, for general referencing.
+    * @param coef_strategy Coefficients strategy being helped.
+    */
+   CartesianRobinBcHelper(
+      const tbox::Dimension& dim,
+      std::string object_name = std::string(),
+      RobinBcCoefStrategy* coef_strategy = NULL);
+
+   /*!
+    * @brief Destructor.
+    */
+   virtual ~CartesianRobinBcHelper(
+      void);
+
+   //@{ @name xfer::RefinePatchStrategy virtuals
+
+   virtual void
+   setPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const double fill_time,
+      const hier::IntVector& ghost_width_to_fill);
+   hier::IntVector
+   getRefineOpStencilWidth() const;
+   virtual void
+   preprocessRefineBoxes(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::BoxList& fine_boxes,
+      const hier::IntVector& ratio);
+   virtual void
+   preprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio);
+   virtual void
+   postprocessRefineBoxes(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::BoxList& fine_boxes,
+      const hier::IntVector& ratio);
+   virtual void
+   postprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio);
+
+   //@}
+
+   //@{
+
+   /*!
+    * @name Functions to set boundary condition values
+    */
+
+   /*!
+    * @brief Set the physical boundary condition by setting the
+    * value of the first ghost cells.
+    *
+    * This function has an interface similar to the virtual function
+    * xfer::RefinePatchStrategy::setPhysicalBoundaryConditions(),
+    * and it may be used to help implement that function,
+    * but it does not serve the same purpose.  The primary
+    * differences are:
+    * -# It specializes to cell-centered variables.
+    * -# Only one ghost cell width is filled.  Setting a Robin
+    *    boundary condition for cell-centered quantities requires
+    *    only one ghost cell to be set.
+    *    (More ghost cells can be filled by continuing the linear
+    *    distribution of data beyond the first cell, but that is
+    *    not implemented at this time.)
+    * -# User must specify the index of the data whose ghost
+    *    cells need to be filled.  This index is used to determine
+    *    the variable for which to set the boundary coefficients
+    *    and to get the data to be set.
+    *
+    * This function calls RobinBcStrategy::setBcCoefs() to
+    * get the coefficients, then it sets the values in the first
+    * ghost cell on the boundary.
+    *
+    * To determine the value for the ghost cell,
+    * a @em linear approximation in the direction normal to the
+    * boundary is assumed.  We write the following discrete
+    * approximations:
+    * @f[ u_b = \frac{ u_i + u_o }{2} @f]
+    * @f[ [u_n]_b = \frac{ u_o - u_i }{h} @f]
+    * where the subscript b stands for the the boundary,
+    * i stands for the first cell inside the boundary and
+    * o stands for the first cell outside the boundary
+    * and h is the grid spacing normal to the boundary.
+    * Applying this to the Robin formula gives
+    * @f[ u_o = \frac{ h\gamma + u_i( \beta - \frac{h}{2} \alpha ) }
+    * { \beta + \frac{h}{2} \alpha } @f] or equivalently
+    * @f[ u_o = \frac{ hg + u_i (1-a(1+\frac{h}{2})) }{ 1-a(1-\frac{h}{2}) } @f]
+    *
+    * After setting the edge (face in 3D) boundary conditions,
+    * linear approximations are used to set the boundary conditions
+    * of higher boundary types (nodes in 2D, edges and nodes in 3D).
+    *
+    * In some cases, the calling function wants to set the
+    * boundary condition homogeneously, with g=0.
+    * This is useful in problems where the the solution of the
+    * homogeneous problem is required in solving the inhomogeneous
+    * problem.  This function respects such requests specified
+    * through the argument @c homogeneous_bc.
+    *
+    * @internal To be more general to other data types,
+    * there could be versions for other data types also,
+    * such as ...InNodes, ...InFaces, etc.  However, I'm not
+    * sure exactly how to implement the Robin boundary condition
+    * on the faces and nodes when m != 1.  Should the boundary
+    * value be set or should the first ghost value be set?
+    *
+    * @internal I have not addressed possibility of differences
+    * in chosing the discrete formulation with which to compute
+    * the boundary value.  The above formulation is obviously
+    * one specific approximation, but there could be others.
+    * If anoter approximation is required, there should be
+    * another class like this or this class can offer a choice
+    * to be set by the user.  I favor another class.
+    *
+    * @internal Since the data alignment can be found through
+    * the target_data_id, these types of functions may be changed
+    * to just plain setBoundaryValues or setBoundaryValuesInBoundaryBoxes
+    * since it does assume boundary boxes.  This may have to be
+    * expanded to later include coarse-fine boundary boxes
+    * for more generality.
+    *
+    * @param patch hier::Patch on which to set boundary condition
+    * @param fill_time Solution time corresponding to filling
+    * @param ghost_width_to_fill Max ghost width requiring fill
+    * @param target_data_id hier::Patch data index of data to be set.
+    *        This data must be a cell-centered double.
+    * @param homogeneous_bc Set a homogeneous boundary condition.
+    *    This means g=0 for the boundary.
+    */
+   void
+   setBoundaryValuesInCells(
+      hier::Patch& patch,
+      const double fill_time,
+      const hier::IntVector& ghost_width_to_fill,
+      int target_data_id,
+      bool homogeneous_bc = false) const;
+
+   /*!
+    * @brief Set ghost cells for an entire level.
+    *
+    * Loop through all patches on the given level and call
+    * setBoundaryValuesInCells(hier::Patch &patch,
+    *                          const double fill_time ,
+    *                          const hier::IntVector &ghost_width_to_fill ,
+    *                          int target_data_id ,
+    *                          bool homogeneous_bc=false )
+    * for each.
+    *
+    * @param level PatchLevel on which to set boundary condition
+    * @param fill_time Solution time corresponding to filling
+    * @param ghost_width_to_fill Max ghost width requiring fill
+    * @param target_data_id hier::Patch data index of data to be set.
+    *        This data must be a cell-centered double.
+    * @param homogeneous_bc Set a homogeneous boundary condition.
+    *    This means g=0 for the boundary.
+    */
+   void
+   setBoundaryValuesInCells(
+      hier::PatchLevel& level,
+      const double fill_time,
+      const hier::IntVector& ghost_width_to_fill,
+      int target_data_id,
+      bool homogeneous_bc = false) const;
+
+   /*!
+    * @brief Set the physical boundary condition by setting the
+    * value of the boundary nodes.
+    *
+    * This function is not yet implemented!
+    *
+    * There are some decisions that must be made before
+    * the implementation can be written.
+    * -# Do we set the values on the boundary or one cell
+    *    away from the boundary?
+    * -# What is the discrete formulation we should use
+    *    to compute the value to be set?
+    *
+    * This function has an interface similar to the virtual function
+    * xfer::RefinePatchStrategy::setPhysicalBoundaryConditions(),
+    * and it may be used to help implement that function,
+    * but it does not serve the same purpose.  The primary
+    * differences are:
+    * -# It specializes to node-centered variables.
+    * -# User must specify the index of the data whose ghost
+    *    cells need to be filled.  This index is used to determine
+    *    the variable for which to set the boundary coefficients
+    *    and to get the data to be set.
+    *
+    * This function calls RobinBcStrategy::setBcCoefs() to get the
+    * coefficients, then it sets the values at the boundary nodes.
+    *
+    * In some cases, the calling function wants to set the
+    * boundary condition homogeneously, with g=0.
+    * This is useful in problems where the the solution of the
+    * homogeneous problem is required to solving the inhomogeneous
+    * problem.  This function respects such requests specified
+    * through the argument @c homogeneous_bc.
+    *
+    * @param patch hier::Patch on which to set boundary condition
+    * @param fill_time Solution time corresponding to filling
+    * @param target_data_id hier::Patch data index of data to be set.
+    * @param homogeneous_bc Set a homogeneous boundary condition.
+    *    This means g=0 for the boundary.
+    */
+   void
+   setBoundaryValuesAtNodes(
+      hier::Patch& patch,
+      const double fill_time,
+      int target_data_id,
+      bool homogeneous_bc = false) const;
+
+   //@}
+
+   //@{
+   /*!
+    * @name Ways to provide the Robin bc coefficients
+    */
+
+   /*!
+    * @brief Provide an implementation of the RobinBcCoefStrategy
+    * for determining the boundary coefficients.
+    *
+    * Provide the implementation that can be used to set the
+    * Robin bc coefficients.
+    *
+    * @param coef_strategy tbox::Pointer to a concrete inmplementation of
+    *        the coefficient strategy.
+    */
+   void
+   setCoefImplementation(
+      const RobinBcCoefStrategy* coef_strategy);
+
+   /*!
+    * @brief Set the data id that should be filled when setting
+    * physical boundary conditions.
+    *
+    * When setPhysicalBoundaryConditions is called, the data
+    * specified will be set.  This information is required because
+    * the it is not passed in through the argument list of
+    * setPhysicalBounaryConditions.
+    */
+   void
+   setTargetDataId(
+      int target_data_id);
+
+   /*!
+    * @brief Set whether boundary filling should assume homogeneous
+    * conditions.
+    *
+    * In certain circumstances, only the value of a is needed, while
+    * the value of g is temporarily not required and taken to be zero.
+    * (An example is in setting the boundary condition for error
+    * value in an iterative method.)  In such cases, use this function
+    * to set a flag that will cause a null pointer to be given to
+    * setBcCoefs() to indicate that fact.
+    */
+   void
+   setHomogeneousBc(
+      bool homogeneous_bc);
+
+   //@}
+
+private:
+   /*!
+    * @brief Trim a boundary box so that it does not stick out
+    * past a given box.
+    *
+    * Certain boundary-related operations occur on patch data that
+    * do not or cannot extend past the edgr or corner of a patch.
+    * This function is used to trim down the parts of the boundary box
+    * that extend past those points so that a suitable index range
+    * is achieved.
+    *
+    * The boundary box trimmed must be of type 1 or 2.
+    *
+    * @param boundary_box Boundary box to be trimmed.
+    * @param limit_box hier::Box to not stick past
+    *
+    * @return New trimmed boundary box.
+    */
+   hier::BoundaryBox
+   trimBoundaryBox(
+      const hier::BoundaryBox& boundary_box,
+      const hier::Box& limit_box) const;
+
+   /*!
+    * @brief Return box describing the index space of boundary nodes
+    * defined by a boundary box.
+    *
+    * Define a box describing the indices of the nodes corresponding
+    * to the input boundary box.  These nodes lie on the boundary
+    * itself.
+    *
+    * The input boundary_box must be of type 1
+    * (see hier::BoundaryBox::getBoundaryType()).
+    *
+    * @param boundary_box input boundary box
+    * @return a box to define the node indices corresponding to
+    *   boundary_box
+    */
+   hier::Box
+   makeNodeBoundaryBox(
+      const hier::BoundaryBox& boundary_box) const;
+
+   /*!
+    * @brief Return box describing the index space of faces
+    * defined by a boundary box.
+    *
+    * Define a box describing the indices of the codimension 1
+    * surface corresponding to the input boundary box.
+    *
+    * The input boundary_box must be of type 1
+    * (see hier::BoundaryBox::getBoundaryType()).
+    *
+    * This is a utility function for working with the
+    * indices coresponding to a boundary box but coincide
+    * with the patch boundary.
+    *
+    * @param boundary_box input boundary box
+    * @return a box to define the face indices corresponding to
+    *    boundary_box
+    */
+   hier::Box
+   makeFaceBoundaryBox(
+      const hier::BoundaryBox& boundary_box) const;
+
+   const tbox::Dimension d_dim;
+
+   std::string d_object_name;
+
+   /*!
+    * @brief Coefficient strategy giving a way to get to
+    * Robin bc coefficients.
+    */
+   const RobinBcCoefStrategy* d_coef_strategy;
+
+   /*!
+    * @brief hier::Index of target patch data when filling ghosts.
+    */
+   int d_target_data_id;
+
+   /*!
+    * @brief Whether to assumg g=0 when filling ghosts.
+    */
+   bool d_homogeneous_bc;
+
+   /*!
+    * @brief Timers for performance measurement.
+    */
+   tbox::Pointer<tbox::Timer> t_set_boundary_values_in_cells;
+   tbox::Pointer<tbox::Timer> t_use_set_bc_coefs;
+};
+
+}
+}
+
+#endif  // included_solv_CartesianRobinBcHelper
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/CellPoissonFACOps.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/CellPoissonFACOps.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,2830 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operator class for cell-centered scalar Poisson using FAC 
+ *
+ ************************************************************************/
+#ifndef included_solv_CellPoissonFACOps_C
+#define included_solv_CellPoissonFACOps_C
+
+#include "SAMRAI/solv/CellPoissonFACOps.h"
+
+#include IOMANIP_HEADER_FILE
+
+#include "SAMRAI/hier/BoundaryBoxUtils.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/pdat/CellDoubleConstantRefine.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/pdat/OutersideData.h"
+#include "SAMRAI/pdat/OutersideVariable.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/solv/FACPreconditioner.h"
+#include "SAMRAI/solv/CellPoissonHypreSolver.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/xfer/CoarsenAlgorithm.h"
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/xfer/CoarsenSchedule.h"
+#include "SAMRAI/xfer/RefineAlgorithm.h"
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/xfer/RefineSchedule.h"
+#include "SAMRAI/xfer/PatchLevelFullFillPattern.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/solv/CellPoissonFACOps.I"
+#endif
+
+namespace SAMRAI {
+namespace solv {
+
+tbox::Pointer<pdat::CellVariable<double> >
+CellPoissonFACOps::s_cell_scratch_var[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+tbox::Pointer<pdat::SideVariable<double> >
+CellPoissonFACOps::s_flux_scratch_var[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+tbox::Pointer<pdat::OutersideVariable<double> >
+CellPoissonFACOps::s_oflux_scratch_var[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+tbox::StartupShutdownManager::Handler
+CellPoissonFACOps::s_finalize_handler(
+   0,
+   0,
+   0,
+   CellPoissonFACOps::finalizeCallback,
+   tbox::StartupShutdownManager::priorityVariables);
+
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+void F77_FUNC(compfluxvardc2d, COMPFLUXVARDC2D) (
+   double* xflux,
+   double* yflux,
+   const int* fluxgi,
+   const int* fluxgj,
+   const double* xdiff_coef,
+   const double* ydiff_coef,
+   const int* dcgi,
+   const int* dcgj,
+   const double* soln,
+   const int* solngi,
+   const int* solngj,
+   const int* ifirst,
+   const int* ilast,
+   const int* jfirst,
+   const int* jlast,
+   const double* dx);
+void F77_FUNC(compfluxcondc2d, COMPFLUXCONDC2D) (
+   double* xflux,
+   double* yflux,
+   const int* fluxgi,
+   const int* fluxgj,
+   const double & diff_coef,
+   const double* soln,
+   const int* solngi,
+   const int* solngj,
+   const int* ifirst,
+   const int* ilast,
+   const int* jfirst,
+   const int* jlast,
+   const double* dx);
+void F77_FUNC(rbgswithfluxmaxvardcvarsf2d, RBGSWITHFLUXMAXVARDCVARSF2D) (
+   const double* xflux,
+   const double* yflux,
+   const int* fluxgi,
+   const int* fluxgj,
+   const double* xdiff_coef,
+   const double* ydiff_coef,
+   const int* dcgi,
+   const int* dcgj,
+   const double* rhs,
+   const int* rhsgi,
+   const int* rhsgj,
+   const double* scalar_field,
+   const int* scalar_field_gi,
+   const int* scalar_field_gj,
+   double* soln,
+   const int* solngi,
+   const int* solngj,
+   const int* ifirst,
+   const int* ilast,
+   const int* jfirst,
+   const int* jlast,
+   const double* dx,
+   const int* offset,
+   const double* maxres);
+void F77_FUNC(rbgswithfluxmaxcondcvarsf2d, RBGSWITHFLUXMAXCONDCVARSF2D) (
+   const double* xflux,
+   const double* yflux,
+   const int* fluxgi,
+   const int* fluxgj,
+   const double & dc,
+   const double* rhs,
+   const int* rhsgi,
+   const int* rhsgj,
+   const double* scalar_field,
+   const int* scalar_field_gi,
+   const int* scalar_field_gj,
+   double* soln,
+   const int* solngi,
+   const int* solngj,
+   const int* ifirst,
+   const int* ilast,
+   const int* jfirst,
+   const int* jlast,
+   const double* dx,
+   const int* offset,
+   const double* maxres);
+void F77_FUNC(rbgswithfluxmaxvardcconsf2d, RBGSWITHFLUXMAXVARDCCONSF2D) (
+   const double* xflux,
+   const double* yflux,
+   const int* fluxgi,
+   const int* fluxgj,
+   const double* xdiff_coef,
+   const double* ydiff_coef,
+   const int* dcgi,
+   const int* dcgj,
+   const double* rhs,
+   const int* rhsgi,
+   const int* rhsgj,
+   const double & scalar_field,
+   double* soln,
+   const int* solngi,
+   const int* solngj,
+   const int* ifirst,
+   const int* ilast,
+   const int* jfirst,
+   const int* jlast,
+   const double* dx,
+   const int* offset,
+   const double* maxres);
+void F77_FUNC(rbgswithfluxmaxcondcconsf2d, RBGSWITHFLUXMAXCONDCCONSF2D) (
+   const double* xflux,
+   const double* yflux,
+   const int* fluxgi,
+   const int* fluxgj,
+   const double & dc,
+   const double* rhs,
+   const int* rhsgi,
+   const int* rhsgj,
+   const double & scalar_field,
+   double* soln,
+   const int* solngi,
+   const int* solngj,
+   const int* ifirst,
+   const int* ilast,
+   const int* jfirst,
+   const int* jlast,
+   const double* dx,
+   const int* offset,
+   const double* maxres);
+void F77_FUNC(compresvarsca2d, COMPRESVARSCA2D) (
+   const double* xflux,
+   const double* yflux,
+   const int* fluxgi,
+   const int* fluxgj,
+   const double* rhs,
+   const int* rhsgi,
+   const int* rhsgj,
+   double* residual,
+   const int* residualgi,
+   const int* residualgj,
+   const double* scalar_field,
+   const int* scalar_field_gi,
+   const int* scalar_field_gj,
+   const double* soln,
+   const int* solngi,
+   const int* solngj,
+   const int* ifirst,
+   const int* ilast,
+   const int* jfirst,
+   const int* jlast,
+   const double* dx);
+void F77_FUNC(compresconsca2d, COMPRESCONSCA2D) (
+   const double* xflux,
+   const double* yflux,
+   const int* fluxgi,
+   const int* fluxgj,
+   const double* rhs,
+   const int* rhsgi,
+   const int* rhsgj,
+   double* residual,
+   const int* residualgi,
+   const int* residualgj,
+   const double & scalar_field,
+   const double* soln,
+   const int* solngi,
+   const int* solngj,
+   const int* ifirst,
+   const int* ilast,
+   const int* jfirst,
+   const int* jlast,
+   const double* dx);
+void F77_FUNC(ewingfixfluxvardc2d, EWINGFIXFLUXVARDC2D) (
+   const double* xflux,
+   const double* yflux,
+   const int* fluxgi,
+   const int* fluxgj,
+   const double* xdiff_coef,
+   const double* ydiff_coef,
+   const int* dcgi,
+   const int* dcgj,
+   const double* soln,
+   const int* solngi,
+   const int* solngj,
+   const int* ifirst,
+   const int* ilast,
+   const int* jfirst,
+   const int* jlast,
+   const int* location_index,
+   const int* ratio_to_coarser,
+   const int* blower,
+   const int* bupper,
+   const double* dx);
+void F77_FUNC(ewingfixfluxcondc2d, EWINGFIXFLUXCONDC2D) (
+   const double* xflux,
+   const double* yflux,
+   const int* fluxgi,
+   const int* fluxgj,
+   const double & diff_coef,
+   const double* soln,
+   const int* solngi,
+   const int* solngj,
+   const int* ifirst,
+   const int* ilast,
+   const int* jfirst,
+   const int* jlast,
+   const int* location_index,
+   const int* ratio_to_coarser,
+   const int* blower,
+   const int* bupper,
+   const double* dx);
+
+void F77_FUNC(compfluxvardc3d, COMPFLUXVARDC3D) (
+   double* xflux,
+   double* yflux,
+   double* zflux,
+   const int* fluxgi,
+   const int* fluxgj,
+   const int* fluxgk,
+   const double* xdiff_coef,
+   const double* ydiff_coef,
+   const double* zdiff_coef,
+   const int* dcgi,
+   const int* dcgj,
+   const int* dcgk,
+   const double* soln,
+   const int* solngi,
+   const int* solngj,
+   const int* solngk,
+   const int* ifirst,
+   const int* ilast,
+   const int* jfirst,
+   const int* jlast,
+   const int* kfirst,
+   const int* klast,
+   const double* dx);
+void F77_FUNC(compfluxcondc3d, COMPFLUXCONDC3D) (
+   double* xflux,
+   double* yflux,
+   double* zflux,
+   const int* fluxgi,
+   const int* fluxgj,
+   const int* fluxgk,
+   const double & diff_coef,
+   const double* soln,
+   const int* solngi,
+   const int* solngj,
+   const int* solngk,
+   const int* ifirst,
+   const int* ilast,
+   const int* jfirst,
+   const int* jlast,
+   const int* kfirst,
+   const int* klast,
+   const double* dx);
+void F77_FUNC(rbgswithfluxmaxvardcvarsf3d, RBGSWITHFLUXMAXVARDCVARSF3D) (
+   const double* xflux,
+   const double* yflux,
+   const double* zflux,
+   const int* fluxgi,
+   const int* fluxgj,
+   const int* fluxgk,
+   const double* xdiff_coef,
+   const double* ydiff_coef,
+   const double* zdiff_coef,
+   const int* dcgi,
+   const int* dcgj,
+   const int* dcgk,
+   const double* rhs,
+   const int* rhsgi,
+   const int* rhsgj,
+   const int* rhsgk,
+   const double* scalar_field,
+   const int* scalar_field_gi,
+   const int* scalar_field_gj,
+   const int* scalar_field_gk,
+   double* soln,
+   const int* solngi,
+   const int* solngj,
+   const int* solngk,
+   const int* ifirst,
+   const int* ilast,
+   const int* jfirst,
+   const int* jlast,
+   const int* kfirst,
+   const int* klast,
+   const double* dx,
+   const int* offset,
+   const double* maxres);
+void F77_FUNC(rbgswithfluxmaxcondcvarsf3d, RBGSWITHFLUXMAXCONDCVARSF3D) (
+   const double* xflux,
+   const double* yflux,
+   const double* zflux,
+   const int* fluxgi,
+   const int* fluxgj,
+   const int* fluxgk,
+   const double & dc,
+   const double* rhs,
+   const int* rhsgi,
+   const int* rhsgj,
+   const int* rhsgk,
+   const double* scalar_field,
+   const int* scalar_field_gi,
+   const int* scalar_field_gj,
+   const int* scalar_field_gk,
+   double* soln,
+   const int* solngi,
+   const int* solngj,
+   const int* solngk,
+   const int* ifirst,
+   const int* ilast,
+   const int* jfirst,
+   const int* jlast,
+   const int* kfirst,
+   const int* klast,
+   const double* dx,
+   const int* offset,
+   const double* maxres);
+void F77_FUNC(rbgswithfluxmaxvardcconsf3d, RBGSWITHFLUXMAXVARDCCONSF3D) (
+   const double* xflux,
+   const double* yflux,
+   const double* zflux,
+   const int* fluxgi,
+   const int* fluxgj,
+   const int* fluxgk,
+   const double* xdiff_coef,
+   const double* ydiff_coef,
+   const double* zdiff_coef,
+   const int* dcgi,
+   const int* dcgj,
+   const int* dcgk,
+   const double* rhs,
+   const int* rhsgi,
+   const int* rhsgj,
+   const int* rhsgk,
+   const double & scalar_field,
+   double* soln,
+   const int* solngi,
+   const int* solngj,
+   const int* solngk,
+   const int* ifirst,
+   const int* ilast,
+   const int* jfirst,
+   const int* jlast,
+   const int* kfirst,
+   const int* klast,
+   const double* dx,
+   const int* offset,
+   const double* maxres);
+void F77_FUNC(rbgswithfluxmaxcondcconsf3d, RBGSWITHFLUXMAXCONDCCONSF3D) (
+   const double* xflux,
+   const double* yflux,
+   const double* zflux,
+   const int* fluxgi,
+   const int* fluxgj,
+   const int* fluxgk,
+   const double & dc,
+   const double* rhs,
+   const int* rhsgi,
+   const int* rhsgj,
+   const int* rhsgk,
+   const double & scalar_field,
+   double* soln,
+   const int* solngi,
+   const int* solngj,
+   const int* solngk,
+   const int* ifirst,
+   const int* ilast,
+   const int* jfirst,
+   const int* jlast,
+   const int* kfirst,
+   const int* klast,
+   const double* dx,
+   const int* offset,
+   const double* maxres);
+void F77_FUNC(compresvarsca3d, COMPRESVARSCA3D) (
+   const double* xflux,
+   const double* yflux,
+   const double* zflux,
+   const int* fluxgi,
+   const int* fluxgj,
+   const int* fluxgk,
+   const double* rhs,
+   const int* rhsgi,
+   const int* rhsgj,
+   const int* rhsgk,
+   double* residual,
+   const int* residualgi,
+   const int* residualgj,
+   const int* residualgk,
+   const double* scalar_field,
+   const int* scalar_field_gi,
+   const int* scalar_field_gj,
+   const int* scalar_field_gk,
+   const double* soln,
+   const int* solngi,
+   const int* solngj,
+   const int* solngk,
+   const int* ifirst,
+   const int* ilast,
+   const int* jfirst,
+   const int* jlast,
+   const int* kfirst,
+   const int* klast,
+   const double* dx);
+void F77_FUNC(compresconsca3d, COMPRESCONSCA3D) (
+   const double* xflux,
+   const double* yflux,
+   const double* zflux,
+   const int* fluxgi,
+   const int* fluxgj,
+   const int* fluxgk,
+   const double* rhs,
+   const int* rhsgi,
+   const int* rhsgj,
+   const int* rhsgk,
+   double* residual,
+   const int* residualgi,
+   const int* residualgj,
+   const int* residualgk,
+   const double & scalar_field,
+   const double* soln,
+   const int* solngi,
+   const int* solngj,
+   const int* solngk,
+   const int* ifirst,
+   const int* ilast,
+   const int* jfirst,
+   const int* jlast,
+   const int* kfirst,
+   const int* klast,
+   const double* dx);
+void F77_FUNC(ewingfixfluxvardc3d, EWINGFIXFLUXVARDC3D) (
+   const double* xflux,
+   const double* yflux,
+   const double* zflux,
+   const int* fluxgi,
+   const int* fluxgj,
+   const int* fluxgk,
+   const double* xdiff_coef,
+   const double* ydiff_coef,
+   const double* zdiff_coef,
+   const int* dcgi,
+   const int* dcgj,
+   const int* dcgk,
+   const double* soln,
+   const int* solngi,
+   const int* solngj,
+   const int* solngk,
+   const int* ifirst,
+   const int* ilast,
+   const int* jfirst,
+   const int* jlast,
+   const int* kfirst,
+   const int* klast,
+   const int* location_index,
+   const int* ratio_to_coarser,
+   const int* blower,
+   const int* bupper,
+   const double* dx);
+void F77_FUNC(ewingfixfluxcondc3d, EWINGFIXFLUXCONDC3D) (
+   const double* xflux,
+   const double* yflux,
+   const double* zflux,
+   const int* fluxgi,
+   const int* fluxgj,
+   const int* fluxgk,
+   const double & diff_coef,
+   const double* soln,
+   const int* solngi,
+   const int* solngj,
+   const int* solngk,
+   const int* ifirst,
+   const int* ilast,
+   const int* jfirst,
+   const int* jlast,
+   const int* kfirst,
+   const int* klast,
+   const int* location_index,
+   const int* ratio_to_coarser,
+   const int* blower,
+   const int* bupper,
+   const double* dx);
+
+}
+
+/*
+ ********************************************************************
+ * Constructor.                                                     *
+ ********************************************************************
+ */
+CellPoissonFACOps::CellPoissonFACOps(
+   const tbox::Dimension& dim,
+   const std::string& object_name,
+   tbox::Pointer<tbox::Database> database):
+   d_dim(dim),
+   d_object_name(object_name),
+   d_hierarchy(),
+   d_ln_min(-1),
+   d_ln_max(-1),
+   d_cf_boundary(),
+   d_poisson_spec(object_name + "::Poisson specs"),
+   d_smoothing_choice("redblack"),
+   d_coarse_solver_choice(
+#ifdef HAVE_HYPRE
+      "hypre"
+#else
+      "redblack"
+#endif
+
+      ),
+   d_cf_discretization("Ewing"),
+   d_prolongation_method("CONSTANT_REFINE"),
+   d_coarse_solver_tolerance(1.e-8),
+   d_coarse_solver_max_iterations(10),
+   d_residual_tolerance_during_smoothing(-1.0),
+   d_flux_id(-1),
+#ifdef HAVE_HYPRE
+   d_hypre_solver(dim,
+                  object_name + "::hypre_solver",
+                  database && database->isDatabase("hypre_solver") ?
+                  database->getDatabase("hypre_solver"):
+                     tbox::Pointer<tbox::Database>(NULL)),
+#endif
+   d_physical_bc_coef(NULL),
+   d_context(hier::VariableDatabase::getDatabase()
+             ->getContext(object_name + "::PRIVATE_CONTEXT")),
+   d_cell_scratch_id(-1),
+   d_flux_scratch_id(-1),
+   d_oflux_scratch_id(-1),
+   d_prolongation_refine_operator(),
+   d_prolongation_refine_algorithm(),
+   d_prolongation_refine_schedules(),
+   d_urestriction_coarsen_operator(),
+   d_urestriction_coarsen_algorithm(),
+   d_urestriction_coarsen_schedules(),
+   d_rrestriction_coarsen_operator(),
+   d_rrestriction_coarsen_algorithm(),
+   d_rrestriction_coarsen_schedules(),
+   d_flux_coarsen_operator(),
+   d_flux_coarsen_algorithm(),
+   d_flux_coarsen_schedules(),
+   d_ghostfill_refine_operator(),
+   d_ghostfill_refine_algorithm(),
+   d_ghostfill_refine_schedules(),
+   d_ghostfill_nocoarse_refine_operator(),
+   d_ghostfill_nocoarse_refine_algorithm(),
+   d_ghostfill_nocoarse_refine_schedules(),
+   d_bc_helper(dim,
+               d_object_name + "::bc helper"),
+   d_enable_logging(false),
+   d_preconditioner(NULL),
+   d_hopscell(),
+   d_hopsside()
+{
+
+   t_restrict_solution = tbox::TimerManager::getManager()->
+      getTimer("solv::CellPoissonFACOps::restrictSolution()");
+   t_restrict_residual = tbox::TimerManager::getManager()->
+      getTimer("solv::CellPoissonFACOps::restrictResidual()");
+   t_prolong = tbox::TimerManager::getManager()->
+      getTimer("solv::CellPoissonFACOps::prolongErrorAndCorrect()");
+   t_smooth_error = tbox::TimerManager::getManager()->
+      getTimer("solv::CellPoissonFACOps::smoothError()");
+   t_solve_coarsest = tbox::TimerManager::getManager()->
+      getTimer("solv::CellPoissonFACOps::solveCoarsestLevel()");
+   t_compute_composite_residual = tbox::TimerManager::getManager()->
+      getTimer("solv::CellPoissonFACOps::computeCompositeResidualOnLevel()");
+   t_compute_residual_norm = tbox::TimerManager::getManager()->
+      getTimer("solv::CellPoissonFACOps::computeResidualNorm()");
+
+   if (d_dim == tbox::Dimension(1) || d_dim > tbox::Dimension(3)) {
+      TBOX_ERROR("CellPoissonFACOps : DIM == 1 or > 3 not implemented yet.\n");
+   }
+
+   if (s_cell_scratch_var[dim.getValue() - 1].isNull()) {
+      TBOX_ASSERT(s_cell_scratch_var[dim.getValue() - 1].isNull());
+      TBOX_ASSERT(s_cell_scratch_var[dim.getValue() - 1].isNull());
+
+      std::ostringstream ss;
+      ss << "CellPoissonFACOps::private_cell_scratch" << dim.getValue();
+      s_cell_scratch_var[dim.getValue() - 1] = new pdat::CellVariable<double>
+            (dim, ss.str());
+      ss.str("");
+      ss << "CellPoissonFACOps::private_flux_scratch" << dim.getValue();
+      s_flux_scratch_var[dim.getValue() - 1] = new pdat::SideVariable<double>
+            (dim, ss.str());
+      ss.str("");
+      ss << "CellPoissonFACOps::private_oflux_scratch" << dim.getValue();
+      s_oflux_scratch_var[dim.getValue() - 1] = new pdat::OutersideVariable<double>
+            (dim, ss.str());
+   }
+
+   hier::VariableDatabase* vdb = hier::VariableDatabase::getDatabase();
+   d_cell_scratch_id = vdb->
+      registerVariableAndContext(s_cell_scratch_var[dim.getValue() - 1],
+         d_context,
+         hier::IntVector::getOne(dim));
+   d_flux_scratch_id = vdb->
+      registerVariableAndContext(s_flux_scratch_var[dim.getValue() - 1],
+         d_context,
+         hier::IntVector::getZero(d_dim));
+   d_oflux_scratch_id = vdb->
+      registerVariableAndContext(s_oflux_scratch_var[dim.getValue() - 1],
+         d_context,
+         hier::IntVector::getZero(d_dim));
+
+   /*
+    * Some variables initialized by default are overriden by input.
+    */
+   if (database) {
+
+      d_coarse_solver_choice =
+         database->getStringWithDefault("coarse_solver_choice",
+            d_coarse_solver_choice);
+      d_coarse_solver_tolerance =
+         database->getDoubleWithDefault("coarse_solver_tolerance",
+            d_coarse_solver_tolerance);
+      d_coarse_solver_max_iterations =
+         database->getIntegerWithDefault("coarse_solver_max_iterations",
+            d_coarse_solver_max_iterations);
+      d_smoothing_choice =
+         database->getStringWithDefault("smoothing_choice",
+            d_smoothing_choice);
+
+      d_cf_discretization =
+         database->getStringWithDefault("cf_discretization",
+            d_cf_discretization);
+
+      d_prolongation_method =
+         database->getStringWithDefault("prolongation_method",
+            d_prolongation_method);
+
+      d_enable_logging =
+         database->getBoolWithDefault("enable_logging",
+            d_enable_logging);
+
+   }
+
+   /*
+    * Check input validity and correctness.
+    */
+   checkInputPatchDataIndices();
+
+}
+
+CellPoissonFACOps::~CellPoissonFACOps(
+   void)
+{
+}
+
+/*
+ ************************************************************************
+ * FACOperatorStrategy virtual initializeOperatorState function.  *
+ *                                                                      *
+ * Set internal variables to correspond to the solution passed in.      *
+ * Look up transfer operators.                                          *
+ ************************************************************************
+ */
+
+void CellPoissonFACOps::initializeOperatorState(
+   const SAMRAIVectorReal<double>& solution,
+   const SAMRAIVectorReal<double>& rhs)
+{
+   deallocateOperatorState();
+   int ln;
+   hier::VariableDatabase* vdb = hier::VariableDatabase::getDatabase();
+
+   d_hierarchy = solution.getPatchHierarchy();
+   d_ln_min = solution.getCoarsestLevelNumber();
+   d_ln_max = solution.getFinestLevelNumber();
+   d_hopscell = new math::HierarchyCellDataOpsReal<double>(d_hierarchy,
+                                                           d_ln_min,
+                                                           d_ln_max);
+   d_hopsside = new math::HierarchySideDataOpsReal<double>(d_hierarchy,
+                                                           d_ln_min,
+                                                           d_ln_max);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+
+   if (d_physical_bc_coef == NULL) {
+      /*
+       * It's an error not to have bc object set.
+       * Note that the bc object cannot be passed in through
+       * the argument because the interface is inherited.
+       */
+      TBOX_ERROR(
+         d_object_name << ": No physical bc object in\n"
+         <<
+         "CellPoissonFACOps::initializeOperatorState\n"
+         << "You must use "
+         <<
+         "CellPoissonFACOps::setPhysicalBcCoefObject\n"
+         <<
+         "to set one before calling initializeOperatorState\n");
+   }
+
+   if (solution.getNumberOfComponents() != 1) {
+      TBOX_WARNING(d_object_name
+         << ": Solution vector has multiple components.\n"
+         << "Solver is for component 0 only.\n");
+   }
+   if (rhs.getNumberOfComponents() != 1) {
+      TBOX_WARNING(d_object_name
+         << ": RHS vector has multiple components.\n"
+         << "Solver is for component 0 only.\n");
+   }
+
+   /*
+    * Make sure that solution and rhs data
+    *   are of correct type
+    *   are allocated
+    *   has sufficient ghost width
+    */
+   tbox::Pointer<hier::Variable> var;
+   {
+      vdb->mapIndexToVariable(rhs.getComponentDescriptorIndex(0),
+         var);
+      if (!var) {
+         TBOX_ERROR(d_object_name << ": RHS component does not\n"
+                                  << "correspond to a variable.\n");
+      }
+      tbox::Pointer<pdat::CellVariable<double> > cell_var = var;
+      if (!cell_var) {
+         TBOX_ERROR(d_object_name
+            << ": RHS variable is not cell-centered double\n");
+      }
+   }
+   {
+      vdb->mapIndexToVariable(solution.getComponentDescriptorIndex(0),
+         var);
+      if (!var) {
+         TBOX_ERROR(d_object_name << ": Solution component does not\n"
+                                  << "correspond to a variable.\n");
+      }
+      tbox::Pointer<pdat::CellVariable<double> > cell_var = var;
+      if (!cell_var) {
+         TBOX_ERROR(d_object_name
+            << ": Solution variable is not cell-centered double\n");
+      }
+   }
+   for (ln = d_ln_min; ln <= d_ln_max; ++ln) {
+      tbox::Pointer<hier::PatchLevel> level_ptr =
+         d_hierarchy->getPatchLevel(ln);
+      hier::PatchLevel& level = *level_ptr;
+      for (hier::PatchLevel::Iterator pi(level); pi; pi++) {
+         hier::Patch& patch = **pi;
+         tbox::Pointer<hier::PatchData> fd =
+            patch.getPatchData(rhs.getComponentDescriptorIndex(0));
+         if (fd) {
+            /*
+             * Some data checks can only be done if the data already exists.
+             */
+            tbox::Pointer<pdat::CellData<double> > cd = fd;
+            if (!cd) {
+               TBOX_ERROR(d_object_name
+                  << ": RHS data is not cell-centered double\n");
+            }
+            if (cd->getDepth() > 1) {
+               TBOX_WARNING(d_object_name
+                  << ": RHS data has multiple depths.\n"
+                  << "Solver is for depth 0 only.\n");
+            }
+         }
+         tbox::Pointer<hier::PatchData> ud =
+            patch.getPatchData(solution.getComponentDescriptorIndex(0));
+         if (ud) {
+            /*
+             * Some data checks can only be done if the data already exists.
+             */
+            tbox::Pointer<pdat::CellData<double> > cd = ud;
+            if (!cd) {
+               TBOX_ERROR(d_object_name
+                  << ": Solution data is not cell-centered double\n");
+            }
+            if (cd->getDepth() > 1) {
+               TBOX_WARNING(d_object_name
+                  << ": Solution data has multiple depths.\n"
+                  << "Solver is for depth 0 only.\n");
+            }
+            if (cd->getGhostCellWidth() < hier::IntVector::getOne(d_dim)) {
+               TBOX_ERROR(d_object_name
+                  << ": Solution data has insufficient ghost width\n");
+            }
+         }
+      }
+   }
+
+   /*
+    * Solution and rhs must have some similar properties.
+    */
+   if (rhs.getPatchHierarchy() != d_hierarchy
+       || rhs.getCoarsestLevelNumber() != d_ln_min
+       || rhs.getFinestLevelNumber() != d_ln_max) {
+      TBOX_ERROR(d_object_name << ": solution and rhs do not have\n"
+                               << "the same set of patch levels.\n");
+   }
+
+#endif
+
+   /*
+    * Initialize the coarse-fine boundary description for the
+    * hierarchy.
+    */
+   d_cf_boundary.resizeArray(d_hierarchy->getNumberOfLevels());
+
+   hier::IntVector max_gcw(d_dim, 1);
+   for (ln = d_ln_min; ln <= d_ln_max; ++ln) {
+      d_cf_boundary[ln] = new hier::CoarseFineBoundary(*d_hierarchy,
+                                                       ln,
+                                                       max_gcw);
+   }
+#ifdef HAVE_HYPRE
+   if (d_coarse_solver_choice == "hypre") {
+      d_hypre_solver.initializeSolverState(d_hierarchy, d_ln_min);
+      /*
+       * Share the boundary condition object with the hypre solver
+       * to make sure that boundary condition settings are consistent
+       * between the two objects.
+       */
+      d_hypre_solver.setPhysicalBcCoefObject(d_physical_bc_coef);
+      d_hypre_solver.setMatrixCoefficients(d_poisson_spec);
+   }
+#endif
+
+   /*
+    * Get the transfer operators.
+    * Flux coarsening is conservative.
+    * Cell (solution, error, etc) coarsening is conservative.
+    * Cell refinement from same level is constant refinement.
+    * Cell refinement from coarser level is chosen by the
+    *   choice of coarse-fine discretization, d_cf_discretization,
+    *   which should be set to either "Ewing" or one of the
+    *   acceptable strings for looking up the refine operator.
+    */
+   tbox::Pointer<geom::CartesianGridGeometry> geometry =
+      d_hierarchy->getGridGeometry();
+   tbox::Pointer<hier::Variable> variable;
+
+   vdb->mapIndexToVariable(d_cell_scratch_id, variable);
+   d_prolongation_refine_operator =
+      geometry->lookupRefineOperator(variable,
+         d_prolongation_method);
+
+   vdb->mapIndexToVariable(d_cell_scratch_id, variable);
+   d_urestriction_coarsen_operator =
+      d_rrestriction_coarsen_operator =
+         geometry->lookupCoarsenOperator(variable,
+            "CONSERVATIVE_COARSEN");
+
+   vdb->mapIndexToVariable(d_oflux_scratch_id, variable);
+   d_flux_coarsen_operator =
+      geometry->lookupCoarsenOperator(variable,
+         "CONSERVATIVE_COARSEN");
+
+   vdb->mapIndexToVariable(d_cell_scratch_id, variable);
+   d_ghostfill_refine_operator =
+      geometry->lookupRefineOperator(variable,
+         d_cf_discretization == "Ewing" ?
+         "CONSTANT_REFINE" : d_cf_discretization);
+
+   vdb->mapIndexToVariable(d_cell_scratch_id, variable);
+   d_ghostfill_nocoarse_refine_operator =
+      geometry->lookupRefineOperator(variable,
+         "CONSTANT_REFINE");
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (!d_prolongation_refine_operator) {
+      TBOX_ERROR(d_object_name
+         << ": Cannot find prolongation refine operator");
+   }
+   if (!d_urestriction_coarsen_operator) {
+      TBOX_ERROR(d_object_name
+         << ": Cannot find restriction coarsening operator");
+   }
+   if (!d_rrestriction_coarsen_operator) {
+      TBOX_ERROR(d_object_name
+         << ": Cannot find restriction coarsening operator");
+   }
+   if (!d_flux_coarsen_operator) {
+      TBOX_ERROR(d_object_name
+         << ": Cannot find flux coarsening operator");
+   }
+   if (!d_ghostfill_refine_operator) {
+      TBOX_ERROR(d_object_name
+         << ": Cannot find ghost filling refinement operator");
+   }
+   if (!d_ghostfill_nocoarse_refine_operator) {
+      TBOX_ERROR(d_object_name
+         << ": Cannot find ghost filling refinement operator");
+   }
+#endif
+
+   for (ln = d_ln_min + 1; ln <= d_ln_max; ++ln) {
+      d_hierarchy->getPatchLevel(ln)->
+      allocatePatchData(d_oflux_scratch_id);
+   }
+
+   /*
+    * Make space for saving communication schedules.
+    * There is no need to delete the old schedules first
+    * because we have deallocated the solver state above.
+    */
+   d_prolongation_refine_schedules.resizeArray(d_ln_max + 1);
+   d_ghostfill_refine_schedules.resizeArray(d_ln_max + 1);
+   d_ghostfill_nocoarse_refine_schedules.resizeArray(d_ln_max + 1);
+   d_urestriction_coarsen_schedules.resizeArray(d_ln_max + 1);
+   d_rrestriction_coarsen_schedules.resizeArray(d_ln_max + 1);
+   d_flux_coarsen_schedules.resizeArray(d_ln_max + 1);
+
+   d_prolongation_refine_algorithm = new xfer::RefineAlgorithm(d_dim);
+   d_urestriction_coarsen_algorithm = new xfer::CoarsenAlgorithm(d_dim);
+   d_rrestriction_coarsen_algorithm = new xfer::CoarsenAlgorithm(d_dim);
+   d_flux_coarsen_algorithm = new xfer::CoarsenAlgorithm(d_dim);
+   d_ghostfill_refine_algorithm = new xfer::RefineAlgorithm(d_dim);
+   d_ghostfill_nocoarse_refine_algorithm = new xfer::RefineAlgorithm(d_dim);
+
+   d_prolongation_refine_algorithm->
+   registerRefine(d_cell_scratch_id,
+      solution.getComponentDescriptorIndex(0),
+      d_cell_scratch_id,
+      d_prolongation_refine_operator);
+   d_urestriction_coarsen_algorithm->
+   registerCoarsen(solution.getComponentDescriptorIndex(0),
+      solution.getComponentDescriptorIndex(0),
+      d_urestriction_coarsen_operator);
+   d_rrestriction_coarsen_algorithm->
+   registerCoarsen(rhs.getComponentDescriptorIndex(0),
+      rhs.getComponentDescriptorIndex(0),
+      d_rrestriction_coarsen_operator);
+   d_ghostfill_refine_algorithm->
+   registerRefine(solution.getComponentDescriptorIndex(0),
+      solution.getComponentDescriptorIndex(0),
+      solution.getComponentDescriptorIndex(0),
+      d_ghostfill_refine_operator);
+   d_flux_coarsen_algorithm->
+   registerCoarsen(((d_flux_id != -1) ? d_flux_id : d_flux_scratch_id),
+      d_oflux_scratch_id,
+      d_flux_coarsen_operator);
+   d_ghostfill_nocoarse_refine_algorithm->
+   registerRefine(solution.getComponentDescriptorIndex(0),
+      solution.getComponentDescriptorIndex(0),
+      solution.getComponentDescriptorIndex(0),
+      d_ghostfill_nocoarse_refine_operator);
+
+   for (int dest_ln = d_ln_min + 1; dest_ln <= d_ln_max; ++dest_ln) {
+
+      tbox::Pointer<xfer::PatchLevelFullFillPattern> fill_pattern(
+         new xfer::PatchLevelFullFillPattern());
+      d_prolongation_refine_schedules[dest_ln] =
+         d_prolongation_refine_algorithm->
+         createSchedule(fill_pattern,
+            d_hierarchy->getPatchLevel(dest_ln),
+            tbox::Pointer<hier::PatchLevel>(),
+            dest_ln - 1,
+            d_hierarchy,
+            &d_bc_helper);
+      if (!d_prolongation_refine_schedules[dest_ln]) {
+         TBOX_ERROR(d_object_name
+            << ": Cannot create a refine schedule for prolongation!\n");
+      }
+      d_ghostfill_refine_schedules[dest_ln] =
+         d_ghostfill_refine_algorithm->
+         createSchedule(d_hierarchy->getPatchLevel(dest_ln),
+            dest_ln - 1,
+            d_hierarchy,
+            &d_bc_helper);
+      if (!d_ghostfill_refine_schedules[dest_ln]) {
+         TBOX_ERROR(d_object_name
+            << ": Cannot create a refine schedule for ghost filling!\n");
+      }
+      d_ghostfill_nocoarse_refine_schedules[dest_ln] =
+         d_ghostfill_nocoarse_refine_algorithm->
+         createSchedule(d_hierarchy->getPatchLevel(dest_ln),
+            &d_bc_helper);
+      if (!d_ghostfill_nocoarse_refine_schedules[dest_ln]) {
+         TBOX_ERROR(
+            d_object_name
+            <<
+            ": Cannot create a refine schedule for ghost filling on bottom level!\n");
+      }
+   }
+   for (int dest_ln = d_ln_min; dest_ln < d_ln_max; ++dest_ln) {
+      d_urestriction_coarsen_schedules[dest_ln] =
+         d_urestriction_coarsen_algorithm->
+         createSchedule(d_hierarchy->getPatchLevel(dest_ln),
+            d_hierarchy->getPatchLevel(dest_ln + 1));
+      if (!d_urestriction_coarsen_schedules[dest_ln]) {
+         TBOX_ERROR(d_object_name
+            << ": Cannot create a coarsen schedule for U restriction!\n");
+      }
+      d_rrestriction_coarsen_schedules[dest_ln] =
+         d_rrestriction_coarsen_algorithm->
+         createSchedule(d_hierarchy->getPatchLevel(dest_ln),
+            d_hierarchy->getPatchLevel(dest_ln + 1));
+      if (!d_rrestriction_coarsen_schedules[dest_ln]) {
+         TBOX_ERROR(d_object_name
+            << ": Cannot create a coarsen schedule for R restriction!\n");
+      }
+      d_flux_coarsen_schedules[dest_ln] =
+         d_flux_coarsen_algorithm->
+         createSchedule(d_hierarchy->getPatchLevel(dest_ln),
+            d_hierarchy->getPatchLevel(dest_ln + 1));
+      if (!d_flux_coarsen_schedules[dest_ln]) {
+         TBOX_ERROR(d_object_name
+            << ": Cannot create a coarsen schedule for flux transfer!\n");
+      }
+   }
+   d_ghostfill_nocoarse_refine_schedules[d_ln_min] =
+      d_ghostfill_nocoarse_refine_algorithm->
+      createSchedule(d_hierarchy->getPatchLevel(d_ln_min),
+         &d_bc_helper);
+   if (!d_ghostfill_nocoarse_refine_schedules[d_ln_min]) {
+      TBOX_ERROR(
+         d_object_name
+         <<
+         ": Cannot create a refine schedule for ghost filling on bottom level!\n");
+   }
+}
+
+/*
+ ********************************************************************
+ * FACOperatorStrategy virtual deallocateOperatorState        *
+ * function.  Deallocate internal hierarchy-dependent data.         *
+ * State is allocated iff hierarchy is set.                         *
+ ********************************************************************
+ */
+
+void CellPoissonFACOps::deallocateOperatorState()
+{
+   if (d_hierarchy) {
+      int ln;
+      for (ln = d_ln_min + 1; ln <= d_ln_max; ++ln) {
+         d_hierarchy->getPatchLevel(ln)->
+         deallocatePatchData(d_oflux_scratch_id);
+      }
+      d_cf_boundary.resizeArray(0);
+#ifdef HAVE_HYPRE
+      d_hypre_solver.deallocateSolverState();
+#endif
+      d_hierarchy.setNull();
+      d_ln_min = -1;
+      d_ln_max = -1;
+
+      d_prolongation_refine_algorithm.setNull();
+      d_prolongation_refine_schedules.setNull();
+
+      d_urestriction_coarsen_algorithm.setNull();
+      d_urestriction_coarsen_schedules.setNull();
+
+      d_rrestriction_coarsen_algorithm.setNull();
+      d_rrestriction_coarsen_schedules.setNull();
+
+      d_flux_coarsen_algorithm.setNull();
+      d_flux_coarsen_schedules.setNull();
+
+      d_ghostfill_refine_algorithm.setNull();
+      d_ghostfill_refine_schedules.setNull();
+
+      d_ghostfill_nocoarse_refine_algorithm.setNull();
+      d_ghostfill_nocoarse_refine_schedules.setNull();
+
+   }
+}
+
+/*
+ ********************************************************************
+ * FACOperatorStrategy virtual postprocessOneCycle function.  *
+ ********************************************************************
+ */
+
+void CellPoissonFACOps::postprocessOneCycle(
+   int fac_cycle_num,
+   const SAMRAIVectorReal<double>& current_soln,
+   const SAMRAIVectorReal<double>& residual)
+{
+   NULL_USE(current_soln);
+   NULL_USE(residual);
+
+   if (d_enable_logging) {
+      if (d_preconditioner) {
+         /*
+          * Output convergence progress.  This is probably only appropriate
+          * if the solver is NOT being used as a preconditioner.
+          */
+         double avg_factor, final_factor;
+         d_preconditioner->getConvergenceFactors(avg_factor, final_factor);
+         tbox::plog
+         << "iter=" << std::setw(4) << fac_cycle_num
+         << " resid=" << d_preconditioner->getResidualNorm()
+         << " net conv=" << d_preconditioner->getNetConvergenceFactor()
+         << " final conv=" << d_preconditioner->getNetConvergenceFactor()
+         << " avg conv=" << d_preconditioner->getAvgConvergenceFactor()
+         << std::endl;
+      }
+   }
+}
+
+/*
+ ********************************************************************
+ * FACOperatorStrategy virtual restrictSolution function.     *
+ * After restricting solution, update ghost cells of the affected   *
+ * level.                                                           *
+ ********************************************************************
+ */
+
+void CellPoissonFACOps::restrictSolution(
+   const SAMRAIVectorReal<double>& s,
+   SAMRAIVectorReal<double>& d,
+   int dest_ln) {
+
+   t_restrict_solution->start();
+
+   xeqScheduleURestriction(d.getComponentDescriptorIndex(0),
+      s.getComponentDescriptorIndex(0),
+      dest_ln);
+
+   d_bc_helper.setHomogeneousBc(false);
+   d_bc_helper.setTargetDataId(d.getComponentDescriptorIndex(0));
+
+   if (dest_ln == d_ln_min) {
+      xeqScheduleGhostFillNoCoarse(d.getComponentDescriptorIndex(0),
+         dest_ln);
+   } else {
+      xeqScheduleGhostFill(d.getComponentDescriptorIndex(0),
+         dest_ln);
+   }
+
+   t_restrict_solution->stop();
+}
+
+/*
+ ********************************************************************
+ * FACOperatorStrategy virtual restrictresidual function.     *
+ ********************************************************************
+ */
+
+void CellPoissonFACOps::restrictResidual(
+   const SAMRAIVectorReal<double>& s,
+   SAMRAIVectorReal<double>& d,
+   int dest_ln) {
+
+   t_restrict_residual->start();
+
+   xeqScheduleRRestriction(d.getComponentDescriptorIndex(0),
+      s.getComponentDescriptorIndex(0),
+      dest_ln);
+
+   t_restrict_residual->stop();
+}
+
+/*
+ ***********************************************************************
+ * FACOperatorStrategy virtual prolongErrorAndCorrect function.  *
+ * After the prolongation, we set the physical boundary condition      *
+ * for the correction, which is zero.  Other ghost cell values,        *
+ * which are preset to zero, need not be set.                          *
+ ***********************************************************************
+ */
+
+void CellPoissonFACOps::prolongErrorAndCorrect(
+   const SAMRAIVectorReal<double>& s,
+   SAMRAIVectorReal<double>& d,
+   int dest_ln) {
+
+   t_prolong->start();
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (s.getPatchHierarchy() != d_hierarchy
+       || d.getPatchHierarchy() != d_hierarchy) {
+      TBOX_ERROR(d_object_name << ": Vector hierarchy does not match\n"
+         "internal state hierarchy.");
+   }
+#endif
+
+   tbox::Pointer<hier::PatchLevel> coarse_level =
+      d_hierarchy->getPatchLevel(dest_ln - 1);
+   tbox::Pointer<hier::PatchLevel> fine_level =
+      d_hierarchy->getPatchLevel(dest_ln);
+
+   /*
+    * Data is prolonged into the scratch space corresponding
+    * to index d_cell_scratch_id and allocated here.
+    */
+   fine_level->allocatePatchData(d_cell_scratch_id);
+
+   /*
+    * Refine solution into scratch space to fill the fine level
+    * interior in the scratch space, then use that refined data
+    * to correct the fine level error.
+    */
+   d_bc_helper.setTargetDataId(d_cell_scratch_id);
+   d_bc_helper.setHomogeneousBc(true);
+   const int src_index = s.getComponentDescriptorIndex(0);
+   xeqScheduleProlongation(d_cell_scratch_id,
+      src_index,
+      d_cell_scratch_id,
+      dest_ln);
+
+   /*
+    * Add the refined error in the scratch space
+    * to the error currently residing in the destination level.
+    */
+   math::HierarchyCellDataOpsReal<double>
+   hierarchy_math_ops(d_hierarchy, dest_ln, dest_ln);
+   const int dst_index = d.getComponentDescriptorIndex(0);
+   hierarchy_math_ops.add(dst_index, dst_index, d_cell_scratch_id);
+
+   fine_level->deallocatePatchData(d_cell_scratch_id);
+
+   t_prolong->stop();
+
+}
+
+/*
+ ********************************************************************
+ ********************************************************************
+ */
+
+void CellPoissonFACOps::smoothError(
+   SAMRAIVectorReal<double>& data,
+   const SAMRAIVectorReal<double>& residual,
+   int ln,
+   int num_sweeps)
+{
+
+   t_smooth_error->start();
+
+   checkInputPatchDataIndices();
+   if (d_smoothing_choice == "redblack") {
+      smoothErrorByRedBlack(data,
+         residual,
+         ln,
+         num_sweeps,
+         d_residual_tolerance_during_smoothing);
+   } else {
+      TBOX_ERROR(d_object_name << ": Bad smoothing choice '"
+                               << d_smoothing_choice
+                               << "' in CellPoissonFACOps.");
+   }
+
+   t_smooth_error->stop();
+}
+
+/*
+ ********************************************************************
+ * Workhorse function to smooth error using red-black               *
+ * Gauss-Seidel iterations.                                         *
+ ********************************************************************
+ */
+
+void CellPoissonFACOps::smoothErrorByRedBlack(
+   SAMRAIVectorReal<double>& data,
+   const SAMRAIVectorReal<double>& residual,
+   int ln,
+   int num_sweeps,
+   double residual_tolerance)
+{
+
+   checkInputPatchDataIndices();
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (data.getPatchHierarchy() != d_hierarchy
+       || residual.getPatchHierarchy() != d_hierarchy) {
+      TBOX_ERROR(d_object_name << ": Vector hierarchy does not match\n"
+         "internal hierarchy.");
+   }
+#endif
+   tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+
+   const int data_id = data.getComponentDescriptorIndex(0);
+
+   const int flux_id = (d_flux_id != -1) ? d_flux_id : d_flux_scratch_id;
+
+   d_bc_helper.setTargetDataId(data_id);
+   d_bc_helper.setHomogeneousBc(true);
+   xeqScheduleGhostFillNoCoarse(data_id, ln);
+
+   if (ln > d_ln_min) {
+      /*
+       * Perform a one-time transfer of data from coarser level,
+       * to fill ghost boundaries that will not change through
+       * the smoothing loop.
+       */
+      xeqScheduleGhostFill(data_id, ln);
+   }
+
+   /*
+    * Smooth the number of sweeps specified or until
+    * the convergence is satisfactory.
+    */
+   int isweep;
+   double red_maxres, blk_maxres, maxres = 0;
+   red_maxres = blk_maxres = residual_tolerance + 1;
+   /*
+    * Instead of checking residual convergence globally,
+    * we check the not_converged flag.  This avoids possible
+    * round-off errors affecting different processes differently,
+    * leading to disagreement on whether to continue smoothing.
+    */
+   int not_converged = 1;
+   for (isweep = 0; isweep < num_sweeps && not_converged; ++isweep) {
+      red_maxres = blk_maxres = 0;
+
+      // Red sweep.
+      xeqScheduleGhostFillNoCoarse(data_id, ln);
+      for (hier::PatchLevel::Iterator pi(*level); pi; pi++) {
+         tbox::Pointer<hier::Patch> patch = *pi;
+
+         bool deallocate_flux_data_when_done = false;
+         if (flux_id == d_flux_scratch_id) {
+            /*
+             * Using internal temporary storage for flux.
+             * For each patch, make sure the internal
+             * side-centered data is allocated and note
+             * whether that data should be deallocated when done.
+             */
+            if (!patch->checkAllocated(flux_id)) {
+               patch->allocatePatchData(flux_id);
+               deallocate_flux_data_when_done = true;
+            }
+         }
+
+         tbox::Pointer<pdat::CellData<double> >
+         scalar_field_data = d_poisson_spec.cIsVariable() ?
+            patch->getPatchData(d_poisson_spec.getCPatchDataId()) :
+            tbox::Pointer<hier::PatchData>(NULL);
+         tbox::Pointer<pdat::CellData<double> >
+         err_data = data.getComponentPatchData(0, *patch);
+         tbox::Pointer<pdat::CellData<double> >
+         residual_data = residual.getComponentPatchData(0, *patch);
+         tbox::Pointer<pdat::SideData<double> >
+         flux_data = patch->getPatchData(flux_id);
+
+         computeFluxOnPatch(
+            *patch,
+            level->getRatioToCoarserLevel(),
+            *err_data,
+            *flux_data);
+
+         redOrBlackSmoothingOnPatch(*patch,
+            *flux_data,
+            *residual_data,
+            *err_data,
+            'r',
+            &red_maxres);
+
+         if (deallocate_flux_data_when_done) {
+            patch->deallocatePatchData(flux_id);
+         }
+      }        // End patch number *pi
+      xeqScheduleGhostFillNoCoarse(data_id, ln);
+
+      // Black sweep.
+      for (hier::PatchLevel::Iterator pi(*level); pi; pi++) {
+         tbox::Pointer<hier::Patch> patch = *pi;
+
+         bool deallocate_flux_data_when_done = false;
+         if (flux_id == d_flux_scratch_id) {
+            /*
+             * Using internal temporary storage for flux.
+             * For each patch, make sure the internal
+             * side-centered data is allocated and note
+             * whether that data should be deallocated when done.
+             */
+            if (!patch->checkAllocated(flux_id)) {
+               patch->allocatePatchData(flux_id);
+               deallocate_flux_data_when_done = true;
+            }
+         }
+
+         tbox::Pointer<pdat::CellData<double> >
+         scalar_field_data = d_poisson_spec.cIsVariable() ?
+            patch->getPatchData(d_poisson_spec.getCPatchDataId()) :
+            tbox::Pointer<hier::PatchData>(NULL);
+         tbox::Pointer<pdat::CellData<double> >
+         err_data = data.getComponentPatchData(0, *patch);
+         tbox::Pointer<pdat::CellData<double> >
+         residual_data = residual.getComponentPatchData(0, *patch);
+         tbox::Pointer<pdat::SideData<double> >
+         flux_data = patch->getPatchData(flux_id);
+
+         computeFluxOnPatch(
+            *patch,
+            level->getRatioToCoarserLevel(),
+            *err_data,
+            *flux_data);
+
+         redOrBlackSmoothingOnPatch(*patch,
+            *flux_data,
+            *residual_data,
+            *err_data,
+            'b',
+            &blk_maxres);
+
+         if (deallocate_flux_data_when_done) {
+            patch->deallocatePatchData(flux_id);
+         }
+      }        // End patch number *pi
+      xeqScheduleGhostFillNoCoarse(data_id, ln);
+      if (residual_tolerance >= 0.0) {
+         /*
+          * Check for early end of sweeps due to convergence
+          * only if it is numerically possible (user gave a
+          * non negative value for residual tolerance).
+          */
+         maxres = tbox::MathUtilities<double>::Max(red_maxres, blk_maxres);
+         not_converged = maxres > residual_tolerance;
+         const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+         if (mpi.getSize() > 1) {
+            mpi.AllReduce(&not_converged, 1, MPI_MAX);
+         }
+      }
+   }        // End sweep number isweep
+   if (d_enable_logging) tbox::plog
+      << d_object_name << " RBGS smoothing maxres = " << maxres << "\n"
+      << "  after " << isweep << " sweeps.\n";
+
+}
+
+/*
+ ********************************************************************
+ * Fix flux on coarse-fine boundaries computed from a               *
+ * constant-refine interpolation of coarse level data.              *
+ ********************************************************************
+ */
+
+void CellPoissonFACOps::ewingFixFlux(
+   const hier::Patch& patch,
+   const pdat::CellData<double>& soln_data,
+   pdat::SideData<double>& flux_data,
+   const hier::IntVector& ratio_to_coarser) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(d_dim, patch, soln_data, flux_data,
+      ratio_to_coarser);
+
+   const int patch_ln = patch.getPatchLevelNumber();
+   const hier::GlobalId id = patch.getGlobalId();
+   tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+   const hier::Box& patch_box(patch.getBox());
+   const hier::Index& plower = patch_box.lower();
+   const hier::Index& pupper = patch_box.upper();
+
+   const tbox::Array<hier::BoundaryBox>& bboxes =
+      d_cf_boundary[patch_ln]->getBoundaries(id, 1);
+   int bn, nboxes = bboxes.getSize();
+
+   if (d_poisson_spec.dIsVariable()) {
+
+      tbox::Pointer<pdat::SideData<double> > diffcoef_data;
+      diffcoef_data = patch.getPatchData(d_poisson_spec.getDPatchDataId());
+
+      for (bn = 0; bn < nboxes; ++bn) {
+         const hier::BoundaryBox& boundary_box = bboxes[bn];
+
+         TBOX_ASSERT(boundary_box.getBoundaryType() == 1);
+
+         const hier::Box& bdry_box = boundary_box.getBox();
+         const hier::Index& blower = bdry_box.lower();
+         const hier::Index& bupper = bdry_box.upper();
+         const int location_index = boundary_box.getLocationIndex();
+         if (d_dim == tbox::Dimension(2)) {
+            F77_FUNC(ewingfixfluxvardc2d, EWINGFIXFLUXVARDC2D) (
+               flux_data.getPointer(0), flux_data.getPointer(1),
+               &flux_data.getGhostCellWidth()[0],
+               &flux_data.getGhostCellWidth()[1],
+               diffcoef_data->getPointer(0), diffcoef_data->getPointer(1),
+               &diffcoef_data->getGhostCellWidth()[0],
+               &diffcoef_data->getGhostCellWidth()[1],
+               soln_data.getPointer(),
+               &soln_data.getGhostCellWidth()[0],
+               &soln_data.getGhostCellWidth()[1],
+               &plower[0], &pupper[0], &plower[1], &pupper[1],
+               &location_index,
+               &ratio_to_coarser[0],
+               &blower[0], &bupper[0],
+               dx);
+         } else if (d_dim == tbox::Dimension(3)) {
+            F77_FUNC(ewingfixfluxvardc3d, EWINGFIXFLUXVARDC3D) (
+               flux_data.getPointer(0),
+               flux_data.getPointer(1),
+               flux_data.getPointer(2),
+               &flux_data.getGhostCellWidth()[0],
+               &flux_data.getGhostCellWidth()[1],
+               &flux_data.getGhostCellWidth()[2],
+               diffcoef_data->getPointer(0),
+               diffcoef_data->getPointer(1),
+               diffcoef_data->getPointer(2),
+               &diffcoef_data->getGhostCellWidth()[0],
+               &diffcoef_data->getGhostCellWidth()[1],
+               &diffcoef_data->getGhostCellWidth()[2],
+               soln_data.getPointer(),
+               &soln_data.getGhostCellWidth()[0],
+               &soln_data.getGhostCellWidth()[1],
+               &soln_data.getGhostCellWidth()[2],
+               &plower[0], &pupper[0],
+               &plower[1], &pupper[1],
+               &plower[2], &pupper[2],
+               &location_index,
+               &ratio_to_coarser[0],
+               &blower[0], &bupper[0],
+               dx);
+         } else {
+            TBOX_ERROR("CellPoissonFACOps : DIM > 3 not supported" << std::endl);
+         }
+
+      }
+   } else {
+
+      const double diffcoef_constant = d_poisson_spec.getDConstant();
+
+      for (bn = 0; bn < nboxes; ++bn) {
+         const hier::BoundaryBox& boundary_box = bboxes[bn];
+
+         TBOX_ASSERT(boundary_box.getBoundaryType() == 1);
+
+         const hier::Box& bdry_box = boundary_box.getBox();
+         const hier::Index& blower = bdry_box.lower();
+         const hier::Index& bupper = bdry_box.upper();
+         const int location_index = boundary_box.getLocationIndex();
+         if (d_dim == tbox::Dimension(2)) {
+            F77_FUNC(ewingfixfluxcondc2d, EWINGFIXFLUXCONDC2D) (
+               flux_data.getPointer(0), flux_data.getPointer(1),
+               &flux_data.getGhostCellWidth()[0],
+               &flux_data.getGhostCellWidth()[1],
+               diffcoef_constant,
+               soln_data.getPointer(),
+               &soln_data.getGhostCellWidth()[0],
+               &soln_data.getGhostCellWidth()[1],
+               &plower[0], &pupper[0],
+               &plower[1], &pupper[1],
+               &location_index,
+               &ratio_to_coarser[0],
+               &blower[0], &bupper[0],
+               dx);
+         } else if (d_dim == tbox::Dimension(3)) {
+            F77_FUNC(ewingfixfluxcondc3d, EWINGFIXFLUXCONDC3D) (
+               flux_data.getPointer(0),
+               flux_data.getPointer(1),
+               flux_data.getPointer(2),
+               &flux_data.getGhostCellWidth()[0],
+               &flux_data.getGhostCellWidth()[1],
+               &flux_data.getGhostCellWidth()[2],
+               diffcoef_constant,
+               soln_data.getPointer(),
+               &soln_data.getGhostCellWidth()[0],
+               &soln_data.getGhostCellWidth()[1],
+               &soln_data.getGhostCellWidth()[2],
+               &plower[0], &pupper[0],
+               &plower[1], &pupper[1],
+               &plower[2], &pupper[2],
+               &location_index,
+               &ratio_to_coarser[0],
+               &blower[0], &bupper[0],
+               dx);
+         }
+      }
+   }
+}
+
+/*
+ ********************************************************************
+ * FACOperatorStrategy virtual solveCoarsestLevel             *
+ * function                                                         *
+ ********************************************************************
+ */
+
+int CellPoissonFACOps::solveCoarsestLevel(
+   SAMRAIVectorReal<double>& data,
+   const SAMRAIVectorReal<double>& residual,
+   int coarsest_ln) {
+
+   t_solve_coarsest->start();
+
+   checkInputPatchDataIndices();
+
+   int return_value = 0;
+
+   if (d_coarse_solver_choice == "jacobi") {
+      d_residual_tolerance_during_smoothing = d_coarse_solver_tolerance;
+      smoothError(data,
+         residual,
+         coarsest_ln,
+         d_coarse_solver_max_iterations);
+      d_residual_tolerance_during_smoothing = -1.0;
+   } else if (d_coarse_solver_choice == "redblack") {
+      d_residual_tolerance_during_smoothing = d_coarse_solver_tolerance;
+      smoothError(data,
+         residual,
+         coarsest_ln,
+         d_coarse_solver_max_iterations);
+      d_residual_tolerance_during_smoothing = -1.0;
+   } else if (d_coarse_solver_choice == "hypre") {
+#ifndef HAVE_HYPRE
+      TBOX_ERROR(d_object_name << ": Coarse level solver choice '"
+                               << d_coarse_solver_choice
+                               << "' unavailable in "
+                               << "scapCellPoissonOps::solveCoarsestLevel.");
+#else
+      return_value = solveCoarsestLevel_HYPRE(data, residual, coarsest_ln);
+#endif
+   } else {
+      TBOX_ERROR(
+         d_object_name << ": Bad coarse level solver choice '"
+         << d_coarse_solver_choice
+         <<
+         "' in scapCellPoissonOps::solveCoarsestLevel.");
+   }
+
+   xeqScheduleGhostFillNoCoarse(data.getComponentDescriptorIndex(0),
+      coarsest_ln);
+
+   t_solve_coarsest->stop();
+
+   return return_value;
+}
+
+#ifdef HAVE_HYPRE
+/*
+ ********************************************************************
+ * Solve coarsest level using Hypre                                 *
+ * We only solve for the error, so we always use homogeneous bc.    *
+ ********************************************************************
+ */
+
+int CellPoissonFACOps::solveCoarsestLevel_HYPRE(
+   SAMRAIVectorReal<double>& data,
+   const SAMRAIVectorReal<double>& residual,
+   int coarsest_ln) {
+
+   NULL_USE(coarsest_ln);
+
+#ifndef HAVE_HYPRE
+   TBOX_ERROR(d_object_name << ": Coarse level solver choice '"
+                            << d_coarse_solver_choice
+                            << "' unavailable in "
+                            << "CellPoissonFACOps::solveCoarsestLevel.");
+
+   return 0;
+
+#else
+
+   checkInputPatchDataIndices();
+   d_hypre_solver.setStoppingCriteria(d_coarse_solver_max_iterations,
+      d_coarse_solver_tolerance);
+   const int solver_ret =
+      d_hypre_solver.solveSystem(
+         data.getComponentDescriptorIndex(0),
+         residual.getComponentDescriptorIndex(0),
+         true);
+   /*
+    * Present data on the solve.
+    * The Hypre solver returns 0 if converged.
+    */
+   if (d_enable_logging) tbox::plog
+      << d_object_name << " Hypre solve " << (solver_ret ? "" : "NOT ")
+      << "converged\n"
+      << "\titerations: " << d_hypre_solver.getNumberOfIterations() << "\n"
+      << "\tresidual: " << d_hypre_solver.getRelativeResidualNorm() << "\n";
+
+   return !solver_ret;
+
+#endif
+
+}
+#endif
+
+/*
+ ********************************************************************
+ * FACOperatorStrategy virtual                                *
+ * computeCompositeResidualOnLevel function                         *
+ ********************************************************************
+ */
+
+void CellPoissonFACOps::computeCompositeResidualOnLevel(
+   SAMRAIVectorReal<double>& residual,
+   const SAMRAIVectorReal<double>& solution,
+   const SAMRAIVectorReal<double>& rhs,
+   int ln,
+   bool error_equation_indicator) {
+
+   t_compute_composite_residual->start();
+
+   checkInputPatchDataIndices();
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (residual.getPatchHierarchy() != d_hierarchy
+       || solution.getPatchHierarchy() != d_hierarchy
+       || rhs.getPatchHierarchy() != d_hierarchy) {
+      TBOX_ERROR(d_object_name << ": Vector hierarchy does not match\n"
+         "internal hierarchy.");
+   }
+#endif
+   tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+
+   /*
+    * Set up the bc helper so that when we use a refine schedule
+    * to fill ghosts, the correct data is operated on.
+    */
+   const int soln_id = solution.getComponentDescriptorIndex(0);
+   d_bc_helper.setTargetDataId(soln_id);
+   d_bc_helper.setHomogeneousBc(error_equation_indicator);
+
+   const int flux_id = (d_flux_id != -1) ? d_flux_id : d_flux_scratch_id;
+
+   /*
+    * Assumptions:
+    * 1. Data does not yet exist in ghost boundaries.
+    * 2. Residual data on next finer grid (if any)
+    *    has been computed already.
+    * 3. Flux data from next finer grid (if any) has
+    *    been computed but has not been coarsened to
+    *    this level.
+    *
+    * Steps:
+    * S1. Fill solution ghost data by refinement
+    *     or setting physical boundary conditions.
+    *     This also brings in information from coarser
+    *     to form the composite grid flux.
+    * S2. Compute flux on ln.
+    * S3. If next finer is available,
+    *     Coarsen flux data on next finer level,
+    *     overwriting flux computed from coarse data.
+    * S4. Compute residual data from flux.
+    */
+
+   /* S1. Fill solution ghost data. */
+   {
+      tbox::Pointer<xfer::RefineSchedule> ln_refine_schedule;
+      if (ln > d_ln_min) {
+         /* Fill from current, next coarser level and physical boundary */
+         xeqScheduleGhostFill(soln_id, ln);
+      } else {
+         /* Fill from current and physical boundary */
+         xeqScheduleGhostFillNoCoarse(soln_id, ln);
+      }
+   }
+
+   /*
+    * For the whole level, make sure the internal
+    * side-centered data is allocated and note
+    * whether that data should be deallocated when done.
+    * We do this for the whole level because the data
+    * undergoes transfer operations which require the
+    * whole level data.
+    */
+   bool deallocate_flux_data_when_done = false;
+   if (flux_id == d_flux_scratch_id) {
+      if (!level->checkAllocated(flux_id)) {
+         level->allocatePatchData(flux_id);
+         deallocate_flux_data_when_done = true;
+      }
+   }
+
+   /*
+    * S2. Compute flux on patches in level.
+    */
+   for (hier::PatchLevel::Iterator pi(*level); pi; pi++) {
+      tbox::Pointer<hier::Patch> patch = *pi;
+
+      tbox::Pointer<pdat::CellData<double> >
+      soln_data = solution.getComponentPatchData(0, *patch);
+      tbox::Pointer<pdat::CellData<double> >
+      rhs_data = rhs.getComponentPatchData(0, *patch);
+      tbox::Pointer<pdat::CellData<double> >
+      residual_data = residual.getComponentPatchData(0, *patch);
+      tbox::Pointer<pdat::SideData<double> >
+      flux_data = patch->getPatchData(flux_id);
+      computeFluxOnPatch(
+         *patch,
+         level->getRatioToCoarserLevel(),
+         *soln_data,
+         *flux_data);
+
+   }
+
+   /*
+    * S3. Coarsen oflux data from next finer level so that
+    * the computed flux becomes the composite grid flux.
+    */
+   if (ln < d_ln_max) {
+      xeqScheduleFluxCoarsen(flux_id, d_oflux_scratch_id, ln);
+   }
+
+   /*
+    * S4. Compute residual on patches in level.
+    */
+   for (hier::PatchLevel::Iterator pi(*level); pi; pi++) {
+      tbox::Pointer<hier::Patch> patch = *pi;
+      tbox::Pointer<pdat::CellData<double> >
+      soln_data = solution.getComponentPatchData(0, *patch);
+      tbox::Pointer<pdat::CellData<double> >
+      rhs_data = rhs.getComponentPatchData(0, *patch);
+      tbox::Pointer<pdat::CellData<double> >
+      residual_data = residual.getComponentPatchData(0, *patch);
+      tbox::Pointer<pdat::SideData<double> >
+      flux_data = patch->getPatchData(flux_id);
+      computeResidualOnPatch(*patch,
+         *flux_data,
+         *soln_data,
+         *rhs_data,
+         *residual_data);
+
+      if (ln > d_ln_min) {
+         /*
+          * Save outerflux data so that next coarser level
+          *  can compute its coarse-fine composite flux.
+          *  This is not strictly needed in this "compute residual"
+          *  loop through the patches, but we put it here to
+          *  avoid writing another loop for it.
+          */
+         tbox::Pointer<pdat::OutersideData<double> >
+         oflux_data = patch->getPatchData(d_oflux_scratch_id);
+
+         TBOX_ASSERT(oflux_data);
+
+         oflux_data->copy(*flux_data);
+      }
+   }
+
+   if (deallocate_flux_data_when_done) {
+      level->deallocatePatchData(flux_id);
+   }
+
+   t_compute_composite_residual->stop();
+}
+
+/*
+ ********************************************************************
+ * FACOperatorStrategy virtual computeResidualNorm             *
+ * function                                                         *
+ ********************************************************************
+ */
+
+double CellPoissonFACOps::computeResidualNorm(
+   const SAMRAIVectorReal<double>& residual,
+   int fine_ln,
+   int coarse_ln)
+{
+
+   if (coarse_ln != residual.getCoarsestLevelNumber() ||
+       fine_ln != residual.getFinestLevelNumber()) {
+      TBOX_ERROR("CellPoissonFACOps::computeResidualNorm() is not\n"
+         << "set up to compute residual except on the range of\n"
+         << "levels defining the vector.\n");
+   }
+   t_compute_residual_norm->start();
+   /*
+    * The residual vector was cloned from vectors that has
+    * the proper weights associated with them, so we do not
+    * have to explicitly weight the residuals.
+    *
+    * maxNorm: not good to use because Hypre's norm does not
+    *   correspond to it.  Also maybe too sensitive to spikes.
+    * L2Norm: maybe good.  But does not correspond to the
+    *   scale of the quantity.
+    * L1Norm: maybe good.  Correspond to scale of quantity,
+    *   but may be too insensitive to spikes.
+    * RMSNorm: maybe good.
+    */
+   double norm = residual.RMSNorm();
+   t_compute_residual_norm->stop();
+   return norm;
+}
+
+/*
+ ********************************************************************
+ * Compute the vector weight and put it at a specified patch data   *
+ * index.                                                           *
+ ********************************************************************
+ */
+
+void CellPoissonFACOps::computeVectorWeights(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int weight_id,
+   int coarsest_ln,
+   int finest_ln) const
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *hierarchy);
+
+   if (coarsest_ln == -1) coarsest_ln = 0;
+   if (finest_ln == -1) finest_ln = hierarchy->getFinestLevelNumber();
+   if (finest_ln < coarsest_ln) {
+      TBOX_ERROR(d_object_name
+         << ": Illegal level number range.  finest_ln < coarsest_ln.");
+   }
+
+   int ln;
+   for (ln = finest_ln; ln >= coarsest_ln; --ln) {
+
+      /*
+       * On every level, first assign cell volume to vector weight.
+       */
+
+      tbox::Pointer<hier::PatchLevel> level =
+         hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator p(level); p; p++) {
+         tbox::Pointer<hier::Patch> patch = *p;
+         tbox::Pointer<geom::CartesianPatchGeometry> patch_geometry =
+            patch->getPatchGeometry();
+         const double* dx = patch_geometry->getDx();
+         double cell_vol = dx[0];
+         if (d_dim > tbox::Dimension(1)) {
+            cell_vol *= dx[1];
+         }
+
+         if (d_dim > tbox::Dimension(2)) {
+            cell_vol *= dx[2];
+         }
+
+         tbox::Pointer<pdat::CellData<double> > w =
+            patch->getPatchData(weight_id);
+         if (!w) {
+            TBOX_ERROR(d_object_name
+               << ": weight id must refer to a pdat::CellVariable");
+         }
+         w->fillAll(cell_vol);
+      }
+
+      /*
+       * On all but the finest level, assign 0 to vector
+       * weight to cells covered by finer cells.
+       */
+
+      if (ln < finest_ln) {
+
+         /*
+          * First get the boxes that describe index space of the next finer
+          * level and coarsen them to describe corresponding index space
+          * at this level.
+          */
+
+         tbox::Pointer<hier::PatchLevel> next_finer_level =
+            hierarchy->getPatchLevel(ln + 1);
+         hier::BoxArray coarsened_boxes = next_finer_level->getBoxes();
+         hier::IntVector coarsen_ratio(next_finer_level->getRatioToLevelZero());
+         coarsen_ratio /= level->getRatioToLevelZero();
+         coarsened_boxes.coarsen(coarsen_ratio);
+
+         /*
+          * Then set vector weight to 0 wherever there is
+          * a nonempty intersection with the next finer level.
+          * Note that all assignments are local.
+          */
+
+         for (hier::PatchLevel::Iterator p(level); p; p++) {
+
+            tbox::Pointer<hier::Patch> patch = *p;
+            for (int i = 0; i < coarsened_boxes.getNumberOfBoxes(); i++) {
+
+               hier::Box coarse_box = coarsened_boxes[i];
+               hier::Box intersection = coarse_box * (patch->getBox());
+               if (!intersection.empty()) {
+                  tbox::Pointer<pdat::CellData<double> > w =
+                     patch->getPatchData(weight_id);
+                  w->fillAll(0.0, intersection);
+
+               }  // assignment only in non-empty intersection
+            }  // loop over coarsened boxes from finer level
+         }  // loop over patches in level
+      }  // all levels except finest
+   }  // loop over levels
+}
+
+/*
+ ********************************************************************
+ * Check the validity and correctness of input data for this class. *
+ ********************************************************************
+ */
+
+void CellPoissonFACOps::checkInputPatchDataIndices() const {
+   /*
+    * Check input validity and correctness.
+    */
+   hier::VariableDatabase& vdb(*hier::VariableDatabase::getDatabase());
+
+   if (!d_poisson_spec.dIsConstant()
+       && d_poisson_spec.getDPatchDataId() != -1) {
+      tbox::Pointer<hier::Variable> var;
+      vdb.mapIndexToVariable(d_poisson_spec.getDPatchDataId(), var);
+      tbox::Pointer<pdat::SideVariable<double> > diffcoef_var = var;
+      if (!diffcoef_var) {
+         TBOX_ERROR(d_object_name
+            << ": Bad diffusion coefficient patch data index.");
+      }
+   }
+
+   if (!d_poisson_spec.cIsConstant() && !d_poisson_spec.cIsZero()) {
+      tbox::Pointer<hier::Variable> var;
+      vdb.mapIndexToVariable(d_poisson_spec.getCPatchDataId(), var);
+      tbox::Pointer<pdat::CellVariable<double> > scalar_field_var = var;
+      if (!scalar_field_var) {
+         TBOX_ERROR(d_object_name << ": Bad linear term patch data index.");
+      }
+   }
+
+   if (d_flux_id != -1) {
+      tbox::Pointer<hier::Variable> var;
+      vdb.mapIndexToVariable(d_flux_id, var);
+      tbox::Pointer<pdat::SideVariable<double> > flux_var = var;
+
+      TBOX_ASSERT(flux_var);
+   }
+
+}
+
+/*
+ *******************************************************************
+ *                                                                 *
+ * AMR-unaware patch-centered computational kernels.               *
+ *                                                                 *
+ *******************************************************************
+ */
+
+void CellPoissonFACOps::computeFluxOnPatch(
+   const hier::Patch& patch,
+   const hier::IntVector& ratio_to_coarser_level,
+   const pdat::CellData<double>& w_data,
+   pdat::SideData<double>& Dgradw_data) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(d_dim, patch, ratio_to_coarser_level, w_data,
+      Dgradw_data);
+   TBOX_ASSERT(patch.inHierarchy());
+   TBOX_ASSERT(w_data.getGhostCellWidth() >=
+      hier::IntVector::getOne(ratio_to_coarser_level.getDim()));
+
+   tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const hier::Box& box = patch.getBox();
+   const int* lower = &box.lower()[0];
+   const int* upper = &box.upper()[0];
+   const double* dx = patch_geom->getDx();
+
+   double D_value;
+   tbox::Pointer<pdat::SideData<double> > D_data;
+   if (d_poisson_spec.dIsConstant()) {
+      D_value = d_poisson_spec.getDConstant();
+   } else {
+      D_data = patch.getPatchData(d_poisson_spec.getDPatchDataId());
+   }
+
+   if (d_poisson_spec.dIsConstant()) {
+      if (d_dim == tbox::Dimension(2)) {
+         F77_FUNC(compfluxcondc2d, COMPFLUXCONDC2D) (
+            Dgradw_data.getPointer(0),
+            Dgradw_data.getPointer(1),
+            &Dgradw_data.getGhostCellWidth()[0],
+            &Dgradw_data.getGhostCellWidth()[1],
+            D_value,
+            w_data.getPointer(),
+            &w_data.getGhostCellWidth()[0],
+            &w_data.getGhostCellWidth()[1],
+            &lower[0], &upper[0],
+            &lower[1], &upper[1],
+            dx);
+      } else if (d_dim == tbox::Dimension(3)) {
+         F77_FUNC(compfluxcondc3d, COMPFLUXCONDC3D) (
+            Dgradw_data.getPointer(0),
+            Dgradw_data.getPointer(1),
+            Dgradw_data.getPointer(2),
+            &Dgradw_data.getGhostCellWidth()[0],
+            &Dgradw_data.getGhostCellWidth()[1],
+            &Dgradw_data.getGhostCellWidth()[2],
+            D_value,
+            w_data.getPointer(),
+            &w_data.getGhostCellWidth()[0],
+            &w_data.getGhostCellWidth()[1],
+            &w_data.getGhostCellWidth()[2],
+            &lower[0], &upper[0],
+            &lower[1], &upper[1],
+            &lower[2], &upper[2],
+            dx);
+      }
+   } else {
+      if (d_dim == tbox::Dimension(2)) {
+         F77_FUNC(compfluxvardc2d, COMPFLUXVARDC2D) (
+            Dgradw_data.getPointer(0),
+            Dgradw_data.getPointer(1),
+            &Dgradw_data.getGhostCellWidth()[0],
+            &Dgradw_data.getGhostCellWidth()[1],
+            D_data->getPointer(0),
+            D_data->getPointer(1),
+            &D_data->getGhostCellWidth()[0],
+            &D_data->getGhostCellWidth()[1],
+            w_data.getPointer(),
+            &w_data.getGhostCellWidth()[0],
+            &w_data.getGhostCellWidth()[1],
+            &lower[0], &upper[0],
+            &lower[1], &upper[1],
+            dx);
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         F77_FUNC(compfluxvardc3d, COMPFLUXVARDC3D) (
+            Dgradw_data.getPointer(0),
+            Dgradw_data.getPointer(1),
+            Dgradw_data.getPointer(2),
+            &Dgradw_data.getGhostCellWidth()[0],
+            &Dgradw_data.getGhostCellWidth()[1],
+            &Dgradw_data.getGhostCellWidth()[2],
+            D_data->getPointer(0),
+            D_data->getPointer(1),
+            D_data->getPointer(2),
+            &D_data->getGhostCellWidth()[0],
+            &D_data->getGhostCellWidth()[1],
+            &D_data->getGhostCellWidth()[2],
+            w_data.getPointer(),
+            &w_data.getGhostCellWidth()[0],
+            &w_data.getGhostCellWidth()[1],
+            &w_data.getGhostCellWidth()[2],
+            &lower[0], &upper[0],
+            &lower[1], &upper[1],
+            &lower[2], &upper[2],
+            dx);
+      }
+   }
+
+   const int patch_ln = patch.getPatchLevelNumber();
+
+   if (d_cf_discretization == "Ewing" && patch_ln > d_ln_min) {
+      ewingFixFlux(patch,
+         w_data,
+         Dgradw_data,
+         ratio_to_coarser_level);
+   }
+
+}
+
+void CellPoissonFACOps::computeResidualOnPatch(
+   const hier::Patch& patch,
+   const pdat::SideData<double>& flux_data,
+   const pdat::CellData<double>& soln_data,
+   const pdat::CellData<double>& rhs_data,
+   pdat::CellData<double>& residual_data) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS5(d_dim, patch, flux_data, soln_data, rhs_data,
+      residual_data);
+
+   tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const hier::Box& box = patch.getBox();
+   const int* lower = &box.lower()[0];
+   const int* upper = &box.upper()[0];
+   const double* dx = patch_geom->getDx();
+
+   tbox::Pointer<pdat::CellData<double> > scalar_field_data;
+   double scalar_field_constant;
+   if (d_poisson_spec.cIsVariable()) {
+      scalar_field_data =
+         patch.getPatchData(d_poisson_spec.getCPatchDataId());
+      if (d_dim == tbox::Dimension(2)) {
+         F77_FUNC(compresvarsca2d, COMPRESVARSCA2D) (
+            flux_data.getPointer(0),
+            flux_data.getPointer(1),
+            &flux_data.getGhostCellWidth()[0],
+            &flux_data.getGhostCellWidth()[1],
+            rhs_data.getPointer(),
+            &rhs_data.getGhostCellWidth()[0],
+            &rhs_data.getGhostCellWidth()[1],
+            residual_data.getPointer(),
+            &residual_data.getGhostCellWidth()[0],
+            &residual_data.getGhostCellWidth()[1],
+            scalar_field_data->getPointer(),
+            &scalar_field_data->getGhostCellWidth()[0],
+            &scalar_field_data->getGhostCellWidth()[1],
+            soln_data.getPointer(),
+            &soln_data.getGhostCellWidth()[0],
+            &soln_data.getGhostCellWidth()[1],
+            &lower[0], &upper[0], &lower[1], &upper[1],
+            dx);
+      } else if (d_dim == tbox::Dimension(3)) {
+         F77_FUNC(compresvarsca3d, COMPRESVARSCA3D) (
+            flux_data.getPointer(0),
+            flux_data.getPointer(1),
+            flux_data.getPointer(2),
+            &flux_data.getGhostCellWidth()[0],
+            &flux_data.getGhostCellWidth()[1],
+            &flux_data.getGhostCellWidth()[2],
+            rhs_data.getPointer(),
+            &rhs_data.getGhostCellWidth()[0],
+            &rhs_data.getGhostCellWidth()[1],
+            &rhs_data.getGhostCellWidth()[2],
+            residual_data.getPointer(),
+            &residual_data.getGhostCellWidth()[0],
+            &residual_data.getGhostCellWidth()[1],
+            &residual_data.getGhostCellWidth()[2],
+            scalar_field_data->getPointer(),
+            &scalar_field_data->getGhostCellWidth()[0],
+            &scalar_field_data->getGhostCellWidth()[1],
+            &scalar_field_data->getGhostCellWidth()[2],
+            soln_data.getPointer(),
+            &soln_data.getGhostCellWidth()[0],
+            &soln_data.getGhostCellWidth()[1],
+            &soln_data.getGhostCellWidth()[2],
+            &lower[0], &upper[0], &lower[1], &upper[1], &lower[2], &upper[2],
+            dx);
+      }
+   } else if (d_poisson_spec.cIsConstant()) {
+      scalar_field_constant = d_poisson_spec.getCConstant();
+      if (d_dim == tbox::Dimension(2)) {
+         F77_FUNC(compresconsca2d, COMPRESCONSCA2D) (
+            flux_data.getPointer(0),
+            flux_data.getPointer(1),
+            &flux_data.getGhostCellWidth()[0],
+            &flux_data.getGhostCellWidth()[1],
+            rhs_data.getPointer(),
+            &rhs_data.getGhostCellWidth()[0],
+            &rhs_data.getGhostCellWidth()[1],
+            residual_data.getPointer(),
+            &residual_data.getGhostCellWidth()[0],
+            &residual_data.getGhostCellWidth()[1],
+            scalar_field_constant,
+            soln_data.getPointer(),
+            &soln_data.getGhostCellWidth()[0],
+            &soln_data.getGhostCellWidth()[1],
+            &lower[0], &upper[0], &lower[1], &upper[1],
+            dx);
+      } else if (d_dim == tbox::Dimension(3)) {
+         F77_FUNC(compresconsca3d, COMPRESCONSCA3D) (
+            flux_data.getPointer(0),
+            flux_data.getPointer(1),
+            flux_data.getPointer(2),
+            &flux_data.getGhostCellWidth()[0],
+            &flux_data.getGhostCellWidth()[1],
+            &flux_data.getGhostCellWidth()[2],
+            rhs_data.getPointer(),
+            &rhs_data.getGhostCellWidth()[0],
+            &rhs_data.getGhostCellWidth()[1],
+            &rhs_data.getGhostCellWidth()[2],
+            residual_data.getPointer(),
+            &residual_data.getGhostCellWidth()[0],
+            &residual_data.getGhostCellWidth()[1],
+            &residual_data.getGhostCellWidth()[2],
+            scalar_field_constant,
+            soln_data.getPointer(),
+            &soln_data.getGhostCellWidth()[0],
+            &soln_data.getGhostCellWidth()[1],
+            &soln_data.getGhostCellWidth()[2],
+            &lower[0], &upper[0], &lower[1], &upper[1], &lower[2], &upper[2],
+            dx);
+      }
+   } else {
+      scalar_field_constant = 0.0;
+      if (d_dim == tbox::Dimension(2)) {
+         F77_FUNC(compresconsca2d, COMPRESCONSCA2D) (
+            flux_data.getPointer(0),
+            flux_data.getPointer(1),
+            &flux_data.getGhostCellWidth()[0],
+            &flux_data.getGhostCellWidth()[1],
+            rhs_data.getPointer(),
+            &rhs_data.getGhostCellWidth()[0],
+            &rhs_data.getGhostCellWidth()[1],
+            residual_data.getPointer(),
+            &residual_data.getGhostCellWidth()[0],
+            &residual_data.getGhostCellWidth()[1],
+            0.0,
+            soln_data.getPointer(),
+            &soln_data.getGhostCellWidth()[0],
+            &soln_data.getGhostCellWidth()[1],
+            &lower[0], &upper[0], &lower[1], &upper[1],
+            dx);
+      } else if (d_dim == tbox::Dimension(3)) {
+         F77_FUNC(compresconsca3d, COMPRESCONSCA3D) (
+            flux_data.getPointer(0),
+            flux_data.getPointer(1),
+            flux_data.getPointer(2),
+            &flux_data.getGhostCellWidth()[0],
+            &flux_data.getGhostCellWidth()[1],
+            &flux_data.getGhostCellWidth()[2],
+            rhs_data.getPointer(),
+            &rhs_data.getGhostCellWidth()[0],
+            &rhs_data.getGhostCellWidth()[1],
+            &rhs_data.getGhostCellWidth()[2],
+            residual_data.getPointer(),
+            &residual_data.getGhostCellWidth()[0],
+            &residual_data.getGhostCellWidth()[1],
+            &residual_data.getGhostCellWidth()[2],
+            0.0,
+            soln_data.getPointer(),
+            &soln_data.getGhostCellWidth()[0],
+            &soln_data.getGhostCellWidth()[1],
+            &soln_data.getGhostCellWidth()[2],
+            &lower[0], &upper[0], &lower[1], &upper[1], &lower[2], &upper[2],
+            dx);
+      }
+   }
+}
+
+void CellPoissonFACOps::redOrBlackSmoothingOnPatch(
+   const hier::Patch& patch,
+   const pdat::SideData<double>& flux_data,
+   const pdat::CellData<double>& rhs_data,
+   pdat::CellData<double>& soln_data,
+   char red_or_black,
+   double* p_maxres) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(d_dim, patch, flux_data, soln_data, rhs_data);
+   TBOX_ASSERT(red_or_black == 'r' || red_or_black == 'b');
+
+   const int offset = red_or_black == 'r' ? 0 : 1;
+   tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const hier::Box& box = patch.getBox();
+   const int* lower = &box.lower()[0];
+   const int* upper = &box.upper()[0];
+   const double* dx = patch_geom->getDx();
+
+   tbox::Pointer<pdat::CellData<double> > scalar_field_data;
+   double scalar_field_constant;
+   tbox::Pointer<pdat::SideData<double> > diffcoef_data;
+   double diffcoef_constant;
+
+   if (d_poisson_spec.cIsVariable()) {
+      scalar_field_data =
+         patch.getPatchData(d_poisson_spec.getCPatchDataId());
+   } else if (d_poisson_spec.cIsConstant()) {
+      scalar_field_constant = d_poisson_spec.getCConstant();
+   } else {
+      scalar_field_constant = 0.0;
+   }
+   if (d_poisson_spec.dIsVariable()) {
+      diffcoef_data = patch.getPatchData(d_poisson_spec.getDPatchDataId());
+   } else {
+      diffcoef_constant = d_poisson_spec.getDConstant();
+   }
+
+   double maxres = 0.0;
+   if (d_poisson_spec.dIsVariable() && d_poisson_spec.cIsVariable()) {
+      if (d_dim == tbox::Dimension(2)) {
+         F77_FUNC(rbgswithfluxmaxvardcvarsf2d, RBGSWITHFLUXMAXVARDCVARSF2D) (
+            flux_data.getPointer(0),
+            flux_data.getPointer(1),
+            &flux_data.getGhostCellWidth()[0],
+            &flux_data.getGhostCellWidth()[1],
+            diffcoef_data->getPointer(0),
+            diffcoef_data->getPointer(1),
+            &diffcoef_data->getGhostCellWidth()[0],
+            &diffcoef_data->getGhostCellWidth()[1],
+            rhs_data.getPointer(),
+            &rhs_data.getGhostCellWidth()[0],
+            &rhs_data.getGhostCellWidth()[1],
+            scalar_field_data->getPointer(),
+            &scalar_field_data->getGhostCellWidth()[0],
+            &scalar_field_data->getGhostCellWidth()[1],
+            soln_data.getPointer(),
+            &soln_data.getGhostCellWidth()[0],
+            &soln_data.getGhostCellWidth()[1],
+            &lower[0], &upper[0],
+            &lower[1], &upper[1],
+            dx,
+            &offset, &maxres);
+      } else if (d_dim == tbox::Dimension(3)) {
+         F77_FUNC(rbgswithfluxmaxvardcvarsf3d, RBGSWITHFLUXMAXVARDCVARSF3D) (
+            flux_data.getPointer(0),
+            flux_data.getPointer(1),
+            flux_data.getPointer(2),
+            &flux_data.getGhostCellWidth()[0],
+            &flux_data.getGhostCellWidth()[1],
+            &flux_data.getGhostCellWidth()[2],
+            diffcoef_data->getPointer(0),
+            diffcoef_data->getPointer(1),
+            diffcoef_data->getPointer(2),
+            &diffcoef_data->getGhostCellWidth()[0],
+            &diffcoef_data->getGhostCellWidth()[1],
+            &diffcoef_data->getGhostCellWidth()[2],
+            rhs_data.getPointer(),
+            &rhs_data.getGhostCellWidth()[0],
+            &rhs_data.getGhostCellWidth()[1],
+            &rhs_data.getGhostCellWidth()[2],
+            scalar_field_data->getPointer(),
+            &scalar_field_data->getGhostCellWidth()[0],
+            &scalar_field_data->getGhostCellWidth()[1],
+            &scalar_field_data->getGhostCellWidth()[2],
+            soln_data.getPointer(),
+            &soln_data.getGhostCellWidth()[0],
+            &soln_data.getGhostCellWidth()[1],
+            &soln_data.getGhostCellWidth()[2],
+            &lower[0], &upper[0],
+            &lower[1], &upper[1],
+            &lower[2], &upper[2],
+            dx,
+            &offset, &maxres);
+      }
+   } else if (d_poisson_spec.dIsVariable() && d_poisson_spec.cIsConstant()) {
+      if (d_dim == tbox::Dimension(2)) {
+         F77_FUNC(rbgswithfluxmaxvardcconsf2d, RBGSWITHFLUXMAXVARDCCONSF2D) (
+            flux_data.getPointer(0),
+            flux_data.getPointer(1),
+            &flux_data.getGhostCellWidth()[0],
+            &flux_data.getGhostCellWidth()[1],
+            diffcoef_data->getPointer(0),
+            diffcoef_data->getPointer(1),
+            &diffcoef_data->getGhostCellWidth()[0],
+            &diffcoef_data->getGhostCellWidth()[1],
+            rhs_data.getPointer(),
+            &rhs_data.getGhostCellWidth()[0],
+            &rhs_data.getGhostCellWidth()[1],
+            scalar_field_constant,
+            soln_data.getPointer(),
+            &soln_data.getGhostCellWidth()[0],
+            &soln_data.getGhostCellWidth()[1],
+            &lower[0], &upper[0],
+            &lower[1], &upper[1],
+            dx,
+            &offset, &maxres);
+      } else if (d_dim == tbox::Dimension(3)) {
+         F77_FUNC(rbgswithfluxmaxvardcconsf3d, RBGSWITHFLUXMAXVARDCCONSF3D) (
+            flux_data.getPointer(0),
+            flux_data.getPointer(1),
+            flux_data.getPointer(2),
+            &flux_data.getGhostCellWidth()[0],
+            &flux_data.getGhostCellWidth()[1],
+            &flux_data.getGhostCellWidth()[2],
+            diffcoef_data->getPointer(0),
+            diffcoef_data->getPointer(1),
+            diffcoef_data->getPointer(2),
+            &diffcoef_data->getGhostCellWidth()[0],
+            &diffcoef_data->getGhostCellWidth()[1],
+            &diffcoef_data->getGhostCellWidth()[2],
+            rhs_data.getPointer(),
+            &rhs_data.getGhostCellWidth()[0],
+            &rhs_data.getGhostCellWidth()[1],
+            &rhs_data.getGhostCellWidth()[2],
+            scalar_field_constant,
+            soln_data.getPointer(),
+            &soln_data.getGhostCellWidth()[0],
+            &soln_data.getGhostCellWidth()[1],
+            &soln_data.getGhostCellWidth()[2],
+            &lower[0], &upper[0],
+            &lower[1], &upper[1],
+            &lower[2], &upper[2],
+            dx,
+            &offset, &maxres);
+      }
+   } else if (d_poisson_spec.dIsVariable() && d_poisson_spec.cIsZero()) {
+      if (d_dim == tbox::Dimension(2)) {
+         F77_FUNC(rbgswithfluxmaxvardcconsf2d, RBGSWITHFLUXMAXVARDCCONSF2D) (
+            flux_data.getPointer(0),
+            flux_data.getPointer(1),
+            &flux_data.getGhostCellWidth()[0],
+            &flux_data.getGhostCellWidth()[1],
+            diffcoef_data->getPointer(0),
+            diffcoef_data->getPointer(1),
+            &diffcoef_data->getGhostCellWidth()[0],
+            &diffcoef_data->getGhostCellWidth()[1],
+            rhs_data.getPointer(),
+            &rhs_data.getGhostCellWidth()[0],
+            &rhs_data.getGhostCellWidth()[1],
+            0.0,
+            soln_data.getPointer(),
+            &soln_data.getGhostCellWidth()[0],
+            &soln_data.getGhostCellWidth()[1],
+            &lower[0], &upper[0],
+            &lower[1], &upper[1],
+            dx,
+            &offset, &maxres);
+      } else if (d_dim == tbox::Dimension(3)) {
+         F77_FUNC(rbgswithfluxmaxvardcconsf3d, RBGSWITHFLUXMAXVARDCCONSF3D) (
+            flux_data.getPointer(0),
+            flux_data.getPointer(1),
+            flux_data.getPointer(2),
+            &flux_data.getGhostCellWidth()[0],
+            &flux_data.getGhostCellWidth()[1],
+            &flux_data.getGhostCellWidth()[2],
+            diffcoef_data->getPointer(0),
+            diffcoef_data->getPointer(1),
+            diffcoef_data->getPointer(2),
+            &diffcoef_data->getGhostCellWidth()[0],
+            &diffcoef_data->getGhostCellWidth()[1],
+            &diffcoef_data->getGhostCellWidth()[2],
+            rhs_data.getPointer(),
+            &rhs_data.getGhostCellWidth()[0],
+            &rhs_data.getGhostCellWidth()[1],
+            &rhs_data.getGhostCellWidth()[2],
+            0.0,
+            soln_data.getPointer(),
+            &soln_data.getGhostCellWidth()[0],
+            &soln_data.getGhostCellWidth()[1],
+            &soln_data.getGhostCellWidth()[2],
+            &lower[0], &upper[0],
+            &lower[1], &upper[1],
+            &lower[2], &upper[2],
+            dx,
+            &offset, &maxres);
+      }
+   } else if (!d_poisson_spec.dIsVariable() && d_poisson_spec.cIsVariable()) {
+      if (d_dim == tbox::Dimension(2)) {
+         F77_FUNC(rbgswithfluxmaxcondcvarsf2d, RBGSWITHFLUXMAXCONDCVARSF2D) (
+            flux_data.getPointer(0),
+            flux_data.getPointer(1),
+            &flux_data.getGhostCellWidth()[0],
+            &flux_data.getGhostCellWidth()[1],
+            diffcoef_constant,
+            rhs_data.getPointer(),
+            &rhs_data.getGhostCellWidth()[0],
+            &rhs_data.getGhostCellWidth()[1],
+            scalar_field_data->getPointer(),
+            &scalar_field_data->getGhostCellWidth()[0],
+            &scalar_field_data->getGhostCellWidth()[1],
+            soln_data.getPointer(),
+            &soln_data.getGhostCellWidth()[0],
+            &soln_data.getGhostCellWidth()[1],
+            &lower[0], &upper[0],
+            &lower[1], &upper[1],
+            dx,
+            &offset, &maxres);
+      } else if (d_dim == tbox::Dimension(3)) {
+         F77_FUNC(rbgswithfluxmaxcondcvarsf3d, RBGSWITHFLUXMAXCONDCVARSF3D) (
+            flux_data.getPointer(0),
+            flux_data.getPointer(1),
+            flux_data.getPointer(2),
+            &flux_data.getGhostCellWidth()[0],
+            &flux_data.getGhostCellWidth()[1],
+            &flux_data.getGhostCellWidth()[2],
+            diffcoef_constant,
+            rhs_data.getPointer(),
+            &rhs_data.getGhostCellWidth()[0],
+            &rhs_data.getGhostCellWidth()[1],
+            &rhs_data.getGhostCellWidth()[2],
+            scalar_field_data->getPointer(),
+            &scalar_field_data->getGhostCellWidth()[0],
+            &scalar_field_data->getGhostCellWidth()[1],
+            &scalar_field_data->getGhostCellWidth()[2],
+            soln_data.getPointer(),
+            &soln_data.getGhostCellWidth()[0],
+            &soln_data.getGhostCellWidth()[1],
+            &soln_data.getGhostCellWidth()[2],
+            &lower[0], &upper[0],
+            &lower[1], &upper[1],
+            &lower[2], &upper[2],
+            dx,
+            &offset, &maxres);
+      }
+   } else if (!d_poisson_spec.dIsVariable() && d_poisson_spec.cIsConstant()) {
+      if (d_dim == tbox::Dimension(2)) {
+         F77_FUNC(rbgswithfluxmaxcondcconsf2d, RBGSWITHFLUXMAXCONDCCONSF2D) (
+            flux_data.getPointer(0),
+            flux_data.getPointer(1),
+            &flux_data.getGhostCellWidth()[0],
+            &flux_data.getGhostCellWidth()[1],
+            diffcoef_constant,
+            rhs_data.getPointer(),
+            &rhs_data.getGhostCellWidth()[0],
+            &rhs_data.getGhostCellWidth()[1],
+            scalar_field_constant,
+            soln_data.getPointer(),
+            &soln_data.getGhostCellWidth()[0],
+            &soln_data.getGhostCellWidth()[1],
+            &lower[0], &upper[0],
+            &lower[1], &upper[1],
+            dx,
+            &offset, &maxres);
+      } else if (d_dim == tbox::Dimension(3)) {
+         F77_FUNC(rbgswithfluxmaxcondcconsf3d, RBGSWITHFLUXMAXCONDCCONSF3D) (
+            flux_data.getPointer(0),
+            flux_data.getPointer(1),
+            flux_data.getPointer(2),
+            &flux_data.getGhostCellWidth()[0],
+            &flux_data.getGhostCellWidth()[1],
+            &flux_data.getGhostCellWidth()[2],
+            diffcoef_constant,
+            rhs_data.getPointer(),
+            &rhs_data.getGhostCellWidth()[0],
+            &rhs_data.getGhostCellWidth()[1],
+            &rhs_data.getGhostCellWidth()[2],
+            scalar_field_constant,
+            soln_data.getPointer(),
+            &soln_data.getGhostCellWidth()[0],
+            &soln_data.getGhostCellWidth()[1],
+            &soln_data.getGhostCellWidth()[2],
+            &lower[0], &upper[0],
+            &lower[1], &upper[1],
+            &lower[2], &upper[2],
+            dx,
+            &offset, &maxres);
+      }
+   } else if (!d_poisson_spec.dIsVariable() && d_poisson_spec.cIsZero()) {
+      if (d_dim == tbox::Dimension(2)) {
+         F77_FUNC(rbgswithfluxmaxcondcconsf2d, RBGSWITHFLUXMAXCONDCCONSF2D) (
+            flux_data.getPointer(0),
+            flux_data.getPointer(1),
+            &flux_data.getGhostCellWidth()[0],
+            &flux_data.getGhostCellWidth()[1],
+            diffcoef_constant,
+            rhs_data.getPointer(),
+            &rhs_data.getGhostCellWidth()[0],
+            &rhs_data.getGhostCellWidth()[1],
+            0.0,
+            soln_data.getPointer(),
+            &soln_data.getGhostCellWidth()[0],
+            &soln_data.getGhostCellWidth()[1],
+            &lower[0], &upper[0],
+            &lower[1], &upper[1],
+            dx,
+            &offset, &maxres);
+      } else if (d_dim == tbox::Dimension(3)) {
+         F77_FUNC(rbgswithfluxmaxcondcconsf3d, RBGSWITHFLUXMAXCONDCCONSF3D) (
+            flux_data.getPointer(0),
+            flux_data.getPointer(1),
+            flux_data.getPointer(2),
+            &flux_data.getGhostCellWidth()[0],
+            &flux_data.getGhostCellWidth()[1],
+            &flux_data.getGhostCellWidth()[2],
+            diffcoef_constant,
+            rhs_data.getPointer(),
+            &rhs_data.getGhostCellWidth()[0],
+            &rhs_data.getGhostCellWidth()[1],
+            &rhs_data.getGhostCellWidth()[2],
+            0.0,
+            soln_data.getPointer(),
+            &soln_data.getGhostCellWidth()[0],
+            &soln_data.getGhostCellWidth()[1],
+            &soln_data.getGhostCellWidth()[2],
+            &lower[0], &upper[0],
+            &lower[1], &upper[1],
+            &lower[2], &upper[2],
+            dx,
+            &offset, &maxres);
+      }
+   }
+
+   *p_maxres = maxres;
+}
+
+void
+CellPoissonFACOps::xeqScheduleProlongation(
+   int dst_id,
+   int src_id,
+   int scr_id,
+   int dest_ln)
+{
+   if (!d_prolongation_refine_schedules[dest_ln]) {
+      TBOX_ERROR("Expected schedule not found.");
+   }
+   xfer::RefineAlgorithm refiner(d_dim);
+   refiner.
+   registerRefine(dst_id,
+      src_id,
+      scr_id,
+      d_prolongation_refine_operator);
+   refiner.
+   resetSchedule(d_prolongation_refine_schedules[dest_ln]);
+   d_prolongation_refine_schedules[dest_ln]->fillData(0.0);
+   d_prolongation_refine_algorithm->
+   resetSchedule(d_prolongation_refine_schedules[dest_ln]);
+}
+
+void
+CellPoissonFACOps::xeqScheduleURestriction(
+   int dst_id,
+   int src_id,
+   int dest_ln)
+{
+   if (!d_urestriction_coarsen_schedules[dest_ln]) {
+      TBOX_ERROR("Expected schedule not found.");
+   }
+
+   xfer::CoarsenAlgorithm coarsener(d_dim);
+   coarsener.registerCoarsen(dst_id,
+      src_id,
+      d_urestriction_coarsen_operator);
+   coarsener.resetSchedule(d_urestriction_coarsen_schedules[dest_ln]);
+   d_urestriction_coarsen_schedules[dest_ln]->coarsenData();
+   d_urestriction_coarsen_algorithm->
+   resetSchedule(d_urestriction_coarsen_schedules[dest_ln]);
+}
+
+void
+CellPoissonFACOps::xeqScheduleRRestriction(
+   int dst_id,
+   int src_id,
+   int dest_ln)
+{
+   if (!d_rrestriction_coarsen_schedules[dest_ln]) {
+      TBOX_ERROR("Expected schedule not found.");
+   }
+
+   xfer::CoarsenAlgorithm coarsener(d_dim);
+   coarsener.registerCoarsen(dst_id,
+      src_id,
+      d_rrestriction_coarsen_operator);
+   coarsener.resetSchedule(d_rrestriction_coarsen_schedules[dest_ln]);
+   d_rrestriction_coarsen_schedules[dest_ln]->coarsenData();
+   d_rrestriction_coarsen_algorithm->
+   resetSchedule(d_rrestriction_coarsen_schedules[dest_ln]);
+}
+
+void
+CellPoissonFACOps::xeqScheduleFluxCoarsen(
+   int dst_id,
+   int src_id,
+   int dest_ln)
+{
+   if (!d_flux_coarsen_schedules[dest_ln]) {
+      TBOX_ERROR("Expected schedule not found.");
+   }
+
+   xfer::CoarsenAlgorithm coarsener(d_dim);
+   coarsener.registerCoarsen(dst_id,
+      src_id,
+      d_flux_coarsen_operator);
+
+   coarsener.resetSchedule(d_flux_coarsen_schedules[dest_ln]);
+   d_flux_coarsen_schedules[dest_ln]->coarsenData();
+   d_flux_coarsen_algorithm->
+   resetSchedule(d_flux_coarsen_schedules[dest_ln]);
+}
+
+void
+CellPoissonFACOps::xeqScheduleGhostFill(
+   int dst_id,
+   int dest_ln)
+{
+   if (!d_ghostfill_refine_schedules[dest_ln]) {
+      TBOX_ERROR("Expected schedule not found.");
+   }
+   xfer::RefineAlgorithm refiner(d_dim);
+   refiner.
+   registerRefine(dst_id,
+      dst_id,
+      dst_id,
+      d_ghostfill_refine_operator);
+   refiner.
+   resetSchedule(d_ghostfill_refine_schedules[dest_ln]);
+   d_ghostfill_refine_schedules[dest_ln]->fillData(0.0);
+   d_ghostfill_refine_algorithm->
+   resetSchedule(d_ghostfill_refine_schedules[dest_ln]);
+}
+
+void
+CellPoissonFACOps::xeqScheduleGhostFillNoCoarse(
+   int dst_id,
+   int dest_ln)
+{
+   if (!d_ghostfill_nocoarse_refine_schedules[dest_ln]) {
+      TBOX_ERROR("Expected schedule not found.");
+   }
+   xfer::RefineAlgorithm refiner(d_dim);
+   refiner.
+   registerRefine(dst_id,
+      dst_id,
+      dst_id,
+      d_ghostfill_nocoarse_refine_operator);
+   refiner.
+   resetSchedule(d_ghostfill_nocoarse_refine_schedules[dest_ln]);
+   d_ghostfill_nocoarse_refine_schedules[dest_ln]->fillData(0.0);
+   d_ghostfill_nocoarse_refine_algorithm->
+   resetSchedule(d_ghostfill_nocoarse_refine_schedules[dest_ln]);
+}
+
+void
+CellPoissonFACOps::finalizeCallback()
+{
+   for (int d = 0; d < tbox::Dimension::MAXIMUM_DIMENSION_VALUE; ++d) {
+      s_cell_scratch_var[d].setNull();
+      s_flux_scratch_var[d].setNull();
+      s_oflux_scratch_var[d].setNull();
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/CellPoissonFACOps.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/CellPoissonFACOps.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,213 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operator class for solving scalar Poisson using FAC 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+namespace solv {
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACOps::setPreconditioner(
+   const FACPreconditioner* preconditioner) {
+   d_preconditioner = preconditioner;
+}
+
+#ifdef HAVE_HYPRE
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACOps::setUseSMG(
+   bool use_smg)
+{
+   if (d_hierarchy) {
+      TBOX_ERROR(
+         d_object_name << ": setUseSMG(bool) may NOT be called\n"
+         <<
+         "while the solver state is initialized, as that\n"
+         << "would lead to a corrupted solver state.\n");
+   }
+   d_hypre_solver.setUseSMG(use_smg);
+}
+#endif
+
+/*
+ ********************************************************************
+ * Set the physical boundary condition object.                      *
+ ********************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACOps::setPhysicalBcCoefObject(
+   const RobinBcCoefStrategy* physical_bc_coef)
+{
+   d_physical_bc_coef = physical_bc_coef;
+   d_bc_helper.setCoefImplementation(physical_bc_coef);
+#ifdef HAVE_HYPRE
+   d_hypre_solver.setPhysicalBcCoefObject(d_physical_bc_coef);
+#endif
+}
+
+/*
+ ********************************************************************
+ * Set the object specifying the parameters of the Poisson equation *
+ ********************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACOps::setPoissonSpecifications(
+   const PoissonSpecifications& spec)
+{
+   d_poisson_spec = spec;
+}
+
+/*
+ ********************************************************************
+ ********************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACOps::enableLogging(
+   bool enable_logging)
+{
+   d_enable_logging = enable_logging;
+}
+
+/*
+ ********************************************************************
+ * Set the patch data id for the flux.                              *
+ ********************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACOps::setFluxId(
+   int flux_id) {
+   d_flux_id = flux_id;
+#ifdef DEBUG_CHECK_ASSERTIONS
+   checkInputPatchDataIndices();
+#endif
+}
+
+/*
+ ********************************************************************
+ * Set the choice for smoothing algorithm.                          *
+ ********************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACOps::setSmoothingChoice(
+   const std::string& smoothing_choice)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (smoothing_choice != "redblack") {
+      TBOX_ERROR(d_object_name << ": Bad smoothing choice '"
+                               << smoothing_choice
+                               << "' in CellPoissonFACOps::setSmoothingChoice.");
+   }
+#endif
+   d_smoothing_choice = smoothing_choice;
+}
+
+/*
+ ********************************************************************
+ * Set the choice for the coarse level solver.                      *
+ ********************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACOps::setCoarsestLevelSolverChoice(
+   const std::string& choice) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+#ifndef HAVE_HYPRE
+   if (choice == "hypre") {
+      TBOX_ERROR(d_object_name << ": HYPRe library is not available.\n");
+   }
+#endif
+#endif
+   if (choice == "redblack"
+       || choice == "hypre") {
+      d_coarse_solver_choice = choice;
+   } else {
+      TBOX_ERROR(
+         d_object_name << ": Bad coarse level solver choice '"
+         << choice
+         <<
+         "' in scapCellPoissonOpsX::setCoarseLevelSolver.");
+   }
+}
+
+/*
+ ********************************************************************
+ * Set the tolerance for the coarse level solver.                   *
+ ********************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACOps::setCoarsestLevelSolverTolerance(
+   double tol) {
+   d_coarse_solver_tolerance = tol;
+}
+
+/*
+ ********************************************************************
+ * Set the tolerance for the coarse level solver.                   *
+ ********************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACOps::setCoarsestLevelSolverMaxIterations(
+   int max_iterations) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (max_iterations < 0) {
+      TBOX_ERROR(d_object_name << ": Invalid number of max iterations\n");
+   }
+#endif
+   d_coarse_solver_max_iterations = max_iterations;
+}
+
+/*
+ ********************************************************************
+ * Set the coarse-fine discretization method.                       *
+ ********************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACOps::setCoarseFineDiscretization(
+   const std::string& coarsefine_method) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_hierarchy) {
+      TBOX_ERROR(
+         d_object_name << ": Cannot change coarse-fine\n"
+         <<
+         "discretization method while operator state\n"
+         << "is initialized because that causes a\n"
+         << "corruption in the state.\n");
+   }
+#endif
+   d_cf_discretization = coarsefine_method;
+}
+
+/*
+ ********************************************************************
+ * Set the prolongation method                                      *
+ ********************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACOps::setProlongationMethod(
+   const std::string& prolongation_method) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_hierarchy) {
+      TBOX_ERROR(
+         d_object_name << ": Cannot change prolongation method\n"
+         <<
+         "while operator state is initialized because that\n"
+         << "causes a corruption in the state.\n");
+   }
+#endif
+   d_prolongation_method = prolongation_method;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/CellPoissonFACOps.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/CellPoissonFACOps.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1044 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operator class for cell-centered scalar Poisson using FAC 
+ *
+ ************************************************************************/
+#ifndef included_solv_CellPoissonFACOps
+#define included_solv_CellPoissonFACOps
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/solv/CartesianRobinBcHelper.h"
+#include "SAMRAI/solv/FACPreconditioner.h"
+#include "SAMRAI/solv/FACOperatorStrategy.h"
+#include "SAMRAI/solv/RobinBcCoefStrategy.h"
+#include "SAMRAI/solv/CellPoissonHypreSolver.h"
+#include "SAMRAI/solv/SAMRAIVectorReal.h"
+#include "SAMRAI/solv/PoissonSpecifications.h"
+#include "SAMRAI/math/HierarchyCellDataOpsReal.h"
+#include "SAMRAI/math/HierarchySideDataOpsReal.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/pdat/CellDoubleConstantRefine.h"
+#include "SAMRAI/pdat/OutersideData.h"
+#include "SAMRAI/pdat/OutersideVariable.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/xfer/CoarsenSchedule.h"
+#include "SAMRAI/xfer/RefineSchedule.h"
+#include "SAMRAI/xfer/CoarsenAlgorithm.h"
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/xfer/RefineAlgorithm.h"
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/CoarseFineBoundary.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Timer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace solv {
+
+/*!
+ * @brief FAC operator class to solve Poisson's equation on a SAMR grid,
+ * using cell-centered, second-order finite-volume method, with Robin
+ * boundary conditions.
+ *
+ * This class provides operators that are used by the FAC
+ * preconditioner FACPreconditioner.
+ * It is used to solve the scalar Poisson's equation using a cell-centered
+ * second-order finite-volume discretization.
+ * It is designed to provide all operations specific to
+ * the scalar Poisson's equation,
+ * @f[ \nabla \cdot D \nabla u + C u = f @f]
+ * (see PoissonSpecifications) where
+ * - C, D and f are indpendent of u
+ * - C is a cell-centered scalar field
+ * - D is the @em diffusion @em coefficients, stored on faces
+ * - f is a cell-centered scalar function
+ *
+ * You are left to provide the source function, initial guess, etc.,
+ * by specifying them in specific forms.
+ *
+ * This class provides:
+ * -# 5-point (second order), cell-centered stencil operations
+ *    for the discrete Laplacian.
+ * -# Red-black Gauss-Seidel smoothing.
+ * -# Provisions for working Robin boundary conditions
+ *    (see RobinBcCoefStrategy).
+ *
+ * This class is meant to provide the Poisson-specific operator
+ * used by the FAC preconditioner, FACPreconditioner.
+ * To use the preconditioner with this class, you will have to provide:
+ * -# The solution vector SAMRAIVectorReal,
+ *    with appropriate norm weighting for the cell-centered AMR mesh.
+ *    This class provides the function computeVectorWeights()
+ *    to help with computing the appropriate weights.
+ *    Since this is for a scalar equation, only the first depth
+ *    of the first component of the vectors are used.
+ *    All other parts are ignored.
+ * -# The source vector SAMRAIVectorReal for f.
+ * -# A PoissonSpecifications objects to specify
+ *    the cell-centered scalar field C and the side-centered
+ *    diffusion coefficients D
+ * -# The boundary condition specifications in terms of the coefficients
+ *    @f$ \alpha @f$, @f$ \beta @f$ and @f$ \gamma @f$ in the
+ *    Robin formula @f$  \alpha u + \beta u_n = \gamma @f$ applied on the
+ *    boundary faces.  See RobinBcCoefStrategy.
+ *
+ * This class allocates and deallocates only its own scratch data.
+ * Other data that it manipuates are passed in as function arguments.
+ * Hence, it owns none of the solution vectors, error vectors,
+ * diffusion coefficient data, or any such things.
+ *
+ * Input Examples
+ * @verbatim
+ * coarse_solver_choice = "hypre"    // see setCoarsestLevelSolverChoice()
+ * coarse_solver_tolerance = 1e-14   // see setCoarsestLevelSolverTolerance()
+ * coarse_solver_max_iterations = 10 // see setCoarsestLevelSolverMaxIterations()
+ * smoothing_choice = "redblack"     // see setSmoothingChoice()
+ * cf_discretization = "Ewing"       // see setCoarseFineDiscretization()
+ * prolongation_method = "LINEAR_REFINE" // see setProlongationMethod()
+ * hypre_solver = { ... }            // tbox::Database for initializing Hypre solver
+ * @endverbatim
+ */
+class CellPoissonFACOps:
+   public FACOperatorStrategy
+{
+
+public:
+   /*!
+    * @brief Constructor.
+    *
+    * If you want standard output and logging,
+    * pass in valid pointers for those streams.
+    * @param object_name Ojbect name
+    * @param database Input database
+    */
+   CellPoissonFACOps(
+      const tbox::Dimension& dim,
+      const std::string& object_name = std::string(),
+      tbox::Pointer<tbox::Database> database =
+         tbox::Pointer<tbox::Database>(NULL));
+
+   /*!
+    * @brief Destructor.
+    *
+    * Deallocate internal data.
+    */
+   ~CellPoissonFACOps(
+      void);
+
+   /*!
+    * @brief Set the scalar Poisson equation specifications.
+    */
+   void
+   setPoissonSpecifications(
+      const PoissonSpecifications& spec);
+
+   /*!
+    * @brief Enable logging.
+    *
+    * By default, logging is disabled.  The logging flag is
+    * propagated to the major components used by this class.
+    */
+   void
+   enableLogging(
+      bool enable_logging);
+
+   //@{
+   /*!
+    * @name Functions for setting solver mathematic algorithm controls
+    */
+
+   /*!
+    * @brief Set the choice of smoothing algorithms.
+    *
+    * Current smoothing choices are:
+    * - "redblack": Red-black Gauss-Seidel smoothing.
+    */
+   void
+   setSmoothingChoice(
+      const std::string& smoothing_choice);
+
+   /*!
+    * @brief Set coarse level solver.
+    *
+    * Select from these:
+    * - @c "redblack" (red-black smoothing until convergence--very slow!)
+    * - @c "hypre" (only if the HYPRE library is available).
+    */
+   void
+   setCoarsestLevelSolverChoice(
+      const std::string& choice);
+
+   /*!
+    * @brief Set tolerance for coarse level solve.
+    *
+    * If the coarse level solver requires a tolerance (currently, they all do),
+    * the specified value is used.
+    */
+   void
+   setCoarsestLevelSolverTolerance(
+      double tol);
+
+   /*!
+    * @brief Set max iterations for coarse level solve.
+    *
+    * If the coarse level solver requires a max iteration limit
+    * (currently, they all do), the specified value is used.
+    */
+   void
+   setCoarsestLevelSolverMaxIterations(
+      int max_iterations);
+
+   /*!
+    * @brief Set the coarse-fine boundary discretization method.
+    *
+    * Specify the @c op_name std::string which will be passed to
+    * xfer::Geometry::lookupRefineOperator() to get the operator
+    * for setting fine grid ghost cells from the coarse grid.
+    * Note that chosing this operator implicitly choses the
+    * discretization method at the coarse-fine boundary.
+    *
+    * There is one important instance where this std::string is
+    * @em not passed to xfer::Geometry::lookupRefineOperator.
+    * If this variable is set to "Ewing", Ewing's coarse-fine
+    * discretization is used (a constant refinement is performed,
+    * and the flux is later corrected to result in Ewing's scheme).
+    * For a reference to Ewing's discretization method, see
+    * "Local Refinement Techniques for Elliptic Problems on Cell-Centered
+    * Grids, I. Error Analysis", Mathematics of Computation, Vol. 56, No. 194,
+    * April 1991, pp. 437-461.
+    *
+    * @param coarsefine_method String selecting the coarse-fine discretization method.
+    */
+   void
+   setCoarseFineDiscretization(
+      const std::string& coarsefine_method);
+
+   /*!
+    * @brief Set the name of the prolongation method.
+    *
+    * Specify the @c op_name std::string which will be passed to
+    * xfer::Geometry::lookupRefineOperator() to get the operator
+    * for prolonging the coarse-grid correction.
+    *
+    * By default, "CONSTANT_REFINE" is used.  "LINEAR_REFINE" seems to
+    * to lead to faster convergence, but it does NOT satisfy the Galerkin
+    * condition.
+    *
+    * Prolonging using linear refinement requires a Robin bc
+    * coefficient implementation that is capable of delivering
+    * coefficients for non-hierarchy data, because linear refinement
+    * requires boundary conditions to be set on temporary levels.
+    *
+    * @param prolongation_method String selecting the coarse-fine
+    *        discretization method.
+    */
+   void
+   setProlongationMethod(
+      const std::string& prolongation_method);
+
+#ifdef HAVE_HYPRE
+   /*!
+    * @brief Set whether to use Hypre's PFMG algorithm instead of the
+    * SMG algorithm.
+    *
+    * This flag affects the Hypre solver (used to solve the coarsest level).
+    * The flag is used to select which of HYPRE's linear solver algorithms
+    * to use if true, the semicoarsening multigrid algorithm is used, and if
+    * false, the ``PF'' multigrid algorithm is used.
+    * By default, the SMG algorithm is used.
+    *
+    * This setting has effect only when Hypre is chosen for the coarsest
+    * level solver.  See setCoarsestLevelSolverChoice().
+    *
+    * Changing the algorithm must be done before initializing the solver
+    * state and must NOT be done while the state is initialized
+    * (the program will exit), as that would corrupt the state.
+    */
+   void
+   setUseSMG(
+      bool use_smg);
+#endif
+
+   //@}
+
+   //@{
+   /*!
+    * @name Functions for setting patch data indices and coefficients
+    */
+
+   /*!
+    * @brief Set the scratch patch data index for the flux.
+    *
+    * The use of this function is optional.
+    * The patch data index should be a pdat::SideData<DIM> type of variable.
+    * If the flux id is -1 (the default initial value), scratch space
+    * for the flux is allocated as needed and immediately deallocated
+    * afterward, level by level.  If you have space preallocated for
+    * flux and you would like that to be used, set flux id to the
+    * patch data index of that space.
+    */
+   void
+   setFluxId(
+      int flux_id);
+
+   //@}
+
+   /*!
+    * @brief Provide an implementation for getting the
+    * physical bc coefficients
+    *
+    * If your solution is fixed at the physical boundary
+    * ghost cell centers AND those cells have the correct
+    * values before entering solveSystem(), you may use a
+    * GhostCellRobinBcCoefs object.
+    *
+    * If your solution is @b not fixed at the ghost cell centers,
+    * the ghost cell values will change as the interior
+    * cell values change.  In those cases, the flexible
+    * Robin boundary conditions are applied.  You must
+    * call this function to provide the implementation for
+    * determining the boundary condition coefficients.
+    *
+    * @param physical_bc_coef tbox::Pointer to an object that can
+    *        set the Robin bc coefficients.
+    */
+   void
+   setPhysicalBcCoefObject(
+      const RobinBcCoefStrategy* physical_bc_coef);
+
+   //@{
+
+   /*!
+    * @name Functions for checking validity and correctness of state.
+    */
+
+   /*!
+    * @brief Check validity and correctness of input patch data indices.
+    *
+    * Descriptors checked:
+    * -# Diffusion coefficient (see setDiffcoefId())
+    * -# Flux (see setFluxId())
+    * -# Source (see setScalarFieldId())
+    */
+   void
+   checkInputPatchDataIndices() const;
+
+   //@}
+
+   /*!
+    * @brief Set weight appropriate for computing vector norms.
+    *
+    * If you this function to set the weights used when you
+    * SAMRAIVectorReal::addComponent, you can use the
+    * vector norm functions of SAMRAIVectorReal, and
+    * the weights will be used to blank out coarse grid
+    * regions under fine grids.
+    *
+    * The weights computed are specific to the cell-centered
+    * discretization used by this class.  The weight is equal
+    * to the cell volume if the cell has not been refined,
+    * and zero if it has.
+    *
+    * This function is state-independent.  All inputs are in
+    * the argument list.
+    *
+    * @param hierarchy Hierarchy configuration to compute weights for
+    * @param weight_id hier::Patch data index of the weight
+    * @param coarsest_ln Coarsest level number.  Must be included
+    *        in hierarchy.  Must not be greater than @c finest_ln.
+    *        Default to 0.
+    * @param finest_ln Finest level number.  Must be included
+    *        in hierarchy.  Must not be less than @c coarsest_ln.
+    *        Default to finest level in @c hierarchy.
+    */
+   void
+   computeVectorWeights(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int weight_id,
+      int coarsest_ln = -1,
+      int finest_ln = -1) const;
+
+   /*!
+    * @brief Set the FAC preconditioner that will be using this object.
+    *
+    * The FAC preconditioner is accessed to get convergence data during
+    * the cycle postprocessing step.  It is optional.
+    */
+   void
+   setPreconditioner(
+      const FACPreconditioner* preconditioner);
+
+   /*!
+    * @brief function to compute flux, using general diffusion
+    * coefficient data.
+    *
+    * Recall that this solver class discretizes the PDE
+    * @f[ \nabla \cdot D \nabla u + C u = f @f] on an AMR grid.  This member
+    * function allows users of this solver class to compute gradient
+    * terms, @f[ D \nabla w @f], in their code in a manner consistent with the
+    * solver discretization.   In particular, when solving PDE systems, it may
+    * be necessary to discretize the gradient operator appearing in equations
+    * not treated by the solver class in the same way as those treated by this
+    * class.  These funtions allow users to do this easily.  The divergence
+    * operator used in this solver is the standard sum of centered differences
+    * involving flux terms on the cell sides computed by these routines.
+    *
+    * Note that the patch must exist on a level in an AMR hierarchy so that
+    * the discretization can be computed properly at the coarse-fine interface.
+    * Poisson coefficients C and D must exist on the patch, if they are variable.
+    * Also, calling this function does not affect the internal solver state in any
+    * way.  However, the solver must be fully initialized before it is called and care
+    * should be exercised to pass arguments so that the solver solution quantity and
+    * other internal solver quantities are not adversely affected.
+    *
+    * @param patch patch on which computation will take place
+    * @param ratio_to_coarser_level refinement ratio from coarser level to level
+    *                               on which patch lives; if current patch level
+    *                               is level zero, this is ignored
+    * @param w_data cell-centered data
+    * @param Dgradw_data side-centered flux data (i.e., D (grad w))
+    */
+   void
+   computeFluxOnPatch(
+      const hier::Patch& patch,
+      const hier::IntVector& ratio_to_coarser_level,
+      const pdat::CellData<double>& w_data,
+      pdat::SideData<double>& Dgradw_data) const;
+
+   //@{ @name FACOperatorStrategy virtuals
+
+   virtual void
+   restrictSolution(
+      const SAMRAIVectorReal<double>& source,
+      SAMRAIVectorReal<double>& dest,
+      int dest_ln);
+   virtual void
+   restrictResidual(
+      const SAMRAIVectorReal<double>& source,
+      SAMRAIVectorReal<double>& dest,
+      int dest_ln);
+
+   virtual void
+   prolongErrorAndCorrect(
+      const SAMRAIVectorReal<double>& source,
+      SAMRAIVectorReal<double>& dest,
+      int dest_ln);
+
+   virtual void
+   smoothError(
+      SAMRAIVectorReal<double>& error,
+      const SAMRAIVectorReal<double>& residual,
+      int ln,
+      int num_sweeps);
+
+   virtual int
+   solveCoarsestLevel(
+      SAMRAIVectorReal<double>& error,
+      const SAMRAIVectorReal<double>& residual,
+      int coarsest_ln);
+
+   virtual void
+   computeCompositeResidualOnLevel(
+      SAMRAIVectorReal<double>& residual,
+      const SAMRAIVectorReal<double>& solution,
+      const SAMRAIVectorReal<double>& rhs,
+      int ln,
+      bool error_equation_indicator);
+
+   virtual double
+   computeResidualNorm(
+      const SAMRAIVectorReal<double>& residual,
+      int fine_ln,
+      int coarse_ln);
+
+   virtual void
+   initializeOperatorState(
+      const SAMRAIVectorReal<double>& solution,
+      const SAMRAIVectorReal<double>& rhs);
+
+   virtual void
+   deallocateOperatorState();
+
+   virtual void
+   postprocessOneCycle(
+      int fac_cycle_num,
+      const SAMRAIVectorReal<double>& current_soln,
+      const SAMRAIVectorReal<double>& residual);
+
+   //@}
+
+private:
+   //@{
+   /*!
+    * @name Private workhorse functions.
+    */
+
+   /*!
+    * @brief Red-black Gauss-Seidel error smoothing on a level.
+    *
+    * Smoothes on the residual equation @f$ Ae=r @f$ on a level.
+    *
+    * @param error error vector
+    * @param residual residual vector
+    * @param ln level number
+    * @param num_sweeps number of sweeps
+    * @param residual_tolerance the maximum residual considered to be
+    *        converged
+    */
+   void
+   smoothErrorByRedBlack(
+      SAMRAIVectorReal<double>& error,
+      const SAMRAIVectorReal<double>& residual,
+      int ln,
+      int num_sweeps,
+      double residual_tolerance = -1.0);
+
+   /*!
+    * @brief Solve the coarsest level using HYPRE
+    */
+   int
+   solveCoarsestLevel_HYPRE(
+      SAMRAIVectorReal<double>& error,
+      const SAMRAIVectorReal<double>& residual,
+      int ln);
+
+   /*!
+    * @brief Fix flux per Ewing's coarse-fine boundary treatment.
+    *
+    * Ewing's coarse-fine boundary treatment can be implemented
+    * using a constant refinement into the fine-grid ghost boundary,
+    * naively computing the flux using the constant-refined data then
+    * fixing up the flux to correct the error.
+    *
+    * To use this function
+    * -# you must use constant refinement to fill the fine level ghost cells
+    * -# the flux must first be computed and stored
+    *
+    * @param patch patch
+    * @param soln_data cell-centered solution data
+    * @param flux_data side-centered flux data
+    * @param diffcoef_data side-centered diffusion coefficient data
+    * @param cfb coarse-fine boundary object for the level
+    *        in which patch resides
+    * @param ratio_to_coarser Refinement ratio to the next coarser level.
+    */
+   void
+   ewingFixFlux(
+      const hier::Patch& patch,
+      const pdat::CellData<double>& soln_data,
+      pdat::SideData<double>& flux_data,
+      const hier::IntVector& ratio_to_coarser) const;
+
+   /*!
+    * @brief AMR-unaware function to compute residual on a single patch,
+    * with variable scalar field.
+    *
+    * @param patch patch
+    * @param flux_data side-centered flux data
+    * @param soln_data cell-centered solution data
+    * @param rhs_data cell-centered rhs data
+    * @param residual_data cell-centered residual data
+    */
+   void
+   computeResidualOnPatch(
+      const hier::Patch& patch,
+      const pdat::SideData<double>& flux_data,
+      const pdat::CellData<double>& soln_data,
+      const pdat::CellData<double>& rhs_data,
+      pdat::CellData<double>& residual_data) const;
+
+   /*!
+    * @brief AMR-unaware function to red or black smoothing on a single patch,
+    * for variable diffusion coefficient and variable scalar field.
+    *
+    * @param patch patch
+    * @param flux_data side-centered flux data
+    * @param rhs_data cell-centered rhs data
+    * @param scalar_field_data
+    *        cell-centered scalar field data
+    * @param soln_data cell-centered solution data
+    * @param red_or_black red-black switch.  Set to 'r' or 'b'.
+    * @param p_maxres max residual output.  Set to NULL to avoid computing.
+    */
+   void
+   redOrBlackSmoothingOnPatch(
+      const hier::Patch& patch,
+      const pdat::SideData<double>& flux_data,
+      const pdat::CellData<double>& rhs_data,
+      pdat::CellData<double>& soln_data,
+      char red_or_black,
+      double* p_maxres = NULL) const;
+
+   //@}
+
+   //@{ @name For executing, caching and resetting communication schedules.
+
+   /*!
+    * @brief Execute a refinement schedule
+    * for prolonging cell data.
+    *
+    * General notes regarding internal objects for communication:
+    * We maintain objects to support caching schedules to improve
+    * efficiency.  Communication is needed in 5 distinct tasks.
+    *   -# Prolongation
+    *   -# Restriction
+    *   -# Flux coarsening.  Changing the coarse grid flux to the
+    *      composite grid flux by coarsening the fine grid flux
+    *      at the coarse-fine boundaries.
+    *   -# Fill boundary data from other patches in the same level
+    *      and physical boundary condition.
+    *   -# Fill boundary data from same level, coarser levels
+    *      and physical boundary condition.
+    *
+    * For each task, we maintain a refine or coarsen operator,
+    * and a array of communication schedules (one for each
+    * destination level).
+    *
+    * The 5 member functions named @c xeqSchedule... execute
+    * communication schedules appropriate for five specific tasks.
+    * They use a cached schedule if possible or create and cache
+    * a new schedule if needed.  These functions and the data
+    * they manipulate are as follows:
+    * <ol>
+    *   <li> xeqScheduleProlongation():
+    *        d_prolongation_refine_operator
+    *        d_prolongation_refine_schedules
+    *   <li> xeqScheduleURestriction():
+    *        d_restriction_coarsen_operator,
+    *        d_urestriction_coarsen_schedules.
+    *   <li> xeqScheduleRRestriction():
+    *        d_restriction_coarsen_operator,
+    *        d_rrestriction_coarsen_schedules.
+    *   <li> xeqScheduleFluxCoarsen():
+    *        d_flux_coarsen_operator,
+    *        d_flux_coarsen_schedules.
+    *   <li> xeqScheduleGhostFill():
+    *        d_ghostfill_refine_operator,
+    *        d_ghostfill_refine_schedules.
+    *   <li> xeqScheduleGhostFillNoCoarse():
+    *        d_ghostfill_nocoarse_refine_operator,
+    *        d_ghostfill_nocoarse_refine_schedules.
+    * </ol>
+    *
+    * @return refinement schedule for prolongation
+    */
+   void
+   xeqScheduleProlongation(
+      int dst_id,
+      int src_id,
+      int scr_id,
+      int dest_ln);
+
+   /*!
+    * @brief Execute schedule for restricting solution to the specified
+    * level or reregister an existing one.
+    *
+    * See general notes for xeqScheduleProlongation().
+    *
+    * @return coarsening schedule for restriction
+    */
+   void
+   xeqScheduleURestriction(
+      int dst_id,
+      int src_id,
+      int dest_ln);
+
+   /*!
+    * @brief Execute schedule for restricting residual to the specified
+    * level or reregister an existing one.
+    *
+    * See general notes for xeqScheduleProlongation().
+    *
+    * @return coarsening schedule for restriction
+    */
+   void
+   xeqScheduleRRestriction(
+      int dst_id,
+      int src_id,
+      int dest_ln);
+
+   /*!
+    * @brief Execute schedule for coarsening flux to the specified
+    * level or reregister an existing one.
+    *
+    * See general notes for xeqScheduleProlongation().
+    *
+    * @return coarsening schedule for setting composite grid flux at
+    * coarse-fine boundaries.
+    */
+   void
+   xeqScheduleFluxCoarsen(
+      int dst_id,
+      int src_id,
+      int dest_ln);
+
+   /*!
+    * @brief Execute schedule for filling ghosts on the specified
+    * level or reregister an existing one.
+    *
+    * See general notes for xeqScheduleProlongation().
+    *
+    * @return refine schedule for filling ghost data from coarser level
+    * and physical bc.
+    */
+   void
+   xeqScheduleGhostFill(
+      int dst_id,
+      int dest_ln);
+
+   /*!
+    * @brief Execute schedule for filling ghosts on the specified
+    * level or reregister an existing one.
+    * This version does not get data from coarser levels.
+    *
+    * See general notes for xeqScheduleProlongation().
+    *
+    * This function is used for the bottom solve level, since it does
+    * not access data from any coarser level.  (Ghost data obtained
+    * from coarser level must have been placed there before solve begins!)
+    *
+    * @return refine schedule for filling ghost data from same level
+    * and physical bc.
+    */
+   void
+   xeqScheduleGhostFillNoCoarse(
+      int dst_id,
+      int dest_ln);
+
+   //@}
+
+   //! @brief Return the patch data index for cell scratch data.
+   int
+   registerCellScratch() const;
+   //! @brief Return the patch data index for flux scratch data.
+   int
+   registerFluxScratch() const;
+   //! @brief Return the patch data index for outerflux scratch data.
+   int
+   registerOfluxScratch() const;
+
+   //! @brief Free static variables at shutdown time.
+   static void
+   finalizeCallback();
+
+   /*!
+    * @brief Object dimension.
+    */
+   const tbox::Dimension d_dim;
+
+   /*!
+    * @brief Object name.
+    */
+   std::string d_object_name;
+
+   //@{ @name Hierarchy-dependent objects.
+
+   /*!
+    * @brief Reference hierarchy
+    *
+    * This variable is non-null between the initializeOperatorState()
+    * and deallocateOperatorState() calls.  It is not truly needed,
+    * because the hierarchy is obtainable through variables in most
+    * function argument lists.  We use it to enforce working on one
+    * hierarchy at a time.
+    */
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+
+   /*!
+    * @brief Coarsest level for solve.
+    */
+   int d_ln_min;
+
+   /*!
+    * @brief Finest level for solve.
+    */
+   int d_ln_max;
+
+   /*!
+    * @brief Description of coarse-fine boundaries.
+    *
+    * There is one coarse-fine boundary object for each level.
+    * d_coarse_fine_boundary[i] is the description of
+    * the coarse-fine boundary between level i and level i-1.
+    * The coarse-fine boundary does not exist at the coarsest level,
+    * although the hier::CoarseFineBoundary object still exists (it
+    * should not contain any boxes).
+    *
+    * This array is initialized in initializeOperatorState() and
+    * deallocated in deallocateOperatorState().  When allocated,
+    * it is allocated for the index range [0,d_ln_max], though
+    * the range [0,d_ln_min-1] is not used.  This is okay because
+    * hier::CoarseFineBoundary is a light object before
+    * it is set for a level.
+    */
+   tbox::Array<tbox::Pointer<hier::CoarseFineBoundary> > d_cf_boundary;
+
+   //@}
+
+   //@{
+   /*!
+    * @name Private state variables for solution process.
+    */
+
+   /*!
+    * @brief Scalar Poisson equations specifications.
+    * @see setPoissonSpecifications().
+    */
+   PoissonSpecifications d_poisson_spec;
+
+   /*!
+    * @brief Smoothing choice.
+    * @see setSmoothingChoice.
+    */
+   std::string d_smoothing_choice;
+
+   /*!
+    * @brief Coarse level solver.
+    * @see setCoarsestLevelSolverChoice
+    */
+   std::string d_coarse_solver_choice;
+
+   /*!
+    * @brief Coarse-fine discretization method.
+    * @see setCoarseFineDiscretization().
+    */
+   std::string d_cf_discretization;
+
+   /*!
+    * @brief Coarse-fine discretization method.
+    *
+    * The name of the refinement operator used to prolong the
+    * coarse grid correction.
+    *
+    * @see setProlongationMethod()
+    */
+   std::string d_prolongation_method;
+
+   /*!
+    * @brief Tolerance specified to coarse solver
+    * @see setCoarsestLevelSolverTolerance()
+    */
+   double d_coarse_solver_tolerance;
+
+   /*!
+    * @brief Coarse level solver iteration limit.
+    * @see setCoarsestLevelSolverMaxIterations()
+    */
+   int d_coarse_solver_max_iterations;
+
+   /*!
+    * @brief Residual tolerance to govern smoothing.
+    *
+    * When we use one of the internal error smoothing functions
+    * and want to terminate the smoothing sweeps at a certain
+    * level of residual, this will be set to > 0.  If it is
+    * < 0, the smoothing function effectively ignores it.
+    *
+    * This variable is needed because some coarse-level solver
+    * simply runs the smoothing function until convergence.
+    * It sets this variable to > 0, calls the smoothing function,
+    * then resets it to < 0.
+    */
+   double d_residual_tolerance_during_smoothing;
+
+   /*!
+    * @brief Id of the flux.
+    *
+    * If set to -1, create and delete storage space on the fly.
+    * Else, user has provided space for flux.
+    *
+    * @see setFluxId
+    */
+   int d_flux_id;
+
+#ifdef HAVE_HYPRE
+   /*!
+    * @brief HYPRE coarse-level solver object.
+    */
+   CellPoissonHypreSolver d_hypre_solver;
+#endif
+
+   /*!
+    * @brief Externally provided physical boundary condition object.
+    *
+    * see setPhysicalBcCoefObject()
+    */
+   const RobinBcCoefStrategy* d_physical_bc_coef;
+
+   //@}
+
+   //@{ @name Internal context and scratch data
+
+   static tbox::Pointer<pdat::CellVariable<double> >
+   s_cell_scratch_var[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   static tbox::Pointer<pdat::SideVariable<double> >
+   s_flux_scratch_var[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   static tbox::Pointer<pdat::OutersideVariable<double> >
+   s_oflux_scratch_var[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   /*!
+    * @brief Default context of internally maintained hierarchy data.
+    */
+   tbox::Pointer<hier::VariableContext> d_context;
+
+   /*!
+    * @brief ID of the solution-like scratch data.
+    *
+    * Set in constructor and never changed.
+    * Corresponds to a pdat::CellVariable<double> named
+    * @c d_object_name+"::cell_scratch".
+    * Scratch data is allocated and removed as needed
+    * to reduce memory usage.
+    */
+   int d_cell_scratch_id;
+
+   /*!
+    * @brief ID of the side-centered scratch data.
+    *
+    * Set in constructor and never changed.
+    * Corresponds to a pdat::SideVariable<double> named
+    * @c d_object_name+"::flux_scratch".
+    *
+    * This data is allocated only as needed and deallocated
+    * immediately after use.
+    */
+   int d_flux_scratch_id;
+
+   /*!
+    * @brief ID of the outerside-centered scratch data.
+    *
+    * Set in constructor and never changed.
+    * Corresponds to a pdat::OutersideVariable<double> named
+    * @c d_object_name+"::oflux_scratch".
+    */
+   int d_oflux_scratch_id;
+
+   //@}
+
+   //@{
+   /*!
+    * @name Various refine and coarsen objects used internally.
+    */
+
+   //! @brief Error prolongation (refinement) operator.
+   tbox::Pointer<xfer::RefineOperator> d_prolongation_refine_operator;
+   tbox::Pointer<xfer::RefineAlgorithm> d_prolongation_refine_algorithm;
+   tbox::Array<tbox::Pointer<xfer::RefineSchedule> >
+   d_prolongation_refine_schedules;
+
+   //! @brief Solution restriction (coarsening) operator.
+   tbox::Pointer<xfer::CoarsenOperator> d_urestriction_coarsen_operator;
+   tbox::Pointer<xfer::CoarsenAlgorithm> d_urestriction_coarsen_algorithm;
+   tbox::Array<tbox::Pointer<xfer::CoarsenSchedule> >
+   d_urestriction_coarsen_schedules;
+
+   //! @brief Residual restriction (coarsening) operator.
+   tbox::Pointer<xfer::CoarsenOperator> d_rrestriction_coarsen_operator;
+   tbox::Pointer<xfer::CoarsenAlgorithm> d_rrestriction_coarsen_algorithm;
+   tbox::Array<tbox::Pointer<xfer::CoarsenSchedule> >
+   d_rrestriction_coarsen_schedules;
+
+   //! @brief Coarsen operator for outerflux-to-flux
+   tbox::Pointer<xfer::CoarsenOperator> d_flux_coarsen_operator;
+   tbox::Pointer<xfer::CoarsenAlgorithm> d_flux_coarsen_algorithm;
+   tbox::Array<tbox::Pointer<xfer::CoarsenSchedule> >
+   d_flux_coarsen_schedules;
+
+   //! @brief Refine operator for cell-like data from coarser level.
+   tbox::Pointer<xfer::RefineOperator> d_ghostfill_refine_operator;
+   tbox::Pointer<xfer::RefineAlgorithm> d_ghostfill_refine_algorithm;
+   tbox::Array<tbox::Pointer<xfer::RefineSchedule> >
+   d_ghostfill_refine_schedules;
+
+   //! @brief Refine operator for cell-like data from same level.
+   tbox::Pointer<xfer::RefineOperator> d_ghostfill_nocoarse_refine_operator;
+   tbox::Pointer<xfer::RefineAlgorithm> d_ghostfill_nocoarse_refine_algorithm;
+   tbox::Array<tbox::Pointer<xfer::RefineSchedule> >
+   d_ghostfill_nocoarse_refine_schedules;
+
+   //@}
+
+   /*!
+    * @brief Utility object employed in setting ghost cells and providing
+    * xfer::RefinePatchStrategy implementation.
+    *
+    * Since this class deals only in scalar variables having
+    * Robin boundary conditions, we take advantage of the corresponding
+    * implementation in CartesianRobinBcHelper.  Whenever
+    * we need an implementation of xfer::RefinePatchStrategy,
+    * this object is used.  Note that in the code, before we
+    * use this object to set ghost cell values, directly or
+    * indirectly by calling xfer::RefineSchedule::fillData(),
+    * we must tell d_bc_helper the patch data index we want
+    * to set and whether we are setting data with homogeneous
+    * boundary condition.
+    */
+   CartesianRobinBcHelper d_bc_helper;
+
+   //@{
+   /*!
+    * @name Non-essential objects used in outputs and debugging.
+    */
+
+   /*!
+    * @brief Logging flag.
+    */
+   bool d_enable_logging;
+
+   /*!
+    * @brief Preconditioner using this object.
+    *
+    * See setPreconditioner().
+    */
+   const FACPreconditioner* d_preconditioner;
+
+   /*!
+    * @brief Hierarchy cell operator used in debugging.
+    */
+   tbox::Pointer<math::HierarchyCellDataOpsReal<double> > d_hopscell;
+
+   /*!
+    * @brief Hierarchy side operator used in debugging.
+    */
+   tbox::Pointer<math::HierarchySideDataOpsReal<double> > d_hopsside;
+
+   /*!
+    * @brief Timers for performance measurement.
+    */
+   tbox::Pointer<tbox::Timer> t_restrict_solution;
+   tbox::Pointer<tbox::Timer> t_restrict_residual;
+   tbox::Pointer<tbox::Timer> t_prolong;
+   tbox::Pointer<tbox::Timer> t_smooth_error;
+   tbox::Pointer<tbox::Timer> t_solve_coarsest;
+   tbox::Pointer<tbox::Timer> t_compute_composite_residual;
+   tbox::Pointer<tbox::Timer> t_compute_residual_norm;
+
+   static tbox::StartupShutdownManager::Handler
+   s_finalize_handler;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/solv/CellPoissonFACOps.I"
+#endif
+
+#endif // included_solv_CellPoissonFACOps
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/CellPoissonFACSolver.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/CellPoissonFACSolver.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,585 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   High-level solver (wrapper) for scalar poisson equation. 
+ *
+ ************************************************************************/
+#ifndef included_solv_CellPoissonFACSolver_C
+#define included_solv_CellPoissonFACSolver_C
+
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/solv/CellPoissonFACSolver.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+
+#include IOMANIP_HEADER_FILE
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/solv/CellPoissonFACSolver.I"
+#endif
+
+namespace SAMRAI {
+namespace solv {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialize the static data members.                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool CellPoissonFACSolver::s_initialized = 0;
+int CellPoissonFACSolver::s_weight_id[SAMRAI::tbox::Dimension::
+                                      MAXIMUM_DIMENSION_VALUE];
+int CellPoissonFACSolver::s_instance_counter[SAMRAI::tbox::Dimension::
+                                             MAXIMUM_DIMENSION_VALUE];
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor sets uninitialized solver state.                          *
+ * Set default iteration and convergence parameters.                     *
+ *                                                                       *
+ * By default settings:                                                  *
+ *   - Poisson equation specified has D=1, C=0.                          *
+ *   - State is uninitialized                                            *
+ *   - Logging is disabled                                               *
+ *   - Context for internal data is set based on object name.            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+CellPoissonFACSolver::CellPoissonFACSolver(
+   const tbox::Dimension& dim,
+   const std::string& object_name,
+   tbox::Pointer<tbox::Database> database):
+   d_dim(dim),
+   d_object_name(object_name),
+   d_poisson_spec(object_name + "::poisson_spec"),
+   d_fac_ops(d_dim, object_name + "::fac_ops"),
+   d_fac_precond(object_name + "::fac_precond", d_fac_ops),
+   d_bc_object(NULL),
+   d_simple_bc(d_dim, object_name + "::bc"),
+   d_hierarchy(NULL),
+   d_ln_min(-1),
+   d_ln_max(-1),
+   d_context(hier::VariableDatabase::getDatabase()
+             ->getContext(object_name + "::CONTEXT")),
+   d_uv(NULL),
+   d_fv(NULL),
+   d_solver_is_initialized(false),
+   d_enable_logging(false)
+{
+
+   if (!s_initialized) {
+      initializeStatics();
+   }
+
+   setMaxCycles(10);
+   setResidualTolerance(1e-6);
+   setPresmoothingSweeps(1);
+   setPostsmoothingSweeps(1);
+   setCoarseFineDiscretization("Ewing");
+#ifdef HAVE_HYPRE
+   setCoarsestLevelSolverChoice("hypre");
+   setCoarsestLevelSolverTolerance(1e-10);
+   setCoarsestLevelSolverMaxIterations(20);
+   setUseSMG(true);
+#else
+   setCoarsestLevelSolverChoice("redblack");
+   setCoarsestLevelSolverTolerance(1e-8);
+   setCoarsestLevelSolverMaxIterations(500);
+#endif
+
+   /*
+    * Construct integer tag variables and add to variable database.  Note that
+    * variables and patch data indices are shared among all instances.
+    * The VariableDatabase holds the variables, once contructed and
+    * registered via the VariableDatabase::registerInternalSAMRAIVariable()
+    * function call.  Note that variables are registered and patch data indices
+    * are made only for the first time through the constructor.
+    */
+   hier::VariableDatabase* var_db = hier::VariableDatabase::getDatabase();
+
+   static std::string weight_variable_name("CellPoissonFACSolver_weight");
+
+   tbox::Pointer<pdat::CellVariable<double> > weight = var_db->getVariable(
+         weight_variable_name);
+   if (weight.isNull()) {
+      weight = new pdat::CellVariable<double>(d_dim, weight_variable_name, 1);
+   }
+
+   if (s_weight_id[d_dim.getValue() - 1] < 0) {
+      s_weight_id[d_dim.getValue() - 1] = var_db->registerInternalSAMRAIVariable(
+            weight,
+            hier::IntVector::getZero(d_dim));
+   }
+
+   /*
+    * The default RobinBcCoefStrategy used,
+    * SimpleCellRobinBcCoefs only works with constant refine
+    * for prolongation.  So we use constant refinement
+    * for prolongation by default.
+    */
+   setProlongationMethod("CONSTANT_REFINE");
+
+   /*
+    * The FAC operator optionally uses the preconditioner
+    * to get data for logging.
+    */
+   d_fac_ops.setPreconditioner((const FACPreconditioner *)(&d_fac_precond));
+
+   if (database) {
+      getFromInput(database);
+   }
+
+   s_instance_counter[d_dim.getValue() - 1]++;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destructor for CellPoissonFACSolver.                            *
+ * Deallocate internal data.                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+CellPoissonFACSolver::~CellPoissonFACSolver()
+{
+   s_instance_counter[d_dim.getValue() - 1]--;
+
+   deallocateSolverState();
+
+   if (s_instance_counter[d_dim.getValue() - 1] == 0) {
+      hier::VariableDatabase::getDatabase()->
+      removeInternalSAMRAIVariablePatchDataIndex(s_weight_id[d_dim.getValue() - 1]);
+      s_weight_id[d_dim.getValue() - 1] = -1;
+   }
+}
+
+/*
+ ********************************************************************
+ * Set state from database                                          *
+ *                                                                  *
+ * Do not allow FAC preconditioner and Poisson FAC operators to be  *
+ * set from database, as that may cause them to be inconsistent     *
+ * with this object if user does not coordinate the inputs          *
+ * correctly.  This is also why we don't allow direct access to     *
+ * those objects.  The responsibility for maintaining consistency   *
+ * lies in the public functions to set parameters, so use them      *
+ * instead of setting the parameters directly in this function.     *
+ ********************************************************************
+ */
+
+void CellPoissonFACSolver::getFromInput(
+   tbox::Pointer<tbox::Database> database)
+{
+   if (database) {
+      if (database->isBool("enable_logging")) {
+         bool logging = database->getBool("enable_logging");
+         enableLogging(logging);
+      }
+      if (database->isInteger("max_cycles")) {
+         int max_cycles = database->getInteger("max_cycles");
+         setMaxCycles(max_cycles);
+      }
+      if (database->isDouble("residual_tol")) {
+         double residual_tol = database->getDouble("residual_tol");
+         setResidualTolerance(residual_tol);
+      }
+      if (database->isInteger("num_pre_sweeps")) {
+         int num_pre_sweeps = database->getInteger("num_pre_sweeps");
+         setPresmoothingSweeps(num_pre_sweeps);
+      }
+      if (database->isInteger("num_post_sweeps")) {
+         int num_post_sweeps = database->getInteger("num_post_sweeps");
+         setPostsmoothingSweeps(num_post_sweeps);
+      }
+      if (database->isString("coarse_fine_discretization")) {
+         std::string s = database->getString("coarse_fine_discretization");
+         setCoarseFineDiscretization(s);
+      }
+      if (database->isString("prolongation_method")) {
+         std::string s = database->getString("prolongation_method");
+         setProlongationMethod(s);
+      }
+      if (database->isString("coarse_solver_choice")) {
+         std::string s = database->getString("coarse_solver_choice");
+         setCoarsestLevelSolverChoice(s);
+      }
+      if (database->isDouble("coarse_solver_tolerance")) {
+         double tol = database->getDouble("coarse_solver_tolerance");
+         setCoarsestLevelSolverTolerance(tol);
+      }
+      if (database->isInteger("coarse_solver_max_iterations")) {
+         int itr = database->getInteger("coarse_solver_max_iterations");
+         setCoarsestLevelSolverMaxIterations(itr);
+      }
+#ifdef HAVE_HYPRE
+      if (database->isBool("use_smg")) {
+         bool smg = database->getBool("use_smg");
+         setUseSMG(smg);
+      }
+#endif
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Prepare internal data for solve.                                      *
+ * Allocate scratch data.  Create vectors for u and f                    *
+ * required by the FACPreconditioner interface.                    *
+ * Set up internal boundary condition object.                            *
+ * Share data to coordinate with FAC preconditioner and                  *
+ * Poisson FAC operator.                                                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CellPoissonFACSolver::initializeSolverState(
+   const int solution,
+   const int rhs,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int coarse_level,
+   const int fine_level)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *hierarchy);
+
+   if (d_bc_object == NULL) {
+      TBOX_ERROR(
+         d_object_name << ": No BC coefficient strategy object!\n"
+         <<
+         "Use either setBoundaries or setPhysicalBcCoefObject\n"
+         << "to specify the boundary conidition.\n");
+   }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (solution < 0 || rhs < 0) {
+      TBOX_ERROR(d_object_name << ": Bad patch data id.\n");
+   }
+#endif
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (!hierarchy) {
+      TBOX_ERROR(d_object_name << ": NULL hierarchy pointer not allowed\n"
+                               << "in inititialization.");
+   }
+#endif
+   d_hierarchy = hierarchy;
+
+   d_ln_min = coarse_level;
+   d_ln_max = fine_level;
+   if (d_ln_min == -1) {
+      d_ln_min = 0;
+   }
+   if (d_ln_max == -1) {
+      d_ln_max = d_hierarchy->getFinestLevelNumber();
+   }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_ln_min < 0 || d_ln_max < 0 || d_ln_min > d_ln_max) {
+      TBOX_ERROR(d_object_name << ": Bad range of levels in\n"
+                               << "inititialization.\n");
+   }
+#endif
+
+   int ln;
+   for (ln = d_ln_min; ln <= d_ln_max; ++ln) {
+      d_hierarchy->getPatchLevel(ln)->allocatePatchData(s_weight_id[d_dim.getValue() - 1]);
+   }
+
+   d_fac_ops.computeVectorWeights(d_hierarchy,
+      s_weight_id[d_dim.getValue() - 1],
+      d_ln_min,
+      d_ln_max);
+
+   if (d_bc_object == &d_simple_bc) {
+      d_simple_bc.setHierarchy(d_hierarchy,
+         d_ln_min,
+         d_ln_max);
+      if (d_poisson_spec.dIsConstant()) {
+         d_simple_bc.setDiffusionCoefConstant(d_poisson_spec.getDConstant());
+      } else {
+         d_simple_bc.setDiffusionCoefId(d_poisson_spec.getDPatchDataId());
+      }
+   }
+
+   d_fac_ops.setPoissonSpecifications(d_poisson_spec);
+
+   createVectorWrappers(solution, rhs);
+
+   d_fac_precond.initializeSolverState(*d_uv, *d_fv);
+
+   d_solver_is_initialized = true;
+}
+
+void CellPoissonFACSolver::deallocateSolverState()
+{
+   if (d_hierarchy) {
+
+      d_fac_precond.deallocateSolverState();
+
+      /*
+       * Delete internally managed data.
+       */
+      int ln;
+      for (ln = d_ln_min; ln <= d_ln_max; ++ln) {
+         d_hierarchy->getPatchLevel(ln)->deallocatePatchData(s_weight_id[d_dim.getValue()
+                                                                         - 1]);
+      }
+
+      d_hierarchy.setNull();
+      d_ln_min = -1;
+      d_ln_max = -1;
+      d_solver_is_initialized = false;
+
+      destroyVectorWrappers();
+
+   }
+}
+
+/*
+ *************************************************************************
+ * Enable logging and propagate logging flag to major components.        *
+ *************************************************************************
+ */
+
+void CellPoissonFACSolver::enableLogging(
+   bool logging)
+{
+   d_enable_logging = logging;
+   d_fac_precond.enableLogging(d_enable_logging);
+   d_fac_ops.enableLogging(d_enable_logging);
+}
+
+void CellPoissonFACSolver::setBoundaries(
+   const std::string& boundary_type,
+   const int fluxes,
+   const int flags,
+   int* bdry_types)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_bc_object != NULL && d_bc_object != &d_simple_bc) {
+      TBOX_ERROR(
+         d_object_name << ": Bad attempt to set boundary condition\n"
+         <<
+         "by using default bc object after it has been overriden.\n");
+   }
+#endif
+   d_simple_bc.setBoundaries(boundary_type,
+      fluxes,
+      flags,
+      bdry_types);
+   d_bc_object = &d_simple_bc;
+   d_fac_ops.setPhysicalBcCoefObject(d_bc_object);
+}
+
+void CellPoissonFACSolver::setBcObject(
+   const RobinBcCoefStrategy* bc_object)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (!bc_object) {
+      TBOX_ERROR(d_object_name << ": NULL pointer for boundary condition\n"
+                               << "object.\n");
+   }
+#endif
+   d_bc_object = bc_object;
+   d_fac_ops.setPhysicalBcCoefObject(d_bc_object);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Solve the linear system and report whether iteration converged.       *
+ *                                                                       *
+ * This version is for an initialized solver state.                      *
+ * Before solving, set the final piece of the boundary condition,        *
+ * which is not known until now, and initialize some internal            *
+ * solver quantities.                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool CellPoissonFACSolver::solveSystem(
+   const int u,
+   const int f)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (!d_solver_is_initialized) {
+      TBOX_ERROR(
+         d_object_name << ".solveSystem(int,int): uninitialized\n"
+         <<
+         "solver state.  You must call initializeSolverState()\n"
+         <<
+         "before using this function.  Or you can use\n"
+         <<
+         "solveSystem(int,int,...) to initialize the solver,\n"
+         << "solve and deallocate the solver.\n");
+   }
+   if (u < 0 || f < 0) {
+      TBOX_ERROR(d_object_name << ": Bad patch data id.\n");
+   }
+#endif
+   if (d_bc_object == &d_simple_bc) {
+      /*
+       * Knowing that we are using the SimpelCellRobinBcCoefsX
+       * implementation of RobinBcCoefStrategy, we must save
+       * the ghost data in u before solving.
+       * The solver overwrites it, but SimpleCellRobinBcCoefs
+       * needs to get to access it repeatedly.
+       */
+      d_simple_bc.cacheDirichletData(u);
+   }
+
+   createVectorWrappers(u, f);
+   bool solver_rval;
+   solver_rval = d_fac_precond.solveSystem(*d_uv, *d_fv);
+
+   if (d_bc_object == &d_simple_bc) {
+      /*
+       * Restore the Dirichlet cell data that were overwritten by the
+       * solve process.  We do this to be backward compatible with the
+       * user code.
+       */
+      d_simple_bc.restoreDirichletData(u);
+   }
+
+   return solver_rval;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Solve the linear system and report whether iteration converged.       *
+ *                                                                       *
+ * This version is for an uninitialized solver state.                    *
+ * 1. Initialize the (currently uninitialized) solver state.             *
+ * 2. Solve.                                                             *
+ * 3. Deallocate the solver state.                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool CellPoissonFACSolver::solveSystem(
+   const int u,
+   const int f,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int coarse_ln,
+   int fine_ln)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *hierarchy);
+
+   if (d_enable_logging) {
+      tbox::plog << "CellPoissonFACSolver::solveSystem (" << d_object_name
+                 << ")\n";
+      d_poisson_spec.printClassData(tbox::plog);
+   }
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_solver_is_initialized) {
+      TBOX_ERROR(
+         d_object_name << ".solveSystem(int,int,...): initialized\n"
+         <<
+         "solver state.  This function can only used when the\n"
+         <<
+         "solver state is uninitialized.  You should deallocate\n"
+         <<
+         "the solver state or use solveSystem(int,int).\n");
+   }
+   if (!hierarchy) {
+      TBOX_ERROR(d_object_name << ".solveSystem(): Null hierarchy\n"
+                               << "specified.\n");
+   }
+#endif
+   initializeSolverState(u, f, hierarchy, coarse_ln, fine_ln);
+
+   bool solver_rval;
+   solver_rval = solveSystem(u, f);
+
+   deallocateSolverState();
+
+   return solver_rval;
+}
+
+void CellPoissonFACSolver::createVectorWrappers(
+   int u,
+   int f) {
+
+   hier::VariableDatabase& vdb(*hier::VariableDatabase::getDatabase());
+   tbox::Pointer<hier::Variable> variable;
+
+   if (!d_uv || d_uv->getComponentDescriptorIndex(0) != u) {
+      d_uv.setNull();
+      d_uv = new SAMRAIVectorReal<double>(d_object_name + "::uv",
+                                          d_hierarchy,
+                                          d_ln_min,
+                                          d_ln_max);
+      vdb.mapIndexToVariable(u, variable);
+#ifdef DEBUG_CHECK_ASSERTIONS
+      if (!variable) {
+         TBOX_ERROR(d_object_name << ": No variable for patch data index "
+                                  << u << "\n");
+      }
+      tbox::Pointer<pdat::CellVariable<double> > cell_variable = variable;
+      if (!cell_variable) {
+         TBOX_ERROR(d_object_name << ": hier::Patch data index " << u
+                                  << " is not a cell-double variable.\n");
+      }
+#endif
+      d_uv->addComponent(variable, u, s_weight_id[d_dim.getValue() - 1]);
+   }
+
+   if (!d_fv || d_fv->getComponentDescriptorIndex(0) != f) {
+      d_fv.setNull();
+      d_fv = new SAMRAIVectorReal<double>(d_object_name + "::fv",
+                                          d_hierarchy,
+                                          d_ln_min,
+                                          d_ln_max);
+      vdb.mapIndexToVariable(f, variable);
+#ifdef DEBUG_CHECK_ASSERTIONS
+      if (!variable) {
+         TBOX_ERROR(d_object_name << ": No variable for patch data index "
+                                  << f << "\n");
+      }
+      tbox::Pointer<pdat::CellVariable<double> > cell_variable = variable;
+      if (!cell_variable) {
+         TBOX_ERROR(d_object_name << ": hier::Patch data index " << f
+                                  << " is not a cell-double variable.\n");
+      }
+#endif
+      d_fv->addComponent(variable, f, s_weight_id[d_dim.getValue() - 1]);
+   }
+}
+
+/*
+ ***********************************************************************
+ * Delete the vector wrappers.  Do not freeVectorComponents because    *
+ * we do not control their data allocation.  The user does that.       *
+ ***********************************************************************
+ */
+void CellPoissonFACSolver::destroyVectorWrappers() {
+   d_uv.setNull();
+   d_fv.setNull();
+}
+
+void CellPoissonFACSolver::initializeStatics() {
+
+   for (int d = 0; d < SAMRAI::tbox::Dimension::MAXIMUM_DIMENSION_VALUE; ++d) {
+      s_weight_id[d] = -1;
+      s_instance_counter[d] = -1;
+   }
+
+   s_initialized = 1;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/CellPoissonFACSolver.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/CellPoissonFACSolver.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,142 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   High-level solver (wrapper) for scalar poisson equation. 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+namespace solv {
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACSolver::setDPatchDataId(
+   int id) {
+   d_poisson_spec.setDPatchDataId(id);
+}
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACSolver::setDConstant(
+   double scalar) {
+   d_poisson_spec.setDConstant(scalar);
+}
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACSolver::setCPatchDataId(
+   int id) {
+   d_poisson_spec.setCPatchDataId(id);
+}
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACSolver::setCConstant(
+   double scalar) {
+// Disable Intel warning on real comparison
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1572)
+#endif
+   if (scalar == 0.0) {
+      d_poisson_spec.setCZero();
+   } else {
+      d_poisson_spec.setCConstant(scalar);
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACSolver::setProlongationMethod(
+   const std::string& prolongation_method)
+{
+   d_fac_ops.setProlongationMethod(prolongation_method);
+}
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACSolver::setCoarsestLevelSolverChoice(
+   const std::string& choice)
+{
+   d_fac_ops.setCoarsestLevelSolverChoice(choice);
+}
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACSolver::setCoarsestLevelSolverTolerance(
+   double tol)
+{
+   d_fac_ops.setCoarsestLevelSolverTolerance(tol);
+}
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACSolver::setCoarsestLevelSolverMaxIterations(
+   int max_iterations)
+{
+   d_fac_ops.setCoarsestLevelSolverMaxIterations(max_iterations);
+}
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACSolver::setCoarseFineDiscretization(
+   const std::string& coarsefine_method)
+{
+   d_fac_ops.setCoarseFineDiscretization(coarsefine_method);
+}
+
+#ifdef HAVE_HYPRE
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACSolver::setUseSMG(
+   bool use_smg)
+{
+   if (d_solver_is_initialized) {
+      TBOX_ERROR(
+         d_object_name << ": setUseSMG(bool) may NOT be called\n"
+         <<
+         "while the solver state is initialized, as that\n"
+         << "would lead to a corrupted solver state.\n");
+   }
+   d_fac_ops.setUseSMG(use_smg);
+}
+#endif
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACSolver::setPresmoothingSweeps(
+   int num_pre_sweeps) {
+   d_fac_precond.setPresmoothingSweeps(num_pre_sweeps);
+}
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACSolver::setPostsmoothingSweeps(
+   int num_post_sweeps) {
+   d_fac_precond.setPostsmoothingSweeps(num_post_sweeps);
+}
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACSolver::setMaxCycles(
+   int max_cycles) {
+   d_fac_precond.setMaxCycles(max_cycles);
+}
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACSolver::setResidualTolerance(
+   double residual_tol) {
+   d_fac_precond.setResidualTolerance(residual_tol);
+}
+
+SAMRAI_INLINE_KEYWORD
+int CellPoissonFACSolver::getNumberOfIterations() const
+{
+   return d_fac_precond.getNumberOfIterations();
+}
+
+SAMRAI_INLINE_KEYWORD
+double CellPoissonFACSolver::getResidualNorm() const
+{
+   return d_fac_precond.getResidualNorm();
+}
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonFACSolver::getConvergenceFactors(
+   double& avg_factor,
+   double& final_factor)
+const
+{
+   d_fac_precond.getConvergenceFactors(avg_factor, final_factor);
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/CellPoissonFACSolver.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/CellPoissonFACSolver.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,660 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   High-level solver (wrapper) for scalar poisson equation. 
+ *
+ ************************************************************************/
+#ifndef included_solv_CellPoissonFACSolver
+#define included_solv_CellPoissonFACSolver
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/solv/FACPreconditioner.h"
+#include "SAMRAI/solv/CellPoissonFACOps.h"
+#include "SAMRAI/solv/PoissonSpecifications.h"
+#include "SAMRAI/solv/SimpleCellRobinBcCoefs.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace solv {
+
+/*!
+ * @brief Class for solving scalar Poisson's equation on SAMR grid,
+ * wrapping up lower-level components (FAC cycling, Poisson equation
+ * operations and boundary conditions) in a single high-level interface.
+ *
+ * Note: this class provides a backward-compatible interface to
+ * the soon-to-be obsolete PoissonHierarchySolver<DIM> class.
+ * Although this class hides the lower-level components (FAC cycling,
+ * Poisson equation operations and boundary conditions), it is
+ * perfectly acceptable to use those lower-level components directly.
+ *
+ * We solve the equation
+ *    div(D grad(u)) + Cu = f
+ * where D is a side-centered array and C is a cell-centered array.
+ * u and f are also cell-centered.
+ * Boundary conditions supported are Dirichlet, Neumann and mixed
+ * (Dirichlet on some faces and Neumann on others).
+ *
+ * This class is a wrapper, providing a single class that coordinates
+ * three major components: the FAC solver, the cell-centered Poisson
+ * FAC operator and a default Robin bc coefficient implelemtation.
+ * It is perfectly acceptable to use those classes outside of this
+ * class.
+ *
+ * The underlying solver is an FAC solver using cell-centered
+ * discretization.  The difference scheme is second-order
+ * central-difference.  On coarse-fine boundaries within the
+ * solution levels, the composite grid operator uses, by default,
+ * the discretization method of Ewing, Lazarov and Vassilevski
+ * ("Local Refinement Techniques for Elliptic Problems on
+ * Cell-Centered Grids, I. Error Analysis", Mathematics of
+ * Computation, Vol. 56, No. 194, April 1991, pp. 437-461).
+ *
+ * Typical use of this class is:
+ * -# Construct a CellPoissonFACSolver object, providing it
+ *    the hierarchy and range of levels participating in the solve.
+ * -# Set the parameters C and D using the functions named @c setC...
+ *    and @c setD...  By default, D=1 and C=0 everywhere.
+ * -# Call setBoundaries() to state the types boundary conditions,
+ *    along with supplemental data for setting those boundary
+ *    conditions.
+ * -# Call initializeSolverState() to set up information
+ *    internal to the solver.  This is step is not required
+ *    but will save setup costs if you are making multiple
+ *    solves.  This commits the object to the current hierarchy state
+ *    and the specific @em types of boundary conditions you selected,
+ *    It does NOT commit to the specific @em values of the boundary
+ *    condition.  A hierarchy change (through adaption or other means)
+ *    invalidates the state, thus you must reinitialize or
+ *    deallocateSolverState() the state before another solve.
+ * -# Solve the equation with solveSystem().  You provide the
+ *    patch data indices for the solution u and the right hand
+ *    side f.  u must have at least one ghost cell and where
+ *    a Dirichlet boundary condition applies, those cells
+ *    must be set to the value on the boundary.  If only Neumann
+ *    boundary conditions are used, the ghost cell values
+ *    do not matter.
+ * -# Call deallocateSolverState() to free up internal resources,
+ *    if initializeSolverState() was called before the solve.
+ *
+ * After the solve, information on the solve can be obtained
+ * by calling one of these functions:
+ * - getNumberOfIterations() gives the number of FAC cycles used.
+ * - getConvergenceFactors() gives the average and final convergence
+ *   factors for the solve.
+ * - getResidualNorm() gives the final residual
+ *
+ * Finer solver controls can be set using the functions in this class.
+ *
+ * Object of this class can be set using input databases.
+ * The following parameters can be set.  Each is shown with its
+ * default value in the case where hypre is used.
+ * @verbatim
+ * enable_logging = TRUE // Bool flag to switch logging on/off
+ * max_cycles = 10       // Integer number of max FAC cycles to use
+ * residual_tol = 1.e-6  // Residual tolerance to solve for
+ * num_pre_sweeps = 1    // Number of presmoothing sweeps to use
+ * num_post_sweeps = 1   // Number of postsmoothing sweeps to use
+ * coarse_fine_discretization = "Ewing" // Name of coarse-fine discretization
+ * prolongation_method = "CONSTANT_REFINE" // Name of prolongation method
+ * coarse_solver_choice = "hypre"  // Name of coarse level solver
+ * coarse_solver_tolerance = 1e-10 // Coarse level tolerance
+ * coarse_solver_max_iterations = 20 // Coarse level max iterations
+ * use_smg = "FALSE"     // Whether to use hypre's smg solver
+ *                       // (alternative is the pfmg solver)
+ * @endverbatim
+ *
+ */
+class CellPoissonFACSolver
+{
+
+public:
+   /*!
+    * @brief Construct a solver.
+    *
+    * If the database is not NULL, initial settings will be set
+    * using the database.
+    * The solver is uninitialized until initializeSolverState()
+    * is called.
+    *
+    * @param object_name Name of object used in outputs
+    * @param database tbox::Database for initialization (may be NULL)
+    */
+   CellPoissonFACSolver(
+      const tbox::Dimension& dim,
+      const std::string& object_name,
+      tbox::Pointer<tbox::Database> database =
+         tbox::Pointer<tbox::Database>());
+
+   /*!
+    * @brief Destructor.
+    */
+   ~CellPoissonFACSolver(
+      void);
+
+   /*!
+    * @brief Enable logging.
+    *
+    * To disable, pass in @c false.
+    */
+   void
+   enableLogging(
+      bool logging);
+
+   /*!
+    * @brief Solve Poisson's equation, assuming an uninitialized
+    * solver state.
+    *
+    * Here, u is the "solution" patch data index and f is the
+    * right hand side patch data index.
+    * The return value is true if the solver converged and false otherwise.
+    *
+    * This function is a wrapper.
+    * It simply initializes the solver state, call the
+    * solveSystem(const int,const int) for the initialized solver then
+    * deallocates the solver state.
+    *
+    * Upon return from this function,
+    * solution will contain the result of the solve.
+    *
+    * See initializeSolverState() for opportunities to save overhead
+    * when using multiple consecutive solves.
+    *
+    * @see solveSystem(const int,const int)
+    *
+    * @param solution hier::Patch data index for solution u
+    * @param rhs hier::Patch data index for right hand side f
+    * @param hierarchy The patch hierarchy to solve on
+    * @param coarse_ln The coarsest level in the solve.
+    * @param fine_ln The finest level in the solve.
+    *
+    * @return whether solver converged to specified level
+    *
+    * @see initializeSolverState
+    */
+   bool
+   solveSystem(
+      const int solution,
+      const int rhs,
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int coarse_ln = -1,
+      int fine_ln = -1);
+
+   /*!
+    * @brief Solve Poisson's equation using the current solver state
+    * set by initializeSolverState().
+    *
+    * When the solver state has been initialized, this function may
+    * be called repeadedly with different values on the rhs.
+    * There is some cost savings for multiple solves when this
+    * is done.
+    *
+    * Before calling this function, the solution and
+    * right-hand-side quantities should be set properly by the user
+    * on all patch interiors on the range of levels covered by the
+    * FAC iteration.  All data for these patch data index should be allocated.
+    * Thus, the user is responsible for managing the
+    * storage for the solution and right-hand-side.
+    *
+    * @return whether solver converged to specified level
+    *
+    * @see solveSystem( const int, const int, tbox::Pointer< hier::PatchHierarchy >, int, int);
+    */
+   bool
+   solveSystem(
+      const int solution,
+      const int rhs);
+
+   /*!
+    * @brief Specify the boundary conditions that are to be used at the
+    * physical domain boundary.
+    *
+    * This method is used to set up the default SimpleCellRobinBcCoefs
+    * object for specifying boundary conditions.  Note that you may
+    * alternatively provide your own implementation of the Robin
+    * boundary condition coefficients using the setBcObject() method.
+    *
+    * The boundary conditions specified as the
+    * std::string argument "boundary_type."  The boundary type argument can be
+    * "Dirichlet", "Neumann", or "Mixed".
+    *
+    * If using Dirichlet boundary conditions, then before the solver is
+    * called, the storage for the unknown u
+    * must have a mapped_box_level of ghost cells at least one cell wide that includes
+    * the Dirichlet boundary values.
+    *
+    * If using Neumann boundary conditions, then before the solver is called,
+    * the outerface boundary flux data must be set for the Neumann conditions.
+    * The fluxes argument gives the patch data index of this flux
+    * data.
+    *
+    * The mixed boundary type is for a mixture of Dirichlet and Neumann
+    * boundary conditions are used at the physical domain boundary.
+    * The fluxes argument gives the patch data index of the outerface data
+    * that specifies the flux data for the Neumann conditions.  The flags
+    * array is an outerface data array of integer flags that specifies whether
+    * Dirichlet (flag == zero) or Neumann (flag == one) conditions are to be
+    * used at a particular cell boundary face.  Note that the flag data must
+    * be set before the matrix entries can be computed and the flux data
+    * must be set before the solver is called.  The bdry_types argument can
+    * be used if the boundary conditions are mixed but one or more of the
+    * faces of the physical boundary are entirely either Dirichlet or
+    * Neumann boundaries.  The bdry_types argument should be an array of
+    * 2*DIM integers, specifying the boundary conditions on each side of
+    * the physical domain.  It should be ordered {x_lo, x_hi, y_lo, y_hi,
+    * z_lo, z_hi}, with the values for each face being 0 for Dirichlet
+    * conditions, 1 for Neumann conditions, and 2 for mixed boundary
+    * conditions.  The bdry_type argument is never required, but if used
+    * it can sometimes make the PoissonHYPRESolver class more efficient.
+    */
+
+   void
+   setBoundaries(
+      const std::string& boundary_type,
+      const int fluxes = -1,
+      const int flags = -1,
+      int* bdry_types = NULL);
+
+   /*!
+    * @brief Override internal implementation to set boundary condition
+    * coefficients with user-provided implementation.
+    *
+    * This function is used to override the default internal
+    * object for setting Robin boundary condition coefficients.
+    * You should override when you need to avoid the limitations
+    * of the SimpleCellRobinBcCoefs class or you prefer to
+    * use your own implementation.
+    *
+    * Note that an important limitation of the SimpleCellRobinBcCoefs
+    * class is the inability to support linear interpolation in
+    * the prolongation step.
+    *
+    * Once the boundary condition object is overwritten by this
+    * method, you must no longer call the setBoundaries() method.
+    */
+   void
+   setBcObject(
+      const RobinBcCoefStrategy* bc_object);
+
+   //!@{ @name Specifying PDE parameters
+
+   /*!
+    * @brief Set the patch data index for variable D.
+    *
+    * In addition, disregard any previous D
+    * specified by setDConstant().
+    */
+   void
+   setDPatchDataId(
+      int id);
+
+   /*!
+    * @brief Set the scalar value variable D.
+    *
+    * In addition, disregard any previous D
+    * specified by setDPatchDataId().
+    */
+   void
+   setDConstant(
+      double scalar);
+
+   /*!
+    * @brief Set the scalar value variable C.
+    *
+    * In addition, disregard any previous C
+    * specified by setCConstant().
+    */
+   void
+   setCPatchDataId(
+      int id);
+
+   /*!
+    * @brief Set the patch data index for variable C.
+    *
+    * In addition, disregard any previous C
+    * specified by setCConstant().
+    */
+   void
+   setCConstant(
+      double scalar);
+
+   //@}
+
+   //@{ @name Functions for setting solver mathematic algorithm controls
+
+   /*!
+    * @brief Set coarse level solver.
+    *
+    * Select from these:
+    * - @c "redblack"
+    * - @c "hypre" (only if the HYPRE library is available).
+    */
+   void
+   setCoarsestLevelSolverChoice(
+      const std::string& choice);
+
+   /*!
+    * @brief Set tolerance for coarse level solve.
+    *
+    * If the coarse level solver requires a tolerance
+    * (currently, they all do), the specified value is used.
+    */
+   void
+   setCoarsestLevelSolverTolerance(
+      double tol);
+
+   /*!
+    * @brief Set max iterations for coarse level solve.
+    *
+    * If the coarse level solver requires a max iteration limit
+    * (currently, they all do), the specified value is used.
+    */
+   void
+   setCoarsestLevelSolverMaxIterations(
+      int max_iterations);
+
+#ifdef HAVE_HYPRE
+   /*!
+    * @brief Set whether to use HYPRe's PFMG algorithm instead of the
+    * SMG algorithm.
+    *
+    * The flag is used to select which of HYPRE's linear solver algorithms
+    * to use if true, the semicoarsening multigrid algorithm is used, and if
+    * false, the ``PF'' multigrid algorithm is used.
+    * By default, the SMG algorithm is used.
+    *
+    * This setting has effect only when HYPRe is chosen for the coarsest
+    * level solver.  See setCoarsestLevelSolverChoice().
+    *
+    * Changing the algorithm must be done before setting up the matrix
+    * coefficients.
+    */
+   void
+   setUseSMG(
+      bool use_smg);
+#endif
+
+   /*!
+    * @brief Set the coarse-fine boundary discretization method.
+    *
+    * Specify the @c op_name std::string which will be passed to
+    * xfer::Geometry::lookupRefineOperator() to get the operator
+    * for setting fine grid ghost cells from the coarse grid.
+    * Note that chosing this operator implicitly choses the
+    * discretization method at the coarse-fine boundary.
+    *
+    * There is one important instance where this std::string is
+    * @em not passed to xfer::Geometry::lookupRefineOperator().
+    * If this variable is set to "Ewing", a constant refinement
+    * method is used along with Ewing's correction.
+    * For a reference to the correction method, see
+    * "Local Refinement Techniques for Elliptic Problems on Cell-Centered
+    * Grids, I. Error Analysis", Mathematics of Computation, Vol. 56, No. 194,
+    * April 1991, pp. 437-461.
+    *
+    * @param coarsefine_method String selecting the coarse-fine discretization method.
+    */
+   void
+   setCoarseFineDiscretization(
+      const std::string& coarsefine_method);
+
+   /*!
+    * @brief Set the name of the prolongation method.
+    *
+    * Specify the @c op_name std::string which will be passed to
+    * xfer::Geometry::lookupRefineOperator() to get the operator
+    * for prolonging the coarse-grid correction.
+    *
+    * By default, "CONSTANT_REFINE" is used.  "LINEAR_REFINE" seems to
+    * to lead to faster convergence, but it does NOT satisfy the Galerkin
+    * condition.
+    *
+    * Prolonging using linear refinement requires a Robin bc
+    * coefficient implementation that is capable of delivering
+    * coefficients for non-hierarchy data, because linear refinement
+    * requires boundary conditions to be set on temporary levels.
+    *
+    * @param prolongation_method String selecting the coarse-fine discretization method.
+    */
+   void
+   setProlongationMethod(
+      const std::string& prolongation_method);
+
+   /*!
+    * @brief Set the number of pre-smoothing sweeps during
+    * FAC iteration process.
+    *
+    * Presmoothing is applied during the fine-to-coarse phase of the
+    * iteration.  The default is to use one sweep.
+    *
+    * @param num_pre_sweeps Number of presmoothing sweeps
+    */
+   void
+   setPresmoothingSweeps(
+      int num_pre_sweeps);
+
+   /*!
+    * @brief Set the number of post-smoothing sweeps during
+    * FAC iteration process.
+    *
+    * Postsmoothing is applied during the coarse-to-fine phase of the
+    * iteration.  The default is to use one sweep.
+    *
+    * @param num_post_sweeps Number of postsmoothing sweeps
+    */
+   void
+   setPostsmoothingSweeps(
+      int num_post_sweeps);
+
+   /*!
+    * @brief Set the max number of iterations (cycles) to use per solve.
+    */
+   void
+   setMaxCycles(
+      int max_cycles);
+
+   /*!
+    * @brief Set the residual tolerance for stopping.
+    *
+    * If you want the prescribed maximum number of cycles to always be taken,
+    * set the residual tolerance to a negative number.
+    */
+   void
+   setResidualTolerance(
+      double residual_tol);
+
+   //@}
+
+   /*!
+    * @brief Prepare the solver's internal state for solving
+    *
+    * In the interest of efficiency, this class may prepare and
+    * cache some hierarchy-dependent objects.  Though it is not required,
+    * initializing the solver state makes for greater efficiency
+    * when you are doing multiple solves on the same system of
+    * equation.  If you do not initialize the state, it is initialized
+    * and deallocated each time you call solveSystem(const int, const int).
+    * The state must be reinitialized if the hierarchy or a boundary
+    * condition type changes.
+    *
+    * To unset the data set in this function,
+    * see deallocateSolverState().
+    *
+    * The @c solution and @c rhs patch data indices in the argument
+    * list are used to determine the @em form of the data you
+    * plan to use in the solve.  They need not be the same data
+    * you solve on, but they should be similar.  Both must represent
+    * cell-centered double data.  The solution must have at least one
+    * ghost cell width, though this is not checked in the initialize
+    * phase, because data is not required yet.
+    *
+    * @param solution solution patch data index for u
+    * @param rhs right hand side patch data index for f
+    * @param hierarchy The patch hierarchy to solve on
+    * @param coarse_level The coarsest level in the solve
+    * @param fine_level The finest level in the solve
+    */
+   void
+   initializeSolverState(
+      const int solution,
+      const int rhs,
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int coarse_level = -1,
+      const int fine_level = -1);
+
+   /*!
+    * @brief Remove the solver's internal state data
+    *
+    * Remove all hierarchy-dependent data set by initializeSolverState.
+    * It is safe to call deallocateSolverState() even state is already
+    * deallocated, but nothing is done in that case.
+    *
+    * @see initializeSolverState()
+    */
+   void
+   deallocateSolverState();
+
+   //@{
+   //! @name Functions to get data on last solve.
+
+   /*!
+    * @brief Return FAC iteration count from last (or current
+    * if there is one) FAC iteration process.
+    */
+   int
+   getNumberOfIterations() const;
+
+   /*!
+    * @brief Get average convergance rate and convergence rate of
+    * the last (or current if there is one) FAC solve.
+    *
+    * @param avg_factor average convergence factor over current FAC cycles
+    * @param final_factor convergence factor of the last FAC cycle
+    */
+   void
+   getConvergenceFactors(
+      double& avg_factor,
+      double& final_factor) const;
+
+   /*!
+    * @brief Return residual norm from the just-completed FAC iteration.
+    *
+    * The norm return value is computed as the maximum norm over all
+    * patch levels involved in the solve.  The value corresponds to the
+    * norm applied in the user-defined residual computation.
+    *
+    * The latest computed norm is the one returned.
+    */
+   double
+   getResidualNorm() const;
+
+   //@}
+
+private:
+   /*!
+    * @brief Set state using database
+    *
+    * See the class description for the parameters that can be set
+    * from a database.
+    *
+    * @param database Input database.  If a NULL pointer is given,
+    * nothing is done.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> database);
+
+   /*
+    * @brief Set @c d_uv and @c d_fv to vectors wrapping the data
+    * specified by patch data indices u and f.
+    */
+   void
+   createVectorWrappers(
+      int u,
+      int f);
+
+   /*
+    * @brief Destroy vector wrappers referenced to by @c d_uv and @c d_fv.
+    */
+   void
+   destroyVectorWrappers();
+
+   /*
+    * @brief Initialize static members
+    */
+   static void
+   initializeStatics();
+
+   const tbox::Dimension d_dim;
+
+   /*!
+    * @brief Object name.
+    */
+   std::string d_object_name;
+
+   /*!
+    * @brief Object holding the specifications of the Poisson equation.
+    */
+   PoissonSpecifications d_poisson_spec;
+
+   /*!
+    * @brief FAC operator implementation corresponding to cell-centered
+    * Poisson discretization.
+    */
+   CellPoissonFACOps d_fac_ops;
+
+   /*!
+    * @brief FAC preconditioner algorithm.
+    */
+   FACPreconditioner d_fac_precond;
+
+   /*!
+    * @brief Robin bc object in use.
+    */
+   const RobinBcCoefStrategy* d_bc_object;
+
+   /*
+    * @brief Default implementation of RobinBcCoefStrategy
+    */
+   SimpleCellRobinBcCoefs d_simple_bc;
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+   int d_ln_min;
+   int d_ln_max;
+
+   /*!
+    * @brief Context for all internally maintained data.
+    */
+   tbox::Pointer<hier::VariableContext> d_context;
+   /*
+    * @brief Vector wrapper for solution.
+    * @see createVectorWrappers(), destroyVectorWrappers()
+    */
+   tbox::Pointer<SAMRAIVectorReal<double> > d_uv;
+   /*
+    * @brief Vector wrapper for source.
+    * @see createVectorWrappers(), destroyVectorWrappers()
+    */
+   tbox::Pointer<SAMRAIVectorReal<double> > d_fv;
+
+   bool d_solver_is_initialized;
+   bool d_enable_logging;
+
+   static bool s_initialized;
+   static int s_weight_id[SAMRAI::tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   static int s_instance_counter[SAMRAI::tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/solv/CellPoissonFACSolver.I"
+#endif
+
+#endif  // included_solv_CellPoissonFACSolver
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/CellPoissonHypreSolver.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/CellPoissonHypreSolver.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1590 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Hypre solver interface for diffusion-like elliptic problems. 
+ *
+ ************************************************************************/
+#ifndef included_solv_CellPoissonHypreSolver_C
+#define included_solv_CellPoissonHypreSolver_C
+
+#include "SAMRAI/solv/CellPoissonHypreSolver.h"
+
+#ifdef HAVE_HYPRE
+
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/math/ArrayDataBasicOps.h"
+#include "SAMRAI/math/PatchSideDataBasicOps.h"
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "SAMRAI/pdat/FaceIndex.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/SideIndex.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/pdat/OuterfaceData.h"
+#include "SAMRAI/pdat/OutersideData.h"
+#include "SAMRAI/hier/BoundaryBoxUtils.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <cstdlib>
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/solv/CellPoissonHypreSolver.I"
+#endif
+
+extern "C" {
+
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1419)
+#endif
+
+void F77_FUNC(compdiagvariablec2d, COMPDIAGVARIABLEC2D) (
+   double* diag,
+   const double* c,
+   const double* offdiagi,
+   const double* offdiagj,
+   const int* ifirst,
+   const int* ilast,
+   const int* jfirst,
+   const int* jlast,
+   const double* cscale,
+   const double* dscale);
+void F77_FUNC(compdiagscalarc2d, COMPDIAGSCALARC2D) (
+   double* diag,
+   const double* c,
+   const double* offdiagi,
+   const double* offdiagj,
+   const int* ifirst,
+   const int* ilast,
+   const int* jfirst,
+   const int* jlast,
+   const double* cscale,
+   const double* dscale);
+void F77_FUNC(compdiagzeroc2d, COMPDIAGZEROC2D) (
+   double* diag,
+   const double* offdiagi,
+   const double* offdiagj,
+   const int* ifirst,
+   const int* ilast,
+   const int* jfirst,
+   const int* jlast,
+   const double* cscale,
+   const double* dscale);
+void F77_FUNC(adjbdry2d, ADJBDRY2D) (
+   double* diag,
+   const double* offdiagi,
+   const double* offdiagj,
+   const int* pifirst, const int* pilast,
+   const int* pjfirst, const int* pjlast,
+   const double* acoef,
+   const double* bcoef,
+   const int* aifirst, const int* ailast,
+   const int* ajfirst, const int* ajlast,
+   const double* Ak0,
+   const int* kifirst, const int* kilast,
+   const int* kjfirst, const int* kjlast,
+   const int* lower, const int* upper,
+   const int* location,
+   const double* h);
+void F77_FUNC(adjbdryconstoffdiags2d, ADJBDRYCONSTOFFDIAGS2D) (
+   double* diag,
+   const double* offdiag,
+   const int* pifirst,
+   const int* pilast,
+   const int* pjfirst,
+   const int* pjlast,
+   const double* acoef,
+   const int* aifirst,
+   const int* ailast,
+   const int* ajfirst,
+   const int* ajlast,
+   const double* Ak0,
+   const int* kifirst,
+   const int* kilast,
+   const int* kjfirst,
+   const int* kjlast,
+   const int* lower, const int* upper,
+   const int* location,
+   const double* h);
+void F77_FUNC(adjustrhs2d, ADJUSTRHS2D) (double* rhs,
+   const int* rifirst,
+   const int* rilast,
+   const int* rjfirst,
+   const int* rjlast,
+   const double* Ak0,
+   const int* kifirst,
+   const int* kilast,
+   const int* kjfirst,
+   const int* kjlast,
+   const double* gcoef,
+   const int* aifirst,
+   const int* ailast,
+   const int* ajfirst,
+   const int* ajlast,
+   const int* lower, const int* upper,
+   const int* location);
+
+void F77_FUNC(compdiagvariablec3d, COMPDIAGVARIABLEC3D) (
+   double* diag,
+   const double* c,
+   const double* offdiagi,
+   const double* offdiagj,
+   const double* offdiagk,
+   const int* ifirst,
+   const int* ilast,
+   const int* jfirst,
+   const int* jlast,
+   const int* kfirst,
+   const int* klast,
+   const double* cscale,
+   const double* dscale);
+void F77_FUNC(compdiagscalarc3d, COMPDIAGSCALARC3D) (
+   double* diag,
+   const double* c,
+   const double* offdiagi,
+   const double* offdiagj,
+   const double* offdiagk,
+   const int* ifirst,
+   const int* ilast,
+   const int* jfirst,
+   const int* jlast,
+   const int* kfirst,
+   const int* klast,
+   const double* cscale,
+   const double* dscale);
+void F77_FUNC(compdiagzeroc3d, COMPDIAGZEROC3D) (
+   double* diag,
+   const double* offdiagi,
+   const double* offdiagj,
+   const double* offdiagk,
+   const int* ifirst,
+   const int* ilast,
+   const int* jfirst,
+   const int* jlast,
+   const int* kfirst,
+   const int* klast,
+   const double* cscale,
+   const double* dscale);
+void F77_FUNC(adjbdry3d, ADJBDRY3D) (
+   double* diag,
+   const double* offdiagi,
+   const double* offdiagj,
+   const double* offdiagk,
+   const int* pifirst,
+   const int* pilast,
+   const int* pjfirst,
+   const int* pjlast,
+   const int* pkfirst,
+   const int* pklast,
+   const double* acoef,
+   const double* bcoef,
+   const int* aifirst,
+   const int* ailast,
+   const int* ajfirst,
+   const int* ajlast,
+   const int* akfirst,
+   const int* aklast,
+   const double* Ak0,
+   const int* kifirst,
+   const int* kilast,
+   const int* kjfirst,
+   const int* kjlast,
+   const int* kkfirst,
+   const int* kklast,
+   const int* lower, const int* upper,
+   const int* location,
+   const double* h);
+void F77_FUNC(adjbdryconstoffdiags3d, ADJBDRYCONSTOFFDIAGS3D) (
+   double* diag,
+   const double* offdiag,
+   const int* pifirst,
+   const int* pilast,
+   const int* pjfirst,
+   const int* pjlast,
+   const int* pkfirst,
+   const int* pklast,
+   const double* acoef,
+   const int* aifirst,
+   const int* ailast,
+   const int* ajfirst,
+   const int* ajlast,
+   const int* akfirst,
+   const int* aklast,
+   const double* Ak0,
+   const int* kifirst,
+   const int* kilast,
+   const int* kjfirst,
+   const int* kjlast,
+   const int* kkfirst,
+   const int* kklast,
+   const int* lower, const int* upper,
+   const int* location,
+   const double* h);
+void F77_FUNC(adjustrhs3d, ADJUSTRHS3D) (double* rhs,
+   const int* rifirst,
+   const int* rilast,
+   const int* rjfirst,
+   const int* rjlast,
+   const int* rkfirst,
+   const int* rklast,
+   const double* Ak0,
+   const int* kifirst,
+   const int* kilast,
+   const int* kjfirst,
+   const int* kjlast,
+   const int* kkfirst,
+   const int* kklast,
+   const double* gcoef,
+   const int* aifirst,
+   const int* ailast,
+   const int* ajfirst,
+   const int* ajlast,
+   const int* akfirst,
+   const int* aklast,
+   const int* lower, const int* upper,
+   const int* location);
+
+}
+
+namespace SAMRAI {
+namespace solv {
+
+tbox::Pointer<pdat::OutersideVariable<double> >
+CellPoissonHypreSolver::s_Ak0_var[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+tbox::StartupShutdownManager::Handler CellPoissonHypreSolver::s_finalize_handler(
+   0,
+   0,
+   0,
+   CellPoissonHypreSolver::finalizeCallback,
+   tbox::StartupShutdownManager::priorityVariables);
+
+/*
+ *************************************************************************
+ * Constructor                                                           *
+ *************************************************************************
+ */
+
+CellPoissonHypreSolver::CellPoissonHypreSolver(
+   const tbox::Dimension& dim,
+   const std::string& object_name,
+   tbox::Pointer<tbox::Database> database):
+   d_dim(dim),
+   d_object_name(object_name),
+   d_hierarchy(NULL),
+   d_ln(-1),
+   d_context(hier::VariableDatabase::getDatabase()->
+             getContext(object_name + "::context")),
+   d_cf_boundary(),
+   d_physical_bc_coef_strategy(&d_physical_bc_simple_case),
+   d_physical_bc_variable(NULL),
+   d_physical_bc_simple_case(dim, d_object_name + "::simple bc"),
+   d_cf_bc_coef(dim, object_name + "::coarse-fine bc coefs"),
+   d_coarsefine_bc_variable(NULL),
+   d_Ak0_id(-1),
+   d_soln_depth(0),
+   d_rhs_depth(0),
+   d_max_iterations(10),
+   d_relative_residual_tol(1e-10),
+   d_number_iterations(-1),
+   d_num_pre_relax_steps(1),
+   d_num_post_relax_steps(1),
+   d_relative_residual_norm(-1.0),
+   d_use_smg(false),
+   d_grid(NULL),
+   d_stencil(NULL),
+   d_matrix(NULL),
+   d_linear_rhs(NULL),
+   d_linear_sol(NULL),
+   d_mg_data(NULL),
+   d_print_solver_info(false)
+{
+   if (d_dim == tbox::Dimension(1) || d_dim > tbox::Dimension(3)) {
+      TBOX_ERROR(" CellPoissonHypreSolver : DIM == 1 or > 3 not implemented");
+   }
+
+   t_solve_system = tbox::TimerManager::getManager()->
+      getTimer("solv::CellPoissonHypreSolver::solveSystem()");
+   t_set_matrix_coefficients = tbox::TimerManager::getManager()->
+      getTimer("solv::CellPoissonHypreSolver::setMatrixCoefficients()");
+
+   hier::VariableDatabase* vdb = hier::VariableDatabase::getDatabase();
+   if (s_Ak0_var[d_dim.getValue() - 1].isNull()) {
+      s_Ak0_var[d_dim.getValue() - 1] = new
+         pdat::OutersideVariable<double>(d_dim, d_object_name + "::Ak0", 1);
+   }
+   d_Ak0_id =
+      vdb->registerVariableAndContext(s_Ak0_var[d_dim.getValue() - 1],
+         d_context,
+         hier::IntVector::getZero(d_dim));
+   if (database) {
+      getFromInput(database);
+   }
+}
+
+/*
+ ********************************************************************
+ * Set state from database                                          *
+ ********************************************************************
+ */
+
+void CellPoissonHypreSolver::getFromInput(
+   tbox::Pointer<tbox::Database> database)
+{
+   if (database) {
+      d_print_solver_info = database->getBoolWithDefault("print_solver_info",
+            d_print_solver_info);
+      d_max_iterations = database->getIntegerWithDefault("max_iterations",
+            d_max_iterations);
+      d_relative_residual_tol = database->getDoubleWithDefault(
+            "relative_residual_tol",
+            d_relative_residual_tol);
+      if (database->isDouble("residual_tol")) {
+         TBOX_ERROR("CellPoissonHypreSolver input error.\n"
+            << "The parameter 'residual_tol' has been replaced\n"
+            << "by 'relative_residual_tol' to be more descriptive.\n"
+            << "Please change the parameter name in the input database.");
+      }
+      d_num_pre_relax_steps =
+         database->getIntegerWithDefault("num_pre_relax_steps",
+            d_num_pre_relax_steps);
+      if (d_num_pre_relax_steps < 0) {
+         TBOX_ERROR(d_object_name << ": Number of relaxation steps must be\n"
+                                  << "non-negative.\n");
+      }
+      d_num_post_relax_steps =
+         database->getIntegerWithDefault("num_post_relax_steps",
+            d_num_post_relax_steps);
+      if (d_num_post_relax_steps < 0) {
+         TBOX_ERROR(d_object_name << ": Number of relaxation steps must be\n"
+                                  << "non-negative.\n");
+      }
+      if (database->isBool("use_smg")) {
+         bool use_smg = database->getBool("use_smg");
+         if (use_smg != d_use_smg) {
+            setUseSMG(use_smg);
+         }
+      }
+   }
+}
+
+/*
+ ********************************************************************
+ * Initialize internal data for a given hierarchy level             *
+ * After setting internal data, propagate the information           *
+ * to the major algorithm objects.  Allocate data for               *
+ * storing boundary condition-dependent quantities for              *
+ * adding to souce term before solving.                             *
+ ********************************************************************
+ */
+
+void CellPoissonHypreSolver::initializeSolverState(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int ln)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *hierarchy);
+
+   deallocateSolverState();
+
+   d_hierarchy = hierarchy;
+   d_ln = ln;
+
+   hier::IntVector max_gcw(d_dim, 1);
+   d_cf_boundary = new hier::CoarseFineBoundary(*d_hierarchy, d_ln, max_gcw);
+
+   d_physical_bc_simple_case.setHierarchy(d_hierarchy, d_ln, d_ln);
+
+   d_number_iterations = -1;
+   d_relative_residual_norm = -1.0;
+
+   tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(d_ln);
+   level->allocatePatchData(d_Ak0_id);
+   allocateHypreData();
+}
+
+/*
+ ********************************************************************
+ * Deallocate data initialized by initializeSolverState             *
+ ********************************************************************
+ */
+
+void CellPoissonHypreSolver::deallocateSolverState()
+{
+   if (d_hierarchy.isNull()) return;
+
+   d_cf_boundary->clear();
+   tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(d_ln);
+   level->deallocatePatchData(d_Ak0_id);
+   deallocateHypreData();
+   d_hierarchy.setNull();
+   d_ln = -1;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Allocate the HYPRE data structures that depend only on the level      *
+ * and will not change (grid, stencil, matrix, and vectors).             *
+ *                                                                       *
+ *************************************************************************
+ */
+void CellPoissonHypreSolver::allocateHypreData()
+{
+   tbox::SAMRAI_MPI::Comm communicator = d_hierarchy->getDomainMappedBoxLevel().getMPI().getCommunicator();
+
+   /*
+    * Set up the grid data - only set grid data for local boxes
+    */
+
+   tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(d_ln);
+   tbox::Pointer<geom::CartesianGridGeometry> grid_geometry =
+      d_hierarchy->getGridGeometry();
+   const hier::IntVector ratio = level->getRatioToLevelZero();
+   hier::IntVector periodic_shift =
+      grid_geometry->getPeriodicShift(ratio);
+
+   int periodic_flag[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   int d;
+   bool is_periodic = false;
+   for (d = 0; d < d_dim.getValue(); ++d) {
+      periodic_flag[d] = periodic_shift[d] != 0;
+      is_periodic = is_periodic || periodic_flag[d];
+   }
+
+   HYPRE_StructGridCreate(communicator, d_dim.getValue(), &d_grid);
+   for (hier::PatchLevel::Iterator p(level); p; p++) {
+      const hier::Box& box = (*p)->getBox();
+      hier::Index lower = box.lower();
+      hier::Index upper = box.upper();
+      HYPRE_StructGridSetExtents(d_grid, &lower[0], &upper[0]);
+   }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (is_periodic) {
+      const hier::BoxArray& level_domain = level->getPhysicalDomain();
+      hier::Box domain_bound(level_domain[0]);
+      for (int i = 1; i < level_domain.size(); ++i) {
+         domain_bound.lower().min(level_domain[i].lower());
+         domain_bound.upper().max(level_domain[i].upper());
+      }
+      for (d = 0; d < d_dim.getValue(); ++d) {
+         if (periodic_flag[d] == true) {
+            int tmpi = 1;
+            unsigned int p_of_two;
+            for (p_of_two = 0; p_of_two < 8 * sizeof(p_of_two) - 1;
+                 ++p_of_two) {
+               if (tmpi == domain_bound.numberCells(d)) {
+                  break;
+               }
+               if (tmpi > domain_bound.numberCells(d)) {
+                  TBOX_ERROR(
+                     d_object_name << ": Hypre currently requires\n"
+                     <<
+                     "that grid size in periodic directions be\n"
+                     <<
+                     "powers of two.  (This requirement may go\n"
+                     <<
+                     "away in future versions of hypre.)\n"
+                     << "Size problem in direction "
+                     << d << "\n"
+                     << "Domain bound is "
+                     << domain_bound << ",\n"
+                     << "Size of "
+                     << domain_bound.numberCells() << "\n");
+               }
+               tmpi = tmpi ? tmpi << 1 : 1;
+            }
+         }
+      }
+   }
+#endif
+
+   HYPRE_StructGridSetPeriodic(d_grid, &periodic_shift[0]);
+   HYPRE_StructGridAssemble(d_grid);
+
+   {
+      /*
+       * Allocate stencil data and set stencil offsets
+       */
+
+      if (d_dim == tbox::Dimension(1)) {
+         const int stencil_size = 2;
+         int stencil_offsets[2][1] = {
+            { -1 }, { 0 }
+         };
+         HYPRE_StructStencilCreate(d_dim.getValue(), stencil_size, &d_stencil);
+         for (int s = 0; s < stencil_size; s++) {
+            HYPRE_StructStencilSetElement(d_stencil, s,
+               stencil_offsets[s]);
+         }
+      } else if (d_dim == tbox::Dimension(2)) {
+         const int stencil_size = 3;
+         int stencil_offsets[3][2] = {
+            { -1, 0 }, { 0, -1 }, { 0, 0 }
+         };
+         HYPRE_StructStencilCreate(d_dim.getValue(), stencil_size, &d_stencil);
+         for (int s = 0; s < stencil_size; s++) {
+            HYPRE_StructStencilSetElement(d_stencil, s,
+               stencil_offsets[s]);
+         }
+      } else if (d_dim == tbox::Dimension(3)) {
+         const int stencil_size = 4;
+         int stencil_offsets[4][3] = {
+            { -1, 0, 0 }, { 0, -1, 0 }, { 0, 0, -1 }, { 0, 0, 0 }
+         };
+         HYPRE_StructStencilCreate(d_dim.getValue(), stencil_size, &d_stencil);
+         for (int s = 0; s < stencil_size; s++) {
+            HYPRE_StructStencilSetElement(d_stencil, s,
+               stencil_offsets[s]);
+         }
+      }
+   }
+
+   {
+      int full_ghosts1[2 * 3] = { 1, 1, 0, 0, 0, 0 };
+      int no_ghosts1[2 * 3] = { 0, 0, 0, 0, 0, 0 };
+
+      int full_ghosts2[2 * 3] = { 1, 1, 1, 1, 0, 0 };
+      int no_ghosts2[2 * 3] = { 0, 0, 0, 0, 0, 0 };
+
+      int full_ghosts3[2 * 3] = { 1, 1, 1, 1, 1, 1 };
+      int no_ghosts3[2 * 3] = { 0, 0, 0, 0, 0, 0 };
+
+      /*
+       * Allocate the structured matrix
+       */
+
+      int* full_ghosts = NULL;
+      int* no_ghosts = NULL;
+
+      if (d_dim == tbox::Dimension(1)) {
+         full_ghosts = full_ghosts1;
+         no_ghosts = no_ghosts1;
+      } else if (d_dim == tbox::Dimension(2)) {
+         full_ghosts = full_ghosts2;
+         no_ghosts = no_ghosts2;
+      } else if (d_dim == tbox::Dimension(3)) {
+         full_ghosts = full_ghosts3;
+         no_ghosts = no_ghosts3;
+      } else {
+         TBOX_ERROR(
+            "CellPoissonHypreSolver does not yet support dimension " << d_dim);
+      }
+
+      HYPRE_StructMatrixCreate(communicator,
+         d_grid,
+         d_stencil,
+         &d_matrix);
+      HYPRE_StructMatrixSetNumGhost(d_matrix, full_ghosts);
+      HYPRE_StructMatrixSetSymmetric(d_matrix, 1);
+      HYPRE_StructMatrixInitialize(d_matrix);
+
+      HYPRE_StructVectorCreate(communicator,
+         d_grid,
+         &d_linear_rhs);
+      HYPRE_StructVectorSetNumGhost(d_linear_rhs, no_ghosts);
+      HYPRE_StructVectorInitialize(d_linear_rhs);
+
+      HYPRE_StructVectorCreate(communicator,
+         d_grid,
+         &d_linear_sol);
+      HYPRE_StructVectorSetNumGhost(d_linear_sol, full_ghosts);
+      HYPRE_StructVectorInitialize(d_linear_sol);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The destructor deallocates solver data.                               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+CellPoissonHypreSolver::~CellPoissonHypreSolver()
+{
+   deallocateHypreData();
+
+   if (!d_hierarchy.isNull()) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(0);
+      level->deallocatePatchData(d_Ak0_id);
+   }
+   hier::VariableDatabase* vdb =
+      hier::VariableDatabase::getDatabase();
+   vdb->removePatchDataIndex(d_Ak0_id);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Deallocate HYPRE data and solver.  HYPRE requires that we             *
+ * check whether HYPRE has already deallocated this data.                *
+ * Note that the HYPRE solver, d_mg_data, was created at                 *
+ * the end of setMatrixCoefficients.                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CellPoissonHypreSolver::deallocateHypreData()
+{
+   if (d_stencil) {
+      HYPRE_StructStencilDestroy(d_stencil);
+      d_stencil = NULL;
+   }
+   if (d_grid) {
+      HYPRE_StructGridDestroy(d_grid);
+      d_grid = NULL;
+   }
+   if (d_matrix) {
+      HYPRE_StructMatrixDestroy(d_matrix);
+      d_matrix = NULL;
+   }
+   if (d_linear_rhs) {
+      HYPRE_StructVectorDestroy(d_linear_rhs);
+      d_linear_rhs = NULL;
+   }
+   if (d_linear_sol) {
+      HYPRE_StructVectorDestroy(d_linear_sol);
+      d_linear_sol = NULL;
+   }
+   destroyHypreSolver();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Copy data into the HYPRE vector structures.                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CellPoissonHypreSolver::copyToHypre(
+   HYPRE_StructVector vector,
+   pdat::CellData<double>& src,
+   int depth,
+   const hier::Box& box)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim, src, box);
+
+   for (pdat::CellIterator c(box); c; c++) {
+      hier::IntVector ic = c();
+      HYPRE_StructVectorSetValues(vector, &ic[0], src(c(), depth));
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Copy data out of the HYPRE vector structures.                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CellPoissonHypreSolver::copyFromHypre(
+   pdat::CellData<double>& dst,
+   int depth,
+   HYPRE_StructVector vector,
+   const hier::Box box)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim, dst, box);
+
+   for (pdat::CellIterator c(box); c; c++) {
+      double value;
+      hier::IntVector ic = c();
+      HYPRE_StructVectorGetValues(vector, &ic[0], &value);
+      dst(c(), depth) = value;
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set the matrix coefficients for the linear system.                    *
+ * The matrix coefficients are dependent on the problem                  *
+ * specification described by the PoissonSpecificiations            *
+ * object and by the boundary condition.                                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CellPoissonHypreSolver::setMatrixCoefficients(
+   const PoissonSpecifications& spec)
+{
+   if (d_physical_bc_coef_strategy == NULL) {
+      TBOX_ERROR(
+         d_object_name << ": No BC coefficient strategy object!\n"
+         <<
+         "Use either setBoundaries or setPhysicalBcCoefObject\n"
+         <<
+         "to specify the boundary conidition.  Do it before\n"
+         << "calling setMatrixCoefficients.");
+   }
+
+   t_set_matrix_coefficients->start();
+
+   int i = 0;
+
+   tbox::Pointer<pdat::CellData<double> > C_data;
+   tbox::Pointer<pdat::SideData<double> > D_data;
+
+   /*
+    * Some computations can be done using high-level math objects.
+    * Define the math objects.
+    */
+   math::ArrayDataBasicOps<double> array_math;
+   math::PatchSideDataBasicOps<double> patch_side_math;
+
+   /*
+    * The value of the ghost cell based on the Robin boundary condition
+    * can be written as the sum of a constant, k0, plus a multiple of the
+    * internal cell value, k1*ui.  k1*ui depends on the value of u so it
+    * contributes to the product Au,
+    * while the constant k0 contributes the right hand side f.
+    * We save Ak0 = A*k0(a) to add to f when solving.
+    * We assume unit g here because we will multiply it in just before
+    * solving, thus allowing everything that does not affect A to change
+    * from solve to solve.
+    */
+   tbox::Pointer<pdat::OutersideData<double> > Ak0;
+
+   /*
+    * Loop over patches and set matrix entries for each patch.
+    */
+   tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(d_ln);
+   const hier::IntVector no_ghosts(d_dim, 0);
+   for (hier::PatchLevel::Iterator pi(*level); pi; pi++) {
+
+      hier::Patch& patch = **pi;
+
+      tbox::Pointer<geom::CartesianPatchGeometry> pg =
+         patch.getPatchGeometry();
+
+      const double* h = pg->getDx();
+
+      const hier::Box patch_box = patch.getBox();
+      const hier::Index patch_lo = patch_box.lower();
+      const hier::Index patch_up = patch_box.upper();
+
+      if (!spec.cIsZero() && !spec.cIsConstant()) {
+         C_data = patch.getPatchData(spec.getCPatchDataId());
+         if (C_data.isNull()) {
+            TBOX_ERROR(d_object_name << ": Invalid cell variable index "
+                                     << spec.getCPatchDataId()
+                                     << " for the C parameter.  It is not\n"
+                                     << "cell-centered double data.");
+         }
+      }
+
+      if (!spec.dIsConstant()) {
+         D_data = patch.getPatchData(spec.getDPatchDataId());
+         if (D_data.isNull()) {
+            TBOX_ERROR(d_object_name << ": Invalid cell variable index "
+                                     << spec.getDPatchDataId()
+                                     <<
+               " for diffusion coefficient.  It is not\n"
+                                     << "side-centered double data.");
+         }
+      }
+
+      Ak0 = patch.getPatchData(d_Ak0_id);
+
+      Ak0->fillAll(0.0);
+
+      pdat::CellData<double> diagonal(patch_box, 1, no_ghosts);
+
+      /*
+       * Set diagonals to zero so we can accumulate to it.
+       * Accumulation is used at boundaries to shift weights
+       * for ghost cells onto the diagonal.
+       */
+      diagonal.fillAll(0.0);
+
+      const tbox::Pointer<geom::CartesianPatchGeometry>
+      geometry = patch.getPatchGeometry();
+
+      const hier::Index ifirst = patch_box.lower();
+      const hier::Index ilast = patch_box.upper();
+
+      /*
+       * Storage for off-diagonal entries,
+       * which can be variable or constant.
+       */
+      pdat::SideData<double> off_diagonal(patch_box, 1, no_ghosts);
+
+      /*
+       * Compute all off-diagonal entries with no regard to BCs.
+       * These off-diagonal entries are simply D/(h*h), according
+       * to our central difference formula.
+       */
+      if (spec.dIsConstant()) {
+         for (i = 0; i < d_dim.getValue(); ++i) {
+            double dhh = spec.getDConstant() / (h[i] * h[i]);
+            pdat::ArrayData<double>& off_diag_array(off_diagonal.getArrayData(i));
+            off_diag_array.fill(dhh);
+         }
+      } else {
+         for (i = 0; i < d_dim.getValue(); ++i) {
+            hier::Box sbox(patch_box);
+            sbox.growUpper(i, 1);
+            array_math.scale(off_diagonal.getArrayData(i),
+               1.0 / (h[i] * h[i]),
+               D_data->getArrayData(i),
+               sbox);
+         }
+      }
+
+      /*
+       * Compute diagonal entries using off-diagonal contributions.
+       */
+      if (spec.cIsZero()) {
+         computeDiagonalEntries(diagonal,
+            off_diagonal,
+            patch_box);
+      } else if (spec.cIsConstant()) {
+         computeDiagonalEntries(diagonal,
+            spec.getCConstant(),
+            off_diagonal,
+            patch_box);
+      } else {
+         computeDiagonalEntries(diagonal,
+            *C_data,
+            off_diagonal,
+            patch_box);
+      }
+
+      /*
+       * Walk physical domain boundaries and adjust off-diagonals
+       * before computation of diagonal entries.
+       * The exterior cell's value is
+       * uo = ( h*gamma + ui*(beta-h*alpha/2) )/( beta+h*alpha/2 )
+       *   = k0 + k1*ui
+       * where k0 = h*gamma/( beta+h*alpha/2 )
+       * k1 = ( beta-h*alpha/2 )/( beta+h*alpha/2 )
+       * Split coupling between interior-exterior cells
+       * into two parts: interior-interior coupling (k1)
+       * and rhs contribution (k0).
+       */
+      {
+         const tbox::Array<hier::BoundaryBox>& surface_boxes =
+            pg->getCodimensionBoundaries(1);
+         const int n_bdry_boxes = surface_boxes.getSize();
+         for (int n = 0; n < n_bdry_boxes; ++n) {
+
+            const hier::BoundaryBox& boundary_box = surface_boxes[n];
+            if (boundary_box.getBoundaryType() != 1) {
+               TBOX_ERROR(
+                  d_object_name << ": Illegal boundary type in "
+                  <<
+                  "CellPoissonHypreSolver::setMatrixCoefficients\n");
+            }
+            const hier::BoundaryBoxUtils bbu(boundary_box);
+            const int location_index = boundary_box.getLocationIndex();
+            const hier::BoundaryBox trimmed_boundary_box =
+               bbu.trimBoundaryBox(patch.getBox());
+            const hier::Box bccoef_box =
+               bbu.getSurfaceBoxFromBoundaryBox();
+            tbox::Pointer<pdat::ArrayData<double> >
+            acoef_data(new pdat::ArrayData<double>(bccoef_box, 1));
+            tbox::Pointer<pdat::ArrayData<double> >
+            bcoef_data(new pdat::ArrayData<double>(bccoef_box, 1));
+            tbox::Pointer<pdat::ArrayData<double> >
+            gcoef_data(NULL);
+            static const double fill_time = 0.0;
+            d_physical_bc_coef_strategy->setBcCoefs(acoef_data,
+               bcoef_data,
+               gcoef_data,
+               d_physical_bc_variable,
+               patch,
+               boundary_box,
+               fill_time);
+            pdat::ArrayData<double>& Ak0_data =
+               Ak0->getArrayData(location_index / 2,
+                  location_index % 2);
+            adjustBoundaryEntries(diagonal,
+               off_diagonal,
+               patch_box,
+               *acoef_data,
+               *bcoef_data,
+               bccoef_box,
+               Ak0_data,
+               trimmed_boundary_box,
+               h);
+         }
+      }
+
+      /*
+       * Walk coarse-fine boundaries and adjust off-diagonals
+       * according data in ghost cells.
+       */
+      if (d_ln > 0) {
+         /*
+          * There are potentially coarse-fine boundaries to deal with.
+          */
+
+         tbox::Array<hier::BoundaryBox> surface_boxes;
+
+         if (d_dim == tbox::Dimension(2)) {
+            surface_boxes = d_cf_boundary->getEdgeBoundaries(pi->getGlobalId());
+         } else if (d_dim == tbox::Dimension(3)) {
+            surface_boxes = d_cf_boundary->getFaceBoundaries(pi->getGlobalId());
+         }
+
+         const int n_bdry_boxes = surface_boxes.getSize();
+         for (int n = 0; n < n_bdry_boxes; ++n) {
+
+            const hier::BoundaryBox& boundary_box = surface_boxes[n];
+            if (boundary_box.getBoundaryType() != 1) {
+               TBOX_ERROR(
+                  d_object_name << ": Illegal boundary type in "
+                  <<
+                  "CellPoissonHypreSolver::setMatrixCoefficients\n");
+            }
+            const int location_index = boundary_box.getLocationIndex();
+            const hier::BoundaryBoxUtils bbu(boundary_box);
+            const hier::BoundaryBox trimmed_boundary_box =
+               bbu.trimBoundaryBox(patch.getBox());
+            const hier::Box bccoef_box =
+               bbu.getSurfaceBoxFromBoundaryBox();
+            tbox::Pointer<pdat::ArrayData<double> >
+            acoef_data(new pdat::ArrayData<double>(bccoef_box, 1));
+            tbox::Pointer<pdat::ArrayData<double> >
+            bcoef_data(new pdat::ArrayData<double>(bccoef_box, 1));
+            tbox::Pointer<pdat::ArrayData<double> >
+            gcoef_data(NULL);
+            static const double fill_time = 0.0;
+            /*
+             * Reset invalid ghost data id to help detect use in setBcCoefs.
+             */
+            d_cf_bc_coef.setGhostDataId(-1, hier::IntVector::getZero(d_dim));
+            d_cf_bc_coef.setBcCoefs(acoef_data,
+               bcoef_data,
+               gcoef_data,
+               d_coarsefine_bc_variable,
+               patch,
+               boundary_box,
+               fill_time);
+            pdat::ArrayData<double>& Ak0_data =
+               Ak0->getArrayData(location_index / 2,
+                  location_index % 2);
+            adjustBoundaryEntries(diagonal,
+               off_diagonal,
+               patch_box,
+               *acoef_data,
+               *bcoef_data,
+               bccoef_box,
+               Ak0_data,
+               trimmed_boundary_box,
+               h);
+         }
+      }
+
+      /*
+       * Copy matrix entries to HYPRE matrix structure.  Note that
+       * we translate our temporary diagonal/off-diagonal storage into the
+       * HYPRE symmetric storage scheme for the stencil specified earlier.
+       */
+      const int stencil_size = d_dim.getValue() + 1;
+      int stencil_indices[stencil_size];
+      double mat_entries[stencil_size];
+
+      for (i = 0; i < stencil_size; i++) stencil_indices[i] = i;
+
+      pdat::CellIterator ic(patch_box);
+
+      /*
+       * To do: This loop uses inefficient high-level syntax.
+       * See if it can be replaced by a Fortran loop or if we
+       * can set matrix entries for an entire box at once.
+       */
+      for ( ; ic; ic++) {
+
+         hier::IntVector icell = ic();
+         pdat::SideIndex ixlower(ic(),
+                                 pdat::SideIndex::X,
+                                 pdat::SideIndex::Lower);
+         mat_entries[0] = (off_diagonal)(ixlower);
+
+         if (d_dim > tbox::Dimension(1)) {
+            pdat::SideIndex iylower(ic(),
+                                    pdat::SideIndex::Y,
+                                    pdat::SideIndex::Lower);
+            mat_entries[1] = (off_diagonal)(iylower);
+         }
+
+         if (d_dim > tbox::Dimension(2)) {
+            pdat::SideIndex izlower(ic(),
+                                    pdat::SideIndex::Z,
+                                    pdat::SideIndex::Lower);
+            // The "funny" indexing prevents a warning when compiling for
+            // DIM < 2.  This code is only reached if DIM > 2 when
+            // executing.
+            mat_entries[d_dim.getValue() > 2 ? 2 : 0] = (off_diagonal)(izlower);
+         }
+
+         mat_entries[d_dim.getValue()] = (diagonal)(ic());
+         HYPRE_StructMatrixSetValues(d_matrix, &icell[0],
+            stencil_size, stencil_indices,
+            mat_entries);
+      } // end cell loop
+
+   } // end patch loop
+
+   if (d_print_solver_info) {
+      HYPRE_StructMatrixPrint("mat_bA.out", d_matrix, 1);
+   }
+
+   HYPRE_StructMatrixAssemble(d_matrix);
+
+   if (d_print_solver_info) {
+      HYPRE_StructMatrixPrint("mat_aA.out", d_matrix, 1);
+   }
+
+   t_set_matrix_coefficients->stop();
+
+   setupHypreSolver();
+}
+
+/*
+ **********************************************************************
+ * Add g*A*k0(a) from physical boundaries to rhs.                     *
+ * This operation is done for physical as well as cf boundaries,      *
+ * so it is placed in a function.                                     *
+ **********************************************************************
+ */
+
+void CellPoissonHypreSolver::add_gAk0_toRhs(
+   const hier::Patch& patch,
+   const tbox::Array<hier::BoundaryBox>& bdry_boxes,
+   const RobinBcCoefStrategy* robin_bc_coef,
+   pdat::CellData<double>& rhs)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim, patch, rhs);
+
+   /*
+    * g*A*k0(a) is the storage for adjustments to be made to the rhs
+    * when we solve. This is the value of the weight of the ghost cell
+    * value for the interior cell, times k0.  It is independent of u,
+    * and so is moved to the rhs.  Before solving, g*A*k0(a) is added
+    * to rhs.
+    */
+   tbox::Pointer<pdat::OutersideData<double> > Ak0;
+
+   tbox::Pointer<geom::CartesianPatchGeometry> pg =
+      patch.getPatchGeometry();
+
+   Ak0 = patch.getPatchData(d_Ak0_id);
+
+   const int n_bdry_boxes = bdry_boxes.getSize();
+   for (int n = 0; n < n_bdry_boxes; ++n) {
+
+      const hier::BoundaryBox& boundary_box = bdry_boxes[n];
+#ifdef DEBUG_CHECK_ASSERTIONS
+      if (boundary_box.getBoundaryType() != 1) {
+         TBOX_ERROR(d_object_name << ": Illegal boundary type in "
+                                  << "CellPoissonHypreSolver::add_gAk0_toRhs\n");
+      }
+#endif
+      const int location_index = boundary_box.getLocationIndex();
+      const hier::BoundaryBoxUtils bbu(boundary_box);
+      const hier::BoundaryBox trimmed_boundary_box =
+         bbu.trimBoundaryBox(patch.getBox());
+      const hier::Index& lower = trimmed_boundary_box.getBox().lower();
+      const hier::Index& upper = trimmed_boundary_box.getBox().upper();
+      const hier::Box& rhsbox = rhs.getArrayData().getBox();
+      const hier::Box& Ak0box = Ak0->getArrayData(location_index / 2,
+            location_index % 2).getBox();
+      const hier::Box bccoef_box = bbu.getSurfaceBoxFromBoundaryBox();
+      tbox::Pointer<pdat::ArrayData<double> >
+      acoef_data(NULL);
+      tbox::Pointer<pdat::ArrayData<double> >
+      bcoef_data(NULL);
+      tbox::Pointer<pdat::ArrayData<double> >
+      gcoef_data(new pdat::ArrayData<double>(bccoef_box, 1));
+      static const double fill_time = 0.0;
+      robin_bc_coef->setBcCoefs(acoef_data,
+         bcoef_data,
+         gcoef_data,
+         d_physical_bc_variable,
+         patch,
+         boundary_box,
+         fill_time);
+      /*
+       * Nomenclature for indices: cel=first-cell, gho=ghost,
+       * beg=beginning, end=ending.
+       */
+      if (d_dim == tbox::Dimension(2)) {
+         F77_FUNC(adjustrhs2d, ADJUSTRHS2D) (rhs.getPointer(d_rhs_depth),
+            &rhsbox.lower()[0],
+            &rhsbox.upper()[0],
+            &rhsbox.lower()[1],
+            &rhsbox.upper()[1],
+            Ak0->getPointer(location_index / 2, location_index % 2),
+            &Ak0box.lower()[0],
+            &Ak0box.upper()[0],
+            &Ak0box.lower()[1],
+            &Ak0box.upper()[1],
+            gcoef_data->getPointer(),
+            &bccoef_box.lower()[0],
+            &bccoef_box.upper()[0],
+            &bccoef_box.lower()[1],
+            &bccoef_box.upper()[1],
+            &lower[0], &upper[0],
+            &location_index);
+      } else if (d_dim == tbox::Dimension(3)) {
+         F77_FUNC(adjustrhs3d, ADJUSTRHS3D) (rhs.getPointer(d_rhs_depth),
+            &rhsbox.lower()[0],
+            &rhsbox.upper()[0],
+            &rhsbox.lower()[1],
+            &rhsbox.upper()[1],
+            &rhsbox.lower()[2],
+            &rhsbox.upper()[2],
+            Ak0->getPointer(location_index / 2, location_index % 2),
+            &Ak0box.lower()[0],
+            &Ak0box.upper()[0],
+            &Ak0box.lower()[1],
+            &Ak0box.upper()[1],
+            &Ak0box.lower()[2],
+            &Ak0box.upper()[2],
+            gcoef_data->getPointer(),
+            &bccoef_box.lower()[0],
+            &bccoef_box.upper()[0],
+            &bccoef_box.lower()[1],
+            &bccoef_box.upper()[1],
+            &bccoef_box.lower()[2],
+            &bccoef_box.upper()[2],
+            &lower[0], &upper[0],
+            &location_index);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ * Create the hypre solver and set it according to the current state.    *
+ *************************************************************************
+ */
+void CellPoissonHypreSolver::setupHypreSolver()
+{
+   TBOX_ASSERT(d_mg_data == NULL);
+
+   tbox::SAMRAI_MPI::Comm communicator = d_hierarchy->getDomainMappedBoxLevel().getMPI().getCommunicator();
+
+   if (d_use_smg) {
+      HYPRE_StructSMGCreate(communicator, &d_mg_data);
+      HYPRE_StructSMGSetMemoryUse(d_mg_data, 0);
+      HYPRE_StructSMGSetMaxIter(d_mg_data, d_max_iterations);
+      HYPRE_StructSMGSetTol(d_mg_data, d_relative_residual_tol);
+      HYPRE_StructSMGSetLogging(d_mg_data, 1);
+      HYPRE_StructSMGSetNumPreRelax(d_mg_data,
+         d_num_pre_relax_steps);
+      HYPRE_StructSMGSetNumPostRelax(d_mg_data,
+         d_num_post_relax_steps);
+      HYPRE_StructSMGSetup(d_mg_data,
+         d_matrix,
+         d_linear_rhs,
+         d_linear_sol);
+   } else {
+      HYPRE_StructPFMGCreate(communicator, &d_mg_data);
+      HYPRE_StructPFMGSetMaxIter(d_mg_data, d_max_iterations);
+      HYPRE_StructPFMGSetTol(d_mg_data, d_relative_residual_tol);
+      HYPRE_StructPFMGSetLogging(d_mg_data, 1);
+      HYPRE_StructPFMGSetNumPreRelax(d_mg_data,
+         d_num_pre_relax_steps);
+      HYPRE_StructPFMGSetNumPostRelax(d_mg_data,
+         d_num_post_relax_steps);
+      HYPRE_StructPFMGSetup(d_mg_data,
+         d_matrix,
+         d_linear_rhs,
+         d_linear_sol);
+   }
+}
+
+void CellPoissonHypreSolver::destroyHypreSolver()
+{
+   if (d_mg_data != NULL) {
+      if (d_use_smg) {
+         HYPRE_StructSMGDestroy(d_mg_data);
+      } else {
+         HYPRE_StructPFMGDestroy(d_mg_data);
+      }
+      d_mg_data = NULL;
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Solve the linear system.  This routine assumes that the boundary      *
+ * conditions and the matrix coefficients have been specified.           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int CellPoissonHypreSolver::solveSystem(
+   const int u,
+   const int f,
+   bool homogeneous_bc)
+{
+   if (d_physical_bc_coef_strategy == NULL) {
+      TBOX_ERROR(
+         d_object_name << ": No BC coefficient strategy object!\n"
+         <<
+         "Use either setBoundaries or setPhysicalBcCoefObject\n"
+         <<
+         "to specify the boundary conidition.  Do it before\n"
+         << "calling solveSystem.");
+   }
+   // Tracer t("CellPoissonHypreSolver::solveSystem");
+
+   t_solve_system->start();
+
+   tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(d_ln);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(u >= 0);
+   TBOX_ASSERT(
+      u < level->getPatchDescriptor()->getMaxNumberRegisteredComponents());
+   TBOX_ASSERT(f >= 0);
+   TBOX_ASSERT(
+      f < level->getPatchDescriptor()->getMaxNumberRegisteredComponents());
+#endif
+
+   if (d_physical_bc_coef_strategy == &d_physical_bc_simple_case) {
+      /*
+       * If we are using the simple bc implementation, the final piece
+       * of information it requires is the Dirichlet boundary value
+       * set in the ghost cells.  Now that we have the ghost cell data,
+       * we can complete the boundary condition setup.
+       */
+      d_physical_bc_simple_case.cacheDirichletData(u);
+   }
+
+   /*
+    * Modify right-hand-side to account for boundary conditions and
+    * copy solution and right-hand-side to HYPRE structures.
+    */
+
+   const hier::IntVector no_ghosts(d_dim, 0);
+   const hier::IntVector ghosts(d_dim, 1);
+
+   /*
+    * At coarse-fine boundaries, we expect ghost cells to have correct
+    * values to be used in our bc, so u provides the ghost cell data.
+    * Assume that the user only provided data for the immediate first
+    * ghost cell, so pass zero for the number of extensions fillable.
+    */
+   d_cf_bc_coef.setGhostDataId(u, hier::IntVector::getZero(d_dim));
+
+   for (hier::PatchLevel::Iterator p(level); p; p++) {
+      tbox::Pointer<hier::Patch> patch = *p;
+
+      const hier::Box box = patch->getBox();
+
+      /*
+       * Set up variable data needed to prepare linear system solver.
+       */
+      tbox::Pointer<pdat::CellData<double> > u_data_ = patch->getPatchData(u);
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!u_data_.isNull());
+#endif
+      pdat::CellData<double>& u_data = *u_data_;
+      pdat::CellData<double> rhs_data(box, 1, no_ghosts);
+
+      /*
+       * Copy rhs and solution from the hierarchy into HYPRE structures.
+       * For rhs, add in the contribution from boundary conditions, if
+       * needed.  If boundary condition is homogenous, this only adds
+       * zero, so we skip it.
+       */
+      copyToHypre(d_linear_sol, u_data, d_soln_depth, box);
+      rhs_data.copy(*(patch->getPatchData(f)));
+      if (!homogeneous_bc) {
+         /*
+          * Add g*A*k0(a) from physical and coarse-fine boundaries to rhs.
+          */
+         add_gAk0_toRhs(*patch,
+            patch->getPatchGeometry()->getCodimensionBoundaries(1),
+            d_physical_bc_coef_strategy,
+            rhs_data);
+         add_gAk0_toRhs(*patch,
+            d_cf_boundary->getBoundaries(patch->getGlobalId(), 1),
+            &d_cf_bc_coef,
+            rhs_data);
+      }
+      copyToHypre(d_linear_rhs, rhs_data, d_rhs_depth, box);
+
+   } // end patch loop
+
+   /*
+    * Reset invalid ghost data id to help detect erroneous further use.
+    */
+   d_cf_bc_coef.setGhostDataId(-1, hier::IntVector::getZero(d_dim));
+
+   /*
+    * Finish assembly of the vectors
+    */
+   HYPRE_StructVectorAssemble(d_linear_sol);
+
+   HYPRE_StructVectorAssemble(d_linear_rhs);
+
+   /*
+    * Solve the system - zero means convergence
+    * Solve takes the same arguments as Setup
+    */
+
+   if (d_print_solver_info) {
+      HYPRE_StructVectorPrint("sol0.out", d_linear_sol, 1);
+      HYPRE_StructMatrixPrint("mat0.out", d_matrix, 1);
+      HYPRE_StructVectorPrint("rhs.out", d_linear_rhs, 1);
+   }
+
+   if (d_use_smg) {
+      // HYPRE_StructSMGSetMaxIter(d_mg_data, d_max_iterations);
+      HYPRE_StructSMGSetTol(d_mg_data, d_relative_residual_tol);
+      /* converge = */ HYPRE_StructSMGSolve(d_mg_data,
+         d_matrix,
+         d_linear_rhs,
+         d_linear_sol);
+   } else {
+      // HYPRE_StructPFMGSetMaxIter(d_mg_data, d_max_iterations);
+      HYPRE_StructPFMGSetTol(d_mg_data, d_relative_residual_tol);
+      /* converge = */ HYPRE_StructPFMGSolve(d_mg_data,
+         d_matrix,
+         d_linear_rhs,
+         d_linear_sol);
+   }
+
+   if (d_print_solver_info) {
+      HYPRE_StructMatrixPrint("mat.out", d_matrix, 1);
+      HYPRE_StructVectorPrint("sol.out", d_linear_sol, 1);
+   }
+
+   if (d_use_smg) {
+      HYPRE_StructSMGGetNumIterations(d_mg_data,
+         &d_number_iterations);
+      HYPRE_StructSMGGetFinalRelativeResidualNorm(d_mg_data,
+         &d_relative_residual_norm);
+   } else {
+      HYPRE_StructPFMGGetNumIterations(d_mg_data,
+         &d_number_iterations);
+      HYPRE_StructPFMGGetFinalRelativeResidualNorm(d_mg_data,
+         &d_relative_residual_norm);
+   }
+
+   /*
+    * Pull the solution vector out of the HYPRE structures
+    */
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+      tbox::Pointer<pdat::CellData<double> > u_data_ = patch->getPatchData(u);
+      pdat::CellData<double>& u_data = *u_data_;
+      copyFromHypre(u_data,
+         d_soln_depth,
+         d_linear_sol,
+         patch->getBox());
+   }
+
+   t_solve_system->stop();
+
+   return d_relative_residual_norm <= d_relative_residual_tol;
+}
+
+void CellPoissonHypreSolver::computeDiagonalEntries(
+   pdat::CellData<double>& diagonal,
+   const pdat::CellData<double>& C_data,
+   const pdat::SideData<double>& off_diagonal,
+   const hier::Box& patch_box)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(d_dim,
+      diagonal,
+      C_data,
+      off_diagonal,
+      patch_box);
+
+   const hier::Index patch_lo = patch_box.lower();
+   const hier::Index patch_up = patch_box.upper();
+   const double c = 1.0, d = 1.0;
+   if (d_dim == tbox::Dimension(2)) {
+      F77_FUNC(compdiagvariablec2d, COMPDIAGVARIABLEC2D) (diagonal.getPointer(),
+         C_data.getPointer(),
+         off_diagonal.getPointer(0),
+         off_diagonal.getPointer(1),
+         &patch_lo[0], &patch_up[0],
+         &patch_lo[1], &patch_up[1],
+         &c, &d);
+   } else if (d_dim == tbox::Dimension(3)) {
+      F77_FUNC(compdiagvariablec3d, COMPDIAGVARIABLEC3D) (diagonal.getPointer(),
+         C_data.getPointer(),
+         off_diagonal.getPointer(0),
+         off_diagonal.getPointer(1),
+         off_diagonal.getPointer(2),
+         &patch_lo[0], &patch_up[0],
+         &patch_lo[1], &patch_up[1],
+         &patch_lo[2], &patch_up[2],
+         &c, &d);
+   }
+}
+
+void CellPoissonHypreSolver::computeDiagonalEntries(
+   pdat::CellData<double>& diagonal,
+   const double C,
+   const pdat::SideData<double>& off_diagonal,
+   const hier::Box& patch_box)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS3(d_dim, diagonal, off_diagonal, patch_box);
+
+   const hier::Index patch_lo = patch_box.lower();
+   const hier::Index patch_up = patch_box.upper();
+   const double c = 1.0, d = 1.0;
+   if (d_dim == tbox::Dimension(2)) {
+      F77_FUNC(compdiagscalarc2d, COMPDIAGSCALARC2D) (diagonal.getPointer(),
+         &C,
+         off_diagonal.getPointer(0),
+         off_diagonal.getPointer(1),
+         &patch_lo[0], &patch_up[0],
+         &patch_lo[1], &patch_up[1],
+         &c, &d);
+   } else if (d_dim == tbox::Dimension(3)) {
+      F77_FUNC(compdiagscalarc3d, COMPDIAGSCALARC3D) (diagonal.getPointer(),
+         &C,
+         off_diagonal.getPointer(0),
+         off_diagonal.getPointer(1),
+         off_diagonal.getPointer(2),
+         &patch_lo[0], &patch_up[0],
+         &patch_lo[1], &patch_up[1],
+         &patch_lo[2], &patch_up[2],
+         &c, &d);
+   } else {
+      TBOX_ERROR("CellPoissonHypreSolver error...\n"
+         << "DIM > 3 not supported." << std::endl);
+   }
+}
+
+void CellPoissonHypreSolver::computeDiagonalEntries(
+   pdat::CellData<double>& diagonal,
+   const pdat::SideData<double>& off_diagonal,
+   const hier::Box& patch_box)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS3(d_dim, diagonal, off_diagonal, patch_box);
+
+   const hier::Index patch_lo = patch_box.lower();
+   const hier::Index patch_up = patch_box.upper();
+   const double c = 1.0, d = 1.0;
+   if (d_dim == tbox::Dimension(2)) {
+      F77_FUNC(compdiagzeroc2d, COMPDIAGZEROC2D) (diagonal.getPointer(),
+         off_diagonal.getPointer(0),
+         off_diagonal.getPointer(1),
+         &patch_lo[0], &patch_up[0],
+         &patch_lo[1], &patch_up[1],
+         &c, &d);
+   } else if (d_dim == tbox::Dimension(3)) {
+      F77_FUNC(compdiagzeroc3d, COMPDIAGZEROC3D) (diagonal.getPointer(),
+         off_diagonal.getPointer(0),
+         off_diagonal.getPointer(1),
+         off_diagonal.getPointer(2),
+         &patch_lo[0], &patch_up[0],
+         &patch_lo[1], &patch_up[1],
+         &patch_lo[2], &patch_up[2],
+         &c, &d);
+   } else {
+      TBOX_ERROR("CellPoissonHypreSolver error...\n"
+         << "DIM > 3 not supported." << std::endl);
+   }
+}
+
+void CellPoissonHypreSolver::adjustBoundaryEntries(
+   pdat::CellData<double>& diagonal,
+   const pdat::SideData<double>& off_diagonal,
+   const hier::Box& patch_box,
+   const pdat::ArrayData<double>& acoef_data,
+   const pdat::ArrayData<double>& bcoef_data,
+   const hier::Box bccoef_box,
+   pdat::ArrayData<double>& Ak0_data,
+   const hier::BoundaryBox& trimmed_boundary_box,
+   const double h[tbox::Dimension::MAXIMUM_DIMENSION_VALUE])
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS8(d_dim, diagonal, off_diagonal, patch_box,
+      acoef_data, bcoef_data,
+      bccoef_box, Ak0_data, trimmed_boundary_box);
+
+   const hier::Index patch_lo = patch_box.lower();
+   const hier::Index patch_up = patch_box.upper();
+   const int location_index = trimmed_boundary_box.getLocationIndex();
+   const hier::Index& lower = trimmed_boundary_box.getBox().lower();
+   const hier::Index& upper = trimmed_boundary_box.getBox().upper();
+   const hier::Box& Ak0_box = Ak0_data.getBox();
+   if (d_dim == tbox::Dimension(2)) {
+      F77_FUNC(adjbdry2d, ADJBDRY2D) (diagonal.getPointer(),
+         off_diagonal.getPointer(0),
+         off_diagonal.getPointer(1),
+         &patch_lo[0], &patch_up[0],
+         &patch_lo[1], &patch_up[1],
+         acoef_data.getPointer(),
+         bcoef_data.getPointer(),
+         &bccoef_box.lower()[0],
+         &bccoef_box.upper()[0],
+         &bccoef_box.lower()[1],
+         &bccoef_box.upper()[1],
+         Ak0_data.getPointer(),
+         &Ak0_box.lower()[0],
+         &Ak0_box.upper()[0],
+         &Ak0_box.lower()[1],
+         &Ak0_box.upper()[1],
+         &lower[0], &upper[0],
+         &location_index, h);
+   } else if (d_dim == tbox::Dimension(3)) {
+      F77_FUNC(adjbdry3d, ADJBDRY3D) (diagonal.getPointer(),
+         off_diagonal.getPointer(0),
+         off_diagonal.getPointer(1),
+         off_diagonal.getPointer(2),
+         &patch_lo[0], &patch_up[0],
+         &patch_lo[1], &patch_up[1],
+         &patch_lo[2], &patch_up[2],
+         acoef_data.getPointer(),
+         bcoef_data.getPointer(),
+         &bccoef_box.lower()[0],
+         &bccoef_box.upper()[0],
+         &bccoef_box.lower()[1],
+         &bccoef_box.upper()[1],
+         &bccoef_box.lower()[2],
+         &bccoef_box.upper()[2],
+         Ak0_data.getPointer(),
+         &Ak0_box.lower()[0],
+         &Ak0_box.upper()[0],
+         &Ak0_box.lower()[1],
+         &Ak0_box.upper()[1],
+         &Ak0_box.lower()[2],
+         &Ak0_box.upper()[2],
+         &lower[0], &upper[0],
+         &location_index, h);
+   } else {
+      TBOX_ERROR("CellPoissonHypreSolver error...\n"
+         << "DIM > 3 not supported." << std::endl);
+   }
+}
+
+void
+CellPoissonHypreSolver::finalizeCallback()
+{
+   for (int d = 0; d < tbox::Dimension::MAXIMUM_DIMENSION_VALUE; ++d) {
+      s_Ak0_var[d].setNull();
+   }
+}
+
+}
+}
+
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/CellPoissonHypreSolver.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/CellPoissonHypreSolver.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Level solver for diffusion-like elliptic problems. 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+namespace solv {
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonHypreSolver::setSolnIdDepth(
+   const int depth) {
+   d_soln_depth = depth;
+}
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonHypreSolver::setRhsIdDepth(
+   const int depth) {
+   d_rhs_depth = depth;
+}
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonHypreSolver::setUseSMG(
+   bool use_smg) {
+   d_use_smg = use_smg;
+}
+
+/*
+ ********************************************************************
+ * Specify bc using the default internal bc coefficient object.     *
+ * Clear up data supporting external bc coefficient setter.         *
+ ********************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonHypreSolver::setBoundaries(
+   const std::string& boundary_type,
+   const int fluxes,
+   const int flags,
+   int* bdry_types)
+{
+   d_physical_bc_simple_case.setBoundaries(boundary_type,
+      fluxes,
+      flags,
+      bdry_types);
+   d_physical_bc_coef_strategy = &d_physical_bc_simple_case;
+   d_physical_bc_variable.setNull();
+}
+
+/*
+ ********************************************************************
+ * Set the physical boundary condition object.                      *
+ ********************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonHypreSolver::setPhysicalBcCoefObject(
+   const RobinBcCoefStrategy* physical_bc_coef_strategy,
+   const tbox::Pointer<hier::Variable> variable)
+{
+   d_physical_bc_coef_strategy = physical_bc_coef_strategy;
+   d_physical_bc_variable = variable;
+}
+
+SAMRAI_INLINE_KEYWORD
+int CellPoissonHypreSolver::getNumberOfIterations() const
+{
+   return d_number_iterations;
+}
+
+SAMRAI_INLINE_KEYWORD
+double CellPoissonHypreSolver::getRelativeResidualNorm() const
+{
+   return d_relative_residual_norm;
+}
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonHypreSolver::setNumPreRelaxSteps(
+   const int steps)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+#endif
+   d_num_pre_relax_steps = steps;
+}
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonHypreSolver::setNumPostRelaxSteps(
+   const int steps)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+#endif
+   d_num_post_relax_steps = steps;
+}
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonHypreSolver::setPrintSolverInfo(
+   const bool print)
+{
+   d_print_solver_info = print;
+}
+
+SAMRAI_INLINE_KEYWORD
+void CellPoissonHypreSolver::setStoppingCriteria(
+   const int max_iterations,
+   const double residual_tol)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(max_iterations >= 0);
+   TBOX_ASSERT(residual_tol >= 0.0);
+#endif
+   d_max_iterations = max_iterations;
+   d_relative_residual_tol = residual_tol;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/CellPoissonHypreSolver.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/CellPoissonHypreSolver.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,617 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Hypre solver interface for diffusion-like elliptic problems. 
+ *
+ ************************************************************************/
+#ifndef included_solv_CellPoissonHypreSolver
+#define included_solv_CellPoissonHypreSolver
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#ifdef HAVE_HYPRE
+
+#ifndef included_HYPRE_struct_ls
+/*
+ * This might break things if F77_FUNC_ is different for hypre vs
+ * SAMRAI autoconf detection.  But then C/C++ macros are totally
+ * broken due to namespace collision as this example highlights so
+ * resorting to hacks are necessary.
+ */
+#ifdef F77_FUNC_
+#undef F77_FUNC_
+#endif
+#include "HYPRE_struct_ls.h"
+#define included_HYPRE_struct_ls
+#endif
+
+#include "SAMRAI/solv/GhostCellRobinBcCoefs.h"
+#include "SAMRAI/solv/RobinBcCoefStrategy.h"
+#include "SAMRAI/solv/PoissonSpecifications.h"
+#include "SAMRAI/solv/SimpleCellRobinBcCoefs.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/OutersideVariable.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/CoarseFineBoundary.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace solv {
+
+/*!
+ * @brief Use the HYPRE preconditioner library to solve (the cell-centered)
+ * Poisson's equation on a single level in a hierarchy.
+ *
+ * Class CellPoissonHypreSolver uses the HYPRE preconditioner library
+ * to solve linear equations of the form
+ * @f$ \nabla ( D \nabla u ) + C u = f @f$, where
+ * C is a cell-centered array, D is a face-centered array,
+ * and u and f are cell-centered arrays
+ * (see PoissonSpecifications).
+ * The discretization is the standard second order
+ * finite difference stencil.
+ *
+ * Robin boundary conditions are used through the
+ * interface class RobinBcCoefStrategy.
+ * Periodic boundary conditions are not supported yet.
+ *
+ * The user must perform the following steps to use
+ * CellPoissonHypreSolver:
+ * - Create a CellPoissonHypreSolver object.
+ * - Initialize CellPoissonHypreSolver object with a patch hierarchy,
+ *   using the function initializeSolverState().
+ * - Use the functions setPhysicalBcCoefObject()
+ *   to provide implementations of RobinBcCoefStrategy.
+ *   (For most problems you can probably find a suitable
+ *   implementation to use without implementing the
+ *   strategy yourself.  See for example
+ *   SimpleCellRobinBcCoefs and GhostCellRobinBcCoefs.)
+ * - Set the matrix coefficients in the linear system,
+ *   using the function setMatrixCoefficients().
+ * - Specify the stopping criteria using setStoppingCriteria().
+ * - Solve the linear system, passing in u and f as the patch
+ *   indices of the solution and the right hand side, respectively.
+ *
+ * Sample parameters for initialization from database (and their
+ * default values):
+ * @verbatim
+ *     print_solver_info = FALSE      // Whether to print some data for debugging
+ *     max_iterations = 10            // Max iterations used by Hypre
+ *     relative_residual_tol = 1.0e-8 // Residual tolerance used by Hypre
+ *     num_pre_relax_steps = 1        // # of presmoothing steps used by Hypre
+ *     num_post_relax_steps = 1       // # of postsmoothing steps used by Hypre
+ *     use_smg = FALSE                // Whether to use hypre's smg solver
+ *                                    // (alternative is the pfmg solver)
+ * @endverbatim
+ */
+
+class CellPoissonHypreSolver
+{
+public:
+   /*!
+    * @brief Constructor.
+    *
+    * @param object_name Name of object.
+    * @param database tbox::Database for input.
+    */
+   CellPoissonHypreSolver(
+      const tbox::Dimension& dim,
+      const std::string& object_name,
+      tbox::Pointer<tbox::Database> database =
+         tbox::Pointer<tbox::Database>(NULL));
+
+   /*!
+    * The Poisson destructor releases all internally managed data.
+    */
+   ~CellPoissonHypreSolver();
+
+   /*!
+    * @brief Initialize to a given hierarchy.
+    *
+    * Initializer Poisson solver for a patch level in a hierarchy.
+    *
+    * @param hierarchy Hierarchy
+    * @param ln Level number
+    */
+   void
+   initializeSolverState(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int ln = 0);
+
+   /*!
+    * @brief Reset to an uninitialized state.
+    */
+   void
+   deallocateSolverState();
+
+   /*!
+    * @brief Set the matrix coefficients
+    *
+    * For information describing the Poisson equation parameters,
+    * see the light-weight PoissonSpecifications class where
+    * you set the values of C and D.
+    *
+    * This method must be called before solveSystem().
+    */
+   void
+   setMatrixCoefficients(
+      const PoissonSpecifications& spec);
+
+   /*!
+    * @brief Set default depth of the solution data involved in the solve.
+    *
+    * If the solution data has multiple depths,
+    * the solver uses just one depth at a time.
+    * The default depth is the first depth.
+    * Use this function to change it.
+    * This is not used to set the depth of the data (which is not
+    * controled by this class) but the depth used in the solve.
+    *
+    * Changing the depth after setting up the matrix is permissible,
+    * as the solution data does not affect the matrix.
+    */
+   void
+   setSolnIdDepth(
+      const int depth);
+
+   /*!
+    * @brief Set default depth of the rhs data involved in the solve.
+    *
+    * If the rhs data has multiple depths,
+    * the solver uses just one depth at a time.
+    * The default depth is the first depth.
+    * Use this function to change it.
+    * This is not used to set the depth of the data (which is not
+    * controled by this class) but the depth used in the solve.
+    *
+    * Changing the depth after setting up the matrix is permissible,
+    * as the rhs data does not affect the matrix.
+    */
+   void
+   setRhsIdDepth(
+      const int depth);
+
+   /*!
+    * @brief Set the stopping criteria (max iterations and residual
+    * tolerance) for the linear solver.
+    *
+    * @param max_iterations gives the maximum number of iterations
+    * @param relative_residual_tol the maximum error tolerance
+    */
+   void
+   setStoppingCriteria(
+      const int max_iterations = 10,
+      const double relative_residual_tol = 1.0e-6);
+
+   /*!
+    * @brief Solve the linear system Au=f.
+    *
+    * The solution u and the right hand side f are
+    * specified via patch indices on the patch hierarchy.
+    *
+    * Member functions getNumberOfIterations() return the iterations
+    * from the solver.
+    * Note that the matrix coefficients and boundary condition object
+    * must have been set up before this function is called.
+    * As long as the matrix coefficients do not change,
+    * this routine may be called repeatedly to solve any number of linear
+    * systems (with the right-hand side varying).
+    * If the boundary conditions or matrix coefficients are changed
+    * then function setMatrixCoefficients() must be called again.
+    *
+    * When computing the matrix coefficients in setMatrixCoefficients(),
+    * the inhomogeneous portion of the boundary condition (constant
+    * terms, independent of u and thus having no effect on the matrix)
+    * are saved and added to the source term, f,
+    * before performing the matrix solve.  In some situations, it may be
+    * useful to not add the inhomogeneous portion to f.  The flag argument
+    * @c homoegneous_bc is used for this.  (This is a sort of optimization,
+    * to avoid having to re-call setMatrixCoefficients() to change the
+    * inhomogeneous portion.)
+    *
+    * @param u Descriptor of cell-centered unknown variable.
+    * @param f Descriptor of cell-centered source variable.
+    * @param homogeneous_bc Whether homogeneous boundary conditions
+    *        are assumed.
+    *
+    * @return whether solver converged to specified level
+    */
+   int
+   solveSystem(
+      const int u,
+      const int f,
+      bool homogeneous_bc = false);
+
+   /*!
+    * @brief Return the number of iterations taken by the solver to converge.
+    *
+    * @return number of iterations taken by the solver to converge
+    */
+   int
+   getNumberOfIterations() const;
+
+   /*!
+    * @brief Set the number of pre-relax steps used by the Hypre solve.
+    */
+   void
+   setNumPreRelaxSteps(
+      const int steps);
+
+   /*!
+    * @brief Set the number of post-relax steps used by the Hypre solve.
+    */
+   void
+   setNumPostRelaxSteps(
+      const int steps);
+
+   /*!
+    * @brief Return the final residual norm returned by the Hypre solve.
+    * @return final residual norm returned by the Hypre solve.
+    */
+   double
+   getRelativeResidualNorm() const;
+
+   /*!
+    * @brief Set whether to use Hypre's PFMG algorithm instead of the
+    * SMG algorithm.
+    *
+    * The flag is used to select which of HYPRE's linear solver algorithms
+    * to use if true, the semicoarsening multigrid algorithm is used, and if
+    * false, the "PF" multigrid algorithm is used.
+    * By default, the SMG algorithm is used.
+    *
+    * Changing the algorithm must be done before setting up the matrix
+    * coefficients.
+    */
+   void
+   setUseSMG(
+      bool use_smg);
+
+   /*!
+    * @brief Specify boundary condition directly, without using
+    * a RobinBcCoefStrategy object.
+    *
+    * Use @em either setBoundaries() @em or setPhysicalBcCoefObject(),
+    * but not both.
+    *
+    * A SimpleCelBcCoef object is used to interpret and implement
+    * the specified boundary conditions.
+    * See SimpleCellRobinBcCoefs::setBoundaries()
+    * for an explanation of the arguments.
+    */
+   void
+   setBoundaries(
+      const std::string& boundary_type,
+      const int fluxes = -1,
+      const int flags = -1,
+      int* bdry_types = NULL);
+
+   /*!
+    * @brief Specify boundary condition through the use of a
+    * Robin boundary condition object.
+    *
+    * Use @em either setBoundaries() @em or setPhysicalBcCoefObject(),
+    * but not both.
+    *
+    * The Robin boundary condition object is used when setting
+    * the matrix coefficient and when solving the system.
+    * If your boundary conditions are fixed values at ghost
+    * cell centers, use the GhostCellRobinBcCoefs
+    * implementation of the RobinBcCoefStrategy strategy.
+    *
+    * @param physical_bc_coef_strategy tbox::Pointer a concrete
+    *        implementation of the Robin bc strategy.
+    * @param variable hier::Variable pointer to be passed
+    *        to RobinBcCoefStrategy::setBcCoefs(),
+    *        but otherwise unused by this class.
+    */
+   void
+   setPhysicalBcCoefObject(
+      const RobinBcCoefStrategy* physical_bc_coef_strategy,
+      const tbox::Pointer<hier::Variable> variable =
+         tbox::Pointer<hier::Variable>(NULL));
+
+   /*!
+    * @brief Set the flag for printing solver information.
+    *
+    * This optional function is used primarily for debugging.
+    *
+    * If set true, it will print the HYPRE matrix information
+    * to the following files:
+    *
+    * - mat_bA.out - before setting matrix coefficients in matrix assemble
+    * - mat_aA.out - after setting matrix coefficients in matrix assemble
+    * - sol0.out   - u before solve (i.e. for system Au = b)
+    * - sol.out    - u after solve
+    * - mat0.out   - A before solve
+    * - mat.out    - A after solve
+    * - rhs.out    - b before and after solve
+    *
+    * If this method is not called, or the flag is set false, no printing
+    * will occur.
+    */
+   void
+   setPrintSolverInfo(
+      const bool print);
+
+private:
+   /*!
+    * @brief Set state using database
+    *
+    * See the class description for the parameters that can be set
+    * from a database.
+    *
+    * @param database Input database.  If a NULL pointer is given,
+    * nothing is done.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> database);
+
+   void
+   setupHypreSolver();
+   void
+   destroyHypreSolver();
+   void
+   allocateHypreData();
+   void
+   deallocateHypreData();
+
+   void
+   copyToHypre(
+      HYPRE_StructVector vector,
+      pdat::CellData<double>& src,
+      int depth,
+      const hier::Box& box);
+   void
+   copyFromHypre(
+      pdat::CellData<double>& dst,
+      int depth,
+      HYPRE_StructVector vector,
+      const hier::Box box);
+
+   /*!
+    * @brief Add g*A*k0(a) from boundaries to rhs.
+    *
+    * Move the constant portion of the boundary condition
+    * contribution to the right hand side and add it to the existing rhs.
+    * This operation is done for physical as well as cf boundaries,
+    * so it is placed in a function.
+    *
+    * The boundary boxes given must be to either the physical
+    * boundary or coarse-fine boundary for the patch.  The
+    * bc coefficient implementation should correspond to the
+    * boundary being worked on.
+    */
+   void
+   add_gAk0_toRhs(
+      const hier::Patch& patch,
+      const tbox::Array<hier::BoundaryBox>& bdry_boxes,
+      const RobinBcCoefStrategy* robin_bc_coef,
+      pdat::CellData<double>& rhs);
+
+   //@{
+
+   /*!
+    * @name Dimension-independent functions to organize Fortran interface.
+    */
+
+   //! @brief Compute diagonal entries of the matrix when C is variable.
+   void
+   computeDiagonalEntries(
+      pdat::CellData<double>& diagonal,
+      const pdat::CellData<double>& C_data,
+      const pdat::SideData<double>& variable_off_diagonal,
+      const hier::Box& patch_box);
+   //! @brief Compute diagonal entries of the matrix when C is constant.
+   void
+   computeDiagonalEntries(
+      pdat::CellData<double>& diagonal,
+      const double C,
+      const pdat::SideData<double>& variable_off_diagonal,
+      const hier::Box& patch_box);
+   //! @brief Compute diagonal entries of the matrix when C is zero.
+   void
+   computeDiagonalEntries(
+      pdat::CellData<double>& diagonal,
+      const pdat::SideData<double>& variable_off_diagonal,
+      const hier::Box& patch_box);
+   /*!
+    * @brief Adjust boundary entries for variable off-diagonals.
+    *
+    * At the same time, save information that are needed to adjust
+    * the rhs.
+    */
+   void
+   adjustBoundaryEntries(
+      pdat::CellData<double>& diagonal,
+      const pdat::SideData<double>& variable_off_diagonal,
+      const hier::Box& patch_box,
+      const pdat::ArrayData<double>& acoef_data,
+      const pdat::ArrayData<double>& bcoef_data,
+      const hier::Box bccoef_box,
+      pdat::ArrayData<double>& Ak0_data,
+      const hier::BoundaryBox& trimmed_boundary_box,
+      const double h[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]);
+
+   //@}
+
+   //! @brief Free static variables at shutdown time.
+   static void
+   finalizeCallback();
+
+   /*!
+    * @brief Object dimension.
+    */
+   const tbox::Dimension d_dim;
+
+   /*!
+    * @brief Object name.
+    */
+   std::string d_object_name;
+
+   /*!
+    * @brief Associated hierarchy.
+    */
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+
+   /*!
+    * @brief Associated level number.
+    *
+    * Currently, this must be level number 0.
+    */
+   int d_ln;
+
+   /*!
+    * @brief Scratch context for this object.
+    */
+   tbox::Pointer<hier::VariableContext> d_context;
+
+   //@{ @name Boundary condition handling
+
+   /*!
+    * @brief The coarse-fine boundary description for level d_ln.
+    *
+    * The coarse-fine boundary is computed when the operator
+    * state is initialized.  It is used to allow solves on
+    * levels that are not the coarsest in the hierarchy.
+    */
+   tbox::Pointer<hier::CoarseFineBoundary> d_cf_boundary;
+
+   /*!
+    * @brief Robin boundary coefficient object for physical
+    * boundaries.
+    *
+    * If d_physical_bc_coef_strategy is set, use it, otherwise,
+    * use d_physical_bc_simple_case.
+    */
+   const RobinBcCoefStrategy* d_physical_bc_coef_strategy;
+   tbox::Pointer<hier::Variable> d_physical_bc_variable;
+
+   /*!
+    * @brief Implementation of Robin boundary conefficients
+    * for the case of simple boundary conditions.
+    */
+   SimpleCellRobinBcCoefs d_physical_bc_simple_case;
+
+   /*!
+    * @brief Robin boundary coefficient object for coarse-fine
+    * boundaries.
+    *
+    * This is a GhostCellRobinBcCoefs object because we
+    * expect the users to have the correct ghost cell values
+    * in the coarse-fine boundaries before solving.
+    */
+   GhostCellRobinBcCoefs d_cf_bc_coef;
+   tbox::Pointer<hier::Variable> d_coarsefine_bc_variable;
+
+   //@}
+
+   /*!
+    * @brief hier::Patch index of A*k0(a) quantity
+    *
+    * A*k0(a) is the quantity that is saved for
+    * later adding to the rhs.
+    *
+    * The Robin bc is expressed by the coefficients a and g
+    * on the boundary (see RobinBcCoefStrategy).
+    * This class uses a central difference approximation of
+    * the Robin bc, which results in the value at a ghost cell,
+    * uo, being writen as uo = g*k0(a) + k1(a)*ui, where ui is
+    * the first interior cell value, k0 and k1 depend on a as
+    * indicated.
+    *
+    * In setting up the Au=f system, the contribution of k1(a)*ui
+    * is incorporated into the product Au.  The contribution of
+    * A*g*k0(a) should be moved to the right hand side and saved for
+    * later adding to f.  However, the value of g is not provided
+    * until solve time.  Therefore, we save just A*k0(a) at the
+    * patch data index d_Ak0_id.
+    */
+   int d_Ak0_id;
+
+   static tbox::Pointer<pdat::OutersideVariable<double> > s_Ak0_var[tbox::
+                                                                    Dimension::
+                                                                    MAXIMUM_DIMENSION_VALUE];
+
+   /*!
+    * @brief Depth of the solution variable.
+    */
+   int d_soln_depth;
+
+   /*!
+    * @brief Depth of the rhs variable.
+    */
+   int d_rhs_depth;
+
+   int d_max_iterations;
+   double d_relative_residual_tol;
+
+   int d_number_iterations; // iterations in solver
+   int d_num_pre_relax_steps;  // pre-relax steps in solver
+   int d_num_post_relax_steps; // post-relax steps in solver
+   double d_relative_residual_norm;  // norm from solver
+
+   /*@
+    * @brief Flag to use SMG or PFMG (default)
+    */
+   bool d_use_smg;
+
+   //@{
+   //! @name Hypre object
+   //! @brief HYPRE grid
+   HYPRE_StructGrid d_grid;
+   //! @brief HYPRE stencil
+   HYPRE_StructStencil d_stencil;
+   //! @brief HYPRE structured matrix
+   HYPRE_StructMatrix d_matrix;
+   //! @brief Hypre RHS vector for linear solves
+   HYPRE_StructVector d_linear_rhs;
+   //! @brief Hypre solution vector
+   HYPRE_StructVector d_linear_sol;
+   //! @brief Hypre SMG solver data
+   HYPRE_StructSolver d_mg_data;
+   //@}
+
+   //@{
+
+   //! @name Variables for debugging and analysis.
+
+   /*!
+    * @brief Flag to print solver info
+    *
+    * See setPrintSolverInfo().
+    */
+   bool d_print_solver_info;
+
+   //@}
+
+   /*!
+    * @brief Timers for performance measurement.
+    */
+   tbox::Pointer<tbox::Timer> t_solve_system;
+   tbox::Pointer<tbox::Timer> t_set_matrix_coefficients;
+
+   static tbox::StartupShutdownManager::Handler s_finalize_handler;
+};
+
+}
+} // namespace SAMRAI
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/solv/CellPoissonHypreSolver.I"
+#endif
+
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/FACOperatorStrategy.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/FACOperatorStrategy.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,49 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to user-defined operations used in FAC solve. 
+ *
+ ************************************************************************/
+
+#ifndef included_solv_FACOperatorStrategy_C
+#define included_solv_FACOperatorStrategy_C
+
+#include "SAMRAI/solv/FACOperatorStrategy.h"
+
+namespace SAMRAI {
+namespace solv {
+
+FACOperatorStrategy::FACOperatorStrategy() {
+}
+
+FACOperatorStrategy::~FACOperatorStrategy() {
+}
+
+void FACOperatorStrategy::postprocessOneCycle(
+   int fac_cycle_num,
+   const SAMRAIVectorReal<double>& current_soln,
+   const SAMRAIVectorReal<double>& residual)
+{
+   NULL_USE(fac_cycle_num);
+   NULL_USE(current_soln);
+   NULL_USE(residual);
+}
+
+void FACOperatorStrategy::initializeOperatorState(
+   const SAMRAIVectorReal<double>& solution,
+   const SAMRAIVectorReal<double>& rhs)
+{
+   NULL_USE(solution);
+   NULL_USE(rhs);
+}
+
+void FACOperatorStrategy::deallocateOperatorState()
+{
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/FACOperatorStrategy.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/FACOperatorStrategy.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,374 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to user-defined operations used in FAC solve. 
+ *
+ ************************************************************************/
+#ifndef included_solv_FACOperatorStrategy
+#define included_solv_FACOperatorStrategy
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/solv/SAMRAIVectorReal.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace solv {
+
+/*!
+ * @brief Defines a Strategy pattern interface to problem-specific
+ * operations needed to implement the FAC preconditioner algorithm.
+ *
+ * The FACPreconditioner constructor accepts a concrete
+ * implementation of this interface and calls the concrete implementations
+ * of the virtual functions declared herein during the solution
+ * process.
+ *
+ * All vector arguments in these interfaces are guaranteed to be
+ * either the vectors given to in FACPreconditioner::solveSystem()
+ * or FACPreconditioner::initializeSolverState()
+ * or vectors cloned from them.
+ *
+ * @see solv::FACPreconditioner
+ */
+
+class FACOperatorStrategy
+{
+public:
+   /*!
+    * @brief Empty constructor.
+    */
+   FACOperatorStrategy();
+
+   /*!
+    * @brief Virtual destructor.
+    */
+   virtual ~FACOperatorStrategy();
+
+   //@{
+   /*!
+    * @name Operator-dependent virtual methods
+    */
+
+   /*!
+    * @brief Restrict the solution quantity to the specified level
+    * from the next finer level.
+    *
+    * Restrict the residual data to level dest_ln in the destination
+    * vector d, from level dest_ln+1 in the source vector s.
+    *
+    * Can assume:
+    * -# dest_ln is not the finest level in the range being solved.
+    * -# corresponding solution has been computed on level dest_ln+1.
+    * -# the source and destination residual vectors (s and d) may
+    *    or may not be the same.  (This function must work in either case.)
+    *
+    * Upon return from this function, the solution on the refined region
+    * of the coarse level will represent the coarsened version of the
+    * fine solution in a manner that is consistent with the linear system
+    * approximation on the composite grid.  This function must not change
+    * the solution values anywhere except on level dest_ln of the destination
+    * vector.
+    *
+    * The source and destination vectors may be the same.
+    *
+    * @param source source solution
+    * @param dest destination solution
+    * @param dest_ln destination level number
+    */
+   virtual void
+   restrictSolution(
+      const SAMRAIVectorReal<double>& source,
+      SAMRAIVectorReal<double>& dest,
+      int dest_ln) = 0;
+
+   /*!
+    * @brief Restrict the residual quantity to the specified level
+    * from the next finer level.
+    *
+    * Restrict the residual data to level dest_ln in the destination
+    * vector d, from level dest_ln+1 in the source vector s.
+    *
+    * Can assume:
+    * -# dest_ln is not the finest level in the range being solved.
+    * -# correspnding residual has been computed on level dest_ln+1.
+    * -# the source and destination residual vectors (s and d) may
+    *    or may not be the same.  (This function must work in either case.)
+    *
+    * Upon return from this function, the residual on the refined region
+    * of the coarse level will represent the coarsened version of the
+    * fine residual in a manner that is consistent with the linear system
+    * approximation on the composite grid.  This function must not change
+    * the residual values anywhere except on level dest_ln of the destination
+    * vector.
+    *
+    * The source and destination vectors may be the same.
+    *
+    * @param source source residual
+    * @param dest destination residual
+    * @param dest_ln destination level number
+    */
+   virtual void
+   restrictResidual(
+      const SAMRAIVectorReal<double>& source,
+      SAMRAIVectorReal<double>& dest,
+      int dest_ln) = 0;
+
+   /*!
+    * @brief Prolong the error quantity to the specified level
+    * from the next coarser level and apply the correction to
+    * the fine-level error.
+    *
+    * On the part of the coarse level that does @em not overlap
+    * the fine level, the error is the corection to Au=f.
+    *
+    * On the part of the coarse level that @em does overlap the fine level,
+    * the error is the corection to Ae=r of the fine level.
+    *
+    * This function should apply the coarse-level correction to the
+    * fine level, that is @f[
+    * e^{fine} \leftarrow e^{fine} + I^{fine}_{coarse} e^{coarse}
+    * @f]
+    *
+    * @b Note: You probably have to store the refined error in a
+    * temporary location before adding it to the current error.
+    *
+    * The array of boundary information contains a description of
+    * the coarse-fine level boundary for each patch on the level;
+    * the boundary information for patch N is obtained as the
+    * N-th element in the array, coarse_fine_boundary[N].
+    *
+    * Upon return from this function,
+    * the error on the fine level must represent the correction
+    * to the solution on that level.
+    * Also, this function must not change the error values on the
+    * coarse level.
+    *
+    * The source and destination vectors may be the same.
+    *
+    * @param source source error vector
+    * @param dest destination error vector
+    * @param dest_ln destination level number of data transfer
+    */
+   virtual void
+   prolongErrorAndCorrect(
+      const SAMRAIVectorReal<double>& source,
+      SAMRAIVectorReal<double>& dest,
+      int dest_ln) = 0;
+
+   /*!
+    * @brief Perform a given number of relaxations on the error.
+    *
+    * Relax the residual equation Ae=r by applying the
+    * given number of smoothing sweeps on the specified level.
+    * The relaxation may ignore the possible existence of finer
+    * levels on a given level.
+    *
+    * The array of boundary
+    * information contains a description of the coarse-fine level boundary
+    * for each patch on the level; the boundary information for patch N is
+    * obtained as the N-th element in the array, coarse_fine_boundary[N].
+    *
+    * May assume:
+    * - If intermediate data from level l+1 is needed (for example,
+    * to match flux at coarse-fine boundaries), that data is already
+    * computed and stored on level l+1.
+    * - The error in the next finer level has been computed and stored
+    * there.
+    *
+    * Steps for each iteration.
+    * -# Fill ghost boundaries
+    * -# Compute intermediate data (if needed) and coarsen intermediate
+    * data stored in level l+1 (if needed).
+    * -# Perform relaxation step (update e toward a better
+    * approximation).
+    *
+    * Final step before leaving function.
+    * - If needed, compute and store intermediate data for
+    * next coarser level l-1.
+    *
+    * @param error error vector
+    * @param residual residual vector
+    * @param ln level number
+    * @param num_sweeps number of sweeps
+    */
+   virtual void
+   smoothError(
+      SAMRAIVectorReal<double>& error,
+      const SAMRAIVectorReal<double>& residual,
+      int ln,
+      int num_sweeps) = 0;
+
+   /*!
+    * @brief Solve the residual equation Ae=r on the coarsest
+    * level in the FAC iteration.
+    *
+    * Here e is the given error quantity and r is the
+    * given residual quantity.  The array of boundary information contains a
+    * description of the coarse-fine level boundary for each patch on the
+    * level; the boundary information for patch N is obtained as the N-th
+    * element in the array, coarse_fine_boundary[N].
+    *
+    * This routine must fill boundary values for given solution quantity
+    * on all patches on the specified level before the solve is performed.
+    *
+    * @param error error vector
+    * @param residual residual vector
+    * @param coarsest_ln coarsest level number
+    * @return 0 if solver converged to specified level, nonzero otherwise.
+    *
+    */
+   virtual int
+   solveCoarsestLevel(
+      SAMRAIVectorReal<double>& error,
+      const SAMRAIVectorReal<double>& residual,
+      int coarsest_ln) = 0;
+
+   /*!
+    * @brief Compute composite grid residual on a single level.
+    *
+    * For the specified level number ln,
+    * compute the @em composite residual r=f-Au,
+    * where f is the right hand side and u is the solution.
+    * Note that the composite residual is not a one-level
+    * residual.  It must take into account the composite grid
+    * stencil around the coarse-fine grid interface.
+    *
+    * May assume:
+    * - Composite residual on next finer level l+1,
+    *   has been computed already.
+    * - If any intermediately computed data is needed from
+    *   level l+1, it has been done and stored on that level.
+    * - Residual computations for the original equation and
+    *   the error equations will not be intermingled within
+    *   one FAC cycle.
+    *
+    * Steps:
+    * -# Fill boundary ghosts.
+    * -# If needed, coarsen intermediate data from level l+1.
+    * -# Compute residual @f$ r^l \leftarrow f - A u^l @f$.
+    *
+    * Final step before leaving function:
+    * - If any intermediately computed data is needed in at
+    *   level l-1, it must be computed and stored before
+    *   leaving this function.
+    *
+    * @b Important: Do not restrict residual from finer levels.
+    * (However, you must write the function restrictResidual()
+    * to do this.)
+    *
+    * @b Important: This function must also work when the
+    * right-hand-side and the residual are identical.
+    * In that case, it should effectively do @f$ r \leftarrow r - A u @f$.
+    *
+    * @param residual residual vector
+    * @param solution solution vector
+    * @param rhs source (right hand side) vector
+    * @param ln level number
+    * @param error_equation_indicator flag stating whether u is an error
+    * vector or a solution vector
+    */
+   virtual void
+   computeCompositeResidualOnLevel(
+      SAMRAIVectorReal<double>& residual,
+      const SAMRAIVectorReal<double>& solution,
+      const SAMRAIVectorReal<double>& rhs,
+      int ln,
+      bool error_equation_indicator) = 0;
+
+   /*!
+    * @brief Compute the norm of the residual quantity
+    *
+    * Compute norm of the given residual on the given range of
+    * hierarchy levels.  The residual vector is computed already
+    * and you should @b not change it.
+    * The only purpose of this function to allow you to choose
+    * how to define the norm.
+    *
+    * The norm value is used during the FAC iteration
+    * to determine convergence of the composite grid linear system.
+    *
+    * Residual values that lie under a finer level should not be counted.
+    *
+    * @param residual residual vector
+    * @param fine_ln finest level number
+    * @param coarse_ln coarsest level number
+    *
+    * @return norm value of residual vector, which should be non-negative
+    */
+   virtual double
+   computeResidualNorm(
+      const SAMRAIVectorReal<double>& residual,
+      int fine_ln,
+      int coarse_ln) = 0;
+
+   /*!
+    * @brief Regular call back routine to be called after each FAC cycle.
+    *
+    * This function is called after each FAC cycle.
+    * It allows you to monitor the progress and do other things.
+    * You should @em not modify the solution vector in the argument.
+    *
+    * The default implementation does nothing.
+    *
+    * @param fac_cycle_num FAC cycle number completed
+    * @param current_soln current solution
+    * @param residual residual based on the current solution
+    */
+   virtual void
+   postprocessOneCycle(
+      int fac_cycle_num,
+      const SAMRAIVectorReal<double>& current_soln,
+      const SAMRAIVectorReal<double>& residual);
+
+   /*!
+    * @brief Compute hierarchy-dependent data if any is required
+    *
+    * This function is called when the hierarchy configuration changes.
+    * If you maintain any hierarchy-dependent data in your implementation
+    * (for example, caching communication schedules or computing
+    * coarse-fine boundaries),
+    * use this function to update that data.
+    *
+    * If you do not maintain such data, this function may be empty.
+    *
+    * Note that although the vector arguments given to other
+    * methods in this class may not necessarily be the same
+    * as those given to this method, there will be similarities,
+    * including:
+    * - hierarchy configuration (hierarchy pointer and level range)
+    * - number, type and alignment of vector component data
+    * - ghost cell width of data in the solution (or solution-like) vector
+    *
+    * @param solution solution vector u
+    * @param rhs right hand side vector f
+    *
+    * The default implementation does nothing.
+    */
+   virtual void
+   initializeOperatorState(
+      const SAMRAIVectorReal<double>& solution,
+      const SAMRAIVectorReal<double>& rhs);
+
+   /*!
+    * @brief Remove all hierarchy-dependent data.
+    *
+    * Remove all hierarchy-dependent data set by initializeOperatorState().
+    *
+    * @see initializeOperatorState
+    */
+   virtual void
+   deallocateOperatorState();
+
+   //@}
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/FACPreconditioner.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/FACPreconditioner.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,853 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   FAC algorithm for solving linear equations on a hierarchy 
+ *
+ ************************************************************************/
+
+#ifndef included_solv_FACPreconditioner_C
+#define included_solv_FACPreconditioner_C
+
+#include "SAMRAI/math/HierarchyDataOpsManager.h"
+#include "SAMRAI/solv/FACPreconditioner.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/solv/FACPreconditioner.I"
+#endif
+
+#include IOMANIP_HEADER_FILE
+
+namespace SAMRAI {
+namespace solv {
+
+// using namespace std;
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor checks arguments and sets uninitialized solver state.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+FACPreconditioner::FACPreconditioner(
+   const std::string& name,
+   FACOperatorStrategy& user_ops,
+   tbox::Pointer<tbox::Database> database):
+   d_object_name(name),
+   d_fac_operator(user_ops),
+   d_coarsest_ln(0),
+   d_finest_ln(0),
+   d_residual_vector(),
+   d_tmp_residual(),
+   d_error_vector(),
+   d_tmp_error(),
+   d_max_iterations(0),
+   d_residual_tolerance(tbox::MathUtilities<double>::getSignalingNaN()),
+   d_relative_residual_tolerance(tbox::MathUtilities<double>::getSignalingNaN()),
+   d_presmoothing_sweeps(1),
+   d_postsmoothing_sweeps(1),
+   d_algorithm_choice("default"),
+   d_number_iterations(0),
+   d_residual_norm(tbox::MathUtilities<double>::getSignalingNaN()),
+   d_rhs_norm(tbox::MathUtilities<double>::getSignalingNaN()),
+   d_convergence_factor(),
+   d_avg_convergence_factor(tbox::MathUtilities<double>::getSignalingNaN()),
+   d_net_convergence_factor(tbox::MathUtilities<double>::getSignalingNaN()),
+   d_do_log(false),
+   d_controlled_level_ops()
+{
+
+   t_solve_system = tbox::TimerManager::getManager()->
+      getTimer("solv::FACPreconditioner::solveSystem()_fac_cycling");
+
+   /*
+    * Initialize object with data read from input database.
+    */
+   if (database) {
+      getFromInput(database);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destructor for FACPreconditioner.                               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+FACPreconditioner::~FACPreconditioner()
+{
+   deallocateSolverState();
+}
+
+/*
+ ********************************************************************
+ * Set state from database                                          *
+ ********************************************************************
+ */
+
+void FACPreconditioner::getFromInput(
+   tbox::Pointer<tbox::Database> database)
+{
+   if (database) {
+      if (database->isBool("enable_logging")) {
+         bool logging = database->getBool("enable_logging");
+         enableLogging(logging);
+      }
+      if (database->isInteger("max_cycles")) {
+         int max_cycles = database->getInteger("max_cycles");
+         setMaxCycles(max_cycles);
+      }
+      if (database->isDouble("residual_tol")) {
+         double residual_tol = database->getDouble("residual_tol");
+         setResidualTolerance(residual_tol, d_relative_residual_tolerance);
+      }
+      if (database->isDouble("relative_residual_tol")) {
+         double relative_residual_tol = database->getDouble(
+               "relative_residual_tol");
+         setResidualTolerance(d_residual_tolerance, relative_residual_tol);
+      }
+      if (database->isInteger("num_pre_sweeps")) {
+         int num_pre_sweeps = database->getInteger("num_pre_sweeps");
+         setPresmoothingSweeps(num_pre_sweeps);
+      }
+      if (database->isInteger("num_post_sweeps")) {
+         int num_post_sweeps = database->getInteger("num_post_sweeps");
+         setPostsmoothingSweeps(num_post_sweeps);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Functions for setting up and deallocating solver state.               *
+ *                                                                       *
+ *************************************************************************
+ */
+void FACPreconditioner::deallocateSolverState()
+{
+   /*
+    * Delete hierarchy-dependent state data.
+    */
+
+   if (!d_patch_hierarchy.isNull()) {
+
+      d_coarsest_ln = d_finest_ln = -1;
+      d_patch_hierarchy.setNull();
+
+      if (d_error_vector) {
+         d_error_vector->freeVectorComponents();
+         d_error_vector.setNull();
+      }
+      if (d_tmp_error) {
+         d_tmp_error->freeVectorComponents();
+         d_tmp_error.setNull();
+      }
+      if (d_residual_vector) {
+         d_residual_vector->freeVectorComponents();
+         d_residual_vector.setNull();
+      }
+      if (d_tmp_residual) {
+         d_tmp_residual->freeVectorComponents();
+         d_tmp_residual.setNull();
+      }
+
+      d_controlled_level_ops.setNull();
+      d_fac_operator.deallocateOperatorState();
+   }
+}
+
+void FACPreconditioner::initializeSolverState(
+   const SAMRAIVectorReal<double>& solution,
+   const SAMRAIVectorReal<double>& rhs)
+{
+   /*
+    * First get rid of current data.
+    */
+   deallocateSolverState();
+   /*
+    * Set hierarchy and levels to solve.
+    */
+   d_patch_hierarchy = solution.getPatchHierarchy();
+   d_coarsest_ln = solution.getCoarsestLevelNumber();
+   d_finest_ln = solution.getFinestLevelNumber();
+   /*
+    * Set the solution-vector-dependent scratch space.
+    */
+   d_error_vector = solution.cloneVector(d_object_name + "::error");
+   d_error_vector->allocateVectorData();
+   if (d_algorithm_choice == "mccormick-s4.3") {
+      d_tmp_error = solution.cloneVector(d_object_name + "::temporary_error");
+      d_tmp_error->allocateVectorData();
+   }
+   d_residual_vector = rhs.cloneVector(d_object_name + "::residual");
+   d_residual_vector->allocateVectorData();
+   d_tmp_residual = rhs.cloneVector(d_object_name + "::FAC coarser residual");
+   d_tmp_residual->allocateVectorData();
+   /*
+    * Set the controlled level operators, which depend on the number
+    * of components in the solution vector.
+    */
+   math::HierarchyDataOpsManager* ops_manager =
+      math::HierarchyDataOpsManager::getManager();
+   int num_components = solution.getNumberOfComponents();
+   d_controlled_level_ops.resizeArray(num_components);
+   for (int i = 0; i < num_components; ++i) {
+      tbox::Pointer<hier::Variable> variable = solution.getComponentVariable(i);
+      d_controlled_level_ops[i] =
+         ops_manager->getOperationsDouble(variable,
+            d_patch_hierarchy,
+            true);
+      /*
+       * Note: the variable used above is only for the purpose of determining
+       * the variable alignment on the grid.  It is not specific to any
+       * instance.
+       */
+   }
+   /*
+    * Error checking.
+    */
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_patch_hierarchy != rhs.getPatchHierarchy()) {
+      TBOX_ERROR(d_object_name << ": vectors must have the same hierarchy.\n");
+   }
+   if (d_coarsest_ln < 0) {
+      TBOX_ERROR(d_object_name << ": coarsest level must not be negative.\n");
+   }
+   if (d_coarsest_ln > d_finest_ln) {
+      TBOX_ERROR(d_object_name << ": coarsest level must be <= finest"
+                               << "level.\n");
+   }
+#endif
+   for (int ln = d_coarsest_ln; ln <= d_finest_ln; ln++) {
+      if (d_patch_hierarchy->getPatchLevel(ln).isNull()) {
+         TBOX_ERROR("FACPreconditioner::FACPreconditioner error ..."
+            << "\n   object name = " << d_object_name
+            << "\n   hierarchy level " << ln
+            << " does not exist" << std::endl);
+      }
+   }
+   d_fac_operator.initializeOperatorState(solution, rhs);
+}
+
+bool FACPreconditioner::checkVectorStateCompatibility(
+   const SAMRAIVectorReal<double>& solution,
+   const SAMRAIVectorReal<double>& rhs) const
+{
+   /*
+    * It is an error when the state is not initialized.
+    */
+   if (!d_patch_hierarchy) {
+      TBOX_ERROR(
+         d_object_name << ": cannot check vector-state\n"
+         <<
+         "compatibility when the state is uninitialized.\n");
+   }
+   bool rvalue = true;
+   const SAMRAIVectorReal<double>& error = *d_error_vector;
+   if (solution.getPatchHierarchy() != d_patch_hierarchy
+       || rhs.getPatchHierarchy() != d_patch_hierarchy) {
+      rvalue = false;
+   }
+   if (rvalue == true) {
+      if (solution.getCoarsestLevelNumber() != d_coarsest_ln
+          || rhs.getCoarsestLevelNumber() != d_coarsest_ln
+          || solution.getFinestLevelNumber() != d_finest_ln
+          || rhs.getFinestLevelNumber() != d_finest_ln) {
+         rvalue = false;
+      }
+   }
+   if (rvalue == true) {
+      const int ncomp = error.getNumberOfComponents();
+      if (solution.getNumberOfComponents() != ncomp
+          || rhs.getNumberOfComponents() != ncomp) {
+         rvalue = false;
+      }
+   }
+   return rvalue;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Solve the linear system and report whether itertion converged.        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool FACPreconditioner::solveSystem(
+   SAMRAIVectorReal<double>& u,
+   SAMRAIVectorReal<double>& f)
+{
+
+   d_residual_norm = tbox::MathUtilities<double>::getSignalingNaN();
+   d_avg_convergence_factor = tbox::MathUtilities<double>::getSignalingNaN();
+
+   /*
+    * Set the solution-vector-dependent data if not preset.
+    */
+   bool clear_hierarchy_configuration_when_done = false;
+   if (d_patch_hierarchy.isNull()) {
+      clear_hierarchy_configuration_when_done = true;
+      initializeSolverState(u,
+         f);
+   } else {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      if (!checkVectorStateCompatibility(u, f)) {
+         TBOX_ERROR(d_object_name << ": Incompatible vectors for\n"
+                                  << "current state in solveSystem.\n");
+      }
+#endif
+   }
+
+   t_solve_system->start();
+
+   d_error_vector->setToScalar(0.0, false);
+   if (d_tmp_error) {
+      d_tmp_error->setToScalar(0.0, false);
+   }
+   d_residual_vector->setToScalar(0.0);
+
+   const double initial_residual_norm = d_residual_norm =
+         computeFullCompositeResidual(*d_residual_vector,
+            u,
+            f);
+   /*
+    * Above step has the side effect of filling the residual
+    * vector d_residual_vector.
+    */
+
+   double effective_residual_tolerance = d_residual_tolerance;
+   if (d_relative_residual_tolerance >= 0) {
+      double tmp = d_fac_operator.computeResidualNorm(f,
+            d_finest_ln,
+            d_coarsest_ln);
+      tmp *= d_relative_residual_tolerance;
+      if (effective_residual_tolerance < tmp) effective_residual_tolerance =
+            tmp;
+   }
+
+   if (d_convergence_factor.getSize() < d_max_iterations)
+      d_convergence_factor.resizeArray(d_max_iterations);
+   d_number_iterations = 0;
+   /*
+    * Use a do loop instead of a while loop until convergence.
+    * It is important to go through the loop at least once
+    * because the residual norm can be less than the tolerance
+    * when the solution is 0 and the rhs is less than the tolerance.
+    */
+   do {
+
+      /*
+       * In zeroing the error vector, also zero out the ghost values.
+       * This gives the FAC operator an oportunity to bypass the
+       * ghost filling if it decides that the ghost values do not
+       * change.
+       */
+      d_error_vector->setToScalar(0.0, false);
+      /*
+       * Both the recursive and non-recursive fac cycling functions
+       * were coded to find the problem due presmoothing.  Both give
+       * the same results, but the problem due to presmoothing still
+       * exists.  BTNG.
+       */
+      if (d_algorithm_choice == "default") {
+         facCycle_Recursive(*d_error_vector,
+            *d_residual_vector,
+            u,
+            d_finest_ln,
+            d_coarsest_ln,
+            d_finest_ln);
+      } else if (d_algorithm_choice == "mccormick-s4.3") {
+         facCycle_McCormick(*d_error_vector,
+            *d_residual_vector,
+            u,
+            d_finest_ln,
+            d_coarsest_ln,
+            d_finest_ln);
+      } else if (d_algorithm_choice == "pernice") {
+         facCycle(*d_error_vector,
+            *d_residual_vector,
+            u,
+            d_finest_ln,
+            d_coarsest_ln);
+      }
+
+      int i, num_components = d_error_vector->getNumberOfComponents();
+      /*
+       * u += e
+       */
+      for (i = 0; i < num_components; ++i) {
+         int soln_id = u.getComponentDescriptorIndex(i);
+         int err_id = d_error_vector->getComponentDescriptorIndex(i);
+         d_controlled_level_ops[i]->resetLevels(d_coarsest_ln, d_finest_ln);
+         d_controlled_level_ops[i]->add(soln_id,
+            soln_id,
+            err_id);
+      }
+
+      /*
+       * Synchronize solution across levels by coarsening the
+       * more accurate fine-level solutions.
+       */
+      for (int ln = d_finest_ln - 1; ln >= d_coarsest_ln; --ln) {
+         d_fac_operator.restrictSolution(u,
+            u,
+            ln);
+      }
+
+      /*
+       * Compute convergence factor and new residual norm.
+       * 1. Temporarily save pre-cycle residual norm in
+       *    convergence factor stack.
+       * 2. Compute post-cycle residual norm.
+       * 3. Set convergence factor to ratio of post-cycle to pre-cycle
+       *    residual norms.
+       */
+      d_convergence_factor[d_number_iterations] = d_residual_norm;
+      d_residual_norm = computeFullCompositeResidual(*d_residual_vector,
+            u,
+            f);
+
+// Disable Intel warning on real comparison
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1572)
+#endif
+      if (d_convergence_factor[d_number_iterations] != 0) {
+         d_convergence_factor[d_number_iterations] =
+            d_residual_norm / d_convergence_factor[d_number_iterations];
+      } else {
+         d_convergence_factor[d_number_iterations] = 0;
+      }
+
+      /*
+       * Increment the iteration counter.
+       * The rest of this block expects it to have the incremented value.
+       * In particular, d_fac_operator.postprocessOneCycle does.
+       */
+      ++d_number_iterations;
+
+      /*
+       * Compute the convergence factors because they may be accessed
+       * from the operator's postprocessOneCycle function.
+       */
+      d_net_convergence_factor = d_residual_norm
+         / (initial_residual_norm + 1e-20);
+      d_avg_convergence_factor = pow(d_net_convergence_factor,
+            1.0 / d_number_iterations);
+
+      d_fac_operator.postprocessOneCycle(d_number_iterations - 1,
+         u,
+         *d_residual_vector);
+
+   } while ((d_residual_norm > effective_residual_tolerance)
+            && (d_number_iterations < d_max_iterations));
+
+   t_solve_system->stop();
+
+   if (clear_hierarchy_configuration_when_done) {
+      deallocateSolverState();
+   }
+
+   return d_residual_norm < effective_residual_tolerance;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Recursive version of FAC cycling.                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+void FACPreconditioner::facCycle_Recursive(
+   SAMRAIVectorReal<double>& e,
+   SAMRAIVectorReal<double>& r,
+   SAMRAIVectorReal<double>& u,
+   int lmax,
+   int lmin,
+   int ln)
+{
+
+   /*
+    * The steps 1-4 in this function are similar, but not exactly
+    * equivalent to McCormick's steps in his description of the
+    * V-cycle form of FAC.
+    *
+    * 1. If on the coarsest level, solve it.
+    * 2. Presmoothing.
+    * 3. Recurse to next lower level.
+    * 4. Postsmoothing.
+    */
+
+   /* Step 1. */
+   if (ln == lmin) {
+      d_fac_operator.solveCoarsestLevel(e,
+         r,
+         ln);
+   } else {
+
+      /* Step 2. */
+      d_fac_operator.smoothError(e,
+         r,
+         ln,
+         d_presmoothing_sweeps);
+      /* Step 3. */
+      d_fac_operator.computeCompositeResidualOnLevel(*d_tmp_residual,
+         e,
+         r,
+         ln,
+         true);
+      d_fac_operator.restrictResidual(*d_tmp_residual,
+         r,
+         ln - 1);
+      facCycle_Recursive(e,
+         r,
+         u,
+         lmax,
+         lmin,
+         ln - 1);
+      d_fac_operator.prolongErrorAndCorrect(e,
+         e,
+         ln);
+      /* Step 4. */
+      d_fac_operator.smoothError(e,
+         r,
+         ln,
+         d_postsmoothing_sweeps);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Implementation of Steve McCormick's V-cycle form of FAC               *
+ * as described in Section 4.3 of "Multilevel Adaptive Methods for       *
+ * Partial Differential Equations".                                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void FACPreconditioner::facCycle_McCormick(
+   SAMRAIVectorReal<double>& e,
+   SAMRAIVectorReal<double>& r,
+   SAMRAIVectorReal<double>& u,
+   int lmax,
+   int lmin,
+   int ln)
+{
+
+   /*
+    * The steps 1-4 in this function correspond to McCormick's steps
+    * those in his description.
+    *
+    * 1. If on the coarsest level, solve it.
+    * 2. Presmoothing.
+    * 3. Recurse to next lower level.
+    * 4. Postsmoothing.
+    */
+
+   /*
+    * Step 1.
+    */
+   if (ln == lmin) {
+      /*
+       * Solve coarsest level.
+       */
+      d_fac_operator.solveCoarsestLevel(e,
+         r,
+         ln);
+   } else {
+
+      int i, num_components = e.getNumberOfComponents();
+
+      /*
+       * Step 2a.
+       */
+      d_fac_operator.computeCompositeResidualOnLevel(*d_tmp_residual,
+         e,
+         r,
+         ln,
+         true);
+      for (i = 0; i < num_components; ++i) {
+         int tmp_id = d_tmp_error->getComponentDescriptorIndex(i);
+         d_controlled_level_ops[i]->resetLevels(ln,
+            ln);
+         d_controlled_level_ops[i]->setToScalar(tmp_id,
+            0.0);
+      }
+      /*
+       * Step 2b.
+       */
+      d_fac_operator.smoothError(*d_tmp_error,
+         *d_tmp_residual,
+         ln,
+         d_presmoothing_sweeps);
+      /*
+       * Step 2c.
+       */
+      for (i = 0; i < num_components; ++i) {
+         int tmp_id = d_tmp_error->getComponentDescriptorIndex(i);
+         int id = e.getComponentDescriptorIndex(i);
+         d_controlled_level_ops[i]->resetLevels(ln,
+            ln);
+         d_controlled_level_ops[i]->add(id,
+            id,
+            tmp_id);
+      }
+      /*
+       * Step 3a.
+       */
+      d_fac_operator.computeCompositeResidualOnLevel(*d_tmp_residual,
+         e,
+         r,
+         ln,
+         true);
+      d_fac_operator.restrictResidual(*d_tmp_residual,
+         *d_tmp_residual,
+         ln - 1);
+      /*
+       * Step 3b.
+       */
+      for (i = 0; i < num_components; ++i) {
+         int tmp_id = e.getComponentDescriptorIndex(i);
+         d_controlled_level_ops[i]->resetLevels(ln - 1,
+            ln - 1);
+         d_controlled_level_ops[i]->setToScalar(tmp_id,
+            0.0);
+      }
+      /*
+       * Step 3c.
+       */
+      facCycle_McCormick(e,
+         r,
+         u,
+         lmax,
+         lmin,
+         ln - 1);
+      /*
+       * Step 3d.
+       */
+      d_fac_operator.prolongErrorAndCorrect(e,
+         e,
+         ln);
+      /*
+       * Step 4a.
+       */
+      d_fac_operator.computeCompositeResidualOnLevel(*d_tmp_residual,
+         e,
+         r,
+         ln,
+         true);
+      for (i = 0; i < num_components; ++i) {
+         int tmp_id = d_tmp_error->getComponentDescriptorIndex(i);
+         d_controlled_level_ops[i]->resetLevels(ln,
+            ln);
+         d_controlled_level_ops[i]->setToScalar(tmp_id,
+            0.0);
+      }
+      /*
+       * Step 4b.
+       */
+      d_fac_operator.smoothError(*d_tmp_error,
+         *d_tmp_residual,
+         ln,
+         d_postsmoothing_sweeps);
+      /*
+       * Step 4c.
+       */
+      for (i = 0; i < num_components; ++i) {
+         int tmp_id = d_tmp_error->getComponentDescriptorIndex(i);
+         int id = e.getComponentDescriptorIndex(i);
+         d_controlled_level_ops[i]->resetLevels(ln,
+            ln);
+         d_controlled_level_ops[i]->add(id,
+            id,
+            tmp_id);
+      }
+
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Reimplementation of the FAC cycle Michael Pernice coded up            *
+ * in the first version of FACPreconditioner (the version          *
+ * that did not separate out the operators.                              *
+ *                                                                       *
+ *************************************************************************
+ */
+void FACPreconditioner::facCycle(
+   SAMRAIVectorReal<double>& e,
+   SAMRAIVectorReal<double>& r,
+   SAMRAIVectorReal<double>& u,
+   int lmax,
+   int lmin)
+{
+
+   NULL_USE(u);
+
+   int ln;
+
+   /*
+    * V-cycle descent.
+    */
+   for (ln = lmax; ln > lmin; --ln) {
+      /*
+       * Presmoothing.
+       */
+      d_fac_operator.smoothError(e,
+         r,
+         ln,
+         d_presmoothing_sweeps);
+      /*
+       * Compute residual to see how much correction is still needed:
+       * d_tmp_residual <- r - A e
+       */
+      d_fac_operator.computeCompositeResidualOnLevel(*d_tmp_residual,
+         e,
+         r,
+         ln,
+         true);
+      /*
+       * Change the residual on the part of the next coarser level
+       * below this level, so that the solve on the next coarser
+       * level really solves for the correction for this level
+       * where they overlap.
+       */
+      d_fac_operator.restrictResidual(*d_tmp_residual,
+         r,
+         ln - 1);
+   }    // End V-cycle descent.
+
+   /*
+    * V-cycle ascent.
+    */
+   for (ln = lmin; ln <= lmax; ++ln) {
+      /*
+       * Update the error by prolonging and postsmoothing,
+       * except on coarse level where an exact solve is performed.
+       */
+      if (ln == lmin) {
+         /*
+          * Solve coarsest level.
+          */
+         d_fac_operator.solveCoarsestLevel(e,
+            r,
+            ln);
+      } else {
+         /*
+          * Apply the coarse level correction to this level.
+          */
+         d_fac_operator.prolongErrorAndCorrect(e,
+            e,
+            ln);
+
+         /*
+          * Postsmoothing on the error,
+          * with inhomogeneous boundary condition.
+          */
+         /*
+          * Postsmoothing.
+          */
+         d_fac_operator.smoothError(e,
+            r,
+            ln,
+            d_postsmoothing_sweeps);
+
+      }
+
+   }    // End V-cycle ascent.
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private member function to compute the composite residual on all      *
+ * levels and return residual norm.                                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double FACPreconditioner::computeFullCompositeResidual(
+   SAMRAIVectorReal<double>& r,
+   SAMRAIVectorReal<double>& u,
+   SAMRAIVectorReal<double>& f)
+{
+
+   d_fac_operator.computeCompositeResidualOnLevel
+      (r,
+      u,
+      f,
+      d_finest_ln,
+      false);
+
+   for (int ln = d_finest_ln - 1; ln >= d_coarsest_ln; --ln) {
+
+      // Bring down more accurate solution from finer level.
+      d_fac_operator.restrictSolution(u, u, ln);
+
+      d_fac_operator.computeCompositeResidualOnLevel
+         (r,
+         u,
+         f,
+         ln,
+         false);
+
+      // Bring down more accurate residual from finer level.
+      d_fac_operator.restrictResidual(r,
+         r,
+         ln);
+
+   }
+
+   double residual_norm =
+      d_fac_operator.computeResidualNorm(r,
+         d_finest_ln,
+         d_coarsest_ln);
+
+   return residual_norm;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print internal data, mostly for debugging.                            *
+ *                                                                       *
+ *************************************************************************
+ */
+void FACPreconditioner::printClassData(
+   std::ostream& os) const {
+   os << "printing FACPreconditioner data...\n"
+      << "FACPreconditioner: this = " << (FACPreconditioner *)this << "\n"
+      << "d_object_name = " << d_object_name << "\n"
+      << "d_coarsest_ln = " << d_coarsest_ln << "\n"
+      << "d_finest_ln = " << d_finest_ln << "\n"
+      << "d_max_iterations = " << d_max_iterations << "\n"
+      << "d_residual_tolerance = " << d_residual_tolerance << "\n"
+      << "d_relative_residual_tolerance = " << d_relative_residual_tolerance
+      << "\n"
+      << "d_presmoothing_sweeps = " << d_presmoothing_sweeps << "\n"
+      << "d_postsmoothing_sweeps = " << d_postsmoothing_sweeps << "\n"
+      << "d_number_iterations = " << d_number_iterations << "\n"
+      << "d_residual_norm = " << d_residual_norm << "\n"
+      << "d_rhs_norm = " << d_rhs_norm << "\n"
+      << std::endl;
+
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/FACPreconditioner.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/FACPreconditioner.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,154 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   FAC algorithm for solving linear equations on a hierarchy 
+ *
+ ************************************************************************/
+
+#include <algorithm>
+#include <cctype>
+
+namespace SAMRAI {
+namespace solv {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Utility routines to get information about solver.                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+int FACPreconditioner::getNumberOfIterations() const
+{
+   return d_number_iterations;
+}
+
+SAMRAI_INLINE_KEYWORD
+double FACPreconditioner::getResidualNorm() const
+{
+   return d_residual_norm;
+}
+
+SAMRAI_INLINE_KEYWORD
+void FACPreconditioner::getConvergenceFactors(
+   double& avg_factor,
+   double& final_factor) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_number_iterations <= 0) {
+      TBOX_ERROR(d_object_name << ": Seeking convergence factors before\n"
+                               << "a solve is invalid.\n");
+   }
+#endif
+   avg_factor = d_avg_convergence_factor;
+   final_factor = d_convergence_factor[d_number_iterations - 1];
+}
+
+SAMRAI_INLINE_KEYWORD
+double FACPreconditioner::getNetConvergenceFactor() const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_number_iterations <= 0) {
+      TBOX_ERROR(d_object_name << ": Seeking convergence factors before\n"
+                               << "a solve is invalid.\n");
+   }
+#endif
+   return d_net_convergence_factor;
+}
+
+SAMRAI_INLINE_KEYWORD
+double FACPreconditioner::getAvgConvergenceFactor() const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_number_iterations <= 0) {
+      TBOX_ERROR(d_object_name << ": Seeking convergence factors before\n"
+                               << "a solve is invalid.\n");
+   }
+#endif
+   return d_avg_convergence_factor;
+}
+
+SAMRAI_INLINE_KEYWORD
+double FACPreconditioner::getFinalConvergenceFactor() const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_number_iterations <= 0) {
+      TBOX_ERROR(d_object_name << ": Seeking convergence factors before\n"
+                               << "a solve is invalid.\n");
+   }
+#endif
+   return d_convergence_factor[d_number_iterations - 1];
+}
+
+SAMRAI_INLINE_KEYWORD
+void FACPreconditioner::setPresmoothingSweeps(
+   int num_pre_sweeps) {
+   d_presmoothing_sweeps = num_pre_sweeps;
+}
+
+SAMRAI_INLINE_KEYWORD
+void FACPreconditioner::setPostsmoothingSweeps(
+   int num_post_sweeps) {
+   d_postsmoothing_sweeps = num_post_sweeps;
+}
+
+SAMRAI_INLINE_KEYWORD
+void FACPreconditioner::setMaxCycles(
+   int max_cycles) {
+   d_max_iterations = max_cycles;
+}
+
+SAMRAI_INLINE_KEYWORD
+void FACPreconditioner::setResidualTolerance(
+   double residual_tol,
+   double relative_residual_tol) {
+   d_residual_tolerance = residual_tol;
+   d_relative_residual_tolerance = relative_residual_tol;
+}
+
+SAMRAI_INLINE_KEYWORD
+void FACPreconditioner::setAlgorithmChoice(
+   const std::string& choice)
+{
+   /* This ptr_function helps resolve to the correct tolower method */
+   int (* ptr_function)(
+      int) = std::tolower;
+   std::string lower = choice;
+   std::transform(lower.begin(),
+      lower.end(),
+      lower.begin(),
+      ptr_function);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (lower != "default"               /* Recursive from BTNG */
+       && lower != "mccormick-s4.3"     /* McCormick's section 4.3 */
+       && lower != "pernice"            /* Translation of Pernice's */
+       ) {
+      TBOX_ERROR(
+         d_object_name << ": algorithm should be set to one of\n"
+         <<
+         "'default' (recommended), 'mccormick-s4.3' or 'pernice'\n");
+   }
+#endif
+   d_algorithm_choice = lower;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Functions to set logging parameters.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+void FACPreconditioner::enableLogging(
+   bool enabled) {
+   d_do_log = enabled;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/FACPreconditioner.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/FACPreconditioner.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,636 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   FAC algorithm for solving linear equations on a hierarchy 
+ *
+ ************************************************************************/
+
+#ifndef included_solv_FACPreconditioner
+#define included_solv_FACPreconditioner
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/math/HierarchyDataOpsReal.h"
+#include "SAMRAI/solv/FACOperatorStrategy.h"
+#include "SAMRAI/solv/SAMRAIVectorReal.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace solv {
+
+/*!
+ * @brief Implements the FAC iterative solution procedure
+ * for a linear system of equations, Au=f, defined
+ * on some subset of levels in an AMR patch hierarchy.
+ *
+ * The solution is found by applying an FAC algorithm
+ * to the composite grid represented in the hierarchy.
+ * After each FAC cycle the norm of the residual will be computed over
+ * all levels involved.  The FAC iteration will stop when either the
+ * maximum number of iterations is reached, or the residual norm on
+ * all levels is below the given tolerance.
+ *
+ * The user must perform the following steps to use the FAC solver:
+ * -# Create a FACPreconditioner, providing a valid concrete
+ *    FACOperatorStrategy object.
+ * -# Set the stopping criteria using the setStoppingParameters() function.
+ * -# Set the number of smooting sweeps using the setSmoothingSweeps()
+ *    function.  This is optional; if not used, the default is one sweep
+ *    in each case.
+ * -# Enable logging to record the FAC residual norms during the FAC
+ *    itertion using the setFACLogFlag() function.  This is optional;
+ *    the default is to turn logging off.  When loggin is turned on, the
+ *    default mode is to send this information to the application log
+ *    file (i.e., plog).
+ * -# Invoke the FAC iteration process by calling solveSystem(),
+ *    providing the vectors u and f, defined on a patch hierarchy
+ *    containing the desired range of levels.
+ * -# After solving, get solver statistics by viewing the log information
+ *    and calling getNumberOfIterations(), getResidualNorm() functions
+ *    if desired.
+ */
+
+class FACPreconditioner:public tbox::DescribedClass
+{
+public:
+   /*!
+    * Constructor.
+    *
+    * @param name Object name
+    * @param user_ops Reference to user-specified FAC operator
+    * @param database Input database with initialization parameters
+    */
+   FACPreconditioner(
+      const std::string& name,
+      FACOperatorStrategy& user_ops,
+      tbox::Pointer<tbox::Database> database =
+         tbox::Pointer<tbox::Database>(NULL));
+
+   /*!
+    * Virtual destructor.
+    */
+   virtual ~FACPreconditioner();
+
+   /*!
+    * @brief Solve linear system Au=f using the FAC algorithm.
+    *
+    * The return value is true if the solver
+    * converged and false otherwise.
+    * The problem-specific portions of the FAC procedure,
+    * including the definitions of A are provided by the
+    * FACOperatorStrategy object passed to the constructor.  More
+    * information about the iteration can be found by calling the functions
+    * getNumberOfIterations() and getResidualNorm() and by looking at the
+    * log information.
+    *
+    * Before calling this function, the form of the solution and
+    * right-hand-side quantities should be set properly by the user
+    * on all patch interiors on the range of levels covered by the
+    * FAC iteration.  All data in these vectors (that will be used
+    * by the FACOperatorStrategy implementation) should be allocated.
+    * Thus, the user is responsible for managing the
+    * storage for the solution and right-hand-side.
+    *
+    * Conditions on arguments:
+    * - vectors solution and rhs must have same hierarchy
+    * - vectors solution and rhs must have same variables (except that
+    *   solution can--and should--have enough ghost cells for computation).
+    *
+    * Upon return from this function,
+    * the solution vector will contain the result of the solve.
+    *
+    * @param solution solution vector u
+    * @param rhs right hand side vector f
+    *
+    * See initializeSolverState() and deallocateSolverState()
+    * for opportunities to save overhead
+    * when using multiple consecutive solves.
+    *
+    * @return whether solver converged to specified level
+    *
+    * @see initializeSolverState
+    */
+   bool
+   solveSystem(
+      SAMRAIVectorReal<double>& solution,
+      SAMRAIVectorReal<double>& rhs);
+
+   /*!
+    * @brief Compute hierarchy-dependent data required for solving
+    *
+    * By default, the solveSystem() method
+    * computes some required hierarchy-dependent data before
+    * solving and removes that data after the solve.
+    * For multiple solves using the same hierarchy configuration,
+    * it is more efficient to manually compute, using
+    * initializeSolverState(), and remove, using deallocateSolverState(),
+    * the hierarchy-dependent data so that it is not done inside
+    * solveSystem().  If solveSystem() detects that the solver state
+    * is already initialized, it will @em NOT change the state.
+    *
+    * The vector arguments for solveSystem() need not match
+    * those for initializeSolverState().  However, there must
+    * be a certain degree of similarity, including
+    * - hierarchy configuration (hierarchy pointer and level range)
+    * - number, type and alignment of vector component data
+    * - ghost cell width of data in the solution vector
+    *
+    * When assertion checking is enabled, limited checking is done
+    * by solveSystem() to help ensure that of the vectors passed
+    * to solveSystem() is compatible with the existing state.
+    *
+    * It is important to remember to reinitialize the solver state
+    * when your hierarchy configuration changes.
+    *
+    * It is safe to initializeSolverState() when the state is
+    * already initialized (the state is deallocated and reinitialized).
+    *
+    * Conditions on arguments:
+    * - solution and rhs must have same hierarchy
+    * - solution and rhs must have same structure, depth, etc.
+    *   (except that u can--and should--have enough ghost cells
+    *   for computation).
+    * - coarsest_ln through finest_ln must exist in u.
+    *
+    * To unset the data set in this function,
+    * see deallocateSolverState().
+    *
+    * After setting data for the current object, this function
+    * calls the operator's corresponding function,
+    * FACOperatorStrategy::initializeOperatorState()
+    * so that the operator object can take steps to remain
+    * in sync.
+    *
+    * @param solution solution vector u
+    * @param rhs right hand side vector f
+    */
+   void
+   initializeSolverState(
+      const SAMRAIVectorReal<double>& solution,
+      const SAMRAIVectorReal<double>& rhs);
+
+   /*!
+    * @brief Remove all hierarchy-dependent data computed by
+    * initializeSolverState()
+    *
+    * Remove all hierarchy-dependent data set by initializeSolverState().
+    * It is safe to call deallocateSolverState() even state is already
+    * deallocated.
+    *
+    * After deallocating data for the current object, this function
+    * calls the operator's corresponding function,
+    * FACOperatorStrategy::deallocateOperatorState()
+    * so that the operator object can take steps to remain
+    * in sync.
+    *
+    * @see initializeSolverState
+    */
+   void
+   deallocateSolverState();
+
+   /*!
+    * @brief Check compatibility of vectors with existing solver state.
+    *
+    * Check whether the solution and residual vectors given are
+    * compatible with the existing solver state (solver state
+    * must be initialized).  Compatibility means that the vectors
+    * are sufficiently similar with the vectors with which the
+    * state are initialized.  Compatibility implies that the
+    * vectors may be used in solveSystem().
+    *
+    * The checking is not perfect!
+    * Due to the possibility of user-defined patch data,
+    * data-dependent checks cannot be performed.
+    * It is possible that a false compatibility is returned.
+    *
+    * @return true if vectors are compatible with existing state
+    */
+   bool
+   checkVectorStateCompatibility(
+      const SAMRAIVectorReal<double>& solution,
+      const SAMRAIVectorReal<double>& rhs) const;
+
+   //@{
+   //! @name Functions to set solving parameters.
+
+   /*!
+    * @brief Set the number of pre-smoothing sweeps during
+    * FAC iteration process.
+    *
+    * Presmoothing is applied during the fine-to-coarse phase of the
+    * iteration.  The default is to use one sweep.
+    *
+    * @param num_pre_sweeps Number of presmoothing sweeps
+    */
+   void
+   setPresmoothingSweeps(
+      int num_pre_sweeps);
+
+   /*!
+    * @brief Set the number of post-smoothing sweeps during
+    * FAC iteration process.
+    *
+    * Postsmoothing is applied during the coarse-to-fine phase of the
+    * iteration.  The default is to use one sweep.
+    *
+    * @param num_post_sweeps Number of postsmoothing sweeps
+    */
+   void
+   setPostsmoothingSweeps(
+      int num_post_sweeps);
+
+   /*!
+    * @brief Set the max number of iterations (cycles) to use per solve.
+    */
+   void
+   setMaxCycles(
+      int max_cycles);
+
+   /*!
+    * @brief Set the residual tolerance for stopping.
+    *
+    * The solution is considered converged if ||b-Ax|| <= residual_tol
+    * @b or ||b-Ax|| <= relative_residual_tol*||b||.
+    *
+    * If you want the prescribed maximum number of cycles to always be taken,
+    * set both residual tolerances to negative numbers.
+    */
+   void
+   setResidualTolerance(
+      double residual_tol,
+      double relative_residual_tol = -1.0);
+
+   /*!
+    * @brief Set the choice of FAC cycling algorithm to use.
+    *
+    * For developer experimentation use only.
+    * All others should use the default choice.
+    *
+    * @internal This function allows us to switch the cycling
+    * algorithm to compare them.  This is mainly a debugging
+    * feature and will be removed at some time.  Current
+    * choices are:
+    * - "default": the default recursive algorithm interpreted
+    *        and coded by BTNG.
+    * - "mccormick-s4.3": algorithm coded by BTNG, following Steve McCormick's
+    *        section 4.3
+    * - "pernice": algorithm coded by BTNG, interpretting the
+    *        code originally written by Michael Pernice.
+    */
+   void
+   setAlgorithmChoice(
+      const std::string& choice);
+
+   //@}
+
+   //@{ @name Logging functions
+
+   /*!
+    * @brief Enable or disable logging.
+    *
+    * Set streams to NULL to turn off output.
+    *
+    * @param enabled Logging state.  true=on, false=off.
+    */
+   void
+   enableLogging(
+      bool enabled = true);
+
+   //@}
+
+   //@{
+   //! @name Functions to get data on last solve.
+
+   /*!
+    * @brief Return FAC iteration count from last (or current
+    * if there is one) FAC iteration process.
+    */
+   int
+   getNumberOfIterations() const;
+
+   /*!
+    * @brief Get convergance rates of
+    * the last (or current if there is one) FAC solve.
+    *
+    * The convergence factor is the factor to which the residual
+    * has been reduced.  The final factor is that from the last
+    * FAC cycle.
+    *
+    * @param avg_factor average convergence factor over FAC cycles
+    *        from last solve.
+    * @param final_factor convergence factor of the last FAC cycle
+    */
+   void
+   getConvergenceFactors(
+      double& avg_factor,
+      double& final_factor) const;
+
+   /*!
+    * @brief Get the net convergance rate of
+    * the last (or current if there is one) FAC solve.
+    *
+    * The net factor is the factor to which the residual
+    * has been reduced by the FAC cycles.
+    * It is (current residual)/( initial residual + epsilon),
+    * so it may not be accurate if the initial residual is very small.
+    */
+   double
+   getNetConvergenceFactor() const;
+   /*!
+    * @brief Get the average convergance rates of
+    * the last (or current if there is one) FAC solve.
+    *
+    * The average factor is the net factor to the power of
+    * 1/(number of FAC cycles).
+    * It may not be accurate if the initial residual is very small.
+    */
+   double
+   getAvgConvergenceFactor() const;
+   /*!
+    * @brief Get the final convergance rate of
+    * the last (or current if there is one) FAC solve.
+    *
+    * The final factor is the factor to which the residual
+    * has been reduced by the last FAC cycle.
+    */
+   double
+   getFinalConvergenceFactor() const;
+
+   /*!
+    * @brief Return residual norm from the just-completed FAC iteration.
+    *
+    * The norm return value is computed as the maximum norm over all
+    * patch levels involved in the solve.  The value corresponds to the
+    * norm applied in the user-defined residual computation.
+    *
+    * The latest computed norm is the one returned.
+    */
+   double
+   getResidualNorm() const;
+
+   //@}
+
+   /*!
+    * @brief Print data members for debugging.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os) const;
+
+private:
+   //@{
+   //! @name Functions not implemented:
+   FACPreconditioner(
+      const FACPreconditioner&);
+   void
+   operator = (
+      const FACPreconditioner&);
+   //@}
+
+   /*!
+    * @brief Set state using database
+    *
+    * See the class description for the parameters that can be set
+    * from a database.
+    *
+    * @param database Input database.  If a NULL pointer is given,
+    * nothing is done.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> database);
+
+   /*!
+    * @brief Compute composite residual on all levels and
+    * returns residual norm.
+    *
+    * Uses the FACOperatorStrategy::computeResidualOnLevel() function
+    * provided by the operator object to compute per level residual.
+    * Perform coarsen residual operation to get fine-grid approximation
+    * of residual on to coarse grid.
+    *
+    * The residual is r=f-Au.
+    *
+    * @param residual residual vector r
+    * @param solution solution vector u
+    * @param rhs right hand side vector f
+    */
+   double
+   computeFullCompositeResidual(
+      SAMRAIVectorReal<double>& residual,
+      SAMRAIVectorReal<double>& solution,
+      SAMRAIVectorReal<double>& rhs);
+
+   /*!
+    * @brief Perform recursive FAC cycle iteration.
+    *
+    * Do one FAC iteration of Ae=r system.  The FAC algorithm
+    * modifies Ae=r on coarser levels so that each coarser
+    * level solves for the change in error of the next finer level,
+    * as is expected in the FAC algorithm.
+    *
+    * The level number range lmax to lmin
+    * must exist in the vectors e and r.
+    *
+    * Assumes:
+    * - The error vector is preset to 0 on levels lmin to ln.
+    *
+    * @param error error vector e
+    * @param residual residual vector r
+    * @param solution solution vector u
+    * @param lmax finest level number
+    * @param lmin coarsest level number
+    * @param ln current level number
+    */
+   void
+   facCycle_Recursive(
+      SAMRAIVectorReal<double>& error,
+      SAMRAIVectorReal<double>& residual,
+      SAMRAIVectorReal<double>& solution,
+      int lmax,
+      int lmin,
+      int ln);
+
+   /*!
+    * @brief Perform recursive FAC cycle iteration from McCormick.
+    *
+    * Do one FAC iteration of Ae=r system.  The FAC algorithm
+    * modifies Ae=r on coarser levels so that each coarser
+    * level solves for the change in error of the next finer level,
+    * as is expected in the FAC algorithm.
+    *
+    * The level number range lmax to lmin
+    * must exist in the vectors e and r.
+    *
+    * Assumes:
+    * - The error vector is preset to 0 on levels lmin to ln.
+    *
+    * @param error error vector e
+    * @param residual residual vector r
+    * @param solution solution vector u
+    * @param lmax finest level number
+    * @param lmin coarsest level number
+    * @param ln current level number
+    */
+   void
+   facCycle_McCormick(
+      SAMRAIVectorReal<double>& error,
+      SAMRAIVectorReal<double>& residual,
+      SAMRAIVectorReal<double>& solution,
+      int lmax,
+      int lmin,
+      int ln);
+
+   /*!
+    * @brief Perform FAC cycle iteration.
+    *
+    * Do one FAC iteration of Ae=r system.  The FAC algorithm
+    * modifies Ae=r on coarser levels so that each coarser
+    * level solves for the change in error of the next finer level,
+    * as is expected in the FAC algorithm.
+    *
+    * The level number range lmax to lmin
+    * must exist in the vectors e and r.
+    *
+    * Assumes:
+    * - The error vector is preset to 0.
+    *
+    * @internal McCormick warned that cell-centered finite-volume
+    * methods requires a W cycle, even in multigrid.  So this
+    * function should be rewritten for that sort of flexibility.
+    * Probably, a recursive function is needed.
+    *
+    * @param error error vector e
+    * @param residual residual vector r
+    * @param solution solution vector u
+    * @param lmax finest level number
+    * @param lmin coarsest level number
+    */
+   void
+   facCycle(
+      SAMRAIVectorReal<double>& error,
+      SAMRAIVectorReal<double>& residual,
+      SAMRAIVectorReal<double>& solution,
+      int lmax,
+      int lmin);
+
+   /*!
+    * @brief Name of this FAC solver object.
+    */
+   std::string d_object_name;
+
+   /*!
+    * @brief Object providing problem-specific routines.
+    *
+    * tbox::Pointer is initialized by constructor @em never changes.
+    */
+   FACOperatorStrategy& d_fac_operator;
+
+   //@{
+   /*!
+    * @name Solution vector-dependent data.
+    *
+    * These variables are set by
+    * initializeSolverState and deallocateSolverState
+    * and used only during the solve process.
+    */
+
+   tbox::Pointer<hier::PatchHierarchy> d_patch_hierarchy;
+   int d_coarsest_ln;
+   int d_finest_ln;
+
+   /*!
+    * @brief Clone of solution vector to store residual.
+    */
+   tbox::Pointer<SAMRAIVectorReal<double> > d_residual_vector;
+
+   /*!
+    * @brief Clone of solution vector to store temporary residual.
+    */
+   tbox::Pointer<SAMRAIVectorReal<double> > d_tmp_residual;
+
+   /*!
+    * @brief Error vector.
+    */
+   tbox::Pointer<SAMRAIVectorReal<double> > d_error_vector;
+
+   /*!
+    * @brief Error vector for homogeneous boundary condition problem..
+    */
+   tbox::Pointer<SAMRAIVectorReal<double> > d_tmp_error;
+
+   //@}
+
+   //@{
+   /*!
+    * @name Parameters for FAC iteration.
+    */
+   int d_max_iterations;
+   double d_residual_tolerance;
+   double d_relative_residual_tolerance;
+   int d_presmoothing_sweeps;
+   int d_postsmoothing_sweeps;
+   std::string d_algorithm_choice;
+   //@}
+
+   //@{
+   /*!
+    * @name Status quantitities for FAC iteration.
+    */
+   int d_number_iterations;
+   double d_residual_norm;
+
+   /*!
+    * @brief Norm of RHS, for computing relative residual.
+    */
+   double d_rhs_norm;
+   /*!
+    * @brief Convergence factor stack.
+    *
+    * The convergence factor stack is reset for each solve
+    * and contains the convergence factors for each FAC cycle.
+    */
+   tbox::Array<double> d_convergence_factor;
+   /*!
+    * The average convergence factor computed from the current
+    * values in d_convergence_factor.
+    */
+   double d_avg_convergence_factor;
+   /*!
+    * The net convergence factor computed from the current
+    * values in d_convergence_factor.
+    */
+   double d_net_convergence_factor;
+   //@}
+
+   /*!
+    * @brief Flag stating whether to log.
+    */
+   bool d_do_log;
+
+   /*!
+    * @brief Objects facilitating operations over a specific range
+    * of levels.
+    */
+   tbox::Array<tbox::Pointer<math::HierarchyDataOpsReal<double> > >
+   d_controlled_level_ops;
+
+   /*!
+    * Timers for performance measurement.
+    */
+   tbox::Pointer<tbox::Timer> t_solve_system;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/solv/FACPreconditioner.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/GhostCellRobinBcCoefs.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/GhostCellRobinBcCoefs.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,248 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Robin boundary condition support on cartesian grids. 
+ *
+ ************************************************************************/
+#ifndef included_solv_GhostCellRobinBcCoefs_C
+#define included_solv_GhostCellRobinBcCoefs_C
+
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/math/ArrayDataBasicOps.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include IOMANIP_HEADER_FILE
+
+#include "SAMRAI/solv/GhostCellRobinBcCoefs.h"
+
+namespace SAMRAI {
+namespace solv {
+
+// using namespace std;
+
+/*
+ ************************************************************************
+ * Constructor                                                          *
+ ************************************************************************
+ */
+
+GhostCellRobinBcCoefs::GhostCellRobinBcCoefs(
+   const tbox::Dimension& dim,
+   std::string object_name):
+   d_object_name(object_name),
+   d_dim(dim),
+   d_ghost_data_id(-1),
+   d_extensions_fillable(dim)
+{
+
+   t_set_bc_coefs = tbox::TimerManager::getManager()->
+      getTimer("solv::GhostCellRobinBcCoefs::setBcCoefs()");
+}
+
+/*
+ ************************************************************************
+ * Destructor                                                           *
+ ************************************************************************
+ */
+
+GhostCellRobinBcCoefs::~GhostCellRobinBcCoefs(
+   void) {
+}
+
+/*
+ ************************************************************************
+ * Set the index of the data providing ghost cell values                *
+ ************************************************************************
+ */
+
+void GhostCellRobinBcCoefs::setGhostDataId(
+   int ghost_data_id,
+   hier::IntVector extensions_fillable)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, extensions_fillable);
+
+   d_ghost_data_id = ghost_data_id;
+   d_extensions_fillable = extensions_fillable;
+   /*
+    * Check for correctness of data index.
+    * Unfortunately, the ghost width is not provided by the
+    * variable database, so we cannot check that also.
+    */
+   if (d_ghost_data_id != -1) {
+      hier::VariableDatabase* vdb = hier::VariableDatabase::getDatabase();
+      tbox::Pointer<hier::Variable> variable_ptr;
+      vdb->mapIndexToVariable(ghost_data_id, variable_ptr);
+      if (!variable_ptr) {
+         TBOX_ERROR(d_object_name << ": hier::Index " << ghost_data_id
+                                  << " does not correspond to any variable.");
+      }
+      tbox::Pointer<pdat::CellVariable<double> >
+      cell_variable_ptr = variable_ptr;
+      if (!cell_variable_ptr) {
+         TBOX_ERROR(
+            d_object_name << ": hier::Index " << ghost_data_id
+            <<
+            " does not correspond to a cell-double variable.");
+      }
+   }
+}
+
+/*
+ ************************************************************************
+ * Set the bc coefficients reflect the value at the ghost cell centers. *
+ * The factor 1.0/(1+0.5*h) appears in a and g.  This factor comes      *
+ * from a linear approximation of the data through the patch boundary,  *
+ * going through the centers of the first interior and ghost cells      *
+ * and having the specified values there.                               *
+ ************************************************************************
+ */
+
+void GhostCellRobinBcCoefs::setBcCoefs(
+   tbox::Pointer<pdat::ArrayData<double> >& acoef_data,
+   tbox::Pointer<pdat::ArrayData<double> >& bcoef_data,
+   tbox::Pointer<pdat::ArrayData<double> >& gcoef_data,
+   const tbox::Pointer<hier::Variable>& variable,
+   const hier::Patch& patch,
+   const hier::BoundaryBox& bdry_box,
+   double fill_time) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS3(d_dim, *variable, patch, bdry_box);
+
+   NULL_USE(variable);
+   NULL_USE(fill_time);
+
+   t_set_bc_coefs->start();
+
+   tbox::Pointer<geom::CartesianPatchGeometry>
+   patch_geom = patch.getPatchGeometry();
+   const int norm_dir = bdry_box.getLocationIndex() / 2;
+   const double* dx = patch_geom->getDx();
+   const double h = dx[norm_dir];
+
+   /*
+    * Set acoef_data to 1.0/(1+0.5*h) uniformly.  This value
+    * corresponds to the fact that the solution is fixed at
+    * the ghost cell centers.  bcoef_data is 1-acoef_data.
+    */
+   if (!acoef_data.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *acoef_data);
+
+      acoef_data->fill(1.0 / (1 + 0.5 * h));
+   }
+   if (!bcoef_data.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *bcoef_data);
+
+      bcoef_data->fill(0.5 * h / (1 + 0.5 * h));
+   }
+
+   if (!gcoef_data.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *gcoef_data);
+
+      if (d_ghost_data_id == -1) {
+         TBOX_ERROR(d_object_name << ": Coefficient g requested without\n"
+                                  << "having valid ghost data id.\n");
+      }
+
+      /*
+       * Fill in gcoef_data with data from d_ghost_data_id.
+       * The data is first looked for in a pdat::OutersideData<DIM> object
+       * and a pdat::CellData<DIM> object in that order.  Data from the
+       * first place with allocated storage is used.
+       */
+      tbox::Pointer<hier::PatchData> patch_data =
+         patch.getPatchData(d_ghost_data_id);
+      if (patch_data.isNull()) {
+         TBOX_ERROR(d_object_name << ": hier::Patch data for index "
+                                  << d_ghost_data_id << " does not exist.");
+      }
+      tbox::Pointer<pdat::CellData<double> > cell_data = patch_data;
+      if (cell_data.isNull()) {
+         TBOX_ERROR(
+            d_object_name << ": hier::Patch data for index "
+            << d_ghost_data_id
+            << " is not cell double data.");
+      }
+      const int location_index = bdry_box.getLocationIndex();
+      const hier::IntVector& gw = cell_data->getGhostCellWidth();
+      if (gw[norm_dir] < 1) {
+         TBOX_ERROR(
+            d_object_name << ": hier::Patch data for index "
+            << d_ghost_data_id
+            << " has zero ghost width.");
+      }
+      const pdat::ArrayData<double>& cell_array_data =
+         cell_data->getArrayData();
+      hier::IntVector shift_amount(d_dim, 0);
+      if (location_index % 2 == 0) shift_amount[location_index / 2] = 1;
+      gcoef_data->copy(cell_array_data,
+         makeSideBoundaryBox(bdry_box),
+         shift_amount);
+      math::ArrayDataBasicOps<double> aops;
+      /*
+       * To convert from the value at the ghost cell center
+       * to the coefficient g, we must scale the data by
+       * 1/(1+h/2), according to our linear approximation
+       * of the data at the patch boundary.
+       */
+      aops.scale(*gcoef_data, 1.0 / (1 + 0.5 * h), *gcoef_data,
+         makeSideBoundaryBox(bdry_box));
+
+   }
+
+   t_set_bc_coefs->stop();
+}
+
+/*
+ ***********************************************************************
+ * This class can only set coeficients for boundary boxes that extend  *
+ * no more than what the data it uses provides.                        *
+ ***********************************************************************
+ */
+hier::IntVector GhostCellRobinBcCoefs::numberOfExtensionsFillable()
+const
+{
+   return d_extensions_fillable;
+}
+
+/*
+ ************************************************************************
+ * Make surface box on boundary using standard boundary box             *
+ ************************************************************************
+ */
+
+hier::Box GhostCellRobinBcCoefs::makeSideBoundaryBox(
+   const hier::BoundaryBox& boundary_box) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, boundary_box);
+
+   if (boundary_box.getBoundaryType() != 1) {
+      TBOX_ERROR(
+         d_object_name
+         << ": CartesianRobinBcHelper::makeSideBoundaryBox called with\n"
+         << "improper boundary box\n"
+         << "for " << d_object_name);
+   }
+   hier::Box face_indices = boundary_box.getBox();
+   int location_index = boundary_box.getLocationIndex();
+   if (location_index % 2 == 0) {
+      /*
+       * On the min index side, the face indices are one higher
+       * than the boundary cell indices, in the direction normal
+       * to the boundary.
+       */
+      face_indices.shift(location_index / 2, 1);
+   }
+   return face_indices;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/GhostCellRobinBcCoefs.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/GhostCellRobinBcCoefs.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,189 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Robin boundary condition problem-dependent interfaces 
+ *
+ ************************************************************************/
+#ifndef included_solv_GhostCellRobinBcCoefs
+#define included_solv_GhostCellRobinBcCoefs
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/solv/RobinBcCoefStrategy.h"
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Timer.h"
+
+namespace SAMRAI {
+namespace solv {
+
+/*!
+ * @brief A prefabricated Robin boundary condition coefficients
+ * for the case where cell-centered data is fixed at the first
+ * ghost-cell centers.
+ *
+ * This class is intended to make the use of the Robin boundary
+ * condition utterly trivial for users who who already have the
+ * correct values set in the ghost cells.  The motivation for
+ * this seemingly needless task is to interpret the requirement
+ * that solution is fixed at ghost cell centers to solvers that
+ * do not operate directly on the ghost cell values.
+ * An example is linear solvers that operate on Ax=b and
+ * require that the boundary condition be written as changes
+ * to A and b.
+ *
+ * This implementation of the strategy
+ * class RobinBcCoefStrategy can be used when ghost cell
+ * values are known and have been written to the ghost cells
+ * of the data being set.  You provide the patch data index
+ * to the cell-centered data, defined with a non-zero ghost
+ * cell width, where the ghost cell values can be found.
+ *
+ * This implementation corresponds to a specific discretization
+ * of the Robin formula described in RobinBcCoefStrategy.
+ * It assumes a linear variation of the data between the first
+ * interior and first ghost cells.  It sets up the coefficients
+ * such that this linear extrapolation gives the correct value
+ * at the ghost cell center.  This results in the coefficient
+ * a being 1.0/(1+0.5*h) and g being the a times the ghost cell
+ * value.  h is the grid spacing normal to the boundary.
+ */
+class GhostCellRobinBcCoefs:
+   public RobinBcCoefStrategy
+{
+
+public:
+   /*!
+    * @brief Constructor
+    *
+    * @param object_name Name of object for output purposes.
+    */
+   GhostCellRobinBcCoefs(
+      const tbox::Dimension& dim,
+      std::string object_name = "");
+
+   /*!
+    * @brief Destructor.
+    */
+   virtual ~GhostCellRobinBcCoefs(
+      void);
+
+   /*!
+    * @brief Function to fill arrays of Robin boundary
+    * condition coefficients at a patch boundary.
+    *
+    * This implementation of the virtual function
+    * RobinBcCoefStrategy::setBcCoefs()
+    * sets up the coefficients as described in
+    * the above notes.
+    *
+    * @param acoef_data boundary coefficient data.
+    *        This is defined to include index range for
+    *        the boundary faces on the boundary box @c bdry_box.
+    *        If this is a null pointer, then the calling function
+    *        is not interested in a, and you can disregard it.
+    * @param bcoef_data boundary coefficient data.
+    *        This is defined to include index range for
+    *        the boundary faces on the boundary box @c bdry_box.
+    * @param gcoef_data boundary coefficient data.
+    *        This is defined to include index range for
+    *        the boundary faces on the boundary box @c bdry_box.
+    * @param variable variable to set the coefficients for.
+    * @param patch patch requiring bc coefficients
+    * @param bdry_box boundary box showing where on the boundary
+    *        the coefficient data is needed.
+    * @param fill_time solution time corresponding to filling, for use
+    *        when coefficients are time-dependent.
+    */
+   void
+   setBcCoefs(
+      tbox::Pointer<pdat::ArrayData<double> >& acoef_data,
+      tbox::Pointer<pdat::ArrayData<double> >& bcoef_data,
+      tbox::Pointer<pdat::ArrayData<double> >& gcoef_data,
+      const tbox::Pointer<hier::Variable>& variable,
+      const hier::Patch& patch,
+      const hier::BoundaryBox& bdry_box,
+      double fill_time = 0.0) const;
+
+   hier::IntVector
+   numberOfExtensionsFillable() const;
+
+   /*!
+    * @brief Set the patch data index of the data providing
+    * ghost cell values.
+    *
+    * The index must correspond to cell-centered double
+    * data with the given ghost width.
+    *
+    * @param ghost_data_id patch data index of ghost data
+    * @param extensions_fillable the number of extensions past
+    *        edge of a patch that has valid ghost cell values.
+    */
+   void
+   setGhostDataId(
+      int ghost_data_id,
+      hier::IntVector extensions_fillable // Default v2.x.x = hier::IntVector::getZero(tbox::Dimension(DIM)) );
+      );
+
+private:
+   /*!
+    * @brief Return box describing the index space of surfaces
+    * defined by a boundary box.
+    *
+    * Define a box describing the indices of the surfaces corresponding
+    * to the input boundary box.  A surface is a face in 3D and an edge
+    * in 2D.  These surfaces lie on the boundary itself.
+    *
+    * The input boundary_box must be of type 1
+    * (see hier::BoundaryBox::getBoundaryType()).
+    *
+    * This is a utility function for working with the surface
+    * indices coresponding to a boundary box.
+    *
+    * @param boundary_box input boundary box
+    * @return a box to define the face indices corresponding to
+    *    boundary_box
+    */
+   hier::Box
+   makeSideBoundaryBox(
+      const hier::BoundaryBox& boundary_box) const;
+
+   /*!
+    * @brief Object name.
+    */
+   std::string d_object_name;
+
+   /*!
+    * @brief Object dimension.
+    */
+   tbox::Dimension d_dim;
+
+   /*
+    * @brief hier::Index of cell-centered double
+    * data to provide ghost cell values.
+    *
+    * Set to -1 until setGhostDataId() is called.
+    */
+   int d_ghost_data_id;
+
+   /*
+    * @brief Extensions fillable that can be used for data at d_ghost_data_id.
+    */
+   hier::IntVector d_extensions_fillable;
+
+   /*
+    * @brief tbox::Timer classes for performance measurement
+    */
+   tbox::Pointer<tbox::Timer> t_set_bc_coefs;
+
+};
+
+}
+}
+
+#endif  // included_solv_GhostCellRobinBcCoefs
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/KINSOLAbstractFunctions.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/KINSOLAbstractFunctions.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,29 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to user-specified functions for KINSOL package 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/solv/KINSOLAbstractFunctions.h"
+
+#ifdef HAVE_SUNDIALS
+
+namespace SAMRAI {
+namespace solv {
+
+KINSOLAbstractFunctions::KINSOLAbstractFunctions()
+{
+}
+
+KINSOLAbstractFunctions::~KINSOLAbstractFunctions()
+{
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/KINSOLAbstractFunctions.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/KINSOLAbstractFunctions.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,204 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to user-specified functions for KINSOL package 
+ *
+ ************************************************************************/
+
+#ifndef included_solv_KINSOLAbstractFunctions
+#define included_solv_KINSOLAbstractFunctions
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/solv/SundialsAbstractVector.h"
+
+/*
+ ************************************************************************
+ *  THIS CLASS WILL BE UNDEFINED IF THE LIBRARY IS BUILT WITHOUT KINSOL
+ ************************************************************************
+ */
+#ifdef HAVE_SUNDIALS
+
+namespace SAMRAI {
+namespace solv {
+
+/**
+ * Class KINSOLAbstractFunctions is an abstract base class that defines
+ * an interface for user-supplied functions to be used with KINSOL via
+ * the C++ wrapper class KINSOLSolver.  To use KINSOL with the
+ * C++ wrapper one must derive a subclass of this base class and pass it
+ * into the KINSOLSolver constructor.  The pure virtual member
+ * functions in this interface are used by KINSOL during the nonlinear
+ * system solution process.  The complete argument lists in the function
+ * signatures defined by KINSOL have been preserved for the user-supplied
+ * routines have been preserved for the most part.  In a few cases, some
+ * arguments do not appear in the function signatures below since they
+ * are superfluous via this interface.
+ *
+ * KINSOL only requires that the function evaluateNonlinearFunction()
+ * be supplied.  The other virtual functions are optional in KINSOL.
+ * Note that the use of the optional functions may be turned on and off
+ * via boolean arguments to the constructor of the KINSOLSolver
+ * class, or using the setKINSOLFunctions() member function of that class.
+ *
+ * @see solv::KINSOLSolver
+ * @see solv::SundialsAbstractVector
+ */
+
+class KINSOLAbstractFunctions
+{
+public:
+   /**
+    * Uninteresting constructor destructor for KINSOLAbstractFunctions.
+    */
+   KINSOLAbstractFunctions();
+   virtual ~KINSOLAbstractFunctions();
+
+   /**
+    * User-supplied nonlinear residual function evaluation.
+    *
+    * The function arguments are:
+    *
+    *
+    *
+    * - \b soln   (INPUT) {current iterate for the nonlinear solution.}
+    * - \b fval   (OUTPUT){current value of residual function.}
+    *
+    *
+    *
+    *
+    * IMPORTANT: This function must not modify the vector soln.
+    */
+   virtual void
+   evaluateNonlinearFunction(
+      SundialsAbstractVector* soln,
+      SundialsAbstractVector* fval) = 0;
+
+   /**
+    * User-supplied preconditioner setup function.  The setup function
+    * is called to provide matrix data for the subsequent call(s) to
+    * precondSolve().  That is, this preconditioner setup function
+    * is used to evaluate and preprocess any Jacobian-related data
+    * needed by the preconditioner solve function.   The integer return
+    * value is a flag indicating success if 0 is returned, and failure
+    * otherwise.  If a non-zero value is returned, KINSOL stops.  Together
+    * precondSetup() and precondSolve() form a right preconditoner for the
+    * KINSOL Krylov solver.  This function will not be called prior to
+    * every call of precondSolve(), but instead will be called only as
+    * often as needed to achieve convergence within the Newton iteration.
+    *
+    * The function arguments are:
+    *
+    *
+    *
+    * - \b soln          (INPUT) {current iterate for the nonlinear solution}
+    * - \b fval          (INPUT) {current values of the nonlinear residual}
+    * - \b soln_scale   (INPUT) {diagonal entries of the nonlinear solution
+    *                               scaling matrix}
+    * - \b fval_scale   (INPUT) {diagonal entries of the nonlinear residual
+    *                               scaling matrix}
+    * - \b vtemp1        (INOUT) {temporary vector managed by KINSOL}
+    * - \b vtemp2        (INOUT) {temporary vector managed by KINSOL}
+    * - \b num_feval    (OUTPUT){number of nonlinear function evaluations
+    *                               made to approximate the Jacobian, if any.
+    *                               For example, if the routine evaluates the
+    *                               function twice, num_feval is set to 2}
+    *
+    *
+    *
+    *
+    * The scaling vectors are provided for possible use in approximating
+    * Jacobian data; e.g., uing difference quotients.  The
+    *
+    * IMPORTANT: This function must not modify the vector arguments.
+    */
+   virtual int
+   precondSetup(
+      SundialsAbstractVector* soln,
+      SundialsAbstractVector* soln_scale,
+      SundialsAbstractVector* fval,
+      SundialsAbstractVector* fval_scale,
+      SundialsAbstractVector* vtemp1,
+      SundialsAbstractVector* vtemp2,
+      int& num_feval) = 0;
+
+   /**
+    * User-supplied preconditioner solve function.  This function must
+    * solve \f$P x = r\f$, where \f$P\f$ is the right preconditioner matrix formed
+    * by precondSetup().  The integer return value is a flag indicating
+    * success if 0 is returned, and failure otherwise.  If a non-zero
+    * value is returned, KINSOL stops.
+    *
+    * The function arguments are:
+    *
+    *
+    *
+    * - \b soln          (INPUT) {current iterate for the nonlinear solution}
+    * - \b fval          (INPUT) {current iterate for the nonlinear residual}
+    * - \b soln_scale   (INPUT) {diagonal entries of the nonlinear solution
+    *                               scaling matrix}
+    * - \b fval_scale   (INPUT) {diagonal entries of the nonlinear residual
+    *                               scaling matrix}
+    * - \b rhs           (OUTPUT){rhs-side (r) on input and must be set to
+    *                              preconditioner solution (i.e., x) on output}
+    * - \b vtemp1        (INOUT) {temporary vector managed by KINSOL}
+    * - \b num_feval    (OUTPUT){number of nonlinear function evaluations
+    *                               made to approximate the Jacobian, if any.
+    *                               For example, if the routine evaluates the
+    *                               function twice, num_feval is set to 2}
+    *
+    *
+    *
+    *
+    * IMPORTANT: This function must not modify soln, fval, or the scaling
+    *            vectors.
+    */
+   virtual int
+   precondSolve(
+      SundialsAbstractVector* soln,
+      SundialsAbstractVector* soln_scale,
+      SundialsAbstractVector* fval,
+      SundialsAbstractVector* fval_scale,
+      SundialsAbstractVector* rhs,
+      SundialsAbstractVector* vtemp,
+      int& num_feval) = 0;
+
+   /**
+    * Optional user-supplied A times x routine, where A is an approximation
+    * to the Jacobian matrix and v is some vector.  product = (A * vector)
+    * is computed.
+    *
+    * The function arguments are:
+    *
+    *
+    *
+    * - \b vector       (INPUT) {the vector multiplied by the Jacobian}
+    * - \b product      (OUTPUT){product of the Jacobian and vector; \f$A v\f$)}
+    * - \b new_soln    (INPUT) {flag indicating whether solution has changed
+    *                              since last call to this routine.
+    *                              For example, if this routine computes and
+    *                              saves the Jacobian, then the Jacobian does
+    *                              not require computation if flag is false.}
+    * - \b soln         (INPUT) {current iterate for the nonlinear solution}
+    *
+    *
+    *
+    *
+    * IMPORTANT: This function must not modify soln vector.
+    */
+   virtual int
+   jacobianTimesVector(
+      SundialsAbstractVector* vector,
+      SundialsAbstractVector* product,
+      const bool soln_changed,
+      SundialsAbstractVector* soln) = 0;
+
+};
+
+}
+}
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/KINSOLSolver.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/KINSOLSolver.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,880 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   C++ Wrapper class for KINSOL solver package 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/solv/KINSOLSolver.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifdef HAVE_SUNDIALS
+
+#include <kinsol/kinsol_impl.h>
+#include <kinsol/kinsol_spils.h>
+
+namespace SAMRAI {
+namespace solv {
+
+#define SABSVEC_CAST(v) \
+   (static_cast<SAMRAI::solv::SundialsAbstractVector *>(v \
+                                                        -> \
+                                                        content))
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Static member functions that provide linkage with KINSOL package.     *
+ * See header file for KINSOLAbstractFunctions for more information.*
+ *                                                                       *
+ *************************************************************************
+ */
+int KINSOLSolver::KINSOLFuncEval(
+   N_Vector soln,
+   N_Vector fval,
+   void* my_solver)
+{
+   int success = 0;
+   // SGS why no error condition?
+   ((KINSOLSolver *)my_solver)->getKINSOLFunctions()->
+   evaluateNonlinearFunction(SABSVEC_CAST(soln), SABSVEC_CAST(fval));
+
+   return success;
+}
+
+int KINSOLSolver::KINSOLPrecondSet(
+   N_Vector uu,
+   N_Vector uscale,
+   N_Vector fval,
+   N_Vector fscale,
+   void* my_solver,
+   N_Vector vtemp1,
+   N_Vector vtemp2)
+{
+   ((KINSOLSolver *)my_solver)->initializeKINSOL();
+
+   int success = 0;
+
+   int num_feval = 0;
+   success = ((KINSOLSolver *)my_solver)->getKINSOLFunctions()->
+      precondSetup(SABSVEC_CAST(uu),
+         SABSVEC_CAST(uscale),
+         SABSVEC_CAST(fval),
+         SABSVEC_CAST(fscale),
+         SABSVEC_CAST(vtemp1),
+         SABSVEC_CAST(vtemp2),
+         num_feval);
+   return success;
+}
+
+int KINSOLSolver::KINSOLPrecondSolve(
+   N_Vector uu,
+   N_Vector uscale,
+   N_Vector fval,
+   N_Vector fscale,
+   N_Vector vv,
+   void* my_solver,
+   N_Vector vtemp)
+
+{
+   int success = 0;
+
+   int num_feval = 0;
+   success = ((KINSOLSolver *)my_solver)->getKINSOLFunctions()->
+      precondSolve(SABSVEC_CAST(uu),
+         SABSVEC_CAST(uscale),
+         SABSVEC_CAST(fval),
+         SABSVEC_CAST(fscale),
+         SABSVEC_CAST(vv),
+         SABSVEC_CAST(vtemp),
+         num_feval);
+   return success;
+}
+
+int KINSOLSolver::KINSOLJacobianTimesVector(
+   N_Vector v,
+   N_Vector Jv,
+   N_Vector uu,
+   int* new_uu,
+   void* my_solver)
+{
+   int success = 0;
+
+   bool soln_changed = true;
+   if (*new_uu == 0) {
+      soln_changed = false;
+   }
+
+   success = ((KINSOLSolver *)my_solver)->
+      getKINSOLFunctions()->jacobianTimesVector(SABSVEC_CAST(v),
+         SABSVEC_CAST(Jv),
+         soln_changed,
+         SABSVEC_CAST(uu));
+
+   return success;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * KINSOLSolver constructor and destructor.                         *
+ *                                                                       *
+ *************************************************************************
+ */
+KINSOLSolver::KINSOLSolver(
+   const std::string& object_name,
+   KINSOLAbstractFunctions* my_functions,
+   const int uses_preconditioner,
+   const int uses_jac_times_vector)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!(my_functions == (KINSOLAbstractFunctions *)NULL));
+#endif
+
+   d_object_name = object_name;
+   d_KINSOL_functions = my_functions;
+   d_uses_preconditioner = uses_preconditioner;
+   d_uses_jac_times_vector = uses_jac_times_vector;
+
+   d_KINSOL_needs_initialization = true;
+
+   /*
+    * Default parameters to safe values or to KINSOL defaults.
+    */
+
+   d_kin_mem = NULL;
+   d_kinsol_log_file = NULL;
+   d_solution_vector = NULL;
+   d_constraints = NULL;
+   d_soln_scale = NULL;
+   d_fval_scale = NULL;
+
+   d_my_soln_scale_vector = false;
+   d_my_fval_scale_vector = false;
+
+   d_krylov_dimension = KINSPILS_MAXL;
+
+   d_max_restarts = 0;
+   d_max_solves_no_set = MSBSET_DEFAULT;
+
+   d_no_min_eps = 0;
+
+   d_max_beta_fails = MXNBCF_DEFAULT;
+
+   d_no_initial_setup = 0;
+   d_no_residual_monitoring = 0;
+
+   d_global_strategy = KIN_NONE;
+   d_residual_tol = -1;
+   d_step_tol = -1;
+
+   d_eta_choice = KIN_ETACONSTANT;
+   d_eta_constant = 0.1;
+
+   d_eta_gamma = 0.9;
+   d_eta_alpha = 2.0;
+
+   d_omega_min = 0.00001;
+   d_omega_max = 0.9;
+
+   d_omega = 0.0;
+
+   d_max_iter = MXITER_DEFAULT;
+   d_max_newton_step = -1.0;
+
+   d_maxsub = MSBSET_SUB_DEFAULT;
+
+   d_relative_function_error = -1;
+
+   d_print_level = 0;
+
+}
+
+void KINSOLSolver::freeInternalVectors(
+   void) {
+
+   if (d_my_soln_scale_vector && d_my_fval_scale_vector && d_soln_scale) {
+      d_soln_scale->freeVector();
+      d_soln_scale = NULL;
+      d_fval_scale = NULL;
+      d_my_soln_scale_vector = false;
+      d_my_fval_scale_vector = false;
+   }
+
+   if (d_my_soln_scale_vector && d_soln_scale) {
+      d_soln_scale->freeVector();
+      d_soln_scale = NULL;
+      d_my_soln_scale_vector = false;
+   }
+
+   if (d_my_fval_scale_vector && d_fval_scale) {
+      d_fval_scale->freeVector();
+      d_fval_scale = NULL;
+      d_my_fval_scale_vector = false;
+   }
+}
+
+KINSOLSolver::~KINSOLSolver()
+{
+
+   freeInternalVectors();
+
+   if (d_kinsol_log_file) {
+      fclose(d_kinsol_log_file);
+   }
+
+   if (d_kin_mem) {
+      KINFree(&d_kin_mem);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Functions to initialize nonlinear solver and reset KINSOL structure.  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void KINSOLSolver::initialize(
+   SundialsAbstractVector* solution,
+   SundialsAbstractVector* uscale,
+   SundialsAbstractVector* fscale)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(solution == (SundialsAbstractVector *)NULL));
+#endif
+
+   d_solution_vector = solution;
+
+   // Free previously allocated scaling vectors if
+   // KINSOLSolver allocated them.
+   freeInternalVectors();
+
+   // If user is providing scaling vectors use them
+   // otherwise allocate them.
+   if (uscale) {
+      if (d_my_soln_scale_vector && d_soln_scale) {
+         d_soln_scale->freeVector();
+      }
+      d_soln_scale = uscale;
+      d_my_soln_scale_vector = false;
+   }
+
+   if (fscale) {
+      if (d_my_fval_scale_vector && d_fval_scale) {
+         d_fval_scale->freeVector();
+      }
+      d_fval_scale = fscale;
+      d_my_fval_scale_vector = false;
+   }
+
+   // Initialize KINSOL.
+   d_KINSOL_needs_initialization = true;
+
+   initializeKINSOL();
+}
+
+void KINSOLSolver::initializeKINSOL()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(d_solution_vector == (SundialsAbstractVector *)NULL));
+#endif
+
+   if (d_KINSOL_needs_initialization) {
+
+      if (d_kinsol_log_file) {
+         fclose(d_kinsol_log_file);
+      }
+
+      d_kinsol_log_file = fopen(d_kinsol_log_file_name.c_str(), "w");
+
+      /*
+       * KINSOL function pointers.
+       */
+
+      KINSpilsPrecSetupFn precond_set = NULL;
+      KINSpilsPrecSolveFn precond_solve = NULL;
+      KINSpilsJacTimesVecFn jac_times_vec = NULL;
+
+      if (d_uses_preconditioner) {
+         precond_set = KINSOLSolver::KINSOLPrecondSet;
+         precond_solve = KINSOLSolver::KINSOLPrecondSolve;
+      } else {
+         precond_set = NULL;
+         precond_solve = NULL;
+      }
+
+      if (d_uses_jac_times_vector) {
+         jac_times_vec = KINSOLSolver::KINSOLJacobianTimesVector;
+      } else {
+         jac_times_vec = NULL;
+      }
+
+      if (d_kin_mem) KINFree(&d_kin_mem);
+
+      /*
+       * Initialize KINSOL structures and set options
+       */
+
+      d_kin_mem = KINCreate();
+
+      int ierr = KINMalloc(d_kin_mem,
+            KINSOLSolver::KINSOLFuncEval,
+            d_solution_vector->getNVector());
+      KINSOL_SAMRAI_ERROR(ierr);
+
+      ierr = KINSetFdata(d_kin_mem, this);
+      KINSOL_SAMRAI_ERROR(ierr);
+
+      ierr = KINSetInfoFile(d_kin_mem, d_kinsol_log_file);
+      KINSOL_SAMRAI_ERROR(ierr);
+
+      ierr = KINSetEtaForm(d_kin_mem, d_eta_choice);
+      KINSOL_SAMRAI_ERROR(ierr);
+
+      ierr = KINSetEtaConstValue(d_kin_mem, d_eta_constant);
+      KINSOL_SAMRAI_ERROR(ierr);
+
+      ierr = KINSetEtaParams(d_kin_mem, d_eta_gamma, d_eta_alpha);
+      KINSOL_SAMRAI_ERROR(ierr);
+
+      ierr = KINSetMaxSetupCalls(d_kin_mem, d_max_solves_no_set);
+      KINSOL_SAMRAI_ERROR(ierr);
+
+      /*
+       * Initialize KINSOL memory record.
+       */
+      ierr = KINSpgmr(d_kin_mem,
+            d_krylov_dimension);
+      KINSOL_SAMRAI_ERROR(ierr);
+
+      ierr = KINSpilsSetMaxRestarts(d_kin_mem, d_max_restarts);
+      KINSOL_SAMRAI_ERROR(ierr);
+
+      ierr = KINSpilsSetPreconditioner(d_kin_mem,
+            precond_set,
+            precond_solve,
+            (void *)this);
+      KINSOL_SAMRAI_ERROR(ierr);
+
+      ierr = KINSpilsSetJacTimesVecFn(d_kin_mem,
+            jac_times_vec,
+            (void *)this);
+      KINSOL_SAMRAI_ERROR(ierr);
+
+      if (!(d_residual_tol < 0)) {
+         ierr = KINSetFuncNormTol(d_kin_mem, d_residual_tol);
+         KINSOL_SAMRAI_ERROR(ierr);
+      }
+
+      if (!(d_step_tol < 0)) {
+         ierr = KINSetScaledStepTol(d_kin_mem, d_step_tol);
+         KINSOL_SAMRAI_ERROR(ierr);
+      }
+
+      ierr = KINSetConstraints(d_kin_mem,
+            (d_constraints != NULL) ? d_constraints->getNVector() : NULL);
+      KINSOL_SAMRAI_ERROR(ierr);
+
+      // Keep default unless user specifies one.
+      if (!(d_max_newton_step < 0)) {
+         ierr = KINSetMaxNewtonStep(d_kin_mem, d_max_newton_step);
+         KINSOL_SAMRAI_ERROR(ierr);
+      }
+
+      if (!(d_relative_function_error < 0)) {
+         ierr = KINSetRelErrFunc(d_kin_mem, d_relative_function_error);
+         KINSOL_SAMRAI_ERROR(ierr);
+      }
+
+      ierr = KINSetPrintLevel(d_kin_mem, d_print_level);
+      KINSOL_SAMRAI_ERROR(ierr);
+
+      ierr = KINSetConstraints(d_kin_mem,
+            d_constraints == NULL ? NULL : d_constraints->getNVector());
+      KINSOL_SAMRAI_ERROR(ierr);
+
+      ierr = KINSetNumMaxIters(d_kin_mem, d_max_iter);
+      KINSOL_SAMRAI_ERROR(ierr);
+
+      ierr = KINSetNoInitSetup(d_kin_mem, d_no_initial_setup);
+      KINSOL_SAMRAI_ERROR(ierr);
+
+      ierr = KINSetNoResMon(d_kin_mem, d_no_residual_monitoring);
+      KINSOL_SAMRAI_ERROR(ierr);
+
+      ierr = KINSetMaxSubSetupCalls(d_kin_mem, d_maxsub);
+      KINSOL_SAMRAI_ERROR(ierr);
+
+      ierr = KINSetResMonParams(d_kin_mem, d_omega_min, d_omega_max);
+      KINSOL_SAMRAI_ERROR(ierr);
+
+      ierr = KINSetResMonConstValue(d_kin_mem, d_omega);
+      KINSOL_SAMRAI_ERROR(ierr);
+
+      ierr = KINSetNoMinEps(d_kin_mem, d_no_min_eps);
+      KINSOL_SAMRAI_ERROR(ierr);
+
+      ierr = KINSetMaxBetaFails(d_kin_mem, d_max_beta_fails);
+      KINSOL_SAMRAI_ERROR(ierr);
+
+   } // if no need to initialize KINSOL, function does nothing
+
+   d_KINSOL_needs_initialization = false;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Solve nonlinear system; re-initialize KINSOL solver, if necessary.    *
+ *                                                                       *
+ *************************************************************************
+ */
+int KINSOLSolver::solve()
+{
+
+   int retval = KIN_SUCCESS;
+
+   initializeKINSOL();
+
+   /*
+    * If scaling vectors are not provided, we make defaults here.
+    */
+   if (!d_soln_scale) {
+      d_soln_scale = d_solution_vector->makeNewVector();
+      d_soln_scale->setToScalar(1.0);
+      d_my_soln_scale_vector = true;
+
+      if (!d_fval_scale) {
+         d_fval_scale = d_soln_scale;
+         d_my_fval_scale_vector = true;
+      }
+   }
+
+   if (!d_fval_scale) {
+      d_fval_scale = d_solution_vector->makeNewVector();
+      d_fval_scale->setToScalar(1.0);
+      d_my_fval_scale_vector = true;
+   }
+
+   /*
+    * See kinsol.h header file for definition of return types.
+    */
+
+   retval = KINSol(d_kin_mem,
+         d_solution_vector->getNVector(),
+         d_global_strategy,
+         d_soln_scale->getNVector(),
+         d_fval_scale->getNVector());
+
+   return retval;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Setting KINSOL log file name and print flag for KINSOL statistics.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void KINSOLSolver::setLogFileData(
+   const std::string& log_fname,
+   const int flag)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(flag >= 0 && flag <= 3);
+#endif
+   if (!(log_fname == d_kinsol_log_file_name)) {
+      if (!log_fname.empty()) {
+         d_kinsol_log_file_name = log_fname;
+      } else {
+         d_kinsol_log_file_name = "kinsol.log";
+      }
+      d_KINSOL_needs_initialization = true;
+   }
+
+   d_print_level = flag;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Accessory functions for setting user-defined function information.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void KINSOLSolver::setKINSOLFunctions(
+   KINSOLAbstractFunctions* my_functions,
+   const int uses_preconditioner,
+   const int uses_jac_times_vector)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(my_functions == (KINSOLAbstractFunctions *)NULL));
+#endif
+
+   d_KINSOL_functions = my_functions;
+   d_uses_preconditioner = uses_preconditioner;
+   d_uses_jac_times_vector = uses_jac_times_vector;
+
+   d_KINSOL_needs_initialization = true;
+}
+
+void KINSOLSolver::setPreconditioner(
+   const int uses_preconditioner)
+{
+   d_uses_preconditioner = uses_preconditioner;
+   d_KINSOL_needs_initialization = true;
+}
+
+void KINSOLSolver::setJacobianTimesVector(
+   const int uses_jac_times_vector)
+{
+   d_uses_jac_times_vector = uses_jac_times_vector;
+   d_KINSOL_needs_initialization = true;
+}
+
+KINSOLAbstractFunctions *KINSOLSolver::getKINSOLFunctions() const
+{
+   return d_KINSOL_functions;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Accessory function for setting constraints for nonlinear system.      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void KINSOLSolver::setConstraintVector(
+   SundialsAbstractVector* constraints)
+{
+   d_constraints = constraints;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Accessory function for setting nonlinear solver parameters.           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void KINSOLSolver::setResidualStoppingTolerance(
+   const double tol)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(tol >= 0.0);
+#endif
+   d_residual_tol = tol;
+   d_KINSOL_needs_initialization = true;
+}
+
+void KINSOLSolver::setMaxIterations(
+   const int maxits)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(maxits >= 0);
+#endif
+   d_max_iter = maxits;
+   d_KINSOL_needs_initialization = true;
+}
+
+void KINSOLSolver::setMaxKrylovDimension(
+   const int kdim)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(kdim >= 0);
+#endif
+   d_krylov_dimension = kdim;
+   d_KINSOL_needs_initialization = true;
+}
+
+void KINSOLSolver::setGlobalStrategy(
+   const int global)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(global == KIN_NONE || global == KIN_LINESEARCH);
+#endif
+   d_global_strategy = global;
+   d_KINSOL_needs_initialization = true;
+}
+
+void KINSOLSolver::setMaxNewtonStep(
+   const double maxstep)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(maxstep > 0.0);
+#endif
+   d_max_newton_step = maxstep;
+   d_KINSOL_needs_initialization = true;
+}
+
+void KINSOLSolver::setNonlinearStepTolerance(
+   const double tol)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(tol >= 0.0);
+#endif
+   d_step_tol = tol;
+   d_KINSOL_needs_initialization = true;
+}
+
+void KINSOLSolver::setRelativeFunctionError(
+   const double reserr)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(reserr > 0.0);
+#endif
+   d_relative_function_error = reserr;
+   d_KINSOL_needs_initialization = true;
+}
+
+void KINSOLSolver::setLinearSolverConvergenceTest(
+   const int conv)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(
+      conv == KIN_ETACONSTANT || conv == KIN_ETACHOICE1 || conv ==
+      KIN_ETACHOICE2);
+#endif
+   d_eta_choice = conv;
+   d_KINSOL_needs_initialization = true;
+}
+
+void KINSOLSolver::setEisenstatWalkerParameters(
+   const double alpha,
+   const double gamma)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(alpha >= 0.0);
+   TBOX_ASSERT(gamma >= 0.0);
+#endif
+   // sgs
+   d_eta_alpha = alpha;
+   d_eta_gamma = gamma;
+   d_KINSOL_needs_initialization = true;
+}
+
+void KINSOLSolver::setLinearSolverConstantTolerance(
+   const double tol)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(tol >= 0.0);
+#endif
+   //
+   d_eta_constant = tol;
+   d_KINSOL_needs_initialization = true;
+}
+
+void KINSOLSolver::setMaxSubSetupCalls(
+   const int maxsub) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(maxsub >= 0);
+#endif
+   d_maxsub = maxsub;
+   d_KINSOL_needs_initialization = true;
+}
+
+void KINSOLSolver::setNoInitialSetup(
+   const bool flag)
+{
+   if (flag) {
+      d_no_initial_setup = 1;
+   } else {
+      d_no_initial_setup = 0;
+   }
+   d_KINSOL_needs_initialization = true;
+}
+
+void KINSOLSolver::setNoResidualMonitoring(
+   const bool flag)
+{
+   if (flag) {
+      d_no_residual_monitoring = 1;
+   } else {
+      d_no_residual_monitoring = 0;
+   }
+   d_KINSOL_needs_initialization = true;
+}
+
+void KINSOLSolver::setResidualMonitoringParams(
+   const double omega_min,
+   const double omega_max)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(omega_min >= 0);
+   TBOX_ASSERT(omega_max >= 0);
+   TBOX_ASSERT(omega_max >= omega_min);
+#endif
+   d_omega_min = omega_min;
+   d_omega_max = omega_max;
+   d_KINSOL_needs_initialization = true;
+}
+
+void KINSOLSolver::setResidualMonitoringConstant(
+   const double omega)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(omega >= 0);
+#endif
+   d_omega = omega;
+   d_KINSOL_needs_initialization = true;
+}
+
+void KINSOLSolver::setNoMinEps(
+   const bool flag)
+{
+   if (flag) {
+      d_no_min_eps = 1;
+   } else {
+      d_no_min_eps = 0;
+   }
+   d_KINSOL_needs_initialization = true;
+}
+
+void KINSOLSolver::setMaxBetaFails(
+   const int max_beta_fails)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(max_beta_fails >= 0);
+#endif
+   d_max_beta_fails = max_beta_fails;
+   d_KINSOL_needs_initialization = true;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Accessory function for setting preconditioner parameters.             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void KINSOLSolver::setMaxStepsWithNoPrecondSetup(
+   const int maxsolv)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(maxsolv > 0);
+#endif
+   d_max_solves_no_set = maxsolv;
+   d_KINSOL_needs_initialization = true;
+}
+
+void KINSOLSolver::setMaxLinearSolveRestarts(
+   const int restarts)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(restarts >= 0);
+#endif
+   d_max_restarts = restarts;
+   d_KINSOL_needs_initialization = true;
+}
+
+int KINSOLSolver::getTotalNumberOfNonlinearIterations() const
+{
+   long int num;
+   int ierr = KINGetNumNonlinSolvIters(d_kin_mem, &num);
+   KINSOL_SAMRAI_ERROR(ierr);
+   return static_cast<int>(num);
+}
+
+int KINSOLSolver::getTotalNumberOfFunctionCalls() const
+{
+   long int num;
+   int ierr = KINGetNumFuncEvals(d_kin_mem, &num);
+   KINSOL_SAMRAI_ERROR(ierr);
+   return static_cast<int>(num);
+}
+
+int KINSOLSolver::getTotalNumberOfBetaConditionFailures() const
+{
+   long int num;
+   int ierr = KINGetNumBetaCondFails(d_kin_mem, &num);
+   KINSOL_SAMRAI_ERROR(ierr);
+   return static_cast<int>(num);
+}
+
+int KINSOLSolver::getTotalNumberOfBacktracks() const
+{
+   long int num;
+   int ierr = KINGetNumBacktrackOps(d_kin_mem, &num);
+   KINSOL_SAMRAI_ERROR(ierr);
+   return static_cast<int>(num);
+}
+
+double KINSOLSolver::getScaledResidualNorm() const
+{
+   realtype norm;
+   int ierr = KINGetFuncNorm(d_kin_mem, &norm);
+   KINSOL_SAMRAI_ERROR(ierr);
+   return norm;
+}
+
+double KINSOLSolver::getNewtonStepLength() const
+{
+   realtype step_length;
+   int ierr = KINGetStepLength(d_kin_mem, &step_length);
+   KINSOL_SAMRAI_ERROR(ierr);
+   return step_length;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print KINSOLSolver object data to given output stream.        *
+ *                                                                       *
+ *************************************************************************
+ */
+void KINSOLSolver::printClassData(
+   std::ostream& os) const
+{
+   os << "\nKINSOLSolver object data members..." << std::endl;
+   os << "this = " << (KINSOLSolver *)this << std::endl;
+   os << "d_solution_vector = "
+      << (SundialsAbstractVector *)d_solution_vector << std::endl;
+   os << "d_soln_scale = "
+      << (SundialsAbstractVector *)d_soln_scale << std::endl;
+   os << "d_fval_scale = "
+      << (SundialsAbstractVector *)d_fval_scale << std::endl;
+   os << "d_my_soln_scale_vector = " << d_my_soln_scale_vector << std::endl;
+   os << "d_my_fval_scale_vector = " << d_my_fval_scale_vector << std::endl;
+   os << "d_constraints = " << (SundialsAbstractVector *)d_constraints
+      << std::endl;
+
+   os << "d_KINSOL_functions = "
+      << (KINSOLAbstractFunctions *)d_KINSOL_functions << std::endl;
+
+   os << "d_uses_preconditioner = " << d_uses_preconditioner << std::endl;
+   os << "d_uses_jac_times_vector = " << d_uses_jac_times_vector << std::endl;
+
+   os << "d_kin_mem = " << d_kin_mem << std::endl;
+   os << "d_kinsol_log_file = " << (FILE *)d_kinsol_log_file << std::endl;
+   os << "d_kinsol_log_file_name = " << d_kinsol_log_file_name << std::endl;
+
+   os << "d_krylov_dimension = " << d_krylov_dimension << std::endl;
+   os << "d_max_restarts = " << d_max_restarts << std::endl;
+   os << "d_max_solves_no_set = " << d_max_solves_no_set << std::endl;
+   os << "d_global_strategy = " << d_global_strategy << std::endl;
+   os << "d_residual_tol = " << d_residual_tol << std::endl;
+   os << "d_step_tol = " << d_step_tol << std::endl;
+
+   // SGS add missing output
+
+   os << "...end of KINSOLSolver object data members\n" << std::endl;
+
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/KINSOLSolver.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/KINSOLSolver.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,633 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Wrapper class for KINSOL solver function calls and data 
+ *
+ ************************************************************************/
+
+#ifndef included_solv_KINSOLSolver
+#define included_solv_KINSOLSolver
+
+#include "SAMRAI/SAMRAI_config.h"
+
+/*
+ ************************************************************************
+ *  THIS CLASS WILL BE UNDEFINED IF THE LIBRARY IS BUILT WITHOUT KINSOL
+ ************************************************************************
+ */
+#ifdef HAVE_SUNDIALS
+
+#include "SAMRAI/solv/SundialsAbstractVector.h"
+#include "SAMRAI/solv/KINSOLAbstractFunctions.h"
+#include "SAMRAI/tbox/IOStream.h"
+
+extern "C" {
+#include "kinsol/kinsol.h"
+#include "kinsol/kinsol_spgmr.h"
+}
+
+#include <string>
+
+#ifndef LACKS_SSTREAM
+#define KINSOL_SAMRAI_ERROR(ierr) \
+   do {                                          \
+      if (ierr != KIN_SUCCESS) {                                                                \
+         std::ostringstream tboxos;                                                     \
+         SAMRAI::tbox::Utilities::abort( \
+            tboxos.str().c_str(), __FILE__, __LINE__);      \
+      }                                                                         \
+   } while (0)
+#else
+#define KINSOL_SAMRAI_ERROR(ierr) \
+   do {                                          \
+      if (ierr != KIN_SUCCESS) {                                                                \
+         std::ostrstream tboxos;                                                        \
+         SAMRAI::tbox::Utilities::abort(tboxos.str(), __FILE__, __LINE__);              \
+      }                                                                         \
+   } while (0)
+#endif
+
+namespace SAMRAI {
+namespace solv {
+
+/**
+ * Class KINSOLSolver serves as a C++ wrapper for the KINSOL nonlinear
+ * algebraic equation solver package and its data structures.  It is intended
+ * to be sufficiently generic to be used independently of the SAMRAI framework.
+ * This class declares four private static member functions to link
+ * user-defined routines for nonlinear residual calculation, preconditioner
+ * setup and solve, and Jacobian-vector product.  The implementation of these
+ * functions is defined by the user in a subclass of the abstract base class
+ * KINSOLAbstractFunctions.  The vector objects used within the solver
+ * are given in a subclass of the abstract class SundialsAbstractVector.
+ * The SundialsAbstractVector class defines the vector kernel operations
+ * required by the KINSOL package so that they may be easily supplied
+ * by a user who opts not to use the vector kernel supplied by the KINSOL
+ * package.
+ *
+ * Note that this class provides no input or restart capabilities and
+ * relies on KINSOL for output reporting.  When using KINSOL in an
+ * application using SAMRAI, it is straightforward to include this
+ * functionality in the entity using this solver class.
+ *
+ * KINSOL was developed in the Center for Applied Scientific Computing (CASC)
+ * at Lawrence Livermore National Laboratory (LLNL).  For more information
+ * about KINSOL and a complete description of the operations and data
+ * structures used by this class, see A.G. Taylor and A.C. Hindmarsh,
+ * "User documentation for KINSOL, a nonlinear solver for sequential and
+ * parallel computers", UCRL-ID-131185, Lawrence Livermore National
+ * Laboratory, 1998.
+ *
+ * @see solv::KINSOLAbstractFunctions
+ * @see solv::SundialsAbstractVector
+ */
+
+class KINSOLSolver
+{
+public:
+   /**
+    * Constructor for KINSOLSolver sets default KINSOL parameters
+    * and initializes the solver package with user-supplied functions.  Solver
+    * parameters may be changed later using member functions described
+    * below.  The integer flags indicate whether user-supplied preconditioner
+    * and Jacobian-vector product function should be used.  Zero indicates
+    * no user function; otherwise, user function will be used by the nonlinear
+    * solver.
+    *
+    * Important note:  The solution vector is not passed into the constructor.
+    * Before the solver can be used, the initialize() function must be called.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if pointer to functions is null or string is empty.
+    */
+   KINSOLSolver(
+      const std::string& object_name,
+      KINSOLAbstractFunctions* my_functions,
+      const int uses_preconditioner,
+      const int uses_jac_times_vector);
+
+   /**
+    * Virtual destructor for KINSOLSolver.
+    */
+   virtual ~KINSOLSolver();
+
+   /**
+    * Initialize solver with solution vector.  The solution vector is
+    * required to initialize the memory record used internally within
+    * KINSOL.  This routine must be called before the solver can be used.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if vector pointer is null.
+    *
+    * Optionally set the scaling vectors used by KINSOL to scale
+    * either nonlinear solution vector or nonlinear residual vector.
+    * The elements of the scaling vectors must be positive.  In either
+    * case, the scaling vector should be defined so that the vector
+    * formed by taking the element-wise product of the
+    * solution/residual vector and scaling vector has all elements
+    * roughly the same magnitude when the solution vector IS/IS NOT
+    * NEAR a root of the nonlinear function.
+    *
+    * See KINSOL documentation for more information.
+    */
+   void
+   initialize(
+      SundialsAbstractVector* solution,
+      SundialsAbstractVector* uscale = NULL,
+      SundialsAbstractVector* fscale = NULL);
+
+   /**
+    * Solve nonlinear problem and return integer termination code defined
+    * by KINSOL.  The default return value is KINSOL_SUCCESS (= 1)
+    * indicating success.  Return values which indicate non-recoverable
+    * nonlinear solver behavior are KINSOL_NO_MEM (= -1),
+    * KINSOL_INPUT_ERROR (= -2), and KINSOL_LSOLV_NO_MEM (= -3).
+    * Return values PRECONDSET_FAILURE (= 9), and PRECONDSOLVE_FAILURE (= 10)
+    * generally indicate non-recoverable behavior in the preconditioner.
+    * See kinsol.h header file for more information about return values.
+    *
+    * If KINSOL requires re-initialization, it is automatically done before
+    * the solve.  This may be required if any of the KINSOL data parameters
+    * have changed since the last call to the solver.
+    */
+   int
+   solve();
+
+   /**
+    * Accessory function for setting KINSOL output log file name and output
+    * printing options.  Output file name and options may be changed
+    * throughout run as desired.
+    *
+    * KINSOL printing options are:
+    *
+    *
+    *
+    * - \b 0 {no statistics printed}
+    * - \b 1 {output iteration count, residual norm, number function calls}
+    * - \b 2 {same as 1, but with statistics on globalization process}
+    * - \b 3 {same as 2, but with more Krylov iteration statistics}
+    *
+    *
+    *
+    * The default is no output (i.e., 0).  If the file name string is empty
+    * the default file name "kinsol.log" is used.
+    *
+    * See KINSOL documentation for more information.
+    */
+   void
+   setLogFileData(
+      const std::string& log_fname,
+      const int flag);
+
+   /**
+    * Accessory functions for passing user-defined function information
+    * to KINSOL.
+    *
+    * my_functions is a pointer to the abstract function subclass object
+    * that defines the residual calculation and preconditioner functions.
+    *
+    * uses_preconditioner turns user preconditioner on or off.
+    *
+    * uses_jac_times_vector turns user Jacobian-vector product on or off.
+    *
+    * Flags use "TRUE"/"FALSE" values defined in KINSOL.  See KINSOL
+    * documentation for more information.
+    */
+   void
+   setKINSOLFunctions(
+      KINSOLAbstractFunctions* my_functions,
+      const int uses_preconditioner,
+      const int uses_jac_times_vector);
+
+   ///
+   void
+   setPreconditioner(
+      const int uses_preconditioner);
+
+   ///
+   void
+   setJacobianTimesVector(
+      const int uses_jac_times_vector);
+
+   /**
+    * Return pointer to object that provides user-defined functions for KINSOL.
+    */
+   KINSOLAbstractFunctions *
+   getKINSOLFunctions() const;
+
+   /**
+    * Set constraints on nonlinear solution.  By default the constraint
+    * vector is null.
+    *
+    * The constraints are applied in KINSOL as follows:
+    *
+    *
+    *
+    * - \b {if constraints[i] > 0.0, then the constraint is solution[i]>0.0}
+    * - \b {if constraints[i] < 0.0, then the constraint is solution[i]<0.0}
+    * - \b {if constraints[i] = 0.0, then no constraint on solution[i]}
+    *
+    *
+    *
+    *
+    * See KINSOL documentation for more information.
+    */
+   void
+   setConstraintVector(
+      SundialsAbstractVector* constraints);
+
+   /**
+    * Accessory functions for setting nonlinear solver parameters.
+    * Parameters and default values are:
+    *
+    * Residual stopping tolerance is tolerarnce on max_norm(fscale * residual),
+    * where product of vectors is another vector each element of which is
+    * the product of the corresponding entries in the original vectors.
+    * The default is \f$machine_epsilon^(1/3)\f$.
+    *
+    * Default maximum nonlinear iterations is 200.
+    *
+    * Default maximum Krylov dimension is 1.
+    *
+    * Options for global Newton method are: INEXACT_NEWTON = 0, LINESEARCH = 1.
+    * The default is INEXACT_NEWTON.
+    *
+    * Default maximum Newton step is 1000*max(norm(uscale*u_0), norm(uscale)),
+    * where u_0 is the initial guess at the solution.
+    *
+    * Default scaled step tolerarnce between successive nonlinear iterates is
+    * \f$machine_epsilon^(2/3)\f$.
+    *
+    * Default relative error for nonlinear function is set to machine_epsilon.
+    *
+    * Scalar update constraint value restricts update of solution to
+    * del(u)/u < constraint_value.  Here, vector ratio is another vector
+    * each element of which is the ratio of the corresponding entries in
+    * the original vectors.  The default is no constraint.
+    *
+    * See KINSOL documentation for more information.
+    */
+   void
+   setResidualStoppingTolerance(
+      const double tol);
+
+   ///
+   void
+   setMaxIterations(
+      const int maxits);
+
+   ///
+   void
+   setMaxKrylovDimension(
+      const int kdim);
+
+   ///
+   void
+   setGlobalStrategy(
+      const int global);
+
+   ///
+   void
+   setMaxNewtonStep(
+      const double maxstep);
+
+   ///
+   void
+   setNonlinearStepTolerance(
+      const double tol);
+
+   ///
+   void
+   setRelativeFunctionError(
+      const double reserr);
+
+   /**
+    * Accessory functions for setting convergence tests for inner linear
+    * solvers within an inexact Newton method.  In general, the linear
+    * solver attempts to produce a step p, satisfying:
+    * norm(F(u) + J(u)*p) <= (eta + u_round)*norm(F(u)), where the norm
+    * is a scaled L2-norm.
+    *
+    * The convergence test indicates the value for eta; options are:
+    *
+    *
+    *
+    * - \b 0 == ETACHOICE1{Choice 1 of Eisenstat and Walker}
+    * - \b 1 == ETACHOICE2{Choice 2 of Eisenstat and Walker}
+    * - \b 2 == ETACONSTANT{use constant value for eta}.
+    *
+    *
+    *
+    * The default option is ETACONSTANT.
+    *
+    * The default constant value for eta is 0.1.
+    *
+    * For choice ETACHOICE2, alpha = 2.0 and gamma = 0.9 are defaults.
+    *
+    * See KINSOL documentation for more information.
+    */
+   void
+   setLinearSolverConvergenceTest(
+      const int conv);
+
+   ///
+   void
+   setLinearSolverConstantTolerance(
+      const double tol);
+
+   ///
+   void
+   setEisenstatWalkerParameters(
+      const double alpha,
+      const double gamma);
+
+   ///
+   void
+   setMaxStepsWithNoPrecondSetup(
+      const int maxsolv);
+
+   ///
+   void
+   setMaxLinearSolveRestarts(
+      const int restarts);
+
+   /**
+    * The number of nonlinear iterations between checks by the
+    * nonlinear residual monitoring algorithm (specifies lenght of
+    * subinterval) NOTE: should be a multiple of
+    * MaxStepsWithNoPrecondSetup
+    */
+   void
+   setMaxSubSetupCalls(
+      const int maxsub);
+
+   /**
+    * Set values of omega_min and omega_max scalars used by nonlinear
+    * residual monitoring algorithm.
+    *
+    *  Defaults is [0.00001 and 0.9]
+    */
+   void
+   setResidualMonitoringParams(
+      const double omega_min,
+      const double omega_max);
+
+   /**
+    * Set constant value used by residual monitoring algorithm. If
+    * omega=0, then it is estimated using omega_min and
+    * omega_max.
+    *
+    * Default is 0.0.
+    */
+   void
+   setResidualMonitoringConstant(
+      const double omega);
+
+   /**
+    * Set flag controlling whether or not the value * of eps is
+    * bounded below by 0.01*fnormtol.
+    *
+    *       FALSE constrain value of eps by setting to the following:
+    *                eps = MAX{0.01*fnormtol, eps}
+    *
+    *       TRUE do notconstrain value of eps
+    *
+    * Default is FALSE
+    */
+   void
+   setNoMinEps(
+      const bool flag);
+
+   /**
+    * Set maximum number of beta condition failures in the line search algorithm.
+    *
+    * Default is [MXNBCF_DEFAULT] (defined in kinsol_impl.h)
+    */
+   void
+   setMaxBetaFails(
+      const int max_beta_fails);
+
+   /**
+    * Flag controlling whether or not the KINSol routine makes an
+    * initial call to the linearl solver setup routine.
+    * Default is false.
+    */
+   void
+   setNoInitialSetup(
+      const bool flag);
+
+   /**
+    * Flag controlling whether or not the nonlinear residual
+    * monitoring schemes is used to control Jacobian updating Default
+    * is FALSE.
+    */
+   void
+   setNoResidualMonitoring(
+      const bool flag);
+
+   /**
+    * Accessory functions to retrieve information fom KINSOL.
+    *
+    * See KINSOL documentation for more information.
+    */
+   int
+   getTotalNumberOfNonlinearIterations() const;
+
+   ///
+   int
+   getTotalNumberOfFunctionCalls() const;
+
+   ///
+   int
+   getTotalNumberOfBetaConditionFailures() const;
+
+   ///
+   int
+   getTotalNumberOfBacktracks() const;
+
+   ///
+   double
+   getScaledResidualNorm() const;
+
+   ///
+   double
+   getNewtonStepLength() const;
+
+   /**
+    * Print out all data members for this object.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os) const;
+
+   /*
+    * Open KINSOL log file, allocate main memory for KINSOL and initialize
+    * KINSOL memory record.  KINSOL is initialized based on current state
+    * of solver parameter data members.  If any solver parameters have
+    * changed since last initialization, this function will be automatically
+    * invoked at next call to solver.
+    */
+   void
+   initializeKINSOL();
+
+private:
+   /*
+    * Free internally allocated vectors.
+    */
+   void
+   freeInternalVectors(
+      void);
+
+   /*
+    * Static member functions for linkage with KINSOL routines.
+    * See header file for KINSOLAbstractFunctions for more information.
+    */
+   static int
+   KINSOLFuncEval(
+      N_Vector soln,
+      N_Vector fval,
+      void* my_solver);
+
+   static int
+   KINSOLPrecondSet(
+      N_Vector uu,
+      N_Vector uscale,
+      N_Vector fval,
+      N_Vector fscale,
+      void* my_solver,
+      N_Vector vtemp1,
+      N_Vector vtemp2);
+
+   static int
+   KINSOLPrecondSolve(
+      N_Vector uu,
+      N_Vector uscale,
+      N_Vector fval,
+      N_Vector fscale,
+      N_Vector vv,
+      void* my_solver,
+      N_Vector vtemp);
+
+   static int
+   KINSOLJacobianTimesVector(
+      N_Vector v,
+      N_Vector Jv,
+      N_Vector uu,
+      int* new_uu,
+      void* my_solver);
+
+   std::string d_object_name;
+
+   /*
+    * The following data members are input or set to default values in
+    * the KINSOLSolver constructor.  Many of these can be altered at
+    * any time through class member functions.  When this occurs,
+    * KINSOL may need to be re-initialized (e.g., if Krylov dimension
+    * changes, KINSOL must change its memeory record).  Then the
+    * initializeKINSOL() member function will be invoked when
+    * nonlinear solve function is called next.
+    */
+
+   /*
+    * Nonlinear solution vector.
+    */
+   SundialsAbstractVector* d_solution_vector;
+
+   /*
+    * Pointer to object which provides user-supplied functions to KINSOL.
+    */
+   KINSOLAbstractFunctions* d_KINSOL_functions;
+
+   /*
+    * Boolean flags used during KINSOL initialization to provide correct
+    * static function linkage with KINSOL package.
+    */
+   bool d_uses_preconditioner;
+   bool d_uses_jac_times_vector;
+
+   /*
+    * KINSOL input and initialization parameters.
+    */
+   void* d_kin_mem;                             // KINSOL memory structure
+   FILE* d_kinsol_log_file;                     // KINSOL message log file
+   std::string d_kinsol_log_file_name;          // KINSOL log file name
+
+   /*
+    * Nonlinear solution and residual scaling vectors, and integer flags
+    * to determine ownership of scaling vectors.
+    */
+   SundialsAbstractVector* d_soln_scale;
+   bool d_my_soln_scale_vector;
+   SundialsAbstractVector* d_fval_scale;
+   bool d_my_fval_scale_vector;
+
+   /*
+    * Constraints on nonlinear solution vector.
+    */
+   SundialsAbstractVector* d_constraints;
+
+   /*
+    * Integer flag indicating whether KINSOL needs initialization
+    * when solver is called.
+    */
+   int d_KINSOL_needs_initialization;
+
+   /*
+    * KINSOL nonlinear and linear solver parameters
+    */
+   int d_krylov_dimension;       // maximum krylov dimension
+   int d_max_restarts;           // max. num. of linear solver restarts allowed
+   int d_max_solves_no_set;      // max. num. of steps calling preconditioner
+                                 // without resetting preconditioner
+
+   int d_max_iter;               // maximum number of nonlinear iterations
+   double d_max_newton_step;     // maximum scaled length of Newton step
+
+   int d_global_strategy;        // globalization method for Newton steps.
+   double d_residual_tol;        // stop tol. on scaled nonlinear residual
+   double d_step_tol;            // stop tol. on consecutive step difference
+
+   int d_maxsub;                 // number of nonlinear iterations
+                                 // between checks by the nonlinear
+                                 // residual monitoring alg
+
+   int d_no_initial_setup;       // intitial setup
+   int d_no_residual_monitoring; // residual monitoring to control Jacobian update
+
+   double d_omega_min;           // residual monitoring alg params
+   double d_omega_max;
+   double d_omega;
+
+   int d_no_min_eps;             //  eps is bounded
+
+   int d_max_beta_fails;         // maximum number of beta condition failures
+
+   // flag indicating which method to use to compute the value of the
+   // eta coefficient used in the calculation of the linear solver
+   // convergence tolerance:
+   int d_eta_choice;
+
+   // KINSetEtaConstValue constant value of eta - use with
+   // KIN_ETACONSTANT option
+   double d_eta_constant;
+
+   // values of eta_gamma (egamma) and eta_alpha (ealpha) coefficients
+   // use with KIN_ETACHOICE2
+   double d_eta_gamma;
+   double d_eta_alpha;
+
+   // real scalar equal to realative error in computing F(u)
+   double d_relative_function_error;
+
+   // level of verbosity of output
+   int d_print_level;
+
+};
+
+}
+}
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/KINSOL_SAMRAIContext.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/KINSOL_SAMRAIContext.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,415 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   KINSOL solver for use within a SAMRAI-based application. 
+ *
+ ************************************************************************/
+
+#ifndef included_solv_KINSOL_SAMRAIContext_C
+#define included_solv_KINSOL_SAMRAIContext_C
+
+#include "SAMRAI/solv/KINSOL_SAMRAIContext.h"
+
+#ifdef HAVE_SUNDIALS
+
+#include "SAMRAI/solv/Sundials_SAMRAIVector.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#define SOLV_KINSOL_SAMRAI_CONTEXT_VERSION (1)
+
+namespace SAMRAI {
+namespace solv {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor and destructor for KINSOL_SAMRAIContext.  The       *
+ * constructor sets default values for data members, then overrides      *
+ * them with values read from input or restart.  The C++ wrapper for     *
+ * KINSOL is also created in the constructor.  The destructor destroys   *
+ * the wrappers for KINSOL and the solution vector.                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+KINSOL_SAMRAIContext::KINSOL_SAMRAIContext(
+   const std::string& object_name,
+   tbox::Pointer<tbox::Database> input_db,
+   KINSOLAbstractFunctions* my_functions)
+{
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!input_db.isNull());
+   TBOX_ASSERT(!(my_functions == (KINSOLAbstractFunctions *)NULL));
+
+   d_object_name = object_name;
+   tbox::RestartManager::getManager()->registerRestartItem(d_object_name, this);
+
+   /*
+    * Set default state.
+    */
+
+   d_KINSOL_solver = new KINSOLSolver(object_name,
+         my_functions,
+         0, 0);
+
+   d_solution_vector = ((SundialsAbstractVector *)NULL);
+
+   d_residual_stop_tolerance = 0.0;
+   d_max_nonlinear_iterations = 0;
+   d_max_krylov_dimension = 0;
+   d_global_newton_strategy = 0;
+   d_max_newton_step = 0.0;
+   d_nonlinear_step_tolerance = 0.0;
+   d_relative_function_error = 0.0;
+   d_solution_update_constraint = 0.0;
+   d_linear_convergence_test = 0;
+   d_eisenstat_walker_params[0] = 0.0;
+   d_eisenstat_walker_params[1] = 0.0;
+   d_linear_solver_constant_tolerance = 0.0;
+   d_precond_setup_flag = 0;
+   d_max_solves_no_precond_setup = 0;
+   d_max_linear_solve_restarts = 0;
+   d_KINSOL_print_flag = 0;
+   d_uses_preconditioner = false;
+   d_uses_jac_times_vector = false;
+
+   /*
+    * Initialize object with data read from the input and restart databases.
+    */
+
+   bool is_from_restart = tbox::RestartManager::getManager()->isFromRestart();
+   if (is_from_restart) {
+      getFromRestart();
+   }
+   getFromInput(input_db);
+
+   d_KINSOL_solver->setPreconditioner(((d_uses_preconditioner == false)
+                                       ? 0 : 1));
+   d_KINSOL_solver->setJacobianTimesVector(((d_uses_jac_times_vector == false)
+                                            ? 0 : 1));
+}
+
+KINSOL_SAMRAIContext::~KINSOL_SAMRAIContext()
+{
+
+   tbox::RestartManager::getManager()->unregisterRestartItem(d_object_name);
+
+   if (d_solution_vector) {
+      Sundials_SAMRAIVector::destroySundialsVector(d_solution_vector);
+   }
+   if (d_KINSOL_solver) {
+      delete d_KINSOL_solver;
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to initialize KINSOL solver and solve nonlinear system.      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void KINSOL_SAMRAIContext::initialize(
+   tbox::Pointer<SAMRAIVectorReal<double> > solution)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!solution.isNull());
+#endif
+
+   d_solution_vector = Sundials_SAMRAIVector::createSundialsVector(solution);
+   d_KINSOL_solver->initialize(d_solution_vector);
+}
+
+int KINSOL_SAMRAIContext::solve()
+{
+   return d_KINSOL_solver->solve();
+}
+
+KINSOLSolver *KINSOL_SAMRAIContext::getKINSOLSolver()
+{
+   return d_KINSOL_solver;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialize KINSOL solver and solve nonlinear system from input.       *
+ * Note that all restart values for parameters may be overridden with    *
+ * input values.                                                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void KINSOL_SAMRAIContext::getFromInput(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   if (db->keyExists("residual_stop_tolerance")) {
+      d_residual_stop_tolerance = db->getDouble("residual_stop_tolerance");
+      d_KINSOL_solver->setResidualStoppingTolerance(d_residual_stop_tolerance);
+   }
+
+   if (db->keyExists("max_nonlinear_iterations")) {
+      d_max_nonlinear_iterations = db->getInteger("max_nonlinear_iterations");
+      d_KINSOL_solver->setMaxIterations(d_max_nonlinear_iterations);
+   }
+
+   if (db->keyExists("max_krylov_dimension")) {
+      d_max_krylov_dimension = db->getInteger("max_krylov_dimension");
+      d_KINSOL_solver->setMaxKrylovDimension(d_max_krylov_dimension);
+   }
+
+   if (db->keyExists("global_newton_strategy")) {
+      d_global_newton_strategy = db->getInteger("global_newton_strategy");
+      d_KINSOL_solver->setGlobalStrategy(d_global_newton_strategy);
+   }
+
+   if (db->keyExists("max_newton_step")) {
+      d_max_newton_step = db->getDouble("max_newton_step");
+      d_KINSOL_solver->setMaxNewtonStep(d_max_newton_step);
+   }
+
+   if (db->keyExists("nonlinear_step_tolerance")) {
+      d_nonlinear_step_tolerance = db->getDouble("nonlinear_step_tolerance");
+      d_KINSOL_solver->setNonlinearStepTolerance(d_nonlinear_step_tolerance);
+   }
+
+   if (db->keyExists("relative_function_error")) {
+      d_relative_function_error = db->getDouble("relative_function_error");
+      d_KINSOL_solver->setRelativeFunctionError(d_relative_function_error);
+   }
+
+   if (db->keyExists("linear_convergence_test")) {
+      d_linear_convergence_test = db->getInteger("linear_convergence_test");
+      d_KINSOL_solver->
+      setLinearSolverConvergenceTest(d_linear_convergence_test);
+   }
+
+   if (db->keyExists("max_subsetup_calls")) {
+      d_max_subsetup_calls = db->getInteger("max_subsetup_calls");
+      d_KINSOL_solver->
+      setMaxSubSetupCalls(d_max_subsetup_calls);
+   }
+
+   if (db->keyExists("residual_monitoring_params")) {
+      db->getDoubleArray("residual_monitoring_params",
+         d_residual_monitoring_params, 2);
+      d_KINSOL_solver->
+      setResidualMonitoringParams(d_residual_monitoring_params[0],
+         d_residual_monitoring_params[1]);
+   }
+
+   if (db->keyExists("residual_monitoring_constant")) {
+      d_residual_monitoring_constant =
+         db->getDouble("residual_monitoring_constant");
+      d_KINSOL_solver->
+      setResidualMonitoringConstant(d_residual_monitoring_constant);
+   }
+
+   if (db->keyExists("no_min_eps")) {
+      d_no_min_eps = db->getBool("no_min_eps");
+      d_KINSOL_solver->setNoMinEps(d_no_min_eps);
+   }
+
+   if (db->keyExists("eisenstat_walker_params")) {
+      db->getDoubleArray("eisenstat_walker_params",
+         d_eisenstat_walker_params, 2);
+      d_KINSOL_solver->
+      setEisenstatWalkerParameters(d_eisenstat_walker_params[0],
+         d_eisenstat_walker_params[1]);
+   }
+
+   if (db->keyExists("linear_solver_constant_tolerance")) {
+      d_linear_solver_constant_tolerance =
+         db->getDouble("linear_solver_constant_tolerance");
+      d_KINSOL_solver->
+      setLinearSolverConstantTolerance(d_linear_solver_constant_tolerance);
+   }
+
+   if (db->keyExists("max_solves_no_precond_setup")) {
+      d_max_solves_no_precond_setup =
+         db->getInteger("max_solves_no_precond_setup");
+      d_KINSOL_solver->
+      setMaxStepsWithNoPrecondSetup(d_max_solves_no_precond_setup);
+   }
+
+   if (db->keyExists("max_linear_solve_restarts")) {
+      d_max_linear_solve_restarts =
+         db->getInteger("max_linear_solve_restarts");
+      d_KINSOL_solver->setMaxLinearSolveRestarts(d_max_linear_solve_restarts);
+   }
+
+   bool set_print_options = false;
+   if (db->keyExists("KINSOL_log_filename")) {
+      d_KINSOL_log_filename = db->getString("KINSOL_log_filename");
+      set_print_options = true;
+   }
+
+   if (db->keyExists("KINSOL_print_flag")) {
+      d_KINSOL_print_flag = db->getInteger("KINSOL_print_flag");
+      set_print_options = true;
+   }
+
+   if (set_print_options) {
+      d_KINSOL_solver->setLogFileData(d_KINSOL_log_filename,
+         d_KINSOL_print_flag);
+   }
+
+   if (db->keyExists("uses_preconditioner")) {
+      d_uses_preconditioner = db->getBool("uses_preconditioner");
+   }
+
+   if (db->keyExists("uses_jac_times_vector")) {
+      d_uses_jac_times_vector = db->getBool("uses_jac_times_vector");
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Read data members from restart database.                              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void KINSOL_SAMRAIContext::getFromRestart()
+{
+
+   tbox::Pointer<tbox::Database> root_db =
+      tbox::RestartManager::getManager()->getRootDatabase();
+
+   tbox::Pointer<tbox::Database> db;
+   if (root_db->isDatabase(d_object_name)) {
+      db = root_db->getDatabase(d_object_name);
+   } else {
+      TBOX_ERROR("Restart database corresponding to "
+         << d_object_name << " not found in restart file");
+   }
+
+   int ver = db->getInteger("SOLV_KINSOL_SAMRAI_CONTEXT_VERSION");
+   if (ver != SOLV_KINSOL_SAMRAI_CONTEXT_VERSION) {
+      TBOX_ERROR(d_object_name << ":  "
+                               << "Restart file version different "
+                               << "than class version.");
+   }
+
+   d_residual_stop_tolerance = db->getDouble("d_residual_stop_tolerance");
+   d_max_nonlinear_iterations = db->getInteger("d_max_nonlinear_iterations");
+   d_max_krylov_dimension = db->getInteger("d_max_krylov_dimension");
+   d_global_newton_strategy = db->getInteger("d_global_newton_strategy");
+   d_max_newton_step = db->getDouble("d_max_newton_step");
+   d_nonlinear_step_tolerance = db->getDouble("d_nonlinear_step_tolerance");
+   d_relative_function_error = db->getDouble("d_relative_function_error");
+   d_solution_update_constraint = db->getDouble("d_solution_update_constraint");
+   d_linear_convergence_test = db->getInteger("d_linear_convergence_test");
+   db->getDoubleArray("d_eisenstat_walker_params",
+      d_eisenstat_walker_params, 2);
+   d_linear_solver_constant_tolerance =
+      db->getDouble("d_linear_solver_constant_tolerance");
+   d_precond_setup_flag = db->getInteger("d_precond_setup_flag");
+   d_max_solves_no_precond_setup =
+      db->getInteger("d_max_solves_no_precond_setup");
+   d_max_linear_solve_restarts = db->getInteger("d_max_linear_solve_restarts");
+   d_KINSOL_log_filename = db->getString("d_KINSOL_log_filename");
+   d_KINSOL_print_flag = db->getInteger("d_KINSOL_print_flag");
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Write data members to database.                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void KINSOL_SAMRAIContext::putToDatabase(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   db->putInteger("SOLV_KINSOL_SAMRAI_CONTEXT_VERSION",
+      SOLV_KINSOL_SAMRAI_CONTEXT_VERSION);
+
+   db->putDouble("d_residual_stop_tolerance", d_residual_stop_tolerance);
+   db->putInteger("d_max_nonlinear_iterations", d_max_nonlinear_iterations);
+   db->putInteger("d_max_krylov_dimension", d_max_krylov_dimension);
+   db->putInteger("d_global_newton_strategy", d_global_newton_strategy);
+   db->putDouble("d_max_newton_step", d_max_newton_step);
+   db->putDouble("d_nonlinear_step_tolerance", d_nonlinear_step_tolerance);
+   db->putDouble("d_relative_function_error", d_relative_function_error);
+   db->putDouble("d_solution_update_constraint", d_solution_update_constraint);
+   db->putInteger("d_linear_convergence_test", d_linear_convergence_test);
+   db->putDoubleArray("d_eisenstat_walker_params",
+      d_eisenstat_walker_params, 2);
+   db->putDouble("d_linear_solver_constant_tolerance",
+      d_linear_solver_constant_tolerance);
+   db->putInteger("d_precond_setup_flag", d_precond_setup_flag);
+   db->putInteger("d_max_solves_no_precond_setup",
+      d_max_solves_no_precond_setup);
+   db->putInteger("d_max_linear_solve_restarts", d_max_linear_solve_restarts);
+   db->putString("d_KINSOL_log_filename", d_KINSOL_log_filename);
+   db->putInteger("d_KINSOL_print_flag", d_KINSOL_print_flag);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Write all class data members to specified output stream.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void KINSOL_SAMRAIContext::printClassData(
+   std::ostream& os) const
+{
+   os << "\nKINSOL_SAMRAIContext::printClassData..." << std::endl;
+   os << "KINSOL_SAMRAIContext: this = "
+      << (KINSOL_SAMRAIContext *)this << std::endl;
+   os << "d_object_name = " << d_object_name << std::endl;
+   os << "d_KINSOL_solver = " << (KINSOLSolver *)d_KINSOL_solver << std::endl;
+   os << "d_solution_vector = "
+      << (SundialsAbstractVector *)d_solution_vector;
+   os << "\nd_residual_stop_tolerance = " << d_residual_stop_tolerance
+      << std::endl;
+   os << "d_max_nonlinear_iterations = " << d_max_nonlinear_iterations
+      << std::endl;
+   os << "d_max_krylov_dimension = " << d_max_krylov_dimension << std::endl;
+   os << "d_global_newton_strategy = " << d_global_newton_strategy << std::endl;
+   os << "d_max_newton_step = " << d_max_newton_step << std::endl;
+   os << "d_nonlinear_step_tolerance = " << d_nonlinear_step_tolerance
+      << std::endl;
+   os << "d_relative_function_error = " << d_relative_function_error
+      << std::endl;
+   os << "d_solution_update_constraint = " << d_solution_update_constraint;
+   os << "\nd_linear_convergence_test = " << d_linear_convergence_test
+      << std::endl;
+   os << "d_eisenstat_walker_params = "
+   << d_eisenstat_walker_params[0] << " , "
+   << d_eisenstat_walker_params[1] << std::endl;
+   os << "d_linear_solver_constant_tolerance = "
+      << d_linear_solver_constant_tolerance << std::endl;
+   os << "d_precond_setup_flag = " << d_precond_setup_flag << std::endl;
+   os << "d_max_solves_no_precond_setup = " << d_max_solves_no_precond_setup;
+   os << "\nd_max_linear_solve_restarts = " << d_max_linear_solve_restarts;
+   os << "\nd_KINSOL_log_filename = " << d_KINSOL_log_filename << std::endl;
+   os << "d_KINSOL_print_flag = " << d_KINSOL_print_flag << std::endl;
+
+}
+
+}
+}
+
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/KINSOL_SAMRAIContext.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/KINSOL_SAMRAIContext.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,285 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   KINSOL solver for use within a SAMRAI-based application. 
+ *
+ ************************************************************************/
+
+#ifndef included_solv_KINSOL_SAMRAIContext
+#define included_solv_KINSOL_SAMRAIContext
+
+#include "SAMRAI/SAMRAI_config.h"
+
+/*
+ ************************************************************************
+ *  THIS CLASS WILL BE UNDEFINED IF THE LIBRARY IS BUILT WITHOUT KINSOL
+ ************************************************************************
+ */
+#ifdef HAVE_SUNDIALS
+
+#include "SAMRAI/solv/NonlinearSolverStrategy.h"
+#include "SAMRAI/solv/KINSOLSolver.h"
+#include "SAMRAI/solv/KINSOLAbstractFunctions.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Serializable.h"
+
+namespace SAMRAI {
+namespace solv {
+
+/*!
+ * @brief Wraps the KINSOLSolver C++ wrapper class so that
+ * KINSOL may be used in applications that require a nonlinear solver.
+ *
+ * Class KINSOL_SAMRAIContext wraps the KINSOLSolver
+ * C++ wrapper class so that KINSOL may be used in applications that
+ * require a nonlinear solver.  The class KINSOLSolver does
+ * not depend on SAMRAI.  Making it derived from the SAMRAI nonlinear solver
+ * interface would require the KINSOL C++ wrapper to depend on SAMRAI.
+ *
+ * Important note:  This class can only create a KINSOL C++ wrapper instance,
+ * initialize it in a rudimentary way, and invoke the solution process.
+ * All other interaction with the nonlinear solver (i.e., setting parameters,
+ * retrieving solver statistics, etc.) must be done directly with the
+ * KINSOL wrapper accessible via the routine getKINSOLSolver().
+ * Alternatively, solver parameters may be set up at initialization time
+ * using the SAMRAI input database.
+ *
+ * If no parameters are read from input, KINSOL defaults are used.  See KINSOL
+ * documentation for default information.  Optional input keys and types are:
+ *
+ *  - @b residual_stop_tolerance
+ *      double value for stopping tolerance on norm of scaled residual.
+ *
+ *  - @b max_nonlinear_iterations
+ *      integer value for maximum number of nonlinear iterations (MXITER).
+ *
+ *  - @b max_krylov_dimension
+ *      integer value for maximum dimension of Krylov space.
+ *
+ *  - @b global_newton_strategy
+ *      integer flag for globalization strategy.  Choices are
+ *      "INEXACT_NEWTON" (default) and "LINESEARCH".
+ *
+ *  - @b max_newton_step
+ *      double value for maximum allowable Newton step (MXNEWTONSTEP).
+ *
+ *  - @b nonlinear_step_tolerance
+ *      double value for stopping tolerance on maximum entry in
+ *      scaled Newton step.
+ *
+ *  - @b relative_function_error
+ *      double value for relative error in function evaluation (RELFUNC).
+ *
+ *  - @b solution_update_constraint
+ *      double value for constraint on relative change in solution (RELU).
+ *
+ *  - @b linear_convergence_test
+ *      integer flag for linear solver convergence tolerance (ETACHOICE).
+ *      Choices are "ETACONSTANT" (default), "ETACHOICE1", ETACHOICE2".
+ *
+ *  - @b max_sub_setup_calls
+ *      number of nonlinear iterations between checks by the
+ *      nonlinear residual monitoring algorithm (specifies lenght of
+ *      subinterval) NOTE: should be a multiple of
+ *      MaxStepsWithNoPrecondSetup
+ *
+ *  - @b residual_monitoring_params
+ *      values of omega_min and omega_max scalars used by nonlinear
+ *      residual monitoring algorithm.
+ *      Default is [0.00001 and 0.9]
+ *
+ *  - @b residual_monitoring_constant
+ *      constant value used by residual monitoring algorithm. If
+ *      omega=0, then it is estimated using omega_min and
+ *      omega_max.
+ *      Default is 0.0.
+ *
+ *  - @b no_min_eps flag
+ *      control whether or not the value * of eps is bounded below
+ *      by 0.01*fnormtol. FALSE = "constrain value of eps by setting to
+ *      the following: eps = MAX{0.01*fnormtol, eps}" TRUE = "do
+ *      notconstrain value of eps".  Default is FALSE
+ *
+ *  - @b eisenstat_walker_params
+ *      array of two double values Eisenstat-Walker choice 2; i.e.,
+ *      the values are given as ETAALPHA, followed by ETAGAMMA.  Note: the
+ *      values only apply when linear convergence test is set to ETACHOICE2.
+ *
+ *  - @b linear_solver_relative_tolerance
+ *      double value for constant linear solver relative tolerance
+ *      (ETACONST).  Note: value only apply when convergence test is
+ *      set to ETACONSTANT.
+ *
+ *  - @b precond_setup_flag
+ *      integer flag for preconditioner setup strategy (PRECOND_NO_INIT).
+ *
+ *  - @b max_solves_no_precond_setup
+ *      integer value for number of nonlinear steps separating successive
+ *      calls to preconditioner setup routine.
+ *
+ *  - @b max_linear_solve_restarts
+ *      integer value for maximum number of linear solver restarts allowed.
+ *
+ *  - @b KINSOL_log_filename
+ *      string value for name of KINSOL log file; default is "kinsol.log".
+ *
+ *  - @b KINSOL_print_flag
+ *      integer flag for KINSOL log file print options (PRINTFL).
+ *
+ *  - @b uses_preconditioner
+ *      boolean flag indicating whether a preconditioner is supplied.
+ *      Default is false.
+ *
+ *  - @b uses_jac_times_vector
+ *      boolean flag indicating whether an analytic Jacobian-vector
+ *      product is supplied.  Default is false.
+ *
+ * Note that all input values may override values read in from restart.  If
+ * no new input value is given, the restart value is used.
+ *
+ * A sample input file entry might look like:
+ *
+ * @code
+ *   residual_stop_tolerance  =  10.e-6
+ *   max_nonlinear_iterations =  200
+ *   max_newton_step          =  0.1
+ *   KINSOL_log_filename      =  "mylogfile"
+ *   KINSOL_print_flag        =  3   // print all output KINSOL has to offer
+ * @endcode
+ *
+ * @see solv::NonlinearSolverStrategy
+ */
+class KINSOL_SAMRAIContext:
+   public NonlinearSolverStrategy,
+   public tbox::Serializable
+{
+public:
+   /**
+    * Constructor for algs::KINSOL_SAMRAIContext allocates the KINSOL
+    * C++ wrapper object and initializes rudimentary state associated
+    * with user-supplied solver components.  Then, it reads solver parameter
+    * from input and restart which may override default values.
+    *
+    * When assertion checking is active, an unrecoverable assertion
+    * will result if the name string is empty or the pointer to the
+    * user-defined KINSOL functions object is null.
+    */
+   KINSOL_SAMRAIContext(
+      const std::string& object_name,
+      tbox::Pointer<tbox::Database> input_db,
+      KINSOLAbstractFunctions* my_functions);
+
+   /**
+    * Destructor for algs::KINSOL_SAMRAIContext destroys the KINSOL
+    * C++ wrapper object and the KINSOL solution vector wrapper.
+    */
+   ~KINSOL_SAMRAIContext();
+
+   /**
+    * Initialize the state of KINSOL based on vector argument representing
+    * the solution of the nonlinear system.  In general, this routine must
+    * be called before the solve() routine is invoked.
+    */
+   void
+   initialize(
+      tbox::Pointer<SAMRAIVectorReal<double> > solution);
+
+   /**
+    * Solve the nonlinear problem and return and integer value defined by
+    * KINSOL.  A return value of 1 indicates success (i.e., KINSOL_SUCCESS).
+    * Consult the KINSOL documentation, KINSOL header file kinsol.h, or the
+    * header file for the class KINSOLSolver for more information
+    * about KINSOL return codes.  In general, the initialize() routine must
+    * be called before this solve function to set up the solver.
+    */
+   int
+   solve();
+
+   /**
+    * Return pointer to KINSOL solver C++ wrapper object.
+    */
+   KINSOLSolver *
+   getKINSOLSolver();
+
+   /**
+    * Read input parameters from given database.
+    *
+    * When assertion checking is active, an unrecoverable assertion
+    * will result if the database pointer is null.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db);
+
+   /**
+    * Retrieve solver parameters from restart database matching object name.
+    *
+    * When assertion checking is active, an unrecoverable assertion
+    * will result if a restart database matching the object name does not
+    * exist, or if the class version number does not match that in restart.
+    */
+   void
+   getFromRestart();
+
+   /**
+    * Retrieve solver parameters from restart database matching object name.
+    *
+    * When assertion checking is active, an unrecoverable assertion
+    * will result if database pointer is null.
+    */
+   void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> db);
+
+   /**
+    * Print out all members of integrator instance to given output stream.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os) const;
+
+private:
+   std::string d_object_name;
+
+   /*
+    * KINSOL nonlinear solver object and solution vector for nonlinear system.
+    */
+
+   KINSOLSolver* d_KINSOL_solver;
+   SundialsAbstractVector* d_solution_vector;
+
+   /*
+    * KINSOL state data maintained here for input/restart capabilities.
+    */
+
+   double d_residual_stop_tolerance;
+   int d_max_nonlinear_iterations;
+   int d_max_krylov_dimension;
+   int d_global_newton_strategy;
+   double d_max_newton_step;
+   double d_nonlinear_step_tolerance;
+   double d_relative_function_error;
+   double d_solution_update_constraint;
+   int d_linear_convergence_test;
+   int d_max_subsetup_calls;
+   double d_residual_monitoring_params[2];
+   double d_residual_monitoring_constant;
+   double d_eisenstat_walker_params[2];
+   double d_linear_solver_constant_tolerance;
+   int d_precond_setup_flag;
+   int d_max_solves_no_precond_setup;
+   int d_max_linear_solve_restarts;
+   std::string d_KINSOL_log_filename;
+   int d_KINSOL_print_flag;
+   bool d_no_min_eps;
+   bool d_uses_preconditioner;
+   bool d_uses_jac_times_vector;
+};
+
+}
+}
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/LocationIndexRobinBcCoefs.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/LocationIndexRobinBcCoefs.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,241 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Robin boundary condition support on cartesian grids. 
+ *
+ ************************************************************************/
+#ifndef included_solv_LocationIndexRobinBcCoefs_C
+#define included_solv_LocationIndexRobinBcCoefs_C
+
+#include <stdlib.h>
+
+#include "SAMRAI/solv/LocationIndexRobinBcCoefs.h"
+
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include IOMANIP_HEADER_FILE
+
+namespace SAMRAI {
+namespace solv {
+
+/*
+ ************************************************************************
+ * Constructor using database
+ ************************************************************************
+ */
+
+LocationIndexRobinBcCoefs::LocationIndexRobinBcCoefs(
+   const tbox::Dimension& dim,
+   const std::string& object_name,
+   tbox::Pointer<tbox::Database> database):
+   d_dim(dim),
+   d_object_name(object_name)
+{
+   int i;
+   for (i = 0; i < 2 * d_dim.getValue(); ++i) {
+      d_a_map[i] = tbox::MathUtilities<double>::getSignalingNaN();
+      d_b_map[i] = tbox::MathUtilities<double>::getSignalingNaN();
+      d_g_map[i] = tbox::MathUtilities<double>::getSignalingNaN();
+   }
+   if (!database.isNull()) {
+      getFromInput(database);
+   }
+}
+
+/*
+ ************************************************************************
+ * Destructor                                                           *
+ ************************************************************************
+ */
+
+LocationIndexRobinBcCoefs::~LocationIndexRobinBcCoefs(
+   void) {
+}
+
+/*
+ ********************************************************************
+ * Set state from input database                                    *
+ ********************************************************************
+ */
+
+void LocationIndexRobinBcCoefs::getFromInput(
+   tbox::Pointer<tbox::Database> database)
+{
+   if (database) {
+      int i;
+      for (i = 0; i < 2 * d_dim.getValue(); ++i) {
+         std::string name = "boundary_" + tbox::Utilities::intToString(i);
+         if (database->isString(name)) {
+            d_a_map[i] = 1.0;
+            d_g_map[i] = 0.0;
+            tbox::Array<std::string> specs = database->getStringArray(name);
+            if (specs[0] == "value") {
+               d_a_map[i] = 1.0;
+               d_b_map[i] = 0.0;
+               if (specs.size() > 1) d_g_map[i] = atof(specs[1].c_str());
+            } else if (specs[0] == "slope") {
+               d_a_map[i] = 0.0;
+               d_b_map[i] = 1.0;
+               if (specs.size() > 1) d_g_map[i] = atof(specs[1].c_str());
+            } else if (specs[0] == "coefficients") {
+               if (specs.size() > 1) d_a_map[i] = atof(specs[1].c_str());
+               if (specs.size() > 2) d_b_map[i] = atof(specs[2].c_str());
+               if (specs.size() > 3) d_g_map[i] = atof(specs[3].c_str());
+            } else {
+               TBOX_ERROR(d_object_name << ": Bad boundary specifier\n"
+                  << "'" << specs[0] << "'.  Use either 'value'\n"
+                                     << "'slope' or 'coefficients'.\n");
+            }
+         }
+      }
+   }
+}
+
+/*
+ ************************************************************************
+ * Set the boundary value for a Dirichlet boundary condition.           *
+ ************************************************************************
+ */
+
+void LocationIndexRobinBcCoefs::setBoundaryValue(
+   int location_index,
+   double value)
+{
+   if (location_index < 0 || location_index >= 2 * d_dim.getValue()) {
+      TBOX_ERROR("Location index in " << d_dim.getValue() << "D must be\n"
+                                      << "in [0," << 2 * d_dim.getValue() - 1 << "].\n");
+   }
+   d_a_map[location_index] = 1.0;
+   d_b_map[location_index] = 0.0;
+   d_g_map[location_index] = value;
+}
+
+/*
+ ************************************************************************
+ * Set the slpe for a Neumann boundary condition.                       *
+ ************************************************************************
+ */
+
+void LocationIndexRobinBcCoefs::setBoundarySlope(
+   int location_index,
+   double slope)
+{
+   if (location_index >= 2 * d_dim.getValue()) {
+      TBOX_ERROR("Location index in " << d_dim.getValue() << "D must be\n"
+                                      << "in [0," << 2 * d_dim.getValue() - 1 << "].\n");
+   }
+   d_a_map[location_index] = 0.0;
+   d_b_map[location_index] = 1.0;
+   d_g_map[location_index] = slope;
+}
+
+/*
+ ************************************************************************
+ * Set the raw bc coefficients.                                         *
+ ************************************************************************
+ */
+
+void LocationIndexRobinBcCoefs::setRawCoefficients(
+   int location_index,
+   double a,
+   double b,
+   double g)
+{
+   if (location_index >= 2 * d_dim.getValue()) {
+      TBOX_ERROR("Location index in " << d_dim.getValue() << "D must be\n"
+                                      << "in [0," << 2 * d_dim.getValue() - 1 << "].\n");
+   }
+   d_a_map[location_index] = a;
+   d_b_map[location_index] = b;
+   d_g_map[location_index] = g;
+}
+
+/*
+ ************************************************************************
+ * Set the bc coefficients to their mapped values.                      *
+ ************************************************************************
+ */
+
+void LocationIndexRobinBcCoefs::setBcCoefs(
+   tbox::Pointer<pdat::ArrayData<double> >& acoef_data,
+   tbox::Pointer<pdat::ArrayData<double> >& bcoef_data,
+   tbox::Pointer<pdat::ArrayData<double> >& gcoef_data,
+   const tbox::Pointer<hier::Variable>& variable,
+   const hier::Patch& patch,
+   const hier::BoundaryBox& bdry_box,
+   double fill_time) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim, patch, bdry_box);
+
+   NULL_USE(variable);
+   NULL_USE(patch);
+   NULL_USE(fill_time);
+
+   int location = bdry_box.getLocationIndex();
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(location >= 0 && location < 2 * d_dim.getValue());
+#endif
+   if (acoef_data) {
+      TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *acoef_data);
+
+      acoef_data->fill(d_a_map[location]);
+   }
+   if (bcoef_data) {
+      TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *bcoef_data);
+
+      bcoef_data->fill(d_b_map[location]);
+   }
+   if (gcoef_data) {
+      TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *gcoef_data);
+
+      gcoef_data->fill(d_g_map[location]);
+   }
+}
+
+hier::IntVector
+LocationIndexRobinBcCoefs::numberOfExtensionsFillable() const
+{
+   /*
+    * Return some really big number.  We have no limits.
+    */
+   return hier::IntVector(d_dim, 1 << (sizeof(int) - 1));
+}
+
+void LocationIndexRobinBcCoefs::getCoefficients(
+   int i,
+   double& a,
+   double& b,
+   double& g) const
+{
+   a = d_a_map[i];
+   b = d_b_map[i];
+   g = d_g_map[i];
+}
+
+/*
+ ************************************************************************
+ * Assignment operator                                                  *
+ ************************************************************************
+ */
+
+const LocationIndexRobinBcCoefs& LocationIndexRobinBcCoefs::operator = (
+   const LocationIndexRobinBcCoefs& r)
+{
+   d_object_name = r.d_object_name;
+   for (int i = 0; i < 2 * d_dim.getValue(); ++i) {
+      d_a_map[i] = r.d_a_map[i];
+      d_b_map[i] = r.d_b_map[i];
+      d_g_map[i] = r.d_g_map[i];
+   }
+   return *this;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/LocationIndexRobinBcCoefs.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/LocationIndexRobinBcCoefs.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,227 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Robin boundary condition problem-dependent interfaces 
+ *
+ ************************************************************************/
+#ifndef included_solv_LocationIndexRobinBcCoefs
+#define included_solv_LocationIndexRobinBcCoefs
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/solv/RobinBcCoefStrategy.h"
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace solv {
+
+/*!
+ * @brief A prefabricated Robin boundary condition coefficients
+ * for coefficients that are entirely specified by the boundary
+ * box location index.
+ *
+ * This implementation of the strategy
+ * class RobinBcCoefStrategy may be used when your
+ * Robin boundary condition coefficients are completely determined
+ * by the location index of the boundary box.
+ *
+ * Before this class is used in to provide the boundary condition
+ * coefficients, you must specify what boundary conditions to
+ * associate with what location index.  Methods for specifying
+ * these are setBoundaryValue(), setBoundarySlope() and
+ * setRawCoefficients().  The first two are for Dirichlet
+ * and Neumann boundary conditions, respectively.  If the boundary
+ * condition is the more general Robin boundary condition,
+ * the third function should be used to set the coefficients
+ * a and g directly (see RobinBcCoefStrategy) for the
+ * meanings of a and g.
+ *
+ * @b Inputs:
+ * You can specify the boundary conditions for any location index
+ * through the input database.  One line is required for each
+ * location index.  The input parameters are "boundary_N", where
+ * N is the index of the location.  Each parameter must be
+ * a std::string array so that all boundary types can be accomodated
+ * the same way.  The first std::string must be one of "value",
+ * "slope" or "coefficients".  If the std::string is "value" or "slope"
+ * the next std::string is the value you want to set, defaulting to
+ * zero if not specified.  If the first std::string is "coefficients",
+ * the next two strings specifies the values of a and g.
+ *
+ * @b Examples inputs:
+ * @verbatim
+ * boundary_0 = "value", "0.0"
+ * boundary_1 = "value", "1.0"
+ * boundary_2 = "slope", "0.0"
+ * boundary_4 = "coefficients", "1.0", "0.0"
+ * @endverbatim
+ */
+class LocationIndexRobinBcCoefs:
+   public RobinBcCoefStrategy
+{
+
+public:
+   /*!
+    * @brief Constructor using database.
+    */
+   LocationIndexRobinBcCoefs(
+      const tbox::Dimension& dim,
+      const std::string& object_name,
+      tbox::Pointer<tbox::Database> database);
+
+   /*!
+    * @brief Destructor.
+    */
+   virtual ~LocationIndexRobinBcCoefs(
+      void);
+
+   /*!
+    * @brief Function to fill arrays of Robin boundary
+    * condition coefficients at a patch boundary.
+    *
+    * This implementation of the virtual function
+    * RobinBcCoefStrategy::setBcCoefs()
+    * fills the coefficient arrays with constant values
+    * set according to the location index of the boundary box.
+    *
+    * @param acoef_data boundary coefficient data.
+    *        This is defined to include index range for
+    *        the boundary faces on the boundary box @c bdry_box.
+    *        If this is a null pointer, then the calling function
+    *        is not interested in a, and you can disregard it.
+    * @param bcoef_data boundary coefficient data.
+    *        This is defined to include index range for
+    *        the boundary faces on the boundary box @c bdry_box.
+    * @param gcoef_data boundary coefficient data.
+    *        This is defined to include index range for
+    *        the boundary faces on the boundary box @c bdry_box.
+    * @param variable variable to set the coefficients for.
+    * @param patch patch requiring bc coefficients
+    * @param bdry_box boundary box showing where on the boundary
+    *        the coefficient data is needed.
+    * @param fill_time Solution time corresponding to filling,
+    *        for use when coefficients are time-dependent.
+    */
+   void
+   setBcCoefs(
+      tbox::Pointer<pdat::ArrayData<double> >& acoef_data,
+      tbox::Pointer<pdat::ArrayData<double> >& bcoef_data,
+      tbox::Pointer<pdat::ArrayData<double> >& gcoef_data,
+      const tbox::Pointer<hier::Variable>& variable,
+      const hier::Patch& patch,
+      const hier::BoundaryBox& bdry_box,
+      double fill_time = 0.0) const;
+
+   /*
+    * @brief Return how many cells past the edge or corner of the
+    * patch the object can fill.
+    */
+   hier::IntVector
+   numberOfExtensionsFillable() const;
+
+   /*!
+    * @brief Set the boundary value at a given location index.
+    *
+    * @param location_index Set coefficients for this index.
+    * @param value Boundary value at @c location_index.
+    */
+   void
+   setBoundaryValue(
+      int location_index,
+      double value);
+
+   /*!
+    * @brief Set the boundary slope at a given location index.
+    *
+    * @param location_index Set coefficients for this index.
+    * @param slope Boundary slope at @c location_index.
+    */
+   void
+   setBoundarySlope(
+      int location_index,
+      double slope);
+
+   /*!
+    * @brief Set the values of coefficients a and g at a
+    * given location index.
+    *
+    * See RobinBcCoefStrategy for the definitions
+    * of coefficients a and g.
+    *
+    * If the boundary condition is neither Dirichlet nor
+    * Neumann (a general Robin boundary condition), use
+    * this function to set the values of the bc coefficients.
+    *
+    * @param location_index Set coefficients for this index.
+    * @param a Value of coefficient a at given location index.
+    * @param b Value of coefficient b at given location index.
+    * @param g Value of coefficient g at given location index.
+    */
+   void
+   setRawCoefficients(
+      int location_index,
+      double a,
+      double b,
+      double g);
+
+   /*!
+    * @brief Access coefficients.
+    */
+   void
+   getCoefficients(
+      int location_index,
+      double& a,
+      double& b,
+      double& g) const;
+
+   /*!
+    * @brief Assignment operator.
+    */
+   const LocationIndexRobinBcCoefs&
+   operator = (
+      const LocationIndexRobinBcCoefs& r);
+
+private:
+   /*
+    * @brief Set state from input database.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> database);
+
+   /*
+    * @brief Object dimension
+    */
+   const tbox::Dimension d_dim;
+
+   /*
+    * @brief Object name.
+    */
+   std::string d_object_name;
+
+   /*
+    * @brief Mapping for a coefficient.
+    */
+   double d_a_map[2 * tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   /*
+    * @brief Mapping for b coefficient.
+    */
+   double d_b_map[2 * tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   /*
+    * @brief Mapping for g coefficient.
+    */
+   double d_g_map[2 * tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,4726 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=CVODEAbstractFunctions.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CVODEAbstractFunctions.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SundialsAbstractVector.h		\
+	CVODEAbstractFunctions.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=CVODESolver.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CVODEAbstractFunctions.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CVODESolver.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SundialsAbstractVector.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h CVODESolver.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=CartesianRobinBcHelper.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CartesianRobinBcHelper.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	CartesianRobinBcHelper.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=CellPoissonFACOps.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBoxUtils.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/CoarseFineBoundary.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CartesianRobinBcHelper.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACOps.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACOperatorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/GhostCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SimpleCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFullFillPattern.I		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFullFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	CellPoissonFACOps.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
+FILE_4=CellPoissonFACSolver.o
+DEPENDS_4:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/CoarseFineBoundary.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CartesianRobinBcHelper.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACOps.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACSolver.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACSolver.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACOperatorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/GhostCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SimpleCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	CellPoissonFACSolver.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_4 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_4:X.o=${NDIM}.o}: ${DEPENDS_4}
+
+FILE_5=CellPoissonHypreSolver.o
+DEPENDS_5:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBoxUtils.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/CoarseFineBoundary.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/GhostCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SimpleCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	CellPoissonHypreSolver.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_5 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_5:X.o=${NDIM}.o}: ${DEPENDS_5}
+
+FILE_6=FACOperatorStrategy.o
+DEPENDS_6:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACOperatorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h FACOperatorStrategy.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_6 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_6:X.o=${NDIM}.o}: ${DEPENDS_6}
+
+FILE_7=FACPreconditioner.o
+DEPENDS_7:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACOperatorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h FACPreconditioner.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_7 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_7:X.o=${NDIM}.o}: ${DEPENDS_7}
+
+FILE_8=GhostCellRobinBcCoefs.o
+DEPENDS_8:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/GhostCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h GhostCellRobinBcCoefs.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_8 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_8:X.o=${NDIM}.o}: ${DEPENDS_8}
+
+FILE_9=KINSOLAbstractFunctions.o
+DEPENDS_9:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/KINSOLAbstractFunctions.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SundialsAbstractVector.h		\
+	KINSOLAbstractFunctions.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_9 +=\
+	
+endif
+
+${FILE_9:X.o=${NDIM}.o}: ${DEPENDS_9}
+
+FILE_10=KINSOLSolver.o
+DEPENDS_10:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/KINSOLAbstractFunctions.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/KINSOLSolver.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SundialsAbstractVector.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h KINSOLSolver.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_10 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_10:X.o=${NDIM}.o}: ${DEPENDS_10}
+
+FILE_11=KINSOL_SAMRAIContext.o
+DEPENDS_11:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/KINSOLAbstractFunctions.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/KINSOLSolver.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/KINSOL_SAMRAIContext.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/NonlinearSolverStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SundialsAbstractVector.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/Sundials_SAMRAIVector.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/Sundials_SAMRAIVector.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h KINSOL_SAMRAIContext.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_11 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_11:X.o=${NDIM}.o}: ${DEPENDS_11}
+
+FILE_12=LocationIndexRobinBcCoefs.o
+DEPENDS_12:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/LocationIndexRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	LocationIndexRobinBcCoefs.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_12 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_12:X.o=${NDIM}.o}: ${DEPENDS_12}
+
+FILE_13=NonlinearSolverStrategy.o
+DEPENDS_13:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/NonlinearSolverStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h NonlinearSolverStrategy.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_13 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_13:X.o=${NDIM}.o}: ${DEPENDS_13}
+
+FILE_14=PETScAbstractVectorReal.o
+DEPENDS_14:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/PETScAbstractVectorReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PETScAbstractVectorReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PETScAbstractVectorReal.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_14 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_14:X.o=${NDIM}.o}: ${DEPENDS_14}
+
+FILE_15=PETSc_SAMRAIVectorReal.o
+DEPENDS_15:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/PETScAbstractVectorReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PETSc_SAMRAIVectorReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PETSc_SAMRAIVectorReal.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PETSc_SAMRAIVectorReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PETSc_SAMRAIVectorReal.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_15 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/PETScAbstractVectorReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_15:X.o=${NDIM}.o}: ${DEPENDS_15}
+
+FILE_16=PoissonSpecifications.o
+DEPENDS_16:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PoissonSpecifications.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_16 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_16:X.o=${NDIM}.o}: ${DEPENDS_16}
+
+FILE_17=RobinBcCoefStrategy.o
+DEPENDS_17:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h RobinBcCoefStrategy.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_17 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_17:X.o=${NDIM}.o}: ${DEPENDS_17}
+
+FILE_18=SAMRAIVectorReal.o
+DEPENDS_18:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h SAMRAIVectorReal.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_18 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_18:X.o=${NDIM}.o}: ${DEPENDS_18}
+
+FILE_19=SNESAbstractFunctions.o
+DEPENDS_19:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SNESAbstractFunctions.h		\
+	SNESAbstractFunctions.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_19 +=\
+	
+endif
+
+${FILE_19:X.o=${NDIM}.o}: ${DEPENDS_19}
+
+FILE_20=SNES_SAMRAIContext.o
+DEPENDS_20:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/NonlinearSolverStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PETScAbstractVectorReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PETSc_SAMRAIVectorReal.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PETSc_SAMRAIVectorReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SNESAbstractFunctions.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SNES_SAMRAIContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h SNES_SAMRAIContext.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_20 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/PETScAbstractVectorReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PETSc_SAMRAIVectorReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_20:X.o=${NDIM}.o}: ${DEPENDS_20}
+
+FILE_21=SimpleCellRobinBcCoefs.o
+DEPENDS_21:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SimpleCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h SimpleCellRobinBcCoefs.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_21 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_21:X.o=${NDIM}.o}: ${DEPENDS_21}
+
+FILE_22=SundialsAbstractVector.o
+DEPENDS_22:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SundialsAbstractVector.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h SundialsAbstractVector.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_22 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_22:X.o=${NDIM}.o}: ${DEPENDS_22}
+
+FILE_23=Sundials_SAMRAIVector.o
+DEPENDS_23:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SundialsAbstractVector.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/Sundials_SAMRAIVector.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/Sundials_SAMRAIVector.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h Sundials_SAMRAIVector.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_23 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_23:X.o=${NDIM}.o}: ${DEPENDS_23}
+
+FILE_24=solv_NVector.o
+DEPENDS_24:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SundialsAbstractVector.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/solv_NVector.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h solv_NVector.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_24 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_24:X.o=${NDIM}.o}: ${DEPENDS_24}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,54 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   primary makefile for compiling the SAMRAI solv package 
+##
+#########################################################################
+
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/SAMRAI/solv
+VPATH         = @srcdir@
+OBJECT        = ../../..
+
+default: library
+
+include $(OBJECT)/config/Makefile.config
+
+SUBDIRS = fortran
+
+OBJS = 	\
+	PoissonSpecifications.o \
+	SNESAbstractFunctions.o\
+	CVODEAbstractFunctions.o \
+	CVODESolver.o \
+	KINSOLAbstractFunctions.o \
+	KINSOLSolver.o \
+	solv_NVector.o \
+	SundialsAbstractVector.o \
+	FACOperatorStrategy.o \
+	FACPreconditioner.o \
+	NonlinearSolverStrategy.o \
+	SNES_SAMRAIContext.o \
+	KINSOL_SAMRAIContext.o \
+	CartesianRobinBcHelper.o \
+	CellPoissonFACOps.o \
+	CellPoissonFACSolver.o \
+	CellPoissonHypreSolver.o \
+	GhostCellRobinBcCoefs.o \
+	LocationIndexRobinBcCoefs.o \
+	RobinBcCoefStrategy.o \
+	SimpleCellRobinBcCoefs.o \
+	Sundials_SAMRAIVector.o
+
+library: $(OBJS)
+	for DIR in $(SUBDIRS); do if test -d $$DIR; then (cd $$DIR && $(MAKE) $@) ; fi || exit 1; done
+clean:
+	$(SAMCLEAN)
+	for DIR in $(SUBDIRS); do if test -d $$DIR; then (cd $$DIR && $(MAKE) $@) ; fi || exit 1; done
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/NonlinearSolverStrategy.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/NonlinearSolverStrategy.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,29 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface between implicit integrator and nonlinear solver. 
+ *
+ ************************************************************************/
+
+#ifndef included_solv_NonlinearSolverStrategy_C
+#define included_solv_NonlinearSolverStrategy_C
+
+#include "SAMRAI/solv/NonlinearSolverStrategy.h"
+
+namespace SAMRAI {
+namespace solv {
+
+NonlinearSolverStrategy::NonlinearSolverStrategy()
+{
+}
+
+NonlinearSolverStrategy::~NonlinearSolverStrategy()
+{
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/NonlinearSolverStrategy.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/NonlinearSolverStrategy.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,70 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface between implicit integrator and nonlinear solver. 
+ *
+ ************************************************************************/
+
+#ifndef included_solv_NonlinearSolverStrategy
+#define included_solv_NonlinearSolverStrategy
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/solv/SAMRAIVectorReal.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace solv {
+
+/**
+ * @brief Abstract base class defining interface between an
+ * algs::ImplicitIntegrator object and
+ * a nonlinear solver used to advance the solution in time.
+ *
+ * The interface follows the Strategy design pattern.
+ * The methods declared in the interface are provided in a
+ * concrete solver derived from this base class.
+ *
+ * @see algs::ImplicitIntegrator
+ */
+
+class NonlinearSolverStrategy
+{
+public:
+   /**
+    * Empty constructor for algs::NonlinearSolverStrategy.
+    */
+   NonlinearSolverStrategy();
+
+   /**
+    * Empty constructor for algs::NonlinearSolverStrategy.
+    */
+   virtual ~NonlinearSolverStrategy();
+
+   /**
+    * Initialize the solver state.  The vector argument represents the
+    * solution of the nonlinear system.  In general, this routine must
+    * be called before the solve() routine is invoked.
+    */
+   virtual void
+   initialize(
+      const tbox::Pointer<SAMRAIVectorReal<double> > solution) = 0;
+
+   /**
+    * Solve the nonlinear problem and return the integer code defined by the
+    * particular nonlinear solver package in use (e.g., indicating success
+    * or failure of solution process).  In general, the initialize() routine
+    * must be called before this solve function.
+    */
+   virtual int
+   solve() = 0;
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/PETScAbstractVectorReal.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/PETScAbstractVectorReal.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1130 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to C++ vector implementation for PETSc package. 
+ *
+ ************************************************************************/
+
+#ifndef included_solv_PETScAbstractVectorReal_C
+#define included_solv_PETScAbstractVectorReal_C
+
+#include "SAMRAI/solv/PETScAbstractVectorReal.h"
+
+#ifdef HAVE_PETSC
+
+#include "SAMRAI/tbox/IOStream.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace solv {
+
+#define PABSVEC_CAST(v) \
+   (static_cast<PETScAbstractVectorReal < \
+                TYPE> * > (v->data))
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * PETScAbstractVectorReal constructor and destructor.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+PETScAbstractVectorReal<TYPE>::PETScAbstractVectorReal(
+   bool vector_created_via_duplicate,
+   MPI_Comm comm):
+   d_petsc_vector(static_cast<Vec>(NULL)),
+   d_vector_created_via_duplicate(vector_created_via_duplicate),
+   d_comm(comm)
+{
+
+   int ierr = 0;
+
+   ierr = VecCreate(d_comm, &d_petsc_vector);
+   PETSC_SAMRAI_ERROR(ierr);
+
+   // Set PETSc vector data to this abstract vector object
+   d_petsc_vector->precision = PETSC_SCALAR;
+   d_petsc_vector->data = this;
+   d_petsc_vector->petscnative = PETSC_FALSE;
+   d_petsc_vector->map.n = 0;
+   d_petsc_vector->map.N = 0;
+   d_petsc_vector->map.bs = 1;
+
+   // Assign vector operations to PETSc vector object.
+   d_petsc_vector->ops->duplicate = PETScAbstractVectorReal<TYPE>::vecDuplicate;
+   d_petsc_vector->ops->duplicatevecs =
+      PETScAbstractVectorReal<TYPE>::vecDuplicateVecs;
+   d_petsc_vector->ops->destroyvecs =
+      PETScAbstractVectorReal<TYPE>::vecDestroyVecs;
+   d_petsc_vector->ops->dot = PETScAbstractVectorReal<TYPE>::vecDot;
+   d_petsc_vector->ops->mdot = PETScAbstractVectorReal<TYPE>::vecMDot;
+   d_petsc_vector->ops->norm = PETScAbstractVectorReal<TYPE>::vecNorm;
+   d_petsc_vector->ops->tdot = PETScAbstractVectorReal<TYPE>::vecTDot;
+   d_petsc_vector->ops->mtdot = PETScAbstractVectorReal<TYPE>::vecMTDot;
+   d_petsc_vector->ops->scale = PETScAbstractVectorReal<TYPE>::vecScale;
+   d_petsc_vector->ops->copy = PETScAbstractVectorReal<TYPE>::vecCopy;
+   d_petsc_vector->ops->set = PETScAbstractVectorReal<TYPE>::vecSet;
+   d_petsc_vector->ops->swap = PETScAbstractVectorReal<TYPE>::vecSwap;
+   d_petsc_vector->ops->axpy = PETScAbstractVectorReal<TYPE>::vecAXPY;
+   d_petsc_vector->ops->axpby = PETScAbstractVectorReal<TYPE>::vecAXPBY;
+   d_petsc_vector->ops->maxpy = PETScAbstractVectorReal<TYPE>::vecMAXPY;
+   d_petsc_vector->ops->aypx = PETScAbstractVectorReal<TYPE>::vecAYPX;
+   d_petsc_vector->ops->waxpy = PETScAbstractVectorReal<TYPE>::vecWAXPY;
+   d_petsc_vector->ops->pointwisemult =
+      PETScAbstractVectorReal<TYPE>::vecPointwiseMult;
+   d_petsc_vector->ops->pointwisedivide =
+      PETScAbstractVectorReal<TYPE>::vecPointwiseDivide;
+   d_petsc_vector->ops->getarray = PETScAbstractVectorReal<TYPE>::vecGetArray;
+   d_petsc_vector->ops->getsize = PETScAbstractVectorReal<TYPE>::vecGetSize;
+   d_petsc_vector->ops->getlocalsize =
+      PETScAbstractVectorReal<TYPE>::vecGetLocalSize;
+   d_petsc_vector->ops->restorearray =
+      PETScAbstractVectorReal<TYPE>::vecRestoreArray;
+   d_petsc_vector->ops->max = PETScAbstractVectorReal<TYPE>::vecMax;
+   d_petsc_vector->ops->min = PETScAbstractVectorReal<TYPE>::vecMin;
+   d_petsc_vector->ops->setrandom = PETScAbstractVectorReal<TYPE>::vecSetRandom;
+   d_petsc_vector->ops->destroy = PETScAbstractVectorReal<TYPE>::vecDestroy;
+   d_petsc_vector->ops->view = PETScAbstractVectorReal<TYPE>::vecView;
+   d_petsc_vector->ops->dot_local = PETScAbstractVectorReal<TYPE>::vecDot_local;
+   d_petsc_vector->ops->tdot_local =
+      PETScAbstractVectorReal<TYPE>::vecTDot_local;
+   d_petsc_vector->ops->norm_local =
+      PETScAbstractVectorReal<TYPE>::vecNorm_local;
+   d_petsc_vector->ops->mdot_local =
+      PETScAbstractVectorReal<TYPE>::vecMDot_local;
+   d_petsc_vector->ops->mtdot_local =
+      PETScAbstractVectorReal<TYPE>::vecMTDot_local;
+   d_petsc_vector->ops->loadintovector = VecLoadIntoVector_Default;
+   d_petsc_vector->ops->maxpointwisedivide =
+      PETScAbstractVectorReal<TYPE>::vecMaxPointwiseDivide;
+
+   // The remaining functions will result in program abort.
+   d_petsc_vector->ops->setvalues = PETScAbstractVectorReal<TYPE>::vecSetValues;
+   d_petsc_vector->ops->assemblybegin =
+      PETScAbstractVectorReal<TYPE>::vecAssemblyBegin;
+   d_petsc_vector->ops->assemblyend =
+      PETScAbstractVectorReal<TYPE>::vecAssemblyEnd;
+   d_petsc_vector->ops->setoption = PETScAbstractVectorReal<TYPE>::vecSetOption;
+   d_petsc_vector->ops->setvaluesblocked =
+      PETScAbstractVectorReal<TYPE>::vecSetValuesBlocked;
+   d_petsc_vector->ops->placearray =
+      PETScAbstractVectorReal<TYPE>::vecPlaceArray;
+   d_petsc_vector->ops->replacearray =
+      PETScAbstractVectorReal<TYPE>::vecReplaceArray;
+   d_petsc_vector->ops->reciprocal =
+      PETScAbstractVectorReal<TYPE>::vecReciprocal;
+   d_petsc_vector->ops->viewnative =
+      PETScAbstractVectorReal<TYPE>::vecViewNative;
+   d_petsc_vector->ops->conjugate = PETScAbstractVectorReal<TYPE>::vecConjugate;
+   d_petsc_vector->ops->setlocaltoglobalmapping =
+      PETScAbstractVectorReal<TYPE>::vecSetLocalToGlobalMapping;
+   d_petsc_vector->ops->setvalueslocal =
+      PETScAbstractVectorReal<TYPE>::vecSetValuesLocal;
+   d_petsc_vector->ops->resetarray =
+      PETScAbstractVectorReal<TYPE>::vecResetArray;
+   d_petsc_vector->ops->setfromoptions =
+      PETScAbstractVectorReal<TYPE>::vecSetFromOptions;
+   d_petsc_vector->ops->load = PETScAbstractVectorReal<TYPE>::vecLoad;
+   d_petsc_vector->ops->pointwisemax =
+      PETScAbstractVectorReal<TYPE>::vecPointwiseMax;
+   d_petsc_vector->ops->pointwisemaxabs =
+      PETScAbstractVectorReal<TYPE>::vecPointwiseMaxAbs;
+   d_petsc_vector->ops->pointwisemin =
+      PETScAbstractVectorReal<TYPE>::vecPointwiseMin;
+   d_petsc_vector->ops->getvalues = PETScAbstractVectorReal<TYPE>::vecGetValues;
+
+   ierr = PetscMapInitialize(d_comm, &d_petsc_vector->map);
+   PETSC_SAMRAI_ERROR(ierr);
+   ierr = PetscMapSetBlockSize(&d_petsc_vector->map, 1);
+   PETSC_SAMRAI_ERROR(ierr);
+   ierr = PetscMapSetSize(&d_petsc_vector->map, 0);
+   PETSC_SAMRAI_ERROR(ierr);
+   ierr = PetscMapSetLocalSize(&d_petsc_vector->map, 0);
+   PETSC_SAMRAI_ERROR(ierr);
+
+   const std::string my_name = "PETScAbstractVectorReal";
+
+   if (d_petsc_vector->type_name) {
+      ierr = PetscFree(d_petsc_vector->type_name);
+      PETSC_SAMRAI_ERROR(ierr);
+   }
+
+   ierr =
+      PetscObjectChangeTypeName(reinterpret_cast<PetscObject>(d_petsc_vector),
+         my_name.c_str());
+   PETSC_SAMRAI_ERROR(ierr);
+}
+
+template<class TYPE>
+PETScAbstractVectorReal<TYPE>::~PETScAbstractVectorReal()
+{
+   int ierr = 0;
+
+   if (!d_vector_created_via_duplicate) {
+      d_petsc_vector->ops->destroy = 0;
+      ierr = VecDestroy(d_petsc_vector);
+      PETSC_SAMRAI_ERROR(ierr);
+   }
+
+   d_petsc_vector = 0;
+}
+
+template<class TYPE>
+PetscErrorCode PETScAbstractVectorReal<TYPE>::vecDuplicateVecs(
+   Vec v_in,
+   int n,
+   Vec** varr_new)
+{
+   int ierr = 0;
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(v_in == (Vec)NULL));
+#endif
+   ierr = PetscMalloc(n * sizeof(Vec *), varr_new);
+   PETSC_SAMRAI_ERROR(ierr);
+
+   for (int i = 0; i < n; i++) {
+      PETScAbstractVectorReal<TYPE>::vecDuplicate(v_in, *varr_new + i);
+   }
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode PETScAbstractVectorReal<TYPE>::vecDestroyVecs(
+   Vec* v_arr,
+   PetscInt n)
+{
+   int i;
+   int ierr = 0;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   for (i = 0; i < n; i++) {
+      TBOX_ASSERT(!(v_arr[i] == (Vec)NULL));
+   }
+#endif
+   for (i = 0; i < n; i++) {
+      Vec petsc_vec = v_arr[i];
+      vecDestroy(petsc_vec);
+
+      // There is some assymetry in the allocation/deallocation
+      // The PETSc Vec structures are created in the constructor
+      // and normally deallocated by the PETSc VecDestroy call.
+      // This holds for VecCreated and VecDuplicate Vec.
+      // However in the case of DuplicateVecs the VecDestroy
+      // needs to be called on the PETSc Vec structure.
+      petsc_vec->ops->destroy = 0;
+      ierr = VecDestroy(petsc_vec);
+      PETSC_SAMRAI_ERROR(ierr);
+   }
+
+   // SGS foobar
+   ierr = PetscFree(v_arr);
+   PETSC_SAMRAI_ERROR(ierr);
+
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+Vec
+PETScAbstractVectorReal<TYPE>::getPETScVector()
+{
+   return d_petsc_vector;
+} // getPETScVector
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecDuplicate(
+   Vec v,
+   Vec* newv)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(v == (Vec)NULL));
+#endif
+
+   PETScAbstractVectorReal<TYPE>* new_pav = PABSVEC_CAST(v)->makeNewVector();
+   *newv = new_pav->getPETScVector();
+
+   int ierr = PetscObjectStateIncrease(reinterpret_cast<PetscObject>(*newv));
+   PETSC_SAMRAI_ERROR(ierr);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecDot(
+   Vec x,
+   Vec y,
+   TYPE* val)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(x != static_cast<Vec>(NULL));
+   TBOX_ASSERT(y != static_cast<Vec>(NULL));
+#endif
+
+   *val = PABSVEC_CAST(x)->dotWith(PABSVEC_CAST(y));
+
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecMDot(
+   Vec x,
+   PetscInt nv,
+   const Vec* y,
+   TYPE* val)
+{
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(x == (Vec)NULL));
+   for (int i = 0; i < nv; i++) {
+      TBOX_ASSERT(!(y[i] == static_cast<Vec>(NULL)));
+   }
+#endif
+
+   for (PetscInt i = 0; i < nv; ++i) {
+      val[i] = PABSVEC_CAST(x)->dotWith(PABSVEC_CAST(y[i]));
+   }
+
+   int ierr = PetscObjectStateIncrease(reinterpret_cast<PetscObject>(x));
+   PETSC_SAMRAI_ERROR(ierr);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecNorm(
+   Vec x,
+   NormType type,
+   TYPE* val)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(x != static_cast<Vec>(NULL));
+#endif
+   if (type == NORM_1) {
+      *val = PABSVEC_CAST(x)->L1Norm();
+   } else if (type == NORM_2) {
+      *val = PABSVEC_CAST(x)->L2Norm();
+   } else if (type == NORM_INFINITY) {
+      *val = PABSVEC_CAST(x)->maxNorm();
+   } else if (type == NORM_1_AND_2) {
+      val[0] = PABSVEC_CAST(x)->L1Norm();
+      val[1] = PABSVEC_CAST(x)->L2Norm();
+   } else {
+      TBOX_ERROR(
+         "PETScAbstractVectorReal<TYPE>::norm()\n"
+         << "  vector norm type " << static_cast<int>(type)
+         << " unsupported" << std::endl);
+   }
+
+   int ierr = PetscObjectStateIncrease(reinterpret_cast<PetscObject>(x));
+   PETSC_SAMRAI_ERROR(ierr);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecTDot(
+   Vec x,
+   Vec y,
+   TYPE* val)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(x != static_cast<Vec>(NULL));
+   TBOX_ASSERT(y != static_cast<Vec>(NULL));
+#endif
+   *val = PABSVEC_CAST(x)->TdotWith(PABSVEC_CAST(y));
+
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecMTDot(
+   Vec x,
+   PetscInt nv,
+   const Vec* y,
+   TYPE* val)
+{
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+   TBOX_ASSERT(x != static_cast<Vec>(NULL));
+   for (PetscInt i = 0; i < nv; ++i) {
+      TBOX_ASSERT(y[i] != static_cast<Vec>(NULL));
+   }
+#endif
+   for (PetscInt i = 0; i < nv; ++i) {
+      val[i] = PABSVEC_CAST(x)->TdotWith(PABSVEC_CAST(y[i]));
+   }
+
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecScale(
+   Vec x,
+   TYPE alpha)
+{
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+   TBOX_ASSERT(x != static_cast<Vec>(NULL));
+#endif
+   PABSVEC_CAST(x)->scaleVector(alpha);
+
+   int ierr = PetscObjectStateIncrease(reinterpret_cast<PetscObject>(x));
+   PETSC_SAMRAI_ERROR(ierr);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecCopy(
+   Vec x,
+   Vec y)
+{
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+   TBOX_ASSERT(x != static_cast<Vec>(NULL));
+   TBOX_ASSERT(y != static_cast<Vec>(NULL));
+#endif
+   PABSVEC_CAST(y)->copyVector(PABSVEC_CAST(x));
+
+   int ierr = PetscObjectStateIncrease(reinterpret_cast<PetscObject>(y));
+   PETSC_SAMRAI_ERROR(ierr);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecSet(
+   Vec x,
+   TYPE alpha)
+{
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+   TBOX_ASSERT(x != static_cast<Vec>(NULL));
+#endif
+   PABSVEC_CAST(x)->setToScalar(alpha);
+
+   int ierr = PetscObjectStateIncrease(reinterpret_cast<PetscObject>(x));
+   PETSC_SAMRAI_ERROR(ierr);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecSwap(
+   Vec x,
+   Vec y)
+{
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+   TBOX_ASSERT(x != static_cast<Vec>(NULL));
+   TBOX_ASSERT(y != static_cast<Vec>(NULL));
+#endif
+   PABSVEC_CAST(x)->swapWith(PABSVEC_CAST(y));
+
+   int ierr;
+   ierr = PetscObjectStateIncrease(reinterpret_cast<PetscObject>(x));
+   PETSC_SAMRAI_ERROR(ierr);
+   ierr = PetscObjectStateIncrease(reinterpret_cast<PetscObject>(y));
+   PETSC_SAMRAI_ERROR(ierr);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecAXPY(
+   Vec y,
+   TYPE alpha,
+   Vec x)
+{
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+   TBOX_ASSERT(x != static_cast<Vec>(NULL));
+   TBOX_ASSERT(y != static_cast<Vec>(NULL));
+#endif
+   PABSVEC_CAST(y)->setAXPY(alpha, PABSVEC_CAST(x));
+
+   int ierr = PetscObjectStateIncrease(reinterpret_cast<PetscObject>(y));
+   PETSC_SAMRAI_ERROR(ierr);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecAXPBY(
+   Vec y,
+   TYPE alpha,
+   TYPE beta,
+   Vec x)
+{
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+   TBOX_ASSERT(x != static_cast<Vec>(NULL));
+   TBOX_ASSERT(y != static_cast<Vec>(NULL));
+#endif
+   PABSVEC_CAST(y)->setAXPBY(alpha, PABSVEC_CAST(x), beta);
+
+   int ierr = PetscObjectStateIncrease(reinterpret_cast<PetscObject>(y));
+   PETSC_SAMRAI_ERROR(ierr);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecMAXPY(
+   Vec y,
+   PetscInt nv,
+   const TYPE* alpha,
+   Vec* x)
+{
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+   TBOX_ASSERT(y != static_cast<Vec>(NULL));
+   for (PetscInt i = 0; i < nv; ++i) {
+      TBOX_ASSERT(x[i] != static_cast<Vec>(NULL));
+   }
+#endif
+   for (PetscInt i = 0; i < nv; ++i) {
+      PABSVEC_CAST(y)->setAXPY(alpha[i], PABSVEC_CAST(x[i]));
+   }
+
+   int ierr = PetscObjectStateIncrease(reinterpret_cast<PetscObject>(y));
+   PETSC_SAMRAI_ERROR(ierr);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecAYPX(
+   Vec y,
+   const TYPE alpha,
+   Vec x)
+{
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+   TBOX_ASSERT(x != static_cast<Vec>(NULL));
+   TBOX_ASSERT(y != static_cast<Vec>(NULL));
+#endif
+   PABSVEC_CAST(y)->setAXPBY(1.0, PABSVEC_CAST(x), alpha);
+
+   int ierr = PetscObjectStateIncrease(reinterpret_cast<PetscObject>(y));
+   PETSC_SAMRAI_ERROR(ierr);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecWAXPY(
+   Vec w,
+   TYPE alpha,
+   Vec x,
+   Vec y)
+{
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+   TBOX_ASSERT(x != static_cast<Vec>(NULL));
+   TBOX_ASSERT(y != static_cast<Vec>(NULL));
+   TBOX_ASSERT(w != static_cast<Vec>(NULL));
+#endif
+   PABSVEC_CAST(w)->setWAXPY(alpha, PABSVEC_CAST(x), PABSVEC_CAST(y));
+
+   int ierr = PetscObjectStateIncrease(reinterpret_cast<PetscObject>(w));
+   PETSC_SAMRAI_ERROR(ierr);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecPointwiseMult(
+   Vec w,
+   Vec x,
+   Vec y)
+{
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+   TBOX_ASSERT(x != static_cast<Vec>(NULL));
+   TBOX_ASSERT(y != static_cast<Vec>(NULL));
+   TBOX_ASSERT(w != static_cast<Vec>(NULL));
+#endif
+   PABSVEC_CAST(w)->pointwiseMultiply(PABSVEC_CAST(x), PABSVEC_CAST(y));
+   int ierr = PetscObjectStateIncrease(reinterpret_cast<PetscObject>(w));
+   PETSC_SAMRAI_ERROR(ierr);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecPointwiseDivide(
+   Vec w,
+   Vec x,
+   Vec y)
+{
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+   TBOX_ASSERT(x != static_cast<Vec>(NULL));
+   TBOX_ASSERT(y != static_cast<Vec>(NULL));
+   TBOX_ASSERT(w != static_cast<Vec>(NULL));
+#endif
+   PABSVEC_CAST(w)->pointwiseDivide(PABSVEC_CAST(x), PABSVEC_CAST(y));
+
+   int ierr = PetscObjectStateIncrease(reinterpret_cast<PetscObject>(w));
+   PETSC_SAMRAI_ERROR(ierr);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecGetArray(
+   Vec x,
+   TYPE** a)
+{
+   NULL_USE(x);
+   *a = NULL;
+
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecGetSize(
+   Vec x,
+   PetscInt* size)
+{
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+   TBOX_ASSERT(x != static_cast<Vec>(NULL));
+#endif
+   *size = PABSVEC_CAST(x)->getDataSize();
+
+   int ierr = PetscObjectStateIncrease(reinterpret_cast<PetscObject>(x));
+   PETSC_SAMRAI_ERROR(ierr);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecGetLocalSize(
+   Vec x,
+   PetscInt* size)
+{
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+   TBOX_ASSERT(x != static_cast<Vec>(NULL));
+#endif
+   *size = PABSVEC_CAST(x)->getLocalDataSize();
+
+   int ierr = PetscObjectStateIncrease(reinterpret_cast<PetscObject>(x));
+   PETSC_SAMRAI_ERROR(ierr);
+   PetscFunctionReturn(0);
+}
+
+// SGS this looks odd
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecRestoreArray(
+   Vec x,
+   TYPE** a)
+{
+   NULL_USE(x);
+   *a = NULL;
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecMax(
+   Vec x,
+   PetscInt* p,
+   TYPE* val)
+{
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+   TBOX_ASSERT(x != static_cast<Vec>(NULL));
+#endif
+   PABSVEC_CAST(x)->vecMax(*p, *val);
+
+   int ierr = PetscObjectStateIncrease(reinterpret_cast<PetscObject>(x));
+   PETSC_SAMRAI_ERROR(ierr);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecMin(
+   Vec x,
+   PetscInt* p,
+   TYPE* val)
+{
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+   TBOX_ASSERT(x != static_cast<Vec>(NULL));
+#endif
+   PABSVEC_CAST(x)->vecMin(*p, *val);
+
+   int ierr = PetscObjectStateIncrease(reinterpret_cast<PetscObject>(x));
+   PETSC_SAMRAI_ERROR(ierr);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecSetRandom(
+   Vec x,
+   PetscRandom rctx)
+{
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+   TBOX_ASSERT(x != static_cast<Vec>(NULL));
+#endif
+   TYPE lo, hi;
+   int ierr;
+   ierr = PetscRandomGetInterval(rctx, &lo, &hi);
+   PETSC_SAMRAI_ERROR(ierr);
+   PABSVEC_CAST(x)->setRandomValues(hi - lo, lo);
+
+   ierr = PetscObjectStateIncrease(reinterpret_cast<PetscObject>(x));
+   PETSC_SAMRAI_ERROR(ierr);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecDestroy(
+   Vec v)
+{
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+   TBOX_ASSERT(v != static_cast<Vec>(NULL));
+#endif
+
+   PABSVEC_CAST(v)->freeVector();
+
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecView(
+   Vec v,
+   PetscViewer viewer)
+{
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+   TBOX_ASSERT(v != static_cast<Vec>(NULL));
+#endif
+
+   NULL_USE(viewer);
+   PABSVEC_CAST(v)->viewVector();
+
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecDot_local(
+   Vec x,
+   Vec y,
+   TYPE* val)
+{
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+   TBOX_ASSERT(x != static_cast<Vec>(NULL));
+   TBOX_ASSERT(y != static_cast<Vec>(NULL));
+#endif
+
+   *val = PABSVEC_CAST(x)->dotWith(PABSVEC_CAST(y), true);
+
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecTDot_local(
+   Vec x,
+   Vec y,
+   TYPE* val)
+{
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+   TBOX_ASSERT(x != static_cast<Vec>(NULL));
+   TBOX_ASSERT(y != static_cast<Vec>(NULL));
+#endif
+
+   *val = PABSVEC_CAST(x)->TdotWith(PABSVEC_CAST(y), true);
+
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecNorm_local(
+   Vec x,
+   NormType type,
+   TYPE* val)
+{
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+   TBOX_ASSERT(x != static_cast<Vec>(NULL));
+#endif
+
+   if (type == NORM_1) {
+      *val = PABSVEC_CAST(x)->L1Norm(true);
+   } else if (type == NORM_2) {
+      *val = PABSVEC_CAST(x)->L2Norm(true);
+   } else if (type == NORM_INFINITY) {
+      *val = PABSVEC_CAST(x)->maxNorm(true);
+   } else if (type == NORM_1_AND_2) {
+      val[0] = PABSVEC_CAST(x)->L1Norm(true);
+      val[1] = PABSVEC_CAST(x)->L2Norm(true);
+   } else {
+      TBOX_ERROR(
+         "PETScAbstractVectorReal<TYPE>::norm()\n"
+         << "  vector norm type " << static_cast<int>(type)
+         << " unsupported" << std::endl);
+   }
+
+   int ierr = PetscObjectStateIncrease(reinterpret_cast<PetscObject>(x));
+   PETSC_SAMRAI_ERROR(ierr);
+   PetscFunctionReturn(0);
+} // VecNorm_local
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecMDot_local(
+   Vec x,
+   PetscInt nv,
+   const Vec* y,
+   TYPE* val)
+{
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+   TBOX_ASSERT(x != static_cast<Vec>(NULL));
+   for (PetscInt i = 0; i < nv; ++i) {
+      TBOX_ASSERT(y[i] != static_cast<Vec>(NULL));
+   }
+#endif
+   for (PetscInt i = 0; i < nv; ++i) {
+      val[i] = PABSVEC_CAST(x)->dotWith(PABSVEC_CAST(y[i]), true);
+   }
+
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecMTDot_local(
+   Vec x,
+   PetscInt nv,
+   const Vec* y,
+   TYPE* val)
+{
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+   TBOX_ASSERT(x != static_cast<Vec>(NULL));
+   for (PetscInt i = 0; i < nv; ++i) {
+      TBOX_ASSERT(y[i] != static_cast<Vec>(NULL));
+   }
+#endif
+
+   for (PetscInt i = 0; i < nv; ++i) {
+      val[i] = PABSVEC_CAST(x)->TdotWith(PABSVEC_CAST(y[i]), true);
+   }
+
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecMaxPointwiseDivide(
+   Vec x,
+   Vec y,
+   TYPE* max)
+{
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+   TBOX_ASSERT(x != static_cast<Vec>(NULL));
+   TBOX_ASSERT(y != static_cast<Vec>(NULL));
+#endif
+   *max = PABSVEC_CAST(x)->maxPointwiseDivide(PABSVEC_CAST(y));
+
+   PetscFunctionReturn(0);
+}
+
+///
+/// The remaining functions are not implemented and will result in an
+/// unrecoverable assertion being thrown and program abort if called.
+///
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecSetValues(
+   Vec x,
+   PetscInt ni,
+   const PetscInt* ix,
+   const TYPE* y,
+   InsertMode iora)
+{
+   NULL_USE(x);
+   NULL_USE(ni);
+   NULL_USE(ix);
+   NULL_USE(y);
+   NULL_USE(iora);
+   TBOX_ERROR(
+      "PETScAbstractVectorReal<TYPE>::vecSetValues() unimplemented"
+      << std::endl);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecAssemblyBegin(
+   Vec vec)
+{
+   NULL_USE(vec);
+   TBOX_ERROR(
+      "PETScAbstractVectorReal<TYPE>::vecAssemblyBegin() unimplemented"
+      << std::endl);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecAssemblyEnd(
+   Vec vec)
+{
+   NULL_USE(vec);
+   TBOX_ERROR(
+      "PETScAbstractVectorReal<TYPE>::vecAssemblyEnd() unimplemented"
+      << std::endl);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecSetOption(
+   Vec x,
+   VecOption op)
+{
+   NULL_USE(x);
+   NULL_USE(op);
+   TBOX_ERROR(
+      "PETScAbstractVectorReal<TYPE>::vecSetOption() unimplemented"
+      << std::endl);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecSetValuesBlocked(
+   Vec x,
+   PetscInt ni,
+   const PetscInt* ix,
+   const TYPE* y,
+   InsertMode iora)
+{
+   NULL_USE(x);
+   NULL_USE(ni);
+   NULL_USE(ix);
+   NULL_USE(y);
+   NULL_USE(iora);
+   TBOX_ERROR(
+      "PETScAbstractVectorReal<TYPE>::vecSetValuesBlocked() unimplemented"
+      << std::endl);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecPlaceArray(
+   Vec vec,
+   const TYPE* array)
+{
+   NULL_USE(vec);
+   NULL_USE(array);
+   TBOX_ERROR(
+      "PETScAbstractVectorReal<TYPE>::vecPlaceArray() unimplemented"
+      << std::endl);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecReplaceArray(
+   Vec vec,
+   const TYPE* array)
+{
+   NULL_USE(vec);
+   NULL_USE(array);
+   TBOX_ERROR(
+      "PETScAbstractVectorReal<TYPE>::vecReplaceArray() unimplemented"
+      << std::endl);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecReciprocal(
+   Vec vec)
+{
+   NULL_USE(vec);
+   TBOX_ERROR(
+      "PETScAbstractVectorReal<TYPE>::vecReciprocal() unimplemented"
+      << std::endl);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecViewNative(
+   Vec v,
+   PetscViewer viewer)
+{
+   NULL_USE(v);
+   NULL_USE(viewer);
+   TBOX_ERROR(
+      "PETScAbstractVectorReal<TYPE>::vecViewNative() unimplemented"
+      << std::endl);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecConjugate(
+   Vec x)
+{
+   NULL_USE(x);
+   TBOX_ERROR(
+      "PETScAbstractVectorReal<TYPE>::vecConjugate() unimplemented"
+      << std::endl);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecSetLocalToGlobalMapping(
+   Vec x,
+   ISLocalToGlobalMapping mapping)
+{
+   NULL_USE(x);
+   NULL_USE(mapping);
+   TBOX_ERROR(
+      "PETScAbstractVectorReal<TYPE>::vecSetLocalToGlobalMapping() unimplemented"
+      << std::endl);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecSetValuesLocal(
+   Vec x,
+   PetscInt ni,
+   const PetscInt* ix,
+   const TYPE* y,
+   InsertMode iora)
+{
+   NULL_USE(x);
+   NULL_USE(ni);
+   NULL_USE(ix);
+   NULL_USE(y);
+   NULL_USE(iora);
+   TBOX_ERROR(
+      "PETScAbstractVectorReal<TYPE>::vecSetValuesLocal() unimplemented"
+      << std::endl);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecResetArray(
+   Vec vec)
+{
+   NULL_USE(vec);
+   TBOX_ERROR(
+      "PETScAbstractVectorReal<TYPE>::vecResetArray() unimplemented"
+      << std::endl);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecSetFromOptions(
+   Vec vec)
+{
+   NULL_USE(vec);
+   TBOX_ERROR(
+      "PETScAbstractVectorReal<TYPE>::vecSetFromOptions() unimplemented"
+      << std::endl);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecLoad(
+   PetscViewer viewer,
+   VecType outtype,
+   Vec* newvec)
+{
+   NULL_USE(viewer);
+   NULL_USE(outtype);
+   NULL_USE(newvec);
+   TBOX_ERROR(
+      "PETScAbstractVectorReal<TYPE>::vecLoad() unimplemented" << std::endl);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecPointwiseMax(
+   Vec w,
+   Vec x,
+   Vec y)
+{
+   NULL_USE(w);
+   NULL_USE(x);
+   NULL_USE(y);
+   TBOX_ERROR(
+      "PETScAbstractVectorReal<TYPE>::vecPointwiseMax() unimplemented"
+      << std::endl);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecPointwiseMaxAbs(
+   Vec w,
+   Vec x,
+   Vec y)
+{
+   NULL_USE(w);
+   NULL_USE(x);
+   NULL_USE(y);
+   TBOX_ERROR(
+      "PETScAbstractVectorReal<TYPE>::vecPointwiseMaxAbs() unimplemented"
+      << std::endl);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecPointwiseMin(
+   Vec w,
+   Vec x,
+   Vec y)
+{
+   NULL_USE(w);
+   NULL_USE(x);
+   NULL_USE(y);
+   TBOX_ERROR(
+      "PETScAbstractVectorReal<TYPE>::vecPointwiseMin() unimplemented"
+      << std::endl);
+   PetscFunctionReturn(0);
+}
+
+template<class TYPE>
+PetscErrorCode
+PETScAbstractVectorReal<TYPE>::vecGetValues(
+   Vec x,
+   PetscInt ni,
+   const PetscInt* ix,
+   PetscScalar* y)
+{
+   NULL_USE(x);
+   NULL_USE(ni);
+   NULL_USE(ix);
+   NULL_USE(y);
+   TBOX_ERROR(
+      "PETScAbstractVectorReal<TYPE>::vecGetValues() unimplemented"
+      << std::endl);
+   PetscFunctionReturn(0);
+}
+
+}
+}
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/PETScAbstractVectorReal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/PETScAbstractVectorReal.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,787 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to C++ vector implementation for PETSc package. 
+ *
+ ************************************************************************/
+
+#ifndef included_solv_PETScAbstractVectorReal
+#define included_solv_PETScAbstractVectorReal
+
+#include "SAMRAI/SAMRAI_config.h"
+
+/*
+ ************************************************************************
+ *  THIS CLASS WILL BE UNDEFINED IF THE LIBRARY IS BUILT WITHOUT PETSC
+ ************************************************************************
+ */
+#ifdef HAVE_PETSC
+
+#ifdef REQUIRES_CMATH
+#include <cmath>
+#endif
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+
+#ifndef included_petsc_vec
+#define included_petsc_vec
+#ifdef MPICH_SKIP_MPICXX
+#undef MPICH_SKIP_MPICXX
+#endif
+#include "petscvec.h"
+#endif
+
+namespace SAMRAI {
+namespace solv {
+
+/**
+ * Class PETScAbstractVectorReal serves as an abstract base class for a
+ * <TT>C++</TT> vector class that can be used with the PETSc solver framework.
+ * Specifically, this class provides an interface for real-valued PETSc
+ * vectors (i.e., where the data is either float or double).  PETSc allows
+ * the use of user-defined vectors.  Thus, the intent of this base class is
+ * that one may provide his/her own vector implementation in a subclass of
+ * this base class that provides the the necessary vector data structures
+ * and implements the pure virtual functions.  This class declares private
+ * static member functions for linkage with the vector object function calls
+ * understood by PETSc.  Each of the static member functions calls an
+ * associated function in a subclass via the virtual function mechanism.
+ * Note that the virtual members of this class are all protected.  They should
+ * not be used outside of a subclass of this class.  The data member of the
+ * PETSc vector object is set to an instantiation of the user-supplied vector
+ * class, when an object of this class is constructed.
+ *
+ * PETSc was developed in the Mathematics and Computer Science Division at
+ * Argonne National Laboratory (ANL).  For more information about PETSc,
+ * see <TT>http://www-fp.mcs.anl.gov/petsc/</TT>.
+ *
+ * Important notes:
+ *
+ *
+ *
+ * - @b (1) The user-supplied vector subclass should only inherit from
+ *            this base class. It MUST NOT employ multiple inheritance so that
+ *            problems with casting from a base class pointer to a subclass
+ *            pointer and the use of virtual functions works properly.
+ * - @b (2) The user-supplied subclass that implements the vector data
+ *            structures and operations is responsible for all parallelism,
+ *            I/O, etc. associated with the vector objects.  PETSc only sees
+ *            pointers to what it believes to be sequential vector objects
+ *            associated with the local process only.  It has no knowledge
+ *            of the structure of the vector data, nor the implementations
+ *            of the individual vector routines.
+ * - @b (3) Several of the operations defined in the PETSc <TT>_VecOps</TT>
+ *            structure are left unimplemented in this class.  They will
+ *            print an error message and throw an unrecoverable exeception
+ *            if called which causes the program to abort.
+ * - @b (4) By default, PETSc typdefs "Scalar" to <TT>double</TT>.  PETSc
+ *            must be recompiled to use <TT>float</TT> data.  Also, PETSc
+ *            support complex vector data.  A complex vector interface class
+ *            similar to this class may be provided in the future if the
+ *            need arises.
+ *
+ *
+ *
+ */
+
+template<class TYPE>
+class PETScAbstractVectorReal
+{
+protected:
+   /**
+    * Constructor PETScAbstractVectorReal class that provides a wrapper
+    * for a SAMRAI vector so that it can be manipulated within PETSc.  The
+    * constructor allocates the PETSc vector and sets its data structures and
+    * member functions so that it can operate on the SAMRAI vector.
+    */
+   PETScAbstractVectorReal(
+      bool vector_created_via_duplicate,
+      MPI_Comm comm);
+
+   /**
+    * Destructor for PETScAbstractVectorReal class destroys the PETSc
+    * vector created by the constructor.
+    */
+   virtual ~PETScAbstractVectorReal();
+
+   /**
+    * Return PETSc "Vec" object for this PETScAbstractVectorReal object.
+    */
+   Vec
+   getPETScVector();
+
+   /**
+    * Clone the vector structure and allocate storage for the vector
+    * data.  Then, return a pointer to the new vector instance.  This
+    * function is distinct from the vector constructor since it is called
+    * from within PETSc (via the duplicateVec(), duplicateVecs() functions)
+    * to allocate new vector objects.
+    */
+   virtual PETScAbstractVectorReal<TYPE> *
+   makeNewVector() = 0;
+
+   /**
+    * Destroy vector structure and its storage. This function is distinct
+    * from the destructor since it will be called from within PETSc to
+    * deallocate vectors (via the destroyVec(), destroyVecs() functions).
+    */
+   virtual void
+   freeVector() = 0;
+
+   /**
+    * View all vector data.  Note that the user-supplied vector must
+    * choose how to view the vector and its data; e.g., print to file,
+    * dump to standard out, etc.
+    */
+   virtual void
+   viewVector() const = 0;
+
+   /**
+    * Return @f$ (x,y) = \sum_i ( x_i * std::conj(y_i) ) @f$ , where @f$ x @f$  is this vector.
+    * Note that for real vectors, this is the same as TdotWith().
+    * If local_only is true, the operation is limited to parts owned by the
+    * local process.
+    */
+   virtual TYPE
+   dotWith(
+      const PETScAbstractVectorReal<TYPE>* y,
+      bool local_only = false) const = 0;
+
+   /**
+    * Limited to local data only,
+    * return @f$ (x,y) = \sum_i ( x_i * (y_i) ) @f$ , where @f$ x @f$  is this vector.
+    * Note that for real vectors, this is the same as dotWith().
+    * If local_only is true, the operation is limited to parts owned by the
+    * local process.
+    */
+   virtual TYPE
+   TdotWith(
+      const PETScAbstractVectorReal<TYPE>* y,
+      bool local_only = false) const = 0;
+
+   /**
+    * Return @f$ L_1 @f$ -norm of this vector.
+    *
+    * @param local_only Flag to get result for local data only.
+    */
+   virtual TYPE
+   L1Norm(
+      bool local_only = false) const = 0;
+
+   /**
+    * Return @f$ L_2 @f$ -norm of this vector.
+    *
+    * @param local_only Flag to get result for local data only.
+    */
+   virtual TYPE
+   L2Norm(
+      bool local_only = false) const = 0;
+
+   /**
+    * Return @f$ L_{\infty} @f$ -norm of this vector.
+    *
+    * @param local_only Flag to get result for local data only.
+    */
+   virtual TYPE
+   maxNorm(
+      bool local_only = false) const = 0;
+
+   /**
+    * Multiply each entry of this vector by given scalar.
+    */
+   virtual void
+   scaleVector(
+      const TYPE alpha) = 0;
+
+   /**
+    * Copy source vector data to this vector.
+    */
+   virtual void
+   copyVector(
+      const PETScAbstractVectorReal<TYPE>* v_src) = 0;
+
+   /**
+    * Set each entry of this vector to given scalar.
+    */
+   virtual void
+   setToScalar(
+      const TYPE alpha) = 0;
+
+   /**
+    * Swap data between this vector and argument vector.
+    */
+   virtual void
+   swapWith(
+      PETScAbstractVectorReal<TYPE>* v_other) = 0;
+
+   /**
+    * Set @f$ y = \alpha x + y @f$ , where @f$ y @f$  is this vector.
+    */
+   virtual void
+   setAXPY(
+      const TYPE alpha,
+      const PETScAbstractVectorReal<TYPE>* x) = 0;
+
+   /**
+    * Set @f$ y = \alpha x + @beta y @f$ , where @f$ y @f$  is this vector.
+    */
+   virtual void
+   setAXPBY(
+      const TYPE alpha,
+      const PETScAbstractVectorReal<TYPE>* x,
+      const TYPE beta) = 0;
+
+   /**
+    * Set @f$ w = \alpha x + y @f$ , where @f$ w @f$  is this vector.
+    */
+   virtual void
+   setWAXPY(
+      const TYPE alpha,
+      const PETScAbstractVectorReal<TYPE>* x,
+      const PETScAbstractVectorReal<TYPE>* y) = 0;
+
+   /**
+    * Set @f$ w_i = x_i y_i @f$ , where @f$ w_i @f$  is @f$ i @f$ -th entry of this vector.
+    */
+   virtual
+   void
+   pointwiseMultiply(
+      const PETScAbstractVectorReal<TYPE>* x,
+      const PETScAbstractVectorReal<TYPE>* y) = 0;
+
+   /**
+    * Set @f$ w_i = x_i / y_i @f$ , where @f$ w_i @f$  is @f$ i @f$ -th entry of this vector.
+    */
+   virtual
+   void
+   pointwiseDivide(
+      const PETScAbstractVectorReal<TYPE>* x,
+      const PETScAbstractVectorReal<TYPE>* y) = 0;
+
+   /**
+    * Compute @f$ max_i = abs(w_i / y_i) @f$ ,
+    * where @f$ w_i @f$  is @f$ i @f$ -th entry of this vector.
+    */
+   virtual
+   double
+   maxPointwiseDivide(
+      const PETScAbstractVectorReal<TYPE>* y) = 0;
+
+   /**
+    * Find maximum vector entry and vector index at which maximum occurs.
+    */
+   virtual void
+   vecMax(
+      int& i,
+      TYPE& max) const = 0;
+
+   /**
+    * Find minimum vector entry and vector index at which minimum occurs.
+    */
+   virtual void
+   vecMin(
+      int& i,
+      TYPE& min) const = 0;
+
+   /**
+    * Set vector entries to random values.  Note that PETSc uses the
+    * drand48() function and computes random value as width*drand48()+low.
+    */
+   virtual void
+   setRandomValues(
+      const TYPE width,
+      const TYPE low) = 0;
+
+   /**
+    * Set argument to vector data in contiguous array (local to processor).
+    */
+   virtual void
+   getDataArray(
+      TYPE** array) = 0;
+
+   /**
+    * Return total length of vector.
+    */
+   virtual int
+   getDataSize() const = 0;
+
+   /**
+    * Return length of vector (local to processor).
+    */
+   virtual int
+   getLocalDataSize() const = 0;
+
+   /*!
+    * Restore pointer to vector data in contiguous array (local to
+    * processor).
+    */
+   virtual void
+   restoreDataArray(
+      TYPE** array) = 0;
+
+private:
+   /*
+    * PETSc vector object corresponding to this
+    * PETScAbstractVectorReal object.
+    */
+   Vec d_petsc_vector;
+
+   bool d_vector_created_via_duplicate;
+
+   MPI_Comm d_comm;
+
+   /*
+    * Static member functions for linkage with PETSc solver package
+    * routines.  Essentially, these functions match those in the
+    * PETSc _VecOps structure.  Note that these operations are
+    * actually implemented in a subclass of this base class using the
+    * virtual function mechanism.
+    */
+
+   /*
+    * Creates a new vector of the same type as an existing vector.
+    */
+   static PetscErrorCode
+   vecDuplicate(
+      Vec v,
+      Vec* newv);
+
+   /*
+    * Creates an array of vectors of the same type as an existing vector.
+    */
+   static PetscErrorCode
+   vecDuplicateVecs(
+      Vec v,
+      int n,
+      Vec** varr_new);
+
+   /*
+    * Destroys an array of vectors.
+    */
+   static PetscErrorCode
+   vecDestroyVecs(
+      Vec* v_arr,
+      PetscInt n);
+
+   /*
+    * Computes the vector dot product.
+    */
+   static PetscErrorCode
+   vecDot(
+      Vec x,
+      Vec y,
+      TYPE* val);
+
+   /*
+    * Computes vector multiple dot products.
+    */
+   static PetscErrorCode
+   vecMDot(
+      Vec x,
+      PetscInt nv,
+      const Vec* y,
+      TYPE* val);
+
+   /*
+    * Computes the vector norm.
+    *
+    * Note that PETSc defines the following enumerated type (in
+    * petscvec.h):
+    *
+    * typedef enum {NORM_1=0,NORM_2=1,NORM_FROBENIUS=2,NORM_INFINITY=3,NORM_1_AND_2=4} NormType;
+    *
+    * If norm type is not NORM_1, NORM_2, NORM_INFINITY, or
+    * NORM_1_AND_2, an unrecoverable assertion will be thrown and
+    * program will abort.
+    */
+   static PetscErrorCode
+   vecNorm(
+      Vec x,
+      NormType type,
+      TYPE* val);
+
+   /*
+    * Computes an indefinite vector dot product.  That is, this
+    * routine does NOT use the complex conjugate.
+    */
+   static PetscErrorCode
+   vecTDot(
+      Vec x,
+      Vec y,
+      TYPE* val);
+
+   /*
+    * Computes indefinite vector multiple dot products.  That is, it
+    * does NOT use the complex conjugate.
+    */
+   static PetscErrorCode
+   vecMTDot(
+      Vec x,
+      PetscInt nv,
+      const Vec* y,
+      TYPE* val);
+
+   /*
+    * Scales a vector.
+    */
+   static PetscErrorCode
+   vecScale(
+      Vec x,
+      TYPE alpha);
+
+   /*
+    * Copies a vector.
+    */
+   static PetscErrorCode
+   vecCopy(
+      Vec x,
+      Vec y);
+
+   /*
+    *  Sets all components of a vector to a single scalar value.
+    */
+   static PetscErrorCode
+   vecSet(
+      Vec x,
+      TYPE alpha);
+
+   /*
+    * Swaps the vectors x and y.
+    */
+   static PetscErrorCode
+   vecSwap(
+      Vec x,
+      Vec y);
+
+   /*
+    * Computes y = alpha x + y.
+    */
+   static PetscErrorCode
+   vecAXPY(
+      Vec y,
+      TYPE alpha,
+      Vec x);
+
+   /*
+    * Computes y = alpha x + beta y.
+    */
+   static PetscErrorCode
+   vecAXPBY(
+      Vec y,
+      TYPE alpha,
+      TYPE beta,
+      Vec x);
+
+   /*
+    * Computes y = y + sum alpha[j] x[j].
+    */
+   static PetscErrorCode
+   vecMAXPY(
+      Vec y,
+      PetscInt nv,
+      const TYPE* alpha,
+      Vec* x);
+
+   /*
+    * Computes y = x + alpha y.
+    */
+   static PetscErrorCode
+   vecAYPX(
+      Vec y,
+      TYPE alpha,
+      Vec x);
+
+   /*
+    * Computes w = alpha x + y.
+    */
+   static PetscErrorCode
+   vecWAXPY(
+      Vec w,
+      TYPE alpha,
+      Vec x,
+      Vec y);
+
+   /*
+    * Computes the component-wise multiplication w = x*y.
+    */
+   static PetscErrorCode
+   vecPointwiseMult(
+      Vec w,
+      Vec x,
+      Vec y);
+
+   /*
+    * Computes the component-wise division w = x/y.
+    */
+   static PetscErrorCode
+   vecPointwiseDivide(
+      Vec w,
+      Vec x,
+      Vec y);
+
+   /*
+    * Returns a pointer to a contiguous array that contains this
+    * processor's portion of the vector data.
+    */
+   static PetscErrorCode
+   vecGetArray(
+      Vec x,
+      TYPE** a);
+
+   /*
+    * Returns the global number of elements of the vector.
+    */
+   static PetscErrorCode
+   vecGetSize(
+      Vec x,
+      PetscInt* size);
+
+   /*
+    * Returns the number of elements of the vector stored in local
+    * memory.
+    */
+   static PetscErrorCode
+   vecGetLocalSize(
+      Vec x,
+      PetscInt* size);
+
+   /*
+    * Restores a vector after VecGetArray() has been called.
+    */
+   static PetscErrorCode
+   vecRestoreArray(
+      Vec x,
+      TYPE** a);
+
+   /*
+    * Determines the maximum vector component and its location.
+    */
+   static PetscErrorCode
+   vecMax(
+      Vec x,
+      PetscInt* p,
+      TYPE* val);
+
+   /*
+    * Determines the minimum vector component and its location.
+    */
+   static PetscErrorCode
+   vecMin(
+      Vec x,
+      PetscInt* p,
+      TYPE* val);
+
+   /*
+    * Sets all components of a vector to random numbers.
+    */
+   static PetscErrorCode
+   vecSetRandom(
+      Vec x,
+      PetscRandom rctx);
+
+   /*
+    * Destroys a vector.
+    */
+   static PetscErrorCode
+   vecDestroy(
+      Vec v);
+
+   /*
+    * Views a vector object.
+    */
+   static PetscErrorCode
+   vecView(
+      Vec v,
+      PetscViewer viewer);
+
+   /*
+    * Computes the vector dot product.
+    */
+   static PetscErrorCode
+   vecDot_local(
+      Vec x,
+      Vec y,
+      TYPE* val);
+
+   /*
+    * Computes an indefinite vector dot product.  That is, this
+    * routine does NOT use the complex conjugate.
+    */
+   static PetscErrorCode
+   vecTDot_local(
+      Vec x,
+      Vec y,
+      TYPE* val);
+
+   /*
+    * Computes the vector norm.
+    *
+    * Note that PETSc defines the following enumerated type (in
+    * petscvec.h):
+    *
+    * typedef enum {NORM_1=0,NORM_2=1,NORM_FROBENIUS=2,NORM_INFINITY=3,NORM_1_AND_2=4} NormType;
+    *
+    * If norm type is not NORM_1, NORM_2, NORM_INFINITY, or
+    * NORM_1_AND_2, an unrecoverable assertion will be thrown and
+    * program will abort.
+    */
+   static PetscErrorCode
+   vecNorm_local(
+      Vec x,
+      NormType type,
+      TYPE* val);
+
+   /*
+    * Computes vector multiple dot products.
+    */
+   static PetscErrorCode
+   vecMDot_local(
+      Vec x,
+      PetscInt nv,
+      const Vec* y,
+      TYPE* val);
+
+   /*
+    * Computes indefinite vector multiple dot products.  That is, it
+    * does NOT use the complex conjugate.
+    */
+   static PetscErrorCode
+   vecMTDot_local(
+      Vec x,
+      PetscInt nv,
+      const Vec* y,
+      TYPE* val);
+
+   /*
+    * Computes the maximum of the component-wise division max = max_i
+    * abs(x_i/y_i).
+    */
+   static PetscErrorCode
+   vecMaxPointwiseDivide(
+      Vec x,
+      Vec y,
+      TYPE* max);
+
+   ///
+   /// The remaining functions are not implemented and will result in
+   /// an unrecoverable assertion being thrown and program abort if
+   /// called.
+   ///
+
+   static PetscErrorCode
+   vecSetValues(
+      Vec x,
+      PetscInt ni,
+      const PetscInt* ix,
+      const TYPE* y,
+      InsertMode iora);
+
+   static PetscErrorCode
+   vecAssemblyBegin(
+      Vec vec);
+
+   static PetscErrorCode
+   vecAssemblyEnd(
+      Vec vec);
+
+   static PetscErrorCode
+   vecSetOption(
+      Vec x,
+      VecOption op);
+
+   static PetscErrorCode
+   vecSetValuesBlocked(
+      Vec x,
+      PetscInt ni,
+      const PetscInt* ix,
+      const TYPE* y,
+      InsertMode iora);
+
+   static PetscErrorCode
+   vecPlaceArray(
+      Vec vec,
+      const TYPE* array);
+
+   static PetscErrorCode
+   vecReplaceArray(
+      Vec vec,
+      const TYPE* array);
+
+   static PetscErrorCode
+   vecReciprocal(
+      Vec vec);
+
+   static PetscErrorCode
+   vecViewNative(
+      Vec v,
+      PetscViewer viewer);
+
+   static PetscErrorCode
+   vecConjugate(
+      Vec x);
+
+   static PetscErrorCode
+   vecSetLocalToGlobalMapping(
+      Vec x,
+      ISLocalToGlobalMapping mapping);
+
+   static PetscErrorCode
+   vecSetValuesLocal(
+      Vec x,
+      PetscInt ni,
+      const PetscInt* ix,
+      const TYPE* y,
+      InsertMode iora);
+
+   static PetscErrorCode
+   vecResetArray(
+      Vec vec);
+
+   static PetscErrorCode
+   vecSetFromOptions(
+      Vec vec);
+
+   static PetscErrorCode
+   vecLoad(
+      PetscViewer viewer,
+      VecType outtype,
+      Vec* newvec);
+
+   static PetscErrorCode
+   vecPointwiseMax(
+      Vec w,
+      Vec x,
+      Vec y);
+
+   static PetscErrorCode
+   vecPointwiseMaxAbs(
+      Vec w,
+      Vec x,
+      Vec y);
+
+   static PetscErrorCode
+   vecPointwiseMin(
+      Vec w,
+      Vec x,
+      Vec y);
+
+   static PetscErrorCode
+   vecGetValues(
+      Vec x,
+      PetscInt ni,
+      const PetscInt* ix,
+      PetscScalar* y);
+};
+
+}
+}
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/solv/PETScAbstractVectorReal.C"
+#endif
+
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/PETSc_SAMRAIVectorReal.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/PETSc_SAMRAIVectorReal.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,178 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   "Glue code" between PETSc vector interface and SAMRAI vectors. 
+ *
+ ************************************************************************/
+
+#ifndef included_solv_PETSc_SAMRAIVectorReal_C
+#define included_solv_PETSc_SAMRAIVectorReal_C
+
+#include "SAMRAI/solv/PETSc_SAMRAIVectorReal.h"
+
+#ifdef HAVE_PETSC
+
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/IOStream.h"
+#include "SAMRAI/tbox/PIO.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/solv/PETSc_SAMRAIVectorReal.I"
+#endif
+
+#include <cstdlib>
+
+namespace SAMRAI {
+namespace solv {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Static public member functions.                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+Vec
+PETSc_SAMRAIVectorReal<TYPE>::createPETScVector(
+   SAMRAI::tbox::Pointer<SAMRAI::solv::SAMRAIVectorReal<TYPE> > samrai_vec,
+   MPI_Comm comm)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!samrai_vec.isNull());
+#endif
+
+   static const bool vector_created_via_duplicate = false;
+
+   PETSc_SAMRAIVectorReal<TYPE>* psv = new PETSc_SAMRAIVectorReal<TYPE>(
+         samrai_vec, vector_created_via_duplicate, comm);
+
+   return psv->getPETScVector();
+}
+
+template<class TYPE>
+void
+PETSc_SAMRAIVectorReal<TYPE>::destroyPETScVector(
+   Vec petsc_vec)
+{
+   if (petsc_vec != static_cast<Vec>(NULL)) {
+      PETSc_SAMRAIVectorReal<TYPE>* psv =
+         static_cast<PETSc_SAMRAIVectorReal<TYPE> *>(petsc_vec->data);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(psv != NULL);
+#endif
+
+      delete psv;
+   }
+}
+
+template<class TYPE>
+SAMRAI::tbox::Pointer<SAMRAI::solv::SAMRAIVectorReal<TYPE> >
+PETSc_SAMRAIVectorReal<TYPE>::getSAMRAIVector(
+   Vec petsc_vec)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(petsc_vec != static_cast<Vec>(NULL));
+#endif
+
+   PETSc_SAMRAIVectorReal<TYPE>* psv =
+      static_cast<PETSc_SAMRAIVectorReal<TYPE> *>(petsc_vec->data);
+
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+   TBOX_ASSERT(psv != NULL);
+#endif
+
+   return psv->d_samrai_vector;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Protected constructor and destructor for PETSc_SAMRAIVectorReal.*
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+PETSc_SAMRAIVectorReal<TYPE>::PETSc_SAMRAIVectorReal(
+   SAMRAI::tbox::Pointer<SAMRAI::solv::SAMRAIVectorReal<TYPE> > samrai_vector,
+   bool vector_created_via_duplicate,
+   MPI_Comm comm):
+   PETScAbstractVectorReal<TYPE>(vector_created_via_duplicate, comm),
+   d_samrai_vector(samrai_vector),
+   d_vector_created_via_duplicate(vector_created_via_duplicate)
+{
+   // intentionally blank
+}
+
+template<class TYPE>
+PETSc_SAMRAIVectorReal<TYPE>::~PETSc_SAMRAIVectorReal()
+{
+   // intentionally blank
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Other member functions						*
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+PETScAbstractVectorReal<TYPE> *
+PETSc_SAMRAIVectorReal<TYPE>::makeNewVector()
+{
+
+   Vec petsc_vec = PETSc_SAMRAIVectorReal<TYPE>::getPETScVector();
+   MPI_Comm comm;
+   int ierr = PetscObjectGetComm(reinterpret_cast<PetscObject>(petsc_vec),
+         &comm);
+   PETSC_SAMRAI_ERROR(ierr);
+
+   tbox::Pointer<SAMRAIVectorReal<TYPE> > sam_vec =
+      d_samrai_vector->cloneVector(d_samrai_vector->getName());
+   sam_vec->allocateVectorData();
+   const bool vector_created_via_duplicate = true;
+   PETSc_SAMRAIVectorReal<TYPE>* out_vec =
+      new PETSc_SAMRAIVectorReal<TYPE>(sam_vec,
+                                       vector_created_via_duplicate,
+                                       comm);
+   return out_vec;
+}
+
+template<class TYPE>
+void PETSc_SAMRAIVectorReal<TYPE>::freeVector()
+{
+
+   if (d_vector_created_via_duplicate) {
+      d_samrai_vector->freeVectorComponents();
+      d_samrai_vector.setNull();
+      Vec petsc_vec = this->getPETScVector();
+
+#ifdef DEBUG_CHECK_TBOX_ASSERTIONS
+      TBOX_ASSERT(petsc_vec != static_cast<Vec>(NULL));
+#endif
+      delete ((PETSc_SAMRAIVectorReal<TYPE> *)(petsc_vec->data));
+   }
+}
+
+template<class TYPE>
+void PETSc_SAMRAIVectorReal<TYPE>::viewVector() const
+{
+   std::ostream& s = d_samrai_vector->getOutputStream();
+   s << "\nPrinting PETSc_SAMRAIVectorReal..."
+     << "\nSAMRAI vector structure and data: " << std::endl;
+   d_samrai_vector->print(s);
+   s << "\n" << std::endl;
+}
+
+}
+}
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/PETSc_SAMRAIVectorReal.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/PETSc_SAMRAIVectorReal.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,246 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   "Glue code" between PETSc vector interface and SAMRAI vectors. 
+ *
+ ************************************************************************/
+
+#define C_PSVEC_CAST(x) \
+   (dynamic_cast<const PETSc_SAMRAIVectorReal < \
+                 TYPE> * > (x))
+
+namespace SAMRAI {
+namespace solv {
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+double
+PETSc_SAMRAIVectorReal<TYPE>::dotWith(
+   const PETScAbstractVectorReal<TYPE>* y,
+   bool local_only) const
+{
+   return d_samrai_vector->dot(C_PSVEC_CAST(y)->d_samrai_vector, local_only);
+} // dotWith
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+double
+PETSc_SAMRAIVectorReal<TYPE>::TdotWith(
+   const PETScAbstractVectorReal<TYPE>* y,
+   bool local_only) const
+{
+   return d_samrai_vector->dot(C_PSVEC_CAST(y)->d_samrai_vector, local_only);
+} // TdotWith
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+double
+PETSc_SAMRAIVectorReal<TYPE>::L1Norm(
+   bool local_only) const
+{
+   return d_samrai_vector->L1Norm(local_only);
+} // L1Norm
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+double
+PETSc_SAMRAIVectorReal<TYPE>::L2Norm(
+   bool local_only) const
+{
+   return d_samrai_vector->L2Norm(local_only);
+} // L2Norm
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+double
+PETSc_SAMRAIVectorReal<TYPE>::maxNorm(
+   bool local_only) const
+{
+   return d_samrai_vector->maxNorm(local_only);
+} // maxNorm
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void
+PETSc_SAMRAIVectorReal<TYPE>::scaleVector(
+   const TYPE alpha)
+{
+   d_samrai_vector->scale(alpha, d_samrai_vector);
+} // scaleVector
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void
+PETSc_SAMRAIVectorReal<TYPE>::copyVector(
+   const PETScAbstractVectorReal<TYPE>* v_src)
+{
+   d_samrai_vector->copyVector(C_PSVEC_CAST(v_src)->d_samrai_vector);
+} // copyVector
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void
+PETSc_SAMRAIVectorReal<TYPE>::setToScalar(
+   const TYPE alpha)
+{
+   d_samrai_vector->setToScalar(alpha);
+} // setToScalar
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void
+PETSc_SAMRAIVectorReal<TYPE>::swapWith(
+   PETScAbstractVectorReal<TYPE>* v_other)
+{
+   d_samrai_vector->swapVectors(C_PSVEC_CAST(v_other)->d_samrai_vector);
+} // swapWith
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void
+PETSc_SAMRAIVectorReal<TYPE>::setAXPY(
+   const TYPE alpha,
+   const PETScAbstractVectorReal<TYPE>* x)
+{
+   d_samrai_vector->axpy(alpha, C_PSVEC_CAST(
+         x)->d_samrai_vector, d_samrai_vector);
+} // setAXPY
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void
+PETSc_SAMRAIVectorReal<TYPE>::setAXPBY(
+   const TYPE alpha,
+   const PETScAbstractVectorReal<TYPE>* x,
+   const TYPE beta)
+{
+   d_samrai_vector->linearSum(alpha, C_PSVEC_CAST(
+         x)->d_samrai_vector, beta, d_samrai_vector);
+} // setAXPBY
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void
+PETSc_SAMRAIVectorReal<TYPE>::setWAXPY(
+   const TYPE alpha,
+   const PETScAbstractVectorReal<TYPE>* x,
+   const PETScAbstractVectorReal<TYPE>* y)
+{
+   d_samrai_vector->axpy(alpha, C_PSVEC_CAST(x)->d_samrai_vector,
+      C_PSVEC_CAST(y)->d_samrai_vector);
+} // setWAXPY
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void
+PETSc_SAMRAIVectorReal<TYPE>::pointwiseMultiply(
+   const PETScAbstractVectorReal<TYPE>* x,
+   const PETScAbstractVectorReal<TYPE>* y)
+{
+   d_samrai_vector->multiply(C_PSVEC_CAST(x)->d_samrai_vector, C_PSVEC_CAST(
+         y)->d_samrai_vector);
+} // pointwiseMultiply
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void
+PETSc_SAMRAIVectorReal<TYPE>::pointwiseDivide(
+   const PETScAbstractVectorReal<TYPE>* x,
+   const PETScAbstractVectorReal<TYPE>* y)
+{
+   d_samrai_vector->divide(C_PSVEC_CAST(x)->d_samrai_vector, C_PSVEC_CAST(
+         y)->d_samrai_vector);
+} // pointwiseDivide
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+double
+PETSc_SAMRAIVectorReal<TYPE>::maxPointwiseDivide(
+   const PETScAbstractVectorReal<TYPE>* y)
+{
+   return d_samrai_vector->maxPointwiseDivide(C_PSVEC_CAST(y)->d_samrai_vector);
+} // maxPointwiseDivide
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void
+PETSc_SAMRAIVectorReal<TYPE>::vecMax(
+   int& i,
+   TYPE& max) const
+{
+   static const bool interior_only = true;
+   max = d_samrai_vector->max(interior_only);
+   // Note: This is a bogus index value!
+   //       Hopefully, PETSc doesn't use it for anything.
+   i = 0;
+} // vecMax
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void
+PETSc_SAMRAIVectorReal<TYPE>::vecMin(
+   int& i,
+   TYPE& min) const
+{
+   static const bool interior_only = true;
+   min = d_samrai_vector->min(interior_only);
+   // Note: This is a bogus index value!
+   //       Hopefully, PETSc doesn't use it for anything.
+   i = 0;
+} // vecMin
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void
+PETSc_SAMRAIVectorReal<TYPE>::setRandomValues(
+   const TYPE width,
+   const TYPE low)
+{
+   d_samrai_vector->setRandomValues(width, low);
+} // setRandomValues
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void
+PETSc_SAMRAIVectorReal<TYPE>::getDataArray(
+   TYPE** array)
+{
+   *array = NULL;
+} // getDataArray
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void
+PETSc_SAMRAIVectorReal<TYPE>::restoreDataArray(
+   TYPE** array)
+{
+   *array = NULL;
+} // restoreDataArray
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int
+PETSc_SAMRAIVectorReal<TYPE>::getDataSize() const
+{
+   // Note: This is a bogus value!
+   //       But, PETSc requires some value to be returned.
+   //       Hopefully, this will not cause problems.
+   return 0;
+} // getDataSize
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int
+PETSc_SAMRAIVectorReal<TYPE>::getLocalDataSize() const
+{
+   // Note: This is a bogus value!
+   //       But, PETSc requires some value to be returned.
+   //       Hopefully, this will not cause problems.
+   return 0;
+} // getLocalDataSize
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/PETSc_SAMRAIVectorReal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/PETSc_SAMRAIVectorReal.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,387 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   "Glue code" between PETSc vector interface and SAMRAI vectors. 
+ *
+ ************************************************************************/
+
+#ifndef included_solv_PETSc_SAMRAIVectorReal
+#define included_solv_PETSc_SAMRAIVectorReal
+
+#include "SAMRAI/SAMRAI_config.h"
+
+/*
+ ************************************************************************
+ *  THIS CLASS WILL BE UNDEFINED IF THE LIBRARY IS BUILT WITHOUT PETSC
+ ************************************************************************
+ */
+#ifdef HAVE_PETSC
+
+#ifdef REQUIRES_CMATH
+#include <cmath>
+#endif
+
+#ifndef included_petsc_vec
+#define included_petsc_vec
+#ifdef MPICH_SKIP_MPICXX
+#undef MPICH_SKIP_MPICXX
+#endif
+#include "petscvec.h"
+#endif
+
+#include "SAMRAI/solv/PETScAbstractVectorReal.h"
+#include "SAMRAI/solv/SAMRAIVectorReal.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace solv {
+
+/**
+ * Class PETSc_SAMRAIVectorReal wraps a real-valued SAMRAI vector
+ * (see SAMRAIVectorReal class) object so that it may be used with
+ * the PETSc solver package.  This class is derived from the abstract base
+ * class PETScAbstractVectorReal, the <TT>C++</TT> interface for
+ * PETSc vectors where the underlying data is float or double.  It also
+ * maintains a pointer to a SAMRAI vector object.  A SAMRAI vector is defined
+ * as a collection of patch data components and associated operations living
+ * on some subset of levels in a structured AMR mesh hierarchy.
+ *
+ * Observe that there are only three public member functions in this class
+ * They are used to create and destroy PETSc vector objects (i.e., "Vec"s),
+ * and to obtain the SAMRAI vector associated with the PETSc vector.
+ * In particular, note that the constructor and destructor of this class
+ * are protected members.  The construction and destruction of instances of
+ * this class may occur only through the static member functions that
+ * create and destroy PETSc vector objects.
+ *
+ * Finally, we remark that PETSc allows vectors with complex-valued entries.
+ * This class and the class VectorReal assume real-values vectors
+ * (i.e., data of type <TT>double</TT> or <TT>float</TT>.  The class
+ * PETSc_SAMRAIVectorComplex must be used for complex data.
+ *
+ * @see solv::PETScAbstractVectorReal
+ * @see solv::SAMRAIVectorReal
+ */
+
+template<class TYPE>
+class PETSc_SAMRAIVectorReal:public PETScAbstractVectorReal<TYPE>
+{
+public:
+   /**
+    * Create and return a new PETSc vector object.  The SAMRAI vector
+    * object is wrapped so that it may be manipulated through the PETSc
+    * vector structure in the PETScAbstractVectorReal base class.  It is
+    * important to note that this function does not allocate storage for
+    * the vector data.  Data must be allocated through the SAMRAI vector
+    * object directly.  For output of the data through PETSc "ViewVec" calls,
+    * the output stream to which the SAMRAI vector object writes will be used.
+    */
+   static Vec
+   createPETScVector(
+      tbox::Pointer<SAMRAIVectorReal<TYPE> > samrai_vec,
+      MPI_Comm comm = PETSC_COMM_SELF);
+
+   /**
+    * Destroy a given PETSc vector object. It is important to note that
+    * this function does not deallocate storage for the vector data.
+    * Vector data must be deallocated through the SAMRAI vector object.
+    */
+   static void
+   destroyPETScVector(
+      Vec petsc_vec);
+
+   /**
+    * Return pointer to the SAMRAI vector object associated with the
+    * given PETSc vector.
+    */
+   static tbox::Pointer<SAMRAIVectorReal<TYPE> >
+   getSAMRAIVector(
+      Vec petsc_vec);
+
+protected:
+   /*
+    * Constructor for PETSc_SAMRAIVectorReal is protected so that an
+    * object of this class cannot be constructed without calling the static
+    * member function createPETScVector, which is used to construct a PETSc
+    * vector and associated "wrapper" that allows the PETSc vector to
+    * manipulate the SAMRAIVectorReal data.
+    *
+    * The boolean argument is used to control whether the SAMRAI vector is
+    * destroyed when the associated PETSc vector is destroyed.  This should
+    * happen if the PETSc vector is created within PETSc via a duplicate
+    * (i.e., clone) operation, but not otherwise.
+    */
+   PETSc_SAMRAIVectorReal(
+      tbox::Pointer<SAMRAIVectorReal<TYPE> > samrai_vector,
+      bool vector_created_via_duplicate,
+      MPI_Comm comm);
+
+   /*
+    * Virtual destructor for PETSc_SAMRAIVectorReal is protected so that
+    * an object of this class cannot be destroyed without calling the static
+    * member function destroyPETScVector, which is used to destroy the PETSc
+    * vector and associated "wrapper".
+    */
+   virtual ~PETSc_SAMRAIVectorReal<TYPE>();
+
+private:
+   /*
+    * Return SAMRAI vector owned by this SAMRAI_PETScVector object.
+    */
+   tbox::Pointer<SAMRAIVectorReal<TYPE> >
+   getSAMRAIVector();
+
+   /*
+    * Clone this vector structure and allocate storage for the vector
+    * data.  Then, return a pointer to the new vector instance.  This
+    * function is distinct from the vector constructor since it is called
+    * from within PETSc to allocate new vectors.
+    */
+   PETScAbstractVectorReal<TYPE> *
+   makeNewVector();
+
+   /*
+    * Destroy vector structure and its storage. This function is
+    * distinct from the destructor since it will be called from
+    * within PETSc to deallocate vectors.
+    */
+   virtual void
+   freeVector();
+
+   /*
+    * Print all vector data as implemented in SAMRAI vector class.
+    */
+   virtual void
+   viewVector() const;
+
+   /*
+    * Return \f$(x,y) = \sum_i (x_i * conj(y_i)), where \f$x\f$ is
+    * this vector.  Note that we assume real vectors; so this is the
+    * same as TdotWith().  If local_only is true, the operation is
+    * performed only on the local parts.
+    */
+   virtual double
+   dotWith(
+      const PETScAbstractVectorReal<TYPE>* y,
+      bool local_only = false) const;
+
+   /*
+    * Return \f$(x,y) = \sum_i (x_i * (y_i)), where \f$x\f$ is this
+    * vector.  Note that we assume real vectors; so this is the same
+    * as dotWith().  If local_only is true, the operation is
+    * performed only on the local parts.
+    */
+   virtual double
+   TdotWith(
+      const PETScAbstractVectorReal<TYPE>* y,
+      bool local_only = false) const;
+
+   /*
+    * Return \f$L_1\f$-norm of this vector.
+    *
+    * \param local_only Flag to get result for local data only.
+    */
+   virtual double
+   L1Norm(
+      bool local_only = false) const;
+
+   /*
+    * Return \f$L_2\f$-norm of this vector.
+    *
+    * \param local_only Flag to get result for local data only.
+    */
+   virtual double
+   L2Norm(
+      bool local_only = false) const;
+
+   /*
+    * Return \f$L_{\infty}\f$-norm of this vector.
+    *
+    * \param local_only Flag to get result for local data only.
+    */
+   virtual double
+   maxNorm(
+      bool local_only = false) const;
+
+   /*
+    * Multiply each entry of this vector by given scalar.
+    */
+   virtual void
+   scaleVector(
+      const TYPE alpha);
+
+   /*
+    * Copy source vector data to this vector.
+    */
+   virtual void
+   copyVector(
+      const PETScAbstractVectorReal<TYPE>* v_src);
+
+   /*
+    * Set each entry of this vector to given scalar.
+    */
+   virtual void
+   setToScalar(
+      const TYPE alpha);
+
+   /*
+    * Swap data between this vector and argument vector.
+    */
+   virtual void
+   swapWith(
+      PETScAbstractVectorReal<TYPE>* v_other);
+
+   /*
+    * Set \f$y = \alpha x + y\f$, where \f$y\f$ is this vector.
+    */
+   virtual void
+   setAXPY(
+      const TYPE alpha,
+      const PETScAbstractVectorReal<TYPE>* x);
+
+   /*
+    * Set \f$y = \alpha x + \beta y\f$, where \f$y\f$ is this vector.
+    */
+   virtual void
+   setAXPBY(
+      const TYPE alpha,
+      const PETScAbstractVectorReal<TYPE>* x,
+      const TYPE beta);
+
+   /*
+    * Set \f$w = \alpha x + y\f$, where \f$w\f$ is this vector.
+    */
+   virtual void
+   setWAXPY(
+      const TYPE alpha,
+      const PETScAbstractVectorReal<TYPE>* x,
+      const PETScAbstractVectorReal<TYPE>* y);
+
+   /*
+    * Set \f$w_i = x_i y_i\f$, where \f$w_i\f$ is \f$i\f$-th entry of
+    * this vector.
+    */
+   virtual void
+   pointwiseMultiply(
+      const PETScAbstractVectorReal<TYPE>* x,
+      const PETScAbstractVectorReal<TYPE>* y);
+
+   /*
+    * Set \f$w_i = x_i / y_i\f$, where \f$w_i\f$ is \f$i\f$-th entry
+    * of this vector.
+    */
+   virtual void
+   pointwiseDivide(
+      const PETScAbstractVectorReal<TYPE>* x,
+      const PETScAbstractVectorReal<TYPE>* y);
+
+   /*
+    * Compute \f$ max_i = abs(w_i / y_i) \f$ where \f$ y_i \neq 0
+    * \f$, and \f$ max_i = abs(w_i) \f$ where \f$ y_i = 0 \f$, where
+    * \f$ w_i \f$ is \f$ i \f$ -th entry of this vector.
+    */
+   virtual double
+   maxPointwiseDivide(
+      const PETScAbstractVectorReal<TYPE>* y);
+
+   /*
+    * Find maximum vector entry and vector index at which maximum
+    * occurs.  Note that this function sets the index to a bogus
+    * value since the it is not clear how to define the vector index
+    * for the the SAMRAI vector class.
+    */
+   virtual void
+   vecMax(
+      int& i,
+      TYPE& max) const;
+
+   /*
+    * Find minimum vector entry and vector index at which minimum
+    * occurs.  Note that this function sets the index to a bogus
+    * value since the it is not clear how to define the vector index
+    * for the the SAMRAI vector class.
+    */
+   virtual void
+   vecMin(
+      int& i,
+      TYPE& min) const;
+
+   /*
+    * Set each entry of this vector to random value.  To be
+    * consistent with PETSc, we define the random value to be
+    * width*drand48()+low.
+    */
+   virtual void
+   setRandomValues(
+      const TYPE width,
+      const TYPE low);
+
+   /*
+    * Set argument to pointer to vector data in contiguous array
+    * (local to processor).
+    *
+    * \note This function returns a null pointer.  Hopefully, this
+    * will not cause problems.
+    */
+   virtual void
+   getDataArray(
+      TYPE** array);
+
+   /*
+    * Restore pointer to vector data in contiguous array (local to
+    * processor).
+    */
+   virtual void
+   restoreDataArray(
+      TYPE** array);
+
+   /*
+    * Return total length of vector.
+    *
+    * \note This function returns zero since PETSc requires a valid
+    * integer return value.  However, the manner in which we are
+    * using PETSc currently does not require the value to be used
+    * within PETSc.  Hopefully, this will not cause problems.
+    */
+   virtual int
+   getDataSize() const;
+
+   /*
+    * Return length of vector (local to processor).
+    *
+    * \note This function returns zero since PETSc requires a valid
+    * integer return value.  However, the manner in which we are
+    * using PETSc currently does not require the value to be used
+    * within PETSc.  Hopefully, this will not cause problems.
+    */
+   virtual int
+   getLocalDataSize() const;
+
+   /*
+    * Vector data is maintained in SAMRAI vector structure.
+    */
+   tbox::Pointer<SAMRAIVectorReal<TYPE> > d_samrai_vector;
+
+   /*
+    * Boolean flag to control whether SAMRAI vector is destroyed when
+    * the associated PETSc vector is destroyed.
+    */
+   bool d_vector_created_via_duplicate;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/solv/PETSc_SAMRAIVectorReal.I"
+#endif
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/solv/PETSc_SAMRAIVectorReal.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/PoissonSpecifications.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/PoissonSpecifications.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,40 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Specifications for the scalar Poisson equation 
+ *
+ ************************************************************************/
+#include "SAMRAI/solv/PoissonSpecifications.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/solv/PoissonSpecifications.I"
+#endif
+
+namespace SAMRAI {
+namespace solv {
+
+void PoissonSpecifications::printClassData(
+   std::ostream& stream) const
+{
+   stream << "PoissonSpecifications " << d_object_name << "\n"
+          << "   D is ";
+   if (d_D_id != -1) {
+      stream << "variable with patch id " << d_D_id << "\n";
+   } else {
+      stream << "constant with value " << d_D_constant << "\n";
+   }
+   stream << "   C is ";
+   if (d_C_zero) {
+      stream << "zero\n";
+   } else if (d_C_id != -1) {
+      stream << "variable with patch id " << d_C_id << "\n";
+   } else {
+      stream << "constant with value " << d_C_constant << "\n";
+   }
+}
+
+} // namespace solv
+} // namespace SAMRAI
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/PoissonSpecifications.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/PoissonSpecifications.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,259 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Specifications for the scalar Poisson equation 
+ *
+ ************************************************************************/
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace solv {
+
+/*
+ *******************************************************************
+ * Default constructor                                             *
+ *******************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+PoissonSpecifications::PoissonSpecifications(
+   const std::string& object_name):d_object_name(object_name),
+   d_D_id(-1),
+   d_D_constant(1.0),
+   d_C_zero(true),
+   d_C_id(-1),
+   d_C_constant(0.0) {
+}
+
+/*
+ *******************************************************************
+ * Copy constructor                                                *
+ *******************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+PoissonSpecifications::PoissonSpecifications(
+   const std::string& object_name,
+   const PoissonSpecifications& r):d_object_name(object_name),
+   d_D_id(r.d_D_id),
+   d_D_constant(r.d_D_constant),
+   d_C_zero(r.d_C_zero),
+   d_C_id(r.d_C_id),
+   d_C_constant(r.d_C_constant) {
+}
+
+/*
+ *******************************************************************
+ * Destructor (does nothing).                                      *
+ *******************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+PoissonSpecifications::~PoissonSpecifications() {
+}
+
+/*
+ *******************************************************************
+ * Assignment operator                                             *
+ *******************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+const PoissonSpecifications
+& PoissonSpecifications::operator = (
+   const PoissonSpecifications& r) {
+   d_D_id = r.d_D_id;
+   d_D_constant = r.d_D_constant;
+   d_C_zero = r.d_C_zero;
+   d_C_id = r.d_C_id;
+   d_C_constant = r.d_C_constant;
+   return *this;
+}
+
+/*
+ *******************************************************************
+ * Set the patch data index for variable D.                        *
+ *******************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+void PoissonSpecifications::setDPatchDataId(
+   int id) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (id < 0) {
+      TBOX_ERROR(d_object_name << ": Invalid patch data id.\n");
+   }
+#endif
+   d_D_id = id;
+   d_D_constant = 0.0;
+}
+
+/*
+ *******************************************************************
+ * Set the constant value variable D.                              *
+ *******************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+void PoissonSpecifications::setDConstant(
+   double constant) {
+   d_D_id = -1;
+   d_D_constant = constant;
+}
+
+/*
+ *******************************************************************
+ * Whether D is variable.                                          *
+ *******************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+bool PoissonSpecifications::dIsVariable() const {
+   return d_D_id != -1;
+}
+
+/*
+ *******************************************************************
+ * Whether D is constant.                                          *
+ *******************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+bool PoissonSpecifications::dIsConstant() const {
+   return d_D_id == -1;
+}
+
+/*
+ *******************************************************************
+ * Get the patch data index for variable D.                        *
+ *******************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+int PoissonSpecifications::getDPatchDataId() const {
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_D_id == -1) {
+      TBOX_ERROR(d_object_name << ": D not prepresented by a patch data.\n");
+   }
+#endif
+   return d_D_id;
+}
+
+/*
+ *******************************************************************
+ * Get the constant D value.                                       *
+ *******************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+double PoissonSpecifications::getDConstant() const {
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_D_id != -1) {
+      TBOX_ERROR(d_object_name << ": D not prepresented by a constant.\n");
+   }
+#endif
+   return d_D_constant;
+}
+
+/*
+ *******************************************************************
+ * Set the constant value variable C.                              *
+ *******************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+void PoissonSpecifications::setCPatchDataId(
+   int id) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (id < 0) {
+      TBOX_ERROR(d_object_name << ": Invalid patch data id.\n");
+   }
+#endif
+   d_C_zero = false;
+   d_C_id = id;
+   d_C_constant = 0.0;
+}
+
+/*
+ *******************************************************************
+ * Set the patch data index for variable C.                        *
+ *******************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+void PoissonSpecifications::setCConstant(
+   double constant) {
+   d_C_zero = false;
+   d_C_id = -1;
+   d_C_constant = constant;
+}
+
+/*
+ *******************************************************************
+ * Set the value of C to zero.                                     *
+ *******************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+void PoissonSpecifications::setCZero() {
+   d_C_zero = true;
+   d_C_id = -1;
+   d_C_constant = 0.0;
+}
+
+/*
+ *******************************************************************
+ * Whether C is variable.                                          *
+ *******************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+bool PoissonSpecifications::cIsVariable() const {
+   return d_C_id != -1;
+}
+
+/*
+ *******************************************************************
+ * Whether C is zero.                                              *
+ *******************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+bool PoissonSpecifications::cIsZero() const {
+   return d_C_zero;
+}
+
+/*
+ *******************************************************************
+ * Whether C is constant.                                          *
+ *******************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+bool PoissonSpecifications::cIsConstant() const {
+   return !d_C_zero && (d_C_id == -1);
+}
+
+/*
+ *******************************************************************
+ * Get the patch data index for variable C.                        *
+ *******************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+int PoissonSpecifications::getCPatchDataId() const {
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_C_id == -1) {
+      TBOX_ERROR(d_object_name << ": C not prepresented by a an index.\n");
+   }
+#endif
+   return d_C_id;
+}
+
+/*
+ *******************************************************************
+ * Get the constant C value.                                       *
+ *******************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+double PoissonSpecifications::getCConstant() const {
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_C_id != -1 || d_C_zero) {
+      TBOX_ERROR(d_object_name << ": C is not prepresented by a constant.\n");
+   }
+#endif
+   return d_C_constant;
+}
+
+} // namespace SAMRAI
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/PoissonSpecifications.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/PoissonSpecifications.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,256 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Specifications for the scalar Poisson equation 
+ *
+ ************************************************************************/
+#ifndef included_solv_PoissonSpecifications
+#define included_solv_PoissonSpecifications
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace solv {
+
+/*!
+ * @brief Light class holding specifications for cell-centered
+ * implementation of the scalar Poisson equation.
+ *
+ * The scalar Poisson equation is
+ * @f$ \nabla ( D \nabla u ) + C u = f @f$,
+ * where C is a scalar field, D is the diffusion coefficient.
+ * and u and f are scalar quantities.
+ *
+ * This class describes the things you can set: C, D.
+ *
+ * Note that the storage and alignment of u, f, C and D depend
+ * on the implementation of the solver.  For example, if the
+ * solver is cell centered, u, f and C are cell-centered while
+ * D is side-centered.
+ */
+
+class PoissonSpecifications
+{
+public:
+   /*!
+    * @brief Constructor.
+    *
+    * Sets the specifications to their default state:
+    * - C is zero
+    * - D is uniformly 1
+    *
+    * @param object_name Name of object.
+    */
+   PoissonSpecifications(
+      const std::string& object_name);
+
+   /*!
+    * @brief Copy constructor.
+    */
+   PoissonSpecifications(
+      const std::string& object_name,
+      const PoissonSpecifications& r);
+
+   /*!
+    * @brief Destructor (does nothing).
+    */
+   virtual ~PoissonSpecifications();
+
+   /*!
+    * @brief Assignment operator
+    *
+    * Assign everything except name.
+    */
+   const PoissonSpecifications&
+   operator = (
+      const PoissonSpecifications& r);
+
+   /*!
+    * @brief Print out class data.
+    */
+   virtual void
+   printClassData(
+      std::ostream& stream) const;
+
+   //@{
+   //! @name Functions for setting and getting D
+
+   /*!
+    * @brief Set the patch data index for variable D.
+    *
+    * In addition, disregard any previous value
+    * specified by setDConstant().
+    */
+   void
+   setDPatchDataId(
+      int id);
+
+   /*!
+    * @brief Set the constant value variable D.
+    *
+    * In addition, disregard any previous patch data index
+    * specified by setDPatchDataId().
+    */
+   void
+   setDConstant(
+      double constant);
+
+   /*!
+    * @brief Whether D is variable (described by a patch data id).
+    *
+    * @return True if D is variable, described by the patch data
+    *         id given in setCPatchDataId().
+    */
+   bool
+   dIsVariable() const;
+
+   /*!
+    * @brief Whether D is constant.
+    *
+    * @return True if D is constant, as specified by setCConstant().
+    */
+   bool
+   dIsConstant() const;
+
+   /*!
+    * @brief Get D's patch data id
+    *
+    * Error if D is not represented by a patch data id.
+    *
+    * @return D's id
+    */
+   int
+   getDPatchDataId() const;
+
+   /*!
+    * @brief Get D constant value
+    *
+    * Error if D is not represented by a constant.
+    *
+    * @return D's constant value
+    */
+   double
+   getDConstant() const;
+
+   //@}
+
+   //@{
+   //! @name Functions for setting and getting C
+
+   /*!
+    * @brief Set the patch data index for C.
+    *
+    * In addition, disregard any previous values
+    * specified by setCConstant() or setCZero().
+    */
+   void
+   setCPatchDataId(
+      int id);
+
+   /*!
+    * @brief Set C to a constant.
+    *
+    * In addition, disregard any previous value
+    * specified by setCPatchDataId() or setCZero().
+    *
+    * If you want to set C to zero, use setCZero() instead.
+    * This allows solvers to take advantage of fact C is absent.
+    */
+   void
+   setCConstant(
+      double constant);
+
+   /*!
+    * @brief Set the value of C to zero.
+    *
+    * In addition, disregard any previous patch data index
+    * specified by setCPatchDataId() and any previous constant
+    * specified by setCConstant().
+    */
+   void
+   setCZero();
+
+   /*!
+    * @brief Whether C is variable (described by a patch data id).
+    *
+    * @return True if C is variable, described by the patch data
+    *         id given in setCPatchDataId().
+    */
+   bool
+   cIsVariable() const;
+
+   /*!
+    * @brief Whether C is zero.
+    *
+    * As it pertains to what this function returns,
+    * C is zero @em only by calling setCZero().
+    * Calling setCConstant() does @em not make C zero,
+    * even if you pass in the value of zero.
+    *
+    * @return True if C is exactly zero, as set by setCZero().
+    */
+   bool
+   cIsZero() const;
+
+   /*!
+    * @brief Whether C is constant.
+    *
+    * As it pertains to what this function returns,
+    * C is constant @em only by calling setCConstant().
+    * Calling setCZero() does @em not make C a constant.
+    *
+    * @return True if C is constant, as specified by setCConstant().
+    */
+   bool
+   cIsConstant() const;
+
+   /*!
+    * @brief Get C's patch data id
+    *
+    * Error if C is not represented by a patch data id.
+    *
+    * @return C's patch data id
+    */
+   int
+   getCPatchDataId() const;
+
+   /*!
+    * @brief Get C as a constant value.
+    *
+    * Error if C is not represented by a constant.
+    *
+    * @return C's constant value
+    */
+   double
+   getCConstant() const;
+
+   //@}
+
+private:
+   /*!
+    * @brief Object name.
+    */
+   std::string d_object_name;
+
+   int d_D_id;
+   double d_D_constant;
+
+   bool d_C_zero;
+   int d_C_id;
+   double d_C_constant;
+
+};
+
+} // namespace SAMRAI
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/solv/PoissonSpecifications.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/RobinBcCoefStrategy.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/RobinBcCoefStrategy.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,38 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Operator class for solving scalar Poisson using FAC 
+ *
+ ************************************************************************/
+#ifndef included_solv_RobinBcCoefStrategy_C
+#define included_solv_RobinBcCoefStrategy_C
+
+#include "SAMRAI/solv/RobinBcCoefStrategy.h"
+
+namespace SAMRAI {
+namespace solv {
+
+/*
+ ********************************************************************
+ * Default constructor.                                             *
+ ********************************************************************
+ */
+
+RobinBcCoefStrategy::RobinBcCoefStrategy() {
+}
+
+/*
+ ********************************************************************
+ *   Destructor.                                                    *
+ ********************************************************************
+ */
+
+RobinBcCoefStrategy::~RobinBcCoefStrategy() {
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/RobinBcCoefStrategy.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/RobinBcCoefStrategy.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,175 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Robin boundary condition problem-dependent interfaces 
+ *
+ ************************************************************************/
+#ifndef included_solv_RobinBcCoefStrategy
+#define included_solv_RobinBcCoefStrategy
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace solv {
+
+/*!
+ * @brief Interface for specifying Robin boundary conditions.
+ *
+ * The Robin boundary conditions are specified in terms of
+ * the coefficients @f$ \alpha @f$, @f$ \beta @f$ and @f$ \gamma @f$
+ * in the Robin formula
+ * @f[  \alpha u + \beta u_n = \gamma @f]
+ * applied on the boundary with outward normal n.
+ *
+ * This class specifies the interfaces for communicating the
+ * boundary condition coefficients.
+ */
+class RobinBcCoefStrategy
+{
+
+public:
+   /*!
+    * @brief Constructor
+    */
+   RobinBcCoefStrategy();
+
+   /*!
+    * @brief Destructor.
+    */
+   virtual ~RobinBcCoefStrategy(
+      void);
+
+   //@{
+
+   /*!
+    * @name Functions to set boundary condition coefficients a and g.
+    */
+
+   /*!
+    * @brief User-supplied function to fill arrays of Robin boundary
+    * condition coefficients at a patch boundary.
+    *
+    * This class specifies the Robin boundary condition coefficients
+    * at discrete locations on the patch boundary.
+    * Though these locations are defined by boundary box object,
+    * they do not necessarily coincide with
+    * the centers of the cells referred to by those boxes.
+    * These locations typically coincide with the nodes
+    * or face centers which do lie on the patch boundary.
+    * Accordingly, you use this function to provide the
+    * boundary coefficients at those locations by filling an array
+    * at indices corresponding to those locations.
+    *
+    * When setting the values of the boundary condition coefficients
+    * it is useful to note that for any cell (i,j,k),
+    * the indices of the sides, edges and nodes are easily determined.
+    * The index on the lower
+    * side of the cell is the same as the index of the cell, whereas
+    * the index on the upper side of the cell has the next higher
+    * value.  In 2D, the cell and its surrounding nodes and faces
+    * has the following indices:
+    * @verbatim
+    *
+    *       (i,j+1)----(i,j+1)---(i+1,j+1)
+    *          |                     |
+    *          |                     |
+    *          |                     |
+    *          |                     |
+    *        (i,j)      (i,j)     (i+1,j)
+    *          |                     |
+    *          |                     |
+    *          |                     |
+    *          |                     |
+    *        (i,j)------(i,j)-----(i+1,j)
+    *
+    * @endverbatim
+    * Once this is understood, translation between the index
+    * in the boundary box index space to the index of things
+    * on the boundary is simple.
+    *
+    * The boundary condition coefficients should be placed
+    * in the pdat::ArrayData<DIM> objects, @c acoef_data and @c gcoef_data
+    * (see argument list), which are dimensioned to contain the indices
+    * of the points alligned with @c variable and lying on the
+    * the boundary defined by @c bdry_box.
+    *
+    * This function is only used with type-1 boundary boxes,
+    * such as faces in 3D.
+    * Other types of boundaries do not have a well-defined
+    * surface normal.
+    *
+    * The parameter @c variable is passed through to tell
+    * the implementation of this function what variable
+    * to set the coefficients for.  You may wish to ignore
+    * it if your implementation is intended for a specific
+    * variable.
+    *
+    * @param acoef_data boundary coefficient data.
+    *        The array will have been defined to include index range
+    *        for corresponding to the boundary box @c bdry_box
+    *        and appropriate for the alignment of the given variable.
+    *        If this is a null pointer, then the calling function
+    *        is not interested in a, and you can disregard it.
+    * @param bcoef_data boundary coefficient data.
+    *        This array is exactly like @c acoef_data,
+    *        except that it is to be filled with the b coefficient.
+    * @param gcoef_data boundary coefficient data.
+    *        This array is exactly like @c acoef_data,
+    *        except that it is to be filled with the g coefficient.
+    * @param variable variable to set the coefficients for.
+    *        If implemented for multiple variables, this parameter
+    *        can be used to determine which variable's coefficients
+    *        are being sought.
+    * @param patch patch requiring bc coefficients
+    * @param bdry_box boundary box showing where on the boundary
+    *        the coefficient data is needed.
+    * @param fill_time solution time corresponding to filling, for use
+    *        when coefficients are time-dependent.
+    */
+   virtual void
+   setBcCoefs(
+      tbox::Pointer<pdat::ArrayData<double> >& acoef_data,
+      tbox::Pointer<pdat::ArrayData<double> >& bcoef_data,
+      tbox::Pointer<pdat::ArrayData<double> >& gcoef_data,
+      const tbox::Pointer<hier::Variable>& variable,
+      const hier::Patch& patch,
+      const hier::BoundaryBox& bdry_box,
+      const double fill_time = 0.0) const = 0;
+
+   /*
+    * @brief Return how many cells past the edge or corner of the
+    * patch the object can fill.
+    *
+    * The "extension" used here is the number of cells that
+    * a boundary box extends past the patch in the direction
+    * parallel to the boundary.
+    *
+    * Note that the inability to fill the sufficient
+    * number of cells past the edge or corner of the patch
+    * may preclude the child class from being used in data
+    * refinement operations that require the extra data,
+    * such as linear refinement.
+    *
+    * The boundary box that setBcCoefs() is required to fill
+    * should not extend past the limits returned by this
+    * function.
+    */
+   virtual hier::IntVector
+   numberOfExtensionsFillable() const = 0;
+
+   //@}
+
+};
+
+}
+}
+
+#endif  // included_solv_RobinBcCoefStrategy
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/SAMRAIVectorReal.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/SAMRAIVectorReal.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1010 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Vector class for data on SAMRAI hierarchy. 
+ *
+ ************************************************************************/
+
+#ifndef included_solv_SAMRAIVectorReal_C
+#define included_solv_SAMRAIVectorReal_C
+
+#include "SAMRAI/solv/SAMRAIVectorReal.h"
+
+#include "SAMRAI/math/HierarchyCellDataOpsReal.h"
+#include "SAMRAI/math/HierarchyEdgeDataOpsReal.h"
+#include "SAMRAI/math/HierarchyFaceDataOpsReal.h"
+#include "SAMRAI/math/HierarchyNodeDataOpsReal.h"
+#include "SAMRAI/math/HierarchySideDataOpsReal.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/pdat/EdgeVariable.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#include <typeinfo>
+#include <cfloat>
+#include <cmath>
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/solv/SAMRAIVectorReal.I"
+#endif
+
+namespace SAMRAI {
+namespace solv {
+
+#define DESCRIPTOR_ID_ARRAY_SCRATCH_SPACE (10)
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialize the static operators and counters.                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+int SAMRAIVectorReal<TYPE>::s_instance_counter[tbox::Dimension::
+                                               MAXIMUM_DIMENSION_VALUE];
+
+template<class TYPE>
+tbox::Pointer<math::HierarchyDataOpsReal<TYPE> > SAMRAIVectorReal<TYPE>::
+s_cell_ops[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+template<class TYPE>
+tbox::Pointer<math::HierarchyDataOpsReal<TYPE> > SAMRAIVectorReal<TYPE>::
+s_edge_ops[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+template<class TYPE>
+tbox::Pointer<math::HierarchyDataOpsReal<TYPE> > SAMRAIVectorReal<TYPE>::
+s_face_ops[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+template<class TYPE>
+tbox::Pointer<math::HierarchyDataOpsReal<TYPE> > SAMRAIVectorReal<TYPE>::
+s_node_ops[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+template<class TYPE>
+tbox::Pointer<math::HierarchyDataOpsReal<TYPE> > SAMRAIVectorReal<TYPE>::
+s_side_ops[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The constructor for SAMRAIVectorReal objects initializes        *
+ * vector structure.                                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+SAMRAIVectorReal<TYPE>::SAMRAIVectorReal(
+   const std::string& name,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level):
+   d_hierarchy(hierarchy),
+   d_coarsest_level(coarsest_level),
+   d_finest_level(finest_level),
+   d_number_components(0)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (finest_level >= coarsest_level)
+      && (finest_level <= hierarchy->getFinestLevelNumber()));
+
+   const tbox::Dimension& dim(d_hierarchy->getDim());
+
+   SAMRAIVectorReal<TYPE>::s_instance_counter[dim.getValue() - 1]++;
+
+   if (name.empty()) {
+      d_vector_name = "SAMRAIVectorReal";
+   } else {
+      d_vector_name = name;
+   }
+
+   // Set default output stream
+   d_output_stream = &tbox::plog;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destructor for SAMRAIVectorReal.                                *
+ * Component data storage is not deallocated here.                       *
+ *                                                                       *
+ *************************************************************************
+ */
+template<class TYPE>
+SAMRAIVectorReal<TYPE>::~SAMRAIVectorReal()
+{
+
+   const tbox::Dimension& dim(d_hierarchy->getDim());
+
+   SAMRAIVectorReal<TYPE>::s_instance_counter[dim.getValue() - 1]--;
+
+   d_number_components = 0;
+
+   d_component_variable.resizeArray(0);
+   d_component_data_id.resizeArray(0);
+   d_component_operations.resizeArray(0);
+   d_control_volume_data_id.resizeArray(0);
+
+   d_variableid_2_vectorcomponent_map.resizeArray(0);
+
+   if (SAMRAIVectorReal<TYPE>::s_instance_counter[dim.getValue() - 1] == 0) {
+      if (!((SAMRAIVectorReal<TYPE>::s_cell_ops[dim.getValue() - 1]).isNull())) {
+         SAMRAIVectorReal<TYPE>::s_cell_ops[dim.getValue() - 1].setNull();
+      }
+      if (!((SAMRAIVectorReal<TYPE>::s_edge_ops)[dim.getValue() - 1].isNull())) {
+         SAMRAIVectorReal<TYPE>::s_edge_ops[dim.getValue() - 1].setNull();
+      }
+      if (!((SAMRAIVectorReal<TYPE>::s_face_ops[dim.getValue() - 1]).isNull())) {
+         SAMRAIVectorReal<TYPE>::s_face_ops[dim.getValue() - 1].setNull();
+      }
+      if (!((SAMRAIVectorReal<TYPE>::s_node_ops)[dim.getValue() - 1].isNull())) {
+         SAMRAIVectorReal<TYPE>::s_node_ops[dim.getValue() - 1].setNull();
+      }
+      if (!((SAMRAIVectorReal<TYPE>::s_side_ops)[dim.getValue() - 1].isNull())) {
+         SAMRAIVectorReal<TYPE>::s_side_ops[dim.getValue() - 1].setNull();
+      }
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The following are private and cannot be used, but they are defined    *
+ * here for compilers that require that every template declaration have  *
+ * a definition (a stupid requirement, if you ask me).                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+SAMRAIVectorReal<TYPE>::SAMRAIVectorReal(
+   const SAMRAIVectorReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+template<class TYPE>
+void SAMRAIVectorReal<TYPE>::operator = (
+   const SAMRAIVectorReal<TYPE>& foo)
+{
+   NULL_USE(foo);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set name string identifier for this vector object.                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void SAMRAIVectorReal<TYPE>::setName(
+   const std::string& name)
+{
+   d_vector_name = name;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Reset vector levels and data operations.                              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void SAMRAIVectorReal<TYPE>::resetLevels(
+   const int coarsest_level,
+   const int finest_level)
+{
+   d_coarsest_level = coarsest_level;
+   d_finest_level = finest_level;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create new vector with same structure as this and return new vector.  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+tbox::Pointer<SAMRAIVectorReal<TYPE> >
+SAMRAIVectorReal<TYPE>::cloneVector(
+   const std::string& name) const
+{
+
+   std::string new_name = (name.empty() ? d_vector_name : name);
+   tbox::Pointer<SAMRAIVectorReal<TYPE> > new_vec(
+      new SAMRAIVectorReal<TYPE>(new_name,
+                                 d_hierarchy,
+                                 d_coarsest_level,
+                                 d_finest_level));
+
+   new_vec->setNumberOfComponents(d_number_components);
+
+   hier::VariableDatabase* var_db = hier::VariableDatabase::getDatabase();
+
+   for (int i = 0; i < d_number_components; i++) {
+
+      int new_id =
+         var_db->registerClonedPatchDataIndex(d_component_variable[i],
+            d_component_data_id[i]);
+
+      new_vec->setComponent(i,
+         d_component_variable[i],
+         new_id,
+         d_control_volume_data_id[i],
+         d_component_operations[i]);
+   }
+
+   return new_vec;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Deallocate vector data storage and remove data indices from database. *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void SAMRAIVectorReal<TYPE>::freeVectorComponents()
+{
+   // deallocate storage for vector components
+   deallocateVectorData();
+
+   hier::VariableDatabase* var_db = hier::VariableDatabase::getDatabase();
+
+   // free entries from variable database and return
+   // patch descriptor indices
+   for (int i = 0; i < d_number_components; i++) {
+      var_db->removePatchDataIndex(d_component_data_id[i]);
+   }
+
+   // reset variable state
+   d_number_components = 0;
+
+   d_component_variable.resizeArray(0);
+   d_component_data_id.resizeArray(0);
+   d_component_operations.resizeArray(0);
+   d_control_volume_data_id.resizeArray(0);
+
+   d_variableid_2_vectorcomponent_map.resizeArray(0);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Add new component to vector structure given a variable and the        *
+ * patch descriptor indices for its data and an appropriate              *
+ * control volume.                                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void SAMRAIVectorReal<TYPE>::addComponent(
+   const tbox::Pointer<hier::Variable>& var,
+   const int comp_data_id,
+   const int comp_vol_id,
+   const tbox::Pointer<math::HierarchyDataOpsReal<TYPE> > vop)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   hier::VariableDatabase* var_db =
+      hier::VariableDatabase::getDatabase();
+   tbox::Pointer<hier::PatchDescriptor> patch_descriptor =
+      var_db->getPatchDescriptor();
+   if (!var_db->checkVariablePatchDataIndexType(var, comp_data_id)) {
+      TBOX_ERROR("Error in SAMRAIVectorReal::addComponent : "
+         << "Vector name = " << d_vector_name
+         << "\nVariable " << var->getName()
+         << " type does not match data type associated with"
+         << " comp_data_id patch data index function argument"
+         << "\n\t var type = " << typeid(*var).name()
+         << "\n\t comp_data_id type = "
+         << typeid(*(patch_descriptor->getPatchDataFactory(comp_data_id))).name()
+         << std::endl);
+   }
+
+   if (comp_vol_id >= 0) {
+      if (!var_db->checkVariablePatchDataIndexType(var, comp_vol_id)) {
+         TBOX_ERROR("Error in SAMRAIVectorReal::addComponent : "
+            << "Vector name = " << d_vector_name
+            << "\nVariable " << var->getName()
+            << " type does not match data type associated with"
+            << " comp_vol_id patch data index function argument"
+            << "\n\t var type = " << typeid(*var).name()
+            << "\n\t comp_vol_id type = "
+            << typeid(*(patch_descriptor->getPatchDataFactory(
+                           comp_vol_id))).name()
+            << std::endl);
+      }
+   }
+#endif
+
+   d_number_components++;
+
+   d_component_variable.resizeArray(d_number_components);
+   d_component_data_id.resizeArray(d_number_components);
+   d_component_operations.resizeArray(d_number_components);
+   d_control_volume_data_id.resizeArray(d_number_components);
+
+   hier::VariableDatabase::getDatabase()->registerPatchDataIndex(var,
+      comp_data_id);
+
+   setComponent(d_number_components - 1,
+      var,
+      comp_data_id,
+      comp_vol_id,
+      vop);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to allocate and deallocate data for all vector components.   *
+ *                                                                       *
+ *************************************************************************
+ */
+template<class TYPE>
+void SAMRAIVectorReal<TYPE>::allocateVectorData(
+   const double timestamp)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->
+         getPatchLevel(ln);
+      for (int i = 0; i < d_number_components; i++) {
+         level->allocatePatchData(d_component_data_id[i], timestamp);
+      }
+   }
+}
+
+template<class TYPE>
+void SAMRAIVectorReal<TYPE>::deallocateVectorData()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT((d_coarsest_level >= 0)
+      && (d_finest_level >= d_coarsest_level)
+      && (d_finest_level <= d_hierarchy->getFinestLevelNumber()));
+#endif
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->
+         getPatchLevel(ln);
+      for (int i = 0; i < d_number_components; i++) {
+         level->deallocatePatchData(d_component_data_id[i]);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print Vector attributes and data.                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void SAMRAIVectorReal<TYPE>::print(
+   std::ostream& s,
+   bool interior_only) const
+{
+   s << "\nVector : " << getName() << std::endl;
+   s << "coarsest level = " << d_coarsest_level
+     << " : finest level = " << d_finest_level << std::endl;
+   s << "d_number_components = " << d_number_components << std::endl;
+
+   for (int ln = d_coarsest_level; ln <= d_finest_level; ln++) {
+      s << "Printing data components on level " << ln << std::endl;
+      for (int i = 0; i < d_number_components; i++) {
+         s << "Vector component index = " << i << std::endl;
+         d_component_operations[i]->resetLevels(ln, ln);
+         d_component_operations[i]->printData(d_component_data_id[i],
+            s,
+            interior_only);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private member functions to set the number of vector components       *
+ * to set individual components.   These routines are used when cloning  *
+ * vectors and/or adding components.                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void SAMRAIVectorReal<TYPE>::setNumberOfComponents(
+   int num_comp)
+{
+   d_number_components = num_comp;
+
+   d_component_variable.resizeArray(d_number_components);
+   d_component_data_id.resizeArray(d_number_components);
+   d_component_operations.resizeArray(d_number_components);
+   d_control_volume_data_id.resizeArray(d_number_components);
+}
+
+template<class TYPE>
+void SAMRAIVectorReal<TYPE>::setComponent(
+   const int comp_id,
+   const tbox::Pointer<hier::Variable>& var,
+   const int data_id,
+   const int vol_id,
+   const tbox::Pointer<math::HierarchyDataOpsReal<TYPE> > vop)
+{
+   TBOX_ASSERT(comp_id < d_number_components);
+
+   const tbox::Dimension& dim(d_hierarchy->getDim());
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, *var);
+
+   d_component_variable[comp_id] = var;
+   d_component_data_id[comp_id] = data_id;
+   if (vop.isNull()) {
+
+      const tbox::Pointer<pdat::CellVariable<TYPE> > cellvar(var);
+      const tbox::Pointer<pdat::EdgeVariable<TYPE> > edgevar(var);
+      const tbox::Pointer<pdat::FaceVariable<TYPE> > facevar(var);
+      const tbox::Pointer<pdat::NodeVariable<TYPE> > nodevar(var);
+      const tbox::Pointer<pdat::SideVariable<TYPE> > sidevar(var);
+
+      if (!(cellvar.isNull())) {
+         if (!SAMRAIVectorReal<TYPE>::s_cell_ops[dim.getValue() - 1]) {
+            SAMRAIVectorReal<TYPE>::s_cell_ops[dim.getValue() - 1] =
+               new math::HierarchyCellDataOpsReal<TYPE>(d_hierarchy,
+                                                        d_coarsest_level,
+                                                        d_finest_level);
+         }
+         d_component_operations[comp_id] =
+            SAMRAIVectorReal<TYPE>::s_cell_ops[dim.getValue() - 1];
+      } else if (!(edgevar.isNull())) {
+         if (!SAMRAIVectorReal<TYPE>::s_edge_ops[dim.getValue() - 1]) {
+            SAMRAIVectorReal<TYPE>::s_edge_ops[dim.getValue() - 1] =
+               new math::HierarchyEdgeDataOpsReal<TYPE>(d_hierarchy,
+                                                        d_coarsest_level,
+                                                        d_finest_level);
+         }
+         d_component_operations[comp_id] =
+            SAMRAIVectorReal<TYPE>::s_edge_ops[dim.getValue() - 1];
+      } else if (!(facevar.isNull())) {
+         if (!SAMRAIVectorReal<TYPE>::s_face_ops[dim.getValue() - 1]) {
+            SAMRAIVectorReal<TYPE>::s_face_ops[dim.getValue() - 1] =
+               new math::HierarchyFaceDataOpsReal<TYPE>(d_hierarchy,
+                                                        d_coarsest_level,
+                                                        d_finest_level);
+         }
+         d_component_operations[comp_id] =
+            SAMRAIVectorReal<TYPE>::s_face_ops[dim.getValue() - 1];
+      } else if (!(nodevar.isNull())) {
+         if (!SAMRAIVectorReal<TYPE>::s_node_ops[dim.getValue() - 1]) {
+            SAMRAIVectorReal<TYPE>::s_node_ops[dim.getValue() - 1] =
+               new math::HierarchyNodeDataOpsReal<TYPE>(d_hierarchy,
+                                                        d_coarsest_level,
+                                                        d_finest_level);
+         }
+         d_component_operations[comp_id] =
+            SAMRAIVectorReal<TYPE>::s_node_ops[dim.getValue() - 1];
+      } else if (!(sidevar.isNull())) {
+         if (!SAMRAIVectorReal<TYPE>::s_side_ops[dim.getValue() - 1]) {
+            SAMRAIVectorReal<TYPE>::s_side_ops[dim.getValue() - 1] =
+               new math::HierarchySideDataOpsReal<TYPE>(d_hierarchy,
+                                                        d_coarsest_level,
+                                                        d_finest_level);
+         }
+         d_component_operations[comp_id] =
+            SAMRAIVectorReal<TYPE>::s_side_ops[dim.getValue() - 1];
+      }
+   } else {
+      d_component_operations[comp_id] = vop;
+   }
+
+   TBOX_ASSERT(!(d_component_operations[comp_id].isNull()));
+
+   d_control_volume_data_id[comp_id] = vol_id;
+
+   int var_id = var->getInstanceIdentifier();
+
+   int oldsize = d_variableid_2_vectorcomponent_map.getSize();
+   int newsize = var_id + 1;
+   if (oldsize < newsize) {
+      newsize = tbox::MathUtilities<int>::Max(
+            oldsize + DESCRIPTOR_ID_ARRAY_SCRATCH_SPACE, newsize);
+      d_variableid_2_vectorcomponent_map.resizeArray(newsize);
+      for (int i = oldsize; i < newsize; i++) {
+         d_variableid_2_vectorcomponent_map[i] = -1;
+      }
+   }
+
+   TBOX_ASSERT(d_variableid_2_vectorcomponent_map[var_id] == -1);
+
+   d_variableid_2_vectorcomponent_map[var_id] = comp_id;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The remaining functions are basic vector kernel routines.             *
+ * The operation for each component is performed by its hierarchy        *
+ * data operation object.                                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void SAMRAIVectorReal<TYPE>::copyVector(
+   const tbox::Pointer<SAMRAIVectorReal<TYPE> > src_vec,
+   const bool interior_only)
+{
+   for (int i = 0; i < d_number_components; i++) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      d_component_operations[i]->
+      copyData(d_component_data_id[i],
+         src_vec->getComponentDescriptorIndex(i),
+         interior_only);
+   }
+}
+
+template<class TYPE>
+void SAMRAIVectorReal<TYPE>::swapVectors(
+   tbox::Pointer<SAMRAIVectorReal<TYPE> > other)
+{
+   for (int i = 0; i < d_number_components; i++) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      d_component_operations[i]->
+      swapData(d_component_data_id[i],
+         other->getComponentDescriptorIndex(i));
+   }
+}
+
+template<class TYPE>
+void SAMRAIVectorReal<TYPE>::setToScalar(
+   const TYPE& alpha,
+   const bool interior_only)
+{
+   for (int i = 0; i < d_number_components; i++) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      d_component_operations[i]->setToScalar(d_component_data_id[i],
+         alpha,
+         interior_only);
+   }
+}
+
+template<class TYPE>
+void SAMRAIVectorReal<TYPE>::scale(
+   const TYPE& alpha,
+   const tbox::Pointer<SAMRAIVectorReal<TYPE> > x,
+   const bool interior_only)
+{
+   for (int i = 0; i < d_number_components; i++) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      d_component_operations[i]->scale(d_component_data_id[i],
+         alpha,
+         x->getComponentDescriptorIndex(i),
+         interior_only);
+   }
+}
+
+template<class TYPE>
+void SAMRAIVectorReal<TYPE>::addScalar(
+   const tbox::Pointer<SAMRAIVectorReal<TYPE> > x,
+   const TYPE& alpha,
+   const bool interior_only)
+{
+   for (int i = 0; i < d_number_components; i++) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      d_component_operations[i]->addScalar(d_component_data_id[i],
+         x->getComponentDescriptorIndex(i),
+         alpha,
+         interior_only);
+   }
+}
+
+template<class TYPE>
+void SAMRAIVectorReal<TYPE>::add(
+   const tbox::Pointer<SAMRAIVectorReal<TYPE> > x,
+   const tbox::Pointer<SAMRAIVectorReal<TYPE> > y,
+   const bool interior_only)
+{
+   for (int i = 0; i < d_number_components; i++) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      d_component_operations[i]->add(d_component_data_id[i],
+         x->getComponentDescriptorIndex(i),
+         y->getComponentDescriptorIndex(i),
+         interior_only);
+   }
+}
+
+template<class TYPE>
+void SAMRAIVectorReal<TYPE>::subtract(
+   const tbox::Pointer<SAMRAIVectorReal<TYPE> > x,
+   const tbox::Pointer<SAMRAIVectorReal<TYPE> > y,
+   const bool interior_only)
+{
+   for (int i = 0; i < d_number_components; i++) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      d_component_operations[i]->subtract(d_component_data_id[i],
+         x->getComponentDescriptorIndex(i),
+         y->getComponentDescriptorIndex(i),
+         interior_only);
+   }
+}
+
+template<class TYPE>
+void SAMRAIVectorReal<TYPE>::multiply(
+   const tbox::Pointer<SAMRAIVectorReal<TYPE> > x,
+   const tbox::Pointer<SAMRAIVectorReal<TYPE> > y,
+   const bool interior_only)
+{
+   for (int i = 0; i < d_number_components; i++) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      d_component_operations[i]->multiply(d_component_data_id[i],
+         x->getComponentDescriptorIndex(i),
+         y->getComponentDescriptorIndex(i),
+         interior_only);
+   }
+}
+
+template<class TYPE>
+void SAMRAIVectorReal<TYPE>::divide(
+   const tbox::Pointer<SAMRAIVectorReal<TYPE> > x,
+   const tbox::Pointer<SAMRAIVectorReal<TYPE> > y,
+   const bool interior_only)
+{
+   for (int i = 0; i < d_number_components; i++) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      d_component_operations[i]->divide(d_component_data_id[i],
+         x->getComponentDescriptorIndex(i),
+         y->getComponentDescriptorIndex(i),
+         interior_only);
+   }
+}
+
+template<class TYPE>
+void SAMRAIVectorReal<TYPE>::reciprocal(
+   const tbox::Pointer<SAMRAIVectorReal<TYPE> > x,
+   const bool interior_only)
+{
+   for (int i = 0; i < d_number_components; i++) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      d_component_operations[i]->reciprocal(d_component_data_id[i],
+         x->getComponentDescriptorIndex(i),
+         interior_only);
+   }
+}
+
+template<class TYPE>
+void SAMRAIVectorReal<TYPE>::linearSum(
+   const TYPE& alpha,
+   const tbox::Pointer<SAMRAIVectorReal<TYPE> > x,
+   const TYPE& beta,
+   const tbox::Pointer<SAMRAIVectorReal<TYPE> > y,
+   const bool interior_only)
+{
+   for (int i = 0; i < d_number_components; i++) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      d_component_operations[i]->linearSum(d_component_data_id[i],
+         alpha,
+         x->getComponentDescriptorIndex(i),
+         beta,
+         y->getComponentDescriptorIndex(i),
+         interior_only);
+   }
+}
+
+template<class TYPE>
+void SAMRAIVectorReal<TYPE>::axpy(
+   const TYPE& alpha,
+   const tbox::Pointer<SAMRAIVectorReal<TYPE> > x,
+   const tbox::Pointer<SAMRAIVectorReal<TYPE> > y,
+   const bool interior_only)
+{
+   for (int i = 0; i < d_number_components; i++) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      d_component_operations[i]->axpy(d_component_data_id[i],
+         alpha,
+         x->getComponentDescriptorIndex(i),
+         y->getComponentDescriptorIndex(i),
+         interior_only);
+   }
+}
+
+template<class TYPE>
+void SAMRAIVectorReal<TYPE>::abs(
+   const tbox::Pointer<SAMRAIVectorReal<TYPE> > x,
+   const bool interior_only)
+{
+   for (int i = 0; i < d_number_components; i++) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      d_component_operations[i]->abs(d_component_data_id[i],
+         x->getComponentDescriptorIndex(i),
+         interior_only);
+   }
+}
+
+template<class TYPE>
+void SAMRAIVectorReal<TYPE>::setRandomValues(
+   const TYPE& width,
+   const TYPE& low,
+   const bool interior_only)
+{
+   for (int i = 0; i < d_number_components; i++) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      d_component_operations[i]->setRandomValues(d_component_data_id[i],
+         width,
+         low,
+         interior_only);
+   }
+}
+
+template<class TYPE>
+double SAMRAIVectorReal<TYPE>::L1Norm(
+   bool local_only) const
+{
+   double norm = 0.0;
+
+   for (int i = 0; i < d_number_components; i++) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      norm += d_component_operations[i]->L1Norm(d_component_data_id[i],
+            d_control_volume_data_id[i],
+            local_only);
+   }
+
+   return norm;
+}
+
+template<class TYPE>
+double SAMRAIVectorReal<TYPE>::L2Norm(
+   bool local_only) const
+{
+   double norm_squared = 0.0;
+
+   for (int i = 0; i < d_number_components; i++) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      double comp_norm =
+         d_component_operations[i]->L2Norm(d_component_data_id[i],
+            d_control_volume_data_id[i],
+            local_only);
+      norm_squared += comp_norm * comp_norm;
+   }
+
+   return sqrt(norm_squared);
+}
+
+template<class TYPE>
+double SAMRAIVectorReal<TYPE>::weightedL2Norm(
+   const tbox::Pointer<SAMRAIVectorReal<TYPE> > wgt) const
+{
+   double norm_squared = 0.0;
+
+   for (int i = 0; i < d_number_components; i++) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      double comp_norm = d_component_operations[i]->weightedL2Norm(
+            d_component_data_id[i],
+            wgt->getComponentDescriptorIndex(i),
+            d_control_volume_data_id[i]);
+      norm_squared += comp_norm * comp_norm;
+   }
+
+   return sqrt(norm_squared);
+}
+
+template<class TYPE>
+double SAMRAIVectorReal<TYPE>::RMSNorm() const
+{
+   double num = L2Norm();
+
+   double denom = 0.0;
+   for (int i = 0; i < d_number_components; i++) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      if (d_control_volume_data_id[i] < 0) {
+         denom += double(d_component_operations[i]->
+                         numberOfEntries(d_component_data_id[i], true));
+      } else {
+         denom += d_component_operations[i]->
+            sumControlVolumes(d_component_data_id[i],
+               d_control_volume_data_id[i]);
+      }
+   }
+
+   double norm = 0.0;
+   if (denom > 0.0) norm = num / sqrt(denom);
+   return norm;
+}
+
+template<class TYPE>
+double SAMRAIVectorReal<TYPE>::weightedRMSNorm(
+   const tbox::Pointer<SAMRAIVectorReal<TYPE> > wgt) const
+{
+   double num = weightedL2Norm(wgt);
+
+   double denom = 0.0;
+   for (int i = 0; i < d_number_components; i++) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      if (d_control_volume_data_id[i] < 0) {
+         denom += double(d_component_operations[i]->
+                         numberOfEntries(d_component_data_id[i], true));
+      } else {
+         denom += d_component_operations[i]->
+            sumControlVolumes(d_component_data_id[i],
+               d_control_volume_data_id[i]);
+      }
+   }
+
+   double norm = 0.0;
+   if (denom > 0.0) norm = num / sqrt(denom);
+   return norm;
+}
+
+template<class TYPE>
+double SAMRAIVectorReal<TYPE>::maxNorm(
+   bool local_only) const
+{
+   double norm = 0.0;
+
+   for (int i = 0; i < d_number_components; i++) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      norm = tbox::MathUtilities<double>::Max(norm,
+            d_component_operations[i]->maxNorm(
+               d_component_data_id[i],
+               d_control_volume_data_id[i],
+               local_only));
+   }
+
+   return norm;
+}
+
+template<class TYPE>
+TYPE SAMRAIVectorReal<TYPE>::dot(
+   const tbox::Pointer<SAMRAIVectorReal<TYPE> > x,
+   bool local_only) const
+{
+   TYPE dprod = 0.0;
+
+   for (int i = 0; i < d_number_components; i++) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      dprod += d_component_operations[i]->dot(d_component_data_id[i],
+            x->getComponentDescriptorIndex(i),
+            d_control_volume_data_id[i],
+            local_only);
+   }
+
+   return dprod;
+}
+
+template<class TYPE>
+int SAMRAIVectorReal<TYPE>::computeConstrProdPos(
+   const tbox::Pointer<SAMRAIVectorReal<TYPE> > x) const
+{
+   int test = 1;
+
+   int i = 0;
+   while (test && (i < d_number_components)) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      test = tbox::MathUtilities<int>::Min(test,
+            d_component_operations[i]->
+            computeConstrProdPos(d_component_data_id[i],
+               x->getComponentDescriptorIndex(i),
+               d_control_volume_data_id[i]));
+      i++;
+   }
+
+   return test;
+}
+
+template<class TYPE>
+void SAMRAIVectorReal<TYPE>::compareToScalar(
+   const tbox::Pointer<SAMRAIVectorReal<TYPE> > x,
+   const TYPE& alpha)
+{
+   for (int i = 0; i < d_number_components; i++) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      d_component_operations[i]->
+      compareToScalar(d_component_data_id[i],
+         x->getComponentDescriptorIndex(i),
+         alpha,
+         d_control_volume_data_id[i]);
+   }
+}
+
+template<class TYPE>
+int SAMRAIVectorReal<TYPE>::testReciprocal(
+   const tbox::Pointer<SAMRAIVectorReal<TYPE> > x)
+{
+   int test = 1;
+
+   for (int i = 0; i < d_number_components; i++) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      test = tbox::MathUtilities<int>::Min(test,
+            d_component_operations[i]->
+            testReciprocal(d_component_data_id[i],
+               x->getComponentDescriptorIndex(i),
+               d_control_volume_data_id[i]));
+   }
+
+   return test;
+}
+
+template<class TYPE>
+TYPE SAMRAIVectorReal<TYPE>::maxPointwiseDivide(
+   const tbox::Pointer<SAMRAIVectorReal<TYPE> > denom) const
+{
+   const tbox::SAMRAI_MPI& mpi(d_hierarchy->getDomainMappedBoxLevel().getMPI());
+   TYPE max = 0.0;
+
+   for (int i = 0; i < d_number_components; i++) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      TYPE component_max =
+         d_component_operations[i]->maxPointwiseDivide(d_component_data_id[i],
+            denom->getComponentDescriptorIndex(i),
+            true);
+      max = tbox::MathUtilities<TYPE>::Max(max, component_max);
+   }
+
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&max, 1, MPI_MAX);
+   }
+   return max;
+}
+
+template<class TYPE>
+TYPE SAMRAIVectorReal<TYPE>::min(
+   const bool interior_only) const
+{
+   TYPE minval = tbox::MathUtilities<TYPE>::getMax();
+
+   for (int i = 0; i < d_number_components; i++) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      minval = tbox::MathUtilities<TYPE>::Min(
+            minval,
+            d_component_operations[i]->min(d_component_data_id[i],
+               interior_only));
+   }
+
+   return minval;
+}
+
+template<class TYPE>
+TYPE SAMRAIVectorReal<TYPE>::max(
+   const bool interior_only) const
+{
+   TYPE maxval = -tbox::MathUtilities<TYPE>::getMax();
+
+   for (int i = 0; i < d_number_components; i++) {
+      d_component_operations[i]->resetLevels(d_coarsest_level, d_finest_level);
+      maxval = tbox::MathUtilities<TYPE>::Max(
+            maxval,
+            d_component_operations[i]->max(d_component_data_id[i],
+               interior_only));
+   }
+
+   return maxval;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/SAMRAIVectorReal.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/SAMRAIVectorReal.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,132 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Vector class for real data on SAMRAI hierarchy. 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace solv {
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void SAMRAIVectorReal<TYPE>::setOutputStream(
+   std::ostream& s)
+{
+   d_output_stream = &s;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+std::ostream& SAMRAIVectorReal<TYPE>::getOutputStream()
+{
+   return *d_output_stream;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const std::string& SAMRAIVectorReal<TYPE>::getName() const
+{
+   return d_vector_name;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<hier::PatchHierarchy>
+SAMRAIVectorReal<TYPE>::getPatchHierarchy() const
+{
+   return d_hierarchy;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int SAMRAIVectorReal<TYPE>::getCoarsestLevelNumber() const
+{
+   return d_coarsest_level;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int SAMRAIVectorReal<TYPE>::getFinestLevelNumber() const
+{
+   return d_finest_level;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int SAMRAIVectorReal<TYPE>::getNumberOfComponents() const
+{
+   return d_number_components;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<hier::PatchData>
+SAMRAIVectorReal<TYPE>::getComponentPatchData(
+   const int comp_id,
+   const hier::Patch& patch) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(comp_id >= 0 && comp_id < d_number_components);
+#endif
+   return patch.getPatchData(d_component_data_id[comp_id]);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<hier::PatchData>
+SAMRAIVectorReal<TYPE>::getComponentPatchData(
+   const tbox::Pointer<hier::Variable>& var,
+   const hier::Patch& patch) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!var.isNull());
+   TBOX_ASSERT(d_variableid_2_vectorcomponent_map[
+         var->getInstanceIdentifier()] >= 0);
+#endif
+   return patch.getPatchData(
+      d_component_data_id[
+         d_variableid_2_vectorcomponent_map[
+            var->getInstanceIdentifier()]]);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<hier::Variable>
+SAMRAIVectorReal<TYPE>::getComponentVariable(
+   const int comp_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(comp_id >= 0 && comp_id < d_number_components);
+#endif
+   return d_component_variable[comp_id];
+
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int SAMRAIVectorReal<TYPE>::getComponentDescriptorIndex(
+   const int comp_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(comp_id >= 0 && comp_id < d_number_components);
+#endif
+   return d_component_data_id[comp_id];
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int SAMRAIVectorReal<TYPE>::getControlVolumeIndex(
+   const int comp_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(comp_id >= 0 && comp_id < d_number_components);
+#endif
+   return d_control_volume_data_id[comp_id];
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/SAMRAIVectorReal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/SAMRAIVectorReal.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,736 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Vector class for real data on SAMRAI hierarchy. 
+ *
+ ************************************************************************/
+
+#ifndef included_solv_SAMRAIVectorReal
+#define included_solv_SAMRAIVectorReal
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/math/HierarchyDataOpsReal.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+#include <iostream>
+
+namespace SAMRAI {
+namespace solv {
+
+/**
+ * Class SAMRAIVectorReal allows a collection of patch data types
+ * (with double or float data, but not both) defined over a SAMRAI hierarchy
+ * to be manipulated as though they are all part of a single vector.
+ * Specifically, this class provides a set of common vector operations
+ * to manipulate all of the data components as a whole.  The most obvious
+ * use of this class is in SAMRAI applications that use solver libraries,
+ * such as KINSOL, CVODE, or PETSc.  Specific vector objects that can be
+ * used with these packages are defined elsewhere in SAMRAI.  However, all
+ * these vactor interfaces are built using this vector class.
+ *
+ * This class defines a vector to be any collection of patch data objects
+ * (either cell-, edge-, face-, node, or side-centered, or any combination
+ * of these) defined over a set of patch levels in an AMR hierarchy.  All of
+ * the data objects must have the same underlying data type, either double
+ * or float.  The vector structure is composed by adding individual
+ * variable quantities to the vector after it is constructed.  When a
+ * component is added, a weighting or "control volume" component
+ * (having the same type as the vector component) may also be added
+ * to the vector.  These weights are used to define the contribution of
+ * each vector entry to summing operations such as norms and dot products.
+ * For example, the weights can be used to mask out coarse level vector
+ * data entries in cells that are covered by fine cells when the coarse data
+ * are not actually part of the solution vector.  The weights can also be
+ * used to map the vector operations to grid-based operations that define
+ * control volume weights.   It is important to note that the centering
+ * of each control volume component must match that of the vector component
+ * with which it is associated.
+ *
+ * Typical usage of this vector class is as follows:
+ *
+ * - @b (1) Construct a vector instance by specifying the patch hierarchy
+ *            and range of levels over which the vector is defined.
+ *            The levels must exist in the hierarchy before the vector
+ *            can be used or an assertion will result.  However, a vector
+ *            may be created before the levels exist.  The range of levels
+ *            can be reset (such as after remeshing) by calling the
+ *            resetLevels() function.
+ * - @b (2) Register each data component with the vector by providing
+ *            the variable and its storage location (i.e., patch data
+ *            index), and the control volume index if needed.
+ *            See the addComponent() functions.
+ * - @b (3) Manipulate data using vector operations.
+ *
+ *
+ * Before the vector operations can be used, the storage for each of its
+ * components must be allocated.  Storage allocation is only possible
+ * through a vector object after all component variables are added to
+ * the vector (using the addComponent() function).
+ * Then, the allocateVectorData() function will allocate storage for all
+ * components when called.  Alternatively, patch data objects (corresponding
+ * to the variables and vector patch data indices) may be
+ * explicitly created elsewhere.  However, depending on the circumstance, this
+ * second alternative may be more confusing and require more bookkeeping on
+ * the user's part.  See the documentation accompanying the addComponent()
+ * function for more information.
+ *
+ * @see math::HierarchyDataOpsReal
+ */
+
+template<class TYPE>
+class SAMRAIVectorReal:public tbox::DescribedClass
+{
+public:
+   /**
+    * Constructor for SAMRAIVectorReal class is used to construct
+    * each unique vector within an application.  That is, each vector
+    * that is used to represent a unique set of variable quantities is
+    * considered unique.  This constructor is used to create a solution
+    * vector for an application or solver algorithm.  The cloneVector()
+    * function is provided to generate copies of a given vector.  For example,
+    * the clone function may be used by a solver to generate copies of
+    * the vector as needed; e.g., in a Krylov subspace method like GMRES.
+    *
+    * Before the vector may be used, data components must be added to it using
+    * the adddComponent(0 function.  Also, this constructor does not allocate
+    * storage for vector data.  This is usually done after all components are
+    * added.  The allocateVectorData() function is used for this
+    * purpose.  Otherwise, existing patch data quantities can be
+    * added as vector components.  In any case, storage for all
+    * components must be allocated before the vector can be used.
+    *
+    * It is important to note that a non-recoverable assertion will result
+    * if the specified levels do not exist in the hierarchy before a vector
+    * object is used, or if the hierarchy pointer itself is null.  The range
+    * levels can be reset at any time (e.g., if the level configuration
+    * changes by re-meshing), by calling the resetLevels() member function.
+    *
+    * Although an empty std::string may be passed as the vector name, it is
+    * recommended that a descriptive name be used to facilitate debugging
+    * and error reporting.
+    *
+    * By default the vector component information and data will be sent to
+    * the "plog" output stream when the print() function is called.  This
+    * stream can be changed at any time via the setOutputStream() function.
+    */
+   SAMRAIVectorReal(
+      const std::string& name,
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level);
+
+   /**
+    * Virtual destructor for SAMRAIVectorReal class.  The destructor
+    * destroys all vector component information.  However, the destructor
+    * does not deallocate the vector component storage, nor does it return the
+    * vector patch data indices to the patch descriptor free list.
+    * The freeVectorComponents() function is provided for this task.  The
+    * reason for this is that an application may create a vector based on
+    * some pre-existing patch data objects that must live beyond the
+    * destruction of the vector object.
+    */
+   virtual ~SAMRAIVectorReal<TYPE>();
+
+   /**
+    * Set std::string identifier for this vector object.
+    */
+   void
+   setName(
+      const std::string& name);
+
+   /**
+    * Set output stream for vector object.  When the print() function is
+    * called, all vector data will be sent to the given output stream.
+    */
+   void
+   setOutputStream(
+      std::ostream& s);
+
+   /**
+    * Return reference to the output stream used by this vector object.
+    * This function is primarily used by classes which define interfaces
+    * between this vector class and vector kernels defined by other
+    * packages.  Specifically, SAMRAI vectors and package-specific wrappers
+    * for those vectors may all access the same output stream.
+    */
+   std::ostream&
+   getOutputStream();
+
+   /**
+    * Reset range of patch levels over which vector is defined.  This
+    * function resets the data operations for all vector components.
+    * Note that the levels must exist in the hierarchy when this function
+    * is called or a non-recoverable assertion will result.
+    */
+   void
+   resetLevels(
+      const int coarsest_level,
+      const int finest_level);
+
+   /**
+    * Return std::string identifier for this vector object.
+    */
+   const std::string&
+   getName() const;
+
+   /**
+    * Return pointer to patch hierarchy associated with the vector.
+    */
+   tbox::Pointer<hier::PatchHierarchy>
+   getPatchHierarchy() const;
+
+   /**
+    * Return integer number of coarsest hierarchy level for vector.
+    */
+   int
+   getCoarsestLevelNumber() const;
+
+   /**
+    * Return integer number of finest hierarchy level for vector.
+    */
+   int
+   getFinestLevelNumber() const;
+
+   /**
+    * Return integer number of patch data components in vector.
+    */
+   int
+   getNumberOfComponents() const;
+
+   /**
+    * Return patch data object for given vector component index.
+    */
+   tbox::Pointer<hier::PatchData>
+   getComponentPatchData(
+      const int comp_id,
+      const hier::Patch& patch) const;
+
+   /**
+    * Return patch data object associated with given variable.
+    */
+   tbox::Pointer<hier::PatchData>
+   getComponentPatchData(
+      const tbox::Pointer<hier::Variable>& var,
+      const hier::Patch& patch) const;
+
+   /**
+    * Return pointer to variable for specified vector component.
+    */
+   tbox::Pointer<hier::Variable>
+   getComponentVariable(
+      const int component) const;
+
+   /**
+    * Return patch data index for specified vector component.
+    */
+   int
+   getComponentDescriptorIndex(
+      const int component) const;
+
+   /**
+    * Return patch data index of control volume data for vector component.
+    */
+   int
+   getControlVolumeIndex(
+      const int component) const;
+
+   /**
+    * Clone this vector object and return a pointer to the vector copy
+    * (i.e., a new vector).  Each patch data component in the new vector
+    * will match the corresponding component in this vector object.  However,
+    * the data for the components of the new vector will be assigned to
+    * different patch data indices than the original.  In short,
+    * the cloned vector will have an identical structure to the original,
+    * but its data storage will be distinct.  Before the new vector object
+    * can be used, its data must be allocated explicitly.
+    *
+    * Note that this function maps the variables associated with the new
+    * vector to the new vector component data indices (i.e., patch
+    * data indices) in the variable database.  Thus the mapping
+    * between variables and patch data for the new vector can be obtained
+    * from the variable database if needed.
+    *
+    * If an empty std::string is passed in, the name of this vector object
+    * is used for the new vector.
+    */
+   tbox::Pointer<SAMRAIVectorReal<TYPE> >
+   cloneVector(
+      const std::string& name) const;
+
+   /**
+    * Destroy the storage corresponding to the vector components and
+    * free the associated patch data entries from the variable database
+    * (which will also clear the indices from the patch descriptor).
+    */
+   void
+   freeVectorComponents();
+
+   /**
+    * Add a new variable and patch data component to this vector.
+    * The integer values passed in represent the patch data indices
+    * for the vector component data and the component control volume data.
+    * If the control volume patch data index is not specified
+    * (i.e., control_vol_id < 0), no weighting will be applied in
+    * vector operations associated with the component.  This routine
+    * also accepts a hierarchy data operation object for the component
+    * should the user want to provide a special set of such operations.
+    * If left unspecified (nearly all cases), the standard operations
+    * for the given variable type are used.
+    *
+    * Note that this function maps the variable to the component data
+    * index (i.e., patch data index) in the variable database.
+    * Thus, the mapping between the variable and its patch data for the
+    * vector can be obtained from the variable database if needed.
+    *
+    * When assertion checking is active, this routine checks make sure
+    * that the type of the variable matches the types associated with
+    * the patch data indices passed in.
+    */
+   void
+   addComponent(
+      const tbox::Pointer<hier::Variable>& var,
+      const int comp_data_id,
+      const int control_vol_id = -1,
+      const tbox::Pointer<math::HierarchyDataOpsReal<TYPE> > vop =
+         (tbox::Pointer<math::HierarchyDataOpsReal<TYPE> >)(NULL));
+
+   /**
+    * Allocate data storage for all components of this vector object.
+    */
+   void
+   allocateVectorData(
+      const double timestamp = 0.0);
+
+   /**
+    * Deallocate data storage for all components of this vector object.
+    * Note that this routine will not free the associated data
+    * indices in the patch descriptor.  See freeVectorComponents() function.
+    */
+   void
+   deallocateVectorData();
+
+   /**
+    * Print component information and data for this vector object.
+    */
+   void
+   print(
+      std::ostream& s = tbox::plog,
+      const bool interior_only = true) const;
+
+   /**
+    * Copy data from source vector components to components of this vector.
+    */
+   void
+   copyVector(
+      const tbox::Pointer<SAMRAIVectorReal<TYPE> > src_vec,
+      const bool interior_only = true);
+
+   /**
+    * Swap data components (i.e. storage) between this vector object and
+    * argument vector.
+    */
+   void
+   swapVectors(
+      tbox::Pointer<SAMRAIVectorReal<TYPE> > other);
+
+   //@{
+   /*!
+    * @name Vector arithmetic functions
+    */
+
+   /**
+    * Set all components of this vector to given scalar value.
+    */
+   void
+   setToScalar(
+      const TYPE& alpha,
+      const bool interior_only = true);
+
+   /**
+    * Set this vector to src vector multiplied by given scalar.
+    */
+   void
+   scale(
+      const TYPE& alpha,
+      const tbox::Pointer<SAMRAIVectorReal<TYPE> > x,
+      const bool interior_only = true);
+
+   /**
+    * Set this vector to sum of given vector and scalar.
+    */
+   void
+   addScalar(
+      const tbox::Pointer<SAMRAIVectorReal<TYPE> > x,
+      const TYPE& alpha,
+      const bool interior_only = true);
+
+   /**
+    * Set this vector to sum of two given vectors.
+    */
+   void
+   add(
+      const tbox::Pointer<SAMRAIVectorReal<TYPE> > x,
+      const tbox::Pointer<SAMRAIVectorReal<TYPE> > y,
+      const bool interior_only = true);
+
+   /**
+    * Set this vector to difference of two given vectors (i.e., x - y).
+    */
+   void
+   subtract(
+      const tbox::Pointer<SAMRAIVectorReal<TYPE> > x,
+      const tbox::Pointer<SAMRAIVectorReal<TYPE> > y,
+      const bool interior_only = true);
+
+   /**
+    * Set each entry in this vector to product of corresponding entries in
+    * input vectors.
+    */
+   void
+   multiply(
+      const tbox::Pointer<SAMRAIVectorReal<TYPE> > x,
+      const tbox::Pointer<SAMRAIVectorReal<TYPE> > y,
+      const bool interior_only = true);
+
+   /**
+    * Set each entry in this vector to ratio of corresponding entries in
+    * input vectors (i.e., x / y).  No check for division by zero.
+    */
+   void
+   divide(
+      const tbox::Pointer<SAMRAIVectorReal<TYPE> > x,
+      const tbox::Pointer<SAMRAIVectorReal<TYPE> > y,
+      const bool interior_only = true);
+
+   /**
+    * Set each entry of this vector to reciprocal of corresponding entry
+    * in input vector.  No check is made for division by zero.
+    */
+   void
+   reciprocal(
+      const tbox::Pointer<SAMRAIVectorReal<TYPE> > x,
+      const bool interior_only = true);
+
+   /**
+    * Set this vector to the linear sum @f$ \alpha x + @beta y @f$ , where
+    * @f$ \alpha, @beta @f$  are scalars and @f$ x, y @f$  are vectors.
+    */
+   void
+   linearSum(
+      const TYPE& alpha,
+      const tbox::Pointer<SAMRAIVectorReal<TYPE> > x,
+      const TYPE& beta,
+      const tbox::Pointer<SAMRAIVectorReal<TYPE> > y,
+      const bool interior_only = true);
+
+   /**
+    * Set this vector to the sum @f$ \alpha x + y @f$ , where @f$ \alpha @f$  is a scalar
+    * and @f$ x, y @f$  are vectors.
+    */
+   void
+   axpy(
+      const TYPE& alpha,
+      const tbox::Pointer<SAMRAIVectorReal<TYPE> > x,
+      const tbox::Pointer<SAMRAIVectorReal<TYPE> > y,
+      const bool interior_only = true);
+
+   /**
+    * Set each entry of this vector to absolute values of corresponding
+    * entry in input vector.
+    */
+   void
+   abs(
+      const tbox::Pointer<SAMRAIVectorReal<TYPE> > x,
+      const bool interior_only = true);
+
+   /**
+    * Return the minimum data entry in this vector.  Note that this routine
+    * returns a global min over all vector components and makes no adjustment
+    * for coarser level vector data that may be masked out by the existence
+    * of underlying fine values.  In particular, the control volumes are not
+    * used in this operation.  This may change based on user needs.
+    */
+   TYPE
+   min(
+      const bool interior_only = true) const;
+
+   /**
+    * Return the maximum entry of this vector. Note that this routine
+    * returns a global max over all vector components and makes no adjustment
+    * for coarser level vector data that may be masked out by the existence
+    * of underlying fine values.  In particular, the control volumes are not
+    * used in this operation.  This may change based on user needs.
+    */
+   TYPE
+   max(
+      const bool interior_only = true) const;
+
+   /**
+    * Set data in this vector to random values.
+    */
+   void
+   setRandomValues(
+      const TYPE& width,
+      const TYPE& low,
+      const bool interior_only = true);
+
+   /**
+    * Return discrete @f$ L_1 @f$ -norm of this vector using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum @f$ \sum_i ( \| data_i \| cvol_i ) @f$ .  If the
+    * control volume is not defined for a component, the contribution is
+    * @f$ \sum_i ( \| data_i \| ) @f$  for that data component.  Thus, to have
+    * a consistent norm calculation all components must have control
+    * volumes, or no control volumes should be used at all.
+    */
+   double
+   L1Norm(
+      bool local_only = false) const;
+
+   /**
+    * Return discrete @f$ L_2 @f$ -norm of this vector using the control volume to
+    * weight the contribution of each data entry to the sum.  That is, the
+    * return value is the sum @f$ \sqrt{ \sum_i ( (data_i)^2 cvol_i ) } @f$ .
+    * If the control volume is not defined for a component, the contribution
+    * is @f$ \sqrt{ \sum_i ( (data_i)^2 ) } @f$  for that data component.
+    * Thus, to have a consistent norm calculation all components must
+    * have control volumes, or no control volumes should be used at all.
+    */
+   double
+   L2Norm(
+      bool local_only = false) const;
+
+   /**
+    * Return discrete weighted @f$ L_2 @f$ -norm of this vector using the control
+    * volume to weight the contribution of the data and weight entries to
+    * the sum.  That is, the return value is the sum @f$ \sqrt{ \sum_i (
+    * (data_i * weight_i)^2 cvol_i ) } @f$ .  If the control volume is not defined
+    * for a component, the contribution is
+    * @f$ \sqrt{ \sum_i ( (data_i * weight_i)^2 ) } @f$  for that data component.
+    * Thus, to have a consistent norm calculation all components must
+    * have control volumes, or no control volumes should be used at all.
+    */
+   double
+   weightedL2Norm(
+      const tbox::Pointer<SAMRAIVectorReal<TYPE> > wgt) const;
+
+   /**
+    * Return discrete root mean squared norm of this vector.  If control
+    * volumes are defined for all components, the return value is the
+    * @f$ L_2 @f$ -norm divided by the square root of the sum of the control volumes.
+    * If the control volume is not defined for a component, its contribution
+    * to the norm corresponds to its @f$ L_2 @f$ -norm divided by the square root
+    * of the number of data entries.  Thus, to have a consistent norm
+    * calculation all components must have control volumes, or no
+    * control volumes should be used at all.
+    */
+   double
+   RMSNorm() const;
+
+   /**
+    * Return discrete weighted root mean squared norm of this vector.  If
+    * control volumes are defined for all components, the return value is the
+    * weighted @f$ L_2 @f$ -norm divided by the square root of the sum of the
+    * control volumes.  If the control volume is not defined for a component,
+    * its contribution to the norm corresponds to its weighted @f$ L_2 @f$ -norm
+    * divided by the square root of the number of data entries.  Thus, to
+    * have a consistent norm calculation all components must have
+    * control volumes, or no control volumes should be used at all.
+    */
+   double
+   weightedRMSNorm(
+      const tbox::Pointer<SAMRAIVectorReal<TYPE> > wgt) const;
+
+   /**
+    * Return the @f$ \max @f$ -norm of this vector.  If control volumes are defined
+    * for all components, the return value is the max norm over all data
+    * values where the control volumes are non-zero.  If the control volume
+    * is not defined for a component, its contribution to the norm will
+    * take a max over all of its data values.  Thus, to have a consistent
+    * norm calculation all components must have control volumes,
+    * or no control volumes should be used at all.
+    */
+   double
+   maxNorm(
+      bool local_only = false) const;
+
+   /**
+    * Return the dot product of this vector with the argument vector.
+    * If control volumes are defined for all components, the return value
+    * is a weighted sum involving all data values where the control volumes
+    * are non-zero.  If the control volume is not defined for a component,
+    * its contribution to the sum will involve all of its data values.
+    * Thus, to have a consistent dot product calculation all components must
+    * have control volumes, or no control volumes should be used at all.
+    */
+   TYPE
+   dot(
+      const tbox::Pointer<SAMRAIVectorReal<TYPE> > x,
+      bool local_only = false) const;
+
+   /**
+    * Return 1 if @f$ \|x_i\| > 0 @f$  and @f$ w_i * x_i \leq 0 @f$ , for any @f$ i @f$  in
+    * the set of vector data indices, where @f$ cvol_i > 0 @f$ .  Here, @f$ w_i @f$  is
+    * a data entry in this vector.  Otherwise, return 0.  If the control
+    * volume is undefined for a component, all data values for the component
+    * are considered in the test.  Thus, to have a consistent test all
+    * components must have control volumes, or no control volumes
+    * should be used at all.
+    */
+   int
+   computeConstrProdPos(
+      const tbox::Pointer<SAMRAIVectorReal<TYPE> > x) const;
+
+   /**
+    * Wherever @f$ cvol_i > 0 @f$  in the set of vector data indices, set @f$ w_i = 1 @f$
+    * if @f$ \|x_i\| > \alpha @f$ , and @f$ w_i = 0 @f$  otherwise.  Here, @f$ w_i @f$  is a data
+    * entry in this vector.  If the control volume is undefined for a
+    * component, all data values for the component are involved in the
+    * comparison.  Thus, to have a consistent comparison all components
+    * must have control volumes, or no control volumes should be used at all.
+    */
+   void
+   compareToScalar(
+      const tbox::Pointer<SAMRAIVectorReal<TYPE> > x,
+      const TYPE& alpha);
+
+   /**
+    * Wherever @f$ cvol_i > 0 @f$  in the set of vector data indices, set
+    * @f$ w_i = 1/x_i @f$  if @f$ x_i \neq 0 @f$ , and @f$ w_i = 0 @f$  otherwise.  Here, @f$ w_i @f$
+    * is a data entry in this vector.  If the control volume is undefined for a
+    * component, all data values for the component are involved in the
+    * operation.  Thus, to have a consistent operation all components
+    * must have control volumes, or no control volumes should be used at all.
+    */
+   int
+   testReciprocal(
+      const tbox::Pointer<SAMRAIVectorReal<TYPE> > x);
+
+   /*!
+    * @brief Compute max of "conditional" quotients of two arrays.
+    *
+    * Return the maximum of pointwise "conditional" quotients of the numerator
+    * and denominator.
+    *
+    * The "conditional" quotient is defined as |numerator/denominator|
+    * if the denominator is nonzero.  Otherwise, it is defined as
+    * |numerator|.
+    *
+    * @b Note: This method is currently intended to support the
+    * PETSc-2.1.6 vector wrapper only.  Please do not use it!
+    */
+   TYPE
+   maxPointwiseDivide(
+      const tbox::Pointer<SAMRAIVectorReal<TYPE> > denom)
+   const;
+
+   //@}
+
+private:
+   // The following are not implemented
+   SAMRAIVectorReal(
+      const SAMRAIVectorReal<TYPE>&);
+   void
+   operator = (
+      const SAMRAIVectorReal<TYPE>&);
+
+   /*
+    * Private member function to set number of vector components.  This
+    * is used during cloning.
+    */
+   void
+   setNumberOfComponents(
+      int num_comp);
+
+   /*
+    * Private function to set attributes for the specified vector component.
+    * The component will be associated with the given variable and patch
+    * data index information.  This function is specialized for
+    * either double or float vector types.  This function is called from
+    * addComponent() and clonevector().
+    *
+    * A non-recoverable assertion will be thrown if component id is
+    * greater than the number of componenents in the vector.
+    */
+#ifdef _MSC_VER
+   tbox::Pointer<math::HierarchyDataOpsReal<TYPE> > _bug_in_msvc;
+#endif
+   void
+   setComponent(
+      const int comp_id,
+      const tbox::Pointer<hier::Variable>& var,
+      const int data_id,
+      const int control_vol_id = -1,
+      const tbox::Pointer<math::HierarchyDataOpsReal<TYPE> > vop =
+         (tbox::Pointer<math::HierarchyDataOpsReal<TYPE> >)(NULL));
+
+   static int s_instance_counter[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   // shared data operations for variaous array-based types...
+   static tbox::Pointer<math::HierarchyDataOpsReal<TYPE> > s_cell_ops[tbox::
+                                                                      Dimension
+                                                                      ::
+                                                                      MAXIMUM_DIMENSION_VALUE];
+   static tbox::Pointer<math::HierarchyDataOpsReal<TYPE> > s_edge_ops[tbox::
+                                                                      Dimension
+                                                                      ::
+                                                                      MAXIMUM_DIMENSION_VALUE];
+   static tbox::Pointer<math::HierarchyDataOpsReal<TYPE> > s_face_ops[tbox::
+                                                                      Dimension
+                                                                      ::
+                                                                      MAXIMUM_DIMENSION_VALUE];
+   static tbox::Pointer<math::HierarchyDataOpsReal<TYPE> > s_node_ops[tbox::
+                                                                      Dimension
+                                                                      ::
+                                                                      MAXIMUM_DIMENSION_VALUE];
+   static tbox::Pointer<math::HierarchyDataOpsReal<TYPE> > s_side_ops[tbox::
+                                                                      Dimension
+                                                                      ::
+                                                                      MAXIMUM_DIMENSION_VALUE];
+
+   std::string d_vector_name;
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+   int d_coarsest_level;
+   int d_finest_level;
+
+   int d_number_components;
+
+   // arrays for component information whose size is the number of components
+   tbox::Array<tbox::Pointer<hier::Variable> > d_component_variable;
+   tbox::Array<int> d_component_data_id;
+   tbox::Array<tbox::Pointer<math::HierarchyDataOpsReal<TYPE> > >
+   d_component_operations;
+   tbox::Array<int> d_control_volume_data_id;
+
+   // map from variable instance id to vector component index:
+   // size = largest instance id over all variables in vector.
+   tbox::Array<int> d_variableid_2_vectorcomponent_map;
+
+   // output stream for vector data
+   std::ostream* d_output_stream;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/solv/SAMRAIVectorReal.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/solv/SAMRAIVectorReal.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/SNESAbstractFunctions.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/SNESAbstractFunctions.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,29 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to user functions for SAMRAI-based PETSc SNES context 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/solv/SNESAbstractFunctions.h"
+
+#ifdef HAVE_PETSC
+
+namespace SAMRAI {
+namespace solv {
+
+SNESAbstractFunctions::SNESAbstractFunctions()
+{
+}
+
+SNESAbstractFunctions::~SNESAbstractFunctions()
+{
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/SNESAbstractFunctions.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/SNESAbstractFunctions.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,162 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to user functions for SAMRAI-based PETSc SNES context 
+ *
+ ************************************************************************/
+
+#ifndef included_solv_SNESAbstractFunctions
+#define included_solv_SNESAbstractFunctions
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#ifdef HAVE_PETSC
+
+/*
+ * This is needed since petsc defines MPICH_SKIP_MPICXX so if SAMRAI
+ * has already defined it the compile will fail.
+ */
+#ifndef samrai_included_petsc_snes
+#define samrai_included_petsc_snes
+#ifdef MPICH_SKIP_MPICXX
+#undef MPICH_SKIP_MPICXX
+#endif
+
+extern "C" {
+#ifdef PETSC2028
+#include "snes.h"
+#else
+#include "petscsnes.h"
+#endif
+}
+#endif
+
+#ifndef MPICH_SKIP_MPICXX
+#define MPICH_SKIP_MPICXX
+#endif
+
+#ifdef REQUIRES_CMATH
+#include <cmath>
+#endif
+
+/*
+ ************************************************************************
+ *  THIS CLASS WILL BE UNDEFINED IF THE LIBRARY IS BUILT WITHOUT PETSC
+ ************************************************************************
+ */
+
+namespace SAMRAI {
+namespace solv {
+
+/*!
+ * @brief Abstract base class that declares
+ * the functions to be used with the PETSc SNES nonlinear solver package.
+ *
+ * Class SNESAbstractFunctions is an abstract base class that declares
+ * the functions to be used with the PETSc SNES nonlinear solver package.
+ * This class works in cooperation with the SNES_SAMRAIContext class.
+ * To provide these functions to the PETSc SNES solver package, a subclass
+ * of this base class must be instantiated and be supplied to the
+ * SNES_SAMRAIContext constructor.  Pointers to these functions will
+ * be stored in a SNES context and invoked from within the nonlinear solver.
+ * Note that the virtual members of this class are all protected.  They should
+ * not be used outside of a subclass of this class.
+ *
+ * @see solv::SNES_SAMRAIContext
+ */
+
+class SNESAbstractFunctions
+{
+public:
+   /*!
+    * Uninteresting constructor for SNESAbstractFunctions.
+    */
+   SNESAbstractFunctions();
+
+   /*!
+    * Uninteresting destructor for SNESAbstractFunctions.
+    */
+   virtual ~SNESAbstractFunctions();
+
+   /*!
+    * User-supplied nonlinear function evaluation.  Returns 0 if successful.
+    * Arguments:
+    *
+    * @param xcur (IN) the current iterate for the nonlinear system
+    * @param fcur (OUT) current function value
+    *
+    * IMPORTANT: This function must not modify xcur.
+    */
+   virtual int
+   evaluateNonlinearFunction(
+      Vec xcur,
+      Vec fcur) = 0;
+
+   /*!
+    * Optional user-supplied routine to evaluate the Jacobian of the
+    * system.  This function can be empty if the matrix-free option
+    * has been selected.  Returns 0 if successful.  Arguments:
+    *
+    * @param x (IN) current Newton iterate.
+    *
+    * IMPORTANT: This function must not modify x.
+    */
+   virtual int
+   evaluateJacobian(
+      Vec x) = 0;
+
+   /*!
+    * Optional user-supplied Jacobian-vector product routine.  This
+    * function can be empty if the matrix-free option has been selected.
+    * Returns 0 if successful.  Arguments:
+    *
+    *  @param x (IN) vector to be multiplied by the Jacobian.
+    *  @param y (OUT) the product of the Jacobian and vector
+    *
+    * IMPORTANT: This function must not modify x.
+    */
+   virtual int
+   jacobianTimesVector(
+      Vec x,
+      Vec y) = 0;
+
+   /*!
+    * User-supplied preconditioner setup function.  The setup
+    * function is called to provide matrix data for the subsequent
+    * call(s) to applyPreconditioner().  The integer return value
+    * is a flag indicating success if 0 is returned, and failure
+    * otherwise.  Together setupPreconditioner() and applyPreconditioner()
+    * form a right preconditoner for the PETSc Krylov solver.
+    * Returns 0 if successful.
+    *
+    */
+   virtual int
+   setupPreconditioner(
+      Vec xcur) = 0;
+
+   /*!
+    * User-supplied preconditioner solve function.  This function must
+    * solve \f$M z = r\f$, where \f$M\f$ is the right preconditioner
+    * matrix formed by setupPreconditioner(). The integer return value
+    * is a flag indicating success if 0 is returned, and failure otherwise.
+    * Arguments:
+    *
+    * @param r (IN) right-hand side of preconditioning system
+    * @param z (OUT) result of applying preconditioner to right-hand side
+    *
+    * IMPORTANT: This function must not modify r.
+    */
+   virtual int
+   applyPreconditioner(
+      Vec r,
+      Vec z) = 0;
+};
+
+}
+}
+
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/SNES_SAMRAIContext.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/SNES_SAMRAIContext.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1272 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Wrapper for SNES solver for use in a SAMRAI-based application. 
+ *
+ ************************************************************************/
+
+#ifndef included_solv_SNES_SAMRAIContext_C
+#define included_solv_SNES_SAMRAIContext_C
+
+#include "SAMRAI/solv/SNES_SAMRAIContext.h"
+
+#include "SAMRAI/solv/PETSc_SAMRAIVectorReal.h"
+#include "SAMRAI/solv/SAMRAIVectorReal.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifdef HAVE_PETSC
+
+#define SOLV_SNES_SAMRAI_CONTEXT_VERSION (1)
+
+namespace SAMRAI {
+namespace solv {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Static member functions that provide linkage with PETSc/SNES package. *
+ * See header file for SNESAbstractFunctions for more information.  *
+ *                                                                       *
+ *************************************************************************
+ */
+int SNES_SAMRAIContext::SNESFuncEval(
+   SNES snes,
+   Vec x,
+   Vec f,
+   void* ctx)
+{
+   NULL_USE(snes);
+   ((SNES_SAMRAIContext *)ctx)->getSNESFunctions()->
+   evaluateNonlinearFunction(x, f);
+   return 0;
+}
+
+int SNES_SAMRAIContext::SNESJacobianSet(
+   SNES snes,
+   Vec x,
+   Mat* A,
+   Mat* B,
+   MatStructure* mstruct,
+   void* ctx)
+{
+   NULL_USE(snes);
+   NULL_USE(B);
+   NULL_USE(mstruct);
+   int retval = 0;
+   if (((SNES_SAMRAIContext *)ctx)->getUsesExplicitJacobian()) {
+      retval =
+         ((SNES_SAMRAIContext *)ctx)->getSNESFunctions()->
+         evaluateJacobian(x);
+   } else {
+      int ierr = MatAssemblyBegin(*A, MAT_FINAL_ASSEMBLY);
+      PETSC_SAMRAI_ERROR(ierr);
+      ierr = MatAssemblyEnd(*A, MAT_FINAL_ASSEMBLY);
+      PETSC_SAMRAI_ERROR(ierr);
+   }
+   return retval;
+}
+
+int SNES_SAMRAIContext::SNESJacobianTimesVector(
+   Mat M,
+   Vec xin,
+   Vec xout)
+{
+   void* ctx;
+   int ierr = 0;
+   NULL_USE(ierr);
+
+   ierr = MatShellGetContext(M, &ctx);
+   PETSC_SAMRAI_ERROR(ierr);
+   return ((SNES_SAMRAIContext *)ctx)->
+          getSNESFunctions()->jacobianTimesVector(xin, xout);
+}
+
+int SNES_SAMRAIContext::SNESsetupPreconditioner(
+   void* ctx)
+{
+   int ierr = 0;
+   Vec current_solution;
+   ierr = SNESGetSolution(((SNES_SAMRAIContext *)ctx)->getSNESSolver(),
+         &current_solution);
+   PETSC_SAMRAI_ERROR(ierr);
+   return ((SNES_SAMRAIContext *)ctx)->
+          getSNESFunctions()->setupPreconditioner(current_solution);
+}
+
+int SNES_SAMRAIContext::SNESapplyPreconditioner(
+   void* ctx,
+   Vec r,
+   Vec z)
+{
+   return ((SNES_SAMRAIContext *)ctx)->
+          getSNESFunctions()->applyPreconditioner(r, z);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor and destructor for SNES_SAMRAIContext.  The         *
+ * constructor sets default values for data members, then overrides      *
+ * them with values read from input or restart.  The destructor destroys *
+ * the SNES object.                                                      *
+ *                                                                       *
+ *************************************************************************
+ */
+SNES_SAMRAIContext::SNES_SAMRAIContext(
+   const std::string& object_name,
+   tbox::Pointer<tbox::Database> input_db,
+   SNESAbstractFunctions* my_functions)
+{
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!input_db.isNull());
+   TBOX_ASSERT(!(my_functions == (SNESAbstractFunctions *)NULL));
+
+   d_object_name = object_name;
+   d_context_needs_initialization = true;
+   tbox::RestartManager::getManager()->registerRestartItem(d_object_name,
+      this);
+
+   /*
+    * Set default state.
+    */
+
+   d_SNES_solver = ((SNES)NULL);
+   d_krylov_solver = ((KSP)NULL);
+   d_jacobian = ((Mat)NULL);
+   d_preconditioner = ((PC)NULL);
+   d_solution_vector = ((Vec)NULL);
+   d_residual_vector = ((Vec)NULL);
+
+   d_SNES_functions = my_functions;
+
+   /*
+    * Default nonlinear solver parameters.
+    */
+
+   d_absolute_tolerance = PETSC_DEFAULT;
+   d_relative_tolerance = PETSC_DEFAULT;
+   d_step_tolerance = PETSC_DEFAULT;
+   d_maximum_nonlinear_iterations = PETSC_DEFAULT;
+   d_maximum_function_evals = PETSC_DEFAULT;
+
+   d_forcing_term_strategy = "CONSTANT";
+   d_forcing_term_flag = PETSC_DEFAULT;
+
+   d_constant_forcing_term = PETSC_DEFAULT;
+   d_initial_forcing_term = PETSC_DEFAULT;
+   d_maximum_forcing_term = PETSC_DEFAULT;
+   d_EW_choice2_alpha = PETSC_DEFAULT;
+   d_EW_choice2_gamma = PETSC_DEFAULT;
+   d_EW_safeguard_exponent = PETSC_DEFAULT;
+   d_EW_safeguard_disable_threshold = PETSC_DEFAULT;
+
+   d_SNES_completion_code = SNES_CONVERGED_ITERATING;
+
+   /*
+    * Default linear solver parameters.
+    */
+
+   d_linear_solver_absolute_tolerance = PETSC_DEFAULT;
+   d_linear_solver_divergence_tolerance = PETSC_DEFAULT;
+   d_maximum_linear_iterations = PETSC_DEFAULT;
+
+   d_maximum_gmres_krylov_dimension = PETSC_DEFAULT;
+   d_gmres_orthogonalization_algorithm = PETSC_DEFAULT;
+
+   /*
+    * Default "Matrix-free" parameters.
+    */
+
+   d_function_evaluation_error = PETSC_DEFAULT;
+   d_differencing_parameter_strategy = MATMFFD_WP;
+
+   /*
+    * Default output parameters.
+    */
+
+   d_nonlinear_iterations = 0;
+
+   /*
+    * Initialize members with data read from the input and restart
+    * databases.  Note that PETSc object parameters are set in
+    * initialize().
+    */
+
+   if (tbox::RestartManager::getManager()->isFromRestart()) {
+      getFromRestart();
+   }
+   getFromInput(input_db);
+
+}
+
+SNES_SAMRAIContext::~SNES_SAMRAIContext()
+{
+   if (d_solution_vector) {
+      PETSc_SAMRAIVectorReal<double>::destroyPETScVector(
+         d_solution_vector);
+   }
+
+   if (d_residual_vector) {
+      PETSc_SAMRAIVectorReal<double>::destroyPETScVector(
+         d_residual_vector);
+   }
+
+   destroyPetscObjects();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Access functions for PETSc objects, and user-supplied functions.      *
+ *                                                                       *
+ *************************************************************************
+ */
+SNES SNES_SAMRAIContext::getSNESSolver() const
+{
+   return d_SNES_solver;
+}
+
+SNESAbstractFunctions *SNES_SAMRAIContext::getSNESFunctions() const
+{
+   return d_SNES_functions;
+}
+
+KSP SNES_SAMRAIContext::getKrylovSolver() const
+{
+   return d_krylov_solver;
+}
+
+Mat SNES_SAMRAIContext::getJacobianMatrix() const
+{
+   return d_jacobian;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ *  Access functions for parameters that control solver behavior.        *
+ *                                                                       *
+ *************************************************************************
+ */
+double SNES_SAMRAIContext::getAbsoluteTolerance() const
+{
+   return d_absolute_tolerance;
+}
+
+void SNES_SAMRAIContext::setAbsoluteTolerance(
+   double abs_tol)
+{
+   d_absolute_tolerance = abs_tol;
+   d_context_needs_initialization = true;
+}
+
+double SNES_SAMRAIContext::getRelativeTolerance() const
+{
+   return d_relative_tolerance;
+}
+
+void SNES_SAMRAIContext::setRelativeTolerance(
+   double rel_tol)
+{
+   d_relative_tolerance = rel_tol;
+   d_context_needs_initialization = true;
+}
+
+double SNES_SAMRAIContext::getStepTolerance() const
+{
+   return d_step_tolerance;
+}
+
+void SNES_SAMRAIContext::setStepTolerance(
+   double step_tol)
+{
+   d_step_tolerance = step_tol;
+   d_context_needs_initialization = true;
+}
+
+int SNES_SAMRAIContext::getMaxNonlinearIterations() const
+{
+   return d_maximum_nonlinear_iterations;
+}
+
+void SNES_SAMRAIContext::setMaxNonlinearIterations(
+   int max_nli)
+{
+   d_maximum_nonlinear_iterations = max_nli;
+   d_context_needs_initialization = true;
+}
+
+int SNES_SAMRAIContext::getMaxFunctionEvaluations() const
+{
+   return d_maximum_function_evals;
+}
+
+void SNES_SAMRAIContext::setMaxFunctionEvaluations(
+   int max_feval)
+{
+   d_maximum_function_evals = max_feval;
+   d_context_needs_initialization = true;
+}
+
+std::string SNES_SAMRAIContext::getForcingTermStrategy() const
+{
+   return d_forcing_term_strategy;
+}
+
+void SNES_SAMRAIContext::setForcingTermStrategy(
+   std::string& strategy)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(strategy == "CONSTANT" ||
+      strategy == "EWCHOICE1" ||
+      strategy == "EWCHOICE2");
+#endif
+   d_forcing_term_strategy = strategy;
+   d_context_needs_initialization = true;
+}
+
+double SNES_SAMRAIContext::getConstantForcingTerm() const
+{
+   return d_constant_forcing_term;
+}
+
+void SNES_SAMRAIContext::setConstantForcingTerm(
+   double fixed_eta)
+{
+   d_constant_forcing_term = fixed_eta;
+   d_context_needs_initialization = true;
+}
+
+double SNES_SAMRAIContext::getInitialForcingTerm() const
+{
+   return d_initial_forcing_term;
+}
+
+void SNES_SAMRAIContext::setInitialForcingTerm(
+   double initial_eta)
+{
+   d_initial_forcing_term = initial_eta;
+   d_context_needs_initialization = true;
+}
+
+double SNES_SAMRAIContext::getMaximumForcingTerm() const
+{
+   return d_maximum_forcing_term;
+}
+
+void SNES_SAMRAIContext::setMaximumForcingTerm(
+   double max_eta)
+{
+   d_maximum_forcing_term = max_eta;
+   d_context_needs_initialization = true;
+}
+
+double SNES_SAMRAIContext::getEWChoice2Exponent() const
+{
+   return d_EW_choice2_alpha;
+}
+
+void SNES_SAMRAIContext::setEWChoice2Exponent(
+   double alpha)
+{
+   d_EW_choice2_alpha = alpha;
+   d_context_needs_initialization = true;
+}
+
+double SNES_SAMRAIContext::getEWChoice2SafeguardExponent() const
+{
+   return d_EW_safeguard_exponent;
+}
+
+void SNES_SAMRAIContext::setEWChoice2SafeguardExponent(
+   double beta)
+{
+   d_EW_safeguard_exponent = beta;
+   d_context_needs_initialization = true;
+}
+
+double SNES_SAMRAIContext::getEWChoice2ScaleFactor() const
+{
+   return d_EW_choice2_gamma;
+}
+
+void SNES_SAMRAIContext::setEWChoice2ScaleFactor(
+   double gamma)
+{
+   d_EW_choice2_gamma = gamma;
+   d_context_needs_initialization = true;
+}
+
+double SNES_SAMRAIContext::getEWSafeguardThreshold() const
+{
+   return d_EW_safeguard_disable_threshold;
+}
+
+void SNES_SAMRAIContext::setEWSafeguardThreshold(
+   double threshold)
+{
+   d_EW_safeguard_disable_threshold = threshold;
+   d_context_needs_initialization = true;
+}
+
+std::string SNES_SAMRAIContext::getLinearSolverType() const
+{
+   return d_linear_solver_type;
+}
+
+void SNES_SAMRAIContext::setLinearSolverType(
+   std::string& type)
+{
+   d_linear_solver_type = type;
+   d_context_needs_initialization = true;
+}
+
+bool SNES_SAMRAIContext::getUsesPreconditioner() const
+{
+   return d_uses_preconditioner;
+}
+
+void SNES_SAMRAIContext::setUsesPreconditioner(
+   bool uses_preconditioner)
+{
+   d_uses_preconditioner = uses_preconditioner;
+   d_context_needs_initialization = true;
+}
+
+double SNES_SAMRAIContext::getLinearSolverAbsoluteTolerance() const
+{
+   return d_linear_solver_absolute_tolerance;
+}
+
+void SNES_SAMRAIContext::setLinearSolverAbsoluteTolerance(
+   double abs_tol)
+{
+   d_linear_solver_absolute_tolerance = abs_tol;
+   d_context_needs_initialization = true;
+}
+
+double SNES_SAMRAIContext::getLinearSolverDivergenceTolerance() const
+{
+   return d_linear_solver_divergence_tolerance;
+}
+
+void SNES_SAMRAIContext::setLinearSolverDivergenceTolerance(
+   double div_tol)
+{
+   d_linear_solver_divergence_tolerance = div_tol;
+   d_context_needs_initialization = true;
+}
+
+int SNES_SAMRAIContext::getMaximumLinearIterations() const
+{
+   return d_maximum_linear_iterations;
+}
+
+void SNES_SAMRAIContext::setMaximumLinearIterations(
+   int max_li)
+{
+   d_maximum_linear_iterations = max_li;
+   d_context_needs_initialization = true;
+}
+
+int SNES_SAMRAIContext::getMaximumGMRESKrylovDimension() const
+{
+   return d_maximum_gmres_krylov_dimension;
+}
+
+void SNES_SAMRAIContext::setMaximumGMRESKrylovDimension(
+   int d)
+{
+   d_maximum_gmres_krylov_dimension = d;
+   d_context_needs_initialization = true;
+}
+
+std::string SNES_SAMRAIContext::getGMRESOrthogonalizationMethod() const
+{
+   return d_gmres_orthogonalization_algorithm;
+}
+
+void SNES_SAMRAIContext::setGMRESOrthogonalizationMethod(
+   std::string& method)
+{
+   d_gmres_orthogonalization_algorithm = method;
+   d_context_needs_initialization = true;
+}
+
+bool SNES_SAMRAIContext::getUsesExplicitJacobian() const
+{
+   return d_uses_explicit_jacobian;
+}
+
+void SNES_SAMRAIContext::setUsesExplicitJacobian(
+   bool use_jac)
+{
+   d_uses_explicit_jacobian = use_jac;
+   d_context_needs_initialization = true;
+}
+
+std::string SNES_SAMRAIContext::getDifferencingParameterMethod() const
+{
+   return d_differencing_parameter_strategy;
+}
+
+void SNES_SAMRAIContext::setDifferencingParameterMethod(
+   std::string& method)
+{
+   d_differencing_parameter_strategy = method;
+   d_context_needs_initialization = true;
+}
+
+double SNES_SAMRAIContext::getFunctionEvaluationError() const
+{
+   return d_function_evaluation_error;
+}
+
+void SNES_SAMRAIContext::setFunctionEvaluationError(
+   double evaluation_error)
+{
+   d_function_evaluation_error = evaluation_error;
+   d_context_needs_initialization = true;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to initialize PETSc/SNES solver and solve nonlinear system.  *
+ *                                                                       *
+ *************************************************************************
+ */
+void SNES_SAMRAIContext::initialize(
+   tbox::Pointer<SAMRAIVectorReal<double> > solution)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!solution.isNull());
+#endif
+
+   /*
+    * Set up vectors for solution and nonlinear residual.
+    */
+
+   d_solution_vector =
+      PETSc_SAMRAIVectorReal<double>::createPETScVector(solution);
+
+   tbox::Pointer<SAMRAIVectorReal<double> > residual =
+      solution->cloneVector("residual");
+   residual->allocateVectorData();
+   d_residual_vector =
+      PETSc_SAMRAIVectorReal<double>::createPETScVector(residual);
+
+   createPetscObjects();
+   initializePetscObjects();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Reset the state of the nonlinear solver.                              *
+ *                                                                       *
+ *************************************************************************
+ */
+void SNES_SAMRAIContext::resetSolver(
+   const int coarsest_level,
+   const int finest_level)
+{
+   tbox::Pointer<SAMRAIVectorReal<double> > solution_vector =
+      PETSc_SAMRAIVectorReal<double>::getSAMRAIVector(
+         d_solution_vector);
+   solution_vector->deallocateVectorData();
+   solution_vector->resetLevels(coarsest_level, finest_level);
+   solution_vector->allocateVectorData();
+
+   tbox::Pointer<SAMRAIVectorReal<double> > residual_vector =
+      PETSc_SAMRAIVectorReal<double>::getSAMRAIVector(
+         d_residual_vector);
+   residual_vector->deallocateVectorData();
+   residual_vector->resetLevels(coarsest_level, finest_level);
+   residual_vector->allocateVectorData();
+
+   destroyPetscObjects();
+   createPetscObjects();
+   initializePetscObjects();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Solve the nonlinear system.                                           *
+ *                                                                       *
+ *************************************************************************
+ */
+int SNES_SAMRAIContext::solve()
+{
+   int ierr;
+
+   if (d_context_needs_initialization) initializePetscObjects();
+
+   Vec initial_guess;
+
+   ierr = VecDuplicate(d_solution_vector, &initial_guess);
+   PETSC_SAMRAI_ERROR(ierr);
+
+   ierr = VecSet(initial_guess, 0.0);
+   PETSC_SAMRAI_ERROR(ierr);
+   ierr = SNESSolve(d_SNES_solver,
+         initial_guess,
+         d_solution_vector);
+   PETSC_SAMRAI_ERROR(ierr);
+
+   ierr = SNESGetIterationNumber(d_SNES_solver,
+         &d_nonlinear_iterations);
+   PETSC_SAMRAI_ERROR(ierr);
+
+   ierr = SNESGetConvergedReason(d_SNES_solver,
+         &d_SNES_completion_code);
+   PETSC_SAMRAI_ERROR(ierr);
+
+   ierr = VecDestroy(initial_guess);
+   PETSC_SAMRAI_ERROR(ierr);
+
+   return ((int)d_SNES_completion_code > 0) ? 1 : 0;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Get the number of nonlinear iterations used in last solve.            *
+ *                                                                       *
+ *************************************************************************
+ */
+int SNES_SAMRAIContext::getNumberOfNonlinearIterations() const
+{
+   return d_nonlinear_iterations;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Get the total number of linear iterations used in last solve.         *
+ *                                                                       *
+ *************************************************************************
+ */
+int SNES_SAMRAIContext::getTotalNumberOfLinearIterations() const
+{
+   int linear_itns;
+   int ierr = SNESGetLinearSolveIterations(d_SNES_solver,
+         &linear_itns);
+   PETSC_SAMRAI_ERROR(ierr);
+   return linear_itns;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ *  Report the reason for termination of nonlinear iterations.  SNES     *
+ *  return codes are translated here, and a message is placed in the     *
+ *  specified output stream.  Test only on relevant completion codes.    *
+ *                                                                       *
+ *************************************************************************
+ */
+void SNES_SAMRAIContext::reportCompletionCode(
+   std::ostream& os) const
+{
+   switch ((int)d_SNES_completion_code) {
+      case SNES_CONVERGED_FNORM_ABS:
+         os << " Fnorm less than specified absolute tolerance.\n";
+         break;
+      case SNES_CONVERGED_FNORM_RELATIVE:
+         os << " Fnorm less than specified relative tolerance.\n";
+         break;
+      case SNES_CONVERGED_PNORM_RELATIVE:
+         os << " Step size less than specified tolerance.\n";
+         break;
+      case SNES_DIVERGED_FUNCTION_COUNT:
+         os << " Maximum function evaluation count exceeded.\n";
+         break;
+      case SNES_DIVERGED_FNORM_NAN:
+         os << " Norm of F is NAN.\n";
+         break;
+      case SNES_DIVERGED_MAX_IT:
+         os << " Maximum nonlinear iteration count exceeded.\n";
+         break;
+      case SNES_DIVERGED_LS_FAILURE:
+         os << " Failure in linesearch procedure.\n";
+         break;
+      default:
+         os << " Inappropriate completion code reported.\n";
+         break;
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create needed Petsc objects and cache a pointer to them.              *
+ *                                                                       *
+ *************************************************************************
+ */
+void SNES_SAMRAIContext::createPetscObjects()
+{
+   int ierr = 0;
+   NULL_USE(ierr);
+
+   /*
+    * Create the nonlinear solver, specify linesearch backtracking,
+    * and register method for nonlinear residual evaluation.
+    */
+   ierr = SNESCreate(PETSC_COMM_SELF,
+         &d_SNES_solver);
+   PETSC_SAMRAI_ERROR(ierr);
+
+   ierr = SNESSetType(d_SNES_solver,
+         SNESLS);
+   PETSC_SAMRAI_ERROR(ierr);
+
+   ierr = SNESSetFunction(d_SNES_solver,
+         d_residual_vector,
+         SNES_SAMRAIContext::SNESFuncEval,
+         (void *)this);
+   PETSC_SAMRAI_ERROR(ierr);
+   /*
+    * Cache the linear solver object, as well as the wrapped Krylov
+    * solver and preconditioner.
+    */
+//   ierr = SNESGetSLES(d_SNES_solver,
+//                      &d_SLES_solver);
+//                      PETSC_SAMRAI_ERROR(ierr);
+
+//   ierr = SLESGetKSP(d_SLES_solver,
+//                     &d_krylov_solver);
+//                     PETSC_SAMRAI_ERROR(ierr);
+
+   ierr = SNESGetKSP(d_SNES_solver,
+         &d_krylov_solver);
+   PETSC_SAMRAI_ERROR(ierr);
+
+   ierr = KSPSetPreconditionerSide(d_krylov_solver,
+         PC_RIGHT);
+   PETSC_SAMRAI_ERROR(ierr);
+
+   ierr = KSPGetPC(d_krylov_solver,
+         &d_preconditioner);
+   PETSC_SAMRAI_ERROR(ierr);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialize the state of cached Petsc objects from cached information. *
+ *                                                                       *
+ *************************************************************************
+ */
+void SNES_SAMRAIContext::initializePetscObjects()
+{
+   int ierr = 0;
+   NULL_USE(ierr);
+
+   /*
+    * Set tolerances in nonlinear solver.  Also set parameters if
+    * the Jacobian-free option has been selected.
+    */
+   ierr = SNESSetTolerances(d_SNES_solver,
+         d_absolute_tolerance,
+         d_relative_tolerance,
+         d_step_tolerance,
+         d_maximum_nonlinear_iterations,
+         d_maximum_function_evals);
+   PETSC_SAMRAI_ERROR(ierr);
+
+   if (!(d_forcing_term_strategy == "CONSTANT")) {
+
+      ierr = SNESKSPSetUseEW(d_SNES_solver, PETSC_TRUE);
+      PETSC_SAMRAI_ERROR(ierr);
+
+      ierr = SNESKSPSetParametersEW(d_SNES_solver,
+            d_forcing_term_flag,
+            d_initial_forcing_term,
+            d_maximum_forcing_term,
+            d_EW_choice2_gamma,
+            d_EW_choice2_alpha,
+            d_EW_safeguard_exponent,
+            d_EW_safeguard_disable_threshold);
+      PETSC_SAMRAI_ERROR(ierr);
+   }
+
+   /*
+    * Create data structures needed for Jacobian.  This is done
+    * here in case an application toggles use of an explicit
+    * Jacobian within a run.
+    *
+    * First delete any Jacobian object that already has been created.
+    */
+   if (d_jacobian) MatDestroy(d_jacobian);
+   if (d_uses_explicit_jacobian) {
+
+      ierr = MatCreateShell(PETSC_COMM_SELF,
+            0,                   // dummy number of local rows
+            0,                   // dummy number of local columns
+            PETSC_DETERMINE,
+            PETSC_DETERMINE,
+            (void *)this,
+            &d_jacobian);
+      PETSC_SAMRAI_ERROR(ierr);
+
+      ierr = MatShellSetOperation(d_jacobian,
+            MATOP_MULT,
+            (void (*)()) SNES_SAMRAIContext::
+            SNESJacobianTimesVector);
+      PETSC_SAMRAI_ERROR(ierr);
+
+   } else {
+
+      ierr = MatCreateSNESMF(d_SNES_solver,
+            &d_jacobian);
+      PETSC_SAMRAI_ERROR(ierr);
+
+      ierr = MatMFFDSetType(
+            d_jacobian,
+            (MatMFFDType)d_differencing_parameter_strategy.c_str());
+
+      ierr = MatMFFDSetFunctionError(d_jacobian,
+            d_function_evaluation_error);
+   }
+
+   /*
+    * Register method for setting up Jacobian; this is the same
+    * for both options.
+    *
+    * N.B.  In principle, the second Mat argument should not
+    * be the same as the first Mat argument.  However we
+    * restrict to either no preconditioner, or a shell
+    * preconditioner; in these circumstances that seems to
+    * cause no problem, since the shell preconditioner provides
+    * its own setup method.
+    */
+   ierr = SNESSetJacobian(d_SNES_solver,
+         d_jacobian,
+         d_jacobian,
+         SNES_SAMRAIContext::SNESJacobianSet,
+         (void *)this);
+   PETSC_SAMRAI_ERROR(ierr);
+
+   /*
+    * Initialize the Krylov solver object.  This includes setting the
+    * type of Krylov method that is used and tolerances used by the
+    * method.
+    */
+   ierr = KSPSetType(d_krylov_solver,
+         (KSPType)d_linear_solver_type.c_str());
+   PETSC_SAMRAI_ERROR(ierr);
+
+   if (d_linear_solver_type == "gmres") {
+
+      ierr = KSPGMRESSetRestart(
+            d_krylov_solver,
+            d_maximum_gmres_krylov_dimension);
+      PETSC_SAMRAI_ERROR(ierr);
+
+      if (d_gmres_orthogonalization_algorithm == "modifiedgramschmidt") {
+
+         ierr = KSPGMRESSetOrthogonalization(
+               d_krylov_solver,
+               KSPGMRESModifiedGramSchmidtOrthogonalization);
+         PETSC_SAMRAI_ERROR(ierr);
+
+      } else if (d_gmres_orthogonalization_algorithm ==
+                 "gmres_cgs_refine_ifneeded") {
+
+         ierr = KSPGMRESSetCGSRefinementType(
+               d_krylov_solver,
+               KSP_GMRES_CGS_REFINE_IFNEEDED);
+         PETSC_SAMRAI_ERROR(ierr);
+      } else if (d_gmres_orthogonalization_algorithm ==
+                 "gmres_cgs_refine_always") {
+
+         ierr = KSPGMRESSetCGSRefinementType(
+               d_krylov_solver,
+               KSP_GMRES_CGS_REFINE_ALWAYS);
+         PETSC_SAMRAI_ERROR(ierr);
+      }
+   }
+
+   if (d_forcing_term_strategy == "CONSTANT") {
+
+      ierr = KSPSetTolerances(d_krylov_solver,
+            d_constant_forcing_term,
+            d_linear_solver_absolute_tolerance,
+            d_linear_solver_divergence_tolerance,
+            d_maximum_linear_iterations);
+      PETSC_SAMRAI_ERROR(ierr);
+   }
+
+   /*
+    * Initialize the precondtioner.  Only shell PCs are supported.
+    * For these, register the methods used to set up and apply
+    * the preconditioner.
+    */
+   if (d_uses_preconditioner) {
+
+      std::string pc_type = "shell";
+      ierr = PCSetType(d_preconditioner,
+            (PCType)pc_type.c_str());
+      PETSC_SAMRAI_ERROR(ierr);
+
+      ierr = PCShellSetSetUp(
+            d_preconditioner,
+            SNES_SAMRAIContext::SNESsetupPreconditioner);
+      PETSC_SAMRAI_ERROR(ierr);
+
+      ierr = PCShellSetContext(d_preconditioner, this);
+      PETSC_SAMRAI_ERROR(ierr);
+
+      ierr = PCShellSetApply(d_preconditioner,
+            SNES_SAMRAIContext::SNESapplyPreconditioner);
+      PETSC_SAMRAI_ERROR(ierr);
+
+   } else {
+
+      std::string pc_type = "none";
+      ierr = PCSetType(d_preconditioner,
+            (PCType)pc_type.c_str());
+      PETSC_SAMRAI_ERROR(ierr);
+
+   }
+
+   d_context_needs_initialization = false;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destroy cached Petsc objects.                                         *
+ *                                                                       *
+ *************************************************************************
+ */
+void SNES_SAMRAIContext::destroyPetscObjects()
+{
+   if (d_jacobian) {
+      MatDestroy(d_jacobian);
+      d_jacobian = ((Mat)NULL);
+   }
+
+   if (d_SNES_solver) {
+      SNESDestroy(d_SNES_solver);
+//     if (d_SLES_solver) d_SLES_solver = ((SLES)NULL);
+      if (d_preconditioner) d_preconditioner = ((PC)NULL);
+      if (d_krylov_solver) d_krylov_solver = ((KSP)NULL);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Read parameters from input that are cached in this object.            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void SNES_SAMRAIContext::getFromInput(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   if (db->keyExists("maximum_nonlinear_iterations")) {
+      d_maximum_nonlinear_iterations =
+         db->getInteger("maximum_nonlinear_iterations");
+   }
+   if (db->keyExists("maximum_function_evals")) {
+      d_maximum_function_evals = db->getInteger("maximum_function_evals");
+   }
+
+   if (db->keyExists("uses_preconditioner")) {
+      d_uses_preconditioner = db->getBool("uses_preconditioner");
+   }
+   if (db->keyExists("uses_explicit_jacobian")) {
+      d_uses_explicit_jacobian = db->getBool("uses_explicit_jacobian");
+   }
+   if (db->keyExists("absolute_tolerance")) {
+      d_absolute_tolerance = db->getDouble("absolute_tolerance");
+   }
+   if (db->keyExists("relative_tolerance")) {
+      d_relative_tolerance = db->getDouble("relative_tolerance");
+   }
+   if (db->keyExists("step_tolerance")) {
+      d_step_tolerance = db->getDouble("step_tolerance");
+   }
+
+   if (db->keyExists("forcing_term_strategy")) {
+      d_forcing_term_strategy = db->getString("forcing_term_strategy");
+      if (d_forcing_term_strategy == "EWCHOICE1") {
+         d_forcing_term_flag = 1;
+      } else if (d_forcing_term_strategy == "EWCHOICE2") {
+         d_forcing_term_flag = 2;
+      } else if (!(d_forcing_term_strategy == "CONSTANT")) {
+         TBOX_ERROR(
+            d_object_name << ": "
+            << "Key data `forcing_term_strategy' = "
+            << d_forcing_term_strategy
+            << " in input not recognized.");
+      }
+   }
+
+   if (db->keyExists("constant_forcing_term")) {
+      d_constant_forcing_term = db->getDouble("constant_forcing_term");
+   }
+   if (db->keyExists("initial_forcing_term")) {
+      d_initial_forcing_term = db->getDouble("initial_forcing_term");
+   }
+   if (db->keyExists("maximum_forcing_term")) {
+      d_maximum_forcing_term = db->getDouble("maximum_forcing_term");
+   }
+   if (db->keyExists("EW_choice2_alpha")) {
+      d_EW_choice2_alpha = db->getDouble("EW_choice2_alpha");
+   }
+   if (db->keyExists("EW_choice2_gamma")) {
+      d_EW_choice2_gamma = db->getDouble("EW_choice2_gamma");
+   }
+   if (db->keyExists("EW_safeguard_exponent")) {
+      d_EW_safeguard_exponent = db->getDouble("EW_safeguard_exponent");
+   }
+   if (db->keyExists("EW_safeguard_disable_threshold")) {
+      d_EW_safeguard_disable_threshold =
+         db->getDouble("EW_safeguard_disable_threshold");
+   }
+
+   if (db->keyExists("linear_solver_type")) {
+      d_linear_solver_type = db->getString("linear_solver_type");
+   }
+   if (db->keyExists("linear_solver_absolute_tolerance")) {
+      d_linear_solver_absolute_tolerance =
+         db->getDouble("linear_solver_absolute_tolerance");
+   }
+   if (db->keyExists("linear_solver_divergence_tolerance")) {
+      d_linear_solver_divergence_tolerance =
+         db->getDouble("linear_solver_divergence_tolerance");
+   }
+   if (db->keyExists("maximum_linear_iterations")) {
+      d_maximum_linear_iterations =
+         db->getInteger("maximum_linear_iterations");
+   }
+
+   if (db->keyExists("maximum_gmres_krylov_dimension")) {
+      d_maximum_gmres_krylov_dimension =
+         db->getInteger("maximum_gmres_krylov_dimension");
+   }
+   if (db->keyExists("gmres_orthogonalization_algorithm")) {
+      d_gmres_orthogonalization_algorithm =
+         db->getString("gmres_orthogonalization_algorithm");
+   }
+
+   if (db->keyExists("differencing_parameter_strategy")) {
+      d_differencing_parameter_strategy =
+         db->getString("differencing_parameter_strategy");
+   }
+   if (db->keyExists("function_evaluation_error")) {
+      d_function_evaluation_error =
+         db->getDouble("function_evaluation_error");
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to read/write from/to restart/database.                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void SNES_SAMRAIContext::getFromRestart()
+{
+
+   tbox::Pointer<tbox::Database> root_db =
+      tbox::RestartManager::getManager()->getRootDatabase();
+
+   tbox::Pointer<tbox::Database> db;
+   if (root_db->isDatabase(d_object_name)) {
+      db = root_db->getDatabase(d_object_name);
+   } else {
+      TBOX_ERROR("Restart database corresponding to "
+         << d_object_name << " not found in restart file");
+   }
+
+   int ver = db->getInteger("SOLV_SNES_SAMRAI_CONTEXT_VERSION");
+   if (ver != SOLV_SNES_SAMRAI_CONTEXT_VERSION) {
+      TBOX_ERROR(d_object_name << ":  "
+                               << "Restart file version different "
+                               << "than class version.");
+   }
+
+   d_uses_preconditioner = db->getBool("d_uses_preconditioner");
+   d_uses_explicit_jacobian = db->getBool("d_uses_explicit_jacobian");
+
+   d_maximum_nonlinear_iterations =
+      db->getInteger("d_maximum_nonlinear_iterations");
+   d_maximum_function_evals = db->getInteger("d_maximum_function_evals");
+
+   d_absolute_tolerance = db->getDouble("d_absolute_tolerance");
+   d_relative_tolerance = db->getDouble("d_relative_tolerance");
+   d_step_tolerance = db->getDouble("d_step_tolerance");
+
+   d_forcing_term_strategy = db->getString("d_forcing_term_strategy");
+   d_forcing_term_flag = db->getInteger("d_forcing_term_flag");
+
+   d_constant_forcing_term = db->getDouble("d_constant_forcing_term");
+   d_initial_forcing_term = db->getDouble("d_initial_forcing_term");
+   d_maximum_forcing_term = db->getDouble("d_maximum_forcing_term");
+   d_EW_choice2_alpha = db->getDouble("d_EW_choice2_alpha");
+   d_EW_choice2_gamma = db->getDouble("d_EW_choice2_gamma");
+   d_EW_safeguard_exponent = db->getDouble("d_EW_safeguard_exponent");
+   d_EW_safeguard_disable_threshold =
+      db->getDouble("d_EW_safeguard_disable_threshold");
+
+   d_linear_solver_type = db->getString("d_linear_solver_type");
+   d_linear_solver_absolute_tolerance =
+      db->getDouble("d_linear_solver_absolute_tolerance");
+   d_linear_solver_divergence_tolerance =
+      db->getDouble("d_linear_solver_divergence_tolerance");
+   d_maximum_linear_iterations =
+      db->getInteger("d_maximum_linear_iterations");
+
+   d_maximum_gmres_krylov_dimension =
+      db->getInteger("d_maximum_gmres_krylov_dimension");
+   d_gmres_orthogonalization_algorithm =
+      db->getString("d_gmres_orthogonalization_algorithm");
+
+   d_function_evaluation_error = db->getDouble("d_function_evaluation_error");
+   d_differencing_parameter_strategy =
+      db->getString("d_differencing_parameter_strategy");
+
+}
+
+void SNES_SAMRAIContext::putToDatabase(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   db->putInteger("SOLV_SNES_SAMRAI_CONTEXT_VERSION",
+      SOLV_SNES_SAMRAI_CONTEXT_VERSION);
+
+   db->putBool("d_uses_preconditioner", d_uses_preconditioner);
+   db->putBool("d_uses_explicit_jacobian", d_uses_explicit_jacobian);
+
+   db->putInteger("d_maximum_nonlinear_iterations",
+      d_maximum_nonlinear_iterations);
+   db->putInteger("d_maximum_function_evals", d_maximum_function_evals);
+
+   db->putDouble("d_absolute_tolerance", d_absolute_tolerance);
+   db->putDouble("d_relative_tolerance", d_relative_tolerance);
+   db->putDouble("d_step_tolerance", d_step_tolerance);
+
+   db->putString("d_forcing_term_strategy", d_forcing_term_strategy);
+   db->putInteger("d_forcing_term_flag", d_forcing_term_flag);
+
+   db->putDouble("d_constant_forcing_term", d_constant_forcing_term);
+   db->putDouble("d_initial_forcing_term", d_initial_forcing_term);
+   db->putDouble("d_maximum_forcing_term", d_maximum_forcing_term);
+   db->putDouble("d_EW_choice2_alpha", d_EW_choice2_alpha);
+   db->putDouble("d_EW_choice2_gamma", d_EW_choice2_gamma);
+   db->putDouble("d_EW_safeguard_exponent", d_EW_safeguard_exponent);
+   db->putDouble("d_EW_safeguard_disable_threshold",
+      d_EW_safeguard_disable_threshold);
+
+   db->putString("d_linear_solver_type", d_linear_solver_type);
+   db->putDouble("d_linear_solver_absolute_tolerance",
+      d_linear_solver_absolute_tolerance);
+   db->putDouble("d_linear_solver_divergence_tolerance",
+      d_linear_solver_divergence_tolerance);
+   db->putInteger("d_maximum_linear_iterations",
+      d_maximum_linear_iterations);
+
+   db->putInteger("d_maximum_gmres_krylov_dimension",
+      d_maximum_gmres_krylov_dimension);
+   db->putString("d_gmres_orthogonalization_algorithm",
+      d_gmres_orthogonalization_algorithm);
+
+   db->putDouble("d_function_evaluation_error",
+      d_function_evaluation_error);
+   db->putString("d_differencing_parameter_strategy",
+      d_differencing_parameter_strategy);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Write all class data members to specified output stream.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void SNES_SAMRAIContext::printClassData(
+   std::ostream& os) const
+{
+   os << "\nSNES_SAMRAIContext::printClassData..." << std::endl;
+   os << "SNES_SAMRAIContext: this = "
+      << (SNES_SAMRAIContext *)this << std::endl;
+   os << "d_object_name = " << d_object_name << std::endl;
+   os << "d_SNES_functions = "
+      << (SNESAbstractFunctions *)d_SNES_functions << std::endl;
+   os << "d_SNES_solver = " << (SNES)d_SNES_solver << std::endl;
+//   os << "d_SLES_solver = " << (SLES)d_SLES_solver << std::endl;
+   os << "d_krylov_solver = " << (KSP)d_krylov_solver << std::endl;
+   os << "d_jacobian = " << (Mat *)&d_jacobian << std::endl;
+   os << "d_preconditioner = " << (PC *)&d_preconditioner << std::endl;
+
+   os << "d_solution_vector = " << (Vec *)&d_solution_vector << std::endl;
+   os << "d_residual_vector = " << (Vec *)&d_residual_vector << std::endl;
+
+   os << "d_uses_preconditioner = " << d_uses_preconditioner << std::endl;
+   os << "d_uses_explicit_jacobian = " << d_uses_explicit_jacobian << std::endl;
+
+   os << "d_maximum_nonlinear_iterations = "
+      << d_maximum_nonlinear_iterations << std::endl;
+   os << "d_maximum_function_evals = " << d_maximum_function_evals << std::endl;
+
+   os << "d_absolute_tolerance = " << d_absolute_tolerance << std::endl;
+   os << "d_relative_tolerance = " << d_relative_tolerance << std::endl;
+   os << "d_step_tolerance = " << d_step_tolerance << std::endl;
+
+   os << "d_forcing_term_strategy = " << d_forcing_term_strategy << std::endl;
+   os << "d_forcing_term_flag = " << d_forcing_term_flag << std::endl;
+
+   os << "d_constant_forcing_term = " << d_constant_forcing_term << std::endl;
+   os << "d_initial_forcing_term = " << d_initial_forcing_term << std::endl;
+   os << "d_EW_choice2_alpha = " << d_EW_choice2_alpha << std::endl;
+   os << "d_EW_choice2_gamma = " << d_EW_choice2_gamma << std::endl;
+   os << "d_EW_safeguard_exponent = " << d_EW_safeguard_exponent << std::endl;
+   os << "d_EW_safeguard_disable_threshold = "
+      << d_EW_safeguard_disable_threshold << std::endl;
+
+   os << "d_linear_solver_type = " << d_linear_solver_type << std::endl;
+   os << "d_linear_solver_absolute_tolerance = "
+      << d_linear_solver_absolute_tolerance << std::endl;
+   os << "d_linear_solver_divergence_tolerance = "
+      << d_linear_solver_divergence_tolerance << std::endl;
+   os << "d_maximum_linear_iterations = "
+      << d_maximum_linear_iterations << std::endl;
+
+   os << "d_maximum_gmres_krylov_dimension = "
+      << d_maximum_gmres_krylov_dimension << std::endl;
+   os << "d_gmres_orthogonalization_algorithm = "
+      << d_gmres_orthogonalization_algorithm << std::endl;
+
+   os << "d_differencing_parameter_strategy = "
+      << d_differencing_parameter_strategy << std::endl;
+   os << "d_function_evaluation_error = "
+      << d_function_evaluation_error << std::endl;
+}
+
+}
+}
+
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/SNES_SAMRAIContext.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/SNES_SAMRAIContext.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,791 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Wrapper for SNES solver for use in a SAMRAI-based application. 
+ *
+ ************************************************************************/
+
+#ifndef included_solv_SNES_SAMRAIContext
+#define included_solv_SNES_SAMRAIContext
+
+/*
+ ************************************************************************
+ *  THIS CLASS WILL BE UNDEFINED IF THE LIBRARY IS BUILT WITHOUT PETSC
+ ************************************************************************
+ */
+
+#ifdef HAVE_PETSC
+#ifndef included_petsc_snes
+#define included_petsc_snes
+#ifdef MPICH_SKIP_MPICXX
+#undef MPICH_SKIP_MPICXX
+#endif
+extern "C" {
+#ifdef PETSC2028
+#include "snes.h"
+#else
+#include "petscsnes.h"
+#endif
+}
+#endif
+#endif
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#ifdef HAVE_PETSC
+
+#include "SAMRAI/solv/NonlinearSolverStrategy.h"
+#include "SAMRAI/solv/SNESAbstractFunctions.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Serializable.h"
+
+namespace SAMRAI {
+namespace solv {
+
+/*!
+ * Class SNES_SAMRAIContext provides an interface to the SNES
+ * nonlinear solver capabilities in PETSc to facilitate their use with
+ * SAMRAI.  While PETSc is implemented in an object-based manner, this
+ * class makes it easier to use PETSc's routines with SAMRAI data structures.
+ * In particular, it hides from the user some of the messy details required
+ * to link the C++ class library with PETSc which is written in C and to
+ * override PETSc objects, like vectors, with those found in SAMRAI.
+ *
+ * This class declares five private static member functions to link
+ * user-defined routines for nonlinear residual calculation, Jacobian
+ * evaluation, preconditioner setup and solve, and Jacobian-vector product
+ * operations.  The implementation of these functions is defined by the user
+ * in a subclass of the abstract base class SNESAbstractFunctions.
+ * The vector objects used within the solver are provided by the
+ * PETSc_SAMRAIVectorReal wrapper class.
+ *
+ * If no parameters are read from input, PETSc defaults are used.  See the
+ * PETSc documentation (http://www-unix.mcs.anl.gov/petsc/).
+ * for more information on default parameters and SNES functionality.
+ *
+ * Optional input keys and types that can be read by this class are:
+ *
+ *    - absolute_tolerance
+ *        double value for absolute nonlinear convergence tolerance
+ *
+ *    - relative_tolerance
+ *        double value for relative nonlinear convergence tolerance
+ *
+ *    - step_tolerance
+ *        double value for minimum tolerance on change in solution norm
+ *        between nonlinear iterates
+ *
+ *    - maximum_nonlinear_iterations
+ *        integer value for maximum number of nonlinear iterations
+ *
+ *    - maximum_function_evals
+ *        integer value for maximum number of nonlinear function evaluations
+ *
+ *    - forcing_term_strategy
+ *        integer value for forcing term choice for linear solvers
+ *        within the inexact Newton method.  Choices are "CONSTANT" (default),
+ *        "EWCHOICE1", and "EWCHOICE2".
+ *
+ *    - constant_forcing_term
+ *        double value for constant relative convergence tolerance in
+ *        Krylov solver (default case)
+ *
+ *    - initial_forcing_term
+ *        double value for initial relative convergence tolerance in
+ *        Krylov solver (used in Eisenstat-Walker case). Value must
+ *        satisfy @f$0 \le \eta_0 < 1 at f$.
+ *
+ *    - maximum_forcing_term
+ *        double value for maximum relative convergence tolerance in
+ *        Krylov solver (used in Eisenstat-Walker case). Value must
+ *        satisfy @f$0 \le \eta_{max} < 1 at f$.
+ *
+ *    - EW_choice2_alpha
+ *        double value for power used in Eisenstat-Walker choice 2
+ *        relative convergence tolerance computation. Value must
+ *        satisfy @f$1 < \alpha \le 2 at f$.
+ *
+ *    - EW_safeguard_exponent
+ *        double value for power for safeguard used in Eisenstat-Walker
+ *        choice 2
+ *
+ *    - EW_choice2_gamma
+ *        double value for multiplicative factor used in Eisenstat-Walker
+ *        choice 2 relative convergence tolerance computation.  Value
+ *        must satisfy @f$0 \le \gamma \le 1 at f$.
+ *
+ *    - EW_safeguard_disable_threshold
+ *        double value for threshold for imposing safeguard in
+ *        Eisenstat-Walker choice 2.  Value must
+ *        satisfy @f$0 < \eta_{threshold} < 1 at f$.
+ *
+ *    - linear_solver_type
+ *        std::string value for type of linear solver.  See the
+ *        <A HREF="http://www-unix.mcs.anl.gov/petsc/">PETSc documentation</A>
+ *        for the valid types.
+ *
+ *    - uses_preconditioner
+ *        boolean value for whether or not a preconditioner is used in the
+ *        solution of the Newton equations.
+ *
+ *    - linear_solver_absolute_tolerance
+ *        double value for absolute convergence tolerance in linear solver
+ *
+ *    - linear_solver_divergence_tolerance
+ *        double value for amount linear solver residual can increase
+ *        before solver concludes method is diverging
+ *
+ *    - maximum_linear_iterations
+ *        integer value for maximum number of linear solver iterations
+ *
+ *    - maximum_gmres_krylov_dimension
+ *        integer value for maximum dimension of Krylov subspace before
+ *        restarting.  Valid only if GMRES is used as the linear solver.
+ *
+ *    - gmres_orthogonalization_algorithm
+ *        std::string value for algorithm used to incrementally construct the
+ *        orthonormal basis of the Krylov subspace used by GMRES.  Valid
+ *        only if GMRES is used as the linear solver.  Valid values are:
+ *
+ *             modifiedgramschmidt
+ *             gmres_cgs_refine_ifneeded
+ *             gmres_cgs_refine_always
+ *
+ *        See the
+ *        <A HREF="http://www-unix.mcs.anl.gov/petsc/">PETSc documentation</A>
+ *        for more information.
+ *
+ *    - uses_explicit_jacobian
+ *        boolean value for whether or not the user provides code to
+ *        explicitly calculate Jacobian-vector products.
+ *
+ *    - differencing_parameter_strategy
+ *        std::string value indicating strategy used for computing the differencing
+ *        parameter when Jacobian-vector products are approximated via finite
+ *        differences.  See the
+ *        <A HREF="http://www-unix.mcs.anl.gov/petsc/">PETSc documentation</A>
+ *        for valid values.
+ *
+ *    - function_evaluation_error
+ *        double value that is the square root of the estimated relative error
+ *        in function evaluation.
+ *
+ * Note that all input values may override values read in from restart.  If
+ * no new input value is given, the restart value is used.
+ *
+ * A sample input file entry might look like:
+ *
+ * @code
+ *    absolute_tolerance             = 10.e-10
+ *    relative_tolerance             = 10.e-6
+ *    step_tolerance                 = 10.e-8
+ *    maximum_nonlinear_iterations   = 200
+ *    forcing_term_strategy          = "EWCHOICE1"
+ * @endcode
+ *
+ * Note that input values can also be set using accessor functions.
+ * Values that are set via this mechanism will be cached both in the
+ * solver context as well as in the corresponding PETSc object.  Thus
+ * values changed on-the-fly will be written to restart.  These input
+ * values can also be changed by directly accessing the corresponding
+ * PETSc object and using native PETSc function calls; however such
+ * settings/changes will NOT be cached in the solver context, and so
+ * will not be written to restart.
+ *
+ * @see solv::SNESAbstractFunctions
+ * @see solv::NonlinearSolverStrategy
+ */
+
+class SNES_SAMRAIContext:
+   public NonlinearSolverStrategy,
+   public tbox::Serializable
+{
+public:
+   /*!
+    * Constructor for SNES_SAMRAIContext allocates the SNES
+    * object and initializes rudimentary state associated with
+    * user-supplied solver components.  Then, it reads solver parameter
+    * from input and restart which may override default values.
+    *
+    * When assertion checking is active, an unrecoverable assertion
+    * will result if the name std::string is empty or the pointer to the
+    * user-defined SNES functions object is null.
+    */
+   SNES_SAMRAIContext(
+      const std::string& object_name,
+      tbox::Pointer<tbox::Database> input_db,
+      SNESAbstractFunctions* my_functions);
+
+   /*!
+    * Destructor for solve_SNES_SAMRAIContext destroys the SNES
+    * and the PETSc solution vector wrapper.
+    */
+   ~SNES_SAMRAIContext();
+
+   /*!
+    * Return the PETSc nonlinear solver object.
+    */
+   SNES
+   getSNESSolver() const;
+
+   /*!
+    * Return pointer to object providing user-defined functions for SNES.
+    */
+   SNESAbstractFunctions *
+   getSNESFunctions() const;
+
+   /*!
+    * Return the PETSc linear solver object.
+    */
+//   SLES getSLESSolver() const;
+
+   /*!
+    * Return the PETSc Krylov solver object.
+    */
+   KSP
+   getKrylovSolver() const;
+
+   /*!
+    * Return the PETSc Mat object for the Jacobian.
+    */
+   Mat
+   getJacobianMatrix() const;
+
+   /*!
+    *  Get absolute tolerance for nonlinear solver.
+    */
+   double
+   getAbsoluteTolerance() const;
+
+   /*!
+    *  Set absolute tolerance for nonlinear solver.
+    */
+   void
+   setAbsoluteTolerance(
+      double abs_tol);
+
+   /*!
+    *  Get relative tolerance for nonlinear solver.
+    */
+   double
+   getRelativeTolerance() const;
+
+   /*!
+    *  Set relative tolerance for nonlinear solver.
+    */
+   void
+   setRelativeTolerance(
+      double rel_tol);
+
+   /*!
+    *  Get step tolerance for nonlinear solver.
+    */
+   double
+   getStepTolerance() const;
+
+   /*!
+    *  Set step tolerance for nonlinear solver.
+    */
+   void
+   setStepTolerance(
+      double step_tol);
+
+   /*!
+    *  Get maximum iterations for nonlinear solver.
+    */
+   int
+   getMaxNonlinearIterations() const;
+
+   /*!
+    *  Set maximum iterations for nonlinear solver.
+    */
+   void
+   setMaxNonlinearIterations(
+      int max_nli);
+
+   /*!
+    *  Get maximum function evaluations by nonlinear solver.
+    */
+   int
+   getMaxFunctionEvaluations() const;
+
+   /*!
+    *  Set maximum function evaluations in nonlinear solver.
+    */
+   void
+   setMaxFunctionEvaluations(
+      int max_feval);
+
+   /*!
+    *  Get strategy for forcing term.
+    */
+   std::string
+   getForcingTermStrategy() const;
+
+   /*!
+    *  Set strategy for forcing term.
+    */
+   void
+   setForcingTermStrategy(
+      std::string& strategy);
+
+   /*!
+    *  Get value of constant forcing term.
+    */
+   double
+   getConstantForcingTerm() const;
+
+   /*!
+    *  Set value of constant forcing term.
+    */
+   void
+   setConstantForcingTerm(
+      double fixed_eta);
+
+   /*!
+    *  Get value of initial forcing term.
+    */
+   double
+   getInitialForcingTerm() const;
+
+   /*!
+    *  Set value of initial forcing term.
+    */
+   void
+   setInitialForcingTerm(
+      double initial_eta);
+
+   /*!
+    *  Get value of maximum forcing term.
+    */
+   double
+   getMaximumForcingTerm() const;
+
+   /*!
+    *  Set value of maximum forcing term.
+    */
+   void
+   setMaximumForcingTerm(
+      double max_eta);
+
+   /*!
+    *  Get value of exponent in Eisenstat-Walker Choice 2 forcing term.
+    */
+   double
+   getEWChoice2Exponent() const;
+
+   /*!
+    *  Set value of exponent in Eisenstat-Walker Choice 2 forcing term.
+    */
+   void
+   setEWChoice2Exponent(
+      double alpha);
+
+   /*!
+    *  Get value of exponent in Eisenstat-Walker Choice 2 safeguard.
+    */
+   double
+   getEWChoice2SafeguardExponent() const;
+
+   /*!
+    *  Set value of exponent in Eisenstat-Walker Choice 2 safeguard.
+    */
+   void
+   setEWChoice2SafeguardExponent(
+      double beta);
+
+   /*!
+    * Get value of factor used to scale Eisenstat-Walker Choice 2
+    * forcing term.
+    */
+   double
+   getEWChoice2ScaleFactor() const;
+
+   /*!
+    * Set value of factor used to scale Eisenstat-Walker Choice 2
+    * forcing term.
+    */
+   void
+   setEWChoice2ScaleFactor(
+      double gamma);
+
+   /*!
+    *  Get value of threshold to disable safeguard in Eisenstat-Walker
+    *  forcing terms.
+    */
+   double
+   getEWSafeguardThreshold() const;
+
+   /*!
+    *  Set value of threshold to disable safeguard in Eisenstat-Walker
+    *  forcing terms.
+    */
+   void
+   setEWSafeguardThreshold(
+      double threshold);
+
+   /*!
+    * Get type of linear solver.
+    */
+   std::string
+   getLinearSolverType() const;
+
+   /*!
+    * Set type of linear solver.
+    */
+   void
+   setLinearSolverType(
+      std::string& type);
+
+   /*!
+    * Get whether a preconditioner is used.
+    */
+   bool
+   getUsesPreconditioner() const;
+
+   /*!
+    * Set whether to use a preconditioner.
+    */
+   void
+   setUsesPreconditioner(
+      bool uses_preconditioner);
+
+   /*!
+    * Get absolute tolerance for linear solver.
+    */
+   double
+   getLinearSolverAbsoluteTolerance() const;
+
+   /*!
+    * Set absolute tolerance for linear solver.
+    */
+   void
+   setLinearSolverAbsoluteTolerance(
+      double abs_tol);
+
+   /*!
+    * Get divergence tolerance for linear solver.
+    */
+   double
+   getLinearSolverDivergenceTolerance() const;
+
+   /*!
+    * Set divergence tolerance for linear solver.
+    */
+   void
+   setLinearSolverDivergenceTolerance(
+      double div_tol);
+
+   /*!
+    * Get maximum linear iterations for linear solver.
+    */
+   int
+   getMaximumLinearIterations() const;
+
+   /*!
+    * Set maximum linear iterations for linear solver.
+    */
+   void
+   setMaximumLinearIterations(
+      int max_li);
+
+   /*!
+    * Get maximum Krylov dimension in GMRES linear solver.
+    */
+   int
+   getMaximumGMRESKrylovDimension() const;
+
+   /*!
+    * Set maximum Krylov dimension in GMRES linear solver.
+    */
+   void
+   setMaximumGMRESKrylovDimension(
+      int d);
+
+   /*!
+    * Get orthogonalization method used in GMRES linear solver.
+    */
+   std::string
+   getGMRESOrthogonalizationMethod() const;
+
+   /*!
+    * Set orthogonalization method used in GMRES linear solver.
+    */
+   void
+   setGMRESOrthogonalizationMethod(
+      std::string& method);
+
+   /*!
+    * Get whether a method for explicit Jacobian-vector products is provided.
+    */
+   bool
+   getUsesExplicitJacobian() const;
+
+   /*!
+    * Set whether a method for explicit Jacobian-vector products is provided.
+    */
+   void
+   setUsesExplicitJacobian(
+      bool use_jac);
+
+   /*!
+    * Get method for computing differencing parameter.
+    */
+   std::string
+   getDifferencingParameterMethod() const;
+
+   /*!
+    * Set method for computing differencing parameter.
+    */
+   void
+   setDifferencingParameterMethod(
+      std::string& method);
+
+   /*!
+    * Get estimate of error in function evaluation.
+    */
+   double
+   getFunctionEvaluationError() const;
+
+   /*!
+    * Set estimate of error in function evaluation.
+    */
+   void
+   setFunctionEvaluationError(
+      double evaluation_error);
+
+   /*!
+    * Initialize the state of the SNES solver based on vector argument
+    * representing the solution of the nonlinear system.  In general, this
+    * routine must be called before the solve() routine is invoked.
+    */
+   void
+   initialize(
+      tbox::Pointer<SAMRAIVectorReal<double> > solution);
+
+   /*!
+    *  Reset the state of the nonlinear solver after regridding.
+    */
+   void
+   resetSolver(
+      const int coarsest_level,
+      const int finest_level);
+
+   /*!
+    * Solve the nonlinear problem.  In general, the initialize() routine
+    * must be called before this solve function to set up the solver.
+    * Returns 1 if successful, 0 otherwise.
+    */
+   int
+   solve();
+
+   /*!
+    * Obtain number of nonlinear iterations.
+    */
+   int
+   getNumberOfNonlinearIterations() const;
+
+   /*!
+    * Obtain total number of linear iterations accumulated over all
+    * nonlinear iterations.
+    */
+   int
+   getTotalNumberOfLinearIterations() const;
+
+   /*!
+    * Report reason for termination.
+    */
+   void
+   reportCompletionCode(
+      std::ostream& os = tbox::plog) const;
+
+   /*!
+    * Write solver parameters to restart database matching object name.
+    *
+    * When assertion checking is active, an unrecoverable assertion
+    * will result if database pointer is null.
+    */
+   void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> db);
+
+   /*!
+    * Print out all members of integrator instance to given output stream.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os) const;
+
+private:
+   /*
+    * Static member functions for linkage with PETSc routines.
+    * See header file for SNESAbstractFunctions for more information.
+    */
+   static int
+   SNESFuncEval(
+      SNES snes,                            // SNES context
+      Vec x,                                // input vector
+      Vec f,                                // residual vector
+      void* ctx);                           // user-defined context
+
+   static int
+   SNESJacobianSet(
+      SNES snes,                                      // SNES context
+      Vec x,                                          // input vector
+      Mat* A,                                         // Jacobian matrix
+      Mat* B,                                         // precond matrix
+      MatStructure* mstruct,                          // precond matrix structure
+      void* ctx);                                     // user-defined context
+
+   static int
+   SNESJacobianTimesVector(
+      Mat M,                                     //  Jacobian matrix
+      Vec xin,                                   //  input vector
+      Vec xout);                                 //  output vector
+
+   static int
+   SNESsetupPreconditioner(
+      void* ctx);                                  // input vector
+
+   static int
+   SNESapplyPreconditioner(
+      void* ctx,                                  // user-defined context
+      Vec xin,                                    // input vector
+      Vec xout);                                  // output vector
+
+   /*
+    * Create and cache needed Petsc objects.
+    */
+   void
+   createPetscObjects();
+
+   /*
+    * Initialize cached Petsc objects.
+    */
+   void
+   initializePetscObjects();
+
+   /*
+    * Destroy cached Petsc objects.
+    */
+   void
+   destroyPetscObjects();
+
+   /*
+    * Read input values from given database.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db);
+
+   /*!
+    * Read solver parameters from restart database matching object name.
+    */
+   void
+   getFromRestart();
+
+   /*!
+    * Internal state parameters:
+    */
+   std::string d_object_name;
+   bool d_context_needs_initialization;
+
+   /*
+    * PETSc solver and preconditioner objects:
+    *
+    * d_SNES_solver ..... PETSc nonlinear solver object.
+    *
+    * d_linear_solver ... PETSc linear solver object, cached here so that
+    *                     users may manipulate it through the
+    *                     interface of this class.
+    *
+    * d_krylov_solver ... PETSc Krylov solver context.
+    *
+    * d_jacobian ........ PETSc matrix object, cached here so that users
+    *                     may specify Jacobian operations through the
+    *                     interface of this class without having to know
+    *                     about PETSc matrix shells or matrix-free matrices.
+    *
+    * d_preconditioner... PETSc preconditioner object, cached here so that
+    *                     users may specify operations through the
+    *                     interface of this class without having to know
+    *                     about PETSc preconditioner shells.
+    */
+
+   SNES d_SNES_solver;
+   KSP d_krylov_solver;
+   Mat d_jacobian;
+   PC d_preconditioner;
+
+   /*
+    * Solution and residual vectors for nonlinear system.
+    */
+
+   Vec d_solution_vector;
+   Vec d_residual_vector;
+
+   /*
+    * tbox::Pointer to object which provides user-supplied functions to SNES.
+    */
+   SNESAbstractFunctions* d_SNES_functions;
+
+   /*
+    * Boolean flags used during SNES initialization to provide correct
+    * static function linkage with PETSc.
+    */
+   bool d_uses_preconditioner;
+   bool d_uses_explicit_jacobian;
+
+   /*
+    * SNES state data maintained here for input/restart capabilities.
+    */
+
+   // Nonlinear solver parameters:
+
+   int d_maximum_nonlinear_iterations;
+   int d_maximum_function_evals;
+
+   double d_absolute_tolerance;
+   double d_relative_tolerance;
+   double d_step_tolerance;
+
+   std::string d_forcing_term_strategy;  // string is for input
+   int d_forcing_term_flag;         // int is for passing choice to PETSc
+
+   double d_constant_forcing_term;
+   double d_initial_forcing_term;
+   double d_maximum_forcing_term;
+   double d_EW_choice2_alpha;
+   double d_EW_choice2_gamma;
+   double d_EW_safeguard_exponent;
+   double d_EW_safeguard_disable_threshold;
+
+   SNESConvergedReason d_SNES_completion_code;
+
+   // Linear solver parameters:
+
+   std::string d_linear_solver_type;
+   double d_linear_solver_absolute_tolerance;
+   double d_linear_solver_divergence_tolerance;
+   int d_maximum_linear_iterations;
+
+   int d_maximum_gmres_krylov_dimension;
+   std::string d_gmres_orthogonalization_algorithm;
+
+   // "Matrix-free" parameters:
+
+   std::string d_differencing_parameter_strategy;
+   double d_function_evaluation_error;
+
+   // Output parameters:
+
+   int d_nonlinear_iterations;
+};
+
+}
+}
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/SimpleCellRobinBcCoefs.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/SimpleCellRobinBcCoefs.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,676 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Level solver for diffusion-like elliptic problems. 
+ *
+ ************************************************************************/
+#ifndef included_solv_SimpleCellRobinBcCoefs_C
+#define included_solv_SimpleCellRobinBcCoefs_C
+
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/math/ArrayDataBasicOps.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/OuterfaceData.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/solv/SimpleCellRobinBcCoefs.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#define DIRICHLET 0
+#define NEUMANN 1
+#define MIXED 2
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace solv {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Construct an unitialized boundary specification.                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SimpleCellRobinBcCoefs::SimpleCellRobinBcCoefs(
+   const tbox::Dimension& dim,
+   const std::string& object_name):
+   d_dim(dim),
+   d_object_name(object_name),
+   d_hierarchy(NULL),
+   d_ln_min(-1),
+   d_ln_max(-1),
+   d_flux_id(-1),
+   d_flag_id(-1),
+   d_dirichlet_data_id(-1),
+   d_diffusion_coef_id(-1)
+{
+   t_set_bc_coefs = tbox::TimerManager::getManager()->
+      getTimer("solv::SimpleCellRobinBcCoefs::setBcCoefs()");
+}
+
+SimpleCellRobinBcCoefs::~SimpleCellRobinBcCoefs()
+{
+}
+
+void SimpleCellRobinBcCoefs::setHierarchy(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int ln_min,
+   const int ln_max)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *hierarchy);
+
+   d_hierarchy = hierarchy;
+   d_ln_min = ln_min;
+   d_ln_max = ln_max;
+   d_dirichlet_data.setNull();
+   d_dirichlet_data_pos.clear();
+
+   if (d_ln_min == -1) {
+      d_ln_min = 0;
+   }
+   if (d_ln_max == -1) {
+      d_ln_min = d_hierarchy->getFinestLevelNumber();
+   }
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_ln_min < 0 || d_ln_max < 0 || d_ln_min > d_ln_max) {
+      TBOX_ERROR(d_object_name
+         << ": Bad range of levels in setHierarchy().\n");
+   }
+#endif
+}
+
+void SimpleCellRobinBcCoefs::setBoundaries(
+   const std::string& boundary_type,
+   const int fluxes,
+   const int flags,
+   int* bdry_types)
+{
+
+   int k;
+
+   if (boundary_type == "Dirichlet") {
+      d_flux_id = -1;
+      d_flag_id = -1;
+      for (k = 0; k < 2 * d_dim.getValue(); k++) {
+         d_bdry_types[k] = DIRICHLET;
+      }
+   } else if (boundary_type == "Neumann") {
+      for (k = 0; k < 2 * d_dim.getValue(); k++) {
+         d_bdry_types[k] = NEUMANN;
+      }
+#ifdef DEBUG_CHECK_ASSERTIONS
+      if (fluxes < 0) {
+         TBOX_ERROR(
+            d_object_name << ": bad flux patch data index ("
+            << fluxes
+            << ") for Neumann boundary condition.\n");
+      }
+#endif
+      d_flux_id = fluxes;
+      d_flag_id = -1;
+   } else if (boundary_type == "Mixed") {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      if (fluxes < 0) {
+         TBOX_ERROR(
+            d_object_name << ": bad flux patch data index ("
+            << fluxes
+            << ") for Mixed boundary condition.\n");
+      }
+      if (flags < 0) {
+         TBOX_ERROR(
+            d_object_name << ": bad flag patch data index ("
+            << flags
+            << ") for Mixed boundary condition.\n");
+      }
+#endif
+      d_flux_id = fluxes;
+      d_flag_id = flags;
+      if (bdry_types != NULL) {
+         for (k = 0; k < 2 * d_dim.getValue(); k++) {
+            d_bdry_types[k] = bdry_types[k];
+         }
+      } else {
+         for (k = 0; k < 2 * d_dim.getValue(); k++) {
+            d_bdry_types[k] = MIXED;
+         }
+      }
+   } else {
+      TBOX_ERROR(
+         d_object_name << ": Non-existing case of\n"
+         <<
+         "boundary_type in PoissonSolver<DIM>::setBoundaries()");
+   }
+
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Set the bc coefficients according to information received in the     *
+ * call to setBoundaries.                                               *
+ *                                                                      *
+ * Do a lot of error checking before hand.                              *
+ *                                                                      *
+ * For Dirichlet, we need the Dirichlet boundary                        *
+ * values stored in the ghost cells of the solution.                    *
+ *                                                                      *
+ * For Neumann bc, we need the flux data and the                        *
+ * diffusion coefficient to determine the required                      *
+ * normal gradient of the solution.  However, the                       *
+ * diffusion coefficient is assumed to be 1.0 if                        *
+ * left unspecified.                                                    *
+ *                                                                      *
+ * For mixed bc, we need the flag stating whether                       *
+ * Dirichlet or Neumann at any face, in addition to                     *
+ * Dirichlet and Neumann data.                                          *
+ *                                                                      *
+ ************************************************************************
+ */
+
+void SimpleCellRobinBcCoefs::setBcCoefs(
+   tbox::Pointer<pdat::ArrayData<double> >& acoef_data,
+   tbox::Pointer<pdat::ArrayData<double> >& bcoef_data,
+   tbox::Pointer<pdat::ArrayData<double> >& gcoef_data,
+   const tbox::Pointer<hier::Variable>& variable,
+   const hier::Patch& patch,
+   const hier::BoundaryBox& bdry_box,
+   double fill_time) const
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim, patch, bdry_box);
+
+   NULL_USE(variable);
+   NULL_USE(fill_time);
+
+   t_set_bc_coefs->start();
+
+   const int ln = patch.getPatchLevelNumber();
+   const hier::LocalId &pn = patch.getLocalId();
+   const int location_index = bdry_box.getLocationIndex();
+
+   tbox::Pointer<hier::PatchData> patch_data;
+   tbox::Pointer<pdat::OuterfaceData<double> > flux_data_ptr;
+   tbox::Pointer<pdat::SideData<double> > diffcoef_data_ptr;
+   tbox::Pointer<pdat::OuterfaceData<int> > flag_data_ptr;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (!gcoef_data.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *gcoef_data);
+
+      if (d_bdry_types[location_index] == DIRICHLET
+          || d_bdry_types[location_index] == MIXED) {
+         /*
+          * For Dirichlet and mixed boundaries, we use cached data
+          * to get the Dirichlet value.  Data specific to the
+          * d_hierarchy has been cached by cacheDirichletData().
+          * This implementation can only set Dirichlet coefficients
+          * when the patch is in the correct hierarchy.
+          */
+         if (!patch.inHierarchy()) {
+            TBOX_ERROR(
+               d_object_name << ": patch is not in any hierarchy.\n"
+               << "SimpleCellRobinBcCoefs can only set\n"
+               <<
+               "boundary coefficients for patches in\n"
+               << "the same hierarchy as cached\n"
+               << "Dirichlet coefficients.");
+         }
+         tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+         if (level->getPatch(pn)->getBox() != patch.getBox()) {
+            TBOX_ERROR(
+               d_object_name << ": patch is not in the hierarchy\n"
+               << "of cached boundary data.\n"
+               << "SimpleCellRobinBcCoefs can only set\n"
+               <<
+               "boundary coefficients for patches in\n"
+               << "the same hierarchy as cached\n"
+               << "Dirichlet coefficients.");
+         }
+      }
+      if (d_bdry_types[location_index] == NEUMANN
+          || d_bdry_types[location_index] == MIXED) {
+         patch_data = patch.getPatchData(d_flux_id);
+         flux_data_ptr = patch_data;
+         if (!patch_data) {
+            TBOX_ERROR(d_object_name << ": Flux data (patch data id = "
+                                     << d_flux_id << ") does not exist.");
+         }
+         if (!flux_data_ptr) {
+            TBOX_ERROR(
+               d_object_name << ": Flux data (patch data id = "
+               << d_flux_id
+               << ") is not outerface double data.");
+         }
+         if (d_diffusion_coef_id != -1) {
+            patch_data = patch.getPatchData(d_diffusion_coef_id);
+            diffcoef_data_ptr = patch_data;
+            if (!patch_data) {
+               TBOX_ERROR(d_object_name << ": Diffusion coefficient data\n"
+                  "(patch data id = " << d_diffusion_coef_id
+                                        << ") does not exist.");
+            }
+            if (!diffcoef_data_ptr) {
+               TBOX_ERROR(d_object_name << ": Diffusion coefficient data\n"
+                  "(patch data id = " << d_diffusion_coef_id
+                                        << ") is not side double data.");
+            }
+         }
+      }
+   }
+   if (!acoef_data.isNull()) {
+      if (d_bdry_types[location_index] == MIXED) {
+         patch_data = patch.getPatchData(d_flag_id);
+         flag_data_ptr = patch.getPatchData(d_flag_id);
+         if (!patch_data) {
+            TBOX_ERROR(d_object_name << ": Flags data (patch data id = "
+                                     << d_flag_id << ") does not exist.");
+         }
+         if (!flag_data_ptr) {
+            TBOX_ERROR(
+               d_object_name << ": Flags data (patch data id = "
+               << d_flag_id
+               << ") is not outerface int data.");
+         }
+      }
+   }
+#endif
+
+   int bn;
+
+#ifdef DEBUG_CHECK_DIM_ASSERTIONS
+   if (!acoef_data.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *acoef_data);
+   }
+   if (!bcoef_data.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(d_dim, *bcoef_data);
+   }
+#endif
+
+   if (d_bdry_types[location_index] == DIRICHLET) {
+
+      if (!acoef_data.isNull()) {
+         acoef_data->fill(1.0);
+      }
+      if (!bcoef_data.isNull()) {
+         bcoef_data->fill(0.0);
+      }
+
+      if (!gcoef_data.isNull()) {
+
+         tbox::Pointer<geom::CartesianPatchGeometry> pg =
+            patch.getPatchGeometry();
+         const tbox::Array<hier::BoundaryBox>& codim1_boxes =
+            pg->getCodimensionBoundaries(1);
+         /*
+          * Search for cached boundary box containing current boundary box.
+          */
+         for (bn = 0; bn < codim1_boxes.getSize(); ++bn) {
+            const hier::BoundaryBox& cdb = codim1_boxes[bn];
+            if (bdry_box.getLocationIndex() == cdb.getLocationIndex()
+                && bdry_box.getBox().lower() >= cdb.getBox().lower()
+                && bdry_box.getBox().upper() <= cdb.getBox().upper()
+                ) break;
+         }
+#ifdef DEBUG_CHECK_ASSERTIONS
+         if (bn == codim1_boxes.getSize()) {
+            TBOX_ERROR(
+               d_object_name << " cannot find cached Dirichlet data.\n"
+               <<
+               "This is most likely caused by not calling\n"
+               <<
+               "SimpleCellRobinBcCoefs::cacheDirichletData()\n"
+               << "after the hierarchy changed.\n");
+         }
+#endif
+
+         std::map<hier::LocalId, int> foo = d_dirichlet_data_pos[ln];
+         int position = foo[pn] + bn;
+         gcoef_data->copy(*d_dirichlet_data[position],
+            d_dirichlet_data[position]->getBox(),
+            hier::IntVector::getZero(d_dim));
+
+      }
+   } else if (d_bdry_types[location_index] == NEUMANN) {
+
+      if (!acoef_data.isNull()) {
+         acoef_data->fill(0.0);
+      }
+      if (!bcoef_data.isNull()) {
+         bcoef_data->fill(1.0);
+      }
+
+      if (!gcoef_data.isNull()) {
+         flux_data_ptr = patch.getPatchData(d_flux_id);
+         pdat::OuterfaceData<double>& flux_data(*flux_data_ptr);
+         const int axis = location_index / 2;
+         const int face = location_index % 2;
+         pdat::ArrayData<double>& g = *gcoef_data;
+         pdat::ArrayDataIterator ai(g.getBox());
+         hier::Index offset_to_inside(d_dim, 0);
+         if (face != 0) offset_to_inside(axis) = -1;
+         if (d_diffusion_coef_id == -1) {
+            for ( ; ai; ai++) {
+               pdat::FaceIndex fi(ai() + offset_to_inside, axis, face);
+               g(*ai, 0) = flux_data(fi, face) / d_diffusion_coef_constant;
+               tbox::plog << location_index << '\t' << g(*ai, 0) << '\n';
+            }
+         } else {
+            diffcoef_data_ptr = patch.getPatchData(d_diffusion_coef_id);
+            const pdat::ArrayData<double>& diffcoef_array_data =
+               diffcoef_data_ptr->getArrayData(axis);
+            for ( ; ai; ai++) {
+               pdat::FaceIndex fi(ai() + offset_to_inside, axis, face);
+               g(*ai, 0) = flux_data(fi, face) / diffcoef_array_data(*ai, 0);
+               tbox::plog << location_index << '\t' << g(*ai, 0) << '\n';
+            }
+         }
+      }
+
+   } else if (d_bdry_types[location_index] == MIXED) {
+
+      const int axis = location_index / 2;
+      const int face = location_index % 2;
+      flag_data_ptr = patch.getPatchData(d_flag_id);
+      pdat::OuterfaceData<int>& flag_data(*flag_data_ptr);
+      hier::Index offset_to_inside(d_dim, 0);
+      if (face != 0) offset_to_inside(axis) = -1;
+
+      if (!acoef_data.isNull()) {
+         pdat::ArrayData<double>& a = *acoef_data;
+         pdat::ArrayDataIterator ai(a.getBox());
+         for ( ; ai; ai++) {
+            pdat::FaceIndex fi(ai() + offset_to_inside, axis, face);
+            if (flag_data(fi, face) == 0) {
+               a(*ai, 0) = 1.0;
+            } else {
+               a(*ai, 0) = 0.0;
+            }
+         }
+      }
+
+      if (!bcoef_data.isNull()) {
+         pdat::ArrayData<double>& b = *bcoef_data;
+         pdat::ArrayDataIterator bi(b.getBox());
+         for ( ; bi; bi++) {
+            pdat::FaceIndex fi(bi() + offset_to_inside, axis, face);
+            if (flag_data(fi, face) == 0) {
+               b(*bi, 0) = 0.0;
+            } else {
+               b(*bi, 0) = 1.0;
+            }
+         }
+      }
+
+      if (!gcoef_data.isNull()) {
+         tbox::Pointer<geom::CartesianPatchGeometry> pg =
+            patch.getPatchGeometry();
+         const tbox::Array<hier::BoundaryBox>& codim1_boxes =
+            pg->getCodimensionBoundaries(1);
+         /*
+          * Search for cached boundary box containing current boundary box.
+          */
+         for (bn = 0; bn < codim1_boxes.getSize(); ++bn) {
+            const hier::BoundaryBox& cdb = codim1_boxes[bn];
+            if (bdry_box.getLocationIndex() == cdb.getLocationIndex()
+                && bdry_box.getBox().lower() >= cdb.getBox().lower()
+                && bdry_box.getBox().upper() <= cdb.getBox().upper()
+                ) break;
+         }
+#ifdef DEBUG_CHECK_ASSERTIONS
+         if (bn == codim1_boxes.getSize()) {
+            TBOX_ERROR(
+               d_object_name << " cannot find cached Dirichlet data.\n"
+               <<
+               "This is most likely caused by not calling\n"
+               <<
+               "SimpleCellRobinBcCoefs::cacheDirichletData() after the\n"
+               << "hierarchy changed.\n");
+         }
+#endif
+
+         std::map<hier::LocalId, int> foo = d_dirichlet_data_pos[ln];
+         int position = foo[pn] + bn;
+
+         const pdat::ArrayData<double>& dirichlet_array_data =
+            *d_dirichlet_data[position];
+         diffcoef_data_ptr = patch.getPatchData(d_diffusion_coef_id);
+         pdat::ArrayData<double>& g = *gcoef_data;
+         pdat::OuterfaceData<double>& flux_data(*flux_data_ptr);
+         pdat::ArrayDataIterator ai(g.getBox());
+         for ( ; ai; ai++) {
+            pdat::FaceIndex fi(ai() + offset_to_inside, axis, face);
+            if (flag_data(fi, face) == 0) {
+               g(*ai, 0) = dirichlet_array_data(*ai, 0);
+            } else {
+               pdat::FaceIndex fi2(ai() + offset_to_inside, axis, face);
+               if (d_diffusion_coef_id == -1) {
+                  g(*ai, 0) = flux_data(fi2, face) / d_diffusion_coef_constant;
+               } else {
+                  g(*ai, 0) = flux_data(fi2, face)
+                     / diffcoef_data_ptr->getArrayData(axis) (*ai, 0);
+               }
+            }
+         }
+      }
+
+   }
+
+   t_set_bc_coefs->stop();
+}
+
+/*
+ ***********************************************************************
+ * This class cannot set coefficients for boundary boxes that extend   *
+ * past the patch in the direction parallel to the boundary,           *
+ * because it relies on data, such as pdat::OutersideData<DIM>,             *
+ * that does not extend.                                               *
+ ***********************************************************************
+ */
+hier::IntVector SimpleCellRobinBcCoefs::numberOfExtensionsFillable() const
+{
+   return hier::IntVector::getZero(d_dim);
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Copy and save cell-centered Dirichlet data in ghost cells.           *
+ * For each boundary box in the hierarchy, we create a pdat::ArrayData<DIM>  *
+ * object indexed on the side indices corresponding to boundary boxes.  *
+ * The ghost-cell-centered data is shifted to the side indices and      *
+ * saved in the pdat::ArrayData<DIM> objects.                                *
+ *                                                                      *
+ * First, loop through the hierarchy to compute how many                *
+ * pdat::ArrayData<DIM> objects we need and the position of each one.        *
+ *                                                                      *
+ * Second, allocate the pdat::ArrayData<DIM> objects.                        *
+ *                                                                      *
+ * Third, loop through the hierarchy again to allocate the data in each *
+ * pdat::ArrayData<DIM> object and cache the ghost data.                     *
+ *                                                                      *
+ * The position of the appropriate boundary box bn of patch pn          *
+ * of level ln is d_dirichlet_data_pos[ln][pn]+bn                       *
+ *                                                                      *
+ ************************************************************************
+ */
+void SimpleCellRobinBcCoefs::cacheDirichletData(
+   int dirichlet_data_id)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (!d_hierarchy) {
+      TBOX_ERROR(
+         d_object_name << ": hierarchy has not been set.\n"
+         <<
+         "use setHierarchy() to set the hierarchy before\n"
+         << "caching boundary ghost cell data.\n");
+   }
+#endif
+   d_dirichlet_data.setNull();
+   d_dirichlet_data_pos.clear();
+   int ln, bn, position, n_reqd_boxes = 0;
+   d_dirichlet_data_pos.resize(d_ln_max + 1);
+   for (ln = d_ln_min; ln <= d_ln_max; ++ln) {
+      hier::PatchLevel& level = (hier::PatchLevel &)
+         * d_hierarchy->getPatchLevel(ln);
+      hier::PatchLevel::Iterator pi(level);
+      for ( ; pi; pi++) {
+         hier::Patch& patch = **pi;
+         const hier::LocalId &pn = patch.getLocalId();
+         tbox::Pointer<geom::CartesianPatchGeometry> pg =
+            patch.getPatchGeometry();
+         const tbox::Array<hier::BoundaryBox>& codim1_boxes =
+            pg->getCodimensionBoundaries(1);
+         d_dirichlet_data_pos[ln][pn] = n_reqd_boxes;
+         n_reqd_boxes += codim1_boxes.getSize();
+      }
+   }
+   d_dirichlet_data.resizeArray(n_reqd_boxes);
+   for (ln = d_ln_min; ln <= d_ln_max; ++ln) {
+      hier::PatchLevel& level = (hier::PatchLevel &)
+         * d_hierarchy->getPatchLevel(ln);
+      hier::PatchLevel::Iterator pi(level);
+      for ( ; pi; pi++) {
+         hier::Patch& patch = **pi;
+         const hier::LocalId &pn = patch.getLocalId();
+         tbox::Pointer<pdat::CellData<double> > cell_data =
+            patch.getPatchData(dirichlet_data_id);
+         tbox::Pointer<geom::CartesianPatchGeometry> pg =
+            patch.getPatchGeometry();
+         const tbox::Array<hier::BoundaryBox>& codim1_boxes =
+            pg->getCodimensionBoundaries(1);
+         for (bn = 0; bn < codim1_boxes.getSize(); ++bn) {
+            const hier::BoundaryBox& bdry_box = codim1_boxes[bn];
+            position = d_dirichlet_data_pos[ln][pn] + bn;
+            hier::Box databox = makeSideBoundaryBox(bdry_box);
+            d_dirichlet_data[position] =
+               new pdat::ArrayData<double>(databox,
+                                           1);
+            pdat::ArrayData<double>& array_data = *d_dirichlet_data[position];
+            hier::IntVector shift_amount(d_dim, 0);
+            const int location_index = bdry_box.getLocationIndex();
+            if (location_index % 2 == 0) shift_amount[location_index / 2] = 1;
+            array_data.copy(cell_data->getArrayData(),
+               databox,
+               shift_amount);
+         }
+      }
+   }
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Reverse action of cacheDirichletData by copying cached data back     *
+ * into the ghost cells.                                                *
+ *                                                                      *
+ * The cached data is not deallocated.                                  *
+ *                                                                      *
+ ************************************************************************
+ */
+void SimpleCellRobinBcCoefs::restoreDirichletData(
+   int dirichlet_data_id)
+{
+   if (d_dirichlet_data_pos.empty()) {
+      TBOX_ERROR(d_object_name << ".restoreDirichletData(): Dirichlet\n"
+                               << "data has not been set.\n");
+   }
+   int ln, bn, position;
+   for (ln = d_ln_min; ln <= d_ln_max; ++ln) {
+      hier::PatchLevel& level = (hier::PatchLevel &)
+         * d_hierarchy->getPatchLevel(ln);
+      hier::PatchLevel::Iterator pi(level);
+      for ( ; pi; pi++) {
+         hier::Patch& patch = **pi;
+         const hier::LocalId &pn = patch.getLocalId();
+         tbox::Pointer<pdat::CellData<double> > cell_data =
+            patch.getPatchData(dirichlet_data_id);
+         tbox::Pointer<geom::CartesianPatchGeometry> pg =
+            patch.getPatchGeometry();
+         const tbox::Array<hier::BoundaryBox>& codim1_boxes =
+            pg->getCodimensionBoundaries(1);
+         for (bn = 0; bn < codim1_boxes.getSize(); ++bn) {
+            const hier::BoundaryBox& bdry_box = codim1_boxes[bn];
+            position = d_dirichlet_data_pos[ln][pn] + bn;
+            pdat::ArrayData<double>& array_data = *d_dirichlet_data[position];
+            hier::IntVector shift_amount(d_dim, 0);
+            const int location_index = bdry_box.getLocationIndex();
+            hier::Box dst_box = array_data.getBox();
+            if (location_index % 2 == 0) {
+               shift_amount[location_index / 2] = -1;
+               dst_box.shift(location_index / 2, -1);
+            }
+            cell_data->getArrayData().copy(array_data,
+               dst_box,
+               shift_amount);
+         }
+      }
+   }
+}
+
+void SimpleCellRobinBcCoefs::setDiffusionCoefId(
+   int diffusion_coef_id)
+{
+   d_diffusion_coef_id = diffusion_coef_id;
+   d_diffusion_coef_constant = 0.0;
+}
+
+void SimpleCellRobinBcCoefs::setDiffusionCoefConstant(
+   double diffusion_coef_constant)
+{
+   d_diffusion_coef_constant = diffusion_coef_constant;
+   d_diffusion_coef_id = -1;
+}
+
+/*
+ ************************************************************************
+ * Make surface box on boundary using standard boundary box             *
+ ************************************************************************
+ */
+
+hier::Box SimpleCellRobinBcCoefs::makeSideBoundaryBox(
+   const hier::BoundaryBox& boundary_box) const
+{
+   if (boundary_box.getBoundaryType() != 1) {
+      TBOX_ERROR(
+         d_object_name
+         << ": CartesianRobinBcHelper::makeSideBoundaryBox called with\n"
+         << "improper boundary box\n"
+         << "for " << d_object_name);
+   }
+   hier::Box face_indices = boundary_box.getBox();
+   int location_index = boundary_box.getLocationIndex();
+   if (location_index % 2 == 0) {
+      /*
+       * On the min index side, the face indices are one higher
+       * than the boundary cell indices, in the direction normal
+       * to the boundary.
+       */
+      face_indices.shift(location_index / 2, 1);
+   }
+   return face_indices;
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/SimpleCellRobinBcCoefs.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/SimpleCellRobinBcCoefs.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,322 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Robin boundary condition problem-dependent interfaces 
+ *
+ ************************************************************************/
+#ifndef included_solv_SimpleCellRobinBcCoefs
+#define included_solv_SimpleCellRobinBcCoefs
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/solv/RobinBcCoefStrategy.h"
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <map>
+
+namespace SAMRAI {
+namespace solv {
+
+/*!
+ * @brief A prefabricated Robin boundary condition coefficients
+ * with an interface like the old Poisson solvers.
+ *
+ * This class is intended to make it easy for users of the old
+ * Poisson solver to adapt to the new solver by providing an
+ * interface similar to that of the old solver.  Underneath,
+ * the boundary condition is converted to Robin bc coefficients
+ * used by the new solver.
+ *
+ * This class refers to some grid-based outerside or ghost cell
+ * data touching patch outer sides when providing the Robin bc
+ * coefficients.  In the most general case, it is unable to
+ * provide coefficients for patches outside the grid on which
+ * that data is provided.  It is also unable to provide coefficients
+ * for boundary boxes that extend past the edge or corner of a
+ * patch.  This may limit this class from being used when certain
+ * features of the Poisson solver is enabled.
+ */
+class SimpleCellRobinBcCoefs:
+   public RobinBcCoefStrategy
+{
+
+public:
+   /*!
+    * @brief Constructor
+    */
+   SimpleCellRobinBcCoefs(
+      const tbox::Dimension& dim,
+      const std::string& object_name = std::string());
+
+   /*!
+    * @brief Destructor.
+    */
+   virtual ~SimpleCellRobinBcCoefs(
+      void);
+
+   //@{ @name Inherited from RobinBcCoefStrategy
+
+   /*!
+    * @brief Function to fill arrays of Robin boundary
+    * condition coefficients at a patch boundary.
+    *
+    * This implementation of the virtual function
+    * RobinBcCoefStrategy::setBcCoefs()
+    * uses information specified by the call to setBoundaries()
+    * to determine the coefficients.
+    *
+    * @param acoef_data boundary coefficient data.
+    *        This is defined to include index range for
+    *        the boundary faces on the boundary box @c bdry_box.
+    *        If this is a null pointer, then the calling function
+    *        is not interested in a, and you can disregard it.
+    * @param bcoef_data boundary coefficient data.
+    *        This is defined to include index range for
+    *        the boundary faces on the boundary box @c bdry_box.
+    * @param gcoef_data boundary coefficient data.
+    *        This is defined to include index range for
+    *        the boundary faces on the boundary box @c bdry_box.
+    * @param variable variable to set the coefficients for.
+    * @param patch patch requiring bc coefficients
+    * @param bdry_box boundary box showing where on the boundary
+    *        the coefficient data is needed.
+    * @param fill_time solution time corresponding to filling, for use
+    *        when coefficients are time-dependent.
+    */
+   void
+   setBcCoefs(
+      tbox::Pointer<pdat::ArrayData<double> >& acoef_data,
+      tbox::Pointer<pdat::ArrayData<double> >& bcoef_data,
+      tbox::Pointer<pdat::ArrayData<double> >& gcoef_data,
+      const tbox::Pointer<hier::Variable>& variable,
+      const hier::Patch& patch,
+      const hier::BoundaryBox& bdry_box,
+      double fill_time = 0.0) const;
+
+   hier::IntVector
+   numberOfExtensionsFillable() const;
+
+   //@}
+
+   /*!
+    * @brief Set the hierarchy where boundary data associated
+    * with the hierarchy is found.
+    *
+    * This class requires you to specify some grid data
+    * associated with a hierarchy, such as the Dirichlet
+    * boundary values, the flux or the Dirichlet/Neumann
+    * flag.  That hierarchy and the range of relevant
+    * patch levels is specified by calling this function.
+    */
+   void
+   setHierarchy(
+      tbox::Pointer<hier::PatchHierarchy>,
+      const int ln_min = -1,
+      const int ln_max = -1);
+
+   /*!
+    * @brief Specify the boundary conditions that are to be used at the
+    * physical domain boundary.
+    *
+    * The boundary conditions specified as the
+    * std::string argument "boundary_type."  The boundary type argument can be
+    * "Dirichlet", "Neumann", or "Mixed".
+    *
+    * If using Dirichlet boundary conditions, then before the solver is
+    * called, the storage for the unknown u
+    * must have a mapped_box_level of ghost cells at least one cell wide that includes
+    * the Dirichlet boundary values.
+    *
+    * If using Neumann boundary conditions, then before the solver is called,
+    * the outerface boundary flux data must be set for the Neumann conditions.
+    * The fluxes argument gives the patch data index of this flux
+    * data.
+    *
+    * The mixed boundary type is for a mixture of Dirichlet and Neumann
+    * boundary conditions are used at the physical domain boundary.
+    * The fluxes argument gives the patch data index of the outerface data
+    * that specifies the flux data for the Neumann conditions.  The flags
+    * array is an outerface data array of integer flags that specifies whether
+    * Dirichlet (flag == zero) or Neumann (flag == one) conditions are to be
+    * used at a particular cell boundary face.  Note that the flag data must
+    * be set before the matrix entries can be computed and the flux data
+    * must be set before the solver is called.  The bdry_types argument can
+    * be used if the boundary conditions are mixed but one or more of the
+    * faces of the physical boundary are entirely either Dirichlet or
+    * Neumann boundaries.  The bdry_types argument should be an array of
+    * 2*DIM integers, specifying the boundary conditions on each side of
+    * the physical domain.  It should be ordered {x_lo, x_hi, y_lo, y_hi,
+    * z_lo, z_hi}, with the values for each face being 0 for Dirichlet
+    * conditions, 1 for Neumann conditions, and 2 for mixed boundary
+    * conditions.  The bdry_type argument is never required, but if used
+    * it can sometimes make the PoissonHYPRESolver class more efficient.
+    */
+
+   void
+   setBoundaries(
+      const std::string& boundary_type,
+      const int fluxes = -1,
+      const int flags = -1,
+      int* bdry_types = NULL);
+
+   /*!
+    * @brief Cache data providing Dirichlet boundary values.
+    *
+    * This function makes a private copy of the relevant ghost cell data
+    * that it later uses provide the coefficient g on Dirichlet boundaries.
+    * The index must correspond to cell-centered double
+    * data with non-zero ghost width.
+    *
+    * Functions setHierarchy() and setBoundaries()
+    * should be called before this one.
+    * This function should be called each time the hierarchy or
+    * Dirichlet data changes.
+    *
+    * @param dirichlet_data_id patch data id of the source cell data
+    *        for copy.
+    */
+   void
+   cacheDirichletData(
+      int dirichlet_data_id);
+
+   /*!
+    * @brief Copy cached Dirichlet data into ghost cells.
+    *
+    * Reverse action of cacheDirichletData by copying cached data back
+    * into the ghost cells.
+    *
+    * The cached data is not dallocated.
+    *
+    * @param dirichlet_data_id patch data id of the destination cell data
+    *        for copy.
+    */
+   void
+   restoreDirichletData(
+      int dirichlet_data_id);
+
+   /*!
+    * @brief Set the patch data index of the diffusion
+    * coefficient used in Neumann boundary fluxes.
+    *
+    * The diffusion coefficient, along with the prescribed flux,
+    * is used to set the gradient of the solution normal to the boundary.
+    * By default, the diffusion coefficient is assumed to be 1.
+    * If used, the diffusion coefficient data id must be set before
+    * asking for the coefficient g, which depends on it.
+    * The index must correspond to side-centered double data.
+    *
+    * This function overrides the effect of setDiffusionCoefConstant().
+    */
+   void
+   setDiffusionCoefId(
+      int diffusion_coef_id);
+
+   /*!
+    * @brief Set the value of the diffusion coefficient
+    * used in Neumann boundary fluxes to a constant.
+    *
+    * This function is similar to setDiffusionCoefId() but is
+    * used when the diffusion coefficient is a constant.
+    *
+    * This function overrides the effect of setDiffusionCoefId().
+    */
+   void
+   setDiffusionCoefConstant(
+      double diffusion_coef_value);
+
+private:
+   /*!
+    * @brief Return box describing the index space of surfaces
+    * defined by a boundary box.
+    *
+    * Define a box describing the indices of the surfaces corresponding
+    * to the input boundary box.  A surface is a face in 3D and an edge
+    * in 2D.  These surfaces lie on the boundary itself.
+    *
+    * The input boundary_box must be of type 1
+    * (see hier::BoundaryBox::getBoundaryType()).
+    *
+    * This is a utility function for working with the surface
+    * indices coresponding to a boundary box.
+    *
+    * @param boundary_box input boundary box
+    * @return a box to define the face indices corresponding to
+    *    boundary_box
+    */
+   hier::Box
+   makeSideBoundaryBox(
+      const hier::BoundaryBox& boundary_box) const;
+
+   /*!
+    * @brief Object dimension.
+    */
+   const tbox::Dimension d_dim;
+
+   /*!
+    * @brief object name
+    */
+   std::string d_object_name;
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+
+   int d_ln_min;
+   int d_ln_max;
+
+   /*!
+    * @brief array of boundary type on each side
+    */
+   int d_bdry_types[2 * tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   /*!
+    * @brief patch index for fluxes
+    */
+   int d_flux_id;
+   /*!
+    * @brief patch index for flags
+    */
+   int d_flag_id;
+   /*!
+    * @brief patch index for Dirichlet values.
+    */
+   int d_dirichlet_data_id;
+   /*!
+    * @brief patch index for diffusion coefficients if it is variable.
+    */
+   int d_diffusion_coef_id;
+   /*!
+    * @brief value of for diffusion coefficients if it is constant.
+    */
+   double d_diffusion_coef_constant;
+   /*!
+    * @brief Cached ghost cell value used in Dirichlet bc.
+    *
+    * Cached boundary box ghost cell data are stored in this 1D
+    * array.  For the position of a particular box, see
+    * d_dirichlet_data_position.
+    */
+   tbox::Array<tbox::Pointer<pdat::ArrayData<double> > > d_dirichlet_data;
+   /*!
+    * @brief Position of cached boundary boxes of ghost cell data.
+    *
+    * The position of the cached boundary box bn of patch pn of
+    * level ln is d_dirichlet_data_pos[ln][pn]+bn.
+    */
+   std::vector<std::map<hier::LocalId, int> > d_dirichlet_data_pos;
+
+   /*!
+    * @brief Timers for performance measurement.
+    */
+   tbox::Pointer<tbox::Timer> t_set_bc_coefs;
+
+};
+
+}
+}
+
+#endif  // included_solv_SimpleCellRobinBcCoefs
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/SundialsAbstractVector.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/SundialsAbstractVector.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,256 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to C++ vector implementation for Sundials package. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/solv/SundialsAbstractVector.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <cstdlib>
+
+#ifdef HAVE_SUNDIALS
+
+namespace SAMRAI {
+namespace solv {
+
+#define SABSVEC_CAST(v) \
+   (static_cast<SAMRAI::solv::SundialsAbstractVector *>(v \
+                                                        -> \
+                                                        content))
+
+SundialsAbstractVector::SundialsAbstractVector()
+{
+   /* Create N vector */
+   d_n_vector = (N_Vector)malloc(sizeof *d_n_vector);
+   TBOX_ASSERT(d_n_vector != NULL);
+
+   /* Attach content and ops */
+   d_n_vector->content = this;
+   d_n_vector->ops = SundialsAbstractVector::createVectorOps();
+}
+
+SundialsAbstractVector::~SundialsAbstractVector()
+{
+   if (d_n_vector) {
+      if (d_n_vector->ops) {
+         free(d_n_vector->ops);
+         d_n_vector->ops = NULL;
+      }
+      free(d_n_vector);
+      d_n_vector = NULL;
+   }
+}
+
+N_Vector SundialsAbstractVector::getNVector() {
+   return d_n_vector;
+}
+
+N_Vector_Ops SundialsAbstractVector::createVectorOps()
+{
+   /* Create vector operation structure */
+
+   N_Vector_Ops ops;
+
+   ops = (N_Vector_Ops) std::calloc(1, sizeof(struct _generic_N_Vector_Ops));
+
+// SGS TODO what about missing fns?
+   ops->nvclone = SundialsAbstractVector::N_VClone_SAMRAI;
+//   ops->nvcloneempty      = N_VCloneEmpty_SAMRAI;
+   ops->nvdestroy = N_VDestroy_SAMRAI;
+//   ops->nvspace           = N_VSpace_SAMRAI;
+//   ops->nvgetarraypointer = N_VGetArrayPointer_SAMRAI;
+//   ops->nvsetarraypointer = N_VSetArrayPointer_SAMRAI;
+   ops->nvlinearsum = N_VLinearSum_SAMRAI;
+   ops->nvconst = N_VConst_SAMRAI;
+   ops->nvprod = N_VProd_SAMRAI;
+   ops->nvdiv = N_VDiv_SAMRAI;
+   ops->nvscale = N_VScale_SAMRAI;
+   ops->nvabs = N_VAbs_SAMRAI;
+   ops->nvinv = N_VInv_SAMRAI;
+   ops->nvaddconst = N_VAddConst_SAMRAI;
+   ops->nvdotprod = N_VDotProd_SAMRAI;
+   ops->nvmaxnorm = N_VMaxNorm_SAMRAI;
+//   ops->nvwrmsnormmask    = N_VWrmsNormMask_SAMRAI;
+   ops->nvwrmsnorm = N_VWrmsNorm_SAMRAI;
+   ops->nvmin = N_VMin_SAMRAI;
+   ops->nvwl2norm = N_VWL2Norm_SAMRAI;
+   ops->nvl1norm = N_VL1Norm_SAMRAI;
+   ops->nvcompare = N_VCompare_SAMRAI;
+   ops->nvinvtest = N_VInvTest_SAMRAI;
+//   ops->nvconstrmask      = N_VConstrMask_SAMRAI;
+//   ops->nvminquotient     = N_VMinQuotient_SAMRAI;
+
+   return ops;
+}
+
+/* Duplicate vector structure and allocate data storage for new vector.
+ * Note: This function should only be invoked from within the Sundials
+ * package for producing temporary vectors. */
+N_Vector SundialsAbstractVector::N_VClone_SAMRAI(
+   N_Vector w)
+{
+   /* Create content, which in this case is the SAMRAI wrapper vector object */
+   SAMRAI::solv::SundialsAbstractVector* v =
+      SABSVEC_CAST(w)->makeNewVector();
+
+   return v->getNVector();
+}
+
+/* Free vector structure and associated data. */
+void SundialsAbstractVector::N_VDestroy_SAMRAI(
+   N_Vector v)
+{
+   if (v) {
+      SABSVEC_CAST(v)->freeVector();
+   }
+}
+
+/* Set z = a * x + b * y */
+void SundialsAbstractVector::N_VLinearSum_SAMRAI(
+   realtype a,
+   N_Vector x,
+   realtype b,
+   N_Vector y,
+   N_Vector z)
+{
+   SABSVEC_CAST(z)->setLinearSum(a, SABSVEC_CAST(x), b, SABSVEC_CAST(y));
+}
+
+/* Set vector entries to scalar: v = c  */
+void SundialsAbstractVector::N_VConst_SAMRAI(
+   realtype c,
+   N_Vector z)
+{
+   SABSVEC_CAST(z)->setToScalar(c);
+}
+
+/* Set z_i = x_i * y_i */
+void SundialsAbstractVector::N_VProd_SAMRAI(
+   N_Vector x,
+   N_Vector y,
+   N_Vector z)
+{
+   SABSVEC_CAST(z)->pointwiseMultiply(SABSVEC_CAST(x), SABSVEC_CAST(y));
+}
+
+/* Set z_i = x_i / y_i */
+void SundialsAbstractVector::N_VDiv_SAMRAI(
+   N_Vector x,
+   N_Vector y,
+   N_Vector z)
+{
+   SABSVEC_CAST(z)->pointwiseDivide(SABSVEC_CAST(x), SABSVEC_CAST(y));
+}
+
+/* Scale vector entries: z = c * x   */
+void SundialsAbstractVector::N_VScale_SAMRAI(
+   realtype c,
+   N_Vector x,
+   N_Vector z)
+{
+   SABSVEC_CAST(z)->scaleVector(SABSVEC_CAST(x), c);
+}
+
+/* Set z_i = | x_i | */
+void SundialsAbstractVector::N_VAbs_SAMRAI(
+   N_Vector x,
+   N_Vector z)
+{
+   SABSVEC_CAST(z)->setAbs(SABSVEC_CAST(x));
+}
+
+/* Set z_i = 1.0 / x_i */
+void SundialsAbstractVector::N_VInv_SAMRAI(
+   N_Vector x,
+   N_Vector z)
+{
+   SABSVEC_CAST(z)->pointwiseReciprocal(SABSVEC_CAST(x));
+}
+
+/* Set z_i = x_i + b */
+void SundialsAbstractVector::N_VAddConst_SAMRAI(
+   N_Vector x,
+   realtype b,
+   N_Vector z)
+{
+   SABSVEC_CAST(z)->addScalar(SABSVEC_CAST(x), b);
+}
+
+/* Return dot product: (x,y) = sum( x_i * y_i ) */
+realtype SundialsAbstractVector::N_VDotProd_SAMRAI(
+   N_Vector x,
+   N_Vector y)
+{
+   return SABSVEC_CAST(x)->dotWith(SABSVEC_CAST(y));
+}
+
+/* Return max-norm of vector x */
+realtype SundialsAbstractVector::N_VMaxNorm_SAMRAI(
+   N_Vector x)
+{
+   return SABSVEC_CAST(x)->maxNorm();
+}
+
+/* Return weighted RMS-norm of vector x; w is weighting vector. */
+realtype SundialsAbstractVector::N_VWrmsNorm_SAMRAI(
+   N_Vector x,
+   N_Vector w)
+{
+   return SABSVEC_CAST(x)->weightedRMSNorm(SABSVEC_CAST(w));
+}
+
+/* Return minimum entry in x. */
+realtype SundialsAbstractVector::N_VMin_SAMRAI(
+   N_Vector x)
+{
+   return SABSVEC_CAST(x)->vecMin();
+}
+
+/* Return weighted L2-norm of vector x */
+realtype SundialsAbstractVector::N_VWL2Norm_SAMRAI(
+   N_Vector x,
+   N_Vector w)
+{
+   return SABSVEC_CAST(x)->weightedL2Norm(SABSVEC_CAST(w));
+}
+
+/* Return L1-norm of vector x */
+realtype SundialsAbstractVector::N_VL1Norm_SAMRAI(
+   N_Vector x)
+{
+   return SABSVEC_CAST(x)->L1Norm();
+}
+
+/*
+ * Set each entry in vector z based on the vector x as follows:
+ * if | x_i | >= c, then z_i = 1.0, else z_i = 0.0.
+ */
+void SundialsAbstractVector::N_VCompare_SAMRAI(
+   realtype c,
+   N_Vector x,
+   N_Vector z)
+{
+   SABSVEC_CAST(z)->compareToScalar(SABSVEC_CAST(x), c);
+}
+
+/*
+ * Set each entry of vector z: v_i =  1.0 / x_i, where x_i is an
+ * entry in the vector x, unless x_i = 0.0.  If x_i = 0.0, then
+ * return 0.  Otherwise, 1 is returned.
+ */
+booleantype SundialsAbstractVector::N_VInvTest_SAMRAI(
+   N_Vector x,
+   N_Vector z)
+{
+   return SABSVEC_CAST(z)->testReciprocal(SABSVEC_CAST(x));
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/SundialsAbstractVector.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/SundialsAbstractVector.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,359 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to C++ vector kernel operations for Sundials package. 
+ *
+ ************************************************************************/
+
+#ifndef included_solv_SundialsAbstractVector
+#define included_solv_SundialsAbstractVector
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#ifdef HAVE_SUNDIALS
+
+#ifndef included_sundials_nvector
+#include "sundials/sundials_nvector.h"
+#define included_sundials_nvector
+#endif
+
+namespace SAMRAI {
+namespace solv {
+
+/**
+ * Class solv::SundialsAbstractVector is an abstract base class that declares
+ * operations provided by any <TT>C++</TT> class that may be used as the
+ * vector kernel by the Sundials nonlinear solver package.  Sundials allows
+ * arbitrarily defined vectors to be used within it as long as the proper
+ * collection of operations are provided.  The intent of this base class
+ * to provide the interface for one's own vector kernel.  One implements
+ * a subclass that provides the functions declared herein as pure virtual
+ * and which provides necessary vector data structures.  Note that the
+ * virtual members of this class are all protected.  They should not be used
+ * outside of a subclass of this class.
+ *
+ * Sundials was developed in the Center for Applied Scientific Computing (CASC)
+ * at Lawrence Livermore National Laboratory (LLNL).  For more information
+ * about Sundials, see A.G. Taylor and A.C. Hindmarsh, "User documentation for
+ * Sundials, a nonlinear solver for sequential and parallel computers",
+ * UCRL-ID-131185, Lawrence Livermore National Laboratory, 1998.
+ *
+ * Important notes:
+ *
+ *
+ *
+ * - \b (1) The user-supplied vector subclass should only inherit from
+ *            this base class. It MUST NOT employ multiple inheritance so that
+ *            problems with casting from a base class pointer to a subclass
+ *            pointer and the use of virtual functions works properly.
+ * - \b (2) The user-supplied subclass that implements the vector data
+ *            structures and operations is responsible for all parallelism,
+ *            I/O, etc. associated with the vector objects.  Sundials is
+ *            implemented using a SPMD programming model.  It has no knowlege
+ *            of the structure of the vector data, nor the implementations
+ *            of the individual vector routines.
+ * - \b (3) We assume the vector data is <TT>double</TT>, which is the
+ *            default for Sundials.
+ *
+ *
+ *
+ *
+ * @see solv::SundialsSolver
+ */
+
+class SundialsAbstractVector
+{
+public:
+   /**
+    * Uninteresting constructor and destructor for solv::SundialsAbstractVector.
+    */
+   SundialsAbstractVector();
+   virtual ~SundialsAbstractVector();
+
+   /**
+    * Clone the vector structure and allocate storage for the vector
+    * data.  Then, return a pointer to the new vector instance.  Note that
+    * the new vector object must be distinct from the original.  This
+    * function is distinct from the vector constructor since it will
+    * be called from within Sundials to allocate vectors during the nonlinear
+    * solution process.  The original solution vector must be setup by the
+    * user's application code.
+    */
+   virtual SundialsAbstractVector *
+   makeNewVector() = 0;
+
+   /**
+    * Destroy vector structure and its storage. This function is distinct
+    * from the destructor since it will be called from within Sundials to
+    * deallocate vectors during the nonlinear solution process.
+    */
+   virtual void
+   freeVector() = 0;
+
+   /**
+    * Initialize all entries of this vector object to scalar \f$c\f$.
+    */
+   virtual void
+   setToScalar(
+      const double c) = 0;
+
+   /**
+    * Set this vector object to scalar \f$c x\f$, where \f$c\f$ is a scalar and
+    * x is another vector.
+    */
+   virtual void
+   scaleVector(
+      const SundialsAbstractVector* x,
+      const double c) = 0;
+
+   /**
+    * Set this vector object to \f$a x + b y\f$, where \f$a, b\f$ are scalars and
+    * \f$x, y\f$ are vectors.
+    */
+   virtual void
+   setLinearSum(
+      const double a,
+      const SundialsAbstractVector* x,
+      const double b,
+      const SundialsAbstractVector* y) = 0;
+
+   /**
+    * Set each entry of this vector: \f$v_i = x_i y_i\f$, where \f$x_i, y_i\f$ are
+    * entries in vectors \f$x\f$ and \f$y\f$.
+    */
+   virtual void
+   pointwiseMultiply(
+      const SundialsAbstractVector* x,
+      const SundialsAbstractVector* y) = 0;
+
+   /**
+    * Set each entry of this vector: \f$v_i = x_i / y_i\f$, where \f$x_i, y_i\f$ are
+    * entries in vectors \f$x\f$ and \f$y\f$.  Based on the Sundials vector
+    * implementation, it is not necessary to check for division by zero.
+    */
+   virtual void
+   pointwiseDivide(
+      const SundialsAbstractVector* x,
+      const SundialsAbstractVector* y) = 0;
+
+   /**
+    * Set each entry of this vector to the absolute value of the
+    * corresponding entry in vector \f$x\f$.
+    */
+   virtual void
+   setAbs(
+      const SundialsAbstractVector* x) = 0;
+
+   /**
+    * Set each entry of this vector: \f$v_i =  1 / x_i\f$, where \f$x_i\f$ is an entry
+    * entry in vector \f$x\f$.  Based on the Sundials vector implementation,
+    * it is not necessary to no check for division by zero.
+    */
+   virtual void
+   pointwiseReciprocal(
+      const SundialsAbstractVector* x) = 0;
+
+   /**
+    * Set each entry of this vector to the corresponding entry in vector \f$x\f$
+    * plus the scalar \f$b\f$.
+    */
+   virtual void
+   addScalar(
+      const SundialsAbstractVector* x,
+      const double b) = 0;
+
+   /**
+    * Return the dot product of this vector and the argument vector \f$x\f$.
+    */
+   virtual double
+   dotWith(
+      const SundialsAbstractVector* x) const = 0;
+
+   /**
+    * Return the max norm of this vector.
+    */
+   virtual double
+   maxNorm() const = 0;
+
+   /**
+    * Return the \f$L_1\f$ norm of this vector.
+    */
+   virtual double
+   L1Norm() const = 0;
+
+   /**
+    * Return the weighted-\f$L_2\f$ norm of this vector using the vector \f$x\f$
+    * as the weighting vector.
+    */
+   virtual double
+   weightedL2Norm(
+      const SundialsAbstractVector* x) const = 0;
+
+   /**
+    * Return the weighted root mean squared norm of this vector using
+    * the vector \f$x\f$ as the weighting vector.
+    */
+   virtual double
+   weightedRMSNorm(
+      const SundialsAbstractVector* x) const = 0;
+
+   /**
+    * Return the minimum entry of this vector.
+    */
+   virtual double
+   vecMin() const = 0;
+
+   /**
+    * Return \f$0\f$ if \f$x_i \neq 0\f$ and \f$x_i z_i \leq 0\f$, for some \f$i\f$.
+    * Here \f$z_i\f$ is an element of this vector. Otherwise, return \f$1\f$.
+    */
+   virtual int
+   constrProdPos(
+      const SundialsAbstractVector* x) const = 0;
+
+   /**
+    * Set each entry in this vector based on the vector \f$x\f$ as follows:
+    * if \f$\mid x_i \mid \geq c\f$, then \f$v_i = 1\f$, else \f$v_i = 0\f$.
+    */
+   virtual void
+   compareToScalar(
+      const SundialsAbstractVector* x,
+      const double c) = 0;
+
+   /**
+    * Set each entry of this vector: \f$v_i =  1 / x_i\f$, where \f$x_i\f$ is an
+    * entry entry in the vector \f$x\f$, unless \f$x_i = 0\f$.  If \f$x_i = 0\f$,
+    * then return \f$0\f$.  Otherwise, \f$1\f$ is returned.
+    */
+   virtual int
+   testReciprocal(
+      const SundialsAbstractVector* x) = 0;
+
+   /**
+    * Return the wrapped Sundials N_Vector.
+    */
+   N_Vector
+   getNVector();
+
+   /**
+    * Print the vector data to the output stream used by the subclass
+    * print routine.
+    */
+   virtual void
+   printVector() const = 0;
+
+private:
+   N_Vector d_n_vector;
+
+   /**
+    * Create Sundials VectorOps structure
+    *
+    */
+   static N_Vector_Ops
+   createVectorOps();
+
+   /**
+    * The Sundials vector operations
+    *
+    */
+
+//   static N_Vector N_VCloneEmpty_SAMRAI(N_Vector w);
+   static N_Vector
+   N_VClone_SAMRAI(
+      N_Vector w);
+   static void
+   N_VDestroy_SAMRAI(
+      N_Vector v);
+// static void N_VSpace_SAMRAI(N_Vector v, long int *lrw, long int *liw);
+// static realtype *N_VGetArrayPointer_SAMRAI(N_Vector v);
+// static void N_VSetArrayPointer_SAMRAI(realtype *v_data, N_Vector v);
+   static void
+   N_VLinearSum_SAMRAI(
+      realtype a,
+      N_Vector x,
+      realtype b,
+      N_Vector y,
+      N_Vector z);
+   static void
+   N_VConst_SAMRAI(
+      realtype c,
+      N_Vector z);
+   static void
+   N_VProd_SAMRAI(
+      N_Vector x,
+      N_Vector y,
+      N_Vector z);
+   static void
+   N_VDiv_SAMRAI(
+      N_Vector x,
+      N_Vector y,
+      N_Vector z);
+   static void
+   N_VScale_SAMRAI(
+      realtype c,
+      N_Vector x,
+      N_Vector z);
+   static void
+   N_VAbs_SAMRAI(
+      N_Vector x,
+      N_Vector z);
+   static void
+   N_VInv_SAMRAI(
+      N_Vector x,
+      N_Vector z);
+   static void
+   N_VAddConst_SAMRAI(
+      N_Vector x,
+      realtype b,
+      N_Vector z);
+   static realtype
+   N_VDotProd_SAMRAI(
+      N_Vector x,
+      N_Vector y);
+   static realtype
+   N_VMaxNorm_SAMRAI(
+      N_Vector x);
+   static realtype
+   N_VWrmsNorm_SAMRAI(
+      N_Vector x,
+      N_Vector w);
+// static realtype N_VWrmsNormMask_SAMRAI(N_Vector x, N_Vector w, N_Vector id);
+   static realtype
+   N_VMin_SAMRAI(
+      N_Vector x);
+   static realtype
+   N_VWL2Norm_SAMRAI(
+      N_Vector x,
+      N_Vector w);
+   static realtype
+   N_VL1Norm_SAMRAI(
+      N_Vector x);
+   static void
+   N_VCompare_SAMRAI(
+      realtype c,
+      N_Vector x,
+      N_Vector z);
+   static booleantype
+   N_VInvTest_SAMRAI(
+      N_Vector x,
+      N_Vector z);
+   static booleantype
+   N_VConstrMask_SAMRAI(
+      N_Vector c,
+      N_Vector x,
+      N_Vector m);
+   static realtype
+   N_VMinQuotient_SAMRAI(
+      N_Vector num,
+      N_Vector denom);
+
+};
+
+}
+}
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/Sundials_SAMRAIVector.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/Sundials_SAMRAIVector.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,131 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   "Glue code" between SAMRAI vector object and Sundials vector. 
+ *
+ ************************************************************************/
+
+#ifndef included_solv_Sundials_SAMRAIVector_C
+#define included_solv_Sundials_SAMRAIVector_C
+
+#include "SAMRAI/solv/Sundials_SAMRAIVector.h"
+
+#ifdef HAVE_SUNDIALS
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/solv/Sundials_SAMRAIVector.I"
+#endif
+
+namespace SAMRAI {
+namespace solv {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Static public member functions.                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SundialsAbstractVector *Sundials_SAMRAIVector::createSundialsVector(
+   tbox::Pointer<SAMRAIVectorReal<double> > samrai_vec)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!samrai_vec.isNull());
+#endif
+   SundialsAbstractVector* skv = new Sundials_SAMRAIVector(samrai_vec);
+
+   return skv;
+}
+
+void Sundials_SAMRAIVector::destroySundialsVector(
+   SundialsAbstractVector* sundials_vec)
+{
+   if (sundials_vec) {
+      delete (dynamic_cast<Sundials_SAMRAIVector *>(sundials_vec));
+   }
+}
+
+tbox::Pointer<SAMRAIVectorReal<double> >
+Sundials_SAMRAIVector::getSAMRAIVector(
+   SundialsAbstractVector* sundials_vec)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(sundials_vec == (SundialsAbstractVector *)NULL));
+#endif
+   return (dynamic_cast<Sundials_SAMRAIVector *>(sundials_vec))->
+          getSAMRAIVector();
+}
+
+tbox::Pointer<SAMRAIVectorReal<double> >
+Sundials_SAMRAIVector::getSAMRAIVector(
+   N_Vector sundials_vec)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(sundials_vec == NULL));
+#endif
+// sgs
+   return static_cast<Sundials_SAMRAIVector *>(sundials_vec->content)->
+          getSAMRAIVector();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor and destructor for Sundials_SAMRAIVector.          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+Sundials_SAMRAIVector::Sundials_SAMRAIVector(
+   tbox::Pointer<SAMRAIVectorReal<double> > samrai_vector):
+   SundialsAbstractVector(),
+   d_samrai_vector(samrai_vector)
+{
+}
+
+Sundials_SAMRAIVector::~Sundials_SAMRAIVector()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Other miscellaneous member functions					*
+ *                                                                       *
+ *************************************************************************
+ */
+
+SundialsAbstractVector *Sundials_SAMRAIVector::makeNewVector()
+{
+   Sundials_SAMRAIVector* out_vec =
+      new Sundials_SAMRAIVector(d_samrai_vector->cloneVector("out_vec"));
+   out_vec->getSAMRAIVector()->allocateVectorData();
+   return out_vec;
+}
+
+void Sundials_SAMRAIVector::freeVector()
+{
+   d_samrai_vector->freeVectorComponents();
+   d_samrai_vector.setNull();
+   delete this;
+}
+
+void Sundials_SAMRAIVector::printVector() const
+{
+   std::ostream& s = d_samrai_vector->getOutputStream();
+   s << "\nPrinting Sundials_SAMRAIVector..."
+     << "\nthis = " << (Sundials_SAMRAIVector *)this
+     << "\nSAMRAI vector structure and data: " << std::endl;
+   d_samrai_vector->print(s);
+   s << "\n" << std::endl;
+}
+
+}
+}
+
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/Sundials_SAMRAIVector.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/Sundials_SAMRAIVector.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,158 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   "Glue code" between SAMRAI vector object and Sundials vectors. 
+ *
+ ************************************************************************/
+
+#define SKVEC_CAST(x) (((Sundials_SAMRAIVector *)x))
+
+namespace SAMRAI {
+namespace solv {
+
+SAMRAI_INLINE_KEYWORD
+tbox::Pointer<SAMRAIVectorReal<double> >
+Sundials_SAMRAIVector::getSAMRAIVector()
+{
+   return d_samrai_vector;
+}
+
+SAMRAI_INLINE_KEYWORD
+void Sundials_SAMRAIVector::setToScalar(
+   const double c)
+{
+   d_samrai_vector->setToScalar(c);
+}
+
+SAMRAI_INLINE_KEYWORD
+void
+Sundials_SAMRAIVector::scaleVector(
+   const SundialsAbstractVector* x,
+   const double c)
+{
+   d_samrai_vector->scale(c, SKVEC_CAST(x)->getSAMRAIVector());
+}
+
+SAMRAI_INLINE_KEYWORD
+void
+Sundials_SAMRAIVector::setLinearSum(
+   const double a,
+   const SundialsAbstractVector* x,
+   const double b,
+   const SundialsAbstractVector* y)
+{
+   d_samrai_vector->linearSum(a, SKVEC_CAST(x)->getSAMRAIVector(),
+      b, SKVEC_CAST(y)->getSAMRAIVector());
+}
+
+SAMRAI_INLINE_KEYWORD
+void Sundials_SAMRAIVector::pointwiseMultiply(
+   const SundialsAbstractVector* x,
+   const SundialsAbstractVector* y)
+{
+   d_samrai_vector->multiply(SKVEC_CAST(x)->getSAMRAIVector(),
+      SKVEC_CAST(y)->getSAMRAIVector());
+}
+
+SAMRAI_INLINE_KEYWORD
+void
+Sundials_SAMRAIVector::pointwiseDivide(
+   const SundialsAbstractVector* x,
+   const SundialsAbstractVector* y)
+{
+   d_samrai_vector->divide(SKVEC_CAST(x)->getSAMRAIVector(),
+      SKVEC_CAST(y)->getSAMRAIVector());
+}
+
+SAMRAI_INLINE_KEYWORD
+void Sundials_SAMRAIVector::setAbs(
+   const SundialsAbstractVector* x)
+{
+   d_samrai_vector->abs(SKVEC_CAST(x)->getSAMRAIVector());
+}
+
+SAMRAI_INLINE_KEYWORD
+void Sundials_SAMRAIVector::pointwiseReciprocal(
+   const SundialsAbstractVector* x)
+{
+   d_samrai_vector->reciprocal(SKVEC_CAST(x)->getSAMRAIVector());
+}
+
+SAMRAI_INLINE_KEYWORD
+void Sundials_SAMRAIVector::addScalar(
+   const SundialsAbstractVector* x,
+   const double b)
+{
+   d_samrai_vector->addScalar(SKVEC_CAST(x)->getSAMRAIVector(), b);
+}
+
+SAMRAI_INLINE_KEYWORD
+double
+Sundials_SAMRAIVector::dotWith(
+   const SundialsAbstractVector* x) const
+{
+   return d_samrai_vector->dot(SKVEC_CAST(x)->getSAMRAIVector());
+}
+
+SAMRAI_INLINE_KEYWORD
+double Sundials_SAMRAIVector::maxNorm() const
+{
+   return d_samrai_vector->maxNorm();
+}
+
+SAMRAI_INLINE_KEYWORD
+double Sundials_SAMRAIVector::L1Norm() const
+{
+   return d_samrai_vector->L1Norm();
+}
+
+SAMRAI_INLINE_KEYWORD
+double
+Sundials_SAMRAIVector::weightedL2Norm(
+   const SundialsAbstractVector* x) const
+{
+   return d_samrai_vector->weightedL2Norm(SKVEC_CAST(x)->getSAMRAIVector());
+}
+
+SAMRAI_INLINE_KEYWORD
+double
+Sundials_SAMRAIVector::weightedRMSNorm(
+   const SundialsAbstractVector* x) const
+{
+   return d_samrai_vector->weightedRMSNorm(SKVEC_CAST(x)->getSAMRAIVector());
+}
+
+SAMRAI_INLINE_KEYWORD
+double Sundials_SAMRAIVector::vecMin() const
+{
+   return d_samrai_vector->min();
+}
+
+SAMRAI_INLINE_KEYWORD
+int Sundials_SAMRAIVector::constrProdPos(
+   const SundialsAbstractVector* x) const
+{
+   return d_samrai_vector->
+          computeConstrProdPos(SKVEC_CAST(x)->getSAMRAIVector());
+}
+
+SAMRAI_INLINE_KEYWORD
+void Sundials_SAMRAIVector::compareToScalar(
+   const SundialsAbstractVector* x,
+   const double c)
+{
+   d_samrai_vector->compareToScalar(SKVEC_CAST(x)->getSAMRAIVector(), c);
+}
+
+SAMRAI_INLINE_KEYWORD
+int Sundials_SAMRAIVector::testReciprocal(
+   const SundialsAbstractVector* x)
+{
+   return d_samrai_vector->testReciprocal(SKVEC_CAST(x)->getSAMRAIVector());
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/Sundials_SAMRAIVector.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/Sundials_SAMRAIVector.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,307 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   "Glue code" between Sundials vector interface and SAMRAI vectors. 
+ *
+ ************************************************************************/
+
+#ifndef included_solv_Sundials_SAMRAIVector
+#define included_solv_Sundials_SAMRAIVector
+
+#include "SAMRAI/SAMRAI_config.h"
+
+/*
+ ************************************************************************
+ *  THIS CLASS WILL BE UNDEFINED IF THE LIBRARY IS BUILT WITHOUT
+ *  KINSOL -or- CVODE
+ ************************************************************************
+ */
+#ifdef HAVE_SUNDIALS
+
+#include "SAMRAI/solv/SundialsAbstractVector.h"
+#include "SAMRAI/solv/SAMRAIVectorReal.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace solv {
+
+/**
+ * Class Sundials_SAMRAIVector wraps a real-valued SAMRAI vector
+ * (see SAMRAIVectorReal class) object so that it may be used with
+ * the Sundials solver packages.  This class is derived from the
+ * abstract base class SundialsAbstractVector, which defines a <TT>C++</TT>
+ * interface for Sundials vectors.  It also maintains a pointer to a SAMRAI
+ * vector object.  A SAMRAI vector is defined as a collection of patch data
+ * components living on some subset of levels in a structured AMR mesh
+ * hierarchy.
+ *
+ * Observe that there are only three public member functions in this class
+ * They are used to create and destroy Sundials vector objects (i.e.,
+ * "N_Vector"s), and to obtain the SAMRAI vector associated with the Sundials
+ * vector.  In particular, note that the constructor and destructor of this
+ * class are protected members.  The construction and destruction of instances
+ * of this class may occur only through the static member functions that
+ * create and destroy Sundials vector objects.
+ *
+ * Finally, we remark that this class provides vectors of type <TT>double</TT>,
+ * which is the default for Sundials.
+ *
+ * @see solv::SundialsAbstractVector
+ * @see solv::SAMRAIVectorReal
+ */
+
+class Sundials_SAMRAIVector:public SundialsAbstractVector
+{
+public:
+   /**
+    * Create and return a new SundialsAbstractVector vector object.  The
+    * SAMRAI vector object is wrapped so that it may be manipulated
+    * within Sundials as an N_Vector (which is typedef'd to
+    * SundialsAbstractVector* in the abstract Sundials vector
+    * interface).  It is important to note that this function does not
+    * allocate storage for the vector data.  Data must be allocated
+    * through the SAMRAI vector object directly.  For output of the
+    * data through "N_VPrint" calls, the output stream to which the
+    * SAMRAI vector object writes will be used.
+    */
+   static SundialsAbstractVector *
+   createSundialsVector(
+      tbox::Pointer<SAMRAIVectorReal<double> > samrai_vec);
+
+   /**
+    * Destroy a given Sundials vector object. It is important to note that
+    * this function does not deallocate storage for the vector data.
+    * Vector data must be deallocated hrough the SAMRAI vector object.
+    */
+   static void
+   destroySundialsVector(
+      SundialsAbstractVector* sundials_vec);
+
+   /**
+    * Return pointer to the SAMRAI vector object associated with the
+    * given Sundials wrapper vector.
+    */
+   static tbox::Pointer<SAMRAIVectorReal<double> >
+   getSAMRAIVector(
+      SundialsAbstractVector* sundials_vec);
+
+   /**
+    * Return pointer to the SAMRAI vector object associated with the
+    * given Sundials vector.
+    */
+   static tbox::Pointer<SAMRAIVectorReal<double> >
+   getSAMRAIVector(
+      N_Vector sundials_vec);
+
+   /*
+    * Print the vector to the output stream used by the SAMRAI vector class.
+    */
+   void
+   printVector() const;
+
+protected:
+   /*
+    * Constructor for Sundials_SAMRAIVector.
+    */
+   Sundials_SAMRAIVector(
+      tbox::Pointer<SAMRAIVectorReal<double> > samrai_vector);
+
+   /*
+    * Virtual destructor for Sundials_SAMRAIVector.
+    */
+   virtual ~Sundials_SAMRAIVector();
+
+private:
+   /*
+    * Return SAMRAI vector owned by this Sundials_SAMRAIVector object.
+    */
+   tbox::Pointer<SAMRAIVectorReal<double> >
+   getSAMRAIVector();
+
+   /*
+    * The makeNewVector() function clones the vector structure and allocate
+    * storage for the new vector data.  Then, a pointer to the new vector
+    * instance is returned. This function is distinct from the constructor
+    * since it will be called from within Sundials to allocate vectors used
+    * during the nonlinear solution process.
+    */
+   SundialsAbstractVector *
+   makeNewVector();
+
+   /*
+    * Destroy vector structure and its storage. This function is distinct
+    * from the destructor since it will be called from within Sundials to
+    * deallocate vectors during the nonlinear solution process.
+    */
+   virtual void
+   freeVector();
+
+   /*
+    * Initialize all entries of this vector object to scalar \f$c\f$.
+    */
+   void
+   setToScalar(
+      const double c);
+
+   /*
+    * Set this vector object to scalar \f$c x\f$, where \f$c\f$ is a scalar and
+    * \f$x\f$ is another vector.
+    */
+   void
+   scaleVector(
+      const SundialsAbstractVector* x,
+      const double c);
+
+   /*
+    * Set this vector object to \f$a x + b y\f$, where \f$a, b\f$ are scalars and
+    * \f$x, y\f$ are vectors.
+    */
+   void
+   setLinearSum(
+      const double a,
+      const SundialsAbstractVector* x,
+      const double b,
+      const SundialsAbstractVector* y);
+
+   /*
+    * Set each entry of this vector: \f$v_i = x_i y_i\f$, where \f$x_i, y_i\f$ are
+    * entries in vectors \f$x\f$ and \f$y\f$.
+    */
+   void
+   pointwiseMultiply(
+      const SundialsAbstractVector* x,
+      const SundialsAbstractVector* y);
+
+   /*
+    * Set each entry of this vector: \f$v_i = \frac{x_i}{y_i}\f$, where
+    * \f$x_i, y_i\f$ are entries in vectors \f$x\f$ and \f$y\f$.  Based on the Sundials
+    * vector implementation, it is not necessary to no check for division by
+    * zero.
+    */
+   void
+   pointwiseDivide(
+      const SundialsAbstractVector* x,
+      const SundialsAbstractVector* y);
+
+   /*
+    * Set each entry of this vector to the absolute value of the
+    * corresponding entry in vector \f$x\f$.
+    */
+   void
+   setAbs(
+      const SundialsAbstractVector* x);
+
+   /*
+    * Set each entry of this vector: \f$v_i = \frac{1}{x_i}\f$, where \f$x_i\f$ is
+    * an entry in vector \f$x\f$.  Based on the Sundials vector implementation,
+    * it is not necessary to no check for division by zero.
+    */
+   void
+   pointwiseReciprocal(
+      const SundialsAbstractVector* x);
+
+   /*
+    * Set each entry of this vector: \f$v_i = x_i + b\f$, where \f$x_i\f$ is an entry
+    * in the vector \f$x\f$ and \f$b\f$ is a scalar.
+    */
+   void
+   addScalar(
+      const SundialsAbstractVector* x,
+      const double b);
+
+   /*
+    * Return the dot product of this vector and the vector \f$x\f$.
+    */
+   double
+   dotWith(
+      const SundialsAbstractVector* x) const;
+
+   /*
+    * Return the max norm of this vector:
+    * \f${\| v \|}_{\max} = \max_{i} (\mid v_i \mid)\f$.
+    */
+   double
+   maxNorm() const;
+
+   /*
+    * Return the \f$L_1\f$ norm of this vector:
+    * \f${\| v \|}_{L_1} = \sum_{i} (\mid v_i \mid)\f$ if no control volumes
+    * are defined.  Otherwise,
+    * \f${\| v \|}_{L_1} = \sum_{i} (\mid v_i \mid * cvol_i )\f$.
+    */
+   double
+   L1Norm() const;
+
+   /*
+    * Return the weighted \f$L_2\f$ norm of this vector using the vector
+    * \f$x\f$ as the weighting vector:
+    * \f${\| v \|}_{WL2(x)} = \sqrt{ \sum_i( (x_i * v_i)^2 ) )}\f$ if no
+    * control volumes are defined.  Otherwise,
+    * \f${\| v \|}_{WL2(x)} = \sqrt{ \sum_i( (x_i * v_i)^2 cvol_i ) }\f$.
+    */
+   double
+   weightedL2Norm(
+      const SundialsAbstractVector* x) const;
+
+   /*
+    * Return the weighted root mean squared norm of this vector using
+    * the vector \f$x\f$ as the weighting vector.   If control volumes are
+    * not defined for the vector entries, the norm corresponds to the
+    * weighted \f$L_2\f$-norm divided by the square root of the number of
+    * vector entries.  Otherwise, the norm corresponds to the weighted
+    * \f$L_2\f$-norm divided by the square root of the sum of the control volumes.
+    */
+   double
+   weightedRMSNorm(
+      const SundialsAbstractVector* x) const;
+
+   /*
+    * Return the minimum entry of this vector.
+    */
+   double
+   vecMin() const;
+
+   /*
+    * Return \f$0\f$ if \f$x_i \neq 0\f$ and \f$x_i v_i \leq 0\f$, for some \f$i\f$.
+    * Otherwise, return \f$1\f$.
+    */
+   int
+   constrProdPos(
+      const SundialsAbstractVector* x) const;
+
+   /*
+    * Set each entry in this vector based on the vector \f$x\f$ as follows:
+    * if \f$\mid x_i \mid \geq c\f$, then \f$v_i = 1\f$, else \f$v_i = 0\f$.
+    */
+   void
+   compareToScalar(
+      const SundialsAbstractVector* x,
+      const double c);
+
+   /*
+    * Set each entry of this vector: \f$v_i =  \frac{1}{x_i}\f$, where \f$x_i\f$
+    * is an entry entry in the vector \f$x\f$, unless \f$x_i = 0\f$.  If \f$x_i = 0\f$,
+    * then return \f$0\f$.  Otherwise, \f$1\f$ is returned.
+    */
+   int
+   testReciprocal(
+      const SundialsAbstractVector* x);
+
+   /*
+    * Vector data is maintained in SAMRAI vector structure.
+    */
+   tbox::Pointer<SAMRAIVectorReal<double> > d_samrai_vector;
+
+};
+
+}
+}
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/solv/Sundials_SAMRAIVector.I"
+#endif
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/dox/manual.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/dox/manual.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,31 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace solv {
+
+/*!
+  @page package_solvers The Solver Package
+ 
+  The Solver package provides support for applying linear, nonlinear,
+  and ODE solvers on a structured AMR patch hierarchy.
+  The classes are divided into four categories:
+  -# @ref package_solvers_packages "C++ interfaces to specific
+     solver libraries (e.g., PETSc)"
+  -# @ref package_solvers_vectors "vector kernel support for data
+     on an AMR composite grid"
+  -# @ref package_solvers_FAC "Implementation of an FAC solver"
+  -# @ref package_solvers_poisson "Poisson solvers"
+  -# @ref package_solvers_nonlinear "Nonlinear solver interface"
+
+  All class names in the Mesh package are in the namespace SAMRAI::solv.
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/dox/manual_FAC.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/dox/manual_FAC.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace solv {
+
+/*!
+  @page package_solvers_FAC FAC preconditioner on a SAMRAI hierarchy
+
+  The FAC preconditioner implemented in the preconditioner class
+  uses a V-cycle.  Operations specific to a specific problem
+  are delegated to the FAC operator strategy implementation
+  provided by the user.
+  - SAMRAI::solv::FACPreconditioner
+  - SAMRAI::solv::FACOperatorStrategy
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/dox/manual_nonlinear.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/dox/manual_nonlinear.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,22 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace solv {
+
+/*!
+  @page package_solvers_nonlinear Nonlinear solver
+
+  This portion of the library defines the interface for
+  nonlinear solvers.
+  - SAMRAI::solv::NonlinearSolverStrategy
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/dox/manual_packages.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/dox/manual_packages.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,29 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace solv {
+
+/*!
+  @page package_solvers_packages Interfaces to Solver Libraries
+
+  The Solver package provides interfaces to independently-developed solver
+  libraries that may be useful when building applications based on SAMRAI.
+  Often, these libraries are written in C and do not provide the necessary
+  functionality to treat data on AMR patch hierarchies.  The interfaces
+  herein facilitate the process of linking C library code to SAMRAI and
+  provide wrappers that make it easier to develop C++ vector kernels for
+  use with the packages.  Currently, such interface code exists for the 
+  PETSc and Sundials libraries.
+  - @ref package_solvers_packages_sundials "Sundials"
+  - @ref package_solvers_packages_petsc "PETSc"
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/dox/manual_packages_petsc.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/dox/manual_packages_petsc.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,43 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace solv {
+
+/*!
+  @page package_solvers_packages_petsc PETSc Vector Interface
+
+  An abstract PETSc vector interface is provided to couple a vector
+  kernel and operations with the PETSc solver library.
+  The templated interface class supports double or float.
+  Since PETSc
+  also supports vectors with complex entries, a complex vector interface
+  class may be provided in the future if such a need arises.  A vector 
+  kernel derived from this interface that may be used with the SAMRAI
+  framework is provided in the SAMRAI Algorithm package.  However, the 
+  interface provided here is entirely independent of SAMRAI.  
+  The vector interface conforms to PETSc version 2.3.3.  
+
+  The interfaces to the PETSC nonlinear solver SNES is provided through
+  the wrapper class SAMRAI::solv::SNES::SAMRAIContextX.  This class allows
+  you to use SNES with the natively supported
+  SAMRAI::solv::PETScAbstractVectorReal class.  The nonlinear solver
+  requires certain user-provided operations that must be provided
+  through inheriting the interface class SAMRAI::solv::SNESAbstractFunctions.
+
+  PETSc was developed in the Mathematics and Computer Science Division at 
+  Argonne National Laboratory (ANL).  For more information about PETSc, 
+  see http://www-unix.mcs.anl.gov/petsc/petsc-as/.
+  - SAMRAI::solv::PETScAbstractVectorReal
+  - SAMRAI::solv::SNESAbstractFunctions
+  - SAMRAI::solv::SNES_SAMRAIContext
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/dox/manual_packages_sundials.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/dox/manual_packages_sundials.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,51 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace solv {
+
+/*!
+  @page package_solvers_packages_sundials Interfaces for the Sundials of Solvers
+
+  Abstract interfaces for the KINSOL and CVODE solvers in
+  the Sundials are provided to make it easier
+  to use these solver packages with <TT>C++</TT> code in 
+  general, and SAMRAI in particular.  In addition to 
+  wrappers for the solver packages, there exists abstract
+  wrappers for Sundials vectors.  It is up to the user of 
+  these <TT>C++</TT> interfaces to implement a concrete version
+  of the vector kernel.  SAMRAI provides a concrete implementation
+  that supports hierarchical grid structures in the SAMRAI "Solvers"
+  package.
+
+  Important note: the vector kernel that is included with the CVODE 
+  and KINSOL libraries cannot be replaced by linking to a compiled 
+  version of the CVODE or KINSOL library.  Thus, the Sundials source code
+  must be recompiled with the new vector kernel header files in place of
+  the standard Sundials vector header file.  
+
+  KINSOL is developed in the Center for Applied Scientific Computing (CASC)
+  at Lawrence Livermore National Laboratory (LLNL).  For more information
+  about KINSOL, see A.G. Taylor, and A.C. Hindmarsh, "User Documentation for
+  KINSOL, A Nonlinear Solver for Sequential and Parallel Computers",
+  UCRL-ID-13185, July 1998.
+
+  CVODE/CVODE was developed in the Center for Applied Scientific Computing
+  (CASC) at Lawrence Livermore National Laboratory (LLNL).  For more
+  information about CVODE and a complete description of the operations
+  and data structures used by this class, see S.D. Cohen and A.C.
+  Hindmarsh, "CVODE User Guide", UCRL-MA-118618, Lawrence Livermore National
+  Laboratory, 1994.
+  - @ref package_solvers_packages_sundials_vector "vector"
+  - @ref package_solvers_packages_sundials_cvode "cvode"
+  - @ref package_solvers_packages_sundials_kinsol "kinsol"
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/dox/manual_packages_sundials_cvode.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/dox/manual_packages_sundials_cvode.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,51 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace solv {
+
+/*!
+  @page package_solvers_packages_sundials_cvode CVODE ODE solver interface
+
+  The abstract CVODE interface contains wrapper classes that make it 
+  easier to use the CVODE ODE solver package with C++ 
+  code in general, and SAMRAI in particular.  There exist wrappers for
+  Sundials vectors as well as the complete CVODE ODE solver.
+  Apart from some minor preprocessor features, these interfaces are 
+  completely independent of the SAMRAI.  The code which maps the vector 
+  interface included here to the SAMRAI framework can be found in the 
+  SAMRAI "Solvers" package.
+
+  These classes provide a C++ interface to the CVODE package, 
+  which is written in C.  They are sufficiently generic that they
+  may be used independently of the SAMRAI framework.  The solver class
+  wraps the CVODE data structures and function calls so that these items
+  may be more easily used within a C++ program.  Static member 
+  functions for the right hand side function evaluation, preconditioner setup 
+  and preconditioner solve are provided to link user-defined 
+  versions of these routines with CVODE and CVSpgmr.  The "abstract 
+  function" class serves as the interface between the solver class 
+  and user-defined implementations of these routines.
+
+  CVODE/CVODE was developed in the Center for Applied Scientific Computing 
+  (CASC) at Lawrence Livermore National Laboratory (LLNL).  For more 
+  information about CVODE and a complete description of the operations 
+  and data structures used by this class, see S.D. Cohen and A.C. 
+  Hindmarsh, "CVODE User Guide", UCRL-MA-118618, Lawrence Livermore National
+  Laboratory, 1994.
+
+  Note: These classes assume that vectors based on the 
+        SundialsAbstractVector class are used.
+  - CVODESolver
+  - CVODEAbstractFunctions
+
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/dox/manual_packages_sundials_kinsol.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/dox/manual_packages_sundials_kinsol.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,55 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace solv {
+
+/*!
+  @page package_solvers_packages_sundials_kinsol KINSOL Vector and Nonlinear Solver Interface
+
+  The abstract KINSOL interface contains wrapper classes that make it 
+  easier to use the KINSOL nonlinear solver package with <TT>C++</TT> 
+  code in general, and SAMRAI in particular.  There exist wrappers for
+  vectors as well as the complete KINSOL nonlinear algebraic equation solver.
+  Apart from some minor preprocessor features, these interfaces are 
+  completely independent of the SAMRAI.  The code which maps the vector 
+  interface included here to the SAMRAI framework can be found in the 
+  SAMRAI "Solvers" package.
+
+  These classes provide a C++ interface to the KINSOL package, 
+  which is written in C.  They are sufficiently generic that they
+  may be used independently of the SAMRAI framework.  The solver class
+  wraps the KINSOL data structures and function calls so that these items
+  may be more easily used within a C++ program.  Static member 
+  functions for the nonlinear residual calculation, preconditioner setup 
+  and solve, and Jacobian-vector product are provided to link user-defined 
+  versions of these routines with KINSOL.  The "abstract function" class
+  serves as the interface between the solver class and user-defined 
+  implementations of these routines.
+
+  Working example codes will be provided in the near future to demonstrate
+  SAMRAI-KINSOL interoperability.
+
+  KINSOL is developed in the Center for Applied Scientific Computing (CASC)
+  at Lawrence Livermore National Laboratory (LLNL).  For more information 
+  about KINSOL, see A.G. Taylor, and A.C. Hindmarsh, "User Documentation for
+  KINSOL, A Nonlinear Solver for Sequential and Parallel Computers",  
+  UCRL-ID-13185, July 1998.
+
+  Note: These classes assume that vectors based on the 
+        SAMRAI::solv::SundialsAbstractVector class are used.
+  - SAMRAI::solv::KINSOLSolver
+  - SAMRAI::solv::KINSOLAbstractFunctions
+  - SAMRAI::solv::KINSOL_SAMRAIContext
+
+
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/dox/manual_packages_sundials_vector.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/dox/manual_packages_sundials_vector.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,29 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace solv {
+
+/*!
+  @page package_solvers_packages_sundials_vector Sundials Vector Interface
+
+  The abstract Sundials vector class provides an interface through which a 
+  vector kernel and operations may be supplied to the KINSOL nonlinear 
+  algebraic equation and CVODE ODE system solver packages.  Apart from 
+  some minor preprocessor stuff, this interface is completeley 
+  independent of the SAMRAI package.  A vector kernel derived from 
+  this interface that may be used with the SAMRAI framework is provided 
+  elsewhere in this SAMRAI "solvers" package.
+
+  Note: These vector interface routines assume <TT>double</TT>-valued vectors.
+  - SundialsAbstractVector
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/dox/manual_poisson.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/dox/manual_poisson.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,37 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace solv {
+
+/*!
+  @page package_solvers_poisson Poisson solvers on a SAMRAI hierarchy
+
+  SAMRAI provides a single-level and a hierarchy solver for the
+  cell-centered Poisson equations.  The single-level solver uses
+  the HYPRE library.  The the hierarchy solver uses an FAC formulation,
+  possibly using the single-level solver on the coarsest level.
+  A Robin boundary condition interface is defined to coordinate
+  between the solvers the boundary conditions for a scalar quantity.
+  Several library-provided implementations of this interface are
+  available, and user-defined implementations are supported.
+  
+  - SAMRAI::solv::CellPoissonHypreSolver
+  - SAMRAI::solv::CellPoissonFACOps
+  - SAMRAI::solv::CellPoissonFACSolver
+  - SAMRAI::solv::RobinBcCoefStrategy
+  - SAMRAI::solv::LocationIndexRobinBcCoefs
+  - SAMRAI::solv::GhostCellRobinBcCoefs
+  - SAMRAI::solv::SimpleCellRobinBcCoefs
+  - SAMRAI::solv::CartesianRobinBcHelper
+  - SAMRAI::solv::PoissonSpecifications
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/dox/manual_vectors.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/dox/manual_vectors.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,38 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace solv {
+
+/*!
+  @page package_solvers_vectors SAMRAI Vector Facilities
+
+  The SAMRAI vector class wraps a collection of patch data components 
+  defined over multiple levels in an AMR hierarchy so that the data may 
+  be manipulated as though it is a single vector.  Also, included are
+  classes which provide vector kernels to the PETSc and Sundials solver 
+  packages.  Currently, vector interfaces are provided for real-valued
+  vectors only (i.e., where the data is either type <TT>double</TT> or 
+  <TT>float</TT>).  If the need for complex-valued vectors arises (e.g., 
+  PETSc supports complex vectors), they can be easily added.  Presently, 
+  the Sundials vector interface supports only <TT>double</TT>-valued vectors.
+  The abstract classes that define the interfaces to the PETSc and Sundials
+  packages are includes in the SAMRAI source subdirectories "petsc" and
+  "cvode::trio/vector", respectively.  The classes which perform the 
+  actual numerical operations used in the vector kernels are found in 
+  the "Mathematical Operations" package.
+
+  - SAMRAI::solv::SAMRAIVectorReal
+  - SAMRAI::solv::PETSc_SAMRAIVectorReal
+  - SAMRAI::solv::Sundials_SAMRAIVector
+
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/fortran/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/fortran/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,86 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=solv_cartesianrobinbchelper2d.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	solv_cartesianrobinbchelper2d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=solv_cartesianrobinbchelper3d.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	solv_cartesianrobinbchelper3d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=solv_cellpoissonfacops2d.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	solv_cellpoissonfacops2d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=solv_cellpoissonfacops3d.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	solv_cellpoissonfacops3d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
+FILE_4=solv_cellpoissonhypresolver2d.o
+DEPENDS_4:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	solv_cellpoissonhypresolver2d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_4 +=\
+	
+endif
+
+${FILE_4:X.o=${NDIM}.o}: ${DEPENDS_4}
+
+FILE_5=solv_cellpoissonhypresolver3d.o
+DEPENDS_5:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	solv_cellpoissonhypresolver3d.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_5 +=\
+	
+endif
+
+${FILE_5:X.o=${NDIM}.o}: ${DEPENDS_5}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/fortran/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/fortran/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,33 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for fortran files for solv directory 
+##
+#########################################################################
+
+SAMRAI	      =	@top_srcdir@
+SRCDIR	      =	@srcdir@
+SUBDIR        = source/SAMRAI/solv/fortran
+VPATH	      =	@srcdir@
+OBJECT        = ../../../..
+
+# For classes that are non-dimensional.
+OBJS= 	 solv_cellpoissonhypresolver2d.o solv_cellpoissonfacops2d.o\
+	solv_cartesianrobinbchelper2d.o\
+	solv_cellpoissonhypresolver3d.o solv_cellpoissonfacops3d.o\
+	solv_cartesianrobinbchelper3d.o\
+
+
+default: library
+
+include $(OBJECT)/config/Makefile.config
+
+library: $(OBJS)
+
+clean:
+	$(SAMCLEAN)
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/fortran/solv_cartesianrobinbchelper2d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/fortran/solv_cartesianrobinbchelper2d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,111 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/solv/fortran/solv_cartesianrobinbchelper2d.f $
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Release:     
+c  Revision:    
+c  Modified:    
+c  Description: F77 routines for Cartesian 2d Robin boundary conditions
+c
+c
+c***********************************************************************
+c***********************************************************************
+      subroutine settype1cells2d(
+     &  data, 
+     &  difirst, dilast, djfirst, djlast,
+     &  a, b, g,
+     &  ifirst, ilast, jfirst, jlast,
+     &  ibeg, iend, jbeg, jend,
+     &  face, ghos, inte, location,
+     &  h, zerog )
+c***********************************************************************
+      implicit none
+      integer difirst, dilast, djfirst, djlast
+      double precision data(difirst:dilast,djfirst:djlast)
+      integer ifirst, ilast, jfirst, jlast
+      double precision a(ifirst:ilast,jfirst:jlast)
+      double precision b(ifirst:ilast,jfirst:jlast)
+      double precision g(ifirst:ilast,jfirst:jlast)
+      integer ibeg, iend
+      integer jbeg, jend
+      integer face, ghos, inte, location, zerog
+      double precision h
+      integer i, j
+      if ( zerog .eq. 1 ) then
+c        Assume g value of zero
+         if ( location/2 .eq. 0 ) then
+            do i=ibeg,iend
+               do j=jbeg,jend
+                  data(ghos,j) =
+     &            ( data(inte,j)*( b(face,j) - 0.5*h*a(face,j) ) )
+     &                 / ( b(face,j)+0.5*h*a(face,j) )
+               enddo
+            enddo
+         elseif ( location/2 .eq. 1 ) then
+            do i=ibeg,iend
+               do j=jbeg,jend
+                  data(i,ghos) =
+     &            ( data(i,inte)*( b(i,face) - 0.5*h*a(i,face) ) )
+     &                 / ( b(i,face)+0.5*h*a(i,face) )
+               enddo
+            enddo
+         endif
+      else
+c        Assume finite g
+         if ( location/2 .eq. 0 ) then
+            do i=ibeg,iend
+               do j=jbeg,jend
+                  data(ghos,j) = ( h*g(face,j)
+     &                 + data(inte,j)*( b(face,j) - 0.5*h*a(face,j) ) )
+     &                 / ( b(face,j)+0.5*h*a(face,j) )
+               enddo
+            enddo
+         elseif ( location/2 .eq. 1 ) then
+            do i=ibeg,iend
+               do j=jbeg,jend
+                  data(i,ghos) = ( h*g(i,face)
+     &                 + data(i,inte)*( b(i,face) - 0.5*h*a(i,face) ) )
+     &                 / ( b(i,face)+0.5*h*a(i,face) )
+               enddo
+            enddo
+         endif
+      endif
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine settype2cells2d(
+     &  data, 
+     &  difirst, dilast, djfirst, djlast,
+     &  lower, upper, location )
+c***********************************************************************
+      implicit none
+      integer difirst, dilast, djfirst, djlast
+      double precision data(difirst:dilast,djfirst:djlast)
+      integer lower(0:1), upper(0:1), location
+      integer i, j
+      if ( location .eq. 0 ) then
+c        min i min j node
+         i = lower(0)
+         j = lower(1)
+         data(i,j) = -data(i+1,j+1) + ( data(i+1,j) + data(i,j+1) )
+      elseif ( location .eq. 1 ) then
+c        max i min j node
+         i = upper(0)
+         j = lower(1)
+         data(i,j) = -data(i-1,j+1) + ( data(i-1,j) + data(i,j+1) )
+      elseif ( location .eq. 2 ) then
+c        min i max j node
+         i = lower(0)
+         j = upper(1)
+         data(i,j) = -data(i+1,j-1) + ( data(i+1,j) + data(i,j-1) )
+      elseif ( location .eq. 3 ) then
+c        max i max j node
+         i = upper(0)
+         j = upper(1)
+         data(i,j) = -data(i-1,j-1) + ( data(i,j-1) + data(i-1,j) )
+      else
+      endif
+      return
+      end
+c***********************************************************************
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/fortran/solv_cartesianrobinbchelper3d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/fortran/solv_cartesianrobinbchelper3d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,336 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/solv/fortran/solv_cartesianrobinbchelper3d.f $
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Release:     
+c  Revision:    
+c  Modified:    
+c  Description: F77 routines for Cartesian 3d Robin boundary conditions
+c
+c
+c***********************************************************************
+c***********************************************************************
+      subroutine settype1cells3d(
+     &  data, 
+     &  difirst, dilast, djfirst, djlast, dkfirst, dklast,
+     &  a, b, g,
+     &  ifirst, ilast, jfirst, jlast, kfirst, klast,
+     &  ibeg, iend, jbeg, jend, kbeg, kend,
+     &  face, ghos, inte, location,
+     &  h, zerog )
+c***********************************************************************
+      implicit none
+      integer difirst, dilast, djfirst, djlast, dkfirst, dklast
+      double precision 
+     &  data(difirst:dilast,djfirst:djlast,dkfirst:dklast)
+      integer ifirst, ilast, jfirst, jlast, kfirst, klast
+      double precision a(ifirst:ilast,jfirst:jlast,kfirst:klast)
+      double precision b(ifirst:ilast,jfirst:jlast,kfirst:klast)
+      double precision g(ifirst:ilast,jfirst:jlast,kfirst:klast)
+      integer ibeg, iend
+      integer jbeg, jend
+      integer kbeg, kend
+      integer face, ghos, inte, location, zerog
+      double precision h
+      integer i, j, k
+      if ( zerog .eq. 1 ) then
+c        Assume g value of zero
+         if ( location/2 .eq. 0 ) then
+            do i=ibeg,iend
+            do j=jbeg,jend
+            do k=kbeg,kend
+               data(ghos,j,k) 
+     &         = ( 0
+     &         + data(inte,j,k)*( b(face,j,k)-0.5*h*a(face,j,k) ) )
+     &         / ( b(face,j,k)+0.5*h*a(face,j,k) )
+            enddo
+            enddo
+            enddo
+         elseif ( location/2 .eq. 1 ) then
+            do i=ibeg,iend
+            do j=jbeg,jend
+            do k=kbeg,kend
+               data(i,ghos,k) 
+     &         = ( 0
+     &         + data(i,inte,k)*( b(i,face,k)-0.5*h*a(i,face,k) ) )
+     &         / ( b(i,face,k)+0.5*h*a(i,face,k) )
+            enddo
+            enddo
+            enddo
+         elseif ( location/2 .eq. 2 ) then
+            do i=ibeg,iend
+            do j=jbeg,jend
+            do k=kbeg,kend
+               data(i,j,ghos) 
+     &         = ( 0
+     &         + data(i,j,inte)*( b(i,j,face)-0.5*h*a(i,j,face) ) )
+     &         / ( b(i,j,face)+0.5*h*a(i,j,face) )
+            enddo
+            enddo
+            enddo
+         endif
+      else
+c        Assume finite g
+         if ( location/2 .eq. 0 ) then
+            do i=ibeg,iend
+            do j=jbeg,jend
+            do k=kbeg,kend
+               data(ghos,j,k) 
+     &         = ( h*g(face,j,k)
+     &         + data(inte,j,k)*( b(face,j,k)-0.5*h*a(face,j,k) ) )
+     &         / ( b(face,j,k)+0.5*h*a(face,j,k) )
+            enddo
+            enddo
+            enddo
+         elseif ( location/2 .eq. 1 ) then
+            do i=ibeg,iend
+            do j=jbeg,jend
+            do k=kbeg,kend
+               data(i,ghos,k) 
+     &         = ( h*g(i,face,k)
+     &         + data(i,inte,k)*( b(i,face,k)-0.5*h*a(i,face,k) ) )
+     &         / ( b(i,face,k)+0.5*h*a(i,face,k) )
+            enddo
+            enddo
+            enddo
+         elseif ( location/2 .eq. 2 ) then
+            do i=ibeg,iend
+            do j=jbeg,jend
+            do k=kbeg,kend
+               data(i,j,ghos) 
+     &         = ( h*g(i,j,face)
+     &         + data(i,j,inte)*( b(i,j,face)-0.5*h*a(i,j,face) ) )
+     &         / ( b(i,j,face)+0.5*h*a(i,j,face) )
+            enddo
+            enddo
+            enddo
+         endif
+      endif
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine settype2cells3d(
+     &  data, 
+     &  difirst, dilast, djfirst, djlast, dkfirst, dklast,
+     &  lower, upper, location )
+c***********************************************************************
+      implicit none
+      integer difirst, dilast, djfirst, djlast, dkfirst, dklast
+      double precision 
+     &  data(difirst:dilast,djfirst:djlast,dkfirst:dklast)
+      integer lower(0:2), upper(0:2), location
+      integer i, j, k
+      integer ibeg, iend, jbeg, jend, kbeg, kend
+      if     ( location .eq. 0 ) then
+c        min i min j edge, running along k
+         i = lower(0)
+         j = lower(1)
+         kbeg = lower(2)
+         kend = upper(2)
+         do k=kbeg,kend
+            data(i,j,k) = -data(i+1,j+1,k)
+     &         + ( data(i+1,j,k) + data(i,j+1,k) )
+         enddo
+      elseif ( location .eq. 1 ) then
+c        max i min j edge, running along k
+         i = lower(0)
+         j = lower(1)
+         kbeg = lower(2)
+         kend = upper(2)
+         do k=kbeg,kend
+            data(i,j,k) = -data(i-1,j+1,k)
+     &         + ( data(i-1,j,k) + data(i,j+1,k) )
+         enddo
+      elseif ( location .eq. 2 ) then
+c        min i max j edge, running along k
+         i = lower(0)
+         j = lower(1)
+         kbeg = lower(2)
+         kend = upper(2)
+         do k=kbeg,kend
+            data(i,j,k) = -data(i+1,j-1,k)
+     &         + ( data(i+1,j,k) + data(i,j-1,k) )
+         enddo
+      elseif ( location .eq. 3 ) then
+c        max i max j edge, running along k
+         i = lower(0)
+         j = lower(1)
+         kbeg = lower(2)
+         kend = upper(2)
+         do k=kbeg,kend
+            data(i,j,k) = -data(i-1,j-1,k)
+     &         + ( data(i,j-1,k) + data(i-1,j,k) )
+         enddo
+      elseif ( location .eq. 4 ) then
+c        min i min k edge, running along j
+         i = lower(0)
+         k = lower(2)
+         jbeg = lower(1)
+         jend = upper(1)
+         do j=jbeg,jend
+            data(i,j,k) = -data(i+1,j,k+1)
+     &         + ( data(i+1,j,k) + data(i,j,k+1) )
+      enddo
+      elseif ( location .eq. 5 ) then
+c        max i min k edge, running along j
+         i = lower(0)
+         k = lower(2)
+         jbeg = lower(1)
+         jend = upper(1)
+         do j=jbeg,jend
+            data(i,j,k) = -data(i-1,j,k+1)
+     &         + ( data(i-1,j,k) + data(i,j,k+1) )
+         enddo
+      elseif ( location .eq. 6 ) then
+c        min i max k edge, running along j
+         i = lower(0)
+         k = lower(2)
+         jbeg = lower(1)
+         jend = upper(1)
+         do j=jbeg,jend
+            data(i,j,k) = -data(i+1,j,k-1)
+     &         + ( data(i+1,j,k) + data(i,j,k-1) )
+         enddo
+      elseif ( location .eq. 7 ) then
+c        max i max k edge, running along j
+         i = lower(0)
+         k = lower(2)
+         jbeg = lower(1)
+         jend = upper(1)
+         do j=jbeg,jend
+            data(i,j,k) = -data(i-1,j,k-1)
+     &         + ( data(i,j,k-1) + data(i-1,j,k) )
+         enddo
+      elseif ( location .eq. 8 ) then
+c        min j min k edge, running along i
+         j = lower(1)
+         k = lower(2)
+         ibeg = lower(0)
+         iend = upper(0)
+         do i=ibeg,iend
+            data(i,j,k) = -data(i,j+1,k+1)
+     &         + ( data(i,j,k+1) + data(i,j+1,k) )
+         enddo
+      elseif ( location .eq. 9 ) then
+c        max j min k edge, running along i
+         j = lower(1)
+         k = lower(2)
+         ibeg = lower(0)
+         iend = upper(0)
+         do i=ibeg,iend
+            data(i,j,k) = -data(i,j-1,k+1)
+     &         + ( data(i,j,k+1) + data(i,j-1,k) )
+         enddo
+      elseif ( location .eq. 10 ) then
+c        min j max k edge, running along i
+         j = lower(1)
+         k = lower(2)
+         ibeg = lower(0)
+         iend = upper(0)
+         do i=ibeg,iend
+            data(i,j,k) = -data(i,j+1,k-1)
+     &         + ( data(i,j,k-1) + data(i,j+1,k) )
+         enddo
+      elseif ( location .eq. 11 ) then
+c        max j max k edge, running along i
+         j = lower(1)
+         k = lower(2)
+         ibeg = lower(0)
+         iend = upper(0)
+         do i=ibeg,iend
+            data(i,j,k) = -data(i,j-1,k-1)
+     &         + ( data(i,j-1,k) + data(i,j,k-1) )
+         enddo
+      endif
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine settype3cells3d(
+     &  data, 
+     &  difirst, dilast, djfirst, djlast, dkfirst, dklast,
+     &  lower, upper, location )
+c***********************************************************************
+      implicit none
+      integer difirst, dilast, djfirst, djlast, dkfirst, dklast
+      double precision 
+     &  data(difirst:dilast,djfirst:djlast,dkfirst:dklast)
+      integer lower(0:2), upper(0:2), location
+      integer i, j, k
+      if     ( location .eq. 0 ) then
+c        min i min j min k node
+         i = lower(0)
+         j = lower(1)
+         k = lower(2)
+	 data(i,j,k) = -data(i+1,j+1,k+1)
+     &               + 2./3.*( data(i,j+1,k+1) 
+     &                       + data(i+1,j,k+1) 
+     &                       + data(i+1,j+1,k) )
+      elseif ( location .eq. 1 ) then
+c        max i min j min k node
+         i = upper(0)
+         j = lower(1)
+         k = lower(2)
+	 data(i,j,k) = -data(i-1,j+1,k+1)
+     &               + 2./3.*( data(i,j+1,k+1) 
+     &                       + data(i-1,j,k+1) 
+     &                       + data(i-1,j+1,k) )
+      elseif ( location .eq. 2 ) then
+c        min i max j min k node
+         i = lower(0)
+         j = upper(1)
+         k = lower(2)
+	 data(i,j,k) = -data(i+1,j-1,k+1)
+     &               + 2./3.*( data(i,j-1,k+1) 
+     &                       + data(i+1,j,k+1) 
+     &                       + data(i+1,j-1,k) )
+      elseif ( location .eq. 3 ) then
+c        max i max j min k node
+         i = upper(0)
+         j = upper(1)
+         k = lower(2)
+	 data(i,j,k) = -data(i-1,j-1,k+1)
+     &               + 2./3.*( data(i,j-1,k+1) 
+     &                       + data(i-1,j,k+1) 
+     &                       + data(i-1,j-1,k) )
+      elseif ( location .eq. 4 ) then
+c        min i min j max k node
+         i = lower(0)
+         j = lower(1)
+         k = upper(2)
+	 data(i,j,k) = -data(i+1,j+1,k-1)
+     &               + 2./3.*( data(i,j+1,k-1) 
+     &                       + data(i+1,j,k-1) 
+     &                       + data(i+1,j+1,k) )
+      elseif ( location .eq. 5 ) then
+c        max i min j max k node
+         i = upper(0)
+         j = lower(1)
+         k = upper(2)
+	 data(i,j,k) = -data(i-1,j+1,k-1)
+     &               + 2./3.*( data(i,j+1,k-1) 
+     &                       + data(i-1,j,k-1) 
+     &                       + data(i-1,j+1,k) )
+      elseif ( location .eq. 6 ) then
+c        min i max j max k node
+         i = lower(0)
+         j = upper(1)
+         k = upper(2)
+	 data(i,j,k) = -data(i+1,j-1,k-1)
+     &               + 2./3.*( data(i,j-1,k-1) 
+     &                       + data(i+1,j,k-1) 
+     &                       + data(i+1,j-1,k) )
+      elseif ( location .eq. 7 ) then
+c        max i max j max k node
+         i = upper(0)
+         j = upper(1)
+         k = upper(2)
+	 data(i,j,k) = -data(i-1,j-1,k-1)
+     &               + 2./3.*( data(i,j-1,k-1) 
+     &                       + data(i-1,j,k-1) 
+     &                       + data(i-1,j-1,k) )
+      endif
+      return
+      end
+c***********************************************************************
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/fortran/solv_cellpoissonfacops2d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/fortran/solv_cellpoissonfacops2d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,689 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/solv/fortran/solv_cellpoissonfacops2d.f $
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:   	$LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: F77 routines for scalar Poisson FAC operator
+c
+c
+c***********************************************************************
+c***********************************************************************
+      subroutine compfluxvardc2d(
+     &xflux , yflux , fluxgi, fluxgj ,
+     &xdc , ydc , dcgi, dcgj ,
+     &soln , solngi, solngj ,
+     &ifirst, ilast, jfirst, jlast ,
+     &dx )
+
+      implicit none
+      integer ifirst, ilast, jfirst, jlast
+      integer dcgi, dcgj, fluxgi, fluxgj,
+     &        solngi, solngj
+      double precision xflux(ifirst-fluxgi:ilast+1+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj)
+      double precision yflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+1+fluxgj)
+      double precision xdc(ifirst-dcgi:ilast+1+dcgi,
+     &                     jfirst-dcgj:jlast+dcgj)
+      double precision ydc(ifirst-dcgi:ilast+dcgi,
+     &                     jfirst-dcgj:jlast+1+dcgj)
+      double precision soln(ifirst-solngi:ilast+solngi,
+     &                      jfirst-solngj:jlast+solngj)
+      double precision dx(0:1)
+
+      double precision dxi, dyi
+      integer i, j
+
+      dxi = 1./dx(0)
+      dyi = 1./dx(1)
+
+      do j=jfirst,jlast
+      do i=ifirst,ilast+1
+         xflux(i,j) = dxi*xdc(i,j)*( soln(i,j) - soln(i-1,j) )
+      enddo
+      enddo
+      do j=jfirst,jlast+1
+      do i=ifirst,ilast
+         yflux(i,j) = dyi*ydc(i,j)*( soln(i,j) - soln(i,j-1) )
+      enddo
+      enddo
+
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine compfluxcondc2d(
+     &xflux , yflux , fluxgi, fluxgj ,
+     &dc ,
+     &soln , solngi, solngj ,
+     &ifirst, ilast, jfirst, jlast ,
+     &dx )
+
+      implicit none
+      integer ifirst, ilast, jfirst, jlast
+      integer fluxgi, fluxgj,
+     &        solngi, solngj
+      double precision xflux(ifirst-fluxgi:ilast+1+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj)
+      double precision yflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+1+fluxgj)
+      double precision dc
+      double precision soln(ifirst-solngi:ilast+solngi,
+     &                      jfirst-solngj:jlast+solngj)
+      double precision dx(0:1)
+
+      double precision dxi, dyi
+      integer i, j
+
+      dxi = 1./dx(0)
+      dyi = 1./dx(1)
+
+      do j=jfirst,jlast
+      do i=ifirst,ilast+1
+         xflux(i,j) = dxi*dc*( soln(i,j) - soln(i-1,j) )
+      enddo
+      enddo
+      do j=jfirst,jlast+1
+      do i=ifirst,ilast
+         yflux(i,j) = dyi*dc*( soln(i,j) - soln(i,j-1) )
+      enddo
+      enddo
+
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine rbgswithfluxmaxvardcvarsf2d(
+     &xflux , yflux , fluxgi, fluxgj ,
+     &xdc , ydc , dcgi, dcgj ,
+     &rhs , rhsgi, rhsgj ,
+     &scalar_field , sfgi, sfgj ,
+     &soln , solngi, solngj ,
+     &ifirst, ilast, jfirst, jlast ,
+     &dx ,
+     &offset, maxres )
+
+      implicit none
+      integer ifirst, ilast, jfirst, jlast
+      integer dcgi, dcgj, fluxgi, fluxgj, rhsgi, rhsgj,
+     &        solngi, solngj, sfgi, sfgj
+      double precision xflux(ifirst-fluxgi:ilast+1+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj)
+      double precision yflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+1+fluxgj)
+      double precision xdc(ifirst-dcgi:ilast+1+dcgi,
+     &                     jfirst-dcgj:jlast+dcgj)
+      double precision ydc(ifirst-dcgi:ilast+dcgi,
+     &                     jfirst-dcgj:jlast+1+dcgj)
+      double precision soln(ifirst-solngi:ilast+solngi,
+     &                      jfirst-solngj:jlast+solngj)
+      double precision rhs(ifirst-rhsgi:ilast+rhsgi,
+     &                     jfirst-rhsgj:jlast+rhsgj)
+      double precision scalar_field(ifirst-sfgi:ilast+sfgi,
+     &                              jfirst-sfgj:jlast+sfgj)
+      double precision dx(0:1)
+      integer offset
+      double precision maxres
+
+      double precision residual, du
+      double precision dxi, dyi
+      double precision dudr
+      double precision rcoef
+      integer i, j
+      integer ioffset
+
+      dxi = 1./dx(0)
+      dyi = 1./dx(1)
+      rcoef = 1.0
+
+      maxres = 0.0
+
+      do j=jfirst,jlast
+c        offset must be 0 (red) or 1 (black)
+         if ( (jfirst+j)-((jfirst+j)/2*2) .ne. offset ) then
+            ioffset = 1
+         else
+            ioffset = 0
+         endif
+         do i=ifirst+ioffset,ilast,2
+            residual
+     &         = rhs(i,j)
+     &         - ( dxi*( xflux(i+1,j) - xflux(i,j) )
+     &           + dyi*( yflux(i,j+1) - yflux(i,j) ) )
+     &         - scalar_field(i,j)*soln(i,j)
+            dudr = 1./( ( dxi*dxi*( xdc(i+1,j) + xdc(i,j) )
+     &                  + dyi*dyi*( ydc(i,j+1) + ydc(i,j) ) )
+     &                  - scalar_field(i,j) )
+            du = -residual*dudr
+            soln(i,j) = soln(i,j) + du*rcoef
+            if ( maxres .lt. abs(residual) ) maxres = abs(residual)
+         enddo
+      enddo
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine rbgswithfluxmaxcondcvarsf2d(
+     &xflux , yflux , fluxgi, fluxgj ,
+     &dc ,
+     &rhs , rhsgi, rhsgj ,
+     &scalar_field , sfgi, sfgj ,
+     &soln , solngi, solngj ,
+     &ifirst, ilast, jfirst, jlast ,
+     &dx ,
+     &offset, maxres )
+
+      implicit none
+      integer ifirst, ilast, jfirst, jlast
+      integer fluxgi, fluxgj, rhsgi, rhsgj,
+     &        solngi, solngj, sfgi, sfgj
+      double precision xflux(ifirst-fluxgi:ilast+1+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj)
+      double precision yflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+1+fluxgj)
+      double precision dc
+      double precision soln(ifirst-solngi:ilast+solngi,
+     &                      jfirst-solngj:jlast+solngj)
+      double precision rhs(ifirst-rhsgi:ilast+rhsgi,
+     &                     jfirst-rhsgj:jlast+rhsgj)
+      double precision scalar_field(ifirst-sfgi:ilast+sfgi,
+     &                              jfirst-sfgj:jlast+sfgj)
+      double precision dx(0:1)
+      integer offset
+      double precision maxres
+
+      double precision residual, du
+      double precision dxi, dyi
+      double precision dudr
+      double precision rcoef
+      integer i, j
+      integer ioffset
+
+      dxi = 1./dx(0)
+      dyi = 1./dx(1)
+      rcoef = 1.0
+
+      maxres = 0.0
+
+      do j=jfirst,jlast
+c        offset must be 0 (red) or 1 (black)
+         if ( (jfirst+j)-((jfirst+j)/2*2) .ne. offset ) then
+            ioffset = 1
+         else
+            ioffset = 0
+         endif
+         do i=ifirst+ioffset,ilast,2
+            residual
+     &         = rhs(i,j)
+     &         - ( dxi*( xflux(i+1,j) - xflux(i,j) )
+     &           + dyi*( yflux(i,j+1) - yflux(i,j) ) )
+     &         - scalar_field(i,j)*soln(i,j)
+            dudr = 1./( ( dxi*dxi*( dc + dc )
+     &                  + dyi*dyi*( dc + dc ) )
+     &                  - scalar_field(i,j) )
+            du = -residual*dudr
+            soln(i,j) = soln(i,j) + du*rcoef
+            if ( maxres .lt. abs(residual) ) maxres = abs(residual)
+         enddo
+      enddo
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine rbgswithfluxmaxvardcconsf2d(
+     &xflux , yflux , fluxgi, fluxgj ,
+     &xdc , ydc , dcgi, dcgj ,
+     &rhs , rhsgi, rhsgj ,
+     &scalar_field ,
+     &soln , solngi, solngj ,
+     &ifirst, ilast, jfirst, jlast ,
+     &dx ,
+     &offset, maxres )
+
+      implicit none
+      integer ifirst, ilast, jfirst, jlast
+      integer dcgi, dcgj, fluxgi, fluxgj, rhsgi, rhsgj,
+     &        solngi, solngj
+      double precision xflux(ifirst-fluxgi:ilast+1+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj)
+      double precision yflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+1+fluxgj)
+      double precision xdc(ifirst-dcgi:ilast+1+dcgi,
+     &                     jfirst-dcgj:jlast+dcgj)
+      double precision ydc(ifirst-dcgi:ilast+dcgi,
+     &                     jfirst-dcgj:jlast+1+dcgj)
+      double precision soln(ifirst-solngi:ilast+solngi,
+     &                      jfirst-solngj:jlast+solngj)
+      double precision rhs(ifirst-rhsgi:ilast+rhsgi,
+     &                     jfirst-rhsgj:jlast+rhsgj)
+      double precision scalar_field
+      double precision dx(0:1)
+      integer offset
+      double precision maxres
+
+      double precision residual, du
+      double precision dxi, dyi
+      double precision dudr
+      double precision rcoef
+      integer i, j
+      integer ioffset
+
+      dxi = 1./dx(0)
+      dyi = 1./dx(1)
+      rcoef = 1.0
+
+      maxres = 0.0
+
+      do j=jfirst,jlast
+c        offset must be 0 (red) or 1 (black)
+         if ( (jfirst+j)-((jfirst+j)/2*2) .ne. offset ) then
+            ioffset = 1
+         else
+            ioffset = 0
+         endif
+         do i=ifirst+ioffset,ilast,2
+            residual
+     &         = rhs(i,j)
+     &         - ( dxi*( xflux(i+1,j) - xflux(i,j) )
+     &           + dyi*( yflux(i,j+1) - yflux(i,j) ) )
+     &         - scalar_field*soln(i,j)
+            dudr = 1./( ( dxi*dxi*( xdc(i+1,j) + xdc(i,j) )
+     &                  + dyi*dyi*( ydc(i,j+1) + ydc(i,j) ) )
+     &                  - scalar_field )
+            du = -residual*dudr
+            soln(i,j) = soln(i,j) + du*rcoef
+            if ( maxres .lt. abs(residual) ) maxres = abs(residual)
+         enddo
+      enddo
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine rbgswithfluxmaxcondcconsf2d(
+     &xflux , yflux , fluxgi, fluxgj ,
+     &dc ,
+     &rhs , rhsgi, rhsgj ,
+     &scalar_field ,
+     &soln , solngi, solngj ,
+     &ifirst, ilast, jfirst, jlast ,
+     &dx ,
+     &offset, maxres )
+
+      implicit none
+      integer ifirst, ilast, jfirst, jlast
+      integer fluxgi, fluxgj, rhsgi, rhsgj,
+     &        solngi, solngj
+      double precision xflux(ifirst-fluxgi:ilast+1+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj)
+      double precision yflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+1+fluxgj)
+      double precision dc
+      double precision soln(ifirst-solngi:ilast+solngi,
+     &                      jfirst-solngj:jlast+solngj)
+      double precision rhs(ifirst-rhsgi:ilast+rhsgi,
+     &                     jfirst-rhsgj:jlast+rhsgj)
+      double precision scalar_field
+      double precision dx(0:1)
+      integer offset
+      double precision maxres
+
+      double precision residual, du
+      double precision dxi, dyi
+      double precision dudr
+      double precision rcoef
+      integer i, j
+      integer ioffset
+
+      dxi = 1./dx(0)
+      dyi = 1./dx(1)
+      rcoef = 1.0
+
+      maxres = 0.0
+
+      do j=jfirst,jlast
+c        offset must be 0 (red) or 1 (black)
+         if ( (jfirst+j)-((jfirst+j)/2*2) .ne. offset ) then
+            ioffset = 1
+         else
+            ioffset = 0
+         endif
+         do i=ifirst+ioffset,ilast,2
+            residual
+     &         = rhs(i,j)
+     &         - ( dxi*( xflux(i+1,j) - xflux(i,j) )
+     &           + dyi*( yflux(i,j+1) - yflux(i,j) ) )
+     &         - scalar_field*soln(i,j)
+            dudr = 1./( ( dxi*dxi*( dc + dc )
+     &                  + dyi*dyi*( dc + dc ) )
+     &                  - scalar_field )
+            du = -residual*dudr
+            soln(i,j) = soln(i,j) + du*rcoef
+            if ( maxres .lt. abs(residual) ) maxres = abs(residual)
+         enddo
+      enddo
+      return
+      end
+c***********************************************************************
+
+c***********************************************************************
+      subroutine compresvarsca2d(
+     &xflux , yflux , fluxgi, fluxgj ,
+     &rhs , rhsgi, rhsgj ,
+     &residual , residualgi, residualgj ,
+     &scalar_field , sfgi, sfgj ,
+     &soln , solngi, solngj ,
+     &ifirst, ilast, jfirst, jlast ,
+     &dx )
+
+      implicit none
+      integer ifirst, ilast, jfirst, jlast
+      integer fluxgi, fluxgj, rhsgi, rhsgj,
+     &        residualgi, residualgj, solngi, solngj, sfgi, sfgj
+      double precision xflux(ifirst-fluxgi:ilast+1+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj)
+      double precision yflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+1+fluxgj)
+      double precision soln(ifirst-solngi:ilast+solngi,
+     &                      jfirst-solngj:jlast+solngj)
+      double precision rhs(ifirst-rhsgi:ilast+rhsgi,
+     &                     jfirst-rhsgj:jlast+rhsgj)
+      double precision residual(ifirst-rhsgi:ilast+rhsgi,
+     &                          jfirst-rhsgj:jlast+rhsgj)
+      double precision scalar_field(ifirst-sfgi:ilast+sfgi,
+     &                              jfirst-sfgj:jlast+sfgj)
+      double precision dx(0:1)
+
+      double precision dxi, dyi
+      integer i, j
+
+      dxi = 1./dx(0)
+      dyi = 1./dx(1)
+
+      do j=jfirst,jlast
+         do i=ifirst,ilast
+            residual(i,j)
+     &         = rhs(i,j)
+     &         - ( dxi*( xflux(i+1,j) - xflux(i,j) )
+     &           + dyi*( yflux(i,j+1) - yflux(i,j) ) )
+     &         - scalar_field(i,j)*soln(i,j)
+         enddo
+      enddo
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine compresconsca2d(
+     &xflux , yflux , fluxgi, fluxgj ,
+     &rhs , rhsgi, rhsgj ,
+     &residual , residualgi, residualgj ,
+     &scalar_field ,
+     &soln , solngi, solngj ,
+     &ifirst, ilast, jfirst, jlast ,
+     &dx )
+
+      implicit none
+      integer ifirst, ilast, jfirst, jlast
+      integer fluxgi, fluxgj, rhsgi, rhsgj,
+     &        residualgi, residualgj, solngi, solngj
+      double precision xflux(ifirst-fluxgi:ilast+1+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj)
+      double precision yflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+1+fluxgj)
+      double precision soln(ifirst-solngi:ilast+solngi,
+     &                      jfirst-solngj:jlast+solngj)
+      double precision rhs(ifirst-rhsgi:ilast+rhsgi,
+     &                     jfirst-rhsgj:jlast+rhsgj)
+      double precision residual(ifirst-rhsgi:ilast+rhsgi,
+     &                          jfirst-rhsgj:jlast+rhsgj)
+      double precision scalar_field
+      double precision dx(0:1)
+
+      double precision dxi, dyi
+      integer i, j
+
+      dxi = 1./dx(0)
+      dyi = 1./dx(1)
+
+      do j=jfirst,jlast
+         do i=ifirst,ilast
+            residual(i,j)
+     &         = rhs(i,j)
+     &         - ( dxi*( xflux(i+1,j) - xflux(i,j) )
+     &           + dyi*( yflux(i,j+1) - yflux(i,j) ) )
+     &         - scalar_field*soln(i,j)
+         enddo
+      enddo
+      return
+      end
+c***********************************************************************
+
+c***********************************************************************
+      subroutine ewingfixfluxvardc2d(
+     &xflux , yflux , fluxgi, fluxgj ,
+     &xdc , ydc , dcgi, dcgj ,
+     &soln , solngi, solngj ,
+     &ifirst, ilast, jfirst, jlast ,
+     &location_index ,
+     &ratio_to_coarser ,
+     &blower, bupper,
+     &dx )
+
+      implicit none
+      integer ifirst, ilast, jfirst, jlast
+      integer dcgi, dcgj, fluxgi, fluxgj,
+     &        solngi, solngj
+      double precision xflux(ifirst-fluxgi:ilast+1+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj)
+      double precision yflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+1+fluxgj)
+      double precision xdc(ifirst-dcgi:ilast+1+dcgi,
+     &                     jfirst-dcgj:jlast+dcgj)
+      double precision ydc(ifirst-dcgi:ilast+dcgi,
+     &                     jfirst-dcgj:jlast+1+dcgj)
+      double precision soln(ifirst-solngi:ilast+solngi,
+     &                      jfirst-solngj:jlast+solngj)
+      double precision dx(0:1)
+      integer location_index
+      integer ratio_to_coarser(0:1)
+c     Lower and upper corners of boundary box
+      integer blower(0:1), bupper(0:1)
+
+      double precision h
+      integer i, ibeg, iend, igho, j, jbeg, jend, jgho
+c     Fine grid indices inside one coarse grid.
+      integer ip, jp
+c     Fine grid indices for point diametrically opposite from (ip,jp).
+      integer iq, jq
+c     Weights associated with longtitudinal and transverse
+c     (with respect to boundary normal) gradients.
+      double precision tranwt, longwt
+
+      if ( location_index .eq. 0 ) then
+c        min i edge
+         tranwt = 1.0/(1+ratio_to_coarser(0))
+         longwt = 2*tranwt
+         h = dx(0)
+         igho = bupper(0)
+         i = igho+1
+         jbeg = max(blower(1),jfirst)
+         jend = min(bupper(1),jlast)
+         do j=jbeg,jend,ratio_to_coarser(1)
+            do jp=0,ratio_to_coarser(1)-1
+               jq = ratio_to_coarser(1) - jp - 1
+               xflux(i,j+jp)
+     &            = longwt*xflux(i,j+jp)
+     &            + tranwt*xdc(i,j+jp)*(
+     &               soln(i,j+jq) - soln(i,j+jp) )/h
+            enddo
+         enddo
+      elseif ( location_index .eq. 1 ) then
+c        max i edge
+         tranwt = 1.0/(1+ratio_to_coarser(0))
+         longwt = 2*tranwt
+         h = dx(0)
+         igho = blower(0)
+         i = igho-1
+         jbeg = max(blower(1),jfirst)
+         jend = min(bupper(1),jlast)
+         do j=jbeg,jend,ratio_to_coarser(1)
+            do jp=0,ratio_to_coarser(1)-1
+               jq = ratio_to_coarser(1) - jp - 1
+               xflux(igho,j+jp)
+     &            = longwt*xflux(igho,j+jp)
+     &            - tranwt*xdc(igho,j+jp)*(
+     &               soln(i,j+jq) - soln(i,j+jp) )/h
+            enddo
+         enddo
+      elseif ( location_index .eq. 2 ) then
+c        min j edge
+         tranwt = 1.0/(1+ratio_to_coarser(1))
+         longwt = 2*tranwt
+         h = dx(1)
+         jgho = bupper(1)
+         j = jgho+1
+         ibeg = max(blower(0),ifirst)
+         iend = min(bupper(0),ilast)
+         do i=ibeg,iend,ratio_to_coarser(0)
+            do ip=0,ratio_to_coarser(0)-1
+               iq = ratio_to_coarser(0) - ip - 1
+               yflux(i+ip,j)
+     &            = longwt*yflux(i+ip,j)
+     &            + tranwt*ydc(i+ip,j)*(
+     &               soln(i+iq,j) - soln(i+ip,j) )/h
+            enddo
+         enddo
+      elseif ( location_index .eq. 3 ) then
+c        max j edge
+         tranwt = 1.0/(1+ratio_to_coarser(1))
+         longwt = 2*tranwt
+         h = dx(1)
+         jgho = blower(1)
+         j = jgho-1
+         ibeg = max(blower(0),ifirst)
+         iend = min(bupper(0),ilast)
+         do i=ibeg,iend,ratio_to_coarser(0)
+            do ip=0,ratio_to_coarser(0)-1
+               iq = ratio_to_coarser(0) - ip - 1
+               yflux(i+ip,jgho)
+     &            = longwt*yflux(i+ip,jgho)
+     &            - tranwt*ydc(i+ip,jgho)*(
+     &               soln(i+iq,j) - soln(i+ip,j) )/h
+            enddo
+         enddo
+      endif
+
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine ewingfixfluxcondc2d(
+     &xflux , yflux , fluxgi, fluxgj ,
+     &dc ,
+     &soln , solngi, solngj ,
+     &ifirst, ilast, jfirst, jlast ,
+     &location_index ,
+     &ratio_to_coarser ,
+     &blower, bupper,
+     &dx )
+
+      implicit none
+      integer ifirst, ilast, jfirst, jlast
+      integer fluxgi, fluxgj, solngi, solngj
+      double precision xflux(ifirst-fluxgi:ilast+1+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj)
+      double precision yflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+1+fluxgj)
+      double precision dc
+      double precision soln(ifirst-solngi:ilast+solngi,
+     &                      jfirst-solngj:jlast+solngj)
+      double precision dx(0:1)
+      integer location_index
+      integer ratio_to_coarser(0:1)
+c     Lower and upper corners of boundary box
+      integer blower(0:1), bupper(0:1)
+
+      double precision h
+      integer i, ibeg, iend, igho, j, jbeg, jend, jgho
+c     Fine grid indices inside one coarse grid.
+      integer ip, jp
+c     Fine grid indices for point diametrically opposite from (ip,jp).
+      integer iq, jq
+c     Weights associated with longtitudinal and transverse
+c     (with respect to boundary normal) gradients.
+      double precision tranwt, longwt
+
+      if ( location_index .eq. 0 ) then
+c        min i edge
+         tranwt = 1.0/(1+ratio_to_coarser(0))
+         longwt = 2*tranwt
+         h = dx(0)
+         igho = bupper(0)
+         i = igho+1
+         jbeg = max(blower(1),jfirst)
+         jend = min(bupper(1),jlast)
+         do j=jbeg,jend,ratio_to_coarser(1)
+            do jp=0,ratio_to_coarser(1)-1
+               jq = ratio_to_coarser(1) - jp - 1
+c     write(*,*) i, j, jq, jp
+               xflux(i,j+jp)
+     &            = longwt*xflux(i,j+jp)
+     &            + tranwt*dc*( soln(i,j+jq) - soln(i,j+jp) )/h
+            enddo
+         enddo
+      elseif ( location_index .eq. 1 ) then
+c        max i edge
+         tranwt = 1.0/(1+ratio_to_coarser(0))
+         longwt = 2*tranwt
+         h = dx(0)
+         igho = blower(0)
+         i = igho-1
+         jbeg = max(blower(1),jfirst)
+         jend = min(bupper(1),jlast)
+         do j=jbeg,jend,ratio_to_coarser(1)
+            do jp=0,ratio_to_coarser(1)-1
+               jq = ratio_to_coarser(1) - jp - 1
+               xflux(igho,j+jp)
+     &            = longwt*xflux(igho,j+jp)
+     &            - tranwt*dc*( soln(i,j+jq) - soln(i,j+jp) )/h
+            enddo
+         enddo
+      elseif ( location_index .eq. 2 ) then
+c        min j edge
+         tranwt = 1.0/(1+ratio_to_coarser(1))
+         longwt = 2*tranwt
+         h = dx(1)
+         jgho = bupper(1)
+         j = jgho+1
+         ibeg = max(blower(0),ifirst)
+         iend = min(bupper(0),ilast)
+         do i=ibeg,iend,ratio_to_coarser(0)
+            do ip=0,ratio_to_coarser(0)-1
+               iq = ratio_to_coarser(0) - ip - 1
+               yflux(i+ip,j)
+     &            = longwt*yflux(i+ip,j)
+     &            + tranwt*dc*( soln(i+iq,j) - soln(i+ip,j) )/h
+            enddo
+         enddo
+      elseif ( location_index .eq. 3 ) then
+c        max j edge
+         tranwt = 1.0/(1+ratio_to_coarser(1))
+         longwt = 2*tranwt
+         h = dx(1)
+         jgho = blower(1)
+         j = jgho-1
+         ibeg = max(blower(0),ifirst)
+         iend = min(bupper(0),ilast)
+         do i=ibeg,iend,ratio_to_coarser(0)
+            do ip=0,ratio_to_coarser(0)-1
+               iq = ratio_to_coarser(0) - ip - 1
+               yflux(i+ip,jgho)
+     &            = longwt*yflux(i+ip,jgho)
+     &            - tranwt*dc*( soln(i+iq,j) - soln(i+ip,j) )/h
+            enddo
+         enddo
+      endif
+
+      return
+      end
+c***********************************************************************
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/fortran/solv_cellpoissonfacops3d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/fortran/solv_cellpoissonfacops3d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1014 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/solv/fortran/solv_cellpoissonfacops3d.f $
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:   	$LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: F77 routines for scalar Poisson FAC operator
+c
+c
+c***********************************************************************
+c***********************************************************************
+      subroutine compfluxvardc3d(
+     &xflux , yflux , zflux, fluxgi, fluxgj , fluxgk,
+     &xdc , ydc , zdc, dcgi, dcgj , dcgk ,
+     &soln , solngi, solngj , solngk ,
+     &ifirst, ilast, jfirst, jlast , kfirst, klast ,
+     &dx )
+
+      implicit none
+      integer ifirst, ilast, jfirst, jlast, kfirst, klast
+      integer dcgi, dcgj, dcgk, fluxgi, fluxgj, fluxgk, 
+     &        solngi, solngj, solngk
+      double precision xflux(ifirst-fluxgi:ilast+1+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj,
+     &                       kfirst-fluxgk:klast+fluxgk)
+      double precision yflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+1+fluxgj,
+     &                       kfirst-fluxgk:klast+fluxgk)
+      double precision zflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj,
+     &                       kfirst-fluxgk:klast+1+fluxgk)
+      double precision xdc(ifirst-dcgi:ilast+1+dcgi,
+     &                     jfirst-dcgj:jlast+dcgj,
+     &                     kfirst-dcgk:klast+dcgk)
+      double precision ydc(ifirst-dcgi:ilast+dcgi,
+     &                     jfirst-dcgj:jlast+1+dcgj,
+     &                     kfirst-dcgk:klast+dcgk)
+      double precision zdc(ifirst-dcgi:ilast+dcgi,
+     &                     jfirst-dcgj:jlast+dcgj,
+     &                     kfirst-dcgk:klast+1+dcgk)
+      double precision soln(ifirst-solngi:ilast+solngi,
+     &                      jfirst-solngj:jlast+solngj,
+     &                      kfirst-solngk:klast+solngk)
+      double precision dx(0:2)
+
+      double precision dxi, dyi, dzi
+      integer i, j, k
+
+      dxi = 1./dx(0)
+      dyi = 1./dx(1)
+      dzi = 1./dx(2)
+
+      do k=kfirst,klast
+      do j=jfirst,jlast
+      do i=ifirst,ilast+1
+         xflux(i,j,k) = dxi*xdc(i,j,k)*( soln(i,j,k) - soln(i-1,j,k) )
+      enddo
+      enddo
+      enddo
+      do k=kfirst,klast
+      do j=jfirst,jlast+1
+      do i=ifirst,ilast
+         yflux(i,j,k) = dyi*ydc(i,j,k)*( soln(i,j,k) - soln(i,j-1,k) )
+      enddo
+      enddo
+      enddo
+      do k=kfirst,klast+1
+      do j=jfirst,jlast
+      do i=ifirst,ilast
+         zflux(i,j,k) = dzi*zdc(i,j,k)*( soln(i,j,k) - soln(i,j,k-1) )
+      enddo
+      enddo
+      enddo
+
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine compfluxcondc3d(
+     &xflux , yflux , zflux, fluxgi, fluxgj , fluxgk,
+     &dc ,
+     &soln , solngi, solngj , solngk ,
+     &ifirst, ilast, jfirst, jlast , kfirst, klast ,
+     &dx )
+
+      implicit none
+      integer ifirst, ilast, jfirst, jlast, kfirst, klast
+      integer fluxgi, fluxgj, fluxgk, 
+     &        solngi, solngj, solngk
+      double precision xflux(ifirst-fluxgi:ilast+1+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj,
+     &                       kfirst-fluxgk:klast+fluxgk)
+      double precision yflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+1+fluxgj,
+     &                       kfirst-fluxgk:klast+fluxgk)
+      double precision zflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj,
+     &                       kfirst-fluxgk:klast+1+fluxgk)
+      double precision dc
+      double precision soln(ifirst-solngi:ilast+solngi,
+     &                      jfirst-solngj:jlast+solngj,
+     &                      kfirst-solngk:klast+solngk)
+      double precision dx(0:2)
+
+      double precision dxi, dyi, dzi
+      integer i, j, k
+
+      dxi = 1./dx(0)
+      dyi = 1./dx(1)
+      dzi = 1./dx(2)
+
+      do k=kfirst,klast
+      do j=jfirst,jlast
+      do i=ifirst,ilast+1
+         xflux(i,j,k) = dxi*dc*( soln(i,j,k) - soln(i-1,j,k) )
+      enddo
+      enddo
+      enddo
+      do k=kfirst,klast
+      do j=jfirst,jlast+1
+      do i=ifirst,ilast
+         yflux(i,j,k) = dyi*dc*( soln(i,j,k) - soln(i,j-1,k) )
+      enddo
+      enddo
+      enddo
+      do k=kfirst,klast+1
+      do j=jfirst,jlast
+      do i=ifirst,ilast
+         zflux(i,j,k) = dzi*dc*( soln(i,j,k) - soln(i,j,k-1) )
+      enddo
+      enddo
+      enddo
+
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine rbgswithfluxmaxvardcvarsf3d(
+     &xflux , yflux , zflux, fluxgi, fluxgj , fluxgk,
+     &xdc , ydc , zdc, dcgi, dcgj , dcgk ,
+     &rhs , rhsgi, rhsgj , rhsgk ,
+     &scalar_field , sfgi, sfgj , sfgk ,
+     &soln , solngi, solngj , solngk ,
+     &ifirst, ilast, jfirst, jlast , kfirst, klast ,
+     &dx ,
+     &offset, maxres )
+
+      implicit none
+      integer ifirst, ilast, jfirst, jlast, kfirst, klast
+      integer dcgi, dcgj, dcgk, fluxgi, fluxgj, fluxgk, 
+     &        rhsgi, rhsgj, rhsgk, solngi, solngj, solngk,
+     &        sfgi, sfgj, sfgk
+      double precision xflux(ifirst-fluxgi:ilast+1+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj,
+     &                       kfirst-fluxgk:klast+fluxgk)
+      double precision yflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+1+fluxgj,
+     &                       kfirst-fluxgk:klast+fluxgk)
+      double precision zflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj,
+     &                       kfirst-fluxgk:klast+1+fluxgk)
+      double precision xdc(ifirst-dcgi:ilast+1+dcgi,
+     &                     jfirst-dcgj:jlast+dcgj,
+     &                     kfirst-dcgk:klast+dcgk)
+      double precision ydc(ifirst-dcgi:ilast+dcgi,
+     &                     jfirst-dcgj:jlast+1+dcgj,
+     &                     kfirst-dcgk:klast+dcgk)
+      double precision zdc(ifirst-dcgi:ilast+dcgi,
+     &                     jfirst-dcgj:jlast+dcgj,
+     &                     kfirst-dcgk:klast+1+dcgk)
+      double precision soln(ifirst-solngi:ilast+solngi,
+     &                      jfirst-solngj:jlast+solngj,
+     &                      kfirst-solngk:klast+solngk)
+      double precision rhs(ifirst-rhsgi:ilast+rhsgi,
+     &                     jfirst-rhsgj:jlast+rhsgj,
+     &                     kfirst-rhsgk:klast+rhsgk)
+      double precision scalar_field(ifirst-sfgi:ilast+sfgi,
+     &                              jfirst-sfgj:jlast+sfgj,
+     &                              kfirst-sfgk:klast+sfgk)
+      double precision dx(0:2)
+      integer offset
+      double precision maxres
+
+      double precision residual, du
+      double precision dxi, dyi, dzi, dxi2, dyi2, dzi2
+      double precision dudr
+      double precision rcoef
+      integer i, j, k
+      integer ioffset
+
+      dxi = 1./dx(0)
+      dyi = 1./dx(1)
+      dzi = 1./dx(2)
+      dxi2 = dxi*dxi
+      dyi2 = dyi*dyi
+      dzi2 = dzi*dzi
+      rcoef = 1.0
+
+      maxres = 0.0
+
+      do k=kfirst,klast
+      do j=jfirst,jlast
+c        offset must be 0 (red) or 1 (black)
+         if ( (ifirst+j+k)-((ifirst+j+k)/2*2) .ne. offset ) then
+            ioffset = 1
+         else
+            ioffset = 0
+         endif
+         do i=ifirst+ioffset,ilast,2
+             residual
+     &          = rhs(i,j,k)
+     &          - ( dxi*( xflux(i+1,j,k) - xflux(i,j,k) )
+     &            + dyi*( yflux(i,j+1,k) - yflux(i,j,k) )
+     &            + dzi*( zflux(i,j,k+1) - zflux(i,j,k) ) )
+     &          - scalar_field(i,j,k)*soln(i,j,k)
+             dudr = 1./( ( dxi2*( xdc(i+1,j,k)+xdc(i,j,k) )
+     &                   + dyi2*( ydc(i,j+1,k)+ydc(i,j,k) )
+     &                   + dzi2*( zdc(i,j,k+1)+zdc(i,j,k) ) )
+     &                   - scalar_field(i,j,k) )
+             du = -residual*dudr
+             soln(i,j,k) = soln(i,j,k) + du*rcoef
+             if ( maxres .lt. abs(residual) ) maxres = abs(residual)
+         enddo
+      enddo
+      enddo
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine rbgswithfluxmaxcondcvarsf3d(
+     &xflux , yflux , zflux, fluxgi, fluxgj , fluxgk,
+     &dc ,
+     &rhs , rhsgi, rhsgj , rhsgk ,
+     &scalar_field , sfgi, sfgj , sfgk ,
+     &soln , solngi, solngj , solngk ,
+     &ifirst, ilast, jfirst, jlast , kfirst, klast ,
+     &dx ,
+     &offset, maxres )
+
+      implicit none
+      integer ifirst, ilast, jfirst, jlast, kfirst, klast
+      integer fluxgi, fluxgj, fluxgk, 
+     &        rhsgi, rhsgj, rhsgk, solngi, solngj, solngk,
+     &        sfgi, sfgj, sfgk
+      double precision xflux(ifirst-fluxgi:ilast+1+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj,
+     &                       kfirst-fluxgk:klast+fluxgk)
+      double precision yflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+1+fluxgj,
+     &                       kfirst-fluxgk:klast+fluxgk)
+      double precision zflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj,
+     &                       kfirst-fluxgk:klast+1+fluxgk)
+      double precision dc
+      double precision soln(ifirst-solngi:ilast+solngi,
+     &                      jfirst-solngj:jlast+solngj,
+     &                      kfirst-solngk:klast+solngk)
+      double precision rhs(ifirst-rhsgi:ilast+rhsgi,
+     &                     jfirst-rhsgj:jlast+rhsgj,
+     &                     kfirst-rhsgk:klast+rhsgk)
+      double precision scalar_field(ifirst-sfgi:ilast+sfgi,
+     &                              jfirst-sfgj:jlast+sfgj,
+     &                              kfirst-sfgk:klast+sfgk)
+      double precision dx(0:2)
+      integer offset
+      double precision maxres
+
+      double precision residual, du
+      double precision dxi, dyi, dzi, dxi2, dyi2, dzi2
+      double precision dudr
+      double precision rcoef
+      integer i, j, k
+      integer ioffset
+
+      dxi = 1./dx(0)
+      dyi = 1./dx(1)
+      dzi = 1./dx(2)
+      dxi2 = dxi*dxi
+      dyi2 = dyi*dyi
+      dzi2 = dzi*dzi
+      rcoef = 1.0
+
+      maxres = 0.0
+
+      do k=kfirst,klast
+      do j=jfirst,jlast
+c        offset must be 0 (red) or 1 (black)
+         if ( (ifirst+j+k)-((ifirst+j+k)/2*2) .ne. offset ) then
+            ioffset = 1
+         else
+            ioffset = 0
+         endif
+         do i=ifirst+ioffset,ilast,2
+             residual
+     &          = rhs(i,j,k)
+     &          - ( dxi*( xflux(i+1,j,k) - xflux(i,j,k) )
+     &            + dyi*( yflux(i,j+1,k) - yflux(i,j,k) )
+     &            + dzi*( zflux(i,j,k+1) - zflux(i,j,k) ) )
+     &          - scalar_field(i,j,k)*soln(i,j,k)
+             dudr = 1./( ( dxi2*( dc + dc )
+     &                   + dyi2*( dc + dc )
+     &                   + dzi2*( dc + dc ) )
+     &                   - scalar_field(i,j,k) )
+             du = -residual*dudr
+             soln(i,j,k) = soln(i,j,k) + du*rcoef
+             if ( maxres .lt. abs(residual) ) maxres = abs(residual)
+         enddo
+      enddo
+      enddo
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine rbgswithfluxmaxvardcconsf3d(
+     &xflux , yflux , zflux, fluxgi, fluxgj , fluxgk,
+     &xdc , ydc , zdc, dcgi, dcgj , dcgk ,
+     &rhs , rhsgi, rhsgj , rhsgk ,
+     &scalar_field ,
+     &soln , solngi, solngj , solngk ,
+     &ifirst, ilast, jfirst, jlast , kfirst, klast ,
+     &dx ,
+     &offset, maxres )
+
+      implicit none
+      integer ifirst, ilast, jfirst, jlast, kfirst, klast
+      integer dcgi, dcgj, dcgk, fluxgi, fluxgj, fluxgk, 
+     &        rhsgi, rhsgj, rhsgk, solngi, solngj, solngk,
+     &        sfgi, sfgj, sfgk
+      double precision xflux(ifirst-fluxgi:ilast+1+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj,
+     &                       kfirst-fluxgk:klast+fluxgk)
+      double precision yflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+1+fluxgj,
+     &                       kfirst-fluxgk:klast+fluxgk)
+      double precision zflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj,
+     &                       kfirst-fluxgk:klast+1+fluxgk)
+      double precision xdc(ifirst-dcgi:ilast+1+dcgi,
+     &                     jfirst-dcgj:jlast+dcgj,
+     &                     kfirst-dcgk:klast+dcgk)
+      double precision ydc(ifirst-dcgi:ilast+dcgi,
+     &                     jfirst-dcgj:jlast+1+dcgj,
+     &                     kfirst-dcgk:klast+dcgk)
+      double precision zdc(ifirst-dcgi:ilast+dcgi,
+     &                     jfirst-dcgj:jlast+dcgj,
+     &                     kfirst-dcgk:klast+1+dcgk)
+      double precision soln(ifirst-solngi:ilast+solngi,
+     &                      jfirst-solngj:jlast+solngj,
+     &                      kfirst-solngk:klast+solngk)
+      double precision rhs(ifirst-rhsgi:ilast+rhsgi,
+     &                     jfirst-rhsgj:jlast+rhsgj,
+     &                     kfirst-rhsgk:klast+rhsgk)
+      double precision scalar_field
+      double precision dx(0:2)
+      integer offset
+      double precision maxres
+
+      double precision residual, du
+      double precision dxi, dyi, dzi, dxi2, dyi2, dzi2
+      double precision dudr
+      double precision rcoef
+      integer i, j, k
+      integer ioffset
+
+      dxi = 1./dx(0)
+      dyi = 1./dx(1)
+      dzi = 1./dx(2)
+      dxi2 = dxi*dxi
+      dyi2 = dyi*dyi
+      dzi2 = dzi*dzi
+      rcoef = 1.0
+
+      maxres = 0.0
+
+      do k=kfirst,klast
+      do j=jfirst,jlast
+c        offset must be 0 (red) or 1 (black)
+         if ( (ifirst+j+k)-((ifirst+j+k)/2*2) .ne. offset ) then
+            ioffset = 1
+         else
+            ioffset = 0
+         endif
+         do i=ifirst+ioffset,ilast,2
+             residual
+     &          = rhs(i,j,k)
+     &          - ( dxi*( xflux(i+1,j,k) - xflux(i,j,k) )
+     &            + dyi*( yflux(i,j+1,k) - yflux(i,j,k) )
+     &            + dzi*( zflux(i,j,k+1) - zflux(i,j,k) ) )
+     &          - scalar_field*soln(i,j,k)
+             dudr = 1./( ( dxi2*( xdc(i+1,j,k)+xdc(i,j,k) )
+     &                   + dyi2*( ydc(i,j+1,k)+ydc(i,j,k) )
+     &                   + dzi2*( zdc(i,j,k+1)+zdc(i,j,k) ) )
+     &                   - scalar_field )
+             du = -residual*dudr
+             soln(i,j,k) = soln(i,j,k) + du*rcoef
+             if ( maxres .lt. abs(residual) ) maxres = abs(residual)
+         enddo
+      enddo
+      enddo
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine rbgswithfluxmaxcondcconsf3d(
+     &xflux , yflux , zflux, fluxgi, fluxgj , fluxgk,
+     &dc ,
+     &rhs , rhsgi, rhsgj , rhsgk ,
+     &scalar_field ,
+     &soln , solngi, solngj , solngk ,
+     &ifirst, ilast, jfirst, jlast , kfirst, klast ,
+     &dx ,
+     &offset, maxres )
+
+      implicit none
+      integer ifirst, ilast, jfirst, jlast, kfirst, klast
+      integer fluxgi, fluxgj, fluxgk, 
+     &        rhsgi, rhsgj, rhsgk, solngi, solngj, solngk,
+     &        sfgi, sfgj, sfgk
+      double precision xflux(ifirst-fluxgi:ilast+1+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj,
+     &                       kfirst-fluxgk:klast+fluxgk)
+      double precision yflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+1+fluxgj,
+     &                       kfirst-fluxgk:klast+fluxgk)
+      double precision zflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj,
+     &                       kfirst-fluxgk:klast+1+fluxgk)
+      double precision dc
+      double precision soln(ifirst-solngi:ilast+solngi,
+     &                      jfirst-solngj:jlast+solngj,
+     &                      kfirst-solngk:klast+solngk)
+      double precision rhs(ifirst-rhsgi:ilast+rhsgi,
+     &                     jfirst-rhsgj:jlast+rhsgj,
+     &                     kfirst-rhsgk:klast+rhsgk)
+      double precision scalar_field
+      double precision dx(0:2)
+      integer offset
+      double precision maxres
+
+      double precision residual, du
+      double precision dxi, dyi, dzi, dxi2, dyi2, dzi2
+      double precision dudr
+      double precision rcoef
+      integer i, j, k
+      integer ioffset
+
+      dxi = 1./dx(0)
+      dyi = 1./dx(1)
+      dzi = 1./dx(2)
+      dxi2 = dxi*dxi
+      dyi2 = dyi*dyi
+      dzi2 = dzi*dzi
+      rcoef = 1.0
+
+      maxres = 0.0
+
+      do k=kfirst,klast
+      do j=jfirst,jlast
+c        offset must be 0 (red) or 1 (black)
+         if ( (ifirst+j+k)-((ifirst+j+k)/2*2) .ne. offset ) then
+            ioffset = 1
+         else
+            ioffset = 0
+         endif
+         do i=ifirst+ioffset,ilast,2
+             residual
+     &          = rhs(i,j,k)
+     &          - ( dxi*( xflux(i+1,j,k) - xflux(i,j,k) )
+     &            + dyi*( yflux(i,j+1,k) - yflux(i,j,k) )
+     &            + dzi*( zflux(i,j,k+1) - zflux(i,j,k) ) )
+     &          - scalar_field*soln(i,j,k)
+             dudr = 1./( ( dxi2*( dc + dc )
+     &                   + dyi2*( dc + dc )
+     &                   + dzi2*( dc + dc ) )
+     &                   - scalar_field )
+             du = -residual*dudr
+             soln(i,j,k) = soln(i,j,k) + du*rcoef
+             if ( maxres .lt. abs(residual) ) maxres = abs(residual)
+         enddo
+      enddo
+      enddo
+      return
+      end
+c***********************************************************************
+
+c***********************************************************************
+      subroutine compresvarsca3d(
+     &xflux , yflux , zflux , fluxgi, fluxgj , fluxgk ,
+     &rhs , rhsgi, rhsgj , rhsgk ,
+     &residual , residualgi, residualgj , residualgk ,
+     &scalar_field , sfgi, sfgj , sfgk ,
+     &soln , solngi, solngj , solngk ,
+     &ifirst, ilast, jfirst, jlast , kfirst , klast ,
+     &dx )
+
+      implicit none
+      integer ifirst, ilast, jfirst, jlast , kfirst , klast
+      integer fluxgi, fluxgj, fluxgk , rhsgi, rhsgj, rhsgk ,
+     &        residualgi, residualgj, residualgk ,
+     &        solngi, solngj, solngk , sfgi, sfgj , sfgk
+      double precision xflux(ifirst-fluxgi:ilast+1+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj,
+     &                       kfirst-fluxgk:klast+fluxgk)
+      double precision yflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+1+fluxgj,
+     &                       kfirst-fluxgk:klast+fluxgk)
+      double precision zflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj,
+     &                       kfirst-fluxgk:klast+1+fluxgk)
+      double precision soln(ifirst-solngi:ilast+solngi,
+     &                      jfirst-solngj:jlast+solngj,
+     &                      kfirst-solngk:klast+solngk)
+      double precision rhs(ifirst-rhsgi:ilast+rhsgi,
+     &                     jfirst-rhsgj:jlast+rhsgj,
+     &                     kfirst-rhsgk:klast+rhsgk)
+      double precision residual(ifirst-rhsgi:ilast+rhsgi,
+     &                          jfirst-rhsgj:jlast+rhsgj,
+     &                          kfirst-rhsgk:klast+rhsgk)
+      double precision scalar_field(ifirst-sfgi:ilast+sfgi,
+     &                              jfirst-sfgj:jlast+sfgj,
+     &                              kfirst-sfgk:klast+sfgk)
+      double precision dx(0:2)
+
+      double precision dxi, dyi , dzi
+      integer i, j, k
+
+      dxi = 1./dx(0)
+      dyi = 1./dx(1)
+      dzi = 1./dx(2)
+
+      do k=kfirst,klast
+      do j=jfirst,jlast
+      do i=ifirst,ilast
+         residual(i,j,k)
+     &      = rhs(i,j,k)
+     &      - ( dxi*( xflux(i+1,j,k) - xflux(i,j,k) )
+     &        + dyi*( yflux(i,j+1,k) - yflux(i,j,k) ) 
+     &        + dzi*( zflux(i,j,k+1) - zflux(i,j,k) ) )
+     &      - scalar_field(i,j,k)*soln(i,j,k)
+      enddo
+      enddo
+      enddo
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine compresconsca3d(
+     &xflux , yflux , zflux , fluxgi, fluxgj , fluxgk ,
+     &rhs , rhsgi, rhsgj , rhsgk ,
+     &residual , residualgi, residualgj , residualgk ,
+     &scalar_field ,
+     &soln , solngi, solngj , solngk ,
+     &ifirst, ilast, jfirst, jlast , kfirst , klast ,
+     &dx )
+
+      implicit none
+      integer ifirst, ilast, jfirst, jlast , kfirst , klast
+      integer fluxgi, fluxgj, fluxgk , rhsgi, rhsgj, rhsgk ,
+     &        residualgi, residualgj, residualgk ,
+     &        solngi, solngj, solngk , sfgi, sfgj , sfgk
+      double precision xflux(ifirst-fluxgi:ilast+1+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj,
+     &                       kfirst-fluxgk:klast+fluxgk)
+      double precision yflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+1+fluxgj,
+     &                       kfirst-fluxgk:klast+fluxgk)
+      double precision zflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj,
+     &                       kfirst-fluxgk:klast+1+fluxgk)
+      double precision soln(ifirst-solngi:ilast+solngi,
+     &                      jfirst-solngj:jlast+solngj,
+     &                      kfirst-solngk:klast+solngk)
+      double precision rhs(ifirst-rhsgi:ilast+rhsgi,
+     &                     jfirst-rhsgj:jlast+rhsgj,
+     &                     kfirst-rhsgk:klast+rhsgk)
+      double precision residual(ifirst-rhsgi:ilast+rhsgi,
+     &                          jfirst-rhsgj:jlast+rhsgj,
+     &                          kfirst-rhsgk:klast+rhsgk)
+      double precision scalar_field
+      double precision dx(0:2)
+
+      double precision dxi, dyi , dzi
+      integer i, j, k
+
+      dxi = 1./dx(0)
+      dyi = 1./dx(1)
+      dzi = 1./dx(2)
+
+      do k=kfirst,klast
+      do j=jfirst,jlast
+      do i=ifirst,ilast
+         residual(i,j,k)
+     &      = rhs(i,j,k)
+     &      - ( dxi*( xflux(i+1,j,k) - xflux(i,j,k) )
+     &        + dyi*( yflux(i,j+1,k) - yflux(i,j,k) ) 
+     &        + dzi*( zflux(i,j,k+1) - zflux(i,j,k) ) )
+     &      - scalar_field*soln(i,j,k)
+      enddo
+      enddo
+      enddo
+      return
+      end
+c***********************************************************************
+
+c***********************************************************************
+      subroutine ewingfixfluxvardc3d(
+     &xflux , yflux , zflux, fluxgi, fluxgj , fluxgk,
+     &xdc , ydc , zdc, dcgi, dcgj , dcgk ,
+     &soln , solngi, solngj , solngk ,
+     &ifirst, ilast, jfirst, jlast , kfirst, klast ,
+     &location_index ,
+     &ratio_to_coarser ,
+     &blower, bupper,
+     &dx )
+
+      implicit none
+      integer ifirst, ilast, jfirst, jlast, kfirst, klast
+      integer dcgi, dcgj, dcgk, fluxgi, fluxgj, fluxgk, 
+     &        solngi, solngj, solngk
+      double precision xflux(ifirst-fluxgi:ilast+1+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj,
+     &                       kfirst-fluxgk:klast+fluxgk)
+      double precision yflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+1+fluxgj,
+     &                       kfirst-fluxgk:klast+fluxgk)
+      double precision zflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj,
+     &                       kfirst-fluxgk:klast+1+fluxgk)
+      double precision xdc(ifirst-dcgi:ilast+1+dcgi,
+     &                     jfirst-dcgj:jlast+dcgj,
+     &                     kfirst-dcgk:klast+dcgk)
+      double precision ydc(ifirst-dcgi:ilast+dcgi,
+     &                     jfirst-dcgj:jlast+1+dcgj,
+     &                     kfirst-dcgk:klast+dcgk)
+      double precision zdc(ifirst-dcgi:ilast+dcgi,
+     &                     jfirst-dcgj:jlast+dcgj,
+     &                     kfirst-dcgk:klast+1+dcgk)
+      double precision soln(ifirst-solngi:ilast+solngi,
+     &                      jfirst-solngj:jlast+solngj,
+     &                      kfirst-solngk:klast+solngk)
+      double precision dx(0:2)
+      integer location_index
+      integer ratio_to_coarser(0:2)
+c     Lower and upper corners of boundary box
+      integer blower(0:2), bupper(0:2)
+
+      double precision h
+      integer i, ibeg, iend, ibnd, igho,
+     &        j, jbeg, jend, jbnd, jgho,
+     &        k, kbeg, kend, kbnd, kgho
+c     Fine grid indices inside one coarse grid.
+      integer ip, jp, kp
+c     Fine grid indices for point diametrically opposite from (ip,jp).
+      integer iq, jq, kq
+c     Weights associated with longtitudinal and transverse
+c     (with respect to boundary normal) gradients.
+      double precision tranwt, longwt
+
+      if ( location_index .eq. 0 ) then
+c        min i face
+         tranwt = 1.0/(1+ratio_to_coarser(0))
+         longwt = 2*tranwt
+         h = dx(0)
+         i = bupper(0)+1
+         ibnd = bupper(0)+1
+         jbeg = max(blower(1),jfirst)
+         jend = min(bupper(1),jlast)
+         kbeg = max(blower(2),kfirst)
+         kend = min(bupper(2),klast)
+         do k=kbeg,kend,ratio_to_coarser(2)
+            do j=jbeg,jend,ratio_to_coarser(1)
+               do kp=0,ratio_to_coarser(2)-1
+                  kq = ratio_to_coarser(2) - kp - 1
+                  do jp=0,ratio_to_coarser(1)-1
+                     jq = ratio_to_coarser(1) - jp - 1
+                     xflux(ibnd,j+jp,k+kp)
+     &                  = longwt*xflux(ibnd,j+jp,k+kp)
+     &                  + tranwt*xdc(ibnd,j+jp,k+kp)*( 
+     &                    soln(i,j+jq,k+kq) - soln(i,j+jp,k+kp) )/h
+                  enddo
+               enddo
+            enddo
+         enddo
+      elseif ( location_index .eq. 1 ) then
+c        max i face
+         tranwt = 1.0/(1+ratio_to_coarser(0))
+         longwt = 2*tranwt
+         h = dx(0)
+         i = blower(0)-1
+         ibnd = blower(0)
+         jbeg = max(blower(1),jfirst)
+         jend = min(bupper(1),jlast)
+         kbeg = max(blower(2),kfirst)
+         kend = min(bupper(2),klast)
+         do k=kbeg,kend,ratio_to_coarser(2)
+            do j=jbeg,jend,ratio_to_coarser(1)
+               do kp=0,ratio_to_coarser(2)-1
+                  kq = ratio_to_coarser(2) - kp - 1
+                  do jp=0,ratio_to_coarser(1)-1
+                     jq = ratio_to_coarser(1) - jp - 1
+                     xflux(ibnd,j+jp,k+kp)
+     &                  = longwt*xflux(ibnd,j+jp,k+kp)
+     &                  - tranwt*xdc(ibnd,j+jp,k+kp)*( 
+     &                    soln(i,j+jq,k+kq) - soln(i,j+jp,k+kp) )/h
+                  enddo
+               enddo
+            enddo
+         enddo
+      elseif ( location_index .eq. 2 ) then
+c        min j face
+         tranwt = 1.0/(1+ratio_to_coarser(1))
+         longwt = 2*tranwt
+         h = dx(1)
+         j = bupper(1)+1
+         jbnd = bupper(1)+1
+         ibeg = max(blower(0),ifirst)
+         iend = min(bupper(0),ilast)
+         kbeg = max(blower(2),kfirst)
+         kend = min(bupper(2),klast)
+         do i=ibeg,iend,ratio_to_coarser(0)
+            do k=kbeg,kend,ratio_to_coarser(2)
+               do ip=0,ratio_to_coarser(0)-1
+                  iq = ratio_to_coarser(0) - ip - 1
+                  do kp=0,ratio_to_coarser(2)-1
+                     kq = ratio_to_coarser(2) - kp - 1
+                     yflux(i+ip,jbnd,k+kp)
+     &                  = longwt*yflux(i+ip,jbnd,k+kp)
+     &                  + tranwt*ydc(i+ip,jbnd,k+kp)*( 
+     &                    soln(i+iq,j,k+kq) - soln(i+ip,j,k+kp) )/h
+                  enddo
+               enddo
+            enddo
+         enddo
+      elseif ( location_index .eq. 3 ) then
+c        max j face
+         tranwt = 1.0/(1+ratio_to_coarser(1))
+         longwt = 2*tranwt
+         h = dx(1)
+         j = blower(1)-1
+         jbnd = blower(1)
+         ibeg = max(blower(0),ifirst)
+         iend = min(bupper(0),ilast)
+         kbeg = max(blower(2),kfirst)
+         kend = min(bupper(2),klast)
+         do i=ibeg,iend,ratio_to_coarser(0)
+            do k=kbeg,kend,ratio_to_coarser(2)
+               do ip=0,ratio_to_coarser(0)-1
+                  iq = ratio_to_coarser(0) - ip - 1
+                  do kp=0,ratio_to_coarser(2)-1
+                     kq = ratio_to_coarser(2) - kp - 1
+                     yflux(i+ip,jbnd,k+kp)
+     &                  = longwt*yflux(i+ip,jbnd,k+kp)
+     &                  - tranwt*ydc(i+ip,jbnd,k+kp)*( 
+     &                    soln(i+iq,j,k+kq) - soln(i+ip,j,k+kp) )/h
+                  enddo
+               enddo
+            enddo
+         enddo
+      elseif ( location_index .eq. 4 ) then
+c        min k face
+         tranwt = 1.0/(1+ratio_to_coarser(2))
+         longwt = 2*tranwt
+         h = dx(2)
+         k = bupper(2)+1
+         kbnd = bupper(2)+1
+         ibeg = max(blower(0),ifirst)
+         iend = min(bupper(0),ilast)
+         jbeg = max(blower(1),jfirst)
+         jend = min(bupper(1),jlast)
+         do i=ibeg,iend,ratio_to_coarser(0)
+            do j=jbeg,jend,ratio_to_coarser(1)
+               do ip=0,ratio_to_coarser(0)-1
+                  iq = ratio_to_coarser(0) - ip - 1
+                  do jp=0,ratio_to_coarser(1)-1
+                     jq = ratio_to_coarser(1) - jp - 1
+                     zflux(i+ip,j+jp,kbnd)
+     &                  = longwt*zflux(i+ip,j+jp,kbnd)
+     &                  + tranwt*zdc(i+ip,j+jp,kbnd)*( 
+     &                    soln(i+iq,j+jq,k) - soln(i+ip,j+jp,k) )/h
+                  enddo
+               enddo
+            enddo
+         enddo
+      elseif ( location_index .eq. 5 ) then
+c        max k face
+         tranwt = 1.0/(1+ratio_to_coarser(2))
+         longwt = 2*tranwt
+         h = dx(2)
+         k = blower(2)-1
+         kbnd = blower(2)
+         ibeg = max(blower(0),ifirst)
+         iend = min(bupper(0),ilast)
+         jbeg = max(blower(1),jfirst)
+         jend = min(bupper(1),jlast)
+         do i=ibeg,iend,ratio_to_coarser(0)
+            do j=jbeg,jend,ratio_to_coarser(1)
+               do ip=0,ratio_to_coarser(0)-1
+                  iq = ratio_to_coarser(0) - ip - 1
+                  do jp=0,ratio_to_coarser(1)-1
+                     jq = ratio_to_coarser(1) - jp - 1
+                     zflux(i+ip,j+jp,kbnd)
+     &                  = longwt*zflux(i+ip,j+jp,kbnd)
+     &                  - tranwt*zdc(i+ip,j+jp,kbnd)*( 
+     &                    soln(i+iq,j+jq,k) - soln(i+ip,j+jp,k) )/h
+                  enddo
+               enddo
+            enddo
+         enddo
+      endif
+
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine ewingfixfluxcondc3d(
+     &xflux , yflux , zflux, fluxgi, fluxgj , fluxgk,
+     &dc ,
+     &soln , solngi, solngj , solngk ,
+     &ifirst, ilast, jfirst, jlast , kfirst, klast ,
+     &location_index ,
+     &ratio_to_coarser ,
+     &blower, bupper,
+     &dx )
+
+      implicit none
+      integer ifirst, ilast, jfirst, jlast, kfirst, klast
+      integer fluxgi, fluxgj, fluxgk, 
+     &        solngi, solngj, solngk
+      double precision xflux(ifirst-fluxgi:ilast+1+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj,
+     &                       kfirst-fluxgk:klast+fluxgk)
+      double precision yflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+1+fluxgj,
+     &                       kfirst-fluxgk:klast+fluxgk)
+      double precision zflux(ifirst-fluxgi:ilast+fluxgi,
+     &                       jfirst-fluxgj:jlast+fluxgj,
+     &                       kfirst-fluxgk:klast+1+fluxgk)
+      double precision dc
+      double precision soln(ifirst-solngi:ilast+solngi,
+     &                      jfirst-solngj:jlast+solngj,
+     &                      kfirst-solngk:klast+solngk)
+      double precision dx(0:2)
+      integer location_index
+      integer ratio_to_coarser(0:2)
+c     Lower and upper corners of boundary box
+      integer blower(0:2), bupper(0:2)
+
+      double precision h
+      integer i, ibeg, iend, ibnd, igho,
+     &        j, jbeg, jend, jbnd, jgho,
+     &        k, kbeg, kend, kbnd, kgho
+c     Fine grid indices inside one coarse grid.
+      integer ip, jp, kp
+c     Fine grid indices for point diametrically opposite from (ip,jp).
+      integer iq, jq, kq
+c     Weights associated with longtitudinal and transverse
+c     (with respect to boundary normal) gradients.
+      double precision tranwt, longwt
+
+      if ( location_index .eq. 0 ) then
+c        min i face
+         tranwt = 1.0/(1+ratio_to_coarser(0))
+         longwt = 2*tranwt
+         h = dx(0)
+         i = bupper(0)+1
+         ibnd = bupper(0)+1
+         jbeg = max(blower(1),jfirst)
+         jend = min(bupper(1),jlast)
+         kbeg = max(blower(2),kfirst)
+         kend = min(bupper(2),klast)
+         do k=kbeg,kend,ratio_to_coarser(2)
+            do j=jbeg,jend,ratio_to_coarser(1)
+               do kp=0,ratio_to_coarser(2)-1
+                  kq = ratio_to_coarser(2) - kp - 1
+                  do jp=0,ratio_to_coarser(1)-1
+                     jq = ratio_to_coarser(1) - jp - 1
+                     xflux(ibnd,j+jp,k+kp)
+     &                  = longwt*xflux(ibnd,j+jp,k+kp)
+     &                  + tranwt*dc*( 
+     &                    soln(i,j+jq,k+kq) - soln(i,j+jp,k+kp) )/h
+                  enddo
+               enddo
+            enddo
+         enddo
+      elseif ( location_index .eq. 1 ) then
+c        max i face
+         tranwt = 1.0/(1+ratio_to_coarser(0))
+         longwt = 2*tranwt
+         h = dx(0)
+         i = blower(0)-1
+         ibnd = blower(0)
+         jbeg = max(blower(1),jfirst)
+         jend = min(bupper(1),jlast)
+         kbeg = max(blower(2),kfirst)
+         kend = min(bupper(2),klast)
+         do k=kbeg,kend,ratio_to_coarser(2)
+            do j=jbeg,jend,ratio_to_coarser(1)
+               do kp=0,ratio_to_coarser(2)-1
+                  kq = ratio_to_coarser(2) - kp - 1
+                  do jp=0,ratio_to_coarser(1)-1
+                     jq = ratio_to_coarser(1) - jp - 1
+                     xflux(ibnd,j+jp,k+kp)
+     &                  = longwt*xflux(ibnd,j+jp,k+kp)
+     &                  - tranwt*dc*( 
+     &                    soln(i,j+jq,k+kq) - soln(i,j+jp,k+kp) )/h
+                  enddo
+               enddo
+            enddo
+         enddo
+      elseif ( location_index .eq. 2 ) then
+c        min j face
+         tranwt = 1.0/(1+ratio_to_coarser(1))
+         longwt = 2*tranwt
+         h = dx(1)
+         j = bupper(1)+1
+         jbnd = bupper(1)+1
+         ibeg = max(blower(0),ifirst)
+         iend = min(bupper(0),ilast)
+         kbeg = max(blower(2),kfirst)
+         kend = min(bupper(2),klast)
+         do i=ibeg,iend,ratio_to_coarser(0)
+            do k=kbeg,kend,ratio_to_coarser(2)
+               do ip=0,ratio_to_coarser(0)-1
+                  iq = ratio_to_coarser(0) - ip - 1
+                  do kp=0,ratio_to_coarser(2)-1
+                     kq = ratio_to_coarser(2) - kp - 1
+                     yflux(i+ip,jbnd,k+kp)
+     &                  = longwt*yflux(i+ip,jbnd,k+kp)
+     &                  + tranwt*dc*( 
+     &                    soln(i+iq,j,k+kq) - soln(i+ip,j,k+kp) )/h
+                  enddo
+               enddo
+            enddo
+         enddo
+      elseif ( location_index .eq. 3 ) then
+c        max j face
+         tranwt = 1.0/(1+ratio_to_coarser(1))
+         longwt = 2*tranwt
+         h = dx(1)
+         j = blower(1)-1
+         jbnd = blower(1)
+         ibeg = max(blower(0),ifirst)
+         iend = min(bupper(0),ilast)
+         kbeg = max(blower(2),kfirst)
+         kend = min(bupper(2),klast)
+         do i=ibeg,iend,ratio_to_coarser(0)
+            do k=kbeg,kend,ratio_to_coarser(2)
+               do ip=0,ratio_to_coarser(0)-1
+                  iq = ratio_to_coarser(0) - ip - 1
+                  do kp=0,ratio_to_coarser(2)-1
+                     kq = ratio_to_coarser(2) - kp - 1
+                     yflux(i+ip,jbnd,k+kp)
+     &                  = longwt*yflux(i+ip,jbnd,k+kp)
+     &                  - tranwt*dc*( 
+     &                    soln(i+iq,j,k+kq) - soln(i+ip,j,k+kp) )/h
+                  enddo
+               enddo
+            enddo
+         enddo
+      elseif ( location_index .eq. 4 ) then
+c        min k face
+         tranwt = 1.0/(1+ratio_to_coarser(2))
+         longwt = 2*tranwt
+         h = dx(2)
+         k = bupper(2)+1
+         kbnd = bupper(2)+1
+         ibeg = max(blower(0),ifirst)
+         iend = min(bupper(0),ilast)
+         jbeg = max(blower(1),jfirst)
+         jend = min(bupper(1),jlast)
+         do i=ibeg,iend,ratio_to_coarser(0)
+            do j=jbeg,jend,ratio_to_coarser(1)
+               do ip=0,ratio_to_coarser(0)-1
+                  iq = ratio_to_coarser(0) - ip - 1
+                  do jp=0,ratio_to_coarser(1)-1
+                     jq = ratio_to_coarser(1) - jp - 1
+                     zflux(i+ip,j+jp,kbnd)
+     &                  = longwt*zflux(i+ip,j+jp,kbnd)
+     &                  + tranwt*dc*( 
+     &                    soln(i+iq,j+jq,k) - soln(i+ip,j+jp,k) )/h
+                  enddo
+               enddo
+            enddo
+         enddo
+      elseif ( location_index .eq. 5 ) then
+c        max k face
+         tranwt = 1.0/(1+ratio_to_coarser(2))
+         longwt = 2*tranwt
+         h = dx(2)
+         k = blower(2)-1
+         kbnd = blower(2)
+         ibeg = max(blower(0),ifirst)
+         iend = min(bupper(0),ilast)
+         jbeg = max(blower(1),jfirst)
+         jend = min(bupper(1),jlast)
+         do i=ibeg,iend,ratio_to_coarser(0)
+            do j=jbeg,jend,ratio_to_coarser(1)
+               do ip=0,ratio_to_coarser(0)-1
+                  iq = ratio_to_coarser(0) - ip - 1
+                  do jp=0,ratio_to_coarser(1)-1
+                     jq = ratio_to_coarser(1) - jp - 1
+                     zflux(i+ip,j+jp,kbnd)
+     &                  = longwt*zflux(i+ip,j+jp,kbnd)
+     &                  - tranwt*dc*( 
+     &                    soln(i+iq,j+jq,k) - soln(i+ip,j+jp,k) )/h
+                  enddo
+               enddo
+            enddo
+         enddo
+      endif
+
+      return
+      end
+c***********************************************************************
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/fortran/solv_cellpoissonhypresolver2d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/fortran/solv_cellpoissonhypresolver2d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,327 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/solv/fortran/solv_cellpoissonhypresolver2d.f $
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Release:     
+c  Revision:    
+c  Modified:    
+c  Description: F77 routines for scalar Poisson Hypre solver
+c
+c
+c***********************************************************************
+c***********************************************************************
+      subroutine compdiagvariablec2d(
+     &  diag, c,
+     &  offdiagi, offdiagj,
+     &  ifirst, ilast, jfirst, jlast,
+     &  cscale, dscale )
+c***********************************************************************
+      implicit none
+      integer ifirst, ilast, jfirst, jlast
+      double precision diag(ifirst:ilast,jfirst:jlast)
+      double precision c(ifirst:ilast,jfirst:jlast)
+      double precision offdiagi(ifirst:ilast+1,jfirst:jlast)
+      double precision offdiagj(ifirst:ilast,jfirst:jlast+1)
+      double precision cscale, dscale
+      integer i, j
+c     Assume g value of zero
+      do i=ifirst,ilast
+         do j=jfirst,jlast
+            diag(i,j) = cscale*c(i,j) - 
+     &        ( offdiagi(i,j) + offdiagi(i+1,j) +
+     &          offdiagj(i,j) + offdiagj(i,j+1) )
+         enddo
+      enddo
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine compdiagscalarc2d(
+     &  diag, c,
+     &  offdiagi, offdiagj,
+     &  ifirst, ilast, jfirst, jlast,
+     &  cscale, dscale )
+c***********************************************************************
+      implicit none
+      integer ifirst, ilast, jfirst, jlast
+      double precision diag(ifirst:ilast,jfirst:jlast)
+      double precision c
+      double precision offdiagi(ifirst:ilast+1,jfirst:jlast)
+      double precision offdiagj(ifirst:ilast,jfirst:jlast+1)
+      double precision cscale, dscale
+      integer i, j
+c     Assume g value of zero
+      do i=ifirst,ilast
+         do j=jfirst,jlast
+            diag(i,j) = cscale*c - 
+     &        ( offdiagi(i,j) + offdiagi(i+1,j) +
+     &          offdiagj(i,j) + offdiagj(i,j+1) )
+         enddo
+      enddo
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine compdiagzeroc2d(
+     &  diag,
+     &  offdiagi, offdiagj,
+     &  ifirst, ilast, jfirst, jlast,
+     &  cscale, dscale )
+c***********************************************************************
+      implicit none
+      integer ifirst, ilast, jfirst, jlast
+      double precision diag(ifirst:ilast,jfirst:jlast)
+      double precision offdiagi(ifirst:ilast+1,jfirst:jlast)
+      double precision offdiagj(ifirst:ilast,jfirst:jlast+1)
+      double precision cscale, dscale
+      integer i, j
+c     Assume g value of zero
+      do i=ifirst,ilast
+         do j=jfirst,jlast
+            diag(i,j) = -( offdiagi(i,j) + offdiagi(i+1,j) +
+     &                     offdiagj(i,j) + offdiagj(i,j+1) )
+         enddo
+      enddo
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine adjbdry2d(
+     &  diag,
+     &  offdiagi, offdiagj,
+     &  pifirst, pilast, pjfirst, pjlast,
+     &  acoef,
+     &  bcoef,
+     &  aifirst, ailast, ajfirst, ajlast,
+     &  auk0,
+     &  kifirst, kilast, kjfirst, kjlast,
+     &  lower, upper,
+     &  location, h )
+c***********************************************************************
+      implicit none
+      integer pifirst, pilast, pjfirst, pjlast
+      double precision diag(pifirst:pilast,pjfirst:pjlast)
+      double precision offdiagi(pifirst:pilast+1,pjfirst:pjlast)
+      double precision offdiagj(pifirst:pilast,pjfirst:pjlast+1)
+      integer aifirst, ailast, ajfirst, ajlast
+      double precision acoef(aifirst:ailast,ajfirst:ajlast)
+      double precision bcoef(aifirst:ailast,ajfirst:ajlast)
+      integer kifirst, kilast, kjfirst, kjlast
+      double precision auk0(kifirst:kilast,kjfirst:kjlast)
+      integer lower(0:1), upper(0:1)
+      integer location
+      double precision h(0:1), hh
+      integer igho, iint, ifac
+      integer jgho, jint, jfac
+      double precision uk0, k1
+c     Nomenclature for indices: gho=ghost, int=interior,
+c     fac=surface, beg=beginning, end=ending.
+      integer i, j
+      hh = h(location/2)
+      if ( location .eq. 0 ) then
+c        min i edge
+         igho = upper(0)
+         iint = igho + 1
+         ifac = igho + 1
+         do j=lower(1),upper(1)
+            uk0 = (hh)
+     &         / (1-acoef(ifac,j)*(1-0.5*hh))
+            k1 = (1-acoef(ifac,j)*(1+0.5*hh))
+     &         / (1-acoef(ifac,j)*(1-0.5*hh))
+            diag(iint,j) = diag(iint,j) + k1*offdiagi(ifac,j)
+            auk0(ifac,j) = uk0*offdiagi(ifac,j)
+            offdiagi(ifac,j) = 0.0
+         enddo
+      elseif ( location .eq. 1 ) then
+c        min i edge
+         igho = lower(0)
+         iint = igho - 1
+         ifac = igho
+         do j=lower(1),upper(1)
+            uk0 = (hh)
+     &         / (1-acoef(ifac,j)*(1-0.5*hh))
+            k1 = (1-acoef(ifac,j)*(1+0.5*hh))
+     &         / (1-acoef(ifac,j)*(1-0.5*hh))
+            diag(iint,j) = diag(iint,j) + k1*offdiagi(ifac,j)
+            auk0(ifac,j) = uk0*offdiagi(ifac,j)
+            offdiagi(ifac,j) = 0.0
+         enddo
+      elseif ( location .eq. 2 ) then
+c        min i edge
+         jgho = upper(1)
+         jint = jgho + 1
+         jfac = jgho + 1
+         do i=lower(0),upper(0)
+            uk0 = (hh)
+     &         / (1-acoef(i,jfac)*(1-0.5*hh))
+            k1 = (1-acoef(i,jfac)*(1+0.5*hh))
+     &         / (1-acoef(i,jfac)*(1-0.5*hh))
+            diag(i,jint) = diag(i,jint) + k1*offdiagj(i,jfac)
+            auk0(i,jfac) = uk0*offdiagj(i,jfac)
+            offdiagj(i,jfac) = 0.0
+         enddo
+      elseif ( location .eq. 3 ) then
+c        min i edge
+         jgho = lower(1)
+         jint = jgho - 1
+         jfac = jgho
+         do i=lower(0),upper(0)
+            uk0 = (hh)
+     &         / (1-acoef(i,jfac)*(1-0.5*hh))
+            k1 = (1-acoef(i,jfac)*(1+0.5*hh))
+     &         / (1-acoef(i,jfac)*(1-0.5*hh))
+            diag(i,jint) = diag(i,jint) + k1*offdiagj(i,jfac)
+            auk0(i,jfac) = uk0*offdiagj(i,jfac)
+            offdiagj(i,jfac) = 0.0
+         enddo
+      endif
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine adjbdryconstoffdiags2d(
+     &  diag,
+     &  offdiag,
+     &  pifirst, pilast, pjfirst, pjlast,
+     &  acoef,
+     &  aifirst, ailast, ajfirst, ajlast,
+     &  auk0,
+     &  kifirst, kilast, kjfirst, kjlast,
+     &  lower, upper,
+     &  location, h )
+c***********************************************************************
+      implicit none
+      integer pifirst, pilast, pjfirst, pjlast
+      double precision diag(pifirst:pilast,pjfirst:pjlast)
+      double precision offdiag(0:1)
+      integer aifirst, ailast, ajfirst, ajlast
+      double precision acoef(aifirst:ailast,ajfirst:ajlast)
+      integer kifirst, kilast, kjfirst, kjlast
+      double precision auk0(kifirst:kilast,kjfirst:kjlast)
+      integer lower(0:1), upper(0:1)
+      integer location
+      double precision h(0:1), hh
+      integer igho, iint, ifac
+      integer jgho, jint, jfac
+      double precision uk0, k1
+c     Nomenclature for indices: gho=ghost, int=interior,
+c     fac=surface, beg=beginning, end=ending.
+      integer i, j
+      hh = h(location/2)
+      if ( location .eq. 0 ) then
+c        min i edge
+         igho = upper(0)
+         iint = igho + 1
+         ifac = igho + 1
+         do j=lower(1),upper(1)
+            uk0 = (hh)
+     &         / (1-acoef(ifac,j)*(1-0.5*hh))
+            k1 = (1-acoef(ifac,j)*(1+0.5*hh))
+     &         / (1-acoef(ifac,j)*(1-0.5*hh))
+            diag(iint,j) = diag(iint,j) + k1*offdiag(0)
+            auk0(ifac,j) = uk0*offdiag(0)
+         enddo
+      elseif ( location .eq. 1 ) then
+c        min i edge
+         igho = lower(0)
+         iint = igho - 1
+         ifac = igho
+         do j=lower(1),upper(1)
+            uk0 = (hh)
+     &         / (1-acoef(ifac,j)*(1-0.5*hh))
+            k1 = (1-acoef(ifac,j)*(1+0.5*hh))
+     &         / (1-acoef(ifac,j)*(1-0.5*hh))
+            diag(iint,j) = diag(iint,j) + k1*offdiag(0)
+            auk0(ifac,j) = uk0*offdiag(0)
+         enddo
+      elseif ( location .eq. 2 ) then
+c        min i edge
+         jgho = upper(1)
+         jint = jgho + 1
+         jfac = jgho + 1
+         do i=lower(0),upper(0)
+            uk0 = (hh)
+     &         / (1-acoef(i,jfac)*(1-0.5*hh))
+            k1 = (1-acoef(i,jfac)*(1+0.5*hh))
+     &         / (1-acoef(i,jfac)*(1-0.5*hh))
+            diag(i,jint) = diag(i,jint) + k1*offdiag(1)
+            auk0(i,jfac) = uk0*offdiag(1)
+         enddo
+      elseif ( location .eq. 3 ) then
+c        min i edge
+         jgho = lower(1)
+         jint = jgho - 1
+         jfac = jgho
+         do i=lower(0),upper(0)
+            uk0 = (hh)
+     &         / (1-acoef(i,jfac)*(1-0.5*hh))
+            k1 = (1-acoef(i,jfac)*(1+0.5*hh))
+     &         / (1-acoef(i,jfac)*(1-0.5*hh))
+            diag(i,jint) = diag(i,jint) + k1*offdiag(1)
+            auk0(i,jfac) = uk0*offdiag(1)
+         enddo
+      endif
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine adjustrhs2d(
+     &  rhs,
+     &  rifirst, rilast, rjfirst, rjlast,
+     &  auk0,
+     &  kifirst, kilast, kjfirst, kjlast,
+     &  gcoef,
+     &  aifirst, ailast, ajfirst, ajlast,
+     &  lower, upper,
+     &  location )
+c***********************************************************************
+      implicit none
+      integer rifirst, rilast, rjfirst, rjlast
+      double precision rhs(rifirst:rilast,rjfirst:rjlast)
+      integer kifirst, kilast, kjfirst, kjlast
+      double precision auk0(kifirst:kilast,kjfirst:kjlast)
+      integer aifirst, ailast, ajfirst, ajlast
+      double precision gcoef(aifirst:ailast,ajfirst:ajlast)
+      integer lower(0:1), upper(0:1)
+      integer location
+      integer igho, iint, ifac
+      integer jgho, jint, jfac
+c     Nomenclature for indices: cel=first-cell, gho=ghost,
+c     beg=beginning, end=ending.
+      integer i, j
+      if ( location .eq. 0 ) then
+c        min i edge
+         igho = upper(0)
+         ifac = igho + 1
+         iint = igho + 1
+         do j=lower(1),upper(1)
+            rhs(iint,j) = rhs(iint,j) - auk0(ifac,j)*gcoef(ifac,j)
+         enddo
+      elseif ( location .eq. 1 ) then
+c        max i edge
+         igho = lower(0)
+         ifac = igho
+         iint = igho - 1
+         do j=lower(1),upper(1)
+            rhs(iint,j) = rhs(iint,j) - auk0(ifac,j)*gcoef(ifac,j)
+         enddo
+      elseif ( location .eq. 2 ) then
+c        min j edge
+         jgho = upper(1)
+         jfac = jgho + 1
+         jint = jgho + 1
+         do i=lower(0),upper(0)
+            rhs(i,jint) = rhs(i,jint) - auk0(i,jfac)*gcoef(i,jfac)
+         enddo
+      elseif ( location .eq. 3 ) then
+c        max j edge
+         jgho = lower(1)
+         jfac = jgho
+         jint = jgho - 1
+         do i=lower(0),upper(0)
+            rhs(i,jint) = rhs(i,jint) - auk0(i,jfac)*gcoef(i,jfac)
+         enddo
+      endif
+      return
+      end
+c***********************************************************************
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/fortran/solv_cellpoissonhypresolver3d.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/fortran/solv_cellpoissonhypresolver3d.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,481 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/solv/fortran/solv_cellpoissonhypresolver3d.f $
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Release:     
+c  Revision:    
+c  Modified:    
+c  Description: F77 routines for scalar Poisson Hypre solver
+c
+c
+c***********************************************************************
+c***********************************************************************
+      subroutine compdiagvariablec3d(
+     &  diag, c,
+     &  offdiagi, offdiagj, offdiagk,
+     &  ifirst, ilast, jfirst, jlast, kfirst, klast,
+     &  cscale, dscale )
+c***********************************************************************
+      implicit none
+      integer ifirst, ilast, jfirst, jlast, kfirst, klast
+      double precision diag(ifirst:ilast,jfirst:jlast,kfirst:klast)
+      double precision c(ifirst:ilast,jfirst:jlast,kfirst:klast)
+      double precision 
+     &  offdiagi(ifirst:ilast+1,jfirst:jlast,kfirst:klast),
+     &  offdiagj(ifirst:ilast,jfirst:jlast+1,kfirst:klast),
+     &  offdiagk(ifirst:ilast,jfirst:jlast,kfirst:klast+1)
+      double precision cscale, dscale
+      integer i, j, k
+c     Assume g value of zero
+      do k=kfirst,klast
+         do j=jfirst,jlast
+            do i=ifirst,ilast
+               diag(i,j,k) = cscale*c(i,j,k) - 
+     &              ( offdiagi(i,j,k) + offdiagi(i+1,j,k) +
+     &                offdiagj(i,j,k) + offdiagj(i,j+1,k) +
+     &                offdiagk(i,j,k) + offdiagk(i,j,k+1) )
+            enddo
+         enddo
+      enddo
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine compdiagscalarc3d(
+     &  diag, c,
+     &  offdiagi, offdiagj, offdiagk,
+     &  ifirst, ilast, jfirst, jlast, kfirst, klast,
+     &  cscale, dscale )
+c***********************************************************************
+      implicit none
+      integer ifirst, ilast, jfirst, jlast, kfirst, klast
+      double precision diag(ifirst:ilast,jfirst:jlast,kfirst:klast)
+      double precision c
+      double precision 
+     &  offdiagi(ifirst:ilast+1,jfirst:jlast,kfirst:klast),
+     &  offdiagj(ifirst:ilast,jfirst:jlast+1,kfirst:klast),
+     &  offdiagk(ifirst:ilast,jfirst:jlast,kfirst:klast+1)
+      double precision cscale, dscale
+      integer i, j, k
+c     Assume g value of zero
+      do k=kfirst,klast
+         do j=jfirst,jlast
+            do i=ifirst,ilast
+               diag(i,j,k) = cscale*c - 
+     &              ( offdiagi(i,j,k) + offdiagi(i+1,j,k) +
+     &                offdiagj(i,j,k) + offdiagj(i,j+1,k) +
+     &                offdiagk(i,j,k) + offdiagk(i,j,k+1) )
+            enddo
+         enddo
+      enddo
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine compdiagzeroc3d(
+     &  diag,
+     &  offdiagi, offdiagj, offdiagk,
+     &  ifirst, ilast, jfirst, jlast, kfirst, klast,
+     &  cscale, dscale )
+c***********************************************************************
+      implicit none
+      integer ifirst, ilast, jfirst, jlast, kfirst, klast
+      double precision diag(ifirst:ilast,jfirst:jlast,kfirst:klast)
+      double precision 
+     &  offdiagi(ifirst:ilast+1,jfirst:jlast,kfirst:klast),
+     &  offdiagj(ifirst:ilast,jfirst:jlast+1,kfirst:klast),
+     &  offdiagk(ifirst:ilast,jfirst:jlast,kfirst:klast+1)
+      double precision cscale, dscale
+      integer i, j, k
+c     Assume g value of zero
+      do k=kfirst,klast
+         do j=jfirst,jlast
+            do i=ifirst,ilast
+               diag(i,j,k) = - ( offdiagi(i,j,k) + offdiagi(i+1,j,k) +
+     &                           offdiagj(i,j,k) + offdiagj(i,j+1,k) +
+     &                           offdiagk(i,j,k) + offdiagk(i,j,k+1) )
+            enddo
+         enddo
+      enddo
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine adjbdry3d(
+     &  diag,
+     &  offdiagi, offdiagj, offdiagk,
+     &  pifirst, pilast, pjfirst, pjlast, pkfirst, pklast,
+     &  acoef,
+     &  bcoef,
+     &  aifirst, ailast, ajfirst, ajlast, akfirst, aklast,
+     &  auk0,
+     &  kifirst, kilast, kjfirst, kjlast, kkfirst, kklast,
+     &  lower, upper,
+     &  location, h )
+c***********************************************************************
+      implicit none
+      integer pifirst, pilast, pjfirst, pjlast, pkfirst, pklast
+      double precision 
+     &  diag(pifirst:pilast,pjfirst:pjlast,pkfirst:pklast)
+      double precision
+     &  offdiagi(pifirst:pilast+1,pjfirst:pjlast,pkfirst:pklast),
+     &  offdiagj(pifirst:pilast,pjfirst:pjlast+1,pkfirst:pklast),
+     &  offdiagk(pifirst:pilast,pjfirst:pjlast,pkfirst:pklast+1)
+      integer aifirst, ailast, ajfirst, ajlast, akfirst, aklast
+      double precision 
+     &  acoef(aifirst:ailast,ajfirst:ajlast,akfirst:aklast)
+      double precision 
+     &  bcoef(aifirst:ailast,ajfirst:ajlast,akfirst:aklast)
+      integer kifirst, kilast, kjfirst, kjlast, kkfirst, kklast
+      double precision
+     &  auk0(kifirst:kilast,kjfirst:kjlast,kkfirst:kklast)
+      integer lower(0:2), upper(0:2)
+      integer location
+      double precision h(0:2), hh
+      integer igho, iint, ifac
+      integer jgho, jint, jfac
+      integer kgho, kint, kfac
+      double precision uk0, k1
+c     Nomenclature for indices: gho=ghost, int=interior,
+c     fac=surface, beg=beginning, end=ending.
+      integer i, j, k
+      hh = h(location/2)
+      if ( location .eq. 0 ) then
+c     min i side
+         igho = upper(0)
+         ifac = igho + 1
+         iint = igho + 1
+         do k=lower(2),upper(2)
+            do j=lower(1),upper(1)
+               uk0 = (hh)
+     &            / (1-acoef(ifac,j,k)*(1-0.5*hh))
+               k1 = (1-acoef(ifac,j,k)*(1+0.5*hh))
+     &            / (1-acoef(ifac,j,k)*(1-0.5*hh))
+               diag(iint,j,k) = diag(iint,j,k)
+     &                              + k1*offdiagi(ifac,j,k)
+               auk0(ifac,j,k) = uk0*offdiagi(ifac,j,k)
+               offdiagi(ifac,j,k) = 0.0
+            enddo
+         enddo
+      elseif ( location .eq. 1 ) then
+c     max i side
+         igho = lower(0)
+         ifac = igho
+         iint = igho - 1
+         do k=lower(2),upper(2)
+            do j=lower(1),upper(1)
+               uk0 = (hh)
+     &            / (1-acoef(ifac,j,k)*(1-0.5*hh))
+               k1 = (1-acoef(ifac,j,k)*(1+0.5*hh))
+     &            / (1-acoef(ifac,j,k)*(1-0.5*hh))
+               diag(iint,j,k) = diag(iint,j,k)
+     &                              + k1*offdiagi(ifac,j,k)
+               auk0(ifac,j,k) = uk0*offdiagi(ifac,j,k)
+               offdiagi(ifac,j,k) = 0.0
+            enddo
+         enddo
+      elseif ( location .eq. 2 ) then
+c     min j side
+         jgho = upper(1)
+         jfac = jgho + 1
+         jint = jgho + 1
+         do k=lower(2),upper(2)
+            do i=lower(0),upper(0)
+               uk0 = (hh)
+     &            / (1-acoef(i,jfac,k)*(1-0.5*hh))
+               k1 = (1-acoef(i,jfac,k)*(1+0.5*hh))
+     &            / (1-acoef(i,jfac,k)*(1-0.5*hh))
+               diag(i,jint,k) = diag(i,jint,k)
+     &                              + k1*offdiagj(i,jfac,k)
+               auk0(i,jfac,k) = uk0*offdiagj(i,jfac,k)
+               offdiagj(i,jfac,k) = 0.0
+            enddo
+         enddo
+      elseif ( location .eq. 3 ) then
+c     max j side
+         jgho = lower(1)
+         jfac = jgho
+         jint = jgho - 1
+         do k=lower(2),upper(2)
+            do i=lower(0),upper(0)
+               uk0 = (hh)
+     &            / (1-acoef(i,jfac,k)*(1-0.5*hh))
+               k1 = (1-acoef(i,jfac,k)*(1+0.5*hh))
+     &            / (1-acoef(i,jfac,k)*(1-0.5*hh))
+               diag(i,jint,k) = diag(i,jint,k)
+     &                              + k1*offdiagj(i,jfac,k)
+               auk0(i,jfac,k) = uk0*offdiagj(i,jfac,k)
+               offdiagj(i,jfac,k) = 0.0
+            enddo
+         enddo
+      elseif ( location .eq. 4 ) then
+c     min k side
+         kgho = upper(2)
+         kfac = kgho + 1
+         kint = kgho + 1
+         do j=lower(1),upper(1)
+            do i=lower(0),upper(0)
+               uk0 = (hh)
+     &            / (1-acoef(i,j,kfac)*(1-0.5*hh))
+               k1 = (1-acoef(i,j,kfac)*(1+0.5*hh))
+     &            / (1-acoef(i,j,kfac)*(1-0.5*hh))
+               diag(i,j,kint) = diag(i,j,kint)
+     &                              + k1*offdiagk(i,j,kfac)
+               auk0(i,j,kfac) = uk0*offdiagk(i,j,kfac)
+               offdiagk(i,j,kfac) = 0.0
+            enddo
+         enddo
+      elseif ( location .eq. 5 ) then
+c     max k side
+         kgho = lower(2)
+         kfac = kgho
+         kint = kgho - 1
+         do j=lower(1),upper(1)
+            do i=lower(0),upper(0)
+               uk0 = (hh)
+     &            / (1-acoef(i,j,kfac)*(1-0.5*hh))
+               k1 = (1-acoef(i,j,kfac)*(1+0.5*hh))
+     &            / (1-acoef(i,j,kfac)*(1-0.5*hh))
+               diag(i,j,kint) = diag(i,j,kint)
+     &                              + k1*offdiagk(i,j,kfac)
+               auk0(i,j,kfac) = uk0*offdiagk(i,j,kfac)
+               offdiagk(i,j,kfac) = 0.0
+            enddo
+         enddo
+      endif
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine adjbdryconstoffdiags3d(
+     &  diag,
+     &  offdiag,
+     &  pifirst, pilast, pjfirst, pjlast, pkfirst, pklast,
+     &  acoef,
+     &  aifirst, ailast, ajfirst, ajlast, akfirst, aklast,
+     &  auk0,
+     &  kifirst, kilast, kjfirst, kjlast, kkfirst, kklast,
+     &  lower, upper,
+     &  location, h )
+c***********************************************************************
+      implicit none
+      integer pifirst, pilast, pjfirst, pjlast, pkfirst, pklast
+      double precision 
+     &  diag(pifirst:pilast,pjfirst:pjlast,pkfirst:pklast)
+      double precision
+     &  offdiag(0:2)
+      integer aifirst, ailast, ajfirst, ajlast, akfirst, aklast
+      double precision 
+     &  acoef(aifirst:ailast,ajfirst:ajlast,akfirst:aklast)
+      integer kifirst, kilast, kjfirst, kjlast, kkfirst, kklast
+      double precision
+     &  auk0(kifirst:kilast,kjfirst:kjlast,kkfirst:kklast)
+      integer lower(0:2), upper(0:2)
+      integer location
+      double precision h(0:2), hh
+      integer igho, iint, ifac
+      integer jgho, jint, jfac
+      integer kgho, kint, kfac
+      double precision uk0, k1
+c     Nomenclature for indices: gho=ghost, int=interior,
+c     fac=surface, beg=beginning, end=ending.
+      integer i, j, k
+      hh = h(location/2)
+      if ( location .eq. 0 ) then
+c     min i side
+         igho = upper(0)
+         ifac = igho + 1
+         iint = igho + 1
+         do k=lower(2),upper(2)
+            do j=lower(1),upper(1)
+               uk0 = (hh)
+     &            / (1-acoef(ifac,j,k)*(1-0.5*hh))
+               k1 = (1-acoef(ifac,j,k)*(1+0.5*hh))
+     &            / (1-acoef(ifac,j,k)*(1-0.5*hh))
+               diag(iint,j,k) = diag(iint,j,k)
+     &                              + k1*offdiag(0)
+               auk0(ifac,j,k) = uk0*offdiag(0)
+            enddo
+         enddo
+      elseif ( location .eq. 1 ) then
+c     max i side
+         igho = lower(0)
+         ifac = igho
+         iint = igho - 1
+         do k=lower(2),upper(2)
+            do j=lower(1),upper(1)
+               uk0 = (hh)
+     &            / (1-acoef(ifac,j,k)*(1-0.5*hh))
+               k1 = (1-acoef(ifac,j,k)*(1+0.5*hh))
+     &            / (1-acoef(ifac,j,k)*(1-0.5*hh))
+               diag(iint,j,k) = diag(iint,j,k)
+     &                              + k1*offdiag(0)
+               auk0(ifac,j,k) = uk0*offdiag(0)
+            enddo
+         enddo
+      elseif ( location .eq. 2 ) then
+c     min j side
+         jgho = upper(1)
+         jfac = jgho + 1
+         jint = jgho + 1
+         do k=lower(2),upper(2)
+            do i=lower(0),upper(0)
+               uk0 = (hh)
+     &            / (1-acoef(i,jfac,k)*(1-0.5*hh))
+               k1 = (1-acoef(i,jfac,k)*(1+0.5*hh))
+     &            / (1-acoef(i,jfac,k)*(1-0.5*hh))
+               diag(i,jint,k) = diag(i,jint,k)
+     &                              + k1*offdiag(1)
+               auk0(i,jfac,k) = uk0*offdiag(1)
+            enddo
+         enddo
+      elseif ( location .eq. 3 ) then
+c     max j side
+         jgho = lower(1)
+         jfac = jgho
+         jint = jgho - 1
+         do k=lower(2),upper(2)
+            do i=lower(0),upper(0)
+               uk0 = (hh)
+     &            / (1-acoef(i,jfac,k)*(1-0.5*hh))
+               k1 = (1-acoef(i,jfac,k)*(1+0.5*hh))
+     &            / (1-acoef(i,jfac,k)*(1-0.5*hh))
+               diag(i,jint,k) = diag(i,jint,k)
+     &                              + k1*offdiag(1)
+               auk0(i,jfac,k) = uk0*offdiag(1)
+            enddo
+         enddo
+      elseif ( location .eq. 4 ) then
+c     min k side
+         kgho = upper(2)
+         kfac = kgho + 1
+         kint = kgho + 1
+         do j=lower(1),upper(1)
+            do i=lower(0),upper(0)
+               uk0 = (hh)
+     &            / (1-acoef(i,j,kfac)*(1-0.5*hh))
+               k1 = (1-acoef(i,j,kfac)*(1+0.5*hh))
+     &            / (1-acoef(i,j,kfac)*(1-0.5*hh))
+               diag(i,j,kint) = diag(i,j,kint)
+     &                              + k1*offdiag(2)
+               auk0(i,j,kfac) = uk0*offdiag(2)
+            enddo
+         enddo
+      elseif ( location .eq. 5 ) then
+c     max k side
+         kgho = lower(2)
+         kfac = kgho
+         kint = kgho - 1
+         do j=lower(1),upper(1)
+            do i=lower(0),upper(0)
+               uk0 = (hh)
+     &            / (1-acoef(i,j,kfac)*(1-0.5*hh))
+               k1 = (1-acoef(i,j,kfac)*(1+0.5*hh))
+     &            / (1-acoef(i,j,kfac)*(1-0.5*hh))
+               diag(i,j,kint) = diag(i,j,kint)
+     &                              + k1*offdiag(2)
+               auk0(i,j,kfac) = uk0*offdiag(2)
+            enddo
+         enddo
+      endif
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine adjustrhs3d(
+     &  rhs,
+     &  rifirst, rilast, rjfirst, rjlast, rkfirst, rklast,
+     &  auk0,
+     &  kifirst, kilast, kjfirst, kjlast, kkfirst, kklast,
+     &  gcoef,
+     &  aifirst, ailast, ajfirst, ajlast, akfirst, aklast,
+     &  lower, upper,
+     &  location )
+c***********************************************************************
+      implicit none
+      integer rifirst, rilast, rjfirst, rjlast, rkfirst, rklast
+      double precision rhs(rifirst:rilast,rjfirst:rjlast,rkfirst:rklast)
+      integer kifirst, kilast, kjfirst, kjlast, kkfirst, kklast
+      double precision
+     & auk0(kifirst:kilast,kjfirst:kjlast,kkfirst:kklast)
+      integer aifirst, ailast, ajfirst, ajlast, akfirst, aklast
+      double precision
+     & gcoef(aifirst:ailast,ajfirst:ajlast,akfirst:aklast)
+      integer lower(0:2), upper(0:2)
+      integer location
+      integer igho, icel, ifac
+      integer jgho, jcel, jfac
+      integer kgho, kcel, kfac
+c     Nomenclature for indices: cel=first-cell, gho=ghost,
+c     beg=beginning, end=ending.
+      integer i, j, k
+      if ( location .eq. 0 ) then
+c     min i side
+         igho = upper(0)
+         ifac = igho + 1
+         icel = igho + 1
+         do j=lower(1),upper(1)
+            do k=lower(2),upper(2)
+               rhs(icel,j,k) = rhs(icel,j,k)
+     &                       - auk0(ifac,j,k)*gcoef(ifac,j,k)
+            enddo
+         enddo
+      elseif ( location .eq. 1 ) then
+c     max i side
+         igho = lower(0)
+         ifac = igho
+         icel = igho - 1
+         do j=lower(1),upper(1)
+            do k=lower(2),upper(2)
+               rhs(icel,j,k) = rhs(icel,j,k)
+     &                       - auk0(ifac,j,k)*gcoef(ifac,j,k)
+            enddo
+         enddo
+      elseif ( location .eq. 2 ) then
+c     min j side
+         jgho = upper(1)
+         jfac = jgho + 1
+         jcel = jgho + 1
+         do k=lower(2),upper(2)
+            do i=lower(0),upper(0)
+               rhs(i,jcel,k) = rhs(i,jcel,k)
+     &                       - auk0(i,jfac,k)*gcoef(i,jfac,k)
+            enddo
+         enddo
+      elseif ( location .eq. 3 ) then
+c     max j side
+         jgho = lower(1)
+         jfac = jgho
+         jcel = jgho - 1
+         do k=lower(2),upper(2)
+            do i=lower(0),upper(0)
+               rhs(i,jcel,k) = rhs(i,jcel,k)
+     &                       - auk0(i,jfac,k)*gcoef(i,jfac,k)
+            enddo
+         enddo
+      elseif ( location .eq. 4 ) then
+c     min k side
+         kgho = upper(2)
+         kfac = kgho + 1
+         kcel = kgho + 1
+         do j=lower(1),upper(1)
+            do i=lower(0),upper(0)
+               rhs(i,j,kcel) = rhs(i,j,kcel)
+     &                       - auk0(i,j,kfac)*gcoef(i,j,kfac)
+            enddo
+         enddo
+      elseif ( location .eq. 5 ) then
+c     max k side
+         kgho = lower(2)
+         kfac = kgho
+         kcel = kgho - 1
+         do j=lower(1),upper(1)
+            do i=lower(0),upper(0)
+               rhs(i,j,kcel) = rhs(i,j,kcel)
+     &                       - auk0(i,j,kfac)*gcoef(i,j,kfac)
+            enddo
+         enddo
+      endif
+      return
+      end
+c***********************************************************************
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/nvector.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/nvector.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,18 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   header file included by CVODE source files 
+ *
+ ************************************************************************/
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
+#include "SAMRAI/solv/solv_NVector.h"
+
+#ifdef  __cplusplus
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/solv_NVector.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/solv_NVector.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,33 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to C++ vector implementation for Sundials package. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifdef HAVE_SUNDIALS
+
+#include "SAMRAI/solv/solv_NVector.h"
+#include "SAMRAI/solv/SundialsAbstractVector.h"
+
+#define SABSVEC_CAST(v) \
+   (static_cast<SAMRAI::solv::SundialsAbstractVector *>(v \
+                                                        -> \
+                                                        content))
+
+extern "C" {
+
+void N_VPrint_SAMRAI(
+   N_Vector v) {
+   SABSVEC_CAST(v)->printVector();
+}
+
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/solv/solv_NVector.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/solv/solv_NVector.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,32 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   C interface to C++ vector implementation for Sundials package. 
+ *
+ ************************************************************************/
+#ifndef included_NVector_SAMRAI
+#define included_NVector_SAMRAI
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#ifdef HAVE_SUNDIALS
+
+#include "sundials/sundials_nvector.h"
+
+extern "C" {
+
+/**
+ * @brief Helper funtion for printing SAMRAI N_Vector.
+ *
+ */
+void
+N_VPrint_SAMRAI(
+   N_Vector v);
+
+}
+
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Array.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Array.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,204 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A simple array template class 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_Array_C
+#define included_tbox_Array_C
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <new>
+#include <cstdlib>
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/tbox/Array.I"
+#endif
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+template<class TYPE>
+const typename SAMRAI::tbox::Array<TYPE>::DoNotInitialize SAMRAI::tbox::Array<
+   TYPE>::UNINITIALIZED;
+
+/*
+ * Note that this class is specialized for the built-in types to avoid
+ * invoking the default ctor for TYPE.   A simple assignment is
+ * used for the built-in types.
+ */
+template<class TYPE>
+Array<TYPE>::Array(
+   const int n,
+   const TYPE& default_value)
+{
+   if (n > 0) {
+
+      d_objects = reinterpret_cast<TYPE *>(malloc(sizeof(TYPE) * n));
+      d_counter = new ReferenceCounter;
+      d_elements = n;
+
+      for (int i = 0; i < d_elements; i++) {
+         void* p = &d_objects[i];
+         (void)new (p)TYPE(default_value);
+      }
+   } else {
+      d_objects = (TYPE *)NULL;
+      d_counter = (ReferenceCounter *)NULL;
+      d_elements = 0;
+   }
+}
+
+template<class TYPE>
+Array<TYPE>::Array(
+   const int n,
+   const typename Array::DoNotInitialize& do_not_initialize_flag)
+{
+   (void)do_not_initialize_flag;
+
+   if (n > 0) {
+      d_objects = reinterpret_cast<TYPE *>(malloc(sizeof(TYPE) * n));
+      d_counter = new ReferenceCounter;
+      d_elements = n;
+   } else {
+      d_objects = (TYPE *)NULL;
+      d_counter = (ReferenceCounter *)NULL;
+      d_elements = 0;
+   }
+}
+
+template<class TYPE>
+Array<TYPE>&Array<TYPE>::operator = (
+   const Array<TYPE>& rhs)
+{
+   if (this != &rhs) {
+      if (d_counter && d_counter->deleteReference()) deleteObjects();
+      d_objects = rhs.d_objects;
+      d_counter = rhs.d_counter;
+      d_elements = rhs.d_elements;
+      if (d_counter) d_counter->addReference();
+   }
+   return *this;
+}
+
+template<class TYPE>
+void Array<TYPE>::resizeArray(
+   const int n,
+   const TYPE& default_value)
+{
+   if (n != d_elements) {
+      Array<TYPE> array(n, default_value);
+      const int s = (d_elements < n ? d_elements : n);
+      for (int i = 0; i < s; i++) {
+         array.d_objects[i] = d_objects[i];
+      }
+
+      this->
+      operator = (
+         array);
+   }
+}
+
+template<class TYPE>
+void Array<TYPE>::push_back(
+   const TYPE& value)
+{
+   int i = d_elements;
+   resizeArray(i + 1);
+   d_objects[i] = value;
+}
+
+template<class TYPE>
+const TYPE& Array<TYPE>::back()
+{
+   TBOX_ASSERT(d_elements > 0);
+
+   return d_objects[d_elements - 1];
+}
+
+template<class TYPE>
+void Array<TYPE>::erase(
+   const int position)
+{
+   TBOX_ASSERT(position >= 0 && position < d_elements);
+
+   if (d_elements > 1) {
+
+      int new_d_elements(d_elements - 1);
+
+      TYPE* new_d_objects = reinterpret_cast<TYPE *>(
+            malloc(sizeof(TYPE) * new_d_elements));
+
+      /* copy lower part of array */
+      for (int j = 0; j < position; j++) {
+         void* p = &new_d_objects[j];
+         (void)new (p)TYPE(d_objects[j]);
+      }
+
+      /* copy upper part of array */
+      for (int j = position + 1; j < d_elements; j++) {
+         void* p = &new_d_objects[j - 1];
+         (void)new (p)TYPE(d_objects[j]);
+      }
+
+      if (d_counter && d_counter->deleteReference()) {
+         deleteObjects();
+      }
+
+      d_objects = new_d_objects;
+      d_counter = new ReferenceCounter;
+      d_elements = new_d_elements;
+
+   } else {
+      if (d_counter && d_counter->deleteReference()) {
+         deleteObjects();
+      }
+      d_objects = (TYPE *)NULL;
+      d_counter = (ReferenceCounter *)NULL;
+      d_elements = 0;
+   }
+
+}
+
+template<class TYPE>
+void Array<TYPE>::deleteObjects()
+{
+   if (d_objects) {
+      for (int i = 0; i < d_elements; i++) {
+         d_objects[i].~TYPE();
+      }
+      free(reinterpret_cast<char *>(d_objects));
+      delete d_counter;
+   }
+
+   d_objects = (TYPE *)NULL;
+   d_counter = (ReferenceCounter *)NULL;
+   d_elements = 0;
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Unsuppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Array.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Array.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,142 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A simple array template class 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+Array<TYPE>::Array()
+{
+   d_objects = (TYPE *)NULL;
+   d_counter = (ReferenceCounter *)NULL;
+   d_elements = 0;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+Array<TYPE>::Array(
+   const Array<TYPE>& rhs)
+{
+   d_objects = rhs.d_objects;
+   d_counter = rhs.d_counter;
+   d_elements = rhs.d_elements;
+   if (d_counter) d_counter->addReference();
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+Array<TYPE>::~Array()
+{
+   if (d_counter && d_counter->deleteReference()) deleteObjects();
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE & Array<TYPE>::operator [] (
+   const int i)
+{
+   TBOX_ASSERT((i >= 0) && (i < d_elements));
+
+   return d_objects[i];
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE &Array<TYPE>::operator [] (
+   const int i) const
+{
+   TBOX_ASSERT((i >= 0) && (i < d_elements));
+
+   return d_objects[i];
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void Array<TYPE>::setNull()
+{
+   if (d_counter && d_counter->deleteReference()) deleteObjects();
+   d_objects = (TYPE *)NULL;
+   d_counter = (ReferenceCounter *)NULL;
+   d_elements = 0;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void Array<TYPE>::clear()
+{
+   if (d_counter && d_counter->deleteReference()) deleteObjects();
+   d_objects = (TYPE *)NULL;
+   d_counter = (ReferenceCounter *)NULL;
+   d_elements = 0;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+bool Array<TYPE>::isNull() const
+{
+   return !d_objects;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+bool Array<TYPE>::empty() const
+{
+   return !d_objects;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE * Array<TYPE>::getPointer(
+   const int i)
+{
+   TBOX_ASSERT((i >= 0) && (i < d_elements));
+
+   return &d_objects[i];
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE * Array<TYPE>::getPointer(
+   const int i) const
+{
+   TBOX_ASSERT((i >= 0) && (i < d_elements));
+
+   return &d_objects[i];
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int Array<TYPE>::getSize() const
+{
+   return d_elements;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int Array<TYPE>::size() const
+{
+   return d_elements;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+size_t Array<TYPE>::align(
+   const size_t bytes)
+{
+   size_t aligned = bytes + ALLOCATION_ALIGNMENT - 1;
+   aligned -= aligned % ALLOCATION_ALIGNMENT;
+   return aligned;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Array.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Array.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,337 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A simple array template class 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_Array
+#define included_tbox_Array
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/ReferenceCounter.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+template<class TYPE>
+class Pointer;
+
+/**
+ * Class Array<TYPE> defines a smart pointer to an array of TYPE and
+ * manages all reference counting and deallocation of the array (even
+ * if the data was originally allocated from an arena).  When the
+ * reference count on a Array<TYPE> object goes to zero, the array
+ * objects are automatically deallocated.  The array class frees the
+ * user from deleting and tracking aliases for object arrays.
+ *
+ * A block with references count and arena pointer is allocated for
+ * all non-empty arrays.  These reference counted blocks are freed at
+ * the end of the lifetime of the array.
+ *
+ * Class TYPE must define a copy constructor and an assignment
+ * operator.
+ *
+ * @see tbox::ReferenceCounter
+ * @see tbox::Pointer
+ */
+
+template<class TYPE>
+class Array
+{
+public:
+   /*
+    * This is a class used as a flag to ensure a different constructor
+    * type signature for the uninitialized Array constructor.  Only
+    * the Array::UNINITIALIZED value is every expected to be of this
+    * type.
+    */
+   class DoNotInitialize
+   {
+public:
+      DoNotInitialize() {
+      }
+   };
+
+   /*
+    * The flag value for use in the Array uninitialized constructor.
+    */
+   static const typename SAMRAI::tbox::Array<TYPE>::DoNotInitialize
+   UNINITIALIZED;
+
+   /**
+    * Create an array of zero elements.
+    */
+   Array();
+
+   /**
+    * Create an array of ``n'' elements.
+    *
+    * Elements will be initialized with "n" copies of default_value.
+    * If not default_value is supplied the default_constructor is
+    * invoked to create a default value.
+    *
+    */
+   explicit Array(
+      const int n,
+      const TYPE& default_value = TYPE());
+
+   /**
+    * Create an array of ``n'' uninitialized elements.
+    *
+    * The tbox::Array::UNINITIALIZED value should be used for the
+    * second argument to flag that the array is uninitialized.
+    *
+    * CAUTION: Invoking this constructor will potentially result in a
+    * core dump as the element objects will not be initialized (the
+    * default constructor is not invoked).  If TYPE is a builtin type
+    * the arrays values should be assigned before use.  If TYPE is a
+    * class, use the new placement operator on each array element
+    * location to invoke a constructor.  This is shown in the
+    * following example:
+    *
+    * \Example
+    * \code
+    * for(int i = 0; i < d_elements; i++) {
+    *	    void *p = &d_objects[i];
+    *	    (void) new (p) TYPE(arg1, arg2);
+    *	 }
+    *
+    * \endcode
+    *
+    * This constructor may be used to optimize the construction of
+    * Arrays when the elements are known to be assigned to some value
+    * after construction and thus does not need to be initialized.  A
+    * loop over the array elements doing an assiggment to the
+    * default_value is avoided.
+    *
+    */
+
+   explicit Array(
+      const int n,
+      const typename Array::DoNotInitialize& do_not_initialize_flag);
+
+   /**
+    * Const constructor for the array.  This creates an alias to the
+    * right hand side and increments the reference count.
+    *
+    * CAUTION: invoking resizeArray() forces a deep copy.
+    * Upon return, two objects that formerly were aliases to the
+    * same underlying data will point to separate data.  For this
+    * reason, it is best to pass a Array by reference, instead
+    * of by value.
+    */
+   Array(
+      const Array<TYPE>& rhs);
+
+   /**
+    * Destructor for the array.  If the reference count for the array data
+    * has gone to zero, then the array data is deallocated from the memory
+    * arena from which it was allocated.
+    */
+   ~Array();
+
+   /**
+    * Array assignment.  The assignment operator copies a pointer to the
+    * array data and increments the reference count.  Both array objects refer
+    * to the same data, and changes to individual array entry values in one will
+    * be reflected in the other array.  However, this assignment operation DOES NOT
+    * involve a "deep copy" (see the resizeArray() routines below). Thus, changes
+    * to one Array object container will not necessarily be reflected in the
+    * other container.
+    */
+   Array<TYPE>&
+   operator = (
+      const Array<TYPE>& rhs);
+
+   /**
+    * Non-const array subscripting.  Return a reference the object at array
+    * index ``i'' (between 0 and N-1, where N is the number of elements in
+    * the array.
+    */
+   TYPE&
+   operator [] (
+      const int i);
+
+   /**
+    * Const array subscripting.  Return a const reference to the object
+    * at array index ``i'' (between 0 and N-1, where N is the number of
+    * elements in the array.
+    */
+   const TYPE&
+   operator [] (
+      const int i) const;
+
+   /**
+    * Test whether the array is NULL (has any elements).
+    */
+   bool
+   isNull() const;
+
+   /**
+    * Test whether the array is empty (has no elements).
+    *
+    * Identical to isNull() but this method is common to several
+    * container classes, including STL classes.
+    */
+   bool
+   empty() const;
+
+   /**
+    * Set the length of the array to zero.  If the reference count for
+    * the objects has dropped to zero, then the array data is deallocated.
+    */
+   void
+   setNull();
+
+   /**
+    * Set the length of the array to zero.  If the reference count for
+    * the objects has dropped to zero, then the array data is deallocated.
+    *
+    * Identical to setNull() but  this method is common to several
+    * container classes, including STL classes.
+    */
+   void
+   clear();
+
+   /**
+    * Return a non-const pointer to the i-th object.  The index must be
+    * between 0 and N-1, where N is the number of elements in the array.
+    */
+   TYPE *
+   getPointer(
+      const int i = 0);
+
+   /**
+    * Return a const pointer to the i-th object.  The index must be
+    * between 0 and N-1, where N is the number of elements in the array.
+    */
+   const TYPE *
+   getPointer(
+      const int i = 0) const;
+
+   /**
+    * Return the number of elements in the array.
+    */
+   int
+   getSize() const;
+
+   /**
+    * Return the number of elements in the array.  Identical to getSize(),
+    * but this method is common to several container classes.
+    */
+   int
+   size() const;
+
+   /**
+    * Resize the array by allocating new array storage and copying from the
+    * old array into the new; i.e., a "deep" copy.  Space for the new array
+    * is allocated via the standard ``new'' operator.
+    *
+    * Elements added be initialized with copies of "default" using the
+    * copy constructor for classes and assignment for internal types.
+    */
+   void
+   resizeArray(
+      const int n,
+      const TYPE& default_value = TYPE());
+
+   /**
+    *
+    * Adds a new element at the end of the array, after its current
+    * last element. The content of this new element is initialized to
+    * a copy of value.
+    *
+    */
+   void
+   push_back(
+      const TYPE& value);
+
+   /**
+    *
+    * Returns a reference to the last element in the array container.
+    *
+    */
+   const TYPE&
+   back();
+
+   /**
+    *
+    * Removes from the array container a single element at position.
+    *
+    */
+   void
+   erase(
+      const int position);
+
+private:
+   size_t
+   align(
+      const size_t bytes);
+
+   static const size_t ALLOCATION_ALIGNMENT = 16;
+
+   void
+   deleteObjects();
+
+   TYPE* d_objects;
+   ReferenceCounter* d_counter;
+   int d_elements;
+};
+
+template<>
+Array<bool>::Array(
+   const int n,
+   const bool& default_value);
+template<>
+Array<char>::Array(
+   const int n,
+   const char& default_value);
+template<>
+Array<int>::Array(
+   const int n,
+   const int& default_value);
+template<>
+Array<float>::Array(
+   const int n,
+   const float& default_value);
+template<>
+Array<double>::Array(
+   const int n,
+   const double& default_value);
+
+template<>
+void
+Array<bool>::deleteObjects();
+template<>
+void
+Array<char>::deleteObjects();
+template<>
+void
+Array<int>::deleteObjects();
+template<>
+void
+Array<float>::deleteObjects();
+template<>
+void
+Array<double>::deleteObjects();
+
+}
+}
+
+/*
+ * Default assume Array is not a standard type
+ */
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/tbox/Array.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/tbox/Array.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/ArraySpecial.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/ArraySpecial.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,205 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Array specializations 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Array.h"
+
+#include <new>
+#include <cstdlib>
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+template<>
+Array<bool>::Array(
+   const int n,
+   const bool& default_value)
+{
+   if (n > 0) {
+      d_objects = reinterpret_cast<bool *>(malloc(sizeof(bool) * n));
+      d_counter = new ReferenceCounter;
+      d_elements = n;
+
+      for (int i = 0; i < d_elements; i++) {
+         d_objects[i] = default_value;
+      }
+
+   } else {
+      d_objects = (bool *)NULL;
+      d_counter = (ReferenceCounter *)NULL;
+      d_elements = 0;
+   }
+}
+
+template<>
+Array<char>::Array(
+   const int n,
+   const char& default_value)
+{
+   if (n > 0) {
+      d_objects = reinterpret_cast<char *>(malloc(sizeof(char) * n));
+      d_counter = new ReferenceCounter;
+      d_elements = n;
+
+      for (int i = 0; i < d_elements; i++) {
+         d_objects[i] = default_value;
+      }
+
+   } else {
+      d_objects = (char *)NULL;
+      d_counter = (ReferenceCounter *)NULL;
+      d_elements = 0;
+   }
+}
+
+template<>
+Array<int>::Array(
+   const int n,
+   const int& default_value)
+{
+   if (n > 0) {
+      d_objects = reinterpret_cast<int *>(malloc(sizeof(int) * n));
+      d_counter = new ReferenceCounter;
+      d_elements = n;
+
+      for (int i = 0; i < d_elements; i++) {
+         d_objects[i] = default_value;
+      }
+
+   } else {
+      d_objects = (int *)NULL;
+      d_counter = (ReferenceCounter *)NULL;
+      d_elements = 0;
+   }
+}
+
+template<>
+Array<float>::Array(
+   const int n,
+   const float& default_value)
+{
+   if (n > 0) {
+      d_objects = reinterpret_cast<float *>(malloc(sizeof(float) * n));
+      d_counter = new ReferenceCounter;
+      d_elements = n;
+
+      for (int i = 0; i < d_elements; i++) {
+         d_objects[i] = default_value;
+      }
+
+   } else {
+      d_objects = (float *)NULL;
+      d_counter = (ReferenceCounter *)NULL;
+      d_elements = 0;
+   }
+}
+
+template<>
+Array<double>::Array(
+   const int n,
+   const double& default_value)
+{
+   if (n > 0) {
+      d_objects = reinterpret_cast<double *>(malloc(sizeof(double) * n));
+      d_counter = new ReferenceCounter;
+      d_elements = n;
+
+      for (int i = 0; i < d_elements; i++) {
+         d_objects[i] = default_value;
+      }
+
+   } else {
+      d_objects = (double *)NULL;
+      d_counter = (ReferenceCounter *)NULL;
+      d_elements = 0;
+   }
+}
+
+template<>
+void Array<bool>::deleteObjects()
+{
+   if (d_objects) {
+      free(reinterpret_cast<char *>(d_objects));
+      delete d_counter;
+   }
+
+   d_objects = (bool *)NULL;
+   d_counter = (ReferenceCounter *)NULL;
+   d_elements = 0;
+}
+
+template<>
+void Array<char>::deleteObjects()
+{
+   if (d_objects) {
+      free(reinterpret_cast<char *>(d_objects));
+      delete d_counter;
+   }
+
+   d_objects = (char *)NULL;
+   d_counter = (ReferenceCounter *)NULL;
+   d_elements = 0;
+}
+
+template<>
+void Array<int>::deleteObjects()
+{
+   if (d_objects) {
+      free(reinterpret_cast<char *>(d_objects));
+      delete d_counter;
+   }
+
+   d_objects = (int *)NULL;
+   d_counter = (ReferenceCounter *)NULL;
+   d_elements = 0;
+}
+
+template<>
+void Array<float>::deleteObjects()
+{
+   if (d_objects) {
+      free(reinterpret_cast<char *>(d_objects));
+      delete d_counter;
+   }
+
+   d_objects = (float *)NULL;
+   d_counter = (ReferenceCounter *)NULL;
+   d_elements = 0;
+}
+
+template<>
+void Array<double>::deleteObjects()
+{
+   if (d_objects) {
+      free(reinterpret_cast<char *>(d_objects));
+      delete d_counter;
+   }
+
+   d_objects = (double *)NULL;
+   d_counter = (ReferenceCounter *)NULL;
+   d_elements = 0;
+}
+
+}
+}
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/AsyncCommGroup.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/AsyncCommGroup.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1366 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   All-to-one and one-to-all communication using a tree. 
+ *
+ ************************************************************************/
+#include "SAMRAI/tbox/AsyncCommGroup.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/tbox/AsyncCommGroup.I"
+#endif
+
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include STL_SSTREAM_HEADER_FILE
+
+#ifdef OSTRINGSTREAM_TYPE_IS_BROKEN
+#ifdef OSTRSTREAM_TYPE_IS_BROKEN
+#error "Neither std::ostringstream nor std::ostrstream works"
+#else
+typedef std::ostringstream std::ostrstream
+#endif
+#endif
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+/*
+ * This class uses a non-deterministic algorithm, which can be
+ * very hard to debug.  To help debugging, we keep some special
+ * debugging code that is activated when AsyncCommGroup_DEBUG_OUTPUT
+ * is defined.
+ */
+// #define AsyncCommGroup_DEBUG_OUTPUT
+
+Pointer<Timer> AsyncCommGroup::t_reduce_data;
+Pointer<Timer> AsyncCommGroup::t_wait_all;
+
+tbox::StartupShutdownManager::Handler
+AsyncCommGroup::s_initialize_finalize_handler(
+   AsyncCommGroup::initializeCallback,
+   0,
+   0,
+   AsyncCommGroup::finalizeCallback,
+   tbox::StartupShutdownManager::priorityTimers);
+
+/*
+ ***********************************************************************
+ * Construct a simple communication group that does not work
+ * with a communication stage.  All parameters are set to reasonable
+ * defaults or, if appropriate, invalid values.
+ ***********************************************************************
+ */
+AsyncCommGroup::AsyncCommGroup():
+   AsyncCommStage::Member(),
+   d_nchild(tbox::MathUtilities<int>::getMax()),
+   d_idx(-1),
+   d_root_idx(-1),
+   d_parent_rank(-1),
+   d_child_data(NULL),
+   d_branch_size_totl(-1),
+   d_base_op(undefined),
+   d_next_task_op(none),
+   d_external_buf(NULL),
+   d_external_size(0),
+   d_internal_buf(),
+   d_mpi_tag(-1),
+   d_mpi(tbox::SAMRAI_MPI::getSAMRAIWorld()),
+   d_use_mpi_collective_for_full_groups(false),
+   d_use_blocking_send_to_children(false),
+   d_use_blocking_send_to_parent(true)
+#ifdef DEBUG_CHECK_ASSERTIONS
+   ,
+   d_group_ranks(0, true)
+#endif
+{
+}
+
+/*
+ ***********************************************************************
+ * Construct a simple communication group that does not work
+ * with a communication stage.  All parameters are set to reasonable
+ * defaults or, if appropriate, invalid values.
+ ***********************************************************************
+ */
+AsyncCommGroup::AsyncCommGroup(
+   const size_t nchild,
+   AsyncCommStage* stage,
+   AsyncCommStage::Handler* handler):
+   AsyncCommStage::Member(nchild, stage, handler),
+   d_nchild(nchild),
+   d_idx(-1),
+   d_root_idx(-1),
+   d_parent_rank(-1),
+   d_child_data(new ChildData[nchild]),
+   d_branch_size_totl(-1),
+   d_base_op(undefined),
+   d_next_task_op(none),
+   d_external_buf(NULL),
+   d_external_size(0),
+   d_internal_buf(),
+   d_mpi_tag(-1),
+   d_mpi(tbox::SAMRAI_MPI::getSAMRAIWorld()),
+   d_use_mpi_collective_for_full_groups(false),
+   d_use_blocking_send_to_children(false),
+   d_use_blocking_send_to_parent(true)
+#ifdef DEBUG_CHECK_ASSERTIONS
+   ,
+   d_group_ranks(0, true)
+#endif
+{
+   TBOX_ASSERT(nchild == numberOfRequests());
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+AsyncCommGroup::AsyncCommGroup(
+   const AsyncCommGroup& r):
+   AsyncCommStage::Member(0, NULL, NULL),
+   d_nchild(0),
+   d_mpi(tbox::SAMRAI_MPI::getSAMRAIWorld())
+{
+   (void)r;
+   TBOX_ERROR(
+      "Copy constructor disallowed due to primitive internal memory management.");
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+AsyncCommGroup& AsyncCommGroup::operator = (
+   const AsyncCommGroup& r) {
+   (void)r;
+   TBOX_ERROR(
+      "Assignment operator disallowed due to primitive internal memory management.");
+   return *this;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+AsyncCommGroup::~AsyncCommGroup()
+{
+   if (!isDone()) {
+      TBOX_ERROR("Deallocating a group while communication is pending\n"
+         << "leads to lost messages.\n"
+         << "mpi_communicator = " << d_mpi.getCommunicator()
+         << "mpi_tag = " << d_mpi_tag);
+   }
+   delete[] d_child_data;
+   d_child_data = NULL;
+}
+
+/*
+ ***********************************************************************
+ * Initialize data as if constructed with the given arguments.
+ ***********************************************************************
+ */
+void AsyncCommGroup::initialize(
+   const int nchild,
+   AsyncCommStage* stage,
+   AsyncCommStage::Handler* handler)
+{
+   if (!isDone()) {
+      TBOX_ERROR("It is illegal to re-initialize a AsyncCommGroup\n"
+         << "while it has current messages.\n");
+   }
+   attachStage(nchild, stage);
+   setHandler(handler);
+   d_nchild = nchild;
+   delete[] d_child_data;
+   d_idx = -1;
+   d_root_idx = -1;
+   d_parent_rank = -1;
+   d_child_data = new ChildData[nchild];
+   d_branch_size_totl = -1;
+   d_base_op = undefined;
+   d_next_task_op = none;
+#ifdef DEBUG_CHECK_ASSERTIONS
+   d_group_ranks.clear();
+#endif
+}
+
+/*
+ *********************************************************************
+ * Check whether the current (or last) operation has completed.
+ *********************************************************************
+ */
+bool AsyncCommGroup::proceedToNextWait()
+{
+   switch (d_base_op) {
+      case gather: return checkGather();
+
+      case bcast: return checkBcast();
+
+      case min_reduce:
+      case max_reduce:
+      case sum_reduce: return checkReduce();
+
+      case undefined:
+         TBOX_ERROR("There is no current operation to check.\n"
+         << "mpi_communicator = " << d_mpi.getCommunicator()
+         << "mpi_tag = " << d_mpi_tag);
+      default:
+         TBOX_ERROR("Library error: attempt to use an operation that\n"
+         << "has not been written yet"
+         << "mpi_communicator = " << d_mpi.getCommunicator()
+         << "mpi_tag = " << d_mpi_tag);
+   }
+   return true;
+}
+
+/*
+ *********************************************************************
+ * Wait for current communication operation to complete.
+ *
+ * Wait for all requests to come in and call proceedToNextWait()
+ * until all tasks of the communication operation is complete.
+ *********************************************************************
+ */
+void AsyncCommGroup::completeCurrentOperation()
+{
+   SAMRAI_MPI::Request * const req = getRequestPointer();
+   SAMRAI_MPI::Status* mpi_stat = d_next_task_op == none ?
+      (SAMRAI_MPI::Status *)NULL : new SAMRAI_MPI::Status[d_nchild];
+
+   while (d_next_task_op != none) {
+
+      t_wait_all->start();
+      int errf = d_mpi.Waitall(static_cast<int>(d_nchild),
+            req,
+            mpi_stat);
+      t_wait_all->stop();
+
+      if (errf != MPI_SUCCESS) {
+         TBOX_ERROR("Error in MPI_Waitall call.\n"
+            << "mpi_communicator = " << d_mpi.getCommunicator()
+            << "mpi_tag = " << d_mpi_tag);
+      }
+
+      proceedToNextWait();
+
+   }
+
+   if (mpi_stat != NULL) {
+      delete[] mpi_stat;
+   }
+}
+
+/*
+ ************************************************************************
+ ************************************************************************
+ */
+bool AsyncCommGroup::bcastByMpiCollective()
+{
+   d_mpi.Bcast(d_external_buf,
+      d_external_size,
+      MPI_INT,
+      d_root_rank);
+   d_next_task_op = none;
+   return true;
+}
+
+/*
+ ************************************************************************
+ * Set internal parameters for performing the broadcast
+ * and call checkBcast to perform the communication.
+ ************************************************************************
+ */
+bool AsyncCommGroup::beginBcast(
+   int* buffer,
+   int size)
+{
+   if (d_next_task_op != none) {
+      TBOX_ERROR("Cannot begin communication while another is in progress."
+         << "mpi_communicator = " << d_mpi.getCommunicator()
+         << "mpi_tag = " << d_mpi_tag);
+   }
+#ifdef DEBUG_CHECK_ASSERTIONS
+   checkMPIParams();
+#endif
+   d_external_buf = buffer;
+   d_external_size = size;
+   d_base_op = bcast;
+
+   if (d_use_mpi_collective_for_full_groups && d_group_size == d_nproc) {
+      return bcastByMpiCollective();
+   }
+
+   d_next_task_op = recv_start;
+   return checkBcast();
+}
+
+/*
+ ************************************************************************
+ * Broadcast is an one-to-all operation, so we receive from the
+ * parent process and send to the children processes.
+ ************************************************************************
+ */
+bool AsyncCommGroup::checkBcast()
+{
+   if (d_base_op != bcast) {
+      TBOX_ERROR("Cannot check nonexistent broadcast operation."
+         << "mpi_communicator = " << d_mpi.getCommunicator()
+         << "mpi_tag = " << d_mpi_tag);
+   }
+   SAMRAI_MPI::Request * const req = getRequestPointer();
+   size_t ic;
+   int flag = 0;
+
+   switch (d_next_task_op) {
+
+      case none:
+         break;
+
+      case recv_start:
+         if (d_parent_rank > -1) {
+            d_mpi_err = d_mpi.Irecv(d_external_buf,
+                  d_external_size,
+                  MPI_INT,
+                  d_parent_rank,
+                  d_mpi_tag,
+                  &req[0]);
+            if (d_mpi_err != MPI_SUCCESS) {
+               TBOX_ERROR("Error in MPI_Irecv."
+                  << "mpi_communicator = " << d_mpi.getCommunicator()
+                  << "mpi_tag = " << d_mpi_tag);
+            }
+#ifdef AsyncCommGroup_DEBUG_OUTPUT
+            tbox::plog << "tag-" << d_mpi_tag
+                       << " expecting " << d_external_size
+                       << " from " << d_parent_rank
+                       << " in checkBcast"
+                       << std::endl;
+#endif
+         }
+
+      case recv_check:
+         if (req[0] != MPI_REQUEST_NULL) {
+            resetStatus();
+            d_mpi_err = d_mpi.Test(&req[0], &flag, &d_mpi_status);
+            if (d_mpi_err != MPI_SUCCESS) {
+               TBOX_ERROR("Error in MPI_Test.\n"
+                  << "Error-in-status is "
+                  << (d_mpi_err == MPI_ERR_IN_STATUS) << '\n'
+                  << "MPI_ERROR value is " << d_mpi_status.MPI_ERROR
+                  << '\n'
+                  << "mpi_communicator = " << d_mpi.getCommunicator()
+                  << "mpi_tag = " << d_mpi_tag);
+            }
+            if (flag == 1) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+               int count = -1;
+               d_mpi_err = d_mpi.Get_count(&d_mpi_status, MPI_INT, &count);
+               if (d_mpi_err != MPI_SUCCESS) {
+                  TBOX_ERROR("Error in MPI_Get_count.\n"
+                     << "Error-in-status is "
+                     << (d_mpi_err == MPI_ERR_IN_STATUS) << '\n'
+                     << "MPI_ERROR value is " << d_mpi_status.MPI_ERROR
+                     << '\n'
+                     << "mpi_communicator = " << d_mpi.getCommunicator()
+                     << "mpi_tag = " << d_mpi_tag);
+               }
+#ifdef AsyncCommGroup_DEBUG_OUTPUT
+               tbox::plog << "tag-" << d_mpi_tag
+                          << " received " << count
+                          << " from " << d_mpi_status.MPI_SOURCE
+                          << " in checkBcast"
+                          << std::endl;
+#endif
+               TBOX_ASSERT(count <= d_external_size);
+               TBOX_ASSERT(d_mpi_status.MPI_TAG == d_mpi_tag);
+               TBOX_ASSERT(d_mpi_status.MPI_SOURCE == d_parent_rank);
+               TBOX_ASSERT(req[0] == MPI_REQUEST_NULL);
+#endif
+            } else {
+               d_next_task_op = recv_check;
+               break;
+            }
+         }
+
+      case send_start:
+         for (ic = 0; ic < d_nchild; ++ic) {
+            if (d_child_data[ic].rank >= 0) {
+               if (d_use_blocking_send_to_children) {
+                  d_mpi_err = d_mpi.Send(d_external_buf,
+                        d_external_size,
+                        MPI_INT,
+                        d_child_data[ic].rank,
+                        d_mpi_tag);
+               } else {
+                  d_mpi_err = d_mpi.Isend(d_external_buf,
+                        d_external_size,
+                        MPI_INT,
+                        d_child_data[ic].rank,
+                        d_mpi_tag,
+                        &req[ic]);
+               }
+               if (d_mpi_err != MPI_SUCCESS) {
+                  TBOX_ERROR("Error in send."
+                     << "mpi_communicator = " << d_mpi.getCommunicator()
+                     << "mpi_tag = " << d_mpi_tag);
+               }
+#ifdef AsyncCommGroup_DEBUG_OUTPUT
+               tbox::plog << "tag-" << d_mpi_tag
+               << " sending " << d_external_size
+               << " to " << d_child_data[ic].rank
+               << " in checkBcast"
+               << std::endl;
+#endif
+            }
+         }
+
+      case send_check:
+         for (ic = 0; ic < d_nchild; ++ic) {
+            if (req[ic] != MPI_REQUEST_NULL) {
+               resetStatus();
+               d_mpi_err = d_mpi.Test(&req[ic], &flag, &d_mpi_status);
+               if (d_mpi_err != MPI_SUCCESS) {
+                  TBOX_ERROR("Error in MPI_Test.\n"
+                     << "Error-in-status is "
+                     << (d_mpi_err == MPI_ERR_IN_STATUS) << '\n'
+                     << "MPI_ERROR value is " << d_mpi_status.MPI_ERROR
+                     << '\n'
+                     << "mpi_communicator = " << d_mpi.getCommunicator()
+                     << "mpi_tag = " << d_mpi_tag);
+               }
+#ifdef DEBUG_CHECK_ASSERTIONS
+               if (req[ic] == MPI_REQUEST_NULL) {
+                  int count = -1;
+                  d_mpi.Get_count(&d_mpi_status, MPI_INT, &count);
+#ifdef AsyncCommGroup_DEBUG_OUTPUT
+                  tbox::plog << "tag-" << d_mpi_tag
+                  << " sent unknown size (MPI convention)"
+                  << " to " << d_child_data[ic].rank
+                  << " in checkBcast"
+                  << std::endl;
+#endif
+               }
+#endif
+            }
+         }
+         for (ic = 0; ic < d_nchild; ++ic) {
+            if (req[ic] != MPI_REQUEST_NULL) {
+               break;
+            }
+         }
+         if (ic < d_nchild) {
+            d_next_task_op = send_check;
+            break;
+         }
+         d_next_task_op = none;
+         break;
+
+      default:
+         TBOX_ERROR("checkBcast is incompatible with current state."
+         << "mpi_communicator = " << d_mpi.getCommunicator()
+         << "mpi_tag = " << d_mpi_tag);
+   }
+
+   if (d_parent_rank == -1) {
+      TBOX_ASSERT(d_next_task_op != recv_check);
+   }
+
+   return d_next_task_op == none;
+}
+
+/*
+ ************************************************************************
+ ************************************************************************
+ */
+bool AsyncCommGroup::gatherByMpiCollective()
+{
+   if ( d_mpi.getSize() > 1 ) {
+      d_internal_buf.clear();
+      d_internal_buf.insert( d_internal_buf.begin(),
+                             d_external_buf,
+                             d_external_buf+d_external_size );
+      d_mpi.Gather(&d_internal_buf[0],
+                 d_external_size,
+                 MPI_INT,
+                 d_external_buf,
+                 d_external_size,
+                 MPI_INT,
+                 d_root_rank);
+      d_internal_buf.clear();
+   }
+   d_next_task_op = none;
+   return true;
+}
+
+/*
+ ************************************************************************
+ * Allocate enough memory internally to store all descendent data.
+ * Place local process's contribution in the internal buffer.
+ * Call checkGather to obtain data from descendants and send
+ * to parent.
+ ************************************************************************
+ */
+bool AsyncCommGroup::beginGather(
+   int* buffer,
+   int size)
+{
+
+   if (d_next_task_op != none) {
+      TBOX_ERROR("Cannot begin communication while another is in progress."
+         << "mpi_communicator = " << d_mpi.getCommunicator()
+         << "mpi_tag = " << d_mpi_tag);
+   }
+#ifdef DEBUG_CHECK_ASSERTIONS
+   checkMPIParams();
+#endif
+
+   d_base_op = gather;
+   d_external_buf = buffer;
+   d_external_size = size;
+
+   if (d_use_mpi_collective_for_full_groups && d_group_size == d_nproc) {
+      return gatherByMpiCollective();
+   }
+
+   /*
+    * The internal buffer size is d_branch_size_totl+1 times the
+    * message size.  There is one data block for each descendent,
+    * plus one for the local contribution:
+    *
+    * |<------------------------ internal buffer ---------------------->|
+    * |                                                                 |
+    * |<--msg_size-->|<--msg_size-->| ... |<--msg_size-->|<--msg_size-->|
+    * |              |              | ... |              |              |
+    * |  recv from   |  recv from   | ... |  recv from   |    local     |
+    * | descendant 0 | descendant 1 | ... | dsndt (nb-1) | contribution |
+    *
+    * (nb = d_branch_size_totl)
+    *
+    * The message size is the data buffer size, plus one integer
+    * describing the index of the process contributing the data.
+    */
+
+   /*
+    * Allocate enough space for data from this position plus all
+    * descendant positions.  Each position contributes its external
+    * data plus some data to help sort the final gathered data.
+    */
+   int per_proc_msg_size = (1 + d_external_size);
+   d_internal_buf.clear();
+   d_internal_buf.insert(d_internal_buf.end(),
+      (d_branch_size_totl + 1) * per_proc_msg_size,
+      0);
+
+   /*
+    * Add our contribution to the gathered data.
+    */
+   int* ptr = &d_internal_buf[0]
+      + (d_branch_size_totl) * per_proc_msg_size;
+   *(ptr++) = d_idx;
+   int i;
+   for (i = 0; i < d_external_size; ++i) {
+      ptr[i] = d_external_buf[i];
+   }
+
+   d_next_task_op = recv_start;
+
+   return checkGather();
+}
+
+/*
+ ************************************************************************
+ * Gather is an all-to-one operation, so we receive from the
+ * children processes and send to the parent process.
+ ************************************************************************
+ */
+bool AsyncCommGroup::checkGather()
+{
+   if (d_base_op != gather) {
+      TBOX_ERROR("Cannot check nonexistent gather operation\n"
+         << "mpi_communicator = " << d_mpi.getCommunicator() << '\n'
+         << "mpi_tag = " << d_mpi_tag << '\n');
+   }
+
+   SAMRAI_MPI::Request * const req = getRequestPointer();
+   int per_proc_msg_size = (1 + d_external_size);
+
+   int i;
+   size_t ic;
+   int older_sibling_size;
+   int flag = 0;
+
+   switch (d_next_task_op) {
+
+      case none:
+         break;
+
+      case recv_start:
+         older_sibling_size = 0;
+         for (ic = 0; ic < d_nchild; ++ic) {
+            if (d_child_data[ic].rank >= 0) {
+               /*
+                * Child number ic exists.  We'll put its data after
+                * its older siblings' data.
+                */
+               d_mpi_err = d_mpi.Irecv(&d_internal_buf[0]
+                     + per_proc_msg_size * older_sibling_size,
+                     d_child_data[ic].size * per_proc_msg_size,
+                     MPI_INT,
+                     d_child_data[ic].rank,
+                     d_mpi_tag,
+                     &req[ic]);
+               if (d_mpi_err != MPI_SUCCESS) {
+                  TBOX_ERROR("Error in MPI_Irecv.\n"
+                     << "mpi_communicator = " << d_mpi.getCommunicator() << '\n'
+                     << "mpi_tag = " << d_mpi_tag << '\n');
+               }
+               older_sibling_size += d_child_data[ic].size;
+            }
+         }
+
+      case recv_check:
+
+         /*
+          * Check all pending receives from the children.
+          */
+         for (ic = 0; ic < d_nchild; ++ic) {
+            if (req[ic] != MPI_REQUEST_NULL) {
+               resetStatus();
+               d_mpi_err = d_mpi.Test(&req[ic], &flag, &d_mpi_status);
+               if (d_mpi_err != MPI_SUCCESS) {
+                  TBOX_ERROR("Error in MPI_Test.\n"
+                     << "Error-in-status is "
+                     << (d_mpi_err == MPI_ERR_IN_STATUS) << '\n'
+                     << "MPI_ERROR value is " << d_mpi_status.MPI_ERROR
+                     << '\n'
+                     << "mpi_communicator = " << d_mpi.getCommunicator() << '\n'
+                     << "mpi_tag = " << d_mpi_tag << '\n');
+               }
+#ifdef DEBUG_CHECK_ASSERTIONS
+               if (flag == 1) {
+                  TBOX_ASSERT(d_mpi_status.MPI_TAG == d_mpi_tag);
+                  TBOX_ASSERT(d_mpi_status.MPI_SOURCE == d_child_data[ic].rank);
+                  TBOX_ASSERT(req[ic] == MPI_REQUEST_NULL);
+                  int count = -1;
+                  d_mpi.Get_count(&d_mpi_status, MPI_INT, &count);
+#ifdef AsyncCommGroup_DEBUG_OUTPUT
+                  tbox::plog << "tag-" << d_mpi_tag
+                             << " received " << count
+                             << " from " << d_mpi_status.MPI_SOURCE
+                             << " in checkGather"
+                             << std::endl;
+#endif
+                  if (count > d_child_data[ic].size * per_proc_msg_size) {
+                     TBOX_ERROR("Message size bigger than expected from proc "
+                        << d_child_data[ic].rank << "\n"
+                        << "Expect "
+                        << d_child_data[ic].size * per_proc_msg_size
+                        << "\n"
+                        << "Actual " << count << '\n'
+                        << "mpi_communicator = " << d_mpi.getCommunicator() << '\n'
+                        << "mpi_tag = " << d_mpi_tag << '\n');
+                  }
+               }
+#endif
+            }
+         }
+
+         /*
+          * If there are still pending requests, we cannot complete
+          * the communication operation at this time.
+          */
+         for (ic = 0; ic < d_nchild; ++ic) {
+            if (req[ic] != MPI_REQUEST_NULL) {
+               break;
+            }
+         }
+         if (ic < d_nchild) {
+            d_next_task_op = recv_check;
+            break;
+         }
+
+         /*
+          * At this point, all receives are completed.
+          */
+         if (d_parent_rank < 0) {
+            /*
+             * The root of the gather (only the root!) transfers the
+             * internal buffer into the external buffer, unshuffling
+             * data in the process.
+             */
+            int n;
+            for (n = 0; n < d_group_size; ++n) {
+               int* ptr = &d_internal_buf[0]
+                  + per_proc_msg_size * n;
+               const int source_idx = *(ptr++);
+               if (source_idx < 0 && source_idx >= d_group_size) {
+                  TBOX_ERROR("Gathered data has out of range index "
+                     << source_idx << '\n'
+                     << "mpi_communicator = " << d_mpi.getCommunicator() << '\n'
+                     << "mpi_tag = " << d_mpi_tag << '\n');
+               }
+               int* dest_buf = d_external_buf
+                  + d_external_size * (source_idx);
+               for (i = 0; i < d_external_size; ++i, ++ptr) {
+                  dest_buf[i] = *ptr;
+               }
+            }
+         }
+
+      case send_start:
+         if (d_parent_rank >= 0) {
+            if (d_use_blocking_send_to_parent) {
+               d_mpi_err = d_mpi.Send(&d_internal_buf[0],
+                     static_cast<int>(d_internal_buf.size()),
+                     MPI_INT,
+                     d_parent_rank,
+                     d_mpi_tag);
+            } else {
+               d_mpi_err = d_mpi.Isend(&d_internal_buf[0],
+                     static_cast<int>(d_internal_buf.size()),
+                     MPI_INT,
+                     d_parent_rank,
+                     d_mpi_tag,
+                     &req[0]);
+            }
+            if (d_mpi_err != MPI_SUCCESS) {
+               TBOX_ERROR("Error in send.\n"
+                  << "mpi_communicator = " << d_mpi.getCommunicator() << '\n'
+                  << "mpi_tag = " << d_mpi_tag << '\n');
+            }
+         }
+
+      case send_check:
+         if (req[0] != MPI_REQUEST_NULL) {
+            resetStatus();
+            d_mpi_err = d_mpi.Test(&req[0], &flag, &d_mpi_status);
+            if (d_mpi_err != MPI_SUCCESS) {
+               TBOX_ERROR("Error in MPI_Test.\n"
+                  << "Error-in-status is "
+                  << (d_mpi_err == MPI_ERR_IN_STATUS) << '\n'
+                  << "MPI_ERROR value is " << d_mpi_status.MPI_ERROR
+                  << '\n'
+                  << "mpi_communicator = " << d_mpi.getCommunicator() << '\n'
+                  << "mpi_tag = " << d_mpi_tag << '\n');
+            }
+         }
+         if (req[0] != MPI_REQUEST_NULL) {
+            d_next_task_op = send_check;
+         } else {
+#ifdef AsyncCommGroup_DEBUG_OUTPUT
+            if (d_parent_rank > -1) {
+               tbox::plog << "tag-" << d_mpi_tag
+                          << " sent " << d_internal_buf.size()
+                          << " to " << d_parent_rank
+                          << " in checkGather"
+                          << std::endl;
+            }
+#endif
+            d_next_task_op = none;
+         }
+         break;
+
+      default:
+         TBOX_ERROR("checkGather is incompatible with current state.\n"
+         << "mpi_communicator = " << d_mpi.getCommunicator() << '\n'
+         << "mpi_tag = " << d_mpi_tag << '\n');
+   }
+
+   return d_next_task_op == none;
+}
+
+/*
+ **********************************************************************
+ * Set flag indicating a sum reduce and call the generic reduce method
+ * to do the actual work.
+ **********************************************************************
+ */
+bool AsyncCommGroup::beginSumReduce(
+   int* buffer,
+   int size)
+{
+   if (d_next_task_op != none) {
+      TBOX_ERROR("Cannot begin communication while another is in progress.\n"
+         << "mpi_communicator = " << d_mpi.getCommunicator() << '\n'
+         << "mpi_tag = " << d_mpi_tag << '\n');
+   }
+#ifdef DEBUG_CHECK_ASSERTIONS
+   checkMPIParams();
+#endif
+   d_base_op = sum_reduce;
+   d_external_buf = buffer;
+   d_external_size = size;
+   return beginReduce();
+}
+
+/*
+ **********************************************************************
+ * The fact that the current reduction is a sum reduction is recorded
+ * in the d_base_op parameter.  We simply use the generic method for
+ * checking reduction.
+ **********************************************************************
+ */
+bool AsyncCommGroup::checkSumReduce()
+{
+   return checkReduce();
+}
+
+/*
+ ************************************************************************
+ ************************************************************************
+ */
+bool AsyncCommGroup::reduceByMpiCollective()
+{
+   tbox::SAMRAI_MPI::Op mpi_op =
+      d_base_op == max_reduce ? MPI_MAX :
+      d_base_op == min_reduce ? MPI_MIN :
+      MPI_SUM;
+   d_internal_buf.clear();
+   d_internal_buf.insert(d_internal_buf.end(),
+      d_external_size,
+      0);
+   d_mpi.Reduce(d_external_buf,
+      &d_internal_buf[0],
+      d_external_size,
+      MPI_INT,
+      mpi_op,
+      d_root_rank);
+   if (d_parent_rank < 0) {
+      copy(d_internal_buf.begin(), d_internal_buf.end(), d_external_buf);
+   }
+   d_next_task_op = none;
+   return true;
+}
+
+/*
+ ************************************************************************
+ * Allocate enough memory internally to store all children data.
+ * Place local process's contribution in the internall buffer.
+ * Call checkReduce to obtain data from children, reduce the
+ * data and send result to parent..
+ ************************************************************************
+ */
+bool AsyncCommGroup::beginReduce()
+{
+   if (d_use_mpi_collective_for_full_groups && d_group_size == d_nproc) {
+      return reduceByMpiCollective();
+   }
+
+   int msg_size = d_external_size;
+   /*
+    * For reducing data, nc = number of actual children.  nc <= d_nchild.
+    *
+    * The internal buffer stores up to nc+1 times the message size:
+    *
+    * |<------------------------ internal buffer ---------------------->|
+    * |                                                                 |
+    * |<--msg_size-->|<--msg_size-->| ... |<--msg_size-->|<--msg_size-->|
+    * |              |              | ... |              |              |
+    * |  recv from   |  recv from   | ... |  recv from   |   send to    |
+    * |   child 0    |   child 1    | ... | child (nc-1) |    parent    |
+    * |   (if any)   |   (if any)   | ... |   (if any)   |   (if any)   |
+    *
+    * If a data block is not needed, it is not created and the
+    * following blocks shift over.  For non-root processes,
+    * the reduced data is placed in the "send to parent" section
+    * so it can be passed up the tree.
+    * For the root process, reduced data is placed directly
+    * into d_external_buf.
+    */
+
+   /*
+    * Compute the number of actual children, nc.  Note that
+    * d_nchild is just the upper limit to the number of actual
+    * children.
+    */
+   const int oldest_pos = toOldest(toPosition(d_idx));
+   int limit_pos = toYoungest(toPosition(d_idx)) + 1;
+   limit_pos = tbox::MathUtilities<int>::Min(limit_pos, d_group_size);
+   const int n_children = limit_pos > oldest_pos ? limit_pos - oldest_pos : 0;
+
+   d_internal_buf.clear();
+   d_internal_buf.insert(d_internal_buf.end(),
+      msg_size * (n_children + (d_parent_rank > -1)),
+      0);
+
+   if (d_parent_rank > -1) {
+      int* ptr = &d_internal_buf[0] + d_internal_buf.size() - msg_size;
+      for (int i = 0; i < d_external_size; ++i) {
+         ptr[i] = d_external_buf[i];
+      }
+   }
+
+   d_next_task_op = recv_start;
+
+   return checkReduce();
+}
+
+/*
+ ************************************************************************
+ * Reduction is an all-to-one operation, so we receive from
+ * the children and send to the parent.  The transfer data
+ * toward the root process is the same for all types of
+ * reductions.  After each child's data is received, the
+ * specific data reduction arithmetic is done locally.
+ * The result of the local reduction is sent to the parent.
+ ************************************************************************
+ */
+bool AsyncCommGroup::checkReduce()
+{
+   if (!(d_base_op == max_reduce ||
+         d_base_op == min_reduce ||
+         d_base_op == sum_reduce)) {
+      TBOX_ERROR("Cannot check nonexistent reduce operation.\n"
+         << "mpi_communicator = " << d_mpi.getCommunicator() << '\n'
+         << "mpi_tag = " << d_mpi_tag << '\n');
+   }
+
+   SAMRAI_MPI::Request * const req = getRequestPointer();
+   int msg_size = d_external_size;
+
+   size_t ic;
+   int flag = 0;
+   switch (d_next_task_op) {
+
+      case none:
+         break;
+
+      case recv_start:
+         for (ic = 0; ic < d_nchild; ++ic) {
+            if (d_child_data[ic].rank >= 0) {
+               d_mpi_err = d_mpi.Irecv(&d_internal_buf[0] + ic * msg_size,
+                     msg_size,
+                     MPI_INT,
+                     d_child_data[ic].rank,
+                     d_mpi_tag,
+                     &req[ic]);
+               if (d_mpi_err != MPI_SUCCESS) {
+                  TBOX_ERROR("Error in MPI_Irecv.\n"
+                     << "mpi_communicator = " << d_mpi.getCommunicator() << '\n'
+                     << "mpi_tag = " << d_mpi_tag << '\n');
+               }
+#ifdef AsyncCommGroup_DEBUG_OUTPUT
+               tbox::plog << "tag-" << d_mpi_tag
+               << " expecting " << msg_size
+               << " from " << d_child_data[ic].rank
+               << " in checkReduce"
+               << std::endl;
+#endif
+            }
+         }
+
+      case recv_check:
+
+         for (ic = 0; ic < d_nchild; ++ic) {
+            if (req[ic] != MPI_REQUEST_NULL) {
+               resetStatus();
+               d_mpi_err = d_mpi.Test(&req[ic], &flag, &d_mpi_status);
+               if (d_mpi_err != MPI_SUCCESS) {
+                  TBOX_ERROR("Error in MPI_Test.\n"
+                     << "Error-in-status is "
+                     << (d_mpi_err == MPI_ERR_IN_STATUS) << '\n'
+                     << "MPI_ERROR value is " << d_mpi_status.MPI_ERROR
+                     << '\n'
+                     << "mpi_communicator = " << d_mpi.getCommunicator() << '\n'
+                     << "mpi_tag = " << d_mpi_tag << '\n');
+               }
+               if (flag == 1) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+                  TBOX_ASSERT(d_mpi_status.MPI_TAG == d_mpi_tag);
+                  TBOX_ASSERT(d_mpi_status.MPI_SOURCE == d_child_data[ic].rank);
+                  TBOX_ASSERT(req[ic] == MPI_REQUEST_NULL);
+                  int count = -1;
+                  d_mpi.Get_count(&d_mpi_status, MPI_INT, &count);
+#ifdef AsyncCommGroup_DEBUG_OUTPUT
+                  tbox::plog << " child-" << ic << " tag-" << d_mpi_tag
+                             << " received " << count
+                             << " from " << d_mpi_status.MPI_SOURCE
+                             << " in checkReduce"
+                             << std::endl;
+#endif
+                  if (count != msg_size) {
+                     TBOX_ERROR(
+                        "Did not get the expected message size from proc "
+                        << d_child_data[ic].rank << "\n"
+                                                 << "Expect " << msg_size
+                                                 << "\n"
+                                                 << "Actual " << count << '\n'
+                                                 << "mpi_communicator = "
+                                                 << d_mpi.getCommunicator() << '\n'
+                                                 << "mpi_tag = "
+                                                 << d_mpi_tag << '\n');
+                  }
+#endif
+               } else {
+#ifdef AsyncCommGroup_DEBUG_OUTPUT
+                  tbox::plog << " child-" << ic << " tag-" << d_mpi_tag
+                  << " still waiting for proc " << d_child_data[ic].rank
+                  << " in checkReduce"
+                  << std::endl;
+                  TBOX_ASSERT(req[ic] != MPI_REQUEST_NULL);
+                  TBOX_ASSERT(numberOfPendingRequests() > 0);
+#endif
+               }
+            }
+         }
+         for (ic = 0; ic < d_nchild; ++ic) {
+            if (req[ic] != MPI_REQUEST_NULL) {
+               break;
+            }
+         }
+         if (ic < d_nchild) {
+            d_next_task_op = recv_check;
+            break;
+         }
+
+         {
+            int* local_data = d_parent_rank < 0 ? d_external_buf :
+               &d_internal_buf[0] + d_internal_buf.size() - msg_size;
+            t_reduce_data->start();
+            for (ic = 0; ic < d_nchild; ++ic) {
+               if (d_child_data[ic].rank > -1) {
+                  int* child_data = &d_internal_buf[0] + ic * msg_size;
+                  reduceData(local_data, child_data);
+               }
+            }
+            t_reduce_data->stop();
+         }
+
+      case send_start:
+         if (d_parent_rank >= 0) {
+            int* ptr = &d_internal_buf[0]
+               + d_internal_buf.size() - msg_size;
+            if (d_use_blocking_send_to_parent) {
+               d_mpi_err = d_mpi.Send(ptr,
+                     msg_size,
+                     MPI_INT,
+                     d_parent_rank,
+                     d_mpi_tag);
+            } else {
+               d_mpi_err = d_mpi.Isend(ptr,
+                     msg_size,
+                     MPI_INT,
+                     d_parent_rank,
+                     d_mpi_tag,
+                     &req[0]);
+            }
+            if (d_mpi_err != MPI_SUCCESS) {
+               TBOX_ERROR("Error in send.\n"
+                  << "mpi_communicator = " << d_mpi.getCommunicator() << '\n'
+                  << "mpi_tag = " << d_mpi_tag << '\n');
+            }
+#ifdef AsyncCommGroup_DEBUG_OUTPUT
+            tbox::plog << "tag-" << d_mpi_tag
+                       << " sending " << msg_size
+                       << " to " << d_parent_rank
+                       << " in checkReduce"
+                       << std::endl;
+#endif
+         }
+
+      case send_check:
+         if (req[0] != MPI_REQUEST_NULL) {
+            resetStatus();
+            d_mpi_err = d_mpi.Test(&req[0], &flag, &d_mpi_status);
+            if (d_mpi_err != MPI_SUCCESS) {
+               TBOX_ERROR("Error in MPI_Test.\n"
+                  << "Error-in-status is "
+                  << (d_mpi_err == MPI_ERR_IN_STATUS) << '\n'
+                  << "MPI_ERROR value is " << d_mpi_status.MPI_ERROR
+                  << '\n'
+                  << "mpi_communicator = " << d_mpi.getCommunicator() << '\n'
+                  << "mpi_tag = " << d_mpi_tag << '\n');
+            }
+         }
+         if (req[0] != MPI_REQUEST_NULL) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            int count = -1;
+            d_mpi.Get_count(&d_mpi_status, MPI_INT, &count);
+#ifdef AsyncCommGroup_DEBUG_OUTPUT
+            tbox::plog << "tag-" << d_mpi_tag
+                       << " sent " << count
+                       << " to " << d_parent_rank
+                       << " in checkReduce"
+                       << std::endl;
+#endif
+#endif
+            d_next_task_op = send_check;
+         } else {
+            d_next_task_op = none;
+         }
+         break;
+
+      default:
+         TBOX_ERROR("checkReduce is incompatible with current state.\n"
+         << "mpi_communicator = " << d_mpi.getCommunicator() << '\n'
+         << "mpi_tag = " << d_mpi_tag << '\n');
+   }
+
+   if (d_parent_rank == -1) {
+      TBOX_ASSERT(d_next_task_op != send_check);
+   }
+
+   if (d_next_task_op != none) {
+      TBOX_ASSERT(numberOfPendingRequests() > 0);
+   }
+
+   return d_next_task_op == none;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void AsyncCommGroup::setGroupAndRootRank(
+   const SAMRAI_MPI& mpi,
+   const int* group_ranks,
+   const int group_size,
+   const int root_rank)
+{
+   int i;
+   for (i = 0; i < group_size; ++i) {
+      if (group_ranks[i] == root_rank) {
+         break;
+      }
+   }
+   if (i == group_size) {
+      TBOX_ERROR(
+         "New root " << root_rank << " is not in the group.\n"
+         << "mpi_communicator = " << d_mpi.getCommunicator()
+         << '\n'
+         << "mpi_tag = " << d_mpi_tag << '\n');
+   }
+   setGroupAndRootIndex(mpi, group_ranks, group_size, i);
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void AsyncCommGroup::setGroupAndRootIndex(
+   const SAMRAI_MPI& mpi,
+   const int* group_ranks,
+   const int group_size,
+   const int root_index)
+{
+   if (d_next_task_op != none) {
+      TBOX_ERROR("Changing group while a communication is occuring can\n"
+         << "corrupt data and so is disallowed.\n"
+         << "mpi_communicator = " << d_mpi.getCommunicator() << '\n'
+         << "mpi_tag = " << d_mpi_tag << '\n');
+   }
+
+   d_mpi = mpi;
+
+   d_mpi_err = mpi.Comm_size(&d_nproc);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_mpi_err != MPI_SUCCESS) {
+      TBOX_ERROR("Error in MPI_Comm_size.\n"
+         << "mpi_communicator = " << d_mpi.getCommunicator() << '\n'
+         << "mpi_tag = " << d_mpi_tag << '\n');
+   }
+#endif
+   d_mpi_err = mpi.Comm_rank(&d_rank);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_mpi_err != MPI_SUCCESS) {
+      TBOX_ERROR("Error in MPI_Comm_size.\n"
+         << "mpi_communicator = " << d_mpi.getCommunicator() << '\n'
+         << "mpi_tag = " << d_mpi_tag << '\n');
+   }
+#endif
+
+   // Set the index for local and root processes.
+   d_group_size = group_size;
+   d_idx = -1;
+   for (int i = 0; i < d_group_size; ++i) {
+      if (group_ranks[i] == d_rank) {
+         d_idx = i;
+         break;
+      }
+   }
+   d_root_idx = root_index;
+   d_root_rank = group_ranks[d_root_idx];
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   // Set d_group_ranks and do some sanity checks.
+   if (d_group_size > d_nproc) {
+      TBOX_ERROR("Group size must not be greater than the size of\n"
+         << "the MPI communicator group.\n"
+         << "mpi_communicator = " << d_mpi.getCommunicator() << '\n'
+         << "mpi_tag = " << d_mpi_tag << '\n');
+
+   }
+   TBOX_ASSERT(d_group_size > 0);
+   if (d_idx == -1) {
+      TBOX_ERROR(
+         "The local process (" << d_rank
+         << ") MUST be in the communication group.\n"
+         << "mpi_communicator = "
+         << d_mpi.getCommunicator() << '\n'
+         << "mpi_tag = " << d_mpi_tag << '\n');
+   }
+   d_group_ranks.clear();
+   d_group_ranks.insert(d_group_ranks.end(), d_group_size, -1);
+   int dup = 0;
+   for (int i = 0; i < d_group_size; ++i) {
+      if (group_ranks[i] < 0 || group_ranks[i] >= d_nproc) {
+         TBOX_ERROR(
+            "Rank " << group_ranks[i] << " is not in the current\n"
+                                      << "MPI communicator.\n"
+                                      << "mpi_communicator = "
+                                      << d_mpi.getCommunicator() << '\n'
+                                      << "mpi_tag = " << d_mpi_tag
+                                      << '\n');
+      }
+      if (group_ranks[i] == d_rank) ++dup;
+      d_group_ranks[i] = group_ranks[i];
+   }
+   if (dup != 1) {
+      TBOX_ERROR("The local process must appear exactly once in the group.\n"
+         << "It appeared " << dup << " times.\n"
+         << "mpi_communicator = " << d_mpi.getCommunicator() << '\n'
+         << "mpi_tag = " << d_mpi_tag << '\n');
+   }
+#endif
+
+   computeDependentData(group_ranks, group_size);
+}
+
+/*
+ ***************************************************************************
+ * Compute data that is dependent on the group, root and local processes.
+ ***************************************************************************
+ */
+void AsyncCommGroup::computeDependentData(
+   const int* group_ranks,
+   const int group_size)
+{
+   (void)group_size;
+   /*
+    * Compute number of descendants in each child branch and in all branches.
+    * To find the number of descendants in each branch find the oldest
+    * and youngest descendants for each generation.  Add up contribution
+    * of all descendant generations.
+    */
+   d_branch_size_totl = 0;
+   unsigned int ic;
+   for (ic = 0; ic < d_nchild; ++ic) {
+      d_child_data[ic].size = 0;
+      int pos_of_child_ic = toChildPosition(toPosition(d_idx), ic);
+      int oldest = pos_of_child_ic;
+      int yngest = pos_of_child_ic;
+      while (oldest < d_group_size) {
+         d_child_data[ic].size +=
+            (yngest < d_group_size ? yngest : d_group_size - 1) - oldest + 1;
+         oldest = toOldest(oldest);
+         if (yngest < d_group_size) yngest = toYoungest(yngest);
+      }
+      d_branch_size_totl += d_child_data[ic].size;
+   }
+
+   /*
+    * Find ranks of parent and children using specific arithmetic
+    * relationships between parent and children positions.
+    */
+   const int pos = toPosition(d_idx);
+   if (pos > 0) {
+      d_parent_rank = group_ranks[toIndex((pos - 1) /
+                                          static_cast<int>(d_nchild))];
+   } else d_parent_rank = -1;
+   for (ic = 0; ic < d_nchild; ++ic) {
+      const int pos_of_child_ic = toChildPosition(pos, ic);
+      if (pos_of_child_ic < d_group_size) {
+         d_child_data[ic].rank = group_ranks[toIndex(pos_of_child_ic)];
+      } else d_child_data[ic].rank = -1;
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void AsyncCommGroup::checkMPIParams()
+{
+   if (d_mpi_tag < 0) {
+      TBOX_ERROR("AsyncCommGroup: Invalid MPI tag value "
+         << d_mpi_tag << "\nUse setMPITag() to set it.");
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void AsyncCommGroup::logCurrentState(
+   std::ostream& co) const
+{
+   SAMRAI_MPI::Request * const req = getRequestPointer();
+   co << "State=" << 10 * d_base_op + d_next_task_op
+      << "  tag=" << d_mpi_tag
+      << "  communicator=" << d_mpi.getCommunicator()
+      << "  extern. buff=" << d_external_buf
+      << "  size=" << d_external_size
+      << "  parent=" << d_parent_rank
+      << "  root rank=" << d_root_rank
+      << "  use_mpi_collective_for_full_groups="
+      << d_use_mpi_collective_for_full_groups
+   ;
+   for (size_t i = 0; i < d_nchild; ++i) {
+      co << "  [" << i << "]=" << d_child_data[i].rank
+      << " (" << req[i] << ')';
+   }
+   co << '\n';
+}
+
+/*
+ ***************************************************************************
+ * Allocate static timers.
+ ***************************************************************************
+ */
+
+void AsyncCommGroup::initializeCallback(
+   void)
+{
+   t_reduce_data = TimerManager::getManager()->
+      getTimer("tbox::AsyncCommGroup::reduceData()");
+   t_wait_all = TimerManager::getManager()->
+      getTimer("tbox::AsyncCommGroup::mpi_wait_all");
+}
+
+/*
+ ***************************************************************************
+ * Release static timers.  To be called by shutdown registry to make sure
+ * memory for timers does not leak.
+ ***************************************************************************
+ */
+void AsyncCommGroup::finalizeCallback()
+{
+   t_reduce_data.setNull();
+   t_wait_all.setNull();
+}
+
+}
+}
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/AsyncCommGroup.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/AsyncCommGroup.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,255 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   All-to-one and one-to-all communication using a tree. 
+ *
+ ************************************************************************/
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/TimerManager.h"
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+/*
+ ****************************************************************
+ ****************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+bool AsyncCommGroup::isDone() const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_next_task_op == none) {
+      TBOX_ASSERT(!hasPendingRequests());    // Verify sane state.
+   }
+#endif
+   return d_next_task_op == none;
+}
+
+SAMRAI_INLINE_KEYWORD
+void AsyncCommGroup::reduceData(
+   int* output,
+   const int* data) const
+{
+   int i;
+   switch (d_base_op) {
+      case max_reduce:
+         for (i = 0; i < d_external_size; ++i) {
+            if (output[i] < data[i]) output[i] = data[i];
+         }
+         break;
+      case min_reduce:
+         for (i = 0; i < d_external_size; ++i) {
+            if (output[i] > data[i]) output[i] = data[i];
+         }
+         break;
+      case sum_reduce:
+         for (i = 0; i < d_external_size; ++i) {
+            output[i] = output[i] + data[i];
+         }
+         break;
+      default:
+         TBOX_ERROR("Library error: d_base_op is somehow corrupted. ");
+   }
+}
+
+/*
+ ****************************************************************
+ ****************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+void AsyncCommGroup::setMPITag(
+   const int mpi_tag)
+{
+   if (!isDone()) {
+      TBOX_ERROR("Resetting the MPI tag is not allowed\n"
+         << "during pending communications");
+   }
+   d_mpi_tag = mpi_tag;
+}
+
+/*
+ ****************************************************************
+ ****************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+void AsyncCommGroup::setUseMPICollectiveForFullGroups(
+   bool use_mpi_collective)
+{
+   if (!isDone()) {
+      TBOX_ERROR("Resetting the MPI collective option is not allowed\n"
+         << "during pending communications");
+   }
+   d_use_mpi_collective_for_full_groups = use_mpi_collective;
+}
+
+/*
+ ****************************************************************
+ ****************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+void AsyncCommGroup::setUseBlockingSendToChildren(
+   const bool flag)
+{
+   d_use_blocking_send_to_children = flag;
+}
+
+/*
+ ****************************************************************
+ ****************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+void AsyncCommGroup::setUseBlockingSendToParent(
+   const bool flag)
+{
+   d_use_blocking_send_to_parent = flag;
+}
+
+/*
+ ****************************************************************
+ ****************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+int AsyncCommGroup::getNumberOfChildren() const
+{
+   return static_cast<int>(d_nchild);
+}
+
+/*
+ ****************************************************************
+ ****************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+int AsyncCommGroup::toPosition(
+   int index) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (index < 0 || index >= d_group_size) {
+      TBOX_ERROR(
+         "Invalid index " << index << "\n"
+         << "should be in [0," << d_group_size - 1
+         << "].");
+   }
+#endif
+   const int position = index == 0 ? d_root_idx :
+      index == d_root_idx ? 0 :
+      index;
+   return position;
+}
+
+/*
+ ****************************************************************
+ ****************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+int AsyncCommGroup::toIndex(
+   int position) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (position < 0 || position >= d_group_size) {
+      TBOX_ERROR(
+         "Invalid parent position " << position
+         << " should be in [" << 0 << ','
+         << d_group_size - 1 << "].");
+   }
+#endif
+   const int index = position == 0 ? d_root_idx :
+      position == d_root_idx ? 0 :
+      position;
+   return index;
+}
+
+/*
+ ****************************************************************
+ ****************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+int AsyncCommGroup::toChildPosition(
+   int parent_pos,
+   int child) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (parent_pos < 0 || parent_pos >= d_group_size) {
+      TBOX_ERROR(
+         "Invalid parent position " << parent_pos
+         << " should be in [" << 0 << ','
+         << d_group_size - 1 << "].");
+   }
+#endif
+   return parent_pos * static_cast<int>(d_nchild) + 1 + child;
+}
+
+/*
+ ****************************************************************
+ ****************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+int AsyncCommGroup::toOldest(
+   int parent_pos) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (parent_pos < 0 || parent_pos >= d_group_size) {
+      TBOX_ERROR(
+         "Invalid parent position " << parent_pos
+         << " should be in [" << 0 << ','
+         << d_group_size - 1 << "].");
+   }
+#endif
+   return parent_pos * static_cast<int>(d_nchild) + 1;
+}
+
+/*
+ ****************************************************************
+ ****************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+int AsyncCommGroup::toYoungest(
+   int parent_pos) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (parent_pos < 0 || parent_pos >= d_group_size) {
+      TBOX_ERROR(
+         "Invalid parent position " << parent_pos
+         << " should be in [" << 0 << ','
+         << d_group_size - 1 << "].");
+   }
+#endif
+   return (parent_pos + 1) * static_cast<int>(d_nchild);
+}
+
+/*
+ ****************************************************************
+ ****************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+void AsyncCommGroup::resetStatus()
+{
+   /*
+    * Do not set d_mpi_status.count because it is not guaranteed
+    * to exist in every implemenation.
+    */
+   d_mpi_status.MPI_TAG =
+      d_mpi_status.MPI_SOURCE =
+         d_mpi_status.MPI_ERROR = -1;
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/AsyncCommGroup.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/AsyncCommGroup.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,680 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   All-to-one and one-to-all communication using a tree. 
+ *
+ ************************************************************************/
+#ifndef included_tbox_AsyncCommGroup
+#define included_tbox_AsyncCommGroup
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/AsyncCommStage.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/Timer.h"
+
+#include <vector>
+
+namespace SAMRAI {
+namespace tbox {
+
+/*!
+ * @brief Supports all-to-one and one-to-all asynchronous
+ * communication operations within a given group of processes by
+ * sending messages along the branches of a conceptual tree.
+ *
+ * This class was created to perform certain group communications
+ * without using MPI global communications, which require creating new
+ * MPI communicators (can be expensive) and does not support
+ * asynchronous operations (until MPI-2).
+ *
+ * The supported communications are asynchronous in that you can start
+ * one and wait for it or check back on it occassionally until it
+ * completes.  Simultaneous Asynchronous operations of many groups can
+ * be done by using a AsyncCommStage to allocate the groups and to
+ * check for completed communications.
+ *
+ * Supported operations are currently broadcast, gather and sum
+ * reduce.  Only integer data is supported.
+ *
+ * A tree is an acyclic graph in which a node at position pos has
+ * nchild children, and the following positions for its
+ *
+ * - parent: (pos-1)/nchild
+ * - first (oldest) child: pos*nchild+1
+ * - last (youngest) child: (pos+1)*nchild
+ *
+ * For example, nchild=2 corresponds to a binary tree.
+ *
+ * Communication is done by sending messages toward the root (for
+ * all-to-one operations) or leaves (for one-to-all operations).  For
+ * the former, we receive data from the children and send to the
+ * parent.  For the latter, we receive from the parent and send to the
+ * children.  Thus every communication involves a receive and a send
+ * (except at the root and leaf nodes of the tree).
+ *
+ * Using a tree generally gives better performance than having all
+ * processes in the the tree communicate directly with the root
+ * process.  Using MPI communicators corresponding to the groups may
+ * faster than using this class, but the cost of creating MPI
+ * communicators MAY be expensive.
+ *
+ * This class supports communication and uses MPI for message passing.
+ * If MPI is disabled, the job of this class disappears and the class
+ * is effectively empty.  The public interfaces still remain so the
+ * class can compile, but the implementations are trivial.
+ */
+class AsyncCommGroup:public AsyncCommStage::Member
+{
+
+public:
+   /*!
+    * @brief Default constructor does not set up anything.
+    * You must initialize() the object before using it.
+    */
+   AsyncCommGroup();
+
+   /*!
+    * @brief Construct communication group.
+    *
+    * The number of children per node is flexible.
+    *
+    * @param nchild Number of children per tree node in the group,
+    *        i.e., nchild=2 is a binary tree.
+    */
+   explicit AsyncCommGroup(
+      const size_t nchild,
+      AsyncCommStage* stage,
+      AsyncCommStage::Handler* handler = NULL);
+
+   /*!
+    * @brief Destructor.
+    */
+   virtual ~AsyncCommGroup(
+      void);
+
+   /*!
+    * @brief Initialize the object.
+    *
+    * Attach self to the given stage and set the Handler.
+    *
+    * @param nchild Number of children per tree node in the group,
+    * i.e., nchild=2 is a binary tree.
+    *
+    * @param stage The required stage used for completing non-blocking
+    * message passing calls.
+    *
+    * @param handler Optional handler (see AsyncCommStage::Member).
+    */
+   void
+   initialize(
+      const int nchild,
+      AsyncCommStage* stage,
+      AsyncCommStage::Handler* handler = NULL);
+
+   //@{
+   //! @name Define the communication group
+
+   /*!
+    * @brief Setup the tree for the given group of processes.  The
+    * root process is specified by its index in the group array.
+    *
+    * The root rank is specified by dereferencing @c group array with
+    * @c root_index.
+    */
+   void
+   setGroupAndRootIndex(
+      const SAMRAI_MPI& mpi,
+      const int* group_ranks,
+      const int group_size,
+      const int root_index);
+
+   /*!
+    * @brief Setup the group for the given group.  The root process is
+    * specified by its rank.
+    *
+    * The rank of the root is root_rank, which must be one of the
+    * ranks given in the group.
+    */
+   void
+   setGroupAndRootRank(
+      const SAMRAI_MPI& mpi,
+      const int* group_ranks,
+      const int group_size,
+      const int root_rank);
+
+   //@}
+
+   /*!
+    * @brief Set the MPI tag used for communication within the group.
+    *
+    * @attention This class is NOT (and cannot be) responsible for
+    * ensuring that the MPI communicator and tag are sufficient to
+    * select the correct messages.  Please specify appropriate values
+    * for the MPI communicator and tag.  Very elusive bugs can occur
+    * if incorrect messages are received.  To be safe, it is best to
+    * create a new communicator to avoid interference with other
+    * communications within SAMRAI.
+    */
+   void
+   setMPITag(
+      const int mpi_tag);
+
+   /*!
+    * @brief Set whether to use native MPI collective function calls
+    * when group includes all ranks in the MPI communicator.
+    *
+    * This option is off by default to avoid MPI lock-ups.  If you use
+    * it, make sure all processors can get to the collective operation
+    * to avoid lock-ups.
+    */
+   void
+   setUseMPICollectiveForFullGroups(
+      bool use_mpi_collective = true);
+
+   /*!
+    * @brief Set whether sends to parents should be blocking.
+    *
+    * The default is to use blocking send to parent.  Because there is
+    * just one parent, short messages can be buffered by MPI to
+    * improve the performance of blocking sends.  Blocking sends need
+    * not be checked for completion.
+    */
+   void
+   setUseBlockingSendToParent(
+      const bool flag);
+
+   /*!
+    * @brief Set whether sends to children should be blocking.
+    *
+    * The default is to use nonblocking send to children.
+    * Nonblocking sends to children are generally appropriate
+    * as there are multiple children.
+    */
+   void
+   setUseBlockingSendToChildren(
+      const bool flag);
+
+   //@{
+
+   /*!
+    * @name Communication methods
+    */
+
+   /*!
+    * @brief Begin a broadcast communication.
+    *
+    * Root process of broadcast may send less data (smaller size) than
+    * receivers of broadcast, in which case the missing data is
+    * considered irrelevant by the root.
+    *
+    * If this method returns false, checkBcast() must be called until
+    * it returns true before any change in object state is allowed.
+    *
+    * @return Whether operation is completed.
+    */
+   bool
+   beginBcast(
+      int* buffer,
+      int size);
+
+   /*!
+    * @brief Check the current broadcast communication and complete
+    * the broadcast if all MPI requests are fulfilled.
+    *
+    *
+    * If no communication is in progress, this call does nothing.
+    *
+    * @return Whether operation is completed.
+    */
+   bool
+   checkBcast();
+
+   /*!
+    * @brief Begin a gather communication.
+    *
+    * The gather operation mimics the results of MPI_Gather.
+    *
+    * Sending processes of gather may send less data (smaller size)
+    * than receivers, in which case the missing data is considered
+    * irrelevant by the sender.
+    *
+    * If this method returns false, checkGather() must be called until
+    * it returns true before any change in object state is allowed.
+    *
+    * On non-root processes, buffer should contain the data to be
+    * gathered.  On the root process, it should have enough space for
+    * all the data from all the processes in the group.
+    *
+    * @param buffer Data to gather.
+    *
+    * @param size Number of items contributed by each process.  This
+    * must be the same across processes.  However, the root's actual
+    * usable buffer must be big enough to hold the gathered data (size
+    * times the number of processes in the group).
+    *
+    * @return Whether operation is completed.
+    */
+   bool
+   beginGather(
+      int* buffer,
+      int size);
+
+   /*!
+    * @brief Check the current gather communication and complete the
+    * gather if all MPI requests are fulfilled.
+    *
+    * @return Whether operation is completed.
+    */
+   bool
+   checkGather();
+
+   /*!
+    * @brief Begin a sum reduce communication.
+    *
+    * Assume all messages are the same size.
+    *
+    * If this method returns false, checkSumReduce() must be called
+    * until it returns true before any change in object state is
+    * allowed.
+    *
+    * Buffer should contain the data to be gathered.
+    *
+    * @return Whether operation is completed.
+    */
+   bool
+   beginSumReduce(
+      int* buffer,
+      int size);
+
+   /*!
+    * @brief Check the current sum reduce communication and complete
+    * the sum reduce if all MPI requests are fulfilled.
+    *
+    * @return Whether operation is completed.
+    */
+   bool
+   checkSumReduce();
+
+   /*!
+    * @brief Check the current communication and complete it if all
+    * MPI requests are fulfilled.
+    */
+   bool
+   proceedToNextWait();
+
+   /*!
+    * @brief Whether the last communication operation has finished.
+    *
+    * This means more than just whether there is pending MPI requests
+    * such as that returned by hasPendingRequests().  The communication
+    * may be more complex, requiring several messages and copying of the
+    * received message into the correct buffer.
+    */
+   bool
+   isDone() const;
+
+   /*!
+    * @brief Wait for the current operation to complete.
+    */
+   void
+   completeCurrentOperation();
+
+   //@}
+
+   int
+   getNumberOfChildren() const;
+
+   void
+   logCurrentState(
+      std::ostream& co) const;
+
+private:
+   /*
+    * @brief Assert that user-set MPI parameters are valid.
+    */
+   void
+   checkMPIParams();
+
+   /*!
+    * @brief Operation disallowed due to primitive internal memory management.
+    */
+   AsyncCommGroup(
+      const AsyncCommGroup& r);
+
+   /*!
+    * @brief Operation disallowed by primitive internal memory management.
+    */
+   AsyncCommGroup&
+   operator = (
+      const AsyncCommGroup& r);
+
+   /*
+    * Use MPI collective function call to do communication.
+    */
+   bool
+   bcastByMpiCollective();
+
+   /*
+    * Use MPI collective function call to do communication.
+    */
+   bool
+   gatherByMpiCollective();
+
+   /*
+    * Use MPI collective function call to do communication.
+    */
+   bool
+   reduceByMpiCollective();
+
+   //! @brief Operations user would want to do.
+   enum BaseOp { undefined,
+                 gather,
+                 bcast,
+                 max_reduce,
+                 min_reduce,
+                 sum_reduce };
+   //! @brief Tasks, executed in order, to complete a base operation.
+   enum TaskOp { recv_start,
+                 recv_check,
+                 send_start,
+                 send_check,
+                 none };
+
+   struct ChildData {
+      //! @brief Rank of child process in the group.
+      int rank;
+      //! @brief Number of descendants on each child branch.
+      int size;
+      ChildData():rank(-1),
+         size(-1) {
+      }
+   };
+
+   /*!
+    * @brief Begin a generic reduce communication.
+    *
+    * This method is the workhorse underneath the public reduce methods.
+    *
+    * If this method returns false, proceedToNextWait() must
+    * be called until it returns true before any change
+    * in object state is allowed.
+    *
+    * Buffer should contain the data to be gathered.
+    *
+    * @return Whether operation is completed.
+    */
+   bool
+   beginReduce();
+
+   /*!
+    * @brief Check the current gather communication.
+    *
+    * This method is the workhorse underneath the public reduce methods.
+    *
+    * @return Whether operation is completed.
+    */
+   bool
+   checkReduce();
+
+   /*!
+    * @brief Perform reduction on data that after it has been brought
+    * to the local process.
+    *
+    * The exact reduce operation depends on the base operation.
+    */
+   void
+   reduceData(
+      int* output,
+      const int* data) const;
+
+   /*!
+    * @brief Compute the data that depends on the group definition.
+    *
+    * Extract and compute parts and characteristics of the tree
+    * relevant to the local process.
+    */
+   void
+   computeDependentData(
+      const int* group_ranks,
+      const int group_size);
+
+   void
+   resetStatus();
+
+   //@{
+   /*!
+    * @name Mappings between array indices, group positions and process ranks
+    */
+
+   /*
+    * pos refers the process position in the group (where root position == 0)
+    * idx refers the index of the process in the group
+    * rank refers the process rank
+    */
+
+   /*!
+    * @brief Convert the array index to the position.
+    */
+   int
+   toPosition(
+      int index) const;
+   /*!
+    * @brief Convert the position to the array index.
+    */
+   int
+   toIndex(
+      int position) const;
+
+   /*!
+    * @brief Compute the position of child child_id of a parent (whether
+    * or not that child really exists).
+    *
+    * @param parent_pos Position of the parent in the group.
+    * @param ic Index of the child.  (Zero coresponds to the first child.)
+    */
+   int
+   toChildPosition(
+      int parent_pos,
+      int ic) const;
+
+   /*!
+    * @brief Compute the oldest (lowest position) child position
+    * of a given position (whether or not that child really exists).
+    *
+    * Same as toChildPosition( parent_pos, 0 );
+    */
+   int
+   toOldest(
+      int parent_pos) const;
+   /*!
+    * @brief Compute the youngest (highest position) child position
+    * of a given position (whether or not that child really exists).
+    *
+    * Same as toChildPosition( parent_pos, d_nchild-1 );
+    */
+   int
+   toYoungest(
+      int parent_pos) const;
+
+   //@}
+
+   /*!
+    * @brief Initialize static timers.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   initializeCallback();
+
+   /*!
+    * @brief Free static timers.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   finalizeCallback();
+
+   /*!
+    * @brief Number of children per node.
+    */
+   size_t d_nchild;
+
+   /*!
+    * @brief Index of the local process in d_group_ranks.
+    *
+    * The group is defined by an array of process ranks.
+    * The index of a process refers to the index in the this array.
+    * The "position" of a process in the group represents
+    * the position in the group, where the nodes
+    * are numbered sequentially, starting at zero for the root.
+    *
+    * We require that the root has position zero.
+    * If the index of the root is zero, then positions are
+    * identical to indices.  If not, then the index of the
+    * root is swapped with zero to get positions.  These two
+    * cases correspond respectively to following trivial and
+    * nontrivial maps.
+    *
+    * @verbatim
+    *
+    *                 Trivial map           Nontrivial map
+    * Parameter     d_root_idx == 0         d_root_idx > 0
+    * ---------     ---------------         --------------
+    *
+    * index of root       0              d_root_idx
+    *
+    * index of          d_idx            d_idx
+    * local process
+    *
+    * index of            p              p == 0 ? d_root_idx :
+    * position p                         p == d_root_idx ? 0 :
+    *                                    p
+    *
+    * position of         i              i == 0 ? d_root_idx :
+    * index i                            i == d_root_idx ? 0 :
+    *                                    i
+    *
+    * @endverbatim
+    */
+   int d_idx;
+
+   /*!
+    * @brief Index of the root process in d_group_ranks.
+    */
+   int d_root_idx;
+
+   /*!
+    * @brief Index of the root process in d_group_ranks.
+    */
+   int d_root_rank;
+
+   int d_group_size;
+
+   /*!
+    * @brief Rank of parent process in the group.
+    *
+    * If negative, there is no parent (this is the root).
+    * In send_start tasks, send only to children with valid ranks
+    * (not -1).
+    */
+   int d_parent_rank;
+
+   //! @brief Data on each child branch.
+   ChildData* d_child_data;
+
+   /*!
+    * @brief Total of all branch sizes.
+    */
+   int d_branch_size_totl;
+
+   /*!
+    * @brief Operation being performed.
+    */
+   BaseOp d_base_op;
+
+   /*!
+    * @brief Next task in a current communication operation.
+    *
+    * If d_next_task_op is none, there is no current communication
+    * operation (the last one is completed).
+    */
+   TaskOp d_next_task_op;
+
+   /*!
+    * @brief External data input and output buffer.
+    *
+    * This provides the input and output for transfering data.
+    * The expected size of the buffer depends on the communication.
+    */
+   int* d_external_buf;
+
+   /*!
+    * @brief Size of d_external_buf.
+    */
+   int d_external_size;
+
+   /*!
+    * @brief Internal buffer scratch space.
+    *
+    * Used for gather and reduce operations but not for
+    * broadcast.  Not used when using MPI collective calls.
+    */
+   std::vector<int> d_internal_buf;
+
+   int d_mpi_tag;
+   SAMRAI_MPI d_mpi;
+
+   /*!
+    * @brief Number of processors in d_mpi_communicator.
+    *
+    * Redundant data maintained for convenience.
+    */
+   int d_nproc;
+
+   /*!
+    * @brief Rank processors in d_mpi_communicator.
+    *
+    * Redundant data maintained for convenience.
+    */
+   int d_rank;
+
+   bool d_use_mpi_collective_for_full_groups;
+   bool d_use_blocking_send_to_children;
+   bool d_use_blocking_send_to_parent;
+
+   // Make some temporary variable statuses to avoid repetitious allocations.
+   SAMRAI_MPI::Status d_mpi_status;
+
+   int d_mpi_err;
+
+   static Pointer<Timer> t_reduce_data;
+   static Pointer<Timer> t_wait_all;
+
+   static tbox::StartupShutdownManager::Handler
+   s_initialize_finalize_handler;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   /*!
+    * @brief Array of process ranks in the group.
+    *
+    * It is possible to code this class without storing all the
+    * ranks internally.  However, it is easier to debug if the
+    * ranks are available.
+    */
+   std::vector<int> d_group_ranks;
+#endif
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/tbox/AsyncCommGroup.I"
+#endif
+
+#endif  // included_tbox_AsyncCommGroup
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/AsyncCommPeer.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/AsyncCommPeer.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,893 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Staged peer-to-peer communication. 
+ *
+ ************************************************************************/
+#ifndef included_tbox_AsyncCommPeer_C
+#define included_tbox_AsyncCommPeer_C
+
+#include "SAMRAI/tbox/AsyncCommPeer.h"
+
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/TimerManager.h"
+
+#include <cstring>
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/tbox/AsyncCommPeer.I"
+#endif
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+/*
+ * This class uses a non-deterministic algorithm, which can be
+ * very hard to debug.  To help debugging, we keep some special
+ * debugging code that is activated when AsyncCommPeer_DEBUG_OUTPUT
+ * is defined.
+ */
+// #define AsyncCommPeer_DEBUG_OUTPUT
+
+template<class TYPE>
+Pointer<Timer> AsyncCommPeer<TYPE>::t_send_timer;
+template<class TYPE>
+Pointer<Timer> AsyncCommPeer<TYPE>::t_recv_timer;
+template<class TYPE>
+Pointer<Timer> AsyncCommPeer<TYPE>::t_waitall_timer;
+
+template<class TYPE>
+bool AsyncCommPeer<TYPE>::s_initialized = false;
+
+/*
+ ***********************************************************************
+ * FIXME: d_mpi should be initialized with commNull or SAMRAI's comm base.
+ ***********************************************************************
+ */
+template<class TYPE>
+AsyncCommPeer<TYPE>::AsyncCommPeer():
+   AsyncCommStage::Member(),
+   d_peer_rank(-1),
+   d_base_op(undefined),
+   d_next_task_op(none),
+   d_max_first_data_len(1),
+   d_full_count(0),
+   d_external_buf(NULL),
+   d_internal_buf_size(0),
+   d_internal_buf(),
+   d_mpi(tbox::SAMRAI_MPI::getSAMRAIWorld()),
+   d_tag0(-1),
+   d_tag1(-1)
+{
+
+   if (!s_initialized) {
+      s_initialized = AsyncCommPeer<TYPE>::initialize();
+   }
+   d_report_send_completion[0] = d_report_send_completion[1] = false;
+}
+
+/*
+ ***********************************************************************
+ * Construct a simple object that works with a communication stage.
+ * All parameters are set to reasonable defaults or, if appropriate,
+ * invalid values.
+ * FIXME: d_mpi should be initialized with commNull or SAMRAI's comm base.
+ ***********************************************************************
+ */
+template<class TYPE>
+AsyncCommPeer<TYPE>::AsyncCommPeer(
+   AsyncCommStage* stage,
+   AsyncCommStage::Handler* handler):
+   AsyncCommStage::Member(2, stage, handler),
+   d_peer_rank(-1),
+   d_base_op(undefined),
+   d_next_task_op(none),
+   d_max_first_data_len(1),
+   d_full_count(0),
+   d_external_buf(NULL),
+   d_internal_buf_size(0),
+   d_internal_buf(),
+   d_mpi(tbox::SAMRAI_MPI::getSAMRAIWorld()),
+   d_tag0(-1),
+   d_tag1(-1)
+{
+   if (!s_initialized) {
+      s_initialized = AsyncCommPeer<TYPE>::initialize();
+   }
+   d_report_send_completion[0] = d_report_send_completion[1] = false;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+template<class TYPE>
+AsyncCommPeer<TYPE>::~AsyncCommPeer()
+{
+   if (!isDone()) {
+      TBOX_ERROR("Deallocating an AsyncCommPeer object while communication\n"
+         << "is pending leads to lost messages."
+         << "mpi_communicator = " << d_mpi.getCommunicator()
+         << "mpi_tag = " << d_tag0 << ", " << d_tag1);
+   }
+
+   if (d_internal_buf) {
+      free(d_internal_buf);
+   }
+
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+template<class TYPE>
+AsyncCommPeer<TYPE>::AsyncCommPeer(
+   const AsyncCommPeer& r):
+   AsyncCommStage::Member(0, NULL, NULL)
+{
+   (void)r;
+   TBOX_ERROR(
+      "Copy constructor disallowed due to primitive internal memory management.");
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+template<class TYPE>
+AsyncCommPeer<TYPE> &AsyncCommPeer<TYPE>::operator = (
+   const AsyncCommPeer& r) {
+   (void)r;
+   TBOX_ERROR(
+      "Assignment operator disallowed due to primitive internal memory management.");
+   return *this;
+}
+
+/*
+ ***********************************************************************
+ * Initialize data as if constructed with the given arguments.
+ ***********************************************************************
+ */
+template<class TYPE>
+void AsyncCommPeer<TYPE>::initialize(
+   AsyncCommStage* stage,
+   AsyncCommStage::Handler* handler)
+{
+   if (!isDone()) {
+      TBOX_ERROR("It is illegal to re-initialize a AsyncCommPeer\n"
+         << "while it has current messages.\n");
+   }
+   attachStage(2, stage);
+   setHandler(handler);
+   d_base_op = undefined;
+   d_next_task_op = none;
+}
+
+/*
+ *********************************************************************
+ * Check whether the current (or last) operation has completed.
+ *********************************************************************
+ */
+template<class TYPE>
+bool AsyncCommPeer<TYPE>::proceedToNextWait()
+{
+   switch (d_base_op) {
+      case send: return checkSend();
+
+      case recv: return checkRecv();
+
+      case undefined:
+         TBOX_ERROR("There is no current operation to check.\n"
+         << "mpi_communicator = " << d_mpi.getCommunicator()
+         << "mpi_tag = " << d_tag0 << ", " << d_tag1);
+      default:
+         TBOX_ERROR("Library error: attempt to use an operation that\n"
+         << "has not been written yet"
+         << "mpi_communicator = " << d_mpi.getCommunicator()
+         << "mpi_tag = " << d_tag0 << ", " << d_tag1);
+   }
+   return true;
+}
+
+/*
+ *********************************************************************
+ * Wait for current communication operation to complete.
+ *
+ * Wait for all requests to come in and call proceedToNextWait().
+ * Repeat until all tasks of the entire communication operation is
+ * complete.
+ *********************************************************************
+ */
+template<class TYPE>
+void AsyncCommPeer<TYPE>::completeCurrentOperation()
+{
+   SAMRAI_MPI::Request * const req = getRequestPointer();
+   SAMRAI_MPI::Status* mpi_status = getStatusPointer();
+
+   while (!isDone()) {
+
+      t_waitall_timer->start();
+      int errf = d_mpi.Waitall(2,
+            req,
+            mpi_status);
+      t_waitall_timer->stop();
+
+      if (errf != MPI_SUCCESS) {
+         TBOX_ERROR("Error in MPI_Waitall call.\n"
+            << "mpi_communicator = " << d_mpi.getCommunicator()
+            << "mpi_tag = " << d_tag0);
+      }
+
+      proceedToNextWait();
+
+   }
+}
+
+/*
+ ************************************************************************
+ * Set internal parameters for performing the send
+ * and call checkSend to perform the communication.
+ ************************************************************************
+ */
+template<class TYPE>
+bool AsyncCommPeer<TYPE>::beginSend(
+   const TYPE* buffer,
+   int size)
+{
+   if (d_next_task_op != none) {
+      TBOX_ERROR("Cannot begin communication while another is in progress."
+         << "mpi_communicator = " << d_mpi.getCommunicator()
+         << "mpi_tag = " << d_tag0);
+   }
+#ifdef DEBUG_CHECK_ASSERTIONS
+   checkMPIParams();
+#endif
+   d_external_buf = buffer;
+   d_full_count = size;
+   d_base_op = send;
+   d_next_task_op = send_start;
+   bool status = checkSend();
+   d_external_buf = NULL;
+   return status;
+}
+
+// SGS should we initialize if DEBUG_INITIALIZE_UNDEFINED ?
+template<class TYPE>
+void AsyncCommPeer<TYPE>::resizeBuffer(
+   size_t size)
+{
+   if (d_internal_buf_size < size) {
+#ifdef DEBUG_INITIALIZE_UNDEFINED
+      const size_t orig_size = d_internal_buf_size;
+#endif
+      d_internal_buf_size = size;
+      if (d_internal_buf) {
+         d_internal_buf = (FlexData *)realloc(d_internal_buf, d_internal_buf_size * sizeof(FlexData));
+#ifdef DEBUG_INITIALIZE_UNDEFINED
+         memset(d_internal_buf + orig_size, 0, (size - orig_size) * sizeof(FlexData));
+#endif
+      } else {
+#ifdef DEBUG_INITIALIZE_UNDEFINED
+         d_internal_buf = (FlexData *)calloc(d_internal_buf_size, sizeof(FlexData));
+#else
+         d_internal_buf = (FlexData *)malloc(d_internal_buf_size * sizeof(FlexData));
+#endif
+      }
+   }
+}
+
+/*
+ ************************************************************************
+ * Check and advance a send operation.  The exact actions depend on where
+ * in the send operation we are.
+ *
+ * This method is written to exit early if progress is blocked by
+ * communication waits.  It uses d_next_task_op to mark its progress and
+ * return there when called again.  The big switch statement jumps to the
+ * place where it needs to continue.
+ ************************************************************************
+ */
+template<class TYPE>
+bool AsyncCommPeer<TYPE>::checkSend()
+{
+   if (d_base_op != send) {
+      TBOX_ERROR("Cannot check nonexistent send operation."
+         << " mpi_communicator = " << d_mpi.getCommunicator()
+         << " mpi_tag = " << d_tag0 << ", " << d_tag1);
+   }
+   SAMRAI_MPI::Request * const req = getRequestPointer();
+   int flag = 0;
+
+   switch (d_next_task_op) {
+
+      case none:
+         break;
+
+      case send_start:
+
+         if (d_max_first_data_len >= d_full_count) {
+            /*
+             * Data fits within the limit of the first message, so
+             * send it all in a single chunk.  Append integers to the
+             * data indicating this is the first message and the size
+             * of the message.
+             */
+
+            const size_t first_chunk_count = getNumberOfFlexData(d_full_count);
+            resizeBuffer(first_chunk_count + 2);
+            memcpy(d_internal_buf,
+               d_external_buf,
+               d_full_count * sizeof(TYPE));
+            d_internal_buf[first_chunk_count].i = 0; // Indicates first message.
+            d_internal_buf[first_chunk_count + 1].i =
+               static_cast<int>(d_full_count); // True data count.
+
+            TBOX_ASSERT(req[0] == MPI_REQUEST_NULL);
+            req[0] = MPI_REQUEST_NULL;
+            t_send_timer->start();
+
+            // SGS
+//	    FlexData *sgs_temp = new FlexData[first_chunk_count + 3];
+//	    memcpy(sgs_temp, d_internal_buf, (first_chunk_count + 3) * sizeof(FlexData));
+//	    delete [] sgs_temp;
+
+//	    free(d_internal_buf);
+
+            d_mpi_err = d_mpi.Isend(d_internal_buf,
+                  static_cast<int>(sizeof(FlexData) * (first_chunk_count + 2)),
+                  MPI_BYTE,
+                  d_peer_rank,
+                  d_tag0,
+                  &req[0]);
+            t_send_timer->stop();
+            if (d_mpi_err != MPI_SUCCESS) {
+               TBOX_ERROR("Error in MPI_Isend."
+                  << "mpi_communicator = " << d_mpi.getCommunicator()
+                  << "mpi_tag = " << d_tag0);
+            }
+#ifdef AsyncCommPeer_DEBUG_OUTPUT
+            d_report_send_completion[0] = true;
+            tbox::plog << "tag0-" << d_tag0
+                       << " sending " << d_full_count << " TYPEs + 2 int as "
+                       << sizeof(FlexData) * (d_full_count + 2)x
+                       << " bytes to " << d_peer_rank << " in checkSend"
+                       << std::endl;
+#endif
+         } else {
+            /*
+             * Send oversized data in two chunks.  The first chunk contains the
+             * first d_max_first_data_len items.  The second contains the rest.
+             * Each chunk is appended with a sequence number and the true size of
+             * the data the user wants to send.
+             *
+             * Note that we allocate d_internal_buf to hold each chunk with its
+             * overhead data.  Thus, the two chunks will not be contiguous in
+             * d_internal_buf.
+             */
+
+            const size_t first_chunk_count = getNumberOfFlexData(
+                  d_max_first_data_len);
+            const size_t second_chunk_count = getNumberOfFlexData(
+                  d_full_count - d_max_first_data_len);
+
+            resizeBuffer(first_chunk_count + 2 + second_chunk_count + 2);
+
+            // Stuff and send first message.
+            std::memcpy(d_internal_buf,
+               d_external_buf,
+               d_max_first_data_len * (sizeof(TYPE)));
+            d_internal_buf[first_chunk_count].i = 0;
+            d_internal_buf[first_chunk_count + 1].i =
+               static_cast<int>(d_full_count);
+            TBOX_ASSERT(req[0] == MPI_REQUEST_NULL);
+#ifdef DEBUG_CHECK_ASSERTIONS
+            req[0] = MPI_REQUEST_NULL;
+#endif
+            t_send_timer->start();
+            d_mpi_err = d_mpi.Isend(
+                  d_internal_buf,
+                  static_cast<int>(sizeof(FlexData) * (first_chunk_count + 2)),
+                  MPI_BYTE,
+                  d_peer_rank,
+                  d_tag0,
+                  &req[0]);
+            t_send_timer->stop();
+            if (d_mpi_err != MPI_SUCCESS) {
+               TBOX_ERROR("Error in MPI_Isend."
+                  << "mpi_communicator = " << d_mpi.getCommunicator()
+                  << "mpi_tag = " << d_tag0);
+            }
+
+            // Stuff and send second message.
+            memcpy(&d_internal_buf[first_chunk_count + 2],
+               d_external_buf + d_max_first_data_len,
+               (d_full_count - d_max_first_data_len) * (sizeof(TYPE)));
+            d_internal_buf[first_chunk_count + second_chunk_count + 2].i = 1;
+            d_internal_buf[first_chunk_count + second_chunk_count
+                           + 3].i = static_cast<int>(d_full_count);
+            TBOX_ASSERT(req[1] == MPI_REQUEST_NULL);
+#ifdef DEBUG_CHECK_ASSERTIONS
+            req[1] = MPI_REQUEST_NULL;
+#endif
+            t_send_timer->start();
+            d_mpi_err = d_mpi.Isend(
+                  &d_internal_buf[first_chunk_count + 2],
+                  static_cast<int>(sizeof(FlexData) * (second_chunk_count + 2)),
+                  MPI_BYTE,
+                  d_peer_rank,
+                  d_tag1,
+                  &req[1]);
+            t_send_timer->stop();
+#ifdef AsyncCommPeer_DEBUG_OUTPUT
+            d_report_send_completion[1] = true;
+            tbox::plog << "tag1-" << d_tag1
+                       << " sending " << d_full_count << " TYPEs + 4 int as "
+                       << sizeof(FlexData) * (first_chunk_count + 2) << " and "
+                       << sizeof(FlexData) * (second_chunk_count + 2)
+                       << " byte chunks to " << d_peer_rank << " in checkSend"
+                       << std::endl;
+#endif
+         }
+
+      case send_check:
+         // Determine if send completed.
+         for (int ic = 0; ic < 2; ++ic) {
+            if (req[ic] != MPI_REQUEST_NULL) {
+               SAMRAI_MPI::Status* mpi_status = getStatusPointer();
+               resetStatus(mpi_status[ic]);
+               d_mpi_err = tbox::SAMRAI_MPI::Test(&req[ic], &flag, &mpi_status[ic]);
+               if (d_mpi_err != MPI_SUCCESS) {
+                  TBOX_ERROR("Error in MPI_Test.\n"
+                     << "Error-in-status is "
+                     << (d_mpi_err == MPI_ERR_IN_STATUS) << '\n'
+                     << "MPI_ERROR value is " << mpi_status[ic].MPI_ERROR
+                     << '\n'
+                     << "mpi_communicator = " << d_mpi.getCommunicator()
+                     << "mpi_tag = " << d_tag0);
+               }
+            }
+            if (req[ic] == MPI_REQUEST_NULL && d_report_send_completion[ic]) {
+#ifdef AsyncCommPeer_DEBUG_OUTPUT
+               tbox::plog << "tag" << ic << "-" << (ic == 0 ? d_tag0 : d_tag1)
+                          << " sent <N/A> bytes to " << d_peer_rank
+                          << " in checkSend"
+                          << std::endl;
+               d_report_send_completion[ic] = false;
+#endif
+            }
+         }
+
+         if (req[0] != MPI_REQUEST_NULL || req[1] != MPI_REQUEST_NULL) {
+            // Sends not completed.  Need to repeat send_check.
+            d_next_task_op = send_check;
+         } else {
+            // Sends completed.  No next task.
+            d_next_task_op = none;
+            d_external_buf = NULL;
+            d_full_count = 0;
+         }
+
+         break;
+
+      default:
+         TBOX_ERROR("checkSend is incompatible with current state."
+         << "mpi_communicator = " << d_mpi.getCommunicator()
+         << "mpi_tag = " << d_tag0);
+   }
+
+   return d_next_task_op == none;
+}
+
+/*
+ ************************************************************************
+ * Set internal parameters for performing the receive
+ * and call checkRecv to perform the communication.
+ ************************************************************************
+ */
+template<class TYPE>
+bool AsyncCommPeer<TYPE>::beginRecv()
+{
+   if (d_next_task_op != none) {
+      TBOX_ERROR("Cannot begin communication while another is in progress."
+         << "mpi_communicator = " << d_mpi.getCommunicator()
+         << "mpi_tag = " << d_tag0);
+   }
+#ifdef DEBUG_CHECK_ASSERTIONS
+   checkMPIParams();
+#endif
+   d_full_count = 0;
+   d_base_op = recv;
+   d_next_task_op = recv_start;
+   return checkRecv();
+}
+
+/*
+ ************************************************************************
+ * Check and advance a receive operation.  The exact actions depend on
+ * where in the receive operation we are.
+ *
+ * This method is written to exit early if progress is blocked by
+ * communication waits.  It uses d_next_task_op to mark its progress and
+ * return there when called again.  The big switch statement jumps to the
+ * place where it needs to continue.
+ ************************************************************************
+ */
+template<class TYPE>
+bool AsyncCommPeer<TYPE>::checkRecv()
+{
+   if (d_base_op != recv) {
+      TBOX_ERROR("Cannot check nonexistent receive operation."
+         << " mpi_communicator = " << d_mpi.getCommunicator()
+         << " mpi_tag = " << d_tag0 << ", " << d_tag1);
+   }
+   SAMRAI_MPI::Request * const req = getRequestPointer();
+   SAMRAI_MPI::Status * const mpi_status = getStatusPointer();
+   int flag = 0;
+
+   switch (d_next_task_op) {
+
+      case none:
+         break;
+
+      case recv_start:
+
+         d_full_count = 0; // Full count is unknown before receiving first message.
+
+         {
+            // Post receive for first (and maybe only) chunk of data.
+            const size_t first_chunk_count = getNumberOfFlexData(
+                  d_max_first_data_len);
+            resizeBuffer(first_chunk_count + 2);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(req[0] == MPI_REQUEST_NULL);
+            req[0] = MPI_REQUEST_NULL;
+#endif
+            t_recv_timer->start();
+            d_mpi_err = d_mpi.Irecv(
+                  d_internal_buf,
+                  static_cast<int>(sizeof(FlexData) * (first_chunk_count + 2)),
+                  MPI_BYTE,
+                  d_peer_rank,
+                  d_tag0,
+                  &req[0]);
+            t_recv_timer->stop();
+            if (d_mpi_err != MPI_SUCCESS) {
+               TBOX_ERROR("Error in MPI_Isend."
+                  << "mpi_communicator = " << d_mpi.getCommunicator()
+                  << "mpi_tag = " << d_tag0);
+            }
+#ifdef AsyncCommPeer_DEBUG_OUTPUT
+            tbox::plog << "tag0-" << d_tag0
+                       << " receiving up to " << d_max_first_data_len
+                       << " TYPEs and 2 ints as "
+                       << sizeof(FlexData) * (first_chunk_count + 2)
+                       << " bytes from " << d_peer_rank
+                       << " in checkRecv"
+                       << std::endl;
+#endif
+         }
+
+      case recv_check0:
+
+         // Check on first message.
+
+         if (req[0] != MPI_REQUEST_NULL) {
+            resetStatus(mpi_status[0]);
+            d_mpi_err = tbox::SAMRAI_MPI::Test(&req[0], &flag, &mpi_status[0]);
+            if (d_mpi_err != MPI_SUCCESS) {
+               TBOX_ERROR("Error in MPI_Test.\n"
+                  << "Error-in-status is "
+                  << (d_mpi_err == MPI_ERR_IN_STATUS) << '\n'
+                  << "MPI_ERROR value is " << mpi_status[0].MPI_ERROR
+                  << '\n'
+                  << "mpi_communicator = " << d_mpi.getCommunicator()
+                  << "mpi_tag = " << d_tag0);
+            }
+         }
+
+         if (req[0] != MPI_REQUEST_NULL) {
+            // First message not yet received.  Need to recheck later.
+            d_next_task_op = recv_check0;
+            break;
+         } else {
+            // First message is received.
+            int icount = -1;
+            d_mpi_err = tbox::SAMRAI_MPI::Get_count(&mpi_status[0], MPI_BYTE, &icount);
+            if (d_mpi_err != MPI_SUCCESS) {
+               TBOX_ERROR("Error in MPI_Get_count."
+                  << "error flag = " << d_mpi_err);
+            }
+            const size_t count = icount / sizeof(FlexData); // Convert byte count to item count.
+#ifdef DEBUG_CHECK_ASSERTIONS
+#ifdef AsyncCommPeer_DEBUG_OUTPUT
+            tbox::plog << "tag0-" << d_tag0
+                       << " received " << count << " FlexData as " << icount
+                       << " bytes from " << d_peer_rank << " in checkRecv"
+                       << std::endl;
+#endif
+            TBOX_ASSERT(count <= d_max_first_data_len + 2);
+            TBOX_ASSERT(mpi_status[0].MPI_TAG == d_tag0);
+            TBOX_ASSERT(mpi_status[0].MPI_SOURCE == d_peer_rank);
+            TBOX_ASSERT(req[0] == MPI_REQUEST_NULL);
+#endif
+            // Get full count embedded in message.
+            d_full_count = d_internal_buf[count - 1].i;
+
+            TBOX_ASSERT(d_internal_buf[count - 2].i == 0); // Sequence number check.
+            TBOX_ASSERT(getNumberOfFlexData(d_full_count) >= count - 2);
+
+            if (d_full_count > d_max_first_data_len) {
+
+               /*
+                * There is another data chunk.  Post another receive
+                * call, placing it immediately after the data portion
+                * of the first chunk so that the user data is
+                * contiguous in d_internal_buf.
+                */
+
+               const size_t second_chunk_count = getNumberOfFlexData(
+                     d_full_count - d_max_first_data_len);
+
+               // SGS this is bad coding.`
+               resizeBuffer(d_internal_buf_size + second_chunk_count);
+
+               TBOX_ASSERT(req[1] == MPI_REQUEST_NULL);
+               req[1] = MPI_REQUEST_NULL;
+               t_recv_timer->start();
+               d_mpi_err = d_mpi.Irecv(
+                     (TYPE *)(d_internal_buf) + d_max_first_data_len,
+                     static_cast<int>(sizeof(FlexData) * (second_chunk_count + 2)),
+                     MPI_BYTE,
+                     d_peer_rank,
+                     d_tag1,
+                     &req[1]);
+               t_recv_timer->stop();
+               if (d_mpi_err != MPI_SUCCESS) {
+                  TBOX_ERROR("Error in MPI_Isend."
+                     << "mpi_communicator = " << d_mpi.getCommunicator()
+                     << "mpi_tag = " << d_tag0);
+               }
+#ifdef AsyncCommPeer_DEBUG_OUTPUT
+               tbox::plog << "tag1-" << d_tag1
+                          << " receiving " << d_full_count - d_max_first_data_len
+                          << " from " << d_peer_rank
+                          << " in checkRecv"
+                          << std::endl;
+#endif
+            } else {
+               /*
+                * There is no follow-up data.  All data are now received.
+                * So we don't need to check the second message.
+                */
+               d_next_task_op = none;
+               break;
+            }
+         }
+
+      case recv_check1:
+
+         // Check on the second message.
+
+         if (req[1] != MPI_REQUEST_NULL) {
+            resetStatus(mpi_status[1]);
+            d_mpi_err = tbox::SAMRAI_MPI::Test(&req[1], &flag, &mpi_status[1]);
+            if (d_mpi_err != MPI_SUCCESS) {
+               TBOX_ERROR("Error in MPI_Test.\n"
+                  << "Error-in-status is "
+                  << (d_mpi_err == MPI_ERR_IN_STATUS) << '\n'
+                  << "MPI_ERROR value is " << mpi_status[1].MPI_ERROR
+                  << '\n'
+                  << "mpi_communicator = " << d_mpi.getCommunicator()
+                  << "mpi_tag = " << d_tag1);
+            }
+            if (flag == 1) {
+               // Second message received.
+               const size_t first_chunk_count = getNumberOfFlexData(
+                     d_max_first_data_len);
+               const size_t second_chunk_count = getNumberOfFlexData(
+                     d_full_count - d_max_first_data_len);
+#ifdef DEBUG_CHECK_ASSERTIONS
+               int icount = -1;
+               tbox::SAMRAI_MPI::Get_count(&mpi_status[1], MPI_BYTE, &icount);
+               const size_t count = icount / sizeof(FlexData); // Convert byte count to item count.
+#ifdef AsyncCommPeer_DEBUG_OUTPUT
+               tbox::plog << "tag1-" << d_tag1
+                          << " received " << count << " FlexType from "
+                          << d_peer_rank << " in checkRecv"
+                          << std::endl;
+#endif
+               TBOX_ASSERT(count == second_chunk_count + 2);
+               TBOX_ASSERT(mpi_status[1].MPI_TAG == d_tag1);
+               TBOX_ASSERT(mpi_status[1].MPI_SOURCE == d_peer_rank);
+               TBOX_ASSERT(req[1] == MPI_REQUEST_NULL);
+#endif
+               /*
+                * If sizeof(TYPE) < sizeof(FlexData), there is a
+                * potential side effect that the integer overhead info
+                * may not have the correct allignment and must be
+                * realligned before being readable.
+                *
+                * I shift_bytes is non-zero, there is an allignment
+                * problem wherein the integer overhead data does not
+                * start on an integer memory.  The overhead data was
+                * correctly alligned on the sending processor, but on
+                * the receiver, we put the second message right at the
+                * end of the first chunk of data (to make the chunks
+                * contiguous), which may shift the integer data away
+                * from integer allignment.  The overhead data should
+                * be shifted to allign with FlexData before being
+                * read.
+                */
+               const int shift_bytes = static_cast<int>(
+                  first_chunk_count * sizeof(FlexData) - d_max_first_data_len
+                  * sizeof(TYPE));
+               TBOX_ASSERT(shift_bytes >= 0);
+               if (shift_bytes > 0) {
+                  char* correct_place, * current_place;
+                  current_place = (char *)((TYPE *)(d_internal_buf)
+                                           + d_max_first_data_len
+                                           + second_chunk_count
+                                           * sizeof(FlexData));
+                  correct_place = current_place + shift_bytes;
+                  std::memmove(correct_place, current_place, 2
+                     * sizeof(FlexData));
+               }
+               // Check that this actually is the second message:
+               TBOX_ASSERT(d_internal_buf[first_chunk_count
+                                          + second_chunk_count].i == 1);
+               // Check consistency of the claimed full size:
+               TBOX_ASSERT(
+                  d_internal_buf[first_chunk_count
+                                 + second_chunk_count + 1].i ==
+                  static_cast<int>(d_full_count));
+            }
+         }
+         if (req[1] != MPI_REQUEST_NULL) {
+            d_next_task_op = recv_check1;
+         } else {
+            d_next_task_op = none;
+         }
+
+         break;
+
+      default:
+         TBOX_ERROR("checkRecv is incompatible with current state."
+         << "mpi_communicator = " << d_mpi.getCommunicator()
+         << "mpi_tag = " << d_tag0);
+   }
+
+   return d_next_task_op == none;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+template<class TYPE>
+int AsyncCommPeer<TYPE>::getRecvSize() const
+{
+   if (d_base_op != recv) {
+      TBOX_ERROR("AsyncCommPeer::getRecvSize() called without a\n"
+         << "corresponding receive.");
+   }
+   return static_cast<int>(d_full_count);
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+template<class TYPE>
+const TYPE * AsyncCommPeer<TYPE>::getRecvData() const
+{
+   if (d_base_op != recv) {
+      TBOX_ERROR("AsyncCommPeer::getRecvData() called without a\n"
+         << "corresponding receive.");
+   }
+   return &d_internal_buf[0].t;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+template<class TYPE>
+void AsyncCommPeer<TYPE>::clearRecvData()
+{
+   if (d_next_task_op != none) {
+      TBOX_ERROR("AsyncCommPeer::clearRecvData() called during an\n"
+         << "operation.");
+   }
+   // d_internal_buf.clear();
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+template<class TYPE>
+void AsyncCommPeer<TYPE>::checkMPIParams()
+{
+   if (d_tag0 < 0 || d_tag1 < 0) {
+      TBOX_ERROR("AsyncCommPeer: Invalid MPI tag values "
+         << d_tag0 << " and " << d_tag1
+         << "\nUse setMPITag() to set it.");
+   }
+   if (d_mpi.getCommunicator() == tbox::SAMRAI_MPI::commNull) {
+      TBOX_ERROR("AsyncCommPeer: Invalid MPI communicator value "
+         << d_mpi.getCommunicator() << "\nUse setCommunicator() to set it.");
+   }
+   if (d_peer_rank < 0) {
+      TBOX_ERROR("AsyncCommPeer: Invalid peer rank "
+         << d_peer_rank << "\nUse setPeerRank() to set it.");
+   }
+   if (d_peer_rank == d_mpi.getRank() && !tbox::SAMRAI_MPI::usingMPI()) {
+      TBOX_ERROR("AsyncCommPeer: Peer rank cannot be the local rank\n"
+         << "when running without MPI.");
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+template<class TYPE>
+void AsyncCommPeer<TYPE>::logCurrentState(
+   std::ostream& co) const
+{
+   SAMRAI_MPI::Request * const req = getRequestPointer();
+   co << "State=" << 10 * d_base_op + d_next_task_op
+   << "  tag-0=" << d_tag0
+   << "  tag-1=" << d_tag1
+   << "  communicator=" << d_mpi.getCommunicator()
+   << "  extern. buff=" << d_external_buf
+   << "  size=" << d_full_count
+   << "  request,status-0=" << (void *)req[0]
+   << "  request,status-1=" << (void *)req[1]
+   ;
+   co << '\n';
+}
+
+/*
+ ***************************************************************************
+ * Release static timers.  To be called by shutdown registry to make sure
+ * memory for timers does not leak.
+ ***************************************************************************
+ */
+template<class TYPE>
+void AsyncCommPeer<TYPE>::finalizeCallback()
+{
+   t_send_timer.setNull();
+   t_recv_timer.setNull();
+   t_waitall_timer.setNull();
+   s_initialized = false;
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Unsuppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/AsyncCommPeer.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/AsyncCommPeer.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,172 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Staged peer-to-peer communication. 
+ *
+ ************************************************************************/
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/TimerManager.h"
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+/*
+ ****************************************************************
+ ****************************************************************
+ */
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void AsyncCommPeer<TYPE>::setMPITag(
+   const int tag0,
+   const int tag1)
+{
+   if (!isDone()) {
+      TBOX_ERROR("Resetting the MPI tag is not allowed\n"
+         << "during pending communications");
+   }
+   d_tag0 = tag0;
+   d_tag1 = tag1;
+}
+
+/*
+ ****************************************************************
+ ****************************************************************
+ */
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void AsyncCommPeer<TYPE>::setMPI(
+   const SAMRAI_MPI& mpi)
+{
+   if (!isDone()) {
+      TBOX_ERROR("Resetting the MPI object is not allowed\n"
+         << "during pending communications");
+   }
+   d_mpi = mpi;
+}
+
+/*
+ ****************************************************************
+ ****************************************************************
+ */
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+bool AsyncCommPeer<TYPE>::isDone() const
+{
+   return d_next_task_op == none;
+}
+
+/*
+ ****************************************************************
+ ****************************************************************
+ */
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void AsyncCommPeer<TYPE>::setPeerRank(
+   int peer_rank)
+{
+   if (!isDone()) {
+      TBOX_ERROR("Resetting the peer is not allowed\n"
+         << "during pending communications");
+   }
+   d_peer_rank = peer_rank;
+}
+
+/*
+ ****************************************************************
+ ****************************************************************
+ */
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int AsyncCommPeer<TYPE>::getPeerRank() const
+{
+   return d_peer_rank;
+}
+
+/*
+ ****************************************************************
+ ****************************************************************
+ */
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void AsyncCommPeer<TYPE>::limitFirstDataLength(
+   size_t limit)
+{
+   d_max_first_data_len = limit;
+}
+
+/*
+ ****************************************************************
+ ****************************************************************
+ */
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void AsyncCommPeer<TYPE>::resetStatus(
+   SAMRAI_MPI::Status& mpi_status)
+{
+   /*
+    * Do not set stat.count because it is not guaranteed
+    * to exist in every implemenation.
+    */
+   mpi_status.MPI_TAG =
+      mpi_status.MPI_SOURCE =
+         mpi_status.MPI_ERROR = -1;
+}
+
+/*
+ ****************************************************************
+ ****************************************************************
+ */
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+size_t AsyncCommPeer<TYPE>::getNumberOfFlexData(
+   size_t number_of_type_data) const
+{
+   size_t number_of_flexdata = number_of_type_data * sizeof(TYPE);
+   number_of_flexdata = number_of_flexdata / sizeof(FlexData)
+      + (number_of_flexdata % sizeof(FlexData) > 0);
+   return number_of_flexdata;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+bool AsyncCommPeer<TYPE>::initialize(
+   void)
+{
+   static StartupShutdownManager::Handler handler(
+      0,
+      0,
+      0,
+      AsyncCommPeer::finalizeCallback,
+      tbox::StartupShutdownManager::priorityTimers);
+
+   t_waitall_timer = TimerManager::getManager()->
+      getTimer("tbox::AsyncCommPeer::wait_all()");
+   t_send_timer = TimerManager::getManager()->
+      getTimer("tbox::AsyncCommPeer::MPI_ISend");
+   t_recv_timer = TimerManager::getManager()->
+      getTimer("tbox::AsyncCommPeer::MPI_Irecv");
+
+   return true;
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/AsyncCommPeer.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/AsyncCommPeer.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,486 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Staged peer-to-peer communication. 
+ *
+ ************************************************************************/
+#ifndef included_tbox_AsyncCommPeer
+#define included_tbox_AsyncCommPeer
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/AsyncCommStage.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/TimerManager.h"
+
+#include <algorithm>
+#include <cstring>
+
+namespace SAMRAI {
+namespace tbox {
+
+/*!
+ * @brief Supports point-to-point asynchronous communication
+ * operations that can overlap other communcations using a
+ * AsyncCommStage.
+ *
+ * To use this class:
+ *
+ * -# Construct an object with a stage or @c initialize() it with a
+ *    stage.
+ *
+ * -# Set the MPI communicator and tag values for use in the MPI
+ *    nonblocking message passing functions.
+ *
+ * -# Set the peer rank using setPeerRank().
+ *
+ * -# Call the beginSend() and beginRecv() functions.  Make sure
+ *    there is a matching call on the peer processor.
+ *
+ * -# Use the stage to advance the message passing operations.  The
+ *    stage tells you which members have completed their operations.
+ *
+ * -# Received data can be accessed using getRecvSize() and getRecvData().
+ *
+ * It is not neccesary to know how much data is being sent.  This
+ * class will figure that out (using overhead data attached to the
+ * actual user data being communicated).
+ *
+ * To check on sends and receives without using the stage, use
+ * checkSend() and checkRecv() or proceedToNextWait().  To wait for
+ * the current operation to complete, use completeCurrentOperation().
+ */
+template<class TYPE>
+class AsyncCommPeer:public AsyncCommStage::Member
+{
+
+public:
+   /*!
+    * @brief Default constructor does not set up anything.
+    * You must initialize() the object before using it.
+    */
+   AsyncCommPeer();
+
+   /*!
+    * @brief Construct staged communication object.
+    *
+    * @see initialize().
+    */
+   AsyncCommPeer(
+      AsyncCommStage* stage,
+      AsyncCommStage::Handler* handler = NULL);
+
+   /*!
+    * @brief Destructor.
+    */
+   virtual ~AsyncCommPeer(
+      void);
+
+   /*!
+    * @brief Initialize the object.
+    *
+    * Attach self to the given stage and set the Handler.
+    *
+    * @param state The stage handling communicaiton requests for the object.
+    * @param hander Optional pointer to user-defined data.
+    */
+   void
+   initialize(
+      AsyncCommStage* stage,
+      AsyncCommStage::Handler* handler = NULL);
+
+   //@{
+   //! @name Define the peer relationship.
+
+   /*!
+    * @brief Set the peer rank.
+    *
+    * We assume (without checking) that the peer processor does
+    * a complementary call using this processor as its peer.
+    * If this assumption is wrong, there will likely be
+    * communication errors.
+    */
+   void
+   setPeerRank(
+      int peer_rank);
+
+   int
+   getPeerRank() const;
+
+   /*!
+    * @brief Limit the data length in first message of a communication.
+    *
+    * Sometimes, the receiver does not know how much data is being
+    * sent.  In such cases, the receiver would assume the data is no
+    * more than a size that the sender and receiver have agreed upon
+    * before hand, @c max_first_data_len.  If the message is longer,
+    * the sender sends it in two parts.  The first message contains no
+    * more than @c max_first_data_len items and indicates the true
+    * length of the data.  A second message is used if needed.
+    *
+    * The receiver must set a first data length no less than
+    * the sender's or risk a fatal MPI "truncated message" error.
+    *
+    * The limit is set to one by default, meaning that any message
+    * more than one item long would be sent in two parts.
+    */
+   void
+   limitFirstDataLength(
+      size_t max_first_data_len);
+   //@}
+
+   /*!
+    * @brief Set the MPI tags used for communication.
+    *
+    * The @c primary_tag is used for every message.  If a message
+    * must be sent in two parts (see limitFirstDataLength()),
+    * the secondary tag is used for the follow-up message.  It is
+    * advisable to use different values for the two tags to ensure
+    * that the second message is not mistaken for the first.
+    *
+    * @attention This class is NOT (and cannot be) responsible for
+    * ensuring that the MPI communicator and tag are sufficient to
+    * select the correct messages.  Please specify appropriate values
+    * for the MPI communicator and tag.  Very elusive bugs can occur
+    * if incorrect messages are received.
+    */
+   void
+   setMPITag(
+      const int primary_tag,
+      const int secondary_tag);
+
+   /*!
+    * @brief Set the MPI object used for communications.
+    *
+    * @attention This class is NOT (and cannot be) responsible for
+    * ensuring that the MPI object and tag are sufficient to
+    * select the correct messages.  Please specify appropriate values
+    * for the MPI object and tag.  Very elusive bugs can occur
+    * if incorrect messages are received.  To be safe, it is best
+    * to create a new communicator to avoid interference with other
+    * communications within SAMRAI.
+    */
+   void
+   setMPI(
+      const SAMRAI_MPI& mpi);
+
+   //@{
+
+   /*!
+    * @name Communication methods
+    */
+
+   /*!
+    * @brief Begin a send communication.
+    *
+    * This must be paired with a beginRecv() by the peer processor.
+    *
+    * On return, the data in @b buffer would have been copied so it is
+    * safe to deallocate or modify @c buffer.
+    *
+    * @return Whether operation is completed.
+    */
+   bool
+   beginSend(
+      const TYPE* buffer,
+      int size);
+
+   /*!
+    * @brief Check the current broadcast communication and complete
+    * the broadcast if all MPI requests are fulfilled.
+    *
+    * If no communication is in progress, this call does nothing.
+    *
+    * @return Whether operation is completed.
+    */
+   bool
+   checkSend();
+
+   /*!
+    * @brief Begin a receive communication.
+    *
+    * This must be paired with a beginSend() by the peer processor.
+    *
+    * The received data is stored in an internal buffer accessible
+    * through getRecvData().  After receiving, the internal buffer is
+    * available until the object goes out of scope, another
+    * communication operation is initiated or
+    * deallocateInternalRecvBuffer() is called.
+    *
+    * The actual length of data received by the last receive operation
+    * is returned by getRecvSize().
+    *
+    * @return Whether operation is completed.
+    *
+    * @internal Once everthing is working, we should implement a
+    * version that takes an external buffer.  This optimizes out the
+    * need to copy from the internal to an external buffer.  But it
+    * requires some thought about size checking, especially with
+    * regards to how to use the limit on the first message size.
+    */
+   bool
+   beginRecv();
+
+   /*!
+    * @brief Check the current receive communication and complete the
+    * receive if the MPI request has been fulfilled.
+    *
+    * @return Whether operation is completed.
+    */
+   bool
+   checkRecv();
+
+   /*!
+    * @brief Return the size of received data.
+    */
+   int
+   getRecvSize() const;
+
+   /*!
+    * @brief Get access to the received data.
+    */
+   const TYPE *
+   getRecvData() const;
+
+   /*!
+    * @brief Clear the receive buffer immediately.
+    *
+    * This is optional.  The received data remains inside the object
+    * the next communicaiton operation starts, or until it is
+    * explicitly freed.
+    *
+    * It is an error to clear the receive buffer in the middle of a
+    * communication operation.
+    */
+   void
+   clearRecvData();
+
+   /*!
+    * @brief Check the current communication and complete it if all
+    * MPI requests are fulfilled.
+    */
+   bool
+   proceedToNextWait();
+
+   /*!
+    * @brief Whether the last communication operation has finished.
+    *
+    * This means more than just whether there is outstanding MPI
+    * requests such as that returned by hasOutstandingRequests().  The
+    * communication is more complex, requiring up to two messages
+    * and copying of the received message into the correct buffer.
+    * When isDone() returns true, the operation is truly finished.
+    */
+   bool
+   isDone() const;
+
+   /*!
+    * @brief Wait for the current operation to complete.
+    */
+   void
+   completeCurrentOperation();
+
+   //@}
+
+   /*!
+    * @brief For use in debugging.
+    */
+   void
+   logCurrentState(
+      std::ostream& co) const;
+
+private:
+   /*
+    * @brief Data structure for combining integer overhead data along with
+    * user data TYPE in the same MPI message.
+    */
+   union FlexData {
+      int i;
+      TYPE t;
+      FlexData()
+      {
+#ifdef DEBUG_INITIALIZE_UNDEFINED
+         memset(& i, 0, std::max(sizeof(int), sizeof(TYPE)));
+#endif
+      }
+   };
+
+   /*
+    * @brief Assert that user-set MPI parameters are valid.
+    */
+   void
+   checkMPIParams();
+
+   /*!
+    * @brief Return the number of FlexData storage space to store a given
+    * number of TYPE data.
+    */
+   size_t
+   getNumberOfFlexData(
+      size_t number_of_type_data) const;
+
+   /*!
+    * @brief Operation disallowed due to primitive internal memory management.
+    */
+   AsyncCommPeer(
+      const AsyncCommPeer& r);
+
+   /*!
+    * @brief Operation disallowed by primitive internal memory management.
+    */
+   AsyncCommPeer&
+   operator = (
+      const AsyncCommPeer& r);
+
+   //! @brief Operations users would want to do.
+   enum BaseOp { undefined,
+                 send,
+                 recv };
+   //! @brief Tasks used to complete a base operation.
+   enum TaskOp { send_start,
+                 send_check,
+                 recv_start,
+                 recv_check0,
+                 recv_check1,
+                 none };
+
+   void
+   resetStatus(
+      SAMRAI_MPI::Status& mpi_status);
+
+   /*
+    * @brief Resize the internal buffer to hold size FlexData unions.
+    *
+    * Note this is FlexData's not TYPE's.
+    */
+   void
+   resizeBuffer(
+      size_t size);
+
+   /*!
+    * Free static timers.
+    *
+    * To be called by shutdown registry to make sure memory for timers
+    * does not leak.
+    */
+   static void
+   finalizeCallback();
+
+   /*!
+    * @brief Rank of peer process.
+    *
+    * If negative, peer has not been set.
+    */
+   int d_peer_rank;
+
+   /*!
+    * @brief Operation being performed.
+    *
+    * At the completion of the operation, d_base_op does NOT get
+    * reset to undefined.  Its value is used in getRecvData() and
+    * is also useful for debugging.
+    */
+   BaseOp d_base_op;
+
+   /*!
+    * @brief Next task in a current communication operation.
+    *
+    * If d_next_task_op is none, there is no current communication
+    * operation (the last one is completed).
+    */
+   TaskOp d_next_task_op;
+
+   /*!
+    * @brief Max data size of first message when the receiver does
+    * not know the message size.
+    *
+    * @see limitFirstDataLength().
+    */
+   size_t d_max_first_data_len;
+
+   /*!
+    * @brief The full count of data items before splitting up
+    * to into the limit of the first chunk.
+    */
+   size_t d_full_count;
+
+   /*!
+    * @brief External data input buffer.
+    *
+    * Though we keep this around after beginSend() returns, in the
+    * current implementation, it is not needed.  It is kept around
+    * to help debugging.  After beginSend() returns, the pointer
+    * is no longer guaranteed to be valid.
+    */
+   const TYPE* d_external_buf;
+
+   /*!
+    * @brief Internal buffer.
+    *
+    * Used for sends and receives.  This is typed on FlexData because
+    * it must be able to store the templated type TYPE and some integer
+    * for overhead data.
+    */
+   size_t d_internal_buf_size;
+   FlexData* d_internal_buf;
+
+   /*!
+    *
+    */
+   SAMRAI_MPI d_mpi;
+   /*!
+    * @brief Tag for the first message.
+    */
+   int d_tag0;
+   /*!
+    * @brief Tag for the first message.
+    */
+   int d_tag1;
+
+   /*!
+    * @brief Whether send completion should be reported when
+    * AsyncCommPeer_DEBUG_OUTPUT is defined.
+    *
+    * This is non-essential data used in debugging.
+    */
+   bool d_report_send_completion[2];
+
+   // Make some temporary variable statuses to avoid repetitious allocations.
+   int d_mpi_err;
+
+   static Pointer<Timer> t_waitall_timer;
+   static Pointer<Timer> t_send_timer;
+   static Pointer<Timer> t_recv_timer;
+
+   /**
+    * \brief Has shutdown handler been initialized.
+    *
+    * This should be checked and set in every ctor.
+    */
+   static bool s_initialized;
+
+   /**
+    * \brief Initialize static state
+    */
+   static bool
+   initialize(
+      void);
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/tbox/AsyncCommPeer.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/tbox/AsyncCommPeer.C"
+#endif
+
+#endif  // included_tbox_AsyncCommPeer
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/AsyncCommStage.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/AsyncCommStage.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,851 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Support for coordinating multiple asynchronous communications 
+ *
+ ************************************************************************/
+#include "SAMRAI/tbox/AsyncCommStage.h"
+
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include STL_SSTREAM_HEADER_FILE
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+// #define AsyncCommStage_ExtraDebug
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+AsyncCommStage::AsyncCommStage():
+   d_members(),
+   d_member_count(0),
+   d_req(0),
+   d_stat(0),
+   d_req_to_member(0),
+   d_member_to_req(1, 0)
+{
+}
+
+/*
+ ****************************************************************
+ * Make sure the remaining Members are not in the middle
+ * of a communication.  Deallocate allocated Members.
+ ****************************************************************
+ */
+AsyncCommStage::~AsyncCommStage()
+{
+   for (size_t i = 0; i < d_members.size(); ++i) {
+      if (d_members[i] != NULL) {
+         /*
+          * Found an undeallocated Member.  Make sure it does not
+          * have oustanding requests and deallocate it.
+          */
+         if (d_members[i]->hasPendingRequests()) {
+            TBOX_ERROR("Destructing a stage while some Members\n"
+               << "have pending communication leads to\n"
+               << "abandoned MPI messages.  Member number "
+               << i << "\n"
+               << "is not yet done.");
+         }
+         d_members[i] = NULL;
+      }
+   }
+}
+
+/*
+ ****************************************************************
+ * Stage a new communication stage member.  Make sure there
+ * is enough space in the arrays, reallocating space if needed.
+ * Allocate the new Member and set the internal arrays for it.
+ ****************************************************************
+ */
+void AsyncCommStage::privateStageMember(
+   Member* member,
+   size_t nreq)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(member->d_stage == NULL);   // Double stage not allowed.
+   if (nreq < 1) {
+      TBOX_ERROR("Each Member on a stage must have at least one request.\n");
+   }
+   assertDataConsistency();
+#endif
+
+   /*
+    * Allocate space at the end of the current arrays for the Member
+    * and its needed requests.
+    *
+    * Recall that d_member_to_req[d_members.size()] is always the
+    * current number of requests currently used by the stage.  So
+    * d_member_to_req[d_members.size()+1] is set to the new number of
+    * requests used by the stage.
+    */
+   d_members.push_back(member);
+   ++d_member_count;
+
+   const size_t cur_total_request_count = d_member_to_req[d_members.size() - 1];
+   const size_t new_total_request_count = cur_total_request_count + nreq;
+   d_member_to_req.push_back(new_total_request_count);
+
+   d_req.resize(new_total_request_count, MPI_REQUEST_NULL);
+   d_stat.resize(new_total_request_count);
+   d_req_to_member.resize(new_total_request_count, d_members.size() - 1);
+   for (size_t i = cur_total_request_count; i < new_total_request_count; ++i) {
+      d_stat[i].MPI_TAG = d_stat[i].MPI_SOURCE = d_stat[i].MPI_ERROR = -1;
+   }
+
+   member->d_stage = this;
+   member->d_nreq = nreq;
+   member->d_index_on_stage = d_members.size() - 1;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   assertDataConsistency();
+#endif
+}
+
+/*
+ *******************************************************************
+ * Remove mutual reference between Member and the stage.
+ * 1. Confirm that the Member is currently on the stage
+ *    (or else it is an illegal operation).
+ * 2. Remove mutual references.
+ * 3. Reduce the stage data size by skimming unused space
+ *    off the ends of arrays, if possible.
+ *******************************************************************
+ */
+void AsyncCommStage::privateDestageMember(
+   Member* member)
+{
+   if (member->hasPendingRequests()) {
+      TBOX_ERROR("Cannot clear a Member with pending communications.\n"
+         << "It would corrupt message passing algorithms.\n");
+   }
+#ifdef DEBUG_CHECK_ASSERTIONS
+   assertDataConsistency();
+#endif
+
+   if (d_members[member->d_index_on_stage] != member) {
+      /*
+       * Member was not staged with this AsyncCommStage.  Since staging
+       * and destaging are private methods, there must be some logic
+       * bug in the library.
+       */
+      TBOX_ERROR("Library error: An AsyncCommStage cannot destage a Member\n"
+         << "that was not staged with it.");
+   }
+
+   d_members[member->d_index_on_stage] = NULL;
+   --d_member_count;
+
+   /*
+    * Remove the ends of the arrays as much as possible without
+    * shifting arrays.  (This is only possible if member is at the
+    * end.)
+    */
+   size_t min_required_len = d_members.size();
+   while (min_required_len > 0 && d_members[min_required_len - 1] == NULL) {
+      --min_required_len;
+   }
+   if (min_required_len != d_members.size()) {
+      d_members.resize(min_required_len, NULL);
+      d_member_to_req.resize(d_members.size() + 1,
+         size_t(tbox::MathUtilities<int>::getMax()));
+
+      const size_t new_num_req = d_member_to_req[d_member_to_req.size() - 1];
+      d_req_to_member.resize(new_num_req,
+         size_t(tbox::MathUtilities<int>::getMax()));
+      d_req.resize(new_num_req, MPI_REQUEST_NULL);
+   }
+
+   member->d_nreq = member->d_index_on_stage = size_t(
+            tbox::MathUtilities<int>::getMax());
+   member->d_stage = NULL;
+   member->d_handler = NULL;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   assertDataConsistency();
+#endif
+}
+
+/*
+ ****************************************************************
+ ****************************************************************
+ */
+void AsyncCommStage::assertDataConsistency() const
+{
+   if (d_members.size() + 1 != d_member_to_req.size()) {
+      TBOX_ERROR("d_members.size()=" << d_members.size()
+                                     << "+1 is not d_member_to_req.size()="
+                                     << d_member_to_req.size());
+   }
+   if (d_member_to_req[d_member_to_req.size() - 1] != d_req.size()) {
+      TBOX_ERROR("d_member_to_req's last entry is bad.");
+   }
+
+   if (d_members.empty()) {
+      return;
+   }
+
+   for (size_t i = 0; i < d_members.size() - 1; ++i) {
+      if (d_member_to_req[i] >= d_member_to_req[i + 1]) {
+         TBOX_ERROR("d_member_to_req out of order at i=" << i);
+      }
+      if (d_members[i] != NULL) {
+         if (d_members[i]->d_nreq !=
+             d_member_to_req[i + 1] - d_member_to_req[i]) {
+            TBOX_ERROR("d_members[" << i << "] has bad d_nreq="
+               << d_members[i]->d_nreq << ", stage value is "
+               << (d_member_to_req[i + 1] - d_member_to_req[i]));
+         }
+      }
+   }
+
+   size_t member_index = 0;
+   size_t number_of_requests = 0;
+   for (size_t i = 0; i < d_req_to_member.size(); ++i) {
+      if (d_req_to_member[i] == member_index) {
+         ++number_of_requests;
+      } else {
+         if (d_members[member_index] != NULL) {
+            if (d_members[member_index]->d_nreq != number_of_requests) {
+               TBOX_ERROR("d_members[" << member_index << "]->d_nreq is "
+                  << d_members[member_index]->d_nreq
+                  << " while stage claims it should have "
+                  << number_of_requests << " requests");
+            }
+         }
+         member_index = d_req_to_member[i];
+         number_of_requests = 1;
+      }
+   }
+   if (d_members[member_index]->d_nreq != number_of_requests) {
+      TBOX_ERROR("d_members[" << member_index << "]->d_nreq is "
+         << d_members[member_index]->d_nreq
+         << " while stage claims it should have "
+         << number_of_requests << " requests");
+   }
+}
+
+/*
+ ****************************************************************
+ * Implementations for AsyncCommStage::Member.
+ ****************************************************************
+ */
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+AsyncCommStage::Member::Member(
+   const size_t nreq,
+   AsyncCommStage* stage,
+   AsyncCommStage::Handler* handler):
+   d_stage(NULL),
+   d_nreq(size_t(tbox::MathUtilities<int>::getMax())),
+   d_index_on_stage(size_t(tbox::MathUtilities<int>::getMax())),
+   d_handler(handler)
+{
+   stage->privateStageMember(this, nreq);
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+AsyncCommStage::Member::Member():
+   d_stage(NULL),
+   d_nreq(size_t(tbox::MathUtilities<int>::getMax())),
+   d_index_on_stage(size_t(tbox::MathUtilities<int>::getMax())),
+   d_handler(NULL)
+{
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+AsyncCommStage::Member::~Member()
+{
+   if (hasPendingRequests()) {
+      TBOX_ERROR("Cannot deallocate a Member with pending communications.\n"
+         << "It would corrupt message passing algorithms.\n");
+   }
+   if (d_stage != NULL) {
+      d_stage->privateDestageMember(this);
+   }
+   d_handler = NULL;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void AsyncCommStage::Member::attachStage(
+   const size_t nreq,
+   AsyncCommStage* stage)
+{
+   if (d_stage != NULL) {
+      // Deregister from current stage.
+      d_stage->privateDestageMember(this);
+   }
+   if (stage != NULL) {
+      // Register with new stage, if any.
+      stage->privateStageMember(this, nreq);
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void AsyncCommStage::Member::detachStage()
+{
+   if (d_stage != NULL) {
+      // Deregister from current stage.
+      d_stage->privateDestageMember(this);
+   }
+   d_nreq = 0;
+   d_stage = NULL;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void AsyncCommStage::Member::setHandler(
+   Handler* handler)
+{
+   d_handler = handler;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+AsyncCommStage::Handler *AsyncCommStage::Member::getHandler() const
+{
+   return d_handler;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+size_t AsyncCommStage::Member::numberOfRequests() const
+{
+   return d_nreq;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+bool AsyncCommStage::Member::hasPendingRequests() const
+{
+   if (d_stage == NULL) {
+      return false;
+   } else {
+      SAMRAI_MPI::Request* req = getRequestPointer();
+      for (size_t i = 0; i < d_nreq; ++i) {
+         if (req[i] != MPI_REQUEST_NULL) return true;
+      }
+   }
+   return false;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+size_t AsyncCommStage::Member::numberOfPendingRequests() const
+{
+   size_t npending = 0;
+   if (d_stage != NULL) {
+      SAMRAI_MPI::Request* req = getRequestPointer();
+      for (size_t i = 0; i < d_nreq; ++i) {
+         if (req[i] != MPI_REQUEST_NULL) ++npending;
+      }
+   }
+   return npending;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+SAMRAI_MPI::Request *AsyncCommStage::Member::getRequestPointer() const
+{
+   if (d_stage == NULL) {
+      TBOX_ERROR("AssyncCommStage::Member::getRequestPointer():\n"
+         << "Empty stage encountered!\n"
+         << "This probably means that the stage that allocated\n"
+         << "your AsyncCommGroup has been deallocated.\n"
+         << "(and your AssyncCommGroup deallocated too!).\n"
+         << "It is an error to deallocate a stage and still\n"
+         << "use the Member it allocated.\n");
+
+   }
+   return d_stage->lookupRequestPointer(d_index_on_stage);
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+SAMRAI_MPI::Status *AsyncCommStage::Member::getStatusPointer() const
+{
+   if (d_stage == NULL) {
+      TBOX_ERROR("AssyncCommStage::Member::getStatusPointer():\n"
+         << "Empty stage encountered!\n"
+         << "This probably means that the stage that allocated\n"
+         << "your AsyncCommGroup has been deallocated.\n"
+         << "(and your AssyncCommGroup deallocated too!).\n"
+         << "It is an error to deallocate a stage and still\n"
+         << "use the Member it allocated.\n");
+
+   }
+   return d_stage->lookupStatusPointer(d_index_on_stage);
+}
+
+/*
+ ******************************************************************
+ * Advance all communication Members by calling advanceSome
+ * repeatedly until all outstanding communications are complete.
+ ******************************************************************
+ */
+size_t AsyncCommStage::advanceAll(
+   MemberVec& completed)
+{
+   MemberVec completed_part;
+   while (advanceSome(completed_part)) {
+      size_t num_add = completed_part.size();
+      size_t i0 = completed.size();
+      completed.insert(completed.end(),
+         completed_part.begin(),
+         completed_part.end());
+      for (size_t i = 0; i < num_add; ++i) {
+         completed[i0 + i] = completed_part[i];
+      }
+   }
+   return completed.size();
+}
+
+/*
+ ******************************************************************
+ * Advance one or more communication Members by using
+ * MPI_Waitsome to complete one or more communication requests.
+ *
+ * Get one or more completed requests and check their communication
+ * Members to see if any Member finished its communication operation.
+ * If at least one Member finished its communication, return those that
+ * finished.  If no Member has finished, repeat until at least one has.
+ ******************************************************************
+ */
+size_t AsyncCommStage::advanceSome(
+   MemberVec& completed)
+{
+   completed.clear();
+
+   if (!SAMRAI_MPI::usingMPI()) {
+      return 0;
+   }
+
+   if (d_members.empty()) {
+      // Short cut for an empty stage.
+      return 0;
+   }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   for (unsigned int i = static_cast<unsigned int>(d_member_to_req[d_members.size()]);
+        i < d_req.size();
+        ++i) {
+      if (d_req[i] != MPI_REQUEST_NULL)
+         TBOX_WARNING("non-null request above d_n_req.");
+   }
+#endif
+
+   Array<int> index(static_cast<int>(d_member_to_req[d_members.size()]));
+   Array<SAMRAI_MPI::Status> stat(
+      static_cast<int>(d_member_to_req[d_members.size()]));
+
+   size_t n_member_completed = 0;
+   int n_req_completed = 0;
+
+   do {
+
+      int errf;
+      if (d_communication_timer) d_communication_timer->start();
+      errf = SAMRAI_MPI::Waitsome(
+            static_cast<int>(d_member_to_req[d_members.size()]),
+            &d_req[0],
+            &n_req_completed,
+            index.getPointer(),
+            stat.getPointer());
+      if (d_communication_timer) d_communication_timer->stop();
+#ifdef DEBUG_CHECK_ASSERTIONS
+      if (n_req_completed <= 0) {
+         /*
+          * Undocumented feature of some MPI_Waitsome implementations:
+          * MPI_Waitsome sets n_req_completed to a negative number
+          * if all the input requests are MPI_REQUEST_NULL.
+          */
+         for (size_t i = 0; i < d_member_to_req[d_members.size()]; ++i) {
+            if (d_req[i] != MPI_REQUEST_NULL) {
+               TBOX_ERROR("Library error in AsyncCommStage::advanceSome:\n"
+                  << "errf = " << errf << '\n'
+                  << "MPI_SUCCESS = " << MPI_SUCCESS << '\n'
+                  << "MPI_ERR_IN_STATUS = " << MPI_ERR_IN_STATUS << '\n'
+                  << "MPI_REQUEST_NULL = " << MPI_REQUEST_NULL << '\n'
+                  << "number of requests = "
+                  << d_member_to_req[d_members.size()] << '\n'
+                                                       <<
+                  "d_req.size() = " << d_req.size() << '\n'
+                                                       <<
+                  "n_req_completed = " << n_req_completed << '\n'
+                                                       <<
+                  "i = " << i << '\n'
+                  );
+            }
+         }
+         for (unsigned int i = static_cast<unsigned int>(d_member_to_req[d_members.size()]);
+              i < d_req.size();
+              ++i) {
+            if (d_req[i] != MPI_REQUEST_NULL)
+               TBOX_WARNING("non-null request above d_n_reg.");
+         }
+      }
+      if (n_req_completed == 0) {
+         TBOX_ASSERT(!hasPendingRequests());
+      }
+#endif
+      if (errf != MPI_SUCCESS) {
+         TBOX_ERROR("Error in MPI_Waitsome call.\n"
+            << "Error-in-status is "
+            << (errf == MPI_ERR_IN_STATUS)
+            << '\n');
+      }
+
+      /*
+       * Construct array of Members with at least one completed
+       * request.
+       */
+      // Number of Members to check with at least one completed request.
+      unsigned int n_check_member = 0;
+
+      for (int iout = 0; iout < n_req_completed; ++iout) {
+
+         // Save status of completed request.
+         d_stat[index[iout]] = stat[iout];
+         /*
+          * Change index from request index to Member index.
+          * If the Member index is not a duplicate, add it to
+          * the list of Members to check (which is actually
+          * the same list) and increase n_check_member.
+          */
+         index[iout] = static_cast<int>(d_req_to_member[index[iout]]);
+#ifdef AsyncCommStage_ExtraDebug
+         tbox::plog << "AsyncCommStage::advanceSome completed:"
+         << " tag-" << stat[iout].MPI_TAG
+         << " source-" << stat[iout].MPI_SOURCE
+         << " for member index " << index[iout]
+         << std::endl;
+#endif
+         unsigned int i;
+         for (i = 0; i < n_check_member; ++i) {
+            if (index[i] == index[iout]) break;
+         }
+         if (i == n_check_member) {
+            index[n_check_member++] = index[iout];
+         }
+      }
+
+      /*
+       * Check the Members whose requests completed and count up the
+       * Members that completed all their communication tasks.
+       */
+      for (unsigned int imember = 0; imember < n_check_member; ++imember) {
+         Member& memberi = *d_members[index[imember]];
+         TBOX_ASSERT(!memberi.isDone());
+         bool memberi_done = memberi.proceedToNextWait();
+#ifdef AsyncCommStage_ExtraDebug
+         tbox::plog
+         << "AsyncCommStage::advanceSome proceedToNextWait for member:"
+         << memberi.d_index_on_stage
+         << " completion=" << memberi_done
+         << std::endl;
+#endif
+         if (memberi_done) {
+            completed.push_back(&memberi);
+            ++n_member_completed;
+            TBOX_ASSERT(!memberi.hasPendingRequests());
+         }
+      }
+
+   } while (n_req_completed > 0 && n_member_completed == 0);
+
+   return n_member_completed;
+}
+
+/*
+ ****************************************************************
+ * Advance one communication Members by using MPI_Waitsome
+ * to complete one requests.
+ *
+ * This method is functionally the same as the advanceAny() taking no
+ * arguments.  The overloaded version provides an interface similar to
+ * that of advanceSome().
+ ****************************************************************
+ */
+size_t AsyncCommStage::advanceAny(
+   MemberVec& completed)
+{
+   completed.clear();
+   if (!SAMRAI_MPI::usingMPI()) {
+      return 0;
+   }
+   Member* completed_member = advanceAny();
+   if (completed_member != NULL) {
+      completed.push_back(completed_member);
+   }
+   return completed_member == 0 ? 0 : 1;
+}
+
+/*
+ ****************************************************************
+ * Advance one communication Member by using MPI_Waitany
+ * to complete one requests.
+ *
+ * Get one completed request and check its communication Member to see
+ * if the Member finished its communication operation.  If it finished
+ * its operation, return the member.  If not, repeat until one Member
+ * has completed its communication operation.
+ ****************************************************************
+ */
+AsyncCommStage::Member *AsyncCommStage::advanceAny()
+{
+   if (!SAMRAI_MPI::usingMPI()) {
+      return 0;
+   }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   for (unsigned int i = static_cast<unsigned int>(d_member_to_req[d_members.size()]);
+        i < d_req.size();
+        ++i) {
+      if (d_req[i] != MPI_REQUEST_NULL)
+         TBOX_WARNING("non-null request above d_n_reg.");
+   }
+#endif
+   int ireq = MPI_UNDEFINED;
+   int member_index_on_stage = -1;
+   bool member_done;
+
+   do {
+
+      SAMRAI_MPI::Status mpi_stat;
+      int errf;
+      if (d_communication_timer) d_communication_timer->start();
+      errf = SAMRAI_MPI::Waitany(
+            static_cast<int>(d_member_to_req[d_members.size()]),
+            &d_req[0],
+            &ireq,
+            &mpi_stat);
+      if (d_communication_timer) d_communication_timer->stop();
+      if (errf != MPI_SUCCESS) {
+         TBOX_ERROR("Error in MPI_Waitany call.\n"
+            << "Error-in-status is "
+            << (errf == MPI_ERR_IN_STATUS) << '\n'
+            << "MPI_ERROR value is " << mpi_stat.MPI_ERROR
+            << '\n');
+      }
+
+      if (ireq == MPI_UNDEFINED) {
+         // All input requests are completed even before waiting.
+         break;
+      }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(ireq >= 0 && ireq < static_cast<int>(d_member_to_req[d_members.size()]));
+#endif
+
+      d_stat[ireq] = mpi_stat;
+      member_index_on_stage = static_cast<int>(d_req_to_member[ireq]);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(member_index_on_stage >= 0 &&
+         member_index_on_stage < static_cast<int>(d_members.size()));
+      TBOX_ASSERT(d_members[member_index_on_stage] != NULL);
+#endif
+
+      Member* member = d_members[member_index_on_stage];
+      /*
+       * Member member_index_on_stage had a request completed.
+       * See if all of its requests are now completed.
+       * If so, run proceedToNextWait() to see if the member is done.
+       * (The member may not be done because it may initiate
+       * follow-up communication tasks.)
+       * Exit the do loop when a Member is actually done
+       * with all of its communication tasks.
+       */
+      const size_t init_req = d_member_to_req[member->d_index_on_stage];
+      const size_t term_req = d_member_to_req[member->d_index_on_stage + 1];
+      size_t i;
+      for (i = init_req; i < term_req; ++i) {
+         if (d_req[i] != MPI_REQUEST_NULL) {
+            break;
+         }
+      }
+      if (i == term_req) {
+         /*
+          * Member is done with at least its current communication
+          * requests.  Follow-up communication may be launched,
+          * so check the return value of proceedToNextWait().
+          */
+         member_done = d_members[member_index_on_stage]->proceedToNextWait();
+      } else {
+         member_done = false;
+         TBOX_ASSERT(d_members[member_index_on_stage]->hasPendingRequests());
+      }
+
+   } while (member_done == false);
+
+   return member_index_on_stage < 0 ? NULL : d_members[member_index_on_stage];
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void AsyncCommStage::setCommunicationWaitTimer(
+   Pointer<Timer> communication_timer)
+{
+   d_communication_timer = communication_timer;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+size_t AsyncCommStage::numberOfMembers() const
+{
+   return d_member_count;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+size_t AsyncCommStage::numberOfRequests(
+   size_t index_on_stage) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(index_on_stage < d_members.size());
+   TBOX_ASSERT(d_members[index_on_stage] != NULL);
+#endif
+
+   const int init_req = static_cast<int>(d_member_to_req[index_on_stage]);
+   const int term_req = static_cast<int>(d_member_to_req[index_on_stage + 1]);
+   return term_req - init_req;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+bool AsyncCommStage::hasPendingRequests() const
+{
+   size_t ireq;
+   for (ireq = 0; ireq < d_member_to_req[d_members.size()]; ++ireq) {
+      if (d_req[ireq] != MPI_REQUEST_NULL) break;
+   }
+   return ireq != d_member_to_req[d_members.size()];
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+size_t AsyncCommStage::numberOfPendingRequests() const
+{
+   size_t npending = 0;
+   size_t ireq;
+   for (ireq = 0; ireq < d_member_to_req[d_members.size()]; ++ireq) {
+      if (d_req[ireq] != MPI_REQUEST_NULL) ++npending;
+   }
+   return npending;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+size_t AsyncCommStage::numberOfPendingMembers() const
+{
+   size_t nmember = 0;
+   for (size_t imember = 0; imember < d_members.size(); ++imember) {
+      if (d_members[imember] != NULL &&
+          d_members[imember]->hasPendingRequests())
+         ++nmember;
+   }
+   return nmember;
+}
+
+/*
+ ****************************************************************
+ * Return the request pointer for a communication Member
+ * allocated by this object.
+ ****************************************************************
+ */
+SAMRAI_MPI::Request *AsyncCommStage::lookupRequestPointer(
+   const size_t imember) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(imember < d_members.size());
+   TBOX_ASSERT(d_members[imember] != NULL);
+#endif
+   return &d_req[d_member_to_req[imember]];
+}
+
+/*
+ ****************************************************************
+ * Return the status pointer for a communication Member
+ * allocated by this object.
+ ****************************************************************
+ */
+SAMRAI_MPI::Status *AsyncCommStage::lookupStatusPointer(
+   const size_t imember) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(imember < d_members.size());
+   TBOX_ASSERT(d_members[imember] != NULL);
+#endif
+   return &d_stat[d_member_to_req[imember]];
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/AsyncCommStage.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/AsyncCommStage.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,568 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Support for coordinating multiple asynchronous communications 
+ *
+ ************************************************************************/
+#ifndef included_tbox_AsyncCommStage
+#define included_tbox_AsyncCommStage
+
+#ifndef included_SAMRAI_config
+#include "SAMRAI/SAMRAI_config.h"
+#endif
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/Timer.h"
+
+#include <vector>
+
+namespace SAMRAI {
+namespace tbox {
+
+/*!
+ * @brief Stage multiple non-blocking MPI communications so that codes
+ * waiting for them to complete can advance as their respective MPI
+ * requests are completed.
+ *
+ * An AsyncCommStage object manages multiple non-blocking MPI
+ * communications carried out by AsyncCommStage::Member objects.
+ * These classes factor out multiple non-blocking communication codes.
+ *
+ * By being staged together, Members can overlap their communication
+ * waits conveniently.  The stage determines which Member's
+ * communication requests are completed.  User code then follows up
+ * the communication with whatever was waiting for that operation to
+ * complete.
+ *
+ * The Member class defines the interfaces required to work with an
+ * AsyncCommStage.  Communication operations can be a simple
+ * non-blocking MPI communication or a complex sequence of MPI
+ * communications and local computations.  See Member subclasses for
+ * examples.
+ *
+ * Use this class when you:
+ * - Have multiple communications, each performed
+ *   by a different and independent AsyncCommStage::Member object.
+ * - Want the multiple communications to proceed
+ *   independently and asynchronously.
+ *
+ * Each AsyncCommStage is a registry of Member objects on the stage.
+ * To overlap the Members' communications, the stage manages space for
+ * their SAMRAI_MPI::Request's and SAMRAI_MPI::Status'es.  The
+ * requests are allocated such that a single MPI_Waitany or
+ * MPI_Waitsome represents all Members registered with the stage.
+ * Thus the communications performed by the Member objects can
+ * complete in the order allowed by the arrival of MPI messages.  The
+ * exact order is NOT deterministic!
+ *
+ * To advance the communication operation of any of the allocated
+ * Member objects, use advanceAny() or advanceSome().  In general,
+ * advanceSome() has better performance than advanceAny() because it
+ * gets around the "starvation" problem.  See the MPI documentation
+ * for a discussion of starvation.
+ *
+ * This class supports communication and uses MPI for message passing.
+ * If MPI is disabled, the job of this class disappears and the class
+ * is effectively empty, except for managing the registration of
+ * Member objects.  The public interfaces still remain so the class
+ * can compile, but the implementations are trivial.
+ */
+class AsyncCommStage
+{
+
+public:
+   /*!
+    * @brief Optional object that can be attached to each Member,
+    * for use in determining what to do after the Member completes
+    * its communication.
+    *
+    * This class is empty because it serves only to be subclassed.
+    *
+    * @see Member::setHandler().
+    */
+   struct Handler {
+      virtual ~Handler() {
+      }
+   };
+
+   /*!
+    * @brief Something on a stage, using MPI requests and statuses
+    * provided by the stage.
+    *
+    * This class defines the interfaces required to participate
+    * in a AsyncCommStage.  Subclasses should implement communication
+    * operations using the MPI requests and statuses returned by
+    * getRequestPointer() and getStatusPointer().
+    */
+   struct Member {
+      /*!
+       * @brief Default constructor, requiring a follow-up call to
+       * attachStage() to properly stage the Member.
+       */
+      Member();
+      /*!
+       * @brief Initializing constructor.
+       *
+       * Same as default construction plus attachStage(), plus
+       * setHandler().
+       */
+      Member(
+         const size_t nreq,
+         AsyncCommStage* stage,
+         Handler* handler);
+      /*!
+       * @brief Destructor detach the Member from its stage.
+       * Memory allocated by the stage to support the Member
+       * will be recycled.
+       */
+      virtual ~Member();
+
+      /*!
+       * @brief Get the number of requests for the stage Member.
+       *
+       * This is the number used to initialize the object.  If the
+       * Member has not been initialized to a stage, zero is returned.
+       */
+      size_t
+      numberOfRequests() const;
+
+      /*!
+       * @brief Return the number of pending SAMRAI_MPI::Request
+       * objects for the Member.
+       */
+      size_t
+      numberOfPendingRequests() const;
+
+      /*!
+       * @brief Return whether the Member has some pending communication
+       * requests.
+       */
+      bool
+      hasPendingRequests() const;
+
+      /*!
+       * @brief Check whether entire operation is done.
+       *
+       * This should not just check the MPI requests--that is the job
+       * for hasPendingRequests().  It should check the entire
+       * communication operation (which may have follow-up
+       * communications and computations).  If MPI communications are
+       * completed but have not been followed through by a
+       * completeCurrentOperation(), it should return false.
+       */
+      virtual bool
+      isDone() const = 0;
+
+      /*!
+       * @brief If current MPI requests have completed, proceed to the
+       * next communication wait (or to completion if no more
+       * communication is needed).
+       */
+      virtual bool
+      proceedToNextWait() = 0;
+
+      /*!
+       * @brief Complete entire operation, including waiting for
+       * messages perform follow-up operations and waiting for
+       * follow-ups to complete.
+       *
+       * After this method, isDone() should return true.
+       *
+       * This method should assume that all communications can finish.
+       * Otherwise communications may hang.
+       */
+      virtual void
+      completeCurrentOperation() = 0;
+
+      /*!
+       * @brief Set a user-defined Handler.
+       *
+       * A Handler is just some user-defined data.
+       *
+       * When the stage returns completed Members, the Handler makes
+       * it easier to determine what was waiting for the Member to
+       * complete.  If you do not need to find the handler this way,
+       * you do not need to set it.  Typically, Handlers are only
+       * needed if a stage is simultaneously coordinating multiple
+       * Members per processor.
+       *
+       * By design, a non-const Handler is returned, even by a const
+       * Member.  This is because the Handler is expected to follow
+       * the communication operation with something non-trivial and
+       * possibly state-changing.
+       */
+      void
+      setHandler(
+         Handler* handler);
+
+      /*
+       * @brief Regurgitate the handler from setHandler().
+       */
+      Handler *
+      getHandler() const;
+
+protected:
+      /*!
+       * @brief Associate the member with a stage.
+       *
+       * Specify the stage to use and the number of SAMRAI_MPI::Request
+       * objects needed from the stage.
+       *
+       * @param nreq Number of SAMRAI_MPI::Requests needed by the member.
+       *
+       * @param stage Register with this AsyncCommStage.
+       *
+       * @param handler See getHandler()
+       */
+      void
+      attachStage(
+         const size_t nreq,
+         AsyncCommStage* stage);
+
+      /*!
+       * @brief Disassociate the member from its stage (undo attachStage()).
+       */
+      void
+      detachStage();
+
+      /*!
+       * Return the MPI requests provided by the stage for the Member.
+       *
+       * To work on the stage, you must use these requests in your
+       * non-blocking MPI calls.  The requests are a part of an array
+       * of requests for all Members on the stage.  Use only
+       * getNumberOfRequests() requests.  Terrible bugs will strike if
+       * you modify more than what was allocated for the Member.
+       *
+       * @b Important: Do not save the pointer returned by this
+       * method.  The stage's dynamic memory actions may render old
+       * pointers invalid.
+       */
+      SAMRAI_MPI::Request *
+      getRequestPointer() const;
+
+      /*!
+       * @brief Return MPI statuses for this Member of the stage.
+       *
+       * To work on the stage, you must use these statuses in your MPI
+       * calls.  The status attributes are set by the stage only for
+       * requests completed by the stage.  The statuses are a part of
+       * an array of statuses for all Members on the stage.  Use only
+       * getNumberOfRequests() statuses.  Terrible bugs will strike if
+       * you modify more than what was allocated for the Member.
+       *
+       * @b Important: Do not save the pointer returned by this
+       * method.  The stage's dynamic memory actions may render old
+       * pointers invalid.
+       */
+      SAMRAI_MPI::Status *
+      getStatusPointer() const;
+
+private:
+      /*!
+       * @brief Member is an integral part of the stage code and the
+       * stage will set the Member's internal data.
+       */
+      friend class AsyncCommStage;
+
+      /*!
+       * @brief The stage this Member belongs to.
+       *
+       * This stage provides SAMRAI_MPI::Request and SAMRAI_MPI::Status
+       * objects for the Member.
+       */
+      AsyncCommStage* d_stage;
+
+      /*!
+       * @brief Number of requests reserved on the stage, valid only
+       * when d_stage is set.
+       *
+       * This parameter is always the same as
+       * d_stage->numberOfRequests(d_index_on_stage), and exists only
+       * for convenience.  Set by the stage when Member is staged or
+       * destaged.
+       */
+      size_t d_nreq;
+
+      /*!
+       * @brief Member's index within the stage, valid only when
+       * d_stage is set.
+       *
+       * Set by the stage when Member is staged or destaged.
+       */
+      size_t d_index_on_stage;
+
+      /*!
+       * @brief Pointer to the Member's Handler.
+       *
+       * @see getHandler()
+       */
+      Handler* d_handler;
+   };
+
+   /*!
+    * @brief Container of pointers to Members.
+    *
+    * This container is used in some interfaces
+    * and is instantiated in the SAMRAI library.
+    */
+   typedef std::vector<Member *> MemberVec;
+
+   /*!
+    * @brief Construct a stage that may begin allocating and
+    * managing Members.
+    */
+   AsyncCommStage();
+
+   /*!
+    * @brief Deallocate Members remaining in the stage and all
+    * internal data used to manage Members.
+    */
+   virtual ~AsyncCommStage(
+      void);
+
+   /*!
+    * @brief Advance to completion one Member (any Member) that is
+    * currently waiting for communication to complete.
+    *
+    * This method uses MPI_Waitany, which may be prone to starvation.
+    * When a process is potentially receiving multiple messages from
+    * another processor, it is better to use advanceSome(), which uses
+    * MPI_Waitsome, which avoids starvation.
+    *
+    * @return completed Member, or NULL if no Member in the stage had
+    * incomplete communication, or there are no Members on the stage.
+    */
+   Member *
+   advanceAny();
+
+   /*!
+    * @brief Alternate interface for advanceAny to appear similar to other
+    * advancing interfaces.
+    *
+    * @param completed Array space to put addresses of Member's
+    *                  associated with the completed communications.
+    *                  The array has length 0 or 1 on return.
+    *
+    * @return number of Members completed or 0 if none have pending
+    * communication.  The strategy pointers corresponding to the
+    * completed Members are set in the @c completed array.
+    */
+   size_t
+   advanceAny(
+      MemberVec& completed);
+
+   /*!
+    * @brief Advance to completion one or more Members (any Members)
+    * that are currently waiting for communication to complete.
+    *
+    * @param completed Space to put addresses of Member's
+    *                  associated with the completed communications.
+    *
+    * @return number of Members completed or 0 if none have pending
+    * communication.
+    */
+   size_t
+   advanceSome(
+      MemberVec& completed);
+
+   /*!
+    * @brief Advance all pending communications to operations
+    *
+    * This method just calls advanceSome() repeatedly until all
+    * operations complete.
+    *
+    * @param completed Array space to put addresses of Member's
+    *                  associated with the completed communications.
+    *
+    * @return number of Members completed or 0 if none have pending
+    * communication.
+    */
+   size_t
+   advanceAll(
+      MemberVec& completed);
+
+   /*!
+    * @brief Set optional timer for timing communication wait.
+    *
+    * The timer is used only for the MPI communication wait.  Timing
+    * does not include time the stage Members use to process the
+    * messages (the time spent in Member::proceedToNextWait()).
+    *
+    * If not set, or NULL is given, none will be used.
+    */
+   void
+   setCommunicationWaitTimer(
+      Pointer<Timer> communication_timer);
+
+   /*!
+    * @brief Get the number of Members on this stage.
+    */
+   size_t
+   numberOfMembers() const;
+
+   /*!
+    * @brief Return whether the stage has any pending communication
+    * requests.
+    */
+   bool
+   hasPendingRequests() const;
+
+   /*!
+    * @brief Return the number of Members that have pending
+    * communication.
+    */
+   size_t
+   numberOfPendingMembers() const;
+
+   /*!
+    * @brief Return the number of pending SAMRAI_MPI::Request
+    * objects on the stage.
+    */
+   size_t
+   numberOfPendingRequests() const;
+
+private:
+   /*!
+    * @brief Member is a friend so it can access private look-up and
+    * stage/destage methods.  This avoids making those private methods
+    * public.  This friendship is safe because Member is an integral
+    * part of the stage code.
+    */
+   friend class Member;
+
+   /*!
+    * @brief Trivial typedef used by SAMRAI template scripts to
+    * generate code to instantiate MemberVec (not
+    * used anywhere else).
+    */
+   typedef Member * MemberPtr;
+
+   /*!
+    * @brief Set up a Member to work this stage, initializing mutual
+    * references between the stage and the member.
+    *
+    * @param nreq Number of requests needed on the stage.
+    *
+    * @param handle Optional pointer back to a Member object associated
+    *               with the Member.  See class documentation.
+    */
+   void
+   privateStageMember(
+      Member* Member,
+      size_t nreq);
+
+   /*!
+    * @brief Remove a member from the stage, clearing mutual
+    * references between the stage and the member.
+    */
+   void
+   privateDestageMember(
+      Member* Member);
+
+   /*!
+    * @brief Get the number of requests for the given Member index.
+    */
+   size_t
+   numberOfRequests(
+      size_t index_on_stage) const;
+
+   /*!
+    * @brief Assert internal data consistency.
+    */
+   void
+   assertDataConsistency() const;
+
+   /*!
+    * @brief Lookup and return the request pointer from the stage for
+    * the given Member.
+    *
+    * The given Member MUST have been allocated by the stage.
+    * The number of requests that the Member may use is the
+    * same as the number originally requested.
+    *
+    * The pointer is NOT guaranteed to be the same for the life
+    * of the Member, as a stage may rearange the array of
+    * SAMRAI_MPI::Request objects.  However, the pointer is valid
+    * until the next call to privateStageMember().
+    *
+    * This is private because only friend class Member should
+    * use it.
+    */
+   SAMRAI_MPI::Request *
+   lookupRequestPointer(
+      const size_t index_on_stage) const;
+
+   /*!
+    * @brief Look up and return the status pointer from the stage
+    * for the given Member.  (Works similarly to lookupRequestPointer().)
+    */
+   SAMRAI_MPI::Status *
+   lookupStatusPointer(
+      const size_t index_on_stage) const;
+
+   /*!
+    * @brief Members managed on this stage.
+    *
+    * Includes destaged Members that are still occupying space on the
+    * stage because they are not at the end of the vector and cannot
+    * be removed from the vector.
+    */
+   MemberVec d_members;
+
+   /*!
+    * @brief Number of members.
+    *
+    * Not necessarily the same as d_members.size(), because d_members
+    * may have unused slots left behind by destaged members.
+    */
+   size_t d_member_count;
+
+   /*!
+    * @brief SAMRAI_MPI::Request objects used by the Members.
+    *
+    * This is mutable because the const method getRequestPointer()
+    * needs to return a non-const SAMRAI_MPI::Request pointer.  The
+    * pointer must be non-const for use in MPI calls.
+    * getRequestPointer() should be const because no Member should
+    * require a non-const stage just to get the request allocated for
+    * it.
+    */
+   mutable std::vector<SAMRAI_MPI::Request> d_req;
+
+   /*!
+    * @brief SAMRAI_MPI::Status objects corresponding to requests on
+    * the stage.
+    */
+   mutable std::vector<SAMRAI_MPI::Status> d_stat;
+
+   //!@brief Map from request index to Member index.
+   std::vector<size_t> d_req_to_member;
+
+   /*!
+    * @brief Map from Member index to (the Member's first) request index.
+    *
+    * Provides the index where Member i's requests starts
+    * (d_member_to_req[i]) and the number of request it has
+    * (d_member_to_req[i+1]-d_member_to_req[i]).  This vector is
+    * always one longer than d_members.  The extra item,
+    * d_member_to_req[d_members.size()], is the total number of
+    * requests that the stage has allocated.
+    */
+   std::vector<size_t> d_member_to_req;
+
+   /*!
+    * @brief Timer for communicaiton wait, set by
+    * setCommunicationWaitTimer().
+    */
+   Pointer<Timer> d_communication_timer;
+
+};
+
+}
+}
+
+#endif  // included_tbox_AsyncCommStage
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/BalancedDepthFirstTree.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/BalancedDepthFirstTree.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,226 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility for building efficient communication tree. 
+ *
+ ************************************************************************/
+#ifndef included_tbox_BalancedDepthFirstTree_C
+#define included_tbox_BalancedDepthFirstTree_C
+
+#include "SAMRAI/tbox/BalancedDepthFirstTree.h"
+
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+BalancedDepthFirstTree::BalancedDepthFirstTree()
+{
+}
+
+BalancedDepthFirstTree::BalancedDepthFirstTree(
+   unsigned int first_rank,
+   unsigned int last_rank,
+   unsigned int my_rank,
+   bool do_left_leaf_switch)
+{
+   initialize(first_rank, last_rank, my_rank, do_left_leaf_switch);
+}
+
+BalancedDepthFirstTree::~BalancedDepthFirstTree()
+{
+}
+
+void BalancedDepthFirstTree::initialize(
+   unsigned int first_rank,
+   unsigned int last_rank,
+   unsigned int rank,
+   bool do_left_leaf_switch)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(first_rank <= rank);
+   TBOX_ASSERT(rank <= last_rank);
+#endif
+#if defined(BalancedDepthFirstTree_ExtraDebug)
+   tbox::plog
+   << "BalancedDepthFirstTree::initialize with first_rank,last_rank,x="
+   << first_rank << " " << last_rank << " " << rank << std::endl;
+#endif
+
+   unsigned int rbeg = first_rank;
+   unsigned int rend = last_rank;
+   unsigned int up = getInvalidRank();          // Temporary guess for parent.
+   unsigned int upp = getInvalidRank(); // Temporary guess for grandparent.
+   unsigned int cl, cr;         // Temporary guesses for children.
+   bool is_switchable = false;    // Part of a left-leaf switchable trio.
+
+   size_t nr;           // Number of nodes on right branch
+   size_t nl;           // Number of nodes on left branch
+
+   while (1) {
+
+      /*
+       * Walk from root to leaf to find the position of rank, its
+       * parent and its children.
+       */
+
+      unsigned int node = rbeg; // Node being examined
+      size_t nrem = rend - rbeg;  // Number or nodes remaining, excluding node.
+
+      nr = nrem / 2;      // Number on right branch
+      nl = nrem - nr;     // Number on left branch
+
+      /*
+       * Both children are leaves => parent and children make
+       * a switchable trio.
+       */
+      if (nrem == 2) {
+         is_switchable = true;
+      }
+
+      cl = getInvalidRank();
+      cr = getInvalidRank();
+      if (nl > 0) cl = node + 1;        // left child
+      if (nr > 0) cr = cl + static_cast<int>(nl);         // right child
+
+#if defined(BalancedDepthFirstTree_ExtraDebug)
+      tbox::plog << "There are" << " " << nrem << " "
+                 << "remaining nodes.  nl,nr=" << " " << nl << " " << nr
+                 << std::endl;
+      tbox::plog << "cl=" << " " << cl << " " << "cr=" << " " << cr
+                 << std::endl;
+#endif
+
+      if (node == rank) break;
+      else {
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(nl > 0);
+         TBOX_ASSERT(cl != getInvalidRank());
+#endif
+         upp = up;
+         up = node;
+         if (nr < 1 || rank < cr) {
+#if defined(BalancedDepthFirstTree_ExtraDebug)
+            tbox::plog << "Going left to" << " " << cl << std::endl;
+#endif
+            rbeg = cl;
+            rend = cl + static_cast<int>(nl) - 1;
+         } else {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(nr > 0);
+            TBOX_ASSERT(cr != getInvalidRank());
+#endif
+#if defined(BalancedDepthFirstTree_ExtraDebug)
+            tbox::plog << "Going right to" << " " << cr << std::endl;
+#endif
+            rbeg = cr;
+            rend = cr + static_cast<int>(nr) - 1;
+         }
+      }
+   }
+
+   const int gparent = upp;
+   d_rank = rank;
+   d_parent = up;
+   d_children[0] = cl;
+   d_children[1] = cr;
+   d_num_children = 0;
+#if defined(BalancedDepthFirstTree_ExtraDebug)
+   tbox::plog << "  " << d_parent << std::endl;
+   tbox::plog << "   |" << std::endl;
+   tbox::plog << "  " << d_rank << std::endl;
+   tbox::plog << "  /  \\ " << std::endl;
+   tbox::plog << d_children[0] << "   " << d_children[1] << std::endl;
+#endif
+
+   if (do_left_leaf_switch) {
+      if (is_switchable) {
+         /*
+          * Trios of a parent and 2 leaf children are subject to
+          * switching, in which the parent and left child switch
+          * places:
+          *
+          * Before:    parent              After:   left
+          *            /  \                        /  \
+          *        left    right             parent    right
+          */
+         if (nl == 1) {
+            // Parent in a left-leaf switchable.
+            d_parent = cl;
+            d_children[0] = getInvalidRank();
+            d_children[1] = getInvalidRank();
+         } else if (rank == d_parent + 1) {
+            // Left child in a left-leaf switchable.
+            d_children[0] = d_parent;
+            d_parent = gparent;
+            d_children[1] = rank + 1;
+         } else {
+            // Right child in a left-leaf switchable.
+            d_parent = d_parent + 1;
+         }
+      } else {
+         /*
+          * Rank is not in a switchable trio, but its children
+          * may be.  Example:
+          *
+          * Before:       rank                   After:       rank
+          *             /    \                              /    \
+          *            /      \                            /      \
+          *      rank+1        rank+4                rank+2        rank+5
+          *     /      \      /      \              /      \      /      \
+          *    /        \    /        \            /        \    /        \
+          * rank+2   rank+3  rank+5   rank+6    rank+1   rank+3  rank+4   rank+6
+          */
+         if (nl == 3) {
+            ++d_children[0];
+         }
+         if (nr == 3) {
+            ++d_children[1];
+         }
+      }
+   }
+
+   for (int i = 0; i < 2; ++i) {
+      if (d_children[i] != getInvalidRank()) {
+         ++d_num_children;
+      }
+   }
+
+#if defined(BalancedDepthFirstTree_ExtraDebug)
+   tbox::plog << "  " << d_parent << std::endl;
+   tbox::plog << "   |" << std::endl;
+   tbox::plog << "  " << d_rank << std::endl;
+   tbox::plog << "  /  \\ " << std::endl;
+   tbox::plog << d_children[0] << "   " << d_children[1] << std::endl;
+#endif
+}
+
+unsigned int BalancedDepthFirstTree::getInvalidRank() const
+{
+   return 1 << (8 * sizeof(unsigned int) - 2);
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Unsuppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/BalancedDepthFirstTree.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/BalancedDepthFirstTree.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,164 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility for building efficient communication tree. 
+ *
+ ************************************************************************/
+#ifndef included_tbox_BalancedDepthFirstTree
+#define included_tbox_BalancedDepthFirstTree
+
+#include "SAMRAI/SAMRAI_config.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+/*!
+ * @brief Utility to compute neighbors in a balanced depth-first tree.
+ *
+ * This class is a tool to create a processor tree appropriate for use
+ * in collective communication operations.  An example of a tree created
+ * is
+ * @verbatim
+ *                     0
+ *                    / \
+ *                   /   \
+ *                  /     \
+ *                 1       8
+ *                / \     / \
+ *               2   5   9   12
+ *              /|  /|  / \  |\
+ *             3 4 6 7 10 11 13...
+ * @endverbatim
+ *
+ * The tree is as balanced as possible.  Nodes that are close together
+ * in the tree tends to be close together in natural ordering.  Without
+ * knowing about the underlying message passing network structure, we
+ * assume that close natural ordering usually means close together on
+ * the network.  Thus nodes close together in the tree are also close
+ * together on the network.  Thus, communication between nearest
+ * neighbors in the tree tend to be faster.
+ *
+ * The tree formed by this class has the property that each and every
+ * subtree is composed nodes with contiguous natural ordering.  This
+ * again benefits communication.
+ */
+class BalancedDepthFirstTree
+{
+
+public:
+   typedef int LocalId;
+
+   /*!
+    * @brief Constructor.
+    */
+   BalancedDepthFirstTree();
+
+   /*!
+    * @brief Initializing constructor.
+    *
+    * @see initialize().
+    */
+   explicit BalancedDepthFirstTree(
+      unsigned int first_rank,
+      unsigned int last_rank,
+      unsigned int rank,
+      bool do_left_leaf_switch);
+
+   /*!
+    * @brief Destructor.
+    *
+    * Deallocate internal data.
+    */
+   virtual ~BalancedDepthFirstTree(
+      void);
+
+   /*!
+    * @brief Construct the tree.
+    *
+    * Initialize the parent, left and right children, given a
+    * contiguous range of processor ranks and the desired rank.
+    * Initialization has complexity ln(length of range).
+    *
+    * The tree is set up for collective communications with the root
+    * rank being the first_rank.
+    *
+    * @param first_rank The first in a contiguous range of ranks in the
+    * communication group.
+    *
+    * @param last_rank The last in a contiguous range of ranks in the
+    * communication group.
+    *
+    * @param rank The rank whose parent and children are sought.
+    */
+   void
+   initialize(
+      unsigned int first_rank,
+      unsigned int last_rank,
+      unsigned int rank,
+      bool do_left_leaf_switch);
+
+   /*!
+    * @brief Access the rank used to initialize.
+    */
+   unsigned int getRank() const
+   {
+      return d_rank;
+   }
+
+   /*!
+    * @brief Access the parent rank.
+    */
+   unsigned int getParentRank() const
+   {
+      return d_parent;
+   }
+
+   /*!
+    * @brief Access a child rank.
+    *
+    * Currently, child_number must be 0 or 1 because we only support
+    * a binary tree.
+    */
+   unsigned int getChildRank(
+      unsigned int child_number) const
+   {
+      return d_children[child_number];
+   }
+
+   unsigned short int getNumberOfChildren() const
+   {
+      return d_num_children;
+   }
+
+   /*!
+    * @brief What this class considers an invalid rank.
+    *
+    * When a parent or child does not exist, this value is returned for
+    * the rank.
+    */
+   unsigned int
+   getInvalidRank() const;
+
+private:
+   /*!
+    * @brief Initialized rank.
+    *
+    * @see initialize();
+    */
+   unsigned int d_rank;
+
+   unsigned int d_parent;
+
+   unsigned int d_children[2];
+
+   unsigned short int d_num_children;
+
+};
+
+}
+}
+
+#endif  // included_tbox_BalancedDepthFirstTree
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Clock.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Clock.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,86 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Accesses system times. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Clock.h"
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+
+#include <cstdlib>
+
+namespace SAMRAI {
+namespace tbox {
+
+#ifdef HAVE_SYS_TIMES_H
+struct tms Clock::s_tms_buffer;
+#endif
+clock_t Clock::s_null_clock_t;
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialize clock.                                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+void Clock::initialize(
+   clock_t& clock)
+{
+#ifdef HAVE_SYS_TIMES_H
+   clock = times(&s_tms_buffer);
+#endif
+}
+
+void Clock::initialize(
+   double& clock)
+{
+   clock = 0.0;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Timestamp the provided structures with current system clock readings. *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Clock::timestamp(
+   clock_t& user,
+   clock_t& sys,
+   double& wall)
+{
+#ifdef HAVE_SYS_TIMES_H
+   s_null_clock_t = times(&s_tms_buffer);
+   wall = tbox::SAMRAI_MPI::Wtime();
+   sys = s_tms_buffer.tms_stime;
+   user = s_tms_buffer.tms_utime;
+#endif
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Get the clock cycle used by the system (time is then computed         *
+ * as measured_time/clock_cycle)                                         *
+ *                                                                       *
+ *************************************************************************
+ */
+double Clock::getClockCycle()
+{
+#ifdef _POSIX_VERSION
+   double clock_cycle = double(sysconf(_SC_CLK_TCK));
+#else
+   double clock_cycle = 1.0;
+#endif
+   return clock_cycle;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Clock.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Clock.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,113 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Simple utility class for interfacing with system clock 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_Clock
+#define included_tbox_Clock
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#ifdef HAVE_CTIME
+#include <ctime>
+#endif
+
+#ifdef HAVE_SYS_TIMES_H
+#include <sys/times.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * Class Clock serves as a single point of access for system clock
+ * information.  System and user time are computed via the POSIX compliant
+ * times() function.  This is described on p. 137, Lewine, POSIX programmers
+ * guide, 1992.  The methods and structs used in this utility are defined
+ * in <sys/times.h>.  Start and end times are stored as variables of type
+ * clock_t.  A clock_t value can be converted to seconds by dividing by
+ * CLK_TCK (which is defined in <sys/times.h>).  Different systems may use
+ * different CLK_TCK.  Time is accessed by calling the times() function which
+ * takes as an argument a reference to an object of type struct tms.  This
+ * object will record the system and user time (obj.tms_utime \&
+ * obj.tms_stime) and will return the time since the system was started.
+ *
+ * The return value from the call to times() can be used to compute elapsed
+ * wallclock time.  Alternatively, one can use SAMRAI_MPI::Wtime() if MPI libraries
+ * are included.  Two methods are defined for accessing system time - one that
+ * has a clock_t struct argument for wallclock time (the non-MPI case) and
+ * one that has a double argument to record the value of SAMRAI_MPI::Wtime().
+ *
+ * Computing user/system/wallclock time with the times() function is performed
+ * as follows:
+ * \verbatim
+ *    struct tms buffer;
+ *    clock_t wtime_start = times(&buffer);
+ *    clock_t stime_start = buffer.tms_stime;
+ *    clock_t utime_start = buffer.tms_utime;
+ *     (do some computational work)
+ *    clock_t wtime_stop  = times(&buffer);
+ *    clock_t stime_stop  = buffer.tms_stime;
+ *    clock_t utime_stop  = buffer.tms_utime;
+ *    double wall_time   = double(wtime_stop-wtime_start)/double(CLK_TCK);
+ *    double user_time   = double(utime_stop-utime_start)/double(CLK_TCK);
+ *    double sys_time    = double(stime_stop-stime_start)/double(CLK_TCK);
+ * \endverbatim
+ *
+ */
+
+struct Clock {
+   /**
+    * Initialize system clock.  Argument must be in the "clock_t" format
+    * which is a standard POSIX struct provided on most systems in the
+    * <sys/times.h> include file. On Microsoft systems, it is provided in
+    * <time.h>.
+    */
+   static void
+   initialize(
+      clock_t& clock);
+
+   /**
+    * Initialize system clock, where clock is in double format.
+    */
+   static void
+   initialize(
+      double& clock);
+
+   /**
+    * Timestamp user, system, and walltime clocks.  Wallclock argument is in
+    * double format since it will access wallclock times from SAMRAI_MPI::Wtime()
+    * function.
+    */
+   static void
+   timestamp(
+      clock_t& user,
+      clock_t& sys,
+      double& wall);
+
+   /**
+    * Returns clock cycle for the system.
+    */
+   static double
+   getClockCycle();
+
+private:
+#ifdef HAVE_SYS_TIMES_H
+   static struct tms s_tms_buffer;
+#endif
+   static clock_t s_null_clock_t;
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Complex.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Complex.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,38 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   dcomplex class for old-style complex and new complex<double> 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_Complex
+#define included_tbox_Complex
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <complex>
+
+/*!
+ * @page toolbox_complex Toolbox Complex Type
+ *
+ * @brief dcomplex is a typedef to overcome C++ compiler issues with
+ * the std::complex type.
+ *
+ * The std::complex type should be a template however some older C++ compilers
+ * implement complex as a double complex.  dcomplex is used to hide this
+ * platform issue behind a typedef.
+ *
+ * NOTE: This should be removed when no longer required.
+ *
+ */
+
+#ifndef LACKS_TEMPLATE_COMPLEX
+typedef std::complex<double> dcomplex;
+#else
+typedef std::complex dcomplex;
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/ConstPointer.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/ConstPointer.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,123 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A smart const pointer template class with RTTI 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_ConstPointer_C
+#define included_tbox_ConstPointer_C
+
+#include <typeinfo>
+
+#include "SAMRAI/tbox/ConstPointer.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/tbox/ConstPointer.I"
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+template<class TYPE>
+ConstPointer<TYPE>::ConstPointer(
+   const TYPE* ptr,
+   const bool managed)
+{
+   d_object = ptr;
+   if (d_object && managed) {
+      d_counter = new ReferenceCounter;
+   } else {
+      d_counter = (ReferenceCounter *)NULL;
+   }
+}
+
+template<class TYPE>
+ConstPointer<TYPE>::ConstPointer(
+   const ConstPointerBase& ptr)
+{
+   const DescribedClass* sub_ptr = ptr.getSubclassPointer();
+   if (sub_ptr) {
+      d_object = (TYPE *)dynamic_cast<const TYPE *>(sub_ptr);
+   } else {
+      d_object = NULL;
+   }
+
+   if (d_object) {
+      d_counter = ptr.getSubclassReferenceCounter();
+      if (d_counter) d_counter->addReference();
+   } else {
+      d_counter = (ReferenceCounter *)NULL;
+   }
+}
+
+template<class TYPE>
+ConstPointer<TYPE>&ConstPointer<TYPE>::operator = (
+   const TYPE* ptr)
+{
+   if (d_counter && d_counter->deleteReference()) deleteObject();
+   d_object = ptr;
+   if (d_object) {
+      d_counter = new ReferenceCounter;
+   } else {
+      d_counter = (ReferenceCounter *)NULL;
+   }
+   return *this;
+}
+
+template<class TYPE>
+ConstPointer<TYPE>&
+ConstPointer<TYPE>::operator = (
+   const ConstPointerBase& ptr)
+{
+   if (this != &ptr) {
+      if (d_counter && d_counter->deleteReference()) deleteObject();
+
+      const DescribedClass* sub_ptr = ptr.getSubclassPointer();
+      if (sub_ptr) {
+         d_object = (TYPE *)dynamic_cast<const TYPE *>(sub_ptr);
+      } else {
+         d_object = NULL;
+      }
+
+      if (d_object) {
+         d_counter = ptr.getSubclassReferenceCounter();
+         if (d_counter) d_counter->addReference();
+      } else {
+         d_counter = (ReferenceCounter *)NULL;
+      }
+   }
+   return *this;
+}
+
+template<class TYPE>
+void ConstPointer<TYPE>::deleteObject()
+{
+   delete d_object;
+   delete d_counter;
+
+   d_object = (TYPE *)NULL;
+   d_counter = (ReferenceCounter *)NULL;
+}
+
+template<class TYPE>
+const DescribedClass * ConstPointer<TYPE>::getSubclassPointer() const
+{
+   return (const DescribedClass *)d_object;
+}
+
+template<class TYPE>
+ReferenceCounter *
+ConstPointer<TYPE>::getSubclassReferenceCounter() const
+{
+   return (ReferenceCounter *)d_counter;
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/ConstPointer.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/ConstPointer.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,139 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A smart const pointer template class with RTTI 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace tbox {
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ConstPointer<TYPE>::ConstPointer()
+{
+   d_object = (const TYPE *)NULL;
+   d_counter = (ReferenceCounter *)NULL;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ConstPointer<TYPE>::ConstPointer(
+   const ConstPointer<TYPE>& ptr):
+   ConstPointerBase()
+{
+   d_object = ptr.d_object;
+   d_counter = ptr.d_counter;
+   if (d_counter) d_counter->addReference();
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ConstPointer<TYPE>::~ConstPointer()
+{
+   if (d_counter && d_counter->deleteReference()) deleteObject();
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ConstPointer<TYPE>&
+ConstPointer<TYPE>::operator = (
+   const ConstPointer<TYPE>& ptr)
+{
+   if (this != &ptr) {
+      if (d_counter && d_counter->deleteReference()) deleteObject();
+      d_object = ptr.d_object;
+      d_counter = ptr.d_counter;
+      if (d_counter) d_counter->addReference();
+   }
+   return *this;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+bool
+ConstPointer<TYPE>::operator == (
+   const ConstPointer<TYPE>& rhs) const
+{
+   return d_object == rhs.d_object;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+bool
+ConstPointer<TYPE>::operator != (
+   const ConstPointer<TYPE>& rhs) const
+{
+   return d_object != rhs.d_object;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void ConstPointer<TYPE>::setNull()
+{
+   if (d_counter && d_counter->deleteReference()) deleteObject();
+   d_object = (TYPE *)NULL;
+   d_counter = (ReferenceCounter *)NULL;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE * ConstPointer<TYPE>::operator -> () const
+{
+   return d_object;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE &ConstPointer<TYPE>::operator * () const
+{
+   return *d_object;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ConstPointer<TYPE>::operator const TYPE* () const
+{
+   return d_object;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+bool ConstPointer<TYPE>::isNull() const
+{
+   return !d_object;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ConstPointer<TYPE>::operator bool () const
+{
+   return d_object ? true : false;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+bool ConstPointer<TYPE>::operator ! () const
+{
+   return !d_object;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE * ConstPointer<TYPE>::getPointer() const
+{
+   return d_object;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ReferenceCounter * ConstPointer<TYPE>::getReferenceCounter() const
+{
+   return d_counter;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/ConstPointer.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/ConstPointer.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,218 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A smart const pointer template class with RTTI 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_ConstPointer
+#define included_tbox_ConstPointer
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/ConstPointerBase.h"
+#include "SAMRAI/tbox/ReferenceCounter.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+template<class TYPE>
+class Pointer;
+
+/**
+ * Class ConstPointer<TYPE> defines a smart const pointer to TYPE.
+ * It frees the user from explicitly deleting and tracking aliases for
+ * object pointers.  It manages all reference counting and deallocation
+ * of the pointer (even if the data was originally allocated from a memory
+ * arena).  When the reference count on a ConstPointer<TYPE> object
+ * goes to zero, the object is automatically deallocated.  A block with a
+ * references count and arena pointer is allocated for all non-NULL pointers.
+ * These reference counted blocks are freed at the end of the lifetime of
+ * the pointer.
+ *
+ * Const pointers can be created from either const or non-const pointers.
+ * The non-const and const pointer classes have been designed so that an
+ * attempted conversion from a const pointer into a non-const pointer causes
+ * a compile-time error.
+ *
+ * Class ConstPointer<TYPE> performs type-checking when assigning
+ * pointers of different TYPEs.  If a bad type conversion is performed,
+ * then the destination pointer is set to NULL.
+ *
+ * @see tbox::Array
+ * @see tbox::ConstPointerBase
+ * @see tbox::ReferenceCounter
+ * @see tbox::PointerBase
+ * @see tbox::Pointer
+ */
+
+template<class TYPE>
+class ConstPointer:public ConstPointerBase
+{
+public:
+   /**
+    * The default constructor creates a null pointer.
+    */
+   ConstPointer();
+
+   /**
+    * Create a smart pointer with value ptr.  If managed is true, then
+    * deallocation of the object pointed to by ptr will be taken care of
+    * by the smart pointer.  This form assumes the pointer was allocated
+    * using the standard new operator.
+    */
+   ConstPointer(
+      const TYPE* ptr,
+      const bool managed = true);
+
+   /**
+    * The pointer const constructor creates a smart pointer reference
+    * aliased to the argument.
+    */
+   ConstPointer(
+      const ConstPointer<TYPE>& ptr);
+
+   /**
+    * Create a pointer by attempting to type-cast the argument to TYPE.
+    * If the type-cast fails, then the destination pointer will be set
+    * to NULL.
+    */
+   ConstPointer(
+      const ConstPointerBase& ptr);
+
+   /**
+    * The pointer destructor frees the pointer data if the reference
+    * count drops to zero.  The object is deallocated from the memory
+    * pool (if it was specified in the constructor call).
+    */
+   ~ConstPointer();
+
+   /**
+    * Smart pointer assignment.  The left hand side points to the
+    * right hand side and the reference count is incremented by one.
+    */
+   ConstPointer<TYPE>&
+   operator = (
+      const ConstPointer<TYPE>& ptr);
+
+   /**
+    * Create a managed smart pointer with value ptr.  The object pointed
+    * to by ptr will be deallocated via delete when the reference count
+    * goes to zero.
+    */
+   ConstPointer<TYPE>&
+   operator = (
+      const TYPE* ptr);
+
+   /**
+    * Attempt to convert the argument pointer to a ConstPointer<TYPE>.
+    * If the type conversion fails, then the destination pointer will be set
+    * to NULL.
+    */
+   ConstPointer<TYPE>&
+   operator = (
+      const ConstPointerBase& ptr);
+
+   /**
+    * Check whether two smart pointers point to the same object.
+    */
+   bool
+   operator == (
+      const ConstPointer<TYPE>& rhs) const;
+
+   /**
+    * Check whether two smart pointers point to different objects.
+    */
+   bool
+   operator != (
+      const ConstPointer<TYPE>& rhs) const;
+
+   /**
+    * Delegate member operations to the pointed-to object.  C++ defines
+    * the ``->'' operator in a funny way to support delegation.  The
+    * statement ptr->foo() acts as if ptr where actually a pointer
+    * to an object with member function foo() instead of a class that
+    * holds that pointer.
+    */
+   const TYPE *
+   operator -> () const;
+
+   /**
+    * Dereference the smart pointer.  The pointer returned is a const
+    * pointer to the object.
+    */
+   const TYPE&
+   operator * () const;
+
+   /**
+    * Implicit conversion of the smart pointer to the pointed-to object.
+    * The pointer returned is a const pointer to the object.
+    */
+   operator const TYPE
+   * () const;
+
+   /**
+    * Explicitly convert the smart pointer to the pointed-to object.
+    * The pointer returned is a const pointer to the object.
+    */
+   const TYPE *
+   getPointer() const;
+
+   /**
+    * Check whether the smart pointer points to NULL.
+    */
+   bool
+   isNull() const;
+
+   /**
+    * Return true if the pointer is non-NULL.
+    */
+   operator bool () const;
+
+   /**
+    * Return true if the pointer is NULL and false otherwise.  This operator
+    * mimics the semantics of !p applied to a (regular) pointer p.
+    */
+   bool
+   operator ! () const;
+
+   /**
+    * Set the smart pointer to NULL.
+    */
+   void
+   setNull();
+
+   /**
+    * Return a pointer to the internal reference counter.  This routine
+    * should not be called by the casual user.
+    */
+   ReferenceCounter *
+   getReferenceCounter() const;
+
+private:
+   void
+   deleteObject();
+   ReferenceCounter *
+   getSubclassReferenceCounter() const;
+   const DescribedClass *
+   getSubclassPointer() const;
+
+   const TYPE* d_object;
+   ReferenceCounter* d_counter;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/tbox/ConstPointer.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/tbox/ConstPointer.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/ConstPointerBase.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/ConstPointerBase.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A smart const pointer base class with RTTI 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/ConstPointerBase.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/tbox/ConstPointerBase.I"
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+ConstPointerBase::~ConstPointerBase()
+{
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/ConstPointerBase.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/ConstPointerBase.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,20 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A smart const pointer base class with RTTI 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace tbox {
+
+SAMRAI_INLINE_KEYWORD
+ConstPointerBase::ConstPointerBase()
+{
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/ConstPointerBase.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/ConstPointerBase.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A smart const pointer base class with RTTI 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_ConstPointerBase
+#define included_tbox_ConstPointerBase
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/ReferenceCounter.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * Class ConstPointerBase is an abstract base class used by template
+ * class ConstPointer<TYPE> for type-safe conversion between various
+ * pointer types.  It forms the base of the RTTI conversion hierarchy for
+ * pointers.  Both the non-const pointer base class and the const pointer
+ * class are subclasses of the const pointer base class.  This structure
+ * ensures that RTTI conversion of pointers from const to const, non-const
+ * to non-const, and non-const to const work as expected but that conversion
+ * from const to non-const fail at compile-time.
+ *
+ * @see tbox::ConstPointer
+ * @see tbox::PointerBase
+ * @see tbox::Pointer
+ */
+
+class ConstPointerBase
+{
+public:
+   ConstPointerBase();
+   virtual ~ConstPointerBase();
+   virtual ReferenceCounter *
+   getSubclassReferenceCounter() const = 0;
+   virtual const DescribedClass *
+   getSubclassPointer() const = 0;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/tbox/ConstPointerBase.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Database.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Database.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1165 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An abstract base class for the SAMRAI database objects 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Database.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/tbox/Database.I"
+#endif
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+Database::~Database()
+{
+}
+
+Database::Serializable::~Serializable()
+{
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Get database entry from the database with the specified key          *
+ * name. An error message is printed and the program exits if the       *
+ * specified key does not exist in the database or is not associated    *
+ * with a database type.                                                *
+ *                                                                      *
+ ************************************************************************
+ */
+
+Pointer<Database> Database::getDatabaseWithDefault(
+   const std::string& key,
+   const Pointer<Database>& defaultvalue)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (keyExists(key)) {
+      return getDatabase(key);
+   } else {
+      return defaultvalue;
+   }
+
+}
+
+/*
+ * Boolean
+ */
+
+/*
+ * Create a boolean scalar entry in the database with the specified
+ * key name.  A scalar entry is an array of one.
+ *
+ */
+
+void Database::putBool(
+   const std::string& key,
+   const bool& data)
+{
+   TBOX_ASSERT(!key.empty());
+
+   putBoolArray(key, &data, 1);
+}
+
+/*
+ * Create a boolean array entry in the database with the specified
+ * key
+ */
+
+void Database::putBoolArray(
+   const std::string& key,
+   const Array<bool>& data)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (data.getSize() > 0) {
+      putBoolArray(key, data.getPointer(), data.getSize());
+   } else {
+      TBOX_ERROR("Database::putBoolArray() error in database "
+         << getName()
+         << "\n    Attempt to put zero-length array with key = "
+         << key << std::endl);
+   }
+}
+
+/*
+ * Get boolean scalar entry from the database with the specified key
+ * name. An error message is printed and the program exits if the
+ * specified key does not exist in the database or is not associated
+ * with a boolean type.
+ */
+
+bool Database::getBool(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   bool ret_val;
+   getBoolArray(key, &ret_val, 1);
+
+   return ret_val;
+}
+
+/*
+ * Get boolean scalar entry from the database with the specified key
+ * name. An error message is printed and the program exits if the
+ * specified key does not exist in the database or is not associated
+ * with a boolean type.
+ */
+
+bool Database::getBoolWithDefault(
+   const std::string& key,
+   const bool& defaultvalue)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (keyExists(key)) {
+      Array<bool> local_bool = getBoolArray(key);
+      bool* locptr = local_bool.getPointer();
+      return locptr == NULL ? defaultvalue : *locptr;
+   } else {
+      return defaultvalue;
+   }
+}
+
+void Database::getBoolArray(
+   const std::string& key,
+   bool* data,
+   const int nelements)
+{
+   TBOX_ASSERT(!key.empty());
+
+   Array<bool> tmp = getBoolArray(key);
+   const int tsize = tmp.getSize();
+
+   if (nelements != tsize) {
+      TBOX_ERROR("Database::getBoolArray() error in database "
+         << getName()
+         << "\n    Incorrect array size = " << nelements
+         << " given for key = " << key
+         << "\n    Actual array size = " << tsize << std::endl);
+   }
+
+   for (int i = 0; i < tsize; i++) {
+      data[i] = tmp[i];
+   }
+
+}
+
+void Database::getScalar(
+   const std::string& key,
+   bool& scalar)
+{
+   scalar = getBool(key);
+}
+
+void Database::putScalar(
+   const std::string& key,
+   const bool scalar)
+{
+   putBool(key, scalar);
+}
+
+void Database::getArray(
+   const std::string& key,
+   Array<bool>& array)
+{
+   array = getBoolArray(key);
+}
+
+void Database::putArray(
+   const std::string& key,
+   const Array<bool> array)
+{
+   putBoolArray(key, array);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a box entry in the database with the specified                 *
+ * key name.  A box entry is an array of one.                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Database::putDatabaseBox(
+   const std::string& key,
+   const DatabaseBox& data)
+{
+   TBOX_ASSERT(!key.empty());
+
+   putDatabaseBoxArray(key, &data, 1);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a box array entry in the database with the specified key name. *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Database::putDatabaseBoxArray(
+   const std::string& key,
+   const Array<DatabaseBox>& data)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (data.getSize() > 0) {
+      putDatabaseBoxArray(key, data.getPointer(), data.getSize());
+   } else {
+      TBOX_ERROR("Database::putDatabaseBoxArray() error in database "
+         << getName()
+         << "\n    Attempt to put zero-length array with key = "
+         << key << std::endl);
+   }
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Get box scalar entry from the database with the specified key        *
+ * name. An error message is printed and the program exits if the       *
+ * specified key does not exist in the database or is not associated    *
+ * with a box type.                                                     *
+ *                                                                      *
+ ************************************************************************
+ */
+
+DatabaseBox Database::getDatabaseBox(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   DatabaseBox ret_val;
+   getDatabaseBoxArray(key, &ret_val, 1);
+
+   return ret_val;
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Get box scalar entry from the database with the specified key        *
+ * name. An error message is printed and the program exits if the       *
+ * specified key does not exist in the database or is not associated    *
+ * with a box type.                                                     *
+ *                                                                      *
+ ************************************************************************
+ */
+
+DatabaseBox Database::getDatabaseBoxWithDefault(
+   const std::string& key,
+   const DatabaseBox& defaultvalue)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (keyExists(key)) {
+      Array<DatabaseBox> local_box = getDatabaseBoxArray(key);
+      DatabaseBox* locptr = local_box.getPointer();
+      return locptr == NULL ? defaultvalue : *locptr;
+   } else {
+      return defaultvalue;
+   }
+
+}
+
+void Database::getDatabaseBoxArray(
+   const std::string& key,
+   DatabaseBox* data,
+   const int nelements)
+{
+   TBOX_ASSERT(!key.empty());
+
+   Array<DatabaseBox> tmp = getDatabaseBoxArray(key);
+   const int tsize = tmp.getSize();
+
+   if (nelements != tsize) {
+      TBOX_ERROR("Database::getDatabaseBoxArray() error in database "
+         << getName()
+         << "\n    Incorrect array size = " << nelements
+         << " given for key = " << key
+         << "\n    Actual array size = " << tsize << std::endl);
+   }
+
+   for (int i = 0; i < tsize; i++) {
+      data[i] = tmp[i];
+   }
+}
+
+/*
+ * Char
+ */
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a char scalar entry in the database with the specified         *
+ * key name.  A scalar entry is an array of one.                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Database::putChar(
+   const std::string& key,
+   const char& data)
+{
+   TBOX_ASSERT(!key.empty());
+
+   putCharArray(key, &data, 1);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a char array entry in the database with the specified          *
+ * key name.                                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Database::putCharArray(
+   const std::string& key,
+   const Array<char>& data)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (data.getSize() > 0) {
+      putCharArray(key, data.getPointer(), data.getSize());
+   } else {
+      TBOX_ERROR("Database::putCharArray() error in database "
+         << getName()
+         << "\n    Attempt to put zero-length array with key = "
+         << key << std::endl);
+   }
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Get char scalar entry from the database with the specified key       *
+ * name. An error message is printed and the program exits if the       *
+ * specified key does not exist in the database or is not associated    *
+ * with a char type.                                                    *
+ *                                                                      *
+ ************************************************************************
+ */
+
+char Database::getChar(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   char ret_val;
+   getCharArray(key, &ret_val, 1);
+
+   return ret_val;
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Get char scalar entry from the database with the specified key       *
+ * name. An error message is printed and the program exits if the       *
+ * specified key does not exist in the database or is not associated    *
+ * with a char type.                                                    *
+ *                                                                      *
+ ************************************************************************
+ */
+
+char Database::getCharWithDefault(
+   const std::string& key,
+   const char& defaultvalue)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (keyExists(key)) {
+      Array<char> local_char = getCharArray(key);
+      char* locptr = local_char.getPointer();
+      return locptr == NULL ? defaultvalue : *locptr;
+   } else {
+      return defaultvalue;
+   }
+
+}
+
+void Database::getCharArray(
+   const std::string& key,
+   char* data,
+   const int nelements)
+{
+   TBOX_ASSERT(!key.empty());
+
+   Array<char> tmp = getCharArray(key);
+   const int tsize = tmp.getSize();
+
+   if (nelements != tsize) {
+      TBOX_ERROR("Database::getCharArray() error in database "
+         << getName()
+         << "\n    Incorrect array size = " << nelements
+         << " given for key = " << key
+         << "\n    Actual array size = " << tsize << std::endl);
+   }
+
+   for (int i = 0; i < tsize; i++) {
+      data[i] = tmp[i];
+   }
+}
+
+void Database::getScalar(
+   const std::string& key,
+   char& scalar)
+{
+   scalar = getChar(key);
+}
+
+void Database::putScalar(
+   const std::string& key,
+   const char scalar)
+{
+   putChar(key, scalar);
+}
+
+void Database::getArray(
+   const std::string& key,
+   Array<char>& array)
+{
+   array = getCharArray(key);
+}
+
+void Database::putArray(
+   const std::string& key,
+   const Array<char> array)
+{
+   putCharArray(key, array);
+}
+
+/*
+ * Complex
+ */
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a complex scalar entry in the database with the specified      *
+ * key name.  A scalar entry is an array of one.                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Database::putComplex(
+   const std::string& key,
+   const dcomplex& data)
+{
+   TBOX_ASSERT(!key.empty());
+
+   putComplexArray(key, &data, 1);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a complex array entry in the database with the specified       *
+ * key name.                                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Database::putComplexArray(
+   const std::string& key,
+   const Array<dcomplex>& data)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (data.getSize() > 0) {
+      putComplexArray(key, data.getPointer(), data.getSize());
+   } else {
+      TBOX_ERROR("Database::putComplexArray() error in database "
+         << getName()
+         << "\n    Attempt to put zero-length array with key = "
+         << key << std::endl);
+   }
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Get complex scalar entry from the database with the specified key    *
+ * name. An error message is printed and the program exits if the       *
+ * specified key does not exist in the database or is not associated    *
+ * with a complex type.                                                 *
+ *                                                                      *
+ ************************************************************************
+ */
+
+dcomplex Database::getComplex(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   dcomplex ret_val;
+   getComplexArray(key, &ret_val, 1);
+
+   return ret_val;
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Get complex scalar entry from the database with the specified key    *
+ * name. An error message is printed and the program exits if the       *
+ * specified key does not exist in the database or is not associated    *
+ * with a complex type.                                                 *
+ *                                                                      *
+ ************************************************************************
+ */
+
+dcomplex Database::getComplexWithDefault(
+   const std::string& key,
+   const dcomplex& defaultvalue)
+{
+   TBOX_ASSERT(!key.empty());
+
+   dcomplex retval = defaultvalue;
+
+   if (keyExists(key)) {
+      Array<dcomplex> local_dcomplex = getComplexArray(key);
+      dcomplex* locptr = local_dcomplex.getPointer();
+      if (locptr != NULL) {
+         retval = *locptr;
+      }
+   } 
+   return retval;
+}
+
+void Database::getComplexArray(
+   const std::string& key,
+   dcomplex* data,
+   const int nelements)
+{
+   TBOX_ASSERT(!key.empty());
+
+   Array<dcomplex> tmp = getComplexArray(key);
+   const int tsize = tmp.getSize();
+
+   if (nelements != tsize) {
+      TBOX_ERROR("Database::getComplexArray() error in database "
+         << getName()
+         << "\n    Incorrect array size = " << nelements
+         << " given for key = " << key
+         << "\n    Actual array size = " << tsize << std::endl);
+   }
+
+   for (int i = 0; i < tsize; i++) {
+      data[i] = tmp[i];
+   }
+}
+
+void Database::getScalar(
+   const std::string& key,
+   dcomplex& scalar)
+{
+   scalar = getComplex(key);
+}
+
+void Database::putScalar(
+   const std::string& key,
+   const dcomplex scalar)
+{
+   putComplex(key, scalar);
+}
+
+void Database::getArray(
+   const std::string& key,
+   Array<dcomplex>& array)
+{
+   array = getComplexArray(key);
+}
+
+void Database::putArray(
+   const std::string& key,
+   const Array<dcomplex> array)
+{
+   putComplexArray(key, array);
+}
+
+/*
+ * Float
+ */
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a float scalar entry in the database with the specified        *
+ * key name.  A scalar entry is an array of one.                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Database::putFloat(
+   const std::string& key,
+   const float& data)
+{
+   TBOX_ASSERT(!key.empty());
+
+   putFloatArray(key, &data, 1);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a float array entry in the database with the specified         *
+ * key name.                                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Database::putFloatArray(
+   const std::string& key,
+   const Array<float>& data)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (data.getSize() > 0) {
+      putFloatArray(key, data.getPointer(), data.getSize());
+   } else {
+      TBOX_ERROR("Database::putFloatArray() error in database "
+         << getName()
+         << "\n    Attempt to put zero-length array with key = "
+         << key << std::endl);
+   }
+
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Get float scalar entry from the database with the specified key      *
+ * name. An error message is printed and the program exits if the       *
+ * specified key does not exist in the database or is not associated    *
+ * with a float type.                                                   *
+ *                                                                      *
+ ************************************************************************
+ */
+
+float Database::getFloat(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   float ret_val;
+   getFloatArray(key, &ret_val, 1);
+
+   return ret_val;
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Get float scalar entry from the database with the specified key      *
+ * name. An error message is printed and the program exits if the       *
+ * specified key does not exist in the database or is not associated    *
+ * with a float type.                                                   *
+ *                                                                      *
+ ************************************************************************
+ */
+
+float Database::getFloatWithDefault(
+   const std::string& key,
+   const float& defaultvalue)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (keyExists(key)) {
+      Array<float> local_float = getFloatArray(key);
+      float* locptr = local_float.getPointer();
+      return locptr == NULL ? defaultvalue : *locptr;
+   } else {
+      return defaultvalue;
+   }
+
+}
+
+void Database::getFloatArray(
+   const std::string& key,
+   float* data,
+   const int nelements)
+{
+   TBOX_ASSERT(!key.empty());
+
+   Array<float> tmp = getFloatArray(key);
+   const int tsize = tmp.getSize();
+
+   if (nelements != tsize) {
+      TBOX_ERROR("Database::getFloatArray() error in database "
+         << getName()
+         << "\n    Incorrect array size = " << nelements
+         << " given for key = " << key
+         << "\n    Actual array size = " << tsize << std::endl);
+   }
+
+   for (int i = 0; i < tsize; i++) {
+      data[i] = tmp[i];
+   }
+}
+
+void Database::getScalar(
+   const std::string& key,
+   float& scalar)
+{
+   scalar = getFloat(key);
+}
+
+void Database::putScalar(
+   const std::string& key,
+   const float scalar)
+{
+   putFloat(key, scalar);
+}
+
+void Database::getArray(
+   const std::string& key,
+   Array<float>& array)
+{
+   array = getFloatArray(key);
+}
+
+void Database::putArray(
+   const std::string& key,
+   const Array<float> array)
+{
+   putFloatArray(key, array);
+}
+
+/*
+ * Double
+ */
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a double scalar entry in the database with the specified       *
+ * key name.  A scalar entry is an array of one.                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Database::putDouble(
+   const std::string& key,
+   const double& data)
+{
+   TBOX_ASSERT(!key.empty());
+
+   putDoubleArray(key, &data, 1);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a double array entry in the database with the specified        *
+ * key name.                                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Database::putDoubleArray(
+   const std::string& key,
+   const Array<double>& data)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (data.getSize() > 0) {
+      putDoubleArray(key, data.getPointer(), data.getSize());
+   } else {
+      TBOX_ERROR("Database::putDoubleArray() error in database "
+         << getName()
+         << "\n    Attempt to put zero-length array with key = "
+         << key << std::endl);
+   }
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Get double scalar entry from the database with the specified key     *
+ * name. An error message is printed and the program exits if the       *
+ * specified key does not exist in the database or is not associated    *
+ * with a double type.                                                  *
+ *                                                                      *
+ ************************************************************************
+ */
+
+double Database::getDouble(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   double ret_val;
+   getDoubleArray(key, &ret_val, 1);
+
+   return ret_val;
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Get double scalar entry from the database with the specified key     *
+ * name. An error message is printed and the program exits if the       *
+ * specified key does not exist in the database or is not associated    *
+ * with a double type.                                                  *
+ *                                                                      *
+ ************************************************************************
+ */
+
+double Database::getDoubleWithDefault(
+   const std::string& key,
+   const double& defaultvalue)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (keyExists(key)) {
+      Array<double> local_double = getDoubleArray(key);
+      double* locptr = local_double.getPointer();
+      return locptr == NULL ? defaultvalue : *locptr;
+   } else {
+      return defaultvalue;
+   }
+}
+
+void Database::getDoubleArray(
+   const std::string& key,
+   double* data,
+   const int nelements)
+{
+   TBOX_ASSERT(!key.empty());
+
+   Array<double> tmp = getDoubleArray(key);
+   const int tsize = tmp.getSize();
+
+   if (nelements != tsize) {
+      TBOX_ERROR("Database::getDoubleArray() error in database "
+         << getName()
+         << "\n    Incorrect array size = " << nelements
+         << " given for key = " << key
+         << "\n    Actual array size = " << tsize << std::endl);
+   }
+
+   for (int i = 0; i < tsize; i++) {
+      data[i] = tmp[i];
+   }
+}
+
+void Database::getScalar(
+   const std::string& key,
+   double& scalar)
+{
+   scalar = getDouble(key);
+}
+
+void Database::putScalar(
+   const std::string& key,
+   const double scalar)
+{
+   putDouble(key, scalar);
+}
+
+void Database::getArray(
+   const std::string& key,
+   Array<double>& array)
+{
+   array = getDoubleArray(key);
+}
+
+void Database::putArray(
+   const std::string& key,
+   const Array<double> array)
+{
+   putDoubleArray(key, array);
+}
+
+/*
+ * Integer
+ */
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a integer scalar entry in the database with the specified      *
+ * key name.  A scalar entry is an array of one.                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Database::putInteger(
+   const std::string& key,
+   const int& data)
+{
+   TBOX_ASSERT(!key.empty());
+
+   putIntegerArray(key, &data, 1);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create an integer array entry in the database with the specified      *
+ * key name.                                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Database::putIntegerArray(
+   const std::string& key,
+   const Array<int>& data)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (data.getSize() > 0) {
+      putIntegerArray(key, data.getPointer(), data.getSize());
+   } else {
+      TBOX_ERROR("Database::putIntegerArray() error in database "
+         << getName()
+         << "\n    Attempt to put zero-length array with key = "
+         << key << std::endl);
+   }
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Get integer scalar entry from the database with the specified key    *
+ * name. An error message is printed and the program exits if the       *
+ * specified key does not exist in the database or is not associated    *
+ * with a integer type.                                                 *
+ *                                                                      *
+ ************************************************************************
+ */
+
+int Database::getInteger(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   int ret_val;
+   getIntegerArray(key, &ret_val, 1);
+
+   return ret_val;
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Get integer scalar entry from the database with the specified key    *
+ * name. An error message is printed and the program exits if the       *
+ * specified key does not exist in the database or is not associated    *
+ * with a integer type.                                                 *
+ *                                                                      *
+ ************************************************************************
+ */
+
+int Database::getIntegerWithDefault(
+   const std::string& key,
+   const int& defaultvalue)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (keyExists(key)) {
+      Array<int> local_int = getIntegerArray(key);
+      int* locptr = local_int.getPointer();
+      return locptr == NULL ? defaultvalue : *locptr;
+   } else {
+      return defaultvalue;
+   }
+
+}
+
+void Database::getIntegerArray(
+   const std::string& key,
+   int* data,
+   const int nelements)
+{
+   TBOX_ASSERT(!key.empty());
+
+   Array<int> tmp = getIntegerArray(key);
+   const int tsize = tmp.getSize();
+
+   if (nelements != tsize) {
+      TBOX_ERROR("Database::getIntegerArray() error in database "
+         << getName()
+         << "\n    Incorrect array size = " << nelements
+         << " given for key = " << key
+         << "\n    Actual array size = " << tsize << std::endl);
+   }
+
+   for (int i = 0; i < tsize; i++) {
+      data[i] = tmp[i];
+   }
+}
+
+void Database::getScalar(
+   const std::string& key,
+   int& scalar)
+{
+   scalar = getInteger(key);
+}
+
+void Database::putScalar(
+   const std::string& key,
+   const int scalar)
+{
+   putInteger(key, scalar);
+}
+
+void Database::getArray(
+   const std::string& key,
+   Array<int>& array)
+{
+   array = getIntegerArray(key);
+}
+
+void Database::putArray(
+   const std::string& key,
+   const Array<int> array)
+{
+   putIntegerArray(key, array);
+}
+
+/*
+ * String
+ */
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a string scalar entry in the database with the specified       *
+ * key name.  A scalar entry is an array of one.                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Database::putString(
+   const std::string& key,
+   const std::string& data)
+{
+   TBOX_ASSERT(!key.empty());
+
+   putStringArray(key, &data, 1);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a string array entry in the database with the specified        *
+ * key name.                                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Database::putStringArray(
+   const std::string& key,
+   const Array<std::string>& data)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (data.getSize() > 0) {
+      putStringArray(key, data.getPointer(), data.getSize());
+   } else {
+      TBOX_ERROR("Database::putStringArray() error in database "
+         << getName()
+         << "\n    Attempt to put zero-length array with key = "
+         << key << std::endl);
+   }
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Get string scalar entry from the database with the specified key     *
+ * name. An error message is printed and the program exits if the       *
+ * specified key does not exist in the database or is not associated    *
+ * with a string type.                                                  *
+ *                                                                      *
+ ************************************************************************
+ */
+
+std::string Database::getString(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   std::string ret_val;
+   getStringArray(key, &ret_val, 1);
+
+   return ret_val;
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Get string scalar entry from the database with the specified key     *
+ * name. An error message is printed and the program exits if the       *
+ * specified key does not exist in the database or is not associated    *
+ * with a string type.                                                  *
+ *                                                                      *
+ ************************************************************************
+ */
+
+std::string Database::getStringWithDefault(
+   const std::string& key,
+   const std::string& defaultvalue)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (keyExists(key)) {
+      Array<std::string> local_string = getStringArray(key);
+      std::string* locptr = local_string.getPointer();
+      return locptr == NULL ? defaultvalue : *locptr;
+   } else {
+      return defaultvalue;
+   }
+
+}
+
+void Database::getStringArray(
+   const std::string& key,
+   std::string* data,
+   const int nelements)
+{
+   TBOX_ASSERT(!key.empty());
+
+   Array<std::string> tmp = getStringArray(key);
+   const int tsize = tmp.getSize();
+
+   if (nelements != tsize) {
+      TBOX_ERROR("Database::getStringArray() error in database "
+         << getName()
+         << "\n    Incorrect array size = " << nelements
+         << " given for key = " << key
+         << "\n    Actual array size = " << tsize << std::endl);
+   }
+
+   for (int i = 0; i < tsize; i++) {
+      data[i] = tmp[i];
+   }
+
+}
+
+bool Database::isVector(
+   const std::string& key) {
+   return isInteger(key + "_size");
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Database.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Database.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,22 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An abstract base class for the SAMRAI database objects 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+SAMRAI_INLINE_KEYWORD
+Database::Database()
+{
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Database.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Database.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1497 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An abstract base class for the SAMRAI database objects 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_Database
+#define included_tbox_Database
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/DatabaseBox.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <vector>
+#include <string>
+#include <iostream>
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * @brief Class Database is an abstract base class for the input, restart,
+ * and visualization databases.
+ *
+ * SAMRAI databases store (key,value) pairs in a hierarchical
+ * database.  Each value may be another database or a boolean, box,
+ * character, double complex, double, float, integer, or string.
+ * DatabaseBoxes are stored using the toolbox box structure.
+ *
+ * Data is entered into the database through methods of the general form
+ * putTYPE(key, TYPE) or putTYPEArray(key, TYPE array), where TYPE is the
+ * type of value created.  If the specified key already exists in the
+ * database, then the existing key is silently deleted.
+ *
+ * Data is extracted from the database through methods of the general form
+ * TYPE = getTYPE(key), where TYPE is the type of value to be returned
+ * from the database.  There are two general lookup methods.  In the first,
+ * a default value is provided (for scalars only).  If the specified key is
+ * not found in the database, then the specified default is returned.  In
+ * the second form, no default is provided, and the database exists with
+ * an error message and program exits if the key is not found.  The array
+ * version of getTYPE() works in a similar fashion.
+ */
+
+class Database:public DescribedClass
+{
+public:
+   /**
+    * Enumerated type indicating what type of values is stored in
+    * a database entry.  Returned from getType() method.
+    *
+    * Note: The SAMRAI_ prefix is needed since some poorly written
+    *       packages do "#define CHAR" etc.
+    */
+   enum DataType { SAMRAI_INVALID,
+                   SAMRAI_DATABASE,
+                   SAMRAI_BOOL,
+                   SAMRAI_CHAR,
+                   SAMRAI_INT,
+                   SAMRAI_COMPLEX,
+                   SAMRAI_DOUBLE,
+                   SAMRAI_FLOAT,
+                   SAMRAI_STRING,
+                   SAMRAI_BOX };
+
+   /**
+    * Database::Serializable is an abstract base class for those
+    * objects that can serialize/unserialize their data to/from a
+    * database.
+    *
+    * Some methods in Database require objects to implement this
+    * interface.  For example, putVector and getVector require
+    * that the objects in the vector being serialized implement
+    * Database::Serializable.
+    */
+   class Serializable
+   {
+public:
+      /**
+       * Store the object state to the specified database
+       * with the provided name.
+       *
+       * @param datbase
+       * @param name     Base name to use for keys to store the vector.
+       */
+      virtual void
+      putToDatabase(
+         Database& database,
+         const std::string& name) const = 0;
+
+      /**
+       * Restores the object state from the specified database
+       * with the provided name.
+       *
+       * @param datbase
+       * @param name     Base name to used for keys to retrieve the vector.
+       */
+      virtual void
+      getFromDatabase(
+         Database& database,
+         const std::string& name) = 0;
+
+      virtual ~Serializable();
+
+   };
+
+   /**
+    * The constructor for the database base class does nothing interesting.
+    */
+   Database();
+
+   /**
+    * The virtual destructor for the database base class does nothing
+    * interesting.
+    */
+   virtual ~Database();
+
+   /**
+    * Create a new database file.
+    *
+    * Returns true if successful.
+    *
+    * @param name name of database. Normally a filename.
+    */
+   virtual bool
+   create(
+      const std::string& name) = 0;
+
+   /**
+    * Open an existing database file.
+    *
+    * Returns true if successful.
+    *
+    * @param name name of database. Normally a filename.
+    */
+   virtual bool
+   open(
+      const std::string& name) = 0;
+
+   /**
+    * Close the database.
+    *
+    * Returns true if successful.
+    *
+    * If the database is currently open then close it.  This should
+    * flush all data to the file (if the database is on disk).
+    */
+   virtual bool
+   close() = 0;
+
+   /**
+    * Return true if the specified key exists in the database and false
+    * otherwise.
+    *
+    * @param key Key name to lookup.
+    */
+   virtual bool
+   keyExists(
+      const std::string& key) = 0;
+
+   /**
+    * Return all keys in the database.
+    */
+   virtual Array<std::string>
+   getAllKeys() = 0;
+
+   /**
+    * @brief Return the type of data associated with the key.
+    *
+    * If the key does not exist, then INVALID is returned
+    *
+    * @param key Key name in database.
+    */
+   virtual enum DataType
+   getArrayType(
+      const std::string& key) = 0;
+
+   /**
+    * @brief Return the size of the array associated with the key.
+    *
+    * If the key does not exist, then zero is returned.  If the key is
+    * a database then zero is returned.
+    *
+    * @param key Key name in database.
+    */
+   virtual int
+   getArraySize(
+      const std::string& key) = 0;
+
+   /**
+    * Return whether the specified key represents a database entry.  If
+    * the key does not exist, then false is returned.
+    *
+    * @param key Key name in database.
+    */
+   virtual bool
+   isDatabase(
+      const std::string& key) = 0;
+
+   /**
+    * Create a new database with the specified key name.  If the key already
+    * exists in the database, then the old key record is deleted and the new
+    * one is silently created in its place.
+    *
+    * @param key Key name in database.
+    */
+   virtual Pointer<Database>
+   putDatabase(
+      const std::string& key) = 0;
+
+   /**
+    * Get the database with the specified key name.  If the specified
+    * key does not exist in the database or it is not a database, then
+    * an error message is printed and the program exits.
+    *
+    * @param key Key name in database.
+    */
+   virtual Pointer<Database>
+   getDatabase(
+      const std::string& key) = 0;
+
+   /**
+    * Get a database in the database with the specified key name.
+    * If the specified key does not exist in the database, then the default
+    * value is returned.  If the key exists but is not a database,
+    * then an error message is printed and the program exits.
+    *
+    * @param key          Key name in database.
+    * @param defaultvalue Default value to return if not found.
+    */
+   virtual Pointer<Database>
+   getDatabaseWithDefault(
+      const std::string& key,
+      const Pointer<Database>& defaultvalue);
+
+   /**
+    * Return whether the specified key represents a boolean entry.  If
+    * the key does not exist, then false is returned.
+    *
+    * @param key Key name in database.
+    */
+   virtual bool
+   isBool(
+      const std::string& key) = 0;
+
+   /**
+    * Create a boolean scalar entry in the database with the specified
+    * key name.  If thoe key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key Key name in database.
+    * @param data Value to put into database.
+    */
+   virtual void
+   putBool(
+      const std::string& key,
+      const bool& data);
+
+   /**
+    * Create a boolean array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key  Key name in database.
+    * @param data Array with data to put into database.
+    */
+   virtual void
+   putBoolArray(
+      const std::string& key,
+      const Array<bool>& data);
+
+   /**
+    * Create a boolean array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key       Key name in database.
+    * @param data      Array with data to put into database.
+    * @param nelements Number of elements to write from array.
+    */
+   virtual void
+   putBoolArray(
+      const std::string& key,
+      const bool * const data,
+      const int nelements) = 0;
+
+   /**
+    * Get a boolean entry in the database with the specified key name.
+    * If the specified key does not exist in the database or is not a
+    * boolean scalar, then an error message is printed and the program
+    * exits.
+    *
+    * @param key Key name in database.
+    */
+   virtual bool
+   getBool(
+      const std::string& key);
+
+   /**
+    * Get a boolean entry in the database with the specified key name.
+    * If the specified key does not exist in the database, then the default
+    * value is returned.  If the key exists but is not a boolean scalar,
+    * then an error message is printed and the program exits.
+    */
+   virtual bool
+   getBoolWithDefault(
+      const std::string& key,
+      const bool& defaultvalue);
+
+   /**
+    * Get a boolean entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a boolean array, then an error message is printed and
+    * the program exits.
+    *
+    * @param key Key name in database.
+    */
+   virtual Array<bool>
+   getBoolArray(
+      const std::string& key) = 0;
+
+   /**
+    * Get a boolean entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a boolean array, then an error message is printed and
+    * the program exits.  The specified number of elements must match
+    * exactly the number of elements in the array in the database.
+    *
+    * @param key       Key name in database.
+    * @param data      Array with data to put into database.
+    * @param nelements Number of elements to write from array.
+    */
+   virtual void
+   getBoolArray(
+      const std::string& key,
+      bool* data,
+      const int nelements);
+
+   /**
+    * Return whether the specified key represents a box entry.  If
+    * the key does not exist, then false is returned.
+    *
+    * @param key Key name in database.
+    */
+   virtual bool
+   isDatabaseBox(
+      const std::string& key) = 0;
+
+   /**
+    * Create a box scalar entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key  Key name in database.
+    * @param data Data to put into database.
+    */
+   virtual void
+   putDatabaseBox(
+      const std::string& key,
+      const DatabaseBox& data);
+
+   /**
+    * Create a box array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key  Key name in database.
+    * @param data Array with data to put into database.
+    */
+   virtual void
+   putDatabaseBoxArray(
+      const std::string& key,
+      const Array<DatabaseBox>& data);
+
+   /**
+    * Create a box array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key       Key name in database.
+    * @param data      Array with data to put into database.
+    * @param nelements Number of elements to write from array.
+    */
+   virtual void
+   putDatabaseBoxArray(
+      const std::string& key,
+      const DatabaseBox * const data,
+      const int nelements) = 0;
+
+   /**
+    * Get a box entry in the database with the specified key name.
+    * If the specified key does not exist in the database or is not a
+    * box scalar, then an error message is printed and the program
+    * exits.
+    *
+    * @param key Key name in database.
+    */
+   virtual DatabaseBox
+   getDatabaseBox(
+      const std::string& key);
+
+   /**
+    * Get a box entry in the database with the specified key name.
+    * If the specified key does not exist in the database, then the default
+    * value is returned.  If the key exists but is not a box scalar,
+    * then an error message is printed and the program exits.
+    *
+    * @param key          Key name in database.
+    * @param defaultvalue Default value to return if not found.
+    */
+   virtual DatabaseBox
+   getDatabaseBoxWithDefault(
+      const std::string& key,
+      const DatabaseBox& defaultvalue);
+
+   /**
+    * Get a box entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a box array, then an error message is printed and
+    * the program exits.
+    *
+    * @param key Key name in database.
+    */
+   virtual Array<DatabaseBox>
+   getDatabaseBoxArray(
+      const std::string& key) = 0;
+
+   /**
+    * Get a box entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a box array, then an error message is printed and
+    * the program exits.  The specified number of elements must match
+    * exactly the number of elements in the array in the database.
+    *
+    * @param key       Key name in database.
+    * @param data      Array with data to put into database.
+    * @param nelements Number of elements to write from array.
+    */
+   virtual void
+   getDatabaseBoxArray(
+      const std::string& key,
+      DatabaseBox* data,
+      const int nelements);
+
+   /**
+    * Return whether the specified key represents a character entry.  If
+    * the key does not exist, then false is returned.
+    *
+    * @param key Key name in database.
+    */
+   virtual bool
+   isChar(
+      const std::string& key) = 0;
+
+   /**
+    * Create a character scalar entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key Key name in database.
+    * @param data Value to put into database.
+    */
+   virtual void
+   putChar(
+      const std::string& key,
+      const char& data);
+
+   /**
+    * Create a character array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key Key name in database.
+    *
+    * @param key  Key name in database.
+    * @param data Array with data to put into database.
+    */
+   virtual void
+   putCharArray(
+      const std::string& key,
+      const Array<char>& data);
+
+   /**
+    * Create a character array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key       Key name in database.
+    * @param data      Array with data to put into database.
+    * @param nelements Number of elements to write from array.
+    */
+   virtual void
+   putCharArray(
+      const std::string& key,
+      const char * const data,
+      const int nelements) = 0;
+
+   /**
+    * Get a character entry in the database with the specified key name.
+    * If the specified key does not exist in the database or is not an
+    * character scalar, then an error message is printed and the program
+    * exits.
+    *
+    * @param key Key name in database.
+    */
+   virtual char
+   getChar(
+      const std::string& key);
+
+   /**
+    * Get a character entry in the database with the specified key name.
+    * If the specified key does not exist in the database, then the default
+    * value is returned.  If the key exists but is not a character scalar,
+    * then an error message is printed and the program exits.
+    *
+    * @param key          Key name in database.
+    * @param defaultvalue Default value to return if not found.
+    */
+   virtual char
+   getCharWithDefault(
+      const std::string& key,
+      const char& defaultvalue);
+
+   /**
+    * Get a character entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a character array, then an error message is printed and
+    * the program exits.
+    *
+    * @param key Key name in database.
+    */
+   virtual Array<char>
+   getCharArray(
+      const std::string& key) = 0;
+
+   /**
+    * Get a character entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a character array, then an error message is printed and
+    * the program exits.  The specified number of elements must match
+    * exactly the number of elements in the array in the database.
+    *
+    * @param key       Key name in database.
+    * @param data      Array with data to put into database.
+    * @param nelements Number of elements to write from array.
+    */
+   virtual void
+   getCharArray(
+      const std::string& key,
+      char* data,
+      const int nelements);
+
+   /**
+    * Return whether the specified key represents a complex entry.  If
+    * the key does not exist, then false is returned.
+    *
+    * @param key Key name in database.
+    */
+   virtual bool
+   isComplex(
+      const std::string& key) = 0;
+
+   /**
+    * Create a complex scalar entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key Key name in database.
+    * @param data Value to put into database.
+    */
+   virtual void
+   putComplex(
+      const std::string& key,
+      const dcomplex& data);
+
+   /**
+    * Create a complex array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key  Key name in database.
+    * @param data Array with data to put into database.
+    */
+   virtual void
+   putComplexArray(
+      const std::string& key,
+      const Array<dcomplex>& data);
+
+   /**
+    * Create a complex array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key       Key name in database.
+    * @param data      Array with data to put into database.
+    * @param nelements Number of elements to write from array.
+    */
+   virtual void
+   putComplexArray(
+      const std::string& key,
+      const dcomplex * const data,
+      const int nelements) = 0;
+
+   /**
+    * Get a complex entry in the database with the specified key name.
+    * If the specified key does not exist in the database or is not a
+    * complex scalar, then an error message is printed and the program
+    * exits.
+    *
+    * @param key Key name in database.
+    */
+   virtual dcomplex
+   getComplex(
+      const std::string& key);
+
+   /**
+    * Get a complex entry in the database with the specified key name.
+    * If the specified key does not exist in the database, then the default
+    * value is returned.  If the key exists but is not a complex scalar,
+    * then an error message is printed and the program exits.
+    *
+    * @param key          Key name in database.
+    * @param defaultvalue Default value to return if not found.
+    */
+   virtual dcomplex
+   getComplexWithDefault(
+      const std::string& key,
+      const dcomplex& defaultvalue);
+
+   /**
+    * Get a complex entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a complex array, then an error message is printed and
+    * the program exits.
+    *
+    * @param key Key name in database.
+    */
+   virtual Array<dcomplex>
+   getComplexArray(
+      const std::string& key) = 0;
+
+   /**
+    * Get a complex entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a complex array, then an error message is printed and
+    * the program exits.  The specified number of elements must match
+    * exactly the number of elements in the array in the database.
+    *
+    * @param key       Key name in database.
+    * @param data      Array with data to put into database.
+    * @param nelements Number of elements to write from array.
+    */
+   virtual void
+   getComplexArray(
+      const std::string& key,
+      dcomplex* data,
+      const int nelements);
+
+   /**
+    * Return whether the specified key represents a double entry.  If
+    * the key does not exist, then false is returned.
+    *
+    * @param key Key name in database.
+    */
+   virtual bool
+   isDouble(
+      const std::string& key) = 0;
+
+   /**
+    * Create a double scalar entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key Key name in database.
+    * @param data Value to put into database.
+    */
+   virtual void
+   putDouble(
+      const std::string& key,
+      const double& data);
+
+   /**
+    * Create a double array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key  Key name in database.
+    * @param data Array with data to put into database.
+    */
+   virtual void
+   putDoubleArray(
+      const std::string& key,
+      const Array<double>& data);
+
+   /**
+    * Create a double array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key       Key name in database.
+    * @param data      Array with data to put into database.
+    * @param nelements Number of elements to write from array.
+    */
+   virtual void
+   putDoubleArray(
+      const std::string& key,
+      const double * const data,
+      const int nelements) = 0;
+
+   /**
+    * Get a double entry in the database with the specified key name.
+    * If the specified key does not exist in the database or is not a
+    * double scalar, then an error message is printed and the program
+    * exits.
+    *
+    * @param key Key name in database.
+    */
+   virtual double
+   getDouble(
+      const std::string& key);
+
+   /**
+    * Get a double entry in the database with the specified key name.
+    * If the specified key does not exist in the database, then the default
+    * value is returned.  If the key exists but is not a double scalar,
+    * then an error message is printed and the program exits.
+    *
+    * @param key          Key name in database.
+    * @param defaultvalue Default value to return if not found.
+    */
+   virtual double
+   getDoubleWithDefault(
+      const std::string& key,
+      const double& defaultvalue);
+
+   /**
+    * Get a double entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a double array, then an error message is printed and
+    * the program exits.
+    *
+    * @param key Key name in database.
+    */
+   virtual Array<double>
+   getDoubleArray(
+      const std::string& key) = 0;
+
+   /**
+    * Get a double entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a double array, then an error message is printed and
+    * the program exits.  The specified number of elements must match
+    * exactly the number of elements in the array in the database.
+    *
+    * @param key       Key name in database.
+    * @param data      Array with data to put into database.
+    * @param nelements Number of elements to write from array.
+    */
+   virtual void
+   getDoubleArray(
+      const std::string& key,
+      double* data,
+      const int nelements);
+
+   /**
+    * Return whether the specified key represents a float entry.  If
+    * the key does not exist, then false is returned.
+    *
+    * @param key Key name in database.
+    */
+   virtual bool
+   isFloat(
+      const std::string& key) = 0;
+
+   /**
+    * Create a float scalar entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key Key name in database.
+    * @param data Value to put into database.
+    */
+   virtual void
+   putFloat(
+      const std::string& key,
+      const float& data);
+
+   /**
+    * Create a float array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key  Key name in database.
+    * @param data Array with data to put into database.
+    */
+   virtual void
+   putFloatArray(
+      const std::string& key,
+      const Array<float>& data);
+
+   /**
+    * Create a float array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key       Key name in database.
+    * @param data      Array with data to put into database.
+    * @param nelements Number of elements to write from array.
+    */
+   virtual void
+   putFloatArray(
+      const std::string& key,
+      const float * const data,
+      const int nelements) = 0;
+
+   /**
+    * Get a float entry in the database with the specified key name.
+    * If the specified key does not exist in the database or is not a
+    * float scalar, then an error message is printed and the program
+    * exits.
+    *
+    * @param key Key name in database.
+    */
+   virtual float
+   getFloat(
+      const std::string& key);
+
+   /**
+    * Get a float entry in the database with the specified key name.
+    * If the specified key does not exist in the database, then the default
+    * value is returned.  If the key exists but is not a float scalar,
+    * then an error message is printed and the program exits.
+    *
+    * @param key          Key name in database.
+    * @param defaultvalue Default value to return if not found.
+    */
+   virtual float
+   getFloatWithDefault(
+      const std::string& key,
+      const float& defaultvalue);
+
+   /**
+    * Get a float entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a float array, then an error message is printed and
+    * the program exits.
+    *
+    * @param key Key name in database.
+    */
+   virtual Array<float>
+   getFloatArray(
+      const std::string& key) = 0;
+
+   /**
+    * Get a float entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a float array, then an error message is printed and
+    * the program exits.  The specified number of elements must match
+    * exactly the number of elements in the array in the database.
+    *
+    * @param key       Key name in database.
+    * @param data      Array with data to put into database.
+    * @param nelements Number of elements to write from array.
+    */
+   virtual void
+   getFloatArray(
+      const std::string& key,
+      float* data,
+      const int nelements);
+
+   /**
+    * Return whether the specified key represents an integer entry.  If
+    * the key does not exist, then false is returned.
+    *
+    * @param key Key name in database.
+    */
+   virtual bool
+   isInteger(
+      const std::string& key) = 0;
+
+   /**
+    * Create an integer scalar entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key Key name in database.
+    * @param data Value to put into database.
+    */
+   virtual void
+   putInteger(
+      const std::string& key,
+      const int& data);
+
+   /**
+    * Create an integer array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key  Key name in database.
+    * @param data Array with data to put into database.
+    */
+   virtual void
+   putIntegerArray(
+      const std::string& key,
+      const Array<int>& data);
+
+   /**
+    * Create an integer array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key       Key name in database.
+    * @param data      Array with data to put into database.
+    * @param nelements Number of elements to write from array.
+    */
+   virtual void
+   putIntegerArray(
+      const std::string& key,
+      const int * const data,
+      const int nelements) = 0;
+
+   /**
+    * Get an integer entry in the database with the specified key name.
+    * If the specified key does not exist in the database or is not an
+    * integer scalar, then an error message is printed and the program
+    * exits.
+    *
+    * @param key Key name in database.
+    */
+   virtual int
+   getInteger(
+      const std::string& key);
+
+   /**
+    * Get an integer entry in the database with the specified key name.
+    * If the specified key does not exist in the database, then the default
+    * value is returned.  If the key exists but is not an integer scalar,
+    * then an error message is printed and the program exits.
+    *
+    * @param key          Key name in database.
+    * @param defaultvalue Default value to return if not found.
+    */
+   virtual int
+   getIntegerWithDefault(
+      const std::string& key,
+      const int& defaultvalue);
+
+   /**
+    * Get an integer entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not an integer array, then an error message is printed and
+    * the program exits.
+    *
+    * @param key Key name in database.
+    */
+   virtual Array<int>
+   getIntegerArray(
+      const std::string& key) = 0;
+
+   /**
+    * Get an integer entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not an integer array, then an error message is printed and
+    * the program exits.  The specified number of elements must match
+    * exactly the number of elements in the array in the database.
+    *
+    * @param key       Key name in database.
+    * @param data      Array with data to put into database.
+    * @param nelements Number of elements to write from array.
+    */
+   virtual void
+   getIntegerArray(
+      const std::string& key,
+      int* data,
+      const int nelements);
+
+   /**
+    * Return whether the specified key represents a std::string entry.  If
+    * the key does not exist, then false is returned.
+    *
+    * @param key Key name in database.
+    */
+   virtual bool
+   isString(
+      const std::string& key) = 0;
+
+   /**
+    * Create a string scalar entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key Key name in database.
+    * @param data Value to put into database.
+    */
+   virtual void
+   putString(
+      const std::string& key,
+      const std::string& data);
+
+   /**
+    * Create a string array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key  Key name in database.
+    * @param data Array with data to put into database.
+    */
+   virtual void
+   putStringArray(
+      const std::string& key,
+      const Array<std::string>& data);
+
+   /**
+    * Create a string array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key       Key name in database.
+    * @param data      Array with data to put into database.
+    * @param nelements Number of elements to write from array.
+    */
+   virtual void
+   putStringArray(
+      const std::string& key,
+      const std::string * const data,
+      const int nelements) = 0;
+
+   /**
+    * Get a string entry in the database with the specified key name.
+    * If the specified key does not exist in the database or is not an
+    * string scalar, then an error message is printed and the program
+    * exits.
+    *
+    * @param key Key name in database.
+    */
+   virtual std::string
+   getString(
+      const std::string& key);
+
+   /**
+    * Get a string entry in the database with the specified key name.
+    * If the specified key does not exist in the database, then the default
+    * value is returned.  If the key exists but is not a string scalar,
+    * then an error message is printed and the program exits.
+    *
+    * @param key          Key name in database.
+    * @param defaultvalue Default value to return if not found.
+    */
+   virtual std::string
+   getStringWithDefault(
+      const std::string& key,
+      const std::string& defaultvalue);
+
+   /**
+    * Get a string entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a string array, then an error message is printed and
+    * the program exits.
+    *
+    * @param key Key name in database.
+    */
+   virtual Array<std::string>
+   getStringArray(
+      const std::string& key) = 0;
+
+   /**
+    * Get a string entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a string array, then an error message is printed and
+    * the program exits.  The specified number of elements must match
+    * exactly the number of elements in the array in the database.
+    *
+    * @param key       Key name in database.
+    * @param data      Array with data to put into database.
+    * @param nelements Number of elements to write from array.
+    */
+   virtual void
+   getStringArray(
+      const std::string& key,
+      std::string* data,
+      const int nelements);
+
+   /**
+    * Get a bool entry in the database with the specified key name.
+    * If the specified key does not exist in the database or is not an
+    * bool scalar, then an error message is printed and the program
+    * exits.
+    *
+    * @param key    Key name in database.
+    * @param scalar Returns scalar that was read.
+    */
+   void
+   getScalar(
+      const std::string& key,
+      bool& scalar);
+
+   /**
+    * Get a bool entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a bool array, then an error message is printed and
+    * the program exits.
+    *
+    * @param key    Key name in database.
+    * @param scalar Value to put into database.
+    */
+   void
+   putScalar(
+      const std::string& key,
+      const bool scalar);
+
+   /**
+    * Get a bool entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a bool array, then an error message is printed and
+    * the program exits.
+    *
+    * @param key    Key name in database.
+    * @param array  Returns array that was read.
+    */
+   void
+   getArray(
+      const std::string& key,
+      Array<bool>& array);
+
+   /**
+    * Create an bool array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key    Key name in database.
+    * @param array  Array to put into database.
+    */
+   void
+   putArray(
+      const std::string& key,
+      const Array<bool> array);
+
+   /**
+    * Get a char entry in the database with the specified key name.
+    * If the specified key does not exist in the database or is not an
+    * char scalar, then an error message is printed and the program
+    * exits.
+    *
+    * @param key    Key name in database.
+    * @param scalar Returns scalar that was read.
+    */
+   void
+   getScalar(
+      const std::string& key,
+      char& scalar);
+
+   /**
+    * Get a char entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a char array, then an error message is printed and
+    * the program exits.
+    *
+    * @param key    Key name in database.
+    * @param scalar Value to put into database.
+    */
+   void
+   putScalar(
+      const std::string& key,
+      const char scalar);
+
+   /**
+    * Get a char entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a char array, then an error message is printed and
+    * the program exits.
+    *
+    * @param key    Key name in database.
+    * @param array  Returns array that was read.
+    */
+   void
+   getArray(
+      const std::string& key,
+      Array<char>& array);
+
+   /**
+    * Create an char array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key    Key name in database.
+    * @param array  Array to put into database.
+    */
+   void
+   putArray(
+      const std::string& key,
+      const Array<char> array);
+
+   /**
+    * Get a complex entry in the database with the specified key name.
+    * If the specified key does not exist in the database or is not an
+    * complex scalar, then an error message is printed and the program
+    * exits.
+    *
+    * @param key    Key name in database.
+    * @param scalar Returns scalar that was read.
+    */
+   void
+   getScalar(
+      const std::string& key,
+      dcomplex& scalar);
+
+   /**
+    * Get a complex entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a complex array, then an error message is printed and
+    * the program exits.
+    *
+    * @param key    Key name in database.
+    * @param scalar Value to put into database.
+    */
+   void
+   putScalar(
+      const std::string& key,
+      const dcomplex scalar);
+
+   /**
+    * Get a complex entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a complex array, then an error message is printed and
+    * the program exits.
+    *
+    * @param key    Key name in database.
+    * @param array  Returns array that was read.
+    */
+   void
+   getArray(
+      const std::string& key,
+      Array<dcomplex>& array);
+
+   /**
+    * Create an complex array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key    Key name in database.
+    * @param array  Array to put into database.
+    */
+   void
+   putArray(
+      const std::string& key,
+      const Array<dcomplex> array);
+
+   /**
+    * Get a float entry in the database with the specified key name.
+    * If the specified key does not exist in the database or is not an
+    * float scalar, then an error message is printed and the program
+    * exits.
+    *
+    * @param key    Key name in database.
+    * @param scalar Returns scalar that was read.
+    */
+   void
+   getScalar(
+      const std::string& key,
+      float& scalar);
+
+   /**
+    * Get a float entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a float array, then an error message is printed and
+    * the program exits.
+    *
+    * @param key    Key name in database.
+    * @param scalar Value to put into database.
+    */
+   void
+   putScalar(
+      const std::string& key,
+      const float scalar);
+
+   /**
+    * Get a float entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a float array, then an error message is printed and
+    * the program exits.
+    *
+    * @param key    Key name in database.
+    * @param array  Returns array that was read.
+    */
+   void
+   getArray(
+      const std::string& key,
+      Array<float>& array);
+
+   /**
+    * Create an float array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key    Key name in database.
+    * @param array  Array to put into database.
+    */
+   void
+   putArray(
+      const std::string& key,
+      const Array<float> array);
+
+   /**
+    * Get a double entry in the database with the specified key name.
+    * If the specified key does not exist in the database or is not an
+    * double scalar, then an error message is printed and the program
+    * exits.
+    *
+    * @param key    Key name in database.
+    * @param scalar Returns scalar that was read.
+    */
+   void
+   getScalar(
+      const std::string& key,
+      double& scalar);
+
+   /**
+    * Get a double entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a double array, then an error message is printed and
+    * the program exits.
+    *
+    * @param key    Key name in database.
+    * @param scalar Value to put into database.
+    */
+   void
+   putScalar(
+      const std::string& key,
+      const double scalar);
+
+   /**
+    * Get a double entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a double array, then an error message is printed and
+    * the program exits.
+    *
+    * @param key    Key name in database.
+    * @param array  Returns array that was read.
+    */
+   void
+   getArray(
+      const std::string& key,
+      Array<double>& array);
+
+   /**
+    * Create an double array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key    Key name in database.
+    * @param array  Array to put into database.
+    */
+   void
+   putArray(
+      const std::string& key,
+      const Array<double> array);
+
+   /**
+    * Get a integer entry in the database with the specified key name.
+    * If the specified key does not exist in the database or is not an
+    * integer scalar, then an error message is printed and the program
+    * exits.
+    *
+    * @param key    Key name in database.
+    * @param scalar Returns scalar that was read.
+    */
+   void
+   getScalar(
+      const std::string& key,
+      int& scalar);
+
+   /**
+    * Get a integer entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a integer array, then an error message is printed and
+    * the program exits.
+    *
+    * @param key    Key name in database.
+    * @param scalar Value to put into database.
+    */
+   void
+   putScalar(
+      const std::string& key,
+      const int scalar);
+
+   /**
+    * Get a integer entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a integer array, then an error message is printed and
+    * the program exits.
+    *
+    * @param key    Key name in database.
+    * @param array  Returns array that was read.
+    */
+   void
+   getArray(
+      const std::string& key,
+      Array<int>& array);
+
+   /**
+    * Create an integer array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * @param key    Key name in database.
+    * @param array  Array to put into database.
+    */
+   void
+   putArray(
+      const std::string& key,
+      const Array<int> array);
+
+   /**
+    * Return whether the specified key represents a vector entry.  If
+    * the key does not exist, then false is returned.
+    *
+    * @param key Key name in database.
+    */
+   virtual bool
+   isVector(
+      const std::string& key);
+
+   /**
+    * Get a std::vector<TYPE> from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a vector, then an error message is printed and
+    * the program exits.
+    *
+    * TYPE must implement the Database::Serializable interface.
+    *
+    * @param key     Key name in database.
+    * @param vector  Returns the filled in vector.
+    */
+   template<class TYPE>
+   void
+   getVector(
+      const std::string& key,
+      std::vector<TYPE>& vector);
+
+   /**
+    * Create an vector entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    *
+    * TYPE must implement the Database::Serializable interface.
+    *
+    * @param key    Key name in database.
+    * @param vector Vector to put into database.
+    */
+   template<class TYPE>
+   void
+   putVector(
+      const std::string& key,
+      const std::vector<TYPE>& vector);
+
+   /**
+    * @brief Returns the name of this database.
+    *
+    * The name for the root of the database is the name supplied when creating it.
+    * Names for nested databases are the keyname of the database.
+    *
+    */
+   virtual std::string
+   getName() = 0;
+
+   /**
+    * Print the current database to the specified output stream.  If
+    * no output stream is specified, then data is written to stream pout.
+    *
+    * @param os Output stream.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os = pout) = 0;
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/tbox/Database.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/tbox/Database_template_methods.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/DatabaseBox.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/DatabaseBox.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,60 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A box structure representing a portion of the AMR index space 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/DatabaseBox.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/tbox/DatabaseBox.I"
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+DatabaseBox::DatabaseBox(
+   const tbox::Dimension& dim,
+   const int* lower,
+   const int* upper):
+   d_dim(dim)
+{
+   TBOX_ASSERT(dim.getValue() <= DatabaseBox_MAX_DIM);
+
+   d_data.d_dimension = dim.getValue();
+   for (int i = 0; i < d_data.d_dimension; i++) {
+      d_data.d_lo[i] = lower[i];
+      d_data.d_hi[i] = upper[i];
+   }
+   for (int j = d_data.d_dimension; j < DatabaseBox_MAX_DIM; j++) {
+      d_data.d_lo[j] = 0;
+      d_data.d_hi[j] = 0;
+   }
+}
+
+bool DatabaseBox::empty() const
+{
+   bool is_empty = (d_data.d_dimension == 0 ? true : false);
+   for (int i = 0; i < d_data.d_dimension; i++) {
+      if (d_data.d_hi[i] < d_data.d_lo[i]) is_empty = true;
+   }
+   return is_empty;
+}
+
+int DatabaseBox::operator == (
+   const DatabaseBox& box) const
+{
+   bool equals = (d_data.d_dimension == box.d_data.d_dimension);
+   for (int i = 0; i < d_data.d_dimension; i++) {
+      if (d_data.d_lo[i] != box.d_data.d_lo[i]) equals = false;
+      if (d_data.d_hi[i] != box.d_data.d_hi[i]) equals = false;
+   }
+   return equals;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/DatabaseBox.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/DatabaseBox.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,113 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A box structure representing a portion of the AMR index space 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+SAMRAI_INLINE_KEYWORD
+const tbox::Dimension& DatabaseBox::getDim() const
+{
+   return d_dim;
+}
+
+SAMRAI_INLINE_KEYWORD
+DatabaseBox::DatabaseBox():
+   d_dim(tbox::Dimension::getInvalidDimension())
+{
+   d_data.d_dimension = 0;
+   d_data.d_lo[0] = d_data.d_hi[0] = 0;
+   d_data.d_lo[1] = d_data.d_hi[1] = 0;
+   d_data.d_lo[2] = d_data.d_hi[2] = 0;
+}
+
+SAMRAI_INLINE_KEYWORD
+DatabaseBox::DatabaseBox(
+   const DatabaseBox& box):
+   d_dim(box.d_dim)
+{
+   d_data.d_dimension = box.d_data.d_dimension;
+   d_data.d_lo[0] = box.d_data.d_lo[0];
+   d_data.d_lo[1] = box.d_data.d_lo[1];
+   d_data.d_lo[2] = box.d_data.d_lo[2];
+   d_data.d_hi[0] = box.d_data.d_hi[0];
+   d_data.d_hi[1] = box.d_data.d_hi[1];
+   d_data.d_hi[2] = box.d_data.d_hi[2];
+}
+
+SAMRAI_INLINE_KEYWORD
+DatabaseBox& DatabaseBox::operator = (
+   const DatabaseBox& box)
+{
+   d_dim = box.d_dim;
+   d_data.d_dimension = box.d_data.d_dimension;
+   d_data.d_lo[0] = box.d_data.d_lo[0];
+   d_data.d_lo[1] = box.d_data.d_lo[1];
+   d_data.d_lo[2] = box.d_data.d_lo[2];
+   d_data.d_hi[0] = box.d_data.d_hi[0];
+   d_data.d_hi[1] = box.d_data.d_hi[1];
+   d_data.d_hi[2] = box.d_data.d_hi[2];
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD
+DatabaseBox::~DatabaseBox()
+{
+}
+
+SAMRAI_INLINE_KEYWORD
+void DatabaseBox::setDim(
+   const tbox::Dimension& dim)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM(dim);
+   TBOX_ASSERT(dim.getValue() <= DatabaseBox_MAX_DIM);
+   d_dim = tbox::Dimension(dim);
+   d_data.d_dimension = d_dim.getValue();
+}
+
+SAMRAI_INLINE_KEYWORD
+int& DatabaseBox::lower(
+   const int i)
+{
+   TBOX_ASSERT((i >= 0) && (i < d_data.d_dimension));
+   return d_data.d_lo[i];
+}
+
+SAMRAI_INLINE_KEYWORD
+int& DatabaseBox::upper(
+   const int i)
+{
+   TBOX_ASSERT((i >= 0) && (i < d_data.d_dimension));
+
+   return d_data.d_hi[i];
+}
+
+SAMRAI_INLINE_KEYWORD
+int DatabaseBox::lower(
+   const int i) const
+{
+   TBOX_ASSERT((i >= 0) && (i < d_data.d_dimension));
+
+   return d_data.d_lo[i];
+}
+
+SAMRAI_INLINE_KEYWORD
+int DatabaseBox::upper(
+   const int i) const
+{
+
+   TBOX_ASSERT((i >= 0) && (i < d_data.d_dimension));
+
+   return d_data.d_hi[i];
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/DatabaseBox.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/DatabaseBox.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,166 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A box structure representing a portion of the AMR index space 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_DatabaseBox
+#define included_tbox_DatabaseBox
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Dimension.h"
+
+#ifndef DatabaseBox_MAX_DIM
+#define DatabaseBox_MAX_DIM 3
+#else
+Macro overloaded : DatabaseBox_MAX_DIM
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+/*!
+ * @brief POD data for class DatabaseBox
+ *
+ * The data in DatabaseBox need to reside in a POD class so that
+ * HDF5's HOFFSET macro works.  (According to ANSI C++ standard,
+ * it does not have to work with non-POD data.)
+ */
+struct DatabaseBox_POD {
+   int d_dimension;
+   int d_lo[DatabaseBox_MAX_DIM];
+   int d_hi[DatabaseBox_MAX_DIM];
+};
+
+/**
+ * Class DatabaseBox represents a one, two, or three dimensional box in the
+ * AMR index space.  It is defined by lower and upper bounds given by integer
+ * arrays.
+ *
+ * This box is an auxilliary data structure used by the database routines to
+ * manipulate boxes.  This box type removes cyclic dependencies among the
+ * database routines (which need a box) and the box (which needs the database
+ * routines).  The box classes in the hierarchy package convert this box
+ * structure into the standard SAMRAI box class used by the AMR algorithms.
+ *
+ * @internal This class should have @em NO data except for d_data.
+ * See d_data for details.
+ */
+
+class DatabaseBox
+{
+public:
+   /**
+    * The default constructor creates a zero dimension empty box.
+    */
+   DatabaseBox();
+
+   /**
+    * Create a box of the specified dimension describing the index space
+    * between lower and upper.  The dimension argument must be zero, one,
+    * two, or three.
+    */
+   DatabaseBox(
+      const tbox::Dimension& dim,
+      const int* lower,
+      const int* upper);
+
+   /**
+    * The copy constructor copies the index space of the argument box.
+    */
+   DatabaseBox(
+      const DatabaseBox& box);
+
+   /**
+    * The assignment operator copies the index space of the argument box.
+    */
+   DatabaseBox&
+   operator = (
+      const DatabaseBox& box);
+
+   /**
+    * The destructor does nothing interesting.
+    */
+   ~DatabaseBox();
+
+   /**
+    * Return whether the box is empty.  A box is empty if it has dimension
+    * zero or if any of the upper dimensions is less than its corresponding
+    * lower dimension.
+    */
+   bool
+   empty() const;
+
+   /**
+    * Return the dimension of this object.
+    */
+   const tbox::Dimension&
+   getDim() const;
+
+   void
+   setDim(
+      const tbox::Dimension& dim);
+
+   /**
+    * Return the specified component (non-const) of the lower index of the box.
+    */
+   int&
+   lower(
+      const int i);
+
+   /**
+    * Return the specified component (non-const) of the upper index of the box.
+    */
+   int&
+   upper(
+      const int i);
+
+   /**
+    * Return the specified component (const) of the lower index of the box.
+    */
+   int
+   lower(
+      const int i) const;
+
+   /**
+    * Return the specified component (const) of the upper index of the box.
+    */
+   int
+   upper(
+      const int i) const;
+
+   /**
+    * Check whether two boxes represent the same portion of index space.
+    */
+   int
+   operator == (
+      const DatabaseBox& box) const;
+
+   /**
+    * @brief All data members in a POD type.
+    *
+    * Due to the need to compute offsets for data members and that
+    * offsets cannot be computed for non-POD data, we place all
+    * data members in a POD struct and own an object of that
+    * struct.
+    *
+    * Data members are public so that the HDFDatabase need not
+    * mirror this structure in defining a compound type for HDF.
+    */
+   DatabaseBox_POD d_data;
+
+   tbox::Dimension d_dim;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/tbox/DatabaseBox.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/DatabaseFactory.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/DatabaseFactory.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,42 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An abstract base class for a DatabaseFactory 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_DatabaseFactory
+#define included_tbox_DatabaseFactory
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Database.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * @brief Abstract base class factory used to build Database objects.
+ *
+ * Used to build database objects.  For example, RestartManager
+ * may use a DatabaseFactory to build databases when creating
+ * a restart file.
+ */
+class DatabaseFactory:public DescribedClass
+{
+public:
+   /*
+    * Build a new Database instance.
+    */
+   virtual Pointer<Database>
+   allocate(
+      const std::string& name) = 0;
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Database_template_methods.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Database_template_methods.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,65 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An abstract base class for the SAMRAI database objects 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_Database_template_methods
+#define included_tbox_Database_template_methods
+
+#include "SAMRAI/tbox/Database.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+template<class TYPE>
+void Database::putVector(
+   const std::string& key,
+   const std::vector<TYPE>& vector)
+{
+   unsigned int size = static_cast<int>(vector.size());
+   putInteger(key + "_size", size);
+   for (unsigned int i = 0; i < size; ++i) {
+      const std::string index_str = tbox::Utilities::intToString(i);
+      vector[i].putToDatabase(*this, key + "_" + index_str);
+   }
+}
+
+template<class TYPE>
+void Database::getVector(
+   const std::string& key,
+   std::vector<TYPE>& vector)
+{
+   size_t size = getInteger(key + "_size");
+   for (unsigned int i = 0; i < size; ++i) {
+      const std::string index_str = tbox::Utilities::intToString(i);
+      vector[i].getFromDatabase(*this, key + "_" + index_str);
+   }
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/DescribedClass.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/DescribedClass.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,21 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Base class for run-time type identification 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/DescribedClass.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+DescribedClass::~DescribedClass()
+{
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/DescribedClass.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/DescribedClass.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Base class for run-time type identification 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_DescribedClass
+#define included_tbox_DescribedClass
+
+#include "SAMRAI/SAMRAI_config.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * @brief
+ * Required base class for all classes to be used with smart pointers.
+ *
+ * All of the classes pointed to by a SAMRAI smart pointer need to be
+ * derived from this class.  SAMRAI smart pointers require that the
+ * C++ run-time type identification (RTTI) dynamic casting operator (
+ * dynamic_cast() ) work on the objects being pointed to.  The dynamic
+ * cast operator requires the classes are in the same class hierarchy.
+ * Deriving from DesribedClasss guarantees this hence the reason for
+ * this unattractive requirement.
+ *
+ * Notes:
+ *
+ * The SAMRAI developers recognize this requirement is a not ideal and
+ * that the dynamic_cast that is being done implicitly in
+ * the smart pointer assignment is considered to be a poor choice by
+ * many other reference counting pointer implementations.  With
+ * hindsight a different approach would have been used, likely more
+ * consistent with the Boost reference counting pointers.
+ *
+ * @see tbox::Pointer
+ */
+class DescribedClass
+{
+public:
+   /**
+    * The virtual destructor for DescribedClass does nothing interesting.
+    */
+   virtual ~DescribedClass();
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Dimension.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Dimension.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,34 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A smart pointer template class with RTTI 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_Dimension_C
+#define included_tbox_Dimension_C
+
+#include "SAMRAI/tbox/Dimension.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/tbox/Dimension.I"
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+std::ostream& operator << (
+   std::ostream& s,
+   const Dimension& dim)
+{
+   s << dim.getValue() << 'D';
+   return s;
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Dimension.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Dimension.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,140 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A smart pointer template class with RTTI 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+SAMRAI_INLINE_KEYWORD
+Dimension::Dimension()
+   : d_dim(Dimension::getInvalidDimValue()) 
+{
+}
+
+SAMRAI_INLINE_KEYWORD Dimension::Dimension(
+   const unsigned short& dim):d_dim(dim) {
+   TBOX_DIM_ASSERT((!isValid()) ||
+      (d_dim > 0 && d_dim <= Dimension::getMaxDimValue()));
+}
+
+SAMRAI_INLINE_KEYWORD Dimension::Dimension(
+   const Dimension& dimension):d_dim(dimension.d_dim) {
+   TBOX_DIM_ASSERT((!isValid()) ||
+      (d_dim > 0 && d_dim <= Dimension::getMaxDimValue()));
+}
+
+SAMRAI_INLINE_KEYWORD Dimension& Dimension::operator = (
+   const Dimension& rhs) {
+   d_dim = rhs.d_dim;
+   return *this;
+}
+
+SAMRAI_INLINE_KEYWORD bool Dimension::isValid() const {
+   /*
+    * Note we don't check for != getInvalidDimension() because it is
+    * maximum value for a unsigned short so this condition will
+    * be caught by the < getMaxDimension() clause.
+    *
+    * If for some reason getInvalidDimension() implementation is changed
+    * may need to be fixed.
+    */
+   return (d_dim != 0) && (d_dim <= Dimension::getMaxDimValue());
+}
+
+SAMRAI_INLINE_KEYWORD bool Dimension::isInitialized() const {
+   return d_dim != Dimension::getInvalidDimValue();
+}
+
+SAMRAI_INLINE_KEYWORD bool Dimension::operator == (
+   const Dimension& rhs) const {
+   TBOX_DIM_ASSERT_CHECK_DIM(*this);
+   TBOX_DIM_ASSERT_CHECK_DIM(rhs);
+   return d_dim == rhs.d_dim;
+}
+
+SAMRAI_INLINE_KEYWORD bool Dimension::operator != (
+   const Dimension& rhs) const {
+   TBOX_DIM_ASSERT_CHECK_DIM(*this);
+   TBOX_DIM_ASSERT_CHECK_DIM(rhs);
+   return d_dim != rhs.d_dim;
+}
+
+SAMRAI_INLINE_KEYWORD bool Dimension::operator > (
+   const Dimension& rhs) const {
+   TBOX_DIM_ASSERT_CHECK_DIM(*this);
+   TBOX_DIM_ASSERT_CHECK_DIM(rhs);
+   return d_dim > rhs.d_dim;
+}
+
+SAMRAI_INLINE_KEYWORD bool Dimension::operator >= (
+   const Dimension& rhs) const {
+   TBOX_DIM_ASSERT_CHECK_DIM(*this);
+   TBOX_DIM_ASSERT_CHECK_DIM(rhs);
+   return d_dim >= rhs.d_dim;
+}
+
+SAMRAI_INLINE_KEYWORD bool Dimension::operator < (
+   const Dimension& rhs) const {
+   TBOX_DIM_ASSERT_CHECK_DIM(*this);
+   TBOX_DIM_ASSERT_CHECK_DIM(rhs);
+   return d_dim < rhs.d_dim;
+}
+
+SAMRAI_INLINE_KEYWORD bool Dimension::operator <= (
+   const Dimension& rhs) const {
+   TBOX_DIM_ASSERT_CHECK_DIM(*this);
+   TBOX_DIM_ASSERT_CHECK_DIM(rhs);
+   return d_dim <= rhs.d_dim;
+}
+
+#ifdef SGS
+SAMRAI_INLINE_KEYWORD Dimension::operator unsigned short () const {
+   TBOX_DIM_ASSERT_CHECK_DIM(*this);
+   return d_dim;
+}
+#endif
+
+/*
+ * The following methods are so constructed in order to get 
+ * passed the static initialization order issue.  
+ * This guarantees that initialization will occur on first access.
+ */
+SAMRAI_INLINE_KEYWORD 
+unsigned short 
+Dimension::getMaxDimValue() {
+   return SAMRAI_MAXIMUM_DIMENSION;
+}
+
+SAMRAI_INLINE_KEYWORD 
+const Dimension&
+Dimension::getMaxDimension() {
+   static Dimension dim(SAMRAI_MAXIMUM_DIMENSION);
+   return dim;
+}
+
+SAMRAI_INLINE_KEYWORD
+unsigned short 
+Dimension::getInvalidDimValue() {
+   static unsigned short invalid = 
+      std::numeric_limits<unsigned short>::max();
+   return invalid;
+}
+
+SAMRAI_INLINE_KEYWORD
+const Dimension& 
+Dimension::getInvalidDimension()
+{
+   static Dimension invalidDim(Dimension::getInvalidDimValue());
+   return invalidDim;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Dimension.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Dimension.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,262 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Dimension class for abstracting dimension 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_Dimension
+#define included_tbox_Dimension
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <iostream>
+#include <limits>
+
+/*
+ * These forward declarations are obviously bad and creates a
+ * dependency in the packages that violates the general nesting of
+ * SAMRAI packages.  Was needed as IntVector needed the default ctor
+ * in order to make the library work reasonable close to previous
+ * versions and some performance issues would result if we did not
+ * allow this.
+ *
+ * It would be very good to come up with something better than this.
+ */
+namespace SAMRAI {
+namespace hier {
+
+class IntVector;
+}
+
+namespace pdat {
+template<class TYPE>
+class ArrayData;
+}
+
+}
+
+namespace SAMRAI {
+namespace tbox {
+
+class DatabaseBox;
+
+/**
+ * Class Dimension is used to represent the dimension of a SAMRAI
+ * object.
+ *
+ * The maximum dimension is set at compile time using a flag to the
+ * configure script.  This is used to allocate arrays in some lower
+ * level classes such as IntVector.  If dynamic memory allocation is
+ * used the performance impact is significant; a maximum dimension
+ * allows for stack based memory allocation in performance critical
+ * classes at the expense of wasting storage for objects with
+ * dimension less than the maximum dimension.
+ *
+ * A class is used rather than a simple short or integer to provide
+ * enhanced type safety.
+ *
+ */
+
+class Dimension
+{
+public:
+   /**
+    * Constructor for Dimension, object is built using the specified dimension
+    *
+    * Note that the constructor is "explicit" thus making automatic
+    * type conversions from integers impossible.  This is intentionally to avoid
+    * unintended conversions.
+    *
+    * When dimensional assertion checking is active an assert is
+    * thrown when dim < 1 or dim > getMaxDimension() value specified when
+    * the library is configured (defaults to 3).  dim also cannot be
+    * the getInvalidDimension() (the largest unsigned short value).
+    *
+    */
+   explicit Dimension(
+      const unsigned short& dim);
+
+   /**
+    * Construct a dimension equal to the argument.
+    */
+   Dimension(
+      const Dimension& dimension);
+
+   /**
+    * Returns true if Dimension is valid.
+    *
+    * A valid Dimension != 0; != getInvalidDimension(), 
+    * and <= getMaxDimension().
+    *
+    */
+   bool
+   isValid() const;
+
+   /**
+    * Returns true if Dimension is initialized (not set 
+    * to getInvalidDimension()).
+    *
+    */
+   bool
+   isInitialized() const;
+
+   /**
+    * Equality operator.
+    */
+   bool
+   operator == (
+      const Dimension& rhs) const;
+
+   /**
+    * Inequality operator.
+    */
+   bool
+   operator != (
+      const Dimension& rhs) const;
+
+   /**
+    * Greater than operator.
+    */
+   bool
+   operator > (
+      const Dimension& rhs) const;
+
+   /**
+    * Greater than or equal operator.
+    */
+   bool
+   operator >= (
+      const Dimension& rhs) const;
+
+   /**
+    * Less than operator.
+    */
+   bool
+   operator < (
+      const Dimension& rhs) const;
+
+   /**
+    * Less than or equal operator.
+    */
+   bool
+   operator <= (
+      const Dimension& rhs) const;
+
+   /**
+    * Returns the dimension of the Dimension as an unsigned short.
+    *
+    * The method is provided to allow sizing of arrays based on the
+    * dimension and for iteration.  In general this should not be
+    * used for comparisons, the Dimension comparison operations are
+    * better suited for that purpose.
+    */
+   unsigned short getValue() const {
+      return d_dim;
+   }
+
+   /**
+    * Returns the maximum dimension for the currently compiled library
+    * as an unsigned short.
+    *
+    * When the SAMRAI library is compiled a maximum dimension allowed
+    * is specified (the default is 3).  This method is typically used
+    * to allocate arrays.
+    *
+    *  double array[SAMRAI::tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+    *
+    * The value must be >= 1 and < numeric_limits<unsigned short>::max()
+    */
+   static const unsigned short MAXIMUM_DIMENSION_VALUE = 
+      SAMRAI_MAXIMUM_DIMENSION;
+   static unsigned short
+   getMaxDimValue();
+
+   /**
+    * Returns the maximum dimension for the currently compiled library
+    * as a Dimension object.
+    *
+    * When the SAMRAI library is compiled a maximum dimension allowed
+    * is specified (the default is 3).  This method is typically used
+    * to allocate arrays.
+    *
+    */
+   static const Dimension&
+   getMaxDimension();
+
+   /**
+    * An invalid dimension value as a Dimension object.
+    */
+   static const Dimension& 
+   getInvalidDimension();
+
+   /**
+    * An invalid dimension value as an unsigned short.
+    *
+    * Currently this value is numeric_limits<unsigned short>::max() but
+    * use this symbol as it is more readable.
+    *
+    */
+   static unsigned short 
+   getInvalidDimValue();
+
+   /*
+    * Classes that are friends of dimension in order to access th
+    * private ctor which builds invalid dimensions.
+    *
+    * This is obviously not a very good design but so far
+    * a better solution has been elusive.   Allowing
+    * any code to create invalid dimensions seemed too
+    * error prone.
+    */
+   template<class>
+   friend class ::SAMRAI::pdat::ArrayData;
+   friend class ::SAMRAI::hier::IntVector;
+   friend class ::SAMRAI::tbox::DatabaseBox;
+
+   /**
+    * Output operator for debugging and error messages.
+    */
+   friend std::ostream&
+   operator << (
+      std::ostream& s,
+      const Dimension& rhs);
+
+private:
+
+
+   /**
+    * @brief Create an invalid dimension object.
+    *
+    * This ctor is private to prevent a default constructor call.
+    * Currently Dimension objects must always created with a dimension
+    * specified for normal code.  Several special classes are allowed
+    * and are declared to be friends to access this ctor.
+    */
+   Dimension();
+
+   /**
+    * Assignment operator is private to prevent dimensions
+    * from being assigned.  This was done to improve type
+    * safety.
+    */
+   Dimension&
+   operator = (
+      const Dimension& rhs);
+
+   unsigned short d_dim;
+
+   static Dimension s_maximum_dimension;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/tbox/Dimension.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Grammar.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Grammar.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,2949 @@
+#ifdef __GNUC__
+#if __GNUC__ > 4 ||               (__GNUC__ == 4 && (__GNUC_MINOR__ > 2 ||                                  (__GNUC_MINOR__ == 2 &&                                   __GNUC_PATCHLEVEL__ > 0)))
+#pragma GCC diagnostic ignored "-Wall"
+#pragma GCC diagnostic ignored "-Wextra"
+#pragma GCC diagnostic ignored "-Wconversion"
+#endif
+#endif
+
+#ifdef __INTEL_COMPILER
+// Ignore Intel warnings about unreachable statements
+#pragma warning (disable:177)
+// Ignore Intel warnings about external declarations
+#pragma warning (disable:1419)
+// Ignore Intel warnings about type conversions
+#pragma warning (disable:810)
+// Ignore Intel remarks about non-pointer conversions
+#pragma warning (disable:2259)
+// Ignore Intel remarks about zero used for undefined preprocessor syms
+#pragma warning (disable:193)
+// Ignore Intel remarks about unreachable code
+#pragma warning (disable:111)
+#endif
+
+#ifdef __xlC__
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+/* A Bison parser, made by GNU Bison 2.3.  */
+
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+   Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
+
+/* As a special exception, you may create a larger work that contains
+   part or all of the Bison parser skeleton and distribute that work
+   under terms of your choice, so long as that work isn't itself a
+   parser generator using the skeleton or a modified version thereof
+   as a parser skeleton.  Alternatively, if you modify or redistribute
+   the parser skeleton itself, you may (at your option) remove this
+   special exception, which will cause the skeleton and the resulting
+   Bison output files to be licensed under the GNU General Public
+   License without this special exception.
+
+   This special exception was added by the Free Software Foundation in
+   version 2.2 of Bison.  */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+   simplifying the original so-called "semantic" parser.  */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+   infringing on user name space.  This should be done even for local
+   variables, as they might otherwise be expanded by user macros.
+   There are some unavoidable exceptions within include files to
+   define necessary library symbols; they are noted "INFRINGES ON
+   USER NAME SPACE" below.  */
+
+/* Identify Bison output.  */
+#define YYBISON 1
+
+/* Bison version.  */
+#define YYBISON_VERSION "2.3"
+
+/* Skeleton name.  */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers.  */
+#define YYPURE 0
+
+/* Using locations.  */
+#define YYLSP_NEEDED 0
+
+
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     T_AND = 258,
+     T_ASSIGN = 259,
+     T_CHAR = 260,
+     T_CLOSE_CURLY = 261,
+     T_CLOSE_PAREN = 262,
+     T_CLOSE_SQBKT = 263,
+     T_COMMA = 264,
+     T_DIV = 265,
+     T_DOUBLE = 266,
+     T_ELSE = 267,
+     T_EXP = 268,
+     T_EQUALS = 269,
+     T_GREATER_EQUALS = 270,
+     T_GREATER = 271,
+     T_LESS_EQUALS = 272,
+     T_LESS = 273,
+     T_FALSE = 274,
+     T_INTEGER = 275,
+     T_KEYWORD = 276,
+     T_MINUS = 277,
+     T_MULT = 278,
+     T_NOT = 279,
+     T_NOT_EQUALS = 280,
+     T_OR = 281,
+     T_OPEN_CURLY = 282,
+     T_OPEN_PAREN = 283,
+     T_OPEN_SQBKT = 284,
+     T_PLUS = 285,
+     T_QUESTION = 286,
+     T_SEMI = 287,
+     T_STRING = 288,
+     T_TRUE = 289,
+     T_NEGATION = 290
+   };
+#endif
+/* Tokens.  */
+#define T_AND 258
+#define T_ASSIGN 259
+#define T_CHAR 260
+#define T_CLOSE_CURLY 261
+#define T_CLOSE_PAREN 262
+#define T_CLOSE_SQBKT 263
+#define T_COMMA 264
+#define T_DIV 265
+#define T_DOUBLE 266
+#define T_ELSE 267
+#define T_EXP 268
+#define T_EQUALS 269
+#define T_GREATER_EQUALS 270
+#define T_GREATER 271
+#define T_LESS_EQUALS 272
+#define T_LESS 273
+#define T_FALSE 274
+#define T_INTEGER 275
+#define T_KEYWORD 276
+#define T_MINUS 277
+#define T_MULT 278
+#define T_NOT 279
+#define T_NOT_EQUALS 280
+#define T_OR 281
+#define T_OPEN_CURLY 282
+#define T_OPEN_PAREN 283
+#define T_OPEN_SQBKT 284
+#define T_PLUS 285
+#define T_QUESTION 286
+#define T_SEMI 287
+#define T_STRING 288
+#define T_TRUE 289
+#define T_NEGATION 290
+
+
+
+
+/* Copy the first part of user declarations.  */
+
+
+//
+// File:	$URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/tbox/Grammar.C $
+// Package:	SAMRAI toolbox
+// Copyright:	(c) 1997-2010 Lawrence Livermore National Security, LLC
+
+
+// Description:	Yacc grammar description for the input database
+//
+
+#include "SAMRAI/SAMRAI_config.h"
+#include <math.h>
+
+#include STL_SSTREAM_HEADER_FILE
+
+using namespace std;
+
+#if !defined(OSTRINGSTREAM_TYPE_IS_BROKEN) && defined(OSTRSTREAM_TYPE_IS_BROKEN)
+typedef ostringstream ostrstream;
+#endif
+
+#include "SAMRAI/tbox/Dimension.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Parser.h"
+#include <string>
+
+#ifdef __xlC__
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+using namespace std;
+
+using namespace SAMRAI;
+using namespace tbox;
+
+extern int yylex();
+void yyerror(const char *const error)
+{
+   Parser::getParser()->error(error);
+
+}
+
+// Do not change the numbering of keys without checking promotion logic
+
+#define KEY_COMPLEX (0)
+#define KEY_DOUBLE  (1)
+#define KEY_INTEGER (2)
+#define KEY_BOOL    (3)
+#define KEY_BOX     (4)
+#define KEY_CHAR    (5)
+#define KEY_STRING  (6)
+
+static string type_names[] = {
+   "complex", "double", "int", "bool", "box", "char", "string"
+};
+
+#define IS_NUMBER(X) (((X) >= 0) && ((X) < KEY_BOOL))
+#define PROMOTE(X,Y) ((X) < (Y) ? (X) : (Y))
+
+struct KeyData
+{
+   int             d_node_type;	// KEYDATA node type (see defines above)
+   int             d_array_type;// array type (numbers may be promoted)
+   int             d_array_size;// total size of the array if head element
+   KeyData*   d_next;	// pointer to next (key,data) pair
+   bool            d_bool;	// boolean if node is KEY_BOOL
+   DatabaseBox     d_box;	// box if node is KEY_BOX
+   char            d_char;	// character if node is KEY_CHAR
+   dcomplex        d_complex;	// complex if node is KEY_COMPLEX
+   double          d_double;	// double if node is KEY_DOUBLE
+   int             d_integer;	// integer if node is KEY_INTEGER
+   string          d_string;	// string if node is KEY_STRING
+};
+
+static void delete_list(KeyData*);
+static void to_boolean(KeyData*);
+static void to_integer(KeyData*);
+static void to_double(KeyData*);
+static void to_complex(KeyData*);
+static KeyData* binary_op(KeyData*, KeyData*, const int);
+static KeyData* compare_op(KeyData*, KeyData*, const int);
+static KeyData* eval_function(KeyData*, const string&);
+static KeyData* lookup_variable(const string&, const int, const bool);
+
+
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* Enabling the token table.  */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+
+{
+  char          u_char;
+  double        u_double;
+  int           u_integer;
+  KeyData* u_keydata;
+  string*       u_keyword;
+  string*       u_string;
+}
+/* Line 193 of yacc.c.  */
+
+	YYSTYPE;
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+
+
+/* Copy the second part of user declarations.  */
+
+
+/* Line 216 of yacc.c.  */
+
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+typedef signed char yytype_int8;
+#else
+typedef short int yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+#  define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+#  define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYSIZE_T size_t
+# else
+#  define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if YYENABLE_NLS
+#  if ENABLE_NLS
+#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+#   define YY_(msgid) dgettext ("bison-runtime", msgid)
+#  endif
+# endif
+# ifndef YY_
+#  define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E.  */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions.  */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int i)
+#else
+static int
+YYID (i)
+    int i;
+#endif
+{
+  return i;
+}
+#endif
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols.  */
+
+# ifdef YYSTACK_USE_ALLOCA
+#  if YYSTACK_USE_ALLOCA
+#   ifdef __GNUC__
+#    define YYSTACK_ALLOC __builtin_alloca
+#   elif defined __BUILTIN_VA_ARG_INCR
+#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+#   elif defined _AIX
+#    define YYSTACK_ALLOC __alloca
+#   elif defined _MSC_VER
+#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+#    define alloca _alloca
+#   else
+#    define YYSTACK_ALLOC alloca
+#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#     ifndef _STDLIB_H
+#      define _STDLIB_H 1
+#     endif
+#    endif
+#   endif
+#  endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+   /* Pacify GCC's `empty if-body' warning.  */
+#  define YYSTACK_FREE(Ptr) do {  } while (YYID (0))
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+    /* The OS might guarantee only one guard page at the bottom of the stack,
+       and a page size can be as small as 4096 bytes.  So we cannot safely
+       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
+       to allow for a few compiler-allocated temporary stack slots.  */
+#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+#  endif
+# else
+#  define YYSTACK_ALLOC YYMALLOC
+#  define YYSTACK_FREE YYFREE
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+#  endif
+#  if (defined __cplusplus && ! defined _STDLIB_H \
+       && ! ((defined YYMALLOC || defined malloc) \
+	     && (defined YYFREE || defined free)))
+#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#   ifndef _STDLIB_H
+#    define _STDLIB_H 1
+#   endif
+#  endif
+#  ifndef YYMALLOC
+#   define YYMALLOC malloc
+#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+#  ifndef YYFREE
+#   define YYFREE free
+#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+     && (! defined __cplusplus \
+	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member.  */
+union yyalloc
+{
+  yytype_int16 yyss;
+  YYSTYPE yyvs;
+  };
+
+/* The size of the maximum gap between one aligned stack and the next.  */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+   N elements.  */
+# define YYSTACK_BYTES(N) \
+     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+      + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(To, From, Count) \
+      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count)		\
+      do					\
+	{					\
+	  YYSIZE_T yyi;				\
+	  for (yyi = 0; yyi < (Count); yyi++)	\
+	    (To)[yyi] = (From)[yyi];		\
+	}					\
+      while (YYID (0))
+#  endif
+# endif
+
+/* Relocate STACK from its old location to the new one.  The
+   local variables YYSIZE and YYSTACKSIZE give the old and new number of
+   elements in the stack, and YYPTR gives the new location of the
+   stack.  Advance YYPTR to a properly aligned location for the next
+   stack.  */
+# define YYSTACK_RELOCATE(Stack)					\
+    do									\
+      {									\
+	YYSIZE_T yynewbytes;						\
+	YYCOPY (&yyptr->Stack, Stack, yysize);				\
+	Stack = &yyptr->Stack;						\
+	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+	yyptr += yynewbytes / sizeof (*yyptr);				\
+      }									\
+    while (YYID (0))
+
+#endif
+
+/* YYFINAL -- State number of the termination state.  */
+#define YYFINAL  3
+/* YYLAST -- Last index in YYTABLE.  */
+#define YYLAST   249
+
+/* YYNTOKENS -- Number of terminals.  */
+#define YYNTOKENS  36
+/* YYNNTS -- Number of nonterminals.  */
+#define YYNNTS  13
+/* YYNRULES -- Number of rules.  */
+#define YYNRULES  44
+/* YYNRULES -- Number of states.  */
+#define YYNSTATES  83
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
+#define YYUNDEFTOK  2
+#define YYMAXUTOK   290
+
+#define YYTRANSLATE(YYX)						\
+  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
+static const yytype_uint8 yytranslate[] =
+{
+       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
+       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
+      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
+      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
+      35
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+   YYRHS.  */
+static const yytype_uint8 yyprhs[] =
+{
+       0,     0,     3,     5,     6,     9,    10,    16,    17,    22,
+      24,    26,    30,    32,    34,    39,    43,    48,    49,    58,
+      61,    65,    69,    73,    77,    81,    85,    89,    93,    97,
+     101,   105,   109,   113,   116,   118,   120,   122,   124,   126,
+     128,   130,   132,   138,   144
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
+static const yytype_int8 yyrhs[] =
+{
+      37,     0,    -1,    38,    -1,    -1,    38,    39,    -1,    -1,
+      21,    27,    40,    38,     6,    -1,    -1,    21,     4,    41,
+      42,    -1,    32,    -1,    43,    -1,    42,     9,    43,    -1,
+      45,    -1,    21,    -1,    21,    29,    43,     8,    -1,    28,
+      43,     7,    -1,    21,    28,    43,     7,    -1,    -1,    28,
+      43,    31,    44,    43,    12,    43,     7,    -1,    24,    43,
+      -1,    43,    26,    43,    -1,    43,     3,    43,    -1,    43,
+      14,    43,    -1,    43,    25,    43,    -1,    43,    15,    43,
+      -1,    43,    16,    43,    -1,    43,    17,    43,    -1,    43,
+      18,    43,    -1,    43,    30,    43,    -1,    43,    22,    43,
+      -1,    43,    23,    43,    -1,    43,    10,    43,    -1,    43,
+      13,    43,    -1,    22,    43,    -1,    34,    -1,    19,    -1,
+      47,    -1,     5,    -1,    46,    -1,    11,    -1,    20,    -1,
+      33,    -1,    28,    43,     9,    43,     7,    -1,    29,    48,
+       9,    48,     8,    -1,    28,    42,     7,    -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
+static const yytype_uint16 yyrline[] =
+{
+       0,   160,   160,   167,   169,   179,   179,   198,   198,   283,
+     299,   302,   378,   381,   385,   391,   394,   398,   398,   412,
+     417,   424,   431,   434,   438,   442,   445,   449,   452,   463,
+     466,   469,   472,   475,   499,   507,   515,   518,   526,   529,
+     537,   545,   561,   579,   615
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
+static const char *const yytname[] =
+{
+  "$end", "error", "$undefined", "T_AND", "T_ASSIGN", "T_CHAR",
+  "T_CLOSE_CURLY", "T_CLOSE_PAREN", "T_CLOSE_SQBKT", "T_COMMA", "T_DIV",
+  "T_DOUBLE", "T_ELSE", "T_EXP", "T_EQUALS", "T_GREATER_EQUALS",
+  "T_GREATER", "T_LESS_EQUALS", "T_LESS", "T_FALSE", "T_INTEGER",
+  "T_KEYWORD", "T_MINUS", "T_MULT", "T_NOT", "T_NOT_EQUALS", "T_OR",
+  "T_OPEN_CURLY", "T_OPEN_PAREN", "T_OPEN_SQBKT", "T_PLUS", "T_QUESTION",
+  "T_SEMI", "T_STRING", "T_TRUE", "T_NEGATION", "$accept",
+  "P_SPECIFICATION", "P_DEFINITION_LIST", "P_DEFINITION", "@1", "@2",
+  "P_EXPRESSION_LIST", "P_EXPRESSION", "@3", "P_PRIMITIVE_TYPE",
+  "P_COMPLEX", "P_BOX", "P_INTEGER_VECTOR", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+   token YYLEX-NUM.  */
+static const yytype_uint16 yytoknum[] =
+{
+       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
+     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
+     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
+     285,   286,   287,   288,   289,   290
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
+static const yytype_uint8 yyr1[] =
+{
+       0,    36,    37,    38,    38,    40,    39,    41,    39,    39,
+      42,    42,    43,    43,    43,    43,    43,    44,    43,    43,
+      43,    43,    43,    43,    43,    43,    43,    43,    43,    43,
+      43,    43,    43,    43,    45,    45,    45,    45,    45,    45,
+      45,    45,    46,    47,    48
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
+static const yytype_uint8 yyr2[] =
+{
+       0,     2,     1,     0,     2,     0,     5,     0,     4,     1,
+       1,     3,     1,     1,     4,     3,     4,     0,     8,     2,
+       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
+       3,     3,     3,     2,     1,     1,     1,     1,     1,     1,
+       1,     1,     5,     5,     3
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
+   means the default is an error.  */
+static const yytype_uint8 yydefact[] =
+{
+       3,     0,     2,     1,     0,     9,     4,     7,     5,     0,
+       3,    37,    39,    35,    40,    13,     0,     0,     0,     0,
+      41,    34,     8,    10,    12,    38,    36,     0,     0,     0,
+      33,    19,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     6,
+       0,     0,    15,     0,    17,     0,     0,    11,    21,    31,
+      32,    22,    24,    25,    26,    27,    29,    30,    23,    20,
+      28,    16,    14,     0,     0,    44,     0,    42,     0,    43,
+       0,     0,    18
+};
+
+/* YYDEFGOTO[NTERM-NUM].  */
+static const yytype_int8 yydefgoto[] =
+{
+      -1,     1,     2,     6,    10,     9,    22,    23,    74,    24,
+      25,    26,    34
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+   STATE-NUM.  */
+#define YYPACT_NINF -21
+static const yytype_int16 yypact[] =
+{
+     -21,    10,   -17,   -21,     7,   -21,   -21,   -21,   -21,    28,
+     -21,   -21,   -21,   -21,   -21,   -20,    28,    28,    28,   -14,
+     -21,   -21,     8,   183,   -21,   -21,   -21,    69,    28,    28,
+     -21,   219,    56,    28,     9,    28,    28,    28,    28,    28,
+      28,    28,    28,    28,    28,    28,    28,    28,    28,   -21,
+      81,   102,   -21,    28,   -21,    -2,   -14,   183,   219,    22,
+      22,    70,    70,    70,    70,    70,    -7,    22,    70,   201,
+      -7,   -21,   -21,   123,    28,   -21,    30,   -21,   144,   -21,
+      28,   165,   -21
+};
+
+/* YYPGOTO[NTERM-NUM].  */
+static const yytype_int8 yypgoto[] =
+{
+     -21,   -21,    26,   -21,   -21,   -21,    11,   -16,   -21,   -21,
+     -21,   -21,   -15
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
+   positive, shift that token.  If negative, reduce the rule which
+   number is the opposite.  If zero, do what YYDEFACT says.
+   If YYTABLE_NINF, syntax error.  */
+#define YYTABLE_NINF -1
+static const yytype_uint8 yytable[] =
+{
+      30,    31,    32,    37,     4,    75,    38,    35,    28,    29,
+       3,     7,    50,    51,    33,     5,    45,    35,    56,    57,
+      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
+      68,    69,    70,    11,     8,    38,    27,    73,    79,    12,
+       0,    76,     0,     0,    55,     0,     0,    13,    14,    15,
+      16,     0,    17,     0,     0,     0,    18,    19,    78,    36,
+       0,    20,    21,    52,    81,    53,    37,     0,     0,    38,
+      39,    40,    41,    42,    43,    49,     0,     0,    44,    45,
+      37,    46,    47,    38,    36,     0,    48,    54,    71,     0,
+       4,    37,    44,    45,    38,    39,    40,    41,    42,    43,
+      48,     5,     0,    44,    45,    36,    46,    47,     0,     0,
+      72,    48,    37,     0,     0,    38,    39,    40,    41,    42,
+      43,     0,     0,     0,    44,    45,    36,    46,    47,     0,
+      77,     0,    48,    37,     0,     0,    38,    39,    40,    41,
+      42,    43,     0,     0,     0,    44,    45,    36,    46,    47,
+       0,     0,     0,    48,    37,     0,    80,    38,    39,    40,
+      41,    42,    43,     0,     0,     0,    44,    45,    36,    46,
+      47,     0,    82,     0,    48,    37,     0,     0,    38,    39,
+      40,    41,    42,    43,     0,     0,    36,    44,    45,     0,
+      46,    47,     0,    37,     0,    48,    38,    39,    40,    41,
+      42,    43,     0,     0,    36,    44,    45,     0,    46,    47,
+       0,    37,     0,    48,    38,    39,    40,    41,    42,    43,
+       0,     0,     0,    44,    45,     0,    46,     0,     0,    37,
+       0,    48,    38,    39,    40,    41,    42,    43,     0,     0,
+       0,    44,    45,     0,    46,     0,     0,     0,     0,    48
+};
+
+static const yytype_int8 yycheck[] =
+{
+      16,    17,    18,    10,    21,     7,    13,     9,    28,    29,
+       0,     4,    28,    29,    28,    32,    23,     9,     9,    35,
+      36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
+      46,    47,    48,     5,    27,    13,    10,    53,     8,    11,
+      -1,    56,    -1,    -1,    33,    -1,    -1,    19,    20,    21,
+      22,    -1,    24,    -1,    -1,    -1,    28,    29,    74,     3,
+      -1,    33,    34,     7,    80,     9,    10,    -1,    -1,    13,
+      14,    15,    16,    17,    18,     6,    -1,    -1,    22,    23,
+      10,    25,    26,    13,     3,    -1,    30,    31,     7,    -1,
+      21,    10,    22,    23,    13,    14,    15,    16,    17,    18,
+      30,    32,    -1,    22,    23,     3,    25,    26,    -1,    -1,
+       8,    30,    10,    -1,    -1,    13,    14,    15,    16,    17,
+      18,    -1,    -1,    -1,    22,    23,     3,    25,    26,    -1,
+       7,    -1,    30,    10,    -1,    -1,    13,    14,    15,    16,
+      17,    18,    -1,    -1,    -1,    22,    23,     3,    25,    26,
+      -1,    -1,    -1,    30,    10,    -1,    12,    13,    14,    15,
+      16,    17,    18,    -1,    -1,    -1,    22,    23,     3,    25,
+      26,    -1,     7,    -1,    30,    10,    -1,    -1,    13,    14,
+      15,    16,    17,    18,    -1,    -1,     3,    22,    23,    -1,
+      25,    26,    -1,    10,    -1,    30,    13,    14,    15,    16,
+      17,    18,    -1,    -1,     3,    22,    23,    -1,    25,    26,
+      -1,    10,    -1,    30,    13,    14,    15,    16,    17,    18,
+      -1,    -1,    -1,    22,    23,    -1,    25,    -1,    -1,    10,
+      -1,    30,    13,    14,    15,    16,    17,    18,    -1,    -1,
+      -1,    22,    23,    -1,    25,    -1,    -1,    -1,    -1,    30
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+   symbol of state STATE-NUM.  */
+static const yytype_uint8 yystos[] =
+{
+       0,    37,    38,     0,    21,    32,    39,     4,    27,    41,
+      40,     5,    11,    19,    20,    21,    22,    24,    28,    29,
+      33,    34,    42,    43,    45,    46,    47,    38,    28,    29,
+      43,    43,    43,    28,    48,     9,     3,    10,    13,    14,
+      15,    16,    17,    18,    22,    23,    25,    26,    30,     6,
+      43,    43,     7,     9,    31,    42,     9,    43,    43,    43,
+      43,    43,    43,    43,    43,    43,    43,    43,    43,    43,
+      43,     7,     8,    43,    44,     7,    48,     7,    43,     8,
+      12,    43,     7
+};
+
+#define yyerrok		(yyerrstatus = 0)
+#define yyclearin	(SAMRAI_yychar = YYEMPTY)
+#define YYEMPTY		(-2)
+#define YYEOF		0
+
+#define YYACCEPT	goto yyacceptlab
+#define YYABORT		goto yyabortlab
+#define YYERROR		goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror.  This remains here temporarily
+   to ease the transition to the new meaning of YYERROR, for GCC.
+   Once GCC version 2 has supplanted version 1, this can go.  */
+
+#define YYFAIL		goto yyerrlab
+
+#define YYRECOVERING()  (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value)					\
+do								\
+  if (SAMRAI_yychar == YYEMPTY && yylen == 1)				\
+    {								\
+      SAMRAI_yychar = (Token);						\
+      SAMRAI_yylval = (Value);						\
+      yytoken = YYTRANSLATE (SAMRAI_yychar);				\
+      YYPOPSTACK (1);						\
+      goto yybackup;						\
+    }								\
+  else								\
+    {								\
+      yyerror (YY_("syntax error: cannot back up")); \
+      YYERROR;							\
+    }								\
+while (YYID (0))
+
+
+#define YYTERROR	1
+#define YYERRCODE	256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+   If N is 0, then set CURRENT to the empty location which ends
+   the previous symbol: RHS[0] (always defined).  */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N)				\
+    do									\
+      if (YYID (N))                                                    \
+	{								\
+	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
+	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
+	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
+	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
+	}								\
+      else								\
+	{								\
+	  (Current).first_line   = (Current).last_line   =		\
+	    YYRHSLOC (Rhs, 0).last_line;				\
+	  (Current).first_column = (Current).last_column =		\
+	    YYRHSLOC (Rhs, 0).last_column;				\
+	}								\
+    while (YYID (0))
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+   This macro was not mandated originally: define only if we know
+   we won't break user code: when these are the locations we know.  */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+#  define YY_LOCATION_PRINT(File, Loc)			\
+     fprintf (File, "%d.%d-%d.%d",			\
+	      (Loc).first_line, (Loc).first_column,	\
+	      (Loc).last_line,  (Loc).last_column)
+# else
+#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments.  */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (YYLEX_PARAM)
+#else
+# define YYLEX yylex ()
+#endif
+
+/* Enable debugging if requested.  */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args)			\
+do {						\
+  if (yydebug)					\
+    YYFPRINTF Args;				\
+} while (YYID (0))
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
+do {									  \
+  if (yydebug)								  \
+    {									  \
+      YYFPRINTF (stderr, "%s ", Title);					  \
+      yy_symbol_print (stderr,						  \
+		  Type, Value); \
+      YYFPRINTF (stderr, "\n");						  \
+    }									  \
+} while (YYID (0))
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_value_print (yyoutput, yytype, yyvaluep)
+    FILE *yyoutput;
+    int yytype;
+    YYSTYPE const * const yyvaluep;
+#endif
+{
+  if (!yyvaluep)
+    return;
+# ifdef YYPRINT
+  if (yytype < YYNTOKENS)
+    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+  YYUSE (yyoutput);
+# endif
+  switch (yytype)
+    {
+      default:
+	break;
+    }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_print (yyoutput, yytype, yyvaluep)
+    FILE *yyoutput;
+    int yytype;
+    YYSTYPE const * const yyvaluep;
+#endif
+{
+  if (yytype < YYNTOKENS)
+    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+  else
+    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+  YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included).                                                   |
+`------------------------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+#else
+static void
+yy_stack_print (bottom, top)
+    yytype_int16 *bottom;
+    yytype_int16 *top;
+#endif
+{
+  YYFPRINTF (stderr, "Stack now");
+  for (; bottom <= top; ++bottom)
+    YYFPRINTF (stderr, " %d", *bottom);
+  YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top)				\
+do {								\
+  if (yydebug)							\
+    yy_stack_print ((Bottom), (Top));				\
+} while (YYID (0))
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced.  |
+`------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
+#else
+static void
+yy_reduce_print (yyvsp, yyrule)
+    YYSTYPE *yyvsp;
+    int yyrule;
+#endif
+{
+  int yynrhs = yyr2[yyrule];
+  int yyi;
+  unsigned long int yylno = yyrline[yyrule];
+  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+	     yyrule - 1, yylno);
+  /* The symbols being reduced.  */
+  for (yyi = 0; yyi < yynrhs; yyi++)
+    {
+      fprintf (stderr, "   $%d = ", yyi + 1);
+      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+		       &(yyvsp[(yyi + 1) - (yynrhs)])
+		       		       );
+      fprintf (stderr, "\n");
+    }
+}
+
+# define YY_REDUCE_PRINT(Rule)		\
+do {					\
+  if (yydebug)				\
+    yy_reduce_print (yyvsp, Rule); \
+} while (YYID (0))
+
+/* Nonzero means print parse trace.  It is left uninitialized so that
+   multiple parsers can coexist.  */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args) do {} while (0)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top) do {} while (0)
+# define YY_REDUCE_PRINT(Rule) do {} while (0)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks.  */
+#ifndef	YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+   if the built-in stack extension method is used).
+
+   Do not make this value too large; the results are undefined if
+   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+   evaluated with infinite-precision integer arithmetic.  */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+#  if defined __GLIBC__ && defined _STRING_H
+#   define yystrlen strlen
+#  else
+/* Return the length of YYSTR.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static YYSIZE_T
+yystrlen (const char *yystr)
+#else
+static YYSIZE_T
+yystrlen (yystr)
+    const char *yystr;
+#endif
+{
+  YYSIZE_T yylen;
+  for (yylen = 0; yystr[yylen]; yylen++)
+    continue;
+  return yylen;
+}
+#  endif
+# endif
+
+# ifndef yystpcpy
+#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+#   define yystpcpy stpcpy
+#  else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+   YYDEST.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+#else
+static char *
+yystpcpy (yydest, yysrc)
+    char *yydest;
+    const char *yysrc;
+#endif
+{
+  char *yyd = yydest;
+  const char *yys = yysrc;
+
+  while ((*yyd++ = *yys++) != '\0')
+    continue;
+
+  return yyd - 1;
+}
+#  endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+   quotes and backslashes, so that it's suitable for yyerror.  The
+   heuristic is that double-quoting is unnecessary unless the string
+   contains an apostrophe, a comma, or backslash (other than
+   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
+   null, do not copy; instead, return the length of what the result
+   would have been.  */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+  if (*yystr == '"')
+    {
+      YYSIZE_T yyn = 0;
+      char const *yyp = yystr;
+
+      for (;;)
+	switch (*++yyp)
+	  {
+	  case '\'':
+	  case ',':
+	    goto do_not_strip_quotes;
+
+	  case '\\':
+	    if (*++yyp != '\\')
+	      goto do_not_strip_quotes;
+	    /* Fall through.  */
+	  default:
+	    if (yyres)
+	      yyres[yyn] = *yyp;
+	    yyn++;
+	    break;
+
+	  case '"':
+	    if (yyres)
+	      yyres[yyn] = '\0';
+	    return yyn;
+	  }
+    do_not_strip_quotes: ;
+    }
+
+  if (! yyres)
+    return yystrlen (yystr);
+
+  return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into YYRESULT an error message about the unexpected token
+   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
+   including the terminating null byte.  If YYRESULT is null, do not
+   copy anything; just return the number of bytes that would be
+   copied.  As a special case, return 0 if an ordinary "syntax error"
+   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
+   size calculation.  */
+static YYSIZE_T
+yysyntax_error (char *yyresult, int yystate, int SAMRAI_yychar)
+{
+  int yyn = yypact[yystate];
+
+  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
+    return 0;
+  else
+    {
+      int yytype = YYTRANSLATE (SAMRAI_yychar);
+      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+      YYSIZE_T yysize = yysize0;
+      YYSIZE_T yysize1;
+      int yysize_overflow = 0;
+      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+      int yyx;
+
+# if 0
+      /* This is so xgettext sees the translatable formats that are
+	 constructed on the fly.  */
+      YY_("syntax error, unexpected %s");
+      YY_("syntax error, unexpected %s, expecting %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+      char *yyfmt;
+      char const *yyf;
+      static char const yyunexpected[] = "syntax error, unexpected %s";
+      static char const yyexpecting[] = ", expecting %s";
+      static char const yyor[] = " or %s";
+      char yyformat[sizeof yyunexpected
+		    + sizeof yyexpecting - 1
+		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+		       * (sizeof yyor - 1))];
+      char const *yyprefix = yyexpecting;
+
+      /* Start YYX at -YYN if negative to avoid negative indexes in
+	 YYCHECK.  */
+      int yyxbegin = yyn < 0 ? -yyn : 0;
+
+      /* Stay within bounds of both yycheck and yytname.  */
+      int yychecklim = YYLAST - yyn + 1;
+      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+      int yycount = 1;
+
+      yyarg[0] = yytname[yytype];
+      yyfmt = yystpcpy (yyformat, yyunexpected);
+
+      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+	  {
+	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+	      {
+		yycount = 1;
+		yysize = yysize0;
+		yyformat[sizeof yyunexpected - 1] = '\0';
+		break;
+	      }
+	    yyarg[yycount++] = yytname[yyx];
+	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+	    yysize_overflow |= (yysize1 < yysize);
+	    yysize = yysize1;
+	    yyfmt = yystpcpy (yyfmt, yyprefix);
+	    yyprefix = yyor;
+	  }
+
+      yyf = YY_(yyformat);
+      yysize1 = yysize + yystrlen (yyf);
+      yysize_overflow |= (yysize1 < yysize);
+      yysize = yysize1;
+
+      if (yysize_overflow)
+	return YYSIZE_MAXIMUM;
+
+      if (yyresult)
+	{
+	  /* Avoid sprintf, as that infringes on the user's name space.
+	     Don't have undefined behavior even if the translation
+	     produced a string with the wrong number of "%s"s.  */
+	  char *yyp = yyresult;
+	  int yyi = 0;
+	  while ((*yyp = *yyf) != '\0')
+	    {
+	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+		{
+		  yyp += yytnamerr (yyp, yyarg[yyi++]);
+		  yyf += 2;
+		}
+	      else
+		{
+		  yyp++;
+		  yyf++;
+		}
+	    }
+	}
+      return yysize;
+    }
+}
+#endif /* YYERROR_VERBOSE */
+
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol.  |
+`-----------------------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yydestruct (yymsg, yytype, yyvaluep)
+    const char *yymsg;
+    int yytype;
+    YYSTYPE *yyvaluep;
+#endif
+{
+  YYUSE (yyvaluep);
+
+  if (!yymsg)
+    yymsg = "Deleting";
+  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+  switch (yytype)
+    {
+
+      default:
+	break;
+    }
+}
+
+
+/* Prevent warnings from -Wmissing-prototypes.  */
+
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void *YYPARSE_PARAM);
+#else
+int yyparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+
+/* The look-ahead symbol.  */
+int SAMRAI_yychar;
+
+/* The semantic value of the look-ahead symbol.  */
+YYSTYPE SAMRAI_yylval;
+
+/* Number of syntax errors so far.  */
+int SAMRAI_yynerrs;
+
+
+
+/*----------.
+| yyparse.  |
+`----------*/
+
+#ifdef YYPARSE_PARAM
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void *YYPARSE_PARAM)
+#else
+int
+yyparse (YYPARSE_PARAM)
+    void *YYPARSE_PARAM;
+#endif
+#else /* ! YYPARSE_PARAM */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void)
+#else
+int
+yyparse ()
+
+#endif
+#endif
+{
+  
+  int yystate;
+  int yyn;
+  int yyresult;
+  /* Number of tokens to shift before error messages enabled.  */
+  int yyerrstatus;
+  /* Look-ahead token as an internal (translated) token number.  */
+  int yytoken = 0;
+#if YYERROR_VERBOSE
+  /* Buffer for error messages, and its allocated size.  */
+  char yymsgbuf[128];
+  char *yymsg = yymsgbuf;
+  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+  /* Three stacks and their tools:
+     `yyss': related to states,
+     `yyvs': related to semantic values,
+     `yyls': related to locations.
+
+     Refer to the stacks thru separate pointers, to allow yyoverflow
+     to reallocate them elsewhere.  */
+
+  /* The state stack.  */
+  yytype_int16 yyssa[YYINITDEPTH];
+  yytype_int16 *yyss = yyssa;
+  yytype_int16 *yyssp;
+
+  /* The semantic value stack.  */
+  YYSTYPE yyvsa[YYINITDEPTH];
+  YYSTYPE *yyvs = yyvsa;
+  YYSTYPE *yyvsp;
+
+
+
+#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
+
+  YYSIZE_T yystacksize = YYINITDEPTH;
+
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE yyval;
+
+
+  /* The number of symbols on the RHS of the reduced rule.
+     Keep to zero when no symbol should be popped.  */
+  int yylen = 0;
+
+  YYDPRINTF ((stderr, "Starting parse\n"));
+
+  yystate = 0;
+  yyerrstatus = 0;
+  SAMRAI_yynerrs = 0;
+  SAMRAI_yychar = YYEMPTY;		/* Cause a token to be read.  */
+
+  /* Initialize stack pointers.
+     Waste one element of value and location stack
+     so that they stay on the same level as the state stack.
+     The wasted elements are never initialized.  */
+
+  yyssp = yyss;
+  yyvsp = yyvs;
+
+  goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate.  |
+`------------------------------------------------------------*/
+ yynewstate:
+  /* In all cases, when you get here, the value and location stacks
+     have just been pushed.  So pushing a state here evens the stacks.  */
+  yyssp++;
+
+ yysetstate:
+  *yyssp = yystate;
+
+  if (yyss + yystacksize - 1 <= yyssp)
+    {
+      /* Get the current used size of the three stacks, in elements.  */
+      YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+      {
+	/* Give user a chance to reallocate the stack.  Use copies of
+	   these so that the &'s don't force the real ones into
+	   memory.  */
+	YYSTYPE *yyvs1 = yyvs;
+	yytype_int16 *yyss1 = yyss;
+
+
+	/* Each stack pointer address is followed by the size of the
+	   data in use in that stack, in bytes.  This used to be a
+	   conditional around just the two extra args, but that might
+	   be undefined if yyoverflow is a macro.  */
+	yyoverflow (YY_("memory exhausted"),
+		    &yyss1, yysize * sizeof (*yyssp),
+		    &yyvs1, yysize * sizeof (*yyvsp),
+
+		    &yystacksize);
+
+	yyss = yyss1;
+	yyvs = yyvs1;
+      }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+      goto yyexhaustedlab;
+# else
+      /* Extend the stack our own way.  */
+      if (YYMAXDEPTH <= yystacksize)
+	goto yyexhaustedlab;
+      yystacksize *= 2;
+      if (YYMAXDEPTH < yystacksize)
+	yystacksize = YYMAXDEPTH;
+
+      {
+	yytype_int16 *yyss1 = yyss;
+	union yyalloc *yyptr =
+	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+	if (! yyptr)
+	  goto yyexhaustedlab;
+	YYSTACK_RELOCATE (yyss);
+	YYSTACK_RELOCATE (yyvs);
+
+#  undef YYSTACK_RELOCATE
+	if (yyss1 != yyssa)
+	  YYSTACK_FREE (yyss1);
+      }
+# endif
+#endif /* no yyoverflow */
+
+      yyssp = yyss + yysize - 1;
+      yyvsp = yyvs + yysize - 1;
+
+
+      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+		  (unsigned long int) yystacksize));
+
+      if (yyss + yystacksize - 1 <= yyssp)
+	YYABORT;
+    }
+
+  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+  goto yybackup;
+
+/*-----------.
+| yybackup.  |
+`-----------*/
+yybackup:
+
+  /* Do appropriate processing given the current state.  Read a
+     look-ahead token if we need one and don't already have one.  */
+
+  /* First try to decide what to do without reference to look-ahead token.  */
+  yyn = yypact[yystate];
+  if (yyn == YYPACT_NINF)
+    goto yydefault;
+
+  /* Not known => get a look-ahead token if don't already have one.  */
+
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
+  if (SAMRAI_yychar == YYEMPTY)
+    {
+      YYDPRINTF ((stderr, "Reading a token: "));
+      SAMRAI_yychar = YYLEX;
+    }
+
+  if (SAMRAI_yychar <= YYEOF)
+    {
+      SAMRAI_yychar = yytoken = YYEOF;
+      YYDPRINTF ((stderr, "Now at end of input.\n"));
+    }
+  else
+    {
+      yytoken = YYTRANSLATE (SAMRAI_yychar);
+      YY_SYMBOL_PRINT ("Next token is", yytoken, &SAMRAI_yylval, &yylloc);
+    }
+
+  /* If the proper action on seeing token YYTOKEN is to reduce or to
+     detect an error, take that action.  */
+  yyn += yytoken;
+  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+    goto yydefault;
+  yyn = yytable[yyn];
+  if (yyn <= 0)
+    {
+      if (yyn == 0 || yyn == YYTABLE_NINF)
+	goto yyerrlab;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
+  /* Count tokens shifted since error; after three, turn off error
+     status.  */
+  if (yyerrstatus)
+    yyerrstatus--;
+
+  /* Shift the look-ahead token.  */
+  YY_SYMBOL_PRINT ("Shifting", yytoken, &SAMRAI_yylval, &yylloc);
+
+  /* Discard the shifted token unless it is eof.  */
+  if (SAMRAI_yychar != YYEOF)
+    SAMRAI_yychar = YYEMPTY;
+
+  yystate = yyn;
+  *++yyvsp = SAMRAI_yylval;
+
+  goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state.  |
+`-----------------------------------------------------------*/
+yydefault:
+  yyn = yydefact[yystate];
+  if (yyn == 0)
+    goto yyerrlab;
+  goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction.  |
+`-----------------------------*/
+yyreduce:
+  /* yyn is the number of a rule to reduce with.  */
+  yylen = yyr2[yyn];
+
+  /* If YYLEN is nonzero, implement the default value of the action:
+     `$$ = $1'.
+
+     Otherwise, the following line sets YYVAL to garbage.
+     This behavior is undocumented and Bison
+     users should not rely upon it.  Assigning to YYVAL
+     unconditionally makes the parser a bit smaller, and it avoids a
+     GCC warning that YYVAL may be used uninitialized.  */
+  yyval = yyvsp[1-yylen];
+
+
+  YY_REDUCE_PRINT (yyn);
+  switch (yyn)
+    {
+        case 5:
+
+    {
+
+   /* This is a hack to make a warning message go away from
+      a symbol flex defines but does not use */
+   if(0) {
+      goto yyerrlab1;
+   }
+
+      if (Parser::getParser()->getScope()->keyExists(*(yyvsp[(1) - (2)].u_keyword))) {
+	 string tmp("Redefinition of key ``");
+         tmp += *(yyvsp[(1) - (2)].u_keyword);
+         tmp += "''";
+         Parser::getParser()->warning(tmp);
+      }
+      Parser::getParser()->enterScope(*(yyvsp[(1) - (2)].u_keyword));
+   }
+    break;
+
+  case 6:
+
+    {
+      Parser::getParser()->leaveScope();
+      delete (yyvsp[(1) - (5)].u_keyword);
+   }
+    break;
+
+  case 7:
+
+    {
+      if (Parser::getParser()->getScope()->keyExists(*(yyvsp[(1) - (2)].u_keyword))) {
+	 string tmp("Redefinition of key ``");
+         tmp += *(yyvsp[(1) - (2)].u_keyword);
+         tmp += "''";
+         Parser::getParser()->warning(tmp);
+      }
+   }
+    break;
+
+  case 8:
+
+    {
+      KeyData* list = (yyvsp[(4) - (4)].u_keydata);
+      const int n = list->d_array_size;
+
+      switch (list->d_array_type) {
+         case KEY_BOOL: {
+            Array<bool> data(n);
+            for (int i = n-1; i >= 0; i--) {
+               data[i] = list->d_bool;
+               list = list->d_next;
+            }
+            Parser::getParser()->getScope()->putBoolArray(*(yyvsp[(1) - (4)].u_keyword), data);
+            break;
+         }
+         case KEY_BOX: {
+            Array<DatabaseBox> data(n);
+            for (int i = n-1; i >= 0; i--) {
+               data[i] = list->d_box;
+               list = list->d_next;
+            }
+            Parser::getParser()->getScope()->putDatabaseBoxArray(*(yyvsp[(1) - (4)].u_keyword), data);
+            break;
+         }
+         case KEY_CHAR: {
+            Array<char> data(n);
+            for (int i = n-1; i >= 0; i--) {
+               data[i] = list->d_char;
+               list = list->d_next;
+            }
+            Parser::getParser()->getScope()->putCharArray(*(yyvsp[(1) - (4)].u_keyword), data);
+            break;
+         }
+         case KEY_COMPLEX: {
+            Array<dcomplex> data(n);
+            for (int i = n-1; i >= 0; i--) {
+               to_complex(list);
+               data[i] = list->d_complex;
+               list = list->d_next;
+            }
+            Parser::getParser()->getScope()->putComplexArray(*(yyvsp[(1) - (4)].u_keyword), data);
+            break;
+         }
+         case KEY_DOUBLE: {
+            Array<double> data(n);
+            for (int i = n-1; i >= 0; i--) {
+               to_double(list);
+               data[i] = list->d_double;
+               list = list->d_next;
+            }
+            Parser::getParser()->getScope()->putDoubleArray(*(yyvsp[(1) - (4)].u_keyword), data);
+            break;
+         }
+         case KEY_INTEGER: {
+            Array<int> data(n);
+            for (int i = n-1; i >= 0; i--) {
+               data[i] = list->d_integer;
+               list = list->d_next;
+            }
+            Parser::getParser()->getScope()->putIntegerArray(*(yyvsp[(1) - (4)].u_keyword), data);
+            break;
+         }
+         case KEY_STRING: {
+            Array<string> data(n);
+            for (int i = n-1; i >= 0; i--) {
+               data[i] = list->d_string;
+               list = list->d_next;
+            }
+            Parser::getParser()->getScope()->putStringArray(*(yyvsp[(1) - (4)].u_keyword), data);
+            break;
+         }
+         default:
+            Parser::getParser()->error("Internal parser error!");
+            break;
+      }
+
+      delete_list((yyvsp[(4) - (4)].u_keydata));
+      delete (yyvsp[(1) - (4)].u_keyword);
+   }
+    break;
+
+  case 9:
+
+    {
+      Parser::getParser()->warning(
+         "Semicolon found in keyword phrase (ignored)");
+   }
+    break;
+
+  case 10:
+
+    {
+      (yyval.u_keydata) = (yyvsp[(1) - (1)].u_keydata);
+   }
+    break;
+
+  case 11:
+
+    {
+      switch((yyvsp[(1) - (3)].u_keydata)->d_array_type) {
+         case KEY_BOOL:
+         case KEY_CHAR:
+         case KEY_STRING:
+            if ((yyvsp[(3) - (3)].u_keydata)->d_node_type != (yyvsp[(1) - (3)].u_keydata)->d_array_type) {
+               Parser::getParser()->error("Type mismatch in array");
+               delete (yyvsp[(3) - (3)].u_keydata);
+               (yyval.u_keydata) = (yyvsp[(1) - (3)].u_keydata);
+            } else {
+               (yyvsp[(3) - (3)].u_keydata)->d_array_size = (yyvsp[(1) - (3)].u_keydata)->d_array_size + 1;
+               (yyvsp[(3) - (3)].u_keydata)->d_next       = (yyvsp[(1) - (3)].u_keydata);
+               (yyval.u_keydata)               = (yyvsp[(3) - (3)].u_keydata);
+            }
+            break;
+         case KEY_BOX:
+            if ((yyvsp[(3) - (3)].u_keydata)->d_node_type != KEY_BOX) {
+               Parser::getParser()->error("Type mismatch in box array");
+               delete (yyvsp[(3) - (3)].u_keydata);
+               (yyval.u_keydata) = (yyvsp[(1) - (3)].u_keydata);
+            } else if ((yyvsp[(3) - (3)].u_keydata)->d_box.getDim() != (yyvsp[(1) - (3)].u_keydata)->d_box.getDim()) {
+               Parser::getParser()->error("Box array dimension mismatch");
+               delete (yyvsp[(3) - (3)].u_keydata);
+               (yyval.u_keydata) = (yyvsp[(1) - (3)].u_keydata);
+            } else {
+               (yyvsp[(3) - (3)].u_keydata)->d_array_size = (yyvsp[(1) - (3)].u_keydata)->d_array_size + 1;
+               (yyvsp[(3) - (3)].u_keydata)->d_next       = (yyvsp[(1) - (3)].u_keydata);
+               (yyval.u_keydata)               = (yyvsp[(3) - (3)].u_keydata);
+            }
+            break;
+         case KEY_COMPLEX:
+         case KEY_DOUBLE:
+         case KEY_INTEGER:
+            if (!IS_NUMBER((yyvsp[(3) - (3)].u_keydata)->d_node_type)) {
+               Parser::getParser()->error("Type mismatch in number array");
+               delete (yyvsp[(3) - (3)].u_keydata);
+               (yyval.u_keydata) = (yyvsp[(1) - (3)].u_keydata);
+            } else {
+               (yyvsp[(3) - (3)].u_keydata)->d_array_type = PROMOTE((yyvsp[(1) - (3)].u_keydata)->d_array_type, (yyvsp[(3) - (3)].u_keydata)->d_node_type);
+               (yyvsp[(3) - (3)].u_keydata)->d_array_size = (yyvsp[(1) - (3)].u_keydata)->d_array_size + 1;
+               (yyvsp[(3) - (3)].u_keydata)->d_next       = (yyvsp[(1) - (3)].u_keydata);
+               (yyval.u_keydata)               = (yyvsp[(3) - (3)].u_keydata);
+            }
+            break;
+      }
+   }
+    break;
+
+  case 12:
+
+    {
+      (yyval.u_keydata) = (yyvsp[(1) - (1)].u_keydata);
+   }
+    break;
+
+  case 13:
+
+    {
+      (yyval.u_keydata) = lookup_variable(*(yyvsp[(1) - (1)].u_keyword), 0, false);
+      delete (yyvsp[(1) - (1)].u_keyword);
+   }
+    break;
+
+  case 14:
+
+    {
+      to_integer((yyvsp[(3) - (4)].u_keydata));
+      (yyval.u_keydata) = lookup_variable(*(yyvsp[(1) - (4)].u_keyword), (yyvsp[(3) - (4)].u_keydata)->d_integer, true);
+      delete (yyvsp[(1) - (4)].u_keyword);
+      delete (yyvsp[(3) - (4)].u_keydata);
+   }
+    break;
+
+  case 15:
+
+    {
+      (yyval.u_keydata) = (yyvsp[(2) - (3)].u_keydata);
+   }
+    break;
+
+  case 16:
+
+    {
+      (yyval.u_keydata) = eval_function((yyvsp[(3) - (4)].u_keydata), *(yyvsp[(1) - (4)].u_keyword));
+      delete (yyvsp[(1) - (4)].u_keyword);
+   }
+    break;
+
+  case 17:
+
+    {
+      if ((yyvsp[(2) - (3)].u_keydata)->d_node_type != KEY_BOOL) {
+         Parser::getParser()->error("X in (X ? Y : Z) is not a boolean");
+      }
+   }
+    break;
+
+  case 18:
+
+    {
+      if (((yyvsp[(2) - (8)].u_keydata)->d_node_type == KEY_BOOL) && ((yyvsp[(2) - (8)].u_keydata)->d_bool)) {
+         (yyval.u_keydata) = (yyvsp[(5) - (8)].u_keydata);
+         delete (yyvsp[(7) - (8)].u_keydata);
+      } else {
+         (yyval.u_keydata) = (yyvsp[(7) - (8)].u_keydata);
+         delete (yyvsp[(5) - (8)].u_keydata);
+      }
+      delete (yyvsp[(2) - (8)].u_keydata);
+   }
+    break;
+
+  case 19:
+
+    {
+      to_boolean((yyvsp[(2) - (2)].u_keydata));
+      (yyvsp[(2) - (2)].u_keydata)->d_bool = !(yyvsp[(2) - (2)].u_keydata)->d_bool;
+      (yyval.u_keydata) = (yyvsp[(2) - (2)].u_keydata);
+   }
+    break;
+
+  case 20:
+
+    {
+      to_boolean((yyvsp[(1) - (3)].u_keydata));
+      to_boolean((yyvsp[(3) - (3)].u_keydata));
+      (yyvsp[(1) - (3)].u_keydata)->d_bool = (yyvsp[(1) - (3)].u_keydata)->d_bool || (yyvsp[(3) - (3)].u_keydata)->d_bool;
+      delete (yyvsp[(3) - (3)].u_keydata);
+      (yyval.u_keydata) = (yyvsp[(1) - (3)].u_keydata);
+   }
+    break;
+
+  case 21:
+
+    {
+      to_boolean((yyvsp[(1) - (3)].u_keydata));
+      to_boolean((yyvsp[(3) - (3)].u_keydata));
+      (yyvsp[(1) - (3)].u_keydata)->d_bool = (yyvsp[(1) - (3)].u_keydata)->d_bool && (yyvsp[(3) - (3)].u_keydata)->d_bool;
+      delete (yyvsp[(3) - (3)].u_keydata);
+      (yyval.u_keydata) = (yyvsp[(1) - (3)].u_keydata);
+   }
+    break;
+
+  case 22:
+
+    {
+      (yyval.u_keydata) = compare_op((yyvsp[(1) - (3)].u_keydata), (yyvsp[(3) - (3)].u_keydata), T_EQUALS);
+   }
+    break;
+
+  case 23:
+
+    {
+      (yyval.u_keydata) = compare_op((yyvsp[(1) - (3)].u_keydata), (yyvsp[(3) - (3)].u_keydata), T_EQUALS);
+      (yyval.u_keydata)->d_bool = !((yyval.u_keydata)->d_bool);
+   }
+    break;
+
+  case 24:
+
+    {
+      (yyval.u_keydata) = compare_op((yyvsp[(1) - (3)].u_keydata), (yyvsp[(3) - (3)].u_keydata), T_LESS);
+      (yyval.u_keydata)->d_bool = !((yyval.u_keydata)->d_bool);
+   }
+    break;
+
+  case 25:
+
+    {
+      (yyval.u_keydata) = compare_op((yyvsp[(1) - (3)].u_keydata), (yyvsp[(3) - (3)].u_keydata), T_GREATER);
+   }
+    break;
+
+  case 26:
+
+    {
+      (yyval.u_keydata) = compare_op((yyvsp[(1) - (3)].u_keydata), (yyvsp[(3) - (3)].u_keydata), T_GREATER);
+      (yyval.u_keydata)->d_bool = !((yyval.u_keydata)->d_bool);
+   }
+    break;
+
+  case 27:
+
+    {
+      (yyval.u_keydata) = compare_op((yyvsp[(1) - (3)].u_keydata), (yyvsp[(3) - (3)].u_keydata), T_LESS);
+   }
+    break;
+
+  case 28:
+
+    {
+      if (((yyvsp[(1) - (3)].u_keydata)->d_node_type == KEY_STRING) && ((yyvsp[(3) - (3)].u_keydata)->d_node_type == KEY_STRING)) {
+	 string tmp((yyvsp[(1) - (3)].u_keydata)->d_string);
+	 tmp += (yyvsp[(3) - (3)].u_keydata)->d_string;
+         (yyvsp[(1) - (3)].u_keydata)->d_string = tmp;
+         delete (yyvsp[(3) - (3)].u_keydata);
+         (yyval.u_keydata) = (yyvsp[(1) - (3)].u_keydata);
+      } else {
+         (yyval.u_keydata) = binary_op((yyvsp[(1) - (3)].u_keydata), (yyvsp[(3) - (3)].u_keydata), T_PLUS);
+      }
+   }
+    break;
+
+  case 29:
+
+    {
+      (yyval.u_keydata) = binary_op((yyvsp[(1) - (3)].u_keydata), (yyvsp[(3) - (3)].u_keydata), T_MINUS);
+   }
+    break;
+
+  case 30:
+
+    {
+      (yyval.u_keydata) = binary_op((yyvsp[(1) - (3)].u_keydata), (yyvsp[(3) - (3)].u_keydata), T_MULT);
+   }
+    break;
+
+  case 31:
+
+    {
+      (yyval.u_keydata) = binary_op((yyvsp[(1) - (3)].u_keydata), (yyvsp[(3) - (3)].u_keydata), T_DIV);
+   }
+    break;
+
+  case 32:
+
+    {
+      (yyval.u_keydata) = binary_op((yyvsp[(1) - (3)].u_keydata), (yyvsp[(3) - (3)].u_keydata), T_EXP);
+   }
+    break;
+
+  case 33:
+
+    {
+      switch ((yyvsp[(2) - (2)].u_keydata)->d_node_type) {
+         case KEY_INTEGER:
+            (yyvsp[(2) - (2)].u_keydata)->d_integer = -((yyvsp[(2) - (2)].u_keydata)->d_integer);
+            break;
+         case KEY_DOUBLE:
+            (yyvsp[(2) - (2)].u_keydata)->d_double = -((yyvsp[(2) - (2)].u_keydata)->d_double);
+            break;
+         case KEY_COMPLEX:
+            (yyvsp[(2) - (2)].u_keydata)->d_complex = -((yyvsp[(2) - (2)].u_keydata)->d_complex);
+            break;
+         default:
+            Parser::getParser()->error("X in -X is not a number");
+            break;
+      }
+      (yyval.u_keydata) = (yyvsp[(2) - (2)].u_keydata);
+   }
+    break;
+
+  case 34:
+
+    {
+      (yyval.u_keydata) = new KeyData;
+      (yyval.u_keydata)->d_node_type  = KEY_BOOL;
+      (yyval.u_keydata)->d_array_type = KEY_BOOL;
+      (yyval.u_keydata)->d_array_size = 1;
+      (yyval.u_keydata)->d_next       = NULL;
+      (yyval.u_keydata)->d_bool       = true;
+   }
+    break;
+
+  case 35:
+
+    {
+      (yyval.u_keydata) = new KeyData;
+      (yyval.u_keydata)->d_node_type  = KEY_BOOL;
+      (yyval.u_keydata)->d_array_type = KEY_BOOL;
+      (yyval.u_keydata)->d_array_size = 1;
+      (yyval.u_keydata)->d_next       = NULL;
+      (yyval.u_keydata)->d_bool       = false;
+   }
+    break;
+
+  case 36:
+
+    {
+      (yyval.u_keydata) = (yyvsp[(1) - (1)].u_keydata);
+   }
+    break;
+
+  case 37:
+
+    {
+      (yyval.u_keydata) = new KeyData;
+      (yyval.u_keydata)->d_node_type  = KEY_CHAR;
+      (yyval.u_keydata)->d_array_type = KEY_CHAR;
+      (yyval.u_keydata)->d_array_size = 1;
+      (yyval.u_keydata)->d_next       = NULL;
+      (yyval.u_keydata)->d_char       = (yyvsp[(1) - (1)].u_char);
+   }
+    break;
+
+  case 38:
+
+    {
+      (yyval.u_keydata) = (yyvsp[(1) - (1)].u_keydata);
+   }
+    break;
+
+  case 39:
+
+    {
+      (yyval.u_keydata) = new KeyData;
+      (yyval.u_keydata)->d_node_type  = KEY_DOUBLE;
+      (yyval.u_keydata)->d_array_type = KEY_DOUBLE;
+      (yyval.u_keydata)->d_array_size = 1;
+      (yyval.u_keydata)->d_next       = NULL;
+      (yyval.u_keydata)->d_double     = (yyvsp[(1) - (1)].u_double);
+   }
+    break;
+
+  case 40:
+
+    {
+      (yyval.u_keydata) = new KeyData;
+      (yyval.u_keydata)->d_node_type  = KEY_INTEGER;
+      (yyval.u_keydata)->d_array_type = KEY_INTEGER;
+      (yyval.u_keydata)->d_array_size = 1;
+      (yyval.u_keydata)->d_next       = NULL;
+      (yyval.u_keydata)->d_integer    = (yyvsp[(1) - (1)].u_integer);
+   }
+    break;
+
+  case 41:
+
+    {
+      (yyval.u_keydata) = new KeyData;
+      (yyval.u_keydata)->d_node_type  = KEY_STRING;
+      (yyval.u_keydata)->d_array_type = KEY_STRING;
+      (yyval.u_keydata)->d_array_size = 1;
+      (yyval.u_keydata)->d_next       = NULL;
+      (yyval.u_keydata)->d_string     = *(yyvsp[(1) - (1)].u_string);
+      delete (yyvsp[(1) - (1)].u_string);
+   }
+    break;
+
+  case 42:
+
+    {
+      to_double((yyvsp[(2) - (5)].u_keydata));
+      to_double((yyvsp[(4) - (5)].u_keydata));
+      (yyvsp[(2) - (5)].u_keydata)->d_complex    = dcomplex((yyvsp[(2) - (5)].u_keydata)->d_double, (yyvsp[(4) - (5)].u_keydata)->d_double);
+      (yyvsp[(2) - (5)].u_keydata)->d_node_type  = KEY_COMPLEX;
+      (yyvsp[(2) - (5)].u_keydata)->d_array_type = KEY_COMPLEX;
+      delete (yyvsp[(4) - (5)].u_keydata);
+      (yyval.u_keydata) = (yyvsp[(2) - (5)].u_keydata);
+   }
+    break;
+
+  case 43:
+
+    {
+      (yyval.u_keydata) = new KeyData;
+      (yyval.u_keydata)->d_node_type  = KEY_BOX;
+      (yyval.u_keydata)->d_array_type = KEY_BOX;
+      (yyval.u_keydata)->d_array_size = 1;
+      (yyval.u_keydata)->d_next       = NULL;
+
+      if ((yyvsp[(2) - (5)].u_keydata)->d_array_size != (yyvsp[(4) - (5)].u_keydata)->d_array_size) {
+         Parser::getParser()->error("Box lower/upper dimension mismatch");
+      } else if ((yyvsp[(2) - (5)].u_keydata)->d_array_size > 3) {
+         Parser::getParser()->error("Box dimension too large (> 3)");
+      } else {
+         const int n = (yyvsp[(2) - (5)].u_keydata)->d_array_size;
+	 const tbox::Dimension dim(static_cast<unsigned short>(n));
+         (yyval.u_keydata)->d_box.setDim(dim);
+
+         KeyData* list_lower = (yyvsp[(2) - (5)].u_keydata);
+         KeyData* list_upper = (yyvsp[(4) - (5)].u_keydata);
+         for (int i = n-1; i >= 0; i--) {
+            (yyval.u_keydata)->d_box.lower(i) = list_lower->d_integer;
+            (yyval.u_keydata)->d_box.upper(i) = list_upper->d_integer;
+            list_lower = list_lower->d_next;
+            list_upper = list_upper->d_next;
+         }
+
+         delete_list((yyvsp[(2) - (5)].u_keydata));
+         delete_list((yyvsp[(4) - (5)].u_keydata));
+      }
+   }
+    break;
+
+  case 44:
+
+    {
+      KeyData* list = (yyvsp[(2) - (3)].u_keydata);
+      while (list) {
+         to_integer(list);
+         list = list->d_next;
+      }
+      (yyval.u_keydata) = (yyvsp[(2) - (3)].u_keydata);
+   }
+    break;
+
+
+/* Line 1267 of yacc.c.  */
+
+      default: break;
+    }
+  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+
+  *++yyvsp = yyval;
+
+
+  /* Now `shift' the result of the reduction.  Determine what state
+     that goes to, based on the state we popped back to and the rule
+     number reduced by.  */
+
+  yyn = yyr1[yyn];
+
+  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+    yystate = yytable[yystate];
+  else
+    yystate = yydefgoto[yyn - YYNTOKENS];
+
+  goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+  /* If not already recovering from an error, report this error.  */
+  if (!yyerrstatus)
+    {
+      ++SAMRAI_yynerrs;
+#if ! YYERROR_VERBOSE
+      yyerror (YY_("syntax error"));
+#else
+      {
+	YYSIZE_T yysize = yysyntax_error (0, yystate, SAMRAI_yychar);
+	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+	  {
+	    YYSIZE_T yyalloc = 2 * yysize;
+	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
+	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
+	    if (yymsg != yymsgbuf)
+	      YYSTACK_FREE (yymsg);
+	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
+	    if (yymsg)
+	      yymsg_alloc = yyalloc;
+	    else
+	      {
+		yymsg = yymsgbuf;
+		yymsg_alloc = sizeof yymsgbuf;
+	      }
+	  }
+
+	if (0 < yysize && yysize <= yymsg_alloc)
+	  {
+	    (void) yysyntax_error (yymsg, yystate, SAMRAI_yychar);
+	    yyerror (yymsg);
+	  }
+	else
+	  {
+	    yyerror (YY_("syntax error"));
+	    if (yysize != 0)
+	      goto yyexhaustedlab;
+	  }
+      }
+#endif
+    }
+
+
+
+  if (yyerrstatus == 3)
+    {
+      /* If just tried and failed to reuse look-ahead token after an
+	 error, discard it.  */
+
+      if (SAMRAI_yychar <= YYEOF)
+	{
+	  /* Return failure if at end of input.  */
+	  if (SAMRAI_yychar == YYEOF)
+	    YYABORT;
+	}
+      else
+	{
+	  yydestruct ("Error: discarding",
+		      yytoken, &SAMRAI_yylval);
+	  SAMRAI_yychar = YYEMPTY;
+	}
+    }
+
+  /* Else will try to reuse look-ahead token after shifting the error
+     token.  */
+  goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR.  |
+`---------------------------------------------------*/
+yyerrorlab:
+
+  /* Pacify compilers like GCC when the user code never invokes
+     YYERROR and the label yyerrorlab therefore never appears in user
+     code.  */
+  if (/*CONSTCOND*/ 0)
+     goto yyerrorlab;
+
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYERROR.  */
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+  yystate = *yyssp;
+  goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR.  |
+`-------------------------------------------------------------*/
+yyerrlab1:
+  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
+
+  for (;;)
+    {
+      yyn = yypact[yystate];
+      if (yyn != YYPACT_NINF)
+	{
+	  yyn += YYTERROR;
+	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+	    {
+	      yyn = yytable[yyn];
+	      if (0 < yyn)
+		break;
+	    }
+	}
+
+      /* Pop the current state because it cannot handle the error token.  */
+      if (yyssp == yyss)
+	YYABORT;
+
+
+      yydestruct ("Error: popping",
+		  yystos[yystate], yyvsp);
+      YYPOPSTACK (1);
+      yystate = *yyssp;
+      YY_STACK_PRINT (yyss, yyssp);
+    }
+
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
+  *++yyvsp = SAMRAI_yylval;
+
+
+  /* Shift the error token.  */
+  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+  yystate = yyn;
+  goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here.  |
+`-------------------------------------*/
+yyacceptlab:
+  yyresult = 0;
+  goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here.  |
+`-----------------------------------*/
+yyabortlab:
+  yyresult = 1;
+  goto yyreturn;
+
+#ifndef yyoverflow
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here.  |
+`-------------------------------------------------*/
+yyexhaustedlab:
+  yyerror (YY_("memory exhausted"));
+  yyresult = 2;
+  /* Fall through.  */
+#endif
+
+yyreturn:
+  if (SAMRAI_yychar != YYEOF && SAMRAI_yychar != YYEMPTY)
+     yydestruct ("Cleanup: discarding lookahead",
+		 yytoken, &SAMRAI_yylval);
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYABORT or YYACCEPT.  */
+  YYPOPSTACK (yylen);
+  YY_STACK_PRINT (yyss, yyssp);
+  while (yyssp != yyss)
+    {
+      yydestruct ("Cleanup: popping",
+		  yystos[*yyssp], yyvsp);
+      YYPOPSTACK (1);
+    }
+#ifndef yyoverflow
+  if (yyss != yyssa)
+    YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+  if (yymsg != yymsgbuf)
+    YYSTACK_FREE (yymsg);
+#endif
+  /* Make sure YYID is used.  */
+  return YYID (yyresult);
+}
+
+
+
+
+
+/*
+ * Delete all elements in a keyword list.
+ */
+
+static void delete_list(KeyData* list)
+{
+   while (list) {
+      KeyData* byebye = list;
+      list = list->d_next;
+      delete byebye;
+   }
+}
+
+/*
+ * Verify that the number is a boolean; otherwise, report an error and
+ * convert the argument into a boolean false.
+ */
+
+static void to_boolean(KeyData* keydata)
+{
+   if (keydata->d_node_type != KEY_BOOL) {
+      Parser::getParser()->error("Cannot convert type into boolean");
+      keydata->d_bool       = false;
+      keydata->d_node_type  = KEY_BOOL;
+      keydata->d_array_type = KEY_BOOL;
+   }
+}
+
+/*
+ * Convert the number into an integer.  If the conversion cannot be
+ * performed, then print an error and return an integer zero.
+ */
+
+static void to_integer(KeyData* keydata)
+{
+   switch (keydata->d_node_type) {
+      case KEY_INTEGER:
+         break;
+      case KEY_DOUBLE:
+         Parser::getParser()->warning("Double truncated to integer");
+         keydata->d_integer = static_cast<int>(keydata->d_double);
+         break;
+      case KEY_COMPLEX:
+         Parser::getParser()->warning("Complex truncated to integer");
+         keydata->d_integer = static_cast<int>(keydata->d_complex.real());
+         break;
+      default:
+         Parser::getParser()->error("Cannot convert type into integer");
+         keydata->d_integer = 0;
+         break;
+   }
+   keydata->d_node_type  = KEY_INTEGER;
+   keydata->d_array_type = KEY_INTEGER;
+}
+
+/*
+ * Convert the number in the keydata structure to a double.  If the
+ * conversion cannot be performed, then print an error and return zero.
+ */
+
+static void to_double(KeyData* keydata)
+{
+   switch (keydata->d_node_type) {
+      case KEY_INTEGER:
+         keydata->d_double = (double)(keydata->d_integer);
+         break;
+      case KEY_DOUBLE:
+         break;
+      case KEY_COMPLEX:
+         Parser::getParser()->warning("Complex truncated to double");
+         keydata->d_double = keydata->d_complex.real();
+         break;
+      default:
+         Parser::getParser()->error("Cannot convert type into double");
+         keydata->d_double = 0.0;
+         break;
+   }
+   keydata->d_node_type  = KEY_DOUBLE;
+   keydata->d_array_type = KEY_DOUBLE;
+}
+
+/*
+ * Convert the number in the keydata structure to a complex.  If the
+ * conversion cannot be performed, then print an error and return zero.
+ */
+
+static void to_complex(KeyData* keydata)
+{
+   switch (keydata->d_node_type) {
+      case KEY_INTEGER:
+         keydata->d_complex = dcomplex((double) keydata->d_integer, 0.0);
+         break;
+      case KEY_DOUBLE:
+         keydata->d_complex = dcomplex(keydata->d_double, 0.0);
+         break;
+      case KEY_COMPLEX:
+         break;
+      default:
+         Parser::getParser()->error("Cannot convert type into complex");
+         keydata->d_complex = dcomplex(0.0, 0.0);
+         break;
+   }
+   keydata->d_node_type  = KEY_COMPLEX;
+   keydata->d_array_type = KEY_COMPLEX;
+}
+
+/*
+ * Perform one of the standard binary operations +, -, *, /, or ^ on numeric
+ * types.  Concatenation for strings is implemented above.  Return an integer
+ * zero if there is a type mismatch.
+ */
+
+static KeyData* binary_op(KeyData* a, KeyData* b, const int op)
+{
+   if (!IS_NUMBER(a->d_node_type) || !IS_NUMBER(b->d_node_type)) {
+      Parser::getParser()->error(
+         "Cannot perform numerical operations on non-numeric types");
+      a->d_integer    = 0;
+      a->d_node_type  = KEY_INTEGER;
+      a->d_array_type = KEY_INTEGER;
+   } else {
+      const int result_type = PROMOTE(a->d_node_type, b->d_node_type);
+      switch (result_type) {
+         case KEY_INTEGER:
+            switch (op) {
+               case T_DIV:
+                  a->d_integer = a->d_integer / b->d_integer;
+                  break;
+               case T_EXP:
+                  a->d_integer =
+                     static_cast<int>(pow((double) a->d_integer, (double) b->d_integer));
+                  break;
+               case T_MINUS:
+                  a->d_integer = a->d_integer - b->d_integer;
+                  break;
+               case T_MULT:
+                  a->d_integer = a->d_integer * b->d_integer;
+                  break;
+               case T_PLUS:
+                  a->d_integer = a->d_integer + b->d_integer;
+                  break;
+            }
+            break;
+         case KEY_DOUBLE:
+            to_double(a);
+            to_double(b);
+            switch (op) {
+               case T_DIV:
+                  a->d_double = a->d_double / b->d_double;
+                  break;
+               case T_EXP:
+                  a->d_double = pow(a->d_double, b->d_double);
+                  break;
+               case T_MINUS:
+                  a->d_double = a->d_double - b->d_double;
+                  break;
+               case T_MULT:
+                  a->d_double = a->d_double * b->d_double;
+                  break;
+               case T_PLUS:
+                  a->d_double = a->d_double + b->d_double;
+                  break;
+            }
+            break;
+         case KEY_COMPLEX:
+            to_complex(a);
+            to_complex(b);
+            switch (op) {
+               case T_DIV:
+                  a->d_complex = a->d_complex / b->d_complex;
+                  break;
+               case T_EXP:
+                  /*
+		   * SGS this is broken for insure++ and gcc 3.3.2
+		   * a->d_complex = pow(a->d_complex, b->d_complex);
+		   * replaced with the defn from the header file.
+		   */
+		  a->d_complex = exp(a->d_complex * log(b->d_complex));
+                  break;
+               case T_MINUS:
+                  a->d_complex = a->d_complex - b->d_complex;
+                  break;
+               case T_MULT:
+                  a->d_complex = a->d_complex * b->d_complex;
+                  break;
+               case T_PLUS:
+                  a->d_complex = a->d_complex + b->d_complex;
+                  break;
+            }
+            break;
+      }
+   }
+   delete b;
+   return(a);
+}
+
+/*
+ * Perform one of the standard comparison operations ==, <, or >.  The other
+ * operators !=, >=, and <= are computed above by using one of the first three
+ * and then negating the result.  Return a boolean false if there is a type
+ * mismatch problem.
+ */
+
+static KeyData* compare_op(KeyData* a, KeyData* b, const int op)
+{
+   if (!IS_NUMBER(a->d_node_type) || !IS_NUMBER(b->d_node_type)) {
+      if (a->d_node_type != b->d_node_type) {
+         Parser::getParser()->error(
+            "Cannot compare different non-numeric types");
+         a->d_bool = false;
+      } else if (op != T_EQUALS) {
+         Parser::getParser()->error(
+            "Cannot apply <, >, <=, or >= to non-numeric types");
+         a->d_bool = false;
+      } else {
+         switch(a->d_node_type) {
+            case KEY_BOOL:
+               a->d_bool = (a->d_bool == b->d_bool);
+               break;
+            case KEY_BOX:
+               a->d_bool = (a->d_box == b->d_box);
+               break;
+            case KEY_CHAR:
+               a->d_bool = (a->d_char == b->d_char);
+               break;
+            case KEY_STRING:
+               a->d_bool = (a->d_string == b->d_string);
+               break;
+         }
+      }
+   } else {
+      const int promoted = PROMOTE(a->d_node_type, b->d_node_type);
+      switch (promoted) {
+         case KEY_INTEGER:
+            switch (op) {
+               case T_EQUALS:
+                  a->d_bool = (a->d_integer == b->d_integer);
+                  break;
+               case T_LESS:
+                  a->d_bool = (a->d_integer < b->d_integer);
+                  break;
+               case T_GREATER:
+                  a->d_bool = (a->d_integer > b->d_integer);
+                  break;
+            }
+            break;
+         case KEY_DOUBLE:
+// Intel warns about comparison of floating point numbers
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1572)
+#endif
+            to_double(a);
+            to_double(b);
+            switch (op) {
+               case T_EQUALS:
+                  a->d_bool = (a->d_double == b->d_double);
+                  break;
+               case T_LESS:
+                  a->d_bool = (a->d_double < b->d_double);
+                  break;
+               case T_GREATER:
+                  a->d_bool = (a->d_double > b->d_double);
+                  break;
+            }
+            break;
+         case KEY_COMPLEX:
+            to_complex(a);
+            to_complex(b);
+            switch (op) {
+               case T_EQUALS:
+                  a->d_bool = (a->d_complex == b->d_complex);
+                  break;
+               case T_LESS:
+               case T_GREATER:
+                  Parser::getParser()->error(
+                     "Operators <, >, <=, and >= are not defined for complex");
+                  a->d_bool = false;
+                  break;
+            }
+            break;
+      }
+   }
+   a->d_node_type  = KEY_BOOL;
+   a->d_array_type = KEY_BOOL;
+   delete b;
+   return(a);
+}
+
+/*
+ * Perform a function evaluation on the specified argument.
+ */
+
+struct arith_functions {
+   string     d_name;
+   double   (*d_r2r_func)(double);
+   dcomplex (*d_c2c_func)(const dcomplex&);
+   double   (*d_c2r_func)(const dcomplex&);
+};
+
+
+
+#if 0
+// Static initialization was not working with SGI
+// compiler; so use an initialization function to 
+// create the table
+static arith_functions af[] = {
+   { "abs"  , fabs , NULL, abs  },
+   { "acos" , acos , NULL, NULL },
+   { "asin" , asin , NULL, NULL },
+   { "atan" , atan , NULL, NULL },
+   { "ceil" , ceil , NULL, NULL },
+   { "conj" , NULL , conj, NULL },
+   { "cos"  , cos  , cos , NULL },
+   { "cosh" , cosh , cosh, NULL },
+   { "exp"  , exp  , exp , NULL },
+   { "fabs" , fabs , NULL, NULL },
+   { "floor", floor, NULL, NULL },
+   { "imag" , NULL , NULL, imag },
+   { "log10", log10, NULL, NULL },
+   { "log"  , log  , log , NULL },
+   { "real" , NULL , NULL, real },
+   { "sin"  , sin  , sin , NULL },
+   { "sinh" , sinh , sinh, NULL },
+   { "sqrt" , sqrt , sqrt, NULL },
+   { "tan"  , tan  , NULL, NULL },
+   { ""     , NULL , NULL, NULL }
+};
+#endif
+
+static arith_functions af[20];
+
+// These are needed to deal with imag/real returning a reference
+// under GCC 3.4.x
+static double imag_thunk(const dcomplex &a)
+{
+   return imag(a);
+}
+
+static double real_thunk(const dcomplex &a)
+{
+   return real(a);
+}
+
+void parser_static_table_initialize()
+{
+   af[0].d_name =    "abs";
+   af[0].d_r2r_func = fabs;
+   af[0].d_c2c_func = NULL;
+   af[0].d_c2r_func = std::abs;
+
+
+   af[1].d_name =    "acos";
+   af[1].d_r2r_func = acos;
+   af[1].d_c2c_func = NULL;
+   af[1].d_c2r_func = NULL;
+   
+   af[2].d_name =    "asin";
+   af[2].d_r2r_func = asin;
+   af[2].d_c2c_func = NULL;
+   af[2].d_c2r_func = NULL;
+   
+   af[3].d_name =    "atan";
+   af[3].d_r2r_func = atan;
+   af[3].d_c2c_func = NULL;
+   af[3].d_c2r_func = NULL;
+   
+   af[4].d_name =    "ceil";
+   af[4].d_r2r_func = ceil;
+   af[4].d_c2c_func = NULL;
+   af[4].d_c2r_func = NULL;
+
+   af[5].d_name =    "conj";
+   af[5].d_r2r_func = NULL;
+   af[5].d_c2c_func = conj;
+   af[5].d_c2r_func = NULL;
+
+
+   af[6].d_name =    "cos";
+   af[6].d_r2r_func = ::cos;
+   af[6].d_c2c_func = std::cos;
+   af[6].d_c2r_func = NULL;
+
+   af[7].d_name =    "cosh";
+   af[7].d_r2r_func = ::cosh;
+   af[7].d_c2c_func = std::cosh;
+   af[7].d_c2r_func = NULL;
+
+   af[8].d_name =    "exp";
+   af[8].d_r2r_func = ::exp;
+   af[8].d_c2c_func = std::exp;
+   af[8].d_c2r_func = NULL;
+
+   af[9].d_name =    "fabs";
+   af[9].d_r2r_func = fabs;
+   af[9].d_c2c_func = NULL;
+   af[9].d_c2r_func = NULL;
+
+   af[10].d_name =    "floor";
+   af[10].d_r2r_func = floor;
+   af[10].d_c2c_func = NULL;
+   af[10].d_c2r_func = NULL;
+
+   af[11].d_name =    "imag";
+   af[11].d_r2r_func = NULL;
+   af[11].d_c2c_func = NULL;
+   af[11].d_c2r_func = imag_thunk;
+
+   af[12].d_name =    "log10";
+   af[12].d_r2r_func = ::log10;
+   af[12].d_c2c_func = NULL;
+   af[12].d_c2r_func = NULL;
+
+   af[13].d_name =    "log";
+   af[13].d_r2r_func = ::log;
+   af[13].d_c2c_func = std::log;
+   af[13].d_c2r_func = NULL;
+
+   af[14].d_name =    "real";
+   af[14].d_r2r_func = NULL;
+   af[14].d_c2c_func = NULL;
+   af[14].d_c2r_func = real_thunk;
+
+   af[15].d_name =    "sin";
+   af[15].d_r2r_func = ::sin;
+   af[15].d_c2c_func = std::sin;
+   af[15].d_c2r_func = NULL;
+
+   af[16].d_name =    "sinh";
+   af[16].d_r2r_func = ::sinh;
+   af[16].d_c2c_func = std::sinh;
+   af[16].d_c2r_func = NULL;
+
+   af[17].d_name =    "sqrt";
+   af[17].d_r2r_func = ::sqrt;
+   af[17].d_c2c_func = std::sqrt;
+   af[17].d_c2r_func = NULL;
+
+   af[18].d_name =    "tan";
+   af[18].d_r2r_func = tan;
+   af[18].d_c2c_func = NULL;
+   af[18].d_c2r_func = NULL;
+
+   af[19].d_name =    "";
+   af[19].d_r2r_func = NULL;
+   af[19].d_c2c_func = NULL;
+   af[19].d_c2r_func = NULL;
+}
+
+static KeyData* eval_function(KeyData* arg, const string& func)
+{
+   if (!IS_NUMBER(arg->d_node_type)) {
+      string tmp("Unknown function ");
+      tmp += func;
+      tmp += "(";
+      tmp += type_names[arg->d_node_type];
+      tmp += ")";
+      Parser::getParser()->error(tmp);
+   } else if (func == "int") {
+      to_double(arg);
+      arg->d_integer    = static_cast<int>(arg->d_double);
+      arg->d_node_type  = KEY_INTEGER;
+      arg->d_array_type = KEY_INTEGER;
+   } else {
+      for (int f = 0; af[f].d_name.length() > 0; f++) {
+         if (af[f].d_name == func) {
+            if (arg->d_node_type == KEY_COMPLEX) {
+               if (af[f].d_c2c_func) {
+                  arg->d_complex = (*af[f].d_c2c_func)(arg->d_complex);
+               } else if (af[f].d_c2r_func) {
+                  arg->d_double     = (*af[f].d_c2r_func)(arg->d_complex);
+                  arg->d_node_type  = KEY_DOUBLE;
+                  arg->d_array_type = KEY_DOUBLE;
+               } else {
+                  to_double(arg);
+                  arg->d_double = (*af[f].d_r2r_func)(arg->d_double);
+               }
+            } else {
+               if (af[f].d_r2r_func) {
+                  to_double(arg);
+                  arg->d_double = (*af[f].d_r2r_func)(arg->d_double);
+               } else if (af[f].d_c2r_func) {
+                  to_complex(arg);
+                  arg->d_double     = (*af[f].d_c2r_func)(arg->d_complex);
+                  arg->d_node_type  = KEY_DOUBLE;
+                  arg->d_array_type = KEY_DOUBLE;
+               } else {
+                  to_complex(arg);
+                  arg->d_complex = (*af[f].d_c2c_func)(arg->d_complex);
+               }
+            }
+            return(arg);
+         }
+      }
+
+      string tmp("Unknown function ");
+      tmp += func;
+      tmp += "(";
+      tmp += type_names[arg->d_node_type];
+      tmp += ")";
+      Parser::getParser()->error(tmp);
+   }
+   return(arg);
+}
+
+/*
+ * Fetch a variable in the database.  If there is an error, then print
+ * an error message and return an integer zero as result.
+ */
+
+static KeyData* lookup_variable(
+   const string& key, const int index, const bool is_array)
+{
+   KeyData* result = new KeyData;
+   result->d_node_type  = KEY_INTEGER;
+   result->d_array_type = KEY_INTEGER;
+   result->d_array_size = 1;
+   result->d_next       = NULL;
+   result->d_integer    = 0;
+
+   Parser *parser = Parser::getParser();
+   Pointer<Database> db = parser->getDatabaseWithKey(key);
+
+   if (db.isNull()) {
+      string tmp("Variable ``");
+      tmp += key;
+      tmp += "'' not found in database";
+      parser->error(tmp);
+   } else if (!is_array && (db->getArraySize(key) > 1)) {
+      string tmp("Variable ``");
+      tmp += key;
+      tmp += "'' is not a scalar value";
+      parser->error(tmp);
+   } else if ((index < 0) || (index >= db->getArraySize(key))) {
+      ostrstream oss;
+      oss << index;
+      string tmp("Variable ``");
+      tmp += key;
+      tmp += "[";
+      tmp += oss.str();
+      tmp += "]'' out of range";
+      parser->error(tmp);
+   } else if (db->isInteger(key)) {
+      result->d_integer    = db->getIntegerArray(key)[index];
+      result->d_node_type  = KEY_INTEGER;
+      result->d_array_type = KEY_INTEGER;
+
+   } else if (db->isDouble(key)) {
+      result->d_double     = db->getDoubleArray(key)[index];
+      result->d_node_type  = KEY_DOUBLE;
+      result->d_array_type = KEY_DOUBLE;
+
+   } else if (db->isComplex(key)) {
+      result->d_complex    = db->getComplexArray(key)[index];
+      result->d_node_type  = KEY_COMPLEX;
+      result->d_array_type = KEY_COMPLEX;
+
+   } else if (db->isBool(key)) {
+      result->d_bool       = db->getBoolArray(key)[index];
+      result->d_node_type  = KEY_BOOL;
+      result->d_array_type = KEY_BOOL;
+
+   } else if (db->isDatabaseBox(key)) {
+      result->d_box        = db->getDatabaseBoxArray(key)[index];
+      result->d_node_type  = KEY_BOX;
+      result->d_array_type = KEY_BOX;
+
+   } else if (db->isChar(key)) {
+      result->d_char       = db->getCharArray(key)[index];
+      result->d_node_type  = KEY_CHAR;
+      result->d_array_type = KEY_CHAR;
+
+   } else if (db->isString(key)) {
+      result->d_string     = db->getStringArray(key)[index];
+      result->d_node_type  = KEY_STRING;
+      result->d_array_type = KEY_STRING;
+
+   } else {
+      parser->error("Unknown type for variable="+key);
+   }
+
+   return(result);
+}
+
+#ifdef __xlC__
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Grammar.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Grammar.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,135 @@
+/* A Bison parser, made by GNU Bison 2.3.  */
+
+/* Skeleton interface for Bison's Yacc-like parsers in C
+
+   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+   Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
+
+/* As a special exception, you may create a larger work that contains
+   part or all of the Bison parser skeleton and distribute that work
+   under terms of your choice, so long as that work isn't itself a
+   parser generator using the skeleton or a modified version thereof
+   as a parser skeleton.  Alternatively, if you modify or redistribute
+   the parser skeleton itself, you may (at your option) remove this
+   special exception, which will cause the skeleton and the resulting
+   Bison output files to be licensed under the GNU General Public
+   License without this special exception.
+
+   This special exception was added by the Free Software Foundation in
+   version 2.2 of Bison.  */
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     T_AND = 258,
+     T_ASSIGN = 259,
+     T_CHAR = 260,
+     T_CLOSE_CURLY = 261,
+     T_CLOSE_PAREN = 262,
+     T_CLOSE_SQBKT = 263,
+     T_COMMA = 264,
+     T_DIV = 265,
+     T_DOUBLE = 266,
+     T_ELSE = 267,
+     T_EXP = 268,
+     T_EQUALS = 269,
+     T_GREATER_EQUALS = 270,
+     T_GREATER = 271,
+     T_LESS_EQUALS = 272,
+     T_LESS = 273,
+     T_FALSE = 274,
+     T_INTEGER = 275,
+     T_KEYWORD = 276,
+     T_MINUS = 277,
+     T_MULT = 278,
+     T_NOT = 279,
+     T_NOT_EQUALS = 280,
+     T_OR = 281,
+     T_OPEN_CURLY = 282,
+     T_OPEN_PAREN = 283,
+     T_OPEN_SQBKT = 284,
+     T_PLUS = 285,
+     T_QUESTION = 286,
+     T_SEMI = 287,
+     T_STRING = 288,
+     T_TRUE = 289,
+     T_NEGATION = 290
+   };
+#endif
+/* Tokens.  */
+#define T_AND 258
+#define T_ASSIGN 259
+#define T_CHAR 260
+#define T_CLOSE_CURLY 261
+#define T_CLOSE_PAREN 262
+#define T_CLOSE_SQBKT 263
+#define T_COMMA 264
+#define T_DIV 265
+#define T_DOUBLE 266
+#define T_ELSE 267
+#define T_EXP 268
+#define T_EQUALS 269
+#define T_GREATER_EQUALS 270
+#define T_GREATER 271
+#define T_LESS_EQUALS 272
+#define T_LESS 273
+#define T_FALSE 274
+#define T_INTEGER 275
+#define T_KEYWORD 276
+#define T_MINUS 277
+#define T_MULT 278
+#define T_NOT 279
+#define T_NOT_EQUALS 280
+#define T_OR 281
+#define T_OPEN_CURLY 282
+#define T_OPEN_PAREN 283
+#define T_OPEN_SQBKT 284
+#define T_PLUS 285
+#define T_QUESTION 286
+#define T_SEMI 287
+#define T_STRING 288
+#define T_TRUE 289
+#define T_NEGATION 290
+
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+
+{
+  char          u_char;
+  double        u_double;
+  int           u_integer;
+  KeyData* u_keydata;
+  string*       u_keyword;
+  string*       u_string;
+}
+/* Line 1529 of yacc.c.  */
+
+	YYSTYPE;
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+extern YYSTYPE SAMRAI_yylval;
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Grammar.y
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Grammar.y	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1216 @@
+%{
+//
+// File:	$URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/tbox/Grammar.y $
+// Package:	SAMRAI toolbox
+// Copyright:	(c) 1997-2010 Lawrence Livermore National Security, LLC
+// Revision:	$LastChangedRevision: 4081 $
+// Modified:	$LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+// Description:	Yacc grammar description for the input database
+//
+
+#include "SAMRAI/SAMRAI_config.h"
+#include <math.h>
+
+#include STL_SSTREAM_HEADER_FILE
+
+using namespace std;
+
+#if !defined(OSTRINGSTREAM_TYPE_IS_BROKEN) && defined(OSTRSTREAM_TYPE_IS_BROKEN)
+typedef ostringstream ostrstream;
+#endif
+
+#include "SAMRAI/tbox/Dimension.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Parser.h"
+#include <string>
+
+#ifdef __xlC__
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+using namespace std;
+
+using namespace SAMRAI;
+using namespace tbox;
+
+extern int yylex();
+void yyerror(const char *const error)
+{
+   Parser::getParser()->error(error);
+
+}
+
+// Do not change the numbering of keys without checking promotion logic
+
+#define KEY_COMPLEX (0)
+#define KEY_DOUBLE  (1)
+#define KEY_INTEGER (2)
+#define KEY_BOOL    (3)
+#define KEY_BOX     (4)
+#define KEY_CHAR    (5)
+#define KEY_STRING  (6)
+
+static string type_names[] = {
+   "complex", "double", "int", "bool", "box", "char", "string"
+};
+
+#define IS_NUMBER(X) (((X) >= 0) && ((X) < KEY_BOOL))
+#define PROMOTE(X,Y) ((X) < (Y) ? (X) : (Y))
+
+struct KeyData
+{
+   int             d_node_type;	// KEYDATA node type (see defines above)
+   int             d_array_type;// array type (numbers may be promoted)
+   int             d_array_size;// total size of the array if head element
+   KeyData*   d_next;	// pointer to next (key,data) pair
+   bool            d_bool;	// boolean if node is KEY_BOOL
+   DatabaseBox     d_box;	// box if node is KEY_BOX
+   char            d_char;	// character if node is KEY_CHAR
+   dcomplex        d_complex;	// complex if node is KEY_COMPLEX
+   double          d_double;	// double if node is KEY_DOUBLE
+   int             d_integer;	// integer if node is KEY_INTEGER
+   string          d_string;	// string if node is KEY_STRING
+};
+
+static void delete_list(KeyData*);
+static void to_boolean(KeyData*);
+static void to_integer(KeyData*);
+static void to_double(KeyData*);
+static void to_complex(KeyData*);
+static KeyData* binary_op(KeyData*, KeyData*, const int);
+static KeyData* compare_op(KeyData*, KeyData*, const int);
+static KeyData* eval_function(KeyData*, const string&);
+static KeyData* lookup_variable(const string&, const int, const bool);
+
+%}
+
+%union 
+{
+  char          u_char;
+  double        u_double;
+  int           u_integer;
+  KeyData* u_keydata;
+  string*       u_keyword;
+  string*       u_string;
+}
+
+%token             T_AND
+%token             T_ASSIGN
+%token <u_char>    T_CHAR
+%token             T_CLOSE_CURLY
+%token             T_CLOSE_PAREN
+%token             T_CLOSE_SQBKT
+%token             T_COMMA
+%token             T_DIV
+%token <u_double>  T_DOUBLE
+%token             T_ELSE
+%token             T_EXP
+%token             T_EQUALS
+%token             T_GREATER_EQUALS
+%token             T_GREATER
+%token             T_LESS_EQUALS
+%token             T_LESS
+%token             T_FALSE
+%token <u_integer> T_INTEGER
+%token <u_keyword> T_KEYWORD
+%token             T_MINUS
+%token             T_MULT
+%token             T_NOT
+%token             T_NOT_EQUALS
+%token             T_OR
+%token             T_OPEN_CURLY
+%token             T_OPEN_PAREN
+%token             T_OPEN_SQBKT
+%token             T_PLUS
+%token             T_QUESTION
+%token             T_SEMI
+%token <u_string>  T_STRING
+%token             T_TRUE
+
+%type  <u_keydata> P_BOX
+%type  <u_keydata> P_COMPLEX
+%type  <u_keydata> P_EXPRESSION
+%type  <u_keydata> P_EXPRESSION_LIST
+%type  <u_keydata> P_INTEGER_VECTOR
+%type  <u_keydata> P_PRIMITIVE_TYPE
+
+%left  T_OR
+%left  T_AND
+%left  T_NOT
+%left  T_EQUALS T_NOT_EQUALS T_GREATER_EQUALS T_GREATER T_LESS_EQUALS T_LESS
+%left  T_MINUS T_PLUS
+%left  T_MULT  T_DIV
+%right T_EXP
+%nonassoc T_NEGATION
+
+%%
+
+/*
+ * The specification is the grammar start state.  An input file consists
+ * of a list of definitions.
+ */
+
+P_SPECIFICATION
+ : P_DEFINITION_LIST 
+ ;
+
+/*
+ * A definition list is zero or more definitions.
+ */
+
+P_DEFINITION_LIST
+ : /* empty */
+ | P_DEFINITION_LIST P_DEFINITION
+ ;
+
+/*
+ * A definition is either a new database scope or a (key,value) pair where
+ * the value is an array (and an array may only have one element).  In the
+ * latter case, the array data is entered into the input database.
+ */
+
+P_DEFINITION
+ : T_KEYWORD T_OPEN_CURLY {
+
+   /* This is a hack to make a warning message go away from
+      a symbol flex defines but does not use */
+   if(0) {
+      goto yyerrlab1;
+   }
+
+      if (Parser::getParser()->getScope()->keyExists(*$1)) {
+	 string tmp("Redefinition of key ``");
+         tmp += *$1;
+         tmp += "''";
+         Parser::getParser()->warning(tmp);
+      }
+      Parser::getParser()->enterScope(*$1);
+   } P_DEFINITION_LIST T_CLOSE_CURLY {
+      Parser::getParser()->leaveScope();
+      delete $1;
+   }
+ | T_KEYWORD T_ASSIGN {
+      if (Parser::getParser()->getScope()->keyExists(*$1)) {
+	 string tmp("Redefinition of key ``");
+         tmp += *$1;
+         tmp += "''";
+         Parser::getParser()->warning(tmp);
+      }
+   } P_EXPRESSION_LIST {
+      KeyData* list = $4;
+      const int n = list->d_array_size;
+
+      switch (list->d_array_type) {
+         case KEY_BOOL: {
+            Array<bool> data(n);
+            for (int i = n-1; i >= 0; i--) {
+               data[i] = list->d_bool;
+               list = list->d_next;
+            }
+            Parser::getParser()->getScope()->putBoolArray(*$1, data);
+            break;
+         }
+         case KEY_BOX: {
+            Array<DatabaseBox> data(n);
+            for (int i = n-1; i >= 0; i--) {
+               data[i] = list->d_box;
+               list = list->d_next;
+            }
+            Parser::getParser()->getScope()->putDatabaseBoxArray(*$1, data);
+            break;
+         }
+         case KEY_CHAR: {
+            Array<char> data(n);
+            for (int i = n-1; i >= 0; i--) {
+               data[i] = list->d_char;
+               list = list->d_next;
+            }
+            Parser::getParser()->getScope()->putCharArray(*$1, data);
+            break;
+         }
+         case KEY_COMPLEX: {
+            Array<dcomplex> data(n);
+            for (int i = n-1; i >= 0; i--) {
+               to_complex(list);
+               data[i] = list->d_complex;
+               list = list->d_next;
+            }
+            Parser::getParser()->getScope()->putComplexArray(*$1, data);
+            break;
+         }
+         case KEY_DOUBLE: {
+            Array<double> data(n);
+            for (int i = n-1; i >= 0; i--) {
+               to_double(list);
+               data[i] = list->d_double;
+               list = list->d_next;
+            }
+            Parser::getParser()->getScope()->putDoubleArray(*$1, data);
+            break;
+         }
+         case KEY_INTEGER: {
+            Array<int> data(n);
+            for (int i = n-1; i >= 0; i--) {
+               data[i] = list->d_integer;
+               list = list->d_next;
+            }
+            Parser::getParser()->getScope()->putIntegerArray(*$1, data);
+            break;
+         }
+         case KEY_STRING: {
+            Array<string> data(n);
+            for (int i = n-1; i >= 0; i--) {
+               data[i] = list->d_string;
+               list = list->d_next;
+            }
+            Parser::getParser()->getScope()->putStringArray(*$1, data);
+            break;
+         }
+         default:
+            Parser::getParser()->error("Internal parser error!");
+            break;
+      }
+
+      delete_list($4);
+      delete $1;
+   }
+ | T_SEMI {
+      Parser::getParser()->warning(
+         "Semicolon found in keyword phrase (ignored)");
+   }
+ ;
+
+/*
+ * Parse a list of expressions.  As each new expression is added to the
+ * list, verify that the type of the new expression is compatible with the
+ * type of the list.  If not, then print an error message and do not add
+ * the expression to the list.  The list size is incremented as each new
+ * expression is added to the list.  The final expression list is returned
+ * in reverse order since this is a left-recursive grammar.
+ */
+
+P_EXPRESSION_LIST
+ : P_EXPRESSION {
+      $$ = $1;
+   }
+ | P_EXPRESSION_LIST T_COMMA P_EXPRESSION {
+      switch($1->d_array_type) {
+         case KEY_BOOL:
+         case KEY_CHAR:
+         case KEY_STRING:
+            if ($3->d_node_type != $1->d_array_type) {
+               Parser::getParser()->error("Type mismatch in array");
+               delete $3;
+               $$ = $1;
+            } else {
+               $3->d_array_size = $1->d_array_size + 1;
+               $3->d_next       = $1;
+               $$               = $3;
+            }
+            break;
+         case KEY_BOX:
+            if ($3->d_node_type != KEY_BOX) {
+               Parser::getParser()->error("Type mismatch in box array");
+               delete $3;
+               $$ = $1;
+            } else if ($3->d_box.getDim() != $1->d_box.getDim()) {
+               Parser::getParser()->error("Box array dimension mismatch");
+               delete $3;
+               $$ = $1;
+            } else {
+               $3->d_array_size = $1->d_array_size + 1;
+               $3->d_next       = $1;
+               $$               = $3;
+            }
+            break;
+         case KEY_COMPLEX:
+         case KEY_DOUBLE:
+         case KEY_INTEGER:
+            if (!IS_NUMBER($3->d_node_type)) {
+               Parser::getParser()->error("Type mismatch in number array");
+               delete $3;
+               $$ = $1;
+            } else {
+               $3->d_array_type = PROMOTE($1->d_array_type, $3->d_node_type);
+               $3->d_array_size = $1->d_array_size + 1;
+               $3->d_next       = $1;
+               $$               = $3;
+            }
+            break;
+      }
+   }
+ ;
+
+/*
+ * Parse a simple expression grammar for the input files.  Expressions are
+ * one of the following:
+ *
+ *	- E = ( bool | box | char | complex | double | int | string )
+ *	- E = variable
+ *	- E = array[n]
+ *	- E = ( E1 )
+ *	- E = func(E1)
+ *	- E = ( E1 ? E2 : E3 )
+ *	- E = !E1
+ *	- E = E1 || E2
+ *	- E = E1 && E2
+ *	- E = E1 == E2
+ *	- E = E1 != E2
+ *	- E = E1 < E2
+ *	- E = E1 <= E2
+ *	- E = E1 > E2
+ *	- E = E1 >= E2
+ *	- E = E1 + E2
+ *	- E = E1 - E2
+ *	- E = E1 * E2
+ *	- E = E1 / E2
+ *	- E = E1 ^ E2
+ *	- E = -E1
+ */
+
+P_EXPRESSION
+ : P_PRIMITIVE_TYPE {
+      $$ = $1;
+   }
+ | T_KEYWORD {
+      $$ = lookup_variable(*$1, 0, false);
+      delete $1;
+   }
+ | T_KEYWORD T_OPEN_SQBKT P_EXPRESSION T_CLOSE_SQBKT {
+      to_integer($3);
+      $$ = lookup_variable(*$1, $3->d_integer, true);
+      delete $1;
+      delete $3;
+   }
+ | T_OPEN_PAREN P_EXPRESSION T_CLOSE_PAREN {
+      $$ = $2;
+   }
+ | T_KEYWORD T_OPEN_PAREN P_EXPRESSION T_CLOSE_PAREN {
+      $$ = eval_function($3, *$1);
+      delete $1;
+   }
+ | T_OPEN_PAREN P_EXPRESSION T_QUESTION {
+      if ($2->d_node_type != KEY_BOOL) {
+         Parser::getParser()->error("X in (X ? Y : Z) is not a boolean");
+      }
+   } P_EXPRESSION T_ELSE P_EXPRESSION T_CLOSE_PAREN {
+      if (($2->d_node_type == KEY_BOOL) && ($2->d_bool)) {
+         $$ = $5;
+         delete $7;
+      } else {
+         $$ = $7;
+         delete $5;
+      }
+      delete $2;
+   }
+ | T_NOT P_EXPRESSION {
+      to_boolean($2);
+      $2->d_bool = !$2->d_bool;
+      $$ = $2;
+   }
+ | P_EXPRESSION T_OR P_EXPRESSION {
+      to_boolean($1);
+      to_boolean($3);
+      $1->d_bool = $1->d_bool || $3->d_bool;
+      delete $3;
+      $$ = $1;
+   }
+ | P_EXPRESSION T_AND P_EXPRESSION {
+      to_boolean($1);
+      to_boolean($3);
+      $1->d_bool = $1->d_bool && $3->d_bool;
+      delete $3;
+      $$ = $1;
+   }
+ | P_EXPRESSION T_EQUALS P_EXPRESSION {
+      $$ = compare_op($1, $3, T_EQUALS);
+   }
+ | P_EXPRESSION T_NOT_EQUALS P_EXPRESSION {
+      $$ = compare_op($1, $3, T_EQUALS);
+      $$->d_bool = !($$->d_bool);
+   }
+ | P_EXPRESSION T_GREATER_EQUALS P_EXPRESSION {
+      $$ = compare_op($1, $3, T_LESS);
+      $$->d_bool = !($$->d_bool);
+   }
+ | P_EXPRESSION T_GREATER P_EXPRESSION {
+      $$ = compare_op($1, $3, T_GREATER);
+   }
+ | P_EXPRESSION T_LESS_EQUALS P_EXPRESSION {
+      $$ = compare_op($1, $3, T_GREATER);
+      $$->d_bool = !($$->d_bool);
+   }
+ | P_EXPRESSION T_LESS P_EXPRESSION {
+      $$ = compare_op($1, $3, T_LESS);
+   }
+ | P_EXPRESSION T_PLUS P_EXPRESSION {
+      if (($1->d_node_type == KEY_STRING) && ($3->d_node_type == KEY_STRING)) {
+	 string tmp($1->d_string);
+	 tmp += $3->d_string;
+         $1->d_string = tmp;
+         delete $3;
+         $$ = $1;
+      } else {
+         $$ = binary_op($1, $3, T_PLUS);
+      }
+   }
+ | P_EXPRESSION T_MINUS P_EXPRESSION {
+      $$ = binary_op($1, $3, T_MINUS);
+   }
+ | P_EXPRESSION T_MULT P_EXPRESSION {
+      $$ = binary_op($1, $3, T_MULT);
+   }
+ | P_EXPRESSION T_DIV P_EXPRESSION {
+      $$ = binary_op($1, $3, T_DIV);
+   }
+ | P_EXPRESSION T_EXP P_EXPRESSION {
+      $$ = binary_op($1, $3, T_EXP);
+   }
+ | T_MINUS P_EXPRESSION %prec T_NEGATION {
+      switch ($2->d_node_type) {
+         case KEY_INTEGER:
+            $2->d_integer = -($2->d_integer);
+            break;
+         case KEY_DOUBLE:
+            $2->d_double = -($2->d_double);
+            break;
+         case KEY_COMPLEX:
+            $2->d_complex = -($2->d_complex);
+            break;
+         default:
+            Parser::getParser()->error("X in -X is not a number");
+            break;
+      }
+      $$ = $2;
+   }
+ ;
+
+/*
+ * Parse a primitive type: bool, box, char, complex, double, int, string.
+ */
+
+P_PRIMITIVE_TYPE
+ : T_TRUE {
+      $$ = new KeyData;
+      $$->d_node_type  = KEY_BOOL;
+      $$->d_array_type = KEY_BOOL;
+      $$->d_array_size = 1;
+      $$->d_next       = NULL;
+      $$->d_bool       = true;
+   }
+ | T_FALSE {
+      $$ = new KeyData;
+      $$->d_node_type  = KEY_BOOL;
+      $$->d_array_type = KEY_BOOL;
+      $$->d_array_size = 1;
+      $$->d_next       = NULL;
+      $$->d_bool       = false;
+   }
+ | P_BOX {
+      $$ = $1;
+   }
+ | T_CHAR {
+      $$ = new KeyData;
+      $$->d_node_type  = KEY_CHAR;
+      $$->d_array_type = KEY_CHAR;
+      $$->d_array_size = 1;
+      $$->d_next       = NULL;
+      $$->d_char       = $1;
+   }
+ | P_COMPLEX {
+      $$ = $1;
+   }
+ | T_DOUBLE {
+      $$ = new KeyData;
+      $$->d_node_type  = KEY_DOUBLE;
+      $$->d_array_type = KEY_DOUBLE;
+      $$->d_array_size = 1;
+      $$->d_next       = NULL;
+      $$->d_double     = $1;
+   }
+ | T_INTEGER {
+      $$ = new KeyData;
+      $$->d_node_type  = KEY_INTEGER;
+      $$->d_array_type = KEY_INTEGER;
+      $$->d_array_size = 1;
+      $$->d_next       = NULL;
+      $$->d_integer    = $1;
+   }
+ | T_STRING {
+      $$ = new KeyData;
+      $$->d_node_type  = KEY_STRING;
+      $$->d_array_type = KEY_STRING;
+      $$->d_array_size = 1;
+      $$->d_next       = NULL;
+      $$->d_string     = *$1;
+      delete $1;
+   }
+ ;
+
+/*
+ * Parse a complex number as (x,y), where x and y are double expressions.
+ */
+
+P_COMPLEX
+ : T_OPEN_PAREN P_EXPRESSION T_COMMA P_EXPRESSION T_CLOSE_PAREN {
+      to_double($2);
+      to_double($4);
+      $2->d_complex    = dcomplex($2->d_double, $4->d_double);
+      $2->d_node_type  = KEY_COMPLEX;
+      $2->d_array_type = KEY_COMPLEX;
+      delete $4;
+      $$ = $2;
+   }
+ ;
+
+/*
+ * Parse a box description of the form [(l0,l1,...,ln),(u0,u1,...,un)].
+ * The two integer vectors must have the same length, and the length
+ * must be between one and three, inclusive.
+ */
+
+P_BOX
+ : T_OPEN_SQBKT P_INTEGER_VECTOR T_COMMA P_INTEGER_VECTOR T_CLOSE_SQBKT {
+      $$ = new KeyData;
+      $$->d_node_type  = KEY_BOX;
+      $$->d_array_type = KEY_BOX;
+      $$->d_array_size = 1;
+      $$->d_next       = NULL;
+
+      if ($2->d_array_size != $4->d_array_size) {
+         Parser::getParser()->error("Box lower/upper dimension mismatch");
+      } else if ($2->d_array_size > 3) {
+         Parser::getParser()->error("Box dimension too large (> 3)");
+      } else {
+         const int n = $2->d_array_size;
+	 const tbox::Dimension dim(static_cast<unsigned short>(n));
+         $$->d_box.setDim(dim);
+
+         KeyData* list_lower = $2;
+         KeyData* list_upper = $4;
+         for (int i = n-1; i >= 0; i--) {
+            $$->d_box.lower(i) = list_lower->d_integer;
+            $$->d_box.upper(i) = list_upper->d_integer;
+            list_lower = list_lower->d_next;
+            list_upper = list_upper->d_next;
+         }
+
+         delete_list($2);
+         delete_list($4);
+      }
+   }
+ ;
+
+/*
+ * Parse an integer vector of the form (i0, i1, ..., in).
+ */
+
+P_INTEGER_VECTOR
+ : T_OPEN_PAREN P_EXPRESSION_LIST T_CLOSE_PAREN {
+      KeyData* list = $2;
+      while (list) {
+         to_integer(list);
+         list = list->d_next;
+      }
+      $$ = $2;
+   }
+ ;
+
+%%
+
+/*
+ * Delete all elements in a keyword list.
+ */
+
+static void delete_list(KeyData* list)
+{
+   while (list) {
+      KeyData* byebye = list;
+      list = list->d_next;
+      delete byebye;
+   }
+}
+
+/*
+ * Verify that the number is a boolean; otherwise, report an error and
+ * convert the argument into a boolean false.
+ */
+
+static void to_boolean(KeyData* keydata)
+{
+   if (keydata->d_node_type != KEY_BOOL) {
+      Parser::getParser()->error("Cannot convert type into boolean");
+      keydata->d_bool       = false;
+      keydata->d_node_type  = KEY_BOOL;
+      keydata->d_array_type = KEY_BOOL;
+   }
+}
+
+/*
+ * Convert the number into an integer.  If the conversion cannot be
+ * performed, then print an error and return an integer zero.
+ */
+
+static void to_integer(KeyData* keydata)
+{
+   switch (keydata->d_node_type) {
+      case KEY_INTEGER:
+         break;
+      case KEY_DOUBLE:
+         Parser::getParser()->warning("Double truncated to integer");
+         keydata->d_integer = static_cast<int>(keydata->d_double);
+         break;
+      case KEY_COMPLEX:
+         Parser::getParser()->warning("Complex truncated to integer");
+         keydata->d_integer = static_cast<int>(keydata->d_complex.real());
+         break;
+      default:
+         Parser::getParser()->error("Cannot convert type into integer");
+         keydata->d_integer = 0;
+         break;
+   }
+   keydata->d_node_type  = KEY_INTEGER;
+   keydata->d_array_type = KEY_INTEGER;
+}
+
+/*
+ * Convert the number in the keydata structure to a double.  If the
+ * conversion cannot be performed, then print an error and return zero.
+ */
+
+static void to_double(KeyData* keydata)
+{
+   switch (keydata->d_node_type) {
+      case KEY_INTEGER:
+         keydata->d_double = (double)(keydata->d_integer);
+         break;
+      case KEY_DOUBLE:
+         break;
+      case KEY_COMPLEX:
+         Parser::getParser()->warning("Complex truncated to double");
+         keydata->d_double = keydata->d_complex.real();
+         break;
+      default:
+         Parser::getParser()->error("Cannot convert type into double");
+         keydata->d_double = 0.0;
+         break;
+   }
+   keydata->d_node_type  = KEY_DOUBLE;
+   keydata->d_array_type = KEY_DOUBLE;
+}
+
+/*
+ * Convert the number in the keydata structure to a complex.  If the
+ * conversion cannot be performed, then print an error and return zero.
+ */
+
+static void to_complex(KeyData* keydata)
+{
+   switch (keydata->d_node_type) {
+      case KEY_INTEGER:
+         keydata->d_complex = dcomplex((double) keydata->d_integer, 0.0);
+         break;
+      case KEY_DOUBLE:
+         keydata->d_complex = dcomplex(keydata->d_double, 0.0);
+         break;
+      case KEY_COMPLEX:
+         break;
+      default:
+         Parser::getParser()->error("Cannot convert type into complex");
+         keydata->d_complex = dcomplex(0.0, 0.0);
+         break;
+   }
+   keydata->d_node_type  = KEY_COMPLEX;
+   keydata->d_array_type = KEY_COMPLEX;
+}
+
+/*
+ * Perform one of the standard binary operations +, -, *, /, or ^ on numeric
+ * types.  Concatenation for strings is implemented above.  Return an integer
+ * zero if there is a type mismatch.
+ */
+
+static KeyData* binary_op(KeyData* a, KeyData* b, const int op)
+{
+   if (!IS_NUMBER(a->d_node_type) || !IS_NUMBER(b->d_node_type)) {
+      Parser::getParser()->error(
+         "Cannot perform numerical operations on non-numeric types");
+      a->d_integer    = 0;
+      a->d_node_type  = KEY_INTEGER;
+      a->d_array_type = KEY_INTEGER;
+   } else {
+      const int result_type = PROMOTE(a->d_node_type, b->d_node_type);
+      switch (result_type) {
+         case KEY_INTEGER:
+            switch (op) {
+               case T_DIV:
+                  a->d_integer = a->d_integer / b->d_integer;
+                  break;
+               case T_EXP:
+                  a->d_integer =
+                     static_cast<int>(pow((double) a->d_integer, (double) b->d_integer));
+                  break;
+               case T_MINUS:
+                  a->d_integer = a->d_integer - b->d_integer;
+                  break;
+               case T_MULT:
+                  a->d_integer = a->d_integer * b->d_integer;
+                  break;
+               case T_PLUS:
+                  a->d_integer = a->d_integer + b->d_integer;
+                  break;
+            }
+            break;
+         case KEY_DOUBLE:
+            to_double(a);
+            to_double(b);
+            switch (op) {
+               case T_DIV:
+                  a->d_double = a->d_double / b->d_double;
+                  break;
+               case T_EXP:
+                  a->d_double = pow(a->d_double, b->d_double);
+                  break;
+               case T_MINUS:
+                  a->d_double = a->d_double - b->d_double;
+                  break;
+               case T_MULT:
+                  a->d_double = a->d_double * b->d_double;
+                  break;
+               case T_PLUS:
+                  a->d_double = a->d_double + b->d_double;
+                  break;
+            }
+            break;
+         case KEY_COMPLEX:
+            to_complex(a);
+            to_complex(b);
+            switch (op) {
+               case T_DIV:
+                  a->d_complex = a->d_complex / b->d_complex;
+                  break;
+               case T_EXP:
+                  /*
+		   * SGS this is broken for insure++ and gcc 3.3.2
+		   * a->d_complex = pow(a->d_complex, b->d_complex);
+		   * replaced with the defn from the header file.
+		   */
+		  a->d_complex = exp(a->d_complex * log(b->d_complex));
+                  break;
+               case T_MINUS:
+                  a->d_complex = a->d_complex - b->d_complex;
+                  break;
+               case T_MULT:
+                  a->d_complex = a->d_complex * b->d_complex;
+                  break;
+               case T_PLUS:
+                  a->d_complex = a->d_complex + b->d_complex;
+                  break;
+            }
+            break;
+      }
+   }
+   delete b;
+   return(a);
+}
+
+/*
+ * Perform one of the standard comparison operations ==, <, or >.  The other
+ * operators !=, >=, and <= are computed above by using one of the first three
+ * and then negating the result.  Return a boolean false if there is a type
+ * mismatch problem.
+ */
+
+static KeyData* compare_op(KeyData* a, KeyData* b, const int op)
+{
+   if (!IS_NUMBER(a->d_node_type) || !IS_NUMBER(b->d_node_type)) {
+      if (a->d_node_type != b->d_node_type) {
+         Parser::getParser()->error(
+            "Cannot compare different non-numeric types");
+         a->d_bool = false;
+      } else if (op != T_EQUALS) {
+         Parser::getParser()->error(
+            "Cannot apply <, >, <=, or >= to non-numeric types");
+         a->d_bool = false;
+      } else {
+         switch(a->d_node_type) {
+            case KEY_BOOL:
+               a->d_bool = (a->d_bool == b->d_bool);
+               break;
+            case KEY_BOX:
+               a->d_bool = (a->d_box == b->d_box);
+               break;
+            case KEY_CHAR:
+               a->d_bool = (a->d_char == b->d_char);
+               break;
+            case KEY_STRING:
+               a->d_bool = (a->d_string == b->d_string);
+               break;
+         }
+      }
+   } else {
+      const int promoted = PROMOTE(a->d_node_type, b->d_node_type);
+      switch (promoted) {
+         case KEY_INTEGER:
+            switch (op) {
+               case T_EQUALS:
+                  a->d_bool = (a->d_integer == b->d_integer);
+                  break;
+               case T_LESS:
+                  a->d_bool = (a->d_integer < b->d_integer);
+                  break;
+               case T_GREATER:
+                  a->d_bool = (a->d_integer > b->d_integer);
+                  break;
+            }
+            break;
+         case KEY_DOUBLE:
+// Intel warns about comparison of floating point numbers
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:1572)
+#endif
+            to_double(a);
+            to_double(b);
+            switch (op) {
+               case T_EQUALS:
+                  a->d_bool = (a->d_double == b->d_double);
+                  break;
+               case T_LESS:
+                  a->d_bool = (a->d_double < b->d_double);
+                  break;
+               case T_GREATER:
+                  a->d_bool = (a->d_double > b->d_double);
+                  break;
+            }
+            break;
+         case KEY_COMPLEX:
+            to_complex(a);
+            to_complex(b);
+            switch (op) {
+               case T_EQUALS:
+                  a->d_bool = (a->d_complex == b->d_complex);
+                  break;
+               case T_LESS:
+               case T_GREATER:
+                  Parser::getParser()->error(
+                     "Operators <, >, <=, and >= are not defined for complex");
+                  a->d_bool = false;
+                  break;
+            }
+            break;
+      }
+   }
+   a->d_node_type  = KEY_BOOL;
+   a->d_array_type = KEY_BOOL;
+   delete b;
+   return(a);
+}
+
+/*
+ * Perform a function evaluation on the specified argument.
+ */
+
+struct arith_functions {
+   string     d_name;
+   double   (*d_r2r_func)(double);
+   dcomplex (*d_c2c_func)(const dcomplex&);
+   double   (*d_c2r_func)(const dcomplex&);
+};
+
+
+
+#if 0
+// Static initialization was not working with SGI
+// compiler; so use an initialization function to 
+// create the table
+static arith_functions af[] = {
+   { "abs"  , fabs , NULL, abs  },
+   { "acos" , acos , NULL, NULL },
+   { "asin" , asin , NULL, NULL },
+   { "atan" , atan , NULL, NULL },
+   { "ceil" , ceil , NULL, NULL },
+   { "conj" , NULL , conj, NULL },
+   { "cos"  , cos  , cos , NULL },
+   { "cosh" , cosh , cosh, NULL },
+   { "exp"  , exp  , exp , NULL },
+   { "fabs" , fabs , NULL, NULL },
+   { "floor", floor, NULL, NULL },
+   { "imag" , NULL , NULL, imag },
+   { "log10", log10, NULL, NULL },
+   { "log"  , log  , log , NULL },
+   { "real" , NULL , NULL, real },
+   { "sin"  , sin  , sin , NULL },
+   { "sinh" , sinh , sinh, NULL },
+   { "sqrt" , sqrt , sqrt, NULL },
+   { "tan"  , tan  , NULL, NULL },
+   { ""     , NULL , NULL, NULL }
+};
+#endif
+
+static arith_functions af[20];
+
+// These are needed to deal with imag/real returning a reference
+// under GCC 3.4.x
+static double imag_thunk(const dcomplex &a)
+{
+   return imag(a);
+}
+
+static double real_thunk(const dcomplex &a)
+{
+   return real(a);
+}
+
+void parser_static_table_initialize()
+{
+   af[0].d_name =    "abs";
+   af[0].d_r2r_func = fabs;
+   af[0].d_c2c_func = NULL;
+   af[0].d_c2r_func = std::abs;
+
+
+   af[1].d_name =    "acos";
+   af[1].d_r2r_func = acos;
+   af[1].d_c2c_func = NULL;
+   af[1].d_c2r_func = NULL;
+   
+   af[2].d_name =    "asin";
+   af[2].d_r2r_func = asin;
+   af[2].d_c2c_func = NULL;
+   af[2].d_c2r_func = NULL;
+   
+   af[3].d_name =    "atan";
+   af[3].d_r2r_func = atan;
+   af[3].d_c2c_func = NULL;
+   af[3].d_c2r_func = NULL;
+   
+   af[4].d_name =    "ceil";
+   af[4].d_r2r_func = ceil;
+   af[4].d_c2c_func = NULL;
+   af[4].d_c2r_func = NULL;
+
+   af[5].d_name =    "conj";
+   af[5].d_r2r_func = NULL;
+   af[5].d_c2c_func = conj;
+   af[5].d_c2r_func = NULL;
+
+
+   af[6].d_name =    "cos";
+   af[6].d_r2r_func = ::cos;
+   af[6].d_c2c_func = std::cos;
+   af[6].d_c2r_func = NULL;
+
+   af[7].d_name =    "cosh";
+   af[7].d_r2r_func = ::cosh;
+   af[7].d_c2c_func = std::cosh;
+   af[7].d_c2r_func = NULL;
+
+   af[8].d_name =    "exp";
+   af[8].d_r2r_func = ::exp;
+   af[8].d_c2c_func = std::exp;
+   af[8].d_c2r_func = NULL;
+
+   af[9].d_name =    "fabs";
+   af[9].d_r2r_func = fabs;
+   af[9].d_c2c_func = NULL;
+   af[9].d_c2r_func = NULL;
+
+   af[10].d_name =    "floor";
+   af[10].d_r2r_func = floor;
+   af[10].d_c2c_func = NULL;
+   af[10].d_c2r_func = NULL;
+
+   af[11].d_name =    "imag";
+   af[11].d_r2r_func = NULL;
+   af[11].d_c2c_func = NULL;
+   af[11].d_c2r_func = imag_thunk;
+
+   af[12].d_name =    "log10";
+   af[12].d_r2r_func = ::log10;
+   af[12].d_c2c_func = NULL;
+   af[12].d_c2r_func = NULL;
+
+   af[13].d_name =    "log";
+   af[13].d_r2r_func = ::log;
+   af[13].d_c2c_func = std::log;
+   af[13].d_c2r_func = NULL;
+
+   af[14].d_name =    "real";
+   af[14].d_r2r_func = NULL;
+   af[14].d_c2c_func = NULL;
+   af[14].d_c2r_func = real_thunk;
+
+   af[15].d_name =    "sin";
+   af[15].d_r2r_func = ::sin;
+   af[15].d_c2c_func = std::sin;
+   af[15].d_c2r_func = NULL;
+
+   af[16].d_name =    "sinh";
+   af[16].d_r2r_func = ::sinh;
+   af[16].d_c2c_func = std::sinh;
+   af[16].d_c2r_func = NULL;
+
+   af[17].d_name =    "sqrt";
+   af[17].d_r2r_func = ::sqrt;
+   af[17].d_c2c_func = std::sqrt;
+   af[17].d_c2r_func = NULL;
+
+   af[18].d_name =    "tan";
+   af[18].d_r2r_func = tan;
+   af[18].d_c2c_func = NULL;
+   af[18].d_c2r_func = NULL;
+
+   af[19].d_name =    "";
+   af[19].d_r2r_func = NULL;
+   af[19].d_c2c_func = NULL;
+   af[19].d_c2r_func = NULL;
+}
+
+static KeyData* eval_function(KeyData* arg, const string& func)
+{
+   if (!IS_NUMBER(arg->d_node_type)) {
+      string tmp("Unknown function ");
+      tmp += func;
+      tmp += "(";
+      tmp += type_names[arg->d_node_type];
+      tmp += ")";
+      Parser::getParser()->error(tmp);
+   } else if (func == "int") {
+      to_double(arg);
+      arg->d_integer    = static_cast<int>(arg->d_double);
+      arg->d_node_type  = KEY_INTEGER;
+      arg->d_array_type = KEY_INTEGER;
+   } else {
+      for (int f = 0; af[f].d_name.length() > 0; f++) {
+         if (af[f].d_name == func) {
+            if (arg->d_node_type == KEY_COMPLEX) {
+               if (af[f].d_c2c_func) {
+                  arg->d_complex = (*af[f].d_c2c_func)(arg->d_complex);
+               } else if (af[f].d_c2r_func) {
+                  arg->d_double     = (*af[f].d_c2r_func)(arg->d_complex);
+                  arg->d_node_type  = KEY_DOUBLE;
+                  arg->d_array_type = KEY_DOUBLE;
+               } else {
+                  to_double(arg);
+                  arg->d_double = (*af[f].d_r2r_func)(arg->d_double);
+               }
+            } else {
+               if (af[f].d_r2r_func) {
+                  to_double(arg);
+                  arg->d_double = (*af[f].d_r2r_func)(arg->d_double);
+               } else if (af[f].d_c2r_func) {
+                  to_complex(arg);
+                  arg->d_double     = (*af[f].d_c2r_func)(arg->d_complex);
+                  arg->d_node_type  = KEY_DOUBLE;
+                  arg->d_array_type = KEY_DOUBLE;
+               } else {
+                  to_complex(arg);
+                  arg->d_complex = (*af[f].d_c2c_func)(arg->d_complex);
+               }
+            }
+            return(arg);
+         }
+      }
+
+      string tmp("Unknown function ");
+      tmp += func;
+      tmp += "(";
+      tmp += type_names[arg->d_node_type];
+      tmp += ")";
+      Parser::getParser()->error(tmp);
+   }
+   return(arg);
+}
+
+/*
+ * Fetch a variable in the database.  If there is an error, then print
+ * an error message and return an integer zero as result.
+ */
+
+static KeyData* lookup_variable(
+   const string& key, const int index, const bool is_array)
+{
+   KeyData* result = new KeyData;
+   result->d_node_type  = KEY_INTEGER;
+   result->d_array_type = KEY_INTEGER;
+   result->d_array_size = 1;
+   result->d_next       = NULL;
+   result->d_integer    = 0;
+
+   Parser *parser = Parser::getParser();
+   Pointer<Database> db = parser->getDatabaseWithKey(key);
+
+   if (db.isNull()) {
+      string tmp("Variable ``");
+      tmp += key;
+      tmp += "'' not found in database";
+      parser->error(tmp);
+   } else if (!is_array && (db->getArraySize(key) > 1)) {
+      string tmp("Variable ``");
+      tmp += key;
+      tmp += "'' is not a scalar value";
+      parser->error(tmp);
+   } else if ((index < 0) || (index >= db->getArraySize(key))) {
+      ostrstream oss;
+      oss << index;
+      string tmp("Variable ``");
+      tmp += key;
+      tmp += "[";
+      tmp += oss.str();
+      tmp += "]'' out of range";
+      parser->error(tmp);
+   } else if (db->isInteger(key)) {
+      result->d_integer    = db->getIntegerArray(key)[index];
+      result->d_node_type  = KEY_INTEGER;
+      result->d_array_type = KEY_INTEGER;
+
+   } else if (db->isDouble(key)) {
+      result->d_double     = db->getDoubleArray(key)[index];
+      result->d_node_type  = KEY_DOUBLE;
+      result->d_array_type = KEY_DOUBLE;
+
+   } else if (db->isComplex(key)) {
+      result->d_complex    = db->getComplexArray(key)[index];
+      result->d_node_type  = KEY_COMPLEX;
+      result->d_array_type = KEY_COMPLEX;
+
+   } else if (db->isBool(key)) {
+      result->d_bool       = db->getBoolArray(key)[index];
+      result->d_node_type  = KEY_BOOL;
+      result->d_array_type = KEY_BOOL;
+
+   } else if (db->isDatabaseBox(key)) {
+      result->d_box        = db->getDatabaseBoxArray(key)[index];
+      result->d_node_type  = KEY_BOX;
+      result->d_array_type = KEY_BOX;
+
+   } else if (db->isChar(key)) {
+      result->d_char       = db->getCharArray(key)[index];
+      result->d_node_type  = KEY_CHAR;
+      result->d_array_type = KEY_CHAR;
+
+   } else if (db->isString(key)) {
+      result->d_string     = db->getStringArray(key)[index];
+      result->d_node_type  = KEY_STRING;
+      result->d_array_type = KEY_STRING;
+
+   } else {
+      parser->error("Unknown type for variable="+key);
+   }
+
+   return(result);
+}
+
+#ifdef __xlC__
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/HDFDatabase.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/HDFDatabase.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,2472 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A database structure that stores HDF5 format data. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/HDFDatabase.h"
+
+#ifdef HAVE_HDF5
+
+#include "SAMRAI/tbox/IOStream.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#include <cassert>
+#include <cstring>
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Integer keys for identifying types in HDF5 database.  Negative        *
+ * entries are used to distinguish arrays from scalars when printing     *
+ * key information.                                                      *
+ *                                                                       *
+ *************************************************************************
+ */
+#define KEY_DATABASE (0)
+#define KEY_BOOL_ARRAY (1)
+#define KEY_BOX_ARRAY (2)
+#define KEY_CHAR_ARRAY (3)
+#define KEY_COMPLEX_ARRAY (4)
+#define KEY_DOUBLE_ARRAY (5)
+#define KEY_FLOAT_ARRAY (6)
+#define KEY_INT_ARRAY (7)
+#define KEY_STRING_ARRAY (8)
+
+#define KEY_BOOL_SCALAR (-1)
+#define KEY_BOX_SCALAR (-2)
+#define KEY_CHAR_SCALAR (-3)
+#define KEY_COMPLEX_SCALAR (-4)
+#define KEY_DOUBLE_SCALAR (-5)
+#define KEY_FLOAT_SCALAR (-6)
+#define KEY_INT_SCALAR (-7)
+#define KEY_STRING_SCALAR (-8)
+
+/*
+ * Macros starting with H5T_SAMRAI_ are for controlling the data
+ * type that is actually written to the file.  As long as
+ * these are not "native" types, the file should be portable.
+ */
+
+// Type used for writing simple (non-compound) data.
+#define H5T_SAMRAI_INT H5T_STD_I32BE
+#define H5T_SAMRAI_FLOAT H5T_IEEE_F32BE
+#define H5T_SAMRAI_DOUBLE H5T_IEEE_F64BE
+#define H5T_SAMRAI_BOOL H5T_STD_I8BE
+
+// Type used for writing the data attribute key.
+#define H5T_SAMRAI_ATTR H5T_STD_I8BE
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Macros to suppress the HDF5 messages sent to standard i/o; handle     *
+ * errors explicity within this code.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+/*
+ * SGS Note:  Can the new HDF5 stack stuff be a better solution to this?
+ */
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+#define BEGIN_SUPPRESS_HDF5_WARNINGS                  \
+   {                                                     \
+      herr_t (* H5E_saved_efunc)( \
+         hid_t, \
+         void *) = NULL;   \
+      void* H5E_saved_edata = NULL;                      \
+      H5Eget_auto(H5E_DEFAULT, &H5E_saved_efunc, &H5E_saved_edata); \
+      H5Eset_auto(H5E_DEFAULT, NULL, NULL);
+
+#define END_SUPPRESS_HDF5_WARNINGS                     \
+   H5Eset_auto(H5E_DEFAULT, H5E_saved_efunc, H5E_saved_edata);  \
+   }
+#else
+#define BEGIN_SUPPRESS_HDF5_WARNINGS                  \
+   {                                                     \
+      herr_t (* H5E_saved_efunc)( \
+         void *) = NULL;          \
+      void* H5E_saved_edata = NULL;                      \
+      H5Eget_auto(&H5E_saved_efunc, &H5E_saved_edata);   \
+      H5Eset_auto(NULL, NULL);
+
+#define END_SUPPRESS_HDF5_WARNINGS                     \
+   H5Eset_auto(H5E_saved_efunc, H5E_saved_edata);      \
+   }
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Static member function to iterate through the hdf5 data file and      *
+ * assemble a list of desired (key, type) pairs.                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+herr_t HDFDatabase::iterateKeys(
+   hid_t loc_id,
+   const char* name,
+   void* void_database)
+{
+   TBOX_ASSERT(name != (char *)NULL);
+
+   HDFDatabase* database = (HDFDatabase *)(void_database);
+
+   if (database->d_still_searching) {
+
+      H5G_stat_t statbuf;
+      int type_key;
+      herr_t errf;
+      NULL_USE(errf);
+
+      errf = H5Gget_objinfo(loc_id, name, 0, &statbuf);
+      TBOX_ASSERT(errf >= 0);
+
+      switch (statbuf.type) {
+         case H5G_GROUP: {
+            if (database->d_top_level_search_group == "/") {
+               addKeyToList(name, KEY_DATABASE, void_database);
+            } else if (!strcmp(name, database->d_group_to_search.c_str())) {
+               hid_t grp;
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+               grp = H5Gopen(loc_id, name, H5P_DEFAULT);
+#else
+               grp = H5Gopen(loc_id, name);
+#endif
+
+               TBOX_ASSERT(grp >= 0);
+
+               database->d_found_group = true;
+               database->d_still_searching =
+                  H5Giterate(grp, ".", NULL,
+                     HDFDatabase::iterateKeys, void_database);
+               TBOX_ASSERT(database->d_still_searching >= 0);
+
+               database->d_found_group = false;
+            } else {
+               hid_t grp;
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+               grp = H5Gopen(loc_id, name, H5P_DEFAULT);
+#else
+               grp = H5Gopen(loc_id, name);
+#endif
+
+               TBOX_ASSERT(grp >= 0);
+
+               if (database->d_found_group) {
+                  addKeyToList(name, KEY_DATABASE, void_database);
+               } else {
+                  errf = H5Giterate(grp, ".", NULL,
+                        HDFDatabase::iterateKeys, void_database);
+
+                  TBOX_ASSERT(errf >= 0);
+
+               }
+            }
+            break;
+         }
+
+         case H5G_DATASET: {
+            if (database->d_still_searching && database->d_found_group) {
+               hid_t this_set;
+               BEGIN_SUPPRESS_HDF5_WARNINGS;
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+               this_set = H5Dopen(loc_id, name, H5P_DEFAULT);
+#else
+               this_set = H5Dopen(loc_id, name);
+#endif
+               END_SUPPRESS_HDF5_WARNINGS
+               if (this_set > 0) {
+                  hid_t attr = H5Aopen_name(this_set, "Type");
+                  TBOX_ASSERT(attr >= 0);
+
+                  errf = H5Aread(attr, H5T_NATIVE_INT, &type_key);
+                  TBOX_ASSERT(errf >= 0);
+
+                  hid_t this_space = H5Dget_space(this_set);
+                  TBOX_ASSERT(this_space >= 0);
+
+                  hsize_t nsel = H5Sget_select_npoints(this_space);
+                  int array_size = int(nsel);
+                  addKeyToList(name,
+                     (array_size == 1 ? -type_key : type_key),
+                     void_database);
+                  errf = H5Sclose(this_space);
+                  TBOX_ASSERT(errf >= 0);
+
+                  errf = H5Aclose(attr);
+                  TBOX_ASSERT(errf >= 0);
+
+                  errf = H5Dclose(this_set);
+                  TBOX_ASSERT(errf >= 0);
+               }
+            }
+            break;
+         }
+
+         default: {
+            TBOX_ERROR("HDFDatabase key search error....\n"
+               << "   Unable to identify key = " << name
+               << " as a known group or dataset" << std::endl);
+         }
+      }
+
+   }
+   return 0;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Static member function to add key to list for database associated     *
+ * with void* argument.                                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HDFDatabase::addKeyToList(
+   const char* name,
+   int type,
+   void* database)
+{
+   TBOX_ASSERT(name != (char *)NULL);
+   TBOX_ASSERT(database != NULL);
+
+   KeyData key_item;
+   key_item.d_key = name;
+   key_item.d_type = type;
+
+   ((HDFDatabase *)database)->d_keydata.appendItem(key_item);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Public HDF database constructor creates an empty database with the    *
+ * specified name.  It sets the group_ID to a default value of -1.       *
+ * This data is used by member functions to track parent databases.      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+HDFDatabase::HDFDatabase(
+   const std::string& name):
+   d_still_searching(0),
+   d_found_group(0),
+   d_is_file(false),
+   d_file_id(-1),
+   d_group_id(-1),
+   d_database_name(name)
+{
+
+   TBOX_ASSERT(!name.empty());
+
+   d_keydata.clearItems();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private HDF database constructor creates an empty database with the   *
+ * specified name.  The group_ID is used privately within                *
+ * the member functions to track parent databases.                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+HDFDatabase::HDFDatabase(
+   const std::string& name,
+   hid_t group_ID):
+   d_is_file(false),
+   d_file_id(-1),
+   d_group_id(group_ID),
+   d_database_name(name)
+{
+
+   TBOX_ASSERT(!name.empty());
+
+   d_keydata.clearItems();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The database destructor closes the opened file or group.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+HDFDatabase::~HDFDatabase()
+{
+   herr_t errf;
+   NULL_USE(errf);
+
+   if (d_is_file) {
+      close();
+   }
+
+   if (d_group_id != -1) {
+      errf = H5Gclose(d_group_id);
+      TBOX_ASSERT(errf >= 0);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true if the key exists within the database; false otherwise.   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool HDFDatabase::keyExists(
+   const std::string& key)
+{
+
+   TBOX_ASSERT(!key.empty());
+
+   bool key_exists = false;
+   herr_t errf;
+   NULL_USE(errf);
+
+   hid_t this_set;
+   BEGIN_SUPPRESS_HDF5_WARNINGS;
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+   this_set = H5Dopen(d_group_id, key.c_str(), H5P_DEFAULT);
+#else
+   this_set = H5Dopen(d_group_id, key.c_str());
+#endif
+   END_SUPPRESS_HDF5_WARNINGS;
+   if (this_set > 0) {
+      key_exists = true;
+      errf = H5Dclose(this_set);
+
+      TBOX_ASSERT(errf >= 0);
+   }
+   if (!key_exists) {
+      hid_t this_group;
+      BEGIN_SUPPRESS_HDF5_WARNINGS;
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      this_group = H5Gopen(d_group_id, key.c_str(), H5P_DEFAULT);
+#else
+      this_group = H5Gopen(d_group_id, key.c_str());
+#endif
+
+      END_SUPPRESS_HDF5_WARNINGS
+      if (this_group > 0) {
+         key_exists = true;
+         errf = H5Gclose(this_group);
+         TBOX_ASSERT(errf >= 0);
+      }
+   }
+
+   return key_exists;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return all keys in the database.                                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+Array<std::string> HDFDatabase::getAllKeys()
+{
+   performKeySearch();
+
+   Array<std::string> tmp_keys(d_keydata.getNumberOfItems());
+
+   int k = 0;
+   for (List<KeyData>::Iterator i(d_keydata); i; i++) {
+      tmp_keys[k] = i().d_key;
+      k++;
+   }
+
+   cleanupKeySearch();
+
+   return tmp_keys;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Get the type of the array entry associated with the specified key	*
+ *									*
+ *************************************************************************
+ */
+enum Database::DataType HDFDatabase::getArrayType(
+   const std::string& key) {
+
+   enum Database::DataType type = Database::SAMRAI_INVALID;
+
+   herr_t errf;
+   NULL_USE(errf);
+
+   if (!key.empty()) {
+
+      if (isDatabase(key)) {
+         type = Database::SAMRAI_DATABASE;
+      } else {
+
+         hid_t this_set;
+         BEGIN_SUPPRESS_HDF5_WARNINGS;
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+         this_set = H5Dopen(d_group_id, key.c_str(), H5P_DEFAULT);
+#else
+         this_set = H5Dopen(d_group_id, key.c_str());
+#endif
+         END_SUPPRESS_HDF5_WARNINGS;
+         if (this_set > 0) {
+            int type_key = readAttribute(this_set);
+
+            switch (type_key) {
+               case KEY_DATABASE:
+                  type = Database::SAMRAI_DATABASE;
+                  break;
+               case KEY_BOOL_ARRAY:
+                  type = Database::SAMRAI_BOOL;
+                  break;
+               case KEY_BOX_ARRAY:
+                  type = Database::SAMRAI_BOX;
+                  break;
+               case KEY_CHAR_ARRAY:
+                  type = Database::SAMRAI_CHAR;
+                  break;
+               case KEY_COMPLEX_ARRAY:
+                  type = Database::SAMRAI_COMPLEX;
+                  break;
+               case KEY_DOUBLE_ARRAY:
+                  type = Database::SAMRAI_DOUBLE;
+                  break;
+               case KEY_FLOAT_ARRAY:
+                  type = Database::SAMRAI_FLOAT;
+                  break;
+               case KEY_INT_ARRAY:
+                  type = Database::SAMRAI_INT;
+                  break;
+               case KEY_STRING_ARRAY:
+                  type = Database::SAMRAI_STRING;
+                  break;
+               case KEY_BOOL_SCALAR:
+                  type = Database::SAMRAI_BOOL;
+                  break;
+               case KEY_BOX_SCALAR:
+                  type = Database::SAMRAI_BOX;
+                  break;
+               case KEY_CHAR_SCALAR:
+                  type = Database::SAMRAI_CHAR;
+                  break;
+               case KEY_COMPLEX_SCALAR:
+                  type = Database::SAMRAI_COMPLEX;
+                  break;
+               case KEY_DOUBLE_SCALAR:
+                  type = Database::SAMRAI_DOUBLE;
+                  break;
+               case KEY_FLOAT_SCALAR:
+                  type = Database::SAMRAI_FLOAT;
+                  break;
+               case KEY_INT_SCALAR:
+                  type = Database::SAMRAI_INT;
+                  break;
+               case KEY_STRING_SCALAR:
+                  type = Database::SAMRAI_STRING;
+                  break;
+            }
+
+            errf = H5Dclose(this_set);
+            TBOX_ASSERT(errf >= 0);
+         }
+      }
+   }
+   return type;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return the size of the array associated with the key.  If the key     *
+ * does not exist, then zero is returned.                                *
+ * Array size is set based on the number of elements (points) within     *
+ * the dataspace defined by the named dataset (or key).                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int HDFDatabase::getArraySize(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   herr_t errf;
+   NULL_USE(errf);
+
+   int array_size = 0;
+
+   hid_t this_set;
+   BEGIN_SUPPRESS_HDF5_WARNINGS;
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+   this_set = H5Dopen(d_group_id, key.c_str(), H5P_DEFAULT);
+#else
+   this_set = H5Dopen(d_group_id, key.c_str());
+#endif
+   END_SUPPRESS_HDF5_WARNINGS;
+   if (this_set > 0) {
+      hid_t this_space = H5Dget_space(this_set);
+      TBOX_ASSERT(this_space >= 0);
+
+      hsize_t nsel;
+      if (readAttribute(this_set) == KEY_CHAR_ARRAY) {
+         hid_t dtype = H5Dget_type(this_set);
+         TBOX_ASSERT(dtype >= 0);
+
+         nsel = H5Tget_size(dtype);
+      } else {
+         nsel = H5Sget_select_npoints(this_space);
+      }
+      array_size = int(nsel);
+      errf = H5Sclose(this_space);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Dclose(this_set);
+      TBOX_ASSERT(errf >= 0);
+
+   }
+
+   return array_size;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true or false depending on whether the specified key           *
+ * represents a database entry.  If the key does not exist, then false   *
+ * is returned.  The key represents a database (or hdf group) if the     *
+ * H5Gopen function on the key is successful.                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool HDFDatabase::isDatabase(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   bool is_database = false;
+   herr_t errf;
+   NULL_USE(errf);
+
+   hid_t this_group;
+   BEGIN_SUPPRESS_HDF5_WARNINGS;
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+   this_group = H5Gopen(d_group_id, key.c_str(), H5P_DEFAULT);
+#else
+   this_group = H5Gopen(d_group_id, key.c_str());
+#endif
+   END_SUPPRESS_HDF5_WARNINGS;
+   if (this_group > 0) {
+      is_database = true;
+      errf = H5Gclose(this_group);
+
+      TBOX_ASSERT(errf >= 0);
+   }
+
+   return is_database;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a new database with the specified key name.                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+Pointer<Database>
+HDFDatabase::putDatabase(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+   hid_t this_group = H5Gcreate(d_group_id,
+         key.c_str(), 0, H5P_DEFAULT, H5P_DEFAULT);
+#else
+   hid_t this_group = H5Gcreate(d_group_id, key.c_str(), 0);
+#endif
+
+   TBOX_ASSERT(this_group >= 0);
+
+   Pointer<Database> new_database(new HDFDatabase(key, this_group));
+
+   return new_database;
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Get the database with the specified key name.                        *
+ *                                                                      *
+ ************************************************************************
+ */
+
+Pointer<Database>
+HDFDatabase::getDatabase(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (!isDatabase(key)) {
+      TBOX_ERROR("HDFDatabase::getDatabase() error in database "
+         << d_database_name
+         << "\n    Key = " << key << " is not a database." << std::endl);
+   }
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+   hid_t this_group = H5Gopen(d_group_id, key.c_str(), H5P_DEFAULT);
+#else
+   hid_t this_group = H5Gopen(d_group_id, key.c_str());
+#endif
+   TBOX_ASSERT(this_group >= 0);
+
+   Pointer<Database> database(new HDFDatabase(key, this_group));
+
+   return database;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true or false depending on whether the specified key           *
+ * represents a boolean entry.  If the key does not exist, then false    *
+ * is returned.                                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool HDFDatabase::isBool(
+   const std::string& key)
+{
+   bool is_boolean = false;
+   herr_t errf;
+   NULL_USE(errf);
+
+   if (!key.empty()) {
+      hid_t this_set;
+      BEGIN_SUPPRESS_HDF5_WARNINGS;
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      this_set = H5Dopen(d_group_id, key.c_str(), H5P_DEFAULT);
+#else
+      this_set = H5Dopen(d_group_id, key.c_str());
+#endif
+      END_SUPPRESS_HDF5_WARNINGS;
+      if (this_set > 0) {
+         int type_key = readAttribute(this_set);
+         if (type_key == KEY_BOOL_ARRAY) {
+            is_boolean = true;
+         }
+         errf = H5Dclose(this_set);
+         TBOX_ASSERT(errf >= 0);
+      }
+   }
+
+   return is_boolean;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a boolean array entry in the database with the specified       *
+ * key name.                                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HDFDatabase::putBoolArray(
+   const std::string& key,
+   const bool * const data,
+   const int nelements)
+{
+   TBOX_ASSERT(!key.empty());
+   TBOX_ASSERT(data != (bool *)NULL);
+
+   herr_t errf;
+   NULL_USE(errf);
+
+   if (nelements > 0) {
+
+      hsize_t dim[1] = { nelements };
+      hid_t space = H5Screate_simple(1, dim, NULL);
+      TBOX_ASSERT(space >= 0);
+
+      /*
+       * We cannot be sure exactly what bool is because it is
+       * represented differently on different platforms, and
+       * it may have been redefined, i.e., by the Boolean
+       * type.  We are unsure what the bool is so we convert it
+       * to the native int type (H5T_NATIVE_INT) before giving
+       * it to HDF.  When we write a bool, we write it the
+       * shortest integer type we can find, the H5T_SAMRAI_BOOL
+       * type.
+       */
+      Array<int> data1(nelements);
+      for (int i = 0; i < nelements; ++i) data1[i] = data[i];
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      hid_t dataset = H5Dcreate(d_group_id, key.c_str(), H5T_SAMRAI_BOOL,
+            space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+#else
+      hid_t dataset = H5Dcreate(d_group_id, key.c_str(), H5T_SAMRAI_BOOL,
+            space, H5P_DEFAULT);
+#endif
+      TBOX_ASSERT(dataset >= 0);
+
+      errf = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
+            H5P_DEFAULT, &data1[0]);
+      TBOX_ASSERT(errf >= 0);
+
+      // Write attribute so we know what kind of data this is.
+      writeAttribute(KEY_BOOL_ARRAY, dataset);
+
+      errf = H5Sclose(space);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Dclose(dataset);
+      TBOX_ASSERT(errf >= 0);
+
+   } else {
+      TBOX_ERROR("HDFDatabase::putBoolArray() error in database "
+         << d_database_name
+         << "\n    Attempt to put zero-length array with key = "
+         << key << std::endl);
+   }
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Two routines to get boolean arrays from the database with the        *
+ * specified key name. In any case, an error message is printed and     *
+ * the program exits if the specified key does not exist in the         *
+ * database or is not associated with a boolean type.                   *
+ *                                                                      *
+ ************************************************************************
+ */
+
+Array<bool> HDFDatabase::getBoolArray(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (!isBool(key)) {
+      TBOX_ERROR("HDFDatabase::getBoolArray() error in database "
+         << d_database_name
+         << "\n    Key = " << key << " is not a bool array." << std::endl);
+   }
+
+   hid_t dset, dspace;
+   hsize_t nsel;
+   herr_t errf;
+   NULL_USE(errf);
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+   dset = H5Dopen(d_group_id, key.c_str(), H5P_DEFAULT);
+#else
+   dset = H5Dopen(d_group_id, key.c_str());
+#endif
+   TBOX_ASSERT(dset >= 0);
+
+   dspace = H5Dget_space(dset);
+   TBOX_ASSERT(dspace >= 0);
+
+   nsel = H5Sget_select_npoints(dspace);
+
+   Array<bool> bool_array(static_cast<int>(nsel));
+
+   if (nsel > 0) {
+      /*
+       * We cannot be sure exactly what bool is because it is
+       * represented differently on different platforms, and
+       * it may have been redefined, i.e., by the Boolean
+       * type.  So we read bools into native integer memory
+       * then convert.
+       */
+      Array<int> data1(static_cast<int>(nsel));
+      int* locPtr = data1.getPointer();
+      errf = H5Dread(dset,
+            H5T_NATIVE_INT,
+            H5S_ALL,
+            H5S_ALL,
+            H5P_DEFAULT,
+            locPtr);
+      TBOX_ASSERT(errf >= 0);
+
+      // Convert what was just read in.
+      for (unsigned int i = 0; i < nsel; ++i) bool_array[i] = data1[i];
+   }
+
+   errf = H5Sclose(dspace);
+   TBOX_ASSERT(errf >= 0);
+
+   errf = H5Dclose(dset);
+   TBOX_ASSERT(errf >= 0);
+
+   return bool_array;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true or false depending on whether the specified key           *
+ * represents a box entry.  If the key does not exist, then false        *
+ * is returned.                                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool HDFDatabase::isDatabaseBox(
+   const std::string& key)
+{
+   bool is_box = false;
+   herr_t errf;
+   NULL_USE(errf);
+
+   if (!key.empty()) {
+      hid_t this_set;
+      BEGIN_SUPPRESS_HDF5_WARNINGS;
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      this_set = H5Dopen(d_group_id, key.c_str(), H5P_DEFAULT);
+#else
+      this_set = H5Dopen(d_group_id, key.c_str());
+#endif
+      END_SUPPRESS_HDF5_WARNINGS;
+      if (this_set > 0) {
+         int type_key = readAttribute(this_set);
+         if (type_key == KEY_BOX_ARRAY) {
+            is_box = true;
+         }
+         errf = H5Dclose(this_set);
+         TBOX_ASSERT(errf >= 0);
+      }
+   }
+
+   return is_box;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a box array entry in the database with the specified key name. *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HDFDatabase::putDatabaseBoxArray(
+   const std::string& key,
+   const DatabaseBox * const data,
+   const int nelements)
+{
+   TBOX_ASSERT(!key.empty());
+   TBOX_ASSERT(data != (DatabaseBox *)NULL);
+
+   if (nelements > 0) {
+
+      herr_t errf;
+      NULL_USE(errf);
+
+      // Memory type
+      hid_t mtype = createCompoundDatabaseBox('n');
+      // Storage type
+      hid_t stype = createCompoundDatabaseBox('s');
+
+      hsize_t length = nelements;
+      hid_t space = H5Screate_simple(1, &length, NULL);
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      hid_t dataset =
+         H5Dcreate(d_group_id, key.c_str(), stype, space, H5P_DEFAULT,
+            H5P_DEFAULT, H5P_DEFAULT);
+#else
+      hid_t dataset =
+         H5Dcreate(d_group_id, key.c_str(), stype, space, H5P_DEFAULT);
+#endif
+      TBOX_ASSERT(dataset >= 0);
+
+      errf = H5Dwrite(dataset, mtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
+      TBOX_ASSERT(errf >= 0);
+
+      // Write attribute so we know what kind of data this is.
+      writeAttribute(KEY_BOX_ARRAY, dataset);
+
+      errf = H5Tclose(mtype);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Tclose(stype);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Sclose(space);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Dclose(dataset);
+      TBOX_ASSERT(errf >= 0);
+
+   } else {
+      TBOX_ERROR("HDFDatabase::putDatabaseBoxArray() error in database "
+         << d_database_name
+         << "\n    Attempt to put zero-length array with key = "
+         << key << std::endl);
+   }
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Two routines to get box arrays from the database with the            *
+ * specified key name. In any case, an error message is printed and     *
+ * the program exits if the specified key does not exist in the         *
+ * database or is not associated with a box type.                       *
+ *                                                                      *
+ ************************************************************************
+ */
+
+Array<DatabaseBox> HDFDatabase::getDatabaseBoxArray(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (!isDatabaseBox(key)) {
+      TBOX_ERROR("HDFDatabase::getDatabaseBoxArray() error in database "
+         << d_database_name
+         << "\n    Key = " << key << " is not a box array." << std::endl);
+   }
+
+   hid_t dset, dspace;
+   hsize_t nsel;
+   herr_t errf;
+   NULL_USE(errf);
+
+   // Memory type
+   hid_t mtype = createCompoundDatabaseBox('n');
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+   dset = H5Dopen(d_group_id, key.c_str(), H5P_DEFAULT);
+#else
+   dset = H5Dopen(d_group_id, key.c_str());
+#endif
+
+   TBOX_ASSERT(dset >= 0);
+
+   dspace = H5Dget_space(dset);
+   TBOX_ASSERT(dspace >= 0);
+
+   nsel = H5Sget_select_npoints(dspace);
+
+   Array<DatabaseBox> boxArray(static_cast<int>(nsel));
+
+   if (nsel > 0) {
+      DatabaseBox* locPtr = boxArray.getPointer();
+      errf = H5Dread(dset, mtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, locPtr);
+      TBOX_ASSERT(errf >= 0);
+
+      /*
+       * This seems a little hacky but HDF and POD stuff is making this ugly.
+       */
+      for (size_t i = 0; i < static_cast<size_t>(nsel); ++i) {
+         locPtr[i].setDim(tbox::Dimension(static_cast<unsigned short>(locPtr[i].d_data.d_dimension)));
+      }
+   }
+
+   errf = H5Tclose(mtype);
+   TBOX_ASSERT(errf >= 0);
+
+   errf = H5Sclose(dspace);
+   TBOX_ASSERT(errf >= 0);
+
+   errf = H5Dclose(dset);
+   TBOX_ASSERT(errf >= 0);
+
+   return boxArray;
+}
+
+hid_t HDFDatabase::createCompoundDatabaseBox(
+   char type_spec) const {
+
+   herr_t errf;
+   NULL_USE(errf);
+
+   hid_t int_type_spec = H5T_SAMRAI_INT;
+   switch (type_spec) {
+      case 'n':
+         // Use native type specs.
+         int_type_spec = H5T_NATIVE_INT;
+         break;
+      case 's':
+         // Use storage type specs.
+         int_type_spec = H5T_SAMRAI_INT;
+         break;
+      default:
+         TBOX_ERROR(
+         "HDFDatabase::createCompundDatabaseBox() error in database "
+         << d_database_name
+         << "\n    Unknown type specifier found. " << std::endl);
+   }
+   hid_t type = H5Tcreate(H5T_COMPOUND, sizeof(DatabaseBox));
+   TBOX_ASSERT(type >= 0);
+
+   errf = H5Tinsert(type, "dim", HOFFSET(DatabaseBox_POD, d_dimension),
+         int_type_spec);
+   TBOX_ASSERT(errf >= 0);
+
+   const hsize_t box_dim = DatabaseBox_MAX_DIM /* defined in DatabaseBox.h */;
+   insertArray(type, "lo", HOFFSET(DatabaseBox_POD, d_lo), 1, &box_dim,
+      NULL, int_type_spec);
+   insertArray(type, "hi", HOFFSET(DatabaseBox_POD, d_hi), 1, &box_dim,
+      NULL, int_type_spec);
+   return type;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true or false depending on whether the specified key           *
+ * represents a char entry.  If the key does not exist, then false       *
+ * is returned.                                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool HDFDatabase::isChar(
+   const std::string& key)
+{
+   bool is_char = false;
+   herr_t errf;
+   NULL_USE(errf);
+
+   if (!key.empty()) {
+      hid_t this_set;
+      BEGIN_SUPPRESS_HDF5_WARNINGS;
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      this_set = H5Dopen(d_group_id, key.c_str(), H5P_DEFAULT);
+#else
+      this_set = H5Dopen(d_group_id, key.c_str());
+#endif
+      END_SUPPRESS_HDF5_WARNINGS;
+      if (this_set > 0) {
+         int type_key = readAttribute(this_set);
+         if (type_key == KEY_CHAR_ARRAY) {
+            is_char = true;
+         }
+         errf = H5Dclose(this_set);
+         TBOX_ASSERT(errf >= 0);
+      }
+   }
+
+   return is_char;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a char array entry in the database with the specified          *
+ * key name. The charentry is defined by the hdf type H5T_C_S1.          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HDFDatabase::putCharArray(
+   const std::string& key,
+   const char * const data,
+   const int nelements)
+{
+   TBOX_ASSERT(!key.empty());
+   TBOX_ASSERT(data != (char *)NULL);
+
+   herr_t errf;
+   NULL_USE(errf);
+
+   if (nelements > 0) {
+
+      hid_t atype, space, dataset;
+
+      char* local_buf = new char[nelements];
+
+      atype = H5Tcopy(H5T_C_S1);
+      TBOX_ASSERT(atype >= 0);
+
+      errf = H5Tset_size(atype, nelements);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Tset_strpad(atype, H5T_STR_NULLTERM);
+      TBOX_ASSERT(errf >= 0);
+
+      for (int i = 0; i < nelements; i++) {
+         local_buf[i] = data[i];
+      }
+
+      space = H5Screate(H5S_SCALAR);
+      TBOX_ASSERT(space >= 0);
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      dataset = H5Dcreate(d_group_id, key.c_str(), atype, space,
+            H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+#else
+      dataset = H5Dcreate(d_group_id, key.c_str(), atype, space,
+            H5P_DEFAULT);
+#endif
+      TBOX_ASSERT(dataset >= 0);
+
+      errf = H5Dwrite(dataset, atype, H5S_ALL, H5S_ALL,
+            H5P_DEFAULT, local_buf);
+      TBOX_ASSERT(errf >= 0);
+
+      // Write attribute so we know what kind of data this is.
+      writeAttribute(KEY_CHAR_ARRAY, dataset);
+
+      errf = H5Sclose(space);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Tclose(atype);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Dclose(dataset);
+      TBOX_ASSERT(errf >= 0);
+
+      delete[] local_buf;
+
+   } else {
+      TBOX_ERROR("HDFDatabase::putCharArray() error in database "
+         << d_database_name
+         << "\n    Attempt to put zero-length array with key = "
+         << key << std::endl);
+   }
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Two routines to get char arrays from the database with the           *
+ * specified key name. In any case, an error message is printed and     *
+ * the program exits if the specified key does not exist in the         *
+ * database or is not associated with a char type.                      *
+ *                                                                      *
+ ************************************************************************
+ */
+
+Array<char> HDFDatabase::getCharArray(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (!isChar(key)) {
+      TBOX_ERROR("HDFDatabase::getCharArray() error in database "
+         << d_database_name
+         << "\n    Key = " << key << " is not a char array." << std::endl);
+   }
+
+   hid_t dset, dspace, dtype;
+   size_t nsel = 0;
+   herr_t errf;
+   NULL_USE(errf);
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+   dset = H5Dopen(d_group_id, key.c_str(), H5P_DEFAULT);
+#else
+   dset = H5Dopen(d_group_id, key.c_str());
+#endif
+   TBOX_ASSERT(dset >= 0);
+
+   dspace = H5Dget_space(dset);
+   TBOX_ASSERT(dspace >= 0);
+
+   dtype = H5Dget_type(dset);
+   TBOX_ASSERT(dtype >= 0);
+
+   nsel = H5Tget_size(dtype);
+
+   Array<char> charArray(static_cast<int>(nsel));
+
+   if (nsel > 0) {
+      char* locPtr = charArray.getPointer();
+      errf = H5Dread(dset, dtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, locPtr);
+      TBOX_ASSERT(errf >= 0);
+   }
+
+   errf = H5Sclose(dspace);
+   TBOX_ASSERT(errf >= 0);
+
+   errf = H5Tclose(dtype);
+   TBOX_ASSERT(errf >= 0);
+
+   errf = H5Dclose(dset);
+   TBOX_ASSERT(errf >= 0);
+
+   return charArray;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true or false depending on whether the specified key           *
+ * represents a complex entry.  If the key does not exist, then false    *
+ * is returned.                                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool HDFDatabase::isComplex(
+   const std::string& key)
+{
+   bool is_complex = false;
+   herr_t errf;
+   NULL_USE(errf);
+
+   if (!key.empty()) {
+      hid_t this_set;
+      BEGIN_SUPPRESS_HDF5_WARNINGS;
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      this_set = H5Dopen(d_group_id, key.c_str(), H5P_DEFAULT);
+#else
+      this_set = H5Dopen(d_group_id, key.c_str());
+#endif
+      END_SUPPRESS_HDF5_WARNINGS;
+      if (this_set > 0) {
+         int type_key = readAttribute(this_set);
+         if (type_key == KEY_COMPLEX_ARRAY) {
+            is_complex = true;
+         }
+         errf = H5Dclose(this_set);
+         TBOX_ASSERT(errf >= 0);
+      }
+   }
+
+   return is_complex;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a complex array entry in the database with the specified       *
+ * key name.  The complex array is a compound type based on the hdf      *
+ * type H5T_NATIVE_DOUBLE (for real and imag parts).                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HDFDatabase::putComplexArray(
+   const std::string& key,
+   const dcomplex * const data,
+   const int nelements)
+{
+   TBOX_ASSERT(!key.empty());
+   TBOX_ASSERT(data != (dcomplex *)NULL);
+
+   herr_t errf;
+   NULL_USE(errf);
+
+   if (nelements > 0) {
+
+      hid_t space, dataset;
+
+      // Memory type
+      hid_t mtype = createCompoundComplex('n');
+      // Storage type
+      hid_t stype = createCompoundComplex('s');
+
+      hsize_t dim[] = { nelements };
+      space = H5Screate_simple(1, dim, NULL);
+      TBOX_ASSERT(space >= 0);
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      dataset = H5Dcreate(d_group_id, key.c_str(), stype, space,
+            H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+#else
+      dataset = H5Dcreate(d_group_id, key.c_str(), stype, space,
+            H5P_DEFAULT);
+#endif
+      TBOX_ASSERT(dataset >= 0);
+
+      errf = H5Dwrite(dataset, mtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
+      TBOX_ASSERT(errf >= 0);
+
+      // Write attribute so we know what kind of data this is.
+      writeAttribute(KEY_COMPLEX_ARRAY, dataset);
+
+      errf = H5Tclose(mtype);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Tclose(stype);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Sclose(space);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Dclose(dataset);
+      TBOX_ASSERT(errf >= 0);
+
+   } else {
+      TBOX_ERROR("HDFDatabase::putComplexArray() error in database "
+         << d_database_name
+         << "\n    Attempt to put zero-length array with key = "
+         << key << std::endl);
+   }
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Two routines to get complex arrays from the database with the        *
+ * specified key name. In any case, an error message is printed and     *
+ * the program exits if the specified key does not exist in the         *
+ * database or is not associated with a complex type.                   *
+ *                                                                      *
+ ************************************************************************
+ */
+
+Array<dcomplex> HDFDatabase::getComplexArray(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   herr_t errf;
+   NULL_USE(errf);
+
+   if (!isComplex(key)) {
+      TBOX_ERROR("HDFDatabase::getComplexArray() error in database "
+         << d_database_name
+         << "\n    Key = " << key << " is not a complex array." << std::endl);
+   }
+
+   hid_t dset, dspace;
+   hsize_t nsel;
+
+   // Memory type
+   hid_t mtype = createCompoundComplex('n');
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+   dset = H5Dopen(d_group_id, key.c_str(), H5P_DEFAULT);
+#else
+   dset = H5Dopen(d_group_id, key.c_str());
+#endif
+   TBOX_ASSERT(dset >= 0);
+
+   dspace = H5Dget_space(dset);
+   TBOX_ASSERT(dspace >= 0);
+
+   nsel = H5Sget_select_npoints(dspace);
+
+   Array<dcomplex> complexArray(static_cast<int>(nsel));
+
+   if (nsel > 0) {
+      dcomplex* locPtr = complexArray.getPointer();
+      errf = H5Dread(dset, mtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, locPtr);
+      TBOX_ASSERT(errf >= 0);
+   }
+
+   errf = H5Tclose(mtype);
+   TBOX_ASSERT(errf >= 0);
+
+   errf = H5Sclose(dspace);
+   TBOX_ASSERT(errf >= 0);
+
+   errf = H5Dclose(dset);
+   TBOX_ASSERT(errf >= 0);
+
+   return complexArray;
+}
+
+hid_t HDFDatabase::createCompoundComplex(
+   char type_spec) const {
+
+   herr_t errf;
+   NULL_USE(errf);
+
+   hid_t double_type_spec = H5T_SAMRAI_DOUBLE;
+   switch (type_spec) {
+      case 'n':
+         // Use native type specs.
+         double_type_spec = H5T_NATIVE_DOUBLE;
+         break;
+      case 's':
+         // Use storage type specs.
+         double_type_spec = H5T_SAMRAI_DOUBLE;
+         break;
+      default:
+         TBOX_ERROR("HDFDatabase::createCompundComplex() error in database "
+         << d_database_name
+         << "\n    Unknown type specifier found. " << std::endl);
+   }
+   hid_t type = H5Tcreate(H5T_COMPOUND, sizeof(dcomplex));
+   TBOX_ASSERT(type >= 0);
+
+   errf = H5Tinsert(type, "real", HOFFSET(hdf_complex, re), double_type_spec);
+   TBOX_ASSERT(errf >= 0);
+
+   errf = H5Tinsert(type, "imag", HOFFSET(hdf_complex, im), double_type_spec);
+   TBOX_ASSERT(errf >= 0);
+
+   return type;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true or false depending on whether the specified key           *
+ * represents a double entry.  If the key does not exist, then false     *
+ * is returned.                                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool HDFDatabase::isDouble(
+   const std::string& key)
+{
+   bool is_double = false;
+
+   herr_t errf;
+   NULL_USE(errf);
+
+   if (!key.empty()) {
+      hid_t this_set;
+      BEGIN_SUPPRESS_HDF5_WARNINGS;
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      this_set = H5Dopen(d_group_id, key.c_str(), H5P_DEFAULT);
+#else
+      this_set = H5Dopen(d_group_id, key.c_str());
+#endif
+      END_SUPPRESS_HDF5_WARNINGS;
+      if (this_set > 0) {
+         int type_key = readAttribute(this_set);
+         if (type_key == KEY_DOUBLE_ARRAY) {
+            is_double = true;
+         }
+         errf = H5Dclose(this_set);
+         TBOX_ASSERT(errf >= 0);
+      }
+   }
+
+   return is_double;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a double array entry in the database with the specified        *
+ * key name.  The array type is based on the hdf type H5T_NATIVE_HDOUBLE.*
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HDFDatabase::putDoubleArray(
+   const std::string& key,
+   const double * const data,
+   const int nelements)
+{
+   TBOX_ASSERT(!key.empty());
+   TBOX_ASSERT(data != (double *)NULL);
+
+   herr_t errf;
+   NULL_USE(errf);
+
+   if (nelements > 0) {
+
+      hsize_t dim[] = { nelements };
+      hid_t space = H5Screate_simple(1, dim, NULL);
+      TBOX_ASSERT(space >= 0);
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      hid_t dataset = H5Dcreate(d_group_id, key.c_str(), H5T_SAMRAI_DOUBLE,
+            space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+#else
+      hid_t dataset = H5Dcreate(d_group_id, key.c_str(), H5T_SAMRAI_DOUBLE,
+            space, H5P_DEFAULT);
+#endif
+      TBOX_ASSERT(dataset >= 0);
+
+      errf = H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL,
+            H5P_DEFAULT, data);
+      TBOX_ASSERT(errf >= 0);
+
+      // Write attribute so we know what kind of data this is.
+      writeAttribute(KEY_DOUBLE_ARRAY, dataset);
+
+      errf = H5Sclose(space);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Dclose(dataset);
+      TBOX_ASSERT(errf >= 0);
+
+   } else {
+      TBOX_ERROR("HDFDatabase::putDoubleArray() error in database "
+         << d_database_name
+         << "\n    Attempt to put zero-length array with key = "
+         << key << std::endl);
+   }
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Two routines to get double arrays from the database with the         *
+ * specified key name. In any case, an error message is printed and     *
+ * the program exits if the specified key does not exist in the         *
+ * database or is not associated with a double type.                    *
+ *                                                                      *
+ ************************************************************************
+ */
+
+Array<double> HDFDatabase::getDoubleArray(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   herr_t errf;
+   NULL_USE(errf);
+
+   if (!isDouble(key)) {
+      TBOX_ERROR("HDFDatabase::getDoubleArray() error in database "
+         << d_database_name
+         << "\n    Key = " << key << " is not a double array." << std::endl);
+   }
+
+   hid_t dset, dspace;
+   hsize_t nsel;
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+   dset = H5Dopen(d_group_id, key.c_str(), H5P_DEFAULT);
+#else
+   dset = H5Dopen(d_group_id, key.c_str());
+#endif
+   TBOX_ASSERT(dset >= 0);
+
+   dspace = H5Dget_space(dset);
+   TBOX_ASSERT(dspace >= 0);
+
+   nsel = H5Sget_select_npoints(dspace);
+
+   Array<double> doubleArray(static_cast<int>(nsel));
+
+   if (nsel > 0) {
+      double* locPtr = doubleArray.getPointer();
+      errf = H5Dread(dset, H5T_NATIVE_DOUBLE,
+            H5S_ALL, H5S_ALL, H5P_DEFAULT, locPtr);
+      TBOX_ASSERT(errf >= 0);
+   }
+
+   errf = H5Sclose(dspace);
+   TBOX_ASSERT(errf >= 0);
+
+   errf = H5Dclose(dset);
+   TBOX_ASSERT(errf >= 0);
+
+   return doubleArray;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true or false depending on whether the specified key           *
+ * represents a float entry.  If the key does not exist, then false      *
+ * is returned.                                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool HDFDatabase::isFloat(
+   const std::string& key)
+{
+   bool is_float = false;
+   herr_t errf;
+   NULL_USE(errf);
+
+   if (!key.empty()) {
+      hid_t this_set;
+      BEGIN_SUPPRESS_HDF5_WARNINGS;
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      this_set = H5Dopen(d_group_id, key.c_str(), H5P_DEFAULT);
+#else
+      this_set = H5Dopen(d_group_id, key.c_str());
+#endif
+      END_SUPPRESS_HDF5_WARNINGS;
+      if (this_set > 0) {
+         int type_key = readAttribute(this_set);
+         if (type_key == KEY_FLOAT_ARRAY) {
+            is_float = true;
+         }
+         errf = H5Dclose(this_set);
+         TBOX_ASSERT(errf >= 0);
+      }
+   }
+
+   return is_float;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a float array entry in the database with the specified         *
+ * key name.  The array type is based on the hdf type H5T_NATIVE_HFLOAT. *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HDFDatabase::putFloatArray(
+   const std::string& key,
+   const float * const data,
+   const int nelements)
+{
+   TBOX_ASSERT(!key.empty());
+   TBOX_ASSERT(data != (float *)NULL);
+
+   herr_t errf;
+   NULL_USE(errf);
+
+   if (nelements > 0) {
+
+      hsize_t dim[] = { nelements };
+      hid_t space = H5Screate_simple(1, dim, NULL);
+      TBOX_ASSERT(space >= 0);
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      hid_t dataset = H5Dcreate(d_group_id, key.c_str(), H5T_SAMRAI_FLOAT,
+            space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+#else
+      hid_t dataset = H5Dcreate(d_group_id, key.c_str(), H5T_SAMRAI_FLOAT,
+            space, H5P_DEFAULT);
+#endif
+
+      TBOX_ASSERT(dataset >= 0);
+
+      errf = H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL,
+            H5P_DEFAULT, data);
+      TBOX_ASSERT(errf >= 0);
+
+      // Write attribute so we know what kind of data this is.
+      writeAttribute(KEY_FLOAT_ARRAY, dataset);
+
+      errf = H5Sclose(space);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Dclose(dataset);
+      TBOX_ASSERT(errf >= 0);
+
+   } else {
+      TBOX_ERROR("HDFDatabase::putFloatArray() error in database "
+         << d_database_name
+         << "\n    Attempt to put zero-length array with key = "
+         << key << std::endl);
+   }
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Two routines to get float arrays from the database with the          *
+ * specified key name. In any case, an error message is printed and     *
+ * the program exits if the specified key does not exist in the         *
+ * database or is not associated with a float type.                     *
+ *                                                                      *
+ ************************************************************************
+ */
+
+Array<float> HDFDatabase::getFloatArray(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   herr_t errf;
+   NULL_USE(errf);
+
+   if (!isFloat(key)) {
+      TBOX_ERROR("HDFDatabase::getFloatArray() error in database "
+         << d_database_name
+         << "\n    Key = " << key << " is not a float array." << std::endl);
+   }
+
+   hid_t dset, dspace;
+   hsize_t nsel;
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+   dset = H5Dopen(d_group_id, key.c_str(), H5P_DEFAULT);
+#else
+   dset = H5Dopen(d_group_id, key.c_str());
+#endif
+
+   TBOX_ASSERT(dset >= 0);
+
+   dspace = H5Dget_space(dset);
+   TBOX_ASSERT(dspace >= 0);
+   nsel = H5Sget_select_npoints(dspace);
+
+   Array<float> floatArray(static_cast<int>(nsel));
+
+   if (nsel > 0) {
+      float* locPtr = floatArray.getPointer();
+      errf = H5Dread(dset, H5T_NATIVE_FLOAT,
+            H5S_ALL, H5S_ALL, H5P_DEFAULT, locPtr);
+      TBOX_ASSERT(errf >= 0);
+   }
+
+   errf = H5Sclose(dspace);
+   TBOX_ASSERT(errf >= 0);
+
+   errf = H5Dclose(dset);
+   TBOX_ASSERT(errf >= 0);
+
+   return floatArray;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true or false depending on whether the specified key           *
+ * represents a integer entry.  If the key does not exist, then false    *
+ * is returned.                                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool HDFDatabase::isInteger(
+   const std::string& key)
+{
+   bool is_int = false;
+   herr_t errf;
+   NULL_USE(errf);
+
+   if (!key.empty()) {
+      hid_t this_set;
+      BEGIN_SUPPRESS_HDF5_WARNINGS;
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      this_set = H5Dopen(d_group_id, key.c_str(), H5P_DEFAULT);
+#else
+      this_set = H5Dopen(d_group_id, key.c_str());
+#endif
+      END_SUPPRESS_HDF5_WARNINGS;
+      if (this_set > 0) {
+         int type_key = readAttribute(this_set);
+         if (type_key == KEY_INT_ARRAY) {
+            is_int = true;
+         }
+
+         errf = H5Dclose(this_set);
+         TBOX_ASSERT(errf >= 0);
+      }
+   }
+
+   return is_int;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create an integer array entry in the database with the specified      *
+ * key name.  The array type is based on the hdf type H5T_NATIVE_HINT.   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HDFDatabase::putIntegerArray(
+   const std::string& key,
+   const int * const data,
+   const int nelements)
+{
+   TBOX_ASSERT(!key.empty());
+   TBOX_ASSERT(data != (int *)NULL);
+
+   herr_t errf;
+   NULL_USE(errf);
+
+   if (nelements > 0) {
+
+      hsize_t dim[] = { nelements };
+      hid_t space = H5Screate_simple(1, dim, NULL);
+      TBOX_ASSERT(space >= 0);
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      hid_t dataset = H5Dcreate(d_group_id, key.c_str(), H5T_SAMRAI_INT,
+            space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+#else
+      hid_t dataset = H5Dcreate(d_group_id, key.c_str(), H5T_SAMRAI_INT,
+            space, H5P_DEFAULT);
+#endif
+      TBOX_ASSERT(dataset >= 0);
+
+      errf = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
+            H5P_DEFAULT, data);
+      TBOX_ASSERT(errf >= 0);
+
+      // Write attribute so we know what kind of data this is.
+      writeAttribute(KEY_INT_ARRAY, dataset);
+
+      errf = H5Sclose(space);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Dclose(dataset);
+      TBOX_ASSERT(errf >= 0);
+
+   } else {
+      TBOX_ERROR("HDFDatabase::putIntegerArray() error in database "
+         << d_database_name
+         << "\n    Attempt to put zero-length array with key = "
+         << key << std::endl);
+   }
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Two routines to get integer arrays from the database with the        *
+ * specified key name. In any case, an error message is printed and     *
+ * the program exits if the specified key does not exist in the         *
+ * database or is not associated with a integer type.                   *
+ *                                                                      *
+ ************************************************************************
+ */
+
+Array<int> HDFDatabase::getIntegerArray(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   herr_t errf;
+   NULL_USE(errf);
+
+   if (!isInteger(key)) {
+      TBOX_ERROR("HDFDatabase::getIntegerArray() error in database "
+         << d_database_name
+         << "\n    Key = " << key << " is not an integer array." << std::endl);
+   }
+
+   hid_t dset, dspace;
+   hsize_t nsel;
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+   dset = H5Dopen(d_group_id, key.c_str(), H5P_DEFAULT);
+#else
+   dset = H5Dopen(d_group_id, key.c_str());
+#endif
+   TBOX_ASSERT(dset >= 0);
+
+   dspace = H5Dget_space(dset);
+   TBOX_ASSERT(dspace >= 0);
+
+   nsel = H5Sget_select_npoints(dspace);
+
+   Array<int> intArray(static_cast<int>(nsel));
+
+   if (nsel > 0) {
+      int* locPtr = intArray.getPointer();
+      errf = H5Dread(dset, H5T_NATIVE_INT,
+            H5S_ALL, H5S_ALL, H5P_DEFAULT, locPtr);
+      TBOX_ASSERT(errf >= 0);
+
+   }
+
+   errf = H5Sclose(dspace);
+   TBOX_ASSERT(errf >= 0);
+
+   errf = H5Dclose(dset);
+   TBOX_ASSERT(errf >= 0);
+
+   return intArray;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true or false depending on whether the specified key           *
+ * represents a string entry.  If the key does not exist, then false     *
+ * is returned.                                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool HDFDatabase::isString(
+   const std::string& key)
+{
+   bool is_string = false;
+   herr_t errf;
+   NULL_USE(errf);
+
+   if (!key.empty()) {
+      hid_t this_set;
+      BEGIN_SUPPRESS_HDF5_WARNINGS;
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      this_set = H5Dopen(d_group_id, key.c_str(), H5P_DEFAULT);
+#else
+      this_set = H5Dopen(d_group_id, key.c_str());
+#endif
+      END_SUPPRESS_HDF5_WARNINGS;
+      if (this_set > 0) {
+         int type_key = readAttribute(this_set);
+         if (type_key == KEY_STRING_ARRAY) {
+            is_string = true;
+         }
+         errf = H5Dclose(this_set);
+         TBOX_ASSERT(errf >= 0);
+      }
+   }
+
+   return is_string;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a double array entry in the database with the specified        *
+ * key name.  The array type is based on the hdf type H5T_C_S1.          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HDFDatabase::putStringArray(
+   const std::string& key,
+   const std::string * const data,
+   const int nelements)
+{
+   TBOX_ASSERT(!key.empty());
+   TBOX_ASSERT(data != (std::string *)NULL);
+
+   herr_t errf;
+   NULL_USE(errf);
+
+   if (nelements > 0) {
+
+      int maxlen = 0;
+      int current, data_size;
+      int i;
+      for (i = 0; i < nelements; i++) {
+         current = static_cast<int>(data[i].size());
+         if (current > maxlen) maxlen = current;
+      }
+
+      char* local_buf = new char[nelements * (maxlen + 1)];
+      for (i = 0; i < nelements; i++) {
+         strcpy(&local_buf[i * (maxlen + 1)], data[i].c_str());
+         data_size = static_cast<int>(data[i].size());
+         if (data_size < maxlen) {
+            memset(&local_buf[i * (maxlen + 1)] + data_size + 1, 0,
+               maxlen - data_size);
+         }
+      }
+
+      hid_t atype = H5Tcopy(H5T_C_S1);
+      TBOX_ASSERT(atype >= 0);
+
+      errf = H5Tset_size(atype, maxlen + 1);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Tset_strpad(atype, H5T_STR_NULLTERM);
+      TBOX_ASSERT(errf >= 0);
+
+      hsize_t dim[] = { nelements };
+      hid_t space = H5Screate_simple(1, dim, NULL);
+      TBOX_ASSERT(space >= 0);
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      hid_t dataset = H5Dcreate(d_group_id, key.c_str(),
+            atype, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+#else
+      hid_t dataset = H5Dcreate(d_group_id, key.c_str(),
+            atype, space, H5P_DEFAULT);
+#endif
+      TBOX_ASSERT(dataset >= 0);
+
+      errf = H5Dwrite(dataset, atype, H5S_ALL, H5S_ALL,
+            H5P_DEFAULT, local_buf);
+      TBOX_ASSERT(errf >= 0);
+
+      // Write attribute so we know what kind of data this is.
+      writeAttribute(KEY_STRING_ARRAY, dataset);
+
+      errf = H5Sclose(space);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Tclose(atype);
+      TBOX_ASSERT(errf >= 0);
+
+      errf = H5Dclose(dataset);
+      TBOX_ASSERT(errf >= 0);
+
+      delete[] local_buf;
+
+   } else {
+      TBOX_ERROR("HDFDatabase::putStringArray() error in database "
+         << d_database_name
+         << "\n    Attempt to put zero-length array with key = "
+         << key << std::endl);
+   }
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Two routines to get string arrays from the database with the         *
+ * specified key name. In any case, an error message is printed and     *
+ * the program exits if the specified key does not exist in the         *
+ * database or is not associated with a string type.                    *
+ *                                                                      *
+ ************************************************************************
+ */
+
+Array<std::string> HDFDatabase::getStringArray(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   herr_t errf;
+   NULL_USE(errf);
+
+   if (!isString(key)) {
+      TBOX_ERROR("HDFDatabase::getStringArray() error in database "
+         << d_database_name
+         << "\n    Key = " << key << " is not a string array." << std::endl);
+   }
+
+   hsize_t nsel;
+   size_t dsize;
+   hid_t dset, dspace, dtype;
+   char* local_buf;
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+   dset = H5Dopen(d_group_id, key.c_str(), H5P_DEFAULT);
+#else
+   dset = H5Dopen(d_group_id, key.c_str());
+#endif
+   TBOX_ASSERT(dset >= 0);
+
+   dspace = H5Dget_space(dset);
+   TBOX_ASSERT(dspace >= 0);
+
+   dtype = H5Dget_type(dset);
+   TBOX_ASSERT(dtype >= 0);
+
+   dsize = H5Tget_size(dtype);
+   nsel = H5Sget_select_npoints(dspace);
+
+   local_buf = new char[nsel * dsize];
+
+   errf = H5Dread(dset, dtype, H5S_ALL, H5S_ALL, H5P_DEFAULT, local_buf);
+   TBOX_ASSERT(errf >= 0);
+
+   Array<std::string> stringArray(static_cast<int>(nsel));
+
+   for (int i = 0; i < static_cast<int>(nsel); i++) {
+      std::string* locPtr = stringArray.getPointer(i);
+      *locPtr = &local_buf[i * dsize];
+   }
+
+   errf = H5Sclose(dspace);
+   TBOX_ASSERT(errf >= 0);
+
+   errf = H5Tclose(dtype);
+   TBOX_ASSERT(errf >= 0);
+
+   errf = H5Dclose(dset);
+   TBOX_ASSERT(errf >= 0);
+
+   delete[] local_buf;
+   return stringArray;
+}
+
+void HDFDatabase::writeAttribute(
+   int type_key,
+   hid_t dataset_id)
+{
+   herr_t errf;
+   NULL_USE(errf);
+
+   hid_t attr_id = H5Screate(H5S_SCALAR);
+   TBOX_ASSERT(attr_id >= 0);
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+   hid_t attr = H5Acreate(dataset_id, "Type", H5T_SAMRAI_ATTR,
+         attr_id, H5P_DEFAULT, H5P_DEFAULT);
+#else
+   hid_t attr = H5Acreate(dataset_id, "Type", H5T_SAMRAI_ATTR,
+         attr_id, H5P_DEFAULT);
+#endif
+   TBOX_ASSERT(attr >= 0);
+
+   errf = H5Awrite(attr, H5T_NATIVE_INT, &type_key);
+   TBOX_ASSERT(errf >= 0);
+
+   errf = H5Aclose(attr);
+   TBOX_ASSERT(errf >= 0);
+
+   errf = H5Sclose(attr_id);
+   TBOX_ASSERT(errf >= 0);
+}
+
+int HDFDatabase::readAttribute(
+   hid_t dataset_id)
+{
+   herr_t errf;
+   NULL_USE(errf);
+
+   hid_t attr = H5Aopen_name(dataset_id, "Type");
+   TBOX_ASSERT(attr >= 0);
+
+   int type_key;
+   errf = H5Aread(attr, H5T_NATIVE_INT, &type_key);
+   TBOX_ASSERT(errf >= 0);
+
+   errf = H5Aclose(attr);
+   TBOX_ASSERT(errf >= 0);
+
+   return type_key;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print contents of current database to the specified output stream.    *
+ * Note that contents of subdatabases will not be printed.  This must    *
+ * be done by iterating through all the subdatabases individually.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HDFDatabase::printClassData(
+   std::ostream& os)
+{
+
+   performKeySearch();
+
+   if (d_keydata.getNumberOfItems() == 0) {
+      os << "Database named `" << d_database_name
+         << "' has zero keys..." << std::endl;
+   } else {
+      os << "Printing contents of database named `"
+         << d_database_name << "'..." << std::endl;
+   }
+
+   for (List<KeyData>::Iterator i(d_keydata); i; i++) {
+      int t = i().d_type;
+      switch (tbox::MathUtilities<int>::Abs(t)) {
+         case KEY_DATABASE: {
+            os << "   Data entry `" << i().d_key << "' is"
+               << " a database" << std::endl;
+            break;
+         }
+         case KEY_BOOL_ARRAY: {
+            os << "   Data entry `" << i().d_key << "' is" << " a boolean ";
+            os << ((t < 0) ? "scalar" : "array") << std::endl;
+            break;
+         }
+         case KEY_BOX_ARRAY: {
+            os << "   Data entry `" << i().d_key << "' is" << " a box ";
+            os << ((t < 0) ? "scalar" : "array") << std::endl;
+            break;
+         }
+         case KEY_CHAR_ARRAY: {
+            os << "   Data entry `" << i().d_key << "' is" << " a char ";
+            os << ((t < 0) ? "scalar" : "array") << std::endl;
+            break;
+         }
+         case KEY_COMPLEX_ARRAY: {
+            os << "   Data entry `" << i().d_key << "' is" << " a complex ";
+            os << ((t < 0) ? "scalar" : "array") << std::endl;
+            break;
+         }
+         case KEY_DOUBLE_ARRAY: {
+            os << "   Data entry `" << i().d_key << "' is" << " a double ";
+            os << ((t < 0) ? "scalar" : "array") << std::endl;
+            break;
+         }
+         case KEY_FLOAT_ARRAY: {
+            os << "   Data entry `" << i().d_key << "' is" << " a float ";
+            os << ((t < 0) ? "scalar" : "array") << std::endl;
+            break;
+         }
+         case KEY_INT_ARRAY: {
+            os << "   Data entry `" << i().d_key << "' is" << " an integer ";
+            os << ((t < 0) ? "scalar" : "array") << std::endl;
+            break;
+         }
+         case KEY_STRING_ARRAY: {
+            os << "   Data entry `" << i().d_key << "' is" << " a string ";
+            os << ((t < 0) ? "scalar" : "array") << std::endl;
+            break;
+         }
+         default: {
+            TBOX_ERROR("HDFDatabase::printClassData error....\n"
+               << "   Unable to identify key = " << i().d_key
+               << " as a known group or dataset" << std::endl);
+         }
+      }
+   }
+
+   cleanupKeySearch();
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create HDF data file specified by name.                               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool HDFDatabase::create(
+   const std::string& name)
+{
+   TBOX_ASSERT(!name.empty());
+
+   bool status = false;
+
+   hid_t file_id = 0;
+
+   file_id = H5Fcreate(name.c_str(), H5F_ACC_TRUNC,
+         H5P_DEFAULT, H5P_DEFAULT);
+   if (file_id < 0) {
+      TBOX_ERROR("Unable to open HDF5 file " << name << "\n");
+      status = false;
+   } else {
+      status = true;
+      d_is_file = true;
+      d_group_id = file_id;
+      d_file_id = file_id;
+   }
+
+   return status;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Open HDF data file specified by name                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool HDFDatabase::open(
+   const std::string& name) {
+   TBOX_ASSERT(!name.empty());
+
+   bool status = false;
+
+   hid_t file_id = 0;
+
+   file_id = H5Fopen(name.c_str(), H5F_ACC_RDWR, H5P_DEFAULT);
+   if (file_id < 0) {
+      TBOX_ERROR("Unable to open HDF5 file " << name << "\n");
+      status = false;
+   } else {
+      status = true;
+      d_is_file = true;
+      d_group_id = file_id;
+      d_file_id = file_id;
+   }
+
+   return status;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Close the open HDF data file specified by d_file_id.                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool HDFDatabase::close()
+{
+   herr_t errf = 0;
+   NULL_USE(errf);
+
+   if (d_is_file) {
+      errf = H5Fclose(d_file_id);
+      TBOX_ASSERT(errf >= 0);
+
+      if (d_group_id == d_file_id) {
+         d_group_id = -1;
+      }
+      d_file_id = -1;
+      d_is_file = false;
+   }
+
+   if (errf >= 0) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private helper function for writing arrays in HDF5.  This function    *
+ * was deprecated in HDF5 1.4.  We replicate it here since it makes      *
+ * arrays easier to use in this database class.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HDFDatabase::insertArray(
+   hid_t parent_id,
+   const char* name,
+   size_t offset,
+   int ndims,
+   const hsize_t dim[] /*ndims*/,
+   const int* perm,
+   hid_t member_id) const
+{
+   herr_t errf;
+   NULL_USE(errf);
+   NULL_USE(perm);
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 2))
+
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+   hid_t array = H5Tarray_create(member_id, ndims, dim);
+#else
+   /*
+    * Note that perm is NOT used by HDF, see HDF documentation.
+    */
+   hid_t array = H5Tarray_create(member_id, ndims, dim, perm);
+#endif
+   TBOX_ASSERT(array >= 0);
+
+   errf = H5Tinsert(parent_id, name, offset, array);
+   TBOX_ASSERT(errf >= 0);
+
+   errf = H5Tclose(array);
+   TBOX_ASSERT(errf >= 0);
+
+#else
+   size_t newdim[H5S_MAX_RANK];
+   for (int i = 0; i < ndims; i++) {
+      newdim[i] = dim[i];
+   }
+
+   errf = H5Tinsert_array(parent_id,
+         name,
+         offset,
+         ndims,
+         newdim,
+         perm,
+         member_id);
+   TBOX_ASSERT(errf >= 0);
+#endif
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private helper function for searching database keys.                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HDFDatabase::performKeySearch()
+{
+   herr_t errf;
+   NULL_USE(errf);
+
+   if (d_is_file) {
+      d_group_to_search = "/";
+      d_top_level_search_group = "/";
+      d_found_group = 1;
+   } else {
+      d_group_to_search = d_database_name;
+      d_top_level_search_group = std::string();
+      d_found_group = 0;
+   }
+
+   d_still_searching = 1;
+
+   errf = H5Giterate(d_group_id, "/", NULL,
+         HDFDatabase::iterateKeys, (void *)this);
+   TBOX_ASSERT(errf >= 0);
+}
+
+void HDFDatabase::cleanupKeySearch()
+{
+   d_top_level_search_group = std::string();
+   d_group_to_search = std::string();
+   d_still_searching = 0;
+   d_found_group = 0;
+
+   d_keydata.clearItems();
+}
+
+/*
+ *************************************************************************
+ * Attach to an already created HDF file.
+ *************************************************************************
+ */
+bool HDFDatabase::attachToFile(
+   hid_t group_id)
+{
+   bool status = false;
+
+   if (group_id > 0) {
+      status = true;
+      d_is_file = false;
+      d_file_id = -1;
+      d_group_id = group_id;
+   } else {
+      TBOX_ERROR("HDFDatabase: Invalid fileid supplied to attachToFile"
+         << std::endl);
+      status = false;
+   }
+
+   return status;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Public method to return the group_id so VisIt can access an           *
+ * object's HDF database.                                                *
+ *                                                                       *
+ *************************************************************************
+ */
+hid_t HDFDatabase::getGroupId()
+{
+   return d_group_id;
+}
+
+std::string HDFDatabase::getName(
+   void)
+{
+   return d_database_name;
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Unsuppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/HDFDatabase.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/HDFDatabase.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,674 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A database structure that stores HDF5 format data. 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_HDFDatabase
+#define included_tbox_HDFDatabase
+
+#include "SAMRAI/SAMRAI_config.h"
+
+/*
+ ************************************************************************
+ *  THIS CLASS WILL BE UNDEFINED IF THE LIBRARY IS BUILT WITHOUT HDF5
+ ************************************************************************
+ */
+#ifdef HAVE_HDF5
+
+#define TBOX_HDFDATABSE_MAX_DIMENSION (3)
+
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/DatabaseBox.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/List.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/PIO.h"
+
+#ifdef RCSID
+#undef RCSID
+#endif
+#include "hdf5.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * Class HDFDatabase implements the interface of the Database
+ * class to store data in the HDF5 (Hierarchical Data Format) data format.
+ *
+ * It is assumed that all processors will access the database in the same
+ * manner.  Error reporting is done using the SAMRAI error reporting macros.
+ *
+ * @see tbox::Database
+ */
+
+class HDFDatabase:public Database
+{
+public:
+   /**
+    * The HDF database constructor creates an empty database with the
+    * specified name.  By default the database will not be associated
+    * with a file until it is mounted, using the mount() member function.
+    *
+    * When assertion checking is active, the name string must be non-empty.
+    * The name string is *NOT* the name of the HDF file.
+    */
+   explicit HDFDatabase(
+      const std::string& name);
+
+   /**
+    * The database destructor closes the HDF5 group or data file.
+    */
+   virtual ~HDFDatabase();
+
+   /**
+    * Return true if the specified key exists in the database
+    * and false otherwise.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual bool
+   keyExists(
+      const std::string& key);
+
+   /**
+    * Return an array of all keys in the current database.  Note that
+    * no keys from subdatabases contained in the current database
+    * will appear in the array.  To get the keys of any other
+    * database, you must call this routine for that database.
+    */
+   virtual Array<std::string>
+   getAllKeys();
+
+   /**
+    * @brief Return the type of data associated with the key.
+    *
+    * If the key does not exist, then INVALID is returned
+    *
+    * @param key Key name in database.
+    */
+   virtual enum DataType
+   getArrayType(
+      const std::string& key);
+
+   /**
+    * Return the size of the array associated with the key.  If the key
+    * does not exist, then zero is returned.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual int
+   getArraySize(
+      const std::string& key);
+
+   /**
+    * Return true or false depending on whether the specified key
+    * represents a database entry.  If the key does not exist or if
+    * the string is empty, then false is returned.
+    */
+   virtual bool
+   isDatabase(
+      const std::string& key);
+
+   /**
+    * Create a new database with the specified key name and return a
+    * pointer to it.  A new group with the key name is also created
+    * in the data file.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual Pointer<Database>
+   putDatabase(
+      const std::string& key);
+
+   /**
+    * Get the database with the specified key name.  If the specified
+    * key does not represent a database entry in the database, then
+    * an error message is printed and the program exits.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual Pointer<Database>
+   getDatabase(
+      const std::string& key);
+
+   /**
+    * Return true or false depending on whether the specified key
+    * represents a boolean entry.  If the key does not exist or if
+    * the string is empty, then false is returned.
+    */
+   virtual bool
+   isBool(
+      const std::string& key);
+
+   /**
+    * Create a boolean array entry in the database with the specified
+    * key name.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual void
+   putBoolArray(
+      const std::string& key,
+      const bool * const data,
+      const int nelements);
+
+   /**
+    * Get a boolean entry in the database with the specified key name.
+    * If the specified key does not exist in the database, then an
+    * error message is printed and the program exits.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   /**
+    * Get a boolean entry from the database with the specified key
+    * name.  If the specified key does not exist in the database,
+    * then an error message is printed and the program exits.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual Array<bool>
+   getBoolArray(
+      const std::string& key);
+
+   /**
+    * Return true or false depending on whether the specified key
+    * represents a box entry.  If the key does not exist or if
+    * the string is empty, then false is returned.
+    */
+   virtual bool
+   isDatabaseBox(
+      const std::string& key);
+
+   /**
+    * Create a box array entry in the database with the specified
+    * key name.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual void
+   putDatabaseBoxArray(
+      const std::string& key,
+      const DatabaseBox * const data,
+      const int nelements);
+
+   /**
+    * Get a box entry from the database with the specified key
+    * name.  If the specified key does not exist in the database,
+    * then an error message is printed and the program exits.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual Array<DatabaseBox>
+   getDatabaseBoxArray(
+      const std::string& key);
+
+   /**
+    * Return true or false depending on whether the specified key
+    * represents a char entry.  If the key does not exist or if
+    * the string is empty, then false is returned.
+    */
+   virtual bool
+   isChar(
+      const std::string& key);
+
+   /**
+    * Create a character array entry in the database with the specified
+    * key name.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual void
+   putCharArray(
+      const std::string& key,
+      const char * const data,
+      const int nelements);
+
+   /**
+    * Get a character entry from the database with the specified key
+    * name.  If the specified key does not exist in the database,
+    * then an error message is printed and the program exits.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual Array<char>
+   getCharArray(
+      const std::string& key);
+
+   /**
+    * Return true or false depending on whether the specified key
+    * represents a complex entry.  If the key does not exist or if
+    * the string is empty, then false is returned.
+    */
+   virtual bool
+   isComplex(
+      const std::string& key);
+
+   /**
+    * Create a complex array entry in the database with the specified
+    * key name.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual void
+   putComplexArray(
+      const std::string& key,
+      const dcomplex * const data,
+      const int nelements);
+
+   /**
+    * Get a complex entry from the database with the specified key
+    * name.  If the specified key does not exist in the database
+    * then an error message is printed and the program exits.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual Array<dcomplex>
+   getComplexArray(
+      const std::string& key);
+
+   /**
+    * Return true or false depending on whether the specified key
+    * represents a double entry.  If the key does not exist or if
+    * the string is empty, then false is returned.
+    */
+   virtual bool
+   isDouble(
+      const std::string& key);
+
+   /**
+    * Create a double array entry in the database with the specified
+    * key name.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual void
+   putDoubleArray(
+      const std::string& key,
+      const double * const data,
+      const int nelements);
+
+   /**
+    * Get a double entry from the database with the specified key
+    * name.  If the specified key does not exist in the database
+    * then an error message is printed and the program exits.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual Array<double>
+   getDoubleArray(
+      const std::string& key);
+
+   /**
+    * Return true or false depending on whether the specified key
+    * represents a float entry.  If the key does not exist or if
+    * the string is empty, then false is returned.
+    */
+   virtual bool
+   isFloat(
+      const std::string& key);
+
+   /**
+    * Create a float array entry in the database with the specified
+    * key name.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual void
+   putFloatArray(
+      const std::string& key,
+      const float * const data,
+      const int nelements);
+
+   /**
+    * Get a float entry from the database with the specified key
+    * name.  If the specified key does not exist in the database
+    * then an error message is printed and the program exits.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual Array<float>
+   getFloatArray(
+      const std::string& key);
+
+   /**
+    * Return true or false depending on whether the specified key
+    * represents an integer entry.  If the key does not exist or if
+    * the string is empty, then false is returned.
+    */
+   virtual bool
+   isInteger(
+      const std::string& key);
+
+   /**
+    * Create an integer array entry in the database with the specified
+    * key name.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual void
+   putIntegerArray(
+      const std::string& key,
+      const int * const data,
+      const int nelements);
+
+   /**
+    * Get an integer entry from the database with the specified key
+    * name.  If the specified key does not exist in the database
+    * then an error message is printed and the program exits.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual Array<int>
+   getIntegerArray(
+      const std::string& key);
+
+   /**
+    * Return true or false depending on whether the specified key
+    * represents a string entry.  If the key does not exist or if
+    * the string is empty, then false is returned.
+    */
+   virtual bool
+   isString(
+      const std::string& key);
+
+   /**
+    * Create a string array entry in the database with the specified
+    * key name.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual void
+   putStringArray(
+      const std::string& key,
+      const std::string * const data,
+      const int nelements);
+
+   /**
+    * Get a string entry from the database with the specified key
+    * name.  If the specified key does not exist in the database
+    * then an error message is printed and the program exits.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual Array<std::string>
+   getStringArray(
+      const std::string& key);
+
+   /**
+    * Print contents of current database to the specified output stream.
+    * If no output stream is specified, then data is written to stream pout.
+    * Note that none of the subdatabases contained in the current database
+    * will have their contents printed.  To view the contents of any other
+    * database, you must call this print routine for that database.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os = pout);
+
+   /**
+    * Create a new database file.
+    *
+    * Returns true if successful.
+    *
+    * @param name name of database. Normally a filename.
+    */
+   virtual bool
+   create(
+      const std::string& name);
+
+   /**
+    * Open an existing database file.
+    *
+    * Returns true if successful.
+    *
+    * @param name name of database. Normally a filename.
+    */
+   virtual bool
+   open(
+      const std::string& name);
+
+   /**
+    * @brief Attach the Database to an existing HDF file.
+    *
+    * If an application has an existing HDF file used for restart this
+    * method can be used to write SAMRAI restart information to the
+    * existing file instead of SAMRAI creating a distinct file.
+    *
+    * The group_id should be a hid returned from a H5Gcreate call.
+    * SAMRAI data will be written within this group.
+    *
+    * Returns true if attach was successful.
+    */
+   virtual bool
+   attachToFile(
+      hid_t group_id);
+
+   /**
+    * Close the database.
+    *
+    * Returns true if successful.
+    *
+    * If the database is currently open then close it.  This should
+    * flush all data to the file (if the database is on disk).
+    */
+   virtual bool
+   close();
+
+   /**
+    * @brief Returns the name of this database.
+    *
+    * The name for the root of the database is the name supplied when creating it.
+    * Names for nested databases are the keyname of the database.
+    *
+    */
+   virtual std::string
+   getName();
+
+   /**
+    * Return the group_id so VisIt can access an object's HDF database.
+    */
+   hid_t
+   getGroupId();
+
+   using Database::putBoolArray;
+   using Database::getBoolArray;
+   using Database::putDatabaseBoxArray;
+   using Database::getDatabaseBoxArray;
+   using Database::putCharArray;
+   using Database::getCharArray;
+   using Database::putComplexArray;
+   using Database::getComplexArray;
+   using Database::putFloatArray;
+   using Database::getFloatArray;
+   using Database::putDoubleArray;
+   using Database::getDoubleArray;
+   using Database::putIntegerArray;
+   using Database::getIntegerArray;
+   using Database::putStringArray;
+   using Database::getStringArray;
+
+private:
+   HDFDatabase(
+      const HDFDatabase&);            // not implemented
+   void
+   operator = (
+      const HDFDatabase&);                 // not implemented
+
+   /*
+    * Static function passed HDF5 iterator routine to look up database keys.
+    */
+   static herr_t
+   iterateKeys(
+      hid_t loc_id,
+      const char* name,
+      void* database);
+
+   /*
+    * Static member used to construct list of keys when searching for
+    * database keys via the HDF5 iterator routine.
+    */
+   static void
+   addKeyToList(
+      const char* name,
+      int type,
+      void* database);
+
+   /*
+    * Private constructor used internally to create sub-databases.
+    */
+   HDFDatabase(
+      const std::string& name,
+      hid_t group_ID);
+
+   /*
+    * Private utility routine for inserting array data in the database
+    */
+   void
+   insertArray(
+      hid_t parent_id,
+      const char* name,
+      size_t offset,
+      int ndims,
+      const hsize_t dim[] /*ndims*/,
+      const int* perm,
+      hid_t member_id) const;
+
+   /*!
+    * @brief Create an HDF compound type for box.
+    *
+    * When finished, the type should be closed using H5Tclose(hid_t).
+    *
+    * @param char_type 'n' mean use native types; 'f' = means use
+    *        types for file.
+    * @return the compound type id.
+    * @internal We currently create a new compound type every
+    * time we write a compound.  It would be more efficient to
+    * cache the type id for the file.
+    */
+   hid_t
+   createCompoundDatabaseBox(
+      char type_spec) const;
+
+   /*!
+    * @brief Create an HDF compound type for complex.
+    *
+    * When finished, the type should be closed using H5Tclose(hid_t).
+    *
+    * @param char_type 'n' mean use native types; 'f' = means use
+    *        types for file.
+    * @return the compound type id.
+    * @internal We currently create a new compound type every
+    * time we write a compound.  It would be more efficient to
+    * cache the type id for the file.
+    */
+   hid_t
+   createCompoundComplex(
+      char type_spec) const;
+
+   /*
+    * Private utility routines for searching keys in database;
+    */
+   void
+   performKeySearch();
+   void
+   cleanupKeySearch();
+
+   /*!
+    * @brief Write attribute for a given dataset.
+    *
+    * Currently only one attribute is kept for each dataset: its type.
+    * The type attribute is used to determine what kind of data the
+    * dataset represent.
+    *
+    * @param type_key Type identifier for the dataset
+    * @param dataset_id The HDF dataset id
+    */
+   void
+   writeAttribute(
+      int type_key,
+      hid_t dataset_id);
+
+   /*!
+    * @brief Read attribute for a given dataset.
+    *
+    * Currently only one attribute is kept for each dataset: its type.
+    * The type attribute is returned.
+    *
+    * @param dataset_id The HDF dataset id
+    * @return type attribute
+    */
+   int
+   readAttribute(
+      hid_t dataset_id);
+
+   struct hdf_complex {
+      double re;
+      double im;
+   };
+
+   /*
+    * The following structure is used to store (key,type) pairs when
+    * searching for keys in the database.
+    */
+   struct KeyData {
+      std::string d_key;   // group or dataset name
+      int d_type;     // type of entry
+   };
+
+   std::string d_top_level_search_group;
+   std::string d_group_to_search;
+   int d_still_searching;
+   int d_found_group;
+
+   /*
+    * HDF5 file and group id, boolean flag indicating whether database
+    * is associated with a mounted file, and name of this database object.
+    */
+   /*!
+    * @brief Whether database is mounted to a file
+    */
+   bool d_is_file;
+   /*!
+    * @brief ID of file attached to database
+    *
+    * Is either -1 (not mounted to file) or set to the return value from
+    * opening a file.
+    * Set to -1 on unmounting the file.
+    */
+   hid_t d_file_id;
+   /*!
+    * @brief ID of group attached to database
+    *
+    * A database object is always attached to a group.
+    * The group id is set in the constructor when constructing from a group.
+    * If the object mounts a file, the group id is the file id.
+    */
+   hid_t d_group_id;
+
+   /*
+    * Name of this database object (passed into constructor)
+    */
+   const std::string d_database_name;
+
+   /*
+    * List of (key,type) pairs assembled when searching for keys.
+    */
+   List<KeyData> d_keydata;
+
+};
+
+}
+}
+
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/HDFDatabaseFactory.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/HDFDatabaseFactory.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,35 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An abstract base class for a HDFDatabaseFactory 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/HDFDatabaseFactory.h"
+#include "SAMRAI/tbox/HDFDatabase.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * Build a new Database object.
+ */
+Pointer<Database> HDFDatabaseFactory::allocate(
+   const std::string& name) {
+#ifdef HAVE_HDF5
+   Pointer<HDFDatabase> database(new HDFDatabase(name));
+   return database;
+
+#else
+   (void) name;
+   TBOX_WARNING("HDF5DatabaseFactory: Cannot allocate an HDFDatabase.\n"
+      << "SAMRAI was not configured with HDF.");
+   return Pointer<Database>(NULL);
+#endif
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/HDFDatabaseFactory.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/HDFDatabaseFactory.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,38 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An abstract base class for a HDFDatabaseFactory 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_HDFDatabaseFactory
+#define included_tbox_HDFDatabaseFactory
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/DatabaseFactory.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * @brief HDFDatabase factory.
+ *
+ * Builds a new HDFDatabase.
+ */
+class HDFDatabaseFactory:public DatabaseFactory
+{
+   /**
+    * Build a new Database object.
+    */
+   virtual Pointer<Database>
+   allocate(
+      const std::string& name);
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/IEEE.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/IEEE.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,127 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   IEEE routines to set up handlers and get signaling NaNs 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/IEEE.h"
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+/*
+ * Floating point exception handling.
+ *
+ * The following lines setup exception handling headers.
+ */
+#if defined(HAVE_EXCEPTION_HANDLING)
+#include <fpu_control.h>
+#include <signal.h>
+#endif
+
+/*
+ * The following lines setup exception handling headers on the Sun.  If we
+ * use Sun's native compiler, just pull in the <sunmath.h> include file.
+ * If we are under solaris but use a different compiler (e.g. g++)
+ * we have to explicitly define the functions that <sunmath.h> defines,
+ * since we don't have access to this file.
+ */
+#ifdef __SUNPRO_CC
+#include <sunmath.h>
+#endif
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/tbox/IEEE.I"
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+/*
+ *************************************************************************
+ * Set up the IEEE exception handlers so that normal IEEE exceptions	*
+ * will cause a program abort.  How this is done varies wildly from	*
+ * architecture to architecture.                                        *
+ *************************************************************************
+ */
+
+/*
+ * Function celled when an exception is tripped.
+ */
+#if defined(HAVE_EXCEPTION_HANDLING)
+static void error_action(
+   int error)
+{
+   Utilities::abort(
+      "Floating point exception -- program abort! "
+      + tbox::Utilities::intToString(error),
+      __FILE__,
+      __LINE__);
+}
+#endif
+
+void IEEE::setupFloatingPointExceptionHandlers()
+{
+#if defined(HAVE_EXCEPTION_HANDLING)
+   int fpu_flags = _FPU_DEFAULT;
+   fpu_flags &= ~_FPU_MASK_IM;  /* Execption on Invalid operation */
+   fpu_flags &= ~_FPU_MASK_ZM;  /* Execption on Division by zero  */
+   fpu_flags &= ~_FPU_MASK_OM;  /* Execption on Overflow */
+   _FPU_SETCW(fpu_flags);
+   signal(SIGFPE, error_action);
+#endif
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Routines to initialize arrays to signaling NaNs.                      *
+ *									*
+ *************************************************************************
+ */
+
+void IEEE::initializeArrayToSignalingNaN(
+   Array<float>& array)
+{
+   MathUtilities<float>::setArrayToSignalingNaN(array);
+}
+
+void IEEE::initializeArrayToSignalingNaN(
+   Array<double>& array)
+{
+   MathUtilities<double>::setArrayToSignalingNaN(array);
+}
+
+void IEEE::initializeArrayToSignalingNaN(
+   Array<dcomplex>& array)
+{
+   MathUtilities<dcomplex>::setArrayToSignalingNaN(array);
+}
+
+void IEEE::initializeArrayToSignalingNaN(
+   float* array,
+   int n)
+{
+   MathUtilities<float>::setArrayToSignalingNaN(array, n);
+}
+
+void IEEE::initializeArrayToSignalingNaN(
+   double* array,
+   int n)
+{
+   MathUtilities<double>::setArrayToSignalingNaN(array, n);
+}
+
+void IEEE::initializeArrayToSignalingNaN(
+   dcomplex* array,
+   int n)
+{
+   MathUtilities<dcomplex>::setArrayToSignalingNaN(array, n);
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/IEEE.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/IEEE.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,89 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   IEEE routines to set up handlers and get signaling NaNs 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/MathUtilities.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+/*
+ * Routines to get signaling NaN value.
+ */
+
+SAMRAI_INLINE_KEYWORD
+float IEEE::getSignalingFloatNaN()
+{
+   return MathUtilities<float>::getSignalingNaN();
+}
+
+SAMRAI_INLINE_KEYWORD
+double IEEE::getSignalingNaN()
+{
+   return MathUtilities<double>::getSignalingNaN();
+}
+
+SAMRAI_INLINE_KEYWORD
+dcomplex IEEE::getSignalingComplexNaN()
+{
+   return MathUtilities<dcomplex>::getSignalingNaN();
+}
+
+/*
+ * Routines to set signaling NaN value.
+ */
+
+SAMRAI_INLINE_KEYWORD
+void IEEE::setNaN(
+   float& f)
+{
+   f = MathUtilities<float>::getSignalingNaN();
+}
+
+SAMRAI_INLINE_KEYWORD
+void IEEE::setNaN(
+   double& d)
+{
+   d = MathUtilities<double>::getSignalingNaN();
+}
+
+SAMRAI_INLINE_KEYWORD
+void IEEE::setNaN(
+   dcomplex& dc)
+{
+   dc = MathUtilities<dcomplex>::getSignalingNaN();
+}
+
+/*
+ * Routines to check against signaling NaN value.
+ */
+
+SAMRAI_INLINE_KEYWORD
+bool IEEE::isNaN(
+   const float& f)
+{
+   return MathUtilities<float>::isNaN(f);
+}
+
+SAMRAI_INLINE_KEYWORD
+bool IEEE::isNaN(
+   const double& d)
+{
+   return MathUtilities<double>::isNaN(d);
+}
+
+SAMRAI_INLINE_KEYWORD
+bool IEEE::isNaN(
+   const dcomplex& dc)
+{
+   return MathUtilities<dcomplex>::isNaN(dc);
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/IEEE.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/IEEE.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,193 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   IEEE routines to set up handlers and get signaling NaNs 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_IEEE
+#define included_tbox_IEEE
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Complex.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+/*!
+ * Class IEEE is a utility providing rotuines for managing IEEE trap
+ * handlers and data set to signaling NaNs.  Signaling NaNs force
+ * a trap if they are used in a numerical operation, so they are a
+ * useful way to track uninitialized floating point data.  Signaling
+ * NaN's may only be used for double and float data (and the real
+ * ans imaginary parts of dcomplex data) and so operations are
+ * provided here for those types only.
+ *
+ * IMPORTANT: To properly trap operations based on signaling NaN values,
+ *            the routine IEEE::setupFloatingPointExceptionHandlers()
+ *            must be called.  This is normally done in the
+ *            SAMRAIManager::startup() routine.
+ *
+ * Note that all operations provided by this class (except for setting
+ * up exception handling) are implemented in @see tbox::MathUtilities.
+ * Operations are provided by this class since it is not templated on
+ * data type and so calling the operations provided here may be easier
+ * in some cases, such as in codes built based on earlier versions
+ * of SAMRAI.  See the tbox::MathUtilities header file for details
+ * about the routines.
+ *
+ * @see tbox::MathUtilities
+ */
+
+struct IEEE {
+   /*!
+    * Set up IEEE exception handlers so that normal IEEE exceptions will
+    * cause a program abort.  This is useful for tracking down errors.
+    * Note, however, that this may cause problems if your code relies on
+    * IEEE underflow or overflow traps.
+    */
+   static void
+   setupFloatingPointExceptionHandlers();
+
+   /*!
+    * Get the IEEE float signaling NaN on architectures that support it.
+    * Using this value in a numerical expression will cause a program abort.
+    */
+   static float
+   getSignalingFloatNaN();
+
+   /*!
+    * Get the IEEE double signaling NaN on architectures that support it.
+    * Using this value in a numerical expression will cause a program abort.
+    */
+   static double
+   getSignalingNaN();
+
+   /*!
+    * Get the dcomplex value with real and imaginary parts set to the
+    * IEEE double signaling NaN on architectures that support it.
+    * Using this value in a numerical expression will cause a program abort.
+    */
+   static dcomplex
+   getSignalingComplexNaN();
+
+   /*!
+    * Set supplied float value to the signaling NaN.
+    */
+   static void
+   setNaN(
+      float& f);
+
+   /*!
+    * Set supplied double value to the signaling NaN.
+    */
+   static void
+   setNaN(
+      double& d);
+
+   /*!
+    * Set real and imaginary parts of supplied dcomplex value to the
+    * double signaling NaN.
+    */
+   static void
+   setNaN(
+      dcomplex& dc);
+
+   /*!
+    * Initialize an array of floats to signaling NaNs.  Before using this
+    * array in any operation, the NaN value should be reset.  Otherwise,
+    * an unrecoverable exception will result (as long as floating point
+    * exception handling is supported by the compiler).
+    */
+   static void
+   initializeArrayToSignalingNaN(
+      Array<float>& array);
+
+   /*!
+    * Initialize an array of doubles to signaling NaNs.  Before using this
+    * array in any operation, the NaN value should be reset.  Otherwise,
+    * an unrecoverable exception will result (as long as floating point
+    * exception handling is supported by the compiler).
+    */
+   static void
+   initializeArrayToSignalingNaN(
+      Array<double>& array);
+
+   /*!
+    * Initialize an array of dcomplex to signaling NaNs.  Before using this
+    * array in any operation, the NaN value should be reset.  Otherwise,
+    * an unrecoverable exception will result (as long as floating point
+    * exception handling is supported by the compiler).
+    */
+   static void
+   initializeArrayToSignalingNaN(
+      Array<dcomplex>& array);
+
+   /*!
+    * Initialize an array of floats to signaling NaNs.  Before using this
+    * array in any operation, the NaN value should be reset.  Otherwise,
+    * an unrecoverable exception will result (as long as floating point
+    * exception handling is supported by the compiler).
+    */
+   static void
+   initializeArrayToSignalingNaN(
+      float* array,
+      int n = 1);
+
+   /*!
+    * Initialize an array of doubles to signaling NaNs.  Before using this
+    * array in any operation, the NaN value should be reset.  Otherwise,
+    * an unrecoverable exception will result (as long as floating point
+    * exception handling is supported by the compiler).
+    */
+   static void
+   initializeArrayToSignalingNaN(
+      double* array,
+      int n = 1);
+
+   /*!
+    * Initialize an array of dcomplex to signaling NaNs.  Before using this
+    * array in any operation, the NaN value should be reset.  Otherwise,
+    * an unrecoverable exception will result (as long as floating point
+    * exception handling is supported by the compiler).
+    */
+   static void
+   initializeArrayToSignalingNaN(
+      dcomplex* array,
+      int n = 1);
+
+   /*!
+    * Return true if the supplied float value is NaN; else, false.
+    */
+   static bool
+   isNaN(
+      const float& f);
+
+   /*!
+    * Return true if the supplied double value is NaN; else, false.
+    */
+   static bool
+   isNaN(
+      const double& d);
+
+   /*!
+    * Return true if if either real and imaginary part of the supplied
+    * dcomplex value is NaN; else, false.
+    */
+   static bool
+   isNaN(
+      const dcomplex& dc);
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/tbox/IEEE.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/IOStream.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/IOStream.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,29 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Wrapper header file for standard IO stream classes 
+ *
+ ************************************************************************/
+
+#ifndef included_Stream
+#define included_Stream
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <cstdio>
+
+#include <iostream>
+#include <iomanip>
+
+#ifndef LACKS_SSTREAM
+#include <sstream>
+#endif
+
+#ifndef LACKS_STRSTREAM
+#include <strstream>
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/InputDatabase.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/InputDatabase.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,37 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An input database structure that stores (key,value) pairs 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_InputDatabase
+#define included_tbox_InputDatabase
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/MemoryDatabase.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * @brief Class InputDatabase stores (key,value) pairs in a hierarchical
+ * database.
+ *
+ * This is just another name for the MemoryDatabase. @see tbox::MemoryDatabase
+ *
+ * It is normally filled with data using a tbox::Parser (@see
+ * tbox::Parser) and used to pass user supplied input from input files
+ * to constructors for problem setup.
+ *
+ */
+typedef SAMRAI::tbox::MemoryDatabase InputDatabase;
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/InputManager.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/InputManager.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,188 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An input manager singleton class that parses input files 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/InputManager.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/Parser.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+InputManager * InputManager::s_manager_instance = NULL;
+
+Pointer<Database> InputManager::s_input_db =
+   Pointer<Database>(NULL);
+
+StartupShutdownManager::Handler InputManager::s_finalize_handler(
+   0,
+   0,
+   0,
+   InputManager::finalizeCallback,
+   StartupShutdownManager::priorityInputManager);
+
+/*
+ *************************************************************************
+ *									*
+ * Basic singleton classes to create, set, and destroy the manager	*
+ * instance.								*
+ *									*
+ *************************************************************************
+ */
+
+InputManager *InputManager::getManager()
+{
+   if (!s_manager_instance) {
+      s_manager_instance = new InputManager;
+   }
+   return s_manager_instance;
+}
+
+void InputManager::setManager(
+   InputManager* manager)
+{
+   if (s_manager_instance) {
+      delete s_manager_instance;
+   }
+   s_manager_instance = manager;
+}
+
+void InputManager::finalizeCallback()
+{
+   if (s_manager_instance) {
+      delete s_manager_instance;
+      s_manager_instance = ((InputManager *)NULL);
+   }
+
+   s_input_db = ((InputDatabase *)NULL);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * The constructor and destructor are protected and call only be called	*
+ * by the singleton class or its subclasses.				*
+ *									*
+ *************************************************************************
+ */
+
+InputManager::InputManager()
+{
+}
+
+InputManager::~InputManager()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Return whether or not the manager contains an valid input database.   *
+ *									*
+ *************************************************************************
+ */
+
+bool InputManager::inputDatabaseExists()
+{
+   return !(s_input_db.isNull());
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Parse the specified input file and return the new database.		*
+ *									*
+ *************************************************************************
+ */
+
+Pointer<InputDatabase>
+InputManager::parseInputFile(
+   const std::string& filename)
+{
+   Pointer<InputDatabase> db(new InputDatabase("main"));
+   this->parseInputFile(filename, db);
+   return db;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Accessor method for InputManger's root input database.                *
+ *									*
+ *************************************************************************
+ */
+Pointer<Database> InputManager::getInputDatabase()
+{
+   return s_input_db;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Parse the specified input file into the given database.		*
+ *									*
+ *************************************************************************
+ */
+
+void InputManager::parseInputFile(
+   const std::string& filename,
+   Pointer<InputDatabase> db)
+{
+   FILE* fstream = NULL;
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   if (mpi.getRank() == 0) {
+      fstream = fopen(filename.c_str(), "r");
+   }
+   int worked = (fstream ? 1 : 0);
+   mpi.Bcast(&worked, 1, MPI_INT, 0);
+   if (!worked) {
+      TBOX_ERROR("tbox::InputManager: Could not open input file``"
+         << filename.c_str() << "''\n");
+   }
+
+   /*
+    * Parse input file.
+    */
+   Parser* parser = new Parser();
+   const int errors = parser->parse(filename, fstream, db);
+   const int warnings = parser->getNumberWarnings();
+
+   if (errors > 0) {
+      TBOX_WARNING(
+         "InputManager: Errors = " << errors
+         << ", Warnings = " << warnings
+         << "\n when parsing input file = "
+         << filename << std::endl);
+      db->printClassData(plog);
+      TBOX_ERROR("InputManager exiting..." << std::endl);
+   }
+   if (warnings > 0) {
+      TBOX_WARNING(
+         "InputManager: Warnings  = " << warnings
+         <<
+         "\n when parsing input file = " << filename << std::endl);
+   }
+
+   /*
+    * Store the root database in the static s_input_db variable.
+    */
+   s_input_db = db;
+
+   delete parser;
+   if (fstream) fclose(fstream);
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/InputManager.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/InputManager.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,164 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An input manager singleton class that parses input files 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_InputManager
+#define included_tbox_InputManager
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/InputDatabase.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * Class InputManager parses an input file and returns the associated
+ * database.  This manager class hides the complexity of opening the
+ * input file, creating the parser, and populating the database with
+ * values.  The input manager is simple enough that it did not need
+ * to be implemented as a singleton class; however, it was implemented
+ * as a singleton to be consistent with the restart manager class.
+ *
+ * All processors must call the parsing routines.  Any errors are reported
+ * to pout and will result in termination of the program.
+ *
+ * The input file will generally have the following format.  For each
+ * object that requires user specified input, an entry of the following
+ * format should be included in the input file.
+ *
+ * \verbatim
+ * Object_entry {
+ *    keyword1 = <value1>     // maybe some end line comments
+ *    keyword2 = <value2>
+ *    nested_input_keyword {
+ *       nested_data_keyword1 = <value1>
+ *    }
+ *     \ldots
+ * }
+ * \endverbatim
+ *
+ * For convenience, the input parser also supports C/C++ style comments,
+ * "include" files, and some expression evaluation.
+ *
+ */
+
+class InputManager
+{
+public:
+   /**
+    * Return a pointer to the single instance of the input manager.
+    * All access to the input manager object is through getManager().
+    */
+   static InputManager *
+   getManager();
+
+   /**
+    * Set a new input manager.  This routine can only be used by subclasses
+    * since the constructor and destructor are protected.  The manager object
+    * will be deleted at program exit.
+    */
+   static void
+   setManager(
+      InputManager* manager);
+
+   /**
+    * Return whether or not the manager has read an input database.  If
+    * so, it returns true.  If not, false.
+    */
+   static bool
+   inputDatabaseExists();
+
+   /**
+    * Accessor method for the root input database held by InputManager.
+    * Inputs are read from the input file and held in this database.
+    * This method returns a pointer to the database, allowing any class
+    * in SAMRAI to access the information inside it using standard
+    * database calls.  For example, the following could appear in a
+    * SAMRAI class:
+    *
+    *       // get root database
+    *       Pointer<Database> root_db =
+    *          InputManager::getManager()->getInputDatabase();
+    *       // get class's sub-database
+    *       Pointer<Database> class_db = root_db->getDatabase("MyClass");
+    *       // get parameter(s) from sub-database
+    *       int dummy = class_db->getInteger("dummy");
+    *
+    *
+    * where "dummy" was supplied in "MyClass" entry of the input file:
+    *
+    *       MyClass {
+    *          dummy = ...
+    *       }
+    *
+    * This function is intended for SAMRAI classes in which there is no
+    * easy or efficient way to supply input parameters.
+    */
+   static Pointer<Database>
+   getInputDatabase();
+
+   /**
+    * Create a new database named "main" from the specified input file.
+    */
+   virtual Pointer<InputDatabase>
+   parseInputFile(
+      const std::string& filename);
+
+   /**
+    * Parse data from the specified file into the existing database.
+    */
+   virtual void
+   parseInputFile(
+      const std::string& filename,
+      Pointer<InputDatabase> db);
+
+protected:
+   /**
+    * The constructor is protected, since only subclasses of the singleton
+    * may access the constructor.  Others may not explicitly create a
+    * singleton class.
+    */
+   InputManager();
+
+   /**
+    * The destructor for the input manager is protected, since only the
+    * singleton class and subclasses may destroy the manager objects.
+    */
+   virtual ~InputManager();
+
+private:
+   InputManager(
+      const InputManager&);           // not implemented
+   void
+   operator = (
+      const InputManager&);                // not implemented
+
+   /**
+    * Deallocate the input manager instance.  It is not necessary to call
+    * this routine at program termination, since it is automatically called
+    * by the SAMRAI shutdown routines.
+    */
+   static void
+   finalizeCallback();
+
+   static InputManager* s_manager_instance;
+
+   static StartupShutdownManager::Handler s_finalize_handler;
+
+   static Pointer<Database> s_input_db;
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/List.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/List.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,333 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A simple doubly-linked list template class 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_List_C
+#define included_tbox_List_C
+
+#include "SAMRAI/tbox/List.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/tbox/List.I"
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+template<class TYPE>
+ListNode<TYPE>* ListNode<TYPE>::s_free_list = NULL;
+template<class TYPE>
+int ListNode<TYPE>::s_num_free = 0;
+template<class TYPE>
+int ListNode<TYPE>::s_max_free = 1000;
+template<class TYPE>
+bool ListNode<TYPE>::s_registered_callback = false;
+
+template<class TYPE>
+bool List<TYPE>::s_initialized = false;
+
+template<class TYPE>
+void* ListNode<TYPE>::operator new (
+   size_t bytes)
+{
+   if (s_free_list) {
+      ListNode<TYPE>* node = s_free_list;
+      s_free_list = s_free_list->d_next;
+      --s_num_free;
+      return node;
+   } else {
+      return ::operator new (
+                bytes);
+   }
+}
+
+template<class TYPE>
+void ListNode<TYPE>::operator delete (
+   void* what)
+{
+   ListNode<TYPE>* node = (ListNode<TYPE> *)what;
+   node->d_next = s_free_list;
+   s_free_list = node;
+   if (++s_num_free > s_max_free) {
+      int cut_to = s_max_free / 2;
+      while (s_num_free > cut_to) {
+         void* byebye = s_free_list;
+         s_free_list = s_free_list->d_next;
+         --s_num_free
+         ;
+         ::operator delete (
+            byebye);
+      }
+   }
+}
+
+template<class TYPE>
+void ListNode<TYPE>::freeCachedListItems()
+{
+   while (s_free_list) {
+      void* byebye = s_free_list;
+      s_free_list = s_free_list->d_next
+      ;
+      ::operator delete (
+         byebye);
+   }
+   s_free_list = NULL;
+   s_num_free = 0;
+}
+
+template<class TYPE>
+List<TYPE>::List(
+   const List<TYPE>& list):
+   d_number_items(0),
+   d_list_head((ListNode<TYPE> *)NULL),
+   d_list_tail((ListNode<TYPE> *)NULL)
+{
+   if (!s_initialized) {
+      s_initialized = List<TYPE>::initializeHandler();
+   }
+
+   copyItems(list);
+}
+
+template<class TYPE>
+List<TYPE>&List<TYPE>::operator = (
+   const List<TYPE>& list)
+{
+   if (this != &list) {
+      clearItems();
+      copyItems(list);
+   }
+   return *this;
+}
+
+template<class TYPE>
+void List<TYPE>::addItem(
+   const TYPE& item)
+{
+
+   ListNode<TYPE>* new_item =
+      new ListNode<TYPE>(item, d_list_head, NULL);
+   if (d_list_head) d_list_head->d_prev = new_item;
+   d_list_head = new_item;
+   if (!d_list_tail) d_list_tail = new_item;
+   d_number_items++;
+}
+
+template<class TYPE>
+void List<TYPE>::addItemBefore(
+   ListIterator<TYPE>& iter,
+   const TYPE& item)
+{
+   if ((iter.d_list == this) && iter.d_node) {
+      ListNode<TYPE>* new_item =
+         new ListNode<TYPE>(item, iter.d_node, iter.d_node->d_prev);
+      if (iter.d_node->d_prev == NULL) {
+         d_list_head = new_item;
+      } else {
+         iter.d_node->d_prev->d_next = new_item;
+      }
+      iter.d_node->d_prev = new_item;
+      d_number_items++;
+   } else {
+      addItem(item);
+   }
+}
+
+template<class TYPE>
+void List<TYPE>::addItemAfter(
+   ListIterator<TYPE>& iter,
+   const TYPE& item)
+{
+   if ((iter.d_list == this) && iter.d_node) {
+      ListNode<TYPE>* new_item =
+         new ListNode<TYPE>(item, iter.d_node->d_next, iter.d_node);
+      if (iter.d_node->d_next == NULL) {
+         d_list_tail = new_item;
+      } else {
+         iter.d_node->d_next->d_prev = new_item;
+      }
+      iter.d_node->d_next = new_item;
+      d_number_items++;
+   } else {
+      appendItem(item);
+   }
+}
+
+template<class TYPE>
+void List<TYPE>::appendItem(
+   const TYPE& item)
+{
+   ListNode<TYPE>* new_item =
+      new ListNode<TYPE>(item, NULL, d_list_tail);
+   if (d_list_tail) d_list_tail->d_next = new_item;
+   d_list_tail = new_item;
+   if (!d_list_head) d_list_head = new_item;
+   d_number_items++;
+}
+
+template<class TYPE>
+void List<TYPE>::copyItems(
+   const List<TYPE>& list)
+{
+   for (Iterator l(list); l; l++) {
+      appendItem(l());
+   }
+}
+
+template<class TYPE>
+void List<TYPE>::catenateItems(
+   List<TYPE>& list)
+{
+   if (!list.isEmpty()) {
+      if (isEmpty()) {
+         d_list_head = list.d_list_head;
+         d_list_tail = list.d_list_tail;
+      } else {
+         d_list_tail->d_next = list.d_list_head;
+         list.d_list_head->d_prev = d_list_tail;
+         d_list_tail = list.d_list_tail;
+      }
+      d_number_items += list.d_number_items;
+      list.d_list_head = list.d_list_tail = NULL;
+      list.d_number_items = 0;
+   }
+}
+template<class TYPE>
+void List<TYPE>::catenateItemsAtFront(
+   List<TYPE>& list)
+{
+   if (!list.isEmpty()) {
+      if (isEmpty()) {
+         d_list_head = list.d_list_head;
+         d_list_tail = list.d_list_tail;
+      } else {
+         d_list_head->d_prev = list.d_list_tail;
+         list.d_list_tail->d_next = d_list_head;
+         d_list_head = list.d_list_head;
+      }
+      d_number_items += list.d_number_items;
+      list.d_list_head = list.d_list_tail = NULL;
+      list.d_number_items = 0;
+   }
+}
+
+template<class TYPE>
+void List<TYPE>::removeFirstItem()
+{
+   if (!isEmpty()) {
+      ListNode<TYPE>* node = d_list_head;
+      d_list_head = d_list_head->d_next;
+      if ((--d_number_items) > 0) {
+         d_list_head->d_prev = NULL;
+      } else {
+         d_list_tail = NULL;
+      }
+      delete node;
+   }
+}
+
+template<class TYPE>
+void List<TYPE>::removeLastItem()
+{
+   if (!isEmpty()) {
+      ListNode<TYPE>* node = d_list_tail;
+      d_list_tail = d_list_tail->d_prev;
+      if ((--d_number_items) > 0) {
+         d_list_tail->d_next = NULL;
+      } else {
+         d_list_head = NULL;
+      }
+      delete node;
+   }
+}
+
+template<class TYPE>
+void List<TYPE>::clearItems()
+{
+   while (d_list_head) {
+      ListNode<TYPE>* byebye = d_list_head;
+      d_list_head = d_list_head->d_next;
+      delete byebye;
+   }
+   d_list_head = d_list_tail = NULL;
+   d_number_items = 0;
+}
+
+template<class TYPE>
+void List<TYPE>::removeItem(
+   ListIterator<TYPE>& iter)
+{
+   if ((iter.d_list == this) && iter.d_node) {
+
+      if ((d_list_head == iter.d_node) && (d_list_tail == iter.d_node)) {
+         d_list_head = d_list_tail = NULL;
+
+      } else if (d_list_head == iter.d_node) {
+         d_list_head = iter.d_node->d_next;
+         iter.d_node->d_next->d_prev = NULL;
+
+      } else if (d_list_tail == iter.d_node) {
+         d_list_tail = iter.d_node->d_prev;
+         iter.d_node->d_prev->d_next = NULL;
+
+      } else {
+         iter.d_node->d_next->d_prev = iter.d_node->d_prev;
+         iter.d_node->d_prev->d_next = iter.d_node->d_next;
+      }
+
+      d_number_items--;
+      delete iter.d_node;
+      iter.d_node = NULL;
+   }
+}
+
+template<class TYPE>
+void List<TYPE>::reverse()
+{
+   ListNode<TYPE>* ptr = d_list_head;
+   while (ptr) {
+      ListNode<TYPE>* next = ptr->d_next;
+      ptr->d_next = ptr->d_prev;
+      ptr->d_prev = next;
+      ptr = next;
+   }
+   ptr = d_list_head;
+   d_list_head = d_list_tail;
+   d_list_tail = ptr;
+}
+
+template<class TYPE>
+void List<TYPE>::swap(
+   List& r)
+{
+   int tmpi = d_number_items;
+   d_number_items = r.d_number_items;
+   r.d_number_items = tmpi;
+
+   ListNode<TYPE>* tmph = d_list_head;
+   d_list_head = r.d_list_head;
+   r.d_list_head = tmph;
+
+   ListNode<TYPE>* tmpt = d_list_tail;
+   d_list_tail = r.d_list_tail;
+   r.d_list_tail = tmpt;
+}
+
+template<class TYPE>
+void List<TYPE>::finalizeCallback()
+{
+   ListNode<TYPE>::freeCachedListItems();
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/List.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/List.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,268 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A simple doubly-linked list template class 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace tbox {
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ListNode<TYPE>::ListNode(
+   const TYPE& t,
+   ListNode<TYPE>* n,
+   ListNode<TYPE>* p):
+   d_item(t),
+   d_next(n),
+   d_prev(p)
+{
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ListNode<TYPE>::~ListNode()
+{
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ListIterator<TYPE>::ListIterator()
+{
+   d_list = ((List<TYPE> *)NULL);
+   d_node = ((ListNode<TYPE> *)NULL);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ListIterator<TYPE>::ListIterator(
+   const List<TYPE>& list)
+{
+   d_list = (List<TYPE> *) & list;
+   d_node = list.d_list_head;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ListIterator<TYPE>::ListIterator(
+   List<TYPE>* list,
+   ListNode<TYPE>* node)
+{
+   d_list = list;
+   d_node = node;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ListIterator<TYPE>::ListIterator(
+   const ListIterator<TYPE>& iter)
+{
+   d_list = iter.d_list;
+   d_node = iter.d_node;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ListIterator<TYPE>&
+ListIterator<TYPE>::operator = (
+   const ListIterator<TYPE>& iter)
+{
+   d_list = iter.d_list;
+   d_node = iter.d_node;
+   return *this;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ListIterator<TYPE>::~ListIterator()
+{
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE & ListIterator<TYPE>::operator * ()
+{
+   return d_node->d_item;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE &ListIterator<TYPE>::operator * () const
+{
+   return d_node->d_item;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE & ListIterator<TYPE>::operator () ()
+{
+   return d_node->d_item;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const TYPE &ListIterator<TYPE>::operator () () const
+{
+   return d_node->d_item;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ListIterator<TYPE>::operator bool () const
+{
+   return d_node ? true : false;
+}
+
+#ifndef LACKS_BOOL_VOID_RESOLUTION
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ListIterator<TYPE>::operator const void* () const
+{
+   return d_node ? this : NULL;
+}
+#endif
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+bool ListIterator<TYPE>::operator ! () const
+{
+   return d_node ? false : true;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void ListIterator<TYPE>::operator ++ (
+   int)
+{
+   if (d_node) d_node = d_node->d_next;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void ListIterator<TYPE>::operator -- (
+   int)
+{
+   if (d_node) d_node = d_node->d_prev;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void ListIterator<TYPE>::rewindIterator()
+{
+   if (d_list) d_node = d_list->d_list_head;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void ListIterator<TYPE>::fastforwardIterator()
+{
+   if (d_list) d_node = d_list->d_list_tail;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+bool ListIterator<TYPE>::operator == (
+   const ListIterator<TYPE>& i) const
+{
+   return d_node == i.d_node;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+bool ListIterator<TYPE>::operator != (
+   const ListIterator<TYPE>& i) const
+{
+   return d_node != i.d_node;
+}
+
+/**
+ * @brief Initialize shutdown handler.
+ */
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+bool List<TYPE>::initializeHandler(
+   void) {
+   static StartupShutdownManager::Handler handler(
+      0,
+      0,
+      0,
+      List::finalizeCallback,
+      StartupShutdownManager::priorityList);
+
+   return true;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+List<TYPE>::List():
+   d_number_items(0),
+   d_list_head((ListNode<TYPE> *)NULL),
+   d_list_tail((ListNode<TYPE> *)NULL)
+{
+   if (!s_initialized) {
+      s_initialized = List<TYPE>::initializeHandler();
+   }
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+List<TYPE>::~List()
+{
+   clearItems();
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+bool List<TYPE>::isEmpty() const
+{
+   return d_number_items == 0;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int List<TYPE>::getNumberOfItems() const
+{
+   return d_number_items;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+int List<TYPE>::size() const
+{
+   return d_number_items;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE& List<TYPE>::getFirstItem() const
+{
+   return d_list_head->d_item;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE& List<TYPE>::getLastItem() const
+{
+   return d_list_tail->d_item;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ListIterator<TYPE> List<TYPE>::listStart() const
+{
+   return ListIterator<TYPE>((List<TYPE> *) this, d_list_head);
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ListIterator<TYPE> List<TYPE>::listEnd() const
+{
+   return ListIterator<TYPE>((List<TYPE> *) this, d_list_tail);
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/List.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/List.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,484 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A simple doubly-linked list template class 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_List
+#define included_tbox_List
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+
+#include <cstddef>
+
+namespace SAMRAI {
+namespace tbox {
+
+template<class TYPE>
+class List;
+template<class TYPE>
+class ListNode;
+template<class TYPE>
+class ListIterator;
+
+/**
+ * Class List is a template-based doubly-linked list container.
+ * It is simpler that the STL List class, which is not yet delivered
+ * with all compilers.  In the future this class may be replaced with
+ * the STL version.
+ *
+ * The List item in the list must define the assignment operator "=" and
+ * the default const copy constructor.  This list implementation uses copy
+ * to add the list item to the linked list.  If this is too expensive for
+ * the object to be placed in the list, then a smart pointer to the
+ * object should be used instead.
+ */
+
+template<class TYPE>
+class List
+{
+public:
+   /**
+    * The iterator for class List.  Because of problems with some
+    * compilers and nested templates, the iterator for List is a
+    * separate class called ListIterator<TYPE> that is typedef-ed
+    * to List<TYPE>::Iterator.  Use the List<TYPE>::Iterator
+    * form, since the other form may disappear as compilers get better
+    * and can accept nested template classes.
+    */
+   typedef ListIterator<TYPE> Iterator;
+
+   /**
+    * Create a list with no elements.
+    */
+   List();
+
+   /**
+    * The const constructor copies list items from the source list to
+    * the newly constructed list.  The source list is not modified.
+    */
+   List(
+      const List<TYPE>& list);
+
+   /**
+    * The assignment operator copies the values from the right hand side
+    * list into the list on the left side of the equals sign.  The source
+    * list is not modified.  All previous values in the destination list
+    * are lost.
+    */
+   List<TYPE>&
+   operator = (
+      const List<TYPE>& list);
+
+   /**
+    * Deallocate a list.  If items remain in the list, they are deallocated.
+    */
+   virtual ~List();
+
+   /**
+    * Check whether a list is empty (has no elements).
+    */
+   bool
+   isEmpty() const;
+
+   /**
+    * Return the number of items in the list.
+    */
+   int
+   getNumberOfItems() const;
+
+   /**
+    * Return the number of items in the list.  Identical to getNumberOfItems(),
+    * but this method is common to several container classes.
+    */
+   int
+   size() const;
+
+   /**
+    * Add a new item to the head of the list.
+    */
+   void
+   addItem(
+      const TYPE& item);
+
+   /**
+    * Add a new item to the list before the item pointed to by the
+    * specified iterator.
+    */
+   void
+   addItemBefore(
+      ListIterator<TYPE>& iter,
+      const TYPE& item);
+
+   /**
+    * Add a new item to the list after the item pointed to by the
+    * specified iterator.
+    */
+   void
+   addItemAfter(
+      ListIterator<TYPE>& iter,
+      const TYPE& item);
+
+   /**
+    * Add a new item to the tail of the list.
+    */
+   void
+   appendItem(
+      const TYPE& item);
+
+   /**
+    * Copy list items from the argument list.  The new items are
+    * appended to the end of the current list.  The argument list
+    * is not modified.
+    */
+   void
+   copyItems(
+      const List<TYPE>& list);
+
+   /**
+    * Catenate list items from the argument list to the end of the
+    * current list.  Unlike copyItems(), the argument list is set
+    * to null.
+    */
+   void
+   catenateItems(
+      List<TYPE>& list);
+
+   /**
+    * Catenate list items from the argument list to the front of the
+    * current list.  Unlike copyItems(), the argument list is set
+    * to null.
+    */
+   void
+   catenateItemsAtFront(
+      List<TYPE>& list);
+
+   /**
+    * Empty the list.  All list items are deallocated.
+    */
+   void
+   clearItems();
+
+   /**
+    * Return a reference to the first item in the list.  This operation is
+    * not defined if the list is empty.  This member function is const since
+    * it cannot change the list, although the item in the list may change.
+    */
+   TYPE&
+   getFirstItem() const;
+
+   /**
+    * Return a reference to the last item in the list.  This operation is
+    * not defined if the list is empty.  This member function is const since
+    * it cannot change the list, although the item in the list may change.
+    */
+   TYPE&
+   getLastItem() const;
+
+   /**
+    * Remove (deallocate) the first item in the list.
+    */
+   void
+   removeFirstItem();
+
+   /**
+    * Remove (deallocate) the last item in the list.
+    */
+   void
+   removeLastItem();
+
+   /**
+    * Remove (deallocate) the item pointed to by the iterator.  After
+    * performing the remove, the iterator becomes invalid.  Iterators
+    * that point to other elements in the list remain valid after the
+    * deletion of an item.
+    */
+   void
+   removeItem(
+      ListIterator<TYPE>& iter);
+
+   /**
+    * Reverse all elements in the list.  This operation is performed in-place
+    * by swapping next and previous list element pointers.
+    */
+   void
+   reverse();
+
+   /**
+    * Swap the contents with that of the argument.
+    *
+    * This method is O(1) complexity.
+    */
+   void
+   swap(
+      List& r);
+
+   /**
+    * Return a List<TYPE>::Iterator that points to the start of the list.
+    */
+   typename List<TYPE>::Iterator
+   listStart() const;
+
+   /**
+    * Return a List<TYPE>::Iterator that points to the end of the list.
+    */
+   typename List<TYPE>::Iterator
+   listEnd() const;
+
+private:
+   friend class ListIterator<TYPE>;
+
+   /**
+    * @brief Cleanup static caches.
+    *
+    * Free cached list nodes.  A cached list of list nodes is used to speed
+    * allocation and deallocation of list items.  This call will return this
+    * cached memory to the free memory pool.
+    */
+   static void
+   finalizeCallback();
+
+   int d_number_items;
+   ListNode<TYPE>* d_list_head;
+   ListNode<TYPE>* d_list_tail;
+
+   /**
+    * @brief Has shutdown handler been initialized.
+    *
+    * This should be checked and set in every ctor.
+    */
+   static bool s_initialized;
+
+   /**
+    * @brief Initialize shutdown handler.
+    */
+   static bool
+   initializeHandler();
+
+};
+
+/**
+ * Class ListNode holds items for the linked list.  This class should
+ * be defined inside the List class, but nested template classes can
+ * cause some compilers to barf.  List nodes should never be seen by the
+ * user of a list.
+ *
+ * There are no public functions for ListNode.
+ *
+ * @see tbox::List
+ */
+
+template<class TYPE>
+class ListNode
+{
+private:
+   static void
+   freeCachedListItems();
+
+   friend class ListIterator<TYPE>;
+   friend class List<TYPE>;
+
+   ListNode(
+      const TYPE& t,
+      ListNode<TYPE>* n,
+      ListNode<TYPE>* p);
+   ~ListNode();
+
+   void *
+   operator new (
+      size_t bytes);
+   void
+   operator delete (
+      void* what);
+
+   static ListNode<TYPE>* s_free_list;
+   static int s_num_free;
+   static int s_max_free;
+   static bool s_registered_callback;
+
+   TYPE d_item;
+   ListNode<TYPE>* d_next;
+   ListNode<TYPE>* d_prev;
+};
+
+/**
+ * Class ListIterator provides methods for stepping through lists.
+ * This class definition should be nested within List, but nested template
+ * classes can cause some compilers to barf.  The user should access this
+ * class through the name List<TYPE>::Iterator rather than through
+ * ListIterator<TYPE>, since the implementation may change as compilers
+ * mature.
+ *
+ * The list iterator should be used as follows:
+ * \verbatim
+ * List<TYPE> list;
+ * ...
+ * for (List<TYPE>::Iterator l(list); l; l++) {
+ *    ... = l();
+ * }
+ * \endverbatim
+ *
+ * @see tbox::List
+ */
+
+template<class TYPE>
+class ListIterator
+{
+public:
+   /**
+    * Default constructor for ListIterator.  This must be initialized
+    * before it can be used to iterate over a list.
+    */
+   ListIterator();
+
+   /**
+    * Create a list iterator pointing to the beginning of the specified list.
+    */
+   ListIterator(
+      const List<TYPE>& list);
+
+   /**
+    * Copy constructor for ListIterator.  Make this iterator point to the
+    * same list and item as the argument.
+    */
+   ListIterator(
+      const ListIterator<TYPE>& iterator);
+
+   /**
+    * Make the list iterator point to the same list and position as
+    * the argument.
+    */
+   ListIterator<TYPE>&
+   operator = (
+      const ListIterator<TYPE>& iterator);
+
+   /**
+    * Destructor for class ListIterator.
+    */
+   ~ListIterator();
+
+   /**
+    * Return the current item from the list.  The iterator must point
+    * to a valid item in the list; otherwise, this function may barf.
+    */
+   TYPE&
+   operator * ();
+
+   /**
+    * Return a const references to the current item from the list.
+    * The iterator must point to a valid item in the list; otherwise,
+    * this function may barf.
+    */
+   const TYPE&
+   operator * () const;
+
+   /**
+    * Return the current item from the list.  The iterator must point
+    * to a valid item in the list; otherwise, this function may barf.
+    */
+   TYPE&
+   operator () ();
+
+   /**
+    * Return a const reference to the current item from the list.
+    * The iterator must point to a valid item in the list; otherwise,
+    * this function may barf.
+    */
+   const TYPE&
+   operator () () const;
+
+   /**
+    * Return true if the iterator points to a valid list item.
+    */
+   operator bool () const;
+
+#ifndef LACKS_BOOL_VOID_RESOLUTION
+   /**
+    * Return a non-NULL value if the iterator points to a valid list item.
+    */
+   operator const void
+   * () const;
+#endif
+
+   /**
+    * Return whether the iterator points to a valid list item.  This
+    * operator mimics the !p operation applied to a pointer p.
+    */
+   bool
+   operator ! () const;
+
+   /**
+    * Increment the iterator to point to the next element in the list.
+    */
+   void
+   operator ++ (
+      int);
+
+   /**
+    * Decrement the iterator to point to the previous element in the list.
+    */
+   void
+   operator -- (
+      int);
+
+   /**
+    * Rewind the iterator to point to the first element in the list.
+    */
+   void
+   rewindIterator();
+
+   /**
+    * Fast forward the iterator to point to the last element in the list.
+    */
+   void
+   fastforwardIterator();
+
+   /**
+    * Test two iterators for equality (pointing to the same list item).
+    * This does not check whether two list items have the same value, but
+    * whether they are the same item.  Thus, if a and b are iterators,
+    * "a == b" (object sameness) is more restrictive than "a() == b()"
+    * (object equality).
+    */
+   bool
+   operator == (
+      const ListIterator<TYPE>& iterator) const;
+
+   /**
+    * Test two iterators for inequality (pointing to different list items).
+    * See the comments for operator== for more information about equality
+    * for list items.
+    */
+   bool
+   operator != (
+      const ListIterator<TYPE>& iterator) const;
+
+private:
+   friend class List<TYPE>;
+
+   ListIterator(
+      List<TYPE>* list,
+      ListNode<TYPE>* node);
+
+   List<TYPE>* d_list;
+   ListNode<TYPE>* d_node;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/tbox/List.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/tbox/List.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Logger.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Logger.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,198 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility functions for logging 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Logger.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+Logger * Logger::s_instance = NULL;
+
+StartupShutdownManager::Handler
+Logger::s_finalize_handler(
+   0,
+   0,
+   0,
+   Logger::finalizeCallback,
+   tbox::StartupShutdownManager::priorityLogger);
+
+/*
+ * Default Appender to print abort message and calling location to perr stream.
+ */
+
+class AbortAppender:public Logger::Appender
+{
+
+   void logMessage(
+      const std::string& message,
+      const std::string& filename,
+      const int line)
+   {
+      perr << "Program abort called in file ``" << filename
+           << "'' at line " << line << std::endl;
+      perr << "ERROR MESSAGE: " << std::endl << message.c_str() << std::endl;
+      perr << std::flush;
+   }
+};
+
+/*
+ * Default Appender to print a warning message and calling location to log stream.
+ */
+class WarningAppender:public Logger::Appender
+{
+
+   void logMessage(
+      const std::string& message,
+      const std::string& filename,
+      const int line)
+   {
+      plog << "Warning in file ``" << filename
+           << "'' at line " << line << std::endl;
+      plog << "WARNING MESSAGE: " << std::endl << message.c_str() << std::endl;
+      plog << std::flush;
+   }
+};
+
+/*
+ * Default Appender to print a debug message and calling location to log stream.
+ */
+class DebugAppender:public Logger::Appender
+{
+
+   void logMessage(
+      const std::string& message,
+      const std::string& filename,
+      const int line)
+   {
+      plog << "Debug in file ``" << filename
+           << "'' at line " << line << std::endl;
+      plog << "DEBUG MESSAGE: " << std::endl << message.c_str() << std::endl;
+      plog << std::flush;
+   }
+};
+
+/*
+ * Default constructor for Logger singleton
+ */
+Logger::Logger():
+   d_log_warning(true),
+   d_log_debug(false)
+{
+   /*
+    * Initializers for default logging methods.
+    */
+   d_abort_appender = new AbortAppender();
+
+   d_warning_appender = new WarningAppender();
+
+   d_debug_appender = new DebugAppender();
+
+}
+
+/*
+ * Default destructor for Logger singleton
+ */
+Logger::~Logger()
+{
+   d_abort_appender.setNull();
+   d_warning_appender.setNull();
+   d_debug_appender.setNull();
+}
+
+void Logger::finalizeCallback()
+{
+   if (s_instance) {
+      delete s_instance;
+      s_instance = static_cast<Logger *>(NULL);
+   }
+}
+
+Logger *Logger::getInstance()
+{
+   if (s_instance == static_cast<Logger *>(NULL)) {
+      s_instance = new Logger();
+   }
+
+   return s_instance;
+}
+
+/*
+ * Log an abort message.
+ */
+void Logger::logAbort(
+   const std::string& message,
+   const std::string& filename,
+   const int line)
+{
+   d_abort_appender->logMessage(message, filename, line);
+}
+
+/*
+ * Log a warning message.
+ */
+void Logger::logWarning(
+   const std::string& message,
+   const std::string& filename,
+   const int line)
+{
+   if (d_log_warning) {
+      d_warning_appender->logMessage(message, filename, line);
+   }
+}
+
+/*
+ * Log a debug message.
+ */
+void Logger::logDebug(
+   const std::string& message,
+   const std::string& filename,
+   const int line)
+{
+   if (d_log_debug) {
+      d_debug_appender->logMessage(message, filename, line);
+   }
+}
+
+/*
+ * Set appenders.
+ */
+void Logger::setAbortAppender(
+   tbox::Pointer<Appender> appender) {
+   d_abort_appender = appender;
+}
+
+void Logger::setWarningAppender(
+   tbox::Pointer<Appender> appender) {
+   d_warning_appender = appender;
+}
+
+void Logger::setDebugAppender(
+   tbox::Pointer<Appender> appender) {
+   d_debug_appender = appender;
+}
+
+/*
+ * Set logging state.
+ */
+
+void Logger::setWarning(
+   bool onoff) {
+   d_log_warning = onoff;
+}
+
+void Logger::setDebug(
+   bool onoff) {
+   d_log_debug = onoff;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Logger.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Logger.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,229 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility class for logging. 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_Logger
+#define included_tbox_Logger
+
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace tbox {
+
+/*!
+ * Logger is a Singleton class for logging error, debug, and warning messages.
+ *
+ * The logAbort, logWarning, and logDebug methods are used to log a
+ * message coming from a file and line.
+ *
+ * Warning and Debug messages can be turned on/off using the
+ * setWarning and setDebug methods.  Abort messages may not be turned
+ * off.
+ *
+ * Applications may override the logging mechanism.The basic idea is
+ * the singleton Logger directs log messages to the appropriate
+ * Appender which is responsible for writing the log message.  The
+ * Appender is the destination for the log message.  Users may supply
+ * implementors of the Appender interface to log the messages to
+ * different I/O streams or elsewhere.  In this way applications can
+ * redirect SAMRAI generated messages to that applications logging
+ * mechanism.  Appenders may be provided for abort, warning, and/or
+ * debug messages.  The same Appender may be used for all messages.
+ *
+ *
+ * For example to log to a stream simply inherit from LoggerAppender and
+ * implement the logMesage method:
+ * \code
+ *
+ *   class StreamAppender : public tbox::Logger::Appender {
+ *
+ *   public:
+ *
+ *      StreamAppender(ostream *stream) {
+ *         d_stream = stream;
+ *      }
+ *
+ *      void logMessage(const std::string &message,
+ *                 const std::string &filename,
+ *                 const int line)
+ *      {
+ *         (*d_stream) << "At :" << filename << " line :" << line
+ *                     << " message: " << message << std::endl;
+ *      }
+ *
+ *   private:
+ *      ostream *d_stream;
+ *   };
+ * \endcode
+ *
+ *
+ * This Appender could be use to log warning message using:
+ * tbox::Pointer<tbox::Logger::Appender> appender = new ConsoleAppender()
+ * tbox::Logger.getInstance() -> setWarningAppender(appender);
+ *
+ * Normally this would be done at the start of an application.
+ *
+ */
+class Logger
+{
+
+public:
+   /*!
+    * Interface for class that does the logging for the Logger.
+    *
+    *
+    */
+   class Appender
+   {
+
+public:
+      /*!
+       * Log a message with file and location information.
+       */
+      virtual void
+      logMessage(
+         const std::string& message,
+         const std::string& filename,
+         const int line) = 0;
+
+      virtual ~Appender() {
+      }
+   };
+
+   /*!
+    * Gets the instance of the singleton logger.
+    */
+   static Logger *
+   getInstance();
+
+   /*!
+    * Logs an abort message with file & location
+    */
+   void
+   logAbort(
+      const std::string& message,
+      const std::string& filename,
+      const int line);
+
+   /*!
+    * Logs warning message with file & location.
+    */
+   void
+   logWarning(
+      const std::string& message,
+      const std::string& filename,
+      const int line);
+
+   /*!
+    * Logs debug message with file & location.
+    */
+   void
+   logDebug(
+      const std::string& message,
+      const std::string& filename,
+      const int line);
+
+   /*!
+    * Set the Appender for logging abort messages to an
+    * application specific class.
+    *
+    * Default is to log to perr.
+    */
+   void
+   setAbortAppender(
+      tbox::Pointer<Appender> appender);
+
+   /*!
+    * Set the Appender for logging warning messages to an
+    * application specific class.
+    *
+    * Default is to log to plog.
+    */
+   void
+   setWarningAppender(
+      tbox::Pointer<Appender> appender);
+
+   /*!
+    * Set the Appender for logging debug messages to an
+    * application specific class.
+    *
+    * Default is to log to plog.
+    */
+   void
+   setDebugAppender(
+      tbox::Pointer<Appender> appender);
+
+   /*!
+    * Turn logging of warning messages on or off.
+    *
+    * Default is on.
+    */
+   void
+   setWarning(
+      bool onoff);
+
+   /*!
+    * Turn logging of debug messages on or off.
+    *
+    * Default is off.
+    */
+   void
+   setDebug(
+      bool onoff);
+
+private:
+   /*
+    * Private constructor to avoid construction of the singleton
+    * outside this class.
+    */
+   Logger();
+
+   /*
+    * Private destructor to avoid destruction of the singleton
+    * outside this class.
+    */
+   ~Logger();
+
+   /*!
+    * Frees instance of the singleton logger.
+    *
+    * NOTE: should be called by StartupShutdownManager only.
+    */
+   static void
+   finalizeCallback();
+
+   /*
+    * Instance of the singleton.
+    */
+   static Logger* s_instance;
+
+   /*
+    * Appenders for each type of logging.
+    */
+   tbox::Pointer<Appender> d_abort_appender;
+   tbox::Pointer<Appender> d_warning_appender;
+   tbox::Pointer<Appender> d_debug_appender;
+
+   /*
+    * Logging state (on or off)
+    */
+   bool d_log_warning;
+   bool d_log_debug;
+
+   static StartupShutdownManager::Handler
+   s_finalize_handler;
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1911 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=Array.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h Array.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=ArraySpecial.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h ArraySpecial.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=AsyncCommGroup.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommGroup.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommGroup.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h AsyncCommGroup.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=AsyncCommPeer.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h AsyncCommPeer.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
+FILE_4=AsyncCommStage.o
+DEPENDS_4:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h AsyncCommStage.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_4 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_4:X.o=${NDIM}.o}: ${DEPENDS_4}
+
+FILE_5=BalancedDepthFirstTree.o
+DEPENDS_5:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/BalancedDepthFirstTree.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h BalancedDepthFirstTree.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_5 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_5:X.o=${NDIM}.o}: ${DEPENDS_5}
+
+FILE_6=Clock.o
+DEPENDS_6:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h Clock.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_6 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_6:X.o=${NDIM}.o}: ${DEPENDS_6}
+
+FILE_7=ConstPointer.o
+DEPENDS_7:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	ConstPointer.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_7 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_7:X.o=${NDIM}.o}: ${DEPENDS_7}
+
+FILE_8=ConstPointerBase.o
+DEPENDS_8:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	ConstPointerBase.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_8 +=\
+	
+endif
+
+${FILE_8:X.o=${NDIM}.o}: ${DEPENDS_8}
+
+FILE_9=Database.o
+DEPENDS_9:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h Database.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_9 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_9:X.o=${NDIM}.o}: ${DEPENDS_9}
+
+FILE_10=DatabaseBox.o
+DEPENDS_10:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h DatabaseBox.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_10 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_10:X.o=${NDIM}.o}: ${DEPENDS_10}
+
+FILE_11=Database_template_methods.o
+DEPENDS_11:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	Database_template_methods.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_11 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_11:X.o=${NDIM}.o}: ${DEPENDS_11}
+
+FILE_12=DescribedClass.o
+DEPENDS_12:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h DescribedClass.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_12 +=\
+	
+endif
+
+${FILE_12:X.o=${NDIM}.o}: ${DEPENDS_12}
+
+FILE_13=Dimension.o
+DEPENDS_13:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h Dimension.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_13 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_13:X.o=${NDIM}.o}: ${DEPENDS_13}
+
+FILE_14=Grammar.o
+DEPENDS_14:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Parser.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Parser.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h Grammar.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_14 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_14:X.o=${NDIM}.o}: ${DEPENDS_14}
+
+FILE_15=HDFDatabase.o
+DEPENDS_15:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h HDFDatabase.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_15 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_15:X.o=${NDIM}.o}: ${DEPENDS_15}
+
+FILE_16=HDFDatabaseFactory.o
+DEPENDS_16:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h HDFDatabaseFactory.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_16 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_16:X.o=${NDIM}.o}: ${DEPENDS_16}
+
+FILE_17=IEEE.o
+DEPENDS_17:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IEEE.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IEEE.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h IEEE.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_17 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_17:X.o=${NDIM}.o}: ${DEPENDS_17}
+
+FILE_18=InputManager.o
+DEPENDS_18:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Parser.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Parser.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h InputManager.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_18 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_18:X.o=${NDIM}.o}: ${DEPENDS_18}
+
+FILE_19=List.o
+DEPENDS_19:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h List.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_19 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_19:X.o=${NDIM}.o}: ${DEPENDS_19}
+
+FILE_20=Logger.o
+DEPENDS_20:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h Logger.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_20 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_20:X.o=${NDIM}.o}: ${DEPENDS_20}
+
+FILE_21=MathUtilities.o
+DEPENDS_21:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h MathUtilities.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_21 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_21:X.o=${NDIM}.o}: ${DEPENDS_21}
+
+FILE_22=MathUtilitiesSpecial.o
+DEPENDS_22:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h MathUtilitiesSpecial.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_22 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_22:X.o=${NDIM}.o}: ${DEPENDS_22}
+
+FILE_23=MemoryDatabase.o
+DEPENDS_23:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h MemoryDatabase.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_23 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_23:X.o=${NDIM}.o}: ${DEPENDS_23}
+
+FILE_24=MemoryDatabaseFactory.o
+DEPENDS_24:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabaseFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h MemoryDatabaseFactory.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_24 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_24:X.o=${NDIM}.o}: ${DEPENDS_24}
+
+FILE_25=MemoryUtilities.o
+DEPENDS_25:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h MemoryUtilities.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_25 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_25:X.o=${NDIM}.o}: ${DEPENDS_25}
+
+FILE_26=MessageStream.o
+DEPENDS_26:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h MessageStream.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_26 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_26:X.o=${NDIM}.o}: ${DEPENDS_26}
+
+FILE_27=MessageStream_template_methods.o
+DEPENDS_27:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	MessageStream_template_methods.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_27 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_27:X.o=${NDIM}.o}: ${DEPENDS_27}
+
+FILE_28=NullDatabase.o
+DEPENDS_28:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/NullDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/NullDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h NullDatabase.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_28 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_28:X.o=${NDIM}.o}: ${DEPENDS_28}
+
+FILE_29=PIO.o
+DEPENDS_29:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ParallelBuffer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h PIO.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_29 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_29:X.o=${NDIM}.o}: ${DEPENDS_29}
+
+FILE_30=ParallelBuffer.o
+DEPENDS_30:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ParallelBuffer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h ParallelBuffer.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_30 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_30:X.o=${NDIM}.o}: ${DEPENDS_30}
+
+FILE_31=Parser.o
+DEPENDS_31:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Parser.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Parser.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h Parser.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_31 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_31:X.o=${NDIM}.o}: ${DEPENDS_31}
+
+FILE_32=Pointer.o
+DEPENDS_32:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h Pointer.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_32 +=\
+	
+endif
+
+${FILE_32:X.o=${NDIM}.o}: ${DEPENDS_32}
+
+FILE_33=PointerBase.o
+DEPENDS_33:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	PointerBase.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_33 +=\
+	
+endif
+
+${FILE_33:X.o=${NDIM}.o}: ${DEPENDS_33}
+
+FILE_34=RankGroup.o
+DEPENDS_34:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h RankGroup.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_34 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_34:X.o=${NDIM}.o}: ${DEPENDS_34}
+
+FILE_35=ReferenceCounter.o
+DEPENDS_35:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	ReferenceCounter.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_35 +=\
+	
+endif
+
+${FILE_35:X.o=${NDIM}.o}: ${DEPENDS_35}
+
+FILE_36=RestartManager.o
+DEPENDS_36:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/NullDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/NullDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Parser.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Parser.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h RestartManager.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_36 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_36:X.o=${NDIM}.o}: ${DEPENDS_36}
+
+FILE_37=SAMRAIManager.o
+DEPENDS_37:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IEEE.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IEEE.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h SAMRAIManager.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_37 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_37:X.o=${NDIM}.o}: ${DEPENDS_37}
+
+FILE_38=SAMRAI_MPI.o
+DEPENDS_38:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h SAMRAI_MPI.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_38 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_38:X.o=${NDIM}.o}: ${DEPENDS_38}
+
+FILE_39=Scanner.o
+DEPENDS_39:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Parser.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Parser.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h Grammar.h Scanner.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_39 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_39:X.o=${NDIM}.o}: ${DEPENDS_39}
+
+FILE_40=Schedule.o
+DEPENDS_40:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h Schedule.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_40 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_40:X.o=${NDIM}.o}: ${DEPENDS_40}
+
+FILE_41=SiloDatabase.o
+DEPENDS_41:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SiloDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h SiloDatabase.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_41 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_41:X.o=${NDIM}.o}: ${DEPENDS_41}
+
+FILE_42=SiloDatabaseFactory.o
+DEPENDS_42:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SiloDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SiloDatabaseFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h SiloDatabaseFactory.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_42 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_42:X.o=${NDIM}.o}: ${DEPENDS_42}
+
+FILE_43=StartupShutdownManager.o
+DEPENDS_43:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h StartupShutdownManager.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_43 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_43:X.o=${NDIM}.o}: ${DEPENDS_43}
+
+FILE_44=StatTransaction.o
+DEPENDS_44:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StatTransaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h StatTransaction.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_44 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_44:X.o=${NDIM}.o}: ${DEPENDS_44}
+
+FILE_45=Statistic.o
+DEPENDS_45:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h Statistic.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_45 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_45:X.o=${NDIM}.o}: ${DEPENDS_45}
+
+FILE_46=Statistician.o
+DEPENDS_46:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StatTransaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h Statistician.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_46 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_46:X.o=${NDIM}.o}: ${DEPENDS_46}
+
+FILE_47=Timer.o
+DEPENDS_47:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h Timer.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_47 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_47:X.o=${NDIM}.o}: ${DEPENDS_47}
+
+FILE_48=TimerManager.o
+DEPENDS_48:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h TimerManager.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_48 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_48:X.o=${NDIM}.o}: ${DEPENDS_48}
+
+FILE_49=Tracer.o
+DEPENDS_49:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Tracer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Tracer.h Tracer.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_49 +=\
+	
+endif
+
+${FILE_49:X.o=${NDIM}.o}: ${DEPENDS_49}
+
+FILE_50=Transaction.o
+DEPENDS_50:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h Transaction.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_50 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_50:X.o=${NDIM}.o}: ${DEPENDS_50}
+
+FILE_51=Utilities.o
+DEPENDS_51:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h Utilities.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_51 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_51:X.o=${NDIM}.o}: ${DEPENDS_51}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,46 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   primary makefile for compiling the SAMRAI tbox package 
+##
+#########################################################################
+
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/SAMRAI/tbox
+VPATH         = @srcdir@
+OBJECT        = ../../..
+
+default: library
+
+include $(OBJECT)/config/Makefile.config
+
+SUBDIRS = fortran
+
+OBJS = 	\
+        Grammar.o InputManager.o Parser.o Scanner.o DatabaseBox.o \
+	Database.o MemoryDatabase.o \
+	MemoryDatabaseFactory.o  \
+	MessageStream.o SAMRAI_MPI.o Schedule.o \
+	Transaction.o AsyncCommGroup.o AsyncCommStage.o \
+	BalancedDepthFirstTree.o DescribedClass.o ConstPointerBase.o \
+	MemoryUtilities.o PointerBase.o ReferenceCounter.o \
+	ArraySpecial.o HDFDatabase.o HDFDatabaseFactory.o \
+	SiloDatabase.o SiloDatabaseFactory.o RestartManager.o \
+	NullDatabase.o IEEE.o ParallelBuffer.o PIO.o SAMRAIManager.o \
+	StartupShutdownManager.o Tracer.o Utilities.o Logger.o \
+	MathUtilitiesSpecial.o Clock.o Statistic.o Statistician.o \
+	StatTransaction.o Timer.o TimerManager.o Dimension.o \
+        RankGroup.o 
+
+library: $(OBJS)
+	for DIR in $(SUBDIRS); do if test -d $$DIR; then (cd $$DIR && $(MAKE) $@) ; fi || exit 1; done
+clean:
+	$(SAMCLEAN)
+	for DIR in $(SUBDIRS); do if test -d $$DIR; then (cd $$DIR && $(MAKE) $@) ; fi || exit 1; done
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/MathUtilities.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/MathUtilities.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,134 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utilities class to access common POSIX constants and math ops 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_MathUtilities_C
+#define included_tbox_MathUtilities_C
+
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/tbox/MathUtilities.I"
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to initialize arrays to signaling NaNs.                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void MathUtilities<TYPE>::setArrayToSignalingNaN(
+   Array<TYPE>& array)
+{
+   for (int i = 0; i < array.getSize(); i++) {
+      array[i] = getSignalingNaN();
+   }
+}
+
+template<class TYPE>
+void MathUtilities<TYPE>::setArrayToSignalingNaN(
+   TYPE* array,
+   int n)
+{
+   for (int i = 0; i < n; i++) {
+      array[i] = getSignalingNaN();
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to initialize arrays to max value for type.                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void MathUtilities<TYPE>::setArrayToMax(
+   Array<TYPE>& array)
+{
+   for (int i = 0; i < array.getSize(); i++) {
+      array[i] = getMax();
+   }
+}
+
+template<class TYPE>
+void MathUtilities<TYPE>::setArrayToMax(
+   TYPE* array,
+   int n)
+{
+   for (int i = 0; i < n; i++) {
+      array[i] = getMax();
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to initialize arrays to min value for type.                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void MathUtilities<TYPE>::setArrayToMin(
+   Array<TYPE>& array)
+{
+   for (int i = 0; i < array.getSize(); i++) {
+      array[i] = getMin();
+   }
+}
+
+template<class TYPE>
+void MathUtilities<TYPE>::setArrayToMin(
+   TYPE* array,
+   int n)
+{
+   for (int i = 0; i < n; i++) {
+      array[i] = getMin();
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to initialize arrays to epsilon value for type.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+template<class TYPE>
+void MathUtilities<TYPE>::setArrayToEpsilon(
+   Array<TYPE>& array)
+{
+   for (int i = 0; i < array.getSize(); i++) {
+      array[i] = getEpsilon();
+   }
+}
+
+template<class TYPE>
+void MathUtilities<TYPE>::setArrayToEpsilon(
+   TYPE* array,
+   int n)
+{
+   for (int i = 0; i < n; i++) {
+      array[i] = getEpsilon();
+   }
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/MathUtilities.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/MathUtilities.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,109 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utilities class to access common POSIX constants and math ops 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace tbox {
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE MathUtilities<TYPE>::getZero()
+{
+   return s_zero;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE MathUtilities<TYPE>::getOne()
+{
+   return s_one;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE MathUtilities<TYPE>::getSignalingNaN()
+{
+   return s_signaling_nan;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE MathUtilities<TYPE>::getMax()
+{
+   return s_max;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE MathUtilities<TYPE>::getMin()
+{
+   return s_min;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE MathUtilities<TYPE>::getEpsilon()
+{
+   return s_epsilon;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+bool MathUtilities<TYPE>::isNaN(
+   const TYPE& value)
+{
+   (void)value;
+   return false;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+bool MathUtilities<TYPE>::equalEps(
+   const TYPE& a,
+   const TYPE& b)
+{
+   return a == b;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE MathUtilities<TYPE>::Min(
+   TYPE a,
+   TYPE b)
+{
+   return a < b ? a : b;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE MathUtilities<TYPE>::Max(
+   TYPE a,
+   TYPE b)
+{
+   return a > b ? a : b;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE MathUtilities<TYPE>::Abs(
+   TYPE value)
+{
+   return value;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE MathUtilities<TYPE>::round(
+   TYPE x)
+{
+   return x;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/MathUtilities.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/MathUtilities.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,410 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utilities class to access common POSIX constants and math ops 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_MathUtilities
+#define included_tbox_MathUtilities
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Complex.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+/*!
+ * Class MathUtilities is a utility that provides some basic math-related
+ * functions and routines for initializing data to signaling NaNs and
+ * POSIX constants like INT_MAX, FLT_MAX, DBL_MAX, etc.  Signaling
+ * NaNs force a trap if they are used in a numerical operation, so
+ * they are a useful way to track uninitialized floating point data.
+ * For example, setting integer values to INT_MAX is a useful way to track
+ * uninitialized integer values.
+ *
+ * IMPORTANT: To properly trap operations based on signaling NaN values,
+ *            the routine IEEE::setupFloatingPointExceptionHandlers()
+ *            must be called.  This is normally done in the
+ *            SAMRAIManager::startup() routine.
+ *
+ * The implementation of this class depends heavily on the particular
+ * computer architecture and how it implements floating point arithmetic
+ * and hardware traps.
+ *
+ * Note that the class @see tbox::IEEE also provides operations for
+ * dealing with signaling NaNs.  This class provides the actual
+ * implementation for such operations with functions in tbox::IEEE
+ * calling the approriate operations provided here.  The class
+ * tbox::IEEE is not templated on the data type and so calling the
+ * operations provided there may be easier in some cases, such as in
+ * codes built based on earlier versions of SAMRAI.
+ */
+
+template<class TYPE>
+class MathUtilities
+{
+public:
+   /*!
+    * @brief Return the value 0 for the template type.
+    */
+   static TYPE
+   getZero();
+
+   /*!
+    * @brief Return the value 1 for the template type.
+    */
+   static TYPE
+   getOne();
+
+   /*!
+    * @brief Return the IEEE signaling NaN for the template type on
+    * architectures that support it.
+    *
+    * Using this value in a numerical expression will
+    * cause a program abort.
+    *
+    * For float, double, and dcomplex types, the usual signaling
+    * Nan value will be returned if defined for the architecture
+    * and compiler.  For char and int types, the POSIX max value for
+    * the type is returned.  For other template types, zero is returned.
+    */
+   static TYPE
+   getSignalingNaN();
+
+   /*!
+    * @brief Return true if the supplied value is NaN; else, false.
+    *
+    * For float and double, will check value against signaling NaN.
+    * For dcomplex will return true if either real and imaginary part
+    * is signaling NaN and false otherwise.
+    * For other types will return false always.
+    *
+    * @param value Value to test
+    */
+   static bool
+   isNaN(
+      const TYPE& value);
+
+   /*!
+    * @brief Set array entries to value given by getSignalingNaN().
+    *
+    * @param array SAMRAI array to set
+    */
+   static void
+   setArrayToSignalingNaN(
+      Array<TYPE>& array);
+
+   /*!
+    * @brief Set array entries to value given by getSignalingNaN().
+    *
+    * @param array Pointer to first array entry
+    * @param n     Integer to number of array entries.
+    */
+   static void
+   setArrayToSignalingNaN(
+      TYPE* array,
+      int n = 1);
+
+   /*!
+    * @brief Return true if given values have a relative difference
+    * smaller than sqrt(mach_eps) for the template type.
+    *
+    * Valid for float/double/dcomplex only.  For dcomplex will
+    * return true if both real and imaginary part values
+    * have a relative difference smaller than sqrt(mach_eps).
+    *
+    * For non float/double/dcomplex will just return ( a == b ).
+    *
+    * @param a
+    * @param b
+    */
+   static bool
+   equalEps(
+      const TYPE& a,
+      const TYPE& b);
+
+   /*!
+    * @brief Return max value for the template type.
+    *
+    * For boolean type, will return "true".  For dcomplex type,
+    * will return a dcomplex value with both real and imaginary
+    * parts set to the POSIX max value for type double.  For
+    * other types, will return the POSIX max value for the type.
+    */
+   static TYPE
+   getMax();
+
+   /*!
+    * @brief Set array entries to value given by getMax().
+    *
+    * @param array SAMRAI array to set
+    */
+   static void
+   setArrayToMax(
+      Array<TYPE>& array);
+
+   /*!
+    * @brief Set array entries to value given by getMax().
+    *
+    * @param array Pointer to first array entry
+    * @param n     Integer to number of array entries.
+    */
+   static void
+   setArrayToMax(
+      TYPE* array,
+      int n = 1);
+
+   /*!
+    * @brief Return min value for the template type.
+    *
+    * For boolean type, will return "false".  For dcomplex type,
+    * will return a dcomplex value with both real and imaginary
+    * parts set to the POSIX min value for type double.  For
+    * other types, will return the POSIX min value for the type.
+    */
+   static TYPE
+   getMin();
+
+   /*!
+    * @brief Set array entries to value given by getMin().
+    *
+    * @param array SAMRAI array to set
+    */
+   static void
+   setArrayToMin(
+      Array<TYPE>& array);
+
+   /*!
+    * @brief Set array entries to value given by getMin().
+    *
+    * @param array Pointer to first array entry
+    * @param n     Integer to number of array entries.
+    */
+   static void
+   setArrayToMin(
+      TYPE* array,
+      int n = 1);
+
+   /*!
+    * @brief Return epsilon value for the template type.
+    *
+    * For boolean type, will return "true".  For integer type, will
+    * return "1".  For dcomplex type, will return a dcomplex value with
+    * both real and imaginary parts set to the POSIX epsilon value for
+    * type double.  For other types, will return the POSIX epsilon value
+    * for the type.
+    */
+   static TYPE
+   getEpsilon();
+
+   /*!
+    * @brief Set array entries to value given by getEpsilon().
+    *
+    * @param array SAMRAI array to set
+    */
+   static void
+   setArrayToEpsilon(
+      Array<TYPE>& array);
+
+   /*!
+    * @brief Set array entries to value given by getEpsilon().
+    *
+    * @param array Pointer to first array entry
+    * @param n     Integer to number of array entries.
+    */
+   static void
+   setArrayToEpsilon(
+      TYPE* array,
+      int n = 1);
+
+   /*!
+    * @brief Return the minimum value of a and b.
+    *
+    * For dcomplex type will return the value with the minimum norm.
+    *
+    * @param a
+    * @param b
+    */
+   static TYPE
+   Min(
+      TYPE a,
+      TYPE b);
+
+   /*!
+    * @brief Return the maximum value of a and b.
+    *
+    * For dcomplex type will return the value with the maximum norm.
+    *
+    * @param a
+    * @param b
+    */
+   static TYPE
+   Max(
+      TYPE a,
+      TYPE b);
+
+   /*!
+    * @brief Return absolute value of a.
+    *
+    * For int, float, and double types will return the absolute
+    * numerical value.  For other types, will return the input value.
+    *
+    * @param a
+    */
+   static TYPE
+   Abs(
+      TYPE a);
+
+   /*!
+    * @brief Return nearest integral value.
+    *
+    * If the argument is halfway between two integral
+    * values then round away from zero for float and double types.
+    * For other types, will return the input value.
+    *
+    * @param a
+    */
+   static TYPE
+   round(
+      TYPE a);
+
+   /*!
+    * @brief Generate and return a random value from low to low+width.
+    *
+    * For boolean type, value is either "true" or "false" based on
+    * value generated by mrand48().  For other types, returned value is
+    * computed as width * drand48() + low.  When type is char, this value
+    * is cast to a char. When type is dcomplex, real and imaginary
+    * parts are computed separately this way.
+    *
+    * @param low   Starting value for range
+    * @param width Width of the range.
+    */
+   static TYPE
+   Rand(
+      const TYPE& low,
+      const TYPE& width);
+
+private:
+   static TYPE s_zero;
+   static TYPE s_one;
+   static TYPE s_signaling_nan;
+   static TYPE s_max;
+   static TYPE s_min;
+   static TYPE s_epsilon;
+};
+
+/*
+ * Template specializations.
+ */
+template<>
+bool
+MathUtilities<float>::isNaN(
+   const float& value);
+template<>
+bool
+MathUtilities<double>::isNaN(
+   const double& value);
+template<>
+bool
+MathUtilities<dcomplex>::isNaN(
+   const dcomplex& value);
+
+template<>
+bool
+MathUtilities<float>::equalEps(
+   const float& a,
+   const float& b);
+template<>
+bool
+MathUtilities<double>::equalEps(
+   const double& a,
+   const double& b);
+template<>
+bool
+MathUtilities<dcomplex>::equalEps(
+   const dcomplex& a,
+   const dcomplex& b);
+
+template<>
+bool
+MathUtilities<bool>::Rand(
+   const bool& low,
+   const bool& width);
+template<>
+char
+MathUtilities<char>::Rand(
+   const char& low,
+   const char& width);
+template<>
+int
+MathUtilities<int>::Rand(
+   const int& low,
+   const int& width);
+template<>
+float
+MathUtilities<float>::Rand(
+   const float& low,
+   const float& width);
+template<>
+double
+MathUtilities<double>::Rand(
+   const double& low,
+   const double& width);
+template<>
+dcomplex
+MathUtilities<dcomplex>::Rand(
+   const dcomplex& low,
+   const dcomplex& width);
+
+template<>
+dcomplex
+MathUtilities<dcomplex>::Min(
+   dcomplex a,
+   dcomplex b);
+template<>
+dcomplex
+MathUtilities<dcomplex>::Max(
+   dcomplex a,
+   dcomplex b);
+
+template<>
+int
+MathUtilities<int>::Abs(
+   int a);
+template<>
+float
+MathUtilities<float>::Abs(
+   float a);
+template<>
+double
+MathUtilities<double>::Abs(
+   double a);
+
+template<>
+float
+MathUtilities<float>::round(
+   float a);
+template<>
+double
+MathUtilities<double>::round(
+   double a);
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/tbox/MathUtilities.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/tbox/MathUtilities.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/MathUtilitiesSpecial.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/MathUtilitiesSpecial.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,414 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   MathUtilities routines to set up handlers and get signaling NaNs 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#ifdef HAVE_CMATH_ISNAN
+#include <cmath>
+#include <math.h>
+#else
+#include <math.h>
+#endif
+
+#include <float.h>
+#include <limits.h>
+#include <stdlib.h>
+
+#include "SAMRAI/tbox/Complex.h"
+
+/*
+ * Floating point assertion handling.
+ * The following lines setup assertion handling header files on
+ * systems other than solaris.
+ */
+#if defined(HAVE_EXCEPTION_HANDLING)
+#include <stdlib.h>
+#include <stdio.h>
+#include <fpu_control.h>
+#include <signal.h>
+#endif
+
+/*
+ * The following lines setup assertion handling headers on the Sun.  If we
+ * use Sun's native compiler, just pull in the <sunmath.h> include file.
+ * If we are under solaris but use a different compiler (e.g. g++)
+ * we have to explicitly define the functions that <sunmath.h> defines,
+ * since we don't have access to this file.
+ */
+#ifdef __SUNPRO_CC
+#include <sunmath.h>
+#endif
+
+#ifdef __INTEL_COMPILER
+// Ignore Intel compiler remarks about non-pointer conversions.
+#pragma warning (disable:2259)
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+/*
+ *  Settings for the various signaling NaNs on different systems
+ */
+//#if !defined(FLT_SNAN_IS_BROKEN)
+//#define SAMRAI_FLT_SNAN FLT_SNAN
+//#elif !defined(FLT_MAX_IS_BROKEN)
+//#define SAMRAI_FLT_SNAN FLT_MAX
+//#else
+//#define SAMRAI_FLT_SNAN NAN
+//#endif
+//
+//#if !defined(DBL_SNAN_IS_BROKEN)
+//#define SAMRAI_DBL_SNAN DBL_SNAN
+//#elif !defined(DBL_MAX_IS_BROKEN)
+//#define SAMRAI_DBL_SNAN DBL_MAX
+//#else
+//#define SAMRAI_DBL_SNAN NAN
+//#endif
+
+// TODO:  This is in place ONLY for the 3.0.10 patch release.  A change to the
+// way we are doing signaling NaNs will be in the next release.
+#define SAMRAI_FLT_SNAN FLT_MAX
+#define SAMRAI_DBL_SNAN DBL_MAX
+
+template<>
+bool MathUtilities<bool>::s_zero = false;
+template<>
+bool MathUtilities<bool>::s_one = true;
+template<>
+bool MathUtilities<bool>::s_signaling_nan = false;
+template<>
+bool MathUtilities<bool>::s_max = true;
+template<>
+bool MathUtilities<bool>::s_min = false;
+template<>
+bool MathUtilities<bool>::s_epsilon = true;
+
+template<>
+char MathUtilities<char>::s_zero = 0;
+template<>
+char MathUtilities<char>::s_one = 1;
+template<>
+char MathUtilities<char>::s_signaling_nan = CHAR_MAX;
+template<>
+char MathUtilities<char>::s_max = CHAR_MAX;
+template<>
+char MathUtilities<char>::s_min = CHAR_MIN;
+template<>
+char MathUtilities<char>::s_epsilon = 1;
+
+template<>
+int MathUtilities<int>::s_zero = 0;
+template<>
+int MathUtilities<int>::s_one = 1;
+template<>
+int MathUtilities<int>::s_signaling_nan = INT_MAX;
+template<>
+int MathUtilities<int>::s_max = INT_MAX;
+template<>
+int MathUtilities<int>::s_min = INT_MIN;
+template<>
+int MathUtilities<int>::s_epsilon = 1;
+
+template<>
+float MathUtilities<float>::s_zero = 0.0;
+template<>
+float MathUtilities<float>::s_one = 1.0;
+template<>
+float MathUtilities<float>::s_signaling_nan = SAMRAI_FLT_SNAN;
+template<>
+float MathUtilities<float>::s_max = FLT_MAX;
+template<>
+float MathUtilities<float>::s_min = FLT_MIN;
+template<>
+float MathUtilities<float>::s_epsilon = FLT_EPSILON;
+
+template<>
+double MathUtilities<double>::s_zero = 0.0;
+template<>
+double MathUtilities<double>::s_one = 1.0;
+template<>
+double MathUtilities<double>::s_signaling_nan = SAMRAI_DBL_SNAN;
+template<>
+double MathUtilities<double>::s_max = DBL_MAX;
+template<>
+double MathUtilities<double>::s_min = DBL_MIN;
+template<>
+double MathUtilities<double>::s_epsilon = DBL_EPSILON;
+
+template<>
+dcomplex MathUtilities<dcomplex>::s_zero = dcomplex(0.0, 0.0);
+template<>
+dcomplex MathUtilities<dcomplex>::s_one = dcomplex(1.0, 0.0);
+template<>
+dcomplex MathUtilities<dcomplex>::s_signaling_nan = dcomplex(SAMRAI_DBL_SNAN,
+      SAMRAI_DBL_SNAN);
+template<>
+dcomplex MathUtilities<dcomplex>::s_max = dcomplex(DBL_MAX, DBL_MAX);
+template<>
+dcomplex MathUtilities<dcomplex>::s_min = dcomplex(DBL_MIN, DBL_MIN);
+template<>
+dcomplex MathUtilities<dcomplex>::s_epsilon = dcomplex(DBL_MIN, 0.0);
+
+template<>
+bool MathUtilities<float>::isNaN(
+   const float& value)
+{
+
+   int i;
+   /* This mess should be fixed when the next C++ standard comes out */
+#if defined(HAVE_CMATH_ISNAN)
+   i = std::isnan(value);
+#elif defined(HAVE_ISNAN)
+   i = isnan(value);
+#elif defined(HAVE_ISNAND)
+   i = __isnanf(value);
+#elif defined(HAVE_INLINE_ISNAND)
+   i = __SAMRAI_INLINE_KEYWORD_isnanf(value);
+#else
+   i = value != value;
+#endif
+
+   return (i != 0) ? true : false;
+}
+
+template<>
+bool MathUtilities<double>::isNaN(
+   const double& value)
+{
+   int i;
+   /* This mess should be fixed when the next C++ standard comes out */
+#if defined(HAVE_CMATH_ISNAN)
+   i = std::isnan(value);
+#elif defined(HAVE_ISNAN)
+   i = isnan(value);
+#elif defined(HAVE_ISNAND)
+   i = __isnand(value);
+#elif defined(HAVE_INLINE_ISNAND)
+   i = __SAMRAI_INLINE_KEYWORD_isnand(value);
+#else
+   i = value != value;
+#endif
+
+   return (i != 0) ? true : false;
+}
+
+template<>
+bool MathUtilities<dcomplex>::isNaN(
+   const dcomplex& value)
+{
+
+   int i_re;
+   int i_im;
+#if defined(HAVE_CMATH_ISNAN)
+   i_re = std::isnan(real(value));
+   i_im = std::isnan(imag(value));
+#elif defined(HAVE_ISNAN)
+   i_re = isnan(real(value));
+   i_im = isnan(imag(value));
+#elif defined(HAVE_ISNAND)
+   i_re = __isnand(real(value));
+   i_im = __isnand(imag(value));
+#elif defined(HAVE_INLINE_ISNAND)
+   i_re = __SAMRAI_INLINE_KEYWORD_isnand(real(value));
+   i_im = __SAMRAI_INLINE_KEYWORD_isnand(imag(value));
+#else
+   i_re = real(value) != real(value);
+   i_im = imag(value) != imag(value);
+#endif
+
+   return ((i_re != 0) || (i_im != 0)) ? true : false;
+}
+
+template<>
+bool MathUtilities<float>::equalEps(
+   const float& a,
+   const float& b)
+{
+   float absmax = MathUtilities<float>::Max(
+         MathUtilities<float>::Abs(a),
+         MathUtilities<float>::Abs(b));
+   float numerator = MathUtilities<float>::Abs(a - b);
+   float denomenator =
+      MathUtilities<float>::Max(absmax,
+         MathUtilities<float>::s_epsilon);
+
+   return numerator / denomenator < sqrt(MathUtilities<float>::s_epsilon);
+}
+
+template<>
+bool MathUtilities<double>::equalEps(
+   const double& a,
+   const double& b)
+{
+   double absmax = MathUtilities<double>::Max(
+         MathUtilities<double>::Abs(a),
+         MathUtilities<double>::Abs(b));
+   double numerator = MathUtilities<double>::Abs(a - b);
+   double denomenator =
+      MathUtilities<double>::Max(absmax,
+         MathUtilities<double>::s_epsilon);
+
+   return numerator / denomenator < sqrt(MathUtilities<double>::s_epsilon);
+}
+
+template<>
+bool MathUtilities<dcomplex>::equalEps(
+   const dcomplex& a,
+   const dcomplex& b)
+{
+   double a_re = real(a);
+   double a_im = imag(a);
+   double b_re = real(b);
+   double b_im = imag(b);
+
+   return MathUtilities<double>::equalEps(a_re, b_re) &&
+          MathUtilities<double>::equalEps(a_im, b_im);
+}
+
+template<>
+dcomplex MathUtilities<dcomplex>::Min(
+   dcomplex a,
+   dcomplex b)
+{
+   return norm(a) < norm(b) ? a : b;
+}
+
+template<>
+dcomplex MathUtilities<dcomplex>::Max(
+   dcomplex a,
+   dcomplex b)
+{
+   return norm(a) > norm(b) ? a : b;
+}
+
+template<>
+int MathUtilities<int>::Abs(
+   int a)
+{
+   return a > 0 ? a : -a;
+}
+
+template<>
+float MathUtilities<float>::Abs(
+   float a)
+{
+   return a > 0.0 ? a : -a;
+}
+
+template<>
+double MathUtilities<double>::Abs(
+   double a)
+{
+   return a > 0.0 ? a : -a;
+}
+
+template<>
+bool MathUtilities<bool>::Rand(
+   const bool& low,
+   const bool& width)
+{
+   (void)low;
+   (void)width;
+   return mrand48() > 0 ? true : false;
+}
+
+template<>
+char MathUtilities<char>::Rand(
+   const char& low,
+   const char& width)
+{
+
+// Disable Intel warning about conversions
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:810)
+#endif
+
+   return static_cast<char>(static_cast<double>(width) * drand48() + static_cast<double>(low));
+}
+
+template<>
+int MathUtilities<int>::Rand(
+   const int& low,
+   const int& width)
+{
+// Disable Intel warning about conversions
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:810)
+#endif
+   return static_cast<int>(static_cast<double>(width) * drand48()) + low;
+}
+
+template<>
+float MathUtilities<float>::Rand(
+   const float& low,
+   const float& width)
+{
+// Disable Intel warning about conversions
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:810)
+#endif
+   return static_cast<float>(static_cast<double>(width) * drand48()) + low;
+}
+
+template<>
+double MathUtilities<double>::Rand(
+   const double& low,
+   const double& width)
+{
+   return width * drand48() + low;
+}
+
+template<>
+dcomplex MathUtilities<dcomplex>::Rand(
+   const dcomplex& low,
+   const dcomplex& width)
+{
+   double real_part = real(width) * drand48() + real(low);
+   double imag_part = imag(width) * drand48() + imag(low);
+   return dcomplex(real_part, imag_part);
+}
+
+template<class TYPE>
+TYPE round_internal(
+   TYPE x)
+{
+   /* algorithm used from Steven G. Kargl */
+   double t;
+   if (x >= 0.0) {
+      t = ceil(x);
+      if (t - x > 0.5)
+         t -= 1.0;
+      return static_cast<TYPE>(t);
+   } else {
+      t = ceil(-x);
+      if (t + x > 0.5)
+         t -= 1.0;
+      return static_cast<TYPE>(-t);
+   }
+}
+
+template float round_internal<float>(float x);
+template double round_internal<double>(double x);
+
+template<>
+float MathUtilities<float>::round(
+   float x) {
+   return round_internal<float>(x);
+}
+
+template<>
+double MathUtilities<double>::round(
+   double x) {
+   return round_internal<double>(x);
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/MemoryDatabase.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/MemoryDatabase.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1550 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An memory database structure that stores (key,value) pairs in memory 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/MemoryDatabase.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/IOStream.h"
+
+#include <stdlib.h>
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/tbox/MemoryDatabase.I"
+#endif
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+
+#define PRINT_DEFAULT (1)
+#define PRINT_INPUT (2)
+#define PRINT_UNUSED (4)
+
+#define SSTREAM_BUFFER (4096)
+
+#define MEMORY_DB_ERROR(X) \
+   do {                                         \
+      pout << "MemoryDatabase: " << X << std::endl << std::flush;       \
+      printClassData(pout);                                             \
+      pout << "Program abort called..." << std::endl << std::flush;     \
+      SAMRAI_MPI::abort();                                              \
+   } while (0)
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ * o */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+/*
+ *************************************************************************
+ *									*
+ * The virtual destructor deallocates database data.			*
+ *									*
+ *************************************************************************
+ */
+
+MemoryDatabase::~MemoryDatabase()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create memory data file specified by name.                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool MemoryDatabase::create(
+   const std::string& name)
+{
+   d_database_name = name;
+   d_keyvalues.clearItems();
+
+   return true;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Open memory data file specified by name                               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool MemoryDatabase::open(
+   const std::string& name)
+{
+   d_database_name = name;
+   d_keyvalues.clearItems();
+
+   return true;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Close the open data file.                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool MemoryDatabase::close()
+{
+   d_database_name = "";
+   d_keyvalues.clearItems();
+
+   return true;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Return whether the key exists in the database.			*
+ *									*
+ *************************************************************************
+ */
+
+bool MemoryDatabase::keyExists(
+   const std::string& key)
+{
+   return findKeyData(key) ? true : false;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Return all of the keys in the database.				*
+ *									*
+ *************************************************************************
+ */
+
+Array<std::string> MemoryDatabase::getAllKeys()
+{
+   const int n = d_keyvalues.getNumberOfItems();
+   Array<std::string> keys(n);
+
+   int k = 0;
+   for (List<KeyData>::Iterator i(d_keyvalues); i; i++) {
+      keys[k++] = i().d_key;
+   }
+
+   return keys;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Get the type of the array entry associated with the specified key	*
+ *									*
+ *************************************************************************
+ */
+enum Database::DataType MemoryDatabase::getArrayType(
+   const std::string& key) {
+   KeyData* keydata = findKeyData(key);
+
+   if (keydata) {
+      return keydata->d_type;
+   } else {
+      return Database::SAMRAI_INVALID;
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Get the size of the array entry associated with the specified key;	*
+ * return 0 if the key does not exist.					*
+ *									*
+ *************************************************************************
+ */
+
+int MemoryDatabase::getArraySize(
+   const std::string& key)
+{
+   KeyData* keydata = findKeyData(key);
+   if (keydata && keydata->d_type != Database::SAMRAI_DATABASE) {
+      return keydata->d_array_size;
+   } else {
+      return 0;
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Member functions that manage the database values within the database.	*
+ *									*
+ *************************************************************************
+ */
+
+bool MemoryDatabase::isDatabase(
+   const std::string& key)
+{
+   KeyData* keydata = findKeyData(key);
+   return keydata ? keydata->d_type == Database::SAMRAI_DATABASE : false;
+}
+
+Pointer<Database> MemoryDatabase::putDatabase(
+   const std::string& key)
+{
+   deleteKeyIfFound(key);
+   KeyData keydata;
+   keydata.d_key = key;
+   keydata.d_type = Database::SAMRAI_DATABASE;
+   keydata.d_array_size = 1;
+   keydata.d_accessed = false;
+   keydata.d_from_default = false;
+   keydata.d_database = new MemoryDatabase(key);
+   d_keyvalues.appendItem(keydata);
+   return keydata.d_database;
+}
+
+Pointer<Database> MemoryDatabase::getDatabase(
+   const std::string& key)
+{
+   KeyData* keydata = findKeyDataOrExit(key);
+   if (keydata->d_type != Database::SAMRAI_DATABASE) {
+      MEMORY_DB_ERROR("Key=" << key << " is not a database...");
+   }
+   keydata->d_accessed = true;
+   return keydata->d_database;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Member functions that manage boolean values within the database.	*
+ *									*
+ *************************************************************************
+ */
+
+bool MemoryDatabase::isBool(
+   const std::string& key)
+{
+   KeyData* keydata = findKeyData(key);
+   return keydata ? keydata->d_type == Database::SAMRAI_BOOL : false;
+}
+
+void MemoryDatabase::putBool(
+   const std::string& key,
+   const bool& data)
+{
+   putBoolArray(key, &data, 1);
+}
+
+void MemoryDatabase::putBoolArray(
+   const std::string& key,
+   const Array<bool>& data)
+{
+   this->putBoolArray(key, data.getPointer(), data.getSize());
+}
+
+void MemoryDatabase::putBoolArray(
+   const std::string& key,
+   const bool * const data,
+   const int nelements)
+{
+   deleteKeyIfFound(key);
+   KeyData keydata;
+   keydata.d_key = key;
+   keydata.d_type = Database::SAMRAI_BOOL;
+   keydata.d_array_size = nelements;
+   keydata.d_accessed = false;
+   keydata.d_from_default = false;
+   keydata.d_boolean = Array<bool>(nelements);
+
+   for (int i = 0; i < nelements; i++) {
+      keydata.d_boolean[i] = data[i];
+   }
+
+   d_keyvalues.appendItem(keydata);
+}
+
+bool MemoryDatabase::getBool(
+   const std::string& key)
+{
+   KeyData* keydata = findKeyDataOrExit(key);
+   if ((keydata->d_type != Database::SAMRAI_BOOL) ||
+       (keydata->d_array_size != 1)) {
+      MEMORY_DB_ERROR("Key=" << key << " is not a boolean scalar...");
+   }
+   keydata->d_accessed = true;
+   return keydata->d_boolean[0];
+}
+
+bool MemoryDatabase::getBoolWithDefault(
+   const std::string& key,
+   const bool& defaultvalue)
+{
+   KeyData* keydata = findKeyData(key);
+   if (keydata) return this->getBool(key);
+
+   putBool(key, defaultvalue);
+   d_keyvalues.getLastItem().d_from_default = true;
+   return defaultvalue;
+}
+
+Array<bool> MemoryDatabase::getBoolArray(
+   const std::string& key)
+{
+   KeyData* keydata = findKeyDataOrExit(key);
+   if (keydata->d_type != Database::SAMRAI_BOOL) {
+      MEMORY_DB_ERROR("Key=" << key << " is not a boolean...");
+   }
+   keydata->d_accessed = true;
+   return keydata->d_boolean;
+}
+
+void MemoryDatabase::getBoolArray(
+   const std::string& key,
+   bool* data,
+   const int nelements)
+{
+   Array<bool> tmp = this->getBoolArray(key);
+   const int tsize = tmp.getSize();
+
+   if (nelements != tmp.getSize()) {
+      MEMORY_DB_ERROR(
+         "Incorrect array size=" << nelements << " specified for key="
+         << key << " with array size="
+         << tsize << "...");
+   }
+
+   for (int i = 0; i < tsize; i++) {
+      data[i] = tmp[i];
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Member functions that manage box values within the database.		*
+ *									*
+ *************************************************************************
+ */
+
+bool MemoryDatabase::isDatabaseBox(
+   const std::string& key)
+{
+   KeyData* keydata = findKeyData(key);
+   return keydata ? keydata->d_type == Database::SAMRAI_BOX : false;
+}
+
+void MemoryDatabase::putDatabaseBox(
+   const std::string& key,
+   const DatabaseBox& data)
+{
+   putDatabaseBoxArray(key, &data, 1);
+}
+
+void MemoryDatabase::putDatabaseBoxArray(
+   const std::string& key,
+   const Array<DatabaseBox>& data)
+{
+   this->putDatabaseBoxArray(key, data.getPointer(), data.getSize());
+}
+
+void MemoryDatabase::putDatabaseBoxArray(
+   const std::string& key,
+   const DatabaseBox * const data,
+   const int nelements)
+{
+   deleteKeyIfFound(key);
+   KeyData keydata;
+   keydata.d_key = key;
+   keydata.d_type = Database::SAMRAI_BOX;
+   keydata.d_array_size = nelements;
+   keydata.d_accessed = false;
+   keydata.d_from_default = false;
+   keydata.d_box = Array<DatabaseBox>(nelements);
+
+   for (int i = 0; i < nelements; i++) {
+      keydata.d_box[i] = data[i];
+   }
+
+   d_keyvalues.appendItem(keydata);
+}
+
+DatabaseBox MemoryDatabase::getDatabaseBox(
+   const std::string& key)
+{
+   KeyData* keydata = findKeyDataOrExit(key);
+   if ((keydata->d_type != Database::SAMRAI_BOX) ||
+       (keydata->d_array_size != 1)) {
+      MEMORY_DB_ERROR("Key=" << key << " is not a single box...");
+   }
+   keydata->d_accessed = true;
+   return keydata->d_box[0];
+}
+
+DatabaseBox MemoryDatabase::getDatabaseBoxWithDefault(
+   const std::string& key,
+   const DatabaseBox& defaultvalue)
+{
+   KeyData* keydata = findKeyData(key);
+   if (keydata) return this->getDatabaseBox(key);
+
+   putDatabaseBox(key, defaultvalue);
+   d_keyvalues.getLastItem().d_from_default = true;
+   return defaultvalue;
+}
+
+Array<DatabaseBox> MemoryDatabase::getDatabaseBoxArray(
+   const std::string& key)
+{
+   KeyData* keydata = findKeyDataOrExit(key);
+   if (keydata->d_type != Database::SAMRAI_BOX) {
+      MEMORY_DB_ERROR("Key=" << key << " is not a box...");
+   }
+   keydata->d_accessed = true;
+   return keydata->d_box;
+}
+
+void MemoryDatabase::getDatabaseBoxArray(
+   const std::string& key,
+   DatabaseBox* data,
+   const int nelements)
+{
+   Array<DatabaseBox> tmp = this->getDatabaseBoxArray(key);
+   const int tsize = tmp.getSize();
+
+   if (nelements != tmp.getSize()) {
+      MEMORY_DB_ERROR(
+         "Incorrect array size=" << nelements << " specified for key="
+         << key << " with array size="
+         << tsize << "...");
+   }
+
+   for (int i = 0; i < tsize; i++) {
+      data[i] = tmp[i];
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Member functions that manage character values within the database.	*
+ *									*
+ *************************************************************************
+ */
+
+bool MemoryDatabase::isChar(
+   const std::string& key)
+{
+   KeyData* keydata = findKeyData(key);
+   return keydata ? keydata->d_type == Database::SAMRAI_CHAR : false;
+}
+
+void MemoryDatabase::putChar(
+   const std::string& key,
+   const char& data)
+{
+   putCharArray(key, &data, 1);
+}
+
+void MemoryDatabase::putCharArray(
+   const std::string& key,
+   const Array<char>& data)
+{
+   this->putCharArray(key, data.getPointer(), data.getSize());
+}
+
+void MemoryDatabase::putCharArray(
+   const std::string& key,
+   const char * const data,
+   const int nelements)
+{
+   deleteKeyIfFound(key);
+   KeyData keydata;
+   keydata.d_key = key;
+   keydata.d_type = Database::SAMRAI_CHAR;
+   keydata.d_array_size = nelements;
+   keydata.d_accessed = false;
+   keydata.d_from_default = false;
+   keydata.d_char = Array<char>(nelements);
+
+   for (int i = 0; i < nelements; i++) {
+      keydata.d_char[i] = data[i];
+   }
+
+   d_keyvalues.appendItem(keydata);
+}
+
+char MemoryDatabase::getChar(
+   const std::string& key)
+{
+   KeyData* keydata = findKeyDataOrExit(key);
+   if ((keydata->d_type != Database::SAMRAI_CHAR) ||
+       (keydata->d_array_size != 1)) {
+      MEMORY_DB_ERROR("Key=" << key << " is not a single character...");
+   }
+   keydata->d_accessed = true;
+   return keydata->d_char[0];
+}
+
+char MemoryDatabase::getCharWithDefault(
+   const std::string& key,
+   const char& defaultvalue)
+{
+   KeyData* keydata = findKeyData(key);
+   if (keydata) return this->getChar(key);
+
+   putChar(key, defaultvalue);
+   d_keyvalues.getLastItem().d_from_default = true;
+   return defaultvalue;
+}
+
+Array<char> MemoryDatabase::getCharArray(
+   const std::string& key)
+{
+   KeyData* keydata = findKeyDataOrExit(key);
+   if (keydata->d_type != Database::SAMRAI_CHAR) {
+      MEMORY_DB_ERROR("Key=" << key << " is not a character...");
+   }
+   keydata->d_accessed = true;
+   return keydata->d_char;
+}
+
+void MemoryDatabase::getCharArray(
+   const std::string& key,
+   char* data,
+   const int nelements)
+{
+   Array<char> tmp = this->getCharArray(key);
+   const int tsize = tmp.getSize();
+
+   if (nelements != tmp.getSize()) {
+      MEMORY_DB_ERROR(
+         "Incorrect array size=" << nelements << " specified for key="
+         << key << " with array size="
+         << tsize << "...");
+   }
+
+   for (int i = 0; i < tsize; i++) {
+      data[i] = tmp[i];
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Member functions that manage complex values within the database.	*
+ * Note that complex numbers may be promoted from integers, floats,	*
+ * and doubles.								*
+ *									*
+ *************************************************************************
+ */
+
+bool MemoryDatabase::isComplex(
+   const std::string& key)
+{
+   KeyData* keydata = findKeyData(key);
+   return !keydata ? false : (keydata->d_type == Database::SAMRAI_COMPLEX
+                              || keydata->d_type == Database::SAMRAI_INT
+                              || keydata->d_type == Database::SAMRAI_FLOAT
+                              || keydata->d_type == Database::SAMRAI_DOUBLE);
+}
+
+void MemoryDatabase::putComplex(
+   const std::string& key,
+   const dcomplex& data)
+{
+   putComplexArray(key, &data, 1);
+}
+
+void MemoryDatabase::putComplexArray(
+   const std::string& key,
+   const Array<dcomplex>& data)
+{
+   this->putComplexArray(key, data.getPointer(), data.getSize());
+}
+
+void MemoryDatabase::putComplexArray(
+   const std::string& key,
+   const dcomplex * const data,
+   const int nelements)
+{
+   deleteKeyIfFound(key);
+   KeyData keydata;
+   keydata.d_key = key;
+   keydata.d_type = Database::SAMRAI_COMPLEX;
+   keydata.d_array_size = nelements;
+   keydata.d_accessed = false;
+   keydata.d_from_default = false;
+   keydata.d_complex = Array<dcomplex>(nelements);
+
+   for (int i = 0; i < nelements; i++) {
+      keydata.d_complex[i] = data[i];
+   }
+
+   d_keyvalues.appendItem(keydata);
+}
+
+dcomplex MemoryDatabase::getComplex(
+   const std::string& key)
+{
+   dcomplex value(0.0, 0.0);
+   KeyData* keydata = findKeyDataOrExit(key);
+
+   if (keydata->d_array_size != 1) {
+      MEMORY_DB_ERROR("Key=" << key << " is not a single complex...");
+   }
+
+   switch (keydata->d_type) {
+      case Database::SAMRAI_INT:
+         value = dcomplex((double)keydata->d_integer[0], 0.0);
+         break;
+      case Database::SAMRAI_FLOAT:
+         value = dcomplex((double)keydata->d_float[0], 0.0);
+         break;
+      case Database::SAMRAI_DOUBLE:
+         value = dcomplex(keydata->d_double[0], 0.0);
+         break;
+      case Database::SAMRAI_COMPLEX:
+         value = keydata->d_complex[0];
+         break;
+      default:
+         MEMORY_DB_ERROR("Key=" << key << " is not a single complex...");
+   }
+
+   keydata->d_accessed = true;
+   return value;
+}
+
+dcomplex MemoryDatabase::getComplexWithDefault(
+   const std::string& key,
+   const dcomplex& defaultvalue)
+{
+   KeyData* keydata = findKeyData(key);
+   if (keydata) return this->getComplex(key);
+
+   putComplex(key, defaultvalue);
+   d_keyvalues.getLastItem().d_from_default = true;
+   return defaultvalue;
+}
+
+Array<dcomplex> MemoryDatabase::getComplexArray(
+   const std::string& key)
+{
+   KeyData* keydata = findKeyDataOrExit(key);
+   Array<dcomplex> array;
+   switch (keydata->d_type) {
+      case Database::SAMRAI_INT: {
+         array = Array<dcomplex>(keydata->d_integer.getSize());
+         for (int i = 0; i < keydata->d_integer.getSize(); i++) {
+            array[i] = dcomplex((double)keydata->d_integer[i], 0.0);
+         }
+         break;
+      }
+      case Database::SAMRAI_FLOAT: {
+         array = Array<dcomplex>(keydata->d_float.getSize());
+         for (int i = 0; i < keydata->d_float.getSize(); i++) {
+            array[i] = dcomplex((double)keydata->d_float[i], 0.0);
+         }
+         break;
+      }
+      case Database::SAMRAI_DOUBLE: {
+         array = Array<dcomplex>(keydata->d_double.getSize());
+         for (int i = 0; i < keydata->d_float.getSize(); i++) {
+            array[i] = dcomplex(keydata->d_double[i], 0.0);
+         }
+         break;
+      }
+      case Database::SAMRAI_COMPLEX:
+         array = keydata->d_complex;
+         break;
+      default:
+         MEMORY_DB_ERROR("Key=" << key << " is not a complex...");
+   }
+   keydata->d_accessed = true;
+   return array;
+}
+
+void MemoryDatabase::getComplexArray(
+   const std::string& key,
+   dcomplex* data,
+   const int nelements)
+{
+   Array<dcomplex> tmp = this->getComplexArray(key);
+   const int tsize = tmp.getSize();
+
+   if (nelements != tmp.getSize()) {
+      MEMORY_DB_ERROR(
+         "Incorrect array size=" << nelements << " specified for key="
+         << key << " with array size="
+         << tsize << "...");
+   }
+
+   for (int i = 0; i < tsize; i++) {
+      data[i] = tmp[i];
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Member functions that manage double values within the database.	*
+ * Note that doubles may be promoted from integers or floats.		*
+ *									*
+ *************************************************************************
+ */
+
+bool MemoryDatabase::isDouble(
+   const std::string& key)
+{
+   KeyData* keydata = findKeyData(key);
+   return !keydata ? false : (keydata->d_type == Database::SAMRAI_DOUBLE
+                              || keydata->d_type == Database::SAMRAI_INT
+                              || keydata->d_type == Database::SAMRAI_FLOAT);
+}
+
+void MemoryDatabase::putDouble(
+   const std::string& key,
+   const double& data)
+{
+   putDoubleArray(key, &data, 1);
+}
+
+void MemoryDatabase::putDoubleArray(
+   const std::string& key,
+   const Array<double>& data)
+{
+   this->putDoubleArray(key, data.getPointer(), data.getSize());
+}
+
+void MemoryDatabase::putDoubleArray(
+   const std::string& key,
+   const double * const data,
+   const int nelements)
+{
+   deleteKeyIfFound(key);
+   KeyData keydata;
+   keydata.d_key = key;
+   keydata.d_type = Database::SAMRAI_DOUBLE;
+   keydata.d_array_size = nelements;
+   keydata.d_accessed = false;
+   keydata.d_from_default = false;
+   keydata.d_double = Array<double>(nelements);
+
+   for (int i = 0; i < nelements; i++) {
+      keydata.d_double[i] = data[i];
+   }
+
+   d_keyvalues.appendItem(keydata);
+}
+
+double MemoryDatabase::getDouble(
+   const std::string& key)
+{
+   double value = 0.0;
+   KeyData* keydata = findKeyDataOrExit(key);
+
+   if (keydata->d_array_size != 1) {
+      MEMORY_DB_ERROR("Key=" << key << " is not a single double...");
+   }
+
+   switch (keydata->d_type) {
+      case Database::SAMRAI_INT:
+         value = (double)keydata->d_integer[0];
+         break;
+      case Database::SAMRAI_FLOAT:
+         value = (double)keydata->d_float[0];
+         break;
+      case Database::SAMRAI_DOUBLE:
+         value = keydata->d_double[0];
+         break;
+      default:
+         MEMORY_DB_ERROR("Key=" << key << " is not a single double...");
+   }
+
+   keydata->d_accessed = true;
+   return value;
+}
+
+double MemoryDatabase::getDoubleWithDefault(
+   const std::string& key,
+   const double& defaultvalue)
+{
+   KeyData* keydata = findKeyData(key);
+   if (keydata) return this->getDouble(key);
+
+   putDouble(key, defaultvalue);
+   d_keyvalues.getLastItem().d_from_default = true;
+   return defaultvalue;
+}
+
+Array<double> MemoryDatabase::getDoubleArray(
+   const std::string& key)
+{
+   KeyData* keydata = findKeyDataOrExit(key);
+   Array<double> array;
+   switch (keydata->d_type) {
+      case Database::SAMRAI_INT: {
+         array = Array<double>(keydata->d_integer.getSize());
+         for (int i = 0; i < keydata->d_integer.getSize(); i++) {
+            array[i] = (double)keydata->d_integer[i];
+         }
+         break;
+      }
+      case Database::SAMRAI_FLOAT: {
+         array = Array<double>(keydata->d_float.getSize());
+         for (int i = 0; i < keydata->d_float.getSize(); i++) {
+            array[i] = (double)keydata->d_float[i];
+         }
+         break;
+      }
+      case Database::SAMRAI_DOUBLE: {
+         array = keydata->d_double;
+         break;
+      }
+      default:
+         MEMORY_DB_ERROR("Key=" << key << " is not a double...");
+   }
+   keydata->d_accessed = true;
+   return array;
+}
+
+void MemoryDatabase::getDoubleArray(
+   const std::string& key,
+   double* data,
+   const int nelements)
+{
+   Array<double> tmp = this->getDoubleArray(key);
+   const int tsize = tmp.getSize();
+
+   if (nelements != tmp.getSize()) {
+      MEMORY_DB_ERROR(
+         "Incorrect array size=" << nelements << " specified for key="
+         << key << " with array size="
+         << tsize << "...");
+   }
+
+   for (int i = 0; i < tsize; i++) {
+      data[i] = tmp[i];
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Member functions that manage float values within the database.	*
+ * Note that floats may be promoted from integers or truncated from	*
+ * doubles (without a warning).						*
+ *									*
+ *************************************************************************
+ */
+
+bool MemoryDatabase::isFloat(
+   const std::string& key)
+{
+   KeyData* keydata = findKeyData(key);
+   return !keydata ? false : (keydata->d_type == Database::SAMRAI_DOUBLE
+                              || keydata->d_type == Database::SAMRAI_INT
+                              || keydata->d_type == Database::SAMRAI_FLOAT);
+}
+
+void MemoryDatabase::putFloat(
+   const std::string& key,
+   const float& data)
+{
+   putFloatArray(key, &data, 1);
+}
+
+void MemoryDatabase::putFloatArray(
+   const std::string& key,
+   const Array<float>& data)
+{
+   this->putFloatArray(key, data.getPointer(), data.getSize());
+}
+
+void MemoryDatabase::putFloatArray(
+   const std::string& key,
+   const float * const data,
+   const int nelements)
+{
+   deleteKeyIfFound(key);
+   KeyData keydata;
+   keydata.d_key = key;
+   keydata.d_type = Database::SAMRAI_FLOAT;
+   keydata.d_array_size = nelements;
+   keydata.d_accessed = false;
+   keydata.d_from_default = false;
+   keydata.d_float = Array<float>(nelements);
+
+   for (int i = 0; i < nelements; i++) {
+      keydata.d_float[i] = data[i];
+   }
+
+   d_keyvalues.appendItem(keydata);
+}
+
+float MemoryDatabase::getFloat(
+   const std::string& key)
+{
+
+// Disable Intel warning about conversions
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:810)
+#endif
+
+   float value = 0.0;
+   KeyData* keydata = findKeyDataOrExit(key);
+
+   if (keydata->d_array_size != 1) {
+      MEMORY_DB_ERROR("Key=" << key << " is not a single float...");
+   }
+
+   switch (keydata->d_type) {
+      case Database::SAMRAI_INT:
+         value = static_cast<float>(keydata->d_integer[0]);
+         break;
+      case Database::SAMRAI_FLOAT:
+         value = keydata->d_float[0];
+         break;
+      case Database::SAMRAI_DOUBLE:
+         value = static_cast<float>(keydata->d_double[0]);
+         break;
+      default:
+         MEMORY_DB_ERROR("Key=" << key << " is not a single float...");
+   }
+
+   keydata->d_accessed = true;
+   return value;
+}
+
+float MemoryDatabase::getFloatWithDefault(
+   const std::string& key,
+   const float& defaultvalue)
+{
+   KeyData* keydata = findKeyData(key);
+   if (keydata) return this->getFloat(key);
+
+   putFloat(key, defaultvalue);
+   d_keyvalues.getLastItem().d_from_default = true;
+   return defaultvalue;
+}
+
+Array<float> MemoryDatabase::getFloatArray(
+   const std::string& key)
+{
+   KeyData* keydata = findKeyDataOrExit(key);
+   Array<float> array;
+   switch (keydata->d_type) {
+      case Database::SAMRAI_INT: {
+         array = Array<float>(keydata->d_integer.getSize());
+         for (int i = 0; i < keydata->d_integer.getSize(); i++) {
+            array[i] = static_cast<float>(keydata->d_integer[i]);
+         }
+         break;
+      }
+      case Database::SAMRAI_FLOAT:
+         array = keydata->d_float;
+         break;
+      case Database::SAMRAI_DOUBLE: {
+         array = Array<float>(keydata->d_double.getSize());
+         for (int i = 0; i < keydata->d_double.getSize(); i++) {
+            array[i] = static_cast<float>(keydata->d_double[i]);
+         }
+         break;
+      }
+      default:
+         MEMORY_DB_ERROR("Key=" << key << " is not a float...");
+   }
+   keydata->d_accessed = true;
+   return array;
+}
+
+void MemoryDatabase::getFloatArray(
+   const std::string& key,
+   float* data,
+   const int nelements)
+{
+   Array<float> tmp = this->getFloatArray(key);
+   const int tsize = tmp.getSize();
+
+   if (nelements != tmp.getSize()) {
+      MEMORY_DB_ERROR(
+         "Incorrect array size=" << nelements << " specified for key="
+         << key << " with array size="
+         << tsize << "...");
+   }
+
+   for (int i = 0; i < tsize; i++) {
+      data[i] = tmp[i];
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Member functions that manage integer values within the database.	*
+ *									*
+ *************************************************************************
+ */
+
+bool MemoryDatabase::isInteger(
+   const std::string& key)
+{
+   KeyData* keydata = findKeyData(key);
+   return !keydata ? false : keydata->d_type == Database::SAMRAI_INT;
+}
+
+void MemoryDatabase::putInteger(
+   const std::string& key,
+   const int& data)
+{
+   putIntegerArray(key, &data, 1);
+}
+
+void MemoryDatabase::putIntegerArray(
+   const std::string& key,
+   const Array<int>& data)
+{
+   this->putIntegerArray(key, data.getPointer(), data.getSize());
+}
+
+void MemoryDatabase::putIntegerArray(
+   const std::string& key,
+   const int * const data,
+   const int nelements)
+{
+   deleteKeyIfFound(key);
+   KeyData keydata;
+   keydata.d_key = key;
+   keydata.d_type = Database::SAMRAI_INT;
+   keydata.d_array_size = nelements;
+   keydata.d_accessed = false;
+   keydata.d_from_default = false;
+   keydata.d_integer = Array<int>(nelements);
+
+   for (int i = 0; i < nelements; i++) {
+      keydata.d_integer[i] = data[i];
+   }
+
+   d_keyvalues.appendItem(keydata);
+}
+
+int MemoryDatabase::getInteger(
+   const std::string& key)
+{
+   KeyData* keydata = findKeyDataOrExit(key);
+   if ((keydata->d_type != Database::SAMRAI_INT) ||
+       (keydata->d_array_size != 1)) {
+      MEMORY_DB_ERROR("Key=" << key << " is not an integer scalar...");
+   }
+   keydata->d_accessed = true;
+   return keydata->d_integer[0];
+}
+
+int MemoryDatabase::getIntegerWithDefault(
+   const std::string& key,
+   const int& defaultvalue)
+{
+   KeyData* keydata = findKeyData(key);
+   if (keydata) return this->getInteger(key);
+
+   putInteger(key, defaultvalue);
+   d_keyvalues.getLastItem().d_from_default = true;
+   return defaultvalue;
+}
+
+Array<int> MemoryDatabase::getIntegerArray(
+   const std::string& key)
+{
+   KeyData* keydata = findKeyDataOrExit(key);
+   if (keydata->d_type != Database::SAMRAI_INT) {
+      MEMORY_DB_ERROR("Key=" << key << " is not an integer...");
+   }
+   keydata->d_accessed = true;
+   return keydata->d_integer;
+}
+
+void MemoryDatabase::getIntegerArray(
+   const std::string& key,
+   int* data,
+   const int nelements)
+{
+   Array<int> tmp = this->getIntegerArray(key);
+   const int tsize = tmp.getSize();
+
+   if (nelements != tmp.getSize()) {
+      MEMORY_DB_ERROR(
+         "Incorrect array size=" << nelements << " specified for key="
+         << key << " with array size="
+         << tsize << "...");
+   }
+
+   for (int i = 0; i < tsize; i++) {
+      data[i] = tmp[i];
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Member functions that manage string values within the database.	*
+ *									*
+ *************************************************************************
+ */
+
+bool MemoryDatabase::isString(
+   const std::string& key)
+{
+   KeyData* keydata = findKeyData(key);
+   return !keydata ? false : keydata->d_type == Database::SAMRAI_STRING;
+}
+
+void MemoryDatabase::putString(
+   const std::string& key,
+   const std::string& data)
+{
+   putStringArray(key, &data, 1);
+}
+
+void MemoryDatabase::putStringArray(
+   const std::string& key,
+   const Array<std::string>& data)
+{
+   this->putStringArray(key, data.getPointer(), data.getSize());
+}
+
+void MemoryDatabase::putStringArray(
+   const std::string& key,
+   const std::string * const data,
+   const int nelements)
+{
+   deleteKeyIfFound(key);
+   KeyData keydata;
+   keydata.d_key = key;
+   keydata.d_type = Database::SAMRAI_STRING;
+   keydata.d_array_size = nelements;
+   keydata.d_accessed = false;
+   keydata.d_from_default = false;
+   keydata.d_string = Array<std::string>(nelements);
+
+   for (int i = 0; i < nelements; i++) {
+      keydata.d_string[i] = data[i];
+   }
+
+   d_keyvalues.appendItem(keydata);
+}
+
+std::string MemoryDatabase::getString(
+   const std::string& key)
+{
+   KeyData* keydata = findKeyDataOrExit(key);
+   if ((keydata->d_type != Database::SAMRAI_STRING) ||
+       (keydata->d_array_size != 1)) {
+      MEMORY_DB_ERROR("Key=" << key << " is not a single string...");
+   }
+   keydata->d_accessed = true;
+   return keydata->d_string[0];
+}
+
+std::string MemoryDatabase::getStringWithDefault(
+   const std::string& key,
+   const std::string& defaultvalue)
+{
+   KeyData* keydata = findKeyData(key);
+   if (keydata) return this->getString(key);
+
+   putString(key, defaultvalue);
+   d_keyvalues.getLastItem().d_from_default = true;
+   return defaultvalue;
+}
+
+Array<std::string> MemoryDatabase::getStringArray(
+   const std::string& key)
+{
+   KeyData* keydata = findKeyDataOrExit(key);
+   if (keydata->d_type != Database::SAMRAI_STRING) {
+      MEMORY_DB_ERROR("Key=" << key << " is not a string...");
+   }
+   keydata->d_accessed = true;
+   return keydata->d_string;
+}
+
+void MemoryDatabase::getStringArray(
+   const std::string& key,
+   std::string* data,
+   const int nelements)
+{
+   Array<std::string> tmp = this->getStringArray(key);
+   const int tsize = tmp.getSize();
+
+   if (nelements != tmp.getSize()) {
+      MEMORY_DB_ERROR(
+         "Incorrect array size=" << nelements << " specified for key="
+         << key << " with array size="
+         << tsize << "...");
+   }
+
+   for (int i = 0; i < tsize; i++) {
+      data[i] = tmp[i];
+   }
+}
+
+std::string MemoryDatabase::getName(
+   void)
+{
+   return d_database_name;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Search the current database for a matching key.  If found, delete	*
+ * that key and return true.  If the key does not exist, then return	*
+ * false.								*
+ *									*
+ *************************************************************************
+ */
+
+bool MemoryDatabase::deleteKeyIfFound(
+   const std::string& key)
+{
+   for (List<KeyData>::Iterator i(d_keyvalues); i; i++) {
+      if (i().d_key == key) {
+         d_keyvalues.removeItem(i);
+         return true;
+      }
+   }
+   return false;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Find the key data associated with the specified key and return a	*
+ * pointer to the record.  If no such key data exists, then return NULL.	*
+ *									*
+ *************************************************************************
+ */
+
+MemoryDatabase::KeyData *
+MemoryDatabase::findKeyData(
+   const std::string& key)
+{
+   for (List<KeyData>::Iterator i(d_keyvalues); i; i++) {
+      if (key == i().d_key) return &i();
+   }
+   return NULL;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Find the key data associated with the specified key and return a	*
+ * pointer to the record.  If no such key data exists, then exit with	*
+ * an error message.							*
+ *									*
+ *************************************************************************
+ */
+
+MemoryDatabase::KeyData *
+MemoryDatabase::findKeyDataOrExit(
+   const std::string& key)
+{
+   for (List<KeyData>::Iterator i(d_keyvalues); i; i++) {
+      if (key == i().d_key) return &i();
+   }
+   MEMORY_DB_ERROR("Key ``" << key << "'' does not exist in the database...");
+   return NULL;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Print the entire database to the specified output stream.	        *
+ *									*
+ *************************************************************************
+ */
+
+void MemoryDatabase::printClassData(
+   std::ostream& os)
+{
+   printDatabase(os, 0, PRINT_DEFAULT | PRINT_INPUT | PRINT_UNUSED);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Print unused database keys to the specified output stream.	        *
+ *									*
+ *************************************************************************
+ */
+
+void MemoryDatabase::printUnusedKeys(
+   std::ostream& os) const
+{
+   printDatabase(os, 0, PRINT_UNUSED);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Print default database keys to the specified output stream.          *
+ *									*
+ *************************************************************************
+ */
+
+void MemoryDatabase::printDefaultKeys(
+   std::ostream& os) const
+{
+   printDatabase(os, 0, PRINT_DEFAULT);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Indent the output stream by the specified indentation factor.		*
+ *									*
+ *************************************************************************
+ */
+
+void MemoryDatabase::indentStream(
+   std::ostream& os,
+   const long indent)
+{
+   for (int i = 0; i < indent; i++) {
+      os << " ";
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Print database data to the specified output stream.			*
+ *									*
+ *************************************************************************
+ */
+
+void MemoryDatabase::printDatabase(
+   std::ostream& os,
+   const int indent,
+   const int toprint) const
+{
+   /*
+    * Get the maximum key width in the output (excluding databases)
+    */
+
+   long width = 0;
+   for (List<KeyData>::Iterator k(d_keyvalues); k; k++) {
+      if (((k().d_from_default) && (toprint & PRINT_DEFAULT))
+          || ((k().d_accessed) && (toprint & PRINT_INPUT))
+          || (!(k().d_accessed) && (toprint & PRINT_UNUSED))) {
+         if (k().d_type != Database::SAMRAI_DATABASE) {
+            const long keywidth = k().d_key.length();
+            if (keywidth > width) width = keywidth;
+         }
+      }
+   }
+
+   /*
+    * Iterate over all non-database keys in the database and output key values
+    */
+
+   indentStream(os, indent);
+   os << d_database_name << " {\n";
+   for (List<KeyData>::Iterator i(d_keyvalues); i; i++) {
+
+      if (((i().d_from_default) && (toprint & PRINT_DEFAULT))
+          || ((i().d_accessed) && (toprint & PRINT_INPUT))
+          || (!(i().d_accessed) && (toprint & PRINT_UNUSED))) {
+
+#ifndef LACKS_SSTREAM
+         std::ostringstream sstream;
+#else
+         char sstream_buffer[SSTREAM_BUFFER];
+         std::ostrstream sstream(sstream_buffer, SSTREAM_BUFFER);
+#endif
+
+         switch (i().d_type) {
+
+            case Database::SAMRAI_INVALID: {
+               break;
+            }
+
+            case Database::SAMRAI_DATABASE: {
+               break;
+            }
+
+            case Database::SAMRAI_BOOL: {
+               indentStream(sstream, indent + 3);
+               sstream << i().d_key;
+               indentStream(sstream, width - i().d_key.length());
+               sstream << " = ";
+               const int n = i().d_boolean.getSize();
+               for (int j = 0; j < n; j++) {
+                  sstream << (i().d_boolean[j] ? "TRUE" : "FALSE");
+                  if (j < n - 1) sstream << ", ";
+               }
+               break;
+            }
+
+            case Database::SAMRAI_BOX: {
+               indentStream(sstream, indent + 3);
+               sstream << i().d_key;
+               indentStream(sstream, width - i().d_key.length());
+               sstream << " = ";
+               const int n = i().d_box.getSize();
+               for (int j = 0; j < n; j++) {
+                  const int m = i().d_box[j].getDim().getValue();
+                  sstream << "[(";
+                  for (int k = 0; k < m; k++) {
+                     sstream << i().d_box[j].lower(k);
+                     if (k < m - 1) sstream << ",";
+                  }
+                  sstream << "),(";
+                  for (int l = 0; l < m; l++) {
+                     sstream << i().d_box[j].upper(l);
+                     if (l < m - 1) sstream << ",";
+                  }
+                  sstream << ")]";
+                  if (j < n - 1) sstream << ", ";
+               }
+               break;
+            }
+
+            case Database::SAMRAI_CHAR: {
+               indentStream(sstream, indent + 3);
+               sstream << i().d_key;
+               indentStream(sstream, width - i().d_key.length());
+               sstream << " = ";
+               const int n = i().d_char.getSize();
+               for (int j = 0; j < n; j++) {
+                  sstream << "'" << i().d_char[j] << "'";
+                  if (j < n - 1) sstream << ", ";
+               }
+               break;
+            }
+
+            case Database::SAMRAI_COMPLEX: {
+               indentStream(sstream, indent + 3);
+               sstream << i().d_key;
+               indentStream(sstream, width - i().d_key.length());
+               sstream << " = ";
+               const int n = i().d_complex.getSize();
+               for (int j = 0; j < n; j++) {
+                  sstream << i().d_complex[j];
+                  if (j < n - 1) sstream << ", ";
+               }
+               break;
+            }
+
+            case Database::SAMRAI_DOUBLE: {
+               indentStream(sstream, indent + 3);
+               sstream << i().d_key;
+               indentStream(sstream, width - i().d_key.length());
+               sstream << " = ";
+               const int n = i().d_double.getSize();
+               for (int j = 0; j < n; j++) {
+                  sstream << i().d_double[j];
+                  if (j < n - 1) sstream << ", ";
+               }
+               break;
+            }
+
+            case Database::SAMRAI_FLOAT: {
+               indentStream(sstream, indent + 3);
+               sstream << i().d_key;
+               indentStream(sstream, width - i().d_key.length());
+               sstream << " = ";
+               const int n = i().d_float.getSize();
+               for (int j = 0; j < n; j++) {
+                  sstream << i().d_float[j];
+                  if (j < n - 1) sstream << ", ";
+               }
+               break;
+            }
+
+            case Database::SAMRAI_INT: {
+               indentStream(sstream, indent + 3);
+               sstream << i().d_key;
+               indentStream(sstream, width - i().d_key.length());
+               sstream << " = ";
+               const int n = i().d_integer.getSize();
+               for (int j = 0; j < n; j++) {
+                  sstream << i().d_integer[j];
+                  if (j < n - 1) sstream << ", ";
+               }
+               break;
+            }
+
+            case Database::SAMRAI_STRING: {
+               indentStream(sstream, indent + 3);
+               sstream << i().d_key;
+               indentStream(sstream, width - i().d_key.length());
+               sstream << " = ";
+               const int n = i().d_string.getSize();
+               for (int j = 0; j < n; j++) {
+                  sstream << "\"" << i().d_string[j] << "\"";
+                  if (j < n - 1) sstream << ", ";
+               }
+               break;
+            }
+         }
+
+         /*
+          * Output whether the key was used or default in column 60
+          */
+
+         if (i().d_type != Database::SAMRAI_DATABASE) {
+#ifndef LACKS_SSTREAM
+            const long tab = 59 - sstream.str().length();
+#else
+            const long tab = 59 - sstream.pcount();
+#endif
+            if (tab > 0) indentStream(sstream, tab);
+            if (i().d_from_default) {
+               sstream << " // from default";
+            } else if (i().d_accessed) {
+               sstream << " // input used";
+            } else {
+               sstream << " // input not used";
+            }
+
+//            sstream << std::endl << ends;
+            sstream << std::endl;
+            os << sstream.str();
+         }
+      }
+   }
+
+   /*
+    * Finally, output all databases in the current key list
+    */
+
+   for (List<KeyData>::Iterator j(d_keyvalues); j; j++) {
+      if (j().d_type == Database::SAMRAI_DATABASE) {
+         Pointer<MemoryDatabase> db = j().d_database;
+         db->printDatabase(os, indent + 3, toprint);
+      }
+   }
+
+   indentStream(os, indent);
+   os << "}\n";
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Unsuppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/MemoryDatabase.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/MemoryDatabase.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,37 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An memomory database structure that stores (key,value) pairs in memory 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace tbox {
+
+SAMRAI_INLINE_KEYWORD
+MemoryDatabase::MemoryDatabase(
+   const std::string& name)
+{
+   d_database_name = name;
+}
+
+SAMRAI_INLINE_KEYWORD
+std::string
+MemoryDatabase::getName() const
+{
+   return d_database_name;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool MemoryDatabase::keyAccessed(
+   const std::string& key)
+{
+   KeyData* keydata = findKeyData(key);
+   return keydata ? keydata->d_accessed : false;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/MemoryDatabase.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/MemoryDatabase.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,956 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A memory database structure that stores (key,value) pairs in memory 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_MemoryDatabase
+#define included_tbox_MemoryDatabase
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/List.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * Class MemoryDatabase stores (key,value) pairs in a hierarchical
+ * database.  Each value may be another database, boolean, box, character,
+ * complex, double, float, integer, or string.  Note that boxes are stored
+ * using the toolbox box class that can store boxes of any dimension in the
+ * same data structure.
+ *
+ * See the Database class documentation for a description of the
+ * generic database interface.
+ *
+ * The memory database is used for storing input (a "deck") in memory; the
+ * derived class InputDatabase use for this purpose; InputDatabase is
+ * kept around for historical reasons and the name is a bit more clear
+ * than "memory" database but this class is very generic.  The Parser
+ * is really the class that process the input; it parses the input file
+ * into a database.
+ *
+ * Note that the memory database will attempt to promote numerical types
+ * where appropriate.  The promotion chain is int -> float -> double ->
+ * complex.  For example, an integer key will be promoted to a complex
+ * value if isComplex() or getComplex() is called.  Double values will also
+ * be truncated to floats (with loss of information) if a float call is
+ * made on a double value.
+ *
+ * It is assumed that all processors will access the database in the same
+ * manner.  Thus, all error messages are output to pout instead of perr.
+ */
+
+class MemoryDatabase:public Database
+{
+public:
+   /**
+    * The memory database constructor creates an empty database with the
+    * specified name.
+    */
+   explicit MemoryDatabase(
+      const std::string& name);
+
+   /**
+    * The memory database destructor deallocates the data in the database.
+    */
+   virtual ~MemoryDatabase();
+
+   /**
+    * Create a new database file.
+    *
+    * Returns true if successful.
+    *
+    * @param name name of database. Normally a filename.
+    */
+   virtual bool
+   create(
+      const std::string& name);
+
+   /**
+    * Open an existing database file.
+    *
+    * Returns true if successful.
+    *
+    * @param name name of database. Normally a filename.
+    */
+   virtual bool
+   open(
+      const std::string& name);
+
+   /**
+    * Close the database.
+    *
+    * Returns true if successful.
+    *
+    * If the database is currently open then close it.  This should
+    * flush all data to the file (if the database is on disk).
+    */
+   virtual bool
+   close();
+
+   /**
+    * Return string name of memory database object.
+    */
+   virtual std::string
+   getName() const;
+
+   /**
+    * Return true if the specified key exists in the database and false
+    * otherwise.
+    */
+   virtual bool
+   keyExists(
+      const std::string& key);
+
+   /**
+    * Return all keys in the database.
+    */
+   virtual Array<std::string>
+   getAllKeys();
+
+   /**
+    * @brief Return the type of data associated with the key.
+    *
+    * If the key does not exist, then INVALID is returned
+    *
+    * @param key Key name in database.
+    */
+   virtual enum DataType
+   getArrayType(
+      const std::string& key);
+
+   /**
+    * Return the size of the array associated with the key.  If the key
+    * does not exist, then zero is returned.
+    */
+   virtual int
+   getArraySize(
+      const std::string& key);
+
+   /**
+    * Return whether the specified key represents a database entry.  If
+    * the key does not exist, then false is returned.
+    */
+   virtual bool
+   isDatabase(
+      const std::string& key);
+
+   /**
+    * Create a new database with the specified key name.  If the key already
+    * exists in the database, then the old key record is deleted and the new
+    * one is silently created in its place.
+    */
+   virtual Pointer<Database>
+   putDatabase(
+      const std::string& key);
+
+   /**
+    * Get the database with the specified key name.  If the specified
+    * key does not exist in the database or it is not a database, then
+    * an error message is printed and the program exits.
+    */
+   virtual Pointer<Database>
+   getDatabase(
+      const std::string& key);
+
+   /**
+    * Return whether the specified key represents a boolean entry.  If
+    * the key does not exist, then false is returned.
+    */
+   virtual bool
+   isBool(
+      const std::string& key);
+
+   /**
+    * Create a boolean scalar entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    */
+   virtual void
+   putBool(
+      const std::string& key,
+      const bool& data);
+
+   /**
+    * Create a boolean array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    */
+   virtual void
+   putBoolArray(
+      const std::string& key,
+      const Array<bool>& data);
+
+   /**
+    * Create a boolean array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    */
+   virtual void
+   putBoolArray(
+      const std::string& key,
+      const bool * const data,
+      const int nelements);
+
+   /**
+    * Get a boolean entry in the database with the specified key name.
+    * If the specified key does not exist in the database or is not a
+    * boolean scalar, then an error message is printed and the program
+    * exits.
+    */
+   virtual bool
+   getBool(
+      const std::string& key);
+
+   /**
+    * Get a boolean entry in the database with the specified key name.
+    * If the specified key does not exist in the database, then the default
+    * value is returned.  If the key exists but is not a boolean scalar,
+    * then an error message is printed and the program exits.
+    */
+   virtual bool
+   getBoolWithDefault(
+      const std::string& key,
+      const bool& defaultvalue);
+
+   /**
+    * Get a boolean entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a boolean array, then an error message is printed and
+    * the program exits.
+    */
+   virtual Array<bool>
+   getBoolArray(
+      const std::string& key);
+
+   /**
+    * Get a boolean entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a boolean array, then an error message is printed and
+    * the program exits.  The specified number of elements must match
+    * exactly the number of elements in the array in the database.
+    */
+   virtual void
+   getBoolArray(
+      const std::string& key,
+      bool* data,
+      const int nelements);
+
+   /**
+    * Return whether the specified key represents a box entry.  If
+    * the key does not exist, then false is returned.
+    */
+   virtual bool
+   isDatabaseBox(
+      const std::string& key);
+
+   /**
+    * Create a box scalar entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    */
+   virtual void
+   putDatabaseBox(
+      const std::string& key,
+      const DatabaseBox& data);
+
+   /**
+    * Create a box array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    */
+   virtual void
+   putDatabaseBoxArray(
+      const std::string& key,
+      const Array<DatabaseBox>& data);
+
+   /**
+    * Create a box array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    */
+   virtual void
+   putDatabaseBoxArray(
+      const std::string& key,
+      const DatabaseBox * const data,
+      const int nelements);
+
+   /**
+    * Get a box entry in the database with the specified key name.
+    * If the specified key does not exist in the database or is not a
+    * box scalar, then an error message is printed and the program
+    * exits.
+    */
+   virtual DatabaseBox
+   getDatabaseBox(
+      const std::string& key);
+
+   /**
+    * Get a box entry in the database with the specified key name.
+    * If the specified key does not exist in the database, then the default
+    * value is returned.  If the key exists but is not a box scalar,
+    * then an error message is printed and the program exits.
+    */
+   virtual DatabaseBox
+   getDatabaseBoxWithDefault(
+      const std::string& key,
+      const DatabaseBox& defaultvalue);
+
+   /**
+    * Get a box entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a box array, then an error message is printed and
+    * the program exits.
+    */
+   virtual Array<DatabaseBox>
+   getDatabaseBoxArray(
+      const std::string& key);
+
+   /**
+    * Get a box entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a box array, then an error message is printed and
+    * the program exits.  The specified number of elements must match
+    * exactly the number of elements in the array in the database.
+    */
+   virtual void
+   getDatabaseBoxArray(
+      const std::string& key,
+      DatabaseBox* data,
+      const int nelements);
+
+   /**
+    * Return whether the specified key represents a character entry.  If
+    * the key does not exist, then false is returned.
+    */
+   virtual bool
+   isChar(
+      const std::string& key);
+
+   /**
+    * Create a character scalar entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    */
+   virtual void
+   putChar(
+      const std::string& key,
+      const char& data);
+
+   /**
+    * Create a character array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    */
+   virtual void
+   putCharArray(
+      const std::string& key,
+      const Array<char>& data);
+
+   /**
+    * Create a character array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    */
+   virtual void
+   putCharArray(
+      const std::string& key,
+      const char * const data,
+      const int nelements);
+
+   /**
+    * Get a character entry in the database with the specified key name.
+    * If the specified key does not exist in the database or is not an
+    * character scalar, then an error message is printed and the program
+    * exits.
+    */
+   virtual char
+   getChar(
+      const std::string& key);
+
+   /**
+    * Get a character entry in the database with the specified key name.
+    * If the specified key does not exist in the database, then the default
+    * value is returned.  If the key exists but is not a character scalar,
+    * then an error message is printed and the program exits.
+    */
+   virtual char
+   getCharWithDefault(
+      const std::string& key,
+      const char& defaultvalue);
+
+   /**
+    * Get a character entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a character array, then an error message is printed and
+    * the program exits.
+    */
+   virtual Array<char>
+   getCharArray(
+      const std::string& key);
+
+   /**
+    * Get a character entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a character array, then an error message is printed and
+    * the program exits.  The specified number of elements must match
+    * exactly the number of elements in the array in the database.
+    */
+   virtual void
+   getCharArray(
+      const std::string& key,
+      char* data,
+      const int nelements);
+
+   /**
+    * Return whether the specified key represents a complex entry.  If
+    * the key does not exist, then false is returned.  Complex values
+    * may be promoted from integers, floats, or doubles.
+    */
+   virtual bool
+   isComplex(
+      const std::string& key);
+
+   /**
+    * Create a complex scalar entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    */
+   virtual void
+   putComplex(
+      const std::string& key,
+      const dcomplex& data);
+
+   /**
+    * Create a complex array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    */
+   virtual void
+   putComplexArray(
+      const std::string& key,
+      const Array<dcomplex>& data);
+
+   /**
+    * Create a complex array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    */
+   virtual void
+   putComplexArray(
+      const std::string& key,
+      const dcomplex * const data,
+      const int nelements);
+
+   /**
+    * Get a complex entry in the database with the specified key name.
+    * If the specified key does not exist in the database or is not a
+    * complex scalar, then an error message is printed and the program
+    * exits.  Complex values may be promoted from integers, floats, or
+    * doubles.
+    */
+   virtual dcomplex
+   getComplex(
+      const std::string& key);
+
+   /**
+    * Get a complex entry in the database with the specified key name.
+    * If the specified key does not exist in the database, then the default
+    * value is returned.  If the key exists but is not a complex scalar,
+    * then an error message is printed and the program exits.  Complex
+    * values may be promoted from integers, floats, or doubles.
+    */
+   virtual dcomplex
+   getComplexWithDefault(
+      const std::string& key,
+      const dcomplex& defaultvalue);
+
+   /**
+    * Get a complex entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a complex array, then an error message is printed and
+    * the program exits.  Complex values may be promoted from integers,
+    * floats, or doubles.
+    */
+   virtual Array<dcomplex>
+   getComplexArray(
+      const std::string& key);
+
+   /**
+    * Get a complex entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a complex array, then an error message is printed and
+    * the program exits.  The specified number of elements must match
+    * exactly the number of elements in the array in the database.
+    * Complex values may be promoted from integers, floats, or doubles.
+    */
+   virtual void
+   getComplexArray(
+      const std::string& key,
+      dcomplex* data,
+      const int nelements);
+
+   /**
+    * Return whether the specified key represents a double entry.  If
+    * the key does not exist, then false is returned.  Double values
+    * may be promoted from integers or floats.
+    */
+   virtual bool
+   isDouble(
+      const std::string& key);
+
+   /**
+    * Create a double scalar entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    */
+   virtual void
+   putDouble(
+      const std::string& key,
+      const double& data);
+
+   /**
+    * Create a double array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    */
+   virtual void
+   putDoubleArray(
+      const std::string& key,
+      const Array<double>& data);
+
+   /**
+    * Create a double array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    */
+   virtual void
+   putDoubleArray(
+      const std::string& key,
+      const double * const data,
+      const int nelements);
+
+   /**
+    * Get a double entry in the database with the specified key name.
+    * If the specified key does not exist in the database or is not a
+    * double scalar, then an error message is printed and the program
+    * exits.  Double values may be promoted from integers or floats.
+    */
+   virtual double
+   getDouble(
+      const std::string& key);
+
+   /**
+    * Get a double entry in the database with the specified key name.
+    * If the specified key does not exist in the database, then the default
+    * value is returned.  If the key exists but is not a double scalar, then
+    * an error message is printed and the program exits.  Double values may
+    * be promoted from integers or floats.
+    */
+   virtual double
+   getDoubleWithDefault(
+      const std::string& key,
+      const double& defaultvalue);
+
+   /**
+    * Get a double entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a double array, then an error message is printed and
+    * the program exits.  Double values may be promoted from integers
+    * or floats.
+    */
+   virtual Array<double>
+   getDoubleArray(
+      const std::string& key);
+
+   /**
+    * Get a double entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a double array, then an error message is printed and
+    * the program exits.  The specified number of elements must match
+    * exactly the number of elements in the array in the database.
+    * Double values may be promoted from integers or floats.
+    */
+   virtual void
+   getDoubleArray(
+      const std::string& key,
+      double* data,
+      const int nelements);
+
+   /**
+    * Return whether the specified key represents a float entry.  If
+    * the key does not exist, then false is returned.  Float values
+    * may be promoted from integers or silently truncated from doubles.
+    */
+   virtual bool
+   isFloat(
+      const std::string& key);
+
+   /**
+    * Create a float scalar entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    */
+   virtual void
+   putFloat(
+      const std::string& key,
+      const float& data);
+
+   /**
+    * Create a float array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    */
+   virtual void
+   putFloatArray(
+      const std::string& key,
+      const Array<float>& data);
+
+   /**
+    * Create a float array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    */
+   virtual void
+   putFloatArray(
+      const std::string& key,
+      const float * const data,
+      const int nelements);
+
+   /**
+    * Get a float entry in the database with the specified key name.
+    * If the specified key does not exist in the database or is not a
+    * float scalar, then an error message is printed and the program
+    * exits.  Float values may be promoted from integers or silently
+    * truncated from doubles.
+    */
+   virtual float
+   getFloat(
+      const std::string& key);
+
+   /**
+    * Get a float entry in the database with the specified key name.
+    * If the specified key does not exist in the database, then the default
+    * value is returned.  If the key exists but is not a float scalar, then
+    * an error message is printed and the program exits.  Float values may
+    * be promoted from integers or silently truncated from doubles.
+    */
+   virtual float
+   getFloatWithDefault(
+      const std::string& key,
+      const float& defaultvalue);
+
+   /**
+    * Get a float entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a float array, then an error message is printed and
+    * the program exits.  Float values may be promoted from integers
+    * or silently truncated from doubles.
+    */
+   virtual Array<float>
+   getFloatArray(
+      const std::string& key);
+
+   /**
+    * Get a float entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a float array, then an error message is printed and
+    * the program exits.  The specified number of elements must match
+    * exactly the number of elements in the array in the database.
+    * Float values may be promoted from integers or silently truncated
+    * from doubles.
+    */
+   virtual void
+   getFloatArray(
+      const std::string& key,
+      float* data,
+      const int nelements);
+
+   /**
+    * Return whether the specified key represents an integer entry.  If
+    * the key does not exist, then false is returned.
+    */
+   virtual bool
+   isInteger(
+      const std::string& key);
+
+   /**
+    * Create an integer scalar entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    */
+   virtual void
+   putInteger(
+      const std::string& key,
+      const int& data);
+
+   /**
+    * Create an integer array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    */
+   virtual void
+   putIntegerArray(
+      const std::string& key,
+      const Array<int>& data);
+
+   /**
+    * Create an integer array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    */
+   virtual void
+   putIntegerArray(
+      const std::string& key,
+      const int * const data,
+      const int nelements);
+
+   /**
+    * Get an integer entry in the database with the specified key name.
+    * If the specified key does not exist in the database or is not an
+    * integer scalar, then an error message is printed and the program
+    * exits.
+    */
+   virtual int
+   getInteger(
+      const std::string& key);
+
+   /**
+    * Get an integer entry in the database with the specified key name.
+    * If the specified key does not exist in the database, then the default
+    * value is returned.  If the key exists but is not an integer scalar,
+    * then an error message is printed and the program exits.
+    */
+   virtual int
+   getIntegerWithDefault(
+      const std::string& key,
+      const int& defaultvalue);
+
+   /**
+    * Get an integer entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not an integer array, then an error message is printed and
+    * the program exits.
+    */
+   virtual Array<int>
+   getIntegerArray(
+      const std::string& key);
+
+   /**
+    * Get an integer entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not an integer array, then an error message is printed and
+    * the program exits.  The specified number of elements must match
+    * exactly the number of elements in the array in the database.
+    */
+   virtual void
+   getIntegerArray(
+      const std::string& key,
+      int* data,
+      const int nelements);
+
+   /**
+    * Return whether the specified key represents a std::string entry.  If
+    * the key does not exist, then false is returned.
+    */
+   virtual bool
+   isString(
+      const std::string& key);
+
+   /**
+    * Create a string scalar entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    */
+   virtual void
+   putString(
+      const std::string& key,
+      const std::string& data);
+
+   /**
+    * Create a string array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    */
+   virtual void
+   putStringArray(
+      const std::string& key,
+      const Array<std::string>& data);
+
+   /**
+    * Create a string array entry in the database with the specified
+    * key name.  If the key already exists in the database, then the old
+    * key record is deleted and the new one is silently created in its place.
+    */
+   virtual void
+   putStringArray(
+      const std::string& key,
+      const std::string * const data,
+      const int nelements);
+
+   /**
+    * Get a string entry in the database with the specified key name.
+    * If the specified key does not exist in the database or is not an
+    * string scalar, then an error message is printed and the program
+    * exits.
+    */
+   virtual std::string
+   getString(
+      const std::string& key);
+
+   /**
+    * Get a string entry in the database with the specified key name.
+    * If the specified key does not exist in the database, then the default
+    * value is returned.  If the key exists but is not a string scalar,
+    * then an error message is printed and the program exits.
+    */
+   virtual std::string
+   getStringWithDefault(
+      const std::string& key,
+      const std::string& defaultvalue);
+
+   /**
+    * Get a string entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a string array, then an error message is printed and
+    * the program exits.
+    */
+   virtual Array<std::string>
+   getStringArray(
+      const std::string& key);
+
+   /**
+    * Get a string entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a string array, then an error message is printed and
+    * the program exits.  The specified number of elements must match
+    * exactly the number of elements in the array in the database.
+    */
+   virtual void
+   getStringArray(
+      const std::string& key,
+      std::string* data,
+      const int nelements);
+
+   /**
+    * @brief Returns the name of this database.
+    *
+    * The name for the root of the database is the name supplied when creating it.
+    * Names for nested databases are the keyname of the database.
+    *
+    * @param os Output stream.
+    */
+   virtual std::string
+   getName();
+
+   /**
+    * Return whether the specified key has been accessed by one of the
+    * lookup member functions.  If the key does not exist in the database,
+    * then false is returned.
+    */
+   bool
+   keyAccessed(
+      const std::string& key);
+
+   /**
+    * Print the current database to the specified output stream.  After
+    * each key, print whether that key came from the a file and was
+    * used, came from the file but was not used (unused),
+    * or came from a default key value (default).  If no output stream
+    * is specified, then data is written to stream pout.
+    *
+    * NOTE:  under the g++ compiler libraries, printClassData has a
+    * maximum output of 4096 characters per line.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os = pout);
+
+   /**
+    * Print the database keys that were not used to the specified output
+    * stream.
+    */
+   void
+   printUnusedKeys(
+      std::ostream& os = pout) const;
+
+   /**
+    * Print the database keys that were set via default calls to the specified
+    * output stream.
+    */
+   void
+   printDefaultKeys(
+      std::ostream& os = pout) const;
+
+private:
+   MemoryDatabase(
+      const MemoryDatabase&);                   // not implemented
+   void
+   operator = (
+      const MemoryDatabase&);                   // not implemented
+
+   /*
+    * The following structure holds the list of (key,value) pairs stored
+    * in the database.  Note that only one of the arrays contains valid
+    * data for any particular key.
+    */
+   struct KeyData {
+      std::string d_key;                                // key name
+      enum Database::DataType d_type;                   // type of entry
+      int d_array_size;                                 // size of array data
+      bool d_accessed;                                  // whether accessed
+      bool d_from_default;                              // from default key
+      Pointer<Database> d_database;             // sub-database
+      Array<bool> d_boolean;                    // boolean array value
+      Array<DatabaseBox> d_box;                 // box array value
+      Array<char> d_char;                       // char array value
+      Array<dcomplex> d_complex;                // complex array value
+      Array<double> d_double;                   // double array value
+      Array<float> d_float;                     // float array value
+      Array<int> d_integer;                     // integer array value
+      Array<std::string> d_string;              // string array value
+   };
+
+   /*
+    * Private utility routines for managing the database
+    */
+   bool
+   deleteKeyIfFound(
+      const std::string& key);
+   KeyData *
+   findKeyData(
+      const std::string& key);
+   KeyData *
+   findKeyDataOrExit(
+      const std::string& key);
+   static void
+   indentStream(
+      std::ostream& os,
+      const long indent);
+   void
+   printDatabase(
+      std::ostream& os,
+      const int indent,
+      const int toprint) const;
+
+   /*
+    * Private data members - name and a list of (key,value) pairs
+    */
+   std::string d_database_name;
+   List<KeyData> d_keyvalues;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/tbox/MemoryDatabase.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/MemoryDatabaseFactory.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/MemoryDatabaseFactory.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,27 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A factory for building MemoryDatabases 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/MemoryDatabaseFactory.h"
+#include "SAMRAI/tbox/MemoryDatabase.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * Build a new MemoryDatabase object.
+ */
+Pointer<Database> MemoryDatabaseFactory::allocate(
+   const std::string& name) {
+   Pointer<MemoryDatabase> database(new MemoryDatabase(name));
+   return database;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/MemoryDatabaseFactory.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/MemoryDatabaseFactory.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,38 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A factory for building MemoryDatabases 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_MemoryDatabaseFactory
+#define included_tbox_MemoryDatabaseFactory
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/DatabaseFactory.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * @brief MemoryDatabase factory.
+ *
+ * Builds a new MemoryDatabase.
+ */
+class MemoryDatabaseFactory:public DatabaseFactory
+{
+   /**
+    * Build a new Database object.
+    */
+   virtual Pointer<Database>
+   allocate(
+      const std::string& name);
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/MemoryUtilities.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/MemoryUtilities.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,204 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Routines for tracking memory use in SAMRAI. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/MemoryUtilities.h"
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/IOStream.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+#ifdef HAVE_TAU
+#if (PROFILING_ON || TRACING_ON)
+#include <Profile/Profiler.h>
+/* Register an "event" with Tau to track memory usage. */
+TAU_PROFILE_STMT(TauUserEvent ue("memory use"))
+#endif
+#endif
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+double MemoryUtilities::s_max_memory = 0.;
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Prints memory usage to specified output stream.  Each time this       *
+ * method is called, it prints in the format:                            *
+ *                                                                       *
+ *    253.0MB (265334688) in 615 allocs, 253.9MB reserved (871952 unused)*
+ *                                                                       *
+ * where                                                                 *
+ *                                                                       *
+ *    253.0MB is how many megabytes your current allocation has malloced.*
+ *    2653346688 is the precise size (in bytes) of your current alloc.   *
+ *    615 is the number of items allocated with malloc.                  *
+ *    253.9MB is the current memory reserved by the system for mallocs.  *
+ *    871952 is the bytes currently not used in this reserved memory.    *
+ *                                                                       *
+ *************************************************************************
+ */
+void MemoryUtilities::printMemoryInfo(
+   std::ostream& os)
+{
+   NULL_USE(os);
+
+#ifdef HAVE_MALLINFO
+   /*
+    * NOTE: This was taken directly from John Gyllenhal...
+    */
+
+   /* Get malloc info structure */
+   struct mallinfo my_mallinfo = mallinfo();
+
+   /* Get total memory reserved by the system for malloc currently*/
+   double reserved_mem = my_mallinfo.arena;
+
+   /* Get all the memory currently allocated to user by malloc, etc. */
+   double used_mem = my_mallinfo.hblkhd + my_mallinfo.usmblks
+      + my_mallinfo.uordblks;
+
+   /* Get memory not currently allocated to user but malloc controls */
+   double free_mem = my_mallinfo.fsmblks + my_mallinfo.fordblks;
+
+   /* Get number of items currently allocated */
+   double number_allocated = my_mallinfo.ordblks + my_mallinfo.smblks;
+
+   /* Record high-water mark for memory used. */
+   s_max_memory = MathUtilities<double>::Max(s_max_memory, used_mem);
+
+   /* Print out concise malloc info line */
+   os << used_mem / (1024.0 * 1024.0) << "MB ("
+      << used_mem << ") in "
+      << number_allocated << " allocs, "
+      << reserved_mem / (1024.0 * 1024.0) << "MB reserved ("
+      << free_mem << " unused)" << std::endl;
+
+#endif
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Records memory usage to user-defined event in TAU.  Note that if TAU  *
+ * is not included, this method does nothing.                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MemoryUtilities::recordMemoryInfo(
+   double time)
+{
+   NULL_USE(time);
+
+#ifdef HAVE_TAU
+#ifdef HAVE_MALLINFO
+   /*
+    * Access information from mallinfo
+    */
+   struct mallinfo my_mallinfo = mallinfo();
+
+   /* Get total memory reserved by the system for malloc currently*/
+   double reserved_mem = my_mallinfo.arena;
+
+   /* Get all the memory currently allocated to user by malloc, etc. */
+   double used_mem = my_mallinfo.hblkhd + my_mallinfo.usmblks
+      + my_mallinfo.uordblks;
+
+   /* Get memory not currently allocated to user but malloc controls */
+   double free_mem = my_mallinfo.fsmblks + my_mallinfo.fordblks;
+
+   /* Get number of items currently allocated */
+   double number_allocated = my_mallinfo.ordblks + my_mallinfo.smblks;
+
+   /* These vars are unused now but we may use them in the future */
+   NULL_USE(reserved_mem);
+   NULL_USE(free_mem);
+   NULL_USE(number_allocated);
+
+   /* Record high-water mark for memory used. */
+   s_max_memory = MathUtilities<double>::Max(s_max_memory, used_mem);
+
+   /*
+    * Record "used_mem" in MB to tau event.
+    */
+   TAU_PROFILE_STMT(ue.TriggerEvent(used_mem / (1024.0 * 1024.0)));
+#endif
+#endif
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Prints maximum memory used (i.e. high-water mark).  The max is        *
+ * determined each time the "printMemoryInfo" or "recordMemoryInfo"      *
+ * functions are called.                                                 *
+ *                                                                       *
+ *************************************************************************
+ */
+void MemoryUtilities::printMaxMemory(
+   std::ostream& os)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   /*
+    * Step through all nodes (>0) and send max memory to processor 0,
+    * which subsequently writes it out.
+    */
+   int maxmem = 0;
+   int len = 1;
+   SAMRAI_MPI::Status status;
+   for (int p = 0; p < mpi.getSize(); p++) {
+      if (mpi.getSize() > 1) {
+         if (mpi.getRank() == p) {
+            maxmem = static_cast<int>(s_max_memory);
+            mpi.Send(&maxmem, len, MPI_INT, 0, 0);
+         }
+         if (mpi.getRank() == 0) {
+            mpi.Recv(&maxmem, len, MPI_INT, p, 0, &status);
+         }
+      }
+      os << "Maximum memory used on processor " << p
+         << ": " << maxmem / (1024. * 1024.) << " MB" << std::endl;
+   }
+
+}
+
+size_t MemoryUtilities::align(
+   const size_t bytes)
+{
+   size_t aligned = bytes + ArenaAllocationAlignment - 1;
+   aligned -= aligned % ArenaAllocationAlignment;
+   return aligned;
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Unsuppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/MemoryUtilities.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/MemoryUtilities.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,96 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Routine for tracking memory use in applications. 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_MemoryUtilities
+#define included_tbox_MemoryUtilities
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#ifndef included_iostream
+#include <iostream>
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+/*!
+ * @brief Class MemoryUtilities provides utility methods for memory usage and
+ * misc memory utilities.
+ *
+ * "printMemoryInfo()" which does a simple dump of the current memory
+ * usage on a processor, and "recordMemoryInfo()" which records the
+ * memory for post-process analysis.
+ *
+ * Calls to these methods may be placed at various points in an application
+ * to track memory usage characteristics.  For applications running on a
+ * single processor, the  call the print method is likely sufficient. The
+ * information can simply be printed to a log file or output stream.  For
+ * applications running on multiple processors, or which otherwise have
+ * complex memory patterns that cannot easily be deciphered from prints to
+ * a log file, the record method may be more useful.  Use of this method
+ * requires the TAU (Tuning and Analysis Utilities) package to keep a
+ * profile of the recorded memory information so that it can be analyzed
+ * via a post-processing tool.
+ *
+ * Note that all member functions of this class are static so it is not
+ * necessary to instantiate the class.  Simply call the functions as
+ * static functions; e.g.,MemoryUtilities::function(...).
+ */
+struct MemoryUtilities {
+   /*!
+    * Print memory information to the supplied output stream.
+    */
+   static void
+   printMemoryInfo(
+      std::ostream& os);
+
+   /*!
+    * Record memory info to be analyzed by TAU (Tuning and Analysis
+    * Utilities).  If tracing is enabled, you can supply a time at
+    * which the memory is recorded.  This method requires SAMRAI to
+    * be configured with TAU.  If it is not, the method will do nothing.
+    */
+   static void
+   recordMemoryInfo(
+      double time = 0.0);
+
+   /*!
+    * Print maximum memory used (i.e. high-water mark) to the
+    * supplied output stream.
+    */
+   static void
+   printMaxMemory(
+      std::ostream& os);
+
+   /**
+    * Static function to compute alignment for memory allocation.
+    * Data allocations less than the alignment size are rounded up to
+    * the next multiple of the allocation size.  All data allocations
+    * are aligned on 16 byte boundaries.  Thus, a memory allocation of
+    * only 9 bytes will actually return a 16 byte chunk of memory.
+    */
+   static size_t
+   align(
+      const size_t bytes);
+
+private:
+   /*
+    * Keep track of maximum memory used (updated each time print or
+    * record function called).
+    */
+   static double s_max_memory;
+
+   enum { ArenaAllocationAlignment = 16 };
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/MessageStream.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/MessageStream.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Fixed-size message buffer used in interprocessor communication 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_MessageStream_C
+#define included_tbox_MessageStream_C
+
+#include "SAMRAI/tbox/MessageStream.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/tbox/MessageStream.I"
+#endif
+
+#include <cstring>
+
+namespace SAMRAI {
+namespace tbox {
+
+/*
+ *************************************************************************
+ *
+ * The constructor and destructor for MessageStream.
+ *
+ *************************************************************************
+ */
+
+MessageStream::MessageStream(
+   const size_t bytes,
+   const StreamMode mode):
+   d_mode(mode),
+   d_buffer_size(bytes),
+   d_current_size(0),
+   d_buffer_index(0)
+{
+   TBOX_ASSERT(d_buffer_size >= 1);
+
+   d_buffer = new char[d_buffer_size];
+}
+
+MessageStream::~MessageStream()
+{
+   delete[] d_buffer;
+}
+
+/*
+ *************************************************************************
+ *
+ * Print out class data if an assertion is thrown.
+ *
+ *************************************************************************
+ */
+
+void MessageStream::printClassData(
+   std::ostream& os) const
+{
+   os << "Maximum buffer size = " << d_buffer_size << std::endl;
+   os << "Current buffer size = " << d_current_size << std::endl;
+   os << "Current buffer index = " << d_buffer_index << std::endl;
+   os << "Pointer to buffer data = " << (void *)d_buffer << std::endl;
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/MessageStream.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/MessageStream.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,62 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Fixed-size message buffer used in interprocessor communication 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+SAMRAI_INLINE_KEYWORD
+void *MessageStream::getBufferStart()
+{
+   return (void *)d_buffer;
+}
+
+SAMRAI_INLINE_KEYWORD
+size_t MessageStream::getCurrentSize() const
+{
+   return d_current_size;
+}
+
+SAMRAI_INLINE_KEYWORD
+size_t MessageStream::getCurrentIndex() const
+{
+   return d_buffer_index;
+}
+
+SAMRAI_INLINE_KEYWORD
+void MessageStream::setCurrentIndex(
+   const size_t index)
+{
+   d_buffer_index = index;
+}
+
+SAMRAI_INLINE_KEYWORD
+void MessageStream::resetIndex()
+{
+   setCurrentIndex(0);
+}
+
+SAMRAI_INLINE_KEYWORD
+void*
+MessageStream::getPointerAndAdvanceCursor(const size_t nbytes)
+{
+   void* ptr = &d_buffer[d_buffer_index];
+   d_buffer_index += nbytes;
+
+   TBOX_ASSERT(d_buffer_index <= d_buffer_size);
+
+   d_current_size = d_buffer_index;
+   return ptr;
+}
+
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/MessageStream.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/MessageStream.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,225 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Fixed-size message buffer used in interprocessor communication 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_MessageStream
+#define included_tbox_MessageStream
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace tbox {
+
+/*!
+ * @brief Class to provide buffers for communication of data.
+ *
+ * MessageStream provides a fixed size message buffer that can
+ * hold data of any type.  It is used by communication routines in the
+ * Schedule class.
+ *
+ * @see tbox::Schedule
+ */
+
+class MessageStream
+{
+public:
+   /*!
+    * @brief Enumeration to identify if a buffer is being used to read or
+    * write data.
+    */
+   enum StreamMode { Read, Write };
+
+   /*!
+    * @brief Create a message stream of the specified size and mode
+    *
+    * @param[in] bytes   Number of bytes in the stream.
+    * @param[in] mode    MessageStream::Read or MessageStream::Write.
+    */
+   explicit MessageStream(
+      const size_t bytes,
+      const StreamMode mode);
+
+   /*!
+    * Virtual destructor for a message stream.
+    */
+   virtual ~MessageStream();
+
+   /*!
+    * @brief Static method to get amount of message stream space needed to
+    * communicate data type indicated by template parameter.
+    *
+    * IMPORTANT:  All size information given to the message stream should
+    * be based on values returned by this method.
+    *
+    * TODO:  Implementation should be moved out of header?  If we do this,
+    * Then we need to create another implementation file to include in this
+    * header.  I don't think it's worth it. RDH
+    *
+    * @return The number of bytes for num_items of type DATA_TYPE.
+    *
+    * @param[in] num_items
+    */
+   template<typename DATA_TYPE>
+   static unsigned int getSizeof(
+      unsigned int num_items = 1)
+   {
+      return num_items * static_cast<unsigned int>(sizeof(DATA_TYPE));
+   }
+
+   /*!
+    * @brief Return a pointer to the start of the message buffer.
+    */
+   void *
+   getBufferStart();
+
+   /*!
+    * @brief Return the current size of the buffer in bytes.
+    */
+   size_t
+   getCurrentSize() const;
+
+   /*!
+    * @brief Return the current index into the buffer.
+    */
+   size_t
+   getCurrentIndex() const;
+
+   /*!
+    * @brief Set the current index into the buffer.  Further packing/unpacking
+    * will begin at this new location.
+    */
+   void
+   setCurrentIndex(
+      const size_t index);
+
+   /*!
+    * @brief Reset the index to the beginning of the buffer.  This is the same
+    * as setting the buffer index to zero via setCurrentIndex().
+    */
+   void
+   resetIndex();
+
+   /*!
+    * @brief Pack a single data item into message stream.
+    *
+    * @param[in] data  Single item of type DATA_TYPE to be copied 
+    * into the stream.
+    */
+   template<typename DATA_TYPE>
+   MessageStream&
+   operator << (
+      const DATA_TYPE& data);
+
+   /*!
+    * @brief Pack an array of data items into message stream.
+    *
+    * @param[in] data  Pointer to an array of data of type DATA_TYPE 
+    *                  to be copied into the stream.
+    * @param[in] size  Number of items to pack.
+    */
+   template<typename DATA_TYPE>
+   void
+   pack(
+      const DATA_TYPE* data,
+      unsigned int size = 1);
+
+   /*!
+    * @brief Unpack a single data item from message stream.
+    *
+    * @param[out] data  Single item of type DATA_TYPE that will be 
+    *                   copied from the stream.
+    */
+   template<typename DATA_TYPE>
+   MessageStream&
+   operator >> (
+      DATA_TYPE& data);
+
+   /*!
+    * @brief Unpack an array of data items from message stream.
+    *
+    * @param[out] data  Pointer to an array of data of type DATA_TYPE 
+    *                   that will receive data copied from
+    *                   the stream.
+    * @param[out] size  Number of items that will be copied.
+    */
+   template<typename DATA_TYPE>
+   void
+   unpack(
+      DATA_TYPE* data,
+      unsigned int size = 1);
+
+   /*!
+    * @brief Print out internal object data.
+    *
+    * @param[out] os  Output stream.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os) const;
+
+private:
+   /*!
+    * @brief  Helper function to get pointer into buffer at current
+    * position and advance buffer position by given number of bytes.
+    *
+    * @param[in]  nbytes
+    */
+   void *getPointerAndAdvanceCursor(
+      const size_t nbytes);
+
+   MessageStream(
+      const MessageStream&);            // not implemented
+   void
+   operator = (
+      const MessageStream&);            // not implemented
+
+   /*!
+    * @brief  Read/write mode of the stream.
+    */
+   const StreamMode d_mode;
+
+   /*!
+    * Number of bytes allocated in the buffer.
+    */ 
+   size_t d_buffer_size;
+
+   /*!
+    * Number of bytes currently being used in the buffer.
+    */
+   size_t d_current_size;
+
+   /*!
+    * Current index into the buffer used when traversing.
+    */
+   size_t d_buffer_index;
+
+   /*!
+    * The buffer for the streamed data.
+    */
+   char* d_buffer;
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/tbox/MessageStream.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/tbox/MessageStream_template_methods.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/MessageStream_template_methods.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/MessageStream_template_methods.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,113 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Fixed-size message buffer used in interprocessor communication 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_MessageStream_C
+#define included_tbox_MessageStream_C
+
+#include "SAMRAI/tbox/MessageStream.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <cstring>
+
+namespace SAMRAI {
+namespace tbox {
+
+/*
+ *************************************************************************
+ *
+ * Pack array into message stream.
+ *
+ *************************************************************************
+ */
+
+template<typename DATA_TYPE>
+void MessageStream::pack(
+   const DATA_TYPE* data,
+   unsigned int size)
+{
+   TBOX_ASSERT(d_mode == MessageStream::Write);
+
+   if (data && (size > 0)) {
+      const unsigned int nbytes = MessageStream::getSizeof<DATA_TYPE>(size);
+      void* ptr = getPointerAndAdvanceCursor(nbytes);
+      memcpy(ptr, static_cast<const void *>(data), nbytes);
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ * Pack single data value into message stream.
+ *
+ *************************************************************************
+ */
+
+template<typename DATA_TYPE>
+MessageStream & MessageStream::operator << (
+   const DATA_TYPE& data)
+{
+   TBOX_ASSERT(d_mode == MessageStream::Write);
+
+   static const unsigned int nbytes = MessageStream::getSizeof<DATA_TYPE>(1);
+
+   void* ptr = getPointerAndAdvanceCursor(nbytes);
+   memcpy(ptr, static_cast<const void *>(&data), nbytes);
+
+   return *this;
+}
+
+/*
+ *************************************************************************
+ *
+ * Unpack array from message stream.
+ *
+ *************************************************************************
+ */
+
+template<typename DATA_TYPE>
+void MessageStream::unpack(
+   DATA_TYPE* data,
+   unsigned int size)
+{
+   TBOX_ASSERT(d_mode == MessageStream::Read);
+
+   if (data && (size > 0)) {
+      const unsigned int nbytes = MessageStream::getSizeof<DATA_TYPE>(size);
+      void* ptr = getPointerAndAdvanceCursor(nbytes);
+      memcpy(static_cast<void *>(data), ptr, nbytes);
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ * Unpack single data value from message stream.
+ *
+ *************************************************************************
+ */
+
+template<typename DATA_TYPE>
+MessageStream & MessageStream::operator >> (
+   DATA_TYPE& data)
+{
+   TBOX_ASSERT(d_mode == MessageStream::Read);
+
+   static const unsigned int nbytes = MessageStream::getSizeof<DATA_TYPE>(1);
+
+   void* ptr = getPointerAndAdvanceCursor(nbytes);
+   memcpy(static_cast<void *>(&data), ptr, nbytes);
+
+   return *this;
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/NullDatabase.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/NullDatabase.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,21 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An input database structure that stores (key,value) pairs 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/NullDatabase.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/tbox/NullDatabase.I"
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/NullDatabase.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/NullDatabase.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,495 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An input database structure that stores (key,value) pairs 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace tbox {
+
+SAMRAI_INLINE_KEYWORD
+NullDatabase::NullDatabase()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * The virtual destructor deallocates database data.			*
+ *									*
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+NullDatabase::~NullDatabase()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create memory data file specified by name.                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+bool NullDatabase::create(
+   const std::string& name)
+{
+   NULL_USE(name);
+   return true;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Open memory data file specified by name                               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+bool NullDatabase::open(
+   const std::string& name)
+{
+   NULL_USE(name);
+   return true;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Close the open data file.                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+bool NullDatabase::close()
+{
+   return true;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Always returns true.							*
+ *									*
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+bool NullDatabase::keyExists(
+   const std::string& key)
+{
+   NULL_USE(key);
+   return true;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Return an empty Array<std::string>.					*
+ *									*
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+Array<std::string> NullDatabase::getAllKeys()
+{
+   Array<std::string> keys(0);
+   return keys;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Always returns INVALID.	                                        *
+ *									*
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+Database::DataType NullDatabase::getArrayType(
+   const std::string& key)
+{
+   NULL_USE(key);
+   return Database::SAMRAI_INVALID;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Always returns 0.							*
+ *									*
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+int NullDatabase::getArraySize(
+   const std::string& key)
+{
+   NULL_USE(key);
+   return 0;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Member functions that manage the database values within the database.	*
+ *									*
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+bool NullDatabase::isDatabase(
+   const std::string& key)
+{
+   NULL_USE(key);
+   return true;
+}
+
+SAMRAI_INLINE_KEYWORD
+Pointer<Database> NullDatabase::putDatabase(
+   const std::string& key)
+{
+   NULL_USE(key);
+   return Pointer<Database>(this);
+}
+
+SAMRAI_INLINE_KEYWORD
+Pointer<Database> NullDatabase::getDatabase(
+   const std::string& key)
+{
+   NULL_USE(key);
+   Pointer<Database> new_NullDatabase(new NullDatabase());
+   return new_NullDatabase;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Member functions that manage boolean values within the database.	*
+ *									*
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+bool NullDatabase::isBool(
+   const std::string& key)
+{
+   NULL_USE(key);
+   return true;
+}
+
+SAMRAI_INLINE_KEYWORD
+void NullDatabase::putBoolArray(
+   const std::string& key,
+   const bool * const data,
+   const int nelements)
+{
+   NULL_USE(key);
+   NULL_USE(data);
+   NULL_USE(nelements);
+}
+
+SAMRAI_INLINE_KEYWORD
+Array<bool> NullDatabase::getBoolArray(
+   const std::string& key)
+{
+   NULL_USE(key);
+   Array<bool> empty(0);
+   return empty;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Member functions that manage box values within the database.		*
+ *									*
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+bool NullDatabase::isDatabaseBox(
+   const std::string& key)
+{
+   NULL_USE(key);
+   return true;
+}
+
+SAMRAI_INLINE_KEYWORD
+void NullDatabase::putDatabaseBoxArray(
+   const std::string& key,
+   const DatabaseBox * const data,
+   const int nelements)
+{
+   NULL_USE(key);
+   NULL_USE(data);
+   NULL_USE(nelements);
+}
+
+SAMRAI_INLINE_KEYWORD
+Array<DatabaseBox> NullDatabase::getDatabaseBoxArray(
+   const std::string& key)
+{
+   NULL_USE(key);
+
+   Array<DatabaseBox> empty(0);
+   return empty;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Member functions that manage character values within the database.	*
+ *									*
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+bool NullDatabase::isChar(
+   const std::string& key)
+{
+   NULL_USE(key);
+   return true;
+}
+
+SAMRAI_INLINE_KEYWORD
+void NullDatabase::putCharArray(
+   const std::string& key,
+   const char * const data,
+   const int nelements)
+{
+   NULL_USE(key);
+   NULL_USE(data);
+   NULL_USE(nelements);
+}
+
+SAMRAI_INLINE_KEYWORD
+Array<char> NullDatabase::getCharArray(
+   const std::string& key)
+{
+   NULL_USE(key);
+
+   Array<char> empty(0);
+   return empty;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Member functions that manage complex values within the database.	*
+ * Note that complex numbers may be promoted from integers, floats,	*
+ * and doubles.								*
+ *									*
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+bool NullDatabase::isComplex(
+   const std::string& key)
+{
+   NULL_USE(key);
+   return true;
+}
+
+SAMRAI_INLINE_KEYWORD
+void NullDatabase::putComplexArray(
+   const std::string& key,
+   const dcomplex * const data,
+   const int nelements)
+{
+   NULL_USE(key);
+   NULL_USE(data);
+   NULL_USE(nelements);
+}
+
+SAMRAI_INLINE_KEYWORD
+Array<dcomplex> NullDatabase::getComplexArray(
+   const std::string& key)
+{
+   NULL_USE(key);
+
+   Array<dcomplex> empty(0);
+   return empty;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Member functions that manage double values within the database.	*
+ * Note that doubles may be promoted from integers or floats.		*
+ *									*
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+bool NullDatabase::isDouble(
+   const std::string& key)
+{
+   NULL_USE(key);
+   return true;
+}
+
+SAMRAI_INLINE_KEYWORD
+void NullDatabase::putDoubleArray(
+   const std::string& key,
+   const double * const data,
+   const int nelements)
+{
+   NULL_USE(key);
+   NULL_USE(data);
+   NULL_USE(nelements);
+}
+
+SAMRAI_INLINE_KEYWORD
+Array<double> NullDatabase::getDoubleArray(
+   const std::string& key)
+{
+   NULL_USE(key);
+   Array<double> empty(0);
+   return empty;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Member functions that manage float values within the database.	*
+ * Note that floats may be promoted from integers or truncated from	*
+ * doubles (without a warning).						*
+ *									*
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+bool NullDatabase::isFloat(
+   const std::string& key)
+{
+   NULL_USE(key);
+   return true;
+}
+
+SAMRAI_INLINE_KEYWORD
+void NullDatabase::putFloatArray(
+   const std::string& key,
+   const float * const data,
+   const int nelements)
+{
+   NULL_USE(key);
+   NULL_USE(data);
+   NULL_USE(nelements);
+}
+
+SAMRAI_INLINE_KEYWORD
+Array<float> NullDatabase::getFloatArray(
+   const std::string& key)
+{
+   NULL_USE(key);
+
+   Array<float> empty(0);
+   return empty;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Member functions that manage integer values within the database.	*
+ *									*
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+bool NullDatabase::isInteger(
+   const std::string& key)
+{
+   NULL_USE(key);
+   return true;
+}
+
+SAMRAI_INLINE_KEYWORD
+void NullDatabase::putIntegerArray(
+   const std::string& key,
+   const int * const data,
+   const int nelements)
+{
+   NULL_USE(key);
+   NULL_USE(data);
+   NULL_USE(nelements);
+}
+
+SAMRAI_INLINE_KEYWORD
+Array<int> NullDatabase::getIntegerArray(
+   const std::string& key)
+{
+   NULL_USE(key);
+
+   Array<int> empty(0);
+   return empty;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Member functions that manage string values within the database.	*
+ *									*
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+bool NullDatabase::isString(
+   const std::string& key)
+{
+   NULL_USE(key);
+   return true;
+}
+
+SAMRAI_INLINE_KEYWORD
+void NullDatabase::putStringArray(
+   const std::string& key,
+   const std::string * const data,
+   const int nelements)
+{
+   NULL_USE(key);
+   NULL_USE(data);
+   NULL_USE(nelements);
+}
+
+SAMRAI_INLINE_KEYWORD
+Array<std::string> NullDatabase::getStringArray(
+   const std::string& key)
+{
+   NULL_USE(key);
+   Array<std::string> empty(0);
+   return empty;
+}
+
+SAMRAI_INLINE_KEYWORD
+std::string NullDatabase::getName(
+   void)
+{
+   return std::string();
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Does nothing.								*
+ *									*
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+void NullDatabase::printClassData(
+   std::ostream& os)
+{
+   NULL_USE(os);
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/NullDatabase.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/NullDatabase.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,357 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A null database that does nothing for all database methods. 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_NullDatabase
+#define included_tbox_NullDatabase
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/List.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * The NullDatabase provides an implementation of the Database
+ * interface with empty methods for the purpose of reducing the
+ * the number of guards necessary in methods from other classes that
+ * use databases.
+ *
+ * See the Database class documentation for a description of the
+ * generic database interface.
+ *
+ */
+
+class NullDatabase:public Database
+{
+public:
+   /**
+    * The null database constructor creates an empty database with
+    * the name "null".
+    */
+   NullDatabase();
+
+   /**
+    * The input database destructor deallocates the data in the database.
+    */
+   virtual ~NullDatabase();
+
+   /**
+    * Create a new database file.
+    *
+    * Returns true if successful.
+    *
+    * @param name name of database. Normally a filename.
+    */
+   virtual bool
+   create(
+      const std::string& name);
+
+   /**
+    * Open an existing database file.
+    *
+    * Returns true if successful.
+    *
+    * @param name name of database. Normally a filename.
+    */
+   virtual bool
+   open(
+      const std::string& name);
+
+   /**
+    * Close the database.
+    *
+    * Returns true if successful.
+    *
+    * If the database is currently open then close it.  This should
+    * flush all data to the file (if the database is on disk).
+    */
+   virtual bool
+   close();
+
+   /**
+    * Always returns true.
+    */
+   virtual bool
+   keyExists(
+      const std::string& key);
+
+   /**
+    * Return an empty Array<string>.
+    */
+   virtual Array<std::string>
+   getAllKeys();
+
+   /**
+    * Return INVALID.
+    */
+   virtual enum DataType
+   getArrayType(
+      const std::string& key);
+
+   /**
+    * Always returns 0.
+    */
+   virtual int
+   getArraySize(
+      const std::string& key);
+
+   /**
+    * Always returns true.
+    */
+   virtual bool
+   isDatabase(
+      const std::string& key);
+
+   /**
+    * Returns a pointer to the null database.
+    */
+   virtual Pointer<Database>
+   putDatabase(
+      const std::string& key);
+
+   /**
+    * Returns a pointer to the null database.
+    */
+   virtual Pointer<Database>
+   getDatabase(
+      const std::string& key);
+
+   /**
+    * Always returns true.
+    */
+   virtual bool
+   isBool(
+      const std::string& key);
+
+   /**
+    * Does nothing.
+    */
+   virtual void
+   putBoolArray(
+      const std::string& key,
+      const bool * const data,
+      const int nelements);
+
+   /**
+    * Returns an empty Array<bool>.
+    */
+   virtual Array<bool>
+   getBoolArray(
+      const std::string& key);
+
+   /**
+    * Always returns true.
+    */
+   virtual bool
+   isDatabaseBox(
+      const std::string& key);
+
+   /**
+    * Does nothing.
+    */
+   virtual void
+   putDatabaseBoxArray(
+      const std::string& key,
+      const DatabaseBox * const data,
+      const int nelements);
+
+   /**
+    * Returns an empty Array<box>.
+    */
+   virtual Array<DatabaseBox>
+   getDatabaseBoxArray(
+      const std::string& key);
+
+   /**
+    * Always returns true.
+    */
+   virtual bool
+   isChar(
+      const std::string& key);
+
+   /**
+    * Does nothing.
+    */
+   virtual void
+   putCharArray(
+      const std::string& key,
+      const char * const data,
+      const int nelements);
+
+   /**
+    * Returns an empty Array<char>.
+    */
+   virtual Array<char>
+   getCharArray(
+      const std::string& key);
+
+   /**
+    * Always returns true.
+    */
+   virtual bool
+   isComplex(
+      const std::string& key);
+
+   /**
+    * Does nothing.
+    */
+   virtual void
+   putComplexArray(
+      const std::string& key,
+      const dcomplex * const data,
+      const int nelements);
+
+   /**
+    * Returns an empty Array<dcomplex>.
+    */
+   virtual Array<dcomplex>
+   getComplexArray(
+      const std::string& key);
+
+   /**
+    * Always returns true.
+    */
+   virtual bool
+   isDouble(
+      const std::string& key);
+
+   /**
+    * Does nothing.
+    */
+   virtual void
+   putDoubleArray(
+      const std::string& key,
+      const double * const data,
+      const int nelements);
+
+   /**
+    * Returns an empty Array<double>.
+    */
+   virtual Array<double>
+   getDoubleArray(
+      const std::string& key);
+
+   /**
+    * Always return true.
+    */
+   virtual bool
+   isFloat(
+      const std::string& key);
+
+   /**
+    * Does nothing.
+    */
+   virtual void
+   putFloatArray(
+      const std::string& key,
+      const float * const data,
+      const int nelements);
+
+   /**
+    * Returns an empty Array<float>.
+    */
+   virtual Array<float>
+   getFloatArray(
+      const std::string& key);
+
+   /**
+    * Always returns true.
+    */
+   virtual bool
+   isInteger(
+      const std::string& key);
+
+   /**
+    * Does nothing.
+    */
+   virtual void
+   putIntegerArray(
+      const std::string& key,
+      const int * const data,
+      const int nelements);
+
+   /**
+    * Returns an empty Array<int>.
+    */
+   virtual Array<int>
+   getIntegerArray(
+      const std::string& key);
+
+   /**
+    * Always returns true.
+    */
+   virtual bool
+   isString(
+      const std::string& key);
+
+   /**
+    * Does nothing.
+    */
+   virtual void
+   putStringArray(
+      const std::string& key,
+      const std::string * const data,
+      const int nelements);
+
+   /**
+    * Returns an empty Array<std::string>.
+    */
+   virtual Array<std::string>
+   getStringArray(
+      const std::string& key);
+
+   /**
+    * Does nothing.
+    */
+   virtual std::string
+   getName();
+
+   /**
+    * Does nothing.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os = pout);
+
+   using Database::putBoolArray;
+   using Database::getBoolArray;
+   using Database::putDatabaseBoxArray;
+   using Database::getDatabaseBoxArray;
+   using Database::putCharArray;
+   using Database::getCharArray;
+   using Database::putComplexArray;
+   using Database::getComplexArray;
+   using Database::putFloatArray;
+   using Database::getFloatArray;
+   using Database::putDoubleArray;
+   using Database::getDoubleArray;
+   using Database::putIntegerArray;
+   using Database::getIntegerArray;
+   using Database::putStringArray;
+   using Database::getStringArray;
+
+private:
+   NullDatabase(
+      const NullDatabase&);             // not implemented
+   void
+   operator = (
+      const NullDatabase&);                     // not implemented
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/tbox/NullDatabase.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/PIO.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/PIO.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,242 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Parallel I/O classes pout, perr, and plog and control class 
+ *
+ ************************************************************************/
+
+#include <string>
+
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/ParallelBuffer.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+int PIO::s_rank = -1;
+std::ofstream * PIO::s_filestream = NULL;
+
+/*
+ *************************************************************************
+ *									*
+ * Define the parallel buffers and the associated ostream objects.	*
+ *									*
+ *************************************************************************
+ */
+
+static ParallelBuffer pout_buffer;
+static ParallelBuffer perr_buffer;
+static ParallelBuffer plog_buffer;
+
+std::ostream pout(&pout_buffer);
+std::ostream perr(&perr_buffer);
+std::ostream plog(&plog_buffer);
+
+/*
+ *************************************************************************
+ *									*
+ * Initialie the parallel I/O streams.  This routine must be called	*
+ * before pout, perr, and plog are used for output but after SAMRAI_MPI.has	*
+ * been initialized.  By default, logging is disabled.			*
+ *									*
+ *************************************************************************
+ */
+
+void PIO::initialize()
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   mpi.Comm_rank(&s_rank);
+   s_filestream = NULL;
+
+   /*
+    * Initialize the standard parallel output stream
+    */
+
+   pout_buffer.setActive(s_rank == 0);
+   pout_buffer.setPrefixString(std::string());
+   pout_buffer.setOutputStream1(&std::cout);
+   pout_buffer.setOutputStream2(NULL);
+
+   /*
+    * Initialize the error parallel output stream
+    */
+
+   std::string buffer = "P=" + tbox::Utilities::processorToString(s_rank) + ":";
+
+   perr_buffer.setActive(true);
+   perr_buffer.setPrefixString(buffer);
+   perr_buffer.setOutputStream1(&std::cerr);
+   perr_buffer.setOutputStream2(NULL);
+
+   /*
+    * Initialize the parallel log file (disabled by default)
+    */
+
+   plog_buffer.setActive(false);
+   plog_buffer.setPrefixString(std::string());
+   plog_buffer.setOutputStream1(NULL);
+   plog_buffer.setOutputStream2(NULL);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Close the output streams.  Flush both cout and cerr.  If logging,	*
+ * then flush and close the log stream.					*
+ *									*
+ *************************************************************************
+ */
+
+void PIO::finalize()
+{
+   std::cout.flush();
+   std::cerr.flush();
+   shutdownFilestream();
+}
+
+/*
+ *************************************************************************
+ *									*
+ * If the log file stream is open, then shut down the filestream.  Close	*
+ * and flush the channel and disconnect the output stream buffers.	*
+ *									*
+ *************************************************************************
+ */
+
+void PIO::shutdownFilestream()
+{
+   if (s_filestream) {
+      s_filestream->flush();
+      s_filestream->close();
+
+      delete s_filestream;
+      s_filestream = NULL;
+
+      pout_buffer.setOutputStream2(NULL);
+      perr_buffer.setOutputStream2(NULL);
+      plog_buffer.setOutputStream1(NULL);
+      plog_buffer.setActive(false);
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Log messages for node zero only.  If a log stream was open, close	*
+ * it.  If this is node zero, then open a new log stream and set the	*
+ * appropriate buffer streams to point to the log file.			*
+ *									*
+ *************************************************************************
+ */
+
+void PIO::logOnlyNodeZero(
+   const std::string& filename)
+{
+   /*
+    * If the filestream was open, then close it and reset streams
+    */
+
+   shutdownFilestream();
+
+   /*
+    * If this is node zero, then open the log stream and redirect output
+    */
+
+   if (s_rank == 0) {
+      s_filestream = new std::ofstream(filename.c_str());
+      if (!(*s_filestream)) {
+         delete s_filestream;
+         s_filestream = NULL;
+         perr << "PIO: Could not open log file ``" << filename.c_str()
+              << "''\n";
+      } else {
+         pout_buffer.setOutputStream2(s_filestream);
+         perr_buffer.setOutputStream2(s_filestream);
+         plog_buffer.setOutputStream1(s_filestream);
+         plog_buffer.setActive(true);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Log messages for all nodes.  If a log stream was open, the close it.	*
+ * Open a log stream on every processor.  The filename for the log file	*
+ * will be appended with the processor number.				*
+ *									*
+ *************************************************************************
+ */
+
+void PIO::logAllNodes(
+   const std::string& filename)
+{
+   /*
+    * If the filestream was open, then close it and reset streams
+    */
+
+   shutdownFilestream();
+
+   /*
+    * Open the log stream and redirect output
+    */
+
+   std::string full_filename = filename + "."
+      + tbox::Utilities::processorToString(s_rank);
+   s_filestream = new std::ofstream(full_filename.c_str());
+
+   if (!(*s_filestream)) {
+      delete s_filestream;
+      s_filestream = NULL;
+      perr << "PIO: Could not open log file ``" << full_filename << "''\n";
+   } else {
+      pout_buffer.setOutputStream2(s_filestream);
+      perr_buffer.setOutputStream2(s_filestream);
+      plog_buffer.setOutputStream1(s_filestream);
+      plog_buffer.setActive(true);
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Suspend logging of data to the file stream.  This does not close the	*
+ * filestream (assuming it is open) but just disables logging.		*
+ *									*
+ *************************************************************************
+ */
+
+void PIO::suspendLogging()
+{
+   pout_buffer.setOutputStream2(NULL);
+   perr_buffer.setOutputStream2(NULL);
+   plog_buffer.setOutputStream1(NULL);
+   plog_buffer.setActive(false);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Resume logging of the file stream (assuming it was open).  If the	*
+ * file stream is NULL, then do nothing.					*
+ *									*
+ *************************************************************************
+ */
+
+void PIO::resumeLogging()
+{
+   if (s_filestream) {
+      pout_buffer.setOutputStream2(s_filestream);
+      perr_buffer.setOutputStream2(s_filestream);
+      plog_buffer.setOutputStream1(s_filestream);
+      plog_buffer.setActive(true);
+   }
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/PIO.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/PIO.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,116 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Parallel I/O classes pout, perr, and plog and control class 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_PIO
+#define included_tbox_PIO
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <fstream>
+#include <iostream>
+#include <string>
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * Class PIO manages parallel stream I/O and logging.  Static member
+ * function initialize() must be called before any of the parallel streams
+ * pout, perr, or plog may be used.  Routine finalize() should also be called
+ * before termination of the program.  Note that these functions are currently
+ * called by the SAMRAI manager startup and shutdown routines and therefore
+ * should not be explicitly called by an application code.
+ *
+ * By default, logging is disabled.  To enable logging, call one of the
+ * routines logOnlyNodeZero() or logAllNodes().  Logging may be suspended
+ * and resumed.
+ */
+struct PIO {
+   /**
+    * Initialize the parallel I/O streams.  This routine must be called
+    * before using pout, perr, or plog.  This routine is automatically
+    * invoked by the SAMRAI library start-up routines.  This routine
+    * must be called after the MPI routines have been initialized.
+    */
+   static void
+   initialize();
+
+   /**
+    * Shut down the parallel I/O streams and close log files.  This routine
+    * must be called before program termination and is currently invoked from
+    * the SAMRAI library shutdown procedure.
+    */
+   static void
+   finalize();
+
+   /**
+    * Log messages for node zero only to the specified filename.  All output
+    * to pout, perr, and plog on node zero will go to the log file.
+    */
+   static void
+   logOnlyNodeZero(
+      const std::string& filename);
+
+   /**
+    * Log messages from all nodes.  The diagnostic data for processor XXXXX
+    * will be sent to a file with the name filename.XXXXX, where filename is
+    * the function argument.
+    */
+   static void
+   logAllNodes(
+      const std::string& filename);
+
+   /**
+    * Temporarily suspend file logging.  Log file output will be discarded,
+    * although the output file will not be closed.  Logging can be resumed
+    * by calling member function resumeLogging().
+    */
+   static void
+   suspendLogging();
+
+   /**
+    * Resume logging after logging was suspended via member function
+    * suspendLogging().
+    */
+   static void
+   resumeLogging();
+
+private:
+   static void
+   shutdownFilestream();                // shutdown the log filestream
+
+   static int s_rank;                   // processor rank in MPI group
+   static std::ofstream* s_filestream;  // NULL or log filestream
+};
+
+/**
+ * Parallel output stream pout writes to the standard output from node zero
+ * only.  Output from other nodes is ignored.  If logging is enabled, then
+ * output is mirrored to the log stream, as well.
+ */
+extern std::ostream pout;
+
+/**
+ * Parallel output stream perr writes to the standard error from all nodes.
+ * Output is prepended with the processor number.  If logging is enabled,
+ * then output is mirrored to the log stream, as well.
+ */
+extern std::ostream perr;
+
+/**
+ * Parallel output stream plog writes output to the log file.  When logging
+ * from multiple processors, the processor number is appended to the filename.
+ */
+extern std::ostream plog;
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/ParallelBuffer.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/ParallelBuffer.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,357 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Parallel I/O class buffer to manage parallel ostreams output 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/ParallelBuffer.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#include <string>
+#include <cstring>
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+#define DEFAULT_BUFFER_SIZE (128)
+
+namespace SAMRAI {
+namespace tbox {
+
+/*
+ *************************************************************************
+ *									*
+ * Construct a parallel buffer object.  The object will require further	*
+ * initialization to set up I/O streams and the prefix string.		*
+ *									*
+ *************************************************************************
+ */
+
+ParallelBuffer::ParallelBuffer()
+{
+   d_active = true;
+   d_prefix = std::string();
+   d_ostream1 = NULL;
+   d_ostream2 = NULL;
+   d_buffer = NULL;
+   d_buffer_size = 0;
+   d_buffer_ptr = 0;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * The destructor deallocates internal data buffer.  It does not modify  *
+ * the output streams.                                                   *
+ *									*
+ *************************************************************************
+ */
+
+ParallelBuffer::~ParallelBuffer()
+{
+   if (d_buffer) delete[] d_buffer;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Activate or deactivate the output stream.  If the stream has been	*
+ * deactivated, then deallocate the internal data buffer.                *
+ *									*
+ *************************************************************************
+ */
+
+void ParallelBuffer::setActive(
+   bool active)
+{
+   if (!active && d_buffer) {
+      delete[] d_buffer;
+      d_buffer = NULL;
+      d_buffer_size = 0;
+      d_buffer_ptr = 0;
+   }
+   d_active = active;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Set the prefix that begins every new output line.                     *
+ *									*
+ *************************************************************************
+ */
+
+void ParallelBuffer::setPrefixString(
+   const std::string& text)
+{
+   d_prefix = text;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Set the primary output stream.					*
+ *									*
+ *************************************************************************
+ */
+
+void ParallelBuffer::setOutputStream1(
+   std::ostream* stream)
+{
+   d_ostream1 = stream;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Set the secondary output stream.					*
+ *									*
+ *************************************************************************
+ */
+
+void ParallelBuffer::setOutputStream2(
+   std::ostream* stream)
+{
+   d_ostream2 = stream;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Output a string to the output stream by invoking the                  *
+ * outputString(string,length) method.                                   *
+ *									*
+ *************************************************************************
+ */
+
+void ParallelBuffer::outputString(
+   const std::string& text)
+{
+   outputString(text, static_cast<int>(text.length()));
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Write a text string of the specified length to the output stream.	*
+ * Note that the string data is accumulated into the internal output	*
+ * buffer until an end-of-line is detected.				*
+ *									*
+ *************************************************************************
+ */
+
+void ParallelBuffer::outputString(
+   const std::string& text,
+   const int length)
+{
+   if ((length > 0) && d_active) {
+
+      /*
+       * If we need to allocate the internal buffer, then do so
+       */
+
+      if (!d_buffer) {
+         d_buffer = new char[DEFAULT_BUFFER_SIZE];
+         d_buffer_size = DEFAULT_BUFFER_SIZE;
+         d_buffer_ptr = 0;
+      }
+
+      /*
+       * If the buffer pointer is zero, then prepend the prefix if not empty
+       */
+
+      if ((d_buffer_ptr == 0) && !d_prefix.empty()) {
+         copyToBuffer(d_prefix, static_cast<int>(d_prefix.length()));
+      }
+
+      /*
+       * Search for an end-of-line in the string
+       */
+
+      int eol_ptr = 0;
+      for ( ; (eol_ptr < length) && (text[eol_ptr] != '\n'); eol_ptr++)
+         NULL_STATEMENT;
+
+      /*
+       * If no end-of-line found, copy the entire text string but no output
+       */
+
+      if (eol_ptr == length) {
+         copyToBuffer(text, length);
+
+         /*
+          * If we found end-of-line, copy and output; recurse if more chars
+          */
+
+      } else {
+         const int ncopy = eol_ptr + 1;
+         copyToBuffer(text, ncopy);
+         outputBuffer();
+         if (ncopy < length) {
+            outputString(text.substr(ncopy), length - ncopy);
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Copy data from the text string into the internal output buffer.	*
+ * If the internal buffer is not large enough to hold all of the string	*
+ * data, then allocate a new internal buffer.				*
+ *									*
+ *************************************************************************
+ */
+
+void ParallelBuffer::copyToBuffer(
+   const std::string& text,
+   const int length)
+{
+   /*
+    * First check whether we need to increase the size of the buffer
+    */
+
+   if (d_buffer_ptr + length > d_buffer_size) {
+      const int new_size =
+         tbox::MathUtilities<int>::Max(d_buffer_ptr + length, 2 * d_buffer_size);
+      char* new_buffer = new char[new_size];
+
+      if (d_buffer_ptr > 0) {
+         (void)strncpy(new_buffer, d_buffer, d_buffer_ptr);
+      }
+      delete[] d_buffer;
+
+      d_buffer = new_buffer;
+      d_buffer_size = new_size;
+   }
+
+   /*
+    * Copy data from the input into the internal buffer and increment pointer
+    */
+
+   TBOX_ASSERT(d_buffer_ptr + length <= d_buffer_size);
+
+   strncpy(d_buffer + d_buffer_ptr, text.c_str(), length);
+   d_buffer_ptr += length;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Output buffered stream data to the active output streams and reset	*
+ * the buffer pointer to its empty state.				*
+ *									*
+ *************************************************************************
+ */
+
+void ParallelBuffer::outputBuffer()
+{
+   if (d_buffer_ptr > 0) {
+      if (d_ostream1) {
+         d_ostream1->write(d_buffer, d_buffer_ptr);
+         d_ostream1->flush();
+      }
+      if (d_ostream2) {
+         d_ostream2->write(d_buffer, d_buffer_ptr);
+         d_ostream2->flush();
+      }
+      d_buffer_ptr = 0;
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Synchronize the parallel buffer and write string data.  This routine	*
+ * is called from streambuf.						*
+ *									*
+ *************************************************************************
+ */
+
+int ParallelBuffer::sync()
+{
+   const int n = static_cast<int>(pptr() - pbase());
+   if (n > 0) outputString(pbase(), n);
+   return 0;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Write the specified number of characters into the output stream.	*
+ * This routine is called from streambuf.  If this routine is not	*
+ * provided, then overflow() is called instead for each character.	*
+ *									*
+ * Note that this routine is not required; it only	                *
+ * offers some efficiency over overflow().				*
+ *									*
+ *************************************************************************
+ */
+
+#if !defined(__INTEL_COMPILER) && (defined(__GNUG__))
+std::streamsize ParallelBuffer::xsputn(
+   const std::string& text,
+   std::streamsize n)
+{
+   sync();
+   if (n > 0) outputString(text, static_cast<int>(n));
+   return n;
+}
+#endif
+
+/*
+ *************************************************************************
+ *									*
+ * Write a single character into the parallel buffer.  This routine is	*
+ * called from streambuf.						*
+ *									*
+ *************************************************************************
+ */
+
+int ParallelBuffer::overflow(
+   int ch)
+{
+   const int n = static_cast<int>(pptr() - pbase());
+   if (n && sync()) {
+      return EOF;
+   }
+   if (ch != EOF) {
+      char character[2];
+      character[0] = (char)ch;
+      character[1] = 0;
+      outputString(character, 1);
+   }
+   pbump(-n);
+   return 0;
+}
+
+#ifdef _MSC_VER
+// Should never read from here
+int ParallelBuffer::underflow()
+{
+   return EOF;
+}
+#endif
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/ParallelBuffer.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/ParallelBuffer.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,154 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Parallel I/O class buffer to manage parallel ostreams output 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_ParallelBuffer
+#define included_tbox_ParallelBuffer
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <iostream>
+#include <string>
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * Class ParallelBuffer is a simple I/O stream utility that
+ * intercepts output from an ostream and redirects the output as necessary
+ * for parallel I/O.  This class defines a stream buffer class for an
+ * ostream class.
+ */
+
+class ParallelBuffer:public std::streambuf
+{
+public:
+   /**
+    * Create a parallel buffer class.  The object will require further
+    * initialization to set up the I/O streams and prefix string.
+    */
+   ParallelBuffer();
+
+   /**
+    * The destructor simply deallocates any internal data
+    * buffers.  It does not modify the output streams.
+    */
+   virtual ~ParallelBuffer();
+
+   /**
+    * Set whether the output stream will be active.  If the parallel buffer
+    * stream is disabled, then no data is forwarded to the output streams.
+    * The internal data buffer is deallocated and pointers are reset
+    * whenever the parallel buffer is deactivated.
+    */
+   void
+   setActive(
+      bool active);
+
+   /**
+    * Set the prefix that begins every new line to the output stream.
+    * A sample prefix is "P=XXXXX: ", where XXXXX represents the node
+    * number.
+    */
+   void
+   setPrefixString(
+      const std::string& text);
+
+   /**
+    * Set the primary output stream.  If not NULL, then output data is
+    * sent to this stream.  The primary output stream is typically stderr
+    * or stdout or perhaps a log file.
+    */
+   void
+   setOutputStream1(
+      std::ostream* stream);
+
+   /**
+    * Set the secondary output stream.  If not NULL, then output data is sent
+    * to this stream.  The secondary output stream is typically NULL or a log
+    * file that mirrors the primary output stream.
+    */
+   void
+   setOutputStream2(
+      std::ostream* stream);
+
+   /**
+    * Write a text string to the output stream.  Note that the string is
+    * not actually written until an end-of-line is detected.
+    */
+   void
+   outputString(
+      const std::string& text);
+
+   /**
+    * Write a text string of the specified length to the output file.  Note
+    * that the string is not actually written until an end-of-line is detected.
+    */
+   void
+   outputString(
+      const std::string& text,
+      const int length);
+
+   /**
+    * Synchronize the parallel buffer (called from streambuf).
+    */
+   virtual int
+   sync();
+
+#if !defined(__INTEL_COMPILER) && (defined(__GNUG__))
+   /**
+    * Write the specified number of characters into the output stream (called
+    * from streambuf).
+    */
+   virtual std::streamsize
+   xsputn(
+      const std::string& text,
+      std::streamsize n);
+#endif
+
+   /**
+    * Write an overflow character into the parallel buffer (called from
+    * streambuf).
+    */
+   virtual int
+   overflow(
+      int ch);
+
+#ifdef _MSC_VER
+
+   /**
+    * Read an overflow character from the parallel buffer (called from
+    * streambuf).  This is not implemented.  It is needed by the
+    * MSVC++ stream implementation.
+    */
+   virtual int
+   underflow();
+#endif
+
+private:
+   void
+   copyToBuffer(
+      const std::string& text,
+      const int length);
+   void
+   outputBuffer();              // output internal buffer data to streams
+
+   bool d_active;                // whether this output stream is active
+   std::string d_prefix;         // string prefix to prepend output strings
+   std::ostream* d_ostream1;     // primary output stream for buffer
+   std::ostream* d_ostream2;     // secondary output stream (e.g., for log file)
+   char* d_buffer;               // internal buffer to store accumulated string
+   int d_buffer_size;            // size of the internal output buffer
+   int d_buffer_ptr;             // number of charcters in the output buffer
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Parser.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Parser.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,357 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Parser that reads the input database grammar 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Parser.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/PIO.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/tbox/Parser.I"
+#endif
+
+#ifdef __INTEL_COMPILER
+// Ignore Intel warnings about external declarations
+#pragma warning (disable:1419)
+#endif
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+extern int
+yyparse();
+extern void
+yyrestart(
+   FILE *);
+
+extern void
+parser_static_table_initialize();
+
+namespace SAMRAI {
+namespace tbox {
+
+Parser * Parser::s_default_parser = NULL;
+bool Parser::s_static_tables_initialized = 0;
+
+/*
+ *************************************************************************
+ *									*
+ * The constructor creates an unitialized parser object.  All of the	*
+ * interesting work is done by member function parse().			*
+ *									*
+ *************************************************************************
+ */
+
+Parser::Parser()
+{
+   if (!s_static_tables_initialized) {
+      parser_static_table_initialize();
+      s_static_tables_initialized = 1;
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * The destructor automatically deallocates the parser object data.	*
+ *									*
+ *************************************************************************
+ */
+
+Parser::~Parser()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Begin parsing the input database file.  Return the number of errors	*
+ * encountered in the parse.						*
+ *									*
+ *************************************************************************
+ */
+
+int Parser::parse(
+   const std::string& filename,
+   FILE* fstream,
+   Pointer<Database> database)
+{
+   d_errors = 0;
+   d_warnings = 0;
+
+   // Find the path in the filename, if one exists
+   std::string::size_type slash_pos = filename.find_last_of('/');
+   if (slash_pos == std::string::npos) {
+      d_pathname = "";
+   } else {
+      d_pathname = filename.substr(0, slash_pos + 1);
+   }
+
+   ParseData pd;
+   pd.d_filename = filename;
+   pd.d_fstream = fstream;
+   pd.d_linenumber = 1;
+   pd.d_cursor = 1;
+   pd.d_nextcursor = 1;
+   d_parse_stack.clearItems();
+   d_parse_stack.addItem(pd);
+
+   d_scope_stack.clearItems();
+   d_scope_stack.addItem(database);
+
+   s_default_parser = this;
+   yyrestart(NULL);
+   if (yyparse() && (d_errors == 0)) {
+      error("Unexpected parse error");
+   }
+   s_default_parser = NULL;
+
+   d_parse_stack.clearItems();
+   d_scope_stack.clearItems();
+
+   return d_errors;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Advance the cursor to the next line in the current input file.	*
+ *									*
+ *************************************************************************
+ */
+
+void Parser::advanceLine(
+   const int nline)
+{
+   Parser::ParseData& pd = d_parse_stack.getFirstItem();
+   pd.d_linenumber += nline;
+   pd.d_cursor = 1;
+   pd.d_nextcursor = 1;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Advance the cursor position by the token in the specified string.	*
+ * Tabs are expanded assuming tab stops at eight character markers.	*
+ *									*
+ *************************************************************************
+ */
+
+void Parser::advanceCursor(
+   const std::string& token)
+{
+   Parser::ParseData& pd = d_parse_stack.getFirstItem();
+   pd.d_cursor = pd.d_nextcursor;
+   for (std::string::const_iterator i = token.begin(); i != token.end(); i++) {
+      if (*i == '\t') {
+         pd.d_nextcursor = ((pd.d_nextcursor + 7) & (~7)) + 1;
+      } else {
+         pd.d_nextcursor++;
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Print out errors to pout and track the number of errors.		*
+ *									*
+ *************************************************************************
+ */
+
+void Parser::error(
+   const std::string& message)
+{
+   Parser::ParseData& pd = d_parse_stack.getFirstItem();
+
+   pout << "Error in " << pd.d_filename << " at line " << pd.d_linenumber
+        << " column " << pd.d_cursor
+        << " : " << message << std::endl << std::flush;
+
+   pout << pd.d_linebuffer << std::endl << std::flush;
+
+   for (int i = 0; i < pd.d_cursor; i++)
+      pout << " ";
+   pout << "^\n";
+
+   d_errors++;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Print out warnings to pout and track the number of warnings.		*
+ *									*
+ *************************************************************************
+ */
+
+void Parser::warning(
+   const std::string& message)
+{
+   Parser::ParseData& pd = d_parse_stack.getFirstItem();
+
+   pout << "Warning in " << pd.d_filename << " at line " << pd.d_linenumber
+        << " column " << pd.d_cursor
+        << " : " << message << std::endl << std::flush;
+
+   pout << pd.d_linebuffer << std::endl << std::flush;
+
+   for (int i = 0; i < pd.d_cursor; i++)
+      pout << " ";
+   pout << "^\n";
+
+   d_warnings++;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Set the input line which is currently being parsed.                  *
+ *									*
+ *************************************************************************
+ */
+
+void Parser::setLine(
+   const std::string& line)
+{
+   Parser::ParseData& pd = d_parse_stack.getFirstItem();
+   pd.d_linebuffer = line;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Iterate through the database scopes, looking for the first match on	*
+ * the key value.							*
+ *									*
+ *************************************************************************
+ */
+
+Pointer<Database> Parser::getDatabaseWithKey(
+   const std::string& key)
+{
+   List<Pointer<Database> >::Iterator i(d_scope_stack);
+   for ( ; i; i++) {
+      if (i()->keyExists(key)) return i();
+   }
+   return Pointer<Database>(NULL);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Create a new parse state on the parse stack and open the specified	*
+ * new file for reading.							*
+ *									*
+ *************************************************************************
+ */
+
+bool Parser::pushIncludeFile(
+   const std::string& filename)
+{
+   FILE* fstream = NULL;
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   std::string filename_with_path;
+
+   // If this is not a fully qualified pathname use
+   // current search path
+   std::string::size_type slash_pos;
+   slash_pos = filename.find_first_of('/');
+   if (slash_pos == 0) {
+      filename_with_path = filename;
+   } else {
+      filename_with_path = d_pathname;
+      filename_with_path += filename;
+   }
+
+   if (mpi.getRank() == 0) {
+      fstream = fopen(filename_with_path.c_str(), "r");
+   }
+
+   int worked = (fstream ? 1 : 0);
+
+   mpi.Bcast(&worked, 1, MPI_INT, 0);
+
+   if (!worked) {
+      error("Could not open include file ``" + filename_with_path + "''");
+   } else {
+      ParseData pd;
+      pd.d_filename = filename_with_path;
+      pd.d_fstream = fstream;
+      pd.d_linenumber = 1;
+      pd.d_cursor = 1;
+      pd.d_nextcursor = 1;
+      d_parse_stack.addItem(pd);
+   }
+
+   return worked ? true : false;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Close the current input file and pop the parse stack.			*
+ *									*
+ *************************************************************************
+ */
+
+void Parser::popIncludeFile()
+{
+   Parser::ParseData& pd = d_parse_stack.getFirstItem();
+   if (pd.d_fstream) fclose(pd.d_fstream);
+   d_parse_stack.removeFirstItem();
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Manage the input reading for the flex scanner.  If running with MPI,	*
+ * the node zero reads the data and broadcasts the length and the data	*
+ * to all processors.							*
+ *									*
+ *************************************************************************
+ */
+
+int Parser::yyinput(
+   char* buffer,
+   const int max_size)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   int byte = 0;
+   if (mpi.getRank() == 0) {
+      byte = static_cast<int>(fread(buffer,
+                                    1,
+                                    max_size,
+                                    d_parse_stack.getFirstItem().d_fstream));
+   }
+   mpi.Bcast(&byte, 1, MPI_INT, 0);
+   if (byte > 0) {
+      mpi.Bcast(buffer, byte, MPI_CHAR, 0);
+   }
+   return byte;
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Parser.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Parser.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,52 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Parser that reads the input database grammar 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace tbox {
+
+SAMRAI_INLINE_KEYWORD
+Parser *Parser::getParser()
+{
+   return s_default_parser;
+}
+
+SAMRAI_INLINE_KEYWORD
+Pointer<Database>& Parser::getScope()
+{
+   return d_scope_stack.getFirstItem();
+}
+
+SAMRAI_INLINE_KEYWORD
+void Parser::enterScope(
+   const std::string& name)
+{
+   d_scope_stack.addItem(d_scope_stack.getFirstItem()->putDatabase(name));
+}
+
+SAMRAI_INLINE_KEYWORD
+void Parser::leaveScope()
+{
+   d_scope_stack.removeFirstItem();
+}
+
+SAMRAI_INLINE_KEYWORD
+int Parser::getNumberErrors() const
+{
+   return d_errors;
+}
+
+SAMRAI_INLINE_KEYWORD
+int Parser::getNumberWarnings() const
+{
+   return d_warnings;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Parser.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Parser.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,243 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Parser that reads the input database grammar 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_Parser
+#define included_tbox_Parser
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/List.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <cstdio>
+#include <string>
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * Class Parser parses the user input file and places the resulting
+ * (key,value) pairs into the input database object.  The parser object
+ * controls the overall parsing of the input file, which includes error
+ * handing and tracking file, line number, and cursor position.  If
+ * running on multiple processors, only node zero reads in data from the
+ * specified input file and broadcasts that data to the other processors.
+ * The input file argument for the other processors is ignored and may be
+ * NULL.
+ *
+ * The parser class also defines a ``default'' parser that may be accessed
+ * via a static member function.  The default parser may only be accessed
+ * by the yacc/lex routines called during the input file parsing.  This
+ * singleton-like approach provides a clean way to communicate parser
+ * information to the yacc/lex files without global variables.
+ *
+ * This parser (and the associated yacc and lex files) assume the GNU flex
+ * and bison utilities.  These utilities are only required if the grammar or
+ * scanner is changed, since the SAMRAI distribution already contains the
+ * output files from flex and bison.
+ */
+
+class Parser
+{
+public:
+   /**
+    * The parser constructor simply creates an uninitialized parser object.
+    * Member function parse() must be called before any other member function
+    * to initialize the object and parse the input data.  Function parse()
+    * may be called multiple times to parse multiple input files, but all
+    * state values (such as the number of errors or warnings) are reset at
+    * the beginning of each new parse pass.
+    */
+   Parser();
+
+   /**
+    * Destroy the parser object and deallocate parser data.
+    */
+   ~Parser();
+
+   /**
+    * Parse the input file from the specified file stream.  The number of
+    * syntax errors is returned.  A successful parse will return zero errors.
+    * The parse() function takes the initial filename (for informational
+    * purposes) and the filestream from which to read the parse data.
+    * All (key,value) pairs are placed in the specified database.  If
+    * running in parallel, the fstream must be valid on node zero, but
+    * is ignored on other nodes and may be set to NULL.  Multiple input
+    * files may be parsed by calling parse() for each file, but all variables
+    * are reset at the beginning of each parse.
+    */
+   int
+   parse(
+      const std::string& filename,
+      FILE* fstream,
+      Pointer<Database> database);
+
+   /**
+    * Return the total number of errors resulting from the parse.
+    */
+   int
+   getNumberErrors() const;
+
+   /**
+    * Return the total number of warnings resulting from the parse.
+    */
+   int
+   getNumberWarnings() const;
+
+   /**
+    * Return the parser object.  This mechanism is useful for communicating
+    * with the yacc/lex routines during the input file parse.  The default
+    * parser will be NULL outside of the parse call.
+    */
+   static Parser *
+   getParser();
+
+   /**
+    * Return the current database scope.  The current scope is modified
+    * through the enterScope() and leaveScope() member functions.
+    */
+   Pointer<Database>&
+   getScope();
+
+   /**
+    * Create a new database scope with the specified name.  This new scope
+    * will be the default scope until leaveScope() is called.
+    */
+   void
+   enterScope(
+      const std::string& name);
+
+   /**
+    * Leave the current database scope and return to the previous scope.
+    * It is an error to leave the outermost scope.
+    */
+   void
+   leaveScope();
+
+   /**
+    * Lookup the scope that contains the specified key.  If the scope does
+    * not exist, then return a NULL pointer to the database.
+    */
+   Pointer<Database>
+   getDatabaseWithKey(
+      const std::string& name);
+
+   /**
+    * Save the current context and switch to the specified input file.
+    * This routine returns true if the file exists and the switch was
+    * successful and false otherwise.
+    */
+   bool
+   pushIncludeFile(
+      const std::string& filename);
+
+   /**
+    * Pop the include file context off of the stack and return to the
+    * previous include file.
+    */
+   void
+   popIncludeFile();
+
+   /**
+    * Report a parsing error with the specified error message.  This routine
+    * will only be called from the parser or the scanner.  Errors are printed
+    * to pout, since it is assumed that all nodes are parsing the same input
+    * file.
+    */
+   void
+   error(
+      const std::string& message);
+
+   /**
+    * Report a parsing warning with the specified warning message.  This
+    * routine will only be called from the parser or the scanner.  Errors
+    * are printed to pout, since it is assumed that all nodes are parsing
+    * the same input file.
+    */
+   void
+   warning(
+      const std::string& message);
+
+   /**
+    * Set the input line which is currently being parsed.
+    */
+   void
+   setLine(
+      const std::string& line);
+
+   /**
+    * Advance the line number by the specified number of lines.  If no
+    * argument is given, then the line number is advanced by one line.
+    */
+   void
+   advanceLine(
+      const int nline = 1);
+
+   /**
+    * Advance the position of the cursor on the line using the values
+    * in the specified character string.  Tab characters in the string
+    * are assumed to advance the cursor to eight character tab stops.
+    * The cursor position is automatically reset to one whenever the
+    * line number is changed.
+    */
+   void
+   advanceCursor(
+      const std::string& token);
+
+   /**
+    * Define the input reading routine used by flex.  Under MPI, node zero
+    * reads the input and broadcasts the character data to all processors.
+    */
+   int
+   yyinput(
+      char* buffer,
+      const int max_size);
+
+private:
+   Parser(
+      const Parser&);           // not implemented
+   void
+   operator = (
+      const Parser&);                   // not implemented
+
+   struct ParseData {
+      std::string d_filename;   // filename for description
+      FILE* d_fstream;          // input stream to parse
+      std::string d_linebuffer;      // line being parsed
+      int d_linenumber;         // line number in input stream
+      int d_cursor;             // cursor position in line
+      int d_nextcursor;         // next cursor position in line
+   };
+
+   int d_errors;                // total number of parse errors
+   int d_warnings;              // total number of warnings
+
+#ifdef LACKS_NAMESPACE_IN_DECLARE
+   List<ParseData> d_parse_stack;
+#else
+   List<Parser::ParseData> d_parse_stack;
+#endif
+
+   List<Pointer<Database> > d_scope_stack;
+
+   static Parser* s_default_parser;
+
+   static bool s_static_tables_initialized;
+
+   std::string d_pathname;           // path to filename for including
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/tbox/Parser.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Pointer.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Pointer.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,112 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A smart pointer template class with RTTI 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_Pointer_C
+#define included_tbox_Pointer_C
+
+#include <typeinfo>
+
+#include "SAMRAI/tbox/Pointer.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/tbox/Pointer.I"
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+template<class TYPE>
+Pointer<TYPE>::Pointer(
+   TYPE* ptr,
+   const bool managed) :
+   d_object(ptr)
+{
+   if (d_object && managed) {
+      d_counter = new ReferenceCounter;
+   } else {
+      d_counter = (ReferenceCounter *)NULL;
+   }
+}
+
+template<class TYPE>
+Pointer<TYPE>::Pointer(
+   const PointerBase& ptr)
+{
+   const DescribedClass* sub_ptr = ptr.getSubclassPointer();
+   if (sub_ptr) {
+      d_object = (TYPE *)dynamic_cast<const TYPE *>(sub_ptr);
+   } else {
+      d_object = NULL;
+   }
+
+   if (d_object) {
+      d_counter = ptr.getSubclassReferenceCounter();
+      if (d_counter) d_counter->addReference();
+   } else {
+      d_counter = (ReferenceCounter *)NULL;
+   }
+}
+
+template<class TYPE>
+Pointer<TYPE>&Pointer<TYPE>::operator = (
+   TYPE* ptr)
+{
+   if (d_counter && d_counter->deleteReference()) deleteObject();
+   d_object = ptr;
+   if (d_object) {
+      d_counter = new ReferenceCounter;
+   } else {
+      d_counter = (ReferenceCounter *)NULL;
+   }
+   return *this;
+}
+
+template<class TYPE>
+void Pointer<TYPE>::reset(
+   TYPE* ptr)
+{
+   if (d_counter && d_counter->deleteReference()) deleteObject();
+   d_object = ptr;
+   if (d_object) {
+      d_counter = new ReferenceCounter;
+   } else {
+      d_counter = (ReferenceCounter *)NULL;
+   }
+}
+
+template<class TYPE>
+Pointer<TYPE>&Pointer<TYPE>::operator = (
+   const PointerBase& ptr)
+{
+   if (this != &ptr) {
+      if (d_counter && d_counter->deleteReference()) deleteObject();
+
+      const DescribedClass* sub_ptr = ptr.getSubclassPointer();
+      if (sub_ptr) {
+         d_object = (TYPE *)dynamic_cast<const TYPE *>(sub_ptr);
+      } else {
+         d_object = NULL;
+      }
+
+      if (d_object) {
+         d_counter = ptr.getSubclassReferenceCounter();
+         if (d_counter) d_counter->addReference();
+      } else {
+         d_counter = (ReferenceCounter *)NULL;
+      }
+   }
+   return *this;
+}
+
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Pointer.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Pointer.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,167 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A smart pointer template class with RTTI 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace tbox {
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+Pointer<TYPE>::Pointer() :
+   d_object(0),
+   d_counter(0)
+{
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+Pointer<TYPE>::Pointer(
+   const Pointer<TYPE>& ptr):
+   PointerBase(),
+   d_object(ptr.d_object),
+   d_counter(ptr.d_counter)
+{
+   if (d_counter) d_counter->addReference();
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void Pointer<TYPE>::deleteObject()
+{
+   delete d_object;
+   delete d_counter;
+
+#ifdef DEBUG_INITIALIZE_UNDEFINED
+   // For a little performance gain only do this when
+   // debugging.
+   d_object = 0;
+   d_counter = 0;
+#endif
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+Pointer<TYPE>::~Pointer()
+{
+   if (d_counter && d_counter->deleteReference()) deleteObject();
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+Pointer<TYPE>&Pointer<TYPE>::operator = (
+   const Pointer<TYPE>& ptr)
+{
+   if (this != &ptr) {
+      if (d_counter && d_counter->deleteReference()) deleteObject();
+      d_object = ptr.d_object;
+      d_counter = ptr.d_counter;
+      if (d_counter) d_counter->addReference();
+   }
+   return *this;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+bool Pointer<TYPE>::operator == (
+   const Pointer<TYPE>& rhs) const
+{
+   return d_object == rhs.d_object;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+bool Pointer<TYPE>::operator != (
+   const Pointer<TYPE>& rhs) const
+{
+   return d_object != rhs.d_object;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+void Pointer<TYPE>::setNull()
+{
+   if (d_counter && d_counter->deleteReference()) deleteObject();
+   d_object = 0;
+   d_counter = 0;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE * Pointer<TYPE>::operator -> () const
+{
+   return d_object;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE & Pointer<TYPE>::operator * () const
+{
+   return *d_object;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+Pointer<TYPE>::operator TYPE* () const
+{
+   return d_object;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+bool Pointer<TYPE>::isNull() const
+{
+   return !d_object;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+Pointer<TYPE>::operator bool () const
+{
+   return d_object ? true : false;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+bool Pointer<TYPE>::operator ! () const
+{
+   return !d_object;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+TYPE * Pointer<TYPE>::getPointer() const
+{
+   return d_object;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ReferenceCounter * Pointer<TYPE>::getReferenceCounter() const
+{
+   return d_counter;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+const DescribedClass * Pointer<TYPE>::getSubclassPointer() const
+{
+   // the explicit cast is needed by the brain-damaged SGI C++ compiler
+   return (DescribedClass *)d_object;
+}
+
+template<class TYPE>
+SAMRAI_INLINE_KEYWORD
+ReferenceCounter * Pointer<TYPE>::getSubclassReferenceCounter() const
+{
+   return (ReferenceCounter *)d_counter;
+}
+
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Pointer.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Pointer.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,236 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A smart pointer template class with RTTI 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_Pointer
+#define included_tbox_Pointer
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/ReferenceCounter.h"
+#include "SAMRAI/tbox/PointerBase.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * Class Pointer<TYPE> defines a smart pointer to TYPE.  It frees the
+ * user from explicitly deleting and tracking aliases for object pointers.
+ * It manages all reference counting and deallocation of the pointer (even
+ * if the data was originally allocated from a memory arena).  When the
+ * reference count on a Pointer<TYPE> object goes to zero, the object
+ * is automatically deallocated.  A block with a references count and arena
+ * pointer is allocated for all non-NULL pointers.  These reference counted
+ * blocks are freed at the end of the lifetime of the pointer.
+ *
+ * Non-const pointers can be created only from other non-const pointers.
+ * The non-const and const pointer classes have been designed so that an
+ * attempted conversion from a const pointer into a non-const pointer causes
+ * a compile-time error.  The const convention for this class is that any
+ * member function that does not change the pointer object itself may be
+ * const.  Note that this means that a const pointer does not mean that the
+ * pointed-to object is const; these semantics require the const pointer class.
+ *
+ * Class Pointer<TYPE> performs type-checking when assigning pointers
+ * of different TYPEs.  If a bad type conversion is performed, then the
+ * destination pointer is set to NULL.
+ *
+ * @see tbox::DescribedClass
+ * @see tbox::Array
+ * @see tbox::ConstPointer
+ * @see tbox::PointerBase
+ * @see tbox::ReferenceCounter
+ */
+
+template<class TYPE>
+class Pointer:public PointerBase
+{
+public:
+   /**
+    * The default constructor creates a null pointer.
+    */
+   Pointer();
+
+   /**
+    * Create a smart pointer with value ptr.  If managed is true, then
+    * deallocation of the object pointed to by ptr will be taken care of
+    * by the smart pointer.  This form assumes the pointer was allocated
+    * using the standard new operator.
+    */
+   explicit Pointer(
+      TYPE* ptr,
+      const bool managed = true);
+
+   /**
+    * The pointer const constructor creates a smart pointer reference
+    * aliased to the argument.
+    */
+   Pointer(
+      const Pointer<TYPE>& ptr);
+
+   /**
+    * Create a pointer by attempting to type-cast the argument to TYPE.
+    * If the type-cast fails, then the destination pointer will be set
+    * to NULL.
+    */
+   Pointer(
+      const PointerBase& ptr);
+
+   /**
+    * The pointer destructor frees the pointer data if the reference
+    * count drops to zero.  The object is deallocated from the memory
+    * pool (if it was specified in the constructor call).
+    */
+   ~Pointer();
+
+   /**
+    * Smart pointer assignment.  The left hand side points to the
+    * right hand side and the reference count is incremented by one.
+    */
+   Pointer<TYPE>&
+   operator = (
+      const Pointer<TYPE>& ptr);
+
+   /**
+    * Create a managed smart pointer with value ptr.  The object pointed
+    * to by ptr will be deallocated via delete when the reference count
+    * goes to zero.
+    */
+   Pointer<TYPE>&
+   operator = (
+      TYPE* ptr);
+
+   /**
+    * Attempt to convert the argument pointer to a Pointer<TYPE>.
+    * If the type conversion fails, then the destination pointer will be
+    * set to NULL.
+    */
+   Pointer<TYPE>&
+   operator = (
+      const PointerBase& ptr);
+
+   /**
+    * Check whether two smart pointers point to the same object.
+    */
+   bool
+   operator == (
+      const Pointer<TYPE>& rhs) const;
+
+   /**
+    * Check whether two smart pointers point to different objects.
+    */
+   bool
+   operator != (
+      const Pointer<TYPE>& rhs) const;
+
+   /**
+    * Delegate member operations to the pointed-to object.  C++ defines
+    * the ``->'' operator in a funny way to support delegation.  The
+    * statement ptr->foo() acts as if ptr where actually a pointer
+    * to an object with member function foo() instead of a class that
+    * holds that pointer.  This member function is const since it cannot
+    * change the pointer, although the pointed-to object may change.
+    */
+   TYPE *
+   operator -> () const;
+
+   /**
+    * Dereference the smart pointer.  This member function is const since
+    * it cannot change the pointer, although the pointed-to object may
+    * change.
+    */
+   TYPE&
+   operator * () const;
+
+   /**
+    * Implicit conversion of the smart pointer to the pointed-to object.
+    * This conversion operator is const since it cannot change the pointer,
+    * although the pointed-to object may change.
+    */
+   operator TYPE
+   * () const;
+
+   /**
+    * Explicitly convert the smart pointer to the pointed-to object.
+    * This member function is const since it cannot change the pointer,
+    * although the pointed-to object may change.
+    */
+   TYPE *
+   getPointer() const;
+
+   /**
+    * Set the pointed-to object to ptr.
+    *
+    * NOTE: reset name comes from boost library.
+    */
+   void
+   reset(
+      TYPE* ptr);
+
+   /**
+    * Check whether the smart pointer points to NULL.
+    */
+   bool
+   isNull() const;
+
+   /**
+    * Return true if the pointer is non-NULL.
+    */
+   operator bool () const;
+
+   /**
+    * Return true if the pointer is NULL and false otherwise.  This operator
+    * mimics the semantics of !p applied to a (regular) pointer p.
+    */
+   bool
+   operator ! () const;
+
+   /**
+    * Set the smart pointer to NULL.
+    */
+   void
+   setNull();
+
+   /**
+    * Return a pointer to the internal reference counter.  This routine
+    * should not be called by the casual user.
+    */
+   ReferenceCounter *
+   getReferenceCounter() const;
+
+private:
+   /*!
+    * @brief Unused conversion, meant to prevent unintended conversion
+    * of Pointer to int, which can cause serious hidden bugs.
+    */
+   operator int () const;
+
+   void
+   deleteObject();
+   ReferenceCounter *
+   getSubclassReferenceCounter() const;
+
+   const DescribedClass *
+   getSubclassPointer() const;
+
+   TYPE* d_object;
+   ReferenceCounter* d_counter;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/tbox/Pointer.I"
+#endif
+
+#ifdef INCLUDE_TEMPLATE_IMPLEMENTATION
+#include "SAMRAI/tbox/Pointer.C"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/PointerBase.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/PointerBase.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A smart pointer base class with RTTI 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/PointerBase.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/tbox/PointerBase.I"
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+PointerBase::~PointerBase()
+{
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/PointerBase.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/PointerBase.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,20 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A smart pointer base class with RTTI 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace tbox {
+
+SAMRAI_INLINE_KEYWORD
+PointerBase::PointerBase()
+{
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/PointerBase.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/PointerBase.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,50 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A smart pointer base class with RTTI 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_PointerBase
+#define included_tbox_PointerBase
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/ConstPointerBase.h"
+#include "SAMRAI/tbox/ReferenceCounter.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * Class PointerBase is a base class used by template class
+ * PointerRef<TYPE> for type-safe conversion between non-const
+ * pointer types.  It is a subclass of ConstPointerBase.  Since
+ * the non-const pointer class only takes this as a base class (and not
+ * the const pointer base class), const pointers cannot be converted
+ * into non-const pointers.
+ *
+ * @see tbox::ConstPointerBase
+ * @see tbox::Pointer
+ */
+
+class PointerBase:public ConstPointerBase
+{
+public:
+   PointerBase();
+   virtual ~PointerBase();
+   virtual ReferenceCounter *
+   getSubclassReferenceCounter() const = 0;
+   virtual const DescribedClass *
+   getSubclassPointer() const = 0;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/tbox/PointerBase.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/RankGroup.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/RankGroup.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,101 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A class to manage groups of processor ranks 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/RankGroup.h"
+#include "SAMRAI/tbox/List.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/tbox/RankGroup.I"
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+/*
+ ***********************************************************************
+ * Constructor that takes a min and max rank.
+ ***********************************************************************
+ */
+
+RankGroup::RankGroup(
+   const int min,
+   const int max,
+   const SAMRAI_MPI& samrai_mpi):
+   d_min(min),
+   d_max(max),
+   d_ranks(0),
+   d_storage(USING_MIN_MAX),
+   d_samrai_mpi(samrai_mpi)
+{
+   int nodes = 1;
+   samrai_mpi.Comm_size(&nodes);
+
+   TBOX_ASSERT(min >= 0);
+   TBOX_ASSERT(max < nodes);
+   TBOX_ASSERT(min <= max);
+
+   /*
+    * If min and max cover the full set of ranks, then switch to
+    * "using_all" mode.
+    */
+   if (min == 0 && max == nodes - 1) {
+      d_min = -1;
+      d_max = -1;
+      d_storage = USING_ALL;
+   }
+}
+
+/*
+ ***********************************************************************
+ * Constructor that takes an array of ranks.
+ ***********************************************************************
+ */
+
+RankGroup::RankGroup(
+   const tbox::Array<int>& rank_group,
+   const SAMRAI_MPI& samrai_mpi):
+   d_min(-1),
+   d_max(-1),
+   d_ranks(rank_group),
+   d_storage(USING_ARRAY),
+   d_samrai_mpi(samrai_mpi)
+{
+   TBOX_ASSERT(rank_group.size() > 0);
+
+   int nodes = 1;
+   samrai_mpi.Comm_size(&nodes);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(rank_group.size() <= nodes);
+
+   /*
+    * Check that each entry in the array has a unique value and is increasing
+    * order
+    */
+   for (int i = 0; i < rank_group.size(); i++) {
+      TBOX_ASSERT(rank_group[i] >= 0);
+      TBOX_ASSERT(rank_group[i] < nodes);
+      if (i > 0) {
+         TBOX_ASSERT(rank_group[i] > rank_group[i - 1]);
+      }
+   }
+#endif
+
+   /*
+    * If array is the full set of ranks, then switch to "using_all" mode.
+    */
+   if (rank_group.size() == nodes) {
+      d_ranks.resizeArray(0);
+      d_storage = USING_ALL;
+   }
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/RankGroup.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/RankGroup.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,267 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A class to manage groups of processor ranks 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace tbox {
+
+/*
+ ***********************************************************************
+ * Default constructor creates RankGroup that uses all available ranks.
+ ***********************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+RankGroup::RankGroup():
+   d_min(-1),
+   d_max(-1),
+   d_ranks(0),
+   d_storage(USING_ALL),
+   d_samrai_mpi(SAMRAI_MPI::getSAMRAIWorld())
+{
+}
+
+/*
+ ***********************************************************************
+ * Default constructor creates RankGroup that uses all available ranks in
+ * a given communicator
+ ***********************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+RankGroup::RankGroup(
+   const SAMRAI_MPI& samrai_mpi):
+   d_min(-1),
+   d_max(-1),
+   d_ranks(0),
+   d_storage(USING_ALL),
+   d_samrai_mpi(samrai_mpi)
+{
+}
+
+/*
+ ***********************************************************************
+ * Virtual destructor
+ ***********************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+RankGroup::~RankGroup()
+{
+}
+
+/*
+ ***********************************************************************
+ * Return true if all ranks are used.
+ ***********************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+bool RankGroup::containsAllRanks() const
+{
+   return d_storage == USING_ALL;
+}
+
+/*
+ ***********************************************************************
+ * Set min and max rank values.
+ ***********************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+void RankGroup::setMinMax(
+   const int min,
+   const int max)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   int nodes = 1;
+   d_samrai_mpi.Comm_size(&nodes);
+#endif
+
+   TBOX_ASSERT(min >= 0);
+   TBOX_ASSERT(min <= max);
+
+   d_storage = USING_MIN_MAX;
+   d_ranks.resizeArray(0);
+
+   d_min = min;
+   d_max = max;
+}
+
+/*
+ ***********************************************************************
+ * Determine if given rank is in the group.
+ ***********************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+bool RankGroup::isMember(
+   const int rank) const
+{
+   bool is_member = false;
+
+   switch (d_storage) {
+
+      case USING_ALL:
+         is_member = true;
+         break;
+
+      case USING_ARRAY:
+      {
+         int lo = 0;
+         int hi = d_ranks.size() - 1;
+         while (!is_member && hi >= lo) {
+            int i = (lo + hi) / 2;
+            if (rank < d_ranks[i]) {
+               hi = i - 1;
+            } else if (rank > d_ranks[i]) {
+               lo = i + 1;
+            } else {
+               is_member = true;
+            }
+         }
+      }
+      break;
+
+      case USING_MIN_MAX:
+         if (rank >= d_min && rank <= d_max) {
+            is_member = true;
+         }
+         break;
+
+      default:
+         TBOX_ERROR("RankGroup has not been set with a valid storage method");
+   }
+
+   return is_member;
+}
+
+/*
+ ***********************************************************************
+ * Size of RankGroup.
+ ***********************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+int RankGroup::size() const
+{
+   int size = -tbox::MathUtilities<int>::getMax();
+
+   switch (d_storage) {
+
+      case USING_ALL:
+         d_samrai_mpi.Comm_size(&size);
+         break;
+
+      case USING_ARRAY:
+         size = d_ranks.size();
+         break;
+
+      case USING_MIN_MAX:
+         size = d_max - d_min + 1;
+         break;
+
+      default:
+         TBOX_ERROR("RankGroup has not been set with a valid storage method");
+   }
+
+   return size;
+}
+
+/*
+ ***********************************************************************
+ * Get a rank using 1-to-1 mapping.
+ ***********************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+int RankGroup::getMappedRank(
+   const int index) const
+{
+   TBOX_ASSERT(index >= 0 && index < size());
+
+   int mapped_rank = -tbox::MathUtilities<int>::getMax();
+
+   switch (d_storage) {
+
+      case USING_ALL:
+         mapped_rank = index;
+         break;
+
+      case USING_ARRAY:
+         mapped_rank = d_ranks[index];
+         break;
+
+      case USING_MIN_MAX:
+         mapped_rank = d_min + index;
+         break;
+
+      default:
+         TBOX_ERROR("RankGroup has not been set with a valid storage method");
+   }
+
+   return mapped_rank;
+}
+
+/*
+ ***********************************************************************
+ * Get an integer identifier from 1-to-1 mapping.
+ ***********************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+int RankGroup::getMapIndex(
+   const int rank) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   int nodes = 1;
+   d_samrai_mpi.Comm_size(&nodes);
+   TBOX_ASSERT(rank >= 0 && rank < nodes);
+#endif
+
+   TBOX_ASSERT(isMember(rank));
+
+   int map_id = -tbox::MathUtilities<int>::getMax();
+
+   switch (d_storage) {
+
+      case USING_ALL:
+         map_id = rank;
+         break;
+
+      case USING_ARRAY:
+      {
+         int lo = 0;
+         int hi = d_ranks.size() - 1;
+         while (hi >= lo) {
+            int i = (lo + hi) / 2;
+            if (rank < d_ranks[i]) {
+               hi = i - 1;
+            } else if (rank > d_ranks[i]) {
+               lo = i + 1;
+            } else {
+               map_id = i;
+               break;
+            }
+         }
+      }
+      break;
+
+      case USING_MIN_MAX:
+         map_id = rank - d_min;
+         break;
+
+      default:
+         TBOX_ERROR("RankGroup has not been set with a valid storage method");
+   }
+
+   return map_id;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/RankGroup.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/RankGroup.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,162 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A class to manage a group of processor ranks 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_RankGroup
+#define included_tbox_RankGroup
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+/*!
+ * Class RankGroup is used to manage a set of ranks, namely a subset of
+ * the available ranks in a parallel run.
+ *
+ * This class allows a group of ranks to be constructed as a generalized
+ * subset of ranks, represented by an array passed to the constructor, or
+ * as a contiguous ordered subset of ranks, the range from a minimum to a
+ * maximum rank value.  It also has a default case where it represents the
+ * full set of available ranks, from 0 to P-1, P being the number of
+ * available processors.
+ *
+ * If N is the number of ranks in the represented subset, the class gives the
+ * user a 1-to-1 mapping between the integer set [0,N-1] and the ranks
+ * in the subset.
+ */
+
+class RankGroup
+{
+public:
+   /*!
+    * The default constructor constructs a RankGroup representing the full
+    * set of available ranks.  It will use all of the ranks in the
+    * MPI communicator used by the SAMRAI MPI object.  If a different
+    * communicator is desired, then use a constructor with a communicator
+    * argument.
+    */
+   RankGroup();
+
+   /*!
+    * This constructor constructs a RankGroup representing the full
+    * set of available ranks in the given communicator.
+    */
+   RankGroup(
+      const SAMRAI_MPI& d_samrai_mpi);
+
+   /*!
+    * This constructor creates a RankGroup consisting of all ranks from min
+    * to max, inclusive.  min must be >= 0 and max must be less than the
+    * total number of available processors.
+    */
+   RankGroup(
+      const int min,
+      const int max,
+      const SAMRAI_MPI& samrai_mpi =
+         SAMRAI_MPI(SAMRAI_MPI::getSAMRAIWorld()));
+
+   /*!
+    * This constructor creates a RankGroup consisting of ranks corresponding
+    * to the integers in the array.  Each member of the array must be >= 0,
+    * less than the total number of available processors, and unique within
+    * the array.  Due to the use of an array for storage, RankGroups
+    * created with this constructor should be expected to be less efficient
+    * than those created with the above min/max constructor.
+    *
+    * An assertion failure will result if the array is empty.
+    */
+   RankGroup(
+      const tbox::Array<int>& rank_group,
+      const SAMRAI_MPI& samrai_mpi =
+         SAMRAI_MPI(SAMRAI_MPI::getSAMRAIWorld()));
+
+   /*!
+    * Virtual destructor
+    */
+   virtual ~RankGroup();
+
+   /*!
+    * Returns true if the RankGroup contains ranks for all available
+    * processors.
+    */
+   bool
+   containsAllRanks() const;
+
+   /*!
+    * Set the minimum and maximum ranks for the RankGroup.  All previous
+    * state of this object will be eliminated.  The restrictions on the
+    * arguments are the same as for the constructor that takes the min/max
+    * arguments.
+    */
+   void
+   setMinMax(
+      const int min,
+      const int max);
+
+   /*!
+    * Return true if the given rank is contained in the RankGroup.
+    */
+   bool
+   isMember(
+      const int rank) const;
+
+   /*!
+    * Return the size of the subset of ranks represented by this RankGroup.
+    */
+   int
+   size() const;
+
+   /*!
+    * Given an integer identifier from the set [0,N-1], N being the size of
+    * the RankGroup, return a unique rank from the RankGroup according to
+    * a 1-to-1 mapping.
+    */
+   int
+   getMappedRank(
+      const int index) const;
+
+   /*!
+    * This is the inverse function of getMappedRank.  Given a rank that is
+    * contained in the RankGroup, return a unique integer identifier in the
+    * set [0,N-1], N being the size of the rank group, according to a 1-to-1
+    * mapping.
+    */
+   int
+   getMapIndex(
+      const int rank) const;
+
+private:
+   enum StorageType { USING_ALL,
+                      USING_ARRAY,
+                      USING_MIN_MAX,
+                      INVALID_STORAGE };
+
+   int d_min;
+   int d_max;
+
+   tbox::Array<int> d_ranks;
+
+   StorageType d_storage;
+
+   SAMRAI_MPI d_samrai_mpi;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/tbox/RankGroup.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/ReferenceCounter.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/ReferenceCounter.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Reference counting class for Array and Pointer 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/ReferenceCounter.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+
+#include <cstdlib>
+#include <cstdio>
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/tbox/ReferenceCounter.I"
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+ReferenceCounter * ReferenceCounter::s_free_list = NULL;
+bool ReferenceCounter::s_is_finalized = false;
+
+StartupShutdownManager::Handler
+ReferenceCounter::s_handler(
+   0,
+   0,
+   0,
+   ReferenceCounter::finalizeCallback,
+   StartupShutdownManager::priorityReferenceCounter);
+
+
+
+void *ReferenceCounter::operator new (
+   size_t bytes)
+{
+#ifdef DEBUG_CHECK_DEV_ASSERTIONS
+   /* Since low level class; tbox Utilities may not function here */
+   assert(!ReferenceCounter::isFinalized());
+#endif
+
+   if (s_free_list) {
+      ReferenceCounter* node = s_free_list;
+      s_free_list = s_free_list->d_next;
+      return node;
+   } else {
+      return ::operator new (
+                bytes);
+   }
+}
+
+void ReferenceCounter::operator delete (
+   void* what)
+{
+#ifdef DEBUG_CHECK_DEV_ASSERTIONS
+   /* Since low level class; tbox Utilities may not function here */
+   assert(!ReferenceCounter::isFinalized());
+#endif
+
+   ReferenceCounter* node = (ReferenceCounter *)what;
+   node->d_next = s_free_list;
+   s_free_list = node;
+}
+
+void ReferenceCounter::finalizeCallback()
+{
+   while (s_free_list) {
+      void* byebye = s_free_list;
+      s_free_list = s_free_list->d_next
+      ;
+      ::operator delete (
+         byebye);
+   }
+
+   s_is_finalized = true;
+}
+
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/ReferenceCounter.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/ReferenceCounter.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,42 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Reference counting class for Array and Pointer 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace tbox {
+
+SAMRAI_INLINE_KEYWORD
+ReferenceCounter::ReferenceCounter()
+{
+   d_references = 1;
+   d_next = (ReferenceCounter *)NULL;
+}
+
+SAMRAI_INLINE_KEYWORD
+ReferenceCounter::~ReferenceCounter()
+{
+   if ((d_next) && (--d_next->d_references == 0)) {
+      delete d_next;
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+bool ReferenceCounter::deleteReference()
+{
+   return --d_references == 0;
+}
+
+SAMRAI_INLINE_KEYWORD
+void ReferenceCounter::addReference()
+{
+   d_references++;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/ReferenceCounter.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/ReferenceCounter.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Reference counting class for Array and Pointer 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_ReferenceCounter
+#define included_tbox_ReferenceCounter
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+
+#include <cstddef>
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * Class ReferenceCounter manages the shared reference counter and
+ * arena resources used by Pointer and Array.  It uses a local
+ * free pool of objects to speed memory allocation and deallocation.  The
+ * locally cached free pool can be freed by calling freeCachedCopies().
+ *
+ * {\b Do not subclass!}  Changing the size of a ReferenceCounter
+ * object will cause my simple memory allocation mechanism to break in
+ * horrible and disgusting ways.
+ *
+ * @see tbox::Array
+ * @see tbox::Pointer
+ */
+
+class ReferenceCounter
+{
+public:
+   /**
+    * Create a ReferenceCounter.
+    * The number of references is set to one.
+    */
+   ReferenceCounter();
+
+   /**
+    * Destructor for ReferenceCounter.  The destructor releases
+    * the managed memory arena if its count has gone to zero.
+    */
+   ~ReferenceCounter();
+
+   /**
+    * Decrement the number of references.  True is returned if the
+    * reference count has gone to zero; false otherwise.
+    */
+   bool
+   deleteReference();
+
+   /**
+    * Increment the number of references.
+    */
+   void
+   addReference();
+
+   /**
+    * Class-specific operator new.  Data is allocated off of an
+    * internal free list to speed memory allocation.
+    */
+   void *
+   operator new (
+      size_t bytes);
+
+   /**
+    * Class-specific operator delete.  Freed data is returned to
+    * an internal free list for re-use by operator new.
+    */
+   void
+   operator delete (
+      void* what);
+
+   /**
+    * Returns true if ReferenceCounter class has been be stopped.
+    * This method is used only for a debugging check assert in
+    * the pointer class and should not normally be used.
+    */
+   static bool isFinalized() {
+      return s_is_finalized;
+   };
+  
+
+private:
+   ReferenceCounter(
+      const ReferenceCounter&);                 // not implemented
+   void
+   operator = (
+      const ReferenceCounter&);                 // not implemented
+
+   /**
+    * Release the memory for all currently cached ReferenceCounter
+    * copies.
+    */
+   static void
+   finalizeCallback();
+
+   int d_references;
+
+   // Next element on free list
+   ReferenceCounter* d_next;
+
+   // Free list of ReferenceCounter objects
+   static ReferenceCounter* s_free_list;
+
+   static StartupShutdownManager::Handler s_handler;
+
+   static bool s_is_finalized;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/tbox/ReferenceCounter.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/RestartManager.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/RestartManager.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,377 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An restart manager singleton class 
+ *
+ ************************************************************************/
+
+#include <string>
+
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/HDFDatabaseFactory.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/NullDatabase.h"
+#include "SAMRAI/tbox/Parser.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/tbox/RestartManager.I"
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+RestartManager * RestartManager::s_manager_instance =
+   (RestartManager *)NULL;
+
+StartupShutdownManager::Handler
+RestartManager::s_shutdown_handler(
+   0,
+   0,
+   RestartManager::shutdownCallback,
+   0,
+   StartupShutdownManager::priorityRestartManager);
+
+/*
+ *************************************************************************
+ *									*
+ * Basic singleton classes to create, set, and destroy the manager	*
+ * instance.								*
+ *									*
+ *************************************************************************
+ */
+
+RestartManager *RestartManager::getManager()
+{
+   if (!s_manager_instance) {
+      s_manager_instance = new RestartManager;
+   }
+   return s_manager_instance;
+}
+
+void RestartManager::shutdownCallback()
+{
+   if (s_manager_instance) {
+      s_manager_instance->clearRestartItems();
+      delete s_manager_instance;
+      s_manager_instance = ((RestartManager *)NULL);
+   }
+}
+
+void RestartManager::registerSingletonSubclassInstance(
+   RestartManager* subclass_instance)
+{
+   if (!s_manager_instance) {
+      s_manager_instance = subclass_instance;
+   } else {
+      TBOX_ERROR("RestartManager internal error...\n"
+         << "Attemptng to set Singleton instance to subclass instance,"
+         << "\n but Singleton instance already set." << std::endl);
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * The constructor and destructor are protected and call only be called	*
+ * by the singleton class or its subclasses.				*
+ *									*
+ *************************************************************************
+ */
+
+RestartManager::RestartManager()
+{
+   d_database_root = new NullDatabase();
+#ifdef HAVE_HDF5
+   d_database_factory = new HDFDatabaseFactory();
+#else
+   d_database_factory = NULL;
+#endif
+   d_is_from_restart = false;
+   clearRestartItems();
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Mount restart_file to the empty database created in the		*
+ * constructor and sets d_is_from_restart to true.                      *
+ * Return d_database_root.                                               *
+ *									*
+ *************************************************************************
+ */
+
+bool RestartManager::openRestartFile(
+   const std::string& root_dirname,
+   const int restore_num,
+   const int num_nodes)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   int proc_num = mpi.getRank();
+
+   /* create the intermediate parts of the full path name of restart file */
+   std::string restore_buf = "/restore." + tbox::Utilities::intToString(
+         restore_num,
+         6);
+   std::string nodes_buf = "/nodes." + tbox::Utilities::nodeToString(num_nodes);
+   std::string proc_buf = "/proc." + tbox::Utilities::processorToString(
+         proc_num);
+
+   /* create full path name of restart file */
+   std::string restart_filename = root_dirname + restore_buf
+      + nodes_buf + proc_buf;
+
+   bool open_successful = true;
+   /* try to mount restart file */
+
+   if (d_database_factory) {
+
+      Pointer<Database> database = d_database_factory->allocate(
+            restart_filename);
+
+      if (!database->open(restart_filename)) {
+         TBOX_ERROR(
+            "Error attempting to open restart file " << restart_filename
+            <<
+            "\n   No restart file for processor: " << proc_num
+            <<
+            "\n   restart directory name = " << root_dirname
+            <<
+            "\n   number of processors   = " << num_nodes
+            <<
+            "\n   restore number         = " << restore_num << std::endl);
+         open_successful = false;
+      } else {
+         /* set d_database root and d_is_from_restart */
+         d_database_root = database;
+         d_is_from_restart = true;
+      }
+   } else {
+      TBOX_ERROR("No DatabaseFactory supplied to RestartManager for opening "
+         << restart_filename << std::endl);
+   }
+
+   return open_successful;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Closes the restart file by unmounting d_database_root and setting it  *
+ * to be a NullDatabase.                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void RestartManager::closeRestartFile()
+{
+   if (!d_database_root.isNull()) {
+      d_database_root->close();
+      d_database_root.setNull();
+   }
+
+   d_database_root = new NullDatabase();
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Registers the object for restart by adding it to			*
+ * d_restart_items_list.							*
+ *									*
+ *************************************************************************
+ */
+void RestartManager::registerRestartItem(
+   const std::string& name,
+   Serializable* obj)
+{
+   TBOX_ASSERT(!name.empty());
+   TBOX_ASSERT(obj != ((Serializable *)NULL));
+
+   /*
+    * Run through list to see if there is another object registered
+    * with the specified name.
+    */
+   List<RestartManager::RestartItem>::Iterator
+   iter(d_restart_items_list);
+
+   bool found_item = false;
+   for ( ; !found_item && iter; iter++) {
+      found_item = (iter().name == name);
+   }
+
+   /*
+    * If there are no other items registered with the specified name,
+    * add the object to the restart list.  Otherwise, throw an
+    * error.
+    */
+   if (!found_item) {
+      RestartItem r_obj;
+      r_obj.name = name;
+      r_obj.obj = obj;
+
+      d_restart_items_list.appendItem(r_obj);
+
+   } else {
+      TBOX_ERROR("Register restart item error..."
+         << "\n   Multiple objects with name `" << name << "' registered "
+         << "with restart manager." << std::endl);
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Removes the object with the specified name from d_restart_items_list. *
+ *									*
+ *************************************************************************
+ */
+void RestartManager::unregisterRestartItem(
+   const std::string& name)
+{
+   TBOX_ASSERT(!name.empty());
+
+   List<RestartManager::RestartItem>::Iterator
+   iter(d_restart_items_list);
+
+   bool found_item = false;
+   for ( ; !found_item && iter; iter++) {
+      if (iter().name == name) {
+         d_restart_items_list.removeItem(iter);
+         found_item = true;
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Remove all items from the restart item list.                          *
+ *									*
+ *************************************************************************
+ */
+void RestartManager::clearRestartItems()
+{
+   d_restart_items_list.clearItems();
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Creates a new file with the given name and writes out the current    *
+ * simulation state to the file by invoking the writeRestartFile()      *
+ * method for all objects contained in	d_restart_objects_list.		*
+ *									*
+ *************************************************************************
+ */
+void RestartManager::writeRestartFile(
+   const std::string& root_dirname,
+   int restore_num)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   /* Create necessary directories and cd proper directory for writing */
+   std::string restart_dirname = createDirs(root_dirname, restore_num);
+
+   /* Create full path name of restart file */
+
+   int proc_rank = mpi.getRank();
+
+   std::string restart_filename_buf =
+      "/proc." + tbox::Utilities::processorToString(proc_rank);
+
+   std::string restart_filename = restart_dirname + restart_filename_buf;
+
+   if (d_database_factory) {
+
+      Pointer<Database> new_restartDB = d_database_factory->allocate(
+            restart_filename);
+
+      new_restartDB->create(restart_filename);
+
+      writeRestartFile(new_restartDB);
+
+      new_restartDB->close();
+
+      new_restartDB.setNull();
+   } else {
+      TBOX_ERROR(
+         "No DatabaseFactory supplied to RestartManager for writeRestartFile "
+         << restart_filename << std::endl);
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Write simulation state to supplied database.                          *
+ *									*
+ *************************************************************************
+ */
+void RestartManager::writeRestartFile(
+   tbox::Pointer<tbox::Database> database)
+{
+   TBOX_ASSERT(database);
+
+   List<RestartManager::RestartItem>::Iterator i(d_restart_items_list);
+   for ( ; i; i++) {
+      Pointer<Database> obj_db =
+         database->putDatabase(i().name);
+      (i().obj)->putToDatabase(obj_db);
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Write simulation state to root database                               *
+ *									*
+ *************************************************************************
+ */
+void RestartManager::writeRestartToDatabase()
+{
+   if (d_database_root) {
+      writeRestartFile(d_database_root);
+   } else {
+      TBOX_ERROR("writeRestartToDatabase has no database to write to"
+         << std::endl);
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Creates the directory structure for the data files if they have not	*
+ * already been created.                                                *
+ *									*
+ *************************************************************************
+ */
+
+std::string RestartManager::createDirs(
+   const std::string& root_dirname,
+   int restore_num)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   int num_procs = mpi.getSize();
+
+   std::string restore_buf = "/restore." + tbox::Utilities::intToString(
+         restore_num,
+         6);
+   std::string nodes_buf = "/nodes." + tbox::Utilities::processorToString(
+         num_procs);
+
+   std::string full_dirname = root_dirname + restore_buf + nodes_buf;
+
+   tbox::Utilities::recursiveMkdir(full_dirname);
+
+   return full_dirname;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/RestartManager.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/RestartManager.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,103 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An restart manager singleton class 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace tbox {
+
+/*
+ *************************************************************************
+ *									*
+ * Destructor								*
+ *									*
+ *************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+RestartManager::~RestartManager()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Returns d_is_from_restart.						*
+ *									*
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD
+bool RestartManager::isFromRestart()
+{
+   return d_is_from_restart;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Returns the root of the restart database which was opened at the     *
+ * start of the simulation.						*
+ *									*
+ *************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+Pointer<Database> RestartManager::getRootDatabase()
+{
+   return d_database_root;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Sets the root database                                                *
+ *									*
+ *************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+void RestartManager::setRootDatabase(
+   Pointer<Database> database)
+{
+   if (database.isNull()) {
+      d_database_root = NULL;
+      d_is_from_restart = false;
+   } else {
+      d_database_root = database;
+      d_is_from_restart = true;
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Sets the database factory                                             *
+ *									*
+ *************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+void RestartManager::setDatabaseFactory(
+   Pointer<DatabaseFactory> database_factory)
+{
+   d_database_factory = database_factory;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * writeRestartFile							*
+ *									*
+ *************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+void RestartManager::writeRestartFile(
+   const std::string& root_dir_name)
+{
+   writeRestartFile(root_dir_name, 0);
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/RestartManager.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/RestartManager.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,293 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An restart manager singleton class 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_RestartManager
+#define included_tbox_RestartManager
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Serializable.h"
+#include "SAMRAI/tbox/List.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/DatabaseFactory.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * Class RestartManager coordinates SAMRAI restart files (currently
+ * implemented using the HDF database class) and the objects comprising
+ * SAMRAI-based application code.  The manager class orchestrates opening
+ * and closing the database, stores data to be written out for restart,
+ * and writes out the restart data to the database.  Note that the restart
+ * manager is a Singleton class that acts as a single point of control
+ * for restart capabilities.  As such its constructor and destructor are
+ * protected members; they are not to be called outside of this class.
+ *
+ * The general procedure for starting a simulation from a restart file
+ * is as follows.
+ *
+ *
+ * \li Open the restart file using openRestartFile("filename").
+ * \li Get root of restart database using getRootDatabase().
+ * \li Initialize simulation objects using the restart constructor
+ *       for the objects.
+ * \li Close the restart file using closeRestartFile().
+ *
+ * Technically, there is no need to close the restart file because this will
+ * automatically be taken care of by the destructor for the database object.
+ *
+ * It is important to note in the initialization process, some objects
+ * will need to be constructed in the "empty" state and filled in later
+ * using some sort of getFromDatabase() method.
+ *
+ * The process for writing out state to a restart file is somewhat more
+ * complicated.  The following things need to be taken care of.
+ *
+ *
+ * \li Each object that has state that needs to be saved for restart
+ *       must be derived from the Serializable class (which
+ *       responds to the putToDatabase() method).
+ * \li Any object that needs to save its state to the restart file
+ *       must be registered with the restart manager using the
+ *       registerRestartItem() method.   NOTE THAT NO TWO RESTARTABLE
+ *       OBJECTS ARE ALLOWED TO HAVE THE SAME NAME STRING IDENTIFIER.
+ * \li The patchdata to be written to restart need to be specified
+ *       using the VariableDatabase::setPatchdataForRestart() method.
+ *       This is usually taken care of by the numerical algorithm object.
+ *
+ * When all these items are accounted for, writing to the restart file
+ * is accomplished using a writeRestartFile() method.  There are
+ * two writeRestartFile() methods available.  One takes only
+ * a restart directory name as an argument whereas the other takes
+ * both a restart directory name and a restore number for its arguments.
+ * See comments for member functions for more details.
+ *
+ * @see tbox::Database
+ */
+
+class RestartManager
+{
+public:
+   /**
+    * Return a pointer to the single instance of the restart manager.
+    * All access to the restart manager object is through getManager().
+    *
+    * Note that when the manager is accessed for the first time, the
+    * Singleton instance is registered with the StartupShutdownManager
+    * class which destroys such objects at program completion.  Thus,
+    * users of this class do not explicitly allocate or deallocate the
+    * Singleton instance.
+    */
+   static RestartManager *
+   getManager();
+
+   /**
+    * Returns true if the run is from a restart file (i.e. a restart file
+    * has been opened from main()).  Returns false otherwise.
+    */
+   virtual bool
+   isFromRestart();
+
+   /**
+    * Attempts to mount, for reading, the restart file for the processor.
+    * If there is no error opening the file, then the restart manager
+    * mounts the restart file.
+    * Returns true if open is successful; false otherwise.
+    */
+   virtual bool
+   openRestartFile(
+      const std::string& root_dirname,
+      const int restore_num,
+      const int num_nodes);
+
+   /**
+    * Closes the restart file.
+    */
+   virtual void
+   closeRestartFile();
+
+   /**
+    * Returns a Pointer to the root of the database.
+    */
+   virtual Pointer<Database>
+   getRootDatabase();
+
+   /**
+    * Sets the database for restore or dumps.
+    *
+    */
+   virtual void
+   setRootDatabase(
+      Pointer<Database> database);
+
+   /**
+    * Sets the database for restore or dumps.
+    *
+    */
+   virtual void
+   setDatabaseFactory(
+      Pointer<DatabaseFactory> database_factory);
+
+   /**
+    * Registers an object for restart with the given name.
+    *
+    * When assertion checking is active, an unrecoverable assertion
+    * will result if either the string is empty or the serializable
+    * object pointer is null.
+    */
+   virtual void
+   registerRestartItem(
+      const std::string& name,
+      Serializable* obj);
+
+   /**
+    * Removes the object with the specified name from the list of
+    * restartable items.
+    *
+    * When assertion checking is active, an unrecoverable assertion
+    * will result if the string is empty.
+    */
+   virtual void
+   unregisterRestartItem(
+      const std::string& name);
+
+   /**
+    * Clear all restart items managed by the restart manager.
+    */
+   virtual void
+   clearRestartItems();
+
+   /**
+    * Write all objects registered to as restart objects to the
+    * restart database.  The string argument is the name of the
+    * root of restart directory.
+    *
+    * Note:  This method creates/uses a restart directory structure
+    *    with 00000 as the restore number.
+    */
+   virtual void
+   writeRestartFile(
+      const std::string& root_dirname);
+
+   /**
+    * Write all objects registered to as restart objects to the
+    * restart database.  The string argument is the name of the
+    * root of restart directory.  The integer argument is the
+    * identification number associated with the restart files generated.
+    */
+   virtual void
+   writeRestartFile(
+      const std::string& root_dirname,
+      const int restore_num);
+
+   /**
+    * Write all objects registered to as restart objects to the
+    * restart database.
+    */
+   virtual void
+   writeRestartToDatabase();
+
+protected:
+   /**
+    * The constructor for RestartManager is protected.
+    * Consistent with the definition of a Singleton class, only the
+    * manager object has access to the constructor for the class.
+    *
+    * The constructor for RestartManager initializes the root
+    * data base to a NullDatabase and sets the restart flag to false.
+    */
+   RestartManager();
+
+   /**
+    * The destructor for the restart manager is protected, since only the
+    * singleton class and subclasses may destroy the manager objects.
+    */
+   virtual ~RestartManager();
+
+   /**
+    * Initialize Singleton instance with instance of subclass.  This function
+    * is used to make the singleton object unique when inheriting from this
+    * base class.
+    */
+   void
+   registerSingletonSubclassInstance(
+      RestartManager* subclass_instance);
+
+private:
+   /**
+    * Write all objects registered to as restart objects to the
+    * restart database.
+    */
+   virtual void
+   writeRestartFile(
+      Pointer<Database> database);
+
+   /*
+    * Create the directory structure for the data files.
+    * The directory structure created is
+    *
+    *   restart_dirname/
+    *     restore.[restore number]/
+    *       nodes.[number of processors]/
+    *         proc.[processor number]
+    */
+   std::string
+   createDirs(
+      const std::string& root_dirname,
+      int restore_num);
+
+   struct RestartItem {
+      std::string name;
+      Serializable* obj;
+   };
+
+   /**
+    * Deallocate the restart manager instance.  It is not necessary to call
+    * this routine at program termination, since it is automatically called
+    * by the StartupShutdownManager class.
+    */
+   static void
+   shutdownCallback();
+
+   static RestartManager* s_manager_instance;
+
+   /*
+    * list of objects registered to be written to the restart database
+    */
+#ifdef LACKS_NAMESPACE_IN_DECLARE
+   List<RestartItem> d_restart_items_list;
+#else
+   List<RestartManager::RestartItem> d_restart_items_list;
+#endif
+
+   Pointer<Database> d_database_root;
+
+   /*
+    * Database factory use to create new databases.
+    * Defaults so HDFDatabaseFactory.
+    */
+   Pointer<DatabaseFactory> d_database_factory;
+
+   bool d_is_from_restart;
+
+   static StartupShutdownManager::Handler s_shutdown_handler;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/tbox/RestartManager.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/SAMRAIManager.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/SAMRAIManager.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,173 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   SAMRAI class to manage package startup and shutdown 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/IEEE.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <new>
+
+namespace SAMRAI {
+namespace tbox {
+
+/*
+ *************************************************************************
+ *
+ * Set static members to set maximum number of patch data entries,
+ * statistics, and timers supported by the code.
+ * These numbers are used to set the sizes of certain array containers
+ * used in the SAMRAI library.  They are set here so that they may be
+ * resized if necessary from a single access point (i.e., via the
+ * SAMRAIManager) if the default sizes (set here) are insufficient.
+ *
+ * These values can be changed by calling the static functions:
+ * SAMRAIManager::setMaxNumberPatchDataEntries(),
+ *
+ * To avoid potentially erroneous or unexpected behavior, these
+ * value should be set early on during program execution before they
+ * are accessed in the library. Once accessed within the library,
+ * they cannot be reset during program execution.
+ *
+ *************************************************************************
+ */
+
+bool SAMRAIManager::s_initialized = false;
+bool SAMRAIManager::s_started = false;
+int SAMRAIManager::s_max_patch_data_entries = 256;
+bool SAMRAIManager::s_max_patch_data_entries_accessed = false;
+
+/*
+ *************************************************************************
+ *
+ * Initialize the SAMRAI package.  This routine performs the following
+ * tasks:
+ *
+ * (1) Initialize the SAMRAI MPI package
+ * (2) Initialize the parallel I/O routines
+ * (3) Set up IEEE assertion handlers
+ * (4) Set new handler so that an error message is printed if new fails.
+ *
+ *************************************************************************
+ */
+
+static void badnew()
+{
+   TBOX_ERROR("operator `new' failed -- program abort!" << std::endl);
+}
+
+void SAMRAIManager::initialize(
+   bool initialize_IEEE_assertion_handlers)
+{
+   TBOX_ASSERT(!s_initialized);
+
+   PIO::initialize();
+
+   if (initialize_IEEE_assertion_handlers) {
+      IEEE::setupFloatingPointExceptionHandlers();
+   }
+
+#ifndef LACKS_PROPER_MEMORY_HANDLER
+   std::set_new_handler(badnew);
+#endif
+
+   StartupShutdownManager::initialize();
+
+   s_initialized = true;
+}
+
+void SAMRAIManager::startup(
+   )
+{
+   TBOX_ASSERT(s_initialized);
+   TBOX_ASSERT(!s_started);
+
+   StartupShutdownManager::startup();
+
+   s_started = true;
+}
+
+/*
+ *************************************************************************
+ *
+ * Shutdown the SAMRAI package.  This routine currently only deallocates
+ * statically allocated memory and finalizes the output streams.
+ *
+ *************************************************************************
+ */
+
+void SAMRAIManager::shutdown()
+{
+   TBOX_ASSERT(s_initialized);
+   TBOX_ASSERT(s_started);
+
+   StartupShutdownManager::shutdown();
+
+   s_started = false;
+
+}
+
+void SAMRAIManager::finalize()
+{
+   TBOX_ASSERT(s_initialized);
+
+   StartupShutdownManager::finalize();
+
+   PIO::finalize();
+
+   s_initialized = false;
+}
+
+bool SAMRAIManager::isInitialized() {
+   return s_initialized;
+}
+
+bool SAMRAIManager::isStarted() {
+   return s_started;
+}
+
+/*
+ *************************************************************************
+ *
+ * Functions to get and set the maximum number of patch data entries
+ * that will be supported.  Note that the set routine cannot be called
+ * after the max number has been accessed.
+ *
+ *************************************************************************
+ */
+
+int SAMRAIManager::getMaxNumberPatchDataEntries()
+{
+   s_max_patch_data_entries_accessed = true;
+   return s_max_patch_data_entries;
+}
+
+void SAMRAIManager::setMaxNumberPatchDataEntries(
+   int maxnum)
+{
+   if (s_max_patch_data_entries_accessed) {
+      TBOX_ERROR(
+         "SAMRAIManager::setMaxNumberPatchDataEntries() error..."
+         <<
+         "\nThe max patch data entries value has already been accessed and cannot"
+         <<
+         "\nbe reset after that point by calling this method -- program abort!"
+         << std::endl);
+   } else {
+      s_max_patch_data_entries = MathUtilities<int>::Max(maxnum,
+            s_max_patch_data_entries);
+   }
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/SAMRAIManager.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/SAMRAIManager.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,181 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   SAMRAI class to manage package startup and shutdown 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_SAMRAIManager
+#define included_tbox_SAMRAIManager
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+/*!
+ * @brief Utility for managing startup and shutdown of SAMRAI objects
+ * and for managing the maximum number of patch data components allowed.
+ *
+ * The startup/shutdown mechanism in SAMRAIManager is used to manage the
+ * allocation and deallocation of certain memory, particularly static data
+ * that must exist during the full extent of a run or for the full extent
+ * of a single problem within a run.  The specific data that is controlled
+ * by this mechanism is managed using the StartupShutdownManager.
+ *
+ * The four steps of the startup/shutdown mechanism are:
+ *
+ * <ul> initialize -- called at the start of a program after MPI is
+ *      initialized but befor any other SAMRAI objects are used.
+ * <ul> startup -- called to begin a problem-specific segment of the code.
+ * <ul> shutdown -- called at the end of a problem-specific segment of the
+ *                  code.  Shuts down and deallocates everything that was
+ *                  started and allocated by startup.
+ * <ul> finalize -- called at the end of a program right before MPI is
+ *                  finalized.
+ *
+ * The startup and shutdown functions may be called multiple times within a
+ * run, in order to allow for the execution of more than one problem within one
+ * program.  Initialize and finalize must be called exactly once in a single
+ * run.
+ *
+ * Additionally this class manages static data that controls the maximum
+ * number of patch data components that can be allowed.
+ *
+ * @see tbox::SAMRAI_MPI
+ * @see tbox::StartupShutdownManager 
+ */
+
+class SAMRAIManager
+{
+
+public:
+   /*!
+    * @brief Initial setup of the SAMRAI package.
+    *
+    * This function should be invoked ONLY ONCE at the start of a process
+    * to initialize SAMRAI and AFTER MPI is initialized (if used) by a
+    * call to one of the SAMRAI_MPI init routines.
+    *
+    * This function initializes IEEE expection handlers and SAMRAI I/O, as
+    * well as data for any classes that implement the initialize callback
+    * interface through StartupShutdownManager.
+    *
+    * @param[in] setup_IEEE_assertion_handlers (defaults to true)
+    */
+   static void
+   initialize(
+      bool initialize_IEEE_assertion_handlers = true);
+
+   /*!
+    * @brief Startup of the SAMRAI package.
+    *
+    * This function invokes startup for any classes that implement the
+    * startup callback interface through StartupShutdownManager.
+    * This function may be invoked more than once in a process if
+    * solving multiple SAMRAI problems.
+    */
+   static void
+   startup();
+
+   /*!
+    * @brief Shutdown the SAMRAI package.
+    *
+    * This function invokes shutdown for any classes that implement the
+    * startup callback interface through StartupShutdownManager.
+    * This function may be invoked more than once in an process if
+    * solving multiple SAMRAI problems.
+    */
+   static void
+   shutdown();
+
+   /*!
+    * @brief Final cleanup of the SAMRAI package.
+    *
+    * This function should be invoked ONLY ONCE at the end of a process
+    * to complete the cleanup of SAMRAI memory allocations and
+    * any other cleanup tasks.  IEEE assertion handlers and SAMRAI I/O
+    * will be finalized, as well as data for any classes that implement
+    * the finalize callback interface through StartupShutdownManager.
+    *
+    * After this function is called, the only thing that should occur before
+    * exiting the program is a call to SAMRAI_MPI::finalize().
+    *
+    * This function should be invoked only once.
+    */
+   static void
+   finalize();
+
+   /*!
+    * @brief Returns true if SAMRAIManager has been initialized.
+    */
+   static bool
+   isInitialized();
+
+   /*!
+    * @brief Returns true if SAMRAIManager has been started.
+    */
+   static bool
+   isStarted();
+
+   /*!
+    * @brief Return maximum number of patch data entries supported by SAMRAI.
+    *
+    * The value is either the default value (256) or the value set by calling
+    * the setMaxNumberPatchDataEntries() function.
+    */
+   static int
+   getMaxNumberPatchDataEntries();
+
+   /*!
+    * @brief Set maximum number of patch data entries supported by SAMRAI.
+    *
+    * The maximum number will be set to the maximum of the current value and
+    * the argument value.
+    *
+    * Note that this routine cannot be called anytime after the max patch
+    * data entries value has been accessed via the
+    * getMaxNumberPatchDataEntries() function, neither by the user nor
+    * internally within SAMRAI.  Typically, the first internal access of this
+    * value occurs whenever any objects related to the patch hierarchy or
+    * variables are created.
+    */
+   static void
+   setMaxNumberPatchDataEntries(
+      int maxnum);
+
+private:
+
+   /*!
+    * Flag indicating SAMRAIManager has been initialized.
+    */
+   static bool s_initialized;
+
+   /*!
+    * Flag indicating startup has occured.
+    */
+   static bool s_started;
+
+   /*!
+    * Maximum number of patch data components allowed.
+    */
+   static int s_max_patch_data_entries;
+
+   /*!
+    * Flag telling whether maximum number of patch data components has
+    * been accessed.
+    */
+   static bool s_max_patch_data_entries_accessed;
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/SAMRAI_MPI.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/SAMRAI_MPI.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1297 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Simple utility class for interfacing with MPI 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+
+#ifdef HAVE_SYS_TIMES_H
+#include <sys/times.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+
+#include <string>
+using namespace std;
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/tbox/SAMRAI_MPI.I"
+#endif
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+#ifdef __INSURE__
+/*
+ * These are defined in mpich mpi.h and break the insure compile.
+ * This may impact Globus in some way, at least from the comments
+ * in the mpi.h header file.  Why mpich externs something that is
+ * not defined in the mpich is confusing and probably just broken.
+ */
+int MPICHX_TOPOLOGY_DEPTHS;
+int MPICHX_TOPOLOGY_COLORS;
+int MPICHX_PARALLELSOCKETS_PARAMETERS;
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+SAMRAI_MPI::Comm SAMRAI_MPI::commWorld = MPI_COMM_NULL;
+SAMRAI_MPI::Comm SAMRAI_MPI::commNull = MPI_COMM_NULL;
+
+bool tbox::SAMRAI_MPI::s_mpi_is_initialized = false;
+bool tbox::SAMRAI_MPI::s_we_started_mpi(false);
+tbox::SAMRAI_MPI tbox::SAMRAI_MPI::s_samrai_world(tbox::SAMRAI_MPI::commNull);
+
+bool SAMRAI_MPI::s_call_abort_in_serial_instead_of_exit = false;
+bool SAMRAI_MPI::s_call_abort_in_parallel_instead_of_mpiabort = false;
+int SAMRAI_MPI::s_invalid_rank = -1;
+
+/*
+ **************************************************************************
+ *
+ * Abort the program.
+ *
+ **************************************************************************
+ */
+
+void SAMRAI_MPI::setCallAbortInSerialInsteadOfExit(
+   bool flag)
+{
+   s_call_abort_in_serial_instead_of_exit = flag;
+}
+
+void SAMRAI_MPI::setCallAbortInParallelInsteadOfMPIAbort(
+   bool flag)
+{
+   s_call_abort_in_parallel_instead_of_mpiabort = flag;
+}
+
+void SAMRAI_MPI::abort()
+{
+
+#ifdef HAVE_MPI
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   if (mpi.getSize() > 1) {
+      if (s_call_abort_in_parallel_instead_of_mpiabort) {
+         ::abort();
+      } else {
+         MPI_Abort(mpi.getCommunicator(), -1);
+      }
+   } else {
+      if (s_call_abort_in_serial_instead_of_exit) {
+         ::abort();
+      } else {
+         exit(-1);
+      }
+   }
+#else
+   if (s_call_abort_in_serial_instead_of_exit) {
+      ::abort();
+   } else {
+      exit(-1);
+   }
+#endif
+
+}
+
+/*
+ **************************************************************************
+ * Whether SAMRAI is using MPI.
+ **************************************************************************
+ */
+
+bool SAMRAI_MPI::usingMPI()
+{
+   return s_mpi_is_initialized == true;
+}
+
+/*
+ **************************************************************************
+ *
+ * Wrapper for MPI_Init().
+ *
+ **************************************************************************
+ */
+void SAMRAI_MPI::init(
+   int* argc,
+   char** argv[])
+{
+#ifdef HAVE_MPI
+
+   MPI_Init(argc, argv);
+   s_mpi_is_initialized = true;
+   s_we_started_mpi = true;
+
+   MPI_Comm_dup(MPI_COMM_WORLD, &s_samrai_world.d_comm);
+   MPI_Comm_rank(s_samrai_world.d_comm, &s_samrai_world.d_rank);
+   MPI_Comm_size(s_samrai_world.d_comm, &s_samrai_world.d_size);
+
+#else
+   (void)argc;
+   (void)argv;
+#endif
+
+   commWorld = MPI_COMM_WORLD;
+   commNull = MPI_COMM_NULL;
+
+   if (getenv("SAMRAI_ABORT_ON_ERROR")) {
+      SAMRAI_MPI::setCallAbortInSerialInsteadOfExit(true);
+      SAMRAI_MPI::setCallAbortInParallelInsteadOfMPIAbort(true);
+   }
+}
+
+/*
+ **************************************************************************
+ *
+ * Wrapper for MPI_Init().
+ *
+ **************************************************************************
+ */
+void SAMRAI_MPI::init(
+   Comm comm)
+{
+   if (comm == MPI_COMM_NULL) {
+      std::cerr << "SAMRAI_MPI::init: invalid initializing Communicator."
+                << std::endl;
+   }
+#ifdef HAVE_MPI
+
+   s_mpi_is_initialized = true;
+   s_we_started_mpi = false;
+   MPI_Comm_dup(comm, &s_samrai_world.d_comm);
+   MPI_Comm_rank(s_samrai_world.d_comm, &s_samrai_world.d_rank);
+   MPI_Comm_size(s_samrai_world.d_comm, &s_samrai_world.d_size);
+
+#endif
+
+   commWorld = MPI_COMM_WORLD;
+   commNull = MPI_COMM_NULL;
+
+   if (getenv("SAMRAI_ABORT_ON_ERROR")) {
+      SAMRAI_MPI::setCallAbortInSerialInsteadOfExit(true);
+      SAMRAI_MPI::setCallAbortInParallelInsteadOfMPIAbort(true);
+   }
+}
+
+/*
+ **************************************************************************
+ * Initialize SAMRAI_MPI with MPI disabled.
+ **************************************************************************
+ */
+void SAMRAI_MPI::initMPIDisabled()
+{
+   s_mpi_is_initialized = false;
+   s_we_started_mpi = false;
+
+   commWorld = MPI_COMM_WORLD;
+   commNull = MPI_COMM_NULL;
+
+   if (getenv("SAMRAI_ABORT_ON_ERROR")) {
+      SAMRAI_MPI::setCallAbortInSerialInsteadOfExit(true);
+      SAMRAI_MPI::setCallAbortInParallelInsteadOfMPIAbort(true);
+   }
+}
+
+/*
+ **************************************************************************
+ *
+ * Wrapper for MPI_Finalize().
+ *
+ **************************************************************************
+ */
+void SAMRAI_MPI::finalize()
+{
+#ifdef HAVE_MPI
+   // check if mpi is initialized before calling Comm_free
+   if (s_mpi_is_initialized) {
+      MPI_Comm_free(&s_samrai_world.d_comm);
+   }
+
+   if (s_we_started_mpi) {
+      MPI_Finalize();
+   }
+#endif
+}
+
+/*
+ *****************************************************************************
+ *
+ * Methods named like MPI's native interfaces (without the MPI_ prefix)
+ * are wrappers for the native interfaces.  The SAMRAI_MPI versions
+ * introduce a flag to determine whether MPI is really used at run time.
+ * When the run-time flag is on, these wrappers are identical to the MPI
+ * versions.  When the flag is off, most of these methods are no-ops
+ * (which is not necessarily the same as calling the MPI functions with
+ * only 1 process in the communicator).
+ *
+ *****************************************************************************
+ */
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Comm_compare(
+   Comm comm1,
+   Comm comm2,
+   int* result)
+{
+#ifndef HAVE_MPI
+   NULL_USE(comm1);
+   NULL_USE(comm2);
+   NULL_USE(result);
+#endif
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::Comm_compare is a no-op without run-time MPI!");
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Comm_compare(comm1, comm2, result);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Comm_free(
+   Comm* comm)
+{
+#ifndef HAVE_MPI
+   NULL_USE(comm);
+#endif
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::Comm_free is a no-op without run-time MPI!");
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Comm_free(comm);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Finalized(
+   int* flag)
+{
+#ifndef HAVE_MPI
+   NULL_USE(flag);
+#endif
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::Finalized is a no-op without run-time MPI!");
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Finalized(flag);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Get_count(
+   Status* status,
+   Datatype datatype,
+   int* count)
+{
+#ifndef HAVE_MPI
+   NULL_USE(status);
+   NULL_USE(datatype);
+   NULL_USE(count);
+#endif
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::Get_count is a no-op without run-time MPI!");
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Get_count(status, datatype, count);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Test(
+   Request* request,
+   int* flag,
+   Status* status)
+{
+#ifndef HAVE_MPI
+   NULL_USE(request);
+   NULL_USE(flag);
+   NULL_USE(status);
+#endif
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::Test is a no-op without run-time MPI!");
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Test(request, flag, status);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Test_cancelled(
+   Status* status,
+   int* flag)
+{
+#ifndef HAVE_MPI
+   NULL_USE(status);
+   NULL_USE(flag);
+#endif
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::Test_canceled is a no-op without run-time MPI!");
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Test_cancelled(status, flag);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Wait(
+   Request* request,
+   Status* status)
+{
+#ifndef HAVE_MPI
+   NULL_USE(request);
+   NULL_USE(status);
+#endif
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::Wait is a no-op without run-time MPI!");
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Wait(request, status);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Waitall(
+   int count,
+   Request* reqs,
+   Status* stats)
+{
+#ifndef HAVE_MPI
+   NULL_USE(count);
+   NULL_USE(reqs);
+   NULL_USE(stats);
+#endif
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::Waitall is a no-op without run-time MPI!");
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Waitall(count, reqs, stats);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Waitany(
+   int count,
+   Request* array_of_requests,
+   int* index,
+   Status* status)
+{
+#ifndef HAVE_MPI
+   NULL_USE(count);
+   NULL_USE(array_of_requests);
+   NULL_USE(index);
+   NULL_USE(status);
+#endif
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::Waitany is a no-op without run-time MPI!");
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Waitany(count, array_of_requests, index, status);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Waitsome(
+   int incount,
+   Request* array_of_requests,
+   int* outcount,
+   int* array_of_indices,
+   Status* array_of_statuses)
+{
+#ifndef HAVE_MPI
+   NULL_USE(incount);
+   NULL_USE(array_of_requests);
+   NULL_USE(outcount);
+   NULL_USE(array_of_indices);
+   NULL_USE(array_of_statuses);
+#endif
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::Waitsome is a no-op without run-time MPI!");
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Waitsome(incount, array_of_requests, outcount, array_of_indices, array_of_statuses);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ * If MPI is enabled, use MPI_Wtime.
+ * Else if POSIX time is available, use POSIX time.
+ * Else, return 0.
+ *****************************************************************************
+ */
+double SAMRAI_MPI::Wtime()
+{
+   double rval = 0.0;
+   if (!s_mpi_is_initialized) {
+#ifdef HAVE_SYS_TIMES_H
+      // Without MPI, use POSIX time.
+      struct tms tmp_tms;
+      clock_t clock_ticks_since_reference = times(&tmp_tms);
+      const double clock_ticks_per_second = double(sysconf(_SC_CLK_TCK));
+      rval = double(clock_ticks_since_reference) / clock_ticks_per_second;
+#endif
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Wtime();
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *
+ * MPI wrappers with the communicator removed from the argument list.
+ *
+ *****************************************************************************
+ */
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Allgather(
+   void* sendbuf,
+   int sendcount,
+   Datatype sendtype,
+   void* recvbuf,
+   int recvcount,
+   Datatype recvtype) const
+{
+#ifndef HAVE_MPI
+   NULL_USE(sendbuf);
+   NULL_USE(sendcount);
+   NULL_USE(sendtype);
+   NULL_USE(recvbuf);
+   NULL_USE(recvcount);
+   NULL_USE(recvtype);
+#endif
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::Allgather is a no-op without run-time MPI!");
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Allgather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, d_comm);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Allgatherv(
+   void* sendbuf,
+   int sendcounts,
+   Datatype sendtype,
+   void* recvbuf,
+   int* recvcounts,
+   int* displs,
+   Datatype recvtype) const
+{
+#ifndef HAVE_MPI
+   NULL_USE(sendbuf);
+   NULL_USE(sendcounts);
+   NULL_USE(sendtype);
+   NULL_USE(recvbuf);
+   NULL_USE(recvcounts);
+   NULL_USE(displs);
+   NULL_USE(recvtype);
+#endif
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::Algatherv is a no-op without run-time MPI!");
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Allgatherv(sendbuf,
+            sendcounts,
+            sendtype,
+            recvbuf,
+            recvcounts,
+            displs,
+            recvtype,
+            d_comm);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Allreduce(
+   void* sendbuf,
+   void* recvbuf,
+   int count,
+   Datatype datatype,
+   Op op) const
+{
+#ifndef HAVE_MPI
+   NULL_USE(sendbuf);
+   NULL_USE(recvbuf);
+   NULL_USE(count);
+   NULL_USE(datatype);
+   NULL_USE(op);
+#endif
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::Allreduce is a no-op without run-time MPI!");
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Allreduce(sendbuf, recvbuf, count, datatype, op, d_comm);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Attr_get(
+   int keyval,
+   void* attribute_val,
+   int* flag) const
+{
+#ifndef HAVE_MPI
+   NULL_USE(keyval);
+   NULL_USE(attribute_val);
+   NULL_USE(flag);
+#endif
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::Attr_get is a no-op without run-time MPI!");
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Attr_get(d_comm, keyval, attribute_val, flag);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Barrier() const
+{
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      // A no-op is OK for sequential Barrier.
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Barrier(d_comm);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Bcast(
+   void* buffer,
+   int count,
+   Datatype datatype,
+   int root) const
+{
+#ifndef HAVE_MPI
+   NULL_USE(buffer);
+   NULL_USE(count);
+   NULL_USE(datatype);
+   NULL_USE(root);
+#endif
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      // A no-op is OK for sequential Bcast.
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Bcast(buffer, count, datatype, root, d_comm);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Comm_dup(
+   Comm* newcomm) const
+{
+#ifndef HAVE_MPI
+   NULL_USE(newcomm);
+#endif
+   *newcomm = commNull;
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::Comm_dup is a no-op without run-time MPI!");
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Comm_dup(d_comm, newcomm);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Comm_rank(
+   int* rank) const
+{
+#ifndef HAVE_MPI
+   NULL_USE(rank);
+#endif
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      *rank = 0;
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Comm_rank(d_comm, rank);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Comm_size(
+   int* size) const
+{
+#ifndef HAVE_MPI
+   NULL_USE(size);
+#endif
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      *size = 1;
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Comm_size(d_comm, size);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Gather(
+   void* sendbuf,
+   int sendcount,
+   Datatype sendtype,
+   void* recvbuf,
+   int recvcount,
+   Datatype recvtype,
+   int root) const
+{
+#ifndef HAVE_MPI
+   NULL_USE(sendbuf);
+   NULL_USE(sendcount);
+   NULL_USE(sendtype);
+   NULL_USE(recvbuf);
+   NULL_USE(recvcount);
+   NULL_USE(recvtype);
+   NULL_USE(root);
+#endif
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::Gather is a no-op without run-time MPI!");
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Gather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, d_comm);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Gatherv(
+   void* sendbuf,
+   int sendcount,
+   Datatype sendtype,
+   void* recvbuf,
+   int* recvcounts,
+   int* displs,
+   Datatype recvtype,
+   int root) const
+{
+#ifndef HAVE_MPI
+   NULL_USE(sendbuf);
+   NULL_USE(sendcount);
+   NULL_USE(sendtype);
+   NULL_USE(recvbuf);
+   NULL_USE(recvcounts);
+   NULL_USE(displs);
+   NULL_USE(recvtype);
+   NULL_USE(root);
+#endif
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::Gatherv is a no-op without run-time MPI!");
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Gatherv(sendbuf,
+            sendcount,
+            sendtype,
+            recvbuf,
+            recvcounts,
+            displs,
+            recvtype,
+            root,
+            d_comm);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Iprobe(
+   int source,
+   int tag,
+   int* flag,
+   Status* status) const
+{
+#ifndef HAVE_MPI
+   NULL_USE(source);
+   NULL_USE(tag);
+   NULL_USE(flag);
+   NULL_USE(status);
+#endif
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::Iprobe is a no-op without run-time MPI!");
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Iprobe(source, tag, d_comm, flag, status);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Isend(
+   void* buf,
+   int count,
+   Datatype datatype,
+   int dest,
+   int tag,
+   Request* req) const
+{
+#ifndef HAVE_MPI
+   NULL_USE(buf);
+   NULL_USE(count);
+   NULL_USE(datatype);
+   NULL_USE(dest);
+   NULL_USE(tag);
+   NULL_USE(req);
+#endif
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::Isend is a no-op without run-time MPI!");
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Isend(buf, count, datatype, dest, tag, d_comm, req);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Irecv(
+   void* buf,
+   int count,
+   Datatype datatype,
+   int source,
+   int tag,
+   Request* request) const
+{
+#ifndef HAVE_MPI
+   NULL_USE(buf);
+   NULL_USE(count);
+   NULL_USE(datatype);
+   NULL_USE(source);
+   NULL_USE(tag);
+   NULL_USE(request);
+#endif
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::Irecv is a no-op without run-time MPI!");
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Irecv(buf, count, datatype, source, tag, d_comm, request);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Probe(
+   int source,
+   int tag,
+   Status* status) const
+{
+#ifndef HAVE_MPI
+   NULL_USE(source);
+   NULL_USE(tag);
+   NULL_USE(status);
+#endif
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::Probe is a no-op without run-time MPI!");
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Probe(source, tag, d_comm, status);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Recv(
+   void* buf,
+   int count,
+   Datatype datatype,
+   int source,
+   int tag,
+   Status* status) const
+{
+#ifndef HAVE_MPI
+   NULL_USE(buf);
+   NULL_USE(count);
+   NULL_USE(datatype);
+   NULL_USE(source);
+   NULL_USE(tag);
+   NULL_USE(status);
+#endif
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::Recv is a no-op without run-time MPI!");
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Recv(buf, count, datatype, source, tag, d_comm, status);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Reduce(
+   void* sendbuf,
+   void* recvbuf,
+   int count,
+   Datatype datatype,
+   Op op,
+   int root) const
+{
+#ifndef HAVE_MPI
+   NULL_USE(sendbuf);
+   NULL_USE(recvbuf);
+   NULL_USE(count);
+   NULL_USE(datatype);
+   NULL_USE(op);
+   NULL_USE(root);
+#endif
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::Reduce is a no-op without run-time MPI!");
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Reduce(sendbuf, recvbuf, count, datatype, op, root, d_comm);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *****************************************************************************
+ */
+int SAMRAI_MPI::Send(
+   void* buf,
+   int count,
+   Datatype datatype,
+   int dest,
+   int tag) const
+{
+#ifndef HAVE_MPI
+   NULL_USE(buf);
+   NULL_USE(count);
+   NULL_USE(datatype);
+   NULL_USE(dest);
+   NULL_USE(tag);
+#endif
+   int rval = MPI_SUCCESS;
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::Send is a no-op without run-time MPI!");
+   }
+#ifdef HAVE_MPI
+   else {
+      rval = MPI_Send(buf, count, datatype, dest, tag, d_comm);
+   }
+#endif
+   return rval;
+}
+
+/*
+ *****************************************************************************
+ *
+ * Methods named like MPI's native interfaces (without the MPI_ prefix)
+ * are wrappers for the native interfaces.  The SAMRAI_MPI versions
+ * introduce a flag to determine whether MPI is really used at run time.
+ * When the run-time flag is on, these wrappers are identical to the MPI
+ * versions.  When the flag is off, most of these methods are no-ops
+ * (which is not necessarily the same as calling the MPI functions with
+ * only 1 process in the communicator).
+ *
+ *****************************************************************************
+ */
+
+/*
+ **************************************************************************
+ * Specialized Allreduce for integers.
+ **************************************************************************
+ */
+int SAMRAI_MPI::AllReduce(
+   int* x,
+   int count,
+   Op op,
+   int* ranks_of_extrema) const
+{
+#ifndef HAVE_MPI
+   NULL_USE(x);
+   NULL_USE(count);
+   NULL_USE(op);
+   NULL_USE(ranks_of_extrema);
+#endif
+   if ((op == MPI_MINLOC || op == MPI_MAXLOC) &&
+       ranks_of_extrema == NULL) {
+      TBOX_ERROR("SAMRAI_MPI::AllReduce: If you specify reduce\n"
+         << "operation MPI_MINLOC or MPI_MAXLOC, you must\n"
+         << "provide space for the ranks in the 'ranks_of_extrema'\n"
+         << "argument.");
+   }
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::AllReduce is a no-op without run-time MPI!");
+   }
+
+   int rval = MPI_SUCCESS;
+   /*
+    * Get ranks of extrema if user operation specified it or user
+    * specified min/max operation and provides space for rank.
+    */
+   bool get_ranks_of_extrema =
+      op == MPI_MINLOC ? true :
+      op == MPI_MAXLOC ? true :
+      ranks_of_extrema != NULL && (op == MPI_MIN || op == MPI_MAX);
+
+   if (!get_ranks_of_extrema) {
+      std::vector<int> recv_buf(count);
+      rval = Allreduce(x, &recv_buf[0], count, MPI_INT, op);
+      for (int c = 0; c < count; ++c) {
+         x[c] = recv_buf[c];
+      }
+   } else {
+      Op locop =
+         op == MPI_MIN ? MPI_MINLOC :
+         op == MPI_MAX ? MPI_MAXLOC :
+         op;
+      IntIntStruct* send_buf = new IntIntStruct[count];
+      IntIntStruct* recv_buf = new IntIntStruct[count];
+      for (int c = 0; c < count; ++c) {
+         send_buf[c].j = x[c];
+         send_buf[c].i = d_rank;
+      }
+      rval = Allreduce(send_buf, recv_buf, count, MPI_2INT, locop);
+      for (int c = 0; c < count; ++c) {
+         x[c] = recv_buf[c].j;
+         ranks_of_extrema[c] = recv_buf[c].i;
+      }
+
+      delete[] send_buf;
+      delete[] recv_buf;
+   }
+
+   return rval;
+}
+
+/*
+ **************************************************************************
+ * Specialized Allreduce for doubles.
+ **************************************************************************
+ */
+int SAMRAI_MPI::AllReduce(
+   double* x,
+   int count,
+   Op op,
+   int* ranks_of_extrema) const
+{
+#ifndef HAVE_MPI
+   NULL_USE(x);
+   NULL_USE(count);
+   NULL_USE(op);
+   NULL_USE(ranks_of_extrema);
+#endif
+   if ((op == MPI_MINLOC || op == MPI_MAXLOC) &&
+       ranks_of_extrema == NULL) {
+      TBOX_ERROR("SAMRAI_MPI::AllReduce: If you specify reduce\n"
+         << "operation MPI_MINLOC or MPI_MAXLOC, you must\n"
+         << "provide space for the ranks in the 'ranks_of_extrema'\n"
+         << "argument.");
+   }
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::AllReduce is a no-op without run-time MPI!");
+   }
+
+   int rval = MPI_SUCCESS;
+   /*
+    * Get ranks of extrema if user operation specified it or user
+    * specified min/max operation and provides space for rank.
+    */
+   bool get_ranks_of_extrema =
+      op == MPI_MINLOC ? true :
+      op == MPI_MAXLOC ? true :
+      ranks_of_extrema != NULL && (op == MPI_MIN || op == MPI_MAX);
+
+   if (!get_ranks_of_extrema) {
+      std::vector<double> recv_buf(count);
+      rval = Allreduce(x, &recv_buf[0], count, MPI_DOUBLE, op);
+      for (int c = 0; c < count; ++c) {
+         x[c] = recv_buf[c];
+      }
+   } else {
+      Op locop =
+         op == MPI_MIN ? MPI_MINLOC :
+         op == MPI_MAX ? MPI_MAXLOC :
+         op;
+      DoubleIntStruct* send_buf = new DoubleIntStruct[count];
+      DoubleIntStruct* recv_buf = new DoubleIntStruct[count];
+      for (int c = 0; c < count; ++c) {
+         send_buf[c].d = x[c];
+         send_buf[c].i = d_rank;
+      }
+      rval = Allreduce(send_buf, recv_buf, count, MPI_DOUBLE_INT, locop);
+      for (int c = 0; c < count; ++c) {
+         x[c] = recv_buf[c].d;
+         ranks_of_extrema[c] = recv_buf[c].i;
+      }
+
+      delete[] send_buf;
+      delete[] recv_buf;
+   }
+
+   return rval;
+}
+
+/*
+ **************************************************************************
+ * Specialized Allreduce for doubles.
+ **************************************************************************
+ */
+int SAMRAI_MPI::AllReduce(
+   float* x,
+   int count,
+   Op op,
+   int* ranks_of_extrema) const
+{
+#ifndef HAVE_MPI
+   NULL_USE(x);
+   NULL_USE(count);
+   NULL_USE(op);
+   NULL_USE(ranks_of_extrema);
+#endif
+   if ((op == MPI_MINLOC || op == MPI_MAXLOC) &&
+       ranks_of_extrema == NULL) {
+      TBOX_ERROR("SAMRAI_MPI::AllReduce: If you specify reduce\n"
+         << "operation MPI_MINLOC or MPI_MAXLOC, you must\n"
+         << "provide space for the ranks in the 'ranks_of_extrema'\n"
+         << "argument.");
+   }
+   if (!s_mpi_is_initialized) {
+      TBOX_ERROR("SAMRAI_MPI::AllReduce is a no-op without run-time MPI!");
+   }
+
+   int rval = MPI_SUCCESS;
+   /*
+    * Get ranks of extrema if user operation specified it or user
+    * specified min/max operation and provides space for rank.
+    */
+   bool get_ranks_of_extrema =
+      op == MPI_MINLOC ? true :
+      op == MPI_MAXLOC ? true :
+      ranks_of_extrema != NULL && (op == MPI_MIN || op == MPI_MAX);
+
+   if (!get_ranks_of_extrema) {
+      std::vector<float> recv_buf(count);
+      rval = Allreduce(x, &recv_buf[0], count, MPI_FLOAT, op);
+      for (int c = 0; c < count; ++c) {
+         x[c] = recv_buf[c];
+      }
+   } else {
+      Op locop =
+         op == MPI_MIN ? MPI_MINLOC :
+         op == MPI_MAX ? MPI_MAXLOC :
+         op;
+      FloatIntStruct* send_buf = new FloatIntStruct[count];
+      FloatIntStruct* recv_buf = new FloatIntStruct[count];
+      for (int c = 0; c < count; ++c) {
+         send_buf[c].f = x[c];
+         send_buf[c].i = d_rank;
+      }
+      rval = Allreduce(send_buf, recv_buf, count, MPI_FLOAT_INT, locop);
+      for (int c = 0; c < count; ++c) {
+         x[c] = recv_buf[c].f;
+         ranks_of_extrema[c] = recv_buf[c].i;
+      }
+
+      delete[] send_buf;
+      delete[] recv_buf;
+   }
+
+   return rval;
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Unsuppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/SAMRAI_MPI.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/SAMRAI_MPI.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,199 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Simple utility class for interfacing with MPI 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace tbox {
+
+/*
+ **************************************************************************
+ **************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+const SAMRAI_MPI& SAMRAI_MPI::getSAMRAIWorld() {
+   return s_samrai_world;
+}
+
+/*
+ **************************************************************************
+ **************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+SAMRAI_MPI::SAMRAI_MPI(
+   const Comm& comm):
+   d_comm(comm),
+   d_rank(0),
+   d_size(1)
+{
+#ifdef HAVE_MPI
+   if (comm != MPI_COMM_NULL) {
+      if (s_mpi_is_initialized) {
+         MPI_Comm_rank(d_comm, &d_rank);
+         MPI_Comm_size(d_comm, &d_size);
+      }
+   }
+#endif
+}
+
+/*
+ **************************************************************************
+ **************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+void SAMRAI_MPI::dupCommunicator(
+   const SAMRAI_MPI& r)
+{
+#ifdef HAVE_MPI
+   int rval = r.Comm_dup(&d_comm);
+   if (rval != MPI_SUCCESS) {
+      TBOX_ERROR("SAMRAI_MPI::dupCommunicator: Error duplicating\n"
+         << "communicator.");
+   }
+   MPI_Comm_rank(d_comm, &d_rank);
+   MPI_Comm_size(d_comm, &d_size);
+   TBOX_ASSERT(d_rank == r.d_rank);
+   TBOX_ASSERT(d_size == r.d_size);
+#else
+   NULL_USE(r);
+#endif
+}
+
+/*
+ **************************************************************************
+ **************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+void SAMRAI_MPI::freeCommunicator()
+{
+#ifdef HAVE_MPI
+   if ( d_comm != MPI_COMM_NULL ) {
+      TBOX_ASSERT( tbox::SAMRAI_MPI::usingMPI() );
+      Comm_free(&d_comm);
+      // d_comm is now set to MPI_COMM_NULL;
+   }
+#else
+   d_comm = MPI_COMM_NULL;
+#endif
+   d_rank = 0;
+   d_size = 1;
+}
+
+/*
+ **************************************************************************
+ **************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+const SAMRAI_MPI& SAMRAI_MPI::operator = (
+   const SAMRAI_MPI& rhs)
+{
+   d_comm = rhs.d_comm;
+   d_rank = rhs.d_rank;
+   d_size = rhs.d_size;
+   return *this;
+}
+
+/*
+ **************************************************************************
+ **************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+bool SAMRAI_MPI::operator == (
+   const SAMRAI_MPI& rhs) const
+{
+   return d_comm == rhs.d_comm;
+}
+
+/*
+ **************************************************************************
+ **************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+bool SAMRAI_MPI::operator != (
+   const SAMRAI_MPI& rhs) const
+{
+   return d_comm != rhs.d_comm;
+}
+
+/*
+ **************************************************************************
+ **************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+int SAMRAI_MPI::getRank() const
+{
+   return d_rank;
+}
+
+/*
+ **************************************************************************
+ **************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+int SAMRAI_MPI::getSize() const
+{
+   return d_size;
+}
+
+/*
+ **************************************************************************
+ **************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+int SAMRAI_MPI::getInvalidRank()
+{
+   return s_invalid_rank;
+}
+
+/*
+ **************************************************************************
+ **************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+const SAMRAI_MPI::Comm& SAMRAI_MPI::getCommunicator() const
+{
+   return d_comm;
+}
+
+/*
+ **************************************************************************
+ **************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+void SAMRAI_MPI::setCommunicator(
+   const Comm& comm)
+{
+   d_comm = comm;
+   d_rank = 0;
+   d_size = 1;
+#ifdef HAVE_MPI
+   if (s_mpi_is_initialized) {
+      if (d_comm != MPI_COMM_NULL) {
+         MPI_Comm_rank(d_comm, &d_rank);
+         MPI_Comm_size(d_comm, &d_size);
+      }
+   }
+#endif
+}
+
+#ifndef HAVE_MPI
+/*
+ **************************************************************************
+ **************************************************************************
+ */
+SAMRAI_INLINE_KEYWORD
+SAMRAI_MPI::Status::Status():
+   MPI_SOURCE(-1),
+   MPI_TAG(-1),
+   MPI_ERROR(-1)
+{
+}
+#endif
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/SAMRAI_MPI.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/SAMRAI_MPI.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,760 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Simple utility class for interfacing with MPI 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_SAMRAI_MPI
+#define included_tbox_SAMRAI_MPI
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifdef HAVE_MPI
+#include "mpi.h"
+#else
+
+/*!
+ * @brief Enumeration to define MPI constants when compiling without MPI.
+ *
+ * These are defined in the global namespace, and it does not matter
+ * what values these take because they are not used.  (They are just place
+ * holders to let code compile without MPI without adding excessive 
+ * preprocessor guards to the code.)
+ *
+ * This is not a complete set.  Developers should add as needed to extend
+ * SAMRAI_MPI's functionality.
+ */
+enum {
+   MPI_COMM_WORLD,
+   MPI_COMM_NULL,
+   // Special values:
+   MPI_SUCCESS = 0,
+   MPI_CONGRUENT,
+   MPI_REQUEST_NULL,
+   MPI_ERR_IN_STATUS,
+   MPI_UNDEFINED,
+   MPI_ANY_SOURCE,
+   MPI_ANY_TAG,
+   // Data types:
+   MPI_BYTE,
+   MPI_CHAR,
+   MPI_DOUBLE,
+   MPI_FLOAT,
+   MPI_INT,
+   MPI_DOUBLE_COMPLEX,
+   MPI_2INT,
+   MPI_DOUBLE_INT,
+   MPI_FLOAT_INT,
+   // Operations:
+   MPI_MIN,
+   MPI_MINLOC,
+   MPI_MAX,
+   MPI_MAXLOC,
+   MPI_SUM,
+   // Attributes:
+   MPI_TAG_UB
+};
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+/*!
+ * @brief Provides C++ wrapper around MPI routines.
+ *
+ * SAMRAI_MPI provides a single point of access in SAMRAI for using MPI 
+ * function calls and for the run-time decision whether to use MPI.  
+ * The purpose of having a single point is to facilitate writing code 
+ * that is not cluttered by the repetitive logic absorbed into this class.  
+ * Codes accessing MPI through this class should work whether SAMRAI is 
+ * configured with or without MPI and whether MPI is enabled at run time.
+ *
+ * This class provides two sets of interfaces:
+ *
+ * -# Methods closely matching the MPI interfaces associated with a
+ * communicator.  The communicator is set during object construction
+ * and is removed from the argument list.
+ *
+ * -# Static methods exactly matching the MPI interfaces not associated
+ * with any specific communicator.
+ *
+ * If SAMRAI has MPI enabled, the MPI wrappers in this class delegate to
+ * the real MPI methods.  Otherwise, they are no-ops and will throw an
+ * assertion if used, except for those specifically identified as able to
+ * work without MPI enabled.  The purpose of these interfaces are strictly
+ * to check whether MPI was configured into SAMRAI and SAMRAI is using
+ * MPI at run time.  They are not "single-process implementations" of the
+ * MPI standard.
+ *
+ * This class also manages a central SAMRAI_MPI object meant for
+ * SAMRAI's general use.  See getSAMRAIWorld() and init().
+ */
+
+class SAMRAI_MPI
+{
+
+public:
+
+   /*!
+    * @brief Aliases for MPI data type names.
+    * 
+    * Define aliases for MPI types that can be used whether SAMRAI is
+    * configured with or without MPI.  Without MPI, these types are "dummies",
+    * used to allow the code to be compiled without changes.
+    */
+#ifdef HAVE_MPI
+   typedef MPI_Comm Comm;
+   typedef MPI_Datatype Datatype;
+   typedef MPI_Group Group;
+   typedef MPI_Op Op;
+   typedef MPI_Request Request;
+   typedef MPI_Status Status;
+#else
+   typedef int Comm;
+   typedef int Datatype;
+   typedef int Group;
+   typedef int Op;
+   typedef int Request;
+
+   /*!
+    * @brief Dummy definition of Status to match the MPI standard.
+    *
+    * Codes are allowed to access the members of this struct, so they must
+    * exist for compilation.  Without MPI, we won't actually use them.
+    */
+   struct Status {
+      Status();
+      int MPI_SOURCE;
+      int MPI_TAG;
+      int MPI_ERROR;
+   };
+#endif
+
+   /*!
+    * @brief MPI communicator constants
+    */
+   static Comm commWorld;
+   static Comm commNull;
+
+   /*!
+    * @brief Get the primary SAMRAI_MPI object owned by SAMRAI.
+    *
+    * This is SAMRAI's primary communication object set up when
+    * SAMRAI_MPI is initialized.  It is used for basic communications
+    * that are not associated with another communication object.
+    * Various parts of the SAMRAI library may create and use (and
+    * destroy) communicators that are derived from this object.
+    *
+    * The use of this object outside of the SAMRAI library should be
+    * carefully limited to avoid mixing messages.
+    *
+    * @see init()
+    */
+   static const SAMRAI_MPI&
+   getSAMRAIWorld();
+
+   /*!
+    * @brief Get a static invalid rank number.
+    *
+    * This value is intended to be used by other classes as an invalid rank
+    * number rather than using a hard-coded "magic" negative integer value.
+    */
+   static int getInvalidRank();
+
+   /*!
+    * @brief Constructor.
+    *
+    * The given MPI communicator will be used for all communications invoked
+    * by this object.
+    *
+    * Note that the object will NOT automatically free the communicator.
+    * To manually free the communicator, use freeCommunicator().
+    *
+    * @param[in] comm
+    */
+   explicit SAMRAI_MPI(
+      const Comm& comm);
+
+   /*!
+    * @brief Get the local process rank from the internal communicator.
+    */
+   int
+   getRank() const;
+
+   /*!
+    * @brief Get the size (number of processes) of the internal communicator.
+    */
+   int
+   getSize() const;
+
+   /*!
+    * @brief Get the internal communicator.
+    */
+   const Comm&
+   getCommunicator() const;
+
+   /*!
+    * @brief Set the internal communicator.
+    *
+    * Note that this call does does automatically free the
+    * existing communicator.  To manually free communicators, see
+    * freeCommunicator().
+    *
+    * @param[in] comm 
+    */
+   void
+   setCommunicator(
+      const Comm& comm);
+
+   /*!
+    * @brief Duplicate and internally use the communicator of a given
+    * SAMRAI_MPI object.
+    *
+    * Note that this call does not automatically free the
+    * existing communicator.  The duplicate communicator will also NOT
+    * be automatically freed.  To manually free communicators, see
+    * freeCommunicator().
+    *
+    * @param[in] other  Contains the communicator to be duplicated.
+    *              
+    */
+   void
+   dupCommunicator(
+      const SAMRAI_MPI& other);
+
+   /*!
+    * @brief Free the internal communicator and set it to MPI_COMM_NULL.
+    *
+    * If the internal communicator is already MPI_COMM_NULL, do nothing.
+    */
+   void
+   freeCommunicator();
+
+   /*!
+    * @brief Assignment operator.
+    *
+    * @param[in] rhs
+    */
+   const SAMRAI_MPI&
+   operator = (
+      const SAMRAI_MPI& rhs);
+
+   /*!
+    * @brief Equality comparison operator (compares MPI communicator).
+    * 
+    * @param[in] rhs
+    */
+   bool
+   operator == (
+      const SAMRAI_MPI& rhs) const;
+
+   /*!
+    * @brief Inequality comparison operator (compares MPI communicator).
+    *
+    * @param[in] rhs
+    */
+   bool
+   operator != (
+      const SAMRAI_MPI& rhs) const;
+
+   //@{
+   //! @name Static MPI wrappers matching MPI interfaces.
+
+   /*!
+    * @brief MPI wrappers that don't use the internal communicator.
+    *
+    * The purpose of these wrappers is to provide a single place for
+    * compile- and run-time toggling of MPI code.  The signatures and
+    * return values of these methods are identical to the MPI C bindings.
+    * Thes methods will throw an assertion if they are called when MPI is
+    * not enabled.
+    */
+
+   static int
+   Comm_compare(
+      Comm comm1,
+      Comm comm2,
+      int* result);
+
+   static int
+   Comm_free(
+      Comm* comm);
+
+   static int
+   Finalized(
+      int* flag);
+
+   static int
+   Get_count(
+      Status* status,
+      Datatype datatype,
+      int* count);
+
+   static int
+   Test(
+      Request* request,
+      int* flag,
+      Status* status);
+
+   static int
+   Test_cancelled(
+      Status* status,
+      int* flag);
+
+   static int
+   Wait(
+      Request* request,
+      Status* status);
+
+   static int
+   Waitall(
+      int count,
+      Request* reqs,
+      Status* stats);
+
+   static int
+   Waitany(
+      int count,
+      Request* array_of_requests,
+      int* index,
+      Status* status);
+
+   static int
+   Waitsome(
+      int incount,
+      Request* array_of_requests,
+      int* outcount,
+      int* array_of_indices,
+      Status* array_of_statuses);
+
+   /*!
+    * @brief MPI Wtime (if MPI is enabled) or an alternate time
+    * calculation.
+    *
+    * @return If MPI is running, use Wtime.  If not, but POSIX time is
+    * available, use that.  Else return 0.0.
+    */
+   static double
+   Wtime();
+
+   //@}
+
+   //@{
+   //! @name MPI wrappers bound to SAMRAI_MPI objects.
+
+   /*!
+    * @brief MPI wrappers for methods associated with an MPI communicator.
+    *
+    * The purpose of these wrappers is to provide a single place for compile-
+    * and run-time toggling of MPI code.  The signatures and return values 
+    * of these methods are identical to the MPI C bindings, except that the
+    * communicators are omitted.  The communicator used is that associated
+    * with the SAMRAI_MPI object (typically passed to the constructor).
+    * These methods throw an assertion if called while MPI is not enabled, 
+    * except where noted.
+    */
+
+   int
+   Allgather(
+      void* sendbuf,
+      int sendcount,
+      Datatype sendtype,
+      void* recvbuf,
+      int recvcount,
+      Datatype recvtype) const;
+
+   int
+   Allgatherv(
+      void* sendbuf,
+      int sendcvount,
+      Datatype sendtype,
+      void* recvbuf,
+      int* recvcounts,
+      int* displs,
+      Datatype recvtype) const;
+
+   int
+   Allreduce(
+      void* sendbuf,
+      void* recvbuf,
+      int count,
+      Datatype datatype,
+      Op op) const;
+
+   int
+   Attr_get(
+      int keyval,
+      void* attribute_val,
+      int* flag) const;
+
+   /*!
+    * @brief MPI Barrier (does nothing when MPI is disabled).
+    */
+   int
+   Barrier() const;
+
+   /*!
+    * @brief MPI Bcast (does nothing when MPI is disabled).
+    */
+   int
+   Bcast(
+      void* buffer,
+      int count,
+      Datatype datatype,
+      int root) const;
+
+   int
+   Comm_dup(
+      Comm* newcomm) const;
+
+   /*!
+    * @brief MPI Comm_rank (Set rank to 0 when MPI is disabled).
+    */
+   int
+   Comm_rank(
+      int* rank) const;
+
+   /*!
+    * @brief MPI Comm_size (Set size to 1 when MPI is disabled).
+    */
+   int
+   Comm_size(
+      int* size) const;
+
+   int
+   Gather(
+      void* sendbuf,
+      int sendcount,
+      Datatype sendtype,
+      void* recvbuf,
+      int recvcount,
+      Datatype recvtype,
+      int root) const;
+
+   int
+   Gatherv(
+      void* sendbuf,
+      int sendcount,
+      Datatype sendtype,
+      void* recvbuf,
+      int* recvcounts,
+      int* displs,
+      Datatype recvtype,
+      int root) const;
+
+   int
+   Iprobe(
+      int source,
+      int tag,
+      int* flag,
+      Status* status) const;
+
+   int
+   Isend(
+      void* buf,
+      int count,
+      Datatype datatype,
+      int dest,
+      int tag,
+      Request* req) const;
+
+   int
+   Irecv(
+      void* buf,
+      int count,
+      Datatype datatype,
+      int source,
+      int tag,
+      Request* request) const;
+
+   int
+   Probe(
+      int source,
+      int tag,
+      Status* status) const;
+
+   int
+   Recv(
+      void* buf,
+      int count,
+      Datatype datatype,
+      int source,
+      int tag,
+      Status* status) const;
+
+   int
+   Reduce(
+      void* sendbuf,
+      void* recvbuf,
+      int count,
+      Datatype datatype,
+      Op op,
+      int root) const;
+
+   int
+   Send(
+      void* buf,
+      int count,
+      Datatype datatype,
+      int dest,
+      int tag) const;
+
+   //@}
+
+   //@{
+
+   //! @name Specialized reductions for certain common types.
+
+   /*!
+    * @brief Specialized Allreduce for integers.
+    *
+    * If MPI_MINLOC or MPI_MAXLOC is given as the operator, the
+    * ranks_of_extrema argument must be provided with space allocated for
+    * @c count integers.
+    *
+    * @return MPI error code
+    *
+    * @param[in,out] x   Array of integers to reduce.
+    * @param[in]  count  Number of items in x.
+    * @param[in]  op     A valid MPI reduce operation.
+    * @param[out] ranks_of_extrema  Ranks associated with min or max of x
+    *                               (if op indicates min or max operation).
+    */
+   int
+   AllReduce(
+      int* x,
+      int count,
+      Op op,
+      int* ranks_of_extrema = NULL) const;
+
+   /*!
+    * @brief Specialized Allreduce for doubles.
+    *
+    * If MPI_MINLOC or MPI_MAXLOC is given as the operator, the
+    * ranks_of_extrema argument must be provided with space allocated for
+    * @c count integers. 
+    *
+    * @param[in,out] x   Array of doubles to reduce.
+    * @param[in]  count  Number of items in x.
+    * @param[in]  op     A valid MPI reduce operation.
+    * @param[out] ranks_of_extrema  Ranks associated with min or max of x
+    *                               (if op indicates min or max operation).
+    */
+   int
+   AllReduce(
+      double* x,
+      int count,
+      Op op,
+      int* ranks_of_extrema = NULL) const;
+
+   /*!
+    * @brief Specialized Allreduce for floats.
+    *
+    * If MPI_MINLOC or MPI_MAXLOC is given as the operator, the
+    * ranks_of_extrema argument must be provided with space allocated for
+    * @c count integers.
+    *
+    * @param[in,out] x   Array of floats to reduce.
+    * @param[in]  count  Number of items in x.
+    * @param[in]  op     A valid MPI reduce operation.
+    * @param[out] ranks_of_extrema  Ranks associated with min or max of x
+    *                               (if op indicates min or max operation).
+    */
+   int
+   AllReduce(
+      float* x,
+      int count,
+      Op op,
+      int* ranks_of_extrema = NULL) const;
+
+   //@}
+
+   /*!
+    * @brief Set flag indicating whether exit or MPI_Abort is called
+    * when running with one processor.
+    *
+    * Calling this function influences the behavior of calls to 
+    * SAMRAI_MPI::abort().  If the value set is true, it means that
+    * system abort() will be called.  Passing false means exit(-1) will be
+    * called.
+    */
+   static void
+   setCallAbortInSerialInsteadOfExit(
+      bool flag = true);
+
+   /*!
+    * @brief Set flag indicating whether MPI_Abort or abort is called
+    * when running with more than one processor.
+    *
+    * Calling this function influences the behavior of calls to
+    * SAMRAI_MPI::abort().  If the value set is true, it means that
+    * system abort() will be called.  Passing false means MPI_Abort will be
+    * called.
+    */
+   static void
+   setCallAbortInParallelInsteadOfMPIAbort(
+      bool flag = true);
+
+   /*!
+    * @brief Call MPI_Abort or exit depending on whether running with one
+    * or more processes and value set by function above, if called.
+    *
+    * The default is to call exit(-1) if running with one processor and to
+    * call MPI_Abort() otherwise.  This function avoids having to guard abort
+    * calls in application code.
+    */
+   static void
+   abort();
+
+   /*!
+    * @brief Disable MPI usage and run in sequential mode.
+    *
+    * The default setting is to enable MPI at run-time if SAMRAI was
+    * configured with MPI and to disable if SAMRAI was not configured
+    * with MPI.  This method disables MPI in the former case.
+    *
+    * If MPI is disabled for SAMRAI, the communication interfaces in
+    * this class are no-ops and will throw an assertion if used,
+    * except for those interfaces specifically described as working in
+    * sequential mode.
+    *
+    * Disabling MPI must be done before calling SAMRAI_MPI::init().
+    */
+   static void
+   disableMPI();
+
+   /*!
+    * @brief Whether SAMRAI is using MPI.
+    *
+    * @see disableMPI().
+    */
+   static bool
+   usingMPI();
+
+   /*!
+    * @brief Initialize MPI and SAMRAI_MPI.
+    *
+    * This initialization sets up getSAMRAIWorld() to return an
+    * SAMRAI_MPI object with a communicator duplicated from
+    * MPI_COMM_WORLD.
+    *
+    * Use only one of the three initialization methods.
+    *
+    * @param[in]  argc  Pointer to parameter from main()
+    * @param[in]  argv  Pointer to parameter from main()
+    */
+   static void init(
+      int* argc,
+      char** argv[]);
+
+   /*!
+    * @brief Initialize SAMRAI_MPI when MPI is already initialized.
+    *
+    * This initialization sets up getSAMRAIWorld() to return an
+    * SAMRAI_MPI object with a communicator duplicated from
+    * the one passed in.
+    *
+    * Use only one of the three initialization methods.
+    *
+    * @param comm  An MPI Communicator to be duplicated for SAMRAI use.
+    */
+   static void
+   init(
+      Comm comm);
+
+   /*!
+    * @brief Initialize SAMRAI_MPI to work without MPI.
+    *
+    * This initialization sets up SAMRAI to run in sequential mode.
+    *
+    * Use only one of the three initialization methods.
+    */
+   static void
+   initMPIDisabled();
+
+   /*!
+    * @brief Shut down SAMRAI_MPI and, if appropriate, shut down MPI.
+    *
+    * This method frees the MPI communicator duplicated for SAMRAI
+    * use.  If this class has started MPI with the first init() method,
+    * finalize() will also shut down MPI.
+    */
+   static void
+   finalize();
+
+private:
+
+   //@{
+
+   /*!
+    * @brief Flags to control program abort in SAMRAI_MPI::abort().
+    */
+   static bool s_call_abort_in_serial_instead_of_exit;
+   static bool s_call_abort_in_parallel_instead_of_mpiabort;
+   //@}
+
+   /*!
+    * @brief Invalid (negative) rank number for getInvalidRank().
+    */
+   static int s_invalid_rank;
+
+   //@{
+   //@name Structs for passing arguments to MPI
+   struct DoubleIntStruct { double d;
+                            int i;
+   };
+   struct FloatIntStruct { float f;
+                           int i;
+   };
+   struct IntIntStruct { int j;
+                         int i;
+   };
+   //@}
+
+   /*!
+    * @brief Internal communicator
+    */
+   SAMRAI_MPI::Comm d_comm;
+
+   /*!
+    * @brief The local rank.
+    */
+   int d_rank;
+
+   /*!
+    * @brief The size of the communicator.
+    */
+   int d_size;
+
+   /*!
+    * @brief Whether MPI is initialized.
+    */
+   static bool s_mpi_is_initialized;
+
+   /*!
+    * @brief Whether this class started up MPI.
+    */
+   static bool s_we_started_mpi;
+
+   /*!
+    * @brief Primary SAMRAI_MPI object.
+    */
+   static SAMRAI_MPI s_samrai_world;
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/tbox/SAMRAI_MPI.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Scanner.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Scanner.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1943 @@
+#ifdef __GNUC__
+#if __GNUC__ > 4 ||               (__GNUC__ == 4 && (__GNUC_MINOR__ > 2 ||                                  (__GNUC_MINOR__ == 2 &&                                   __GNUC_PATCHLEVEL__ > 0)))
+#pragma GCC diagnostic ignored "-Wall"
+#pragma GCC diagnostic ignored "-Wextra"
+#pragma GCC diagnostic ignored "-Wconversion"
+#endif
+#endif
+
+#ifdef __INTEL_COMPILER
+// Ignore Intel warnings about unreachable statements
+#pragma warning (disable:177)
+// Ignore Intel warnings about external declarations
+#pragma warning (disable:1419)
+// Ignore Intel warnings about type conversions
+#pragma warning (disable:810)
+// Ignore Intel remarks about non-pointer conversions
+#pragma warning (disable:2259)
+// Ignore Intel remarks about zero used for undefined preprocessor syms
+#pragma warning (disable:193)
+// Ignore Intel remarks about unreachable code
+#pragma warning (disable:111)
+#endif
+
+#ifdef __xlC__
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+/* A lexical scanner generated by flex*/
+
+/* Scanner skeleton version:
+
+ */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+
+#include <stdio.h>
+#include <unistd.h>
+
+
+/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
+#ifdef c_plusplus
+#ifndef __cplusplus
+#define __cplusplus
+#endif
+#endif
+
+
+#ifdef __cplusplus
+
+#include <stdlib.h>
+
+/* Use prototypes in function declarations. */
+#define YY_USE_PROTOS
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else	/* ! __cplusplus */
+
+#if __STDC__
+
+#define YY_USE_PROTOS
+#define YY_USE_CONST
+
+#endif	/* __STDC__ */
+#endif	/* ! __cplusplus */
+
+#ifdef __TURBOC__
+ #pragma warn -rch
+ #pragma warn -use
+#include <io.h>
+#include <stdlib.h>
+#define YY_USE_CONST
+#define YY_USE_PROTOS
+#endif
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+
+#ifdef YY_USE_PROTOS
+#define YY_PROTO(proto) proto
+#else
+#define YY_PROTO(proto) ()
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index.  If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition.  This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN yy_start = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state.  The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START ((yy_start - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#define YY_BUF_SIZE 16384
+
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+
+extern int yyleng;
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+/* The funky do-while in the following #define is used to turn the definition
+ * int a single C statement (which needs a semi-colon terminator).  This
+ * avoids problems with code like:
+ *
+ * 	if ( condition_holds )
+ *		yyless( 5 );
+ *	else
+ *		do_something_else();
+ *
+ * Prior to using the do-while the compiler would get upset at the
+ * "else" because it interpreted the "if" statement as being all
+ * done when it reached the ';' after the yyless() call.
+ */
+
+/* Return all but the first 'n' matched characters back to the input stream. */
+
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+		*yy_cp = yy_hold_char; \
+		YY_RESTORE_YY_MORE_OFFSET \
+		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
+		YY_DO_BEFORE_ACTION /* set up yytext again */ \
+		} \
+	while ( 0 )
+
+#define unput(c) yyunput( c, yytext_ptr )
+
+/* Some routines like yy_flex_realloc() are emitted as static but are
+   not called by all lexers. This generates warnings in some compilers,
+   notably GCC. Arrange to suppress these. */
+#ifdef __GNUC__
+#define YY_MAY_BE_UNUSED __attribute__((unused))
+#else
+#define YY_MAY_BE_UNUSED
+#endif
+
+/* The following is because we cannot portably get our hands on size_t
+ * (without autoconf's help, which isn't available because we want
+ * flex-generated scanners to compile on their own).
+ */
+typedef unsigned int yy_size_t;
+
+
+struct yy_buffer_state
+	{
+	FILE *yy_input_file;
+
+	char *yy_ch_buf;		/* input buffer */
+	char *yy_buf_pos;		/* current position in input buffer */
+
+	/* Size of input buffer in bytes, not including room for EOB
+	 * characters.
+	 */
+	yy_size_t yy_buf_size;
+
+	/* Number of characters read into yy_ch_buf, not including EOB
+	 * characters.
+	 */
+	int yy_n_chars;
+
+	/* Whether we "own" the buffer - i.e., we know we created it,
+	 * and can realloc() it to grow it, and should free() it to
+	 * delete it.
+	 */
+	int yy_is_our_buffer;
+
+	/* Whether this is an "interactive" input source; if so, and
+	 * if we're using stdio for input, then we want to use getc()
+	 * instead of fread(), to make sure we stop fetching input after
+	 * each newline.
+	 */
+	int yy_is_interactive;
+
+	/* Whether we're considered to be at the beginning of a line.
+	 * If so, '^' rules will be active on the next match, otherwise
+	 * not.
+	 */
+	int yy_at_bol;
+
+	/* Whether to try to fill the input buffer when we reach the
+	 * end of it.
+	 */
+	int yy_fill_buffer;
+
+	int yy_buffer_status;
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+	/* When an EOF's been seen but there's still some text to process
+	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+	 * shouldn't try reading from the input source any more.  We might
+	 * still have a bunch of tokens to match, though, because of
+	 * possible backing-up.
+	 *
+	 * When we actually see the EOF, we change the status to "new"
+	 * (via yyrestart()), so that the user can continue scanning by
+	 * just pointing yyin at a new input file.
+	 */
+#define YY_BUFFER_EOF_PENDING 2
+	};
+
+static YY_BUFFER_STATE yy_current_buffer = 0;
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ */
+#define YY_CURRENT_BUFFER yy_current_buffer
+
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+
+static int yy_n_chars;		/* number of characters read into yy_ch_buf */
+
+
+int yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = (char *) 0;
+static int yy_init = 1;		/* whether we need to initialize */
+static int yy_start = 0;	/* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin.  A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart YY_PROTO(( FILE *input_file ));
+
+void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
+void yy_load_buffer_state YY_PROTO(( void ));
+YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
+void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
+void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
+
+YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
+YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
+YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
+
+static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
+static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) YY_MAY_BE_UNUSED;
+static void yy_flex_free YY_PROTO(( void * ));
+
+#define yy_new_buffer yy_create_buffer
+
+#define yy_set_interactive(is_interactive) \
+	{ \
+	if ( ! yy_current_buffer ) \
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+	yy_current_buffer->yy_is_interactive = is_interactive; \
+	}
+
+#define yy_set_bol(at_bol) \
+	{ \
+	if ( ! yy_current_buffer ) \
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+	yy_current_buffer->yy_at_bol = at_bol; \
+	}
+
+#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
+
+
+#define yywrap() 1
+#define YY_SKIP_YYWRAP
+typedef unsigned char YY_CHAR;
+FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+typedef int yy_state_type;
+extern char *yytext;
+#define yytext_ptr yytext
+
+static yy_state_type yy_get_previous_state YY_PROTO(( void ));
+static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
+static int yy_get_next_buffer YY_PROTO(( void ));
+static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+	yytext_ptr = yy_bp; \
+	yyleng = (int) (yy_cp - yy_bp); \
+	yy_hold_char = *yy_cp; \
+	*yy_cp = '\0'; \
+	yy_c_buf_p = yy_cp;
+
+#define YY_NUM_RULES 43
+#define YY_END_OF_BUFFER 44
+static yyconst short int yy_accept[96] =
+    {   0,
+        0,    0,    0,    0,   44,   42,   33,   34,   18,   42,
+       42,   42,   42,   22,    4,   17,   24,    6,   16,   31,
+        7,   29,    8,   26,   15,    2,   13,   25,   30,   30,
+       30,   23,    5,   10,   21,   42,    3,   41,   39,   41,
+       41,   33,   34,   19,    0,   32,    0,    1,    0,   31,
+       29,   31,    0,   37,    0,   31,    0,   14,    9,   12,
+       30,   30,   30,   20,   40,   38,    0,   28,    0,   31,
+        0,   36,   31,    0,    0,   31,   30,   30,    0,    0,
+       31,   30,   27,    0,   11,    0,    0,    0,    0,    0,
+        0,    0,    0,   35,    0
+
+    } ;
+
+static yyconst int yy_ec[256] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    2,    4,    5,    6,    1,    1,    7,    8,    9,
+       10,   11,   12,   13,   14,   15,   16,   17,   17,   17,
+       17,   17,   17,   17,   17,   17,   17,   18,   19,   20,
+       21,   22,   23,    1,   24,   25,   25,   25,   26,   27,
+       25,   25,   25,   25,   25,   28,   25,   25,   25,   25,
+       25,   29,   30,   31,   32,   25,   25,   25,   25,   25,
+       33,    1,   34,   35,   36,    1,   25,   25,   37,   38,
+
+       39,   25,   25,   25,   40,   25,   25,   41,   25,   42,
+       25,   25,   25,   25,   25,   25,   43,   25,   25,   25,
+       25,   25,   44,   45,   46,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1
+    } ;
+
+static yyconst int yy_meta[47] =
+    {   0,
+        1,    1,    2,    1,    3,    1,    1,    4,    1,    1,
+        1,    1,    1,    1,    1,    1,    5,    1,    1,    1,
+        1,    1,    1,    5,    5,    5,    5,    5,    5,    5,
+        5,    5,    1,    1,    1,    5,    5,    5,    5,    5,
+        5,    5,    5,    1,    1,    1
+    } ;
+
+static yyconst short int yy_base[103] =
+    {   0,
+        0,    0,   44,   45,  158,  159,  155,    0,  135,  150,
+      114,  146,    0,  159,  159,  159,  159,  159,   34,   33,
+       41,   47,  159,  159,  131,  130,  129,  159,    0,  125,
+      119,  159,  159,  159,  159,  102,  159,  159,  159,  130,
+      134,  142,    0,  159,  138,  159,  100,  159,  133,   37,
+       51,   41,   57,  159,  137,   53,   70,  159,  159,  159,
+        0,  111,  106,  159,  159,  159,   98,  159,  117,  109,
+      116,  159,   68,   79,   97,   89,   75,   78,   62,   85,
+       84,   74,    0,   56,    0,   57,   44,   79,   73,    0,
+       60,   86,   95,  159,  159,  107,  112,  117,  122,   48,
+
+      127,  132
+    } ;
+
+static yyconst short int yy_def[103] =
+    {   0,
+       95,    1,   96,   96,   95,   95,   95,   97,   95,   98,
+       95,   95,   99,   95,   95,   95,   95,   95,   95,   95,
+       95,   95,   95,   95,   95,   95,   95,   95,  100,  100,
+      100,   95,   95,   95,   95,   95,   95,   95,   95,   95,
+       95,   95,   97,   95,   98,   95,   95,   95,   95,   95,
+       95,   95,   95,   95,  101,   95,   95,   95,   95,   95,
+      100,  100,  100,   95,   95,   95,   95,   95,   95,   95,
+      101,   95,   95,   95,   95,   95,  100,  100,   95,   95,
+       95,  100,  100,   95,  100,   95,   95,   95,   95,  102,
+      102,   95,   95,   95,    0,   95,   95,   95,   95,   95,
+
+       95,   95
+    } ;
+
+static yyconst short int yy_nxt[206] =
+    {   0,
+        6,    7,    8,    9,   10,   11,   12,   13,   14,   15,
+       16,   17,   18,   19,   20,   21,   22,   23,   24,   25,
+       26,   27,   28,   29,   29,   29,   30,   29,   29,   29,
+       31,   29,   32,   33,   34,    6,   29,   29,   29,   29,
+       29,   29,   29,   35,   36,   37,   39,   39,   50,   52,
+       51,   54,   61,   52,   40,   40,   55,   52,   53,   41,
+       41,   56,   53,   51,   92,   56,   53,   51,   69,   73,
+       69,   53,   57,   70,   89,   53,   57,   90,   74,   53,
+       89,   75,   88,   75,   73,   57,   76,   93,   94,   57,
+       80,   74,   80,   74,   87,   81,   93,   94,   86,   85,
+
+       81,   81,   84,   83,   82,   76,   74,   38,   38,   38,
+       38,   38,   43,   76,   43,   43,   43,   45,   72,   45,
+       45,   45,   49,   49,   49,   70,   49,   71,   71,   71,
+       71,   71,   91,   70,   79,   91,   91,   78,   77,   72,
+       68,   67,   46,   42,   66,   65,   64,   63,   62,   60,
+       59,   58,   48,   47,   46,   44,   42,   95,    5,   95,
+       95,   95,   95,   95,   95,   95,   95,   95,   95,   95,
+       95,   95,   95,   95,   95,   95,   95,   95,   95,   95,
+       95,   95,   95,   95,   95,   95,   95,   95,   95,   95,
+       95,   95,   95,   95,   95,   95,   95,   95,   95,   95,
+
+       95,   95,   95,   95,   95
+    } ;
+
+static yyconst short int yy_chk[206] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    3,    4,   19,   20,
+       19,   21,  100,   50,    3,    4,   21,   52,   20,    3,
+        4,   22,   50,   22,   91,   51,   52,   51,   53,   56,
+       53,   20,   22,   53,   89,   50,   51,   89,   56,   52,
+       88,   57,   87,   57,   73,   22,   57,   92,   92,   51,
+       74,   56,   74,   73,   86,   74,   93,   93,   84,   82,
+
+       81,   80,   79,   78,   77,   76,   73,   96,   96,   96,
+       96,   96,   97,   75,   97,   97,   97,   98,   71,   98,
+       98,   98,   99,   99,   99,   70,   99,  101,  101,  101,
+      101,  101,  102,   69,   67,  102,  102,   63,   62,   55,
+       49,   47,   45,   42,   41,   40,   36,   31,   30,   27,
+       26,   25,   12,   11,   10,    9,    7,    5,   95,   95,
+       95,   95,   95,   95,   95,   95,   95,   95,   95,   95,
+       95,   95,   95,   95,   95,   95,   95,   95,   95,   95,
+       95,   95,   95,   95,   95,   95,   95,   95,   95,   95,
+       95,   95,   95,   95,   95,   95,   95,   95,   95,   95,
+
+       95,   95,   95,   95,   95
+    } ;
+
+static yy_state_type yy_last_accepting_state;
+static char *yy_last_accepting_cpos;
+
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *yytext;
+
+#define INITIAL 0
+
+//
+// File:	$URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/tbox/Scanner.C $
+// Package:	SAMRAI toolbox
+// Copyright:	(c) 1997-2010 Lawrence Livermore National Security, LLC
+
+
+// Description:	Lex scanner description for the SAMRAI input database
+//
+
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Parser.h"
+
+#include <stdlib.h>
+#include <string>
+using namespace std;
+
+#define YY_NEVER_INTERACTIVE 1
+#define YY_NO_UNPUT 1
+
+using namespace SAMRAI;
+using namespace tbox;
+
+struct KeyData;
+#include "Grammar.h"
+
+#define YY_INPUT(b,r,s) r = Parser::getParser()->yyinput(b, s)
+
+#define TOKEN(T) {						\
+   Parser::getParser()->advanceCursor(yytext);	\
+   return(T);							\
+}
+
+#define MAXIMUM_INCLUDE_DEPTH 16
+static YY_BUFFER_STATE s_include_stack[MAXIMUM_INCLUDE_DEPTH];
+static int s_include_stack_top = 0;
+
+#define COMMENT 1
+
+
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap YY_PROTO(( void ));
+#else
+extern int yywrap YY_PROTO(( void ));
+#endif
+#endif
+
+#ifndef YY_NO_UNPUT
+static void yyunput YY_PROTO(( int c, char *buf_ptr ));
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput YY_PROTO(( void ));
+#else
+static int input YY_PROTO(( void ));
+#endif
+#endif
+
+#ifdef YY_STACK_USED
+static int yy_start_stack_ptr = 0;
+static int yy_start_stack_depth = 0;
+static int *yy_start_stack = 0;
+#ifndef YY_NO_PUSH_STATE
+static void yy_push_state YY_PROTO(( int new_state ));
+#endif
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state YY_PROTO(( void ));
+#endif
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state YY_PROTO(( void ));
+#endif
+
+#else
+#define YY_NO_PUSH_STATE 1
+#define YY_NO_POP_STATE 1
+#define YY_NO_TOP_STATE 1
+#endif
+
+#ifdef YY_MALLOC_DECL
+YY_MALLOC_DECL
+#else
+#if __STDC__
+#ifndef __cplusplus
+#include <stdlib.h>
+#endif
+#else
+/* Just try to get by without declaring the routines.  This will fail
+ * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
+ * or sizeof(void*) != sizeof(int).
+ */
+#endif
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
+#endif
+
+/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+	if ( yy_current_buffer->yy_is_interactive ) \
+		{ \
+		int c = '*', n; \
+		for ( n = 0; n < max_size && \
+			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+			buf[n] = (char) c; \
+		if ( c == '\n' ) \
+			buf[n++] = (char) c; \
+		if ( c == EOF && ferror( yyin ) ) \
+			YY_FATAL_ERROR( "input in flex scanner failed" ); \
+		result = n; \
+		} \
+	else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
+		  && ferror( yyin ) ) \
+		YY_FATAL_ERROR( "input in flex scanner failed" );
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL int yylex YY_PROTO(( void ))
+#endif
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+	YY_USER_ACTION
+
+YY_DECL
+	{
+	register yy_state_type yy_current_state;
+	register char *yy_cp = NULL, *yy_bp = NULL;
+	register int yy_act;
+
+
+
+
+
+
+	if ( yy_init )
+		{
+		yy_init = 0;
+
+#ifdef YY_USER_INIT
+		YY_USER_INIT;
+#endif
+
+		if ( ! yy_start )
+			yy_start = 1;	/* first start state */
+
+		if ( ! yyin )
+			yyin = stdin;
+
+		if ( ! yyout )
+			yyout = stdout;
+
+		if ( ! yy_current_buffer )
+			yy_current_buffer =
+				yy_create_buffer( yyin, YY_BUF_SIZE );
+
+		yy_load_buffer_state();
+		}
+
+	while ( 1 )		/* loops until end-of-file is reached */
+		{
+		yy_cp = yy_c_buf_p;
+
+		/* Support of yytext. */
+		*yy_cp = yy_hold_char;
+
+		/* yy_bp points to the position in yy_ch_buf of the start of
+		 * the current run.
+		 */
+		yy_bp = yy_cp;
+
+		yy_current_state = yy_start;
+yy_match:
+		do
+			{
+			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+			if ( yy_accept[yy_current_state] )
+				{
+				yy_last_accepting_state = yy_current_state;
+				yy_last_accepting_cpos = yy_cp;
+				}
+			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+				{
+				yy_current_state = (int) yy_def[yy_current_state];
+				if ( yy_current_state >= 96 )
+					yy_c = yy_meta[(unsigned int) yy_c];
+				}
+			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+			++yy_cp;
+			}
+		while ( yy_base[yy_current_state] != 159 );
+
+yy_find_action:
+		yy_act = yy_accept[yy_current_state];
+		if ( yy_act == 0 )
+			{ /* have to back up */
+			yy_cp = yy_last_accepting_cpos;
+			yy_current_state = yy_last_accepting_state;
+			yy_act = yy_accept[yy_current_state];
+			}
+
+		YY_DO_BEFORE_ACTION
+
+
+do_action:	/* This label is used only to access EOF actions. */
+
+
+		switch ( yy_act )
+	{ /* beginning of action switch */
+			case 0: /* must back up */
+			/* undo the effects of YY_DO_BEFORE_ACTION */
+			*yy_cp = yy_hold_char;
+			yy_cp = yy_last_accepting_cpos;
+			yy_current_state = yy_last_accepting_state;
+			goto yy_find_action;
+
+case 1:
+YY_RULE_SETUP
+
+TOKEN(T_AND) 
+	YY_BREAK
+case 2:
+YY_RULE_SETUP
+
+TOKEN(T_ASSIGN)
+	YY_BREAK
+case 3:
+YY_RULE_SETUP
+
+TOKEN(T_CLOSE_CURLY)
+	YY_BREAK
+case 4:
+YY_RULE_SETUP
+
+TOKEN(T_CLOSE_PAREN)
+	YY_BREAK
+case 5:
+YY_RULE_SETUP
+
+TOKEN(T_CLOSE_SQBKT)
+	YY_BREAK
+case 6:
+YY_RULE_SETUP
+
+TOKEN(T_COMMA)
+	YY_BREAK
+case 7:
+YY_RULE_SETUP
+
+TOKEN(T_DIV) 
+	YY_BREAK
+case 8:
+YY_RULE_SETUP
+
+TOKEN(T_ELSE)
+	YY_BREAK
+case 9:
+YY_RULE_SETUP
+
+TOKEN(T_EQUALS)
+	YY_BREAK
+case 10:
+YY_RULE_SETUP
+
+TOKEN(T_EXP) 
+	YY_BREAK
+case 11:
+YY_RULE_SETUP
+
+TOKEN(T_FALSE)
+	YY_BREAK
+case 12:
+YY_RULE_SETUP
+
+TOKEN(T_GREATER_EQUALS)
+	YY_BREAK
+case 13:
+YY_RULE_SETUP
+
+TOKEN(T_GREATER)
+	YY_BREAK
+case 14:
+YY_RULE_SETUP
+
+TOKEN(T_LESS_EQUALS)
+	YY_BREAK
+case 15:
+YY_RULE_SETUP
+
+TOKEN(T_LESS)
+	YY_BREAK
+case 16:
+YY_RULE_SETUP
+
+TOKEN(T_MINUS) 
+	YY_BREAK
+case 17:
+YY_RULE_SETUP
+
+TOKEN(T_MULT) 
+	YY_BREAK
+case 18:
+YY_RULE_SETUP
+
+TOKEN(T_NOT) 
+	YY_BREAK
+case 19:
+YY_RULE_SETUP
+
+TOKEN(T_NOT_EQUALS)
+	YY_BREAK
+case 20:
+YY_RULE_SETUP
+
+TOKEN(T_OR) 
+	YY_BREAK
+case 21:
+YY_RULE_SETUP
+
+TOKEN(T_OPEN_CURLY) 
+	YY_BREAK
+case 22:
+YY_RULE_SETUP
+
+TOKEN(T_OPEN_PAREN) 
+	YY_BREAK
+case 23:
+YY_RULE_SETUP
+
+TOKEN(T_OPEN_SQBKT)
+	YY_BREAK
+case 24:
+YY_RULE_SETUP
+
+TOKEN(T_PLUS) 
+	YY_BREAK
+case 25:
+YY_RULE_SETUP
+
+TOKEN(T_QUESTION)
+	YY_BREAK
+case 26:
+YY_RULE_SETUP
+
+TOKEN(T_SEMI)
+	YY_BREAK
+case 27:
+YY_RULE_SETUP
+
+TOKEN(T_TRUE)
+	YY_BREAK
+case 28:
+YY_RULE_SETUP
+
+{
+   Parser::getParser()->advanceCursor(yytext);
+   SAMRAI_yylval.u_char = yytext[1];
+   return(T_CHAR);
+}
+	YY_BREAK
+case 29:
+YY_RULE_SETUP
+
+{
+   Parser::getParser()->advanceCursor(yytext);
+   SAMRAI_yylval.u_integer = atol(yytext);
+   return(T_INTEGER);
+}
+	YY_BREAK
+case 30:
+YY_RULE_SETUP
+
+{
+   Parser::getParser()->advanceCursor(yytext);
+   SAMRAI_yylval.u_keyword = new string(yytext);
+   return(T_KEYWORD);
+}
+	YY_BREAK
+case 31:
+YY_RULE_SETUP
+
+{
+   Parser::getParser()->advanceCursor(yytext);
+   SAMRAI_yylval.u_double = atof(yytext);
+   return(T_DOUBLE);
+}
+	YY_BREAK
+case 32:
+YY_RULE_SETUP
+
+{
+   Parser::getParser()->advanceCursor(yytext);
+   string s(yytext);
+   SAMRAI_yylval.u_string = new string(s.substr(1,s.length()-2));
+   return(T_STRING);
+}
+	YY_BREAK
+case 33:
+YY_RULE_SETUP
+
+{
+   Parser::getParser()->advanceCursor(yytext);
+}
+	YY_BREAK
+case 34:
+YY_RULE_SETUP
+
+{
+   Parser::getParser()->setLine(yytext+1);
+   Parser::getParser()->advanceLine();
+   yyless(1);
+}
+	YY_BREAK
+case 35:
+YY_RULE_SETUP
+
+{
+   string s(yytext);
+   string::size_type start = s.find("\"")+1;
+   string::size_type end   = s.rfind("\"")-1;
+
+   string filename(s, start, end-start+1);
+
+   if (s_include_stack_top >= MAXIMUM_INCLUDE_DEPTH) {
+      Parser::getParser()->error("Too many nested #include statements");
+      Parser::getParser()->advanceLine();
+   } else {
+      if (Parser::getParser()->pushIncludeFile(filename)) {
+         s_include_stack[s_include_stack_top++] = YY_CURRENT_BUFFER;
+         yy_switch_to_buffer(yy_create_buffer(NULL,YY_BUF_SIZE));
+      }
+   }
+}
+	YY_BREAK
+case 36:
+YY_RULE_SETUP
+
+{
+   Parser::getParser()->advanceLine();
+}
+	YY_BREAK
+case 37:
+YY_RULE_SETUP
+
+{
+   Parser::getParser()->advanceCursor(yytext);
+   BEGIN COMMENT;
+}
+	YY_BREAK
+case 38:
+YY_RULE_SETUP
+
+{
+   Parser::getParser()->advanceCursor(yytext);
+   Parser::getParser()->warning("``/*'' found within comment");
+}
+	YY_BREAK
+case 39:
+YY_RULE_SETUP
+
+{
+   Parser::getParser()->advanceLine();
+}
+	YY_BREAK
+case 40:
+YY_RULE_SETUP
+
+{
+   Parser::getParser()->advanceCursor(yytext);
+   BEGIN INITIAL;
+}
+	YY_BREAK
+case YY_STATE_EOF(COMMENT):
+
+{
+   Parser::getParser()->warning("EOF detected within comment");
+   yy_delete_buffer(YY_CURRENT_BUFFER);
+   yyterminate();
+}
+	YY_BREAK
+case 41:
+YY_RULE_SETUP
+
+{
+   Parser::getParser()->advanceCursor(yytext);
+}
+	YY_BREAK
+case 42:
+YY_RULE_SETUP
+
+{
+   Parser::getParser()->advanceCursor(yytext); 
+   Parser::getParser()->warning("Illegal character token in input");
+   return(yytext[0]);
+}
+	YY_BREAK
+case YY_STATE_EOF(INITIAL):
+
+{
+   yy_delete_buffer(YY_CURRENT_BUFFER);
+   if (s_include_stack_top == 0) {
+      yyterminate();
+   } else {
+      yy_switch_to_buffer(s_include_stack[--s_include_stack_top]);
+      Parser::getParser()->popIncludeFile();
+      Parser::getParser()->advanceLine();
+   }
+}
+	YY_BREAK
+case 43:
+YY_RULE_SETUP
+
+ECHO;
+	YY_BREAK
+
+
+	case YY_END_OF_BUFFER:
+		{
+		/* Amount of text matched not including the EOB char. */
+		int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
+
+		/* Undo the effects of YY_DO_BEFORE_ACTION. */
+		*yy_cp = yy_hold_char;
+		YY_RESTORE_YY_MORE_OFFSET
+
+		if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
+			{
+			/* We're scanning a new file or input source.  It's
+			 * possible that this happened because the user
+			 * just pointed yyin at a new source and called
+			 * yylex().  If so, then we have to assure
+			 * consistency between yy_current_buffer and our
+			 * globals.  Here is the right place to do so, because
+			 * this is the first action (other than possibly a
+			 * back-up) that will match for the new input source.
+			 */
+			yy_n_chars = yy_current_buffer->yy_n_chars;
+			yy_current_buffer->yy_input_file = yyin;
+			yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
+			}
+
+		/* Note that here we test for yy_c_buf_p "<=" to the position
+		 * of the first EOB in the buffer, since yy_c_buf_p will
+		 * already have been incremented past the NUL character
+		 * (since all states make transitions on EOB to the
+		 * end-of-buffer state).  Contrast this with the test
+		 * in input().
+		 */
+		if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+			{ /* This was really a NUL. */
+			yy_state_type yy_next_state;
+
+			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
+
+			yy_current_state = yy_get_previous_state();
+
+			/* Okay, we're now positioned to make the NUL
+			 * transition.  We couldn't have
+			 * yy_get_previous_state() go ahead and do it
+			 * for us because it doesn't know how to deal
+			 * with the possibility of jamming (and we don't
+			 * want to build jamming into it because then it
+			 * will run more slowly).
+			 */
+
+			yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+			yy_bp = yytext_ptr + YY_MORE_ADJ;
+
+			if ( yy_next_state )
+				{
+				/* Consume the NUL. */
+				yy_cp = ++yy_c_buf_p;
+				yy_current_state = yy_next_state;
+				goto yy_match;
+				}
+
+			else
+				{
+				yy_cp = yy_c_buf_p;
+				goto yy_find_action;
+				}
+			}
+
+		else switch ( yy_get_next_buffer() )
+			{
+			case EOB_ACT_END_OF_FILE:
+				{
+				yy_did_buffer_switch_on_eof = 0;
+
+				if ( yywrap() )
+					{
+					/* Note: because we've taken care in
+					 * yy_get_next_buffer() to have set up
+					 * yytext, we can now set up
+					 * yy_c_buf_p so that if some total
+					 * hoser (like flex itself) wants to
+					 * call the scanner after we return the
+					 * YY_NULL, it'll still work - another
+					 * YY_NULL will get returned.
+					 */
+					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
+
+					yy_act = YY_STATE_EOF(YY_START);
+					goto do_action;
+					}
+
+				else
+					{
+					if ( ! yy_did_buffer_switch_on_eof )
+						YY_NEW_FILE;
+					}
+				break;
+				}
+
+			case EOB_ACT_CONTINUE_SCAN:
+				yy_c_buf_p =
+					yytext_ptr + yy_amount_of_matched_text;
+
+				yy_current_state = yy_get_previous_state();
+
+				yy_cp = yy_c_buf_p;
+				yy_bp = yytext_ptr + YY_MORE_ADJ;
+				goto yy_match;
+
+			case EOB_ACT_LAST_MATCH:
+				yy_c_buf_p =
+				&yy_current_buffer->yy_ch_buf[yy_n_chars];
+
+				yy_current_state = yy_get_previous_state();
+
+				yy_cp = yy_c_buf_p;
+				yy_bp = yytext_ptr + YY_MORE_ADJ;
+				goto yy_find_action;
+			}
+		break;
+		}
+
+	default:
+		YY_FATAL_ERROR(
+			"fatal flex scanner internal error--no action found" );
+	} /* end of action switch */
+		} /* end of scanning one token */
+	} /* end of yylex */
+
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ *	EOB_ACT_LAST_MATCH -
+ *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ *	EOB_ACT_END_OF_FILE - end of file
+ */
+
+static int yy_get_next_buffer()
+	{
+	register char *dest = yy_current_buffer->yy_ch_buf;
+	register char *source = yytext_ptr;
+	register int number_to_move, i;
+	int ret_val;
+
+	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
+		YY_FATAL_ERROR(
+		"fatal flex scanner internal error--end of buffer missed" );
+
+	if ( yy_current_buffer->yy_fill_buffer == 0 )
+		{ /* Don't try to fill the buffer, so this is an EOF. */
+		if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
+			{
+			/* We matched a single character, the EOB, so
+			 * treat this as a final EOF.
+			 */
+			return EOB_ACT_END_OF_FILE;
+			}
+
+		else
+			{
+			/* We matched some text prior to the EOB, first
+			 * process it.
+			 */
+			return EOB_ACT_LAST_MATCH;
+			}
+		}
+
+	/* Try to read more data. */
+
+	/* First move last chars to start of buffer. */
+	number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
+
+	for ( i = 0; i < number_to_move; ++i )
+		*(dest++) = *(source++);
+
+	if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+		/* don't do the read, it's not guaranteed to return an EOF,
+		 * just force an EOF
+		 */
+		yy_current_buffer->yy_n_chars = yy_n_chars = 0;
+
+	else
+		{
+		int num_to_read =
+			yy_current_buffer->yy_buf_size - number_to_move - 1;
+
+		while ( num_to_read <= 0 )
+			{ /* Not enough room in the buffer - grow it. */
+#ifdef YY_USES_REJECT
+			YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+#else
+
+			/* just a shorter name for the current buffer */
+			YY_BUFFER_STATE b = yy_current_buffer;
+
+			int yy_c_buf_p_offset =
+				(int) (yy_c_buf_p - b->yy_ch_buf);
+
+			if ( b->yy_is_our_buffer )
+				{
+				int new_size = b->yy_buf_size * 2;
+
+				if ( new_size <= 0 )
+					b->yy_buf_size += b->yy_buf_size / 8;
+				else
+					b->yy_buf_size *= 2;
+
+				b->yy_ch_buf = (char *)
+					/* Include room in for 2 EOB chars. */
+					yy_flex_realloc( (void *) b->yy_ch_buf,
+							 b->yy_buf_size + 2 );
+				}
+			else
+				/* Can't grow it, we don't own it. */
+				b->yy_ch_buf = 0;
+
+			if ( ! b->yy_ch_buf )
+				YY_FATAL_ERROR(
+				"fatal error - scanner input buffer overflow" );
+
+			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+			num_to_read = yy_current_buffer->yy_buf_size -
+						number_to_move - 1;
+#endif
+			}
+
+		if ( num_to_read > YY_READ_BUF_SIZE )
+			num_to_read = YY_READ_BUF_SIZE;
+
+		/* Read in more data. */
+		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
+			yy_n_chars, num_to_read );
+
+		yy_current_buffer->yy_n_chars = yy_n_chars;
+		}
+
+	if ( yy_n_chars == 0 )
+		{
+		if ( number_to_move == YY_MORE_ADJ )
+			{
+			ret_val = EOB_ACT_END_OF_FILE;
+			yyrestart( yyin );
+			}
+
+		else
+			{
+			ret_val = EOB_ACT_LAST_MATCH;
+			yy_current_buffer->yy_buffer_status =
+				YY_BUFFER_EOF_PENDING;
+			}
+		}
+
+	else
+		ret_val = EOB_ACT_CONTINUE_SCAN;
+
+	yy_n_chars += number_to_move;
+	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
+	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
+
+	yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
+
+	return ret_val;
+	}
+
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+static yy_state_type yy_get_previous_state()
+	{
+	register yy_state_type yy_current_state;
+	register char *yy_cp;
+
+	yy_current_state = yy_start;
+
+	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
+		{
+		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+		if ( yy_accept[yy_current_state] )
+			{
+			yy_last_accepting_state = yy_current_state;
+			yy_last_accepting_cpos = yy_cp;
+			}
+		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+			{
+			yy_current_state = (int) yy_def[yy_current_state];
+			if ( yy_current_state >= 96 )
+				yy_c = yy_meta[(unsigned int) yy_c];
+			}
+		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+		}
+
+	return yy_current_state;
+	}
+
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ *	next_state = yy_try_NUL_trans( current_state );
+ */
+
+#ifdef YY_USE_PROTOS
+static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
+#else
+static yy_state_type yy_try_NUL_trans( yy_current_state )
+yy_state_type yy_current_state;
+#endif
+	{
+	register int yy_is_jam;
+	register char *yy_cp = yy_c_buf_p;
+
+	register YY_CHAR yy_c = 1;
+	if ( yy_accept[yy_current_state] )
+		{
+		yy_last_accepting_state = yy_current_state;
+		yy_last_accepting_cpos = yy_cp;
+		}
+	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+		{
+		yy_current_state = (int) yy_def[yy_current_state];
+		if ( yy_current_state >= 96 )
+			yy_c = yy_meta[(unsigned int) yy_c];
+		}
+	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+	yy_is_jam = (yy_current_state == 95);
+
+	return yy_is_jam ? 0 : yy_current_state;
+	}
+
+
+#ifndef YY_NO_UNPUT
+#ifdef YY_USE_PROTOS
+static void yyunput( int c, register char *yy_bp )
+#else
+static void yyunput( c, yy_bp )
+int c;
+register char *yy_bp;
+#endif
+	{
+	register char *yy_cp = yy_c_buf_p;
+
+	/* undo effects of setting up yytext */
+	*yy_cp = yy_hold_char;
+
+	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+		{ /* need to shift things up to make room */
+		/* +2 for EOB chars. */
+		register int number_to_move = yy_n_chars + 2;
+		register char *dest = &yy_current_buffer->yy_ch_buf[
+					yy_current_buffer->yy_buf_size + 2];
+		register char *source =
+				&yy_current_buffer->yy_ch_buf[number_to_move];
+
+		while ( source > yy_current_buffer->yy_ch_buf )
+			*--dest = *--source;
+
+		yy_cp += (int) (dest - source);
+		yy_bp += (int) (dest - source);
+		yy_current_buffer->yy_n_chars =
+			yy_n_chars = yy_current_buffer->yy_buf_size;
+
+		if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+			YY_FATAL_ERROR( "flex scanner push-back overflow" );
+		}
+
+	*--yy_cp = (char) c;
+
+
+	yytext_ptr = yy_bp;
+	yy_hold_char = *yy_cp;
+	yy_c_buf_p = yy_cp;
+	}
+#endif	/* ifndef YY_NO_UNPUT */
+
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput()
+#else
+static int input()
+#endif
+	{
+	int c;
+
+	*yy_c_buf_p = yy_hold_char;
+
+	if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
+		{
+		/* yy_c_buf_p now points to the character we want to return.
+		 * If this occurs *before* the EOB characters, then it's a
+		 * valid NUL; if not, then we've hit the end of the buffer.
+		 */
+		if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+			/* This was really a NUL. */
+			*yy_c_buf_p = '\0';
+
+		else
+			{ /* need more input */
+			int offset = yy_c_buf_p - yytext_ptr;
+			++yy_c_buf_p;
+
+			switch ( yy_get_next_buffer() )
+				{
+				case EOB_ACT_LAST_MATCH:
+					/* This happens because yy_g_n_b()
+					 * sees that we've accumulated a
+					 * token and flags that we need to
+					 * try matching the token before
+					 * proceeding.  But for input(),
+					 * there's no matching to consider.
+					 * So convert the EOB_ACT_LAST_MATCH
+					 * to EOB_ACT_END_OF_FILE.
+					 */
+
+					/* Reset buffer status. */
+					yyrestart( yyin );
+
+					/* fall through */
+
+				case EOB_ACT_END_OF_FILE:
+					{
+					if ( yywrap() )
+						return EOF;
+
+					if ( ! yy_did_buffer_switch_on_eof )
+						YY_NEW_FILE;
+#ifdef __cplusplus
+					return yyinput();
+#else
+					return input();
+#endif
+					}
+
+				case EOB_ACT_CONTINUE_SCAN:
+					yy_c_buf_p = yytext_ptr + offset;
+					break;
+				}
+			}
+		}
+
+	c = *(unsigned char *) yy_c_buf_p;	/* cast for 8-bit char's */
+	*yy_c_buf_p = '\0';	/* preserve yytext */
+	yy_hold_char = *++yy_c_buf_p;
+
+
+	return c;
+	}
+#endif /* YY_NO_INPUT */
+
+#ifdef YY_USE_PROTOS
+void yyrestart( FILE *input_file )
+#else
+void yyrestart( input_file )
+FILE *input_file;
+#endif
+	{
+	if ( ! yy_current_buffer )
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+
+	yy_init_buffer( yy_current_buffer, input_file );
+	yy_load_buffer_state();
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+#else
+void yy_switch_to_buffer( new_buffer )
+YY_BUFFER_STATE new_buffer;
+#endif
+	{
+	if ( yy_current_buffer == new_buffer )
+		return;
+
+	if ( yy_current_buffer )
+		{
+		/* Flush out information for old buffer. */
+		*yy_c_buf_p = yy_hold_char;
+		yy_current_buffer->yy_buf_pos = yy_c_buf_p;
+		yy_current_buffer->yy_n_chars = yy_n_chars;
+		}
+
+	yy_current_buffer = new_buffer;
+	yy_load_buffer_state();
+
+	/* We don't actually know whether we did this switch during
+	 * EOF (yywrap()) processing, but the only time this flag
+	 * is looked at is after yywrap() is called, so it's safe
+	 * to go ahead and always set it.
+	 */
+	yy_did_buffer_switch_on_eof = 1;
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yy_load_buffer_state( void )
+#else
+void yy_load_buffer_state()
+#endif
+	{
+	yy_n_chars = yy_current_buffer->yy_n_chars;
+	yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
+	yyin = yy_current_buffer->yy_input_file;
+	yy_hold_char = *yy_c_buf_p;
+	}
+
+
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
+#else
+YY_BUFFER_STATE yy_create_buffer( file, size )
+FILE *file;
+int size;
+#endif
+	{
+	YY_BUFFER_STATE b;
+
+	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+	b->yy_buf_size = size;
+
+	/* yy_ch_buf has to be 2 characters longer than the size given because
+	 * we need to put in 2 end-of-buffer characters.
+	 */
+	b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
+	if ( ! b->yy_ch_buf )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+	b->yy_is_our_buffer = 1;
+
+	yy_init_buffer( b, file );
+
+	return b;
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yy_delete_buffer( YY_BUFFER_STATE b )
+#else
+void yy_delete_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+	{
+	if ( ! b )
+		return;
+
+	if ( b == yy_current_buffer )
+		yy_current_buffer = (YY_BUFFER_STATE) 0;
+
+	if ( b->yy_is_our_buffer )
+		yy_flex_free( (void *) b->yy_ch_buf );
+
+	yy_flex_free( (void *) b );
+	}
+
+
+
+#ifdef YY_USE_PROTOS
+void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
+#else
+void yy_init_buffer( b, file )
+YY_BUFFER_STATE b;
+FILE *file;
+#endif
+
+
+	{
+	yy_flush_buffer( b );
+
+	b->yy_input_file = file;
+	b->yy_fill_buffer = 1;
+
+#ifdef YY_ALWAYS_INTERACTIVE
+	b->yy_is_interactive = 1;
+#else
+#if YY_NEVER_INTERACTIVE
+	b->yy_is_interactive = 0;
+#else
+	b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+#endif
+#endif
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yy_flush_buffer( YY_BUFFER_STATE b )
+#else
+void yy_flush_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+
+	{
+	if ( ! b )
+		return;
+
+	b->yy_n_chars = 0;
+
+	/* We always need two end-of-buffer characters.  The first causes
+	 * a transition to the end-of-buffer state.  The second causes
+	 * a jam in that state.
+	 */
+	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+	b->yy_buf_pos = &b->yy_ch_buf[0];
+
+	b->yy_at_bol = 1;
+	b->yy_buffer_status = YY_BUFFER_NEW;
+
+	if ( b == yy_current_buffer )
+		yy_load_buffer_state();
+	}
+
+
+#ifndef YY_NO_SCAN_BUFFER
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
+#else
+YY_BUFFER_STATE yy_scan_buffer( base, size )
+char *base;
+yy_size_t size;
+#endif
+	{
+	YY_BUFFER_STATE b;
+
+	if ( size < 2 ||
+	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
+	     base[size-1] != YY_END_OF_BUFFER_CHAR )
+		/* They forgot to leave room for the EOB's. */
+		return 0;
+
+	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+
+	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
+	b->yy_buf_pos = b->yy_ch_buf = base;
+	b->yy_is_our_buffer = 0;
+	b->yy_input_file = 0;
+	b->yy_n_chars = b->yy_buf_size;
+	b->yy_is_interactive = 0;
+	b->yy_at_bol = 1;
+	b->yy_fill_buffer = 0;
+	b->yy_buffer_status = YY_BUFFER_NEW;
+
+	yy_switch_to_buffer( b );
+
+	return b;
+	}
+#endif
+
+
+#ifndef YY_NO_SCAN_STRING
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
+#else
+YY_BUFFER_STATE yy_scan_string( yy_str )
+yyconst char *yy_str;
+#endif
+	{
+	int len;
+	for ( len = 0; yy_str[len]; ++len )
+	do {} while(0);
+
+	return yy_scan_bytes( yy_str, len );
+	}
+#endif
+
+
+#ifndef YY_NO_SCAN_BYTES
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
+#else
+YY_BUFFER_STATE yy_scan_bytes( bytes, len )
+yyconst char *bytes;
+int len;
+#endif
+	{
+	YY_BUFFER_STATE b;
+	char *buf;
+	yy_size_t n;
+	int i;
+
+	/* Get memory for full buffer, including space for trailing EOB's. */
+	n = len + 2;
+	buf = (char *) yy_flex_alloc( n );
+	if ( ! buf )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+	for ( i = 0; i < len; ++i )
+		buf[i] = bytes[i];
+
+	buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
+
+	b = yy_scan_buffer( buf, n );
+	if ( ! b )
+		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+
+	/* It's okay to grow etc. this buffer, and we should throw it
+	 * away when we're done.
+	 */
+	b->yy_is_our_buffer = 1;
+
+	return b;
+	}
+#endif
+
+
+#ifndef YY_NO_PUSH_STATE
+#ifdef YY_USE_PROTOS
+static void yy_push_state( int new_state )
+#else
+static void yy_push_state( new_state )
+int new_state;
+#endif
+	{
+	if ( yy_start_stack_ptr >= yy_start_stack_depth )
+		{
+		yy_size_t new_size;
+
+		yy_start_stack_depth += YY_START_STACK_INCR;
+		new_size = yy_start_stack_depth * sizeof( int );
+
+		if ( ! yy_start_stack )
+			yy_start_stack = (int *) yy_flex_alloc( new_size );
+
+		else
+			yy_start_stack = (int *) yy_flex_realloc(
+					(void *) yy_start_stack, new_size );
+
+		if ( ! yy_start_stack )
+			YY_FATAL_ERROR(
+			"out of memory expanding start-condition stack" );
+		}
+
+	yy_start_stack[yy_start_stack_ptr++] = YY_START;
+
+	BEGIN(new_state);
+	}
+#endif
+
+
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state()
+	{
+	if ( --yy_start_stack_ptr < 0 )
+		YY_FATAL_ERROR( "start-condition stack underflow" );
+
+	BEGIN(yy_start_stack[yy_start_stack_ptr]);
+	}
+#endif
+
+
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state()
+	{
+	return yy_start_stack[yy_start_stack_ptr - 1];
+	}
+#endif
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+#ifdef YY_USE_PROTOS
+static void yy_fatal_error( yyconst char msg[] )
+#else
+static void yy_fatal_error( msg )
+char msg[];
+#endif
+	{
+	(void) fprintf( stderr, "%s\n", msg );
+	exit( YY_EXIT_FAILURE );
+	}
+
+
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+		yytext[yyleng] = yy_hold_char; \
+		yy_c_buf_p = yytext + n; \
+		yy_hold_char = *yy_c_buf_p; \
+		*yy_c_buf_p = '\0'; \
+		yyleng = n; \
+		} \
+	while ( 0 )
+
+
+/* Internal utility routines. */
+
+#ifndef yytext_ptr
+#ifdef YY_USE_PROTOS
+static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
+#else
+static void yy_flex_strncpy( s1, s2, n )
+char *s1;
+yyconst char *s2;
+int n;
+#endif
+	{
+	register int i;
+	for ( i = 0; i < n; ++i )
+		s1[i] = s2[i];
+	}
+#endif
+
+#ifdef YY_NEED_STRLEN
+#ifdef YY_USE_PROTOS
+static int yy_flex_strlen( yyconst char *s )
+#else
+static int yy_flex_strlen( s )
+yyconst char *s;
+#endif
+	{
+	register int n;
+	for ( n = 0; s[n]; ++n )
+	do {} while(0);
+
+	return n;
+	}
+#endif
+
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_alloc( yy_size_t size )
+#else
+static void *yy_flex_alloc( size )
+yy_size_t size;
+#endif
+	{
+	return (void *) malloc( size );
+	}
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_realloc( void *ptr, yy_size_t size )
+#else
+static void *yy_flex_realloc( ptr, size )
+void *ptr;
+yy_size_t size;
+#endif
+	{
+	/* The cast to (char *) in the following accommodates both
+	 * implementations that use char* generic pointers, and those
+	 * that use void* generic pointers.  It works with the latter
+	 * because both ANSI C and C++ allow castless assignment from
+	 * any pointer type to void*, and deal with argument conversions
+	 * as though doing an assignment.
+	 */
+	return (void *) realloc( (char *) ptr, size );
+	}
+
+#ifdef YY_USE_PROTOS
+static void yy_flex_free( void *ptr )
+#else
+static void yy_flex_free( ptr )
+void *ptr;
+#endif
+	{
+	free( ptr );
+	}
+
+#ifdef YY_MAIN
+int main()
+	{
+	yylex();
+	return 0;
+	}
+#endif
+
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Scanner.l
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Scanner.l	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,191 @@
+%{
+//
+// File:	$URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/tbox/Scanner.l $
+// Package:	SAMRAI toolbox
+// Copyright:	(c) 1997-2010 Lawrence Livermore National Security, LLC
+// Revision:	$LastChangedRevision: 4081 $
+// Modified:	$LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+// Description:	Lex scanner description for the SAMRAI input database
+//
+
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Parser.h"
+
+#include <stdlib.h>
+#include <string>
+using namespace std;
+
+#define YY_NEVER_INTERACTIVE 1
+#define YY_NO_UNPUT 1
+
+using namespace SAMRAI;
+using namespace tbox;
+
+struct KeyData;
+#include "Grammar.h"
+
+#define YY_INPUT(b,r,s) r = Parser::getParser()->yyinput(b, s)
+
+#define TOKEN(T) {						\
+   Parser::getParser()->advanceCursor(yytext);	\
+   return(T);							\
+}
+
+#define MAXIMUM_INCLUDE_DEPTH 16
+static YY_BUFFER_STATE s_include_stack[MAXIMUM_INCLUDE_DEPTH];
+static int s_include_stack_top = 0;
+
+%}
+
+%option noyywrap
+%x COMMENT
+
+S_CHAR    (\'[^\']\')
+S_INTEGER ([-]?[0-9]+)
+S_KEYWORD ([a-zA-Z][a-zA-Z0-9_]*)
+S_DOUBLE  (([-]?[0-9]+"."[0-9]*([Ee][+-]?[0-9]+)?)|([-]?"."[0-9]*([Ee][+-]?[0-9]+)?)|([-]?[0-9]+([Ee][+-]?[0-9]+)))
+S_STRING  (\"([^\n"])*\")
+
+%%
+
+"&&"    TOKEN(T_AND) 
+"="     TOKEN(T_ASSIGN)
+"}"     TOKEN(T_CLOSE_CURLY)
+")"     TOKEN(T_CLOSE_PAREN)
+"]"     TOKEN(T_CLOSE_SQBKT)
+","     TOKEN(T_COMMA)
+"/"     TOKEN(T_DIV) 
+":"     TOKEN(T_ELSE)
+"=="    TOKEN(T_EQUALS)
+"^"     TOKEN(T_EXP) 
+"FALSE" TOKEN(T_FALSE)
+">="    TOKEN(T_GREATER_EQUALS)
+">"     TOKEN(T_GREATER)
+"<="    TOKEN(T_LESS_EQUALS)
+"<"     TOKEN(T_LESS)
+"-"     TOKEN(T_MINUS) 
+"*"     TOKEN(T_MULT) 
+"!"     TOKEN(T_NOT) 
+"!="    TOKEN(T_NOT_EQUALS)
+"||"    TOKEN(T_OR) 
+"{"     TOKEN(T_OPEN_CURLY) 
+"("     TOKEN(T_OPEN_PAREN) 
+"["     TOKEN(T_OPEN_SQBKT)
+"+"     TOKEN(T_PLUS) 
+"?"     TOKEN(T_QUESTION)
+";"     TOKEN(T_SEMI)
+"TRUE"  TOKEN(T_TRUE)
+
+{S_CHAR} {
+   Parser::getParser()->advanceCursor(yytext);
+   yylval.u_char = yytext[1];
+   return(T_CHAR);
+}
+
+{S_INTEGER} {
+   Parser::getParser()->advanceCursor(yytext);
+   yylval.u_integer = atol(yytext);
+   return(T_INTEGER);
+}
+
+{S_KEYWORD} {
+   Parser::getParser()->advanceCursor(yytext);
+   yylval.u_keyword = new string(yytext);
+   return(T_KEYWORD);
+}
+
+{S_DOUBLE} {
+   Parser::getParser()->advanceCursor(yytext);
+   yylval.u_double = atof(yytext);
+   return(T_DOUBLE);
+}
+
+{S_STRING} {
+   Parser::getParser()->advanceCursor(yytext);
+   string s(yytext);
+   yylval.u_string = new string(s.substr(1,s.length()-2));
+   return(T_STRING);
+}
+
+[ \t]+ {
+   Parser::getParser()->advanceCursor(yytext);
+}
+
+\n.* {
+   Parser::getParser()->setLine(yytext+1);
+   Parser::getParser()->advanceLine();
+   yyless(1);
+}
+
+"#include"[ \t]+\"[^\"\n]+\"[ \t]*\n {
+   string s(yytext);
+   string::size_type start = s.find("\"")+1;
+   string::size_type end   = s.rfind("\"")-1;
+
+   string filename(s, start, end-start+1);
+
+   if (s_include_stack_top >= MAXIMUM_INCLUDE_DEPTH) {
+      Parser::getParser()->error("Too many nested #include statements");
+      Parser::getParser()->advanceLine();
+   } else {
+      if (Parser::getParser()->pushIncludeFile(filename)) {
+         s_include_stack[s_include_stack_top++] = YY_CURRENT_BUFFER;
+         yy_switch_to_buffer(yy_create_buffer(NULL,YY_BUF_SIZE));
+      }
+   }
+}
+
+"//".*\n {
+   Parser::getParser()->advanceLine();
+}
+
+"/*" {
+   Parser::getParser()->advanceCursor(yytext);
+   BEGIN COMMENT;
+}
+
+<COMMENT>"/*" {
+   Parser::getParser()->advanceCursor(yytext);
+   Parser::getParser()->warning("``/*'' found within comment");
+}
+
+<COMMENT>\n {
+   Parser::getParser()->advanceLine();
+}
+
+<COMMENT>"*/" {
+   Parser::getParser()->advanceCursor(yytext);
+   BEGIN INITIAL;
+}
+
+<COMMENT><<EOF>> {
+   Parser::getParser()->warning("EOF detected within comment");
+   yy_delete_buffer(YY_CURRENT_BUFFER);
+   yyterminate();
+}
+
+<COMMENT>. {
+   Parser::getParser()->advanceCursor(yytext);
+}
+
+. {
+   Parser::getParser()->advanceCursor(yytext); 
+   Parser::getParser()->warning("Illegal character token in input");
+   return(yytext[0]);
+}
+
+<<EOF>> {
+   yy_delete_buffer(YY_CURRENT_BUFFER);
+   if (s_include_stack_top == 0) {
+      yyterminate();
+   } else {
+      yy_switch_to_buffer(s_include_stack[--s_include_stack_top]);
+      Parser::getParser()->popIncludeFile();
+      Parser::getParser()->advanceLine();
+   }
+}
+
+%%
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Schedule.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Schedule.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,642 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Schedule of communication transactions between processors 
+ *
+ ************************************************************************/
+#include "SAMRAI/tbox/Schedule.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/TimerManager.h"
+
+#include <cstring>
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+typedef List<Pointer<Transaction> >::Iterator Iterator;
+
+const int Schedule::s_default_first_tag = 0;
+const int Schedule::s_default_second_tag = 1;
+/*
+ * TODO: Set the default first message length to the maximum value
+ * possible without incurring any additional cost associated with the
+ * MPI communication.  This parameter should be dependent on the MPI
+ * implementation.
+ */
+const size_t Schedule::s_default_first_message_length = 1000;
+
+const std::string Schedule::s_default_timer_prefix("tbox::Schedule");
+std::map<std::string,Schedule::TimerStruct> Schedule::s_static_timers;
+
+tbox::StartupShutdownManager::Handler
+Schedule::s_initialize_finalize_handler(
+   Schedule::initializeCallback,
+   0,
+   0,
+   Schedule::finalizeCallback,
+   tbox::StartupShutdownManager::priorityTimers);
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+
+Schedule::Schedule():
+   d_coms(NULL),
+   d_com_stage(),
+   d_mpi(tbox::SAMRAI_MPI::getSAMRAIWorld()),
+   d_rank(-1),
+   d_first_tag(s_default_first_tag),
+   d_second_tag(s_default_second_tag),
+   d_first_message_length(s_default_first_message_length)
+{
+   d_rank = d_mpi.getRank();
+   setTimerPrefix("tbox::Schedule");
+}
+
+/*
+ *************************************************************************
+ * Note that the destructor should not be called during a communication
+ * phase.
+ *************************************************************************
+ */
+Schedule::~Schedule()
+{
+   if (d_coms != NULL) {
+      TBOX_ERROR("Destructing a schedule while communication is pending\n"
+         << "leads to lost messages.  Aborting.");
+   }
+}
+
+/*
+ *************************************************************************
+ * Add a transaction to the head of a list of data transactions in
+ * this schedule. The assignment of the transaction to a list depends
+ * on the source and destination processors of the transaction.
+ *************************************************************************
+ */
+void Schedule::addTransaction(
+   const Pointer<Transaction>& transaction)
+{
+   const int src_id = transaction->getSourceProcessor();
+   const int dst_id = transaction->getDestinationProcessor();
+
+   if ((d_rank == src_id) && (d_rank == dst_id)) {
+      d_local_set.addItem(transaction);
+   } else {
+      if (d_rank == dst_id) {
+         d_recv_sets[src_id].addItem(transaction);
+      } else if (d_rank == src_id) {
+         d_send_sets[dst_id].addItem(transaction);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ * Append a transaction to the tail of a list of data transactions in
+ * this schedule.  The assignment of the transaction to a list depends
+ * on the source and destination processors of the transaction.
+ *************************************************************************
+ */
+void Schedule::appendTransaction(
+   const Pointer<Transaction>& transaction)
+{
+   const int src_id = transaction->getSourceProcessor();
+   const int dst_id = transaction->getDestinationProcessor();
+
+   if ((d_rank == src_id) && (d_rank == dst_id)) {
+      d_local_set.appendItem(transaction);
+   } else {
+      if (d_rank == dst_id) {
+         d_recv_sets[src_id].appendItem(transaction);
+      } else if (d_rank == src_id) {
+         d_send_sets[dst_id].appendItem(transaction);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ * Access number of send transactions.
+ *************************************************************************
+ */
+int Schedule::getNumSendTransactions(
+   const int rank) const
+{
+   int size = 0;
+   TransactionSets::const_iterator mi = d_send_sets.find(rank);
+   if (mi != d_send_sets.end()) {
+      size = mi->second.size();
+   }
+   return size;
+}
+
+/*
+ *************************************************************************
+ * Access number of receive transactions.
+ *************************************************************************
+ */
+int Schedule::getNumRecvTransactions(
+   const int rank) const
+{
+   int size = 0;
+   TransactionSets::const_iterator mi = d_recv_sets.find(rank);
+   if (mi != d_recv_sets.end()) {
+      size = mi->second.size();
+   }
+   return size;
+}
+
+/*
+ *************************************************************************
+ * Access number of send transactions.
+ *************************************************************************
+ */
+int Schedule::getNumLocalTransactions() const
+{
+   return d_local_set.size();
+}
+
+/*
+ *************************************************************************
+ * Perform the communication described by the schedule.
+ *************************************************************************
+ */
+void Schedule::communicate()
+{
+   d_object_timers->t_communicate->start();
+   beginCommunication();
+   finalizeCommunication();
+   d_object_timers->t_communicate->stop();
+}
+
+/*
+ *************************************************************************
+ * Begin communication but do not wait for it to finish.  This routine
+ * posts receives, and sends outgoing messages.  Since we do not wait
+ * for message completion, use finalizeCommunication() to ensure that
+ * communication has finished.
+ *************************************************************************
+ */
+void Schedule::beginCommunication()
+{
+   d_object_timers->t_begin_communication->start();
+   allocateCommunicationObjects();
+   postReceives();
+   postSends();
+   d_object_timers->t_begin_communication->stop();
+}
+
+/*
+ *************************************************************************
+ * Perform the local data copies, complete receive operations and
+ * unpack received data into their destinations.
+ *************************************************************************
+ */
+void Schedule::finalizeCommunication()
+{
+   d_object_timers->t_finalize_communication->start();
+   performLocalCopies();
+   processCompletedCommunications();
+   deallocateCommunicationObjects();
+   d_object_timers->t_finalize_communication->stop();
+}
+
+/*
+ *************************************************************************
+ * Post receives.
+ *
+ * Where message lengths can be locally computed, use the correct
+ * message lengths to avoid overheads due to unknown lengths.
+ *************************************************************************
+ */
+void Schedule::postReceives()
+{
+   if (d_recv_sets.empty()) {
+      /*
+       * Short cut because some looping logic in this method assumes
+       * non-empty d_recv_sets.
+       */
+      return;
+   }
+
+   int rank = d_mpi.getRank();
+
+   /*
+    * We loop through d_recv_sets starting with the highest rank that
+    * is lower than local process.  We loop backwards, continuing at
+    * the opposite end when we run out of sets.  This ordering is in
+    * the reverse direction of the message send ordering so that a
+    * send posted earlier is paired with a receive that is also posted
+    * earlier.
+    */
+   tbox::AsyncCommPeer<char>* recv_coms = d_coms;
+
+   // Initialize iterators to where we want to start looping.
+   size_t icom = 0; // Index into recv_coms.
+   while (icom < d_recv_sets.size() &&
+          recv_coms[icom].getPeerRank() < rank) {
+      ++icom;
+   }
+   icom = icom > 0 ? icom - 1 : d_recv_sets.size() - 1;
+
+   // Map iterator mi corresponds to recv_coms[icom].
+   TransactionSets::const_iterator mi =
+      d_recv_sets.find(recv_coms[icom].getPeerRank());
+
+   for (size_t counter = 0;
+        counter < d_recv_sets.size();
+        ++counter, --mi, --icom) {
+
+      TBOX_ASSERT(mi->first == recv_coms[icom].getPeerRank());
+
+      // Compute incoming message size, if possible.
+      const List<Pointer<Transaction> >& transactions = mi->second;
+      unsigned int byte_count = 0;
+      bool can_estimate_incoming_message_size = true;
+      for (Iterator r(transactions); r; r++) {
+         if (!r()->canEstimateIncomingMessageSize()) {
+            can_estimate_incoming_message_size = false;
+            break;
+         }
+         byte_count +=
+            static_cast<unsigned int>(r()->computeIncomingMessageSize());
+      }
+
+      // Set AsyncCommPeer to receive known message length.
+      if (can_estimate_incoming_message_size) {
+         recv_coms[icom].limitFirstDataLength(byte_count);
+      }
+
+      // Begin non-blocking receive operation.
+      d_object_timers->t_post_receives->start();
+      recv_coms[icom].beginRecv();
+      if (recv_coms[icom].isDone()) {
+         d_completed_coms.push_back(&recv_coms[icom]);
+      }
+      d_object_timers->t_post_receives->stop();
+
+      if (mi == d_recv_sets.begin()) {
+         // Continue loop at the opposite end.
+         mi = d_recv_sets.end();
+         icom = d_recv_sets.size();
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ * Allocate the send buffer, pack the data, and initiate the message
+ * sends.
+ *************************************************************************
+ */
+void Schedule::postSends()
+{
+   d_object_timers->t_post_sends->start();
+   /*
+    * We loop through d_send_sets starting with the first set with
+    * rank higher than the local process, continuing at the opposite
+    * end when we run out of sets.  This ordering tends to spread out
+    * the communication traffic over the entire network to reduce the
+    * potential network contention.
+    */
+
+   int rank = d_mpi.getRank();
+
+   tbox::AsyncCommPeer<char>* send_coms = d_coms + d_recv_sets.size();
+
+   // Initialize iterators to where we want to start looping.
+   TransactionSets::const_iterator mi = d_send_sets.upper_bound(rank);
+   size_t icom = 0; // send_coms[icom] corresponds to mi.
+   while (icom < d_send_sets.size() &&
+          send_coms[icom].getPeerRank() < rank) {
+      ++icom;
+   }
+
+   for (size_t counter = 0;
+        counter < d_send_sets.size();
+        ++counter, ++mi, ++icom) {
+
+      if (mi == d_send_sets.end()) {
+         // Continue loop at the opposite end.
+         mi = d_send_sets.begin();
+         icom = 0;
+      }
+      TBOX_ASSERT(mi->first == send_coms[icom].getPeerRank());
+
+      // Compute message size and whether receiver can estimate it.
+      const List<Pointer<Transaction> >& transactions = mi->second;
+      size_t byte_count = 0;
+      bool can_estimate_incoming_message_size = true;
+      for (Iterator pack(transactions); pack; pack++) {
+         if (!pack()->canEstimateIncomingMessageSize()) {
+            can_estimate_incoming_message_size = false;
+         }
+         byte_count += pack()->computeOutgoingMessageSize();
+      }
+
+      // Pack outgoing data into a message.
+      MessageStream outgoing_stream(byte_count, MessageStream::Write);
+      d_object_timers->t_pack_stream->start();
+      for (Iterator pack(transactions); pack; pack++) {
+         pack()->packStream(outgoing_stream);
+      }
+      d_object_timers->t_pack_stream->stop();
+
+      if (can_estimate_incoming_message_size) {
+         // Receiver knows message size, so set it exactly.
+         send_coms[icom].limitFirstDataLength(byte_count);
+      }
+
+      // Begin non-blocking send operation.
+      send_coms[icom].beginSend(
+         (char *)outgoing_stream.getBufferStart(),
+         static_cast<int>(outgoing_stream.getCurrentSize()));
+      if (send_coms[icom].isDone()) {
+         d_completed_coms.push_back(&send_coms[icom]);
+      }
+   }
+
+   d_object_timers->t_post_sends->stop();
+}
+
+/*
+ *************************************************************************
+ * Perform all of the local memory-to-memory copies for this processor.
+ *************************************************************************
+ */
+void Schedule::performLocalCopies()
+{
+   d_object_timers->t_local_copies->start();
+   for (Iterator local(d_local_set); local; local++) {
+      local()->copyLocalData();
+   }
+   d_object_timers->t_local_copies->stop();
+}
+
+/*
+ *************************************************************************
+ * Process completed operations as they come in.  Initially, completed
+ * operations are placed in d_completed_comm.  Process these first,
+ * then check for next set of completed operations.  Repeat until all
+ * operations are completed.
+ *************************************************************************
+ */
+void Schedule::processCompletedCommunications()
+{
+   d_object_timers->t_process_incoming_messages->start();
+   do {
+
+      // Process completed communications in d_completed_coms.
+      for (size_t i = 0; i < d_completed_coms.size(); ++i) {
+         AsyncCommPeer<char>* completed_comm =
+            dynamic_cast<AsyncCommPeer<char> *>(d_completed_coms[i]);
+         TBOX_ASSERT(completed_comm != NULL);
+         TBOX_ASSERT(completed_comm->isDone());
+         if (static_cast<size_t>(completed_comm - d_coms) < d_recv_sets.size()) {
+
+            const int sender = completed_comm->getPeerRank();
+
+            // Copy message into stream.
+            MessageStream incoming_stream(completed_comm->getRecvSize(),
+                                          MessageStream::Read);
+            memcpy(
+               incoming_stream.getBufferStart(),
+               completed_comm->getRecvData(),
+               completed_comm->getRecvSize() * sizeof(char));
+            completed_comm->clearRecvData();
+
+            d_object_timers->t_unpack_stream->start();
+            for (Iterator recv(d_recv_sets[sender]); recv; recv++) {
+               recv()->unpackStream(incoming_stream);
+            }
+            d_object_timers->t_unpack_stream->stop();
+         } else {
+            // No further action required for completed send.
+         }
+      }
+
+      // Check for more completed communications.
+      d_completed_coms.clear();
+      d_com_stage.advanceSome(d_completed_coms);
+
+   } while (!d_completed_coms.empty());
+
+   d_object_timers->t_process_incoming_messages->stop();
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void Schedule::setMPITag(
+   const int tag0,
+   const int tag1)
+{
+   TBOX_ASSERT(tag0 >= 0);
+   TBOX_ASSERT(tag1 >= 0);
+   d_first_tag = tag0;
+   d_second_tag = tag1;
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void Schedule::setMPI(
+   const SAMRAI_MPI& mpi)
+{
+   d_mpi = mpi;
+   d_rank = mpi.getRank();
+}
+
+/*
+ *************************************************************************
+ * Allocate communication objects, set them up on the stage and get
+ * them ready to send/receive.
+ *************************************************************************
+ */
+void Schedule::allocateCommunicationObjects()
+{
+   const size_t length = d_recv_sets.size() + d_send_sets.size();
+   d_coms = new AsyncCommPeer<char>[length];
+   d_completed_coms.reserve(length);
+
+   size_t counter = 0;
+   for (TransactionSets::iterator ti = d_recv_sets.begin();
+        ti != d_recv_sets.end();
+        ++ti) {
+      d_coms[counter].initialize(&d_com_stage);
+      d_coms[counter].setPeerRank(ti->first);
+      d_coms[counter].setMPITag(d_first_tag, d_second_tag);
+      d_coms[counter].setMPI(d_mpi);
+      d_coms[counter].limitFirstDataLength(d_first_message_length);
+      ++counter;
+   }
+   for (TransactionSets::iterator ti = d_send_sets.begin();
+        ti != d_send_sets.end();
+        ++ti) {
+      d_coms[counter].initialize(&d_com_stage);
+      d_coms[counter].setPeerRank(ti->first);
+      d_coms[counter].setMPITag(d_first_tag, d_second_tag);
+      d_coms[counter].setMPI(d_mpi);
+      d_coms[counter].limitFirstDataLength(d_first_message_length);
+      ++counter;
+   }
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void Schedule::deallocateCommunicationObjects()
+{
+   delete[] d_coms;
+   d_coms = NULL;
+}
+
+/*
+ *************************************************************************
+ * Print class data to the specified output stream.
+ *************************************************************************
+ */
+void Schedule::printClassData(
+   std::ostream& stream) const
+{
+   stream << "Schedule::printClassData()" << std::endl;
+   stream << "-------------------------------" << std::endl;
+
+   stream << "Number of sends: " << d_send_sets.size() << std::endl;
+   stream << "Number of recvs: " << d_recv_sets.size() << std::endl;
+
+   for (TransactionSets::const_iterator ss = d_send_sets.begin();
+        ss != d_send_sets.end(); ++ss) {
+      const List<Pointer<Transaction> >& send_set = ss->second;
+      stream << "Send Set: " << ss->first << std::endl;
+      for (Iterator send(send_set); send; send++) {
+         send()->printClassData(stream);
+      }
+   }
+
+   for (TransactionSets::const_iterator rs = d_send_sets.begin();
+        rs != d_recv_sets.end(); ++rs) {
+      const List<Pointer<Transaction> >& recv_set = rs->second;
+      stream << "Recv Set: " << rs->first << std::endl;
+      for (Iterator recv(recv_set); recv; recv++) {
+         recv()->printClassData(stream);
+      }
+   }
+
+   stream << "Local Set" << std::endl;
+   for (Iterator local(d_local_set); local; local++) {
+      local()->printClassData(stream);
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void Schedule::setFirstMessageLength(
+   int first_message_length)
+{
+   TBOX_ASSERT(first_message_length > 0);
+   d_first_message_length = first_message_length;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void Schedule::setTimerPrefix(
+   const std::string& timer_prefix)
+{
+   std::map<std::string,TimerStruct>::iterator ti(
+      s_static_timers.find(timer_prefix));
+   if ( ti == s_static_timers.end() ) {
+      d_object_timers = &s_static_timers[timer_prefix];
+      getAllTimers(timer_prefix, *d_object_timers);
+   }
+   else {
+      d_object_timers = &(ti->second);
+   }
+   d_com_stage.setCommunicationWaitTimer(d_object_timers->t_MPI_wait);
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void Schedule::getAllTimers(
+   const std::string& timer_prefix,
+   TimerStruct &timers )
+{
+   timers.t_communicate = tbox::TimerManager::getManager()->
+      getTimer(timer_prefix + "::communicate()");
+   timers.t_begin_communication = tbox::TimerManager::getManager()->
+      getTimer(timer_prefix + "::beginCommunication()");
+   timers.t_finalize_communication = tbox::TimerManager::getManager()->
+      getTimer(timer_prefix + "::finalizeCommunication()");
+   timers.t_post_receives = tbox::TimerManager::getManager()->
+      getTimer(timer_prefix + "::postReceives()");
+   timers.t_post_sends = tbox::TimerManager::getManager()->
+      getTimer(timer_prefix + "::postSends()");
+   timers.t_process_incoming_messages = tbox::TimerManager::getManager()->
+      getTimer(timer_prefix + "::processIncomingMessages()");
+   timers.t_MPI_wait = tbox::TimerManager::getManager()->
+      getTimer(timer_prefix + "::MPI_wait");
+   timers.t_pack_stream = tbox::TimerManager::getManager()->
+      getTimer(timer_prefix + "::pack_stream");
+   timers.t_unpack_stream = tbox::TimerManager::getManager()->
+      getTimer(timer_prefix + "::unpack_stream");
+   timers.t_local_copies = tbox::TimerManager::getManager()->
+      getTimer(timer_prefix + "::performLocalCopies()");
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void Schedule::initializeCallback()
+{
+   TimerStruct &timers(s_static_timers[s_default_timer_prefix]);
+   getAllTimers(s_default_timer_prefix, timers);
+}
+
+/*
+ ***************************************************************************
+ * Release static timers.  To be called by shutdown registry to make sure
+ * memory for timers does not leak.
+ ***************************************************************************
+ */
+
+void Schedule::finalizeCallback()
+{
+   s_static_timers.clear();
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Unsuppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Schedule.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Schedule.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,400 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Schedule of communication transactions between processors 
+ *
+ ************************************************************************/
+#ifndef included_tbox_Schedule
+#define included_tbox_Schedule
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/AsyncCommPeer.h"
+#include "SAMRAI/tbox/AsyncCommStage.h"
+#include "SAMRAI/tbox/List.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/MessageStream.h"
+#include "SAMRAI/tbox/Transaction.h"
+
+#include <iostream>
+#include <map>
+
+namespace SAMRAI {
+namespace tbox {
+
+/*!
+ * @brief Class Schedule is used to construct and execute a set of
+ * data communication transactions.  Each transaction represents some
+ * data dependency and exchange between two processors, or locally
+ * involving a single processor.
+ *
+ * Once a communication schedule is constructed, transactions are
+ * provided to the schedule, using either the addTransaction() method
+ * or the appendTransaction() method.  The schedule is then executed
+ * forcing the communication, either interprocessor or local to occur.
+ * The basic idea behind the schedule is that it enables the cost of
+ * assembling communication dependencies and data transfers to be
+ * amortized over many communication phases.
+ *
+ * Note that since the transactions are stored in lists, the "add" and
+ * "append" mimick the semantics of the List class.  That is,
+ * addTransaction() will put the transaction at the head of the list,
+ * while appendTransaction() will put the transaction at the end of
+ * the list.  This flexibility is provided for situations where the
+ * order of transaction execution matters.  The transactions will be
+ * executed in the order in which they appear in the list.
+ *
+ * @see tbox::Transaction
+ * @see tbox::List
+ */
+
+class Schedule:public DescribedClass
+{
+public:
+   /*!
+    * @brief Create an empty schedule with no transactions.
+    */
+   Schedule();
+
+   /*!
+    * @brief The destructor deletes the schedule and all associated storage.
+    *
+    * Note that the schedule can not be deleted during a communication
+    * phase; this will result in an assertion being thrown.
+    */
+   virtual ~Schedule();
+
+   /*!
+    * @beief Add a data transaction to the head of the list of transactions
+    * in the schedule.
+    *
+    * The transaction must involve the local processor as either a
+    * source or destination or both.  If the transaction does not
+    * include the local processor, then the transaction is not placed
+    * on the schedule.
+    *
+    * @param transaction  Pointer to transaction added to the schedule.
+    */
+   void
+   addTransaction(
+      const Pointer<Transaction>& transaction);
+
+   /*!
+    * @brief Append a data transaction to the tail of the list of
+    * transactions in the schedule.
+    *
+    * The transaction must involve the local processor as either a
+    * source or destination or both.  If the transaction does not
+    * include the local processor, then the transaction will not be
+    * not placed on the schedule.
+    *
+    * @param transaction  Pointer to transaction appended to the schedule.
+    */
+   void
+   appendTransaction(
+      const Pointer<Transaction>& transaction);
+
+   /*!
+    * @brief Return number of send transactions in the schedule.
+    */
+   int
+   getNumSendTransactions(
+      const int rank) const;
+
+   /*!
+    * @brief Return number of receive transactions in the schedule.
+    */
+   int
+   getNumRecvTransactions(
+      const int rank) const;
+
+   /*!
+    * @brief Return number of local transactions (non-communicating)
+    * in the schedule.
+    */
+   int
+   getNumLocalTransactions() const;
+
+   /*!
+    * @brief Set the MPI communicator used for communication.
+    *
+    * By default the communicator returned by
+    * SAMRAI_MPI::getCommunicator() at the time the Schedule
+    * constructor is called is used.  This method may be used to
+    * override the default communicator.
+    */
+   void
+   setMPI(
+      const SAMRAI_MPI& mpi);
+
+   /*!
+    * @brief Specify MPI tag values to use in communication.
+    *
+    * If you are using MPI communicators that are not sufficiently
+    * isolated from other communications, you can specify distinct
+    * tags to avoid message mix-ups.  Up to two messages are sent from
+    * each communicating pairs.  Specify two distinct tags.
+    */
+   void
+   setMPITag(
+      const int first_tag,
+      const int second_tag);
+
+   /*!
+    * @brief Specify the message length (in bytes) used in the first
+    * message when the receiving processor cannot determine the
+    * message length.
+    *
+    * A receiving transaction cannot always determine the length of data
+    * it is receiving.  In this case, first a message of length
+    * first_message_length is sent.  The first message includes the full
+    * length of the data that is being sent so the receiver can
+    * determine if a second message, with the remainder of the data,
+    * is needed.  If the length of the data being sent is less than
+    * first_message_length, only a single message is sent.
+    *
+    * Setting a first_message_length too small creates the need for many
+    * second messages.  Setting it to an excessive length wastes memory.
+    *
+    * This two message protocol was designed based on the observed
+    * platform-dependent MPI implementation feature where a message of
+    * a small length takes the same time as sending an empty message.
+    * A protocol of sending the message length first and then a second
+    * message with the data does not exploit this property.  The
+    * message protocol SAMRAI uses of sending some small amount of
+    * data with the first message does exploit this property and will
+    * save the cost of always communicating two messages for small
+    * messages.  Currently SAMRAI does not attempt to automatically
+    * determine this message length however that may be added in
+    * future versions.
+    *
+    * first_message_length defaults to 1000.
+    *
+    * @param first_message_length length (in bytes) of first message
+    */
+   void
+   setFirstMessageLength(
+      int first_message_length);
+
+   /*!
+    * @brief Perform the communication described by the schedule.
+    *
+    * This method is simply a <TT>beginCommunication()</TT> followed by
+    * <TT>finalizeCommunication()</TT>.
+    */
+   void
+   communicate();
+
+   /*!
+    * @brief Begin the communication process but do not deliver data to the
+    * transaction objects.
+    *
+    * This method must be followed by a call to <TT>finalizeCommunication()</TT>
+    * in order to complete the communication.
+    */
+   void
+   beginCommunication();
+
+   /*!
+    * @brief Finish the communication and deliver the messages.
+    *
+    * This method must follow a communication begun by
+    * <TT>beginCommunication()</TT> and communication is completed
+    * when this method returns.
+    */
+   void
+   finalizeCommunication();
+
+   /*!
+    * @brief Setup names of timers.
+    *
+    * By default, timers are named "tbox::Schedule::*",
+    * where the third field is the specific steps performed
+    * by the Schedule.  You can override the first two
+    * fields with this method.  Conforming to the timer
+    * naming convention, timer_prefix should have the form
+    * "*::*".
+    */
+   void
+   setTimerPrefix(
+      const std::string& timer_prefix);
+
+   /*!
+    * @brief Print class data to the specified output stream.
+    */
+   void
+   printClassData(
+      std::ostream& stream) const;
+
+private:
+   void
+   allocateCommunicationObjects();
+   void
+   deallocateCommunicationObjects();
+
+   void
+   postReceives();
+   void
+   postSends();
+   void
+   performLocalCopies();
+   void
+   processCompletedCommunications();
+   void
+   deallocateSendBuffers();
+
+   Schedule(
+      const Schedule&);                 // not implemented
+   void
+   operator = (
+      const Schedule&);                 // not implemented
+
+   /*!
+    * @brief Set up things for the entire class.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   initializeCallback();
+
+   /*!
+    * Free static timers.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   finalizeCallback();
+
+   /*
+    * @brief Transactions in this schedule.
+    *
+    * Three containers of transactions are maintained based on
+    * source and destination.
+    */
+   typedef std::map<int, List<Pointer<Transaction> > > TransactionSets;
+   TransactionSets d_send_sets;
+   TransactionSets d_recv_sets;
+
+   /*
+    * @brief Transactions where the source and destination are the
+    * local process.
+    */
+   List<Pointer<Transaction> > d_local_set;
+
+   //@{ @name High-level asynchronous messages passing objects
+
+   /*!
+    * @brief Peer-to-peer communication objects, one for each outgoing
+    * and each incoming message.
+    *
+    * d_coms is typed for byte sending because our data is of
+    * unknown mixed type.
+    */
+   AsyncCommPeer<char>* d_coms;
+   /*!
+    * @brief Stage for advancing communication operations to
+    * completion.
+    */
+   AsyncCommStage d_com_stage;
+   /*!
+    * @brief Container of completed communication operations.
+    */
+   AsyncCommStage::MemberVec d_completed_coms;
+
+   //@}
+
+   /*!
+    * @brief MPI wrapper.
+    *
+    * See setMPI().
+    */
+   SAMRAI_MPI d_mpi;
+   /*!
+    * @brief Local MPI rank.
+    */
+   int d_rank;
+   /*!
+    * @brief Tag value for first message in schedule execution.
+    *
+    * See setMPITag().
+    */
+   int d_first_tag;
+   /*!
+    * @brief Tag value for second message in schedule execution.
+    *
+    * See setMPITag().
+    */
+   int d_second_tag;
+
+   /*!
+    * @brief If send message length is unknown, use
+    * d_first_message_length for the first message's data size.
+    */
+   size_t d_first_message_length;
+
+   static const int s_default_first_tag;
+   static const int s_default_second_tag;
+   static const size_t s_default_first_message_length;
+
+   //@{
+   //! @name Timer data for Schedule class.
+
+   /*
+    * @brief Structure of timers used by this class.
+    *
+    * Each Schedule object can set its own timer names through
+    * setTimerPrefix().  This leads to many timer look-ups.  Because
+    * it is expensive to look up timers, this class caches the timers
+    * that has been looked up.  Each TimerStruct stores the timers
+    * corresponding to a prefix.
+    */
+   struct TimerStruct {
+      tbox::Pointer<tbox::Timer> t_communicate;
+      tbox::Pointer<tbox::Timer> t_begin_communication;
+      tbox::Pointer<tbox::Timer> t_finalize_communication;
+      tbox::Pointer<tbox::Timer> t_post_receives;
+      tbox::Pointer<tbox::Timer> t_post_sends;
+      tbox::Pointer<tbox::Timer> t_process_incoming_messages;
+      tbox::Pointer<tbox::Timer> t_MPI_wait;
+      tbox::Pointer<tbox::Timer> t_pack_stream;
+      tbox::Pointer<tbox::Timer> t_unpack_stream;
+      tbox::Pointer<tbox::Timer> t_local_copies;
+   };
+
+   //! @brief Default prefix for Timers.
+   static const std::string s_default_timer_prefix;
+
+   /*!
+    * @brief Static container of timers that have been looked up.
+    */
+   static std::map<std::string,TimerStruct> s_static_timers;
+
+   /*!
+    * @brief Structure of timers in s_static_timers, matching this
+    * object's timer prefix.
+    */
+   TimerStruct *d_object_timers;
+
+   /*!
+    * @brief Get all the timers defined in TimerStruct.  The timers
+    * are named with the given prefix.
+    */
+   static void getAllTimers(
+      const std::string& timer_prefix,
+      TimerStruct &timers );
+
+   //@}
+
+   static tbox::StartupShutdownManager::Handler
+   s_initialize_finalize_handler;
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Serializable.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Serializable.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,75 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   An abstract base class for objects to be serialized 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_Serializable
+#define included_tbox_Serializable
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+/*!
+ * @brief Class Serializable is an abstract base class to provide
+ * database serialization for objects.
+ *
+ * Objects needing to serialize their data to a database implement the
+ * function putToDatabase(tbox::Pointer<tbox::Database>) specifying
+ * how to put its data members into the database instance.
+ *
+ * @note The interface asymmetric in that is no corresponding
+ * "getFromDatabase" function.  This stems from SAMRAI's historical
+ * restart procedure and object creation is object initialization
+ * pattern.  Thus restarting is done in the constructors for classes
+ * implementing Serializable not by an additional method.  The
+ * database used to restore state from is obtained via a
+ * getRootDatabase() call to the RestartManager.
+ *
+ * @note The derivation from DescribedClass is virtual.  The reason
+ * for this is to avoid dynamic casting problems for smart pointers.
+ * For some objects in SAMRAI, inheritance from Serializable
+ * introduces a class hierarchy that is distinct from the class
+ * hierarchy used to implement the class.  Pointers to base objects
+ * need to be dynamically cast to derived objects in either hierarchy.
+ */
+
+class Serializable:public virtual DescribedClass
+{
+public:
+   /*!
+    * Default constructor.
+    */
+   SAMRAI_INLINE_KEYWORD Serializable() {
+   }
+
+   /*!
+    * Virtual destructor
+    */
+   virtual ~Serializable() {
+   }
+
+   /*!
+    * @brief Serializes the object by writing necessary state to the
+    * specified database.  
+    * 
+    */
+   virtual void
+   putToDatabase(
+      Pointer<Database> database) = 0;
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/SiloDatabase.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/SiloDatabase.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1520 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A database structure that stores Silo format data. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#ifdef HAVE_SILO
+
+#include "SAMRAI/tbox/SiloDatabase.h"
+
+#include "SAMRAI/tbox/IOStream.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#include <vector>
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+/*
+ * Implementation notes.
+ *
+ * Silo allows only alphanumeric and "_" in directory names.  SAMRAI
+ * key names are mangled to remove other characters from keynames when
+ * put into the Silo database.
+ *
+ * Compound types in Silo have several listings in the directory
+ * structure.  Rather than unscramble the different entries the
+ * compound array types are stored in a subdirectory with that
+ * key name and the actual compound type is a variable in
+ * that subdirectory.
+ *
+ */
+
+namespace SAMRAI {
+namespace tbox {
+
+const std::string SiloDatabase::DATABASE_BOX_NAME = "/__box__";
+const std::string SiloDatabase::STRING_ARRAY_NAME = "/__string_array__";
+const std::string SiloDatabase::COMPLEX_ARRAY_NAME = "/__complex_array__";
+
+const std::string SiloDatabase::mangleID = "__U";
+
+bool SiloDatabase::IsValid(
+   int i)
+{
+   return isalnum(i) || i == '_' || i == '/';
+}
+
+std::string SiloDatabase::nameMangle(
+   std::string name) {
+   std::stringstream mangled_name;
+
+   for (std::string::size_type i = 0; i < name.size(); i++) {
+      if (IsValid(name[i])) {
+         mangled_name << name[i];
+      } else {
+         mangled_name << mangleID << std::hex << static_cast<int>(name[i]);
+      }
+   }
+
+   return mangled_name.str();
+}
+
+std::string SiloDatabase::nameDemangle(
+   std::string name) {
+
+   std::stringstream unmangled_name;
+   std::string::size_type start = 0;
+   std::string::size_type found_index = name.find(mangleID, start);
+
+   unmangled_name << name.substr(start, (found_index - start));
+
+   while (found_index != std::string::npos) {
+      int character;
+
+      std::stringstream hex_value(name.substr(
+                                     found_index + mangleID.length(), 2));
+      hex_value >> std::hex >> character;
+
+      unmangled_name << (char)character;
+
+      start = found_index + mangleID.length() + 2;
+      found_index = name.find(mangleID, start);
+
+      unmangled_name << name.substr(start, found_index - start);
+   }
+
+   return unmangled_name.str();
+}
+
+/*
+ * Public Silo database constructor creates an empty database with the
+ * specified name.  It sets the group_ID to a default value of -1.
+ * This data is used by member functions to track parent databases.
+ */
+SiloDatabase::SiloDatabase(
+   const std::string& name):
+   d_is_file(false),
+   d_file(NULL),
+   d_directory("/"),
+   d_database_name(name)
+{
+   TBOX_ASSERT(!name.empty());
+}
+
+/*
+ * Private Silo database constructor creates an empty database with the
+ * specified name.
+ */
+SiloDatabase::SiloDatabase(
+   const std::string& name,
+   DBfile* file,
+   const std::string& directory,
+   const bool create_in_file):
+   d_is_file(false),
+   d_file(file),
+   d_directory(directory),
+   d_database_name(name)
+{
+   TBOX_ASSERT(!name.empty());
+   TBOX_ASSERT(!directory.empty());
+   TBOX_ASSERT(file != NULL);
+
+   int err;
+
+   if (create_in_file) {
+      err = DBMkDir(d_file, nameMangle(d_directory).c_str());
+      if (err < 0) {
+         TBOX_ERROR("SiloDatabase MkDir failed " << d_directory << std::endl);
+      }
+   }
+}
+
+/*
+ * The database destructor closes the opened file.
+ */
+
+SiloDatabase::~SiloDatabase()
+{
+   if (d_is_file) {
+      close();
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create Silo data file specified by name.                              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool SiloDatabase::create(
+   const std::string& name)
+{
+   TBOX_ASSERT(!name.empty());
+
+   bool status = false;
+
+   if (d_file) {
+      close();
+   }
+
+   d_file = DBCreate(name.c_str(), DB_CLOBBER, DB_LOCAL, NULL, DB_PDB);
+
+   if (d_file == NULL) {
+
+      TBOX_ERROR("Unable to open Silo file " << name << "\n");
+      status = false;
+
+   } else {
+
+      d_is_file = true;
+      d_directory = "";
+      status = true;
+   }
+
+   return status;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Open Silo data file specified by name                                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool SiloDatabase::open(
+   const std::string& name)
+{
+   TBOX_ASSERT(!name.empty());
+
+   bool status = false;
+
+   if (d_file) {
+      close();
+   }
+
+   d_file = DBOpen(name.c_str(), DB_UNKNOWN, DB_READ);
+
+   if (d_file == NULL) {
+
+      TBOX_ERROR("Unable to open Silo file " << name << "\n");
+      status = false;
+
+   } else {
+
+      d_is_file = true;
+      d_directory = "/";
+      status = true;
+   }
+
+   return status;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Close the open Silo data file specified by d_file_id.                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool SiloDatabase::close()
+{
+   int err = 0;
+   if (d_is_file) {
+      err = DBClose(d_file);
+#ifdef ASSERT_SILO_RETURN_VALUES
+      TBOX_ASSERT(err >= 0);
+#endif
+      d_file = NULL;
+      d_is_file = false;
+   }
+
+   if (err >= 0) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+/*
+ *************************************************************************
+ * Attach to an already created Silo file.
+ *************************************************************************
+ */
+bool SiloDatabase::attachToFile(
+   DBfile* file,
+   const std::string& directory)
+{
+   bool status = false;
+
+   if (file != NULL) {
+      status = true;
+      d_is_file = false;
+      d_file = file;
+      d_directory = directory;
+
+      std::string path = nameMangle(d_directory);
+      if (!DBInqVarType(d_file, path.c_str()) == DB_DIR) {
+         int err = DBMkdir(d_file, path.c_str());
+         if (err < 0) {
+            TBOX_ERROR(
+               "SiloDatabase: MkDir failed " << d_directory << std::endl);
+         }
+      }
+
+   } else {
+      TBOX_ERROR("SiloDatabase: Invalid file supplied to attachToFile"
+         << std::endl);
+      status = false;
+   }
+
+   return status;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true if the key exists within the database; false otherwise.   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool SiloDatabase::keyExists(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   std::string path = d_directory + "/" + key;
+   path = nameMangle(path);
+
+   if (DBInqVarExists(d_file, path.c_str())) {
+      return true;
+   } else if (DBInqVarType(d_file, path.c_str()) == DB_DIR) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return all keys in the database.                                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+Array<std::string> SiloDatabase::getAllKeys()
+{
+   TBOX_ASSERT(!d_directory.empty());
+
+   std::string path = nameMangle(d_directory);
+
+   Array<std::string> tmp_keys;
+
+   DBObjectType var_type = DBInqVarType(d_file, path.c_str());
+   if (var_type == DB_DIR) {
+      char original_path[256];
+
+      DBGetDir(d_file, original_path);
+
+      DBSetDir(d_file, path.c_str());
+
+      DBtoc* toc = DBGetToc(d_file);
+
+      tmp_keys.resizeArray(toc->nvar + toc->ndir);
+
+      for (int i = 0; i < toc->nvar; i++) {
+         tmp_keys[i] = toc->var_names[i];
+      }
+
+      for (int i = 0; i < toc->ndir; i++) {
+         tmp_keys[i + toc->nvar] = toc->dir_names[i];
+      }
+
+      DBSetDir(d_file, original_path);
+   } else {
+      TBOX_ERROR("Not a database " << d_directory << std::endl);
+   }
+
+   return tmp_keys;
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Get the type of the array entry associated with the specified key	*
+ *									*
+ *************************************************************************
+ */
+enum Database::DataType SiloDatabase::getArrayType(
+   const std::string& key) {
+   TBOX_ASSERT(!key.empty());
+
+   enum Database::DataType type = Database::SAMRAI_INVALID;
+
+   std::string path = d_directory + "/" + key;
+   path = nameMangle(path);
+
+   DBObjectType var_type = DBInqVarType(d_file, path.c_str());
+
+   if (var_type == DB_VARIABLE) {
+      int obj_type = DBGetVarType(d_file, path.c_str());
+
+      switch (obj_type) {
+         case DB_INT:
+            type = Database::SAMRAI_INT;
+            break;
+         case DB_SHORT:
+            type = Database::SAMRAI_BOOL;
+            break;
+         case DB_FLOAT:
+            type = Database::SAMRAI_FLOAT;
+            break;
+         case DB_DOUBLE:
+            type = Database::SAMRAI_DOUBLE;
+            break;
+         case DB_CHAR:
+            type = Database::SAMRAI_CHAR;
+            break;
+      }
+   } else if (var_type == DB_DIR) {
+
+      // Note that some of the types are stored in subdirectories
+      // so check to see if this dir is one of the compound array types.
+      std::string sub_path = path + COMPLEX_ARRAY_NAME;
+      if (DBInqVarExists(d_file, sub_path.c_str())) {
+         DBcompoundarray* ca = DBGetCompoundarray(d_file, sub_path.c_str());
+         type = Database::SAMRAI_COMPLEX;
+         DBFreeCompoundarray(ca);
+      } else {
+         sub_path = path + STRING_ARRAY_NAME;
+         if (DBInqVarExists(d_file, sub_path.c_str())) {
+            DBcompoundarray* ca = DBGetCompoundarray(d_file, sub_path.c_str());
+            type = Database::SAMRAI_STRING;
+            DBFreeCompoundarray(ca);
+         } else {
+            sub_path = path + DATABASE_BOX_NAME;
+            if (DBInqVarExists(d_file, sub_path.c_str())) {
+               DBcompoundarray* ca = DBGetCompoundarray(d_file,
+                     sub_path.c_str());
+               type = Database::SAMRAI_BOX;
+               DBFreeCompoundarray(ca);
+            } else {
+               type = Database::SAMRAI_DATABASE;
+            }
+         }
+      }
+   } else {
+      // Unrecognized type return INVALID
+   }
+
+   return type;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return the size of the array associated with the key.  If the key     *
+ * does not exist, then zero is returned.                                *
+ * Array size is set based on the number of elements (points) within     *
+ * the dataspace defined by the named dataset (or key).                  *
+ *                                                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int SiloDatabase::getArraySize(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   int array_size = 0;
+
+   std::string path = d_directory + "/" + key;
+   path = nameMangle(path);
+
+   DBObjectType var_type = DBInqVarType(d_file, path.c_str());
+
+   if (var_type == DB_VARIABLE) {
+      array_size = getSiloSimpleTypeLength(key);
+   } else if (var_type == DB_DIR) {
+
+      // Note that some of the types are stored in subdirectories
+      // so check to see if this dir is one of the compound array types.
+
+      std::string sub_path = path + COMPLEX_ARRAY_NAME;
+      if (DBInqVarExists(d_file, sub_path.c_str())) {
+         DBcompoundarray* ca = DBGetCompoundarray(d_file, sub_path.c_str());
+         array_size = ca->elemlengths[0];
+         DBFreeCompoundarray(ca);
+      } else {
+         sub_path = path + STRING_ARRAY_NAME;
+         if (DBInqVarExists(d_file, sub_path.c_str())) {
+            DBcompoundarray* ca = DBGetCompoundarray(d_file, sub_path.c_str());
+            array_size = ca->nelems;
+            DBFreeCompoundarray(ca);
+         } else {
+            sub_path = path + DATABASE_BOX_NAME;
+            if (DBInqVarExists(d_file, sub_path.c_str())) {
+               DBcompoundarray* ca = DBGetCompoundarray(d_file,
+                     sub_path.c_str());
+               array_size = ca->elemlengths[0];
+               DBFreeCompoundarray(ca);
+            } else {
+               // Directory or some other unrecognized structure return 0
+            }
+         }
+      }
+   } else {
+      // Unrecognized type return 0
+   }
+
+   return array_size;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true or false depending on whether the specified key           *
+ * represents a database entry.  If the key does not exist, then false   *
+ * is returned.                                                          *
+ *************************************************************************
+ */
+
+bool SiloDatabase::isDatabase(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   return isSiloType(key, DB_DIR);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a new database with the specified key name.                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+Pointer<Database>
+SiloDatabase::putDatabase(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   Pointer<Database> new_database(new SiloDatabase(key,
+                                     d_file,
+                                     d_directory + "/" + key,
+                                     true));
+
+   TBOX_ASSERT(!new_database.isNull());
+
+   return new_database;
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Get the database with the specified key name.                        *
+ *                                                                      *
+ ************************************************************************
+ */
+
+Pointer<Database>
+SiloDatabase::getDatabase(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (!isDatabase(key)) {
+      TBOX_ERROR("SiloDatabase::getDatabase() error in database "
+         << d_database_name
+         << "\n    Key = " << key << " is not a database." << std::endl);
+   }
+
+   Pointer<Database> new_database(new SiloDatabase(key,
+                                     d_file,
+                                     d_directory + "/" + key,
+                                     false));
+
+   return new_database;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true or false depending on whether the specified key           *
+ * represents a boolean entry.  If the key does not exist, then false    *
+ * is returned.                                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool SiloDatabase::isBool(
+   const std::string& key)
+{
+   return isSiloSimpleType(key, DB_SHORT);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a boolean array entry in the database with the specified       *
+ * key name.                                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void SiloDatabase::putBoolArray(
+   const std::string& key,
+   const bool * const data,
+   const int nelements)
+{
+   TBOX_ASSERT(!key.empty());
+   TBOX_ASSERT(data != (bool *)NULL);
+
+   short temp_array[nelements];
+
+   for (int i = 0; i < nelements; i++) {
+      temp_array[i] = data[i];
+   }
+
+   putSiloSimpleType(key, temp_array, nelements, DB_SHORT);
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Two routines to get boolean arrays from the database with the        *
+ * specified key name. In any case, an error message is printed and     *
+ * the program exits if the specified key does not exist in the         *
+ * database or is not associated with a boolean type.                   *
+ *                                                                      *
+ ************************************************************************
+ */
+
+Array<bool> SiloDatabase::getBoolArray(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (!isBool(key)) {
+      TBOX_ERROR("SiloDatabase::getBoolArray() error in database "
+         << d_database_name << std::endl
+         << "    Key = " << key << " is not a bool array." << std::endl);
+   }
+
+   Array<bool> boolArray(getSiloSimpleTypeLength(key));
+
+   short temp_array[getSiloSimpleTypeLength(key)];
+
+   getSiloSimpleType(key, temp_array);
+
+   for (int i = 0; i < getSiloSimpleTypeLength(key); i++) {
+      boolArray[i] = temp_array[i];
+   }
+
+   return boolArray;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true or false depending on whether the specified key           *
+ * represents a box entry.  If the key does not exist, then false        *
+ * is returned.                                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool SiloDatabase::isDatabaseBox(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   bool is_type = false;
+
+   std::string path = d_directory + "/" + key;
+   path = nameMangle(path);
+
+   DBObjectType obj_type = DBInqVarType(d_file, path.c_str());
+   if (obj_type == DB_DIR) {
+
+      path += DATABASE_BOX_NAME;
+
+      DBcompoundarray* ca = DBGetCompoundarray(d_file, path.c_str());
+
+      if (ca != NULL) {
+         if (ca->datatype == DB_INT) {
+            is_type = true;
+         }
+      }
+
+      DBFreeCompoundarray(ca);
+   }
+
+   return is_type;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a box array entry in the database with the specified key name. *
+ *                                                                       *
+ *************************************************************************
+ */
+void SiloDatabase::putDatabaseBoxArray(
+   const std::string& key,
+   const DatabaseBox * const data,
+   const int nelements)
+{
+   TBOX_ASSERT(!key.empty());
+   TBOX_ASSERT(data != (DatabaseBox *)NULL);
+
+   const char* elemnames[3];
+   int elemlengths[3];
+
+   elemnames[0] = "dimension";
+   elemnames[1] = "hi";
+   elemnames[2] = "lo";
+
+   int size = 0;
+   for (int i = 0; i < nelements; i++) {
+      size += data[i].d_data.d_dimension;
+   }
+
+   elemlengths[0] = nelements;
+   elemlengths[1] = size;
+   elemlengths[2] = size;
+
+   Array<int> values(nelements + size * 2);
+
+   int offset = nelements;
+   for (int i = 0; i < nelements; i++) {
+      values[i] = data[i].d_data.d_dimension;
+      for (int d = 0; d < data[i].d_data.d_dimension; d++) {
+         values[offset] = data[i].d_data.d_lo[d];
+         values[offset + size] = data[i].d_data.d_hi[d];
+         offset++;
+      }
+   }
+
+   std::string path = d_directory + "/" + key;
+   path = nameMangle(path);
+
+   int err = DBMkdir(d_file, path.c_str());
+   if (err < 0) {
+      TBOX_ERROR("SiloDatabase: MkDir failed " << d_directory << std::endl);
+   }
+
+   path = d_directory + "/" + key + DATABASE_BOX_NAME;
+   path = nameMangle(path);
+
+   err = DBPutCompoundarray(d_file, path.c_str(),
+         const_cast<char **>(elemnames), elemlengths,
+         3, values.getPointer(), values.size(),
+         DB_INT, NULL);
+   if (err < 0) {
+      TBOX_ERROR(
+         "SiloDatabase: DBPutCompoundarray failed " << d_directory
+         << std::endl);
+   }
+
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Two routines to get box arrays from the database with the            *
+ * specified key name. In any case, an error message is printed and     *
+ * the program exits if the specified key does not exist in the         *
+ * database or is not associated with a box type.                       *
+ *                                                                      *
+ ************************************************************************
+ */
+
+Array<DatabaseBox> SiloDatabase::getDatabaseBoxArray(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   std::string path = d_directory + "/" + key + DATABASE_BOX_NAME;
+   path = nameMangle(path);
+
+   DBcompoundarray* ca = DBGetCompoundarray(d_file, path.c_str());
+
+   Array<DatabaseBox> boxArray(ca->elemlengths[0]);
+
+   int* values = static_cast<int *>(ca->values);
+   int offset = ca->elemlengths[0];
+   for (unsigned int i = 0; i < (ca->elemlengths[0]); i++) {
+      boxArray[i].d_data.d_dimension = values[i];
+      /*
+       * This preserves old behavior where boxes can be different dims but is
+       * likely not supported anywhere else in the library.
+       */
+      boxArray[i].setDim(tbox::Dimension((unsigned short)values[i]));
+      for (int d = 0; d < boxArray[i].d_data.d_dimension; d++) {
+         boxArray[i].d_data.d_lo[d] = values[offset];
+         boxArray[i].d_data.d_hi[d] = values[offset + ca->elemlengths[1]];
+         offset++;
+      }
+   }
+
+   DBFreeCompoundarray(ca);
+
+   return boxArray;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true or false depending on whether the specified key           *
+ * represents a char entry.  If the key does not exist, then false       *
+ * is returned.                                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool SiloDatabase::isChar(
+   const std::string& key)
+{
+   return isSiloSimpleType(key, DB_CHAR);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a char array entry in the database with the specified          *
+ * key name.                                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void SiloDatabase::putCharArray(
+   const std::string& key,
+   const char * const data,
+   const int nelements)
+{
+   TBOX_ASSERT(!key.empty());
+   TBOX_ASSERT(data != (char *)NULL);
+
+   putSiloSimpleType(key, data, nelements, DB_CHAR);
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Two routines to get char arrays from the database with the           *
+ * specified key name. In any case, an error message is printed and     *
+ * the program exits if the specified key does not exist in the         *
+ * database or is not associated with a char type.                      *
+ *                                                                      *
+ ************************************************************************
+ */
+
+Array<char> SiloDatabase::getCharArray(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (!isChar(key)) {
+      TBOX_ERROR("SiloDatabase::getCharArray() error in database "
+         << d_database_name << std::endl
+         << "    Key = " << key << " is not a char array." << std::endl);
+   }
+
+   Array<char> charArray(getSiloSimpleTypeLength(key));
+
+   getSiloSimpleType(key, charArray.getPointer());
+
+   return charArray;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true or false depending on whether the specified key           *
+ * represents a complex entry.  If the key does not exist, then false    *
+ * is returned.                                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool SiloDatabase::isComplex(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   bool is_type = false;
+
+   std::string path = d_directory + "/" + key;
+   path = nameMangle(path);
+
+   DBObjectType obj_type = DBInqVarType(d_file, path.c_str());
+   if (obj_type == DB_DIR) {
+
+      path += COMPLEX_ARRAY_NAME;
+
+      DBcompoundarray* ca = DBGetCompoundarray(d_file, path.c_str());
+
+      if (ca != NULL) {
+         if (ca->datatype == DB_DOUBLE) {
+            is_type = true;
+         }
+      }
+
+      DBFreeCompoundarray(ca);
+   }
+
+   return is_type;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a complex array entry in the database with the specified       *
+ * key name.                                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void SiloDatabase::putComplexArray(
+   const std::string& key,
+   const dcomplex * const data,
+   const int nelements)
+{
+   TBOX_ASSERT(!key.empty());
+   TBOX_ASSERT(data != (dcomplex *)NULL);
+
+   const char* elemnames[2];
+   Array<double> values(nelements * 2);
+   int elemlengths[2];
+
+   elemnames[0] = "real";
+   elemnames[1] = "imag";
+
+   elemlengths[0] = nelements;
+   elemlengths[1] = nelements;
+
+   for (int i = 0; i < nelements; i++) {
+      values[i] = data[i].real();
+      values[i + nelements] = data[i].imag();
+   }
+
+   std::string path = d_directory + "/" + key;
+   path = nameMangle(path);
+
+   int err = DBMkdir(d_file, path.c_str());
+   if (err < 0) {
+      TBOX_ERROR("SiloDatabase MkDir failed " << d_directory << std::endl);
+   }
+
+   path = d_directory + "/" + key + COMPLEX_ARRAY_NAME;
+   path = nameMangle(path);
+
+   err = DBPutCompoundarray(d_file, path.c_str(),
+         const_cast<char **>(elemnames), elemlengths, 2,
+         values.getPointer(), values.size(),
+         DB_DOUBLE, NULL);
+   if (err < 0) {
+      TBOX_ERROR(
+         "SiloDatabase DBPutCompoundarray failed " << d_directory
+         << std::endl);
+   }
+
+}
+/*
+ ************************************************************************
+ *                                                                      *
+ * Two routines to get complex arrays from the database with the        *
+ * specified key name. In any case, an error message is printed and     *
+ * the program exits if the specified key does not exist in the         *
+ * database or is not associated with a complex type.                   *
+ *                                                                      *
+ ************************************************************************
+ */
+
+Array<dcomplex> SiloDatabase::getComplexArray(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (!isComplex(key)) {
+      TBOX_ERROR("SiloDatabase::getComplexArray() error in database "
+         << d_database_name
+         << "\n    Key = " << key << " is not a complex array." << std::endl);
+   }
+
+   std::string path = d_directory + "/" + key + COMPLEX_ARRAY_NAME;
+   path = nameMangle(path);
+
+   DBcompoundarray* ca = DBGetCompoundarray(d_file, path.c_str());
+
+   Array<dcomplex> complexArray(ca->elemlengths[0]);
+
+   for (int i = 0; i < ca->elemlengths[0]; i++) {
+      complexArray[i] = dcomplex(static_cast<double *>(ca->values)[i],
+            static_cast<double *>(ca->values)[i + ca->elemlengths[0]]);
+   }
+
+   DBFreeCompoundarray(ca);
+
+   return complexArray;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true or false depending on whether the specified key           *
+ * represents a double entry.  If the key does not exist, then false     *
+ * is returned.                                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool SiloDatabase::isDouble(
+   const std::string& key)
+{
+   return isSiloSimpleType(key, DB_DOUBLE);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a double array entry in the database with the specified        *
+ * key name.                                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void SiloDatabase::putDoubleArray(
+   const std::string& key,
+   const double * const data,
+   const int nelements)
+{
+   TBOX_ASSERT(!key.empty());
+   TBOX_ASSERT(data != (double *)NULL);
+
+   putSiloSimpleType(key, data, nelements, DB_DOUBLE);
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Two routines to get double arrays from the database with the         *
+ * specified key name. In any case, an error message is printed and     *
+ * the program exits if the specified key does not exist in the         *
+ * database or is not associated with a double type.                    *
+ *                                                                      *
+ ************************************************************************
+ */
+
+Array<double> SiloDatabase::getDoubleArray(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (!isDouble(key)) {
+      TBOX_ERROR("SiloDatabase::getDoubleArray() error in database "
+         << d_database_name
+         << "\n    Key = " << key << " is not a double array." << std::endl);
+   }
+
+   Array<double> doubleArray(getSiloSimpleTypeLength(key));
+
+   getSiloSimpleType(key, doubleArray.getPointer());
+
+   return doubleArray;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true or false depending on whether the specified key           *
+ * represents a float entry.  If the key does not exist, then false      *
+ * is returned.                                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool SiloDatabase::isFloat(
+   const std::string& key)
+{
+   return isSiloSimpleType(key, DB_FLOAT);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a float array entry in the database with the specified         *
+ * key name.                                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void SiloDatabase::putFloatArray(
+   const std::string& key,
+   const float * const data,
+   const int nelements)
+{
+   TBOX_ASSERT(!key.empty());
+   TBOX_ASSERT(data != (float *)NULL);
+
+   putSiloSimpleType(key, data, nelements, DB_FLOAT);
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Two routines to get float arrays from the database with the          *
+ * specified key name. In any case, an error message is printed and     *
+ * the program exits if the specified key does not exist in the         *
+ * database or is not associated with a float type.                     *
+ *                                                                      *
+ ************************************************************************
+ */
+
+Array<float> SiloDatabase::getFloatArray(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (!isFloat(key)) {
+      TBOX_ERROR("SiloDatabase::getFloatArray() error in database "
+         << d_database_name << std::endl
+         << "    Key = " << key << " is not a float array." << std::endl);
+   }
+
+   Array<float> floatArray(getSiloSimpleTypeLength(key));
+
+   getSiloSimpleType(key, floatArray.getPointer());
+
+   return floatArray;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true or false depending on whether the specified key           *
+ * represents a integer entry.  If the key does not exist, then false    *
+ * is returned.                                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool SiloDatabase::isInteger(
+   const std::string& key)
+{
+   return isSiloSimpleType(key, DB_INT);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create an integer array entry in the database with the specified      *
+ * key name.                                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void SiloDatabase::putIntegerArray(
+   const std::string& key,
+   const int * const data,
+   const int nelements)
+{
+   TBOX_ASSERT(!key.empty());
+   TBOX_ASSERT(data != (int *)NULL);
+
+   putSiloSimpleType(key, data, nelements, DB_INT);
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Two routines to get integer arrays from the database with the        *
+ * specified key name. In any case, an error message is printed and     *
+ * the program exits if the specified key does not exist in the         *
+ * database or is not associated with a integer type.                   *
+ *                                                                      *
+ ************************************************************************
+ */
+
+Array<int> SiloDatabase::getIntegerArray(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (!isInteger(key)) {
+      TBOX_ERROR("SiloDatabase::getIntegerArray() error in database "
+         << d_database_name << std::endl
+         << "    Key = " << key << " is not a integer array." << std::endl);
+   }
+
+   Array<int> intArray(getSiloSimpleTypeLength(key));
+
+   getSiloSimpleType(key, intArray.getPointer());
+
+   return intArray;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return true or false depending on whether the specified key           *
+ * represents a string entry.  If the key does not exist, then false     *
+ * is returned.                                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool SiloDatabase::isString(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   bool is_type = false;
+
+   std::string path = d_directory + "/" + key;
+   path = nameMangle(path);
+
+   DBObjectType obj_type = DBInqVarType(d_file, path.c_str());
+   if (obj_type == DB_DIR) {
+
+      path += STRING_ARRAY_NAME;
+
+      DBcompoundarray* ca = DBGetCompoundarray(d_file, path.c_str());
+
+      if (ca != NULL) {
+         if (ca->datatype == DB_CHAR) {
+            is_type = true;
+         }
+      }
+
+      DBFreeCompoundarray(ca);
+   }
+
+   return is_type;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a double array entry in the database with the specified        *
+ * key name.                                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void SiloDatabase::putStringArray(
+   const std::string& key,
+   const std::string * const data,
+   const int nelements)
+{
+   TBOX_ASSERT(!key.empty());
+   TBOX_ASSERT(data != (std::string *)NULL);
+
+   std::vector<std::string> strings(nelements);
+   const char* elemnames[nelements];
+   std::string values;
+   int elemlengths[nelements];
+
+   for (int i = 0; i < nelements; i++) {
+      strings[i] = Utilities::intToString(i);
+      elemnames[i] = strings[i].c_str();
+      elemlengths[i] = static_cast<int>(data[i].size());
+      values.append(data[i]);
+   }
+
+   values.append("\0");
+
+   std::string path = d_directory + "/" + key;
+   path = nameMangle(path);
+
+   int err = DBMkdir(d_file, path.c_str());
+   if (err < 0) {
+      TBOX_ERROR("SiloDatabase DBMkdir failed " << d_directory << std::endl);
+   }
+
+   path = d_directory + "/" + key + STRING_ARRAY_NAME;
+   path = nameMangle(path);
+
+   DBPutCompoundarray(d_file, path.c_str(),
+      const_cast<char **>(elemnames), elemlengths,
+      nelements, const_cast<char *>(values.c_str()),
+      static_cast<int>(values.size() + 1),
+      DB_CHAR, NULL);
+   if (err < 0) {
+      TBOX_ERROR(
+         "SiloDatabase DBPutCompoundarray failed " << d_directory
+         << std::endl);
+   }
+
+}
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * Two routines to get string arrays from the database with the         *
+ * specified key name. In any case, an error message is printed and     *
+ * the program exits if the specified key does not exist in the         *
+ * database or is not associated with a string type.                    *
+ *                                                                      *
+ ************************************************************************
+ */
+
+Array<std::string> SiloDatabase::getStringArray(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   if (!isString(key)) {
+      TBOX_ERROR("SiloDatabase::getStringArray() error in database "
+         << d_database_name << std::endl
+         << "    Key = " << key << " is not a string array." << std::endl);
+   }
+
+   std::string path = d_directory + "/" + key + STRING_ARRAY_NAME;
+   path = nameMangle(path);
+
+   DBcompoundarray* ca = DBGetCompoundarray(d_file, path.c_str());
+
+   Array<std::string> stringArray(ca->nelems);
+
+   std::string values = static_cast<char *>(ca->values);
+
+   std::string::size_type start = 0;
+   for (int i = 0; i < ca->nelems; i++) {
+      stringArray[i] = values.substr(start, ca->elemlengths[i]);
+      start = start + ca->elemlengths[i];
+   }
+
+   DBFreeCompoundarray(ca);
+
+   return stringArray;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print contents of current database to the specified output stream.    *
+ * Note that contents of subdatabases will not be printed.  This must    *
+ * be done by iterating through all the subdatabases individually.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void SiloDatabase::printClassData(
+   std::ostream& os)
+{
+
+   Array<std::string> keys = getAllKeys();
+
+   if (keys.getSize() == 0) {
+      os << "Database named `" << d_database_name
+         << "' has zero keys..." << std::endl;
+   } else {
+      os << "Printing contents of database named `"
+         << d_database_name << "'..." << std::endl;
+   }
+
+   for (int i = 0; i < keys.getSize(); i++) {
+      switch (getArrayType(keys[i])) {
+         case Database::SAMRAI_INVALID: {
+            os << "   Data entry `" << keys[i] << "' is"
+                                               << " invalid" << std::endl;
+            break;
+         }
+         case Database::SAMRAI_DATABASE: {
+            os << "   Data entry `" << keys[i] << "' is"
+                                               << " a database" << std::endl;
+            break;
+         }
+         case Database::SAMRAI_BOOL: {
+            os << "   Data entry `" << keys[i] << "' is"
+                                               << " a boolean array"
+                                               << std::endl;
+            break;
+         }
+         case Database::SAMRAI_CHAR: {
+            os << "   Data entry `" << keys[i] << "' is"
+                                               << " a char array" << std::endl;
+            break;
+         }
+         case Database::SAMRAI_INT: {
+            os << "   Data entry `" << keys[i] << "' is"
+                                               << " a integer array"
+                                               << std::endl;
+            break;
+         }
+         case Database::SAMRAI_COMPLEX: {
+            os << "   Data entry `" << keys[i] << "' is"
+                                               << " a complex array"
+                                               << std::endl;
+            break;
+         }
+         case Database::SAMRAI_DOUBLE: {
+            os << "   Data entry `" << keys[i] << "' is"
+                                               << " a complex array"
+                                               << std::endl;
+            break;
+         }
+         case Database::SAMRAI_FLOAT: {
+            os << "   Data entry `" << keys[i] << "' is"
+                                               << " a float array" << std::endl;
+            break;
+         }
+         case Database::SAMRAI_STRING: {
+            os << "   Data entry `" << keys[i] << "' is"
+                                               << " a string array"
+                                               << std::endl;
+            break;
+         }
+         case Database::SAMRAI_BOX: {
+            os << "   Data entry `" << keys[i] << "' is"
+                                               << " a datbase box array"
+                                               << std::endl;
+            break;
+         }
+
+      }
+   }
+
+}
+
+bool SiloDatabase::isSiloType(
+   const std::string& key,
+   DBObjectType type)
+{
+   TBOX_ASSERT(!key.empty());
+
+   bool is_type = false;
+
+   std::string path = d_directory + "/" + key;
+   path = nameMangle(path);
+
+   DBObjectType obj_type = DBInqVarType(d_file, path.c_str());
+   if (obj_type == type) {
+      is_type = true;
+   }
+
+   return is_type;
+}
+
+bool SiloDatabase::isSiloSimpleType(
+   const std::string& key,
+   const int simple_type)
+{
+   TBOX_ASSERT(!key.empty());
+
+   bool is_type = false;
+
+   // First check to see if it is a variable, if so then check to
+   // see if it is the correct type of variable
+   if (isSiloType(key, DB_VARIABLE)) {
+      std::string path = d_directory + "/" + key;
+      path = nameMangle(path);
+      int obj_type = DBGetVarType(d_file, path.c_str());
+      if (obj_type == simple_type) {
+         is_type = true;
+      }
+   }
+
+   return is_type;
+}
+
+bool SiloDatabase::putSiloSimpleType(
+   const std::string& key,
+   const void* data,
+   const int nelements,
+   const int simple_type)
+{
+   TBOX_ASSERT(!key.empty());
+   TBOX_ASSERT(data != (float *)NULL);
+
+   int err;
+
+   std::string path = d_directory + "/" + key;
+   path = nameMangle(path);
+
+   int dims[1];
+   dims[0] = nelements;
+
+   err = DBWrite(d_file,
+         path.c_str(), const_cast<void *>(data), dims, 1, simple_type);
+   if (err < 0) {
+      TBOX_ERROR("SiloDatabase DBWrite failed " << key << std::endl);
+   }
+
+   return err < 0;
+}
+
+bool SiloDatabase::getSiloSimpleType(
+   const std::string& key,
+   void* data)
+{
+   TBOX_ASSERT(!key.empty());
+   TBOX_ASSERT(data != NULL);
+
+   int err;
+
+   std::string path = d_directory + "/" + key;
+   path = nameMangle(path);
+
+   err = DBReadVar(d_file, path.c_str(), data);
+   if (err < 0) {
+      TBOX_ERROR("SiloDatabase DBRead failed " << key << std::endl);
+   }
+
+   return err < 0;
+}
+
+int SiloDatabase::getSiloSimpleTypeLength(
+   const std::string& key)
+{
+   TBOX_ASSERT(!key.empty());
+
+   std::string path = d_directory + "/" + key;
+   path = nameMangle(path);
+
+   return DBGetVarLength(d_file, path.c_str());
+}
+
+std::string SiloDatabase::getName(
+   void)
+{
+   return d_database_name;
+}
+
+}
+}
+
+#endif
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Unsuppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/SiloDatabase.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/SiloDatabase.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,601 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A database structure that stores Silo format data. 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_SiloDatabase
+#define included_tbox_SiloDatabase
+
+#include "SAMRAI/SAMRAI_config.h"
+
+/*
+ ************************************************************************
+ *  THIS CLASS WILL BE UNDEFINED IF THE LIBRARY IS BUILT WITHOUT Silo
+ ************************************************************************
+ */
+#ifdef HAVE_SILO
+
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/DatabaseBox.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/List.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/PIO.h"
+
+#include "silo.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * Class SiloDatabase implements the interface of the Database
+ * class to store data in the Silo (Hierarchical Data Format) data format.
+ *
+ * It is assumed that all processors will access the database in the same
+ * manner.  Error reporting is done using the SAMRAI error reporting macros.
+ *
+ * @see tbox::Database
+ */
+
+class SiloDatabase:public Database
+{
+public:
+   /**
+    * The Silo database constructor creates an empty database with the
+    * specified name.  By default the database will not be associated
+    * with a file until it is mounted, using the mount() member function.
+    *
+    * When assertion checking is active, the name string must be non-empty.
+    */
+   explicit SiloDatabase(
+      const std::string& name);
+
+   /**
+    * The database destructor closes the Silo group or data file.
+    */
+   virtual ~SiloDatabase();
+
+   /**
+    * Return true if the specified key exists in the database
+    * and false otherwise.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual bool
+   keyExists(
+      const std::string& key);
+
+   /**
+    * Return an array of all keys in the current database.  Note that
+    * no keys from subdatabases contained in the current database
+    * will appear in the array.  To get the keys of any other
+    * database, you must call this routine for that database.
+    */
+   virtual Array<std::string>
+   getAllKeys();
+
+   /**
+    * @brief Return the type of data associated with the key.
+    *
+    * If the key does not exist, then INVALID is returned
+    *
+    * @param key Key name in database.
+    */
+   virtual enum DataType
+   getArrayType(
+      const std::string& key);
+
+   /**
+    * Return the size of the array associated with the key.  If the key
+    * does not exist, then zero is returned.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual int
+   getArraySize(
+      const std::string& key);
+
+   /**
+    * Return true or false depending on whether the specified key
+    * represents a database entry.  If the key does not exist or if
+    * the string is empty, then false is returned.
+    */
+   virtual bool
+   isDatabase(
+      const std::string& key);
+
+   /**
+    * Create a new database with the specified key name and return a
+    * pointer to it.  A new group with the key name is also created
+    * in the data file.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual Pointer<Database>
+   putDatabase(
+      const std::string& key);
+
+   /**
+    * Get the database with the specified key name.  If the specified
+    * key does not represent a database entry in the database, then
+    * an error message is printed and the program exits.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual Pointer<Database>
+   getDatabase(
+      const std::string& key);
+
+   /**
+    * Return true or false depending on whether the specified key
+    * represents a boolean entry.  If the key does not exist or if
+    * the string is empty, then false is returned.
+    */
+   virtual bool
+   isBool(
+      const std::string& key);
+
+   /**
+    * Create a boolean array entry in the database with the specified
+    * key name.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual void
+   putBoolArray(
+      const std::string& key,
+      const bool * const data,
+      const int nelements);
+
+   /**
+    * Get a boolean entry from the database with the specified key
+    * name.  If the specified key does not exist in the database or
+    * is not a boolean array, then an error message is printed and
+    * the program exits.
+    *
+    * @param key Key name in database.
+    */
+   virtual Array<bool>
+   getBoolArray(
+      const std::string& key);
+
+   /**
+    * Return true or false depending on whether the specified key
+    * represents a box entry.  If the key does not exist or if
+    * the string is empty, then false is returned.
+    */
+   virtual bool
+   isDatabaseBox(
+      const std::string& key);
+
+   /**
+    * Create a box array entry in the database with the specified
+    * key name.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual void
+   putDatabaseBoxArray(
+      const std::string& key,
+      const DatabaseBox * const data,
+      const int nelements);
+
+   /**
+    * Get a box entry from the database with the specified key
+    * name.  If the specified key does not exist in the database,
+    * then an error message is printed and the program exits.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual Array<DatabaseBox>
+   getDatabaseBoxArray(
+      const std::string& key);
+
+   /**
+    * Return true or false depending on whether the specified key
+    * represents a char entry.  If the key does not exist or if
+    * the string is empty, then false is returned.
+    */
+   virtual bool
+   isChar(
+      const std::string& key);
+
+   /**
+    * Create a character array entry in the database with the specified
+    * key name.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual void
+   putCharArray(
+      const std::string& key,
+      const char * const data,
+      const int nelements);
+
+   /**
+    * Get a character entry from the database with the specified key
+    * name.  If the specified key does not exist in the database,
+    * then an error message is printed and the program exits.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual Array<char>
+   getCharArray(
+      const std::string& key);
+
+   /**
+    * Return true or false depending on whether the specified key
+    * represents a complex entry.  If the key does not exist or if
+    * the string is empty, then false is returned.
+    */
+   virtual bool
+   isComplex(
+      const std::string& key);
+
+   /**
+    * Create a complex array entry in the database with the specified
+    * key name.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual void
+   putComplexArray(
+      const std::string& key,
+      const dcomplex * const data,
+      const int nelements);
+
+   /**
+    * Get a complex entry from the database with the specified key
+    * name.  If the specified key does not exist in the database
+    * then an error message is printed and the program exits.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual Array<dcomplex>
+   getComplexArray(
+      const std::string& key);
+
+   /**
+    * Return true or false depending on whether the specified key
+    * represents a double entry.  If the key does not exist or if
+    * the string is empty, then false is returned.
+    */
+   virtual bool
+   isDouble(
+      const std::string& key);
+
+   /**
+    * Create a double array entry in the database with the specified
+    * key name.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual void
+   putDoubleArray(
+      const std::string& key,
+      const double * const data,
+      const int nelements);
+
+   /**
+    * Get a double entry from the database with the specified key
+    * name.  If the specified key does not exist in the database
+    * then an error message is printed and the program exits.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual Array<double>
+   getDoubleArray(
+      const std::string& key);
+
+   /**
+    * Return true or false depending on whether the specified key
+    * represents a float entry.  If the key does not exist or if
+    * the string is empty, then false is returned.
+    */
+   virtual bool
+   isFloat(
+      const std::string& key);
+
+   /**
+    * Create a float array entry in the database with the specified
+    * key name.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual void
+   putFloatArray(
+      const std::string& key,
+      const float * const data,
+      const int nelements);
+
+   /**
+    * Get a float entry from the database with the specified key
+    * name.  If the specified key does not exist in the database
+    * then an error message is printed and the program exits.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual Array<float>
+   getFloatArray(
+      const std::string& key);
+
+   /**
+    * Return true or false depending on whether the specified key
+    * represents an integer entry.  If the key does not exist or if
+    * the string is empty, then false is returned.
+    */
+   virtual bool
+   isInteger(
+      const std::string& key);
+
+   /**
+    * Create an integer array entry in the database with the specified
+    * key name.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual void
+   putIntegerArray(
+      const std::string& key,
+      const int * const data,
+      const int nelements);
+
+   /**
+    * Get an integer entry from the database with the specified key
+    * name.  If the specified key does not exist in the database
+    * then an error message is printed and the program exits.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual Array<int>
+   getIntegerArray(
+      const std::string& key);
+
+   /**
+    * Return true or false depending on whether the specified key
+    * represents a string entry.  If the key does not exist or if
+    * the string is empty, then false is returned.
+    */
+   virtual bool
+   isString(
+      const std::string& key);
+
+   /**
+    * Create a string array entry in the database with the specified
+    * key name.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual void
+   putStringArray(
+      const std::string& key,
+      const std::string * const data,
+      const int nelements);
+
+   /**
+    * Get a string entry from the database with the specified key
+    * name.  If the specified key does not exist in the database
+    * then an error message is printed and the program exits.
+    *
+    * When assertion checking is active, the key string must be non-empty.
+    */
+   virtual Array<std::string>
+   getStringArray(
+      const std::string& key);
+
+   /**
+    * @brief Returns the name of this database.
+    *
+    * The name for the root of the database is the name supplied when creating it.
+    * Names for nested databases are the keyname of the database.
+    *
+    */
+   virtual std::string
+   getName();
+
+   /**
+    * Print contents of current database to the specified output stream.
+    * If no output stream is specified, then data is written to stream pout.
+    * Note that none of the subdatabases contained in the current database
+    * will have their contents printed.  To view the contents of any other
+    * database, you must call this print routine for that database.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os = pout);
+
+   /**
+    * Create a new database file.
+    *
+    * Returns true if successful.
+    *
+    * @param name name of database. Normally a filename.
+    */
+   virtual bool
+   create(
+      const std::string& name);
+
+   /**
+    * Open an existing database file.
+    *
+    * Returns true if successful.
+    *
+    * @param name name of database. Normally a filename.
+    */
+   virtual bool
+   open(
+      const std::string& name);
+
+   /**
+    * @brief Attach the Database to an existing Silo file.
+    *
+    * If an application has an existing Silo file used for restart this
+    * method can be used to write SAMRAI restart information to the
+    * existing file instead of SAMRAI creating a distinct file.
+    *
+    * SAMRAI data will be written to the directory specified within
+    * the Silo file.
+    *
+    * Returns true if attach was successful.
+    */
+   virtual bool
+   attachToFile(
+      DBfile* file,
+      const std::string& directory);
+
+   /**
+    * Close the database.
+    *
+    * Returns true if successful.
+    *
+    * If the database is currently open then close it.  This should
+    * flush all data to the file (if the database is on disk).
+    */
+   virtual bool
+   close();
+
+   using Database::putBoolArray;
+   using Database::getBoolArray;
+   using Database::putDatabaseBoxArray;
+   using Database::getDatabaseBoxArray;
+   using Database::putCharArray;
+   using Database::getCharArray;
+   using Database::putComplexArray;
+   using Database::getComplexArray;
+   using Database::putFloatArray;
+   using Database::getFloatArray;
+   using Database::putDoubleArray;
+   using Database::getDoubleArray;
+   using Database::putIntegerArray;
+   using Database::getIntegerArray;
+   using Database::putStringArray;
+   using Database::getStringArray;
+
+private:
+   SiloDatabase(
+      const SiloDatabase&);             // not implemented
+   void
+   operator = (
+      const SiloDatabase&);                 // not implemented
+
+   bool
+   isSiloType(
+      const std::string& key,
+      DBObjectType type);
+
+   bool
+   isSiloSimpleType(
+      const std::string& key,
+      const int simple_type);
+
+   bool
+   putSiloSimpleType(
+      const std::string& key,
+      const void* data,
+      const int nelements,
+      const int simple_type);
+
+   bool
+   getSiloSimpleType(
+      const std::string& key,
+      void* data);
+
+   int
+   getSiloSimpleTypeLength(
+      const std::string& key);
+
+   /*!
+    * @brief Convert/mangle SAMRAI name into characters acceptable to SILO naming conventions.
+    *
+    * SILO only supports alphanumeric and "_" as valid characters in names.  Other characters
+    * are allowed by SAMRAI (such as " " and "-") so they are converted to a mangled
+    * representation for SILO.
+    */
+   std::string
+   nameMangle(
+      std::string name);
+
+   /*!
+    * @brief Convert/unmangle SILO name with possible mangled characters back to SAMRAI name.
+    */
+   std::string
+   nameDemangle(
+      std::string name);
+
+   /*!
+    * @brief Determine if character is a valid SILO character.
+    *
+    * Allowed values are alphanumeric, "-" and "/".
+    */
+   bool
+   IsValid(
+      int i);
+
+   /*
+    * Private constructor used internally to create sub-databases.
+    */
+   SiloDatabase(
+      const std::string& name,
+      DBfile* file,
+      const std::string& directory,
+      const bool create_in_file);
+
+   /*
+    * Silo file and group id, boolean flag indicating whether database
+    * is associated with a mounted file, and name of this database object.
+    */
+   /*!
+    * @brief Whether database is mounted to a file
+    */
+   bool d_is_file;
+   /*!
+    * @brief ID of file attached to database
+    *
+    * Is either -1 (not mounted to file) or set to the return value from
+    * opening a file.
+    * Set to -1 on unmounting the file.
+    */
+   DBfile* d_file;
+
+   /*!
+    * @brief Full directory of the database
+    *
+    * A database object is always attached to a directory in the Silo file.
+    * The directory is set in the constructor when constructing.
+    * If the object is file, the directory is the root.
+    */
+   std::string d_directory;
+
+   /*
+    * Name of this database object;
+    */
+   std::string d_database_name;
+
+   /*
+    * Names used for storing complex SAMRAI objects.
+    */
+   static const std::string DATABASE_BOX_NAME;
+   static const std::string STRING_ARRAY_NAME;
+   static const std::string COMPLEX_ARRAY_NAME;
+
+   /*
+    * String identifier for a mangled character.  A mangled character is stored
+    * as <mangleID><hex> where hex is the ASCI code in hexadecimal.
+    */
+   static const std::string mangleID;
+};
+
+}
+}
+
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/SiloDatabaseFactory.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/SiloDatabaseFactory.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,35 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A factory for building SiloDatabases 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/SiloDatabaseFactory.h"
+#include "SAMRAI/tbox/SiloDatabase.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+#ifdef HAVE_SILO
+/**
+ * Build a new SiloDatabase object.
+ */
+Pointer<Database> SiloDatabaseFactory::allocate(
+   const std::string& name) {
+#ifdef HAVE_SILO
+   Pointer<SiloDatabase> database(new SiloDatabase(name));
+   return database;
+
+#else
+   return NULL;
+
+#endif
+}
+#endif
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/SiloDatabaseFactory.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/SiloDatabaseFactory.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,39 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A factory for building SiloDatabases 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_SiloDatabaseFactory
+#define included_tbox_SiloDatabaseFactory
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/DatabaseFactory.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * @brief SiloDatabase factory.
+ *
+ * Builds a new SiloDatabase.
+ */
+class SiloDatabaseFactory:public DatabaseFactory
+{
+   /**
+    * Build a new Database object.
+    */
+   virtual Pointer<Database>
+   allocate(
+      const std::string& name);
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/StartupShutdownManager.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/StartupShutdownManager.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,225 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Registry of shutdown routines to be called at program exit 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <cstdlib>
+
+namespace SAMRAI {
+namespace tbox {
+
+bool StartupShutdownManager::s_singleton_initialized = false;
+
+bool StartupShutdownManager::s_in_initialize = false;
+bool StartupShutdownManager::s_in_startup = false;
+bool StartupShutdownManager::s_in_shutdown = false;
+bool StartupShutdownManager::s_in_finalize = false;
+
+bool StartupShutdownManager::s_initialized = false;
+bool StartupShutdownManager::s_startuped = false;
+bool StartupShutdownManager::s_shutdowned = false;
+bool StartupShutdownManager::s_finalized = false;
+
+StartupShutdownManager::ListElement *
+StartupShutdownManager::s_manager_list[s_number_of_priorities];
+StartupShutdownManager::ListElement *
+StartupShutdownManager::s_manager_list_last[s_number_of_priorities];
+int StartupShutdownManager::s_num_manager_items[s_number_of_priorities];
+
+void StartupShutdownManager::registerHandler(
+   AbstractHandler* handler)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   assert(handler);
+
+   // Don't allow registering handlers when we are looping and the
+   // handler needs to be called in that loop.  This would create the
+   // possibility that a handler is registered that needs to get
+   // called.
+   //
+   // SGS Ideally this would not be needed and maybe with some
+   // additional work this could be made more clean.
+   assert(!(s_in_initialize && handler->hasInitialize()));
+   assert(!(s_in_startup && handler->hasStartup()));
+   assert(!(s_in_shutdown && handler->hasShutdown()));
+   assert(!s_in_finalize);
+#endif
+
+   if (!s_singleton_initialized) {
+      setupSingleton();
+   }
+
+   ListElement* item = new ListElement;
+   item->handler = handler;
+
+   unsigned char priority = handler->getPriority();
+
+   item->next = (ListElement *)NULL;
+   if (s_num_manager_items[priority] == 0) {
+      s_manager_list[priority] = item;
+   } else {
+      s_manager_list_last[priority]->next = item;
+   }
+   s_manager_list_last[priority] = item;
+   s_num_manager_items[priority]++;
+}
+
+void StartupShutdownManager::initialize()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   assert(!s_initialized);
+#endif
+
+   s_initialized = true;
+   // only shutdown if something was registered
+   if (s_singleton_initialized) {
+
+      s_in_initialize = true;
+
+      for (int priority = 0;
+           priority < s_number_of_priorities;
+           ++priority) {
+         ListElement* item = s_manager_list[priority];
+         while (item) {
+            if (item->handler) {
+               item->handler->initialize();
+            }
+            item = item->next;
+         }
+      }
+
+      s_in_initialize = false;
+   }
+}
+
+void StartupShutdownManager::startup()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   // If this is thrown you need to make sure SAMRAIManger::initialize
+   // is called before startup.
+   assert(s_initialized);
+   assert(!s_startuped);
+#endif
+
+   s_startuped = true;
+
+   // only shutdown if something was registered
+   if (s_singleton_initialized) {
+      s_in_startup = true;
+
+      for (int priority = 0;
+           priority < s_number_of_priorities;
+           ++priority) {
+         ListElement* item = s_manager_list[priority];
+         while (item) {
+            if (item->handler) {
+               item->handler->startup();
+            }
+            item = item->next;
+         }
+      }
+
+      s_in_startup = false;
+   }
+
+   s_shutdowned = false;
+}
+
+void StartupShutdownManager::shutdown()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   assert(s_initialized);
+   assert(s_startuped);
+   assert(!s_shutdowned);
+#endif
+
+   s_shutdowned = true;
+
+   // only shutdown if something was registered
+   if (s_singleton_initialized) {
+      s_in_shutdown = true;
+
+      for (int priority = s_number_of_priorities - 1;
+           priority > -1;
+           priority--) {
+         ListElement* item = s_manager_list[priority];
+         while (item) {
+            if (item->handler) {
+               item->handler->shutdown();
+            }
+            item = item->next;
+         }
+      }
+      s_in_shutdown = false;
+   }
+
+   s_startuped = false;
+
+}
+
+void StartupShutdownManager::setupSingleton()
+{
+   for (int priority = s_number_of_priorities - 1; priority > -1; priority--) {
+      s_manager_list[priority] = (ListElement *)NULL;
+      s_manager_list_last[priority] = (ListElement *)NULL;
+      s_num_manager_items[priority] = 0;
+   }
+
+   s_singleton_initialized = true;
+}
+
+void StartupShutdownManager::finalize()
+{
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   assert(s_initialized);
+   assert(s_shutdowned);
+   assert(!s_finalized);
+#endif
+
+   s_finalized = true;
+
+   // only finalize if something was registered
+   if (s_singleton_initialized) {
+      s_in_finalize = true;
+
+      for (int priority = s_number_of_priorities - 1;
+           priority > -1;
+           priority--) {
+         ListElement* item = s_manager_list[priority];
+         while (item) {
+            if (item->handler) {
+               item->handler->finalize();
+            }
+            item = item->next;
+         }
+      }
+
+      for (int priority = 0;
+           priority < s_number_of_priorities;
+           ++priority) {
+         ListElement* item = s_manager_list[priority];
+         while (item) {
+            ListElement* to_delete = item;
+            item = item->next;
+            delete to_delete;
+         }
+      }
+
+      s_in_finalize = false;
+   }
+
+   s_initialized = false;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/StartupShutdownManager.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/StartupShutdownManager.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,535 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Manager for startup and shutdown routines to be called at program start and exit 
+ *
+ ************************************************************************/
+#ifndef included_tbox_StartupShutdownManager
+#define included_tbox_StartupShutdownManager
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "cassert"
+
+namespace SAMRAI {
+namespace tbox {
+
+/*!
+ * @brief Class StartupShutdownManager is a utility for managing
+ * callbacks invoked at program and problem startup and completion.
+ *
+ * There are four steps in the lifecycle of managed objects.
+ *
+ * An object is initialized once at the start of a run and a
+ * corresponding finalization is done once at the end of the run.
+ * These methods can be used to create and destroy static state that
+ * is independent of problem; e.g., when running multiple problems
+ * during a single program (i.e., main) execution.
+ *
+ * The lifecycle also has a startup/shutdown step.   This is invoked
+ * at least once per run but may be invoked multiple times if
+ * multiple SAMRAI problems are being run within a single execution of the
+ * main function.  These methods should setup/teardown any state that
+ * is problem dependent.
+ *
+ * In order to address dependencies between classes a Handler provides
+ * a priority (ordering) using the getPriority method.  Ordering within
+ * the same priority is undefined.
+ *
+ * The StartupShutdowManger::AbstractHandler defines the interface for
+ * the class that is registered.  StartupShutdowManger::Handler is a
+ * helper class provided to simplify the use of the StartupShutdownManager.
+ * One may simply create a static instance of the Handler class, providing
+ * the constructor with callbacks to invoke and priority to use.
+ *
+ * The StartupShutdownManger is normally managed by the SAMRAIManager
+ * class.
+ */
+
+class StartupShutdownManager
+{
+
+public:
+   /*!
+    * @brief Abstract base class for handler interface.
+    *
+    * Defines the four methods to invoke in the lifecycle and four
+    * methods to indicate if the interface should be called for that stage.
+    *
+    * Note the odd looking "has" methods are needed for some error checking.
+    */
+   class AbstractHandler
+   {
+
+public:
+      /*!
+       * @brief Virtual destructor since class has virtual methods.
+       */
+      virtual ~AbstractHandler() { }
+
+      /*!
+       * @brief Method that is invoked on initialize.
+       *
+       * This is done once per run.
+       *
+       * Only called by StartupShutdownManager.
+       */
+      virtual void
+      initialize(
+         void) = 0;
+
+      /*!
+       * @brief Method that is invoked on startup.
+       *
+       * This may be done more than once per run.
+       *
+       * Only called by StartupShutdownManager.
+       */
+      virtual void
+      startup(
+         void) = 0;
+
+      /*!
+       * @brief Method that is invoked on shutdown.
+       *
+       * This may be done more than once per run.
+       *
+       * Only called by StartupShutdownManager.
+       */
+      virtual void
+      shutdown(
+         void) = 0;
+
+      /*!
+       * @brief Method that is invoked on finalize.
+       *
+       * This is done once per run.
+       *
+       * Only called by StartupShutdownManager.
+       */
+      virtual void
+      finalize(
+         void) = 0;
+
+      /*!
+       * @brief Get the Priority of this handler.
+       */
+      virtual unsigned char
+      getPriority(
+         void) = 0;
+
+      /*!
+       * @brief Query if handler has initialize callback function.
+       */
+      virtual bool
+      hasInitialize() = 0;
+
+      /*!
+       * @brief Query if handler has startup callback function.
+       */
+      virtual bool
+      hasStartup() = 0;
+
+      /*!
+       * @brief Query if handler has shutdown callback function.
+       */
+      virtual bool
+      hasShutdown() = 0;
+
+      /*!
+       * @brief Query if handler has finalize callback function.
+       */
+      virtual bool
+      hasFinalize() = 0;
+   };
+
+   /*!
+    * @brief Standard implementation of a Startup/Shutdown handler.
+    *
+    * This class is provided to simplify construction of a
+    * handler class for standard SAMRAI startup/shutdown uses.  This
+    * handler registers itself with the StartupShutdownManager on
+    * construction.  On construction the methods to invoke for each
+    * step of the lifecycle are supplied.  The method may be 0
+    * indicating that the managed class does not require anything to
+    * be executed at that step.
+    *
+    * Example usage shows how the static initialization of the
+    * s_startup_shutdown_handler is used to provide a simple
+    * method of registering a class with the manager that requires
+    * startup and shutdown but not initialization or finalization.
+    *
+    * \code
+    * classs StartupShutdownExample {
+    * public:
+    *    static void startupCallback(void) {
+    *       // stuff to do for class initialization.
+    *    }
+    *
+    *    static void shutdownCallback(void) {
+    *       // stuff to do for class destruction.
+    *    }
+    * private:
+    * static StartupShutdownManger::Handler<StartupShutdownExample>
+    *                            s_startup_shutdown_handler;
+    * }
+    *
+    * static unsigned short handlerPriority = 150;
+    * StartupShutdownManger::Handler<StartupShutdownExample>
+    *    s_startup_shutdown_handler(0,
+    *                               StartupShutdownExample::startupCallback,
+    *                               StartupShutdownExample::shutdownCallback,
+    *                               0,
+    *                               handlerPriority);
+    * \endcode
+    *
+    *
+    * Note that this mechanism does NOT work for templated classes as
+    * static variables in template classes are only initialized if
+    * used.  For template classes a slightly different mechanism using
+    * a static in a method is used.  Similar to the Meyer singleton
+    * implementation.  \see{tbox::List} class as an example.  This
+    * method has the disadvantage of having to check on each object
+    * construction if the static has been created (it is done under
+    * the hood by the compiler but still exists).  At this time we are
+    * not aware of a method to invoke a block of code only once for a
+    * template class.
+    *
+    * TODO:  Should implemenation be moved out of the header?
+    *
+    */
+   class Handler:public AbstractHandler
+   {
+public:
+      /*!
+       * @brief Construct a handler with the callbacks provided and
+       * specified priority.
+       *
+       * The callback function pointers should be NULL for callbacks not
+       * required for a particular class.
+       *
+       * @param[in] initialize   Initialization callback function.
+       * @param[in] startup      Startup callback function.
+       * @param[in] shutdown     Shutdown callback function.
+       * @param[in] finalize     Finalization callback function.
+       * @param[in] priority
+       *
+       */
+      Handler(
+         void(*initialize)(void),
+         void(*startup)(void),
+         void(*shutdown)(void),
+         void(*finalize)(void),
+         unsigned char priority):
+         d_initialize(initialize),
+         d_startup(startup),
+         d_shutdown(shutdown),
+         d_finalize(finalize),
+         d_priority(priority)
+      {
+         StartupShutdownManager::registerHandler(this);
+      }
+
+      /*!
+       * @brief Destructor.
+       */
+      ~Handler() {
+      }
+
+      /*!
+       * @brief Call initialize callback function.
+       */
+      void initialize(
+         void) {
+         if (d_initialize) {
+            (*d_initialize)();
+         }
+      }
+
+      /*!
+       * @brief Call startup callback function.
+       */
+      void startup(
+         void) {
+         if (d_startup) {
+            (*d_startup)();
+         }
+      }
+
+      /*!
+       * @brief Call shutdown callback function.
+       */
+      void shutdown(
+         void) {
+         if (d_shutdown) {
+            (*d_shutdown)();
+         }
+      }
+
+      /*!
+       * @brief Call finalize callback function.
+       */
+      void finalize(
+         void) {
+         if (d_finalize) {
+            (*d_finalize)();
+         }
+      }
+
+      /*!
+       * @brief Get the priority.
+       */
+      unsigned char getPriority(
+         void) {
+         return d_priority;
+      }
+
+      /*!
+       * @brief Query if initialize function has been provided.
+       */
+      bool hasInitialize() {
+         return d_initialize != 0;
+      }
+
+      /*!
+       * @brief Query if startup function has been provided.
+       */
+      bool hasStartup() {
+         return d_startup != 0;
+      }
+
+      /*!
+       * @brief Query if shutdown function has been provided.
+       */
+      bool hasShutdown() {
+         return d_shutdown != 0;
+      }
+
+      /*!
+       * @brief Query if finalize function has been provided.
+       */
+      bool hasFinalize() {
+         return d_finalize != 0;
+      }
+
+private:
+
+      /*!
+       * @brief Default constructor is private.
+       *
+       * TODO:  Should this be unimplemented?
+       */
+      Handler() {
+      }
+
+      /*!
+       * @brief Initialize function.
+       */
+      void (* d_initialize)(
+         void);
+
+      /*!
+       * @brief Startup function.
+       */
+      void (* d_startup)(
+         void);
+
+      /*!
+       * @brief Shutdown function.
+       */
+      void (* d_shutdown)(
+         void);
+
+      /*!
+       * @brief Finalize function.
+       */
+      void (* d_finalize)(
+         void);
+
+      /*!
+       * @brief Priority of the handler.
+       */
+      unsigned char d_priority;
+
+   };
+
+   /*!
+    * @brief Register a handler with the StartupShutdownManager.
+    *
+    * The AbstractHandler interface defines callback methods that will be
+    * invoked on SAMRAI initialize, startup and shutdown, and
+    * finalize.
+    *
+    * The AbstractHandler also defines a priority (via getPriority)
+    * used to specify the order for startup and shutdown.  Lower
+    * numbers are started first, higher last (0 first, 254 last).
+    * Order is inverted on shutdown (254 first, 0 last).
+    *
+    * The priority is required since handlers may have dependencies.
+    *
+    * Users are reserved priorities 127 to 254.  Unless there is a
+    * known dependency on a SAMRAI shutdown handler, users should use
+    * these priorities.
+    *
+    * Note: Currently it is allowed to register a handler in a phase
+    * if the handler does not have a callback for that phase.  In
+    * other words if during the startup callback of a class A it
+    * causes another class B to register a handler it will work only
+    * if the handler for B does not have a startup method (hasStartup
+    * returns false).  This restriction is in place to prevent one
+    * from registering a handler during startup that needs to be
+    * started.  This should be avoided but for legacy reasons is being
+    * done in SAMRAI.
+    *
+    * @param handler
+    */
+   static void
+   registerHandler(
+      AbstractHandler* handler);
+
+   /*!
+    * @brief Invoke the registered initialization handlers.
+    *
+    * This should only be called once per program execution.
+    */
+   static void
+   initialize();
+
+   /*!
+    * @brief Invoke the registered startup handlers.
+    *
+    * This routine must be called at SAMRAI problem startup.  It may be called
+    * more than once per run if running multiple SAMRAI problems within the
+    * same execution of the main function.
+    */
+   static void
+   startup();
+
+   /**
+    * @brief Invoke the registered shutdown handlers.
+    *
+    * This routine must be called at SAMRAI problem shutdown.  It may be called
+    * more than once per run if running multiple SAMRAI problems within the
+    * same execution of the main function.
+    */
+   static void
+   shutdown();
+
+   /*!
+    * @brief Invoke the registered finalize handlers.
+    *
+    * This should only be called once per program execution.
+    */
+   static void
+   finalize();
+
+   /*!
+    * @brief Priorities for standard SAMRAI classes
+    */
+   static const unsigned char priorityArenaManager = 10;
+   static const unsigned char priorityReferenceCounter = 20;
+   static const unsigned char priorityLogger = 25;
+   static const unsigned char priorityListElements = 30;
+   static const unsigned char priorityList = 30;
+   static const unsigned char priorityInputManager = 40;
+   static const unsigned char priorityRestartManager = 50;
+   static const unsigned char priorityVariableDatabase = 60;
+   static const unsigned char priorityStatistician = 70;
+   static const unsigned char priorityBoundaryLookupTable = 80;
+   static const unsigned char priorityHierarchyDataOpsManager = 90;
+   static const unsigned char priorityTimerManger = 95;
+   static const unsigned char priorityTimers = 98;
+   static const unsigned char priorityVariables = 100;
+
+private:
+   /*!
+    * @brief Sets up the StartupShutdownManager singleton.
+    */
+   static void
+   setupSingleton(
+      void);
+
+   /*!
+    * @brief Used to maintain a list of registered handlers.
+    *
+    * TODO:  Should implementation be pulled out of header?
+    */
+   class ListElement
+   {
+
+public:
+
+      /*!
+       * @brief Constructor.
+       */
+      ListElement():
+         handler(0),
+         next(0)
+      {
+      }
+
+      /*!
+       * @brief A registered handler being stored in a list.
+       */
+      StartupShutdownManager::AbstractHandler* handler;
+
+      /*!
+       * @brief Next element of the list.
+       */ 
+      ListElement* next;
+
+   };
+
+   /*
+    * @brief Maximum value of handler priorities.
+    */
+   static const short s_number_of_priorities = 255;
+
+   /*!
+    * @brief Array of singly linked lists holding registered handlers.
+    */
+   static ListElement* s_manager_list[s_number_of_priorities];
+
+   /*!
+    * @brief Array of pointers to ListElement, used for constructing
+    * and modifying s_manager_list.
+    */
+   static ListElement* s_manager_list_last[s_number_of_priorities];
+
+   /*!
+    * @brief Number of items at each priority value.
+    */
+   static int s_num_manager_items[s_number_of_priorities];
+
+   /*!
+    * @brief Flag telling if the singleton been initialized.
+    */
+   static bool s_singleton_initialized;
+
+   /*!
+    * @brief Flags telling if the manager is currently in one of the loops
+    * invoking callbacks.
+    */
+   static bool s_in_initialize;
+   static bool s_in_startup;
+   static bool s_in_shutdown;
+   static bool s_in_finalize;
+
+   /*!
+    * @brief Flags telling which methods have been invoked.  Generally used
+    * only for error checking.
+    */
+   static bool s_initialized;
+   static bool s_startuped;
+   static bool s_shutdowned;
+   static bool s_finalized;
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/StatTransaction.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/StatTransaction.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,98 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Communication transaction structure for statistic data copies 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/StatTransaction.h"
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+StatTransaction::StatTransaction(
+   Pointer<Statistic> stat,
+   int src_proc_id,
+   int dst_proc_id)
+{
+   d_stat = stat;
+   d_src_id = src_proc_id;
+   d_dst_id = dst_proc_id;
+}
+
+StatTransaction::~StatTransaction()
+{
+}
+
+bool StatTransaction::canEstimateIncomingMessageSize()
+{
+   return d_stat->canEstimateDataStreamSize();
+}
+
+size_t StatTransaction::computeIncomingMessageSize()
+{
+   return d_stat->getDataStreamSize();
+}
+
+size_t StatTransaction::computeOutgoingMessageSize()
+{
+   return d_stat->getDataStreamSize();
+}
+
+int StatTransaction::getSourceProcessor()
+{
+   return d_src_id;
+}
+
+int StatTransaction::getDestinationProcessor()
+{
+   return d_dst_id;
+}
+
+void StatTransaction::packStream(
+   MessageStream& stream)
+{
+   d_stat->packStream(stream);
+}
+
+void StatTransaction::unpackStream(
+   MessageStream& stream)
+{
+   d_stat->unpackStream(stream);
+}
+
+void StatTransaction::copyLocalData()
+{
+   // Nothing to do here!
+}
+
+void StatTransaction::printClassData(
+   std::ostream& stream) const
+{
+   stream << "Stat Transaction" << std::endl;
+   stream << "   source processor:   " << d_src_id << std::endl;
+   stream << "   destination processor:   " << d_dst_id << std::endl;
+   stream << "   stat name:   " << d_stat->getName() << std::endl;
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/StatTransaction.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/StatTransaction.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,142 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Communication transaction structure for statistic data copies 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_StatTransaction
+#define included_tbox_StatTransaction
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Statistic.h"
+#include "SAMRAI/tbox/Transaction.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * A stattistic transaction represents a simple copy communication
+ * transaction between two processors for sending and gathering statistic
+ * information generated on different processors.
+ *
+ * @see tbox::Schedule
+ * @see tbox::Transaction
+ */
+
+class StatTransaction:public Transaction
+{
+public:
+   /**
+    * Create a transaction for communicating local statistic information.
+    * This transaction will be responsible for either: (1) packing a
+    * message stream with statistic information if this processor number
+    * is the same as the given source processor id, or (2) unpacking
+    * tatistic information from the message stream if this processor number
+    * is the same as the given destination processor.  The statistic pointer
+    * passed in through the argument list must be non-null and will be used
+    * as either the source or destination statistic depending on whether
+    * case (1) or (2) applies.
+    *
+    * Note that generally this transaction class is used to pass information
+    * between two different processors and unexpected behavior may result
+    * if the source and destination processors are the same.  Also, note
+    * that the copyLocalData() routine has an empty implementation.
+    */
+   explicit StatTransaction(
+      Pointer<Statistic> stat,
+      int src_proc_id,
+      int dst_proc_id);
+
+   /**
+    * The virtual destructor for the copy transaction releases all
+    * memory associated with the transaction.
+    */
+   virtual ~StatTransaction();
+
+   /**
+    * Return a boolean indicating whether this transaction can estimate
+    * the size of an incoming message.  If this is false, then a different
+    * communications protocol kicks in and the message size is transmitted
+    * between nodes.
+    */
+   virtual bool
+   canEstimateIncomingMessageSize();
+
+   /**
+    * Return the amount of buffer space needed for the incoming message.
+    * This routine is only called if the transaction can estimate the
+    * size of the incoming message.
+    */
+   virtual size_t
+   computeIncomingMessageSize();
+
+   /**
+    * Return the buffer space needed for the outgoing message.
+    */
+   virtual size_t
+   computeOutgoingMessageSize();
+
+   /**
+    * Return the sending processor for the communications transaction.
+    */
+   virtual int
+   getSourceProcessor();
+
+   /**
+    * Return the receiving processor for the communications transaction.
+    */
+   virtual int
+   getDestinationProcessor();
+
+   /**
+    * Pack the transaction data into the message stream.
+    */
+   virtual void
+   packStream(
+      MessageStream& stream);
+
+   /**
+    * Unpack the transaction data from the message stream.
+    */
+   virtual void
+   unpackStream(
+      MessageStream& stream);
+
+   /**
+    * Perform the local data copy for the transaction.  This function
+    * drops through as it is not needed.
+    */
+   virtual void
+   copyLocalData();
+
+   /**
+    * Print transaction information to given output stream.
+    */
+   virtual void
+   printClassData(
+      std::ostream& stream) const;
+
+private:
+   StatTransaction(
+      const StatTransaction&);                  // not implemented
+   void
+   operator = (
+      const StatTransaction&);                  // not implemented
+
+   Pointer<Statistic> d_stat;
+   int d_src_id;
+   int d_dst_id;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Statistic.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Statistic.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,562 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Class to record statistics during program execution. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Statistic.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#define TBOX_STATISTIC_VERSION (1)
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/tbox/Statistic.I"
+#endif
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+#ifndef ARRAY_INCREMENT
+#define ARRAY_INCREMENT (100)
+#endif
+
+double Statistic::s_empty_seq_tag_entry = -99999999.;
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Statistic constructor and destructor.                                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+Statistic::Statistic(
+   const std::string& name,
+   const std::string& stat_type,
+   int instance_id)
+{
+   TBOX_ASSERT(!name.empty());
+   TBOX_ASSERT(!stat_type.empty());
+   TBOX_ASSERT(instance_id > -1);
+
+   if (!(stat_type == "PROC_STAT" || stat_type == "PATCH_STAT")) {
+      TBOX_ERROR(
+         "Invalid stat_type passed to Statistic constructor"
+         << "   object name = " << name
+         << ".\n   Valid stat types are `PROC_STAT' and `PATCH_STAT'"
+         << std::endl);
+   }
+
+   d_object_name = name;
+   d_instance_id = instance_id;
+
+   if (stat_type == "PROC_STAT") {
+      d_stat_type = PROC_STAT;
+   }
+   if (stat_type == "PATCH_STAT") {
+      d_stat_type = PATCH_STAT;
+   }
+
+   d_seq_counter = 0;
+   d_total_patch_entries = 0;
+   d_proc_stat_array_size = 0;
+   d_patch_stat_array_size = 0;
+
+}
+
+Statistic::~Statistic()
+{
+   reset();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Utility functions to record statistic record data.                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Statistic::recordProcStat(
+   double value,
+   int seq_num)
+{
+   if (d_stat_type != PROC_STAT) {
+      TBOX_ERROR("Statistic::recordProcStat error...\n"
+         << "    Statistic type is `PATCH_STAT'" << std::endl);
+   }
+
+   /*
+    * Resize array of processor stats, if necessary.
+    */
+   checkArraySizes(seq_num);
+
+   /*
+    * The statistic maintains its own sequence counter but the user may
+    * override the data maintained in the statistic by supplying a seq_num.
+    * The seq_num argument for this method is -1 if the user does not
+    * supply an alternative value.  The value is recorded using the following
+    * logic:
+    * 1) If seq_num < 0, increment counter and record a new value at seq_cnt.
+    * 2) If 0 < seq_num < seq_cnt, overwrite the previous record at
+    *    seq_num with the new value.
+    * 3) If seq_cnt < seq_num, set seq_cnt = seq_num and add new record
+    *    at seq_cnt.
+    */
+   if (seq_num < 0) {
+      d_proc_array[d_seq_counter].value = value;
+   } else if (seq_num < d_seq_counter) {
+      d_proc_array[seq_num].value = value;
+   } else {
+      d_seq_counter = seq_num;
+      d_proc_array[d_seq_counter].value = value;
+   }
+   d_seq_counter++;
+}
+
+void Statistic::recordPatchStat(
+   int patch_num,
+   double value,
+   int seq_num)
+{
+   if (d_stat_type != PATCH_STAT) {
+      TBOX_ERROR("Statistic::recordPatchStat error...\n"
+         << "    Statistic type is `PROC_STAT'" << std::endl);
+   }
+
+   /*
+    * Resize array of processor stats, if necessary.
+    */
+   checkArraySizes(seq_num);
+
+   /*
+    * The patch statistic differs from the processor statistic in that
+    * each entry of the array of seq numbers contains a LIST of
+    * PatchStatRecord entries, one for each patch on the processor.
+    * The recording logic is thus slightly different than the Processor stat:
+    *
+    *   If seq_num < seq_counter {
+    *     - Check the entries in the list of records at array index seq_num.
+    *       Iterate through the list and see if the patch_id of any record
+    *       matches the specified patch_num.
+    *
+    *       If patch_num entry exists {
+    *          - overwrite existing entry
+    *       } else {
+    *          - create a new entry and append to end of list
+    *
+    *   }
+    *
+    *   If seq_num >= seq_counter
+    *      - create new entry and append to end of list at the seq_num
+    *        array index.
+    *      - set seq_counter = seq_num
+    *   }
+    */
+   if (seq_num < d_seq_counter) {
+      List<Statistic::PatchStatRecord>& records =
+         d_patch_array[seq_num].patch_records;
+      bool found_patch_id = false;
+      List<Statistic::PatchStatRecord>::Iterator ir(records);
+      for ( ; ir; ir++) {
+         if (ir().patch_id == patch_num) {
+            ir().value = value;
+            found_patch_id = true;
+         }
+      }
+      if (!found_patch_id) {
+         PatchStatRecord patchitem_record;
+         patchitem_record.value = value;
+         patchitem_record.patch_id = patch_num;
+         d_patch_array[seq_num].patch_records.appendItem(patchitem_record);
+         d_total_patch_entries++;
+      }
+
+   }
+
+   if (seq_num >= d_seq_counter) {
+      PatchStatRecord patchitem_record;
+      patchitem_record.value = value;
+      patchitem_record.patch_id = patch_num;
+      d_patch_array[seq_num].patch_records.appendItem(patchitem_record);
+      d_total_patch_entries++;
+      d_seq_counter = seq_num + 1;
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Utility function for communicating statistic data in parallel.        *
+ *                                                                       *
+ * Stream data size includes 4 ints (instance id, proc rank,             *
+ *                                   stat type, seq length).             *
+ *                                                                       *
+ * Additionally, data stream size includes space needed for statistic    *
+ * data values:                                                          *
+ *                                                                       *
+ *    o for processor stat, this is 1 double (value) for each seq entry. *
+ *                                                                       *
+ *    o for patch stat, this is 1 int (#patches) for each sequence       *
+ *      entry + 1 int (patch_id) + 1 double (value) for each patch       *
+ *      entry.                                                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int Statistic::getDataStreamSize()
+{
+   int byte_size = MessageStream::getSizeof<int>(4);
+   if (d_stat_type == PROC_STAT) {
+      byte_size += MessageStream::getSizeof<double>(d_seq_counter);
+   } else { // d_stat_type == PATCH_STAT
+      byte_size += MessageStream::getSizeof<int>(d_seq_counter);
+      byte_size += MessageStream::getSizeof<int>(d_total_patch_entries);
+      byte_size += MessageStream::getSizeof<double>(d_total_patch_entries);
+   }
+   return byte_size;
+}
+
+void Statistic::packStream(
+   MessageStream& stream)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   if (mpi.getRank() == 0) {
+      TBOX_ERROR("Statistic::packStream error...\n"
+         << "    Processor zero should not pack stat data" << std::endl);
+   }
+
+   int num_int = 4;
+   int num_double = 0;
+   if (d_stat_type == PROC_STAT) {
+      num_double = d_seq_counter;
+   }
+   if (d_stat_type == PATCH_STAT) {
+      num_int += d_seq_counter + d_total_patch_entries;
+      num_double = d_total_patch_entries;
+   }
+   Array<int> idata(num_int);
+   Array<double> ddata(num_double);
+
+   idata[0] = mpi.getRank();
+   idata[1] = d_instance_id;
+   idata[2] = d_stat_type;
+   idata[3] = d_seq_counter;
+
+   int is = 0;
+   if (d_stat_type == PROC_STAT) {
+
+      for (is = 0; is < d_seq_counter; is++) {
+         ddata[is] = d_proc_array[is].value;
+      }
+
+   } else {  // d_stat_type == PATCH_STAT
+
+      int mark = 4 + d_seq_counter;
+      int isr = 0;
+
+      for (is = 0; is < d_seq_counter; is++) {
+         List<Statistic::PatchStatRecord>& lrec =
+            d_patch_array[is].patch_records;
+         idata[4 + is] = lrec.getNumberOfItems();
+
+         List<Statistic::PatchStatRecord>::Iterator ilr(lrec);
+         for ( ; ilr; ilr++) {
+            idata[mark + isr] = ilr().patch_id;
+            ddata[isr] = ilr().value;
+            isr++;
+         }
+      }
+   }
+
+   if (num_int > 0) {
+      stream.pack(idata.getPointer(), num_int);
+   }
+   if (num_double > 0) {
+      stream.pack(ddata.getPointer(), num_double);
+   }
+
+}
+
+void Statistic::unpackStream(
+   MessageStream& stream)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   if (mpi.getRank() != 0) {
+      TBOX_ERROR("Statistic::unpackStream error...\n"
+         << "    Only processor zero should unpack stat data" << std::endl);
+   }
+
+   int src_rank, stat_id, stat_type, seq_len;
+
+   stream >> src_rank;
+   stream >> stat_id;
+   stream >> stat_type;
+   stream >> seq_len;
+
+   if (src_rank == 0) {
+      TBOX_ERROR("Statistic::unpackStream error...\n"
+         << "     Processor zero should not send stat data" << std::endl);
+   }
+   if (stat_id != d_instance_id) {
+      TBOX_ERROR("Statistic::unpackStream error...\n"
+         << "    Incompatible statistic number ids" << std::endl);
+   }
+   if (stat_type != d_stat_type) {
+      TBOX_ERROR("Statistic::unpackStream error...\n"
+         << "    Incompatible statistic types" << std::endl);
+   }
+
+   int is;
+   if (d_stat_type == PROC_STAT) {
+
+      Array<double> ddata(seq_len);
+
+      if (seq_len > 0) {
+         stream.unpack(ddata.getPointer(), seq_len);
+         for (is = 0; is < seq_len; is++) {
+            recordProcStat(ddata[is], is);
+         }
+      }
+
+   } else { // d_stat_type == PATCH_STAT
+
+      if (seq_len > 0) {
+         Array<int> inum_patches_data(seq_len);
+         stream.unpack(inum_patches_data.getPointer(), seq_len);
+
+         int total_seq_items = 0;
+         for (is = 0; is < seq_len; is++) {
+            total_seq_items += inum_patches_data[is];
+         }
+
+         Array<int> ipatch_num_data(total_seq_items);
+         Array<double> ddata(total_seq_items);
+
+         stream.unpack(ipatch_num_data.getPointer(), total_seq_items);
+         stream.unpack(ddata.getPointer(), total_seq_items);
+
+         int isr = 0;
+         for (is = 0; is < seq_len; is++) {
+            for (int ipsr = 0; ipsr < inum_patches_data[is]; ipsr++) {
+               recordPatchStat(ipatch_num_data[isr], ddata[isr], is);
+               isr++;
+            }
+         }
+      }
+   }
+
+}
+
+void Statistic::printClassData(
+   std::ostream& stream,
+   int precision) const
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   TBOX_ASSERT(precision > 0);
+
+   stream.precision(precision);
+
+   stream << "Local Data for " << getType() << " : " << getName() << std::endl;
+   stream << "   Processor id = " << mpi.getRank() << std::endl;
+   stream << "   Instance id = " << getInstanceId() << std::endl;
+   stream << "   Sequence length = " << getStatSequenceLength() << std::endl;
+
+   int is = 0;
+   if (d_stat_type == PROC_STAT) {
+      for (is = 0; is < d_seq_counter; is++) {
+         stream << "     sequence[" << is
+         << "] : value = " << d_proc_array[is].value << std::endl;
+      }
+   } else {
+      for (is = 0; is < d_seq_counter; is++) {
+         stream << "     sequence[" << is
+                << "]" << std::endl;
+
+         List<Statistic::PatchStatRecord>::Iterator ilr(
+            d_patch_array[is].patch_records);
+         for ( ; ilr; ilr++) {
+            stream << "        patch # = " << ilr().patch_id
+                   << " : value = " << ilr().value << std::endl;
+         }
+      }
+   }
+
+}
+
+void Statistic::checkArraySizes(
+   int seq_num)
+{
+   /*
+    * Verify that seq_num is less than array size.  If so, drop through.
+    * If not, resize and initialize the array.
+    */
+   int high_mark = tbox::MathUtilities<int>::Max(seq_num, d_seq_counter);
+
+   if (d_stat_type == PROC_STAT) {
+
+      if (high_mark >= d_proc_stat_array_size) {
+         int old_array_size = d_proc_stat_array_size;
+         d_proc_stat_array_size += ARRAY_INCREMENT;
+         d_proc_array.resizeArray(d_proc_stat_array_size);
+         for (int i = old_array_size; i < d_proc_stat_array_size; i++) {
+            d_proc_array[i].value = s_empty_seq_tag_entry;
+         }
+
+      }
+
+   } else if (d_stat_type == PATCH_STAT) {
+
+      if (high_mark >= d_patch_stat_array_size) {
+         d_patch_stat_array_size += ARRAY_INCREMENT;
+         d_patch_array.resizeArray(d_patch_stat_array_size);
+      }
+
+   }
+
+}
+
+void Statistic::putToDatabase(
+   Pointer<Database> db)
+{
+   TBOX_ASSERT(!db.isNull());
+
+   db->putInteger("TBOX_STATISTIC_VERSION",
+      TBOX_STATISTIC_VERSION);
+
+   db->putString("object_name", d_object_name);
+   db->putInteger("stat_type", d_stat_type);
+   db->putInteger("instance_id", d_instance_id);
+   db->putInteger("seq_counter", d_seq_counter);
+   db->putInteger("total_patch_entries", d_total_patch_entries);
+   db->putInteger("proc_stat_array_size", d_proc_stat_array_size);
+   db->putInteger("patch_stat_array_size", d_patch_stat_array_size);
+
+   int i;
+
+   if (d_stat_type == PROC_STAT) {
+      Array<double> ddata(d_seq_counter);
+      for (i = 0; i < d_seq_counter; i++) {
+         ddata[i] = d_proc_array[i].value;
+      }
+
+      if (d_seq_counter > 0) {
+         db->putDoubleArray("ddata", ddata);
+      }
+
+   }
+
+   if (d_stat_type == PATCH_STAT) {
+      Array<int> idata(d_seq_counter + d_total_patch_entries);
+      Array<double> ddata(d_total_patch_entries);
+
+      int il = 0;
+      int mark = d_seq_counter;
+
+      for (i = 0; i < d_seq_counter; i++) {
+         List<Statistic::PatchStatRecord>& records =
+            d_patch_array[i].patch_records;
+         idata[i] = records.getNumberOfItems();  // # patches at seq num
+         List<Statistic::PatchStatRecord>::Iterator ir(records);
+         for ( ; ir; ir++) {
+            idata[mark + il] = ir().patch_id;
+            ddata[il] = ir().value;
+            il++;
+         }
+      }
+
+      if (d_seq_counter > 0) {
+         db->putIntegerArray("idata", idata);
+         if (d_total_patch_entries > 0) {
+            db->putDoubleArray("ddata", ddata);
+         }
+      }
+   }
+}
+
+void Statistic::getFromRestart(
+   Pointer<Database> db)
+{
+   TBOX_ASSERT(!db.isNull());
+
+   int ver = db->getInteger("TBOX_STATISTIC_VERSION");
+   if (ver != TBOX_STATISTIC_VERSION) {
+      TBOX_ERROR("Restart file version different than class version.");
+   }
+
+   d_object_name = db->getString("object_name");
+   d_stat_type = db->getInteger("stat_type");
+   d_instance_id = db->getInteger("instance_id");
+   int seq_entries = db->getInteger("seq_counter");
+   int total_patches = db->getInteger("total_patch_entries");
+   d_proc_stat_array_size = db->getInteger("proc_stat_array_size");
+   d_patch_stat_array_size = db->getInteger("patch_stat_array_size");
+
+   d_proc_array.resizeArray(d_proc_stat_array_size);
+   d_patch_array.resizeArray(d_patch_stat_array_size);
+
+   int i;
+   if (d_stat_type == PROC_STAT) {
+      if (seq_entries > 0) {
+         Array<double> ddata = db->getDoubleArray("ddata");
+         for (i = 0; i < seq_entries; i++) {
+            recordProcStat(ddata[i], i);
+         }
+      }
+   }
+
+   if (d_stat_type == PATCH_STAT) {
+      if (seq_entries > 0) {
+         Array<int> idata = db->getIntegerArray("idata");
+
+         Array<int> inum_patches(seq_entries);
+         for (i = 0; i < seq_entries; i++) {
+            inum_patches[i] = idata[i];
+         }
+
+         if (total_patches > 0) {
+            Array<double> ddata = db->getDoubleArray("ddata");
+
+            int il = 0;
+            int mark = seq_entries;
+            for (i = 0; i < seq_entries; i++) {
+               for (int ipsr = 0; ipsr < inum_patches[i]; ipsr++) {
+                  int patch_num = idata[mark + il];
+                  double val = ddata[il];
+                  recordPatchStat(patch_num, val, i);
+                  il++;
+               }
+            }
+         }
+      }
+   }
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Statistic.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Statistic.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Class to record statistics during program execution. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Utility functions to retrieve statistic name and type information.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD std::string Statistic::getName() const
+{
+   return d_object_name;
+}
+
+SAMRAI_INLINE_KEYWORD std::string Statistic::getType() const
+{
+   return (d_stat_type == PROC_STAT) ? "PROC_STAT" : "PATCH_STAT";
+}
+
+SAMRAI_INLINE_KEYWORD int Statistic::getInstanceId() const
+{
+   return d_instance_id;
+}
+
+SAMRAI_INLINE_KEYWORD int Statistic::getStatSequenceLength() const
+{
+   return d_seq_counter;
+}
+
+SAMRAI_INLINE_KEYWORD void Statistic::reset() {
+   d_proc_array.clear();
+   d_patch_array.clear();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Protected utility functions to retrieve statistic record data.        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD const Array<Statistic::ProcStat>&
+Statistic::getProcStatSeqArray() const
+{
+   return d_proc_array;
+}
+
+SAMRAI_INLINE_KEYWORD const Array<Statistic::PatchStat>&
+Statistic::getPatchStatSeqArray() const
+{
+   return d_patch_array;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return false indicating that statistic data size cannot be computed   *
+ * on each processor a priori.  This can probably be optimized later.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD bool Statistic::canEstimateDataStreamSize()
+{
+   return false;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Statistic.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Statistic.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,318 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Class to record statistics during program execution. 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_Statistic
+#define included_tbox_Statistic
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/MessageStream.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/List.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace tbox {
+
+class Statistician;
+
+/**
+ * Class Statistic defines a simple object that can be used to record
+ * information generated during the course of a simulation for post-
+ * processing later.  Each statistic object is created by the singleton
+ * Statistian object and is defined by a name string
+ * identifier and is characterized by the sort of information it may record.
+ * Depending on how the object is created, it may record processor
+ * information (i.e., a separate value for each processor), or patch
+ * information (i.e., a separate value for each patch on each processor).
+ * An example of the former may be the total number of cells on each
+ * processor.  An example of the second may be the number of cells on each
+ * patch.  Each recorded data item may be any numerical value, but it
+ * will always be stored as a double for simplicity.  The string identifier
+ * for a processor stat is "PROC_STAT" and the string identifier for a
+ * patch stat is "PATCH_STAT".
+ *
+ * An example use of a Statistic to record the number of gridcells on each
+ * processor is as follows:
+ *
+ *    Pointer<Statistic> stat_num_gridcells =
+ *        Statistician::getStatistician()->
+ *        getStatistic("NumberGridcells", "PROC_STAT");
+ *    ...
+ *    stat_num_gridcells->recordProcStat(num_cells_on_proc);
+ *    ...
+ *
+ * The type of the statistic restricts the way in which the statistic
+ * object may be used to record information.  For a "processor" stat
+ * only the recordProcStat() functions can be used.  For a "patch"
+ * stat only the recordPatchStat() functions can be used.
+ *
+ * Typically, the information is recorded to generate a time sequence of
+ * values.  But this need not be the case always.  An optional time
+ * stamp may be provided for each value as it is recorded.  In any case,
+ * the sequence order of the values is determined by the recording order.
+ *
+ * Also, the Statistician class is used to manage Statistic
+ * objects.  It provided a global point of access for creating and accessing
+ * statistic objects and supports post-processing statistic information
+ * in parallel.
+ *
+ * In some cases, it may be desirable to record information for each
+ * level in a calculation; e.g., the number of cells on each processor
+ * on level zero, level 1, etc.  In this case, one can cimply create a
+ * separate statistic object for each level.
+ *
+ * @see tbox::Statistician
+ */
+
+class Statistic:public DescribedClass
+{
+   friend class Statistician;
+public:
+   /**
+    * Virtual destructor destroys recorded object data.
+    */
+   virtual ~Statistic();
+
+   /**
+    * Return string name identifier for statistic object.
+    */
+   std::string
+   getName() const;
+
+   /**
+    * Return string statistic type identifier for statistic object.
+    */
+   std::string
+   getType() const;
+
+   /**
+    * Return integer instance identifier for statistic object.
+    */
+   int
+   getInstanceId() const;
+
+   /**
+    * Return integer length of list of statistic sequence records.
+    * This value is either the length of the processor statistic list
+    * or the patch statistic list, whichever corresponds to the statistic
+    * type.
+    */
+   int
+   getStatSequenceLength() const;
+
+   /**
+    * Reset the state of the statistic information.
+    */
+   void
+   reset();
+
+   /**
+    * Record double processor statistic value. The optional sequence number
+    * argument identifies where in timestep sequence the value should be.
+    * If the sequence number is not specified, an internal counter will
+    * determine the appropriate sequence number. When assertion checking
+    * is active, an unrecoverable assertion will result if this function
+    * is called and "PATCH_STAT" was specified in the constructor.
+    */
+   void
+   recordProcStat(
+      double value,
+      int seq_num = -1);
+
+   /**
+    * Record double patch statistic value.  The patch number refers to
+    * the global patch number on a level.  The sequence number
+    * argument identifies where in timestep sequence the value should be.
+    * The sequence number MUST be explicitly specified because the number
+    * of patches on each processor will generally be different at
+    * each sequence step.  When assertion checking is active, an
+    * unrecoverable assertion will result if this function is called and
+    * "PROC_STAT" was specified in the constructor.
+    */
+   void
+   recordPatchStat(
+      int patch_num,
+      double value,
+      int seq_num);
+
+   /**
+    * Return true if size of stream required to pack all statistic
+    * data can be determined for all processors without exchanging
+    * any details of structure of statistic data.  Otherwise, return false.
+    */
+   bool
+   canEstimateDataStreamSize();
+
+   /**
+    * Return integer number of bytes needed to stream the statistic data.
+    * This is the amount needed by the stat transaction class.
+    */
+   int
+   getDataStreamSize();
+
+   /**
+    * Pack contents of statistic data structure into message stream.
+    */
+   void
+   packStream(
+      MessageStream& stream);
+
+   /**
+    * Unpack contents of statistic data structure from message stream.
+    */
+   void
+   unpackStream(
+      MessageStream& stream);
+
+   /**
+    * Print statistic data to given output stream.  Floating point precision
+    * can be specified (default is 12).
+    */
+   virtual void
+   printClassData(
+      std::ostream& stream,
+      int precision = 12) const;
+
+   /**
+    * Write statistic data members to database. When assertion checking
+    * is on, the database pointer must be non-null.
+    */
+   virtual void
+   putToDatabase(
+      Pointer<Database> db);
+
+   /**
+    * Read restarted times from restart database.  When assertion checking
+    * is on, the database pointer must be non-null.
+    */
+   virtual void
+   getFromRestart(
+      Pointer<Database> db);
+
+   /*
+    * These structures are used to store statistic data entries.
+    * They need to be declared public for the Sun CC compiler.
+    */
+   struct ProcStat {
+      double value;        // stat record value
+   };
+
+   struct PatchStatRecord {
+      int patch_id;         // global patch number
+      double value;         // stat record value
+   };
+
+   struct PatchStat {
+#ifdef LACKS_NAMESPACE_IN_DECLARE
+      List<PatchStatRecord> patch_records; // stat record
+#else
+      List<Statistic::PatchStatRecord> patch_records; // stat record
+#endif
+   };
+
+protected:
+   /**
+    * The constructor for the Statistic class sets the name string
+    * and the statistic type for a statistic object.
+    */
+   Statistic(
+      const std::string& name,
+      const std::string& stat_type,
+      int instance_id);
+
+   /**
+    * Return const reference to list of processor records.
+    */
+#ifdef LACKS_NAMESPACE_IN_DECLARE
+   const Array<ProcStat>&
+   getProcStatSeqArray() const;
+#else
+   const Array<Statistic::ProcStat>&
+   getProcStatSeqArray() const;
+#endif
+
+   /**
+    * Return const reference to list of patch records.
+    */
+#ifdef LACKS_NAMESPACE_IN_DECLARE
+   const Array<PatchStat>&
+   getPatchStatSeqArray() const;
+#else
+   const Array<Statistic::PatchStat>&
+   getPatchStatSeqArray() const;
+#endif
+
+private:
+   /*
+    * Static double value used to indicate when a particular sequence entry
+    * is skipped.
+    */
+   static double s_empty_seq_tag_entry;
+
+   /*
+    * Assess whether the processor or patch stat arrays need to be resized.
+    */
+   void
+   checkArraySizes(
+      int seq_num);
+
+   // The following two members are not implemented
+   Statistic(
+      const Statistic&);
+   void
+   operator = (
+      const Statistic&);
+
+   /*
+    * The enumerated type maps statistic types to integers.
+    */
+   enum STATISTIC_RECORD_TYPE { PROC_STAT = 0, PATCH_STAT = 1 };
+
+   /*
+    * Name, instance id, and type identifier for this statistic object.
+    */
+   std::string d_object_name;
+   int d_instance_id;
+   int d_stat_type;            // see STATISTIC_RECORD_TYPE above.
+
+   /*
+    * Arrays of records.  Note that one of these will always be empty.
+    * Integer sequence length refers to length of list corresponding
+    * to stat type.
+    */
+#ifdef LACKS_NAMESPACE_IN_DECLARE
+   Array<ProcStat> d_proc_array;
+   Array<PatchStat> d_patch_array;
+#else
+   Array<Statistic::ProcStat> d_proc_array;
+   Array<Statistic::PatchStat> d_patch_array;
+#endif
+
+   /*
+    * Sequence and patch counters (NOTE: patch counter use for patch stats
+    * only) and high-water-mark array sizes for proc and patch stats.
+    */
+   int d_seq_counter;
+   int d_total_patch_entries;
+   int d_proc_stat_array_size;
+   int d_patch_stat_array_size;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/tbox/Statistic.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Statistician.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Statistician.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,2701 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Singleton manager class for statistic objects. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Statistician.h"
+
+#include "SAMRAI/tbox/IOStream.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/Schedule.h"
+#include "SAMRAI/tbox/StatTransaction.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+#ifndef TBOX_STATISTICRESTARTDATABASE_VERSION
+#define TBOX_STATISTICRESTARTDATABASE_VERSION (1)
+#endif
+
+Statistician * Statistician::s_statistician_instance =
+   (Statistician *)NULL;
+
+StartupShutdownManager::Handler
+Statistician::s_finalize_handler(
+   Statistician::initializeCallback,
+   0,
+   Statistician::shutdownCallback,
+   Statistician::finalizeCallback,
+   StartupShutdownManager::priorityStatistician);
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Static statistician member functions.                                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+Statistician *Statistician::createStatistician(
+   bool register_for_restart,
+   bool read_from_restart)
+{
+   makeStatisticianInstance(register_for_restart, read_from_restart);
+   return s_statistician_instance;
+}
+
+Statistician *Statistician::getStatistician()
+{
+   /* Should have instance constructed in initializeCallback */
+   TBOX_ASSERT(s_statistician_instance);
+
+   return s_statistician_instance;
+}
+
+void Statistician::initializeCallback()
+{
+   if (!s_statistician_instance) {
+      makeStatisticianInstance();
+   }
+}
+
+void Statistician::shutdownCallback()
+{
+   if (s_statistician_instance) {
+      if (s_statistician_instance->d_restart_database_instance) {
+         delete s_statistician_instance->d_restart_database_instance;
+      }
+      s_statistician_instance->d_restart_database_instance = 0;
+   }
+}
+
+void Statistician::finalizeCallback()
+{
+   if (s_statistician_instance) {
+      delete s_statistician_instance;
+      s_statistician_instance = 0;
+   }
+}
+
+void Statistician::registerSingletonSubclassInstance(
+   Statistician* subclass_instance)
+{
+   if (!s_statistician_instance) {
+      s_statistician_instance = subclass_instance;
+   } else {
+      TBOX_ERROR("Statistician internal error...\n"
+         << "Attemptng to set Singleton instance to subclass instance,"
+         << "\n but Singleton instance already set." << std::endl);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Protected statistician constructor and destructor.                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+Statistician::Statistician():
+   d_has_gathered_stats(false)
+{
+   d_restart_database_instance = (StatisticRestartDatabase *)NULL;
+
+   d_must_call_finalize = true;
+
+   setMaximumNumberOfStatistics(DEFAULT_NUMBER_OF_TIMERS_INCREMENT);
+
+   d_num_proc_stats = 0;
+   d_num_patch_stats = 0;
+
+}
+
+Statistician::~Statistician()
+{
+   if (d_restart_database_instance) delete d_restart_database_instance;
+
+   d_proc_statistics.resizeArray(0);
+   d_patch_statistics.resizeArray(0);
+
+   d_num_proc_stats = 0;
+   d_num_patch_stats = 0;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private members for creating and managing the singleton instance.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Statistician::makeStatisticianInstance(
+   bool register_for_restart,
+   bool read_from_restart)
+{
+   /* If reading from restart then force new instance
+    * to be created from existing state in the
+    * restart file */
+   if (read_from_restart) {
+      delete s_statistician_instance;
+      s_statistician_instance = 0;
+   }
+
+   if (!s_statistician_instance) {
+      s_statistician_instance = new Statistician();
+      s_statistician_instance->initRestartDatabase(register_for_restart,
+         read_from_restart);
+   }
+}
+
+void Statistician::initRestartDatabase(
+   bool register_for_restart,
+   bool read_from_restart)
+{
+   d_restart_database_instance =
+      new StatisticRestartDatabase("StatisticRestartDatabase",
+         register_for_restart,
+         read_from_restart);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Utility functions for getting statistics, adding them to the          *
+ * database, checking whether a particular statistic exists, resetting.  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+Pointer<Statistic> Statistician::getStatistic(
+   const std::string& name,
+   const std::string& stat_type)
+{
+   TBOX_ASSERT(!name.empty());
+   TBOX_ASSERT(!stat_type.empty());
+
+   Pointer<Statistic> stat;
+
+   bool found = false;
+
+   if (stat_type == "PROC_STAT") {
+
+      for (int i = 0; i < d_num_proc_stats; i++) {
+         if (d_proc_statistics[i]->getName() == name) {
+            stat = d_proc_statistics[i];
+            found = true;
+            break;
+         }
+      }
+
+      if (!found) {
+         if (d_num_proc_stats ==
+             Statistician::getMaximumNumberOfStatistics()) {
+            setMaximumNumberOfStatistics(
+               Statistician::getMaximumNumberOfStatistics()
+               + DEFAULT_NUMBER_OF_TIMERS_INCREMENT);
+         }
+         stat = new Statistic(name, stat_type, d_num_proc_stats);
+         d_proc_statistics[d_num_proc_stats] = stat;
+         d_num_proc_stats++;
+         d_must_call_finalize = true;
+      }
+
+   } else if (stat_type == "PATCH_STAT") {
+
+      for (int i = 0; i < d_num_patch_stats; i++) {
+         if (d_patch_statistics[i]->getName() == name) {
+            stat = d_patch_statistics[i];
+            found = true;
+            break;
+         }
+      }
+
+      if (!found) {
+         if (d_num_patch_stats ==
+             Statistician::getMaximumNumberOfStatistics()) {
+            setMaximumNumberOfStatistics(
+               Statistician::getMaximumNumberOfStatistics()
+               + DEFAULT_NUMBER_OF_TIMERS_INCREMENT);
+         }
+         stat = new Statistic(name, stat_type, d_num_patch_stats);
+         d_patch_statistics[d_num_patch_stats] = stat;
+         d_num_patch_stats++;
+         d_must_call_finalize = true;
+      }
+
+   } else {
+      TBOX_ERROR("Statistician::getStatistic error ..."
+         << "\n   Unrecognized stat type string " << stat_type
+         << "passed to routine." << std::endl);
+   }
+
+   return stat;
+
+}
+
+bool Statistician::checkStatisticExists(
+   Pointer<Statistic>& stat,
+   const std::string& name) const
+{
+   TBOX_ASSERT(!name.empty());
+
+   if (checkProcStatExists(stat, name)) {
+      return true;
+   }
+
+   if (checkPatchStatExists(stat, name)) {
+      return true;
+   }
+
+   return false;
+
+}
+
+bool Statistician::checkProcStatExists(
+   Pointer<Statistic>& stat,
+   const std::string& name) const
+{
+   stat.setNull();
+
+   bool stat_found = false;
+   for (int i = 0; i < d_num_proc_stats; i++) {
+      if (d_proc_statistics[i]->getName() == name) {
+         stat_found = true;
+         stat = d_proc_statistics[i];
+         break;
+      }
+   }
+
+   return stat_found;
+}
+
+bool Statistician::checkPatchStatExists(
+   Pointer<Statistic>& stat,
+   const std::string& name) const
+{
+   stat.setNull();
+
+   bool stat_found = false;
+   for (int i = 0; i < d_num_patch_stats; i++) {
+      if (d_patch_statistics[i]->getName() == name) {
+         stat_found = true;
+         stat = d_patch_statistics[i];
+         break;
+      }
+   }
+
+   return stat_found;
+}
+
+void Statistician::resetProcessorStatistics()
+{
+   for (int i = 0; i < d_num_proc_stats; i++) {
+      d_proc_statistics[i]->reset();
+   }
+   d_must_call_finalize = true;
+}
+
+void Statistician::resetPatchStatistics()
+{
+   for (int i = 0; i < d_num_patch_stats; i++) {
+      d_patch_statistics[i]->reset();
+   }
+   d_must_call_finalize = true;
+}
+
+void Statistician::resetStatistics()
+{
+   resetProcessorStatistics();
+   resetPatchStatistics();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Utility functions to retrieve global statistic data from              *
+ * statistician database.                                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int Statistician::getProcStatId(
+   const std::string& name) const
+{
+   int ret_val = -1;
+
+   if (!name.empty()) {
+      Pointer<Statistic> stat;
+      if (checkProcStatExists(stat, name)) {
+         ret_val = stat->getInstanceId();
+      }
+   }
+
+   return ret_val;
+
+}
+
+int Statistician::getGlobalProcStatSequenceLength(
+   int proc_stat_id)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   int seq_len = -1;
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      TBOX_ASSERT(proc_stat_id >= 0 &&
+         proc_stat_id < d_global_proc_stat_data.getSize());
+
+      seq_len = d_global_proc_stat_data[proc_stat_id].getSize();
+   }
+
+   return seq_len;
+
+}
+
+double Statistician::getGlobalProcStatValue(
+   int proc_stat_id,
+   int seq_num,
+   int proc_num)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   double val = 0.;
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::getGlobalProcStatValue ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      TBOX_ASSERT(proc_stat_id >= 0 &&
+         proc_stat_id < d_global_proc_stat_data.getSize());
+      TBOX_ASSERT(seq_num >= 0 &&
+         seq_num < d_global_proc_stat_data[proc_stat_id].getSize());
+      TBOX_ASSERT(proc_num < mpi.getSize());
+
+      val = d_global_proc_stat_data[proc_stat_id][seq_num][proc_num];
+   }
+
+   return val;
+}
+
+double Statistician::getGlobalProcStatSum(
+   int proc_stat_id,
+   int seq_num)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   double sum = 0.;
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSum ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+
+      TBOX_ASSERT(proc_stat_id >= 0 &&
+         proc_stat_id < d_global_proc_stat_sum.getSize());
+      TBOX_ASSERT(seq_num >= 0 &&
+         seq_num < d_global_proc_stat_sum[proc_stat_id].getSize());
+
+      sum = d_global_proc_stat_sum[proc_stat_id][seq_num];
+   }
+
+   return sum;
+}
+
+double Statistician::getGlobalProcStatMax(
+   int proc_stat_id,
+   int seq_num)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   double pmax = -(tbox::MathUtilities<double>::getMax());
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::getGlobalProcStatMax ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+
+      TBOX_ASSERT(proc_stat_id >= 0 &&
+         proc_stat_id < d_global_proc_stat_max.getSize());
+      TBOX_ASSERT(seq_num >= 0 &&
+         seq_num < d_global_proc_stat_max[proc_stat_id].getSize());
+
+      pmax = d_global_proc_stat_max[proc_stat_id][seq_num];
+   }
+
+   return pmax;
+}
+
+int Statistician::getGlobalProcStatMaxProcessorId(
+   int proc_stat_id,
+   int seq_num)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   int id = -1;
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::getGlobalProcStatMaxProcId ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+
+      TBOX_ASSERT(proc_stat_id >= 0 &&
+         proc_stat_id < d_global_proc_stat_data.getSize());
+      TBOX_ASSERT(seq_num >= 0 &&
+         seq_num < d_global_proc_stat_imax[proc_stat_id].getSize());
+
+      id = d_global_proc_stat_imax[proc_stat_id][seq_num];
+
+   }
+
+   return id;
+}
+
+double Statistician::getGlobalProcStatMin(
+   int proc_stat_id,
+   int seq_num)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   double pmin = tbox::MathUtilities<double>::getMax();
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::getGlobalProcStatMin ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+
+      TBOX_ASSERT(proc_stat_id >= 0 &&
+         proc_stat_id < d_global_proc_stat_min.getSize());
+      TBOX_ASSERT(seq_num >= 0 &&
+         seq_num < d_global_proc_stat_min[proc_stat_id].getSize());
+
+      pmin = d_global_proc_stat_min[proc_stat_id][seq_num];
+   }
+
+   return pmin;
+}
+
+int Statistician::getGlobalProcStatMinProcessorId(
+   int proc_stat_id,
+   int seq_num)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   int id = -1;
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::getGlobalProcStatMinProcId ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+
+      TBOX_ASSERT(proc_stat_id >= 0 &&
+         proc_stat_id < d_global_proc_stat_imin.getSize());
+      TBOX_ASSERT(seq_num >= 0 &&
+         seq_num < d_global_proc_stat_imin[proc_stat_id].getSize());
+
+      id = d_global_proc_stat_imin[proc_stat_id][seq_num];
+   }
+
+   return id;
+}
+
+void Statistician::printGlobalProcStatData(
+   int proc_stat_id,
+   std::ostream& os,
+   int precision)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::printGlobalProcStatData ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      TBOX_ASSERT(proc_stat_id >= 0);
+      TBOX_ASSERT(precision > 0);
+
+      os.precision(precision);
+
+      os << "\n   " << proc_stat_id << ":    "
+      << d_proc_statistics[proc_stat_id]->getName() << std::endl;
+
+      int nnodes = mpi.getSize();
+      const Array<Array<double> >& sdata =
+         d_global_proc_stat_data[proc_stat_id];
+
+      for (int ipsl = 0; ipsl < sdata.getSize(); ipsl++) {
+         os << "      Seq # " << ipsl << std::endl;
+         os << "         proc : value" << std::endl;
+         for (int ip = 0; ip < nnodes; ip++) {
+            /*
+             * Write out data only if data entry is NOT an "empty"
+             * entry, defined by the Statistic::s_empty_seq_tag_entry
+             * value.
+             */
+            if (!(MathUtilities<double>::equalEps(sdata[ipsl][ip],
+                     Statistic::s_empty_seq_tag_entry))) {
+               os << "         " << ip << "    : " << sdata[ipsl][ip]
+               << std::endl;
+            }
+         }
+      }
+   }
+
+}
+
+void Statistician::printGlobalProcStatDataFormatted(
+   int proc_stat_id,
+   std::ostream& os,
+   int precision)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::printGlobalPatchStatDataFormatted"
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      TBOX_ASSERT(proc_stat_id >= 0);
+      TBOX_ASSERT(precision > 0);
+
+      os.precision(precision);
+
+      /*
+       * Output in C++ is by default right justified with the setw()
+       * option e.g. cout << "[" << setw(5) << 1 << "]" will output
+       * [   1].  Using setf(ios::left) makes it left justified, which
+       * is more convenient to output columns of tables.
+       */
+      os.setf(std::ios::left);
+      int s, n;
+      int nnodes = mpi.getSize();
+
+      // heading - line 1
+      os << "Seq#\t";
+      for (n = 0; n < nnodes; n++) {
+         os << "Proc\t";
+      }
+      os << std::endl;
+
+      // heading - line 2
+      os << "    \t";
+      for (n = 0; n < nnodes; n++) {
+         os << n << "\t";
+      }
+      os << std::endl;
+
+      /*
+       * Now print values.
+       */
+      const Array<Array<double> >& sdata =
+         d_global_proc_stat_data[proc_stat_id];
+      for (s = 0; s < sdata.getSize(); s++) {
+         os << s << "\t";
+         for (n = 0; n < nnodes; n++) {
+            /*
+             * Write out data only if data entry is NOT an "empty"
+             * entry, defined by the Statistic::s_empty_seq_tag_entry
+             * value.
+             */
+            if (MathUtilities<double>::equalEps(sdata[s][n],
+                   Statistic::s_empty_seq_tag_entry)) {
+               os << "  " << "\t";
+            } else {
+               os << sdata[s][n] << "\t";
+            }
+
+         }
+         os << std::endl;
+      }
+
+   }
+
+}
+
+void Statistician::printGlobalProcStatDataFormatted(
+   int proc_stat_id,
+   int proc_id,
+   std::ostream& os,
+   int precision)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::printGlobalPatchStatDataFormatted"
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      TBOX_ASSERT(proc_stat_id >= 0);
+      TBOX_ASSERT(proc_id >= 0);
+      TBOX_ASSERT(precision > 0);
+
+      os.precision(precision);
+
+      /*
+       * Output in C++ is by default right justified with the setw()
+       * option e.g. cout << "[" << setw(5) << 1 << "]" will output
+       * [   1].  Using setf(ios::left) makes it left justified, which
+       * is more convenient to output columns of tables.
+       */
+      os.setf(std::ios::left);
+      int s;
+
+      // heading - line 1
+      os << "Seq#\t" << "Proc\t" << std::endl;
+
+      // heading - line 2
+      os << "    \t" << proc_id << "\t" << std::endl;
+
+      /*
+       * Now print values.
+       */
+      const Array<Array<double> >& sdata =
+         d_global_proc_stat_data[proc_stat_id];
+      for (s = 0; s < sdata.getSize(); s++) {
+         os << s << "\t";
+         /*
+          * Write out data only if data entry is NOT an "empty"
+          * entry, defined by the Statistic::s_empty_seq_tag_entry
+          * value.
+          */
+         if (MathUtilities<double>::equalEps(sdata[s][proc_id],
+                Statistic::s_empty_seq_tag_entry)) {
+            os << "  " << "\t";
+         } else {
+            os << sdata[s][proc_id] << "\t";
+         }
+         os << std::endl;
+      }
+
+   }
+
+}
+
+int Statistician::getPatchStatId(
+   const std::string& name) const
+{
+   int ret_val = -1;
+
+   if (!name.empty()) {
+      Pointer<Statistic> stat;
+      if (checkPatchStatExists(stat, name)) {
+         ret_val = stat->getInstanceId();
+      }
+   }
+
+   return ret_val;
+
+}
+
+int Statistician::getGlobalPatchStatSequenceLength(
+   int patch_stat_id)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   int seq_len = -1;
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLen ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      TBOX_ASSERT(patch_stat_id >= 0 &&
+         patch_stat_id < d_global_patch_stat_data.getSize());
+
+      seq_len = d_global_patch_stat_data[patch_stat_id].getSize();
+   }
+
+   return seq_len;
+
+}
+
+int Statistician::getGlobalPatchStatNumberPatches(
+   int patch_stat_id,
+   int seq_num)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   int num_patches = -1;
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::getGlobalProcStatNumPatches ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      TBOX_ASSERT(patch_stat_id >= 0 &&
+         patch_stat_id < d_global_patch_stat_data.getSize());
+      TBOX_ASSERT(seq_num >= 0 &&
+         seq_num < d_global_patch_stat_data[patch_stat_id].getSize());
+
+      num_patches =
+         d_global_patch_stat_data[patch_stat_id][seq_num].getSize();
+   }
+
+   return num_patches;
+
+}
+
+int Statistician::getGlobalPatchStatPatchMapping(
+   int patch_stat_id,
+   int seq_num,
+   int patch_num)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   int mapping = -1;
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::getGlobalPatchStatPatchMapping ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      TBOX_ASSERT(patch_stat_id >= 0 &&
+         patch_stat_id < d_global_patch_stat_mapping.getSize());
+      TBOX_ASSERT(seq_num >= 0 &&
+         seq_num < d_global_patch_stat_mapping[patch_stat_id].getSize());
+      TBOX_ASSERT(patch_num >= 0 &&
+         patch_num < d_global_patch_stat_mapping[patch_stat_id][seq_num].
+         getSize());
+
+      mapping =
+         d_global_patch_stat_mapping[patch_stat_id][seq_num][patch_num];
+   }
+
+   return mapping;
+}
+
+double Statistician::getGlobalPatchStatValue(
+   int patch_stat_id,
+   int seq_num,
+   int patch_num)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   double val = 0.;
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::getGlobalPatchStatValue ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      TBOX_ASSERT(patch_stat_id >= 0 &&
+         patch_stat_id < d_global_patch_stat_data.getSize());
+      TBOX_ASSERT(seq_num >= 0 &&
+         seq_num < d_global_patch_stat_data[patch_stat_id].getSize());
+      TBOX_ASSERT(patch_num >= 0 &&
+         patch_num < d_global_patch_stat_data[patch_stat_id][seq_num].
+         getSize());
+      val = d_global_patch_stat_data[patch_stat_id][seq_num][patch_num];
+   }
+
+   return val;
+}
+
+double Statistician::getGlobalPatchStatSum(
+   int patch_stat_id,
+   int seq_num)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   double sum = 0.;
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::gettGlobalPatchStatSum ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      TBOX_ASSERT(patch_stat_id >= 0 &&
+         patch_stat_id < d_global_patch_stat_data.getSize());
+      TBOX_ASSERT(seq_num >= 0 &&
+         seq_num < d_global_patch_stat_data[patch_stat_id].getSize());
+
+      int num_patches = d_global_patch_stat_data[patch_stat_id][seq_num].
+         getSize();
+
+      for (int np = 0; np < num_patches; np++) {
+         sum += d_global_patch_stat_data[patch_stat_id][seq_num][np];
+      }
+   }
+
+   return sum;
+}
+
+double Statistician::getGlobalPatchStatMax(
+   int patch_stat_id,
+   int seq_num)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   double pmax = -(tbox::MathUtilities<double>::getMax());
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::getGlobalPatchStatMax ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      TBOX_ASSERT(patch_stat_id >= 0 &&
+         patch_stat_id < d_global_patch_stat_data.getSize());
+      TBOX_ASSERT(seq_num >= 0 &&
+         seq_num < d_global_patch_stat_data[patch_stat_id].getSize());
+
+      int num_patches = d_global_patch_stat_data[patch_stat_id][seq_num].
+         getSize();
+      double val = pmax;
+      for (int np = 0; np < num_patches; np++) {
+         val = d_global_patch_stat_data[patch_stat_id][seq_num][np];
+         pmax = (val > pmax ? val : pmax);
+      }
+   }
+
+   return pmax;
+}
+
+int Statistician::getGlobalPatchStatMaxPatchId(
+   int patch_stat_id,
+   int seq_num)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   double pmax = -(tbox::MathUtilities<double>::getMax());
+   int id = -1;
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::getGlobalPatchStatMaxPatchId ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      TBOX_ASSERT(patch_stat_id >= 0 &&
+         patch_stat_id < d_global_patch_stat_data.getSize());
+      TBOX_ASSERT(seq_num >= 0 &&
+         seq_num < d_global_patch_stat_data[patch_stat_id].getSize());
+
+      int num_patches = d_global_patch_stat_data[patch_stat_id][seq_num].
+         getSize();
+      double val = pmax;
+      for (int np = 0; np < num_patches; np++) {
+         val = d_global_patch_stat_data[patch_stat_id][seq_num][np];
+         if (val > pmax) {
+            id = np;
+            pmax = val;
+         }
+      }
+
+   }
+   return id;
+}
+
+double Statistician::getGlobalPatchStatMin(
+   int patch_stat_id,
+   int seq_num)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   double pmin = tbox::MathUtilities<double>::getMax();
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::getGlobalPatchStatMin ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      TBOX_ASSERT(patch_stat_id >= 0 &&
+         patch_stat_id < d_global_patch_stat_data.getSize());
+      TBOX_ASSERT(seq_num >= 0 &&
+         seq_num < d_global_patch_stat_data[patch_stat_id].getSize());
+
+      int num_patches = d_global_patch_stat_data[patch_stat_id][seq_num].
+         getSize();
+      double val = pmin;
+      for (int np = 0; np < num_patches; np++) {
+         val = d_global_patch_stat_data[patch_stat_id][seq_num][np];
+         pmin = (val < pmin ? val : pmin);
+      }
+   }
+
+   return pmin;
+}
+
+int Statistician::getGlobalPatchStatMinPatchId(
+   int patch_stat_id,
+   int seq_num)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   double pmin = tbox::MathUtilities<double>::getMax();
+   int id = -1;
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::getGlobalPatchStatMinPatchId ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      TBOX_ASSERT(patch_stat_id >= 0 &&
+         patch_stat_id < d_global_patch_stat_data.getSize());
+      TBOX_ASSERT(seq_num >= 0 &&
+         seq_num < d_global_patch_stat_data[patch_stat_id].getSize());
+
+      int num_patches = d_global_patch_stat_data[patch_stat_id][seq_num].
+         getSize();
+      double val = pmin;
+      for (int np = 0; np < num_patches; np++) {
+         val = d_global_patch_stat_data[patch_stat_id][seq_num][np];
+         if (val < pmin) {
+            id = np;
+            pmin = val;
+         }
+      }
+   }
+
+   return id;
+
+}
+
+double Statistician::getGlobalPatchStatProcessorSum(
+   int patch_stat_id,
+   int processor_id,
+   int seq_num)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   double sum = -1.;
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::getGlobalPatchStatProcSum ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      TBOX_ASSERT(patch_stat_id >= 0 &&
+         patch_stat_id < d_global_patch_stat_proc_data.getSize());
+      TBOX_ASSERT(processor_id >= 0 &&
+         processor_id < mpi.getSize());
+      TBOX_ASSERT(seq_num >= 0 &&
+         seq_num < d_global_patch_stat_proc_data[patch_stat_id].getSize());
+      sum =
+         d_global_patch_stat_proc_data[patch_stat_id][seq_num][processor_id];
+   }
+
+   return sum;
+}
+
+double Statistician::getGlobalPatchStatProcessorSumMax(
+   int patch_stat_id,
+   int seq_num)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   double pmax = -(tbox::MathUtilities<double>::getMax());
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::gettGlobalPatchStatProcSumMax ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      TBOX_ASSERT(patch_stat_id >= 0 &&
+         patch_stat_id < d_global_patch_stat_proc_data.getSize());
+      TBOX_ASSERT(seq_num >= 0 &&
+         seq_num < d_global_patch_stat_proc_data[patch_stat_id].getSize());
+
+      double val = pmax;
+      for (int np = 0; np < mpi.getSize(); np++) {
+         val = d_global_patch_stat_proc_data[patch_stat_id][seq_num][np];
+         pmax = (val > pmax ? val : pmax);
+      }
+   }
+
+   return pmax;
+}
+
+int Statistician::getGlobalPatchStatProcessorSumMaxId(
+   int patch_stat_id,
+   int seq_num)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   double pmax = -(tbox::MathUtilities<double>::getMax());
+   int id = -1;
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::getGlobalPatchStatMaxProcSumId ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      TBOX_ASSERT(patch_stat_id >= 0 &&
+         patch_stat_id < d_global_patch_stat_proc_data.getSize());
+      TBOX_ASSERT(seq_num >= 0 &&
+         seq_num < d_global_patch_stat_proc_data[patch_stat_id].getSize());
+
+      double val = pmax;
+      for (int np = 0; np < mpi.getSize(); np++) {
+         val = d_global_patch_stat_proc_data[patch_stat_id][seq_num][np];
+         if (val > pmax) {
+            id = np;
+            pmax = val;
+         }
+      }
+   }
+   return id;
+}
+
+double Statistician::getGlobalPatchStatProcessorSumMin(
+   int patch_stat_id,
+   int seq_num)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   double pmin = tbox::MathUtilities<double>::getMax();
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::getGlobalPatchStatProcSumMin ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      TBOX_ASSERT(patch_stat_id >= 0 &&
+         patch_stat_id < d_global_patch_stat_proc_data.getSize());
+      TBOX_ASSERT(seq_num >= 0 &&
+         seq_num < d_global_patch_stat_proc_data[patch_stat_id].getSize());
+
+      double val = pmin;
+
+      for (int np = 0; np < mpi.getSize(); np++) {
+         val = d_global_patch_stat_proc_data[patch_stat_id][seq_num][np];
+         pmin = (val < pmin ? val : pmin);
+      }
+   }
+
+   return pmin;
+}
+
+int Statistician::getGlobalPatchStatProcessorSumMinId(
+   int patch_stat_id,
+   int seq_num)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   double pmin = tbox::MathUtilities<double>::getMax();
+   int id = -1;
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::getGlobalPatchStatProcSumMinId ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      TBOX_ASSERT(patch_stat_id >= 0 &&
+         patch_stat_id < d_global_patch_stat_proc_data.getSize());
+      TBOX_ASSERT(seq_num >= 0 &&
+         seq_num < d_global_patch_stat_proc_data[patch_stat_id].getSize());
+
+      double val = pmin;
+      for (int np = 0; np < mpi.getSize(); np++) {
+         val = d_global_patch_stat_proc_data[patch_stat_id][seq_num][np];
+         if (val < pmin) {
+            id = np;
+            pmin = val;
+         }
+      }
+   }
+   return id;
+}
+
+int Statistician::getGlobalPatchStatNumberPatchesOnProc(
+   int patch_stat_id,
+   int seq_num,
+   int proc_id)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   TBOX_ASSERT(patch_stat_id >= 0 &&
+      patch_stat_id < d_global_patch_stat_data.getSize());
+   TBOX_ASSERT(seq_num >= 0 &&
+      seq_num < d_global_patch_stat_data[patch_stat_id].getSize());
+   TBOX_ASSERT(proc_id >= 0 &&
+      proc_id < mpi.getRank());
+   int num_patches = -1;
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::getGlobalPatchStatNumberPatchesOnProc"
+            << "\n   The finalize() method to construct global data "
+            << "must be called BEFORE this method." << std::endl);
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      num_patches =
+         d_global_patch_stat_mapping[patch_stat_id][seq_num][proc_id];
+   }
+
+   return num_patches;
+
+}
+
+int Statistician::getGlobalPatchStatMaxPatchesPerProc(
+   int patch_stat_id,
+   int seq_num)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   TBOX_ASSERT(patch_stat_id >= 0 &&
+      patch_stat_id < d_global_patch_stat_proc_data.getSize());
+   TBOX_ASSERT(seq_num >= 0 &&
+      seq_num < d_global_patch_stat_proc_data[patch_stat_id].getSize());
+
+   int pmax = -999999;
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::getGlobalPatchStatMaxPatchesPerProc"
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      int val = pmax;
+      Array<int> patches_per_proc;
+      patches_per_proc.resizeArray(mpi.getSize());
+
+      int num_patches = d_global_patch_stat_data[patch_stat_id][seq_num].
+         getSize();
+
+      int np, p;
+      for (np = 0; np < mpi.getSize(); np++) {
+         patches_per_proc[np] = 0;
+      }
+
+      for (p = 0; p < num_patches; p++) {
+         np = d_global_patch_stat_mapping[patch_stat_id][seq_num][np];
+         patches_per_proc[np]++;
+      }
+
+      for (np = 0; np < mpi.getSize(); np++) {
+         val = patches_per_proc[np];
+         pmax = (val > pmax ? val : pmax);
+      }
+   }
+
+   return pmax;
+}
+
+int Statistician::getGlobalPatchStatMaxPatchesPerProcId(
+   int patch_stat_id,
+   int seq_num)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   TBOX_ASSERT(patch_stat_id >= 0 &&
+      patch_stat_id < d_global_patch_stat_proc_data.getSize());
+   TBOX_ASSERT(seq_num >= 0 &&
+      seq_num < d_global_patch_stat_proc_data[patch_stat_id].getSize());
+
+   int pmax = -999999;
+   int id = -1;
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::getGlobalPatchStatMaxPatchesPerProcId"
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      int val = pmax;
+      Array<int> patches_per_proc;
+      patches_per_proc.resizeArray(mpi.getSize());
+
+      int num_patches = d_global_patch_stat_data[patch_stat_id][seq_num].
+         getSize();
+
+      int np, p;
+      for (np = 0; np < mpi.getSize(); np++) {
+         patches_per_proc[np] = 0;
+      }
+
+      for (p = 0; p < num_patches; p++) {
+         np = d_global_patch_stat_mapping[patch_stat_id][seq_num][np];
+         patches_per_proc[np]++;
+      }
+
+      for (np = 0; np < mpi.getSize(); np++) {
+         val = patches_per_proc[np];
+         if (val > pmax) {
+            id = np;
+            pmax = val;
+         }
+
+      }
+   }
+
+   return id;
+}
+
+int Statistician::getGlobalPatchStatMinPatchesPerProc(
+   int patch_stat_id,
+   int seq_num)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   TBOX_ASSERT(patch_stat_id >= 0 &&
+      patch_stat_id < d_global_patch_stat_proc_data.getSize());
+   TBOX_ASSERT(seq_num >= 0 &&
+      seq_num < d_global_patch_stat_proc_data[patch_stat_id].getSize());
+
+   int pmin = 999999;
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::getGlobalPatchStatMinPatchesPerProc"
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      TBOX_ASSERT(patch_stat_id >= 0 &&
+         patch_stat_id < d_global_patch_stat_data.getSize());
+      TBOX_ASSERT(seq_num >= 0 &&
+         seq_num < d_global_patch_stat_data[patch_stat_id].getSize());
+
+      int val = pmin;
+      Array<int> patches_per_proc;
+      patches_per_proc.resizeArray(mpi.getSize());
+
+      int num_patches = d_global_patch_stat_data[patch_stat_id][seq_num].
+         getSize();
+
+      int np, p;
+      for (np = 0; np < mpi.getSize(); np++) {
+         patches_per_proc[np] = 0;
+      }
+
+      for (p = 0; p < num_patches; p++) {
+         np = d_global_patch_stat_mapping[patch_stat_id][seq_num][np];
+         patches_per_proc[np]++;
+      }
+
+      for (np = 0; np < mpi.getSize(); np++) {
+         val = patches_per_proc[np];
+         pmin = (val < pmin ? val : pmin);
+      }
+
+   }
+
+   return pmin;
+}
+
+int Statistician::getGlobalPatchStatMinPatchesPerProcId(
+   int patch_stat_id,
+   int seq_num)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   TBOX_ASSERT(patch_stat_id >= 0 &&
+      patch_stat_id < d_global_patch_stat_proc_data.getSize());
+   TBOX_ASSERT(seq_num >= 0 &&
+      seq_num < d_global_patch_stat_proc_data[patch_stat_id].getSize());
+
+   int pmin = 9999999;
+   int id = -1;
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::getGlobalPatchStatMinPatchesPerProcId"
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      int val = pmin;
+      Array<int> patches_per_proc;
+      patches_per_proc.resizeArray(mpi.getSize());
+
+      int num_patches = d_global_patch_stat_data[patch_stat_id][seq_num].
+         getSize();
+
+      int np, p;
+      for (np = 0; np < mpi.getSize(); np++) {
+         patches_per_proc[np] = 0;
+      }
+
+      for (p = 0; p < num_patches; p++) {
+         np = d_global_patch_stat_mapping[patch_stat_id][seq_num][np];
+         patches_per_proc[np]++;
+      }
+
+      for (np = 0; np < mpi.getSize(); np++) {
+         val = patches_per_proc[np];
+         if (val < pmin) {
+            id = np;
+            pmin = val;
+         }
+
+      }
+   }
+
+   return id;
+}
+
+void Statistician::printGlobalPatchStatData(
+   int patch_stat_id,
+   std::ostream& os,
+   int precision)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::printGlobalPatchStatData ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      TBOX_ASSERT(patch_stat_id >= 0);
+      TBOX_ASSERT(precision > 0);
+
+      os.precision(precision);
+
+      os << "\n   " << patch_stat_id << ":    "
+      << d_patch_statistics[patch_stat_id]->getName() << std::endl;
+
+      const Array<Array<double> >& sdata =
+         d_global_patch_stat_data[patch_stat_id];
+      const Array<Array<int> >& spmap =
+         d_global_patch_stat_mapping[patch_stat_id];
+      for (int ipsl = 0; ipsl < sdata.getSize(); ipsl++) {
+         os << "      Seq # " << ipsl << std::endl;
+         os << "         patch[proc]: value" << std::endl;
+         for (int ip = 0; ip < sdata[ipsl].getSize(); ip++) {
+            /*
+             * Write out data only if data entry is NOT an "empty"
+             * entry, defined by the Statistic::s_empty_seq_tag_entry
+             * value.
+             */
+            if (!(MathUtilities<double>::equalEps(sdata[ipsl][ip],
+                     Statistic::s_empty_seq_tag_entry))) {
+               os << "         " << ip << "    [" << spmap[ipsl][ip]
+               << "]:    " << sdata[ipsl][ip] << std::endl;
+            }
+         }
+      }
+   }
+}
+
+void Statistician::printGlobalPatchStatDataFormatted(
+   int patch_stat_id,
+   std::ostream& os,
+   int precision)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::printGlobalPatchStatFormatted ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      TBOX_ASSERT(patch_stat_id >= 0);
+      TBOX_ASSERT(precision > 0);
+
+      os.precision(precision);
+
+      /*
+       * Output in C++ is by default right justified with the setw()
+       * option e.g. cout << "[" << setw(5) << 1 << "]" will output
+       * [   1].  Using setf(ios::left) makes it left justified, which
+       * is more convenient to output columns of tables.
+       */
+      os.setf(std::ios::left);
+      int s, n;
+      int npatches = 0;
+
+      /*
+       * Print tab-separated table header
+       */
+      const Array<Array<double> >& sdata =
+         d_global_patch_stat_data[patch_stat_id];
+      for (s = 0; s < sdata.getSize(); s++) {
+         int np_at_s = sdata[s].getSize();
+         npatches = (np_at_s > npatches ? np_at_s : npatches);
+      }
+
+      // heading - line 1
+      os << "Seq#\t";
+      for (n = 0; n < npatches; n++) {
+         os << "Patch\t";
+      }
+      os << std::endl;
+
+      // heading - line 2
+      os << "    \t";
+      for (n = 0; n < npatches; n++) {
+         os << n << "\t";
+      }
+      os << std::endl;
+
+      /*
+       * Now print values.
+       */
+      for (s = 0; s < sdata.getSize(); s++) {
+         os << s << "\t";
+         for (n = 0; n < sdata[s].getSize(); n++) {
+            /*
+             * Write out data only if data entry is NOT an "empty"
+             * entry, defined by the Statistic::s_empty_seq_tag_entry
+             * value.
+             */
+            if (MathUtilities<double>::equalEps(sdata[s][n],
+                   Statistic::s_empty_seq_tag_entry)) {
+               os << "  " << "\t";
+            } else {
+               os << sdata[s][n] << "\t";
+            }
+         }
+         os << std::endl;
+      }
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Gather all statistic data to processor zero for analysis.             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Statistician::finalize(
+   bool gather_individual_stats_on_proc_0)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   int nnodes = mpi.getSize();
+   int my_rank = mpi.getRank();
+
+   d_global_proc_stat_data.resizeArray(0);
+   d_global_patch_stat_data.resizeArray(0);
+   d_global_patch_stat_proc_data.resizeArray(0);
+   d_global_patch_stat_mapping.resizeArray(0);
+
+   Array<int> total_patches;
+   checkStatsForConsistency(total_patches);
+
+   reduceGlobalStatistics();
+
+   if (gather_individual_stats_on_proc_0) {
+
+      /*
+       * On processor zero, we create array structures to assemble
+       * global statistic information.   Note that the array "total_patches"
+       * holds the total number of patches for each sequence entry for
+       * each patch statistic.
+       */
+
+      int is, ip, ipsl, seq_len;
+
+      /*
+       * Create and initialize global_proc and global_patch stats arrays.
+       * These are only needed on processor 0 but we construct them on
+       * all processors to avoid compiler warnings.
+       */
+      Array<Pointer<Statistic> >* global_proc_stats =
+         d_num_proc_stats > 0
+         ? new Array<Pointer<Statistic> >[d_num_proc_stats]
+         : (Array<Pointer<Statistic> > *)NULL;
+      Array<Pointer<Statistic> >* global_patch_stats =
+         d_num_patch_stats > 0
+         ? new Array<Pointer<Statistic> >[d_num_patch_stats]
+         : (Array<Pointer<Statistic> > *)NULL;
+
+      if (my_rank == 0) {
+
+         d_global_proc_stat_data.resizeArray(d_num_proc_stats);
+         for (is = 0; is < d_num_proc_stats; is++) {
+
+            seq_len = d_proc_statistics[is]->getStatSequenceLength();
+            d_global_proc_stat_data[is].resizeArray(seq_len);
+
+            for (ip = 0; ip < seq_len; ip++) {
+               d_global_proc_stat_data[is][ip].resizeArray(nnodes);
+            }
+
+         }
+
+         d_global_patch_stat_data.resizeArray(d_num_patch_stats);
+         d_global_patch_stat_mapping.resizeArray(d_num_patch_stats);
+         d_global_patch_stat_proc_data.resizeArray(d_num_patch_stats);
+
+         ipsl = 0;
+         for (is = 0; is < d_num_patch_stats; is++) {
+
+            seq_len = d_patch_statistics[is]->getStatSequenceLength();
+            d_global_patch_stat_data[is].resizeArray(seq_len);
+            d_global_patch_stat_mapping[is].resizeArray(seq_len);
+            d_global_patch_stat_proc_data[is].resizeArray(seq_len);
+
+            for (ip = 0; ip < seq_len; ip++) {
+               int npatches = total_patches[ipsl];
+               d_global_patch_stat_data[is][ip].
+               resizeArray(npatches);
+               d_global_patch_stat_mapping[is][ip].
+               resizeArray(npatches);
+               d_global_patch_stat_proc_data[is][ip].
+               resizeArray(nnodes);
+               ipsl++;
+            }
+
+         }
+
+      }
+
+      /*
+       * Now we need to gather statistic information from each processor
+       * to fill arrays.  If my_rank == 0, then I am a destination processor;
+       * otherwise, I am a source processor.
+       */
+
+      if (nnodes > 1) {
+
+         Schedule stat_schedule;
+         stat_schedule.setTimerPrefix("tbox::Statistician");
+
+         if (d_num_proc_stats > 0) {
+
+            if (my_rank == 0) {
+
+               /*
+                * Create storage for remote statistic information from each
+                * processor and add transaction to schedule to receive stat.
+                */
+
+               for (is = 0; is < d_num_proc_stats; is++) {
+                  const std::string& sname = d_proc_statistics[is]->getName();
+                  const std::string& stype = d_proc_statistics[is]->getType();
+                  global_proc_stats[is].resizeArray(nnodes);
+                  for (ip = 1; ip < nnodes; ip++) {
+                     global_proc_stats[is][ip] =
+                        new Statistic(sname, stype, is);
+                     stat_schedule.addTransaction(
+                        tbox::Pointer<SAMRAI::tbox::Transaction>(new
+                           StatTransaction(global_proc_stats[is][ip],
+                              ip, 0)));
+                  }
+               }
+
+            } else {
+
+               /*
+                * Add transaction to schedule to send statistic information
+                * to processor zero.
+                */
+
+               for (is = 0; is < d_num_proc_stats; is++) {
+                  stat_schedule.addTransaction(
+                     tbox::Pointer<SAMRAI::tbox::Transaction>(
+                        new StatTransaction(d_proc_statistics[is],
+                           my_rank, 0)));
+               }
+
+            }
+
+         }
+
+         if (d_num_patch_stats > 0) {
+
+            if (my_rank == 0) {
+
+               /*
+                * Create storage for remote statistic information from each
+                * processor and add transaction to schedule to receive stat.
+                */
+
+               for (is = 0; is < d_num_patch_stats; is++) {
+                  const std::string& sname = d_patch_statistics[is]->getName();
+                  const std::string& stype = d_patch_statistics[is]->getType();
+                  global_patch_stats[is].resizeArray(nnodes);
+                  for (ip = 1; ip < nnodes; ip++) {
+                     global_patch_stats[is][ip] =
+                        new Statistic(sname, stype, is);
+                     stat_schedule.addTransaction(
+                        tbox::Pointer<SAMRAI::tbox::Transaction>(
+                           new StatTransaction(global_patch_stats[is][ip],
+                              ip, 0)));
+                  }
+               }
+
+            } else {
+
+               /*
+                * Add transaction to schedule to send statistic information
+                * to processor zero.
+                */
+
+               for (is = 0; is < d_num_patch_stats; is++) {
+                  stat_schedule.addTransaction(
+                     tbox::Pointer<SAMRAI::tbox::Transaction>(
+                        new StatTransaction(d_patch_statistics[is],
+                           my_rank, 0)));
+               }
+
+            }
+
+         }
+
+         /*
+          * Communicate all statistic data to processor zero.
+          */
+
+         stat_schedule.communicate();
+
+      }
+
+      /*
+       * Fill arrays with global statistic data.
+       */
+
+      if (my_rank == 0) {
+
+         for (is = 0; is < d_num_proc_stats; is++) {
+
+            Array<Array<double> >& sdata =
+               d_global_proc_stat_data[is];
+
+            for (ip = 0; ip < nnodes; ip++) {
+
+               Pointer<Statistic> stat = ((ip == 0) ?
+                                          d_proc_statistics[is] :
+                                          global_proc_stats[is][ip]);
+
+               for (ipsl = 0; ipsl < stat->getStatSequenceLength(); ipsl++) {
+                  sdata[ipsl][ip] = stat->getProcStatSeqArray()[ipsl].value;
+               }
+
+            } // iterate over processors
+
+         } // iterate over proc stats
+
+         for (is = 0; is < d_num_patch_stats; is++) {
+
+            Array<Array<double> >& sdata =
+               d_global_patch_stat_data[is];
+            Array<Array<int> >& spmap =
+               d_global_patch_stat_mapping[is];
+
+            for (ip = 0; ip < nnodes; ip++) {
+
+               Pointer<Statistic> stat = ((ip == 0) ?
+                                          d_patch_statistics[is] :
+                                          global_patch_stats[is][ip]);
+
+               for (ipsl = 0; ipsl < stat->getStatSequenceLength(); ipsl++) {
+                  List<Statistic::PatchStatRecord>::Iterator ilr(
+                     stat->getPatchStatSeqArray()[ipsl].patch_records);
+                  for ( ; ilr; ilr++) {
+                     int patch_id = ilr().patch_id;
+                     sdata[ipsl][patch_id] = ilr().value;
+                     spmap[ipsl][patch_id] = ip;
+                  }
+
+               }
+
+            } // iterate over processors
+
+         } // iterate over patch stats
+
+         /*
+          * Construct patch stat procesor array, which holds the sum of
+          * values on each processor for the patch stats.  In effect, this
+          * just constructs a processor stat from the patch stat data.
+          */
+
+         for (is = 0; is < d_num_patch_stats; is++) {
+
+            const Array<Array<double> >& pdata =
+               d_global_patch_stat_data[is];
+
+            for (int s = 0; s < pdata.getSize(); s++) {
+
+               for (ip = 0; ip < nnodes; ip++) {
+                  d_global_patch_stat_proc_data[is][s][ip] = 0.;
+               }
+
+               for (int p = 0; p < pdata[s].getSize(); p++) {
+                  ip = d_global_patch_stat_mapping[is][s][p];
+                  d_global_patch_stat_proc_data[is][s][ip] +=
+                     d_global_patch_stat_data[is][s][p];
+               }
+
+            } // iterate over sequence of patch stat is
+
+         } // iterate over patch stats
+
+      } // if I am processor zero
+
+      delete[] global_proc_stats;
+      delete[] global_patch_stats;
+
+      d_has_gathered_stats = true;
+
+   } else {
+      d_has_gathered_stats = false;
+   }
+
+   d_must_call_finalize = false;
+}
+
+/*
+ *************************************************************************
+ * Globally reduce all statistic data.
+ *************************************************************************
+ */
+
+void Statistician::reduceGlobalStatistics()
+{
+   std::vector<double> proc_stat_values;
+   for (int istat = 0; istat < d_num_proc_stats; istat++) {
+      const Statistic& stat(*d_proc_statistics[istat]);
+      for (int iseq = 0; iseq < stat.getStatSequenceLength(); iseq++) {
+         proc_stat_values.push_back(stat.getProcStatSeqArray()[iseq].value);
+      }
+   }
+
+   const SAMRAI_MPI& mpi(SAMRAI_MPI::getSAMRAIWorld());
+
+   std::vector<double> sum_proc_stat_values(proc_stat_values);
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&proc_stat_values[0],
+         &sum_proc_stat_values[0],
+         static_cast<int>(proc_stat_values.size()),
+         MPI_DOUBLE,
+         MPI_SUM);
+   }
+
+   std::vector<double> max_proc_stat_values(proc_stat_values);
+   std::vector<int> imax_proc_stat_values(proc_stat_values.size(), mpi.getRank());
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&max_proc_stat_values[0],
+         static_cast<int>(max_proc_stat_values.size()),
+         MPI_MAXLOC,
+         &imax_proc_stat_values[0]);
+   }
+
+   std::vector<double> min_proc_stat_values(proc_stat_values);
+   std::vector<int> imin_proc_stat_values(proc_stat_values.size(), mpi.getRank());
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&min_proc_stat_values[0],
+         static_cast<int>(min_proc_stat_values.size()),
+         MPI_MINLOC,
+         &imin_proc_stat_values[0]);
+   }
+
+   d_global_proc_stat_sum.setNull();
+   d_global_proc_stat_sum.resizeArray(d_num_proc_stats);
+   d_global_proc_stat_max.setNull();
+   d_global_proc_stat_max.resizeArray(d_num_proc_stats);
+   d_global_proc_stat_min.setNull();
+   d_global_proc_stat_min.resizeArray(d_num_proc_stats);
+   d_global_proc_stat_imax.setNull();
+   d_global_proc_stat_imax.resizeArray(d_num_proc_stats);
+   d_global_proc_stat_imin.setNull();
+   d_global_proc_stat_imin.resizeArray(d_num_proc_stats);
+
+   size_t isum(0);
+   size_t imax(0);
+   size_t imin(0);
+   for (int istat = 0; istat < d_num_proc_stats; istat++) {
+      const Statistic& stat(*d_proc_statistics[istat]);
+      if (stat.getStatSequenceLength() != 0) {
+
+         d_global_proc_stat_sum[istat].resizeArray(stat.getStatSequenceLength());
+         memcpy(d_global_proc_stat_sum[istat].getPointer(),
+            &sum_proc_stat_values[isum],
+            sizeof(double) * stat.getStatSequenceLength());
+         isum += stat.getStatSequenceLength();
+
+         d_global_proc_stat_max[istat].resizeArray(stat.getStatSequenceLength());
+         d_global_proc_stat_imax[istat].resizeArray(stat.getStatSequenceLength());
+         memcpy(d_global_proc_stat_max[istat].getPointer(),
+            &max_proc_stat_values[imax],
+            sizeof(double) * stat.getStatSequenceLength());
+         memcpy(d_global_proc_stat_imax[istat].getPointer(),
+            &imax_proc_stat_values[imax],
+            sizeof(int) * stat.getStatSequenceLength());
+         imax += stat.getStatSequenceLength();
+
+         d_global_proc_stat_min[istat].resizeArray(stat.getStatSequenceLength());
+         d_global_proc_stat_imin[istat].resizeArray(stat.getStatSequenceLength());
+         memcpy(d_global_proc_stat_min[istat].getPointer(),
+            &min_proc_stat_values[imin],
+            sizeof(double) * stat.getStatSequenceLength());
+         memcpy(d_global_proc_stat_imin[istat].getPointer(),
+            &imin_proc_stat_values[imin],
+            sizeof(int) * stat.getStatSequenceLength());
+         imin += stat.getStatSequenceLength();
+
+      }
+
+   }
+   TBOX_ASSERT(isum == sum_proc_stat_values.size());
+   TBOX_ASSERT(imax == max_proc_stat_values.size());
+   TBOX_ASSERT(imin == min_proc_stat_values.size());
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Check statistic information on all processors for consistency.        *
+ * If the number of patch statistics is non-zero, the array will be      *
+ * resized to the sum of sequence lengths over all patch statistics.     *
+ * Then, each entry will be the total number of global patches for       *
+ * that particular patch stat sequence.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Statistician::checkStatsForConsistency(
+   Array<int>& total_patches)
+{
+   TBOX_ASSERT(total_patches.getSize() == 0);
+
+   const SAMRAI_MPI& mpi(SAMRAI_MPI::getSAMRAIWorld());
+
+   int ip, is, consistent, n_stats;
+
+   /*
+    * First consistency check for statistics.
+    *
+    * We continue if number of processor stats and number of patch stats
+    * are same on every processor.  Otherwise, we abort with an error message.
+    */
+
+   n_stats = d_num_proc_stats;
+   if (mpi.getSize() > 1) {
+      mpi.Bcast(&n_stats, 1, MPI_INT, 0);
+   }
+   consistent = ((n_stats == d_num_proc_stats) ? 1 : 0);
+   if (mpi.getSize() > 1) {
+      int consistent1(consistent);
+      mpi.Allreduce(&consistent1, &consistent, 1, MPI_INT, MPI_MIN);
+   }
+
+   if (!consistent) {
+      TBOX_ERROR("Statistician::finalize error ..."
+         << "\n   Number of processor stats inconsistent"
+         << " across processors.  Cannot gather information." << std::endl);
+   }
+
+   n_stats = d_num_patch_stats;
+   if (mpi.getSize() > 1) {
+      mpi.Bcast(&n_stats, 1, MPI_INT, 0);
+   }
+   consistent = ((n_stats == d_num_patch_stats) ? 1 : 0);
+   if (mpi.getSize() > 1) {
+      int consistent1(consistent);
+      mpi.Allreduce(&consistent1, &consistent, 1, MPI_INT, MPI_MIN);
+   }
+
+   if (!consistent) {
+      TBOX_ERROR("Statistician::finalize error ..."
+         << "\n   Number of patch stats inconsistent"
+         << " across processors.  Cannot gather information." << std::endl);
+   }
+
+   /*
+    * Second consistency check for statistics.
+    *
+    * We continue if time sequence length for each processor stat and
+    * each patch stat is same on every processor.  Otherwise, we abort
+    * with an error message.  Note that we implicitly assume that the
+    * statistics are created in the same order on each processor.
+    */
+
+   n_stats = d_num_proc_stats + d_num_patch_stats;
+
+   int n_patch_stat_seq_items = 0;
+
+   if (n_stats > 0) {
+
+      std::vector<int> my_seq_lengths(n_stats);
+      std::vector<int> max_seq_lengths(n_stats);
+      for (is = 0; is < d_num_proc_stats; is++) {
+         my_seq_lengths[is] = d_proc_statistics[is]->getStatSequenceLength();
+         max_seq_lengths[is] = my_seq_lengths[is];
+      }
+      for (is = 0; is < d_num_patch_stats; is++) {
+         int mark = d_num_proc_stats + is;
+         my_seq_lengths[mark] =
+            d_patch_statistics[is]->getStatSequenceLength();
+         max_seq_lengths[mark] = my_seq_lengths[mark];
+         n_patch_stat_seq_items += my_seq_lengths[mark];
+      }
+
+      if (mpi.getSize() > 1) {
+         std::vector<int> max_seq_lengths1(max_seq_lengths);
+         mpi.Allreduce(&max_seq_lengths1[0], &max_seq_lengths[0],
+            static_cast<int>(max_seq_lengths.size()), MPI_INT, MPI_MAX);
+      }
+
+      consistent = 1;
+      for (is = 0; is < n_stats; is++) {
+         if (max_seq_lengths[is] != my_seq_lengths[is]) {
+            consistent = 0;
+            break;
+         }
+      }
+      if (mpi.getSize() > 1) {
+         int consistent1(consistent);
+         mpi.Allreduce(&consistent1, &consistent, 1, MPI_INT, MPI_MIN);
+      }
+
+      if (!consistent) {
+         TBOX_ERROR("Statistician::finalize error ..."
+            << "\n   Sequence length for some statistic inconsistent"
+            << " across processors.  Cannot gather information." << std::endl);
+      }
+
+   }
+
+   /*
+    * Third, we gather the total number of patches for each sequence item
+    * for each patch statitic.
+    */
+
+   total_patches.resizeArray(n_patch_stat_seq_items);
+   if (d_num_patch_stats > 0) {
+      int ipsl = 0;
+      for (is = 0; is < d_num_patch_stats; is++) {
+         for (ip = 0; ip < d_patch_statistics[is]->getStatSequenceLength();
+              ip++) {
+            total_patches[ipsl] = d_patch_statistics[is]->
+               getPatchStatSeqArray()[ip].patch_records.getNumberOfItems();
+            ipsl++;
+         }
+      }
+
+      if (mpi.getSize() > 1) {
+         std::vector<int> total_patches1(total_patches.getPointer(),
+                                         total_patches.getPointer() + total_patches.size());
+         mpi.Allreduce(&total_patches1[0], &total_patches[0],
+            total_patches.size(), MPI_INT, MPI_SUM);
+      }
+
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Utility functions for retrieving statistic data from statistician.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int Statistician::getNumberProcessorStats() const
+{
+   return d_num_proc_stats;
+}
+
+int Statistician::getNumberPatchStats() const
+{
+   return d_num_patch_stats;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Utility functions to print local statistic information and global     *
+ * statistic information (after calling finalize()).                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Statistician::printLocalStatData(
+   std::ostream& os,
+   int precision) const
+{
+   int is;
+
+   os << "\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++"
+      << std::endl;
+   os << "Printing local statistic information...";
+   os << "\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++"
+      << std::endl;
+
+   for (is = 0; is < d_num_proc_stats; is++) {
+      os << std::endl;
+      d_proc_statistics[is]->printClassData(os, precision);
+   }
+
+   for (is = 0; is < d_num_patch_stats; is++) {
+      os << std::endl;
+      d_patch_statistics[is]->printClassData(os, precision);
+   }
+}
+
+void Statistician::printAllGlobalStatData(
+   std::ostream& os,
+   int precision)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::printAllGlobalStatData ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      int is;
+      os << "\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++"
+         << "\nPrinting global statistic information..."
+         << "\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++"
+         << std::endl;
+
+      os << "\n  ---------------------" << std::endl;
+      os << "  Processor Statistics:" << std::endl;
+      os << "  ---------------------" << std::endl;
+      os << "   Stat #: name" << std::endl;
+      for (is = 0; is < d_num_proc_stats; is++) {
+         printGlobalProcStatData(is, os, precision);
+      }
+
+      os << "\n  ---------------------" << std::endl;
+      os << "  Patch Statistics:" << std::endl;
+      os << "  ---------------------" << std::endl;
+      os << "   Stat #: name" << std::endl;
+      for (is = 0; is < d_num_patch_stats; is++) {
+         printGlobalPatchStatData(is, os, precision);
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print global summed output for all statistics to the specified file.  *
+ *                                                                       *
+ *************************************************************************
+ */
+void Statistician::printAllSummedGlobalStatData(
+   const std::string& filename,
+   int precision)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   if (mpi.getRank() == 0) {
+      std::ofstream file(filename.c_str());
+      printAllSummedGlobalStatData(file, precision);
+      file.close();
+
+   }
+}
+
+void Statistician::printAllSummedGlobalStatData(
+   std::ostream& os,
+   int precision)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   if (mpi.getRank() == 0) {
+      os.precision(precision);
+
+      int is, id, num_sequences, n;
+      double sum;
+      for (is = 0; is < d_num_proc_stats; is++) {
+         std::string procstat_name = d_proc_statistics[is]->getName();
+         os << "PROCESSOR STAT: " << procstat_name << std::endl;
+         id = d_proc_statistics[is]->getInstanceId();
+         num_sequences = getGlobalProcStatSequenceLength(id);
+         for (n = 0; n < num_sequences; n++) {
+            sum = getGlobalProcStatSum(id, n);
+            os << "\t" << n << "\t" << sum << std::endl;
+         }
+         os << "\n" << std::endl;
+      }
+
+      for (is = 0; is < d_num_patch_stats; is++) {
+         std::string patchstat_name = d_patch_statistics[is]->getName();
+         os << "PATCH STAT: " << patchstat_name << std::endl;
+         id = d_patch_statistics[is]->getInstanceId();
+         num_sequences = getGlobalPatchStatSequenceLength(id);
+         for (n = 0; n < num_sequences; n++) {
+            sum = getGlobalPatchStatSum(id, n);
+            os << "\t" << n << "\t" << sum << std::endl;
+         }
+         os << "\n" << std::endl;
+      }
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print formatted Statistician information to formatted output that     *
+ * may be read by Excel, or other spreadsheet type programs. Each        *
+ * processor statistic is printed to the file "<statname>-proc.txt",     *
+ * where <statname> is the name of the statistic.  Likewise, each patch  *
+ * statistic is written to the file "<statname>-patch.txt".  If a        *
+ * directory name is supplied, the method will create the directory and  *
+ * the put the files in it.  If no directory name is supplied, the files *
+ * will be written to the directory where the application is run.        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Statistician::printSpreadSheetOutput(
+   const std::string& dirname,
+   int precision)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   /*
+    * Generate directory to write output
+    */
+   bool write_to_dir = false;
+   if (dirname.size() > 0) {
+      write_to_dir = true;
+      Utilities::recursiveMkdir(dirname);
+   }
+
+   /*
+    * Processor 0 writes the output files.
+    */
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::printSpreadSheetOutput() ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      /*
+       * Create file in the directory for each proc and patch
+       * statistic.  Files will be named <procstat-name>.procstat
+       * and <patchstat-name>.patchstat.
+       */
+      int is;
+      for (is = 0; is < d_num_proc_stats; is++) {
+         std::string filename = d_proc_statistics[is]->getName();
+         filename = filename + "-proc.txt";
+         if (write_to_dir) filename = dirname + "/" + filename;
+         std::ofstream file(filename.c_str());
+         printGlobalProcStatDataFormatted(is, file, precision);
+         file.close();
+      }
+
+      for (is = 0; is < d_num_patch_stats; is++) {
+         std::string filename = d_patch_statistics[is]->getName();
+         filename = filename + "-patch.txt";
+         if (write_to_dir) filename = dirname + "/" + filename;
+         std::ofstream file(filename.c_str());
+         printGlobalPatchStatDataFormatted(is, file, precision);
+         file.close();
+      }
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print formatted Statistician information to formatted output that     *
+ * may be read by Excel, or other spreadsheet type programs. This method *
+ * prints statistic information from only a single specified processor   *
+ * which may be useful for information that is the same across all       *
+ * processors.                                                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Statistician::printSpreadSheetOutputForProcessor(
+   const int proc_id,
+   const std::string& dirname,
+   int precision)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   /*
+    * Generate directory to write output
+    */
+   bool write_to_dir = false;
+   if (dirname.size() > 0) {
+      write_to_dir = true;
+      Utilities::recursiveMkdir(dirname);
+   }
+
+   /*
+    * Processor 0 writes the output files.  Even though we are writing
+    * data from only a single processor, proc 0 will still do the
+    * writing.
+    */
+   if (mpi.getRank() == 0) {
+
+      if (d_must_call_finalize) {
+         TBOX_ERROR("Statistician::printSpreadSheetOutput() ..."
+            << "\n   The finalize() method to construct global data "
+            "must be called BEFORE this method." << std::endl);
+      }
+      if (!d_has_gathered_stats) {
+         TBOX_ERROR("Statistician::getGlobalProcStatSeqLength ..."
+            << "\n   The finalize() method to construct global data "
+            << "must be called with the argument to gather global "
+            << "stats data BEFORE this metho." << std::endl);
+      }
+
+      /*
+       * Create file in the directory for each proc and patch
+       * statistic.  Files will be named <name>-<type>-proc_id.txt
+       * where <name> is the name of the stat and <type> is either
+       * "proc" or "patch" depending on the type of statistic.
+       */
+      int is;
+      for (is = 0; is < d_num_proc_stats; is++) {
+         std::string name = d_proc_statistics[is]->getName();
+         name = name + "-proc-";
+         std::string filename = name + tbox::Utilities::processorToString(
+               proc_id) + ".txt";
+         if (write_to_dir) filename = dirname + "/" + filename;
+         std::ofstream file(filename.c_str());
+         printGlobalProcStatDataFormatted(is, proc_id, file, precision);
+         file.close();
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Implementation of StatisticRestartDatabase class.                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+StatisticRestartDatabase::StatisticRestartDatabase(
+   const std::string& object_name,
+   bool register_for_restart,
+   bool read_from_restart)
+{
+   TBOX_ASSERT(!object_name.empty());
+
+   d_object_name = object_name;
+   d_registered_for_restart = register_for_restart;
+
+   if (d_registered_for_restart) {
+      RestartManager::getManager()->registerRestartItem(
+         d_object_name, this);
+   }
+
+   bool is_from_restart = RestartManager::getManager()->isFromRestart();
+   if (is_from_restart && read_from_restart) {
+      getFromRestart();
+   }
+}
+
+StatisticRestartDatabase::~StatisticRestartDatabase()
+{
+   if (d_registered_for_restart) {
+      RestartManager::getManager()->unregisterRestartItem(d_object_name);
+   }
+}
+
+void StatisticRestartDatabase::putToDatabase(
+   Pointer<Database> db)
+{
+   TBOX_ASSERT(!db.isNull());
+
+   db->putInteger("TBOX_STATISTICRESTARTDATABASE_VERSION",
+      TBOX_STATISTICRESTARTDATABASE_VERSION);
+
+   /*
+    * Get pointer to Statistician object.
+    */
+   Statistician* statistician = Statistician::getStatistician();
+
+   /*
+    * Write the number of statistics
+    */
+   int number_of_procstats = statistician->getNumberProcessorStats();
+   db->putInteger("number_of_procstats", number_of_procstats);
+
+   int number_of_patchstats = statistician->getNumberPatchStats();
+   db->putInteger("number_of_patchstats", number_of_patchstats);
+
+   /*
+    * Iterate through the list of statistics and write out a
+    * sub-database for each stat, containing the data values
+    * Store the name of each stat in the string arrays
+    * "proc_stat_names" and "patch_stat_names".
+    */
+   Array<std::string> proc_stat_names(number_of_procstats);
+   Array<std::string> patch_stat_names(number_of_patchstats);
+
+   /*
+    * Write procstat and patchstats to database.
+    */
+   Pointer<Statistic> stat;
+   Pointer<Database> stat_database;
+   int n;
+   for (n = 0; n < number_of_procstats; n++) {
+      stat = statistician->d_proc_statistics[n];
+      proc_stat_names[n] = stat->getName();
+      stat_database = db->putDatabase(proc_stat_names[n]);
+      stat->putToDatabase(stat_database);
+   }
+
+   for (n = 0; n < number_of_patchstats; n++) {
+      stat = statistician->d_patch_statistics[n];
+      patch_stat_names[n] = stat->getName();
+      stat_database = db->putDatabase(patch_stat_names[n]);
+      stat->putToDatabase(stat_database);
+   }
+
+   /*
+    * Write out string array containing names of stats.  This will be
+    * used upon restart to specify the name of the sub-database from
+    * which to read the stat info.
+    */
+   if (number_of_procstats > 0) {
+      db->putStringArray("proc_stat_names", proc_stat_names);
+   }
+
+   if (number_of_patchstats > 0) {
+      db->putStringArray("patch_stat_names", patch_stat_names);
+   }
+}
+
+void StatisticRestartDatabase::getFromRestart()
+{
+   Pointer<Database> root_db =
+      RestartManager::getManager()->getRootDatabase();
+
+   Pointer<Database> db;
+   if (root_db->isDatabase(d_object_name)) {
+      db = root_db->getDatabase(d_object_name);
+   } else {
+      TBOX_ERROR("Restart database corresponding to "
+         << d_object_name << " not found in restart file" << std::endl);
+   }
+
+   int ver = db->getInteger("TBOX_STATISTICRESTARTDATABASE_VERSION");
+   if (ver != TBOX_STATISTICRESTARTDATABASE_VERSION) {
+      TBOX_WARNING(
+         d_object_name << ":  "
+         "Restart file version different than class version. \n"
+         <<
+         "Cannot read statistic information from restart file so"
+         << "all statistics will be reset.");
+   }
+
+   int number_of_procstats = db->getInteger("number_of_procstats");
+   int number_of_patchstats = db->getInteger("number_of_patchstats");
+
+   /*
+    * Read in the list of sub-database names.
+    */
+   Array<std::string> proc_stat_names;
+   if (number_of_procstats > 0) {
+      proc_stat_names = db->getStringArray("proc_stat_names");
+   }
+   Array<std::string> patch_stat_names;
+   if (number_of_patchstats > 0) {
+      patch_stat_names = db->getStringArray("patch_stat_names");
+   }
+
+   /*
+    * Read in each stat from restart database.
+    */
+   Statistician* statistician = Statistician::getStatistician();
+   Pointer<Database> sub_database;
+   std::string sub_database_name;
+   Pointer<Statistic> stat;
+   int i;
+   for (i = 0; i < number_of_procstats; i++) {
+      sub_database = db->getDatabase(proc_stat_names[i]);
+      stat = statistician->getStatistic(proc_stat_names[i], "PROC_STAT");
+      stat->getFromRestart(sub_database);
+   }
+
+   for (i = 0; i < number_of_patchstats; i++) {
+      sub_database = db->getDatabase(patch_stat_names[i]);
+      stat = statistician->getStatistic(patch_stat_names[i], "PATCH_STAT");
+      stat->getFromRestart(sub_database);
+   }
+
+}
+
+int Statistician::getMaximumNumberOfStatistics() {
+   return d_proc_statistics.getSize();
+}
+
+void Statistician::setMaximumNumberOfStatistics(
+   const int size) {
+   if (size > d_proc_statistics.getSize()) {
+      d_proc_statistics.resizeArray(size);
+      d_patch_statistics.resizeArray(size);
+   }
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Statistician.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Statistician.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,979 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Singleton manager class for statistic objects. 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_Statistician
+#define included_tbox_Statistician
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Serializable.h"
+#include "SAMRAI/tbox/Statistic.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace tbox {
+
+class StatisticRestartDatabase;
+
+/**
+ * Class Statistician is a Singleton class that manages a simple
+ * database of Statistic objects.  This class provides a single point
+ * of access to statistic objects so that any one of them may be updated
+ * or recorded at any point in the code.  Access to the Singleton
+ * statistician instance follows the standard SAMRAI implementation
+ * found in other classes with similar Singleton behavior.  See static
+ * member functions below for more information.
+ *
+ * Statistic objects can be to the database or accessed in code as follows:
+ *
+ *     Pointer<Statistic> stat =
+ *           Statistician::getStatistician->
+ *           getStatistic("name", "PROC_STAT");
+ *
+ * Here `name' is the name string identifier for the statistic object and
+ * `PROC_STAT' is the type of statistic. See discussion for the getStatistic()
+ * method below for more information.
+ *
+ * The statistic state is saved to restart files when restart file generation
+ * is active.  This allows users to continue to accumulate timing
+ * information when restarting a run.  If desired, all statistics can be
+ * reset when restarting by calling the function resetAllStatistics().
+ *
+ * A variety of print options exist to dump statistics data.  Notably,
+ * the printSpreadSheetOutput("print_dir") will write statistics data in
+ * a tab-separated format to files in the supplied directory name.  The
+ * naming convention for statistics data is "\<name\>-\<type\>.txt" where \<name\>
+ * is the name of the statistic and \<type\> is either proc or patch stat.  The
+ * files may be read in to a spreadsheet program such as MS Excel.
+ *
+ * For more information about data that can be recorded with statistics,
+ * consult the header file for the Statistic class.
+ *
+ * @see tbox::Statistic
+ */
+
+class Statistician
+{
+   friend class StatisticRestartDatabase;
+public:
+   /**
+    * Create the singleton instance of the statistic manager and return
+    * a pointer to it.  This function is provided so that so that
+    * users can control whether statistic information will be written
+    * to/read from restart files.
+    *
+    * The statistic restart database object is also resistered for writing
+    * subsequent restart files when the first boolean argument is true.
+    * Whether the statistic database will write statistics to restart files
+    * during program execution is determined by this argument (true by
+    * default).  Regardless of the value of this argument, statistics that
+    * exist in the restart file will be read from restart when a run is
+    * restarted and the second argument is true.
+    *
+    * Generally, this routine should only be called once during program
+    * execution.  If the statistician has been previously created (e.g.,
+    * by an earlier call to this routine) this routine will do nothing
+    * other than return the pointer to the existing singleton instance.
+    */
+   static Statistician *
+   createStatistician(
+      bool register_for_restart = true,
+      bool read_from_restart = true);
+
+   /**
+    * Return a pointer to the singleton statistician instance.
+    * All access to the Statistician object is through the
+    * getStatistician() function.  For example, to add a statistic
+    * object with the name "my_stat" to the statistician, use the
+    * following call:
+    * Statistician::getStatistician()->addStatistic("my_stat").
+    */
+   static Statistician *
+   getStatistician();
+
+   /**
+    * Return pointer to statistic object with the given name string.
+    * If a statistics with the given name already exists in the database
+    * of statistics, the statistic with that name will be returned.
+    * Otherwise, a new statistic will be created with that name.  The
+    * stat_type string identifier is only used when a new statistic
+    * object must be created.  The two avaible options are processor
+    * statistics and patch statistics which are indicated by the strings
+    * "PROC_STAT" and "PATCH_STAT", respectively.
+    *
+    * When assertion checking is active, an assertion will result if wither
+    * string is empty.
+    */
+   virtual Pointer<Statistic>
+   getStatistic(
+      const std::string& name,
+      const std::string& stat_type);
+
+   /**
+    * Return true if a statistic whose name matches the argument string
+    * exists in the database of statistics controlled by the statistician.
+    * If a match is found, the statistic pointer in the argument list is set
+    * to that statistic.  Otherwise, return false and return a null pointer.
+    * If the name string is empty, a null pointer is returned.
+    */
+   virtual bool
+   checkStatisticExists(
+      Pointer<Statistic>& stat,
+      const std::string& name) const;
+
+   /**
+    * Return integer number of local processor statistics maintained
+    * by statistician.
+    */
+   virtual int
+   getNumberProcessorStats() const;
+
+   /**
+    * Return integer number of local patch statistics maintained
+    * by statistician.
+    */
+   virtual int
+   getNumberPatchStats() const;
+
+   /**
+    * Reset all processor statistics to contain no information. The primary
+    * intent of this function is to avoid using restarted statistic values
+    * when performing a restarted run.  However, it can be called anytime.
+    */
+   virtual void
+   resetProcessorStatistics();
+
+   /**
+    * Reset all patch statistics to contain no information. The primary
+    * intent of this function is to avoid using restarted statistic values
+    * when performing a restarted run.  However, it can be called anytime.
+    */
+   virtual void
+   resetPatchStatistics();
+
+   /**
+    * Reset all patch and processor statistics to contain no information.
+    */
+   virtual void
+   resetStatistics();
+
+   /**
+    * Return integer instance identifier for processor statistic with given
+    * name.  If this statistician object maintains no processor statistic
+    * with that name, then a warning message results and the return value
+    * will be the invalid instance identifier "-1".
+    */
+   virtual int
+   getProcStatId(
+      const std::string& name) const;
+
+   /**
+    * Return number of sequence entries for processor statistic with given
+    * integer identifier.   For convenience, the routine getProcStatId() is
+    * provided to map the statistic string name to the proper integer
+    * identifier.
+    *
+    * When assertion checking is active, the identifier must be valid or
+    * an assertion will result.
+    */
+   virtual int
+   getGlobalProcStatSequenceLength(
+      int proc_stat_id);
+
+   /**
+    * Return statistic data value for processor statistic with given integer
+    * identifier, sequence number, and processor number.   For convenience,
+    * the routine getProcStatId() is provided to map the statistic string
+    * name to the proper integer identifier.  The function
+    * getGlobalProcStatSequenceLength() provides the sequence length for
+    * a given processor statistic.
+    *
+    * When assertion checking is active, the identifier, sequence number,
+    * and processor number must be valid or an assertion will result.
+    */
+   virtual double
+   getGlobalProcStatValue(
+      int proc_stat_id,
+      int seq_num,
+      int proc_num);
+
+   /**
+    * Return global sum of processor statistic with given integer
+    * identifier and sequence number.   To identify the correct integer
+    * identifier and valid sequence numbers, the method getProcStatId() maps
+    * the statistic string name to its integer identifier and the method
+    * getGlobalProcStatSequenceLength() returns the maximum sequence length
+    * for the processor statistic.
+    *
+    * When assertion checking is active, the identifier and sequence number
+    * must be valid or an assertion will result.
+    */
+   virtual double
+   getGlobalProcStatSum(
+      int proc_stat_id,
+      int seq_num);
+
+   /**
+    * Return global max of processor statistic with given integer
+    * identifier and sequence number.   To identify the correct integer
+    * identifier and valid sequence numbers, the method getProcStatId() maps
+    * the statistic string name to its integer identifier and the method
+    * getGlobalProcStatSequenceLength() returns the maximum sequence length
+    * for the processor statistic.
+    *
+    * When assertion checking is active, the identifier and sequence number
+    * must be valid or an assertion will result.
+    */
+   virtual double
+   getGlobalProcStatMax(
+      int proc_stat_id,
+      int seq_num);
+
+   /**
+    * Returns rank of processor holding global max for the processor
+    * statistic specified by the given integer identifyer and sequence
+    * number.
+    *
+    * When assertion checking is active, the identifier and sequence number
+    * must be valid or an assertion will result.
+    */
+   virtual int
+   getGlobalProcStatMaxProcessorId(
+      int proc_stat_id,
+      int seq_num);
+
+   /**
+    * Return global min of processor statistic with given integer
+    * identifier and sequence number.   To identify the correct integer
+    * identifier and valid sequence numbers, the method getProcStatId() maps
+    * the statistic string name to its integer identifier and the method
+    * getGlobalProcStatSequenceLength() returns the maximum sequence length
+    * for the processor statistic.
+    *
+    * When assertion checking is active, the identifier and sequence number
+    * must be valid or an assertion will result.
+    */
+   virtual double
+   getGlobalProcStatMin(
+      int proc_stat_id,
+      int seq_num);
+
+   /**
+    * Returns rank of processor holding global max for the processor
+    * statistic specified by the given integer identifyer and sequence
+    * number.
+    *
+    * When assertion checking is active, the identifier and sequence number
+    * must be valid or an assertion will result.
+    */
+   virtual int
+   getGlobalProcStatMinProcessorId(
+      int proc_stat_id,
+      int seq_num);
+
+   /**
+    * Print global processor statistic data for a particular statistic
+    * to given output stream.  Floating point precision may be specified
+    * (default is 12).  Note that this method generates a general dump of
+    * the data but does NOT generate it in tabulated form.  To generate
+    * tabulated data, see the printGlobalProcStatDataFormatted() method.
+    */
+   virtual void
+   printGlobalProcStatData(
+      int proc_stat_id,
+      std::ostream& os,
+      int precision = 12);
+
+   /**
+    * Print processor stat data in formatted output to given output
+    * stream.  Floating point precision may be specified (default is 12).
+    */
+   virtual void
+   printGlobalProcStatDataFormatted(
+      int proc_stat_id,
+      std::ostream& os,
+      int precision = 12);
+
+   /**
+    * Print stat data for specified processor in formatted output to
+    * given output stream.  Floating point precision may be specified
+    * (default is 12).
+    */
+   virtual void
+   printGlobalProcStatDataFormatted(
+      int proc_stat_id,
+      int proc_id,
+      std::ostream& os,
+      int precision = 12);
+
+   /**
+    * Return integer instance identifier for patch statistic with given
+    * name.  If this statistician object maintains no patch statistic
+    * with that name, then a warning message results and the return value
+    * will be the invalid instance identifier "-1".
+    */
+   virtual int
+   getPatchStatId(
+      const std::string& name) const;
+
+   /**
+    * Return number of sequence entries for patch statistic with given
+    * integer identifier.   For convenience, the routine getPatchStatId()
+    * is provided to map the statistic string name to the proper integer
+    * identifier.
+    *
+    * When assertion checking is active, the identifier must be valid or
+    * an assertion will result.
+    */
+   virtual int
+   getGlobalPatchStatSequenceLength(
+      int patch_stat_id);
+
+   /**
+    * Return number of patch entries for patch statistic with given
+    * integer identifier, and sequence number.   For convenience, the
+    * routine getPatchStatId() is provided to map the statistic string
+    * name to the proper integer identifier.  The function
+    * getGlobalPatchStatSequenceLength() provides the sequence length for
+    * a given patch statistic.
+    *
+    * When assertion checking is active, the identifier and sequence number
+    * must be valid or an assertion will result.
+    */
+   virtual int
+   getGlobalPatchStatNumberPatches(
+      int patch_stat_id,
+      int seq_num);
+
+   /**
+    * Return global processor mapping for patch statistic with given integer
+    * identifier, sequence number, and patch number.  For convenience,
+    * the routine getPatchStatId() is provided to map the statistic string
+    * name to the proper integer identifier.  The function
+    * getGlobalPatchStatSequenceLength() provides the sequence length for
+    * a given patch statistic.  The function
+    * getGlobalPatchStatNumberPatches() gives the number of patches
+    * associated with a patch statistic and sequence number.
+    *
+    * When assertion checking is active, the identifier, sequence number,
+    * and patch number must be valid or an assertion will result.
+    */
+   virtual int
+   getGlobalPatchStatPatchMapping(
+      int patch_stat_id,
+      int seq_num,
+      int patch_num);
+
+   /**
+    * Return statistic data value for patch statistic with given integer
+    * identifier, sequence number, and patch number.   For convenience,
+    * the routine getPatchStatId() is provided to map the statistic string
+    * name to the proper integer identifier.  The function
+    * getGlobalPatchStatSequenceLength() provides the sequence length for
+    * a given patch statistic.  The function
+    * getGlobalPatchStatNumberPatches() gives the number of patches
+    * associated with a patch statistic and sequence number.
+    *
+    * When assertion checking is active, the identifier, sequence number,
+    * and patch number must be valid or an assertion will result.
+    */
+   virtual double
+   getGlobalPatchStatValue(
+      int patch_stat_id,
+      int seq_num,
+      int patch_num);
+
+   /**
+    * Return global sum of patch statistic with given integer
+    * identifier and sequence number.   To identify the correct integer
+    * identifier and valid sequence numbers, the method getPatchStatId() maps
+    * the statistic string name to its integer identifier and the method
+    * getGlobalPatchStatSequenceLength() returns the maximum sequence length
+    * for the processor statistic.
+    *
+    * When assertion checking is active, the identifier and sequence number
+    * must be valid or an assertion will result.
+    */
+   virtual double
+   getGlobalPatchStatSum(
+      int patch_stat_id,
+      int seq_num);
+
+   /**
+    * Return global max of patch statistic with given integer
+    * identifier and sequence number.   To identify the correct integer
+    * identifier and valid sequence numbers, the method getPatchStatId() maps
+    * the statistic string name to its integer identifier and the method
+    * getGlobalPatchStatSequenceLength() returns the maximum sequence length
+    * for the processor statistic.
+    *
+    * When assertion checking is active, the identifier and sequence number
+    * must be valid or an assertion will result.
+    */
+   virtual double
+   getGlobalPatchStatMax(
+      int patch_stat_id,
+      int seq_num);
+
+   /**
+    * Returns ID of patch holding global max for the patch
+    * statistic specified by the given integer identifyer and sequence
+    * number.
+    *
+    * When assertion checking is active, the identifier and sequence number
+    * must be valid or an assertion will result.
+    */
+   virtual int
+   getGlobalPatchStatMaxPatchId(
+      int patch_stat_id,
+      int seq_num);
+
+   /**
+    * Return global min of patch statistic with given integer
+    * identifier and sequence number.   To identify the correct integer
+    * identifier and valid sequence numbers, the method getPatchStatId() maps
+    * the statistic string name to its integer identifier and the method
+    * getGlobalPatchStatSequenceLength() returns the maximum sequence length
+    * for the processor statistic.
+    *
+    * When assertion checking is active, the identifier and sequence number
+    * must be valid or an assertion will result.
+    */
+   virtual double
+   getGlobalPatchStatMin(
+      int patch_stat_id,
+      int seq_num);
+
+   /**
+    * Returns patch ID of patch holding global min for the patch
+    * statistic specified by the given integer identifyer and sequence
+    * number.
+    *
+    * When assertion checking is active, the identifier and sequence number
+    * must be valid or an assertion will result.
+    */
+   virtual int
+   getGlobalPatchStatMinPatchId(
+      int patch_stat_id,
+      int seq_num);
+
+   /**
+    * Returns the sum of patch statistic information for a particular
+    * processor.  The patch statistic is specified by its integer identifyer
+    * and sequence number.
+    *
+    * When assertion checking is active, the identifier, processor id,
+    * and sequence number must be valid or an assertion will result.
+    */
+   virtual double
+   getGlobalPatchStatProcessorSum(
+      int patch_stat_id,
+      int processor_id,
+      int seq_num);
+
+   /**
+    * Returns the maximum value of the patch statistic data summed
+    * on each processor.  That is, patch statistic information is
+    * summed on each processor, and this method returns the maximum
+    * value, across all processors, of this summed data. The patch
+    * statistic is specified by its integer identifyer and sequence
+    * number.
+    *
+    * When assertion checking is active, the identifier and sequence
+    * number must be valid or an assertion will result.
+    */
+   virtual double
+   getGlobalPatchStatProcessorSumMax(
+      int patch_stat_id,
+      int seq_num);
+
+   /**
+    * Returns the processor ID which holds the maximum value of
+    * summed patch statistic information across processors.  See
+    * the discussion for the method getGlobalPatchStatProcessorSumMax()
+    * for more information on the summed patch statistic information
+    * on processors.
+    *
+    * When assertion checking is active, the identifier and sequence
+    * number must be valid or an assertion will result.
+    */
+   virtual int
+   getGlobalPatchStatProcessorSumMaxId(
+      int patch_stat_id,
+      int seq_num);
+   /**
+    * Returns the minimum value of the patch statistic data summed
+    * on each processor.  That is, patch statistic information is
+    * summed on each processor, and this method returns the minimum
+    * value, across all processors, of this summed data. The patch
+    * statistic is specified by its integer identifyer and sequence
+    * number.
+    *
+    * When assertion checking is active, the identifier and sequence
+    * number must be valid or an assertion will result.
+    */
+   virtual double
+   getGlobalPatchStatProcessorSumMin(
+      int patch_stat_id,
+      int seq_num);
+
+   /**
+    * Returns the processor ID which holds the minimum value of
+    * summed patch statistic information across processors.  See
+    * the discussion for the method getGlobalPatchStatProcessorSumMin()
+    * for more information on the summed patch statistic information
+    * on processors.
+    *
+    * When assertion checking is active, the identifier and sequence
+    * number must be valid or an assertion will result.
+    */
+   virtual int
+   getGlobalPatchStatProcessorSumMinId(
+      int patch_stat_id,
+      int seq_num);
+
+   /**
+    * Return number of patches on the specified processor number for
+    * patch statistic with given identifier, and sequence number.
+    *
+    * When assertion checking is active, the identifier and sequence number
+    * must be valid or an assertion will result.
+    */
+   virtual int
+   getGlobalPatchStatNumberPatchesOnProc(
+      int patch_stat_id,
+      int seq_num,
+      int proc_id);
+
+   /**
+    * Returns the maximum number of patches per processor for the
+    * specified patch statistic.
+    *
+    * When assertion checking is active, the identifier and sequence
+    * number must be valid or an assertion will result.
+    */
+   virtual int
+   getGlobalPatchStatMaxPatchesPerProc(
+      int patch_stat_id,
+      int seq_num);
+
+   /**
+    * Returns the processor ID holding the maximum number of patches
+    * per processor for the specified patch statistic.
+    *
+    * When assertion checking is active, the identifier and sequence
+    * number must be valid or an assertion will result.
+    */
+   virtual int
+   getGlobalPatchStatMaxPatchesPerProcId(
+      int patch_stat_id,
+      int seq_num);
+
+   /**
+    * Returns the minimum number of patches per processor for the
+    * specified patch statistic.
+    *
+    * When assertion checking is active, the identifier and sequence
+    * number must be valid or an assertion will result.
+    */
+   virtual int
+   getGlobalPatchStatMinPatchesPerProc(
+      int patch_stat_id,
+      int seq_num);
+
+   /**
+    * Returns the processor ID holding the minimum number of patches
+    * per processor for the specified patch statistic.
+    *
+    * When assertion checking is active, the identifier and sequence
+    * number must be valid or an assertion will result.
+    */
+   virtual int
+   getGlobalPatchStatMinPatchesPerProcId(
+      int patch_stat_id,
+      int seq_num);
+   /**
+    * Print global processor statistic data for a particular statistic
+    * to given output stream.  Floating point precision may be specified
+    * (default is 12).  Note that this method generates a general dump of
+    * the data but does NOT generate it in tabulated form.  To generate
+    * tabulated data, see the printGlobalPatchStatDataFormatted() method.
+    */
+   virtual void
+   printGlobalPatchStatData(
+      int patch_stat_id,
+      std::ostream& os,
+      int precision = 12);
+
+   /**
+    * Print patch stat data in formatted output to given output
+    * stream.  Floating point precision may be specified (default is 12).
+    */
+   virtual void
+   printGlobalPatchStatDataFormatted(
+      int patch_stat_id,
+      std::ostream& os,
+      int precision = 12);
+
+   /**
+    * Typically, this routine is called after
+    * a calculation has completed so that statistic data can be
+    * retrieved, analized, printed to a file, etc.  It is not essential
+    * that this routine be called, however, as each "get" and "print"
+    * routine checks to see if statistic data has been finalized before
+    * it peforms its function.
+    *
+    * If gather_individual_stats_on_proc_0 == true, the statistics are
+    * gathered on proc 0 for further access.  If not, only
+    * globally-reduced (min, max, sum) values for "PROC_STATS" are
+    * available (on all processes).  Non-local "PATCH_STATS" are only available
+    * if gather_individual_stats_on_proc_0 == true.
+    */
+   virtual void
+   finalize(
+      bool gather_individual_stats_on_proc_0 = true);
+
+   /**
+    * Print data to given output stream for local statistics managed
+    * by this statistician object.  Note that no fancy formatting is done.
+    * Floating point precision can be specified (default is 12).
+    */
+   virtual void
+   printLocalStatData(
+      std::ostream& os,
+      int precision = 12) const;
+
+   /**
+    * Print global statistic data information to given output stream.
+    * The data will NOT be in tabulated form.  Floating point precision
+    * can be specified (default is 12).
+    */
+   virtual void
+   printAllGlobalStatData(
+      std::ostream& os,
+      int precision = 12);
+
+   /**
+    * Print sums of all global statistic data information to given
+    * output stream. Floating point precision can be specified (default is 12).
+    */
+   virtual void
+   printAllSummedGlobalStatData(
+      std::ostream& os,
+      int precision = 12);
+
+   /**
+    * Print sums of all global statistic data information to specified
+    * filename. Floating point precision can be specified (default is 12).
+    */
+   virtual void
+   printAllSummedGlobalStatData(
+      const std::string& filename,
+      int precision = 12);
+
+   /**
+    * Write all statistics data in tab-separated format to files in the
+    * supplied directory name.  The naming convention used is "\<name\>-\<type\>.txt"
+    * where \<name\> is the name of the statistic and \<type\> is either proc or
+    * patch stat.  Floating point precision may be specified (default is 12).
+    * The files may be read in to a spreadsheet program such as MS Excel.  If
+    * no directory name is supplied, the files will be written to the directory
+    * where the application is run.
+    */
+   virtual void
+   printSpreadSheetOutput(
+      const std::string& dirname = std::string(),
+      int precision = 12);
+
+   /**
+    * Write tab-separated statistics data for specified processor.  This
+    * method is identical to "printSpreadSheetOutput()" (above), but only
+    * prints data for a single processor.  This may be useful for information
+    * that is the same across all processors.  This method will only print
+    * processor stats. Any patch stats will be ignored.
+    */
+   virtual void
+   printSpreadSheetOutputForProcessor(
+      const int proc_id,
+      const std::string& dirname = std::string(),
+      int precision = 12);
+
+protected:
+   /**
+    * The constructor for Statistician is protected.  Consistent
+    * with the definition of a Singleton class, only a statistician object
+    * can have access to the constructor for the class.
+    */
+   Statistician();
+
+   /**
+    * Statistician is a Singleton class; its destructor is protected.
+    */
+   virtual ~Statistician();
+
+   /**
+    * Initialize Singleton instance with instance of subclass.  This function
+    * is used to make the singleton object unique when inheriting from this
+    * base class.
+    */
+   void
+   registerSingletonSubclassInstance(
+      Statistician* subclass_instance);
+
+   /**
+    * During finalize() check statistic information on all processors
+    * for consistency before generating arrays of data.
+    */
+   virtual void
+   checkStatsForConsistency(
+      Array<int>& total_patches);
+
+   /**
+    * Return true if a processor statistic whose name matches the
+    * argument string exists in the database of statistics controlled
+    * by the statistician.  If a match is found, the statistic pointer
+    * in the argument list is set to that statistic.  Otherwise, return
+    * false and return a null pointer.
+    */
+   virtual bool
+   checkProcStatExists(
+      Pointer<Statistic>& stat,
+      const std::string& name) const;
+
+   /**
+    * Return true if a patch statistic whose name matches the
+    * argument string exists in the database of statistics controlled
+    * by the statistician.  If a match is found, the statistic pointer
+    * in the argument list is set to that statistic.  Otherwise, return
+    * false and return a null pointer.
+    */
+   virtual bool
+   checkPatchStatExists(
+      Pointer<Statistic>& stat,
+      const std::string& name) const;
+
+private:
+   /*!
+    * @brief Get global-reduction statistics without depending on an
+    * MPI gather, which is slow and does not scale.
+    */
+   void
+   reduceGlobalStatistics();
+
+   /*
+    * Gets the current maximum number of statistics.
+    *
+    * If trying to use more statistics than this value
+    * the arrays should be resized.
+    */
+   int
+   getMaximumNumberOfStatistics();
+
+   /*
+    * Set the maximum number of statistics.
+    *
+    * This will grow the internal arrays used to store values.
+    */
+   void
+   setMaximumNumberOfStatistics(
+      const int size);
+
+   /**
+    * Static data members to manage the singleton statistician instance.
+    */
+   static Statistician* s_statistician_instance;
+
+   static void
+   makeStatisticianInstance(
+      bool register_for_restart = true,
+      bool read_from_restart = true);
+
+   /*
+    * Create and initialize state of restart database.
+    */
+   void
+   initRestartDatabase(
+      bool register_for_restart,
+      bool read_from_restart);
+
+   /**
+    * Allocate the Statistician instance.
+    *
+    * Automatically called by the StartupShutdownManager class.
+    */
+   static void
+   initializeCallback();
+
+   /**
+    * Shutdown Statistician instance.
+    *
+    * Automatically called by the StartupShutdownManager class.
+    */
+   static void
+   shutdownCallback();
+
+   /**
+    * Deallocate the Statistician instance.
+    *
+    * Automatically called by the StartupShutdownManager class.
+    */
+   static void
+   finalizeCallback();
+
+   /*
+    * Internal database class for statistician restart capabilities.  See
+    * class declaration below.
+    */
+   StatisticRestartDatabase* d_restart_database_instance;
+
+   /*
+    * Count of statistics registered with the statistician and arrays of
+    * pointers to those statistics.
+    */
+   int d_num_proc_stats;
+   Array<Pointer<Statistic> > d_proc_statistics;
+   int d_num_patch_stats;
+   Array<Pointer<Statistic> > d_patch_statistics;
+
+   /*
+    * Arrays of global statistic data assembled by the finalize() function.
+    *
+    * Global processor stat data is assembled as
+    *    array(stat id, seq id, proc id) = proc stat value.
+    *
+    * Global patch stat data is assembled as
+    *    array(stat_id, seq id, global patch id) = patch stat value.
+    *
+    * Global patch stat processor data is assembled as
+    *    array(stat_id, seq id, global proc id) = patch stats summed on
+    *    different processors.
+    *
+    * The map of patches to processors is assembled as
+    *    array(stat_id, seq id, global patch id) = proc number.
+    */
+   bool d_must_call_finalize;
+   bool d_has_gathered_stats;
+
+   Array<Array<Array<double> > > d_global_proc_stat_data;
+
+   Array<Array<Array<double> > > d_global_patch_stat_data;
+   Array<Array<Array<double> > >
+   d_global_patch_stat_proc_data;
+   Array<Array<Array<int> > > d_global_patch_stat_mapping;
+
+   /*!
+    * @brief Array of max-reduced processor stat data.
+    *
+    * d_global_proc_stat_max[i][j] is the max over all processors of
+    * the stat id (i) and sequence id (j).
+    */
+   Array<Array<double> > d_global_proc_stat_max;
+
+   /*!
+    * @brief Processor owning the max value of processor stat data.
+    *
+    * d_global_proc_stat_imax[i][j] is the process corresponding to
+    * d_global_proc_stat_max[i][j].
+    */
+   Array<Array<int> > d_global_proc_stat_imax;
+
+   /*!
+    * @brief Array of min-reduced processor stat data.
+    *
+    * d_global_proc_stat_min[i][j] is the min over all processors of
+    * the stat id (i) and sequence id (j).
+    */
+   Array<Array<double> > d_global_proc_stat_min;
+
+   /*!
+    * @brief Processor owning the min value of processor stat data.
+    *
+    * d_global_proc_stat_imin[i][j] is the process corresponding to
+    * d_global_proc_stat_max[i][j].
+    */
+   Array<Array<int> > d_global_proc_stat_imin;
+
+   /*!
+    * @brief Array of sum-reduced processor stat data.
+    *
+    * d_global_proc_stat_sum[i][j] is the sum over all processors of
+    * the stat id (i) and sequence id (j).
+    */
+   Array<Array<double> > d_global_proc_stat_sum;
+
+   /*
+    * Internal value used to set and grow arrays for storing
+    * statistics.
+    */
+   static const int DEFAULT_NUMBER_OF_TIMERS_INCREMENT = 128;
+
+   static StartupShutdownManager::Handler
+   s_finalize_handler;
+};
+
+/*
+ * Class StatisticRestartDatabase is a separate class used by the
+ * statistician to provide restart capabilities. Each restartable
+ * class must be derived from Serializable.  Since Statistician
+ * is a Singleton, its destructor is protected.  StatisticRestartDatabase
+ * has a publically accessible destructor.  To avoid improper use of this
+ * class, it is privately derived from Serializable, and make it a
+ * friend of Statistician.  In this way, its methods can only
+ * be accessed via Serializable and Statistician.
+ */
+
+class StatisticRestartDatabase:private Serializable
+{
+   friend class Statistician;
+public:
+   /*
+    * The StatisticRestartDatabase constructor caches a copy of the
+    * database object name and registers the object with the restart
+    * manager for subsequent restart files if the first boolean argument
+    * is true.  If the run is started froma restart file and the second
+    * boolean argument is true, we initialize the statistics from restart.
+    */
+   StatisticRestartDatabase(
+      const std::string& object_name,
+      bool register_for_restart,
+      bool read_from_restart);
+
+   /*
+    * The destructor for StatisticRestartDatabase unregisters
+    * the database object with the restart manager when so registered.
+    */
+   virtual ~StatisticRestartDatabase();
+
+   /*
+    * Put all statistics and their state in the given restart database.
+    * This function is overloaded from Serializable.
+    */
+   void
+   putToDatabase(
+      Pointer<Database> db);
+
+   /*
+    * Construct those statistics saved in the restart database.
+    */
+   void
+   getFromRestart();
+
+private:
+   std::string d_object_name;
+   bool d_registered_for_restart;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Timer.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Timer.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,335 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Timer class to track elapsed time in portions of a program. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Timer.h"
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/IOStream.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifdef HAVE_VAMPIR
+extern "C" {
+#include "VT.h"
+}
+#endif
+
+#define TBOX_TIMER_VERSION (1)
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/tbox/Timer.I"
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The constructor sets the timer name and initializes timer state.      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+Timer::Timer(
+   const std::string& name):
+   d_name(name),
+   d_is_running(false),
+   d_is_active(true),
+   d_accesses(0)
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+#ifdef HAVE_VAMPIR
+   string::size_type position;
+
+   // parse timers name down to method
+   position = name.find("::");
+   string class_method = name.substr(position + 2);
+   position = class_method.find("::");
+   string class_name = class_method.substr(0, position);
+   string method = class_method.substr(position + 2);
+
+   // convert strings to char* type
+   char* char_method = new char[method.length() + 1];
+   method.copy(char_method, string::npos);
+   char_method[method.length()] = 0;
+
+   char* char_class = new char[class_name.length() + 1];
+   class_name.copy(char_class, string::npos);
+   char_class[class_name.length()] = 0;
+
+   VT_symdef(id, char_class, char_method);
+#endif
+
+#ifdef HAVE_TAU
+   /*
+    * Create a Tau "timer" to track time.
+    */
+   TAU_MAPPING_TIMER_CREATE(tautimer, name, " ",
+      TAU_USER2, "SAMRAI_DEFAULT");
+#endif
+
+   Clock::initialize(d_user_start_exclusive);
+   Clock::initialize(d_user_stop_exclusive);
+   Clock::initialize(d_system_start_exclusive);
+   Clock::initialize(d_system_stop_exclusive);
+   Clock::initialize(d_wallclock_start_exclusive);
+   Clock::initialize(d_wallclock_stop_exclusive);
+
+   reset();
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+Timer::~Timer()
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   d_concurrent_timers.clear();
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+/*
+ ***************************************************************************
+ *                                                                         *
+ * Start and stop routines for timers.                                     *
+ *                                                                         *
+ * For wallclock time: If we have MPI, we use MPI_Wtime to set the         *
+ *                     start/stop point.  If we don't have MPI but do      *
+ *                     have access to timer utilities in sys/times.h,      *
+ *                     we use the time() utility to set the start/start    *
+ *                     point.  If we have neither, we set the wallclock    *
+ *                     start/stop time to zero.                            *
+ *                                                                         *
+ * For user time:      If we have access to timer utilities in sys/times.h,*
+ *                     we use the times() utility to compute user and      *
+ *                     system start/stop point (passing in the tms struct).*
+ *                     If we don't have these utilities, we simply set the *
+ *                     user and start/stop times to zero.                  *
+ *                                                                         *
+ * Note that the stop routine increments the elapsed time information.     *
+ * Also, the timer manager manipulates the exclusive time information      *
+ * the timers when start and stop are called.                              *
+ *                                                                         *
+ ***************************************************************************
+ */
+
+void Timer::start()
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   if (d_is_active) {
+
+      // Timer should not be running.  This would indicate two start calls being
+      // made before a stop.
+      TBOX_ASSERT(d_is_running == false);
+      d_is_running = true;
+
+      d_accesses++;
+
+      Clock::timestamp(d_user_start_total,
+         d_system_start_total,
+         d_wallclock_start_total);
+
+#ifdef HAVE_VAMPIR
+      VT_begin(d_identifier);
+#endif
+
+#ifdef HAVE_TAU
+      /*
+       * Start the TAU timer.  The "tid" is used for threaded systems
+       * so it generally won't apply for us.  The profiler accesses
+       * the timer (given the "tautimer" for this timer object) which
+       * returns "t", and then starts "t".
+       */
+      int tid = RtsLayer::myThread();
+      TAU_MAPPING_PROFILE_TIMER(t, tautimer, tid);
+      TAU_MAPPING_PROFILE_START(t, tid);
+#endif
+
+      TimerManager::getManager()->startTime(this);
+
+   }
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+void Timer::stop()
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   if (d_is_active) {
+
+      // Timer should be running.  This would indicate two stop calls being
+      // made before a start.
+      TBOX_ASSERT(d_is_running == true);
+      d_is_running = false;
+
+      TimerManager::getManager()->stopTime(this);
+
+#ifdef HAVE_VAMPIR
+      VT_end(d_identifier);
+#endif
+
+#ifdef HAVE_TAU
+      TAU_MAPPING_PROFILE_STOP(RtsLayer::myThread());
+#endif
+
+      Clock::timestamp(d_user_stop_total,
+         d_system_stop_total,
+         d_wallclock_stop_total);
+
+      d_wallclock_total +=
+         double(d_wallclock_stop_total - d_wallclock_start_total);
+      d_user_total += double(d_user_stop_total - d_user_start_total);
+      d_system_total += double(d_system_stop_total - d_system_start_total);
+
+   }
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+/*
+ ***************************************************************************
+ ***************************************************************************
+ */
+
+void Timer::barrierAndStart()
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   if (d_is_active) {
+      SAMRAI_MPI::getSAMRAIWorld().Barrier();
+   }
+
+   start();
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+void Timer::barrierAndStop()
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   if (d_is_active) {
+      SAMRAI_MPI::getSAMRAIWorld().Barrier();
+   }
+
+   stop();
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+void Timer::reset()
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   d_user_total = 0.0;
+   d_system_total = 0.0;
+   d_wallclock_total = 0.0;
+
+   d_user_exclusive = 0.0;
+   d_system_exclusive = 0.0;
+   d_wallclock_exclusive = 0.0;
+
+   d_max_wallclock = 0.0;
+
+   d_concurrent_timers.clear();
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+/*
+ ***************************************************************************
+ *                                                                         *
+ * Compute the load balance efficiency based the wallclock time on each    *
+ * processor, using the formula:                                           *
+ *                                                                         *
+ *      eff = (sum(time summed across processors)/#processors) /           *
+ *             max(time across all processors)                             *
+ *                                                                         *
+ * This formula corresponds to that used to compute load balance           *
+ * efficiency based on the processor distribution of the the number of     *
+ * cells (i.e. in BalanceUtilities::computeLoadBalanceEfficiency).         *
+ *                                                                         *
+ ***************************************************************************
+ */
+double Timer::computeLoadBalanceEfficiency()
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   double wall_time = d_wallclock_total;
+   double sum = wall_time;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&wall_time, &sum, 1, MPI_DOUBLE, MPI_SUM);
+   }
+   computeMaxWallclock();
+   int nprocs = mpi.getSize();
+   double eff = 100.;
+   if (d_max_wallclock > 0.) {
+      eff = 100. * (sum / (double)nprocs) / d_max_wallclock;
+   }
+   return eff;
+#else
+   return 100.0;
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+void Timer::computeMaxWallclock()
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   double wall_time = d_wallclock_total;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(
+         &wall_time,
+         &d_max_wallclock,
+         1,
+         MPI_DOUBLE,
+         MPI_MAX);
+   }
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+void Timer::putToDatabase(
+   Pointer<Database> db)
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   TBOX_ASSERT(!db.isNull());
+
+   db->putInteger("TBOX_TIMER_VERSION",
+      TBOX_TIMER_VERSION);
+
+   db->putString("d_name", d_name);
+
+   db->putDouble("d_user_total", d_user_total);
+   db->putDouble("d_system_total", d_system_total);
+   db->putDouble("d_wallclock_total", d_wallclock_total);
+
+   db->putDouble("d_user_exclusive", d_user_exclusive);
+   db->putDouble("d_system_exclusive", d_system_exclusive);
+   db->putDouble("d_wallclock_exclusive", d_wallclock_exclusive);
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+void Timer::getFromRestart(
+   Pointer<Database> db)
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   TBOX_ASSERT(!db.isNull());
+
+   int ver = db->getInteger("TBOX_TIMER_VERSION");
+   if (ver != TBOX_TIMER_VERSION) {
+      TBOX_ERROR("Restart file version different than class version.");
+   }
+
+   d_name = db->getString("d_name");
+
+   d_user_total = db->getDouble("d_user_total");
+   d_system_total = db->getDouble("d_system_total");
+   d_wallclock_total = db->getDouble("d_wallclock_total");
+
+   d_user_exclusive = db->getDouble("d_user_exclusive");
+   d_system_exclusive = db->getDouble("d_system_exclusive");
+   d_wallclock_exclusive = db->getDouble("d_wallclock_exclusive");
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Timer.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Timer.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,221 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Timing wrapper for various routines. 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace tbox {
+
+/*
+ ***************************************************************************
+ *                                                                         *
+ * Exclusive start and stop routines for timers.                           *
+ *                                                                         *
+ * For wallclock time: If we have MPI, we use MPI_Wtime to set the         *
+ *                     start/stop point.  If we don't have MPI but do      *
+ *                     have access to timer utilities in sys/times.h,      *
+ *                     we use the time() utility to set the start/start    *
+ *                     point.  If we have neither, we set the wallclock    *
+ *                     start/stop time to zero.                            *
+ *                                                                         *
+ * For user time:      If we have access to timer utilities in sys/times.h,*
+ *                     we use the times() utility to compute user and      *
+ *                     system start/stop point (passing in the tms struct).*
+ *                     If we don't have these utilities, we simply set the *
+ *                     user and start/stop times to zero.                  *
+ *                                                                         *
+ * The timer manager manipulates the exclusive time information;  i.e.     *
+ * when the timer's startExclusive and stopExclusive routines are called.  *
+ *
+ ***************************************************************************
+ */
+#ifndef ENABLE_SAMRAI_TIMERS
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:869)
+#pragma warning (disable:1101)
+#endif // __INTEL_COMPILER
+#endif // ENABLE_SAMRAI_TIMERS
+
+SAMRAI_INLINE_KEYWORD void Timer::startExclusive()
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   if (d_is_active) {
+
+      Clock::timestamp(d_user_start_exclusive,
+         d_system_start_exclusive,
+         d_wallclock_start_exclusive);
+
+   }
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+SAMRAI_INLINE_KEYWORD void Timer::stopExclusive()
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   if (d_is_active) {
+      Clock::timestamp(d_user_stop_exclusive,
+         d_system_stop_exclusive,
+         d_wallclock_stop_exclusive);
+
+      d_wallclock_exclusive +=
+         double(d_wallclock_stop_exclusive - d_wallclock_start_exclusive);
+      d_user_exclusive +=
+         double(d_user_stop_exclusive - d_user_start_exclusive);
+      d_system_exclusive +=
+         double(d_system_stop_exclusive - d_system_start_exclusive);
+   }
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+/*
+ ***************************************************************************
+ *                                                                         *
+ * Simple utility routines to manipulate timers.                           *
+ *                                                                         *
+ ***************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD const std::string& Timer::getName() const
+{
+   return d_name;
+}
+
+SAMRAI_INLINE_KEYWORD bool Timer::isActive() const
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   return d_is_active;
+#else
+   return false;
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+SAMRAI_INLINE_KEYWORD bool Timer::isRunning() const
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   return d_is_running;
+#else
+   return false;
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+SAMRAI_INLINE_KEYWORD double Timer::getTotalUserTime() const
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   return d_user_total / Clock::getClockCycle();
+#else
+   return 0.0;
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+SAMRAI_INLINE_KEYWORD double Timer::getTotalSystemTime() const
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   return d_system_total / Clock::getClockCycle();
+#else
+   return 0.0;
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+SAMRAI_INLINE_KEYWORD double Timer::getTotalWallclockTime() const
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   return d_wallclock_total;
+#else
+   return 0.0;
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+SAMRAI_INLINE_KEYWORD double Timer::getMaxWallclockTime() const
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   return d_max_wallclock;
+#else
+   return 0.0;
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+SAMRAI_INLINE_KEYWORD double Timer::getExclusiveUserTime() const
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   return d_user_exclusive / Clock::getClockCycle();
+#else
+   return 0.0;
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+SAMRAI_INLINE_KEYWORD double Timer::getExclusiveSystemTime() const
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   return d_system_exclusive / Clock::getClockCycle();
+#else
+   return 0.0;
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+SAMRAI_INLINE_KEYWORD double Timer::getExclusiveWallclockTime() const
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   return d_wallclock_exclusive;
+#else
+   return 0.0;
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+SAMRAI_INLINE_KEYWORD void Timer::addConcurrentTimer(
+   const Timer& timer)
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   if (!isConcurrentTimer(timer)) {
+      d_concurrent_timers.push_back(&timer);
+   }
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+SAMRAI_INLINE_KEYWORD bool Timer::isConcurrentTimer(
+   const Timer& timer) const
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   for (std::vector<const Timer *>::const_iterator i = d_concurrent_timers.begin();
+        i != d_concurrent_timers.end();
+        ++i) {
+      if (*i == &timer) {
+         return true;
+      }
+   }
+
+#endif // ENABLE_SAMRAI_TIMERS
+   return false;
+}
+
+SAMRAI_INLINE_KEYWORD int Timer::getNumberAccesses() const
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   return d_accesses;
+#else
+   return 0;
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+/*
+ ***************************************************************************
+ *                                                                         *
+ * Private utility routines to manipulate timers in database.              *
+ *                                                                         *
+ ***************************************************************************
+ */
+
+SAMRAI_INLINE_KEYWORD void Timer::setActive(
+   bool is_active)
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   d_is_active = is_active;
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Timer.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Timer.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,309 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Timer class to track elapsed time in portions of a program. 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_Timer
+#define included_tbox_Timer
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/Clock.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+#include <vector>
+
+#ifdef HAVE_TAU
+#if (PROFILING_ON || TRACING_ON)
+#include <Profile/Profiler.h>
+#endif
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * Class Timer holds the exclusive and total start, stop, and elapsed
+ * time for timers instrumented in SAMRAI.  Total time is simply the time
+ * between calls to the start() and stop() functions.  Exclusive time is
+ * applicable if there are nested timers called.
+ *
+ * System and user start and end times are stored as variables of type
+ * clock_t, defined in the sys/times.h include file.  A detailed explanation
+ * of the structures used to store system and user times is given in the
+ * header for the Clock class. This routine simply accesses the functions
+ * specified in that class.
+ *
+ * Wallclock time may be computed by the systems internal clocks which require
+ * an object of type clock_t, or by SAMRAI_MPI::Wtime() if the code is linked to MPI
+ * libraries.
+ *
+ * In addition to running or not running, a timer may be active or inactive.
+ * An inactive timer is one that is created within a program but will never
+ * be turned on or off because it is either not specified as active in
+ * an input file or it was not explicitly made active by the user.  When
+ * a timer is created, it is active by default.
+ *
+ * Note that the constructor is protected so that timer objects can only
+ * be created by the TimerManager class.
+ *
+ * @see tbox::TimerManager
+ */
+
+class TimerManager;
+
+class Timer:public DescribedClass
+{
+   friend class TimerManager;
+public:
+   /**
+    * Empty virtual destructor for Timer class.
+    */
+   virtual ~Timer();
+
+   /**
+    * Return string name for timer.
+    */
+   const std::string&
+   getName() const;
+
+   /**
+    * Start the timer if active.
+    */
+   void
+   start();
+
+   /**
+    * Stop the timer if active.
+    */
+   void
+   stop();
+
+   /**
+    * If active, SAMRAI_MPI::getSAMRAIWorld().Barrier() then start the timer.
+    */
+   void
+   barrierAndStart();
+
+   /**
+    * If active, SAMRAI_MPI::getSAMRAIWorld().Barrier() then stop the timer.
+    */
+   void
+   barrierAndStop();
+
+   /**
+    * Start exclusive time.
+    */
+   void
+   startExclusive();
+
+   /**
+    * Stop exclusive time.
+    */
+   void
+   stopExclusive();
+
+   /**
+    * Reset the state of the timing information.
+    */
+   void
+   reset();
+
+   /**
+    * Return total system time (between starts and stops)
+    */
+   double
+   getTotalSystemTime() const;
+
+   /**
+    * Return total user time
+    */
+   double
+   getTotalUserTime() const;
+
+   /**
+    * Return total wallclock time
+    */
+   double
+   getTotalWallclockTime() const;
+
+   /**
+    * Return max wallclock time
+    */
+   double
+   getMaxWallclockTime() const;
+
+   /**
+    * Return exclusive system time.
+    */
+   double
+   getExclusiveSystemTime() const;
+
+   /**
+    * Return exclusive user time.
+    */
+   double
+   getExclusiveUserTime() const;
+
+   /**
+    * Return exclusive wallclock time.
+    */
+   double
+   getExclusiveWallclockTime() const;
+
+   /**
+    * Return true if the timer is active; false otherwise.
+    */
+   bool
+   isActive() const;
+
+   /**
+    * Return true if timer is running; false otherwise.
+    */
+   bool
+   isRunning() const;
+
+   /**
+    * Return number of accesses to start()-stop() functions for the
+    * timer.
+    */
+   int
+   getNumberAccesses() const;
+
+   /**
+    * Compute load balance efficiency based on wallclock (non-exclusive)
+    * time.
+    */
+   double
+   computeLoadBalanceEfficiency();
+
+   /**
+    * Compute max wallclock time based on total (non-exclusive) time.
+    */
+   void
+   computeMaxWallclock();
+
+   /**
+    * Write timer data members to database.
+    */
+   virtual void
+   putToDatabase(
+      Pointer<Database> db);
+
+   /**
+    * Read restarted times from restart database.  When assertion checking
+    * is on, the database pointer must be non-null.
+    */
+   virtual void
+   getFromRestart(
+      Pointer<Database> db);
+
+protected:
+   /**
+    * The constructor for the Timer class sets timer name string
+    * and integer identifiers, and initializes the timer state.
+    */
+   Timer(
+      const std::string& name);
+
+   /*
+    * Set this timer object to be a active or inactive.
+    */
+   void
+   setActive(
+      bool is_active);
+
+   /**
+    * Add Timer that running concurrently with this one.
+    */
+   void
+   addConcurrentTimer(
+      const Timer& timer);
+
+   /**
+    * Return if the timer is running concurrently with this one.
+    */
+   bool
+   isConcurrentTimer(
+      const Timer& timer) const;
+
+private:
+   /*
+    * Class name, id, and concurrent timer flag.
+    */
+   std::string d_name;
+   std::vector<const Timer *> d_concurrent_timers;
+
+   bool d_is_running;
+   bool d_is_active;
+
+   /*
+    *  Total times (non-exclusive)
+    */
+   double d_user_total;
+   double d_system_total;
+   double d_wallclock_total;
+
+   /*
+    *  Exclusive times
+    */
+   double d_user_exclusive;
+   double d_system_exclusive;
+   double d_wallclock_exclusive;
+
+   /*
+    *  Cross processor times (i.e. determined across processors)
+    */
+   double d_max_wallclock;
+
+   /*
+    *  Timestamps.  User and system times are stored as type clock_t.
+    *  Wallclock time is also stored as clock_t unless the library has
+    * been compiled with MPI.  In this case, the wall time is stored
+    * as type double.
+    */
+   clock_t d_user_start_total;
+   clock_t d_user_stop_total;
+   clock_t d_system_start_total;
+   clock_t d_system_stop_total;
+   clock_t d_user_start_exclusive;
+   clock_t d_user_stop_exclusive;
+   clock_t d_system_start_exclusive;
+   clock_t d_system_stop_exclusive;
+   double d_wallclock_start_total;
+   double d_wallclock_stop_total;
+   double d_wallclock_start_exclusive;
+   double d_wallclock_stop_exclusive;
+
+   /*
+    * Counter of number of times timers start/stop
+    * are accessed.
+    */
+   int d_accesses;
+
+   static const int DEFAULT_NUMBER_OF_TIMERS_INCREMENT = 128;
+
+   /*
+    * Objects used for performance analysis with TAU.  The "tautimer" mapping
+    * object is a tau timer that is associated with this SAMRAI timer.
+    */
+#ifdef HAVE_TAU
+   TAU_MAPPING_OBJECT(tautimer)
+#endif
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/tbox/Timer.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/TimerManager.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/TimerManager.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,2524 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Class to manage different timer objects used throughout the
+ *                library. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/InputDatabase.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/IOStream.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <string>
+
+#ifndef ENABLE_SAMRAI_TIMERS
+#ifdef __INTEL_COMPILER
+#pragma warning (disable:869)
+#endif
+#endif
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+TimerManager * TimerManager::s_timer_manager_instance =
+   (TimerManager *)NULL;
+
+int TimerManager::s_main_timer_identifier = -1;
+int TimerManager::s_inactive_timer_identifier = -9999;
+
+StartupShutdownManager::Handler
+TimerManager::s_finalize_handler(
+   0,
+   0,
+   0,
+   TimerManager::finalizeCallback,
+   StartupShutdownManager::priorityTimerManger);
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Static timer manager member functions.                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void TimerManager::createManager(
+   Pointer<Database> input_db)
+{
+   if (!s_timer_manager_instance) {
+      s_timer_manager_instance = new TimerManager(input_db);
+
+      /*
+       * Compute the overheads
+       */
+      s_timer_manager_instance->computeOverheadConstants();
+
+      s_timer_manager_instance->d_main_timer->start();
+   } else {
+      /*
+       * Manager already exists so simply apply the rules
+       * from the input file to the existing timers.
+       */
+      s_timer_manager_instance->getFromInput(input_db);
+      s_timer_manager_instance->activateExistingTimers();
+   }
+}
+
+TimerManager *TimerManager::getManager()
+{
+   if (!s_timer_manager_instance) {
+      TBOX_WARNING("TimerManager::getManager() is called before\n"
+         << "createManager().  Creating the timer manager\n"
+         << "(without using input database.)\n");
+      createManager(tbox::Pointer<SAMRAI::tbox::Database>(NULL));
+   }
+
+   return s_timer_manager_instance;
+}
+
+void TimerManager::finalizeCallback()
+{
+   if (s_timer_manager_instance) {
+      delete s_timer_manager_instance;
+      s_timer_manager_instance = ((TimerManager *)NULL);
+   }
+}
+
+void TimerManager::registerSingletonSubclassInstance(
+   TimerManager* subclass_instance)
+{
+   if (!s_timer_manager_instance) {
+      s_timer_manager_instance = subclass_instance;
+   } else {
+      TBOX_ERROR("TimerManager internal error...\n"
+         << "Attemptng to set Singleton instance to subclass instance,"
+         << "\n but Singleton instance already set." << std::endl);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Protected timer manager constructor and destructor.                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+TimerManager::TimerManager(
+   Pointer<Database> input_db)
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   /*
+    * Create a timer that measures overall solution time.  If the
+    * application uses Tau, this timer will effectively measure
+    * uninstrumented parts of the library.  Hence, use a different name
+    * for the different cases to avoid confusion in the Tau analysis tool.
+    */
+#ifdef HAVE_TAU
+   d_main_timer = new Timer("UNINSTRUMENTED PARTS");
+#else
+   d_main_timer = new Timer("TOTAL RUN TIME");
+#endif
+
+   d_exclusive_timer_stack.clearItems();
+
+   d_length_package_names = 0;
+   d_length_class_names = 0;
+   d_length_class_method_names = 0;
+
+   d_print_exclusive = false;
+   d_print_total = true;
+   d_print_processor = true;
+   d_print_max = false;
+   d_print_summed = false;
+   d_print_user = false;
+   d_print_sys = false;
+   d_print_wall = true;
+   d_print_percentage = true;
+   d_print_concurrent = false;
+   d_print_timer_overhead = false;
+
+   d_print_threshold = 0.25;
+
+   getFromInput(input_db);
+
+   d_timer_active_access_time = -9999.0;
+   d_timer_inactive_access_time = -9999.0;
+#endif
+}
+
+TimerManager::~TimerManager()
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   d_main_timer->stop();
+   d_main_timer.setNull();
+
+   d_timers.clear();
+   d_inactive_timers.clear();
+
+   d_exclusive_timer_stack.clearItems();
+
+   d_package_names.clearItems();
+   d_class_names.clearItems();
+   d_class_method_names.clearItems();
+#endif
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Utility functions for creating timers, adding them to the manager     *
+ * database, and checking whether a particular timer exists.             *
+ *                                                                       *
+ *    o checkTimerExistsInArray is private.  It returns true if a timer  *
+ *      matching the name string exists in the array and returns false   *
+ *      otherwise.  If such a timer exists, the pointer is set to that   *
+ *      timer; otherwise the pointer is null.                            *
+ *                                                                       *
+ *    o getTimer returns a timer with the given name.  It will be active *
+ *      if its name appears in the input file, or if it is added with    *
+ *      a `true' argument.  Otherwise the timer will be inactive.        *
+ *                                                                       *
+ *    o checkTimerExists returns true if a timer matching the name       *
+ *      string exists and false otherwise.  If such a timer exists,      *
+ *      the pointer is set to that timer; otherwise the pointer is null. *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool TimerManager::checkTimerExistsInArray(
+   Pointer<Timer>& timer,
+   const std::string& name,
+   const std::vector<Pointer<Timer> >& timer_array) const
+{
+
+   bool timer_found = false;
+#ifdef ENABLE_SAMRAI_TIMERS
+
+   timer.setNull();
+   if (!name.empty()) {
+      for (size_t i = 0; i < timer_array.size(); i++) {
+         if (timer_array[i]->getName() == name) {
+            timer_found = true;
+            timer = timer_array[i];
+            break;
+         }
+      }
+   }
+#endif
+   return timer_found;
+}
+
+void TimerManager::activateExistingTimers() {
+#ifdef ENABLE_SAMRAI_TIMERS
+   std::vector<Pointer<Timer> >::iterator it = d_inactive_timers.begin();
+   while (it != d_inactive_timers.end()) {
+      bool timer_active = checkTimerInNameLists((*it)->getName());
+      if (timer_active) {
+         (*it)->setActive(true);
+         d_timers.push_back((*it));
+         it = d_inactive_timers.erase(it);
+      } else {
+         ++it;
+      }
+   }
+#endif
+}
+
+Pointer<Timer> TimerManager::getTimer(
+   const std::string& name,
+   bool ignore_timer_input)
+{
+   Pointer<Timer> timer;
+
+#ifdef ENABLE_SAMRAI_TIMERS
+
+   TBOX_ASSERT(!name.empty());
+   bool timer_active = true;
+   if (!ignore_timer_input) {
+      /*
+       * Check if name is in either the d_package_names, d_class_names,
+       * or d_class_method_names lists.  Add it if it is.
+       */
+      timer_active = checkTimerInNameLists(name);
+   }
+
+   /*
+    * Add the timer to the appropriate array, if necessary.
+    */
+   if (timer_active) {
+      if (!checkTimerExistsInArray(timer,
+             name,
+             d_timers)) {
+         if (d_timers.size() == d_timers.capacity()) {
+            d_timers.reserve(d_timers.size()
+               + DEFAULT_NUMBER_OF_TIMERS_INCREMENT);
+         }
+         timer = new Timer(name);
+         d_timers.push_back(timer);
+      }
+   } else {
+      if (!checkTimerExistsInArray(timer,
+             name,
+             d_inactive_timers)) {
+         if (d_inactive_timers.size() == d_inactive_timers.capacity()) {
+            d_inactive_timers.reserve(d_inactive_timers.size()
+               + DEFAULT_NUMBER_OF_TIMERS_INCREMENT);
+         }
+         timer = new Timer(name);
+         timer->setActive(false);
+         d_inactive_timers.push_back(timer);
+      }
+   }
+   return timer;
+#else
+   // since timers aren't active - and we need to still provide
+   // pseudo-timer functionality (i.e., a valid timer), we'll
+   // create one on the fly, but not track it.
+   timer = new Timer(name);
+   timer->setActive(false);
+   return timer;
+#endif
+}
+
+bool TimerManager::checkTimerExists(
+   Pointer<Timer>& timer,
+   const std::string& name) const
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   TBOX_ASSERT(!name.empty());
+
+   bool timer_found = checkTimerExistsInArray(timer,
+         name,
+         d_timers);
+
+   if (!timer_found) {
+      timer_found = checkTimerExistsInArray(timer,
+            name,
+            d_inactive_timers);
+   }
+
+   return timer_found;
+#else
+   return false;
+#endif
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Utility functions to check whether timer is running and to reset      *
+ * all active timers.                                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool TimerManager::checkTimerRunning(
+   const std::string& name) const
+{
+   bool is_running = false;
+#ifdef ENABLE_SAMRAI_TIMERS
+
+   TBOX_ASSERT(!name.empty());
+   Pointer<Timer> timer;
+   if (checkTimerExistsInArray(timer, name, d_timers)) {
+      is_running = timer->isRunning();
+   }
+#endif
+   return is_running;
+}
+
+void TimerManager::resetAllTimers()
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   d_main_timer->stop();
+   d_main_timer->reset();
+   d_main_timer->start();
+
+   for (size_t i = 0; i < d_timers.size(); i++) {
+      d_timers[i]->reset();
+   }
+   for (size_t j = 0; j < d_inactive_timers.size(); j++) {
+      d_inactive_timers[j]->reset();
+   }
+#endif
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Protected start and stop routines for exclusive timer management.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void TimerManager::startTime(
+   Timer* timer)
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   TBOX_ASSERT(!(timer == (Timer *)NULL));
+
+   if (timer->isActive()) {
+   }
+
+   if (d_print_exclusive) {
+      if (!d_exclusive_timer_stack.isEmpty()) {
+         ((Timer *)d_exclusive_timer_stack.getFirstItem())->
+         stopExclusive();
+      }
+      Timer* stack_timer = timer;
+      d_exclusive_timer_stack.addItem(stack_timer);
+      stack_timer->startExclusive();
+   }
+
+   if (d_print_concurrent) {
+      for (size_t i = 0; i < d_timers.size(); i++) {
+         if ((d_timers[i] != timer) && d_timers[i]->isRunning()) {
+            d_timers[i]->addConcurrentTimer(*d_timers[i]);
+         }
+      }
+   }
+#endif
+}
+
+void TimerManager::stopTime(
+   Timer* timer)
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   TBOX_ASSERT(!(timer == (Timer *)NULL));
+
+   if (d_print_exclusive) {
+      timer->stopExclusive();
+      if (!d_exclusive_timer_stack.isEmpty()) {
+         d_exclusive_timer_stack.removeFirstItem();
+         if (!d_exclusive_timer_stack.isEmpty()) {
+            ((Timer *)d_exclusive_timer_stack.getFirstItem())->
+            startExclusive();
+         }
+      }
+   }
+#endif
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Parser to see if Timer has been registered or not.                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool TimerManager::checkTimerInNameLists(
+   const std::string& copy)
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   std::string name = copy;
+   /*
+    * string::size_type is generally an int, but it may depend on vendor's
+    * implementation of string class.  Just to be safe, we use the definition
+    * from the string class (string::size_type).
+    */
+   std::string::size_type string_length, list_entry_length, position;
+
+   /*
+    * Specification of whether we will use the timer after comparing to
+    * package, class, and class::method lists.
+    */
+   bool will_use_timer = false;
+
+   /*
+    * Start by evaluating the Timer's package.  If the list of packages
+    * has length zero, we can skip this step. We can also skip this step
+    * if the timer does not have two "::" in its name.
+    *
+    * The manager will assume the following with regard to the specified timer
+    * name:  The name has...
+    *  1) Two "::" - it is of the form Package::Class::method.  A user can
+    *     turn on the timer by specifying the timers Package, Class, or
+    *     Class::method combination in the input file.  This is the most
+    *     versatile.
+    *  2) One "::" - it has the form Class::method.  The timer is assumed not
+    *     to be in a package.  A user can turn on the timer by specifying its
+    *     Class or class::method combination.
+    *  3) No "::" - it has the form Class.  The timer is can be turned on by
+    *     entering the class name in the input file.
+    */
+   if (d_length_package_names > 0) {
+      /*
+       * See how many instances of "::" there are in the name.  If there
+       * are at least two, the timer has a package which might be in the
+       * package list.
+       */
+      int occurrences = 0;
+      position = name.find("::");
+      if (position < name.size()) {
+         occurrences++;
+         std::string substring = name.substr(position + 2);
+         position = substring.find("::");
+         if (position < substring.size()) {
+            occurrences++;
+         }
+      }
+
+      if (occurrences >= 2) {
+         /*
+          * The timer may be in the package list.  Parse to get its package
+          * name and compare to the list entries.
+          */
+         position = name.find("::");
+         std::string package = name.substr(0, position);
+
+         /*
+          * Iterate through package list and see if the timer's package
+          * name is there.
+          */
+         bool package_exists = false;
+         string_length = package.size();
+         for (List<std::string>::Iterator i(d_package_names); i; i++) {
+            list_entry_length = i().size();
+            if (string_length == list_entry_length) {
+               package_exists = (i() == package);
+            }
+            if (package_exists) break;
+         }
+         will_use_timer = package_exists;
+      }
+   }
+
+   if (!will_use_timer) {
+
+      /*
+       * The timer's package has already been compared to the package list,
+       * so we can parse it off to ease further evaluations of the name.
+       */
+      int occurrences = 0;
+      position = name.find("::");
+      if (position < name.size()) {
+         occurrences++;
+         std::string substring = name.substr(position + 2);
+         position = substring.find("::");
+         if (position < substring.size()) {
+            occurrences++;
+         }
+      }
+      if (occurrences >= 2) {
+         position = name.find("::");
+         name = name.substr(position + 2);
+      }
+
+      /*
+       * See if Timer's class is in d_class_names.  If the list of classes
+       * has length zero, we can skip this step.
+       */
+      if (d_length_class_names > 0) {
+
+         /*
+          * If a "::" exists in the timer name, parse off the part before
+          * before it.  This is the class name.  If no "::" exists, assume
+          * the timer name is a class name (don't do any parsing) and compare
+          * it directly to the class list.
+          */
+         position = name.find("::");
+         std::string class_name;
+         if (position < name.size()) {
+            class_name = name.substr(0, position);
+         } else {
+            class_name = name;
+         }
+
+         /*
+          * Is class name dimensional?
+          */
+         string_length = class_name.size();
+         std::string dim = class_name.substr(string_length - 1, 1);
+         bool is_dimensional = false;
+         std::string nondim_class_name;
+         if (dim == "1" || dim == "2" || dim == "3") {
+            is_dimensional = true;
+            nondim_class_name = class_name.substr(0, string_length - 1);
+         } else {
+            nondim_class_name = class_name;
+         }
+
+         /*
+          * See if class name is in class list.  Accelerate this by comparing
+          * the length of the entries.  Do non-dimensional comparison first.
+          */
+         string_length = nondim_class_name.size();
+         bool class_exists = false;
+         for (List<std::string>::Iterator i(d_class_names); i; i++) {
+            list_entry_length = i().size();
+            if (string_length == list_entry_length) {
+               class_exists = (i() == nondim_class_name);
+            }
+            if (class_exists) break;
+         }
+
+         /*
+          * Now do dimensional comparison.
+          */
+         string_length = class_name.size();
+         if (is_dimensional && !class_exists) {
+            for (List<std::string>::Iterator i(d_class_names); i; i++) {
+               list_entry_length = i().size();
+               if (string_length == list_entry_length) {
+                  class_exists = (i() == class_name);
+               }
+               if (class_exists) break;
+            }
+         }
+         will_use_timer = class_exists;
+
+      }
+
+      /*
+       * See if Timer's class::method name is in d_class_method_names list.
+       *
+       * If the list of class_method_names has length zero, we can skip
+       * this step.  Also, if no "::" exists in the timer name then it
+       * cannot be in the timer list so lets avoid the comparison.
+       */
+      position = name.find("::");
+      occurrences = 0;
+      if (position < name.size()) {
+         occurrences = 1;
+      }
+
+      if (!will_use_timer && d_length_class_method_names > 0 &&
+          occurrences > 0) {
+
+         /*
+          * Parse name before "::" - this is the class name.
+          */
+         position = name.find("::");
+         std::string class_name = name.substr(0, position);
+
+         /*
+          * Is class name dimensional?
+          */
+         string_length = class_name.size();
+         std::string dim = class_name.substr(string_length - 1, 1);
+         bool is_dimensional = false;
+         std::string nondim_name;
+         if (dim == "1" || dim == "2" || dim == "3") {
+            is_dimensional = true;
+            std::string nondim_class_name = class_name.substr(0,
+                  string_length - 1);
+            std::string method_name = name.substr(position);
+            nondim_name = nondim_class_name;
+            nondim_name += method_name;
+
+         } else {
+            nondim_name = name;
+         }
+
+         /*
+          * See if name is in class_method_names list.  Accelerate this by
+          * comparing the length of the entries.  Do non-dimensional
+          * comparison first.
+          */
+         bool class_method_exists = false;
+         string_length = nondim_name.size();
+         for (List<std::string>::Iterator i(d_class_method_names); i; i++) {
+            list_entry_length = i().size();
+            if (string_length == list_entry_length) {
+               class_method_exists = (i() == nondim_name);
+            }
+            if (class_method_exists) break;
+         }
+
+         /*
+          * Now do dimensional comparison.
+          */
+         if (is_dimensional && !class_method_exists) {
+            string_length = name.size();
+            for (List<std::string>::Iterator i(d_class_method_names); i; i++) {
+               list_entry_length = i().size();
+               if (string_length == list_entry_length) {
+                  class_method_exists = (i() == name);
+               }
+               if (class_method_exists) break;
+            }
+         }
+
+         will_use_timer = class_method_exists;
+
+      }
+
+   }
+
+   return will_use_timer;
+#else
+   return false;
+#endif
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print timer information from each processor.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void TimerManager::print(
+   std::ostream& os)
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   /*
+    * There are 18 possible timer values that users may wish to look at.
+    * (i.e. User/sys/wallclock time, Total or Exclusive, for individual
+    * processor, max across all procs, or summed across all procs).
+    * This method builds an array that holds these values and outputs
+    * them in column format.
+    */
+
+   /*
+    * First, stop the main_timer so we have an accurate measure of
+    * overall run time so far.
+    */
+   d_main_timer->stop();
+
+   /*
+    * If we are doing max or sum operations, make sure timers are
+    * consistent across processors.
+    */
+   if (d_print_summed || d_print_max) {
+      checkConsistencyAcrossProcessors();
+   }
+
+   /*
+    * Invoke arrays used to hold timer names, timer_values, and
+    * max_processor_ids (i.e. processor holding the maximum time).
+    */
+   double(*timer_values)[18] = new double[d_timers.size() + 1][18];
+   int(*max_processor_id)[2] = new int[d_timers.size() + 1][2];
+   Array<std::string> timer_names(static_cast<int>(d_timers.size()) + 1);
+
+   /*
+    * Fill in timer_values and timer_names arrays, based on values of
+    * d_print_total, d_print_exclusive,
+    * d_print_user, d_print_sys, d_print_wallclock,
+    * d_print_processor, d_print_summed, d_print_max.
+    */
+   buildTimerArrays(timer_values, max_processor_id, timer_names);
+
+   /*
+    * Now that we have built up the array, select output options.
+    *
+    * 1) If user has requested any two (or more) of {user, system, and
+    *    walltime} then use the format:
+    *    [Exclusive,Total]
+    *    [Processor,Summed,Max]
+    *       Name     User    System   Wall  (Max Processor)
+    *
+    * 2) If user chose just one of {User, system, or walltime}, then use the
+    *    format:
+    *    [Exclusive,Total]
+    *       Name     Processor   Summed   Max  Max Processor
+    *
+    * 3) If user chose just one of {user, system, or walltime} and just one
+    *    of {processor, summed, max} then use the format:
+    *       Name     [Processor,Summed,Max]  Total   Exclusive
+    *
+    * If the user wants overhead stats, print those as:
+    *   Timer Overhead:
+    *     Timer Name    number calls     Estimated overhead
+    *
+    * If they want output of a concurrent timer tree, print this as:
+    *   Concurrent Tree:
+    *     Timer Name    names of timers called by it.
+    */
+
+   /*
+    * Determine which case we are doing - #1, #2, or #3
+    * #1 case - user requested any two (or more) of [user,system,wallclock]
+    * #2 case - user requested one of [user,system,wallclock]
+    * #3 case - user requested one of [user,system,wallclock] and one of
+    *           [processor, summed, max]
+    */
+   bool case1 = false;
+   bool case2 = false;
+   bool case3 = false;
+   if ((d_print_user && d_print_sys) ||
+       (d_print_sys && d_print_wall) ||
+       (d_print_wall && d_print_user)) {
+      case1 = true;
+   } else {
+      case2 = true;
+      if ((d_print_processor && !d_print_summed && !d_print_max) ||
+          (!d_print_processor && d_print_summed && !d_print_max) ||
+          (!d_print_processor && !d_print_summed && d_print_max)) {
+         case2 = false;
+         case3 = true;
+      }
+   }
+
+   std::string table_title;
+   Array<std::string> column_titles(4);
+   int column_ids[3] = { 0, 0, 0 };
+   int j, k;
+
+   /*
+    * Now print out the data
+    */
+   if (case1) {
+
+      column_titles[0] = "";
+      column_titles[1] = "";
+      column_titles[2] = "";
+      column_titles[3] = "Proc";
+
+      if (d_print_user) {
+         column_titles[0] = "User Time";
+      } else {
+         column_titles[0] = "";
+      }
+      if (d_print_sys) {
+         column_titles[1] = "Sys Time";
+      } else {
+         column_titles[1] = "";
+      }
+      if (d_print_wall) {
+         column_titles[2] = "Wall Time";
+      } else {
+         column_titles[2] = "";
+      }
+
+      for (k = 0; k < 2; k++) {
+
+         if ((k == 0 && d_print_exclusive) ||
+             (k == 1 && d_print_total)) {
+
+            for (j = 0; j < 3; j++) {
+
+               if ((j == 0 && d_print_processor) ||
+                   (j == 1 && d_print_summed) ||
+                   (j == 2 && d_print_max)) {
+
+                  if (j == 0) {
+#ifndef LACKS_SSTREAM
+                     std::ostringstream out;
+#endif
+                     if (k == 0) {
+#ifndef LACKS_SSTREAM
+                        out << "EXCLUSIVE TIME \nPROCESSOR:"
+                            << mpi.getRank();
+                        table_title = out.str();
+#else
+                        table_title = "EXCLUSIVE TIME \nPROCESSOR:";
+#endif
+                        column_ids[0] = 0;
+                        column_ids[1] = 1;
+                        column_ids[2] = 2;
+                     } else if (k == 1) {
+#ifndef LACKS_SSTREAM
+                        out << "TOTAL TIME \nPROCESSOR:"
+                            << mpi.getRank();
+                        table_title = out.str();
+#else
+                        table_title = "TOTAL TIME \nPROCESSOR:";
+#endif
+                        column_ids[0] = 9;
+                        column_ids[1] = 10;
+                        column_ids[2] = 11;
+                     }
+                     printTable(table_title,
+                        column_titles,
+                        timer_names,
+                        column_ids,
+                        timer_values,
+                        os);
+                  } else if (j == 1) {
+
+                     if (k == 0) {
+                        table_title =
+                           "EXCLUSIVE TIME \nSUMMED ACROSS ALL PROCESSORS";
+                        column_ids[0] = 3;
+                        column_ids[1] = 4;
+                        column_ids[2] = 5;
+                     } else if (k == 1) {
+                        table_title =
+                           "TOTAL TIME \nSUMMED ACROSS ALL PROCESSORS:";
+                        column_ids[0] = 12;
+                        column_ids[1] = 13;
+                        column_ids[2] = 14;
+                     }
+                     printTable(table_title,
+                        column_titles,
+                        timer_names,
+                        column_ids,
+                        timer_values,
+                        os);
+
+                  } else if (j == 2) {
+
+                     int max_array_id = 0; // identifies which of the two
+                                           // max_processor_id values to print
+                     if (k == 0) {
+                        table_title =
+                           "EXCLUSIVE TIME \nMAX ACROSS ALL PROCESSORS";
+                        column_ids[0] = 6;
+                        column_ids[1] = 7;
+                        column_ids[2] = 8;
+                        max_array_id = 0;
+                     } else if (k == 1) {
+                        table_title =
+                           "TOTAL TIME \nMAX ACROSS ALL PROCESSORS";
+                        column_ids[0] = 15;
+                        column_ids[1] = 16;
+                        column_ids[2] = 17;
+                        max_array_id = 1;
+                     }
+#if 0
+                     printTable(table_title,
+                        column_titles,
+                        timer_names,
+                        &max_processor_id[0][max_array_id],
+                        column_ids,
+                        timer_values,
+                        os);
+#else
+                     printTable(table_title,
+                        column_titles,
+                        timer_names,
+                        max_processor_id,
+                        max_array_id,
+                        column_ids,
+                        timer_values,
+                        os);
+#endif
+                  }
+
+               } // if j
+            } // for j
+         } // if k
+      } // for k
+   } // if case 1
+
+   if (case2) {
+
+      for (k = 0; k < 2; k++) {
+
+         if ((k == 0 && d_print_exclusive) ||
+             (k == 1 && d_print_total)) {
+
+            int max_array_id = 0;
+            std::string table_title_line_1;
+            std::string table_title_line_2;
+            if (k == 0) {
+               table_title_line_1 = "EXCLUSVE \n";
+               max_array_id = 0;
+            } else if (k == 1) {
+               table_title_line_1 = "TOTAL \n";
+               max_array_id = 1;
+            }
+            if (d_print_user) {
+               table_title_line_2 = "USER TIME";
+            } else if (d_print_sys) {
+               table_title_line_2 = "SYSTEM TIME";
+            } else if (d_print_wall) {
+               table_title_line_2 = "WALLCLOCK TIME";
+            }
+            table_title = table_title_line_1;
+            table_title += table_title_line_2;
+
+            column_titles[0] = "";
+            column_titles[1] = "";
+            column_titles[2] = "";
+            column_titles[3] = "";
+            if (d_print_processor) {
+#ifndef LACKS_SSTREAM
+               std::ostringstream out;
+               out << "Proc: " << mpi.getRank();
+               column_titles[0] = out.str();
+#else
+               column_titles[0] = "Proc: ";
+#endif
+            }
+            if (d_print_summed) {
+               column_titles[1] = "Summed";
+            }
+            if (d_print_max) {
+               column_titles[2] = "Max";
+               column_titles[3] = "Proc";
+            }
+
+            if (d_print_user) {
+               if (k == 0) {
+                  column_ids[0] = 0;
+                  column_ids[1] = 3;
+                  column_ids[2] = 6;
+               } else if (k == 1) {
+                  column_ids[0] = 9;
+                  column_ids[1] = 12;
+                  column_ids[2] = 15;
+               }
+            } else if (d_print_sys) {
+               if (k == 0) {
+                  column_ids[0] = 1;
+                  column_ids[1] = 4;
+                  column_ids[2] = 7;
+               } else if (k == 1) {
+                  column_ids[0] = 10;
+                  column_ids[1] = 13;
+                  column_ids[2] = 16;
+               }
+            } else if (d_print_wall) {
+               if (k == 0) {
+                  column_ids[0] = 2;
+                  column_ids[1] = 5;
+                  column_ids[2] = 8;
+               } else if (k == 1) {
+                  column_ids[0] = 11;
+                  column_ids[1] = 14;
+                  column_ids[2] = 17;
+               }
+            }
+#if 0
+            printTable(table_title,
+               column_titles,
+               timer_names,
+               &max_processor_id[0][max_array_id],
+               column_ids,
+               timer_values,
+               os);
+#else
+            printTable(table_title,
+               column_titles,
+               timer_names,
+               max_processor_id,
+               max_array_id,
+               column_ids,
+               timer_values,
+               os);
+#endif
+         } // if k
+      }  // for k
+   } // if case2
+
+   if (case3) {
+
+      if (d_print_exclusive && !d_print_total) {
+         column_titles[0] = "Exclusive";
+         column_titles[1] = "";
+      } else if (!d_print_exclusive && d_print_total) {
+         column_titles[0] = "";
+         column_titles[1] = "Total";
+      } else if (d_print_exclusive && d_print_total) {
+         column_titles[0] = "Exclusive";
+         column_titles[1] = "Total";
+      }
+      column_titles[3] = "";
+
+      column_ids[2] = 0;
+      if (d_print_user) {
+         if (d_print_processor) {
+#ifndef LACKS_SSTREAM
+            std::ostringstream out;
+            out << "USER TIME \nPROCESSOR: " << mpi.getRank();
+            table_title = out.str();
+#else
+            table_title = "USER TIME \nPROCESSOR: ";
+#endif
+            column_ids[0] = 0;
+            column_ids[1] = 9;
+         } else if (d_print_summed) {
+            table_title = "USER TIME \nSUMMED ACROSS ALL PROCESSORS";
+            column_ids[0] = 3;
+            column_ids[1] = 12;
+         } else if (d_print_max) {
+            table_title = "USER TIME \nMAX ACROSS ALL PROCESSORS";
+            column_ids[0] = 6;
+            column_ids[1] = 15;
+         }
+      } else if (d_print_sys) {
+         if (d_print_processor) {
+#ifndef LACKS_SSTREAM
+            std::ostringstream out;
+            out << "SYSTEM TIME \nPROCESSOR: " << mpi.getRank();
+            table_title = out.str();
+#else
+            table_title = "SYSTEM TIME \nPROCESSOR:";
+#endif
+            column_ids[0] = 1;
+            column_ids[1] = 10;
+         } else if (d_print_summed) {
+            table_title = "SYSTEM TIME \nSUMMED ACROSS ALL PROCESSORS";
+            column_ids[0] = 4;
+            column_ids[1] = 13;
+         } else if (d_print_max) {
+            table_title = "SYSTEM TIME \nMAX ACROSS ALL PROCESSORS";
+            column_ids[0] = 7;
+            column_ids[1] = 16;
+         }
+      } else if (d_print_wall) {
+         if (d_print_processor) {
+#ifndef LACKS_SSTREAM
+            std::ostringstream out;
+            out << "WALLCLOCK TIME \nPROCESSOR: " << mpi.getRank();
+            table_title = out.str();
+#else
+            table_title = "WALLCLOCK TIME \nPROCESSOR: ";
+#endif
+            column_ids[0] = 2;
+            column_ids[1] = 11;
+         } else if (d_print_summed) {
+            table_title = "WALLCLOCK TIME \nSUMMED ACROSS ALL PROCESSORS";
+            column_ids[0] = 5;
+            column_ids[1] = 14;
+         } else if (d_print_max) {
+            table_title = "WALLCLOCK TIME \nMAX ACROSS ALL PROCESSORS";
+            column_ids[0] = 8;
+            column_ids[1] = 17;
+         }
+      }
+      printTable(table_title,
+         column_titles,
+         timer_names,
+         column_ids,
+         timer_values,
+         os);
+   }
+
+   /*
+    * Print overhead stats - number of accesses and estimated cost
+    * (estimated cost computed based on the number of accesses and
+    * a fixed d_timer_active_access_time value).
+    * Store the number of accesses in max_processor_id[0] and the estimated
+    * cost in timer_values[0] and use the printTable method.
+    */
+   if (d_print_timer_overhead) {
+      printOverhead(timer_names,
+         timer_values,
+         os);
+   }
+
+   /*
+    * Print tree of concurrent timers.
+    */
+   if (d_print_concurrent) {
+      printConcurrent(os);
+   }
+
+   delete[] timer_values;
+   delete[] max_processor_id;
+   /*
+    * Lastly, restart the main_timer that we stopped at the beginning of
+    * this routine
+    */
+   d_main_timer->start();
+#else
+   os << "Timers disabled\n";
+#endif
+}
+
+void TimerManager::printTable(
+   const std::string& table_title,
+   const Array<std::string> column_titles,
+   const Array<std::string> timer_names,
+   const int column_ids[],
+   const double timer_values[][18],
+   std::ostream& os)
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   std::string ascii_line1 = "++++++++++++++++++++++++++++++++++++++++";
+   std::string ascii_line2 = "++++++++++++++++++++++++++++++++++++++++\n";
+   std::string ascii_line = ascii_line1;
+   ascii_line += ascii_line2;
+
+   /*
+    * By default, output in C++ is right justified with the setw()
+    * option e.g. cout << "[" << setw(5) << 1 << "]" will output
+    * [   1].  The line below makes it left justified, so the same line
+    * will generate [1   ].  We us left justification because it is
+    * more convenient to output columns of tables.
+    */
+   os.setf(std::ios::left);
+
+   os << ascii_line << table_title << "\n";
+
+   int i;
+
+   /*
+    * Determine maximum name length for formatting
+    */
+   int maxlen = 10;
+   for (unsigned int n = 0; n < d_timers.size() + 1; n++) {
+      i = int(timer_names[n].size());
+      if (i > maxlen) maxlen = i;
+   }
+
+   /*
+    * Print table header.  If we are only printing the overall program
+    * timer (i.e. d_num_timers = 0) with only d_print_processor,
+    * d_print_total, and d_print_wall options being true (which
+    * is the default case if the user doesn't add a "TimerManager"
+    * section to the input file) then don't bother to print header as
+    * it just clutters up the output.  Also, turn off percentages since
+    * this doesn't mean anything with just one timer.
+    */
+   bool default_case = d_timers.size() == 0 && !d_print_exclusive &&
+      !d_print_summed && !d_print_max &&
+      !d_print_user && !d_print_sys;
+   if (default_case) {
+      d_print_percentage = false;
+   } else {
+      os << ascii_line
+         << std::setw(maxlen + 3) << "Timer Name" << ' ';
+      for (i = 0; i < 3; i++) {
+         if (!column_titles[i].empty()) {
+            os << std::setw(15) << column_titles[i].c_str() << "  ";
+         }
+      }
+      os << std::endl;
+   }
+
+   /*
+    * Organize timers largest to smallest.  Apply this to the LAST NONZERO
+    * column entry for the table by forming an ordering array - ordered_list
+    * - that orders these values.
+    */
+   int last_nonzero_column = 0;
+   for (i = 0; i < 3; i++) {
+      if (!column_titles[i].empty()) {
+         last_nonzero_column = column_ids[i];
+      }
+   }
+   int* ordered_list = new int[d_timers.size() + 1];
+   buildOrderedList(timer_values,
+      last_nonzero_column,
+      ordered_list,
+      static_cast<int>(d_timers.size()));
+
+   /*
+    * Tack on TOTAL TIME to end of ordered list
+    */
+   ordered_list[static_cast<int>(d_timers.size())] =
+      static_cast<int>(d_timers.size());
+
+   /*
+    * Now output the rows of the table.
+    */
+
+   for (size_t k = 0; k < d_timers.size() + 1; k++) {
+      int n = ordered_list[k];
+
+      /*
+       * Check the print threshold to see if we should print this timer.
+       */
+      double frac = computePercentageDouble(
+            timer_values[n][last_nonzero_column],
+            timer_values[d_timers.size()][last_nonzero_column]);
+
+      if (frac > d_print_threshold) {
+
+         os << std::setw(maxlen + 3) << timer_names[n].c_str() << ' ';
+
+         /*
+          * Print column values
+          */
+         for (i = 0; i < 3; i++) {
+
+            /*
+             * Print column values only title is non-null (i.e. not "")
+             */
+            if (!column_titles[i].empty()) {
+
+               /*
+                * Print percentages if requested.
+                */
+               int j = column_ids[i];
+
+               if (d_print_percentage) {
+#ifndef LACKS_SSTREAM
+                  int perc = computePercentageInt(timer_values[n][j],
+                        timer_values[d_timers.size()][j]);
+
+                  std::ostringstream out;
+                  out << timer_values[n][j] << " (" << perc << "%)";
+                  os << std::setw(15) << out.str().c_str() << "  ";
+#else
+                  os << std::setw(15) << timer_values[n][j] << "  ";
+#endif
+               } else {
+                  os << std::setw(15) << timer_values[n][j] << "  ";
+               }
+
+            } // if title is non-null
+
+         } // loop over columns
+
+         os << std::endl;
+
+      } // if meets d_print_threshold condition
+
+   } // loop over timers
+
+   delete[] ordered_list;
+
+   os << ascii_line << std::endl;
+   os.setf(std::ios::right);
+#endif
+}
+
+void TimerManager::printTable(
+   const std::string& table_title,
+   const Array<std::string> column_titles,
+   const Array<std::string> timer_names,
+   const int max_processor_id[][2],
+   const int max_array_id,
+   const int column_ids[],
+   const double timer_values[][18],
+   std::ostream& os)
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   std::string ascii_line1 = "++++++++++++++++++++++++++++++++++++++++";
+   std::string ascii_line2 = "++++++++++++++++++++++++++++++++++++++++\n";
+   std::string ascii_line = ascii_line1;
+   ascii_line += ascii_line2;
+
+   /*
+    * Left-justify all output in this method.
+    */
+   os.setf(std::ios::left);
+
+   os << ascii_line
+      << table_title << "\n"
+      << ascii_line;
+
+   int i;
+
+   /*
+    * Determine maximum name length for formatting
+    */
+   int maxlen = 10;
+   for (unsigned int n = 0; n < d_timers.size() + 1; n++) {
+      i = int(timer_names[n].size());
+      if (i > maxlen) maxlen = i;
+   }
+
+   /*
+    * Print table header
+    */
+   os << std::setw(maxlen + 3) << "Timer Name" << ' ';
+   for (i = 0; i < 4; i++) {
+      if (!column_titles[i].empty()) {
+         os << std::setw(15) << column_titles[i].c_str() << "  ";
+      }
+   }
+   os << std::endl;
+
+   /*
+    * Organize timers largest to smallest.  Apply this to the LAST NONZERO
+    * column entry for the table by forming an ordering array - ordered_list
+    * - that orders these values.
+    */
+   int last_nonzero_column = 0;
+   for (i = 0; i < 3; i++) {
+      if (!column_titles[i].empty()) {
+         last_nonzero_column = column_ids[i];
+      }
+   }
+   int* ordered_list = new int[d_timers.size() + 1];
+   buildOrderedList(timer_values,
+      last_nonzero_column,
+      ordered_list,
+      static_cast<int>(d_timers.size()));
+
+   /*
+    * Tack on TOTAL TIME to end of ordered list
+    */
+   ordered_list[static_cast<int>(d_timers.size())] =
+      static_cast<int>(d_timers.size());
+
+   /*
+    * Now output the rows of the table.
+    */
+   for (size_t j = 0; j < d_timers.size() + 1; j++) {
+      unsigned int n = ordered_list[j];
+
+      /*
+       * Check the print threshold to see if we should print this timer.
+       */
+      double frac = computePercentageDouble(
+            timer_values[n][last_nonzero_column],
+            timer_values[d_timers.size()][last_nonzero_column]);
+
+      if (frac > d_print_threshold) {
+
+         os << std::setw(maxlen + 3) << timer_names[n].c_str() << ' ';
+
+         /*
+          * Print columns.
+          */
+         for (i = 0; i < 4; i++) {
+
+            /*
+             * Print column values only title is non-null (i.e. not "")
+             */
+            if (!column_titles[i].empty()) {
+
+               /*
+                * Print percentages for columns 0-2
+                */
+               if (i < 3) {
+                  int k = column_ids[i];
+
+                  if (d_print_percentage) {
+#ifndef LACKS_SSTREAM
+                     int perc = computePercentageInt(timer_values[n][k],
+                           timer_values[d_timers.size()][k]);
+                     std::ostringstream out;
+                     out << timer_values[n][k] << " (" << perc << "%)";
+                     os << std::setw(15) << out.str().c_str() << "  ";
+#else
+                     os << std::setw(15) << timer_values[n][k] << "  ";
+#endif
+                  } else {
+                     os << std::setw(15) << timer_values[n][k] << "  ";
+                  }
+
+               } else {
+
+                  /*
+                   * Print column 3 - the processor holding processor ID
+                   * with max times (don't do for TOTAL TIME - this is
+                   * meaningless since all processors are synchronized
+                   * before and after this call).
+                   */
+                  if (n < d_timers.size()) {
+                     os << std::setw(15) << max_processor_id[n][max_array_id];
+                  }
+
+               } // column 3
+
+            }  // if column title is non-null
+
+         } // loop over columns
+
+         os << std::endl;
+
+      } //  matches d_print_threshold conditions
+
+   } // loop over timers
+
+   delete[] ordered_list;
+
+   os << ascii_line << std::endl;
+   os.setf(std::ios::right);
+#endif
+}
+
+void TimerManager::printOverhead(
+   const Array<std::string> timer_names,
+   const double timer_values[][18],
+   std::ostream& os)
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   std::string ascii_line1 = "++++++++++++++++++++++++++++++++++++++++";
+   std::string ascii_line2 = "++++++++++++++++++++++++++++++++++++++++\n";
+   std::string ascii_line = ascii_line1;
+   ascii_line += ascii_line2;
+
+   /*
+    * Left-justify all output in this method.
+    */
+   os.setf(std::ios::left);
+
+   os << ascii_line
+      << "TIMER OVERHEAD STATISTICS \n"
+      << ascii_line;
+
+   /*
+    * Determine maximum name length for formatting
+    */
+   int maxlen = 10;
+   for (unsigned int n = 0; n < d_timers.size(); n++) {
+      int i = int(timer_names[n].size());
+      if (i > maxlen) maxlen = i;
+   }
+
+   /*
+    * Print table header
+    */
+   os << std::setw(maxlen + 3) << "Timer Name"
+      << std::setw(25) << "Number Accesses" << "  "
+      << std::setw(25) << "Estimated Cost"
+      << std::endl;
+
+   /*
+    * Compute totals: total number of REGISTERED accesses and total cost.
+    * Total cost includes inactive timer costs.
+    */
+   int total_inactive_accesses = 0;
+   for (size_t i = 0; i < d_inactive_timers.size(); i++) {
+      total_inactive_accesses += d_inactive_timers[i]->getNumberAccesses();
+   }
+
+   double est_cost = d_timer_inactive_access_time * total_inactive_accesses;
+   double total_est_cost = est_cost;
+
+   int total_accesses = 0;
+   for (size_t n = 0; n < d_timers.size(); n++) {
+      total_accesses += d_timers[n]->getNumberAccesses();
+   }
+   est_cost = d_timer_active_access_time * total_accesses;
+
+   /*
+    * If we are keeping exclusive or concurrent times, each access costs
+    * roughly four times as much.  Make this correction here...
+    */
+   if (d_print_exclusive || d_print_concurrent) {
+      est_cost *= 4.;
+   }
+   total_est_cost += est_cost;
+
+   /*
+    * Output the rows of the table.  Start first with the inactive timers...
+    */
+   int num_accesses = total_inactive_accesses;
+   est_cost = d_timer_inactive_access_time * num_accesses;
+   int perc = computePercentageInt(est_cost, total_est_cost);
+
+   os << std::setw(maxlen + 3) << "inactive timers"
+      << std::setw(25) << num_accesses << "  ";
+#ifndef LACKS_SSTREAM
+   std::ostringstream out;
+   out << est_cost << " (" << perc << "%)";
+   os << std::setw(25) << out.str().c_str();
+#else
+   os << std::setw(25) << est_cost << " (" << perc << "%)";
+#endif
+   os << std::endl;
+
+   /*
+    * Now print the rest of the timers.  While we are cycling through them,
+    * add up the total cost and print it at the end...
+    */
+
+   for (unsigned int n = 0; n < d_timers.size(); n++) {
+
+      num_accesses = d_timers[n]->getNumberAccesses();
+      est_cost = d_timer_active_access_time * num_accesses;
+
+      /*
+       * If we are keeping exclusive or concurrent times, each access costs
+       * roughly four times as much.  Make this correction here...
+       */
+      if (d_print_exclusive || d_print_concurrent) {
+         est_cost *= 4.;
+      }
+
+      perc = computePercentageInt(est_cost, total_est_cost);
+
+      os << std::setw(maxlen + 3) << timer_names[n].c_str()
+      << std::setw(25) << num_accesses << "  ";
+#ifndef LACKS_SSTREAM
+      std::ostringstream out2;
+      out2 << est_cost << " (" << perc << "%)";
+      os << std::setw(25) << out2.str().c_str();
+#else
+      os << std::setw(25) << est_cost << " (" << perc << "%)";
+#endif
+      os << std::endl;
+   }
+
+   /*
+    * Output the totals.
+    */
+   os << std::setw(maxlen + 3) << "TOTAL:"
+      << std::setw(25) << total_accesses << "  "
+      << std::setw(25) << total_est_cost
+      << "\n" << std::endl;
+
+   /*
+    * Compare the total estimated cost with overall program wallclock time.
+    * If it is a significant percentage (> 5%) print a warning
+    */
+   double perc_dbl = computePercentageDouble(total_est_cost,
+         timer_values[d_timers.size()][11]);
+
+   os << "Estimated Timer Costs as a percentage of overall Wallclock Time: "
+      << perc_dbl << "% \n";
+   if (perc_dbl > 5.) {
+      os << "WARNING:  TIMERS ARE USING A SIGNIFICANT FRACTION OF RUN TIME"
+         << std::endl;
+   }
+
+   os << ascii_line << std::endl;
+   os.setf(std::ios::right);
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+void TimerManager::printConcurrent(
+   std::ostream& os)
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   std::string ascii_line1 = "++++++++++++++++++++++++++++++++++++++++";
+   std::string ascii_line2 = "++++++++++++++++++++++++++++++++++++++++\n";
+   std::string ascii_line = ascii_line1;
+   ascii_line += ascii_line2;
+
+   os << ascii_line
+      << "CONCURRENT TIMERS\n"
+      << ascii_line;
+
+   /*
+    * Determine maximum name length for formatting
+    */
+   int maxlen = 10;
+   for (size_t n = 0; n < d_timers.size(); n++) {
+      int i = int((d_timers[n]->getName()).size());
+      if (i > maxlen) maxlen = i;
+
+   }
+
+   /*
+    * Print table header
+    */
+   os << std::setw(maxlen + 3) << "Timer Name"
+      << std::setw(25) << "Nested Timers"
+      << std::endl;
+
+   /*
+    * Output the rows of the table.
+    */
+
+   for (size_t n = 0; n < d_timers.size(); n++) {
+
+      os << std::setw(maxlen + 3) << d_timers[n]->getName().c_str();
+
+      int count = 0;
+      for (size_t i = 0; i < d_timers.size(); i++) {
+         if (d_timers[n]->isConcurrentTimer(*d_timers[i])) {
+            count++;
+         }
+      }
+      if (count == 0) {
+         os << std::setw(25) << "none " << std::endl;
+      } else {
+         /*
+          * Format it like:    Timer Name      Concurrent Timer #1
+          *                                    Concurrent Timer #2
+          *                                    ...
+          * Use "count" variable defined above to identify the first
+          * line or subsequent lines.
+          */
+         count = 0;
+         for (size_t j = 0; j < d_timers.size(); j++) {
+            if (d_timers[n]->isConcurrentTimer(*d_timers[j])) {
+               if (count == 0) {
+                  os << std::setw(25) << d_timers[j]->getName().c_str()
+                  << std::endl;
+               } else {
+                  os << std::setw(maxlen + 3) << " "
+                  << d_timers[j]->getName().c_str() << std::endl;
+               }
+               count++;
+            }
+         }
+      }
+
+   }
+   os << ascii_line << std::endl;
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+void TimerManager::checkConsistencyAcrossProcessors()
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   /*
+    * Due to the difficulty of comparing strings using MPI calls,
+    * we do a rough consistency check of
+    * 1. the number of timers and
+    * 2. the length of each timer name.
+    *
+    * Steps:
+    * 1. Do global reductions to get the max number of timers
+    *    and the max lengths of each timer name.
+    * 2. Issue a warning if the number of timers is inconsistent.
+    *    This inconsistency would be found on all processes
+    *    except those with the biggest number of timers.
+    * 3. Issue a warning for each individual timer if
+    *    its name length is less than the max length of
+    *    all timers at the same index in the timer manager.
+    *    Even if the number of timers are consistent, this
+    *    would find wrong timer orderings or inconsistent
+    *    timer names, unless the errors are for timer names
+    *    with identical lengths.
+    * 4. Go global reductions to get the number of inconsistencies
+    *    of other processes.  Turn off printing of sum and max
+    *    if any processes has inconsistencies.
+    *
+    * In the future, we may want to convert the strings into
+    * their MD5 signatures and compare those as integers.
+    */
+
+   const SAMRAI_MPI& mpi(SAMRAI_MPI::getSAMRAIWorld());
+
+   unsigned int max_num_timers = static_cast<unsigned int>(d_timers.size());
+   if (mpi.getSize() > 1) {
+      int i = static_cast<int>(d_timers.size());
+      mpi.Allreduce(&i, &max_num_timers, 1, MPI_INT, MPI_MAX);
+   }
+
+   Array<int> max_timer_lengths(max_num_timers);
+   std::vector<int> rank_of_max(max_num_timers, mpi.getRank());
+
+   for (unsigned int i = 0; i < max_num_timers; ++i) {
+      max_timer_lengths[i] =
+         i < static_cast<unsigned int>(d_timers.size())
+         ? static_cast<int>(d_timers[i]->getName().size()) : 0;
+   }
+
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(max_timer_lengths.getPointer(),
+         max_num_timers,
+         MPI_MAXLOC,
+         &rank_of_max[0]);
+   }
+
+   int inconsistency_count = 0;
+
+   if (max_num_timers > d_timers.size()) {
+      TBOX_WARNING("Timer selections across processors were determined to be"
+         << "\ninconsistent.  This processor has only "
+         << d_timers.size() << " while some has " << max_num_timers
+         << ".\nThe consistency check"
+         << "\nwill continue for this process, but checking only\n"
+         << d_timers.size() << " timers."
+         << "\nIt is not possible to print global"
+         << "\nsummed or max timer information.");
+      ++inconsistency_count;
+   }
+
+   for (unsigned int i = 0; i < d_timers.size(); i++) {
+      if (max_timer_lengths[i] != int(d_timers[i]->getName().size())) {
+         TBOX_WARNING("Timer[" << i << "]: " << d_timers[i]->getName()
+            << "\nis not consistent across all processors."
+            << "\nOther timer[" << i << "] has up to "
+            << max_timer_lengths[i] << " characters in their names."
+                                    << "\nIt is not possible to print global"
+                                    << "\nsummed or max timer information."
+            );
+         ++inconsistency_count;
+      }
+   }
+
+   int max_inconsistency_count = inconsistency_count;
+   if (mpi.getSize() > 1) {
+      mpi.Allreduce(&inconsistency_count,
+         &max_inconsistency_count,
+         1,
+         MPI_INT,
+         MPI_MAX);
+   }
+   if (max_inconsistency_count > 0) {
+      d_print_summed = false;
+      d_print_max = false;
+      if (inconsistency_count == 0) {
+         TBOX_WARNING("Though this process found no timer inconsistencies,"
+            << "\nother processes did.  It is not possible to print"
+            << "\nglobal summed or max timer information.");
+      }
+   }
+
+   /*
+    * NOTE:  It might be nice to someday add the capability to remove the
+    * inconsistent timers and print the max/summed values of the
+    * consistent ones.   Unfortunately, this is tough to implement.  If it
+    * were just a matter of comparing timer names across processors it would be
+    * easy. But with MPI, only ints and doubles can be exchanged across
+    * processors so it is difficult to make string comparisons.
+    * It is possible to compare the MD5 sum of the strings,
+    * but that may make SAMRAI dependent on the MD5 library.
+    */
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+void TimerManager::buildTimerArrays(
+   double timer_values[][18],
+   int max_processor_id[][2],
+   Array<std::string> timer_names)
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   const SAMRAI_MPI& mpi(SAMRAI_MPI::getSAMRAIWorld());
+   /*
+    * timer_values - 2D array dimensioned [d_timers.size()][18]
+    *     For each timer, there are 18 potential values which may be of
+    *     interest.  This array stores them if they are requested.
+    * max_processor_id - 2D array dimensioned [d_timers.size()][2]
+    *     Holds the value of the processor that used the maximum amount
+    *     of time.  [0] is for exclusive time, while [1] is for total time.
+    */
+
+   /*
+    * Initialize arrays
+    */
+   for (unsigned int n = 0; n < d_timers.size() + 1; n++) {
+      timer_names[n] = "";
+      max_processor_id[n][0] = 0;
+      max_processor_id[n][1] = 0;
+      for (int i = 0; i < 18; i++) {
+         timer_values[n][i] = 0.;
+      }
+   }
+
+   /*
+    * Build arrays.
+    */
+   for (unsigned int n = 0; n < d_timers.size(); n++) {
+      timer_names[n] = d_timers[n]->getName();
+
+      /*
+       *  Build timer_values[n][m] array:
+       *    m = 0 :  processor exclusive user time
+       *    m = 1 :  processor exclusive sys time
+       *    m = 2 :  processor exclusive wall time
+       *    m = 3 :  summed exclusive user time
+       *    m = 4 :  summed exclusive sys time
+       *    m = 5 :  summed exclusive wall time
+       *    m = 6 :  max exclusive user time
+       *    m = 7 :  max exclusive sys time
+       *    m = 8 :  max exclusive wall time
+       *    m = 9 :  processor total user time
+       *    m = 10 :  processor total sys time
+       *    m = 11 :  processor total wall time
+       *    m = 12 :  summed total user time
+       *    m = 13 :  summed total sys time
+       *    m = 14 :  summed total wall time
+       *    m = 15 :  max total user time
+       *    m = 16 :  max total sys time
+       *    m = 17 :  max total wall time
+       */
+
+      for (int k = 0; k < 2; k++) {
+         for (int j = 0; j < 3; j++) {
+
+            if ((k == 0 && d_print_exclusive) ||
+                (k == 1 && d_print_total)) {
+
+               if ((j == 0 && d_print_processor) ||
+                   (j == 1 && d_print_summed) ||
+                   (j == 2 && d_print_max)) {
+
+                  if (k == 0 && j == 0) {
+                     if (d_print_user) {
+                        timer_values[n][0] =
+                           d_timers[n]->getExclusiveUserTime();
+                     }
+                     if (d_print_sys) {
+                        timer_values[n][1] =
+                           d_timers[n]->getExclusiveSystemTime();
+                     }
+                     if (d_print_wall) {
+                        timer_values[n][2] =
+                           d_timers[n]->getExclusiveWallclockTime();
+                     }
+                  } else if (k == 0 && j == 1) {
+                     if (d_print_user) {
+                        timer_values[n][3] =
+                           d_timers[n]->getExclusiveUserTime();
+                        if (mpi.getSize() > 1) {
+                           mpi.AllReduce(&timer_values[n][3], 1, MPI_SUM);
+                        }
+                     }
+                     if (d_print_sys) {
+                        timer_values[n][3] =
+                           d_timers[n]->getExclusiveSystemTime();
+                        if (mpi.getSize() > 1) {
+                           mpi.AllReduce(&timer_values[n][4], 1, MPI_SUM);
+                        }
+                     }
+                     if (d_print_wall) {
+                        timer_values[n][3] =
+                           d_timers[n]->getExclusiveWallclockTime();
+                        if (mpi.getSize() > 1) {
+                           mpi.AllReduce(&timer_values[n][5], 1, MPI_SUM);
+                        }
+                     }
+                  } else if (k == 0 && j == 2) {
+                     if (d_print_user) {
+                        double user_time =
+                           d_timers[n]->getExclusiveUserTime();
+                        if (mpi.getSize() > 1) {
+                           mpi.Allreduce(&user_time, &timer_values[n][6], 1, MPI_DOUBLE, MPI_MAX);
+                        }
+                     }
+                     if (d_print_sys) {
+                        double sys_time =
+                           d_timers[n]->getExclusiveSystemTime();
+                        if (mpi.getSize() > 1) {
+                           mpi.Allreduce(&sys_time, &timer_values[n][7], 1, MPI_DOUBLE, MPI_MAX);
+                        }
+                     }
+                     if (d_print_wall) {
+                        timer_values[n][8] = d_timers[n]->getExclusiveWallclockTime();
+                        max_processor_id[n][0] = mpi.getRank();
+                        if (mpi.getSize() > 1) {
+                           mpi.AllReduce(&timer_values[n][8],
+                              1,
+                              MPI_MAXLOC,
+                              &max_processor_id[n][0]);
+                        }
+                     }
+
+                  } else if (k == 1 && j == 0) {
+                     if (d_print_user) {
+                        timer_values[n][9] =
+                           d_timers[n]->getTotalUserTime();
+                     }
+                     if (d_print_sys) {
+                        timer_values[n][10] =
+                           d_timers[n]->getTotalSystemTime();
+                     }
+                     if (d_print_wall) {
+                        timer_values[n][11] =
+                           d_timers[n]->getTotalWallclockTime();
+                     }
+                  } else if (k == 1 && j == 1) {
+                     if (d_print_user) {
+                        timer_values[n][12] =
+                           d_timers[n]->getTotalUserTime();
+                        if (mpi.getSize() > 1) {
+                           mpi.AllReduce(&timer_values[n][12], 1, MPI_SUM);
+                        }
+                     }
+                     if (d_print_sys) {
+                        timer_values[n][13] =
+                           d_timers[n]->getTotalSystemTime();
+                        if (mpi.getSize() > 1) {
+                           mpi.AllReduce(&timer_values[n][13], 1, MPI_SUM);
+                        }
+                     }
+                     if (d_print_wall) {
+                        timer_values[n][14] =
+                           d_timers[n]->getTotalWallclockTime();
+                        if (mpi.getSize() > 1) {
+                           mpi.AllReduce(&timer_values[n][14], 1, MPI_SUM);
+                        }
+                     }
+                  } else if (k == 1 && j == 2) {
+                     if (d_print_user) {
+                        double user_time =
+                           d_timers[n]->getTotalUserTime();
+                        if (mpi.getSize() > 1) {
+                           mpi.Allreduce(&user_time, &timer_values[n][15], 1, MPI_DOUBLE, MPI_MAX);
+                        }
+                     }
+                     if (d_print_sys) {
+                        double sys_time =
+                           d_timers[n]->getTotalSystemTime();
+                        if (mpi.getSize() > 1) {
+                           mpi.Allreduce(&sys_time, &timer_values[n][16], 1, MPI_DOUBLE, MPI_MAX);
+                        }
+                     }
+                     if (d_print_wall) {
+                        timer_values[n][17] = d_timers[n]->getTotalWallclockTime();
+                        max_processor_id[n][1] = mpi.getRank();
+                        if (mpi.getSize() > 1) {
+                           mpi.AllReduce(&timer_values[n][17], 1, MPI_MAXLOC,
+                              &max_processor_id[n][1]);
+                        }
+                     }
+
+                  }
+
+               }   // if j
+            }   // if k
+
+         } // loop over j
+      } // loop over k
+
+   } // loop over n
+
+   /*
+    * Store main_timer data in timer_values[d_timers.size()][] location.  Max
+    * time and exclusive time are not determined since these don't really
+    * mean anything for an overall measurement of run time.
+    */
+   timer_names[static_cast<int>(d_timers.size())] = "TOTAL RUN TIME:";
+   if (d_print_user) {
+      double main_time = d_main_timer->getTotalUserTime();
+      timer_values[d_timers.size()][0] = main_time;
+      timer_values[d_timers.size()][3] = main_time;
+      timer_values[d_timers.size()][6] = main_time;
+      timer_values[d_timers.size()][9] = main_time;
+      timer_values[d_timers.size()][12] = main_time;
+      timer_values[d_timers.size()][15] = main_time;
+      if (mpi.getSize() > 1) {
+         mpi.Allreduce(&main_time, &timer_values[d_timers.size()][3], 1, MPI_DOUBLE, MPI_SUM);
+         mpi.Allreduce(&main_time, &timer_values[d_timers.size()][12], 1, MPI_DOUBLE, MPI_SUM);
+      }
+   }
+   if (d_print_sys) {
+      double main_time = d_main_timer->getTotalSystemTime();
+      timer_values[d_timers.size()][1] = main_time;
+      timer_values[d_timers.size()][4] = main_time;
+      timer_values[d_timers.size()][7] = main_time;
+      timer_values[d_timers.size()][10] = main_time;
+      timer_values[d_timers.size()][13] = main_time;
+      timer_values[d_timers.size()][16] = main_time;
+      if (mpi.getSize() > 1) {
+         mpi.Allreduce(&main_time, &timer_values[d_timers.size()][4], 1, MPI_DOUBLE, MPI_SUM);
+         mpi.Allreduce(&main_time, &timer_values[d_timers.size()][13], 1, MPI_DOUBLE, MPI_SUM);
+      }
+   }
+   if (d_print_wall) {
+      double main_time = d_main_timer->getTotalWallclockTime();
+      timer_values[d_timers.size()][2] = main_time;
+      timer_values[d_timers.size()][5] = main_time;
+      timer_values[d_timers.size()][8] = main_time;
+      timer_values[d_timers.size()][11] = main_time;
+      timer_values[d_timers.size()][14] = main_time;
+      timer_values[d_timers.size()][17] = main_time;
+      if (mpi.getSize() > 1) {
+         mpi.Allreduce(&main_time, &timer_values[d_timers.size()][5], 1, MPI_DOUBLE, MPI_SUM);
+         mpi.Allreduce(&main_time, &timer_values[d_timers.size()][14], 1, MPI_DOUBLE, MPI_SUM);
+      }
+   }
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Build ordered_list which specifies order of timers - max to min.      *
+ *                                                                       *
+ *************************************************************************
+ */
+void TimerManager::buildOrderedList(
+   const double timer_values[][18],
+   const int column,
+   int index[],
+   const int array_size)
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   /*
+    * initialize the arrays
+    */
+   Array<double> timer_vals;
+   timer_vals.resizeArray(array_size);
+   for (int i = 0; i < array_size; i++) {
+      index[i] = i;
+      timer_vals[i] = timer_values[i][column];
+   }
+
+   /*
+    * Do a quicksort on timer_values array to build index array
+    * ordered_list.
+    */
+   quicksort(timer_vals, index, 0, array_size - 1);
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Sort array a largest to smallest using quicksort algorithm.           *
+ *                                                                       *
+ *************************************************************************
+ */
+void TimerManager::quicksort(
+   const Array<double>& a,
+   int index[],
+   int lo,
+   int hi)
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   if (hi <= lo) return;
+
+   /*
+    * Put a[i] into position for i between lo and hi
+    * (i.e. pivot point)
+    */
+   int i = lo - 1;
+   int j = hi;
+   double v = a[index[hi]];
+   for ( ; ; ) {
+      while (a[index[++i]] > v)
+         NULL_STATEMENT;
+      while (v > a[index[--j]]) {
+         if (j == lo) break;
+      }
+      if (i >= j) break;
+
+      // exchange i, j indices
+      int temp = index[i];
+      index[i] = index[j];
+      index[j] = temp;
+   }
+   // exchange i, hi indices
+   int temp = index[i];
+   index[i] = index[hi];
+   index[hi] = temp;
+
+   quicksort(a, index, lo, i - 1);
+   quicksort(a, index, i + 1, hi);
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Operation performed many times throughout print routines. We have     *
+ * to have some safety checks to avoid divide-by-zero errors in some     *
+ * cases.  Thus, I just made it a function.                              *
+ *                                                                       *
+ *************************************************************************
+ */
+int TimerManager::computePercentageInt(
+   const double frac,
+   const double tot)
+{
+   /*
+    *  Put a cap on the percentage at 1000.  If tot = 0, this if
+    *  test should catch it.
+    */
+   int perc = 0;
+#ifdef ENABLE_SAMRAI_TIMERS
+   if (tot > 0.1 * frac) {
+      perc = int(frac / tot * 100.);
+   } else {
+      perc = 1000;
+   }
+#endif
+   return perc;
+}
+
+double TimerManager::computePercentageDouble(
+   const double frac,
+   const double tot)
+{
+   /*
+    *  Put a cap on the percentage at 1000.  If tot = 0, this if
+    *  test should catch it.
+    */
+   double perc = 0;
+#ifdef ENABLE_SAMRAI_TIMERS
+   if (tot > 0.1 * frac) {
+      perc = frac / tot * 100.;
+   } else {
+      perc = 1000;
+   }
+#endif
+   return perc;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private member function for processing input data.                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void TimerManager::getFromInput(
+   Pointer<Database> input_db)
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   if (!input_db.isNull()) {
+
+      if (input_db->keyExists("print_exclusive")) {
+         d_print_exclusive = input_db->getBool("print_exclusive");
+      } else {
+         d_print_exclusive = input_db->getBoolWithDefault("print_exclusive",
+               d_print_exclusive);
+      }
+
+      if (input_db->keyExists("print_total")) {
+         d_print_total = input_db->getBool("print_total");
+      } else {
+         d_print_total = input_db->getBoolWithDefault("print_total",
+               d_print_total);
+      }
+
+      if (input_db->keyExists("print_processor")) {
+         d_print_processor = input_db->getBool("print_processor");
+      } else {
+         d_print_processor = input_db->getBoolWithDefault("print_processor",
+               d_print_processor);
+      }
+
+      if (input_db->keyExists("print_max")) {
+         d_print_max = input_db->getBool("print_max");
+      } else {
+         d_print_max = input_db->getBoolWithDefault("print_max",
+               d_print_max);
+      }
+
+      if (input_db->keyExists("print_summed")) {
+         d_print_summed = input_db->getBool("print_summed");
+      } else {
+         d_print_summed = input_db->getBoolWithDefault("print_summed",
+               d_print_summed);
+      }
+
+      if (input_db->keyExists("print_user")) {
+         d_print_user = input_db->getBool("print_user");
+      } else {
+         d_print_user = input_db->getBoolWithDefault("print_user",
+               d_print_user);
+      }
+
+      if (input_db->keyExists("print_sys")) {
+         d_print_sys = input_db->getBool("print_sys");
+      } else {
+         d_print_sys = input_db->getBoolWithDefault("print_sys",
+               d_print_sys);
+      }
+
+      if (input_db->keyExists("print_wall")) {
+         d_print_wall = input_db->getBool("print_wall");
+      } else {
+         d_print_wall = input_db->getBoolWithDefault("print_wall",
+               d_print_wall);
+      }
+
+      if (input_db->keyExists("print_percentage")) {
+         d_print_percentage = input_db->getBool("print_percentage");
+      } else {
+         d_print_percentage = input_db->getBoolWithDefault("print_percentage",
+               d_print_percentage);
+      }
+
+      if (input_db->keyExists("print_concurrent")) {
+         d_print_concurrent = input_db->getBool("print_concurrent");
+      } else {
+         d_print_concurrent = input_db->getBoolWithDefault("print_concurrent",
+               d_print_concurrent);
+      }
+
+      if (input_db->keyExists("print_timer_overhead")) {
+         d_print_timer_overhead = input_db->getBool("print_timer_overhead");
+      } else {
+         d_print_timer_overhead = input_db->
+            getBoolWithDefault("print_timer_overhead",
+               d_print_timer_overhead);
+      }
+
+      if (input_db->keyExists("print_threshold")) {
+         d_print_threshold =
+            input_db->getDouble("print_threshold");
+      } else {
+         d_print_threshold =
+            input_db->getDoubleWithDefault("print_threshold",
+               d_print_threshold);
+      }
+
+      Array<std::string> timer_list;
+      if (input_db->keyExists("timer_list")) {
+         timer_list = input_db->getStringArray("timer_list");
+      }
+
+      /*
+       *  Step thru the input list and call addTimerToNameLists to add
+       *  the input file entry to the d_package_names,
+       *  d_class_names, and d_class_method_names lists.
+       */
+      for (int i = 0; i < timer_list.getSize(); i++) {
+         std::string entry = timer_list[i];
+         addTimerToNameLists(entry);
+      }
+      d_length_package_names = d_package_names.getNumberOfItems();
+      d_length_class_names = d_class_names.getNumberOfItems();
+      d_length_class_method_names = d_class_method_names.getNumberOfItems();
+
+   }
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+void TimerManager::addTimerToNameLists(
+   const std::string& name)
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   /*
+    * Evaluate whether the name is a package, class, or class::method
+    * combination.  This parser supports inputs of the form:
+    *
+    *    *::*::*         - ALL timers added
+    *    Package::*::*   - "Package" added to package list.
+    *    Class           - "Class" added to class list.
+    *    *::Class        - "Class" added to class list.
+    *    Class::*        - "Class" added to class list.
+    *    *::Class::*     - "Class" added to class list.
+    *    Package::Class::method  - "Class::method" put to class_method list
+    *    Class::method   - "Class::method" put to class_method list
+    */
+
+   std::string::size_type position, string_length;
+
+   /*
+    *  Step thru the input list and form the d_package_names,
+    *  d_class_names, and d_class_method_names lists.
+    */
+
+   if (!name.empty()) {    // Nested if #1
+
+      std::string entry = name;
+
+      /*
+       *  Once we have determined whether the entry is a package,
+       *  class, or class::method, use this bool to jump to the next
+       *  loop entry.
+       */
+      bool determined_entry = false;
+
+      /*
+       * Check if its a wildcard entry - "*::*::*".  If so, add all package
+       * names to the package name list.
+       */
+      position = entry.find("*::*::*");  // if not found, "position" runs off
+                                         // end of entry so pos > entry.size()
+      if (position < entry.size()) {
+         d_package_names.addItem("algs");
+         d_package_names.addItem("apps");
+         d_package_names.addItem("appu");
+         d_package_names.addItem("geom");
+         d_package_names.addItem("hier");
+         d_package_names.addItem("math");
+         d_package_names.addItem("mesh");
+         d_package_names.addItem("pdat");
+         d_package_names.addItem("solv");
+         d_package_names.addItem("tbox");
+         d_package_names.addItem("xfer");
+         determined_entry = true;
+      }
+
+      /*
+       * Is it a package?  Look for "::*::*" string.  If its there,
+       * parse it off and add the package to the package list.
+       */
+      if (!determined_entry) {
+         position = entry.find("::*::*");
+         if (position < entry.size()) {
+            entry = entry.substr(0, position);
+            d_package_names.addItem(entry);
+            determined_entry = true;
+         }
+      }
+
+      if (!determined_entry) {    // Nested if #2
+
+         /*
+          * Is it a class?  If it doesn't have any "::", it must be a class.
+          */
+         position = entry.find("::");
+         if (position > entry.size()) {
+            d_class_names.addItem(entry);
+            determined_entry = true;
+         }
+         if (!determined_entry) {    // Nested if #3
+
+            /*
+             * At this point, we know the entry has a "::" but wasn't
+             * identified as a package.  There are several options that
+             * might make Foo a class entry:
+             *  1) Foo::*
+             *  2) *::Foo::*
+             *  3) Package::Foo::*
+             *  4) *::Foo
+             * Parse these as follows:  First, look for existence of "::*"
+             * at the end of the entry.  This will identify the first 3
+             * options.  Next look for existence of "*::" at front of the
+             * string.  This will identify the fourth choice.
+             *
+             * Check for first three options...
+             */
+            string_length = entry.size();
+            std::string substring = entry.substr(string_length - 3,
+                  string_length);
+            if (substring == "::*") {
+               entry = entry.substr(0, string_length - 3);
+
+               /*
+                * If a preceeding "::" exists at the front of the entry
+                * (i.e. option 2 and 3), parse off anything before it.
+                */
+               position = entry.find("::");
+               if (position < entry.size()) {
+                  entry = entry.substr(position + 2);
+               }
+               d_class_names.addItem(entry);
+               determined_entry = true;
+            }
+
+            if (!determined_entry) {    // Nested if #4
+
+               /*
+                * Check for option 4.  The entry has a preceeding *::. Do not
+                * accept case where there is a second "::" followed by anything
+                * but "*", since this is a class::method combination.
+                *
+                */
+               substring = entry.substr(0, 3);
+               if (substring == "*::") {
+                  entry = entry.substr(3);
+                  position = entry.find("::");
+
+                  /*
+                   * There is no second "::".  Accept the entry as a class.
+                   */
+                  if (position > entry.size()) {
+                     d_class_names.addItem(entry);
+                     determined_entry = true;
+                  } else {
+
+                     /*
+                      * There is a second "::".  See if it is followed by a
+                      * "*".  If so, parse off the "::*" and accept entry as
+                      * a class.  If not, let it be determined below to be a
+                      * class::method entry.
+                      */
+                     string_length = entry.size();
+                     substring = entry.substr(string_length - 1, string_length);
+                     if (substring == "*") {
+                        entry = entry.substr(0, string_length - 3);
+                        d_class_names.addItem(entry);
+                        determined_entry = true;
+                     }
+                  }
+               }
+
+               if (!determined_entry) {    // Nested if #5
+
+                  /*
+                   * The entry has not been identified as either a package or
+                   * a class.  It must be a class::method combination. There
+                   * are three options for entering class::method combinations:
+                   *  1) Package::Foo::method
+                   *  2) *::Foo::method
+                   *  3) Foo::method
+                   * We only want to maintain "Foo::method" in the package
+                   * list.  Check first if there are two "::" in the entry.
+                   * If there are, parse of whatever is in front of the
+                   * first "::".  If not, just use the entry as is.
+                   */
+                  position = entry.find("::");
+                  if (position < entry.size()) {
+                     substring = entry.substr(position + 2);
+                     position = substring.find("::");
+                     if (position < substring.size()) {
+
+                        /*
+                         * There *are* two "::" so entry must contain a
+                         * package.  Parse it off.
+                         */
+                        position = entry.find("::");
+                        entry = entry.substr(position + 2);
+                     }
+                  }
+                  d_class_method_names.addItem(entry);
+
+               } // Nested if #5
+
+            } // Nested if #4
+
+         } // Nested if #3
+
+      } // Nested if #2
+
+   } // Nested if #1
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+double TimerManager::computeOverheadConstantActiveOrInactive(
+   bool active) 
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   tbox::Pointer<tbox::Timer> outer_timer;
+   tbox::Pointer<tbox::Timer> inner_timer;
+
+   std::string outer_name("TimerManger::Outer");
+   outer_timer = tbox::TimerManager::getManager()->getTimer(outer_name, true);
+
+   std::string inner_name("TimerMangerInner");
+   inner_timer = tbox::TimerManager::getManager()->getTimer(inner_name, active);
+
+   const int ntest = 1000;
+   for (int i = 0; i < ntest; i++) {
+      outer_timer->start();
+      inner_timer->start();
+      inner_timer->stop();
+      outer_timer->stop();
+   }
+
+   return (outer_timer->getTotalWallclockTime()
+           - inner_timer->getTotalWallclockTime()) / (static_cast<double>(ntest));
+#else
+   return 0.0;
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+void TimerManager::computeOverheadConstants(
+   void) 
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+
+   if (d_timer_active_access_time < 0.0) {
+
+      clearArrays();
+      d_timer_active_access_time = computeOverheadConstantActiveOrInactive(
+            false);
+
+      clearArrays();
+      d_timer_inactive_access_time = computeOverheadConstantActiveOrInactive(
+            true);
+
+      clearArrays();
+   }
+#endif  // ENABLE_SAMRAI_TIMERS
+}
+
+void TimerManager::clearArrays(
+   void) 
+{
+#ifdef ENABLE_SAMRAI_TIMERS
+   /*
+    * Create a timer that measures overall solution time.  If the
+    * application uses Tau, this timer will effectively measure
+    * uninstrumented parts of the library.  Hence, use a different name
+    * for the different cases to avoid confusion in the Tau analysis tool.
+    */
+#ifdef HAVE_TAU
+   d_main_timer = new Timer("UNINSTRUMENTED PARTS");
+#else
+   d_main_timer = new Timer("TOTAL RUN TIME");
+#endif
+
+   d_timers.clear();
+   d_inactive_timers.clear();
+
+   d_exclusive_timer_stack.clearItems();
+#endif // ENABLE_SAMRAI_TIMERS
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/TimerManager.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/TimerManager.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,569 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Singleton timer manager class. 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_TimerManager
+#define included_tbox_TimerManager
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/List.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Serializable.h"
+#include "SAMRAI/tbox/Timer.h"
+
+#include <iostream>
+#include <string>
+#include <vector>
+
+namespace SAMRAI {
+namespace tbox {
+
+/*!
+ * Class TimerManager is a Singleton class that manages a list of
+ * timer objects to do performance analysis in SAMRAI library modules
+ * and application codes built with SAMRAI.
+ *
+ * Typically, entries in the input file guide timer invocation and
+ * output generation.  Within the source code, timer objects are retrieved
+ * as follows:
+ *
+ *    Pointer<Timer> name_timer =
+ *        TimerManager::getManager->getTimer("name");
+ *
+ * Here `name' is the name string identifier for the timer.
+ *
+ * The input data is summarized as follows.
+ *
+ * Required input keys: NONE
+ *
+ * Optional input keys and defaults:
+ *
+ *
+ *    - \b    print_exclusive
+ *       (bool) Specifying whether to track and print exclusive times.
+ *       Exclusive times are convenient for identifying time spent inside
+ *       nested routines.  Exclusive time is measured by turning off the
+ *       parent timer when the timer in the nested routine is started.
+ *       It then turns on the parent timer again once the nested timer is
+ *       stopped. This option should be used with some discretion
+ *       because the extra overhead to manage the nested list of timers
+ *       is between four and seven times more expensive than doing simple
+ *       start/stop operations (as is done with the print_total option).
+ *       For this reason, we leave it off by default. [FALSE]
+ *
+ *    - \b    print_total
+ *       (bool) Specifies whether to print total (i.e. non-nested) time.
+ *       This is the least expensive way to time parts of the code.  The
+ *       overhead associated with each start/stop sequence is about
+ *       one-half a millionth of a second. [TRUE]
+ *
+ *    - \b    print_wall
+ *       (bool) Print wallclock time. [TRUE]
+ *
+ *    - \b    print_user
+ *       (bool) Print user time (measured by system clock). [FALSE]
+ *
+ *    - \b    print_sys
+ *       (bool) Print system time (measured by system clock). [FALSE]
+ *
+ *    - \b    print_processor
+ *       (bool) Print times measured on individual processors. [TRUE]
+ *
+ *    - \b    print_summed
+ *       (bool) Print time summed across all processors. [FALSE]
+ *
+ *    - \b    print_max
+ *       (bool) Print maximum time spent on any processor, and the
+ *       processor ID that incurred the time. [FALSE]
+ *
+ *    - \b    print_concurrent
+ *       (bool) Prints the concurrent timer tree, as determined during
+ *       exclusive timing.  That is, for each timer, it prints the list
+ *       of names of the timers in nested routines it calls. [FALSE]
+ *
+ *    - \b    print_percentage
+ *       (bool) Prints the percentage of total time with each timer. [TRUE]
+ *
+ *    - \b    print_timer_overhead
+ *       (bool) Prints some overhead stats associated with the timers.
+ *       Information like the number of times a start/stop sequence was
+ *       called for the timer, and the predicted overhead time associated
+ *       with the timer.  This is a convenient option to occasionally
+ *       check to make sure the timers themselves are not affecting the
+ *       performance of your calculation. [FALSE]
+ *
+ *    - \b    print_threshold
+ *       (double) Timers that use up less than (<EM>print_threshold</EM>)
+ *       percent of the overall run time are not printed.  This can be
+ *       a convenient option to limit output if you have many timers
+ *       invoked. [0.25]
+ *
+ *    - \b    timer_list
+ *       (string array) List of timers to be invoked.  The timers can be
+ *       listed individually in <TT>package::class::method</TT> format or
+ *       the entries may contain wildcards to turn on a set of timers in
+ *       a given package or class:
+ *       \verbatim
+ *          timer_list = "pkg1::*::*", "pkg2::class2::*", ...
+ *       \endverbatim
+ *
+ *
+ *
+ * A sample input file entry might look like:
+ *
+ * \verbatim
+ *
+ *    print_exclusive      = TRUE
+ *    print_timer_overhead = TRUE
+ *    timer_list = "algs::HyperbolicLevelIntegrator::advanceLevel()",
+ *                 "mesh::GriddingAlgorithm::*",
+ *                 "xfer::*::*"
+ *
+ * \endverbatim
+ *
+ * TimerManager expects timer names to be in a certain format to preserve
+ * the wildcard naming capability (i.e. to turn on entire package or class
+ * of timers).  See the PDF document in /SAMRAI/docs/userdocs/timing.pdf
+ * for a discussion of how to add timers that maintain this format as well
+ * as a catalog of available timers currently implemented in the library.
+ *
+ * Timing recursive function calls will yeild erroneous results and
+ * may lead to memory problems.  We recommend {\em not to use timers
+ * to time recursive function calls}.
+ *
+ * @see tbox::Timer
+ */
+
+class TimerManager
+{
+   friend class Timer;
+public:
+   /*!
+    * Create the singleton instance of the timer manager.
+    * If the input database pointer is null, no information will be
+    * read from the input file.
+    *
+    * Generally, this routine should only be called once during program
+    * execution.  If the timer manager has been previously created (e.g.,
+    * by an earlier call to this routine) the rules for activating
+    * timers in the input_db will be applied to the existing timers.
+    */
+   static void
+   createManager(
+      Pointer<Database> input_db);
+
+   /*!
+    * Return a pointer to the singleton instance of the timer manager.
+    * All access to the TimerManager object is through the
+    * getManager() function.  For example, to add a timer with the name
+    * "my_timer" to the timer manager, use the following call:
+    * TimerManager::getManager()->addTimer("my_timer").
+    */
+   static TimerManager *
+   getManager();
+
+   /*!
+    * Return pointer to timer object with the given name string.
+    * If a timer with the given name already appears in the database
+    * of timers, the timer with that name will be returned.  Otherwise,
+    * a new timer will be created with that name.  Typically, only
+    * a timer specified (to be turned on) in the input file will be active.
+    * Timer names are parsed according to the input data parsing criteria
+    * (described at the top of this class header).  One may override
+    * this functionality by adding the timer with a `true' argument.
+    * This argument allows one to override the input file criteria and
+    * turn the timer on anyway.
+    *
+    * When assertion checking is active, an assertion will result if the
+    * string is empty.
+    */
+   virtual Pointer<Timer>
+   getTimer(
+      const std::string& name,
+      bool ignore_timer_input = false);
+
+   /*!
+    * Return true if a timer whose name matches the argument string
+    * exists in the database of timers controlled by the manager.  If
+    * a match is found, the timer pointer in the argument list is set
+    * to that timer.  Otherwise, return false and return a null pointer.
+    * If the name string is empty, a null pointer is returned.
+    */
+   virtual bool
+   checkTimerExists(
+      Pointer<Timer>& timer,
+      const std::string& name) const;
+
+   /*!
+    * Return true if a timer whose name matches the argument string
+    * exists in the database of timers and is currently running.
+    * Otherwise, return false.
+    */
+   virtual bool
+   checkTimerRunning(
+      const std::string& name) const;
+
+   /*!
+    * Reset the times in all timers to zero.
+    */
+   virtual void
+   resetAllTimers();
+
+   /*!
+    * Print the timing statistics to the specified output stream.
+    */
+   virtual void
+   print(
+      std::ostream& os = plog);
+
+protected:
+   /*!
+    * The constructor for TimerManager is protected.  Consistent
+    * with the definition of a Singleton class, only a timer manager object
+    * can have access to the constructor for the class.
+    */
+   TimerManager(
+      Pointer<Database> input_db);
+
+   /*!
+    * TimerManager is a Singleton class; its destructor is protected.
+    */
+   virtual ~TimerManager();
+
+   /*!
+    * Initialize Singleton instance with instance of subclass.  This function
+    * is used to make the singleton object unique when inheriting from this
+    * base class.
+    */
+   void
+   registerSingletonSubclassInstance(
+      TimerManager* subclass_instance);
+
+   /*!
+    * Mark given timer as running in timer database.
+    * If exclusive time option is set, start exclusive time for given
+    * timer. Also stop exclusive time for timer on top of exclusive timer
+    * stack and push given timer on to that stack.
+    *
+    * When assertion checking is active, the timer pointer must be non-null.
+    */
+   virtual void
+   startTime(
+      Timer* timer);
+
+   /*!
+    * Mark given timer as not running in timer database.
+    * If exclusive time option is set, stop exclusive time for given timer.
+    * Also, pop timer off top of exclusive timer stack and start exclusive
+    * timer for new top of stack timer.
+    *
+    * When assertion checking is active, the timer pointer must be non-null.
+    */
+   virtual void
+   stopTime(
+      Timer* timer);
+
+private:
+   /**
+    * Based on the values a user specified in the input database control
+    * activate any existing timers that have already been registered.
+    *
+    * This is needed since Timers maybe registered before the input database
+    * can be read, such as at program startup or as part of StartupShutdownManager
+    * life cycle management.
+    */
+   void
+   activateExistingTimers(
+      void);
+
+   /*
+    * Static data members to manage the singleton timer manager instance.
+    */
+   static TimerManager* s_timer_manager_instance;
+
+   /*
+    * Add timer to either the active or inactive timer array.
+    */
+   bool
+   checkTimerExistsInArray(
+      Pointer<Timer>& timer,
+      const std::string& name,
+      const std::vector<Pointer<Timer> >&
+      timer_array) const;
+
+   /*
+    * Print a table of values, using values specified in the timer_values
+    * array.  column_titles and column_ids specify which columns in
+    * timer_values to print.
+    */
+   void
+   printTable(
+      const std::string& table_title,
+      const Array<std::string> column_titles,
+      const Array<std::string> timer_names,
+      const int column_ids[],
+      const double timer_values[][18],
+      std::ostream& os);
+
+   /*
+    * Same as above, but also print the int max_processor_id integer array
+    * in addition to the double values specified in timer_values.  This
+    * function is used when printing maximum values, in which it is
+    * desirable to print the ID of the processor holding the maximum value.
+    */
+   void
+   printTable(
+      const std::string& table_title,
+      const Array<std::string> column_titles,
+      const Array<std::string> timer_names,
+      const int max_processor_id[][2],
+      const int max_array_id,
+      const int column_ids[],
+      const double timer_values[][18],
+      std::ostream& os);
+
+   /*
+    * Output overhead stats for Timers.
+    */
+   void
+   printOverhead(
+      const Array<std::string> timer_names,
+      const double timer_values[][18],
+      std::ostream& os);
+
+   /*
+    * Output concurrent tree of Timers.
+    */
+   void
+   printConcurrent(
+      std::ostream& os);
+
+   /*
+    * Build the timer_names, timer_values, and max_processor_id arrays.
+    */
+   void buildTimerArrays(
+      double timer_values[][18],
+      int max_processor_id[][2],
+      Array<std::string> timer_names);
+
+   /*
+    * Build an ordered list array, organizing timers largest to smallest.
+    */
+   void buildOrderedList(const double timer_values[][18],
+                         const int column,
+                         int index[],
+                         const int array_size);
+
+   /*
+    * Checks timer name to determine if it is specified to be turned
+    * on.  If it is, return true.  Otherwise, return false.
+    */
+   bool
+   checkTimerInNameLists(
+      const std::string& name);
+
+   /*
+    * Evaluate consistency of timer database across processors.
+    */
+   void
+   checkConsistencyAcrossProcessors();
+
+   /*
+    * Private member used by the setupTimerDatabase() function to parse
+    * input data for managing timers.
+    */
+   void
+   getFromInput(
+      Pointer<Database> input_db);
+
+   /*
+    * Private member used by the above routine (processInputStringData)
+    * and the addTimer routine to add a timer name to the d_package,
+    * d_class, or d_class_method lists.
+    */
+   void
+   addTimerToNameLists(
+      const std::string& name);
+
+   /*
+    * Quicksort algorithm specialized for timer array..  This
+    * implementation is based off of that provided in "Algorithms in
+    * C++", 3rd Edition, Sedgewick.
+    */
+   static void quicksort(const Array<double>&a,
+                         int index[],
+                         int lo, int hi);
+
+   /*
+    * Simple methods to compute percentages, given two doubles.
+    * Performs check to avoid divide-by-zero cases (i.e. where tot = 0)
+    * and caps the percentage at 1000 to avoid output irregularities.
+    */
+   static int
+   computePercentageInt(
+      const double frac,
+      const double tot);
+
+   static double
+   computePercentageDouble(
+      const double frac,
+      const double tot);
+
+   /*
+    * Compute the overhead costs of the timing routines
+    * for active and non-active timers.
+    *
+    * IMPORTANT:  This is destructive of timers so should only
+    * be called in the constructor.
+    */
+   void
+   computeOverheadConstants(
+      void);
+   double
+   computeOverheadConstantActiveOrInactive(
+      bool active);
+
+   /*
+    * Clear the registered timers.
+    */
+   void
+   clearArrays(
+      void);
+
+   /*!
+    * Deallocate the TimerManager instance. Note that it is not
+    * necessary to call freeManager() at program termination, since it is
+    * automatically called by the StartupShutdownManager class.
+    */
+   static void
+   finalizeCallback();
+
+   /*
+    * Static constants used by timer manager.
+    */
+   static int s_main_timer_identifier;
+   static int s_inactive_timer_identifier;
+
+   /*
+    * Timer accesss overheads.
+    */
+   double d_timer_active_access_time;
+   double d_timer_inactive_access_time;
+
+   /*
+    * Main timer used to time overall run time (time between
+    * creation and print, or deletion, of TimerManager.
+    */
+   Pointer<Timer> d_main_timer;
+
+   /*
+    * Count of timers registered with the timer manager and an
+    * array of pointers to those timers.
+    */
+   std::vector<Pointer<Timer> > d_timers;
+
+   /*
+    * An array of dummy inactive timers is used to record
+    * number of accesses to non-active timers.
+    */
+   std::vector<Pointer<Timer> > d_inactive_timers;
+
+   /*
+    * Timer which measures overall run time.  All other timers are
+    * compared against to report time percentages.
+    */
+
+   /*
+    * The timer manager maintains a list (stack) of running timers so
+    * that timer objects can maintain exclusive time information as well
+    * total elapsed time.  Total elapsed time is the accumulation of time
+    * between start and stop calls for a timer.  Exclusive elapsed time
+    * for a timer is its total elapsed time minus any time spent in other
+    * timers while that timer is running.
+    */
+   List<Timer *> d_exclusive_timer_stack;
+
+   /*
+    * Lists of timer names generated from the input database.  These are
+    * used to activate specific timers in the code when a program executes.
+    */
+   List<std::string> d_package_names;
+   List<std::string> d_class_names;
+   List<std::string> d_class_method_names;
+
+   /*
+    * These values hold the length of the package, class, and class_method
+    * lists.  They are stored to avoid multiple calls to getNumberOfItems
+    * to improve efficiency.
+    */
+   int d_length_package_names;
+   int d_length_class_names;
+   int d_length_class_method_names;
+
+   /*
+    * Print threshold value.  If a "main" timer is specified, the print
+    * routines will cutoff printing any timers with percentage less than
+    * this value.  For example, if the threshold value is set to 1.0, any
+    * timer reporting less than 1% of wallclock time will not be printed.
+    */
+   double d_print_threshold;
+
+   /*
+    * Options used in the print routine:
+    * Print exclusive and/or total time.
+    * Defaults:  d_print_exclusive=false, d_print_total=true;
+    */
+   bool d_print_exclusive;
+   bool d_print_total;
+
+   /*
+    * Print time on individual processor (to log files), maximum time
+    * across all processors, and summed time across all processors.
+    * Defaults:  d_print_processor=true, d_print_max=false,
+    * d_print_summed=false;
+    */
+   bool d_print_processor;
+   bool d_print_max;
+   bool d_print_summed;
+
+   /*
+    * Print user, system, and wallclock time.
+    * Defaults:  d_print_user=false, d_print_sys=false, d_print_wall=true;
+    */
+   bool d_print_user;
+   bool d_print_sys;
+   bool d_print_wall;
+
+   /*
+    * Print percentages of total, concurrent stats, and overhead stats
+    * (i.e. estimated overhead of timer calls).
+    * Defaults:  d_print_percentage=true, d_print_concurrent=false,
+    *            d_print_timer_overhead=true;
+    */
+   bool d_print_percentage;
+   bool d_print_concurrent;
+   bool d_print_timer_overhead;
+
+   /*
+    * Internal value used to set and grow arrays for storing
+    * timers.
+    */
+   static const int DEFAULT_NUMBER_OF_TIMERS_INCREMENT = 128;
+
+   static StartupShutdownManager::Handler
+   s_finalize_handler;
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Tracer.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Tracer.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,24 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A simple call sequence tracking class 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Tracer.h"
+#include "SAMRAI/tbox/PIO.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/tbox/Tracer.I"
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+std::ostream * Tracer::s_stream = &plog;
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Tracer.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Tracer.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,40 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A simple call sequence tracking class 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace tbox {
+
+SAMRAI_INLINE_KEYWORD
+Tracer::Tracer(
+   const std::string& message)
+{
+   d_message = message;
+   if (s_stream) {
+      (*s_stream) << "Entering " << d_message << std::endl << std::flush;
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+Tracer::~Tracer()
+{
+   if (s_stream) {
+      (*s_stream) << "Exiting " << d_message << std::endl << std::flush;
+   }
+}
+
+SAMRAI_INLINE_KEYWORD
+void Tracer::setTraceStream(
+   std::ostream* stream)
+{
+   s_stream = stream;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Tracer.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Tracer.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   A simple call sequence tracking class 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_Tracer
+#define included_tbox_Tracer
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <iostream>
+#include <string>
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * Class Tracer allows one to trace entrances and exits of
+ * class member functions. An example usage is:
+ * \code
+ * #include "SAMRAI/tbox/Tracer.h"
+ * ....
+ * void MyClass::myClassMemberFunction()
+ * {
+ *    Tracer t("MyClass::myClassMemberFunction");
+ *     ....
+ * }
+ * \endcode
+ * When the function `myClassMemberFunction' is called, a tracer
+ * object  local to the function scope is created and the message
+ * {\em Entering MyClass::myClassMemberFunction} is sent to the
+ * tracer output stream. Upon exiting the function, the tracer object
+ * is destroyed and {\em Exiting MyClass::myClassMemberFunction}
+ * is sent to the tracer output stream.  By default, the tracer
+ * class sends data to the parallel log stream, although the default
+ * output stream can be changed through a call to static member function
+ * setTraceStream(), which will set the tracer output stream for all
+ * subsequent calls.
+ */
+
+class Tracer
+{
+public:
+   /**
+    * The constructor for Tracer prints ``Entering \<message\>''
+    * to the tracer output stream.
+    */
+   explicit Tracer(
+      const std::string& message);
+
+   /**
+    * The destructor for Tracer prints ``Exiting \<message\>''
+    * to the tracer output stream.
+    */
+   ~Tracer();
+
+   /**
+    * Set the tracer output stream for all tracer output.  By default,
+    * this is set to the parallel log stream plog.  If this argument is
+    * NULL, then all output to trace streams is disabled.
+    */
+   static void
+   setTraceStream(
+      std::ostream* stream);
+
+private:
+   std::string d_message;
+   static std::ostream* s_stream;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/tbox/Tracer.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Transaction.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Transaction.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract base class for all schedule transactions 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Transaction.h"
+
+namespace SAMRAI {
+namespace tbox {
+
+Transaction::Transaction()
+{
+}
+
+Transaction::~Transaction()
+{
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Transaction.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Transaction.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,126 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract base class for all schedule transactions 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_Transaction
+#define included_tbox_Transaction
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/MessageStream.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace tbox {
+
+/**
+ * Class Transaction describes a single communication between two
+ * processors or a local data copy.  It is an abstract base class for each
+ * data transaction in a communication schedule.
+ */
+
+class Transaction:public DescribedClass
+{
+public:
+   /**
+    * The constructor for transaction does nothing interesting.
+    */
+   Transaction();
+
+   /**
+    * The virtual destructor for transaction does nothing interesting.
+    */
+   virtual ~Transaction();
+
+   /**
+    * Return a boolean indicating whether this transaction can estimate
+    * the size of an incoming message.  If this is false, then a different
+    * communications protocol kicks in and the message size is transmitted
+    * between nodes.
+    *
+    * Note that the message size estimate may be an overestimate but
+    * should not be an underestimate.  Also, the receiver should never
+    * estimate lower than the sender, because that may lead to
+    * fatal MPI errors due to truncated messages.
+    */
+   virtual bool
+   canEstimateIncomingMessageSize() = 0;
+
+   /**
+    * Return the amount of buffer space needed for the incoming message.
+    * This routine is only called if the transaction can estimate the
+    * size of the incoming message.
+    *
+    * @see canEstimateIncomingMessageSize().
+    */
+   virtual size_t
+   computeIncomingMessageSize() = 0;
+
+   /**
+    * Return the buffer space needed for the outgoing message.
+    *
+    * @see canEstimateIncomingMessageSize().
+    */
+   virtual size_t
+   computeOutgoingMessageSize() = 0;
+
+   /**
+    * Return the sending processor for the communications transaction.
+    */
+   virtual int
+   getSourceProcessor() = 0;
+
+   /**
+    * Return the receiving processor for the communications transaction.
+    */
+   virtual int
+   getDestinationProcessor() = 0;
+
+   /**
+    * Pack the transaction data into the message stream.
+    */
+   virtual void
+   packStream(
+      MessageStream& stream) = 0;
+
+   /**
+    * Unpack the transaction data from the message stream.
+    */
+   virtual void
+   unpackStream(
+      MessageStream& stream) = 0;
+
+   /**
+    * Perform the local data copy for the transaction.
+    */
+   virtual void
+   copyLocalData() = 0;
+
+   /**
+    * Print out transaction information.
+    */
+   virtual void
+   printClassData(
+      std::ostream& stream) const = 0;
+
+private:
+   Transaction(
+      const Transaction&);              // not implemented
+   void
+   operator = (
+      const Transaction&);              // not implemented
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Utilities.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Utilities.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,215 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility functions for error reporting, file manipulation, etc. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Utilities.h"
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Logger.h"
+#include "SAMRAI/tbox/PIO.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+#include <time.h>
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace tbox {
+
+/*
+ * Routine to rename a file.
+ */
+void Utilities::renameFile(
+   const std::string& old_filename,
+   const std::string& new_filename)
+{
+   TBOX_ASSERT(!old_filename.empty());
+   TBOX_ASSERT(!new_filename.empty());
+
+   rename(old_filename.c_str(), new_filename.c_str());
+}
+
+/*
+ * Routine to recursively construct directories based on a relative path name.
+ */
+void Utilities::recursiveMkdir(
+   const std::string& path,
+   mode_t mode,
+   bool only_node_zero_creates)
+{
+
+#ifdef _MSC_VER
+   const char seperator = '/';
+#define mkdir(path, mode) mkdir(path)
+#else
+   const char seperator = '/';
+#endif
+
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   if ((!only_node_zero_creates) || (mpi.getRank() == 0)) {
+      int length = static_cast<int>(path.length());
+      char* path_buf = new char[length + 1];
+      sprintf(path_buf, "%s", path.c_str());
+      struct stat status;
+      int pos = length - 1;
+
+      /* find part of path that has not yet been created */
+      while ((stat(path_buf, &status) != 0) && (pos >= 0)) {
+
+         /* slide backwards in string until next slash found */
+         bool slash_found = false;
+         while ((!slash_found) && (pos >= 0)) {
+            if (path_buf[pos] == seperator) {
+               slash_found = true;
+               if (pos >= 0) path_buf[pos] = '\0';
+            } else pos--;
+         }
+      }
+
+      /*
+       * if there is a part of the path that already exists make sure
+       * it is really a directory
+       */
+      if (pos >= 0) {
+         if (!S_ISDIR(status.st_mode)) {
+            TBOX_ERROR("Error in Utilities::recursiveMkdir...\n"
+               << "    Cannot create directories in path = " << path
+               << "\n    because some intermediate item in path exists and"
+               << "is NOT a directory" << std::endl);
+         }
+      }
+
+      /* make all directories that do not already exist */
+
+      /*
+       * if (pos < 0), then there is no part of the path that
+       * already exists.  Need to make the first part of the
+       * path before sliding along path_buf.
+       */
+      if (pos < 0) {
+         if (mkdir(path_buf, mode) != 0) {
+            TBOX_ERROR("Error in Utilities::recursiveMkdir...\n"
+               << "    Cannot create directory  = "
+               << path_buf << std::endl);
+         }
+         pos = 0;
+      }
+
+      /* make rest of directories */
+      do {
+
+         /* slide forward in string until next '\0' found */
+         bool null_found = false;
+         while ((!null_found) && (pos < length)) {
+            if (path_buf[pos] == '\0') {
+               null_found = true;
+               path_buf[pos] = seperator;
+            }
+            pos++;
+         }
+
+         /* make directory if not at end of path */
+         if (pos < length) {
+            if (mkdir(path_buf, mode) != 0) {
+               TBOX_ERROR("Error in Utilities::recursiveMkdir...\n"
+                  << "    Cannot create directory  = "
+                  << path_buf << std::endl);
+            }
+         }
+      } while (pos < length);
+
+      delete[] path_buf;
+   }
+
+   /*
+    * Make sure all processors wait until node zero creates
+    * the directory structure.
+    */
+   if (only_node_zero_creates) {
+      SAMRAI_MPI::getSAMRAIWorld().Barrier();
+   }
+}
+
+/*
+ * Routine to convert an integer to a string.
+ */
+std::string Utilities::intToString(
+   int num,
+   int min_width)
+{
+   int tmp_width = (min_width > 0 ? min_width : 1);
+   std::ostringstream os;
+   if (num < 0) {
+      os << '-' << std::setw(tmp_width - 1) << std::setfill('0') << -num;
+   } else {
+      os << std::setw(tmp_width) << std::setfill('0') << num;
+   }
+   os << std::flush;
+
+   return os.str();  //returns the string form of the stringstream object
+}
+
+std::string Utilities::nodeToString(
+   int num)
+{
+   return intToString(num, s_node_width);
+}
+
+std::string Utilities::processorToString(
+   int num)
+{
+   return intToString(num, s_processor_width);
+}
+
+std::string Utilities::patchToString(
+   int num) {
+   return intToString(num, s_patch_width);
+}
+
+std::string Utilities::levelToString(
+   int num) {
+   return intToString(num, s_level_width);
+}
+
+std::string Utilities::blockToString(
+   int num) {
+   return intToString(num, s_block_width);
+}
+
+/*
+ * Routine that calls abort and prints calling location to error stream.
+ */
+void Utilities::abort(
+   const std::string& message,
+   const std::string& filename,
+   const int line)
+{
+   tbox::Logger::getInstance()->logAbort(message, filename, line);
+
+   SAMRAI_MPI::abort();
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/Utilities.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/Utilities.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,434 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility functions for error reporting, file manipulation, etc. 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_Utilities
+#define included_tbox_Utilities
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/IOStream.h"
+#include "SAMRAI/tbox/Logger.h"
+
+#include <string>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
+namespace SAMRAI {
+namespace tbox {
+
+#ifdef _MSC_VER
+#include <direct.h>
+typedef int mode_t;
+#define  S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+#define S_IRUSR 0
+#define S_IWUSR 0
+#define S_IXUSR 0
+#endif
+
+/*!
+ * Utilities is a Singleton class containing basic routines for error
+ * reporting, file manipulations, etc.
+ */
+
+struct Utilities {
+   /*!
+    * Create the directory specified by the path string.  Permissions are set
+    * by default to rwx by user.  The intermediate directories in the
+    * path are created if they do not already exist.  When
+    * only_node_zero_creates is true, only node zero creates the
+    * directories.  Otherwise, all nodes create the directories.
+    */
+   static void
+   recursiveMkdir(
+      const std::string& path,
+      mode_t mode = (S_IRUSR | S_IWUSR | S_IXUSR),
+      bool only_node_zero_creates = true);
+
+   /*!
+    * Rename a file from old file name to new file name.
+    */
+   static void
+   renameFile(
+      const std::string& old_filename,
+      const std::string& new_filename);
+
+   /*!
+    * Convert an integer to a string.
+    *
+    * The returned string is padded with zeros as needed so that it
+    * contains at least the number of characters indicated by the
+    * minimum width argument.  When the number is positive, the
+    * string is padded on the left. When the number is negative,
+    * the '-' sign appears first, followed by the integer value
+    * padded on the left with zeros.  For example, the statement
+    * intToString(12, 5) returns "00012" and the statement
+    * intToString(-12, 5) returns "-0012".
+    */
+   static std::string
+   intToString(
+      int num,
+      int min_width = 1);
+
+   /*!
+    * Convert common integer values to strings.
+    *
+    * These are simply wrappers around intToString that ensure the
+    * same width is uniformally used when converting to string
+    * representations.
+    */
+   static std::string
+   nodeToString(
+      int num);
+   static std::string
+   processorToString(
+      int num);
+   static std::string
+   patchToString(
+      int num);
+   static std::string
+   levelToString(
+      int num);
+   static std::string
+   blockToString(
+      int num);
+
+   /*!
+    * Aborts the run after printing an error message with file and
+    * linenumber information.
+    */
+   static void
+   abort(
+      const std::string& message,
+      const std::string& filename,
+      const int line);
+
+private:
+   /*
+    * Sizes for converting integers to fixed width strings
+    * for things like filenames etc.
+    */
+   static const int s_node_width = 7;
+   static const int s_processor_width = 7;
+   static const int s_patch_width = 7;
+   static const int s_level_width = 4;
+   static const int s_block_width = 7;
+
+};
+
+/*!
+ * A statement that does nothing, for insure++ make it something
+ * more complex than a simple C null statement to avoid a warning.
+ */
+#ifdef __INSURE__
+#define NULL_STATEMENT if (0) int nullstatement = 0
+#else
+#define NULL_STATEMENT
+#endif
+
+/*!
+ * A null use of a variable, use to avoid GNU compiler
+ * warnings about unused variables.
+ */
+#define NULL_USE(variable) \
+   do { \
+      if (0) { char* temp = (char *)&variable; temp++; } \
+   } while (0)
+
+/*!
+ * Throw an error assertion from within any C++ source code.  The
+ * macro argument may be any standard ostream expression.  The file and
+ * line number of the abort are also printed.
+ */
+#define TBOX_ERROR(X) \
+   do {                                      \
+      std::ostringstream tboxos;                                        \
+      tboxos << X << std::ends;                                 \
+      SAMRAI::tbox::Utilities::abort(tboxos.str(), __FILE__, __LINE__); \
+   } while (0)
+
+/*!
+ * Print a warning without exit.  Print file and line number of the warning.
+ */
+#define TBOX_WARNING(X) \
+   do {                                    \
+      std::ostringstream tboxos;                                        \
+      tboxos << X << std::ends;                                 \
+      SAMRAI::tbox::Logger::getInstance()->logWarning( \
+         tboxos.str(), __FILE__, __LINE__); \
+   } while (0)
+
+/*!
+ * Print a debug without exit.  Print file and line number of the debug.
+ */
+#define TBOX_DEBUG(X) \
+   do {                                      \
+      std::ostringstream tboxos;                                        \
+      tboxos << X << std::ends;                                 \
+      SAMRAI::tbox::Logger::getInstance()->logDebug( \
+         tboxos.str(), __FILE__, __LINE__); \
+   } while (0)
+
+/*!
+ * Throw an error assertion from within any C++ source code if the
+ * given expression is not true.  This is a parallel-friendly version
+ * of assert.
+ * The file and line number of the abort are also printed.
+ */
+#ifdef DEBUG_CHECK_ASSERTIONS
+
+#define TBOX_ASSERT(EXP) \
+   do {                                   \
+      if (!(EXP)) {                                           \
+         std::ostringstream tboxos;                             \
+         tboxos << "Failed assertion: " << # EXP << std::ends;        \
+         SAMRAI::tbox::Utilities::abort(tboxos.str(), __FILE__, __LINE__); \
+      }                                                         \
+   } while (0)
+#else
+
+/*
+ * No assertion checking
+ */
+#define TBOX_ASSERT(EXP)
+
+#endif
+
+/*!
+ * Throw an error assertion from within any C++ source code if the
+ * given expression is not true.  This version is used for assertions
+ * that are useful checking internal SAMRAI state for developers working
+ * on SAMRAI.  User level assertions should use TBOX_ASSERT.
+ *
+ * This is a parallel-friendly version of assert.  The file and line
+ * number of the abort are also printed.
+ */
+#ifdef DEBUG_CHECK_DEV_ASSERTIONS
+
+#define TBOX_DEV_ASSERT(EXP) \
+   do {                               \
+      if (!(EXP)) {                                           \
+         std::ostringstream tboxos;                             \
+         tboxos << "Failed assertion: " << # EXP << std::ends;        \
+         SAMRAI::tbox::Utilities::abort(tboxos.str(), __FILE__, __LINE__); \
+      }                                                         \
+   } while (0)
+#else
+
+/*
+ * No SAMRAI internal developer assertion checking
+ */
+#define TBOX_DEV_ASSERT(EXP)
+
+#endif
+
+#define TBOX_DIM_ASSERT_CHECK_DIM(dim)    \
+   TBOX_DIM_ASSERT(                       \
+   (dim).isValid()                     \
+   )
+
+#define TBOX_DIM_ASSERT_CHECK_DIM_ALLOW_UNINITIALIZED(dim)        \
+   TBOX_DIM_ASSERT(                                               \
+   !(dim).isInitialized || (dim).isValid()                     \
+   )
+
+#define TBOX_DIM_ASSERT_CHECK_ARGS1(arg1) \
+   TBOX_DIM_ASSERT(                       \
+   (arg1).getDim().isValid()           \
+   )
+
+#define TBOX_DIM_ASSERT_CHECK_ARGS2(arg1, arg2) \
+   TBOX_DIM_ASSERT(                       \
+   (arg1).getDim().isValid() &&                 \
+   ((arg1).getDim() == (arg2).getDim())         \
+   )
+
+#define TBOX_DIM_ASSERT_CHECK_ARGS3(arg1, arg2, arg3)   \
+   TBOX_DIM_ASSERT(                                     \
+   (arg1).getDim().isValid() &&                      \
+   ((arg1).getDim() == (arg2).getDim()) &&           \
+   ((arg1).getDim() == (arg3).getDim())              \
+   )
+
+#define TBOX_DIM_ASSERT_CHECK_ARGS4(arg1, arg2, arg3, arg4)     \
+   TBOX_DIM_ASSERT(                                             \
+   (arg1).getDim().isValid() &&                              \
+   ((arg1).getDim() == (arg2).getDim()) &&                   \
+   ((arg1).getDim() == (arg3).getDim()) &&                   \
+   ((arg1).getDim() == (arg4).getDim())                      \
+   )
+
+#define TBOX_DIM_ASSERT_CHECK_ARGS5(arg1, arg2, arg3, arg4, arg5)       \
+   TBOX_DIM_ASSERT(                       \
+   (arg1).getDim().isValid() &&                              \
+   ((arg1).getDim() == (arg2).getDim()) &&                   \
+   ((arg1).getDim() == (arg3).getDim()) &&                   \
+   ((arg1).getDim() == (arg4).getDim()) &&                   \
+   ((arg1).getDim() == (arg5).getDim())                      \
+   )
+
+#define TBOX_DIM_ASSERT_CHECK_ARGS6(arg1, arg2, arg3, arg4, arg5, arg6) \
+   TBOX_DIM_ASSERT(                       \
+   (arg1).getDim().isValid() &&                              \
+   ((arg1).getDim() == (arg2).getDim()) &&                   \
+   ((arg1).getDim() == (arg3).getDim()) &&                   \
+   ((arg1).getDim() == (arg4).getDim()) &&                   \
+   ((arg1).getDim() == (arg5).getDim()) &&                   \
+   ((arg1).getDim() == (arg6).getDim())                      \
+   )
+
+#define TBOX_DIM_ASSERT_CHECK_ARGS7(arg1, arg2, arg3, arg4, arg5, arg6, arg7) \
+   TBOX_DIM_ASSERT(                       \
+   (arg1).getDim().isValid() &&                              \
+   ((arg1).getDim() == (arg2).getDim()) &&                   \
+   ((arg1).getDim() == (arg3).getDim()) &&                   \
+   ((arg1).getDim() == (arg4).getDim()) &&                   \
+   ((arg1).getDim() == (arg5).getDim()) &&                   \
+   ((arg1).getDim() == (arg6).getDim()) &&                   \
+   ((arg1).getDim() == (arg7).getDim())                      \
+   )
+
+#define TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, arg1)      \
+   TBOX_DIM_ASSERT(                                     \
+   (dim).isValid() &&                                \
+   ((dim) == (arg1).getDim())                        \
+   )                                                 \
+
+#define TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(dim, arg1, arg2)        \
+   TBOX_DIM_ASSERT(                                             \
+   (dim).isValid() &&                                        \
+   ((dim) == (arg1).getDim()) &&                             \
+   ((dim) == (arg2).getDim())                                \
+   )
+
+#define TBOX_DIM_ASSERT_CHECK_DIM_ARGS3(dim, arg1, arg2, arg3)  \
+   TBOX_DIM_ASSERT(                                                     \
+   (dim).isValid() &&                                                \
+   ((dim) == (arg1).getDim()) &&                                     \
+   ((dim) == (arg2).getDim()) &&                                     \
+   ((dim) == (arg3).getDim())                                        \
+   )
+
+#define TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim, arg1, arg2, arg3, arg4)    \
+   TBOX_DIM_ASSERT(                                                     \
+   (dim).isValid() &&                                                \
+   ((dim) == (arg1).getDim()) &&                                     \
+   ((dim) == (arg2).getDim()) &&                                     \
+   ((dim) == (arg3).getDim()) &&                                     \
+   ((dim) == (arg4).getDim())                                        \
+   )
+
+#define TBOX_DIM_ASSERT_CHECK_DIM_ARGS5(dim, arg1, arg2, arg3, arg4, arg5) \
+   TBOX_DIM_ASSERT(                                                     \
+   (dim).isValid() &&                                                \
+   ((dim) == (arg1).getDim()) &&                                     \
+   ((dim) == (arg2).getDim()) &&                                     \
+   ((dim) == (arg3).getDim()) &&                                     \
+   ((dim) == (arg4).getDim()) &&                                     \
+   ((dim) == (arg5).getDim())                                        \
+   )
+
+#define TBOX_DIM_ASSERT_CHECK_DIM_ARGS6(dim, arg1, arg2, arg3, arg4, arg5, arg6) \
+   TBOX_DIM_ASSERT(                                                     \
+   (dim).isValid() &&                                                \
+   ((dim) == (arg1).getDim()) &&                                     \
+   ((dim) == (arg2).getDim()) &&                                     \
+   ((dim) == (arg3).getDim()) &&                                     \
+   ((dim) == (arg4).getDim()) &&                                     \
+   ((dim) == (arg5).getDim()) &&                                     \
+   ((dim) == (arg6).getDim())                                        \
+   )
+
+#define TBOX_DIM_ASSERT_CHECK_DIM_ARGS7(dim, \
+                                        arg1, \
+                                        arg2, \
+                                        arg3, \
+                                        arg4, \
+                                        arg5, \
+                                        arg6, \
+                                        arg7) \
+   TBOX_DIM_ASSERT(                                                     \
+   (dim).isValid() &&                                                \
+   ((dim) == (arg1).getDim()) &&                                     \
+   ((dim) == (arg2).getDim()) &&                                     \
+   ((dim) == (arg3).getDim()) &&                                     \
+   ((dim) == (arg4).getDim()) &&                                     \
+   ((dim) == (arg5).getDim()) &&                                     \
+   ((dim) == (arg6).getDim()) &&                                     \
+   ((dim) == (arg7).getDim())                                        \
+   )
+
+#define TBOX_DIM_ASSERT_CHECK_DIM_ARGS8(dim, \
+                                        arg1, \
+                                        arg2, \
+                                        arg3, \
+                                        arg4, \
+                                        arg5, \
+                                        arg6, \
+                                        arg7, \
+                                        arg8) \
+   TBOX_DIM_ASSERT(                                                     \
+   (dim).isValid() &&                                                \
+   ((dim) == (arg1).getDim()) &&                                     \
+   ((dim) == (arg2).getDim()) &&                                     \
+   ((dim) == (arg3).getDim()) &&                                     \
+   ((dim) == (arg4).getDim()) &&                                     \
+   ((dim) == (arg5).getDim()) &&                                     \
+   ((dim) == (arg6).getDim()) &&                                     \
+   ((dim) == (arg7).getDim()) &&                                     \
+   ((dim) == (arg8).getDim())                                        \
+   )
+
+#ifdef DEBUG_CHECK_DIM_ASSERTIONS
+
+#define TBOX_DIM_ASSERT(EXP) \
+   do {                                       \
+      if (!(EXP)) {                                                   \
+         std::ostringstream tboxos;                                     \
+         tboxos << "Failed dimension assertion: " << # EXP << std::ends; \
+         SAMRAI::tbox::Utilities::abort(tboxos.str(), __FILE__, __LINE__); \
+      }                                                                 \
+   } while (0)
+
+#else
+
+/*
+ * No dimensional assertion checking
+ */
+#define TBOX_DIM_ASSERT(EXP)
+
+#endif
+
+/**
+ * Throw an error assertion from within any C++ source code.  This is
+ * is similar to TBOX_ERROR(), but is designed to be invoked after a
+ * call to a PETSc library function.  In other words, it acts similarly
+ * to the PETSc CHKERRQ(ierr) macro.
+ */
+#ifdef HAVE_PETSC
+
+/*
+ * In the following, "CHKERRCONTINUE(ierr);" will cause PETSc to print out
+ * a stack trace that led to the error; this may be useful for debugging.
+ */
+
+#define PETSC_SAMRAI_ERROR(ierr) \
+   do {                                           \
+      if (ierr) {                                                               \
+         std::ostringstream tboxos;                                                     \
+         SAMRAI::tbox::Utilities::abort(tboxos.str(), __FILE__, __LINE__);      \
+      }                                                                         \
+   } while (0)
+#endif
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/dox/manual.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/dox/manual.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,31 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace tbox {
+
+/*!
+  @page package_toolbox The Toolbox Package
+
+  The Toolbox package routines provide basic support for the remainder 
+  of the SAMRAI framework.  This support is divided into these categories:
+  -# @ref package_toolbox_base "basic utilities"
+  -# @ref package_toolbox_memory "memory management"
+  -# @ref package_toolbox_parallel "MPI and communication schedules"
+  -# @ref package_toolbox_stream "message and file streams"
+  -# @ref package_toolbox_database "database interface and object serialization"
+  -# @ref package_toolbox_inputdb "input file processing"
+  -# @ref package_toolbox_restartdb "restart file management"
+  -# @ref package_toolbox_timers "timer and statistics utilities"
+ 
+  All class names in the Toolbox package are in the SAMRAI::tbox namespace.
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/dox/manual_base.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/dox/manual_base.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,43 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace tbox {
+
+/*!
+  @page package_toolbox_base Base Toolbox Classes
+
+  These classes provide miscellaneous low-level functionality for
+  the SAMRAI framework.  These include complex, boolean,
+  a simple list class, IEEE floating point operation management, and 
+  parallel I/O support for generating log files and error reporting.
+
+  Historical Note: Some of these classes unnecessarily duplicate STL
+  classes.  These were created before STL was widely available.  It is
+  a goal of SAMRAI to eventually remove the unneeded classes to improve
+  interoperability with other packages.
+
+  - @ref toolbox_complex "dcomplex"
+  - SAMRAI::tbox::Dimension
+  - SAMRAI::tbox::IEEE
+  - SAMRAI::tbox::Complex
+  - SAMRAI::tbox::List
+  - SAMRAI::tbox::MathUtilities
+  - SAMRAI::tbox::PIO
+  - SAMRAI::tbox::ParallelBuffer
+  - SAMRAI::tbox::SAMRAIManager
+  - SAMRAI::tbox::ShutdownRegistry
+  - SAMRAI::tbox::Tracer
+  - SAMRAI::tbox::Utilities
+  - SAMRAI::tbox::Logger
+  - SAMRAI::tbox::BalancedDepthFirstTree
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/dox/manual_database.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/dox/manual_database.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,27 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace tbox {
+/*!
+  @page package_toolbox_database Generic Database Support
+
+  The classes in this directory provide the abstract base classes for the
+  input, restart, and visualization databases.
+  - SAMRAI::tbox::DatabaseBox
+  - SAMRAI::tbox::Database
+  - SAMRAI::tbox::DatabaseFactory
+  - SAMRAI::tbox::Serializable
+  - SAMRAI::tbox::MemoryDatabase
+  - SAMRAI::tbox::MemoryDatabaseFactory
+  - SAMRAI::tbox::NullDatabase
+ */
+
+}
+}
\ No newline at end of file
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/dox/manual_inputdb.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/dox/manual_inputdb.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace tbox {
+/*!
+  @page package_toolbox_inputdb Input Database
+
+  The input database routines provide support for a simple input capability.
+  User input files consist of a hierarchical collection of (keyword,value)
+  pairs, where the value may be either arrays or a single value of int,
+  double, complex, string, or box.
+  - SAMRAI::tbox::InputDatabase
+  - SAMRAI::tbox::InputManager
+  - SAMRAI::tbox::Parser
+ */
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/dox/manual_memory.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/dox/manual_memory.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,29 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace tbox {
+/*!
+ @page package_toolbox_memory Memory Support
+
+  These classes provide basic memory management support. Capabilities
+  include smart pointers and memory arenas for fast memory allocation
+  and deallocation.
+  - SAMRAI::tbox::Array
+  - SAMRAI::tbox::ConstPointer
+  - SAMRAI::tbox::ConstPointerBase
+  - SAMRAI::tbox::DescribedClass
+  - SAMRAI::tbox::MemoryUtilities
+  - SAMRAI::tbox::Pointer
+  - SAMRAI::tbox::PointerBase
+  - SAMRAI::tbox::ReferenceCounter
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/dox/manual_parallel.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/dox/manual_parallel.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,34 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace tbox {
+
+/*!
+  @page package_toolbox_parallel Parallel Toolbox Classes
+
+  These classes localize MPI support and provide a basic 
+  schedule/executor mechanism for parallel data communication
+  within SAMRAI.  They include a globally-accessible class for all
+  low-level MPI calls, the basic communication schedule implementation,
+  and the communication transaction abstract interface.
+
+  - SAMRAI::tbox::SAMRAI_MPI
+  - SAMRAI::tbox::Schedule
+  - SAMRAI::tbox::Transaction
+  - SAMRAI::tbox::AsyncCommGroup
+  - SAMRAI::tbox::AsyncCommStage
+  - SAMRAI::tbox::AsyncCommPeer
+  - SAMRAI::tbox::JobRelauncher
+  - SAMRAI::tbox::RelaunchableJob
+
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/dox/manual_restartdb.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/dox/manual_restartdb.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,29 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace tbox {
+
+/*!
+  @page package_toolbox_restartdb Restart Database
+
+  The restart database classes provide support for restart capabilities
+  within an application code built using SAMRAI.  Currently, restart
+  files are manipulated using the Hierarchical Data Format (HDF5).
+  The interface to HDF5 conforms to that defined by the abstract database
+  base class found in the toolbox package.
+  - SAMRAI::tbox::RestartManager
+  - SAMRAI::tbox::HDFDatabase
+  - SAMRAI::tbox::HDFDatabaseFactory
+  - SAMRAI::tbox::SiloDatabase
+  - SAMRAI::tbox::SiloDatabaseFactory
+ */
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/dox/manual_stream.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/dox/manual_stream.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,26 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace tbox {
+/*!
+  @page package_toolbox_stream Stream Toolbox Classes
+
+  These classes provide basic support for portable message and file streams,
+  and the abstract interface for all stream-based interprocessor data 
+  communication in the SAMRAI library.
+
+  - SAMRAI::tbox::MessageStream
+  - SAMRAI::tbox::FileStream
+  - SAMRAI::tbox::MessageStream
+  - SAMRAI::tbox::XDRStream
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/dox/manual_timers.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/dox/manual_timers.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,31 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace tbox {
+/*!
+  @page package_toolbox_timers Timer Classes
+
+  The timer classes provide instrumentation utilities to report 
+  execution timing and other statistics in SAMRAI routines.  User, system, 
+  and wallclock time spent in a routine can be generated.  The classes will
+  report exclusive time and a list of nested routine calls as well as
+  parallel timing information such as the maximum and summed times
+  across all processors.  Support is alos provided for generating other 
+  sorts of execution statistics in parallel.
+ 
+  - SAMRAI::tbox::Statistic
+  - SAMRAI::tbox::Statistician
+  - SAMRAI::tbox::Timer
+  - SAMRAI::tbox::TimerManager
+  - SAMRAI::tbox::Clock
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/genfiles.sh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/genfiles.sh	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,74 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   simple shell script to generate flex and bison files 
+##
+#########################################################################
+
+dir_name=`echo ${0} | sed -e 's:^\([^/]*\)$:./\1:' -e 's:/[^/]*$::'`;
+cd $dir_name
+
+#
+# Use yacc since ASCI red does not support alloca() function used by bison
+#
+
+bison -d -p yy Grammar.y
+perl grammer_fixup.pl Grammar.tab.c > Grammar.C
+perl grammer_fixup.pl Grammar.tab.h > Grammar.h
+rm Grammar.tab.c
+rm Grammar.tab.h
+
+#
+# Scanner requires flex due to input reading method with MPI
+#
+
+flex -Pyy -otemp.$$ Scanner.l
+perl scanner_fixup.pl temp.$$ > Scanner.C 
+rm temp.$$
+
+# Add some pragma's to ignore warnings from compilers for
+# machine generated code.
+cat >> temp.$$ <<-EOF 
+#ifdef __GNUC__
+#if __GNUC__ > 4 || \
+              (__GNUC__ == 4 && (__GNUC_MINOR__ > 2 || \
+                                 (__GNUC_MINOR__ == 2 && \
+                                  __GNUC_PATCHLEVEL__ > 0)))
+#pragma GCC diagnostic ignored "-Wall"
+#pragma GCC diagnostic ignored "-Wextra"
+#pragma GCC diagnostic ignored "-Wconversion"
+#endif
+#endif
+
+#ifdef __INTEL_COMPILER
+// Ignore Intel warnings about unreachable statements
+#pragma warning (disable:177)
+// Ignore Intel warnings about external declarations
+#pragma warning (disable:1419)
+// Ignore Intel warnings about type conversions
+#pragma warning (disable:810)
+// Ignore Intel remarks about non-pointer conversions
+#pragma warning (disable:2259)
+// Ignore Intel remarks about zero used for undefined preprocessor syms
+#pragma warning (disable:193)
+// Ignore Intel remarks about unreachable code
+#pragma warning (disable:111)
+#endif
+
+#ifdef __xlC__
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+EOF
+cat temp.$$ Scanner.C > temp2.$$
+mv temp2.$$ Scanner.C
+cat temp.$$ Grammar.C > temp2.$$
+mv temp2.$$ Grammar.C
+rm temp.$$
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/grammer_fixup.pl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/grammer_fixup.pl	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,47 @@
+#!/usr/bin/perl
+
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   $Description 
+##
+#########################################################################
+
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/SAMRAI/tbox/grammer_fixup.pl $
+## Package:     SAMRAI tests
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 4349 $
+## Modified:    $LastChangedDate: 2010-12-06 13:26:09 -0800 (Mon, 06 Dec 2010) $
+## Description: Code-generating script in inputdb package.
+
+while(<>) {
+    s/^#line.*//;
+    s/.*Revision:.*//;
+    s/.*Date:.*//;
+    
+    # substitution to replace [yynerrs,yychar,yylval] with SAMRAI_[yynerrs,yychar,yylval]
+    s/yynerrs/SAMRAI_yynerrs/g;
+    s/yychar/SAMRAI_yychar/g;
+    s/yylval/SAMRAI_yylval/g;
+    
+    # These fixup some warning messages coming from insure++
+
+    s/^# define YYDPRINTF\(Args\)$/# define YYDPRINTF(Args) do {} while (0)/;
+    s/^# define YYDSYMPRINT\(Args\)$/# define YYDSYMPRINT(Args) do {} while (0)/;
+    s/^# define YYDSYMPRINTF\(Title, Token, Value, Location\)$/# define YYDSYMPRINTF(Title, Token, Value, Location) do {} while (0)/;
+    s/^# define YY_STACK_PRINT\(Bottom, Top\)$/# define YY_STACK_PRINT(Bottom, Top) do {} while (0)/;
+    s/^# define YY_REDUCE_PRINT\(Rule\)$/# define YY_REDUCE_PRINT(Rule) do {} while (0)/;
+
+    s/(\s+);}/$1\}/;
+
+    # a more silent null use
+    s/\(void\) yyvaluep;/if(0) {char *temp = (char *)&yyvaluep; temp++;}/;
+
+    s/\/\* empty \*\/;//;
+
+    print $_;
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/scanner_fixup.pl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/scanner_fixup.pl	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,29 @@
+#!/usr/bin/perl
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   Script in input database package. 
+##
+#########################################################################
+
+while(<>) {
+    s/^#line.*//;
+    s/.*Revision:.*//;
+    s/.*Date:.*//;
+    s/.*Header:.*//;
+
+    # substitution to replace [yylval] with SAMRAI_[yylval]
+    s/yylval/SAMRAI_yylval/g;
+
+    s/YY_DO_BEFORE_ACTION;/YY_DO_BEFORE_ACTION/;
+    s/^(\s)+;$/$1do {} while(0);/;
+
+    s/#if YY_STACK_USED/#ifdef YY_STACK_USED/;
+    s/#if YY_ALWAYS_INTERACTIVE/#ifdef YY_ALWAYS_INTERACTIVE/;
+    s/#if YY_MAIN/#ifdef YY_MAIN/;
+
+    print $_;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/tbox/vector.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/tbox/vector.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,196 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   std 
+ *
+ ************************************************************************/
+
+#ifndef included_tbox_vector
+#define included_tbox_vector
+
+#include "SAMRAI/SAMRAI_config.h"
+#include <vector>
+
+namespace SAMRAI {
+namespace tbox {
+
+template<class TYPE>
+class Pointer;
+
+/*!
+ * Drop-in replacement for std::vector, with some SAMRAI enhancements.
+ *
+ * When compiled with debug, this class adds array bounds checking to
+ * std::vector.  This feature is intended to help catch memory bugs.
+ *
+ * This class introduces duplicate interface to every std::vector
+ * interface.  Hopefully, this trivial wrapper will get optimized
+ * out when you use compiler optimization.  However, to be absolutely
+ * sure, you may want to switch back to std::vector just in case there
+ * is a performance penalty for using this class.
+ *
+ */
+template<class TYPE>
+class vector
+{
+
+private:
+   //! @brief Non-essential shorthand.
+   typedef std::vector<TYPE> SVec;
+
+public:
+   typedef typename SVec::iterator iterator;
+   typedef typename SVec::const_iterator const_iterator;
+   typedef typename SVec::reverse_iterator reverse_iterator;
+   typedef typename SVec::const_reverse_iterator const_reverse_iterator;
+   typedef typename SVec::value_type value_type;
+   typedef typename SVec::size_type size_type;
+   typedef typename SVec::reference reference;
+   typedef typename SVec::const_reference const_reference;
+
+   vector():d_vec() {
+   }
+   vector(
+      const vector& r):d_vec(r.d_vec) {
+   }
+   vector(
+      size_type n):d_vec(n) {
+   }
+   virtual ~vector() {
+   }
+
+   //@{ @name Replication of std::vector methods.
+
+   iterator begin() {
+      return d_vec.begin();
+   }
+   iterator end() {
+      return d_vec.end();
+   }
+   const_iterator begin() const {
+      return d_vec.begin();
+   }
+   const_iterator end() const {
+      return d_vec.end();
+   }
+   reverse_iterator rbegin() {
+      return d_vec.rbegin();
+   }
+   reverse_iterator rend() {
+      return d_vec.rend();
+   }
+   const_reverse_iterator rbegin() const {
+      return d_vec.rbegin();
+   }
+   const_reverse_iterator rend() const {
+      return d_vec.rend();
+   }
+
+   iterator insert(
+      iterator i,
+      const value_type& v) {
+      return d_vec.insert(i, v);
+   }
+   void insert(
+      iterator p,
+      size_type n,
+      const TYPE& x) {
+      d_vec.insert(p, n, x);
+   }
+   template<class InputIterator>
+   void insert(
+      InputIterator i,
+      InputIterator j) {
+      d_vec.insert(i, j);
+   }
+   void erase(
+      iterator i) {
+      d_vec.erase(i);
+   }
+   size_type erase(
+      iterator& p) {
+      return d_vec.erase(p);
+   }
+   size_type erase(
+      iterator& p,
+      iterator& q) {
+      return d_vec.erase(p, q);
+   }
+
+   size_t size() const {
+      return d_vec.size();
+   }
+   bool empty() const {
+      return d_vec.empty();
+   }
+   void clear() {
+      d_vec.clear();
+   }
+   void resize(
+      size_type n,
+      const TYPE& t) {
+      d_vec.resize(n, t);
+   }
+   void reserve(
+      size_type n) {
+      d_vec.reserve(n);
+   }
+
+   vector& operator = (
+      const SVec& r) {
+      d_vec = r;
+   }
+   bool operator == (
+      const SVec& r) const {
+      return d_vec == r;
+   }
+   bool operator != (
+      const SVec& r) const {
+      return d_vec != r;
+   }
+   void swap(
+      SVec& r) {
+      d_vec.swap(r.d_vec);
+   }
+
+   operator const SVec& () const { return d_vec;
+   }
+   operator SVec& ()
+   {
+      return d_vec;
+   }
+
+   //@}
+
+   //@{ @name Enhancements of std::vector methods.
+
+   //! @brief Vector element accessor with array bound checking.
+   TYPE& operator [] (
+      size_type i) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(i <= d_vec.size() - 1);
+#endif
+      return d_vec[i];
+   }
+   //! @brief Vector element accessor with array bound checking.
+   const TYPE& operator [] (
+      size_type i) const {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(i <= d_vec.size() - 1);
+#endif
+      return d_vec[i];
+   }
+
+   //@}
+
+private:
+   SVec d_vec;
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/BoxGeometryVariableFillPattern.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/BoxGeometryVariableFillPattern.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,134 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract fill pattern class to provide interface for stencils 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_BoxGeometryVariableFillPattern_C
+#define included_xfer_BoxGeometryVariableFillPattern_C
+
+#include "SAMRAI/xfer/BoxGeometryVariableFillPattern.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+const std::string BoxGeometryVariableFillPattern::s_name_id =
+   "BOX_GEOMETRY_FILL_PATTERN";
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default contructor only sets the string name identifier               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+BoxGeometryVariableFillPattern::BoxGeometryVariableFillPattern()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Destructor                                                            *
+ *                                                                      *
+ *************************************************************************
+ */
+
+BoxGeometryVariableFillPattern::~BoxGeometryVariableFillPattern()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Calculate the overlap using the implemented calculateOverlap() method *
+ * for the destination geometry.                                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap>
+BoxGeometryVariableFillPattern::calculateOverlap(
+   const hier::BoxGeometry& dst_geometry,
+   const hier::BoxGeometry& src_geometry,
+   const hier::Box& dst_patch_box,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset) const
+{
+   NULL_USE(dst_patch_box);
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst_patch_box, src_mask, src_offset);
+   return dst_geometry.calculateOverlap(src_geometry, src_mask,
+      overwrite_interior, src_offset);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return the string name identifier.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+const std::string& BoxGeometryVariableFillPattern::getPatternName() const
+{
+   return s_name_id;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * getStencilWidth() throws an error if called.  Only overridding        *
+ * versions of this method in concrete subclasses should be called.      *
+ *                                                                       *
+ *************************************************************************
+ */
+const hier::IntVector& BoxGeometryVariableFillPattern::getStencilWidth()
+{
+   TBOX_ERROR(
+      "BoxGeometryVariableFillPattern::getStencilWidth() should not be\n"
+      << "called.  This pattern creates overlaps based on\n"
+      << "the BoxGeometry objects and is not restricted to a\n"
+      << "specific stencil.\n");
+
+   /*
+    * Dummy return value that will never get reached.
+    */
+   return hier::IntVector::getZero(tbox::Dimension(1));
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute BoxOverlap that specifies data to be filled by refinement     *
+ * operator.                                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+tbox::Pointer<hier::BoxOverlap>
+BoxGeometryVariableFillPattern::computeFillBoxesOverlap(
+   const hier::BoxList& fill_boxes,
+   const hier::Box& patch_box,
+   const hier::Box& data_box,
+   const hier::PatchDataFactory& pdf) const
+{
+   /*
+    * For this (default) case, the overlap is simply the intersection of
+    * fill_boxes and data_box.
+    */
+   hier::IntVector offset(hier::IntVector::getZero(patch_box.getDim()));
+   hier::BoxList overlap_boxes(fill_boxes);
+   overlap_boxes.intersectBoxes(data_box);
+
+   return pdf.getBoxGeometry(patch_box)->setUpOverlap(overlap_boxes, offset);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/BoxGeometryVariableFillPattern.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,134 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Default fill pattern class 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_BoxGeometryVariableFillPattern
+#define included_xfer_BoxGeometryVariableFillPattern
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/VariableFillPattern.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Class BoxGeometryVariableFillPattern is a default implementation of
+ * the abstract base class VariableFillPattern.
+ *
+ * It is used to calculate overlaps that consist of the full intersection 
+ * between source and destination patches, including all ghost regions.  If
+ * no VariableFillPattern object is provided when a refine operation is
+ * registered with a RefineAlgorithm, this class is used by default.
+ *
+ * @see xfer::RefineAlgorithm
+ */
+
+class BoxGeometryVariableFillPattern:
+   public VariableFillPattern
+{
+public:
+   /*!
+    * @brief Default constructor
+    */
+   BoxGeometryVariableFillPattern();
+
+   /*!
+    * @brief Destructor
+    */
+   virtual ~BoxGeometryVariableFillPattern();
+
+   /*!
+    * @brief Calculate overlap between the destination and source geometries
+    * using the geometries' own overlap calculation methods.
+    *
+    * The intersection between the given dst_geometry and src_geometry
+    * will be calculated according to the properties of those geometries.
+    *
+    * @param[in] dst_geometry    geometry object for destination box
+    * @param[in] src_geometry    geometry object for source box
+    * @param[in] dst_patch_box   box for the destination patch
+    * @param[in] src_mask        the source mask, the box resulting from
+    *                            shifting the source box by src_offset
+    * @param[in] overwrite_interior  controls whether or not to include the
+    *                                destination box interior in the overlap
+    * @param[in] src_offset      the offset between source and destination
+    *                            index space.  src + src_offset = dst
+    *
+    * @return                    Pointer to the calculated overlap object
+    */
+   tbox::Pointer<hier::BoxOverlap>
+   calculateOverlap(
+      const hier::BoxGeometry& dst_geometry,
+      const hier::BoxGeometry& src_geometry,
+      const hier::Box& dst_patch_box,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset) const;
+
+   /*!
+    * Computes a BoxOverlap object which defines the space to be filled by
+    * a refinement operation.  For this implementation, that space is the
+    * intersection between fill_boxes (computed by the RefineSchedule) and
+    * data_box, which specifies the extent of the destination data.  The
+    * patch data factory is used to compute the overlap with the appropriate
+    * data centering, consistent with the centering of the data to be filled.
+    *
+    * @param[in] fill_boxes  list representing the all of the space on a patch
+    *                        or its ghost region that may be filled by a
+    *                        refine operator (cell-centered representation)
+    * @param[in] patch_box   box representing the patch where a refine operator
+    *                        will fill data.  (cell-centered representation)
+    * @param[in] data box    box representing the full extent of the region
+    *                        covered by a patch data object, including all
+    *                        ghosts (cell-centered representation)
+    * @param[in] pdf         patch data factory for the data that is to be
+    *                        filled
+    */
+   tbox::Pointer<hier::BoxOverlap>
+   computeFillBoxesOverlap(
+      const hier::BoxList& fill_boxes,
+      const hier::Box& patch_box,
+      const hier::Box& data_box,
+      const hier::PatchDataFactory& pdf) const;
+
+   /*!
+    * @brief Implementation of interface to get stencil width of a
+    * VariableFillPattern.
+    *
+    * For this class BoxGeometryVariableFillPattern, this method should
+    * never be called, since overlaps are computed based on BoxGeometry
+    * objects and not on any stencil.  An error will result if this method
+    * is invoked.
+    */
+   const hier::IntVector&
+   getStencilWidth();
+
+   /*!
+    * @brief Returns a string name identifier "BOX_GEOMETRY_FILL_PATTERN".
+    */
+   const std::string&
+   getPatternName() const;
+
+private:
+   BoxGeometryVariableFillPattern(
+      const BoxGeometryVariableFillPattern&);    // not implemented
+   void
+   operator = (
+      const BoxGeometryVariableFillPattern&);    // not implemented
+
+   /*!
+    * Static string containing string name identifier for this class
+    */
+   static const std::string s_name_id;
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/CoarsenAlgorithm.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/CoarsenAlgorithm.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,218 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Coarsening algorithm for data transfer between AMR levels 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_CoarsenAlgorithm_C
+#define included_xfer_CoarsenAlgorithm_C
+
+#include "SAMRAI/xfer/CoarsenAlgorithm.h"
+
+#include "SAMRAI/xfer/StandardCoarsenTransactionFactory.h"
+#include "SAMRAI/hier/PatchDataFactory.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The constructor creates a new CoarsenClasses object             *
+ * and caches a boolean indiating whether to copy data to the            *
+ * destination space on the coarse level before coarsening.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+CoarsenAlgorithm::CoarsenAlgorithm(
+   const tbox::Dimension& dim,
+   bool fill_coarse_data):
+   d_dim(dim),
+   d_coarsen_classes(new xfer::CoarsenClasses(d_fill_coarse_data)),
+   d_fill_coarse_data(fill_coarse_data),
+   d_schedule_created(false)
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * The destructor implicitly deallocates the list data.                  *
+ *									*
+ *************************************************************************
+ */
+
+CoarsenAlgorithm::~CoarsenAlgorithm()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Register a coarsening operation with the coarsening algorithm.        *
+ *									*
+ *************************************************************************
+ */
+
+void CoarsenAlgorithm::registerCoarsen(
+   const int dst,
+   const int src,
+   const tbox::Pointer<xfer::CoarsenOperator> opcoarsen,
+   const hier::IntVector& gcw_to_coarsen,
+   tbox::Pointer<VariableFillPattern> var_fill_pattern)
+{
+#ifdef DEBUG_CHECK_DIM_ASSERTIONS
+   if (!opcoarsen.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *opcoarsen);
+   }
+#endif
+
+   if (d_schedule_created) {
+      TBOX_ERROR(
+         "CoarsenAlgorithm::registerCoarsen error..."
+         << "\nCannot call registerCoarsen with this coarsen algorithm"
+         <<
+         "\nobject since it has already been used to create a coarsen schedule."
+         << std::endl);
+   }
+
+   xfer::CoarsenClasses::Data data(d_dim);
+
+   data.d_dst = dst;
+   data.d_src = src;
+   data.d_fine_bdry_reps_var = hier::VariableDatabase::getDatabase()->
+      getPatchDescriptor()->getPatchDataFactory(dst)->
+      fineBoundaryRepresentsVariable();
+   data.d_gcw_to_coarsen = gcw_to_coarsen;
+   data.d_opcoarsen = opcoarsen;
+   data.d_tag = -1;
+   if (!(var_fill_pattern.isNull())) {
+      data.d_var_fill_pattern = var_fill_pattern;
+   } else {
+      data.d_var_fill_pattern = new BoxGeometryVariableFillPattern();
+   }
+
+   d_coarsen_classes->insertEquivalenceClassItem(data);
+}
+
+void CoarsenAlgorithm::registerCoarsen(
+   const int dst,
+   const int src,
+   const tbox::Pointer<xfer::CoarsenOperator> opcoarsen,
+   tbox::Pointer<VariableFillPattern> var_fill_pattern)
+{
+   registerCoarsen(dst, src, opcoarsen,
+      hier::IntVector::getZero(d_dim), var_fill_pattern);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Create a communication schedule that will coarsen data from fine      *
+ * patch level to the coarse patch level.                                *
+ *									*
+ *************************************************************************
+ */
+
+tbox::Pointer<xfer::CoarsenSchedule>
+CoarsenAlgorithm::createSchedule(
+   tbox::Pointer<hier::PatchLevel> crse_level,
+   tbox::Pointer<hier::PatchLevel> fine_level,
+   xfer::CoarsenPatchStrategy* patch_strategy,
+   tbox::Pointer<xfer::CoarsenTransactionFactory> transaction_factory)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(d_dim, *crse_level, *fine_level);
+
+   d_schedule_created = true;
+
+   tbox::Pointer<xfer::CoarsenTransactionFactory> trans_factory =
+      transaction_factory;
+
+   if (trans_factory.isNull()) {
+      trans_factory = new xfer::StandardCoarsenTransactionFactory();
+   }
+
+   return tbox::Pointer<xfer::CoarsenSchedule>(new xfer::CoarsenSchedule(
+                                                  crse_level,
+                                                  fine_level,
+                                                  d_coarsen_classes,
+                                                  trans_factory,
+                                                  patch_strategy,
+                                                  d_fill_coarse_data));
+}
+
+/*
+ **************************************************************************
+ *                                                                        *
+ * Reconfigure coarsen schedule to perform operations in this algorithm.  *
+ *                                                                        *
+ **************************************************************************
+ */
+
+bool CoarsenAlgorithm::checkConsistency(
+   tbox::Pointer<xfer::CoarsenSchedule> schedule) const
+{
+   TBOX_ASSERT(!schedule.isNull());
+
+   return d_coarsen_classes->
+          checkConsistency(schedule->getEquivalenceClasses());
+}
+
+void CoarsenAlgorithm::resetSchedule(
+   tbox::Pointer<xfer::CoarsenSchedule> schedule) const
+{
+
+   TBOX_ASSERT(!schedule.isNull());
+
+   if (d_coarsen_classes->checkConsistency(schedule->getEquivalenceClasses())) {
+      schedule->reset(d_coarsen_classes);
+   } else {
+      TBOX_ERROR("CoarsenAlgorithm::resetSchedule error..."
+         << "\n CoarsenClasses object passed to reset routine"
+         << "\n inconsistent with that owned by existing schedule."
+         << std::endl);
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Print coarsen algorithm data to the specified output stream.		*
+ *									*
+ *************************************************************************
+ */
+
+void CoarsenAlgorithm::printClassData(
+   std::ostream& stream) const
+{
+   stream << "CoarsenAlgorithm::printClassData()" << std::endl;
+   stream << "----------------------------------------" << std::endl;
+   stream << "d_fill_coarse_data = " << d_fill_coarse_data << std::endl;
+
+   d_coarsen_classes->printClassData(stream);
+}
+
+/*
+ *************************************************************************
+ *
+ * Return the dimension
+ *
+ *************************************************************************
+ */
+
+const tbox::Dimension& CoarsenAlgorithm::getDim() const
+{
+   return d_dim;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/CoarsenAlgorithm.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/CoarsenAlgorithm.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,340 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Coarsening algorithm for data transfer between AMR levels 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_CoarsenAlgorithm
+#define included_xfer_CoarsenAlgorithm
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/CoarsenClasses.h"
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/xfer/CoarsenSchedule.h"
+#include "SAMRAI/xfer/CoarsenPatchStrategy.h"
+#include "SAMRAI/xfer/CoarsenTransactionFactory.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Class CoarsenAlgorithm encapsulates the AMR communication
+ * pattern to coarsen data from a finer level to any coarser level.
+ *
+ * Most often, data is coarsened from the interiors of source patch
+ * components on the source patch level into interiors of destination
+ * patch components on the destination level.  If the coarsening operators
+ * require ghost cells on a source component, then sufficient ghost cell
+ * storage must be provided by the source patch data component, and those
+ * ghost cells must be filled before calling the data coarsening routines.
+ *
+ * Communication algorithms generally consist of three parts: an algorithm,
+ * a schedule, and a patch strategy.  The algorithm describes the communication
+ * between patch data items but is independent of the configuration of the
+ * AMR hierarchy.  PatchData items and their associated coarsening
+ * operators are registered with the algorithm.  To generate the communication
+ * dependencies for a particular hierarchy configuration, the algorithm
+ * generates a schedule based on the current hierarchy configuration.  This
+ * schedule then performs the communication based on the registered data types
+ * and their associated operators.  User-defined coarsening operations can 
+ * be written using the interfaces in CoarsenPatchStrategy for 
+ * preprocessCoarsen() and postProcessCoarsen().
+ *
+ * The source patch data space is used during processing to store temporary
+ * data.  Thus, the user-defined coarsening operators should operate on the
+ * source space by using the patch data with those indices.
+ *
+ * It is the user's responsibility to register valid operations with the
+ * coarsen algorithm so that the data communication can occur.  In particular,
+ * communication operations (e.g., data coarsening, data copy, etc.) are
+ * performed in the order that items are registered for coarsening with
+ * a coarsen algorithm object.  Thus, order of registration must repect any
+ * dependencies among patch data communicated.  Also, users who use
+ * the preprocessCoarsen() and postProcessCoarsen() operations in the patch
+ * strategy object must make sure that all data that is needed in those
+ * operations are registered with the CoarsenAlgorithm using registerCoarsen()
+ * whether or not the data is to be coarsened.
+ *
+ * Typical usage of a coarsen algorithm to perform data coarsening
+ * on an AMR hierarchy involves four steps:
+ *
+ * <ul>
+ *    <li> Construct a coarsen algorithm object.
+ *    <li> Register coarsen operations with the coarsen algorithm.  Using the
+ *         registerCoarsen() methods(s), one provides source and destination
+ *         patch data information, as well as spatial coarsening operators
+ *         as needed.
+ *    <li> After all operations are registered with the algorithm, one
+ *         creates a communication schedule using the createSchedule()
+ *         method.  This method identifies the source (fine) and destination
+ *         (coarse) patch levels for data coarsening.  Note that when creating
+ *         a communication schedule, a concrete instance of a
+ *         CoarsenPatchStrategy object may be required to supply
+ *         user-defined spatial data coarsening operations.
+ *    <li> Invoke the coarsenData() method in the communication schedule to
+ *         perform the data transfers.
+ *
+ * Note that each coarsen schedule created by a coarsen algorithm remains valid
+ * as long as the levels involved in the communication process do not change;
+ * thus, they can be used for multiple data communication cycles.
+ *
+ * @see xfer::CoarsenSchedule
+ * @see xfer::CoarsenPatchStrategy
+ * @see xfer::CoarsenClasses
+ */
+
+class CoarsenAlgorithm:public tbox::DescribedClass
+{
+public:
+   /*!
+    * @brief Construct a coarsening algorithm and initialize its basic state.
+    *
+    * Coarsening operations must be registered with this algorithm
+    * before it can do anything useful.  See the registerCoarsen() routine
+    * for details
+    *
+    * @param[in] dim  Dimension
+    * @param[in] fill_coarse_data  boolean flag indicating whether pre-existing
+    *                              coarse level data is needed for the data
+    *                              coarsening operations.  By default this
+    *                              argument is false.  If a true value is
+    *                              value is provided, then source data will be
+    *                              filled on a temporary coarse patch level
+    *                              (copied from the actual coarse level source
+    *                              data) for use in coarsening operations
+    *                              registered with this algorithm.  This option
+    *                              should only be used by those who
+    *                              specifically require this behavior and who
+    *                              know how to properly process the patch
+    *                              data on coarse and fine patch levels during
+    *                              the coarsening process.
+    */
+   explicit CoarsenAlgorithm(
+      const tbox::Dimension& dim,
+      bool fill_coarse_data = false);
+
+   /*!
+    * @brief The virtual destructor releases all internal storage.
+    */
+   virtual ~CoarsenAlgorithm();
+
+   /*!
+    * @brief Register a coarsening operation with the coarsening algorithm.
+    *
+    * Data from the interiors of the source component on a source (fine) patch
+    * level will be coarsened into the source component of a temporary (coarse) 
+    * patch level and then copied into the destination component on the
+    * destination (coarse) patch level.  If the coarsening operator requires
+    * data in ghost cells outside of the patch interiors (i.e., a non-zero
+    * stencil width), then those ghost cells must exist in the source patch
+    * data component and the ghost cells must be filled with valid data on the
+    * source level before a call to invoke the communication schedule.  Note
+    * that the source and destination components may be the same.
+    *
+    * Some special circumstances require that data be coarsened from the
+    * ghost cell regions of a finer level and the resulting coarsened data
+    * should be copied to the destination patch level.  When this is the case,
+    * the optional integer vector argument should be set to the cell width, in
+    * the destination (coarser) level index space, of the region around the
+    * fine level where this coarsening should occur.  For example, if the
+    * coarser level needs data in a region two (coarse) cells wide around the
+    * boundary of the finer level, then the gcw_to_coarsen should be set to a
+    * vector with all entries set to two.  Moreover, if the ratio
+    * between coarse and fine levels is four in this case, then the source
+    * patch data is required to have at least eight ghost cells.
+    *
+    * @param[in] dst       Patch data index filled on destination level.
+    * @param[in] src       Patch data index coarsened from the source level.
+    * @param[in] opcoarsen Coarsening operator.  This may be a null pointer.
+    *                  If null, coarsening must be handled by the coarsen
+    *                  patch strategy member functions.  See the comments for
+    *                  CoarsenPatchStrategy::preprocessCoarsen() and
+    *                  CoarsenPatchStrategy::postprocessCoarsen().
+    * @param[in] gcw_to_coarsen Ghost cell width to be used when data should 
+    *                           be coarsened from ghost cell regions of the
+    *                           source (finer) level into the destination
+    *                           (coarser) level. If coarsening from fine ghost
+    *                           cell regions is not desired, then it should be
+    *                           a zero IntVector.  If this argument is nonzero,
+    *                           its value should be the cell width, in the
+    *                           destination (coarser) index space, of the
+    *                           region around the fine level where this
+    *                           coarsening should occur.  This argument should
+    *                           only be made nonzero by those who specifically
+    *                           require this special behavior and know how to
+    *                           properly process the patch data on coarse and
+    *                           fine patch levels during the coarsening
+    *                           process.
+    * @param[in] var_fill_pattern Pointer to the variable fill pattern, which
+    *                             controls how box overlaps are constructed.
+    *                             If the NULL default is used, then class
+    *                             BoxGeometryVariableFillPattern will be used
+    *                             internally.
+    */
+   void
+   registerCoarsen(
+      const int dst,
+      const int src,
+      const tbox::Pointer<xfer::CoarsenOperator> opcoarsen,
+      const hier::IntVector& gcw_to_coarsen,
+      tbox::Pointer<VariableFillPattern> var_fill_pattern =
+         (tbox::Pointer<BoxGeometryVariableFillPattern>)NULL);
+
+   /*!
+    * @brief Register a coarsening operation with the coarsening algorithm.
+    *
+    * This will do all of the same things as the above registerCoarsen(),
+    * except it does not have the gcw_to_coarsen parameter.
+    */ 
+   void
+   registerCoarsen(
+      const int dst,
+      const int src,
+      const tbox::Pointer<xfer::CoarsenOperator> opcoarsen,
+      tbox::Pointer<VariableFillPattern> var_fill_pattern =
+         (tbox::Pointer<BoxGeometryVariableFillPattern>)NULL);
+
+   /*!
+    * @brief Create a communication schedule to coarsen data from the given
+    * fine patch level to the given coarse patch level.
+    *
+    * This communication schedule may then be executed to perform
+    * the data transfers.  This schedule creation procedure assumes that
+    * the coarse level represents a region of coarser index space than the
+    * fine level.  To avoid potentially erroneous behavior, the coarse level
+    * domain should cover the domain of the fine level.
+    *
+    * Neither patch level can be null and when assertion checking is active,
+    * passing a null level pointer will produce an unrecoverable assertion.
+    *
+    * Note that the schedule remains valid as long as the levels do not
+    * change; thus, it can be used for multiple data communication cycles.
+    *
+    * @return Pointer to coarsen schedule that performs the data transfers.
+    *
+    * @param[in] crse_level     Pointer to coarse (destination) level.
+    * @param[in] fine_level     Pointer to fine (source) level.
+    * @param[in] patch_strategy Pointer to a coarsen patch strategy that
+    *                           provides user-defined coarsen operations.  If
+    *                           this patch strategy is null (default state),
+    *                           then no user-defined coarsen operations will be
+    *                           performed.
+    * @param[in] transaction_factory Optional Pointer to a coarsen transaction
+    *                                factory that creates data transactions for
+    *                                the schedule.  If this pointer is null
+    *                                default state), then a
+    *                                StandardCoarsenTransactionFactory object
+    *                                will be used.
+    */
+   tbox::Pointer<xfer::CoarsenSchedule>
+   createSchedule(
+      tbox::Pointer<hier::PatchLevel> crse_level,
+      tbox::Pointer<hier::PatchLevel> fine_level,
+      xfer::CoarsenPatchStrategy* patch_strategy =
+         ((xfer::CoarsenPatchStrategy *)NULL),
+      tbox::Pointer<xfer::CoarsenTransactionFactory> transaction_factory =
+         tbox::Pointer<xfer::CoarsenTransactionFactory>(NULL));
+
+   /*!
+    * @brief Given a previously-generated coarsen schedule, check for
+    * consistency with this coarsen algorithm object to see whether a call to
+    * resetSchedule is a valid operation.
+    *
+    * Consistency means that the number of operations registered must be the
+    * same and the source and destination patch data items and operators must
+    * have identical characteristics (i.e., data centering, ghost cell widths,
+    * stencil requirements, etc.).  However, the specific source, destination
+    * patch data ids and operators can be different.
+    *
+    * @return true if schedule reset is valid; false otherwise.
+    *
+    * @param[in] schedule  Pointer to coarsen schedule, which cannot be null.
+    */
+   bool
+   checkConsistency(
+      tbox::Pointer<xfer::CoarsenSchedule> schedule) const;
+
+   /*!
+    * @brief Given a previously-generated coarsen schedule, reconfigure it to
+    * peform the communication operations registered with this coarsen
+    * algorithm object.
+    *
+    * That is, the schedule will be transformed so that it will function as
+    * though this coarsen algorithm created it.  Note that the set of
+    * operations registered with this coarsen algorithm must be essentially
+    * the same as those registered with the coarsen algorithm that created the
+    * schedule originally, and this is enforced using a call to
+    * checkConsistency().
+    *
+    * @param[in,out] schedule  Pointer to coarsen schedule, which cannot be
+    *                          null.
+    */
+   void
+   resetSchedule(
+      tbox::Pointer<xfer::CoarsenSchedule> schedule) const;
+
+   /*!
+    * @brief Print the coarsen algorithm state to the specified data stream.
+    *
+    * @param[out] stream Output data stream.
+    */
+   virtual void
+   printClassData(
+      std::ostream& stream) const;
+
+   /*!
+    * @brief Return the dimension of this object.
+    */
+   const tbox::Dimension&
+   getDim() const;
+
+private:
+   CoarsenAlgorithm(
+      const CoarsenAlgorithm&);               // not implemented
+   void
+   operator = (
+      const CoarsenAlgorithm&);                   // not implemented
+
+   //! @brief Shorthand typedef.
+   typedef hier::MappedBox MBox;
+   //! @brief Shorthand typedef.
+   typedef hier::MappedBoxLevel MappedBoxLevel;
+   //! @brief Shorthand typedef.
+   typedef hier::Connector Edges;
+   //! @brief Shorthand typedef.
+   typedef hier::Connector::NeighborSet NeighborSet;
+
+   /*!
+    * @brief Dimension of the object.
+    */
+   const tbox::Dimension d_dim;
+
+   /*!
+    * CoarsenClasses object holds all of the registered coarsen items.
+    */
+   tbox::Pointer<xfer::CoarsenClasses> d_coarsen_classes;
+
+   /*!
+    * Tells if special behavior to pre-fill the temporary coarse level with
+    * existing coarse data values is turned on.
+    */
+   bool d_fill_coarse_data;
+
+   /*!
+    * Tells if any schedule has yet been created using this object.
+    */
+   bool d_schedule_created;
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/CoarsenClasses.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/CoarsenClasses.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,563 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Simple structure for managing coarsening data in equivalence classes. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_CoarsenClasses_C
+#define included_xfer_CoarsenClasses_C
+
+#include "SAMRAI/xfer/CoarsenClasses.h"
+
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/PatchDataFactory.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/xfer/CoarsenClasses.I"
+#endif
+
+#include <typeinfo>
+
+namespace SAMRAI {
+namespace xfer {
+
+int CoarsenClasses::s_default_coarsen_item_array_size = 20;
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor sets boolean for filling coarse data and creates new      *
+ * array of equivalence classes.                                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+CoarsenClasses::CoarsenClasses(
+   bool fill_coarse_data):
+   d_fill_coarse_data(fill_coarse_data),
+   d_num_coarsen_items(0)
+{
+   d_coarsen_classes_data_items.resizeArray(
+      s_default_coarsen_item_array_size,
+      Data(tbox::Dimension::getInvalidDimension()));
+}
+
+/*
+ *************************************************************************
+ *									*
+ * The destructor implicitly deletes the item storage associated with	*
+ * the equivalence classes (and also the coarsen algorithm).		*
+ *									*
+ *************************************************************************
+ */
+
+CoarsenClasses::~CoarsenClasses()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return representative item for given equivalence class (first in list)*
+ *                                                                       *
+ *************************************************************************
+ */
+
+const CoarsenClasses::Data&
+CoarsenClasses::getClassRepresentative(
+   int equiv_class_id) const
+{
+   TBOX_ASSERT((equiv_class_id >= 0) &&
+      (equiv_class_id < (int)d_equivalence_class_ids.size()));
+
+   return d_coarsen_classes_data_items[
+             d_equivalence_class_ids[equiv_class_id].getFirstItem()];
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return iterator for list of coarsen items for given equivalence class  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::List<int>::Iterator
+CoarsenClasses::getIterator(
+   int equiv_class_id)
+{
+   TBOX_ASSERT((equiv_class_id >= 0) &&
+      (equiv_class_id < d_equivalence_class_ids.size()));
+   return tbox::List<int>::
+          Iterator(d_equivalence_class_ids[equiv_class_id]);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Insert a data item into the coarsen data list for the proper          *
+ * equivalence class in sorted order by ascending operator priority.     *
+ *									*
+ *************************************************************************
+ */
+
+void CoarsenClasses::insertEquivalenceClassItem(
+   CoarsenClasses::Data& data,
+   tbox::Pointer<hier::PatchDescriptor> descriptor)
+{
+
+   if (!checkCoarsenItem(data, descriptor)) {
+      tbox::perr << "Bad coarsen class data passed to "
+                 << "CoarsenClasses::insertEquivalenceClassItem\n";
+      printCoarsenItem(tbox::perr, data);
+      TBOX_ERROR("Check entries..." << std::endl);
+   } else {
+
+      int eq_index = getEquivalenceClassIndex(data, descriptor);
+
+      if (eq_index < 0) {
+         eq_index = d_equivalence_class_ids.size();
+         d_equivalence_class_ids.resizeArray(eq_index + 1);
+      }
+
+      data.d_class_id = eq_index;
+
+      if (d_num_coarsen_items >= d_coarsen_classes_data_items.size()) {
+         d_coarsen_classes_data_items.resizeArray(
+            d_num_coarsen_items + s_default_coarsen_item_array_size,
+            Data(data.d_gcw_to_coarsen.getDim()));
+      }
+
+      d_coarsen_classes_data_items[d_num_coarsen_items] = data;
+
+      d_equivalence_class_ids[eq_index].appendItem(d_num_coarsen_items);
+
+      d_num_coarsen_items++;
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Check for valid patch data ids, patch data types, and that source and *
+ * destination data entries have sufficient ghost cells to satisfy the   *
+ * coarsen operator and necessary copy operations.  If so, return true;  *
+ * else return false.  A descriptive error message is sent to TBOX_ERROR *
+ * when a problem appears.  If a null patch descriptor argument is       *
+ * passed, the descriptor associated with the variable database          *
+ * Singleton object will be used.                                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool CoarsenClasses::checkCoarsenItem(
+   const CoarsenClasses::Data& data_item,
+   tbox::Pointer<hier::PatchDescriptor> descriptor) const
+{
+
+   bool item_good = true;
+
+   tbox::Pointer<hier::PatchDescriptor> pd = descriptor;
+   if (pd.isNull()) {
+      pd = hier::VariableDatabase::getDatabase()->getPatchDescriptor();
+   }
+
+   const int dst_id = data_item.d_dst;
+   const int src_id = data_item.d_src;
+
+   if (dst_id < 0) {
+      item_good = false;
+      TBOX_ERROR("Bad data given to CoarsenClasses...\n"
+         << "`Destination' patch data id invalid (< 0!)" << std::endl);
+   }
+   if (item_good && (src_id < 0)) {
+      item_good = false;
+      TBOX_ERROR("Bad data given to CoarsenClasses...\n"
+         << "`Source' patch data id invalid (< 0!)" << std::endl);
+   }
+
+   tbox::Pointer<hier::PatchDataFactory> dfact =
+      pd->getPatchDataFactory(dst_id);
+   tbox::Pointer<hier::PatchDataFactory> sfact =
+      pd->getPatchDataFactory(src_id);
+
+   if (item_good && !(sfact->validCopyTo(dfact))) {
+      item_good = false;
+      TBOX_ERROR("Bad data given to CoarsenClasses...\n"
+         << "It is not a valid operation to copy from `Source' patch data \n"
+         << pd->mapIndexToName(src_id) << " to `Destination' patch data "
+         << pd->mapIndexToName(dst_id) << std::endl);
+   }
+
+   tbox::Pointer<CoarsenOperator> coarsop = data_item.d_opcoarsen;
+   if (item_good && !coarsop.isNull()) {
+      if (coarsop->getStencilWidth() > sfact->getGhostCellWidth()) {
+         item_good = false;
+         TBOX_ERROR("Bad data given to CoarsenClasses...\n"
+            << "Coarsen operator " << coarsop->getOperatorName()
+            << "\nhas larger stencil width than ghost cell width"
+            << "of `Source' patch data" << pd->mapIndexToName(src_id)
+            << "\noperator stencil width = " << coarsop->getStencilWidth()
+            << "\n`Source'  ghost width = "
+            << sfact->getGhostCellWidth()
+            << std::endl);
+      }
+   }
+
+   return item_good;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compare coarsen data items in this coarsen classes object against     *
+ * those in the argument coarsen classes object.  Return true if they    *
+ * all match with regard to the patch data types, patch data ghost cell  *
+ * widths, operator stencils, etc. that they refer to and return false   *
+ * otherwise.  If a null patch descriptor argument is passed, the        *
+ * descriptor associated with the variable database Singleton object     *
+ * will be used.                                                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool CoarsenClasses::checkConsistency(
+   tbox::Pointer<CoarsenClasses> test_classes,
+   tbox::Pointer<hier::PatchDescriptor> descriptor) const
+{
+
+   bool items_match = true;
+
+   tbox::Pointer<hier::PatchDescriptor> pd = descriptor;
+   if (pd.isNull()) {
+      pd = hier::VariableDatabase::getDatabase()->getPatchDescriptor();
+   }
+
+   if (d_equivalence_class_ids.size() !=
+       test_classes->d_equivalence_class_ids.size()) {
+
+      items_match = false;
+
+   } else {
+
+      int num_equiv_classes = d_equivalence_class_ids.size();
+      int eq_index = 0;
+      while (items_match && eq_index < num_equiv_classes) {
+
+         if (d_equivalence_class_ids[eq_index].size() !=
+             test_classes->
+             d_equivalence_class_ids[eq_index].size()) {
+
+            items_match = false;
+
+         } else {
+
+            tbox::List<int>::Iterator myli(d_equivalence_class_ids[eq_index]);
+            tbox::List<int>::Iterator testli(d_equivalence_class_ids[eq_index]);
+            while (items_match && myli) {
+
+               const CoarsenClasses::Data& myli_item =
+                  d_coarsen_classes_data_items[myli()];
+               const CoarsenClasses::Data& testli_item =
+                  d_coarsen_classes_data_items[testli()];
+
+               items_match = checkPatchDataItemConsistency(
+                     myli_item.d_dst, testli_item.d_dst, pd);
+
+               if (items_match) {
+                  items_match = checkPatchDataItemConsistency(
+                        myli_item.d_src, testli_item.d_src, pd);
+               }
+
+               if (items_match) {
+                  items_match = (myli_item.d_fine_bdry_reps_var ==
+                                 testli_item.d_fine_bdry_reps_var);
+               }
+
+               if (items_match) {
+                  items_match = (myli_item.d_gcw_to_coarsen ==
+                                 testli_item.d_gcw_to_coarsen);
+               }
+
+               if (items_match) {
+                  items_match = (!myli_item.d_opcoarsen.isNull() ==
+                                 !testli_item.d_opcoarsen.isNull());
+                  if (items_match && !myli_item.d_opcoarsen.isNull()) {
+                     items_match =
+                        (myli_item.d_opcoarsen->getStencilWidth() ==
+                         testli_item.d_opcoarsen->getStencilWidth());
+                  }
+               }
+
+               if (items_match) {
+                  items_match = (!myli_item.d_var_fill_pattern.isNull() ==
+                                 !testli_item.d_var_fill_pattern.isNull());
+                  if (items_match && !myli_item.d_var_fill_pattern.isNull()) {
+                     items_match = (typeid(*(myli_item.d_var_fill_pattern)) ==
+                                    typeid(*(testli_item.d_var_fill_pattern)));
+                  }
+               }
+
+               myli++;
+               testli++;
+
+            } // while items in equivalence class match
+
+         } // if number of items in equivalence class match
+
+         eq_index++;
+
+      } // while equivalence classes match
+
+   } // else number of equivalence classes do not match
+
+   return items_match;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private member function to determine whether two patch data items     *
+ * are consistent.                                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool CoarsenClasses::checkPatchDataItemConsistency(
+   int item_id1,
+   int item_id2,
+   tbox::Pointer<hier::PatchDescriptor> pd) const
+{
+
+   bool items_match = ((item_id1 >= 0) && (item_id2 >= 0));
+
+   if (items_match) {
+
+      tbox::Pointer<hier::PatchDataFactory> pdf1 =
+         pd->getPatchDataFactory(item_id1);
+      tbox::Pointer<hier::PatchDataFactory> pdf2 =
+         pd->getPatchDataFactory(item_id2);
+
+      items_match = (typeid(*pdf1) == typeid(*pdf2));
+
+      if (items_match) {
+         items_match = (pdf1->getGhostCellWidth() ==
+                        pdf2->getGhostCellWidth());
+      }
+
+   }
+
+   return items_match;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private member function to determine equivalence class for            *
+ * given data item.  Return value of -1 indicates no match found; else   *
+ * return value is index of match.                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int CoarsenClasses::getEquivalenceClassIndex(
+   const CoarsenClasses::Data& data,
+   tbox::Pointer<hier::PatchDescriptor> descriptor) const
+{
+
+   int eq_index = -1;
+
+   tbox::Pointer<hier::PatchDescriptor> pd = descriptor;
+   if (pd.isNull()) {
+      pd = hier::VariableDatabase::getDatabase()->getPatchDescriptor();
+   }
+
+   int dst_id = data.d_dst;
+   int src_id = data.d_src;
+
+   tbox::Pointer<hier::PatchDataFactory> dst_pdf =
+      pd->getPatchDataFactory(dst_id);
+   tbox::Pointer<hier::PatchDataFactory> src_pdf =
+      pd->getPatchDataFactory(src_id);
+
+   hier::IntVector dst_ghosts = dst_pdf->getGhostCellWidth();
+   hier::IntVector src_ghosts = src_pdf->getGhostCellWidth();
+
+   int num_equiv_classes = d_equivalence_class_ids.size();
+   bool equiv_found = false;
+   int nl = 0;
+   while (!equiv_found && nl < num_equiv_classes) {
+
+      bool dst_equiv = false;
+      bool src_equiv = false;
+
+      const CoarsenClasses::Data& class_rep = getClassRepresentative(nl);
+
+      int rep_dst_id = class_rep.d_dst;
+      tbox::Pointer<hier::PatchDataFactory> rep_dst_pdf =
+         pd->getPatchDataFactory(rep_dst_id);
+      hier::IntVector rep_dst_ghosts =
+         rep_dst_pdf->getGhostCellWidth();
+
+      /*
+       * Check if destinations are equivalent
+       */
+      if ((dst_ghosts == rep_dst_ghosts) &&
+          (typeid(*dst_pdf) == typeid(*rep_dst_pdf))) {
+         dst_equiv = true;
+      }
+
+      /*
+       * If src_id and dst_id are the same, there is nothing more to check.
+       * Otherwise, if destinations were equivalent, check if sources
+       * are equivalent.
+       */
+      if (dst_id == src_id) {
+         src_equiv = dst_equiv;
+      } else if (dst_equiv) {
+         int rep_src_id = class_rep.d_src;
+         tbox::Pointer<hier::PatchDataFactory> rep_src_pdf =
+            pd->getPatchDataFactory(rep_src_id);
+         hier::IntVector rep_src_ghosts =
+            rep_src_pdf->getGhostCellWidth();
+         if ((src_ghosts == rep_src_ghosts) &&
+             (typeid(*src_pdf) == typeid(*rep_src_pdf))) {
+            src_equiv = true;
+         }
+      }
+
+      /*
+       * Check if fill patterns are the same.
+       */
+      bool fill_patterns_same = false;
+      if (dst_equiv && src_equiv) {
+         fill_patterns_same =
+            (data.d_var_fill_pattern->getPatternName() ==
+             class_rep.d_var_fill_pattern->getPatternName());
+      }
+
+      /*
+       * If destinations and sources are both equivalent, exit loop
+       * and set return value to identify current equivalence class id.
+       */
+      if (dst_equiv && src_equiv && fill_patterns_same) {
+         eq_index = nl;
+         equiv_found = true;
+      }
+
+      nl++;
+
+   }
+
+   return eq_index;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return the number of items in the specified equivalence class.        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int CoarsenClasses::getNumberOfItemsInEquivalenceClass(
+   int equiv_class_id) const
+{
+   return d_equivalence_class_ids[equiv_class_id].size();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Increase the data items array to the specified size.                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CoarsenClasses::increaseCoarsenItemArraySize(
+   const int size,
+   const tbox::Dimension& dim)
+{
+   if (size > d_coarsen_classes_data_items.size()) {
+      d_coarsen_classes_data_items.resizeArray(size, Data(dim));
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Print the data in the coarsen item lists to the specified stream.     *
+ *									*
+ *************************************************************************
+ */
+
+void CoarsenClasses::printClassData(
+   std::ostream& stream) const
+{
+   stream << "CoarsenClasses::printClassData()\n";
+   stream << "--------------------------------------\n";
+   for (int i = 0; i < (int)d_equivalence_class_ids.size(); i++) {
+      stream << "EQUIVALENCE CLASS # " << i << std::endl;
+      int j = 0;
+      for (tbox::List<int>::Iterator
+           li(d_equivalence_class_ids[i]); li; li++) {
+
+         stream << "Item # " << j << std::endl;
+         stream << "-----------------------------\n";
+
+         printCoarsenItem(stream, d_coarsen_classes_data_items[li()]);
+
+         j++;
+      }
+      stream << std::endl;
+   }
+
+}
+
+void CoarsenClasses::printCoarsenItem(
+   std::ostream& stream,
+   const CoarsenClasses::Data& data) const
+{
+   stream << "\n";
+   stream << "desination component:   "
+          << data.d_dst << std::endl;
+   stream << "source component:       "
+          << data.d_src << std::endl;
+   stream << "fine boundary represents variable:       "
+          << data.d_fine_bdry_reps_var << std::endl;
+   stream << "gcw to coarsen:       "
+          << data.d_gcw_to_coarsen << std::endl;
+   stream << "tag:       "
+          << data.d_tag << std::endl;
+
+   if (data.d_opcoarsen.isNull()) {
+      stream << "NULL coarsening operator" << std::endl;
+   } else {
+      stream << "coarsen operator name:          "
+             << typeid(*data.d_opcoarsen).name()
+             << std::endl;
+      stream << "operator priority:      "
+             << data.d_opcoarsen->getOperatorPriority()
+             << std::endl;
+      stream << "operator stencil width: "
+             << data.d_opcoarsen->getStencilWidth()
+             << std::endl;
+   }
+   stream << std::endl;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/CoarsenClasses.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/CoarsenClasses.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,40 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Simple structure for managing coarsening data in equivalence classes. 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace xfer {
+
+SAMRAI_INLINE_KEYWORD
+int CoarsenClasses::getNumberOfCoarsenItems() const
+{
+   return d_num_coarsen_items;
+}
+
+SAMRAI_INLINE_KEYWORD
+CoarsenClasses::Data& CoarsenClasses::getCoarsenItem(
+   const int coarsen_items_array_id)
+{
+   return d_coarsen_classes_data_items[coarsen_items_array_id];
+}
+
+SAMRAI_INLINE_KEYWORD
+int CoarsenClasses::getNumberOfEquivalenceClasses() const
+{
+   return d_equivalence_class_ids.size();
+}
+
+SAMRAI_INLINE_KEYWORD
+int CoarsenClasses::getCoarsenItemArraySize() const
+{
+   return d_coarsen_classes_data_items.size();
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/CoarsenClasses.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/CoarsenClasses.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,429 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Simple structure for managing coarsening data in equivalence classes. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_CoarsenClasses
+#define included_xfer_CoarsenClasses
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/List.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/xfer/VariableFillPattern.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Maintain a collection of coarsen items and organize them
+ * into equivalence classes.
+ * 
+ * CoarsenClasses is used by the CoarsenSchedule and CoarsenAlgorithm
+ * lasses to manage a set of coarsening data items that describe
+ * coarsening of patch data between two levels in an AMR hierarchy.
+ * Specifically, this class organizes these items into equivalence clases, so
+ * that items are grouped together if they are considered equivalent.
+ *
+ * Two items are equivalent if all of the following are true:
+ * <ul>
+ *   <li> The referenced patch data type for the source component
+ *        is the same for both items.
+ *   <li> The referenced patch data type for the destination component
+ *        is the same for both items.
+ *   <li> The ghost cell width of the source patch data is the same
+ *        for both items.
+ *   <li> The ghost cell width of the destination patch data is the same
+ *        for both items.
+ *   <li> They have the same VariableFillPattern
+ * </ul>
+ */
+
+class CoarsenClasses:public tbox::DescribedClass
+{
+public:
+   /*!
+    * @brief Nested class used to describe a coarsening operation
+    * between patch data components on an AMR hierarchy.
+    */
+   class Data
+   {
+public:
+      /*!
+       * @brief Destination patch data component
+       */
+      int d_dst;
+
+      /*!
+       * @brief Source patch data component
+       */
+      int d_src;
+
+      /*!
+       * @brief Boolean flag that is set to true when it is desired that fine
+       * data values have priority over coarse data values when data exists
+       * at the same location in the mesh on levels with different resolutions.
+       */
+      bool d_fine_bdry_reps_var;
+
+      /*!
+       * If the coarsen operation requires data to be coarsened from the fine
+       * level's ghost regions onto the coarse data representing the same
+       * mesh space, then this IntVector tells how wide the ghost region to
+       * coarsen will be.  It is represented in terms of the coarse level's
+       * index space.
+       */
+      hier::IntVector d_gcw_to_coarsen;
+
+      /*!
+       * @brief Coarsening operator.
+       */
+      tbox::Pointer<xfer::CoarsenOperator> d_opcoarsen;
+
+      /*!
+       * @brief Identifier of equivalence class where this item belongs.  All
+       * items of the same equivalence class will have the same value.
+       */
+      int d_class_id;
+
+      /*!
+       * @brief An array index telling where this item sits in an array of
+       * coarsen items.
+       */
+      int d_tag;
+
+      /*!
+       * @brief VariableFillPattern that can restrict the stencil of the data
+       * coarsened by the CoarsenSchedule.
+       */
+      tbox::Pointer<VariableFillPattern> d_var_fill_pattern;
+
+      /*!
+       * @brief Constructor.
+       *
+       * @param[in] dim Dimension.
+       */
+      explicit Data(
+         tbox::Dimension dim):
+         d_gcw_to_coarsen(dim) {
+      }
+
+private:
+      Data();  //not implemented 
+   };
+
+   /*!
+    * @brief The constructor creates an empty array of coarsen classes.
+    *
+    * @deprecated fill_coarse_data is no longer used.
+    */
+   explicit CoarsenClasses(
+      bool fill_coarse_data);
+
+   /*!
+    * @brief The virtual destructor destroys the coarsen data items owned
+    * by this object.
+    */
+   virtual ~CoarsenClasses();
+
+   /*!
+    * Return number of equivalence classes maintained by this object.
+    */
+   int
+   getNumberOfEquivalenceClasses() const;
+
+   /*!
+    * @brief Return total number of coarsen items that have been registered
+    * and stored in the CoarsenClasses object
+    */
+   int
+   getNumberOfCoarsenItems() const;
+
+   /*!
+    * @brief Return number of coarsen data items in the equivalence class
+    * represented by the given integer identifier.
+    *
+    * @param[in] equiv_class_id
+    */
+   int
+   getNumberOfItemsInEquivalenceClass(
+      int equiv_class_id) const;
+
+   /*!
+    * @brief Get a representative item for a given equivalence class.
+    *
+    * When assertion checking is active, the id will be checked for validity.
+    *
+    * @return Given an id indicating a specific equivalence class, one item
+    * from that class is returned, to represent the characteristics of the
+    * equivalence class.
+    *
+    * @param[in] equiv_class_id
+    */
+   const CoarsenClasses::Data&
+   getClassRepresentative(
+      int equiv_class_id) const;
+
+   /*!
+    * @brief Get a coarsen item from the array of all coarsen items held by
+    * this object.
+    *
+    * The internal storage of the coarsen items held by this class is not
+    * controlled by the user, so this method is intended for use when looping
+    * over all of the items, from 0 to getNumberOfCoarsenItems()-1, or when
+    * looping over the integers in the List obtained from getIterator().
+    *
+    * @return A coarsen item identified by an integer id.
+    *
+    * @param[in] coarsen_item_array_id
+    */
+   CoarsenClasses::Data&
+   getCoarsenItem(
+      const int coarsen_item_array_id);
+
+   /*!
+    * @brief Return an iterator for the list of array ids corresponding to the
+    * equivalence class with the given integer identifier.
+    *
+    * The number of quivalence classes can be determined via the
+    * getNumberOfEquivalenceClasses() member function.  Valid integer
+    * arguments are from 0 to getNumberOfEquivalenceClasses()-1.  When
+    * assertion checking is active, the id will be checked for validity.
+    *
+    * @note The list should not be modified through this iterator.
+    *
+    * @return The iterator iterates over a list of integers which are array
+    * ids that can be passed into getCoarsenItem().  The array ids in a
+    * single list all correspond to coarsen items in a single equivalence
+    * class.
+    *
+    * @param[in] equiv_class_id
+    */
+   tbox::List<int>::Iterator
+   getIterator(
+      int equiv_class_id);
+
+   /*!
+    * @brief Give a data item to the CoarsenClasses object, which will store
+    * it with the proper equivalence class.
+    *
+    * If the item belongs in an existing equivalence class, it will be added
+    * there, otherwise a new equivalence class will be created for this item.
+    * The internal data of the item will be changed so that it stores an
+    * integer identifier of its equivalence class.
+    *
+    * An error will occur with a descriptive message if the data item is
+    * not valid.  See checkCoarsenItem() for explanation of validity.
+    *
+    * If a null patch descriptor argument is passed (or ommitted), the
+    * descriptor associated with the variable database Singleton object will be
+    * used.
+    *
+    * @param[in,out] data
+    * @param[in] descriptor
+    */
+   void
+   insertEquivalenceClassItem(
+      CoarsenClasses::Data& data,
+      tbox::Pointer<hier::PatchDescriptor> descriptor =
+         tbox::Pointer<hier::PatchDescriptor>(NULL));
+
+   /*!
+    * Check coarsen data item for validity.
+    *
+    * A coarsen data item is invalid if any of its patch data components are
+    * negative, or if its source data does not have sufficient ghost width
+    * for the stencil of the coarsen operator. or if the data types of
+    * the source and destination data are not compatible to be copied
+    * from one to another.
+    *
+    * An error will occur with a descriptive message if the item is invalid.
+    *
+    * If a null patch descriptor argument is passed (or ommitted), the
+    * descriptor associated with the variable database Singleton object will
+    * be used.
+    *
+    * @return True if the item is valid.
+    *
+    * @param[in] data_item
+    * @param[in] descriptor
+    */
+   bool
+   checkCoarsenItem(
+      const CoarsenClasses::Data& data_item,
+      tbox::Pointer<hier::PatchDescriptor> descriptor =
+         tbox::Pointer<hier::PatchDescriptor>(NULL)) const;
+
+   /*!
+    * @brief Compare CoarsenClasses object with another CoarsenClasses object.
+    *
+    * This method checks if the equivalence classes held by the two objects
+    * match with regard to their patch data types, patch data ghost cell widths,    * operator stencils, etc.
+    *
+    * Two CoarsenClasses objects are consistent if they have the same number of
+    * equivalence classes and each corresponding equivalence class has the same
+    * characteristics as follows:
+    *
+    * <ul>
+    *    <li> Each corresponding patch data component (d_dst and d_src)
+    *         must have the same patch data type and ghost cell width.
+    *    <li> d_fine_bdry_reps_var flag must have the same value.
+    *    <li> The coarsening operators, if any, have the same stencil width.
+    *    <li> The same variable fill pattern is used.
+    * </ul>
+    *
+    * If a null patch descriptor argument is passed (or ommitted), the
+    * descriptor associated with the variable database Singleton object will
+    * be used.
+    *
+    * @return true if test_classes is consistent with this object.
+    *
+    * @param[in] test_classes  CoarsenClasses object to check for consistency
+    * @param[in] descriptor
+    */
+   bool
+   checkConsistency(
+      tbox::Pointer<CoarsenClasses> test_classes,
+      tbox::Pointer<hier::PatchDescriptor> descriptor =
+         tbox::Pointer<hier::PatchDescriptor>(NULL)) const;
+
+   /*!
+    * @brief Get the size that has been allocated for the array storing coarsen
+    * items.
+    *
+    * Note that this is not necessarily the same as the number of registered
+    * coarsen items, which can be retrieved using getNumberOfCoarsenItems().
+    * The coarsen item array is allocated to a default size and grown when
+    * necessary or when increaseCoarsenItemArraySize() is called.
+    */
+   int
+   getCoarsenItemArraySize() const;
+
+   /*!
+    * @brief Increase the allocated size of the array storing coarsen items.
+    *
+    * This should be used in cases where there is a large number of coarsen
+    * items being registered with the CoarsenAlgorithm, to avoid frequent
+    * resizing of the array.  If the size argument is less than the current
+    * allocated size of the array, then the size of the array is not changed.
+    *
+    * @param[in] size
+    */
+   void
+   increaseCoarsenItemArraySize(
+      const int size,
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Print data for all coarsen items to the specified output stream.
+    *
+    * @param[out] stream
+    */
+   virtual void
+   printClassData(
+      std::ostream& stream) const;
+
+   /*!
+    * @brief Print single coarsen item to the specified output stream.
+    *
+    * @param[out] stream
+    * @param[in] data
+    */
+   void
+   printCoarsenItem(
+      std::ostream& stream,
+      const CoarsenClasses::Data& data) const;
+
+private:
+   CoarsenClasses(
+      const CoarsenClasses&);                   // not implemented
+   void
+   operator = (
+      const CoarsenClasses&);                     // not implemented
+
+   /*!
+    * @brief Function to compare two patch data components (with given
+    * descriptor indices) for consistency.
+    *
+    * Two components are consistent if the are of the same patch data type and
+    * have the same ghost width.
+    *
+    * @return true if consistent; false otherwise.
+    *
+    * @param[in] item_id1
+    * @param[in] item_id2
+    * @param[in] pd  descriptor
+    */
+   bool
+   checkPatchDataItemConsistency(
+      int item_id1,
+      int item_id2,
+      tbox::Pointer<hier::PatchDescriptor> pd) const;
+
+   /*!
+    * @brief Function to determine the equivalence class where a coarsen data
+    * item belongs.
+    *
+    * The coarsen data item is compared to existing equivalence classes to
+    * determine if it can be a member of any of them.
+    *
+    * @return If the item matches an existing equivalence class the integer
+    * identifier for that equivalence class is returned.  Otherwise -1 is
+    * returned.
+    *
+    * @param[in] data
+    * @param[in] descriptor
+    */
+   int
+   getEquivalenceClassIndex(
+      const CoarsenClasses::Data& data,
+      tbox::Pointer<hier::PatchDescriptor> descriptor =
+         tbox::Pointer<hier::PatchDescriptor>(NULL)) const;
+
+   /*!
+    * The default length of the coarsen item array.
+    */
+   static int s_default_coarsen_item_array_size;
+
+   /*!
+    * @deprecated  No longer used
+    */
+   bool d_fill_coarse_data;
+
+   /*!
+    * The array of coarsen items.
+    */
+   tbox::Array<CoarsenClasses::Data> d_coarsen_classes_data_items;
+
+   /*!
+    * The array managing equivalence classes.  Each element of the array
+    * represents one equivalence class.  Each List holds integers identifying
+    * which items are part of an equivalence class.  The integers index into
+    * the array d_coarsen_classes_data_items.
+    */
+   tbox::Array<tbox::List<int> > d_equivalence_class_ids;
+
+   /*!
+    * The number of coarsen items that have been registered.
+    */
+   int d_num_coarsen_items;
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/xfer/CoarsenClasses.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/CoarsenCopyTransaction.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/CoarsenCopyTransaction.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,220 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Communication transaction for data copies during data coarsening 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_CoarsenCopyTransaction_C
+#define included_xfer_CoarsenCopyTransaction_C
+
+#include "SAMRAI/xfer/CoarsenCopyTransaction.h"
+
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/xfer/CoarsenClasses.h"
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace xfer {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialization, set/unset functions for static array of coarsen items.*
+ *                                                                       *
+ *************************************************************************
+ */
+
+const CoarsenClasses::Data **
+CoarsenCopyTransaction::s_coarsen_items =
+   (const CoarsenClasses::Data **)NULL;
+int CoarsenCopyTransaction::s_num_coarsen_items = 0;
+
+void CoarsenCopyTransaction::setCoarsenItems(
+   const CoarsenClasses::Data** coarsen_items,
+   int num_coarsen_items)
+{
+   TBOX_ASSERT(coarsen_items != (const CoarsenClasses::Data **)NULL);
+   TBOX_ASSERT(num_coarsen_items >= 0);
+
+   s_coarsen_items = coarsen_items;
+   s_num_coarsen_items = num_coarsen_items;
+}
+
+void CoarsenCopyTransaction::unsetCoarsenItems()
+{
+   s_coarsen_items = (const CoarsenClasses::Data **)NULL;
+   s_num_coarsen_items = 0;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor sets state of transaction.                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+CoarsenCopyTransaction::CoarsenCopyTransaction(
+   tbox::Pointer<hier::PatchLevel>& dst_level,
+   tbox::Pointer<hier::PatchLevel>& src_level,
+   tbox::Pointer<hier::BoxOverlap> overlap,
+   const hier::MappedBox& dst_mapped_box,
+   const hier::MappedBox& src_mapped_box,
+   int coarsen_item_id):
+   d_dst_patch(0),
+   d_dst_patch_rank(dst_mapped_box.getOwnerRank()),
+   d_src_patch(0),
+   d_src_patch_rank(src_mapped_box.getOwnerRank()),
+   d_overlap(overlap),
+   d_coarsen_item_id(coarsen_item_id),
+   d_incoming_bytes(0),
+   d_outgoing_bytes(0)
+{
+   TBOX_ASSERT(!dst_level.isNull());
+   TBOX_ASSERT(!src_level.isNull());
+   TBOX_ASSERT(!overlap.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst_level,
+      *src_level,
+      dst_mapped_box,
+      src_mapped_box);
+   TBOX_ASSERT(dst_mapped_box.getLocalId() >= 0);
+   TBOX_ASSERT(src_mapped_box.getLocalId() >= 0);
+   TBOX_ASSERT(coarsen_item_id >= 0);
+
+   // Note: s_num_coarsen_items cannot be used at this point!
+
+   if ( d_dst_patch_rank == dst_level->getMappedBoxLevel()->getRank() ) {
+      d_dst_patch = dst_level->getPatch( dst_mapped_box.getGlobalId() );
+   }
+   if ( d_src_patch_rank == src_level->getMappedBoxLevel()->getRank() ) {
+      d_src_patch = src_level->getPatch( src_mapped_box.getGlobalId() );
+   }
+}
+
+CoarsenCopyTransaction::~CoarsenCopyTransaction()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Functions overridden in tbox::Transaction base class.                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool CoarsenCopyTransaction::canEstimateIncomingMessageSize()
+{
+   bool can_estimate = false;
+   if ( !d_src_patch.isNull() ) {
+      can_estimate = 
+         d_src_patch->getPatchData(s_coarsen_items[d_coarsen_item_id]->d_src)
+                    ->canEstimateStreamSizeFromBox();
+   } else {
+      can_estimate = 
+         d_dst_patch->getPatchData(s_coarsen_items[d_coarsen_item_id]->d_dst)
+                    ->canEstimateStreamSizeFromBox();
+   }
+   return can_estimate;
+}
+
+size_t CoarsenCopyTransaction::computeIncomingMessageSize()
+{
+   d_incoming_bytes = 
+      d_dst_patch->getPatchData(s_coarsen_items[d_coarsen_item_id]->d_dst)
+                 ->getDataStreamSize(*d_overlap);
+   return d_incoming_bytes;
+}
+
+size_t CoarsenCopyTransaction::computeOutgoingMessageSize()
+{
+   d_outgoing_bytes =
+      d_src_patch->getPatchData(s_coarsen_items[d_coarsen_item_id]->d_src)
+                 ->getDataStreamSize(*d_overlap);
+   return d_outgoing_bytes;
+}
+
+void CoarsenCopyTransaction::packStream(
+   tbox::MessageStream& stream)
+{
+   d_src_patch->getPatchData(s_coarsen_items[d_coarsen_item_id]->d_src)
+              ->packStream(stream, *d_overlap);
+}
+
+void CoarsenCopyTransaction::unpackStream(
+   tbox::MessageStream& stream)
+{
+   d_dst_patch->getPatchData(s_coarsen_items[d_coarsen_item_id]->d_dst)
+              ->unpackStream(stream, *d_overlap);
+}
+
+void CoarsenCopyTransaction::copyLocalData()
+{
+   hier::PatchData& dst_data =
+      *d_dst_patch->getPatchData(s_coarsen_items[d_coarsen_item_id]->d_dst);
+
+   const hier::PatchData& src_data =
+      *d_src_patch->getPatchData(s_coarsen_items[d_coarsen_item_id]->d_src);
+
+   dst_data.copy(src_data, *d_overlap);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Function to print state of transaction.                               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CoarsenCopyTransaction::printClassData(
+   std::ostream& stream) const
+{
+   stream << "Coarsen Copy Transaction" << std::endl;
+   stream << "   coarsen item array:        "
+          << (CoarsenClasses::Data **)s_coarsen_items << std::endl;
+   stream << "   num coarsen items:      " << s_num_coarsen_items << std::endl;
+   stream << "   destination patch rank:       " << d_dst_patch_rank
+          << std::endl;
+   stream << "   source patch_rank:            " << d_src_patch_rank
+          << std::endl;
+   stream << "   coarsen item id:        " << d_coarsen_item_id << std::endl;
+   stream << "   destination patch data id: "
+   << s_coarsen_items[d_coarsen_item_id]->d_dst << std::endl;
+   stream << "   source patch data id:      "
+   << s_coarsen_items[d_coarsen_item_id]->d_src << std::endl;
+   stream << "   incoming bytes:         " << d_incoming_bytes << std::endl;
+   stream << "   outgoing bytes:         " << d_outgoing_bytes << std::endl;
+   stream << "   destination patch:           "
+          << (hier::Patch *)d_dst_patch << std::endl;
+   stream << "   source patch:           "
+          << (hier::Patch *)d_src_patch << std::endl;
+   stream << "   overlap:                " << std::endl;
+   d_overlap->print(stream);
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/CoarsenCopyTransaction.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/CoarsenCopyTransaction.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,186 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Communication transaction for data copies during data coarsening 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_CoarsenCopyTransaction
+#define included_xfer_CoarsenCopyTransaction
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/CoarsenClasses.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Transaction.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Class CoarsenCopyTransaction represents a single copy communication
+ * transaction between two processors or a local data copy for coaren schedules.
+ * Note that to there is an implicit hand-shaking between objects of this class
+ * and the CoarsenSchedule object that constructs them.  Following the coarsen
+ * schedule implementation, the source patch data index for a copy transaction
+ * always refers to the source data, and the destination patch data index for a copy
+ * transaction is always the destination data, all as defined in the
+ * CoarsenClasses class.
+ *
+ * @see xfer::CoarsenSchedule
+ * @see xfer::CoarsenClasses
+ * @see tbox::Schedule
+ * @see tbox::Transaction
+ */
+
+class CoarsenCopyTransaction:public tbox::Transaction
+{
+public:
+   /*!
+    * Static member function to set the array of coarsen class data items that
+    * is shared by all object instances of this copy transaction class during
+    * data transfers.  The array must be set before any transactions are executed.
+    * The array is set in the CoarsenSchedule class.
+    */
+   static void
+   setCoarsenItems(
+      const CoarsenClasses::Data** coarsen_items,
+      int num_coarsen_items);
+
+   /*!
+    * Static member function to unset the array of coarsen class data items that
+    * is shared by all object instances of this copy transaction class during
+    * data transfers.  The unset function is used to prevent erroneous execution
+    * of different schedules.  The array is unset in the CoarsenSchedule class.
+    */
+   static void
+   unsetCoarsenItems();
+
+   /*!
+    * Construct a transaction with the specified source and destination
+    * levels, patches, and patch data components found in the coarsen class
+    * item with the given id owned by the calling coarsen schedule.  In general,
+    * this constructor is called by a CoarsenSchedule object for each data
+    * transaction (not involving time interpolation) that must occur.  This
+    * transaction will be responsible for one of the following: (1) a local data
+    * copy, (2) packing a message stream with source patch data, or (3) unpacking
+    * destination patch data from a message stream.
+    *
+    * @param dst_level        tbox::Pointer to destination patch level.
+    * @param src_level        tbox::Pointer to source patch level.
+    * @param overlap          tbox::Pointer to overlap region between patches.
+    * @param dst_patch        Integer index of destination patch in destination
+    *                         patch level.
+    * @param src_patch        Integer index of source patch in source patch level.
+    * @param coarsen_item_id  Integer id of coarsen data item owned by coarsen schedule.
+    *
+    * When assertion checking is active, an assertion will result if any of the pointer
+    * arguments is null, or if any of the integer arguments are invalid (i.e., < 0);
+    */
+   explicit CoarsenCopyTransaction(
+      tbox::Pointer<hier::PatchLevel>& dst_level,
+      tbox::Pointer<hier::PatchLevel>& src_level,
+      tbox::Pointer<hier::BoxOverlap> overlap,
+      const hier::MappedBox& dst_mapped_box,
+      const hier::MappedBox& src_mapped_box,
+      int coarsen_item_id);
+
+   /*!
+    * The virtual destructor for the copy transaction releases all
+    * memory associated with the transaction.
+    */
+   virtual ~CoarsenCopyTransaction();
+
+   /*!
+    * Return a boolean indicating whether this transaction can estimate
+    * the size of an incoming message.  If this is false, then a different
+    * communication protocol kicks in and the message size is transmitted
+    * between mapped_boxes.
+    */
+   virtual bool
+   canEstimateIncomingMessageSize();
+
+   /*!
+    * Return the integer buffer space (in bytes) needed for the incoming message.
+    * This routine is only called if the transaction can estimate the
+    * size of the incoming message.  See canEstimateIncomingMessageSize().
+    */
+   virtual size_t
+   computeIncomingMessageSize();
+
+   /*!
+    * Return the integer buffer space (in bytes) needed for the outgoing message.
+    */
+   virtual size_t
+   computeOutgoingMessageSize();
+
+   /*!
+    * Return the sending processor number for the communications transaction.
+    */
+   virtual int
+   getSourceProcessor() { return d_src_patch_rank; }
+
+   /*!
+    * Return the receiving processor number for the communications transaction.
+    */
+   virtual int
+   getDestinationProcessor() { return d_dst_patch_rank; }
+
+   /*!
+    * Pack the transaction data into the message stream.
+    */
+   virtual void
+   packStream(
+      tbox::MessageStream& stream);
+
+   /*!
+    * Unpack the transaction data from the message stream.
+    */
+   virtual void
+   unpackStream(
+      tbox::MessageStream& stream);
+
+   /*!
+    * Perform the local data copy for the transaction.
+    */
+   virtual void
+   copyLocalData();
+
+   /*!
+    * Print out transaction information.
+    */
+   virtual void
+   printClassData(
+      std::ostream& stream) const;
+
+private:
+   CoarsenCopyTransaction(
+      const CoarsenCopyTransaction&);                     // not implemented
+   void
+   operator = (
+      const CoarsenCopyTransaction&);                   // not implemented
+
+   static const CoarsenClasses::Data** s_coarsen_items;
+   static int s_num_coarsen_items;
+
+   tbox::Pointer<hier::Patch> d_dst_patch;
+   int                        d_dst_patch_rank;
+   tbox::Pointer<hier::Patch> d_src_patch;
+   int                        d_src_patch_rank;
+   tbox::Pointer<hier::BoxOverlap> d_overlap;
+   int d_coarsen_item_id;
+   int d_incoming_bytes;
+   int d_outgoing_bytes;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/CoarsenOperator.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/CoarsenOperator.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,123 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract base class for spatial coarsening operators. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_CoarsenOperator_C
+#define included_xfer_CoarsenOperator_C
+
+#include "SAMRAI/xfer/CoarsenOperator.h"
+
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+std::multimap<std::string, CoarsenOperator *> CoarsenOperator::s_lookup_table;
+
+tbox::StartupShutdownManager::Handler
+CoarsenOperator::s_finalize_handler(
+   0,
+   0,
+   0,
+   CoarsenOperator::finalizeCallback,
+   tbox::StartupShutdownManager::priorityList);
+
+CoarsenOperator::CoarsenOperator(
+   const tbox::Dimension& dim,
+   const std::string& name):
+   d_name(name),
+   d_dim(dim)
+{
+   registerInLookupTable(name);
+}
+
+CoarsenOperator::~CoarsenOperator()
+{
+   removeFromLookupTable(d_name);
+}
+
+/*
+ *************************************************************************
+ * Register this in the static look-up table.
+ *************************************************************************
+ */
+void CoarsenOperator::registerInLookupTable(
+   const std::string& name)
+{
+   s_lookup_table.insert(std::pair<std::string, CoarsenOperator *>(name, this));
+}
+
+void CoarsenOperator::removeFromLookupTable(
+   const std::string& name)
+{
+   /*
+    * The lookup table might be empty if static CoarsenOperator's are used
+    * in which case the table will have been removed before the statics
+    * are destroyed.
+    */
+   if (!s_lookup_table.empty()) {
+      std::multimap<std::string, CoarsenOperator *>::iterator mi =
+         s_lookup_table.find(name);
+      TBOX_ASSERT(mi != s_lookup_table.end());
+      while (mi->first == name && mi->second != this) {
+         ++mi;
+         TBOX_ASSERT(mi != s_lookup_table.end());
+      }
+      TBOX_ASSERT(mi->first == name);
+      TBOX_ASSERT(mi->second == this);
+      mi->second = NULL;
+      s_lookup_table.erase(mi);
+   }
+}
+/*
+ *************************************************************************
+ * Compute the max coarsen stencil width from all constructed
+ * coarsen operators.
+ *************************************************************************
+ */
+/*
+ *************************************************************************
+ * Compute the max refine stencil width from all constructed
+ * refine operators.
+ *************************************************************************
+ */
+hier::IntVector
+CoarsenOperator::getMaxCoarsenOpStencilWidth(
+   const tbox::Dimension& dim)
+{
+   hier::IntVector max_width(dim, 0);
+
+   for (std::multimap<std::string, CoarsenOperator *>::const_iterator
+        mi = s_lookup_table.begin(); mi != s_lookup_table.end(); ++mi) {
+      const CoarsenOperator* op = mi->second;
+      if (op->getDim() == dim) {
+         max_width.max(op->getStencilWidth());
+      }
+   }
+
+   return max_width;
+}
+
+const tbox::Dimension& CoarsenOperator::getDim() const
+{
+   return d_dim;
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void CoarsenOperator::finalizeCallback()
+{
+   s_lookup_table.clear();
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/CoarsenOperator.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/CoarsenOperator.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,199 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract base class for spatial coarsening operators. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_CoarsenOperator
+#define included_xfer_CoarsenOperator
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+#include <map>
+
+namespace SAMRAI {
+namespace xfer {
+
+/**
+ * Class CoarsenOperator<DIM> is an abstract base class for each
+ * spatial coarsening operator used in the SAMRAI framework.  This class
+ * defines the interface between numerical coarsening routines and the
+ * rest of the framework.  Each concrete coarsening operator subclass
+ * must provide four operations:
+ *
+ *
+ *
+ * - \b (1) {an implementation of the coarsening operation
+ *            appropriate for its corresponding patch data type.}
+ * - \b (2) {a function that determines whether or not the operator
+ *             matches an arbitrary request for a coarsening operator.}
+ * - \b (3) {a function that returns the stencil width of the operator
+ *             (i.e., the number of ghost cells needed by the operator).}
+ * - \b (4) {a function that returns an integer stating the priority of the
+ *             operator with respect to other coarsening operators.}
+ *
+ *
+ *
+ * To add a new coarsening operator (either for a new patch data type
+ * or for a new time coarsening routine on an existing type), define
+ * the operator by inheriting from this abstract base class.  The operator
+ * subclass must implement the coarsening operation in the coarsen()
+ * function, and provide a response to a general operator request in the
+ * findCoarsenOperator() function.  The stencil width and operator priority
+ * must be returned from the getStencilWidth() and getOperatorPriority()
+ * functions, respectively.  Then, the new operator must be added to the
+ * operator list for the appropriate transfer geometry object using the
+ * Geometry<DIM>::addSpatialCOarsenOperator() function.
+ *
+ * Since spatial coarsening operators usually depend on patch data centering
+ * and data type as well as the mesh coordinate system, they are defined
+ * in the <EM>geometry</EM> package.
+ *
+ * @see xfer::Geometry
+ */
+
+class CoarsenOperator:public tbox::DescribedClass
+{
+public:
+   /*!
+    * @brief Construct the object with a name to allow the xfer::Geometry
+    * class to look up the object using a string.
+    *
+    * The constructor must be given a name.  The object will be
+    * registered under this name with the xfer::Geometry class.
+    * The name must be unique, as duplicate names are not allowed.
+    */
+   explicit CoarsenOperator(
+      const tbox::Dimension& dim,
+      const std::string& name);
+
+   /**
+    * The virtual destructor for the coarsening operator does
+    * nothing interesting.
+    */
+   virtual ~CoarsenOperator();
+
+   /**
+    * Return true if the coarsening operation matches the variable and
+    * name std::string identifier request; false, otherwise.
+    */
+   virtual bool
+   findCoarsenOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const = 0;
+
+   /**
+    * Return name std::string identifier of the coarsening operation.
+    */
+   virtual const std::string&
+   getOperatorName() const = 0;
+
+   /**
+    * Return the priority of this operator relative to other coarsening
+    * operators.  The SAMRAI transfer routines guarantee that coarsening
+    * using operators with lower priority values will be performed before
+    * those with higher priority.
+    */
+   virtual int
+   getOperatorPriority() const = 0;
+
+   /**
+    * Return the stencil width associated with the coarsening operator.
+    * The SAMRAI transfer routines guarantee that the source patch will
+    * contain sufficient ghost cell data surrounding the interior to
+    * satisfy the stencil width requirements for each coarsening operator.
+    */
+   virtual hier::IntVector
+   getStencilWidth() const = 0;
+
+   /**
+    * Coarsen the source component on the fine patch to the destination
+    * component on the coarse patch. The coarsening operation is performed
+    * on the intersection of the destination patch and the coarse box.
+    * The fine patch is guaranteed to contain sufficient data for the
+    * stencil width of the coarsening operator.
+    */
+   virtual void
+   coarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const = 0;
+
+   /*!
+    * @brief Get the max stencil width of all coarsen operators.
+    *
+    * The max stencil width computed from all registered (constructed)
+    * coarsen operators.
+    */
+   static hier::IntVector
+   getMaxCoarsenOpStencilWidth(
+      const tbox::Dimension& dim);
+
+   /**
+    * Return the dimension of this object.
+    */
+   const tbox::Dimension&
+   getDim() const;
+
+private:
+   CoarsenOperator(
+      const CoarsenOperator&);                  // not implemented
+   void
+   operator = (
+      const CoarsenOperator&);                  // not implemented
+
+   /*
+    * TODO SGS Rich has better way of doing this.
+    */
+
+   /*!
+    * @brief Associate the given name with this operator.
+    *
+    * Registering an operator with a name allows that operator
+    * to be looked up by name.  Operators registered must have
+    * unique names.
+    */
+   void
+   registerInLookupTable(
+      const std::string& name);
+
+   /*!
+    * @brief Remove the operator with the given name.
+    *
+    */
+   void
+   removeFromLookupTable(
+      const std::string& name);
+
+   /*!
+    * @brief Method registered with ShutdownRegister to cleanup statics.
+    */
+   static void
+   finalizeCallback();
+
+   const std::string d_name;
+   const tbox::Dimension d_dim;
+
+   static std::multimap<std::string, CoarsenOperator *> s_lookup_table;
+
+   static tbox::StartupShutdownManager::Handler
+   s_finalize_handler;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/CoarsenPatchStrategy.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/CoarsenPatchStrategy.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Strategy interface to user routines for coarsening AMR data. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_CoarsenPatchStrategy_C
+#define included_xfer_CoarsenPatchStrategy_C
+
+#include "SAMRAI/xfer/CoarsenPatchStrategy.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+CoarsenPatchStrategy::CoarsenPatchStrategy(
+   const tbox::Dimension& dim):
+   d_dim(dim)
+{
+   registerObject();
+}
+
+CoarsenPatchStrategy::~CoarsenPatchStrategy()
+{
+}
+
+/*
+ *************************************************************************
+ * Register this in the static registry.
+ *************************************************************************
+ */
+
+void CoarsenPatchStrategy::registerObject()
+{
+   std::set<CoarsenPatchStrategy *>& current_objects =
+      CoarsenPatchStrategy::getCurrentObjects();
+   current_objects.insert(this);
+}
+
+/*
+ *************************************************************************
+ * Return the static registry.
+ *************************************************************************
+ */
+
+std::set<CoarsenPatchStrategy *>& CoarsenPatchStrategy::getCurrentObjects()
+{
+   static std::set<CoarsenPatchStrategy *> current_objects;
+   return current_objects;
+}
+
+const tbox::Dimension& CoarsenPatchStrategy::getDim() const
+{
+   return d_dim;
+}
+
+/*
+ *************************************************************************
+ * Compute the max coarsen stencil width from all constructed
+ * coarsen patch strategies.
+ *************************************************************************
+ */
+hier::IntVector
+CoarsenPatchStrategy::getMaxCoarsenOpStencilWidth(
+   const tbox::Dimension& dim)
+{
+   hier::IntVector max_width(dim, 0);
+
+   std::set<CoarsenPatchStrategy *>& current_objects =
+      CoarsenPatchStrategy::getCurrentObjects();
+   for (std::set<CoarsenPatchStrategy *>::const_iterator
+        si = current_objects.begin(); si != current_objects.end(); ++si) {
+      const CoarsenPatchStrategy* op = *si;
+      if (op->getDim() == dim) {
+         max_width.max(op->getCoarsenOpStencilWidth());
+      }
+   }
+
+   return max_width;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/CoarsenPatchStrategy.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/CoarsenPatchStrategy.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,176 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Strategy interface to user routines for coarsening AMR data. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_CoarsenPatchStrategy
+#define included_xfer_CoarsenPatchStrategy
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+
+#include <set>
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Abstract base class for user-defined patch data coarsening operations.
+ *
+ * CoarsenPatchStrategy provides an interface for a user to supply
+ * methods for application-specific coarsening of data between two levels in
+ * an AMR patch hierarchy.  A concrete subclass must define three member
+ * functions to perform the following tasks:
+ *
+ * <ul> 
+ *    <li> define maximum stencil width for user-defined coarsen operations
+ *    <li> preprocess the coarsening
+ *    <li> postprocess the coarsening
+ * </ul>
+ *
+ * Note that the preprocess member function is called before standard data
+ * coarsening using CoarsenOperators and the postprocess member function is
+ * called afterwards.
+ *
+ * @see xfer::CoarsenAlgorithm
+ * @see xfer::CoarsenSchedule
+ */
+
+class CoarsenPatchStrategy:
+   public virtual tbox::DescribedClass
+{
+public:
+
+   /*!
+    * @brief Get the maximum stencil width over all CoarsenPatchStrategy objects
+    * used in an application.
+    *
+    * @return The maximum of the return values of calls to
+    * getCoarsenOpStencilWidth() for every CoarsenPatchStrategy of the
+    * given Dimension used in an application.
+    *
+    * @param[in] dim   Only objects with this dimension will be used to
+    *                  calculate the max.  If a CoarsenPatchStrategy with
+    *                  another dimension is registered, it will be ignored.
+    */
+   static hier::IntVector
+   getMaxCoarsenOpStencilWidth(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Constructor.
+    *
+    * The constructor will register the constructed object with a static
+    * set that manages all CoarsenPatchStrategy objects in an application.
+    */
+   explicit CoarsenPatchStrategy(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Destructor.
+    */
+   virtual ~CoarsenPatchStrategy();
+
+   /*!
+    * @brief Return maximum stencil width needed for user-defined
+    * data coarsening operations performed by this object.
+    *
+    * This is needed to determine the correct coarsening data dependencies and
+    * to ensure that the data has a sufficient amount of ghost width.
+    *
+    * For any user-defined coarsening operations implemented in the
+    * preprocess or postprocess methods, return the maximum stencil needed
+    * on a fine patch to coarsen data to a coarse patch.
+    */
+   virtual hier::IntVector
+   getCoarsenOpStencilWidth() const = 0;
+
+   /*!
+    * @brief Perform user-defined patch data coarsening operations.
+    *
+    * This member function is called before standard coarsening operations
+    * (expressed using concrete subclasses of the CoarsenOperator base class).
+    * The preprocess function should move data from the source components
+    * on the fine patch into the source components on the coarse patch
+    * in the specified coarse box region.  Recall that the source components
+    * are specified in calls to the registerCoarsen() function in the
+    * CoarsenAlgorithm class.
+    *
+    * @param coarse[out] Coarse patch that will receive coarsened data.
+    * @param fine[in]    Fine patch containing source data.
+    * @param coarse_box[in]  Box region on coarse patch into which data is
+    *                        coarsened.
+    * @param ratio[in]   Refinement ratio between coarse and fine patches.
+    */
+   virtual void
+   preprocessCoarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) = 0;
+
+   /*!
+    * @brief Perform user-defined patch data coarsening operations.
+    *
+    * This member function is called after standard coarsening operations
+    * (expressed using concrete subclasses of the CoarsenOperator base class).
+    * The postprocess function should move data from the source components on
+    * the fine patch into the source components on the coarse patch in the
+    * specified coarse box region.  Recall that the source components are
+    * specified in calls to the registerCoarsen() function in the
+    * CoarsenAlgorithm class.
+    *
+    * @param coarse[out]  Coarse patch that will receive coarsened data.
+    * @param fine[in]     Fine patch containing source data.
+    * @param coarse_box[in]  hier::Box region on coarse patch into which data
+    *                        is coarsened.
+    * @param ratio[in]    Refinement ratio between coarse and fine patches.
+    */
+   virtual void
+   postprocessCoarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) = 0;
+
+   /*!
+    * @brief Return the dimension of this object.
+    */
+   const tbox::Dimension&
+   getDim() const;
+
+private:
+
+   /*!
+    * @brief Get the set of CoarsenPatchStrategy objects that have been
+    * registered.
+    */
+   static std::set<CoarsenPatchStrategy *>&
+   getCurrentObjects();
+
+   /*!
+    * @brief Dimension of the object.
+    */
+   const tbox::Dimension d_dim;
+
+   /*!
+    * @brief Register the object with a set of all CoarsenPatchStrategy
+    * objects used in an application.
+    */
+   void
+   registerObject();
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/CoarsenSchedule.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/CoarsenSchedule.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1167 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Coarsening schedule for data transfer between AMR levels 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_CoarsenSchedule_C
+#define included_xfer_CoarsenSchedule_C
+
+#include "SAMRAI/xfer/CoarsenSchedule.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/MappedBoxContainerUtils.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/MappedBoxSet.h"
+#include "SAMRAI/hier/OverlapConnectorAlgorithm.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchDataFactory.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/PeriodicShiftCatalog.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/xfer/CoarsenCopyTransaction.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialization for static data members.                               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+std::string
+CoarsenSchedule::s_schedule_generation_method = "DLBG";
+
+tbox::Pointer<tbox::Timer> CoarsenSchedule::t_coarsen_data;
+tbox::Pointer<tbox::Timer> CoarsenSchedule::t_gen_sched_n_squared;
+tbox::Pointer<tbox::Timer> CoarsenSchedule::t_gen_sched_dlbg;
+tbox::Pointer<tbox::Timer> CoarsenSchedule::t_invert_edges;
+
+tbox::StartupShutdownManager::Handler
+CoarsenSchedule::s_initialize_finalize_handler(
+   CoarsenSchedule::initializeCallback,
+   0,
+   0,
+   CoarsenSchedule::finalizeCallback,
+   tbox::StartupShutdownManager::priorityTimers);
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Static function to set box intersection algorithm for schedules.       *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void CoarsenSchedule::setScheduleGenerationMethod(
+   const std::string& method)
+{
+   if (!((method == "ORIG_NSQUARED") ||
+         (method == "DLBG"))) {
+      TBOX_ERROR("CoarsenSchedule::setScheduleGenerationMethod\n"
+         << "Given method std::string "
+         << method << " is invalid.\n Options are\n"
+         << "'ORIG_NSQUARED' and 'DLBG'."
+         << std::endl);
+   }
+
+   s_schedule_generation_method = method;
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Create a coarsening schedule that transfers data from the source       *
+ * patch data components of the fine level into the destination patch     *
+ * data components of the coarse level.  If the coarsening operators      *
+ * require data in ghost cells on the source level, then those ghost	  *
+ * cells must be filled before this call.				  *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+CoarsenSchedule::CoarsenSchedule(
+   tbox::Pointer<hier::PatchLevel> crse_level,
+   tbox::Pointer<hier::PatchLevel> fine_level,
+   const tbox::Pointer<xfer::CoarsenClasses> coarsen_classes,
+   tbox::Pointer<xfer::CoarsenTransactionFactory> transaction_factory,
+   xfer::CoarsenPatchStrategy* patch_strategy,
+   bool fill_coarse_data):
+   d_ratio_between_levels(crse_level->getDim())
+{
+   TBOX_ASSERT(!crse_level.isNull());
+   TBOX_ASSERT(!fine_level.isNull());
+   TBOX_ASSERT(!coarsen_classes.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*crse_level, *fine_level);
+
+   const tbox::Dimension& dim(crse_level->getDim());
+
+   /*
+    * Initial values; some may change in setup operations.
+    */
+
+   d_crse_level = crse_level;
+   d_fine_level = fine_level;
+   d_transaction_factory = transaction_factory;
+   d_temp_crse_level.setNull();
+
+   d_coarsen_patch_strategy = patch_strategy;
+
+   d_fill_coarse_data = fill_coarse_data;
+
+   d_schedule.setNull();
+
+   d_precoarsen_refine_algorithm.setNull();
+   d_precoarsen_refine_schedule.setNull();
+
+   d_number_coarsen_items = 0;
+   d_coarsen_items = (const xfer::CoarsenClasses::Data **)NULL;
+
+   /*
+    * Compute ratio between fine and coarse levels and then check for
+    * correctness.
+    */
+
+   const hier::IntVector &fine(d_fine_level->getRatioToLevelZero());
+   const hier::IntVector &crse(d_crse_level->getRatioToLevelZero());
+   int i;
+   for (i = 0; i < dim.getValue(); i++) {
+      if (fine(i) > 1) {
+         d_ratio_between_levels(i) = fine(i) / crse(i);
+      } else {
+         d_ratio_between_levels(i) = tbox::MathUtilities<int>::Abs(crse(
+                  i) / fine(i));
+      }
+   }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   for (i = 0; i < dim.getValue(); i++) {
+      TBOX_ASSERT(d_ratio_between_levels(i) != 0);
+   }
+   if (dim > tbox::Dimension(1))
+      for (i = 0; i < dim.getValue(); i++) {
+         if (d_ratio_between_levels(i)
+             * d_ratio_between_levels((i + 1) % dim.getValue()) < 0) {
+            TBOX_ASSERT((d_ratio_between_levels(i) == 1) ||
+               (d_ratio_between_levels((i + 1) % dim.getValue()) == 1));
+         }
+      }
+#endif
+
+   setCoarsenItems(coarsen_classes);
+   initialCheckCoarsenClassItems();
+
+   /*
+    * Set up refine schedules to transfer coarsened data and to fill temporary
+    * coarse level data before coarsening operations, if needed.  Then,
+    * generate communication schedules to transfer data.
+    */
+
+   setupRefineAlgorithm();
+
+   generateSchedule();
+
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * The destructor for the coarsen schedule class implicitly deallocates   *
+ * all of the data associated with the communication schedule.            *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+CoarsenSchedule::~CoarsenSchedule()
+{
+   clearCoarsenItems();
+
+   d_transaction_factory.setNull();
+   d_crse_level.setNull();
+   d_fine_level.setNull();
+   d_temp_crse_level.setNull();
+
+   d_schedule.setNull();
+
+   d_precoarsen_refine_algorithm.setNull();
+   d_precoarsen_refine_schedule.setNull();
+}
+
+/*
+ * ***********************************************************************
+ *                                                                       *
+ * Reset schedule with new set of coarsen items.                         *
+ *                                                                       *
+ * ***********************************************************************
+ */
+
+void CoarsenSchedule::reset(
+   const tbox::Pointer<xfer::CoarsenClasses> coarsen_classes)
+{
+   TBOX_ASSERT(!coarsen_classes.isNull());
+
+   setCoarsenItems(coarsen_classes);
+
+   setupRefineAlgorithm();
+
+   if (d_fill_coarse_data) {
+      d_precoarsen_refine_algorithm->
+      resetSchedule(d_precoarsen_refine_schedule);
+   }
+
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Return const pointer to equivalence classes used in schedule.          *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+const tbox::Pointer<xfer::CoarsenClasses>&
+CoarsenSchedule::getEquivalenceClasses() const
+{
+   return d_coarsen_classes;
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Execute the stored communication schedule that copies data into the	  *
+ * the destination patch data components of the destination level from	  *
+ * the source patch data components of the source level.  The steps	  *
+ * to the algorithm are as follows:					  *
+ *									  *
+ *	(1) Allocate the source space on the temporary patch level.	  *
+ *	(2) Coarsen the data from the fine patch level to the temporary	  *
+ *	    patch level (local operation).				  *
+ *	(3) Copy data from the source space of the temporary patch	  *
+ *	    level into the destination space of the destination patch	  *
+ *	    level (requires interprocessor communication).		  *
+ *	(4) Deallocate the source space on the temporary patch level.	  *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void CoarsenSchedule::coarsenData() const
+{
+   t_coarsen_data->start();
+
+   /*
+    * Set the coarsen items for all transactions.  These items are
+    * shared by all transaction objects in the communication schedule.
+    */
+   d_transaction_factory->setCoarsenItems(d_coarsen_items,
+      static_cast<int>(d_number_coarsen_items));
+
+   /*
+    * Allocate the source data space on the temporary patch level.
+    * We do not know the current time, so set it to zero.  It should
+    * not matter, since the copy routines do not require that
+    * the time markers match.
+    */
+
+   d_temp_crse_level->allocatePatchData(d_sources, 0.0);
+
+   if (d_fill_coarse_data) {
+      d_precoarsen_refine_schedule->fillData(0.0);
+   }
+
+   /*
+    * Coarsen the data from the sources on the fine data level into the
+    * sources on the temporary data level
+    */
+
+   coarsenSourceData(d_coarsen_patch_strategy);
+
+   /*
+    * Copy data from the source interiors of the temporary patch level
+    * into the destination interiors of the destination patch level.
+    */
+
+   d_schedule->communicate();
+
+   /*
+    * Deallocate the source data in the temporary patch level.
+    */
+
+   d_temp_crse_level->deallocatePatchData(d_sources);
+
+   /*
+    * Unset the coarsen items for the copy transactions.  These items
+    * are shared by all such transaction objects in the communication
+    * schedule.
+    */
+   d_transaction_factory->unsetCoarsenItems();
+
+   t_coarsen_data->stop();
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Generate the temporary coarse level by coarsening the fine patch	  *
+ * level boxes.  Note that no patch data components are allocated until   *
+ * they are needed during the coarsening operation.			  *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void CoarsenSchedule::generateTemporaryLevel()
+{
+   const tbox::Dimension& dim(d_crse_level->getDim());
+
+   hier::IntVector min_gcw = getMaxGhostsToGrow();
+   const hier::Connector &coarse_to_fine = d_crse_level->getMappedBoxLevel()->getPersistentOverlapConnectors().findConnector(
+      *d_fine_level->getMappedBoxLevel(),
+      Connector::convertHeadWidthToBase(d_crse_level->getMappedBoxLevel()->
+                                        getRefinementRatio(),
+                                        d_fine_level->getMappedBoxLevel()->getRefinementRatio(),
+                                        min_gcw) );
+   const hier::Connector &fine_to_coarse = d_fine_level->getMappedBoxLevel()->getPersistentOverlapConnectors().findConnector(
+      *d_crse_level->getMappedBoxLevel(),
+      min_gcw );
+
+   hier::OverlapConnectorAlgorithm oca;
+
+   d_temp_crse_level = new hier::PatchLevel(dim);
+   d_temp_crse_level->setCoarsenedPatchLevel(d_fine_level,
+      d_ratio_between_levels);
+   d_temp_crse_level->setLevelNumber(d_crse_level->getLevelNumber());
+
+   /*
+    * Generate temporary MappedBoxLevel and Connectors.
+    */
+
+   /*
+    * Compute d_coarse_to_temp and d_temp_to_coarse.
+    *
+    * We use the fact that d_temp_crse_level patches are numbered just
+    * like the fine level patches.  The Connectors between coarse and
+    * temp are very similar to those between coarse and fine.
+    */
+   hier::NeighborhoodSet coarse_eto_temp;
+   hier::MappedBoxContainerUtils::coarsenNeighborsInNeighborhoodSet(
+      coarse_eto_temp,
+      coarse_to_fine.getNeighborhoodSets(),
+      d_ratio_between_levels);
+   d_coarse_to_temp.swapInitialize(
+      coarse_to_fine.getBase(),
+      *d_temp_crse_level->getMappedBoxLevel(),
+      coarse_to_fine.getConnectorWidth(),
+      coarse_eto_temp,
+      hier::MappedBoxLevel::DISTRIBUTED);
+   d_coarse_to_temp.setConnectorType(hier::Connector::BASE_GENERATED);
+   coarse_eto_temp.clear();
+   d_temp_to_coarse.initialize(
+      *d_temp_crse_level->getMappedBoxLevel(),
+      coarse_to_fine.getBase(),
+      coarse_to_fine.getConnectorWidth(),
+      fine_to_coarse.getNeighborhoodSets(),
+      hier::MappedBoxLevel::DISTRIBUTED);
+   d_temp_to_coarse.setConnectorType(hier::Connector::BASE_GENERATED);
+   const hier::IntVector one_vector(dim, 1);
+   oca.shrinkConnectorWidth(d_coarse_to_temp, one_vector);
+   oca.shrinkConnectorWidth(d_temp_to_coarse, one_vector);
+
+#if 0
+   /*
+    * We expect these to be complete because d_temp_crse_level
+    * is singly nested in fine_mapped_box_level^gcw(fine_to_coarse).
+    * I think.
+    */
+   tbox::plog
+      << "fine_mapped_box_level:\n" << d_fine_level->getMappedBoxLevel()->format("", 2)
+      << "d_temp_crse_level:\n" << d_temp_crse_level->getMappedBoxLevel()->format("", 2)
+      << "coarse mapped_box_level:\n" << coarse_to_fine.getBase().format("", 2)
+      << "d_temp_to_coarse:\n" << d_temp_to_coarse.format("", 3)
+      << "fine_to_coarse:\n" << fine_to_coarse.format("", 3)
+      << "coarse_to_fine:\n" << coarse_to_fine.format("", 3)
+      << "d_coarse_to_temp:\n" << d_coarse_to_temp.format("", 3);
+#endif
+#if 0
+   oca.assertOverlapCorrectness(d_coarse_to_temp, false, true, false);
+   oca.assertOverlapCorrectness(d_temp_to_coarse, false, true, false);
+#endif
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Set up refine algorithms to transfer coarsened data and to fill        *
+ * temporary coarse level before performing coarsening operations,        *
+ * if necessary.                                                          *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void CoarsenSchedule::setupRefineAlgorithm()
+{
+
+   if (d_fill_coarse_data) {
+
+      const tbox::Dimension& dim(d_crse_level->getDim());
+
+      d_precoarsen_refine_algorithm.setNull();
+      d_precoarsen_refine_algorithm = new RefineAlgorithm(dim);
+
+      for (size_t ici = 0; ici < d_number_coarsen_items; ici++) {
+         const int src_id = d_coarsen_items[ici]->d_src;
+         d_precoarsen_refine_algorithm->registerRefine(src_id,
+            src_id,
+            src_id,
+            tbox::Pointer<xfer::VariableFillPattern>(NULL));
+      }
+   }
+
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Generate communication schedule that copies source patch data          *
+ * from the temporary level into the destination patch data of the        *
+ * destination (coarse) level.  The source and destination	          *
+ * spaces may be the same.						  *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void CoarsenSchedule::generateSchedule()
+{
+
+   /*
+    * Set up coarsened version of fine level for temporary data storage.
+    * Next, create refine algorithm if needed to fill temporary coarse
+    * level before coarsen operations occur.  Then, create empty schedule
+    * that will hold transactions for moving data.  Finally, generate
+    * schedule based on chosen generation method.
+    */
+   generateTemporaryLevel();
+
+   if (d_fill_coarse_data) {
+      d_precoarsen_refine_schedule =
+         d_precoarsen_refine_algorithm->createSchedule(d_temp_crse_level,
+            d_crse_level);
+   }
+
+   d_schedule = new tbox::Schedule();
+   d_schedule->setTimerPrefix("xfer::CoarsenSchedule");
+
+   if (s_schedule_generation_method == "ORIG_NSQUARED") {
+
+      generateScheduleNSquared();
+
+   } else if (s_schedule_generation_method == "DLBG") {
+
+      generateScheduleDLBG();
+
+   } else {
+
+      TBOX_ERROR("Internal CoarsenSchedule error..."
+         << "\n unrecognized schedule generation option: "
+         << s_schedule_generation_method << std::endl);
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * This version of the schedule generation procedure uses the original   *
+ * SAMRAI N^2 algorithms to construct communication schedules.  Here,    *
+ * we loop over all of the patches on the source and destination levels. *
+ * check to see whether source or destination is local to this processor.*
+ * If not, then skip over schedule construction operations.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CoarsenSchedule::generateScheduleNSquared()
+{
+
+   t_gen_sched_n_squared->start();
+
+   const int dst_npatches = d_crse_level->getGlobalNumberOfPatches();
+   const int src_npatches = d_temp_crse_level->getGlobalNumberOfPatches();
+
+   const hier::ProcessorMapping& dst_mapping =
+      d_crse_level->getProcessorMapping();
+   const hier::ProcessorMapping& src_mapping =
+      d_temp_crse_level->getProcessorMapping();
+
+   for (int dp = 0; dp < dst_npatches; dp++) {
+
+      const MappedBox dst_mapped_box(d_crse_level->getBoxes()[dp],
+                                     hier::LocalId(dp),
+                                     d_crse_level->getProcessorMapping().
+                                     getProcessorAssignment(dp));
+
+      for (int sp = 0; sp < src_npatches; sp++) {
+
+         const MappedBox src_mapped_box(d_temp_crse_level->getBoxes()[sp],
+                                        hier::LocalId(sp),
+                                        d_temp_crse_level->getProcessorMapping()
+                                        .getProcessorAssignment(sp));
+
+         if (dst_mapping.isMappingLocal(dp)
+             || src_mapping.isMappingLocal(sp)) {
+
+            constructScheduleTransactions(d_crse_level, dst_mapped_box,
+               d_temp_crse_level, src_mapped_box);
+
+         }  // if either source or destination patch is local
+
+      } // loop over source patches
+
+   } // loop over destination patches
+
+   t_gen_sched_n_squared->stop();
+
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void CoarsenSchedule::generateScheduleDLBG()
+{
+   t_gen_sched_dlbg->start();
+
+   /*
+    * Construct sending transactions for local src MappedBoxes.
+    */
+   /*
+    * Restructure the d_temp_to_coarse edge data to arange neighbors by the
+    * coarse mapped_boxes, as required to match the transaction ordering on the
+    * receiving processors.  At the same time, shift temp-coarse pairs to
+    * make the coarse shifts zero.
+    */
+   FullNeighborhoodSet temp_eto_coarse_bycoarse;
+   t_invert_edges->start();
+   restructureNeighborhoodSetsByDstNodes(temp_eto_coarse_bycoarse, d_temp_to_coarse);
+   t_invert_edges->stop();
+
+   for (FullNeighborhoodSet::const_iterator ei = temp_eto_coarse_bycoarse.begin();
+        ei != temp_eto_coarse_bycoarse.end(); ++ei) {
+
+      /*
+       * coarse_mapped_box can be remote (by definition of FullNeighborhoodSet).
+       * local_temp_mapped_boxes are the local source mapped_boxes that
+       * contribute data to coarse_mapped_box.
+       */
+      const MappedBox& coarse_mapped_box = ei->first;
+      const hier::MappedBoxSet& local_temp_mapped_boxes = ei->second;
+      TBOX_ASSERT(!coarse_mapped_box.isPeriodicImage());
+
+      /*
+       * Construct transactions for data going from local source mapped_boxes
+       * to remote coarse mapped_boxes.
+       */
+      for (hier::MappedBoxSet::const_iterator ni =
+              local_temp_mapped_boxes.begin();
+           ni != local_temp_mapped_boxes.end(); ++ni) {
+         const MappedBox& temp_mapped_box = *ni;
+         if (temp_mapped_box.getOwnerRank() ==
+             coarse_mapped_box.getOwnerRank()) {
+            /*
+             * Disregard local coarse_mapped_box to avoid duplicating same
+             * transactions created by the second loop below.
+             */
+            continue;
+         }
+         constructScheduleTransactions(d_crse_level,
+            coarse_mapped_box,
+            d_temp_crse_level,
+            temp_mapped_box);
+      }
+
+   }
+
+   /*
+    * Construct receiving transactions for local dst mapped_boxes.
+    */
+   const MappedBoxLevel& coarse_mapped_box_level = *d_crse_level->getMappedBoxLevel();
+   const hier::NeighborhoodSet& coarse_eto_temp = d_coarse_to_temp.getNeighborhoodSets();
+   for (hier::NeighborhoodSet::const_iterator ei = coarse_eto_temp.begin();
+        ei != coarse_eto_temp.end(); ++ei) {
+
+      const hier::GlobalId& dst_gid = ei->first;
+      const MappedBox& dst_mapped_box =
+         *coarse_mapped_box_level.getMappedBoxStrict(dst_gid);
+
+      const hier::MappedBoxSet& src_mapped_boxes = ei->second;
+      for (hier::MappedBoxSet::const_iterator ni = src_mapped_boxes.begin();
+           ni != src_mapped_boxes.end(); ++ni) {
+         const MappedBox& src_mapped_box = *ni;
+
+         constructScheduleTransactions(d_crse_level,
+            dst_mapped_box,
+            d_temp_crse_level,
+            src_mapped_box);
+
+      }
+
+   }
+
+   t_gen_sched_dlbg->stop();
+
+}
+
+/*
+ ***********************************************************************
+ * This method does 2 important things to the src_to_dst edges:
+ *
+ * 1. It puts the edge data in dst-major order so the src owners can
+ * easily loop through the dst-src edges in the same order that dst
+ * owners see them.  Transactions must have the same order on the
+ * sending and receiving processors.
+ *
+ * 2. It shifts periodic image dst mapped_boxes back to the zero-shift position,
+ * and applies a similar shift to src mapped_boxes so that the overlap is
+ * unchanged.  The constructScheduleTransactions method requires all
+ * shifts to be absorbed in the src mapped_box.
+ ***********************************************************************
+ */
+void CoarsenSchedule::restructureNeighborhoodSetsByDstNodes(
+   FullNeighborhoodSet& full_inverted_edges,
+   const Connector& src_to_dst) const
+{
+   const tbox::Dimension& dim(d_crse_level->getDim());
+
+   const hier::PeriodicShiftCatalog* shift_catalog =
+      hier::PeriodicShiftCatalog::getCatalog(dim);
+   const int zero_shift_number = shift_catalog->getZeroShiftNumber();
+   const hier::NeighborhoodSet& edges = src_to_dst.getNeighborhoodSets();
+   const MappedBoxLevel& src_mapped_box_level = src_to_dst.getBase();
+   const hier::IntVector& src_ratio(src_to_dst.getBase().getRefinementRatio());
+   const hier::IntVector& dst_ratio(src_to_dst.getHead().getRefinementRatio());
+
+   /*
+    * These are the counterparts to shifted dst mapped_boxes and unshifted src
+    * mapped_boxes.
+    */
+   MappedBox shifted_mapped_box(dim), unshifted_nabr(dim);
+   full_inverted_edges.clear();
+   for (hier::NeighborhoodSet::const_iterator ci = edges.begin();
+        ci != edges.end();
+        ++ci) {
+      const MappedBox& mapped_box =
+         *src_mapped_box_level.getMappedBoxStrict(ci->first, zero_shift_number);
+      const NeighborSet& nabrs = ci->second;
+      for (NeighborSet::const_iterator na = nabrs.begin();
+           na != nabrs.end(); ++na) {
+         const hier::MappedBox& nabr = *na;
+         if (nabr.isPeriodicImage()) {
+            shifted_mapped_box.initialize(
+               mapped_box,
+               shift_catalog->getOppositeShiftNumber(nabr.getPeriodicShiftNumber()),
+               src_ratio);
+            unshifted_nabr.initialize(
+               nabr,
+               shift_catalog->getZeroShiftNumber(),
+               dst_ratio);
+            full_inverted_edges[unshifted_nabr].insert(shifted_mapped_box);
+         } else {
+            full_inverted_edges[nabr].insert(mapped_box);
+         }
+      }
+   }
+}
+
+/*
+ **************************************************************************
+ * Calculate the max ghost cell width to grow boxes to check for
+ * overlaps.  Given in source (fine) level's index space.
+ **************************************************************************
+ */
+
+hier::IntVector CoarsenSchedule::getMaxGhostsToGrow() const
+{
+   const tbox::Dimension& dim(d_crse_level->getDim());
+
+   /*
+    * MappedBox, face and side elements of adjacent cells overlap even though
+    * the cells do not overlap.  Therefore, we always grow at least one
+    * cell catch overlaps of mapped_box, face and side elements.
+    */
+   hier::IntVector gcw(dim, 1);
+
+   for (size_t ici = 0; ici < d_number_coarsen_items; ici++) {
+
+      /*
+       * I don't know why we need to grow by ghost width of src_id.
+       * Rich seems to recall needing this but can't remember the
+       * reason.  I am disabling it, but may have to re-enable it
+       * if it causes problems.
+       */
+      // const int src_id = d_coarsen_items[ici]->d_src;
+      // gcw.max(pd->getPatchDataFactory(src_id)->getDefaultGhostCellWidth());
+
+      hier::IntVector gcw1 = d_coarsen_items[ici]->d_gcw_to_coarsen;
+      if (!d_coarsen_items[ici]->d_opcoarsen.isNull()) {
+         gcw1 += d_coarsen_items[ici]->d_opcoarsen->getStencilWidth();
+      }
+      gcw.max(gcw1);
+   }
+
+   return gcw;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private utility function that constructs schedule transactions that   *
+ * move data from source patch on source level to destination patch      *
+ * on destination level.                                                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CoarsenSchedule::constructScheduleTransactions(
+   tbox::Pointer<hier::PatchLevel> dst_level,
+   const MappedBox& dst_mapped_box,
+   tbox::Pointer<hier::PatchLevel> src_level,
+   const MappedBox& src_mapped_box)
+{
+   TBOX_ASSERT(!dst_level.isNull());
+   TBOX_ASSERT(!src_level.isNull());
+
+   const tbox::Dimension& dim(d_crse_level->getDim());
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim,
+      *dst_level,
+      *src_level,
+      dst_mapped_box,
+      src_mapped_box);
+
+   const hier::IntVector& constant_zero_intvector(hier::IntVector::getZero(dim));
+   const hier::IntVector& constant_one_intvector(hier::IntVector::getOne(dim));
+
+   tbox::Pointer<hier::PatchDescriptor> dst_patch_descriptor =
+      dst_level->getPatchDescriptor();
+   tbox::Pointer<hier::PatchDescriptor> src_patch_descriptor =
+      src_level->getPatchDescriptor();
+
+   const hier::Box& dst_box = dst_mapped_box.getBox();
+   const hier::Box& src_box = src_mapped_box.getBox();
+
+   const int num_equiv_classes =
+      d_coarsen_classes->getNumberOfEquivalenceClasses();
+
+   const hier::PeriodicShiftCatalog* shift_catalog =
+      hier::PeriodicShiftCatalog::getCatalog(dim);
+
+   /*
+    * Calculate the shift and the shifted source box.
+    */
+   hier::IntVector src_shift(dim, 0);
+   hier::IntVector dst_shift(dim, 0);
+   hier::Box unshifted_src_box = src_mapped_box.getBox();
+   hier::Box unshifted_dst_box = dst_mapped_box.getBox();
+   if (src_mapped_box.isPeriodicImage()) {
+      TBOX_ASSERT(!dst_mapped_box.isPeriodicImage());
+      src_shift = shift_catalog->shiftNumberToShiftDistance(
+            src_mapped_box.getPeriodicShiftNumber());
+      src_shift *= src_level->getRatioToLevelZero();
+      unshifted_src_box.shift(-src_shift);
+   }
+   if (dst_mapped_box.isPeriodicImage()) {
+      TBOX_ASSERT(!src_mapped_box.isPeriodicImage());
+      dst_shift = shift_catalog->shiftNumberToShiftDistance(
+            dst_mapped_box.getPeriodicShiftNumber());
+      dst_shift *= dst_level->getRatioToLevelZero();
+      unshifted_dst_box.shift(-dst_shift);
+   }
+
+   const int num_coarsen_items = d_coarsen_classes->getNumberOfCoarsenItems();
+   tbox::Array<tbox::Pointer<tbox::Transaction> >
+   transactions(num_coarsen_items);
+
+   for (int nc = 0; nc < num_equiv_classes; nc++) {
+
+      const xfer::CoarsenClasses::Data& rep_item =
+         d_coarsen_classes->getClassRepresentative(nc);
+
+      const int rep_item_dst_id = rep_item.d_dst;
+      const int rep_item_src_id = rep_item.d_src;
+
+      tbox::Pointer<hier::PatchDataFactory> src_pdf =
+         src_patch_descriptor->getPatchDataFactory(rep_item_src_id);
+      tbox::Pointer<hier::PatchDataFactory> dst_pdf =
+         dst_patch_descriptor->getPatchDataFactory(rep_item_dst_id);
+
+      const hier::IntVector& dst_gcw(dst_pdf->getGhostCellWidth());
+
+      const hier::Box dst_fill_box(hier::Box::grow(unshifted_dst_box, dst_gcw));
+
+      hier::Box test_mask = dst_fill_box * src_mapped_box.getBox();
+      if (test_mask.empty() &&
+          (dst_gcw == constant_zero_intvector) &&
+          dst_pdf->dataLivesOnPatchBorder()) {
+         hier::Box tmp_dst_fill_box(
+            hier::Box::grow(dst_fill_box, constant_one_intvector));
+         test_mask = tmp_dst_fill_box * src_mapped_box.getBox();
+      }
+      hier::Box src_mask = hier::Box::shift(test_mask, -src_shift);
+
+      test_mask = hier::Box::grow(unshifted_src_box,
+            hier::IntVector::min(
+               rep_item.d_gcw_to_coarsen,
+               src_pdf->getGhostCellWidth()));
+
+      src_mask += test_mask;
+
+      tbox::Pointer<hier::BoxOverlap> overlap(
+         rep_item.d_var_fill_pattern->calculateOverlap(
+            *dst_pdf->getBoxGeometry(unshifted_dst_box),
+            *src_pdf->getBoxGeometry(unshifted_src_box),
+            dst_mapped_box.getBox(),
+            src_mask,
+            true, src_shift));
+
+      if (overlap.isNull()) {
+         TBOX_ERROR("Internal CoarsenSchedule error..."
+            << "\n Overlap is NULL for "
+            << "\n src box = " << src_box
+            << "\n dst box = " << dst_box
+            << "\n src mask = " << src_mask << std::endl);
+      }
+
+      if (!overlap->isOverlapEmpty()) {
+         for (tbox::List<int>::Iterator l(d_coarsen_classes->getIterator(nc));
+              l; l++) {
+            const CoarsenClasses::Data& item =
+               d_coarsen_classes->getCoarsenItem(l());
+            TBOX_ASSERT(item.d_class_id == nc);
+
+            const int citem_count = item.d_tag;
+            transactions[citem_count] =
+               d_transaction_factory->allocate(dst_level,
+                  src_level,
+                  overlap,
+                  dst_mapped_box,
+                  src_mapped_box,
+                  citem_count);
+         }
+      }
+
+   }  // iterate over all coarsen equivalence classes
+
+   for (int i = 0; i < num_coarsen_items; i++) {
+      if (!(transactions[i].isNull())) {
+         d_schedule->appendTransaction(transactions[i]);
+      }
+   }
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Coarsen data from the source space on the fine patch level into the	  *
+ * source space on the coarse temporary patch level.			  *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void CoarsenSchedule::coarsenSourceData(
+   xfer::CoarsenPatchStrategy* patch_strategy) const
+{
+   /*
+    * Loop over all local patches (fine and temp have the same mapping)
+    */
+
+   for (hier::PatchLevel::Iterator p(d_fine_level); p; p++) {
+      tbox::Pointer<hier::Patch> fine_patch = *p;
+      tbox::Pointer<hier::Patch> temp_patch = d_temp_crse_level->getPatch(fine_patch->getGlobalId());
+
+      const hier::Box& box = temp_patch->getBox();
+
+      /*
+       * Coarsen the fine space onto the temporary coarse space
+       */
+
+      if (patch_strategy) {
+         patch_strategy->preprocessCoarsen(*temp_patch,
+            *fine_patch, box, d_ratio_between_levels);
+      }
+
+      for (size_t ici = 0; ici < d_number_coarsen_items; ici++) {
+         const xfer::CoarsenClasses::Data * const crs_item =
+            d_coarsen_items[ici];
+         if (!(crs_item->d_opcoarsen.isNull())) {
+            const int source_id = crs_item->d_src;
+            crs_item->d_opcoarsen->coarsen(*temp_patch, *fine_patch,
+               source_id, source_id,
+               box, d_ratio_between_levels);
+         }
+      }
+
+      if (patch_strategy) {
+         patch_strategy->postprocessCoarsen(*temp_patch,
+            *fine_patch,
+            box,
+            d_ratio_between_levels);
+      }
+   }
+}
+
+/*
+ * ***********************************************************************
+ *                                                                       *
+ * Private utility function to set up local array of coarsen items.      *
+ *                                                                       *
+ * ***********************************************************************
+ */
+
+void CoarsenSchedule::setCoarsenItems(
+   const tbox::Pointer<xfer::CoarsenClasses> coarsen_classes)
+{
+
+   clearCoarsenItems();
+
+   d_coarsen_classes = coarsen_classes;
+
+   d_number_coarsen_items = d_coarsen_classes->getNumberOfCoarsenItems();
+
+   /*
+    * Determine total number of coarsen items and set state of
+    * component selector used to manage storage on temporary level.
+    */
+   d_sources.clrAllFlags();
+
+   for (unsigned int nc = 0; nc < d_number_coarsen_items; nc++) {
+      const CoarsenClasses::Data& item = d_coarsen_classes->getCoarsenItem(nc);
+      d_sources.setFlag(item.d_src);
+   }
+
+   /*
+    * Allocate and initialize array of coarsen items.
+    */
+
+   d_coarsen_items =
+      new const xfer::CoarsenClasses::Data *[d_number_coarsen_items];
+
+   int ircount = 0;
+   for (unsigned int nc = 0; nc < d_number_coarsen_items; nc++) {
+      d_coarsen_classes->getCoarsenItem(nc).d_tag = ircount;
+      d_coarsen_items[ircount] = &(d_coarsen_classes->getCoarsenItem(nc));
+      ircount++;
+   }
+
+}
+
+/*
+ * ***********************************************************************
+ *                                                                       *
+ * Private utility function to check coarsen items in initial setup to   *
+ * see whether source and destination patch data components have         *
+ * sufficient ghost cell widths to satisfy the "ghost width to coarsen"  *
+ * functionality described in the CoarsenAlgorithm class header.   *
+ * Specifically, the destination data must have a ghost cell width at    *
+ * least as large as the ghost cell width to coarsen.  The source data   *
+ * must have a ghost cell width at least as large as the ghost cell      *
+ * width to coarsen refined to the source (finer) level index space.     *
+ * Other checks are also performed here by calling the                   *
+ * CoarsenClasses::checkCoarsenItem() routine.                     *
+ *                                                                       *
+ * ***********************************************************************
+ */
+
+void CoarsenSchedule::initialCheckCoarsenClassItems() const
+{
+   const tbox::Dimension& dim(d_crse_level->getDim());
+
+   tbox::Pointer<hier::PatchDescriptor> pd = d_crse_level->getPatchDescriptor();
+
+   hier::IntVector user_gcw(dim, 0);
+   if (d_coarsen_patch_strategy) {
+      user_gcw = d_coarsen_patch_strategy->getCoarsenOpStencilWidth();
+   }
+
+   for (size_t ici = 0; ici < d_number_coarsen_items; ici++) {
+
+      const xfer::CoarsenClasses::Data * const crs_item = d_coarsen_items[ici];
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      if (d_coarsen_classes->checkCoarsenItem(*crs_item, pd)) {
+#endif
+
+      const int dst_id = crs_item->d_dst;
+      const int src_id = crs_item->d_src;
+
+      tbox::Pointer<hier::PatchDataFactory> dfact =
+         pd->getPatchDataFactory(dst_id);
+      tbox::Pointer<hier::PatchDataFactory> sfact =
+         pd->getPatchDataFactory(src_id);
+
+      const hier::IntVector& dst_gcw(dfact->getGhostCellWidth());
+      const hier::IntVector& src_gcw(sfact->getGhostCellWidth());
+
+      if (crs_item->d_gcw_to_coarsen > dst_gcw) {
+         TBOX_ERROR("Bad data given to CoarsenSchedule...\n"
+            << "`ghost cell width to coarsen' specified in\n"
+            << "registration of `Destination' patch data "
+            << pd->mapIndexToName(dst_id)
+            << " with CoarsenAlgorithm\n"
+            << " is larger than ghost cell width of data \n"
+            << "d_gcw_to_coarsen = " << crs_item->d_gcw_to_coarsen
+            << "\n data ghost cell width = " << dst_gcw << std::endl);
+      }
+
+      if ((crs_item->d_gcw_to_coarsen * d_ratio_between_levels) > src_gcw) {
+         TBOX_ERROR("Bad data given to CoarsenSchedule...\n"
+            << "`Source' patch data " << pd->mapIndexToName(src_id)
+            << " has ghost cell width too small to support the\n"
+            << "`ghost cell width to coarsen' specified in"
+            << " registration with CoarsenAlgorithm\n"
+            << "data ghost cell width = " << src_gcw
+            << "d_gcw_to_coarsen = " << crs_item->d_gcw_to_coarsen
+            << "\nratio between levels = " << d_ratio_between_levels
+            << "\n Thus, data ghost width must be >= "
+            << (crs_item->d_gcw_to_coarsen * d_ratio_between_levels)
+            << std::endl);
+      }
+
+      if (user_gcw > src_gcw) {
+         TBOX_ERROR("Bad data given to CoarsenSchedule...\n"
+            << "User supplied coarsen stencil width = "
+            << user_gcw
+            << "\nis larger than ghost cell width of `Source'\n"
+            << "patch data " << pd->mapIndexToName(src_id)
+            << " , which is " << src_gcw << std::endl);
+      }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   }
+#endif
+
+   }
+
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Private utility function to clear array of coarsen items.              *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void CoarsenSchedule::clearCoarsenItems()
+{
+   if (d_coarsen_items) {
+      for (size_t ici = 0; ici < d_number_coarsen_items; ici++) {
+         d_coarsen_items[ici] = (xfer::CoarsenClasses::Data *)NULL;
+      }
+      delete[] d_coarsen_items;
+      d_coarsen_items = (const xfer::CoarsenClasses::Data **)NULL;
+      d_number_coarsen_items = 0;
+   }
+}
+
+/*
+ **************************************************************************
+ * Private utility function to access overlap connectors between two
+ * MappedBoxLevels.  The Connector must be appropriately registered and
+ * be unique.
+ **************************************************************************
+ */
+
+const hier::Connector *CoarsenSchedule::getOverlapConnector_strict(
+   const hier::MappedBoxLevel& base,
+   const hier::MappedBoxLevel& head,
+   const hier::IntVector& min_gcw) const
+{
+   const Connector* found =
+      &base.getPersistentOverlapConnectors().findConnector(head, min_gcw);
+   TBOX_ASSERT(found != NULL);
+   TBOX_ASSERT(found->getConnectorWidth() >= min_gcw);
+   return found;
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Print coarsen schedule data to the specified output stream.		  *
+ *									  *
+ * ************************************************************************
+ */
+
+void CoarsenSchedule::printClassData(
+   std::ostream& stream) const
+{
+   stream << "CoarsenSchedule::printClassData()" << std::endl;
+   stream << "---------------------------------------" << std::endl;
+   stream << "s_schedule_generation_method = "
+          << s_schedule_generation_method << std::endl;
+   stream << "d_fill_coarse_data = " << d_fill_coarse_data << std::endl;
+
+   d_coarsen_classes->printClassData(stream);
+
+   d_schedule->printClassData(stream);
+
+   if (d_fill_coarse_data) {
+      stream
+      <<
+      "Printing pre-coarsen refine algorithm that fills data before coarsening...\n";
+      d_precoarsen_refine_algorithm->printClassData(stream);
+      stream
+      <<
+      "Printing pre-coarsen refine schedule that fills data before coarsening...\n";
+      d_precoarsen_refine_schedule->printClassData(stream);
+   }
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+
+void CoarsenSchedule::initializeCallback()
+{
+   t_coarsen_data = tbox::TimerManager::getManager()->
+      getTimer("xfer::CoarsenSchedule::coarsenData()");
+   t_gen_sched_n_squared = tbox::TimerManager::getManager()->
+      getTimer("xfer::CoarsenSchedule::generateScheduleNSquared()");
+   t_gen_sched_dlbg = tbox::TimerManager::getManager()->
+      getTimer("xfer::CoarsenSchedule::generateScheduleDLBG()");
+   t_invert_edges = tbox::TimerManager::getManager()->
+      getTimer("xfer::CoarsenSchedule::generate...()_invert_edges");
+}
+
+/*
+ ***************************************************************************
+ *
+ * Release static timers.  To be called by shutdown registry to make sure
+ * memory for timers does not leak.
+ *
+ ***************************************************************************
+ */
+
+void CoarsenSchedule::finalizeCallback()
+{
+   t_coarsen_data.setNull();
+   t_gen_sched_n_squared.setNull();
+   t_gen_sched_dlbg.setNull();
+   t_invert_edges.setNull();
+}
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/CoarsenSchedule.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/CoarsenSchedule.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,500 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Coarsening schedule for data transfer between AMR levels 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_CoarsenSchedule
+#define included_xfer_CoarsenSchedule
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/ComponentSelector.h"
+#include "SAMRAI/hier/Connector.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Schedule.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/xfer/CoarsenClasses.h"
+#include "SAMRAI/xfer/CoarsenPatchStrategy.h"
+#include "SAMRAI/xfer/RefineAlgorithm.h"
+#include "SAMRAI/xfer/RefineSchedule.h"
+#include "SAMRAI/xfer/CoarsenTransactionFactory.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Class CoarsenSchedule performs the communication operations
+ * to coarsen data from a finer level to a coarser level.
+ *
+ * Data is typically coarsened from the interiors of source patch
+ * components on the source patch level into interiors of destination
+ * patch components on the destination level.  Variations are possible
+ * for special situations; see the CoarsenAlgorithm class header for
+ * more information.  Generally, the source patch data must contain
+ * sufficient ghost cells to satisfy the coarsening operators
+ * involved.  If a coarsen operator has a non-zero ghost cell width,
+ * then the source ghost cells must be filled before the coarsen
+ * schedule is executed.  The communication schedule is executed by
+ * calling member function coarsenData().
+ *
+ * Each schedule object is typically created by a coarsen algorithm
+ * and represents communication dependencies for a particular
+ * configuration of the AMR hierarchy.  The communication schedule is
+ * only valid for that particular configuration and must be
+ * regenerated when the AMR patch hierarchy changes.  As long as the
+ * patch levels involved in the creation of the schedule remain
+ * unchanged, the schedule may be used for multiple communication
+ * cycles.  For more information about creating refine schedules, see
+ * the CoarsenAlgorithm header file.
+ *
+ * NOTE: Algorithmic variations are available by calling the static method
+ *       CoarsenSchedule::setScheduleGenerationMethod(), which
+ *       sets the option for all instances of the class.
+ *
+ * @see xfer::CoarsenAlgorithm
+ * @see xfer::CoarsenPatchStrategy
+ * @see xfer::CoarsenClasses
+ */
+
+class CoarsenSchedule:public tbox::DescribedClass
+{
+public:
+   /*!
+    * @brief Constructor
+    *
+    * Creates a coarsen schedule that coarsens data from source patch data
+    * components on the fine level into the destination patch data components
+    * on the coarse level.
+    *
+    * In general, this constructor is called by a CoarsenAlgorithm object.
+    * For possible variations on data coarsening, see the CoarsenAlgorithm
+    * class header information.
+    *
+    * If the coarsening operators require data from ghost cells, then the
+    * associated source patch data components must have a sufficient ghost
+    * cell width and and they must be filled with valid data before calling
+    * coarsenData().
+    *
+    * When assertion checking is active, unrecoverable assertions will result
+    * if either patch level pointer, the refine classes pointer, or the
+    * transaction factory pointer, is null.
+    *
+    * @param[in] crse_level      Pointer to coarse (destination) patch level.
+    * @param[in] fine_level      Pointer to fine (source) patch level.
+    * @param[in] coarsen_classes Pointer to structure containing patch data and
+    *                            operator information.  In general, this is
+    *                            constructed by the calling CoarsenAlgorithm
+    *                            object.
+    * @param[in] transaction_factory  Pointer to a factory object that will
+    *                                 create data transactions.
+    * @param[in] patch_strategy  Pointer to a coarsen patch strategy object
+    *                            that provides user-defined coarsen operations. 
+    *                            This pointer may be null, in which case no
+    *                            user-defined coarsen operations will be
+    *                            performed.
+    * @param[in] fill_coarse_data  Boolean indicating whether coarse data
+    *                              should be filled before coarsening
+    *                              operations are done.
+    */
+   explicit CoarsenSchedule(
+      tbox::Pointer<hier::PatchLevel> crse_level,
+      tbox::Pointer<hier::PatchLevel> fine_level,
+      const tbox::Pointer<xfer::CoarsenClasses> coarsen_classes,
+      tbox::Pointer<xfer::CoarsenTransactionFactory> transaction_factory,
+      xfer::CoarsenPatchStrategy* patch_strategy,
+      bool fill_coarse_data);
+
+   /*!
+    * @brief The virtual destructor for the schedule releases all internal
+    * storage.
+    */
+   virtual ~CoarsenSchedule();
+
+   /*!
+    * @brief Reset this coarsen schedule to perform data transfers asssociated
+    * items in the given CoarsenClasses argument.
+    *
+    * The schedule will be changed to operate on data given by the 
+    * coarsen_classes argument rather than the data it has previously been 
+    * set to operate on.
+    *
+    * @param[in] coarsen_classes  Pointer to structure containing patch data and
+    *                             operator information.  In general, this is
+    *                             constructed by the calling CoarsenAlgorithm
+    *                             object.  This pointer must be non-null.
+    */
+   void
+   reset(
+      const tbox::Pointer<xfer::CoarsenClasses> coarsen_classes);
+
+   /*!
+    * @brief Execute the stored communication schedule and perform the data
+    * movement.
+    */
+   void
+   coarsenData() const;
+
+   /*!
+    * @brief Return the coarsen equivalence classes used in the schedule.
+    */
+   const tbox::Pointer<xfer::CoarsenClasses>&
+   getEquivalenceClasses() const;
+
+   /*!
+    * @brief Static function to set box intersection algorithm to use during
+    * schedule construction for all CoarsenSchedule objects.
+    *
+    * If this method is not called, the default will be used.  If an invalid
+    * string is passed, an unrecoverable error will result.
+    *
+    * @param[in] method  string identifying box intersection method.  Valid
+    *                    choices are:  "DLBG" (default case),
+    *                    and "ORIG_NSQUARED".   More details can be found below
+    *                    in the comments for the generateSchedule() routine.
+    */
+   static void
+   setScheduleGenerationMethod(
+      const std::string& method);
+
+   /*!
+    * @brief Print the coarsen schedule state to the specified data stream.
+    *
+    * @param[out] stream Output data stream.
+    */
+   virtual void
+   printClassData(
+      std::ostream& stream) const;
+
+private:
+   CoarsenSchedule(
+      const CoarsenSchedule&);              // not implemented
+   void
+   operator = (
+      const CoarsenSchedule&);                    // not implemented
+
+   /*!
+    * @brief Set up things for the entire class.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   initializeCallback();
+
+   /*!
+    * Free static timers.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   finalizeCallback();
+
+   //! @brief Shorthand typedef.
+   typedef hier::MappedBox MappedBox;
+   //! @brief Shorthand typedef.
+   typedef hier::LocalId LocalId;
+   //! @brief Shorthand typedef.
+   typedef hier::MappedBoxLevel MappedBoxLevel;
+   //! @brief Shorthand typedef.
+   typedef hier::Connector Connector;
+   //! @brief Shorthand typedef.
+   typedef hier::Connector::NeighborSet NeighborSet;
+   //! @brief Mapping from a (potentially remote) MappedBox to a set of neighbors.
+   typedef std::map<MappedBox, NeighborSet> FullNeighborhoodSet;
+
+   /*!
+    * @brief Main schedule generation routine for moving data from temporary
+    * level to destination level.
+    *
+    * This function passes control to one of the algorithmic variations
+    * of schedule generation based on the which method of generation is
+    * selected.
+    *
+    * The resulting communication schedule will move source patch data from a
+    * temporary coarse level (i.e., coarsened version of fine level) into the
+    * destination patch data of the destination (coarse) level.
+    *
+    * The generateSchedule() routine invokes various versions of the schedule
+    * generation process implemented in the similarly named routines below
+    * based on the chosen schedule generation method. The different options
+    * will not change the result of the application but may improve its
+    * performance, especially for large numbers of processors.  Note that the
+    * algorithm choice may be changed by calling the
+    * setScheduleGenerationMethod() routine.
+    *
+    * The possibilities are as follows:
+    *
+    * <ul>
+    *    <li>   if setScheduleGenerationMethod("DLBG") is called use
+    *           generateScheduleDLBG() to generate the schedule.
+    *           NOTE: THIS IS THE DEFAULT OPTION.
+    *
+    *    <li>   if setScheduleGenerationMethod("ORIG_NSQUARED") is called use
+    *           generateScheduleNSquared() to generate the schedule.
+    * </ul>
+    */
+   void
+   generateSchedule();
+
+   /*!
+    * @brief Generate schedule using N^2 algorithms to determing box
+    * intersections.
+    *
+    * This uses the original SAMRAI implementation which has a global view
+    * of all distributed patches and checks every box against every other.
+    */
+   void
+   generateScheduleNSquared();
+
+   /*!
+    * @brief Generate schedule using distributed data.
+    *
+    * This uses the DLBG distributed algortion to determine which source
+    * patches contributed data to each destination patch and to compute
+    * unfilled_boxes.
+    */
+   void
+   generateScheduleDLBG();
+
+   /*!
+    * @brief Generate a temporary coarse level by coarsening the fine level.
+    *
+    * Note that this function does not allocate patch data storage.
+    */
+   void
+   generateTemporaryLevel();
+
+   /*!
+    * @brief Set up refine algorithms to transfer coarsened data and to fill
+    * temporary coarse level before coarsening operations, if needed.
+    *
+    * This is used when fill_coarse_data is set to true in the constructor.
+    * The associated schedules are set in the generateSchedule() routine.
+    */
+   void
+   setupRefineAlgorithm();
+
+   /*!
+    * @brief Coarsen source patch data from the fine patch level into the
+    * source patch data on the coarse temporary patch level.
+    *
+    * @param[in] patch_strategy  Provides interface for user-defined functions
+    *                            that may be used for coarsening.  Can be
+    *                            null if no user-defined functions are needed.
+    */
+   void
+   coarsenSourceData(
+      xfer::CoarsenPatchStrategy* patch_strategy) const;
+
+   /*!
+    * @brief Calculate the maximum ghost cell width to grow boxes to check
+    * for overlaps.
+    */
+   hier::IntVector
+   getMaxGhostsToGrow() const;
+
+   /*!
+    * @brief Construct schedule transactions that communicate or copy coarsened
+    * data from temporary coarse level to the destination level.
+    *
+    * @param[in] dst_level      The destination level for the schedule
+    * @param[in] dst_mapped_box Owned by a Patch on the destination level
+    * @param[in] src_level      The temporary coarse level that will have
+    *                           coarsened data
+    * @param[in] src_mapped_box Owned by a Patch on the temporary coarse level
+    */
+   void
+   constructScheduleTransactions(
+      tbox::Pointer<hier::PatchLevel> dst_level,
+      const MappedBox& dst_mapped_box,
+      tbox::Pointer<hier::PatchLevel> src_level,
+      const MappedBox& src_mapped_box);
+
+   /*!
+    * @brief Restructure the neighborhood sets from a src_to_dst Connector
+    * so they can be used in schedule generation.
+    *
+    * First, this puts the neighborhood set data in src_to_dst into dst-major
+    * order so the src owners can easily loop through the dst-src edges in the
+    * same order that dst owners see them.  Transactions must have the same
+    * order on the sending and receiving processors.
+    *
+    * Section, it shifts periodic image dst mapped_boxes back to the zero-shift
+    * position, and applies a similar shift to src mapped_boxes so that the
+    * overlap is unchanged.  The constructScheduleTransactions method requires
+    * all shifts to be absorbed in the src mapped_box.
+    *
+    * The restructured neighboorhood sets are added to the output parameter.
+    *
+    * @param[out] full_inverted_edges 
+    * @param[in]  src_to_dst
+    */
+   void
+   restructureNeighborhoodSetsByDstNodes(
+      FullNeighborhoodSet& full_inverted_edges,
+      const Connector& src_to_dst) const;
+
+   /*!
+    * @brief Utility function to set up local copies of coarsen items.
+    *
+    * An array of coarsen data items obtained from the CoarsenClasses object
+    * is stored locally here to facilitate interaction with transactions.
+    *
+    * @param[in] coarsen_classes
+    */
+   void
+   setCoarsenItems(
+      const tbox::Pointer<xfer::CoarsenClasses> coarsen_classes);
+
+   /*!
+    * @brief Utility function to clear local copies of coarsen items.
+    */
+   void
+   clearCoarsenItems();
+
+   /*!
+    * @brief Utility function to check coarsen items to see whether their
+    * patch data components have sufficient ghost width.
+    *
+    * Specifically, the destination data must have a ghost cell width at least
+    * as large as the coarsen item's d_gcw_to_coarsen data member.  The source 
+    * data must have a ghost cell width at least as large as d_gcw_to_coarsen
+    * refined to the source (finer) level index space.  Also, if their are
+    * any user-defined coarsening operations provided through the
+    * CoarsenPatchStrategy interface, the source ghost cell width must be
+    * at least as large as the stencil of those user-defined operations.
+    *
+    * If any of the tested ghost cell widths are insufficient, an error
+    * will occur with a descriptive message.
+    */
+   void
+   initialCheckCoarsenClassItems() const;
+
+   /*
+    * @brief Similar to getOverlapConnector() but requires that the
+    * Connector is found.
+    * 
+    * @deprecated  Private method doesn't appear to be used.
+    */
+   const hier::Connector *
+   getOverlapConnector_strict(
+      const hier::MappedBoxLevel& base,
+      const hier::MappedBoxLevel& head,
+      const hier::IntVector& min_gcw) const;
+
+   /*!
+    * @brief Selects algorithm used to generate communication schedule.
+    */
+   static std::string s_schedule_generation_method;
+
+   /*!
+    * @brief Structures that store coarsen data items.
+    */
+   tbox::Pointer<xfer::CoarsenClasses> d_coarsen_classes;
+
+   /*!
+    * @brief number of coarsen data items
+    */
+   size_t d_number_coarsen_items;
+
+   /*!
+    * @brief used as array to store copy of coarsen data items.
+    */
+   const xfer::CoarsenClasses::Data** d_coarsen_items;
+
+   /*!
+    * @brief Cached pointers to the coarse, fine, and temporary patch levels.
+    */
+   tbox::Pointer<hier::PatchLevel> d_crse_level;
+   tbox::Pointer<hier::PatchLevel> d_fine_level;
+   tbox::Pointer<hier::PatchLevel> d_temp_crse_level;
+
+   /*!
+    * @brief Connector from temporary (coarsened fine) mapped_box_level
+    * to coarse mapped_box_level.
+    */
+   Connector d_temp_to_coarse;
+
+   /*!
+    * @brief Connector from coarse mapped_box_level to temporary
+    * (coarsened fine) mapped_box_level.
+    */
+   Connector d_coarse_to_temp;
+
+   /*!
+    * @brief Object supporting interface to user-defined spatial data
+    * coarsening operations.
+    */
+   CoarsenPatchStrategy* d_coarsen_patch_strategy;
+
+   /*!
+    * @brief Factory object used to create data transactions when schedule is 
+    * constructed.
+    */
+   tbox::Pointer<CoarsenTransactionFactory> d_transaction_factory;
+
+   /*!
+    * @brief Cached ratio between source (fine) level and destination (coarse)
+    * level.
+    */
+   hier::IntVector d_ratio_between_levels;
+
+   /*!
+    * @brief Source patch data indices for rapid data allocation/deallocation.
+    */
+   hier::ComponentSelector d_sources;
+
+   /*!
+    * @brief Level-to-level communication schedule between the temporary coarse
+    * level and (actual) destination level.
+    */
+   tbox::Pointer<tbox::Schedule> d_schedule;
+
+   /*!
+    * @brief Boolean indicating whether source data on the coarse temporary
+    * level must be filled before coarsening operations (see comments for class
+    * constructor).
+    */
+   bool d_fill_coarse_data;
+
+   /*!
+    * @brief Algorithm used to set up schedule to fill temporary level if
+    * d_fill_coarse_data is true.
+    */
+   tbox::Pointer<RefineAlgorithm> d_precoarsen_refine_algorithm;
+
+   /*!
+    * @brief Schedule used to fill temporary level if d_fill_coarse_data is
+    * true.
+    */
+   tbox::Pointer<RefineSchedule> d_precoarsen_refine_schedule;
+
+   //@{
+
+   /*!
+    * @name Timer objects for performance measurement.
+    */
+   static tbox::Pointer<tbox::Timer> t_coarsen_data;
+   static tbox::Pointer<tbox::Timer> t_gen_sched_n_squared;
+   static tbox::Pointer<tbox::Timer> t_gen_sched_dlbg;
+   static tbox::Pointer<tbox::Timer> t_invert_edges;
+
+   //*}
+
+   static tbox::StartupShutdownManager::Handler
+   s_initialize_finalize_handler;
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/CoarsenTransactionFactory.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/CoarsenTransactionFactory.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,38 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface for factory objects that create transactions for
+ *                oarsen schedules. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_CoarsenTransactionFactory_C
+#define included_xfer_CoarsenTransactionFactory_C
+
+#include "SAMRAI/xfer/CoarsenTransactionFactory.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default constructor and destructor.                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+CoarsenTransactionFactory::CoarsenTransactionFactory()
+{
+}
+
+CoarsenTransactionFactory::~CoarsenTransactionFactory()
+{
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/CoarsenTransactionFactory.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/CoarsenTransactionFactory.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,119 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface for factory objects that create transactions for
+ *                oarsen schedules. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_CoarsenTransactionFactory
+#define included_xfer_CoarsenTransactionFactory
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/CoarsenClasses.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/MappedBox.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/Transaction.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Abstract base class defining the interface for all concrete transaction
+ * factory objects that generate data transaction objects used with a CoarsenSchedule
+ * object.  A concrete subclass will allocate new transaction objects.  This class
+ * is an example of the ``Abstract Factory'' method described in the Design Patterns
+ * book by Gamma, et al.
+ *
+ * To add a new type of Transaction object MyCoarsenTransaction:
+ *
+ * -# Implement a concrete CoarsenTransactionFactory object as a subclass
+ *       that is derived from this CoarsenTransactionFactory base class.
+ *       Implement the abstract virtual functions as appropriate for the
+ *       concrete subclass; in particular, the allocate() function must return
+ *       a new instance of the desired transaction object.
+ * -# The type of the transaction allocated by the concrete factory is a
+ *       Transaction<DIM>.  Thus, the new transaction object must be derived
+ *       from the Transaction<DIM> base class and implement the abstract
+ *       virtual functions declared by the base class.
+ *
+ * @see tbox::Transaction
+ */
+
+class CoarsenTransactionFactory:public tbox::DescribedClass
+{
+public:
+   /*!
+    * @brief Default constructor.
+    */
+   CoarsenTransactionFactory();
+
+   /*!
+    * @brief Virtual destructor.
+    */
+   virtual ~CoarsenTransactionFactory();
+
+   /*!
+    * @brief Pure virtual function to set the array of CoarsenClass::Data items
+    * associated with the coarsen schedule.  Typical concrete transactions used by
+    * the schedule use this information to communicate data.  This operation
+    * is called by the coarsen schedule during the execution of the
+    * CoarsenSchedule::fillData() routine before data communication
+    * operations begin.
+    */
+   virtual void
+   setCoarsenItems(
+      const CoarsenClasses::Data** coarsen_items,
+      int num_coarsen_items) = 0;
+
+   /*!
+    * @brief Pure virtual function to clear the array of CoarsenClass::Data items
+    * associated with the coarsen schedule.  This operation is called by the
+    * coarsen schedule after data communication operations are complete.
+    */
+   virtual void
+   unsetCoarsenItems() = 0;
+
+   /*!
+    * @brief Pure virtual function to allocate a concrete coarsen transaction object.
+    * This routine is called by the coarsen schedule during construction of the
+    * schedule.
+    *
+    * @param dst_level      tbox::Pointer to destination patch level.
+    * @param src_level      tbox::Pointer to source patch level.
+    * @param overlap        tbox::Pointer to overlap region between patches.
+    * @param dst_patch_id   Integer index of destination patch in destination
+    *                       patch level.
+    * @param src_patch_id   Integer index of source patch in source patch level.
+    * @param citem_id       Integer index of CoarsenClass::Data item associated
+    *                       with transaction.
+    */
+   virtual tbox::Pointer<tbox::Transaction>
+   allocate(
+      tbox::Pointer<hier::PatchLevel> dst_level,
+      tbox::Pointer<hier::PatchLevel> src_level,
+      tbox::Pointer<hier::BoxOverlap> overlap,
+      const hier::MappedBox& dst_mapped_box,
+      const hier::MappedBox& src_mapped_box,
+      int citem_id) const = 0;
+
+private:
+   CoarsenTransactionFactory(
+      const CoarsenTransactionFactory&);                        // not implemented
+   void
+   operator = (
+      const CoarsenTransactionFactory&);                  // not implemented
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/Geometry.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/Geometry.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,263 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Base class for interface between transfer ops and geometry. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_Geometry_C
+#define included_xfer_Geometry_C
+
+#include "SAMRAI/xfer/Geometry.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor and destructor for Geometry objects.                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+Geometry::Geometry(
+   const tbox::Dimension& dim,
+   const std::string& object_name):
+   hier::GridGeometry(dim, object_name),
+   d_min_stencil_width(dim, 0)
+{
+}
+
+Geometry::~Geometry()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Add operator to appropriate lookup list.                              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Geometry::addSpatialCoarsenOperator(
+   tbox::Pointer<CoarsenOperator> coarsen_op)
+{
+   d_coarsen_operators.addItem(coarsen_op);
+}
+
+void Geometry::addSpatialRefineOperator(
+   tbox::Pointer<RefineOperator> refine_op)
+{
+   d_refine_operators.addItem(refine_op);
+}
+
+void Geometry::addTimeInterpolateOperator(
+   tbox::Pointer<TimeInterpolateOperator> time_op)
+{
+   d_time_operators.addItem(time_op);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Search operator lists for operator matching request.                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<CoarsenOperator>
+Geometry::lookupCoarsenOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_ASSERT(!var.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   tbox::Pointer<CoarsenOperator> coarsen_op(NULL);
+   bool found_op = false;
+
+   if ((op_name == "NO_COARSEN") ||
+       (op_name == "USER_DEFINED_COARSEN") ||
+       (op_name.empty())) {
+      found_op = true;
+   } else {
+
+      tbox::List<tbox::Pointer<CoarsenOperator> >::Iterator
+      lop = d_coarsen_operators.listStart();
+
+      while (coarsen_op.isNull() && lop) {
+         if (lop()->findCoarsenOperator(var, op_name)) {
+            found_op = true;
+            coarsen_op = lop();
+         }
+         lop++;
+      }
+   }
+
+   if (!found_op) {
+      TBOX_ERROR(
+         "Coarsen operator '" << op_name
+         << "' not found for variable '"
+         << var->getName());
+   }
+
+   return coarsen_op;
+}
+
+tbox::Pointer<RefineOperator>
+Geometry::lookupRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   tbox::Pointer<RefineOperator> refine_op(NULL);
+   bool found_op = false;
+
+   if ((op_name == "NO_REFINE") ||
+       (op_name == "USER_DEFINED_REFINE") ||
+       (op_name.empty())) {
+      found_op = true;
+   } else {
+
+      tbox::List<tbox::Pointer<RefineOperator> >::Iterator
+      lop = d_refine_operators.listStart();
+
+      while (refine_op.isNull() && lop) {
+         if (lop()->findRefineOperator(var, op_name)) {
+            found_op = true;
+            refine_op = lop();
+         }
+         lop++;
+      }
+   }
+
+   if (!found_op) {
+      TBOX_ERROR(
+         "Refine operator '" << op_name
+         << "' not found for variable '"
+         << var->getName());
+   }
+
+   return refine_op;
+}
+
+tbox::Pointer<TimeInterpolateOperator>
+Geometry::lookupTimeInterpolateOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const std::string& op_name) const
+{
+   TBOX_ASSERT(!var.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *var);
+
+   tbox::Pointer<TimeInterpolateOperator> time_op(NULL);
+   bool found_op = false;
+
+   if ((op_name == "NO_TIME_INTERPOLATE") ||
+       (op_name.empty())) {
+      found_op = true;
+   } else {
+
+      tbox::List<tbox::Pointer<TimeInterpolateOperator> >::Iterator
+      lop = d_time_operators.listStart();
+
+      while (time_op.isNull() && lop) {
+         if (lop()->findTimeInterpolateOperator(var, op_name)) {
+            found_op = true;
+            time_op = lop();
+         }
+         lop++;
+      }
+   }
+
+   if (!found_op) {
+      TBOX_ERROR(
+         "Time interpolation operator '" << op_name
+         <<
+         "' not found for variable '" << var->getName());
+   }
+
+   return time_op;
+}
+
+/*
+ *************************************************************************
+ * Compute the max operator stencil width from all constructed
+ * refine and coarsen operators and the user-specified minimum value.
+ *************************************************************************
+ */
+hier::IntVector
+Geometry::getMaxTransferOpStencilWidth()
+{
+   hier::IntVector max_width(d_min_stencil_width);
+   max_width.max(RefineOperator::getMaxRefineOpStencilWidth(getDim()));
+   max_width.max(CoarsenOperator::getMaxCoarsenOpStencilWidth(getDim()));
+   return max_width;
+}
+
+/*
+ *************************************************************************
+ * Set the mininum value to be returned by
+ * getMaxTransferOpStencilWidth().
+ *************************************************************************
+ */
+
+void
+Geometry::setMinTransferOpStencilWidth(
+   const hier::IntVector& min_width)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(d_min_stencil_width, min_width);
+   d_min_stencil_width = min_width;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print CartesianGridGeometry class data.                               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Geometry::printClassData(
+   std::ostream& os) const
+{
+   os << "printing Geometry data..." << std::endl;
+   os << "Geometry: this = " << (Geometry *)this << std::endl;
+
+   os << "Coarsen operator list: " << std::endl;
+   tbox::List<tbox::Pointer<CoarsenOperator> >::Iterator
+   cop = d_coarsen_operators.listStart();
+   while (cop) {
+      os << (CoarsenOperator *)cop() << std::endl;
+      cop++;
+   }
+
+   os << "Refine operator list: " << std::endl;
+   tbox::List<tbox::Pointer<RefineOperator> >::Iterator
+   rop = d_refine_operators.listStart();
+   while (rop) {
+      os << (RefineOperator *)rop() << std::endl;
+      rop++;
+   }
+
+   os << "Time interpolate operator list: " << std::endl;
+   tbox::List<tbox::Pointer<TimeInterpolateOperator> >::Iterator
+   top = d_time_operators.listStart();
+   while (top) {
+      os << (TimeInterpolateOperator *)top() << std::endl;
+      top++;
+   }
+
+   hier::GridGeometry::printClassData(os);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/Geometry.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/Geometry.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,251 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Base class for interface between transfer ops and geometry. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_Geometry
+#define included_xfer_Geometry
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+#include "SAMRAI/hier/GridGeometry.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/tbox/List.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Class Geometry (derived from hier::GridGeometry> is the base
+ * class for SAMRAI geometry classes.  It is intended to serve as
+ * a base class for geometry classes defining specific coordinate
+ * system operations for an AMR grid hierarchy.
+ *
+ * This xfer Geometry class provides a lookup mechanism to search
+ * for time interpolation and spatial coarsening/refining operators.
+ * That is, algorithms and applications that manage communication on an
+ * AMR hierarchy may query the xfer::Geometry object for operators that
+ * may be applied to specific variables.
+ *
+ * Typically, the operators are assigned to the xfer::Geometry object in
+ * the constructor of the derived geometry object that defines the mesh
+ * coordinate system.
+ *
+ * @note
+ * <ol>
+ *   <li> Operators are added to the heads of the operator lists, so the most
+ *        recently added operator will be returned if more than one operator
+ *        satisfies a given request.
+ *   <li> Additional operators may be added to a transfer geometry object at
+ *        any time during program execution. However, each operator must be
+ *        added BEFORE it is requested or an unrecoverable assertion will be
+ *        thrown and the program will abort.
+ * </ol>
+ *
+ * See the time interpolation,spatial coarsening, and spatial refinement
+ * operator base classes for more information about adding new operators for
+ * either new patch data types or new operators for pre-existing patch data
+ * types.
+ *
+ * @see hier::GridGeometry
+ * @see xfer::RefineOperator
+ * @see xfer::CoarsenOperator
+ * @see xfer::TimeInterpolateOperator
+ */
+
+class Geometry:public hier::GridGeometry
+{
+public:
+   /*!
+    * @brief Set the state of the xfer::Geometry members and pass the
+    * dim and object_name to the parent (hier::GridGeometry).
+    *
+    * @param[in]  dim
+    * @param[in]  object_name
+    */
+   explicit Geometry(
+      const tbox::Dimension& dim,
+      const std::string& object_name);
+
+   /*!
+    * @brief virtual destructor
+    */
+   virtual ~Geometry();
+
+   /*!
+    * @brief Add a concrete spatial coarsening operator.
+    *
+    * @param[in]  coarsen_op The concrete coarsening operator to add to the
+    *             lookup list.
+    */
+   virtual void
+   addSpatialCoarsenOperator(
+      tbox::Pointer<CoarsenOperator> coarsen_op);
+
+   /*!
+    * @brief Add concrete spatial refinement operator.
+    *
+    * @param[in]  refine_op The concrete refinement operator to add to the
+    *             lookup list.
+    */
+   virtual void
+   addSpatialRefineOperator(
+      tbox::Pointer<RefineOperator> refine_op);
+
+   /*!
+    * @brief  Add concrete time interpolation operator.
+    *
+    * @param[in]  time_op The concrete time interpolation operator to add
+    *             to the lookup list.
+    */
+   virtual void
+   addTimeInterpolateOperator(
+      tbox::Pointer<TimeInterpolateOperator> time_op);
+
+   /*!
+    * @brief Lookup function for coarsening operator.
+    *
+    * Search list for the spatial coarsening operator matching the
+    * request for the given variable.  If the operator is found, a
+    * pointer to it will be returned.  Otherwise, an unrecoverable
+    * error will result and the program will abort.
+    *
+    * @param[in]     var The hier::Variable for which the corresponding
+    *                coarsening operator should match.
+    * @param[in]     op_name The string identifier of the coarsening operator.
+    */
+   virtual tbox::Pointer<CoarsenOperator>
+   lookupCoarsenOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /*!
+    * @brief Lookup function for refinement operator
+    *
+    * Search list for the spatial refinement operator matching the
+    * request for the given variable.  If the operator is found, a
+    * pointer to it will be returned.  Otherwise, an unrecoverable
+    * error will result and the program will abort.
+    *
+    * @param[in]     var The hier::Variable for which the corresponding
+    *                refinement operator should match.
+    * @param[in]     op_name The string identifier of the refinement operator.
+    */
+   virtual tbox::Pointer<RefineOperator>
+   lookupRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const;
+
+   /*!
+    * @brief Lookup function for time interpolation operator.
+    *
+    * Search list for the time interpolation operator matching the
+    * request for the given variable.  If the operator is found, a
+    * pointer to it will be returned.  Otherwise, an unrecoverable
+    * error will result and the program will abort.
+    *
+    * @param[in]     var The hier::Variable for which the corresponding
+    *                time interpolation operator should match.
+    * @param[in]     op_name The string identifier of the time interpolation
+    *                operator.  \b Default: STD_LINEAR_TIME_INTERPOLATE
+    */
+   virtual tbox::Pointer<TimeInterpolateOperator>
+   lookupTimeInterpolateOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name =
+         "STD_LINEAR_TIME_INTERPOLATE") const;
+
+   /*!
+    * @brief Get the max stencil width of all transfer operators.
+    *
+    * The max stencil width computed from all registered (constructed)
+    * transfer operators.  This function is simply returns the max
+    * from the registered refine, coarsen and time-refine operators.
+    *
+    * @return The max stencil width computed from all registered
+    * operators.
+    *
+    * @see hier::GridGeometry::getMaxTransferOpStencilWidth().
+    * @see xfer::RefineOperator::getMaxRefineOpStencilWidth().
+    * @see xfer::CoarsenOperator::getMaxCoarsenOpStencilWidth().
+    */
+   hier::IntVector
+   getMaxTransferOpStencilWidth();
+
+   /*!
+    * @brief Set a minimum value on the value returned by
+    * getMaxTransferOpStencilWidth().
+    *
+    * This method allows users to specify a minimum value returned by
+    * getMaxTransferOpStencilWidth().  The default minimum is zero.
+    * This value can be used as a substitute for data that is not yet
+    * registered with the Geometry and therefore cannot be reflected
+    * in getMaxTransferOpStencilWidth().
+    *
+    * @param[in]  min_value The minimum value to set.
+    */
+   void
+   setMinTransferOpStencilWidth(
+      const hier::IntVector& min_value);
+
+   /*!
+    * @brief Print class data representation.
+    *
+    * @param[in]  os The std::ostream to print to.
+    */
+   virtual void
+   printClassData(
+      std::ostream& os) const;
+
+private:
+   /*
+    * The list of spatial coarsening operators is maintained to lookup
+    * operators for specific variables as requested by algorithms and/or
+    * applications using this transfer geometry object.  Standard concrete
+    * coarsening operators can be found in the patchdata package.
+    * Additional operators may be added to this list at any time
+    * (see addSpatialCoarsenOperator() function).
+    */
+   tbox::List<tbox::Pointer<CoarsenOperator> > d_coarsen_operators;
+
+   /*
+    * The list of spatial refinement operators is maintained to lookup
+    * operators for specific variables as requested by algorithms and/or
+    * applications using this transfer geometry object.  Standard concrete
+    * refinement operators can be found in the patchdata package.
+    * Additional operators may be added to this list at any time
+    * (see addSpatialRefineOperator() function).
+    */
+   tbox::List<tbox::Pointer<RefineOperator> > d_refine_operators;
+
+   /*
+    * The list of time interpolation operators is maintained to lookup
+    * operators for specific variables as requested by algorithms and/or
+    * applications using this transfer geometry object.  Standard concrete
+    * time interpolation operators can be found in the patchdata package.
+    * Additional operators may be added to this list at any time
+    * (see addTimeInterpolateOperator() function).
+    */
+   tbox::List<tbox::Pointer<TimeInterpolateOperator> > d_time_operators;
+
+   /*!
+    * @brief Value set by setMinTransferOpStencilWidth().
+    */
+   hier::IntVector d_min_stencil_width;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,4063 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=BoxGeometryVariableFillPattern.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	BoxGeometryVariableFillPattern.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=CoarsenAlgorithm.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/StandardCoarsenTransactionFactory.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	CoarsenAlgorithm.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=CoarsenClasses.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	CoarsenClasses.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=CoarsenCopyTransaction.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenCopyTransaction.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	CoarsenCopyTransaction.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
+FILE_4=CoarsenOperator.o
+DEPENDS_4:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h CoarsenOperator.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_4 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_4:X.o=${NDIM}.o}: ${DEPENDS_4}
+
+FILE_5=CoarsenPatchStrategy.o
+DEPENDS_5:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	CoarsenPatchStrategy.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_5 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_5:X.o=${NDIM}.o}: ${DEPENDS_5}
+
+FILE_6=CoarsenSchedule.o
+DEPENDS_6:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/OverlapConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenCopyTransaction.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	CoarsenSchedule.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_6 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_6:X.o=${NDIM}.o}: ${DEPENDS_6}
+
+FILE_7=CoarsenTransactionFactory.o
+DEPENDS_7:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	CoarsenTransactionFactory.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_7 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_7:X.o=${NDIM}.o}: ${DEPENDS_7}
+
+FILE_8=Geometry.o
+DEPENDS_8:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h Geometry.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_8 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_8:X.o=${NDIM}.o}: ${DEPENDS_8}
+
+FILE_9=MultiblockCoarsenAlgorithm.o
+DEPENDS_9:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/StandardCoarsenTransactionFactory.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	MultiblockCoarsenAlgorithm.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_9 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_9:X.o=${NDIM}.o}: ${DEPENDS_9}
+
+FILE_10=MultiblockCoarsenPatchStrategy.o
+DEPENDS_10:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h	\
+	MultiblockCoarsenPatchStrategy.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_10 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_10:X.o=${NDIM}.o}: ${DEPENDS_10}
+
+FILE_11=MultiblockCoarsenSchedule.o
+DEPENDS_11:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/OverlapConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchInteriorVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFullFillPattern.I		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFullFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	MultiblockCoarsenSchedule.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_11 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_11:X.o=${NDIM}.o}: ${DEPENDS_11}
+
+FILE_12=MultiblockRefineAlgorithm.o
+DEPENDS_12:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFullFillPattern.I		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFullFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/StandardRefineTransactionFactory.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	MultiblockRefineAlgorithm.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_12 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_12:X.o=${NDIM}.o}: ${DEPENDS_12}
+
+FILE_13=MultiblockRefinePatchStrategy.o
+DEPENDS_13:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	MultiblockRefinePatchStrategy.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_13 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_13:X.o=${NDIM}.o}: ${DEPENDS_13}
+
+FILE_14=MultiblockRefineSchedule.o
+DEPENDS_14:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/OverlapConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFullFillPattern.I		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFullFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/StandardRefineTransactionFactory.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	MultiblockRefineSchedule.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_14 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_14:X.o=${NDIM}.o}: ${DEPENDS_14}
+
+FILE_15=PatchInteriorVariableFillPattern.o
+DEPENDS_15:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchInteriorVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	PatchInteriorVariableFillPattern.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_15 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_15:X.o=${NDIM}.o}: ${DEPENDS_15}
+
+FILE_16=PatchLevelBorderAndInteriorFillPattern.o
+DEPENDS_16:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelBorderAndInteriorFillPattern.I\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelBorderAndInteriorFillPattern.h\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	PatchLevelBorderAndInteriorFillPattern.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_16 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_16:X.o=${NDIM}.o}: ${DEPENDS_16}
+
+FILE_17=PatchLevelBorderFillPattern.o
+DEPENDS_17:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelBorderFillPattern.I	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelBorderFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	PatchLevelBorderFillPattern.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_17 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_17:X.o=${NDIM}.o}: ${DEPENDS_17}
+
+FILE_18=PatchLevelEnhancedFillPattern.o
+DEPENDS_18:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelEnhancedFillPattern.I	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelEnhancedFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	PatchLevelEnhancedFillPattern.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_18 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_18:X.o=${NDIM}.o}: ${DEPENDS_18}
+
+FILE_19=PatchLevelFillPattern.o
+DEPENDS_19:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	PatchLevelFillPattern.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_19 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_19:X.o=${NDIM}.o}: ${DEPENDS_19}
+
+FILE_20=PatchLevelFullFillPattern.o
+DEPENDS_20:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFullFillPattern.I		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFullFillPattern.h		\
+	PatchLevelFullFillPattern.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_20 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_20:X.o=${NDIM}.o}: ${DEPENDS_20}
+
+FILE_21=PatchLevelInteriorFillPattern.o
+DEPENDS_21:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelInteriorFillPattern.I	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelInteriorFillPattern.h	\
+	PatchLevelInteriorFillPattern.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_21 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_21:X.o=${NDIM}.o}: ${DEPENDS_21}
+
+FILE_22=RefineAlgorithm.o
+DEPENDS_22:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/OverlapConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFullFillPattern.I		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFullFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/StandardRefineTransactionFactory.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	RefineAlgorithm.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_22 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_22:X.o=${NDIM}.o}: ${DEPENDS_22}
+
+FILE_23=RefineClasses.o
+DEPENDS_23:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h RefineClasses.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_23 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_23:X.o=${NDIM}.o}: ${DEPENDS_23}
+
+FILE_24=RefineCopyTransaction.o
+DEPENDS_24:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineCopyTransaction.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	RefineCopyTransaction.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_24 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_24:X.o=${NDIM}.o}: ${DEPENDS_24}
+
+FILE_25=RefineOperator.o
+DEPENDS_25:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h RefineOperator.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_25 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_25:X.o=${NDIM}.o}: ${DEPENDS_25}
+
+FILE_26=RefinePatchStrategy.o
+DEPENDS_26:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	RefinePatchStrategy.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_26 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_26:X.o=${NDIM}.o}: ${DEPENDS_26}
+
+FILE_27=RefineSchedule.o
+DEPENDS_27:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxContainerUtils.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelConnectorUtils.I	\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelConnectorUtils.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappingConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/OverlapConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFullFillPattern.I		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFullFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineCopyTransaction.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineScheduleConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTimeTransaction.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	RefineSchedule.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_27 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_27:X.o=${NDIM}.o}: ${DEPENDS_27}
+
+FILE_28=RefineScheduleConnectorWidthRequestor.o
+DEPENDS_28:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineScheduleConnectorWidthRequestor.h\
+	RefineScheduleConnectorWidthRequestor.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_28 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_28:X.o=${NDIM}.o}: ${DEPENDS_28}
+
+FILE_29=RefineTimeTransaction.o
+DEPENDS_29:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTimeTransaction.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	RefineTimeTransaction.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_29 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_29:X.o=${NDIM}.o}: ${DEPENDS_29}
+
+FILE_30=RefineTransactionFactory.o
+DEPENDS_30:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	RefineTransactionFactory.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_30 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_30:X.o=${NDIM}.o}: ${DEPENDS_30}
+
+FILE_31=StandardCoarsenTransactionFactory.o
+DEPENDS_31:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenCopyTransaction.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/StandardCoarsenTransactionFactory.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	StandardCoarsenTransactionFactory.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_31 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_31:X.o=${NDIM}.o}: ${DEPENDS_31}
+
+FILE_32=StandardRefineTransactionFactory.o
+DEPENDS_32:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineCopyTransaction.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTimeTransaction.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/StandardRefineTransactionFactory.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	StandardRefineTransactionFactory.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_32 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_32:X.o=${NDIM}.o}: ${DEPENDS_32}
+
+FILE_33=TimeInterpolateOperator.o
+DEPENDS_33:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	TimeInterpolateOperator.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_33 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_33:X.o=${NDIM}.o}: ${DEPENDS_33}
+
+FILE_34=VariableFillPattern.o
+DEPENDS_34:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	VariableFillPattern.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_34 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_34:X.o=${NDIM}.o}: ${DEPENDS_34}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,67 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   primary makefile for compiling the SAMRAI xfer package 
+##
+#########################################################################
+
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/SAMRAI/xfer
+VPATH         = @srcdir@
+OBJECT        = ../../..
+
+default: library
+
+include $(OBJECT)/config/Makefile.config
+
+SUBDIRS = fortran
+
+OBJS =  BoxGeometryVariableFillPattern.o \
+        PatchInteriorVariableFillPattern.o		\
+        PatchLevelFullFillPattern.o		\
+        PatchLevelBorderFillPattern.o		\
+        PatchLevelBorderAndInteriorFillPattern.o		\
+        PatchLevelEnhancedFillPattern.o		\
+        PatchLevelInteriorFillPattern.o		\
+        PatchLevelFillPattern.o		\
+        VariableFillPattern.o		\
+	MultiblockCoarsenAlgorithm.o \
+	MultiblockCoarsenSchedule.o \
+	MultiblockRefineAlgorithm.o \
+	MultiblockRefineSchedule.o \
+	RefineAlgorithm.o \
+	CoarsenAlgorithm.o \
+	RefineSchedule.o \
+	RefineScheduleConnectorWidthRequestor.o \
+	CoarsenSchedule.o \
+	RefineTimeTransaction.o \
+	MultiblockRefinePatchStrategy.o \
+	RefineCopyTransaction.o \
+	StandardRefineTransactionFactory.o \
+	RefineTransactionFactory.o \
+	RefinePatchStrategy.o \
+	RefineClasses.o \
+	MultiblockCoarsenPatchStrategy.o \
+	MultiblockCoarsenAlgorithm.o \
+	CoarsenCopyTransaction.o \
+	StandardCoarsenTransactionFactory.o \
+	CoarsenTransactionFactory.o \
+	CoarsenPatchStrategy.o \
+	CoarsenClasses.o \
+	Geometry.o \
+	CoarsenOperator.o \
+	RefineOperator.o \
+	TimeInterpolateOperator.o
+
+library: $(OBJS)
+	for DIR in $(SUBDIRS); do if test -d $$DIR; then (cd $$DIR && $(MAKE) $@) ; fi || exit 1; done
+clean:
+	$(SAMCLEAN)
+	for DIR in $(SUBDIRS); do if test -d $$DIR; then (cd $$DIR && $(MAKE) $@) ; fi || exit 1; done
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/MultiblockCoarsenAlgorithm.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/MultiblockCoarsenAlgorithm.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,150 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Coarsening algorithm for data transfer between AMR levels 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_MultiblockCoarsenAlgorithm_C
+#define included_xfer_MultiblockCoarsenAlgorithm_C
+
+#include "SAMRAI/xfer/MultiblockCoarsenAlgorithm.h"
+
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/xfer/StandardCoarsenTransactionFactory.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The constructor creates a new xfer::CoarsenClasses object             *
+ * and caches a boolean indiating whether to copy data to the            *
+ * destination space on the coarse level before coarsening.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+MultiblockCoarsenAlgorithm::MultiblockCoarsenAlgorithm(
+   tbox::Pointer<hier::MultiblockPatchHierarchy> multiblock,
+   bool fill_coarse_data):
+   d_coarsen_classes(new xfer::CoarsenClasses(d_fill_coarse_data)),
+   d_multiblock(multiblock),
+   d_fill_coarse_data(fill_coarse_data)
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * The destructor implicitly deallocates the list data.                  *
+ *									*
+ *************************************************************************
+ */
+
+MultiblockCoarsenAlgorithm::~MultiblockCoarsenAlgorithm()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register a coarsening operation with the coarsening algorithm.        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MultiblockCoarsenAlgorithm::registerCoarsen(
+   const int dst,
+   const int src,
+   const tbox::Pointer<xfer::CoarsenOperator> opcoarsen,
+   const hier::IntVector& gcw_to_coarsen,
+   tbox::Pointer<VariableFillPattern> var_fill_pattern)
+{
+   const tbox::Dimension& dim(d_multiblock->getDim());
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, gcw_to_coarsen);
+
+   xfer::CoarsenClasses::Data data(dim);
+
+   data.d_dst = dst;
+   data.d_src = src;
+   data.d_gcw_to_coarsen = gcw_to_coarsen;
+   data.d_opcoarsen = opcoarsen;
+
+   hier::VariableDatabase* var_db = hier::VariableDatabase::getDatabase();
+
+   tbox::Pointer<hier::Variable> var;
+   if (!var_db->mapIndexToVariable(dst, var)) {
+      TBOX_ERROR("MultiblockCoarsenAlgorithm::registerCoarsen error..."
+         << "\nNo variable associated with dst patch data index." << std::endl);
+   }
+
+   data.d_fine_bdry_reps_var = var->fineBoundaryRepresentsVariable();
+   if (!(var_fill_pattern.isNull())) {
+      data.d_var_fill_pattern = var_fill_pattern;
+   } else {
+      data.d_var_fill_pattern = new BoxGeometryVariableFillPattern();
+   }
+
+   d_coarsen_classes->insertEquivalenceClassItem(data);
+}
+
+void MultiblockCoarsenAlgorithm::registerCoarsen(
+   const int dst,
+   const int src,
+   const tbox::Pointer<xfer::CoarsenOperator> opcoarsen,
+   tbox::Pointer<VariableFillPattern> var_fill_pattern)
+{
+   const tbox::Dimension& dim(d_multiblock->getDim());
+
+   registerCoarsen(dst,
+      src,
+      opcoarsen,
+      hier::IntVector::getZero(dim),
+      var_fill_pattern);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a communication schedule that will coarsen data from fine      *
+ * patch level to the coarse patch level.                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<MultiblockCoarsenSchedule>
+MultiblockCoarsenAlgorithm::createSchedule(
+   tbox::Pointer<hier::MultiblockPatchLevel> crse_level,
+   tbox::Pointer<hier::MultiblockPatchLevel> fine_level,
+   MultiblockCoarsenPatchStrategy* patch_strategy,
+   MultiblockRefinePatchStrategy* refine_strategy,
+   tbox::Pointer<xfer::CoarsenTransactionFactory> transaction_factory) const
+{
+   tbox::Pointer<xfer::CoarsenTransactionFactory> trans_factory =
+      transaction_factory;
+
+   if (trans_factory.isNull()) {
+      trans_factory = new StandardCoarsenTransactionFactory();
+   }
+
+   return tbox::Pointer<MultiblockCoarsenSchedule>(
+             new MultiblockCoarsenSchedule(crse_level,
+                fine_level,
+                d_coarsen_classes,
+                d_multiblock,
+                trans_factory,
+                patch_strategy,
+                refine_strategy,
+                d_fill_coarse_data));
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/MultiblockCoarsenAlgorithm.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/MultiblockCoarsenAlgorithm.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,233 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Coarsening algorithm for data transfer between AMR levels 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_MultiblockCoarsenAlgorithm
+#define included_xfer_MultiblockCoarsenAlgorithm
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/xfer/MultiblockCoarsenSchedule.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/xfer/CoarsenClasses.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Class MultiblockCoarsenAlgorithm encapsulates the AMR
+ * communication pattern to coarsen data from a finer level to any coarser
+ * level in a multiblock domain.  Most often, data is coarsened from the
+ * interiors of source patch components on the source patch level into
+ * interiors of patch components on the destination level.  If the
+ * coarsening operators require ghost cells on a source component, then
+ * sufficient ghost cell storage must be provided by the source patch data
+ * component, and those ghost cells must be filled before calling the data
+ * coarsening routines.
+ *
+ * Communication algorithms generally consist of three parts: an algorithm,
+ * a schedule, and a patch strategy.  The algorithm describes the communication
+ * between patch data items but is independent of the configuration of the
+ * AMR hierarchy.  Patch data items and their associated coarsening operators
+ * are registered with the algorithm.  To generate the communication
+ * dependencies for a particular hierarchy configuration, the algorithm
+ * generates a schedule based on the current hierarchy configuration.  This
+ * schedule then performs the communication based on the registered data types
+ * and their associated operators.  User-defined pre-processing and
+ * post-processing are provided through the abstract patch strategy class.
+ * The source patch data space is used during processing to store temporary
+ * data.  Thus, the user-defined coarsening operators should operate on the
+ * source space by using the patch data with those indices.
+ *
+ * Note that each coarsen schedule created by a coarsen algorithm remains
+ * valid as long as the patches involved in the communication process do not
+ * change as long as the patches involved in the communication process do not
+ * change; thus, they can be used for multiple data communication cycles.
+ *
+ *  Typical usage of a coarsen algorithm to perform data coarsening
+ * on an AMR hierarchy involves four steps:
+ *
+ * -# Construct a coarsen algorithm object.
+ * -# Register coarsen operations with the coarsen algorithm.  Using the
+ *       registerCoarsen() methods(s), one provides source and destination
+ *       patch data information, as well as spatial coarsening operators
+ *       as needed.
+ * -# After all operations are registered with the algorithm, one
+ *       creates a communication schedule using the createSchedule()
+ *       method.  This method identifies the source (fine) and destination
+ *       (coarse) patch levels for data coarsening.  Note that when creating
+ *       a communication schedule, a concrete instance of a
+ *       MultiblockCoarsenPatchStrategy object may be required to supply
+ *       user-defined spatial data coarsening operations.
+ * -# Invoke the coarsenData() method in the communication schedule to
+ *       perform the data transfers.
+ *
+ * @see xfer::MultiblockCoarsenSchedule
+ * @see xfer::CoarsenSchedule
+ * @see xfer::CoarsenPatchStrategy
+ * @see xfer::CoarsenClasses
+ */
+
+class MultiblockCoarsenAlgorithm:public tbox::DescribedClass
+{
+public:
+   /*!
+    * Construct a coarsening algorithm and initialize its basic state.
+    * Coarsening operations must be registered with this algorithm
+    * before it can do anything useful.  See the registerCoarsen() routine
+    * for details
+    *
+    * @param multiblock        pointer to the multiblock patch hierarchy
+    *                          on which this coarsen algorithm with operate.
+    * @param fill_coarse_data  boolean flag indicating whether coarse level data
+    *                          is needed for the data coarsening operations.
+    *                          By default this argument is false.  If a true
+    *                          value is provided, then source data will be
+    *                          filled on a temporary coarse patch level (i.e.,
+    *                          copied from the actual coarse level source data)
+    *                          for use in coarsening operations registered with
+    *                          this algorithm.  This option should only be used
+    *                          by those who specifically require this behavior
+    *                          and who know how to properly process the patch
+    *                          data on coarse and fine patch levels during
+    *                          the coarsening process.
+    */
+   explicit MultiblockCoarsenAlgorithm(
+      tbox::Pointer<hier::MultiblockPatchHierarchy> multiblock,
+      bool fill_coarse_data = false);
+
+   /*!
+    * The virtual destructor for the algorithm releases all internal storage.
+    */
+   virtual ~MultiblockCoarsenAlgorithm();
+
+   /*!
+    * Register a coarsening operation with the coarsening algorithm.  Data
+    * from the interiors of the source component on a source (fine) patch level
+    * will be coarsened into the source component of a temporary (coarse) patch
+    * level and then copied into the destination component on the destination
+    * (coarse) patch level.  If the coarsening operator requires data in ghost
+    * cells outside of the patch interiors (i.e., a non-zero stencil width),
+    * then those ghost cells must exist in the source patch data component
+    * and the ghost cells must be filled with valid data on the source level
+    * before a call to invoke the communication schedule.   Note that the
+    * source and destination components may be the same in any case.
+    *
+    * Some special circumstances require that data be coarsened from the
+    * ghost cell regions of a finer level and the resulting coarsened data
+    * should be copied to the destination patch level.  When this is the case,
+    * the optional integer vector argument should be set to the cell width, in
+    * the destination (coarser) level index space, of the region around the
+    * fine level where this coarsening should occur.  For example, if the
+    * coarser level needs data in a region two (coarse) cells wide around the
+    * boundary of the finer level, then the gcw_to_coarsen should be set to a
+    * vector with all entries set to two.  Moreover, if the refinement ratio
+    * between coarse and fine levels is four in this case, then the source
+    * patch data is required to have at least eight ghost cells.
+    *
+    * @param dst       Patch data index filled on destination level.
+    * @param src       Patch data index coarsened from the source level.
+    * @param opcoarsen Pointer to coarsening operator.  This may be a null
+    *                  pointer.
+    *
+    *                  In this case, coarsening must be handled by the coarsen
+    *                  patch strategy member functions.  See the comments for
+    *                  MultiblockCoarsenPatchStrategy::preprocessCoarsen() and
+    *                  MultiblockCoarsenPatchStrategy::postprocessCoarsen().
+    * @param gcw_to_coarsen Integer vector ghost cell width when data should
+    *                       be coarsened from ghost cell regions of the source
+    *                       (finer) level into the destination (coarser) level.
+    *                       By default, it is the vector of zeros indicating
+    *                       that data should be coarsened from from patch
+    *                       interiors on the source level.  If this argument is
+    *                       used, its value should be the cell width, in the
+    *                       destination (coarser) level index space, of the
+    *                       region around the fine level where this coarsening
+    *                       should occur.  This argument should only be
+    *                       provided by those who specifically require this
+    *                       special behavior and know how to properly process
+    *                       the patch data on coarse and fine patch levels
+    *                       during the coarsening process.
+    */
+   void
+   registerCoarsen(
+      const int dst,
+      const int src,
+      const tbox::Pointer<xfer::CoarsenOperator> opcoarsen,
+      const hier::IntVector& gcw_to_coarsen,
+      tbox::Pointer<VariableFillPattern> var_fill_pattern =
+         (tbox::Pointer<BoxGeometryVariableFillPattern>)NULL);
+
+   void
+   registerCoarsen(
+      const int dst,
+      const int src,
+      const tbox::Pointer<xfer::CoarsenOperator> opcoarsen,
+      tbox::Pointer<VariableFillPattern> var_fill_pattern =
+         (tbox::Pointer<BoxGeometryVariableFillPattern>)NULL);
+
+   /*!
+    * Create a communication schedule to coarsen data from finer patch
+    * levels.  This communication schedule may then be executed to perform
+    * the data transfers.  This schedule creation procedure assumes that
+    * the coarse level represents a ragion of coarser index space than the
+    * fine level.  To avoid potentially erroneous behavior, the coarse level
+    * domain should cover the domain of the fine level.
+    *
+    * Neither patch level can be null and when assertion checking is active,
+    * passing a null level pointer will produce an unrecoverable assertion.
+    *
+    * Note that the schedule remains valid as long as the patches on the levels
+    * do not change; thus, it can be used for multiple data communication
+    * cycles.
+    *
+    * @return Pointer to coarsen schedule that performs the data transfers.
+    *
+    * @param crse_level       Pointer to coarse (destination) level.
+    * @param fine_level       Pointer to fine (source) level.
+    * @param patch_strategy Pointer to a coarsen patch strategy that provides
+    *                         user-defined coarsen operations.  If this patch
+    *                         strategy is null (default state), then no
+    *                         user-defined coarsen operations will be
+    *                         performed.
+    * @param refine_strategy  Pointer to a refine patch strategy that provides
+    *                         user-defined refinement operations for specific
+    *                         cases where a user-defined coarsening scheme
+    *                         requires data to be filled on the coarse level
+    *                         prior to the execution of the coarsening
+    *                         operation.  Default is NULL.
+    */
+   tbox::Pointer<MultiblockCoarsenSchedule>
+   createSchedule(
+      tbox::Pointer<hier::MultiblockPatchLevel> crse_level,
+      tbox::Pointer<hier::MultiblockPatchLevel> fine_level,
+      MultiblockCoarsenPatchStrategy* patch_strategy =
+         ((MultiblockCoarsenPatchStrategy *)NULL),
+      MultiblockRefinePatchStrategy* refine_strategy =
+         ((MultiblockRefinePatchStrategy *)NULL),
+      tbox::Pointer<xfer::CoarsenTransactionFactory> transaction_factory =
+         tbox::Pointer<xfer::CoarsenTransactionFactory>(NULL)) const;
+
+private:
+   // These two functions are not implemented
+   MultiblockCoarsenAlgorithm(
+      const MultiblockCoarsenAlgorithm&);
+   void
+   operator = (
+      const MultiblockCoarsenAlgorithm&);
+
+   tbox::Pointer<xfer::CoarsenClasses> d_coarsen_classes;
+   tbox::Pointer<hier::MultiblockPatchHierarchy> d_multiblock;
+   bool d_fill_coarse_data;
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,32 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Strategy interface to user routines for coarsening AMR data. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_MultiblockCoarsenPatchStrategy_C
+#define included_xfer_MultiblockCoarsenPatchStrategy_C
+
+#include "SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+MultiblockCoarsenPatchStrategy::MultiblockCoarsenPatchStrategy(
+   const tbox::Dimension& dim):
+   xfer::CoarsenPatchStrategy(dim)
+{
+   d_block_number = MULTIBLOCK_UNDEFINED_BLOCK_NUMBER;
+}
+
+MultiblockCoarsenPatchStrategy::~MultiblockCoarsenPatchStrategy()
+{
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,153 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Strategy interface to user routines for coarsening AMR data. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_MultiblockCoarsenPatchStrategy
+#define included_xfer_MultiblockCoarsenPatchStrategy
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/CoarsenPatchStrategy.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifndef MULTIBLOCK_UNDEFINED_BLOCK_NUMBER
+#define MULTIBLOCK_UNDEFINED_BLOCK_NUMBER (-1)
+#endif
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Class MultiblockCoarsenPatchStrategy is an abstract base class that
+ * provides interfaces between coarsen operations in the multiblock
+ * classes and user's problem specific routines.  In general, it mimics
+ * the standard CoarsenPatchStrategy class but implements some additional
+ * methods that supply information about the blocks.
+ *
+ * @see xfer::CoarsenPatchStrategy
+ * @see xfer::MultiblockCoarsenSchedule
+ */
+
+class MultiblockCoarsenPatchStrategy:
+   public virtual tbox::DescribedClass,
+   public xfer::CoarsenPatchStrategy
+{
+public:
+   /*!
+    * The constructor for coarsen strategy does nothing interesting.
+    */
+   explicit MultiblockCoarsenPatchStrategy(
+      const tbox::Dimension& dim);
+
+   /*!
+    * The virtual destructor for coarsen strategy does nothing interesting.
+    */
+   virtual ~MultiblockCoarsenPatchStrategy();
+
+   /*!
+    * Return maximum stencil width needed over all user-defined
+    * data coarsening operations.  This is needed to
+    * determine the correct coarsening data dependencies.
+    */
+   virtual hier::IntVector
+   getMultiblockCoarsenOpStencilWidth() = 0;
+
+   /*!
+    * Perform user-defined coarsening operations.  This member function
+    * is called before standard coarsening operations (expressed using
+    * concrete subclasses of the MultiblockCoarsenOperator<DIM> base class).
+    * The preprocess function should move data from the source components
+    * on the fine patch into the source components on the coarse patch
+    * in the specified coarse box region.   Recall that the source components
+    * are specified in calls to the registerCoarsen() function in the
+    * MultiblockCoarsenAlgorithm class.
+    *
+    * @param coarse      Coarse patch containing destination data.
+    * @param fine        Fine patch containing source data.
+    * @param coarse_box  hier::Box region on coarse patch into which data is coarsened.
+    * @param ratio       Integer vector containing ratio relating index space
+    *                    between coarse and fine patches.
+    */
+   virtual void preprocessCoarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio)
+   {
+      NULL_USE(coarse);
+      NULL_USE(fine);
+      NULL_USE(coarse_box);
+      NULL_USE(ratio);
+   }
+
+   /*!
+    * Perform user-defined coarsening operations.  This member function
+    * is called after standard coarsening operations (expressed using
+    * concrete subclasses of the CoarsenOperator<DIM> base class).
+    * The postprocess function should move data from the source components on
+    * the fine patch into the source components on the coarse patch in the
+    * specified coarse box region.  Recall that the source components are
+    * specified in calls to the registerMultiblockCoarsen() function in the
+    * MultiblockCoarsenAlgorithm class.
+    *
+    * @param coarse      Coarse patch containing destination data.
+    * @param fine        Fine patch containing source data.
+    * @param coarse_box  hier::Box region on coarse patch into which data is copied.
+    * @param ratio       Integer vector containing ratio
+    */
+   virtual void postprocessCoarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio)
+   {
+      NULL_USE(coarse);
+      NULL_USE(fine);
+      NULL_USE(coarse_box);
+      NULL_USE(ratio);
+   }
+
+   /*
+    * Set the multiblock block number.
+    */
+   virtual void setCoarsenBlockNumber(
+      const int block_number)
+   {
+      d_block_number = block_number;
+   }
+
+   /*
+    * Get the multiblock block number.
+    */
+   virtual int getCoarsenBlockNumber()
+   {
+      return d_block_number;
+   }
+
+   /*
+    * Clear the multiblock block number.
+    */
+   virtual void clearCoarsenBlockNumber()
+   {
+      d_block_number = MULTIBLOCK_UNDEFINED_BLOCK_NUMBER;
+   }
+
+protected:
+   int d_block_number;
+
+private:
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/MultiblockCoarsenSchedule.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/MultiblockCoarsenSchedule.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1213 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Coarsening schedule for data transfer between AMR levels 
+ *
+ ************************************************************************/
+#ifndef included_xfer_MultiblockCoarsenSchedule_C
+#define included_xfer_MultiblockCoarsenSchedule_C
+
+#include "SAMRAI/xfer/MultiblockCoarsenSchedule.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/MappedBoxContainerUtils.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/MappedBoxSet.h"
+#include "SAMRAI/hier/OverlapConnectorAlgorithm.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchDataFactory.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/PeriodicShiftCatalog.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/xfer/PatchInteriorVariableFillPattern.h"
+#include "SAMRAI/xfer/PatchLevelFullFillPattern.h"
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace xfer {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialization for static data members.                               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+std::string
+MultiblockCoarsenSchedule::s_schedule_generation_method = "DLBG";
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Static function to set box intersection algorithm for schedules.       *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void MultiblockCoarsenSchedule::setScheduleGenerationMethod(
+   const std::string& method)
+{
+   if (!((method == "ORIG_NSQUARED") ||
+         (method == "DLBG"))) {
+      TBOX_ERROR("CoarsenSchedule::setScheduleGenerationMethod\n"
+         << "Given method std::string "
+         << method << " is invalid.\n Options are\n"
+         << "'ORIG_NSQUARED' and 'DLBG'."
+         << std::endl);
+   }
+
+   s_schedule_generation_method = method;
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Create a coarsening schedule that transfers data from the source       *
+ * patch data components of the fine level into the destination patch     *
+ * data components of the coarse level.  If the coarsening operators      *
+ * require data in ghost cells on the source level, then those ghost	  *
+ * cells must be filled before this call.				  *
+ *                                                                        *
+ * ************************************************************************
+ */
+MultiblockCoarsenSchedule::MultiblockCoarsenSchedule(
+   tbox::Pointer<hier::MultiblockPatchLevel> crse_level,
+   tbox::Pointer<hier::MultiblockPatchLevel> fine_level,
+   const tbox::Pointer<xfer::CoarsenClasses> coarsen_classes,
+   tbox::Pointer<hier::MultiblockPatchHierarchy> hierarchy,
+   tbox::Pointer<xfer::CoarsenTransactionFactory> transaction_factory,
+   MultiblockCoarsenPatchStrategy* patch_strategy,
+   MultiblockRefinePatchStrategy* refine_strategy,
+   bool fill_coarse_data):
+   d_ratio_between_levels(crse_level->getDim())
+{
+   TBOX_ASSERT(!crse_level.isNull());
+   TBOX_ASSERT(!fine_level.isNull());
+   TBOX_ASSERT(!coarsen_classes.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*crse_level, *fine_level);
+
+   const tbox::Dimension& dim(crse_level->getDim());
+
+   t_coarsen_data = tbox::TimerManager::getManager()->
+      getTimer("xfer::MultiblockCoarsenSchedule::coarsenData()");
+   t_gen_sched_n_squared = tbox::TimerManager::getManager()->
+      getTimer("xfer::MultiblockCoarsenSchedule::generateScheduleNSquared()");
+   t_gen_sched_dlbg = tbox::TimerManager::getManager()->
+      getTimer("xfer::MultiblockCoarsenSchedule::generateScheduleDLBG()");
+   t_modify_connector = tbox::TimerManager::getManager()->
+      getTimer("xfer::MultiblockCoarsenSchedule::modify_connector");
+   t_invert_edges = tbox::TimerManager::getManager()->
+      getTimer("xfer::MultiblockCoarsenSchedule::generate...()_invert_edges");
+
+   /*
+    * Initial values; some may change in setup operations.
+    */
+
+   d_mblk_crse_level = crse_level;
+   d_mblk_fine_level = fine_level;
+   d_transaction_factory = transaction_factory;
+   d_mblk_temp_crse_level.setNull();
+
+   d_mblk_coarsen_patch_strategy = patch_strategy;
+   d_mblk_refine_strategy = refine_strategy;
+
+   d_mblk_hierarchy = hierarchy;
+
+   d_fill_coarse_data = fill_coarse_data;
+
+   d_schedule.setNull();
+
+   d_mblk_fill_coarse_data_alg.setNull();
+   d_mblk_fill_coarse_data_sched.setNull();
+
+   d_number_coarsen_items = 0;
+   d_coarsen_items = (const xfer::CoarsenClasses::Data **)NULL;
+
+   /*
+    * Compute ratio between fine and coarse levels and then check for
+    * correctness.
+    */
+
+   hier::IntVector fine(d_mblk_fine_level->getRatioToLevelZero());
+   hier::IntVector crse(d_mblk_crse_level->getRatioToLevelZero());
+   int i;
+   for (i = 0; i < dim.getValue(); i++) {
+      if (fine(i) > 1) {
+         d_ratio_between_levels(i) = fine(i) / crse(i);
+      } else {
+         d_ratio_between_levels(i) = tbox::MathUtilities<int>::Abs(crse(
+                  i) / fine(i));
+      }
+   }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   for (i = 0; i < dim.getValue(); i++) {
+      TBOX_ASSERT(d_ratio_between_levels(i) != 0);
+   }
+   if (dim > tbox::Dimension(1))
+      for (i = 0; i < dim.getValue(); i++) {
+         if (d_ratio_between_levels(i)
+             * d_ratio_between_levels((i + 1) % dim.getValue()) < 0) {
+            TBOX_ASSERT((d_ratio_between_levels(i) == 1) ||
+               (d_ratio_between_levels((i + 1) % dim.getValue()) == 1));
+         }
+      }
+#endif
+
+   setCoarsenItems(coarsen_classes);
+   initialCheckCoarsenClassItems();
+
+   const int nblocks = hierarchy->getNumberOfBlocks();
+   d_coarse_to_fine = new const hier::Connector *[nblocks];
+   d_fine_to_coarse = new const hier::Connector *[nblocks];
+   d_temp_to_coarse.resizeArray(nblocks, hier::Connector());
+   d_coarse_to_temp.resizeArray(nblocks, hier::Connector());
+
+   hier::IntVector min_gcw = getMaxGhostsToGrow();
+   for (int b = 0; b < nblocks; b++) {
+      tbox::Pointer<hier::PatchLevel> block_crse_level =
+         d_mblk_crse_level->getPatchLevelForBlock(b);
+      tbox::Pointer<hier::PatchLevel> block_fine_level =
+         d_mblk_fine_level->getPatchLevelForBlock(b);
+      if (!block_crse_level.isNull() && !block_fine_level.isNull()) {
+         d_coarse_to_fine[b] = getOverlapConnector(
+               *block_crse_level->getMappedBoxLevel(),
+               *block_fine_level->getMappedBoxLevel(),
+               hier::Connector::convertHeadWidthToBase(block_crse_level->
+                  getMappedBoxLevel()->getRefinementRatio(),
+                  block_fine_level->getMappedBoxLevel()->getRefinementRatio(),
+                  min_gcw));
+         d_fine_to_coarse[b] = getOverlapConnector(
+               *block_fine_level->getMappedBoxLevel(),
+               *block_crse_level->getMappedBoxLevel(),
+               min_gcw);
+         TBOX_ASSERT(d_coarse_to_fine[b] != NULL);
+         TBOX_ASSERT(d_fine_to_coarse[b] != NULL);
+      } else {
+         d_coarse_to_fine[b] = NULL;
+         d_fine_to_coarse[b] = NULL;
+      }
+   }
+
+   /*
+    * Set up refine schedules to transfer coarsened data and to fill temporary
+    * coarse level data before coarsening operations, if needed.  Then,
+    * generate communication schedules to transfer data.
+    */
+
+   setupRefineAlgorithm();
+
+   generateSchedule();
+
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * The destructor for the coarsen schedule class implicitly deallocates   *
+ * all of the data associated with the communication schedule.            *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+MultiblockCoarsenSchedule::~MultiblockCoarsenSchedule()
+{
+   clearCoarsenItems();
+
+   d_transaction_factory.setNull();
+   d_mblk_crse_level.setNull();
+   d_mblk_fine_level.setNull();
+   d_mblk_temp_crse_level.setNull();
+
+   d_schedule.setNull();
+
+   d_mblk_fill_coarse_data_alg.setNull();
+   d_mblk_fill_coarse_data_sched.setNull();
+
+   t_coarsen_data.setNull();
+   t_gen_sched_n_squared.setNull();
+   t_gen_sched_dlbg.setNull();
+
+   delete[] d_fine_to_coarse;
+   delete[] d_coarse_to_fine;
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Return const pointer to equivalence classes used in schedule.          *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+const tbox::Pointer<xfer::CoarsenClasses>&
+MultiblockCoarsenSchedule::getEquivalenceClasses() const
+{
+   return d_coarsen_classes;
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Execute the stored communication schedule that copies data into the	  *
+ * the destination patch data components of the destination level from	  *
+ * the source patch data components of the source level.  The steps	  *
+ * to the algorithm are as follows:					  *
+ *									  *
+ *	(1) Allocate the source space on the temporary patch level.	  *
+ *	(2) Coarsen the data from the fine patch level to the temporary	  *
+ *	    patch level (local operation).				  *
+ *	(3) Copy data from the source space of the temporary patch	  *
+ *	    level into the destination space of the destination patch	  *
+ *	    level (requires interprocessor communication).		  *
+ *	(4) Deallocate the source space on the temporary patch level.	  *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void MultiblockCoarsenSchedule::coarsenData() const
+{
+   t_coarsen_data->start();
+
+   /*
+    * Set the coarsen items for all transactions.  These items are
+    * shared by all transaction objects in the communication schedule.
+    */
+   d_transaction_factory->setCoarsenItems(d_coarsen_items,
+      d_number_coarsen_items);
+
+   /*
+    * Allocate the source data space on the temporary patch level.
+    * We do not know the current time, so set it to zero.  It should
+    * not matter, since the copy routines do not require that
+    * the time markers match.
+    */
+
+   d_mblk_temp_crse_level->allocatePatchData(d_sources, 0.0);
+
+   if (d_fill_coarse_data) {
+      d_mblk_fill_coarse_data_sched->fillData(0.0);
+   }
+
+   /*
+    * Coarsen the data from the sources on the fine data level into the
+    * sources on the temporary data level
+    */
+
+   coarsenSourceData(d_mblk_coarsen_patch_strategy);
+
+   /*
+    * Copy data from the source interiors of the temporary patch level
+    * into the destination interiors of the destination patch level.
+    */
+
+//   d_schedule->communicate();
+   d_mblk_fill_dst_sched->fillData(0.0, false);
+
+   /*
+    * Deallocate the source data in the temporary patch level.
+    */
+
+   d_mblk_temp_crse_level->deallocatePatchData(d_sources);
+
+   /*
+    * Unset the coarsen items for the copy transactions.  These items
+    * are shared by all such transaction objects in the communication
+    * schedule.
+    */
+   d_transaction_factory->unsetCoarsenItems();
+
+   t_coarsen_data->stop();
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Generate the temporary coarse level by coarsening the fine patch	  *
+ * level boxes.  Note that no patch data components are allocated until   *
+ * they are needed during the coarsening operation.			  *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void MultiblockCoarsenSchedule::generateTemporaryLevel()
+{
+   const tbox::Dimension& dim(d_mblk_crse_level->getDim());
+
+   hier::OverlapConnectorAlgorithm oca;
+
+   const int nblocks = d_mblk_fine_level->getNumberOfBlocks();
+   tbox::Array<tbox::Pointer<hier::PatchLevel> > temp_crse_array(nblocks);
+
+   for (int nb = 0; nb < nblocks; nb++) {
+      temp_crse_array[nb].setNull();
+
+      tbox::Pointer<hier::PatchLevel> fine_block_level =
+         d_mblk_fine_level->getPatchLevelForBlock(nb);
+
+      if (d_mblk_coarsen_patch_strategy) {
+         d_mblk_coarsen_patch_strategy->setCoarsenBlockNumber(nb);
+      }
+
+      if (!fine_block_level.isNull()) {
+
+         temp_crse_array[nb] = new hier::PatchLevel(dim);
+         temp_crse_array[nb]->setCoarsenedPatchLevel(fine_block_level,
+            d_ratio_between_levels);
+         temp_crse_array[nb]->setLevelNumber(d_mblk_crse_level->getLevelNumber());
+      }
+
+      if (d_mblk_coarsen_patch_strategy) {
+         d_mblk_coarsen_patch_strategy->clearCoarsenBlockNumber();
+      }
+   }
+
+   d_mblk_temp_crse_level = new hier::MultiblockPatchLevel(dim, temp_crse_array);
+   if (d_fill_coarse_data) {
+      d_mblk_hierarchy->adjustMultiblockPatchLevelBoundaries(
+         d_mblk_temp_crse_level);
+   }
+
+   for (int nb = 0; nb < nblocks; nb++) {
+      if (d_fine_to_coarse[nb] != NULL && d_coarse_to_fine[nb] != NULL) {
+         /*
+          * Generate temporary mapped_box_level and connectors.
+          * Use Connector::modify to modify connectors between fine and coarse
+          * mapped_box_levels into connector between temp and coarse mapped_box_levels.
+          */
+
+#if 0
+         /*
+          * Assertion fails for aresamr.
+          * I think this assertion it too stringent
+          * because getMaxGhostsToGrow returns a bigger
+          * width than we need.
+          * BTNG.
+          */
+         /*
+          * Make sure the provided connectors have enough gcw
+          * to cover the growth of the dst level.
+          */
+         hier::IntVector dst_growth(getMaxGhostsToGrow());
+         TBOX_ASSERT((d_coarse_to_fine[nb]->getConnectorWidth() >= dst_growth));
+         hier::IntVector fine_gcw(d_fine_to_coarse[nb]->getConnectorWidth());
+         TBOX_ASSERT((fine_gcw >= dst_growth * d_ratio_between_levels));
+#endif
+
+         /*
+          * Compute d_coarse_to_temp and d_temp_to_coarse.
+          *
+          * We use the fact that d_mblk_temp_crse_level patches are numbered just
+          * like the fine level patches.  The Connectors between coarse and
+          * temp are very similar to those between coarse and fine.
+          */
+         hier::NeighborhoodSet coarse_eto_temp;
+         hier::MappedBoxContainerUtils::coarsenNeighborsInNeighborhoodSet(
+            coarse_eto_temp,
+            d_coarse_to_fine[nb]->getNeighborhoodSets(),
+            d_ratio_between_levels);
+         d_coarse_to_temp[nb].initialize(
+            d_coarse_to_fine[nb]->getBase(),
+            *d_mblk_temp_crse_level->getPatchLevelForBlock(
+               nb)->getMappedBoxLevel(),
+            d_coarse_to_fine[nb]->getConnectorWidth(),
+            coarse_eto_temp,
+            hier::MappedBoxLevel::DISTRIBUTED);
+         coarse_eto_temp.clear();
+         d_temp_to_coarse[nb].initialize(
+            *d_mblk_temp_crse_level->getPatchLevelForBlock(
+               nb)->getMappedBoxLevel(),
+            d_coarse_to_fine[nb]->getBase(),
+            d_coarse_to_fine[nb]->getConnectorWidth(),
+            d_fine_to_coarse[nb]->getNeighborhoodSets(),
+            hier::MappedBoxLevel::DISTRIBUTED);
+         const hier::IntVector one_vector(dim, 1);
+         oca.shrinkConnectorWidth(d_coarse_to_temp[nb], one_vector);
+         oca.shrinkConnectorWidth(d_temp_to_coarse[nb], one_vector);
+
+      }
+   }
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Set up refine algorithms to transfer coarsened data and to fill        *
+ * temporary coarse level before performing coarsening operations,        *
+ * if necessary.                                                          *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void MultiblockCoarsenSchedule::setupRefineAlgorithm()
+{
+   const tbox::Dimension& dim(d_mblk_hierarchy->getDim());
+
+   if (d_fill_coarse_data) {
+
+      d_mblk_fill_coarse_data_alg = new MultiblockRefineAlgorithm(
+            d_mblk_hierarchy, dim);
+
+      for (int ici = 0; ici < d_number_coarsen_items; ici++) {
+         const int src_id = d_coarsen_items[ici]->d_src;
+         d_mblk_fill_coarse_data_alg->registerRefine(src_id,
+            src_id,
+            src_id,
+            SAMRAI::tbox::Pointer<SAMRAI::xfer::RefineOperator>(NULL));
+      }
+   }
+
+   tbox::Pointer<PatchInteriorVariableFillPattern> interior_fill(
+      new PatchInteriorVariableFillPattern(dim));
+
+   d_mblk_fill_dst_alg = new MultiblockRefineAlgorithm(
+      d_mblk_hierarchy, dim);
+
+   for (int ici = 0; ici < d_number_coarsen_items; ici++) {
+      const int dst_id = d_coarsen_items[ici]->d_dst;
+      const int src_id = d_coarsen_items[ici]->d_src;
+      d_mblk_fill_dst_alg->registerRefine(dst_id,
+         src_id,
+         dst_id,
+         SAMRAI::tbox::Pointer<SAMRAI::xfer::RefineOperator>(NULL),
+         interior_fill);
+   } 
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Generate communication schedule that copies source patch data          *
+ * from the temporary level into the destination patch data of the        *
+ * destination (coarse) level.  The source and destination	          *
+ * spaces may be the same.						  *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void MultiblockCoarsenSchedule::generateSchedule()
+{
+
+   /*
+    * Set up coarsened version of fine level for temporary data storage.
+    * Next, create refine algorithm if needed to fill temporary coarse
+    * level before coarsen operations occur.  Then, create empty schedule
+    * that will hold transactions for moving data.  Finally, generate
+    * schedule based on chosen generation method.
+    */
+   generateTemporaryLevel();
+
+   if (d_fill_coarse_data) {
+      d_mblk_fill_coarse_data_sched =
+         d_mblk_fill_coarse_data_alg->createSchedule(d_mblk_temp_crse_level,
+            d_mblk_crse_level,
+            d_mblk_refine_strategy);
+   }
+
+   d_schedule = new tbox::Schedule();
+   d_schedule->setTimerPrefix("xfer::MultiblockCoarsenSchedule");
+
+   if (s_schedule_generation_method == "ORIG_NSQUARED") {
+
+      generateScheduleNSquared();
+
+   } else if (s_schedule_generation_method == "DLBG") {
+
+      generateScheduleDLBG();
+
+   } else {
+
+      TBOX_ERROR("Internal MultiblockCoarsenSchedule error..."
+         << "\n unrecognized schedule generation option: "
+         << s_schedule_generation_method << std::endl);
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * This version of the schedule generation procedure uses the original   *
+ * SAMRAI N^2 algorithms to construct communication schedules.  Here,    *
+ * we loop over all of the patches on the source and destination levels. *
+ * check to see whether source or destination is local to this processor.*
+ * If not, then skip over schedule construction operations.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MultiblockCoarsenSchedule::generateScheduleNSquared()
+{
+
+   t_gen_sched_n_squared->start();
+
+   const int nblocks = d_mblk_crse_level->getNumberOfBlocks();
+   for (int nb = 0; nb < nblocks; nb++) {
+
+      tbox::Pointer<hier::PatchLevel> crse_block_level =
+         d_mblk_crse_level->getPatchLevelForBlock(nb);
+
+      if (d_mblk_coarsen_patch_strategy) {
+         d_mblk_coarsen_patch_strategy->setCoarsenBlockNumber(nb);
+      }
+
+      if (!crse_block_level.isNull()) {
+
+         tbox::Pointer<hier::PatchLevel> temp_crse_block_level =
+            d_mblk_temp_crse_level->getPatchLevelForBlock(nb);
+
+         if (!temp_crse_block_level.isNull()) {
+            const int dst_npatches =
+               crse_block_level->getGlobalNumberOfPatches();
+            const int src_npatches =
+               temp_crse_block_level->getGlobalNumberOfPatches();
+
+            const hier::ProcessorMapping& dst_mapping =
+               crse_block_level->getProcessorMapping();
+            const hier::ProcessorMapping& src_mapping =
+               temp_crse_block_level->getProcessorMapping();
+
+            for (int dp = 0; dp < dst_npatches; dp++) {
+
+               const hier::MappedBox dst_mapped_box(
+                  crse_block_level->getBoxes()[dp],
+                  hier::LocalId(dp),
+                  dst_mapping.
+                  getProcessorAssignment(dp));
+
+               for (int sp = 0; sp < src_npatches; sp++) {
+
+                  const hier::MappedBox src_mapped_box(
+                     temp_crse_block_level->getBoxes()[sp],
+                     hier::LocalId(sp),
+                     src_mapping.
+                     getProcessorAssignment(sp));
+
+                  if (dst_mapping.isMappingLocal(dp)
+                      || src_mapping.isMappingLocal(sp)) {
+
+                     constructScheduleTransactions(crse_block_level,
+                        dst_mapped_box,
+                        temp_crse_block_level,
+                        src_mapped_box);
+
+                  }  // if either source or destination patch is local
+
+               } // loop over source patches
+
+            } // loop over destination patches
+
+         } // if temp_crse_block_level is not null
+
+      } // if crse_block_level is not null
+
+      if (d_mblk_coarsen_patch_strategy) {
+         d_mblk_coarsen_patch_strategy->clearCoarsenBlockNumber();
+      }
+   } // loop over blocks in the multiblock domain
+
+   t_gen_sched_n_squared->stop();
+
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void MultiblockCoarsenSchedule::generateScheduleDLBG()
+{
+
+   t_gen_sched_dlbg->start();
+
+   constructDestinationLevelFillSchedule(d_mblk_crse_level,
+                                         d_mblk_temp_crse_level);
+
+   t_gen_sched_dlbg->stop();
+
+}
+
+/*
+ ***********************************************************************
+ * This method does 2 important things to the src_to_dst edges:
+ *
+ * 1. It puts the edge data in dst-major order so the src owners can
+ * easily loop through the dst-src edges in the same order that dst
+ * owners see them.  Transactions must have the same order on the
+ * sending and receiving processors.
+ *
+ * 2. It shifts periodic image dst mapped_boxes back to the zero-shift position,
+ * and applies a similar shift to src mapped_boxes so that the overlap is
+ * unchanged.  The constructScheduleTransactions method requires all
+ * shifts to be absorbed in the src mapped_box.
+ ***********************************************************************
+ */
+void MultiblockCoarsenSchedule::restructureNeighborhoodSetsByDstNodes(
+   const hier::Connector& src_to_dst,
+   FullNeighborhoodSet& full_inverted_edges) const
+{
+   const tbox::Dimension& dim(d_mblk_crse_level->getDim());
+
+   const hier::PeriodicShiftCatalog* shift_catalog =
+      hier::PeriodicShiftCatalog::getCatalog(dim);
+   const int zero_shift_number = shift_catalog->getZeroShiftNumber();
+   const hier::NeighborhoodSet& edges = src_to_dst.getNeighborhoodSets();
+   const hier::MappedBoxLevel& src_mapped_box_level = src_to_dst.getBase();
+   const hier::IntVector& src_ratio(src_to_dst.getBase().getRefinementRatio());
+   const hier::IntVector& dst_ratio(src_to_dst.getHead().getRefinementRatio());
+
+   /*
+    * These are the counterparts to shifted dst mapped_boxes and unshifted src
+    * mapped_boxes.
+    */
+   hier::MappedBox shifted_mapped_box(dim), unshifted_nabr(dim);
+   full_inverted_edges.clear();
+   for (hier::NeighborhoodSet::const_iterator ci = edges.begin();
+        ci != edges.end();
+        ++ci) {
+      const hier::MappedBox& mapped_box =
+         *src_mapped_box_level.getMappedBoxStrict(ci->first, zero_shift_number);
+      const NeighborSet& nabrs = ci->second;
+      for (NeighborSet::const_iterator na = nabrs.begin();
+           na != nabrs.end(); ++na) {
+         const hier::MappedBox& nabr = *na;
+         if (nabr.isPeriodicImage()) {
+            shifted_mapped_box.initialize(
+               mapped_box,
+               shift_catalog->getOppositeShiftNumber(nabr.getPeriodicShiftNumber()),
+               src_ratio);
+            unshifted_nabr.initialize(
+               nabr,
+               shift_catalog->getZeroShiftNumber(),
+               dst_ratio);
+            full_inverted_edges[unshifted_nabr].insert(shifted_mapped_box);
+         } else {
+            full_inverted_edges[nabr].insert(mapped_box);
+         }
+      }
+   }
+}
+
+/*
+ **************************************************************************
+ * Calculate the max ghost cell width to grow boxes to check for
+ * overlaps.  Given in source (fine) level's index space.
+ **************************************************************************
+ */
+
+hier::IntVector MultiblockCoarsenSchedule::getMaxGhostsToGrow() const
+{
+   const tbox::Dimension& dim(d_mblk_crse_level->getDim());
+
+   /*
+    * MappedBox, face and side elements of adjacent cells overlap even though
+    * the cells do not overlap.  Therefore, we always grow at least one
+    * cell catch overlaps of mapped_box, face and side elements.
+    */
+   hier::IntVector gcw(dim, 1);
+
+   for (int ici = 0; ici < d_number_coarsen_items; ici++) {
+
+      /*
+       * I don't know why we need to grow by ghost width of src_id.
+       * Rich seems to recall needing this but can't remember the
+       * reason.  I am disabling it, but may have to re-enable it
+       * if it causes problems.
+       */
+      // const int src_id = d_coarsen_items[ici]->d_src;
+      // gcw.max(pd->getPatchDataFactory(src_id)->getDefaultGhostCellWidth());
+
+      hier::IntVector gcw1 = d_coarsen_items[ici]->d_gcw_to_coarsen;
+      if (!d_coarsen_items[ici]->d_opcoarsen.isNull()) {
+         gcw1 += d_coarsen_items[ici]->d_opcoarsen->getStencilWidth();
+      }
+      gcw.max(gcw1);
+   }
+
+   return gcw;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private utility function that constructs schedule transactions that   *
+ * move data from source patch on source level to destination patch      *
+ * on destination level.                                                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MultiblockCoarsenSchedule::constructScheduleTransactions(
+   tbox::Pointer<hier::PatchLevel> dst_level,
+   const hier::MappedBox& dst_mapped_box,
+   tbox::Pointer<hier::PatchLevel> src_level,
+   const hier::MappedBox& src_mapped_box)
+{
+   TBOX_ASSERT(!dst_level.isNull());
+   TBOX_ASSERT(!src_level.isNull());
+
+   const tbox::Dimension& dim(d_mblk_crse_level->getDim());
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dim,
+      *dst_level,
+      *src_level,
+      dst_mapped_box,
+      src_mapped_box);
+
+   const hier::IntVector& constant_zero_intvector(hier::IntVector::getZero(dim));
+   const hier::IntVector& constant_one_intvector(hier::IntVector::getOne(dim));
+
+   tbox::Pointer<hier::PatchDescriptor> dst_patch_descriptor =
+      dst_level->getPatchDescriptor();
+   tbox::Pointer<hier::PatchDescriptor> src_patch_descriptor =
+      src_level->getPatchDescriptor();
+
+   const hier::Box& dst_box = dst_mapped_box.getBox();
+   const hier::Box& src_box = src_mapped_box.getBox();
+
+   const int num_equiv_classes =
+      d_coarsen_classes->getNumberOfEquivalenceClasses();
+
+   const hier::PeriodicShiftCatalog* shift_catalog =
+      hier::PeriodicShiftCatalog::getCatalog(dim);
+
+   /*
+    * Calculate the shift and the shifted source box.
+    */
+   hier::IntVector src_shift(dim, 0);
+   hier::IntVector dst_shift(dim, 0);
+   hier::Box unshifted_src_box = src_mapped_box.getBox();
+   hier::Box unshifted_dst_box = dst_mapped_box.getBox();
+   if (src_mapped_box.isPeriodicImage()) {
+      TBOX_ASSERT(!dst_mapped_box.isPeriodicImage());
+      src_shift = shift_catalog->shiftNumberToShiftDistance(
+            src_mapped_box.getPeriodicShiftNumber());
+      src_shift *= src_level->getRatioToLevelZero();
+      unshifted_src_box.shift(-src_shift);
+   }
+   if (dst_mapped_box.isPeriodicImage()) {
+      TBOX_ASSERT(!src_mapped_box.isPeriodicImage());
+      dst_shift = shift_catalog->shiftNumberToShiftDistance(
+            dst_mapped_box.getPeriodicShiftNumber());
+      dst_shift *= dst_level->getRatioToLevelZero();
+      unshifted_dst_box.shift(-dst_shift);
+   }
+
+   const int num_coarsen_items = d_coarsen_classes->getNumberOfCoarsenItems();
+   tbox::Array<tbox::Pointer<tbox::Transaction> >
+   transactions(num_coarsen_items);
+
+   for (int nc = 0; nc < num_equiv_classes; nc++) {
+
+      const xfer::CoarsenClasses::Data& rep_item =
+         d_coarsen_classes->getClassRepresentative(nc);
+
+      const int rep_item_dst_id = rep_item.d_dst;
+      const int rep_item_src_id = rep_item.d_src;
+
+      tbox::Pointer<hier::PatchDataFactory> src_pdf =
+         src_patch_descriptor->getPatchDataFactory(rep_item_src_id);
+      tbox::Pointer<hier::PatchDataFactory> dst_pdf =
+         dst_patch_descriptor->getPatchDataFactory(rep_item_dst_id);
+
+      const hier::IntVector& dst_gcw(dst_pdf->getGhostCellWidth());
+
+      const hier::Box dst_fill_box(hier::Box::grow(unshifted_dst_box, dst_gcw));
+
+      hier::Box test_mask = dst_fill_box * src_mapped_box.getBox();
+      if (test_mask.empty() &&
+          (dst_gcw == constant_zero_intvector) &&
+          dst_pdf->dataLivesOnPatchBorder()) {
+         hier::Box tmp_dst_fill_box(
+            hier::Box::grow(dst_fill_box, constant_one_intvector));
+         test_mask = tmp_dst_fill_box * src_mapped_box.getBox();
+      }
+      hier::Box src_mask = hier::Box::shift(test_mask, -src_shift);
+
+      test_mask = hier::Box::grow(unshifted_src_box,
+            hier::IntVector::min(
+               rep_item.d_gcw_to_coarsen,
+               src_pdf->getGhostCellWidth()));
+
+      src_mask += test_mask;
+
+      tbox::Pointer<hier::BoxOverlap> overlap =
+         rep_item.d_var_fill_pattern->calculateOverlap(
+            *dst_pdf->getBoxGeometry(unshifted_dst_box),
+            *src_pdf->getBoxGeometry(unshifted_src_box),
+            dst_mapped_box.getBox(),
+            src_mask,
+            true, src_shift);
+
+      if (overlap.isNull()) {
+         TBOX_ERROR("Internal MultiblockCoarsenSchedule error..."
+            << "\n Overlap is NULL for "
+            << "\n src box = " << src_box
+            << "\n dst box = " << dst_box
+            << "\n src mask = " << src_mask << std::endl);
+      }
+
+      if (!overlap->isOverlapEmpty()) {
+         for (tbox::List<int>::Iterator l(d_coarsen_classes->getIterator(nc));
+              l; l++) {
+            const CoarsenClasses::Data& item =
+               d_coarsen_classes->getCoarsenItem(l());
+            TBOX_ASSERT(item.d_class_id == nc);
+
+            const int citem_count = item.d_tag;
+            transactions[citem_count] =
+               d_transaction_factory->allocate(dst_level,
+                  src_level,
+                  overlap,
+                  dst_mapped_box,
+                  src_mapped_box,
+                  citem_count);
+         }
+      }
+
+   }  // iterate over all coarsen equivalence classes
+
+   for (int i = 0; i < num_coarsen_items; i++) {
+      if (!(transactions[i].isNull())) {
+         d_schedule->appendTransaction(transactions[i]);
+      }
+   }
+}
+
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private utility function that constructs a schedule to move data      *
+ * move data from the temporary coarse level to the destination level.   *
+ *                                                                       *
+ *************************************************************************
+ */
+void MultiblockCoarsenSchedule::constructDestinationLevelFillSchedule(
+   tbox::Pointer<hier::MultiblockPatchLevel> dst_level,
+   tbox::Pointer<hier::MultiblockPatchLevel> src_level)
+{
+   TBOX_ASSERT(!dst_level.isNull());
+   TBOX_ASSERT(!src_level.isNull());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   const tbox::Dimension& dim(d_mblk_crse_level->getDim());
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(dim,
+      *dst_level,
+      *src_level);
+#endif
+
+   tbox::Pointer<PatchLevelFullFillPattern> level_fill(
+      new PatchLevelFullFillPattern());
+
+   d_mblk_fill_dst_sched = d_mblk_fill_dst_alg->createSchedule(
+                              level_fill,
+                              dst_level,
+                              src_level,
+                              d_mblk_refine_strategy);
+}
+
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Coarsen data from the source space on the fine patch level into the	  *
+ * source space on the coarse temporary patch level.			  *
+ *                                                                        *
+ * ************************************************************************
+ */
+void MultiblockCoarsenSchedule::coarsenSourceData(
+   xfer::MultiblockCoarsenPatchStrategy* patch_strategy) const
+{
+   const int nblocks = d_mblk_fine_level->getNumberOfBlocks();
+   for (int nb = 0; nb < nblocks; nb++) {
+
+      tbox::Pointer<hier::PatchLevel> fine_block_level =
+         d_mblk_fine_level->getPatchLevelForBlock(nb);
+
+      if (d_mblk_coarsen_patch_strategy) {
+         d_mblk_coarsen_patch_strategy->setCoarsenBlockNumber(nb);
+      }
+
+      if (!fine_block_level.isNull()) {
+
+         tbox::Pointer<hier::PatchLevel> temp_crse_block_level =
+            d_mblk_temp_crse_level->getPatchLevelForBlock(nb);
+
+         if (!temp_crse_block_level.isNull()) {
+
+            /*
+             * Loop over all local patches (fine and temp have the same mapping)
+             */
+
+            for (hier::PatchLevel::Iterator p(fine_block_level); p; p++) {
+               tbox::Pointer<hier::Patch> fine_patch = *p;
+               tbox::Pointer<hier::Patch> temp_patch =
+                  temp_crse_block_level->getPatch(fine_patch->getGlobalId());
+
+               const hier::Box& box = temp_patch->getBox();
+
+               /*
+                * Coarsen the fine space onto the temporary coarse space
+                */
+
+               if (patch_strategy) {
+                  patch_strategy->preprocessCoarsen(*temp_patch,
+                     *fine_patch, box, d_ratio_between_levels);
+               }
+
+               for (int ici = 0; ici < d_number_coarsen_items; ici++) {
+                  const xfer::CoarsenClasses::Data * const crs_item =
+                     d_coarsen_items[ici];
+                  if (!(crs_item->d_opcoarsen.isNull())) {
+                     const int source_id = crs_item->d_src;
+                     crs_item->d_opcoarsen->coarsen(*temp_patch, *fine_patch,
+                        source_id, source_id,
+                        box, d_ratio_between_levels);
+                  }
+               }
+
+               if (patch_strategy) {
+                  patch_strategy->postprocessCoarsen(*temp_patch,
+                     *fine_patch,
+                     box,
+                     d_ratio_between_levels);
+               }
+            }
+         }
+      }
+
+      if (d_mblk_coarsen_patch_strategy) {
+         d_mblk_coarsen_patch_strategy->clearCoarsenBlockNumber();
+      }
+
+   }
+}
+
+/*
+ * ***********************************************************************
+ *                                                                       *
+ * Private utility function to set up local array of coarsen items.      *
+ *                                                                       *
+ * ***********************************************************************
+ */
+
+void MultiblockCoarsenSchedule::setCoarsenItems(
+   const tbox::Pointer<xfer::CoarsenClasses> coarsen_classes)
+{
+
+   clearCoarsenItems();
+
+   d_coarsen_classes = coarsen_classes;
+
+   d_number_coarsen_items = d_coarsen_classes->getNumberOfCoarsenItems();
+
+   /*
+    * Determine total number of coarsen items and set state of
+    * component selector used to manage storage on temporary level.
+    */
+   d_sources.clrAllFlags();
+
+   int nc;
+   for (nc = 0; nc < d_number_coarsen_items; nc++) {
+      const CoarsenClasses::Data& item = d_coarsen_classes->getCoarsenItem(nc);
+      d_sources.setFlag(item.d_src);
+   }
+
+   /*
+    * Allocate and initialize array of coarsen items.
+    */
+
+   d_coarsen_items =
+      new const xfer::CoarsenClasses::Data *[d_number_coarsen_items];
+
+   int ircount = 0;
+   for (nc = 0; nc < d_number_coarsen_items; nc++) {
+      d_coarsen_classes->getCoarsenItem(nc).d_tag = ircount;
+      d_coarsen_items[ircount] = &(d_coarsen_classes->getCoarsenItem(nc));
+      ircount++;
+   }
+
+}
+
+/*
+ * ***********************************************************************
+ *                                                                       *
+ * Private utility function to check coarsen items in initial setup to   *
+ * see whether source and destination patch data components have         *
+ * sufficient ghost cell widths to satisfy the "ghost width to coarsen"  *
+ * functionality described in the CoarsenAlgorithm class header.   *
+ * Specifically, the destination data must have a ghost cell width at    *
+ * least as large as the ghost cell width to coarsen.  The source data   *
+ * must have a ghost cell width at least as large as the ghost cell      *
+ * width to coarsen refined to the source (finer) level index space.     *
+ * Other checks are also performed here by calling the                   *
+ * CoarsenClasses::checkCoarsenItem() routine.                     *
+ *                                                                       *
+ * ***********************************************************************
+ */
+
+void MultiblockCoarsenSchedule::initialCheckCoarsenClassItems() const
+{
+   const tbox::Dimension& dim(d_mblk_crse_level->getDim());
+
+   tbox::Pointer<hier::PatchDescriptor> pd =
+      hier::VariableDatabase::getDatabase()->getPatchDescriptor();
+
+   hier::IntVector user_gcw(dim, 0);
+   if (d_mblk_coarsen_patch_strategy) {
+      user_gcw = d_mblk_coarsen_patch_strategy->getCoarsenOpStencilWidth();
+   }
+
+   for (int ici = 0; ici < d_number_coarsen_items; ici++) {
+
+      const xfer::CoarsenClasses::Data * const crs_item = d_coarsen_items[ici];
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      if (d_coarsen_classes->checkCoarsenItem(*crs_item, pd)) {
+#endif
+
+      const int dst_id = crs_item->d_dst;
+      const int src_id = crs_item->d_src;
+
+      tbox::Pointer<hier::PatchDataFactory> dfact =
+         pd->getPatchDataFactory(dst_id);
+      tbox::Pointer<hier::PatchDataFactory> sfact =
+         pd->getPatchDataFactory(src_id);
+
+      const hier::IntVector& dst_gcw(dfact->getGhostCellWidth());
+      const hier::IntVector& src_gcw(sfact->getGhostCellWidth());
+
+      if (crs_item->d_gcw_to_coarsen > dst_gcw) {
+         TBOX_ERROR("Bad data given to MultiblockCoarsenSchedule...\n"
+            << "`ghost cell width to coarsen' specified in\n"
+            << "registration of `Destination' patch data "
+            << pd->mapIndexToName(dst_id)
+            << " with CoarsenAlgorithm\n"
+            << " is larger than ghost cell width of data \n"
+            << "d_gcw_to_coarsen = " << crs_item->d_gcw_to_coarsen
+            << "\n data ghost cell width = " << dst_gcw << std::endl);
+      }
+
+      if ((crs_item->d_gcw_to_coarsen * d_ratio_between_levels) > src_gcw) {
+         TBOX_ERROR("Bad data given to MultiblockCoarsenSchedule...\n"
+            << "`Source' patch data " << pd->mapIndexToName(src_id)
+            << " has ghost cell width too small to support the\n"
+            << "`ghost cell width to coarsen' specified in"
+            << " registration with CoarsenAlgorithm\n"
+            << "data ghost cell width = " << src_gcw
+            << "d_gcw_to_coarsen = " << crs_item->d_gcw_to_coarsen
+            << "\nratio between levels = " << d_ratio_between_levels
+            << "\n Thus, data ghost width must be >= "
+            << (crs_item->d_gcw_to_coarsen * d_ratio_between_levels)
+            << std::endl);
+      }
+
+      if (user_gcw > src_gcw) {
+         TBOX_ERROR("Bad data given to MultiblockCoarsenSchedule...\n"
+            << "User supplied coarsen stencil width = "
+            << user_gcw
+            << "\nis larger than ghost cell width of `Source'\n"
+            << "patch data " << pd->mapIndexToName(src_id)
+            << " , which is " << src_gcw << std::endl);
+      }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   }
+#endif
+
+   }
+
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Private utility function to clear array of coarsen items.              *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void MultiblockCoarsenSchedule::clearCoarsenItems()
+{
+   if (d_coarsen_items) {
+      for (int ici = 0; ici < d_number_coarsen_items; ici++) {
+         d_coarsen_items[ici] = (xfer::CoarsenClasses::Data *)NULL;
+      }
+      delete[] d_coarsen_items;
+      d_coarsen_items = (const xfer::CoarsenClasses::Data **)NULL;
+      d_number_coarsen_items = 0;
+   }
+}
+
+/*
+ **************************************************************************
+ * Private utility function to access overlap connectors between two
+ * MappedBoxLevels.  The Connector must be appropriately registered and
+ * be unique.
+ **************************************************************************
+ */
+
+const hier::Connector *MultiblockCoarsenSchedule::getOverlapConnector(
+   const hier::MappedBoxLevel& base,
+   const hier::MappedBoxLevel& head,
+   const hier::IntVector& min_gcw) const
+{
+   const hier::Connector* found =
+      &base.getPersistentOverlapConnectors().findOrCreateConnector(head,
+         min_gcw);
+   if (found != NULL) {
+      TBOX_ASSERT(found->getConnectorWidth() >= min_gcw);
+   }
+   return found;
+}
+
+/*
+ **************************************************************************
+ * Private utility function to access overlap connectors between two
+ * MappedBoxLevels.  The Connector must be appropriately registered and
+ * be unique.
+ **************************************************************************
+ */
+
+const hier::Connector *MultiblockCoarsenSchedule::getOverlapConnector_strict(
+   const hier::MappedBoxLevel& base,
+   const hier::MappedBoxLevel& head,
+   const hier::IntVector& min_gcw) const
+{
+   const hier::Connector* found =
+      &base.getPersistentOverlapConnectors().findConnector(head, min_gcw);
+   TBOX_ASSERT(found != NULL);
+   TBOX_ASSERT(found->getConnectorWidth() >= min_gcw);
+   return found;
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/MultiblockCoarsenSchedule.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/MultiblockCoarsenSchedule.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,411 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Coarsening schedule for data transfer between AMR levels 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_MultiblockCoarsenSchedule
+#define included_xfer_MultiblockCoarsenSchedule
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/Connector.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/MultiblockPatchHierarchy.h"
+#include "SAMRAI/hier/MultiblockPatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Schedule.h"
+#include "SAMRAI/xfer/CoarsenClasses.h"
+#include "SAMRAI/xfer/CoarsenTransactionFactory.h"
+#include "SAMRAI/xfer/MultiblockRefineAlgorithm.h"
+#include "SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h"
+#include "SAMRAI/xfer/MultiblockRefineAlgorithm.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Class MultiblockCoarsenSchedule encapsulates the AMR
+ * communication pattern to coarsen data from a finer level to a coarser level.
+ *
+ * Typically, data is coarsened from the interiors of source patch components
+ * on the source patch level into interiors of destination patch components on
+ * the destination level.  If a coarsen operator has a non-zero ghost cell
+ * width, then the source ghost cells must be filled before the coarsen
+ * schedule is executed.  The communication schedule is executed by calling
+ * member function coarsenData().
+ *
+ * Each schedule object is typically created by a coarsen algorithm and
+ * represents communication dependencies for a particular configuration
+ * of the AMR hierarchy.  The communication schedule is only valid for that
+ * particular configuration and must be regenerated when the AMR patch
+ * hierarchy changes.  However, as long as the patch levels involved in
+ * the creation of the schedule remain unchanged, the schedule may be used
+ * for multiple communication cycles.  For more information about creating
+ * coarsen schedules, see the MultiblockCoarsenAlgorithm header file.
+ *
+ * @see xfer::MultiblockCoarsenAlgorithm
+ * @see xfer::CoarsenAlgorithm
+ * @see xfer::CoarsenPatchStrategy
+ * @see xfer::CoarsenClasses
+ */
+
+class MultiblockCoarsenSchedule:public tbox::DescribedClass
+{
+public:
+   /*!
+    * Static function to set box intersection algorithm to use during
+    * schedule construction for all CoarsenSchedule objects.
+    * If this method is not called, the default will be used.
+    *
+    * @param  method   string identifying box intersection method.  Valid
+    *                  choices are:  "DLBG" (default case),
+    *                  and "ORIG_NSQUARED".   More details can be found below
+    *                  in the comments for the generateSchedule() routine.
+    *
+    * If an invalid string is passed, an unrecoverable error will result.
+    */
+   static void
+   setScheduleGenerationMethod(
+      const std::string& method);
+
+   /*!
+    * @brief Constructor for coarsen schedule from fine level to coarse level
+    *
+    * Constructor to create a coarsen schedule that coarsens data from
+    * source patch data components on the fine level into the destination patch
+    * data components on the coarse level.  In general, this constructor is
+    * called by a MultiblockCoarsenAlgorithm object.  For possible
+    * variations on data coarsening, see the Multiblock_CoarsenAlgorithm
+    * class header information.
+    *
+    * If the coarsening operators require data from ghost cells, then the
+    * associated source patch data components must have a sufficient ghost
+    * cell width and and they must be filled with valid data before calling
+    * coarsenData().
+    *
+    * @param crse_level        Pointer to coarse (destination) patch level.
+    * @param fine_level        Pointer to fine (source) patch level.
+    * @param coarsen_classes   Pointer to structure containing patch data and
+    *                          operator information.  In general, this is
+    *                          constructed by the calling xfer::CoarsenAlgorithm
+    *                          object.
+    * @param hierarchy         Multiblock  hierarchy where the operation
+    *                          occurs
+    * @param coarsen_strategy  Pointer to a coarsen patch strategy object that
+    *                          provides user-defined coarsen operations.  This
+    *                          pointer may be null, in which case no
+    *                          user-defined coarsen operations will be
+    *                          performed.
+    * @param refine_strategy   Pointer to a refine patch strategy object that
+    *                          provides user-defined coarsen operations.  This
+    *                          is needed in specific cases where a user-defined
+    *                          coarsen operation requires data to be filled
+    *                          on the coarse scratch level prior to execution
+    *                          of the coarsening operator.  If such
+    *                          functionality is not needed, set this pointer
+    *                          to null.
+    * @param fill_coarse_data  Boolean indicating whether coarse data should
+    *                          be filled before coarsening operations are done.
+    *
+    * When assertion checking is active, unrecoverable assertions will result
+    * if either patch level pointer, or the refine classes pointer, is null.
+    */
+   explicit MultiblockCoarsenSchedule(
+      tbox::Pointer<hier::MultiblockPatchLevel> crse_level,
+      tbox::Pointer<hier::MultiblockPatchLevel> fine_level,
+      const tbox::Pointer<xfer::CoarsenClasses> coarsen_classes,
+      tbox::Pointer<hier::MultiblockPatchHierarchy> hierarchy,
+      tbox::Pointer<xfer::CoarsenTransactionFactory> transaction_factory,
+      MultiblockCoarsenPatchStrategy* coarsen_strategy,
+      MultiblockRefinePatchStrategy* refine_strategy,
+      bool fill_coarse_data);
+
+   /*!
+    * @brief The virtual destructor for the schedule releases all internal
+    *        storage.
+    */
+   virtual ~MultiblockCoarsenSchedule();
+
+   /*!
+    * @brief Execute the stored communication schedule and perform the data
+    *        movement.
+    */
+   void
+   coarsenData() const;
+
+   /*!
+    * @brief Return const reference to the pointer to coarsen equivalence
+    *        classes used in schedule.
+    */
+   const tbox::Pointer<xfer::CoarsenClasses>&
+   getEquivalenceClasses() const;
+
+private:
+   // These two functions are not implemented
+   MultiblockCoarsenSchedule(
+      const MultiblockCoarsenSchedule&);
+   void
+   operator = (
+      const MultiblockCoarsenSchedule&);
+
+   //! @brief Shorthand typedef.
+   typedef hier::LocalId LocalId;
+   //! @brief Shorthand typedef.
+   typedef hier::Connector::NeighborSet NeighborSet;
+   //! @brief Mapping from a (potentially remote) MappedBox to a set of neighbors.
+   typedef std::map<hier::MappedBox, NeighborSet> FullNeighborhoodSet;
+
+   /*!
+    * @brief set the internal pointer to equivalence classes
+    *
+    * Utility function to set up local copies of patch data source,
+    * destination, etc. indices and necessary data coarsening information
+    * stored in the coarsen classes object generated by the coarsen algorithm.
+    * An array of coarsen data items is stored locally here to facilitate
+    * interaction with transations.
+    *
+    * @param coarsen_classes   The equivalence classes which store the
+    *                           identifiers of the data to be
+    */
+   void
+   setCoarsenItems(
+      const tbox::Pointer<xfer::CoarsenClasses> coarsen_classes);
+
+   /*!
+    * @brief Utility function to clear local copies of coarsen items.
+    */
+   void
+   clearCoarsenItems();
+
+   /*!
+    * @brief Utility function to check that patch data has sufficient ghosts.
+    *
+    * Utility function to check check coarsen items to see whether
+    * source and destination patch data components have sufficient ghost
+    * cell widths to satisfy the "ghost width to coarsen" functionality
+    * described in the xfer::CoarsenAlgorithm class header.  Specifically,
+    * the destination data must have a ghost cell width at least as large
+    * as the ghost cell width to coarsen.  The source data must have a
+    * ghost cell width at least as large as the ghost cell width to coarsen
+    * refined to the source (finer) level index space.  Although it is
+    * redundant if the coarsen algorithm created the coarsen classes, the
+    * routine xfer::CoarsenClasses::checkCoarsenItem() is also called.
+    *
+    * If any entries are erroneous an assertion is thrown with a descriptive
+    * error message and program halts.
+    */
+   void
+   initialCheckCoarsenClassItems() const;
+
+   /*!
+    * @brief Set up refine algorithm for temporary coarse level filling
+    *
+    * Set up refine algorithm to fill temporary coarse level before coarsening
+    * operations, if necessary.  The associated refine schedule is set in the
+    * generateSchedule() routine.
+    */
+   void
+   setupRefineAlgorithm();
+
+   /*!
+    * @brief Generate schedule for moving data from temp storage to destination.
+    *
+    * Generate communication schedule that moves source patch data from the
+    * temporary level into the destination patch data of the destination
+    * (coarse) level.
+    */
+   void
+   generateSchedule();
+
+   /*!
+    * @brief This version of the schedule generation procedure
+    * uses N^2 algorithms to determine box intersections;
+    * i.e., the original SAMRAI implementation which checks every
+    * box against every other.
+    */
+   void
+   generateScheduleNSquared();
+
+   /*!
+    * @brief This version of the schedule generation procedure uses the DLBG
+    * data to determine which source patches contribute
+    * data to each destination patch and to compute unfilled_boxes.
+    */
+   void
+   generateScheduleDLBG();
+
+   /*!
+    * @brief Execute the coarsening operation.
+    *
+    * Coarsen source patch data from the fine patch level into the source patch
+    * data on the coarse temporary patch level.
+    */
+   void
+   coarsenSourceData(
+      MultiblockCoarsenPatchStrategy* patch_strategy) const;
+
+   /*!
+    * @brief Calculate the maximum ghost cell width to grow boxes to check
+    * for overlaps.
+    */
+   hier::IntVector
+   getMaxGhostsToGrow() const;
+
+   /*!
+    * @brief Function that constructs schedule transactions that
+    * move data from source patch on source level to destination patch
+    * on destination level.
+    */
+   void
+   constructScheduleTransactions(
+      tbox::Pointer<hier::PatchLevel> dst_level,
+      const hier::MappedBox& dst_mapped_box,
+      tbox::Pointer<hier::PatchLevel> src_level,
+      const hier::MappedBox& src_mapped_box);
+
+   void
+   constructScheduleTransactions(
+      tbox::Pointer<hier::MultiblockPatchLevel> dst_level,
+      tbox::Pointer<hier::MultiblockPatchLevel> src_level);
+
+   /*!
+    * @brief Constructs the MultiblockRefineSchedule that is used
+    * to move coarsened data from the temporary coarse level to the
+    * destination level.
+    */
+   void
+   constructDestinationLevelFillSchedule(
+      tbox::Pointer<hier::MultiblockPatchLevel> dst_level,
+      tbox::Pointer<hier::MultiblockPatchLevel> src_level);
+
+   /*!
+    * @brief Restructure a src_to_dst Connector to arange edges by dst
+    * major order, and apply shifts to cancel out any periodic shifts
+    * on dst mapped_boxes.
+    */
+   void
+   restructureNeighborhoodSetsByDstNodes(
+      const hier::Connector& cnect,
+      FullNeighborhoodSet& full_inverted_edges) const;
+
+   /*!
+    * @brief Create a temporary coarse level for data storage during coarsen.
+    */
+   void
+   generateTemporaryLevel();
+
+   /*
+    * @brief Get the overlap Connector registered for the given base
+    * and head.
+    */
+   const hier::Connector *
+   getOverlapConnector(
+      const hier::MappedBoxLevel& base,
+      const hier::MappedBoxLevel& head,
+      const hier::IntVector& min_gcw) const;
+
+   /*
+    * @brief Similar to getOverlapConnector() but requires that the
+    * Connector is found.
+    */
+   const hier::Connector *
+   getOverlapConnector_strict(
+      const hier::MappedBoxLevel& base,
+      const hier::MappedBoxLevel& head,
+      const hier::IntVector& min_gcw) const;
+
+   /*!
+    * Selects algorithm used to generate communication schedule.
+    */
+   static std::string s_schedule_generation_method;
+
+   /*
+    * Structures that store coarsen data items.
+    */
+   tbox::Pointer<xfer::CoarsenClasses> d_coarsen_classes;
+   int d_number_coarsen_items;
+   const xfer::CoarsenClasses::Data** d_coarsen_items;
+
+   /*
+    * Cached pointers to the coarse, fine, and temporary patch levels.
+    */
+   tbox::Pointer<hier::MultiblockPatchLevel> d_mblk_crse_level;
+   tbox::Pointer<hier::MultiblockPatchLevel> d_mblk_fine_level;
+   tbox::Pointer<hier::MultiblockPatchLevel> d_mblk_temp_crse_level;
+
+   /*!
+    * @brief Fine-to-coarse connector, NULL if data not provided.
+    */
+   const hier::Connector** d_fine_to_coarse;
+
+   /*!
+    * @brief Coarse-to-fine connector, NULL if data not provided.
+    */
+   const hier::Connector** d_coarse_to_fine;
+   /*!
+    * @brief Connector from temporary (coarsened fine) mapped_box_level
+    * to coarse mapped_box_level.
+    */
+   tbox::Array<hier::Connector> d_temp_to_coarse;
+   /*!
+    * @brief Connector from coarse mapped_box_level to temporary
+    * (coarsened fine) mapped_box_level.
+    */
+   tbox::Array<hier::Connector> d_coarse_to_temp;
+
+   /*
+    * Object supporting interface to user-defined spatial data
+    * coarsening operations.
+    */
+   MultiblockCoarsenPatchStrategy* d_mblk_coarsen_patch_strategy;
+
+   MultiblockRefinePatchStrategy* d_mblk_refine_strategy;
+
+   /*!
+    * Factory object used to create data transactions when schedule is constructed.
+    */
+   tbox::Pointer<xfer::CoarsenTransactionFactory> d_transaction_factory;
+
+   /*
+    * Level-to-level communication schedule between the temporary coarse level
+    * and (actual) destination level.
+    */
+   tbox::Pointer<tbox::Schedule> d_schedule;
+
+   /*
+    * Boolean indicating whether source data on the coarse temporary level must
+    * be
+    * filled before coarsening operations (see comments for class constructor in    * header file), and refine algorithm and schedule needed to peform up these
+    * fill operations.
+    */
+   bool d_fill_coarse_data;
+   tbox::Pointer<MultiblockRefineAlgorithm> d_mblk_fill_coarse_data_alg;
+   tbox::Pointer<MultiblockRefineSchedule> d_mblk_fill_coarse_data_sched;
+
+   tbox::Pointer<MultiblockRefineAlgorithm> d_mblk_fill_dst_alg;
+   tbox::Pointer<MultiblockRefineSchedule> d_mblk_fill_dst_sched;
+
+   hier::ComponentSelector d_sources;
+
+   hier::IntVector d_ratio_between_levels;
+
+   tbox::Pointer<hier::MultiblockPatchHierarchy> d_mblk_hierarchy;
+
+   /*!
+    * Timer objects for performance measurement.
+    */
+   tbox::Pointer<tbox::Timer> t_coarsen_data;
+   tbox::Pointer<tbox::Timer> t_gen_sched_n_squared;
+   tbox::Pointer<tbox::Timer> t_gen_sched_dlbg;
+   tbox::Pointer<tbox::Timer> t_modify_connector;
+   tbox::Pointer<tbox::Timer> t_invert_edges;
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/MultiblockRefineAlgorithm.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/MultiblockRefineAlgorithm.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,414 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Base class for geometry management on patches 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_MultiblockRefineAlgorithm_C
+#define included_xfer_MultiblockRefineAlgorithm_C
+
+#include "SAMRAI/xfer/MultiblockRefineAlgorithm.h"
+
+#include "SAMRAI/xfer/PatchLevelFullFillPattern.h"
+#include "SAMRAI/xfer/StandardRefineTransactionFactory.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor and destructor for multiblock refine algorithm.  The      *
+ * constructor simply initializes the refine algorithm data member.      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+MultiblockRefineAlgorithm::MultiblockRefineAlgorithm(
+   tbox::Pointer<hier::MultiblockPatchHierarchy> hierarchy,
+   const tbox::Dimension& dim):
+   d_single_block_refine_alg(new xfer::RefineAlgorithm(dim)),
+   d_multiblock_hierarchy(hierarchy)
+{
+}
+
+MultiblockRefineAlgorithm::~MultiblockRefineAlgorithm()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a communication schedule that will copy data from the          *
+ * interiors of the specified level into the ghost cells and             *
+ * interiors of the same level.                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<MultiblockRefineSchedule>
+MultiblockRefineAlgorithm::createSchedule(
+   tbox::Pointer<hier::MultiblockPatchLevel> level,
+   MultiblockRefinePatchStrategy* refine_strategy,
+   tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory)
+const
+{
+
+   tbox::Pointer<xfer::RefineTransactionFactory> trans_factory =
+      transaction_factory;
+
+   if (trans_factory.isNull()) {
+      trans_factory = new xfer::StandardRefineTransactionFactory;
+   }
+
+   tbox::Pointer<PatchLevelFullFillPattern> fill_pattern(
+      new PatchLevelFullFillPattern());
+
+   return tbox::Pointer<MultiblockRefineSchedule>(new MultiblockRefineSchedule(
+                                                     fill_pattern,
+                                                     level,
+                                                     level,
+                                                     d_multiblock_hierarchy,
+                                                     d_single_block_refine_alg,
+                                                     trans_factory,
+                                                     refine_strategy));
+}
+
+tbox::Pointer<MultiblockRefineSchedule>
+MultiblockRefineAlgorithm::createSchedule(
+   tbox::Pointer<PatchLevelFillPattern> fill_pattern,
+   tbox::Pointer<hier::MultiblockPatchLevel> level,
+   MultiblockRefinePatchStrategy* refine_strategy,
+   tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory)
+const
+{
+
+   tbox::Pointer<xfer::RefineTransactionFactory> trans_factory =
+      transaction_factory;
+
+   if (trans_factory.isNull()) {
+      trans_factory = new xfer::StandardRefineTransactionFactory;
+   }
+
+   return tbox::Pointer<MultiblockRefineSchedule>(new MultiblockRefineSchedule(
+                                                     fill_pattern,
+                                                     level,
+                                                     level,
+                                                     d_multiblock_hierarchy,
+                                                     d_single_block_refine_alg,
+                                                     trans_factory,
+                                                     refine_strategy));
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a communication schedule that will copy data from the          *
+ * interiors of the source level into the ghost cell and interiors       *
+ * of the destination level.                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<MultiblockRefineSchedule>
+MultiblockRefineAlgorithm::createSchedule(
+   tbox::Pointer<hier::MultiblockPatchLevel> dst_level,
+   tbox::Pointer<hier::MultiblockPatchLevel> src_level,
+   MultiblockRefinePatchStrategy* refine_strategy,
+   tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory)
+const
+{
+   TBOX_ASSERT(!dst_level.isNull());
+   TBOX_ASSERT(!src_level.isNull());
+#ifdef DEBUG_CHECK_DIM_ASSERTIONS
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*dst_level, *src_level);
+   if (refine_strategy) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*dst_level, *refine_strategy);
+   }
+#endif
+
+   tbox::Pointer<xfer::RefineTransactionFactory> trans_factory =
+      transaction_factory;
+
+   if (trans_factory.isNull()) {
+      trans_factory = new xfer::StandardRefineTransactionFactory;
+   }
+
+   tbox::Pointer<PatchLevelFullFillPattern> fill_pattern(
+      new PatchLevelFullFillPattern());
+
+   return tbox::Pointer<MultiblockRefineSchedule>(new MultiblockRefineSchedule(
+                                                     fill_pattern,
+                                                     dst_level,
+                                                     src_level,
+                                                     d_multiblock_hierarchy,
+                                                     d_single_block_refine_alg,
+                                                     trans_factory,
+                                                     refine_strategy));
+}
+
+tbox::Pointer<MultiblockRefineSchedule>
+MultiblockRefineAlgorithm::createSchedule(
+   tbox::Pointer<PatchLevelFillPattern> fill_pattern,
+   tbox::Pointer<hier::MultiblockPatchLevel> dst_level,
+   tbox::Pointer<hier::MultiblockPatchLevel> src_level,
+   MultiblockRefinePatchStrategy* refine_strategy,
+   tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory)
+const
+{
+   TBOX_ASSERT(!dst_level.isNull());
+   TBOX_ASSERT(!src_level.isNull());
+#ifdef DEBUG_CHECK_DIM_ASSERTIONS
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*dst_level, *src_level);
+   if (refine_strategy) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*dst_level, *refine_strategy);
+   }
+#endif
+
+   tbox::Pointer<xfer::RefineTransactionFactory> trans_factory =
+      transaction_factory;
+
+   if (trans_factory.isNull()) {
+      trans_factory = new xfer::StandardRefineTransactionFactory;
+   }
+
+   return tbox::Pointer<MultiblockRefineSchedule>(new MultiblockRefineSchedule(
+                                                     fill_pattern,
+                                                     dst_level,
+                                                     src_level,
+                                                     d_multiblock_hierarchy,
+                                                     d_single_block_refine_alg,
+                                                     trans_factory,
+                                                     refine_strategy));
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a communication schedule that copies data from the interiors   *
+ * of the same level and coarser levels into the interior and boundary   *
+ * cells of the given level.                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<MultiblockRefineSchedule>
+MultiblockRefineAlgorithm::createSchedule(
+   tbox::Pointer<hier::MultiblockPatchLevel> level,
+   const int next_coarser_level,
+   tbox::Pointer<hier::MultiblockPatchHierarchy> multiblock,
+   MultiblockRefinePatchStrategy* refine_strategy,
+   tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory)
+const
+{
+#ifdef DEBUG_CHECK_DIM_ASSERTIONS
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*level, *multiblock);
+   if (refine_strategy) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*level, *refine_strategy);
+   }
+#endif
+
+   tbox::Pointer<xfer::RefineTransactionFactory> trans_factory =
+      transaction_factory;
+
+   if (trans_factory.isNull()) {
+      trans_factory = new xfer::StandardRefineTransactionFactory;
+   }
+
+   tbox::Pointer<PatchLevelFullFillPattern> fill_pattern(
+      new PatchLevelFullFillPattern());
+
+   return tbox::Pointer<MultiblockRefineSchedule>(new MultiblockRefineSchedule(
+                                                     fill_pattern,
+                                                     level,
+                                                     level,
+                                                     next_coarser_level,
+                                                     multiblock,
+                                                     d_single_block_refine_alg,
+                                                     trans_factory,
+                                                     refine_strategy));
+}
+
+tbox::Pointer<MultiblockRefineSchedule>
+MultiblockRefineAlgorithm::createSchedule(
+   tbox::Pointer<PatchLevelFillPattern> fill_pattern,
+   tbox::Pointer<hier::MultiblockPatchLevel> level,
+   const int next_coarser_level,
+   tbox::Pointer<hier::MultiblockPatchHierarchy> multiblock,
+   MultiblockRefinePatchStrategy* refine_strategy,
+   tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory)
+const
+{
+#ifdef DEBUG_CHECK_DIM_ASSERTIONS
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*level, *multiblock);
+   if (refine_strategy) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*level, *refine_strategy);
+   }
+#endif
+
+   tbox::Pointer<xfer::RefineTransactionFactory> trans_factory =
+      transaction_factory;
+
+   if (trans_factory.isNull()) {
+      trans_factory = new xfer::StandardRefineTransactionFactory;
+   }
+
+   return tbox::Pointer<MultiblockRefineSchedule>(new MultiblockRefineSchedule(
+                                                     fill_pattern,
+                                                     level,
+                                                     level,
+                                                     next_coarser_level,
+                                                     multiblock,
+                                                     d_single_block_refine_alg,
+                                                     trans_factory,
+                                                     refine_strategy));
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create a communication schedule that copies data from the interiors   *
+ * of the old level and coarser levels into the ghost cells and interior *
+ * cells of the given new level.                                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<MultiblockRefineSchedule>
+MultiblockRefineAlgorithm::createSchedule(
+   tbox::Pointer<hier::MultiblockPatchLevel> dst_level,
+   tbox::Pointer<hier::MultiblockPatchLevel> src_level,
+   const int next_coarser_level,
+   tbox::Pointer<hier::MultiblockPatchHierarchy> multiblock,
+   MultiblockRefinePatchStrategy* refine_strategy,
+   tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory)
+const
+{
+#ifdef DEBUG_CHECK_DIM_ASSERTIONS
+   if (!src_level.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*dst_level, *src_level);
+   }
+   if (refine_strategy) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*dst_level, *refine_strategy);
+   }
+#endif
+
+   tbox::Pointer<xfer::RefineTransactionFactory> trans_factory =
+      transaction_factory;
+
+   if (trans_factory.isNull()) {
+      trans_factory = new xfer::StandardRefineTransactionFactory;
+   }
+
+   tbox::Pointer<PatchLevelFullFillPattern> fill_pattern(
+      new PatchLevelFullFillPattern());
+
+   return tbox::Pointer<MultiblockRefineSchedule>(new MultiblockRefineSchedule(
+                                                     fill_pattern,
+                                                     dst_level,
+                                                     src_level,
+                                                     next_coarser_level,
+                                                     multiblock,
+                                                     d_single_block_refine_alg,
+                                                     trans_factory,
+                                                     refine_strategy));
+}
+
+tbox::Pointer<MultiblockRefineSchedule>
+MultiblockRefineAlgorithm::createSchedule(
+   tbox::Pointer<PatchLevelFillPattern> fill_pattern,
+   tbox::Pointer<hier::MultiblockPatchLevel> dst_level,
+   tbox::Pointer<hier::MultiblockPatchLevel> src_level,
+   const int next_coarser_level,
+   tbox::Pointer<hier::MultiblockPatchHierarchy> multiblock,
+   MultiblockRefinePatchStrategy* refine_strategy,
+   tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory)
+const
+{
+#ifdef DEBUG_CHECK_DIM_ASSERTIONS
+   if (!src_level.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*dst_level, *src_level);
+   }
+   if (!multiblock.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*dst_level, *multiblock);
+   }
+   if (refine_strategy) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*dst_level, *refine_strategy);
+   }
+#endif
+
+   tbox::Pointer<xfer::RefineTransactionFactory> trans_factory =
+      transaction_factory;
+
+   if (trans_factory.isNull()) {
+      trans_factory = new xfer::StandardRefineTransactionFactory;
+   }
+
+   return tbox::Pointer<MultiblockRefineSchedule>(new MultiblockRefineSchedule(
+                                                     fill_pattern,
+                                                     dst_level,
+                                                     src_level,
+                                                     next_coarser_level,
+                                                     multiblock,
+                                                     d_single_block_refine_alg,
+                                                     trans_factory,
+                                                     refine_strategy));
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register a refinement operation with the algorithm                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MultiblockRefineAlgorithm::registerRefine(
+   const int dst,
+   const int src,
+   const int scratch,
+   tbox::Pointer<xfer::RefineOperator> oprefine,
+   tbox::Pointer<VariableFillPattern> var_fill_pattern)
+{
+   d_single_block_refine_alg->registerRefine(dst, src, scratch, oprefine,
+                                             var_fill_pattern);
+}
+
+void MultiblockRefineAlgorithm::registerRefine(
+   const int dst,
+   const int src,
+   const int src_told,
+   const int src_tnew,
+   const int scratch,
+   tbox::Pointer<xfer::RefineOperator> oprefine,
+   tbox::Pointer<xfer::TimeInterpolateOperator> optime,
+   tbox::Pointer<VariableFillPattern> var_fill_pattern)
+{
+   d_single_block_refine_alg->registerRefine(dst, src, src_told, src_tnew,
+      scratch, oprefine, optime, var_fill_pattern);
+}
+
+void MultiblockRefineAlgorithm::resetSchedule(
+   tbox::Pointer<xfer::MultiblockRefineSchedule> schedule) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!schedule.isNull());
+#endif
+   if (d_single_block_refine_alg->getEquivalenceClasses()->
+       checkConsistency(schedule->getEquivalenceClasses())) {
+      schedule->reset(d_single_block_refine_alg);
+   } else {
+      TBOX_ERROR("MultiblockRefineAlgorithm::resetSchedule error..."
+         << "\n Items in schedule passed to resetSchedule are"
+         << "\n inconsistent with those in the MultiblockRefineAlgorithm."
+         << std::endl);
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/MultiblockRefineAlgorithm.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/MultiblockRefineAlgorithm.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,358 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   class to manage multiblocks 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_MultiblockRefineAlgorithm
+#define included_xfer_MultiblockRefineAlgorithm
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/MultiblockRefineSchedule.h"
+#include "SAMRAI/xfer/RefineAlgorithm.h"
+#include "SAMRAI/xfer/RefinePatchStrategy.h"
+#include "SAMRAI/xfer/MultiblockRefinePatchStrategy.h"
+#include "SAMRAI/hier/MultiblockPatchHierarchy.h"
+#include "SAMRAI/hier/MultiblockPatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Class MultiblockRefineAlgorithm is an extension of the
+ * concept of xfer::RefineAlgorithm to be used in applications that require
+ * a multiblock domain.
+ *
+ * This class requires a pointer to a previously-constructed
+ * xfer::RefineAlgorithm.  It contains four routines that create
+ * a MultiblockRefineSchedule object, each analagous to the
+ * createSchedule() routines in xfer::RefineAlgorithm.
+ *
+ * @see MultiblockPatchHierarchy
+ * @see MultiblockRefineSchedule
+ * @see MultiblockRefineAlgorithm
+ * @see xfer::RefineAlgorithm
+ */
+
+class MultiblockRefineAlgorithm
+{
+
+public:
+   /*!
+    * @brief MultiblockRefineAlgorithm constructor
+    *
+    * Constructor for MultiblockRefineAlgorithm takes a pointer to
+    * an xfer::RefineAlgorithm, that is used to create communication
+    * schedules.  Refinement operations should be registered with the
+    * RefineAlgorithm before this class will do anything useful.
+    *
+    * @param hierarchy     The Multiblock patch hierarchy on which this
+    *                      algorithm will operate.
+    * @param dim           Dimension for the object
+    */
+   explicit MultiblockRefineAlgorithm(
+      tbox::Pointer<hier::MultiblockPatchHierarchy> hierarchy,
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Destructor
+    */
+   ~MultiblockRefineAlgorithm();
+
+   /*!
+    * Register a refine operation with the refine algorithm object.  This
+    * routine does not support time interpolation.  Data values will be moved
+    * from the source component to the destination component using scratch
+    * component as a temporary work space.  The scratch component must have
+    * sufficient ghost cells to cover the required operator stencil width and
+    * any needed physical boundary ghost cells.
+    *
+    * @param dst       Patch data index filled on the destination level.
+    * @param src       Source patch data index on the source level.
+    * @param scratch   Patch data index used as a temporary work space.
+    * @param oprefine  Pointer to refinement operator.  This may be a null
+    *                  pointer.
+    *                  In this case, refinement must be handled by the refine
+    *                  patch strategy member functions.  See the comments for
+    *                  xfer::RefinePatchStrategy<DIM>::preprocessRefine() and
+    *                  xfer::RefinePatchStrategy<DIM>::postprocessRefine().
+    */
+   void
+   registerRefine(
+      const int dst,
+      const int src,
+      const int scratch,
+      tbox::Pointer<xfer::RefineOperator> oprefine,
+      tbox::Pointer<VariableFillPattern> var_fill_pattern =
+         (tbox::Pointer<BoxGeometryVariableFillPattern>)NULL);
+
+   /*!
+    * Register a refine operation with the refine algorithm object.  This
+    * routine supports time interpolation.  Time interpolation will take place
+    * between the old and new source data components on coarser levels.  On
+    * the destination level, data will be moved from the source component to
+    * the destination component using scratch component as a temporary work
+    * space.  The scratch component must have sufficient ghost cells to cover
+    * the required operator stencil width and any needed physical boundary
+    * ghost cells.  The time interpolation operator cannot be null.  When
+    * assertion checking is active,  passing in a null pointer will result
+    * in an unrecoverable assertion.
+    *
+    * @param dst       Patch data index filled on the destination level.
+    * @param src       Source patch data index on source level and for the
+    *                  patch interiors on the destination level.
+    * @param src_told  Old source patch data index for time interpolation.
+    * @param src_tnew  New source patch data index for time interpolation.
+    * @param scratch   Patch data index used as a temporary work space.
+    * @param oprefine  Pointer to refinement operator.  This may be a null
+    *                  pointer.  In this case, refinement must be handled by
+    *                  the refine patch strategy member functions.  See the
+    *                  comments for
+    *                  xfer::RefinePatchStrategy<DIM>::preprocessRefine() and
+    *                  xfer::RefinePatchStrategy<DIM>::postprocessRefine().
+    * @param optime    Pointer to time interpolation operator.  This pointer
+    *                  may not be null.
+    */
+   void
+   registerRefine(
+      const int dst,
+      const int src,
+      const int src_told,
+      const int src_tnew,
+      const int scratch,
+      tbox::Pointer<xfer::RefineOperator> oprefine,
+      tbox::Pointer<xfer::TimeInterpolateOperator> optime,
+      tbox::Pointer<VariableFillPattern> var_fill_pattern =
+         (tbox::Pointer<BoxGeometryVariableFillPattern>)NULL);
+
+   /*!
+    * @brief Create a communication schedule that copies data from the
+    * interiors of the source components into the interior and boundary
+    * cells of the destination components on the same level where those
+    * sources and destinations overlap.
+    *
+    * Neither time nor spatial interpolation is performed.
+    *
+    * @return Pointer to MultiblockRefineSchedule that performs the data
+    *         transfers.
+    *
+    * @param level           Pointer to MultiblockPatchLevel which contains
+    *                        PatchLevels on which interpatch transfers
+    *                        occur.  This pointer cannot be null.
+    * @param patch_strategy   Pointer to a multiblock patch strategy that
+    *                        provides user-defined singularity boundary filling
+    *                        operations.
+    * @param transaction_factory  Refine transaction factory.
+    */
+   tbox::Pointer<MultiblockRefineSchedule>
+   createSchedule(
+      tbox::Pointer<hier::MultiblockPatchLevel> level,
+      MultiblockRefinePatchStrategy* patch_strategy =
+         ((MultiblockRefinePatchStrategy *)NULL),
+      tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory =
+         tbox::Pointer<xfer::RefineTransactionFactory>(NULL)) const;
+
+   /*!
+    * @brief Similar to the above, except with fill_pattern specified.
+    *
+    * @param fill_pattern Indicates which parts of the destination level
+    * to fill.  See RefineSchedule for valid values.
+    */
+   tbox::Pointer<MultiblockRefineSchedule>
+   createSchedule(
+      tbox::Pointer<PatchLevelFillPattern> fill_pattern,
+      tbox::Pointer<hier::MultiblockPatchLevel> level,
+      MultiblockRefinePatchStrategy* patch_strategy =
+         ((MultiblockRefinePatchStrategy *)NULL),
+      tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory =
+         tbox::Pointer<xfer::RefineTransactionFactory>(NULL)) const;
+
+   /*!
+    * @brief Create a communication schedule that copies data from the
+    * interiors of the source components on a source level into the interior
+    * and boundary cells of the destination components on a destination level
+    * where those sources and destinations overlap.
+    *
+    * Neither time nor spatial interpolation is performed.
+    *
+    * @return Pointer to MultiblockRefineSchedule that performs the data
+    *         transfers.
+    *
+    * @param dst_level       Pointer to destination level; cannot be null.
+    * @param src_level       Pointer to source level; cannot be null.
+    * @param patch_strategy   Pointer to a multiblock patch strategy that
+    *                        provides user-defined singularity boundary filling
+    *                        operations.
+    * @param transaction_factory  Refine transaction factory.
+    */
+   tbox::Pointer<MultiblockRefineSchedule>
+   createSchedule(
+      tbox::Pointer<hier::MultiblockPatchLevel> dst_level,
+      tbox::Pointer<hier::MultiblockPatchLevel> src_level,
+      MultiblockRefinePatchStrategy* patch_strategy =
+         ((MultiblockRefinePatchStrategy *)NULL),
+      tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory =
+         tbox::Pointer<xfer::RefineTransactionFactory>(NULL)) const;
+
+   /*!
+    * @brief Similar to the above, except with fill_pattern specified.
+    *
+    * @param fill_pattern Indicates which parts of the destination level
+    * to fill.  See RefineSchedule for valid values.
+    */
+   tbox::Pointer<MultiblockRefineSchedule>
+   createSchedule(
+      tbox::Pointer<PatchLevelFillPattern> fill_pattern,
+      tbox::Pointer<hier::MultiblockPatchLevel> dst_level,
+      tbox::Pointer<hier::MultiblockPatchLevel> src_level,
+      MultiblockRefinePatchStrategy* patch_strategy =
+         ((MultiblockRefinePatchStrategy *)NULL),
+      tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory =
+         tbox::Pointer<xfer::RefineTransactionFactory>(NULL)) const;
+
+   /*!
+    * @brief Create a communication schedule that copies data from the
+    * interiors of the source components into the interior and boundary
+    * cells of the destination components on the same level where those
+    * sources and destinations overlap.  Data is moved from old and new
+    * sources on coarser levels when time interpolation is needed and from
+    * the source components on the patch level into the destination
+    * components.
+    *
+    * @return Pointer to MultiblockRefineSchedule that performs the data
+    *         transfers.
+    *
+    * @param level           Pointer to destination MultiblockPatchLevel.  This
+    *                        This pointer cannot be null.
+    * @param next_coarser_level Integer number of next coarser
+    *                           MultiblockPatchLevel relative to the
+    *                           destination level.  Note that when the
+    *                           destination level has number zero (i.e., the
+    *                           coarsest level), this value should be < 0.
+    * @param multiblock      Pointer to Multiblock object which contains
+    *                        all of the hierarchies from which data to fill
+    *                        level should come.
+    * @param patch_strategy   Pointer to a multiblock patch strategy that
+    *                        provides user-defined singularity boundary filling
+    *                        operations.
+    * @param transaction_factory  Refine transaction factory.
+    */
+   tbox::Pointer<MultiblockRefineSchedule>
+   createSchedule(
+      tbox::Pointer<hier::MultiblockPatchLevel> level,
+      const int next_coarser_level,
+      tbox::Pointer<hier::MultiblockPatchHierarchy> multiblock,
+      MultiblockRefinePatchStrategy* patch_strategy =
+         ((MultiblockRefinePatchStrategy *)NULL),
+      tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory =
+         tbox::Pointer<xfer::RefineTransactionFactory>(NULL)) const;
+
+   /*!
+    * @brief Similar to the above, except with fill_pattern specified.
+    *
+    * @param fill_pattern Indicates which parts of the destination level
+    * to fill.  See RefineSchedule for valid values.
+    */
+   tbox::Pointer<MultiblockRefineSchedule>
+   createSchedule(
+      tbox::Pointer<PatchLevelFillPattern> fill_pattern,
+      tbox::Pointer<hier::MultiblockPatchLevel> level,
+      const int next_coarser_level,
+      tbox::Pointer<hier::MultiblockPatchHierarchy> multiblock,
+      MultiblockRefinePatchStrategy* patch_strategy =
+         ((MultiblockRefinePatchStrategy *)NULL),
+      tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory =
+         tbox::Pointer<xfer::RefineTransactionFactory>(NULL)) const;
+   /*!
+    * @brief Create a communication schedule that moves data from the
+    * interiors of the source level and coarser hierarchy levels into the
+    * interior and boundary cells of the destination components on the
+    * destination level where those sources and destinations overlap.  Data is
+    * moved from old and new sources on coarser levels when time interpolation
+    * is needed and from the source components on the source level into the
+    * destination components.
+    *
+    * @return Pointer to MultiblockRefineSchedule that performs the data
+    *         transfers.
+    * @param dst_level       Pointer to destination level; cannot be null.
+    * @param src_level       Pointer to source level; cannot be null.
+    * @param next_coarser_level Integer number of next coarser
+    *                           MultiblockPatchLevel relative to the
+    *                           destination level.  Note that when the
+    *                           destination level has number zero (i.e., the
+    *                           coarsest level), this value should be < 0.
+    * @param multiblock      Pointer to Multiblock object which contains
+    *                        all of the hierarchies where the PatchLevels
+    *                        exist.
+    * @param patch_strategy   Pointer to a multiblock patch strategy that
+    *                        provides user-defined singularity boundary filling
+    *                        operations.
+    * @param transaction_factory  Refine transaction factory.
+    */
+   tbox::Pointer<MultiblockRefineSchedule>
+   createSchedule(
+      tbox::Pointer<hier::MultiblockPatchLevel> dst_level,
+      tbox::Pointer<hier::MultiblockPatchLevel> src_level,
+      const int next_coarser_level,
+      tbox::Pointer<hier::MultiblockPatchHierarchy> multiblock,
+      MultiblockRefinePatchStrategy* patch_strategy =
+         ((MultiblockRefinePatchStrategy *)NULL),
+      tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory =
+         tbox::Pointer<xfer::RefineTransactionFactory>(NULL)) const;
+
+   /*!
+    * @brief Similar to the above, except with fill_pattern specified.
+    *
+    * @param fill_pattern Indicates which parts of the destination level
+    * to fill.  See RefineSchedule for valid values.
+    */
+   tbox::Pointer<MultiblockRefineSchedule>
+   createSchedule(
+      tbox::Pointer<PatchLevelFillPattern> fill_pattern,
+      tbox::Pointer<hier::MultiblockPatchLevel> dst_level,
+      tbox::Pointer<hier::MultiblockPatchLevel> src_level,
+      const int next_coarser_level,
+      tbox::Pointer<hier::MultiblockPatchHierarchy> multiblock,
+      MultiblockRefinePatchStrategy* patch_strategy =
+         ((MultiblockRefinePatchStrategy *)NULL),
+      tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory =
+         tbox::Pointer<xfer::RefineTransactionFactory>(NULL)) const;
+
+   /*!
+    * @brief Given a previously-generated refine schedule, reconfigure it to
+    * peform the communication operations registered with this refine algorithm
+    * object.  That is, the schedule will be transformed so that it will
+    * funcions as though this refine algorithm created it.  Note that the set
+    * of operations registered with this refine algorithm must be essentially
+    * the same as those registered with the refine algorithm that created the
+    * schedule originallyl.  That is, the number of operations registered must
+    * be the same and the source, destination, scratch patch data items and
+    * operators for each operation must have identical characteristics (i.e.,
+    * data centering, ghost cell widths, stencil requirements, etc.).
+    * However, the specific source, destination, scratch patch data ids and
+    * operators can be different.  Detailed and fairly complete error checking
+    * is performed when this routine is called to prevent potential errors or
+    * unexpected behavior.
+    *
+    * @param schedule  tbox::Pointer to refine schedule, which cannot be null.
+    */
+   void
+   resetSchedule(
+      tbox::Pointer<xfer::MultiblockRefineSchedule> schedule) const;
+
+private:
+   tbox::Pointer<xfer::RefineAlgorithm> d_single_block_refine_alg;
+   tbox::Pointer<hier::MultiblockPatchHierarchy> d_multiblock_hierarchy;
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/MultiblockRefinePatchStrategy.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/MultiblockRefinePatchStrategy.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,55 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Strategy interface to user routines for refining AMR data. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_MultiblockRefinePatchStrategy_C
+#define included_xfer_MultiblockRefinePatchStrategy_C
+
+#include "SAMRAI/xfer/MultiblockRefinePatchStrategy.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*
+ *************************************************************************
+ *									*
+ * The default constructor and virtual destructor do nothing             *
+ * particularly interesting.		                                *
+ *									*
+ *************************************************************************
+ */
+
+MultiblockRefinePatchStrategy::MultiblockRefinePatchStrategy(
+   const tbox::Dimension& dim):
+   xfer::RefinePatchStrategy(dim)
+{
+   d_filling_coarse_scratch = false;
+   d_block_number = MULTIBLOCK_UNDEFINED_BLOCK_NUMBER;
+}
+
+MultiblockRefinePatchStrategy::~MultiblockRefinePatchStrategy()
+{
+}
+
+void MultiblockRefinePatchStrategy::setPhysicalBoundaryConditions(
+   hier::Patch& patch,
+   const double fill_time,
+   const hier::IntVector& ghost_width_to_fill)
+
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*this, patch, ghost_width_to_fill);
+
+   NULL_USE(patch);
+   NULL_USE(fill_time);
+   NULL_USE(ghost_width_to_fill);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/MultiblockRefinePatchStrategy.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,196 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Strategy interface to user routines for refining AMR data. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_MultiblockRefinePatchStrategy
+#define included_xfer_MultiblockRefinePatchStrategy
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/xfer/MultiblockRefineSchedule.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/xfer/CoarsenPatchStrategy.h"
+#include "SAMRAI/xfer/RefinePatchStrategy.h"
+
+#ifndef MULTIBLOCK_UNDEFINED_BLOCK_NUMBER
+#define MULTIBLOCK_UNDEFINED_BLOCK_NUMBER (-1)
+#endif
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Class MultiblockRefinePatchStrategy is a virtual base class
+ * that provides interfaces for users to problem-specific routines related
+ * to issues that arise in multiblock domains, particularly the filling
+ * of boundary conditions around a singularity.
+ */
+
+class MultiblockRefinePatchStrategy:
+   public virtual tbox::DescribedClass,
+   public xfer::RefinePatchStrategy
+{
+public:
+   /*!
+    * The constructor for patch strategy does nothing interesting.
+    */
+   explicit MultiblockRefinePatchStrategy(
+      const tbox::Dimension& dim);
+
+   /*!
+    * The virtual destructor for refine strategy does nothing interesting.
+    */
+   virtual ~MultiblockRefinePatchStrategy();
+
+   /*!
+    * @brief Set the physical boundary conditions.
+    *
+    * @param patch The patch containing the data to be filled
+    * @param fill_time Simulation time at which data is filled
+    * @param ghost_width_to_fill maximum number of ghost cells to fill
+    */
+   virtual void
+   setPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const double fill_time,
+      const hier::IntVector& ghost_width_to_fill);
+
+   /*!
+    * @brief Set the ghost data at a multiblock singularity.
+    *
+    * @param patch The patch containing the data to be filled
+    * @param singularity_patches structures from refine schedule that contain
+    *                            patches that hold data from neighboring
+    *                            blocks around the singularity
+    * @param fill_time Simulation time at which data is filled
+    * @param fill_box Box covering maximum amount of ghost cells to be filled
+    * @param boundary_box BoundaryBox describing location of singularity in
+    *                     relation to patch
+    */
+   virtual void
+   fillSingularityBoundaryConditions(
+      hier::Patch& patch,
+      tbox::List<tbox::Pointer<hier::Patch> >&
+      singularity_patches,
+      const double fill_time,
+      const hier::Box& fill_box,
+      const hier::BoundaryBox& boundary_box) = 0;
+
+   /*!
+    * Return maximum stencil width needed for user-defined
+    * data interpolation operations.  This is needed to
+    * determine the correct interpolation data dependencies.
+    */
+   virtual hier::IntVector
+   getRefineOpStencilWidth() const = 0;
+
+   /*!
+    * Perform user-defined refining operations.  This member function
+    * is called before standard refining operations (expressed using
+    * concrete subclasses of the xfer::RefineOperator base class).
+    * The preprocess function must refine data from the scratch components
+    * of the coarse patch into the scratch components of the fine patch on the
+    * specified fine box region.  Recall that the scratch components are
+    * specified in calls to the registerRefine() function in the
+    * xfer::RefineAlgorithm class.
+    *
+    * @param fine        Fine patch containing destination data.
+    * @param coarse      Coarse patch containing source data.
+    * @param fine_box    Box region on fine patch into which data is refined.
+    * @param ratio       Integer vector containing ratio relating index space
+    *                    between coarse and fine patches.
+    */
+   virtual void preprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio)
+   {
+      NULL_USE(fine);
+      NULL_USE(coarse);
+      NULL_USE(fine_box);
+      NULL_USE(ratio);
+   }
+
+   /*!
+    * Perform user-defined refining operations.  This member function
+    * is called after standard refining operations (expressed using
+    * concrete subclasses of the xfer::RefineOperator base class).
+    * The postprocess function must refine data from the scratch components
+    * of the coarse patch into the scratch components of the fine patch on the
+    * specified fine box region.  Recall that the scratch components are
+    * specified in calls to the registerRefine() function in the
+    * xfer::RefineAlgorithm class.
+    *
+    * @param fine        Fine patch containing destination data.
+    * @param coarse      Coarse patch containing source data.
+    * @param fine_box    Box region on fine patch into which data is refined.
+    * @param ratio       Integer vector containing ratio relating index space
+    *                    between coarse and fine patches.
+    */
+   virtual void postprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio)
+   {
+      NULL_USE(fine);
+      NULL_USE(coarse);
+      NULL_USE(fine_box);
+      NULL_USE(ratio);
+   }
+
+   /*
+    * During the fillData operation by the MultiblockRefineSchedule, there are
+    * times where it is necssary to fill a temporary coarsened "scratch"
+    * level.  This method allows the schedule to set the right conditions
+    * in this strategy class.
+    */
+   virtual void setFillingCoarseScratch(
+      const bool filling_coarse_scratch)
+   {
+      d_filling_coarse_scratch = filling_coarse_scratch;
+   }
+
+   /*
+    * Set the multiblock block number.
+    */
+   virtual void setBlockNumber(
+      const int block_number)
+   {
+      d_block_number = block_number;
+   }
+
+   /*
+    * Get the multiblock block number.
+    */
+   virtual int getBlockNumber()
+   {
+      return d_block_number;
+   }
+
+   /*
+    * Clear the multiblock block number.
+    */
+   virtual void clearBlockNumber()
+   {
+      d_block_number = MULTIBLOCK_UNDEFINED_BLOCK_NUMBER;
+   }
+
+protected:
+   bool d_filling_coarse_scratch;
+   int d_block_number;
+
+private:
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/MultiblockRefineSchedule.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/MultiblockRefineSchedule.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,3211 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Base class for geometry management on patches 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_MultiblockRefineSchedule_C
+#define included_xfer_MultiblockRefineSchedule_C
+
+#include "SAMRAI/xfer/MultiblockRefineSchedule.h"
+
+#include "SAMRAI/xfer/PatchLevelFullFillPattern.h"
+#include "SAMRAI/xfer/MultiblockRefinePatchStrategy.h"
+#include "SAMRAI/xfer/MultiblockRefineAlgorithm.h"
+#include "SAMRAI/xfer/StandardRefineTransactionFactory.h"
+#include "SAMRAI/hier/BlockPatchGeometry.h"
+#include "SAMRAI/hier/MappedBoxSet.h"
+#include "SAMRAI/hier/MBUtilities.h"
+#include "SAMRAI/hier/OverlapConnectorAlgorithm.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Create a refine schedule that copies data from the source level into   *
+ * the destination level on the components represented by the refine      *
+ * It is assumed that the index spaces of the source and destination      *
+ * levels represent the same grid resolution.                             *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+MultiblockRefineSchedule::MultiblockRefineSchedule(
+   tbox::Pointer<PatchLevelFillPattern> fill_pattern,
+   tbox::Pointer<hier::MultiblockPatchLevel> dst_level,
+   tbox::Pointer<hier::MultiblockPatchLevel> src_level,
+   tbox::Pointer<hier::MultiblockPatchHierarchy> multiblock,
+   tbox::Pointer<xfer::RefineAlgorithm> refine_alg,
+   tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory,
+   MultiblockRefinePatchStrategy* strategy,
+   bool use_time_refinement):
+   d_multiblock_hierarchy(multiblock),
+   d_fill_pattern(fill_pattern),
+   d_data_fill_gcw(dst_level->getDim())
+{
+#ifdef DEBUG_CHECK_DIM_ASSERTIONS
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*dst_level, *src_level, *multiblock);
+   if (refine_alg) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*dst_level, *refine_alg);
+   }
+   if (strategy) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*dst_level, *strategy);
+   }
+#endif
+
+   d_single_block_refine_alg = refine_alg;
+
+   d_transaction_factory = transaction_factory;
+
+   d_using_standard_transaction = false;
+   tbox::Pointer<xfer::StandardRefineTransactionFactory> t_factory =
+      d_transaction_factory;
+
+   if (!(t_factory.isNull())) {
+      d_using_standard_transaction = true;
+   }
+
+   d_single_block_scratch_refine_alg.setNull();
+
+   d_multiblock_dst_level = dst_level;
+
+   d_single_block_fill_local.resizeArray(multiblock->getNumberOfBlocks());
+   d_local_fill_only.resizeArray(multiblock->getNumberOfBlocks());
+   d_unfilled_boxes.resizeArray(multiblock->getNumberOfBlocks());
+   d_multiblock_coarse_scratch_level.resizeArray(multiblock->getNumberOfBlocks());
+   d_local_refine_overlaps.resize(multiblock->getNumberOfBlocks());
+   d_crs_to_dst_connector.resizeArray(multiblock->getNumberOfBlocks());
+   d_multiblock_coarse_schedule.resizeArray(multiblock->getNumberOfBlocks());
+   d_coarse_selector.resizeArray(multiblock->getNumberOfBlocks());
+
+   d_multiblock_strategy = strategy;
+
+   d_neighbor_single_block_refine_schedule.resizeArray(
+      multiblock->getNumberOfBlocks());
+   d_neighbor_ghost_level.resizeArray(multiblock->getNumberOfBlocks());
+   d_finalize_ghost_level.resizeArray(multiblock->getNumberOfBlocks());
+   d_finalize_ghost_patch_numbers.resizeArray(multiblock->getNumberOfBlocks());
+   d_finalize_ghost_num_src_patches.resizeArray(multiblock->getNumberOfBlocks());
+
+   d_neighbor_copy_only.resizeArray(multiblock->getNumberOfBlocks());
+   d_neighbor_unfilled_boxes.resizeArray(multiblock->getNumberOfBlocks());
+   d_neighbor_multiblock_coarse_level.resizeArray(multiblock->getNumberOfBlocks());
+   d_neighbor_copy_overlaps.resizeArray(multiblock->getNumberOfBlocks());
+   d_neighbor_refine_overlaps.resize(multiblock->getNumberOfBlocks());
+   d_neighbor_crs_to_dst_connector.resizeArray(multiblock->getNumberOfBlocks());
+   d_neighbor_multiblock_coarse_schedule.resizeArray(
+      multiblock->getNumberOfBlocks());
+
+   const tbox::Pointer<RefineClasses>& refine_classes =
+      d_single_block_refine_alg->getEquivalenceClasses();
+   const int num_classes = refine_classes->getNumberOfEquivalenceClasses();
+
+   tbox::Pointer<hier::PatchDescriptor> descriptor =
+      hier::VariableDatabase::getDatabase()->getPatchDescriptor();
+
+   const tbox::Dimension& dim = dst_level->getDim();
+   hier::IntVector desc_gcw(descriptor->getMaxGhostWidth(dim));
+   hier::IntVector gcw(hier::IntVector::getOne(dim));
+
+   for (int ne = 0; ne < num_classes; ne++) {
+
+      const RefineClasses::Data& rep_item =
+         refine_classes->getClassRepresentative(ne);
+
+      const tbox::Pointer<VariableFillPattern>& var_fill_pattern =
+         rep_item.d_var_fill_pattern;
+
+      if (var_fill_pattern->getPatternName() !=
+          "BOX_GEOMETRY_FILL_PATTERN") {
+         gcw = hier::IntVector::max(gcw,
+               var_fill_pattern->getStencilWidth());
+      } else {
+         gcw = hier::IntVector::max(gcw, desc_gcw);
+      }
+   }
+
+   d_data_fill_gcw = gcw;
+
+   bool encon_only = d_fill_pattern->fillingEnhancedConnectivityOnly();
+
+   for (int nb = 0; nb < d_multiblock_hierarchy->getNumberOfBlocks(); nb++) {
+      d_coarse_selector[nb] = new hier::ComponentSelector();
+      d_coarse_selector[nb]->clrAllFlags();
+
+      tbox::Pointer<hier::PatchHierarchy> hierarchy =
+         d_multiblock_hierarchy->getHierarchy(nb);
+
+      tbox::Pointer<hier::PatchLevel> dst_patch_level =
+         dst_level->getPatchLevelForBlock(nb);
+
+      if (!encon_only && !dst_patch_level.isNull()) {
+         tbox::Pointer<hier::PatchLevel> src_patch_level;
+         if (!(src_level.isNull())) {
+            src_patch_level = src_level->getPatchLevelForBlock(nb);
+         } else {
+            src_patch_level.setNull();
+         }
+         if (!src_patch_level.isNull()) {
+
+            /*
+             * This private constructor is written for same src and
+             * dst refinement ratios.  It is not meant to be used when
+             * they are not the same.
+             */
+            TBOX_ASSERT(
+               src_patch_level->getRatioToLevelZero() ==
+               dst_patch_level->getRatioToLevelZero());
+
+            /*
+             * dst_patch_level does not have a real level number, but
+             * note that it is at the same resolution as the
+             * src_patch_level.
+             */
+
+            d_single_block_fill_local[nb] =
+               d_single_block_refine_alg->createSchedule(
+                  d_fill_pattern,
+                  dst_patch_level,
+                  src_patch_level,
+                  (xfer::RefinePatchStrategy *)strategy,
+                  use_time_refinement,
+                  d_transaction_factory);
+         } else {
+            d_single_block_fill_local[nb].setNull();
+         }
+      } else {
+
+         d_single_block_fill_local[nb].setNull();
+
+      }
+
+      d_local_fill_only[nb] = true;
+   }
+
+   if (strategy != NULL) {
+      createInterblockSchedules(dst_level,
+         src_level,
+         (xfer::RefinePatchStrategy *)strategy,
+         MULTIBLOCK_FAKE_LEVEL_NUMBER,
+         use_time_refinement);
+
+      createOverlapsForRefine(dst_level, src_level);
+      createOverlapsForCopy();
+   }
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Create a refine schedule that copies data from the source level into   *
+ * the destination level on the components represented by the refine      *
+ * list.  If portions of the destination level remain unfilled, then      *
+ * the algorithm recursively fills those unfilled portions from coarser   *
+ * levels in the hierarchies of the multiblock object.  It is assumed     *
+ * that the index spaces of the source and destination levels represent   *
+ * the same grid resolution.  Also, the next coarser level integer        *
+ * argument must be the number of level in the multiblock hierarchies     *
+ * representing the next coarser level of mesh resolution to the          *
+ * destination level.                                                     *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+MultiblockRefineSchedule::MultiblockRefineSchedule(
+   tbox::Pointer<PatchLevelFillPattern> fill_pattern,
+   tbox::Pointer<hier::MultiblockPatchLevel> dst_level,
+   tbox::Pointer<hier::MultiblockPatchLevel> src_level,
+   const int next_coarser_level,
+   tbox::Pointer<hier::MultiblockPatchHierarchy> multiblock,
+   tbox::Pointer<xfer::RefineAlgorithm> refine_alg,
+   tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory,
+   MultiblockRefinePatchStrategy* strategy,
+   bool use_time_refinement):
+   d_multiblock_hierarchy(multiblock),
+   d_fill_pattern(fill_pattern),
+   d_data_fill_gcw(dst_level->getDim())
+{
+   TBOX_ASSERT(strategy != NULL);
+#ifdef DEBUG_CHECK_DIM_ASSERTIONS
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*dst_level, *strategy);
+   if (!src_level.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*dst_level, *src_level);
+   }
+   if (!multiblock.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*dst_level, *multiblock);
+   }
+   if (refine_alg) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*dst_level, *refine_alg);
+   }
+#endif
+
+   const tbox::Dimension& dim(d_multiblock_hierarchy->getDim());
+
+   d_single_block_refine_alg = refine_alg;
+
+   d_transaction_factory = transaction_factory;
+
+   d_using_standard_transaction = false;
+   tbox::Pointer<xfer::StandardRefineTransactionFactory> t_factory =
+      d_transaction_factory;
+
+   if (!(t_factory.isNull())) {
+      d_using_standard_transaction = true;
+   }
+
+   d_single_block_scratch_refine_alg.setNull();
+
+   constructScratchRefineAlgorithm();
+
+   d_multiblock_dst_level = dst_level;
+
+   d_multiblock_strategy = strategy;
+
+   d_single_block_fill_local.resizeArray(multiblock->getNumberOfBlocks());
+   d_local_fill_only.resizeArray(multiblock->getNumberOfBlocks());
+   d_multiblock_coarse_schedule.resizeArray(multiblock->getNumberOfBlocks());
+   d_coarse_selector.resizeArray(multiblock->getNumberOfBlocks());
+   d_unfilled_boxes.resizeArray(multiblock->getNumberOfBlocks());
+   d_multiblock_coarse_scratch_level.resizeArray(multiblock->getNumberOfBlocks());
+   d_local_refine_overlaps.resize(multiblock->getNumberOfBlocks());
+   d_crs_to_dst_connector.resizeArray(multiblock->getNumberOfBlocks());
+
+   d_neighbor_single_block_refine_schedule.resizeArray(
+      multiblock->getNumberOfBlocks());
+   d_neighbor_ghost_level.resizeArray(multiblock->getNumberOfBlocks());
+   d_finalize_ghost_level.resizeArray(multiblock->getNumberOfBlocks());
+   d_finalize_ghost_patch_numbers.resizeArray(multiblock->getNumberOfBlocks());
+   d_finalize_ghost_num_src_patches.resizeArray(multiblock->getNumberOfBlocks());
+
+   d_neighbor_copy_only.resizeArray(multiblock->getNumberOfBlocks());
+   d_neighbor_unfilled_boxes.resizeArray(multiblock->getNumberOfBlocks());
+   d_neighbor_multiblock_coarse_level.resizeArray(multiblock->getNumberOfBlocks());
+   d_neighbor_copy_overlaps.resizeArray(multiblock->getNumberOfBlocks());
+   d_neighbor_refine_overlaps.resize(multiblock->getNumberOfBlocks());
+   d_neighbor_crs_to_dst_connector.resizeArray(multiblock->getNumberOfBlocks());
+   d_neighbor_multiblock_coarse_schedule.resizeArray(
+      multiblock->getNumberOfBlocks());
+
+   const tbox::Pointer<RefineClasses>& refine_classes =
+      d_single_block_refine_alg->getEquivalenceClasses();
+   const int num_classes = refine_classes->getNumberOfEquivalenceClasses();
+
+   tbox::Pointer<hier::PatchDescriptor> descriptor =
+      hier::VariableDatabase::getDatabase()->getPatchDescriptor();
+
+   hier::IntVector desc_gcw(descriptor->getMaxGhostWidth(dim));
+   hier::IntVector gcw(hier::IntVector::getOne(dim));
+
+   for (int ne = 0; ne < num_classes; ne++) {
+
+      const RefineClasses::Data& rep_item =
+         refine_classes->getClassRepresentative(ne);
+
+      const tbox::Pointer<VariableFillPattern>& var_fill_pattern =
+         rep_item.d_var_fill_pattern;
+
+      if (var_fill_pattern->getPatternName() !=
+          "BOX_GEOMETRY_FILL_PATTERN") {
+         gcw = hier::IntVector::max(gcw,
+               var_fill_pattern->getStencilWidth());
+      } else {
+         gcw = hier::IntVector::max(gcw, desc_gcw);
+      }
+   }
+
+   d_data_fill_gcw = gcw;
+
+   bool encon_only = d_fill_pattern->fillingEnhancedConnectivityOnly();
+
+   for (int nb = 0; nb < d_multiblock_hierarchy->getNumberOfBlocks(); nb++) {
+
+      d_coarse_selector[nb] = new hier::ComponentSelector();
+      d_coarse_selector[nb]->clrAllFlags();
+
+      d_local_fill_only[nb] = true;
+
+      tbox::Pointer<hier::PatchHierarchy> hierarchy =
+         d_multiblock_hierarchy->getHierarchy(nb);
+
+      tbox::Pointer<hier::PatchLevel> dst_patch_level =
+         dst_level->getPatchLevelForBlock(nb);
+
+      if (!encon_only && !dst_patch_level.isNull()) {
+
+         const hier::BoxList dst_level_physdomain_boxlist(
+                             dst_patch_level->getPhysicalDomain() );
+
+         tbox::Pointer<hier::PatchLevel> src_patch_level;
+         if (!(src_level.isNull())) {
+            src_patch_level = src_level->getPatchLevelForBlock(nb);
+         } else {
+            src_patch_level.setNull();
+         }
+
+         bool need_other_source_blocks = true;
+
+         hier::BoxList domain_outside_block;
+         d_multiblock_hierarchy->getDomainOutsideBlock(domain_outside_block,
+            nb);
+         domain_outside_block.refine(dst_patch_level->getRatioToLevelZero());
+
+         if (!src_patch_level.isNull()) {
+
+            if (d_multiblock_hierarchy->getNumberOfBlocks() > 1) { 
+               hier::BoxList dst_boxes(dst_patch_level->getBoxes());
+               hier::BoxList src_boxes(src_patch_level->getBoxes());
+
+               dst_boxes.grow(gcw);
+               dst_boxes.intersectBoxes(dst_level_physdomain_boxlist);
+
+               need_other_source_blocks =
+                  needOtherSourceBlocks(dst_boxes,
+                     src_boxes,
+                     domain_outside_block);
+            } else {
+               need_other_source_blocks = false;
+            }
+         }
+
+         if (need_other_source_blocks) {
+
+            hier::OverlapConnectorAlgorithm connect_util;
+
+            d_local_fill_only[nb] = false;
+
+            d_unfilled_boxes[nb].clearItems();
+            if (!src_patch_level.isNull()) {
+
+               const hier::IntVector connector_gcw =
+                  hierarchy->getRequiredConnectorWidth(src_patch_level->getLevelNumber(),
+                     src_patch_level->getLevelNumber());
+               const hier::Connector& dst_to_dst =
+                  dst_patch_level->getMappedBoxLevel()->
+                  getPersistentOverlapConnectors().findOrCreateConnector(
+                     *dst_patch_level->getMappedBoxLevel(),
+                     connector_gcw);
+
+               const hier::Connector& dst_to_src =
+                  dst_patch_level->getMappedBoxLevel()->
+                  getPersistentOverlapConnectors().findOrCreateConnector(
+                     *src_patch_level->getMappedBoxLevel(),
+                     connector_gcw);
+
+               const hier::Connector& src_to_dst =
+                  src_patch_level->getMappedBoxLevel()->
+                  getPersistentOverlapConnectors().findOrCreateConnector(
+                     *dst_patch_level->getMappedBoxLevel(),
+                     connector_gcw);
+
+               hier::MappedBoxSet fill_mapped_boxes;
+               hier::NeighborhoodSet dst_to_fill_edges;
+               d_fill_pattern->computeFillMappedBoxesAndNeighborhoodSets(
+                  fill_mapped_boxes,
+                  dst_to_fill_edges,
+                  *(dst_patch_level->getMappedBoxLevel()),
+                  dst_to_dst,
+                  dst_to_src,
+                  src_to_dst,
+                  gcw);
+
+               hier::BoxList local_fill_boxes;
+               hier::BoxList nabr_src_boxes;
+               for (hier::RealMappedBoxConstIterator ni(dst_patch_level->getMappedBoxLevel()->
+                       getMappedBoxes());
+                    ni.isValid(); ++ni) {
+                  const hier::GlobalId& gid = ni->getGlobalId();
+
+                  const hier::MappedBoxSet& dst_to_fill_nabrs =
+                     dst_to_fill_edges[gid];
+
+                  for (hier::RealMappedBoxConstIterator di(dst_to_fill_nabrs);
+                       di.isValid(); ++di) {
+                     local_fill_boxes.appendItem((*di).getBox());
+                  }
+
+                  if (dst_to_src.hasNeighborSet(gid)) {
+                     const hier::MappedBoxSet& src_nabrs =
+                        dst_to_src.getNeighborSet(gid);
+                     for (hier::RealMappedBoxConstIterator si(src_nabrs);
+                          si.isValid(); ++si) {
+                        nabr_src_boxes.appendItem((*si).getBox());
+                     }
+                  }
+               }
+               local_fill_boxes.removeIntersections(nabr_src_boxes);
+
+               d_unfilled_boxes[nb].unionBoxes(local_fill_boxes);
+
+            } else {
+
+               hier::IntVector connector_gcw(gcw);
+               if (dst_patch_level->getLevelNumber() >= 0) {
+                  connector_gcw =
+                     hierarchy->getRequiredConnectorWidth(
+                        dst_patch_level->getLevelNumber(),
+                        dst_patch_level->getLevelNumber());
+               }
+
+               const hier::Connector& dst_to_dst =
+                  dst_patch_level->getMappedBoxLevel()->
+                  getPersistentOverlapConnectors().findOrCreateConnector(
+                     *dst_patch_level->getMappedBoxLevel(),
+                     connector_gcw);
+
+               // Empty connectors since there is no source level
+               hier::Connector src_to_dst;
+               hier::Connector dst_to_src;
+
+               hier::MappedBoxSet fill_mapped_boxes;
+               hier::NeighborhoodSet dst_to_fill_edges;
+               d_fill_pattern->computeFillMappedBoxesAndNeighborhoodSets(
+                  fill_mapped_boxes,
+                  dst_to_fill_edges,
+                  *(dst_patch_level->getMappedBoxLevel()),
+                  dst_to_dst,
+                  dst_to_src,
+                  src_to_dst,
+                  gcw);
+
+               for (hier::RealMappedBoxConstIterator ni(dst_patch_level->getMappedBoxLevel()->
+                       getMappedBoxes());
+                    ni.isValid(); ++ni) {
+                  const hier::GlobalId& gid = ni->getGlobalId();
+
+                  const hier::MappedBoxSet& dst_to_fill_nabrs =
+                     dst_to_fill_edges[gid];
+
+                  for (hier::RealMappedBoxConstIterator di(dst_to_fill_nabrs);
+                       di.isValid(); ++di) {
+                     d_unfilled_boxes[nb].appendItem((*di).getBox());
+                  }
+               }
+            }
+
+            d_unfilled_boxes[nb].intersectBoxes(dst_level_physdomain_boxlist);
+            d_unfilled_boxes[nb].coalesceBoxes();
+
+            std::vector<hier::MappedBox> dst_mapped_boxes;
+            std::vector<int> dst_box_for_crs_box;
+
+            const int rank = dst_patch_level->getMappedBoxLevel()->getMPI().getRank();
+
+            hier::BoxArray tc_boxes(dim, d_unfilled_boxes[nb].size());
+
+            if (tc_boxes.size()) {
+               int num_local_dst = 0;
+               int num_tc_boxes = 0;
+
+               for (hier::PatchLevel::Iterator p(dst_patch_level);
+                    p; p++) {
+
+                  tbox::Pointer<hier::Patch> patch = *p;
+
+                  hier::Box dst_box(patch->getBox());
+                  dst_box.grow(gcw);
+                  hier::BoxList dst_box_list(dst_box);
+                  dst_box_list.intersectBoxes(dst_level_physdomain_boxlist);
+                  dst_box_list.intersectBoxes(d_unfilled_boxes[nb]);
+                  dst_box_list.coalesceBoxes();
+
+                  dst_mapped_boxes.push_back(patch->getMappedBox());
+
+                  for (hier::BoxList::Iterator
+                       db(dst_box_list); db; db++) {
+                     if (num_tc_boxes == tc_boxes.size()) {
+                        tc_boxes.resizeBoxArray(num_tc_boxes * 2);
+                     }
+                     tc_boxes[num_tc_boxes] = db();
+                     dst_box_for_crs_box.push_back(num_local_dst);
+
+                     num_tc_boxes++;
+
+                  }
+                  num_local_dst++;
+               }
+               tc_boxes.resizeBoxArray(num_tc_boxes);
+            }
+
+            hier::BoxList tmp_crs_boxes(tc_boxes);
+
+            hier::IntVector coarse_ratio =
+               dst_patch_level->getRatioToCoarserLevel();
+            tbox::Pointer<hier::MultiblockPatchLevel>
+            coarser_mblk_level =
+               d_multiblock_hierarchy->getPatchLevel(next_coarser_level);
+            if (coarse_ratio == hier::IntVector(dim, 0)) {
+               coarse_ratio = dst_patch_level->getRatioToLevelZero()
+                  / coarser_mblk_level->getRatioToLevelZero();
+            }
+
+            tmp_crs_boxes.coarsen(coarse_ratio);
+            hier::BoxArray tmp_crs_array(dim, tmp_crs_boxes);
+
+            hier::MappedBoxSet tmp_crs_mapped_box_set;
+            hier::LocalId coarse_index(0);
+            for (int ts = 0; ts < tmp_crs_array.size(); ts++) {
+               hier::MappedBox local_mapped_box(tmp_crs_array[ts],
+                                                coarse_index++,
+                                                rank);
+
+               tmp_crs_mapped_box_set.insert(tmp_crs_mapped_box_set.end(),
+                  local_mapped_box);
+            }
+
+            tbox::ConstPointer<hier::MappedBoxLevel> coarse_mapped_box_level =
+               new hier::MappedBoxLevel(
+                  tmp_crs_mapped_box_set,
+                  d_multiblock_hierarchy->
+                  getPatchLevel(next_coarser_level)->getRatioToLevelZero());
+
+            tbox::Pointer<hier::PatchLevel> coarse_level(
+               new hier::PatchLevel(
+                  *coarse_mapped_box_level,
+                  coarser_mblk_level->getPatchLevelForBlock(nb)->
+                  getGridGeometry(),
+                  dst_patch_level->getPatchDescriptor(),
+                  dst_patch_level->getPatchFactory()));
+            coarse_level->setLevelNumber( next_coarser_level );
+
+            hier::NeighborhoodSet crs_to_dst_edges;
+
+            int crs_box_counter = 0;
+            for (hier::MappedBoxSet::const_iterator ni =
+                    tmp_crs_mapped_box_set.begin();
+                 ni != tmp_crs_mapped_box_set.end(); ++ni) {
+
+               crs_to_dst_edges[(*ni).getGlobalId()].insert(
+                  dst_mapped_boxes[dst_box_for_crs_box[crs_box_counter]]);
+               ++crs_box_counter;
+            }
+
+            d_crs_to_dst_connector[nb].initialize(
+               *coarse_mapped_box_level,
+               *(dst_patch_level->getMappedBoxLevel()),
+               hier::IntVector::getZero(dim),
+               crs_to_dst_edges);
+ 
+            createCoarseSchedule(coarse_level, next_coarser_level,
+               nb);
+
+         } else {
+
+            d_local_fill_only[nb] = true;
+
+         }
+         if (d_local_fill_only[nb]) {
+
+            hier::OverlapConnectorAlgorithm oca;
+            const int src_ln = src_patch_level->getLevelNumber();
+            /*
+             * dst_patch_level may not be in the hierarchy but is at
+             * same resolution as src_patch_level.
+             */
+            const int dst_ln = src_ln;
+            const hier::IntVector dst_to_dst_gcw = hierarchy->getRequiredConnectorWidth(
+                  dst_ln,
+                  dst_ln);
+            hierarchy->getRequiredConnectorWidth(dst_ln, dst_ln);
+            dst_patch_level->getMappedBoxLevel()->
+            getPersistentOverlapConnectors().findOrCreateConnector(
+               *dst_patch_level->getMappedBoxLevel(),
+               dst_to_dst_gcw);
+
+            if (!src_patch_level.isNull()) {
+               const hier::IntVector dst_to_src_gcw =
+                  hierarchy->getRequiredConnectorWidth(dst_ln, src_ln);
+               const hier::IntVector src_to_dst_gcw =
+                  hierarchy->getRequiredConnectorWidth(src_ln, dst_ln);
+               dst_patch_level->getMappedBoxLevel()->
+               getPersistentOverlapConnectors().findOrCreateConnector(
+                  *src_patch_level->getMappedBoxLevel(),
+                  dst_to_src_gcw);
+               src_patch_level->getMappedBoxLevel()->
+               getPersistentOverlapConnectors().findOrCreateConnector(
+                  *dst_patch_level->getMappedBoxLevel(),
+                  src_to_dst_gcw);
+            }
+
+            if (next_coarser_level >= 0) {
+               const hier::IntVector dst_to_hiercoarse_width(
+                  hierarchy->getRequiredConnectorWidth(dst_ln, next_coarser_level));
+               const hier::IntVector hiercoarse_to_dst_width(
+                  hierarchy->getRequiredConnectorWidth(next_coarser_level, dst_ln));
+
+               tbox::Pointer<hier::PatchLevel> hiercoarse_level =
+                  hierarchy->getPatchLevel(next_coarser_level);
+               const hier::MappedBoxLevel& hiercoarse_mapped_box_level =
+                  *(hiercoarse_level->getMappedBoxLevel());
+
+               dst_patch_level->getMappedBoxLevel()->
+               getPersistentOverlapConnectors().findOrCreateConnector(
+                  hiercoarse_mapped_box_level,
+                  dst_to_hiercoarse_width);
+
+               hiercoarse_mapped_box_level.getPersistentOverlapConnectors().findOrCreateConnector(
+                  *(dst_patch_level->getMappedBoxLevel()),
+                  hiercoarse_to_dst_width);
+            }
+
+            d_single_block_fill_local[nb] =
+               d_single_block_refine_alg->createSchedule(
+                  d_fill_pattern,
+                  dst_patch_level,
+                  src_patch_level,
+                  next_coarser_level,
+                  hierarchy,
+                  (xfer::RefinePatchStrategy *)strategy,
+                  use_time_refinement,
+                  d_transaction_factory);
+         } else {
+            if (!src_patch_level.isNull()) {
+               d_single_block_fill_local[nb] =
+                  d_single_block_refine_alg->createSchedule(
+                     d_fill_pattern,
+                     dst_patch_level,
+                     src_patch_level,
+                     (xfer::RefinePatchStrategy *)NULL,
+                     use_time_refinement,
+                     d_transaction_factory);
+            } else {
+               d_single_block_fill_local[nb].setNull();
+            }
+         }
+      } else {
+         d_single_block_fill_local[nb].setNull();
+      }
+   }
+
+   createInterblockSchedules(dst_level,
+      src_level,
+      (xfer::RefinePatchStrategy *)strategy,
+      next_coarser_level + 1,
+      use_time_refinement);
+
+   createOverlapsForRefine(dst_level, src_level);
+   createOverlapsForCopy();
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * The destructor implicitly deallocates all of the data associated with  *
+ * the communication schedule.                                            *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+MultiblockRefineSchedule::~MultiblockRefineSchedule()
+{
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Create the xfer::RefineSchedules that will transfer data across block   *
+ * boundaries.                                                            *
+ *                                                                        *
+ * ************************************************************************
+ */
+void MultiblockRefineSchedule::createInterblockSchedules(
+   tbox::Pointer<hier::MultiblockPatchLevel> dst_level,
+   tbox::Pointer<hier::MultiblockPatchLevel> src_level,
+   xfer::RefinePatchStrategy* refine_strategy,
+   int level_number,
+   bool use_time_refinement)
+{
+   const tbox::Dimension& dim(d_multiblock_hierarchy->getDim());
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, *dst_level);
+   if (!src_level.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, *src_level);
+   }
+
+   bool copy_all = d_fill_pattern->doesSourceLevelCommunicateToDestination();
+   bool do_fill_fine_gcw = d_fill_pattern->fillingCoarseFineGhosts();
+
+   bool encon_only = d_fill_pattern->fillingEnhancedConnectivityOnly();
+
+   const hier::IntVector& constant_zero_intvector(hier::IntVector::getZero(dim));
+
+   for (int nb = 0; nb < d_multiblock_hierarchy->getNumberOfBlocks(); nb++) {
+
+      const int ln = level_number;
+
+      tbox::Pointer<hier::PatchHierarchy> hierarchy =
+         d_multiblock_hierarchy->getHierarchy(nb);
+
+      tbox::Pointer<hier::PatchLevel> level =
+         dst_level->getPatchLevelForBlock(nb);
+
+      const tbox::SAMRAI_MPI &mpi(hierarchy->getDomainMappedBoxLevel().getMPI());
+
+      if (!level.isNull()) {
+         int num_neighbors = d_multiblock_hierarchy->getNumberOfNeighbors(nb);
+
+         /*
+          * resize arrays to proper size if needed
+          */
+         d_neighbor_single_block_refine_schedule[nb].resizeArray(num_neighbors);
+
+         d_neighbor_ghost_level[nb].resizeArray(num_neighbors);
+         d_finalize_ghost_level[nb].resizeArray(num_neighbors);
+         d_finalize_ghost_patch_numbers[nb].resizeArray(num_neighbors);
+         d_finalize_ghost_num_src_patches[nb].resizeArray(num_neighbors);
+
+         d_neighbor_copy_only[nb].resizeArray(num_neighbors, true);
+         d_neighbor_multiblock_coarse_level[nb].resizeArray(num_neighbors);
+         d_neighbor_copy_overlaps[nb].resizeArray(num_neighbors);
+         d_neighbor_refine_overlaps[nb].resize(num_neighbors);
+         d_neighbor_crs_to_dst_connector[nb].resizeArray(num_neighbors);
+         d_neighbor_multiblock_coarse_schedule[nb].resizeArray(num_neighbors);
+         d_neighbor_unfilled_boxes[nb].resizeArray(num_neighbors);
+
+         int nc = 0;
+         for (tbox::List<hier::MultiblockPatchHierarchy::Neighbor>::
+              Iterator ni(d_multiblock_hierarchy->getNeighbors(nb));
+              ni; ni++) {
+
+            if (encon_only) { 
+               if (!ni().isSingularity()) {
+                  continue;
+               }
+            }
+
+            int id = ni().getBlockNumber();
+            hier::IntVector shift(ni().getShift());
+
+            hier::IntVector ghost_width(d_data_fill_gcw);
+
+            hier::BoxList dst_ghost_boxes(level->getBoxes());
+            dst_ghost_boxes.grow(ghost_width);
+            dst_ghost_boxes.removeIntersections(hier::BoxList(level->getBoxes()));
+
+            /*
+             * get intersection with translated neighbor_boxes and
+             * dst_ghost_boxes
+             */
+            hier::BoxArray trans_neighbor_boxes(dim);
+            d_multiblock_hierarchy->getTranslatedBlock(trans_neighbor_boxes,
+               nb,
+               id);
+            trans_neighbor_boxes.refine(level->getRatioToLevelZero());
+
+            hier::BoxList trans_neighbor_list(trans_neighbor_boxes);
+            trans_neighbor_list.intersectBoxes(dst_ghost_boxes);
+
+            if (trans_neighbor_list.size() > 0) {
+
+               /*
+                * trans_neighbor_list is a list that contains the boxes for the
+                * temporary dst level.  We need to create an equivalent array
+                * such that each box in the array corresponds to a box on the
+                * destination level, and is mapped to the same processor as the
+                * corresponding box.
+                */
+               hier::BoxArray finalize_box_array(dim, level->getLocalNumberOfPatches());
+               tbox::Array<int> finalize_map_array(level->getLocalNumberOfPatches());
+               d_finalize_ghost_patch_numbers[nb][nc].resizeArray(
+                  level->getLocalNumberOfPatches());
+               d_finalize_ghost_num_src_patches[nb][nc].resizeArray(
+                  level->getLocalNumberOfPatches());
+               int num_finalize_boxes = 0;
+
+               hier::MappedBoxSet finalize_mapped_box_set;
+
+               hier::BoxArray neighbor_boxes(dim, 0);
+
+               if (finalize_box_array.size()) {
+                  if (!src_level.isNull()) {
+                     tbox::Pointer<hier::PatchLevel> neighbor_src_level =
+                        src_level->getPatchLevelForBlock(id);
+
+                     if (!neighbor_src_level.isNull()) {
+
+                        neighbor_boxes = neighbor_src_level->getBoxes();
+
+                        d_multiblock_hierarchy->translateBoxArray(
+                           neighbor_boxes,
+                           neighbor_src_level->getRatioToLevelZero(),
+                           nb, id);
+                     }
+                  }
+
+                  int pc = 0;
+                  for (hier::PatchLevel::Iterator p(level); p; p++) {
+                     tbox::Pointer<hier::Patch> patch = *p;
+                     if (patch->getPatchGeometry()->getTouchesRegularBoundary()) {
+                        hier::Box dst_grow_box(patch->getBox());
+                        dst_grow_box.grow(ghost_width);
+
+                        hier::BoxList tmp_list(trans_neighbor_list);
+                        tmp_list.intersectBoxes(dst_grow_box);
+
+                        if (tmp_list.size() > 0) {
+                           if (ln == MULTIBLOCK_FAKE_LEVEL_NUMBER) {
+                              if (neighbor_boxes.size()) {
+                                 tmp_list.intersectBoxes(hier::BoxList(neighbor_boxes));
+                              }
+                           } else {
+                              if (!copy_all && neighbor_boxes.size()) {
+                                 tmp_list.removeIntersections(hier::BoxList(neighbor_boxes));
+                              }
+                           }
+                        }
+
+                        if (tmp_list.size() > 0) {
+
+                           tmp_list.coalesceBoxes();
+
+                           if (tmp_list.size() > 1) {
+                              hier::Box bound_box(tmp_list.getBoundingBox());
+                              hier::BoxList bound_list;
+                              bound_list.addItem(bound_box);
+                              bound_list.removeIntersections(tmp_list);
+                              if (bound_list.size() == 0) {
+                                 tmp_list.clearItems();
+                                 tmp_list.addItem(bound_box);
+                              }
+                           }
+                           int map_num = mpi.getRank();
+
+                           d_finalize_ghost_patch_numbers[nb][nc][pc] =
+                              num_finalize_boxes;
+                           d_finalize_ghost_num_src_patches[nb][nc][pc] =
+                              tmp_list.size();
+                           for (hier::BoxList::Iterator bli(tmp_list);
+                                bli; bli++) {
+                              if (num_finalize_boxes ==
+                                  finalize_box_array.getNumberOfBoxes()) {
+
+                                 finalize_box_array.resizeBoxArray(
+                                    2 * num_finalize_boxes);
+                                 finalize_map_array.resizeArray(
+                                    2 * num_finalize_boxes);
+                              }
+                              finalize_box_array[num_finalize_boxes] = bli();
+                              finalize_map_array[num_finalize_boxes] = map_num;
+
+                              hier::MappedBox finalize_mapped_box(bli(),
+                                                                  hier::LocalId(num_finalize_boxes),
+                                                                  map_num);
+
+                              finalize_mapped_box_set.insert(
+                                 finalize_mapped_box_set.end(),
+                                 finalize_mapped_box);
+
+                              num_finalize_boxes++;
+                           }
+                        } else {
+                           d_finalize_ghost_patch_numbers[nb][nc][pc] = -1;
+                           d_finalize_ghost_num_src_patches[nb][nc][pc] = 0;
+                        }
+                     } else {
+                        d_finalize_ghost_patch_numbers[nb][nc][pc] = -1;
+                        d_finalize_ghost_num_src_patches[nb][nc][pc] = 0;
+                     }
+                     pc++;
+                  }
+
+                  finalize_box_array.resizeBoxArray(num_finalize_boxes);
+                  finalize_map_array.resizeArray(num_finalize_boxes);
+               }
+ 
+               int global_finalize_boxes = num_finalize_boxes;
+               if (mpi.getSize() > 1) {
+                  mpi.Allreduce(&num_finalize_boxes, &global_finalize_boxes, 1, MPI_INT, MPI_SUM);
+               }
+
+               if (global_finalize_boxes) {
+
+                  const int rank = mpi.getRank();
+
+                  tbox::ConstPointer<hier::MappedBoxLevel>
+                  finalize_mapped_box_level =
+                     new hier::MappedBoxLevel(finalize_mapped_box_set,
+                        level->getRatioToLevelZero());
+
+                  d_finalize_ghost_level[nb][nc] =
+                     new hier::PatchLevel(*finalize_mapped_box_level,
+                        hierarchy->getGridGeometry(),
+                        hierarchy->getPatchDescriptor());
+                  d_finalize_ghost_level[nb][nc]->setLevelNumber(
+                                                     level->getLevelNumber() );
+
+                  /*
+                   * From here take the finalize_box_array and translate each box
+                   * to the neighbor's index space.  Create a level with the same
+                   * mapping.  Then create only one refine schedule to copy from
+                   * the neighbor source level to the neighbor temp level.
+                   */
+                  hier::BoxArray neighbor_ghost_array(finalize_box_array);
+
+                  d_multiblock_hierarchy->translateBoxArray(
+                     neighbor_ghost_array, level->getRatioToLevelZero(),
+                     ni().getBlockNumber(),
+                     nb);
+
+                  tbox::Pointer<hier::PatchHierarchy> neighbor_hierarchy =
+                     d_multiblock_hierarchy->getHierarchy(ni().getBlockNumber());
+
+                  hier::MappedBoxSet neighbor_mapped_box_set;
+                  hier::LocalId neighbor_index(0);
+                  for (int nf = 0; nf < num_finalize_boxes; nf++) {
+                     if (finalize_map_array[nf] == rank) {
+
+                        hier::MappedBox local_mapped_box(neighbor_ghost_array[nf],
+                                                         neighbor_index++,
+                                                         rank);
+
+                        neighbor_mapped_box_set.insert(neighbor_mapped_box_set.end(),
+                           local_mapped_box);
+
+                     }
+                  }
+
+                  tbox::ConstPointer<hier::MappedBoxLevel>
+                  neighbor_mapped_box_level =
+                     new hier::MappedBoxLevel(neighbor_mapped_box_set,
+                        level->getRatioToLevelZero());
+
+                  d_neighbor_ghost_level[nb][nc] =
+                     new hier::PatchLevel(*neighbor_mapped_box_level,
+                        neighbor_hierarchy->
+                        getGridGeometry(),
+                        neighbor_hierarchy->
+                        getPatchDescriptor());
+                  d_neighbor_ghost_level[nb][nc]->setLevelNumber(
+                                                     level->getLevelNumber() );
+
+                  tbox::Pointer<PatchLevelFullFillPattern> fill_pattern(
+                     new PatchLevelFullFillPattern());
+
+                  if (ln != MULTIBLOCK_FAKE_LEVEL_NUMBER) {
+
+                     tbox::Pointer<hier::PatchLevel> neighbor_level;
+
+                     if (neighbor_hierarchy->getNumberOfLevels() > ln) {
+                        neighbor_level = neighbor_hierarchy->getPatchLevel(ln);
+                     } else {
+                        neighbor_level.setNull();
+                     }
+
+                     bool need_other_source_blocks = true;
+
+                     if (!neighbor_level.isNull()) {
+                        hier::BoxList dst_boxes(
+                           d_neighbor_ghost_level[nb][nc]->getBoxes());
+                        hier::BoxList src_boxes(neighbor_level->getBoxes());
+
+                        hier::BoxList domain_outside_block;
+                        d_multiblock_hierarchy->getDomainOutsideBlock(
+                           domain_outside_block,
+                           ni().getBlockNumber());
+                        domain_outside_block.refine(
+                           d_neighbor_ghost_level[nb][nc]->getRatioToLevelZero());
+
+                        need_other_source_blocks =
+                           needOtherSourceBlocks(dst_boxes,
+                              src_boxes,
+                              domain_outside_block);
+                     }
+
+                     if (need_other_source_blocks) {
+
+                        tbox::Pointer<hier::PatchLevel> neighbor_dst_level =
+                           d_neighbor_ghost_level[nb][nc];
+
+                        d_neighbor_copy_only[nb][nc] = false;
+
+                        d_neighbor_unfilled_boxes[nb][nc] = hier::BoxList(
+                              neighbor_dst_level->getBoxes());
+                        if (!neighbor_level.isNull()) {
+                           d_neighbor_unfilled_boxes[nb][nc].removeIntersections(
+                              hier::BoxList(neighbor_level->getBoxes()));
+                        }
+
+                        if ((copy_all ||
+                            d_neighbor_unfilled_boxes[nb][nc].size()) &&
+                            do_fill_fine_gcw) {
+
+                           d_neighbor_unfilled_boxes[nb][nc].coalesceBoxes();
+
+                           const hier::MappedBoxSet& nbor_dst_mapped_boxes =
+                              neighbor_dst_level->getMappedBoxLevel()->
+                                 getMappedBoxes();
+
+                           tbox::List<hier::MappedBox> dst_mapped_box_list;
+                           hier::BoxList needed_src_boxes;
+                           hier::BoxList tmp_src_boxes;
+                           for (hier::MappedBoxSet::const_iterator dn =
+                                   nbor_dst_mapped_boxes.begin();
+                                dn != nbor_dst_mapped_boxes.end(); ++dn) {
+
+                              needed_src_boxes.appendItem((*dn).getBox());
+                              needed_src_boxes.intersectBoxes(
+                                 d_neighbor_unfilled_boxes[nb][nc]);
+
+                              if (needed_src_boxes.size()) {
+                                 for (hier::BoxList::Iterator ns(needed_src_boxes);
+                                      ns; ns++) {
+
+                                    tmp_src_boxes.appendItem(ns());
+                                    dst_mapped_box_list.appendItem(*dn); 
+                                 }
+                              }
+                           }
+
+                           hier::IntVector coarse_ratio =
+                              level->getRatioToCoarserLevel();
+                           if (coarse_ratio == constant_zero_intvector) {
+                              tbox::Pointer<hier::MultiblockPatchLevel>
+                              example_level = d_multiblock_hierarchy->getPatchLevel(
+                                    ln - 1);
+                              coarse_ratio =
+                                 neighbor_dst_level->getRatioToLevelZero()
+                                 / example_level->getRatioToLevelZero();
+                           }
+                           tmp_src_boxes.coarsen(coarse_ratio);
+
+                           hier::MappedBoxSet neighbor_coarse_mapped_box_set;
+                           hier::LocalId neighbor_coarse_index(0);
+                           hier::NeighborhoodSet crs_to_dst_edges;
+
+                           tbox::List<hier::MappedBox>::Iterator
+                              db(dst_mapped_box_list);
+                           for (hier::BoxList::Iterator ts(tmp_src_boxes);
+                                ts; ts++) {
+
+                              hier::MappedBox local_mapped_box(
+                                 ts(),
+                                 neighbor_coarse_index++,
+                                 rank);
+
+                              neighbor_coarse_mapped_box_set.insert(
+                                 neighbor_coarse_mapped_box_set.end(),
+                                 local_mapped_box);
+
+                              crs_to_dst_edges[local_mapped_box.getGlobalId()].
+                                 insert(db());
+                              db++;
+                           }
+
+                           tbox::ConstPointer<hier::MappedBoxLevel>
+                           neighbor_coarse_mapped_box_level =
+                              new hier::MappedBoxLevel(
+                                 neighbor_coarse_mapped_box_set,
+                                 d_multiblock_hierarchy->
+                                 getPatchLevel(ln - 1)->getRatioToLevelZero());
+
+                           tbox::Pointer<hier::PatchLevel>
+                           neighbor_coarse_level(
+                              new hier::PatchLevel(
+                                 *neighbor_coarse_mapped_box_level,
+                                 neighbor_dst_level->getGridGeometry(),
+                                 neighbor_dst_level->getPatchDescriptor(),
+                                 neighbor_dst_level->getPatchFactory()));
+                           neighbor_coarse_level->setLevelNumber(ln - 1);
+
+                           d_neighbor_crs_to_dst_connector[nb][nc].initialize(
+                              *neighbor_coarse_mapped_box_level,
+                              *(neighbor_dst_level->getMappedBoxLevel()),
+                              hier::IntVector::getZero(dim),
+                              crs_to_dst_edges);
+
+
+                           createNeighborCoarseSchedule(
+                              neighbor_coarse_level, ln - 1,
+                              level->getRatioToCoarserLevel(),
+                              hierarchy, ni().getBlockNumber(), nb, nc);
+
+                        }
+
+                     } else {
+
+                        d_neighbor_copy_only[nb][nc] = true;
+
+                     }
+
+                     if (d_neighbor_copy_only[nb][nc]) {
+
+                        const hier::IntVector neighbor_connector_width(
+                           neighbor_hierarchy->getRequiredConnectorWidth(ln,
+                              ln));
+
+                        d_neighbor_ghost_level[nb][nc]->getMappedBoxLevel()->
+                        getPersistentOverlapConnectors().createConnector(
+                           *(neighbor_level->getMappedBoxLevel()),
+                           neighbor_connector_width);
+
+                        neighbor_level->getMappedBoxLevel()->
+                        getPersistentOverlapConnectors().createConnector(
+                           *(d_neighbor_ghost_level[nb][nc]->getMappedBoxLevel()),
+                           neighbor_connector_width);
+
+                        if (ln > 0) {
+                           const hier::IntVector dst_to_hiercoarse_width(
+                              neighbor_hierarchy->getRequiredConnectorWidth(
+                                 ln,
+                                 ln - 1));
+                           const hier::IntVector hiercoarse_to_dst_width(
+                              neighbor_hierarchy->getRequiredConnectorWidth(
+                                 ln - 1,
+                                 ln));
+
+                           tbox::Pointer<hier::PatchLevel> hiercoarse_level =
+                              neighbor_hierarchy->getPatchLevel(ln - 1);
+                           const hier::MappedBoxLevel& hiercoarse_mapped_box_level =
+                              *(hiercoarse_level->getMappedBoxLevel());
+
+                           d_neighbor_ghost_level[nb][nc]->getMappedBoxLevel()->
+                           getPersistentOverlapConnectors().findOrCreateConnector(
+                              hiercoarse_mapped_box_level,
+                              dst_to_hiercoarse_width);
+
+                           hiercoarse_mapped_box_level.getPersistentOverlapConnectors().
+                           findOrCreateConnector(
+                              *(d_neighbor_ghost_level[nb][nc]->getMappedBoxLevel()),
+                              hiercoarse_to_dst_width);
+                        }
+
+                        if ((copy_all ||
+                            d_neighbor_unfilled_boxes[nb][nc].size())
+                            && do_fill_fine_gcw) {
+                           d_neighbor_single_block_refine_schedule[nb][nc] =
+                              d_single_block_refine_alg->createSchedule(
+                                 fill_pattern,
+                                 d_neighbor_ghost_level[nb][nc],
+                                 neighbor_level,
+                                 ln - 1,
+                                 neighbor_hierarchy,
+                                 refine_strategy,
+                                 use_time_refinement,
+                                 d_transaction_factory);
+                        }
+                     } else {
+                        if (!neighbor_level.isNull()) {
+                           if ((copy_all ||
+                               d_neighbor_unfilled_boxes[nb][nc].size())
+                               && do_fill_fine_gcw) {
+                              const hier::IntVector neighbor_connector_width(
+                                 neighbor_hierarchy->getRequiredConnectorWidth(
+                                    ln,
+                                    ln));
+
+                              d_neighbor_ghost_level[nb][nc]->getMappedBoxLevel()->
+                              getPersistentOverlapConnectors().createConnector(
+                                 *(neighbor_level->getMappedBoxLevel()),
+                                 neighbor_connector_width);
+
+                              neighbor_level->getMappedBoxLevel()->
+                              getPersistentOverlapConnectors().createConnector(
+                                 *(d_neighbor_ghost_level[nb][nc]->getMappedBoxLevel()),
+                                 neighbor_connector_width);
+
+                              d_neighbor_single_block_refine_schedule[nb][nc] =
+                                 d_single_block_refine_alg->createSchedule(
+                                    fill_pattern,
+                                    d_neighbor_ghost_level[nb][nc],
+                                    neighbor_level,
+                                    NULL,
+                                    use_time_refinement,
+                                    d_transaction_factory);
+                           }
+                        } else {
+                           d_neighbor_single_block_refine_schedule[nb][nc].
+                           setNull();
+                        }
+                     }
+                  } else {
+
+                     if (!src_level.isNull()) {
+                        tbox::Pointer<hier::PatchLevel> neighbor_level =
+                           src_level->getPatchLevelForBlock(ni().getBlockNumber());
+
+                        if (!neighbor_level.isNull()) {
+                           if ((copy_all ||
+                               d_neighbor_unfilled_boxes[nb][nc].size())
+                               && do_fill_fine_gcw) {
+
+                              const int neighbor_ln =
+                                 neighbor_level->getLevelNumber();
+                              const hier::IntVector neighbor_connector_width(
+                                 neighbor_hierarchy->getRequiredConnectorWidth(
+                                    neighbor_ln,
+                                    neighbor_ln));
+
+                              d_neighbor_ghost_level[nb][nc]->getMappedBoxLevel()->
+                              getPersistentOverlapConnectors().createConnector(
+                                 *(d_neighbor_ghost_level[nb][nc]->getMappedBoxLevel()),
+                                 neighbor_connector_width);
+
+                              d_neighbor_ghost_level[nb][nc]->getMappedBoxLevel()->
+                              getPersistentOverlapConnectors().createConnector(
+                                 *(neighbor_level->getMappedBoxLevel()),
+                                 neighbor_connector_width);
+
+                              neighbor_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+                              createConnector(
+                                 *(d_neighbor_ghost_level[nb][nc]->getMappedBoxLevel()),
+                                 neighbor_connector_width);
+
+                              d_neighbor_single_block_refine_schedule[nb][nc] =
+                                 d_single_block_refine_alg->createSchedule(
+                                    fill_pattern,
+                                    d_neighbor_ghost_level[nb][nc],
+                                    neighbor_level,
+                                    refine_strategy,
+                                    use_time_refinement,
+                                    d_transaction_factory);
+                           }
+                        }
+                     } else {
+                        d_neighbor_single_block_refine_schedule[nb][nc].setNull();
+                     }
+                  }
+               } else {
+                  d_neighbor_single_block_refine_schedule[nb][nc].setNull();
+               }
+            }
+
+            nc++;
+         }
+      }
+   }
+}
+
+/*
+ * ************************************************************************
+ *
+ * Create the BoxOverlaps that will be used in refineScratchData.         *
+ *                                                                        *
+ * ************************************************************************
+ */
+void MultiblockRefineSchedule::createOverlapsForRefine(
+   tbox::Pointer<hier::MultiblockPatchLevel> dst_level,
+   tbox::Pointer<hier::MultiblockPatchLevel> src_level)
+{
+   NULL_USE(src_level); 
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*d_multiblock_hierarchy, *dst_level);
+
+   bool fill_fine_gcw = d_fill_pattern->fillingCoarseFineGhosts();
+
+   for (int nb = 0; nb < d_multiblock_hierarchy->getNumberOfBlocks(); nb++) {
+
+      tbox::Pointer<hier::PatchLevel> dst_patch_level =
+         dst_level->getPatchLevelForBlock(nb);
+
+      if (!dst_patch_level.isNull() &&
+          !d_multiblock_coarse_scratch_level[nb].isNull()) {
+
+         const bool filling_neighbor = false;
+         createRefineOverlaps(d_local_refine_overlaps[nb],
+            d_multiblock_coarse_scratch_level[nb],
+            dst_patch_level,
+            d_crs_to_dst_connector[nb],
+            d_unfilled_boxes[nb],
+            nb,
+            fill_fine_gcw,
+            filling_neighbor);
+
+      }
+
+   }
+
+   for (int nb = 0; nb < d_multiblock_hierarchy->getNumberOfBlocks(); nb++) {
+
+      tbox::Pointer<hier::PatchLevel> dst_patch_level =
+         d_multiblock_dst_level->getPatchLevelForBlock(nb);
+
+      if (!dst_patch_level.isNull()) {
+
+         int nc = 0;
+         for (tbox::List<hier::MultiblockPatchHierarchy::Neighbor>::
+              Iterator ni(d_multiblock_hierarchy->getNeighbors(nb));
+              ni; ni++) {
+            int id = ni().getBlockNumber();
+
+            if (!d_neighbor_multiblock_coarse_level[nb][nc].isNull()) {
+
+               const bool fill_gcw = false;
+               const bool filling_neighbor = true;
+               createRefineOverlaps(d_neighbor_refine_overlaps[nb][nc],
+                  d_neighbor_multiblock_coarse_level[nb][nc],
+                  d_neighbor_ghost_level[nb][nc],
+                  d_neighbor_crs_to_dst_connector[nb][nc],
+                  d_neighbor_unfilled_boxes[nb][nc],
+                  id,
+                  fill_gcw,
+                  filling_neighbor);
+            }
+            nc++;
+         }
+      }
+   }
+}
+
+/*
+ * ************************************************************************
+ *
+ * Create the BoxOverlaps that will be used in fillData.                  *
+ *                                                                        *
+ * ************************************************************************
+ */
+void MultiblockRefineSchedule::createOverlapsForCopy()
+{
+
+   bool encon_only = d_fill_pattern->fillingEnhancedConnectivityOnly();
+   bool copy_all = d_fill_pattern->doesSourceLevelCommunicateToDestination();
+
+   for (int nb = 0; nb < d_multiblock_hierarchy->getNumberOfBlocks(); nb++) {
+
+      tbox::Pointer<hier::PatchLevel> dst_patch_level =
+         d_multiblock_dst_level->getPatchLevelForBlock(nb);
+
+      if (!dst_patch_level.isNull()) {
+
+         int nc = 0;
+         for (tbox::List<hier::MultiblockPatchHierarchy::Neighbor>::
+              Iterator ni(d_multiblock_hierarchy->getNeighbors(nb));
+              ni; ni++) {
+
+            if (!(d_neighbor_single_block_refine_schedule[nb][nc].isNull())
+                ||
+                !(d_neighbor_multiblock_coarse_schedule[nb][nc].isNull())) {
+
+               const tbox::Pointer<xfer::RefineClasses>
+               equiv_classes =
+                  d_single_block_refine_alg->getEquivalenceClasses();
+
+               TBOX_ASSERT(d_neighbor_copy_overlaps[nb][nc].size() == 0);
+               createCopyOverlaps(d_neighbor_copy_overlaps[nb][nc],
+                                  dst_patch_level,
+                                  ni(),
+                                  nb,
+                                  nc,
+                                  equiv_classes); 
+
+            }
+            nc++;
+         }
+      }
+   }
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Create and store overlaps that will be used in refineScratchData.      *
+ *                                                                        *
+ * ************************************************************************
+ */
+void MultiblockRefineSchedule::createCopyOverlaps(
+   tbox::List<tbox::Pointer<hier::BoxOverlap> >& overlaps,
+   const tbox::Pointer<hier::PatchLevel>& dst_patch_level,
+   const hier::MultiblockPatchHierarchy::Neighbor& neighbor,
+   const int block_number,
+   const int neighbor_counter,
+   const tbox::Pointer<xfer::RefineClasses>& equiv_classes)
+{
+   const tbox::Dimension& dim(dst_patch_level->getDim());
+   const int nb = block_number;
+   const int nc = neighbor_counter;
+   const int num_classes = equiv_classes->getNumberOfEquivalenceClasses();
+
+   bool copy_all = d_fill_pattern->doesSourceLevelCommunicateToDestination(); 
+   bool filling_interior_only = !d_fill_pattern->fillingCoarseFineGhosts();
+
+   hier::BoxArray unfilled_boxes(dim);
+   if (!copy_all) {
+      unfilled_boxes = d_neighbor_unfilled_boxes[nb][nc];
+      for (int ub = 0; ub < unfilled_boxes.size(); ub++) {
+         unfilled_boxes[ub].rotate(neighbor.getRotationIdentifier());
+         unfilled_boxes[ub].shift(neighbor.getShift() *
+                                  dst_patch_level->getRatioToLevelZero());
+      }
+   }
+
+   int num_overs_per_patch = copy_all ? 1 : unfilled_boxes.size();
+
+   if (num_overs_per_patch && !filling_interior_only) {
+      int pc = 0;
+      for (hier::PatchLevel::Iterator p(dst_patch_level); p; p++) {
+         if (d_finalize_ghost_patch_numbers[nb][nc][pc] >= 0) {
+            tbox::Pointer<hier::Patch> dst_patch = *p;
+
+            hier::Box restrict_box(dim);
+            if (copy_all) {
+               if (filling_interior_only) {
+                  restrict_box = dst_patch->getBox();
+               } else {
+                  restrict_box = hier::Box::grow(
+                        dst_patch->getBox(),
+                        d_data_fill_gcw);
+               }
+            }
+
+            const int num_src_patches =
+               d_finalize_ghost_num_src_patches[nb][nc][pc];
+            for (int ns = 0; ns < num_src_patches; ns++) {
+               tbox::Pointer<hier::Patch> src_patch =
+                  d_finalize_ghost_level[nb][nc]->getPatch(
+                     hier::LocalId(d_finalize_ghost_patch_numbers[nb][nc][pc]
+                                   + ns));
+
+               for (int nop = 0; nop < num_overs_per_patch; nop++) {
+                  if (!copy_all) {
+                     restrict_box = unfilled_boxes[nop];
+                  }
+
+                  if (!restrict_box.isEmpty()) {
+                     if (!neighbor.isSingularity()) {
+                        for (int ne = 0; ne < num_classes; ne++) {
+
+                           const RefineClasses::Data& rep_item =
+                              equiv_classes->getClassRepresentative(ne);
+
+                           tbox::Pointer<hier::BoxOverlap> box_overlap =
+                              calculateOverlap(*dst_patch,
+                                 *src_patch,
+                                 rep_item,
+                                 restrict_box);
+
+                           overlaps.appendItem(box_overlap);
+                        }
+                     } else {
+
+                        for (int ne = 0; ne < num_classes; ne++) {
+
+                           const RefineClasses::Data& rep_item =
+                              equiv_classes->getClassRepresentative(ne);
+
+                           tbox::Pointer<hier::BoxOverlap> box_overlap =
+                              calculateSingularityPatchOverlap(*src_patch,
+                                 rep_item,
+                                 restrict_box);
+
+                           overlaps.appendItem(box_overlap);
+
+                        }
+                     }
+                  }
+               }
+            }
+         }
+         pc++;
+      }
+   }
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Execute the communication schedules that copy data into the            *
+ * destination component of the destination level.                        *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void MultiblockRefineSchedule::fillData(
+   double fill_time,
+   bool do_physical_boundary_fill) const
+{
+   fillData(fill_time,
+      do_physical_boundary_fill,
+      false,
+      false);
+}
+
+void MultiblockRefineSchedule::fillData(
+   double fill_time,
+   bool do_physical_boundary_fill,
+   bool filling_coarse_scratch,
+   bool filling_crse_scr_recursive) const
+{
+   const tbox::Dimension& dim(d_multiblock_hierarchy->getDim());
+
+   int dst_ln = d_multiblock_dst_level->getLevelNumber();
+
+   bool is_scr_recursive = false;
+   tbox::Array<hier::ComponentSelector> fill_crse_scr_selector(0);
+
+   if (filling_coarse_scratch) {
+      if (d_multiblock_strategy != NULL) {
+         d_multiblock_strategy->setFillingCoarseScratch(true);
+         is_scr_recursive = true;
+      }
+      fill_crse_scr_selector.resizeArray(
+         d_multiblock_hierarchy->getNumberOfBlocks());
+   }
+
+   tbox::Array<hier::ComponentSelector>
+   allocate_scr_vector(d_multiblock_hierarchy->getNumberOfBlocks());
+
+   int nb;
+
+   if (!filling_coarse_scratch) {
+      for (nb = 0; nb < d_multiblock_hierarchy->getNumberOfBlocks(); nb++) {
+         tbox::Pointer<hier::PatchLevel> dst_patch_level =
+            d_multiblock_dst_level->getPatchLevelForBlock(nb);
+
+         if (!dst_patch_level.isNull()) {
+            allocateScratchSpace(
+               allocate_scr_vector[nb],
+               dst_patch_level,
+               fill_time);
+         }
+      }
+   }
+
+   bool copy_all = d_fill_pattern->doesSourceLevelCommunicateToDestination();
+
+   for (nb = 0; nb < d_multiblock_hierarchy->getNumberOfBlocks(); nb++) {
+
+      if (d_local_fill_only[nb]) {
+         if (!d_single_block_fill_local[nb].isNull()) {
+            if (filling_coarse_scratch) {
+               d_single_block_fill_local[nb]->allocateDestinationSpace(
+                  *d_coarse_selector[nb], fill_time);
+            }
+            if (d_multiblock_strategy != NULL) {
+               d_multiblock_strategy->setBlockNumber(nb);
+            }
+            d_single_block_fill_local[nb]->fillData(fill_time, false);
+            if (d_multiblock_strategy != NULL) {
+               d_multiblock_strategy->clearBlockNumber();
+            }
+         }
+      } else {
+         if (d_multiblock_strategy != NULL) {
+            d_multiblock_strategy->setBlockNumber(nb);
+         }
+         d_multiblock_coarse_schedule[nb]->fillData(fill_time,
+            true,
+            true,
+            is_scr_recursive);
+         if (d_multiblock_strategy != NULL) {
+            d_multiblock_strategy->clearBlockNumber();
+         }
+         tbox::Pointer<hier::PatchLevel> dst_patch_level =
+            d_multiblock_dst_level->getPatchLevelForBlock(nb);
+
+         if (filling_coarse_scratch) {
+            if (!dst_patch_level.isNull()) {
+               d_multiblock_coarse_schedule[nb]->allocateScratchSpace(
+                  *d_coarse_selector[nb],
+                  dst_patch_level,
+                  fill_time);
+            }
+         }
+
+         if (!d_single_block_fill_local[nb].isNull()) {
+            if (d_multiblock_strategy != NULL) {
+               d_multiblock_strategy->setBlockNumber(nb);
+            }
+            d_single_block_fill_local[nb]->fillData(fill_time, false);
+            if (d_multiblock_strategy != NULL) {
+               d_multiblock_strategy->clearBlockNumber();
+            }
+         }
+
+         if (!dst_patch_level.isNull()) {
+
+            if (d_multiblock_strategy != NULL) {
+               d_multiblock_strategy->setBlockNumber(nb);
+            }
+
+            bool fill_fine_gcw = d_fill_pattern->fillingCoarseFineGhosts();
+            refineScratchData(d_multiblock_coarse_scratch_level[nb],
+               dst_patch_level,
+               d_local_refine_overlaps[nb],
+               d_crs_to_dst_connector[nb],
+               d_unfilled_boxes[nb],
+               nb,
+               fill_fine_gcw,
+               false);
+
+            copyScratchToDestination(dst_patch_level,
+               d_unfilled_boxes[nb],
+               d_single_block_refine_alg->getEquivalenceClasses());
+
+            if (d_multiblock_strategy != NULL) {
+               d_multiblock_strategy->clearBlockNumber();
+            }
+         }
+
+         tbox::Pointer<hier::ComponentSelector> crs_scr_vector =
+            d_multiblock_coarse_schedule[nb]->d_coarse_selector[nb];
+         d_multiblock_coarse_scratch_level[nb]->
+         deallocatePatchData(*crs_scr_vector);
+      }
+   }
+
+   if (d_multiblock_strategy != NULL) {
+      for (nb = 0; nb < d_multiblock_hierarchy->getNumberOfBlocks(); nb++) {
+
+         tbox::Pointer<hier::PatchLevel> level =
+            d_multiblock_dst_level->getPatchLevelForBlock(nb);
+
+         d_multiblock_strategy->setBlockNumber(nb);
+
+         if (!level.isNull()) {
+            tbox::Array<tbox::List<tbox::Pointer<hier::Patch> > >
+            singularity_patches(level->getNumberOfPatches());
+
+            bool singularity_to_fill = false;
+            if (d_multiblock_hierarchy->reducedConnectivityExists(nb)) {
+               singularity_to_fill = true;
+            }
+
+            tbox::Array<hier::ComponentSelector>
+            local_selector(level->getNumberOfPatches());
+
+            int nc = 0;
+            for (tbox::List<hier::MultiblockPatchHierarchy::Neighbor>::
+                 Iterator ni(d_multiblock_hierarchy->getNeighbors(nb));
+                 ni; ni++) {
+               int id = ni().getBlockNumber();
+
+               bool do_neighbor_copy = 
+                  copy_all || d_neighbor_unfilled_boxes[nb][nc].size() > 0;
+      
+               hier::ComponentSelector dst_vector;
+               if (!(d_neighbor_single_block_refine_schedule[nb][nc].isNull())
+                   ||
+                   !(d_neighbor_multiblock_coarse_schedule[nb][nc].isNull())) {
+
+                  if (!d_neighbor_single_block_refine_schedule[nb][nc].isNull()) {
+                     d_neighbor_single_block_refine_schedule[nb][nc]->
+                     allocateDestinationSpace(dst_vector, fill_time);
+                  } else {
+                     if (!d_single_block_fill_local[nb].isNull()) {
+                        d_single_block_fill_local[nb]->
+                        initializeDestinationVector(dst_vector);
+                     } else {
+                        initializeDestinationVector(dst_vector);
+                     }
+
+                     const int ncomponents = d_neighbor_ghost_level[nb][nc]->
+                        getPatchDescriptor()->
+                        getMaxNumberRegisteredComponents();
+
+                     for (int di = 0; di < ncomponents; di++) {
+                        if (dst_vector.isSet(di)) {
+                           if (d_neighbor_ghost_level[nb][nc]->
+                               checkAllocated(di)) {
+                              dst_vector.clrFlag(di);
+                           }
+                        }
+                     }
+
+                     d_neighbor_ghost_level[nb][nc]->allocatePatchData(
+                        dst_vector, fill_time);
+
+                  }
+
+                  bool do_fill_fine_gcw = d_fill_pattern->fillingCoarseFineGhosts();
+                  if (d_neighbor_copy_only[nb][nc]) {
+                     if (do_neighbor_copy && do_fill_fine_gcw) {
+                        d_multiblock_strategy->setBlockNumber(nb);
+                        d_neighbor_single_block_refine_schedule[nb][nc]->
+                        fillData(fill_time, false);
+                        d_multiblock_strategy->clearBlockNumber();
+                     }
+                  } else {
+                     if (do_neighbor_copy && do_fill_fine_gcw) {
+                        d_multiblock_strategy->setBlockNumber(nb);
+                        d_neighbor_multiblock_coarse_schedule[nb][nc]->
+                        fillData(fill_time, true, true, is_scr_recursive);
+                        d_multiblock_strategy->clearBlockNumber();
+
+                        if (!d_neighbor_single_block_refine_schedule[nb][nc].
+                            isNull()) {
+                           d_multiblock_strategy->setBlockNumber(nb);
+                           d_neighbor_single_block_refine_schedule[nb][nc]->
+                           fillData(fill_time, false);
+                           d_multiblock_strategy->clearBlockNumber();
+                        }
+
+                        hier::ComponentSelector scr_vector;
+                        d_neighbor_multiblock_coarse_schedule[nb][nc]->
+                        allocateScratchSpace(
+                           scr_vector,
+                           d_neighbor_ghost_level[nb][nc],
+                           fill_time);
+
+                        d_multiblock_strategy->setBlockNumber(nb);
+                        refineScratchData(
+                           d_neighbor_multiblock_coarse_level[nb][nc],
+                           d_neighbor_ghost_level[nb][nc],
+                           d_neighbor_refine_overlaps[nb][nc],
+                           d_neighbor_crs_to_dst_connector[nb][nc],
+                           d_neighbor_unfilled_boxes[nb][nc],
+                           id,
+                           false,
+                           true);
+                        d_multiblock_strategy->clearBlockNumber();
+
+                        copyScratchToDestination(
+                           d_neighbor_ghost_level[nb][nc],
+                           d_neighbor_unfilled_boxes[nb][nc],
+                           d_single_block_refine_alg->getEquivalenceClasses());
+
+                        d_neighbor_ghost_level[nb][nc]->
+                        deallocatePatchData(scr_vector);
+                     }
+
+                     tbox::Pointer<hier::ComponentSelector> crs_scr_vector =
+                        d_neighbor_multiblock_coarse_schedule[nb][nc]->
+                        d_coarse_selector[id];
+                     d_neighbor_multiblock_coarse_level[nb][nc]->
+                     deallocatePatchData(*crs_scr_vector);
+
+                  }
+
+                  /*
+                   * get a src_vector to allocate on the finalize_ghost_level,
+                   * then copy between blocks.
+                   */
+
+                  hier::ComponentSelector src_vector;
+                  if (do_neighbor_copy && do_fill_fine_gcw) {
+                     if (d_neighbor_single_block_refine_schedule[nb][nc].isNull()) {
+                        d_neighbor_multiblock_coarse_schedule[nb][nc]->
+                        initializeSourceVector(
+                           src_vector);
+                     } else {
+                        d_neighbor_single_block_refine_schedule[nb][nc]->
+                        initializeSourceVector(
+                           src_vector);
+                     }
+
+                     d_finalize_ghost_level[nb][nc]->
+                        allocatePatchData(src_vector);
+                  }
+
+                  const tbox::Pointer<xfer::RefineClasses>
+                  equiv_classes =
+                     d_single_block_refine_alg->getEquivalenceClasses();
+                  int num_classes =
+                     equiv_classes->getNumberOfEquivalenceClasses();
+
+                  hier::BoxArray unfilled_boxes(dim);
+
+                  if (level->getLocalNumberOfPatches()) {
+                     if (do_neighbor_copy && do_fill_fine_gcw) {
+                        if (d_using_standard_transaction) {
+                           copyBetweenBlocks(d_finalize_ghost_level[nb][nc],
+                              d_neighbor_ghost_level[nb][nc],
+                              (ni().getShift()) * (level->getRatioToLevelZero()),
+                              ni().getRotationIdentifier(), equiv_classes);
+                        } else {
+                           fillBetweenBlocks(d_finalize_ghost_level[nb][nc],
+                              d_neighbor_ghost_level[nb][nc],
+                              (ni().getShift()) * (level->getRatioToLevelZero()),
+                              ni().getRotationIdentifier(), equiv_classes);
+                        }
+                     }
+
+                     if (!copy_all) {
+                        unfilled_boxes = d_neighbor_unfilled_boxes[nb][nc];
+                        for (int ub = 0; ub < unfilled_boxes.size(); ub++) {
+                           unfilled_boxes[ub].rotate(ni().getRotationIdentifier());
+                           unfilled_boxes[ub].shift(ni().getShift()
+                              * level->getRatioToLevelZero());
+                        }
+                     }
+                  }
+
+                  if (do_neighbor_copy &&
+                      level->getLocalNumberOfPatches() &&
+                      do_fill_fine_gcw &&
+                      d_neighbor_copy_overlaps[nb][nc].size()) {
+
+                     int num_overs_per_patch =
+                        copy_all ? 1 : unfilled_boxes.size();
+
+                     tbox::ListIterator<tbox::Pointer<hier::BoxOverlap> >
+                        overlap_iter(d_neighbor_copy_overlaps[nb][nc]); 
+
+                     int pc = 0;
+                     for (hier::PatchLevel::Iterator p(level); p; p++) { 
+
+                        if (d_finalize_ghost_patch_numbers[nb][nc][pc] >= 0) {
+                           tbox::Pointer<hier::Patch> dst_patch = *p;
+
+                           const int num_src_patches =
+                              d_finalize_ghost_num_src_patches[nb][nc][pc];
+                           for (int ns = 0; ns < num_src_patches; ns++) {
+                              tbox::Pointer<hier::Patch> src_patch =
+                                 d_finalize_ghost_level[nb][nc]->getPatch(
+                                    hier::LocalId(d_finalize_ghost_patch_numbers[nb][nc][pc]
+                                    + ns));
+
+                              for (int nop = 0; nop < num_overs_per_patch; nop++) {
+
+                                 if (copy_all || !unfilled_boxes[nop].empty()) {
+                                    if (!ni().isSingularity()) {
+                                       for (int ne = 0; ne < num_classes; ne++) {
+                                          if (!(overlap_iter())->isOverlapEmpty()) {
+                                             for (tbox::List<int>::Iterator
+                                                  l(equiv_classes->getIterator(ne));
+                                                  l; l++) {
+
+                                                const RefineClasses::Data& item =
+                                                equiv_classes->getRefineItem(l());
+                                                TBOX_ASSERT(item.d_class_id == ne);
+
+                                                const int dst = item.d_dst;
+                                                const int src = item.d_src;
+
+                                                dst_patch->getPatchData(dst)->
+                                                copy(*(src_patch->getPatchData(src)),
+                                                   *(overlap_iter()));
+                                             }
+                                          }
+                                          overlap_iter++;
+                                       }
+                                    } else {
+                                       singularity_to_fill = true;
+                                       tbox::Pointer<hier::Patch> patch(
+                                          new hier::Patch(
+                                             src_patch->getMappedBox(),
+                                             src_patch->getPatchDescriptor()));
+                                       tbox::Pointer<hier::BlockPatchGeometry>
+                                       patch_geom(
+                                          new hier::BlockPatchGeometry(
+                                             hier::IntVector(dim, 1),
+                                             id,
+                                             hier::PatchGeometry::TwoDimBool(dim, 0),
+                                             hier::PatchGeometry::TwoDimBool(dim, 0)));
+                                       patch->setPatchGeometry(patch_geom);
+                                       patch->setPatchLevelNumber(dst_ln);
+
+                                       for (int ne = 0; ne < num_classes; ne++) {
+
+                                          for (tbox::List<int>::Iterator
+                                               l(equiv_classes->getIterator(ne));
+                                               l; l++) {
+
+                                             const RefineClasses::Data& item =
+                                                equiv_classes->getRefineItem(l());
+                                             TBOX_ASSERT(item.d_class_id == ne);
+
+                                             const int dst = item.d_dst;
+                                             const int src = item.d_src;
+
+                                             if (!patch->checkAllocated(dst)) {
+                                                patch->allocatePatchData(dst);
+                                                local_selector[pc].setFlag(dst);
+                                             }
+
+                                             patch->getPatchData(dst)->
+                                             copy(*(src_patch->getPatchData(src)),
+                                                *(overlap_iter()));
+                                          }
+                                          overlap_iter++; 
+                                       }
+   
+                                       singularity_patches[pc].addItem(patch);
+                                    }
+                                 }
+                              }
+                           }
+                        }
+                        pc++;
+                     }
+                  }
+                  if (do_neighbor_copy && do_fill_fine_gcw) {
+                     d_finalize_ghost_level[nb][nc]->
+                     deallocatePatchData(src_vector);
+                  }
+                  d_neighbor_ghost_level[nb][nc]->
+                  deallocatePatchData(dst_vector);
+               }
+               nc++;
+            }
+
+            if (singularity_to_fill) {
+               fillSingularityBoundary(level, singularity_patches,
+                  nb, fill_time);
+            }
+
+            if (do_physical_boundary_fill) {
+               const hier::IntVector gcw = getBoundaryFillGhostWidth();
+               for (hier::PatchLevel::Iterator p(level);
+                    p; p++) {
+                  tbox::Pointer<hier::Patch> patch = *p;
+                  if (patch->getPatchGeometry()->
+                      intersectsPhysicalBoundary()) {
+                     d_multiblock_strategy->setBlockNumber(nb);
+                     d_multiblock_strategy->
+                     setPhysicalBoundaryConditions(*patch,
+                        fill_time,
+                        gcw);
+                     d_multiblock_strategy->clearBlockNumber();
+                  }
+               }
+            }
+
+            for (int j = 0; j < level->getNumberOfPatches(); j++) {
+               for (tbox::List<tbox::Pointer<hier::Patch> >::Iterator
+                    sp(singularity_patches[j]);
+                    sp; sp++) {
+                  sp()->deallocatePatchData(local_selector[j]);
+               }
+            }
+         }
+
+         d_multiblock_strategy->clearBlockNumber();
+      }
+   }
+
+   if (!filling_coarse_scratch) {
+      for (nb = 0; nb < d_multiblock_hierarchy->getNumberOfBlocks(); nb++) {
+
+         tbox::Pointer<hier::PatchLevel> dst_patch_level =
+            d_multiblock_dst_level->getPatchLevelForBlock(nb);
+
+         if (!dst_patch_level.isNull()) {
+            dst_patch_level->deallocatePatchData(allocate_scr_vector[nb]);
+         }
+      }
+   }
+
+   if (filling_coarse_scratch) {
+      if (!filling_crse_scr_recursive) {
+         if (d_multiblock_strategy != NULL) {
+            d_multiblock_strategy->setFillingCoarseScratch(false);
+         }
+      }
+
+   }
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Fill the boundaries of the specified level at areas of singularity.    *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void MultiblockRefineSchedule::fillSingularityBoundary(
+   tbox::Pointer<hier::PatchLevel>& level,
+   tbox::Array<tbox::List<tbox::Pointer<hier::Patch> > >& singularity_patches,
+   const int block_number,
+   const double fill_time) const
+{
+   const tbox::Dimension& dim(d_multiblock_hierarchy->getDim());
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS1(dim, *level);
+
+   hier::IntVector ratio = level->getRatioToLevelZero();
+
+   for (hier::BoxList::Iterator sb(
+           d_multiblock_hierarchy->getSingularityBoxList(block_number));
+        sb;
+        sb++) {
+      hier::Box singularity(sb());
+      if (level->getLevelNumber() != 0) {
+         singularity.refine(ratio);
+      }
+
+      hier::IntVector gcw(
+         level->getPatchDescriptor()->getMaxGhostWidth(dim));
+
+      if (d_multiblock_strategy != NULL) {
+         int pc = 0;
+         for (hier::PatchLevel::Iterator p(level); p; p++) {
+            tbox::Pointer<hier::Patch> patch = *p;
+            tbox::Pointer<hier::PatchGeometry> pgeom =
+               patch->getPatchGeometry();
+
+            tbox::Array<hier::BoundaryBox> nboxes =
+               pgeom->getNodeBoundaries();
+
+            if (nboxes.getSize()) {
+               for (int bb = 0; bb < nboxes.getSize(); bb++) {
+                  hier::Box intersection = (nboxes[bb].getBox())
+                     * singularity;
+                  if (!(intersection.empty())) {
+                     hier::Box fill_box =
+                        pgeom->getBoundaryFillBox(nboxes[bb],
+                           patch->getBox(),
+                           gcw);
+                     d_multiblock_strategy->fillSingularityBoundaryConditions(
+                        *patch, singularity_patches[pc],
+                        fill_time, fill_box, nboxes[bb]);
+                  }
+               }
+            }
+
+            if (dim == tbox::Dimension(3)) {
+               tbox::Array<hier::BoundaryBox> eboxes =
+                  pgeom->getEdgeBoundaries();
+
+               if (eboxes.getSize()) {
+                  for (int bb = 0; bb < eboxes.getSize(); bb++) {
+                     hier::Box intersection =
+                        (eboxes[bb].getBox()) * singularity;
+                     if (!(intersection.empty())) {
+                        hier::Box fill_box =
+                           pgeom->getBoundaryFillBox(eboxes[bb],
+                              patch->getBox(),
+                              gcw);
+                        d_multiblock_strategy->
+                        fillSingularityBoundaryConditions(
+                           *patch, singularity_patches[pc],
+                           fill_time, fill_box, eboxes[bb]);
+                     }
+                  }
+               }
+            }
+            pc++;
+         }
+      }
+   }
+
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Call the routines that will execute a copy from one block to another.  *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void MultiblockRefineSchedule::copyBetweenBlocks(
+   tbox::Pointer<hier::PatchLevel> dst_level,
+   const tbox::Pointer<hier::PatchLevel> src_level,
+   const hier::IntVector& shift,
+   const hier::MultiblockPatchHierarchy::RotationIdentifier rotate,
+   const tbox::Pointer<xfer::RefineClasses> refine_classes) const
+{
+   TBOX_ASSERT(!dst_level.isNull());
+   TBOX_ASSERT(!src_level.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*d_multiblock_hierarchy,
+      *dst_level,
+      *src_level,
+      shift);
+
+   const int num_refine_items =
+      refine_classes->getNumberOfRefineItems();
+
+   for (hier::PatchLevel::Iterator p(src_level); p; p++) {
+      tbox::Pointer<hier::Patch> src_patch = *p;
+      tbox::Pointer<hier::Patch> dst_patch = dst_level->getPatch(src_patch->getGlobalId());
+      for (int nd = 0; nd < num_refine_items; nd++) {
+
+         const RefineClasses::Data& item = refine_classes->getRefineItem(nd);
+         const int src = item.d_dst; //dst for src_level
+         const int dst = item.d_src; //src for dst_level
+
+         hier::MBUtilities::translateAndCopyData(
+            *dst_patch,
+            dst,
+            *src_patch,
+            src,
+            shift,
+            rotate);
+
+      }
+   }
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Call the routines that will fill data from one block to another.       *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void MultiblockRefineSchedule::fillBetweenBlocks(
+   tbox::Pointer<hier::PatchLevel> dst_level,
+   const tbox::Pointer<hier::PatchLevel> src_level,
+   const hier::IntVector& shift,
+   const hier::MultiblockPatchHierarchy::RotationIdentifier rotate,
+   const tbox::Pointer<xfer::RefineClasses> refine_classes) const
+{
+   TBOX_ASSERT(!dst_level.isNull());
+   TBOX_ASSERT(!src_level.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*d_multiblock_hierarchy,
+      *dst_level,
+      *src_level,
+      shift);
+
+   const int num_refine_items =
+      refine_classes->getNumberOfRefineItems();
+
+   for (hier::PatchLevel::Iterator p(src_level); p; p++) {
+      tbox::Pointer<hier::Patch> src_patch = *p;
+      tbox::Pointer<hier::Patch> dst_patch = dst_level->getPatch(src_patch->getGlobalId());
+      for (int nd = 0; nd < num_refine_items; nd++) {
+
+         const RefineClasses::Data& item = refine_classes->getRefineItem(nd);
+         const int src = item.d_dst; //dst for src_level
+         const int dst = item.d_src; //src for dst_level
+
+         hier::MBUtilities::translateAndFillData(
+            *dst_patch,
+            dst,
+            *src_patch,
+            src,
+            shift,
+            rotate);
+      }
+   }
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Initialize a component selector to contain the source data components  *
+ * for this schedule.                                                     *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void MultiblockRefineSchedule::initializeSourceVector(
+   hier::ComponentSelector& allocate_vector) const
+{
+   int nb;
+
+   for (nb = 0; nb < d_multiblock_hierarchy->getNumberOfBlocks(); nb++) {
+
+      if (!d_single_block_fill_local[nb].isNull()) {
+         d_single_block_fill_local[nb]->initializeSourceVector(allocate_vector);
+         return;
+      }
+   }
+
+   for (nb = 0; nb < d_multiblock_hierarchy->getNumberOfBlocks(); nb++) {
+
+      if (!d_multiblock_coarse_schedule[nb].isNull()) {
+         d_multiblock_coarse_schedule[nb]->initializeSourceVector(
+            allocate_vector);
+         return;
+      }
+   }
+
+   /*
+    * Error results if this line is reached.
+    */
+   TBOX_ERROR("Schedules not properly constructed");
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Get the equivalence classes from the refine algorithm.                 *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+const tbox::Pointer<xfer::RefineClasses>&
+MultiblockRefineSchedule::getEquivalenceClasses() const
+{
+   return d_single_block_refine_alg->getEquivalenceClasses();
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Determine if the fillData operation requires source data from blocks   *
+ * other than the one containing the data being filled                    *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+bool
+MultiblockRefineSchedule::needOtherSourceBlocks(
+   hier::BoxList& dst_boxes,
+   hier::BoxList& src_boxes,
+   hier::BoxList& domain_outside_block) const
+{
+   const tbox::Dimension& dim(d_multiblock_hierarchy->getDim());
+
+   const hier::IntVector constant_one_intvector(dim, 1);
+
+   bool needed;
+
+   hier::BoxList dst_grow_list(dst_boxes);
+   dst_grow_list.grow(constant_one_intvector);
+
+   dst_grow_list.intersectBoxes(domain_outside_block);
+
+   if (dst_grow_list.size() == 0) {
+      needed = false;
+   } else {
+
+      if (dst_boxes.getTotalSizeOfBoxes() > src_boxes.getTotalSizeOfBoxes()) {
+
+         hier::BoxList dst_remove_list(dst_boxes);
+         dst_remove_list.removeIntersections(src_boxes);
+
+         dst_remove_list.grow(constant_one_intvector);
+
+         dst_remove_list.intersectBoxes(domain_outside_block);
+
+         if (dst_remove_list.size() == 0) {
+
+            needed = false;
+
+         } else {
+
+            needed = true;
+
+         }
+      } else {
+
+         hier::BoxList intersection(src_boxes);
+         intersection.intersectBoxes(dst_boxes);
+
+         if (dst_boxes.getTotalSizeOfBoxes() >
+             intersection.getTotalSizeOfBoxes()) {
+
+            hier::BoxList dst_remove_list(dst_boxes);
+            dst_remove_list.removeIntersections(src_boxes);
+
+            dst_remove_list.grow(constant_one_intvector);
+
+            dst_remove_list.intersectBoxes(domain_outside_block);
+
+            if (dst_remove_list.size() == 0) {
+
+               needed = false;
+
+            } else {
+
+               needed = true;
+
+            }
+
+         } else {
+
+            dst_boxes.removeIntersections(intersection);
+
+            if (dst_boxes.size() > 0) {
+
+               needed = true;
+
+            } else {
+
+               needed = false;
+
+            }
+         }
+      }
+   }
+
+   return needed;
+
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Create a schedule that will fill data on a temporary coarse level on a *
+ * neighboring block.                                                     *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void MultiblockRefineSchedule::createNeighborCoarseSchedule(
+   const tbox::Pointer<hier::PatchLevel>& neighbor_coarse_level,
+   const int next_coarser_level,
+   const hier::IntVector& ratio_to_coarser,
+   const tbox::Pointer<hier::PatchHierarchy>& hierarchy,
+   const int neighbor_block_number,
+   const int dst_block_number,
+   const int neighbor_counter)
+{
+   NULL_USE(ratio_to_coarser);
+   NULL_USE(hierarchy);
+
+   const tbox::Dimension& dim(d_multiblock_hierarchy->getDim());
+
+   tbox::Pointer<hier::PatchLevel> coarse_level = neighbor_coarse_level;
+
+   hier::BoxList domain_outside_block;
+   tbox::List<hier::MultiblockPatchHierarchy::Neighbor> neighbors =
+      d_multiblock_hierarchy->getNeighbors(neighbor_block_number);
+
+   for (tbox::List<hier::MultiblockPatchHierarchy::Neighbor>::
+        Iterator nei(neighbors); nei; nei++) {
+      domain_outside_block.unionBoxes(hier::BoxList(nei().getTranslatedDomain()));
+   }
+
+   domain_outside_block.refine(coarse_level->getRatioToLevelZero());
+
+   tbox::Array<tbox::Pointer<hier::PatchLevel> >
+   coarse_level_array(d_multiblock_hierarchy->getNumberOfBlocks());
+
+   for (int nb = 0; nb < d_multiblock_hierarchy->getNumberOfBlocks(); nb++) {
+      coarse_level_array[nb].setNull();
+   }
+
+   coarse_level_array[neighbor_block_number] = coarse_level;
+
+   d_neighbor_multiblock_coarse_level[dst_block_number][neighbor_counter] =
+      new hier::MultiblockPatchLevel(dim, coarse_level_array);
+
+   d_multiblock_hierarchy->adjustMultiblockPatchLevelBoundaries(
+      d_neighbor_multiblock_coarse_level[dst_block_number][neighbor_counter]);
+
+   tbox::Pointer<hier::MultiblockPatchLevel> coarse_hierarchy_level =
+      d_multiblock_hierarchy->getPatchLevel(next_coarser_level);
+
+   hier::BoxList pseudo_domain(domain_outside_block);
+   pseudo_domain.unionBoxes(hier::BoxList(coarse_level->getPhysicalDomain()));
+
+   hier::BoxList unfilled_boxes(coarse_level->getBoxes());
+
+   findUnfilledBoxes(unfilled_boxes,
+      neighbor_block_number,
+      coarse_hierarchy_level,
+      pseudo_domain,
+      d_data_fill_gcw);
+
+   tbox::Pointer<PatchLevelFullFillPattern> fill_pattern(
+      new PatchLevelFullFillPattern());
+
+   if (unfilled_boxes.size() == 0) {
+      d_neighbor_multiblock_coarse_schedule[dst_block_number][neighbor_counter]
+         =
+            new MultiblockRefineSchedule(
+               fill_pattern,
+               d_neighbor_multiblock_coarse_level[dst_block_number][
+                  neighbor_counter],
+               coarse_hierarchy_level,
+               d_multiblock_hierarchy,
+               d_single_block_scratch_refine_alg,
+               d_transaction_factory,
+               d_multiblock_strategy,
+               true);
+   } else {
+      d_neighbor_multiblock_coarse_schedule[dst_block_number][neighbor_counter]
+         =
+            new MultiblockRefineSchedule(
+               fill_pattern,
+               d_neighbor_multiblock_coarse_level[dst_block_number][
+                  neighbor_counter],
+               coarse_hierarchy_level,
+               next_coarser_level - 1,
+               d_multiblock_hierarchy,
+               d_single_block_scratch_refine_alg,
+               d_transaction_factory,
+               d_multiblock_strategy,
+               true);
+
+   }
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Create a schedule to fill data on a temporary coarse level             *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void MultiblockRefineSchedule::createCoarseSchedule(
+   const tbox::Pointer<hier::PatchLevel>& coarse_level,
+   const int next_coarser_level,
+   const int block_number)
+{
+   const tbox::Dimension& dim(d_multiblock_hierarchy->getDim());
+
+   hier::BoxList domain_outside_block;
+   tbox::List<hier::MultiblockPatchHierarchy::Neighbor> neighbors =
+      d_multiblock_hierarchy->getNeighbors(block_number);
+
+   for (tbox::List<hier::MultiblockPatchHierarchy::Neighbor>::
+        Iterator nei(neighbors); nei; nei++) {
+      domain_outside_block.unionBoxes(hier::BoxList(nei().getTranslatedDomain()));
+   }
+
+   domain_outside_block.refine(coarse_level->getRatioToLevelZero());
+
+   tbox::Array<tbox::Pointer<hier::PatchLevel> >
+   coarse_level_array(d_multiblock_hierarchy->getNumberOfBlocks());
+
+   for (int nb = 0; nb < d_multiblock_hierarchy->getNumberOfBlocks(); nb++) {
+      coarse_level_array[nb].setNull();
+   }
+
+   coarse_level_array[block_number] = coarse_level;
+
+   d_multiblock_coarse_scratch_level[block_number] =
+      new hier::MultiblockPatchLevel(dim, coarse_level_array);
+
+   d_multiblock_hierarchy->adjustMultiblockPatchLevelBoundaries(
+      d_multiblock_coarse_scratch_level[block_number]);
+
+   tbox::Pointer<hier::MultiblockPatchLevel> coarse_hierarchy_level =
+      d_multiblock_hierarchy->getPatchLevel(next_coarser_level);
+
+   hier::BoxList pseudo_domain(domain_outside_block);
+   pseudo_domain.unionBoxes(hier::BoxList(coarse_level->getPhysicalDomain()));
+
+   hier::BoxList unfilled_boxes(coarse_level->getBoxes());
+
+   findUnfilledBoxes(unfilled_boxes,
+      block_number,
+      coarse_hierarchy_level,
+      pseudo_domain,
+      d_data_fill_gcw);
+
+   tbox::Pointer<PatchLevelFullFillPattern> fill_pattern(
+      new PatchLevelFullFillPattern());
+
+   if (unfilled_boxes.size() == 0) {
+      d_multiblock_coarse_schedule[block_number] =
+         new MultiblockRefineSchedule(
+            fill_pattern,
+            d_multiblock_coarse_scratch_level[block_number],
+            coarse_hierarchy_level,
+            d_multiblock_hierarchy,
+            d_single_block_scratch_refine_alg,
+            d_transaction_factory,
+            d_multiblock_strategy,
+            true);
+   } else {
+      d_multiblock_coarse_schedule[block_number] =
+         new MultiblockRefineSchedule(
+            fill_pattern,
+            d_multiblock_coarse_scratch_level[block_number],
+            coarse_hierarchy_level,
+            next_coarser_level - 1,
+            d_multiblock_hierarchy,
+            d_single_block_scratch_refine_alg,
+            d_transaction_factory,
+            d_multiblock_strategy,
+            true);
+   }
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Find the boxes that are unfilled by copying and communicating data     *
+ * from other patches of the same resolution as the destination level     *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void MultiblockRefineSchedule::findUnfilledBoxes(
+   hier::BoxList& unfilled_boxes,
+   const int block_number,
+   tbox::Pointer<hier::MultiblockPatchLevel> coarse_hierarchy_level,
+   const hier::BoxList& pseudo_domain,
+   const hier::IntVector& gcw)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*d_multiblock_hierarchy,
+      *coarse_hierarchy_level,
+      gcw);
+
+   unfilled_boxes.grow(gcw);
+   unfilled_boxes.intersectBoxes(pseudo_domain);
+
+   tbox::Pointer<hier::PatchLevel> block_patch_level =
+      coarse_hierarchy_level->getPatchLevelForBlock(block_number);
+
+   if (!block_patch_level.isNull()) {
+      unfilled_boxes.removeIntersections(hier::BoxList(block_patch_level->
+            getBoxes()));
+   }
+
+   if (unfilled_boxes.size()) {
+      for (tbox::List<hier::MultiblockPatchHierarchy::Neighbor>::
+           Iterator ni(d_multiblock_hierarchy->getNeighbors(block_number));
+           ni; ni++) {
+
+         int id = ni().getBlockNumber();
+
+         tbox::Pointer<hier::PatchLevel> patch_level =
+            coarse_hierarchy_level->getPatchLevelForBlock(id); 
+
+         if (!patch_level.isNull()) {
+
+            hier::BoxArray level_boxes(patch_level->getBoxes());
+
+            d_multiblock_hierarchy->translateBoxArray(level_boxes,
+               patch_level->getRatioToLevelZero(),
+               block_number,
+               id);
+
+            unfilled_boxes.removeIntersections(hier::BoxList(level_boxes));
+         }
+
+         if (unfilled_boxes.size() == 0) {
+            break;
+         }
+
+      }
+   }
+
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Construct a refine algorithm whose destination components are the      *
+ * scratch components of the algorithm that created this                  *
+ * MultiblockRefineSchedule.                                              *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void MultiblockRefineSchedule::constructScratchRefineAlgorithm()
+{
+   const tbox::Dimension& dim(d_multiblock_hierarchy->getDim());
+
+   d_single_block_scratch_refine_alg = new xfer::RefineAlgorithm(dim);
+
+   const tbox::Pointer<RefineClasses> refine_classes =
+      d_single_block_refine_alg->getEquivalenceClasses();
+
+   tbox::Pointer<RefineClasses> scratch_refine_classes(new RefineClasses());
+
+   tbox::Pointer<BoxGeometryVariableFillPattern> bg_fill_pattern(
+      new BoxGeometryVariableFillPattern());
+
+   const int num_refine_items = refine_classes->getNumberOfRefineItems();
+
+   for (int nd = 0; nd < num_refine_items; nd++) {
+
+      RefineClasses::Data data = refine_classes->getRefineItem(nd);
+
+      data.d_dst = data.d_scratch;
+      data.d_var_fill_pattern = bg_fill_pattern;
+
+      scratch_refine_classes->insertEquivalenceClassItem(data);
+
+   }
+
+   d_single_block_scratch_refine_alg->setEquivalenceClasses(
+      scratch_refine_classes);
+
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Copy data from scratch to destination where there is overlap between   *
+ * the data.  Nothing is done if scratch and destination are the same.    *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void
+MultiblockRefineSchedule::copyScratchToDestination(
+   tbox::Pointer<hier::PatchLevel> level,
+   const hier::BoxList& unfilled_boxes,
+   tbox::Pointer<xfer::RefineClasses> refine_classes) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*d_multiblock_hierarchy, *level);
+
+   const tbox::Dimension& dim(d_multiblock_hierarchy->getDim());
+
+   const int num_classes = refine_classes->getNumberOfEquivalenceClasses();
+   const int num_refine_items = refine_classes->getNumberOfRefineItems();
+
+   tbox::Pointer<hier::PatchDescriptor> descriptor =
+      level->getPatchDescriptor();
+
+   bool copy_needed = false;
+   for (int nd = 0; nd < num_refine_items; nd++) {
+
+      const xfer::RefineClasses::Data& data = refine_classes->getRefineItem(nd);
+
+      const int dst = data.d_dst;
+      const int src = data.d_scratch;
+
+      if (dst != src) {
+         copy_needed = true;
+         break;
+      }
+   }
+
+   if (copy_needed) {
+      for (hier::PatchLevel::Iterator p(level); p; p++) {
+
+         tbox::Pointer<hier::Patch> patch = *p;
+         hier::Box patch_box(patch->getBox());
+
+         for (int ne = 0; ne < num_classes; ne++) {
+
+            const xfer::RefineClasses::Data& rep_item =
+               refine_classes->getClassRepresentative(ne);
+
+            const int rep_item_src_id = rep_item.d_scratch;
+            const int rep_item_dst_id = rep_item.d_scratch;
+
+            tbox::Pointer<hier::PatchDataFactory> src_pdf =
+               descriptor->getPatchDataFactory(rep_item_src_id);
+            tbox::Pointer<hier::PatchDataFactory> dst_pdf =
+               descriptor->getPatchDataFactory(rep_item_dst_id);
+
+            for (hier::BoxList::Iterator b(unfilled_boxes);
+                 b; b++) {
+
+               const hier::Box fill_box(b());
+
+               const hier::Box src_mask(fill_box);
+
+               if (!src_mask.empty()) {
+                  tbox::Pointer<hier::BoxOverlap> overlap =
+                     rep_item.d_var_fill_pattern->calculateOverlap(
+                        *dst_pdf->getBoxGeometry(fill_box),
+                        *src_pdf->getBoxGeometry(patch_box),
+                        patch_box,
+                        src_mask,
+                        true, hier::IntVector(dim, 0));
+
+                  for (tbox::List<int>::Iterator
+                       l(refine_classes->getIterator(ne)); l; l++) {
+
+                     const RefineClasses::Data& item =
+                        refine_classes->getRefineItem(l());
+                     const int dst = item.d_dst;
+                     const int src = item.d_scratch;
+
+                     if (dst != src) {
+
+                        patch->getPatchData(dst)->
+                        copy(*(patch->getPatchData(src)), *overlap);
+                     }
+                  }
+               }
+            }
+         }
+      }
+   }
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Execute refinement operations on scracth data using the preprocess and *
+ * postprocess refine routines.                                           *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void MultiblockRefineSchedule::refineScratchData(
+   tbox::Pointer<hier::MultiblockPatchLevel> coarse_mb_level,
+   tbox::Pointer<hier::PatchLevel> fine_level,
+   const std::vector<std::vector< tbox::Pointer<hier::BoxOverlap> > >& overlaps,
+   const hier::Connector& crs_to_dst,
+   const hier::BoxList& unfilled_boxes,
+   const int block_number,
+   const bool fill_fine_gcw,
+   const bool filling_neighbor) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*d_multiblock_hierarchy,
+      *coarse_mb_level,
+      *fine_level);
+
+   const tbox::SAMRAI_MPI& mpi(fine_level->getMappedBoxLevel()->getMPI());
+   const tbox::Dimension& dim(d_multiblock_hierarchy->getDim());
+
+   tbox::Pointer<hier::PatchLevel> coarse_level =
+      coarse_mb_level->getPatchLevelForBlock(block_number);
+
+   const tbox::Pointer<xfer::RefineClasses> refine_classes =
+      d_single_block_refine_alg->getEquivalenceClasses();
+
+   const int num_refine_items = refine_classes->getNumberOfRefineItems();
+
+   const int rank = mpi.getRank();
+
+   const hier::IntVector ratio =
+      fine_level->getRatioToLevelZero() / coarse_level->getRatioToLevelZero();
+
+   hier::IntVector gcw(hier::IntVector::getZero(dim));
+
+   if (fill_fine_gcw) {
+      gcw = fine_level->getPatchDescriptor()->getMaxGhostWidth(dim);
+   }
+
+   tbox::Pointer<VariableFillPattern> bg_fill_pattern;
+   if (filling_neighbor) {
+      bg_fill_pattern = new BoxGeometryVariableFillPattern();
+   }
+
+   const hier::MappedBoxSet& coarse_mapped_boxes =
+      coarse_level->getMappedBoxLevel()->getMappedBoxes();
+   TBOX_ASSERT(overlaps.size() == coarse_mapped_boxes.size()); 
+   int oc = 0;
+   for (hier::MappedBoxSet::const_iterator ni = coarse_mapped_boxes.begin();
+        ni != coarse_mapped_boxes.end(); ++ni) {
+
+      if (overlaps[oc].size()) {
+         const hier::MappedBox& coarse_mapped_box = *ni;
+
+         const hier::MappedBoxSet& dst_nabrs =
+            crs_to_dst.getNeighborSet(coarse_mapped_box.getGlobalId());
+
+         for (hier::MappedBoxSet::const_iterator dn = dst_nabrs.begin();
+              dn != dst_nabrs.end(); ++dn) {
+
+            const hier::MappedBox& dst_mapped_box = *dn;
+
+            if (dst_mapped_box.getOwnerRank() != rank) {
+               continue;
+            }
+
+            tbox::Pointer<hier::Patch> fine_patch =
+               fine_level->getPatch(dst_mapped_box.getLocalId());
+            tbox::Pointer<hier::Patch> crse_patch =
+               coarse_level->getPatch(coarse_mapped_box.getLocalId());
+
+            hier::Box fine_box(fine_patch->getBox());
+            fine_box.grow(gcw);
+
+            hier::BoxList fill_boxes(unfilled_boxes);
+            fill_boxes.intersectBoxes(fine_box);
+
+            if (fill_boxes.size() > 0) {
+
+               hier::Box refined_coarse_box(crse_patch->getBox());
+               refined_coarse_box.refine(ratio);
+               fill_boxes.intersectBoxes(refined_coarse_box);
+
+               fill_boxes.coalesceBoxes();
+
+               if (d_multiblock_strategy != NULL) {
+                  d_multiblock_strategy->preprocessRefineBoxes(*fine_patch,
+                     *crse_patch,
+                     fill_boxes,
+                     ratio);
+               }
+
+               for (int iri = 0; iri < num_refine_items; iri++) {
+                  const xfer::RefineClasses::Data& ref_item =
+                     refine_classes->getRefineItem(iri);
+
+                  if (!(ref_item.d_oprefine.isNull())) {
+
+                     tbox::Pointer<hier::BoxOverlap> refine_overlap(
+                        overlaps[oc][ref_item.d_class_id]);
+
+                     const int scratch_id = ref_item.d_scratch;
+
+                     ref_item.d_oprefine->refine(*fine_patch, *crse_patch,
+                        scratch_id, scratch_id,
+                        *refine_overlap, ratio);
+
+                  }
+               }
+
+               if (d_multiblock_strategy != NULL) {
+                  d_multiblock_strategy->postprocessRefineBoxes(*fine_patch,
+                     *crse_patch,
+                     fill_boxes,
+                     ratio);
+
+               }
+            }
+         }
+      }
+      oc++;
+   }
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Calculate the overlap between data on two patches for a single         *
+ * equivalence class.                                                     *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap>
+MultiblockRefineSchedule::calculateOverlap(
+   const hier::Patch& dst_patch,
+   const hier::Patch& src_patch,
+   const xfer::RefineClasses::Data& item,
+   const hier::Box& restrict_box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*d_multiblock_hierarchy, dst_patch, src_patch);
+
+   const tbox::Dimension& dim(d_multiblock_hierarchy->getDim());
+
+   tbox::Pointer<hier::PatchDescriptor> dst_patch_descriptor(
+      dst_patch.getPatchDescriptor());
+   tbox::Pointer<hier::PatchDescriptor> src_patch_descriptor(
+      src_patch.getPatchDescriptor());
+
+   const int item_dst_id = item.d_dst;
+   const int item_src_id = item.d_src;
+
+   tbox::Pointer<hier::PatchDataFactory> src_pdf(
+      src_patch_descriptor->getPatchDataFactory(item_src_id));
+   tbox::Pointer<hier::PatchDataFactory> dst_pdf(
+      dst_patch_descriptor->getPatchDataFactory(item_dst_id));
+
+   hier::Box dst_ghost_box(dst_patch.getBox());
+   dst_ghost_box.grow(dst_pdf->getGhostCellWidth());
+   hier::Box dst_fill_box(dst_ghost_box * src_patch.getBox() * restrict_box);
+
+   bool overwrite_interior = true;
+
+   tbox::Pointer<hier::BoxOverlap> overlap =
+      item.d_var_fill_pattern->calculateOverlap(
+         *dst_pdf->getBoxGeometry(dst_patch.getBox()),
+         *src_pdf->getBoxGeometry(src_patch.getBox()),
+         dst_patch.getBox(),
+         dst_fill_box,
+         overwrite_interior, hier::IntVector::getZero(dim));
+
+   return overlap;
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Calculate the overlap used to fill data on a singularity patch for a   *
+ * single equivalence class.                                              *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap>
+MultiblockRefineSchedule::calculateSingularityPatchOverlap(
+   const hier::Patch& patch,
+   const xfer::RefineClasses::Data& item,
+   const hier::Box& restrict_box) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*d_multiblock_hierarchy, patch);
+
+   const tbox::Dimension& dim(d_multiblock_hierarchy->getDim());
+
+   tbox::Pointer<hier::PatchDescriptor> patch_descriptor(
+      patch.getPatchDescriptor());
+
+   const int item_dst_id = item.d_dst;
+   const int item_src_id = item.d_src;
+
+   tbox::Pointer<hier::PatchDataFactory> src_pdf(
+      patch_descriptor->getPatchDataFactory(item_src_id));
+   tbox::Pointer<hier::PatchDataFactory> dst_pdf(
+      patch_descriptor->getPatchDataFactory(item_dst_id));
+
+   hier::Box dst_ghost_box(patch.getBox());
+   dst_ghost_box.grow(dst_pdf->getGhostCellWidth());
+   hier::Box dst_fill_box(dst_ghost_box * patch.getBox() * restrict_box);
+
+   bool overwrite_interior = true;
+
+   tbox::Pointer<xfer::BoxGeometryVariableFillPattern> fill_pattern(
+      new xfer::BoxGeometryVariableFillPattern());
+
+   tbox::Pointer<hier::BoxOverlap> overlap =
+      fill_pattern->calculateOverlap(
+         *dst_pdf->getBoxGeometry(patch.getBox()),
+         *src_pdf->getBoxGeometry(patch.getBox()),
+         patch.getBox(),
+         dst_fill_box,
+         overwrite_interior, hier::IntVector::getZero(dim));
+
+   return overlap;
+}
+
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Create and store overlaps that will be used in refineScratchData.      *
+ *                                                                        *
+ * ************************************************************************
+ */
+void MultiblockRefineSchedule::createRefineOverlaps(
+   std::vector<std::vector< tbox::Pointer<hier::BoxOverlap> > >& overlaps,
+   tbox::Pointer<hier::MultiblockPatchLevel> coarse_mb_level,
+   tbox::Pointer<hier::PatchLevel> fine_level,
+   const hier::Connector& crs_to_dst,
+   const hier::BoxList& unfilled_boxes,
+   const int block_number,
+   const bool fill_fine_gcw,
+   const bool filling_neighbor)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*d_multiblock_hierarchy,
+      *coarse_mb_level,
+      *fine_level);
+
+   const tbox::SAMRAI_MPI& mpi(fine_level->getMappedBoxLevel()->getMPI());
+   const tbox::Dimension& dim(d_multiblock_hierarchy->getDim());
+
+   tbox::Pointer<hier::PatchLevel> coarse_level =
+      coarse_mb_level->getPatchLevelForBlock(block_number);
+
+   tbox::Pointer<hier::PatchDescriptor> fine_patch_descriptor =
+      fine_level->getPatchDescriptor();
+
+   const tbox::Pointer<xfer::RefineClasses> refine_classes =
+      d_single_block_refine_alg->getEquivalenceClasses();
+
+   const int num_classes =
+      refine_classes->getNumberOfEquivalenceClasses();
+
+   const int rank = mpi.getRank();
+
+   const hier::IntVector ratio =
+      fine_level->getRatioToLevelZero() / coarse_level->getRatioToLevelZero();
+
+   hier::IntVector gcw(hier::IntVector::getZero(dim));
+
+   if (fill_fine_gcw) {
+      gcw = fine_level->getPatchDescriptor()->getMaxGhostWidth(dim);
+   }
+
+   tbox::Pointer<VariableFillPattern> bg_fill_pattern;
+   if (filling_neighbor) {
+      bg_fill_pattern = new BoxGeometryVariableFillPattern();
+   }
+
+   const hier::MappedBoxSet& coarse_mapped_boxes =
+      coarse_level->getMappedBoxLevel()->getMappedBoxes();
+   overlaps.resize(coarse_mapped_boxes.size());
+   int oc = 0;
+   for (hier::MappedBoxSet::const_iterator ni = coarse_mapped_boxes.begin();
+        ni != coarse_mapped_boxes.end(); ++ni) {
+      const hier::MappedBox& coarse_mapped_box = *ni;
+
+      const hier::MappedBoxSet& dst_nabrs =
+         crs_to_dst.getNeighborSet(coarse_mapped_box.getGlobalId());
+
+      TBOX_ASSERT(dst_nabrs.size() == 1 || dst_nabrs.size() == 0);
+
+      for (hier::MappedBoxSet::const_iterator dn = dst_nabrs.begin();
+           dn != dst_nabrs.end(); ++dn) {
+
+         const hier::MappedBox& dst_mapped_box = *dn;
+
+         if (dst_mapped_box.getOwnerRank() != rank) {
+            continue;
+         }
+
+         tbox::Pointer<hier::Patch> fine_patch =
+            fine_level->getPatch(dst_mapped_box.getLocalId());
+         tbox::Pointer<hier::Patch> crse_patch =
+            coarse_level->getPatch(coarse_mapped_box.getLocalId());
+
+         hier::Box fine_box(fine_patch->getBox());
+         fine_box.grow(gcw);
+
+         hier::BoxList fill_boxes(unfilled_boxes);
+         fill_boxes.intersectBoxes(fine_box);
+
+         if (fill_boxes.size() > 0) {
+
+            hier::Box refined_coarse_box(crse_patch->getBox());
+            refined_coarse_box.refine(ratio);
+            fill_boxes.intersectBoxes(refined_coarse_box);
+
+            fill_boxes.coalesceBoxes();
+
+            overlaps[oc].resize(num_classes);
+
+            for (int ne = 0; ne < num_classes; ne++) {
+
+               const xfer::RefineClasses::Data& rep_item =
+                  refine_classes->getClassRepresentative(ne);
+
+               tbox::Pointer<hier::BoxOverlap> refine_overlap;
+
+               if (!(rep_item.d_oprefine.isNull())) {
+
+                  const tbox::Pointer<VariableFillPattern>& var_fill_pattern =
+                     filling_neighbor ?
+                     bg_fill_pattern : rep_item.d_var_fill_pattern;
+
+                  const int scratch_id = rep_item.d_scratch;
+                  tbox::Pointer<hier::PatchDataFactory> fine_pdf =
+                     fine_patch_descriptor->getPatchDataFactory(scratch_id);
+                  const hier::IntVector& fine_scratch_gcw =
+                     fine_pdf->getGhostCellWidth();
+                  hier::Box fine_data_box(fine_patch->getBox());
+                  fine_data_box.grow(fine_scratch_gcw);
+                  const hier::Box scratch_space(
+                     fine_data_box * refined_coarse_box);
+
+                  refine_overlap =
+                     var_fill_pattern->computeFillBoxesOverlap(
+                        fill_boxes,
+                        fine_patch->getBox(),
+                        scratch_space,
+                        *fine_pdf);
+
+               } else {
+                  refine_overlap.setNull();
+               }
+               overlaps[oc][ne] = refine_overlap;
+            }
+         }
+      }
+      oc++;
+   }
+}
+
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Allocate scratch space on a patch level.                               *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void MultiblockRefineSchedule::allocateScratchSpace(
+   hier::ComponentSelector& allocate_vector,
+   tbox::Pointer<hier::PatchLevel> level,
+   double fill_time) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*d_multiblock_hierarchy, *level);
+
+   int nb;
+
+   for (nb = 0; nb < d_multiblock_hierarchy->getNumberOfBlocks(); nb++) {
+
+      if (!d_single_block_fill_local[nb].isNull()) {
+         d_single_block_fill_local[nb]->allocateScratchSpace(
+            allocate_vector, level, fill_time);
+         return;
+      }
+   }
+
+   for (nb = 0; nb < d_multiblock_hierarchy->getNumberOfBlocks(); nb++) {
+
+      if (!d_multiblock_coarse_schedule[nb].isNull()) {
+         d_multiblock_coarse_schedule[nb]->allocateScratchSpace(
+            allocate_vector, level, fill_time);
+         return;
+      }
+   }
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Get the ghost width needed for boundary filling.                       *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+hier::IntVector
+MultiblockRefineSchedule::getBoundaryFillGhostWidth() const
+{
+   const tbox::Dimension& dim(d_multiblock_hierarchy->getDim());
+
+   int nb;
+
+   for (nb = 0; nb < d_multiblock_hierarchy->getNumberOfBlocks(); nb++) {
+      if (!d_single_block_fill_local[nb].isNull()) {
+         return d_single_block_fill_local[nb]->getBoundaryFillGhostWidth();
+      }
+   }
+
+   for (nb = 0; nb < d_multiblock_hierarchy->getNumberOfBlocks(); nb++) {
+      if (!d_multiblock_coarse_schedule[nb].isNull()) {
+         return d_multiblock_coarse_schedule[nb]->getBoundaryFillGhostWidth();
+      }
+   }
+
+   TBOX_ASSERT(0);
+
+   return hier::IntVector(dim, -1);
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Initialize a ComponentSelector to store all destination components for *
+ * this schedule.                                                         *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void MultiblockRefineSchedule::initializeDestinationVector(
+   hier::ComponentSelector& dst_vector) const
+{
+   dst_vector.clrAllFlags();
+
+   const tbox::Pointer<xfer::RefineClasses> refine_classes =
+      d_single_block_refine_alg->getEquivalenceClasses();
+
+   const int num_refine_items = refine_classes->getNumberOfRefineItems();
+
+   for (int nd = 0; nd < num_refine_items; nd++) {
+
+      dst_vector.setFlag(refine_classes->getRefineItem(nd).d_dst);
+
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ * Reset schedule with new set of refine items.
+ *
+ ************************************************************************
+ */
+
+void MultiblockRefineSchedule::reset(
+   const tbox::Pointer<xfer::RefineAlgorithm> refine_algorithm)
+{
+   TBOX_ASSERT(!refine_algorithm.isNull());
+
+   d_single_block_refine_alg = refine_algorithm;
+   constructScratchRefineAlgorithm();
+
+   tbox::Pointer<xfer::RefineClasses> refine_classes(
+      d_single_block_refine_alg->getEquivalenceClasses());
+
+   for (int i = 0; i < d_single_block_fill_local.size(); i++) {
+      if (!d_single_block_fill_local[i].isNull()) {
+         d_single_block_fill_local[i]->reset(refine_classes);
+      }
+   }
+
+   for (int i = 0; i < d_multiblock_coarse_schedule.size(); i++) {
+      if (!d_multiblock_coarse_schedule[i].isNull()) {
+         d_multiblock_coarse_schedule[i]->reset(
+            d_single_block_scratch_refine_alg);
+      }
+   }
+
+   for (int b = 0; b < d_neighbor_multiblock_coarse_schedule.size(); b++) {
+      for (int n = 0; n < d_neighbor_multiblock_coarse_schedule[b].size(); n++) {
+         if (!d_neighbor_multiblock_coarse_schedule[b][n].isNull()) {
+            d_neighbor_multiblock_coarse_schedule[b][n]->reset(
+               d_single_block_scratch_refine_alg);
+         }
+      }
+   }
+
+   for (int b = 0; b < d_neighbor_single_block_refine_schedule.size(); b++) {
+      for (int n = 0; n < d_neighbor_single_block_refine_schedule[b].size(); n++) {
+         if (!d_neighbor_single_block_refine_schedule[b][n].isNull()) {
+            d_neighbor_single_block_refine_schedule[b][n]->reset(refine_classes);
+         }
+      }
+   }
+
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/MultiblockRefineSchedule.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/MultiblockRefineSchedule.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,765 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   class to manage multiblocks 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_MultiblockRefineSchedule
+#define included_xfer_MultiblockRefineSchedule
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/MultiblockPatchHierarchy.h"
+#include "SAMRAI/hier/MultiblockPatchLevel.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/xfer/RefineAlgorithm.h"
+#include "SAMRAI/xfer/RefineClasses.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Class MultiblockRefineSchedule is an extension of the
+ * concept of xfer::RefineSchedule to be used in applications that require
+ * a multiblock domain.
+ *
+ * This class contains two constructors called from MultiblockRefineAlgorithm
+ * for different refinement patterns.  In the fillData() routine, it first
+ * uses xfer::RefineSchedule to fill data within the interiors of each
+ * block of the multiblock domain, then communicates or copies data to
+ * fill boundary conditions at the boundaries between blocks.
+ *
+ * @see MultiblockPatchHierarchy
+ * @see MultiblockRefineAlgorithm
+ * @see xfer::RefineSchedule
+ */
+
+class MultiblockRefinePatchStrategy;
+class MultiblockRefineAlgorithm;
+
+class MultiblockRefineSchedule
+{
+
+public:
+   /*!
+    * Constructor to create a MultiblockRefineSchedule that copies data
+    * from the interiors of source patch data components on the source level
+    * into the interiors and ghost cells of destination patch data components
+    * on the destination level.  Only data on the intersection of the
+    * source and destination patch components will be copied.  The source
+    * and destination patch levels must reside in the same Multiblock domain.
+    * In general, this constructor is called by a
+    * MultiblockRefineAlgorithm object.
+    *
+    * @param fill_pattern Indicates which parts of the destination level
+    *                     to fill.  See RefineSchedule for valid values.
+    * @param dst_level        Pointer to destination level.
+    * @param src_level        Pointer to source level.
+    * @param multiblock       Multiblock patch hierarchy object containing all
+    *                         of the levels that hold the data being
+    *                         communicated
+    * @param refine_alg       Pointer to an xfer::RefineAlgorithm that
+    *                         will be used to create refine schedules that
+    *                         will do the data transfers and communication.
+    *                         In general, this is a data member of the
+    *                         calling MultiblockRefineAlgorithm
+    *                         object.
+    * @param transaction_factory Transaction factory.
+    * @param strategy    Pointer to a multiblock patch strategy object
+    *                         that provides user-defined boundary filling
+    *                         operations for patch boundaries that touch a
+    *                         multiblock singularity point, as well as user-
+    *                         defined physical boundary filling operations.
+    *                         This pointer may be null, in which case no
+    *                         boundary filling operations will occur.
+    *                         case no boundary filling operations will occur.
+    * @param use_time_refinement Let the destination level be filled using
+    *                            time refinement operations.  This defaults
+    *                            to false because it should only be used
+    *                            in recursive calls within this class
+    */
+   explicit MultiblockRefineSchedule(
+      tbox::Pointer<PatchLevelFillPattern> pl_fill_pattern,
+      tbox::Pointer<hier::MultiblockPatchLevel> dst_level,
+      tbox::Pointer<hier::MultiblockPatchLevel> src_level,
+      tbox::Pointer<hier::MultiblockPatchHierarchy> multiblock,
+      tbox::Pointer<xfer::RefineAlgorithm> refine_alg,
+      tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory,
+      MultiblockRefinePatchStrategy* strategy = NULL,
+      bool use_time_refinement = false);
+
+   /*!
+    * Constructor to create a MultiblockRefineShedule that moves data
+    * from the interiors of source patch data components on the source level
+    * and coarser levels in the patch hierarchy into the interiors and ghost
+    * cells of destination patch data components on the destination level.
+    * Only data on the intersection of the source and destination patch
+    * components will be copied.  If portions of the destination level
+    * remain unfilled, then the algorithm recursively fills those unfilled
+    * portions from coarser levels in the AMR hierarchy.  The source
+    * and destination patch levels must reside in the same index space.
+    * However, the levels do not have to be in the same AMR patch hierarchy.
+    * In general, this constructor is called by a
+    * MultiblockRefineAlgorithm object.
+    *
+    * @param fill_pattern Indicates which parts of the destination level
+    *                     to fill.  See RefineSchedule for valid values.
+    * @param dst_level        Pointer to destination level.
+    * @param src_level        Pointer to source level.  This pointer may be
+    *                         null, in which case the destination level will
+    *                         be filled only using data interpolated from
+    *                         coarser levels.
+    * @param next_coarser_level Integer number of next coarser level in
+    *                           relative to the destination level.  Note that
+    *                           when the destination level has number zero
+    *                           (i.e., the coarsest level), this value should
+    *                           be < 0.
+    * @param multiblock       Multiblock object containing all of the levels
+    *                         that hold the data being communicated
+    * @param refine_alg       Pointer to an xfer::RefineAlgorithm that
+    *                         will be used to create refine schedules that
+    *                         will do the data transfers and communication.
+    *                         In general, this is a data member of the
+    *                         calling MultiblockRefineAlgorithm
+    *                         object.
+    * @param transaction_factory Transaction factory.
+    * @param strategy    Pointer to a multiblock patch strategy object
+    *                         that provides user-defined boundary filling
+    *                         operations for patch boundaries that touch a
+    *                         multiblock singularity point, as well as user-
+    *                         defined physical boundary filling operations.
+    *                         This pointer may be null, in which case no
+    *                         boundary filling operations will occur.
+    *                         case no boundary filling operations will occur.
+    * @param use_time_refinement Let the destination level be filled using
+    *                            time refinement operations.  This defaults
+    *                            to false because it should only be used
+    *                            in recursive calls within this class
+    */
+   explicit MultiblockRefineSchedule(
+      tbox::Pointer<PatchLevelFillPattern> pl_fill_pattern,
+      tbox::Pointer<hier::MultiblockPatchLevel> dst_level,
+      tbox::Pointer<hier::MultiblockPatchLevel> src_level,
+      const int next_coarser_level,
+      tbox::Pointer<hier::MultiblockPatchHierarchy> multiblock,
+      tbox::Pointer<xfer::RefineAlgorithm> refine_alg,
+      tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory,
+      MultiblockRefinePatchStrategy* strategy = NULL,
+      bool use_time_refinement = false);
+
+   /*!
+    * Virtual destructor
+    */
+   virtual ~MultiblockRefineSchedule();
+
+   /*!
+    * @brief Reset this refine schedule to perform data transfers
+    * asssociated with refine class items in function argument.
+    *
+    * In general, this function is
+    * called by a MultiblockRefineAlgorithm object.
+    *
+    * @param refine_algorithm  Pointer to a RefineAlgorithm that holds
+    *                          the refine items that will be used by the
+    *                          schedule after it is reset
+    */
+   void
+   reset(
+      const tbox::Pointer<xfer::RefineAlgorithm> refine_algorithm);
+
+   /*!
+    * @brief Execute the stored communication schedule and perform the
+    * data movement.
+    *
+    * @param fill_time Double simulation time when the fill take place.
+    * @param do_physical_boundary_fill Boolean flag used to bypass the
+    *                                  physical boundary data filling
+    *                                  operations on the destination level.
+    *                                  The default value is true indicating
+    *                                  that boundary data will be filled
+    *                                  (assuming a non-null refine patch
+    *                                  strategy pointer was passed to the
+    *                                  constructor.  Note that even when the
+    *                                  value is false, boundary filling methods
+    *                                  may be called on levels coarser
+    *                                  than the destination level if such data
+    *                                  is needed for proper interpolation.
+    */
+   void
+   fillData(
+      double fill_time,
+      bool do_physical_boundary_fill = true) const;
+
+   /*!
+    * @brief Get the equivalence classes associated with the algorithm that
+    * created this schedule
+    */
+   const
+   tbox::Pointer<xfer::RefineClasses>&
+   getEquivalenceClasses() const;
+
+private:
+   /*!
+    * @brief Initialize a vector to contain source data components
+    *
+    * The component selector argument will be filled with the data component
+    * id's that have been registered as source items for the algorithm that
+    * created this schedule
+    */
+
+   void
+   initializeSourceVector(
+      hier::ComponentSelector& allocate_vector) const;
+
+   /*!
+    * @brief Allocate scratch space on the specified level and
+    * return the allocated patch data indices in the component
+    * selector for later deallocation.
+    *
+    * @param allocate_vector  The patch data indices associated with
+    *                         scratch space will be stored here to be
+    *                         used later for deallocation
+    * @param level            Level on which to allocate scratch space
+    * @param fill_time        Simulation time
+    */
+   void
+   allocateScratchSpace(
+      hier::ComponentSelector& allocate_vector,
+      tbox::Pointer<hier::PatchLevel> level,
+      double fill_time) const;
+
+   /*!
+    * @brief Private data filling method, called from the public method,
+    * or recursively.
+    *
+    * @param fill_time Double simulation time when the fill take place.
+    * @param do_physical_boundary_fill Boolean flag used to bypass the
+    *                                  physical boundary data filling
+    *                                  operations on the destination level.
+    *                                  The default value is true indicating
+    *                                  that boundary data will be filled
+    *                                  (assuming a non-null refine patch
+    *                                  strategy pointer was passed to the
+    *                                  constructor.  Note that even when the
+    *                                  value is false, boundary filling methods
+    *                                  may be called on levels coarser
+    *                                  than the destination level if such data
+    *                                  is needed for proper interpolation.
+    * @param filling_coarse_scratch Boolean flag indicating whether this call
+    *                               is filling scratch data on a temporary
+    *                               coarse level.
+    * @param filling_coarse_scr_recursive Boolean flag indicating if the
+    *                                     method is being called recursively
+    *                                     to fill scratch data on a coarse
+    *                                     level.
+    *
+    */
+   void
+   fillData(
+      double fill_time,
+      bool do_physical_boundary_fill,
+      bool filling_coarse_scratch,
+      bool filling_crse_scr_recursive = false) const;
+
+   /*!
+    * @brief Private method to create the RefineSchedules that transfer data
+    * at block boundaries
+    *
+    * @param dst_level The level where data is being filled
+    * @param src_level The source level
+    * @param refine_strategy The refine strategy that will be given to
+    *                        the constructed RefineSchedules
+    * @param level_number The level number being filled.  If dst_level is not
+    *                     on a hierarchy, then MULTIBLOCK_FAKE_LEVEL_NUMBER
+    *                     should be used
+    * @param use_time_refinement Boolean to determine if time refinement is
+    *                            to be used
+    */
+   void
+   createInterblockSchedules(
+      tbox::Pointer<hier::MultiblockPatchLevel> dst_level,
+      tbox::Pointer<hier::MultiblockPatchLevel> src_level,
+      xfer::RefinePatchStrategy* refine_strategy,
+      int level_number,
+      bool use_time_refinement);
+
+   /*!
+    * @brief Private method to create the BoxOverlaps used in
+    * refineScratchData
+    * TODO: src_level not needed
+    * @param dst_level The level where data is being filled
+    * @param src_level The source level
+    */
+   void
+   createOverlapsForRefine(
+      tbox::Pointer<hier::MultiblockPatchLevel> dst_level,
+      tbox::Pointer<hier::MultiblockPatchLevel> src_level);
+
+   /*!
+    * @brief Private method to create the BoxOverlaps used in
+    * copying neighbor data in fillData
+    */
+   void
+   createOverlapsForCopy();
+
+   /*!
+    * @brief Create BoxOverlaps that will be used in refineScratchData.
+    *
+    * @param overlaps Container to store the overlaps
+    * @param dst_patch_level Destination pactch level on the block being filled
+    * @param neighbor Neighbor object representing source block
+    * @param block_number Block number of the destination
+    * @param fill_fine_gcw Array index identifying the neighbor being used
+    * @param equiv_classes Equivalence classes holding all of the items that
+    *                      will be copied
+    */
+   void
+   createCopyOverlaps(
+      tbox::List<tbox::Pointer<hier::BoxOverlap> >& overlaps,
+      const tbox::Pointer<hier::PatchLevel>& dst_patch_level,
+      const hier::MultiblockPatchHierarchy::Neighbor& neighbor,
+      const int block_number,
+      const int neighbor_counter,
+      const tbox::Pointer<xfer::RefineClasses>& equiv_classes);
+
+   /*
+    * Private function that manages the copying of data from src_level of
+    * one block to dst_level of another block, using the given rotation and
+    * shift.  The levels used in these function are created internally within
+    * this Multiblock class.
+    */
+   void
+   copyBetweenBlocks(
+      tbox::Pointer<hier::PatchLevel> dst_level,
+      const tbox::Pointer<hier::PatchLevel> src_level,
+      const hier::IntVector& shift,
+      const hier::MultiblockPatchHierarchy::RotationIdentifier rotate,
+      const tbox::Pointer<xfer::RefineClasses> refine_classes) const;
+
+   /*
+    * Private function that manages the filling of data from src_level of
+    * one block to dst_level of another block, allowing for a user-defined
+    * filling rather than a copy, using the given rotation and
+    * shift.  The levels used in these function are created internally within
+    * this Multiblock class.
+    */
+   void
+   fillBetweenBlocks(
+      tbox::Pointer<hier::PatchLevel> dst_level,
+      const tbox::Pointer<hier::PatchLevel> src_level,
+      const hier::IntVector& shift,
+      const hier::MultiblockPatchHierarchy::RotationIdentifier rotate,
+      const tbox::Pointer<xfer::RefineClasses> refine_classes) const;
+
+   /*
+    * Use patch strategy to fill ghost regions of level
+    * at the singularity point(s) of the block indicated by block_number.
+    */
+   void
+   fillSingularityBoundary(
+      tbox::Pointer<hier::PatchLevel>& level,
+      tbox::Array<tbox::List<tbox::Pointer<hier::Patch> > >&
+      singularity_patches,
+      const int block_number,
+      const double fill_time) const;
+
+   /*!
+    * @brief Private method to determine if data from other blocks is needed
+    * to fill data on a particular block.
+    *
+    * @param dst_boxes BoxList describing all of the boxes to be filled on a
+    *                  single block.
+    * @param src_boxes BoxList describing all available source boxes on the
+    *                  same block as dst_boxes that can be used to fill data
+    *                  in dst_boxes.
+    * @param domain_outside_block BoxList representing the physical domain of
+    *                             all neighboring blocks, translated to the
+    *                             index space of the destination block.
+    */
+   bool
+   needOtherSourceBlocks(
+      hier::BoxList& dst_boxes,
+      hier::BoxList& src_boxes,
+      hier::BoxList& domain_outside_block) const;
+
+   /*!
+    * @brief Private method to create a MultiblockRefineSchedule to fill
+    * data on a temporary coarse level.
+    *
+    * @param fine_level A fine level that we are attempting to fill.
+    * @param next_coarser_level The level number of the next coarser level
+    * @param block_number The block number for the block represented by
+    *                     hierarchy.
+    */
+   void
+   createCoarseSchedule(
+      const tbox::Pointer<hier::PatchLevel>& fine_level,
+      const int next_coarser_level,
+      const int block_number);
+
+   /*!
+    * @brief Private method to create a MultiblockRefineSchedule to fill
+    * data on a temporary coarse level that represents space on a neighboring
+    * block.
+    *
+    * When filling data on a PatchLevel that exists on a particular block
+    * and touches a block boundary, there will be ghost regions along the
+    * block boundary to be filled.  We first attempt to find data from the
+    * neighboring block at the same level of resolution.  If none exists, then
+    * data from a coarser level on the neighboring block must be interpolated.
+    * This method creates a MultiblockRefineSchedule that will fill data on
+    * that neighboring coarser level before that interpolation is executed.
+    *
+    * @param fine_level A fine level that we are attempting to fill.
+    * @param next_coarser_level The level number of the next coarser level.
+    * @param ratio_to_coarser Refinement ratio between fine_level and the
+    *                         next coarser level.
+    * @param hierarchy The PatchHierarchy where fine_level exists.  This
+    *                  represents one block in a MultiblockPatchHierarchy.
+    * @param neighbor_block_number The block number of a neighboring block
+    *                              where there are ghost regions needing to
+    *                              be filled.
+    * @param dst_block_number The block number for the block represented by
+    *                         hierarchy.
+    * @param neighbor_counter A unique identifier for each neighboring block.
+    */
+   void
+   createNeighborCoarseSchedule(
+      const tbox::Pointer<hier::PatchLevel>& fine_level,
+      const int next_coarser_level,
+      const hier::IntVector& ratio_to_coarser,
+      const tbox::Pointer<hier::PatchHierarchy>& hierarchy,
+      const int neighbor_block_number,
+      const int dst_block_number,
+      const int neighbor_counter);
+
+   /*!
+    * @brief Private method to find boxes that cannot be filled by
+    * copies or communications within a single level of resolution and must
+    * be filled by interpolation.
+    *
+    * @param unfilled_boxes The output BoxList specifying the unfilled boxes.
+    * @param block_number The number of the block where we are filling data.
+    * @param coarse_hierarchy_level The next coarsest MultiblockPatchLevel
+    * @param pseudo_domain A BoxList representing the entire multiblock domain
+    *                      as if all blocks were in the index space of the
+    *                      destination block.
+    * @param gcw Maximum ghost width to be filled.
+    */
+   void
+   findUnfilledBoxes(
+      hier::BoxList& unfilled_boxes,
+      const int block_number,
+      tbox::Pointer<hier::MultiblockPatchLevel> coarse_hierarchy_level,
+      const hier::BoxList& pseudo_domain,
+      const hier::IntVector& gcw);
+
+   /*!
+    * @brief Construct the RefineAlgorithm to be used to create RefineSchedules
+    * that fill scratch data on temporary coarse levels.
+    *
+    * The temporary coarse levels need to be filled with scratch data
+    * before being used for interpolation.  createCoarseSchedule() and
+    * createNeighborCoarseSchedule() create schedules to fill these levels.
+    * The destination data components for these schedules must be the scratch
+    * data components for the overall MultiblockRefineSchedule that is being
+    * called by the user.  This method constructs a MultiblockRefineAlgorithm
+    * that makes the scratch data components also be destination data
+    * components, and this algorithm is then used to construct schedules
+    * in createCoarseSchedule() and createNeighborCoarseSchedule().
+    */
+   void
+   constructScratchRefineAlgorithm();
+
+   /*!
+    * @brief Interpolate data from a temporary coarse level onto unfilled
+    * boxes on a finer level.
+    *
+    * @param coarse_level A temporary coarse level that provides the coarse
+    *                     data for the interpolation.
+    * @param fine_level A fine level onto which data is interpolated.
+    * @param overlaps Container of pre-computed BoxOverlaps
+    * @param crs_to_dst Connector to be used for the interpolation
+    * @param unfilled_boxes Boxes representing regions where interpolated data
+    *                       is needed.
+    * @param block_number Block number of the block where fine_level exists.
+    * @param fill_fine_gcw Boolean that tells whether to fill ghost regions
+    *                      on fine_level
+    * @param filling_neighbor True if filling ghost regions on a neighboring
+    *                         block
+    */
+   void
+   refineScratchData(
+      tbox::Pointer<hier::MultiblockPatchLevel> coarse_level,
+      tbox::Pointer<hier::PatchLevel> fine_level,
+      const std::vector<std::vector< tbox::Pointer<hier::BoxOverlap> > >& overlaps,
+      const hier::Connector& crs_to_dst,
+      const hier::BoxList& unfilled_boxes,
+      const int block_number,
+      const bool fill_fine_gcw,
+      const bool filling_neighbor) const;
+
+   /*!
+    * @brief Copy data that has been filled by interpolation operations from
+    * scratch space to destination space.
+    *
+    * @param level The patch level on a particular block where data has been
+    *              filled.
+    * @param unfilled_boxes The boxes where scratch data has been filled and
+    *                       now needs to be copied to the destination space.
+    * @param refine_classes The refine equivalence classes being used for this
+    *                       refinement operation.
+    */
+   void
+   copyScratchToDestination(
+      tbox::Pointer<hier::PatchLevel> level,
+      const hier::BoxList& unfilled_boxes,
+      const tbox::Pointer<xfer::RefineClasses> refine_classes) const;
+
+
+   /*!
+    * @brief Create BoxOverlaps that will be used in refineScratchData.
+    *
+    * @param overlaps Container to store the overlaps
+    * @param coarse_mb_level A temporary coarse level that provides the coarse
+    *                        data for the interpolation.
+    * @param fine_level A fine level onto which data is interpolated.
+    * @param crs_to_dst Connector to be used for the interpolation
+    * @param unfilled_boxes Boxes representing regions where interpolated data
+    *                       is needed.
+    * @param block_number Block number of the block where fine_level exists.
+    * @param fill_fine_gcw Boolean that tells whether to fill ghost regions
+    *                      on fine_level
+    * @param filling_neighbor True if filling ghost regions on a neighboring
+    *                         block
+    */
+   void createRefineOverlaps(
+      std::vector<std::vector< tbox::Pointer<hier::BoxOverlap> > >& overlaps,
+      tbox::Pointer<hier::MultiblockPatchLevel> coarse_mb_level,
+      tbox::Pointer<hier::PatchLevel> fine_level,
+      const hier::Connector& crs_to_dst,
+      const hier::BoxList& unfilled_boxes,
+      const int block_number,
+      const bool fill_fine_gcw,
+      const bool filling_neighbor);
+
+
+   /*!
+    * @brief Calculate overlap between a destination and source patch for
+    * a single member of the refine equivalence classes.
+    *
+    * @param dst_patch The destination patch
+    * @param src_patch The source patch
+    * @param refine_classes The refine equivalence classes being used for this
+    *                       refinement operation.
+    * @param restrict_box   A box that creates a restriction on the overlap.
+    *                       None of the overlap will lie outside this box.
+    */
+   tbox::Pointer<hier::BoxOverlap>
+   calculateOverlap(
+      const hier::Patch& dst_patch,
+      const hier::Patch& src_patch,
+      const xfer::RefineClasses::Data& refine_classes,
+      const hier::Box& restrict_box) const;
+
+   /*!
+    * @brief Calculate overlap that will be used to fill a singularity
+    * patch for a single member of the refine equivalence classes.
+    *
+    * @param patch          The Patch from a SingularityPatch object
+    * @param refine_classes The refine equivalence classes being used for this
+    *                       refinement operation.
+    * @param restrict_box   A box that creates a restriction on the overlap.
+    *                       None of the overlap will lie outside this box.
+    */
+   tbox::Pointer<hier::BoxOverlap>
+   calculateSingularityPatchOverlap(
+      const hier::Patch& patch,
+      const xfer::RefineClasses::Data& refine_classes,
+      const hier::Box& restrict_box) const;
+
+   /*!
+    * @brief Get width of ghost cell region to fill passed to user supplied
+    * physical boundary condition routine.
+    */
+   hier::IntVector
+   getBoundaryFillGhostWidth() const;
+
+   /*!
+    * @brief Set up ComponentSelector that contains all destination data
+    * components for a schedule
+    */
+   void
+   initializeDestinationVector(
+      hier::ComponentSelector& dst_vector) const;
+
+   tbox::Pointer<hier::MultiblockPatchHierarchy> d_multiblock_hierarchy;
+
+   /*
+    * Refine algorithms to be used on a single block
+    */
+   tbox::Pointer<xfer::RefineAlgorithm> d_single_block_refine_alg;
+   tbox::Pointer<xfer::RefineAlgorithm> d_single_block_scratch_refine_alg;
+
+   /*
+    * Fill pattern identifier and transaction factory used for that pattern
+    */
+   tbox::Pointer<PatchLevelFillPattern> d_fill_pattern;
+   tbox::Pointer<xfer::RefineTransactionFactory> d_transaction_factory;
+
+   /*
+    * Schedule arrays indexed by block number
+    */
+   tbox::Array<tbox::Pointer<xfer::RefineSchedule> >
+   d_single_block_fill_local;
+   tbox::Array<tbox::Pointer<MultiblockRefineSchedule> >
+   d_multiblock_coarse_schedule;
+
+   /*
+    * Array of component selectors to store destination data components.
+    * Array indexed by block number.
+    */
+   tbox::Array<tbox::Pointer<hier::ComponentSelector> > d_coarse_selector;
+
+   /*
+    * Boolean array that tells whether destination level for a particular
+    * block can be filled without getting data from neighboring blocks.
+    */
+   tbox::Array<bool> d_local_fill_only;
+
+   /*
+    * Array to store unfilled boxes on each block that need to be filled
+    * by interpolation.
+    */
+   tbox::Array<hier::BoxList> d_unfilled_boxes;
+
+   /*
+    * Array of temporary coarse levels, each of which will be used to
+    * interpolated data onto finer destination level.
+    */
+   tbox::Array<tbox::Pointer<hier::MultiblockPatchLevel> >
+   d_multiblock_coarse_scratch_level;
+
+   /*
+    * Connectors used to refine data from d_multiblock_coarse_scratch_level
+    */
+   tbox::Array<hier::Connector> d_crs_to_dst_connector;
+
+   /*
+    * The d_neighbor_* arrays are used to manage the filling of data from block
+    * neighbors.
+    *
+    * Arrays are indexed [block_number][neighbor_number].
+    */
+
+   /*
+    * Boolean that tells whether ghost regions lying in a neighboring block
+    * can be filled from data on the same level of resolution (true), or
+    * require interpolation from coarser levels (false).
+    */
+   tbox::Array<tbox::Array<bool> > d_neighbor_copy_only;
+
+   /*
+    * The unfilled boxes in ghost regions on a neighboring block, requiring
+    * interpolation from a coarser level.
+    */
+   tbox::Array<tbox::Array<hier::BoxList> > d_neighbor_unfilled_boxes;
+
+   /*
+    * The temporary coarser levels to be used for interpolation
+    */
+   tbox::Array<tbox::Array<tbox::Pointer<hier::MultiblockPatchLevel> > >
+   d_neighbor_multiblock_coarse_level;
+
+   /*
+    * Connectors used to refine data from d_neighbor_multiblock_coarse_level
+    */
+   tbox::Array<tbox::Array<hier::Connector> > d_neighbor_crs_to_dst_connector;
+
+   /*
+    * The schedules to be used to fill temporarly coarser levels
+    */
+   tbox::Array<tbox::Array<tbox::Pointer<MultiblockRefineSchedule> > >
+   d_neighbor_multiblock_coarse_schedule;
+
+   /*
+    * Levels that represent ghost regions lying in a neighboring block.  They
+    * are filled by copies (if d_neighbor_copy_only is true) or interpolation.
+    * These levels exist in the neighboring block's index space.
+    */
+   tbox::Array<tbox::Array<tbox::Pointer<hier::PatchLevel> > >
+   d_neighbor_ghost_level;
+
+   /*
+    * Levels that represent the same regions as d_neighbor_ghost level, but
+    * in the destination block's index space.  Data will be translated from
+    * d_neighbor_ghost_level[block_number][neighbor_number] to
+    * d_finalize_ghost_level[block_number][neighbor_number].
+    */
+   tbox::Array<tbox::Array<tbox::Pointer<hier::PatchLevel> > >
+   d_finalize_ghost_level;
+
+   /*
+    * Probably going away for DLBG
+    */
+   tbox::Array<tbox::Array<tbox::Array<int> > >
+   d_finalize_ghost_patch_numbers;
+   tbox::Array<tbox::Array<tbox::Array<int> > >
+   d_finalize_ghost_num_src_patches;
+
+   /*
+    * RefineSchedules to fill data on ghost regions that lie in a neighboring
+    * block, when d_copy_neighbor_only is true and no spatial interpolation
+    * is needed.
+    */
+   tbox::Array<tbox::Array<tbox::Pointer<xfer::RefineSchedule> > >
+   d_neighbor_single_block_refine_schedule;
+
+   tbox::Array<tbox::Array<tbox::List< tbox::Pointer<hier::BoxOverlap> > > >
+   d_neighbor_copy_overlaps;
+
+   /*
+    * Containers to hold BoxOverlaps for refineScratchData
+    */
+   std::vector<std::vector<std::vector< tbox::Pointer<hier::BoxOverlap> > > >
+      d_local_refine_overlaps;
+   std::vector<std::vector<std::vector<std::vector< tbox::Pointer<hier::BoxOverlap> > > > >
+      d_neighbor_refine_overlaps;
+
+   /*
+    * True if the transaction factory is a standard factory.
+    */
+   bool d_using_standard_transaction;
+
+   /*
+    * Destination level for the MultiblockRefineSchedule
+    */
+   tbox::Pointer<hier::MultiblockPatchLevel> d_multiblock_dst_level;
+
+   /*
+    * Strategy class to handle filling of physical boundaries and
+    * boundaries at singularities.  Also may have implementations of
+    * interpolation operations.
+    */
+   MultiblockRefinePatchStrategy* d_multiblock_strategy;
+
+   /*
+    * ghost cell width used in creating the schedule
+    */
+   hier::IntVector d_data_fill_gcw;
+
+   /*
+    * Constant to be used in cases where destination level is outside the
+    * hierarchy and has no level number.
+    */
+   static const int MULTIBLOCK_FAKE_LEVEL_NUMBER = -24;
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/PatchInteriorVariableFillPattern.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/PatchInteriorVariableFillPattern.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,130 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Fill pattern class that fills patch interiors only 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_PatchInteriorVariableFillPattern_C
+#define included_xfer_PatchInteriorVariableFillPattern_C
+
+#include "SAMRAI/xfer/PatchInteriorVariableFillPattern.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+const std::string PatchInteriorVariableFillPattern::s_name_id =
+   "PATCH_INTERIOR_FILL_PATTERN";
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default contructor only sets the string name identifier               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+PatchInteriorVariableFillPattern::PatchInteriorVariableFillPattern(
+   const tbox::Dimension& dim):
+   d_dim(dim)
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Destructor                                                            *
+ *                                                                      *
+ *************************************************************************
+ */
+
+PatchInteriorVariableFillPattern::~PatchInteriorVariableFillPattern()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Calculate the overlap using the implemented calculateOverlap() method *
+ * for the destination geometry.                                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::BoxOverlap>
+PatchInteriorVariableFillPattern::calculateOverlap(
+   const hier::BoxGeometry& dst_geometry,
+   const hier::BoxGeometry& src_geometry,
+   const hier::Box& dst_patch_box,
+   const hier::Box& src_mask,
+   const bool overwrite_interior,
+   const hier::IntVector& src_offset) const
+{
+   NULL_USE(dst_patch_box);
+   NULL_USE(overwrite_interior);
+   TBOX_DIM_ASSERT_CHECK_ARGS3(dst_patch_box, src_mask, src_offset);
+   hier::BoxList dst_restrict_boxes(dst_patch_box);
+   return dst_geometry.calculateOverlap(src_geometry, src_mask,
+      true, src_offset,
+      dst_restrict_boxes);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return the string name identifier.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+const std::string& PatchInteriorVariableFillPattern::getPatternName() const
+{
+   return s_name_id;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * getStencilWidth() throws an error if called.  Only overridding        *
+ * versions of this method in concrete subclasses should be called.      *
+ *                                                                       *
+ *************************************************************************
+ */
+const hier::IntVector& PatchInteriorVariableFillPattern::getStencilWidth()
+{
+   return hier::IntVector::getZero(d_dim);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute BoxOverlap that specifies data to be filled by refinement     *
+ * operator.                                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+tbox::Pointer<hier::BoxOverlap>
+PatchInteriorVariableFillPattern::computeFillBoxesOverlap(
+   const hier::BoxList& fill_boxes,
+   const hier::Box& patch_box,
+   const hier::Box& data_box,
+   const hier::PatchDataFactory& pdf) const
+{
+   /*
+    * For this case, the overlap is simply the intersection of
+    * fill_boxes, data_box, and patch_box.
+    */
+   hier::IntVector offset(hier::IntVector::getZero(d_dim));
+   hier::BoxList overlap_boxes(fill_boxes);
+   overlap_boxes.intersectBoxes(data_box * patch_box);
+
+   return pdf.getBoxGeometry(patch_box)->setUpOverlap(overlap_boxes, offset);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/PatchInteriorVariableFillPattern.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/PatchInteriorVariableFillPattern.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,155 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Fill pattern class that fills PatchInteriors only 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_PatchInteriorVariableFillPattern
+#define included_xfer_PatchInteriorVariableFillPattern
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/VariableFillPattern.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Class BoxGeometryVariableFillPattern is a default implementation of
+ * the abstract base class VariableFillPattern.
+ *
+ * It is used to calculate overlaps that consist of the full intersection
+ * between source and destination patches, including all ghost regions.  If
+ * no VariableFillPattern object is provided when a refine operation is
+ * registered with a RefineAlgorithm, this class is used by default.
+ *
+ * @see xfer::RefineAlgorithm
+ */
+
+/*!
+ * @brief Class PatchInteriorVariableFillPattern is an implementation of the
+ * abstract base class VariableFillPattern.
+ *
+ * It is used to calculate overlaps hat consist of the intersections
+ * between patches, including only patch interiors.  (The boundaries of a patch
+ * are considered to be part of the interior.)
+ */
+
+class PatchInteriorVariableFillPattern:
+   public VariableFillPattern
+{
+public:
+
+   /*!
+    * @brief Constructor
+    *
+    * @param[in] dim     Dimension
+    */
+   explicit PatchInteriorVariableFillPattern(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Destructor
+    */
+   virtual ~PatchInteriorVariableFillPattern();
+
+   /*!
+    * @brief Calculate overlap between the destination and source geometries
+    * using the geometries' own overlap calculation methods.
+    *
+    * The intersection between the given dst_geometry and src_geometry
+    * will be calculated according to the properties of those geometries, but
+    * will not include any ghost space outside of the patch represented by
+    * dst_patch_box.
+    *
+    * If the argument overwrite_interior is set to false, then the returned
+    * BoxOverlap will be empty, since this class only computes overlaps
+    * representing patch interiors.
+    *
+    * @param[in] dst_geometry    geometry object for destination box
+    * @param[in] src_geometry    geometry object for source box
+    * @param[in] dst_patch_box   box for the destination patch
+    * @param[in] src_mask        the source mask, the box resulting from
+    *                            shifting the source box by src_offset
+    * @param[in] overwrite_interior  controls whether or not to include the
+    *                                destination box interior in the overlap.
+    * @param[in] src_offset      the offset between source and destination
+    *                            index space.  src + src_offset = dst
+    *
+    * @return                    Pointer to the calculated overlap object
+    */
+   tbox::Pointer<hier::BoxOverlap>
+   calculateOverlap(
+      const hier::BoxGeometry& dst_geometry,
+      const hier::BoxGeometry& src_geometry,
+      const hier::Box& dst_patch_box,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset) const;
+
+   /*!
+    * Computes a BoxOverlap object which defines the space to be filled by
+    * a refinement operation.  For this implementation, that space is the
+    * intersection between fill_boxes (computed by the RefineSchedule),
+    * data_box, which specifies the extent of the destination data, and
+    * patch_box, which specifies the patch interior of the destination.  The
+    * patch data factory is used to compute the overlap with the appropriate
+    * data centering, consistent with the centering of the data to be filled.
+    *
+    * @param[in] fill_boxes  list representing the all of the space on a patch
+    *                        or its ghost region that may be filled by a
+    *                        refine operator (cell-centered represtentation)
+    * @param[in] patch_box   box representing the patch where a refine operator
+    *                        will fill data.  (cell-centered representation)
+    * @param[in] data_box    box representing the full extent of the region
+    *                        covered by a patch data object, including all
+    *                        ghosts (cell-centered representation)
+    * @param[in] pdf         patch data factory for the data that is to be
+    *                        filled
+    */
+   tbox::Pointer<hier::BoxOverlap>
+   computeFillBoxesOverlap(
+      const hier::BoxList& fill_boxes,
+      const hier::Box& patch_box,
+      const hier::Box& data_box,
+      const hier::PatchDataFactory& pdf) const;
+
+   /*!
+    * @brief Implementation of interface to get stencil width.
+    * 
+    * @return    Zero IntVector since this fills patch interiors only.
+    */
+   const hier::IntVector&
+   getStencilWidth();
+
+   /*!
+    * @brief Returns a string name identifier "PATCH_INTERIOR_FILL_PATTERN".
+    */
+   const std::string&
+   getPatternName() const;
+
+private:
+   PatchInteriorVariableFillPattern(
+      const PatchInteriorVariableFillPattern&);    // not implemented
+   void
+   operator = (
+      const PatchInteriorVariableFillPattern&);    // not implemented
+
+   /*!
+    * @brief The dimension of this object.
+    */
+   const tbox::Dimension d_dim;
+
+   /*!
+    * @brief Static string holding name identifier for this class.
+    */
+   static const std::string s_name_id;
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/PatchLevelBorderAndInteriorFillPattern.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/PatchLevelBorderAndInteriorFillPattern.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,116 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract fill pattern class to provide interface for stencils 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_PatchLevelBorderAndInteriorFillPattern_C
+#define included_xfer_PatchLevelBorderAndInteriorFillPattern_C
+
+#include "SAMRAI/xfer/PatchLevelBorderAndInteriorFillPattern.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/MappedBox.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/xfer/PatchLevelBorderAndInteriorFillPattern.I"
+#endif
+
+namespace SAMRAI {
+namespace xfer {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default constructor                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+PatchLevelBorderAndInteriorFillPattern::PatchLevelBorderAndInteriorFillPattern():
+   d_max_fill_boxes(0)
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Destructor                                                           *
+ *									*
+ *************************************************************************
+ */
+
+PatchLevelBorderAndInteriorFillPattern::~PatchLevelBorderAndInteriorFillPattern()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * computeFillMappedBoxesAndNeighborhoodSets                             *
+ *                                                                       *
+ *************************************************************************
+ */
+void
+PatchLevelBorderAndInteriorFillPattern::computeFillMappedBoxesAndNeighborhoodSets(
+   hier::MappedBoxSet& fill_mapped_boxes,
+   hier::NeighborhoodSet& dst_to_fill_edges,
+   const hier::MappedBoxLevel& dst_mapped_box_level,
+   const hier::Connector& dst_to_dst,
+   const hier::Connector& dst_to_src,
+   const hier::Connector& src_to_dst,
+   const hier::IntVector& fill_ghost_width)
+{
+   NULL_USE(dst_to_src);
+   NULL_USE(src_to_dst);
+   TBOX_DIM_ASSERT_CHECK_ARGS2(dst_mapped_box_level, fill_ghost_width);
+
+   const hier::MappedBoxSet& dst_mapped_boxes =
+      dst_mapped_box_level.getMappedBoxes();
+
+   /*
+    * Grow each patch box and remove the level from it, except the
+    * patch box itself.  (Do not fill ghost cells that are normally
+    * filled by same mapped_box_level.  Do fill ghost cells that are
+    * normally filled by coarser mapped_box_level.)
+    */
+   hier::LocalId last_id = dst_mapped_box_level.getLastLocalId();
+   for (hier::MappedBoxSet::const_iterator ni = dst_mapped_boxes.begin();
+        ni != dst_mapped_boxes.end(); ++ni) {
+
+      const hier::GlobalId& gid(ni->getGlobalId());
+      const hier::MappedBox& dst_mapped_box =
+         *dst_mapped_box_level.getMappedBox(gid);
+      hier::BoxList fill_boxes(dst_mapped_box.getBox());
+      fill_boxes.getFirstItem().grow(fill_ghost_width);
+      const NeighborSet& nabrs =
+         dst_to_dst.getNeighborSet(dst_mapped_box.getLocalId());
+
+      for (NeighborSet::const_iterator na = nabrs.begin();
+           na != nabrs.end(); ++na) {
+         if (*ni != *na) fill_boxes.removeIntersections(na->getBox());
+      }
+
+      if (!fill_boxes.isEmpty()) {
+         d_max_fill_boxes = tbox::MathUtilities<int>::Max(d_max_fill_boxes,
+               fill_boxes.size());
+
+         NeighborSet& fill_nabrs = dst_to_fill_edges[gid];
+         for (hier::BoxList::Iterator li(fill_boxes); li; li++) {
+            hier::MappedBox fill_mapped_box(*li,
+                                            ++last_id,
+                                            dst_mapped_box.getOwnerRank());
+            fill_mapped_boxes.insert(fill_mapped_boxes.end(), fill_mapped_box);
+            fill_nabrs.insert(fill_mapped_box);
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/PatchLevelBorderAndInteriorFillPattern.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/PatchLevelBorderAndInteriorFillPattern.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,50 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract fill pattern class to provide interface for stencils 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace xfer {
+
+SAMRAI_INLINE_KEYWORD
+bool
+PatchLevelBorderAndInteriorFillPattern::needsToCommunicateDestinationFillBoxes()
+const
+{
+   return true;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool
+PatchLevelBorderAndInteriorFillPattern::doesSourceLevelCommunicateToDestination()
+const
+{
+   return true;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool PatchLevelBorderAndInteriorFillPattern::fillingCoarseFineGhosts() const
+{
+   return true;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool PatchLevelBorderAndInteriorFillPattern::fillingEnhancedConnectivityOnly()
+const
+{
+   return false;
+}
+
+SAMRAI_INLINE_KEYWORD
+int PatchLevelBorderAndInteriorFillPattern::getMaxFillBoxes() const
+{
+   return d_max_fill_boxes;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/PatchLevelBorderAndInteriorFillPattern.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/PatchLevelBorderAndInteriorFillPattern.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,145 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract fill pattern class to provide interface for stencils 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_PatchLevelBorderAndInteriorFillPattern
+#define included_xfer_PatchLevelBorderAndInteriorFillPattern
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/PatchLevelFillPattern.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief PatchLevelFillPattern implementation for filling at PatchLevel
+ * boundaries and interiors
+ *
+ * For documentation on this interface see @ref xfer::PatchLevelFillPattern
+ *
+ * The fill boxes will consist of the interior of the destination
+ * level as well as ghost regions lying outside of the level interior
+ * at physical and coarse-fine boundaries.  Ghost regions that overlap
+ * the interiors of other boxes on the destination level will not be
+ * included.
+ */
+
+class PatchLevelBorderAndInteriorFillPattern:public PatchLevelFillPattern
+{
+public:
+   /*!
+    * @brief Default constructor
+    */
+   PatchLevelBorderAndInteriorFillPattern();
+
+   /*!
+    * @brief Destructor
+    */
+   virtual ~PatchLevelBorderAndInteriorFillPattern();
+
+   /*!
+    * @brief Compute the mapped boxes to be filled and related communication
+    * data.
+    *
+    * The computed fill_mapped_boxes will cover the ghost regions around the
+    * boxes of dst_mapped_box_level at coarse-fine and physical boundaries,
+    * as well as the interior of the boxes of dst_mapped_box_level.  The
+    * width of the ghost regions will be determined by fill_ghost_width.
+    *
+    * @param[out] fill_mapped_boxes    Output set of MappedBoxes to be filled
+    * @param[out] dst_to_fill_edges    Output NeighborhoodSet between
+    *                                  dst_mapped_box_level and
+    *                                  and fill_mapped_boxes
+    * @param[in] dst_mapped_box_level  destination level
+    * @param[in] dst_to_dst            Connector of destination to itself
+    * @param[in] dst_to_src            Connector of destination to source
+    * @param[in] src_to_dst            Connector of source to destination
+    * @param[in] fill_ghost_width      Ghost width being filled by refine
+    *                                  schedule
+    */
+   void
+   computeFillMappedBoxesAndNeighborhoodSets(
+      hier::MappedBoxSet& fill_mapped_boxes,
+      hier::NeighborhoodSet& dst_to_fill_edges,
+      const hier::MappedBoxLevel& dst_mapped_box_level,
+      const hier::Connector& dst_to_dst,
+      const hier::Connector& dst_to_src,
+      const hier::Connector& src_to_dst,
+      const hier::IntVector& fill_ghost_width);
+
+   /*!
+    * @brief Return true to indicate source patch owners cannot compute
+    * fill boxes without using communication.
+    */
+   bool
+   needsToCommunicateDestinationFillBoxes() const;
+
+   /*!
+    * @brief Tell RefineSchedule to communicate data directly from source
+    * level to destination level.
+    *
+    * RefineSchedule should attempt to fill as much of the
+    * destination level as possible from the source level at the same
+    * level of resolution for this fill pattern.
+    *
+    * @return true
+    */
+   bool
+   doesSourceLevelCommunicateToDestination() const;
+
+   /*!
+    * @brief Return the maximum number of fill boxes.
+    *
+    * @return maximum number of fill boxes.
+    */
+   int
+   getMaxFillBoxes() const;
+
+   /*!
+    * @brief Returns true because this fill pattern fills coarse fine ghost
+    * data.
+    */
+   bool
+   fillingCoarseFineGhosts() const;
+
+   /*!
+    * @brief Returns false because this fill pattern is specialized for
+    * enhanced connectivity only.
+    */
+   bool
+   fillingEnhancedConnectivityOnly() const;
+
+
+private:
+   PatchLevelBorderAndInteriorFillPattern(
+      const PatchLevelBorderAndInteriorFillPattern&);    // not implemented
+   void
+   operator = (
+      const PatchLevelBorderAndInteriorFillPattern&);    // not implemented
+
+   /*!
+    * @brief Shorthand typedef.
+    */
+   typedef hier::Connector::NeighborSet NeighborSet;
+
+   /*!
+    * @brief Maximum number of fill boxes across all destination patches.
+    */
+   int d_max_fill_boxes;
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/xfer/PatchLevelBorderAndInteriorFillPattern.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/PatchLevelBorderFillPattern.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/PatchLevelBorderFillPattern.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,109 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract fill pattern class to provide interface for stencils 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_PatchLevelBorderFillPattern_C
+#define included_xfer_PatchLevelBorderFillPattern_C
+
+#include "SAMRAI/xfer/PatchLevelBorderFillPattern.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/RealMappedBoxConstIterator.h"
+#include "SAMRAI/hier/MappedBox.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/xfer/PatchLevelBorderFillPattern.I"
+#endif
+
+namespace SAMRAI {
+namespace xfer {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default constructor                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+PatchLevelBorderFillPattern::PatchLevelBorderFillPattern():
+   d_max_fill_boxes(0)
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Destructor                                                            *
+ *									*
+ *************************************************************************
+ */
+
+PatchLevelBorderFillPattern::~PatchLevelBorderFillPattern()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * computeFillMappedBoxesAndNeighborhoodSets                             *
+ *                                                                       *
+ *************************************************************************
+ */
+void PatchLevelBorderFillPattern::computeFillMappedBoxesAndNeighborhoodSets(
+   hier::MappedBoxSet& fill_mapped_boxes,
+   hier::NeighborhoodSet& dst_to_fill_edges,
+   const hier::MappedBoxLevel& dst_mapped_box_level,
+   const hier::Connector& dst_to_dst,
+   const hier::Connector& dst_to_src,
+   const hier::Connector& src_to_dst,
+   const hier::IntVector& fill_ghost_width)
+{
+   NULL_USE(dst_to_src);
+   NULL_USE(src_to_dst);
+   TBOX_DIM_ASSERT_CHECK_ARGS2(dst_mapped_box_level, fill_ghost_width);
+
+   const hier::MappedBoxSet& dst_mapped_boxes =
+      dst_mapped_box_level.getMappedBoxes();
+
+   /*
+    * To get the level border, grow each patch box and remove
+    * the level from it.
+    */
+   hier::LocalId last_id = dst_mapped_box_level.getLastLocalId();
+   for (hier::RealMappedBoxConstIterator ni(dst_mapped_boxes);
+        ni.isValid(); ++ni) {
+      const hier::MappedBox& dst_mapped_box = *ni;
+      hier::BoxList fill_boxes(dst_mapped_box.getBox());
+      fill_boxes.getFirstItem().grow(fill_ghost_width);
+      const NeighborSet& nabrs =
+         dst_to_dst.getNeighborSet(dst_mapped_box.getLocalId());
+      for (NeighborSet::const_iterator na = nabrs.begin();
+           na != nabrs.end(); ++na) {
+         fill_boxes.removeIntersections(na->getBox());
+      }
+
+      if (!fill_boxes.isEmpty()) {
+         d_max_fill_boxes = tbox::MathUtilities<int>::Max(d_max_fill_boxes,
+               fill_boxes.size());
+         NeighborSet& fill_nabrs = dst_to_fill_edges[dst_mapped_box.getGlobalId()];
+         for (hier::BoxList::Iterator li(fill_boxes); li; li++) {
+            hier::MappedBox fill_mapped_box(*li,
+                                            ++last_id,
+                                            dst_mapped_box.getOwnerRank());
+            fill_mapped_boxes.insert(fill_mapped_boxes.end(), fill_mapped_box);
+            fill_nabrs.insert(fill_mapped_box);
+         }
+      }
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/PatchLevelBorderFillPattern.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/PatchLevelBorderFillPattern.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,47 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract fill pattern class to provide interface for stencils 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace xfer {
+
+SAMRAI_INLINE_KEYWORD
+bool PatchLevelBorderFillPattern::needsToCommunicateDestinationFillBoxes()
+const
+{
+   return true;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool PatchLevelBorderFillPattern::doesSourceLevelCommunicateToDestination()
+const
+{
+   return false;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool PatchLevelBorderFillPattern::fillingCoarseFineGhosts() const
+{
+   return true;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool PatchLevelBorderFillPattern::fillingEnhancedConnectivityOnly() const
+{
+   return false;
+}
+
+SAMRAI_INLINE_KEYWORD
+int PatchLevelBorderFillPattern::getMaxFillBoxes() const
+{
+   return d_max_fill_boxes;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/PatchLevelBorderFillPattern.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/PatchLevelBorderFillPattern.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,141 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract fill pattern class to provide interface for stencils 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_PatchLevelBorderFillPattern
+#define included_xfer_PatchLevelBorderFillPattern
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/PatchLevelFillPattern.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief PatchLevelFillPattern implementation for filling at PatchLevel
+ * boundaries.
+ *
+ * For documentation on this interface see @ref xfer::PatchLevelFillPattern
+ * 
+ * The fill boxes will consist of the ghost regions lying outside of
+ * the level interior--in other words the ghost regions at physical
+ * and coarse-fine boundaries.
+ */
+
+class PatchLevelBorderFillPattern:public PatchLevelFillPattern
+{
+public:
+   /*!
+    * @brief Default constructor
+    */
+   PatchLevelBorderFillPattern();
+
+   /*!
+    * @brief Destructor
+    */
+   virtual ~PatchLevelBorderFillPattern();
+
+   /*!
+    * @brief Compute the mapped boxes to be filled and related communication
+    * data.
+    *
+    * The computed fill_mapped_boxes will cover the ghost regions around the
+    * boxes of dst_mapped_box_level at coarse-fine and physical boundaries.
+    * The width of those ghost regions will be determined by fill_ghost_width.
+    *
+    * @param[out] fill_mapped_boxes    Output set of MappedBoxes to be filled
+    * @param[out] dst_to_fill_edges    Output NeighborhoodSet between
+    *                                  dst_mapped_box_level and
+    *                                  and fill_mapped_boxes
+    * @param[in] dst_mapped_box_level  destination level
+    * @param[in] dst_to_dst            Connector of destination to itself
+    * @param[in] dst_to_src            Connector of destination to source
+    * @param[in] src_to_dst            Connector of source to destination
+    * @param[in] fill_ghost_width      Ghost width being filled by refine
+    *                                  schedule
+    */
+   void
+   computeFillMappedBoxesAndNeighborhoodSets(
+      hier::MappedBoxSet& fill_mapped_boxes,
+      hier::NeighborhoodSet& dst_to_fill_edges,
+      const hier::MappedBoxLevel& dst_mapped_box_level,
+      const hier::Connector& dst_to_dst,
+      const hier::Connector& dst_to_src,
+      const hier::Connector& src_to_dst,
+      const hier::IntVector& fill_ghost_width);
+
+   /*!
+    * @brief Return true to indicate source patch owners cannot compute
+    * fill boxes without using communication.
+    */
+   bool
+   needsToCommunicateDestinationFillBoxes() const;
+
+   /*!
+    * @brief Tell RefineSchedule not to communicate data directly from source
+    * to destination level.
+    *
+    * RefineSchedule should not attempt to fill as much of the
+    * destination level as possible from the source level at the same
+    * level of resolution for this fill pattern.
+    *
+    * @return false
+    */
+   bool
+   doesSourceLevelCommunicateToDestination() const;
+
+   /*!
+    * @brief Return the maximum number of fill boxes.
+    *
+    * @return maximum number of fill boxes.
+    */
+   int
+   getMaxFillBoxes() const;
+
+   /*!
+    * @brief Returns true because this fill pattern fills coarse-fine ghost
+    * data.
+    */
+   bool
+   fillingCoarseFineGhosts() const;
+
+   /*!
+    * @brief Returns false because this fill pattern is specialized for
+    * enhanced connectivity only.
+    */
+   bool
+   fillingEnhancedConnectivityOnly() const;
+
+
+private:
+   PatchLevelBorderFillPattern(
+      const PatchLevelBorderFillPattern&);            // not implemented
+   void
+   operator = (
+      const PatchLevelBorderFillPattern&);            // not implemented
+
+   /*!
+    * @brief Shorthand typedef.
+    */
+   typedef hier::Connector::NeighborSet NeighborSet;
+
+   /*!
+    * @brief Maximum number of fill boxes across all destination patches.
+    */
+   int d_max_fill_boxes;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/xfer/PatchLevelBorderFillPattern.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/PatchLevelEnhancedFillPattern.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/PatchLevelEnhancedFillPattern.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract fill pattern class to provide interface for stencils 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_PatchLevelEnhancedFillPattern_C
+#define included_xfer_PatchLevelEnhancedFillPattern_C
+
+#include "SAMRAI/xfer/PatchLevelEnhancedFillPattern.h"
+#include "SAMRAI/hier/RealMappedBoxConstIterator.h"
+#include "SAMRAI/hier/MappedBox.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/xfer/PatchLevelEnhancedFillPattern.I"
+#endif
+
+namespace SAMRAI {
+namespace xfer {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default constructor                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+PatchLevelEnhancedFillPattern::PatchLevelEnhancedFillPattern():
+   d_max_fill_boxes(0)
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Destructor                                                            *
+ *									*
+ *************************************************************************
+ */
+
+PatchLevelEnhancedFillPattern::~PatchLevelEnhancedFillPattern()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * computeFillMappedBoxesAndNeighborhoodSets                             *
+ *                                                                       *
+ *************************************************************************
+ */
+void PatchLevelEnhancedFillPattern::computeFillMappedBoxesAndNeighborhoodSets(
+   hier::MappedBoxSet& fill_mapped_boxes,
+   hier::NeighborhoodSet& dst_to_fill_edges,
+   const hier::MappedBoxLevel& dst_mapped_box_level,
+   const hier::Connector& dst_to_dst,
+   const hier::Connector& dst_to_src,
+   const hier::Connector& src_to_dst,
+   const hier::IntVector& fill_ghost_width)
+{
+   NULL_USE(dst_mapped_box_level);
+   NULL_USE(dst_to_dst);
+   NULL_USE(dst_to_src);
+   NULL_USE(src_to_dst);
+   NULL_USE(fill_ghost_width);
+   NULL_USE(fill_mapped_boxes);
+   NULL_USE(dst_to_fill_edges);
+
+   TBOX_ERROR("computeFillMappedBoxesAndNeighborhoodSets() should not be called for PatchLevelEnhancedFillPattern.");
+
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/PatchLevelEnhancedFillPattern.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/PatchLevelEnhancedFillPattern.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,49 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract fill pattern class to provide interface for stencils 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace xfer {
+
+SAMRAI_INLINE_KEYWORD
+bool PatchLevelEnhancedFillPattern::needsToCommunicateDestinationFillBoxes()
+const
+{
+   return true;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool PatchLevelEnhancedFillPattern::doesSourceLevelCommunicateToDestination()
+const
+{
+   return false;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool PatchLevelEnhancedFillPattern::fillingCoarseFineGhosts() const
+{
+   return true;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool PatchLevelEnhancedFillPattern::fillingEnhancedConnectivityOnly() const
+{
+   return true;
+}
+
+SAMRAI_INLINE_KEYWORD
+int PatchLevelEnhancedFillPattern::getMaxFillBoxes() const
+{
+   TBOX_ERROR("getMaxFillBoxes() should not be called for PatchLevelEnhancedFillPattern.");
+
+   return d_max_fill_boxes;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/PatchLevelEnhancedFillPattern.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/PatchLevelEnhancedFillPattern.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,148 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Level fill pattern for enhanced connectivity 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_PatchLevelEnhancedFillPattern
+#define included_xfer_PatchLevelEnhancedFillPattern
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/PatchLevelFillPattern.h"
+#include "SAMRAI/hier/Connector.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Class PatchLevelEnhancedFillPattern is an implementation of the
+ * abstract base class PatchLevelFillPattern.
+ *
+ * This class is used by the MultiblockRefineSchedule to restrict filling to
+ * only patches in ghost regions across an ehanced connectivity block boundary.
+ * It is intended for users who wish to handle the filling of data at these
+ * singularities separately from the filling of all other data.
+ *
+ * @see xfer::MultiblockRefineSchedule
+ */
+
+class PatchLevelEnhancedFillPattern:public PatchLevelFillPattern
+{
+public:
+   /*!
+    * @brief Default constructor
+    */
+   PatchLevelEnhancedFillPattern();
+
+   /*!
+    * @brief Destructor
+    */
+   virtual ~PatchLevelEnhancedFillPattern();
+
+   /*!
+    * @brief Compute the mapped boxes representing the region that will
+    *        be filled by a MultiblockRefineSchedule.
+    *
+    * This is currently unimplemented until MappedBoxLevel is
+    * multiblock-aware.  An error will occur if this is called.
+    *
+    * @param[in] dst_mapped_box_level  destination level
+    * @param[in] dst_to_dst            Connector of destination to itself
+    * @param[in] dst_to_src            Connector of destination to source
+    * @param[in] src_to_dst            Connector of source to destination
+    * @param[in] fill_ghost_width      Ghost width being filled by refine
+    *                                  schedule
+    * @param[out] fill_mapped_boxes    Output set of MappedBoxes to be filled
+    * @param[out] dst_to_fill_edges    Output NeighborhoodSet between
+    *                                  dst_mapped_box_level and
+    *                                  and fill_mapped_boxes
+    */
+   void
+   computeFillMappedBoxesAndNeighborhoodSets(
+      hier::MappedBoxSet& fill_mapped_boxes,
+      hier::NeighborhoodSet& dst_to_fill_edges,
+      const hier::MappedBoxLevel& dst_mapped_box_level,
+      const hier::Connector& dst_to_dst,
+      const hier::Connector& dst_to_src,
+      const hier::Connector& src_to_dst,
+      const hier::IntVector& fill_ghost_width);
+
+   /*!
+    * @brief Return true because source patch owner cannot compute fill
+    * boxes across block boundaries.
+    *
+    * @return  true.
+    */
+   bool
+   needsToCommunicateDestinationFillBoxes() const;
+
+   /*!
+    * @brief Tell RefineSchedule not to communicate data directly from source
+    * to destination level.
+    *
+    * With this fill pattern, the RefineSchedule does not attempt to fill
+    * as much of the destination level as possible from the source level at
+    * the same level of resolution.  By returning 'false', this method
+    * tells the RefineSchedule to skip that step.
+    *
+    * @return false
+    */
+   bool
+   doesSourceLevelCommunicateToDestination() const;
+
+   /*!
+    * @brief Return the maximum number of fill boxes.
+    *
+    * This will not return a valid value until
+    * computeFillMappedBoxesAndNeighborhoodSets is fully implemented.  An
+    * error will occur if this method is called
+    */
+   int
+   getMaxFillBoxes() const;
+
+   /*!
+    * @brief Returns true because this fill pattern fills coarse fine ghost
+    * data.
+    */
+   bool
+   fillingCoarseFineGhosts() const;
+
+   /*!
+    * @brief Returns true because this fill pattern is specialized for
+    * enhanced connectivity only.
+    */
+   bool
+   fillingEnhancedConnectivityOnly() const;
+
+private:
+   PatchLevelEnhancedFillPattern(
+      const PatchLevelEnhancedFillPattern&);           // not implemented
+
+   void
+   operator = (
+      const PatchLevelEnhancedFillPattern&);           // not implemented
+
+   /*!
+    * @brief Shorthand typedef.
+    */
+   typedef hier::Connector::NeighborSet NeighborSet;
+
+   /*!
+    * @brief Maximum number of fill boxes across all destination patches.
+    */
+   int d_max_fill_boxes;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/xfer/PatchLevelEnhancedFillPattern.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/PatchLevelFillPattern.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/PatchLevelFillPattern.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,71 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract fill pattern class to provide interface for stencils 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_PatchLevelFillPattern_C
+#define included_xfer_PatchLevelFillPattern_C
+
+#include "SAMRAI/xfer/PatchLevelFillPattern.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default constructor                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+PatchLevelFillPattern::PatchLevelFillPattern()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Destructor                                                            *
+ *									*
+ *************************************************************************
+ */
+
+PatchLevelFillPattern::~PatchLevelFillPattern()
+{
+}
+
+/*
+ *************************************************************************
+ * Default computeDestinationFillBoxesOnSourceProc() is a no-op.
+ * A concrete implementation should only be required if
+ * needsToCommunicateDestinationFillBoxes() returns false.
+ *************************************************************************
+ */
+
+void PatchLevelFillPattern::computeDestinationFillBoxesOnSourceProc(
+   FillSet& dst_fill_boxes_on_src_proc,
+   const hier::MappedBoxLevel& dst_mapped_box_level,
+   const hier::Connector& src_to_dst,
+   const hier::IntVector& fill_ghost_width)
+{
+   NULL_USE(dst_mapped_box_level);
+   NULL_USE(src_to_dst);
+   NULL_USE(fill_ghost_width);
+   NULL_USE(dst_fill_boxes_on_src_proc);
+   if (!needsToCommunicateDestinationFillBoxes()) {
+      TBOX_ERROR(
+         "The concrete PatchLevelFillPattern::computeDestinationFillBoxesOnSourceProc:\n"
+         << "must be implemented whenever the concrete\n"
+         << "method needsToCommunicateDestinationFillBoxes() returns false.");
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/PatchLevelFillPattern.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/PatchLevelFillPattern.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,200 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract fill pattern class to provide interface for stencils 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_PatchLevelFillPattern
+#define included_xfer_PatchLevelFillPattern
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Connector.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Abstract base class for defining regions to fill on a PatchLevel.
+ * 
+ * Class PatchLevelFillPattern is an abstract base class that provides
+ * an interface used by the RefineSchedule to determine what spatial
+ * regions will be filled on a given destination level.  For example,
+ * a schedule may need to fill patch interiors only, ghost regions
+ * only, or some combination thereof.  Concrete implementations of
+ * this class will take a destination level and compute the desired
+ * boxes to be filled as well as NeighborhoodSet information that will
+ * be later used in the communications that fill those boxes.
+ *
+ * @see xfer::RefineSchedule  
+ * @see hier::NeighborhoodSet  
+ */
+
+class PatchLevelFillPattern:public tbox::DescribedClass
+{
+public:
+   typedef std::vector<hier::Box> BoxVector;
+   typedef std::map<hier::GlobalId, BoxVector> FillSet;
+
+   /*!
+    * @brief Default constructor
+    */
+   PatchLevelFillPattern();
+
+   /*!
+    * @brief Destructor
+    */
+   virtual ~PatchLevelFillPattern();
+
+   /*!
+    * @brief Compute the mapped boxes to be filled and related communication
+    * data.
+    *
+    * This pure virtual method provides an interface to give the
+    * RefineSchedule the information needed to fill particular spatial
+    * regions on the destination level.  The specific regions (such as
+    * patch interiors, ghost regions, or some combination thereof) will be
+    * specified in the concrete implementations of this class.  Implementations
+    * of this method should store the desired regions to be filled in the
+    * MappedBoxSet fill_mapped_boxes, and should compute a NeighborhoodSet
+    * describing the relationship between dst_mapped_box_level and
+    * fill_mapped_boxes.
+    *
+    * @param[out] fill_mapped_boxes    MappedBoxes to be filled
+    * @param[out] dst_to_fill_edges    NeighborhoodSet between
+    *                                  dst_mapped_box_level and
+    *                                  and fill_mapped_boxes
+    * @param[in] dst_mapped_box_level  destination level
+    * @param[in] dst_to_dst            destination to itself connector
+    * @param[in] dst_to_src            destination to source connector
+    * @param[in] src_to_dst            source to destination connector
+    * @param[in] fill_ghost_width      ghost width being filled by refine
+    *                                  schedule
+    */
+   virtual void
+   computeFillMappedBoxesAndNeighborhoodSets(
+      hier::MappedBoxSet& fill_mapped_boxes,
+      hier::NeighborhoodSet& dst_to_fill_edges,
+      const hier::MappedBoxLevel& dst_mapped_box_level,
+      const hier::Connector& dst_to_dst,
+      const hier::Connector& dst_to_src,
+      const hier::Connector& src_to_dst,
+      const hier::IntVector& fill_ghost_width) = 0;
+
+   /*!
+    * @brief Return true if source owner can compute destination boxes on its
+    * own.
+    *
+    * If the fill pattern is such that the source patch owner cannot compute 
+    * fill boxes for all of its destination neighbors using local data, then a
+    * communication is needed to acquire this information, and this method
+    * should return true.  If the source owner can compute the fill boxes
+    * for its destination neighbors using its local data, then this method
+    * should return false, which will prevent an unneeded communication step.
+    *
+    * If this method returns true,
+    * computeDestinationFillBoxesOnSourceProc() will not be called.
+    *
+    * @return  true if communication needed, false otherwise.
+    */
+   virtual bool
+   needsToCommunicateDestinationFillBoxes() const = 0;
+
+   /*!
+    * @brief Virtual method to compute the destination fill boxes.
+    *
+    * If needsToCommunicateDestinationFillBoxes() returns true, then this
+    * method will not be called and the child classes do not need an
+    * implementation.
+    *
+    * This method must be implemented if
+    * needsToCommunicateDestinationFillBoxes() returns false, as that means
+    * that the source patch owner will compute destination fill boxes using
+    * its own local data with this method.
+    *
+    * @param[out] dst_fill_boxes_on_src_proc FillSet storing the destination
+    *                                        neighbors of the source mapped
+    *                                        boxes
+    * @param[in] dst_mapped_box_level  destination level
+    * @param[in] src_to_dst                Connector of source to destination
+    * @param[in] fill_ghost_width          Ghost width being filled by refine
+    *                                      schedule
+    */
+   virtual void
+   computeDestinationFillBoxesOnSourceProc(
+      FillSet& dst_fill_boxes_on_src_proc,
+      const hier::MappedBoxLevel& dst_mapped_box_level,
+      const hier::Connector& src_to_dst,
+      const hier::IntVector& fill_ghost_width);
+
+   /*!
+    * @brief Tell RefineSchedule whether it needs to communicate data
+    * directly from source level to destination level.
+    *
+    * The return value of this method tells the RefineSchedule whether or
+    * not to create an internal schedule to communicate as much data as
+    * possible from the source level to the destination level on the same
+    * level of resolution.  If it returns false, all of the fill boxes
+    * on the destination level will be filled from a coarser level.  If
+    * true, then any parts of the fill boxes that can be filled by
+    * communicating data from the source level interior will be filled,
+    * and whatever parts of the fill boxes are left unfilled by that
+    * communication will be filled from a coarser level.
+    *
+    * Generally this method should return true for fill pattern implementations
+    * that are used to fill the full interiors of patches and false
+    * for patterns that fill only at or outside of patch boundaries.
+    *
+    * @return true if data should be communicated directly from source to
+    * destination.
+    */
+   virtual bool
+   doesSourceLevelCommunicateToDestination() const = 0;
+
+   /*!
+    * @brief Return the maximum number of fill boxes.
+    *
+    * Each destination patch has an associated set of fill boxes, and this
+    * is the maximum size of those sets across all destination patches.
+    *
+    * The maximum number returned is for the patches on the
+    * destination level provided to the most recent invocation of the
+    * computeDestinationFillBoxesOnSourceProc method.
+    *
+    * @return maximum number of fill boxes.
+    */
+   virtual int
+   getMaxFillBoxes() const = 0;
+
+   /*!
+    * @brief Return true if the fill pattern is intended to allow the filling
+    * of ghost regions at coarse-fine boundaries.
+    */
+   virtual bool
+   fillingCoarseFineGhosts() const = 0;
+
+   /*!
+    * @brief Return true if the fill pattern is specialized for filling
+    * at enhanced connectivity block boundaries only, false for all other
+    * cases. 
+    */
+   virtual bool
+   fillingEnhancedConnectivityOnly() const = 0;
+
+private:
+   PatchLevelFillPattern(
+      const PatchLevelFillPattern&);                       // not implemented
+   void
+   operator = (
+      const PatchLevelFillPattern&);                     // not implemented
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/PatchLevelFullFillPattern.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/PatchLevelFullFillPattern.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,150 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract fill pattern class to provide interface for stencils 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_PatchLevelFullFillPattern_C
+#define included_xfer_PatchLevelFullFillPattern_C
+
+#include "SAMRAI/xfer/PatchLevelFullFillPattern.h"
+#include "SAMRAI/hier/MappedBoxContainerUtils.h"
+#include "SAMRAI/hier/RealMappedBoxConstIterator.h"
+#include "SAMRAI/hier/MappedBox.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/xfer/PatchLevelFullFillPattern.I"
+#endif
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace xfer {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default constructor                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+PatchLevelFullFillPattern::PatchLevelFullFillPattern():
+   d_max_fill_boxes(0)
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Destructor                                                            *
+ *									*
+ *************************************************************************
+ */
+
+PatchLevelFullFillPattern::~PatchLevelFullFillPattern()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * computeFillMappedBoxesAndNeighborhoodSets                                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchLevelFullFillPattern::computeFillMappedBoxesAndNeighborhoodSets(
+   hier::MappedBoxSet& fill_mapped_boxes,
+   hier::NeighborhoodSet& dst_to_fill_edges,
+   const hier::MappedBoxLevel& dst_mapped_box_level,
+   const hier::Connector& dst_to_dst,
+   const hier::Connector& dst_to_src,
+   const hier::Connector& src_to_dst,
+   const hier::IntVector& fill_ghost_width)
+{
+   NULL_USE(dst_to_dst);
+   NULL_USE(dst_to_src);
+   NULL_USE(src_to_dst);
+   TBOX_DIM_ASSERT_CHECK_ARGS2(dst_mapped_box_level, fill_ghost_width);
+
+   const hier::MappedBoxSet& dst_mapped_boxes =
+      dst_mapped_box_level.getMappedBoxes();
+
+   for (hier::RealMappedBoxConstIterator ni(dst_mapped_boxes);
+        ni.isValid(); ++ni) {
+      const hier::MappedBox& dst_mapped_box = *ni;
+      hier::MappedBox fill_mapped_box(dst_mapped_box);
+      fill_mapped_box.getBox().grow(fill_ghost_width);
+      fill_mapped_boxes.insert(fill_mapped_boxes.end(), fill_mapped_box);
+      dst_to_fill_edges[dst_mapped_box.getGlobalId()].insert(fill_mapped_box);
+      TBOX_ASSERT(dst_to_fill_edges[dst_mapped_box.getGlobalId()].size() == 1);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * computeDestinationFillBoxesOnSourceProc                               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchLevelFullFillPattern::computeDestinationFillBoxesOnSourceProc(
+   FillSet& dst_fill_boxes_on_src_proc,
+   const hier::MappedBoxLevel& dst_mapped_box_level,
+   const hier::Connector& src_to_dst,
+   const hier::IntVector& fill_ghost_width)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(dst_mapped_box_level, fill_ghost_width);
+
+   /*
+    * src_to_dst initialized only when there is a src mapped_box_level.
+    * Without the src mapped_box_level, we do not need to compute
+    * dst_fill_boxes_on_src_proc.
+    *
+    * For PatchLevelFullFillPattern, the src owner can compute fill boxes
+    * for all its dst neighbors using local data.  This info is
+    * stored in dst_fill_boxes_on_src_proc.
+    */
+   NeighborSet tmp_nabrs, all_dst_nabrs;
+   hier::MappedBoxContainerUtils::getNeighborsFromNeighborhoodSet(tmp_nabrs, src_to_dst.getNeighborhoodSets());
+   hier::MappedBoxContainerUtils::unshiftPeriodicImageMappedBoxes(
+      all_dst_nabrs,
+      tmp_nabrs,
+      dst_mapped_box_level.getRefinementRatio());
+   tmp_nabrs.clear();
+   for (NeighborSet::const_iterator na = all_dst_nabrs.begin();
+        na != all_dst_nabrs.end(); ++na) {
+      BoxVector& fill_boxes = dst_fill_boxes_on_src_proc[na->getGlobalId()];
+      hier::Box fill_box = na->getBox();
+      fill_box.grow(fill_ghost_width);
+      fill_boxes.push_back(fill_box);
+      d_max_fill_boxes = tbox::MathUtilities<int>::Max(d_max_fill_boxes,
+            static_cast<int>(fill_boxes.size()));
+   }
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/PatchLevelFullFillPattern.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/PatchLevelFullFillPattern.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,45 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract fill pattern class to provide interface for stencils 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace xfer {
+
+SAMRAI_INLINE_KEYWORD
+bool PatchLevelFullFillPattern::needsToCommunicateDestinationFillBoxes() const
+{
+   return false;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool PatchLevelFullFillPattern::doesSourceLevelCommunicateToDestination() const
+{
+   return true;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool PatchLevelFullFillPattern::fillingCoarseFineGhosts() const
+{
+   return true;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool PatchLevelFullFillPattern::fillingEnhancedConnectivityOnly() const
+{
+   return false;
+}
+
+SAMRAI_INLINE_KEYWORD
+int PatchLevelFullFillPattern::getMaxFillBoxes() const
+{
+   return d_max_fill_boxes;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/PatchLevelFullFillPattern.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/PatchLevelFullFillPattern.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,148 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract fill pattern class to provide interface for stencils 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_PatchLevelFullFillPattern
+#define included_xfer_PatchLevelFullFillPattern
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/PatchLevelFillPattern.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief PatchLevelFullFillPattern is a PatchLevelFillPattern that
+ * fills the entire region the destination level, both interior and
+ * ghost.
+ *
+ * For documentation on this interface see @ref xfer::PatchLevelFillPattern
+ * 
+ * The fill boxes for this "All" PatchLevelFillPattern will consist of
+ * the entire region of the destination level that can be filled, both
+ * interior and ghost regions.
+ *
+ * If a RefineSchedule is created using an
+ * RefineAlgorithm::createSchedule which takes no
+ * PatchLevelFillPattern argument, this class will be used as the
+ * default PatchLevelFillPattern.
+ * 
+ * @see xfer::RefineAlgorithm
+ * @see xfer::RefineSchedule 
+ */
+
+class PatchLevelFullFillPattern:public PatchLevelFillPattern
+{
+public:
+   /*!
+    * @brief Default constructor
+    */
+   PatchLevelFullFillPattern();
+
+   /*!
+    * @brief Destructor
+    */
+   virtual ~PatchLevelFullFillPattern();
+
+   /*!
+    * @copybrief PatchLevelFillPattern::computeFillMappedBoxesAndNeighborhoodSets()
+    *
+    * The computed fill_mapped_boxes for this fill pattern will be the
+    * boxes of dst_mapped_box_level grown by the fill_ghost_width.
+    *
+    * @copydetails PatchLevelFillPattern::computeFillMappedBoxesAndNeighborhoodSets()
+    */
+   void
+   computeFillMappedBoxesAndNeighborhoodSets(
+      hier::MappedBoxSet& fill_mapped_boxes,
+      hier::NeighborhoodSet& dst_to_fill_edges,
+      const hier::MappedBoxLevel& dst_mapped_box_level,
+      const hier::Connector& dst_to_dst,
+      const hier::Connector& dst_to_src,
+      const hier::Connector& src_to_dst,
+      const hier::IntVector& fill_ghost_width);
+
+   /*!
+    * @copybrief PatchLevelFillPattern::needsToCommunicateDestinationFillBoxes()
+    *
+    * For this fill pattern, the source owner can compute fill boxes for
+    * all of its destination neighbors using local data, so this method
+    * returns false, allowing a communication step to be skipped.
+    *
+    * @copydetails PatchLevelFillPattern::needsToCommunicateDestinationFillBoxes()
+    */
+   bool
+   needsToCommunicateDestinationFillBoxes() const;
+
+   /*!
+    * @copydoc PatchLevelFillPattern::computeDestinationFillBoxesOnSourceProc()
+    */
+   void
+   computeDestinationFillBoxesOnSourceProc(
+      FillSet& dst_fill_boxes_on_src_proc,
+      const hier::MappedBoxLevel& dst_mapped_box_level,
+      const hier::Connector& src_to_dst,
+      const hier::IntVector& fill_ghost_width);
+
+   /*!
+    * @copybrief PatchLevelFillPattern::doesSourceLevelCommunicateToDestination()
+    *
+    * RefineSchedule should attempt to fill the destination level from
+    * the source level on the same resolution to the extent possible.
+    *
+    * @copydetails PatchLevelFillPattern::doesSourceLevelCommunicateToDestination()
+    */
+   bool
+   doesSourceLevelCommunicateToDestination() const;
+
+   /*!
+    * @copydoc PatchLevelFillPattern::getMaxFillBoxes()
+    */
+   int
+   getMaxFillBoxes() const;
+
+   /*!
+    * @copydoc PatchLevelFillPattern::fillingCoarseFineGhosts()
+    */
+   bool
+   fillingCoarseFineGhosts() const;
+
+   /*!
+    * @copydoc PatchLevelFillPattern::fillingEnhancedConnectivityOnly()
+    */
+   bool
+   fillingEnhancedConnectivityOnly() const;
+
+
+private:
+   PatchLevelFullFillPattern(
+      const PatchLevelFullFillPattern&);             // not implemented
+   void
+   operator = (
+      const PatchLevelFullFillPattern&);             // not implemented
+
+   /*!
+    * @brief Shorthand typedef.
+    */
+   typedef hier::Connector::NeighborSet NeighborSet;
+
+   /*!
+    * @brief Maximum number of fill boxes across all destination patches.
+    */
+   int d_max_fill_boxes;
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/xfer/PatchLevelFullFillPattern.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/PatchLevelInteriorFillPattern.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/PatchLevelInteriorFillPattern.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,152 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract fill pattern class to provide interface for stencils 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_PatchLevelInteriorFillPattern_C
+#define included_xfer_PatchLevelInteriorFillPattern_C
+
+#include "SAMRAI/xfer/PatchLevelInteriorFillPattern.h"
+#include "SAMRAI/hier/MappedBoxContainerUtils.h"
+#include "SAMRAI/hier/MappedBox.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/xfer/PatchLevelInteriorFillPattern.I"
+#endif
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace xfer {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default constructor                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+PatchLevelInteriorFillPattern::PatchLevelInteriorFillPattern():
+   d_max_fill_boxes(0)
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Destructor                                                            *
+ *									*
+ *************************************************************************
+ */
+
+PatchLevelInteriorFillPattern::~PatchLevelInteriorFillPattern()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * computeFillMappedBoxesAndNeighborhoodSets                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchLevelInteriorFillPattern::computeFillMappedBoxesAndNeighborhoodSets(
+   hier::MappedBoxSet& fill_mapped_boxes,
+   hier::NeighborhoodSet& dst_to_fill_edges,
+   const hier::MappedBoxLevel& dst_mapped_box_level,
+   const hier::Connector& dst_to_dst,
+   const hier::Connector& dst_to_src,
+   const hier::Connector& src_to_dst,
+   const hier::IntVector& fill_ghost_width)
+{
+   NULL_USE(dst_to_dst);
+   NULL_USE(dst_to_src);
+   NULL_USE(src_to_dst);
+   NULL_USE(fill_ghost_width);
+   TBOX_DIM_ASSERT_CHECK_ARGS2(dst_mapped_box_level, fill_ghost_width);
+
+   const hier::MappedBoxSet& dst_mapped_boxes =
+      dst_mapped_box_level.getMappedBoxes();
+
+   /*
+    * Fill just the interior.  Disregard gcw.
+    */
+   for (hier::MappedBoxSet::const_iterator ni = dst_mapped_boxes.begin();
+        ni != dst_mapped_boxes.end(); ++ni) {
+      const hier::GlobalId& gid = ni->getGlobalId();
+      const hier::MappedBox& dst_mapped_box =
+         *dst_mapped_box_level.getMappedBox(gid);
+      fill_mapped_boxes.insert(fill_mapped_boxes.end(), dst_mapped_box);
+      dst_to_fill_edges[gid].insert(dst_mapped_box);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * computeDestinationFillBoxesOnSourceProc                               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchLevelInteriorFillPattern::computeDestinationFillBoxesOnSourceProc(
+   FillSet& dst_fill_boxes_on_src_proc,
+   const hier::MappedBoxLevel& dst_mapped_box_level,
+   const hier::Connector& src_to_dst,
+   const hier::IntVector& fill_ghost_width)
+{
+   NULL_USE(fill_ghost_width);
+   TBOX_DIM_ASSERT_CHECK_ARGS2(dst_mapped_box_level, fill_ghost_width);
+
+   /*
+    * src_to_dst initialized only when there is a src mapped_box_level.
+    * Without the src mapped_box_level, we do not need to compute
+    * dst_fill_boxes_on_src_proc.
+    *
+    * For PatchLevelInteriorFillPattern, the src owner can compute fill
+    * boxes for all its dst neighbors using local data.  This info is
+    * stored in dst_fill_boxes_on_src_proc.
+    */
+   NeighborSet tmp_nabrs, all_dst_nabrs;
+   hier::MappedBoxContainerUtils::getNeighborsFromNeighborhoodSet(tmp_nabrs, src_to_dst.getNeighborhoodSets());
+   hier::MappedBoxContainerUtils::unshiftPeriodicImageMappedBoxes(
+      all_dst_nabrs,
+      tmp_nabrs,
+      dst_mapped_box_level.getRefinementRatio());
+   tmp_nabrs.clear();
+   for (NeighborSet::const_iterator na = all_dst_nabrs.begin();
+        na != all_dst_nabrs.end(); ++na) {
+      BoxVector& fill_boxes = dst_fill_boxes_on_src_proc[na->getGlobalId()];
+      hier::Box fill_box = na->getBox();
+      fill_boxes.push_back(fill_box);
+      d_max_fill_boxes = tbox::MathUtilities<int>::Max(d_max_fill_boxes,
+            static_cast<int>(fill_boxes.size()));
+   }
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/PatchLevelInteriorFillPattern.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/PatchLevelInteriorFillPattern.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,47 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract fill pattern class to provide interface for stencils 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace xfer {
+
+SAMRAI_INLINE_KEYWORD
+bool PatchLevelInteriorFillPattern::needsToCommunicateDestinationFillBoxes()
+const
+{
+   return false;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool PatchLevelInteriorFillPattern::doesSourceLevelCommunicateToDestination()
+const
+{
+   return true;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool PatchLevelInteriorFillPattern::fillingCoarseFineGhosts() const
+{
+   return false;
+}
+
+SAMRAI_INLINE_KEYWORD
+bool PatchLevelInteriorFillPattern::fillingEnhancedConnectivityOnly() const
+{
+   return false;
+}
+
+SAMRAI_INLINE_KEYWORD
+int PatchLevelInteriorFillPattern::getMaxFillBoxes() const
+{
+   return d_max_fill_boxes;
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/PatchLevelInteriorFillPattern.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/PatchLevelInteriorFillPattern.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,163 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   fill pattern class for filling interiors only 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_PatchLevelInteriorFillPattern
+#define included_xfer_PatchLevelInteriorFillPattern
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/PatchLevelFillPattern.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief PatchLevelFillPattern implementation for patch interior filling.
+ *
+ * For documentation on this interface see @ref xfer::PatchLevelFillPattern
+ *
+ * Those fill boxes for this PatchLevelFillPattern will consist of the
+ * patch interiors on the destination level only.
+ *
+ * @see xfer::RefineAlgorithm
+ * @see xfer::RefineSchedule 
+ */
+
+class PatchLevelInteriorFillPattern:public PatchLevelFillPattern
+{
+public:
+   /*!
+    * @brief Default constructor
+    */
+   PatchLevelInteriorFillPattern();
+
+   /*!
+    * @brief Destructor
+    */
+   virtual ~PatchLevelInteriorFillPattern();
+
+   /*!
+    * @brief Compute the mapped boxes to be filled and related communication
+    * data.
+    *
+    * The computed fill_mapped_boxes will be the boxes of dst_mapped_box_level,
+    * the "interior" of the destination level.
+    *
+    * @param[out] fill_mapped_boxes    Output set of MappedBoxes to be filled
+    * @param[out] dst_to_fill_edges    Output NeighborhoodSet between
+    *                                  dst_mapped_box_level and
+    *                                  and fill_mapped_boxes
+    * @param[in] dst_mapped_box_level  destination level
+    * @param[in] dst_to_dst            Connector of destination to itself
+    * @param[in] dst_to_src            Connector of destination to source
+    * @param[in] src_to_dst            Connector of source to destination
+    * @param[in] fill_ghost_width      Ghost width being filled by refine
+    *                                  schedule
+    */
+   void
+   computeFillMappedBoxesAndNeighborhoodSets(
+      hier::MappedBoxSet& fill_mapped_boxes,
+      hier::NeighborhoodSet& dst_to_fill_edges,
+      const hier::MappedBoxLevel& dst_mapped_box_level,
+      const hier::Connector& dst_to_dst,
+      const hier::Connector& dst_to_src,
+      const hier::Connector& src_to_dst,
+      const hier::IntVector& fill_ghost_width);
+
+   /*!
+    * @brief Return false because source patch owner can compute destination
+    * fill boxes.
+    *
+    * For this fill pattern, the source owner can compute fill boxes for
+    * all of its destination neighbors using local data, so this method
+    * returns false, allowing a communication step to be skipped.
+    *
+    * @return  false.
+    */
+   bool
+   needsToCommunicateDestinationFillBoxes() const;
+
+   /*!
+    * @brief Compute the destination fill boxes.
+    *
+    * @param[in] dst_mapped_box_level  Destination level
+    * @param[in] src_to_dst            Connector of source to destination
+    * @param[in] fill_ghost_width      Ghost width filled by refine schedule
+    * @param[out] dst_fill_boxes_on_src_proc FillSet storing the destination
+    *                                        neighbors of the source mapped
+    *                                        boxes
+    */
+   void
+   computeDestinationFillBoxesOnSourceProc(
+      FillSet& dst_fill_boxes_on_src_proc,
+      const hier::MappedBoxLevel& dst_mapped_box_level,
+      const hier::Connector& src_to_dst,
+      const hier::IntVector& fill_ghost_width);
+
+   /*!
+    * @brief Tell RefineSchedule to communicate data directly from source
+    * level to destination level.
+    *
+    * RefineSchedule should attempt to fill the destination level from
+    * the source level on the same resolution to the extent possible.
+    *
+    * @return true
+    */
+   bool
+   doesSourceLevelCommunicateToDestination() const;
+
+   /*!
+    * @brief Return the maximum number of fill boxes.
+    *
+    * @return maximum number of fill boxes.
+    */
+   int
+   getMaxFillBoxes() const;
+
+   /*!
+    * @brief Returns false because this fill pattern fills only interior data.
+    */
+   bool
+   fillingCoarseFineGhosts() const;
+
+   /*!
+    * @brief Returns false because this fill pattern is specialized for
+    * enhanced connectivity only.
+    */
+   bool
+   fillingEnhancedConnectivityOnly() const;
+
+
+private:
+   PatchLevelInteriorFillPattern(
+      const PatchLevelInteriorFillPattern&);         // not implemented
+   void
+   operator = (
+      const PatchLevelInteriorFillPattern&);        // not implemented
+
+   /*!
+    * @brief Shorthand typedef.
+    */
+   typedef hier::Connector::NeighborSet NeighborSet;
+
+   /*!
+    * @brief Maximum number of fill boxes across all destination patches.
+    */
+   int d_max_fill_boxes;
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/xfer/PatchLevelInteriorFillPattern.I"
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/RefineAlgorithm.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/RefineAlgorithm.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,673 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Refine algorithm for data transfer between AMR levels 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_RefineAlgorithm_C
+#define included_xfer_RefineAlgorithm_C
+
+#include "SAMRAI/xfer/RefineAlgorithm.h"
+
+#include "SAMRAI/xfer/BoxGeometryVariableFillPattern.h"
+#include "SAMRAI/xfer/PatchLevelFullFillPattern.h"
+#include "SAMRAI/xfer/StandardRefineTransactionFactory.h"
+#include "SAMRAI/hier/OverlapConnectorAlgorithm.h"
+#include "SAMRAI/hier/PatchDataFactory.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default constructor creates a new RefineClasses object.         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+RefineAlgorithm::RefineAlgorithm(
+   const tbox::Dimension& dim):
+   d_dim(dim),
+   d_refine_classes(new xfer::RefineClasses()),
+   d_schedule_created(false)
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * The destructor implicitly deletes the list storage associated with	*
+ * the refine algorithm.							*
+ *									*
+ *************************************************************************
+ */
+
+RefineAlgorithm::~RefineAlgorithm()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Register a refine operation that will not require time interpolation.	*
+ *									*
+ *************************************************************************
+ */
+
+void RefineAlgorithm::registerRefine(
+   const int dst,
+   const int src,
+   const int scratch,
+   tbox::Pointer<xfer::RefineOperator> oprefine,
+   tbox::Pointer<VariableFillPattern> var_fill_pattern)
+{
+#ifdef DEBUG_CHECK_DIM_ASSERTIONS
+   if (!oprefine.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *oprefine);
+   }
+#endif
+
+   if (d_schedule_created) {
+      TBOX_ERROR("RefineAlgorithm::registerRefine error..."
+         << "\nCannot call registerRefine with a RefineAlgorithm"
+         << "\nobject that has already been used to create a schedule."
+         << std::endl);
+   }
+
+   xfer::RefineClasses::Data data;
+
+   data.d_dst = dst;
+   data.d_src = src;
+   data.d_src_told = -1;
+   data.d_src_tnew = -1;
+   data.d_scratch = scratch;
+   data.d_fine_bdry_reps_var = hier::VariableDatabase::getDatabase()->
+      getPatchDescriptor()->getPatchDataFactory(dst)->
+      fineBoundaryRepresentsVariable();
+   data.d_time_interpolate = false;
+   data.d_oprefine = oprefine;
+   data.d_optime = NULL;
+   data.d_tag = -1;
+   if (!(var_fill_pattern.isNull())) {
+      data.d_var_fill_pattern = var_fill_pattern;
+   } else {
+      data.d_var_fill_pattern = new BoxGeometryVariableFillPattern();
+   }
+
+   d_refine_classes->insertEquivalenceClassItem(data);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Register a refine operation that will require time interpolation.	*
+ *									*
+ *************************************************************************
+ */
+
+void RefineAlgorithm::registerRefine(
+   const int dst,
+   const int src,
+   const int src_told,
+   const int src_tnew,
+   const int scratch,
+   tbox::Pointer<xfer::RefineOperator> oprefine,
+   tbox::Pointer<xfer::TimeInterpolateOperator> optime,
+   tbox::Pointer<VariableFillPattern> var_fill_pattern)
+{
+   TBOX_ASSERT(!optime.isNull());
+
+   if (d_schedule_created) {
+      TBOX_ERROR("RefineAlgorithm::registerRefine error..."
+         << "\nCannot call registerRefine with a RefineAlgorithm object"
+         << "\nthat has already been used to create a schedule."
+         << std::endl);
+   }
+
+   xfer::RefineClasses::Data data;
+
+   data.d_dst = dst;
+   data.d_src = src;
+   data.d_src_told = src_told;
+   data.d_src_tnew = src_tnew;
+   data.d_scratch = scratch;
+   data.d_fine_bdry_reps_var = hier::VariableDatabase::getDatabase()->
+      getPatchDescriptor()->getPatchDataFactory(dst)->
+      fineBoundaryRepresentsVariable();
+   data.d_time_interpolate = true;
+   data.d_oprefine = oprefine;
+   data.d_optime = optime;
+   data.d_tag = -1;
+   if (!(var_fill_pattern.isNull())) {
+      data.d_var_fill_pattern = var_fill_pattern;
+   } else {
+      data.d_var_fill_pattern = new BoxGeometryVariableFillPattern();
+   }
+
+   d_refine_classes->insertEquivalenceClassItem(data);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Create a communication schedule that will copy data from the          *
+ * interiors of the specified level into the ghost cells and             *
+ * interiors of the same level.                                          *
+ *									*
+ *************************************************************************
+ */
+
+tbox::Pointer<xfer::RefineSchedule>
+RefineAlgorithm::createSchedule(
+   tbox::Pointer<hier::PatchLevel> level,
+   xfer::RefinePatchStrategy* patch_strategy,
+   tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory)
+{
+   TBOX_ASSERT(!level.isNull());
+#ifdef DEBUG_CHECK_DIM_ASSERTIONS
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *level);
+   if (patch_strategy) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *patch_strategy);
+   }
+#endif
+
+   d_schedule_created = true;
+
+   tbox::Pointer<xfer::RefineTransactionFactory> trans_factory(
+      transaction_factory);
+
+   if (trans_factory.isNull()) {
+      trans_factory = new xfer::StandardRefineTransactionFactory;
+   }
+
+   tbox::Pointer<PatchLevelFullFillPattern> fill_pattern(
+      new PatchLevelFullFillPattern());
+
+   return tbox::Pointer<xfer::RefineSchedule>(new xfer::RefineSchedule(
+                                                 fill_pattern,
+                                                 level,
+                                                 level,
+                                                 d_refine_classes,
+                                                 trans_factory,
+                                                 patch_strategy));
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Create a communication schedule that will copy data from the          *
+ * interiors of the specified level into the ghost cells and             *
+ * interiors of the same level.                                          *
+ *									*
+ *************************************************************************
+ */
+
+tbox::Pointer<xfer::RefineSchedule>
+RefineAlgorithm::createSchedule(
+   tbox::Pointer<PatchLevelFillPattern> fill_pattern,
+   tbox::Pointer<hier::PatchLevel> level,
+   xfer::RefinePatchStrategy* patch_strategy,
+   tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory)
+{
+   TBOX_ASSERT(!level.isNull());
+#ifdef DEBUG_CHECK_DIM_ASSERTIONS
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *level);
+   if (patch_strategy) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *patch_strategy);
+   }
+#endif
+
+   d_schedule_created = true;
+
+   tbox::Pointer<xfer::RefineTransactionFactory> trans_factory =
+      transaction_factory;
+
+   if (trans_factory.isNull()) {
+      trans_factory = new xfer::StandardRefineTransactionFactory;
+   }
+
+   return tbox::Pointer<xfer::RefineSchedule>(new xfer::RefineSchedule(
+                                                 fill_pattern,
+                                                 level,
+                                                 level,
+                                                 d_refine_classes,
+                                                 trans_factory,
+                                                 patch_strategy));
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Create a communication schedule that will copy data from the          *
+ * interiors of the source level into the ghost cell and interiors       *
+ * of the destination level.						*
+ *									*
+ *************************************************************************
+ */
+
+tbox::Pointer<xfer::RefineSchedule>
+RefineAlgorithm::createSchedule(
+   tbox::Pointer<hier::PatchLevel> dst_level,
+   tbox::Pointer<hier::PatchLevel> src_level,
+   xfer::RefinePatchStrategy* patch_strategy,
+   bool use_time_refinement,
+   tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory)
+{
+   // TBOX_ERROR("Untried method!  I think this method should work, but it's never been excercised.  When code crashes here, remove this line and rerun.  If problem continues, it could well be due to excercising this code.  --BTNG");
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!dst_level.isNull());
+   TBOX_ASSERT(!src_level.isNull());
+   hier::OverlapConnectorAlgorithm oca;
+#endif
+#ifdef DEBUG_CHECK_DIM_ASSERTIONS
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*this, *dst_level, *src_level);
+   if (patch_strategy) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *patch_strategy);
+   }
+#endif
+
+   d_schedule_created = true;
+
+   tbox::Pointer<xfer::RefineTransactionFactory> trans_factory =
+      transaction_factory;
+
+   if (trans_factory.isNull()) {
+      trans_factory = new xfer::StandardRefineTransactionFactory;
+   }
+
+   tbox::Pointer<PatchLevelFullFillPattern> fill_pattern(
+      new PatchLevelFullFillPattern());
+
+   return tbox::Pointer<xfer::RefineSchedule>(new xfer::RefineSchedule(
+                                                 fill_pattern,
+                                                 dst_level,
+                                                 src_level,
+                                                 d_refine_classes,
+                                                 trans_factory,
+                                                 patch_strategy,
+                                                 use_time_refinement));
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Create a communication schedule that will copy data from the          *
+ * interiors of the source level into the ghost cell and interiors       *
+ * of the destination level.						*
+ *									*
+ *************************************************************************
+ */
+
+tbox::Pointer<xfer::RefineSchedule>
+RefineAlgorithm::createSchedule(
+   tbox::Pointer<PatchLevelFillPattern> fill_pattern,
+   tbox::Pointer<hier::PatchLevel> dst_level,
+   tbox::Pointer<hier::PatchLevel> src_level,
+   xfer::RefinePatchStrategy* patch_strategy,
+   bool use_time_refinement,
+   tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!dst_level.isNull());
+   TBOX_ASSERT(!src_level.isNull());
+#endif
+#ifdef DEBUG_CHECK_DIM_ASSERTIONS
+   TBOX_DIM_ASSERT_CHECK_ARGS3(*this, *dst_level, *src_level);
+   if (patch_strategy) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *patch_strategy);
+   }
+#endif
+
+   d_schedule_created = true;
+
+   tbox::Pointer<xfer::RefineTransactionFactory> trans_factory =
+      transaction_factory;
+
+   if (trans_factory.isNull()) {
+      trans_factory = new xfer::StandardRefineTransactionFactory;
+   }
+
+   return tbox::Pointer<xfer::RefineSchedule>(new xfer::RefineSchedule(
+                                                 fill_pattern,
+                                                 dst_level,
+                                                 src_level,
+                                                 d_refine_classes,
+                                                 trans_factory,
+                                                 patch_strategy,
+                                                 use_time_refinement));
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Create a communication schedule that copies data from the interiors	*
+ * of the same level and coarser levels into the interior and boundary	*
+ * cells of the given level.						*
+ *									*
+ *************************************************************************
+ */
+
+tbox::Pointer<xfer::RefineSchedule>
+RefineAlgorithm::createSchedule(
+   tbox::Pointer<hier::PatchLevel> level,
+   const int next_coarser_level,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   xfer::RefinePatchStrategy* patch_strategy,
+   bool use_time_refinement,
+   tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory)
+{
+
+   // Do we all agree on the destination mapped_box_level?
+   TBOX_ASSERT(!level.isNull());
+   TBOX_ASSERT((next_coarser_level == -1) || !hierarchy.isNull());
+#ifdef DEBUG_CHECK_DIM_ASSERTIONS
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *level);
+   if (!hierarchy.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *hierarchy);
+   }
+   if (patch_strategy) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *patch_strategy);
+   }
+#endif
+
+   d_schedule_created = true;
+
+   tbox::Pointer<xfer::RefineTransactionFactory> trans_factory =
+      transaction_factory;
+
+   if (trans_factory.isNull()) {
+      trans_factory = new xfer::StandardRefineTransactionFactory;
+   }
+
+   tbox::Pointer<PatchLevelFullFillPattern> fill_pattern(
+      new PatchLevelFullFillPattern());
+
+   return tbox::Pointer<xfer::RefineSchedule>(new xfer::RefineSchedule(
+                                                 fill_pattern,
+                                                 level,
+                                                 level,
+                                                 next_coarser_level,
+                                                 hierarchy,
+                                                 d_refine_classes,
+                                                 trans_factory,
+                                                 patch_strategy,
+                                                 use_time_refinement));
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Create a communication schedule that copies data from the interiors	*
+ * of the same level and coarser levels into the interior and boundary	*
+ * cells of the given level.						*
+ *									*
+ *************************************************************************
+ */
+
+tbox::Pointer<xfer::RefineSchedule>
+RefineAlgorithm::createSchedule(
+   tbox::Pointer<PatchLevelFillPattern> fill_pattern,
+   tbox::Pointer<hier::PatchLevel> level,
+   const int next_coarser_level,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   xfer::RefinePatchStrategy* patch_strategy,
+   bool use_time_refinement,
+   tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory)
+{
+
+   // Do we all agree on the destination mapped_box_level?
+   TBOX_ASSERT(!level.isNull());
+   TBOX_ASSERT((next_coarser_level == -1) || !hierarchy.isNull());
+#ifdef DEBUG_CHECK_DIM_ASSERTIONS
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *level);
+   if (!hierarchy.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *hierarchy);
+   }
+   if (patch_strategy) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *patch_strategy);
+   }
+#endif
+
+   d_schedule_created = true;
+
+   tbox::Pointer<xfer::RefineTransactionFactory> trans_factory =
+      transaction_factory;
+
+   if (trans_factory.isNull()) {
+      trans_factory = new xfer::StandardRefineTransactionFactory;
+   }
+
+   return tbox::Pointer<xfer::RefineSchedule>(new xfer::RefineSchedule(
+                                                 fill_pattern,
+                                                 level,
+                                                 level,
+                                                 next_coarser_level,
+                                                 hierarchy,
+                                                 d_refine_classes,
+                                                 trans_factory,
+                                                 patch_strategy,
+                                                 use_time_refinement));
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Create a communication schedule that copies data from the interiors	*
+ * of the old level and coarser levels into the ghost cells and interior	*
+ * cells of the given new level.						*
+ *									*
+ *************************************************************************
+ */
+
+tbox::Pointer<xfer::RefineSchedule>
+RefineAlgorithm::createSchedule(
+   tbox::Pointer<hier::PatchLevel> dst_level,
+   tbox::Pointer<hier::PatchLevel> src_level,
+   const int next_coarser_level,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   xfer::RefinePatchStrategy* patch_strategy,
+   bool use_time_refinement,
+   tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory)
+{
+   (void)use_time_refinement;
+   TBOX_ASSERT(!dst_level.isNull());
+   TBOX_ASSERT((next_coarser_level == -1) || !hierarchy.isNull());
+#ifdef DEBUG_CHECK_DIM_ASSERTIONS
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *dst_level);
+   if (!src_level.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *src_level);
+   }
+   if (!hierarchy.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *hierarchy);
+   }
+   if (patch_strategy) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *patch_strategy);
+   }
+#endif
+
+   // Do we all agree on the destination mapped_box_level?
+   if (!src_level.isNull()) {
+      if (next_coarser_level >= 0) {
+      }
+   }
+
+   d_schedule_created = true;
+
+   tbox::Pointer<xfer::RefineTransactionFactory> trans_factory =
+      transaction_factory;
+
+   if (trans_factory.isNull()) {
+      trans_factory = new xfer::StandardRefineTransactionFactory;
+   }
+
+   tbox::Pointer<PatchLevelFullFillPattern> fill_pattern(
+      new PatchLevelFullFillPattern());
+
+   return tbox::Pointer<xfer::RefineSchedule>(new xfer::RefineSchedule(
+                                                 fill_pattern,
+                                                 dst_level,
+                                                 src_level,
+                                                 next_coarser_level,
+                                                 hierarchy,
+                                                 d_refine_classes,
+                                                 trans_factory,
+                                                 patch_strategy,
+                                                 false));
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Create a communication schedule that copies data from the interiors	*
+ * of the old level and coarser levels into the ghost cells and interior	*
+ * cells of the given new level.						*
+ *									*
+ *************************************************************************
+ */
+
+tbox::Pointer<xfer::RefineSchedule>
+RefineAlgorithm::createSchedule(
+   tbox::Pointer<PatchLevelFillPattern> fill_pattern,
+   tbox::Pointer<hier::PatchLevel> dst_level,
+   tbox::Pointer<hier::PatchLevel> src_level,
+   const int next_coarser_level,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   xfer::RefinePatchStrategy* patch_strategy,
+   bool use_time_refinement,
+   tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory)
+{
+   (void)use_time_refinement;
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!dst_level.isNull());
+   TBOX_ASSERT((next_coarser_level == -1) || !hierarchy.isNull());
+#endif
+#ifdef DEBUG_CHECK_DIM_ASSERTIONS
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *dst_level);
+   if (!src_level.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *src_level);
+   }
+   if (!hierarchy.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *hierarchy);
+   }
+   if (patch_strategy) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*this, *patch_strategy);
+   }
+#endif
+
+   // Do we all agree on the destination mapped_box_level?
+   if (!src_level.isNull()) {
+      if (next_coarser_level >= 0) {
+      }
+   }
+
+   d_schedule_created = true;
+
+   tbox::Pointer<xfer::RefineTransactionFactory> trans_factory =
+      transaction_factory;
+
+   if (trans_factory.isNull()) {
+      trans_factory = new xfer::StandardRefineTransactionFactory;
+   }
+
+   return tbox::Pointer<xfer::RefineSchedule>(new xfer::RefineSchedule(
+                                                 fill_pattern,
+                                                 dst_level,
+                                                 src_level,
+                                                 next_coarser_level,
+                                                 hierarchy,
+                                                 d_refine_classes,
+                                                 trans_factory,
+                                                 patch_strategy,
+                                                 false));
+}
+
+/*
+ **************************************************************************
+ *                                                                        *
+ * Reconfigure refine schedule to perform operations in this algorithm.   *
+ *                                                                        *
+ **************************************************************************
+ */
+
+bool RefineAlgorithm::checkConsistency(
+   tbox::Pointer<xfer::RefineSchedule> schedule) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!schedule.isNull());
+#endif
+   return d_refine_classes->
+          checkConsistency(schedule->getEquivalenceClasses());
+}
+
+void RefineAlgorithm::resetSchedule(
+   tbox::Pointer<xfer::RefineSchedule> schedule) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!schedule.isNull());
+#endif
+   if (d_refine_classes->
+       checkConsistency(schedule->getEquivalenceClasses())) {
+      schedule->reset(d_refine_classes);
+   } else {
+      TBOX_ERROR("RefineAlgorithm::resetSchedule error..."
+         << "\n Items in xfer::RefineClasses object passed to reset"
+         << "\n routine are inconsistent with those in existing schedule."
+         << std::endl);
+   }
+}
+
+const tbox::Pointer<xfer::RefineClasses>&
+RefineAlgorithm::getEquivalenceClasses() const
+{
+   return d_refine_classes;
+}
+
+void RefineAlgorithm::setEquivalenceClasses(
+   const tbox::Pointer<xfer::RefineClasses> refine_classes)
+{
+   d_refine_classes.setNull();
+   d_refine_classes = refine_classes;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print refine algorithm data to the specified output stream.           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void RefineAlgorithm::printClassData(
+   std::ostream& stream) const
+{
+   stream << "RefineAlgorithm::printClassData()" << std::endl;
+   stream << "----------------------------------------" << std::endl;
+   d_refine_classes->printClassData(stream);
+}
+
+/*
+ *************************************************************************
+ *
+ * Return the dimension
+ *
+ *************************************************************************
+ */
+
+const tbox::Dimension& RefineAlgorithm::getDim() const
+{
+   return d_dim;
+}
+
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/RefineAlgorithm.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/RefineAlgorithm.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,649 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Refine algorithm for data transfer between AMR levels 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_RefineAlgorithm
+#define included_xfer_RefineAlgorithm
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/BoxGeometryVariableFillPattern.h"
+#include "SAMRAI/xfer/RefineClasses.h"
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/xfer/RefinePatchStrategy.h"
+#include "SAMRAI/xfer/RefineSchedule.h"
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+#include "SAMRAI/xfer/VariableFillPattern.h"
+#include "SAMRAI/hier/Connector.h"
+#include "SAMRAI/hier/MappedBox.h"
+#include "SAMRAI/hier/MappedBoxLevel.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Class RefineAlgorithm encapsulates the AMR communication
+ * pattern to refine data to, copy data to, or fill physical boundary data on
+ * any destination patch level.
+ *
+ * The basic procedure for moving data follows three steps:
+ *
+ * <ul> 
+ *    <li> interpolate data (spatial and possibly temporal) from coarser levels
+ *    <li> copy data from the same level of refinement
+ *    <li> fill physical boundary conditions regions
+ * </ul>
+ *
+ * Each data communication procedure generally consists of three parts: an
+ * algorithm, a schedule, and a patch strategy.  The algorithm describes
+ * the patch data components and time and space interpolation operations,
+ * but is independent of the configuration of the patches in an AMR hierarchy.
+ * Patch data items and their associated spatial and time interpolation
+ * operators are registered with an instantiation of this algorithm class.
+ * To generate the communication dependencies for a particular patch hierarchy
+ * configuration, the algorithm creates a refine schedule based on the state
+ * of a given hierarchy and the information in the algorithm.  The schedule
+ * can then perform the communication operations that move data to the
+ * destination patch level using the associated operators.  User-defined
+ * operations (such as filling physical boundaries and special interpolation
+ * procedures) are provided through a refine patch strategy object.
+ * User-defined interpolation operations can be written using the interfaces
+ * in RefinePatchStrategy for preprocessRefine() and postProcessRefine().
+ *
+ * In general, source data is copied into the designated scratch data for
+ * temporary processing.  The scratch space must contain sufficient ghost
+ * cells to accommodate the stencil width of the given interpolation operators
+ * and any physical boundary data that must be filled.  The scratch storage is
+ * copied into the destination data space at the end of the communication
+ * process.  Thus, copy operations between source, scratch, and destination
+ * patch data objects must be defined.  
+ *
+ * In general, the destination and scratch data components may be the same
+ * (assuming that the scratch component has a sufficient ghost cells width).
+ * The source and scratch components SHOULD NOT be the same, since the
+ * interiors of the source space could be changed by the use of the scratch
+ * data as temporary work space.
+ *
+ * It is the user's responsibility to register valid operations with the 
+ * refine algorithm so that the data communication can occur.  In particular,
+ * communication operations (e.g., data refinement, data copy, etc.) are
+ * performed in the order that items are registered for refinement with
+ * a refine algorithm object.  Thus, order of registration must repect any
+ * dependencies among patch data communicated.  Also, users who use 
+ * the preprocessRefine() and postProcessRefine() operations in the patch 
+ * strategy object must make sure that all data that is needed in those 
+ * operations are registered with the RefineAlgorithm using registerRefine() 
+ * whether or not the data is to be refined.
+ *
+ * Typical usage of a refine algorithm to perform inter-patch communication
+ * on an AMR hierarchy involves four steps:
+ *
+ * <ul>
+ *    <li> Construct a refine algorithm object.
+ *    <li> Register refine operations with the refine algorithm.  Using the
+ *         registerRefine() methods(s), one provides source and destination
+ *         patch data information, as well as time and space interpolation
+ *         operators as needed.  Two registerRefine() methods appear in this
+ *         class; one supports time interpolation, one does not.
+ *    <li> After all operations are registered with the algorithm, one
+ *         creates a communication schedule using one of the createSchedule()
+ *         methods.  These methods are distinguished by the resulting data
+ *         communication pattern (e.g., interpatch communication on a single
+ *         level, between two different levels at the same grid resolution,
+ *         interpolation of data between different AMR hierarchy levels, etc.)
+ *         Note that when creating a communication schedule, a concrete
+ *         instance of a RefinePatchStrategy object may be required
+ *         to supply physical boundary conditions as well as user-defined
+ *         spatial data interpolation operations.
+ *    <li> Invoke the fillData() method in the communication schedule to
+ *         perform the data transfers.
+ *
+ * Note that each refine schedule created by a refine algorithm remains valid
+ * as long as the patches involved in the communication process do not change;
+ * thus, they can be used for multiple data communication cycles.
+ *
+ * @see xfer::RefineSchedule
+ * @see xfer::RefinePatchStrategy
+ * @see xfer::RefineClasses
+ */
+
+class RefineAlgorithm:public tbox::DescribedClass
+{
+public:
+   /*!
+    * @brief Construct a refinement algorithm and initialize its basic state.
+    *
+    * Refinement operations must be registered with this algorithm
+    * before it can do anything useful.  See the registerRefine() routines
+    * for details
+    */
+   explicit RefineAlgorithm(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief The virtual destructor releases all internal storage.
+    */
+   virtual ~RefineAlgorithm();
+
+   /*!
+    * @brief Register a refine operation with the refine algorithm object.
+    * 
+    * This method does not support time interpolation.  Data values will be
+    * moved from the source data to the destination data using scratch
+    * data as a temporary work space.  The scratch data must have
+    * sufficient ghost cells to cover the required operator stencil width and
+    * any needed physical boundary ghost cells.
+    *
+    * @param[in] dst   Patch data index filled on the destination level.
+    * @param[in] src   Patch data index for source data.
+    * @param[in] scratch   Patch data index for temporary work space data.
+    * @param[in] oprefine  Refinement operator.  This may be a
+    *                      null pointer.  In this case, refinement must be
+    *                      handled by the refine patch strategy member
+    *                      functions.  See the comments for
+    *                      RefinePatchStrategy::preprocessRefine() and
+    *                      RefinePatchStrategy::postprocessRefine().
+    * @param[in] var_fill_pattern  Pointer to the variable fill pattern, which
+    *                              can be used to restrict the filling of data
+    *                              to a specific stencil.  If the NULL default
+    *                              is used, then class
+    *                              BoxGeometryVariableFillPattern will be used
+    *                              internally.
+    */
+   void
+   registerRefine(
+      const int dst,
+      const int src,
+      const int scratch,
+      tbox::Pointer<RefineOperator> oprefine,
+      tbox::Pointer<VariableFillPattern> var_fill_pattern =
+         (tbox::Pointer<BoxGeometryVariableFillPattern>)NULL);
+
+   /*!
+    * @brief Register a refine operation with the refine algorithm object.
+    *
+    * This method supports time interpolation.  Time interpolation will take
+    * place between the old and new source data components on coarser levels.
+    * On the destination level, data will be moved from the source data to 
+    * the destination data using scratch data as a temporary work
+    * space.  The scratch data must have sufficient ghost cells to cover
+    * the required operator stencil width and any needed physical boundary
+    * ghost cells.  The time interpolation operator cannot be null.  When
+    * assertion checking is active, passing in a null pointer will result in an
+    * unrecoverable assertion.
+    *
+    * @param[in] dst   Patch data index filled on the destination level.
+    * @param[in] src   Patch data index for source data.
+    * @param[in] src_told  Patch data index for old data used in time
+    *                      interpolation.
+    * @param[in] src_tnew  Patch data index for new data used in time
+    *                      interpolation.
+    * @param[in] scratch   Patch data index for temporary work space data.
+    * @param[in] oprefine  Refinement operator.  This may be a
+    *                      null pointer.  In this case, refinement must be
+    *                      handled by the refine patch strategy member
+    *                      functions.  See the comments for
+    *                      RefinePatchStrategy::preprocessRefine() and
+    *                      RefinePatchStrategy::postprocessRefine().
+    * @param[in] optime    Time interpolation operator.  This pointer may
+    *                      not be null.
+    * @param[in] var_fill_pattern  Pointer to the variable fill pattern, which
+    *                              can be used to restrict the filling of data
+    *                              to a specific stencil.  If the NULL default
+    *                              is used, then class
+    *                              BoxGeometryVariableFillPattern will be used
+    *                              internally.
+    */
+   void
+   registerRefine(
+      const int dst,
+      const int src,
+      const int src_told,
+      const int src_tnew,
+      const int scratch,
+      tbox::Pointer<RefineOperator> oprefine,
+      tbox::Pointer<TimeInterpolateOperator> optime,
+      tbox::Pointer<VariableFillPattern> var_fill_pattern =
+         (tbox::Pointer<BoxGeometryVariableFillPattern>)NULL);
+
+   /*!
+    * @brief Create a communication schedule for communicating data within a
+    * single level.
+    *
+    * The schedule will communicate data from the interiors of the source
+    * data into the interior and ghosts of the destination data on the
+    * the same level where those sources and destinations overlap.
+    *
+    * Neither time nor spatial interpolation is performed.
+    *
+    * Note that the schedule remains valid as long as the level does not
+    * change; thus, it can be used for multiple data communication cycles
+    * cycles.
+    *
+    * @return Pointer to refine schedule that performs the data transfers.
+    *
+    * @param[in] level           Level on which communication occurs.  This
+    *                            pointer cannot be null.
+    * @param[in] patch_strategy  Optional pointer to a refine patch strategy
+    *                            that provides user-defined physical boundary
+    *                            filling operations.  If this patch strategy is
+    *                            null (default state), then no physical
+    *                            boundary filling is performed.
+    * @param[in] transaction_factory Optional Pointer to a refine transaction
+    *                                factory that creates data transactions for
+    *                                the schedule.  If this pointer is null
+    *                                (default state), then a
+    *                                StandardRefineTransactionFactory object
+    *                                will be used.
+    */
+   tbox::Pointer<xfer::RefineSchedule>
+   createSchedule(
+      tbox::Pointer<hier::PatchLevel> level,
+      RefinePatchStrategy* patch_strategy =
+         ((RefinePatchStrategy *)NULL),
+      tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory =
+         tbox::Pointer<xfer::RefineTransactionFactory>(NULL));
+
+   /*
+    * @brief Same as the above, except with fill_pattern specified.
+    *
+    * @param[in] fill_pattern  Indicates which parts of the destination level
+    *                          to fill.  See RefineSchedule for available
+    *                          patterns.
+    */
+   tbox::Pointer<xfer::RefineSchedule>
+   createSchedule(
+      tbox::Pointer<PatchLevelFillPattern> fill_pattern,
+      tbox::Pointer<hier::PatchLevel> level,
+      RefinePatchStrategy* patch_strategy =
+         ((RefinePatchStrategy *)NULL),
+      tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory =
+         tbox::Pointer<xfer::RefineTransactionFactory>(NULL));
+
+   /*!
+    * @brief Create a communication schedule that communicates data between
+    * two levels that are at the same level of resolution.
+    *
+    * Data will be communicated from the interiors of the source data on the
+    * source level into the interior and ghosts of the destination data on a
+    * destination level where those sources and destinations overlap.
+    *
+    * Note that both levels must reside in the same AMR hierarchy index space,
+    * or in index spaces that represent the same level of mesh refinement.
+    * No spatial interpolation is performed.
+    *
+    * In certain rare cases it may be desired to use this schedule to perform
+    * time interpolation, in which case the use_time_interpolation optional
+    * argument should be set to true.
+    *
+    * Note that the schedule remains valid as long as the levels do not
+    * change; thus, it can be used for multiple data communication cycles.
+    *
+    * @return Pointer to refine schedule that performs the data transfers.
+    *
+    * @param[in] dst_level       Pointer to destination level; cannot be null.
+    * @param[in] src_level       Pointer to source level; cannot be null.
+    * @param[in] patch_strategy  Pointer to a refine patch strategy that
+    *                            provides user-defined physical boundary
+    *                            filling operations.  If this patch strategy is
+    *                            null (default state), then no physical
+    *                            boundary filling is performed.
+    * @param[in]  use_time_interpolation  Flag to create the schedule with
+    *                                     the ability to perform time
+    *                                     interpolation.
+    * @param[in] transaction_factory  Pointer to a refine transaction factory
+    *                                 that creates data transactions for the
+    *                                 schedule.  If this pointer is null 
+    *                                 (default state), then a
+    *                                 StandardRefineTransactionFactory object
+    *                                 will be used.
+    */
+   tbox::Pointer<xfer::RefineSchedule>
+   createSchedule(
+      tbox::Pointer<hier::PatchLevel> dst_level,
+      tbox::Pointer<hier::PatchLevel> src_level,
+      xfer::RefinePatchStrategy* patch_strategy =
+         ((xfer::RefinePatchStrategy *)NULL),
+      bool use_time_interpolation = false,
+      tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory =
+         tbox::Pointer<xfer::RefineTransactionFactory>(NULL));
+
+   /*!
+    * @brief Same as the above, except with fill_pattern specified.
+    *
+    * @param[in] fill_pattern  Indicates which parts of the destination level
+    *                          to fill.  See RefineSchedule for available
+    *                          patterns.
+    */
+   tbox::Pointer<xfer::RefineSchedule>
+   createSchedule(
+      tbox::Pointer<PatchLevelFillPattern> fill_pattern,
+      tbox::Pointer<hier::PatchLevel> dst_level,
+      tbox::Pointer<hier::PatchLevel> src_level,
+      xfer::RefinePatchStrategy* patch_strategy =
+         ((xfer::RefinePatchStrategy *)NULL),
+      bool use_time_interpolation = false,
+      tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory =
+         tbox::Pointer<xfer::RefineTransactionFactory>(NULL));
+
+   /*!
+    * @brief Create a communication schedule that communicates data within a
+    * single level and interpolates data from coarser hierarchy levels 
+    * where needed.
+    *
+    * Data will be communicated from the interiors of the source data on
+    * on the given level to the interiors and ghosts of destination data on
+    * the same level where those sources and destinations overlap.  Where they
+    * do not overlap, data will be interpolated from source data on coarser
+    * levels in the patch hierarchy.
+    *
+    * Data is time interpolated between old and new sources on coarser levels
+    * when and where time interpolation is needed and copied from the source
+    * components on the patch level into the destination components otherwise.
+    *
+    * In certain rare cases in may be necessary to perform time interpolation
+    * between old and new sources on the given patch level.  In this case
+    * the optional argument use_time_interpolation should be set to true.
+    * Regardless of the value of this argument, time interpolation on
+    * coarser levels will always occur whenever needed.
+    *
+    * Note that the next coarser level number must correspond to a level
+    * in the hierarchy that represents a region of coarser index space than
+    * the destination level.
+    *
+    * Note that the schedule remains valid as long as the levels involved
+    * in its creation do not change; thus, it can be used for multiple
+    * data communication cycles.
+    *
+    * @return Pointer to refine schedule that performs the data transfers.
+    *
+    * @param[in] level         Pointer to destination level; cannot be null.
+    * @param[in] next_coarser_level  Level number of next coarser patch level
+    *                                in the patch hierarchy relative to the
+    *                                destination level.  Note that when the
+    *                                destination level has number zero (i.e.,
+    *                                the coarsest level), this value should
+    *                                value should be < 0.
+    * @param[in] hierarchy     Pointer to patch hierarchy from which data to
+    *                          fill level should come.  This pointer may be
+    *                          null only when the next_coarser_level is < 0.
+    * @param[in] patch_strategy  Pointer to a refine patch strategy that
+    *                            provides user-defined physical boundary
+    *                            filling operations and user-defined spatial
+    *                            interpolation operations.  If this patch
+    *                            strategy is null (default state), then no
+    *                            physical boundary filling or user-defined
+    *                            interpolation is performed.  Note that this
+    *                            may cause problems if the interpolation
+    *                            stencils require physical boundary data on
+    *                            the coarser levels.
+    * @param[in] use_time_interpolation  Boolean flag to create the schedule
+    *                                    the ability to perform time
+    *                                    interpolation on the destination
+    *                                    level.  Default is no time
+    *                                    interpolation (false).
+    * @param[in] transaction_factory  Pointer to a refine transaction
+    *                                 factory that creates data transactions
+    *                                 for the schedule.  If this pointer is
+    *                                 null (default state), then a
+    *                                 StandardRefineTransactionFactory object
+    *                                 will be used.
+    */
+   tbox::Pointer<xfer::RefineSchedule>
+   createSchedule(
+      tbox::Pointer<hier::PatchLevel> level,
+      const int next_coarser_level,
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      xfer::RefinePatchStrategy* patch_strategy =
+         ((xfer::RefinePatchStrategy *)NULL),
+      bool use_time_interpolation = false,
+      tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory =
+         tbox::Pointer<xfer::RefineTransactionFactory>(NULL));
+
+   /*!
+    * @brief Same as the above, except with fill_pattern specified.
+    *
+    * @param[in] fill_pattern  Indicates which parts of the destination level
+    *                          to fill.  See RefineSchedule for available
+    *                          patterns.
+    */
+   tbox::Pointer<xfer::RefineSchedule>
+   createSchedule(
+      tbox::Pointer<PatchLevelFillPattern> fill_pattern,
+      tbox::Pointer<hier::PatchLevel> level,
+      const int next_coarser_level,
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      xfer::RefinePatchStrategy* patch_strategy =
+         ((xfer::RefinePatchStrategy *)NULL),
+      bool use_time_interpolation = false,
+      tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory =
+         tbox::Pointer<xfer::RefineTransactionFactory>(NULL));
+
+   /*!
+    * @brief Create a communication schedule that communicates data from a
+    * source level to a destination level and interpolates data from coarser
+    * hierarchy levels where needed.
+    *
+    * Data will be communicated from the interiors of the source data on
+    * on the source level to the interiors and ghosts of destination data on
+    * the destination level where those sources and destinations overlap.
+    * Where they do not overlap, data will be interpolated from source data on
+    * coarser levels in the patch hierarchy.
+    *
+    * Data is time interpolated between old and new sources on coarser levels
+    * when and where time interpolation is needed and copied from the source
+    * components on the source level into the destination components otherwise.
+    *
+    * This form of schedule construction is typically used after regridding
+    * (where the source level is the patch level being replaced by the
+    * destination level in the patch hierarchy) or when the data on destination
+    * patch level is to be overwritten by data interpolated from coarser levels
+    * in the patch hierarchy.  In the first case, data on the destination level
+    * will be copied from the source level in regions where those two levels
+    * overlap and filled with interpolated values from the hierarchy elsewhere.
+    * In the latter case, the source level pointer may be null.  Then, data on
+    * the destination level will be filled using interpolated data from coarser
+    * hierarchy levels.
+    *
+    * In certain rare cases in may be desired to perform time interpolation
+    * between old and new sources onto the destination level.  In this case
+    * the optional argument use_time_interpolation should be set to true.
+    * Regardless of the value of this argument, time interpolation on
+    * coarser levels will always occur whenever needed.
+    *
+    * Note that when the source level pointer is non-null, the index spaces of
+    * the source and destination levels must be aligned with one another.
+    *
+    * Note that the schedule remains valid as long as the levels involved
+    * in its creation do not change; thus, it can be used for multiple
+    * data communication cycles.
+    *
+    * @return Pointer to refine schedule that performs the data transfers.
+    *
+    * @param[in] dst_level      Pointer to destination level; cannot be null.
+    * @param[in] src_level      Pointer to source level. This pointer may
+    *                           be null.  In this case, data on the destination
+    *                           level will be filled only using interpolated
+    *                           data from coarser hierarchy levels.  When this
+    *                           pointer is not null, the source level must live
+    *                           in the same AMR hierarchy index space as the
+    *                           destination level.
+    * @param[in] next_coarser_level  Level number of next coarser patch level
+    *                                in the patch hierarchy relative to the
+    *                                destination level.  Note that when the
+    *                                destination level has number zero (i.e.,
+    *                                the coarsest level), this value should
+    *                                value should be < 0.
+    * @param[in] hierarchy    Pointer to patch hierarchy from which data to
+    *                         fill level should come.  This pointer may be null
+    *                         only when the next_coarser_level is < 0.
+    * @param[in] patch_strategy  Pointer to a refine patch strategy that
+    *                            provides user-defined physical boundary
+    *                            filling operations and user-defined spatial
+    *                            interpolation operations.  If this patch
+    *                            strategy is null (default state), then no
+    *                            physical boundary filling or user-defined
+    *                            interpolation is performed.  Note that this
+    *                            may cause problems if the interpolation
+    *                            stencils require physical boundary data on
+    *                            the coarser levels.
+    * @param[in] use_time_interpolation  Boolean flag to create the schedule
+    *                                    the ability to perform time
+    *                                    interpolation on the destination
+    *                                    level.  Default is no time
+    *                                    interpolation (false).
+    * @param[in] transaction_factory  Pointer to a refine transaction
+    *                                 factory that creates data transactions
+    *                                 for the schedule.  If this pointer is
+    *                                 null (default state), then a
+    *                                 StandardRefineTransactionFactory object
+    *                                 will be used.
+    */
+   tbox::Pointer<xfer::RefineSchedule>
+   createSchedule(
+      tbox::Pointer<hier::PatchLevel> dst_level,
+      tbox::Pointer<hier::PatchLevel> src_level,
+      const int next_coarser_level,
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      xfer::RefinePatchStrategy* patch_strategy =
+         ((xfer::RefinePatchStrategy *)NULL),
+      bool use_time_interpolation = false,
+      tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory =
+         tbox::Pointer<xfer::RefineTransactionFactory>(NULL));
+
+   /*!
+    * @brief Same as the above, except with fill_pattern specified.
+    *
+    * @param[in] fill_pattern  Indicates which parts of the destination level
+    *                          to fill.  See RefineSchedule for available
+    *                          patterns.
+    */
+   tbox::Pointer<xfer::RefineSchedule>
+   createSchedule(
+      tbox::Pointer<PatchLevelFillPattern> fill_pattern,
+      tbox::Pointer<hier::PatchLevel> dst_level,
+      tbox::Pointer<hier::PatchLevel> src_level,
+      const int next_coarser_level,
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      xfer::RefinePatchStrategy* patch_strategy =
+         ((xfer::RefinePatchStrategy *)NULL),
+      bool use_time_interpolation = false,
+      tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory =
+         tbox::Pointer<xfer::RefineTransactionFactory>(NULL));
+
+   /*!
+    * @brief Given a previously-generated refine schedule, check for
+    * consistency with this refine algorithm object to see whether a call to
+    * resetSchedule() is a valid operation.
+    *
+    * Consistency means that the number of operations registered must be the
+    * same and the source and destination patch data items and operators must
+    * have identical characteristics (i.e., data centering, ghost cell widths,
+    * stencil requirements, etc.).  However, the specific source, destination
+    * patch data ids and refine operators can be different.  The specific
+    * time interpolation operators and variable fill patterns must be
+    * the same.
+    *
+    * @return true if schedule reset is valid; false otherwise.
+    *
+    * @param[in] schedule  Pointer to refine schedule, which cannot be null.
+    */
+   bool
+   checkConsistency(
+      tbox::Pointer<xfer::RefineSchedule> schedule) const;
+
+   /*!
+    * @brief Given a previously-generated refine schedule, reconfigure it to
+    * peform the communication operations registered with THIS refine
+    * algorithm object.
+    *
+    * That is, the schedule will be transformed so that it will function as
+    * though this refine algorithm created it.  Note that the set of
+    * operations registered with this refine algorithm must be essentially
+    * the same as those registered with the refine algorithm that created the
+    * schedule originally, and this is enforced using a call to
+    * checkConsistency().  An error will result if the schedule is not
+    * consistent with this RefineAlgorithm object according to the criteria
+    * in checkConsistency().
+    *
+    * @param[in,out] schedule  Pointer to refine schedule, which cannot be
+    *                          null.
+    */
+   void
+   resetSchedule(
+      tbox::Pointer<xfer::RefineSchedule> schedule) const;
+
+   /*!
+    * @brief Return the refine equivalence classes used in the algorithm.
+    */
+   const tbox::Pointer<RefineClasses>&
+   getEquivalenceClasses() const;
+
+   /*!
+    * @brief Set the pointer to the refine equivalence classes to be equal
+    * to the given argument.
+    *
+    * @param[in] refine_classes A pointer to refine equivalence classes
+    */
+   void
+   setEquivalenceClasses(
+      const tbox::Pointer<RefineClasses> refine_classes);
+
+   /*!
+    * @brief Return the dimension of this object.
+    */
+   const tbox::Dimension&
+   getDim() const;
+
+   /*!
+    * @brief Print the refine algorithm state to the specified data stream.
+    *
+    * @param[out] stream Output data stream.
+    */
+   void
+   printClassData(
+      std::ostream& stream) const;
+
+private:
+   RefineAlgorithm(
+      const RefineAlgorithm&);                  // not implemented
+   void
+   operator = (
+      const RefineAlgorithm&);                  // not implemented
+
+   //! @brief Shorthand typedef.
+   typedef hier::MappedBox MBox;
+   //! @brief Shorthand typedef.
+   typedef hier::MappedBoxLevel MappedBoxLevel;
+   //! @brief Shorthand typedef.
+   typedef hier::Connector::NeighborSet NeighborSet;
+
+   /*!
+    * @brief Dimension of the object
+    */
+   const tbox::Dimension d_dim;
+
+   /*!
+    * RefineClasses object holds all of the registered refine items
+    */
+   tbox::Pointer<RefineClasses> d_refine_classes;
+
+   /*!
+    * Tells if any schedule has yet been created using this object.
+    */
+   bool d_schedule_created;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/RefineClasses.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/RefineClasses.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,681 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Simple structure for managing refinement data in equivalence classes. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_RefineClasses_C
+#define included_xfer_RefineClasses_C
+
+#include <typeinfo>
+
+#include "SAMRAI/xfer/RefineClasses.h"
+
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/PatchDataFactory.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#ifndef SAMRAI_INLINE
+#include "SAMRAI/xfer/RefineClasses.I"
+#endif
+
+namespace SAMRAI {
+namespace xfer {
+
+int RefineClasses::s_default_refine_item_array_size = 20;
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default constructor.                                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+RefineClasses::RefineClasses():
+   d_num_refine_items(0)
+{
+   d_equivalence_class_ids.resizeArray(0);
+   d_refine_classes_data_items.resizeArray(s_default_refine_item_array_size);
+}
+
+/*
+ *************************************************************************
+ *									*
+ * The destructor implicitly deletes the item storage associated with	*
+ * the equivalence classes (and also the refine algorithm).		*
+ *									*
+ *************************************************************************
+ */
+
+RefineClasses::~RefineClasses()
+{
+   d_equivalence_class_ids.resizeArray(0);
+   d_refine_classes_data_items.resizeArray(0);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return representative item for given equivalence class (first in list)*
+ *                                                                       *
+ *************************************************************************
+ */
+
+const RefineClasses::Data&
+RefineClasses::getClassRepresentative(
+   int equiv_class_id) const
+{
+   TBOX_ASSERT((equiv_class_id >= 0) &&
+      (equiv_class_id < d_equivalence_class_ids.size()));
+   return d_refine_classes_data_items[
+             d_equivalence_class_ids[equiv_class_id].getFirstItem()];
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return iterator for list of refine items for given equivalence class  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::List<int>::Iterator
+RefineClasses::getIterator(
+   int equiv_class_id)
+{
+   TBOX_ASSERT((equiv_class_id >= 0) &&
+      (equiv_class_id < d_equivalence_class_ids.size()));
+   return tbox::List<int>::
+          Iterator(d_equivalence_class_ids[equiv_class_id]);
+
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Insert a data item into the refine data list for the proper           *
+ * equivalence class in sorted order by ascending operator priority.     *
+ *									*
+ *************************************************************************
+ */
+
+void RefineClasses::insertEquivalenceClassItem(
+   RefineClasses::Data& data,
+   tbox::Pointer<hier::PatchDescriptor> descriptor)
+{
+
+   if (!checkRefineItem(data, descriptor)) {
+      tbox::perr << "Bad refine class data passed to "
+                 << "RefineClasses::insertEquivalenceClassItem\n";
+      printRefineItem(tbox::perr, data);
+      TBOX_ERROR("Check entries..." << std::endl);
+   } else {
+
+      int eq_index = getEquivalenceClassIndex(data, descriptor);
+
+      if (eq_index < 0) {
+         eq_index = d_equivalence_class_ids.size();
+         d_equivalence_class_ids.resizeArray(eq_index + 1);
+      }
+
+      data.d_class_id = eq_index;
+
+      if (d_num_refine_items >= d_refine_classes_data_items.size()) {
+         d_refine_classes_data_items.resizeArray(
+            d_num_refine_items + s_default_refine_item_array_size);
+      }
+
+      d_refine_classes_data_items[d_num_refine_items] = data;
+
+      d_equivalence_class_ids[eq_index].appendItem(d_num_refine_items);
+
+      d_num_refine_items++;
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Check for valid patch data ids, patch data types, and that scratch    *
+ * data entry has at least as many ghost cells as destination data entry *
+ * and stencil width of operator.  If so, return true; else return false.*
+ * A descriptive error message is sent to TBOX_ERROR when a problem      *
+ * appears.  If a null patch descriptor argument is passed, the          *
+ * descriptor associated with the variable database Singleton object     *
+ * will be used.                                                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool RefineClasses::checkRefineItem(
+   const RefineClasses::Data& data_item,
+   tbox::Pointer<hier::PatchDescriptor> descriptor) const
+{
+
+   bool item_good = true;
+
+   tbox::Pointer<hier::PatchDescriptor> pd = descriptor;
+   if (pd.isNull()) {
+      pd = hier::VariableDatabase::getDatabase()->getPatchDescriptor();
+   }
+
+   const int dst_id = data_item.d_dst;
+   const int src_id = data_item.d_src;
+   const int scratch_id = data_item.d_scratch;
+
+   if (dst_id < 0) {
+      item_good = false;
+      TBOX_ERROR("Bad data given to RefineClasses...\n"
+         << "`Destination' patch data id invalid (< 0!)" << std::endl);
+   }
+   if (item_good && (src_id < 0)) {
+      item_good = false;
+      TBOX_ERROR("Bad data given to RefineClasses...\n"
+         << "`Source' patch data id invalid (< 0!)" << std::endl);
+   }
+   if (item_good && (scratch_id < 0)) {
+      item_good = false;
+      TBOX_ERROR("Bad data given to RefineClasses...\n"
+         << "`Scratch' patch data id invalid (< 0!)" << std::endl);
+   }
+
+   tbox::Pointer<hier::PatchDataFactory> dst_fact =
+      pd->getPatchDataFactory(dst_id);
+   tbox::Pointer<hier::PatchDataFactory> src_fact =
+      pd->getPatchDataFactory(src_id);
+   tbox::Pointer<hier::PatchDataFactory> scratch_fact =
+      pd->getPatchDataFactory(scratch_id);
+
+   if (item_good && !(src_fact->validCopyTo(scratch_fact))) {
+      item_good = false;
+      TBOX_ERROR("Bad data given to RefineClasses...\n"
+         << "It is not a valid operation to copy from `Source' patch data \n"
+         << pd->mapIndexToName(src_id) << " to `Scratch' patch data "
+         << pd->mapIndexToName(scratch_id) << std::endl);
+   }
+
+   if (item_good && !(scratch_fact->validCopyTo(dst_fact))) {
+      item_good = false;
+      pd->mapIndexToName(scratch_id);
+      pd->mapIndexToName(dst_id);
+      TBOX_ERROR("Bad data given to RefineClasses...\n"
+         << "It is not a valid operation to copy from `Scratch' patch data \n"
+         << pd->mapIndexToName(scratch_id) << " to `Destination' patch data "
+         << pd->mapIndexToName(dst_id) << std::endl);
+   }
+
+   const hier::IntVector& scratch_gcw = scratch_fact->getGhostCellWidth();
+
+   if (item_good && (dst_fact->getGhostCellWidth() > scratch_gcw)) {
+      item_good = false;
+      TBOX_ERROR("Bad data given to RefineClasses...\n"
+         << "`Destination' patch data " << pd->mapIndexToName(dst_id)
+         << " has a larger ghost cell width than \n"
+         << "`Scratch' patch data " << pd->mapIndexToName(scratch_id)
+         << "\n`Destination' ghost width = "
+         << dst_fact->getGhostCellWidth()
+         << "\n`Scratch' ghost width = " << scratch_gcw << std::endl);
+   }
+
+   tbox::Pointer<RefineOperator> refop = data_item.d_oprefine;
+   if (item_good && !refop.isNull()) {
+      if (refop->getStencilWidth() > scratch_gcw) {
+         item_good = false;
+         TBOX_ERROR("Bad data given to RefineClasses...\n"
+            << "Refine operator " << refop->getOperatorName()
+            << "\nhas larger stencil width than ghost cell width"
+            << "of `Scratch' patch data" << pd->mapIndexToName(scratch_id)
+            << "\noperator stencil width = " << refop->getStencilWidth()
+            << "\n`Scratch'  ghost width = " << scratch_gcw << std::endl);
+      }
+   }
+
+   tbox::Pointer<VariableFillPattern> fill_pattern =
+      data_item.d_var_fill_pattern;
+   if (item_good && !fill_pattern.isNull()) {
+      if (fill_pattern->getPatternName() != "BOX_GEOMETRY_FILL_PATTERN") {
+         if (fill_pattern->getStencilWidth() > scratch_gcw) {
+            item_good = false;
+            TBOX_ERROR("Bad data given to RefineClasses<DIM>...\n"
+               << "VariableFillPattern " << fill_pattern->getPatternName()
+               << "\nhas larger stencil width than ghost cell width"
+               << "of `Scratch' patch data" << pd->mapIndexToName(
+                  scratch_id)
+               << "\noperator stencil width = "
+               << fill_pattern->getStencilWidth()
+               << "\n`Scratch'  ghost width = " << scratch_gcw << std::endl);
+         }
+      }
+   }
+
+   if (item_good && data_item.d_time_interpolate) {
+      const int src_told_id = data_item.d_src_told;
+      const int src_tnew_id = data_item.d_src_tnew;
+
+      if (src_told_id < 0) {
+         item_good = false;
+         TBOX_ERROR("Bad data given to RefineClasses...\n"
+            << "`Source old' patch data id invalid (< 0!),\n"
+            << "yet a request has made to time interpolate" << std::endl);
+      }
+      if (item_good && src_tnew_id < 0) {
+         item_good = false;
+         TBOX_ERROR("Bad data given to RefineClasses...\n"
+            << "`Source new' patch data id invalid (< 0!),\n"
+            << "yet a request has made to time interpolate with them"
+            << std::endl);
+      }
+
+      tbox::Pointer<hier::PatchDataFactory> src_told_fact =
+         pd->getPatchDataFactory(src_told_id);
+      tbox::Pointer<hier::PatchDataFactory> src_tnew_fact =
+         pd->getPatchDataFactory(src_tnew_id);
+
+      if (item_good && typeid(*src_told_fact) != typeid(*src_fact)) {
+         item_good = false;
+         TBOX_ERROR("Bad data given to RefineClasses...\n"
+            << "`Source' patch data " << pd->mapIndexToName(src_id)
+            << " and `Source old' patch data "
+            << pd->mapIndexToName(src_told_id)
+            << " have different patch data types, yet a request has"
+            << "\n been made to time interpolate with them" << std::endl);
+      }
+
+      if (item_good && typeid(*src_tnew_fact) != typeid(*src_fact)) {
+         item_good = false;
+         TBOX_ERROR("Bad data given to RefineClasses...\n"
+            << "`Source' patch data " << pd->mapIndexToName(src_id)
+            << " and `Source new' patch data "
+            << pd->mapIndexToName(src_tnew_id)
+            << " have different patch data types, yet a request has"
+            << "\n been made to time interpolate with them" << std::endl);
+      }
+
+   }
+
+   return item_good;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compare refine data items in this refine classes object against       *
+ * those in the argument refine classes object.  Return true if they     *
+ * all match with regard to the patch data types, patch data ghost cell  *
+ * widths, operator stencils, etc. that they refer to and return false   *
+ * otherwise.  If a null patch descriptor argument is passed, the        *
+ * descriptor associated with the variable database Singleton object     *
+ * will be used.                                                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool RefineClasses::checkConsistency(
+   tbox::Pointer<RefineClasses> test_classes,
+   tbox::Pointer<hier::PatchDescriptor> descriptor) const
+{
+
+   bool items_match = true;
+
+   tbox::Pointer<hier::PatchDescriptor> pd = descriptor;
+   if (pd.isNull()) {
+      pd = hier::VariableDatabase::getDatabase()->getPatchDescriptor();
+   }
+
+   if (d_equivalence_class_ids.size() !=
+       test_classes->d_equivalence_class_ids.size()) {
+
+      items_match = false;
+
+   } else {
+
+      int num_equiv_classes = d_equivalence_class_ids.size();
+      int eq_index = 0;
+      while (items_match && eq_index < num_equiv_classes) {
+
+         if (d_equivalence_class_ids[eq_index].size() !=
+             test_classes->
+             d_equivalence_class_ids[eq_index].size()) {
+
+            items_match = false;
+
+         } else {
+
+            tbox::List<int>::Iterator myli(d_equivalence_class_ids[eq_index]);
+            tbox::List<int>::Iterator testli(test_classes->d_equivalence_class_ids[eq_index]);
+            while (items_match && myli) {
+
+               const RefineClasses::Data& myli_item =
+                  d_refine_classes_data_items[myli()];
+               const RefineClasses::Data& testli_item =
+                  d_refine_classes_data_items[testli()];
+
+               items_match = checkPatchDataItemConsistency(
+                     myli_item.d_dst, testli_item.d_dst, pd);
+
+               if (items_match) {
+                  items_match = checkPatchDataItemConsistency(
+                        myli_item.d_src, testli_item.d_src, pd);
+               }
+
+               if (items_match && myli_item.d_time_interpolate) {
+                  items_match = checkPatchDataItemConsistency(
+                        myli_item.d_src_told,
+                        testli_item.d_src_told,
+                        pd);
+               }
+
+               if (items_match && myli_item.d_time_interpolate) {
+                  items_match = checkPatchDataItemConsistency(
+                        myli_item.d_src_tnew,
+                        testli_item.d_src_tnew,
+                        pd);
+               }
+
+               if (items_match) {
+                  items_match = checkPatchDataItemConsistency(
+                        myli_item.d_scratch,
+                        testli_item.d_scratch,
+                        pd);
+               }
+
+               if (items_match) {
+                  items_match = (myli_item.d_fine_bdry_reps_var ==
+                                 testli_item.d_fine_bdry_reps_var);
+               }
+
+               if (items_match) {
+                  items_match = (!myli_item.d_oprefine.isNull() ==
+                                 !testli_item.d_oprefine.isNull());
+                  if (items_match && !myli_item.d_oprefine.isNull()) {
+                     items_match =
+                        (myli_item.d_oprefine->getStencilWidth() ==
+                         testli_item.d_oprefine->getStencilWidth());
+                  }
+               }
+
+               if (items_match) {
+                  items_match = (myli_item.d_time_interpolate ==
+                                 testli_item.d_time_interpolate);
+                  if (items_match && myli_item.d_time_interpolate) {
+                     items_match = (typeid(*(myli_item.d_optime)) ==
+                                    typeid(*(testli_item.d_optime)));
+                  }
+               }
+
+               if (items_match) {
+                  items_match = (!myli_item.d_var_fill_pattern.isNull() ==
+                                 !testli_item.d_var_fill_pattern.isNull());
+                  if (items_match && !myli_item.d_var_fill_pattern.isNull()) {
+                     items_match = (typeid(*(myli_item.d_var_fill_pattern)) ==
+                                    typeid(*(testli_item.d_var_fill_pattern)));
+                  }
+               }
+
+               myli++;
+               testli++;
+
+            } // while items in equivalence class match
+
+         } // if number of items in equivalence class match
+
+         eq_index++;
+
+      } // while equivalence classes match
+
+   } // else number of equivalence classes do not match
+
+   return items_match;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private member function to determine whether two patch data items     *
+ * are consistent.                                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool RefineClasses::checkPatchDataItemConsistency(
+   int item_id1,
+   int item_id2,
+   tbox::Pointer<hier::PatchDescriptor> pd) const
+{
+
+   bool items_match = ((item_id1 >= 0) && (item_id2 >= 0));
+
+   if (items_match) {
+
+      tbox::Pointer<hier::PatchDataFactory> pdf1 =
+         pd->getPatchDataFactory(item_id1);
+      tbox::Pointer<hier::PatchDataFactory> pdf2 =
+         pd->getPatchDataFactory(item_id2);
+
+      items_match = (typeid(*pdf1) == typeid(*pdf2));
+
+      if (items_match) {
+         items_match = (pdf1->getGhostCellWidth() ==
+                        pdf2->getGhostCellWidth());
+      }
+
+   }
+
+   return items_match;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private member function to determine equivalence class for            *
+ * given data item.  Return value of -1 indicates no match found; else   *
+ * return value is index of match.                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int RefineClasses::getEquivalenceClassIndex(
+   const RefineClasses::Data& data,
+   tbox::Pointer<hier::PatchDescriptor> descriptor) const
+{
+
+   int eq_index = -1;
+
+   tbox::Pointer<hier::PatchDescriptor> pd = descriptor;
+   if (pd.isNull()) {
+      pd = hier::VariableDatabase::getDatabase()->getPatchDescriptor();
+   }
+
+   int dst_id = data.d_dst;
+   int src_id = data.d_src;
+
+   tbox::Pointer<hier::PatchDataFactory> dst_pdf =
+      pd->getPatchDataFactory(dst_id);
+   tbox::Pointer<hier::PatchDataFactory> src_pdf =
+      pd->getPatchDataFactory(src_id);
+
+   hier::IntVector dst_ghosts = dst_pdf->getGhostCellWidth();
+   hier::IntVector src_ghosts = src_pdf->getGhostCellWidth();
+
+   int num_equiv_classes = d_equivalence_class_ids.size();
+   bool equiv_found = false;
+   int nl = 0;
+   while (!equiv_found && nl < num_equiv_classes) {
+
+      bool dst_equiv = false;
+      bool src_equiv = false;
+
+      const RefineClasses::Data& class_rep = getClassRepresentative(nl);
+
+      int rep_dst_id = class_rep.d_dst;
+      tbox::Pointer<hier::PatchDataFactory> rep_dst_pdf =
+         pd->getPatchDataFactory(rep_dst_id);
+      hier::IntVector rep_dst_ghosts =
+         rep_dst_pdf->getGhostCellWidth();
+
+      /*
+       * Check if destinations are equivalent
+       */
+      if ((dst_ghosts == rep_dst_ghosts) &&
+          (typeid(*dst_pdf) == typeid(*rep_dst_pdf))) {
+         dst_equiv = true;
+      }
+
+      /*
+       * If src_id and dst_id are the same, there is nothing more to check.
+       * Otherwise, if destinations were equivalent, check if sources
+       * are equivalent.
+       */
+      if (dst_id == src_id) {
+         src_equiv = dst_equiv;
+      } else if (dst_equiv) {
+         int rep_src_id = class_rep.d_src;
+         tbox::Pointer<hier::PatchDataFactory> rep_src_pdf =
+            pd->getPatchDataFactory(rep_src_id);
+         hier::IntVector rep_src_ghosts =
+            rep_src_pdf->getGhostCellWidth();
+         if ((src_ghosts == rep_src_ghosts) &&
+             (typeid(*src_pdf) == typeid(*rep_src_pdf))) {
+            src_equiv = true;
+         }
+      }
+
+      /*
+       * Check if fill patterns are the same.
+       */
+      bool fill_patterns_same = false;
+      if (dst_equiv && src_equiv) {
+         fill_patterns_same =
+            (data.d_var_fill_pattern->getPatternName() ==
+             class_rep.d_var_fill_pattern->getPatternName());
+      }
+
+      /*
+       * If destinations and sources are both equivalent, exit loop
+       * and set return value to identify current equivalence class id.
+       */
+      if (dst_equiv && src_equiv && fill_patterns_same) {
+         eq_index = nl;
+         equiv_found = true;
+      }
+
+      nl++;
+
+   }
+
+   return eq_index;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Increase the data items array to the specified size.                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void RefineClasses::increaseRefineItemArraySize(
+   const int size)
+{
+   if (size > d_refine_classes_data_items.size()) {
+      d_refine_classes_data_items.resizeArray(size);
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Print the data in the refine item lists to the specified stream.      *
+ *									*
+ *************************************************************************
+ */
+
+void RefineClasses::printClassData(
+   std::ostream& stream) const
+{
+   stream << "RefineClasses::printClassData()\n";
+   stream << "--------------------------------------\n";
+   for (int i = 0; i < d_equivalence_class_ids.size(); i++) {
+      stream << "EQUIVALENCE CLASS # " << i << std::endl;
+      int j = 0;
+      for (tbox::List<int>::Iterator
+           li(d_equivalence_class_ids[i]); li; li++) {
+
+         stream << "Item # " << j << std::endl;
+         stream << "-----------------------------\n";
+
+         printRefineItem(stream, d_refine_classes_data_items[li()]);
+
+         j++;
+      }
+      stream << std::endl;
+   }
+
+}
+
+void RefineClasses::printRefineItem(
+   std::ostream& stream,
+   const RefineClasses::Data& data) const
+{
+   stream << "\n";
+   stream << "desination component:   "
+          << data.d_dst << std::endl;
+   stream << "source component:       "
+          << data.d_src << std::endl;
+   stream << "scratch component:      "
+          << data.d_scratch << std::endl;
+   stream << "fine boundary represents variable:      "
+          << data.d_fine_bdry_reps_var << std::endl;
+   stream << "tag:      "
+          << data.d_tag << std::endl;
+
+   if (data.d_oprefine.isNull()) {
+      stream << "NULL refining operator" << std::endl;
+   } else {
+      stream << "refine operator name:          "
+             << typeid(*data.d_oprefine).name()
+             << std::endl;
+      stream << "operator priority:      "
+             << data.d_oprefine->getOperatorPriority()
+             << std::endl;
+      stream << "operator stencil width: "
+             << data.d_oprefine->getStencilWidth()
+             << std::endl;
+   }
+   if (!data.d_time_interpolate) {
+      stream << "time interpolate is false" << std::endl;
+   } else {
+      stream << "old source component:   "
+             << data.d_src_told << std::endl;
+      stream << "new source component:   "
+             << data.d_src_tnew << std::endl;
+      stream << "time interpolation operator name:          "
+             << typeid(*data.d_optime).name()
+             << std::endl;
+   }
+   if (data.d_var_fill_pattern.isNull()) {
+      stream << "var fill pattern is null" << std::endl;
+   } else {
+      stream << "var fill pattern name:          "
+             << typeid(*data.d_var_fill_pattern).name()
+             << std::endl;
+   }
+   stream << std::endl;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/RefineClasses.I
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/RefineClasses.I	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,40 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Simple structure for managing refinement data in equivalence classes. 
+ *
+ ************************************************************************/
+
+namespace SAMRAI {
+namespace xfer {
+
+SAMRAI_INLINE_KEYWORD
+int RefineClasses::getNumberOfRefineItems() const
+{
+   return d_num_refine_items;
+}
+
+SAMRAI_INLINE_KEYWORD
+RefineClasses::Data& RefineClasses::getRefineItem(
+   const int refine_items_array_id)
+{
+   return d_refine_classes_data_items[refine_items_array_id];
+}
+
+SAMRAI_INLINE_KEYWORD
+int RefineClasses::getNumberOfEquivalenceClasses() const
+{
+   return d_equivalence_class_ids.size();
+}
+
+SAMRAI_INLINE_KEYWORD
+int RefineClasses::getRefineItemArraySize() const
+{
+   return d_refine_classes_data_items.size();
+}
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/RefineClasses.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/RefineClasses.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,416 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Simple structure for managing refinement data in equivalence classes. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_RefineClasses
+#define included_xfer_RefineClasses
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/List.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+#include "SAMRAI/xfer/VariableFillPattern.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Maintain a collection of refine items and organize them
+ * into equivalence classes.
+ *
+ * RefineClasses is used by the RefineSchedule and RefineAlgorithm
+ * classes to manage refinement data items that describe communication 
+ * of patch data on an AMR hierarchy.  Specifically, this class organizes
+ * these items into equivalence clases, so that items are grouped
+ * together if they are considered equivalent.
+ *
+ * Two items are equivalent if all of the following are true:
+ * <ul>
+ *   <li> The referenced patch data type for the source component
+ *        is the same for both items.
+ *   <li> The referenced patch data type for the destination component
+ *        is the same for both items.
+ *   <li> The ghost cell width of the source patch data is the same
+ *        for both items.
+ *   <li> The ghost cell width of the destination patch data is the same
+ *        for both items.
+ *   <li> They use the same VariableFillPattern.
+ * </ul>
+ */
+
+class RefineClasses:public tbox::DescribedClass
+{
+public:
+   /*!
+    * @brief Data structure used to describe a refinement operation
+    * between patch data components on an AMR hierarchy.
+    */
+   struct Data {
+      /*!
+       * @brief Destination patch data component
+       */
+      int d_dst;
+
+      /*!
+       * @brief Source patch data component
+       */
+      int d_src;
+
+      /*!
+       * @brief Patch data component for source data at the old time in
+       * a time interpolation operation.
+       */
+      int d_src_told;
+
+      /*!
+       * @brief Patch data component for source data at the new time in
+       * a time interpolation operation.
+       */
+      int d_src_tnew;
+
+      /*!
+       * @breif Scratch patch data component
+       */
+      int d_scratch;
+
+      /*!
+       * @brief Boolean flag that is set to true when it is desired that fine
+       * data values have priority over coarse data values when data exists
+       * at the same location in the mesh on levels with different resolutions
+       * (e.g., nodes that are coincident on consecutive mesh levels).
+       */
+      bool d_fine_bdry_reps_var;
+
+      /*!
+       * @brief Boolean flag telling if this item uses time interpolation.
+       */
+      bool d_time_interpolate;
+
+      /*!
+       * @brief Refinement operator
+       */
+      tbox::Pointer<RefineOperator> d_oprefine;
+
+      /*!
+       * @brief Time interpolation operator
+       */
+      tbox::Pointer<TimeInterpolateOperator> d_optime;
+
+      /*!
+       * @brief Identifier of equivalence class where this item belongs.  All
+       * items of the same equivalence class will have the same value.
+       */ 
+      int d_class_id;
+
+      /*!
+       * @brief An array index telling where this item sits in an array of
+       * refine items.
+       */
+      int d_tag;
+
+      /*!
+       * @brief VariableFillPattern that can restrict the stencil of the data
+       * filled by the RefineSchedule. 
+       */ 
+      tbox::Pointer<VariableFillPattern> d_var_fill_pattern;
+   };
+
+   /*!
+    * @brief The constructor creates an empty array of refine classes.
+    */
+   RefineClasses();
+
+   /*!
+    * @brief The virtual destructor destroys the refinement data items owned
+    * by this object.
+    */
+   virtual ~RefineClasses();
+
+   /*!
+    * @brief Return number of equivalence classes maintained by this object.
+    */
+   int
+   getNumberOfEquivalenceClasses() const;
+
+   /*!
+    * @brief Return total number of refine items that have been registered and
+    * stored in the RefineClasses object
+    */
+   int
+   getNumberOfRefineItems() const;
+
+   /*!
+    * @brief Get a representative item for a given equivalence class.
+    *
+    * When assertion checking is active, the id will be checked for validity.
+    *
+    * @return Given an id indicating a specific equivalence class, one item
+    * from that class is returned, to represent the characteristics of the
+    * equivalence class.
+    *
+    * @param[in] equiv_class_id
+    */
+   const RefineClasses::Data&
+   getClassRepresentative(
+      int equiv_class_id) const;
+
+   /*!
+    * @brief Get a refine item from the array of all refine items held by
+    * this object.
+    *
+    * The internal storage of the refine items held by this class is not
+    * controlled by the user, so this method is intended for use when looping
+    * over all of the items, from 0 to getNumberOfRefineItems()-1, or when
+    * looping over the integers in the List obtained from getIterator().
+    *
+    * @return A refine item identified by an integer id.
+    *
+    * @param[in] refine_item_array_id
+    */
+   RefineClasses::Data&
+   getRefineItem(
+      const int refine_item_array_id);
+
+   /*!
+    * @brief Return an iterator for the list of array ids corresponding to the
+    * equivalence class with the given integer identifier.
+    *
+    * The number of quivalence classes can be determined via the
+    * getNumberOfEquivalenceClasses() member function.  Valid integer
+    * arguments are from 0 to getNumberOfEquivalenceClasses()-1.  When
+    * assertion checking is active, the id will be checked for validity.
+    *
+    * @note The list should not be modified through this iterator.
+    *
+    * @return The iterator iterates over a list of integers which are array
+    * ids that can be passed into getRefineItem().  The array ids in a
+    * single list all correspond to refine items in a single equivalence
+    * class.
+    *
+    * @param[in] equiv_class_id
+    */
+   tbox::List<int>::Iterator
+   getIterator(
+      int equiv_class_id);
+
+   /*!
+    * @brief Give a data item to the RefineClasses object, which will store
+    * it with the proper equivalence class.
+    *
+    * If the item belongs in an existing equivalence class, it will be added
+    * there, otherwise a new equivalence class will be created for this item.
+    * The internal data of the item will be changed so that it stores an
+    * integer identifier of its equivalence class.
+    *
+    * An error will occur with a descriptive message if the data item is
+    * not valid.  See checkRefineItem() for explanation of validity.
+    *
+    * If a null patch descriptor argument is passed (or ommitted), the
+    * descriptor associated with the variable database Singleton object will be
+    * used.
+    *
+    * @param[in,out] data
+    * @param[in] descriptor
+    */
+   void
+   insertEquivalenceClassItem(
+      RefineClasses::Data& data_item,
+      tbox::Pointer<hier::PatchDescriptor> descriptor =
+         tbox::Pointer<hier::PatchDescriptor>(NULL));
+
+   /*!
+    * @brief Check refine data item for validity.
+    *
+    * A refine data item is invalid if any of its patch data components are
+    * negative, or if its scratch data does not have sufficient ghost width
+    * for the stencil of the refine operator or the fill pattern, or if the
+    * data types of the source and destination data are not compatible
+    * to be copied from one to another.
+    *
+    * An error will occur with a descriptive message if the item is invalid.
+    *
+    * If a null patch descriptor argument is passed (or ommitted), the
+    * descriptor associated with the variable database Singleton object will
+    * be used.
+    *
+    * @return True if the item is valid.
+    *
+    * @param[in] data_item
+    * @param[in] descriptor
+    */
+   bool
+   checkRefineItem(
+      const RefineClasses::Data& data_item,
+      tbox::Pointer<hier::PatchDescriptor> descriptor =
+         tbox::Pointer<hier::PatchDescriptor>(NULL)) const;
+
+   /*!
+    * @brief Compare RefineClasses object with another RefineClasses object.
+    *
+    * This method checks if the equivalence classes held by the two objects
+    * match with regard to their patch data types, patch data ghost cell widths,
+    * operator stencils, etc.
+    *
+    * Two RefineClasses objects are consistent if they have the same number of
+    * equivalence classes and each corresponding equivalence class has the same
+    * characteristics as follows:
+    *
+    * <ul>
+    *    <li> Each corresponding patch data component (d_dst, d_src, etc.)
+    *         must have the same patch data type and ghost cell width.
+    *    <li> d_fine_bdry_reps_var flag must have the same value.
+    *    <li> The refinement operators, if any, have the same stencil width.
+    *    <li> The same time interpolation operator, if any, is used.
+    *    <li> The same variable fill pattern is used.
+    * </ul>
+    * 
+    * If a null patch descriptor argument is passed (or ommitted), the
+    * descriptor associated with the variable database Singleton object will
+    * be used.
+    *
+    * @return true if test_classes is consistent with this object.
+    *
+    * @param[in] test_classes  RefineClasses object to check for consistency
+    * @param[in] descriptor
+    */
+   bool
+   checkConsistency(
+      tbox::Pointer<RefineClasses> test_classes,
+      tbox::Pointer<hier::PatchDescriptor> descriptor =
+         tbox::Pointer<hier::PatchDescriptor>(NULL)) const;
+
+   /*!
+    * @brief Get the size that has been allocated for the array storing refine
+    * items.
+    *
+    * Note that this is not necessarily the same as the number of registered
+    * refine items, which can be retrieved using getNumberOfRefineItems().
+    * The refine item array is allocated to a default size and grown when
+    * necessary or when increaseRefineItemArraySize() is called.
+    */
+   int
+   getRefineItemArraySize() const;
+
+   /*!
+    * @brief Increase the allocated size of the array storing refine items.
+    *
+    * This should be used in cases where there is a large number of refine
+    * items being registered with the RefineAlgorithm, to avoid frequent
+    * resizing of the array.  If the size argument is less than the current
+    * allocated size of the array, then the size of the array is not changed.
+    *
+    * @param[in] size
+    */
+   void
+   increaseRefineItemArraySize(
+      const int size);
+
+   /*!
+    * @brief Print data for all refine items to the specified output stream.
+    *
+    * @param[out] stream
+    */
+   virtual void
+   printClassData(
+      std::ostream& stream) const;
+
+   /*!
+    * @brief Print single refine item to the specified output stream.
+    *
+    * @param[out] stream
+    * @param[in] data
+    */
+   void
+   printRefineItem(
+      std::ostream& stream,
+      const RefineClasses::Data& data) const;
+
+private:
+   RefineClasses(
+      const RefineClasses&);            // not implemented
+   void
+   operator = (
+      const RefineClasses&);                     // not implemented
+
+   /*!
+    * @brief Function to compare two patch data components (with given
+    * descriptor indices) for consistency.
+    *
+    * Two components are consistent if the are of the same patch data type and
+    * have the same ghost width.
+    *
+    * @return true if consistent; false otherwise.
+    *
+    * @param[in] item_id1
+    * @param[in] item_id2
+    * @param[in] pd  descriptor
+    */
+   bool
+   checkPatchDataItemConsistency(
+      int item_id1,
+      int item_id2,
+      tbox::Pointer<hier::PatchDescriptor> pd) const;
+
+   /*!
+    * @brief Function to determine the equivalence class where a refine data
+    * item belongs.
+    *
+    * The refine data item is compared to existing equivalence classes to
+    * determine if it can be a member of any of them.
+    *
+    * @return If the item matches an existing equivalence class the integer
+    * identifier for that equivalence class is returned.  Otherwise -1 is
+    * returned.
+    *
+    * @param[in] data
+    * @param[in] descriptor 
+    */
+   int
+   getEquivalenceClassIndex(
+      const RefineClasses::Data& data,
+      tbox::Pointer<hier::PatchDescriptor> descriptor) const;
+
+   /*!
+    * The default length of the refine item array.
+    */
+   static int s_default_refine_item_array_size;
+
+   /*!
+    * The array of refine items.
+    */
+   tbox::Array<Data> d_refine_classes_data_items;
+
+   /*!
+    * The array managing equivalence classes.  Each element of the array
+    * represents one equivalence class.  Each List holds integers identifying
+    * which items are part of an equivalence class.  The integers index into
+    * the array d_refine_classes_data_items.
+    */
+   tbox::Array<tbox::List<int> > d_equivalence_class_ids;
+
+   /*!
+    * The number of refine items that have been registered.
+    */
+   int d_num_refine_items;
+
+};
+
+}
+}
+
+#ifdef SAMRAI_INLINE
+#include "SAMRAI/xfer/RefineClasses.I"
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/RefineCopyTransaction.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/RefineCopyTransaction.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,220 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Communication transaction for data copies during data refining 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_RefineCopyTransaction_C
+#define included_xfer_RefineCopyTransaction_C
+
+#include "SAMRAI/xfer/RefineCopyTransaction.h"
+
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace xfer {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialization, set/unset functions for static array of refine items. *
+ *                                                                       *
+ *************************************************************************
+ */
+
+const RefineClasses::Data **
+RefineCopyTransaction::s_refine_items =
+   (const RefineClasses::Data **)NULL;
+int RefineCopyTransaction::s_num_refine_items = 0;
+
+void RefineCopyTransaction::setRefineItems(
+   const RefineClasses::Data** refine_items,
+   int num_refine_items)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(refine_items != (const RefineClasses::Data **)NULL);
+   TBOX_ASSERT(num_refine_items >= 0);
+#endif
+   s_refine_items = refine_items;
+   s_num_refine_items = num_refine_items;
+}
+
+void RefineCopyTransaction::unsetRefineItems()
+{
+   s_refine_items = (const RefineClasses::Data **)NULL;
+   s_num_refine_items = 0;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor sets state of transaction.                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+RefineCopyTransaction::RefineCopyTransaction(
+   tbox::Pointer<hier::PatchLevel>& dst_level,
+   tbox::Pointer<hier::PatchLevel>& src_level,
+   tbox::Pointer<hier::BoxOverlap> overlap,
+   const hier::MappedBox& dst_mapped_box,
+   const hier::MappedBox& src_mapped_box,
+   int refine_item_id) :
+   d_dst_patch(0),
+   d_dst_patch_rank(dst_mapped_box.getOwnerRank()),
+   d_src_patch(0),
+   d_src_patch_rank(src_mapped_box.getOwnerRank()),
+   d_overlap(overlap),
+   d_refine_item_id(refine_item_id),
+   d_incoming_bytes(0),
+   d_outgoing_bytes(0)
+{
+   TBOX_ASSERT(!dst_level.isNull());
+   TBOX_ASSERT(!src_level.isNull());
+   TBOX_ASSERT(!overlap.isNull());
+   TBOX_ASSERT(dst_mapped_box.getLocalId() >= 0);
+   TBOX_ASSERT(src_mapped_box.getLocalId() >= 0);
+   TBOX_ASSERT(refine_item_id >= 0);
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst_level,
+      *src_level,
+      dst_mapped_box,
+      src_mapped_box);
+
+   // Note: s_num_coarsen_items cannot be used at this point!
+
+   if ( d_dst_patch_rank == dst_level->getMappedBoxLevel()->getRank() ) {
+      d_dst_patch = dst_level->getPatch( dst_mapped_box.getGlobalId() );
+   } 
+   if ( d_src_patch_rank == dst_level->getMappedBoxLevel()->getRank() ) {
+      d_src_patch = src_level->getPatch( src_mapped_box.getGlobalId() );
+   } 
+}
+
+RefineCopyTransaction::~RefineCopyTransaction()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Functions overridden in tbox::Transaction base class.                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool RefineCopyTransaction::canEstimateIncomingMessageSize()
+{
+   bool can_estimate = false;
+   if ( !d_src_patch.isNull() ) {
+      can_estimate = 
+         d_src_patch->getPatchData(s_refine_items[d_refine_item_id]->d_src)
+                    ->canEstimateStreamSizeFromBox();
+   } else {
+      can_estimate =
+         d_dst_patch->getPatchData(s_refine_items[d_refine_item_id]->d_scratch)
+                    ->canEstimateStreamSizeFromBox();
+   }
+   return can_estimate;
+}
+
+size_t RefineCopyTransaction::computeIncomingMessageSize()
+{
+   d_incoming_bytes =
+      d_dst_patch->getPatchData(s_refine_items[d_refine_item_id]->d_scratch)
+                 ->getDataStreamSize(*d_overlap);
+   return d_incoming_bytes;
+}
+
+size_t RefineCopyTransaction::computeOutgoingMessageSize()
+{
+   d_outgoing_bytes =
+      d_src_patch->getPatchData(s_refine_items[d_refine_item_id]->d_src)
+                 ->getDataStreamSize(*d_overlap);
+   return d_outgoing_bytes;
+}
+
+void RefineCopyTransaction::packStream(
+   tbox::MessageStream& stream)
+{
+   d_src_patch->getPatchData(s_refine_items[d_refine_item_id]->d_src)
+              ->packStream(stream, *d_overlap);
+}
+
+void RefineCopyTransaction::unpackStream(
+   tbox::MessageStream& stream)
+{
+   d_dst_patch->getPatchData(s_refine_items[d_refine_item_id]->d_scratch)
+              ->unpackStream(stream, *d_overlap);
+}
+
+void RefineCopyTransaction::copyLocalData()
+{
+   hier::PatchData& dst_data =
+      *d_dst_patch->getPatchData(s_refine_items[d_refine_item_id]->d_scratch);
+
+   const hier::PatchData& src_data =
+      *d_src_patch->getPatchData(s_refine_items[d_refine_item_id]->d_src);
+
+   dst_data.copy(src_data, *d_overlap);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Function to print state of transaction.                               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void RefineCopyTransaction::printClassData(
+   std::ostream& stream) const
+{
+   stream << "Refine Copy Transaction" << std::endl;
+   stream << "   refine item array:        "
+          << (RefineClasses::Data **)s_refine_items << std::endl;
+   stream << "   num refine items:       " << s_num_refine_items << std::endl;
+   stream << "   destination patch rank:       " << d_dst_patch_rank
+          << std::endl;
+   stream << "   source patch rank:            " << d_src_patch_rank
+          << std::endl;
+   stream << "   refine item id:         " << d_refine_item_id << std::endl;
+   stream << "   destination patch data id: "
+   << s_refine_items[d_refine_item_id]->d_scratch << std::endl;
+   stream << "   source patch data id:      "
+   << s_refine_items[d_refine_item_id]->d_src << std::endl;
+   stream << "   incoming bytes:         " << d_incoming_bytes << std::endl;
+   stream << "   outgoing bytes:         " << d_outgoing_bytes << std::endl;
+   stream << "   destination patch:           "
+          << (hier::Patch *)d_dst_patch << std::endl;
+   stream << "   source patch:           "
+          << (hier::Patch *)d_src_patch << std::endl;
+   stream << "   overlap:                " << std::endl;
+   d_overlap->print(stream);
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/RefineCopyTransaction.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/RefineCopyTransaction.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,186 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Communication transaction for data copies during data refining 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_RefineCopyTransaction
+#define included_xfer_RefineCopyTransaction
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/RefineClasses.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Transaction.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Class RefineCopyTransaction represents a single copy communication
+ * transaction between two processors or a local data copy for refine schedules.
+ * Note that to there is an implicit hand-shaking between objects of this class
+ * and the RefineSchedule object that constructs them.  Following the refine
+ * schedule implementation, the source patch data index for a copy transaction
+ * always refers to the source data and the destination patch data index for a copy
+ * transaction is always the scratch data, all as defined in the
+ * RefineClasses class.
+ *
+ * @see xfer::RefineSchedule
+ * @see xfer::RefineClasses
+ * @see tbox::Schedule
+ * @see tbox::Transaction
+ */
+
+class RefineCopyTransaction:public tbox::Transaction
+{
+public:
+   /*!
+    * Static member function to set the array of refine class data items that
+    * is shared by all object instances of this copy transaction class during
+    * data transfers.  The array must be set before any transactions are executed.
+    * The array is set in the RefineSchedule class.
+    */
+   static void
+   setRefineItems(
+      const RefineClasses::Data** refine_items,
+      int num_refine_items);
+
+   /*!
+    * Static member function to unset the array of refine class data items that
+    * is shared by all object instances of this copy transaction class during
+    * data transfers.  The unset function is used to prevent erroneous execution
+    * of different schedules.  The array is unset in the RefineSchedule class.
+    */
+   static void
+   unsetRefineItems();
+
+   /*!
+    * Construct a transaction with the specified source and destination
+    * levels, patches, and patch data components found in the refine class
+    * item with the given id owned by the calling refine schedule.  In general,
+    * this constructor is called by a RefineSchedule object for each data
+    * transaction (not involving time interpolation) that must occur.  This
+    * transaction will be responsible for one of the following: (1) a local data
+    * copy, (2) packing a message stream with source patch data, or (3) unpacking
+    * destination patch data from a message stream.
+    *
+    * @param dst_level        tbox::Pointer to destination patch level.
+    * @param src_level        tbox::Pointer to source patch level.
+    * @param overlap          tbox::Pointer to overlap region between patches.
+    * @param dst_patch        Integer index of destination patch in destination
+    *                         patch level.
+    * @param src_patch        Integer index of source patch in source patch level.
+    * @param refine_item_id   Integer id of refine data item owned by refine schedule.
+    *
+    * When assertion checking is active, an assertion will result if any of the pointer
+    * arguments is null, or if any of the integer arguments are invalid (i.e., < 0);
+    */
+   explicit RefineCopyTransaction(
+      tbox::Pointer<hier::PatchLevel>& dst_level,
+      tbox::Pointer<hier::PatchLevel>& src_level,
+      tbox::Pointer<hier::BoxOverlap> overlap,
+      const hier::MappedBox& dst_mapped_box,
+      const hier::MappedBox& src_mapped_box,
+      int refine_item_id);
+
+   /*!
+    * The virtual destructor for the copy transaction releases all
+    * memory associated with the transaction.
+    */
+   virtual ~RefineCopyTransaction();
+
+   /*!
+    * Return a boolean indicating whether this transaction can estimate
+    * the size of an incoming message.  If this is false, then a different
+    * communication protocol kicks in and the message size is transmitted
+    * between mapped_boxes.
+    */
+   virtual bool
+   canEstimateIncomingMessageSize();
+
+   /*!
+    * Return the integer buffer space (in bytes) needed for the incoming message.
+    * This routine is only called if the transaction can estimate the
+    * size of the incoming message.  See canEstimateIncomingMessageSize().
+    */
+   virtual size_t
+   computeIncomingMessageSize();
+
+   /*!
+    * Return the integer buffer space (in bytes) needed for the outgoing message.
+    */
+   virtual size_t
+   computeOutgoingMessageSize();
+
+   /*!
+    * Return the sending processor number for the communications transaction.
+    */
+   virtual int
+   getSourceProcessor() { return d_src_patch_rank; }
+
+   /*!
+    * Return the receiving processor number for the communications transaction.
+    */
+   virtual int
+   getDestinationProcessor() { return d_dst_patch_rank; }
+
+   /*!
+    * Pack the transaction data into the message stream.
+    */
+   virtual void
+   packStream(
+      tbox::MessageStream& stream);
+
+   /*!
+    * Unpack the transaction data from the message stream.
+    */
+   virtual void
+   unpackStream(
+      tbox::MessageStream& stream);
+
+   /*!
+    * Perform the local data copy for the transaction.
+    */
+   virtual void
+   copyLocalData();
+
+   /*!
+    * Print out transaction information.
+    */
+   virtual void
+   printClassData(
+      std::ostream& stream) const;
+
+private:
+   RefineCopyTransaction(
+      const RefineCopyTransaction&);                    // not implemented
+   void
+   operator = (
+      const RefineCopyTransaction&);                    // not implemented
+
+   static const RefineClasses::Data** s_refine_items;
+   static int s_num_refine_items;
+
+   tbox::Pointer<hier::Patch> d_dst_patch;
+   int                        d_dst_patch_rank;
+   tbox::Pointer<hier::Patch> d_src_patch;
+   int                        d_src_patch_rank;
+   tbox::Pointer<hier::BoxOverlap> d_overlap;
+   int d_refine_item_id;
+   int d_incoming_bytes;
+   int d_outgoing_bytes;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/RefineOperator.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/RefineOperator.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,118 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract base class for spatial refinement operators. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_RefineOperator_C
+#define included_xfer_RefineOperator_C
+
+#include "SAMRAI/xfer/RefineOperator.h"
+
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+std::multimap<std::string, RefineOperator *> RefineOperator::s_lookup_table;
+
+tbox::StartupShutdownManager::Handler
+RefineOperator::s_finalize_handler(
+   0,
+   0,
+   0,
+   RefineOperator::finalizeCallback,
+   tbox::StartupShutdownManager::priorityList);
+
+RefineOperator::RefineOperator(
+   const tbox::Dimension& dim,
+   const std::string& name):
+   d_name(name),
+   d_dim(dim)
+{
+   registerInLookupTable(name);
+}
+
+RefineOperator::~RefineOperator()
+{
+   removeFromLookupTable(d_name);
+}
+
+/*
+ *************************************************************************
+ * Register this in the static look-up table.
+ *************************************************************************
+ */
+void RefineOperator::registerInLookupTable(
+   const std::string& name)
+{
+   s_lookup_table.insert(std::pair<std::string, RefineOperator *>(name, this));
+}
+
+void RefineOperator::removeFromLookupTable(
+   const std::string& name)
+{
+   /*
+    * The lookup table might be empty if static RefineOperator's are used
+    * in which case the table will have been removed before the statics
+    * are destroyed.
+    */
+   if (!s_lookup_table.empty()) {
+      std::multimap<std::string, RefineOperator *>::iterator mi =
+         s_lookup_table.find(name);
+      TBOX_ASSERT(mi != s_lookup_table.end());
+      while (mi->first == name && mi->second != this) {
+         ++mi;
+         TBOX_ASSERT(mi != s_lookup_table.end());
+      }
+      TBOX_ASSERT(mi->first == name);
+      TBOX_ASSERT(mi->second == this);
+      mi->second = NULL;
+      s_lookup_table.erase(mi);
+   }
+}
+
+/*
+ *************************************************************************
+ * Compute the max refine stencil width from all constructed
+ * refine operators.
+ *************************************************************************
+ */
+hier::IntVector
+RefineOperator::getMaxRefineOpStencilWidth(
+   const tbox::Dimension& dim)
+{
+   hier::IntVector max_width(dim, 0);
+
+   for (std::multimap<std::string, RefineOperator *>::const_iterator
+        mi = s_lookup_table.begin(); mi != s_lookup_table.end(); ++mi) {
+      const RefineOperator* op = mi->second;
+      if (op->getDim() == dim) {
+         max_width.max(op->getStencilWidth());
+      }
+   }
+
+   return max_width;
+}
+
+const tbox::Dimension& RefineOperator::getDim() const
+{
+   return d_dim;
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+void RefineOperator::finalizeCallback()
+{
+   s_lookup_table.clear();
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/RefineOperator.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/RefineOperator.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,201 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract base class for spatial refinement operators. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_RefineOperator
+#define included_xfer_RefineOperator
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+
+#include <string>
+#include <map>
+
+namespace SAMRAI {
+namespace xfer {
+
+/**
+ * Class RefineOperator<DIM> is an abstract base class for each
+ * spatial refinement operator used in the SAMRAI framework.  This class
+ * defines the interface between numerical refinement routines and the
+ * rest of the framework.  Each concrete refinement operator subclass
+ * must provide three four operations:
+ *
+ *
+ *
+ * - \b (1) {an implementation of the refinement operation
+ *            appropriate for its corresponding patch data type.}
+ * - \b (2) {a function that determines whether or not the operator
+ *             matches an arbitrary request for a refinement operator.}
+ * - \b (3) {a function that returns the stencil width of the operator
+ *             (i.e., the number of ghost cells needed by the operator).}
+ * - \b (4) {a function that returns an integer stating the priority of the
+ *             operator with respect to other refinement operators.}
+ *
+ *
+ *
+ * To add a new refinement operator (either for a new patch data type
+ * or for a new time refinement routine on an existing type), define
+ * the operator by inheriting from this abstract base class.  The operator
+ * subclass must implement the refinement operation in the refine()
+ * fnction, and provide a response to a general operator request in the
+ * findRefineOperator() function.  The stencil width and operator priority
+ * must be returned from the getStencilWidth() and getOperatorPriority()
+ * functions, respectively.  Then, the new operator must be added to the
+ * operator list for the appropriate transfer geometry object using the
+ * Geometry<DIM>::addSpatialRefineOperator() function.
+ *
+ * Since spatial refinement operators usually depend on patch data centering
+ * and data type as well as the mesh coordinate system, they are defined
+ * in the <EM>geometry</EM> package.
+ *
+ * @see xfer::Geometry
+ */
+
+class RefineOperator:public tbox::DescribedClass
+{
+public:
+   /*!
+    * @brief Construct the object with a name to allow the xfer::Geometry
+    * class to look up the object using a string.
+    *
+    * The constructor must be given a name.  The object will be
+    * registered under this name with the xfer::Geometry class.
+    * The name must be unique, as duplicate names are not allowed.
+    */
+   explicit RefineOperator(
+      const tbox::Dimension& dim,
+      const std::string& name);
+
+   /**
+    * The virtual destructor for the refinement operator does
+    * nothing interesting.
+    */
+   virtual ~RefineOperator();
+
+   /**
+    * Return true if the refinement operation matches the variable and
+    * name std::string identifier request; false, otherwise.
+    */
+   virtual bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const = 0;
+
+   /**
+    * Return name std::string identifier of the refinement operation.
+    */
+   virtual const std::string&
+   getOperatorName() const = 0;
+
+   /**
+    * Return the priority of this operator relative to other refinement
+    * operators.  The SAMRAI transfer routines guarantee that refinement
+    * using operators with lower priority values will be performed before
+    * those with higher priority.
+    */
+   virtual int
+   getOperatorPriority() const = 0;
+
+   /**
+    * Return the stencil width associated with the refinement operator.
+    * The SAMRAI transfer routines guarantee that the source patch will
+    * contain sufficient ghost cell data surrounding the interior to
+    * satisfy the stencil width requirements for each refinement operator.
+    */
+   virtual hier::IntVector
+   getStencilWidth() const = 0;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch. The refinement operation is performed
+    * on the intersection of the destination patch and the boxes contained
+    * in fine_overlap. The coarse patch is guaranteed to contain sufficient
+    * data for the stencil width of the refinement operator.
+    */
+   virtual void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const = 0;
+
+   /*!
+    * @brief Get the max stencil width of all refine operators.
+    *
+    * The max stencil width computed from all registered (constructed)
+    * refine operators.
+    */
+   static hier::IntVector
+   getMaxRefineOpStencilWidth(
+      const tbox::Dimension& dim);
+
+   /**
+    * Return the dimension of this object.
+    */
+   const tbox::Dimension&
+   getDim() const;
+
+private:
+   RefineOperator(
+      const RefineOperator&);                   // not implemented
+   void
+   operator = (
+      const RefineOperator&);                           // not implemented
+
+   /*
+    * TODO SGS Rich has better way of doing this.
+    */
+
+   /*!
+    * @brief Associate the given name with this operator.
+    *
+    * Registering an operator with a name allows that operator
+    * to be looked up by name.  Operators registered must have
+    * unique names.
+    */
+   void
+   registerInLookupTable(
+      const std::string& name);
+
+   /*!
+    * @brief Remove the operator with the given name.
+    *
+    */
+   void
+   removeFromLookupTable(
+      const std::string& name);
+
+   /*!
+    * @brief Method registered with ShutdownManager to cleanup statics.
+    */
+   static void
+   finalizeCallback();
+
+   const std::string d_name;
+
+   const tbox::Dimension d_dim;
+
+   static std::multimap<std::string, RefineOperator *> s_lookup_table;
+
+   static tbox::StartupShutdownManager::Handler
+   s_finalize_handler;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/RefinePatchStrategy.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/RefinePatchStrategy.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,141 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Strategy interface to user routines for refining AMR data. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_RefinePatchStrategy_C
+#define included_xfer_RefinePatchStrategy_C
+
+#include "SAMRAI/xfer/RefinePatchStrategy.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*
+ *************************************************************************
+ *									*
+ * The default constructor and virtual destructor do nothing             *
+ * particularly interesting.		                                *
+ *									*
+ *************************************************************************
+ */
+
+RefinePatchStrategy::RefinePatchStrategy(
+   const tbox::Dimension& dim):
+   d_dim(dim)
+{
+   registerObject();
+}
+
+RefinePatchStrategy::~RefinePatchStrategy()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Loop over all fill boxes and call the user-defined preprocesses.	*
+ *									*
+ *************************************************************************
+ */
+
+void RefinePatchStrategy::preprocessRefineBoxes(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const hier::BoxList& fine_boxes,
+   const hier::IntVector& ratio)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS3(fine, coarse, ratio);
+
+   for (hier::BoxList::Iterator b(fine_boxes); b; b++) {
+      this->preprocessRefine(fine, coarse, b(), ratio);
+   }
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Loop over all fill boxes and call the user-defined postprocesses.	*
+ *									*
+ *************************************************************************
+ */
+
+void RefinePatchStrategy::postprocessRefineBoxes(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const hier::BoxList& fine_boxes,
+   const hier::IntVector& ratio)
+{
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS3(d_dim, fine, coarse, ratio);
+
+   for (hier::BoxList::Iterator b(fine_boxes); b; b++) {
+      this->postprocessRefine(fine, coarse, b(), ratio);
+   }
+}
+
+/*
+ *************************************************************************
+ * Register this in the static registry.
+ *************************************************************************
+ */
+void RefinePatchStrategy::registerObject()
+{
+   std::set<RefinePatchStrategy *>& current_objects =
+      RefinePatchStrategy::getCurrentObjects();
+   current_objects.insert(this);
+}
+
+/*
+ *************************************************************************
+ * Return the static registry.
+ *************************************************************************
+ */
+std::set<RefinePatchStrategy *>& RefinePatchStrategy::getCurrentObjects()
+{
+   static std::set<RefinePatchStrategy *> current_objects;
+   return current_objects;
+}
+
+/*
+ *************************************************************************
+ *************************************************************************
+ */
+const tbox::Dimension& RefinePatchStrategy::getDim() const
+{
+   return d_dim;
+}
+
+/*
+ *************************************************************************
+ * Compute the max refine stencil width from all constructed
+ * refine patch strategies.
+ *************************************************************************
+ */
+hier::IntVector
+RefinePatchStrategy::getMaxRefineOpStencilWidth(
+   const tbox::Dimension& dim)
+{
+   hier::IntVector max_width(dim, 0);
+
+   std::set<RefinePatchStrategy *>& current_objects =
+      RefinePatchStrategy::getCurrentObjects();
+   for (std::set<RefinePatchStrategy *>::const_iterator
+        si = current_objects.begin(); si != current_objects.end(); ++si) {
+      const RefinePatchStrategy* op = *si;
+      if (op->getDim() == dim) {
+         max_width.max(op->getRefineOpStencilWidth());
+      }
+   }
+
+   return max_width;
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/RefinePatchStrategy.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/RefinePatchStrategy.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,248 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Strategy interface to user routines for refining AMR data. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_RefinePatchStrategy
+#define included_xfer_RefinePatchStrategy
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+
+#include <set>
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Abstract base class for user-defined patch data refining operations
+ * and physical boundary filling operations.
+ *
+ * RefinePatchStrategy provides an interface for a user to supply methods
+ * for application-specific refining of data between levels in an
+ * AMR patch hierarchy and filling of physical boundary values.
+ * A concrete subclass must define four member functions to perform
+ * the following tasks:
+ *
+ * <ul>
+ *    <li> define maximum stencil width for user-defined refine operations
+ *    <li> fill physical boundary conditions
+ *    <li> preprocess the interpolation
+ *    <li> postprocess the interpolation
+ * </ul>
+ *
+ * Note that the preprocess member function is called before standard data
+ * refine using RefineOperators and the postprocessor member function is called
+ * afterwards.
+ *
+ * There are two versions of the preprocess and postprocess functions.  The
+ * default abstract function only takes a single box.  The user may also
+ * over-ride preprocess and postprocess functions that take a box list and
+ * process an entire patch at one time.  By default, the box list version
+ * loops over all of the boxes in the box list and calls the single box version.
+ *
+ * @see xfer::RefineAlgorithm
+ * @see xfer::RefineSchedule
+ */
+
+class RefinePatchStrategy:
+   public virtual tbox::DescribedClass
+{
+public:
+
+   /*!
+    * @brief Get the maximum stencil width over all RefinePatchStrategy objects
+    * used in an application.
+    *
+    * @return The maximum of the return values of calls to
+    * getRefineOpStencilWidth() for every RefinePatchStrategy of the
+    * given Dimension used in an application.
+    *
+    * @param[in] dim   Only objects with this dimension will be used to
+    *                  calculate the max.  If a RefinePatchStrategy with
+    *                  another dimension is registered, it will be ignored.
+    */
+   static hier::IntVector
+   getMaxRefineOpStencilWidth(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Constructor.
+    *
+    * The constructor will register the constructed object with a static
+    * set that manages all RefinePatchStrategy objects in an application.
+    */
+   explicit RefinePatchStrategy(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Destructor
+    */
+   virtual ~RefinePatchStrategy();
+
+   /*!
+    * @brief Pure virtual function interface for physical boundary filling.
+    *
+    * Set data in ghost regions at patch boundaries that touch the
+    * physical domain boundary.  The specific data values set in physical
+    * boundary ghost regions are determined by the boundary conditions needed
+    * by the user application.  The patch data components that should be set 
+    * in this function correspond to the "scratch" components specified in calls
+    * to the registerRefine() function in the RefineAlgorithm class.
+    *
+    * @param[out] patch               Patch on which to fill boundary data.
+    * @param[in] fill_time            Simulation time for boundary filling.
+    * @param[in] ghost_width_to_fill  Maximum ghost width to fill over
+    *                                 all registered scratch components.
+    */
+   virtual void
+   setPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const double fill_time,
+      const hier::IntVector& ghost_width_to_fill) = 0;
+
+   /*!
+    * @brief Return maximum stencil width needed for user-defined
+    * data refinement operations performed by this object.
+    *
+    * This is needed to determine the correct interpolatin data dependencies
+    * and to ensure that the data has a sufficient amount of ghost width.
+    *
+    * For any user-defined interpolation operations implemented in the
+    * preprocess or postprocess methods, return the maximum stencil needed
+    * on a coarse patch to refine data to a fine patch.
+    */
+   virtual hier::IntVector
+   getRefineOpStencilWidth() const = 0;
+
+   /*!
+    * @brief Perform user-defined patch data refinement operations.
+    *
+    * This member function is called before standard refine operations
+    * (expressed using concrete subclasses of the RefineOperator base class).
+    * The preprocess function must refine data from the scratch components
+    * on the coarse patch into the scratch components of the fine patch
+    * on the specified fine box region.  Recall that the scratch components
+    * are specified in calls to the registerRefine() function in the
+    * RefineAlgorithm class.
+    *
+    * @param[out] fine     Fine patch containing destination data.
+    * @param[in] coarse    Coarse patch containing source data.
+    * @param[in] fine_box  Box region on fine patch into which data is refined.
+    * @param[in] ratio     Refinement ratio between coarse and fine patches.
+    */
+   virtual void
+   preprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio) = 0;
+
+   /*!
+    * @brief Perform user-defined patch data refinement operations.
+    *
+    * This member function is called after standard refine operations
+    * (expressed using concrete subclasses of the RefineOperator base class).
+    * The preprocess function must refine data from the scratch components
+    * on the coarse patch into the scratch components of the fine patch
+    * on the specified fine box region.  Recall that the scratch components
+    * are specified in calls to the registerRefine() function in the
+    * RefineAlgorithm class.
+    *
+    * @param[out] fine     Fine patch containing destination data.
+    * @param[in] coarse    Coarse patch containing source data.
+    * @param[in] fine_box  Box region on fine patch into which data is refined.     * @param[in] ratio     Refinement ratio between coarse and fine patches.
+    */
+   virtual void
+   postprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio) = 0;
+
+   /*!
+    * Perform user-defined patch data refinement operations on a list of boxes.
+    *
+    * This member function is called before standard refining operations 
+    * (expressed using concrete subclasses of the RefineOperator base class).
+    *
+    * The default implementation of this virtual function loops over the
+    * box list and calls the preprocessRefine() method for a single box.
+    *
+    * @param[out] fine   Fine patch containing destination data.
+    * @param[in] coarse  Coarse patch containing source data.
+    * @param[in] fine_boxes  List of box regions on fine patch into which data
+    *                        is refined.
+    * @param[in] ratio     Refinement ratio between coarse and fine patches. 
+    */
+   virtual void
+   preprocessRefineBoxes(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::BoxList& fine_boxes,
+      const hier::IntVector& ratio);
+
+   /*!
+    * Perform user-defined patch data refinement operations on a list of boxes.
+    *
+    * This member function is called after standard refining operations
+    * (expressed using concrete subclasses of the RefineOperator base class).
+    *
+    * The default implementation of this virtual function loops over the
+    * box list and calls the postprocessRefine() method for a single box.
+    *
+    * @param[out] fine   Fine patch containing destination data.
+    * @param[in] coarse  Coarse patch containing source data.
+    * @param[in] fine_boxes  List of box regions on fine patch into which data
+    *                        is refined.
+    * @param[in] ratio     Refinement ratio between coarse and fine patches.
+    */
+   virtual void
+   postprocessRefineBoxes(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::BoxList& fine_boxes,
+      const hier::IntVector& ratio);
+
+   /*!
+    * @brief Return the dimension of this object.
+    */
+   const tbox::Dimension&
+   getDim() const;
+
+private:
+
+   /*!
+    * @brief Get the set of RefinePatchStrategy objects that have been
+    * registered.
+    */
+   static std::set<RefinePatchStrategy *>&
+   getCurrentObjects();
+
+   /*!
+    * @brief Dimension of the object.
+    */
+   const tbox::Dimension d_dim;
+
+   /*!
+    * @brief Register the object with a set of all RefinePatchStrategy
+    * objects used in an application.
+    */
+   void
+   registerObject();
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/RefineSchedule.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/RefineSchedule.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,3599 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Refine schedule for data transfer between AMR levels 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_RefineSchedule_C
+#define included_xfer_RefineSchedule_C
+
+#include "SAMRAI/xfer/RefineSchedule.h"
+#include "SAMRAI/xfer/BoxGeometryVariableFillPattern.h"
+#include "SAMRAI/xfer/PatchLevelFullFillPattern.h"
+#include "SAMRAI/xfer/RefineCopyTransaction.h"
+#include "SAMRAI/xfer/RefinePatchStrategy.h"
+#include "SAMRAI/xfer/RefineScheduleConnectorWidthRequestor.h"
+#include "SAMRAI/xfer/RefineTimeTransaction.h"
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/BoxUtilities.h"
+#include "SAMRAI/hier/ComponentSelector.h"
+#include "SAMRAI/hier/MappedBoxContainerUtils.h"
+#include "SAMRAI/hier/MappedBoxLevelConnectorUtils.h"
+#include "SAMRAI/hier/MappingConnectorAlgorithm.h"
+#include "SAMRAI/hier/MappedBoxSet.h"
+#include "SAMRAI/hier/OverlapConnectorAlgorithm.h"
+#include "SAMRAI/hier/PeriodicShiftCatalog.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/hier/PatchGeometry.h"
+#include "SAMRAI/tbox/AsyncCommPeer.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/tbox/StartupShutdownManager.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <cassert>
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace xfer {
+
+static const std::string logbord;
+static const std::string errbord("E-> ");
+
+#define BIG_GHOST_CELL_WIDTH (10)
+
+bool RefineSchedule::s_extra_debug = false;
+bool RefineSchedule::s_barrier_and_time = false;
+
+tbox::Pointer<tbox::Timer> RefineSchedule::t_fill_data;
+tbox::Pointer<tbox::Timer> RefineSchedule::t_recursive_fill;
+tbox::Pointer<tbox::Timer> RefineSchedule::t_refine_scratch_data;
+tbox::Pointer<tbox::Timer> RefineSchedule::t_finish_sched_const;
+tbox::Pointer<tbox::Timer> RefineSchedule::t_finish_sched_const_recurse;
+tbox::Pointer<tbox::Timer> RefineSchedule::t_gen_comm_sched;
+tbox::Pointer<tbox::Timer> RefineSchedule::t_bridge_connector;
+tbox::Pointer<tbox::Timer> RefineSchedule::t_modify_connector;
+tbox::Pointer<tbox::Timer> RefineSchedule::t_make_seq_map;
+tbox::Pointer<tbox::Timer> RefineSchedule::t_shear;
+tbox::Pointer<tbox::Timer> RefineSchedule::t_misc1;
+tbox::Pointer<tbox::Timer> RefineSchedule::t_barrier_and_time;
+tbox::Pointer<tbox::Timer> RefineSchedule::t_get_global_mapped_box_count;
+tbox::Pointer<tbox::Timer> RefineSchedule::t_coarse_shear;
+tbox::Pointer<tbox::Timer> RefineSchedule::t_build_supp_mapped_box_level;
+tbox::Pointer<tbox::Timer> RefineSchedule::t_misc2;
+tbox::Pointer<tbox::Timer> RefineSchedule::t_bridge_supp_hiercoarse;
+tbox::Pointer<tbox::Timer> RefineSchedule::t_bridge_dst_hiercoarse;
+tbox::Pointer<tbox::Timer> RefineSchedule::t_make_supp_level;
+tbox::Pointer<tbox::Timer> RefineSchedule::t_make_supp_to_unfilled;
+tbox::Pointer<tbox::Timer> RefineSchedule::t_invert_edges;
+tbox::Pointer<tbox::Timer> RefineSchedule::t_construct_send_trans;
+tbox::Pointer<tbox::Timer> RefineSchedule::t_construct_recv_trans;
+
+tbox::StartupShutdownManager::Handler
+RefineSchedule::s_initialize_finalize_handler(
+   RefineSchedule::initializeCallback,
+   0,
+   0,
+   RefineSchedule::finalizeCallback,
+   tbox::StartupShutdownManager::priorityTimers);
+
+/*
+ **************************************************************************
+ *
+ * Create a refine schedule that copies data from the source level into
+ * the destination level on the components represented by the refine
+ * list.  Ony data on the intersection of the two levels will be
+ * copied. It is assumed that the index spaces of the source and
+ * destination levels are "consistent"; i.e., they represent the same
+ * grid resolution.  The levels do not have to be part of the same
+ * AMR patch hierarchy, however.
+ *
+ **************************************************************************
+ */
+
+RefineSchedule::RefineSchedule(
+   tbox::Pointer<PatchLevelFillPattern> dst_level_fill_pattern,
+   tbox::Pointer<hier::PatchLevel> dst_level,
+   tbox::Pointer<hier::PatchLevel> src_level,
+   const tbox::Pointer<xfer::RefineClasses> refine_classes,
+   tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory,
+   xfer::RefinePatchStrategy* patch_strategy,
+   bool use_time_refinement):
+   d_max_stencil_width(dst_level->getDim()),
+   d_max_scratch_gcw(dst_level->getDim()),
+   d_boundary_fill_ghost_width(dst_level->getDim()),
+   d_domain_box(dst_level->getDim()),
+   d_periodic_shift(dst_level->getDim()),
+   d_unfilled_mapped_box_level(dst_level->getDim()),
+   d_src_masks(dst_level->getDim()),
+   d_dst_level_fill_pattern(dst_level_fill_pattern),
+   d_constructing_internal_schedule(false)
+{
+   TBOX_ASSERT(!dst_level.isNull());
+   TBOX_ASSERT(!src_level.isNull());
+   TBOX_ASSERT(!refine_classes.isNull());
+#ifdef DEBUG_CHECK_DIM_ASSERTIONS
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*dst_level, *src_level);
+   if (patch_strategy) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*dst_level, *patch_strategy);
+   }
+#endif
+
+   const tbox::Dimension& dim(dst_level->getDim());
+
+   d_transaction_factory = transaction_factory;
+
+   /*
+    * Initial values; some will change in setup operations.
+    */
+
+   d_dst_level = dst_level;
+   d_src_level = src_level;
+
+   d_refine_patch_strategy = patch_strategy;
+
+   d_number_refine_items = 0;
+   d_refine_items = (const xfer::RefineClasses::Data **)NULL;
+
+   setRefineItems(refine_classes);
+   initialCheckRefineClassItems();
+
+   d_force_boundary_fill = false;
+
+   d_domain_is_one_box = false;
+   d_num_periodic_directions = 0;
+
+   d_coarse_priority_level_schedule = new tbox::Schedule();
+   d_fine_priority_level_schedule = new tbox::Schedule();
+   d_coarse_priority_level_schedule->setTimerPrefix("xfer::RefineSchedule");
+   d_fine_priority_level_schedule->setTimerPrefix("xfer::RefineSchedule");
+
+   d_supp_schedule.setNull();
+   d_supp_level.setNull();
+
+   d_max_fill_boxes = 0;
+
+   /*
+    * Initialize destination level, ghost cell widths,
+    * and domain information data members.
+    */
+
+   bool recursive_schedule = false;
+   initializeDomainAndGhostInformation(recursive_schedule);
+
+   hier::IntVector min_connector_width = d_max_scratch_gcw;
+   min_connector_width.max(d_boundary_fill_ghost_width);
+
+   const Connector dst_to_src =
+      dst_level->getMappedBoxLevel()->getPersistentOverlapConnectors().findConnector(
+         *src_level->getMappedBoxLevel(),
+         min_connector_width);
+
+   const Connector src_to_dst =
+      src_level->getMappedBoxLevel()->getPersistentOverlapConnectors().findConnector(
+         *dst_level->getMappedBoxLevel(),
+         Connector::convertHeadWidthToBase(src_level->getMappedBoxLevel()->
+            getRefinementRatio(),
+            dst_level->getMappedBoxLevel()->getRefinementRatio(),
+            min_connector_width));
+
+   TBOX_ASSERT(dst_to_src.getBase() == *dst_level->getMappedBoxLevel());
+   TBOX_ASSERT(src_to_dst.getHead() == *dst_level->getMappedBoxLevel());
+   TBOX_ASSERT(dst_to_src.getConnectorWidth() >= d_max_scratch_gcw);
+   TBOX_ASSERT(dst_to_src.getConnectorWidth() >= d_boundary_fill_ghost_width);
+
+   if ( s_extra_debug ) {
+      /*
+       * This check may be redundant because
+       * PersistentOverlapConnectors should already guarantee
+       * completeness.
+       */
+      hier::OverlapConnectorAlgorithm oca;
+      oca.assertOverlapCorrectness(dst_to_src);
+      oca.assertOverlapCorrectness(src_to_dst);
+   }
+
+   /*
+    * Create the fill box and unfilled box arrays and then the
+    * communication schedule for data transfers between source and
+    * destination levels.  Note that the fill boxes are initialized here,
+    * while the unfilled boxes are set in the generateCommunicationSchedule()
+    * and contain the regions for each patch in the destination level
+    * that will cannot be filled by the schedule.
+    */
+
+   MappedBoxLevel fill_mapped_box_level(dim);
+   Connector dst_to_fill;
+   FillSet dst_to_fill_on_src_proc;
+   setDefaultFillMappedBoxLevel(
+      fill_mapped_box_level,
+      dst_to_fill,
+      dst_to_fill_on_src_proc,
+      *dst_level->getMappedBoxLevel(),
+      &dst_to_src,
+      &src_to_dst,
+      d_boundary_fill_ghost_width);
+
+   MappedBoxLevel unused_unfilled_mapped_box_level(dim);
+   Connector unused_dst_to_unfilled;
+   generateCommunicationSchedule(
+      unused_unfilled_mapped_box_level,
+      unused_dst_to_unfilled,
+      dst_to_src,
+      src_to_dst,
+      dst_to_fill,
+      dst_to_fill_on_src_proc,
+      use_time_refinement);
+
+   if (!d_supp_level.isNull()) {
+      computeRefineOverlaps();
+   }
+}
+
+/*
+ **************************************************************************
+ *
+ * Create a refine schedule that copies data from the source level into
+ * the destination level on the components represented by the refine
+ * list.  If portions of the destination level remain unfilled, then
+ * the algorithm   recursively fills those unfilled portions from coarser
+ * levels in the   AMR hierarchy.  It is assumed that the index spaces of
+ * the source and destination levels are "consistent"; i.e., they
+ * represent the same grid resolution.  Also, the next coarser level
+ * integer argument must be the number of level in the specified
+ * hierarchy representing the next coarser level of mesh resolution to
+ * the destination level.
+ *
+ * IMPORTANT NOTES: The source level may be NULL, in which case the
+ * destination level will be filled only using data interpolated from
+ * coarser levels in the AMR hierarchy.  The hierarchy may be NULL only
+ * if the next coarser level is -1 (that is, there is no coarser level).
+ *
+ **************************************************************************
+ */
+
+RefineSchedule::RefineSchedule(
+   tbox::Pointer<PatchLevelFillPattern> dst_level_fill_pattern,
+   tbox::Pointer<hier::PatchLevel> dst_level,
+   tbox::Pointer<hier::PatchLevel> src_level,
+   int next_coarser_ln,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const tbox::Pointer<xfer::RefineClasses> refine_classes,
+   tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory,
+   xfer::RefinePatchStrategy* patch_strategy,
+   bool use_time_refinement):
+   d_max_stencil_width(dst_level->getDim()),
+   d_max_scratch_gcw(dst_level->getDim()),
+   d_boundary_fill_ghost_width(dst_level->getDim()),
+   d_domain_box(dst_level->getDim()),
+   d_periodic_shift(dst_level->getDim()),
+   d_unfilled_mapped_box_level(dst_level->getDim()),
+   d_src_masks(dst_level->getDim()),
+   d_dst_level_fill_pattern(dst_level_fill_pattern),
+   d_constructing_internal_schedule(false)
+{
+   TBOX_ASSERT(!dst_level.isNull());
+   TBOX_ASSERT((next_coarser_ln == -1) || !hierarchy.isNull());
+   TBOX_ASSERT(!refine_classes.isNull());
+#ifdef DEBUG_CHECK_DIM_ASSERTIONS
+   if (!src_level.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*dst_level, *src_level);
+   }
+   if (!hierarchy.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*dst_level, *hierarchy);
+   }
+   if (patch_strategy) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*dst_level, *patch_strategy);
+   }
+#endif
+
+   const tbox::Dimension& dim(dst_level->getDim());
+
+   d_transaction_factory = transaction_factory;
+
+   /*
+    * Initial values; some will change in setup operations.
+    */
+
+   d_dst_level = dst_level;
+   d_src_level = src_level;
+
+   d_refine_patch_strategy = patch_strategy;
+
+   d_number_refine_items = 0;
+   d_refine_items = (const xfer::RefineClasses::Data **)NULL;
+
+   setRefineItems(refine_classes);
+   initialCheckRefineClassItems();
+
+   d_force_boundary_fill = false;
+
+   d_domain_is_one_box = false;
+   d_num_periodic_directions = 0;
+
+   d_coarse_priority_level_schedule.setNull();
+   d_fine_priority_level_schedule.setNull();
+
+   d_supp_schedule.setNull();
+   d_supp_level.setNull();
+
+   d_max_fill_boxes = 0;
+
+   /*
+    * Initialize destination level, ghost cell widths,
+    * and domain information data members.
+    */
+
+   bool recursive_schedule = false;
+   initializeDomainAndGhostInformation(recursive_schedule);
+
+   const Connector dummy_connector;
+
+   const Connector* dst_to_src = &dummy_connector;
+   const Connector* src_to_dst = &dummy_connector;
+
+   if (!src_level.isNull()) {
+      hier::IntVector min_connector_width = d_max_scratch_gcw;
+      min_connector_width.max(d_boundary_fill_ghost_width);
+
+      dst_to_src =
+         &dst_level->getMappedBoxLevel()->getPersistentOverlapConnectors().findConnector(
+            *src_level->getMappedBoxLevel(),
+            min_connector_width);
+
+      src_to_dst =
+         &src_level->getMappedBoxLevel()->getPersistentOverlapConnectors().findConnector(
+            *dst_level->getMappedBoxLevel(),
+            Connector::convertHeadWidthToBase(src_level->getMappedBoxLevel()->
+                                              getRefinementRatio(),
+                                              dst_level->getMappedBoxLevel()->getRefinementRatio(),
+                                              min_connector_width));
+
+      TBOX_ASSERT(dst_to_src->getBase() == *dst_level->getMappedBoxLevel());
+      TBOX_ASSERT(src_to_dst->getHead() == *dst_level->getMappedBoxLevel());
+      TBOX_ASSERT(dst_to_src->getConnectorWidth() >= d_max_scratch_gcw);
+      TBOX_ASSERT(dst_to_src->getConnectorWidth() >= d_boundary_fill_ghost_width);
+   }
+
+   /*
+    * Create the fill box arrays and then the communication schedule(s)
+    * needed to move data from the patch hierarchy to the destination level.
+    */
+
+   MappedBoxLevel fill_mapped_box_level(dim);
+   Connector dst_to_fill;
+   FillSet dst_to_fill_on_src_proc;
+
+   setDefaultFillMappedBoxLevel(
+      fill_mapped_box_level,
+      dst_to_fill,
+      dst_to_fill_on_src_proc,
+      *dst_level->getMappedBoxLevel(),
+      dst_to_src,
+      src_to_dst,
+      d_boundary_fill_ghost_width);
+   const bool skip_first_generate_schedule =
+      !d_dst_level_fill_pattern->doesSourceLevelCommunicateToDestination();
+
+   const hier::IntVector dummy_intvector(dim, -1);
+   const bool dst_is_supplemental_level = false;
+
+   finishScheduleConstruction(
+      next_coarser_ln,
+      hierarchy,
+      *dst_to_src,
+      *src_to_dst,
+      dst_is_supplemental_level,
+      dummy_intvector,
+      fill_mapped_box_level,
+      dst_to_fill,
+      dst_to_fill_on_src_proc,
+      use_time_refinement,
+      skip_first_generate_schedule);
+
+   if (!d_supp_schedule.isNull()) {
+      computeRefineOverlaps();
+   }
+}
+
+/*
+ **************************************************************************
+ *
+ * This private constructor creates a refine schedule that copies data
+ * into the destination only on the specified fill boxes.
+ *
+ **************************************************************************
+ */
+
+RefineSchedule::RefineSchedule(
+   tbox::Pointer<hier::PatchLevel> dst_level,
+   tbox::Pointer<hier::PatchLevel> src_level,
+   int next_coarser_ln,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const hier::IntVector& src_growth_to_nest_dst,
+   const hier::Connector &dst_to_src,
+   const hier::Connector &src_to_dst,
+   const tbox::Pointer<xfer::RefineClasses> refine_classes,
+   tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory,
+   xfer::RefinePatchStrategy* patch_strategy):
+   d_max_stencil_width(dst_level->getDim()),
+   d_max_scratch_gcw(dst_level->getDim()),
+   d_boundary_fill_ghost_width(dst_level->getDim()),
+   d_domain_box(dst_level->getDim()),
+   d_periodic_shift(dst_level->getDim()),
+   d_unfilled_mapped_box_level(dst_level->getDim()),
+   d_src_masks(dst_level->getDim()),
+   d_constructing_internal_schedule(true)
+{
+   TBOX_ASSERT(!dst_level.isNull());
+   TBOX_ASSERT((next_coarser_ln == -1) || !hierarchy.isNull());
+   TBOX_ASSERT(!refine_classes.isNull());
+#ifdef DEBUG_CHECK_DIM_ASSERTIONS
+   if (!src_level.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*dst_level, *src_level);
+   }
+   if (!hierarchy.isNull()) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*dst_level, *hierarchy);
+   }
+   if (patch_strategy) {
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*dst_level, *patch_strategy);
+   }
+#endif
+
+   const tbox::Dimension& dim(dst_level->getDim());
+
+   d_transaction_factory = transaction_factory;
+
+   /*
+    * Initial values; some will change in setup operations.
+    * Note that we do not check refine items here, since this
+    * constructor is private and called recursively (i.e., the
+    * items have been checked already).
+    */
+
+   d_dst_level = dst_level;
+   d_src_level = src_level;
+
+   d_refine_patch_strategy = patch_strategy;
+
+   d_number_refine_items = 0;
+   d_refine_items = (const xfer::RefineClasses::Data **)NULL;
+
+   setRefineItems(refine_classes);
+
+   d_force_boundary_fill = false;
+
+   d_domain_is_one_box = false;
+   d_num_periodic_directions = 0;
+
+   d_coarse_priority_level_schedule.setNull();
+   d_fine_priority_level_schedule.setNull();
+
+   d_supp_schedule.setNull();
+   d_supp_level.setNull();
+
+   d_max_fill_boxes = 0;
+
+   d_dst_level_fill_pattern = new PatchLevelFullFillPattern();
+
+   /*
+    * Initialize destination level, ghost cell widths,
+    * and domain information data members.
+    */
+
+   bool recursive_schedule = true;
+   initializeDomainAndGhostInformation(recursive_schedule);
+
+   /*
+    * Note that we cannot assert dst<==>src are complete, because they
+    * are supp<==>hiercoarse from the recursion.
+    * finishScheduleConstruction should ensure that supp<==>hiercoarse
+    * are complete enough to fill dst and connect the unfilled portion
+    * to the next hierarchy coarser level.  finishScheduleConstruction
+    * does not (cannot) guarantee that supp<==>hiercoarse is complete.
+    */
+   TBOX_ASSERT( !src_level.isNull() );
+   TBOX_ASSERT( dst_to_src.isInitialized() );
+   TBOX_ASSERT( src_to_dst.isInitialized() );
+   TBOX_ASSERT(dst_to_src.getConnectorWidth() >= d_max_stencil_width);
+   TBOX_ASSERT(dst_to_src.getBase() == *dst_level->getMappedBoxLevel());
+   TBOX_ASSERT(src_to_dst.getHead() == *dst_level->getMappedBoxLevel());
+
+   /*
+    * Finish construction of the communication schedule using the
+    * remaining fill boxes.
+    *
+    * The fill boxes are the dst boxes, grown by the max stencil width
+    * (not the ghost width of data).  The reason is that in this
+    * private constructor, the dst is always the supplemental level
+    * constructed from another RefineSchedule's unfilled boxes.  So,
+    * dst is nominally the unfilled boxes.  To interpolate into them,
+    * we need data covered by the interpolation stencil width.
+    */
+
+   MappedBoxLevel fill_mapped_box_level(dim);
+   Connector dst_to_fill;
+   FillSet dst_to_fill_on_src_proc;
+   setDefaultFillMappedBoxLevel(
+      fill_mapped_box_level,
+      dst_to_fill,
+      dst_to_fill_on_src_proc,
+      *dst_level->getMappedBoxLevel(),
+      &dst_to_src,
+      &src_to_dst,
+      d_max_stencil_width);
+
+   bool use_time_refinement = true;
+   const bool dst_is_supplemental_level = true;
+
+   finishScheduleConstruction(
+      next_coarser_ln,
+      hierarchy,
+      dst_to_src,
+      src_to_dst,
+      dst_is_supplemental_level,
+      src_growth_to_nest_dst,
+      fill_mapped_box_level,
+      dst_to_fill,
+      dst_to_fill_on_src_proc,
+      use_time_refinement);
+
+   if (!d_supp_schedule.isNull()) {
+      computeRefineOverlaps();
+   }
+}
+
+/*
+ **************************************************************************
+ *
+ * The destructor for the refine schedule class implicitly deallocates
+ * all of the data associated with the communication schedule.
+ *
+ **************************************************************************
+ */
+
+RefineSchedule::~RefineSchedule()
+{
+   clearRefineItems();
+
+   d_coarse_priority_level_schedule.setNull();
+   d_fine_priority_level_schedule.setNull();
+
+   d_supp_schedule.setNull();
+   d_supp_level.setNull();
+}
+
+/*
+ *************************************************************************
+ *
+ * Reset schedule with new set of refine items.
+ *
+ ************************************************************************
+ */
+
+void RefineSchedule::reset(
+   const tbox::Pointer<xfer::RefineClasses> refine_classes)
+{
+   TBOX_ASSERT(!refine_classes.isNull());
+
+   setRefineItems(refine_classes);
+   if (!d_supp_schedule.isNull()) {
+      d_supp_schedule->reset(refine_classes);
+   }
+}
+
+/*
+ **************************************************************************
+ *
+ * Return const pointer to equivalence classes used in schedule.
+ *
+ **************************************************************************
+ */
+
+const tbox::Pointer<xfer::RefineClasses>&
+RefineSchedule::getEquivalenceClasses() const
+{
+   return d_refine_classes;
+}
+
+const hier::IntVector&
+RefineSchedule::getBoundaryFillGhostWidth() const
+{
+   return d_boundary_fill_ghost_width;
+}
+
+/*
+ ************************************************************************
+ * Construct schedule with possibility of recursion.
+ ************************************************************************
+ */
+
+void RefineSchedule::finishScheduleConstruction(
+   int next_coarser_ln,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const Connector& dst_to_src,
+   const Connector& src_to_dst,
+   const bool dst_is_supplemental_level,
+   const hier::IntVector& src_growth_to_nest_dst,
+   const MappedBoxLevel& fill_mapped_box_level,
+   const Connector& dst_to_fill,
+   const FillSet& dst_to_fill_on_src_proc,
+   bool use_time_interpolation,
+   bool skip_generate_schedule)
+{
+   t_finish_sched_const->start();
+   TBOX_ASSERT((next_coarser_ln == -1) || !hierarchy.isNull());
+
+   static int recursion_level = -1;
+   ++recursion_level;
+   if (s_extra_debug) {
+      tbox::plog << "finishScheduleConstruction entered recursion_level="
+                 << recursion_level << " next_coarser_ln=" << next_coarser_ln
+                 << std::endl;
+   }
+
+   const tbox::Dimension& dim(hierarchy->getDim());
+   const hier::IntVector zero_vector(hier::IntVector::getZero(dim));
+   const hier::IntVector neg1_vector(dim, -1);
+   const hier::IntVector huge_vector(dim, SAMRAI::tbox::MathUtilities<int>::getMax());
+
+   hier::MappedBoxLevelConnectorUtils edge_utils;
+   hier::OverlapConnectorAlgorithm oca;
+
+   RefineScheduleConnectorWidthRequestor rscwri;
+   std::vector<hier::IntVector> self_connector_widths;
+   std::vector<hier::IntVector> fine_connector_widths;
+   rscwri.computeRequiredConnectorWidths(self_connector_widths,
+                                         fine_connector_widths,
+                                         *hierarchy);
+
+   const Connector dummy_cnect;
+   const MappedBoxLevel& dst_mapped_box_level = dst_to_fill.getBase();
+   if (!d_src_level.isNull()) {
+      TBOX_ASSERT(dst_to_src.isInitialized());
+   }
+
+   /*
+    * hiercoarse is the coarse level on the hierarchy.  It is to be
+    * differentiated from the supplemental (supp) level, which is at
+    * the same refimenent ratio but is not on the hierarchy.
+    */
+   tbox::Pointer<hier::PatchLevel> hiercoarse_level;
+   if (next_coarser_ln >= 0)
+      hiercoarse_level = hierarchy->getPatchLevel(next_coarser_ln);
+
+   /*
+    * Width of supp<==>hiercoarse must be big enough to
+    * (1) generate transactions between supp and hiercoarse, and
+    * (2) bridge supp<==>hiercoarser in the next iteration.
+    *    (hiercoarser is next coarser level after hiercoarse.)
+    *
+    * (1) requires width computed as required by
+    * generateCommunicationSchedule() for building
+    * transaction between supp and hiercoarser:
+    * hier::IntVector::max(d_max_scratch_gcw, getMaxDestinationGhosts());
+    *
+    * (2) requires that hiercoarse^width(hiercoarse->supp) is big
+    * enough to nest supp and its ghost data so that we can bridge
+    * for supp<==>hiercoarser and guarantee that supp<==>hiercoarser
+    * does not miss any critical overlaps.
+    */
+   hier::IntVector transaction_gcw =
+      hier::IntVector::max(d_max_scratch_gcw, getMaxDestinationGhosts());
+   transaction_gcw =
+      hier::IntVector::max(transaction_gcw, hier::IntVector(dim, 1));
+
+
+   d_coarse_priority_level_schedule = new tbox::Schedule();
+   d_fine_priority_level_schedule = new tbox::Schedule();
+
+   /*
+    * If the source level is not null, then generate a communication
+    * schedule for moving data from source level to destination level.
+    * The schedule generation routine determines the boxes that remain
+    * to be filled from coarser levels; i.e., they cannot be filled from
+    * the source level.  If the source level is null, then copy all of the
+    * fill boxes into the set of boxes to be filled from coarser levels
+    * in the hierarchy.
+    */
+
+   Connector dst_to_unfilled;
+
+   if (s_extra_debug) {
+      tbox::plog << "finishScheduleConstruction in recursion_level="
+                 << recursion_level << " next_coarser_ln=" << next_coarser_ln
+                 << " before computing unfilled boxes."
+                 << "\ndst_mapped_box_level:\n"
+                 << dst_mapped_box_level.format("D->", 2)
+                 << "\nfill_mapped_box_level:\n"
+                 << fill_mapped_box_level.format("F->", 2)
+                 << "\ndst_to_fill:\n"
+                 << dst_to_fill.format("DF->", 2)
+                 << std::endl;
+   }
+   if (d_src_level.isNull() || skip_generate_schedule) {
+      d_unfilled_mapped_box_level = fill_mapped_box_level;
+      dst_to_unfilled.initialize(
+         dst_mapped_box_level,
+         d_unfilled_mapped_box_level,
+         dst_to_fill.getConnectorWidth(),
+         dst_to_fill.getNeighborhoodSets(),
+         MappedBoxLevel::DISTRIBUTED);
+      dst_to_unfilled.setConnectorType(hier::Connector::BASE_GENERATED);
+   } else {
+      generateCommunicationSchedule(
+         d_unfilled_mapped_box_level,
+         dst_to_unfilled,
+         dst_to_src,
+         src_to_dst,
+         dst_to_fill,
+         dst_to_fill_on_src_proc,
+         use_time_interpolation);
+   }
+   if (s_extra_debug) {
+      tbox::plog << "finishScheduleConstruction in recursion_level="
+                 << recursion_level << " next_coarser_ln=" << next_coarser_ln
+                 << " after computing unfilled boxes."
+                 << "\nd_unfilled_mapped_box_level:\n"
+                 << d_unfilled_mapped_box_level.format("UF->", 2)
+                 << "\ndst_to_unfilled:\n"
+                 << dst_to_unfilled.format("DUF->", 2)
+                 << std::endl;
+   }
+   TBOX_ASSERT(fill_mapped_box_level.getLocalBoundingBox().contains(
+         d_unfilled_mapped_box_level.getLocalBoundingBox()));
+
+   const MappedBoxLevel& periodic_domain_mapped_box_level =
+      hierarchy->getDomainMappedBoxLevel();
+   TBOX_ASSERT(
+      periodic_domain_mapped_box_level.getParallelState() ==
+      MappedBoxLevel::GLOBALIZED);
+
+   /*
+    * Remove pieces of the boxes to be filled from coarser levels that
+    * live outside the physical domain in the non-periodic directions.
+    * Then, check whether there still exist boxes to be filled from
+    * coarser levels.  Any resulting boxes will be used to generate a
+    * supplemental coarse patch level for acquiring data to refine.
+    */
+
+   hier::IntVector big_grow_vector(dim, 0);
+   if (d_num_periodic_directions > 0) {
+      for (int dir = 0; dir < dim.getValue(); dir++) {
+         if (d_periodic_shift(dir)) {
+            big_grow_vector(dir) = BIG_GHOST_CELL_WIDTH;
+         }
+      }
+   }
+
+   TBOX_ASSERT(d_num_periodic_directions >= 0);
+   const bool fully_periodic = d_num_periodic_directions == dim.getValue();
+
+   if (!fully_periodic) {
+      /*
+       * Shearing is the removal of parts of unfilled_boxes that lie
+       * along physical boundaries.  We should not fill these because
+       * they would be filled by boundary conditions.
+       *
+       * We bypass shearing for fully_periodic domains, where it would
+       * be a no-op anyway.
+       */
+
+      t_shear->start();
+
+      // Shearing for the mapped_box_level.
+      Connector unfilled_to_periodic_domain(
+         d_unfilled_mapped_box_level,
+         periodic_domain_mapped_box_level,
+         dst_to_fill.getConnectorWidth());
+      oca.findOverlaps(unfilled_to_periodic_domain);
+      Connector unfilled_to_sheared;
+      MappedBoxLevel sheared_mapped_box_level(dim);
+      edge_utils.computeInternalParts(
+         sheared_mapped_box_level,
+         unfilled_to_sheared,
+         unfilled_to_periodic_domain,
+         zero_vector);
+      t_modify_connector->start();
+      hier::MappingConnectorAlgorithm mca;
+      mca.modify(dst_to_unfilled,
+         unfilled_to_sheared,
+         &d_unfilled_mapped_box_level);
+      t_modify_connector->stop();
+      dst_to_unfilled.eraseEmptyNeighborSets();
+
+      t_shear->stop();
+
+   } // !fully_periodic
+
+   t_get_global_mapped_box_count->barrierAndStart();
+   const bool need_to_fill = d_unfilled_mapped_box_level.getGlobalNumberOfBoxes();
+   t_get_global_mapped_box_count->stop();
+
+   /*
+    * If there remain boxes to be filled from coarser levels, then
+    * generate data to do this and recurse to the next coarser level.
+    *
+    * This big if-block is the last step in this finishScheduleConstruction.
+    */
+
+   if (need_to_fill) {
+
+      t_finish_sched_const_recurse->start();
+
+      if (s_extra_debug) {
+         tbox::plog << "finishScheduleConstruction in recursion_level="
+                    << recursion_level << " next_coarser_ln=" << next_coarser_ln
+                    << " needs to recurse"
+                    << std::endl;
+      }
+
+      /*
+       * If there are no coarser levels in the hierarchy or the hierarchy
+       * is null, then throw an error.  Something is messed up someplace and
+       * code execution cannot proceed.
+       */
+
+      if (next_coarser_ln < 0) {
+         TBOX_ERROR(
+            "Internal error in RefineSchedule::finishScheduleConstruction..."
+            << "\n In finishScheduleConstruction() -- "
+            << "\n No coarser levels...will not fill from coarser."
+            << "\n dst_mapped_box_level:\n" << dst_mapped_box_level.format("DEST->", 2)
+            << "\n dst_to_fill:\n" << dst_to_fill.format("DF->", 2)
+            << "\n d_unfilled_mapped_box_level:\n" << d_unfilled_mapped_box_level.format("UF->", 2)
+            << "\n dst_to_unfilled:\n" << dst_to_unfilled.format("DU->", 2)
+            << "\n dst_to_src:\n" << dst_to_src.format("DS->", 2)
+            << std::endl);
+      } else {
+         if (hierarchy.isNull()) {
+            TBOX_ERROR("Internal RefineSchedule error..."
+               << "\n In finishScheduleConstruction() -- "
+               << "\n Need to fill from coarser hierarchy level and \n"
+               << "hierarchy is unavailable." << std::endl);
+         }
+      }
+
+      const hier::MappedBoxLevel &hiercoarse_mapped_box_level(
+         *hiercoarse_level->getMappedBoxLevel());
+
+      /*
+       * Calculate the ratio to the next coarser level in the hierarchy
+       * and cache the maximum stencil ghost cell width.
+       */
+
+      const hier::IntVector dst_hiercoarse_ratio =
+         d_dst_level->getRatioToLevelZero()
+         / hiercoarse_level->getRatioToLevelZero();
+
+      const hier::BoxList coarser_physical_domain(
+         hiercoarse_level->getPhysicalDomain());
+
+      const bool do_coarse_shearing = (!fully_periodic && !d_domain_is_one_box);
+
+      hier::BoxList coarser_shear_domain(coarser_physical_domain);
+
+      if (do_coarse_shearing) {
+         t_coarse_shear->start();
+
+         if (d_num_periodic_directions > 0) {
+            coarser_shear_domain.grow(big_grow_vector);
+         }
+
+         coarser_shear_domain.simplifyBoxes();
+
+         t_coarse_shear->stop();
+      }
+
+      /*
+       * Convert the unfilled parts of dst into the supplemental MappedBoxLevel
+       * supp_mapped_box_level by coarsening it (and shearing if needed).
+       * The supp_mapped_box_level is to be filled by the next coarser
+       * level in the hierarchy.  The data to be filled on the supp level
+       * will be the max stencil width.
+       *
+       * Build connector d_dst_to_supp using dst_to_unfilled, since
+       * supp is came from unfilled.  This Connector is incomplete
+       * because each dst MappedBox only has edges to supp MappedBoxes
+       * it generated.  Nevertheless, we set its gcw big enough so each
+       * dst MappedBox nests its potential supp MappedBoxes so that we
+       * bridge to the supp MappedBoxLevel.
+       *
+       * Build up supp_eto_unfilled, so we can find the unfilled box
+       * that the suppplemental box is supposed to fill.
+       * d_supp_to_unfilled is used when filling data.
+       */
+
+      hier::MappedBoxLevel supp_mapped_box_level(
+         hiercoarse_level->getRatioToLevelZero(),
+         d_unfilled_mapped_box_level.getMPI());
+
+      hier::NeighborhoodSet dst_eto_supp, supp_eto_unfilled;
+
+      const hier::NeighborhoodSet& dst_eto_unfilled = dst_to_unfilled.getNeighborhoodSets();
+
+      t_build_supp_mapped_box_level->start();
+      /*
+       * This loop builds up supp_mapped_box_level, dst_eto_supp and supp_eto_unfilled.
+       */
+      for (hier::NeighborhoodSet::const_iterator ei = dst_eto_unfilled.begin();
+           ei != dst_eto_unfilled.end(); ++ei) {
+
+         const hier::GlobalId& dst_mapped_box_gid = ei->first;
+         const NeighborSet& dst_unfilled_parts = ei->second;
+
+         hier::Box coarser_fill_bounding_box(dim);
+         for (hier::MappedBoxSet::const_iterator ni = dst_unfilled_parts.begin();
+              ni != dst_unfilled_parts.end(); ++ni) {
+
+            const MappedBox& unfilled_mapped_box = *ni;
+            hier::Box supp_box = unfilled_mapped_box.getBox();
+            supp_box.coarsen(dst_hiercoarse_ratio);
+
+            if (do_coarse_shearing &&
+                (d_dst_level->patchTouchesRegularBoundary(dst_mapped_box_gid.
+                    getLocalId()))) {
+
+               hier::BoxList sheared_supp_boxes(supp_box);
+               sheared_supp_boxes.intersectBoxes(coarser_shear_domain);
+               sheared_supp_boxes.simplifyBoxes();
+
+               (void)hier::BoxUtilities::extendBoxesToDomainBoundary(
+                  sheared_supp_boxes,
+                  coarser_physical_domain,
+                  d_max_stencil_width);
+               /*
+                * Connector widths must be big enough to make sure
+                * we have complete sets after extending mapped_boxes to boundary!
+                */
+               if (sheared_supp_boxes.size() > 0) {
+
+                  NeighborSet& supp_nabrs = dst_eto_supp[dst_mapped_box_gid];
+
+                  for (hier::BoxList::Iterator b(sheared_supp_boxes); b; b++) {
+                     const MappedBox& supp_mapped_box =
+                        *supp_mapped_box_level.addBox(*b);
+                     supp_nabrs.insert(supp_mapped_box);
+
+                     /*
+                      * Note that each supp_mapped_box must have at least one
+                      * unfilled_nabr and may have multiple.
+                      */
+                     supp_eto_unfilled[supp_mapped_box.getGlobalId()].insert(
+                        unfilled_mapped_box);
+                  }
+
+               }
+
+            } else {
+
+               /*
+                * If the supp_box is less than a ghost width
+                * (d_max_stencil_width for the supplemental level) of a
+                * physical boundary, extend it to the boundary.
+                *
+                * Note: If we end up extending the supp_box, we may
+                * fail sanity checks further down because have not
+                * accounted for this extension in the various
+                * Connector widths.  However, it is not likely that
+                * the extension would have any effects on computations
+                * because, being so close to the physical boundary,
+                * they should not create any new relationships.  This
+                * is just a hunch and need to be rigously verified.
+                *
+                * For now, just warn if the box is grown.
+                */
+               const hier::Box save_supp_box(supp_box);
+               (void)hier::BoxUtilities::extendBoxToDomainBoundary(
+                  supp_box,
+                  coarser_physical_domain,
+                  d_max_stencil_width);
+               if (supp_box != save_supp_box) {
+                  TBOX_WARNING("Supplemental box " << save_supp_box
+                                                   << " was extended to " << supp_box
+                                                   << " at a physical boundary.  This is"
+                                                   << " probably ok but a rigorous proof"
+                                                   << " that won't cause problem is currently"
+                                                   << " lacking.  Expect some sanity checks"
+                                                   << " to fail and a slim chance that the"
+                                                   << " schedule generate will be bad.");
+               }
+
+               const MappedBox& supp_mapped_box = *supp_mapped_box_level.addBox(
+                     supp_box);
+               NeighborSet& supp_nabrs = dst_eto_supp[dst_mapped_box_gid];
+               supp_nabrs.insert(supp_mapped_box);
+               supp_eto_unfilled[supp_mapped_box.getGlobalId()].insert(
+                  unfilled_mapped_box);
+
+            }
+
+         }
+      }
+
+      /*
+       * Width of dst-->supp is
+       *   - width of dst-->fill, but rounded up so it extends equal
+       *     to the growth of supp caused by coarsening unfilled.
+       *   - extended by the stencil width, where supp has its ghost data.
+       */
+      const hier::IntVector dst_to_supp_width =
+         (hier::IntVector::ceiling(dst_to_fill.getConnectorWidth(),
+             dst_hiercoarse_ratio) + d_max_stencil_width)
+         * dst_hiercoarse_ratio;
+
+      d_dst_to_supp.swapInitialize(
+         dst_mapped_box_level,
+         supp_mapped_box_level,
+         dst_to_supp_width,
+         dst_eto_supp);
+      d_dst_to_supp.setConnectorType(hier::Connector::BASE_GENERATED);
+
+      d_supp_to_unfilled.initialize(
+         supp_mapped_box_level,
+         d_unfilled_mapped_box_level,
+         hier::IntVector(dim, 0),
+         supp_eto_unfilled);
+      d_supp_to_unfilled.setConnectorType(hier::Connector::BASE_GENERATED);
+
+      t_build_supp_mapped_box_level->stop();
+
+      /*
+       * Connect the supplemental mapped_box_level (the next recursion's dst)
+       * to the hiercoarse mapped_box_level (the next recursion's src).
+       */
+
+      /*
+       * Get the transpose of d_dst_to_supp, which is simple to compute
+       * because we know the edges are all local.
+       */
+      t_misc2->start();
+      d_supp_to_dst.initializeToLocalTranspose(d_dst_to_supp);
+      t_misc2->stop();
+      if (s_extra_debug) {
+
+         /*
+          * Supp should nest in dst^dst_to_supp_width to ensure dst
+          * sees all of supp and also supp's ghosts.  Note that supp's
+          * relevant ghost data width is d_max_stencil_width.
+          *
+          * The nesting assures that when bridging across dst<==>supp
+          * for supp<==>hiercoarse, we get a complete overlap
+          * Connectors.
+          */
+         bool locally_nests;
+         edge_utils.setSanityCheckMethodPreconditions(false);
+         edge_utils.setSanityCheckMethodPostconditions(false);
+         tbox::plog << "\nsupp_mapped_box_level:\n" << supp_mapped_box_level.format("S-> ", 2)
+                    << "\ndst_mapped_box_level:\n" << dst_mapped_box_level.format("D-> ", 2)
+                    << "\nd_dst_to_supp:\n" << d_dst_to_supp.format("DS-> ", 2)
+                    << "\nd_supp_to_dst:\n" << d_supp_to_dst.format("SD-> ", 2)
+                    << std::endl;
+         if ( ! edge_utils.baseNestsInHead(
+                 &locally_nests,
+                 supp_mapped_box_level,
+                 dst_mapped_box_level,
+                 zero_vector,
+                 dst_to_supp_width,
+                 zero_vector,
+                 NULL) ) {
+            TBOX_ERROR("RefineSchedule::finishScheduleConstruction: supp does\n"
+                       <<"to nest in dst.\n");
+         }
+
+         TBOX_ASSERT(d_supp_to_dst.checkTransposeCorrectness(d_dst_to_supp) == 0);
+         TBOX_ASSERT(d_dst_to_supp.checkTransposeCorrectness(d_supp_to_dst) == 0);
+      }
+
+      Connector supp_to_hiercoarse;
+      Connector hiercoarse_to_supp;
+      {
+         /*
+          * Correspondance between consecutive recursions:
+          *
+          * This recursion:   supp<==>hiercoarse, supp_to_hiercoarse
+          *
+          * Next recursion:    dst<==>src,            dst_to_src
+          *
+          * We will bridge across dst for supp<==>hiercoarse.
+          *
+          * The bridge legs d_supp_to_dst and d_dst_to_supp are not
+          * complete, as usually required to guarantee that the bridge is
+          * complete.  However, supp nests in dst+gcw, so they need not be
+          * complete.
+          */
+
+         /*
+          * We now need supp<==>hiercoarse and can get it with the
+          * bridge supp<==>dst<==>hiercoarse.
+          *
+          * To do this bridge, we require dst<==>hiercoarse.  Look
+          * them up in the PersistentOverlapConnectors.  The Connector
+          * width we need and expect to have been precomputed depends
+          * on whether dst is a supplemental level from a previous
+          * recursive RefineSchedule.
+          *
+          * If we cannot look up dst<==>hiercoarse, we will attempt to
+          * bridge for them.
+          */
+
+         const Connector* dst_to_hiercoarse = NULL;
+         const Connector* hiercoarse_to_dst = NULL;
+         Connector bridged_dst_to_hiercoarse;
+         Connector bridged_hiercoarse_to_dst;
+
+         if (dst_is_supplemental_level) {
+            /*
+             * Here, dst is a supplemental (temporary) level created
+             * from the unfilled boxes of another dst (which itself
+             * may also be another supplemental level).  We cannot use
+             * the required Connector widths for levels in the
+             * hierarchy.  We must compute the correct required width
+             * for this particular temporary level.  We know how
+             * to do this because the temporary level is created by
+             * RefineSchedule code.
+             */
+
+            hier::IntVector min_dst_to_hiercoarse_width(d_max_scratch_gcw);
+            min_dst_to_hiercoarse_width.max(d_max_stencil_width);
+            min_dst_to_hiercoarse_width.max(d_boundary_fill_ghost_width);
+            hier::IntVector min_hiercoarse_to_dst_width =
+               Connector::convertHeadWidthToBase(
+                  hiercoarse_mapped_box_level.getRefinementRatio(),
+                  d_dst_level->getMappedBoxLevel()->getRefinementRatio(),
+                  min_dst_to_hiercoarse_width);
+
+            const bool has_dst_to_hiercoarse =
+               d_dst_level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+               hasConnector(
+                  hiercoarse_mapped_box_level,
+                  min_dst_to_hiercoarse_width);
+            const bool has_hiercoarse_to_dst =
+               hiercoarse_mapped_box_level.getPersistentOverlapConnectors().
+               hasConnector(
+                  *d_dst_level->getMappedBoxLevel(), min_hiercoarse_to_dst_width);
+
+            if (has_dst_to_hiercoarse && has_hiercoarse_to_dst) {
+
+               dst_to_hiercoarse =
+                  &d_dst_level->getMappedBoxLevel()->getPersistentOverlapConnectors()
+                  .findConnector(
+                     hiercoarse_mapped_box_level,
+                     min_dst_to_hiercoarse_width);
+
+               hiercoarse_to_dst =
+                  &hiercoarse_mapped_box_level.getPersistentOverlapConnectors()
+                  .findConnector(
+                     *d_dst_level->getMappedBoxLevel(), min_hiercoarse_to_dst_width);
+
+               TBOX_ASSERT(
+                  dst_to_hiercoarse->getBase() == *d_dst_level->getMappedBoxLevel());
+               TBOX_ASSERT(
+                  dst_to_hiercoarse->getConnectorWidth() >= d_max_scratch_gcw);
+               TBOX_ASSERT(
+                  dst_to_hiercoarse->getConnectorWidth() >= d_max_stencil_width);
+               TBOX_ASSERT(
+                  dst_to_hiercoarse->getConnectorWidth() >=
+                  d_boundary_fill_ghost_width);
+               TBOX_ASSERT(
+                  hiercoarse_to_dst->getHead() == *d_dst_level->getMappedBoxLevel());
+
+            } else {
+               /*
+                * Connectors dst<==>hiercoarse is not provided.
+                * We have to bridge through src for it.
+                * (This requires src<==>hiercoarse.)
+                */
+               const hier::MappedBoxLevel& src_mapped_box_level =
+                  dst_to_src.getHead();
+               if (*hierarchy->getMappedBoxLevel(next_coarser_ln+1) !=
+                   src_mapped_box_level) {
+                  TBOX_ERROR("Missing dst<==>hiercoarse connector and\n"
+                     << "src is not from hierarchy.");
+               }
+               if (s_extra_debug) {
+                  TBOX_WARNING(
+                     "RefineSchedule::finishScheduleConstruction bridging through src for dst<==>hiercoarse\n");
+               }
+
+               hier::IntVector hiercoarse_to_src_width =
+                  fine_connector_widths[next_coarser_ln];
+               hier::IntVector src_to_hiercoarse_width =
+                  hiercoarse_to_src_width*d_src_level->getRatioToCoarserLevel();
+
+               /*
+                * Using lh to get required Connector width assumes that
+                * the src level has same refinement ratio as
+                * next_coarser_ln+1, but for Richardson extrapolation,
+                * that is not the case, so we have to adjust.
+                */
+               if (d_src_level->getMappedBoxLevel()->getRefinementRatio() <=
+                   hierarchy->getMappedBoxLevel(next_coarser_ln + 1)->getRefinementRatio()) {
+                  src_to_hiercoarse_width *=
+                     d_src_level->getMappedBoxLevel()->getRefinementRatio();
+                  src_to_hiercoarse_width /= hierarchy->getMappedBoxLevel(
+                     next_coarser_ln + 1)->getRefinementRatio();
+               } else if (d_src_level->getMappedBoxLevel()->getRefinementRatio()
+                          >=
+                          hierarchy->getMappedBoxLevel(next_coarser_ln
+                             + 1)->getRefinementRatio()) {
+                  src_to_hiercoarse_width *= hierarchy->getMappedBoxLevel(
+                        next_coarser_ln + 1)->getRefinementRatio();
+                  src_to_hiercoarse_width /=
+                     d_src_level->getMappedBoxLevel()->getRefinementRatio();
+               }
+
+               const hier::Connector& src_to_hiercoarse =
+                  d_src_level->getMappedBoxLevel()->getPersistentOverlapConnectors()
+                  .findConnector(
+                     hiercoarse_mapped_box_level,
+                     src_to_hiercoarse_width);
+               const hier::Connector& hiercoarse_to_src =
+                  hiercoarse_mapped_box_level.getPersistentOverlapConnectors()
+                  .findConnector(
+                     *d_src_level->getMappedBoxLevel(),
+                     hiercoarse_to_src_width);
+
+               if (s_barrier_and_time) {
+                  t_bridge_dst_hiercoarse->barrierAndStart();
+               }
+
+               oca.setSanityCheckMethodPostconditions(true);
+               /*
+                * Don't use the strict bridge theorem here because it
+                * cannot guarantee sufficient width.  We know from how
+                * dst nests in hiercoarse what output Connector width
+                * can guarantee that all dst MappedBoxes are seen by a
+                * hiercoarse MappedBox.
+                */
+               oca.bridge(
+                  bridged_dst_to_hiercoarse,
+                  bridged_hiercoarse_to_dst,
+                  dst_to_src,
+                  src_to_hiercoarse,
+                  hiercoarse_to_src,
+                  src_to_dst,
+                  fine_connector_widths[next_coarser_ln]);
+
+               if (s_barrier_and_time) {
+                  t_bridge_dst_hiercoarse->stop();
+               }
+
+               {
+                  /*
+                   * hiercoarse has periodic images but dst does not.
+                   * Consequently, the bridge for dst<==>hiercoarse
+                   * may not catch all periodic neighbors.  Because we
+                   * don't need periodic neighbors for
+                   * dst<==>hiercoarse, we will remove them to make
+                   * dst<==>hiercoarse proper transposes.
+                   */
+                  hier::NeighborhoodSet tmp_edges;
+                  hier::MappedBoxContainerUtils::removePeriodicNeighbors(
+                     tmp_edges,
+                     bridged_dst_to_hiercoarse.getNeighborhoodSets());
+                  bridged_dst_to_hiercoarse.swapInitialize(
+                     bridged_dst_to_hiercoarse.getBase(),
+                     bridged_dst_to_hiercoarse.getHead(),
+                     bridged_dst_to_hiercoarse.getConnectorWidth(),
+                     tmp_edges,
+                     MappedBoxLevel::DISTRIBUTED);
+                  tmp_edges.clear();
+                  hier::MappedBoxContainerUtils::removePeriodicNeighbors(
+                     tmp_edges,
+                     bridged_hiercoarse_to_dst.getNeighborhoodSets());
+                  bridged_hiercoarse_to_dst.swapInitialize(
+                     bridged_hiercoarse_to_dst.getBase(),
+                     bridged_hiercoarse_to_dst.getHead(),
+                     bridged_hiercoarse_to_dst.getConnectorWidth(),
+                     tmp_edges,
+                     MappedBoxLevel::DISTRIBUTED);
+               }
+
+               if (s_extra_debug) {
+                  size_t err1 =
+                     bridged_dst_to_hiercoarse.checkTransposeCorrectness(
+                        bridged_hiercoarse_to_dst);
+                  if (err1) tbox::perr
+                     << "bridged_dst_to_hiercoarse failed transpose correctness."
+                     << std::endl;
+                  size_t err2 =
+                     bridged_hiercoarse_to_dst.checkTransposeCorrectness(
+                        bridged_dst_to_hiercoarse);
+                  if (err2) tbox::perr
+                     << "bridged_hiercoarse_to_dst failed transpose correctness."
+                     << std::endl;
+                  if (err1 || err2) {
+                     tbox::perr << "dst:\n"
+                                << dst_mapped_box_level.format("DEST->", 2)
+                                << "hiercoarse:\n"
+                                << hierarchy->getMappedBoxLevel(next_coarser_ln)->format("HCRS->", 2)
+                                << "bridged_dst_to_hiercoarse:\n"
+                                << bridged_dst_to_hiercoarse.format("bDH->", 2)
+                                << "bridged_hiercoarse_to_dst:\n"
+                                << bridged_hiercoarse_to_dst.format("bHD->", 2)
+                                << std::endl;
+                     dst_mapped_box_level.getMPI().Barrier();
+                     TBOX_ERROR(
+                        "Bridged dst<==>hiercoarse (next_coarser_ln="
+                        << next_coarser_ln << ") have problems as reported above.\n"
+                        <<"recursion_level=" << recursion_level);
+                  }
+               }
+               dst_to_hiercoarse = &bridged_dst_to_hiercoarse;
+               hiercoarse_to_dst = &bridged_hiercoarse_to_dst;
+            } // End block bridging for dst<==>hiercoarse.
+         } else { /* !dst_is_supplemental_level */
+                  /*
+                   * dst may be the level next_coarser_ln+1 on the
+                   * hierarchy, or it could be a coarsened version.
+                   * Make sure Connector width based on dst is
+                   * properly adjusted for the correct case.  The
+                   * refinement ratio of next_coarser_ln is not
+                   * affected by the choice of which case, so use it
+                   * as the basis for the transpose width.
+                   *
+                   * Note: This method always assumes that dst is
+                   * related to a level in the hierarchy.  src need
+                   * not be.  If that is not the case, we need to
+                   * rewrite a few things.  For scalability, we expect
+                   * to have precomputed Connectors dst<==>hiercoarse.
+                   * We simply don't have enough information in
+                   * RefineSchedule to compute them efficiently.
+                   */
+            const hier::IntVector &hiercoarse_to_dst_width(fine_connector_widths[next_coarser_ln]);
+            const hier::IntVector dst_to_hiercoarse_width(
+               hier::Connector::convertHeadWidthToBase(
+                  d_dst_level->getMappedBoxLevel()->getRefinementRatio(),
+                  hiercoarse_mapped_box_level.getRefinementRatio(),
+                  hiercoarse_to_dst_width));
+            dst_to_hiercoarse = &d_dst_level->getMappedBoxLevel()->
+               getPersistentOverlapConnectors().
+               findConnector(hiercoarse_mapped_box_level,
+                  dst_to_hiercoarse_width);
+            hiercoarse_to_dst = &hiercoarse_mapped_box_level.
+               getPersistentOverlapConnectors().
+               findConnector(*d_dst_level->getMappedBoxLevel(),
+                  hiercoarse_to_dst_width);
+            TBOX_ASSERT(
+               dst_to_hiercoarse->getBase() == *d_dst_level->getMappedBoxLevel());
+            TBOX_ASSERT(
+               dst_to_hiercoarse->getConnectorWidth() >= d_max_scratch_gcw);
+            TBOX_ASSERT(
+               dst_to_hiercoarse->getConnectorWidth() >= d_max_stencil_width);
+            TBOX_ASSERT(
+               dst_to_hiercoarse->getConnectorWidth() >=
+               d_boundary_fill_ghost_width);
+            TBOX_ASSERT(
+               hiercoarse_to_dst->getHead() == *d_dst_level->getMappedBoxLevel());
+            if (s_extra_debug) {
+               if (dst_to_hiercoarse != NULL || hiercoarse_to_dst != NULL) {
+                  size_t err1 = dst_to_hiercoarse ? oca.checkOverlapCorrectness(
+                        *dst_to_hiercoarse) : 0;
+                  if (err1) tbox::perr
+                     << "\ndst_to_hiercoarse failed overlap correctness." << std::endl;
+                  size_t err2 = hiercoarse_to_dst ? oca.checkOverlapCorrectness(
+                        *hiercoarse_to_dst) : 0;
+                  if (err2) tbox::perr
+                     << "\nhiercoarse_to_dst failed overlap correctness." << std::endl;
+                  size_t err3 = (dst_to_hiercoarse && hiercoarse_to_dst) ?
+                     dst_to_hiercoarse->checkTransposeCorrectness(*hiercoarse_to_dst) :
+                     0;
+                  if (err3) tbox::perr
+                     << "dst_to_hiercoarse failed transpose correctness."
+                     << std::endl;
+                  size_t err4 = (dst_to_hiercoarse && hiercoarse_to_dst) ?
+                     hiercoarse_to_dst->checkTransposeCorrectness(*dst_to_hiercoarse) :
+                     0;
+                  if (err4) tbox::perr
+                     << "hiercoarse_to_dst failed transpose correctness."
+                     << std::endl;
+                  if (err1 || err2 || err3 || err4) {
+                     TBOX_ERROR(
+                        "dst<==>hiercoarse have problems as reported above."
+                        << "dst:\n" << d_dst_level->getMappedBoxLevel()->format("DEST->", 2)
+                        << "hiercoarse:\n" << hiercoarse_mapped_box_level.format("HCRS->", 2)
+                        << "dst_to_hiercoarse:\n" << dst_to_hiercoarse->format("DH->", 2)
+                        << "hiercoarse_to_dst:\n" << hiercoarse_to_dst->format("HD->", 2)
+                        << std::endl);
+                  }
+               }
+            }
+         }
+
+         /*
+          * Compute supp<==>hiercoarse by bridging
+          * supp<==>dst<==>hiercoarse.
+          */
+
+         if (s_barrier_and_time) {
+            t_bridge_supp_hiercoarse->barrierAndStart();
+         }
+         /*
+          * Don't use the strict bridge theorem here because it
+          * cannot guarantee sufficient width.  We know from how
+          * dst nests in hiercoarse what output Connector width
+          * can guarantee that all dst MappedBoxes are seen by a
+          * hiercoarse MappedBox.
+          */
+         oca.bridge(
+            supp_to_hiercoarse,
+            hiercoarse_to_supp,
+            d_supp_to_dst,
+            *dst_to_hiercoarse,
+            *hiercoarse_to_dst,
+            d_dst_to_supp,
+            fine_connector_widths[next_coarser_ln]);
+         if (s_extra_debug) {
+            bool locally_nests = false;
+            if ( !edge_utils.baseNestsInHead(
+                    &locally_nests,
+                    supp_to_hiercoarse.getBase(),
+                    supp_to_hiercoarse.getHead(),
+                    d_max_stencil_width,
+                    supp_to_hiercoarse.getConnectorWidth(),
+                    zero_vector,
+                    &hierarchy->getDomainSearchTree()) ) {
+               TBOX_ERROR(
+                  "RefineSchedule::finishScheduleConstruction: library error:\n"
+                  <<"hiercoarse--->supp Connector may not see all of supp.\n"
+                  <<"This is because supp, grown by the max stencil width\n"
+                  <<"of " << d_max_stencil_width << " does not nest in\n"
+                  <<"hiercoarse grown by the width of hiercoarse--->supp.\n"
+                  <<"locally_nest = " << locally_nests
+                  <<"\nsupp:\n" << supp_mapped_box_level.format("S: ",2)
+                  <<"\nhiercoarse:\n" << hiercoarse_mapped_box_level.format("H: ",2)
+                  <<"\nhiercoarse_to_supp:\n"
+                  << hiercoarse_to_supp.format("HS: ",3));
+            }
+         }
+
+         if (s_barrier_and_time) {
+            t_bridge_supp_hiercoarse->stop();
+         }
+         TBOX_ASSERT(&supp_to_hiercoarse.getBase() == &supp_mapped_box_level);
+         TBOX_ASSERT(&hiercoarse_to_supp.getHead() == &supp_mapped_box_level);
+         TBOX_ASSERT(
+            supp_to_hiercoarse.getConnectorWidth() >=
+            hier::IntVector::ceiling(d_max_stencil_width,
+               d_dst_to_supp.getRatio()));
+         TBOX_ASSERT(
+            hiercoarse_to_supp.getConnectorWidth() >=
+            hier::IntVector::ceiling(d_max_stencil_width,
+               d_dst_to_supp.getRatio()));
+
+         if (d_num_periodic_directions > 0) {
+            /*
+             * Removing periodic edges should make supp<==>hiercoarse
+             * proper transposes.
+             */
+            hier::NeighborhoodSet tmp_edges;
+            hier::MappedBoxContainerUtils::removePeriodicNeighbors(
+               tmp_edges,
+               supp_to_hiercoarse.getNeighborhoodSets());
+            supp_to_hiercoarse.swapInitialize(
+               supp_to_hiercoarse.getBase(),
+               supp_to_hiercoarse.getHead(),
+               supp_to_hiercoarse.getConnectorWidth(),
+               tmp_edges,
+               MappedBoxLevel::DISTRIBUTED);
+            supp_to_hiercoarse.setConnectorType(hier::Connector::INCOMPLETE_OVERLAP);
+            tmp_edges.clear();
+            hier::MappedBoxContainerUtils::removePeriodicNeighbors(
+               tmp_edges,
+               hiercoarse_to_supp.getNeighborhoodSets());
+            hiercoarse_to_supp.swapInitialize(
+               hiercoarse_to_supp.getBase(),
+               hiercoarse_to_supp.getHead(),
+               hiercoarse_to_supp.getConnectorWidth(),
+               tmp_edges,
+               MappedBoxLevel::DISTRIBUTED);
+            hiercoarse_to_supp.setConnectorType(hier::Connector::INCOMPLETE_OVERLAP);
+         }
+         if (s_extra_debug) {
+            size_t err1 = supp_to_hiercoarse.checkTransposeCorrectness(
+                  hiercoarse_to_supp);
+            if (err1) tbox::perr
+               << "supp_to_hiercoarse failed transpose correctness."
+               << std::endl;
+            size_t err2 = hiercoarse_to_supp.checkTransposeCorrectness(
+                  supp_to_hiercoarse);
+            if (err2) tbox::perr
+               << "hiercoarse_to_supp failed transpose correctness."
+               << std::endl;
+            bool locally_nests;
+            bool err3 = !edge_utils.baseNestsInHead(
+               &locally_nests,
+               supp_mapped_box_level,
+               *hiercoarse_level->getMappedBoxLevel(),
+               d_max_stencil_width,
+               fine_connector_widths[next_coarser_ln],
+               zero_vector,
+               &hierarchy->getDomainSearchTree());
+            if (err3) tbox::perr
+               << "\nsupp does not sufficiently nest in hiercoarse."
+               << std::endl;
+
+            Connector complete_supp_to_hiercoarse(
+               supp_to_hiercoarse.getBase(),
+               supp_to_hiercoarse.getHead(),
+               supp_to_hiercoarse.getConnectorWidth());
+            oca.findOverlaps(complete_supp_to_hiercoarse);
+            MappedBoxLevel external(dim);
+            Connector supp_to_external;
+            edge_utils.computeExternalParts(
+               external,
+               supp_to_external,
+               complete_supp_to_hiercoarse,
+               fine_connector_widths[next_coarser_ln]-d_max_stencil_width,
+               hierarchy->getPeriodicDomainSearchTree());
+            supp_to_external.eraseEmptyNeighborSets();
+            int err4 = supp_to_external.getGlobalNumberOfRelationships();
+            if (err4) {
+               tbox::perr << "Some parts of supp lies outside of where we\n"
+                          << "guarantee support for recursive RefineSchedule.\n"
+                          << supp_to_external.format("SE: ", 2);
+            }
+
+            if (err1 || err2 || err3) {
+               TBOX_ERROR(
+                  "supp<==>hiercoarse have problems as reported above."
+                  << "dst:\n" << dst_mapped_box_level.format("DEST->", 2)
+                  << "supp:\n" << supp_mapped_box_level.format("SUPP->", 2)
+                  << "hiercoarse:\n" << hierarchy->getMappedBoxLevel(next_coarser_ln)->format("HCRS->", 2)
+                  << "dst_to_hiercoarse:\n" << dst_to_hiercoarse->format("DH->", 2)
+                  << "dst_to_supp:\n" << d_dst_to_supp.format("DS->", 2)
+                  << "supp_to_hiercoarse:\n" << supp_to_hiercoarse.format("SH->", 2)
+                  << "hiercoarse_to_supp:\n" << hiercoarse_to_supp.format("HS->", 2));
+            }
+         }
+
+         if (d_num_periodic_directions > 0) {
+            /*
+             * Add periodic images to supp_mapped_box_level and
+             * corresponding edges to hiercoarse_to_supp and
+             * supp_to_hiercoarse.  (supp_mapped_box_level was built
+             * from unfilled_mapped_box_level, which did not have
+             * periodic images.  Since supp_mapped_box_level is the
+             * next dst MappedBoxLevel, the next recursion may have to
+             * fill it using periodic neighbors, supp_mapped_box_level
+             * needs periodic images.)
+             */
+            TBOX_ASSERT(
+               supp_mapped_box_level.getLocalNumberOfBoxes() ==
+               supp_mapped_box_level.getMappedBoxes().size());
+            const hier::Connector& hiercoarse_to_hiercoarse =
+               hiercoarse_level->getMappedBoxLevel()->getPersistentOverlapConnectors().findConnector(*hiercoarse_level->getMappedBoxLevel(),
+                                                                                                     hiercoarse_to_supp.getConnectorWidth());
+            edge_utils.setSanityCheckMethodPreconditions(false);
+            edge_utils.setSanityCheckMethodPostconditions(false);
+            edge_utils.addPeriodicImagesAndRelationships(
+               supp_mapped_box_level,
+               supp_to_hiercoarse,
+               hiercoarse_to_supp,
+               hierarchy->getDomainSearchTree(),
+               hiercoarse_to_hiercoarse);
+            edge_utils.setSanityCheckMethodPreconditions(false);
+            edge_utils.setSanityCheckMethodPostconditions(false);
+         }
+         if (s_extra_debug) {
+            size_t err1 = supp_to_hiercoarse.checkTransposeCorrectness(
+                  hiercoarse_to_supp);
+            if (err1) tbox::perr
+               << "supp_to_hiercoarse failed transpose correctness."
+               << std::endl;
+            size_t err2 = hiercoarse_to_supp.checkTransposeCorrectness(
+                  supp_to_hiercoarse);
+            if (err2) tbox::perr
+               << "hiercoarse_to_supp failed transpose correctness."
+               << std::endl;
+            bool locally_nests;
+            bool err3 = !edge_utils.baseNestsInHead(
+               &locally_nests,
+               supp_mapped_box_level,
+               *hiercoarse_level->getMappedBoxLevel(),
+               d_max_stencil_width,
+               fine_connector_widths[next_coarser_ln],
+               zero_vector,
+               &hierarchy->getDomainSearchTree());
+            if (err3) tbox::perr
+               << "\nsupp does not sufficiently nest in hiercoarse."
+               << std::endl;
+
+            Connector complete_supp_to_hiercoarse(
+               supp_to_hiercoarse.getBase(),
+               supp_to_hiercoarse.getHead(),
+               supp_to_hiercoarse.getConnectorWidth());
+            oca.findOverlaps(complete_supp_to_hiercoarse);
+            MappedBoxLevel external(dim);
+            Connector supp_to_external;
+            edge_utils.computeExternalParts(
+               external,
+               supp_to_external,
+               complete_supp_to_hiercoarse,
+               fine_connector_widths[next_coarser_ln]-d_max_stencil_width,
+               hierarchy->getPeriodicDomainSearchTree());
+            supp_to_external.eraseEmptyNeighborSets();
+            int err4 = supp_to_external.getGlobalNumberOfRelationships();
+            if (err4) {
+               tbox::perr << "Some parts of supp lies outside of where we\n"
+                          << "guarantee support for recursive RefineSchedule.\n"
+                          << supp_to_external.format("SE: ", 2);
+            }
+
+            if (err1 || err2 || err3 || err4) {
+               TBOX_ERROR(
+                  "supp<==>hiercoarse have problems as reported above.\n"
+                  << "dst:\n" << dst_mapped_box_level.format("DEST->", 2)
+                  << "supp:\n" << supp_mapped_box_level.format("SUPP->", 2)
+                  << "hiercoarse:\n" << hierarchy->getMappedBoxLevel(next_coarser_ln)->format("HCRS->", 2)
+                  << "dst_to_hiercoarse:\n" << dst_to_hiercoarse->format("DH->", 2)
+                  << "dst_to_supp:\n" << d_dst_to_supp.format("DS->", 2)
+                  << "supp_to_hiercoarse:\n" << supp_to_hiercoarse.format("SH->", 2)
+                  << "hiercoarse_to_supp:\n" << hiercoarse_to_supp.format("HS->", 2));
+            }
+         }
+
+      } // Block to compute supp<==>hiercoarse.
+
+      t_make_supp_level->start();
+      d_supp_level = new hier::PatchLevel(
+            supp_mapped_box_level,
+            hiercoarse_level->getGridGeometry(),
+            hiercoarse_level->getPatchDescriptor());
+      t_make_supp_level->stop();
+      d_supp_level->setLevelNumber(next_coarser_ln);
+
+      /*
+       * Reset supp<==>hiercoarse connectors to use the PatchLevel's
+       * MappedBoxLevel.
+       */
+      supp_to_hiercoarse.initialize( *d_supp_level->getMappedBoxLevel(),
+                                     supp_to_hiercoarse.getHead(),
+                                     supp_to_hiercoarse.getConnectorWidth(),
+                                     supp_to_hiercoarse.getNeighborhoodSets() );
+      hiercoarse_to_supp.initialize( hiercoarse_to_supp.getBase(),
+                                     *d_supp_level->getMappedBoxLevel(),
+                                     hiercoarse_to_supp.getConnectorWidth(),
+                                     hiercoarse_to_supp.getNeighborhoodSets()  );
+
+
+      /*
+       * Compute how much hiercoarse has to grow to nest supp.  If dst
+       * is a supplemental level (generated by RefineSchedule), we
+       * have the info to compute the growth.  If not, we make some
+       * assumptions about where dst came from in order to determine
+       * how it nests in hiercoarse.
+       */
+      hier::IntVector hiercoarse_growth_to_nest_supp(dim, -1);
+      if (dst_is_supplemental_level) {
+         /*
+          * Assume that src barely nests in hiercoarse.  (In most
+          * places, it nests by a margin equal to the nesting buffer,
+          * but we don't count on that because the nesting buffer is
+          * relaxed at physical boundaries.
+          *
+          * FIXME: We may in fact be able to count on the nesting buffer because
+          * extending boxes to physical boundaries do not create any
+          * extra relationships.  However, we don't currently have
+          * access to the size of the nesting buffer.)
+          */
+         hiercoarse_growth_to_nest_supp =
+            src_growth_to_nest_dst + dst_to_fill.getConnectorWidth();
+         hiercoarse_growth_to_nest_supp.ceiling(dst_hiercoarse_ratio);
+      } else {
+         /*
+          * dst may be:
+          * 1. the hierarchy level just finer than level number next_coarser_ln.
+          * 2. a level that nests in level number next_coarser_ln.
+          *    a. a new level generated by GriddingAlgorithm.
+          *    b. the hierarchy level just finer than level number next_coarser_ln,
+          *       coarsened for Richardson extrapolation.
+          * In any case, dst should nest in hiercoarse.  Furthermore, it does
+          * not grow when coarsened into the hiercoarse index space.
+          */
+         // hiercoarse_growth_to_nest_supp = hier::IntVector::getZero(dim);
+         hiercoarse_growth_to_nest_supp = dst_to_fill.getConnectorWidth();
+         hiercoarse_growth_to_nest_supp.ceiling(dst_hiercoarse_ratio);
+      }
+
+      /*
+       * Recursively fill the coarse schedule using the private
+       * refine schedule constructor.
+       */
+
+      /*
+       * We need to make sure that the coarse schedule uses
+       * BoxGeometryVariableFillPattern, so that it fills all needed parts of
+       * d_supp_level
+       */
+      tbox::Pointer<BoxGeometryVariableFillPattern> bg_fill_pattern(
+         new BoxGeometryVariableFillPattern());
+
+      tbox::Pointer<RefineClasses> coarse_schedule_refine_classes(
+         new RefineClasses());
+
+      const int num_refine_items =
+         d_refine_classes->getNumberOfRefineItems();
+
+      for (int nd = 0; nd < num_refine_items; nd++) {
+         RefineClasses::Data item = d_refine_classes->getRefineItem(nd);
+         item.d_var_fill_pattern = bg_fill_pattern;
+         coarse_schedule_refine_classes->insertEquivalenceClassItem(item);
+      }
+
+      t_finish_sched_const_recurse->stop();
+      t_finish_sched_const->stop();
+
+      if (s_extra_debug) {
+         const std::string dbgbord;
+         tbox::plog << "finishScheduleConstruction in recursion_level="
+                    << recursion_level << " next_coarser_ln=" << next_coarser_ln
+                    << " creating coarse schedule to fill supp\n"
+                    << "supp_mapped_box_level:\n"
+                    << supp_mapped_box_level.format(dbgbord, 2);
+      }
+      d_supp_schedule = new RefineSchedule(d_supp_level,
+            hiercoarse_level,
+            next_coarser_ln - 1,
+            hierarchy,
+            hiercoarse_growth_to_nest_supp,
+                                           supp_to_hiercoarse,
+                                           hiercoarse_to_supp,
+            coarse_schedule_refine_classes,
+            d_transaction_factory,
+            d_refine_patch_strategy);
+
+   } else {
+      t_finish_sched_const->stop();
+   }
+
+   if (s_extra_debug) {
+      tbox::plog << "finishScheduleConstruction exiting recursion_level="
+                 << recursion_level << " next_coarser_ln=" << next_coarser_ln
+                 << std::endl;
+      --recursion_level;
+   }
+}
+
+/*
+ **************************************************************************
+ *
+ * Execute the stored communication schedule that copies data into the
+ * destination component of the destination level.  The algorithm is as
+ * follows:
+ *
+ * (1) Allocate scratch space on the destination level if it does
+ *    not exist.
+ * (2) Call the recursive fill function that will fill the scratch
+ *    space of the destination level.
+ * (3) If the scratch and destination spaces are not the same,
+ *    then copy locally from the scratch into the destination.
+ * (4) Deallocate any previously allocated data.
+ *
+ **************************************************************************
+ */
+
+void RefineSchedule::fillData(
+   double fill_time,
+   bool do_physical_boundary_fill) const
+{
+   t_fill_data->start();
+
+   /*
+    * Set the refine items and time for all transactions.  These items will
+    * be shared by all transaction objects in the communication schedule.
+    */
+
+   d_transaction_factory->setTransactionTime(fill_time);
+   d_transaction_factory->setRefineItems(d_refine_items, d_number_refine_items);
+
+   /*
+    * Check whether scratch data needs to be allocated on the destination
+    * level.  Keep track of those allocated components so that they may be
+    * deallocated later.
+    */
+
+   hier::ComponentSelector allocate_vector;
+   allocateScratchSpace(allocate_vector, d_dst_level, fill_time);
+
+   /*
+    * Begin the recursive algorithm that fills from coarser, fills from
+    * same, and then fills physical boundaries.
+    */
+
+   t_recursive_fill->start();
+   recursiveFill(fill_time, do_physical_boundary_fill);
+   t_recursive_fill->stop();
+
+   /*
+    * Copy the scratch space of the destination level to the destination
+    * space.
+    */
+
+   copyScratchToDestination();
+
+   /*
+    * Deallocate any allocated scratch space on the destination level.
+    */
+
+   d_dst_level->deallocatePatchData(allocate_vector);
+
+   /*
+    * Unset the refine items for all transactions.  These items are
+    * shared by all transaction objects in the communication schedule.
+    */
+
+   d_transaction_factory->unsetRefineItems();
+
+   t_fill_data->stop();
+}
+
+/*
+ **************************************************************************
+ *
+ * Recursively fill the required fill boxes on the destination level.
+ * The scratch component of the level will be filled.  The algorithm
+ * is as follows:
+ *
+ * (1) If we need to get data from a coarser level, then:
+ *   (a) allocate scratch data on the coarser level
+ *   (b) recursively call this routine to get the data
+ *   (c) refine data from the coarse level into this level
+ *   (d) deallocate the scratch data on the coarser level
+ * (2) Copy data from the same level of refinement
+ * (3) Copy data from the physical boundary conditions
+ *
+ **************************************************************************
+ */
+
+void RefineSchedule::recursiveFill(
+   double fill_time,
+   bool do_physical_boundary_fill) const
+{
+   /*
+    * Copy data from the source interiors of the source level into the ghost
+    * cells and interiors of the scratch space on the destination level
+    * for data where coarse data takes priority on level boundaries.
+    */
+   d_coarse_priority_level_schedule->communicate();
+
+   /*
+    * If there is a coarser schedule stored in this object, then we will
+    * need to get data from a coarser grid level.
+    */
+
+   if (!d_supp_schedule.isNull()) {
+
+      /*
+       * Allocate data on the coarser level and keep track of the allocated
+       * components so that they may be deallocated later.
+       */
+
+      hier::ComponentSelector allocate_vector;
+      allocateScratchSpace(allocate_vector, d_supp_level, fill_time);
+
+      /*
+       * Recursively call the fill routine to fill the required coarse fill
+       * boxes on the coarser level.
+       */
+
+      d_supp_schedule->recursiveFill(fill_time, do_physical_boundary_fill);
+
+      /*
+       * The coarse fill boxes should now be filled.  Now interpolate
+       * data from the coarse grid into the fine grid.
+       */
+
+      refineScratchData();
+
+      /*
+       * Deallocate the scratch data from the coarse grid.
+       */
+
+      d_supp_level->deallocatePatchData(allocate_vector);
+   }
+
+   /*
+    * Copy data from the source interiors of the source level into the ghost
+    * cells and interiors of the scratch space on the destination level
+    * for data where fine data takes priority on level boundaries.
+    */
+   d_fine_priority_level_schedule->communicate();
+
+   /*
+    * Fill the physical boundaries of the scratch space on the destination
+    * level.
+    */
+
+   if (do_physical_boundary_fill || d_force_boundary_fill) {
+      fillPhysicalBoundaries(fill_time);
+   }
+}
+
+/*
+ **************************************************************************
+ *
+ * Fill the physical boundaries of the specified level with data.
+ *
+ **************************************************************************
+ */
+
+void RefineSchedule::fillPhysicalBoundaries(
+   double fill_time) const
+{
+   TBOX_ASSERT(!d_dst_level.isNull());
+
+   d_dst_level->setBoundaryBoxes();
+
+   if (d_refine_patch_strategy) {
+      for (hier::PatchLevel::Iterator p(d_dst_level); p; p++) {
+         tbox::Pointer<hier::Patch> patch = *p;
+         if (patch->getPatchGeometry()->intersectsPhysicalBoundary()) {
+            d_refine_patch_strategy->
+            setPhysicalBoundaryConditions(*patch,
+               fill_time,
+               d_boundary_fill_ghost_width);
+         }
+      }
+   }
+}
+
+/*
+ **************************************************************************
+ *
+ * Check whether the scratch data needs to be allocated on the specified
+ * level.  Keep track of those allocated components so that they may be
+ * deallocated later.
+ *
+ **************************************************************************
+ */
+
+void RefineSchedule::allocateScratchSpace(
+   hier::ComponentSelector& allocate_vector,
+   tbox::Pointer<hier::PatchLevel> level,
+   double fill_time) const
+{
+   TBOX_ASSERT(!level.isNull());
+
+   allocate_vector.clrAllFlags();
+
+   hier::ComponentSelector preprocess_vector;
+
+   for (int iri = 0; iri < d_number_refine_items; iri++) {
+      const int scratch_id = d_refine_items[iri]->d_scratch;
+      if (!level->checkAllocated(scratch_id)) {
+         allocate_vector.setFlag(scratch_id);
+      }
+      preprocess_vector.setFlag(scratch_id);
+   }
+
+   level->allocatePatchData(allocate_vector, fill_time);
+
+   if (!d_transaction_factory.isNull()) {
+      d_transaction_factory->preprocessScratchSpace(level,
+         fill_time,
+         preprocess_vector);
+   }
+}
+
+/*
+ **************************************************************************
+ *
+ * Fill the component selector argument with the components needed to
+ * allocate source data.
+ *
+ **************************************************************************
+ */
+
+void RefineSchedule::initializeSourceVector(
+   hier::ComponentSelector& allocate_vector) const
+{
+   allocate_vector.clrAllFlags();
+
+   for (int iri = 0; iri < d_number_refine_items; iri++) {
+      allocate_vector.setFlag(d_refine_items[iri]->d_src);
+   }
+}
+
+/*
+ * ************************************************************************
+ *                                                                        *
+ * Fill the component selector argument with the components needed to     *
+ * allocate destination data.                                             *
+ *                                                                        *
+ * ************************************************************************
+ */
+
+void RefineSchedule::initializeDestinationVector(
+   hier::ComponentSelector& allocate_vector) const
+{
+   allocate_vector.clrAllFlags();
+
+   for (int iri = 0; iri < d_number_refine_items; iri++) {
+      allocate_vector.setFlag(d_refine_items[iri]->d_dst);
+   }
+}
+
+/*
+ **************************************************************************
+ *
+ * Allocate all destination data and store the destination components
+ * in a component selector.
+ *
+ **************************************************************************
+ */
+
+void RefineSchedule::allocateDestinationSpace(
+   hier::ComponentSelector& allocate_vector,
+   double fill_time) const
+{
+   TBOX_ASSERT(!d_dst_level.isNull());
+
+   allocate_vector.clrAllFlags();
+
+   for (int iri = 0; iri < d_number_refine_items; iri++) {
+      const int dst_id = d_refine_items[iri]->d_dst;
+      if (!d_dst_level->checkAllocated(dst_id)) {
+         allocate_vector.setFlag(dst_id);
+      }
+   }
+
+   d_dst_level->allocatePatchData(allocate_vector, fill_time);
+}
+
+/*
+ **************************************************************************
+ *
+ * Copy data from the scratch space of the specified level into the
+ * destination space.  If the two spaces are the same, then no copy
+ * is performed.
+ *
+ **************************************************************************
+ */
+
+void RefineSchedule::copyScratchToDestination() const
+{
+   TBOX_ASSERT(!d_dst_level.isNull());
+
+   for (hier::PatchLevel::Iterator p(d_dst_level); p; p++) {
+      tbox::Pointer<hier::Patch> patch = *p;
+
+      for (int iri = 0; iri < d_number_refine_items; iri++) {
+         const int src_id = d_refine_items[iri]->d_scratch;
+         const int dst_id = d_refine_items[iri]->d_dst;
+         if (src_id != dst_id) {
+            TBOX_ASSERT(tbox::MathUtilities<double>::equalEps(patch->
+                  getPatchData(dst_id)->getTime(),
+                  patch->getPatchData(src_id)->getTime()));
+            patch->getPatchData(dst_id)->copy(*patch->getPatchData(src_id));
+         }
+      }
+
+   }
+
+}
+
+/*
+ **************************************************************************
+ *
+ * Refine data from the coarse level into the fine level on the provided
+ * fill box regions.  All operations are performed on the scratch space.
+ *
+ **************************************************************************
+ */
+
+void RefineSchedule::refineScratchData() const
+{
+   t_refine_scratch_data->start();
+
+   const hier::IntVector ratio(d_dst_level->getRatioToLevelZero()
+                               / d_supp_level->getRatioToLevelZero());
+
+   tbox::ListIterator<tbox::Array<tbox::Pointer<hier::BoxOverlap> > >
+      overlap_iter(d_refine_overlaps);
+
+   /*
+    * Loop over all the supplemental patches and find the corresponding
+    * destination patch and destination fill boxes.
+    */
+
+   const hier::MappedBoxSet& supp_mapped_boxes =
+      d_supp_level->getMappedBoxLevel()->getMappedBoxes();
+   for (hier::MappedBoxSet::const_iterator ni = supp_mapped_boxes.begin();
+        ni != supp_mapped_boxes.end(); ++ni) {
+
+      const MappedBox& supp_mapped_box = *ni;
+      const hier::MappedBoxSet& dst_nabrs =
+         d_supp_to_dst.getNeighborSet(supp_mapped_box.getLocalId());
+      const hier::MappedBox& dst_mapped_box = *dst_nabrs.begin();
+#ifdef DEBUG_CHECK_ASSERTIONS
+      /*
+       * Each supp_mapped_box can point back to just one dst_mapped_box.
+       * All other mapped_boxes in dst_nabrs must be a periodic image of
+       * the same dst_mapped_box.
+       */
+      for (hier::MappedBoxSet::const_iterator na = dst_nabrs.begin();
+           na != dst_nabrs.end();
+           ++na) {
+         TBOX_ASSERT(na->isPeriodicImage() || na == dst_nabrs.begin());
+         TBOX_ASSERT(na->getGlobalId() == dst_mapped_box.getGlobalId());
+      }
+#endif
+      tbox::Pointer<hier::Patch> fine_patch = d_dst_level->getPatch(
+            dst_mapped_box.getLocalId());
+      tbox::Pointer<hier::Patch> supp_patch = d_supp_level->getPatch(
+            supp_mapped_box.getLocalId());
+
+      const NeighborSet& unfilled_nabrs = d_supp_to_unfilled.getNeighborSet(
+            supp_mapped_box.getLocalId());
+      TBOX_ASSERT(unfilled_nabrs.size() == 1);
+      const MappedBox& unfilled_nabr = *unfilled_nabrs.begin();
+      hier::BoxList fill_boxes(unfilled_nabr.getBox());
+
+      if (d_refine_patch_strategy) {
+         d_refine_patch_strategy->preprocessRefineBoxes(*fine_patch,
+            *supp_patch,
+            fill_boxes,
+            ratio);
+      }
+
+      for (int iri = 0; iri < d_number_refine_items; iri++) {
+         const xfer::RefineClasses::Data * const ref_item = d_refine_items[iri];         if (!(ref_item->d_oprefine.isNull())) {
+
+            tbox::Pointer<hier::BoxOverlap> refine_overlap(
+               overlap_iter()[ref_item->d_class_id]);
+
+            const int scratch_id = ref_item->d_scratch;
+
+            ref_item->d_oprefine->refine(*fine_patch, *supp_patch,
+               scratch_id, scratch_id,
+               *refine_overlap, ratio);
+
+         }
+      }
+
+      overlap_iter++;
+
+      if (d_refine_patch_strategy) {
+         d_refine_patch_strategy->postprocessRefineBoxes(*fine_patch,
+            *supp_patch,
+            fill_boxes,
+            ratio);
+      }
+
+   }
+
+   t_refine_scratch_data->stop();
+}
+
+/*
+ **************************************************************************
+ *
+ * Compute the overlaps defining where the data will be refined into the
+ * fine level.  All operations are performed on the scratch space.
+ *
+ **************************************************************************
+ */
+void RefineSchedule::computeRefineOverlaps()
+{
+
+   tbox::Pointer<hier::PatchDescriptor> fine_patch_descriptor =
+      d_dst_level->getPatchDescriptor();
+
+   const int num_equiv_classes =
+      d_refine_classes->getNumberOfEquivalenceClasses();
+
+   /*
+    * Loop over all the supplemental patches and find the corresponding
+    * destination patch and destination fill boxes.
+    */
+
+   const hier::MappedBoxSet& supp_mapped_boxes =
+      d_supp_level->getMappedBoxLevel()->getMappedBoxes();
+   for (hier::MappedBoxSet::const_iterator ni = supp_mapped_boxes.begin();
+        ni != supp_mapped_boxes.end(); ++ni) {
+
+      const MappedBox& supp_mapped_box = *ni;
+      const hier::MappedBoxSet& dst_nabrs =
+         d_supp_to_dst.getNeighborSet(supp_mapped_box.getLocalId());
+      const hier::MappedBox& dst_mapped_box = *dst_nabrs.begin();
+#ifdef DEBUG_CHECK_ASSERTIONS
+      /*
+       * Each supp_mapped_box can point back to just one dst_mapped_box.
+       * All other mapped_boxes in dst_nabrs must be a periodic image of
+       * the same dst_mapped_box.
+       */
+      for (hier::MappedBoxSet::const_iterator na = dst_nabrs.begin();
+           na != dst_nabrs.end();
+           ++na) {
+         TBOX_ASSERT(na->isPeriodicImage() || na == dst_nabrs.begin());
+         TBOX_ASSERT(na->getGlobalId() == dst_mapped_box.getGlobalId());
+      }
+#endif
+      tbox::Pointer<hier::Patch> fine_patch = d_dst_level->getPatch(
+            dst_mapped_box.getLocalId());
+
+      const NeighborSet& unfilled_nabrs = d_supp_to_unfilled.getNeighborSet(
+            supp_mapped_box.getLocalId());
+      TBOX_ASSERT(unfilled_nabrs.size() == 1);
+      const MappedBox& unfilled_nabr = *unfilled_nabrs.begin();
+      hier::BoxList fill_boxes(unfilled_nabr.getBox());
+
+      /*
+       * The refine overlap will cover only  the fine fill box regions.
+       * of index space.  Note that we restrict the interpolation range
+       * to the intersection of the fine fill box and the ghost box of
+       * the scratch data component (i.e., the destination of the
+       * interpolation).  This is needed for the case where data
+       * components treated by the schedule have different ghost
+       * cell widths since the fill boxes are generated using the
+       * maximum ghost cell width.
+       */
+      tbox::Array<tbox::Pointer<hier::BoxOverlap> >
+         refine_overlaps(num_equiv_classes); 
+      for (int ne = 0; ne < num_equiv_classes; ne++) {
+
+         const xfer::RefineClasses::Data& rep_item =
+            d_refine_classes->getClassRepresentative(ne);
+
+         if (!(rep_item.d_oprefine.isNull())) {
+
+            const int scratch_id = rep_item.d_scratch;
+            tbox::Pointer<hier::PatchDataFactory> fine_pdf =
+               fine_patch_descriptor->getPatchDataFactory(scratch_id);
+            const hier::IntVector& fine_scratch_gcw =
+               fine_pdf->getGhostCellWidth();
+            hier::Box scratch_space(fine_patch->getBox());
+            scratch_space.grow(fine_scratch_gcw);
+
+            refine_overlaps[ne] =
+               rep_item.d_var_fill_pattern->computeFillBoxesOverlap(
+                  fill_boxes,
+                  fine_patch->getBox(),
+                  scratch_space,
+                  *fine_pdf);
+
+         }
+      }
+      d_refine_overlaps.appendItem(refine_overlaps);
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ * Generate communication schedule routine creates transactions to move
+ * data from interiors of the source space on the source level into the
+ * specified fill box regions of the destination level.  Each fill box
+ * will typically be the interior plus max ghost cells over all data
+ * components on the destination region.  If the source and the scratch
+ * are the same and the source and destination levels  are the same,
+ * then there is no need to copy on the interiors for the same patch.
+ *
+ * The resulting transactions will only fill the regions of intersection
+ * between the fill_boxes and destination level boxes.  The remaining
+ * box regions are returned in unfilled_boxes.
+ *
+ * This main schedule generation routine which passes control to one
+ * of the algorithmic variations below based on boolean parameters set
+ * to default settings in the constructors and possibly changed via
+ * an input file.
+ *
+ *********************************************************************
+ */
+
+void RefineSchedule::generateCommunicationSchedule(
+   MappedBoxLevel& unfilled_mapped_box_level,
+   Connector& dst_to_unfilled,
+   const Connector& dst_to_src,
+   const Connector& src_to_dst,
+   const Connector& dst_to_fill,
+   const FillSet& dst_to_fill_on_src_proc,
+   const bool use_time_interpolation)
+{
+   t_gen_comm_sched->start();
+
+   const tbox::Dimension& dim(d_dst_level->getDim());
+
+   if (s_extra_debug) {
+      if (dst_to_src.isInitialized()) {
+         dst_to_src.assertTransposeCorrectness(src_to_dst);
+         src_to_dst.assertTransposeCorrectness(dst_to_src);
+      }
+   }
+   if (s_extra_debug) {
+      tbox::plog
+         << "generateCommunicationSchedule: dst_to_src:" << dst_to_src.format("\t", 2)
+         << "generateCommunicationSchedule: src_to_dst:" << src_to_dst.format("\t", 2)
+         << "generateCommunicationSchedule: dst_to_fill:" << dst_to_fill.format("\t", 2);
+   }
+   /*
+    * We invert the edges so that the src transactions on the local
+    * process is created in the same order the dst transactions
+    * are created on remote processes.  The ordering is how the
+    * source and destination transactions are matched up on the
+    * receiving process.  We chose to order the transactions
+    * dst-major (all the transactions for one dst MappedBox are
+    * grouped together, then all transactions for the next
+    * dst MappedBox, and so on).
+    */
+   const hier::NeighborhoodSet& dst_eto_src = dst_to_src.getNeighborhoodSets();
+
+   const MappedBoxLevel& dst_mapped_box_level = dst_to_src.getBase();
+
+   const bool dst_finer = dst_to_src.getHeadCoarserFlag();
+   const bool src_finer = !dst_to_src.getHeadCoarserFlag() &&
+      dst_to_src.getRatio() != hier::IntVector::getOne(dim);
+
+
+   /*
+    * Construct sending transactions for local src mapped_boxes (except
+    * for transactions with local dst mapped_boxes).
+    */
+   if (s_extra_debug) {
+      tbox::plog << "Constructing send transactions" << std::endl;
+   }
+   t_construct_send_trans->start();
+
+   /*
+    * Restructure the src_to_dst edge data to arange neighbors by the
+    * dst mapped_boxes, as required to match the transaction ordering
+    * on the receiving processors.  At the same time, shift src-dst
+    * pairs to make the dst shifts zero.
+    */
+   FullNeighborhoodSet src_eto_dst_bydst;
+   t_invert_edges->start();
+   restructureNeighborhoodSetsByDstNodes(src_eto_dst_bydst, src_to_dst);
+   t_invert_edges->stop();
+
+   for (FullNeighborhoodSet::const_iterator ei = src_eto_dst_bydst.begin();
+        ei != src_eto_dst_bydst.end(); ++ei) {
+
+      /*
+       * dst_mapped_box can be remote (by definition of FullNeighborhoodSet).
+       * local_src_mapped_boxes are the local source mapped_boxes that
+       * contribute data to dst_mapped_box.
+       */
+      const MappedBox& dst_mapped_box = ei->first;
+      const hier::MappedBoxSet& local_src_mapped_boxes = ei->second;
+      TBOX_ASSERT(!dst_mapped_box.isPeriodicImage());
+
+      FillSet::const_iterator dst_fill_boxes_ =
+         dst_to_fill_on_src_proc.find(dst_mapped_box.getGlobalId());
+      if (dst_fill_boxes_ == dst_to_fill_on_src_proc.end()) {
+         /*
+          * Missing fill boxes should indicate that the dst mapped_box
+          * has no fill box.  One way this is possible is for
+          * d_dst_level_fill_pattern to be of type PatchLevelBorderFillPattern
+          * and for dst_mapped_box to be away from level borders.
+          */
+         continue;
+      }
+      const BoxVector& dst_fill_boxes = dst_fill_boxes_->second;
+
+      /*
+       * Construct transactions for data going from local source mapped_boxes
+       * to remote dst mapped_boxes.
+       */
+      for (hier::MappedBoxSet::const_iterator ni = local_src_mapped_boxes.begin();
+           ni != local_src_mapped_boxes.end(); ++ni) {
+         const MappedBox& src_mapped_box = *ni;
+         if (src_mapped_box.getOwnerRank() == dst_mapped_box.getOwnerRank()) {
+            /*
+             * Disregard local dst_mapped_box to avoid duplicating same
+             * transactions created by the second loop below.
+             */
+            continue;
+         }
+         constructScheduleTransactions(
+            dst_fill_boxes,
+            dst_mapped_box,
+            src_mapped_box,
+            use_time_interpolation);
+      }
+
+   }
+   t_construct_send_trans->stop();
+
+   /*
+    * Construct receiving transactions for local dst mapped_boxes.
+    * Set unfilled_mapped_box_level, and dst_eto_unfilled.
+    */
+   if (s_extra_debug) {
+      tbox::plog << "Constructing receive and copy transactions" << std::endl;
+   }
+   const hier::NeighborhoodSet& dst_eto_fill = dst_to_fill.getNeighborhoodSets();
+   hier::MappedBoxSet unfilled_mapped_boxes;
+   hier::NeighborhoodSet dst_eto_unfilled;
+   hier::LocalId last_unfilled_index(-1);
+   t_construct_recv_trans->start();
+   for (hier::NeighborhoodSet::const_iterator cf = dst_eto_fill.begin();
+        cf != dst_eto_fill.end(); ++cf) {
+
+      const hier::GlobalId& dst_global_id(cf->first);
+      const MappedBox& dst_mapped_box = *dst_mapped_box_level.getMappedBox(
+            dst_global_id);
+
+      const NeighborSet& fill_nabrs = cf->second;
+
+      hier::NeighborhoodSet::const_iterator cs = dst_eto_src.find(dst_global_id);
+
+      if (cs != dst_eto_src.end()) {
+         /*
+          * dst_mapped_box has overlaps with src mapped_box_level.
+          * Fill what we can using src and add the remaining to unfilled.
+          */
+
+         BoxVector fill_boxes;
+         hier::MappedBoxContainerUtils::convertMappedBoxSetToBoxVector(fill_boxes, fill_nabrs);
+         hier::BoxList unfilled_box_for_dst;
+         hier::MappedBoxContainerUtils::convertMappedBoxSetToBoxList(unfilled_box_for_dst,
+               fill_nabrs);
+
+         const NeighborSet& src_nabrs = cs->second;
+         for (NeighborSet::const_iterator na = src_nabrs.begin();
+              na != src_nabrs.end(); ++na) {
+
+            const MappedBox& src_mapped_box = *na;
+            constructScheduleTransactions(
+               fill_boxes,
+               dst_mapped_box,
+               src_mapped_box,
+               use_time_interpolation);
+            hier::Box src_box_in_dst_space = src_mapped_box.getBox();
+            if (dst_finer) {
+               src_box_in_dst_space.refine(src_to_dst.getRatio());
+            } else if (src_finer) {
+               src_box_in_dst_space.coarsen(src_to_dst.getRatio());
+            }
+            unfilled_box_for_dst.removeIntersections(src_box_in_dst_space);
+
+         }
+
+         if (!unfilled_box_for_dst.isEmpty()) {
+            NeighborSet& unfilled_nabrs = dst_eto_unfilled[dst_global_id];
+            for (hier::BoxList::Iterator bi(unfilled_box_for_dst);
+                 bi; bi++) {
+               // TBOX_ASSERT( grown_dst_box.intersects( *bi ) );
+               const MappedBox unfilled_mapped_box =
+                  *unfilled_mapped_boxes.insert(unfilled_mapped_boxes.end(),
+                     MappedBox(bi(),
+                        ++last_unfilled_index,
+                        dst_mapped_box.getOwnerRank()));
+               unfilled_nabrs.insert(unfilled_nabrs.end(), unfilled_mapped_box);
+            }
+         }
+
+      } else {
+         /*
+          * dst_mapped_box does not overlap with any mapped_boxes in src.
+          * All of it goes into unfilled.
+          */
+         NeighborSet& unfilled_nabrs = dst_eto_unfilled[dst_global_id];
+         for (NeighborSet::const_iterator na = fill_nabrs.begin();
+              na != fill_nabrs.end(); ++na) {
+            const MappedBox& fill_nabr = *na;
+            const MappedBox& unfilled_mapped_box =
+               *unfilled_mapped_boxes.insert(unfilled_mapped_boxes.end(),
+                  MappedBox(fill_nabr.getBox(),
+                     ++last_unfilled_index,
+                     fill_nabr.getOwnerRank()));
+            unfilled_nabrs.insert(unfilled_nabrs.end(), unfilled_mapped_box);
+         }
+      }
+
+   } // End loop through dst mapped_boxes.
+   t_construct_recv_trans->stop();
+
+   unfilled_mapped_box_level.initialize(
+      unfilled_mapped_boxes,
+      dst_mapped_box_level.getRefinementRatio(),
+      dst_mapped_box_level.getMPI());
+
+   dst_to_unfilled.initialize(
+      dst_mapped_box_level,
+      unfilled_mapped_box_level,
+      dst_to_fill.getConnectorWidth(),
+      dst_eto_unfilled,
+      MappedBoxLevel::DISTRIBUTED);
+   dst_to_unfilled.setConnectorType(hier::Connector::BASE_GENERATED);
+
+   if (!dst_to_fill.getHead().getLocalBoundingBox().contains(
+          unfilled_mapped_box_level.getLocalBoundingBox())) {
+      TBOX_ERROR(
+         "RefineSchedule::generateCommunicationSchedule: library error\n"
+         << "Unfilled bounding box "
+         << unfilled_mapped_box_level.getLocalBoundingBox()
+         << "does not nest inside fill bounding box "
+         << dst_to_fill.getHead().getLocalBoundingBox() << "\n"
+         << "fill:\n" << dst_to_fill.getHead().format("ERR:F-> ", 3)
+         << "unfilled:\n" << unfilled_mapped_box_level.format("ERR:U-> ", 3)
+         << "dst-->fill:\n" << dst_to_fill.format("ERR:DF->", 3)
+         << "dst-->unfilled:\n" << dst_to_fill.format("ERR:DU-> ", 3));
+   }
+
+   t_gen_comm_sched->stop();
+}
+
+/*
+ ***********************************************************************
+ * This method does 2 important things to the src_to_dst edges:
+ *
+ * 1. It puts the edge data in dst-major order so the src owners can
+ * easily loop through the dst-src edges in the same order that dst
+ * owners see them.  Transactions must have the same order on the
+ * sending and receiving processors.
+ *
+ * 2. It shifts periodic image dst MappedBoxes back to the zero-shift position,
+ * and applies a similar shift to src MappedBoxes so that the overlap is
+ * unchanged.  The constructScheduleTransactions method requires all
+ * shifts to be absorbed in the src MappedBox.
+ ***********************************************************************
+ */
+void RefineSchedule::restructureNeighborhoodSetsByDstNodes(
+   FullNeighborhoodSet& full_inverted_edges,
+   const Connector& src_to_dst) const
+{
+   const tbox::Dimension& dim(d_dst_level->getDim());
+
+   const hier::PeriodicShiftCatalog* shift_catalog =
+      hier::PeriodicShiftCatalog::getCatalog(dim);
+   const int zero_shift_number = shift_catalog->getZeroShiftNumber();
+   const hier::NeighborhoodSet& edges = src_to_dst.getNeighborhoodSets();
+   const MappedBoxLevel& src_mapped_box_level = src_to_dst.getBase();
+   const hier::IntVector& src_ratio = src_to_dst.getBase().getRefinementRatio();
+   const hier::IntVector& dst_ratio = src_to_dst.getHead().getRefinementRatio();
+
+   /*
+    * These are the counterparts to shifted dst mapped_boxes and unshifted src
+    * mapped_boxes.
+    */
+   MappedBox shifted_mapped_box(dim), unshifted_nabr(dim);
+   full_inverted_edges.clear();
+   for (hier::NeighborhoodSet::const_iterator ci = edges.begin();
+        ci != edges.end();
+        ++ci) {
+      const MappedBox& mapped_box =
+         *src_mapped_box_level.getMappedBoxStrict(ci->first, zero_shift_number);
+      const NeighborSet& nabrs = ci->second;
+      for (NeighborSet::const_iterator na = nabrs.begin();
+           na != nabrs.end(); ++na) {
+         const hier::MappedBox& nabr = *na;
+         if (nabr.isPeriodicImage()) {
+            shifted_mapped_box.initialize(
+               mapped_box,
+               shift_catalog->getOppositeShiftNumber(nabr.getPeriodicShiftNumber()),
+               src_ratio);
+            unshifted_nabr.initialize(
+               nabr,
+               shift_catalog->getZeroShiftNumber(),
+               dst_ratio);
+            full_inverted_edges[unshifted_nabr].insert(shifted_mapped_box);
+         } else {
+            full_inverted_edges[nabr].insert(mapped_box);
+         }
+      }
+   }
+}
+
+/*
+ ****************************************************************
+ * Set the fill boxes and the dst--->fill Connector.
+ * Initialize this same information on the src processes as well.
+ *
+ * Compute the fill boxes of the dst level according to the
+ * d_dst_level_fill_pattern.  Initialize the fill MappedBoxLevel from
+ * the those fill boxes.
+ *
+ * Set the edges between dst and fill mapped_box_levels (trivial,
+ * since fill MappedBoxLevel is related to dst MappedBoxLevel).  Set
+ * edges between src and fill mapped_box_levels (by copying the edges
+ * between src and dst.
+ *
+ * If d_dst_level_fill_pattern can compute the relationship between
+ * dst boxes and fill boxes on the src processes, have it do that.
+ * Otherwise, perform communication to get that information onto the
+ * src processes.
+ *
+ * The Connectors dst_to_dst and dst_to_src (in the arguments)
+ * are required only for fill_patterns PatchLevelBorderFillPattern and
+ * and PatchLevelBorderAndInteriorFillPattern
+ ****************************************************************
+ */
+
+void RefineSchedule::setDefaultFillMappedBoxLevel(
+   MappedBoxLevel& fill_mapped_box_level,
+   Connector& dst_to_fill,
+   FillSet& dst_to_fill_on_src_proc,
+   const MappedBoxLevel& dst_mapped_box_level,
+   const hier::Connector* dst_to_src,
+   const hier::Connector* src_to_dst,
+   const hier::IntVector& fill_ghost_width)
+{
+   /*
+    * If the destination variable of any registered communication
+    * requires that coarse data take precedence over fine data at
+    * coarse-fine boundaries, make sure that the ghost cell width is
+    * at least one in each direction.  This is necessary so that
+    * generateCommunicationSchedule() determines that boundary data for
+    * the level needs to be transferred from the next coarser level
+    * (i.e. the interiors of the fill boxes overlap the next coarser
+    * level in a nontrivial way).
+    */
+
+   const tbox::Dimension& dim(d_dst_level->getDim());
+
+   TBOX_DIM_ASSERT_CHECK_DIM_ARGS2(dim, dst_mapped_box_level, fill_ghost_width);
+
+   const hier::IntVector& constant_one_intvector(hier::IntVector::getOne(dim));
+
+   bool need_nontrivial_ghosts = false;
+   for (int iri = 0; iri < d_number_refine_items; iri++) {
+      if (!(d_refine_items[iri]->d_fine_bdry_reps_var)) {
+         need_nontrivial_ghosts = true;
+      }
+   }
+
+   hier::IntVector fill_gcw = fill_ghost_width;
+   if (need_nontrivial_ghosts) {
+      fill_gcw.max(constant_one_intvector);
+   }
+
+   const Connector dummy_connector;
+   const Connector* dst_to_dst =
+      dst_mapped_box_level.getPersistentOverlapConnectors().hasConnector(
+         dst_mapped_box_level,
+         fill_gcw) ?
+      &dst_mapped_box_level.getPersistentOverlapConnectors().findConnector(
+         dst_mapped_box_level,
+         fill_gcw) : &dummy_connector;
+
+   // New data computed here:
+   hier::MappedBoxSet fill_mapped_boxes;
+   hier::NeighborhoodSet dst_eto_fill;
+
+   /*
+    * d_max_fill_boxes is the max number of fill boxes
+    * for any dst mapped_box.  d_max_fill_boxes is nominally 1.
+    * If more is required (based on fill_pattern),
+    * it is incremented below.
+    */
+   d_max_fill_boxes = 1;
+
+   /*
+    * Generate fill mapped_boxes (grown dst mapped_boxes) and
+    * get edges between dst and fill mapped_box_levels.
+    * These are all local edges by definition.
+    * Note that since fill mapped_boxes are simply grown
+    * versions of dst_mapped_box (at most), edges between
+    * fill and src mapped_box_levels would have gcw of zero.
+    *
+    * Technically speaking, edges between dst and
+    * fill are not complete.  Once the dst box is
+    * grown to make the fill box, the fill box may
+    * intersect other boxes in the dst mapped_box_level.  We
+    * ignore all these overlaps because they are not
+    * needed by the algorithm.
+    */
+
+   d_dst_level_fill_pattern->computeFillMappedBoxesAndNeighborhoodSets(
+      fill_mapped_boxes,
+      dst_eto_fill,
+      dst_mapped_box_level,
+      *dst_to_dst,
+      dst_to_src == NULL ? dummy_connector : *dst_to_src,
+      src_to_dst == NULL ? dummy_connector : *src_to_dst,
+      fill_gcw);
+
+   d_max_fill_boxes = tbox::MathUtilities<int>::Max(
+         d_max_fill_boxes,
+         d_dst_level_fill_pattern->getMaxFillBoxes());
+
+   fill_mapped_box_level.swapInitialize(
+      fill_mapped_boxes,
+      dst_mapped_box_level.getRefinementRatio(),
+      dst_mapped_box_level.getMPI());
+
+   /*
+    * Note that dst_to_fill is NOT complete.
+    * We care only about the intersection between a dst_mapped_box
+    * and the fill_mapped_box it created.  In fact, a dst_mapped_box
+    * may also intersect the fill_mapped_box of other nearby
+    * destination mapped_boxes.
+    */
+   dst_to_fill.swapInitialize(
+      dst_mapped_box_level,
+      fill_mapped_box_level,
+      fill_gcw,
+      dst_eto_fill,
+      MappedBoxLevel::DISTRIBUTED);
+   dst_to_fill.setConnectorType(hier::Connector::BASE_GENERATED);
+
+   if (!d_src_level.isNull()) {
+      if (d_dst_level_fill_pattern->needsToCommunicateDestinationFillBoxes()) {
+
+         /*
+          * This part assumes src-dst ratio is one.
+          * Should be modified if the assumption does not hold.
+          */
+         TBOX_ASSERT(dst_to_src->getRatio() == hier::IntVector::getOne(dim));
+
+         /*
+          * For these fill_pattern, the src owner could not compute fill boxes
+          * for all its dst neighbors using local data, so the dst owners
+          * must send this information.
+          */
+         communicateFillBoxes(dst_to_fill_on_src_proc,
+            dst_to_fill,
+            *dst_to_src,
+            *src_to_dst);
+
+      } else {
+         d_dst_level_fill_pattern->computeDestinationFillBoxesOnSourceProc(
+            dst_to_fill_on_src_proc,
+            dst_mapped_box_level,
+            *src_to_dst,
+            fill_gcw);
+      }
+   }
+}
+
+/*
+ **************************************************************************
+ * Calculate the maximum ghost cell width of all destination patch data
+ * components.
+ *
+ * It is possible for dst_to_fill_on_src_proc to omit a visible dst mapped_box
+ * if the dst mapped_box has no fill boxes.
+ **************************************************************************
+ */
+void RefineSchedule::communicateFillBoxes(
+   FillSet& dst_to_fill_on_src_proc,
+   const Connector& dst_to_fill,
+   const Connector& dst_to_src,
+   const Connector& src_to_dst)
+{
+   const tbox::Dimension& dim(d_dst_level->getDim());
+
+   const hier::NeighborhoodSet& dst_eto_src = dst_to_src.getNeighborhoodSets();
+
+   std::set<int> src_owners;
+   hier::MappedBoxContainerUtils::getOwnersFromNeighborhoodSet(src_owners, dst_to_src.getNeighborhoodSets());
+   src_owners.erase(dst_to_fill.getBase().getRank());
+
+   std::set<int> dst_owners;
+   hier::MappedBoxContainerUtils::getOwnersFromNeighborhoodSet(dst_owners, src_to_dst.getNeighborhoodSets());
+   dst_owners.erase(dst_to_fill.getBase().getRank());
+
+   std::map<int, std::vector<int> > send_mesgs;
+   std::map<int, std::vector<int> > recv_mesgs;
+
+   tbox::AsyncCommStage comm_stage;
+   tbox::AsyncCommStage::MemberVec completed;
+   tbox::AsyncCommPeer<int>* comms =
+      new tbox::AsyncCommPeer<int>[src_owners.size() + dst_owners.size()];
+
+   int mesg_number = 0;
+
+   /*
+    * Post receives for fill boxes from dst owners.
+    */
+
+   // TODO: should use cyclic ordering for efficiency.
+   for (std::set<int>::const_iterator di = dst_owners.begin();
+        di != dst_owners.end(); ++di) {
+      comms[mesg_number].initialize(&comm_stage);
+      comms[mesg_number].setPeerRank(*di);
+      // Reuse communicator.  Assuming it has no outstanding messages!
+      comms[mesg_number].setMPI(src_to_dst.getMPI());
+      comms[mesg_number].setMPITag(0, 1);
+      comms[mesg_number].beginRecv();
+      if (comms[mesg_number].isDone()) {
+         completed.insert(completed.end(), &comms[mesg_number]);
+      }
+      ++mesg_number;
+   }
+
+   /*
+    * Pack fill boxes and send messages to src owners.
+    * TODO: should use cyclic ordering for efficiency.
+    */
+   // Pack messages.
+   std::vector<int> tmp_mesg;
+   BoxVector tmp_fill_boxes;
+   const hier::NeighborhoodSet& dst_eto_fill = dst_to_fill.getNeighborhoodSets();
+   for (hier::NeighborhoodSet::const_iterator ei = dst_eto_fill.begin();
+        ei != dst_eto_fill.end(); ++ei) {
+      const hier::GlobalId& dst_global_id = ei->first;
+      const NeighborSet& fill_nabrs = ei->second;
+      /*
+       * Pack dst_global_id's fill box info into tmp_mesg.
+       * - dst_global_id's LocalId
+       * - number of fill neighbors
+       * - fill neighbors (could just send box and save 2 ints)
+       * Also, create BoxVector object for local use.
+       */
+      tmp_mesg.clear();
+      tmp_mesg.reserve(2 + fill_nabrs.size() * MappedBox::commBufferSize(dim));
+      tmp_mesg.insert(tmp_mesg.end(), 2, 0);
+      tmp_mesg[0] = dst_global_id.getLocalId().getValue();
+      tmp_mesg[1] = static_cast<int>(fill_nabrs.size());
+      tmp_fill_boxes.clear();
+      tmp_fill_boxes.reserve(fill_nabrs.size());
+      for (NeighborSet::const_iterator na = fill_nabrs.begin();
+           na != fill_nabrs.end(); ++na) {
+         tmp_mesg.insert(tmp_mesg.end(), MappedBox::commBufferSize(dim), 0);
+         na->putToIntBuffer(&tmp_mesg[tmp_mesg.size()
+                                      - MappedBox::commBufferSize(dim)]);
+         tmp_fill_boxes.insert(tmp_fill_boxes.end(), na->getBox());
+      }
+      // Append tmp_mesg to buffers for sending to src owners.
+      hier::NeighborhoodSet::const_iterator di = dst_eto_src.find(dst_global_id);
+      if (di != dst_eto_src.end()) {
+         const NeighborSet& src_nabrs = di->second;
+         std::set<int> tmp_owners;
+         hier::MappedBoxContainerUtils::getOwnersFromNeighbors(tmp_owners, src_nabrs);
+         for (std::set<int>::const_iterator so = tmp_owners.begin();
+              so != tmp_owners.end(); ++so) {
+            const int& src_owner = *so;
+            if (src_owner == dst_global_id.getOwnerRank()) {
+               dst_to_fill_on_src_proc[dst_global_id] = tmp_fill_boxes;
+            } else {
+               std::vector<int>& send_mesg = send_mesgs[src_owner];
+               send_mesg.insert(send_mesg.end(),
+                  tmp_mesg.begin(),
+                  tmp_mesg.end());
+            }
+         }
+      }
+   }
+   // Send messages.
+   for (std::set<int>::const_iterator si = src_owners.begin();
+        si != src_owners.end(); ++si) {
+      comms[mesg_number].initialize(&comm_stage);
+      comms[mesg_number].setPeerRank(*si);
+      // Reuse communicator.  Assuming it has no outstanding messages!
+      comms[mesg_number].setMPI(src_to_dst.getMPI());
+      comms[mesg_number].setMPITag(0, 1);
+      comms[mesg_number].beginSend(&send_mesgs[*si][0],
+                                   static_cast<int>(send_mesgs[*si].size()));
+      if (comms[mesg_number].isDone()) {
+         completed.insert(completed.end(), &comms[mesg_number]);
+      }
+      ++mesg_number;
+   }
+
+   /*
+    * Complete communication and unpack messages.
+    */
+   do {
+      for (size_t i = 0; i < completed.size(); ++i) {
+         tbox::AsyncCommPeer<int>* peer =
+            dynamic_cast<tbox::AsyncCommPeer<int> *>(completed[i]);
+         TBOX_ASSERT(completed[i] != NULL);
+         TBOX_ASSERT(peer != NULL);
+         if (peer < comms + src_owners.size()) {
+            // This is a receive.  Unpack it.  (Otherwise, ignore send completion.)
+            const int* ptr = peer->getRecvData();
+            while (ptr != peer->getRecvData() + peer->getRecvSize()) {
+               const hier::GlobalId distributed_id(hier::LocalId(ptr[0]), peer->getPeerRank());
+               const unsigned int num_fill_mapped_boxes = ptr[1];
+               ptr += 2;
+               d_max_fill_boxes = tbox::MathUtilities<int>::Max(
+                     d_max_fill_boxes,
+                     num_fill_mapped_boxes);
+               BoxVector& fill_boxes = dst_to_fill_on_src_proc[distributed_id];
+               for (size_t ii = 0; ii < num_fill_mapped_boxes; ++ii) {
+                  MappedBox tmp_dst_mapped_box(dim);
+                  tmp_dst_mapped_box.getFromIntBuffer(ptr);
+                  ptr += MappedBox::commBufferSize(dim);
+                  fill_boxes.insert(fill_boxes.end(), tmp_dst_mapped_box.getBox());
+               }
+            }
+            TBOX_ASSERT(ptr == peer->getRecvData() + peer->getRecvSize());
+         }
+      }
+      completed.clear();
+      comm_stage.advanceSome(completed);
+   } while (!completed.empty());
+
+   delete[] comms;
+}
+
+/*
+ **************************************************************************
+ * Calculate the maximum ghost cell width of all destination patch data
+ * components.
+ **************************************************************************
+ */
+
+hier::IntVector RefineSchedule::getMaxDestinationGhosts() const
+{
+   const tbox::Dimension& dim(d_dst_level->getDim());
+
+   hier::IntVector gcw(dim, 0);
+   tbox::Pointer<hier::PatchDescriptor> pd = d_dst_level->getPatchDescriptor();
+
+   for (int iri = 0; iri < d_number_refine_items; iri++) {
+      const int dst_id = d_refine_items[iri]->d_dst;
+      gcw.max(pd->getPatchDataFactory(dst_id)->getGhostCellWidth());
+   }
+
+   return gcw;
+}
+
+/*
+ **************************************************************************
+ *
+ * Calculate the maximum ghost cell width of all scratch patch data
+ * components.
+ *
+ **************************************************************************
+ */
+
+hier::IntVector RefineSchedule::getMaxScratchGhosts() const
+{
+   const tbox::Dimension& dim(d_dst_level->getDim());
+
+   hier::IntVector gcw(dim, 0);
+   tbox::Pointer<hier::PatchDescriptor> pd = d_dst_level->getPatchDescriptor();
+
+   for (int iri = 0; iri < d_number_refine_items; iri++) {
+      const int scratch_id = d_refine_items[iri]->d_scratch;
+      gcw.max(pd->getPatchDataFactory(scratch_id)->getGhostCellWidth());
+   }
+
+   return gcw;
+}
+
+/*
+ **************************************************************************
+ *
+ * Calculate the maximum ghost cell width required for all stencils.
+ *
+ **************************************************************************
+ */
+
+hier::IntVector RefineSchedule::getMaxStencilGhosts() const
+{
+   const tbox::Dimension& dim(d_dst_level->getDim());
+
+   hier::IntVector gcw(dim, 0);
+   if (d_refine_patch_strategy) {
+      gcw = d_refine_patch_strategy->getRefineOpStencilWidth();
+   }
+
+   for (int iri = 0; iri < d_number_refine_items; iri++) {
+      if (!(d_refine_items[iri]->d_oprefine.isNull())) {
+         gcw.max(d_refine_items[iri]->d_oprefine->getStencilWidth());
+      }
+   }
+
+   return gcw;
+}
+
+/*
+ *************************************************************************
+ *
+ * Private utility function that constructs schedule transactions that
+ * move data from source patch on source level to destination patch
+ * on destination level on regions defined by list of fil boxes.
+ *
+ *************************************************************************
+ */
+
+void RefineSchedule::constructScheduleTransactions(
+   const BoxVector& fill_boxes,
+   const MappedBox& dst_mapped_box,
+   const MappedBox& src_mapped_box,
+   bool use_time_interpolation)
+{
+   TBOX_ASSERT(!d_dst_level.isNull());
+   TBOX_ASSERT(!d_src_level.isNull());
+   TBOX_ASSERT(!dst_mapped_box.isPeriodicImage()); // src absorbs the shift, if any.
+
+   const tbox::Dimension& dim(d_dst_level->getDim());
+   const int my_rank = d_dst_level->getMappedBoxLevel()->getRank();
+
+   const bool dst_is_local = (dst_mapped_box.getOwnerRank() == my_rank);
+   const bool src_is_local = (src_mapped_box.getOwnerRank() == my_rank);
+
+   tbox::Pointer<hier::Patch> dst_patch;
+   tbox::Pointer<hier::Patch> src_patch;
+
+   if (dst_is_local) {
+      const LocalId &dst_local_id = dst_mapped_box.getLocalId();
+      dst_patch = d_dst_level->getPatch(dst_local_id);
+   }
+   if (src_is_local) {
+      const LocalId &src_local_id = src_mapped_box.getLocalId();
+      src_patch = d_src_level->getPatch(src_local_id);
+   }
+
+   const hier::IntVector& constant_zero_intvector(hier::IntVector::getZero(dim));
+   const hier::IntVector& constant_one_intvector(hier::IntVector::getOne(dim));
+
+   if (s_extra_debug) {
+      tbox::plog << "constructScheduleTransactions: " << use_time_interpolation
+                 << std::endl;
+      tbox::plog << "  src: L" << d_src_level->getLevelNumber()
+                 << "R" << d_src_level->getRatioToLevelZero()
+                 << " / " << src_mapped_box << std::endl;
+      tbox::plog << "  dst: L" << d_dst_level->getLevelNumber()
+                 << "R" << d_dst_level->getRatioToLevelZero()
+                 << " / " << dst_mapped_box << std::endl;
+      tbox::plog << "  fill_boxes (" << fill_boxes.size() << ")";
+      for (BoxVector::const_iterator bi = fill_boxes.begin();
+           bi != fill_boxes.end(); ++bi) {
+         tbox::plog << " " << *bi;
+      }
+      tbox::plog << std::endl;
+   }
+
+   /*
+    * d_src_masks and d_overlaps exist only in this method, but are
+    * class members instead of temporaries so that they don't
+    * have to be reallocated every time this method is used.
+    */
+   int max_overlap_array_size = d_max_fill_boxes;
+
+   if (d_src_masks.getNumberOfBoxes() < max_overlap_array_size) {
+      d_src_masks.resizeBoxArray(0);
+      d_src_masks.resizeBoxArray(max_overlap_array_size);
+   }
+   if (d_overlaps.getSize() < max_overlap_array_size) {
+      d_overlaps.setNull();
+      d_overlaps.resizeArray(max_overlap_array_size);
+   }
+
+   tbox::Pointer<hier::PatchDescriptor> dst_patch_descriptor =
+      d_dst_level->getPatchDescriptor();
+   tbox::Pointer<hier::PatchDescriptor> src_patch_descriptor =
+      d_src_level->getPatchDescriptor();
+
+   const hier::Box& dst_box = dst_mapped_box.getBox();
+#ifdef DEBUG_CHECK_ASSERTIONS
+   const hier::Box& src_box = src_mapped_box.getBox();
+   // src_box used only in debug mode.  Ifdef out in opt mode to avoid warning.
+#endif
+
+   const bool same_patch =
+      (d_dst_level == d_src_level &&
+       dst_mapped_box.getGlobalId() == src_mapped_box.getGlobalId());
+   const bool same_patch_no_shift =
+      (same_patch && !src_mapped_box.isPeriodicImage());
+
+   const int num_equiv_classes =
+      d_refine_classes->getNumberOfEquivalenceClasses();
+
+   const hier::PeriodicShiftCatalog* shift_catalog =
+      hier::PeriodicShiftCatalog::getCatalog(dim);
+
+   /*
+    * Calculate the shift and the shifted source box.
+    */
+   hier::IntVector src_shift(dim, 0);
+   hier::IntVector dst_shift(dim, 0);
+   hier::Box unshifted_src_box = src_mapped_box.getBox();
+   hier::Box unshifted_dst_box = dst_mapped_box.getBox();
+   if (src_mapped_box.isPeriodicImage()) {
+      TBOX_ASSERT(!dst_mapped_box.isPeriodicImage());
+      src_shift = shift_catalog->shiftNumberToShiftDistance(
+            src_mapped_box.getPeriodicShiftNumber());
+      src_shift = (d_src_level->getRatioToLevelZero() >
+                   constant_zero_intvector) ?
+         (src_shift * d_src_level->getRatioToLevelZero()) :
+         hier::IntVector::ceiling(src_shift,
+            -d_src_level->getRatioToLevelZero());
+      unshifted_src_box.shift(-src_shift);
+   }
+   if (dst_mapped_box.isPeriodicImage()) {
+      TBOX_ASSERT(!src_mapped_box.isPeriodicImage());
+      dst_shift = shift_catalog->shiftNumberToShiftDistance(
+            dst_mapped_box.getPeriodicShiftNumber());
+      dst_shift = (d_dst_level->getRatioToLevelZero() >
+                   constant_zero_intvector) ?
+         (dst_shift * d_dst_level->getRatioToLevelZero()) :
+         hier::IntVector::ceiling(dst_shift,
+            -d_dst_level->getRatioToLevelZero());
+      unshifted_dst_box.shift(-dst_shift);
+   }
+   if (s_extra_debug) {
+      tbox::plog << "  src_shift: " << src_shift
+                 << " unshifted_src_box " << unshifted_src_box << std::endl;
+      tbox::plog << "  dst_shift: " << dst_shift
+                 << " unshifted_dst_box " << unshifted_dst_box << std::endl;
+   }
+
+   for (int nc = 0; nc < num_equiv_classes; nc++) {
+
+      const xfer::RefineClasses::Data& rep_item =
+         d_refine_classes->getClassRepresentative(nc);
+
+      const int rep_item_dst_id = rep_item.d_scratch;
+      const int rep_item_src_id = rep_item.d_src;
+
+      tbox::Pointer<hier::PatchDataFactory> src_pdf =
+         src_patch_descriptor->getPatchDataFactory(rep_item_src_id);
+      tbox::Pointer<hier::PatchDataFactory> dst_pdf =
+         dst_patch_descriptor->getPatchDataFactory(rep_item_dst_id);
+
+      const hier::IntVector& dst_gcw = dst_pdf->getGhostCellWidth();
+
+      int box_num = 0;
+      for (BoxVector::const_iterator bi = fill_boxes.begin();
+           bi != fill_boxes.end(); ++bi) {
+
+         const hier::Box& fill_box = *bi;
+
+         /*
+          * Get the patch data factories and calculate the overlap.
+          * Note that we restrict the domain of the time interpolation
+          * to the intersection of the fill box and the ghost box of
+          * the destination patch data component.  This is needed for
+          * the case where the schedule treats data components with
+          * different ghost cell widths since the fill boxes are
+          * generated using the largest ghost width.
+          */
+
+         const hier::Box dst_fill_box =
+            hier::Box::grow(dst_box, dst_gcw) * fill_box;
+
+         hier::Box test_mask = dst_fill_box * src_mapped_box.getBox();
+         if (test_mask.empty() &&
+             (dst_gcw == constant_zero_intvector) &&
+             dst_pdf->dataLivesOnPatchBorder()) {
+            hier::Box tmp_dst_fill_box(
+               hier::Box::grow(dst_fill_box, constant_one_intvector));
+            test_mask = tmp_dst_fill_box * src_mapped_box.getBox();
+         }
+         const hier::Box src_mask = hier::Box::shift(test_mask, -src_shift);
+
+         tbox::Pointer<hier::BoxOverlap> overlap =
+            rep_item.d_var_fill_pattern->calculateOverlap(
+               *dst_pdf->getBoxGeometry(unshifted_dst_box),
+               *src_pdf->getBoxGeometry(unshifted_src_box),
+               dst_mapped_box.getBox(),
+               src_mask,
+               true, src_shift);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         if (overlap.isNull()) {
+            TBOX_ERROR("Internal RefineSchedule error..."
+               << "\n Overlap is NULL for "
+               << "\n src box = " << src_box
+               << "\n dst box = " << dst_box
+               << "\n src mask = " << src_mask << std::endl);
+         }
+#endif
+
+         if (s_extra_debug) {
+            tbox::plog << "  overlap: ";
+            overlap->print(tbox::plog);
+         }
+         d_src_masks[box_num] = src_mask;
+         d_overlaps[box_num] = overlap;
+         box_num++;
+
+      }
+
+      /*
+       * Iterate over components in refine description list
+       */
+      for (tbox::List<int>::Iterator
+           l(d_refine_classes->getIterator(nc)); l; l++) {
+         const RefineClasses::Data& item =
+            d_refine_classes->getRefineItem(l());
+         TBOX_ASSERT(item.d_class_id == nc);
+
+         const int dst_id = item.d_scratch;
+         const int src_id = item.d_src;
+         const int ritem_count = item.d_tag;
+
+         /*
+          * If the src and dst patches, levels, and components are the
+          * same, and there is no shift, the data exchange is unnecessary.
+          */
+         if (!same_patch_no_shift || (dst_id != src_id)) {
+
+            /*
+             * Iterate over the fill boxes and create transactions
+             * for each box that has a non-empty overlap.
+             */
+            for (int i = 0; i < box_num; i++) {
+
+               /*
+                * If overlap is not empty, then add the transaction
+                * to the appropriate communication schedule.
+                * There are two schedules depending on whether
+                * coarse or fine data takes precedence at
+                * coarse-fine boundaries for communications
+                * where the destination variable quantity
+                * has data residing on the boundary.
+                * There are two types of transactions depending on
+                * whether we use time interpolation.
+                */
+
+               /*
+                * If we only perform the following block only for
+                * non-null d_overlap[i], why not just loop through
+                * box_num instead of num_fill_boxes?
+                */
+               if (!d_overlaps[i]->isOverlapEmpty()) {
+
+                  tbox::Pointer<tbox::Transaction> transaction;
+
+                  if (!d_transaction_factory.isNull()) {
+
+                     transaction =
+                        d_transaction_factory->allocate(d_dst_level,
+                           d_src_level,
+                           d_overlaps[i],
+                           dst_mapped_box,
+                           src_mapped_box,
+                           ritem_count);
+                  } else if (use_time_interpolation &&
+                             item.d_time_interpolate) {
+
+                     transaction = new xfer::RefineTimeTransaction(
+                           d_dst_level, d_src_level,
+                           d_overlaps[i],
+                           dst_mapped_box, src_mapped_box,
+                           d_src_masks[i],
+                           ritem_count);
+
+                  } else {  // no time interpolation
+
+                     transaction = new xfer::RefineCopyTransaction(
+                           d_dst_level, d_src_level,
+                           d_overlaps[i],
+                           dst_mapped_box, src_mapped_box,
+                           ritem_count);
+
+                  }  // time interpolation conditional
+
+                  if (item.d_fine_bdry_reps_var) {
+                     if (same_patch) {
+                        d_fine_priority_level_schedule->addTransaction(
+                           transaction);
+                     } else {
+                        d_fine_priority_level_schedule->appendTransaction(
+                           transaction);
+                     }
+                  } else {
+                     if (same_patch) {
+                        d_coarse_priority_level_schedule->addTransaction(
+                           transaction);
+                     } else {
+                        d_coarse_priority_level_schedule->appendTransaction(
+                           transaction);
+                     }
+                  }
+
+               }  // if overlap not empty
+
+            }  // iterate over fill_boxes
+
+         }
+
+      }  // iterate over refine components in equivalence class
+
+   }  // iterate over refine equivalence classes
+}
+
+/*
+ *************************************************************************
+ *
+ * Private member function to initialize data members for hierarchy info.
+ *
+ *************************************************************************
+ */
+
+void
+RefineSchedule::initializeDomainAndGhostInformation(
+   bool recursive_schedule)
+{
+
+   const tbox::Dimension& dim(d_dst_level->getDim());
+
+   d_max_scratch_gcw = getMaxScratchGhosts();
+   d_max_stencil_width = getMaxStencilGhosts();
+
+   if (recursive_schedule) {
+      d_boundary_fill_ghost_width = d_max_stencil_width;
+      d_force_boundary_fill = (d_boundary_fill_ghost_width.max() > 0);
+   } else {
+      d_boundary_fill_ghost_width = getMaxDestinationGhosts();
+      d_force_boundary_fill = false;
+   }
+
+   tbox::Pointer<hier::GridGeometry> grid_geom = d_dst_level->getGridGeometry();
+   const hier::IntVector& ratio_to_level_zero =
+      d_dst_level->getRatioToLevelZero();
+
+   d_domain_is_one_box = grid_geom->getDomainIsSingleBox();
+
+   if (d_domain_is_one_box) {
+      hier::BoxArray domain(dim);
+      grid_geom->computePhysicalDomain(domain, ratio_to_level_zero);
+      d_domain_box = domain[0];
+      for (int i = 1; i < domain.getNumberOfBoxes(); i++) {
+         d_domain_box += domain[i];
+      }
+   }
+
+   d_periodic_shift = grid_geom->getPeriodicShift(ratio_to_level_zero);
+
+   d_num_periodic_directions = 0;
+   for (int d = 0; d < dim.getValue(); d++) {
+      if (d_periodic_shift(d)) {
+         d_num_periodic_directions++;
+      }
+   }
+
+}
+
+/*
+ *************************************************************************
+ *
+ * Private utility function to set up local array of refine items.
+ *
+ *************************************************************************
+ */
+
+void RefineSchedule::setRefineItems(
+   const tbox::Pointer<xfer::RefineClasses> refine_classes)
+{
+
+   clearRefineItems();
+
+   d_refine_classes = refine_classes;
+
+   d_number_refine_items = d_refine_classes->getNumberOfRefineItems();
+
+   d_refine_items =
+      new const xfer::RefineClasses::Data *[d_number_refine_items];
+
+   int ircount = 0;
+   for (int nd = 0; nd < d_number_refine_items; nd++) {
+      d_refine_classes->getRefineItem(nd).d_tag = ircount;
+      d_refine_items[ircount] = &(d_refine_classes->getRefineItem(nd));
+      ircount++;
+   }
+
+}
+
+/*
+ *************************************************************************
+ *
+ * Private utility function used during initial schedule set up to
+ * check whether patch data entries have proper number of ghost cells.
+ * In particular, each scratch data entry must have at least as many
+ * ghost cells as the user-defined refine operator stencil width.
+ * Other checks are performed in the
+ * xfer::RefineClasses::checkRefineItem() routine.
+ *
+ *************************************************************************
+ */
+
+void RefineSchedule::initialCheckRefineClassItems() const
+{
+   const tbox::Dimension& dim(d_dst_level->getDim());
+
+   const hier::IntVector& constant_zero_intvector(hier::IntVector::getZero(dim));
+
+   tbox::Pointer<hier::PatchDescriptor> pd = d_dst_level->getPatchDescriptor();
+
+   hier::IntVector user_gcw(constant_zero_intvector);
+   if (d_refine_patch_strategy) {
+      user_gcw = d_refine_patch_strategy->getRefineOpStencilWidth();
+   }
+
+   if (user_gcw > constant_zero_intvector) {
+
+      for (int iri = 0; iri < d_number_refine_items; iri++) {
+
+         const xfer::RefineClasses::Data * const ref_item = d_refine_items[iri];
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         if (d_refine_classes->checkRefineItem(*ref_item, pd)) {
+#endif
+
+         const int scratch = ref_item->d_scratch;
+         const hier::IntVector& scratch_gcw(pd->getPatchDataFactory(scratch)->
+                                            getGhostCellWidth());
+
+         if (user_gcw > scratch_gcw) {
+            TBOX_ERROR("Bad data given to RefineSchedule...\n"
+               << "User supplied interpolation stencil width = "
+               << user_gcw
+               << "\nis larger than ghost cell width of `Scratch'\n"
+               << "patch data " << pd->mapIndexToName(scratch)
+               << " , which is " << scratch_gcw << std::endl);
+         }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      }
+#endif
+
+      }
+
+   }
+
+}
+
+/*
+ **************************************************************************
+ *
+ * Private utility function to clear array of refine items.
+ *
+ **************************************************************************
+ */
+
+void RefineSchedule::clearRefineItems()
+{
+   if (d_refine_items) {
+      for (int iri = 0; iri < d_number_refine_items; iri++) {
+         d_refine_items[iri] = (xfer::RefineClasses::Data *)NULL;
+      }
+      delete[] d_refine_items;
+      d_refine_items = (const xfer::RefineClasses::Data **)NULL;
+      d_number_refine_items = 0;
+   }
+}
+
+/*
+ **************************************************************************
+ *
+ * Print class data to the specified output stream.
+ *
+ **************************************************************************
+ */
+
+void RefineSchedule::printClassData(
+   std::ostream& stream) const
+{
+   stream << "RefineSchedule::printClassData()\n";
+   stream << "--------------------------------------\n";
+
+   d_refine_classes->printClassData(stream);
+
+   stream << "Printing coarse priority refine schedule...\n";
+   d_coarse_priority_level_schedule->printClassData(stream);
+
+   stream << "Printing fine priority refine schedule...\n";
+   d_fine_priority_level_schedule->printClassData(stream);
+
+   if (!d_supp_schedule.isNull()) {
+      stream << "Printing supplemental refine schedule...\n";
+      d_supp_schedule->printClassData(stream);
+   }
+}
+/*
+ **************************************************************************
+ **************************************************************************
+ */
+
+void RefineSchedule::initializeCallback()
+{
+   tbox::Pointer<tbox::Database> idb = tbox::InputManager::getInputDatabase();
+   if (idb && idb->isDatabase("RefineSchedule")) {
+      tbox::Pointer<tbox::Database> rsdb = idb->getDatabase(
+            "RefineSchedule");
+      s_extra_debug =
+         rsdb->getBoolWithDefault("extra_debug", s_extra_debug);
+      s_barrier_and_time =
+         rsdb->getBoolWithDefault("barrier_and_time", s_barrier_and_time);
+   }
+
+   t_fill_data = tbox::TimerManager::getManager()->
+      getTimer("xfer::RefineSchedule::fillData()");
+   t_recursive_fill = tbox::TimerManager::getManager()->
+      getTimer("xfer::RefineSchedule::recursive_fill");
+   t_refine_scratch_data = tbox::TimerManager::getManager()->
+      getTimer("xfer::RefineSchedule::refineScratchData()");
+   t_finish_sched_const = tbox::TimerManager::getManager()->
+      getTimer("xfer::RefineSchedule::finishScheduleConstruction()");
+   t_finish_sched_const_recurse = tbox::TimerManager::getManager()->
+      getTimer("xfer::RefineSchedule::finishScheduleConstruction()_recurse");
+   t_gen_comm_sched = tbox::TimerManager::getManager()->
+      getTimer("xfer::RefineSchedule::generateCommunicationSchedule()");
+   t_bridge_connector = tbox::TimerManager::getManager()->
+      getTimer("xfer::RefineSchedule::bridge_connector");
+   t_modify_connector = tbox::TimerManager::getManager()->
+      getTimer("xfer::RefineSchedule::modify_connector");
+   t_make_seq_map = tbox::TimerManager::getManager()->
+      getTimer("xfer::RefineSchedule::make_seq_map");
+   t_shear = tbox::TimerManager::getManager()->
+      getTimer("xfer::RefineSchedule::finish...()_shear");
+   t_misc1 = tbox::TimerManager::getManager()->
+      getTimer("xfer::RefineSchedule::finish...()_misc1");
+   t_barrier_and_time = tbox::TimerManager::getManager()->
+      getTimer("xfer::RefineSchedule::barrier_and_time");
+   t_get_global_mapped_box_count = tbox::TimerManager::getManager()->
+      getTimer(
+         "xfer::RefineSchedule::finish...()_get_global_mapped_box_count");
+   t_coarse_shear = tbox::TimerManager::getManager()->
+      getTimer("xfer::RefineSchedule::finish...()_coarse_shear");
+   t_build_supp_mapped_box_level = tbox::TimerManager::getManager()->
+      getTimer(
+         "xfer::RefineSchedule::finish...()_build_supp_mapped_box_level");
+   t_misc2 = tbox::TimerManager::getManager()->
+      getTimer("xfer::RefineSchedule::finish...()_misc2");
+   t_bridge_supp_hiercoarse = tbox::TimerManager::getManager()->
+      getTimer("xfer::RefineSchedule::finish...()_bridge_supp_hiercoarse");
+   t_bridge_dst_hiercoarse = tbox::TimerManager::getManager()->
+      getTimer("xfer::RefineSchedule::finish...()_bridge_dst_hiercoarse");
+   t_make_supp_level = tbox::TimerManager::getManager()->
+      getTimer("xfer::RefineSchedule::finish...()_make_supp_level");
+   t_make_supp_to_unfilled = tbox::TimerManager::getManager()->
+      getTimer("xfer::RefineSchedule::finish...()_make_supp_to_unfilled");
+   t_invert_edges = tbox::TimerManager::getManager()->
+      getTimer("xfer::RefineSchedule::generate...()_invert_edges");
+   t_construct_send_trans = tbox::TimerManager::getManager()->
+      getTimer("xfer::RefineSchedule::generate...()_construct_send_trans");
+   t_construct_recv_trans = tbox::TimerManager::getManager()->
+      getTimer("xfer::RefineSchedule::generate...()_construct_recv_trans");
+
+}
+
+/*
+ ***************************************************************************
+ * Release static timers.  To be called by shutdown registry to make sure
+ * memory for timers does not leak.
+ ***************************************************************************
+ */
+void RefineSchedule::finalizeCallback()
+{
+   t_fill_data.setNull();
+   t_recursive_fill.setNull();
+   t_refine_scratch_data.setNull();
+   t_finish_sched_const.setNull();
+   t_finish_sched_const_recurse.setNull();
+   t_gen_comm_sched.setNull();
+   t_bridge_connector.setNull();
+   t_modify_connector.setNull();
+   t_make_seq_map.setNull();
+   t_shear.setNull();
+   t_misc1.setNull();
+   t_barrier_and_time.setNull();
+   t_get_global_mapped_box_count.setNull();
+   t_coarse_shear.setNull();
+   t_build_supp_mapped_box_level.setNull();
+   t_misc2.setNull();
+   t_bridge_supp_hiercoarse.setNull();
+   t_bridge_dst_hiercoarse.setNull();
+   t_make_supp_level.setNull();
+   t_make_supp_to_unfilled.setNull();
+   t_invert_edges.setNull();
+   t_construct_send_trans.setNull();
+   t_construct_recv_trans.setNull();
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/RefineSchedule.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/RefineSchedule.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,965 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Refine schedule for data transfer between AMR levels 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_RefineSchedule
+#define included_xfer_RefineSchedule
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/xfer/PatchLevelFillPattern.h"
+#include "SAMRAI/xfer/RefineClasses.h"
+#include "SAMRAI/xfer/RefinePatchStrategy.h"
+#include "SAMRAI/xfer/RefineTransactionFactory.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/ComponentSelector.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Schedule.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/Array.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Class RefineSchedule performs the communication
+ * operations that refine data to, copy data to, or fill physical boundary
+ * data on a destination patch level.
+ *
+ * Source data is copied into the provided scratch space for temporary
+ * processing.  The scratch space must contain sufficient ghost
+ * cells to accommodate the stencil width of the given interpolation operators
+ * and any physical boundary data that must be filled.  The scratch data
+ * is copied into the destination space at the end of the process.
+ * The communication schedule is executed by calling member function fillData().
+ *
+ * Each schedule object is typically created by a refine algorithm and
+ * represents the communication dependencies for a particular configuration
+ * of the AMR hierarchy.  The communication schedule is only valid for that
+ * particular configuration and must be regenerated when the AMR patch
+ * hierarchy changes.  However, as long as the patch levels involved in
+ * the creation of the schedule remain unchanged, the schedule may be used
+ * for multiple communication cycles.  For more information about creating
+ * refine schedules, see the RefineAlgorithm header file.
+ *
+ * Some constructors accept the argument @c dst_level_fill_pattern.  This
+ * is a PatchLevelFillPattern which controls which types of cells are filled
+ * and which are omitted from the filling process.  Concrete implementations
+ * of PatchLevelFillPattern are:
+ * - @c PatchLevelFullFillPattern - Fill interior and ghost cells.
+ * - @c PatchLevelInteriorFillPattern - Fill interior cells only.
+ * - @c PatchLevelBorderFillPattern - Fill ghosts on level borders only.
+ * - @c PatchLevelBorderAndInteriorFillPattern - Fill interior and
+ *      ghosts on level borders.
+ *
+ * @see xfer::RefineAlgorithm
+ * @see xfer::RefinePatchStrategy
+ * @see xfer::RefineClasses
+ */
+
+class RefineSchedule:public tbox::DescribedClass
+{
+public:
+   /*!
+    * @brief Constructor that creates a refine schedule to copy data
+    * from the interiors of the source patch data on the source level
+    * into the interiors and ghosts of destination patch data on the
+    * destination level.
+    *
+    * The fill pattern supplied may restrict the data that will be
+    * copied.
+    *
+    * Only data on the intersection of the source and destination
+    * patch data will be copied; no interpolation from coarser levels
+    * will be done.  The source and destination patch levels must
+    * reside in the same index space.  However, the levels do not have
+    * to be in the same AMR patch hierarchy.  Generally, this
+    * constructor is called by a RefineAlgorithm object.
+    *
+    * When assertion checking is active, unrecoverable assertions will result
+    * if either patch level pointer, the refine classes pointer, or the
+    * transaction factory factory pointer is null.
+    *
+    * @param[in] dst_level_fill_pattern Indicates which parts of the
+    *                                   destination level to fill.
+    * @param[in] dst_level       Pointer to destination patch level.
+    * @param[in] src_level       Pointer to source patch level.
+    * @param[in] refine_classes  Pointer to structure containing patch data and
+    *                            operator information.  In general, this is
+    *                            constructed by the calling RefineAlgorithm
+    *                            object.
+    * @param[in] transaction_factory  Pointer to a factory object that will
+    *                                 create data transactions.
+    * @param[in] patch_strategy  Pointer to a refine patch strategy object that
+    *                            provides user-defined physical boundary filling
+    *                            operations.   This pointer may be null, in
+    *                            which case no boundary filling operations will
+    *                            occur.
+    * @param[in] use_time_interpolation  Boolean flag indicating whether to
+    *                                    use time interpolation when setting
+    *                                    data on the destination level. 
+    *                                    Default is no time interpolation.
+    */
+   explicit RefineSchedule(
+      tbox::Pointer<PatchLevelFillPattern> dst_level_fill_pattern,
+      tbox::Pointer<hier::PatchLevel> dst_level,
+      tbox::Pointer<hier::PatchLevel> src_level,
+      const tbox::Pointer<xfer::RefineClasses> refine_classes,
+      tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory,
+      xfer::RefinePatchStrategy* patch_strategy,
+      bool use_time_interpolation = false);
+
+   /*!
+    * @brief Constructor that creates a refine schedule to fill destination
+    * patch data on the destination level from source patch data on the source
+    * level as well as interpolated data from coarser levels.
+    *
+    * The fill pattern supplied may restrict the data that will be
+    * copied.
+    *
+    * Only data on the intersection of the source and destination patch data
+    * will be copied.  If portions of the destination level remain unfilled,
+    * then the algorithm recursively fills those unfilled portions by
+    * interpolating source data from coarser levels in the AMR hierarchy.  The
+    * source and destination patch levels must reside in the same index space.
+    * However, the levels do not have to be in the same AMR patch hierarchy.
+    * In general, this constructor is called by a RefineAlgorithm object.
+    *
+    * When assertion checking is active, unrecoverable assertions will result
+    * if either patch level pointer, the refine classes pointer, or the
+    * transaction factory factory pointer is null.
+    *
+    * @param[in] dst_level_fill_pattern  Indicates which parts of the
+    *                                    destination level to fill.
+    * @param[in] dst_level   Pointer to destination patch level.  This level may be
+    *                        a level on the hierarchy or a
+    *                        coarsened version.
+    * @param[in] src_level   Pointer to source patch level; must be in same
+    *                        index space as destination level.  This pointer
+    *                        may be null, in which case the destination level
+    *                        will be filled only using data interpolated from
+    *                        coarser levels in the AMR hierarchy.
+    * @param[in] next_coarser_level  Level number of next coarser level in
+    *                                AMR patch hierarchy relative to the
+    *                                destination level.  Note that when the
+    *                                destination level has number zero (i.e.,
+    *                                the coarsest level), this value should be
+    *                                less than zero.
+    * @param[in] hierarchy   Pointer to patch hierarchy.  This pointer may be
+    *                        null only if the next_coarser_level value is < 0,
+    *                        indicating that there is no level in the hierarchy
+    *                        coarser than the destination level.
+    * @param[in] refine_classes  Pointer to structure containing patch data and
+    *                            operator information.  In general, this is
+    *                            constructed by the calling RefineAlgorithm
+    *                            object.
+    * @param[in] transaction_factory  Pointer to a factory object that will
+    *                                 create data transactions.
+    * @param[in] patch_strategy  Pointer to a refine patch strategy object that
+    *                            provides user-defined physical boundary
+    *                            filling operations.  This pointer may be null,
+    *                            in which case no boundary filling or
+    *                            user-defined refine operations will occur.
+    * @param[in] use_time_interpolation  Boolean flag indicating whether to use
+    *                                    time interpolation when setting data
+    *                                    on the destination level.  Default
+    *                                    is no time interpolation.
+    */
+   explicit RefineSchedule(
+      tbox::Pointer<PatchLevelFillPattern> dst_level_fill_pattern,
+      tbox::Pointer<hier::PatchLevel> dst_level,
+      tbox::Pointer<hier::PatchLevel> src_level,
+      int next_coarser_level,
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const tbox::Pointer<xfer::RefineClasses> refine_classes,
+      tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory,
+      xfer::RefinePatchStrategy* patch_strategy,
+      bool use_time_refinement = false);
+
+   /*!
+    * Virtual destructor for the schedule releases all internal storage.
+    */
+   virtual ~RefineSchedule();
+
+   /*!
+    * @brief Reset this refine schedule to perform data transfers
+    * asssociated with refine class items in function argument.
+    *
+    * In general, this function is called by a RefineAlgorithm object, which
+    * first checks that the refine_classes parameter is in a state consistent
+    * with the RefineSchedule object.
+    *
+    * @param[in] refine_classes  Pointer to structure containing patch data and
+    *                            operator information.  In general, this is
+    *                            constructed by the calling RefineAlgorithm
+    *                            object.  This pointer must be non-null.
+    */
+   void
+   reset(
+      const tbox::Pointer<xfer::RefineClasses> refine_classes);
+
+   /*!
+    * @brief Execute the stored communication schedule and perform
+    * the data movement.
+    *
+    * @param[in] fill_time                 Time for filling operation.
+    * @param[in] do_physical_boundary_fill Boolean flag that can be used to
+    *                                      bypass the physical boundary data
+    *                                      filling operations on the
+    *                                      destination level.  The default
+    *                                      value is true indicating that
+    *                                      boundary data will be filled
+    *                                      (assuming a non-null refine patch
+    *                                      strategy pointer was passed to the
+    *                                      createSchedule() function.  Note
+    *                                      that even when the value is false,
+    *                                      boundary routines may be called on
+    *                                      levels coarser than the destination
+    *                                      level if such data is needed for
+    *                                      proper interpolation.
+    */
+   void
+   fillData(
+      double fill_time,
+      bool do_physical_boundary_fill = true) const;
+
+   /*!
+    * @brief Initialize a component selector to store the components
+    * needed to allocate source data.
+    *
+    * @param[out] allocate_vector ComponentSelector that will be
+    *                             set to contain the patch data indices for
+    *                             source data.
+    */
+   void
+   initializeSourceVector(
+      hier::ComponentSelector& allocate_vector) const;
+
+   /*!
+    * @brief Allocate destination space on the destination level and store the
+    * allocated patch data indices in the component selector for later
+    * deallocation.
+    *
+    * @param[out] allocate_vector Component selector that will store the
+    *                             allocated patch data indices.
+    * @param[in] fill_time        Simulation time for filling operation.
+    */
+   void
+   allocateDestinationSpace(
+      hier::ComponentSelector& allocate_vector,
+      double fill_time) const;
+
+   /*!
+    * @brief Allocate scratch space on the specified level and store the
+    * allocated patch data indices in the component selector for later
+    * deallocation.
+    *
+    * @param[in,out] level
+    * @param[in] fill_time        Simulation time for filling operation.
+    * @param[out] allocate_vector Component selector that will store the
+    *                             allocated patch data indices.
+    */
+   void
+   allocateScratchSpace(
+      hier::ComponentSelector& allocate_vector,
+      tbox::Pointer<hier::PatchLevel> level,
+      double fill_time) const;
+
+   /*!
+    * @brief Initialize a component selector to store the components needed to
+    * allocate destination data.
+    *
+    * @param[out] allocate_vector An empty ComponentSelector that will be
+    *                             set to contain the patch data indices for
+    *                             destination data.
+    */
+   void
+   initializeDestinationVector(
+      hier::ComponentSelector& allocate_vector) const;
+
+   /*!
+    * @brief Return refine equivalence classes.
+    *
+    * The equivalence class information is used in schedule classes.
+    */
+   const tbox::Pointer<RefineClasses>&
+   getEquivalenceClasses() const;
+
+   /*!
+    * @brief Return width of ghost cell region to fill which is passed to user
+    * supplied physical boundary condition routine.
+    */
+   const hier::IntVector&
+   getBoundaryFillGhostWidth() const;
+
+   /*!
+    * @brief Print the refine schedule data to the specified data stream.
+    *
+    * @param[out] stream Output data stream.
+    */
+   virtual void
+   printClassData(
+      std::ostream& stream) const;
+
+private:
+   RefineSchedule(
+      const RefineSchedule&);                   // not implemented
+   void
+   operator = (
+      const RefineSchedule&);                           // not implemented
+
+   /*!
+    * @brief Allocate static timers.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   initializeCallback();
+
+   /*!
+    * @brief Free static timers.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   finalizeCallback();
+
+   //! @brief Shorthand typedef.
+   typedef hier::MappedBox MappedBox;
+   //! @brief Shorthand typedef.
+   typedef hier::LocalId LocalId;
+   //! @brief Shorthand typedef.
+   typedef hier::MappedBoxLevel MappedBoxLevel;
+   //! @brief Shorthand typedef.
+   typedef hier::Connector Connector;
+   //! @brief Shorthand typedef.
+   typedef hier::Connector::NeighborSet NeighborSet;
+   //! @brief Shorthand typedef.
+   typedef std::vector<hier::Box> BoxVector;
+   //! @brief Similar to NeighborhoodSet but maps to BoxVector instead of MappedBoxSet.
+   typedef std::map<hier::GlobalId, BoxVector> FillSet;
+   //! @brief Mapping from a (potentially remote) MappedBox to a set of neighbors.
+   typedef std::map<MappedBox, NeighborSet> FullNeighborhoodSet;
+
+   /*!
+    * @brief This private constructor creates a communication schedule
+    * that fills the destination level interior as well as ghost regions
+    * equal to the maximum stencil width for refinement operations.
+    *
+    * This constructor is used by the refine schedule algorithm during the
+    * recursive schedule generation process.
+    *
+    * @param[in] dst_level  A temporary level that is used during
+    *                       interpolation.
+    * @param[in] src_level  A level from the hierarchy that is of the
+    *                       same resolution as dst_level 
+    * @param[in] next_coarser_level  Level number of next coarser level in
+    *                                AMR patch hierarchy relative to the
+    *                                destination level.  Note that when the
+    *                                destination level has number zero (i.e.,
+    *                                the coarsest level), this value should be
+    *                                less than zero.
+    * @param[in] hierarchy   Pointer to patch hierarchy.
+    * @param[in] src_growth_to_nest_dst  The minimum amount that src_level has
+    *                                    to grow in order to nest dst.
+    * @param[in] dst_to_src  Connector from dst_level to src_level.
+    * @param[in] src_to_dst  Connector from src_level to dst_level.
+    * @param[in] refine_classes  Holds refine equivalence classes to be used
+    *                            by this schedule.
+    * @param[in] transaction_factory  Pointer to a factory object that will
+    *                                 create data transactions.
+    * @param[in] patch_strategy  Pointer to a refine patch strategy object that
+    *                            provides user-defined physical boundary
+    *                            filling operations.  This pointer may be null,
+    *                            in which case no boundary filling or
+    *                            user-defined refine operations will occur.
+    */
+   RefineSchedule(
+      tbox::Pointer<hier::PatchLevel> dst_level,
+      tbox::Pointer<hier::PatchLevel> src_level,
+      int next_coarser_level,
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const hier::IntVector& src_growth_to_nest_dst,
+      const hier::Connector &dst_to_src,
+      const hier::Connector &src_to_dst,
+      const tbox::Pointer<xfer::RefineClasses> refine_classes,
+      tbox::Pointer<xfer::RefineTransactionFactory> transaction_factory,
+      xfer::RefinePatchStrategy* patch_strategy);
+
+   /*!
+    * @brief Finish the schedule construction for the two constructors
+    * that take a hierarchy as an argument.
+    *
+    * The hierarchy gives the possibility of recursion to get data from
+    * coarser levels.
+    *
+    * @param[in] next_coarser_ln  Level number of the level coarser than
+    *                             the destination level
+    * @param[in] hierarchy  A patch hierarchy to be used to provide coarser
+    *                       levels that may be used for interpolation.
+    * @param[in] dst_to_src  Connector between dst and src levels given
+    *                        in constructor.
+    * @param[in] src_to_dst  Connector between src and dst levels given
+    *                        in constructor.
+    * @param[in] dst_is_supplemental_level  Tells if the destination level
+    *                                       is a temporary supplemental level
+    *                                       used for interpolation.
+    * @param[in] src_growth_to_nest_dst  The minimum amount that the source
+    *                                    level has to grow in order to nest the
+    *                                    destination level.
+    * @param[in] fill_mapped_box_level  Contains mapped boxes representing
+    *                                   the region desired to be filled.
+    * @param[in] dst_to_fill  Connector from the destination level
+    *                         to fill_mapped_box_level.
+    * @param[in] src_owner_dst_to_fill  A FillSet that maps each local
+    *                                   mapped box on the source level to
+    *                                   a BoxVector that indicates what parts
+    *                                   of fill_mapped_box_level can be filled
+    *                                   by that source box.
+    * @param[in] use_time_interpolation  Boolean flag indicating whether to
+    *                                    use time interpolation when setting
+    *                                    data on the destination level.
+    * @param[in] skip_generate_schedule  If true, then the generation of
+    *                                    transactions to communicate from
+    *                                    source level to destination level
+    *                                    will be skipped.
+    */
+   void
+   finishScheduleConstruction(
+      int next_coarser_ln,
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const Connector& dst_to_src,
+      const Connector& src_to_dst,
+      const bool dst_is_supplemental_level,
+      const hier::IntVector& src_growth_to_nest_dst,
+      const MappedBoxLevel& fill_mapped_box_level,
+      const Connector& dst_to_fill,
+      const FillSet& src_owner_dst_to_fill,
+      bool use_time_interpolation,
+      bool skip_generate_schedule = false);
+
+   /*!
+    * @brief Recursively fill the destination level with data at the
+    * given time.
+    *
+    * @param[in]  fill_time  Simulation time when the fill takes place
+    * @param[in]  do_physical_boundary_fill  Indicates whether to call
+    *                                        user-supplied boundary filling
+    *                                        routines regardless of whether
+    *                                        this is needed based on ghost cell
+    *                                        width of destination data or
+    *                                        stencil width of some
+    *                                        interpolation operator.
+    */
+   void
+   recursiveFill(
+      double fill_time,
+      bool do_physical_boundary_fill) const;
+
+   /*!
+    * @brief Fill the physical boundaries for each patch on d_dst_level.
+    *
+    * @param[in] fill_time  Simulation time when the fill takes place
+    */
+   void
+   fillPhysicalBoundaries(
+      double fill_time) const;
+
+   /*!
+    * @brief Copy the scratch space into the destination space in d_dst_level.
+    *
+    * If the scratch and destination patch data components are the same,
+    * then no copying is performed.
+    */
+   void
+   copyScratchToDestination() const;
+
+   /*!
+    * @brief Refine scratch data between coarse and fine patch levels.
+    */
+   void
+   refineScratchData() const;
+
+   /*!
+    * @brief Compute and store the BoxOverlaps that will be needed by
+    * refineScratchData().
+    */
+   void
+   computeRefineOverlaps();
+
+   /*!
+    * @brief Constructs the transactions for all communication and copying
+    * of patch data.
+    *
+    * The resulting transactions will only fill the regions of intersection
+    * between the fill level, which is "head" level that the Connector
+    * dst_to_fill points to, and the source level.  The remaining
+    * box regions are added to unfilled_mapped_box_level.
+    *
+    * @param[out] unfilled_mapped_box_level  The parts of the fill level
+    *                                        that cannot be filled from
+    *                                        the source level are added here.
+    * @param[out] dst_to_unfilled  Connector from dst_level to
+    *                              unfilled_mapped_box_level.
+    * @param[in] dst_to_src  Connector between dst_level and src_level
+    *                        passed into the constructor
+    * @param[in] src_to_dst  Connector between src_level and dst_level
+    *                        passed into the constructor
+    * @param[in] dst_to_fill  Connector between dst_level and a level
+    *                         representing the boxes that need to be filled.
+    * @param[in] src_owner_dst_to_fill  A FillSet that maps each local
+    *                                   mapped box on the source level to
+    *                                   a BoxVector that indicates what parts
+    *                                   of the fill can be filled by that
+    *                                   source box.
+    * @param[in] use_time_interpolation  Boolean flag indicating whether to
+    *                                    use time interpolation when setting
+    *                                    data on the destination level.
+    */
+   void
+   generateCommunicationSchedule(
+      MappedBoxLevel& unfilled_mapped_box_level,
+      Connector& dst_to_unfilled,
+      const Connector& dst_to_src,
+      const Connector& src_to_dst,
+      const Connector& dst_to_fill,
+      const FillSet& src_owner_dst_to_fill,
+      const bool use_time_interpolation);
+
+   /*!
+    * @brief Compute boxes that need to be filled and data associated with
+    * them.
+    *
+    * fill_mapped_box_level will be filled with mapped boxes representing all
+    * of the regions intended to be filled by the schedule.  It will include
+    * the boxes of dst_mapped_box_level grown by fill_gcw, but then can be
+    * restricted based on the PatchLevelFillPattern given to the schedule
+    * constructor.  This method sets up this fill level, as well as a
+    * connector from the destination level to the fill level, and also provides
+    * a mapping from each source mapped box to the boxes they can fill
+    * on the fill level.
+    *
+    * @param[out] fill_mapped_box_level  Will contain all boxes that need to
+    *                                    be filled.
+    * @param[out] dst_to_fill  Connector from dst_level to
+    *                          fill_mapped_box_level.
+    * @param[out] src_owner_dst_to_fill  A FillSet that maps each local
+    *                                    mapped box on the source level to
+    *                                    a BoxVector that indicates what parts
+    *                                    of fill_mapped_box_level can be filled
+    *                                    by that source box.
+    * @param[in] dst_mapped_box_level  Mapped box representation of the
+    *                                  dst_level given to the constructor.
+    * @param[in] dst_to_src  Connector from dst_level to src_level.
+    * @param[in] src_to_dst  Connector from src_level to dst_level.
+    * @param[in] fill_gcw  Maximum ghost width to be filled by the schedule.
+    */
+   void
+   setDefaultFillMappedBoxLevel(
+      MappedBoxLevel& fill_mapped_box_level,
+      Connector& dst_to_fill,
+      FillSet& src_owner_dst_to_fill,
+      const hier::MappedBoxLevel& dst_mapped_box_level,
+      const hier::Connector* dst_to_src,
+      const hier::Connector* src_to_dst,
+      const hier::IntVector& fill_gcw);
+
+   /*!
+    * @brief Communicate dst_to_fill info to the src owners when the owners
+    * would otherwise be unable to compute the info.
+    *
+    * @param[out] src_owner_dst_to_fill  A FillSet that maps each local
+    *                                    mapped box on the source level to
+    *                                    a BoxVector that indicates what parts
+    *                                    of fill_mapped_box_level can be filled
+    *                                    by that source box.
+    * @param[in] dst_to_fill  Mapping from the dst_level to boxes it needs
+    *                         need to have filled.
+    * @param[in] dst_to_src  Mapping from the dst_level to src_level
+    * @param[in] src_to_dst  Mapping from the src_level to dst_level
+    */
+   void
+   communicateFillBoxes(
+      FillSet& src_owner_dst_to_fill,
+      const Connector& dst_to_fill,
+      const Connector& dst_to_src,
+      const Connector& src_to_dst);
+
+   /*!
+    * @brief Get the maximum ghost cell width of all destination
+    * patch data components.
+    */
+   hier::IntVector
+   getMaxDestinationGhosts() const;
+
+   /*!
+    * @brief Get the maximum ghost cell width of all scratch patch data
+    * components.
+    */
+   hier::IntVector
+   getMaxScratchGhosts() const;
+
+   /*!
+    * @brief Get the maximum ghost cell width required for all stencils.
+    */
+   hier::IntVector
+   getMaxStencilGhosts() const;
+
+   /*!
+    * @brief Function that constructs schedule transactions between
+    * one source mapped box and one destination mapped box.
+    *
+    * Transactions will move data on the intersection of the source and
+    * destination mapped boxes with the fill boxes.
+    *
+    * @param[in] fill_boxes  A container of boxes that need to be filled.
+    * @param[in] dst_mapped_box  MappedBox from a destination patch.
+    * @param[in] src_mapped_box  MappedBox from a source patch.
+    * @param[in] use_time_interpolation
+    */
+   void
+   constructScheduleTransactions(
+      const BoxVector& fill_boxes,
+      const MappedBox& dst_mapped_box,
+      const MappedBox& src_mapped_box,
+      bool use_time_interpolation);
+
+   /*!
+    * @brief Restructure the neighborhood sets from a src_to_dst Connector
+    * so they can be used in schedule generation.
+    *
+    * First, this puts the neighborhood set data in src_to_dst into dst-major
+    * order so the src owners can easily loop through the dst-src edges in the
+    * same order that dst owners see them.  Transactions must have the same
+    * order on the sending and receiving processors.
+    *
+    * Section, it shifts periodic image dst mapped_boxes back to the zero-shift
+    * position, and applies a similar shift to src mapped_boxes so that the
+    * overlap is unchanged.  The constructScheduleTransactions method requires
+    * all shifts to be absorbed in the src mapped_box.
+    *
+    * The restructured neighboorhood sets are added to the output parameter.
+    *
+    * @param[out] full_inverted_edges
+    * @param[in]  src_to_dst
+    */
+   void
+   restructureNeighborhoodSetsByDstNodes(
+      FullNeighborhoodSet& full_inverted_edges,
+      const Connector& src_to_dst) const;
+
+   /*!
+    * @brief Cache local copies of hierarchy information and compute
+    * necessary ghost and stencil widths.
+    *
+    * This is called by every RefineSchedule constructor.
+    *
+    * @param[in]  True if the constructor calling this method is being
+    *             called recursively from another RefineSchedule constructor.
+    */
+   void
+   initializeDomainAndGhostInformation(
+      bool recursive_schedule);
+
+   /*!
+    * @brief Utility function to set up local copies of refine items.
+    *
+    * An array of refine data items obtained from the CoarsenClasses object
+    * is stored locally here to facilitate interaction with transactions.
+    *
+    * @param[in] refine_classes
+    */
+   void
+   setRefineItems(
+      const tbox::Pointer<xfer::RefineClasses> refine_classes);
+
+   /*
+    * @brief Utility function to clear local copies of refine items.
+    */
+   void
+   clearRefineItems();
+
+   /*!
+    * @brief Utility function to check refine items to see whether their
+    * patch data components have sufficient ghost width to handle
+    * user-defined interpolation operations.
+    *
+    * Specifically scratch data ghost cell widths must be at least as large
+    * as the stencil of those user-defined operations.
+    *
+    * If any of the tested ghost cell widths are insufficient, an error
+    * will occur with a descriptive message.
+    */
+   void
+   initialCheckRefineClassItems() const;
+
+   /*!
+    * Structures that store refine data items.
+    */
+   tbox::Pointer<xfer::RefineClasses> d_refine_classes;
+   int d_number_refine_items;
+   const xfer::RefineClasses::Data** d_refine_items;
+
+   /*!
+    * @brief Pointer to the destination patch level.
+    */
+   tbox::Pointer<hier::PatchLevel> d_dst_level;
+
+   /*!
+    * @brief Pointer to the source patch level.
+    */
+   tbox::Pointer<hier::PatchLevel> d_src_level;
+
+   /*!
+    * @brief Object supporting interface to user-defined boundary filling and
+    * spatial data interpolation operations.
+    */
+   xfer::RefinePatchStrategy* d_refine_patch_strategy;
+
+   /*!
+    * @brief Factory object used to create data transactions when schedule is
+    * constructed.
+    */
+   tbox::Pointer<xfer::RefineTransactionFactory> d_transaction_factory;
+
+   /*!
+    * @brief  maximum stencil width.
+    */
+   hier::IntVector d_max_stencil_width;
+
+   /*!
+    * @brief maximum scratch ghost cell widths.
+    */
+   hier::IntVector d_max_scratch_gcw;
+
+   /*!
+    * @brief Width of ghost cell region to fill passed to user supplied
+    * physical boundary condition routine.
+    */
+   hier::IntVector d_boundary_fill_ghost_width;
+
+   /*!
+    * @brief Flag indicating whether user's physical boundary data filling
+    * routine should be forced at last step of level filling process.
+    *
+    * This flag is true when doing recursive filling, because the ghost
+    * data may be needed by finer levels (regardless of whether the user
+    * requested ghost boundary filling).  This variable is set in
+    * the constructors, which knows whether the object is being constructed
+    * for recursive filling.
+    *
+    * For efficiency, we only force boundary filling when, during object
+    * construction, we determine that the ghost cells do exist.
+    */
+   bool d_force_boundary_fill;
+
+   /*!
+    * @brief Boolean flag indicating whether physical domain
+    * can be represented as a single box region.
+    */
+   bool d_domain_is_one_box;
+
+   /*!
+    * @brief  Box describing physical domain when that domain
+    * can be represented as a single box region
+    */
+   hier::Box d_domain_box;
+
+   /*!
+    * @brief Number of non-zero entries in periodic shift vector.
+    */
+   int d_num_periodic_directions;
+
+   /*!
+    * @brief the periodic shift vector.
+    */
+   hier::IntVector d_periodic_shift;
+
+   /*!
+    * @brief  Level-to-level communication schedule between the source and
+    * destination.
+    *
+    * d_coarse_priority_level_schedule handles
+    * the situation where coarse data should take precedence at
+    * coarse-fine boundaries for data types holding values at patch
+    * boundaries but which are considered interior values.
+    * d_fine_priority_level_schedule handles the situation where
+    * fine data should take precedence.
+    */
+   tbox::Pointer<tbox::Schedule> d_coarse_priority_level_schedule;
+
+   /*!
+    * @brief Level-to-level communication schedule between the source and
+    * destination.
+    *
+    * d_coarse_priority_level_schedule handles
+    * the situation where coarse data should take precedence at
+    * coarse-fine boundaries for data types holding values at patch
+    * boundaries but which are considered interior values.
+    * d_fine_priority_level_schedule handles the situation where
+    * fine data should take precedence.
+    */
+   tbox::Pointer<tbox::Schedule> d_fine_priority_level_schedule;
+
+   /*!
+    * @brief The supplemental level is a temporary level created to
+    * hold data required for interpolating into the fill boxes of the
+    * destination that could not be filled directly from the source
+    * level.
+    *
+    * Once d_supp_level is filled (by executing d_supp_schedule)
+    * interpolating data into the corresponding fill boxes of the
+    * destination is a local process.
+    *
+    * This coarser level is filled by the refine schedule above.  If
+    * no coarser level data is needed, then this pointer will be NULL.
+    * Note that the supplemental level may not have the same mapping
+    * as the destination level.
+    */
+   tbox::Pointer<hier::PatchLevel> d_supp_level;
+
+   /*!
+    * @brief Schedule to recursively fill the supplemental level using
+    * the next coarser hierarchy level.
+    *
+    * This schedule describes how to fill the supplemental level so
+    * that the coarse data can be interpolated into the fine fill
+    * boxes on the destination.
+    */
+   tbox::Pointer<xfer::RefineSchedule> d_supp_schedule;
+
+   /*!
+    * @brief Describes remaining unfilled boxes after attempting to
+    * fill from the source level.  These remaining boxes must be
+    * filled using a supplemental schedule, d_supp_schedule.
+    */
+   MappedBoxLevel d_unfilled_mapped_box_level;
+
+   /*!
+    * @brief Stores the BoxOverlaps needed by refineScratchData()
+    */
+   tbox::List< tbox::Array<tbox::Pointer<hier::BoxOverlap> > >
+   d_refine_overlaps;
+
+   /*!
+    * @brief Connector from the supplemental level to the destination.
+    */
+   Connector d_supp_to_dst;
+
+   /*!
+    * @brief Connector from the destination level to the supplemental.
+    */
+   Connector d_dst_to_supp;
+
+   /*!
+    * @brief Connector d_supp_level to d_unfilled_mapped_box_level.
+    *
+    * Cached for use during schedule filling.
+    */
+   Connector d_supp_to_unfilled;
+
+   //@{
+
+   /*!
+    * @name Data members used in constructScheduleTransactions()
+    */
+
+   /*!
+    * @brief Array to store overlaps used for construction of transactions.
+    *
+    * This is declared in the class to make memory management more
+    * efficient since constructScheduleTransactions is called many times.
+    *
+    * The size of the array is controlled by d_max_fill_boxes.
+    */
+   tbox::Array<tbox::Pointer<hier::BoxOverlap> > d_overlaps;
+
+   /*!
+    * @brief Source mask boxes used in construction of transactions.
+    *
+    * Like d_overlaps, this is declared in the class to make memory
+    * management more efficient.
+    */
+   hier::BoxArray d_src_masks;
+
+   /*!
+    * @brief The maximum number of fill boxes across all patches in the
+    * destination level.
+    */
+   int d_max_fill_boxes;
+
+   //@}
+
+   /*!
+    * @brief PatchLevelFillPattern controlling what parts of the destination
+    * level can be filled.
+    */
+   tbox::Pointer<PatchLevelFillPattern> d_dst_level_fill_pattern;
+
+   /*!
+    * @brief Tells whether recursive construction of an internal schedule
+    * is happening.  Gets set to true by the private RefineSchedule
+    * constructor.
+    */
+   bool d_constructing_internal_schedule;
+
+   /*!
+    * @brief Shared debug checking flag.
+    */
+   static bool s_extra_debug;
+
+   /*!
+    * @brief Flag that turns on barrier calls for use in performance analysis.
+    */
+   static bool s_barrier_and_time;
+
+   //@{
+   /*!
+    * @name Timer objects for performance measurement.
+    */
+   static tbox::Pointer<tbox::Timer> t_fill_data;
+   static tbox::Pointer<tbox::Timer> t_recursive_fill;
+   static tbox::Pointer<tbox::Timer> t_refine_scratch_data;
+   static tbox::Pointer<tbox::Timer> t_finish_sched_const;
+   static tbox::Pointer<tbox::Timer> t_finish_sched_const_recurse;
+   static tbox::Pointer<tbox::Timer> t_gen_comm_sched;
+   static tbox::Pointer<tbox::Timer> t_bridge_connector;
+   static tbox::Pointer<tbox::Timer> t_modify_connector;
+   static tbox::Pointer<tbox::Timer> t_make_seq_map;
+   static tbox::Pointer<tbox::Timer> t_shear;
+   static tbox::Pointer<tbox::Timer> t_misc1;
+   static tbox::Pointer<tbox::Timer> t_barrier_and_time;
+   static tbox::Pointer<tbox::Timer> t_get_global_mapped_box_count;
+   static tbox::Pointer<tbox::Timer> t_coarse_shear;
+   static tbox::Pointer<tbox::Timer> t_build_supp_mapped_box_level;
+   static tbox::Pointer<tbox::Timer> t_misc2;
+   static tbox::Pointer<tbox::Timer> t_bridge_supp_hiercoarse;
+   static tbox::Pointer<tbox::Timer> t_bridge_dst_hiercoarse;
+   static tbox::Pointer<tbox::Timer> t_make_supp_level;
+   static tbox::Pointer<tbox::Timer> t_make_supp_to_unfilled;
+   static tbox::Pointer<tbox::Timer> t_invert_edges;
+   static tbox::Pointer<tbox::Timer> t_construct_send_trans;
+   static tbox::Pointer<tbox::Timer> t_construct_recv_trans;
+
+   //@}
+
+   static tbox::StartupShutdownManager::Handler
+   s_initialize_finalize_handler;
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/RefineScheduleConnectorWidthRequestor.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/RefineScheduleConnectorWidthRequestor.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,177 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   RefineSchedule's implementation of PatchHierarchy 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_RefineScheduleConnectorWidthRequestor_C
+#define included_xfer_RefineScheduleConnectorWidthRequestor_C
+
+#include "SAMRAI/xfer/RefineScheduleConnectorWidthRequestor.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace xfer {
+
+tbox::StartupShutdownManager::Handler
+RefineScheduleConnectorWidthRequestor::s_initialize_finalize_handler(
+   RefineScheduleConnectorWidthRequestor::initializeCallback,
+   0,
+   0,
+   RefineScheduleConnectorWidthRequestor::finalizeCallback,
+   tbox::StartupShutdownManager::priorityTimers);
+
+RefineScheduleConnectorWidthRequestor
+RefineScheduleConnectorWidthRequestor::s_auto_registered_connector_width_requestor;
+
+/*
+ **************************************************************************
+ **************************************************************************
+ */
+RefineScheduleConnectorWidthRequestor::RefineScheduleConnectorWidthRequestor(
+   ) : d_gcw_factor(1)
+{
+   return;
+}
+
+
+/*
+ **************************************************************************
+ **************************************************************************
+ */
+void RefineScheduleConnectorWidthRequestor::setGhostCellWidthFactor(
+   int gcw_factor)
+{
+   TBOX_ASSERT( gcw_factor >= 0 );
+   d_gcw_factor = gcw_factor;
+   return;
+}
+
+
+/*
+ **************************************************************************
+ * Compute Connector widths that this class requires in order to work
+ * properly on a given hierarchy.
+ **************************************************************************
+ */
+void RefineScheduleConnectorWidthRequestor::computeRequiredConnectorWidths(
+   std::vector<hier::IntVector>& self_connector_widths,
+   std::vector<hier::IntVector>& fine_connector_widths,
+   const hier::PatchHierarchy& patch_hierarchy) const
+{
+   int max_levels = patch_hierarchy.getMaxNumberOfLevels();
+
+   const tbox::Dimension& dim(patch_hierarchy.getDim());
+
+   const hier::IntVector max_data_gcw(
+      patch_hierarchy.getPatchDescriptor()->getMaxGhostWidth(dim) * d_gcw_factor);
+
+   const hier::IntVector max_stencil_width(
+      patch_hierarchy.getGridGeometry()->getMaxTransferOpStencilWidth());
+
+   const hier::IntVector& zero_vector(hier::IntVector::getZero(dim));
+
+   hier::IntVector ratio_to_coarser(dim);
+
+   /*
+    * Compute the Connector width needed to ensure all edges are found
+    * during mesh recursive refine schedule generation.  It is safe to
+    * be conservative, but carrying around a larger than necessary
+    * width requires more memory and slows down Connector operations.
+    *
+    * All Connectors to self need to be at least wide enough to
+    * support the copy of data from the same level into ghost cells.
+    * Thus, the width should be at least that of the max ghost data
+    * width.  On the finest level, there is no other requirement.  For
+    * other levels, we need enough width for:
+    *
+    * - refining the next finer level
+    *
+    * - refining recursively starting at each of the levels finer than
+    *   it.
+    */
+
+   self_connector_widths.clear();
+   self_connector_widths.resize(max_levels, max_data_gcw);
+
+   fine_connector_widths.clear();
+   if ( max_levels > 1 ) {
+      fine_connector_widths.resize(max_levels-1, zero_vector); // to be computed below.
+   }
+
+   /*
+    * Note that the following loops go from fine to coarse.  This is
+    * because Connector widths for coarse levels depend on those for
+    * fine levels.
+    */
+   for (int ln = max_levels - 1; ln > -1; --ln) {
+      /*
+       * Compute width needed at each coarser level (lnc) for
+       * recursive refinement starting with destination level ln.
+       */
+      hier::IntVector width_for_refining_recursively = max_data_gcw;
+      for (int lnc = ln - 1; lnc > -1; --lnc) {
+
+         ratio_to_coarser = patch_hierarchy.getRatioToCoarserLevel(lnc+1);
+         width_for_refining_recursively.ceiling(ratio_to_coarser);
+
+         /*
+          * Data in the supplemental level in RefineSchedule may have ghost
+          * cells as big as the stencil width.  Coarse_to_fine_width must be
+          * big enough to allow coarse to bridge to fine's supplemental, and
+          * the supplemental includes the stencil width at coarse.
+          */
+         width_for_refining_recursively += max_stencil_width;
+
+         fine_connector_widths[lnc].max(width_for_refining_recursively);
+      }
+   }
+
+}
+
+/*
+ ***********************************************************************
+ * Register the static ConnectorWidthRequestor to be
+ * automatically used by PatchHierarchy objects.
+ ***********************************************************************
+ */
+void RefineScheduleConnectorWidthRequestor::initializeCallback()
+{
+   hier::PatchHierarchy::registerAutoConnectorWidthRequestorStrategy(
+      s_auto_registered_connector_width_requestor);
+}
+
+/*
+ ***************************************************************************
+ ***************************************************************************
+ */
+void RefineScheduleConnectorWidthRequestor::finalizeCallback()
+{
+}
+
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/RefineScheduleConnectorWidthRequestor.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/RefineScheduleConnectorWidthRequestor.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,119 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   RefineSchedule's implementation of PatchHierarchy 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_RefineScheduleConnectorWidthRequestor
+#define included_xfer_RefineScheduleConnectorWidthRequestor
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/PatchHierarchy.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+
+/*!
+ * @brief Implementation of the strategy class
+ * hier::PatchHierarchy::ConnectorWidthRequestorStrategy to tell the
+ * hier::PatchHierarchy how wide RefineSchedule needs Connectors
+ * between hierarchy levels to be.
+ */
+class RefineScheduleConnectorWidthRequestor
+   : public hier::PatchHierarchy::ConnectorWidthRequestorStrategy {
+
+public:
+
+   /*!
+    * @brief Constructor.
+    */
+   RefineScheduleConnectorWidthRequestor();
+
+   /*!
+    * @brief Compute Connector widths that this class requires in
+    * order to work properly on a given hierarchy.
+    *
+    * Implements the pure virtual method
+    * hier::PatchHierarchy::ConnectorWidthRequestorStrategy::computeRequiredConnectorWidths()
+    *
+    * @param[out] self_connector_width Array of widths for Connectors
+    * from a level to itself.
+    *
+    * @param[out] fine_connector_width Array of widths for Connectors
+    * from a level to the next finer level.
+    *
+    * @param[in]  patch_hierarchy
+    */
+   void computeRequiredConnectorWidths(
+      std::vector<hier::IntVector>& self_connector_widths,
+      std::vector<hier::IntVector>& fine_connector_widths,
+      const hier::PatchHierarchy& patch_hierarchy) const;
+
+   /*!
+    * @brief Set the factor by which the ghost data widths in the
+    * PatchHierarchy are multiplied to increase their effective values.
+    * for the purpose of handling more ghost data than registered.
+    *
+    * We support values of ghost data width that are larger than those
+    * registered by some factor.  An example of the need is when we
+    * fill a PatchLevel that is a coarsened version of a current level
+    * in the hierarchy.  Coarsening the level effectively increases
+    * the size of the ghost data region because the coarse cells are
+    * bigger.
+    *
+    * Note that the Connector widths are not linear functions of this
+    * factor.  Increasing the factor is NOT the same as multiplying
+    * the Connector widths by the same factor.
+    *
+    * @param[in] factor By default, @c factor=1.
+    */
+   void setGhostCellWidthFactor( int factor );
+
+private:
+
+   /*!
+    * @brief Set up things for the entire class.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   initializeCallback();
+
+   /*!
+    * Free static timers.
+    *
+    * Only called by StartupShutdownManager.
+    */
+   static void
+   finalizeCallback();
+
+   /*!
+    * @brief Static object that is auto-registered in PatchHierarchy
+    * by default.
+    */
+   static RefineScheduleConnectorWidthRequestor
+   s_auto_registered_connector_width_requestor;
+
+   static tbox::StartupShutdownManager::Handler
+   s_initialize_finalize_handler;
+
+   /*
+    * @brief The factor by which the ghost data widths in the
+    * PatchHierarchy are multiplied to increase their effective
+    * values.  for the purpose of handling more ghost data than
+    * registered.
+    */
+   int d_gcw_factor;
+
+};
+
+}
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/RefineTimeTransaction.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/RefineTimeTransaction.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,327 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Communication transaction for time interpolation during data refining 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_RefineTimeTransaction_C
+#define included_xfer_RefineTimeTransaction_C
+
+#include "SAMRAI/xfer/RefineTimeTransaction.h"
+
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#include <typeinfo>
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(disable, CPPC5334)
+#pragma report(disable, CPPC5328)
+#endif
+
+namespace SAMRAI {
+namespace xfer {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialization, set/unset functions for static array of refine items  *
+ * and interpolation time.                                               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double RefineTimeTransaction::s_time = 0.0;
+
+const RefineClasses::Data **
+RefineTimeTransaction::s_refine_items =
+   (const RefineClasses::Data **)NULL;
+int RefineTimeTransaction::s_num_refine_items = 0;
+
+void RefineTimeTransaction::setTransactionTime(
+   const double time)
+{
+   s_time = time;
+}
+
+void RefineTimeTransaction::setRefineItems(
+   const RefineClasses::Data** refine_items,
+   int num_refine_items)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(refine_items != (const RefineClasses::Data **)NULL);
+   TBOX_ASSERT(num_refine_items >= 0);
+#endif
+   s_refine_items = refine_items;
+   s_num_refine_items = num_refine_items;
+}
+
+void RefineTimeTransaction::unsetRefineItems()
+{
+   s_refine_items = (const RefineClasses::Data **)NULL;
+   s_num_refine_items = 0;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor sets state of transaction.                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+RefineTimeTransaction::RefineTimeTransaction(
+   tbox::Pointer<hier::PatchLevel>& dst_level,
+   tbox::Pointer<hier::PatchLevel>& src_level,
+   tbox::Pointer<hier::BoxOverlap> overlap,
+   const hier::MappedBox& dst_mapped_box,
+   const hier::MappedBox& src_mapped_box,
+   const hier::Box& box,
+   int refine_item_id):
+   d_dst_patch(0),
+   d_dst_patch_rank(dst_mapped_box.getOwnerRank()),
+   d_src_patch(0),
+   d_src_patch_rank(src_mapped_box.getOwnerRank()),
+   d_overlap(overlap),
+   d_box(box),
+   d_refine_item_id(refine_item_id)
+{
+   TBOX_ASSERT(!dst_level.isNull());
+   TBOX_ASSERT(!src_level.isNull());
+   TBOX_ASSERT(!overlap.isNull());
+   TBOX_ASSERT(dst_mapped_box.getLocalId() >= 0);
+   TBOX_ASSERT(src_mapped_box.getLocalId() >= 0);
+   TBOX_ASSERT(refine_item_id >= 0);
+   TBOX_DIM_ASSERT_CHECK_ARGS5(*dst_level,
+      *src_level,
+      dst_mapped_box,
+      src_mapped_box,
+      box);
+
+   // Note: s_num_coarsen_items cannot be used at this point!
+
+   if ( d_dst_patch_rank == dst_level->getMappedBoxLevel()->getRank() ) {
+      d_dst_patch = dst_level->getPatch( dst_mapped_box.getGlobalId() );
+   }
+   if ( d_src_patch_rank == dst_level->getMappedBoxLevel()->getRank() ) {
+      d_src_patch = src_level->getPatch( src_mapped_box.getGlobalId() );
+   }
+}
+
+RefineTimeTransaction::~RefineTimeTransaction()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Functions overridden in tbox::Transaction base class.                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool RefineTimeTransaction::canEstimateIncomingMessageSize()
+{
+   bool can_estimate = false;
+   if ( !d_src_patch.isNull() ) {
+      can_estimate =
+         d_src_patch->getPatchData(s_refine_items[d_refine_item_id]->
+            d_src_told)
+         ->canEstimateStreamSizeFromBox();
+   } else {
+      can_estimate =
+         d_dst_patch->getPatchData(s_refine_items[d_refine_item_id]->
+            d_scratch)
+         ->canEstimateStreamSizeFromBox();
+   }
+   return can_estimate;
+}
+
+size_t RefineTimeTransaction::computeIncomingMessageSize()
+{
+   d_incoming_bytes =
+      d_dst_patch->getPatchData(s_refine_items[d_refine_item_id]->
+         d_scratch)
+      ->getDataStreamSize(*d_overlap);
+   return d_incoming_bytes;
+}
+
+size_t RefineTimeTransaction::computeOutgoingMessageSize()
+{
+   d_outgoing_bytes =
+      d_src_patch->getPatchData(s_refine_items[d_refine_item_id]->
+         d_src_told)
+      ->getDataStreamSize(*d_overlap);
+   return d_outgoing_bytes;
+}
+
+void RefineTimeTransaction::packStream(
+   tbox::MessageStream& stream)
+{
+   hier::MappedBox temporary_mapped_box(d_box.getDim());
+   temporary_mapped_box.initialize(d_box, hier::LocalId(-1), tbox::SAMRAI_MPI::getInvalidRank());
+
+   hier::Patch temporary_patch(
+      temporary_mapped_box,
+      d_src_patch->getPatchDescriptor());
+
+   tbox::Pointer<hier::PatchData> temporary_patch_data(
+      d_src_patch->getPatchDescriptor()
+      ->getPatchDataFactory(s_refine_items[d_refine_item_id]->
+         d_src_told)
+      ->allocate(temporary_patch));
+   temporary_patch_data->setTime(s_time);
+
+   timeInterpolate(
+      temporary_patch_data,
+      d_src_patch->getPatchData(s_refine_items[d_refine_item_id]->d_src_told),
+      d_src_patch->getPatchData(s_refine_items[d_refine_item_id]->d_src_tnew));
+
+   temporary_patch_data->packStream(stream, *d_overlap);
+}
+
+void RefineTimeTransaction::unpackStream(
+   tbox::MessageStream& stream)
+{
+   d_dst_patch->getPatchData(s_refine_items[d_refine_item_id]->d_scratch)
+              ->unpackStream(stream, *d_overlap);
+}
+
+void RefineTimeTransaction::copyLocalData()
+{
+   /*
+    * If there is no offset between the source and destination, then
+    * time interpolate directly to the destination patchdata.  Otherwise,
+    * time interpolate into a temporary patchdata and copy the result
+    * to the destination patchdata.
+    */
+   if ( d_overlap->getSourceOffset() == 
+        hier::IntVector::getZero(d_box.getDim()) ) {
+
+      timeInterpolate(
+         d_dst_patch->getPatchData(s_refine_items[d_refine_item_id]->
+            d_scratch),
+         d_src_patch->getPatchData(s_refine_items[d_refine_item_id]->
+            d_src_told),
+         d_src_patch->getPatchData(s_refine_items[d_refine_item_id]->
+            d_src_tnew));
+
+   } else {
+
+      hier::MappedBox temporary_mapped_box(d_box.getDim());
+      temporary_mapped_box.initialize(d_box, hier::LocalId(-1), tbox::SAMRAI_MPI::getInvalidRank());
+
+      hier::Patch temporary_patch(
+         temporary_mapped_box,
+         d_src_patch->getPatchDescriptor());
+
+      tbox::Pointer<hier::PatchData> temp =
+         d_src_patch->getPatchDescriptor()
+         ->getPatchDataFactory(s_refine_items[d_refine_item_id]->
+            d_src_told)
+         ->allocate(temporary_patch);
+
+      temp->setTime(s_time);
+
+      timeInterpolate(
+         temp,
+         d_src_patch->getPatchData(s_refine_items[d_refine_item_id]->
+            d_src_told),
+         d_src_patch->getPatchData(s_refine_items[d_refine_item_id]->
+            d_src_tnew));
+
+      d_dst_patch->getPatchData(s_refine_items[d_refine_item_id]->d_scratch)
+                 ->copy(*temp, *d_overlap);
+
+   }
+
+}
+
+void RefineTimeTransaction::timeInterpolate(
+   const tbox::Pointer<hier::PatchData>& pd_dst,
+   const tbox::Pointer<hier::PatchData>& pd_old,
+   const tbox::Pointer<hier::PatchData>& pd_new)
+{
+   TBOX_ASSERT(!pd_old.isNull());
+   TBOX_ASSERT(!pd_dst.isNull());
+   TBOX_DIM_ASSERT_CHECK_ARGS2(*pd_dst, *pd_old);
+   TBOX_ASSERT(tbox::MathUtilities<double>::equalEps(pd_dst->getTime(), s_time));
+
+   if (tbox::MathUtilities<double>::equalEps(pd_old->getTime(), s_time)) {
+      s_refine_items[d_refine_item_id]->
+      d_optime->timeInterpolate(*pd_dst, d_box, *pd_old, *pd_old);
+   } else {
+
+      TBOX_ASSERT(!pd_new.isNull());
+      TBOX_DIM_ASSERT_CHECK_ARGS2(*pd_dst, *pd_new);
+      TBOX_ASSERT(pd_old->getTime() < s_time);
+      TBOX_ASSERT(pd_new->getTime() >= s_time);
+
+      s_refine_items[d_refine_item_id]->
+      d_optime->timeInterpolate(*pd_dst, d_box, *pd_old, *pd_new);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Function to print state of transaction.                               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void RefineTimeTransaction::printClassData(
+   std::ostream& stream) const
+{
+   stream << "Refine Time Transaction" << std::endl;
+   stream << "   transaction time:        " << s_time << std::endl;
+   stream << "   refine item array:        "
+          << (RefineClasses::Data **)s_refine_items << std::endl;
+   stream << "   num refine items:        " << s_num_refine_items << std::endl;
+   stream << "   destination patch rank:        " << d_dst_patch_rank
+          << std::endl;
+   stream << "   source patch rank:             " << d_src_patch_rank
+          << std::endl;
+   stream << "   time interpolation box:  " << d_box << std::endl;
+   stream << "   refine item id:          " << d_refine_item_id << std::endl;
+   stream << "   destination patch data id:  "
+   << s_refine_items[d_refine_item_id]->d_scratch << std::endl;
+   stream << "   source (old) patch data id: "
+   << s_refine_items[d_refine_item_id]->d_src_told << std::endl;
+   stream << "   source (new) patch data id: "
+   << s_refine_items[d_refine_item_id]->d_src_tnew << std::endl;
+   stream << "   time interpolation name id: "
+   << typeid(*s_refine_items[d_refine_item_id]->d_optime).name() << std::endl;
+   stream << "   incoming bytes:          " << d_incoming_bytes << std::endl;
+   stream << "   outgoing bytes:          " << d_outgoing_bytes << std::endl;
+   stream << "   destination patch:           "
+          << (hier::Patch *)d_src_patch << std::endl;
+   stream << "   source level:           "
+          << (hier::Patch *)d_src_patch << std::endl;
+   stream << "   overlap:                 " << std::endl;
+   d_overlap->print(stream);
+}
+
+}
+}
+
+#if !defined(__BGL_FAMILY__) && defined(__xlC__)
+/*
+ * Suppress XLC warnings
+ */
+#pragma report(enable, CPPC5334)
+#pragma report(enable, CPPC5328)
+#endif
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/RefineTimeTransaction.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/RefineTimeTransaction.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,210 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Communication transaction for time interpolation during data refining 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_RefineTimeTransaction
+#define included_xfer_RefineTimeTransaction
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Transaction.h"
+#include "SAMRAI/xfer/RefineClasses.h"
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+
+#include <iostream>
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Class RefineTimeTransaction represents a single time interpolation
+ * communication transaction between two processors or a local data copy or refine
+ * schedules.  Note that to there is an implicit hand-shaking between objects of
+ * this class and the RefineSchedule object that constructs them.  Following
+ * the refine schedule implementation, the source patch data indices for a time
+ * transaction are always refer to the old and new source data and the destination
+ * patch data index for a time transaction is always the scratch data, all as defined
+ * in the RefineClasses class.  This transaction is used by the refine schedule.
+ *
+ * @see xfer::RefineSchedule
+ * @see xfer::RefineClasses
+ * @see tbox::Schedule
+ * @see tbox::Transaction
+ */
+
+class RefineTimeTransaction:public tbox::Transaction
+{
+public:
+   /*!
+    * Static member function to set the array of refine class data items that
+    * is shared by all object instances of this time transaction class during
+    * data transfers.  The array must be set before any transactions are executed.
+    * The array is set in the RefineSchedule class.
+    */
+   static void
+   setRefineItems(
+      const RefineClasses::Data** refine_items,
+      int num_refine_items);
+
+   /*!
+    * Static member function to unset the array of refine class data items that
+    * is shared by all object instances of this time transaction class during
+    * data transfers.  The unset function is used to prevent erroneous execution
+    * of different schedules.  The array is unset in the RefineSchedule class.
+    */
+   static void
+   unsetRefineItems();
+
+   /*!
+    * Static member function to set the transaction time that will be shared
+    * by all object instances of this time transaction class during time
+    * interpolation.  This transaction time must be set before any transactions
+    * are executed.
+    */
+   static void
+   setTransactionTime(
+      const double time);
+
+   /*!
+    * Construct a transaction with the specified source and destination levels,
+    * patches, and patch data components found in the refine class
+    * item with the given id owned by the calling refine schedule.  In general,
+    * this constructor is called by a RefineSchedule object for each data
+    * transaction (involving time interpolation) that must occur.  This transaction
+    * will be responsible for one of the following: (1) performing a local copy,
+    * (2) packing a message stream from the source, or (3) unpacking a message stream
+    * from the destination.  The transaction will perform time interpolation between
+    * the source old and new times using the time interpolation operator found in
+    * the refine class item.
+    *
+    * @param dst_level      tbox::Pointer to destination patch level.
+    * @param src_level      tbox::Pointer to source patch level.
+    * @param overlap        tbox::Pointer to overlap region between patches.
+    * @param dst_patch      Integer index of destination patch in destination
+    *                       patch level.
+    * @param src_patch      Integer index of source patch in source patch level.
+    * @param box            hier::Box region in which to time interpolate.
+    * @param refine_item_id   Integer id of refine data item owned by refine schedule.
+    *
+    * When assertion checking is active, an assertion will result if any of the pointer
+    * arguments is null, or if any of the integer arguments are invalid (i.e., < 0);
+    */
+   explicit RefineTimeTransaction(
+      tbox::Pointer<hier::PatchLevel>& dst_level,
+      tbox::Pointer<hier::PatchLevel>& src_level,
+      tbox::Pointer<hier::BoxOverlap> overlap,
+      const hier::MappedBox& dst_mapped_box,
+      const hier::MappedBox& src_mapped_box,
+      const hier::Box& box,
+      int refine_item_id);
+
+   /*!
+    * The virtual destructor for time transaction releases all
+    * memory associated with the transaction.
+    */
+   virtual ~RefineTimeTransaction();
+
+   /*!
+    * Return a boolean indicating whether this transaction can estimate
+    * the size of an incoming message.  If this is false, then a different
+    * communications protocol kicks in and the message size is transmitted
+    * between mapped_boxes.
+    */
+   virtual bool
+   canEstimateIncomingMessageSize();
+
+   /*!
+    * Return the integer amount of buffer space (in bytes) needed for the
+    * incoming message.  This routine is only called if the transaction
+    * can estimate the size of the incoming message.
+    */
+   virtual size_t
+   computeIncomingMessageSize();
+
+   /*!
+    * Return the integer buffer space needed (in bytes) for the outgoing message.
+    */
+   virtual size_t
+   computeOutgoingMessageSize();
+
+   /*!
+    * Return the sending processor number for the communications transaction.
+    */
+   virtual int
+   getSourceProcessor() { return d_src_patch_rank; }
+
+   /*!
+    * Return the receiving processor number for the communications transaction.
+    */
+   virtual int
+   getDestinationProcessor() { return d_dst_patch_rank; }
+
+   /*!
+    * Pack the transaction data into the message stream.
+    */
+   virtual void
+   packStream(
+      tbox::MessageStream& stream);
+
+   /*!
+    * Unpack the transaction data from the message stream.
+    */
+   virtual void
+   unpackStream(
+      tbox::MessageStream& stream);
+
+   /*!
+    * Perform the local data copy for the transaction.
+    */
+   virtual void
+   copyLocalData();
+
+   /*!
+    * Print out transaction information.
+    */
+   virtual void
+   printClassData(
+      std::ostream& stream) const;
+
+private:
+   RefineTimeTransaction(
+      const RefineTimeTransaction&);                    // not implemented
+   void
+   operator = (
+      const RefineTimeTransaction&);                    // not implemented
+
+   static double s_time;
+   static const RefineClasses::Data** s_refine_items;
+   static int s_num_refine_items;
+
+   void
+   timeInterpolate(
+      const tbox::Pointer<hier::PatchData>& pd_dst,
+      const tbox::Pointer<hier::PatchData>& pd_old,
+      const tbox::Pointer<hier::PatchData>& pd_new);
+
+   tbox::Pointer<hier::Patch> d_dst_patch;
+   int                        d_dst_patch_rank;
+   tbox::Pointer<hier::Patch> d_src_patch;
+   int                        d_src_patch_rank;
+   tbox::Pointer<hier::BoxOverlap> d_overlap;
+   hier::Box d_box;
+   int d_refine_item_id;
+   int d_incoming_bytes;
+   int d_outgoing_bytes;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/RefineTransactionFactory.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/RefineTransactionFactory.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,95 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface for factory objects that create transactions for
+ *                refine schedules. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_RefineTransactionFactory_C
+#define included_xfer_RefineTransactionFactory_C
+
+#include "SAMRAI/xfer/RefineTransactionFactory.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default constructor and destructor.                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+RefineTransactionFactory::RefineTransactionFactory()
+{
+}
+
+RefineTransactionFactory::~RefineTransactionFactory()
+{
+}
+
+/*
+ *************************************************************************
+ *
+ * Invoke the allocate method with default values for box and
+ * use_time_interpolation. Can't use optional argument as a Dimension
+ * value is needed.
+ *
+ *************************************************************************
+ */
+tbox::Pointer<tbox::Transaction>
+RefineTransactionFactory::allocate(
+   tbox::Pointer<hier::PatchLevel> dst_level,
+   tbox::Pointer<hier::PatchLevel> src_level,
+   tbox::Pointer<hier::BoxOverlap> overlap,
+   const hier::MappedBox& dst_mapped_box,
+   const hier::MappedBox& src_mapped_box,
+   int ritem_id) const {
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst_level,
+      *src_level,
+      dst_mapped_box,
+      src_mapped_box);
+
+   return allocate(
+      dst_level,
+      src_level,
+      overlap,
+      dst_mapped_box,
+      src_mapped_box,
+      ritem_id,
+      hier::Box::getEmptyBox(src_level->getDim()),
+      false);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default no-op implementations of optional virtual functions.          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void RefineTransactionFactory::setTransactionTime(
+   double fill_time)
+{
+   NULL_USE(fill_time);
+}
+
+void RefineTransactionFactory::preprocessScratchSpace(
+   tbox::Pointer<hier::PatchLevel> level,
+   double fill_time,
+   const hier::ComponentSelector& preprocess_vector) const
+{
+   NULL_USE(level);
+   NULL_USE(fill_time);
+   NULL_USE(preprocess_vector);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/RefineTransactionFactory.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/RefineTransactionFactory.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,164 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface for factory objects that create transactions for
+ *                refine schedules. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_RefineTransactionFactory
+#define included_xfer_RefineTransactionFactory
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/Transaction.h"
+#include "SAMRAI/xfer/RefineClasses.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Abstract base class defining the interface for all concrete transaction
+ * factory objects that generate data transaction objects used with a RefineSchedule
+ * object.  A concrete subclass will allocate new transaction objects.  This class
+ * is an example of the ``Abstract Factory'' method described in the Design Patterns
+ * book by Gamma, et al.
+ *
+ * To add a new type of Transaction object MyRefineTransaction:
+ *
+ * -# Implement a concrete RefineTransactionFactory object as a subclass
+ *       that is derived from this RefineTransactionFactory base class.
+ *       Implement the abstract virtual functions as appropriate for the
+ *       concrete subclass; in particular, the allocate() function must return
+ *       a new instance of the desired transaction object.
+ * -# The type of the transaction allocated by the concrete factory is a
+ *       Transaction<DIM>.  Thus, the new transaction object must be derived
+ *       from the Transaction<DIM> base class and implement the abstract
+ *       virtual functions declared by the base class.
+ *
+ * @see tbox::Transaction
+ */
+
+class RefineTransactionFactory:public tbox::DescribedClass
+{
+public:
+   /*!
+    * @brief Default constructor.
+    */
+   RefineTransactionFactory();
+
+   /*!
+    * @brief Virtual destructor.
+    */
+   virtual ~RefineTransactionFactory();
+
+   /*!
+    * @brief Pure virtual function to set the array of RefineClass::Data items
+    * associated with the refine schedule.  Typical concrete transactions used by
+    * the schedule use this information to communicate data.  This operation
+    * is called by the refine schedule during the execution of the
+    * RefineSchedule::fillData() routine before data communication
+    * operations begin.
+    */
+   virtual void
+   setRefineItems(
+      const RefineClasses::Data** refine_items,
+      int num_refine_items) = 0;
+
+   /*!
+    * @brief Pure virtual function to clear the array of RefineClass::Data items
+    * associated with the refine schedule.  This operation is called by the
+    * refine schedule after data communication operations are complete.
+    */
+   virtual void
+   unsetRefineItems() = 0;
+
+   /*!
+    * @brief Pure virtual function to allocate a concrete refine transaction object.
+    * This routine is called by the refine schedule during construction of the
+    * schedule.
+    *
+    * @param dst_level      tbox::Pointer to destination patch level.
+    * @param src_level      tbox::Pointer to source patch level.
+    * @param overlap        tbox::Pointer to overlap region between patches.
+    * @param dst_patch_id   Integer index of destination patch in destination
+    *                       patch level.
+    * @param src_patch_id   Integer index of source patch in source patch level.
+    * @param ritem_id       Integer index of RefineClass::Data item associated
+    *                       with transaction.
+    * @param box            Optional const reference to box defining region of
+    *                       refine transaction.  Default is an empty box.
+    * @param use_time_interpolation  Optional boolean flag indicating whether the
+    *                       refine transaction involves time interpolation.
+    *                       Default is false.
+    */
+   virtual tbox::Pointer<tbox::Transaction>
+   allocate(
+      tbox::Pointer<hier::PatchLevel> dst_level,
+      tbox::Pointer<hier::PatchLevel> src_level,
+      tbox::Pointer<hier::BoxOverlap> overlap,
+      const hier::MappedBox& dst_mapped_box,
+      const hier::MappedBox& src_mapped_box,
+      int ritem_id,
+      const hier::Box& box,
+      bool use_time_interpolation = false) const = 0;
+
+   tbox::Pointer<tbox::Transaction>
+   allocate(
+      tbox::Pointer<hier::PatchLevel> dst_level,
+      tbox::Pointer<hier::PatchLevel> src_level,
+      tbox::Pointer<hier::BoxOverlap> overlap,
+      const hier::MappedBox& dst_mapped_box,
+      const hier::MappedBox& src_mapped_box,
+      int ritem_id) const;
+
+   /*!
+    * @brief Virtual function to set simulation time for transaction objects.
+    * This operation is called by the refine schedule during the execution of
+    * the RefineSchedule::fillData() routine before data communication
+    * operations begin.  This function is optional for the concrete transaction
+    * factory object.  The default implementation is a no-op.
+    */
+   virtual void
+   setTransactionTime(
+      double fill_time);
+
+   /*!
+    * @brief Virtual function allowing transaction factory to preprocess scratch
+    * space data before transactactions use it if they need to.  This function is
+    * optional for the concrete transaction factory object.
+    * The default implementation is a no-op.
+    *
+    * @param level        tbox::Pointer to patch level holding scratch data.
+    * @param fill_time    Double value of simulation time corresponding to
+    *                     RefineSchedule operations.
+    * @param preprocess_vector Const reference to ComponentSelector that indicates
+    *                     patch data array indices of scratch patch data objects
+    *                     to preprocess.
+    */
+   virtual void
+   preprocessScratchSpace(
+      tbox::Pointer<hier::PatchLevel> level,
+      double fill_time,
+      const hier::ComponentSelector& preprocess_vector) const;
+
+private:
+   // The following two functions are not implemented
+   RefineTransactionFactory(
+      const RefineTransactionFactory&);
+   void
+   operator = (
+      const RefineTransactionFactory&);
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/StandardCoarsenTransactionFactory.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/StandardCoarsenTransactionFactory.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,96 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Concrete factory for create standard copy transactions
+ *                for coarsen schedules. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_StandardCoarsenTransactionFactory_C
+#define included_xfer_StandardCoarsenTransactionFactory_C
+
+#include "SAMRAI/xfer/StandardCoarsenTransactionFactory.h"
+
+#include "SAMRAI/xfer/CoarsenCopyTransaction.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default constructor and destructor.                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+StandardCoarsenTransactionFactory::StandardCoarsenTransactionFactory()
+{
+}
+
+StandardCoarsenTransactionFactory::~StandardCoarsenTransactionFactory()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set/unset information for transactions managed by this factory class. *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void StandardCoarsenTransactionFactory::setCoarsenItems(
+   const CoarsenClasses::Data** coarsen_items,
+   int num_coarsen_items)
+{
+   xfer::CoarsenCopyTransaction::setCoarsenItems(coarsen_items,
+      num_coarsen_items);
+   d_coarsen_items = coarsen_items;
+   d_num_coarsen_items = num_coarsen_items;
+}
+
+void StandardCoarsenTransactionFactory::unsetCoarsenItems()
+{
+   xfer::CoarsenCopyTransaction::unsetCoarsenItems();
+   d_coarsen_items = (const xfer::CoarsenClasses::Data **)NULL;
+   d_num_coarsen_items = 0;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Allocate appropriate transaction object.                              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<tbox::Transaction>
+StandardCoarsenTransactionFactory::allocate(
+   tbox::Pointer<hier::PatchLevel> dst_level,
+   tbox::Pointer<hier::PatchLevel> src_level,
+   tbox::Pointer<hier::BoxOverlap> overlap,
+   const hier::MappedBox& dst_mapped_box,
+   const hier::MappedBox& src_mapped_box,
+   int citem_id) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS4(*dst_level,
+      *src_level,
+      dst_mapped_box,
+      src_mapped_box);
+
+   CoarsenCopyTransaction* transaction =
+      new CoarsenCopyTransaction(dst_level, src_level,
+         overlap,
+         dst_mapped_box,
+         src_mapped_box,
+         citem_id);
+   return tbox::Pointer<tbox::Transaction>(transaction);
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/StandardCoarsenTransactionFactory.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/StandardCoarsenTransactionFactory.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,97 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Concrete factory for create standard copy transactions
+ *                for coarsen schedules. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_StandardCoarsenTransactionFactory
+#define included_xfer_StandardCoarsenTransactionFactory
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Transaction.h"
+#include "SAMRAI/xfer/CoarsenClasses.h"
+#include "SAMRAI/xfer/CoarsenTransactionFactory.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Concrete subclass of CoarsenTransactionFactory base class that allocates
+ * CoarsenCopyTransaction objects for a CoarsenSchedule object.
+ *
+ * @see xfer::CoarsenCopyTransaction
+ */
+
+class StandardCoarsenTransactionFactory:public CoarsenTransactionFactory
+{
+public:
+   /*!
+    * @brief Default constructor.
+    */
+   StandardCoarsenTransactionFactory();
+
+   /*!
+    * @brief Virtual destructor.
+    */
+   virtual ~StandardCoarsenTransactionFactory();
+
+   /*!
+    * @brief Set the array of CoarsenClass::Data items used by the transactions.
+    */
+   void
+   setCoarsenItems(
+      const CoarsenClasses::Data** coarsen_items,
+      int num_coarsen_items);
+
+   /*!
+    * @brief Clear the array of CoarsenClass::Data items used by the transactions.
+    */
+   void
+   unsetCoarsenItems();
+
+   /*!
+    * @brief Allocate a CoarsenCopyTransaction object.
+    *
+    * @param dst_level      tbox::Pointer to destination patch level.
+    * @param src_level      tbox::Pointer to source patch level.
+    * @param overlap        tbox::Pointer to overlap region between patches.
+    * @param dst_patch_id   Integer index of destination patch in destination
+    *                       patch level.
+    * @param src_patch_id   Integer index of source patch in source patch level.
+    * @param citem_id       Integer index of CoarsenClass::Data item associated
+    *                       with transaction.
+    */
+   tbox::Pointer<tbox::Transaction>
+   allocate(
+      tbox::Pointer<hier::PatchLevel> dst_level,
+      tbox::Pointer<hier::PatchLevel> src_level,
+      tbox::Pointer<hier::BoxOverlap> overlap,
+      const hier::MappedBox& dst_mapped_box,
+      const hier::MappedBox& src_mapped_box,
+      int citem_id) const;
+
+private:
+   // The following two functions are not implemented
+   StandardCoarsenTransactionFactory(
+      const StandardCoarsenTransactionFactory&);
+   void
+   operator = (
+      const StandardCoarsenTransactionFactory&);
+
+   const xfer::CoarsenClasses::Data** d_coarsen_items;
+   int d_num_coarsen_items;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/StandardRefineTransactionFactory.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/StandardRefineTransactionFactory.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Concrete factory to create standard copy and time transactions
+ *                for refine schedules. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_StandardRefineTransactionFactory_C
+#define included_xfer_StandardRefineTransactionFactory_C
+
+#include "SAMRAI/xfer/StandardRefineTransactionFactory.h"
+
+#include "SAMRAI/xfer/RefineCopyTransaction.h"
+#include "SAMRAI/xfer/RefineTimeTransaction.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default constructor and destructor.                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+StandardRefineTransactionFactory::StandardRefineTransactionFactory()
+{
+}
+
+StandardRefineTransactionFactory::~StandardRefineTransactionFactory()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set/unset information for transactions managed by this factory class. *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void StandardRefineTransactionFactory::setRefineItems(
+   const RefineClasses::Data** refine_items,
+   int num_refine_items)
+{
+   xfer::RefineCopyTransaction::setRefineItems(refine_items,
+      num_refine_items);
+   xfer::RefineTimeTransaction::setRefineItems(refine_items,
+      num_refine_items);
+   d_refine_items = refine_items;
+   d_num_refine_items = num_refine_items;
+}
+
+void StandardRefineTransactionFactory::unsetRefineItems()
+{
+   xfer::RefineCopyTransaction::unsetRefineItems();
+   xfer::RefineTimeTransaction::unsetRefineItems();
+   d_refine_items = (const xfer::RefineClasses::Data **)NULL;
+   d_num_refine_items = 0;
+}
+
+void StandardRefineTransactionFactory::setTransactionTime(
+   double fill_time)
+{
+   xfer::RefineTimeTransaction::setTransactionTime(fill_time);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Allocate appropriate transaction object.                              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<tbox::Transaction>
+StandardRefineTransactionFactory::allocate(
+   tbox::Pointer<hier::PatchLevel> dst_level,
+   tbox::Pointer<hier::PatchLevel> src_level,
+   tbox::Pointer<hier::BoxOverlap> overlap,
+   const hier::MappedBox& dst_mapped_box,
+   const hier::MappedBox& src_mapped_box,
+   int ritem_id,
+   const hier::Box& box,
+   bool use_time_interpolation) const
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS5(*dst_level,
+      *src_level,
+      dst_mapped_box,
+      src_mapped_box,
+      box);
+
+   if (use_time_interpolation) {
+
+      RefineTimeTransaction* transaction =
+         new RefineTimeTransaction(dst_level, src_level,
+            overlap,
+            dst_mapped_box,
+            src_mapped_box,
+            box,
+            ritem_id);
+      return tbox::Pointer<tbox::Transaction>(transaction);
+
+   } else {
+
+      RefineCopyTransaction* transaction =
+         new RefineCopyTransaction(dst_level, src_level,
+            overlap,
+            dst_mapped_box,
+            src_mapped_box,
+            ritem_id);
+      return tbox::Pointer<tbox::Transaction>(transaction);
+
+   }
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/StandardRefineTransactionFactory.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/StandardRefineTransactionFactory.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,117 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Concrete factory to create standard copy and time transactions
+ *                for refine schedules. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_StandardRefineTransactionFactory
+#define included_xfer_StandardRefineTransactionFactory
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Transaction.h"
+#include "SAMRAI/xfer/RefineClasses.h"
+#include "SAMRAI/xfer/RefineTransactionFactory.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Concrete subclass of RefineTransactionFactory base class that allocates
+ * RefineCopyTransaction and RefineTimeTransaction objects for a
+ * RefineSchedule object.
+ *
+ * @see xfer::RefineCopyTransaction
+ * @see xfer::RefineTimeTransaction
+ * @see xfer::RefineTransactionFactory
+ */
+
+class StandardRefineTransactionFactory:public RefineTransactionFactory
+{
+public:
+   /*!
+    * @brief Default constructor.
+    */
+   StandardRefineTransactionFactory();
+
+   /*!
+    * @brief Virtual destructor.
+    */
+   virtual ~StandardRefineTransactionFactory();
+
+   /*!
+    * @brief Set the array of RefineClass::Data items used by the transactions.
+    */
+   void
+   setRefineItems(
+      const RefineClasses::Data** refine_items,
+      int num_refine_items);
+
+   /*!
+    * @brief Clear the array of RefineClass::Data items used by the transactions.
+    */
+   void
+   unsetRefineItems();
+
+   /*!
+    * @brief Set simulation time used by the refine time transaction objects.
+    */
+   void
+   setTransactionTime(
+      double fill_time);
+
+   /*!
+    * @brief Allocate an appropriate refine copy or time transaction object.
+    * When time interpolation flag is passed as true a RefineTimeTransaction
+    * object will be created.  Otherwise, a RefineCopyTransaction aill be
+    * created.
+    *
+    * @param dst_level      tbox::Pointer to destination patch level.
+    * @param src_level      tbox::Pointer to source patch level.
+    * @param overlap        tbox::Pointer to overlap region between patches.
+    * @param dst_patch_id   Integer index of destination patch in destination
+    *                       patch level.
+    * @param src_patch_id   Integer index of source patch in source patch level.
+    * @param ritem_id       Integer index of RefineClass::Data item associated
+    *                       with transaction.
+    * @param box            Optional const reference to box defining region of
+    *                       refine transaction.  Default is an empty box.
+    * @param use_time_interpolation  Optional boolean flag indicating whether the
+    *                       refine transaction involves time interpolation.
+    *                       Default is false.
+    */
+   tbox::Pointer<tbox::Transaction>
+   allocate(
+      tbox::Pointer<hier::PatchLevel> dst_level,
+      tbox::Pointer<hier::PatchLevel> src_level,
+      tbox::Pointer<hier::BoxOverlap> overlap,
+      const hier::MappedBox& dst_mapped_box,
+      const hier::MappedBox& src_mapped_box,
+      int ritem_id,
+      const hier::Box& box,       // Default in v 2.x  = hier::Box()
+      bool use_time_interpolation = false) const;
+
+private:
+   // The following two functions are not implemented
+   StandardRefineTransactionFactory(
+      const StandardRefineTransactionFactory&);
+   void
+   operator = (
+      const StandardRefineTransactionFactory&);
+
+   const RefineClasses::Data** d_refine_items;
+   int d_num_refine_items;
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/TimeInterpolateOperator.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/TimeInterpolateOperator.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,29 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract base class for time interpolation operators. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_TimeInterpolateOperator_C
+#define included_xfer_TimeInterpolateOperator_C
+
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+TimeInterpolateOperator::TimeInterpolateOperator()
+{
+}
+
+TimeInterpolateOperator::~TimeInterpolateOperator()
+{
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/TimeInterpolateOperator.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/TimeInterpolateOperator.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,109 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract base class for time interpolation operators. 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_TimeInterpolateOperator
+#define included_xfer_TimeInterpolateOperator
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace xfer {
+
+/**
+ * Class TimeInterpolateOperator is an abstract base class for each
+ * time interpolation operator used in the SAMRAI framework.  This class
+ * defines the interface between numerical interpolation routines and the
+ * rest of the framework.  Each concrete time interpolation operator subclass
+ * provide two operations:
+ *
+ *
+ *
+ * - @b (1) an implementation of the time interpolation operation
+ *            appropriate for its corresponding patch data type.
+ * - @b (2) a function that determines whether or not the operator
+ *             matches an arbitrary request for a time interpolation operator.
+ *
+ *
+ *
+ * To add a new time interpolation operator (either for a new patch data type
+ * or for a new time interpolation routine on an existing type), define
+ * the operator by inheriting from this abstract base class.  The operator
+ * subclass must implement the interpolation operation in the timeInterpolate()
+ * function, and provide a response to a general operator request in the
+ * findTimeInterpolateOperator() function.  Then, the new operator must be
+ * added to the operator list for the appropriate transfer geometry object
+ * using the Geometry<DIM>::addTimeInterpolateOperator() function.
+ *
+ * Although time interpolation operators usually depend only on patch data
+ * centering and data type and not the mesh coordinate system, they are
+ * defined in the @em geometry package.
+ *
+ * @see xfer::Geometry
+ */
+
+class TimeInterpolateOperator:public tbox::DescribedClass
+{
+public:
+   /**
+    * The default constructor for the coarsening operator does
+    * nothing interesting.
+    */
+   TimeInterpolateOperator();
+
+   /**
+    * The virtual destructor for the coarsening operator does
+    * nothing interesting.
+    */
+   virtual ~TimeInterpolateOperator();
+
+   /**
+    * Return true if the time interpolation operation matches the
+    * variable and name std::string identifier request; false, otherwise.
+    */
+   virtual bool
+   findTimeInterpolateOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const std::string& op_name) const = 0;
+
+   /**
+    * Perform time interpolation between two patch data sources
+    * and place result in the destination patch data.  Time interpolation
+    * is performed on the intersection of the destination patch data and
+    * the input box.  The time to which data is interpolated is provided
+    * by the destination data.
+    */
+   virtual void
+   timeInterpolate(
+      hier::PatchData& dst_data,
+      const hier::Box& where,
+      const hier::PatchData& src_data_old,
+      const hier::PatchData& src_data_new) const = 0;
+
+private:
+   // Neither of these is implemented.
+   TimeInterpolateOperator(
+      const TimeInterpolateOperator&);
+   void
+   operator = (
+      const TimeInterpolateOperator&);
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/VariableFillPattern.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/VariableFillPattern.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,45 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract fill pattern class to provide interface for stencils 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_VariableFillPattern_C
+#define included_xfer_VariableFillPattern_C
+
+#include "SAMRAI/xfer/VariableFillPattern.h"
+
+namespace SAMRAI {
+namespace xfer {
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default constructor                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+VariableFillPattern::VariableFillPattern()
+{
+}
+
+/*
+ *************************************************************************
+ *									*
+ * Destructor                                                            *
+ *									*
+ *************************************************************************
+ */
+
+VariableFillPattern::~VariableFillPattern()
+{
+}
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/VariableFillPattern.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/VariableFillPattern.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,141 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Abstract fill pattern class to provide interface for stencils 
+ *
+ ************************************************************************/
+
+#ifndef included_xfer_VariableFillPattern
+#define included_xfer_VariableFillPattern
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/BoxGeometry.h"
+#include "SAMRAI/hier/BoxOverlap.h"
+#include "SAMRAI/hier/PatchDataFactory.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+namespace SAMRAI {
+namespace xfer {
+
+/*!
+ * @brief Class VariableFillPattern is an abstract base class that provides an
+ * interface to create objects that can calculate overlaps which correspond
+ * to a specific stencil.
+ * 
+ * If an object of a concrete VariableFillPattern type is provided when
+ * registering a refine operation with a RefineAlgorithm, then BoxOverlap
+ * calculations associated with that refine operation will use the
+ * VariableFillPattern implementation to restrict the overlaps to only a
+ * desired subset of the the intersection between the source and destination
+ * patches.  Thus only data within that subset will be filled when
+ * RefineSchedule::fillData() is called.  For example, an implementation of
+ * this class may be used to restrict the filling of data to locations on or
+ * near a patch boundary.
+ *
+ * @see hier::BoxOverlap
+ * @see xfer::RefineAlgorithm
+ * @see xfer::RefineSchedule
+ */
+
+class VariableFillPattern:public tbox::DescribedClass
+{
+public:
+   /*!
+    * @brief Default constructor
+    */
+   VariableFillPattern();
+
+   /*!
+    * @brief Destructor
+    */
+   virtual ~VariableFillPattern();
+
+   /*!
+    * @brief This pure virtual method provides an interface to calculate
+    * overlaps between the destination and source geometries for a copy
+    * operation.
+    *
+    * Implementations of this method will restrict the calculated BoxOverlap
+    * to a certain subset of the intersection between the destination and
+    * source geometries.
+    *
+    * @param[in] dst_geometry    geometry object for destination box
+    * @param[in] src_geometry    geometry object for source box
+    * @param[in] dst_patch_box   box for the destination patch
+    * @param[in] src_mask        the source mask, the box resulting from
+    *                            shifting the source box by src_offset
+    * @param[in] overwrite_interior  controls whether or not to include the
+    *                                destination box interior in the overlap
+    * @param[in] src_offset      the offset between source and destination
+    *                            index space.  src + src_offset = dst
+    *
+    * @return                    Pointer to the calculated overlap object
+    */
+   virtual tbox::Pointer<hier::BoxOverlap>
+   calculateOverlap(
+      const hier::BoxGeometry& dst_geometry,
+      const hier::BoxGeometry& src_geometry,
+      const hier::Box& dst_patch_box,
+      const hier::Box& src_mask,
+      const bool overwrite_interior,
+      const hier::IntVector& src_offset) const = 0;
+
+   /*!
+    * @brief This pure virtual method provides an interface for computing 
+    * overlaps which define the space to be filled by a refinement operation.
+    * 
+    * Implementations of this method compute a BoxOverlap that covers a
+    * desired subset of the space defined by fill_boxes.
+    *
+    * @param[in] fill_boxes  list representing all of the space on a patch
+    *                        or its ghost region that may be filled by a
+    *                        refine operator (cell-centered represtentation)
+    * @param[in] patch_box   box representing the patch where a refine operator
+    *                        will fill data.  (cell-centered representation)
+    * @param[in] data_box    box representing the full extent of the region
+    *                        covered by a patch data object, including all
+    *                        ghosts (cell-centered representation)
+    * @param[in] patch_data_factory patch data factory for the data that is to be
+    *                               filled
+    *
+    * @return                Pointer to the calculated overlap object
+    */
+   virtual tbox::Pointer<hier::BoxOverlap>
+   computeFillBoxesOverlap(
+      const hier::BoxList& fill_boxes,
+      const hier::Box& patch_box,
+      const hier::Box& data_box,
+      const hier::PatchDataFactory& patch_data_factory) const = 0;
+
+   /*!
+    * @brief Return the maximum ghost width of the stencil defined by the
+    * VariableFillPattern implementation.
+    */
+   virtual const hier::IntVector&
+   getStencilWidth() = 0;
+
+   /*!
+    * @brief Return a string name identifying the concrete subclass.
+    */
+   virtual const std::string&
+   getPatternName() const = 0;
+
+private:
+   VariableFillPattern(
+      const VariableFillPattern&);                     // not implemented
+   void
+   operator = (
+      const VariableFillPattern&);                     // not implemented
+
+};
+
+}
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/dox/manual.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/dox/manual.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,27 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace xfer {
+
+/*!
+  @page package_transfer The Transfer Package
+
+  The Transfer package provides generic data communication capabilities 
+  for moving data on a structured AMR patch hierarchy.  This support is
+  divided into these categories: 
+  -# @ref package_transfer_operators "spatial coarsen/refine and time interpolation operator interfaces"
+  -# @ref package_transfer_datamovers "classes for moving data between patch levels on an AMR patch hierarchy"
+  -# @ref package_transfer_multiblock "classes for moving data between patch levels on a multiblock AMR patch hierarchy"
+ 
+  All class names in the Transfer package are in the SAMRAI::xfer namespace.
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/dox/manual_datamovers.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/dox/manual_datamovers.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,26 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace xfer {
+
+/*!
+  @page package_transfer_datamovers Support for Moving Data on SAMR Meshes
+
+  The Transfer package provides flexible, extensible support for a wide range data
+  communication operations involving structured AMR patch hierarchies and levels.
+  These classes are partitioned into two categories:
+
+  -# @ref package_transfer_datamovers_standard "classes for data communication where all simulation data live on all patches on the patch levels involved"
+  -# @ref package_transfer_datamovers_locallyactive "classes for data communication where simulation data live on subsets of patches on the patch levels involved, so-called 'locally-active' data"
+ 
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/dox/manual_datamovers_standard.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/dox/manual_datamovers_standard.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,39 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace xfer {
+
+
+/*!
+  @page package_transfer_datamovers_standard Standard Data Communication Classes
+
+  These classes provide fundamental inter-patch communication functionality 
+  applicable to a wide range of AMR algorithms.   They are implemented in
+  a generic fashion with respect to the actual structure of the data 
+  involved in the communication procedures.
+  - SAMRAI::xfer::CoarsenAlgorithm
+  - SAMRAI::xfer::CoarsenClasses
+  - SAMRAI::xfer::CoarsenCopyTransaction
+  - SAMRAI::xfer::CoarsenPatchStrategy
+  - SAMRAI::xfer::CoarsenSchedule
+  - SAMRAI::xfer::CoarsenTransactionFactory
+  - SAMRAI::xfer::RefineAlgorithm
+  - SAMRAI::xfer::RefineClasses
+  - SAMRAI::xfer::RefineCopyTransaction
+  - SAMRAI::xfer::RefinePatchStrategy
+  - SAMRAI::xfer::RefineSchedule
+  - SAMRAI::xfer::RefineTimeTransaction
+  - SAMRAI::xfer::RefineTransactionFactory
+  - SAMRAI::xfer::StandardCoarsenTransactionFactory
+  - SAMRAI::xfer::StandardRefineTransactionFactory
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/dox/manual_multiblock.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/dox/manual_multiblock.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,29 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace xfer {
+
+/*!
+  @page package_transfer_multiblock Multiblock Data Communication
+
+  These classes provide fundamental inter-patch communication functionality
+  applicable to a AMR algorithms on multiblock domains.
+
+  - SAMRAI::xfer::MultiblockCoarsenAlgorithm 
+  - SAMRAI::xfer::MultiblockCoarsenPatchStrategy
+  - SAMRAI::xfer::MultiblockCoarsenSchedule
+  - SAMRAI::xfer::MultiblockRefineAlgorithm
+  - SAMRAI::xfer::MultiblockRefinePatchStrategy
+  - SAMRAI::xfer::MultiblockRefineSchedule
+
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/SAMRAI/xfer/dox/manual_operators.dox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/SAMRAI/xfer/dox/manual_operators.dox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,56 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Generation of SAMRAI Doxygen source code manual 
+ *
+ ************************************************************************/
+namespace SAMRAI {
+   namespace xfer {
+
+/*!
+  @page package_transfer_operators Patch Data Transfer Operators
+
+  These abstract base classes provide interfaces between transfer operators 
+  and geometry and the rest of the SAMRAI framework.  Specifically, each 
+  operator used within the framework inter-patch communication routines
+  is derived from either the spatial coarsening, spatial refining, or time 
+  interpolation operator base class provided here.  The transfer 
+  geometry class provides a lookup mechanism whereby applications and 
+  algorithms may obtain the operators to treat specific variable quantities 
+  within the communication routines.
+
+  The string identifiers for the coarsening, refining, and time
+  interpolation operators are defined in the SAMRAI::pdat and 
+  SAMRAI::geom packages.
+
+  - @ref package_geometry_cartesian
+  - @ref package_patchdata_operators
+
+  The lookup mechanism provided by the transfer geometry class (xfer::Geometry)
+  allows for arguments that bypass standrad operators for coarsening and refining
+  provided by the SAMRAI library.  If no coarsening is desired for a specific 
+  variable quantity, the string "NO_COARSEN" should be used, and if no 
+  refinement is desired, the string "NO_REFINE" should be used.  For 
+  user-defined coarsening and/or refinement the strings "USER_DEFINED_COARSEN" 
+  and "USER_DEFINED_REFINE" are available.  If these options are used, 
+  coarsening and/or refinement operations can be written in a user-defined 
+  class that implements the abstract base classes 
+  SAMRAI::xfer::CoarsenPatchStrategy and or SAMRAI::xfer::RefinePatchStrategy.  
+  In xfer::CoarsenPatchStrategy, the user-defined coarsen operations can be 
+  implemented in @c preprocessCoarsen() and/or @c postprocessCoarsen().  In 
+  SAMRAI::xfer::RefinePatchStrategy, the user-defined coarsen operations can be 
+  implemented in @c preprocessRefine() and/or @c postprocessRefine().
+
+  @see SAMRAI::xfer::CoarsenPatchStrategy
+  @see SAMRAI::xfer::RefinePatchStrategy 
+  @see SAMRAI::xfer::CoarsenOperator
+  @see SAMRAI::xfer::Geometry
+  @see SAMRAI::xfer::RefineOperator
+  @see SAMRAI::xfer::TimeInterpolateOperator
+*/
+
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/scripts/change_copyright
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/scripts/change_copyright	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,49 @@
+#!/bin/sh
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   bash script to update copyright dates in SAMRAI files
+##
+#########################################################################
+
+# Note: this may work with sh but I have not tested it. sh probably
+# won't be able to handle a large number of files in the "for"
+# statement.
+
+#=============================================================================
+# Change the copyright statement in all files which have the date.
+#=============================================================================
+#
+# These are the commands you can use to replace the copyright date
+# in all files.
+#
+# You may want to run each of these commands from the command line to
+# make sure things are doing what you think they should be doing.
+# (The author does this which is why they are seperated into the 
+#  steps, you could make this more efficient).
+# 
+
+#=============================================================================
+# First find all the files with old copyright dates
+#=============================================================================
+find . -type f ! -name \*.svn\* -exec grep -l "1997-2010" {} \; > files
+
+#=============================================================================
+# Replace the old copyright dates with new dates
+#=============================================================================
+for i in `cat files`
+do
+    echo $i
+    cp $i $i.sed.bak
+    sed "s/1997-2010/1997-2010/" $i.sed.bak > $i
+done
+
+#=============================================================================
+# Remove the temporary files
+#=============================================================================
+find . -name \*.sed.bak -exec rm {} \;
+rm files
+	
diff -r 000000000000 -r 5eda1a3f24e8 source/scripts/cmp.pl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/scripts/cmp.pl	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,33 @@
+#!/usr/local/bin/perl
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   perl script to compare two files but ignore CVS comments 
+##
+#########################################################################
+## Usage: cmp.pl <file1> <file2>
+##
+
+$ANAME = shift(@ARGV);
+$BNAME = shift(@ARGV);
+
+open(AFILE, "$ANAME") || die "Cannot open input file $ANAME...";
+open(BFILE, "$BNAME") || die "Cannot open input file $BNAME...";
+
+while (!eof(AFILE) && !eof(BFILE)) {
+   $ALINE = <AFILE>;
+   $BLINE = <BFILE>;
+   $_ = $ALINE;
+
+   if (!/^(\/\/|c|C|#|##| \*)[ ]*(Release:[\t ]*\$Name|Revision:[\t ]*\$LastChangedRevision|Modified:[\t ]*\$LastChangedDate):[^\$]*\$/o) {
+      if ($ALINE ne $BLINE) {
+         exit 1;
+      }
+   }
+}
+
+exit 0 if (eof(AFILE) && eof(BFILE));
+exit 1;
diff -r 000000000000 -r 5eda1a3f24e8 source/scripts/copy-if-change
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/scripts/copy-if-change	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,55 @@
+#!/bin/sh
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   copy files if there is a change (ignoring CVS comments)
+##
+#########################################################################
+
+PERL=${PERL:-perl}
+
+#
+# Check usage - must have at least two arguments
+#
+
+BIN=`dirname $0`
+if [ $# -le 1 ] ; then
+	echo "usage: copy-if-change <destination directory> <file1> ..."
+	exit 1
+fi
+
+#
+# Get destination directory - check to make sure directory exists
+#
+
+DIR=$1 ; shift
+if [ ! -d $DIR ] ; then
+	echo "usage: copy-if-change <destination directory> <file1> ..."
+	exit 1
+fi
+
+#
+# Copy SRC to DST if the two files are not the same
+#
+
+for FILE in $*; do
+	SRC=$FILE
+	DST=$DIR/`basename $FILE`
+	echo "Checking "$SRC
+	if [ -r $DST ] ; then
+		if $PERL $BIN/cmp.pl $SRC $DST ; then
+			foo=foo # do nothing
+		else
+			echo "   updating "$DST
+			cp -f $SRC $DST
+		fi
+	else
+		echo "   creating "$DST
+		cp $SRC $DST
+	fi
+done
+
+exit 0
diff -r 000000000000 -r 5eda1a3f24e8 source/scripts/create_configure
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/scripts/create_configure	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,24 @@
+#!/bin/bash
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   Commands to create the autoconf configure script
+##
+#########################################################################
+
+
+if [ ! -d acmacros ] 
+then
+	svn checkout file:///usr/casc/samrai/gunney/svnrepo/acmacros/branches/0.3 acmacros
+else
+	svn update acmacros
+fi
+
+rm -fr autom4te.cache
+aclocal -I `pwd`/config -I `pwd`/acmacros --output=config/aclocal.m4
+autoheader -I config
+sed -i -e 's/^\(#undef \(PACKAGE\|VERSION\)\)/\/\/ Removed due to name conflict \1/' config/SAMRAI_config.h.in
+autoconf -I config
diff -r 000000000000 -r 5eda1a3f24e8 source/scripts/cscope_create_database
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/scripts/cscope_create_database	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,19 @@
+#! /bin/sh
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   shell script generating Cscope cross reference symbol database
+##
+#########################################################################
+
+# Go to the top level SAMRAI directory and make sure we get there.
+cd `dirname $0`/../.. || exit 1;
+test -d "source/hierarchy/patches" || exit 1
+pwd
+
+rm -fr cscope.*
+find . -name \*.[cChI] -type f > cscope.files
+cscope -b -q -k
diff -r 000000000000 -r 5eda1a3f24e8 source/scripts/depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/scripts/depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,59 @@
+#!/bin/sh
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   shell script to generate dependencies for SAMRAI files
+##
+#########################################################################
+
+##
+## Generate dependency information for all files in the current directory
+## and subdirectories.
+##
+
+BIN=`dirname $0`
+bindir=`cd $BIN && pwd`
+
+PERL=${PERL:-perl}
+COMP="$PERL $BIN/cmp.pl"
+
+DIRS=`find . -type d -print | grep -v '\(OLD|NEW|BAK|SAVE|to_be_implemented\|noprefix\|CVS\|\.svn\|\.git\|\.hg\)'`
+for DIR in $DIRS ; do
+
+   #
+   # Generate a dependency file in the subdirectory if *.C files exist
+   #
+
+   echo "Checking dependencies in directory "$DIR
+   FILES=`(cd $DIR; echo *.[fCc])`
+   if [ "*.[fCc]" != "$FILES" ] ; then
+      (cd $DIR && perl $bindir/depend.pl . '-' $FILES)
+
+      #
+      # If Makefile.depend does not exist, then create it
+      #
+
+      if [ ! -r $DIR/Makefile.depend ] ; then
+         echo "   creating "$DIR/Makefile.depend
+         mv -f $DIR/Makefile.depend.tmp $DIR/Makefile.depend
+
+      #
+      # Otherwise, copy if the two files are not the same.  Remove the CVS
+      # portions of the header to ignore changes in date/revision/modified.
+      #
+
+      else
+         if $COMP $DIR/Makefile.depend.tmp $DIR/Makefile.depend ; then
+            rm -f $DIR/Makefile.depend.tmp
+         else
+            echo "   updating "$DIR/Makefile.depend
+            mv -f $DIR/Makefile.depend.tmp $DIR/Makefile.depend
+         fi
+      fi
+   fi
+done
+
+exit 0
diff -r 000000000000 -r 5eda1a3f24e8 source/scripts/depend.pl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/scripts/depend.pl	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,305 @@
+#! /usr/bin/perl
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   perl script to generate dependencies for SAMRAI files 
+##
+#########################################################################
+##
+
+# Output a Makefile.depend file for .C src files.  A dependency is
+# created for each .C, .h, and .I recursively included file.
+# In order to speed compilation the makefile flag 
+# DEPENDS_ON_TEMPLATE_IMPLEMENTATION is used to control dependency
+# on .C files.  The rules for determining dependency are: 
+# 
+# .h and .I files always included in the dependency
+#
+#  The src file is always included in the dependency.
+#
+#  .C files included directly by the src file are always included in 
+#  the dependency.  
+#
+#  .C files that are recursively included are ONLY included in the 
+#  dependency if DEPENDS_ON_TEMPLATE_IMPLEMENTATION is "yes".
+#
+
+use File::Basename;
+$scriptname = basename($0);
+
+$debug = 0;
+
+$this_command = "$scriptname @ARGV";
+$src_dir  = shift; $src_dir = '.' if "$src_dir" eq '';
+$inc_dir  = shift; $inc_dir = '-' if "$inc_dir" eq '';
+if ( @ARGV ) {
+    @FILES   = sort @ARGV;
+}
+else {
+    opendir( SRCDIR, $src_dir ) || die "Cannot open directory $src_dir";
+    @FILES = sort grep( /.*\.[fCc]$/, (readdir SRCDIR) );
+    closedir SRCDIR;
+}
+$DEPEND  = "Makefile.depend.tmp";
+
+# By convention, directories should not end with '/'
+# and relative paths should not start with './'.
+# This is required to replace file searches with simpler string searches.
+for ($src_dir, @FILES) { s|/+$||; s|^./+||o; }
+
+if ( "$inc_dir" eq '-' ) {
+    # Find the include directory by climbing back up the path,
+    # past the source directory.
+    $inc_dir = `pwd`; chop $inc_dir;
+    if( $inc_dir =~ m|^.*/?source/?| ) {
+	$inc_dir =~ s|^.*/?source/?|source/|o;	# This gets past dir source.
+	$inc_dir =~ s|[^/]+|..|go;		# Change each generation to '..'.
+	$inc_dir = "$inc_dir/source";    # Append include.
+    } else {
+	$inc_dir =~ s|^.*/?SAMRAI/?||o;	        # This gets past dir source.
+	$inc_dir =~ s|[^/]+|..|go;		# Change each generation to '..'.
+	$inc_dir = "$inc_dir/source";    # Append include.
+    }
+}
+
+ at INCPATH = ($src_dir, $inc_dir);
+print "src_dir = $src_dir\n" if $debug;
+print "inc_dir = $inc_dir\n" if $debug;
+print "files = @FILES\n" if $debug;
+
+$TABLEN  = 8;
+$LINLEN  = 72;
+
+#
+# For each of the specified files, get dependency information and write to file
+#
+
+open(OUTFILE, ">$DEPEND") || die "Cannot open output file $DEPEND...";
+
+$EMPTY="";
+
+print OUTFILE <<__EOM__;
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies
+##
+#########################################################################
+
+## This file is automatically generated by $scriptname.
+
+
+__EOM__
+
+$FILENUMBER=0;
+
+for $cfile (@FILES) {
+
+    print "Checking file: $cfile\n" if $debug;
+
+    undef %dset;	# The set of files that cfile depends on.
+    @depfiles = ($cfile);	# List of files an object file compiled
+    				# from $cfile would depend on.
+
+    while (@depfiles) {
+	$depfile = shift @depfiles;
+	print "\tprocessing $depfile\n" if $debug;
+	next if ( $depfile eq '' );
+	if ( defined $dset{$depfile} ) {
+	    print "\t$depfile is already in dependency set.\n" if $debug;
+	    next;
+	}
+	# This file is not part of the dependency set.
+	print "\t$depfile is being added the dependency set\n" if $debug;
+	$dset{$depfile} = 1;	# Make current file a part of dependency set.
+	# See what files $depfile depends on (and cache that info in
+	# the variable filedeps).
+	if ( ! defined $filedeps{$depfile} ) {
+	    print "\tFinding filedeps for $depfile\n" if $debug;
+	    $filedeps{$depfile} = [ &getMoreDeps( &getFullPath($depfile) ) ];
+	}
+
+	# See what other files $depfile depends on.
+	for $maybedepfile ( @{$filedeps{$depfile}} ) {
+	    $maybedepfile = &getFullPath($maybedepfile);
+	    if ( $maybedepfile ne '' ) {
+		print "\tWill also check file: $maybedepfile\n" if $debug;
+		# Do not process the newly found include lines here.
+		# Just add them to @depfiles to be processed by the
+		# while loop.
+		push( @depfiles, $maybedepfile )
+		    if ! defined $dset{$maybedepfile}
+	    }
+	}
+    }
+
+    @deps = sort(keys %dset);
+    for (@deps) { $_ = &fixName($_); }
+    print "$cfile depends on @deps\n" if $debug;
+    # Add SAMRAI_config.h because everything should depend on it,
+    # even though it is ignored for the purpose of finding dependencies.
+    # (It is ignored because it is generated at configure time.)
+    unshift @deps, '$(OBJECT)/include/SAMRAI/SAMRAI_config.h';
+    printDependencies( $FILENUMBER, $cfile, @deps );
+
+    $FILENUMBER=$FILENUMBER + 1;
+}
+
+
+sub getMoreDeps {
+    my $file = @_[0];
+    @deps = ();
+    if (open(DEPFILE, $file)) {
+	while ( <DEPFILE> ) {
+	    if ( s/^\s*\#\s*include\s*\"([^\"]+)\"\s*/\1/o
+		 && /[^\s]/o
+		 && ! /\.f$/o
+		 ) {
+		push( @deps, $_ )
+		}
+	}
+	close DEPFILE;
+	if ( $debug ) {
+	    print "\t\t$file is recursively dependent on\n";
+	    for ( @deps ) { print "\t\t\t$_\n"; }
+	}
+    }
+    else {
+	print "\t\tSkipping recursion on file: $file\n" if $debug;
+    }
+    return @deps;
+}
+
+sub getFullPath {
+   my $FILE    = shift(@_);
+
+   for (@INCPATH) {
+       print "checking if $_/$FILE is in SAMRAI source\n" if $debug;
+      if (-r "$_/$FILE") {
+         return( $_ ne '.' ? "$_/$FILE" : $FILE );
+      }
+   }
+
+   return("");
+}
+
+
+#
+# Print out data dependencies in a pleasing manner
+#
+
+sub printDependencies {
+   $FILENUMBER =  shift(@_);
+   my $SRC_FILE = shift(@_);
+   my @DEPS = @_;
+
+   @C_SOURCE_DEPS=();
+   @OTHER_DEPS=();
+
+   $SRC_FILE = fixName($SRC_FILE);
+   
+   my $LIBLINE = $SRC_FILE;
+   $LIBLINE =~ s/^(.*)\.[Cfc]/$1.o/o;
+   print OUTFILE "FILE_$FILENUMBER=$LIBLINE\n";
+
+
+
+
+   # Look for C files that are directly included by the 
+   # src file.  Always include a dependency on these files.
+
+   # Always always depend on the src file itself.
+   @src_C_files=();
+   push(@src_C_files, $SRC_FILE);
+   @src_include_files= getMoreDeps( &getFullPath($SRC_FILE) );
+   for(@src_include_files) {
+       if(/.*\.C/) {
+	   push(@src_C_files, "$_");
+       }
+   }
+   my $src_include_patterns = join '|', @src_C_files;
+
+   for(@DEPS) {
+       if (/$SRC_FILE/) { 
+	   # Always always depend on the src file itself.
+	   push(@OTHER_DEPS, $_);
+       } elsif (/$src_include_patterns/) { 
+	   # Always depend on C files included directly by 
+	   # the src file.
+	   push(@OTHER_DEPS, $_);
+       }
+       elsif (/.*\.[C]/) {
+	   push(@C_SOURCE_DEPS, $_);
+       } else {
+	   push(@OTHER_DEPS, $_);
+       }
+   }
+
+   
+
+   print OUTFILE "DEPENDS_$FILENUMBER:=\\\n";
+   printTabbedFiles(@OTHER_DEPS);
+   print OUTFILE "\n";
+   print OUTFILE "ifeq (\${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)\n";
+   print OUTFILE "DEPENDS_$FILENUMBER +=\\\n";
+   printTabbedFiles(@C_SOURCE_DEPS);
+   print OUTFILE "endif\n\n";
+   
+   $LIBLINE="\${FILE_$FILENUMBER:X.o=\${NDIM}.o}: \${DEPENDS_$FILENUMBER}";
+   print OUTFILE "$LIBLINE\n\n";
+}
+
+sub SGSJUNK {
+    my @JUNK = ("one", "two", "three");
+    return  @JUNK;
+}
+
+sub printTabbedFiles {
+   my @FILES = @_;
+   print OUTFILE "\t";
+   $CURLEN = $TABLEN;
+   for (@FILES) {
+      my $FILE = $_;
+      if (length($FILE)+$CURLEN >= $LINLEN) {
+         $NTAB = ($LINLEN-$CURLEN)/$TABLEN;
+         for ($i = 0; $i < $NTAB; $i++) {
+            print OUTFILE "\t";
+         }
+         print OUTFILE "\\\n";
+         print OUTFILE "\t";
+         $CURLEN = $TABLEN;
+      }
+      if ($CURLEN == $TABLEN) {
+         print OUTFILE "$FILE";
+         $CURLEN += length($FILE);
+      } else {
+         print OUTFILE " $FILE";
+         $CURLEN += length($FILE)+1;
+      }
+   }
+   print OUTFILE "\n";
+}
+
+
+#
+# Convert the filename to a print name - remove include path or ./ prefix
+#
+
+sub fixName {
+   $_ = shift(@_);
+   print "Fixing name $_\n" if $debug;
+   if ( m|(.*)/SAMRAI/(.*)$|o ) {
+      return("\$(INCLUDE_SAM)/SAMRAI/$2");
+   }
+   if ( m|/([^/]*)$|o ) {
+      return($1);
+   } else {
+      return($_);
+   }
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/scripts/indent.pl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/scripts/indent.pl	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,63 @@
+#!/usr/bin/perl
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   perl script to indent SAMRAI 
+##
+#########################################################################
+
+use strict;
+
+use File::Basename;
+use File::Find;
+use File::Path;
+use File::Compare;
+use Cwd;
+use Text::Wrap;
+use File::Copy;
+
+my $pwd = cwd;
+
+my $debug = 1;
+
+#
+# File pattern to look for
+#
+my $filePattern;
+my $fileExcludePattern;
+my $excludeDirPattern;
+
+my @allfiles = ();
+sub selectFile {
+    if ( $File::Find::dir =~ m!$excludeDirPattern! ) {
+	$File::Find::prune = 1;
+    }
+    elsif ( -f && m/$filePattern/ && ! m/$fileExcludePattern/ ) {
+	push @allfiles, $File::Find::name;
+	$allfiles[$#allfiles] =~ s|^\./||;
+    }
+}
+
+# Flush I/O on write to avoid buffering
+$|=1;
+
+
+my $end_of_line = $/;
+
+ at allfiles = ();
+$filePattern = q!(.*\.(([ChI]))$)!;
+$fileExcludePattern = q!(Grammar.[Ch]|Scanner.C)!;
+$excludeDirPattern=q!/(.svn|CVS|automatic|include)$!;
+find( \&selectFile, "." );
+print "files=@allfiles" if ($debug > 2);
+foreach my $file (@allfiles) {
+    print "Working on $file\n";
+    my $directory = dirname $file;
+
+    my $filebasename = basename $file;
+
+    system "uncrustify -l CPP -c source/scripts/uncrustify.cfg --replace $file";
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/scripts/make-template.pl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/scripts/make-template.pl	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,358 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   perl script to create template files for the SAMRAI repository 
+##
+#########################################################################
+
+#
+# Usage: perl make-template.pl <filename file> <directory> <template-class> <type>
+#        perl make-template.pl standard        ./          tbox::Array       double
+#        perl make-template.pl char            ./          tbox::Pointer     tbox::Array char*
+#
+# <filename file> is used to accumulate the names of the files generated for later
+# use in constructing the makefile.
+
+# This script should probably be reworked.  It does not handle templates
+# on more than one type very well and the NDIM handling is a 
+# bit of a kludge.
+
+#
+# Read the input directory, calculate the file name, and create the class
+#
+
+$OBJFILE = shift(@ARGV);
+$DIR   = shift(@ARGV);
+$PACKAGE  = shift(@ARGV);
+$FILE  = getFileName(@ARGV);
+$CLASS = getClassName(@ARGV);
+$_     = $CLASS;
+
+
+
+
+
+# Append the file generated to list of files
+open(OUTFILE, ">>$DIR/$OBJFILE") || die "Cannot open filename file $DIR/$OBJFILE";
+print OUTFILE "$FILE.C\n";
+close(OUTFILE);
+
+#
+# List classes require special static data member instantiation
+#
+
+if (/^tbox::List</ | /^List</) {
+   ($ITER = $CLASS) =~ s/List/ListIterator/;
+   ($NODE = $CLASS) =~ s/List/ListNode/;
+   open(OUTFILE, ">$DIR/$FILE.C") || die "Cannot open output file $DIR/$FILE.C";
+   printHeader($FILE, @ARGV);
+   if ($FILE =~ /HDFDatabase|VisItDataWriter/) {
+      print OUTFILE  "#ifdef HAVE_HDF5\n";
+   }
+   if ($FILE =~ /SiloDatabase/) {
+      print OUTFILE  "#ifdef HAVE_SILO\n";
+   }
+   print OUTFILE "#ifdef LACKS_STATIC_DATA_INSTANTIATION\n";
+   print OUTFILE "$NODE *$NODE\::s_free_list=0;\n";
+   print OUTFILE "bool $NODE\::s_registered_callback=false;\n";
+   print OUTFILE "#endif\n";
+   print OUTFILE "template class $CLASS;\n";
+   print OUTFILE "template class $ITER;\n";
+   print OUTFILE "template class $NODE;\n";
+   if ($FILE =~ /HDFDatabase|VisItDataWriter/) {
+      print OUTFILE  "#endif\n";
+   }
+   if ($FILE =~ /SiloDatabase/) {
+      print OUTFILE  "#endif\n";
+   }
+   printFooter();
+   close(OUTFILE);
+
+#
+# Special template instantiation for PETSc vector classes
+#
+
+} elsif (/^(PETScAbstractVectorReal|PETSc_SAMRAIVectorReal|SNES_SAMRAIContext)/) {
+   open(OUTFILE, ">$DIR/$FILE.C") || die "Cannot open output file $DIR/$FILE.C";
+   printHeader($FILE, @ARGV);
+   print OUTFILE "#ifdef HAVE_PETSC\n"; 
+   print OUTFILE "template class $CLASS;\n";
+   print OUTFILE "#endif\n";
+   printFooter();
+   close(OUTFILE);
+
+
+#
+# Special template instantiation for Hyper classes
+#
+
+} elsif (/^(CellPoissonHypreSolver)/) {
+   open(OUTFILE, ">$DIR/$FILE.C") || die "Cannot open output file $DIR/$FILE.C";
+   printHeader($FILE, @ARGV);
+   print OUTFILE "#ifdef HAVE_HYPRE\n"; 
+   print OUTFILE "template class $CLASS;\n";
+   print OUTFILE "#endif\n";
+   printFooter();
+   close(OUTFILE);
+
+
+#
+# Special template instantiation for KINSOL classes
+#
+
+} elsif (/^(KINSOL_SAMRAIContext)/) {
+   open(OUTFILE, ">$DIR/$FILE.C") || die "Cannot open output file $DIR/$FILE.C";
+   printHeader($FILE, @ARGV);
+   print OUTFILE "#ifdef HAVE_SUNDIALS\n"; 
+   print OUTFILE "template class $CLASS;\n";
+   print OUTFILE "#endif\n";
+   printFooter();
+   close(OUTFILE);
+
+#
+# Special template instantiation for Sundials classes
+#
+
+} elsif (/^(Sundials_SAMRAIVector)/) {
+   open(OUTFILE, ">$DIR/$FILE.C") || die "Cannot open output file $DIR/$FILE.C";
+   printHeader($FILE, @ARGV);
+   print OUTFILE "#ifdef HAVE_SUNDIALS\n"; 
+   print OUTFILE "template class $CLASS;\n";
+   print OUTFILE "#endif\n";
+   printFooter();
+   close(OUTFILE);
+
+
+} elsif (/^Box\</) {
+   ($ITER = $CLASS) =~ s/Box/BoxIterator/;
+   ($BASECLASS = $CLASS) =~ s/^(.*)\<(.*)\>/\1/;
+   open(OUTFILE, ">$DIR/$FILE.C") || die "Cannot open output file $DIR/$FILE.C";
+   printHeader($FILE, @ARGV);
+   if ($FILE =~ /HDF/) {
+      print OUTFILE  "#ifdef HAVE_HDF5\n";
+   }
+   if ($FILE =~ /Silo/) {
+      print OUTFILE  "#ifdef HAVE_SILO\n";
+   }
+   if ($FILE =~ /VisIt/) {
+      print OUTFILE  "#ifdef HAVE_HDF5\n";
+   }
+   print OUTFILE "template class $CLASS;\n";
+   print OUTFILE "template class $ITER;\n";
+   print OUTFILE "template std::istream& operator >> (std::istream& s, $BASECLASS<NDIM>& box);\n";
+   print OUTFILE "template std::ostream& operator << (std::ostream& s, const $BASECLASS<NDIM>& box);\n";
+
+   if ($FILE =~ /HDF/) {
+      print OUTFILE  "#endif\n";
+   }
+   if ($FILE =~ /Silo/) {
+      print OUTFILE  "#endif\n";
+   }
+   if ($FILE =~ /appu_VisIt/) {
+      print OUTFILE  "#endif\n";
+   }
+   printFooter();
+   close(OUTFILE);
+
+} elsif (/^IntVector\</) {
+   ($BASECLASS = $CLASS) =~ s/^(.*)\<(.*)\>/\1/;
+   open(OUTFILE, ">$DIR/$FILE.C") || die "Cannot open output file $DIR/$FILE.C";
+   printHeader($FILE, @ARGV);
+   if ($FILE =~ /HDF/) {
+      print OUTFILE  "#ifdef HAVE_HDF5\n";
+   }
+   if ($FILE =~ /Silo/) {
+      print OUTFILE  "#ifdef HAVE_SILO\n";
+   }
+   if ($FILE =~ /VisIt/) {
+      print OUTFILE  "#ifdef HAVE_HDF5\n";
+   }
+   print OUTFILE "template class $CLASS;\n";
+   print OUTFILE "template std::istream& operator >> (std::istream& s, $BASECLASS<NDIM>& box);\n";
+   print OUTFILE "template std::ostream& operator << (std::ostream& s, const $BASECLASS<NDIM>& box);\n";
+
+   if ($FILE =~ /HDF/) {
+      print OUTFILE  "#endif\n";
+   }
+   if ($FILE =~ /Silo/) {
+      print OUTFILE  "#endif\n";
+   }
+   if ($FILE =~ /VisIt/) {
+      print OUTFILE  "#endif\n";
+   }
+   printFooter();
+   close(OUTFILE);
+
+} elsif (/^PatchLevel\</) {
+   ($ITER = $CLASS) =~ s/PatchLevel/PatchLevelIterator/;
+   ($BASECLASS = $CLASS) =~ s/^(.*)\<(.*)\>/\1/;
+   open(OUTFILE, ">$DIR/$FILE.C") || die "Cannot open output file $DIR/$FILE.C";
+   printHeader($FILE, @ARGV);
+   if ($FILE =~ /HDF/) {
+      print OUTFILE  "#ifdef HAVE_HDF5\n";
+   }
+   if ($FILE =~ /Silo/) {
+      print OUTFILE  "#ifdef HAVE_SILO\n";
+   }
+   if ($FILE =~ /VisIt/) {
+      print OUTFILE  "#ifdef HAVE_HDF5\n";
+   }
+   print OUTFILE "template class $CLASS;\n";
+   print OUTFILE "template class $ITER;\n";
+   if ($FILE =~ /HDF/) {
+      print OUTFILE  "#endif\n";
+   }
+   if ($FILE =~ /Silo/) {
+      print OUTFILE  "#endif\n";
+   }
+   if ($FILE =~ /VisIt/) {
+      print OUTFILE  "#endif\n";
+   }
+   printFooter();
+   close(OUTFILE);
+
+#
+# Other templates do not require special treatment (except for HDF classes and VisIt classes, which use HDF)
+#
+} else {
+   open(OUTFILE, ">$DIR/$FILE.C") || die "Cannot open output file $DIR/$FILE.C";
+   printHeader($FILE, @ARGV);
+   if ($FILE =~ /HDF/) {
+      print OUTFILE  "#ifdef HAVE_HDF5\n";
+   }
+   if ($FILE =~ /Silo/) {
+      print OUTFILE  "#ifdef HAVE_SILO\n";
+   }
+   if ($FILE =~ /VisIt/) {
+      print OUTFILE  "#ifdef HAVE_HDF5\n";
+   }
+   print OUTFILE "template class $CLASS;\n";
+   if ($FILE =~ /HDF/) {
+      print OUTFILE  "#endif\n";
+   }
+   if ($FILE =~ /Silo/) {
+      print OUTFILE  "#endif\n";
+   }
+   if ($FILE =~ /VisIt/) {
+      print OUTFILE  "#endif\n";
+   }
+   printFooter();
+   close(OUTFILE);
+}
+
+#
+# Exit the script
+#
+
+exit(0);
+
+#
+# Construct a filename from the collection of class names
+#
+
+sub getFileName {
+   my $FILE = shift(@_);
+
+   $FILE =~ s/::/__/g;
+   $FILE =~ s/\,/_/g;
+
+   for (@_) {
+      (my $TYPE = $_) =~ s/\*/Pointer/g;
+      $TYPE =~ s/::/__/g;
+      $TYPE =~ s/\<|\>|\,/_/g;
+
+      $FILE .= "-$TYPE";
+
+   }
+
+   # If the file is NDIM based add X to the filename
+   # to pickup the correct build rule.
+   if ($FILE =~ /NDIM/) {
+       $FILE .= X;
+   }
+
+   return $FILE;
+}
+
+#
+# Generate the template class name (with brackets) from the name list
+#
+
+sub getClassName {
+   my $NAME = shift;
+   if ($#_ >= 0) {
+      $NAME .= "< ";
+      $NAME .= getClassName(@_);
+      $NAME .= " >";
+   }
+   return($NAME);
+}
+
+#
+# Print header information to OUTFILE (banner, includes, namespace)
+#
+
+sub printHeader {
+   my $FILE = shift(@_);
+   my $CLASS = shift(@_);
+
+   # classname comes after the package prefix (if any)
+   ($CLASSFILE = $CLASS) =~ s/(.*)::(.*)/\2/g;
+   $CLASSFILE = "SAMRAI/" . $PACKAGE . "/" . $CLASSFILE;
+
+   print OUTFILE <<_EOM_;
+//
+// File:	$FILE.C
+// Package:	SAMRAI templates
+// Copyright:	(c) 1997-2010 Lawrence Livermore National Security, LLC
+// Description:	Template file automatically generated by make-template.pl
+//
+
+#include "$CLASSFILE.h"
+#include "$CLASSFILE.C"
+_EOM_
+
+   # There may be comma seperated class lists so split them 
+   # apart so we can include each of the headers
+   @classes=split(/[\s,]/, join(" ", @_));
+   for (@classes) {
+       # strip off pointer for classnames
+       $_ =~ s/\*//g;
+       if (/^NDIM$/) {
+	   # NDIM is an int, no header required
+       } elsif (/dcomplex|NDIM\,dcomplex/) {
+	   print OUTFILE "#include \"SAMRAI/tbox/Complex.h\"\n";
+       } elsif (/string|NDIM\,string/) {
+	   print OUTFILE "#include <string>\nusing namespace std;\n";
+       } elsif (/NDIM\,.*/) {
+       } elsif (/^(.*)::(.*)\<NDIM\>$/) {
+	   print OUTFILE "#include \"SAMRAI/$1/$2.h\"\n";
+       } elsif (/^(.*)::(.*)\<NDIM\>::.*/) {
+	   print OUTFILE "#include \"SAMRAI/$1/$2.h\"\n";
+       } elsif (/^([^:]+)\<NDIM\>::.*/) {
+	   print OUTFILE "#include \"SGS SAMRAI/$PACKAGE/$1.h\"\n";
+       } elsif (/^([^:]+)::(.*)::(.*)/) {
+	   print OUTFILE "#include \"SAMRAI/$1/$2.h\"\n";
+       } elsif (/^([^:]+)::(.*)/) {
+	   print OUTFILE "#include \"SAMRAI/$1/$2.h\"\n";
+       } elsif (!/^(bool)|(char)|(double)|(float)|(int)$/) {
+	   print OUTFILE "#include \"SAMRAI/$PACKAGE/$_.h\"\n";
+       }
+   }
+   print OUTFILE "\n";
+
+   print OUTFILE "namespace SAMRAI {\n";
+   print OUTFILE "   namespace $PACKAGE {\n";
+}
+
+#
+# Print footer information to OUTFILE (closes the SAMRAI namespace)
+#
+
+sub printFooter {
+   print OUTFILE "}\n";
+   print OUTFILE "}\n";
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/scripts/memcheck
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/scripts/memcheck	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,138 @@
+#!/bin/sh -f
+# **************************************************************************
+# Tool to run valgrind to check for memory leaks
+# Loosely based on script in Tool Gear by John C. Gyllenhaal.
+# **************************************************************************
+
+BIN=`dirname $0`
+DIR=`cd $BIN && pwd`
+
+# Specify the valgrind version to use
+
+if [ "$SAMRAI_VALGRIND_EXE" == "" ];  then
+    SAMRAI_VALGRIND_EXE="valgrind"
+fi
+
+# Specify OpenMPI suppression file.
+OPENMPI_SUPPRESSION="${DIR}/openmpi-valgrind.supp" 
+
+# Specify SAMRAI suppression file (e.g. most MPI implementations generate
+# warnings that the user cannot do anything about, so filter them out)
+SAMRAI_SUPPRESSION="${DIR}/samrai.supp" 
+
+# Python uses a memory management scheme that causes scary warnings with
+# valgrind that are safe to ignore.   Always filter them out to prevent 
+# confusion.   Suppressions mainly tested with 64-bit x86. -JCG 1/12/09
+PYTHON_SUPPRESSION="${DIR}/python.supp" 
+
+# Get the valgrind version
+VALGRIND_VERSION=`${SAMRAI_VALGRIND_EXE} --version`
+
+if [ $? != 0 ]; then
+    VALGRIND_VERSION="(Unable to get valgrind version)"
+fi
+
+# Additional optional valgrind options turned on by default 
+# Some features require 3.3.0 and even 3.4.0 (beta tested for --trace-origins)
+# The LOG_FILE_OPTION changed in 3.3.0.
+case $VALGRIND_VERSION in
+    valgrind-3.5*)
+       # --read-var-info=yes caused some dwarf read errors (very noisy) so turn off for now
+       # --track-origins=yes : SGS this option caused failure
+       VALGRIND_OPTIONS="--error-limit=no --leak-check=full --show-reachable=yes --max-stackframe=16777216 --num-callers=50 --child-silent-after-fork=yes  --gen-suppressions=all"
+       LOG_FILE_OPTION="--log-file";;
+
+    *)
+       echo "Warning: Unknown valgrind version ($VALGRIND_VERSION), using 3.3.0 settings"
+       VALGRIND_OPTIONS="-v --error-limit=no --leak-check=full --show-reachable=yes --max-stackframe=16777216 --num-callers=50 --child-silent-after-fork=yes"
+       LOG_FILE_OPTION="--log-file";;
+esac   
+
+# Catch common user error, forgetting to put srun/mpirun before memcheck_all.
+# Also, get MPI environments RANK variable and put in MY_RANK so can
+# support multiple MPI runtimes
+
+# Get RANK variable for Quadrics elan3, if defined
+if [ "$RMS_RANK" != "" ];  then
+  MY_RANK="${RMS_RANK}"
+
+# Get RANK variable for MPIRUN based systems, if defined
+elif [ "${MPIRUN_RANK}" != "" ];  then
+  MY_RANK="${MPIRUN_RANK}"
+
+elif [ "${OMPI_COMM_WORLD_RANK}" != "" ]; then
+  MY_RANK="${OMPI_COMM_WORLD_RANK}"
+
+else
+   echo "Error: MPI RANK environment variable not set (RMS_RANK or MPIRUN_RANK)!"
+   echo "Usage: ${MPIRUN_SYNTAX} memcheck_all [extra-valgrind-args] command [args]";
+   echo "(Run memcheck_all with no arguments for more usage info.)"
+   exit 1;
+fi
+
+# Get a job id, may need to enhance for other systems
+if [ "$SLURM_JOBID" != "" ]; then
+    MY_JOBID="${SLURM_JOBID}"
+else
+    MY_JOBID=$$
+fi
+
+# Assume first argument that doesn't start with - is executable name
+EXE_NAME=""
+for MYARG in "$@"
+do
+    if [ "$EXE_NAME" = "" ]; then
+	case "$MYARG" in
+           -*)
+             IGNORE_OPTION=1;;
+           *)
+             # Use basename to get executable name without path
+             EXE_NAME=`basename $MYARG`
+             break;;
+        esac
+    fi
+done
+
+
+
+# Make sure we found a executable name
+if [ "$EXE_NAME" = "" ]; then
+   echo " "
+   echo "Error: Unable to find executable name in:"
+   echo "      '$@'"
+   echo "      Expect at least one argument that doesn't start with '-'"
+   echo "Usage: ${MPIRUN_SYNTAX} memcheck_all [extra-valgrind-args] command [args]";
+   echo "(Run memcheck_all with no arguments for more usage info.)"
+   exit 1;
+fi
+
+
+
+MPI_WRAPPER=/nfs/casc/samrai/valgrind/3.5.0/lib/valgrind/libmpiwrap-x86-linux.so
+#export LD_PRELOAD=${MPI_WRAPPER}
+
+export GLIBCXX_FORCE_NEW=1
+
+# Run Valgrind Memcheck on code
+# Use --log-file-exactly for 3.2.x otherwise pids get added in
+# Use --log-file instead of --log-file-exactly for 3.3.0 and later
+LOGFILE=${EXE_NAME}.${MY_JOBID}.${MY_RANK}.valgrind
+${SAMRAI_VALGRIND_EXE} --tool=memcheck \
+    ${LOG_FILE_OPTION}=${LOGFILE} \
+    --suppressions=${SAMRAI_SUPPRESSION} \
+    --suppressions=${OPENMPI_SUPPRESSION} \
+    --suppressions=${PYTHON_SUPPRESSION} \
+    ${VALGRIND_OPTIONS} \
+    "$@"
+
+RETURN_CODE=$?
+
+for STRING in "definitely lost:" "indirectly lost:" "possibly lost:" "still reachable:" "ERROR SUMMARY:"
+do
+    LOST=`grep "$STRING" ${LOGFILE} | awk '{print $4}'`
+    if [ $LOST != 0 ]; then
+	echo "FAILED : valgrind found memory leak : $STRING $LOST"
+    fi
+done
+
+exit ${RETURN_CODE}
diff -r 000000000000 -r 5eda1a3f24e8 source/scripts/object.pl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/scripts/object.pl	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,114 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   perl script to create Makefile.objects.tmp files from .C files 
+##
+#########################################################################
+
+#
+# Usage: object.pl <.C files>
+#
+
+#
+# Set up global directory information and output depend file
+#
+
+$TARGET = shift(@ARGV);
+ at FILES   = @ARGV;
+$DEPEND  = "Makefile.objects.tmp";
+
+$TABLEN  = 8;
+$LINLEN  = 72;
+
+#
+# Write an output object file that contains the .o files from the .C input
+#
+
+open(OUTFILE, ">>$DEPEND") || die "Cannot open output file $DEPEND...";
+
+$EMPTY="";
+
+if ($TARGET eq "libdefault") {
+    print OUTFILE "##\n";
+    print OUTFILE "## File:\tMakefile.objects\n";
+    print OUTFILE "## Package:\tSAMRAI\n";
+    print OUTFILE "## Copyright:\t(c) 1997-2010 Lawrence Livermore National Security, LLC\n";
+    print OUTFILE "## Release:\t\$N${EMPTY}ame:  \$\n";
+    print OUTFILE "## Revision:\t\$R${EMPTY}evision: \$\n";
+    print OUTFILE "## Modified:\t\$D${EMPTY}ate: \$\n";
+    print OUTFILE "## Description:\tmakefile objects\n";
+    print OUTFILE "##\n\n";
+}
+
+print OUTFILE "\n\n";
+
+ at FILES=sort(@FILES);
+
+# Reorder list of files by nested template level.  This is done so the
+#"real" templates are compiled before things like Pointers, Lists,
+#etc.
+
+for(@FILES) {
+
+    # Find number of "-" characters, this is the number of nested
+    #templates.
+
+    $string=$_;
+    $lookfor="-";
+    $template_depth=0;
+    $pos = $[;
+    while (( $pos = index($string,$lookfor,$pos)) >= $[) {
+	$pos++;
+	$template_depth++;
+    }
+
+    # Create 2D array ordered by template depth
+
+    push @{$SORTED_FILES[$template_depth]}, $string;
+}
+
+# Rebuild list of files with new order
+
+ at FILES=();
+for $template_depth (0 .. $#SORTED_FILES) {
+    @FILES = (@FILES, @{$SORTED_FILES[$template_depth]});
+}
+
+printObjects(@FILES);
+close(OUTFILE);
+
+#
+# Print out object data in a pleasing manner
+#
+
+sub printObjects {
+   my @OBJS = @_;
+
+   print OUTFILE "$TARGET:\t";
+   $CURLEN = $TABLEN;
+   for (@OBJS) {
+      $OBJ = $_;
+      $OBJ =~ s/^(.*)\.C/$1.o/;
+      $OBJ =~ s/X.o/\$\{NDIM\}\.o/;
+      if (length($OBJ)+$CURLEN >= $LINLEN) {
+         $NTAB = ($LINLEN-$CURLEN)/$TABLEN;
+         for ($i = 0; $i < $NTAB; $i++) {
+            print OUTFILE "\t";
+         }
+         print OUTFILE "\\\n";
+         print OUTFILE "\t";
+         $CURLEN = $TABLEN;
+      }
+      if ($CURLEN == $TABLEN) {
+         print OUTFILE "$OBJ";
+         $CURLEN += length($OBJ);
+      } else {
+         print OUTFILE " $OBJ";
+         $CURLEN += length($OBJ)+1;
+      }
+   }
+   print OUTFILE "\n";
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/scripts/object.sh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/scripts/object.sh	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,78 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   shell script to update Makefile.objects files for templates 
+##
+#########################################################################
+
+#
+# Generate object information in the template subdrectories
+#
+
+PERL=${PERL:-perl}
+DIFF="$PERL ../../../scripts/cmp.pl"
+OBJECTPL="$PERL ../../../../scripts/object.pl"
+
+SRCDIR=../$1
+DIR=$2
+rm -f $DIR/Makefile.objects.tmp
+
+#
+# Generate a Makefile.objects.tmp file in the specified directory
+#
+
+echo "Checking objects in directory "$DIR
+
+
+
+(cd $DIR; $OBJECTPL libdefault \
+    `cat $SRCDIR/default.filenames` \
+    `cat $SRCDIR/Double.filenames` \
+    `cat $SRCDIR/Integer.filenames`\
+    `cat $SRCDIR/double.filenames` \
+    `cat $SRCDIR/int.filenames` \
+    )
+
+(cd $DIR; $OBJECTPL libchar \
+    `cat $SRCDIR/char.filenames` \
+    )
+
+(cd $DIR; $OBJECTPL libbool \
+    `cat $SRCDIR/bool.filenames` \
+    )
+
+(cd $DIR; $OBJECTPL libfloat\
+    `cat $SRCDIR/float.filenames` \
+    `cat $SRCDIR/Float.filenames` \
+    )
+(cd $DIR; $OBJECTPL libdcomplex \
+    `cat $SRCDIR/dcomplex.filenames` \
+    `cat $SRCDIR/Complex.filenames` \
+    )
+
+#
+# If Makefile.objects does not exist, then create it
+#
+
+if [ ! -r $DIR/Makefile.objects ] ; then
+    echo "   creating "$DIR/Makefile.objects
+    mv -f $DIR/Makefile.objects.tmp $DIR/Makefile.objects
+    
+#
+# Otherwise, copy if the two files are not the same.  Remove the CVS
+# portions of the header to ignore changes in date/revision/modified.
+#
+
+else
+    if $DIFF $DIR/Makefile.objects.tmp $DIR/Makefile.objects; then
+	rm -f $DIR/Makefile.objects.tmp
+    else
+	echo "   updating "$DIR/Makefile.objects
+	mv -f $DIR/Makefile.objects.tmp $DIR/Makefile.objects
+    fi
+fi
+
+exit 0
diff -r 000000000000 -r 5eda1a3f24e8 source/scripts/openmpi-valgrind.supp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/scripts/openmpi-valgrind.supp	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,109 @@
+# -*- text -*-
+#
+# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
+#                         University Research and Technology
+#                         Corporation.  All rights reserved.
+# Copyright (c) 2004-2005 The University of Tennessee and The University
+#                         of Tennessee Research Foundation.  All rights
+#                         reserved.
+# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, 
+#                         University of Stuttgart.  All rights reserved.
+# Copyright (c) 2004-2005 The Regents of the University of California.
+#                         All rights reserved.
+# $COPYRIGHT$
+# 
+# Additional copyrights may follow
+# 
+# $HEADER$
+#
+
+###############################################################
+#
+# OPAL suppressions
+#
+###############################################################
+
+# weirdness in init routines on Gentoo
+{
+  linux_pthread_init
+  Memcheck:Leak
+  fun:calloc
+  fun:allocate_dtv
+  fun:_dl_allocate_tls_storage
+  fun:_dl_allocate_tls
+}
+{
+  linux_pthread_init2
+  Memcheck:Leak
+  fun:calloc
+  fun:_dl_tls_setup
+  fun:__pthread_initialize_minimal
+}
+{
+  linux_pthread_init3
+  Memcheck:Leak
+  fun:memalign
+  fun:_dl_allocate_tls_storage
+  fun:_dl_allocate_tls
+  fun:__pthread_initialize_minimal
+}
+
+# The event library leaves some blocks in use that we should clean up,
+# but it would require much changing of the event library, so it
+# really isn't worth it...
+{
+  event_lib_poll
+  Memcheck:Leak
+  fun:malloc
+  fun:realloc
+  fun:opal_realloc
+  fun:poll_dispatch
+}
+
+
+###############################################################
+#
+# ORTE suppressions
+#
+###############################################################
+
+# inet_ntoa on linux mallocs a static buffer.  We can't free 
+# it, so we have to live with it
+{
+  linux_inet_ntoa
+  Memcheck:Leak
+  fun:malloc
+  fun:inet_ntoa
+}
+{
+  linux_inet_ntoa_thread
+  Memcheck:Leak
+  fun:calloc
+  fun:pthread_setspecific
+  fun:inet_ntoa
+}
+
+
+###############################################################
+#
+# OMPI suppressions
+#
+###############################################################
+
+
+###############################################################
+#
+# Suppressions for various commonly-used packages
+#
+###############################################################
+
+# Portals reference implementation has a read from invalid issue
+{
+  portals_send
+  Memcheck:Param
+  socketcall.send(msg)
+  fun:send
+  fun:utcp_sendbytes
+  fun:utcp_sendto
+  fun:utcp_msg_wait
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/scripts/python.supp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/scripts/python.supp	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,114 @@
+# **************************************************************************
+#  Tool Gear (www.llnl.gov/CASC/tool_gear)
+#  Version 2.12                                               Jan 14, 2009
+#  Please see COPYRIGHT AND LICENSE information at the end of this file.
+# **************************************************************************
+# Based on python supplied valgrind suppression file, more informative
+# suppression name and tweaked for x86-64 messages. -JCG 12/8/2009
+{
+   PyObject_Free ADDRESS_IN_RANGE/Invalid read of size 4
+   Memcheck:Addr4
+   fun:PyObject_Free
+}
+
+{
+   PyObject_Free ADDRESS_IN_RANGE/Invalid read of size 4
+   Memcheck:Value4
+   fun:PyObject_Free
+}
+{
+   PyObject_Free Use of uninitialised value of size 8
+   Memcheck:Value8
+   fun:PyObject_Free
+}
+
+{
+   PyObject_Free ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
+   Memcheck:Cond
+   fun:PyObject_Free
+}
+{
+   PyObject_Realloc ADDRESS_IN_RANGE/Invalid read of size 4
+   Memcheck:Addr4
+   fun:PyObject_Realloc
+}
+
+{
+   PyObject_Realloc ADDRESS_IN_RANGE/Invalid read of size 4
+   Memcheck:Value4
+   fun:PyObject_Realloc
+}
+{
+   PyObject_Realloc ADDRESS_IN_RANGE/Invalid read of size 8
+   Memcheck:Value8
+   fun:PyObject_Realloc
+}
+
+{
+   PyObject_Realloc ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
+   Memcheck:Cond
+   fun:PyObject_Realloc
+}
+################################################################################
+# COPYRIGHT AND LICENSE
+# 
+# Copyright (c) 2009, The Regents of the University of California.
+# Produced at the Lawrence Livermore National Laboratory
+# Written by John Gyllenhaal (gyllen at llnl.gov), John May (johnmay at llnl.gov),
+# and Martin Schulz (schulz6 at llnl.gov).
+# UCRL-CODE-220834.
+# All rights reserved.
+# 
+# This file is part of Tool Gear.  For details, see www.llnl.gov/CASC/tool_gear.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# * Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the disclaimer below.
+# 
+# * Redistributions in binary form must reproduce the above copyright
+#   notice, this list of conditions and the disclaimer (as noted below) in
+#   the documentation and/or other materials provided with the distribution.
+# 
+# * Neither the name of the UC/LLNL nor the names of its contributors may
+#   be used to endorse or promote products derived from this software without
+#   specific prior written permission.
+# 
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF THE UNIVERSITY 
+# OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE 
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 
+# ADDITIONAL BSD NOTICE
+# 
+# 1. This notice is required to be provided under our contract with the 
+#    U.S. Department of Energy (DOE). This work was produced at the 
+#    University of California, Lawrence Livermore National Laboratory 
+#    under Contract No. W-7405-ENG-48 with the DOE.
+# 
+# 2. Neither the United States Government nor the University of California 
+#    nor any of their employees, makes any warranty, express or implied, 
+#    or assumes any liability or responsibility for the accuracy, completeness,
+#    or usefulness of any information, apparatus, product, or process disclosed,
+#    or represents that its use would not infringe privately-owned rights.
+# 
+# 3. Also, reference herein to any specific commercial products, process,
+#    or services by trade name, trademark, manufacturer or otherwise does not
+#    necessarily constitute or imply its endorsement, recommendation, or
+#    favoring by the United States Government or the University of California.
+#    The views and opinions of authors expressed herein do not necessarily
+#    state or reflect those of the United States Government or the University
+#    of California, and shall not be used for advertising or product
+#    endorsement purposes.
+################################################################################
+
diff -r 000000000000 -r 5eda1a3f24e8 source/scripts/samrai.supp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/scripts/samrai.supp	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,345 @@
+{
+   <OpenMPI issue>
+   Memcheck:Param
+   semctl(arg)
+   fun:semctl@@GLIBC_2.2
+   fun:nss_vas3_semctl
+   fun:get_sem_id
+   fun:get_tsd
+   fun:_nss_vas3_getXXent_get_tsd
+   fun:internal_nss_vas_getpwuid_r
+   fun:_nss_vas3_getpwuid_r
+   fun:getpwuid_r@@GLIBC_2.1.2
+   fun:getpwuid
+   fun:orte_session_dir_get_name
+   fun:orte_session_dir
+   fun:orte_ess_base_app_setup
+   fun:rte_init
+   fun:orte_init
+   fun:ompi_mpi_init
+   fun:PMPI_Init
+   ...
+}
+
+{
+   <OpenMPI issue>
+   Memcheck:Leak
+   fun:malloc
+   ...
+   fun:ompi_mpi_init
+   fun:PMPI_Init
+   ...
+}
+
+{
+   <OpenMPI issue>
+   Memcheck:Leak
+   fun:calloc
+   ...
+   fun:PMPI_Init
+   ...
+}
+
+{
+   <OpenMPI issue>
+   Memcheck:Leak
+   fun:malloc
+   ...
+   fun:PMPI_Finalize
+   ...
+}
+
+{
+   <OpenMPI issue>
+   Memcheck:Leak
+   fun:realloc
+   ...
+   fun:PMPI_Init
+   ...
+}
+
+
+
+{
+   <OpenMPI issue>
+   Memcheck:Leak
+   fun:calloc
+   ...
+   fun:PMPI_Init
+   ...
+}
+
+{
+   <OpenMPI issue>
+   Memcheck:Leak
+   fun:realloc
+   ...
+   fun:PMPI_Init
+   ...	
+}
+
+{
+   <OpenMPI issue>
+   Memcheck:Leak
+   fun:malloc
+   ...
+   fun:PMPI_Bcast
+   ...
+}
+
+{
+   <OpenMPI issue>
+   Memcheck:Leak
+   fun:realloc
+   ...
+   fun:PMPI_Bcast
+   ...
+}
+
+{
+   <OpenMPI issue>
+   Memcheck:Leak
+   fun:malloc
+   ...
+   fun:PMPI_Barrier
+   ...	
+}
+
+{
+   <OpenMPI was causing this>
+   Memcheck:Leak
+   fun:realloc
+   ...
+   fun:PMPI_Barrier	
+   ...
+}
+
+{
+   <OpenMPI was causing this>
+   Memcheck:Leak
+   fun:malloc
+   fun:opal_class_initialize
+   fun:opal_obj_new
+   fun:opal_obj_new_debug
+   fun:ompi_comm_register_cid
+   fun:ompi_comm_nextcid
+   fun:ompi_comm_dup
+   fun:PMPI_Comm_dup
+   ...
+}
+
+{
+   OpenMPI was causing this
+   Memcheck:Leak
+   fun:malloc
+   ...
+   fun:PMPI_Comm_dup
+   fun:_ZN6SAMRAI4tbox10SAMRAI_MPI4initEPiPPPc
+   ...
+}
+
+
+{
+   <insert_a_suppression_name_here>
+   Memcheck:Leak
+   fun:realloc
+   fun:expand_array
+   fun:save_class
+   fun:opal_class_initialize
+   fun:opal_obj_new
+   fun:opal_obj_new_debug
+   fun:ompi_comm_register_cid
+   fun:ompi_comm_nextcid
+   fun:ompi_comm_dup
+   fun:PMPI_Comm_dup
+   ...
+}
+
+{
+   <insert_a_suppression_name_here>
+   Memcheck:Leak
+   fun:malloc
+   ...
+   fun:ompi_comm_allreduce_intra
+   fun:ompi_comm_nextcid
+   fun:ompi_comm_dup
+   fun:PMPI_Comm_dup
+   fun:_ZN6SAMRAI4hier25OverlapConnectorAlgorithmC1Ev
+   ...
+}
+
+
+{
+   <OpenMPI was causing this>
+   Memcheck:Param
+   sched_setaffinity(mask)
+   fun:syscall
+}
+
+{
+   <OpenMPI issue with internal buffer>
+   Memcheck:Leak
+   fun:malloc
+   fun:opal_class_initialize
+   fun:ompi_free_list_grow
+   ...
+   fun:PMPI_Isend
+   ...
+}
+
+{
+   <OpenMPI issue with internal buffer>
+   Memcheck:Leak
+   fun:malloc
+   ...
+   fun:PMPI_Comm_dup
+   ...
+   fun:_ZN6SAMRAI4tbox13SAMRAIManager10initializeEP19ompi_communicator_tb
+   ...
+}
+
+
+{
+   <insert_a_suppression_name_here>
+   Memcheck:Param
+   writev(vector[...])
+   fun:writev
+   ...
+   fun:PMPI_Irecv
+   ...
+}
+
+
+{
+   <OpenMPI>
+   Memcheck:Param
+   writev(vector[...])
+   fun:writev
+   ...
+   fun:PMPI_Isend
+   ...
+}
+
+{
+   <OpenMPI>
+   Memcheck:Param
+   writev(vector[...])
+   fun:writev
+   ...
+   fun:PMPI_Test
+   ...
+}
+
+
+{
+   <OpenMPI>
+   Memcheck:Param
+   readv(vector[...])
+   ...
+   fun:PMPI_Waitsome
+   ...
+}
+
+{
+   <OpenMPI>
+   Memcheck:Param
+   writev(vector[...])
+   fun:writev
+   ...
+   fun:PMPI_Waitsome
+   ...
+}
+
+{
+   <OpenMPI>
+   Memcheck:Addr1
+   fun:memcpy
+   ...
+   fun:PMPI_Waitsome
+   ...
+}
+
+{
+   <OpenMPI>
+   Memcheck:Param
+   writev(vector[...])
+   fun:writev
+   ...
+   fun:PMPI_Isend
+   ...
+}
+
+{
+   <OpenMPI>
+   Memcheck:Param
+   writev(vector[...])
+   fun:writev
+   ...
+   fun:PMPI_Waitall
+   ...
+}
+
+
+{
+   <insert_a_suppression_name_here>
+   Memcheck:Leak
+   fun:malloc
+   fun:_gfortrani_get_mem
+   fun:_gfortrani_init_units
+   ...
+}
+
+
+{
+   <SGS This should be fixed?  What is hypre doing?>
+   Memcheck:Cond
+   fun:hypre_StructCoarsen
+   ...
+}
+
+{
+   <SGS PetSC issues Is this a real leak?>
+   Memcheck:Leak
+   fun:malloc
+   ...
+   fun:PMPI_Keyval_create
+   fun:PetscCommDuplicate
+   fun:PetscHeaderCreate_Private
+   fun:VecCreate
+}
+
+{
+   <SGS PetSC issues Is this a real leak?>
+   Memcheck:Leak
+   fun:malloc
+   ...
+   fun:PMPI_Keyval_create
+   fun:PetscViewerASCIIGetStdout
+   fun:VecView
+   ...
+}
+
+{
+   <SGS PetSC issues Is this a real leak?>
+   Memcheck:Leak
+   fun:malloc
+   ...
+   fun:PMPI_Keyval_create
+   fun:PetscViewerASCIIOpen
+   fun:PetscViewerASCIIGetStdout
+   fun:VecView
+   ...
+}
+
+{
+   <SGS PetSC issues Is this a real leak?>
+   Memcheck:Leak
+   fun:malloc
+   ...
+   fun:VecInitializePackage
+   fun:VecCreate
+   ...	
+}
+
+
+
diff -r 000000000000 -r 5eda1a3f24e8 source/scripts/source_manipulation/findClassNames.pl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/scripts/source_manipulation/findClassNames.pl	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,85 @@
+#! /usr/bin/perl
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   perl script to update Xd sed files to templates on DIM 
+##
+#########################################################################
+
+use File::Basename;
+use File::Find;
+use Cwd;
+
+my $pwd = cwd;
+#die basename($0) . " should not be run from your current directory"
+#    if $pwd =~ m:\b(examples|source/test|source/scripts)(/|$):;
+
+
+my $debug = 0;
+
+#
+# Read in sed.data to get the substitution patterns for X strings.
+#
+
+#
+# Get prefix pattern to look for, or use default prefix pattern.
+#
+
+my $prepat;
+$prepat = q|(.*\.h(.sed)?$)|;
+print "prepat: $prepat\n" if ( $debug > 0 );
+
+
+#
+# Find the h files to search
+#
+
+ at allfiles = ();
+sub selectXfile {
+    # This subroutine selects the X files in a find command.
+    # print "-$File::Find::dir- -$File::Find::name-\n";
+#    if ( $File::Find::dir =~ m!/(examples|source/test|source/scripts|CVS|[123]d)$!o ) {
+
+    if ( $File::Find::dir =~ m!/(.svn|CVS|[123]d)$!o ) {
+	# print "pruned\n";
+	$File::Find::prune = true;
+    }
+    elsif ( -f && m/$prepat/o ) {
+	push @allfiles, $File::Find::name;
+	$allfiles[$#allfiles] =~ s|^\./||o;
+    }
+}
+print "Scanning...\n" if ( $debug > 0 );
+find( \&selectXfile, '.' );
+print "Done.\n" if ( $debug > 0 );
+
+for $xfile (@allfiles) {
+#    print "Working on $xfile\n";
+    $xdir = dirname $xfile;
+    print "xdir: $xdir\n" if ( $debug > 0 );
+
+    print "File Suffix " . substr($dfile, -1, 1) . "\n" if ($debug > 0);
+    print "dfile: $dfile\n" if ( $debug > 0 );
+    
+    open XF, "< $xfile" || die "Cannot open file $xfile";
+    while ( <XF> ) {
+	# This strips off comments 
+	$/ = undef;
+	s#/\*[^*]*\*+([^/*][^*]*\*+)*/|//[^\n]*|("(\\.|[^"\\])*"|'(\\.|[^'\\])*'|.[^/"'\\]*)#$2#gs;  
+
+	if ( m/.*class(\s+)(\w+)(\s+).*/g ) {
+	    print "$2\n";
+	}
+
+    }
+
+    close XF || die "Cannot close file $xfile";
+}
+
+
+
+
+
diff -r 000000000000 -r 5eda1a3f24e8 source/scripts/source_manipulation/findHeaderFiles
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/scripts/source_manipulation/findHeaderFiles	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,18 @@
+#!/bin/sh
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/scripts/source_manipulation/findHeaderFiles $
+## Package:     SAMRAI scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 3894 $
+## Modified:    $LastChangedDate: 2010-05-10 15:24:14 -0700 (Mon, 10 May 2010) $
+## Description: Find all header files
+##
+
+BIN=`dirname $0`
+cd `dirname $0`/../../../source || exit 1;
+echo `pwd`
+test -d "hierarchy/patches" || exit 1
+
+perl scripts/source_manipulation/findHeaderFiles.pl > scripts/source_manipulation/headers.data
+
+exit
diff -r 000000000000 -r 5eda1a3f24e8 source/scripts/source_manipulation/findHeaderFiles.pl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/scripts/source_manipulation/findHeaderFiles.pl	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,86 @@
+#! /usr/bin/perl
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   perl script to update Xd sed files to templates on DIM 
+##
+#########################################################################
+
+use File::Basename;
+use File::Find;
+use Cwd;
+
+%directory_to_package = (
+			 'apputils', 'appu',
+			 'algorithm', 'algs',
+			 'solvers', 'solv', 
+			 'geometry', 'geom',
+			 'multiblock', 'mblk',
+			 'mesh', 'mesh',
+			 'mathops', 'math',
+			 'patchdata', 'pdat',
+			 'transfer', 'xfer', 
+			 'hierarchy', 'hier',
+			 'toolbox', 'tbox', 
+			 );
+
+my $pwd = cwd;
+#die basename($0) . " should not be run from your current directory"
+#    if $pwd =~ m:\b(examples|source/test|source/scripts)(/|$):;
+
+
+my $debug = 0;
+
+#
+# Read in sed.data to get the substitution patterns for X strings.
+#
+
+#
+# Get prefix pattern to look for, or use default prefix pattern.
+#
+
+my $prepat;
+$prepat = q|(.*\.h(.sed)?$)|;
+print "prepat: $prepat\n" if ( $debug > 0 );
+
+
+#
+# Find the h files to search
+#
+
+ at allfiles = ();
+sub selectXfile {
+    # This subroutine selects the X files in a find command.
+    # print "-$File::Find::dir- -$File::Find::name-\n";
+#    if ( $File::Find::dir =~ m!/(examples|source/test|source/scripts|CVS|[123]d)$!o ) {
+
+    if ( $File::Find::dir =~ m!/(test|.svn|CVS|[123]d)$!o ) {
+	# print "pruned\n";
+	$File::Find::prune = true;
+    }
+    elsif ( -f && m/$prepat/o ) {
+	push @allfiles, $File::Find::name;
+	$allfiles[$#allfiles] =~ s|^\./||o;
+    }
+}
+print "Scanning...\n" if ( $debug > 0 );
+find( \&selectXfile, '.' );
+print "Done.\n" if ( $debug > 0 );
+
+my $debug=1;
+
+for $f (@allfiles) {
+
+    ($name,$path,$suffix) = fileparse($f, at suffixlist);
+
+    ($packdir = $path) =~ s/(.*?)\/.*/\1/;
+
+    
+    $pack = $directory_to_package{$packdir};
+
+    print "$pack $name\n" if $debug;
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/scripts/source_manipulation/headers.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/scripts/source_manipulation/headers.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,374 @@
+appu VisDerivedDataStrategy.h
+appu VisMaterialsDataStrategy.h
+appu CartesianVizamraiDataWriter.h
+appu VisItDataWriter.h
+appu BoundaryUtilityStrategy.h
+appu CartesianBoundaryDefines.h
+appu CartesianBoundaryUtilities2.h
+appu CartesianBoundaryUtilities3.h
+xfer CoarsenAlgorithm.h
+xfer CoarsenClasses.h
+xfer CoarsenCopyTransaction.h
+xfer CoarsenOperator.h
+xfer CoarsenPatchStrategy.h
+xfer CoarsenSchedule.h
+xfer FillBoxSet.h
+xfer Geometry.h
+xfer RefineAlgorithm.h
+xfer RefineClasses.h
+xfer RefineCopyTransaction.h
+xfer RefineOperator.h
+xfer RefinePatchStrategy.h
+xfer RefineSchedule.h
+xfer RefineTimeTransaction.h
+xfer TimeInterpolateOperator.h
+xfer TransactionFactory.h
+mblk MBUtilities.h
+mblk MultiblockCoarsenSchedule.h
+mblk MultiblockRefineAlgorithm.h
+mblk MultiblockGriddingTagger.h
+mblk MultiblockPatchStrategy.h
+mblk MultiblockRefineSchedule.h
+mblk MultiblockPatchLevel.h
+mblk MultiblockGriddingAlgorithm.h
+mblk MultiblockPatchHierarchy.h
+mblk MBDataUtilities.h
+mblk MultiblockCoarsenAlgorithm.h
+algs HyperbolicPatchStrategy.h
+algs HyperbolicLevelIntegrator.h
+algs ImplicitIntegrator.h
+algs ImplicitEquationStrategy.h
+algs TimeRefinementIntegrator.h
+algs TimeRefinementLevelStrategy.h
+algs MethodOfLinesIntegrator.h
+algs MethodOfLinesPatchStrategy.h
+tbox Clock.h
+tbox Statistician.h
+tbox Statistic.h
+tbox TimerManager.h
+tbox Timer.h
+tbox StatTransaction.h
+tbox DatabaseBox.h
+tbox Database.h
+tbox Serializable.h
+tbox InputManager.h
+tbox Parser.h
+tbox InputDatabase.h
+tbox Grammar.h
+tbox MemoryUtilities.h
+tbox StandardArena.h
+tbox DescribedClass.h
+tbox PointerBase.h
+tbox ConstPointer.h
+tbox ReferenceCounter.h
+tbox ScratchArena.h
+tbox FixedArena.h
+tbox Array.h
+tbox Pointer.h
+tbox ArenaManager.h
+tbox ConstPointerBase.h
+tbox Arena.h
+tbox ShutdownRegistry.h
+tbox IEEE.h
+tbox Complex.h
+tbox SAMRAIManager.h
+tbox List.h
+tbox Utilities.h
+tbox Boolean.h
+tbox Tracer.h
+tbox MathUtilities.h
+tbox ParallelBuffer.h
+tbox PIO.h
+tbox NullDatabase.h
+tbox RestartManager.h
+tbox HDFDatabase.h
+tbox FileStream.h
+tbox MessageStream.h
+tbox XDRStream.h
+tbox MessageStream.h
+tbox IOStream.h
+tbox Schedule.h
+tbox RelaunchableJob.h
+tbox AsyncCommGroup.h
+tbox AsyncCommStage.h
+tbox JobRelauncher.h
+tbox MPI.h
+tbox Transaction.h
+pdat CellIterator.h
+pdat CellDataFactory.h
+pdat CellIndex.h
+pdat CellData.h
+pdat CellVariable.h
+pdat SideVariable.h
+pdat SideIterator.h
+pdat SideDataFactory.h
+pdat SideIndex.h
+pdat SideData.h
+pdat NodeVariable.h
+pdat NodeIterator.h
+pdat NodeDataFactory.h
+pdat NodeIndex.h
+pdat NodeData.h
+pdat FaceVariable.h
+pdat FaceIterator.h
+pdat FaceDataFactory.h
+pdat FaceIndex.h
+pdat FaceData.h
+pdat OutersideVariable.h
+pdat OutersideData.h
+pdat OutersideDataFactory.h
+pdat OuternodeVariable.h
+pdat OuternodeData.h
+pdat OuternodeDataFactory.h
+pdat EdgeIndex.h
+pdat EdgeData.h
+pdat EdgeVariable.h
+pdat EdgeIterator.h
+pdat EdgeDataFactory.h
+pdat OuterfaceGeometry.h
+pdat NodeGeometry.h
+pdat FaceGeometry.h
+pdat SideOverlap.h
+pdat NodeOverlap.h
+pdat OutersideGeometry.h
+pdat CellGeometry.h
+pdat EdgeOverlap.h
+pdat SideGeometry.h
+pdat CellOverlap.h
+pdat OuternodeGeometry.h
+pdat EdgeGeometry.h
+pdat FaceOverlap.h
+pdat IndexDataFactory.h
+pdat IndexVariable.h
+pdat IndexData.h
+pdat OuterfaceDataFactory.h
+pdat OuterfaceVariable.h
+pdat OuterfaceData.h
+pdat CellDoubleLinearTimeInterpolateOp.h
+pdat CellFloatLinearTimeInterpolateOp.h
+pdat CellComplexLinearTimeInterpolateOp.h
+pdat OutersideComplexLinearTimeInterpolateOp.h
+pdat OutersideFloatLinearTimeInterpolateOp.h
+pdat OutersideDoubleLinearTimeInterpolateOp.h
+pdat EdgeFloatLinearTimeInterpolateOp.h
+pdat EdgeComplexLinearTimeInterpolateOp.h
+pdat EdgeDoubleLinearTimeInterpolateOp.h
+pdat SideFloatLinearTimeInterpolateOp.h
+pdat SideComplexLinearTimeInterpolateOp.h
+pdat SideDoubleLinearTimeInterpolateOp.h
+pdat NodeFloatLinearTimeInterpolateOp.h
+pdat NodeComplexLinearTimeInterpolateOp.h
+pdat NodeDoubleLinearTimeInterpolateOp.h
+pdat OuterfaceComplexLinearTimeInterpolateOp.h
+pdat OuterfaceFloatLinearTimeInterpolateOp.h
+pdat OuterfaceDoubleLinearTimeInterpolateOp.h
+pdat FaceDoubleLinearTimeInterpolateOp.h
+pdat FaceFloatLinearTimeInterpolateOp.h
+pdat FaceComplexLinearTimeInterpolateOp.h
+pdat CellComplexConstantRefine.h
+pdat CellDoubleConstantRefine.h
+pdat CellIntegerConstantRefine.h
+pdat CellFloatConstantRefine.h
+pdat EdgeFloatConstantRefine.h
+pdat EdgeComplexConstantRefine.h
+pdat EdgeDoubleConstantRefine.h
+pdat EdgeIntegerConstantRefine.h
+pdat OuternodeDoubleConstantCoarsen.h
+pdat SideFloatConstantRefine.h
+pdat SideComplexConstantRefine.h
+pdat SideDoubleConstantRefine.h
+pdat SideIntegerConstantRefine.h
+pdat NodeFloatConstantAverage.h
+pdat NodeComplexConstantAverage.h
+pdat NodeDoubleConstantAverage.h
+pdat NodeIntegerConstantAverage.h
+pdat OuterfaceDoubleConstantRefine.h
+pdat OuterfaceIntegerConstantRefine.h
+pdat OuterfaceFloatConstantRefine.h
+pdat OuterfaceComplexConstantRefine.h
+pdat FaceComplexConstantRefine.h
+pdat FaceDoubleConstantRefine.h
+pdat FaceIntegerConstantRefine.h
+pdat FaceFloatConstantRefine.h
+pdat ArrayDataIterator.h
+pdat ArrayData.h
+geom SkeletonPatchGeometry.h
+geom SkeletonGridGeometry.h
+geom SkeletonRefine.h
+geom SkeletonCoarsen.h
+geom CartesianPatchGeometry.h
+geom CartesianGridGeometry.h
+geom CartesianCellComplexWeightedAverage.h
+geom CartesianCellFloatWeightedAverage.h
+geom CartesianCellFloatConservativeLinearRefine.h
+geom CartesianCellDoubleWeightedAverage.h
+geom CartesianCellComplexConservativeLinearRefine.h
+geom CartesianCellDoubleConservativeLinearRefine.h
+geom CartesianCellFloatLinearRefine.h
+geom CartesianCellComplexLinearRefine.h
+geom CartesianCellDoubleLinearRefine.h
+geom CartesianOutersideDoubleWeightedAverage.h
+geom CartesianEdgeFloatWeightedAverage.h
+geom CartesianEdgeDoubleConservativeLinearRefine.h
+geom CartesianEdgeFloatConservativeLinearRefine.h
+geom CartesianEdgeComplexWeightedAverage.h
+geom CartesianEdgeDoubleWeightedAverage.h
+geom CartesianSideFloatWeightedAverage.h
+geom CartesianSideDoubleConservativeLinearRefine.h
+geom CartesianSideFloatConservativeLinearRefine.h
+geom CartesianSideComplexWeightedAverage.h
+geom CartesianSideDoubleWeightedAverage.h
+geom CartesianNodeFloatLinearRefine.h
+geom CartesianNodeComplexLinearRefine.h
+geom CartesianNodeDoubleLinearRefine.h
+geom CartesianOuterfaceFloatWeightedAverage.h
+geom CartesianOuterfaceComplexWeightedAverage.h
+geom CartesianOuterfaceDoubleWeightedAverage.h
+geom CartesianFaceComplexWeightedAverage.h
+geom CartesianFaceFloatWeightedAverage.h
+geom CartesianFaceFloatConservativeLinearRefine.h
+geom CartesianFaceDoubleWeightedAverage.h
+geom CartesianFaceDoubleConservativeLinearRefine.h
+math PatchCellDataOpsInteger.h
+math HierarchyCellDataOpsReal.h
+math PatchCellDataNormOpsComplex.h
+math PatchCellDataMiscellaneousOpsReal.h
+math PatchCellDataOpsComplex.h
+math HierarchyCellDataOpsInteger.h
+math PatchCellDataNormOpsReal.h
+math PatchCellDataBasicOps.h
+math PatchCellDataOpsReal.h
+math HierarchyCellDataOpsComplex.h
+math HierarchyEdgeDataOpsInteger.h
+math PatchEdgeDataNormOpsReal.h
+math PatchEdgeDataBasicOps.h
+math PatchEdgeDataOpsReal.h
+math HierarchyEdgeDataOpsComplex.h
+math PatchEdgeDataOpsInteger.h
+math PatchEdgeDataNormOpsComplex.h
+math HierarchyEdgeDataOpsReal.h
+math PatchEdgeDataMiscellaneousOpsReal.h
+math PatchEdgeDataOpsComplex.h
+math PatchSideDataOpsInteger.h
+math HierarchySideDataOpsReal.h
+math PatchSideDataNormOpsComplex.h
+math PatchSideDataMiscellaneousOpsReal.h
+math PatchSideDataOpsComplex.h
+math HierarchySideDataOpsInteger.h
+math PatchSideDataNormOpsReal.h
+math PatchSideDataBasicOps.h
+math PatchSideDataOpsReal.h
+math HierarchySideDataOpsComplex.h
+math PatchNodeDataOpsInteger.h
+math HierarchyNodeDataOpsReal.h
+math PatchNodeDataNormOpsComplex.h
+math PatchNodeDataMiscellaneousOpsReal.h
+math PatchNodeDataOpsComplex.h
+math HierarchyNodeDataOpsInteger.h
+math PatchNodeDataNormOpsReal.h
+math PatchNodeDataBasicOps.h
+math PatchNodeDataOpsReal.h
+math HierarchyNodeDataOpsComplex.h
+math ArrayDataNormOpsReal.h
+math ArrayDataBasicOps.h
+math ArrayDataMiscellaneousOpsReal.h
+math ArrayDataNormOpsComplex.h
+math ArrayDataNormOpsInteger.h
+math PatchFaceDataNormOpsReal.h
+math PatchFaceDataBasicOps.h
+math PatchFaceDataOpsReal.h
+math HierarchyFaceDataOpsComplex.h
+math PatchFaceDataOpsInteger.h
+math PatchFaceDataNormOpsComplex.h
+math HierarchyFaceDataOpsReal.h
+math PatchFaceDataMiscellaneousOpsReal.h
+math PatchFaceDataOpsComplex.h
+math HierarchyFaceDataOpsInteger.h
+math HierarchyDataOpsReal.h
+math HierarchyDataOpsComplex.h
+math HierarchyDataOpsManager.h
+math HierarchyDataOpsInteger.h
+mesh AsyncBergerRigoutsosNode.h
+mesh LayerNodeSet.h
+mesh HistogramBox.h
+mesh LayerHierarchy.h
+mesh LayerEdgeSet.h
+mesh BoxGeneratorStrategy.h
+mesh LayerNode.h
+mesh AsyncBergerRigoutsos.h
+mesh BergerRigoutsos.h
+mesh BalanceUtilities.h
+mesh SpatialKey.h
+mesh LoadBalancer.h
+mesh LoadBalanceStrategy.h
+mesh BaseGriddingAlgorithm.h
+mesh GriddingAlgorithm.h
+mesh StandardTagAndInitialize.h
+mesh TagAndInitializeStrategy.h
+mesh StandardTagAndInitStrategy.h
+solv NonlinearSolverStrategy.h
+solv Sundials_SAMRAIVector.h
+solv PETSc_SAMRAIVectorReal.h
+solv SAMRAIVectorReal.h
+solv OuternodeSumTransaction.h
+solv PatchBoundaryNodeSum.h
+solv OuternodeSumAlgorithm.h
+solv OuternodeSumTransactionFactory.h
+solv FACPreconditioner.h
+solv FACOperatorStrategy.h
+solv CellPoissonHypreSolver.h
+solv RobinBcCoefStrategy.h
+solv CellPoissonFACSolver.h
+solv GhostCellRobinBcCoefs.h
+solv CartesianRobinBcHelper.h
+solv SimpleCellRobinBcCoefs.h
+solv PoissonSpecifications.h
+solv LocationIndexRobinBcCoefs.h
+solv CellPoissonFACOps.h
+solv KINSOLSolver.h
+solv KINSOLAbstractFunctions.h
+solv KINSOL_SAMRAIContext.h
+solv nvector.h
+solv SundialsAbstractVector.h
+solv solv_NVector.h
+solv CVODEAbstractFunctions.h
+solv CVODESolver.h
+solv PETScAbstractVectorReal.h
+solv SNES_SAMRAIContext.h
+solv SNESAbstractFunctions.h
+hier BoxTree.h
+hier BoxTop.h
+hier BoxTreeNode.h
+hier BoxUtilities.h
+hier BoxList.h
+hier BoxArray.h
+hier Box.h
+hier BoxComm.h
+hier BoxIOUtility.h
+hier BoxGraphUtilities.h
+hier Index.h
+hier BoxGraph.h
+hier IntVector.h
+hier VariableDatabase.h
+hier BoundaryBox.h
+hier Patch.h
+hier Variable.h
+hier BasePatchHierarchy.h
+hier BinaryTree.h
+hier PatchGeometry.h
+hier CoarseFineBoundary.h
+hier BoundaryLookupTable.h
+hier PatchData.h
+hier PatchHierarchy.h
+hier GridGeometry.h
+hier ComponentSelector.h
+hier BoxGeometry.h
+hier BasePatchLevel.h
+hier VariableContext.h
+hier ProcessorMapping.h
+hier PatchDescriptor.h
+hier PatchLevelFactory.h
+hier PatchDataFactory.h
+hier BoxOverlap.h
+hier PatchLevel.h
+hier PatchFactory.h
diff -r 000000000000 -r 5eda1a3f24e8 source/scripts/source_manipulation/removeNameKeyword.pl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/scripts/source_manipulation/removeNameKeyword.pl	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,77 @@
+#!/usr/apps/bin/perl
+
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   $Description 
+##
+#########################################################################
+
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/scripts/source_manipulation/removeNameKeyword.pl $
+## Package:     SAMRAI application
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 4349 $
+## Modified:    $LastChangedDate: 2010-12-06 13:26:09 -0800 (Mon, 06 Dec 2010) $
+## Description: Script in source-manipulation utility.
+
+
+# This script removes the <DIM> from constructor method names
+
+require "find.pl";
+use Cwd;
+use File::Basename;
+use Fcntl ':mode';
+
+&find('.');
+
+exit;
+
+sub wanted {
+    if ($File::Find::dir =~ m/.svn/o ) {
+	$File::Find::prune = true;
+    } elsif ( m/.svn/ ) {
+    } elsif ( -f ) {
+	doit($name);
+    }
+}
+
+sub doit {
+    my ($filename) = shift;
+    print("$filename\n") if $debug;
+
+    # The doit is invoked in the subdir so need to strip off 
+    # the directory
+    $filename=basename $filename;
+
+    $ofilename=$filename . ".tmp";
+
+    $mode = S_IMODE((stat($filename))[2]);
+
+    stat($filename);
+    if( -x _ ) {
+	$executable=1;
+    } else{
+	$executable=0;
+    }
+
+    open(IN, $filename) || die "Cannot open input file $filename : $!";
+    open OUT, "> $ofilename" || die "Cannot open output file $ofilename";
+
+     while (<IN>) {
+	 } else {
+	     print OUT;
+	 }
+     }
+
+     close IN  || die "Cannot close file $filename";
+     close OUT || die "Cannot close file $ofilename";
+
+    unlink($filename);
+    rename($ofilename, $filename);
+
+    chmod $mode, $filename;
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/scripts/source_manipulation/replaceIncludeGuards
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/scripts/source_manipulation/replaceIncludeGuards	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,17 @@
+#!/bin/sh
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/scripts/source_manipulation/replaceIncludeGuards $
+## Package:     SAMRAI scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 3894 $
+## Modified:    $LastChangedDate: 2010-05-10 15:24:14 -0700 (Mon, 10 May 2010) $
+## Description: shell script to convert 1.x codes to 2.0
+##
+
+BIN=`dirname $0`
+
+$BIN/findHeaderFiles
+
+perl $BIN/replaceIncludeGuards.pl 
+
+exit
diff -r 000000000000 -r 5eda1a3f24e8 source/scripts/source_manipulation/replaceIncludeGuards.pl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/scripts/source_manipulation/replaceIncludeGuards.pl	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,116 @@
+#! /usr/bin/perl
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   perl script to update Xd sed files to templates on DIM 
+##
+#########################################################################
+
+use File::Basename;
+use File::Find;
+use Cwd;
+
+#
+# Disallow running from certain directories.
+#
+
+my $pwd = cwd;
+#die basename($0) . " should not be run from your current directory"
+#    if $pwd =~ m:\b(examples|source/test|source/scripts)(/|$):;
+
+my $debug = 0;
+
+#
+# Read in sed.data to get the substitution patterns for X strings.
+#
+
+my $datfile = (dirname $0) . "/headers.data";
+print "datfile: $datfile\n" if ( $debug > 0 );
+open(DATFILE, "$datfile") || die "Cannot open input sed file $datfile";
+while (<DATFILE>) {
+    if ( m/^\#/o ) {
+    } else {
+	if ( m/(\w*)\s+(\w*)/o ){ 
+	    $header_to_package{$2} = $1;
+	    push @hpattern, $2;
+	}
+    }
+    
+}
+close(DATFILE);
+
+my $headerpatterns = join '|', @hpattern;
+print "hpatterns = $headerpatterns\n" if $debug;
+
+#
+# Get prefix pattern to look for, or use default prefix pattern.
+#
+
+my $prepat;
+$prepat = q|(.*\.[ChI](.sed)?$)|;
+print "prepat: $prepat\n" if ( $debug > 0 );
+
+
+#
+# Find the X files to convert.
+#
+
+ at allfiles = ();
+sub selectXfile {
+    # This subroutine selects the X files in a find command.
+    # print "-$File::Find::dir- -$File::Find::name-\n";
+#    if ( $File::Find::dir =~ m!/(examples|source/test|source/scripts|CVS|[123]d)$!o ) {
+
+    if ( $File::Find::dir =~ m!/(.svn|CVS|[123]d)$!o ) {
+	# print "pruned\n";
+	$File::Find::prune = true;
+    }
+    elsif ( -f && m/$prepat/o ) {
+	push @allfiles, $File::Find::name;
+	$allfiles[$#allfiles] =~ s|^\./||o;
+    }
+}
+print "Scanning...\n" if ( $debug > 0 );
+find( \&selectXfile, '.' );
+print "Done.\n" if ( $debug > 0 );
+
+for $xfile (@allfiles) {
+    print "Working on $xfile\n" if $debug;
+    $xdir = dirname $xfile;
+    print "xdir: $xdir\n" if ( $debug > 0 );
+
+    ( $dfile = basename $xfile ) =~ s/(.*)X([-\.].*)\.sed$/\1X\2/o;
+    $dfile .= ".tmp";
+
+    print "File Suffix " . substr($dfile, -1, 1) . "\n" if ($debug > 0);
+    print "dfile: $dfile\n" if ( $debug > 0 );
+    
+    open XF, "< $xfile" || die "Cannot open file $xfile";
+    open TF, "> $dfile" || die "Cannot open file $tpath";
+    while ( <XF> ) {
+
+	if ( m/included\_($headerpatterns)/o ) {
+	    $pack=$header_to_package{$1};
+	    s/included\_($allSimplepatterns)/included_$pack\_$1/go;
+	    print TF;
+	} else {
+	    print TF;
+	}
+    }
+
+    close XF || die "Cannot close file $xfile";
+    close TF || die "Cannot close file $dfile";
+
+    printf "unlink $xfile\n"  if ( $debug > 0 );
+    unlink($xfile);
+    printf "rename $dfile $xfile\n"  if ( $debug > 0 );
+    rename( $dfile, $xfile);
+}
+
+
+
+
+
diff -r 000000000000 -r 5eda1a3f24e8 source/scripts/uncrustify.cfg
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/scripts/uncrustify.cfg	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,228 @@
+indent_align_string=false
+indent_braces=false
+indent_braces_no_func=false
+indent_brace_parent=false
+indent_namespace=false
+indent_extern=false
+indent_class=true
+indent_class_colon=false
+indent_else_if=false
+indent_func_call_param=true
+indent_func_def_param=false
+indent_func_proto_param=false
+indent_func_class_param=false
+indent_func_ctor_var_param=false
+indent_template_param=false
+indent_func_param_double=false
+indent_relative_single_line_comments=false
+indent_col1_comment=false
+indent_access_spec_body=false
+indent_paren_nl=false
+indent_comma_paren=false
+indent_bool_paren=false
+indent_square_nl=false
+indent_preserve_sql=false
+indent_align_assign=false
+sp_balance_nested_parens=false
+align_keep_tabs=false
+align_with_tabs=false
+align_on_tabstop=false
+align_number_left=false
+align_func_params=false
+align_same_func_call_params=false
+align_var_def_colon=false
+align_var_def_attribute=false
+align_var_def_inline=false
+align_right_cmt_mix=false
+align_on_operator=false
+align_mix_var_proto=false
+align_single_line_func=false
+align_single_line_brace=false
+align_nl_cont=false
+align_left_shift=true
+align_oc_msg_colon=false
+nl_collapse_empty_body=false
+nl_assign_leave_one_liners=false
+nl_class_leave_one_liners=false
+nl_enum_leave_one_liners=false
+nl_getset_leave_one_liners=false
+nl_func_leave_one_liners=false
+nl_if_leave_one_liners=false
+nl_multi_line_cond=false
+nl_multi_line_define=true
+nl_before_case=false
+nl_after_case=false
+nl_after_return=true
+nl_after_semicolon=true
+nl_after_brace_open=false
+nl_after_brace_open_cmt=false
+nl_after_vbrace_open=false
+nl_after_brace_close=false
+nl_define_macro=false
+nl_squeeze_ifdef=false
+nl_ds_struct_enum_cmt=false
+nl_ds_struct_enum_close_brace=false
+nl_create_if_one_liner=false
+nl_create_for_one_liner=false
+nl_create_while_one_liner=false
+ls_for_split_full=true
+ls_func_split_full=true
+nl_after_multiline_comment=false
+eat_blanks_after_open_brace=false
+eat_blanks_before_close_brace=false
+mod_full_brace_if_chain=false
+mod_pawn_semicolon=false
+mod_full_paren_if_bool=false
+mod_remove_extra_semicolon=true
+mod_sort_import=false
+mod_sort_using=false
+mod_sort_include=false
+mod_move_case_break=false
+mod_remove_empty_return=true
+cmt_indent_multi=true
+cmt_c_group=false
+cmt_c_nl_start=false
+cmt_c_nl_end=false
+cmt_cpp_group=false
+cmt_cpp_nl_start=false
+cmt_cpp_nl_end=false
+cmt_cpp_to_c=false
+cmt_star_cont=true
+cmt_multi_check_last=true
+cmt_insert_before_preproc=false
+pp_indent_at_level=false
+pp_region_indent_code=false
+pp_if_indent_code=false
+pp_define_at_level=false
+indent_columns=3
+indent_switch_case=3
+nl_end_of_file_min=1
+code_width=100
+nl_max=2
+nl_after_access_spec=1
+indent_with_tabs=0
+sp_arith=force
+sp_assign=force
+sp_enum_assign=force
+sp_bool=force
+sp_compare=force
+sp_inside_paren=remove
+sp_paren_paren=remove
+sp_before_ptr_star=remove
+sp_before_unnamed_ptr_star=force
+sp_between_ptr_star=remove
+sp_after_ptr_star=force
+sp_after_ptr_star_func=remove
+sp_before_ptr_star_func=force
+sp_before_byref=remove
+sp_before_unnamed_byref=remove
+sp_after_byref=force
+sp_after_byref_func=force
+sp_before_byref_func=remove
+sp_after_type=force
+sp_template_angle=remove
+sp_before_angle=remove
+sp_inside_angle=remove
+sp_angle_paren=remove
+sp_angle_word=force
+sp_before_sparen=force
+sp_inside_sparen=remove
+sp_inside_sparen_close=remove
+sp_after_sparen=force
+sp_sparen_brace=force
+sp_special_semi=force
+sp_before_semi=remove
+sp_before_semi_for=remove
+sp_before_semi_for_empty=force
+sp_after_semi_for_empty=force
+sp_before_square=remove
+sp_before_squares=remove
+sp_inside_square=remove
+sp_after_comma=force
+sp_before_comma=remove
+sp_after_class_colon=remove
+sp_before_class_colon=remove
+sp_after_operator=force
+sp_after_operator_sym=force
+sp_after_cast=remove
+sp_inside_paren_cast=remove
+sp_cpp_cast_paren=remove
+sp_sizeof_paren=remove
+sp_inside_braces_enum=force
+sp_inside_braces_struct=force
+sp_inside_braces=force
+sp_inside_braces_empty=remove
+sp_type_func=force
+sp_func_proto_paren=remove
+sp_func_def_paren=remove
+sp_inside_fparens=remove
+sp_inside_fparen=remove
+sp_square_fparen=remove
+sp_fparen_brace=force
+sp_func_call_paren=remove
+sp_func_call_user_paren=remove
+sp_func_class_paren=remove
+sp_return_paren=remove
+sp_defined_paren=remove
+sp_macro=remove
+sp_macro_func=remove
+sp_else_brace=force
+sp_brace_else=force
+sp_brace_typedef=force
+sp_catch_brace=force
+sp_brace_catch=force
+sp_finally_brace=force
+sp_brace_finally=force
+sp_try_brace=force
+sp_before_dc=remove
+sp_after_dc=remove
+sp_not=remove
+sp_inv=remove
+sp_addr=remove
+sp_member=remove
+sp_deref=remove
+sp_sign=remove
+sp_incdec=remove
+sp_before_nl_cont=add
+sp_cond_colon=force
+sp_cond_question=force
+sp_case_label=force
+nl_start_of_file=remove
+nl_end_of_file=force
+nl_assign_brace=remove
+nl_assign_square=remove
+nl_after_square_assign=remove
+nl_fcall_brace=force
+nl_enum_brace=remove
+nl_struct_brace=remove
+nl_union_brace=remove
+nl_if_brace=remove
+nl_brace_else=remove
+nl_elseif_brace=remove
+nl_else_brace=remove
+nl_else_if=remove
+nl_brace_finally=force
+nl_finally_brace=force
+nl_try_brace=force
+nl_for_brace=remove
+nl_while_brace=remove
+nl_do_brace=remove
+nl_brace_while=remove
+nl_switch_brace=remove
+nl_namespace_brace=remove
+nl_template_class=force
+nl_class_brace=force
+nl_class_init_args=force
+nl_func_proto_type_name=force
+nl_func_paren=remove
+nl_func_decl_start=force
+nl_func_decl_args=force
+nl_func_decl_end=remove
+nl_return_expr=remove
+pos_arith=lead
+pos_assign=trail
+pos_bool=ignore
+pos_comma=trail
+pos_class_comma=trail
+pos_class_colon=trail
+mod_paren_on_return=remove
diff -r 000000000000 -r 5eda1a3f24e8 source/scripts/update
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/scripts/update	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,21 @@
+#!/bin/sh
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   shell script to run updateXd, include, and depend
+##
+#########################################################################
+
+BIN=`dirname $0`
+
+perl $BIN/updateXd.pl
+sh $BIN/depend
+
+if test -n "`pwd | grep ./source/.`" ; then
+   echo "Warning - you may need to re-run $BIN/depend in SAMRAI/source..."
+fi
+
+exit 0
diff -r 000000000000 -r 5eda1a3f24e8 source/scripts/updateXd.pl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/scripts/updateXd.pl	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,138 @@
+#! /usr/bin/perl
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   shell script to update 1d, 2d, and 3d sed files 
+##
+#########################################################################
+
+#
+# Convert all files of the form "*X.*.sed" into their dimension-dependent
+# forms in directories 1d, 2d, and 3d.
+#
+
+use File::Basename;
+use File::Find;
+use Cwd;
+
+#
+# Disallow running from certain directories.
+#
+
+my $pwd = cwd;
+die basename($0) . " should not be run from your current directory"
+    if $pwd =~ m:\b(source/test|source/scripts)(/|$):;
+
+
+my $debug = 0;
+
+
+#
+# Convert all files of the form "*[123]d.m4" into their dimension-dependent
+# forms in directories 1d, 2d, and 3d.
+#
+
+#
+# Find the m4 files to convert.
+#
+ at allfiles = ();
+sub selectm4file {
+    # This subroutine selects the dimensional m4 files in a find command,
+    # excluding certain directories.
+    # Do not run in applications directory.
+    if ( $File::Find::name =~ m!/(test|scripts|CVS|\.hg|[123]d)$!o ) {
+	$File::Find::prune = true;
+    }
+    elsif ( -f && m/.*[123]d\.m4$/o ) {
+	push @allfiles, $File::Find::name;
+	$allfiles[$#allfiles] =~ s|^\./||o;
+    }
+}
+print "Scanning...\n" if ( $debug > 0 );
+find( \&selectm4file, '.' );
+print "Done.\n" if ( $debug > 0 );
+# for (@allfiles) { print "$_\n"; }
+
+#
+# Recurse through all directories with sed files and update 1d, 2d, and 3d
+#
+
+my $savepwd = `pwd`; chop $savepwd;
+for $dim (1,2,3) {
+    @dimfiles = grep /${dim}d\.m4$/, @allfiles;
+    print "dimfiles: @dimfiles\n" if ( $debug > 0 );
+
+    for $mfile (@dimfiles) {
+	print "Checking $mfile\n";
+	$mdir = dirname $mfile;
+	$mbase = basename $mfile;
+	( $dfile = $mbase ) =~ s/d\.m4$/d.f/o;
+	$tpath = "$mdir/$dfile.tmp"; # Temporary file.
+	print "dfile: $dfile\n" if ( $debug > 0 );
+	print "tpath: $tpath\n" if ( $debug > 0 );
+	print "creating $tpath\n" if ( $debug > 0 );
+	chdir $mdir || die "Cannot cd to $mdir";
+	open MF, "m4 $mbase |" || die "Cannot launch 'm4 $mbase'";
+	chdir($savepwd)
+	    || die "Cannot cd back to $savepwd from $mdir due to $!";
+	open TF, "> $tpath" || die "Cannot open file $tpath";
+	while ( $str = <MF> ) {
+	    # Remove CVS-substituted string.
+	    $str =~ s/\$((Id|Name|Revision|Date)[^\$]*)\$//go;
+	    print TF $str;
+	}
+	close MF || die "Cannot close process 'm4 $mfile'";
+	close TF || die "Cannot close file $tpath";
+	if ( &cmpfiles( "$mdir/$dfile", $tpath ) ) {
+	    print "renaming $tpath to $dfile due to difference\n"
+		if ( $debug > 0 );
+	    rename( $tpath, "$mdir/$dfile" )
+		|| die "Cannot rename $tpath to $dfile";
+	} else {
+	    print "Removing $tpath due to no difference\n"
+		if ( $debug > 0 );
+	    unlink $tpath || die "Cannot remove $tpath";
+	}
+    }
+}
+
+
+
+#
+# Subroutine to check if two files are the same.
+#
+sub cmpfiles {
+
+($ANAME,$BNAME) = @_;
+
+return 1 unless ( -r $ANAME && -r $BNAME );
+open(AFILE, "$ANAME") || die "Cannot open input file $ANAME...";
+open(BFILE, "$BNAME") || die "Cannot open input file $BNAME...";
+
+while (!eof(AFILE) && !eof(BFILE)) {
+   $ALINE = <AFILE>;
+   $BLINE = <BFILE>;
+   if ($ALINE ne $BLINE) {
+       close AFILE;
+       close BFILE;
+       return 1;
+   }
+}
+
+if (eof(AFILE) && eof(BFILE)) {
+    $rvalue = 0;
+} else {
+    $rvalue = 1;
+}
+
+close AFILE;
+close BFILE;
+return $rvalue;
+
+}
+
+
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/AdaptivePoisson.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/AdaptivePoisson.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1071 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AdaptivePoisson class implementation 
+ *
+ ************************************************************************/
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "printObject.h"
+#include "SAMRAI/pdat/MDA_Access.h"
+#include "SAMRAI/pdat/ArrayDataAccess.h"
+#include "patchFcns.h"
+#include "AdaptivePoisson.h"
+#include "SAMRAI/solv/CellPoissonFACOps.h"
+
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/ConstPointer.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/InputDatabase.h"
+
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/math/HierarchyCellDataOpsReal.h"
+#include "SAMRAI/math/PatchCellDataOpsReal.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/OutersideData.h"
+#include "SAMRAI/xfer/Geometry.h"
+#include "SAMRAI/xfer/CoarsenAlgorithm.h"
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/xfer/CoarsenSchedule.h"
+#include "SAMRAI/xfer/RefineAlgorithm.h"
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/xfer/RefineSchedule.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/geom/CartesianCellDoubleLinearRefine.h"
+#include "SAMRAI/geom/CartesianCellDoubleConservativeLinearRefine.h"
+#include "SAMRAI/geom/CartesianCellDoubleWeightedAverage.h"
+#include "SAMRAI/geom/CartesianSideDoubleWeightedAverage.h"
+#include "SAMRAI/pdat/CellDoubleConstantRefine.h"
+#include "SAMRAI/math/PatchCellDataOpsReal.h"
+#include "SAMRAI/math/HierarchyCellDataOpsReal.h"
+
+#include <sstream>
+#include <iomanip>
+#include <cstring>
+#include <stdlib.h>
+
+using namespace SAMRAI;
+
+AdaptivePoisson::AdaptivePoisson(
+   const std::string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Database& database,
+   /*! Standard output stream */ std::ostream* out_stream,
+   /*! Log output stream */ std::ostream* log_stream):
+   d_name(object_name),
+   d_dim(dim),
+   d_hierarchy(),
+   d_fac_ops(d_dim,
+             object_name + ":scalar poisson operator",
+             database.getDatabase("ScalarPoissonOps")),
+   d_fac_preconditioner("FAC preconditioner for Poisson's equation",
+                        d_fac_ops),
+   d_context_persistent("PERSISTENT"),
+   d_context_scratch("SCRATCH"),
+   d_diffcoef(d_dim, "solution:diffcoef", 1),
+   d_flux(d_dim, "flux", 1),
+   d_scalar(d_dim, "solution:scalar", 1),
+   d_constant_source(d_dim, "poisson source", 1),
+   d_ccoef(d_dim, "linear source coefficient", 1),
+   d_rhs(d_dim, "linear system rhs", 1),
+   d_exact(d_dim, "solution:exact", 1),
+   d_resid(new pdat::CellVariable<double>(d_dim, object_name + "residual")),
+   d_weight(d_dim, "vector weight", 1),
+   d_ostream(out_stream),
+   d_lstream(log_stream),
+   d_problem_name("sine"),
+   d_sps(object_name + "Poisson solver specifications"),
+   d_sine_solution(dim),
+   d_gaussian_solution(dim),
+   d_multigaussian_solution(dim),
+   d_polynomial_solution(dim),
+   d_gaussian_diffcoef_solution(dim),
+   d_robin_refine_patch(d_dim, object_name + "Refine patch implementation"),
+   d_physical_bc_coef(NULL),
+   d_adaption_threshold(0.5),
+   d_finest_plot_level(9999999),
+#ifdef HAVE_HDF5
+   d_visit_writer(),
+#endif
+   d_finest_dbg_plot_ln(database.getIntegerWithDefault("finest_dbg_plot_ln", 99))
+{
+
+   /*
+    * Register variables with hier::VariableDatabase
+    * and get the descriptor indices for those variables.
+    * It is not necessary to save the indices obtained from
+    * the registration, because they can always be retrieved
+    * from the mapVariableAndContextToIndex, but we do it
+    * because we refer to the indices often.
+    */
+   {
+      tbox::Pointer<hier::VariableContext>
+      context_persistent_ptr(&d_context_persistent, false);
+      tbox::Pointer<hier::VariableContext>
+      context_scratch_ptr(&d_context_scratch, false);
+      hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+
+      /*
+       * Persistent data.
+       */
+      d_diffcoef_persistent =
+         variable_db->registerVariableAndContext(
+            tbox::Pointer<hier::Variable>(&d_diffcoef, false),
+            context_persistent_ptr,
+            hier::IntVector(d_dim, 0));
+      d_flux_persistent =
+         variable_db->registerVariableAndContext(
+            tbox::Pointer<hier::Variable>(&d_flux, false),
+            context_persistent_ptr,
+            hier::IntVector(d_dim, 0));
+      d_scalar_persistent =
+         variable_db->registerVariableAndContext(
+            tbox::Pointer<hier::Variable>(&d_scalar, false),
+            context_persistent_ptr,
+            hier::IntVector(d_dim, 1)   /* ghost cell width is 1 for stencil widths */
+            );
+      d_constant_source_persistent =
+         variable_db->registerVariableAndContext(
+            tbox::Pointer<hier::Variable>(&d_constant_source, false),
+            context_persistent_ptr,
+            hier::IntVector(d_dim, 0)
+            );
+      d_ccoef_persistent =
+         variable_db->registerVariableAndContext(
+            tbox::Pointer<hier::Variable>(&d_ccoef, false),
+            context_persistent_ptr,
+            hier::IntVector(d_dim, 0)
+            );
+      d_exact_persistent =
+         variable_db->registerVariableAndContext(
+            tbox::Pointer<hier::Variable>(&d_exact, false),
+            context_persistent_ptr,
+            hier::IntVector(d_dim, 0)
+            );
+      d_weight_persistent =
+         variable_db->registerVariableAndContext(
+            tbox::Pointer<hier::Variable>(&d_weight, false),
+            context_persistent_ptr,
+            hier::IntVector(d_dim, 0)
+            );
+      /*
+       * Scratch data.
+       */
+      d_rhs_scratch =
+         variable_db->registerVariableAndContext(
+            tbox::Pointer<hier::Variable>(&d_rhs, false),
+            context_scratch_ptr,
+            hier::IntVector(d_dim, 0)   /* ghost cell width is 0 */
+            );
+      d_resid_scratch =
+         variable_db->registerVariableAndContext(
+            d_resid,
+            context_scratch_ptr,
+            hier::IntVector(d_dim, 0) /* ghost cell width is 0 */
+            );
+   }
+
+   d_finest_plot_level =
+      database.getIntegerWithDefault("finest_plot_level",
+         d_finest_plot_level);
+
+   /*
+    * Experiment with algorithm choices in solv::FACPreconditioner.
+    */
+   std::string fac_algo = database.getStringWithDefault("fac_algo", "default");
+   d_fac_preconditioner.setAlgorithmChoice(fac_algo);
+
+   d_adaption_threshold =
+      database.getDoubleWithDefault("adaption_threshold",
+         d_adaption_threshold);
+
+   /*
+    * Read in the possible solution-specific objects.
+    */
+   {
+      if (database.isDatabase("sine_solution")) {
+         tbox::Pointer<tbox::Database> db =
+            database.getDatabase("sine_solution");
+         d_sine_solution.setFromDatabase(*db);
+      }
+      if (database.isDatabase("gaussian_solution")) {
+         tbox::Pointer<tbox::Database> db =
+            database.getDatabase("gaussian_solution");
+         d_gaussian_solution.setFromDatabase(*db);
+      }
+      if (database.isDatabase("multigaussian_solution")) {
+         tbox::Pointer<tbox::Database> db =
+            database.getDatabase("multigaussian_solution");
+         d_multigaussian_solution.setFromDatabase(*db);
+      }
+      if (database.isDatabase("polynomial_solution")) {
+         tbox::Pointer<tbox::Database> db =
+            database.getDatabase("polynomial_solution");
+         d_polynomial_solution.setFromDatabase(*db);
+      }
+      if (database.isDatabase("gaussian_diffcoef_solution")) {
+         tbox::Pointer<tbox::Database> db =
+            database.getDatabase("gaussian_diffcoef_solution");
+         d_gaussian_diffcoef_solution.setFromDatabase(*db);
+      }
+   }
+
+   /*
+    * We are set up with a choice of problems to solve.
+    * The problem name identifies the specific one.
+    */
+
+   d_problem_name =
+      database.getStringWithDefault("problem_name", d_problem_name);
+   if (d_problem_name != "sine"
+       && d_problem_name != "sine-neumann"
+       && d_problem_name != "gauss"
+       && d_problem_name != "multigauss"
+       && d_problem_name != "pernice"
+       && d_problem_name != "poly"
+       && d_problem_name != "gauss-coef"
+       ) {
+      TBOX_ERROR("Unrecognized problem name " << d_problem_name << "\n");
+   }
+   if (d_problem_name == "sine") {
+      d_sine_solution.setPoissonSpecifications(d_sps,
+         d_ccoef_persistent,
+         d_diffcoef_persistent);
+      d_physical_bc_coef = &d_sine_solution;
+   } else if (d_problem_name == "gauss") {
+      d_gaussian_solution.setPoissonSpecifications(d_sps,
+         d_ccoef_persistent,
+         d_diffcoef_persistent);
+      d_physical_bc_coef = &d_gaussian_solution;
+   } else if (d_problem_name == "multigauss") {
+      d_multigaussian_solution.setPoissonSpecifications(d_sps,
+         d_ccoef_persistent,
+         d_diffcoef_persistent);
+      d_physical_bc_coef = &d_multigaussian_solution;
+   } else if (d_problem_name == "poly") {
+      d_polynomial_solution.setPoissonSpecifications(d_sps,
+         d_ccoef_persistent,
+         d_diffcoef_persistent);
+      d_physical_bc_coef = &d_polynomial_solution;
+   } else if (d_problem_name == "gauss-coef") {
+      d_gaussian_diffcoef_solution.setPoissonSpecifications(d_sps,
+         d_ccoef_persistent,
+         d_diffcoef_persistent);
+      d_physical_bc_coef = &d_gaussian_diffcoef_solution;
+   } else {
+      TBOX_ERROR("Unidentified problem name");
+   }
+   /*
+    * Tell ScalarPoissonOperator where to find some of the data
+    * we are providing it.
+    */
+   d_fac_ops.setPoissonSpecifications(d_sps);
+   d_fac_ops.setFluxId(-1);
+
+   d_fac_ops.setPhysicalBcCoefObject(d_physical_bc_coef);
+
+   d_fac_ops.setProlongationMethod("LINEAR_REFINE");
+
+   tbox::plog << "Gaussian solution parameters:\n"
+              << d_gaussian_solution << "\n\n" << std::endl;
+#if 0
+   tbox::plog << "Sine solution parameters:\n"
+              << d_sine_solution << "\n\n" << std::endl;
+   tbox::plog << "Polynomial solution parameters:\n"
+              << d_polynomial_solution << "\n\n" << std::endl;
+   tbox::plog << "Gaussian diffcoef solution parameters:\n"
+              << d_gaussian_diffcoef_solution << "\n\n" << std::endl;
+#endif
+   tbox::plog << "Problem name is: " << d_problem_name << "\n\n" << std::endl;
+
+   d_fac_ops.setPreconditioner(&d_fac_preconditioner);
+}
+
+void AdaptivePoisson::initializeLevelData(
+   /*! Hierarchy to initialize */
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   /*! Level to initialize */
+   const int ln,
+   const double init_data_time,
+   const bool can_be_refined,
+   /*! Whether level is being introduced for the first time */
+   const bool initial_time,
+   /*! Level to copy data from */
+   const tbox::Pointer<hier::BasePatchLevel> old_level,
+   const bool allocate_data)
+{
+   (void)init_data_time;
+   (void)can_be_refined;
+   (void)initial_time;
+
+   tbox::Pointer<hier::PatchHierarchy> patch_hierarchy = hierarchy;
+
+   /*
+    * Reference the level object with the given index from the hierarchy.
+    */
+   tbox::Pointer<hier::PatchLevel> level =
+      hierarchy->getPatchLevel(ln);
+
+   /*
+    * If instructed, allocate all patch data on the level.
+    * Allocate only persistent data.  Scratch data will
+    * generally be allocated and deallocated as needed.
+    */
+   if (allocate_data) {
+      if (d_sps.dIsVariable())
+         level->allocatePatchData(d_diffcoef_persistent);
+      level->allocatePatchData(d_flux_persistent);
+      level->allocatePatchData(d_scalar_persistent);
+      level->allocatePatchData(d_constant_source_persistent);
+      if (d_sps.cIsVariable())
+         level->allocatePatchData(d_ccoef_persistent);
+      level->allocatePatchData(d_exact_persistent);
+      level->allocatePatchData(d_weight_persistent);
+   }
+
+   /*
+    * Initialize data in all patches in the level.
+    */
+   hier::PatchLevel::Iterator pi;
+   for (pi.initialize(*level); pi; pi++) {
+
+      hier::Patch& patch = **pi;
+      hier::Box pbox = patch.getBox();
+
+      tbox::Pointer<pdat::SideData<double> > diffcoef_data =
+         patch.getPatchData(d_diffcoef_persistent);
+      tbox::Pointer<pdat::CellData<double> > scalar_data =
+         patch.getPatchData(d_scalar_persistent);
+      tbox::Pointer<pdat::CellData<double> > ccoef_data =
+         patch.getPatchData(d_ccoef_persistent);
+      tbox::Pointer<pdat::CellData<double> > exact_data =
+         patch.getPatchData(d_exact_persistent);
+      tbox::Pointer<pdat::CellData<double> > source_data =
+         patch.getPatchData(d_constant_source_persistent);
+
+      /* Set source function and exact solution. */
+      if (d_problem_name == "sine") {
+         d_sine_solution.setGridData(patch,
+            *diffcoef_data,
+            *ccoef_data,
+            *exact_data,
+            *source_data);
+      } else if (d_problem_name == "gauss") {
+         d_gaussian_solution.setGridData(patch,
+            *diffcoef_data,
+            *ccoef_data,
+            *exact_data,
+            *source_data);
+      } else if (d_problem_name == "multigauss") {
+         d_multigaussian_solution.setGridData(patch,
+            *diffcoef_data,
+            *ccoef_data,
+            *exact_data,
+            *source_data);
+      } else if (d_problem_name == "poly") {
+         d_polynomial_solution.setGridData(patch,
+            *diffcoef_data,
+            *ccoef_data,
+            *exact_data,
+            *source_data);
+      } else if (d_problem_name == "gauss-coef") {
+         d_gaussian_diffcoef_solution.setGridData(patch,
+            *diffcoef_data,
+            *ccoef_data,
+            *exact_data,
+            *source_data);
+      } else {
+         TBOX_ERROR("Unidentified problem name");
+      }
+
+   }
+
+   /*
+    * Refine solution data from coarser level and, if provided, old level.
+    */
+   {
+      xfer::RefineAlgorithm refiner(d_dim);
+      tbox::Pointer<geom::CartesianGridGeometry>
+      grid_geometry_ = patch_hierarchy->getGridGeometry();
+      geom::CartesianGridGeometry& grid_geometry = *grid_geometry_;
+      tbox::Pointer<xfer::RefineOperator> accurate_refine_op =
+         grid_geometry.
+         lookupRefineOperator(tbox::Pointer<hier::Variable>(&d_scalar, false),
+            "CONSERVATIVE_LINEAR_REFINE");
+      TBOX_ASSERT(accurate_refine_op);
+      refiner.registerRefine(d_scalar_persistent,
+         d_scalar_persistent,
+         d_scalar_persistent,
+         accurate_refine_op);
+      tbox::Pointer<xfer::RefineSchedule> refine_schedule;
+      if (ln > 0) {
+         /*
+          * Include coarser levels in setting data
+          */
+         refine_schedule =
+            refiner.createSchedule(level,
+               old_level,
+               ln - 1,
+               hierarchy,
+               &d_robin_refine_patch);
+      } else {
+         /*
+          * There is no coarser level, and source data comes only
+          * from old_level, if any.
+          */
+         if (old_level) {
+            refine_schedule =
+               refiner.createSchedule(level,
+                  old_level,
+                  &d_robin_refine_patch);
+         }
+      }
+      if (refine_schedule) {
+         d_robin_refine_patch.setCoefImplementation(d_physical_bc_coef);
+         d_robin_refine_patch.setTargetDataId(d_scalar_persistent);
+         d_robin_refine_patch.setHomogeneousBc(false);
+         refine_schedule->fillData(0.0);
+         // It is null if this is the bottom level.
+      } else {
+         math::HierarchyCellDataOpsReal<double> hcellmath(hierarchy, ln, ln);
+         hcellmath.setToScalar(d_scalar_persistent, 0.0, false);
+      }
+      if (0) {
+         // begin debug code
+         math::HierarchyCellDataOpsReal<double> hcellmath(hierarchy);
+         hcellmath.printData(d_scalar_persistent, tbox::pout, false);
+         // end debug code
+      }
+   }
+
+   /* Set vector weight. */
+   d_fac_ops.computeVectorWeights(hierarchy, d_weight_persistent);
+}
+
+void AdaptivePoisson::resetHierarchyConfiguration(
+   /*! New hierarchy */ tbox::Pointer<hier::BasePatchHierarchy> new_hierarchy,
+   /*! Coarsest level */ int coarsest_level,
+   /*! Finest level */ int finest_level)
+{
+   (void)coarsest_level;
+   (void)finest_level;
+
+   d_hierarchy = new_hierarchy;
+   /*
+    * Recompute or reset internal data tied to the hierarchy,
+    * if any.  None at this time.
+    */
+   /*
+    * Log the new hierarchy.
+    */
+   if (d_lstream) {
+      *d_lstream
+      << "AdaptivePoisson::resetHierarchyConfiguration\n";
+      d_hierarchy->recursivePrint(*d_lstream, "    ", 2);
+   }
+}
+
+void AdaptivePoisson::applyGradientDetector(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy_,
+   const int ln,
+   const double error_data_time,
+   const int tag_index,
+   const bool initial_time,
+   const bool uses_richardson_extrapolation)
+{
+   (void)uses_richardson_extrapolation;
+   (void)error_data_time;
+   (void)initial_time;
+
+   if (d_lstream) {
+      *d_lstream
+      << "AdaptivePoisson(" << d_name << ")::applyGradientDetector"
+      << std::endl;
+   }
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy__ = hierarchy_;
+   hier::PatchHierarchy& hierarchy = *hierarchy__;
+   tbox::Pointer<geom::CartesianGridGeometry>
+   grid_geometry_ = hierarchy.getGridGeometry();
+   hier::PatchLevel& level =
+      (hier::PatchLevel &) * hierarchy.getPatchLevel(ln);
+   hier::PatchLevel::Iterator pi;
+   int ntag = 0, ntotal = 0;
+   double maxestimate = 0;
+   for (pi.initialize(level); pi; pi++) {
+      hier::Patch& patch = **pi;
+      tbox::Pointer<hier::PatchData>
+      tag_data = patch.getPatchData(tag_index);
+      ntotal += patch.getBox().numberCells().getProduct();
+      if (tag_data.isNull()) {
+         TBOX_ERROR(
+            "Data index " << tag_index << " does not exist for patch.\n");
+      }
+      tbox::Pointer<pdat::CellData<int> > tag_cell_data_ = tag_data;
+      if (tag_cell_data_.isNull()) {
+         TBOX_ERROR("Data index " << tag_index << " is not cell int data.\n");
+      }
+      tbox::Pointer<hier::PatchData>
+      soln_data = patch.getPatchData(d_scalar_persistent);
+      if (soln_data.isNull()) {
+         TBOX_ERROR("Data index " << d_scalar_persistent
+                                  << " does not exist for patch.\n");
+      }
+      tbox::Pointer<pdat::CellData<double> > soln_cell_data_ = soln_data;
+      if (soln_cell_data_.isNull()) {
+         TBOX_ERROR("Data index " << d_scalar_persistent
+                                  << " is not cell int data.\n");
+      }
+      pdat::CellData<double>& soln_cell_data = *soln_cell_data_;
+      pdat::CellData<int>& tag_cell_data = *tag_cell_data_;
+      pdat::CellData<double> estimate_data(patch.getBox(),
+                                           1,
+                                           hier::IntVector(d_dim, 0));
+      computeAdaptionEstimate(estimate_data,
+         soln_cell_data);
+      tag_cell_data.fill(0);
+      hier::Box::Iterator i;
+      for (i.initialize(patch.getBox()); i; i++) {
+         const pdat::CellIndex cell_index(*i);
+         if (maxestimate < estimate_data(cell_index)) maxestimate =
+               estimate_data(cell_index);
+         if (estimate_data(cell_index) > d_adaption_threshold) {
+            tag_cell_data(cell_index) = 1;
+            ++ntag;
+         }
+      }
+   }
+   tbox::plog << "Adaption threshold is " << d_adaption_threshold << "\n";
+   tbox::plog << "Number of cells tagged on level " << ln << " is "
+              << ntag << "/" << ntotal << "\n";
+   tbox::plog << "Max estimate is " << maxestimate << "\n";
+}
+
+#ifdef HAVE_HDF5
+int AdaptivePoisson::registerVariablesWithPlotter(
+   appu::VisItDataWriter& visit_writer) {
+
+   visit_writer.registerPlotQuantity("Computed solution",
+      "SCALAR",
+      d_scalar_persistent);
+   visit_writer.registerPlotQuantity("Exact solution",
+      "SCALAR",
+      d_exact_persistent);
+   visit_writer.registerPlotQuantity("Poisson source",
+      "SCALAR",
+      d_constant_source_persistent);
+   visit_writer.registerDerivedPlotQuantity("Gradient Function",
+      "SCALAR",
+      this,
+      1.0,
+      "CELL");
+   visit_writer.registerDerivedPlotQuantity("Patch level number",
+      "SCALAR",
+      this,
+      1.0,
+      "CELL");
+
+   // This code has memory leaks but is not critical to the test.
+   if (1) {
+      tbox::Array<string> expression_keys(1);
+      tbox::Array<string> expressions(1);
+      tbox::Array<string> expression_types(1);
+
+      {
+         expression_keys[0] = "Error";
+         expression_types[0] = "scalar";
+         expressions[0] = "<Computed solution> - <Exact solution>";
+      }
+
+      visit_writer.registerVisItExpressions(expression_keys,
+         expressions,
+         expression_types);
+
+   }
+
+   return 0;
+}
+#endif
+
+bool AdaptivePoisson::packDerivedDataIntoDoubleBuffer(
+   double* buffer,
+   const hier::Patch& patch,
+   const hier::Box& region,
+   const std::string& variable_name,
+   int depth_id) const
+{
+   (void)depth_id;
+
+   // begin debug code
+   // math::HierarchyCellDataOpsReal<double> hcellmath(d_hierarchy);
+   // hcellmath.printData( d_exact_persistent, pout, false );
+   // end debug code
+
+   if (variable_name == "Gradient Function") {
+      tbox::Pointer<pdat::CellData<double> > soln_cell_data_ =
+         patch.getPatchData(d_scalar_persistent);
+      const pdat::CellData<double>& soln_cell_data = *soln_cell_data_;
+      pdat::CellData<double> estimate_data(region,
+                                           1,
+                                           hier::IntVector(d_dim, 0));
+      computeAdaptionEstimate(estimate_data,
+         soln_cell_data);
+      // tbox::plog << "estimate data: " << patch.getBox().size() << "\n";
+      // estimate_data.print(region,0,tbox::plog);
+      memcpy(buffer, estimate_data.getPointer(), sizeof(double) * region.size());
+   } else if (variable_name == "Patch level number") {
+      double pln = patch.getPatchLevelNumber();
+      int i, size = region.size();
+      for (i = 0; i < size; ++i) buffer[i] = pln;
+   } else {
+      // Did not register this name.
+      TBOX_ERROR(
+         "Unregistered variable name '" << variable_name << "' in\n"
+         <<
+         "AdaptivePoisson::packDerivedPatchDataIntoDoubleBuffer");
+   }
+
+   // Return TRUE if this patch has derived data on it.
+   // FALSE otherwise.
+   return true;
+}
+
+void AdaptivePoisson::computeAdaptionEstimate(
+   pdat::CellData<double>& estimate_data,
+   const pdat::CellData<double>& soln_cell_data) const
+{
+   const int* lower = &estimate_data.getBox().lower()[0];
+   const int* upper = &estimate_data.getBox().upper()[0];
+   if (d_dim == tbox::Dimension(2)) {
+      MDA_AccessConst<double, 2, MDA_OrderColMajor<2> > co =
+         pdat::ArrayDataAccess::access<2, double>(soln_cell_data.getArrayData());
+      MDA_Access<double, 2, MDA_OrderColMajor<2> > es =
+         pdat::ArrayDataAccess::access<2, double>(estimate_data.getArrayData());
+      int i, j;
+      double estimate, est0, est1, est2, est3, est4, est5;
+      for (j = lower[1]; j <= upper[1]; ++j) {
+         for (i = lower[0]; i <= upper[0]; ++i) {
+            est0 =
+               tbox::MathUtilities<double>::Abs(co(i + 1, j) + co(i - 1,
+                     j) - 2 * co(i, j));
+            est1 =
+               tbox::MathUtilities<double>::Abs(co(i, j + 1) + co(i,
+                     j - 1) - 2 * co(i, j));
+            est2 = 0.5
+               * tbox::MathUtilities<double>::Abs(co(i + 1, j
+                     + 1) + co(i - 1, j - 1) - 2 * co(i, j));
+            est3 = 0.5
+               * tbox::MathUtilities<double>::Abs(co(i + 1, j
+                     - 1) + co(i - 1, j + 1) - 2 * co(i, j));
+            est4 = tbox::MathUtilities<double>::Max(est0, est1);
+            est5 = tbox::MathUtilities<double>::Max(est2, est3);
+            estimate = tbox::MathUtilities<double>::Max(est4, est5);
+            es(i, j) = estimate;
+         }
+      }
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      MDA_AccessConst<double, 3, MDA_OrderColMajor<3> > co =
+         pdat::ArrayDataAccess::access<3, double>(soln_cell_data.getArrayData());
+      MDA_Access<double, 3, MDA_OrderColMajor<3> > es =
+         pdat::ArrayDataAccess::access<3, double>(estimate_data.getArrayData());
+      // math::PatchCellDataOpsReal<double> cops;
+      // cops.printData( soln_cell_data_, soln_cell_data_->getGhostBox(), tbox::plog );
+      int i, j, k;
+      double estimate, est0, est1, est2, est3, est4, est5, est6, est7, est8,
+             esta, estb, estc, estd, este, estf, estg;
+      for (k = lower[2]; k <= upper[2]; ++k) {
+         for (j = lower[1]; j <= upper[1]; ++j) {
+            for (i = lower[0]; i <= upper[0]; ++i) {
+               est0 =
+                  tbox::MathUtilities<double>::Abs(co(i + 1, j, k) + co(i - 1,
+                        j,
+                        k) - 2 * co(i, j, k));
+               est1 =
+                  tbox::MathUtilities<double>::Abs(co(i, j + 1, k) + co(i,
+                        j - 1,
+                        k) - 2 * co(i, j, k));
+               est2 =
+                  tbox::MathUtilities<double>::Abs(co(i, j, k + 1) + co(i,
+                        j,
+                        k - 1) - 2 * co(i, j, k));
+               est3 = 0.5 * tbox::MathUtilities<double>::Abs(co(i,
+                        j + 1,
+                        k + 1) + co(i, j - 1, k - 1) - 2 * co(i, j, k));
+               est4 = 0.5 * tbox::MathUtilities<double>::Abs(co(i,
+                        j + 1,
+                        k - 1) + co(i, j - 1, k + 1) - 2 * co(i, j, k));
+               est5 = 0.5 * tbox::MathUtilities<double>::Abs(co(i + 1,
+                        j,
+                        k + 1) + co(i - 1, j, k - 1) - 2 * co(i, j, k));
+               est6 = 0.5 * tbox::MathUtilities<double>::Abs(co(i + 1,
+                        j,
+                        k - 1) + co(i - 1, j, k + 1) - 2 * co(i, j, k));
+               est7 = 0.5 * tbox::MathUtilities<double>::Abs(co(i + 1,
+                        j + 1,
+                        k) + co(i - 1, j - 1, k) - 2 * co(i, j, k));
+               est8 = 0.5 * tbox::MathUtilities<double>::Abs(co(i + 1,
+                        j - 1,
+                        k) + co(i - 1, j + 1, k) - 2 * co(i, j, k));
+               esta = tbox::MathUtilities<double>::Max(est0, est1);
+               estb = tbox::MathUtilities<double>::Max(est2, est3);
+               estc = tbox::MathUtilities<double>::Max(est4, est5);
+               estd = tbox::MathUtilities<double>::Max(est6, est7);
+               este = tbox::MathUtilities<double>::Max(esta, estb);
+               estf = tbox::MathUtilities<double>::Max(estc, estd);
+               estg = tbox::MathUtilities<double>::Max(este, estf);
+               estimate = tbox::MathUtilities<double>::Max(estg, est8);
+               es(i, j, k) = estimate;
+            }
+         }
+      }
+   }
+}
+
+int AdaptivePoisson::computeError(
+   const hier::PatchHierarchy& hierarchy,
+   double* l2norm,
+   double* linorm,
+   tbox::Array<double>& l2norms,
+   tbox::Array<double>& linorms) const
+{
+
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   int ln;
+
+   /*
+    * Compute error on all levels, all patches.
+    */
+   double diff = 0;
+   double l2n = 0, wts = 0, lin = 0;
+   /*
+    * We give wtsum twice the space required so we can combine
+    * the l2norms during the sumReduction, saving a little
+    * parallel overhead.
+    */
+   const int nlevels = hierarchy.getNumberOfLevels();
+   tbox::Array<double> wtsums(2 * nlevels);
+   for (ln = nlevels - 1; ln >= 0; --ln) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy.getPatchLevel(ln);
+
+      double& levelwts(wtsums[ln]);
+      double& levell2n(wtsums[ln + nlevels]); // l2n and wts combined in 1 array.
+      double& levellin(linorms[ln]);
+
+      levell2n = levellin = levelwts = 0.0;
+
+      for (hier::PatchLevel::Iterator p(level); p; p++) {
+         tbox::Pointer<hier::Patch> patch = *p;
+
+         /*
+          * Get the patch data.
+          */
+         tbox::Pointer<pdat::CellData<double> > current_solution =
+            patch->getPatchData(d_scalar_persistent);
+         tbox::Pointer<pdat::CellData<double> > exact_solution =
+            patch->getPatchData(d_exact_persistent);
+         tbox::Pointer<pdat::CellData<double> > weight =
+            patch->getPatchData(d_weight_persistent);
+
+         {
+            const int* lower = &current_solution->getBox().lower()[0];
+            const int* upper = &current_solution->getBox().upper()[0];
+            if (d_dim == tbox::Dimension(2)) {
+               MDA_AccessConst<double, 2, MDA_OrderColMajor<2> > ex =
+                  pdat::ArrayDataAccess::access<2, double>(
+                     exact_solution->getArrayData());
+               MDA_AccessConst<double, 2, MDA_OrderColMajor<2> > co =
+                  pdat::ArrayDataAccess::access<2, double>(
+                     current_solution->getArrayData());
+               MDA_AccessConst<double, 2, MDA_OrderColMajor<2> > wt =
+                  pdat::ArrayDataAccess::access<2, double>(weight->getArrayData());
+               for (int j = lower[1]; j <= upper[1]; ++j) {
+                  for (int i = lower[0]; i <= upper[0]; ++i) {
+                     /*
+                      * Disregard zero weights in error computations
+                      * because they are on coarse grids covered by finer grids.
+                      */
+                     if (wt(i, j) > 0) {
+                        diff =
+                           tbox::MathUtilities<double>::Abs(co(i, j) - ex(i, j));
+                        if (levellin < diff) levellin = diff;
+                        levell2n += wt(i, j) * diff * diff;
+                        levelwts += wt(i, j);
+                     }
+                  }
+               }
+            }
+            if (d_dim == tbox::Dimension(3)) {
+               MDA_AccessConst<double, 3, MDA_OrderColMajor<3> > ex =
+                  pdat::ArrayDataAccess::access<3, double>(
+                     exact_solution->getArrayData());
+               MDA_AccessConst<double, 3, MDA_OrderColMajor<3> > co =
+                  pdat::ArrayDataAccess::access<3, double>(
+                     current_solution->getArrayData());
+               MDA_AccessConst<double, 3, MDA_OrderColMajor<3> > wt =
+                  pdat::ArrayDataAccess::access<3, double>(weight->getArrayData());
+               for (int k = lower[2]; k <= upper[2]; ++k) {
+                  for (int j = lower[1]; j <= upper[1]; ++j) {
+                     for (int i = lower[0]; i <= upper[0]; ++i) {
+                        /*
+                         * Disregard zero weights in error computations
+                         * because they are on coarse grids covered by finer grids.
+                         */
+                        if (wt(i, j, k) > 0) {
+                           diff = tbox::MathUtilities<double>::Abs(co(i,
+                                    j,
+                                    k) - ex(i, j, k));
+                           if (levellin < diff) levellin = diff;
+                           levell2n += wt(i, j, k) * diff * diff;
+                           levelwts += wt(i, j, k);
+                        }
+                     }
+                  }
+               }
+            }
+         }
+      } // end patch loop
+
+   } // end level loop
+
+   if (mpi.getSize() > 1) {
+      /*
+       * Communicate global data if in parallel.
+       * We temporarily combine l2norms and wtsum so we can sumReduction
+       * in one shot, saving some parallel overhead.
+       */
+      if (mpi.getSize() > 1) {
+         mpi.AllReduce(wtsums.getPointer(), 2 * nlevels, MPI_SUM);
+      }
+      if (mpi.getSize() > 1) {
+         mpi.AllReduce(linorms.getPointer(), nlevels, MPI_SUM);
+      }
+   }
+
+   for (ln = 0; ln < nlevels; ++ln) {
+      /* Copy l2norm accumulated temporarily in wtsums */
+      l2norms[ln] = wtsums[ln + nlevels];
+      /* Data for whole hierarchy. */
+      l2n += l2norms[ln];
+      wts += wtsums[ln];
+      lin = linorms[ln] > lin ? linorms[ln] : lin;
+      /*
+       * Data for level ln.
+       * If a level is completely covered by a finer level,
+       * wtsums[ln] will legitimately be zero, so that protect
+       * it from a zero divide.
+       */
+      l2norms[ln] =
+         tbox::MathUtilities<double>::equalEps(wtsums[ln], 0) ? 0 : sqrt(
+            l2norms[ln] / wtsums[ln]);
+
+   }
+
+   if (!tbox::MathUtilities<double>::equalEps(wtsums[ln], 0)) {
+      *l2norm = sqrt(l2n / wts);
+   } else {
+      *l2norm = 0.0;
+   }
+
+   *linorm = lin;
+
+   return 0;
+}
+
+int AdaptivePoisson::solvePoisson(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int max_cycles,
+   double residual_tol,
+   int pre_sweeps,
+   int post_sweeps,
+   std::string initial_u)
+{
+
+   const int finest_ln = hierarchy->getFinestLevelNumber();
+   const int coarsest_ln = 0;
+
+   /*
+    * Allocate scratch data for use in the solve.
+    */
+   for (int ln = coarsest_ln; ln <= finest_ln; ++ln) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+      level->allocatePatchData(d_rhs_scratch);
+   }
+
+   /*
+    * Create vectors x and b for solving Ax=b.
+    */
+   solv::SAMRAIVectorReal<double>
+   x("solution", hierarchy, coarsest_ln, finest_ln),
+   b("rhs", hierarchy, coarsest_ln, finest_ln);
+   x.addComponent(tbox::Pointer<hier::Variable>(&d_scalar, false),
+      d_scalar_persistent, d_weight_persistent);
+   b.addComponent(tbox::Pointer<hier::Variable>(&d_rhs, false),
+      d_rhs_scratch, d_weight_persistent);
+
+   /*
+    * Fill the rhs vector (by filling the d_rhs_scratch data
+    * that forms its component).
+    * Fill the boundary condition coefficient data.
+    */
+   for (int ln = coarsest_ln; ln <= finest_ln; ++ln) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+
+      hier::PatchLevel::Iterator pi;
+      for (pi.initialize(*level); pi; pi++) {
+         tbox::Pointer<hier::Patch> patch = *pi;
+
+         const hier::Box& box = patch->getBox();
+
+         tbox::Pointer<pdat::CellData<double> >
+         source_data = patch->getPatchData(d_constant_source_persistent);
+         tbox::Pointer<pdat::CellData<double> >
+         rhs_data = patch->getPatchData(d_rhs_scratch);
+         tbox::Pointer<pdat::CellData<double> >
+         scalar_data = patch->getPatchData(d_scalar_persistent);
+         math::PatchCellDataOpsReal<double> cell_ops;
+         cell_ops.scale(rhs_data, 1.0, source_data, box);
+
+      }
+   }
+
+   // debug:
+   if (0) {
+      x.setToScalar(1.0);
+      double weightsums =
+         d_fac_ops.computeResidualNorm(x, finest_ln, coarsest_ln);
+      tbox::pout << "weightsums: " << weightsums << std::endl;
+   }
+
+   /*
+    * Fill the vector x with the initial guess, if one is given.
+    * If not given, we assume the initial guess is in place.
+    */
+   if (!initial_u.empty()) {
+      if (initial_u == "random") {
+         x.setRandomValues(1.0, 0.0);
+      } else {
+         x.setToScalar(atof(initial_u.c_str()));
+      }
+   }
+
+   /*
+    * Create the viz data writer for use in debugging.
+    */
+#ifdef HAVE_HDF5
+   d_visit_writer = new appu::VisItDataWriter(d_dim,
+         "Internal VisIt Writer",
+         "ap-debug.visit");
+   registerVariablesWithPlotter(*d_visit_writer);
+#endif
+
+   /*
+    * Set up FAC preconditioner object.
+    */
+   d_fac_preconditioner.setMaxCycles(max_cycles);
+   d_fac_preconditioner.setResidualTolerance(residual_tol);
+   d_fac_preconditioner.setPresmoothingSweeps(pre_sweeps);
+   d_fac_preconditioner.setPostsmoothingSweeps(post_sweeps);
+   if (d_lstream) d_fac_preconditioner.printClassData(*d_lstream);
+   d_fac_preconditioner.initializeSolverState(x, b);
+
+   /*
+    * Solve the system.
+    */
+   d_fac_preconditioner.solveSystem(x, b);
+   if (d_lstream) *d_lstream
+      << "FAC solve completed with\n"
+      << std::setw(30) << "number of iterations: "
+      << d_fac_preconditioner.getNumberOfIterations() << "\n"
+      << std::setw(30) << "residual norm: "
+      << d_fac_preconditioner.getResidualNorm() << "\n"
+      ;
+   d_fac_preconditioner.deallocateSolverState();
+
+   /*
+    * Get data on the solve.
+    */
+   double avg_convergence_factor, final_convergence_factor;
+   d_fac_preconditioner.getConvergenceFactors(avg_convergence_factor,
+      final_convergence_factor);
+   if (d_lstream) *d_lstream
+      << "Final result: \n"
+      << std::setw(30) << "average convergence factor: "
+      << avg_convergence_factor << "\n"
+      << std::setw(30) << "final convergence factor: "
+      << final_convergence_factor << "\n"
+      ;
+
+   /*
+    * Fill in boundary ghosts here to get the correct ghost cells
+    * values used to compute the gradient estimator when plotting.
+    * We are not sure what state ghost cell values are in after
+    * the solver finishes.
+    */
+   {
+      xfer::RefineAlgorithm refiner(d_dim);
+      tbox::Pointer<geom::CartesianGridGeometry>
+      grid_geometry_ = hierarchy->getGridGeometry();
+      geom::CartesianGridGeometry& grid_geometry = *grid_geometry_;
+      tbox::Pointer<xfer::RefineOperator> accurate_refine_op =
+         grid_geometry.
+         lookupRefineOperator(tbox::Pointer<hier::Variable>(&d_scalar, false),
+            "LINEAR_REFINE");
+      TBOX_ASSERT(accurate_refine_op);
+      refiner.registerRefine(d_scalar_persistent,
+         d_scalar_persistent,
+         d_scalar_persistent,
+         accurate_refine_op);
+      d_robin_refine_patch.setTargetDataId(d_scalar_persistent);
+      d_robin_refine_patch.setHomogeneousBc(false);
+      d_robin_refine_patch.setCoefImplementation(d_physical_bc_coef);
+      tbox::Pointer<xfer::RefineSchedule> refine_schedule;
+      for (int ln = coarsest_ln; ln <= finest_ln; ++ln) {
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+         if (ln > 0) {
+            /* Include coarser levels in setting data */
+            refine_schedule =
+               refiner.createSchedule(level,
+                  ln - 1,
+                  hierarchy,
+                  &d_robin_refine_patch);
+         } else {
+            /* Exclude coarser levels in setting data */
+            refine_schedule =
+               refiner.createSchedule(level,
+                  &d_robin_refine_patch);
+         }
+         refine_schedule->fillData(0.0);
+      }
+   }
+   // x.print(plog,false);
+
+   /*
+    * Deallocate scratch data.
+    */
+   for (int ln = coarsest_ln; ln <= finest_ln; ++ln) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+      level->deallocatePatchData(d_rhs_scratch);
+   }
+
+#ifdef HAVE_HDF5
+   /*
+    * Destroy the viz data writer used for debugging.
+    */
+   d_visit_writer.setNull();
+#endif
+
+   return 0;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/AdaptivePoisson.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/AdaptivePoisson.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,388 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AdaptivePoisson class declaration 
+ *
+ ************************************************************************/
+#ifndef included_AdaptivePoisson
+#define included_AdaptivePoisson
+
+#include "SAMRAI/solv/PoissonSpecifications.h"
+#include "SAMRAI/solv/CellPoissonFACOps.h"
+#include "SAMRAI/tbox/Dimension.h"
+#include "PoissonSineSolution.h"
+#include "PoissonPolynomialSolution.h"
+#include "PoissonGaussianDiffcoefSolution.h"
+#include "PoissonGaussianSolution.h"
+#include "PoissonMultigaussianSolution.h"
+
+#include <string>
+
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Database.h"
+
+/*
+ * SAMRAI classes
+ */
+#include "SAMRAI/appu/VisItDataWriter.h"
+#include "SAMRAI/appu/VisDerivedDataStrategy.h"
+#include "SAMRAI/geom/CartesianCellDoubleConservativeLinearRefine.h"
+#include "SAMRAI/geom/CartesianCellDoubleLinearRefine.h"
+#include "SAMRAI/geom/CartesianCellDoubleWeightedAverage.h"
+#include "SAMRAI/geom/CartesianSideDoubleWeightedAverage.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/CoarseFineBoundary.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/mesh/StandardTagAndInitStrategy.h"
+#include "SAMRAI/pdat/CellDoubleConstantRefine.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "SAMRAI/pdat/OutersideVariable.h"
+#include "SAMRAI/solv/CartesianRobinBcHelper.h"
+#include "SAMRAI/solv/FACPreconditioner.h"
+#include "SAMRAI/solv/GhostCellRobinBcCoefs.h"
+#include "SAMRAI/solv/RobinBcCoefStrategy.h"
+#include "SAMRAI/solv/SAMRAIVectorReal.h"
+#include "SAMRAI/xfer/RefinePatchStrategy.h"
+
+using namespace SAMRAI;
+
+/*!
+ * @brief Class to solve Poisson's equation on a SAMR grid.
+ *
+ * This class tests the FAC solver class solving
+ * Poisson's equation on a SAMR grid.
+ *
+ * This class inherits and implements virtual functions from
+ * mesh::StandardTagAndInitStrategy to initialize data
+ * on the SAMR grid.
+ */
+class AdaptivePoisson:
+   public mesh::StandardTagAndInitStrategy,
+   public appu::VisDerivedDataStrategy
+{
+
+public:
+   /*!
+    * @brief Constructor.
+    *
+    * Requirements:
+    * - the referenced objects
+    *
+    * Actions:
+    * - Set up private member data
+    *
+    * If you want standard output and logging,
+    * pass in valid pointers for those streams.
+    */
+   AdaptivePoisson(
+      const std::string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Database& database,
+      /*! Standard output stream */ std::ostream* out_stream = NULL,
+      /*! Log output stream */ std::ostream* log_stream = NULL);
+
+   //@{ @name mesh::StandardTagAndInitStrategy virtuals
+
+public:
+   /*!
+    * @brief Allocate and initialize data for a new level
+    * in the patch hierarchy.
+    *
+    * This is where you implement the code for initialize data on the
+    * grid.  Nevermind when it is called or where in the program that
+    * happens.  All the information you need to initialize the grid
+    * are in the arguments.
+    *
+    * @see mesh::StandardTagAndInitStrategy::initializeLevelData()
+    */
+   virtual void
+   initializeLevelData(
+      /*! Hierarchy to initialize */
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      /*! Level to initialize */
+      const int level_number,
+      const double init_data_time,
+      const bool can_be_refined,
+      /*! Whether level is being introduced for the first time */
+      const bool initial_time,
+      /*! Level to copy data from */
+      const tbox::Pointer<hier::BasePatchLevel> old_level =
+         tbox::Pointer<hier::BasePatchLevel>((0)),
+      /*! Whether data on new patch needs to be allocated */
+      const bool allocate_data = true);
+
+   virtual void
+   resetHierarchyConfiguration(
+      /*! New hierarchy */
+      tbox::Pointer<hier::BasePatchHierarchy> new_hierarchy,
+      /*! Coarsest level */ int coarsest_level,
+      /*! Finest level */ int finest_level);
+
+   virtual void
+   applyGradientDetector(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double error_data_time,
+      const int tag_index,
+      const bool initial_time,
+      const bool uses_richardson_extrapolation);
+
+   //@}
+
+#if 0
+   //@{
+   /*!
+    * @name Functions inherited from solv::CellPoissonFACOps
+    */
+   virtual void
+   postprocessOneCycle(
+      int iteration_num,
+      const solv::SAMRAIVectorReal<double>& current_soln,
+      const solv::SAMRAIVectorReal<double>& residual);
+   //@}
+#endif
+
+   //@{ @name appu::VisDerivedDataStrategy virtuals
+
+   virtual bool
+   packDerivedDataIntoDoubleBuffer(
+      double* buffer,
+      const hier::Patch& patch,
+      const hier::Box& region,
+      const std::string& variable_name,
+      int depth_id) const;
+
+   //@}
+
+public:
+   /*!
+    * @brief Solve using FAC solver.
+    *
+    * Set up the linear algebra problem and use a
+    * solv::FACPreconditioner object to solve it.
+    *
+    * @param hierarchy the hierarchy to solve on
+    * @param max_cycle max number of FAC cycles to use
+    * @param pre_sweeps number of presmoothing sweeps to use
+    * @param pre_sweeps number of postsmoothing sweeps to use
+    * @param initial_u how to set the initial guess for u.
+    *       A std::string is used so the option "random" can be
+    *       used.  If "random" is not used, set the std::string
+    *       to a floating point number.
+    */
+   int
+   solvePoisson(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int max_cycles = 10,
+      double residual_tol = 1e-6,
+      int pre_sweeps = 5,
+      int post_sweeps = 5,
+      std::string initial_u = std::string("0.0"));
+
+#ifdef HAVE_HDF5
+   /*!
+    * @brief Tell a plotter which data to write for this class.
+    */
+   int
+   registerVariablesWithPlotter(
+      appu::VisItDataWriter& visit_writer);
+#endif
+
+   /*!
+    * @brief Compute the error of the current solution.
+    *
+    * Compute the @f$L_2 at f$ and @f$L_\infty at f$ norms of the error,
+    * for each level and over all levels.
+    */
+   int
+   computeError(
+      /*! hierarchy */ const hier::PatchHierarchy& hierarchy,
+      /*! L2 norm */ double* l2norm,
+      /*! L-inf norm */ double* linorm,
+      /*! L2 norm on each level */ tbox::Array<double>& l2norms,
+      /*! L-inf norm on each level */ tbox::Array<double>& linorms) const;
+
+   /*!
+    * @brief Compute error estimator (for adaption or plotting).
+    *
+    * Computes in the box defined by @c estimate_data.
+    */
+   void
+   computeAdaptionEstimate(
+      pdat::CellData<double>& estimate_data,
+      const pdat::CellData<double>& soln_cell_data) const;
+
+private:
+   std::string d_name;
+   const tbox::Dimension d_dim;
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+
+   //@{
+   /*!
+    * @name Major algorithm objects.
+    */
+
+   solv::CellPoissonFACOps d_fac_ops;
+
+   solv::FACPreconditioner d_fac_preconditioner;
+
+   //@}
+
+   //@{
+
+   /*!
+    * @name Private state variables for solution.
+    */
+
+   /*!
+    * @brief Context for persistent data.
+    */
+   hier::VariableContext d_context_persistent;
+
+   /*!
+    * @brief Context for scratch data.
+    */
+   hier::VariableContext d_context_scratch;
+
+   /*!
+    * @brief Diffusion coefficient.
+    */
+   pdat::SideVariable<double> d_diffcoef;
+
+   /*!
+    * @brief Flux.
+    */
+   pdat::SideVariable<double> d_flux;
+
+   /*!
+    * @brief Scalar solution of Poisson's equation.
+    */
+   pdat::CellVariable<double> d_scalar;
+
+   /*!
+    * @brief Source for Poisson's equation.
+    */
+   pdat::CellVariable<double> d_constant_source;
+
+   /*!
+    * @brief Linear source operator for linear system.
+    */
+   pdat::CellVariable<double> d_ccoef;
+
+   /*!
+    * @brief Right hand side for linear system.
+    */
+   pdat::CellVariable<double> d_rhs;
+
+   /*!
+    * @brief Exact solution.
+    */
+   pdat::CellVariable<double> d_exact;
+
+   /*!
+    * @brief Residual.
+    */
+   tbox::Pointer<pdat::CellVariable<double> > d_resid;
+
+   /*!
+    * @brief Vector weights.
+    *
+    * For cells not covered by a finer cell, the weight
+    * is the volume.  For cells that are, the weight is zero.
+    * This is used in computing norms on the AMR grid.
+    */
+   pdat::CellVariable<double> d_weight;
+
+   /*!
+    * @brief Saved variable-context index.
+    *
+    * Because we refer to them often, variable-context indices are saved.
+    * They are initialized in the constructor and never change.
+    * Each index represents a variable-context pair in this class.
+    * Thus the indices are @em not independent state variables.
+    * If we had to set them, we need the associated variable and
+    * context (and the variable database which manages the mapping).
+    * See the hier::VariableDatabase class for more into.
+    */
+   int d_scalar_persistent, d_diffcoef_persistent,
+       d_constant_source_persistent, d_weight_persistent,
+       d_exact_persistent, d_rhs_scratch, d_resid_scratch,
+       d_flux_persistent, d_ccoef_persistent;
+
+   //@}
+
+   //@{
+private:
+   /*!
+    * @name Output streams.
+    */
+   /*!
+    * @brief Output stream pointer.
+    *
+    * If set to NULL, no output.
+    */
+   std::ostream* d_ostream;
+
+   /*!
+    * @brief Log stream pointer.
+    *
+    * If set to NULL, no logging.
+    */
+   std::ostream* d_lstream;
+   //@}
+
+   //@{
+   /*!
+    * @name Miscellaneous.
+    */
+   std::string d_problem_name;
+   //! @brief Poisson equation specifications.
+   solv::PoissonSpecifications d_sps;
+   //! @brief Things specific to the sinusoid solution
+   PoissonSineSolution d_sine_solution;
+   //! @brief Things specific to the Gaussian solution
+   PoissonGaussianSolution d_gaussian_solution;
+   //! @brief Things specific to the multi-Gaussian solution
+   PoissonMultigaussianSolution d_multigaussian_solution;
+   //! @brief Things specific to the polynomial solution
+   PoissonPolynomialSolution d_polynomial_solution;
+   //! @brief Things specific to the Gaussian coefficient solution
+   PoissonGaussianDiffcoefSolution d_gaussian_diffcoef_solution;
+   /*!
+    * @brief Generic xfer::RefinePatchStrategy implementation for Robin bc.
+    */
+   solv::CartesianRobinBcHelper d_robin_refine_patch;
+   /*!
+    * @brief Physical bc coefficient strategy selecting one of the solutions'.
+    */
+   solv::RobinBcCoefStrategy* d_physical_bc_coef;
+   //@}
+
+   double d_adaption_threshold;
+
+   int d_finest_plot_level;
+
+   //@{
+private:
+   /*!
+    * @name Objects to help debugging.
+    */
+#ifdef HAVE_HDF5
+   tbox::Pointer<appu::VisItDataWriter> d_visit_writer;
+#endif
+   int d_finest_dbg_plot_ln;
+   //@}
+
+};
+
+#endif  // included_AdaptivePoisson
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/GaussianFcn.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/GaussianFcn.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,181 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Gaussian function support for FAC solver tests. 
+ *
+ ************************************************************************/
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "GaussianFcn.h"
+#include <math.h>
+#include <stdlib.h>
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <string>
+#include <string.h>
+
+/*
+ * Temporary fix for g++ lacking instantiations when --no-implicit-templates
+ * is used (by SAMRAI)
+ */
+#define fill_n(p, n, v) { size_t _i; for (_i = 0; _i < n; ++_i) p[_i] = v; }
+#define copy_n(s, n, d) { size_t _i; for (_i = 0; _i < n; ++_i) d[_i] = s[_i]; }
+
+GaussianFcn::GaussianFcn():
+   d_dim(2),
+   d_amp(1.0),
+   d_lambda(-1.0)
+{
+   fill_n(d_center, d_dim.getValue(), 0.0)
+}
+
+GaussianFcn::GaussianFcn(
+   const tbox::Dimension& dim):
+   d_dim(dim),
+   d_amp(1.0),
+   d_lambda(-1.0)
+{
+   fill_n(d_center, d_dim.getValue(), 0.0)
+}
+
+int GaussianFcn::setAmplitude(
+   const double amp) {
+   d_amp = amp;
+   return 0;
+}
+
+int GaussianFcn::setLambda(
+   const double lambda) {
+   d_lambda = lambda;
+   return 0;
+}
+
+int GaussianFcn::setCenter(
+   const double* center) {
+   for (size_t i = 0; i < d_dim.getValue(); ++i) d_center[i] = center[i];
+   return 0;
+}
+
+double GaussianFcn::getAmplitude() const {
+   return d_amp;
+}
+
+double GaussianFcn::getLambda() const {
+   return d_lambda;
+}
+
+int GaussianFcn::getCenter(
+   double* center) const {
+   for (size_t i = 0; i < d_dim.getValue(); ++i) center[i] = d_center[i];
+   return 0;
+}
+
+double GaussianFcn::operator () (
+   double x) const {
+   TBOX_ASSERT(d_dim == tbox::Dimension(1));
+   double rval;
+   rval = (x - d_center[0]) * (x - d_center[0]);
+   rval = exp(d_lambda * rval);
+   return rval;
+}
+double GaussianFcn::operator () (
+   double x,
+   double y) const {
+   TBOX_ASSERT(d_dim == tbox::Dimension(2));
+   double rval;
+   rval =
+      (x
+       - d_center[0])
+      * (x - d_center[0]) + (y - d_center[1]) * (y - d_center[1]);
+   rval = exp(d_lambda * rval);
+   return rval;
+}
+double GaussianFcn::operator () (
+   double x,
+   double y,
+   double z) const {
+   TBOX_ASSERT(d_dim == tbox::Dimension(3));
+   double rval;
+   rval =
+      (x - d_center[0]) * (x - d_center[0])
+      + (y - d_center[1]) * (y - d_center[1])
+      + (z - d_center[2]) * (z - d_center[2]);
+   rval = exp(d_lambda * rval);
+   return rval;
+}
+
+GaussianFcn& GaussianFcn::operator = (
+   const GaussianFcn& r) {
+   TBOX_ASSERT(d_dim == r.d_dim);
+   d_amp = r.d_amp;
+   d_lambda = r.d_lambda;
+   for (int i = 0; i < d_dim.getValue(); ++i) {
+      d_center[i] = r.d_center[i];
+   }
+   return *this;
+}
+
+#define EAT_WS(s) \
+   { while (s.peek() == ' '                     \
+            || s.peek() == '\t'                    \
+            || s.peek() == '\n') { s.get(); } }
+
+std::istream& operator >> (
+   std::istream& ci,
+   GaussianFcn& gf) {
+   fill_n(gf.d_center, gf.d_dim.getValue(), 0.0)
+   gf.d_amp = 1.0;
+   gf.d_lambda = -1.0;
+   char dummy, name[6];
+   EAT_WS(ci) // ci >> std::noskipws; // ci.ipfx(0);
+   ci >> dummy;
+   TBOX_ASSERT(dummy == '{');
+   EAT_WS(ci) // ci >> std::noskipws; // ci.ipfx(0);
+   while (ci.peek() != '}') {
+      ci.read(name, 2);
+      if (name[0] == 'l') {
+         // Expect form lambda=<float>
+         ci.read(name, 5);
+         TBOX_ASSERT(!strncmp(name, "mbda=", 5));
+         ci >> gf.d_lambda;
+         EAT_WS(ci) // ci >> std::noskipws; // ci.ipfx(0);
+      } else if (name[0] == 'a') {
+         // Expect form amp=<float>
+         ci.read(name, 2);
+         TBOX_ASSERT(!strncmp(name, "p=", 2));
+         ci >> gf.d_amp;
+         EAT_WS(ci) // ci >> std::noskipws; // ci.ipfx(0);
+      } else if (name[0] == 'c') {
+         // Expect form c[xyz]=<float>
+         int dim(name[1] == 'x' ? 0 :
+                 name[1] == 'y' ? 1 :
+                 name[1] == 'z' ? 2 : 3);
+         TBOX_ASSERT(dim < gf.d_dim.getValue());
+         ci >> dummy;
+         TBOX_ASSERT(dummy == '=');
+         ci >> gf.d_center[dim];
+         EAT_WS(ci) // ci >> std::noskipws; // ci.ipfx(0);
+      } else {
+         abort();
+      }
+   }
+   return ci;
+}
+
+std::ostream& operator << (
+   std::ostream& co,
+   const GaussianFcn& gf) {
+   co << "{ amp=" << gf.d_amp << " lambda=" << gf.d_lambda
+   << " cx=" << gf.d_center[0];
+   if (gf.d_dim >= tbox::Dimension(2)) {
+      co << " cy=" << gf.d_center[1];
+   }
+   if (gf.d_dim >= tbox::Dimension(3)) {
+      co << " cz=" << gf.d_center[2];
+   }
+   co << " }";
+   return co;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/GaussianFcn.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/GaussianFcn.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,155 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Gaussian function support for FAC solver tests. 
+ *
+ ************************************************************************/
+#ifndef included_GaussianFcn_h
+#define included_GaussianFcn_h
+
+#include "SAMRAI/tbox/Dimension.h"
+#include <iostream>
+
+using namespace SAMRAI;
+
+/*!
+ * @brief Gaussian function functor.
+ *
+ * Computes the function
+ * @f[ e^{ \lambda |r-r_0|^2 } @f]
+ *
+ * lambda is generally, but not necessarily, negative.
+ *
+ * This functor exists for convenience, not efficiency.
+ * If you use it heavily, you can improve your efficiency
+ * by replacing its usage with lower level codes.
+ */
+class GaussianFcn
+{
+
+public:
+   GaussianFcn();
+   GaussianFcn(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Return the function value.
+    */
+   double
+   operator () (
+      double x) const;
+   double
+   operator () (
+      double x,
+      double y) const;
+   double
+   operator () (
+      double x,
+      double y,
+      double z) const;
+
+   /*!
+    * @brief Set amplitude.
+    */
+   int
+   setAmplitude(
+      const double amp);
+
+   /*!
+    * @brief Set all wave numbers.
+    *
+    * Wave numbers should be given in half-cycles, i.e., 1 -> @f$\pi at f$.
+    */
+   int
+   setLambda(
+      const double lambda);
+
+   /*!
+    * @brief Set all phase angles.
+    *
+    * Wave numbers should be given in half-cycles, i.e., 1 -> @f$\pi at f$.
+    */
+   int
+   setCenter(
+      const double* center);
+
+   /*!
+    * @brief Get amplitude.
+    */
+   double
+   getAmplitude() const;
+
+   /*!
+    * @brief Get lambda.
+    */
+   double
+   getLambda() const;
+
+   /*!
+    * @brief Get center coordinates.
+    */
+   int
+   getCenter(
+      double* center) const;
+
+   GaussianFcn&
+   operator = (
+      const GaussianFcn& r);
+
+   //@{
+   /*!
+    * @name IO operators.
+    */
+   /*!
+    * @brief Input from stream.
+    *
+    * Stream extract function reads input in the format used
+    * by the stream insert function (see
+    * opertor<<(std::ostream&, GaussianFcn &).
+    * Except for allowing for missing centers (set to zero)
+    * and lambda (set to 1), this function requires the correct
+    * syntax or the result is undefined.
+    *
+    * @see GaussianFcn::ctype
+    */
+   friend std::istream&
+   operator >> (
+      std::istream& ci,
+      GaussianFcn& cf);
+   /*!
+    * @brief Output to stream.
+    *
+    * Outputs sets of name=double values where the name is one
+    * of nx, px, ny, nz or pz, and the double is the value of
+    * the coefficient.
+    *
+    * Format of output with example values is
+    * @verbatim
+    * { lambda=1.0 cx=0 cy=0.0 cz=0.0 }
+    * @endverbatim
+    * where cx, cy and cz are the center of the Gaussian function.
+    *
+    * @see GaussianFcn::ctype
+    */
+   friend std::ostream&
+   operator << (
+      std::ostream& co,
+      const GaussianFcn& cf);
+   //@}
+
+private:
+   const tbox::Dimension d_dim;
+
+   //! Amplitude
+   double d_amp;
+   //! Center
+   double d_center[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   //! Lambda
+   double d_lambda;
+
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,2215 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=AdaptivePoisson.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianCellDoubleConservativeLinearRefine.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianCellDoubleLinearRefine.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianCellDoubleWeightedAverage.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianSideDoubleWeightedAverage.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/CoarseFineBoundary.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataAccess.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MDA_Access.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CartesianRobinBcHelper.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACOps.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACOperatorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/GhostCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SimpleCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	AdaptivePoisson.C AdaptivePoisson.h GaussianFcn.h		\
+	PoissonGaussianDiffcoefSolution.h PoissonGaussianSolution.h	\
+	PoissonMultigaussianSolution.h PoissonPolynomialSolution.h	\
+	PoissonSineSolution.h QuarticFcn.h SinusoidFcn.h patchFcns.h	\
+	printObject.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=GaussianFcn.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h GaussianFcn.C		\
+	GaussianFcn.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=PoissonGaussianDiffcoefSolution.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataAccess.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MDA_Access.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h GaussianFcn.h	\
+	PoissonGaussianDiffcoefSolution.C				\
+	PoissonGaussianDiffcoefSolution.h QuarticFcn.h SinusoidFcn.h	\
+	patchFcns.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=PoissonGaussianSolution.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataAccess.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MDA_Access.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h GaussianFcn.h	\
+	PoissonGaussianSolution.C PoissonGaussianSolution.h QuarticFcn.h\
+	SinusoidFcn.h patchFcns.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
+FILE_4=PoissonMultigaussianSolution.o
+DEPENDS_4:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataAccess.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MDA_Access.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h GaussianFcn.h	\
+	PoissonMultigaussianSolution.C PoissonMultigaussianSolution.h	\
+	QuarticFcn.h SinusoidFcn.h patchFcns.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_4 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_4:X.o=${NDIM}.o}: ${DEPENDS_4}
+
+FILE_5=PoissonPolynomialSolution.o
+DEPENDS_5:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataAccess.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MDA_Access.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	PoissonPolynomialSolution.C PoissonPolynomialSolution.h		\
+	QuarticFcn.h SinusoidFcn.h patchFcns.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_5 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_5:X.o=${NDIM}.o}: ${DEPENDS_5}
+
+FILE_6=PoissonSineSolution.o
+DEPENDS_6:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataAccess.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MDA_Access.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	PoissonSineSolution.C PoissonSineSolution.h QuarticFcn.h	\
+	SinusoidFcn.h patchFcns.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_6 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_6:X.o=${NDIM}.o}: ${DEPENDS_6}
+
+FILE_7=QuarticFcn.o
+DEPENDS_7:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h QuarticFcn.C QuarticFcn.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_7 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_7:X.o=${NDIM}.o}: ${DEPENDS_7}
+
+FILE_8=SinusoidFcn.o
+DEPENDS_8:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h SinusoidFcn.C		\
+	SinusoidFcn.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_8 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_8:X.o=${NDIM}.o}: ${DEPENDS_8}
+
+FILE_9=get-input-filename.o
+DEPENDS_9:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h get-input-filename.C	\
+	get-input-filename.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_9 +=\
+	
+endif
+
+${FILE_9:X.o=${NDIM}.o}: ${DEPENDS_9}
+
+FILE_10=main.o
+DEPENDS_10:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianCellDoubleConservativeLinearRefine.h\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianCellDoubleLinearRefine.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianCellDoubleWeightedAverage.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianSideDoubleWeightedAverage.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/CoarseFineBoundary.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BergerRigoutsos.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CartesianRobinBcHelper.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACOps.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACOperatorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/GhostCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SimpleCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	AdaptivePoisson.h GaussianFcn.h					\
+	PoissonGaussianDiffcoefSolution.h PoissonGaussianSolution.h	\
+	PoissonMultigaussianSolution.h PoissonPolynomialSolution.h	\
+	PoissonSineSolution.h QuarticFcn.h SinusoidFcn.h		\
+	get-input-filename.h main.C printObject.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_10 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_10:X.o=${NDIM}.o}: ${DEPENDS_10}
+
+FILE_11=patchFcns.o
+DEPENDS_11:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataAccess.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MDA_Access.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h QuarticFcn.h		\
+	SinusoidFcn.h patchFcns.C setArrayData.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_11 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_11:X.o=${NDIM}.o}: ${DEPENDS_11}
+
+FILE_12=printObject.o
+DEPENDS_12:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MDA_Access.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h printObject.C		\
+	printObject.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_12 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_12:X.o=${NDIM}.o}: ${DEPENDS_12}
+
+FILE_13=setArrayData.o
+DEPENDS_13:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MDA_Access.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h QuarticFcn.h		\
+	SinusoidFcn.h setArrayData.C setArrayData.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_13 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_13:X.o=${NDIM}.o}: ${DEPENDS_13}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,81 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for the FAC test directory 
+##
+#########################################################################
+
+SAMRAI	      = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/test/FAC_adaptive
+VPATH         = @srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+default: check
+
+include $(OBJECT)/config/Makefile.config
+
+CPPFLAGS_EXTRA= -DTESTING=1
+
+
+NUM_TESTS = 15
+
+TEST_NPROCS = @TEST_NPROCS@
+
+CXX_OBJS      = main.o AdaptivePoisson.o \
+	get-input-filename.o \
+	printObject.o \
+	patchFcns.o \
+	setArrayData.o \
+	SinusoidFcn.o \
+	GaussianFcn.o \
+	QuarticFcn.o \
+	PoissonSineSolution.o \
+	PoissonGaussianDiffcoefSolution.o \
+	PoissonGaussianSolution.o \
+	PoissonMultigaussianSolution.o \
+	PoissonPolynomialSolution.o
+
+main:	$(CXX_OBJS) $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS)	\
+	$(LIBSAMRAI3D) $(LIBSAMRAI) $(LDLIBS) -o main
+
+check:
+	$(MAKE) check2d
+	$(MAKE) check3d
+
+check2d:	main
+	@for i in test_inputs/*.2d.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+check3d:	main
+	@for i in test_inputs/*.3d.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+checkcompile: main
+
+checktest:
+	rm -f makecheck.logfile
+	$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+	$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+	rm -f makecheck.logfile
+
+examples:
+
+clean-check:
+	$(SAMCLEAN)
+
+clean:
+	$(SAMCLEAN)
+	$(RM) *.f *main* 
+	$(RM) -rf restart-*d*
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/PoissonGaussianDiffcoefSolution.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/PoissonGaussianDiffcoefSolution.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,494 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   PoissonGaussianDiffcoefSolution class implementation 
+ *
+ ************************************************************************/
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/ArrayDataAccess.h"
+#include "patchFcns.h"
+#include "PoissonGaussianDiffcoefSolution.h"
+#include STL_SSTREAM_HEADER_FILE
+
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+
+using namespace SAMRAI;
+
+PoissonGaussianDiffcoefSolution::PoissonGaussianDiffcoefSolution(
+   const tbox::Dimension& dim):
+   d_dim(dim),
+   d_gcomp(dim),
+   d_sscomp(dim),
+   d_cscomp(dim),
+   d_sccomp(dim)
+{
+}
+
+PoissonGaussianDiffcoefSolution::PoissonGaussianDiffcoefSolution(
+   const std::string& object_name
+   ,
+   const tbox::Dimension& dim
+   ,
+   tbox::Database& database
+   , /*! Standard output stream */
+   std::ostream* out_stream
+   , /*! Log output stream */
+   std::ostream* log_stream):
+   d_dim(dim),
+   d_gcomp(dim),
+   d_sscomp(dim),
+   d_cscomp(dim),
+   d_sccomp(dim)
+{
+   (void)object_name;
+   (void)out_stream;
+   (void)log_stream;
+
+   setFromDatabase(database);
+}
+
+PoissonGaussianDiffcoefSolution::~PoissonGaussianDiffcoefSolution()
+{
+}
+
+void PoissonGaussianDiffcoefSolution::setFromDatabase(
+   tbox::Database& database)
+{
+   std::string istr;
+   int i;
+   {
+      // Get the gaussian component.
+      istr = database.getStringWithDefault("GaussianFcnControl", "{}");
+      std::istringstream ist(istr);
+      ist >> d_gcomp;
+      d_lambda = d_gcomp.getLambda();
+   }
+   {
+      // Get the sine-sine component.
+      istr = database.getStringWithDefault("SinusoidFcnControl", "{}");
+      std::istringstream ist(istr);
+      ist >> d_sscomp;
+      d_sscomp.getWaveNumbers(d_k);
+      d_sscomp.getPhaseAngles(d_p);
+      d_k2 = 0;
+      for (i = 0; i < d_dim.getValue(); ++i) {
+         d_k[i] *= M_PI;
+         d_p[i] *= M_PI;
+         d_k2 += d_k[i] * d_k[i];
+      }
+   }
+   {
+      // Compute the cosine-sine component.
+      d_cscomp = d_sscomp;
+      double new_phase_angles[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      d_cscomp.getPhaseAngles(new_phase_angles);
+      new_phase_angles[0] -= 0.5;
+      d_cscomp.setPhaseAngles(new_phase_angles);
+   }
+}
+
+double PoissonGaussianDiffcoefSolution::diffcoefFcn(
+   double x,
+   double y) const {
+   return d_gcomp(x, y);
+}
+
+double PoissonGaussianDiffcoefSolution::diffcoefFcn(
+   double x,
+   double y,
+   double z) const {
+   return d_gcomp(x, y, z);
+}
+
+double PoissonGaussianDiffcoefSolution::exactFcn(
+   double x,
+   double y) const {
+   return d_sscomp(x, y);
+}
+
+double PoissonGaussianDiffcoefSolution::exactFcn(
+   double x,
+   double y,
+   double z) const {
+   return d_sscomp(x, y, z);
+}
+
+double PoissonGaussianDiffcoefSolution::sourceFcn(
+   double x,
+   double y) const {
+   double rval;
+   double trig_arg[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   d_sscomp.getPhaseAngles(trig_arg);
+   double gauss_ctr[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   d_gcomp.getCenter(gauss_ctr);
+   trig_arg[0] += d_k[0] * x;
+   trig_arg[1] += d_k[1] * y;
+   double sx = sin(trig_arg[0]), cx = cos(trig_arg[0]);
+   double sy = sin(trig_arg[1]), cy = cos(trig_arg[1]);
+   rval = d_k[0] * (x - gauss_ctr[0]) * cx * sy;
+   rval += d_k[1] * (y - gauss_ctr[1]) * sx * cy;
+   rval *= 2 * d_gcomp.getLambda();
+   rval -= d_k2 * sx * sy;
+   rval *= d_gcomp(x, y);
+   return rval;
+}
+
+double PoissonGaussianDiffcoefSolution::sourceFcn(
+   double x,
+   double y,
+   double z) const {
+   double rval;
+   double trig_arg[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   d_sscomp.getPhaseAngles(trig_arg);
+   double gauss_ctr[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   d_gcomp.getCenter(gauss_ctr);
+   trig_arg[0] += d_k[0] * x;
+   trig_arg[1] += d_k[1] * y;
+   trig_arg[2] += d_k[2] * z;
+   double sx = sin(trig_arg[0]), cx = cos(trig_arg[0]);
+   double sy = sin(trig_arg[1]), cy = cos(trig_arg[1]);
+   double sz = sin(trig_arg[2]), cz = cos(trig_arg[2]);
+   rval = d_k[0] * (x - gauss_ctr[0]) * cx * sy * sz;
+   rval += d_k[1] * (y - gauss_ctr[1]) * sx * cy * sz;
+   rval += d_k[2] * (z - gauss_ctr[2]) * sx * sy * cz;
+   rval *= 2 * d_gcomp.getLambda();
+   rval -= d_k2 * sx * sy * sz;
+   rval *= d_gcomp(x, y, z);
+   return rval;
+}
+
+void PoissonGaussianDiffcoefSolution::setPoissonSpecifications(
+   solv::PoissonSpecifications& sps,
+   int C_patch_data_id,
+   int D_patch_data_id) const
+{
+   (void)C_patch_data_id;
+   (void)D_patch_data_id;
+
+   sps.setDPatchDataId(D_patch_data_id);
+   sps.setCZero();
+}
+
+void PoissonGaussianDiffcoefSolution::setGridData(
+   hier::Patch& patch,
+   pdat::SideData<double>& diffcoef_data,
+   pdat::CellData<double>& ccoef_data,
+   pdat::CellData<double>& exact_data,
+   pdat::CellData<double>& source_data)
+{
+   (void)ccoef_data;
+   (void)diffcoef_data;
+   (void)exact_data;
+   (void)source_data;
+
+   tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+
+   const double* h = patch_geom->getDx();
+   const double* xl = patch_geom->getXLower();
+   const int* il = &patch.getBox().lower()[0];
+   int axis;
+   {
+      /* Set diffusion coefficients on each side at a time. */
+      for (axis = 0; axis < d_dim.getValue(); ++axis) {
+         double sl[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]; // Like XLower, except for side.
+         int j;
+         for (j = 0; j < d_dim.getValue(); ++j) {
+            sl[j] = j != axis ? xl[j] + 0.5 * h[j] : xl[j];
+         }
+         pdat::SideData<double>::Iterator iter(patch.getBox(), axis);
+         if (d_dim == tbox::Dimension(2)) {
+            double x, y;
+            for ( ; iter; iter++) {
+               const pdat::SideIndex& index = *iter;
+               x = sl[0] + (index[0] - il[0]) * h[0];
+               y = sl[1] + (index[1] - il[1]) * h[1];
+               diffcoef_data(index) = diffcoefFcn(x, y);
+            }
+         } else if (d_dim == tbox::Dimension(3)) {
+            double x, y, z;
+            for ( ; iter; iter++) {
+               const pdat::SideIndex& index = *iter;
+               x = sl[0] + (index[0] - il[0]) * h[0];
+               y = sl[1] + (index[1] - il[1]) * h[1];
+               z = sl[2] + (index[2] - il[2]) * h[2];
+               diffcoef_data(index) = diffcoefFcn(x, y, z);
+            }
+         }
+      }
+   }
+   {
+      /* Set cell-centered data. */
+      double sl[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]; // Like XLower, except for cell.
+      int j;
+      for (j = 0; j < d_dim.getValue(); ++j) {
+         sl[j] = xl[j] + 0.5 * h[j];
+      }
+      pdat::CellData<double>::Iterator iter(patch.getBox());
+      if (d_dim == tbox::Dimension(2)) {
+         double x, y;
+         for ( ; iter; iter++) {
+            const pdat::CellIndex& index = *iter;
+            x = sl[0] + (index[0] - il[0]) * h[0];
+            y = sl[1] + (index[1] - il[1]) * h[1];
+            exact_data(index) = exactFcn(x, y);
+            source_data(index) = sourceFcn(x, y);
+         }
+      } else if (d_dim == tbox::Dimension(3)) {
+         double x, y, z;
+         for ( ; iter; iter++) {
+            const pdat::CellIndex& index = *iter;
+            x = sl[0] + (index[0] - il[0]) * h[0];
+            y = sl[1] + (index[1] - il[1]) * h[1];
+            z = sl[2] + (index[2] - il[2]) * h[2];
+            exact_data(index) = exactFcn(x, y, z);
+            source_data(index) = sourceFcn(x, y, z);
+         }
+      }
+   }
+}       // End patch loop.
+
+std::ostream& operator << (
+   std::ostream& os,
+   const PoissonGaussianDiffcoefSolution& r) {
+   os << r.d_gcomp << "\n";
+   os << r.d_sscomp << "\n";
+   os << r.d_cscomp << "\n";
+   os << r.d_sccomp << "\n";
+   return os;
+}
+
+void PoissonGaussianDiffcoefSolution::setBcCoefs(
+   tbox::Pointer<pdat::ArrayData<double> >& acoef_data,
+   tbox::Pointer<pdat::ArrayData<double> >& bcoef_data,
+   tbox::Pointer<pdat::ArrayData<double> >& gcoef_data,
+   const tbox::Pointer<hier::Variable>& variable,
+   const hier::Patch& patch,
+   const hier::BoundaryBox& bdry_box,
+   const double fill_time) const
+{
+   (void)variable;
+   (void)fill_time;
+
+   tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   /*
+    * Set to an inhomogeneous Dirichlet boundary condition.
+    */
+   hier::Box patch_box(patch.getBox());
+
+   const double* xlo = patch_geom->getXLower();
+   const double* xup = patch_geom->getXUpper();
+   const double* dx = patch_geom->getDx();
+
+   if (bdry_box.getBoundaryType() != 1) {
+      // Must be a face boundary.
+      TBOX_ERROR("Bad boundary type in\n"
+         << "PoissonGaussianDiffcoefSolution::setBcCoefs \n");
+   }
+   const hier::Box& box = bdry_box.getBox();
+   hier::Index lower = box.lower();
+   hier::Index upper = box.upper();
+
+   if (d_dim == tbox::Dimension(2)) {
+      double* a_array = acoef_data ? acoef_data->getPointer() : NULL;
+      double* b_array = bcoef_data ? bcoef_data->getPointer() : NULL;
+      double* g_array = gcoef_data ? gcoef_data->getPointer() : NULL;
+      int i, j, ibeg, iend, jbeg, jend;
+      double x, y;
+      switch (bdry_box.getLocationIndex()) {
+         case 0:
+            // min i edge
+            jbeg = box.lower()[1];
+            jend = box.upper()[1];
+            x = xlo[0];
+            for (j = jbeg; j <= jend; ++j) {
+               y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+               if (a_array) a_array[j - jbeg] = 1.0;
+               if (b_array) b_array[j - jbeg] = 0.0;
+               if (g_array) g_array[j - jbeg] = exactFcn(x, y);
+            }
+            break;
+         case 1:
+            // max i edge
+            jbeg = box.lower()[1];
+            jend = box.upper()[1];
+            x = xup[0];
+            for (j = jbeg; j <= jend; ++j) {
+               y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+               if (a_array) a_array[j - jbeg] = 1.0;
+               if (b_array) b_array[j - jbeg] = 0.0;
+               if (g_array) g_array[j - jbeg] = exactFcn(x, y);
+            }
+            break;
+         case 2:
+            // min j edge
+            ibeg = box.lower()[0];
+            iend = box.upper()[0];
+            y = xlo[1];
+            for (i = ibeg; i <= iend; ++i) {
+               x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+               if (a_array) a_array[i - ibeg] = 1.0;
+               if (b_array) b_array[i - ibeg] = 0.0;
+               if (g_array) g_array[i - ibeg] = exactFcn(x, y);
+            }
+            break;
+         case 3:
+            // max j edge
+            ibeg = box.lower()[0];
+            iend = box.upper()[0];
+            y = xup[1];
+            for (i = ibeg; i <= iend; ++i) {
+               x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+               if (a_array) a_array[i - ibeg] = 1.0;
+               if (b_array) b_array[i - ibeg] = 0.0;
+               if (g_array) g_array[i - ibeg] = exactFcn(x, y);
+            }
+            break;
+         default:
+            TBOX_ERROR("Invalid location index in\n"
+            << "PoissonGaussianDiffcoefSolution::setBcCoefs");
+      }
+   }
+
+   if (d_dim == tbox::Dimension(3)) {
+      MDA_Access<double, 3, MDA_OrderColMajor<3> > a_array, b_array, g_array;
+      if (acoef_data) a_array = pdat::ArrayDataAccess::access<3, double>(
+               *acoef_data);
+      if (bcoef_data) b_array = pdat::ArrayDataAccess::access<3, double>(
+               *bcoef_data);
+      if (gcoef_data) g_array = pdat::ArrayDataAccess::access<3, double>(
+               *gcoef_data);
+      int i, j, k, ibeg, iend, jbeg, jend, kbeg, kend;
+      double x, y, z;
+      switch (bdry_box.getLocationIndex()) {
+         case 0:
+            // min i side
+            jbeg = box.lower()[1];
+            jend = box.upper()[1];
+            kbeg = box.lower()[2];
+            kend = box.upper()[2];
+            i = box.lower()[0] + 1;
+            x = xlo[0];
+            for (k = kbeg; k <= kend; ++k) {
+               z = xlo[2] + dx[2] * (k - patch_box.lower()[2] + 0.5);
+               for (j = jbeg; j <= jend; ++j) {
+                  y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+                  if (a_array) a_array(i, j, k) = 1.0;
+                  if (b_array) b_array(i, j, k) = 0.0;
+                  if (g_array) g_array(i, j, k) = exactFcn(x, y, z);
+               }
+            }
+            break;
+         case 1:
+            // max i side
+            jbeg = box.lower()[1];
+            jend = box.upper()[1];
+            kbeg = box.lower()[2];
+            kend = box.upper()[2];
+            i = box.upper()[0];
+            x = xup[0];
+            for (k = kbeg; k <= kend; ++k) {
+               z = xlo[2] + dx[2] * (k - patch_box.lower()[2] + 0.5);
+               for (j = jbeg; j <= jend; ++j) {
+                  y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+                  if (a_array) a_array(i, j, k) = 1.0;
+                  if (b_array) b_array(i, j, k) = 0.0;
+                  if (g_array) g_array(i, j, k) = exactFcn(x, y, z);
+               }
+            }
+            break;
+         case 2:
+            // min j side
+            ibeg = box.lower()[0];
+            iend = box.upper()[0];
+            kbeg = box.lower()[2];
+            kend = box.upper()[2];
+            j = box.lower()[1] + 1;
+            y = xlo[1];
+            for (k = kbeg; k <= kend; ++k) {
+               z = xlo[2] + dx[2] * (k - patch_box.lower()[2] + 0.5);
+               for (i = ibeg; i <= iend; ++i) {
+                  x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                  if (a_array) a_array(i, j, k) = 1.0;
+                  if (b_array) b_array(i, j, k) = 0.0;
+                  if (g_array) g_array(i, j, k) = exactFcn(x, y, z);
+               }
+            }
+            break;
+         case 3:
+            // max j side
+            ibeg = box.lower()[0];
+            iend = box.upper()[0];
+            kbeg = box.lower()[2];
+            kend = box.upper()[2];
+            j = box.upper()[1];
+            y = xup[1];
+            for (k = kbeg; k <= kend; ++k) {
+               z = xlo[2] + dx[2] * (k - patch_box.lower()[2] + 0.5);
+               for (i = ibeg; i <= iend; ++i) {
+                  x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                  if (a_array) a_array(i, j, k) = 1.0;
+                  if (b_array) b_array(i, j, k) = 0.0;
+                  if (g_array) g_array(i, j, k) = exactFcn(x, y, z);
+               }
+            }
+            break;
+         case 4:
+            // min k side
+            ibeg = box.lower()[0];
+            iend = box.upper()[0];
+            jbeg = box.lower()[1];
+            jend = box.upper()[1];
+            k = box.lower()[2] + 1;
+            z = xlo[2];
+            for (j = jbeg; j <= jend; ++j) {
+               y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+               for (i = ibeg; i <= iend; ++i) {
+                  x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                  if (a_array) a_array(i, j, k) = 1.0;
+                  if (b_array) b_array(i, j, k) = 0.0;
+                  if (g_array) g_array(i, j, k) = exactFcn(x, y, z);
+               }
+            }
+            break;
+         case 5:
+            // max k side
+            ibeg = box.lower()[0];
+            iend = box.upper()[0];
+            jbeg = box.lower()[1];
+            jend = box.upper()[1];
+            k = box.upper()[2];
+            z = xup[2];
+            for (j = jbeg; j <= jend; ++j) {
+               y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+               for (i = ibeg; i <= iend; ++i) {
+                  x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                  if (a_array) a_array(i, j, k) = 1.0;
+                  if (b_array) b_array(i, j, k) = 0.0;
+                  if (g_array) g_array(i, j, k) = exactFcn(x, y, z);
+               }
+            }
+            break;
+         default:
+            TBOX_ERROR("Invalid location index in\n"
+            << "PoissonGaussianDiffcoefSolution::setBcCoefs");
+      }
+   }
+}
+
+/*
+ ***********************************************************************
+ * This class uses analytical boundary condition, so it can            *
+ * an unlimited number of extensions past the corner of a patch.       *
+ ***********************************************************************
+ */
+hier::IntVector PoissonGaussianDiffcoefSolution::numberOfExtensionsFillable()
+const
+{
+   return hier::IntVector(d_dim, 1000);
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/PoissonGaussianDiffcoefSolution.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/PoissonGaussianDiffcoefSolution.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,177 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   PoissonGaussianDiffcoefSolution class declaration 
+ *
+ ************************************************************************/
+#ifndef included_PoissonGaussianDiffcoefSolution
+#define included_PoissonGaussianDiffcoefSolution
+
+#include <string>
+
+#include "SAMRAI/tbox/Dimension.h"
+#include "SinusoidFcn.h"
+#include "GaussianFcn.h"
+
+#include "SAMRAI/tbox/Database.h"
+
+/*
+ * SAMRAI classes
+ */
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/solv/PoissonSpecifications.h"
+#include "SAMRAI/solv/RobinBcCoefStrategy.h"
+
+using namespace SAMRAI;
+
+/*!
+ * @brief Specialized class to provide Gaussian-diffcoef
+ * solution-specific stuff.
+ *
+ * The following variable coefficient problem is contrived
+ * to test the code on variable coefficients.
+ *
+ * The diffusion coefficients are
+ * @f[ D_x = D_y = e^{-\lambda |r-r_0|^2} @f]
+ * where @f$ r_0 @f$ is the center of the Gaussian.
+ * The exact solution
+ * @f[ u = sin(k_x x + \phi_x) sin(k_y y + \phi_y) sin(k_z z + \phi_z) @f]
+ * Source term (derived by substituting the exact solution into the PDE) is
+ * @f[
+ *  e^{\lambda |r-r_0|^2}
+ *  \left\{
+ *    k^2 s_x s_y s_z
+ *    - 2\lambda \left[ k_x(x-x_0) c_x s_y s_z
+ + k_y(y-y_0) s_x c_y s_z
+ + k_z(z-z_0) s_x s_y c_z
+ *               \right ]
+ *    \right\}
+ * @f]
+ * where @f$ k^2 = k_x^2 + k_y^2 @f$,
+ * @f$ s_x = sin(k_x x + \phi_x) @f$,
+ * @f$ s_y = sin(k_y y + \phi_y) @f$,
+ * @f$ s_z = sin(k_z z + \phi_z) @f$,
+ * @f$ c_x = cos(k_x x + \phi_x) @f$,
+ * @f$ c_y = cos(k_y y + \phi_y) @f$ and
+ * @f$ c_z = cos(k_z z + \phi_z) @f$.
+ */
+class PoissonGaussianDiffcoefSolution:
+   public solv::RobinBcCoefStrategy
+{
+
+public:
+   PoissonGaussianDiffcoefSolution(
+      const tbox::Dimension& dim);
+
+   PoissonGaussianDiffcoefSolution(
+      /*! Ojbect name */
+      const std::string& object_name
+      ,
+      const tbox::Dimension& dim
+      , /*! Input database */
+      tbox::Database& database
+      , /*! Standard output stream */
+      std::ostream* out_stream = NULL
+      , /*! Log output stream */
+      std::ostream* log_stream = NULL);
+
+   virtual ~PoissonGaussianDiffcoefSolution();
+
+   void
+   setFromDatabase(
+      tbox::Database& database);
+
+   void
+   setPoissonSpecifications(
+      /*! Object to set */ solv::PoissonSpecifications& sps,
+      /*! C id, if used */ int C_patch_data_id,
+      /*! D id, if used */ int D_patch_data_id) const;
+
+   /*!
+    * @brief Set parameters living on grid.
+    *
+    * Ignored data are: ccoef_data
+    * because it is constant.
+    */
+   void
+   setGridData(
+      hier::Patch& patch,
+      pdat::SideData<double>& diffcoef_data,
+      pdat::CellData<double>& ccoef_data,
+      pdat::CellData<double>& exact_data,
+      pdat::CellData<double>& source_data);
+
+   virtual void
+   setBcCoefs(
+      tbox::Pointer<pdat::ArrayData<double> >& acoef_data,
+      tbox::Pointer<pdat::ArrayData<double> >& bcoef_data,
+      tbox::Pointer<pdat::ArrayData<double> >& gcoef_data,
+      const tbox::Pointer<hier::Variable>& variable,
+      const hier::Patch& patch,
+      const hier::BoundaryBox& bdry_box,
+      const double fill_time = 0.0) const;
+
+   hier::IntVector
+   numberOfExtensionsFillable() const;
+
+   //! Compute exact solution for a given coordinate.
+   double
+   exactFcn(
+      double x,
+      double y) const;
+   double
+   exactFcn(
+      double x,
+      double y,
+      double z) const;
+   //! Compute source for a given coordinate.
+   double
+   sourceFcn(
+      double x,
+      double y) const;
+   double
+   sourceFcn(
+      double x,
+      double y,
+      double z) const;
+   //! Compute diffusion coefficient for a given coordinate.
+   double
+   diffcoefFcn(
+      double x,
+      double y) const;
+   double
+   diffcoefFcn(
+      double x,
+      double y,
+      double z) const;
+
+   friend std::ostream&
+   operator << (
+      std::ostream& os,
+      const PoissonGaussianDiffcoefSolution& r);
+
+private:
+   const tbox::Dimension d_dim;
+
+   //! @brief Gaussian component of solution and source.
+   GaussianFcn d_gcomp;
+   //! @brief Sine-Sine component of solution and source.
+   SinusoidFcn d_sscomp;
+   //! @brief Cosine-Sine component of solution and source.
+   SinusoidFcn d_cscomp;
+   //! @brief Sine-Cosine component of solution and source.
+   SinusoidFcn d_sccomp;
+   //@{
+   double d_lambda;
+   double d_k[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   double d_p[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   double d_k2;
+   //@}
+
+};
+
+#endif  // included_PoissonGaussianDiffcoefSolution
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/PoissonGaussianSolution.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/PoissonGaussianSolution.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,402 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   PoissonGaussianSolution class implementation 
+ *
+ ************************************************************************/
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/ArrayDataAccess.h"
+#include "patchFcns.h"
+#include "PoissonGaussianSolution.h"
+#include STL_SSTREAM_HEADER_FILE
+
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+
+using namespace SAMRAI;
+
+PoissonGaussianSolution::PoissonGaussianSolution(
+   const tbox::Dimension& dim):
+   d_dim(dim),
+   d_gauss(dim)
+{
+}
+
+PoissonGaussianSolution::PoissonGaussianSolution(
+   const std::string& object_name
+   ,
+   const tbox::Dimension& dim
+   ,
+   tbox::Database& database
+   , /*! Standard output stream */
+   std::ostream* out_stream
+   , /*! Log output stream */
+   std::ostream* log_stream):
+   d_dim(dim),
+   d_gauss(dim)
+{
+   (void)object_name;
+   (void)out_stream;
+   (void)log_stream;
+
+   setFromDatabase(database);
+}
+
+PoissonGaussianSolution::~PoissonGaussianSolution()
+{
+}
+
+void PoissonGaussianSolution::setFromDatabase(
+   tbox::Database& database)
+{
+   std::string istr;
+   {
+      // Get the gaussian component.
+      istr = database.getStringWithDefault("GaussianFcnControl", "{}");
+      std::istringstream ist(istr);
+      ist >> d_gauss;
+   }
+}
+
+void PoissonGaussianSolution::setPoissonSpecifications(
+   solv::PoissonSpecifications& sps,
+   int C_patch_data_id,
+   int D_patch_data_id) const
+{
+   (void)C_patch_data_id;
+   (void)D_patch_data_id;
+
+   sps.setDConstant(1.0);
+   sps.setCZero();
+}
+
+double PoissonGaussianSolution::exactFcn(
+   double x,
+   double y) const {
+   return d_gauss(x, y);
+}
+
+double PoissonGaussianSolution::exactFcn(
+   double x,
+   double y,
+   double z) const {
+   return d_gauss(x, y, z);
+}
+
+double PoissonGaussianSolution::sourceFcn(
+   double x,
+   double y) const {
+   double gauss_ctr[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   d_gauss.getCenter(gauss_ctr);
+   double rval;
+   rval = 4 * d_gauss.getLambda() * ((x - gauss_ctr[0]) * (x - gauss_ctr[0])
+                                     + (y - gauss_ctr[1]) * (y - gauss_ctr[1])
+                                     );
+   rval += 2 * d_dim.getValue();
+   rval *= d_gauss(x, y) * d_gauss.getLambda();
+   return rval;
+}
+
+double PoissonGaussianSolution::sourceFcn(
+   double x,
+   double y,
+   double z) const {
+   double gauss_ctr[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   d_gauss.getCenter(gauss_ctr);
+   double rval;
+   rval = 4 * d_gauss.getLambda() * ((x - gauss_ctr[0]) * (x - gauss_ctr[0])
+                                     + (y - gauss_ctr[1]) * (y - gauss_ctr[1])
+                                     + (z - gauss_ctr[2]) * (z - gauss_ctr[2])
+                                     );
+   rval += 2 * d_dim.getValue();
+   rval *= d_gauss(x, y, z) * d_gauss.getLambda();
+   return rval;
+}
+
+void PoissonGaussianSolution::setGridData(
+   hier::Patch& patch,
+   pdat::SideData<double>& diffcoef_data,
+   pdat::CellData<double>& ccoef_data,
+   pdat::CellData<double>& exact_data,
+   pdat::CellData<double>& source_data)
+{
+   (void)diffcoef_data;
+   (void)ccoef_data;
+
+   tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+
+   const double* h = patch_geom->getDx();
+   const double* xl = patch_geom->getXLower();
+   const int* il = &patch.getBox().lower()[0];
+
+   {
+      /* Set cell-centered data. */
+      double sl[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]; // Like XLower, except for cell.
+      int j;
+      for (j = 0; j < d_dim.getValue(); ++j) {
+         sl[j] = xl[j] + 0.5 * h[j];
+      }
+      pdat::CellData<double>::Iterator iter(patch.getBox());
+      if (d_dim == tbox::Dimension(2)) {
+         double x, y;
+         for ( ; iter; iter++) {
+            const pdat::CellIndex& index = *iter;
+            x = sl[0] + (index[0] - il[0]) * h[0];
+            y = sl[1] + (index[1] - il[1]) * h[1];
+            exact_data(index) = exactFcn(x, y);
+            source_data(index) = sourceFcn(x, y);
+         }
+      } else if (d_dim == tbox::Dimension(3)) {
+         double x, y, z;
+         for ( ; iter; iter++) {
+            const pdat::CellIndex& index = *iter;
+            x = sl[0] + (index[0] - il[0]) * h[0];
+            y = sl[1] + (index[1] - il[1]) * h[1];
+            z = sl[2] + (index[2] - il[2]) * h[2];
+            exact_data(index) = exactFcn(x, y, z);
+            source_data(index) = sourceFcn(x, y, z);
+         }
+      }
+   }
+}       // End patch loop.
+
+std::ostream& operator << (
+   std::ostream& os,
+   const PoissonGaussianSolution& r) {
+   os << r.d_gauss << "\n";
+   return os;
+}
+
+void PoissonGaussianSolution::setBcCoefs(
+   tbox::Pointer<pdat::ArrayData<double> >& acoef_data,
+   tbox::Pointer<pdat::ArrayData<double> >& bcoef_data,
+   tbox::Pointer<pdat::ArrayData<double> >& gcoef_data,
+   const tbox::Pointer<hier::Variable>& variable,
+   const hier::Patch& patch,
+   const hier::BoundaryBox& bdry_box,
+   const double fill_time) const
+{
+   (void)variable;
+   (void)fill_time;
+
+   tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   /*
+    * Set to an inhomogeneous Dirichlet boundary condition.
+    */
+   hier::Box patch_box(patch.getBox());
+
+   const double* xlo = patch_geom->getXLower();
+   const double* xup = patch_geom->getXUpper();
+   const double* dx = patch_geom->getDx();
+
+   if (bdry_box.getBoundaryType() != 1) {
+      // Must be a face boundary.
+      TBOX_ERROR("Bad boundary type in\n"
+         << "PoissonGaussianSolution::setBcCoefs \n");
+   }
+   const hier::Box& box = bdry_box.getBox();
+   hier::Index lower = box.lower();
+   hier::Index upper = box.upper();
+
+   if (d_dim == tbox::Dimension(2)) {
+      double* a_array = acoef_data ? acoef_data->getPointer() : NULL;
+      double* b_array = bcoef_data ? bcoef_data->getPointer() : NULL;
+      double* g_array = gcoef_data ? gcoef_data->getPointer() : NULL;
+      int i, j, ibeg, iend, jbeg, jend;
+      double x, y;
+      switch (bdry_box.getLocationIndex()) {
+         case 0:
+            // min i edge
+            jbeg = box.lower()[1];
+            jend = box.upper()[1];
+            x = xlo[0];
+            for (j = jbeg; j <= jend; ++j) {
+               y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+               if (a_array) a_array[j - jbeg] = 1.0;
+               if (b_array) b_array[j - jbeg] = 0.0;
+               if (g_array) g_array[j - jbeg] = exactFcn(x, y);
+            }
+            break;
+         case 1:
+            // max i edge
+            jbeg = box.lower()[1];
+            jend = box.upper()[1];
+            x = xup[0];
+            for (j = jbeg; j <= jend; ++j) {
+               y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+               if (a_array) a_array[j - jbeg] = 1.0;
+               if (b_array) b_array[j - jbeg] = 0.0;
+               if (g_array) g_array[j - jbeg] = exactFcn(x, y);
+            }
+            break;
+         case 2:
+            // min j edge
+            ibeg = box.lower()[0];
+            iend = box.upper()[0];
+            y = xlo[1];
+            for (i = ibeg; i <= iend; ++i) {
+               x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+               if (a_array) a_array[i - ibeg] = 1.0;
+               if (b_array) b_array[i - ibeg] = 0.0;
+               if (g_array) g_array[i - ibeg] = exactFcn(x, y);
+            }
+            break;
+         case 3:
+            // max j edge
+            ibeg = box.lower()[0];
+            iend = box.upper()[0];
+            y = xup[1];
+            for (i = ibeg; i <= iend; ++i) {
+               x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+               if (a_array) a_array[i - ibeg] = 1.0;
+               if (b_array) b_array[i - ibeg] = 0.0;
+               if (g_array) g_array[i - ibeg] = exactFcn(x, y);
+            }
+            break;
+         default:
+            TBOX_ERROR("Invalid location index in\n"
+            << "PoissonGaussianSolution::setBcCoefs");
+      }
+   }
+
+   if (d_dim == tbox::Dimension(3)) {
+      MDA_Access<double, 3, MDA_OrderColMajor<3> > a_array, b_array, g_array;
+      if (acoef_data) a_array = pdat::ArrayDataAccess::access<3, double>(
+               *acoef_data);
+      if (bcoef_data) b_array = pdat::ArrayDataAccess::access<3, double>(
+               *bcoef_data);
+      if (gcoef_data) g_array = pdat::ArrayDataAccess::access<3, double>(
+               *gcoef_data);
+      int i, j, k, ibeg, iend, jbeg, jend, kbeg, kend;
+      double x, y, z;
+      switch (bdry_box.getLocationIndex()) {
+         case 0:
+            // min i side
+            jbeg = box.lower()[1];
+            jend = box.upper()[1];
+            kbeg = box.lower()[2];
+            kend = box.upper()[2];
+            i = box.lower()[0] + 1;
+            x = xlo[0];
+            for (k = kbeg; k <= kend; ++k) {
+               z = xlo[2] + dx[2] * (k - patch_box.lower()[2] + 0.5);
+               for (j = jbeg; j <= jend; ++j) {
+                  y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+                  if (a_array) a_array(i, j, k) = 1.0;
+                  if (b_array) b_array(i, j, k) = 0.0;
+                  if (g_array) g_array(i, j, k) = exactFcn(x, y, z);
+               }
+            }
+            break;
+         case 1:
+            // max i side
+            jbeg = box.lower()[1];
+            jend = box.upper()[1];
+            kbeg = box.lower()[2];
+            kend = box.upper()[2];
+            i = box.upper()[0];
+            x = xup[0];
+            for (k = kbeg; k <= kend; ++k) {
+               z = xlo[2] + dx[2] * (k - patch_box.lower()[2] + 0.5);
+               for (j = jbeg; j <= jend; ++j) {
+                  y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+                  if (a_array) a_array(i, j, k) = 1.0;
+                  if (b_array) b_array(i, j, k) = 0.0;
+                  if (g_array) g_array(i, j, k) = exactFcn(x, y, z);
+               }
+            }
+            break;
+         case 2:
+            // min j side
+            ibeg = box.lower()[0];
+            iend = box.upper()[0];
+            kbeg = box.lower()[2];
+            kend = box.upper()[2];
+            j = box.lower()[1] + 1;
+            y = xlo[1];
+            for (k = kbeg; k <= kend; ++k) {
+               z = xlo[2] + dx[2] * (k - patch_box.lower()[2] + 0.5);
+               for (i = ibeg; i <= iend; ++i) {
+                  x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                  if (a_array) a_array(i, j, k) = 1.0;
+                  if (b_array) b_array(i, j, k) = 0.0;
+                  if (g_array) g_array(i, j, k) = exactFcn(x, y, z);
+               }
+            }
+            break;
+         case 3:
+            // max j side
+            ibeg = box.lower()[0];
+            iend = box.upper()[0];
+            kbeg = box.lower()[2];
+            kend = box.upper()[2];
+            j = box.upper()[1];
+            y = xup[1];
+            for (k = kbeg; k <= kend; ++k) {
+               z = xlo[2] + dx[2] * (k - patch_box.lower()[2] + 0.5);
+               for (i = ibeg; i <= iend; ++i) {
+                  x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                  if (a_array) a_array(i, j, k) = 1.0;
+                  if (b_array) b_array(i, j, k) = 0.0;
+                  if (g_array) g_array(i, j, k) = exactFcn(x, y, z);
+               }
+            }
+            break;
+         case 4:
+            // min k side
+            ibeg = box.lower()[0];
+            iend = box.upper()[0];
+            jbeg = box.lower()[1];
+            jend = box.upper()[1];
+            k = box.lower()[2] + 1;
+            z = xlo[2];
+            for (j = jbeg; j <= jend; ++j) {
+               y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+               for (i = ibeg; i <= iend; ++i) {
+                  x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                  if (a_array) a_array(i, j, k) = 1.0;
+                  if (b_array) b_array(i, j, k) = 0.0;
+                  if (g_array) g_array(i, j, k) = exactFcn(x, y, z);
+               }
+            }
+            break;
+         case 5:
+            // max k side
+            ibeg = box.lower()[0];
+            iend = box.upper()[0];
+            jbeg = box.lower()[1];
+            jend = box.upper()[1];
+            k = box.upper()[2];
+            z = xup[2];
+            for (j = jbeg; j <= jend; ++j) {
+               y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+               for (i = ibeg; i <= iend; ++i) {
+                  x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                  if (a_array) a_array(i, j, k) = 1.0;
+                  if (b_array) b_array(i, j, k) = 0.0;
+                  if (g_array) g_array(i, j, k) = exactFcn(x, y, z);
+               }
+            }
+            break;
+         default:
+            TBOX_ERROR("Invalid location index in\n"
+            << "PoissonGaussianSolution::setBcCoefs");
+      }
+   }
+}
+
+/*
+ ***********************************************************************
+ * This class uses analytical boundary condition, so it can            *
+ * an unlimited number of extensions past the corner of a patch.       *
+ ***********************************************************************
+ */
+hier::IntVector PoissonGaussianSolution::numberOfExtensionsFillable() const
+{
+   return hier::IntVector(d_dim, 1000);
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/PoissonGaussianSolution.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/PoissonGaussianSolution.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,137 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   PoissonGaussianSolution class declaration 
+ *
+ ************************************************************************/
+#ifndef included_PoissonGaussianSolution
+#define included_PoissonGaussianSolution
+
+#include <string>
+
+#include "SAMRAI/tbox/Dimension.h"
+#include "GaussianFcn.h"
+
+#include "SAMRAI/tbox/Database.h"
+
+/*
+ * SAMRAI classes
+ */
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/solv/PoissonSpecifications.h"
+#include "SAMRAI/solv/RobinBcCoefStrategy.h"
+
+using namespace SAMRAI;
+
+/*!
+ * @brief Specialized class to provide Gaussian
+ * solution-specific stuff.
+ *
+ * The exact solution is
+ * @f[ u = e^{-\lambda |r-r_0|^2} @f]
+ * where @f$ r_0 @f$ is the center of the Gaussian.
+ *
+ * The diffusion coefficients are 1.
+ *
+ * Plugging these into the Poisson equation, we get
+ * the following source function
+ * @f[ 2 \lambda e^{\lambda |r-r_0|^2} ( 3 + 2 \lambda |r-r0|^2 ) @f]
+ */
+class PoissonGaussianSolution:
+   public solv::RobinBcCoefStrategy
+{
+
+public:
+   PoissonGaussianSolution(
+      const tbox::Dimension& dim);
+
+   PoissonGaussianSolution(
+      /*! Ojbect name */
+      const std::string& object_name
+      ,
+      const tbox::Dimension& dim
+      , /*! Input database */
+      tbox::Database& database
+      , /*! Standard output stream */
+      std::ostream* out_stream = NULL
+      , /*! Log output stream */
+      std::ostream* log_stream = NULL);
+
+   virtual ~PoissonGaussianSolution();
+
+   void
+   setFromDatabase(
+      tbox::Database& database);
+
+   void
+   setPoissonSpecifications(
+      /*! Object to set */ solv::PoissonSpecifications& sps,
+      /*! C id, if used */ int C_patch_data_id,
+      /*! D id, if used */ int D_patch_data_id) const;
+
+   /*!
+    * @brief Set parameters living on grid.
+    *
+    * Ignored data are: diffcoef_data and ccoef_data
+    * because they are constant.
+    */
+   void
+   setGridData(
+      hier::Patch& patch,
+      pdat::SideData<double>& diffcoef_data,
+      pdat::CellData<double>& ccoef_data,
+      pdat::CellData<double>& exact_data,
+      pdat::CellData<double>& source_data);
+
+   virtual void
+   setBcCoefs(
+      tbox::Pointer<pdat::ArrayData<double> >& acoef_data,
+      tbox::Pointer<pdat::ArrayData<double> >& bcoef_data,
+      tbox::Pointer<pdat::ArrayData<double> >& gcoef_data,
+      const tbox::Pointer<hier::Variable>& variable,
+      const hier::Patch& patch,
+      const hier::BoundaryBox& bdry_box,
+      const double fill_time = 0.0) const;
+
+   hier::IntVector
+   numberOfExtensionsFillable() const;
+
+   //! Compute exact solution for a given coordinate.
+   double
+   exactFcn(
+      double x,
+      double y) const;
+   double
+   exactFcn(
+      double x,
+      double y,
+      double z) const;
+   //! Compute source for a given coordinate.
+   double
+   sourceFcn(
+      double x,
+      double y) const;
+   double
+   sourceFcn(
+      double x,
+      double y,
+      double z) const;
+
+   friend std::ostream&
+   operator << (
+      std::ostream& os,
+      const PoissonGaussianSolution& r);
+
+private:
+   const tbox::Dimension d_dim;
+
+   //! @brief Gaussian component of solution and source.
+   GaussianFcn d_gauss;
+
+};
+
+#endif  // included_PoissonGaussianSolution
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/PoissonMultigaussianSolution.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/PoissonMultigaussianSolution.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,441 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   PoissonMultigaussianSolution class implementation 
+ *
+ ************************************************************************/
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/ArrayDataAccess.h"
+#include "patchFcns.h"
+#include "PoissonMultigaussianSolution.h"
+#include STL_SSTREAM_HEADER_FILE
+
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+using namespace SAMRAI;
+
+PoissonMultigaussianSolution::PoissonMultigaussianSolution(
+   const tbox::Dimension& dim)
+#ifndef PACKAGE
+   :d_dim(dim)
+#endif
+{
+}
+
+PoissonMultigaussianSolution::PoissonMultigaussianSolution(
+   const std::string& object_name
+   ,
+   const tbox::Dimension& dim
+   ,
+   tbox::Database& database
+   , /*! Standard output stream */
+   std::ostream* out_stream
+   , /*! Log output stream */
+   std::ostream* log_stream)
+#ifndef PACKAGE
+   :d_dim(dim)
+#endif
+{
+   (void)object_name;
+   (void)out_stream;
+   (void)log_stream;
+
+   setFromDatabase(database);
+}
+
+PoissonMultigaussianSolution::~PoissonMultigaussianSolution()
+{
+}
+
+void PoissonMultigaussianSolution::setFromDatabase(
+   tbox::Database& database)
+{
+   std::string singlegauss = "GaussianFcnControl_"
+      + tbox::Utilities::intToString(static_cast<int>(d_gauss_size));
+   if (!database.isString(singlegauss)) {
+      TBOX_ERROR(
+         "You must have at least " << singlegauss << " defined in the\n"
+         "database for PoissonMultigaussianSolution.\n");
+   }
+   GaussianFcn gauss(d_dim);
+   do {
+      std::string istr = database.getString(singlegauss);
+      std::istringstream ist(istr);
+      ist >> gauss;
+      d_gauss_append(gauss);
+      singlegauss = "GaussianFcnControl_"
+         + tbox::Utilities::intToString(static_cast<int>(d_gauss_size));
+   } while (database.isString(singlegauss));
+}
+
+void PoissonMultigaussianSolution::setPoissonSpecifications(
+   solv::PoissonSpecifications& sps,
+   int C_patch_data_id,
+   int D_patch_data_id) const
+{
+   (void)C_patch_data_id;
+   (void)D_patch_data_id;
+
+   sps.setDConstant(1.0);
+   sps.setCZero();
+}
+
+double PoissonMultigaussianSolution::exactFcn(
+   double x,
+   double y) const {
+   double rval = 0;
+   d_gauss_const_iterator i;
+   for (i = d_gauss_begin; i != d_gauss_end; ++i) {
+      rval += (*i)(x, y);
+   }
+   return rval;
+}
+
+double PoissonMultigaussianSolution::exactFcn(
+   double x,
+   double y,
+   double z) const {
+   double rval = 0;
+   d_gauss_const_iterator i;
+   for (i = d_gauss_begin; i != d_gauss_end; ++i) {
+      rval += (*i)(x, y, z);
+   }
+   return rval;
+}
+
+double PoissonMultigaussianSolution::sourceFcn(
+   double x,
+   double y) const {
+   double rval = 0;
+   d_gauss_const_iterator i;
+   for (i = d_gauss_begin; i != d_gauss_end; ++i) {
+      const GaussianFcn& gauss = *i;
+      double gauss_ctr[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      gauss.getCenter(gauss_ctr);
+      double tval;
+      tval = 4 * gauss.getLambda() * ((x - gauss_ctr[0]) * (x - gauss_ctr[0])
+                                      + (y - gauss_ctr[1]) * (y - gauss_ctr[1])
+                                      );
+      tval += 2 * d_dim.getValue();
+      tval *= gauss(x, y) * gauss.getLambda();
+      rval += tval;
+   }
+   return rval;
+}
+
+double PoissonMultigaussianSolution::sourceFcn(
+   double x,
+   double y,
+   double z) const {
+   double rval = 0;
+   d_gauss_const_iterator i;
+   for (i = d_gauss_begin; i != d_gauss_end; ++i) {
+      const GaussianFcn& gauss = *i;
+      double gauss_ctr[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      gauss.getCenter(gauss_ctr);
+      double tval;
+      tval = 4 * gauss.getLambda() * ((x - gauss_ctr[0]) * (x - gauss_ctr[0])
+                                      + (y - gauss_ctr[1]) * (y - gauss_ctr[1])
+                                      + (z - gauss_ctr[2]) * (z - gauss_ctr[2])
+                                      );
+      tval += 2 * d_dim.getValue();
+      tval *= gauss(x, y, z) * gauss.getLambda();
+      rval += tval;
+   }
+   return rval;
+}
+
+void PoissonMultigaussianSolution::setGridData(
+   hier::Patch& patch,
+   pdat::SideData<double>& diffcoef_data,
+   pdat::CellData<double>& ccoef_data,
+   pdat::CellData<double>& exact_data,
+   pdat::CellData<double>& source_data)
+{
+   (void)diffcoef_data;
+   (void)ccoef_data;
+
+   tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+
+   const double* h = patch_geom->getDx();
+   const double* xl = patch_geom->getXLower();
+   const int* il = &patch.getBox().lower()[0];
+
+   {
+      /* Set cell-centered data. */
+      double sl[tbox::Dimension::MAXIMUM_DIMENSION_VALUE]; // Like XLower, except for cell.
+      int j;
+      for (j = 0; j < d_dim.getValue(); ++j) {
+         sl[j] = xl[j] + 0.5 * h[j];
+      }
+      pdat::CellData<double>::Iterator iter(patch.getBox());
+      if (d_dim == tbox::Dimension(2)) {
+         double x, y;
+         for ( ; iter; iter++) {
+            const pdat::CellIndex& index = *iter;
+            x = sl[0] + (index[0] - il[0]) * h[0];
+            y = sl[1] + (index[1] - il[1]) * h[1];
+            exact_data(index) = exactFcn(x, y);
+            source_data(index) = sourceFcn(x, y);
+         }
+      } else if (d_dim == tbox::Dimension(3)) {
+         double x, y, z;
+         for ( ; iter; iter++) {
+            const pdat::CellIndex& index = *iter;
+            x = sl[0] + (index[0] - il[0]) * h[0];
+            y = sl[1] + (index[1] - il[1]) * h[1];
+            z = sl[2] + (index[2] - il[2]) * h[2];
+            exact_data(index) = exactFcn(x, y, z);
+            source_data(index) = sourceFcn(x, y, z);
+         }
+      }
+   }
+}       // End patch loop.
+
+std::ostream& operator << (
+   std::ostream& os,
+   const PoissonMultigaussianSolution& r) {
+   os << "{\n";
+   for (unsigned int i = 0; i < r.d_gauss_size; ++i) {
+      os << "GaussianFcnControl_" << i << " " << r.d_gauss[i] << "\n";
+   }
+   os << "}\n";
+   return os;
+}
+
+void PoissonMultigaussianSolution::setBcCoefs(
+   tbox::Pointer<pdat::ArrayData<double> >& acoef_data,
+   tbox::Pointer<pdat::ArrayData<double> >& bcoef_data,
+   tbox::Pointer<pdat::ArrayData<double> >& gcoef_data,
+   const tbox::Pointer<hier::Variable>& variable,
+   const hier::Patch& patch,
+   const hier::BoundaryBox& bdry_box,
+   const double fill_time) const
+{
+   (void)variable;
+   (void)fill_time;
+
+   if (acoef_data.isNull() && gcoef_data.isNull()) {
+      return;
+   }
+
+   tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   /*
+    * Set to an inhomogeneous Dirichlet boundary condition.
+    */
+   hier::Box patch_box(patch.getBox());
+
+   const double* xlo = patch_geom->getXLower();
+   const double* xup = patch_geom->getXUpper();
+   const double* dx = patch_geom->getDx();
+
+   if (bdry_box.getBoundaryType() != 1) {
+      // Must be a face boundary.
+      TBOX_ERROR("Bad boundary type in\n"
+         << "PoissonMultigaussianSolution::setBcCoefs \n");
+   }
+   const hier::Box& box = bdry_box.getBox();
+   hier::Index lower = box.lower();
+   hier::Index upper = box.upper();
+
+   if (d_dim == tbox::Dimension(2)) {
+      hier::BoxIterator boxit(acoef_data ?
+                              acoef_data->getBox() : gcoef_data->getBox());
+      int i, j;
+      double x, y;
+      switch (bdry_box.getLocationIndex()) {
+         case 0:
+            // min i edge
+            x = xlo[0];
+            for ( ; boxit; boxit++) {
+               j = (*boxit)[1];
+               y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+               if (acoef_data) (*acoef_data)(*boxit, 0) = 1.0;
+               if (bcoef_data) (*bcoef_data)(*boxit, 0) = 0.0;
+               if (gcoef_data) (*gcoef_data)(*boxit, 0) = exactFcn(x, y);
+            }
+            break;
+         case 1:
+            // max i edge
+            x = xup[0];
+            for ( ; boxit; boxit++) {
+               j = (*boxit)[1];
+               y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+               if (acoef_data) (*acoef_data)(*boxit, 0) = 1.0;
+               if (bcoef_data) (*bcoef_data)(*boxit, 0) = 0.0;
+               if (gcoef_data) (*gcoef_data)(*boxit, 0) = exactFcn(x, y);
+            }
+            break;
+         case 2:
+            // min j edge
+            y = xlo[1];
+            for ( ; boxit; boxit++) {
+               i = (*boxit)[0];
+               x = xlo[1] + dx[1] * (i - patch_box.lower()[1] + 0.5);
+               if (acoef_data) (*acoef_data)(*boxit, 0) = 1.0;
+               if (bcoef_data) (*bcoef_data)(*boxit, 0) = 0.0;
+               if (gcoef_data) (*gcoef_data)(*boxit, 0) = exactFcn(x, y);
+            }
+            break;
+         case 3:
+            // max j edge
+            y = xup[1];
+            for ( ; boxit; boxit++) {
+               i = (*boxit)[0];
+               x = xlo[1] + dx[1] * (i - patch_box.lower()[1] + 0.5);
+               if (acoef_data) (*acoef_data)(*boxit, 0) = 1.0;
+               if (bcoef_data) (*bcoef_data)(*boxit, 0) = 0.0;
+               if (gcoef_data) (*gcoef_data)(*boxit, 0) = exactFcn(x, y);
+            }
+            break;
+         default:
+            TBOX_ERROR("Invalid location index in\n"
+            << "PoissonMultigaussianSolution::setBcCoefs");
+      }
+   }
+
+   if (d_dim == tbox::Dimension(3)) {
+      MDA_Access<double, 3, MDA_OrderColMajor<3> > a_array, b_array, g_array;
+      if (acoef_data) a_array = pdat::ArrayDataAccess::access<3, double>(
+               *acoef_data);
+      if (bcoef_data) b_array = pdat::ArrayDataAccess::access<3, double>(
+               *bcoef_data);
+      if (gcoef_data) g_array = pdat::ArrayDataAccess::access<3, double>(
+               *gcoef_data);
+      int i, j, k, ibeg, iend, jbeg, jend, kbeg, kend;
+      double x, y, z;
+      switch (bdry_box.getLocationIndex()) {
+         case 0:
+            // min i side
+            jbeg = box.lower()[1];
+            jend = box.upper()[1];
+            kbeg = box.lower()[2];
+            kend = box.upper()[2];
+            i = box.lower()[0] + 1;
+            x = xlo[0];
+            for (k = kbeg; k <= kend; ++k) {
+               z = xlo[2] + dx[2] * (k - patch_box.lower()[2] + 0.5);
+               for (j = jbeg; j <= jend; ++j) {
+                  y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+                  if (a_array) a_array(i, j, k) = 1.0;
+                  if (b_array) b_array(i, j, k) = 0.0;
+                  if (g_array) g_array(i, j, k) = exactFcn(x, y, z);
+               }
+            }
+            break;
+         case 1:
+            // max i side
+            jbeg = box.lower()[1];
+            jend = box.upper()[1];
+            kbeg = box.lower()[2];
+            kend = box.upper()[2];
+            i = box.upper()[0];
+            x = xup[0];
+            for (k = kbeg; k <= kend; ++k) {
+               z = xlo[2] + dx[2] * (k - patch_box.lower()[2] + 0.5);
+               for (j = jbeg; j <= jend; ++j) {
+                  y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+                  if (a_array) a_array(i, j, k) = 1.0;
+                  if (b_array) b_array(i, j, k) = 0.0;
+                  if (g_array) g_array(i, j, k) = exactFcn(x, y, z);
+               }
+            }
+            break;
+         case 2:
+            // min j side
+            ibeg = box.lower()[0];
+            iend = box.upper()[0];
+            kbeg = box.lower()[2];
+            kend = box.upper()[2];
+            j = box.lower()[1] + 1;
+            y = xlo[1];
+            for (k = kbeg; k <= kend; ++k) {
+               z = xlo[2] + dx[2] * (k - patch_box.lower()[2] + 0.5);
+               for (i = ibeg; i <= iend; ++i) {
+                  x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                  if (a_array) a_array(i, j, k) = 1.0;
+                  if (b_array) b_array(i, j, k) = 0.0;
+                  if (g_array) g_array(i, j, k) = exactFcn(x, y, z);
+               }
+            }
+            break;
+         case 3:
+            // max j side
+            ibeg = box.lower()[0];
+            iend = box.upper()[0];
+            kbeg = box.lower()[2];
+            kend = box.upper()[2];
+            j = box.upper()[1];
+            y = xup[1];
+            for (k = kbeg; k <= kend; ++k) {
+               z = xlo[2] + dx[2] * (k - patch_box.lower()[2] + 0.5);
+               for (i = ibeg; i <= iend; ++i) {
+                  x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                  if (a_array) a_array(i, j, k) = 1.0;
+                  if (b_array) b_array(i, j, k) = 0.0;
+                  if (g_array) g_array(i, j, k) = exactFcn(x, y, z);
+               }
+            }
+            break;
+         case 4:
+            // min k side
+            ibeg = box.lower()[0];
+            iend = box.upper()[0];
+            jbeg = box.lower()[1];
+            jend = box.upper()[1];
+            k = box.lower()[2] + 1;
+            z = xlo[2];
+            for (j = jbeg; j <= jend; ++j) {
+               y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+               for (i = ibeg; i <= iend; ++i) {
+                  x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                  if (a_array) a_array(i, j, k) = 1.0;
+                  if (b_array) b_array(i, j, k) = 0.0;
+                  if (g_array) g_array(i, j, k) = exactFcn(x, y, z);
+               }
+            }
+            break;
+         case 5:
+            // max k side
+            ibeg = box.lower()[0];
+            iend = box.upper()[0];
+            jbeg = box.lower()[1];
+            jend = box.upper()[1];
+            k = box.upper()[2];
+            z = xup[2];
+            for (j = jbeg; j <= jend; ++j) {
+               y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+               for (i = ibeg; i <= iend; ++i) {
+                  x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                  if (a_array) a_array(i, j, k) = 1.0;
+                  if (b_array) b_array(i, j, k) = 0.0;
+                  if (g_array) g_array(i, j, k) = exactFcn(x, y, z);
+               }
+            }
+            break;
+         default:
+            TBOX_ERROR("Invalid location index in\n"
+            << "PoissonMultigaussianSolution::setBcCoefs");
+      }
+   }
+}
+
+/*
+ ***********************************************************************
+ * This class uses analytical boundary condition, so it can            *
+ * an unlimited number of extensions past the corner of a patch.       *
+ ***********************************************************************
+ */
+hier::IntVector PoissonMultigaussianSolution::numberOfExtensionsFillable()
+const
+{
+   return hier::IntVector(tbox::Dimension(d_dim), 1000);
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/PoissonMultigaussianSolution.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/PoissonMultigaussianSolution.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,156 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   PoissonMultigaussianSolution class declaration 
+ *
+ ************************************************************************/
+#ifndef included_PoissonMultigaussianSolution
+#define included_PoissonMultigaussianSolution
+
+#include <string>
+
+#include "SAMRAI/tbox/Dimension.h"
+#include "GaussianFcn.h"
+
+/*
+ * Explanation of using PACKAGE macro to change code
+ * when compiling under SAMRAI:
+ * - SAMRAI does not define PACKAGE while this file's
+ *  native package does.
+ * - We don't use the vector template under SAMRAI
+ *  because implicit instantiation is disabled there.
+ */
+
+#ifdef PACKAGE
+#include <vector>
+#endif
+#include "SAMRAI/tbox/Database.h"
+
+/*
+ * SAMRAI classes
+ */
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/solv/PoissonSpecifications.h"
+#include "SAMRAI/solv/RobinBcCoefStrategy.h"
+
+using namespace SAMRAI;
+
+/*!
+ * @brief Specialized class to provide solution-specific stuff
+ * for a solution with multiple Gaussians.
+ *
+ * A single Gaussian exact solution is
+ * @f[ u = e^{-\lambda |r-r_0|^2} @f]
+ * where @f$ r_0 @f$ is the center of the Gaussian.
+ *
+ * The diffusion coefficients are 1.
+ *
+ * Plugging these into the Poisson equation, we get
+ * the following source function
+ * @f[ 2 \lambda e^{\lambda |r-r_0|^2} ( 3 + 2 \lambda |r-r0|^2 ) @f]
+ *
+ * The multi-Gaussian is a sum of Gaussian solutions.
+ */
+class PoissonMultigaussianSolution:
+   public solv::RobinBcCoefStrategy
+{
+
+public:
+   PoissonMultigaussianSolution(
+      const tbox::Dimension& dim);
+
+   PoissonMultigaussianSolution(
+      /*! Ojbect name */
+      const std::string& object_name
+      ,
+      const tbox::Dimension& dim
+      , /*! Input database */
+      tbox::Database& database
+      , /*! Standard output stream */
+      std::ostream* out_stream = NULL
+      , /*! Log output stream */
+      std::ostream* log_stream = NULL);
+
+   virtual ~PoissonMultigaussianSolution();
+
+   void
+   setFromDatabase(
+      tbox::Database& database);
+
+   void
+   setPoissonSpecifications(
+      /*! Object to set */ solv::PoissonSpecifications& sps,
+      /*! C id, if used */ int C_patch_data_id,
+      /*! D id, if used */ int D_patch_data_id) const;
+
+   /*!
+    * @brief Set parameters living on grid.
+    *
+    * Ignored data are: diffcoef_data and ccoef_data
+    * because they are constant.
+    */
+   void
+   setGridData(
+      hier::Patch& patch,
+      pdat::SideData<double>& diffcoef_data,
+      pdat::CellData<double>& ccoef_data,
+      pdat::CellData<double>& exact_data,
+      pdat::CellData<double>& source_data);
+
+   void
+   setBcCoefs(
+      tbox::Pointer<pdat::ArrayData<double> >& acoef_data,
+      tbox::Pointer<pdat::ArrayData<double> >& bcoef_data,
+      tbox::Pointer<pdat::ArrayData<double> >& gcoef_data,
+      const tbox::Pointer<hier::Variable>& variable,
+      const hier::Patch& patch,
+      const hier::BoundaryBox& bdry_box,
+      const double fill_time = 0.0) const;
+
+   hier::IntVector
+   numberOfExtensionsFillable() const;
+
+   //! Compute exact solution for a given coordinate.
+   double
+   exactFcn(
+      double x,
+      double y) const;
+   double
+   exactFcn(
+      double x,
+      double y,
+      double z) const;
+   //! Compute source for a given coordinate.
+   double
+   sourceFcn(
+      double x,
+      double y) const;
+   double
+   sourceFcn(
+      double x,
+      double y,
+      double z) const;
+
+   friend std::ostream&
+   operator << (
+      std::ostream& os,
+      const PoissonMultigaussianSolution& r);
+
+private:
+   const tbox::Dimension d_dim;
+
+   //! @brief Gaussian component of solution and source.
+   std::vector<GaussianFcn> d_gauss;
+#define d_gauss_size d_gauss.size()
+#define d_gauss_begin d_gauss.begin()
+#define d_gauss_end d_gauss.end()
+#define d_gauss_append(ITEM) d_gauss.insert(d_gauss.end(), ITEM)
+#define d_gauss_const_iterator std::vector < GaussianFcn > ::const_iterator
+
+};
+
+#endif  // included_PoissonMultigaussianSolution
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/PoissonPolynomialSolution.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/PoissonPolynomialSolution.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,347 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   PoissonPolynomialSolution class implementation 
+ *
+ ************************************************************************/
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/MDA_Access.h"
+#include "SAMRAI/pdat/ArrayDataAccess.h"
+#include "patchFcns.h"
+#include "PoissonPolynomialSolution.h"
+#include STL_SSTREAM_HEADER_FILE
+
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+
+using namespace SAMRAI;
+
+PoissonPolynomialSolution::PoissonPolynomialSolution(
+   const tbox::Dimension& dim):
+   d_dim(dim),
+   d_exact(dim),
+   d_source(dim)
+{
+}
+
+PoissonPolynomialSolution::PoissonPolynomialSolution(
+   const std::string& object_name
+   ,
+   const tbox::Dimension& dim
+   ,
+   tbox::Database& database
+   , /*! Standard output stream */
+   std::ostream* out_stream
+   , /*! Log output stream */
+   std::ostream* log_stream):
+   d_dim(dim),
+   d_exact(dim),
+   d_source(dim)
+{
+   (void)object_name;
+   (void)out_stream;
+   (void)log_stream;
+
+   setFromDatabase(database);
+}
+
+PoissonPolynomialSolution::~PoissonPolynomialSolution()
+{
+}
+
+void PoissonPolynomialSolution::setFromDatabase(
+   tbox::Database& database)
+{
+   std::string istr = database.getStringWithDefault("QuarticFcnControl", "{}");
+   std::istringstream ist(istr);
+   ist >> d_exact;
+   /*
+    * Set the source to u_xx + u_yy + u_zz
+    */
+   if (d_dim == tbox::Dimension(2)) {
+      d_source = d_exact.differentiate(2, 0)
+         + d_exact.differentiate(0, 2)
+      ;
+   } else if (d_dim == tbox::Dimension(3)) {
+      d_source = d_exact.differentiate(2, 0, 0)
+         + d_exact.differentiate(0, 2, 0)
+         + d_exact.differentiate(0, 0, 2)
+      ;
+   }
+}
+
+void PoissonPolynomialSolution::setPoissonSpecifications(
+   solv::PoissonSpecifications& sps,
+   int C_patch_data_id,
+   int D_patch_data_id) const
+{
+   (void)C_patch_data_id;
+   (void)D_patch_data_id;
+
+   sps.setDConstant(1.0);
+   sps.setCZero();
+}
+
+void PoissonPolynomialSolution::setGridData(
+   hier::Patch& patch,
+   pdat::SideData<double>& diffcoef_data,
+   pdat::CellData<double>& ccoef_data,
+   pdat::CellData<double>& exact_data,
+   pdat::CellData<double>& source_data)
+{
+   (void)diffcoef_data;
+   (void)ccoef_data;
+
+   hier::Box pbox = patch.getBox();
+   tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+
+   /* Set source function and exact solution. */
+   setCellDataToQuartic(exact_data,
+      patch,
+      d_exact);
+   setCellDataToQuartic(source_data,
+      patch,
+      d_source);
+}       // End patch loop.
+
+std::ostream& operator << (
+   std::ostream& os,
+   const PoissonPolynomialSolution& r) {
+   os << r.d_exact << "\n";
+   os << r.d_source << "\n";
+   return os;
+}
+
+void PoissonPolynomialSolution::setBcCoefs(
+   tbox::Pointer<pdat::ArrayData<double> >& acoef_data,
+   tbox::Pointer<pdat::ArrayData<double> >& bcoef_data,
+   tbox::Pointer<pdat::ArrayData<double> >& gcoef_data,
+   const tbox::Pointer<hier::Variable>& variable,
+   const hier::Patch& patch,
+   const hier::BoundaryBox& bdry_box,
+   const double fill_time) const
+{
+   (void)variable;
+   (void)fill_time;
+
+   tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   /*
+    * Set to an inhomogeneous Dirichlet boundary condition.
+    */
+   hier::Box patch_box(patch.getBox());
+
+   const double* xlo = patch_geom->getXLower();
+   const double* xup = patch_geom->getXUpper();
+   const double* dx = patch_geom->getDx();
+
+   if (bdry_box.getBoundaryType() != 1) {
+      // Must be a face boundary.
+      TBOX_ERROR("Bad boundary type in\n"
+         << "PoissonPolynomialSolution::setBcCoefs \n");
+   }
+   const hier::Box& box = bdry_box.getBox();
+   hier::Index lower = box.lower();
+   hier::Index upper = box.upper();
+
+   if (d_dim == tbox::Dimension(2)) {
+      double* a_array = acoef_data ? acoef_data->getPointer() : NULL;
+      double* b_array = bcoef_data ? bcoef_data->getPointer() : NULL;
+      double* g_array = gcoef_data ? gcoef_data->getPointer() : NULL;
+      int i, j, ibeg, iend, jbeg, jend;
+      double x, y;
+      switch (bdry_box.getLocationIndex()) {
+         case 0:
+            // min i edge
+            jbeg = box.lower()[1];
+            jend = box.upper()[1];
+            x = xlo[0];
+            for (j = jbeg; j <= jend; ++j) {
+               y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+               if (a_array) a_array[j - jbeg] = 1.0;
+               if (b_array) b_array[j - jbeg] = 0.0;
+               if (g_array) g_array[j - jbeg] = d_exact(x, y);
+            }
+            break;
+         case 1:
+            // max i edge
+            jbeg = box.lower()[1];
+            jend = box.upper()[1];
+            x = xup[0];
+            for (j = jbeg; j <= jend; ++j) {
+               y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+               if (a_array) a_array[j - jbeg] = 1.0;
+               if (b_array) b_array[j - jbeg] = 0.0;
+               if (g_array) g_array[j - jbeg] = d_exact(x, y);
+            }
+            break;
+         case 2:
+            // min j edge
+            ibeg = box.lower()[0];
+            iend = box.upper()[0];
+            y = xlo[1];
+            for (i = ibeg; i <= iend; ++i) {
+               x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+               if (a_array) a_array[i - ibeg] = 1.0;
+               if (b_array) b_array[i - ibeg] = 0.0;
+               if (g_array) g_array[i - ibeg] = d_exact(x, y);
+            }
+            break;
+         case 3:
+            // max j edge
+            ibeg = box.lower()[0];
+            iend = box.upper()[0];
+            y = xup[1];
+            for (i = ibeg; i <= iend; ++i) {
+               x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+               if (a_array) a_array[i - ibeg] = 1.0;
+               if (b_array) b_array[i - ibeg] = 0.0;
+               if (g_array) g_array[i - ibeg] = d_exact(x, y);
+            }
+            break;
+         default:
+            TBOX_ERROR("Invalid location index in\n"
+            << "PoissonPolynomialSolution::setBcCoefs");
+      }
+   }
+
+   if (d_dim == tbox::Dimension(3)) {
+      MDA_Access<double, 3, MDA_OrderColMajor<3> > a_array, b_array, g_array;
+      if (acoef_data) a_array = pdat::ArrayDataAccess::access<3, double>(
+               *acoef_data);
+      if (bcoef_data) b_array = pdat::ArrayDataAccess::access<3, double>(
+               *bcoef_data);
+      if (gcoef_data) g_array = pdat::ArrayDataAccess::access<3, double>(
+               *gcoef_data);
+      int i, j, k, ibeg, iend, jbeg, jend, kbeg, kend;
+      double x, y, z;
+      switch (bdry_box.getLocationIndex()) {
+         case 0:
+            // min i side
+            jbeg = box.lower()[1];
+            jend = box.upper()[1];
+            kbeg = box.lower()[2];
+            kend = box.upper()[2];
+            i = box.lower()[0] + 1;
+            x = xlo[0];
+            for (k = kbeg; k <= kend; ++k) {
+               z = xlo[2] + dx[2] * (k - patch_box.lower()[2] + 0.5);
+               for (j = jbeg; j <= jend; ++j) {
+                  y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+                  if (a_array) a_array(i, j, k) = 1.0;
+                  if (b_array) b_array(i, j, k) = 0.0;
+                  if (g_array) g_array(i, j, k) = d_exact(x, y, z);
+               }
+            }
+            break;
+         case 1:
+            // max i side
+            jbeg = box.lower()[1];
+            jend = box.upper()[1];
+            kbeg = box.lower()[2];
+            kend = box.upper()[2];
+            i = box.upper()[0];
+            x = xup[0];
+            for (k = kbeg; k <= kend; ++k) {
+               z = xlo[2] + dx[2] * (k - patch_box.lower()[2] + 0.5);
+               for (j = jbeg; j <= jend; ++j) {
+                  y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+                  if (a_array) a_array(i, j, k) = 1.0;
+                  if (b_array) b_array(i, j, k) = 0.0;
+                  if (g_array) g_array(i, j, k) = d_exact(x, y, z);
+               }
+            }
+            break;
+         case 2:
+            // min j side
+            ibeg = box.lower()[0];
+            iend = box.upper()[0];
+            kbeg = box.lower()[2];
+            kend = box.upper()[2];
+            j = box.lower()[1] + 1;
+            y = xlo[1];
+            for (k = kbeg; k <= kend; ++k) {
+               z = xlo[2] + dx[2] * (k - patch_box.lower()[2] + 0.5);
+               for (i = ibeg; i <= iend; ++i) {
+                  x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                  if (a_array) a_array(i, j, k) = 1.0;
+                  if (b_array) b_array(i, j, k) = 0.0;
+                  if (g_array) g_array(i, j, k) = d_exact(x, y, z);
+               }
+            }
+            break;
+         case 3:
+            // max j side
+            ibeg = box.lower()[0];
+            iend = box.upper()[0];
+            kbeg = box.lower()[2];
+            kend = box.upper()[2];
+            j = box.upper()[1];
+            y = xup[1];
+            for (k = kbeg; k <= kend; ++k) {
+               z = xlo[2] + dx[2] * (k - patch_box.lower()[2] + 0.5);
+               for (i = ibeg; i <= iend; ++i) {
+                  x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                  if (a_array) a_array(i, j, k) = 1.0;
+                  if (b_array) b_array(i, j, k) = 0.0;
+                  if (g_array) g_array(i, j, k) = d_exact(x, y, z);
+               }
+            }
+            break;
+         case 4:
+            // min k side
+            ibeg = box.lower()[0];
+            iend = box.upper()[0];
+            jbeg = box.lower()[1];
+            jend = box.upper()[1];
+            k = box.lower()[2] + 1;
+            z = xlo[2];
+            for (j = jbeg; j <= jend; ++j) {
+               y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+               for (i = ibeg; i <= iend; ++i) {
+                  x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                  if (a_array) a_array(i, j, k) = 1.0;
+                  if (b_array) b_array(i, j, k) = 0.0;
+                  if (g_array) g_array(i, j, k) = d_exact(x, y, z);
+               }
+            }
+            break;
+         case 5:
+            // max k side
+            ibeg = box.lower()[0];
+            iend = box.upper()[0];
+            jbeg = box.lower()[1];
+            jend = box.upper()[1];
+            k = box.upper()[2];
+            z = xup[2];
+            for (j = jbeg; j <= jend; ++j) {
+               y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+               for (i = ibeg; i <= iend; ++i) {
+                  x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                  if (a_array) a_array(i, j, k) = 1.0;
+                  if (b_array) b_array(i, j, k) = 0.0;
+                  if (g_array) g_array(i, j, k) = d_exact(x, y, z);
+               }
+            }
+            break;
+         default:
+            TBOX_ERROR("Invalid location index in\n"
+            << "PoissonPolynomialSolution::setBcCoefs");
+      }
+   }
+}
+
+/*
+ ***********************************************************************
+ * This class uses analytical boundary condition, so it can            *
+ * an unlimited number of extensions past the corner of a patch.       *
+ ***********************************************************************
+ */
+hier::IntVector PoissonPolynomialSolution::numberOfExtensionsFillable() const
+{
+   return hier::IntVector(tbox::Dimension(d_dim), 1000);
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/PoissonPolynomialSolution.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/PoissonPolynomialSolution.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,104 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   PoissonPolynomialSolution class declaration 
+ *
+ ************************************************************************/
+#ifndef included_PoissonPolynomialSolution
+#define included_PoissonPolynomialSolution
+
+#include "SAMRAI/tbox/Dimension.h"
+#include "QuarticFcn.h"
+
+#include <string>
+#include "SAMRAI/tbox/Database.h"
+
+/*
+ * SAMRAI classes
+ */
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/solv/PoissonSpecifications.h"
+#include "SAMRAI/solv/RobinBcCoefStrategy.h"
+
+using namespace SAMRAI;
+
+/*!
+ * @brief Specialized class to provide polynomial-solution-specific stuff.
+ */
+class PoissonPolynomialSolution:
+   public solv::RobinBcCoefStrategy
+{
+
+public:
+   PoissonPolynomialSolution(
+      const tbox::Dimension& dim);
+
+   PoissonPolynomialSolution(
+      /*! Ojbect name */
+      const std::string& object_name
+      ,
+      const tbox::Dimension& dim
+      , /*! Input database */
+      tbox::Database& database
+      , /*! Standard output stream */
+      std::ostream* out_stream = NULL
+      , /*! Log output stream */
+      std::ostream* log_stream = NULL);
+
+   virtual ~PoissonPolynomialSolution();
+
+   void
+   setFromDatabase(
+      tbox::Database& database);
+
+   void
+   setPoissonSpecifications(
+      /*! Object to set */ solv::PoissonSpecifications& sps,
+      /*! C id, if used */ int C_patch_data_id,
+      /*! D id, if used */ int D_patch_data_id) const;
+
+   /*!
+    * @brief Set parameters living on grid.
+    *
+    * Ignored data are: diffcoef_data and ccoef_data
+    * because they are constant.
+    */
+   void
+   setGridData(
+      hier::Patch& patch,
+      pdat::SideData<double>& diffcoef_data,
+      pdat::CellData<double>& ccoef_data,
+      pdat::CellData<double>& exact_data,
+      pdat::CellData<double>& source_data);
+
+   virtual void
+   setBcCoefs(
+      tbox::Pointer<pdat::ArrayData<double> >& acoef_data,
+      tbox::Pointer<pdat::ArrayData<double> >& bcoef_data,
+      tbox::Pointer<pdat::ArrayData<double> >& gcoef_data,
+      const tbox::Pointer<hier::Variable>& variable,
+      const hier::Patch& patch,
+      const hier::BoundaryBox& bdry_box,
+      const double fill_time = 0.0) const;
+
+   hier::IntVector
+   numberOfExtensionsFillable() const;
+
+   friend std::ostream&
+   operator << (
+      std::ostream& os,
+      const PoissonPolynomialSolution& r);
+
+private:
+   const tbox::Dimension d_dim;
+
+   QuarticFcn d_exact;
+   QuarticFcn d_source;
+
+};
+
+#endif  // included_PoissonPolynomialSolution
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/PoissonSineSolution.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/PoissonSineSolution.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,468 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   PoissonSineSolution class implementation 
+ *
+ ************************************************************************/
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/MDA_Access.h"
+#include "SAMRAI/pdat/ArrayDataAccess.h"
+#include "patchFcns.h"
+#include "PoissonSineSolution.h"
+#include STL_SSTREAM_HEADER_FILE
+
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/tbox/Array.h"
+
+using namespace SAMRAI;
+
+PoissonSineSolution::PoissonSineSolution(
+   const tbox::Dimension& dim):
+   d_dim(dim),
+   d_linear_coef(0.0),
+   d_exact(dim)
+{
+   int i;
+   for (i = 0; i < 2 * d_dim.getValue(); ++i) {
+      d_neumann_location[i] = false;
+   }
+}
+
+PoissonSineSolution::PoissonSineSolution(
+   const std::string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Database& database,
+   std::ostream* out_stream,
+   std::ostream* log_stream):
+   d_dim(dim),
+   d_linear_coef(0.0),
+   d_exact(dim)
+{
+   (void)object_name;
+   (void)out_stream;
+   (void)log_stream;
+
+   int i;
+   for (i = 0; i < 2 * d_dim.getValue(); ++i) {
+      d_neumann_location[i] = false;
+   }
+   setFromDatabase(database);
+}
+
+PoissonSineSolution::~PoissonSineSolution()
+{
+}
+
+void PoissonSineSolution::setFromDatabase(
+   tbox::Database& database)
+{
+   std::string istr = database.getStringWithDefault("SinusoidFcnControl", "{}");
+   std::istringstream ist(istr);
+   ist >> d_exact;
+   if (database.isBool("neumann_locations")) {
+      tbox::Array<bool> neumann_locations =
+         database.getBoolArray("neumann_locations");
+      if (neumann_locations.getSize() > 2 * d_dim.getValue()) {
+         TBOX_ERROR(
+            "'neumann_locations' should have at most " << 2 * d_dim.getValue()
+            <<
+            " entries in " << d_dim << "D.\n");
+      }
+      int i;
+      for (i = 0; i < neumann_locations.getSize(); ++i) {
+         d_neumann_location[i] = neumann_locations[i];
+      }
+   }
+   d_linear_coef = database.getDoubleWithDefault("linear_coef",
+         d_linear_coef);
+}
+
+void PoissonSineSolution::setNeumannLocation(
+   int location_index,
+   bool flag)
+{
+   TBOX_ASSERT(location_index < 2 * d_dim.getValue());
+   d_neumann_location[location_index] = flag;
+}
+
+void PoissonSineSolution::setPoissonSpecifications(
+   solv::PoissonSpecifications& sps,
+   int C_patch_data_id,
+   int D_patch_data_id) const
+{
+   (void)C_patch_data_id;
+   (void)D_patch_data_id;
+
+   sps.setDConstant(1.0);
+   sps.setCConstant(d_linear_coef);
+}
+
+void PoissonSineSolution::setGridData(
+   hier::Patch& patch,
+   pdat::SideData<double>& diffcoef_data,
+   pdat::CellData<double>& ccoef_data,
+   pdat::CellData<double>& exact_data,
+   pdat::CellData<double>& source_data)
+{
+   (void)diffcoef_data;
+   (void)ccoef_data;
+
+   hier::Box pbox = patch.getBox();
+   tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+
+   /* Set linear source coefficients */
+   // ccoef_data.getArrayData().fill(d_linear_coef);
+
+   /* Set diffusion coefficients. */
+   // diffcoef_data.fillAll(1.0);
+
+   /* Set source function and exact solution. */
+   /*
+    * For the forcing function
+    * -( 1 + (nx^2 + ny^2) pi^2 ) * sin(pi*(nx*x+px))*sin(pi*(ny*y+py))
+    * the exact solution is sin(pi*(nx*x+px))*sin(pi*(ny*y+py))
+    */
+   setCellDataToSinusoid(exact_data,
+      patch,
+      d_exact);
+   setCellDataToSinusoid(source_data,
+      patch,
+      d_exact);
+   double npi[tbox::Dimension::MAXIMUM_DIMENSION_VALUE], ppi[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   d_exact.getWaveNumbers(npi);
+   d_exact.getPhaseAngles(ppi);
+   double source_scale = 0.0;
+   if (d_dim == tbox::Dimension(2)) {
+      source_scale = d_linear_coef
+         - ((npi[0] * npi[0] + npi[1] * npi[1]) * M_PI * M_PI);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      source_scale = d_linear_coef
+         - ((npi[0] * npi[0] + npi[1] * npi[1] + npi[2] * npi[2]) * M_PI * M_PI);
+   }
+   scaleArrayData(source_data.getArrayData(), source_scale);
+}       // End patch loop.
+
+std::ostream& operator << (
+   std::ostream& os,
+   const PoissonSineSolution& r) {
+   os << r.d_exact << "\n";
+   return os;
+}
+
+void PoissonSineSolution::setBcCoefs(
+   tbox::Pointer<pdat::ArrayData<double> >& acoef_data,
+   tbox::Pointer<pdat::ArrayData<double> >& bcoef_data,
+   tbox::Pointer<pdat::ArrayData<double> >& gcoef_data,
+   const tbox::Pointer<hier::Variable>& variable,
+   const hier::Patch& patch,
+   const hier::BoundaryBox& bdry_box,
+   const double fill_time) const
+{
+   (void)variable;
+   (void)fill_time;
+
+   if (bdry_box.getBoundaryType() != 1) {
+      // Must be a face boundary.
+      TBOX_ERROR("Bad boundary type in\n"
+         << "PoissonSineSolution::setBcCoefs \n");
+   }
+
+   const int location_index = bdry_box.getLocationIndex();
+
+   // a is either 0 (Neumann) or 1 (Dirichlet).
+   if (!acoef_data.isNull())
+      acoef_data->fill(d_neumann_location[location_index] ? 0.0 : 1.0, 0);
+   if (!bcoef_data.isNull())
+      bcoef_data->fill(d_neumann_location[location_index] ? 1.0 : 0.0, 0);
+
+   /*
+    * Get geometry information needed to compute coordinates
+    * of side centers.
+    */
+   hier::Box patch_box(patch.getBox());
+   tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* xlo = patch_geom->getXLower();
+   const double* xup = patch_geom->getXUpper();
+   const double* dx = patch_geom->getDx();
+   const hier::Box& box = bdry_box.getBox();
+   hier::Index lower = box.lower();
+   hier::Index upper = box.upper();
+
+   if (gcoef_data) {
+      if (d_dim == tbox::Dimension(2)) {
+         hier::BoxIterator boxit(gcoef_data->getBox());
+         int i, j;
+         double x, y;
+         switch (location_index) {
+            case 0:
+               // min i edge
+               x = xlo[0];
+               if (d_neumann_location[location_index]) {
+                  SinusoidFcn slope = d_exact.differentiate(1, 0);
+                  if (gcoef_data) for ( ; boxit; boxit++) {
+                        j = (*boxit)[1];
+                        y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+                        (*gcoef_data)(*boxit, 0) = -slope(x, y);
+                     }
+               } else {
+                  if (gcoef_data) for ( ; boxit; boxit++) {
+                        j = (*boxit)[1];
+                        y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+                        (*gcoef_data)(*boxit, 0) = d_exact(x, y);
+                     }
+               }
+               break;
+            case 1:
+               // max i edge
+               x = xup[0];
+               if (d_neumann_location[location_index]) {
+                  SinusoidFcn slope = d_exact.differentiate(1, 0);
+                  if (gcoef_data) for ( ; boxit; boxit++) {
+                        j = (*boxit)[1];
+                        y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+                        (*gcoef_data)(*boxit, 0) = slope(x, y);
+                     }
+               } else {
+                  if (gcoef_data) for ( ; boxit; boxit++) {
+                        j = (*boxit)[1];
+                        y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+                        (*gcoef_data)(*boxit, 0) = d_exact(x, y);
+                     }
+               }
+               break;
+            case 2:
+               // min j edge
+               y = xlo[1];
+               if (d_neumann_location[location_index]) {
+                  SinusoidFcn slope = d_exact.differentiate(0, 1);
+                  if (gcoef_data) for ( ; boxit; boxit++) {
+                        i = (*boxit)[0];
+                        x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                        if (gcoef_data) (*gcoef_data)(*boxit, 0) = -slope(x, y);
+                     }
+               } else {
+                  if (gcoef_data) for ( ; boxit; boxit++) {
+                        i = (*boxit)[0];
+                        x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                        (*gcoef_data)(*boxit, 0) = d_exact(x, y);
+                     }
+               }
+               break;
+            case 3:
+               // max j edge
+               y = xup[1];
+               if (d_neumann_location[location_index]) {
+                  SinusoidFcn slope = d_exact.differentiate(0, 1);
+                  if (gcoef_data) for ( ; boxit; boxit++) {
+                        i = (*boxit)[0];
+                        x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                        (*gcoef_data)(*boxit, 0) = slope(x, y);
+                     }
+               } else {
+                  if (gcoef_data) for ( ; boxit; boxit++) {
+                        i = (*boxit)[0];
+                        x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                        (*gcoef_data)(*boxit, 0) = d_exact(x, y);
+                     }
+               }
+               break;
+            default:
+               TBOX_ERROR("Invalid location index in\n"
+               << "PoissonSineSolution>::setBcCoefs");
+         }
+      }
+
+      if (d_dim == tbox::Dimension(3)) {
+         MDA_Access<double, 3, MDA_OrderColMajor<3> > g_array;
+         if (gcoef_data) g_array = pdat::ArrayDataAccess::access<3, double>(
+                  *gcoef_data);
+         int i, j, k, ibeg, iend, jbeg, jend, kbeg, kend;
+         double x, y, z;
+         switch (bdry_box.getLocationIndex()) {
+            case 0:
+               // min i side
+               jbeg = box.lower()[1];
+               jend = box.upper()[1];
+               kbeg = box.lower()[2];
+               kend = box.upper()[2];
+               i = box.lower()[0] + 1;
+               x = xlo[0];
+               if (d_neumann_location[location_index]) {
+                  SinusoidFcn slope = d_exact.differentiate(1, 0, 0);
+                  for (k = kbeg; k <= kend; ++k) {
+                     z = xlo[2] + dx[2] * (k - patch_box.lower()[2] + 0.5);
+                     for (j = jbeg; j <= jend; ++j) {
+                        y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+                        if (g_array) g_array(i, j, k) = -slope(x, y, z);
+                     }
+                  }
+               } else {
+                  for (k = kbeg; k <= kend; ++k) {
+                     z = xlo[2] + dx[2] * (k - patch_box.lower()[2] + 0.5);
+                     for (j = jbeg; j <= jend; ++j) {
+                        y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+                        if (g_array) g_array(i, j, k) = d_exact(x, y, z);
+                     }
+                  }
+               }
+               break;
+            case 1:
+               // max i side
+               jbeg = box.lower()[1];
+               jend = box.upper()[1];
+               kbeg = box.lower()[2];
+               kend = box.upper()[2];
+               i = box.upper()[0];
+               x = xup[0];
+               if (d_neumann_location[location_index]) {
+                  SinusoidFcn slope = d_exact.differentiate(1, 0, 0);
+                  for (k = kbeg; k <= kend; ++k) {
+                     z = xlo[2] + dx[2] * (k - patch_box.lower()[2] + 0.5);
+                     for (j = jbeg; j <= jend; ++j) {
+                        y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+                        if (g_array) g_array(i, j, k) = slope(x, y, z);
+                     }
+                  }
+               } else {
+                  for (k = kbeg; k <= kend; ++k) {
+                     z = xlo[2] + dx[2] * (k - patch_box.lower()[2] + 0.5);
+                     for (j = jbeg; j <= jend; ++j) {
+                        y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+                        if (g_array) g_array(i, j, k) = d_exact(x, y, z);
+                     }
+                  }
+               }
+               break;
+            case 2:
+               // min j side
+               ibeg = box.lower()[0];
+               iend = box.upper()[0];
+               kbeg = box.lower()[2];
+               kend = box.upper()[2];
+               j = box.lower()[1] + 1;
+               y = xlo[1];
+               if (d_neumann_location[location_index]) {
+                  SinusoidFcn slope = d_exact.differentiate(0, 1, 0);
+                  for (k = kbeg; k <= kend; ++k) {
+                     z = xlo[2] + dx[2] * (k - patch_box.lower()[2] + 0.5);
+                     for (i = ibeg; i <= iend; ++i) {
+                        x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                        if (g_array) g_array(i, j, k) = -slope(x, y, z);
+                     }
+                  }
+               } else {
+                  for (k = kbeg; k <= kend; ++k) {
+                     z = xlo[2] + dx[2] * (k - patch_box.lower()[2] + 0.5);
+                     for (i = ibeg; i <= iend; ++i) {
+                        x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                        if (g_array) g_array(i, j, k) = d_exact(x, y, z);
+                     }
+                  }
+               }
+               break;
+            case 3:
+               // max j side
+               ibeg = box.lower()[0];
+               iend = box.upper()[0];
+               kbeg = box.lower()[2];
+               kend = box.upper()[2];
+               j = box.upper()[1];
+               y = xup[1];
+               if (d_neumann_location[location_index]) {
+                  SinusoidFcn slope = d_exact.differentiate(0, 1, 0);
+                  for (k = kbeg; k <= kend; ++k) {
+                     z = xlo[2] + dx[2] * (k - patch_box.lower()[2] + 0.5);
+                     for (i = ibeg; i <= iend; ++i) {
+                        x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                        if (g_array) g_array(i, j, k) = slope(x, y, z);
+                     }
+                  }
+               } else {
+                  for (k = kbeg; k <= kend; ++k) {
+                     z = xlo[2] + dx[2] * (k - patch_box.lower()[2] + 0.5);
+                     for (i = ibeg; i <= iend; ++i) {
+                        x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                        if (g_array) g_array(i, j, k) = d_exact(x, y, z);
+                     }
+                  }
+               }
+               break;
+            case 4:
+               // min k side
+               ibeg = box.lower()[0];
+               iend = box.upper()[0];
+               jbeg = box.lower()[1];
+               jend = box.upper()[1];
+               k = box.lower()[2] + 1;
+               z = xlo[2];
+               if (d_neumann_location[location_index]) {
+                  SinusoidFcn slope = d_exact.differentiate(0, 0, 1);
+                  for (j = jbeg; j <= jend; ++j) {
+                     y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+                     for (i = ibeg; i <= iend; ++i) {
+                        x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                        if (g_array) g_array(i, j, k) = -slope(x, y, z);
+                     }
+                  }
+               } else {
+                  for (j = jbeg; j <= jend; ++j) {
+                     y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+                     for (i = ibeg; i <= iend; ++i) {
+                        x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                        if (g_array) g_array(i, j, k) = d_exact(x, y, z);
+                     }
+                  }
+               }
+               break;
+            case 5:
+               // max k side
+               ibeg = box.lower()[0];
+               iend = box.upper()[0];
+               jbeg = box.lower()[1];
+               jend = box.upper()[1];
+               k = box.upper()[2];
+               z = xup[2];
+               if (d_neumann_location[location_index]) {
+                  SinusoidFcn slope = d_exact.differentiate(0, 0, 1);
+                  for (j = jbeg; j <= jend; ++j) {
+                     y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+                     for (i = ibeg; i <= iend; ++i) {
+                        x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                        if (g_array) g_array(i, j, k) = slope(x, y, z);
+                     }
+                  }
+               } else {
+                  for (j = jbeg; j <= jend; ++j) {
+                     y = xlo[1] + dx[1] * (j - patch_box.lower()[1] + 0.5);
+                     for (i = ibeg; i <= iend; ++i) {
+                        x = xlo[0] + dx[0] * (i - patch_box.lower()[0] + 0.5);
+                        if (g_array) g_array(i, j, k) = d_exact(x, y, z);
+                     }
+                  }
+               }
+               break;
+            default:
+               TBOX_ERROR("Invalid location index in\n"
+               << "PoissonSineSolution::setBcCoefs");
+         }
+      }
+   }
+}
+
+/*
+ ***********************************************************************
+ * This class uses analytical boundary condition, so it can            *
+ * an unlimited number of extensions past the corner of a patch.       *
+ ***********************************************************************
+ */
+hier::IntVector PoissonSineSolution::numberOfExtensionsFillable() const
+{
+   return hier::IntVector(d_dim, 1000);
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/PoissonSineSolution.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/PoissonSineSolution.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   PoissonSineSolution class declaration 
+ *
+ ************************************************************************/
+#ifndef included_PoissonSineSolution
+#define included_PoissonSineSolution
+
+#include "SAMRAI/tbox/Dimension.h"
+#include "SinusoidFcn.h"
+
+#include <string>
+#include "SAMRAI/tbox/Database.h"
+
+/*
+ * SAMRAI classes
+ */
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/solv/PoissonSpecifications.h"
+#include "SAMRAI/solv/RobinBcCoefStrategy.h"
+
+using namespace SAMRAI;
+
+/*!
+ * @brief Specialized class to provide sine-solution-specific stuff.
+ */
+class PoissonSineSolution:
+   public solv::RobinBcCoefStrategy
+{
+
+public:
+   PoissonSineSolution(
+      const tbox::Dimension& dim);
+
+   PoissonSineSolution(
+      /*! Ojbect name */
+      const std::string& object_name
+      ,
+      const tbox::Dimension& dim
+      , /*! Input database */
+      tbox::Database& database
+      , /*! Standard output stream */
+      std::ostream* out_stream = NULL
+      , /*! Log output stream */
+      std::ostream* log_stream = NULL);
+
+   virtual ~PoissonSineSolution();
+
+   void
+   setFromDatabase(
+      tbox::Database& database);
+
+   void
+   setNeumannLocation(
+      int location_index,
+      bool flag = true);
+
+   void
+   setPoissonSpecifications(
+      /*! Object to set */ solv::PoissonSpecifications& sps,
+      /*! C id, if used */ int C_patch_data_id,
+      /*! D id, if used */ int D_patch_data_id) const;
+
+   /*!
+    * @brief Set parameters living on grid.
+    *
+    * Ignored data are: diffcoef_data and ccoef_data
+    * because they are constant.
+    */
+   void
+   setGridData(
+      hier::Patch& patch,
+      pdat::SideData<double>& diffcoef_data,
+      pdat::CellData<double>& ccoef_data,
+      pdat::CellData<double>& exact_data,
+      pdat::CellData<double>& source_data);
+
+   virtual void
+   setBcCoefs(
+      tbox::Pointer<pdat::ArrayData<double> >& acoef_data,
+      tbox::Pointer<pdat::ArrayData<double> >& bcoef_data,
+      tbox::Pointer<pdat::ArrayData<double> >& gcoef_data,
+      const tbox::Pointer<hier::Variable>& variable,
+      const hier::Patch& patch,
+      const hier::BoundaryBox& bdry_box,
+      const double fill_time = 0.0) const;
+
+   hier::IntVector
+   numberOfExtensionsFillable() const;
+
+   friend std::ostream&
+   operator << (
+      std::ostream& os,
+      const PoissonSineSolution& r);
+
+private:
+   const tbox::Dimension d_dim;
+
+   bool d_neumann_location[2 * tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   double d_linear_coef;
+   SinusoidFcn d_exact;
+
+};
+
+#endif  // included_PoissonSineSolution
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/QuarticFcn.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/QuarticFcn.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,385 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Quartic function functor. 
+ *
+ ************************************************************************/
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "QuarticFcn.h"
+#include IOSTREAM_HEADER_FILE
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ * Temporary fix for g++ lacking instantiations when --no-implicit-templates
+ * is used (by SAMRAI)
+ */
+#define fill_n(p, n, v) { size_t _i; for (_i = 0; _i < n; ++_i) p[_i] = v; }
+#define copy_n(s, n, d) { size_t _i; for (_i = 0; _i < n; ++_i) d[_i] = s[_i]; }
+
+QuarticFcn::QuarticFcn(
+   const tbox::Dimension& dim):
+   d_dim(dim)
+{
+   fill_n(d_coefs, NUMBER_OF_3D_COEF, 0.0)
+}
+
+QuarticFcn::QuarticFcn(
+   const QuarticFcn& r):
+   d_dim(r.d_dim)
+{
+   copy_n(r.d_coefs, NUMBER_OF_3D_COEF, d_coefs)
+}
+
+int QuarticFcn::setPolynomialCoef(
+   ctype type,
+   double c) {
+   d_coefs[type] = c;
+   return 0;
+}
+
+double QuarticFcn::getPolynomialCoef(
+   ctype type) const {
+   return d_coefs[type];
+}
+
+double QuarticFcn::operator () (
+   double x) const {
+   TBOX_ASSERT(d_dim == tbox::Dimension(1));
+   double rval;
+   rval = d_coefs[co_c]
+      + d_coefs[co_x] * x
+      + d_coefs[co_xx] * x * x
+      + d_coefs[co_xxx] * x * x * x
+      + d_coefs[co_xxxx] * x * x * x * x;
+   return rval;
+}
+double QuarticFcn::operator () (
+   double x,
+   double y) const {
+   TBOX_ASSERT(d_dim == tbox::Dimension(2));
+   double rval;
+   rval = d_coefs[co_c]
+      + d_coefs[co_x] * x + d_coefs[co_y] * y
+      + d_coefs[co_xy] * x * y + d_coefs[co_xx] * x * x + d_coefs[co_yy] * y
+      * y
+      + d_coefs[co_xxx] * x * x * x + d_coefs[co_xxy] * x * x * y
+      + d_coefs[co_xyy] * x * y * y + d_coefs[co_yyy] * y * y * y
+      + d_coefs[co_xxxy] * x * x * x * y + d_coefs[co_xxyy] * x * x * y * y
+      + d_coefs[co_xyyy] * x * y * y * y + d_coefs[co_yyyy] * y * y * y * y
+   ;
+   return rval;
+}
+double QuarticFcn::operator () (
+   double x,
+   double y,
+   double z) const {
+   TBOX_ASSERT(d_dim == tbox::Dimension(3));
+   double rval;
+   rval = d_coefs[co_c]
+      + d_coefs[co_x] * x + d_coefs[co_y] * y + d_coefs[co_z] * z
+      + d_coefs[co_xx] * x * x + d_coefs[co_yy] * y * y + d_coefs[co_zz] * z
+      * z
+      + d_coefs[co_xy] * x * y + d_coefs[co_xz] * x * z + d_coefs[co_yz] * y
+      * z
+      + d_coefs[co_zzz] * z * z * z + d_coefs[co_xxz] * x * x * z
+      + d_coefs[co_xzz] * x * z * z
+      + d_coefs[co_yyz] * y * y * z + d_coefs[co_yzz] * x * z * z
+      + d_coefs[co_xyz] * x * y * z
+      + d_coefs[co_xxxz] * x * x * x * z + d_coefs[co_xxyz] * x * x * y * z
+      + d_coefs[co_xxzz] * x * x * z * x + d_coefs[co_xyyz] * x * y * y * z
+      + d_coefs[co_xyzz] * x * y * z * z + d_coefs[co_xzzz] * x * z * z * z
+      + d_coefs[co_yyyz] * y * y * y * z + d_coefs[co_yyzz] * y * y * z * z
+      + d_coefs[co_yzzz] * y * z * z * z + d_coefs[co_zzzz] * z * z * z * z
+   ;
+   return rval;
+}
+
+QuarticFcn QuarticFcn::operator + (
+   const QuarticFcn& r) const {
+   QuarticFcn v(d_dim);
+   size_t i;
+   for (i = 0; i < NUMBER_OF_3D_COEF; ++i) {
+      v.d_coefs[i] = d_coefs[i] + r.d_coefs[i];
+   }
+   return v;
+}
+
+QuarticFcn QuarticFcn::operator - (
+   const QuarticFcn& r) const {
+   QuarticFcn v(d_dim);
+   size_t i;
+   for (i = 0; i < NUMBER_OF_3D_COEF; ++i) {
+      v.d_coefs[i] = d_coefs[i] - r.d_coefs[i];
+   }
+   return v;
+}
+
+QuarticFcn& QuarticFcn::operator = (
+   const QuarticFcn& r) {
+   size_t i;
+   for (i = 0; i < NUMBER_OF_3D_COEF; ++i) {
+      d_coefs[i] = r.d_coefs[i];
+   }
+   return *this;
+}
+
+QuarticFcn& QuarticFcn::differentiateSelf(
+   unsigned short int x
+   ,
+   unsigned short int y)
+{
+   TBOX_ASSERT(d_dim == tbox::Dimension(2));
+   /*
+    * Since differentiation commutes,
+    * simply differentiate one direction at a time.
+    */
+   // Differentiate in x direction.
+   for ( ; x > 0; --x) {
+      d_coefs[co_c] = d_coefs[co_x];
+      d_coefs[co_x] = 2 * d_coefs[co_xx];
+      d_coefs[co_xx] = 3 * d_coefs[co_xxx];
+      d_coefs[co_xxx] = 4 * d_coefs[co_xxxx];
+      d_coefs[co_xxxx] = 0;
+      d_coefs[co_y] = d_coefs[co_xy];
+      d_coefs[co_xy] = 2 * d_coefs[co_xxy];
+      d_coefs[co_yy] = d_coefs[co_xyy];
+      d_coefs[co_xxy] = 3 * d_coefs[co_xxxy];
+      d_coefs[co_xyy] = 2 * d_coefs[co_xxyy];
+      d_coefs[co_yyy] = d_coefs[co_xyyy];
+      d_coefs[co_xxxy] = 0;
+      d_coefs[co_xxyy] = 0;
+      d_coefs[co_xyyy] = 0;
+      d_coefs[co_yyyy] = 0;
+   }
+   // Differentiate in y direction.
+   for ( ; y > 0; --y) {
+      d_coefs[co_c] = d_coefs[co_y];
+      d_coefs[co_x] = d_coefs[co_xy];
+      d_coefs[co_y] = 2 * d_coefs[co_yy];
+      d_coefs[co_xx] = d_coefs[co_xxy];
+      d_coefs[co_xy] = 2 * d_coefs[co_xyy];
+      d_coefs[co_yy] = 3 * d_coefs[co_yyy];
+      d_coefs[co_xxx] = d_coefs[co_xxxy];
+      d_coefs[co_xxy] = 2 * d_coefs[co_xxyy];
+      d_coefs[co_xyy] = 3 * d_coefs[co_xyyy];
+      d_coefs[co_yyy] = 4 * d_coefs[co_yyyy];
+      d_coefs[co_xxxy] = 0;
+      d_coefs[co_xxyy] = 0;
+      d_coefs[co_xyyy] = 0;
+      d_coefs[co_yyyy] = 0;
+   }
+   return *this;
+}
+
+QuarticFcn& QuarticFcn::differentiateSelf(
+   unsigned short int x
+   ,
+   unsigned short int y
+   ,
+   unsigned short int z)
+{
+   TBOX_ASSERT(d_dim == tbox::Dimension(3));
+   /*
+    * Since differentiation commutes,
+    * simply differentiate one direction at a time.
+    */
+   // Differentiate in x direction.
+   for ( ; x > 0; --x) {
+      d_coefs[co_c] = d_coefs[co_x];
+      d_coefs[co_x] = 2 * d_coefs[co_xx];
+      d_coefs[co_xx] = 3 * d_coefs[co_xxx];
+      d_coefs[co_xxx] = 4 * d_coefs[co_xxxx];
+      d_coefs[co_xxxx] = 0;
+      d_coefs[co_y] = d_coefs[co_xy];
+      d_coefs[co_xy] = 2 * d_coefs[co_xxy];
+      d_coefs[co_yy] = d_coefs[co_xyy];
+      d_coefs[co_xxy] = 3 * d_coefs[co_xxxy];
+      d_coefs[co_xyy] = 2 * d_coefs[co_xxyy];
+      d_coefs[co_yyy] = d_coefs[co_xyyy];
+      d_coefs[co_xxxy] = 0;
+      d_coefs[co_xxyy] = 0;
+      d_coefs[co_xyyy] = 0;
+      d_coefs[co_yyyy] = 0;
+      d_coefs[co_z] = d_coefs[co_xz];
+      d_coefs[co_xz] = 2 * d_coefs[co_xxz];
+      d_coefs[co_yz] = d_coefs[co_xyz];
+      d_coefs[co_zz] = d_coefs[co_xzz];
+      d_coefs[co_xxz] = 3 * d_coefs[co_xxxz];
+      d_coefs[co_xzz] = 2 * d_coefs[co_xxzz];
+      d_coefs[co_yyz] = d_coefs[co_xyyz];
+      d_coefs[co_yzz] = d_coefs[co_xyzz];
+      d_coefs[co_xyz] = 2 * d_coefs[co_xxyz];
+      d_coefs[co_zzz] = d_coefs[co_xzzz];
+      d_coefs[co_xxxz] = 0;
+      d_coefs[co_xxyz] = 0;
+      d_coefs[co_xxzz] = 0;
+      d_coefs[co_xyyz] = 0;
+      d_coefs[co_xyzz] = 0;
+      d_coefs[co_xzzz] = 0;
+      d_coefs[co_yyyz] = 0;
+      d_coefs[co_yyzz] = 0;
+      d_coefs[co_yzzz] = 0;
+      d_coefs[co_zzzz] = 0;
+   }
+   // Differentiate in y direction.
+   for ( ; y > 0; --y) {
+      d_coefs[co_c] = d_coefs[co_y];
+      d_coefs[co_x] = d_coefs[co_xy];
+      d_coefs[co_y] = 2 * d_coefs[co_yy];
+      d_coefs[co_xx] = d_coefs[co_xxy];
+      d_coefs[co_xy] = 2 * d_coefs[co_xyy];
+      d_coefs[co_yy] = 3 * d_coefs[co_yyy];
+      d_coefs[co_xxx] = d_coefs[co_xxxy];
+      d_coefs[co_xxy] = 2 * d_coefs[co_xxyy];
+      d_coefs[co_xyy] = 3 * d_coefs[co_xyyy];
+      d_coefs[co_yyy] = 4 * d_coefs[co_yyyy];
+      d_coefs[co_xxxy] = 0;
+      d_coefs[co_xxyy] = 0;
+      d_coefs[co_xyyy] = 0;
+      d_coefs[co_yyyy] = 0;
+      d_coefs[co_z] = d_coefs[co_yz];
+      d_coefs[co_xz] = d_coefs[co_xyz];
+      d_coefs[co_yz] = 2 * d_coefs[co_yyz];
+      d_coefs[co_zz] = d_coefs[co_yzz];
+      d_coefs[co_xxz] = d_coefs[co_xxyz];
+      d_coefs[co_xzz] = d_coefs[co_xyzz];
+      d_coefs[co_yyz] = 3 * d_coefs[co_yyyz];
+      d_coefs[co_yzz] = 2 * d_coefs[co_yyzz];
+      d_coefs[co_xyz] = 2 * d_coefs[co_xyyz];
+      d_coefs[co_zzz] = d_coefs[co_yzzz];
+      d_coefs[co_xxxz] = 0;
+      d_coefs[co_xxyz] = 0;
+      d_coefs[co_xxzz] = 0;
+      d_coefs[co_xyyz] = 0;
+      d_coefs[co_xyzz] = 0;
+      d_coefs[co_xzzz] = 0;
+      d_coefs[co_yyyz] = 0;
+      d_coefs[co_yyzz] = 0;
+      d_coefs[co_yzzz] = 0;
+      d_coefs[co_zzzz] = 0;
+   }
+   // Differentiate in z direction.
+   for ( ; z > 0; --z) {
+      d_coefs[co_c] = d_coefs[co_z];
+      d_coefs[co_x] = d_coefs[co_xz];
+      d_coefs[co_y] = d_coefs[co_yz];
+      d_coefs[co_z] = 2 * d_coefs[co_zz];
+      d_coefs[co_xx] = d_coefs[co_xxz];
+      d_coefs[co_xy] = d_coefs[co_xyz];
+      d_coefs[co_yy] = d_coefs[co_yyz];
+      d_coefs[co_xz] = 2 * d_coefs[co_xzz];
+      d_coefs[co_yz] = 2 * d_coefs[co_yzz];
+      d_coefs[co_zz] = 3 * d_coefs[co_zzz];
+      d_coefs[co_xxx] = d_coefs[co_xxxz];
+      d_coefs[co_xxy] = d_coefs[co_xxyz];
+      d_coefs[co_xyy] = d_coefs[co_xyyz];
+      d_coefs[co_yyy] = d_coefs[co_yyyz];
+      d_coefs[co_xxz] = 2 * d_coefs[co_xxzz];
+      d_coefs[co_xzz] = 3 * d_coefs[co_xzzz];
+      d_coefs[co_yyz] = 2 * d_coefs[co_yyzz];
+      d_coefs[co_yzz] = 3 * d_coefs[co_yzzz];
+      d_coefs[co_xyz] = 2 * d_coefs[co_xyzz];
+      d_coefs[co_zzz] = 4 * d_coefs[co_zzzz];
+      d_coefs[co_xxxz] = 0;
+      d_coefs[co_xxyz] = 0;
+      d_coefs[co_xxzz] = 0;
+      d_coefs[co_xyyz] = 0;
+      d_coefs[co_xyzz] = 0;
+      d_coefs[co_xzzz] = 0;
+      d_coefs[co_yyyz] = 0;
+      d_coefs[co_yyzz] = 0;
+      d_coefs[co_yzzz] = 0;
+      d_coefs[co_zzzz] = 0;
+   }
+   return *this;
+}
+
+QuarticFcn QuarticFcn::differentiate(
+   unsigned short int x
+   ,
+   unsigned short int y) const
+{
+   TBOX_ASSERT(d_dim == tbox::Dimension(2));
+   QuarticFcn rval(*this);
+   rval.differentiateSelf(x, y);
+   return rval;
+}
+
+QuarticFcn QuarticFcn::differentiate(
+   unsigned short int x
+   ,
+   unsigned short int y
+   ,
+   unsigned short int z) const
+{
+   TBOX_ASSERT(d_dim == tbox::Dimension(3));
+   QuarticFcn rval(*this);
+   rval.differentiateSelf(x, y, z);
+   return rval;
+}
+
+std::ostream& operator << (
+   std::ostream& co,
+   const QuarticFcn& qf) {
+   unsigned short int i;
+   co << '{' << 0 << '=' << qf.d_coefs[0];
+   switch (qf.d_dim.getValue()) {
+      case 1:
+         for (i = 1; i < NUMBER_OF_1D_COEF; ++i) {
+            co << ' ' << i << '=' << qf.d_coefs[i];
+         }
+         break;
+      case 2:
+         for (i = 1; i < NUMBER_OF_2D_COEF; ++i) {
+            co << ' ' << i << '=' << qf.d_coefs[i];
+         }
+         break;
+      case 3:
+         for (i = 1; i < NUMBER_OF_3D_COEF; ++i) {
+            co << ' ' << i << '=' << qf.d_coefs[i];
+         }
+         break;
+   }
+   co << '}';
+   return co;
+}
+
+#define EAT_WS(s) \
+   { while (s.peek() == ' '                     \
+            || s.peek() == '\t'                    \
+            || s.peek() == '\n') { s.get(); } }
+
+std::istream& operator >> (
+   std::istream& ci,
+   QuarticFcn& qf) {
+   fill_n(qf.d_coefs, NUMBER_OF_3D_COEF, 0.0);
+   int number_of_coefs = 0;
+   switch (qf.d_dim.getValue()) {
+      case 1:
+         number_of_coefs = NUMBER_OF_1D_COEF;
+         break;
+      case 2:
+         number_of_coefs = NUMBER_OF_2D_COEF;
+         break;
+      case 3:
+         number_of_coefs = NUMBER_OF_3D_COEF;
+         break;
+   }
+
+   NULL_USE(number_of_coefs);
+
+   unsigned short int j;
+   int dummy;
+   EAT_WS(ci) // ci >> std::noskipws; // ci.ipfx(0);
+   dummy = ci.get();
+   TBOX_ASSERT(dummy == '{');
+   while (ci >> j) {
+      TBOX_ASSERT(j < number_of_coefs);
+      ci >> dummy >> qf.d_coefs[j];
+   }
+   return ci;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/QuarticFcn.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/QuarticFcn.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,243 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Quartic function functor. 
+ *
+ ************************************************************************/
+#ifndef included_QuarticFcn_h
+#define included_QuarticFcn_h
+
+#include "SAMRAI/tbox/Dimension.h"
+
+#include <iostream>
+
+using namespace SAMRAI;
+
+/*!
+ * @brief Quartic function functor.
+ *
+ * This functor exists for convenience, not efficiency.
+ * If you use it heavily, you can improve your efficiency
+ * by replacing its usage with lower level codes.
+ */
+class QuarticFcn
+{
+
+public:
+   /*!
+    * @brief Default constructor
+    *
+    * Construct a trivial polynomial function.
+    */
+   QuarticFcn(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Copy constructor
+    */
+   QuarticFcn(
+      const QuarticFcn& r);
+
+   /*!
+    * @brief Mapping from polynomial term to coefficient number.
+    *
+    * Each member of this enumeration corresponds to a term in
+    * the polynomial.  @c co_c corresponds to the constant term.
+    * The rest should be self-explanatory.
+    */
+   enum ctype {
+      co_c = 0,
+      co_x = 1,
+      co_xx = 2,
+      co_xxx = 3,
+      co_xxxx = 4,
+      co_y = 5,
+      co_xy = 6,
+      co_yy = 7,
+      co_xxy = 8,
+      co_xyy = 9,
+      co_yyy = 10,
+      co_xxxy = 11,
+      co_xxyy = 12,
+      co_xyyy = 13,
+      co_yyyy = 14,
+      co_z = 15,
+      co_xz = 16,
+      co_yz = 17,
+      co_zz = 18,
+      co_xxz = 19,
+      co_xyz = 20,
+      co_xzz = 21,
+      co_yyz = 22,
+      co_yzz = 23,
+      co_zzz = 24,
+      co_xxxz = 25,
+      co_xxyz = 26,
+      co_xxzz = 27,
+      co_xyyz = 28,
+      co_xyzz = 29,
+      co_xzzz = 30,
+      co_yyyz = 31,
+      co_yyzz = 32,
+      co_yzzz = 33,
+      co_zzzz = 34
+   };
+
+   /*!
+    * @brief Set polynomial coefficient corresponding to indicated term.
+    */
+   int
+   setPolynomialCoef(
+      /*! Term describer */ ctype type,
+      /*! Coefficient */ double c);
+
+   /*!
+    * @brief Access to polynomial coefficient.
+    */
+   double
+   getPolynomialCoef(
+      /*! Term describer */ ctype type) const;
+
+   /*!
+    * @brief Return the function value.
+    */
+   double
+   operator () (
+      double x) const;
+   double
+   operator () (
+      double x,
+      double y) const;
+   double
+   operator () (
+      double x,
+      double y,
+      double z) const;
+
+   //@{
+
+   //! @name Arithmetic operators.
+
+   /*!
+    * @brief Addition of two polynomials.
+    */
+   QuarticFcn
+   operator + (
+      const QuarticFcn& r) const;
+
+   /*!
+    * @brief Subtraction of two polynomials.
+    */
+   QuarticFcn
+   operator - (
+      const QuarticFcn& r) const;
+
+   /*!
+    * @brief Equal operator.
+    */
+   QuarticFcn&
+   operator = (
+      const QuarticFcn& r);
+
+   //@}
+
+   //@{
+
+   //! @name Differential operations.
+
+   /*!
+    * @brief Differentiate and return new function.
+    *
+    * @return Differentiated function.
+    */
+   QuarticFcn
+   differentiate(
+      unsigned short int x
+      ,
+      unsigned short int y) const;
+   QuarticFcn
+   differentiate(
+      unsigned short int x
+      ,
+      unsigned short int y
+      ,
+      unsigned short int z) const;
+
+   /*!
+    * @brief Differentiate self and return self reference.
+    *
+    * @return Self reference
+    */
+   QuarticFcn&
+   differentiateSelf(
+      unsigned short int x
+      ,
+      unsigned short int y);
+   QuarticFcn&
+   differentiateSelf(
+      unsigned short int x
+      ,
+      unsigned short int y
+      ,
+      unsigned short int z);
+
+   //@}
+
+   //@{
+   /*!
+    * @name IO operators.
+    */
+   /*!
+    * @brief Input from stream.
+    *
+    * Stream extract function reads input in the format used
+    * by the stream insert function.  Except for allowing for
+    * missing coefficients (set to zero), this function requires
+    * the correct syntax or the result is undefined.
+    *
+    * @see QuarticFcn::ctype
+    */
+   friend std::istream&
+   operator >> (
+      std::istream& ci,
+      QuarticFcn& cf);
+   /*!
+    * @brief Output to stream.
+    *
+    * Outputs sets of integer=double values where the integer indicates
+    * the coefficient describer (see ctype) and the double is the
+    * value of the coefficient.
+    *
+    * @see QuarticFcn::ctype
+    */
+   friend std::ostream&
+   operator << (
+      std::ostream& co,
+      const QuarticFcn& cf);
+   //@}
+
+   /*!
+    * @brief Dimensionally-dependent number of polynomial coefficients.
+    *
+    * The number of coefficients are the number of ctype enumerations.
+    */
+  #define NUMBER_OF_1D_COEF 5
+  #define NUMBER_OF_2D_COEF 15
+  #define NUMBER_OF_3D_COEF 35
+
+private:
+   const tbox::Dimension d_dim;
+
+   /*!
+    * @brief tbox::List of coefficients.
+    *
+    * The ordering is specified in the enum.
+    */
+   double d_coefs[NUMBER_OF_3D_COEF];
+
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,32 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   README file for FAC solver test.
+##
+#########################################################################
+
+Test problems for FAC solver
+============================
+
+To generate the 2D and 3D sources, use the genfiles.sh script.
+This script should be run in the SAMRAI/source/test/FAC directory
+or one of the dimensional subdirectories.
+
+To regenerate the source while in the object directory of this
+test, use "make src".
+
+To run:
+======
+
+Compilation:
+              make
+
+Execution:
+              make check
+  or  
+              make check2d
+  or  
+              make check2d
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/SinusoidFcn.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/SinusoidFcn.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,233 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Sinusoidal function functor in FAC solver test. 
+ *
+ ************************************************************************/
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SinusoidFcn.h"
+#include <math.h>
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ * Temporary fix for g++ lacking instantiations when --no-implicit-templates
+ * is used (by SAMRAI)
+ */
+#define fill_n(p, n, v) { size_t _i; for (_i = 0; _i < n; ++_i) p[_i] = v; }
+#define copy_n(s, n, d) { size_t _i; for (_i = 0; _i < n; ++_i) d[_i] = s[_i]; }
+
+SinusoidFcn::SinusoidFcn(
+   const tbox::Dimension& dim):
+   d_dim(dim),
+   d_amp(1.0)
+{
+   fill_n(d_npi, d_dim.getValue(), 0.0)
+   fill_n(d_ppi, d_dim.getValue(), 0.0)
+}
+
+int SinusoidFcn::setAmplitude(
+   const double amp) {
+   d_amp = amp;
+   return 0;
+}
+
+int SinusoidFcn::setWaveNumbers(
+   const double* npi) {
+   for (size_t i = 0; i < d_dim.getValue(); ++i) d_npi[i] = npi[i];
+   return 0;
+}
+
+int SinusoidFcn::getWaveNumbers(
+   double* npi) const {
+   for (size_t i = 0; i < d_dim.getValue(); ++i) npi[i] = d_npi[i];
+   return 0;
+}
+
+int SinusoidFcn::setPhaseAngles(
+   const double* ppi) {
+   for (size_t i = 0; i < d_dim.getValue(); ++i) d_ppi[i] = ppi[i];
+   return 0;
+}
+
+int SinusoidFcn::getPhaseAngles(
+   double* ppi) const {
+   for (size_t i = 0; i < d_dim.getValue(); ++i) ppi[i] = d_ppi[i];
+   return 0;
+}
+
+double SinusoidFcn::operator () (
+   double x) const {
+   TBOX_ASSERT(d_dim == tbox::Dimension(1));
+   double rval;
+   rval = d_amp
+      * sin(M_PI * (d_npi[0] * x + d_ppi[0]));
+   return rval;
+}
+double SinusoidFcn::operator () (
+   double x,
+   double y) const {
+   TBOX_ASSERT(d_dim == tbox::Dimension(2));
+   double rval;
+   rval = d_amp
+      * sin(M_PI * (d_npi[0] * x + d_ppi[0]))
+      * sin(M_PI * (d_npi[1] * y + d_ppi[1]));
+   return rval;
+}
+double SinusoidFcn::operator () (
+   double x,
+   double y,
+   double z) const {
+   TBOX_ASSERT(d_dim == tbox::Dimension(3));
+   double rval;
+   rval = d_amp
+      * sin(M_PI * (d_npi[0] * x + d_ppi[0]))
+      * sin(M_PI * (d_npi[1] * y + d_ppi[1]))
+      * sin(M_PI * (d_npi[2] * z + d_ppi[2]));
+   return rval;
+}
+
+SinusoidFcn& SinusoidFcn::differentiateSelf(
+   unsigned short int x
+   ,
+   unsigned short int y)
+{
+   /*
+    * Since differentiation commutes,
+    * simply differentiate one direction at a time.
+    */
+   // Differentiate in x direction.
+   for ( ; x > 0; --x) {
+      d_amp *= M_PI * d_npi[0];
+      d_ppi[0] += 0.5;
+   }
+   while (d_ppi[0] > 2) d_ppi[0] -= 2.0;
+   // Differentiate in y direction.
+   for ( ; y > 0; --y) {
+      d_amp *= M_PI * d_npi[1];
+      d_ppi[1] += 0.5;
+   }
+   while (d_ppi[1] > 2) d_ppi[1] -= 2.0;
+   return *this;
+}
+
+SinusoidFcn& SinusoidFcn::differentiateSelf(
+   unsigned short int x
+   ,
+   unsigned short int y
+   ,
+   unsigned short int z)
+{
+   /*
+    * Since differentiation commutes,
+    * simply differentiate one direction at a time.
+    */
+   // Differentiate in x direction.
+   for ( ; x > 0; --x) {
+      d_amp *= M_PI * d_npi[0];
+      d_ppi[0] += 0.5;
+   }
+   while (d_ppi[0] > 2) d_ppi[0] -= 2.0;
+   // Differentiate in y direction.
+   for ( ; y > 0; --y) {
+      d_amp *= M_PI * d_npi[1];
+      d_ppi[1] += 0.5;
+   }
+   while (d_ppi[1] > 2) d_ppi[1] -= 2.0;
+   // Differentiate in z direction.
+   for ( ; z > 0; --z) {
+      d_amp *= M_PI * d_npi[2];
+      d_ppi[2] += 0.5;
+   }
+   while (d_ppi[2] > 2) d_ppi[2] -= 2.0;
+   return *this;
+}
+
+SinusoidFcn SinusoidFcn::differentiate(
+   unsigned short int x
+   ,
+   unsigned short int y) const
+{
+   SinusoidFcn rval(*this);
+   rval.differentiateSelf(x, y);
+   return rval;
+}
+
+SinusoidFcn SinusoidFcn::differentiate(
+   unsigned short int x
+   ,
+   unsigned short int y
+   ,
+   unsigned short int z) const
+{
+   SinusoidFcn rval(*this);
+   rval.differentiateSelf(x, y, z);
+   return rval;
+}
+
+#define EAT_WS(s) \
+   { while (s.peek() == ' '                     \
+            || s.peek() == '\t'                    \
+            || s.peek() == '\n') { s.get(); } }
+
+std::istream& operator >> (
+   std::istream& ci,
+   SinusoidFcn& sf) {
+   fill_n(sf.d_npi, sf.d_dim.getValue(), 0.0)
+   fill_n(sf.d_ppi, sf.d_dim.getValue(), 0.0)
+   char dummy, name[2];
+   EAT_WS(ci) // ci >> std::skipws; // ci.ipfx(0);
+   ci >> dummy;
+   TBOX_ASSERT(dummy == '{');
+   EAT_WS(ci) // ci >> std::skipws; // ci.ipfx(0);
+   while (ci.peek() != '}') {
+      ci.read(name, 2);
+      if (name[0] == 'a' && name[1] == 'm') {
+         ci >> dummy;
+         TBOX_ASSERT(dummy == 'p');
+         ci >> dummy;
+         TBOX_ASSERT(dummy == '=');
+         ci >> sf.d_amp;
+      } else {
+         ci >> dummy;
+         TBOX_ASSERT(dummy == '=');
+         double * data(name[0] == 'n' ? sf.d_npi : sf.d_ppi);
+         int dim(name[1] == 'x' ? 0 :
+                 name[1] == 'y' ? 1 :
+                 name[1] == 'z' ? 2 : 3);
+         TBOX_ASSERT(dim < sf.d_dim.getValue());
+         ci >> data[dim];
+      }
+      EAT_WS(ci) // ci >> std::skipws; // ci.ipfx(0);
+   }
+   return ci;
+}
+
+SinusoidFcn& SinusoidFcn::operator = (
+   const SinusoidFcn& r) {
+   TBOX_ASSERT(d_dim == r.d_dim);
+   d_amp = r.d_amp;
+   for (int i = 0; i < d_dim.getValue(); ++i) {
+      d_npi[i] = r.d_npi[i];
+      d_ppi[i] = r.d_ppi[i];
+   }
+   return *this;
+}
+
+std::ostream& operator << (
+   std::ostream& co,
+   const SinusoidFcn& sf) {
+   co << "{ amp=" << sf.d_amp;
+   co << " nx=" << sf.d_npi[0] << " px=" << sf.d_npi[0];
+   if (sf.d_dim >= tbox::Dimension(2)) {
+      co << " ny=" << sf.d_npi[1] << " py=" << sf.d_npi[1];
+   }
+   if (sf.d_dim >= tbox::Dimension(3)) {
+      co << " nz=" << sf.d_npi[2] << " pz=" << sf.d_npi[2];
+   }
+   co << " }";
+   return co;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/SinusoidFcn.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/SinusoidFcn.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,183 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Sinusoidal function functor in FAC solver test. 
+ *
+ ************************************************************************/
+#ifndef included_SinusoidFcn_h
+#define included_SinusoidFcn_h
+
+#include "SAMRAI/tbox/Dimension.h"
+
+#include <iostream>
+
+using namespace SAMRAI;
+
+/*!
+ * @brief Sinusoid function functor.
+ *
+ * This functor exists for convenience, not efficiency.
+ * If you use it heavily, you can improve your efficiency
+ * by replacing its usage with lower level codes.
+ */
+class SinusoidFcn
+{
+
+public:
+   SinusoidFcn(
+      const tbox::Dimension& dim);
+
+   /*!
+    * @brief Return the function value.
+    */
+   double
+   operator () (
+      double x) const;
+   double
+   operator () (
+      double x,
+      double y) const;
+   double
+   operator () (
+      double x,
+      double y,
+      double z) const;
+
+   /*!
+    * @brief Set amplitude.
+    */
+   int
+   setAmplitude(
+      const double amp);
+
+   /*!
+    * @brief Set all wave numbers.
+    *
+    * Wave numbers should be given in half-cycles, i.e., 1 -> @f$\pi at f$.
+    */
+   int
+   setWaveNumbers(
+      const double* npi);
+
+   /*!
+    * @brief Set all phase angles.
+    *
+    * Wave numbers should be given in half-cycles, i.e., 1 -> @f$\pi at f$.
+    */
+   int
+   setPhaseAngles(
+      const double* ppi);
+
+   /*!
+    * @brief Get wave numbers.
+    *
+    * Wave numbers are be given in half-cycles, i.e., 1 -> @f$\pi at f$.
+    */
+   int
+   getWaveNumbers(
+      double* npi) const;
+
+   /*!
+    * @brief Get phase angles.
+    *
+    * Wave numbers are be given in half-cycles, i.e., 1 -> @f$\pi at f$.
+    */
+   int
+   getPhaseAngles(
+      double* ppi) const;
+
+   //@{
+
+   //! @name Differential operations.
+
+   /*!
+    * @brief Differentiate and return new function.
+    *
+    * @return Differentiated function.
+    */
+   SinusoidFcn
+   differentiate(
+      unsigned short int x
+      ,
+      unsigned short int y) const;
+   SinusoidFcn
+   differentiate(
+      unsigned short int x
+      ,
+      unsigned short int y
+      ,
+      unsigned short int z) const;
+
+   /*!
+    * @brief Differentiate self and return self reference.
+    *
+    * @return Self reference
+    */
+   SinusoidFcn&
+   differentiateSelf(
+      unsigned short int x
+      ,
+      unsigned short int y);
+   SinusoidFcn&
+   differentiateSelf(
+      unsigned short int x
+      ,
+      unsigned short int y
+      ,
+      unsigned short int z);
+
+   //@}
+
+   SinusoidFcn&
+   operator = (
+      const SinusoidFcn& r);
+
+   //@{
+   /*!
+    * @name IO operators.
+    */
+   /*!
+    * @brief Input from stream.
+    *
+    * Stream extract function reads input in the format used
+    * by the stream insert function.  Except for allowing for
+    * missing coefficients (set to zero), this function requires
+    * the correct syntax or the result is undefined.
+    *
+    * @see SinusoidFcn::ctype
+    */
+   friend std::istream&
+   operator >> (
+      std::istream& ci,
+      SinusoidFcn& cf);
+   /*!
+    * @brief Output to stream.
+    *
+    * Outputs sets of name=double values where the name is one
+    * of nx, px, ny, nz or pz, and the double is the value of
+    * the coefficient.
+    *
+    * @see SinusoidFcn::ctype
+    */
+   friend std::ostream&
+   operator << (
+      std::ostream& co,
+      const SinusoidFcn& cf);
+   //@}
+
+private:
+   const tbox::Dimension d_dim;
+
+   //! Amplitude
+   double d_amp;
+   //! Wave number in half-cycles
+   double d_npi[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   //! Phase shift in half-cycles
+   double d_ppi[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/get-input-filename.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/get-input-filename.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,43 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility for getting the input file name. 
+ *
+ ************************************************************************/
+#include "SAMRAI/SAMRAI_config.h"
+#include <string>
+
+// using namespace std;
+
+#include "get-input-filename.h"
+
+int get_input_filename(
+   int* argc,
+   char* argv[],
+   std::string& input_filename) {
+
+   int rval = 0;
+   std::string argv0(argv[0]);
+   if (*argc > 1) {
+      // Input file is the first argument.  Shift other arguments down.
+      input_filename = argv[1];
+      --(*argc);
+      int i;
+      for (i = 1; i < (*argc); ++i) {
+         argv[i] = argv[i + 1];
+      }
+   } else if (*argc == 1 && argv0.rfind("check-") < argv0.size()) {
+      /*
+       * No argument but input file is implicit in program name
+       * which has the form check-<input file without .input>.
+       */
+      input_filename = argv0.substr(argv0.rfind("check-") + 6) + ".input";
+   } else if (*argc == 1) {
+      // No argument and not invoked as "check-blah".
+      rval = 1;
+   }
+   return rval;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/get-input-filename.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/get-input-filename.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,30 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility for getting the input file name. 
+ *
+ ************************************************************************/
+#include <string>
+
+/*!
+ * This function gets the input file name from the argument list.
+ * For most cases, this is simply the first
+ * command-line argument (after the program name).
+ * The variable @c input_filename is set to the filename,
+ * and all arguments following it are shifed down one.
+ * Unless you are a developer, this is all you need to know.
+ *
+ * For the special case with no command-line argument,
+ * if the program is invoked with the name "check-blah",
+ * it assumes the input file is "blah.input".
+ * The purpose of this setup is so that it is compatible with
+ * the automake make-check mechanism, which runs programs without
+ * arguments.  At the same time, an input file can be manually
+ * specified for operational flexibility.
+ *
+ * @return 0 if filename is found, 1 otherwise.
+ */
+int get_input_filename(int* argc, char* argv[], std::string & input_filename);
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/main.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/main.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,371 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Program for poisson solver on adaptive grid using FAC 
+ *
+ ************************************************************************/
+#include "SAMRAI/SAMRAI_config.h"
+
+#include IOMANIP_HEADER_FILE
+#include <fstream>
+// using namespace std;
+
+#include "printObject.h"
+#include "AdaptivePoisson.h"
+#include "get-input-filename.h"
+
+/*
+ * Headers for basic SAMRAI objects used in this code.
+ */
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ * Headers for major algorithm/data structure objects from SAMRAI
+ */
+#include "SAMRAI/appu/VisItDataWriter.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/hier/GridGeometry.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/mesh/BergerRigoutsos.h"
+#include "SAMRAI/mesh/GriddingAlgorithm.h"
+#include "SAMRAI/mesh/TreeLoadBalancer.h"
+#include "SAMRAI/mesh/StandardTagAndInitialize.h"
+#include "SAMRAI/solv/FACPreconditioner.h"
+
+#ifndef LACKS_NAMESPACE
+using namespace SAMRAI;
+#endif
+
+int main(
+   int argc,
+   char* argv[])
+{
+
+   string input_filename;
+
+   /*
+    * Initialize MPI, process argv, and initialize SAMRAI
+    */
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   if (get_input_filename(&argc, argv, input_filename) == 1) {
+      tbox::pout << "Usage: " << argv[0] << " <input file>." << endl;
+      tbox::SAMRAI_MPI::finalize();
+      return 0;
+   }
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   bool error_ok = false;
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+      /*
+       * These tests are set up to use hypre.
+       * Do not run them without hypre.
+       */
+#ifdef HAVE_HYPRE
+      tbox::pout << "Input file is " << input_filename << endl;
+
+      std::string case_name;
+      if (argc > 1) {
+         case_name = argv[1];
+      }
+
+      /*
+       * Create input database and parse all data in input file into it.
+       */
+
+      tbox::Pointer<tbox::Database> input_db(new tbox::InputDatabase("input_db"));
+      tbox::InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      if (input_db->isDatabase("TimerManager")) {
+         tbox::TimerManager::createManager(input_db->getDatabase("TimerManager"));
+      }
+
+      /*
+       * Get the Main database part of the input database.
+       * This database contains information relevant to main.
+       */
+
+      tbox::Pointer<tbox::Database> main_db = input_db->getDatabase("Main");
+
+      const tbox::Dimension dim(static_cast<unsigned short>(main_db->getInteger("dim")));
+
+      tbox::plog << "Main database:" << endl;
+      main_db->printClassData(tbox::plog);
+
+      /*
+       * Base filename info.
+       */
+
+      string base_name = main_db->getStringWithDefault("base_name", "noname");
+
+      /*
+       * Modify basename for this particular run.
+       * Add the number of processes and the case name.
+       */
+      if (!case_name.empty()) {
+         base_name = base_name + '-' + case_name;
+      }
+      base_name = base_name + '-'
+         + tbox::Utilities::intToString(tbox::SAMRAI_MPI::getSAMRAIWorld().getSize(), 5);
+
+      /*
+       * Log file info.
+       */
+      {
+         string log_filename =
+            main_db->getStringWithDefault("log_filename", base_name + ".log");
+         bool log_all =
+            main_db->getBoolWithDefault("log_all", false);
+         if (log_all)
+            tbox::PIO::logAllNodes(log_filename);
+         else
+            tbox::PIO::logOnlyNodeZero(log_filename);
+      }
+
+      /*
+       * Create a patch hierarchy for use later.
+       * This object is a required input for these objects: adaptive_poisson.
+       */
+      tbox::Pointer<hier::PatchHierarchy> patch_hierarchy;
+      {
+         /*
+          * Create a grid geometry required for the patchHierarchy object.
+          */
+         tbox::Pointer<geom::CartesianGridGeometry> grid_geometry(
+            new geom::CartesianGridGeometry(
+               dim,
+               "CartesianGridGeometry",
+               input_db->getDatabase("CartesianGridGeometry")));
+         tbox::plog << "Grid Geometry:" << endl;
+         grid_geometry->printClassData(tbox::plog);
+         patch_hierarchy =
+            new hier::PatchHierarchy("Patch Hierarchy", grid_geometry,
+               input_db->getDatabase("PatchHierarchy"));
+      }
+
+      /*
+       * Create the problem-specific object implementing the required
+       * SAMRAI virtual functions.
+       */
+      AdaptivePoisson
+      adaptive_poisson("AdaptivePoisson",
+                       dim,
+                       *(input_db->getDatabase("AdaptivePoisson")),
+                       &tbox::pout,
+                       &tbox::plog);
+
+      tbox::Pointer<mesh::GriddingAlgorithm> gridding_algorithm;
+      {
+         /*
+          * Create the tag-and-initializer, box-generator and load-balancer
+          * object references required by the gridding_algorithm object.
+          */
+         tbox::Pointer<mesh::StandardTagAndInitialize> tag_and_initializer(
+            new mesh::StandardTagAndInitialize(
+               dim,
+               "CellTaggingMethod",
+               tbox::Pointer<mesh::StandardTagAndInitStrategy>(
+                  &adaptive_poisson,
+                  false),
+               input_db->getDatabase("StandardTagAndInitialize")
+               ));
+         tbox::Pointer<mesh::BergerRigoutsos> box_generator(
+            new mesh::BergerRigoutsos(
+               dim,
+               (input_db->isDatabase("BergerRigoutsos") ?
+                input_db->getDatabase("BergerRigoutsos") :
+                tbox::Pointer<tbox::Database>(NULL))));
+         tbox::Pointer<mesh::TreeLoadBalancer> load_balancer(
+            new mesh::TreeLoadBalancer(dim,
+               "load balancer",
+               input_db->getDatabase("TreeLoadBalancer")));
+         load_balancer->setSAMRAI_MPI(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+         /*
+          * Create the gridding algorithm used to generate the SAMR grid
+          * and create the grid.
+          */
+         gridding_algorithm = new mesh::GriddingAlgorithm(
+            patch_hierarchy,
+               " Gridding Algorithm",
+               input_db->getDatabase("GriddingAlgorithm"),
+               tag_and_initializer,
+               box_generator,
+               load_balancer);
+         tbox::plog << "Gridding algorithm:" << std::endl;
+         gridding_algorithm->printClassData(tbox::plog);
+         /*
+          * Make the coarse patch level.
+          */
+         gridding_algorithm->makeCoarsestLevel(0.0);
+      }
+
+      int ln;
+
+      /* Whether to plot */
+      std::string vis_filename =
+         main_db->getStringWithDefault("vis_filename", base_name);
+      bool do_plot =
+         main_db->getBoolWithDefault("do_plot", false);
+
+      /*
+       * After creating all objects and initializing their state,
+       * we print the input database and variable database contents
+       * to the log file.
+       */
+      tbox::plog << "\nCheck input data and variables before simulation:"
+                 << std::endl;
+      tbox::plog << "Input database..." << std::endl;
+      input_db->printClassData(tbox::plog);
+      tbox::plog << "\nVariable database..." << std::endl;
+      hier::VariableDatabase::getDatabase()->printClassData(tbox::plog);
+
+      tbox::plog << "\n\nFinal Hierarchy:\n";
+      patch_hierarchy->recursivePrint(tbox::plog, "\t", 2);
+
+      double target_l2norm = 1e-6;
+      target_l2norm = main_db->getDoubleWithDefault("target_l2norm",
+            target_l2norm);
+      double l2norm, linorm;
+      int max_adaptions = 1;
+      max_adaptions = main_db->getIntegerWithDefault("max_adaptions",
+            max_adaptions);
+      int adaption_number = 0;
+      bool done = false;
+      do {
+         /*
+          * Solve.
+          */
+         string max_cycles_str = "max_cycles";
+         int max_cycles = main_db->getIntegerWithDefault(max_cycles_str, 10);
+         double residual_tol = main_db->getDoubleWithDefault("residual_tol",
+               1e-6);
+         tbox::pout.setf(ios::scientific);
+         int pre_sweeps = main_db->getIntegerWithDefault("pre_sweeps", 5);
+         int post_sweeps = main_db->getIntegerWithDefault("post_sweeps", 5);
+         string initial_u = main_db->getStringWithDefault("initial_u", "0.0");
+         adaptive_poisson.solvePoisson(patch_hierarchy,
+            max_cycles,
+            residual_tol,
+            pre_sweeps,
+            post_sweeps,
+            adaption_number ? string() : initial_u);
+         tbox::Array<double> l2norms(patch_hierarchy->getNumberOfLevels());
+         tbox::Array<double> linorms(patch_hierarchy->getNumberOfLevels());
+         adaptive_poisson.computeError(*patch_hierarchy,
+            &l2norm,
+            &linorm,
+            l2norms,
+            linorms);
+         error_ok = l2norm <= target_l2norm;
+         tbox::plog << "Err " << (error_ok ? "" : "NOT ")
+                    << "ok, err norm/target: "
+                    << scientific << l2norm << '/' << scientific
+                    << target_l2norm << endl;
+         tbox::plog << "Err result after " << adaption_number
+                    << " adaptions: \n"
+                    << setw(15) << "l2: " << setw(10) << scientific << l2norm
+                    << setw(15) << "li: " << setw(10) << scientific << linorm
+                    << "\n";
+         for (ln = 0; ln < patch_hierarchy->getNumberOfLevels(); ++ln) {
+            tbox::plog << setw(10) << "l2[" << setw(2) << ln << "]: "
+            << setw(10) << scientific << l2norms[ln]
+            << setw(10) << "li[" << setw(2) << ln << "]: "
+            << setw(10) << scientific << linorms[ln]
+            << "\n";
+         }
+
+         /* Write the plot file. */
+         if (do_plot) {
+            tbox::Pointer<appu::VisItDataWriter> visit_writer(
+               new appu::VisItDataWriter(dim,
+                  "VisIt Writer",
+                  vis_filename + ".visit"));
+            adaptive_poisson.registerVariablesWithPlotter(*visit_writer);
+            visit_writer->writePlotData(patch_hierarchy,
+               adaption_number);
+            tbox::plog << "Wrote viz file " << vis_filename
+                       << " for grid number "
+                       << adaption_number << '\n';
+         }
+
+         /*
+          * Done when max adaptions or convergence reached.
+          */
+         done = error_ok || (adaption_number >= max_adaptions);
+
+         if (!done) {
+            /*
+             * Adapt grid.
+             */
+            ++adaption_number;
+            tbox::plog << "Adaption number " << adaption_number << "\n";
+
+            tbox::Array<int> tag_buffer(patch_hierarchy->getMaxNumberOfLevels());
+            for (ln = 0; ln < tag_buffer.getSize(); ++ln) {
+               tag_buffer[ln] = 1;
+            }
+            gridding_algorithm->regridAllFinerLevels(
+               0,
+               0.0,
+               tag_buffer);
+            tbox::plog << "Newly adapted hierarchy\n";
+            patch_hierarchy->recursivePrint(tbox::plog, "    ", 1);
+            if (0) {
+               /* Write post-adapt viz file for debugging */
+               tbox::Pointer<appu::VisItDataWriter> visit_writer(
+                  new appu::VisItDataWriter(dim,
+                     "VisIt Writer",
+                     "postadapt.visit"));
+               adaptive_poisson.registerVariablesWithPlotter(*visit_writer);
+               visit_writer->writePlotData(patch_hierarchy,
+                  adaption_number - 1);
+               tbox::plog << "Wrote viz file " << "postadapt.visit" << '\n';
+            }
+         }
+      } while (!done);
+
+      tbox::plog << "After " << adaption_number << "/" << max_adaptions
+                 << " adaptions, residual is " << l2norm << "/"
+                 << target_l2norm
+                 << endl;
+
+      tbox::TimerManager::getManager()->print(tbox::plog);
+
+#else
+      error_ok = true;
+#endif
+
+      if (error_ok) {
+         tbox::pout << "\nPASSED:  FAC" << endl;
+      } else {
+         TBOX_ERROR("Failed to meet accuracy specifications.");
+      }
+   }
+
+   /*
+    * Exit properly by shutting down services in correct order.
+    */
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return 0;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/patchFcns.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/patchFcns.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,248 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Misc patch functions used in FAC solver tests. 
+ *
+ ************************************************************************/
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/pdat/MDA_Access.h"
+#include "SAMRAI/pdat/ArrayDataAccess.h"
+#include "QuarticFcn.h"
+#include "SinusoidFcn.h"
+
+#include "setArrayData.h"
+
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/OutersideData.h"
+
+using namespace SAMRAI;
+
+/*!
+ * \file
+ * \brief AMR-unaware functions to operate on a given single patch,
+ * to support FAC Poisson solve.
+ */
+
+/*!
+ * \brief Scale pdat::ArrayData.
+ */
+void scaleArrayData(
+   pdat::ArrayData<double>& ad,
+   double scale)
+{
+   if (ad.getDim() == tbox::Dimension(2)) {
+      MDA_Access<double, 2,
+                 MDA_OrderColMajor<2> > t4 =
+         pdat::ArrayDataAccess::access<2, double>(ad);
+      setArrayDataToScaled(t4,
+         &ad.getBox().lower()[0],
+         &ad.getBox().upper()[0],
+         scale);
+   } else if (ad.getDim() == tbox::Dimension(3)) {
+      MDA_Access<double, 3,
+                 MDA_OrderColMajor<3> > t4 =
+         pdat::ArrayDataAccess::access<3, double>(ad);
+      setArrayDataToScaled(t4,
+         &ad.getBox().lower()[0],
+         &ad.getBox().upper()[0],
+         scale);
+   }
+}
+
+/*!
+ * \brief Set pdat::ArrayData to a constant.
+ */
+void setArrayDataToConstant(
+   pdat::ArrayData<double>& ad,
+   const geom::CartesianPatchGeometry& patch_geom,
+   double value)
+{
+   if (ad.getDim() == tbox::Dimension(2)) {
+      MDA_Access<double, 2,
+                 MDA_OrderColMajor<2> > t4 =
+         pdat::ArrayDataAccess::access<2, double>(ad);
+      setArrayDataToConstant(t4,
+         &ad.getBox().lower()[0],
+         &ad.getBox().upper()[0],
+         patch_geom.getXLower(),
+         patch_geom.getXUpper(),
+         patch_geom.getDx(),
+         value);
+   } else if (ad.getDim() == tbox::Dimension(3)) {
+      MDA_Access<double, 3,
+                 MDA_OrderColMajor<3> > t4 =
+         pdat::ArrayDataAccess::access<3, double>(ad);
+      setArrayDataToConstant(t4,
+         &ad.getBox().lower()[0],
+         &ad.getBox().upper()[0],
+         patch_geom.getXLower(),
+         patch_geom.getXUpper(),
+         patch_geom.getDx(),
+         value);
+   }
+}
+
+/*!
+ * \brief Set pdat::ArrayData to the x coordinate.
+ */
+void setArrayDataTo(
+   pdat::ArrayData<double>& ad,
+   const geom::CartesianPatchGeometry& patch_geom)
+{
+   if (ad.getDim() == tbox::Dimension(2)) {
+      MDA_Access<double, 2,
+                 MDA_OrderColMajor<2> > t4 =
+         pdat::ArrayDataAccess::access<2, double>(ad);
+      setArrayDataTo(t4,
+         &ad.getBox().lower()[0],
+         &ad.getBox().upper()[0],
+         patch_geom.getXLower(),
+         patch_geom.getXUpper(),
+         patch_geom.getDx());
+   } else if (ad.getDim() == tbox::Dimension(3)) {
+      MDA_Access<double, 3,
+                 MDA_OrderColMajor<3> > t4 =
+         pdat::ArrayDataAccess::access<3, double>(ad);
+      setArrayDataTo(t4,
+         &ad.getBox().lower()[0],
+         &ad.getBox().upper()[0],
+         patch_geom.getXLower(),
+         patch_geom.getXUpper(),
+         patch_geom.getDx());
+   }
+}
+
+/*!
+ * \brief Set pdat::CellData to a sinusoid function.
+ */
+void setCellDataToSinusoid(
+   pdat::CellData<double>& cd,
+   const hier::Patch& patch,
+   const SinusoidFcn& fcn)
+{
+   tbox::Pointer<geom::CartesianPatchGeometry>
+   patch_geom = patch.getPatchGeometry();
+   if (cd.getDim() == tbox::Dimension(2)) {
+      MDA_Access<double, 2, MDA_OrderColMajor<2> >
+      t4 = pdat::ArrayDataAccess::access<2, double>(cd.getArrayData());
+      setArrayDataToSinusoid(t4,
+         &cd.getGhostBox().lower()[0],
+         &cd.getGhostBox().upper()[0],
+         &cd.getBox().lower()[0],
+         patch_geom->getXLower(),
+         patch_geom->getDx(),
+         fcn);
+   } else if (cd.getDim() == tbox::Dimension(3)) {
+      MDA_Access<double, 3, MDA_OrderColMajor<3> >
+      t4 = pdat::ArrayDataAccess::access<3, double>(cd.getArrayData());
+      setArrayDataToSinusoid(t4,
+         &cd.getGhostBox().lower()[0],
+         &cd.getGhostBox().upper()[0],
+         &cd.getBox().lower()[0],
+         patch_geom->getXLower(),
+         patch_geom->getDx(),
+         fcn);
+   }
+}
+
+/*!
+ * \brief Set pdat::ArrayData to Michael's exact solution.
+ */
+void setArrayDataToPerniceExact(
+   pdat::ArrayData<double>& ad,
+   const geom::CartesianPatchGeometry& patch_geom)
+{
+   if (ad.getDim() == tbox::Dimension(2)) {
+      MDA_Access<double, 2,
+                 MDA_OrderColMajor<2> > t4 =
+         pdat::ArrayDataAccess::access<2, double>(ad);
+      setArrayDataToPerniceExact(t4,
+         &ad.getBox().lower()[0],
+         &ad.getBox().upper()[0],
+         patch_geom.getXLower(),
+         patch_geom.getXUpper(),
+         patch_geom.getDx());
+   } else if (ad.getDim() == tbox::Dimension(3)) {
+      MDA_Access<double, 3,
+                 MDA_OrderColMajor<3> > t4 =
+         pdat::ArrayDataAccess::access<3, double>(ad);
+      setArrayDataToPerniceExact(t4,
+         &ad.getBox().lower()[0],
+         &ad.getBox().upper()[0],
+         patch_geom.getXLower(),
+         patch_geom.getXUpper(),
+         patch_geom.getDx());
+   }
+}
+
+/*!
+ * \brief Set pdat::ArrayData to Michael's source function.
+ */
+void setArrayDataToPerniceSource(
+   pdat::ArrayData<double>& ad,
+   const geom::CartesianPatchGeometry& patch_geom)
+{
+   if (ad.getDim() == tbox::Dimension(2)) {
+      MDA_Access<double, 2,
+                 MDA_OrderColMajor<2> > t4 =
+         pdat::ArrayDataAccess::access<2, double>(ad);
+      setArrayDataToPerniceSource(t4,
+         &ad.getBox().lower()[0],
+         &ad.getBox().upper()[0],
+         patch_geom.getXLower(),
+         patch_geom.getXUpper(),
+         patch_geom.getDx());
+   } else if (ad.getDim() == tbox::Dimension(3)) {
+      MDA_Access<double, 3,
+                 MDA_OrderColMajor<3> > t4 =
+         pdat::ArrayDataAccess::access<3, double>(ad);
+      setArrayDataToPerniceSource(t4,
+         &ad.getBox().lower()[0],
+         &ad.getBox().upper()[0],
+         patch_geom.getXLower(),
+         patch_geom.getXUpper(),
+         patch_geom.getDx());
+   }
+}
+
+/*!
+ * \brief Set pdat::ArrayData to a quartic function.
+ */
+void setCellDataToQuartic(
+   pdat::CellData<double>& cd,
+   const hier::Patch& patch,
+   const QuarticFcn& fcn)
+{
+   tbox::Pointer<geom::CartesianPatchGeometry>
+   patch_geom = patch.getPatchGeometry();
+   if (cd.getDim() == tbox::Dimension(2)) {
+      MDA_Access<double, 2, MDA_OrderColMajor<2> >
+      t4 = pdat::ArrayDataAccess::access<2, double>(cd.getArrayData());
+      setArrayDataToQuartic(t4,
+         &cd.getGhostBox().lower()[0],
+         &cd.getGhostBox().upper()[0],
+         &cd.getBox().lower()[0],
+         patch_geom->getXLower(),
+         patch_geom->getDx(),
+         fcn);
+   } else if (cd.getDim() == tbox::Dimension(3)) {
+      MDA_Access<double, 3, MDA_OrderColMajor<3> >
+      t4 = pdat::ArrayDataAccess::access<3, double>(cd.getArrayData());
+      setArrayDataToQuartic(t4,
+         &cd.getGhostBox().lower()[0],
+         &cd.getGhostBox().upper()[0],
+         &cd.getBox().lower()[0],
+         patch_geom->getXLower(),
+         patch_geom->getDx(),
+         fcn);
+   }
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/patchFcns.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/patchFcns.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,61 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Misc patch functions used in FAC solver tests. 
+ *
+ ************************************************************************/
+#include "SinusoidFcn.h"
+#include "QuarticFcn.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/xfer/RefineSchedule.h"
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/OutersideData.h"
+
+using namespace SAMRAI;
+
+void
+scaleArrayData(
+   pdat::ArrayData<double>& ad,
+   double scale);
+
+void
+setArrayDataToConstant(
+   pdat::ArrayData<double>& ad,
+   const geom::CartesianPatchGeometry& patch_geom,
+   double value);
+
+void
+setArrayDataTo(
+   pdat::ArrayData<double>& ad,
+   const geom::CartesianPatchGeometry& patch_geom);
+
+void
+setCellDataToSinusoid(
+   pdat::CellData<double>& cd,
+   const hier::Patch& patch,
+   const SinusoidFcn& fcn);
+/*!
+ * \brief Set pdat::ArrayData to Michael's exact solution.
+ */
+void
+setArrayDataToPerniceExact(
+   pdat::ArrayData<double>& ad,
+   const geom::CartesianPatchGeometry& patch_geom);
+/*!
+ * \brief Set pdat::ArrayData to Michael's source function.
+ */
+void
+setArrayDataToPerniceSource(
+   pdat::ArrayData<double>& ad,
+   const geom::CartesianPatchGeometry& patch_geom);
+
+void
+setCellDataToQuartic(
+   pdat::CellData<double>& cd,
+   const hier::Patch& patch,
+   const QuarticFcn& fcn);
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/printObject.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/printObject.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,182 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Misc printing functions in FAC solver test. 
+ *
+ ************************************************************************/
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "printObject.h"
+
+#include "SAMRAI/pdat/MDA_Access.h"
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/ArrayData.h"
+
+using namespace SAMRAI;
+
+/*!
+ * \brief Print a box
+ */
+int printObject(
+   std::ostream& os,
+   const hier::Box& box,
+   const std::string& border,
+   unsigned short depth)
+{
+   (void)depth;
+   const tbox::Dimension& dim = box.getDim();
+   if ((dim == tbox::Dimension(1))) {
+      os << border << "( " << box.lower(0)
+         << " ) to ( "
+         << box.upper(0)
+         << " )\n";
+   }
+   if ((dim == tbox::Dimension(2))) {
+      os << border << "( " << box.lower(0) << ' ' << box.lower(1)
+         << " ) to ( "
+         << box.upper(0) << ' ' << box.upper(1)
+         << " )\n";
+   }
+   if ((dim == tbox::Dimension(3))) {
+      os << border << "( "
+         << box.lower(0) << ' ' << box.lower(1) << ' ' << box.lower(2)
+         << " ) to ( "
+         << box.upper(0) << ' ' << box.upper(1) << ' ' << box.upper(2)
+         << " )\n";
+   }
+   return 0;
+}
+
+/*!
+ * \brief Print a patch data object
+ */
+int printObject(
+   std::ostream& os,
+   const hier::PatchData& pdat,
+   const std::string& border,
+   unsigned short depth)
+{
+   (void)depth;
+   const hier::Box& rbox = pdat.getBox();
+   const hier::Box& gbox = pdat.getBox();
+   os << border
+      << "Box = ( "
+      << rbox.lower(0) << ' ' << rbox.lower(1)
+      << " ) to ( "
+      << rbox.upper(0) << ' ' << rbox.upper(1)
+      << " )\n";
+   os << border
+      << "Ghost hier::Box = ( "
+      << gbox.lower(0) << ' ' << gbox.lower(1)
+      << " ) to ( "
+      << gbox.upper(0) << ' ' << gbox.upper(1)
+      << " )\n";
+   return 0;
+}
+
+/*!
+ * \brief Print an array data object
+ */
+template<class T>
+int printObject(
+   std::ostream& os,
+   const pdat::ArrayData<T>& adat,
+   const int depth,
+   const std::string& border)
+{
+   os << border << "printObject(pdat::ArayData)... " << std::endl;
+   const hier::Box& rbox = adat.getBox();
+   os << border
+      << "Box = ( "
+      << rbox.lower(0) << ' ' << rbox.lower(1)
+      << " ) to ( "
+      << rbox.upper(0) << ' ' << rbox.upper(1)
+      << " )\n";
+   os << border << "depth " << depth << "\n";
+   printObject(os,
+      adat.getDim(),
+      (const T *)adat.getPointer(depth),
+      &adat.getBox().lower()[0],
+      &adat.getBox().upper()[0]
+      );
+   return 0;
+}
+template int printObject<double>(
+   std::ostream& os,
+   const pdat::ArrayData<double>& adat,
+   const int depth,
+   const std::string& border);
+
+/*!
+ * \brief Print an array
+ */
+int printObject(
+   std::ostream& os
+   ,
+   const tbox::Dimension& dim
+   ,
+   const double* a_ptr,
+   const int* a_lower,
+   const int* a_upper
+   ,
+   const int* lower
+   ,
+   const int* upper) {
+   switch (dim.getValue()) {
+      case 1:
+      {
+         MDA_AccessConst<double, 1, MDA_OrderColMajor<1> > a(a_ptr,
+                                                             a_lower,
+                                                             a_upper);
+         if (!lower) lower = a_lower;
+         if (!upper) upper = a_upper;
+         os << "\narray data... " << std::endl;
+         for (int j = lower[1]; j <= upper[1]; ++j) {
+            for (int i = lower[0]; i <= upper[0]; ++i) {
+               os << i << ' ' << j << ' ' << a(i, j) << std::endl;
+            }
+         }
+      }
+      break;
+      case 2:
+      {
+         MDA_AccessConst<double, 2, MDA_OrderColMajor<2> > a(a_ptr,
+                                                             a_lower,
+                                                             a_upper);
+         if (!lower) lower = a_lower;
+         if (!upper) upper = a_upper;
+         os << "\narray data... " << std::endl;
+         for (int j = lower[1]; j <= upper[1]; ++j) {
+            for (int i = lower[0]; i <= upper[0]; ++i) {
+               os << i << ' ' << j << ' ' << a(i, j) << std::endl;
+            }
+         }
+      }
+      break;
+      case 3:
+      {
+         MDA_AccessConst<double, 3, MDA_OrderColMajor<3> > a(a_ptr,
+                                                             a_lower,
+                                                             a_upper);
+         if (!lower) lower = a_lower;
+         if (!upper) upper = a_upper;
+         os << "\narray data... " << std::endl;
+         for (int j = lower[1]; j <= upper[1]; ++j) {
+            for (int i = lower[0]; i <= upper[0]; ++i) {
+               os << i << ' ' << j << ' ' << a(i, j) << std::endl;
+            }
+         }
+      }
+      break;
+   }
+   return 0;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/printObject.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/printObject.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,70 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Misc printing functions in FAC solver test. 
+ *
+ ************************************************************************/
+#ifndef included_printObject_h
+#define included_printObject_h
+
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/hier/Box.h"
+
+#include <string>
+
+using namespace std;
+using namespace SAMRAI;
+
+/*!
+ * @brief Print a box
+ */
+int
+printObject(
+   std::ostream& os,
+   const hier::Box& box,
+   const std::string& border = std::string(),
+   unsigned short depth = 0);
+
+/*!
+ * @brief Print a patch data object
+ */
+int
+printObject(
+   std::ostream& os,
+   const hier::PatchData& pdat,
+   const std::string& border = std::string(),
+   unsigned short depth = 0);
+
+/*!
+ * @brief Print an array
+ */
+int
+printObject(
+   std::ostream& os,
+   const tbox::Dimension& dim,
+   const double* a_ptr,
+   const int* a_lower,
+   const int* a_upper,
+   const int* lower = NULL,
+   const int* upper = NULL);
+
+/*!
+ * @brief Print an array data object
+ */
+template<class T>
+int
+printObject(
+   std::ostream& os,
+   const tbox::Dimension& dim,
+   const pdat::ArrayData<T>& adat,
+   const int depth = 0,
+   const std::string& border = std::string());
+
+#endif  // included_printObject_h
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/setArrayData.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/setArrayData.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,530 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Misc array setting functions in FAC solver test. 
+ *
+ ************************************************************************/
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "setArrayData.h"
+#include "SAMRAI/pdat/MDA_Access.h"
+#include <math.h>
+
+// using namespace std;
+
+/*!
+ * \file
+ * \brief Set array data when array is given as a pointer or
+ * MultiDimArrayAccess object.
+ *
+ * There is no SAMRAI-specific code in this file.
+ */
+
+void setArrayDataToConstant(
+   MDA_Access<double, 2, MDA_OrderColMajor<2> >& s
+   ,
+   const int* lower,
+   const int* upper
+   ,
+   const double* xlo,
+   const double* xhi,
+   const double* h
+   ,
+   double value) {
+   (void)xlo;
+   (void)xhi;
+   (void)h;
+
+   for (int j = lower[1]; j <= upper[1]; ++j) {
+      for (int i = lower[0]; i <= upper[0]; ++i) {
+         s(i, j) = value;
+      }
+   }
+}
+void setArrayDataToConstant(
+   MDA_Access<double, 3, MDA_OrderColMajor<3> >& s
+   ,
+   const int* lower,
+   const int* upper
+   ,
+   const double* xlo,
+   const double* xhi,
+   const double* h
+   ,
+   double value) {
+   (void)xlo;
+   (void)xhi;
+   (void)h;
+
+   for (int k = lower[2]; k <= upper[2]; ++k) {
+      for (int j = lower[1]; j <= upper[1]; ++j) {
+         for (int i = lower[0]; i <= upper[0]; ++i) {
+            s(i, j, k) = value;
+         }
+      }
+   }
+}
+
+void setArrayDataTo(
+   int dim
+   ,
+   double* ptr
+   ,
+   const int* lower
+   ,
+   const int* upper
+   ,
+   const double* xlo,
+   const double* xhi,
+   const double* h
+   ,
+   const double* coef) {
+   if (dim == 2) {
+      MDA_Access<double, 2, MDA_OrderColMajor<2> > s(ptr, lower, upper);
+      setArrayDataTo(s, lower, upper, xlo, xhi, h, coef);
+   } else if (dim == 3) {
+      MDA_Access<double, 3, MDA_OrderColMajor<3> > s(ptr, lower, upper);
+      setArrayDataTo(s, lower, upper, xlo, xhi, h, coef);
+   }
+}
+
+void setArrayDataTo(
+   MDA_Access<double, 2, MDA_OrderColMajor<2> >& s
+   ,
+   const int* lower
+   ,
+   const int* upper
+   ,
+   const double* xlo,
+   const double* xhi,
+   const double* h
+   ,
+   const double* coef) {
+   (void)xhi;
+
+   const double ucoef[2] = { 1., 1. };
+   if (coef == NULL) coef = ucoef;
+   for (int j = lower[1]; j <= upper[1]; ++j) {
+      double y = xlo[1] + h[1] * (j - lower[1] + 0.5);
+      for (int i = lower[0]; i <= upper[0]; ++i) {
+         double x = xlo[0] + h[0] * (i - lower[0] + 0.5);
+         s(i, j) = coef[0] * x + coef[1] * y;
+      }
+   }
+}
+void setArrayDataTo(
+   MDA_Access<double, 3, MDA_OrderColMajor<3> >& s
+   ,
+   const int* lower
+   ,
+   const int* upper
+   ,
+   const double* xlo,
+   const double* xhi,
+   const double* h
+   ,
+   const double* coef) {
+   (void)xhi;
+
+   const double ucoef[3] = { 1., 1., 1. };
+   if (coef == NULL) coef = ucoef;
+   for (int k = lower[2]; k <= upper[2]; ++k) {
+      double z = xlo[2] + h[2] * (k - lower[2] + 0.5);
+      for (int j = lower[1]; j <= upper[1]; ++j) {
+         double y = xlo[1] + h[1] * (j - lower[1] + 0.5);
+         for (int i = lower[0]; i <= upper[0]; ++i) {
+            double x = xlo[0] + h[0] * (i - lower[0] + 0.5);
+            s(i, j, k) = coef[0] * x + coef[1] * y + coef[2] * z;
+         }
+      }
+   }
+}
+
+void setArrayDataToSinusoidal(
+   MDA_Access<double, 2, MDA_OrderColMajor<2> >& s
+   ,
+   const int* lower
+   ,
+   const int* upper
+   ,
+   const double* xlo,
+   const double* xhi,
+   const double* h
+   ,
+   const double* npi,
+   const double* ppi) {
+   (void)xhi;
+
+   double nx = npi[0], px = ppi[0];
+   double ny = npi[1], py = ppi[1];
+   for (int j = lower[1]; j <= upper[1]; ++j) {
+      double y = xlo[1] + h[1] * (j - lower[1] + 0.5);
+      double siny = sin(M_PI * (ny * y + py));
+      for (int i = lower[0]; i <= upper[0]; ++i) {
+         double x = xlo[0] + h[0] * (i - lower[0] + 0.5);
+         double sinx = sin(M_PI * (nx * x + px));
+         s(i, j) = sinx * siny;
+      }
+   }
+}
+void setArrayDataToSinusoidal(
+   MDA_Access<double, 3, MDA_OrderColMajor<3> >& s
+   ,
+   const int* lower
+   ,
+   const int* upper
+   ,
+   const double* xlo,
+   const double* xhi,
+   const double* h
+   ,
+   const double* npi,
+   const double* ppi) {
+   (void)xhi;
+
+   double nx = npi[0], px = ppi[0];
+   double ny = npi[1], py = ppi[1];
+   double nz = npi[2], pz = ppi[2];
+   for (int k = lower[2]; k <= upper[2]; ++k) {
+      double z = xlo[2] + h[2] * (k - lower[2] + 0.5);
+      double sinz = sin(M_PI * (nz * z + pz));
+      for (int j = lower[1]; j <= upper[1]; ++j) {
+         double y = xlo[1] + h[1] * (j - lower[1] + 0.5);
+         double siny = sin(M_PI * (ny * y + py));
+         for (int i = lower[0]; i <= upper[0]; ++i) {
+            double x = xlo[0] + h[0] * (i - lower[0] + 0.5);
+            double sinx = sin(M_PI * (nx * x + px));
+            s(i, j, k) = sinx * siny * sinz;
+         }
+      }
+   }
+}
+
+void setArrayDataToSinusoidalGradient(
+   int dim
+   ,
+   double** g_ptr
+   ,
+   const int* lower
+   ,
+   const int* upper
+   ,
+   const double* xlo,
+   const double* xhi,
+   const double* h) {
+   (void)xlo;
+   (void)xhi;
+   (void)h;
+   if (dim == 2) {
+      double* gx_ptr = g_ptr[0];
+      MDA_Access<double, 2, MDA_OrderColMajor<2> > gx(gx_ptr, lower, upper);
+      double* gy_ptr = g_ptr[1];
+      MDA_Access<double, 2, MDA_OrderColMajor<2> > gy(gy_ptr, lower, upper);
+      for (int j = lower[1]; j <= upper[1]; ++j) {
+         double y = xlo[1] + h[1] * (j - lower[1] + 0.5);
+         double siny = sin(2 * M_PI * y);
+         double cosy = cos(2 * M_PI * y);
+         for (int i = lower[0]; i <= upper[0]; ++i) {
+            double x = xlo[0] + h[0] * (i - lower[0] + 0.5);
+            double sinx = sin(2 * M_PI * x);
+            double cosx = cos(2 * M_PI * x);
+            gx(i, j) = 2 * M_PI * cosx * siny;
+            gy(i, j) = sinx * 2 * M_PI * cosy;
+         }
+      }
+   } else if (dim == 3) {
+      double* gx_ptr = g_ptr[0];
+      MDA_Access<double, 3, MDA_OrderColMajor<3> > gx(gx_ptr, lower, upper);
+      double* gy_ptr = g_ptr[1];
+      MDA_Access<double, 3, MDA_OrderColMajor<3> > gy(gy_ptr, lower, upper);
+      double* gz_ptr = g_ptr[2];
+      MDA_Access<double, 3, MDA_OrderColMajor<3> > gz(gz_ptr, lower, upper);
+      for (int k = lower[2]; k <= upper[2]; ++k) {
+         double z = xlo[2] + h[2] * (k - lower[2] + 0.5);
+         double sinz = sin(2 * M_PI * z);
+         double cosz = cos(2 * M_PI * z);
+         for (int j = lower[1]; j <= upper[1]; ++j) {
+            double y = xlo[1] + h[1] * (j - lower[1] + 0.5);
+            double siny = sin(2 * M_PI * y);
+            double cosy = cos(2 * M_PI * y);
+            for (int i = lower[0]; i <= upper[0]; ++i) {
+               double x = xlo[0] + h[0] * (i - lower[0] + 0.5);
+               double sinx = sin(2 * M_PI * x);
+               double cosx = cos(2 * M_PI * x);
+               gx(i, j, k) = 2 * M_PI * cosx * siny * sinz;
+               gy(i, j, k) = sinx * 2 * M_PI * cosy * sinz;
+               gz(i, j, k) = sinx * cosy * 2 * M_PI * cosz;
+            }
+         }
+      }
+   }
+}
+
+void setArrayDataToLinear(
+   MDA_Access<double, 2, MDA_OrderColMajor<2> >& s,
+   const int* lower,
+   const int* upper,
+   const double* xlo,
+   const double* xhi,
+   const double* h,
+   double a0,
+   double ax,
+   double ay,
+   double axy) {
+   (void)xhi;
+
+   for (int j = lower[1]; j <= upper[1]; ++j) {
+      double y = xlo[1] + h[1] * (j - lower[1] + 0.5);
+      for (int i = lower[0]; i <= upper[0]; ++i) {
+         double x = xlo[0] + h[0] * (i - lower[0] + 0.5);
+         s(i, j) = a0 + ax * x + ay * y + axy * x * y;
+      }
+   }
+}
+void setArrayDataToLinear(
+   MDA_Access<double, 3, MDA_OrderColMajor<3> >& s,
+   const int* lower,
+   const int* upper,
+   const double* xlo,
+   const double* xhi,
+   const double* h,
+   double a0,
+   double ax,
+   double ay,
+   double az,
+   double axy,
+   double axz,
+   double ayz,
+   double axyz) {
+   (void)xhi;
+
+   for (int k = lower[2]; k <= upper[2]; ++k) {
+      double z = xlo[2] + h[2] * (k - lower[2] + 0.5);
+      for (int j = lower[1]; j <= upper[1]; ++j) {
+         double y = xlo[1] + h[1] * (j - lower[1] + 0.5);
+         for (int i = lower[0]; i <= upper[0]; ++i) {
+            double x = xlo[0] + h[0] * (i - lower[0] + 0.5);
+            s(i, j, k) = a0 + ax * x + ay * y + az * z
+               + axy * x * y + axz * x * z + ayz * y * z + axyz * x * y * z;
+         }
+      }
+   }
+}
+
+void setArrayDataToScaled(
+   MDA_Access<double, 2, MDA_OrderColMajor<2> >& s
+   ,
+   const int* lower,
+   const int* upper
+   ,
+   double factor) {
+   for (int j = lower[1]; j <= upper[1]; ++j) {
+      for (int i = lower[0]; i <= upper[0]; ++i) {
+         s(i, j) *= factor;
+      }
+   }
+}
+void setArrayDataToScaled(
+   MDA_Access<double, 3, MDA_OrderColMajor<3> >& s
+   ,
+   const int* lower,
+   const int* upper
+   ,
+   double factor) {
+   for (int k = lower[2]; k <= upper[2]; ++k) {
+      for (int j = lower[1]; j <= upper[1]; ++j) {
+         for (int i = lower[0]; i <= upper[0]; ++i) {
+            s(i, j, k) *= factor;
+         }
+      }
+   }
+}
+
+/*!
+ * \brief Set array to Michael's exact solution
+ */
+void setArrayDataToPerniceExact(
+   MDA_Access<double, 2, MDA_OrderColMajor<2> >& s
+   ,
+   const int* lower
+   ,
+   const int* upper
+   ,
+   const double* xlo,
+   const double* xhi,
+   const double* h) {
+   (void)xhi;
+
+   for (int j = lower[1]; j <= upper[1]; ++j) {
+      double y = xlo[1] + h[1] * (j - lower[1] + 0.5);
+      for (int i = lower[0]; i <= upper[0]; ++i) {
+         double x = xlo[0] + h[0] * (i - lower[0] + 0.5);
+         s(i, j) = x * (1 - x) * y * (1 - y);
+      }
+   }
+}
+void setArrayDataToPerniceExact(
+   MDA_Access<double, 3, MDA_OrderColMajor<3> >& s
+   ,
+   const int* lower
+   ,
+   const int* upper
+   ,
+   const double* xlo,
+   const double* xhi,
+   const double* h) {
+   (void)xhi;
+
+   for (int k = lower[2]; k <= upper[2]; ++k) {
+      double z = xlo[2] + h[2] * (k - lower[2] + 0.5);
+      for (int j = lower[1]; j <= upper[1]; ++j) {
+         double y = xlo[1] + h[1] * (j - lower[1] + 0.5);
+         for (int i = lower[0]; i <= upper[0]; ++i) {
+            double x = xlo[0] + h[0] * (i - lower[0] + 0.5);
+            s(i, j, k) = x * (1 - x) * y * (1 - y) * z * (1 - z);
+         }
+      }
+   }
+}
+
+/*!
+ * \brief Set array to Michael's source
+ */
+void setArrayDataToPerniceSource(
+   MDA_Access<double, 2, MDA_OrderColMajor<2> >& s
+   ,
+   const int* lower
+   ,
+   const int* upper
+   ,
+   const double* xlo,
+   const double* xhi,
+   const double* h) {
+   (void)xhi;
+
+   for (int j = lower[1]; j <= upper[1]; ++j) {
+      double y = xlo[1] + h[1] * (j - lower[1] + 0.5);
+      for (int i = lower[0]; i <= upper[0]; ++i) {
+         double x = xlo[0] + h[0] * (i - lower[0] + 0.5);
+         s(i, j) = -2 * (x * (1 - x) + y * (1 - y));
+      }
+   }
+}
+void setArrayDataToPerniceSource(
+   MDA_Access<double, 3, MDA_OrderColMajor<3> >& s
+   ,
+   const int* lower
+   ,
+   const int* upper
+   ,
+   const double* xlo,
+   const double* xhi,
+   const double* h) {
+   (void)xhi;
+
+   for (int k = lower[2]; k <= upper[2]; ++k) {
+      double z = xlo[2] + h[2] * (k - lower[2] + 0.5);
+      for (int j = lower[1]; j <= upper[1]; ++j) {
+         double y = xlo[1] + h[1] * (j - lower[1] + 0.5);
+         for (int i = lower[0]; i <= upper[0]; ++i) {
+            double x = xlo[0] + h[0] * (i - lower[0] + 0.5);
+            s(i, j, k) = -2 * (x * (1 - x) + y * (1 - y) + z * (1 - z));
+         }
+      }
+   }
+}
+
+void setArrayDataToSinusoid(
+   MDA_Access<double, 2, MDA_OrderColMajor<2> >& s
+   ,
+   const int* beg
+   ,
+   const int* end
+   ,
+   const int* ilo,
+   const double* xlo,
+   const double* h
+   ,
+   const SinusoidFcn& fcn)
+{
+   for (int j = beg[1]; j <= end[1]; ++j) {
+      double y = xlo[1] + h[1] * (j - ilo[1] + 0.5);
+      for (int i = beg[0]; i <= end[0]; ++i) {
+         double x = xlo[0] + h[0] * (i - ilo[0] + 0.5);
+         s(i, j) = fcn(x, y);
+      }
+   }
+}
+void setArrayDataToSinusoid(
+   MDA_Access<double, 3, MDA_OrderColMajor<3> >& s
+   ,
+   const int* beg
+   ,
+   const int* end
+   ,
+   const int* ilo,
+   const double* xlo,
+   const double* h
+   ,
+   const SinusoidFcn& fcn)
+{
+   for (int k = beg[2]; k <= end[2]; ++k) {
+      double z = xlo[2] + h[2] * (k - ilo[2] + 0.5);
+      for (int j = beg[1]; j <= end[1]; ++j) {
+         double y = xlo[1] + h[1] * (j - ilo[1] + 0.5);
+         for (int i = beg[0]; i <= end[0]; ++i) {
+            double x = xlo[0] + h[0] * (i - ilo[0] + 0.5);
+            s(i, j, k) = fcn(x, y, z);
+         }
+      }
+   }
+}
+
+void setArrayDataToQuartic(
+   MDA_Access<double, 2, MDA_OrderColMajor<2> >& s
+   ,
+   const int* beg
+   ,
+   const int* end
+   ,
+   const int* ilo,
+   const double* xlo,
+   const double* h
+   ,
+   const QuarticFcn& fcn)
+{
+   for (int j = beg[1]; j <= end[1]; ++j) {
+      double y = xlo[1] + h[1] * (j - ilo[1] + 0.5);
+      for (int i = beg[0]; i <= end[0]; ++i) {
+         double x = xlo[0] + h[0] * (i - ilo[0] + 0.5);
+         s(i, j) = fcn(x, y);
+      }
+   }
+}
+void setArrayDataToQuartic(
+   MDA_Access<double, 3, MDA_OrderColMajor<3> >& s
+   ,
+   const int* beg
+   ,
+   const int* end
+   ,
+   const int* ilo,
+   const double* xlo,
+   const double* h
+   ,
+   const QuarticFcn& fcn)
+{
+   for (int k = beg[2]; k <= end[2]; ++k) {
+      double z = xlo[2] + h[2] * (k - beg[2] + 0.5);
+      for (int j = beg[1]; j <= end[1]; ++j) {
+         double y = xlo[1] + h[1] * (j - ilo[1] + 0.5);
+         for (int i = beg[0]; i <= end[0]; ++i) {
+            double x = xlo[0] + h[0] * (i - ilo[0] + 0.5);
+            s(i, j, k) = fcn(x, y, z);
+         }
+      }
+   }
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/setArrayData.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/setArrayData.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,274 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Misc array setting functions in FAC solver test. 
+ *
+ ************************************************************************/
+#ifndef include_setArrayData_h
+#define include_setArrayData_h
+
+#include "SAMRAI/pdat/MDA_Access.h"
+#include "QuarticFcn.h"
+#include "SinusoidFcn.h"
+
+void
+setArrayDataTo(
+   int dim
+   ,
+   double* ptr
+   ,
+   const int* lower
+   ,
+   const int* upper
+   ,
+   const double* xlo,
+   const double* xhi,
+   const double* h
+   ,
+   const double* coef = NULL);
+
+void
+setArrayDataTo(
+   MDA_Access<double, 2, MDA_OrderColMajor<2> >& s
+   ,
+   const int* lower
+   ,
+   const int* upper
+   ,
+   const double* xlo,
+   const double* xhi,
+   const double* h
+   ,
+   const double* coef = NULL);
+void
+setArrayDataTo(
+   MDA_Access<double, 3, MDA_OrderColMajor<3> >& s
+   ,
+   const int* lower
+   ,
+   const int* upper
+   ,
+   const double* xlo,
+   const double* xhi,
+   const double* h
+   ,
+   const double* coef = NULL);
+
+void
+setArrayDataToSinusoidal(
+   MDA_Access<double, 2, MDA_OrderColMajor<2> >& s
+   ,
+   const int* lower
+   ,
+   const int* upper
+   ,
+   const double* xlo,
+   const double* xhi,
+   const double* h
+   ,
+   const double* npi,
+   const double* ppi);
+void
+setArrayDataToSinusoidal(
+   MDA_Access<double, 3, MDA_OrderColMajor<3> >& s
+   ,
+   const int* lower
+   ,
+   const int* upper
+   ,
+   const double* xlo,
+   const double* xhi,
+   const double* h
+   ,
+   const double* npi,
+   const double* ppi);
+
+void
+setArrayDataToSinusoidalGradient(
+   int dim
+   ,
+   double** g_ptr
+   ,
+   const int* lower
+   ,
+   const int* upper
+   ,
+   const double* xlo,
+   const double* xhi,
+   const double* h);
+
+void
+setArrayDataToConstant(
+   MDA_Access<double, 2, MDA_OrderColMajor<2> >& s
+   ,
+   const int* lower,
+   const int* upper
+   ,
+   const double* xlo,
+   const double* xhi,
+   const double* h
+   ,
+   double value);
+void
+setArrayDataToConstant(
+   MDA_Access<double, 3, MDA_OrderColMajor<3> >& s
+   ,
+   const int* lower,
+   const int* upper
+   ,
+   const double* xlo,
+   const double* xhi,
+   const double* h
+   ,
+   double value);
+
+void
+setArrayDataToLinear(
+   MDA_Access<double, 2, MDA_OrderColMajor<2> >& s,
+   const int* lower,
+   const int* upper,
+   const double* xlo,
+   const double* xhi,
+   const double* h,
+   double a0,
+   double ax,
+   double ay,
+   double axy);
+void
+setArrayDataToLinear(
+   MDA_Access<double, 3, MDA_OrderColMajor<3> >& s,
+   const int* lower,
+   const int* upper,
+   const double* xlo,
+   const double* xhi,
+   const double* h,
+   double a0,
+   double ax,
+   double ay,
+   double az,
+   double axy,
+   double axz,
+   double ayz,
+   double axyz);
+
+void
+setArrayDataToScaled(
+   MDA_Access<double, 2, MDA_OrderColMajor<2> >& s
+   ,
+   const int* lower,
+   const int* upper
+   ,
+   double factor);
+void
+setArrayDataToScaled(
+   MDA_Access<double, 3, MDA_OrderColMajor<3> >& s
+   ,
+   const int* lower,
+   const int* upper
+   ,
+   double factor);
+
+void
+setArrayDataToPerniceExact(
+   MDA_Access<double, 2, MDA_OrderColMajor<2> >& s
+   ,
+   const int* lower
+   ,
+   const int* upper
+   ,
+   const double* xlo,
+   const double* xhi,
+   const double* h);
+void
+setArrayDataToPerniceExact(
+   MDA_Access<double, 3, MDA_OrderColMajor<3> >& s
+   ,
+   const int* lower
+   ,
+   const int* upper
+   ,
+   const double* xlo,
+   const double* xhi,
+   const double* h);
+
+void
+setArrayDataToPerniceSource(
+   MDA_Access<double, 2, MDA_OrderColMajor<2> >& s
+   ,
+   const int* lower
+   ,
+   const int* upper
+   ,
+   const double* xlo,
+   const double* xhi,
+   const double* h);
+void
+setArrayDataToPerniceSource(
+   MDA_Access<double, 3, MDA_OrderColMajor<3> >& s
+   ,
+   const int* lower
+   ,
+   const int* upper
+   ,
+   const double* xlo,
+   const double* xhi,
+   const double* h);
+
+void
+setArrayDataToSinusoid(
+   MDA_Access<double, 2, MDA_OrderColMajor<2> >& s
+   ,
+   const int* beg
+   ,
+   const int* end
+   ,
+   const int* ilo,
+   const double* xlo,
+   const double* h
+   ,
+   const SinusoidFcn& fcn);
+void
+setArrayDataToSinusoid(
+   MDA_Access<double, 3, MDA_OrderColMajor<3> >& s
+   ,
+   const int* beg
+   ,
+   const int* end
+   ,
+   const int* ilo,
+   const double* xlo,
+   const double* h
+   ,
+   const SinusoidFcn& fcn);
+
+void
+setArrayDataToQuartic(
+   MDA_Access<double, 2, MDA_OrderColMajor<2> >& s
+   ,
+   const int* beg
+   ,
+   const int* end
+   ,
+   const int* ilo,
+   const double* xlo,
+   const double* h
+   ,
+   const QuarticFcn& fcn);
+void
+setArrayDataToQuartic(
+   MDA_Access<double, 3, MDA_OrderColMajor<3> >& s
+   ,
+   const int* beg
+   ,
+   const int* end
+   ,
+   const int* ilo,
+   const double* xlo,
+   const double* h
+   ,
+   const QuarticFcn& fcn);
+
+#endif  // include_setArrayData_h
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/test_inputs/allneumann.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/test_inputs/allneumann.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,119 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for FAC solver tests.
+ *
+ ************************************************************************/
+
+Main {
+  dim = 2
+  base_name = "allneumann2d"
+  do_plot = TRUE
+  max_cycles = 15
+  residual_tol = 3e-10
+  pre_sweeps = 1
+  post_sweeps = 3
+  max_adaptions = 3
+  target_l2norm = 1e-4
+}
+
+AdaptivePoisson {
+  fac_algo = "default"
+  problem_name = "sine"
+  // finest_plot_level = 0
+  adaption_threshold = 5.0e-3
+  ScalarPoissonOps {
+    enable_logging = TRUE
+    coarse_solver_choice = "hypre"
+    coarse_solver_tolerance = 1e-14
+    coarse_solver_max_iterations = 10000
+    smoothing_choice = "redblack"
+    cf_discretization = "Ewing"
+    prolongation_method = "LINEAR_REFINE"
+    hypre_solver {
+       use_smg = TRUE
+    }
+  }
+  sine_solution {
+    SinusoidFcnControl = "{ nx=1.0 px=0.40 ny=1.0 py=0.75 }"
+    neumann_locations = TRUE, TRUE, TRUE, TRUE
+    linear_coef = -1.0e+00
+  }
+}
+
+
+CartesianGridGeometry {
+  domain_boxes = [(0,0), (31,31)]
+  x_lo         = 0, 0
+  x_up         = 1, 1
+}
+
+StandardTagAndInitialize {
+  tagging_method = "GRADIENT_DETECTOR"
+}
+
+BergerRigoutsos {
+  log_node_history = TRUE
+  log_cluster_summary = TRUE
+  log_cluster = TRUE
+}
+
+TreeLoadBalancer{
+}
+
+PatchHierarchy {
+   max_levels = 5
+   proper_nesting_buffer = 2, 2, 2, 2, 2, 2
+   largest_patch_size {
+      // level_0 = 8, 8
+      level_0 = -1, -1
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 1,1
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 3, 3
+      level_2            = 3, 3
+      level_3            = 3, 3
+      level_4            = 3, 3
+      level_5            = 3, 3
+      level_6            = 3, 3
+      level_7            = 3, 3
+      //  etc.
+   }
+   allow_patches_smaller_than_ghostwidth = TRUE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = FALSE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.99
+   combine_efficiency = 0.99
+   // write_regrid_boxes = TRUE
+   // read_regrid_boxes = TRUE
+   // regrid_boxes_filename = "grid"
+   check_nonrefined_tags = "ERROR"
+   check_overlapping_patches = "ERROR"
+   extend_tags_to_bdry = TRUE
+   sequentialize_patch_indices = TRUE
+   barrier_before_regrid = TRUE
+   barrier_before_find_refinement = TRUE
+   barrier_before_cluster = TRUE
+   barrier_before_nest = TRUE
+   barrier_before_limit = TRUE
+   barrier_before_extend = TRUE
+   barrier_before_balance = TRUE
+   barrier_after_find_refinement = TRUE
+   coalesce_boxes = FALSE
+}
+
+TimerManager{
+  timer_list = "solv::FACPreconditionerX::*", "solv::ScalarPoissonFacOpsX::*", "solv::CartesianRobinBcHelperX::*"
+  print_user = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/test_inputs/allneumann.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/test_inputs/allneumann.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,106 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for FAC solver tests.
+ *
+ ************************************************************************/
+
+Main {
+  dim = 3
+  base_name = "allneumann3d"
+  do_plot = TRUE
+  max_cycles = 15
+  residual_tol = 1e-10
+  pre_sweeps = 1
+  post_sweeps = 3
+  max_adaptions = 3
+  target_l2norm = 3.5e-4
+}
+
+AdaptivePoisson {
+  problem_name = "sine"
+    // finest_dbg_plot_ln = 0
+  adaption_threshold = 3.0e-2
+  ScalarPoissonOps {
+    enable_logging = TRUE
+    coarse_solver_choice = "hypre"
+    coarse_solver_tolerance = 1e-14
+    coarse_solver_max_iterations = 10
+    smoothing_choice = "redblack"
+    cf_discretization = "Ewing"
+    prolongation_method = "LINEAR_REFINE"
+  }
+  sine_solution {
+    SinusoidFcnControl = "{ nx=1.0 px=0.5 ny=1.0 py=0.3 nz=1.0 pz=1.8 }"
+    neumann_locations = TRUE, TRUE, TRUE, TRUE, TRUE, TRUE
+    linear_coef = -1.0e+00
+  }
+}
+
+
+CartesianGridGeometry {
+  domain_boxes = [(0,0,0), (7,7,7)]
+  x_lo         = 0, 0, 0
+  x_up         = 1, 1, 1
+}
+
+StandardTagAndInitialize {
+  tagging_method = "GRADIENT_DETECTOR"
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE
+  barrier_before = FALSE
+  barrier_after = FALSE
+  n_root_cycles = 1
+}
+
+PatchHierarchy {
+   max_levels = 4
+   largest_patch_size {
+      level_0 = 16,16,16
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 4,4,4
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+      level_3            = 2, 2, 2
+      level_4            = 2, 2, 2
+      level_5            = 2, 2, 2
+      level_6            = 2, 2, 2
+      level_7            = 2, 2, 2
+      level_8            = 2, 2, 2
+      level_9            = 2, 2, 2
+      //  etc.
+   }
+   allow_patches_smaller_than_ghostwidth = TRUE
+   allow_patches_smaller_than_minimum_size_to_prevent_overlaps = TRUE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   combine_efficiency = 0.95
+   efficiency_tolerance = 0.95
+   // write_regrid_boxes = TRUE
+   // read_regrid_boxes = TRUE
+   // regrid_boxes_filename = "grid"
+   check_nonrefined_tags = "IGNORE"
+   extend_tags_to_bdry = TRUE
+   sequentialize_patch_indices = TRUE
+   coalesce_boxes = FALSE
+}
+
+TimerManager{
+  timer_list = "solv::FACPreconditionerX::*", "solv::ScalarPoissonFacOpsX::*", "solv::CartesianRobinBcHelperX::setBoundaryValuesInCells()_setBcCoefs()"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/test_inputs/complex.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/test_inputs/complex.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for FAC solver tests.
+ *
+ ************************************************************************/
+
+Main {
+  dim = 2
+  base_name = "complex2d"
+  do_plot = TRUE
+  max_cycles = 15
+  residual_tol = 3e-10
+  pre_sweeps = 1
+  post_sweeps = 3
+  max_adaptions = 5
+  target_l2norm = 3e-3
+}
+
+AdaptivePoisson {
+  fac_algo = "default"
+  problem_name = "sine"
+  ScalarPoissonOps {
+    enable_logging = TRUE
+    coarse_solver_choice = "hypre"
+    coarse_solver_tolerance = 1e-14
+    coarse_solver_max_iterations = 10000
+    smoothing_choice = "redblack"
+    cf_discretization = "Ewing"
+    prolongation_method = "LINEAR_REFINE"
+  }
+  sine_solution {
+    SinusoidFcnControl = "{ nx=2.0 px=0.0 ny=3.0 py=0.0 }"
+  }
+  polynomial_solution {
+    QuarticFcnControl = "{ 6=1 8=-1 9=-1 12=1 }" // Pernice's problem
+  }
+  // finest_plot_level = 0
+  adaption_threshold = 0.2
+}
+
+
+CartesianGridGeometry {
+  domain_boxes = [(0,0), (17,5)] , [(7,6), (17,11)] , [(0,12), (17,17)]
+  x_lo         = 0, 0
+  x_up         = 1, 1
+  periodic_dimension = 0, 0
+}
+
+StandardTagAndInitialize {
+  tagging_method = "GRADIENT_DETECTOR"
+}
+
+
+TreeLoadBalancer{
+}
+
+PatchHierarchy {
+   max_levels = 5
+   proper_nesting_buffer = 2, 2, 2, 2, 2, 2
+   largest_patch_size {
+      // level_0 = 8, 8
+      level_0 = -1, -1
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 4,4
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 4
+      level_2            = 2, 3
+      level_3            = 2, 3
+      level_4            = 2, 3
+      level_5            = 2, 3
+      level_6            = 2, 3
+      level_7            = 2, 3
+      //  etc.
+   }
+   allow_patches_smaller_than_ghostwidth = TRUE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = FALSE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.80
+   combine_efficiency = 0.75
+   // write_regrid_boxes = TRUE
+   // read_regrid_boxes = TRUE
+   // regrid_boxes_filename = "grid"
+   check_nonrefined_tags = "ERROR"
+   check_overlapping_patches = "ERROR"
+   extend_tags_to_bdry = TRUE
+   sequentialize_patch_indices = TRUE
+   barrier_before_regrid = TRUE
+   barrier_before_find_refinement = TRUE
+   barrier_before_cluster = TRUE
+   barrier_before_nest = TRUE
+   barrier_before_limit = TRUE
+   barrier_before_extend = TRUE
+   barrier_before_balance = TRUE
+   barrier_after_find_refinement = TRUE
+   coalesce_boxes = FALSE
+}
+
+
+TimerManager{
+  timer_list = "solv::FACPreconditionerX::*", "solv::ScalarPoissonFacOpsX::*", "solv::CartesianRobinBcHelperX::setBoundaryValuesInCells()_setBcCoefs()"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/test_inputs/default.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/test_inputs/default.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,117 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for FAC solver tests.
+ *
+ ************************************************************************/
+
+Main {
+  dim = 2
+  base_name = "default2d"
+  do_plot = TRUE
+  max_cycles = 15
+  residual_tol = 3e-10
+  pre_sweeps = 1
+  post_sweeps = 3
+  max_adaptions = 3
+  target_l2norm = 2e-4
+}
+
+AdaptivePoisson {
+  fac_algo = "default"
+  problem_name = "gauss"
+  ScalarPoissonOps {
+    enable_logging = TRUE
+    coarse_solver_choice = "hypre"
+    coarse_solver_tolerance = 1e-14
+    coarse_solver_max_iterations = 10000
+    smoothing_choice = "redblack"
+    cf_discretization = "Ewing"
+    prolongation_method = "LINEAR_REFINE"
+  }
+  sine_solution {
+    SinusoidFcnControl = "{ nx=1.0 px=0.0 ny=1.0 py=0.0 }"
+  }
+  gaussian_solution {
+    GaussianFcnControl = "{ lambda=-1000 amp=1 cx=0.5 cy=0.5 }"
+  }
+  polynomial_solution {
+    QuarticFcnControl = "{ 6=1 8=-1 9=-1 12=1 }" // Pernice's problem
+  }
+  // finest_plot_level = 0
+  adaption_threshold = .0100
+}
+
+
+CartesianGridGeometry {
+  domain_boxes = [(0,0), (8,8)]
+  x_lo         = 0, 0
+  x_up         = 1, 1
+}
+
+StandardTagAndInitialize {
+  tagging_method = "GRADIENT_DETECTOR"
+}
+
+TreeLoadBalancer{
+}
+
+PatchHierarchy {
+   max_levels = 5
+   proper_nesting_buffer = 2, 2, 2, 2, 2, 2
+   largest_patch_size {
+      // level_0 = 8, 8
+      level_0 = -1, -1
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 4,4
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 3, 3
+      level_2            = 3, 3
+      level_3            = 3, 3
+      level_4            = 3, 3
+      level_5            = 3, 3
+      level_6            = 3, 3
+      level_7            = 3, 3
+      level_8            = 3, 3
+      level_9            = 3, 3
+      //  etc.
+   }
+   allow_patches_smaller_than_ghostwidth = TRUE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = FALSE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.80
+   combine_efficiency = 0.75
+   // write_regrid_boxes = TRUE
+   // read_regrid_boxes = TRUE
+   // regrid_boxes_filename = "grid"
+   check_nonrefined_tags = "ERROR"
+   check_overlapping_patches = "ERROR"
+   extend_tags_to_bdry = TRUE
+   sequentialize_patch_indices = TRUE
+   barrier_before_regrid = TRUE
+   barrier_before_find_refinement = TRUE
+   barrier_before_cluster = TRUE
+   barrier_before_nest = TRUE
+   barrier_before_limit = TRUE
+   barrier_before_extend = TRUE
+   barrier_before_balance = TRUE
+   barrier_after_find_refinement = TRUE
+   coalesce_boxes = FALSE
+}
+
+TimerManager{
+  timer_list = "solv::FACPreconditionerX::*", "solv::ScalarPoissonFacOpsX::*", "solv::CartesianRobinBcHelperX::setBoundaryValuesInCells()_setBcCoefs()"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/test_inputs/default.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/test_inputs/default.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,112 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for FAC solver tests.
+ *
+ ************************************************************************/
+
+Main {
+  dim = 3
+  base_name = "default3d"
+  do_plot = TRUE
+  max_cycles = 15
+  residual_tol = 1e-10
+  pre_sweeps = 1
+  post_sweeps = 3
+  max_adaptions = 4
+  target_l2norm = 1.5e-4
+}
+
+AdaptivePoisson {
+  problem_name = "multigauss"
+    // finest_dbg_plot_ln = 0
+  ScalarPoissonOps {
+    enable_logging = TRUE
+    coarse_solver_choice = "hypre"
+    coarse_solver_tolerance = 1e-14
+    coarse_solver_max_iterations = 10
+    smoothing_choice = "redblack"
+    cf_discretization = "Ewing"
+    prolongation_method = "LINEAR_REFINE"
+  }
+  multigaussian_solution {
+    GaussianFcnControl_0 = "{ lambda=-50 cx=0.5 cy=0.5 cz=0.0 }"
+    GaussianFcnControl_1 = "{ lambda=-20 cx=0.0 cy=0.0 cz=1.0 }"
+  }
+  // finest_plot_level = 0
+  adaption_threshold = .0200
+}
+
+
+CartesianGridGeometry {
+  domain_boxes = [(0,0,0), (9,9,9)]
+  x_lo         = 0, 0, 0
+  x_up         = 1, 1, 1.5
+}
+
+StandardTagAndInitialize {
+  tagging_method = "GRADIENT_DETECTOR"
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE
+  barrier_before = FALSE
+  barrier_after = FALSE
+  n_root_cycles = 1
+}
+
+PatchHierarchy {
+   max_levels = 6
+   largest_patch_size {
+      level_0 = 16,16,16
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 4,4,4
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+      level_3            = 2, 2, 2
+      level_4            = 2, 2, 2
+      level_5            = 2, 2, 2
+      level_6            = 2, 2, 2
+      level_7            = 2, 2, 2
+      level_8            = 2, 2, 2
+      level_9            = 2, 2, 2
+      //  etc.
+   }
+   allow_patches_smaller_than_ghostwidth = TRUE
+   allow_patches_smaller_than_minimum_size_to_prevent_overlaps = TRUE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   combine_efficiency = 0.75
+   efficiency_tolerance = 0.75
+   // write_regrid_boxes = TRUE
+   // read_regrid_boxes = TRUE
+   // regrid_boxes_filename = "grid"
+   check_nonrefined_tags = "IGNORE"
+   extend_tags_to_bdry = TRUE
+   sequentialize_patch_indices = TRUE
+   coalesce_boxes = FALSE
+}
+
+BergerRigoutsos {
+   log_node_history = FALSE
+   log_cluster = FALSE
+}
+
+
+TimerManager{
+  timer_list = "solv::FACPreconditionerX::*", "solv::ScalarPoissonFacOpsX::*", "solv::CartesianRobinBcHelperX::setBoundaryValuesInCells()_setBcCoefs()"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/test_inputs/gauss.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/test_inputs/gauss.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,129 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for FAC solver tests.
+ *
+ ************************************************************************/
+
+Main {
+  dim = 2
+  base_name = "gauss2d"
+  do_plot = TRUE
+  max_cycles = 15
+  residual_tol = 3e-10
+  pre_sweeps = 1
+  post_sweeps = 3
+  max_adaptions = 5
+  target_l2norm = 5e-5
+}
+
+AdaptivePoisson {
+  fac_algo = "default"
+  problem_name = "multigauss"
+  ScalarPoissonOps {
+    enable_logging = TRUE
+    coarse_solver_choice = "hypre"
+    coarse_solver_tolerance = 1e-14
+    coarse_solver_max_iterations = 10000
+    smoothing_choice = "redblack"
+    cf_discretization = "LINEAR_REFINE"
+    prolongation_method = "LINEAR_REFINE"
+  }
+  multigaussian_solution {
+    GaussianFcnControl_0 = "{ lambda=-100 cx=0.5 cy=0.5 }"
+    GaussianFcnControl_1 = "{ lambda=-50 cx=0.0 cy=0.5 }"
+    GaussianFcnControl_2 = "{ lambda=-25 cx=0.5 cy=0.0 }"
+  }
+  sine_solution {
+    SinusoidFcnControl = "{ nx=1.0 px=0.0 ny=1.0 py=0.0 }"
+  }
+  gaussian_solution {
+    GaussianFcnControl = "{ lambda=-1000 amp=1 cx=0.5 cy=0.5 }"
+  }
+  polynomial_solution {
+    QuarticFcnControl = "{ 6=1 8=-1 9=-1 12=1 }" // Pernice's problem
+  }
+  // finest_plot_level = 0
+  adaption_threshold = .0010
+}
+
+
+CartesianGridGeometry {
+  domain_boxes = [(0,0), (8,4)], [(0,5), (4,8)]
+  x_lo         = 0, 0
+  x_up         = 1, 1
+}
+
+StandardTagAndInitialize {
+  tagging_method = "GRADIENT_DETECTOR"
+}
+
+BergerRigoutsos {
+  log_node_history = TRUE
+  log_cluster_summary = TRUE
+  log_cluster = TRUE
+}
+
+TreeLoadBalancer{
+}
+
+PatchHierarchy {
+   max_levels = 6
+   proper_nesting_buffer = 2, 2, 2, 2, 2, 2
+   largest_patch_size {
+      // level_0 = 8, 8
+      level_0 = -1, -1
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 4,4
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 3, 3
+      level_2            = 3, 3
+      level_3            = 3, 3
+      level_4            = 3, 3
+      level_5            = 3, 3
+      level_6            = 3, 3
+      level_7            = 3, 3
+      level_8            = 3, 3
+      level_9            = 3, 3
+      //  etc.
+   }
+   allow_patches_smaller_than_ghostwidth = TRUE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = FALSE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.85
+   combine_efficiency = 0.85
+   // write_regrid_boxes = TRUE
+   // read_regrid_boxes = TRUE
+   // regrid_boxes_filename = "grid"
+   check_nonrefined_tags = "ERROR"
+   check_overlapping_patches = "ERROR"
+   extend_tags_to_bdry = TRUE
+   sequentialize_patch_indices = TRUE
+   barrier_before_regrid = TRUE
+   barrier_before_find_refinement = TRUE
+   barrier_before_cluster = TRUE
+   barrier_before_nest = TRUE
+   barrier_before_limit = TRUE
+   barrier_before_extend = TRUE
+   barrier_before_balance = TRUE
+   barrier_after_find_refinement = TRUE
+   coalesce_boxes = FALSE
+}
+
+
+TimerManager{
+  timer_list = "solv::FACPreconditionerX::*", "solv::ScalarPoissonFacOpsX::*", "solv::CartesianRobinBcHelperX::setBoundaryValuesInCells()_setBcCoefs()"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/test_inputs/gauss.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/test_inputs/gauss.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,116 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright
+ * information, see COPYRIGHT and COPYING.LESSER.
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for FAC solver tests.
+ *
+ ************************************************************************/
+
+Main {
+  dim = 3
+  base_name = "gauss3d"
+  do_plot = TRUE
+  max_cycles = 15
+  residual_tol = 3e-10
+  pre_sweeps = 1
+  post_sweeps = 3
+  max_adaptions = 3
+  target_l2norm = 2.6e-4
+}
+
+AdaptivePoisson {
+  fac_algo = "default"
+  problem_name = "multigauss"
+  ScalarPoissonOps {
+    enable_logging = TRUE
+    coarse_solver_choice = "hypre"
+    coarse_solver_tolerance = 1e-14
+    coarse_solver_max_iterations = 10000
+    smoothing_choice = "redblack"
+    cf_discretization = "Ewing"
+    prolongation_method = "LINEAR_REFINE"
+  }
+  multigaussian_solution {
+    GaussianFcnControl_0 = "{ lambda=-500 cx=0.5 cy=0.5 cz=0.5 }"
+    GaussianFcnControl_1 = "{ lambda=-50  cx=0.0 cy=0.5 cz=0.5 }"
+    GaussianFcnControl_2 = "{ lambda=-25  cx=0.5 cy=0.0 cz=0.5 }"
+    GaussianFcnControl_3 = "{ lambda=-200 cx=0.0 cy=0.0 cz=1.0 }"
+  }
+  sine_solution {
+    SinusoidFcnControl = "{ nx=1.0 px=0.0 ny=1.0 py=0.0 nz=1.0 pz=0.0 }"
+  }
+  gaussian_solution {
+    GaussianFcnControl = "{ lambda=-1000 amp=1 cx=0.5 cy=0.5 cz=0.5 }"
+  }
+  // finest_plot_level = 0
+  adaption_threshold = .0200
+}
+
+
+CartesianGridGeometry {
+  // domain_boxes = [(0,0,0), (8,4,8)], [(0,5,0), (4,8,8)]
+  domain_boxes = [(0,0,0), (31,31,31)]
+  x_lo         = 0, 0, 0
+  x_up         = 1, 1, 1
+}
+
+StandardTagAndInitialize {
+  tagging_method = "GRADIENT_DETECTOR"
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE
+  barrier_before = FALSE
+  barrier_after = FALSE
+  n_root_cycles = 1
+}
+
+PatchHierarchy {
+   max_levels = 5
+   largest_patch_size {
+      level_0 = -1, -1, -1
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 8,8,8
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 3, 3, 3
+      level_3            = 3, 3, 3
+      level_4            = 3, 3, 3
+      level_5            = 3, 3, 3
+      level_6            = 3, 3, 3
+      level_7            = 3, 3, 3
+      level_8            = 3, 3, 3
+      level_9            = 3, 3, 3
+      //  etc.
+   }
+   allow_patches_smaller_than_ghostwidth = TRUE
+   allow_patches_smaller_than_minimum_size_to_prevent_overlaps = TRUE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   combine_efficiency = 0.73
+   efficiency_tolerance = 0.73
+   // write_regrid_boxes = TRUE
+   // read_regrid_boxes = TRUE
+   // regrid_boxes_filename = "grid"
+   check_nonrefined_tags = "IGNORE"
+   extend_tags_to_bdry = TRUE
+   sequentialize_patch_indices = TRUE
+   coalesce_boxes = FALSE
+}
+
+TimerManager{
+  xx_timer_list = "solv::FACPreconditionerX::*", "solv::ScalarPoissonFacOpsX::*", "solv::CartesianRobinBcHelperX::setBoundaryValuesInCells()_setBcCoefs()"
+  timer_list = "solv::*::*"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/test_inputs/periodic.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/test_inputs/periodic.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,135 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright
+ * information, see COPYRIGHT and COPYING.LESSER.
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for FAC solver tests.
+ *
+ ************************************************************************/
+
+Main {
+  dim = 2
+  base_name = "periodic2d"
+  do_plot = TRUE
+  max_cycles = 15
+  residual_tol = 3e-10
+  pre_sweeps = 1
+  post_sweeps = 3
+  max_adaptions = 3
+  target_l2norm = 2.2e-4
+}
+
+AdaptivePoisson {
+  fac_algo = "default"
+  problem_name = "sine"
+  // finest_plot_level = 0
+  adaption_threshold = 7.0e-3
+  ScalarPoissonOps {
+    enable_logging = TRUE
+    coarse_solver_choice = "hypre"
+    coarse_solver_tolerance = 1e-14
+    coarse_solver_max_iterations = 10
+    smoothing_choice = "redblack"
+    cf_discretization = "Ewing"
+    prolongation_method = "LINEAR_REFINE"
+    hypre_solver {
+      use_smg = TRUE
+    }
+  }
+  sine_solution {
+    SinusoidFcnControl = "{ nx=2.0 px=0.40 ny=2.0 py=0.30 }"
+    linear_coef = -1.0e+00
+  }
+}
+
+
+CartesianGridGeometry {
+  domain_boxes = [(0,0), (7,7)]
+  x_lo         = 0, 0
+  x_up         = 1, 1
+  periodic_dimension = 1, 1
+}
+
+StandardTagAndInitialize {
+  tagging_method = "GRADIENT_DETECTOR"
+}
+
+BergerRigoutsos {
+  log_node_history = TRUE
+  log_cluster_summary = TRUE
+  log_cluster = TRUE
+  max_lap_cut_from_center = 0.1
+}
+
+TreeLoadBalancer{
+}
+
+PatchHierarchy {
+   max_levels = 5
+   proper_nesting_buffer = 2, 2, 2, 2, 2, 2
+   largest_patch_size {
+      // level_0 = 8, 8
+      level_0 = -1, -1
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 4,4
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 3, 3
+      level_2            = 3, 3
+      level_3            = 3, 3
+      level_4            = 3, 3
+      level_5            = 3, 3
+      level_6            = 3, 3
+      level_7            = 3, 3
+      //  etc.
+   }
+   allow_patches_smaller_than_ghostwidth = TRUE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = FALSE
+   proper_nesting_buffer = 2, 2, 2, 2, 2, 2
+   // load_balance = FALSE
+   efficiency_tolerance = 0.80
+   combine_efficiency = 0.80
+   // write_regrid_boxes = TRUE
+   // read_regrid_boxes = TRUE
+   // regrid_boxes_filename = "grid"
+   allow_patches_smaller_than_ghostwidth = TRUE
+   check_nonrefined_tags = "ERROR"
+   check_overlapping_patches = "ERROR"
+   extend_tags_to_bdry = TRUE
+   sequentialize_patch_indices = TRUE
+   barrier_before_regrid = TRUE
+   barrier_before_find_refinement = TRUE
+   barrier_before_cluster = TRUE
+   barrier_before_nest = TRUE
+   barrier_before_limit = TRUE
+   barrier_before_extend = TRUE
+   barrier_before_balance = TRUE
+   barrier_after_find_refinement = TRUE
+   coalesce_boxes = FALSE
+
+   check_overflow_nesting = 'n'
+   check_proper_nesting = 'n'
+   check_connectors = 'n'
+   print_layer_hierarchy = 'n'
+   print_steps = 'n'
+}
+
+
+TimerManager{
+  timer_list = "solv::FACPreconditioner::*", "solv::ScalarPoissonFacOps::*", "solv::CartesianRobinBcHelper::*"
+  print_user = TRUE
+}
+
+LayerHierarchy {
+   log_actions = 'n'
+   check_input_connectors = 'n'
+   check_output_connectors = 'n'
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/test_inputs/periodic.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/test_inputs/periodic.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,107 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright
+ * information, see COPYRIGHT and COPYING.LESSER.
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for FAC solver tests.
+ *
+ ************************************************************************/
+
+Main {
+  dim = 3
+  base_name = "periodic3d"
+  do_plot = TRUE
+  max_cycles = 15
+  residual_tol = 1e-10
+  pre_sweeps = 1
+  post_sweeps = 3
+  max_adaptions = 3
+  target_l2norm = 3.7e-4
+}
+
+AdaptivePoisson {
+  fac_algo = "default"
+  problem_name = "sine"
+    // finest_dbg_plot_ln = 0
+  adaption_threshold = 3.0e-2
+  ScalarPoissonOps {
+    enable_logging = TRUE
+    coarse_solver_choice = "hypre"
+    coarse_solver_tolerance = 1e-14
+    coarse_solver_max_iterations = 10
+    smoothing_choice = "redblack"
+    cf_discretization = "Ewing"
+    prolongation_method = "LINEAR_REFINE"
+    hypre_solver {
+      use_smg = TRUE
+    }
+  }
+  sine_solution {
+    SinusoidFcnControl = "{ nx=2.0 px=0.5 ny=2.0 py=0.4 nz=2.0 pz=1.8 }"
+    linear_coef = -1.0e+00
+  }
+}
+
+
+CartesianGridGeometry {
+  domain_boxes = [(0,0,0), (7,7,7)]
+  x_lo         = 0, 0, 0
+  x_up         = 1, 1, 1
+  periodic_dimension = 1, 1, 1
+}
+
+StandardTagAndInitialize {
+  tagging_method = "GRADIENT_DETECTOR"
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE
+  barrier_before = FALSE
+  barrier_after = FALSE
+  n_root_cycles = 1
+}
+
+PatchHierarchy {
+   max_levels = 5
+   largest_patch_size {
+      level_0 = -1, -1, -1
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 4, 4, 4
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+     level_1            = 2, 2, 2
+     level_2            = 2, 2, 2
+     level_3            = 2, 2, 2
+     level_4            = 2, 2, 2
+     level_5            = 2, 2, 2
+     level_6            = 2, 2, 2
+     level_7            = 2, 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = TRUE
+   allow_patches_smaller_than_minimum_size_to_prevent_overlaps = TRUE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   combine_efficiency = 0.88
+   efficiency_tolerance = 0.88
+   // write_regrid_boxes = TRUE
+   // read_regrid_boxes = TRUE
+   // regrid_boxes_filename = "grid"
+   check_nonrefined_tags = "IGNORE"
+   extend_tags_to_bdry = TRUE
+   sequentialize_patch_indices = TRUE
+   coalesce_boxes = FALSE
+}
+
+TimerManager{
+  timer_list = "solv::FACPreconditioner::*", "solv::ScalarPoissonFacOps::*", "solv::CartesianRobinBcHelper::setBoundaryValuesInCells()_setBcCoefs()"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/test_inputs/ring_gauss.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/test_inputs/ring_gauss.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright
+ * information, see COPYRIGHT and COPYING.LESSER.
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for FAC solver tests.
+ *
+ ************************************************************************/
+
+Main {
+  dim = 2
+  base_name = "ring-gauss2d"
+  do_plot = TRUE
+  max_cycles = 15
+  residual_tol = 3e-10
+  pre_sweeps = 1
+  post_sweeps = 3
+  max_adaptions = 3
+  target_l2norm = 2e-3
+}
+
+AdaptivePoisson {
+  fac_algo = "default"
+  problem_name = "gauss"
+  ScalarPoissonOps {
+    enable_logging = TRUE
+    coarse_solver_choice = "hypre"
+    coarse_solver_tolerance = 1e-14
+    coarse_solver_max_iterations = 10000
+    smoothing_choice = "redblack"
+    cf_discretization = "Ewing"
+    prolongation_method = "LINEAR_REFINE"
+  }
+  sine_solution {
+    SinusoidFcnControl = "{ nx=1.0 px=0.0 ny=1.0 py=0.0 }"
+  }
+  gaussian_solution {
+    GaussianFcnControl = "{ lambda=-10 amp=1 cx=0.5 cy=0.5 }"
+  }
+  polynomial_solution {
+    QuarticFcnControl = "{ 6=1 8=-1 9=-1 12=1 }" // Pernice's problem
+  }
+  // finest_plot_level = 0
+  adaption_threshold = .0300
+}
+
+
+CartesianGridGeometry {
+  domain_boxes = [(0,0), (16,16)]
+  // domain_boxes = [(0,0), (16,4)], [(12,5), (16,16)], [(0,12), (11,16)], [(0,5), (4,11)]
+  x_lo         = 0, 0
+  x_up         = 1, 1
+}
+
+StandardTagAndInitialize {
+  tagging_method = "GRADIENT_DETECTOR"
+}
+
+TreeLoadBalancer{
+}
+
+PatchHierarchy {
+   max_levels = 5
+   proper_nesting_buffer = 2, 2, 2, 2, 2, 2
+   largest_patch_size {
+      // level_0 = 8, 8
+      level_0 = -1, -1
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 4,4
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+      level_3            = 2, 2
+      level_4            = 2, 2
+      level_5            = 2, 2
+      level_6            = 2, 2
+      level_7            = 2, 2
+      level_8            = 2, 2
+      level_9            = 2, 2
+      //  etc.
+   }
+   allow_patches_smaller_than_ghostwidth = TRUE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = FALSE
+   proper_nesting_buffer = 2, 2, 2, 2, 2, 2
+   // load_balance = FALSE
+   efficiency_tolerance = 0.80
+   combine_efficiency = 0.75
+   // write_regrid_boxes = TRUE
+   // read_regrid_boxes = TRUE
+   // regrid_boxes_filename = "grid"
+   check_nonrefined_tags = "ERROR"
+   check_overlapping_patches = "ERROR"
+   extend_tags_to_bdry = TRUE
+   sequentialize_patch_indices = TRUE
+   barrier_before_regrid = TRUE
+   barrier_before_find_refinement = TRUE
+   barrier_before_cluster = TRUE
+   barrier_before_nest = TRUE
+   barrier_before_limit = TRUE
+   barrier_before_extend = TRUE
+   barrier_before_balance = TRUE
+   barrier_after_find_refinement = TRUE
+   coalesce_boxes = FALSE
+}
+
+
+TimerManager{
+  timer_list = "solv::FACPreconditionerX::*", "solv::ScalarPoissonFacOpsX::*", "solv::CartesianRobinBcHelperX::setBoundaryValuesInCells()_setBcCoefs()"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/test_inputs/simple.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/test_inputs/simple.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,114 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright
+ * information, see COPYRIGHT and COPYING.LESSER.
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for FAC solver tests.
+ *
+ ************************************************************************/
+
+Main {
+  dim = 2
+  base_name = "simple2d"
+  do_plot = TRUE
+  max_cycles = 15
+  residual_tol = 3e-10
+  pre_sweeps = 1
+  post_sweeps = 3
+  max_adaptions = 5
+  target_l2norm = 7e-4
+}
+
+AdaptivePoisson {
+  fac_algo = "default"
+  problem_name = "poly"
+  ScalarPoissonOps {
+    enable_logging = TRUE
+    coarse_solver_choice = "hypre"
+    coarse_solver_tolerance = 1e-14
+    coarse_solver_max_iterations = 10000
+    smoothing_choice = "redblack"
+    cf_discretization = "Ewing"
+    prolongation_method = "LINEAR_REFINE"
+  }
+  sine_solution {
+    SinusoidFcnControl = "{ nx=2.0 px=0.0 ny=2.0 py=0.0 }"
+  }
+  polynomial_solution {
+    QuarticFcnControl = "{ 6=1 8=-1 9=-1 12=1 }" // Pernice's problem
+  }
+  adaption_threshold = 1.0e-4
+}
+
+
+CartesianGridGeometry {
+  domain_boxes = [(0,0), (9,9)]
+  x_lo         = 0, 0
+  x_up         = 1, 1
+}
+
+StandardTagAndInitialize {
+  tagging_method = "GRADIENT_DETECTOR"
+}
+
+TreeLoadBalancer{
+}
+
+PatchHierarchy {
+   max_levels = 5
+   proper_nesting_buffer = 2, 2, 2, 2, 2, 2
+   largest_patch_size {
+      // level_0 = 8, 8
+      level_0 = -1, -1
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 4,4
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+      level_3            = 2, 2
+      level_4            = 2, 2
+      level_5            = 2, 2
+      level_6            = 2, 2
+      level_7            = 2, 2
+      level_8            = 2, 2
+      level_9            = 2, 2
+      //  etc.
+   }
+   allow_patches_smaller_than_ghostwidth = TRUE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = FALSE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.80
+   combine_efficiency = 0.75
+   // write_regrid_boxes = TRUE
+   // read_regrid_boxes = TRUE
+   // regrid_boxes_filename = "grid"
+   check_nonrefined_tags = "ERROR"
+   check_overlapping_patches = "ERROR"
+   extend_tags_to_bdry = TRUE
+   sequentialize_patch_indices = TRUE
+   barrier_before_regrid = TRUE
+   barrier_before_find_refinement = TRUE
+   barrier_before_cluster = TRUE
+   barrier_before_nest = TRUE
+   barrier_before_limit = TRUE
+   barrier_before_extend = TRUE
+   barrier_before_balance = TRUE
+   barrier_after_find_refinement = TRUE
+   coalesce_boxes = FALSE
+}
+
+
+TimerManager{
+  timer_list = "solv::FACPreconditionerX::*", "solv::ScalarPoissonFacOpsX::*", "solv::CartesianRobinBcHelperX::setBoundaryValuesInCells()_setBcCoefs()"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/test_inputs/simple_gauss.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/test_inputs/simple_gauss.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,118 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright
+ * information, see COPYRIGHT and COPYING.LESSER.
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for FAC solver tests.
+ *
+ ************************************************************************/
+
+Main {
+  dim = 2
+  base_name = "simple-gauss2d"
+  do_plot = TRUE
+  max_cycles = 15
+  residual_tol = 3e-10
+  pre_sweeps = 1
+  post_sweeps = 3
+  max_adaptions = 5
+  target_l2norm = 1.0e-3
+}
+
+AdaptivePoisson {
+  fac_algo = "default"
+  problem_name = "gauss"
+  ScalarPoissonOps {
+    enable_logging = TRUE
+    coarse_solver_choice = "hypre"
+    coarse_solver_tolerance = 1e-14
+    coarse_solver_max_iterations = 10000
+    smoothing_choice = "redblack"
+    cf_discretization = "Ewing"
+    prolongation_method = "LINEAR_REFINE"
+  }
+  gaussian_solution {
+    GaussianFcnControl = "{ lambda=-200.0 cx=0.5 cy=0.5 }"
+  }
+  sine_solution {
+    SinusoidFcnControl = "{ nx=1.0 px=0.0 ny=1.0 py=0.0 }"
+  }
+  polynomial_solution {
+    QuarticFcnControl = "{ 6=1 8=-1 9=-1 12=1 }" // Pernice's problem
+  }
+  // finest_plot_level = 0
+  adaption_threshold = .0150
+}
+
+
+CartesianGridGeometry {
+  domain_boxes = [(0,0), (8,8)]
+  x_lo         = 0, 0
+  x_up         = 1, 1
+}
+
+StandardTagAndInitialize {
+  tagging_method = "GRADIENT_DETECTOR"
+}
+
+TreeLoadBalancer{
+}
+
+PatchHierarchy {
+   max_levels = 5
+   proper_nesting_buffer = 2, 2, 2, 2, 2, 2
+   largest_patch_size {
+      // level_0 = 8, 8
+      level_0 = -1, -1
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 4,4
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+      level_3            = 2, 2
+      level_4            = 2, 2
+      level_5            = 2, 2
+      level_6            = 2, 2
+      level_7            = 2, 2
+      level_8            = 2, 2
+      level_9            = 2, 2
+      //  etc.
+   }
+   allow_patches_smaller_than_ghostwidth = TRUE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = FALSE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.80
+   combine_efficiency = 0.75
+   // write_regrid_boxes = TRUE
+   // read_regrid_boxes = TRUE
+   // regrid_boxes_filename = "grid"
+   check_nonrefined_tags = "ERROR"
+   check_overlapping_patches = "ERROR"
+   extend_tags_to_bdry = TRUE
+   sequentialize_patch_indices = TRUE
+   barrier_before_regrid = TRUE
+   barrier_before_find_refinement = TRUE
+   barrier_before_cluster = TRUE
+   barrier_before_nest = TRUE
+   barrier_before_limit = TRUE
+   barrier_before_extend = TRUE
+   barrier_before_balance = TRUE
+   barrier_after_find_refinement = TRUE
+   coalesce_boxes = FALSE
+}
+
+
+TimerManager{
+  timer_list = "solv::FACPreconditionerX::*", "solv::ScalarPoissonFacOpsX::*", "solv::CartesianRobinBcHelperX::setBoundaryValuesInCells()_setBcCoefs()"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/test_inputs/simple_gauss.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/test_inputs/simple_gauss.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,104 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright
+ * information, see COPYRIGHT and COPYING.LESSER.
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for FAC solver tests.
+ *
+ ************************************************************************/
+
+Main {
+  dim = 3
+  base_name = "simple-gauss3d"
+  do_plot = TRUE
+  max_cycles = 15
+  residual_tol = 1e-10
+  pre_sweeps = 1
+  post_sweeps = 3
+  max_adaptions = 4
+  target_l2norm = 1.0e-4
+}
+
+AdaptivePoisson {
+  problem_name = "gauss"
+    // finest_dbg_plot_ln = 0
+  ScalarPoissonOps {
+    enable_logging = TRUE
+    coarse_solver_choice = "hypre"
+    coarse_solver_tolerance = 1e-14
+    coarse_solver_max_iterations = 10
+    smoothing_choice = "redblack"
+    cf_discretization = "Ewing"
+    prolongation_method = "LINEAR_REFINE"
+  }
+  gaussian_solution {
+    GaussianFcnControl = "{ lambda=-20.0 cx=0.0 cy=0.0 cz=0.0 }"
+  }
+  adaption_threshold = 0.0150
+}
+
+
+CartesianGridGeometry {
+  domain_boxes = [(0,0,0), (7,7,7)]
+  x_lo         = 0, 0, 0
+  x_up         = 1, 1, 1
+}
+
+StandardTagAndInitialize {
+  tagging_method = "GRADIENT_DETECTOR"
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE
+  barrier_before = FALSE
+  barrier_after = FALSE
+  n_root_cycles = 1
+}
+
+PatchHierarchy {
+   max_levels = 5
+   largest_patch_size {
+      level_0 = 16,16,16
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 4,4,4
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+      level_3            = 2, 2, 2
+      level_4            = 2, 2, 2
+      level_5            = 2, 2, 2
+      level_6            = 2, 2, 2
+      level_7            = 2, 2, 2
+      level_8            = 2, 2, 2
+      level_9            = 2, 2, 2
+      //  etc.
+   }
+   allow_patches_smaller_than_minimum_size_to_prevent_overlaps = TRUE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   combine_efficiency = 0.88
+   efficiency_tolerance = 0.88
+   // write_regrid_boxes = TRUE
+   // read_regrid_boxes = TRUE
+   // regrid_boxes_filename = "grid"
+   allow_patches_smaller_than_ghostwidth = TRUE
+   check_nonrefined_tags = "IGNORE"
+   extend_tags_to_bdry = TRUE
+   sequentialize_patch_indices = TRUE
+   coalesce_boxes = FALSE
+}
+
+TimerManager{
+  timer_list = "solv::FACPreconditionerX::*", "solv::ScalarPoissonFacOpsX::*", "solv::CartesianRobinBcHelperX::setBoundaryValuesInCells()_setBcCoefs()"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/test_inputs/varcoef.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/test_inputs/varcoef.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,113 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright
+ * information, see COPYRIGHT and COPYING.LESSER.
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for FAC solver tests.
+ *
+ ************************************************************************/
+
+Main {
+  dim = 2
+  base_name = "varcoef3d"
+  do_plot = TRUE
+  max_cycles = 15
+  residual_tol = 3e-10
+  pre_sweeps = 1
+  post_sweeps = 3
+  max_adaptions = 5
+  target_l2norm = 5.6e-4
+}
+
+AdaptivePoisson {
+  fac_algo = "default"
+  problem_name = "gauss-coef"
+  ScalarPoissonOps {
+    enable_logging = TRUE
+    coarse_solver_choice = "hypre"
+    coarse_solver_tolerance = 1e-14
+    coarse_solver_max_iterations = 10000
+    smoothing_choice = "redblack"
+    cf_discretization = "Ewing"
+    prolongation_method = "LINEAR_REFINE"
+  }
+  gaussian_diffcoef_solution {
+    GaussianFcnControl = "{ lambda=-4.0 cx=0.5 cy=0.5 }"
+    SinusoidFcnControl = "{ nx=1.0 px=0.0 ny=1.0 py=0.0 }"
+  }
+  // finest_plot_level = 0
+  adaption_threshold = .022
+}
+
+
+CartesianGridGeometry {
+  domain_boxes = [(0,0), (9,9)]
+  x_lo         = 0, 0
+  x_up         = 1, 1
+}
+
+StandardTagAndInitialize {
+  tagging_method = "GRADIENT_DETECTOR"
+}
+
+TreeLoadBalancer{
+}
+
+PatchHierarchy {
+   max_levels = 5
+   proper_nesting_buffer = 2, 2, 2, 2, 2, 2
+   largest_patch_size {
+      // level_0 = 8, 8
+      level_0 = -1, -1
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 4,4
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+      level_3            = 2, 2
+      level_4            = 2, 2
+      level_5            = 2, 2
+      level_6            = 2, 2
+      level_7            = 2, 2
+      level_8            = 2, 2
+      level_9            = 2, 2
+      //  etc.
+   }
+   allow_patches_smaller_than_ghostwidth = TRUE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = FALSE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.80
+   combine_efficiency = 0.75
+   // write_regrid_boxes = TRUE
+   // read_regrid_boxes = TRUE
+   // regrid_boxes_filename = "grid"
+   check_nonrefined_tags = "ERROR"
+   check_overlapping_patches = "ERROR"
+   extend_tags_to_bdry = TRUE
+   sequentialize_patch_indices = TRUE
+   barrier_before_regrid = TRUE
+   barrier_before_find_refinement = TRUE
+   barrier_before_cluster = TRUE
+   barrier_before_nest = TRUE
+   barrier_before_limit = TRUE
+   barrier_before_extend = TRUE
+   barrier_before_balance = TRUE
+   barrier_after_find_refinement = TRUE
+   coalesce_boxes = FALSE
+}
+
+
+TimerManager{
+  timer_list = "solv::FACPreconditionerX::*", "solv::ScalarPoissonFacOpsX::*", "solv::CartesianRobinBcHelperX::setBoundaryValuesInCells()_setBcCoefs()"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_adaptive/test_inputs/varcoef.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_adaptive/test_inputs/varcoef.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,105 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright
+ * information, see COPYRIGHT and COPYING.LESSER.
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for FAC solver tests.
+ *
+ ************************************************************************/
+
+Main {
+  dim = 3
+  base_name = "varcoef3d"
+  do_plot = TRUE
+  max_cycles = 15
+  residual_tol = 1e-10
+  pre_sweeps = 1
+  post_sweeps = 3
+  max_adaptions = 2
+  target_l2norm = 3.8e-3
+}
+
+AdaptivePoisson {
+  problem_name = "gauss-coef"
+    // finest_dbg_plot_ln = 0
+  ScalarPoissonOps {
+    enable_logging = TRUE
+    coarse_solver_choice = "hypre"
+    coarse_solver_tolerance = 1e-14
+    coarse_solver_max_iterations = 10
+    smoothing_choice = "redblack"
+    cf_discretization = "Ewing"
+    prolongation_method = "LINEAR_REFINE"
+  }
+  gaussian_diffcoef_solution {
+    GaussianFcnControl = "{ lambda=0 cx=0.5 cy=0.5 cz=0.5 }"
+    SinusoidFcnControl = "{ nx=1.0 px=0.0 ny=1.0 py=0.0 nz=1.0 pz=0.0 }"
+  }
+  adaption_threshold = .15
+}
+
+
+CartesianGridGeometry {
+  domain_boxes = [(0,0,0), (9,9,9)]
+  x_lo         = 0, 0, 0
+  x_up         = 1, 1, 1.5
+}
+
+StandardTagAndInitialize {
+  tagging_method = "GRADIENT_DETECTOR"
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE
+  barrier_before = FALSE
+  barrier_after = FALSE
+  n_root_cycles = 1
+}
+
+PatchHierarchy {
+   max_levels = 5
+   largest_patch_size {
+      level_0 = 16,16,16
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 4,4,4
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+      level_3            = 2, 2, 2
+      level_4            = 2, 2, 2
+      level_5            = 2, 2, 2
+      level_6            = 2, 2, 2
+      level_7            = 2, 2, 2
+      level_8            = 2, 2, 2
+      level_9            = 2, 2, 2
+      //  etc.
+   }
+   allow_patches_smaller_than_ghostwidth = TRUE
+   allow_patches_smaller_than_minimum_size_to_prevent_overlaps = TRUE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   combine_efficiency = 0.88
+   efficiency_tolerance = 0.88
+   // write_regrid_boxes = TRUE
+   // read_regrid_boxes = TRUE
+   // regrid_boxes_filename = "grid"
+   check_nonrefined_tags = "IGNORE"
+   extend_tags_to_bdry = TRUE
+   sequentialize_patch_indices = TRUE
+   coalesce_boxes = FALSE
+}
+
+TimerManager{
+  timer_list = "solv::FACPreconditionerX::*", "solv::ScalarPoissonFacOpsX::*", "solv::CartesianRobinBcHelperX::setBoundaryValuesInCells()_setBcCoefs()"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_nonadaptive/FACPoisson.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_nonadaptive/FACPoisson.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,378 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Numerical routines for example FAC Poisson solver 
+ *
+ ************************************************************************/
+#include "FACPoisson.h"
+
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/solv/SimpleCellRobinBcCoefs.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/math/HierarchyCellDataOpsReal.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/solv/PoissonSpecifications.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+extern "C" {
+void F77_FUNC(setexactandrhs2d, SETEXACTANDRHS2D) (const int & ifirst0,
+   const int & ilast0,
+   const int & ifirst1,
+   const int & ilast1,
+   double* exact,
+   double* rhs,
+   const double* dx,
+   const double* xlower);
+
+void F77_FUNC(setexactandrhs3d, SETEXACTANDRHS3D) (const int & ifirst0,
+   const int & ilast0,
+   const int & ifirst1,
+   const int & ilast1,
+   const int & ifirst2,
+   const int & ilast2,
+   double* exact,
+   double* rhs,
+   const double* dx,
+   const double* xlower);
+}
+
+namespace SAMRAI {
+
+/*
+ *************************************************************************
+ * Constructor creates a unique context for the object and register      *
+ * all its internal variables with the variable database.                *
+ *************************************************************************
+ */
+FACPoisson::FACPoisson(
+   const std::string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> database):
+   d_object_name(object_name),
+   d_dim(dim),
+   d_hierarchy(NULL),
+   d_poisson_fac_solver((d_dim),
+                        object_name + "::poisson_hypre",
+                        (!database.isNull() &&
+                         database->isDatabase("fac_solver")) ?
+                        database->getDatabase("fac_solver"):
+                           tbox::Pointer<tbox::Database>(NULL)),
+   d_bc_coefs(d_dim,
+              object_name + "::bc_coefs",
+              (!database.isNull() &&
+               database->isDatabase("bc_coefs")) ?
+              database->getDatabase("bc_coefs"):
+                 tbox::Pointer<tbox::Database>(NULL)),
+   d_context()
+{
+
+   hier::VariableDatabase* vdb =
+      hier::VariableDatabase::getDatabase();
+
+   /*
+    * Get a unique context for variables owned by this object.
+    */
+   d_context = vdb->getContext(d_object_name + ":Context");
+
+   /*
+    * Register variables with hier::VariableDatabase
+    * and get the descriptor indices for those variables.
+    */
+
+   tbox::Pointer<pdat::CellVariable<double> > comp_soln(
+      new pdat::CellVariable<double>(dim, object_name + ":computed solution", 1));
+   d_comp_soln_id =
+      vdb->registerVariableAndContext(
+         comp_soln,
+         d_context,
+         hier::IntVector(dim, 1) /* ghost cell width is 1 for stencil widths */);
+
+   tbox::Pointer<pdat::CellVariable<double> > exact_solution(
+      new pdat::CellVariable<double>(dim, object_name + ":exact solution"));
+   d_exact_id =
+      vdb->registerVariableAndContext(
+         exact_solution,
+         d_context,
+         hier::IntVector(dim, 1) /* ghost cell width is 1 in case needed */);
+
+   tbox::Pointer<pdat::CellVariable<double> > rhs_variable(
+      new pdat::CellVariable<double>(
+         dim,
+         object_name
+         + ":linear system right hand side"));
+   d_rhs_id =
+      vdb->registerVariableAndContext(
+         rhs_variable,
+         d_context,
+         hier::IntVector(dim, 0) /* ghost cell width is 0 */);
+
+   /*
+    * Specify an implementation of solv::RobinBcCoefStrategy for the solver to use.
+    * We use the implementation solv::LocationIndexRobinBcCoefs, but other
+    * implementations are possible, including user-implemented.
+    */
+   d_poisson_fac_solver.setBcObject(&d_bc_coefs);
+}
+
+/*
+ *************************************************************************
+ * Destructor does nothing interesting                                   *
+ *************************************************************************
+ */
+FACPoisson::~FACPoisson()
+{
+}
+
+/*
+ *************************************************************************
+ * Initialize data on a level.                                           *
+ *                                                                       *
+ * Allocate the solution, exact solution and rhs memory.                 *
+ * Fill the rhs and exact solution.                                      *
+ *************************************************************************
+ */
+void FACPoisson::initializeLevelData(
+   const tbox::Pointer<hier::BasePatchHierarchy> patch_hierarchy,
+   const int level_number,
+   const double init_data_time,
+   const bool can_be_refined,
+   const bool initial_time,
+   const tbox::Pointer<hier::BasePatchLevel> old_level,
+   const bool allocate_data)
+{
+
+   (void)init_data_time;
+   (void)can_be_refined;
+   (void)initial_time;
+   (void)old_level;
+
+   tbox::Pointer<hier::PatchHierarchy> hierarchy = patch_hierarchy;
+   tbox::Pointer<geom::CartesianGridGeometry> grid_geom =
+      hierarchy->getGridGeometry();
+
+   tbox::Pointer<hier::PatchLevel> level =
+      hierarchy->getPatchLevel(level_number);
+
+   if (allocate_data) {
+      level->allocatePatchData(d_comp_soln_id);
+      level->allocatePatchData(d_rhs_id);
+      level->allocatePatchData(d_exact_id);
+   }
+
+   /*
+    * Initialize data in all patches in the level.
+    */
+   hier::PatchLevel::Iterator pi(*level);
+   for (pi.initialize(*level); pi; pi++) {
+
+      tbox::Pointer<hier::Patch> patch = *pi;
+      if (patch.isNull()) {
+         TBOX_ERROR(d_object_name
+            << ": Cannot find patch.  Null patch pointer.");
+      }
+      hier::Box pbox = patch->getBox();
+      tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+         patch->getPatchGeometry();
+
+      tbox::Pointer<pdat::CellData<double> > exact_data =
+         patch->getPatchData(d_exact_id);
+      tbox::Pointer<pdat::CellData<double> > rhs_data =
+         patch->getPatchData(d_rhs_id);
+
+      /*
+       * Set source function and exact solution.
+       */
+      if (d_dim == tbox::Dimension(2)) {
+         F77_FUNC(setexactandrhs2d, SETEXACTANDRHS2D) (
+            pbox.lower()[0],
+            pbox.upper()[0],
+            pbox.lower()[1],
+            pbox.upper()[1],
+            exact_data->getPointer(),
+            rhs_data->getPointer(),
+            patch_geom->getDx(),
+            patch_geom->getXLower());
+      } else if (d_dim == tbox::Dimension(3)) {
+         F77_FUNC(setexactandrhs3d, SETEXACTANDRHS3D) (
+            pbox.lower()[0],
+            pbox.upper()[0],
+            pbox.lower()[1],
+            pbox.upper()[1],
+            pbox.lower()[2],
+            pbox.upper()[2],
+            exact_data->getPointer(),
+            rhs_data->getPointer(),
+            patch_geom->getDx(),
+            patch_geom->getXLower());
+      }
+
+   }    // End patch loop.
+}
+
+/*
+ *************************************************************************
+ * Reset the hierarchy-dependent internal information.                   *
+ *************************************************************************
+ */
+void FACPoisson::resetHierarchyConfiguration(
+   tbox::Pointer<hier::BasePatchHierarchy> new_hierarchy,
+   int coarsest_level,
+   int finest_level)
+{
+   (void)coarsest_level;
+   (void)finest_level;
+
+   d_hierarchy = new_hierarchy;
+}
+
+/*
+ *************************************************************************
+ * Set up the initial guess and problem parameters                       *
+ * and solve the Poisson problem.  We explicitly initialize and          *
+ * deallocate the solver state in this example.                          *
+ *************************************************************************
+ */
+int FACPoisson::solvePoisson()
+{
+
+   if (d_hierarchy.isNull()) {
+      TBOX_ERROR(d_object_name
+         << "Cannot solve using an uninitialized object.\n");
+   }
+
+   int ln;
+   /*
+    * Fill in the initial guess.
+    */
+   for (ln = 0; ln <= d_hierarchy->getFinestLevelNumber(); ++ln) {
+      tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(ln);
+      hier::PatchLevel::Iterator ip(*level);
+      for ( ; ip; ip++) {
+         tbox::Pointer<hier::Patch> patch = *ip;
+         tbox::Pointer<pdat::CellData<double> > data = patch->getPatchData(
+               d_comp_soln_id);
+         data->fill(0.0);
+      }
+   }
+
+   /*
+    * Set the parameters for the Poisson equation.
+    * See classes solv::CellPoissonFACSolver or
+    * solv::PoissonSpecifications.
+    * (D is the diffusion coefficient.
+    * C is the source term which is not used in this example.)
+    */
+   d_poisson_fac_solver.setDConstant(1.0);
+   d_poisson_fac_solver.setCConstant(0.0);
+
+   d_poisson_fac_solver.initializeSolverState(
+      d_comp_soln_id,
+      d_rhs_id,
+      d_hierarchy,
+      0,
+      d_hierarchy->getFinestLevelNumber());
+
+   tbox::plog << "solving..." << std::endl;
+   int solver_ret;
+   solver_ret = d_poisson_fac_solver.solveSystem(d_comp_soln_id,
+         d_rhs_id);
+   /*
+    * Present data on the solve.
+    */
+   double avg_factor, final_factor;
+   d_poisson_fac_solver.getConvergenceFactors(avg_factor, final_factor);
+   tbox::plog << "\t" << (solver_ret ? "" : "NOT ") << "converged " << "\n"
+              << "	iterations: "
+              << d_poisson_fac_solver.getNumberOfIterations() << "\n"
+              << "	residual: "<< d_poisson_fac_solver.getResidualNorm()
+              << "\n"
+              << "	average convergence: "<< avg_factor << "\n"
+              << "	final convergence: "<< final_factor << "\n"
+              << std::flush;
+
+   d_poisson_fac_solver.deallocateSolverState();
+
+   return 0;
+}
+
+#ifdef HAVE_HDF5
+/*
+ *************************************************************************
+ * Set up external plotter to plot internal data from this class.        *
+ * Register variables appropriate for plotting.                          *
+ *************************************************************************
+ */
+int FACPoisson::setupPlotter(
+   appu::VisItDataWriter& plotter) const {
+   if (d_hierarchy.isNull()) {
+      TBOX_ERROR(d_object_name << ": No hierarchy in\n"
+                               << " FACPoisson::setupPlotter\n"
+                               << "The hierarchy must be set before calling\n"
+                               << "this function.\n");
+   }
+   plotter.registerPlotQuantity("Computed solution",
+      "SCALAR",
+      d_comp_soln_id);
+   plotter.registerDerivedPlotQuantity("Error",
+      "SCALAR",
+      (appu::VisDerivedDataStrategy *)this);
+   plotter.registerPlotQuantity("Exact solution",
+      "SCALAR",
+      d_exact_id);
+   plotter.registerPlotQuantity("Poisson source",
+      "SCALAR",
+      d_rhs_id);
+
+   return 0;
+}
+#endif
+
+/*
+ *************************************************************************
+ * Write derived data to the given stream.                               *
+ *************************************************************************
+ */
+bool FACPoisson::packDerivedDataIntoDoubleBuffer(
+   double* buffer,
+   const hier::Patch& patch,
+   const hier::Box& region,
+   const std::string& variable_name,
+   int depth_id) const
+{
+   (void)depth_id;
+
+   pdat::CellData<double>::Iterator icell(region);
+
+   if (variable_name == "Error") {
+      tbox::Pointer<pdat::CellData<double> > current_solution_ =
+         patch.getPatchData(d_comp_soln_id);
+      tbox::Pointer<pdat::CellData<double> > exact_solution_ =
+         patch.getPatchData(d_exact_id);
+      pdat::CellData<double>& current_solution = *current_solution_;
+      pdat::CellData<double>& exact_solution = *exact_solution_;
+      for ( ; icell; icell++) {
+         double diff = (current_solution(*icell) - exact_solution(*icell));
+         *buffer = diff;
+         buffer = buffer + 1;
+      }
+   } else {
+      // Did not register this name.
+      TBOX_ERROR(
+         "Unregistered variable name '" << variable_name << "' in\n"
+         <<
+         "FACPoissonX::packDerivedDataIntoDoubleBuffer");
+
+   }
+   // Return true if this patch has derived data on it.
+   // False otherwise.
+   return true;
+}
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_nonadaptive/FACPoisson.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_nonadaptive/FACPoisson.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,211 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Numerical routines for example FAC Poisson solver 
+ *
+ ************************************************************************/
+#ifndef included_FACPoisson
+#define included_FACPoisson
+
+#include "SAMRAI/solv/CellPoissonFACSolver.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/solv/LocationIndexRobinBcCoefs.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/mesh/StandardTagAndInitStrategy.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/appu/VisDerivedDataStrategy.h"
+#include "SAMRAI/appu/VisItDataWriter.h"
+
+namespace SAMRAI {
+
+/*!
+ * @brief Class to solve a sample Poisson equation on a SAMR grid.
+ *
+ * This class demonstrates how use the FAC Poisson solver
+ * class to solve Poisson's equation on a single level
+ * within a hierarchy.
+ *
+ * We set up and solve the following problem:
+ *
+ *   2d: div(grad(u)) = -2 (pi^2) sin(pi x) sin(pi y)
+ *
+ *   3d: div(grad(u)) = -3 (pi^2) sin(pi x) sin(pi y) sin(pi z)
+ *
+ * which has the exact solution
+ *
+ *   2d: u = sin(pi x) sin(pi y)
+ *
+ *   3d: u = sin(pi x) sin(pi y) sin(pi z)
+ *
+ * This class inherits and implements virtual functions from
+ * - mesh::StandardTagAndInitStrategy to initialize data
+ *   on the SAMR grid.
+ * - appu::VisDerivedDataStrategy to write out certain data
+ *   in a vis file, such as the error of the solution.
+ *
+ * Inputs:  The only input parameter for this class is
+ * "fac_poisson", the input database for the solv::CellPoissonFACSolver
+ * object.  See the documentation for solv::CellPoissonFACSolver
+ * for its input parameters.
+ */
+class FACPoisson:
+   public mesh::StandardTagAndInitStrategy,
+   public appu::VisDerivedDataStrategy
+{
+
+public:
+   /*!
+    * @brief Constructor.
+    *
+    * If you want standard output and logging,
+    * pass in valid pointers for those streams.
+    *
+    * @param object_name Ojbect name
+    * @param database Input database (may be NULL)
+    */
+   FACPoisson(
+      const std::string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> database =
+         tbox::Pointer<tbox::Database>(NULL));
+
+   virtual ~FACPoisson();
+
+   //@{ @name mesh::StandardTagAndInitStrategy virtuals
+
+   /*!
+    * @brief Allocate and initialize data for a new level
+    * in the patch hierarchy.
+    *
+    * This is where you implement the code for initialize data on
+    * the grid.  All the information needed to initialize the grid
+    * are in the arguments.
+    *
+    * @see mesh::StandardTagAndInitStrategy::initializeLevelData()
+    */
+   virtual void
+   initializeLevelData(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double init_data_time,
+      const bool can_be_refined,
+      const bool initial_time,
+      const tbox::Pointer<hier::BasePatchLevel> old_level,
+      const bool allocate_data);
+
+   /*!
+    * @brief Reset any internal hierarchy-dependent information.
+    */
+   virtual void
+   resetHierarchyConfiguration(
+      tbox::Pointer<hier::BasePatchHierarchy> new_hierarchy,
+      int coarsest_level,
+      int finest_level);
+
+   //@}
+
+   //@{ @name appu::VisDerivedDataStrategy virtuals
+
+   virtual bool
+   packDerivedDataIntoDoubleBuffer(
+      double* buffer,
+      const hier::Patch& patch,
+      const hier::Box& region,
+      const std::string& variable_name,
+      int depth_id) const;
+
+   //@}
+
+   /*!
+    * @brief Solve using HYPRE Poisson solver
+    *
+    * Set up the linear algebra problem and use a
+    * solv::CellPoissonFACSolver object to solve it.
+    * -# Set initial guess
+    * -# Set boundary conditions
+    * -# Specify Poisson equation parameters
+    * -# Call solver
+    */
+   int
+   solvePoisson();
+
+#ifdef HAVE_HDF5
+   /*!
+    * @brief Set up external plotter to plot internal
+    * data from this class.
+    *
+    * After calling this function, the external
+    * data writer may be used to write the
+    * viz file for this object.
+    *
+    * The internal hierarchy is used and must be
+    * established before calling this function.
+    * (This is commonly done by building a hierarchy
+    * with the mesh::StandardTagAndInitStrategy virtual
+    * functions implemented by this class.)
+    *
+    * @param viz_writer VisIt writer
+    */
+   int
+   setupPlotter(
+      appu::VisItDataWriter& plotter) const;
+#endif
+
+private:
+   std::string d_object_name;
+
+   const tbox::Dimension d_dim;
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+
+   //@{
+   /*!
+    * @name Major algorithm objects.
+    */
+
+   /*!
+    * @brief FAC poisson solver.
+    */
+   solv::CellPoissonFACSolver d_poisson_fac_solver;
+
+   /*!
+    * @brief Boundary condition coefficient implementation.
+    */
+   solv::LocationIndexRobinBcCoefs d_bc_coefs;
+
+   //@}
+
+   //@{
+
+   /*!
+    * @name Private state variables for solution.
+    */
+
+   /*!
+    * @brief Context owned by this object.
+    */
+   tbox::Pointer<hier::VariableContext> d_context;
+
+   /*!
+    * @brief Descriptor indices of internal data.
+    *
+    * These are initialized in the constructor and never change.
+    */
+   int d_comp_soln_id, d_exact_id, d_rhs_id;
+
+   //@}
+
+};
+
+}
+
+#endif  // included_FACPoisson
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_nonadaptive/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_nonadaptive/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,819 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=FACPoisson.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/CoarseFineBoundary.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CartesianRobinBcHelper.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACOps.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACSolver.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACSolver.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACOperatorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/GhostCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/LocationIndexRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SimpleCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h FACPoisson.C	\
+	FACPoisson.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=main.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/CoarseFineBoundary.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BergerRigoutsos.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CartesianRobinBcHelper.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACOps.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACSolver.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACSolver.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACOperatorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/GhostCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/LocationIndexRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SimpleCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h FACPoisson.h	\
+	main.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_nonadaptive/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_nonadaptive/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,95 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for SAMRAI FAC Poisson solver example 
+##
+#########################################################################
+
+SAMRAI	      = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/test/FAC_nonadaptive
+VPATH         = @srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+default:      check
+
+include $(OBJECT)/config/Makefile.config
+
+CPPFLAGS_EXTRA= -DTESTING=0
+
+NUM_TESTS = 2
+
+TEST_NPROCS = @TEST_NPROCS@
+
+CXX_OBJS      = main.o FACPoisson.o
+F_OBJS      = facpoisson2d.o facpoisson3d.o
+
+main:	$(CXX_OBJS) $(F_OBJS) $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) $(F_OBJS) \
+	$(LIBSAMRAI3D) $(LIBSAMRAI3D) $(LIBSAMRAI) $(LDLIBS) -o main
+
+check:
+	$(MAKE) check2d
+	$(MAKE) check3d
+
+check2d:	main
+	@for i in test_inputs/*2d.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+check3d:	main
+	@for i in test_inputs/*3d.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+checkcompile: main
+
+checktest:
+	rm -f makecheck.logfile
+	$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+	$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+	rm -f makecheck.logfile
+
+examples2d: main
+	@for i in $(SRCDIR)/example_inputs/*.2d.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+examples3d: main
+	@for i in $(SRCDIR)/example_inputs/*.3d.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+examples:
+	$(MAKE) examples2d
+	$(MAKE) examples3d
+
+clean-check:
+	$(SAMCLEAN)
+
+clean:		clean-check
+	$(RM) main
+
+redo:
+	$(RM) core main
+
+include $(SRCDIR)/Makefile.depend
+
+FORTRAN       = $(SRCDIR)/fortran
+M4DIRS          = -DFORTDIR=$(FORTRAN) $(SAMRAI_M4_FLAGS)
+
+facpoisson2d.o:	$(FORTRAN)/facpoisson2d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/facpoisson2d.m4 > facpoisson2d.f
+	$(F77) $(FFLAGS) -c facpoisson2d.f -o $@
+
+facpoisson3d.o:	$(FORTRAN)/facpoisson3d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/facpoisson3d.m4 > facpoisson3d.f
+	$(F77) $(FFLAGS) -c facpoisson3d.f -o $@
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_nonadaptive/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_nonadaptive/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,185 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   FAC solver example
+##
+#########################################################################
+
+This example demonstrates use of the FAC classes in a SAMRAI application. 
+The files included in this directory are as follows:
+ 
+	  FACPoisson.h, FACPoisson.C
+                        -  Class to set up and solve the scalar
+                           Poisson equation.
+          main.C        -  example main program
+
+Class FACPoisson uses the solver defined in CellPoissonFACSolver.
+This class assembles the the FAC algorithm in FACPreconditioner,
+and the level operations in CellPoissonFACOps.  It uses the
+Robin boundary condition, which is accessed through the virtual
+interface defined by RobinBcCoefStrategy class.
+
+This example uses the library-implemented LocationIndexRobinBcCoefs
+version of the Robin boundary condition.  Other versions of Robin
+boundary conditions may be used, including user-defined.  See the
+RobinBcCoefStrategy class.  The boundary conditions specified
+in the input files are parsed by that the LocationIndexRobinBcCoefs
+class.
+ 
+COMPILE and RUN
+---------------
+Compile:  make main2d main3d
+Run:      main2 2d.default.input
+          main2 2d.otherbc.input
+          main2 2d.const-refine.input
+          main3 3d.default.input
+          main3 3d.otherbc.input
+          main3 3d.const-refine.input
+ 
+
+INPUTS
+------
+
+   The input files *.default.input have sample default settings.
+   Variations of the boundary conditions in this example are shown
+   in the files *otherbc.input.  (Other ways to vary boundary
+   conditions are to supply different implementations of the
+   RobinBcCoefStrategy strategy class.)  Using constant refinement
+   in the prolongation step is shown in the *.const-refine.input
+   files.  (Constant refinement gives slower convergence but may
+   be more effective with strongly varying diffusion coefficients.)
+
+   Main {
+      // General specifications.
+      base_name = "default2"	// The base file name for output files.
+      vis_filename = "default2"	// The base file name for visualization files.
+                                // defaults to the base name.
+   }
+
+   FACPoisson {
+     // The FACPoisson class is the "user class" in this example.
+     // It owns the solver and contains the code to set up the solver.
+     // The inputs for FACPoisson is simply the inputs for the individual
+     // parts owned by the FACPoisson class.
+     fac_solver {
+       // This is the input for the cell-centered Poisson FAC solver
+       // class in the SAMRAI library.
+       enable_logging = TRUE // Bool flag to switch logging on/off
+       max_iterations = 30   // Max number of FAC cycles to use
+       residual_tol = 1.e-8  // Residual tolerance to solve for
+       num_pre_sweeps = 1    // Number of presmoothing sweeps to use
+       num_post_sweeps = 3   // Number of postsmoothing sweeps to use
+     }
+     bc_coefs {
+       // These are the boundary condition specifications.  The number
+       // after "boundary_" is the location index of the boundary.
+       // The inputs are arrays of strings where the first string
+       // indicates the type of values you want to set.  "slope" means
+       // boundary slope, "value" means boundary value, and "coefficients"
+       // mean the raw Robin boundary condition coefficients.
+       // The remaining strings are converted into numbers as
+       // appropriate for what boundary condition you specified with
+       // the first string.  Other boundary conditions are possible.
+       // see the solv_RobinBcCoefStrategy class.
+       boundary_0 = "slope", "0"
+       boundary_1 = "coefficients", "0", "0"
+       boundary_2 = "value", "0"
+       boundary_3 = "value", "0"
+     }
+   }
+
+   "CartesianGeometry" input section
+   ---------------------------------
+   CartesianGeometry {
+      //  Specify lower/upper corners of the computational domain and a
+      //  set of non-overlapping boxes defining domain interior.  If union 
+      //  of boxes is not a parallelpiped, lower/upper corner data corresponds 
+      //  to min/max corner indices over all boxes given.
+      //  x_lo  -- (double array) lower corner of computational domain [REQD]
+      //  x_up  -- (double array) upper corner of computational domain [REQD]
+      //  domain_boxes  -- (box array) set of boxes that define interior of 
+      //                   hysical domain. [REQD]
+      //  periodic_dimension -- (int array) coordinate directions in which 
+      //                        domain is periodic.  Zero indicates not
+      //                        periodic, non-zero value indicates periodicity.
+      //                        [0]
+      x_lo = 0.e0 , 0.e0           
+      x_up = 65.e0 , 55.e0       
+      domain_boxes      = [(0,9),(14,20)],
+                          [(0,21),(19,35)],
+                          [(0,36),(14,49)],
+                          [(20,0),(49,54)],
+                          [(50,0),(64,35)],
+                          [(50,46),(64,54)],
+                          [(57,36),(64,45)]
+      periodic_dimension = 0, 1  // periodic in y only
+   }
+
+
+   "GriddingAlgorithm" input section
+   ---------------------------------
+   GriddingAlgorithm {
+      // Information used to create patches in AMR hierarchy.
+      // max_levels -- (int) max number of mesh levels in hierarchy [REQD]
+      // 
+      // For most of the following parameters, the number of precribed data
+      // values need not match the number of levels in the hierarchy 
+      // (determined by max_levels).  If more values are given than number 
+      // of levels, extraneous values will be ignored.  If less are give, then
+      // values that correspond to individual levels will apply to those 
+      // levels.  Missing values will be taken from those for the finest
+      // level specified.
+      //
+      // ratio_to_coarser {
+      //   level_1 -- (int array) ratio between index spaces on 
+      //              level 1 to level 0 [REQD]
+      //   level_2 -- (int array)  ratio between index spaces on 
+      //              level 2 to level 1 [REQD]
+      //   etc....
+      // }
+      // largest_patch_size {
+      //   level_0 -- (int array) largest patch allowed on level 0. 
+      //              [REQD]    
+      //   level_1 -- (int array)    "       "      "   "  level 1 
+      //              [level 0 entry]
+      //   etc....                       
+      // }
+      max_levels = 3
+      ratio_to_coarser {
+         level_1 = 4 , 4
+         level_2 = 4 , 4
+         level_3 = 4 , 4
+      }
+      largest_patch_size {
+         level_0 = 48 , 48
+      }
+   }
+
+   "StandardTagAndInitialize" input section
+   ---------------------------------------------
+   StandardTagAndInitialize {
+      // Specification of the type of tagging to be performed
+      // tagging_method -- (string array) one or more entries specifying
+      //                 the tagging algorithm used.  Options include:
+      //                 "GRADIENT_DETECTOR"
+      //                 "RICHARDSON_EXTRAPOLATION"
+      //                 "REFINE_BOXES"
+      //
+      // REFINE_BOXES allows you to prescribe where refinement should occur.
+      // If this option is used, you must also supply a RefineBoxes database
+      // entry with the refine boxes on different levels specified.  i.e.
+      //    RefineBoxes{
+      //        level_0 -- (BoxArray) Boxes to be refined on level 0
+      //        level_1 -- (BoxArray) Boxes to be refined on level 1
+      //        etc.
+      //
+      // Static refine boxes option.
+      tagging_method = "REFINE_BOXES"
+      RefineBoxes {
+        level0_boxes = [(15,0),(29,14)]
+        level1_boxes = [(65,10),(114,40)]
+      }
+   }
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_nonadaptive/example_inputs/const_refine.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_nonadaptive/example_inputs/const_refine.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,135 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for example FAC Poisson solver 
+ *
+ ************************************************************************/
+// This is the input file for the 2D FAC example
+// demonstrating changes in boundary conditions.
+//
+// Note that using constant refine prolongation
+// lead to slower convergence.
+
+Main {
+  dim = 2
+  // Base name for output files.
+  base_name = "constantrefine2"
+  // Whether to log all nodes in a parallel run.
+  log_all_nodes = FALSE
+  // Visualization writers to write files for.
+  vis_writer = "Vizamrai", "VisIt"
+}
+
+FACPoisson {
+  // The FACPoisson class is the "user class" in this example.
+  // It owns the solver and contains the code to set up the solver.
+  // The inputs for FACPoisson is simply the inputs for the individual
+  // parts owned by the FACPoisson class.
+  fac_solver {
+    // This is the input for the cell-centered Poisson FAC solver
+    // class in the SAMRAI library.
+    enable_logging = TRUE   // Bool flag to switch logging on/off
+    max_cycles = 20         // Max number of FAC cycles to use
+    residual_tol = 1e-8     // Residual tolerance to solve for
+    num_pre_sweeps = 1      // Number of presmoothing sweeps to use
+    num_post_sweeps = 3     // Number of postsmoothing sweeps to use
+    prolongation_method = "CONSTANT_REFINE" // Type of refinement
+      					  // used in prolongation.
+                                          // Suggested values are
+                                          // "LINEAR_REFINE"
+                                          // "CONSTANT_REFINE"
+    use_smg = TRUE	// Whether to use HYPRE's SMG instead of PFMG.
+  }
+  bc_coefs {
+    // These are the boundary condition specifications.  The number
+    // after "boundary_" is the location index of the boundary.
+    // The inputs are arrays of strings where the first string
+    // indicates the type of values you want to set.  "slope" means
+    // boundary slope, "value" means boundary value, and "coefficients"
+    // mean the raw Robin boundary condition coefficients.
+    // The remaining strings are converted into numbers as
+    // appropriate for what boundary condition you specified with
+    // the first string.  Other boundary conditions are possible.
+    // see the solv_RobinBcCoefStrategy class.
+    // Examples:
+    // boundary_0 = "slope", "0"
+    // boundary_1 = "coefficients", "0", "0"
+    // boundary_2 = "value", "0"
+    // boundary_3 = "value", "0"
+    boundary_0 = "value", "0"
+    boundary_1 = "value", "0"
+    boundary_2 = "value", "0"
+    boundary_3 = "value", "0"
+  }
+}
+
+CartesianGridGeometry {
+  //  Specify lower/upper corners of the computational domain and a
+  //  set of non-overlapping boxes defining domain interior.  If union 
+  //  of boxes is not a parallelpiped, lower/upper corner data corresponds 
+  //  to min/max corner indices over all boxes given.
+  //  x_lo  -- (double array) lower corner of computational domain [REQD]
+  //  x_up  -- (double array) upper corner of computational domain [REQD]
+  //  domain_boxes  -- (box array) set of boxes that define interior of 
+  //                   hysical domain. [REQD]
+  //  periodic_dimension -- (int array) coordinate directions in which 
+  //                        domain is periodic.  Zero indicates not
+  //                        periodic, non-zero value indicates periodicity.
+  //                        [0]
+  domain_boxes = [(0,0), (31,31)]
+  x_lo         = 0, 0
+  x_up         = 1, 1
+}
+
+StandardTagAndInitialize {
+  tagging_method = "REFINE_BOXES"
+  RefineBoxes {
+    level_0 = [(0,0),(31,15)]
+    level_1 = [(0,0),(63,15)]
+    level_2 = [(0,0),(16,16)]
+    //etc.
+  }
+}
+
+PatchHierarchy {
+   // Information used to create patches in AMR hierarchy.
+   // max_levels -- (int) max number of mesh levels in hierarchy [REQD]
+   // 
+   // For most of the following parameters, the number of precribed data
+   // values need not match the number of levels in the hierarchy 
+   // (determined by max_levels).  If more values are given than number 
+   // of levels, extraneous values will be ignored.  If less are give, then
+   // values that correspond to individual levels will apply to those 
+   // levels.  Missing values will be taken from those for the finest
+   // level specified.
+   //
+   // ratio_to_coarser {
+   //   level_1 -- (int array) ratio between index spaces on 
+   //              level 1 to level 0 [REQD]
+   //   level_2 -- (int array)  ratio between index spaces on 
+   //              level 2 to level 1 [REQD]
+   //   etc....
+   // }
+   // largest_patch_size {
+   //   level_0 -- (int array) largest patch allowed on level 0. 
+   //              [REQD]    
+   //   level_1 -- (int array)    "       "      "   "  level 1 
+   //              [level 0 entry]
+   //   etc....                       
+   // }
+   max_levels = 3
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+   }
+   largest_patch_size {
+      level_0 = 32, 32
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_nonadaptive/example_inputs/const_refine.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_nonadaptive/example_inputs/const_refine.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,135 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for example FAC Poisson solver 
+ *
+ ************************************************************************/
+// This is the input file for the 3D FAC example
+// demonstrating changes in boundary conditions.
+//
+// Note that using constant refine prolongation
+// lead to slower convergence.
+
+Main {
+  dim = 3
+  // Base name for output files.
+  base_name = "constantrefine3"
+  // Whether to log all nodes in a parallel run.
+  log_all_nodes = FALSE
+  // Visualization writers to write files for.
+  vis_writer = "Vizamrai", "VisIt"
+}
+
+FACPoisson {
+  // The FACPoisson class is the "user class" in this example.
+  // It owns the solver and contains the code to set up the solver.
+  // The inputs for FACPoisson is simply the inputs for the individual
+  // parts owned by the FACPoisson class.
+  fac_solver {
+    // This is the input for the cell-centered Poisson FAC solver
+    // class in the SAMRAI library.
+    enable_logging = TRUE   // Bool flag to switch logging on/off
+    max_cycles = 20         // Max number of FAC cycles to use
+    residual_tol = 1e-8     // Residual tolerance to solve for
+    num_pre_sweeps = 1      // Number of presmoothing sweeps to use
+    num_post_sweeps = 3     // Number of postsmoothing sweeps to use
+    prolongation_method = "CONSTANT_REFINE" // Type of refinement
+      					  // used in prolongation.
+                                          // Suggested values are
+                                          // "LINEAR_REFINE"
+                                          // "CONSTANT_REFINE"
+    use_smg = TRUE	// Whether to use HYPRE's SMG instead of PFMG.
+  }
+  bc_coefs {
+    // These are the boundary condition specifications.  The number
+    // after "boundary_" is the location index of the boundary.
+    // The inputs are arrays of strings where the first string
+    // indicates the type of values you want to set.  "slope" means
+    // boundary slope, "value" means boundary value, and "coefficients"
+    // mean the raw Robin boundary condition coefficients.
+    // The remaining strings are converted into numbers as
+    // appropriate for what boundary condition you specified with
+    // the first string.  Other boundary conditions are possible.
+    // see the solv_RobinBcCoefStrategy class.
+    // Examples:
+    // boundary_0 = "slope", "0"
+    // boundary_1 = "coefficients", "0", "0"
+    // boundary_2 = "value", "0"
+    // boundary_3 = "value", "0"
+    boundary_0 = "value", "0"
+    boundary_1 = "value", "0"
+    boundary_2 = "value", "0"
+    boundary_3 = "value", "0"
+    boundary_4 = "value", "0"
+    boundary_5 = "value", "0"
+  }
+}
+
+CartesianGridGeometry {
+  //  Specify lower/upper corners of the computational domain and a
+  //  set of non-overlapping boxes defining domain interior.  If union 
+  //  of boxes is not a parallelpiped, lower/upper corner data corresponds 
+  //  to min/max corner indices over all boxes given.
+  //  x_lo  -- (double array) lower corner of computational domain [REQD]
+  //  x_up  -- (double array) upper corner of computational domain [REQD]
+  //  domain_boxes  -- (box array) set of boxes that define interior of 
+  //                   hysical domain. [REQD]
+  //  periodic_dimension -- (int array) coordinate directions in which 
+  //                        domain is periodic.  Zero indicates not
+  //                        periodic, non-zero value indicates periodicity.
+  //                        [0]
+  domain_boxes = [(0,0,0), (15,15,15)]
+  x_lo         = 0, 0, 0
+  x_up         = 1, 1, 1
+}
+
+StandardTagAndInitialize {
+  tagging_method = "REFINE_BOXES"
+  RefineBoxes {
+    level_0 = [(0,0,0),(7,7,7)]
+    level_1 = [(0,0,0),(7,7,7)]
+  }
+}
+
+PatchHierarchy {
+   // Information used to create patches in AMR hierarchy.
+   // max_levels -- (int) max number of mesh levels in hierarchy [REQD]
+   // 
+   // For most of the following parameters, the number of precribed data
+   // values need not match the number of levels in the hierarchy 
+   // (determined by max_levels).  If more values are given than number 
+   // of levels, extraneous values will be ignored.  If less are give, then
+   // values that correspond to individual levels will apply to those 
+   // levels.  Missing values will be taken from those for the finest
+   // level specified.
+   //
+   // ratio_to_coarser {
+   //   level_1 -- (int array) ratio between index spaces on 
+   //              level 1 to level 0 [REQD]
+   //   level_2 -- (int array)  ratio between index spaces on 
+   //              level 2 to level 1 [REQD]
+   //   etc....
+   // }
+   // largest_patch_size {
+   //   level_0 -- (int array) largest patch allowed on level 0. 
+   //              [REQD]    
+   //   level_1 -- (int array)    "       "      "   "  level 1 
+   //              [level 0 entry]
+   //   etc....                       
+   // }
+   max_levels = 3
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+   }
+   largest_patch_size {
+      level_0 = 32, 32, 32
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_nonadaptive/example_inputs/otherbc.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_nonadaptive/example_inputs/otherbc.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,137 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for example FAC Poisson solver 
+ *
+ ************************************************************************/
+// This is the input file for the 2D FAC example
+// demonstrating changes in boundary conditions.
+//
+// Note that you should not compare the computed
+// solution with the exact solution in the example.
+// The exact solution is only for the boundary
+// condition of 0 on all boundaries.
+
+Main {
+  dim = 2
+  // Base name for output files.
+  base_name = "otherbc2"
+  // Whether to log all nodes in a parallel run.
+  log_all_nodes = FALSE
+  // Visualization writers to write files for.
+  vis_writer = "Vizamrai", "VisIt"
+}
+
+FACPoisson {
+  // The FACPoisson class is the "user class" in this example.
+  // It owns the solver and contains the code to set up the solver.
+  // The inputs for FACPoisson is simply the inputs for the individual
+  // parts owned by the FACPoisson class.
+  fac_solver {
+    // This is the input for the cell-centered Poisson FAC solver
+    // class in the SAMRAI library.
+    enable_logging = TRUE   // Bool flag to switch logging on/off
+    max_cycles = 10         // Max number of FAC cycles to use
+    residual_tol = 1e-8     // Residual tolerance to solve for
+    num_pre_sweeps = 1      // Number of presmoothing sweeps to use
+    num_post_sweeps = 3     // Number of postsmoothing sweeps to use
+    prolongation_method = "LINEAR_REFINE" // Type of refinement
+      					  // used in prolongation.
+                                          // Suggested values are
+                                          // "LINEAR_REFINE"
+                                          // "CONSTANT_REFINE"
+    use_smg = TRUE	// Whether to use HYPRE's SMG instead of PFMG.
+  }
+  bc_coefs {
+    // These are the boundary condition specifications.  The number
+    // after "boundary_" is the location index of the boundary.
+    // The inputs are arrays of strings where the first string
+    // indicates the type of values you want to set.  "slope" means
+    // boundary slope, "value" means boundary value, and "coefficients"
+    // mean the raw Robin boundary condition coefficients.
+    // The remaining strings are converted into numbers as
+    // appropriate for what boundary condition you specified with
+    // the first string.  Other boundary conditions are possible.
+    // see the solv_RobinBcCoefStrategy class.
+    // Examples:
+    // boundary_0 = "slope", "0"
+    // boundary_1 = "coefficients", "0", "0"
+    // boundary_2 = "value", "0"
+    // boundary_3 = "value", "0"
+    boundary_0 = "slope", "0"
+    boundary_1 = "coefficients", "0", "0"
+    boundary_2 = "value", "0"
+    boundary_3 = "value", "0"
+  }
+}
+
+CartesianGridGeometry {
+  //  Specify lower/upper corners of the computational domain and a
+  //  set of non-overlapping boxes defining domain interior.  If union 
+  //  of boxes is not a parallelpiped, lower/upper corner data corresponds 
+  //  to min/max corner indices over all boxes given.
+  //  x_lo  -- (double array) lower corner of computational domain [REQD]
+  //  x_up  -- (double array) upper corner of computational domain [REQD]
+  //  domain_boxes  -- (box array) set of boxes that define interior of 
+  //                   hysical domain. [REQD]
+  //  periodic_dimension -- (int array) coordinate directions in which 
+  //                        domain is periodic.  Zero indicates not
+  //                        periodic, non-zero value indicates periodicity.
+  //                        [0]
+  domain_boxes = [(0,0), (31,31)]
+  x_lo         = 0, 0
+  x_up         = 1, 1
+}
+
+StandardTagAndInitialize {
+  tagging_method = "REFINE_BOXES"
+  RefineBoxes {
+    level_0 = [(0,0),(31,15)]
+    level_1 = [(0,0),(63,15)]
+    level_2 = [(0,0),(16,16)]
+    //etc.
+  }
+}
+
+PatchHierarchy {
+   // Information used to create patches in AMR hierarchy.
+   // max_levels -- (int) max number of mesh levels in hierarchy [REQD]
+   // 
+   // For most of the following parameters, the number of precribed data
+   // values need not match the number of levels in the hierarchy 
+   // (determined by max_levels).  If more values are given than number 
+   // of levels, extraneous values will be ignored.  If less are give, then
+   // values that correspond to individual levels will apply to those 
+   // levels.  Missing values will be taken from those for the finest
+   // level specified.
+   //
+   // ratio_to_coarser {
+   //   level_1 -- (int array) ratio between index spaces on 
+   //              level 1 to level 0 [REQD]
+   //   level_2 -- (int array)  ratio between index spaces on 
+   //              level 2 to level 1 [REQD]
+   //   etc....
+   // }
+   // largest_patch_size {
+   //   level_0 -- (int array) largest patch allowed on level 0. 
+   //              [REQD]    
+   //   level_1 -- (int array)    "       "      "   "  level 1 
+   //              [level 0 entry]
+   //   etc....                       
+   // }
+   max_levels = 3
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+   }
+   largest_patch_size {
+      level_0 = 32, 32
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_nonadaptive/example_inputs/otherbc.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_nonadaptive/example_inputs/otherbc.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,137 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for example FAC Poisson solver 
+ *
+ ************************************************************************/
+// This is the input file for the 3D FAC example
+// demonstrating changes in boundary conditions.
+//
+// Note that you should not compare the computed
+// solution with the exact solution in the example.
+// The exact solution is only for the boundary
+// condition of 0 on all boundaries.
+
+Main {
+  dim = 3
+  // Base name for output files.
+  base_name = "otherbc3"
+  // Whether to log all nodes in a parallel run.
+  log_all_nodes = FALSE
+  // Visualization writers to write files for.
+  vis_writer = "Vizamrai", "VisIt"
+}
+
+FACPoisson {
+  // The FACPoisson class is the "user class" in this example.
+  // It owns the solver and contains the code to set up the solver.
+  // The inputs for FACPoisson is simply the inputs for the individual
+  // parts owned by the FACPoisson class.
+  fac_solver {
+    // This is the input for the cell-centered Poisson FAC solver
+    // class in the SAMRAI library.
+    enable_logging = TRUE   // Bool flag to switch logging on/off
+    max_cycles = 10         // Max number of FAC cycles to use
+    residual_tol = 1e-8     // Residual tolerance to solve for
+    num_pre_sweeps = 1      // Number of presmoothing sweeps to use
+    num_post_sweeps = 3     // Number of postsmoothing sweeps to use
+    prolongation_method = "LINEAR_REFINE" // Type of refinement
+      					  // used in prolongation.
+                                          // Suggested values are
+                                          // "LINEAR_REFINE"
+                                          // "CONSTANT_REFINE"
+    use_smg = TRUE	// Whether to use HYPRE's SMG instead of PFMG.
+  }
+  bc_coefs {
+    // These are the boundary condition specifications.  The number
+    // after "boundary_" is the location index of the boundary.
+    // The inputs are arrays of strings where the first string
+    // indicates the type of values you want to set.  "slope" means
+    // boundary slope, "value" means boundary value, and "coefficients"
+    // mean the raw Robin boundary condition coefficients.
+    // The remaining strings are converted into numbers as
+    // appropriate for what boundary condition you specified with
+    // the first string.  Other boundary conditions are possible.
+    // see the solv_RobinBcCoefStrategy class.
+    // Examples:
+    // boundary_0 = "slope", "0"
+    // boundary_1 = "coefficients", "0", "0"
+    // boundary_2 = "value", "0"
+    // boundary_3 = "value", "0"
+    boundary_0 = "slope", "0"
+    boundary_1 = "coefficients", "0", "0"
+    boundary_2 = "value", "0"
+    boundary_3 = "value", "0"
+    boundary_4 = "value", "0"
+    boundary_5 = "value", "0"
+  }
+}
+
+CartesianGridGeometry {
+  //  Specify lower/upper corners of the computational domain and a
+  //  set of non-overlapping boxes defining domain interior.  If union 
+  //  of boxes is not a parallelpiped, lower/upper corner data corresponds 
+  //  to min/max corner indices over all boxes given.
+  //  x_lo  -- (double array) lower corner of computational domain [REQD]
+  //  x_up  -- (double array) upper corner of computational domain [REQD]
+  //  domain_boxes  -- (box array) set of boxes that define interior of 
+  //                   hysical domain. [REQD]
+  //  periodic_dimension -- (int array) coordinate directions in which 
+  //                        domain is periodic.  Zero indicates not
+  //                        periodic, non-zero value indicates periodicity.
+  //                        [0]
+  domain_boxes = [(0,0,0), (15,15,15)]
+  x_lo         = 0, 0, 0
+  x_up         = 1, 1, 1
+}
+
+StandardTagAndInitialize {
+  tagging_method = "REFINE_BOXES"
+  RefineBoxes {
+    level_0 = [(0,0,0),(7,7,7)]
+    level_1 = [(0,0,0),(7,7,7)]
+  }
+}
+
+PatchHierarchy {
+   // Information used to create patches in AMR hierarchy.
+   // max_levels -- (int) max number of mesh levels in hierarchy [REQD]
+   // 
+   // For most of the following parameters, the number of precribed data
+   // values need not match the number of levels in the hierarchy 
+   // (determined by max_levels).  If more values are given than number 
+   // of levels, extraneous values will be ignored.  If less are give, then
+   // values that correspond to individual levels will apply to those 
+   // levels.  Missing values will be taken from those for the finest
+   // level specified.
+   //
+   // ratio_to_coarser {
+   //   level_1 -- (int array) ratio between index spaces on 
+   //              level 1 to level 0 [REQD]
+   //   level_2 -- (int array)  ratio between index spaces on 
+   //              level 2 to level 1 [REQD]
+   //   etc....
+   // }
+   // largest_patch_size {
+   //   level_0 -- (int array) largest patch allowed on level 0. 
+   //              [REQD]    
+   //   level_1 -- (int array)    "       "      "   "  level 1 
+   //              [level 0 entry]
+   //   etc....                       
+   // }
+   max_levels = 3
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+   }
+   largest_patch_size {
+      level_0 = 32, 32, 32
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_nonadaptive/fortran/facpoisson2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_nonadaptive/fortran/facpoisson2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,43 @@
+define(NDIM,2)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+      subroutine setexactandrhs2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  exact,rhs,dx,xlower)
+c***********************************************************************
+      implicit none
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:NDIM-1),
+     &     xlower(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     exact(CELL2d(ifirst,ilast,1)),
+     &     rhs(CELL2d(ifirst,ilast,0))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1
+      REAL x, y, sinsin, pi
+
+      pi=3.141592654
+
+      do ic1=ifirst1,ilast1
+        y = xlower(1) + dx(1)*(ic1-ifirst1+0.5)
+        do ic0=ifirst0,ilast0
+          x = xlower(0) + dx(0)*(ic0-ifirst0+0.5)
+          sinsin = sin(pi*x) * sin(pi*y)
+          exact(ic0,ic1) = sinsin
+          rhs(ic0,ic1) = -NDIM*pi*pi*sinsin
+        enddo
+      enddo
+
+      return
+      end   
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_nonadaptive/fortran/facpoisson3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_nonadaptive/fortran/facpoisson3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,48 @@
+define(NDIM,3)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine setexactandrhs3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  exact,rhs,dx,xlower)
+c***********************************************************************
+      implicit none
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:NDIM-1),
+     &     xlower(0:NDIM-1)
+c variables in 3d cell indexed         
+      REAL
+     &     exact(CELL3d(ifirst,ilast,1)),
+     &     rhs(CELL3d(ifirst,ilast,0))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2
+      REAL x, y, z, sinsin, pi
+
+      pi=3.141592654
+
+c     write(6,*) "In fluxcorrec()"
+c     ******************************************************************
+      do ic2=ifirst2,ilast2
+         z = xlower(2) + dx(2)*(ic2-ifirst2+0.5)
+         do ic1=ifirst1,ilast1
+            y = xlower(1) + dx(1)*(ic1-ifirst1+0.5)
+            do ic0=ifirst0,ilast0
+               x = xlower(0) + dx(0)*(ic0-ifirst0+0.5)
+               sinsin = sin(pi*x) * sin(pi*y) * sin(pi*z)
+               exact(ic0,ic1,ic2) = sinsin
+               rhs(ic0,ic1,ic2) = -NDIM*pi*pi*sinsin
+            enddo
+         enddo
+      enddo
+
+      return
+      end   
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_nonadaptive/main.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_nonadaptive/main.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,289 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program for FAC Poisson example 
+ *
+ ************************************************************************/
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <string>
+using namespace std;
+
+#include "SAMRAI/mesh/BergerRigoutsos.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/mesh/GriddingAlgorithm.h"
+#include "SAMRAI/tbox/InputDatabase.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/mesh/TreeLoadBalancer.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/mesh/StandardTagAndInitialize.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/appu/VisItDataWriter.h"
+
+#include "FACPoisson.h"
+
+using namespace SAMRAI;
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * This is the driver program to demonstrate                            *
+ * how to use the FAC Poisson solver.                                   *
+ *                                                                      *
+ * We set up the simple problem                                         *
+ *          u + div(grad(u)) = sin(x)*sin(y)                            *
+ * in the domain [0:1]x[0:1], with u=0 on the                           *
+ * boundary.                                                            *
+ *                                                                      *
+ * FACPoisson is the primary object used to                             *
+ * set up and solve the system.  It maintains                           *
+ * the data for the computed solution u, the                            *
+ * exact solution, and the right hand side.                             *
+ *                                                                      *
+ * The hierarchy created to solve this problem                          *
+ * has only one level.  (The FAC Poisson solver                         *
+ * is a single-level solver.)                                           *
+ *                                                                      *
+ *************************************************************************
+ */
+
+int main(
+   int argc,
+   char* argv[])
+{
+   /*
+    * Initialize MPI, SAMRAI.
+    */
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+      /*
+       * Process command line arguments.  For each run, the input
+       * filename must be specified.  Usage is:
+       *
+       *    executable <input file name>
+       *
+       */
+      string input_filename;
+
+      if (argc != 2) {
+         TBOX_ERROR("USAGE:  " << argv[0] << " <input file> \n"
+                                          << "  options:\n"
+                                          << "  none at this time" << endl);
+      } else {
+         input_filename = argv[1];
+      }
+
+      /*
+       * Create input database and parse all data in input file.
+       */
+
+      tbox::Pointer<tbox::Database> input_db(new tbox::InputDatabase("input_db"));
+      tbox::InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      /*
+       * Set up the timer manager.
+       */
+      if (input_db->isDatabase("TimerManager")) {
+         tbox::TimerManager::createManager(input_db->getDatabase("TimerManager"));
+      }
+
+      /*
+       * Retrieve "Main" section from input database.
+       * The main database is used only in main().
+       * The base_name variable is a base name for
+       * all name strings in this program.
+       */
+
+      tbox::Pointer<tbox::Database> main_db = input_db->getDatabase("Main");
+
+      const tbox::Dimension dim(static_cast<unsigned short>(main_db->getInteger("dim")));
+
+      string base_name = "unnamed";
+      base_name = main_db->getStringWithDefault("base_name", base_name);
+
+      /*
+       * Start logging.
+       */
+      const string log_file_name = base_name + ".log";
+      bool log_all_nodes = false;
+      log_all_nodes = main_db->getBoolWithDefault("log_all_nodes",
+            log_all_nodes);
+      if (log_all_nodes) {
+         tbox::PIO::logAllNodes(log_file_name);
+      } else {
+         tbox::PIO::logOnlyNodeZero(log_file_name);
+      }
+
+      /*
+       * Create major algorithm and data objects which comprise application.
+       * Each object will be initialized either from input data or restart
+       * files, or a combination of both.  Refer to each class constructor
+       * for details.  For more information on the composition of objects
+       * for this application, see comments at top of file.
+       */
+
+      tbox::Pointer<geom::CartesianGridGeometry> grid_geometry(
+         new geom::CartesianGridGeometry(dim,
+            base_name + "CartesianGridGeometry",
+            input_db->getDatabase("CartesianGridGeometry")));
+      tbox::plog << "Cartesian Geometry:" << endl;
+      grid_geometry->printClassData(tbox::plog);
+
+      tbox::Pointer<hier::PatchHierarchy> patch_hierarchy(
+         new hier::PatchHierarchy(base_name + "::PatchHierarchy",
+            grid_geometry,
+            input_db->getDatabase("PatchHierarchy")));
+
+      /*
+       * The FACPoisson object is the main user object specific to the
+       * problem being solved.  It provides the implementations for setting
+       * up the grid and plotting data.  It also wraps up the solve
+       * process that includes making the initial guess, specifying the
+       * boundary conditions and call the solver.
+       */
+      FACPoisson fac_poisson(base_name + "::FACPoisson",
+                             dim,
+                             input_db->isDatabase("FACPoisson") ?
+                             input_db->getDatabase("FACPoisson") :
+                             tbox::Pointer<tbox::Database>(NULL));
+
+      /*
+       * Create the tag-and-initializer, box-generator and load-balancer
+       * object references required by the gridding_algorithm object.
+       */
+      tbox::Pointer<mesh::StandardTagAndInitialize> tag_and_initializer(
+         new mesh::StandardTagAndInitialize(
+            dim,
+            "CellTaggingMethod",
+            tbox::Pointer<mesh::StandardTagAndInitStrategy>(&fac_poisson, false),
+            input_db->getDatabase("StandardTagAndInitialize")
+            ));
+      tbox::Pointer<mesh::BergerRigoutsos> box_generator(
+         new mesh::BergerRigoutsos(dim));
+      tbox::Pointer<mesh::TreeLoadBalancer> load_balancer(
+         new mesh::TreeLoadBalancer(dim,
+            "load balancer",
+            tbox::Pointer<tbox::Database>()));
+      load_balancer->setSAMRAI_MPI(
+         SAMRAI::tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+      /*
+       * Create the gridding algorithm used to generate the SAMR grid
+       * and create the grid.
+       */
+      tbox::Pointer<mesh::GriddingAlgorithm> gridding_algorithm;
+      gridding_algorithm =
+         new mesh::GriddingAlgorithm(
+            patch_hierarchy,
+            "Gridding Algorithm",
+            input_db->getDatabase("GriddingAlgorithm"),
+            tag_and_initializer,
+            box_generator,
+            load_balancer);
+      tbox::plog << "Gridding algorithm:" << endl;
+      gridding_algorithm->printClassData(tbox::plog);
+
+      /*
+       * Make the coarsest patch level where we will be solving.
+       */
+      gridding_algorithm->makeCoarsestLevel(0.0);
+      bool done = false;
+      for (int lnum = 0;
+           patch_hierarchy->levelCanBeRefined(lnum) && !done; lnum++) {
+         tbox::plog << "Adding finner levels with lnum = " << lnum << endl;
+         gridding_algorithm->makeFinerLevel(
+            0.0,
+            true,
+            0);
+         tbox::plog << "Just added finer levels with lnum = " << lnum << endl;
+         done = !(patch_hierarchy->finerLevelExists(lnum));
+      }
+
+      /*
+       * Set up the plotter for the hierarchy just created.
+       * The FACPoisson object handles the data and has the
+       * function setupExternalPlotter to register its data
+       * with the plotter.
+       */
+      tbox::Array<string> vis_writer(1);
+      vis_writer[0] = "Visit";
+      if (main_db->keyExists("vis_writer")) {
+         vis_writer = main_db->getStringArray("vis_writer");
+      }
+      bool use_visit = false;
+      for (int i = 0; i < vis_writer.getSize(); i++) {
+         if (vis_writer[i] == "VisIt") use_visit = true;
+      }
+#ifdef HAVE_HDF5
+      tbox::Pointer<appu::VisItDataWriter> visit_writer;
+      string vis_filename =
+         main_db->getStringWithDefault("vis_filename", base_name);
+      if (use_visit) {
+         visit_writer = new appu::VisItDataWriter(dim,
+               "Visit Writer",
+               vis_filename + ".visit");
+         fac_poisson.setupPlotter(*visit_writer);
+      }
+#endif
+
+      /*
+       * After creating all objects and initializing their state,
+       * we print the input database and variable database contents
+       * to the log file.
+       */
+      tbox::plog << "\nCheck input data and variables before simulation:"
+                 << endl;
+      tbox::plog << "Input database..." << endl;
+      input_db->printClassData(tbox::plog);
+
+      /*
+       * Solve.
+       */
+      fac_poisson.solvePoisson();
+
+#ifdef HAVE_HDF5
+      /*
+       * Plot.
+       */
+      if (use_visit) {
+         visit_writer->writePlotData(patch_hierarchy, 0);
+      }
+#endif
+
+      /*
+       * Deallocate objects when done.
+       */
+
+      tbox::TimerManager::getManager()->print(tbox::plog);
+   }
+
+   /*
+    * This print is for the SAMRAI testing framework.  Passing here
+    * means application ran.  A better test would actually test the
+    * results.
+    */
+   tbox::pout << "\nPASSED:  FAC" << endl;
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return 0;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_nonadaptive/test_inputs/default.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_nonadaptive/test_inputs/default.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,140 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for example FAC Poisson solver 
+ *
+ ************************************************************************/
+// This is the default input file for the 2D FAC example.
+
+Main {
+  dim = 2
+  // Base name for output files.
+  base_name = "default2"
+  // Whether to log all nodes in a parallel run.
+  log_all_nodes = FALSE
+  // Visualization writers to write files for.
+  vis_writer = "VisIt"
+}
+
+FACPoisson {
+  // The FACPoisson class is the "user class" in this example.
+  // It owns the solver and contains the code to set up the solver.
+  // The inputs for FACPoisson is simply the inputs for the individual
+  // parts owned by the FACPoisson class.
+  fac_solver {
+    // This is the input for the cell-centered Poisson FAC solver
+    // class in the SAMRAI library.
+    enable_logging = TRUE   // Bool flag to switch logging on/off
+    max_cycles = 10         // Max number of FAC cycles to use
+    residual_tol = 1e-8     // Residual tolerance to solve for
+    num_pre_sweeps = 1      // Number of presmoothing sweeps to use
+    num_post_sweeps = 3     // Number of postsmoothing sweeps to use
+    prolongation_method = "LINEAR_REFINE" // Type of refinement
+      					  // used in prolongation.
+                                          // Suggested values are
+                                          // "LINEAR_REFINE"
+                                          // "CONSTANT_REFINE"
+    use_smg = TRUE	// Whether to use HYPRE's SMG instead of PFMG.
+  }
+  bc_coefs {
+    // These are the boundary condition specifications.  The number
+    // after "boundary_" is the location index of the boundary.
+    // The inputs are arrays of strings where the first string
+    // indicates the type of values you want to set.  "slope" means
+    // boundary slope, "value" means boundary value, and "coefficients"
+    // mean the raw Robin boundary condition coefficients.
+    // The remaining strings are converted into numbers as
+    // appropriate for what boundary condition you specified with
+    // the first string.  Other boundary conditions are possible.
+    // see the solv_RobinBcCoefStrategy class.
+    // Examples:
+    boundary_0 = "value", "0"
+    boundary_1 = "value", "0"
+    boundary_2 = "value", "0"
+    boundary_3 = "value", "0"
+  }
+}
+
+CartesianGridGeometry {
+  //  Specify lower/upper corners of the computational domain and a
+  //  set of non-overlapping boxes defining domain interior.  If union 
+  //  of boxes is not a parallelpiped, lower/upper corner data corresponds 
+  //  to min/max corner indices over all boxes given.
+  //  x_lo  -- (double array) lower corner of computational domain [REQD]
+  //  x_up  -- (double array) upper corner of computational domain [REQD]
+  //  domain_boxes  -- (box array) set of boxes that define interior of 
+  //                   hysical domain. [REQD]
+  //  periodic_dimension -- (int array) coordinate directions in which 
+  //                        domain is periodic.  Zero indicates not
+  //                        periodic, non-zero value indicates periodicity.
+  //                        [0]
+  domain_boxes = [(0,0), (31,31)]
+  x_lo         = 0, 0
+  x_up         = 1, 1
+}
+
+StandardTagAndInitialize {
+  tagging_method = "REFINE_BOXES"
+  RefineBoxes {
+    level_0 = [(0,0),(31,15)]
+    level_1 = [(0,0),(63,15)]
+    level_2 = [(0,0),(16,16)]
+    //etc.
+  }
+}
+
+PatchHierarchy {
+   // Information used to create patches in AMR hierarchy.
+   // max_levels -- (int) max number of mesh levels in hierarchy [REQD]
+   // 
+   // For most of the following parameters, the number of precribed data
+   // values need not match the number of levels in the hierarchy 
+   // (determined by max_levels).  If more values are given than number 
+   // of levels, extraneous values will be ignored.  If less are give, then
+   // values that correspond to individual levels will apply to those 
+   // levels.  Missing values will be taken from those for the finest
+   // level specified.
+   //
+   // ratio_to_coarser {
+   //   level_1 -- (int array) ratio between index spaces on 
+   //              level 1 to level 0 [REQD]
+   //   level_2 -- (int array)  ratio between index spaces on 
+   //              level 2 to level 1 [REQD]
+   //   etc....
+   // }
+   // largest_patch_size {
+   //   level_0 -- (int array) largest patch allowed on level 0. 
+   //              [REQD]    
+   //   level_1 -- (int array)    "       "      "   "  level 1 
+   //              [level 0 entry]
+   //   etc....                       
+   // }
+   max_levels = 3
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+   }
+   largest_patch_size {
+      level_0 = 32, 32
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+
+   // TODO this should be removed
+   sequentialize_patch_indices = TRUE
+}
+
+
+TimerManager{
+  timer_list = "hier::*::*", "mesh::*::*"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+  print_threshold = -1
+  print_summed = TRUE
+  print_max = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/FAC_nonadaptive/test_inputs/default.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/FAC_nonadaptive/test_inputs/default.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,129 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for example FAC Poisson solver 
+ *
+ ************************************************************************/
+// This is the default input file for the 3D FAC example.
+
+Main {
+  dim = 3
+  // Base name for output files.
+  base_name = "default3"
+  // Whether to log all nodes in a parallel run.
+  log_all_nodes = FALSE
+  // Visualization writers to write files for.
+  vis_writer = "VisIt"
+}
+
+FACPoisson {
+  // The FACPoisson class is the "user class" in this example.
+  // It owns the solver and contains the code to set up the solver.
+  // The inputs for FACPoisson is simply the inputs for the individual
+  // parts owned by the FACPoisson class.
+  fac_solver {
+    // This is the input for the cell-centered Poisson FAC solver
+    // class in the SAMRAI library.
+    enable_logging = TRUE   // Bool flag to switch logging on/off
+    max_cycles = 10         // Max number of FAC cycles to use
+    residual_tol = 1e-8     // Residual tolerance to solve for
+    num_pre_sweeps = 1      // Number of presmoothing sweeps to use
+    num_post_sweeps = 3     // Number of postsmoothing sweeps to use
+    prolongation_method = "LINEAR_REFINE" // Type of refinement
+      					  // used in prolongation.
+                                          // Suggested values are
+                                          // "LINEAR_REFINE"
+                                          // "CONSTANT_REFINE"
+    use_smg = TRUE	// Whether to use HYPRE's SMG instead of PFMG.
+  }
+  bc_coefs {
+    // These are the boundary condition specifications.  The number
+    // after "boundary_" is the location index of the boundary.
+    // The inputs are arrays of strings where the first string
+    // indicates the type of values you want to set.  "slope" means
+    // boundary slope, "value" means boundary value, and "coefficients"
+    // mean the raw Robin boundary condition coefficients.
+    // The remaining strings are converted into numbers as
+    // appropriate for what boundary condition you specified with
+    // the first string.  Other boundary conditions are possible.
+    // see the solv_RobinBcCoefStrategy class.
+    // Examples:
+    boundary_0 = "value", "0"
+    boundary_1 = "value", "0"
+    boundary_2 = "value", "0"
+    boundary_3 = "value", "0"
+    boundary_4 = "value", "0"
+    boundary_5 = "value", "0"
+  }
+}
+
+CartesianGridGeometry {
+  //  Specify lower/upper corners of the computational domain and a
+  //  set of non-overlapping boxes defining domain interior.  If union 
+  //  of boxes is not a parallelpiped, lower/upper corner data corresponds 
+  //  to min/max corner indices over all boxes given.
+  //  x_lo  -- (double array) lower corner of computational domain [REQD]
+  //  x_up  -- (double array) upper corner of computational domain [REQD]
+  //  domain_boxes  -- (box array) set of boxes that define interior of 
+  //                   hysical domain. [REQD]
+  //  periodic_dimension -- (int array) coordinate directions in which 
+  //                        domain is periodic.  Zero indicates not
+  //                        periodic, non-zero value indicates periodicity.
+  //                        [0]
+  domain_boxes = [(0,0,0), (15,15,15)]
+  x_lo         = 0, 0, 0
+  x_up         = 1, 1, 1
+}
+
+StandardTagAndInitialize {
+  tagging_method = "REFINE_BOXES"
+  RefineBoxes {
+    level_0 = [(0,0,0),(7,7,7)]
+    level_1 = [(0,0,0),(7,7,7)]
+  }
+}
+
+PatchHierarchy {
+   // Information used to create patches in AMR hierarchy.
+   // max_levels -- (int) max number of mesh levels in hierarchy [REQD]
+   // 
+   // For most of the following parameters, the number of precribed data
+   // values need not match the number of levels in the hierarchy 
+   // (determined by max_levels).  If more values are given than number 
+   // of levels, extraneous values will be ignored.  If less are give, then
+   // values that correspond to individual levels will apply to those 
+   // levels.  Missing values will be taken from those for the finest
+   // level specified.
+   //
+   // ratio_to_coarser {
+   //   level_1 -- (int array) ratio between index spaces on 
+   //              level 1 to level 0 [REQD]
+   //   level_2 -- (int array)  ratio between index spaces on 
+   //              level 2 to level 1 [REQD]
+   //   etc....
+   // }
+   // largest_patch_size {
+   //   level_0 -- (int array) largest patch allowed on level 0. 
+   //              [REQD]    
+   //   level_1 -- (int array)    "       "      "   "  level 1 
+   //              [level 0 entry]
+   //   etc....                       
+   // }
+   max_levels = 3
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+   }
+   largest_patch_size {
+      level_0 = 32, 32, 32
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+   // TODO this should be removed
+   sequentialize_patch_indices = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,84 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for testing parts of SAMRAI library 
+##
+#########################################################################
+
+SAMRAI	      = @top_srcdir@
+SRCDIR        = @srcdir@
+OBJECT        = ../..
+SUBDIR        = source/test
+
+SUBDIRS = \
+	pointer \
+	logger \
+	ieee \
+	dimension \
+	dataaccess \
+	inputdb \
+	restartdb \
+	timers \
+	variables \
+	indexdata \
+	samrai_mpi \
+	async_comm \
+	hierarchy \
+	clustering \
+	dlbg \
+	communication \
+	patchbdrysum \
+	dataops \
+	hypre \
+	FAC_nonadaptive \
+	FAC_adaptive \
+	vector \
+	sundials \
+	boundary \
+	performance \
+        mblkcomm \
+        MblkEuler \
+        MblkLinAdv \
+        nonlinear \
+        rank_group \
+        fill_pattern \
+	applications
+
+##############################################################################
+# TODO : some work completed but not working
+##############################################################################
+
+# emb_bdry
+# All tests fail with DLBG error message
+# P=00000:We don't have a box-growing function for DLBG yet.
+
+default: check	
+
+include $(OBJECT)/config/Makefile.config
+
+library:
+
+check:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+
+check2d:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+
+check3d:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+
+checkcompile:
+	@echo "Starting " $@ " in source/test at `date`"
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+	@echo "Completed " $@ " in source/test at `date`"
+
+checktest:
+	@echo "Starting " $@ " in source/test at `date`"
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+	@echo "Completed " $@ " in source/test at `date`"
+
+clean:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkEuler/GeomUtilsAMR.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkEuler/GeomUtilsAMR.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,351 @@
+/**************************************************************************
+ * Module:  GeomUtilsAMR
+ * Purpose: inline functions for the ale3d amr apps
+ ***************************************************************************/
+
+#ifndef __GeomUtilsAMR_h
+#define __GeomUtilsAMR_h
+
+//
+// calculate the volume of a hexahedral element
+//
+SAMRAI_INLINE_KEYWORD
+real8 UpwindVolume(
+   const real8 x0,
+   const real8 x1,
+   const real8 x2,
+   const real8 x3,
+   const real8 x4,
+   const real8 x5,
+   const real8 x6,
+   const real8 x7,
+   const real8 y0,
+   const real8 y1,
+   const real8 y2,
+   const real8 y3,
+   const real8 y4,
+   const real8 y5,
+   const real8 y6,
+   const real8 y7,
+   const real8 z0,
+   const real8 z1,
+   const real8 z2,
+   const real8 z3,
+   const real8 z4,
+   const real8 z5,
+   const real8 z6,
+   const real8 z7)
+{
+   const real8 twelfth = 1.0 / 12.0;
+   real8 volume, s1234, s5678, s1265, s4378, s2376, s1485;
+
+   s1234 =
+      (x1 + x2) * ((y0 + y1) * (z2 + z3) - (z0 + z1) * (y2 + y3))
+      + (y1 + y2) * ((z0 + z1) * (x2 + x3) - (x0 + x1) * (z2 + z3))
+      + (z1 + z2) * ((x0 + x1) * (y2 + y3) - (y0 + y1) * (x2 + x3));
+
+   s5678 =
+      (x5 + x6) * ((y4 + y5) * (z6 + z7) - (z4 + z5) * (y6 + y7))
+      + (y5 + y6) * ((z4 + z5) * (x6 + x7) - (x4 + x5) * (z6 + z7))
+      + (z5 + z6) * ((x4 + x5) * (y6 + y7) - (y4 + y5) * (x6 + x7));
+
+   s1265 =
+      (x1 + x5) * ((y0 + y1) * (z5 + z4) - (z0 + z1) * (y5 + y4))
+      + (y1 + y5) * ((z0 + z1) * (x5 + x4) - (x0 + x1) * (z5 + z4))
+      + (z1 + z5) * ((x0 + x1) * (y5 + y4) - (y0 + y1) * (x5 + x4));
+
+   s4378 =
+      (x2 + x6) * ((y3 + y2) * (z6 + z7) - (z3 + z2) * (y6 + y7))
+      + (y2 + y6) * ((z3 + z2) * (x6 + x7) - (x3 + x2) * (z6 + z7))
+      + (z2 + z6) * ((x3 + x2) * (y6 + y7) - (y3 + y2) * (x6 + x7));
+
+   s2376 =
+      (x2 + x6) * ((y1 + y2) * (z6 + z5) - (z1 + z2) * (y6 + y5))
+      + (y2 + y6) * ((z1 + z2) * (x6 + x5) - (x1 + x2) * (z6 + z5))
+      + (z2 + z6) * ((x1 + x2) * (y6 + y5) - (y1 + y2) * (x6 + x5));
+
+   s1485 =
+      (x3 + x7) * ((y0 + y3) * (z7 + z4) - (z0 + z3) * (y7 + y4))
+      + (y3 + y7) * ((z0 + z3) * (x7 + x4) - (x0 + x3) * (z7 + z4))
+      + (z3 + z7) * ((x0 + x3) * (y7 + y4) - (y0 + y3) * (x7 + x4));
+
+   volume = (s1234 - s5678 - s1265 + s4378 - s2376 + s1485) * twelfth;
+   return volume;
+}
+
+//
+// compute the area of a face
+//
+SAMRAI_INLINE_KEYWORD real8
+UpwindAreaFace(
+   const real8 x0,
+   const real8 x1,
+   const real8 x2,
+   const real8 x3,
+   const real8 y0,
+   const real8 y1,
+   const real8 y2,
+   const real8 y3,
+   const real8 z0,
+   const real8 z1,
+   const real8 z2,
+   const real8 z3)
+{
+   real8 fx = (x2 - x0) - (x3 - x1);
+   real8 fy = (y2 - y0) - (y3 - y1);
+   real8 fz = (z2 - z0) - (z3 - z1);
+   real8 gx = (x2 - x0) + (x3 - x1);
+   real8 gy = (y2 - y0) + (y3 - y1);
+   real8 gz = (z2 - z0) + (z3 - z1);
+   real8 area =
+      (fx * fx + fy * fy + fz * fz)
+      * (gx * gx + gy * gy + gz * gz)
+      - (fx * gx + fy * gy + fz * gz)
+      * (fx * gx + fy * gy + fz * gz);
+   return area;
+}
+
+//
+// compute a characteristic length
+//
+SAMRAI_INLINE_KEYWORD real8
+UpwindCharacteristicLength(
+   const real8 x[8],
+   const real8 y[8],
+   const real8 z[8],
+   const real8 volume)
+{
+   real8 a, charLength = 0.0;
+
+   a = UpwindAreaFace(x[0], x[1], x[2], x[3],
+         y[0], y[1], y[2], y[3],
+         z[0], z[1], z[2], z[3]);
+   charLength = MAX(a, charLength);
+
+   a = UpwindAreaFace(x[4], x[5], x[6], x[7],
+         y[4], y[5], y[6], y[7],
+         z[4], z[5], z[6], z[7]);
+   charLength = MAX(a, charLength);
+
+   a = UpwindAreaFace(x[0], x[1], x[5], x[4],
+         y[0], y[1], y[5], y[4],
+         z[0], z[1], z[5], z[4]);
+   charLength = MAX(a, charLength);
+
+   a = UpwindAreaFace(x[1], x[2], x[6], x[5],
+         y[1], y[2], y[6], y[5],
+         z[1], z[2], z[6], z[5]);
+   charLength = MAX(a, charLength);
+
+   a = UpwindAreaFace(x[2], x[3], x[7], x[6],
+         y[2], y[3], y[7], y[6],
+         z[2], z[3], z[7], z[6]);
+   charLength = MAX(a, charLength);
+
+   a = UpwindAreaFace(x[3], x[0], x[4], x[7],
+         y[3], y[0], y[4], y[7],
+         z[3], z[0], z[4], z[7]);
+   charLength = MAX(a, charLength);
+
+   charLength = 4.0 * volume / sqrt(charLength);
+
+   return charLength;
+}
+
+///
+/// the non-uniform grid monotonic slope finder
+///
+SAMRAI_INLINE_KEYWORD void my_slopes(
+   double psi,
+   double pim,
+   double pip,
+   double pjm,
+   double pjp,
+   double pkm,
+   double pkp,
+   double w_i,
+   double w_ip,
+   double w_im,
+   double w_jp,
+   double w_jm,
+   double w_kp,
+   double w_km,
+   double& pxi,
+   double& peta,
+   double& pzeta)
+{
+   real8 sumf, sumb;
+   real8 elDenm, elDenp, del, sfp, sbm, scale;
+
+   real8 elDenC = psi;
+   real8 scale_fact = 1.0;
+   real8 slope_fact = 1.0;
+
+   //
+   // compute weight functions
+   //
+   real8 volzrc = w_i;
+
+   real8 volzrxim = w_im;
+   real8 volzrxip = w_ip;
+   real8 volzretam = w_jm;
+   real8 volzretap = w_jp;
+   real8 volzrzetam = w_km;
+   real8 volzrzetap = w_kp;
+
+   sumf = volzrc + volzrxip;
+   sumb = volzrc + volzrxim;
+   real8 wgtxi1 = volzrc / sumf;
+   real8 wgtxi2 = volzrxip / sumf;
+   real8 wgtxi3 = volzrc / sumb;
+   real8 wgtxi4 = volzrxim / sumb;
+
+   sumf = volzrc + volzretap;
+   sumb = volzrc + volzretam;
+   real8 wgteta1 = volzrc / sumf;
+   real8 wgteta2 = volzretap / sumf;
+   real8 wgteta3 = volzrc / sumb;
+   real8 wgteta4 = volzretam / sumb;
+
+   sumf = volzrc + volzrzetap;
+   sumb = volzrc + volzrzetam;
+   real8 wgtzeta1 = volzrc / sumf;
+   real8 wgtzeta2 = volzrzetap / sumf;
+   real8 wgtzeta3 = volzrc / sumb;
+   real8 wgtzeta4 = volzrzetam / sumb;
+
+   elDenm = pim;
+   elDenp = pip;
+
+   del = (wgtxi2 * elDenp + wgtxi1 * elDenC
+          - wgtxi4 * elDenm - wgtxi3 * elDenC) + 1e-80;
+
+   sfp = (elDenp - elDenC) * scale_fact / del;
+   sbm = (elDenC - elDenm) * scale_fact / del;
+
+   scale = MIN(sfp, sbm);
+   if (scale > 1.)
+      scale = 1.0;
+   else if (scale < 0.)
+      scale = 0.;
+
+   if ((sfp * sbm) < 0.0) scale = 0.;
+
+   pxi = slope_fact * del * scale;
+
+   // --------------------------------- eta
+
+   elDenm = pjm;
+   elDenp = pjp;
+
+   del = (wgteta2 * elDenp + wgteta1 * elDenC
+          - wgteta4 * elDenm - wgteta3 * elDenC) + 1e-80;
+
+   sfp = (elDenp - elDenC) * scale_fact / del;
+   sbm = (elDenC - elDenm) * scale_fact / del;
+
+   scale = MIN(sfp, sbm);
+   if (scale > 1.)
+      scale = 1.0;
+   else if (scale < 0.)
+      scale = 0.;
+
+   if ((sfp * sbm) < 0.0) scale = 0.;
+
+   peta = slope_fact * del * scale;
+
+   // --------------------------------- zeta
+
+   elDenm = pkm;
+   elDenp = pkp;
+
+   del = (wgtzeta2 * elDenp + wgtzeta1 * elDenC
+          - wgtzeta4 * elDenm - wgtzeta3 * elDenC) + 1e-80;
+
+   sfp = (elDenp - elDenC) * scale_fact / del;
+   sbm = (elDenC - elDenm) * scale_fact / del;
+
+   scale = MIN(sfp, sbm);
+   if (scale > 1.)
+      scale = 1.0;
+   else if (scale < 0.)
+      scale = 0.;
+
+   if ((sfp * sbm) < 0.0) scale = 0.;
+
+   pzeta = slope_fact * del * scale;
+}
+
+///
+/// the cartesian uniform grid monotonic slope finder
+///
+SAMRAI_INLINE_KEYWORD void my_slopesCart(
+   double psi,
+   double pim,
+   double pip,
+   double pjm,
+   double pjp,
+   double pkm,
+   double pkp,
+   double& pxi,
+   double& peta,
+   double& pzeta)
+{
+   real8 del, sfp, sbm, scale;
+   real8 elDenp, elDenC, elDenm;
+   real8 sfact = 0.25;  // due to the fact that xi ranges from -1 to 1
+   elDenC = psi;
+
+   //
+   // xi
+   //
+   elDenp = pip;
+   elDenm = pim;
+
+   del = sfact * (elDenp - elDenm) + 1.e-80;
+   sfp = (elDenp - elDenC) * 2. / del;
+   sbm = (elDenC - elDenm) * 2. / del;
+
+   scale = MIN(sfp, sbm);
+   scale = (scale > 1.0 ? 1.0 : scale);
+   scale = (scale < 0.0 ? 0.0 : scale);
+   scale = (sfp * sbm < 0.0 ? 0.0 : scale);
+
+   pxi = del * scale;  // xi, eta, zeta vary from -1 to 1
+
+   //
+   // eta
+   //
+   elDenp = pjp;
+   elDenm = pjm;
+
+   del = sfact * (elDenp - elDenm) + 1.e-80;
+   sfp = (elDenp - elDenC) * 2. / del;
+   sbm = (elDenC - elDenm) * 2. / del;
+
+   scale = MIN(sfp, sbm);
+   scale = (scale > 1.0 ? 1.0 : scale);
+   scale = (scale < 0.0 ? 0.0 : scale);
+   scale = (sfp * sbm < 0.0 ? 0.0 : scale);
+
+   peta = del * scale;
+
+   //
+   // eta
+   //
+   elDenp = pkp;
+   elDenm = pkm;
+
+   del = sfact * (elDenp - elDenm) + 1.e-80;
+   sfp = (elDenp - elDenC) * 2. / del;
+   sbm = (elDenC - elDenm) * 2. / del;
+
+   scale = MIN(sfp, sbm);
+   scale = (scale > 1.0 ? 1.0 : scale);
+   scale = (scale < 0.0 ? 0.0 : scale);
+   scale = (sfp * sbm < 0.0 ? 0.0 : scale);
+
+   pzeta = del * scale;
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkEuler/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkEuler/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1500 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=MblkEuler.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementLevelStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryUtilityStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/BlockGridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/geom/BlockGridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingAlgorithm.I	\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingAlgorithm.h	\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingTagger.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDoubleLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDoubleLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h GeomUtilsAMR.h	\
+	MblkEuler.C MblkEuler.h MblkGeometry.h				\
+	MblkHyperbolicLevelIntegrator.h MblkHyperbolicPatchStrategy.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=MblkGeometry.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/BlockGridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/geom/BlockGridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	MblkGeometry.C MblkGeometry.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=MblkHyperbolicLevelIntegrator.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementLevelStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevelIterator.I	\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevelIterator.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingAlgorithm.I	\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingAlgorithm.h	\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingTagger.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	MblkHyperbolicLevelIntegrator.C MblkHyperbolicLevelIntegrator.h	\
+	MblkHyperbolicPatchStrategy.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=MblkHyperbolicPatchStrategy.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingAlgorithm.I	\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingAlgorithm.h	\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingTagger.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	MblkHyperbolicPatchStrategy.C MblkHyperbolicPatchStrategy.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
+FILE_4=Pointer-MblkHyperbolicLevelIntegrator.o
+DEPENDS_4:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementLevelStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingAlgorithm.I	\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingAlgorithm.h	\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingTagger.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	MblkHyperbolicLevelIntegrator.h MblkHyperbolicPatchStrategy.h	\
+	Pointer-MblkHyperbolicLevelIntegrator.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_4 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C
+endif
+
+${FILE_4:X.o=${NDIM}.o}: ${DEPENDS_4}
+
+FILE_5=bc_common.o
+DEPENDS_5:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h bc_common.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_5 +=\
+	
+endif
+
+${FILE_5:X.o=${NDIM}.o}: ${DEPENDS_5}
+
+FILE_6=boundaryconditions.o
+DEPENDS_6:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h boundaryconditions.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_6 +=\
+	
+endif
+
+${FILE_6:X.o=${NDIM}.o}: ${DEPENDS_6}
+
+FILE_7=main.o
+DEPENDS_7:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementIntegrator.I		\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementIntegrator.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementLevelStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryUtilityStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/BlockGridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/geom/BlockGridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BergerRigoutsos.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingAlgorithm.I	\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingAlgorithm.h	\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingTagger.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h MblkEuler.h	\
+	MblkGeometry.h MblkHyperbolicLevelIntegrator.h			\
+	MblkHyperbolicPatchStrategy.h main.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_7 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_7:X.o=${NDIM}.o}: ${DEPENDS_7}
+
+FILE_8=skelbdry.o
+DEPENDS_8:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h skelbdry.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_8 +=\
+	
+endif
+
+${FILE_8:X.o=${NDIM}.o}: ${DEPENDS_8}
+
+FILE_9=upfluxsum.o
+DEPENDS_9:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h upfluxsum.f
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_9 +=\
+	
+endif
+
+${FILE_9:X.o=${NDIM}.o}: ${DEPENDS_9}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkEuler/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkEuler/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,80 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for multiblock sample application 
+##
+#########################################################################
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/test/MblkEuler
+VPATH         = @srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+default:      check
+
+include $(OBJECT)/config/Makefile.config
+
+CPPFLAGS_EXTRA= -DNDIM=$(PDIM)  -DTESTING=1
+
+NUM_TESTS     = 1
+
+TEST_NPROCS   = @TEST_NPROCS@
+
+CXX_OBJS      = MblkGeometry.o main.o MblkEuler.o MblkHyperbolicLevelIntegrator.o \
+                MblkHyperbolicPatchStrategy.o Pointer-MblkHyperbolicLevelIntegrator.o
+
+F_OBJS      = upfluxsum.o boundaryconditions.o
+
+main:	$(CXX_OBJS) $(F_OBJS) $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) $(F_OBJS) \
+	$(LIBSAMRAI) $(LDLIBS) -o $@
+
+check:
+	$(MAKE) check3d
+
+check3d:	main
+	@for i in test_inputs/*.3d.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+examples3d: main
+	@for i in test_inputs/*.3d.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+examples:
+	$(MAKE) examples3d	
+
+checkcompile: main
+
+checktest:
+	rm -f makecheck.logfile
+	$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+	$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+	rm -f makecheck.logfile
+
+clean-check:
+	$(SAMCLEAN)
+
+clean: 
+	$(SAMCLEAN)
+	$(RM) *.f main viz*
+
+redo: 
+	$(RM) main
+
+include $(SRCDIR)/Makefile.depend
+
+boundaryconditions.o:	$(SRCDIR)/boundaryconditions.f $(SRCDIR)/bc_common.f
+	$(F77) $(FFLAGS) -c $(SRCDIR)/boundaryconditions.f -o $@
+
+upfluxsum.o:	$(SRCDIR)/upfluxsum.f
+	$(F77) $(FFLAGS) -c $(SRCDIR)/upfluxsum.f -o $@
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkEuler/MblkEuler.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkEuler/MblkEuler.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,3201 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Template for a multiblock AMR Euler code 
+ *
+ ************************************************************************/
+#include "MblkEuler.h"
+
+#include <iostream>
+#include <iomanip>
+#include <fstream>
+
+#ifndef LACKS_SSTREAM
+#ifndef included_sstream
+#define included_sstream
+#include <sstream>
+#endif
+#else
+#ifndef included_strstream
+#define included_strstream
+#include <strstream.h>
+#endif
+#endif
+
+using namespace std;
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+#include <float.h>
+
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "SAMRAI/pdat/CellDoubleLinearTimeInterpolateOp.h"
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/geom/BlockGridGeometry.h"
+#include "SAMRAI/hier/BlockPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeDoubleLinearTimeInterpolateOp.h"
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+#include "SAMRAI/appu/CartesianBoundaryDefines.h"  // defines flags used by the boundingBox data
+
+// Number of ghosts cells used for each variable quantity
+#define CELLG (1)
+#define FLUXG (0)
+#define NODEG (1)
+
+// defines for cell tagging routines
+#ifndef TRUE
+#define TRUE (1)
+#endif
+#ifndef FALSE
+#define FALSE (0)
+#endif
+
+// Version of MblkEuler restart file data
+#define MBLKEULER_VERSION (3)
+
+//
+// some extra defines for C code
+//
+#define real8 double
+#define POLY3(i, j, k, imin, jmin, kmin, nx, \
+              nxny) ((i - imin) + (j - jmin) * (nx) + (k - kmin) * (nxny))
+#define MAX(a, b) (a > b ? a : b)
+#define MIN(a, b) (a < b ? a : b)
+
+//
+// inline geometry functions
+//
+#include "GeomUtilsAMR.h"
+
+// ================================= MblkEuler::Initialization =============================
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The constructor for MblkEuler class sets data members to defualt values, *
+ * creates variables that define the solution state for the linear       *
+ * advection equation.
+ *                                                                       *
+ * After default values are set, this routine calls getFromRestart()     *
+ * if execution from a restart file is specified.  Finally,              *
+ * getFromInput() is called to read values from the given input          *
+ * database (potentially overriding those found in the restart file).    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+MblkEuler::MblkEuler(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> input_db,
+   tbox::Array<tbox::Pointer<hier::GridGeometry> >& grid_geoms):
+   MblkHyperbolicPatchStrategy(dim),
+   d_dim(dim),
+   d_nghosts(hier::IntVector(d_dim, CELLG)),
+   d_fluxghosts(hier::IntVector(d_dim, FLUXG)),
+   d_nodeghosts(hier::IntVector(d_dim, NODEG))
+{
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!input_db.isNull());
+   TBOX_ASSERT(grid_geoms.getSize() > 0);
+
+   d_object_name = object_name;
+   tbox::RestartManager::getManager()->registerRestartItem(d_object_name, this);
+
+   d_grid_geometries = grid_geoms;
+
+   //
+   // Setup MblkGeometry object to manage construction of mapped grids
+   //
+   d_mblk_geometry = new MblkGeometry("MblkGeometry",
+         d_dim,
+         input_db,
+         grid_geoms.getSize());
+
+   d_use_nonuniform_workload = false;
+
+   tbox::Pointer<tbox::Database> mbe_db = input_db->getDatabase("MblkEuler");
+
+   //
+   // Default parameters for the numerical method.
+   //
+
+   //
+   // zero out initial condition variables
+   //
+   tbox::MathUtilities<double>::setArrayToSignalingNaN(d_center, d_dim.getValue());
+   tbox::MathUtilities<double>::setArrayToSignalingNaN(d_axis, d_dim.getValue());
+
+   d_front_position.resizeArray(0);
+
+   d_rev_rad.resizeArray(0);
+   d_rev_axis.resizeArray(0);
+
+   d_amn.resizeArray(0);
+   d_m_mode.resizeArray(0);
+   d_n_mode.resizeArray(0);
+   d_phiy.resizeArray(0);
+   d_phiz.resizeArray(0);
+
+   //
+   // Initialize object with data read from given input/restart databases.
+   //
+   bool is_from_restart = tbox::RestartManager::getManager()->isFromRestart();
+   if (is_from_restart) {
+      getFromRestart();
+   }
+   getFromInput(input_db, is_from_restart);
+
+   //
+   // quantities that define state of linear advection problem.
+   //
+   d_state = new pdat::CellVariable<double>(dim, "state", d_nState);
+   d_vol = new pdat::CellVariable<double>(dim, "vol", 1);
+   d_flux = new pdat::SideVariable<double>(dim, "flux", d_nState);
+   d_xyz = new pdat::NodeVariable<double>(dim, "xyz", d_dim.getValue());
+
+   //
+   // drop the region layout as a table
+   //
+   tbox::plog << "region layout follows:" << endl;
+
+   tbox::plog << "field";
+   for (int ir = 0; ir < d_number_of_regions; ir++)
+      tbox::plog << "\t" << ir;
+   tbox::plog << endl;
+
+   for (int ii = 0; ii < d_number_of_regions * 10; ii++)
+      tbox::plog << "-";
+   tbox::plog << endl;
+
+   for (int istate = 0; istate < d_nState; istate++) {
+      tbox::plog << d_state_names[istate];
+      for (int ir = 0; ir < d_number_of_regions; ir++)
+         tbox::plog << "\t" << d_state_ic[ir][istate];
+      tbox::plog << endl;
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Empty destructor for MblkEuler class.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+MblkEuler::~MblkEuler() {
+   if (d_mblk_geometry) delete d_mblk_geometry;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register conserved variable (u) (i.e., solution state variable) and   *
+ * flux variable with hyperbolic integrator that manages storage for     *
+ * those quantities.  Also, register plot data with Vizamrai or VisIt.   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkEuler::registerModelVariables(
+   MblkHyperbolicLevelIntegrator* integrator)
+{
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(integrator != (MblkHyperbolicLevelIntegrator *)NULL);
+#endif
+
+   //
+   // zonal data and its fluxes
+   //
+   d_cell_time_interp_op =
+      new pdat::CellDoubleLinearTimeInterpolateOp();
+
+   integrator->registerVariable(d_state, d_nghosts,
+      MblkHyperbolicLevelIntegrator::TIME_DEP,
+      SAMRAI::tbox::Pointer<SAMRAI::xfer::CoarsenOperator>(NULL),
+      SAMRAI::tbox::Pointer<SAMRAI::xfer::RefineOperator>(NULL),
+      d_cell_time_interp_op);
+
+   integrator->registerVariable(d_vol, d_nghosts,
+      MblkHyperbolicLevelIntegrator::TIME_DEP,
+      SAMRAI::tbox::Pointer<SAMRAI::xfer::CoarsenOperator>(NULL),
+      SAMRAI::tbox::Pointer<SAMRAI::xfer::RefineOperator>(NULL),
+      d_cell_time_interp_op);
+
+   integrator->registerVariable(d_flux, d_fluxghosts,
+      MblkHyperbolicLevelIntegrator::FLUX,
+      SAMRAI::tbox::Pointer<SAMRAI::xfer::CoarsenOperator>(NULL));
+
+   //
+   // The nodal position data
+   //
+   tbox::Pointer<xfer::TimeInterpolateOperator> node_time_interp_op(
+      new pdat::NodeDoubleLinearTimeInterpolateOp());
+
+   integrator->registerVariable(d_xyz, d_nodeghosts,
+      MblkHyperbolicLevelIntegrator::TIME_DEP,
+      SAMRAI::tbox::Pointer<SAMRAI::xfer::CoarsenOperator>(NULL),
+      SAMRAI::tbox::Pointer<SAMRAI::xfer::RefineOperator>(NULL),
+      node_time_interp_op);
+
+   hier::VariableDatabase* vardb = hier::VariableDatabase::getDatabase();
+
+#ifdef HAVE_HDF5
+   if (d_visit_writer.isNull()) {
+      TBOX_WARNING(
+         d_object_name << ": registerModelVariables()"
+         << "\nVisit data writer was"
+         <<
+         "\nregistered.  Consequently, no plot data will"
+         << "\nbe written." << endl);
+   }
+
+   for (int n = 0; n < d_nState; n++) {
+      string vname = d_state_names[n];
+      d_visit_writer->registerPlotQuantity(vname, "SCALAR",
+         vardb->mapVariableAndContextToIndex(d_state,
+            integrator->getPlotContext()),
+         n);
+   }
+
+   d_visit_writer->registerPlotQuantity("vol", "SCALAR",
+      vardb->mapVariableAndContextToIndex(d_vol, integrator->getPlotContext()));
+
+   d_visit_writer->registerNodeCoordinates(vardb->mapVariableAndContextToIndex(
+         d_xyz, integrator->getPlotContext()));
+#endif
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set initial data for solution variables on patch interior.            *
+ * This routine is called whenever a new patch is introduced to the      *
+ * AMR patch hierarchy.  Note that the routine does nothing unless       *
+ * we are at the initial time.  In all other cases, conservative         *
+ * interpolation from coarser levels and copies from patches at the      *
+ * same mesh resolution are sufficient to set data.                      *
+ *                                                                       *
+ *************************************************************************
+ */
+void MblkEuler::initializeDataOnPatch(
+   hier::Patch& patch,
+   const double data_time,
+   const bool initial_time)
+{
+   NULL_USE(data_time);
+
+   //
+   // Build the mapped grid on the patch.
+   //
+   int block_number = getBlockNumber();
+   setMappedGridOnPatch(patch, block_number);
+
+   if (initial_time) {
+
+      tbox::Pointer<pdat::CellData<double> > state = patch.getPatchData(d_state,
+            getDataContext());
+      tbox::Pointer<pdat::CellData<double> > vol = patch.getPatchData(d_vol,
+            getDataContext());
+      tbox::Pointer<pdat::NodeData<double> > xyz = patch.getPatchData(d_xyz,
+            getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!state.isNull());
+      TBOX_ASSERT(!vol.isNull());
+      TBOX_ASSERT(!xyz.isNull());
+      TBOX_ASSERT(state->getGhostCellWidth() == vol->getGhostCellWidth());
+#endif
+
+      hier::IntVector state_ghosts = state->getGhostCellWidth();
+      hier::IntVector xyz_ghosts = xyz->getGhostCellWidth();
+
+      const hier::Index ifirst = patch.getBox().lower();
+      const hier::Index ilast = patch.getBox().upper();
+
+      int imin = ifirst(0) - state_ghosts(0);
+      int imax = ilast(0) + state_ghosts(0);
+      int jmin = ifirst(1) - state_ghosts(1);
+      int jmax = ilast(1) + state_ghosts(1);
+      int kmin = ifirst(2) - state_ghosts(2);
+      int kmax = ilast(2) + state_ghosts(2);
+      int nx = imax - imin + 1;
+      int ny = jmax - jmin + 1;
+      int nxny = nx * ny;
+
+      int nd_imin = ifirst(0) - xyz_ghosts(0);
+      int nd_imax = ilast(0) + 1 + xyz_ghosts(0);
+      int nd_jmin = ifirst(1) - xyz_ghosts(1);
+      int nd_jmax = ilast(1) + 1 + xyz_ghosts(1);
+      int nd_kmin = ifirst(2) - xyz_ghosts(2);
+      int nd_nx = nd_imax - nd_imin + 1;
+      int nd_ny = nd_jmax - nd_jmin + 1;
+      int nd_nxny = nd_nx * nd_ny;
+
+      //
+      // get the pointers
+      //
+      double* cvol = vol->getPointer();
+
+      double* x = xyz->getPointer(0);
+      double* y = xyz->getPointer(1);
+      double* z = xyz->getPointer(2);
+
+      hier::IntVector ghost_cells = state->getGhostCellWidth();
+      pdat::CellData<double> elemCoords(patch.getBox(), 3, ghost_cells);         // storage for the average of the element coordinates
+      pdat::CellData<int> region_ids_data(patch.getBox(), 1, ghost_cells);       // storage for the slopes
+
+      int* region_ids = region_ids_data.getPointer();
+      double* xc = elemCoords.getPointer(0);
+      double* yc = elemCoords.getPointer(1);
+      double* zc = elemCoords.getPointer(2);
+
+      //
+      //  ---------------- compute the element coordinates
+      //
+      for (int k = kmin; k <= kmax; k++) {
+         for (int j = jmin; j <= jmax; j++) {
+            for (int i = imin; i <= imax; i++) {
+               int ind = POLY3(i, j, k, imin, jmin, kmin, nx, nxny);
+
+               int n1 = POLY3(i,
+                     j,
+                     k,
+                     nd_imin,
+                     nd_jmin,
+                     nd_kmin,
+                     nd_nx,
+                     nd_nxny);
+               int n2 = n1 + 1;
+               int n3 = n1 + 1 + nd_nx;
+               int n4 = n1 + nd_nx;
+
+               int n5 = n1 + nd_nxny;
+               int n6 = n1 + nd_nxny + 1;
+               int n7 = n1 + nd_nxny + 1 + nd_nx;
+               int n8 = n1 + nd_nxny + nd_nx;
+
+               double xavg = 0.125 * (x[n1] + x[n2] + x[n3] + x[n4]
+                                      + x[n5] + x[n6] + x[n7] + x[n8]);
+
+               double yavg = 0.125 * (y[n1] + y[n2] + y[n3] + y[n4]
+                                      + y[n5] + y[n6] + y[n7] + y[n8]);
+
+               double zavg = 0.125 * (z[n1] + z[n2] + z[n3] + z[n4]
+                                      + z[n5] + z[n6] + z[n7] + z[n8]);
+               xc[ind] = xavg;
+               yc[ind] = yavg;
+               zc[ind] = zavg;
+            }
+         }
+      }
+
+      //
+      //  ---------------- compute the element volume
+      //
+      for (int k = ifirst(2); k <= ilast(2); k++) {
+         for (int j = ifirst(1); j <= ilast(1); j++) {
+            for (int i = ifirst(0); i <= ilast(0); i++) {
+
+               int cind = POLY3(i, j, k, imin, jmin, kmin, nx, nxny);
+
+               int n1 = POLY3(i,
+                     j,
+                     k,
+                     nd_imin,
+                     nd_jmin,
+                     nd_kmin,
+                     nd_nx,
+                     nd_nxny);
+               int n2 = n1 + 1;
+               int n3 = n1 + 1 + nd_nx;
+               int n4 = n1 + nd_nx;
+
+               int n5 = n1 + nd_nxny;
+               int n6 = n1 + nd_nxny + 1;
+               int n7 = n1 + nd_nxny + 1 + nd_nx;
+               int n8 = n1 + nd_nxny + nd_nx;
+
+               double lvol = UpwindVolume(x[n1], x[n2], x[n3], x[n4],
+                     x[n5], x[n6], x[n7], x[n8],
+
+                     y[n1], y[n2], y[n3], y[n4],
+                     y[n5], y[n6], y[n7], y[n8],
+
+                     z[n1], z[n2], z[n3], z[n4],
+                     z[n5], z[n6], z[n7], z[n8]);
+
+               cvol[cind] = lvol;
+            }
+         }
+      }
+
+      //
+      //  ---------------- process the different initialization regions
+      //
+      if (d_data_problem == "REVOLUTION") {
+
+         for (int m = 0; m < d_number_of_regions; m++) {    // loop over the regions and shape in data
+
+            tbox::Array<double>& lrad = d_rev_rad[m];
+            tbox::Array<double>& laxis = d_rev_axis[m];
+            int naxis = laxis.getSize();
+
+            for (int k = kmin; k <= kmax; k++) {
+               for (int j = jmin; j <= jmax; j++) {
+                  for (int i = imin; i <= imax; i++) {
+                     int ind = POLY3(i, j, k, imin, jmin, kmin, nx, nxny);
+
+                     double x2 = zc[ind] - d_center[2];
+                     double x1 = yc[ind] - d_center[1];
+                     double x0 = xc[ind] - d_center[0];
+
+                     double Dz = x0 * d_axis[0] + x1 * d_axis[1] + x2
+                        * d_axis[2];
+                     double r2 = x0 * x0 + x1 * x1 + x2 * x2;
+                     double Dr = sqrt(r2 - Dz * Dz);
+
+                     if (laxis[0] <= Dz && Dz <= laxis[naxis - 1]) { // test to see if we are contained
+
+                        int lpos = 0;
+                        while (Dz > laxis[lpos])
+                           lpos++;
+
+                        double a =
+                           (Dz
+                            - laxis[lpos - 1]) / (laxis[lpos] - laxis[lpos - 1]);
+                        double lr = (a) * lrad[lpos]
+                           + (1.0 - a) * lrad[lpos - 1];
+
+                        if (Dr <= lr) { // if we are within the radius set the region id
+                           region_ids[ind] = m;
+                        }
+
+                     } // laxis
+
+                  }
+               }
+            } // k
+
+         } // end of region loop
+      }
+      //
+      //  the spherical initialization
+      //
+      else if (d_data_problem == "SPHERE") {
+         double zero = 0.0;
+         double angle = 0.0;
+         double* front = d_front_position.getPointer();
+         for (int k = kmin; k <= kmax; k++) {
+            for (int j = jmin; j <= jmax; j++) {
+               for (int i = imin; i <= imax; i++) {
+                  int ind = POLY3(i, j, k, imin, jmin, kmin, nx, nxny);
+
+                  double x2 = zc[ind] - d_center[2];
+                  double x1 = yc[ind] - d_center[1];
+                  double x0 = xc[ind] - d_center[0];
+
+                  if (x1 == zero && x0 == zero) {
+                     angle = zero;
+                  } else {
+                     angle = atan2(x1, x0);
+                  }
+
+                  double rad2 = sqrt(x0 * x0 + x1 * x1);
+                  // double phi  = atan2(rad2,x2);
+                  double rad3 = sqrt(rad2 * rad2 + x2 * x2);
+
+                  int ifr = 0;  // find the region we draw from (ifr=0 is always origin)
+                  while (rad3 > front[ifr + 1]) {
+                     ifr++;
+                  }
+                  region_ids[ind] = ifr;
+               }
+            }
+         }
+      }
+      //
+      //  the planar initialization
+      //
+      else if ((d_data_problem == "PIECEWISE_CONSTANT_X")
+               || (d_data_problem == "PIECEWISE_CONSTANT_Y")
+               || (d_data_problem == "PIECEWISE_CONSTANT_Z")) {
+
+         double* front = d_front_position.getPointer();
+         double* xx = xc;
+         if (d_data_problem == "PIECEWISE_CONSTANT_Y") {
+            xx = yc;
+         }
+         if (d_data_problem == "PIECEWISE_CONSTANT_Z") {
+            xx = zc;
+         }
+
+         for (int k = kmin; k <= kmax; k++) {
+            for (int j = jmin; j <= jmax; j++) {
+               for (int i = imin; i <= imax; i++) {
+                  int ind = POLY3(i, j, k, imin, jmin, kmin, nx, nxny);
+
+                  int ifr = 0;   // the geion we are in
+                  while (xx[ind] > front[ifr + 1]) {
+                     ifr++;
+                  }
+                  region_ids[ind] = ifr;
+               }
+            }
+         }
+      }
+      //
+      //  the planar initialization
+      //
+      else if ((d_data_problem == "RT_SHOCK_TUBE")) {
+
+         double* front = d_front_position.getPointer();
+         double shock_pos = front[1]; // the shock front
+         double front_pos = front[2]; // the sinusoidal perturbation between the two fluids
+
+         double dt_ampl = d_dt_ampl;
+         int nmodes = d_amn.getSize();
+         double* amn = d_amn.getPointer();
+         double* n_mode = d_n_mode.getPointer();
+         double* m_mode = d_m_mode.getPointer();
+         double* phiy = d_phiy.getPointer();
+         double* phiz = d_phiz.getPointer();
+
+         // ... this is a cartesian problem by definition
+         const double* xdlo = 0;  // d_cart_xlo[0][0];
+         const double* xdhi = 0;  // d_cart_xhi[0][0];
+         TBOX_ASSERT(0);  // xdlo, xdhi wrong
+
+         double l_y = xdhi[1] - xdlo[1];      // width of the domain in y and z
+         double l_z = xdhi[2] - xdlo[2];
+         double lpi = 3.14159265358979310862446895044;
+
+         for (int k = kmin; k <= kmax; k++) {
+            for (int j = jmin; j <= jmax; j++) {
+               for (int i = imin; i <= imax; i++) {
+                  int ind = POLY3(i, j, k, imin, jmin, kmin, nx, nxny);
+
+                  double lpert = 0.0;
+                  double ly = yc[ind];
+                  double lz = zc[ind];
+                  for (int m = 0; m < nmodes; m++) {
+                     double lphiy = 2.0 * lpi * n_mode[m] * ly / l_y + phiy[m];
+                     double lphiz = 2.0 * lpi * m_mode[m] * lz / l_z + phiz[m];
+                     double cy = cos(lphiy);
+                     double cz = cos(lphiz);
+                     lpert += amn[m] * cy * cz;
+                  }
+                  lpert *= dt_ampl;
+
+                  int ifr = 0;
+                  if (xc[ind] > shock_pos)
+                     ifr = 1;
+                  if (xc[ind] > front_pos + lpert)
+                     ifr = 2;
+
+                  region_ids[ind] = ifr;
+               }
+            }
+         }
+      } else if (d_data_problem == "BLIP") {
+         TBOX_ASSERT(0);
+      }
+
+      //
+      // ---------------- state vector
+      //
+      int depth = state->getDepth();
+
+      for (int idepth = 0; idepth < depth; idepth++) {
+         double* psi = state->getPointer(idepth);
+
+         for (int k = ifirst(2); k <= ilast(2); k++) {
+            for (int j = ifirst(1); j <= ilast(1); j++) {
+               for (int i = ifirst(0); i <= ilast(0); i++) {
+
+                  int cind = POLY3(i, j, k, imin, jmin, kmin, nx, nxny);
+#if 0
+                  // psi[cind] = (double) i;  // set values to coordinate ids as debug tool
+                  // psi[cind] = (double) j;
+                  // psi[cind] = (double) k;
+#endif
+#if 1
+                  int ireg = region_ids[cind];
+                  psi[cind] = d_state_ic[ireg][idepth];
+#endif
+               }
+            }
+         }
+
+      } // end of depth loop
+
+   } // end of initial time if test
+
+   if (d_use_nonuniform_workload) {
+      if (!patch.checkAllocated(d_workload_data_id)) {
+         patch.allocatePatchData(d_workload_data_id);
+      }
+      tbox::Pointer<pdat::CellData<double> > workload_data =
+         patch.getPatchData(d_workload_data_id);
+      workload_data->fillAll(1.0);
+   }
+
+}
+
+// ================================= MblkEuler::Integration =============================
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute stable time increment for patch.  Return this value.          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double MblkEuler::computeStableDtOnPatch(
+   hier::Patch& patch,
+   const bool initial_time,
+   const double dt_time)
+{
+   (void)initial_time;
+   (void)dt_time;
+
+   //
+   // Build the mapped grid on the patch.
+   //
+   int block_number = getBlockNumber();
+   int level_number = patch.getPatchLevelNumber();
+   setMappedGridOnPatch(patch, block_number);
+
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+
+   tbox::plog << "--------------------- start stableDtOnPatch on patch ("
+              << level_number << ")" << endl;
+   tbox::plog << "level = " << level_number << endl;
+   tbox::plog << "box   = " << patch.getBox() << endl;
+
+   //
+   // get the cell data and their bounds
+   //
+   tbox::Pointer<pdat::CellData<double> > state = patch.getPatchData(d_state,
+         getDataContext());
+   tbox::Pointer<pdat::NodeData<double> > xyz = patch.getPatchData(d_xyz,
+         getDataContext());
+   hier::IntVector state_ghosts = state->getGhostCellWidth();
+   hier::IntVector xyz_ghosts = xyz->getGhostCellWidth();
+
+   pdat::CellData<double> Aii(patch.getBox(), 9, hier::IntVector(d_dim, 0));
+
+   TBOX_ASSERT(!state.isNull());
+   TBOX_ASSERT(!xyz.isNull());
+
+   int imin = ifirst(0);
+   int imax = ilast(0);
+   int jmin = ifirst(1);
+   int jmax = ilast(1);
+   int kmin = ifirst(2);
+   int nx = imax - imin + 1;
+   int ny = jmax - jmin + 1;
+   int nxny = nx * ny;
+
+   int nd_imin = ifirst(0) - xyz_ghosts(0);
+   int nd_imax = ilast(0) + 1 + xyz_ghosts(0);
+   int nd_jmin = ifirst(1) - xyz_ghosts(1);
+   int nd_jmax = ilast(1) + 1 + xyz_ghosts(1);
+   int nd_kmin = ifirst(2) - xyz_ghosts(2);
+   int nd_nx = nd_imax - nd_imin + 1;
+   int nd_ny = nd_jmax - nd_jmin + 1;
+   int nd_nxny = nd_nx * nd_ny;
+
+   double* x = xyz->getPointer(0);
+   double* y = xyz->getPointer(1);
+   double* z = xyz->getPointer(2);
+
+   int pind = 0;
+   double* a11 = Aii.getPointer(pind);
+   pind++;
+   double* a12 = Aii.getPointer(pind);
+   pind++;
+   double* a13 = Aii.getPointer(pind);
+   pind++;
+   double* a21 = Aii.getPointer(pind);
+   pind++;
+   double* a22 = Aii.getPointer(pind);
+   pind++;
+   double* a23 = Aii.getPointer(pind);
+   pind++;
+   double* a31 = Aii.getPointer(pind);
+   pind++;
+   double* a32 = Aii.getPointer(pind);
+   pind++;
+   double* a33 = Aii.getPointer(pind);
+   pind++;
+
+   //
+   // compute direction cosines
+   //
+   for (int k = ifirst(2); k <= ilast(2); k++) {
+      for (int j = ifirst(1); j <= ilast(1); j++) {
+         for (int i = ifirst(0); i <= ilast(0); i++) {
+
+            int ind = POLY3(i, j, k, imin, jmin, kmin, nx, nxny);
+
+            int n1 = POLY3(i, j, k, nd_imin, nd_jmin, nd_kmin, nd_nx, nd_nxny);
+            int n2 = n1 + 1;
+            int n3 = n1 + 1 + nd_nx;
+            int n4 = n1 + nd_nx;
+
+            int n5 = n1 + nd_nxny;
+            int n6 = n1 + nd_nxny + 1;
+            int n7 = n1 + nd_nxny + 1 + nd_nx;
+            int n8 = n1 + nd_nxny + nd_nx;
+
+            // ------------------------------------------------ x
+
+            double x1 = 0.25 * (x[n1] + x[n4] + x[n5] + x[n8]);  // xi
+            double x2 = 0.25 * (x[n2] + x[n3] + x[n6] + x[n7]);
+
+            double x3 = 0.25 * (x[n1] + x[n2] + x[n5] + x[n6]);  // eta
+            double x4 = 0.25 * (x[n3] + x[n4] + x[n7] + x[n8]);
+
+            double x5 = 0.25 * (x[n1] + x[n2] + x[n3] + x[n4]);  // zeta
+            double x6 = 0.25 * (x[n5] + x[n6] + x[n7] + x[n8]);
+
+            // ------------------------------------------------ y
+
+            double y1 = 0.25 * (y[n1] + y[n4] + y[n5] + y[n8]);
+            double y2 = 0.25 * (y[n2] + y[n3] + y[n6] + y[n7]);
+
+            double y3 = 0.25 * (y[n1] + y[n2] + y[n5] + y[n6]);
+            double y4 = 0.25 * (y[n3] + y[n4] + y[n7] + y[n8]);
+
+            double y5 = 0.25 * (y[n1] + y[n2] + y[n3] + y[n4]);
+            double y6 = 0.25 * (y[n5] + y[n6] + y[n7] + y[n8]);
+
+            // ------------------------------------------------ z
+
+            double z1 = 0.25 * (z[n1] + z[n4] + z[n5] + z[n8]);
+            double z2 = 0.25 * (z[n2] + z[n3] + z[n6] + z[n7]);
+
+            double z3 = 0.25 * (z[n1] + z[n2] + z[n5] + z[n6]);
+            double z4 = 0.25 * (z[n3] + z[n4] + z[n7] + z[n8]);
+
+            double z5 = 0.25 * (z[n1] + z[n2] + z[n3] + z[n4]);
+            double z6 = 0.25 * (z[n5] + z[n6] + z[n7] + z[n8]);
+
+            //
+            // the components of the matrices that we want to invert
+            //
+            double dx_xi = 0.5 * (x2 - x1);
+            double dy_xi = 0.5 * (y2 - y1);
+            double dz_xi = 0.5 * (z2 - z1);
+
+            double dx_eta = 0.5 * (x4 - x3);
+            double dy_eta = 0.5 * (y4 - y3);
+            double dz_eta = 0.5 * (z4 - z3);
+
+            double dx_zeta = 0.5 * (x6 - x5);
+            double dy_zeta = 0.5 * (y6 - y5);
+            double dz_zeta = 0.5 * (z6 - z5);
+
+            //
+            // invert M = dx/dxi to find the matrix needed to convert
+            // displacements in x into displacements in xi (dxi/dx)
+            // via kramer's rule
+            //
+            double detM = (dx_xi * dy_eta * dz_zeta
+                           + dx_eta * dy_zeta * dz_xi
+                           + dx_zeta * dy_xi * dz_eta
+                           - dx_zeta * dy_eta * dz_xi
+                           - dx_eta * dy_xi * dz_zeta
+                           - dx_xi * dy_zeta * dz_eta);
+
+            double detB11 = dy_eta * dz_zeta - dy_zeta * dz_eta;
+            double detB21 = dy_zeta * dz_xi - dy_xi * dz_zeta;
+            double detB31 = dy_xi * dz_eta - dy_eta * dz_xi;
+
+            double detB12 = dx_zeta * dz_eta - dx_eta * dz_zeta;
+            double detB22 = dx_xi * dz_zeta - dx_zeta * dz_xi;
+            double detB32 = dx_eta * dz_xi - dx_xi * dz_eta;
+
+            double detB13 = dx_eta * dy_zeta - dx_zeta * dy_eta;
+            double detB23 = dx_zeta * dy_xi - dx_xi * dy_zeta;
+            double detB33 = dx_xi * dy_eta - dx_eta * dy_xi;
+
+            a11[ind] = detB11 / detM;
+            a21[ind] = detB21 / detM;
+            a31[ind] = detB31 / detM;
+
+            a12[ind] = detB12 / detM;
+            a22[ind] = detB22 / detM;
+            a32[ind] = detB32 / detM;
+
+            a13[ind] = detB13 / detM;
+            a23[ind] = detB23 / detM;
+            a33[ind] = detB33 / detM;
+         }
+      }
+   }
+
+   //
+   // print out patch extrema
+   //
+   testPatchExtrema(patch, "before timestep evaluation");
+
+   //
+   // the timestep evaluation
+   //
+   double stabdt = 1.e20;
+   if (d_advection_test) {
+      // ------------------------------------- for linear advection
+      double u = d_advection_velocity[0];
+      double v = d_advection_velocity[1];
+      double w = d_advection_velocity[2];
+
+      for (int k = ifirst(2); k <= ilast(2); k++) {
+         for (int j = ifirst(1); j <= ilast(1); j++) {
+            for (int i = ifirst(0); i <= ilast(0); i++) {
+               int ind = POLY3(i, j, k, imin, jmin, kmin, nx, nxny);
+
+               double uxi = a11[ind] * u + a12[ind] * v + a13[ind] * w;  // max parametric signal speed
+               double ueta = a21[ind] * u + a22[ind] * v + a23[ind] * w;
+               double uzeta = a31[ind] * u + a32[ind] * v + a33[ind] * w;
+
+               uxi = fabs(uxi);
+               ueta = fabs(ueta);
+               uzeta = fabs(uzeta);
+
+               double dtxi = 2.0 / MAX(1.e-80, uxi);
+               double dteta = 2.0 / MAX(1.e-80, ueta);
+               double dtzeta = 2.0 / MAX(1.e-80, uzeta);
+
+               double ldelt = MIN(dtxi, MIN(dteta, dtzeta));
+               stabdt = MIN(stabdt, ldelt);
+
+            }
+         }
+      }
+   } else {
+      TBOX_ASSERT(d_advection_test);
+   }
+
+   //
+   // process the timestep constraints
+   //
+   double dt_fixed = -1;
+   double returned_dt = stabdt;
+   if (dt_fixed > 0.0)
+      returned_dt = dt_fixed;
+
+   tbox::plog << "stabdt      = " << stabdt << endl;
+   tbox::plog << "dt_fixed    = " << dt_fixed << endl;
+   tbox::plog << "returned_dt = " << returned_dt << endl;
+
+   tbox::plog << "--------------------- end stableDtOnPatch on patch" << endl;
+
+   return returned_dt;
+}
+
+// ---------------------------------------------------------------------------
+
+//
+// Test the extrema on the patch
+//
+void MblkEuler::testPatchExtrema(
+   hier::Patch& patch,
+   const char* pos)
+{
+   tbox::Pointer<pdat::CellData<double> > state = patch.getPatchData(d_state,
+         getDataContext());
+   hier::IntVector state_ghosts = state->getGhostCellWidth();
+
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+
+   int imgn = ifirst(0) - state_ghosts(0);
+   int imgx = ilast(0) + state_ghosts(0);
+   int jmgn = ifirst(1) - state_ghosts(1);
+   int jmgx = ilast(1) + state_ghosts(1);
+   int kmgn = ifirst(2) - state_ghosts(2);
+   int nxg = imgx - imgn + 1;
+   int nyg = jmgx - jmgn + 1;
+   int nxnyg = nxg * nyg;
+
+   //
+   //  compute field extrema to tag along with this and print out
+   //
+   double* psi_min = new double[d_nState];
+   double* psi_max = new double[d_nState];
+   for (int ii = 0; ii < d_nState; ii++) {
+      psi_max[ii] = -1.e80;
+      psi_min[ii] = 1.e80;
+   }
+
+   for (int ii = 0; ii < d_nState; ii++) {
+      double* lstate = state->getPointer(ii);
+
+      for (int k = ifirst(2); k <= ilast(2); k++) {     // just loop over interior elements
+         for (int j = ifirst(1); j <= ilast(1); j++) {
+            for (int i = ifirst(0); i <= ilast(0); i++) {
+
+               int gind = POLY3(i, j, k, imgn, jmgn, kmgn, nxg, nxnyg);
+
+               //
+               // some extra bounds checks for sanity
+               //
+               psi_max[ii] = MAX(psi_max[ii], lstate[gind]);
+               psi_min[ii] = MIN(psi_min[ii], lstate[gind]);
+            }
+         }
+      }
+   }
+
+   tbox::plog << endl << "extrema for the state follow " << pos
+              << " (min,max) = " << endl;
+   for (int ii = 0; ii < d_nState; ii++) {
+      tbox::plog << d_state_names[ii] << " (min,max) = ";
+      tbox::plog << psi_min[ii] << " " << psi_max[ii] << endl;
+   }
+
+   delete[] psi_min;
+   delete[] psi_max;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute time integral of numerical fluxes for finite difference       *
+ * at each cell face on patch.  When d_dim == tbox::Dimension(3)), there are two options    *
+ * for the transverse flux correction.  Otherwise, there is only one.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkEuler::computeFluxesOnPatch(
+   hier::Patch& patch,
+   const double time,
+   const double dt)
+{
+   (void)time;
+
+   //
+   // process the SAMRAI data
+   //
+   int block_number = getBlockNumber();
+   int level_number = patch.getPatchLevelNumber();
+   setMappedGridOnPatch(patch, block_number);
+
+   hier::Box pbox = patch.getBox();
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+
+   tbox::Pointer<pdat::CellData<double> > state = patch.getPatchData(d_state,
+         getDataContext());
+   tbox::Pointer<pdat::CellData<double> > vol = patch.getPatchData(d_vol,
+         getDataContext());
+   tbox::Pointer<pdat::SideData<double> > flux = patch.getPatchData(d_flux,
+         getDataContext());
+   tbox::Pointer<pdat::NodeData<double> > xyz = patch.getPatchData(d_xyz,
+         getDataContext());
+
+   TBOX_ASSERT(!state.isNull());
+   TBOX_ASSERT(!flux.isNull());
+   TBOX_ASSERT(!vol.isNull());
+   TBOX_ASSERT(state->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(vol->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(flux->getGhostCellWidth() == d_fluxghosts);
+   TBOX_ASSERT(xyz->getGhostCellWidth() == d_nodeghosts);
+
+   tbox::plog << "--------------------- start computeFluxesOnPatch on patch (";
+   tbox::plog << level_number << ")" << endl;
+   tbox::plog << "TIMESTEP for level = " << level_number << ", ";
+   tbox::plog << "dt    = " << dt << ", stime  = " << time << ", ftime = "
+              << time + dt << endl;
+   tbox::plog << "box   = " << pbox << endl;
+
+   //
+   // ------------------------------- the upwind bounds ----------------------------
+   //
+
+   int fx_imn = ifirst(0) - d_fluxghosts(0);
+   int fx_imx = ilast(0) + 1 + d_fluxghosts(0);
+   int fx_jmn = ifirst(1) - d_fluxghosts(1);
+   int fx_jmx = ilast(1) + d_fluxghosts(1);
+   int fx_kmn = ifirst(2) - d_fluxghosts(2);
+   int fx_nx = fx_imx - fx_imn + 1;
+   int fx_ny = fx_jmx - fx_jmn + 1;
+   int fx_nxny = fx_nx * fx_ny;
+
+   int fy_imn = ifirst(0) - d_fluxghosts(0);
+   int fy_imx = ilast(0) + d_fluxghosts(0);
+   int fy_jmn = ifirst(1) - d_fluxghosts(1);
+   int fy_jmx = ilast(1) + 1 + d_fluxghosts(1);
+   int fy_kmn = ifirst(2) - d_fluxghosts(2);
+   int fy_nx = fy_imx - fy_imn + 1;
+   int fy_ny = fy_jmx - fy_jmn + 1;
+   int fy_nxny = fy_nx * fy_ny;
+
+   int fz_imn = ifirst(0) - d_fluxghosts(0);
+   int fz_imx = ilast(0) + d_fluxghosts(0);
+   int fz_jmn = ifirst(1) - d_fluxghosts(1);
+   int fz_jmx = ilast(1) + d_fluxghosts(1);
+   int fz_kmn = ifirst(2) - d_fluxghosts(2);
+   int fz_nx = fz_imx - fz_imn + 1;
+   int fz_ny = fz_jmx - fz_jmn + 1;
+   int fz_nxny = fz_nx * fz_ny;
+
+   int imin = ifirst(0) - d_nghosts(0);
+   int imax = ilast(0) + d_nghosts(0);
+   int jmin = ifirst(1) - d_nghosts(1);
+   int jmax = ilast(1) + d_nghosts(1);
+   int kmin = ifirst(2) - d_nghosts(2);
+   int nx = imax - imin + 1;
+   int ny = jmax - jmin + 1;
+   int nxny = nx * ny;
+
+   int nd_imin = ifirst(0) - d_nodeghosts(0);
+   int nd_imax = ilast(0) + 1 + d_nodeghosts(0);
+   int nd_jmin = ifirst(1) - d_nodeghosts(1);
+   int nd_jmax = ilast(1) + 1 + d_nodeghosts(1);
+   int nd_kmin = ifirst(2) - d_nodeghosts(2);
+   int nd_nx = nd_imax - nd_imin + 1;
+   int nd_ny = nd_jmax - nd_jmin + 1;
+   int nd_nxny = nd_nx * nd_ny;
+
+   //
+   // get the pointers
+   //
+   double* cvol = vol->getPointer();
+
+   double* x = xyz->getPointer(0);
+   double* y = xyz->getPointer(1);
+   double* z = xyz->getPointer(2);
+
+   double u = d_advection_velocity[0];
+   double v = d_advection_velocity[1];
+   double w = d_advection_velocity[2];
+   double u0 = sqrt(u * u + v * v + w * w);
+
+   // 0, cartesian, 1 R translation, 2 rigid body theta rotation, 4, rigid body phi rotation
+   int VEL_TYPE = d_advection_vel_type;
+
+   //
+   // note on areas, we set the area vector Avector,
+   //
+   //     Avector = -0.5*( x3 - x1 ) cross product ( x4 - x2 )
+   //
+   // where the x1 .. x4 are the right hand rule circulation for the face
+   //
+
+   int depth = state->getDepth();
+
+   for (int idepth = 0; idepth < depth; idepth++) {
+
+      double* psi = state->getPointer(idepth); // assumed single depth here !!!!
+
+      double* fx = flux->getPointer(0, idepth);
+      double* fy = flux->getPointer(1, idepth);
+      double* fz = flux->getPointer(2, idepth);
+
+      //
+      // compute the fluxes for the upwind method
+      //
+      for (int k = ifirst(2); k <= ilast(2); k++) {
+         for (int j = ifirst(1); j <= ilast(1); j++) {
+            for (int i = ifirst(0); i <= ilast(0) + 1; i++) {
+
+               // --------- get the indices
+               int ifx = POLY3(i, j, k, fx_imn, fx_jmn, fx_kmn, fx_nx, fx_nxny);
+
+               int ind = POLY3(i, j, k, imin, jmin, kmin, nx, nxny);
+               int ib = ind - 1;
+
+               int n1 = POLY3(i,
+                     j,
+                     k,
+                     nd_imin,
+                     nd_jmin,
+                     nd_kmin,
+                     nd_nx,
+                     nd_nxny);
+               int n4 = n1 + nd_nx;
+               int n5 = n1 + nd_nxny;
+               int n8 = n1 + nd_nxny + nd_nx;
+
+               // --------- get the positions // 1 - 4 - 8 - 5
+               double x1 = x[n1];
+               double y1 = y[n1];
+               double z1 = z[n1];
+               double x2 = x[n4];
+               double y2 = y[n4];
+               double z2 = z[n4];
+               double x3 = x[n8];
+               double y3 = y[n8];
+               double z3 = z[n8];
+               double x4 = x[n5];
+               double y4 = y[n5];
+               double z4 = z[n5];
+
+               double xm = 0.25 * (x1 + x2 + x3 + x4);
+               double ym = 0.25 * (y1 + y2 + y3 + y4);
+               double zm = 0.25 * (z1 + z2 + z3 + z4);
+
+               double xn1 = sqrt(xm * xm + ym * ym);
+               double R = sqrt(xm * xm + ym * ym + zm * zm);
+
+               // --------- compute the flux
+               double u1 = u0 * xm / R;
+               double v1 = u0 * ym / R;
+               double w1 = u0 * zm / R;
+
+               double dx31 = x3 - x1;
+               double dx42 = x4 - x2;
+
+               double dy31 = y3 - y1;
+               double dy42 = y4 - y2;
+
+               double dz31 = z3 - z1;
+               double dz42 = z4 - z2;
+
+               double Ax = -0.5 * (dy42 * dz31 - dz42 * dy31);
+               double Ay = -0.5 * (dz42 * dx31 - dx42 * dz31);
+               double Az = -0.5 * (dx42 * dy31 - dy42 * dx31);
+
+               double Audotn = 0.0;
+               if (VEL_TYPE == 0) {
+                  Audotn = Ax * u + Ay * v + Az * w;
+               }
+               if (VEL_TYPE == 1) {
+                  Audotn = Ax * u1 + Ay * v1 + Az * w1;
+               }
+               if (VEL_TYPE == 2) {
+                  double u2 = -u0 * ym;
+                  double v2 = u0 * xm;
+                  double w2 = 0.0;
+                  Audotn = Ax * u2 + Ay * v2 + Az * w2;
+               }
+               if (VEL_TYPE == 3) {
+                  double cosphi = xn1 / R;
+                  double sinphi =
+                     sqrt(1 - xn1 * xn1 / (R * R)) * (zm > 0.0 ? 1.0 : -1.0);
+                  double u2 = -u0 * xm * sinphi / cosphi;
+                  double v2 = -u0 * ym * sinphi / cosphi;
+                  double w2 = u0 * cosphi / sinphi;
+                  Audotn = Ax * u2 + Ay * v2 + Az * w2;
+               }
+
+               double lflux = (Audotn > 0.0 ? psi[ib] : psi[ind]) * Audotn;
+
+               fx[ifx] = lflux;  // (Ax,Ay,Az) vector points towards ind
+            }
+         }
+      }
+
+      for (int k = ifirst(2); k <= ilast(2); k++) {
+         for (int j = ifirst(1); j <= ilast(1) + 1; j++) {
+            for (int i = ifirst(0); i <= ilast(0); i++) {
+
+               // --------- get the indices
+               int ify = POLY3(i, j, k, fy_imn, fy_jmn, fy_kmn, fy_nx, fy_nxny);
+
+               int ind = POLY3(i, j, k, imin, jmin, kmin, nx, nxny);
+               int jb = ind - nx;
+
+               int n1 = POLY3(i,
+                     j,
+                     k,
+                     nd_imin,
+                     nd_jmin,
+                     nd_kmin,
+                     nd_nx,
+                     nd_nxny);
+               int n2 = n1 + 1;
+               int n5 = n1 + nd_nxny;
+               int n6 = n1 + nd_nxny + 1;
+
+               // --------- get the positions // 1 - 5 - 6 - 2
+               double x1 = x[n1];
+               double y1 = y[n1];
+               double z1 = z[n1];
+               double x2 = x[n5];
+               double y2 = y[n5];
+               double z2 = z[n5];
+               double x3 = x[n6];
+               double y3 = y[n6];
+               double z3 = z[n6];
+               double x4 = x[n2];
+               double y4 = y[n2];
+               double z4 = z[n2];
+
+               double xm = 0.25 * (x1 + x2 + x3 + x4);
+               double ym = 0.25 * (y1 + y2 + y3 + y4);
+               double zm = 0.25 * (z1 + z2 + z3 + z4);
+
+               double xn1 = sqrt(xm * xm + ym * ym);
+               double R = sqrt(xm * xm + ym * ym + zm * zm);
+
+               // --------- compute the flux
+               double u1 = u0 * xm / R;
+               double v1 = u0 * ym / R;
+               double w1 = u0 * zm / R;
+
+               double dx31 = x3 - x1;
+               double dx42 = x4 - x2;
+
+               double dy31 = y3 - y1;
+               double dy42 = y4 - y2;
+
+               double dz31 = z3 - z1;
+               double dz42 = z4 - z2;
+
+               double Ax = -0.5 * (dy42 * dz31 - dz42 * dy31);
+               double Ay = -0.5 * (dz42 * dx31 - dx42 * dz31);
+               double Az = -0.5 * (dx42 * dy31 - dy42 * dx31);
+
+               double Audotn = 0.0;
+               if (VEL_TYPE == 0) {
+                  Audotn = Ax * u + Ay * v + Az * w;
+               }
+               if (VEL_TYPE == 1) {
+                  Audotn = Ax * u1 + Ay * v1 + Az * w1;
+               }
+               if (VEL_TYPE == 2) {
+                  double u2 = -u0 * ym;
+                  double v2 = u0 * xm;
+                  double w2 = 0.0;
+                  Audotn = Ax * u2 + Ay * v2 + Az * w2;
+               }
+               if (VEL_TYPE == 3) {
+                  double cosphi = xn1 / R;
+                  double sinphi =
+                     sqrt(1 - xn1 * xn1 / (R * R)) * (zm > 0.0 ? 1.0 : -1.0);
+                  double u2 = -u0 * xm * sinphi / cosphi;
+                  double v2 = -u0 * ym * sinphi / cosphi;
+                  double w2 = u0 * cosphi / sinphi;
+                  Audotn = Ax * u2 + Ay * v2 + Az * w2;
+               }
+
+               double lflux = (Audotn > 0.0 ? psi[jb] : psi[ind]) * Audotn;
+
+               fy[ify] = lflux;  // (Ax,Ay,Az) vector points towards ind
+            }
+         }
+      }
+
+      for (int k = ifirst(2); k <= ilast(2) + 1; k++) {
+         for (int j = ifirst(1); j <= ilast(1); j++) {
+            for (int i = ifirst(0); i <= ilast(0); i++) {
+
+               // --------- get the indices
+               int ifz = POLY3(i, j, k, fz_imn, fz_jmn, fz_kmn, fz_nx, fz_nxny);
+
+               int ind = POLY3(i, j, k, imin, jmin, kmin, nx, nxny);
+               int kb = ind - nxny;
+
+               int n1 = POLY3(i,
+                     j,
+                     k,
+                     nd_imin,
+                     nd_jmin,
+                     nd_kmin,
+                     nd_nx,
+                     nd_nxny);
+               int n2 = n1 + 1;
+               int n3 = n1 + 1 + nd_nx;
+               int n4 = n1 + nd_nx;
+
+               // --------- get the positions // 1 - 2 - 3 - 4
+               double x1 = x[n1];
+               double y1 = y[n1];
+               double z1 = z[n1];
+               double x2 = x[n2];
+               double y2 = y[n2];
+               double z2 = z[n2];
+               double x3 = x[n3];
+               double y3 = y[n3];
+               double z3 = z[n3];
+               double x4 = x[n4];
+               double y4 = y[n4];
+               double z4 = z[n4];
+
+               double xm = 0.25 * (x1 + x2 + x3 + x4);
+               double ym = 0.25 * (y1 + y2 + y3 + y4);
+               double zm = 0.25 * (z1 + z2 + z3 + z4);
+
+               double xn1 = sqrt(xm * xm + ym * ym);
+               double R = sqrt(xm * xm + ym * ym + zm * zm);
+
+               // --------- compute the flux
+               double u1 = u0 * xm / R;
+               double v1 = u0 * ym / R;
+               double w1 = u0 * zm / R;
+
+               double dx31 = x3 - x1;
+               double dx42 = x4 - x2;
+
+               double dy31 = y3 - y1;
+               double dy42 = y4 - y2;
+
+               double dz31 = z3 - z1;
+               double dz42 = z4 - z2;
+
+               double Ax = -0.5 * (dy42 * dz31 - dz42 * dy31);
+               double Ay = -0.5 * (dz42 * dx31 - dx42 * dz31);
+               double Az = -0.5 * (dx42 * dy31 - dy42 * dx31);
+
+               double Audotn = 0.0;
+               if (VEL_TYPE == 0) {
+                  Audotn = Ax * u + Ay * v + Az * w;
+               }
+               if (VEL_TYPE == 1) {
+                  Audotn = Ax * u1 + Ay * v1 + Az * w1;
+               }
+               if (VEL_TYPE == 2) {
+                  double u2 = -u0 * ym;
+                  double v2 = u0 * xm;
+                  double w2 = 0.0;
+                  Audotn = Ax * u2 + Ay * v2 + Az * w2;
+               }
+               if (VEL_TYPE == 3) {
+                  double cosphi = xn1 / R;
+                  double sinphi =
+                     sqrt(1 - xn1 * xn1 / (R * R)) * (zm > 0.0 ? 1.0 : -1.0);
+                  double u2 = -u0 * xm * sinphi / cosphi;
+                  double v2 = -u0 * ym * sinphi / cosphi;
+                  double w2 = u0 * cosphi / sinphi;
+                  Audotn = Ax * u2 + Ay * v2 + Az * w2;
+               }
+
+               double lflux = (Audotn > 0.0 ? psi[kb] : psi[ind]) * Audotn;
+
+               fz[ifz] = lflux;  // (Ax,Ay,Az) vector points towards ind
+            }
+         }
+      }
+
+      //
+      // compute the source due to the upwind method
+      //
+      for (int k = ifirst(2); k <= ilast(2); k++) {
+         for (int j = ifirst(1); j <= ilast(1); j++) {
+            for (int i = ifirst(0); i <= ilast(0); i++) {
+
+               int ind = POLY3(i, j, k, imin, jmin, kmin, nx, nxny);
+
+               int ib = POLY3(i, j, k, fx_imn, fx_jmn, fx_kmn, fx_nx, fx_nxny);
+               int ie = POLY3(i + 1,
+                     j,
+                     k,
+                     fx_imn,
+                     fx_jmn,
+                     fx_kmn,
+                     fx_nx,
+                     fx_nxny);
+
+               int jb = POLY3(i, j, k, fy_imn, fy_jmn, fy_kmn, fy_nx, fy_nxny);
+               int je = POLY3(i,
+                     j + 1,
+                     k,
+                     fy_imn,
+                     fy_jmn,
+                     fy_kmn,
+                     fy_nx,
+                     fy_nxny);
+
+               int kb = POLY3(i, j, k, fz_imn, fz_jmn, fz_kmn, fz_nx, fz_nxny);
+               int ke = POLY3(i,
+                     j,
+                     k + 1,
+                     fz_imn,
+                     fz_jmn,
+                     fz_kmn,
+                     fz_nx,
+                     fz_nxny);
+
+               //   have set up the normal so that it always points in the positive, i, j, and k directions
+               int n1 = POLY3(i,
+                     j,
+                     k,
+                     nd_imin,
+                     nd_jmin,
+                     nd_kmin,
+                     nd_nx,
+                     nd_nxny);
+               int n2 = n1 + 1;
+               int n3 = n1 + 1 + nd_nx;
+               int n4 = n1 + nd_nx;
+
+               int n5 = n1 + nd_nxny;
+               int n6 = n1 + nd_nxny + 1;
+               int n7 = n1 + nd_nxny + 1 + nd_nx;
+               int n8 = n1 + nd_nxny + nd_nx;
+
+               double lvol = UpwindVolume(x[n1], x[n2], x[n3], x[n4],
+                     x[n5], x[n6], x[n7], x[n8],
+
+                     y[n1], y[n2], y[n3], y[n4],
+                     y[n5], y[n6], y[n7], y[n8],
+
+                     z[n1], z[n2], z[n3], z[n4],
+                     z[n5], z[n6], z[n7], z[n8]);
+
+               cvol[ind] = lvol;
+
+               psi[ind] -= dt * ((fx[ie] - fx[ib])
+                                 + (fy[je] - fy[jb])
+                                 + (fz[ke] - fz[kb])) / lvol;
+
+            }
+         }
+      }
+
+   } // end of field loop
+
+   tbox::plog << "--------------------- end computeFluxesOnPatch on patch"
+              << endl;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Update solution variables by performing a conservative                *
+ * difference with the fluxes calculated in computeFluxesOnPatch().      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkEuler::conservativeDifferenceOnPatch(
+   hier::Patch& patch,
+   const double time,
+   const double dt,
+   bool at_syncronization)
+{
+   NULL_USE(patch);
+   NULL_USE(time);
+   NULL_USE(dt);
+   NULL_USE(at_syncronization);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * this routine initializes all the zonal data that one needs to fill to dummy
+ * values as a check
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkEuler::markPhysicalBoundaryConditions(
+   hier::Patch& patch,
+   const hier::IntVector& ghost_width_to_fill)
+{
+   tbox::Pointer<pdat::CellData<double> > state = patch.getPatchData(d_state,
+         getDataContext());
+
+   //
+   // the domain and its ghost box
+   //
+   const hier::Box& interior = patch.getBox();
+
+   const hier::Box& ghost_box = state->getGhostBox();
+   const hier::IntVector& ghost_cells = state->getGhostCellWidth();
+
+   hier::IntVector gcw_to_fill = hier::IntVector::min(ghost_cells,
+         ghost_width_to_fill);
+
+   int bc_types[3] = { FACE3D_BDRY_TYPE, EDGE3D_BDRY_TYPE, NODE3D_BDRY_TYPE };
+
+   int imin = ghost_box.lower(0);
+   int imax = ghost_box.upper(0);
+   int jmin = ghost_box.lower(1);
+   int jmax = ghost_box.upper(1);
+   int kmin = ghost_box.lower(2);
+   int nx = imax - imin + 1;
+   int ny = jmax - jmin + 1;
+   int nxny = nx * ny;
+
+   const tbox::Pointer<hier::BlockPatchGeometry> pgeom = patch.getPatchGeometry();
+
+   for (int ii = 0; ii < 3; ii++) {
+
+      const tbox::Array<hier::BoundaryBox>& bc_bdry =
+         pgeom->getCodimensionBoundaries(bc_types[ii]);
+
+      for (int jj = 0; jj < bc_bdry.getSize(); jj++) {
+
+         hier::Box fill_box = pgeom->getBoundaryFillBox(bc_bdry[jj],
+               interior,
+               gcw_to_fill);
+         int l_imin = fill_box.lower(0);
+         int l_jmin = fill_box.lower(1);
+         int l_kmin = fill_box.lower(2);
+
+         int l_imax = fill_box.upper(0);
+         int l_jmax = fill_box.upper(1);
+         int l_kmax = fill_box.upper(2);
+
+         int nd = state->getDepth();
+
+         for (int n = 0; n < nd; n++) {
+            double* sptr = state->getPointer(n);
+
+            for (int k = l_kmin; k <= l_kmax; k++) {
+               for (int j = l_jmin; j <= l_jmax; j++) {
+                  for (int i = l_imin; i <= l_imax; i++) {
+
+                     int ind = POLY3(i, j, k, imin, jmin, kmin, nx, nxny);
+
+                     sptr[ind] = ii;
+
+                  }
+               }
+            }
+         } // end of marking loops
+
+      } // loop over boxes in each type
+
+   } // loop over box types
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set the data in ghost cells corresponding to physical boundary        *
+ * conditions.  Note that boundary geometry configuration information    *
+ * (i.e., faces, edges, and nodes) is obtained from the patch geometry   *
+ * object owned by the patch.                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+extern "C" {
+void F77_FUNC(bcmultiblock, BCMULTIBLOCK) (
+   const int *, const int *, const int *,
+   const int *, const int *, const int *,
+   double *,
+   const int *, const int *, const int *,
+   const int *, const int *, const int *,
+   double *,
+   const int* ncomp,
+   const int* dlo, const int* dhi,
+   const int* glo, const int* ghi,
+   const int* lo, const int* hi,
+   const int* dir, const int* side);
+}
+
+void MblkEuler::setPhysicalBoundaryConditions(
+   hier::Patch& patch,
+   const double fill_time,
+   const hier::IntVector& ghost_width_to_fill)
+{
+
+   markPhysicalBoundaryConditions(patch, ghost_width_to_fill);
+
+   (void)fill_time;
+
+   tbox::Pointer<pdat::NodeData<double> > position = patch.getPatchData(d_xyz,
+         getDataContext());
+   tbox::Pointer<pdat::CellData<double> > state = patch.getPatchData(d_state,
+         getDataContext());
+
+   //
+   // the patch and its ghost box
+   //
+   const hier::Box& patch_box = patch.getBox();
+   const hier::Box& ghost_box = state->getGhostBox();
+   const hier::Box& nghost_box = position->getGhostBox();
+
+   double* state_ptr = state->getPointer();
+   int state_depth = state->getDepth();
+   double* position_ptr = position->getPointer();
+
+   //
+   // the index space of this block and its neighbors
+   //
+   int block_number = getBlockNumber();
+   const tbox::Pointer<hier::BlockPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const hier::IntVector ratio = patch_geom->getRatio();
+   hier::BoxArray domain_boxes(d_dim);
+   d_grid_geometries[block_number]->computePhysicalDomain(domain_boxes, ratio);
+
+   const hier::IntVector& periodic =
+      d_grid_geometries[block_number]->getPeriodicShift(
+         hier::IntVector(d_dim, 1));
+
+   const hier::Box& domain_box = domain_boxes[0];
+   // domain_box.refine(patch_geom->getRatio());
+
+   d_mblk_geometry->buildLocalBlocks(patch_box,
+      domain_box,
+      block_number,
+      d_dom_local_blocks);
+   //
+   // loop over the dimensions, filling in boundary conditions where needed
+   // note that here we have a check for is this really a physical boundary or is it
+   // just a periodic boundary condition, or is it just an internal block boundary
+   //
+   int imin = ghost_box.lower(0);
+   int imax = ghost_box.upper(0);
+   int jmin = ghost_box.lower(1);
+   int jmax = ghost_box.upper(1);
+   int kmin = ghost_box.lower(2);
+   int kmax = ghost_box.upper(2);
+
+   int nd_imin = nghost_box.lower(0);
+   int nd_imax = nghost_box.upper(0);
+   int nd_jmin = nghost_box.lower(1);
+   int nd_jmax = nghost_box.upper(1);
+   int nd_kmin = nghost_box.lower(2);
+   int nd_kmax = nghost_box.upper(2);
+
+   for (int dir = 0; dir < d_dim.getValue(); dir++) {
+      if (!periodic(dir)) {
+
+         if ((ghost_box.lower(dir) < domain_box.lower(dir)) &&
+             (d_dom_local_blocks[dir] == block_number)) {
+            int iside = 0;
+            F77_FUNC(bcmultiblock, BCMULTIBLOCK) (
+               &nd_imin, &nd_imax, &nd_jmin, &nd_jmax, &nd_kmin, &nd_kmax,
+               position_ptr,
+               &imin, &imax, &jmin, &jmax, &kmin, &kmax, state_ptr,
+               &state_depth,
+               &domain_box.lower()[0],
+               &domain_box.upper()[0],
+               &ghost_box.lower()[0],
+               &ghost_box.upper()[0],
+               &patch_box.lower()[0],
+               &patch_box.upper()[0],
+               &dir, &iside);
+         }
+
+         if ((ghost_box.upper(dir) > domain_box.upper(dir)) &&
+             (d_dom_local_blocks[d_dim.getValue() + dir] == block_number)) {
+            int iside = 1;
+            F77_FUNC(bcmultiblock, BCMULTIBLOCK) (
+               &nd_imin, &nd_imax, &nd_jmin, &nd_jmax, &nd_kmin, &nd_kmax,
+               position_ptr,
+               &imin, &imax, &jmin, &jmax, &kmin, &kmax, state_ptr,
+               &state_depth,
+               &domain_box.lower()[0],
+               &domain_box.upper()[0],
+               &ghost_box.lower()[0],
+               &ghost_box.upper()[0],
+               &patch_box.lower()[0],
+               &patch_box.upper()[0],
+               &dir, &iside);
+         }
+
+      } // end of periodic check
+
+   } // end of dimension loop
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Refine operations
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkEuler::preprocessRefine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio)
+{
+   NULL_USE(fine_box);
+   NULL_USE(ratio);
+
+   int xyz_id = hier::VariableDatabase::getDatabase()->
+      mapVariableAndContextToIndex(d_xyz, getDataContext());
+
+   int fln = fine.getPatchLevelNumber();
+   int cln = coarse.getPatchLevelNumber();
+   if (fln < 0) {
+      fln = cln + 1;
+      if (!fine.checkAllocated(xyz_id)) {
+         TBOX_ERROR(d_object_name << ":preprocessRefine()"
+                                  << "\nfine xyz data not allocated" << endl);
+      }
+   }
+   if (cln < 0) {
+      cln = fln - 1;
+      if (!coarse.checkAllocated(xyz_id)) {
+         TBOX_ERROR(d_object_name << ":preprocessRefine()"
+                                  << "\ncoarse xyz data not allocated" << endl);
+      }
+   }
+   int block_number = getBlockNumber();
+   setMappedGridOnPatch(coarse, block_number);
+   setMappedGridOnPatch(fine, block_number);
+   setVolumeOnPatch(coarse);
+   setVolumeOnPatch(fine);
+}
+
+// ---------------------------------------------------------------------------
+
+//
+// the refinement operator
+//
+void MblkEuler::postprocessRefine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const hier::Box& fine_box,                                 // where the fine data is needed
+   const hier::IntVector& ratio)
+{
+   tbox::Pointer<pdat::CellData<double> > cstate = coarse.getPatchData(d_state,
+         getDataContext());
+   tbox::Pointer<pdat::CellData<double> > cvol = coarse.getPatchData(d_vol,
+         getDataContext());
+
+   tbox::Pointer<pdat::CellData<double> > fstate = fine.getPatchData(d_state,
+         getDataContext());
+   tbox::Pointer<pdat::CellData<double> > fvol = fine.getPatchData(d_vol,
+         getDataContext());
+
+   int depth = cstate->getDepth();
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!cstate.isNull());
+   TBOX_ASSERT(!fstate.isNull());
+   TBOX_ASSERT(!cvol.isNull());
+   TBOX_ASSERT(!fvol.isNull());
+   TBOX_ASSERT(cstate->getDepth() == fstate->getDepth());
+#endif
+
+   //
+   // get the boxes and bounds
+   //
+
+   // ... the bounds of the data
+   const hier::Box cgbox(cstate->getGhostBox());
+   const hier::Box fgbox(fstate->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fgbox.lower();
+   const hier::Index fihi = fgbox.upper();
+
+   // ... the bounds we actually work on
+   const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+   const hier::Index ifirstf = fine_box.lower();
+   const hier::Index ilastf = fine_box.upper();
+
+   int flev = fine.getPatchLevelNumber();
+   int clev = coarse.getPatchLevelNumber();
+
+   tbox::plog << "--------------------- start postprocessRefineData ("
+              << flev << "," << clev << ")" << endl;
+   tbox::plog << "flevel     = " << flev << endl;
+   tbox::plog << "clevel     = " << clev << endl << endl;
+   tbox::plog << "fine_box         = " << fine_box << endl;
+   tbox::plog << "fine_patch_box   = " << fine.getBox() << endl;
+   tbox::plog << "fine_ghost_box   = " << fgbox << endl << endl;
+
+   tbox::plog << "coarse_box       = " << coarse_box << endl;
+   tbox::plog << "coarse_patch_box = " << coarse.getBox() << endl;
+   tbox::plog << "coarse_ghost_box = " << coarse_box << endl;
+
+   //
+   // setup work variables
+   //
+   const hier::IntVector tmp_ghosts(d_dim, 0);
+   const int numInterp = 1;
+   pdat::CellData<double> val_vals(coarse_box, numInterp, tmp_ghosts);
+   pdat::CellData<double> slope0_vals(coarse_box, numInterp, tmp_ghosts);
+   pdat::CellData<double> slope1_vals(coarse_box, numInterp, tmp_ghosts);
+   pdat::CellData<double> slope2_vals(coarse_box, numInterp, tmp_ghosts);
+   double* val = val_vals.getPointer();
+   double* slope0 = slope0_vals.getPointer();
+   double* slope1 = slope1_vals.getPointer();
+   double* slope2 = slope2_vals.getPointer();
+
+   //
+   // setup coarse strides
+   //
+   int imin = ifirstc(0);  // the box of coarse elements being refined
+   int imax = ilastc(0);   // the work data is sized to this box
+   int jmin = ifirstc(1);
+   int jmax = ilastc(1);
+   int kmin = ifirstc(2);
+   int kmax = ilastc(2);
+   int nx = imax - imin + 1;
+   int ny = jmax - jmin + 1;
+   int nz = kmax - kmin + 1;
+   int nxny = nx * ny;
+   int nel = nx * ny * nz;
+
+   int cimin = cilo(0);  // the coarse data bounds
+   int cimax = cihi(0);
+   int cjmin = cilo(1);
+   int cjmax = cihi(1);
+   int ckmin = cilo(2);
+   int cnx = cimax - cimin + 1;
+   int cny = cjmax - cjmin + 1;
+   int cnxny = cnx * cny;
+
+   int fimin = filo(0);  // the fine data bounds
+   int fimax = fihi(0);
+   int fjmin = filo(1);
+   int fjmax = fihi(1);
+   int fkmin = filo(2);
+   int fnx = fimax - fimin + 1;
+   int fny = fjmax - fjmin + 1;
+   int fnxny = fnx * fny;
+
+   double rat0 = ratio[0];
+   double rat1 = ratio[1];
+   double rat2 = ratio[2];
+   double fact = 2.0;  // xi varies from -1 to 1
+
+   //
+   // ================================= state variable refinement ====================
+   //
+   double* cdata = NULL; // keeps pointers around till end of loop
+   double* fdata = NULL;
+
+   for (int n = 0; n < depth; n++) {
+
+      cdata = cstate->getPointer(n);
+      fdata = fstate->getPointer(n);
+
+      for (int l = 0; l < nel; l++) {       // default slopes are zero
+         slope0[l] = 0.0;  // this yields piecewise constant interpolation
+         slope1[l] = 0.0;  // and makes a handy initializer
+         slope2[l] = 0.0;
+      }
+
+      for (int k = ifirstc(2); k <= ilastc(2); k++) {
+         for (int j = ifirstc(1); j <= ilastc(1); j++) {
+            for (int i = ifirstc(0); i <= ilastc(0); i++) {
+
+               int ind = POLY3(i, j, k, imin, jmin, kmin, nx, nxny);
+               int cind = POLY3(i, j, k, cimin, cjmin, ckmin, cnx, cnxny);
+
+               double aii = cdata[cind];
+               val[ind] = aii;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+               TBOX_ASSERT(ind >= 0);   // debug assertions
+               TBOX_ASSERT(ind < nel);
+#endif
+#if 0 // turn to zero for simple interp
+               int im1 = cind - 1;
+               int ip1 = cind + 1;
+               int jm1 = cind - cnx;
+               int jp1 = cind + cnx;
+               int km1 = cind - cnxny;
+               int kp1 = cind + cnxny;
+
+               double w_i = cvolume[cind];
+               double w_ip = cvolume[ip1];
+               double w_im = cvolume[im1];
+               double w_jp = cvolume[jp1];
+               double w_jm = cvolume[jm1];
+               double w_kp = cvolume[kp1];
+               double w_km = cvolume[km1];
+
+               double aip = cdata[ip1];
+               double aim = cdata[im1];
+               double ajp = cdata[jp1];
+               double ajm = cdata[jm1];
+               double akp = cdata[kp1];
+               double akm = cdata[km1];
+
+               my_slopes(aii, aip, aim, ajp, ajm, akp, akm,
+                  w_i, w_ip, w_im, w_jp, w_jm, w_kp, w_km,
+                  slope0[ind],
+                  slope1[ind],
+                  slope2[ind]);
+#endif
+            }
+         }
+      }
+
+      //
+      // compute the interpolated data from the cached slopes, looping
+      // over the fine zones
+      //
+      for (int k = ifirstf(2); k <= ilastf(2); k++) {
+         for (int j = ifirstf(1); j <= ilastf(1); j++) {
+            for (int i = ifirstf(0); i <= ilastf(0); i++) {
+
+               int find = POLY3(i, j, k, fimin, fjmin, fkmin, fnx, fnxny);
+
+               double ric = (double(i) + 0.5) / rat0 - 0.5;
+               double rjc = (double(j) + 0.5) / rat1 - 0.5;
+               double rkc = (double(k) + 0.5) / rat2 - 0.5;
+
+               int ic = (int)(ric + (ric >= 0 ? 0.5 : -0.5));
+               int jc = (int)(rjc + (rjc >= 0 ? 0.5 : -0.5));
+               int kc = (int)(rkc + (rkc >= 0 ? 0.5 : -0.5));
+
+               double ldx = fact * (ric - ic);
+               double ldy = fact * (rjc - jc);
+               double ldz = fact * (rkc - kc);
+
+               int ind = POLY3(ic, jc, kc, imin, jmin, kmin, nx, nxny);  // work pos
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+               TBOX_ASSERT(0 <= ind);
+               TBOX_ASSERT(ind < nel);
+#endif
+
+               fdata[find] =
+                  val[ind]
+                  + ldx * slope0[ind]
+                  + ldy * slope1[ind]
+                  + ldz * slope2[ind];
+            }
+         }
+      } // end of i,j,k loops for finding the fine state variables
+
+   } // end of state loop
+
+   tbox::plog << "--------------------- end postprocessRefine" << endl;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Coarsen operations
+ *                                                                       *
+ *************************************************************************
+ */
+void MblkEuler::preprocessCoarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio)
+{
+   NULL_USE(coarse_box);
+   NULL_USE(ratio);
+
+   int xyz_id = hier::VariableDatabase::getDatabase()->
+      mapVariableAndContextToIndex(d_xyz, getDataContext());
+
+   int fln = fine.getPatchLevelNumber();
+   int cln = coarse.getPatchLevelNumber();
+   if (fln < 0) {
+      fln = cln + 1;
+      if (!fine.checkAllocated(xyz_id)) {
+         TBOX_ERROR(d_object_name << ":preprocessCoarsen()"
+                                  << "\nfine xyz data not allocated" << endl);
+      }
+   }
+   if (cln < 0) {
+      cln = fln - 1;
+      if (!coarse.checkAllocated(xyz_id)) {
+         TBOX_ERROR(d_object_name << ":preprocessCoarsen()"
+                                  << "\ncoarse xyz data not allocated" << endl);
+      }
+   }
+   int block_number = getCoarsenBlockNumber();
+   setMappedGridOnPatch(coarse, block_number);
+   setMappedGridOnPatch(fine, block_number);
+   setVolumeOnPatch(coarse);
+   setVolumeOnPatch(fine);
+}
+
+// ---------------------------------------------------------------------------
+
+//
+// the coarsening function
+//
+void MblkEuler::postprocessCoarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio)
+{
+   tbox::Pointer<pdat::CellData<double> > cstate =
+      coarse.getPatchData(d_state, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > cvol =
+      coarse.getPatchData(d_vol, getDataContext());
+
+   tbox::Pointer<pdat::CellData<double> > fstate =
+      fine.getPatchData(d_state, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > fvol =
+      fine.getPatchData(d_vol, getDataContext());
+
+   int depth = cstate->getDepth();
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!cstate.isNull());
+   TBOX_ASSERT(!cvol.isNull());
+   TBOX_ASSERT(!fstate.isNull());
+   TBOX_ASSERT(!fvol.isNull());
+   TBOX_ASSERT(cstate->getDepth() == fstate->getDepth());
+#endif
+
+   //
+   // box and geometry information
+   //
+   const hier::Index filo = fstate->getGhostBox().lower();
+   const hier::Index fihi = fstate->getGhostBox().upper();
+   const hier::Index cilo = cstate->getGhostBox().lower();
+   const hier::Index cihi = cstate->getGhostBox().upper();
+
+   const hier::Box fine_box = hier::Box::refine(coarse_box, ratio);
+   const hier::Index ifirstc = coarse_box.lower();  // coarse basis
+   const hier::Index ilastc = coarse_box.upper();
+   const hier::Index ifirstf = fine_box.lower();    // fine data
+   const hier::Index ilastf = fine_box.upper();
+
+   int flev = fine.getPatchLevelNumber();
+   int clev = coarse.getPatchLevelNumber();
+
+   tbox::plog << "--------------------- start postprocessCoarsenData ("
+              << flev << "," << clev << ")" << endl;
+   tbox::plog << "flevel     = " << flev << endl;
+   tbox::plog << "clevel     = " << clev << endl;
+   tbox::plog << "fine       = " << fine.getBox() << endl;
+   tbox::plog << "coarse     = " << coarse.getBox() << endl;
+   tbox::plog << "fine_box   = " << fine_box << endl;
+   tbox::plog << "coarse_box = " << coarse_box << endl;
+
+   tbox::plog << "filo = " << filo << ", fihi = " << fihi << endl;
+   tbox::plog << "cilo = " << cilo << ", cihi = " << cihi << endl;
+
+   //
+   // work variables
+   //
+
+   int cimin = cilo(0);
+   int cimax = cihi(0);
+   int cjmin = cilo(1);
+   int cjmax = cihi(1);
+   int ckmin = cilo(2);
+   int ckmax = cihi(2);
+   int cnx = cimax - cimin + 1;
+   int cny = cjmax - cjmin + 1;
+   int cnz = ckmax - ckmin + 1;
+   int cnxny = cnx * cny;
+   int cnel = cnx * cny * cnz;
+
+   int fimin = filo(0);
+   int fimax = fihi(0);
+   int fjmin = filo(1);
+   int fjmax = fihi(1);
+   int fkmin = filo(2);
+   int fkmax = fihi(2);
+   int fnx = fimax - fimin + 1;
+   int fny = fjmax - fjmin + 1;
+   int fnz = fkmax - fkmin + 1;
+   int fnxny = fnx * fny;
+   int fnel = fnx * fny * fnz;
+
+   double rat0 = (double)(ratio(0));
+   double rat1 = (double)(ratio(1));
+   double rat2 = (double)(ratio(2));
+
+   double* cvolume = cvol->getPointer();
+   double* fvolume = fvol->getPointer();
+   double* cdata = cstate->getPointer();
+   double* fdata = fstate->getPointer();
+
+   //
+   // average the data
+   //
+   for (int n = 0; n < depth; n++) {
+
+      //
+      // zero out the underlying coarse data to serve as a counter
+      //
+      for (int k = ifirstc(2); k <= ilastc(2); k++) {    // loop over the coarse zones
+         for (int j = ifirstc(1); j <= ilastc(1); j++) {
+            for (int i = ifirstc(0); i <= ilastc(0); i++) {
+
+               int chind =
+                  POLY3(i, j, k, cimin, cjmin, ckmin, cnx, cnxny) + n * cnel;
+
+               cdata[chind] = 0.0;
+            }
+         }
+      }
+
+      //
+      // compute the interpolated data from the cached slopes
+      //
+
+      for (int k = ifirstf(2); k <= ilastf(2); k++) {    // loop over the coarse zones
+         for (int j = ifirstf(1); j <= ilastf(1); j++) {
+            for (int i = ifirstf(0); i <= ilastf(0); i++) {
+
+               int vol_ind = POLY3(i, j, k, fimin, fjmin, fkmin, fnx, fnxny);
+               int fhind = vol_ind + n * fnel;
+
+               double ric = (double(i) + 0.5) / rat0 - 0.5;
+               double rjc = (double(j) + 0.5) / rat1 - 0.5;
+               double rkc = (double(k) + 0.5) / rat2 - 0.5;
+
+               int ic = (int)(ric + (ric >= 0 ? 0.5 : -0.5));        // a round operation
+               int jc = (int)(rjc + (rjc >= 0 ? 0.5 : -0.5));        // shift up and truncate if ic > 0
+               int kc = (int)(rkc + (rkc >= 0 ? 0.5 : -0.5));        // shift down and truncate if ic < 0
+
+               int chind =
+                  POLY3(ic, jc, kc, cimin, cjmin, ckmin, cnx, cnxny) + n * cnel;  // post + state offset
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+               TBOX_ASSERT(cimin <= ic && ic <= cimax);
+               TBOX_ASSERT(cjmin <= jc && jc <= cjmax);
+               TBOX_ASSERT(ckmin <= kc && kc <= ckmax);
+#endif
+
+               double fmass = fvolume[vol_ind];
+
+               cdata[chind] += fmass * fdata[fhind];  // sum of fine extensives now
+            }
+         }
+      }
+
+      //
+      // normalize the completed sum by converting back from extensive to intensive
+      //
+      for (int k = ifirstc(2); k <= ilastc(2); k++) {    // loop over the coarse zones
+         for (int j = ifirstc(1); j <= ilastc(1); j++) {
+            for (int i = ifirstc(0); i <= ilastc(0); i++) {
+
+               int vol_ind = POLY3(i, j, k, cimin, cjmin, ckmin, cnx, cnxny);
+               int chind = vol_ind + n * cnel;
+
+               double cmass = cvolume[vol_ind];
+
+               cdata[chind] /= cmass + 1.e-80;
+            }
+         }
+      }
+
+   }
+   tbox::plog << "--------------------- end postprocessCoarsen" << endl;
+}
+
+// -------------------------------------------------------------------
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Tag cells for refinement using gradient detector.  Tagging criteria   *
+ * defined in input.                                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+//
+// tag cells for refinement
+//
+void MblkEuler::tagGradientDetectorCells(
+   hier::Patch& patch,
+   const double regrid_time,
+   const bool initial_error,
+   const int tag_indx,
+   const bool uses_richardson_extrapolation_too)
+{
+
+   NULL_USE(initial_error);
+   NULL_USE(regrid_time);
+   NULL_USE(uses_richardson_extrapolation_too);
+
+   int block_number = getBlockNumber();
+   int level_number = patch.getPatchLevelNumber();
+   setMappedGridOnPatch(patch, block_number);
+
+   //
+   // get geometry data
+   //
+   const int error_level_number = patch.getPatchLevelNumber();
+
+   tbox::Pointer<pdat::NodeData<double> > xyz = patch.getPatchData(d_xyz,
+         getDataContext());
+   double* x = xyz->getPointer(0);
+   double* y = xyz->getPointer(1);
+   double* z = xyz->getPointer(2);
+
+   hier::Box pbox = patch.getBox();
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+   int level = patch.getPatchLevelNumber();
+
+   tbox::plog << "--------------------- start tagGradientCells (" << level
+              << ")" << endl;
+   tbox::plog << "level  = " << level << endl;
+   tbox::plog << "box    = " << patch.getBox() << endl;
+
+   tbox::Pointer<pdat::CellData<int> > tags = patch.getPatchData(tag_indx);
+   tbox::Pointer<pdat::CellData<double> > var = patch.getPatchData(d_state,
+         getDataContext());
+
+   //
+   // Create a set of temporary tags and set to untagged value.
+   //
+   tbox::Pointer<pdat::CellData<int> > temp_tags(new pdat::CellData<int>(
+                                                    pbox,
+                                                    1,
+                                                    d_nghosts));
+   temp_tags->fillAll(FALSE);
+
+   hier::IntVector tag_ghost = tags->getGhostCellWidth();
+
+   hier::IntVector nghost_cells = xyz->getGhostCellWidth();
+   int nd_imin = ifirst(0) - nghost_cells(0);
+   int nd_imax = ilast(0) + 1 + nghost_cells(0);
+   int nd_jmin = ifirst(1) - nghost_cells(1);
+   int nd_jmax = ilast(1) + 1 + nghost_cells(1);
+   int nd_kmin = ifirst(2) - nghost_cells(2);
+   int nd_nx = nd_imax - nd_imin + 1;
+   int nd_ny = nd_jmax - nd_jmin + 1;
+   int nd_nxny = nd_nx * nd_ny;
+
+   hier::IntVector v_ghost = var->getGhostCellWidth();     // has ghost zones
+   int imin = ifirst(0) - v_ghost(0); // the polynomial for the field
+   int imax = ilast(0) + v_ghost(0);
+   int jmin = ifirst(1) - v_ghost(1);
+   int jmax = ilast(1) + v_ghost(1);
+   int kmin = ifirst(2) - v_ghost(2);
+   int nx = imax - imin + 1;
+   int ny = jmax - jmin + 1;
+   int nxny = nx * ny;
+
+   hier::IntVector temp_tag_ghost = temp_tags->getGhostCellWidth();
+   int imn = ifirst(0) - temp_tag_ghost(0);  // the polynomial for temp_tags
+   int imx = ilast(0) + temp_tag_ghost(0);
+   int jmn = ifirst(1) - temp_tag_ghost(1);
+   int jmx = ilast(1) + temp_tag_ghost(1);
+   int kmn = ifirst(2) - temp_tag_ghost(2);
+   int tnx = imx - imn + 1;
+   int tny = jmx - jmn + 1;
+   int tnxny = tnx * tny;
+
+   int* ltags = temp_tags->getPointer();
+   double dv_x[3];
+   double dv_xi[3];
+   double xfact = 0.5;
+
+   //
+   // Possible tagging criteria includes
+   //    DENSITY_DEVIATION, DENSITY_GRADIENT, DENSITY_SHOCK
+   //    PRESSURE_DEVIATION, PRESSURE_GRADIENT, PRESSURE_SHOCK
+   // The criteria is specified over a time interval.
+   //
+   // Loop over criteria provided and check to make sure we are in the
+   // specified time interval.  If so, apply appropriate tagging for
+   // the level.
+   //
+   for (int ncrit = 0; ncrit < d_refinement_criteria.getSize(); ncrit++) {
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!var.isNull());
+#endif
+      string ref = d_refinement_criteria[ncrit];
+
+      if (ref == "GRADIENT") {
+         int nStateLocal = d_state_grad_names.getSize();
+         for (int id = 0; id < nStateLocal; id++) {
+
+            double* lvar = var->getPointer(d_state_grad_id[id]);
+
+            int size = d_state_grad_tol[id].getSize();  // max depth of gradient tolerance
+            double tol = ((error_level_number < size)    // find the tolerance
+                          ? d_state_grad_tol[id][error_level_number]
+                          : d_state_grad_tol[id][size - 1]);
+
+            for (int k = ifirst(2); k <= ilast(2); k++) {
+               for (int j = ifirst(1); j <= ilast(1); j++) {
+                  for (int i = ifirst(0); i <= ilast(0); i++) {
+
+                     int ind = POLY3(i, j, k, imin, jmin, kmin, nx, nxny);
+                     int tind = POLY3(i, j, k, imn, jmn, kmn, tnx, tnxny);
+
+                     int ib = ind - 1;
+                     int ie = ind + 1;
+                     int jb = ind - nx;
+                     int je = ind + nx;
+                     int kb = ind - nxny;
+                     int ke = ind + nxny;
+
+                     //
+                     // vector is now a max gradient in xi, eta, zeta
+                     //
+                     dv_xi[0] = xfact
+                        * MAX(fabs(lvar[ind] - lvar[ib]),
+                           fabs(lvar[ind] - lvar[ie]));
+                     dv_xi[1] = xfact
+                        * MAX(fabs(lvar[ind] - lvar[jb]),
+                           fabs(lvar[ind] - lvar[je]));
+                     dv_xi[2] = xfact
+                        * MAX(fabs(lvar[ind] - lvar[kb]),
+                           fabs(lvar[ind] - lvar[ke]));
+
+                     //
+                     // convert vector to max gradine in x, y, z
+                     //
+                     int n1 = POLY3(i,
+                           j,
+                           k,
+                           nd_imin,
+                           nd_jmin,
+                           nd_kmin,
+                           nd_nx,
+                           nd_nxny);                                               // -1, -1, -1
+                     int n2 = n1 + 1;                                              //  1, -1, -1
+                     int n3 = n1 + 1 + nd_nx;                                      //  1,  1, -1
+                     int n4 = n1 + nd_nx;                                          // -1,  1, -1
+
+                     int n5 = n1 + nd_nxny;                                        // -1, -1,  1
+                     int n6 = n1 + nd_nxny + 1;                              //  1, -1,  1
+                     int n7 = n1 + nd_nxny + 1 + nd_nx;                      //  1,  1,  1
+                     int n8 = n1 + nd_nxny + nd_nx;                                  // -1,  1,  1
+
+                     // ------------------------------------------------ x
+
+                     double x1 = 0.25 * (x[n1] + x[n4] + x[n5] + x[n8]);  // xi
+                     double x2 = 0.25 * (x[n2] + x[n3] + x[n6] + x[n7]);
+
+                     double x3 = 0.25 * (x[n1] + x[n2] + x[n5] + x[n6]);  // eta
+                     double x4 = 0.25 * (x[n3] + x[n4] + x[n7] + x[n8]);
+
+                     double x5 = 0.25 * (x[n1] + x[n2] + x[n3] + x[n4]);  // zeta
+                     double x6 = 0.25 * (x[n5] + x[n6] + x[n7] + x[n8]);
+
+                     // ------------------------------------------------ y
+
+                     double y1 = 0.25 * (y[n1] + y[n4] + y[n5] + y[n8]);
+                     double y2 = 0.25 * (y[n2] + y[n3] + y[n6] + y[n7]);
+
+                     double y3 = 0.25 * (y[n1] + y[n2] + y[n5] + y[n6]);
+                     double y4 = 0.25 * (y[n3] + y[n4] + y[n7] + y[n8]);
+
+                     double y5 = 0.25 * (y[n1] + y[n2] + y[n3] + y[n4]);
+                     double y6 = 0.25 * (y[n5] + y[n6] + y[n7] + y[n8]);
+
+                     // ------------------------------------------------ z
+
+                     double z1 = 0.25 * (z[n1] + z[n4] + z[n5] + z[n8]);
+                     double z2 = 0.25 * (z[n2] + z[n3] + z[n6] + z[n7]);
+
+                     double z3 = 0.25 * (z[n1] + z[n2] + z[n5] + z[n6]);
+                     double z4 = 0.25 * (z[n3] + z[n4] + z[n7] + z[n8]);
+
+                     double z5 = 0.25 * (z[n1] + z[n2] + z[n3] + z[n4]);
+                     double z6 = 0.25 * (z[n5] + z[n6] + z[n7] + z[n8]);
+
+                     //
+                     // the components of the matrices that we want to invert
+                     //
+                     double dx_xi = 0.5 * (x2 - x1);
+                     double dy_xi = 0.5 * (y2 - y1);
+                     double dz_xi = 0.5 * (z2 - z1);
+
+                     double dx_eta = 0.5 * (x4 - x3);
+                     double dy_eta = 0.5 * (y4 - y3);
+                     double dz_eta = 0.5 * (z4 - z3);
+
+                     double dx_zeta = 0.5 * (x6 - x5);
+                     double dy_zeta = 0.5 * (y6 - y5);
+                     double dz_zeta = 0.5 * (z6 - z5);
+
+                     //
+                     // invert dx/dxi as in dx/dxi d/dx = d/dxi, note this
+                     // is the transpose of the above matrix M, also via
+                     // Kramer's rule
+                     //
+                     double detMt = (dx_xi * dy_eta * dz_zeta
+                                     + dx_eta * dy_zeta * dz_xi
+                                     + dx_zeta * dy_xi * dz_eta
+                                     - dx_zeta * dy_eta * dz_xi
+                                     - dx_eta * dy_xi * dz_zeta
+                                     - dx_xi * dy_zeta * dz_eta);
+
+                     double detC11 = dy_eta * dz_zeta - dz_eta * dy_zeta;
+                     double detC21 = dx_eta * dz_zeta - dz_eta * dx_zeta;
+                     double detC31 = dx_eta * dy_zeta - dy_eta * dx_zeta;
+
+                     double detC12 = dy_xi * dz_zeta - dz_xi * dy_zeta;
+                     double detC22 = dx_xi * dz_zeta - dz_xi * dx_zeta;
+                     double detC32 = dx_xi * dy_zeta - dy_xi * dx_zeta;
+
+                     double detC13 = dy_xi * dz_eta - dz_xi * dy_eta;
+                     double detC23 = dx_xi * dz_eta - dz_xi * dx_eta;
+                     double detC33 = dx_xi * dy_eta - dy_xi + dx_eta;
+
+                     // -------------------
+
+                     double b11 = detC11 / detMt;
+                     double b21 = detC21 / detMt;
+                     double b31 = detC31 / detMt;
+
+                     double b12 = detC12 / detMt;
+                     double b22 = detC22 / detMt;
+                     double b32 = detC32 / detMt;
+
+                     double b13 = detC13 / detMt;
+                     double b23 = detC23 / detMt;
+                     double b33 = detC33 / detMt;
+
+                     //
+                     // determine the maximum gradient in x, y and z (nice orthonormal basis)
+                     //
+                     dv_x[0] = b11 * dv_xi[0] + b12 * dv_xi[1] + b13 * dv_xi[2];
+                     dv_x[1] = b21 * dv_xi[0] + b22 * dv_xi[1] + b23 * dv_xi[2];
+                     dv_x[2] = b31 * dv_xi[0] + b32 * dv_xi[1] + b33 * dv_xi[2];
+
+                     double vmax = MAX(dv_x[0], MAX(dv_x[1], dv_x[2]));
+
+                     if (vmax > tol)
+                        ltags[tind] = TRUE;
+
+                  } // i, j, k loops
+               }
+            }
+
+         } // end of state position loop
+      } // criteria = STATE_GRADIENT
+
+      //
+      // For user-defined fixed refinement, access refine box data from the MblkGeometry
+      // class.
+      //
+      if (ref == "USER_DEFINED") {
+
+         hier::BoxArray refine_boxes(d_dim, 1);
+         if (d_mblk_geometry->getRefineBoxes(refine_boxes,
+                block_number,
+                level_number)) {
+            for (int b = 0; b < refine_boxes.getNumberOfBoxes(); b++) {
+               hier::Box intersect = pbox * refine_boxes[b];
+               if (!intersect.empty()) {
+                  temp_tags->fill(TRUE, intersect);
+               }
+            }
+         }
+
+      } // criteria = USER_DEFINED
+
+   }  // loop over criteria
+
+   //
+   // Update tags
+   //
+   for (pdat::CellIterator ic(pbox); ic; ic++) {
+      (*tags)(ic(), 0) = (*temp_tags)(ic(), 0);
+   }
+
+   tbox::plog << "--------------------- end tagGradientCells" << endl;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Fill the singularity conditions for the multi-block case
+ *                                                                       *
+ *************************************************************************
+ */
+void MblkEuler::fillSingularityBoundaryConditions(
+   hier::Patch& patch,
+   tbox::List<tbox::Pointer<hier::Patch> >& sing_patches,
+   const double fill_time,
+   const hier::Box& fill_box,
+   const hier::BoundaryBox& bbox)
+{
+
+   NULL_USE(patch);
+   NULL_USE(sing_patches);
+   NULL_USE(fill_time);
+   NULL_USE(fill_box);
+   NULL_USE(bbox);
+
+   /*
+    * Here we need to specify how to fill the singularities...
+    */
+#if 0
+   for (int i = 0; i < d_variables.getSize(); i++) {
+
+      tbox::Pointer<pdat::CellData<double> > cell_data =
+         patch.getPatchData(d_variables[i], getDataContext());
+
+      hier::Box sing_fill_box(cell_data->getGhostBox() * fill_box);
+      cell_data->fillAll(0.0, sing_fill_box);
+
+      int depth = cell_data->getDepth();
+
+      /*
+       * If sing_patches is not empty, that means there is enhanced
+       * connectivity, and we get data from other blocks
+       */
+
+      if (sing_patches.size()) {
+
+         for (tbox::List
+              <xfer::MultiblockRefineSchedule::SingularityPatch>::
+              Iterator sp(sing_patches); sp; sp++) {
+            tbox::Pointer<pdat::CellData<double> > sing_data =
+               sp().d_patch->getPatchData(d_variables[i], getDataContext());
+            int sing_neighbor_id = sp().getBlockNumber();
+            for (pdat::CellIterator ci(sing_fill_box); ci; ci++) {
+               for (int d = 0; d < depth; d++) {
+                  (*cell_data)(ci(), d) += sing_neighbor_id;
+               }
+            }
+         }
+
+         for (pdat::CellIterator ci(sing_fill_box); ci; ci++) {
+            for (int d = 0; d < depth; d++) {
+               (*cell_data)(ci(), d) /= sing_patches.size();
+            }
+         }
+
+         /*
+          * In cases of reduced connectivity, there are no other blocks
+          * from which to acquire data.
+          */
+
+      } else {
+
+         cell_data->fillAll(
+            (double)bbox.getLocationIndex() + 200.0, fill_box);
+
+      }
+   }
+#endif
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private method to build XYZ coordinates on a patch                    *
+ *                                                                       *
+ *************************************************************************
+ */
+void MblkEuler::setMappedGridOnPatch(
+   const hier::Patch& patch,
+   const int block_number)
+{
+
+   //
+   // compute level domain
+   //
+   const tbox::Pointer<hier::BlockPatchGeometry>
+   patch_geom = patch.getPatchGeometry();
+   hier::IntVector ratio = patch_geom->getRatio();
+   hier::BoxArray domain_boxes(d_dim);
+   d_grid_geometries[block_number]->computePhysicalDomain(domain_boxes, ratio);
+
+   //
+   // statistics on the level domain
+   //
+   d_dom_current_nboxes = domain_boxes.getNumberOfBoxes();
+
+   d_dom_current_bounds[0] = domain_boxes[0].lower(0);
+   d_dom_current_bounds[1] = domain_boxes[0].lower(1);
+   d_dom_current_bounds[2] = domain_boxes[0].lower(2);
+   d_dom_current_bounds[3] = domain_boxes[0].upper(0);
+   d_dom_current_bounds[4] = domain_boxes[0].upper(1);
+   d_dom_current_bounds[5] = domain_boxes[0].upper(2);
+
+   for (int i = 1; i < d_dom_current_nboxes; i++) {
+      d_dom_current_bounds[0] = MIN(d_dom_current_bounds[0],
+            domain_boxes[i].lower(0));
+      d_dom_current_bounds[1] = MIN(d_dom_current_bounds[1],
+            domain_boxes[i].lower(1));
+      d_dom_current_bounds[2] = MIN(d_dom_current_bounds[2],
+            domain_boxes[i].lower(2));
+
+      d_dom_current_bounds[3] = MAX(d_dom_current_bounds[3],
+            domain_boxes[i].upper(0));
+      d_dom_current_bounds[4] = MAX(d_dom_current_bounds[4],
+            domain_boxes[i].upper(1));
+      d_dom_current_bounds[5] = MAX(d_dom_current_bounds[5],
+            domain_boxes[i].upper(2));
+   }
+
+   //
+   // now build the mesh
+   //
+   int xyz_id = hier::VariableDatabase::getDatabase()->
+      mapVariableAndContextToIndex(d_xyz, getDataContext());
+
+   d_mblk_geometry->buildGridOnPatch(patch,
+      domain_boxes[0],
+      xyz_id,
+      block_number,
+      d_dom_local_blocks);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private method to build the volume on a patch                         *
+ *                                                                       *
+ *************************************************************************
+ */
+void MblkEuler::setVolumeOnPatch(
+   const hier::Patch& patch)
+{
+   tbox::Pointer<pdat::CellData<double> > vol =
+      patch.getPatchData(d_vol, getDataContext());
+
+   tbox::Pointer<pdat::NodeData<double> > xyz =
+      patch.getPatchData(d_xyz, getDataContext());
+
+   hier::IntVector vol_ghosts = vol->getGhostCellWidth();
+   hier::IntVector xyz_ghosts = xyz->getGhostCellWidth();
+
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+
+   int imin = ifirst(0) - vol_ghosts(0);
+   int imax = ilast(0) + vol_ghosts(0);
+   int jmin = ifirst(1) - vol_ghosts(1);
+   int jmax = ilast(1) + vol_ghosts(1);
+   int kmin = ifirst(2) - vol_ghosts(2);
+   int nx = imax - imin + 1;
+   int ny = jmax - jmin + 1;
+   int nxny = nx * ny;
+
+   int nd_imin = ifirst(0) - xyz_ghosts(0);
+   int nd_imax = ilast(0) + 1 + xyz_ghosts(0);
+   int nd_jmin = ifirst(1) - xyz_ghosts(1);
+   int nd_jmax = ilast(1) + 1 + xyz_ghosts(1);
+   int nd_kmin = ifirst(2) - xyz_ghosts(2);
+   int nd_nx = nd_imax - nd_imin + 1;
+   int nd_ny = nd_jmax - nd_jmin + 1;
+   int nd_nxny = nd_nx * nd_ny;
+
+   double* cvol = vol->getPointer();
+
+   double* x = xyz->getPointer(0);
+   double* y = xyz->getPointer(1);
+   double* z = xyz->getPointer(2);
+
+   for (int k = ifirst(2); k <= ilast(2); k++) {
+      for (int j = ifirst(1); j <= ilast(1); j++) {
+         for (int i = ifirst(0); i <= ilast(0); i++) {
+
+            int cind = POLY3(i, j, k, imin, jmin, kmin, nx, nxny);
+
+            int n1 = POLY3(i, j, k, nd_imin, nd_jmin, nd_kmin, nd_nx, nd_nxny);
+            int n2 = n1 + 1;
+            int n3 = n1 + 1 + nd_nx;
+            int n4 = n1 + nd_nx;
+
+            int n5 = n1 + nd_nxny;
+            int n6 = n1 + nd_nxny + 1;
+            int n7 = n1 + nd_nxny + 1 + nd_nx;
+            int n8 = n1 + nd_nxny + nd_nx;
+
+            double lvol = UpwindVolume(x[n1], x[n2], x[n3], x[n4],
+                  x[n5], x[n6], x[n7], x[n8],
+
+                  y[n1], y[n2], y[n3], y[n4],
+                  y[n5], y[n6], y[n7], y[n8],
+
+                  z[n1], z[n2], z[n3], z[n4],
+                  z[n5], z[n6], z[n7], z[n8]);
+
+            cvol[cind] = lvol;
+         }
+      }
+   }
+}
+
+// ================================= MblkEuler::Visualization and IO =============================
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register VisIt data writer to write data to plot files that may       *
+ * be postprocessed by the VisIt tool.                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+#ifdef HAVE_HDF5
+void MblkEuler::registerVisItDataWriter(
+   tbox::Pointer<appu::VisItDataWriter> viz_writer)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(viz_writer.isNull()));
+#endif
+   d_visit_writer = viz_writer;
+}
+#endif
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Write MblkEuler object state to specified stream.                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkEuler::printClassData(
+   ostream& os) const
+{
+   int j;
+
+   os << "\nMblkEuler::printClassData..." << endl;
+   os << "MblkEuler: this = " << (MblkEuler *)this << endl;
+   os << "d_object_name = " << d_object_name << endl;
+   os << "d_grid_geometries = " << endl;
+   for (j = 0; j < d_grid_geometries.getSize(); j++) {
+//      os << (geom::BlockGridGeometry*)d_grid_geometries[j] << endl;
+   }
+
+   // ----------------------------------------------
+
+   os << "Parameters for numerical method ..." << endl;
+   os << "   d_advection_velocity = ";
+   for (j = 0; j < d_dim.getValue(); j++) os << d_advection_velocity[j] << " ";
+   os << endl;
+
+   os << "   d_nghosts    = " << d_nghosts << endl;
+   os << "   d_fluxghosts = " << d_fluxghosts << endl;
+
+   os << "Problem description and initial data..." << endl;
+   os << "   d_data_problem = " << d_data_problem << endl;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Read data members from input.  All values set from restart can be	*
+ * overridden by values in the input database.
+ *                                                                       *
+ *************************************************************************
+ */
+void MblkEuler::getFromInput(
+   tbox::Pointer<tbox::Database> input_db,
+   bool is_from_restart)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!input_db.isNull());
+#endif
+
+   tbox::Pointer<tbox::Database> db = input_db->getDatabase("MblkEuler");
+
+   //
+   // --------------- load balancing inputs
+   //
+   // Note: if we are restarting, then we only allow nonuniform
+   // workload to be used if nonuniform workload was used originally.
+   //
+   if (!is_from_restart) {
+      d_use_nonuniform_workload =
+         db->getBoolWithDefault("use_nonuniform_workload",
+            d_use_nonuniform_workload);
+   } else {
+      if (d_use_nonuniform_workload) {
+         d_use_nonuniform_workload =
+            db->getBool("use_nonuniform_workload");
+      }
+   }
+
+   //
+   // --------------- initialize boundary condition factors
+   //
+   if (db->keyExists("wall_factors")) {
+      d_wall_factors = db->getIntegerArray("wall_factors");
+   } else {
+      d_wall_factors.resizeArray(6);
+      for (int i = 0; i < 6; i++) d_wall_factors[i] = 0;
+   }
+
+   //
+   // --------------- process the linear advection test ---------------------
+   //
+   d_advection_test = 0;
+   d_advection_velocity[0] = d_advection_velocity[1] =
+         d_advection_velocity[2] = FLT_MAX;
+   d_advection_vel_type = 0;
+   if (db->keyExists("advection_test")) {
+      d_advection_test = db->getInteger("advection_test");
+      if (db->keyExists("advection_velocity")) {
+         db->getDoubleArray("advection_velocity",
+            d_advection_velocity, d_dim.getValue());
+         d_advection_vel_type = db->getInteger("advection_vel_type");
+      } else {
+         TBOX_ERROR(
+            d_object_name << ":  "
+            <<
+            "Key data `advection_velocity' not found in input.");
+      }
+   }
+
+   //
+   // --------------- The state names inputs ---------------------
+   //
+   if (d_advection_test) {
+      if (db->keyExists("state_names")) {
+         d_state_names = db->getStringArray("state_names");
+         d_nState = d_state_names.getSize();
+      } else {
+         TBOX_ERROR("missing 'state_names' input for sizing the state" << endl);
+      }
+   } else {
+      TBOX_ASSERT(d_advection_test);
+   }
+
+   //
+   // --------------- region Initialization inputs ---------------------
+   //
+   if (!is_from_restart) {
+
+      if (db->keyExists("data_problem")) {
+         d_data_problem = db->getString("data_problem");
+      } else {
+         TBOX_ERROR(
+            d_object_name << ": "
+            << "`data_problem' value not found in input."
+            << endl);
+      }
+
+      int problem_1d = 1;
+
+      //
+      //  axis of revolution inputs
+      //
+      if (d_data_problem == "REVOLUTION") {
+
+         if (db->keyExists("center")) {
+            db->getDoubleArray("center", d_center, d_dim.getValue());
+         } else {
+            TBOX_ERROR(
+               "`center' input required for REVOLUTION problem." << endl);
+         }
+
+         if (db->keyExists("axis")) {
+            db->getDoubleArray("axis", d_axis, d_dim.getValue());
+         } else {
+            TBOX_ERROR("`axis' input required for REVOLUTION problem." << endl);
+         }
+
+         // normalize the axis to a unit vector
+         double anorm = sqrt(
+               d_axis[0] * d_axis[0] + d_axis[1] * d_axis[1] + d_axis[2]
+               * d_axis[2]);
+         d_axis[0] /= anorm;
+         d_axis[1] /= anorm;
+         d_axis[2] /= anorm;
+
+         d_rev_rad.resizeArray(d_number_of_regions);
+         d_rev_axis.resizeArray(d_number_of_regions);
+
+         for (int i = 0; i < d_number_of_regions; i++) {
+
+            char tmp[20];
+            sprintf(tmp, "region_%d", i + 1);  //
+            string lkey = tmp;
+            tbox::Pointer<tbox::Database> region_db = db->getDatabase(lkey);
+
+            d_rev_rad[i] = region_db->getDoubleArray("radius");
+            d_rev_axis[i] = region_db->getDoubleArray("axis");
+
+         }
+
+         problem_1d = 0;
+      }
+
+      //
+      //  Spherical inputs
+      //
+      if (d_data_problem == "SPHERE") {
+
+         if (db->keyExists("center")) {
+            db->getDoubleArray("center", d_center, d_dim.getValue());
+         } else {
+            TBOX_ERROR("`center' input required for SPHERE problem." << endl);
+         }
+      }
+
+      //
+      //  Rayleigh tayler shock tube inputs
+      //
+      if (d_data_problem == "RT_SHOCK_TUBE") {
+
+         if (db->keyExists("amn")) {
+            d_dt_ampl = db->getDouble("ampl");
+            d_amn = db->getDoubleArray("amn");
+            d_m_mode = db->getDoubleArray("m_mode");
+            d_n_mode = db->getDoubleArray("n_mode");
+            d_phiy = db->getDoubleArray("phiy");
+            d_phiz = db->getDoubleArray("phiz");
+         } else {
+            TBOX_ERROR("missing input for RT_SHOCK_TUBE problem." << endl);
+         }
+      }
+
+      //
+      //  shared inputs for the 1d style problems
+      //
+      if (problem_1d) {
+         if (db->keyExists("front_position")) {
+            d_front_position = db->getDoubleArray("front_position");
+            d_number_of_regions = d_front_position.getSize() - 1;
+            TBOX_ASSERT(d_number_of_regions > 0);
+         } else {
+            TBOX_ERROR("Missing`front_position' input required" << endl);
+         }
+      }
+
+      //
+      // the state data entries for the initial conditions
+      //
+//      int llen = d_number_of_regions*d_nState;
+//     //double *tmp = new double[llen];
+//    tbox::Array<double> tmp(llen);
+//   for ( int ii = 0 ; ii < llen ; ii++ ) {
+//	 tmp[ii] = FLT_MAX;
+//     }
+
+      d_state_ic.resizeArray(d_number_of_regions);
+      //d_state_ic  = new double *[d_number_of_regions];
+      for (int iReg = 0; iReg < d_number_of_regions; iReg++) {
+         d_state_ic[iReg].resizeArray(d_nState);
+         //d_state_ic[iReg] = tmp[d_nState*iReg];
+      }
+
+      //
+      // pull in the data for each region
+      //
+      if (d_advection_test) {
+         if (db->keyExists("state_data")) {
+            tbox::Pointer<tbox::Database> state_db = db->getDatabase(
+                  "state_data");
+            tbox::Array<double> lpsi;
+            for (int iState = 0; iState < d_nState; iState++) {
+               lpsi = state_db->getDoubleArray(d_state_names[iState]);
+               for (int iReg = 0; iReg < d_number_of_regions; iReg++) {
+                  d_state_ic[iReg][iState] = lpsi[iReg];
+               }
+            }
+         } else {
+            TBOX_ERROR(
+               "missing 'state_data' input for initial conditions" << endl);
+         }
+      } else {
+         TBOX_ASSERT(d_advection_test);
+      }
+
+   } // if !is_from_restart read in problem data
+
+   //
+   //  --------------- refinement criteria inputs
+   //
+   if (db->keyExists("Refinement_data")) {
+      tbox::Pointer<tbox::Database> refine_db = db->getDatabase(
+            "Refinement_data");
+      tbox::Array<string> refinement_keys = refine_db->getAllKeys();
+      int num_keys = refinement_keys.getSize();
+
+      if (refine_db->keyExists("refine_criteria")) {
+         d_refinement_criteria =
+            refine_db->getStringArray("refine_criteria");
+      } else {
+         TBOX_WARNING(
+            d_object_name << ": "
+            <<
+            "No key `refine_criteria' found in data for"
+            <<
+            " RefinementData. No refinement will occur." << endl);
+      }
+
+      tbox::Array<string> ref_keys_defined(num_keys);
+      int def_key_cnt = 0;
+      tbox::Pointer<tbox::Database> error_db;
+      for (int i = 0; i < refinement_keys.getSize(); i++) {
+
+         string error_key = refinement_keys[i];
+         error_db.setNull();
+
+         if (!(error_key == "refine_criteria")) {
+
+            //
+            // allow only valid refinement criteria as the remaining keys
+            //
+            if (!(error_key == "GRADIENT")) {
+
+               TBOX_ERROR(
+                  "Unknown refinement criteria: " << error_key
+                  << " in input."
+                  << endl);
+
+            } else {
+               error_db = refine_db->getDatabase(error_key);
+               ref_keys_defined[def_key_cnt] = error_key;
+               def_key_cnt++;
+            }
+
+            //
+            // process the specific keys
+            //
+            if (!error_db.isNull() && error_key == "GRADIENT") {
+
+               d_state_grad_names = error_db->getStringArray("names");
+               int nStateLocal = d_state_grad_names.getSize();
+
+               d_state_grad_tol.resizeArray(nStateLocal);
+               d_state_grad_id.resizeArray(nStateLocal);
+
+               for (int id = 0; id < nStateLocal; id++) {
+                  string grad_name = d_state_grad_names[id];
+
+                  // ... the index needed
+                  d_state_grad_id[id] = -1;
+                  bool found = false;
+                  for (int idj = 0; idj < d_nState && !found; idj++) {
+                     if (grad_name == d_state_names[idj]) {
+                        found = true;
+                        d_state_grad_id[id] = idj;
+                     }
+                  }
+
+                  // ... the tolerance array needed
+                  if (error_db->keyExists(grad_name)) {
+                     d_state_grad_tol[id] = error_db->getDoubleArray(grad_name);
+                  } else {
+                     TBOX_ERROR(
+                        "No tolerance array " << grad_name
+                        << "found for gradient detector" << endl);
+                  }
+
+               }
+            }
+
+         } // refine criteria if test
+
+      } // loop over refine criteria
+
+   } // refine db entry exists
+
+   //
+   // --------------- boundary condition inputs ---------------------
+   //
+   hier::IntVector periodic = d_grid_geometries[0]->getPeriodicShift(
+         hier::IntVector(d_dim, 1));
+   int num_per_dirs = 0;
+   for (int id = 0; id < d_dim.getValue(); id++) {
+      if (periodic(id)) num_per_dirs++;
+   }
+
+   /*
+    * If there are multiple blocks, periodicity is not currently supported.
+    */
+   if ((d_grid_geometries.getSize() > 1) && (num_per_dirs > 0)) {
+      TBOX_ERROR(d_object_name << ": cannot have periodic BCs when there"
+                               << "\nare multiple blocks." << endl);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to put/get data members to/from restart database.            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkEuler::putToDatabase(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   db->putInteger("MBLKEULER_VERSION", MBLKEULER_VERSION);
+
+   db->putDoubleArray("d_advection_velocity", d_advection_velocity, d_dim.getValue());
+
+   db->putIntegerArray("d_nghosts", &d_nghosts[0], d_dim.getValue());
+   db->putIntegerArray("d_fluxghosts", &d_fluxghosts[0], d_dim.getValue());
+
+   db->putString("d_data_problem", d_data_problem);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ *    Access class information from restart database.                    *
+ *                                                                       *
+ *************************************************************************
+ */
+void MblkEuler::getFromRestart()
+{
+   tbox::Pointer<tbox::Database> root_db =
+      tbox::RestartManager::getManager()->getRootDatabase();
+
+   tbox::Pointer<tbox::Database> db;
+   if (root_db->isDatabase(d_object_name)) {
+      db = root_db->getDatabase(d_object_name);
+   } else {
+      TBOX_ERROR("Restart database corresponding to "
+         << d_object_name << " not found in restart file.");
+   }
+
+   int ver = db->getInteger("MBLKEULER_VERSION");
+   if (ver != MBLKEULER_VERSION) {
+      TBOX_ERROR(
+         d_object_name << ":  "
+         <<
+         "Restart file version different than class version.");
+   }
+
+   d_data_problem = db->getString("d_data_problem");
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routine to check boundary data when debugging.                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkEuler::checkBoundaryData(
+   int btype,
+   const hier::Patch& patch,
+   const hier::IntVector& ghost_width_to_check,
+   const tbox::Array<int>& scalar_bconds) const
+{
+   NULL_USE(btype);
+   NULL_USE(patch);
+   NULL_USE(ghost_width_to_check);
+   NULL_USE(scalar_bconds);
+}
+
+hier::IntVector MblkEuler::getMultiblockRefineOpStencilWidth() const
+{
+   return hier::IntVector(d_dim, 1);
+}
+
+hier::IntVector MblkEuler::getMultiblockCoarsenOpStencilWidth()
+{
+   return hier::IntVector(d_dim, 0);
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkEuler/MblkEuler.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkEuler/MblkEuler.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,430 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Numerical routines for single patch in linear advection ex. 
+ *
+ ************************************************************************/
+
+#ifndef included_MblkEulerXD
+#define included_MblkEulerXD
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Serializable.h"
+#include "SAMRAI/tbox/Database.h"
+
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "SAMRAI/geom/BlockGridGeometry.h"
+
+#include "SAMRAI/appu/BoundaryUtilityStrategy.h"
+#include "SAMRAI/mesh/MultiblockGriddingAlgorithm.h"
+
+#include <string>
+using namespace std;
+#define included_String
+
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/appu/VisItDataWriter.h"
+
+#include "MblkGeometry.h"
+#include "SAMRAI/xfer/MultiblockRefineSchedule.h"
+#include "MblkHyperbolicLevelIntegrator.h"
+#include "MblkHyperbolicPatchStrategy.h"
+
+// ----------------------------------------------------------------------
+
+using namespace SAMRAI;
+
+class MblkEuler:
+   public tbox::Serializable,
+   public MblkHyperbolicPatchStrategy,
+   public appu::BoundaryUtilityStrategy
+{
+public:
+   //
+   // the constructor and destructor
+   //
+   MblkEuler(
+      const string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> input_db,
+      tbox::Array<tbox::Pointer<hier::GridGeometry> >& grid_geoms);
+
+   ~MblkEuler();
+
+   //
+   // register with the framework
+   //
+   void
+   registerModelVariables(
+      MblkHyperbolicLevelIntegrator* integrator);
+
+   //
+   // set the patch initial conditions
+   //
+   void
+   initializeDataOnPatch(
+      hier::Patch& patch,
+      const double data_time,
+      const bool initial_time);
+
+   //
+   // Compute the stable time increment for patch using a CFL
+   // condition and return the computed dt.
+   //
+   double
+   computeStableDtOnPatch(
+      hier::Patch& patch,
+      const bool initial_time,
+      const double dt_time);
+
+   //
+   // compute the state extrema for debugging
+   //
+   void
+   testPatchExtrema(
+      hier::Patch& patch,
+      const char* pos);
+
+   //
+   // compute the fluxes and the initial update in a timestep
+   //
+   void
+   computeFluxesOnPatch(
+      hier::Patch& patch,
+      const double time,
+      const double dt);
+
+   //
+   // update the state (currently only for refluxing)
+   //
+   void
+   conservativeDifferenceOnPatch(
+      hier::Patch& patch,
+      const double time,
+      const double dt,
+      bool at_syncronization);
+
+   //
+   // Tag cells for refinement using gradient detector.
+   //
+   void
+   tagGradientDetectorCells(
+      hier::Patch& patch,
+      const double regrid_time,
+      const bool initial_error,
+      const int tag_indexindx,
+      const bool uses_richardson_extrapolation_too);
+
+   //
+   //  The following routines:
+   //
+   //      postprocessRefine()
+   //      setPhysicalBoundaryConditions()
+   //
+   //  are concrete implementations of functions declared in the
+   //  RefinePatchStrategy abstract base class.
+   //
+
+   //
+   // mark the zones to track what zones are being filled
+   //
+   void
+   markPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const hier::IntVector& ghost_width_to_fill);
+
+   //
+   // set the data in the physical ghost zones
+   //
+   void
+   setPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const double fill_time,
+      const hier::IntVector&
+      ghost_width_to_fill);
+
+   //
+   // Refine operations for cell data.
+   //
+   void
+   preprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio);
+
+   void
+   postprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio);
+
+   //
+   // Coarsen operations for cell data.
+   //
+   void
+   preprocessCoarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio);
+
+   void
+   postprocessCoarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio);
+
+   /**
+    * Fill the singularity conditions for the multi-block case
+    */
+   void
+   fillSingularityBoundaryConditions(
+      hier::Patch& patch,
+      tbox::List<tbox::Pointer<hier::Patch> >& sing_patches,
+      const double fill_time,
+      const hier::Box& fill_box,
+      const hier::BoundaryBox& bbox);
+
+   /**
+    * Build mapped grid on patch
+    */
+   void
+   setMappedGridOnPatch(
+      const hier::Patch& patch,
+      const int block_number);
+
+   //
+   // build the volume on a mapped grid
+   //
+   void
+   setVolumeOnPatch(
+      const hier::Patch& patch);
+
+   /**
+    * Write state of MblkEuler object to the given database for restart.
+    *
+    * This routine is a concrete implementation of the function
+    * declared in the tbox::Serializable abstract base class.
+    */
+   void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> db);
+
+   hier::IntVector
+   getMultiblockRefineOpStencilWidth() const;
+   hier::IntVector
+   getMultiblockCoarsenOpStencilWidth();
+
+#ifdef HAVE_HDF5
+   /**
+    * Register a VisIt data writer so this class will write
+    * plot files that may be postprocessed with the VisIt
+    * visualization tool.
+    */
+   void
+   registerVisItDataWriter(
+      tbox::Pointer<appu::VisItDataWriter> viz_writer);
+#endif
+
+   /**
+    * Print all data members for MblkEuler class.
+    */
+   void
+   printClassData(
+      ostream& os) const;
+
+private:
+   /*
+    * These private member functions read data from input and restart.
+    * When beginning a run from a restart file, all data members are read
+    * from the restart file.  If the boolean flag is true when reading
+    * from input, some restart values may be overridden by those in the
+    * input file.
+    *
+    * An assertion results if the database pointer is null.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db,
+      bool is_from_restart);
+
+   void
+   getFromRestart();
+
+   /*
+    * Private member function to check correctness of boundary data.
+    */
+   void
+   checkBoundaryData(
+      int btype,
+      const hier::Patch& patch,
+      const hier::IntVector& ghost_width_to_fill,
+      const tbox::Array<int>& scalar_bconds) const;
+
+   /*
+    * The object name is used for error/warning reporting and also as a
+    * string label for restart database entries.
+    */
+   string d_object_name;
+
+   const tbox::Dimension d_dim;
+
+   /*
+    * We cache pointers to the grid geometry and Vizamrai data writer
+    * object to set up initial data, set physical boundary conditions,
+    * and register plot variables.
+    */
+   tbox::Array<tbox::Pointer<hier::GridGeometry> >
+   d_grid_geometries;
+#ifdef HAVE_HDF5
+   tbox::Pointer<appu::VisItDataWriter> d_visit_writer;
+#endif
+
+   //
+   // Data items used for nonuniform load balance, if used.
+   //
+   tbox::Pointer<pdat::CellVariable<double> > d_workload_variable;
+   int d_workload_data_id;
+   bool d_use_nonuniform_workload;
+
+   //
+   // =========================== State and Variable definitions (private) ============================
+   //
+
+   //
+   // tbox::Pointer to state variable vector - [state]
+   //
+   int d_nState;  // depth of the state vector
+   tbox::Pointer<pdat::CellVariable<double> > d_state;
+
+   //
+   // tbox::Pointer to cell volume - [v]
+   //
+   tbox::Pointer<pdat::CellVariable<double> > d_vol;
+
+   //
+   // tbox::Pointer to flux variable vector  - [F]
+   //
+   tbox::Pointer<pdat::SideVariable<double> > d_flux;
+
+   //
+   // tbox::Pointer to grid - [xyz]
+   //
+   tbox::Pointer<pdat::NodeVariable<double> > d_xyz;
+   int d_xyz_id;
+
+   //
+   // ======================================= Initial Conditions (private) ============================
+   //
+
+   /// center of the sphere or revolution origin
+   double d_center[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   /// revolution axis
+   double d_axis[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   /// revolution radius and pos on axis of radius
+   tbox::Array<tbox::Array<double> > d_rev_rad;
+   tbox::Array<tbox::Array<double> > d_rev_axis;
+
+   ///
+   /// Rayleigh Taylor Shock tube experiments
+   ///
+   double d_dt_ampl;
+   tbox::Array<double> d_amn;
+   tbox::Array<double> d_m_mode;
+   tbox::Array<double> d_n_mode;
+   tbox::Array<double> d_phiy;
+   tbox::Array<double> d_phiz;
+
+   ///
+   /// input for all the geometries
+   ///
+
+   //
+   // linear advection velocity vector for unit test
+   //
+   int d_advection_test;      // run the linear advection unit test
+   int d_advection_vel_type;  // type of velocity to use
+   double d_advection_velocity[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   //
+   // sizing of zonal, flux, and nodal ghosts
+   //
+   hier::IntVector d_nghosts;
+   hier::IntVector d_fluxghosts;
+   hier::IntVector d_nodeghosts;
+
+   //
+   // Indicator for problem type and initial conditions
+   //
+   string d_data_problem;
+
+   //
+   // region initialization inputs
+   //
+   int d_number_of_regions;
+   tbox::Array<double> d_front_position;
+
+   //
+   // array of initial conditions and their names [region][state]
+   //
+   tbox::Array<tbox::Array<double> > d_state_ic;
+   tbox::Array<string> d_state_names;
+
+   //
+   // This class stores geometry information used for constructing the
+   // mapped multiblock hierarchy
+   //
+   MblkGeometry* d_mblk_geometry;
+
+   /// the bound on the index space for the current block
+   int d_dom_current_bounds[6];
+
+   /// the number of boxes needed to describe the index space for the current block
+   int d_dom_current_nboxes;
+
+   /// the blocks bounding the current patch
+   int d_dom_local_blocks[6];
+
+   //
+   // ======================================= Refinement Data (private) ============================
+   //
+
+   tbox::Array<string> d_refinement_criteria;
+
+   /// history variable gradient tagging tolerance
+   tbox::Array<tbox::Array<double> > d_state_grad_tol;
+   tbox::Array<string> d_state_grad_names;
+   tbox::Array<int> d_state_grad_id;
+
+   //
+   // ======================================= Boundary Conditions (private) ============================
+   //
+
+   /// factors for the boundary conditions
+   tbox::Array<int> d_wall_factors;
+
+   //
+   // Operators to be used with BlockGridGeometry
+   //
+   tbox::Pointer<xfer::TimeInterpolateOperator> d_cell_time_interp_op;
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkEuler/MblkEulerFort.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkEuler/MblkEulerFort.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,15 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   F77 external declarations for SAMRAI linear advection example. 
+ *
+ ************************************************************************/
+
+#include <math.h>
+#include <signal.h>
+
+// extern "C" {
+// }
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkEuler/MblkGeometry.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkEuler/MblkGeometry.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1173 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   set geometry for multiblock domain 
+ *
+ ************************************************************************/
+
+#include "MblkGeometry.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#define MAX(a, b) (a > b ? a : b)
+#define MIN(a, b) (a < b ? a : b)
+
+#define POLY3(i, j, k, imin, jmin, kmin, nx, nxny) \
+   ((i - imin) + (j - jmin) * (nx) + (k - kmin) * (nxny))
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * This class creates mapped multi-block grid geometrys
+ *                                                                       *
+ *************************************************************************
+ */
+MblkGeometry::MblkGeometry(
+   const std::string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> input_db,
+   const int nblocks):
+   d_dim(dim)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!input_db.isNull());
+#endif
+
+   d_object_name = object_name;
+   //tbox::RestartManager::getManager()->registerRestartItem(d_object_name, this);
+
+   d_nblocks = nblocks;
+
+   getFromInput(input_db);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Empty destructor.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+MblkGeometry::~MblkGeometry()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return the geometry (CARTESIAN, WEDGE, TRILINEAR or SPHERICAL_SHELL)
+ *                                                                       *
+ *************************************************************************
+ */
+std::string MblkGeometry::getGeometryType()
+{
+   return d_geom_problem;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return the user-specified refine boxes for a particular block/level
+ * number.  If no boxes exist, it returns false.  If they do exist, it
+ * returns true and sets the refine boxes argument.
+ *                                                                       *
+ *************************************************************************
+ */
+bool MblkGeometry::getRefineBoxes(
+   hier::BoxArray& refine_boxes,
+   const int block_number,
+   const int level_number)
+{
+   bool boxes_exist = false;
+   if (block_number < d_refine_boxes.getSize()) {
+      if (level_number < d_refine_boxes[level_number].getSize()) {
+         boxes_exist = true;
+         refine_boxes = d_refine_boxes[block_number][level_number];
+      }
+   }
+   return boxes_exist;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Read data members from input.  All values set from restart can be	*
+ * overridden by values in the input database.
+ *                                                                       *
+ *************************************************************************
+ */
+void MblkGeometry::getFromInput(
+   tbox::Pointer<tbox::Database> input_db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!input_db.isNull());
+#endif
+
+   tbox::Pointer<tbox::Database> db = input_db->getDatabase("MblkGeometry");
+
+   d_geom_problem = db->getString("problem_type");
+
+   bool found = false;
+   int i, nb;
+   char block_name[128];
+   double temp_domain[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   //
+   // Cartesian geometry
+   //
+   if (d_geom_problem == "CARTESIAN") {
+
+      tbox::Pointer<tbox::Database> cart_db =
+         db->getDatabase("CartesianGeometry");
+
+      d_cart_xlo.resizeArray(d_nblocks);
+      d_cart_xhi.resizeArray(d_nblocks);
+
+      for (nb = 0; nb < d_nblocks; nb++) {
+
+         // xlo
+         sprintf(block_name, "domain_xlo_%d", nb);
+         if (!cart_db->keyExists(block_name)) {
+            TBOX_ERROR(d_object_name << ":  "
+                                     << "Key data `" << block_name
+                                     << "' domain_xlo for block " << nb
+                                     << " not found in input." << std::endl);
+         }
+         d_cart_xlo[nb].resizeArray(d_dim.getValue());
+         cart_db->getDoubleArray(block_name, temp_domain, d_dim.getValue());
+         for (i = 0; i < d_dim.getValue(); i++) {
+            d_cart_xlo[nb][i] = temp_domain[i];
+         }
+
+         // xhi
+         sprintf(block_name, "domain_xhi_%d", nb);
+         if (!cart_db->keyExists(block_name)) {
+            TBOX_ERROR(d_object_name << ":  "
+                                     << "Key data `" << block_name
+                                     << "' domain_xhi for block " << nb
+                                     << " not found in input." << std::endl);
+         }
+         d_cart_xhi[nb].resizeArray(d_dim.getValue());
+         cart_db->getDoubleArray(block_name, temp_domain, d_dim.getValue());
+         for (i = 0; i < d_dim.getValue(); i++) {
+            d_cart_xhi[nb][i] = temp_domain[i];
+         }
+
+      }
+      found = true;
+   }
+
+   //
+   // Wedge geometry
+   //
+   if (d_geom_problem == "WEDGE") {
+
+      tbox::Pointer<tbox::Database> wedge_db =
+         db->getDatabase("WedgeGeometry");
+
+      d_wedge_rmin.resizeArray(d_nblocks);
+      d_wedge_rmax.resizeArray(d_nblocks);
+
+      for (nb = 0; nb < d_nblocks; nb++) {
+
+         // rmin
+         sprintf(block_name, "rmin_%d", nb);
+         if (!wedge_db->keyExists(block_name)) {
+            TBOX_ERROR(d_object_name << ":  "
+                                     << "Key data `" << block_name
+                                     << "' rmin for block " << nb
+                                     << " not found in input." << std::endl);
+         }
+
+         d_wedge_rmin[nb] = wedge_db->getDouble(block_name);
+
+         // rmax
+         sprintf(block_name, "rmax_%d", nb);
+         if (!wedge_db->keyExists(block_name)) {
+            TBOX_ERROR(d_object_name << ":  "
+                                     << "Key data `" << block_name
+                                     << "' rmax for block " << nb
+                                     << " not found in input." << std::endl);
+         }
+
+         d_wedge_rmax[nb] = wedge_db->getDouble(block_name);
+
+         // theta min/max
+         d_wedge_thmin = wedge_db->getDouble("thmin");
+         d_wedge_thmax = wedge_db->getDouble("thmax");
+
+         // Z min/max
+         d_wedge_zmin = wedge_db->getDouble("zmin");
+         d_wedge_zmax = wedge_db->getDouble("zmax");
+
+      }
+      found = true;
+   }
+
+   //
+   // Trilinear geometry, just read in the base blocks
+   //
+   if (d_geom_problem == "TRILINEAR") {
+
+      tbox::Pointer<tbox::Database> tri_db =
+         db->getDatabase("TrilinearGeometry");
+
+      d_tri_mesh_filename = tri_db->getString("mesh_filename");
+
+      FILE* fid = fopen(d_tri_mesh_filename.c_str(), "rb");
+      int rtest = 0;
+
+      // --------- number of blocks
+      rtest = static_cast<int>(fread(&d_tri_nblocks, sizeof(int), 1, fid));
+      TBOX_ASSERT(rtest == 1);
+      //fscanf( fid, "%d\n", &d_tri_nblocks );
+
+      d_tri_nxp = new int[d_tri_nblocks];
+      d_tri_nyp = new int[d_tri_nblocks];
+      d_tri_nzp = new int[d_tri_nblocks];
+
+      d_tri_nbr = new int *[d_tri_nblocks];
+      d_tri_x = new double *[d_tri_nblocks];
+      d_tri_y = new double *[d_tri_nblocks];
+      d_tri_z = new double *[d_tri_nblocks];
+
+      d_tri_node_size = new int[d_tri_nblocks];
+
+      for (int ib = 0; ib < d_tri_nblocks; ib++) {
+
+         // --------- the size of each block
+         rtest = static_cast<int>(fread(&d_tri_nxp[ib], sizeof(int), 1, fid));
+         TBOX_ASSERT(rtest == 1);
+         rtest = static_cast<int>(fread(&d_tri_nyp[ib], sizeof(int), 1, fid));
+         TBOX_ASSERT(rtest == 1);
+         rtest = static_cast<int>(fread(&d_tri_nzp[ib], sizeof(int), 1, fid));
+         TBOX_ASSERT(rtest == 1);
+         //fscanf( fid, "%d %d %d\n",
+         //	 &d_tri_nxp[ib],
+         //	 &d_tri_nyp[ib],
+         //	 &d_tri_nzp[ib] );
+
+         int nsize = d_tri_nxp[ib] * d_tri_nyp[ib] * d_tri_nzp[ib];
+         d_tri_node_size[ib] = nsize;
+         d_tri_nbr[ib] = new int[6];
+         d_tri_x[ib] = new double[nsize];
+         d_tri_y[ib] = new double[nsize];
+         d_tri_z[ib] = new double[nsize];
+
+         // --------- the neighbors of each block
+         rtest = static_cast<int>(fread(&d_tri_nbr[ib][0], sizeof(int), 6, fid));
+         TBOX_ASSERT(rtest == 6);
+         //fscanf( fid, "%d %d %d %d %d %d\n",
+         //	 &d_tri_nbr[ib][0],
+         //	 &d_tri_nbr[ib][1],
+         //	 &d_tri_nbr[ib][2],
+         //	 &d_tri_nbr[ib][3],
+         //	 &d_tri_nbr[ib][4],
+         //	 &d_tri_nbr[ib][5] );
+
+         // --------- the mesh positions
+         rtest = static_cast<int>(fread(&d_tri_x[ib][0], sizeof(double), nsize, fid));
+         TBOX_ASSERT(rtest == nsize);
+         rtest = static_cast<int>(fread(&d_tri_y[ib][0], sizeof(double), nsize, fid));
+         TBOX_ASSERT(rtest == nsize);
+         rtest = static_cast<int>(fread(&d_tri_z[ib][0], sizeof(double), nsize, fid));
+         TBOX_ASSERT(rtest == nsize);
+
+         //for ( int ii = 0 ; ii < d_tri_node_size[ib]; ii++ ) {
+         //  fscanf( fid, "%20.12e\n", &d_tri_x[ib][ii] );
+         //}
+
+         //for ( int ii = 0 ; ii < d_tri_node_size[ib]; ii++ ) {
+         //   fscanf( fid, "%20.12e\n", &d_tri_y[ib][ii] );
+         //}
+
+         //for ( int ii = 0 ; ii < d_tri_node_size[ib]; ii++ ) {
+         //   fscanf( fid, "%20.12e\n", &d_tri_z[ib][ii] );
+         //}
+
+      }
+
+      fclose(fid);
+      found = true;
+   }
+
+   //
+   // Spherical shell (works only in 3d)
+   //
+   if (d_geom_problem == "SPHERICAL_SHELL") {
+
+      if (d_dim < tbox::Dimension(3)) {
+         TBOX_ERROR(d_object_name << ": The " << d_geom_problem
+                                  << "only works in 3D." << std::endl);
+      }
+
+      tbox::Pointer<tbox::Database> sshell_db =
+         db->getDatabase("ShellGeometry");
+
+      d_sshell_rmin = sshell_db->getDouble("rmin");
+      d_sshell_rmax = sshell_db->getDouble("rmax");
+      d_sshell_type = sshell_db->getString("shell_type");
+      // types are: SOLID, OCTANT
+
+      if (d_sshell_type == "SOLID") {
+         double lpi = 3.14159265358979325873406851315;
+
+         d_sangle_degrees = sshell_db->getDouble("solid_angle_degrees");
+         d_sangle_thmin =
+            -(lpi / 180.0) * tbox::MathUtilities<double>::Abs(d_sangle_degrees);
+         // we only need the minimum of the angle coverage in radians
+      }
+
+      if (d_sshell_type == "OCTANT") {
+         d_tag_velocity = 0.;
+         if (sshell_db->keyExists("tag_velocity")) {
+            d_tag_velocity = sshell_db->getDouble("tag_velocity");
+         }
+         if (sshell_db->keyExists("tag_width")) {
+            d_tag_width = sshell_db->getDouble("tag_width");
+         }
+      }
+      found = true;
+   }
+
+   if (!found) {
+      TBOX_ERROR(
+         d_object_name << ": Could not identify problem.\n"
+         << d_geom_problem << " is not a valid input."
+         << std::endl);
+   }
+
+   // ------------------------------
+
+   /*
+    * Block refine boxes.  These are supplied via input of the
+    * form:
+    *
+    *    refine_boxes_<block number>_<level number>
+    *
+    * For example,
+    *
+    *    refine_boxes_2_0 = [(0,0),(9,9)],...
+    *
+    * would specify the refinement region on block 2, level 0.
+    *
+    */
+   d_refine_boxes.resizeArray(d_nblocks);
+   for (nb = 0; nb < d_nblocks; nb++) {
+
+      // see what the max number of levels is
+      int max_ln = 0;
+      int ln;
+      for (ln = 0; ln < 10; ln++) {
+         sprintf(block_name, "refine_boxes_%d_%d", nb, ln);
+         if (db->keyExists(block_name)) {
+            max_ln++;
+         }
+      }
+      d_refine_boxes[nb].resizeArray(max_ln, hier::BoxArray(d_dim));
+
+      for (ln = 0; ln < max_ln; ln++) {
+         sprintf(block_name, "refine_boxes_%d_%d", nb, ln);
+         if (db->keyExists(block_name)) {
+            d_refine_boxes[nb][ln] = db->getDatabaseBoxArray(block_name);
+         } else {
+            TBOX_ERROR(
+               d_object_name << ": input entry `"
+               << block_name << "' does not exist."
+               << std::endl);
+         }
+      }
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * build the array of local blocks
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkGeometry::buildLocalBlocks(
+   const hier::Box& pbox,                                     // the patch box
+   const hier::Box& domain,                                   // the block box
+   const int block_number,
+   int* dom_local_blocks)                                     // this returns the blocks neighboring this patch
+{
+   // by default single block simulation
+   for (int i = 0; i < 6; i++) {
+      dom_local_blocks[i] = block_number;
+   }
+
+   if (d_geom_problem == "TRILINEAR") {
+      const hier::Index& ifirst = pbox.lower();
+      const hier::Index& ilast = pbox.upper();
+      if (ifirst(0) == domain.lower(0)) dom_local_blocks[0] =
+            d_tri_nbr[block_number][0];
+      if (ifirst(1) == domain.lower(1)) dom_local_blocks[1] =
+            d_tri_nbr[block_number][1];
+      if (ifirst(2) == domain.lower(2)) dom_local_blocks[2] =
+            d_tri_nbr[block_number][2];
+
+      if (ilast(0) == domain.upper(0)) dom_local_blocks[3] =
+            d_tri_nbr[block_number][3];
+      if (ilast(1) == domain.upper(1)) dom_local_blocks[4] =
+            d_tri_nbr[block_number][4];
+      if (ilast(2) == domain.upper(2)) dom_local_blocks[5] =
+            d_tri_nbr[block_number][5];
+   }
+
+   if (d_geom_problem == "SPHERICAL_SHELL") {
+      if (d_sshell_type == "OCTANT") {
+
+         //
+         // process the block neighbors for this grid
+         // using the order, this could be improved
+         //
+         // 0 imin, 1 jmin, 2 kmin
+         // 3 imax, 4 jmax, 5 kmax
+         //
+         //
+         const hier::Index& ifirst = pbox.lower();
+         const hier::Index& ilast = pbox.upper();
+
+         int jmin = domain.lower(1);
+         int jmax = domain.upper(1);
+         int kmax = domain.upper(2);
+
+         if (block_number == 0) {
+            if (ilast(1) == jmax) dom_local_blocks[4] = 1;
+            if (ilast(2) == kmax) dom_local_blocks[5] = 2;
+         }
+
+         if (block_number == 1) {
+            if (ifirst(1) == jmin) dom_local_blocks[1] = 0;
+            if (ilast(2) == kmax) dom_local_blocks[5] = 2;
+         }
+
+         if (block_number == 2) {
+            if (ilast(1) == jmax) dom_local_blocks[4] = 0;
+            if (ilast(2) == kmax) dom_local_blocks[5] = 1;
+         }
+      }
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Build grid on patch for supplied inputs for different goemetries
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkGeometry::buildGridOnPatch(
+   const hier::Patch& patch,
+   const hier::Box& domain,
+   const int xyz_id,
+   const int block_number,
+   int* dom_local_blocks)                                    // this returns the blocks neighboring this patch
+{
+   buildLocalBlocks(patch.getBox(), domain, block_number, dom_local_blocks);
+
+   if (d_geom_problem == "CARTESIAN") {
+      buildCartesianGridOnPatch(patch,
+         domain,
+         xyz_id);
+   }
+
+   if (d_geom_problem == "WEDGE") {
+      buildWedgeGridOnPatch(patch,
+         domain,
+         xyz_id,
+         block_number);
+   }
+
+   if (d_geom_problem == "TRILINEAR") {
+      buildTrilinearGridOnPatch(patch,
+         domain,
+         xyz_id,
+         block_number);
+   }
+
+   if (d_geom_problem == "SPHERICAL_SHELL") {
+      buildSShellGridOnPatch(patch,
+         domain,
+         xyz_id,
+         block_number);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Build the Cartesian grid
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkGeometry::buildCartesianGridOnPatch(
+   const hier::Patch& patch,
+   const hier::Box& domain,
+   const int xyz_id)
+{
+   //
+   // compute dx
+   //
+   hier::Index lower(domain.lower());
+   hier::Index upper(domain.upper());
+   hier::Index diff(upper - lower + hier::Index(lower.getDim(), 1));
+
+   double dx[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   double xlo[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   for (int i = 0; i < d_dim.getValue(); i++) {
+      dx[i] = (d_cart_xhi[0][i] - d_cart_xlo[0][i]) / (double)diff(i);
+      xlo[i] = d_cart_xlo[0][i];
+   }
+
+   //
+   // get the coordinates array information
+   //
+   tbox::Pointer<pdat::NodeData<double> > xyz =
+      patch.getPatchData(xyz_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!xyz.isNull());
+#endif
+
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+   hier::IntVector nghost_cells = xyz->getGhostCellWidth();
+
+   int nd_imin = ifirst(0) - nghost_cells(0);
+   int nd_imax = ilast(0) + 1 + nghost_cells(0);
+   int nd_jmin = ifirst(1) - nghost_cells(1);
+   int nd_jmax = ilast(1) + 1 + nghost_cells(1);
+   int nd_kmin = ifirst(2) - nghost_cells(2);
+   int nd_kmax = ilast(2) + 1 + nghost_cells(2);
+   int nd_nx = nd_imax - nd_imin + 1;
+   int nd_ny = nd_jmax - nd_jmin + 1;
+   int nd_nxny = nd_nx * nd_ny;
+
+   double* x = xyz->getPointer(0);
+   double* y = xyz->getPointer(1);
+   double* z = xyz->getPointer(2);
+
+   //
+   // ----------- set the nodal positions
+   //
+   for (int k = nd_kmin; k <= nd_kmax; k++) {
+      for (int j = nd_jmin; j <= nd_jmax; j++) {
+         for (int i = nd_imin; i <= nd_imax; i++) {
+
+            int ind = POLY3(i, j, k, nd_imin, nd_jmin, nd_kmin, nd_nx, nd_nxny);
+            x[ind] = xlo[0] + i * dx[0];
+            y[ind] = xlo[1] + j * dx[1];
+            if (d_dim > tbox::Dimension(2)) {
+               z[ind] = xlo[2] + k * dx[2];
+            }
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Build the Wedge grid
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkGeometry::buildWedgeGridOnPatch(
+   const hier::Patch& patch,
+   const hier::Box& domain,
+   const int xyz_id,
+   const int block_number)
+{
+   //
+   // Set dx (dr, dth, dz) for the level
+   //
+   double dx[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   double nr = (domain.upper(0) - domain.lower(0) + 1);
+   double nth = (domain.upper(1) - domain.lower(1) + 1);
+   double nz = (domain.upper(2) - domain.lower(2) + 1);
+   dx[0] = (d_wedge_rmax[0] - d_wedge_rmin[0]) / nr;
+   dx[1] = (d_wedge_thmax - d_wedge_thmin) / nth;
+   if (d_dim > tbox::Dimension(2)) {
+      dx[2] = (d_wedge_zmax - d_wedge_zmin) / nz;
+   } else {
+      dx[2] = 0.0;
+   }
+
+   tbox::Pointer<pdat::NodeData<double> > xyz =
+      patch.getPatchData(xyz_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!xyz.isNull());
+#endif
+
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+   hier::IntVector nghost_cells = xyz->getGhostCellWidth();
+
+   int nd_imin = ifirst(0) - nghost_cells(0);
+   int nd_imax = ilast(0) + 1 + nghost_cells(0);
+   int nd_jmin = ifirst(1) - nghost_cells(1);
+   int nd_jmax = ilast(1) + 1 + nghost_cells(1);
+   int nd_kmin = ifirst(2) - nghost_cells(2);
+   int nd_kmax = ilast(2) + 1 + nghost_cells(2);
+   int nd_nx = nd_imax - nd_imin + 1;
+   int nd_ny = nd_jmax - nd_jmin + 1;
+   int nd_nxny = nd_nx * nd_ny;
+
+   double* x = xyz->getPointer(0);
+   double* y = xyz->getPointer(1);
+   double* z = xyz->getPointer(2);
+
+   //
+   // ----------- set the wedge nodal positions
+   //
+
+   for (int k = nd_kmin; k <= nd_kmax; k++) {
+      for (int j = nd_jmin; j <= nd_jmax; j++) {
+         for (int i = nd_imin; i <= nd_imax; i++) {
+
+            int ind = POLY3(i, j, k, nd_imin, nd_jmin, nd_kmin, nd_nx, nd_nxny);
+
+            double r = d_wedge_rmin[block_number] + dx[0] * (i);
+            double th = d_wedge_thmin + dx[1] * (j);
+
+            double xx = r * cos(th);
+            double yy = r * sin(th);
+            double zz = d_wedge_zmin + dx[2] * (k);
+
+            x[ind] = xx;
+            y[ind] = yy;
+            z[ind] = zz;
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Build the Trilinear grid
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkGeometry::buildTrilinearGridOnPatch(
+   const hier::Patch& patch,
+   const hier::Box& domain,
+   const int xyz_id,
+   const int block_number)
+{
+   //
+   // Set dx (dr, dth, dz) for the level
+   //
+   double nx = (domain.upper(0) - domain.lower(0) + 1);
+   double ny = (domain.upper(1) - domain.lower(1) + 1);
+   double nz = (domain.upper(2) - domain.lower(2) + 1);
+
+   tbox::Pointer<pdat::NodeData<double> > xyz =
+      patch.getPatchData(xyz_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!xyz.isNull());
+#endif
+
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+   hier::IntVector nghost_cells = xyz->getGhostCellWidth();
+
+   int nd_imin = ifirst(0) - nghost_cells(0);
+   int nd_imax = ilast(0) + 1 + nghost_cells(0);
+   int nd_jmin = ifirst(1) - nghost_cells(1);
+   int nd_jmax = ilast(1) + 1 + nghost_cells(1);
+   int nd_kmin = ifirst(2) - nghost_cells(2);
+   int nd_kmax = ilast(2) + 1 + nghost_cells(2);
+   int nd_nx = nd_imax - nd_imin + 1;
+   int nd_ny = nd_jmax - nd_jmin + 1;
+   int nd_nxny = nd_nx * nd_ny;
+
+   double* x = xyz->getPointer(0);
+   double* y = xyz->getPointer(1);
+   double* z = xyz->getPointer(2);
+
+   double* bx = d_tri_x[block_number];
+   double* by = d_tri_y[block_number];
+   double* bz = d_tri_z[block_number];
+
+   int mxp = d_tri_nxp[block_number]; // nodal base mesh size
+   int myp = d_tri_nyp[block_number];
+   int mzp = d_tri_nzp[block_number];
+   int mxpmyp = mxp * myp;
+
+   int mx = mxp - 1; // zonal base mesh size
+   int my = myp - 1;
+   int mz = mzp - 1;
+
+   double rx = nx / mx;
+   double ry = ny / my;
+   double rz = nz / mz;
+
+   //
+   // ----------- compute the nodal tri-linear interpolation
+   //
+
+   for (int k = nd_kmin; k <= nd_kmax; k++) {
+      for (int j = nd_jmin; j <= nd_jmax; j++) {
+         for (int i = nd_imin; i <= nd_imax; i++) {
+
+            int ind = POLY3(i, j, k, nd_imin, nd_jmin, nd_kmin, nd_nx, nd_nxny);
+
+            double ric = ((double)i) / rx;
+            double rjc = ((double)j) / ry;
+            double rkc = ((double)k) / rz;
+
+            int ic = (int)MAX(0, MIN(mx - 1, ric));
+            int jc = (int)MAX(0, MIN(my - 1, rjc));
+            int kc = (int)MAX(0, MIN(mz - 1, rkc));
+
+            double xi = ric - ic;
+            double eta = rjc - jc;
+            double zeta = rkc - kc;
+
+            int n1 = POLY3(ic, jc, kc, 0, 0, 0, mxp, mxpmyp);
+            int n2 = POLY3(ic + 1, jc, kc, 0, 0, 0, mxp, mxpmyp);
+            int n3 = POLY3(ic, jc + 1, kc, 0, 0, 0, mxp, mxpmyp);
+            int n4 = POLY3(ic + 1, jc + 1, kc, 0, 0, 0, mxp, mxpmyp);
+            int n5 = POLY3(ic, jc, kc + 1, 0, 0, 0, mxp, mxpmyp);
+            int n6 = POLY3(ic + 1, jc, kc + 1, 0, 0, 0, mxp, mxpmyp);
+            int n7 = POLY3(ic, jc + 1, kc + 1, 0, 0, 0, mxp, mxpmyp);
+            int n8 = POLY3(ic + 1, jc + 1, kc + 1, 0, 0, 0, mxp, mxpmyp);
+
+            double xx = (bx[n1] * (1 - xi) * (1 - eta) * (1 - zeta)
+                         + bx[n2] * (xi) * (1 - eta) * (1 - zeta)
+                         + bx[n3] * (1 - xi) * (eta) * (1 - zeta)
+                         + bx[n4] * (xi) * (eta) * (1 - zeta)
+                         + bx[n5] * (1 - xi) * (1 - eta) * (zeta)
+                         + bx[n6] * (xi) * (1 - eta) * (zeta)
+                         + bx[n7] * (1 - xi) * (eta) * (zeta)
+                         + bx[n8] * (xi) * (eta) * (zeta));
+
+            double yy = (by[n1] * (1 - xi) * (1 - eta) * (1 - zeta)
+                         + by[n2] * (xi) * (1 - eta) * (1 - zeta)
+                         + by[n3] * (1 - xi) * (eta) * (1 - zeta)
+                         + by[n4] * (xi) * (eta) * (1 - zeta)
+                         + by[n5] * (1 - xi) * (1 - eta) * (zeta)
+                         + by[n6] * (xi) * (1 - eta) * (zeta)
+                         + by[n7] * (1 - xi) * (eta) * (zeta)
+                         + by[n8] * (xi) * (eta) * (zeta));
+
+            double zz = (bz[n1] * (1 - xi) * (1 - eta) * (1 - zeta)
+                         + bz[n2] * (xi) * (1 - eta) * (1 - zeta)
+                         + bz[n3] * (1 - xi) * (eta) * (1 - zeta)
+                         + bz[n4] * (xi) * (eta) * (1 - zeta)
+                         + bz[n5] * (1 - xi) * (1 - eta) * (zeta)
+                         + bz[n6] * (xi) * (1 - eta) * (zeta)
+                         + bz[n7] * (1 - xi) * (eta) * (zeta)
+                         + bz[n8] * (xi) * (eta) * (zeta));
+
+            x[ind] = xx;
+            y[ind] = yy;
+            z[ind] = zz;
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Build the spherical shell grid
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkGeometry::buildSShellGridOnPatch(
+   const hier::Patch& patch,
+   const hier::Box& domain,
+   const int xyz_id,
+   const int block_number)
+{
+
+   bool xyz_allocated = patch.checkAllocated(xyz_id);
+   if (!xyz_allocated) {
+      TBOX_ERROR("xyz data not allocated" << std::endl);
+      //patch.allocatePatchData(xyz_id);
+   }
+
+   tbox::Pointer<pdat::NodeData<double> > xyz =
+      patch.getPatchData(xyz_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!xyz.isNull());
+#endif
+
+   if (d_dim == tbox::Dimension(3)) {
+
+      const hier::Index ifirst = patch.getBox().lower();
+      const hier::Index ilast = patch.getBox().upper();
+      hier::IntVector nghost_cells = xyz->getGhostCellWidth();
+
+      int nd_imin = ifirst(0) - nghost_cells(0);
+      int nd_imax = ilast(0) + 1 + nghost_cells(0);
+      int nd_jmin = ifirst(1) - nghost_cells(1);
+      int nd_jmax = ilast(1) + 1 + nghost_cells(1);
+      int nd_kmin = ifirst(2) - nghost_cells(2);
+      int nd_kmax = ilast(2) + 1 + nghost_cells(2);
+      int nd_nx = nd_imax - nd_imin + 1;
+      int nd_ny = nd_jmax - nd_jmin + 1;
+      int nd_nxny = nd_nx * nd_ny;
+
+      double* x = xyz->getPointer(0);
+      double* y = xyz->getPointer(1);
+      double* z = xyz->getPointer(2);
+
+      bool found = false;
+
+      int nrad = (domain.upper(0) - domain.lower(0) + 1);
+      int nth = (domain.upper(1) - domain.lower(1) + 1);
+      int nphi = (domain.upper(2) - domain.lower(2) + 1);
+
+      /*
+       * If its a solid shell, its a single block and dx = dr, dth, dphi
+       */
+      if (d_sshell_type == "SOLID") {
+
+         double dx[3];
+         dx[0] = (d_sshell_rmax - d_sshell_rmin) / (double)nrad;
+         dx[1] =
+            2.0 * tbox::MathUtilities<double>::Abs(d_sangle_thmin)
+            / (double)nth;
+         dx[2] =
+            2.0 * tbox::MathUtilities<double>::Abs(d_sangle_thmin)
+            / (double)nphi;
+
+         //
+         // step in a radial direction in x and set y and z appropriately
+         // for a solid angle we go -th to th and -phi to phi
+         //
+         for (int k = nd_kmin; k <= nd_kmax; k++) {
+            for (int j = nd_jmin; j <= nd_jmax; j++) {
+
+               double theta = d_sangle_thmin + j * dx[1]; // dx used for dth
+               double phi = d_sangle_thmin + k * dx[2];
+
+               double xface = cos(theta) * cos(phi);
+               double yface = sin(theta) * cos(phi);
+               double zface = sin(phi);
+
+               for (int i = nd_imin; i <= nd_imax; i++) {
+
+                  int ind = POLY3(i,
+                        j,
+                        k,
+                        nd_imin,
+                        nd_jmin,
+                        nd_kmin,
+                        nd_nx,
+                        nd_nxny);
+
+                  double r = d_sshell_rmin + dx[0] * (i);
+
+                  double xx = r * xface;
+                  double yy = r * yface;
+                  double zz = r * zface;
+
+                  x[ind] = xx;
+                  y[ind] = yy;
+                  z[ind] = zz;
+               }
+            }
+         }
+
+         found = true;
+      }
+
+      /*
+       * If its an octant problem, then its got multiple (three) blocks
+       */
+      if (d_sshell_type == "OCTANT") {
+
+         double drad = (d_sshell_rmax - d_sshell_rmin) / nrad;
+
+         //
+         // as in the solid angle we go along a radial direction in
+         // x setting y and z appropriately, but here we have logic for
+         // the block we are in.  This is contained in the dispOctant.m
+         // matlab code.
+         //
+         for (int k = nd_kmin; k <= nd_kmax; k++) {
+            for (int j = nd_jmin; j <= nd_jmax; j++) {
+
+               //
+               // compute the position on the unit sphere for our radial line
+               //
+               double xface, yface, zface;
+               computeUnitSphereOctant(block_number, nth, j, k,
+                  &xface, &yface, &zface);
+
+               for (int i = nd_imin; i <= nd_imax; i++) {
+                  int ind = POLY3(i,
+                        j,
+                        k,
+                        nd_imin,
+                        nd_jmin,
+                        nd_kmin,
+                        nd_nx,
+                        nd_nxny);
+
+                  double r = d_sshell_rmin + drad * (i);
+
+                  double xx = r * xface;
+                  double yy = r * yface;
+                  double zz = r * zface;
+
+                  x[ind] = xx;
+                  y[ind] = yy;
+                  z[ind] = zz;
+               }
+            }
+         }
+         found = true;
+      }
+
+      if (!found) {
+         TBOX_ERROR(
+            d_object_name << ": "
+            << "spherical shell nodal positions for "
+            << d_sshell_type
+            << " not found" << std::endl);
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * For a given j, k, compute the position on the unit sphere with
+ * the supplied block number.  "nth" is the number of cells in the theta
+ * direction (it should be the same for all blocks).  The three faces
+ * "xface", "yface", "zface" are the different block faces.  The
+ * code that performs this operation is in Dave's dispOctant.m matlab
+ * code.
+ *                                                                       *
+ *************************************************************************
+ */
+void MblkGeometry::computeUnitSphereOctant(
+   int nblock,
+   int nth,
+   int j,
+   int k,
+   double* xface,
+   double* yface,
+   double* zface)
+{
+   static int jmn[3] = { 0, 0, 2 }; // matrix of rotations
+   static int jmx[3] = { 1, 1, 1 };
+   static int kmn[3] = { 0, 1, 0 };
+   static int kmx[3] = { 2, 2, 2 };
+
+   //
+   // coefficients are of the form
+   //
+   // jto = j0 + jslp*jfrom + k0 + kslp*kfrom
+   // kto = j0 + jslp*jfrom + k0 + kslp*kfrom
+
+   static int jcoef[3][3][4] = // how to convert j from one block to another
+                               // [from][to][4]
+   { { { 0, 1, 0, 0 },         // [0][0]
+       { -nth, 1, 0, 0 },      // [0][1]
+       { 0, 0, 0, 1 } },         // [0][2]
+
+     { { nth, 1, 0, 0 },         // [1][0]
+       { 0, 1, 0, 0 },         // [1][1]
+       { 0, 0, nth, -1 } },      // [1][2]
+
+     { { 0, 0, 2 * nth, -1 },    // [2][0]
+       { 0, 0, 1, 0 },         // [2][1]
+       { nth, -1, 0, 0 } } };    // [2][2]
+
+   static int kcoef[3][3][4] = // the k conversion
+/*    {   0,  0,    0,  1,   // [0][0]
+*      0,  0,    0,  1,   // [0][1]
+*      0,  0,2*nth, -1,   // [0][2]
+*
+*      0,  0,    0,  1,   // [1][0]
+*      0,  0,    0,  1,   // [1][1]
+*      0,  0,2*nth, -1,   // [1][2]
+*
+*      0,  1,    0,  0,   // [2][0]
+*  2*nth, -1,    0,  0,   // [2][1]
+*      0,  0,    0,  1 }; // [2][2] */
+   { { { 0, 0, 0, 1 },          // [0][0]
+       { 0, 0, 0, 1 },         // [0][1]
+       { 0, 0, 2 * nth, -1 } },  // [0][2]
+
+     { { 0, 0, 0, 1 },          // [1][0]
+       { 0, 0, 0, 1 },         // [1][1]
+       { 0, 0, 2 * nth, -1 } },  // [1][2]
+
+     { { 0, 1, 0, 0 },          // [2][0]
+       { 2 * nth, -1, 0, 0 },  // [2][1]
+       { 0, 0, 0, 1 } } };       // [2][2]
+
+   static double pio4 = 0.25 * 3.14159265358979325873406851315;
+
+   //
+   // decide which position in the unit sphere we break out on
+   //
+   // nblock = 1, xface = 2, yface, = 3, zface
+
+   int tb = nblock;
+   int tj = j;
+   int tk = k;
+
+   int sb = tb;
+   int ttj = tj;
+   int ttk = tk;
+   if (j < 0) {
+      tb = jmn[sb];
+      tj = jcoef[sb][tb][0] + jcoef[sb][tb][1] * ttj + jcoef[sb][tb][2]
+         + jcoef[sb][tb][3] * ttk;
+      tk = kcoef[sb][tb][0] + kcoef[sb][tb][1] * ttj + kcoef[sb][tb][2]
+         + kcoef[sb][tb][3] * ttk;
+   }
+
+   sb = tb;
+   ttj = tj;
+   ttk = tk;
+   if (j > nth) {
+      tb = jmx[sb];
+      tj = jcoef[sb][tb][0] + jcoef[sb][tb][1] * ttj + jcoef[sb][tb][2]
+         + jcoef[sb][tb][3] * ttk;
+      tk = kcoef[sb][tb][0] + kcoef[sb][tb][1] * ttj + kcoef[sb][tb][2]
+         + kcoef[sb][tb][3] * ttk;
+   }
+
+   sb = tb;
+   ttj = tj;
+   ttk = tk;
+   if (k < 0) {   // this catches corner terms now
+      tb = kmn[sb];
+      tj = jcoef[sb][tb][0] + jcoef[sb][tb][1] * ttj + jcoef[sb][tb][2]
+         + jcoef[sb][tb][3] * ttk;
+      tk = kcoef[sb][tb][0] + kcoef[sb][tb][1] * ttj + kcoef[sb][tb][2]
+         + kcoef[sb][tb][3] * ttk;
+   }
+
+   sb = tb;
+   ttj = tj;
+   ttk = tk;
+   if (k > nth) {
+      tb = kmx[sb];
+      tj = jcoef[sb][tb][0] + jcoef[sb][tb][1] * ttj + jcoef[sb][tb][2]
+         + jcoef[sb][tb][3] * ttk;
+      tk = kcoef[sb][tb][0] + kcoef[sb][tb][1] * ttj + kcoef[sb][tb][2]
+         + kcoef[sb][tb][3] * ttk;
+   }
+
+   //
+   // once we know where we are in our block, we can return our position on the unit sphere
+   //
+   if (tb == 0) {   // we go along an x face  (block 0)
+      double lj = tj / (double)nth;
+      double lk = tk / (double)nth;
+
+      double sz = sin(pio4 * lj);
+      double cz = cos(pio4 * lj);
+      double sy = sin(pio4 * lk);
+      double cy = cos(pio4 * lk);
+
+      double den = sqrt(1. - sy * sy * sz * sz);
+
+      *xface = cy * cz / den;
+      *yface = cy * sz / den;
+      *zface = sy * cz / den;
+   } else if (tb == 1) { // a y face (block 1)
+      double li = 1 - tj / (double)nth;
+      double lk = tk / (double)nth;
+
+      double sx = sin(pio4 * lk);
+      double cx = cos(pio4 * lk);
+      double sz = sin(pio4 * li);
+      double cz = cos(pio4 * li);
+
+      double den = sqrt(1. - sx * sx * sz * sz);
+
+      *xface = cx * sz / den;
+      *yface = cx * cz / den;
+      *zface = sx * cz / den;
+   } else if (tb == 2) { // a z face (block 2)
+      double li = tj / (double)nth; // 1 - tj;
+      double lj = tk / (double)nth; // 1 - tk;
+
+      double sx = sin(pio4 * lj);
+      double cx = cos(pio4 * lj);
+      double sy = sin(pio4 * li);
+      double cy = cos(pio4 * li);
+
+      double den = sqrt(1. - sx * sx * sy * sy);
+
+      *xface = cx * sy / den;
+      *yface = sx * cy / den;
+      *zface = cx * cy / den;
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute the rotations for the particular block number.  The
+ * "local_blocks" argument is basically saying who is the ne
+ *                                                                       *
+ *************************************************************************
+ */
+void computeBlocksOctant(
+   const hier::Box& bb,
+   int local_blocks[6],
+   int nblock,
+   int nth)
+{
+   const hier::Index ifirst = bb.lower();
+   const hier::Index ilast = bb.upper();
+
+   local_blocks[0] = nblock; // imin stays local
+   local_blocks[3] = nblock; // jmin stays local
+
+   static int jmn[3] = { 0, 0, 2 }; // matrix of rotations
+   static int jmx[3] = { 1, 1, 1 };
+   static int kmn[3] = { 0, 1, 0 };
+   static int kmx[3] = { 2, 2, 2 };
+
+   //
+   // bounds of the patch zones go from 0 to nth-1
+   //
+   if (ifirst(1) <= 0) local_blocks[1] = jmn[nblock];
+   if (ifirst(2) <= 0) local_blocks[2] = kmn[nblock];
+
+   if (ilast(1) >= nth - 1) local_blocks[4] = jmx[nblock];
+   if (ilast(2) >= nth - 1) local_blocks[5] = kmx[nblock];
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkEuler/MblkGeometry.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkEuler/MblkGeometry.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,220 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   this class creates mapped multiblock grid geometries.
+ *                The supported grid types include Cartesian, Wedge, and
+ *                Spherical shell.  The spherical shell case is a full
+ *                multiblock grid with 3 blocks.
+ *
+ ************************************************************************/
+
+#ifndef included_MblkGeometryXD
+#define included_MblkGeometryXD
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Serializable.h"
+#include "SAMRAI/geom/BlockGridGeometry.h"
+
+using namespace SAMRAI;
+
+class MblkGeometry
+{
+public:
+   //
+   // Reads geometry information from the "MblkGeometry" input file
+   // entry.
+   //
+   MblkGeometry(
+      const std::string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> input_db,
+      const int nblocks);
+
+   ~MblkGeometry();
+
+   //
+   // Return the geometry type (CARTESIAN, WEDGE, or SPHERICAL_SHELL)
+   //
+   std::string
+   getGeometryType();
+
+   //
+   // Return the user-specified refine boxes, given a block and
+   // level number
+   //
+   bool
+   getRefineBoxes(
+      hier::BoxArray& refine_boxes,
+      const int block_number,
+      const int level_number);
+
+   //
+   // Build mapped grid on patch.  The method defers the actual grid
+   // construction to private members, depending on the geometry
+   // choice in input.
+   //
+   void
+   buildGridOnPatch(
+      const hier::Patch& patch,
+      const hier::Box& domain,
+      const int xyz_id,
+      const int block_number,
+      int* dom_local_blocks);
+
+   //
+   // The array of block indices denoting patch neighbors
+   //
+   void
+   buildLocalBlocks(
+      const hier::Box& pbox,                       // the patch box
+      const hier::Box& domain,                     // the block box
+      const int block_number,
+      int* dom_local_blocks);                       // this returns the blocks neighboring this patch
+
+private:
+   //
+   // Read data members from input.
+   //
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> input_db);
+
+   //
+   // the cartesian input
+   //
+   void
+   buildCartesianGridOnPatch(
+      const hier::Patch& patch,
+      const hier::Box& domain,
+      const int xyz_id);
+
+   //
+   // Wedge grid construction.
+   //
+   void
+   buildWedgeGridOnPatch(
+      const hier::Patch& patch,
+      const hier::Box& domain,
+      const int xyz_id,
+      const int block_number);
+
+   //
+   // trilinearly interpolated base mesh
+   //
+   void
+   buildTrilinearGridOnPatch(
+      const hier::Patch& patch,
+      const hier::Box& domain,
+      const int xyz_id,
+      const int block_number);
+
+   //
+   // Spherical shell grid construction
+   //
+   void
+   buildSShellGridOnPatch(
+      const hier::Patch& patch,
+      const hier::Box& domain,
+      const int xyz_id,
+      const int block_number);
+
+   //
+   // For the spherical shell construction, i always points in the r direction
+   // and j,k are points on the shell.  Given a certain j,k compute the
+   // unit sphere locations for block face (actual xyz is computed
+   // by x = r*xface, y = r*yface, z = r*zface.  Note that the dimension
+   // in the theta direction (nth) should be the same for each block.
+   //
+   void
+   computeUnitSphereOctant(
+      int nblock,
+      int nth,
+      int j,
+      int k,
+      double* xface,
+      double* yface,
+      double* zface);
+
+   //
+   // Geometry type.  Choices are CARTESIAN, WEDGE, SPHERICAL_SHELL
+   //
+   std::string d_geom_problem;
+   std::string d_object_name;  // name of the object to pull in data from input parser
+
+   const tbox::Dimension d_dim;
+
+   //
+   // The number of blocks and the set of skelton grid geometries that make
+   // up a multiblock mesh.
+   //
+   int d_nblocks;
+
+   //
+   // Cartesian inputs
+   //
+   tbox::Array<tbox::Array<double> > d_cart_xlo;
+   tbox::Array<tbox::Array<double> > d_cart_xhi;
+
+   //
+   // Wedge inputs
+   //
+   tbox::Array<double> d_wedge_rmin;
+   tbox::Array<double> d_wedge_rmax;
+   double d_wedge_thmin;
+   double d_wedge_thmax;
+   double d_wedge_zmin;
+   double d_wedge_zmax;
+
+   //
+   // trilinear inputs
+   //
+   std::string d_tri_mesh_filename;
+   int d_tri_nblocks;      // number of blocks
+   int* d_tri_nxp;          // block bounds
+   int* d_tri_nyp;
+   int* d_tri_nzp;
+   int* d_tri_node_size;   // block size
+
+   int** d_tri_nbr;   // integer array of neighboring blocks
+   double** d_tri_x; // [block][node]  nodal coordinates
+   double** d_tri_y;
+   double** d_tri_z;
+
+   //
+   // Shell inputs
+   //
+   double d_sshell_rmin;
+   double d_sshell_rmax;
+
+   // options are SOLID, OCTANT
+   std::string d_sshell_type;
+
+   //
+   // For tagging in the spherical octant case
+   //
+   double d_tag_velocity;
+   double d_tag_width;
+
+   // if SOLID, need to read in these...
+   double d_sangle_degrees;
+   double d_sangle_thmin;
+
+   //
+   // Refine boxes for different blocks/levels
+   //
+   tbox::Array<tbox::Array<hier::BoxArray> > d_refine_boxes;
+
+};
+
+#endif // included_MblkGeometry
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkEuler/MblkHyperbolicLevelIntegrator.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkEuler/MblkHyperbolicLevelIntegrator.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,2690 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Integration routines for single level in AMR hierarchy
+ *                (basic hyperbolic systems) 
+ *
+ ************************************************************************/
+
+#include "MblkHyperbolicLevelIntegrator.h"
+
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/hier/MultiblockPatchLevelIterator.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/hier/PatchDataFactory.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceDataFactory.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/pdat/OuterfaceData.h"
+#include "SAMRAI/pdat/OuterfaceVariable.h"
+#include "SAMRAI/pdat/OutersideData.h"
+#include "SAMRAI/pdat/OutersideVariable.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/SideDataFactory.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/xfer/CoarsenSchedule.h"
+
+//#define RECORD_STATS
+#undef RECORD_STATS
+#ifdef RECORD_STATS
+#include "SAMRAI/tbox/Statistic.h"
+#include "SAMRAI/tbox/Statistician.h"
+#endif
+
+#include <stdlib.h>
+#include <fstream>
+#include <string>
+using namespace std;
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN 77 routines used in flux            *
+ * synchronization process between hierarchy levels.                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+extern "C" {
+// in upfluxsum.m4:
+// for 2D:
+void F77_FUNC(upfluxsumface2d0, UPFLUXSUMFACe2d0) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double *, double *);
+void F77_FUNC(upfluxsumface2d1, UPFLUXSUMFACE2D1) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double *, double *);
+void F77_FUNC(upfluxsumside2d0, UPFLUXSUMSIDE2D0) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double *, double *);
+void F77_FUNC(upfluxsumside2d1, UPFLUXSUMSIDE2D1) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double *, double *);
+
+// for 3D:
+void F77_FUNC(upfluxsumface3d0, UPFLUXSUMFACE3D0) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &,
+   const double *, double *);
+void F77_FUNC(upfluxsumface3d1, UPFLUXSUMFACE3D1) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &,
+   const double *, double *);
+void F77_FUNC(upfluxsumface3d2, UPFLUXSUMFACE3D2) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &,
+   const double *, double *);
+void F77_FUNC(upfluxsumside3d0, UPFLUXSUMSIDE3D0) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &,
+   const double *, double *);
+void F77_FUNC(upfluxsumside3d1, UPFLUXSUMSIDE3D1) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &,
+   const double *, double *);
+void F77_FUNC(upfluxsumside3d2, UPFLUXSUMSIDE3D2) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &,
+   const double *, double *);
+
+}
+
+#ifndef NULL
+#define NULL (0)
+#endif
+
+#define ALGS_HYPERBOLIC_LEVEL_INTEGRATOR_VERSION (3)
+
+using namespace SAMRAI;
+using namespace algs;
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * This constructor sets the HyperbolicPatchStrategy pointer and   *
+ * initializes integration parameters to default values.  Communication  *
+ * algorithms are created here too.  Other data members are read in     *
+ * from the input database or from the restart database corresponding    *
+ * to the specified object_name.                                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+MblkHyperbolicLevelIntegrator::MblkHyperbolicLevelIntegrator(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> input_db,
+   MblkHyperbolicPatchStrategy* patch_strategy,
+   tbox::Pointer<hier::MultiblockPatchHierarchy>& mblk_hierarchy,
+   bool register_for_restart,
+   bool use_time_refinement):
+   d_dim(dim)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!input_db.isNull());
+   TBOX_ASSERT(patch_strategy != ((MblkHyperbolicPatchStrategy *)NULL));
+#endif
+
+   d_object_name = object_name;
+   d_use_time_refinement = use_time_refinement;
+   d_registered_for_restart = register_for_restart;
+
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->
+      registerRestartItem(d_object_name, this);
+   }
+
+   d_patch_strategy = patch_strategy;
+
+   /*
+    * Default parameter values.
+    */
+   d_number_time_data_levels = 2;
+
+   d_flux_is_face = true;
+   d_flux_face_registered = false;
+   d_flux_side_registered = false;
+
+   d_have_flux_on_level_zero = false;
+
+   d_lag_dt_computation = true;
+   d_use_ghosts_for_dt = false;
+   d_distinguish_mpi_reduction_costs = false;
+
+   d_cfl = tbox::MathUtilities<double>::getSignalingNaN();
+   d_cfl_init = tbox::MathUtilities<double>::getSignalingNaN();
+
+   /*
+    * Communication algorithms.
+    */
+   d_coarsen_rich_extrap_init = new xfer::CoarsenAlgorithm(d_dim);
+   d_coarsen_rich_extrap_final = new xfer::CoarsenAlgorithm(d_dim);
+
+   // multi-block versions of Coarsen/Refine algs
+   d_mblk_bdry_fill_advance =
+      new xfer::MultiblockRefineAlgorithm(mblk_hierarchy, d_dim);
+   d_mblk_bdry_fill_advance_new =
+      new xfer::MultiblockRefineAlgorithm(mblk_hierarchy, d_dim);
+   d_mblk_bdry_fill_advance_old =
+      new xfer::MultiblockRefineAlgorithm(mblk_hierarchy, d_dim);
+   d_mblk_fill_new_level =
+      new xfer::MultiblockRefineAlgorithm(mblk_hierarchy, d_dim);
+   d_mblk_coarsen_fluxsum =
+      new xfer::MultiblockCoarsenAlgorithm(mblk_hierarchy);
+   d_mblk_coarsen_sync_data =
+      new xfer::MultiblockCoarsenAlgorithm(mblk_hierarchy);
+   d_mblk_sync_initial_data =
+      new xfer::MultiblockCoarsenAlgorithm(mblk_hierarchy);
+
+   /*
+    * hier::Variable contexts used in algorithm.  Note that "OLD" context
+    * is only created and used in the case of Richardson extrapolation
+    * and a refinement ratio of 3 (see registerModelVariables()).
+    */
+   d_scratch = hier::VariableDatabase::getDatabase()->getContext("SCRATCH");
+   d_current = hier::VariableDatabase::getDatabase()->getContext("CURRENT");
+   d_new = hier::VariableDatabase::getDatabase()->getContext("NEW");
+
+   d_plot_context = d_current;
+
+   /*
+    * Timers:  one for each of the communication algorithms ("create"
+    * indicates schedule creation, "comm" indicates communication)
+    */
+   t_advance_bdry_fill_comm = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::advance_bdry_fill_comm");
+   t_error_bdry_fill_create = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::error_bdry_fill_create");
+   t_error_bdry_fill_comm = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::error_bdry_fill_comm");
+   t_mpi_reductions = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::mpi_reductions");
+   t_initialize_level_data = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::initializeLevelData()");
+   t_fill_new_level_create = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::fill_new_level_create");
+   t_fill_new_level_comm = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::fill_new_level_comm");
+   t_advance_bdry_fill_create = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::advance_bdry_fill_create");
+   t_new_advance_bdry_fill_create = tbox::TimerManager::getManager()->
+      getTimer(
+         "algs::MblkHyperbolicLevelIntegrator::new_advance_bdry_fill_create");
+   t_apply_gradient_detector = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::applyGradientDetector()");
+   t_coarsen_rich_extrap = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::coarsen_rich_extrap");
+   t_get_level_dt = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::getLevelDt()");
+   t_get_level_dt_sync = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::getLevelDt()_sync");
+   t_advance_level = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::advanceLevel()");
+   t_new_advance_bdry_fill_comm = tbox::TimerManager::getManager()->
+      getTimer(
+         "algs::MblkHyperbolicLevelIntegrator::new_advance_bdry_fill_comm");
+   t_patch_num_kernel = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::patch_numerical_kernels");
+   t_advance_level_sync = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::advanceLevel()_sync");
+   t_std_level_sync = tbox::TimerManager::getManager()->
+      getTimer(
+         "algs::MblkHyperbolicLevelIntegrator::standardLevelSynchronization()");
+   t_sync_new_levels = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::synchronizeNewLevels()");
+
+   /*
+    * Initialize object with data read from the input and restart databases.
+    */
+
+   bool from_restart = tbox::RestartManager::getManager()->isFromRestart();
+   if (from_restart) {
+      getFromRestart();
+   }
+   getFromInput(input_db, from_restart);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destructor tells the tbox::RestartManager to remove this object from   *
+ * the list of restart items.                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+MblkHyperbolicLevelIntegrator::~MblkHyperbolicLevelIntegrator()
+{
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->unregisterRestartItem(d_object_name);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialize integration data on all patches on level.  This process    *
+ * is used at the start of the simulation to set the initial hierarchy   *
+ * data and after adaptive regridding.  In the second case, the old      *
+ * level pointer points to the level that existed in the hierarchy       *
+ * before regridding.  This pointer may be null, in which case it is     *
+ * ignored.  If it is non-null, then data is copied from the old level   *
+ * to the new level before the old level is discarded.                   *
+ *                                                                       *
+ * Note that we also allocate flux storage for the coarsest AMR          *
+ * hierarchy level here (i.e., level 0).  The time step sequence on      *
+ * level 0 is dictated by the user code; so to avoid any memory          *
+ * management errors, flux storage on level 0 persists as long as the    *
+ * level does.
+ *                                                                       *
+ *************************************************************************
+ */
+void MblkHyperbolicLevelIntegrator::initializeLevelData(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const double init_data_time,
+   const bool can_be_refined,
+   const bool initial_time,
+   const tbox::Pointer<hier::BasePatchLevel> old_level,
+   const bool allocate_data)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= hierarchy->getFinestLevelNumber()));
+   if (!(old_level.isNull())) {
+      TBOX_ASSERT(level_number == old_level->getLevelNumber());
+   }
+   TBOX_ASSERT(!(hierarchy->getPatchLevel(level_number)).isNull());
+#endif
+
+   t_initialize_level_data->start();
+
+   tbox::Pointer<hier::MultiblockPatchHierarchy> mblk_hierarchy =
+      hierarchy;
+
+   tbox::Pointer<hier::MultiblockPatchLevel> mblk_level =
+      mblk_hierarchy->getPatchLevel(level_number);
+
+   tbox::Pointer<hier::MultiblockPatchLevel> mblk_old_level =
+      old_level;
+
+   /*
+    * Allocate storage needed to initialize level and fill data
+    * from coarser levels in AMR hierarchy, potentially. Since
+    * time gets set when we allocate data, re-stamp it to current
+    * time if we don't need to allocate.
+    */
+   if (allocate_data) {
+      mblk_level->allocatePatchData(d_new_patch_init_data, init_data_time);
+      mblk_level->allocatePatchData(d_old_time_dep_data, init_data_time);
+   } else {
+      mblk_level->setTime(init_data_time, d_new_patch_init_data);
+   }
+
+   /*
+    * Create schedules for filling new level and fill data.
+    */
+
+   if ((level_number > 0) || !old_level.isNull()) {
+      t_fill_new_level_create->start();
+
+      tbox::Pointer<xfer::MultiblockRefineSchedule> sched =
+         d_mblk_fill_new_level->createSchedule(mblk_level,
+            mblk_old_level,
+            level_number - 1,
+            mblk_hierarchy,
+            d_patch_strategy);
+      t_fill_new_level_create->stop();
+
+      d_patch_strategy->setDataContext(d_scratch);
+
+      t_fill_new_level_comm->start();
+      sched->fillData(init_data_time);
+      t_fill_new_level_comm->stop();
+
+      d_patch_strategy->clearDataContext();
+   }
+
+   if ((d_number_time_data_levels == 3) && can_be_refined) {
+
+      hier::VariableDatabase* variable_db =
+         hier::VariableDatabase::getDatabase();
+
+      for (hier::MultiblockPatchLevelIterator mi(mblk_level); mi; mi++) {
+         tbox::List<tbox::Pointer<hier::Variable> >::Iterator
+         time_dep_var = d_time_dep_variables.listStart();
+         while (time_dep_var) {
+            int old_indx =
+               variable_db->mapVariableAndContextToIndex(time_dep_var(),
+                  d_old);
+            int cur_indx =
+               variable_db->mapVariableAndContextToIndex(time_dep_var(),
+                  d_current);
+
+            (*mi)->setPatchData(old_indx, (*mi)->getPatchData(cur_indx));
+
+            time_dep_var++;
+         }
+
+      } // loop over patches
+   }
+
+   /*
+    * Initialize data on patch interiors.
+    */
+   d_patch_strategy->setDataContext(d_current);
+
+   for (hier::MultiblockPatchLevelIterator mi(mblk_level); mi; mi++) {
+
+      d_patch_strategy->setBlockNumber(mi.getBlockNumber());
+
+      (*mi)->allocatePatchData(d_temp_var_scratch_data, init_data_time);
+
+      d_patch_strategy->initializeDataOnPatch(**mi,
+         init_data_time,
+         initial_time);
+
+      (*mi)->deallocatePatchData(d_temp_var_scratch_data);
+
+      d_patch_strategy->clearBlockNumber();
+
+   } // loop over patches
+
+   d_patch_strategy->clearDataContext();
+
+   t_initialize_level_data->stop();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Reset hierarchy configuration information where the range of new      *
+ * hierarchy levels is specified.   The information updated involves     *
+ * the cached communication schedules maintained by the algorithm.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+MblkHyperbolicLevelIntegrator::resetHierarchyConfiguration(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (coarsest_level <= finest_level)
+      && (finest_level <= hierarchy->getFinestLevelNumber()));
+   for (int ln0 = 0; ln0 <= finest_level; ln0++) {
+      TBOX_ASSERT(!(hierarchy->getPatchLevel(ln0)).isNull());
+   }
+#else
+   NULL_USE(finest_level);
+#endif
+
+   tbox::Pointer<hier::MultiblockPatchHierarchy> mblk_hierarchy =
+      hierarchy;
+
+   int finest_hiera_level = hierarchy->getFinestLevelNumber();
+
+   d_mblk_bdry_sched_advance.resizeArray(finest_hiera_level + 1);
+   d_mblk_bdry_sched_advance_new.resizeArray(finest_hiera_level + 1);
+
+   for (int ln = coarsest_level; ln <= finest_hiera_level; ln++) {
+      tbox::Pointer<hier::MultiblockPatchLevel>
+      mblk_level = mblk_hierarchy->getPatchLevel(ln);
+
+      t_advance_bdry_fill_create->start();
+      d_mblk_bdry_sched_advance[ln] =
+         d_mblk_bdry_fill_advance->createSchedule(mblk_level,
+            ln - 1,
+            mblk_hierarchy,
+            d_patch_strategy);
+      t_advance_bdry_fill_create->stop();
+
+      if (!d_lag_dt_computation && d_use_ghosts_for_dt) {
+         t_new_advance_bdry_fill_create->start();
+         d_mblk_bdry_sched_advance_new[ln] =
+            d_mblk_bdry_fill_advance_new->createSchedule(mblk_level,
+               ln - 1,
+               mblk_hierarchy,
+               d_patch_strategy);
+         t_new_advance_bdry_fill_create->stop();
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Call patch routines to tag cells near large gradients.                *
+ * These cells will be refined.                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkHyperbolicLevelIntegrator::applyGradientDetector(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const double error_data_time,
+   const int tag_index,
+   const bool initial_time,
+   const bool uses_richardson_extrapolation_too)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= hierarchy->getFinestLevelNumber()));
+   TBOX_ASSERT(!(hierarchy->getPatchLevel(level_number)).isNull());
+#endif
+
+   t_apply_gradient_detector->start();
+
+   tbox::Pointer<hier::MultiblockPatchHierarchy> mblk_hierarchy =
+      hierarchy;
+
+   tbox::Pointer<hier::MultiblockPatchLevel> mblk_level =
+      mblk_hierarchy->getPatchLevel(level_number);
+
+   mblk_level->allocatePatchData(d_saved_var_scratch_data, error_data_time);
+
+   d_patch_strategy->setDataContext(d_scratch);
+
+   t_error_bdry_fill_comm->start();
+   d_mblk_bdry_sched_advance[level_number]->fillData(error_data_time);
+   t_error_bdry_fill_comm->stop();
+
+   for (hier::MultiblockPatchLevelIterator mi(mblk_level); mi; mi++) {
+
+      d_patch_strategy->setBlockNumber(mi.getBlockNumber());
+
+      d_patch_strategy->
+      tagGradientDetectorCells(**mi,
+         error_data_time,
+         initial_time,
+         tag_index,
+         uses_richardson_extrapolation_too);
+
+      d_patch_strategy->clearBlockNumber();
+
+   } // loop over patches
+
+   d_patch_strategy->clearDataContext();
+
+   mblk_level->deallocatePatchData(d_saved_var_scratch_data);
+
+   t_apply_gradient_detector->stop();
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The Richardson extrapolation algorithm requires a coarsened version   *
+ * of the level on which error estiamtion is performed.  This routine    *
+ * is used to coarsen data from a level in the AMR hierarchy to some     *
+ * coarsened version of it.  Note that this routine will be called twice *
+ * The init_coarse_level boolean argument indicates whether data is    *
+ * set on the coarse level by coarsening the "old" time level solution   *
+ * or by coarsening the "new" solution on the fine level (i.e., after    *
+ * it has been advanced).                                                *
+ *                                                                       *
+ * The contexts used for coarsening old data depends on the number of    *
+ * time levels.  We always want to use data at the oldest time on the    *
+ * fine level, coarsened to the CURRENT context on the coarse level.     *
+ * Thus, if the problem uses two time levels, we coarsen data from       *
+ * CURRENT on fine level (since CURRENT is the oldest time maintained)   *
+ * to CURRENT on the coarse level.  If the problem uses three time       *
+ * levels, we coarsen from OLD on the fine level (since OLD is the       *
+ * time maintained) to CURRENT on the coarse level.                      *
+ *                                                                       *
+ * When the boolean is false, indicating we are operating at the new     *
+ * time, we coarsen the time advanced solution at the NEW context on     *
+ * the fine level to the NEW context on the coarse level so that they    *
+ * may be compared later.                                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+/*
+ *  ANDY, THIS ROUTINE HAS TO BE CHANGED TO TAKE IN MultiblockPatchLevels
+ *  WHEN WE GET READY TO DO RICHARDSON EXTRAPOLATION. 7/05
+ */
+void
+MblkHyperbolicLevelIntegrator::coarsenDataForRichardsonExtrapolation(
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int level_number,
+   const tbox::Pointer<hier::PatchLevel> coarse_level,
+   const double coarsen_data_time,
+   const bool before_advance)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= hierarchy->getFinestLevelNumber()));
+   TBOX_ASSERT(!(hierarchy->getPatchLevel(level_number)).isNull());
+   TBOX_ASSERT(!coarse_level.isNull());
+#endif
+   t_coarsen_rich_extrap->start();
+
+   tbox::Pointer<hier::PatchLevel> level =
+      hierarchy->getPatchLevel(level_number);
+
+   if (before_advance) {
+
+      coarse_level->allocatePatchData(d_new_patch_init_data,
+         coarsen_data_time);
+
+      if (d_number_time_data_levels == 3) {
+         d_patch_strategy->setDataContext(d_old);
+      } else {
+         d_patch_strategy->setDataContext(d_current);
+      }
+
+      TBOX_ERROR("Incomplete DLBG code.");
+//      d_coarsen_rich_extrap_init->
+//         createSchedule(coarse_level, level, d_patch_strategy)->
+//            coarsenData();
+
+      d_patch_strategy->clearDataContext();
+
+   } else {
+
+      coarse_level->allocatePatchData(d_new_time_dep_data,
+         coarsen_data_time);
+
+      d_patch_strategy->setDataContext(d_new);
+
+      TBOX_ERROR("Incomplete DLBG code.");
+//      d_coarsen_rich_extrap_final->
+//         createSchedule(coarse_level, level, d_patch_strategy)->
+//         coarsenData();
+
+      d_patch_strategy->clearDataContext();
+
+   }
+
+   t_coarsen_rich_extrap->stop();
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Call patch routines to tag cells for refinement using Richardson      *
+ * extrapolation.    Richardson extrapolation requires two copies of     *
+ * the solution to compare.  The NEW context holds the solution          *
+ * computed on the fine level and coarsened, whereas the CURRENT         *
+ * context holds the solution integrated on the coarse level after       *
+ * coarsening the initial data from the fine level.                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+/*
+ *  ANDY, THIS ROUTINE HAS TO BE CHANGED TO TAKE IN MultiblockPatchLevels
+ *  WHEN WE GET READY TO DO RICHARDSON EXTRAPOLATION. 7/05
+ */
+void
+MblkHyperbolicLevelIntegrator::applyRichardsonExtrapolation(
+   const tbox::Pointer<hier::PatchLevel> level,
+   const double error_data_time,
+   const int tag_index,
+   const double deltat,
+   const int error_coarsen_ratio,
+   const bool initial_time,
+   const bool uses_gradient_detector_too)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!level.isNull());
+#endif
+   /*
+    * Compare solutions computed on level (stored in NEW context) and on
+    * the coarser level (stored in CURR context) on the patches of the
+    * coarser level.  The patch strategy implements the compare operations
+    * performed on each patch.
+    */
+
+   int error_level_number =
+      level->getLevelNumber() + 2;
+
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      d_patch_strategy->
+      tagRichardsonExtrapolationCells(*patch,
+         error_level_number,
+         d_new,                                     //  finer context
+         d_current,                                 //  coarser context
+         error_data_time,
+         deltat,
+         error_coarsen_ratio,
+         initial_time,
+         tag_index,
+         uses_gradient_detector_too);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialize level integrator by:                                       *
+ *                                                                       *
+ *   (1) Setting the number of time data levels based on needs of        *
+ *       the gridding algorithm                                          *
+ *   (2) Invoking variable registration in patch strategy.               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+MblkHyperbolicLevelIntegrator::initializeLevelIntegrator(
+   tbox::Pointer<mesh::BaseGriddingAlgorithm> gridding_alg)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!gridding_alg.isNull());
+#endif
+
+   d_number_time_data_levels = 2;
+
+   if ((gridding_alg->getTagAndInitializeStrategy()->getErrorCoarsenRatio() < 1) ||
+       (gridding_alg->getTagAndInitializeStrategy()->getErrorCoarsenRatio() > 3)) {
+      TBOX_ERROR("MblkHyperbolicLevelIntegrator::initializeLevelIntegrator "
+         << "error...\n" << "   object name = " << d_object_name
+         << "   gridding algorithm has bad error coarsen ratio" << std::endl);
+   }
+
+   if ((gridding_alg->errorEstimationUsesTimeIntegration()) &&
+       (gridding_alg->getTagAndInitializeStrategy()->getErrorCoarsenRatio() == 3)) {
+      d_number_time_data_levels = 3;
+      d_old = hier::VariableDatabase::getDatabase()->getContext("OLD");
+   }
+
+   d_patch_strategy->registerModelVariables(this);
+
+   d_patch_strategy->setupLoadBalancer(this,
+      gridding_alg.getPointer());
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Invoke dt calculation routines in patch strategy and take a min       *
+ * over all patches on the level.  The result will be the max of the     *
+ * next timestep on the level. If the boolean recompute_dt is true,      *
+ * the max timestep on the level will be computed.  If it is false,      *
+ * the method will simply access the latest dt stored in the time        *
+ * refinement integrator.                                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double
+MblkHyperbolicLevelIntegrator::getLevelDt(
+   const tbox::Pointer<hier::BasePatchLevel> level,
+   const double dt_time,
+   const bool initial_time)
+{
+   tbox::Pointer<hier::MultiblockPatchLevel> mblk_patch_level = level;
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!mblk_patch_level.isNull());
+#endif
+   t_get_level_dt->start();
+
+   double dt = tbox::MathUtilities<double>::getMax();
+
+   if (!d_use_ghosts_for_dt) {
+
+      d_patch_strategy->setDataContext(d_current);
+
+      for (hier::MultiblockPatchLevelIterator mi(mblk_patch_level); mi; mi++) {
+
+         d_patch_strategy->setBlockNumber(mi.getBlockNumber());
+
+         (*mi)->allocatePatchData(d_temp_var_scratch_data, dt_time);
+
+         double patch_dt;
+         patch_dt = d_patch_strategy->
+            computeStableDtOnPatch(**mi,
+               initial_time,
+               dt_time);
+
+         dt = tbox::MathUtilities<double>::Min(dt, patch_dt);
+
+         (*mi)->deallocatePatchData(d_temp_var_scratch_data);
+
+         d_patch_strategy->clearBlockNumber();
+
+      } // loop over patches
+
+      d_patch_strategy->clearDataContext();
+
+   } else {
+
+      mblk_patch_level->allocatePatchData(d_saved_var_scratch_data,
+         dt_time);
+
+      d_patch_strategy->setDataContext(d_scratch);
+
+      t_advance_bdry_fill_comm->start();
+      d_mblk_bdry_sched_advance[mblk_patch_level->getLevelNumber()]->
+      fillData(dt_time);
+      t_advance_bdry_fill_comm->stop();
+
+      for (hier::MultiblockPatchLevelIterator mi(mblk_patch_level); mi; mi++) {
+
+         d_patch_strategy->setBlockNumber(mi.getBlockNumber());
+
+         (*mi)->allocatePatchData(d_temp_var_scratch_data, dt_time);
+
+         double patch_dt;
+         patch_dt = d_patch_strategy->
+            computeStableDtOnPatch(**mi,
+               initial_time,
+               dt_time);
+
+         dt = tbox::MathUtilities<double>::Min(dt, patch_dt);
+
+         (*mi)->deallocatePatchData(d_temp_var_scratch_data);
+
+         d_patch_strategy->clearBlockNumber();
+
+      } // loop over patches
+
+      d_patch_strategy->clearDataContext();
+
+      /*
+       * Copy data from scratch to current and de-allocate scratch storage.
+       * This may be excessive here, but seems necessary if the
+       * computation of dt affects the state of the problem solution.
+       * Also, this getLevelDt() routine is called at initialization only
+       * in most cases.
+       */
+
+      for (int nb = 0; nb < mblk_patch_level->getNumberOfBlocks(); nb++) {
+         tbox::Pointer<hier::PatchLevel> patch_level =
+            mblk_patch_level->getPatchLevelForBlock(nb);
+
+         if (!patch_level.isNull()) {
+            copyTimeDependentData(patch_level, d_scratch, d_current);
+         }
+
+      } // loop over blocks
+
+      mblk_patch_level->deallocatePatchData(d_saved_var_scratch_data);
+
+   }
+
+   t_get_level_dt_sync->start();
+
+   if (d_distinguish_mpi_reduction_costs) {
+      tbox::SAMRAI_MPI::getSAMRAIWorld().Barrier();
+      t_get_level_dt_sync->stop();
+      t_mpi_reductions->start();
+   }
+
+   /*
+    * The level time increment is a global min over all patches.
+    */
+
+   double global_dt = dt;
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&global_dt, 1, MPI_MIN);
+   }
+   global_dt *= tbox::MathUtilities<double>::Min(d_cfl_init, d_cfl);
+
+   if (d_distinguish_mpi_reduction_costs) {
+      t_mpi_reductions->stop();
+   } else {
+      t_get_level_dt_sync->stop();
+   }
+
+   t_get_level_dt->stop();
+
+   return global_dt;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * For the standard explicit integration algorithm for hyperbolic        *
+ * conservation laws, the fine time increment is the coarse increment    *
+ * divided by the maximum mesh ratio (independent of level number).      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double
+MblkHyperbolicLevelIntegrator::getMaxFinerLevelDt(
+   const int finer_level_number,
+   const double coarse_dt,
+   const hier::IntVector& ratio)
+{
+   NULL_USE(finer_level_number);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   for (int id = 0; id < d_dim.getValue(); id++) {
+      TBOX_ASSERT(ratio(id) > 0);
+   }
+#endif
+   return coarse_dt / double(ratio.max());
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Integrate data on all patches in patch level from current time        *
+ * to new time (new_time) using a single time step.  Before the advance  *
+ * can occur, proper ghost cell information is obtained for all patches  *
+ * on the level.  Then, local patches are advanced sequentially in the   *
+ * loop over patches.  The details of the routine are as follows:        *
+ *                                                                       *
+ *  0) Allocate storage for new time level data. Also, allocate          *
+ *     necessary FLUX and flux integral storage if needed                *
+ *     (i.e., if regrid_advance is false, first_step is true, and        *
+ *     coarser or finer level than current level exists in hierarchy.)   *
+ *                                                                       *
+ *  1) Scratch space is filled so that, for each patch, interior data    *
+ *     and ghost cell bdry data correspond to specified time.            *
+ *                                                                       *
+ *  1a) Call user routines to pre-process advance data, if needed.       *
+ *                                                                       *
+ *  2) Compute explicit fluxes in scratch space using data on            *
+ *     patch + ghosts at given time.                                     *
+ *                                                                       *
+ *  3) Apply conservative difference in scratch space to advance patch   *
+ *     interior data to time = new_time.                                 *
+ *                                                                       *
+ *  3a) Call user routines to post-process advance data, if needed.      *
+ *                                                                       *
+ *  4) Compute next stable time increment for subsequent level advances: *
+ *                                                                       *
+ *     4a) If (d_lag_dt_computation == true) {                           *
+ *            DO NOT RECOMPUTE characteristic data after advancing       *
+ *            data on patch. Use characteristic data corresponding       *
+ *            to current time level, computed prior to flux computation, *
+ *            in dt calculation.                                         *
+ *            If (d_use_ghosts_for_dt == true)                           *
+ *               - Compute dt using data on patch+ghosts at time.        *
+ *            Else                                                       *
+ *               - Compute dt using data on patch interior ONLY.         *
+ *         }                                                             *
+ *                                                                       *
+ *     4b) Copy data from scratch space patch interior to new data       *
+ *         storage for patch (i.e., at time = new_time).                 *
+ *                                                                       *
+ *     4a) If (d_lag_dt_computation == false) {                          *
+ *            RECOMPUTE characteristic data after advancing data on      *
+ *            patch. Use characteristic data corresponding to new time   *
+ *            level in dt calculation.                                   *
+ *            If (d_use_ghosts_for_dt == true)                           *
+ *               - Refill scratch space with new interior patch data     *
+ *                 and ghost cell bdry data correspond to new time.      *
+ *                 (NOTE: This requires a new boundary schedule.)        *
+ *               - Compute dt using data on patch+ghosts at new_time.    *
+ *            Else                                                       *
+ *               - Compute dt using data on patch interior ONLY.         *
+ *                 (using patch interior data at new_time)               *
+ *         }                                                             *
+ *                                                                       *
+ *  5) If (ln > 0), update flux integrals by adding patch bdry FLUXes    *
+ *     to flux sums.                                                     *
+ *                                                                       *
+ * Important Notes:                                                      *
+ *    1) In order to advance finer levels (if they exist), both old      *
+ *       and new data for each patch on the level must be maintained.    *
+ *    2) If the timestep is the first in the timestep loop on the level  *
+ *       (indicated by first_step), then time interpolation is           *
+ *       is unnecessary to fill ghost cells from the next coarser level. *
+ *    3) The new dt is not calculated if regrid_advance is true.         *
+ *       If this is the case, it is assumed that the results of the      *
+ *       advance and the timestep calculation will be discarded          *
+ *       (e.g., during regridding, or initialization).  Also, allocation *
+ *       and post-processing of FLUX/flux integral data is not performed *
+ *       in this case.                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double
+MblkHyperbolicLevelIntegrator::advanceLevel(
+   const tbox::Pointer<hier::BasePatchLevel> level,
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const double current_time,
+   const double new_time,
+   const bool first_step,
+   const bool last_step,
+   const bool regrid_advance)
+{
+
+   tbox::Pointer<hier::MultiblockPatchHierarchy> mblk_hierarchy =
+      hierarchy;
+
+   tbox::Pointer<hier::MultiblockPatchLevel> mblk_level =
+      level;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!mblk_level.isNull());
+   TBOX_ASSERT(!mblk_hierarchy.isNull());
+   TBOX_ASSERT(current_time <= new_time);
+#endif
+
+   int nb;
+
+#ifdef RECORD_STATS
+   tbox::Pointer<tbox::Statistic> num_boxes_l0 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("NumberBoxesL0", "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> num_boxes_l1 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("NumberBoxesL1", "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> num_boxes_l2 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("NumberBoxesL2", "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> num_boxes_l3 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("NumberBoxesL3", "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> num_gridcells_l0 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("NumberGridcellsL0", "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> num_gridcells_l1 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("NumberGridcellsL1", "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> num_gridcells_l2 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("NumberGridcellsL2", "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> num_gridcells_l3 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("NumberGridcellsL3", "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> timestamp_l0 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("TimeStampL0", "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> timestamp_l1 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("TimeStampL1", "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> timestamp_l2 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("TimeStampL2", "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> timestamp_l3 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("TimeStampL3", "PROC_STAT");
+
+   int level_num = mblk_level->getLevelNumber();
+
+   /*
+    * Record number of gridcells on each patch.  Note that patch
+    * stat requires a seq number to be identified.
+    */
+   double level_gridcells = 0.;
+   double level_local_patches = 0.;
+   // to count total gridcells on mblk_level
+   //hier::BoxArray boxes = mblk_level->getBoxes();
+   //for (int i = 0; i < boxes.getNumberOfBoxes(); i++) {
+   //   level_gridcells += boxes(i).size();
+   //}
+   // to count gridcells on this processor
+
+   for (hier::MultiblockPatchLevelIterator mi(mblk_level); mi; mi++) {
+      level_gridcells += (*mi)->getBox().size();
+      level_local_patches += 1.0;
+   }
+
+   if (level_num == 0) {
+      num_boxes_l0->recordProcStat(level_local_patches);
+      num_gridcells_l0->recordProcStat(level_gridcells);
+      timestamp_l0->recordProcStat(current_time);
+   }
+   if (level_num == 1) {
+      num_boxes_l1->recordProcStat(level_local_patches);
+      num_gridcells_l1->recordProcStat(level_gridcells);
+      timestamp_l1->recordProcStat(current_time);
+   }
+   if (level_num == 2) {
+      num_boxes_l2->recordProcStat(level_local_patches);
+      num_gridcells_l2->recordProcStat(level_gridcells);
+      timestamp_l2->recordProcStat(current_time);
+   }
+   if (level_num == 3) {
+      num_boxes_l3->recordProcStat(level_local_patches);
+      num_gridcells_l3->recordProcStat(level_gridcells);
+      timestamp_l3->recordProcStat(current_time);
+   }
+#endif
+
+   t_advance_level->start();
+
+   const int level_number = mblk_level->getLevelNumber();
+   const double dt = new_time - current_time;
+
+   /*
+    * (1) Allocate data needed for advancing level.
+    * (2) Generate temporary communication schedule to fill ghost
+    *     cells, if needed.
+    * (3) Fill ghost cell data.
+    * (4) Process flux storage before the advance.
+    */
+
+   mblk_level->allocatePatchData(d_new_time_dep_data, new_time);
+   mblk_level->allocatePatchData(d_saved_var_scratch_data, current_time);
+
+   tbox::Pointer<xfer::MultiblockRefineSchedule> mblk_fill_schedule;
+
+   bool in_hierarchy = false;
+   for (nb = 0; nb < mblk_level->getNumberOfBlocks(); nb++) {
+      tbox::Pointer<hier::PatchLevel> patch_level =
+         mblk_level->getPatchLevelForBlock(nb);
+      if (!patch_level.isNull()) {
+         in_hierarchy = patch_level->inHierarchy();
+      }
+   }
+
+   if (!in_hierarchy) {
+      t_error_bdry_fill_create->start();
+      if (d_number_time_data_levels == 3) {
+         mblk_fill_schedule = d_mblk_bdry_fill_advance_old->
+            createSchedule(mblk_level,
+               mblk_level->getLevelNumber() - 1,
+               mblk_hierarchy,
+               d_patch_strategy);
+      } else {
+         mblk_fill_schedule = d_mblk_bdry_fill_advance->
+            createSchedule(mblk_level,
+               mblk_level->getLevelNumber() - 1,
+               mblk_hierarchy,
+               d_patch_strategy);
+      }
+      t_error_bdry_fill_create->stop();
+   } else {
+      mblk_fill_schedule = d_mblk_bdry_sched_advance[level_number];
+   }
+
+   d_patch_strategy->setDataContext(d_scratch);
+   if (regrid_advance) {
+      t_error_bdry_fill_comm->start();
+   } else {
+      t_advance_bdry_fill_comm->start();
+   }
+   mblk_fill_schedule->fillData(current_time);
+   if (regrid_advance) {
+      t_error_bdry_fill_comm->stop();
+   } else {
+      t_advance_bdry_fill_comm->stop();
+   }
+
+   d_patch_strategy->clearDataContext();
+   mblk_fill_schedule.setNull();
+
+   preprocessFluxData(mblk_level,
+      current_time,
+      new_time,
+      regrid_advance,
+      first_step,
+      last_step);
+
+   for (nb = 0; nb < mblk_level->getNumberOfBlocks(); nb++) {
+      tbox::Pointer<hier::PatchLevel> patch_level =
+         mblk_level->getPatchLevelForBlock(nb);
+
+      d_patch_strategy->setBlockNumber(nb);
+
+      if (!patch_level.isNull()) {
+
+         /*
+          * (5) Call user-routine to pre-process state data, if needed.
+          * (6) Advance solution on all level patches (scratch storage).
+          * (7) Copy new solution to from scratch to new storage.
+          * (8) Call user-routine to post-process state data, if needed.
+          */
+         t_patch_num_kernel->start();
+         d_patch_strategy->preprocessAdvanceLevelState(patch_level,
+            current_time,
+            dt,
+            first_step,
+            last_step,
+            regrid_advance);
+         t_patch_num_kernel->stop();
+
+         d_patch_strategy->setDataContext(d_scratch);
+         for (hier::PatchLevel::Iterator ip(patch_level); ip; ip++) {
+            tbox::Pointer<hier::Patch> patch = *ip;
+
+            patch->allocatePatchData(d_temp_var_scratch_data, current_time);
+
+            t_patch_num_kernel->start();
+            d_patch_strategy->computeFluxesOnPatch(*patch,
+               current_time,
+               dt);
+            t_patch_num_kernel->stop();
+
+            bool at_syncronization = false;
+
+            t_patch_num_kernel->start();
+            d_patch_strategy->conservativeDifferenceOnPatch(*patch,
+               current_time,
+               dt,
+               at_syncronization);
+            t_patch_num_kernel->stop();
+
+            patch->deallocatePatchData(d_temp_var_scratch_data);
+         }
+         d_patch_strategy->clearDataContext();
+
+         patch_level->setTime(new_time, d_saved_var_scratch_data);
+         patch_level->setTime(new_time, d_flux_var_data);
+
+         copyTimeDependentData(patch_level, d_scratch, d_new);
+
+         t_patch_num_kernel->start();
+         d_patch_strategy->postprocessAdvanceLevelState(patch_level,
+            current_time,
+            dt,
+            first_step,
+            last_step,
+            regrid_advance);
+         t_patch_num_kernel->stop();
+      }
+
+      d_patch_strategy->clearBlockNumber();
+
+   } // loop over blocks
+
+   /*
+    * (9) If the level advance is for regridding, we compute the next timestep:
+    *
+    * (a) If the dt computation is lagged (i.e., we use pre-advance data
+    *     to compute timestep), we reset scratch space on patch interiors
+    *     if needed.  Then, we set the strategy context to current or scratch
+    *     depending on whether ghost values are used to compute dt.
+    * (b) If the dt computation is not lagged (i.e., we use advanced data
+    *     to compute timestep), we refill scratch space, including ghost
+    *     data with new solution values if needed.  Then, we set the strategy
+    *     context to new or scratch depending on whether ghost values are
+    *     used to compute dt.
+    * (c) Then, we loop over patches and compute the dt on each patch.
+    */
+
+   double dt_next = tbox::MathUtilities<double>::getMax();
+
+   if (!regrid_advance) {
+
+      if (d_lag_dt_computation) {
+
+         if (d_use_ghosts_for_dt) {
+            d_patch_strategy->setDataContext(d_scratch);
+            for (nb = 0; nb < mblk_level->getNumberOfBlocks(); nb++) {
+               tbox::Pointer<hier::PatchLevel> patch_level =
+                  mblk_level->getPatchLevelForBlock(nb);
+
+               if (!patch_level.isNull()) {
+                  copyTimeDependentData(patch_level, d_current, d_scratch);
+               }
+
+            }
+         } else {
+            d_patch_strategy->setDataContext(d_current);
+         }
+
+      } else {
+
+         if (d_use_ghosts_for_dt) {
+
+            if (d_mblk_bdry_sched_advance_new[level_number].isNull()) {
+               TBOX_ERROR(
+                  d_object_name << ":  "
+                  <<
+                  "Attempt to fill new ghost data for timestep"
+                  <<
+                  "computation, but schedule not defined." << std::endl);
+            }
+
+            d_patch_strategy->setDataContext(d_scratch);
+            t_new_advance_bdry_fill_comm->start();
+            d_mblk_bdry_sched_advance_new[level_number]->fillData(new_time);
+            t_new_advance_bdry_fill_comm->stop();
+
+         } else {
+            d_patch_strategy->setDataContext(d_new);
+         }
+
+      }
+
+      for (hier::MultiblockPatchLevelIterator mi(mblk_level); mi; mi++) {
+
+         d_patch_strategy->setBlockNumber(mi.getBlockNumber());
+
+         (*mi)->allocatePatchData(d_temp_var_scratch_data, new_time);
+         // "false" argument indicates "initial_time" is false.
+         t_patch_num_kernel->start();
+         double patch_dt =
+            d_patch_strategy->computeStableDtOnPatch(**mi,
+               false,
+               new_time);
+         t_patch_num_kernel->stop();
+
+         dt_next = tbox::MathUtilities<double>::Min(dt_next, patch_dt);
+
+         (*mi)->deallocatePatchData(d_temp_var_scratch_data);
+
+         d_patch_strategy->clearBlockNumber();
+
+      } // loop over patches
+
+      d_patch_strategy->clearDataContext();
+
+   } // !regrid_advance
+
+   mblk_level->deallocatePatchData(d_saved_var_scratch_data);
+
+   postprocessFluxData(mblk_level,
+      regrid_advance,
+      first_step,
+      last_step);
+
+   t_advance_level->stop();
+
+   t_advance_level_sync->start();
+
+   if (d_distinguish_mpi_reduction_costs) {
+      tbox::SAMRAI_MPI::getSAMRAIWorld().Barrier();
+      t_advance_level_sync->stop();
+      t_mpi_reductions->start();
+   }
+
+   double next_dt = dt_next;
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&next_dt, 1, MPI_MIN);
+   }
+   next_dt *= d_cfl;
+
+   if (d_distinguish_mpi_reduction_costs) {
+      t_mpi_reductions->stop();
+   } else {
+      t_advance_level_sync->stop();
+   }
+
+   return next_dt;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Synchronize data between patch levels according to the standard       *
+ * hyperbolic flux correction algorithm.                                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+MblkHyperbolicLevelIntegrator::standardLevelSynchronization(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level,
+   const double sync_time,
+   const double old_time)
+{
+   tbox::Array<double> old_times(finest_level - coarsest_level + 1);
+   for (int i = coarsest_level; i <= finest_level; i++) {
+      old_times[i] = old_time;
+   }
+   standardLevelSynchronization(hierarchy, coarsest_level, finest_level,
+      sync_time, old_times);
+}
+
+void
+MblkHyperbolicLevelIntegrator::standardLevelSynchronization(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level,
+   const double sync_time,
+   const tbox::Array<double>& old_times)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (coarsest_level < finest_level)
+      && (finest_level <= hierarchy->getFinestLevelNumber()));
+   TBOX_ASSERT(old_times.getSize() >= finest_level);
+   for (int ln = coarsest_level; ln < finest_level; ln++) {
+      TBOX_ASSERT(!(hierarchy->getPatchLevel(ln)).isNull());
+      TBOX_ASSERT(sync_time >= old_times[ln]);
+   }
+   TBOX_ASSERT(!(hierarchy->getPatchLevel(finest_level)).isNull());
+#endif
+   t_std_level_sync->start();
+
+   tbox::Pointer<hier::MultiblockPatchHierarchy> mblk_hierarchy =
+      hierarchy;
+
+   for (int fine_ln = finest_level; fine_ln > coarsest_level; fine_ln--) {
+      const int coarse_ln = fine_ln - 1;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(sync_time >= old_times[coarse_ln]);
+#endif
+
+      tbox::Pointer<hier::MultiblockPatchLevel>
+      mblk_fine_level = mblk_hierarchy->getPatchLevel(fine_ln);
+      tbox::Pointer<hier::MultiblockPatchLevel>
+      mblk_coarse_level = mblk_hierarchy->getPatchLevel(coarse_ln);
+
+      synchronizeLevelWithCoarser(mblk_fine_level,
+         mblk_coarse_level,
+         sync_time,
+         old_times[coarse_ln]);
+
+      mblk_fine_level->deallocatePatchData(d_fluxsum_data);
+      mblk_fine_level->deallocatePatchData(d_flux_var_data);
+
+      if (coarse_ln > coarsest_level) {
+         mblk_coarse_level->deallocatePatchData(d_flux_var_data);
+      } else {
+         if (coarsest_level == 0) {
+            mblk_coarse_level->deallocatePatchData(d_flux_var_data);
+            d_have_flux_on_level_zero = false;
+         }
+      }
+
+   }
+
+   t_std_level_sync->stop();
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Coarsen current solution data from finest hierarchy level specified   *
+ * down through the coarsest hierarchy level specified, if initial_time  *
+ * is true (i.e., hierarchy is being constructed at initial simulation   *
+ * time).  After data is coarsened, the user's initialization routine    *
+ * is called to reset data (as needed by the application) before         *
+ * that solution is further coarsened to the next coarser level in the   *
+ * hierarchy.  If initial_time is false, then this routine does nothing  *
+ * In that case, interpolation of data from coarser levels is sufficient *
+ * to set data on new levels in the hierarchy during regridding.         *
+ *                                                                       *
+ * NOTE: The fact that this routine does nothing when called at any      *
+ *       time later than when the AMR hierarchy is constructed initially *
+ *        may need to change at some point based on application needs.   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkHyperbolicLevelIntegrator::synchronizeNewLevels(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level,
+   const double sync_time,
+   const bool initial_time)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (coarsest_level < finest_level)
+      && (finest_level <= hierarchy->getFinestLevelNumber()));
+   for (int ln = coarsest_level; ln <= finest_level; ln++) {
+      TBOX_ASSERT(!(hierarchy->getPatchLevel(ln)).isNull());
+   }
+#endif
+
+   tbox::Pointer<tbox::Timer> t_sync_initial_create =
+      tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::sync_initial_create");
+   tbox::Pointer<tbox::Timer> t_sync_initial_comm =
+      tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::sync_initial_comm");
+
+   t_sync_new_levels->start();
+
+   tbox::Pointer<hier::MultiblockPatchHierarchy> mblk_hierarchy =
+      hierarchy;
+
+   if (initial_time) {
+
+      d_patch_strategy->setDataContext(d_current);
+
+      for (int fine_ln = finest_level; fine_ln > coarsest_level; fine_ln--) {
+         const int coarse_ln = fine_ln - 1;
+
+         tbox::Pointer<hier::MultiblockPatchLevel> fine_level =
+            mblk_hierarchy->getPatchLevel(fine_ln);
+
+         tbox::Pointer<hier::MultiblockPatchLevel> coarse_level =
+            mblk_hierarchy->getPatchLevel(coarse_ln);
+
+         t_sync_initial_create->start();
+         tbox::Pointer<xfer::MultiblockCoarsenSchedule> sched =
+            d_mblk_sync_initial_data->createSchedule(coarse_level,
+               fine_level,
+               d_patch_strategy);
+         t_sync_initial_create->stop();
+
+         t_sync_initial_comm->start();
+         //sched->coarsenData();
+         t_sync_initial_comm->stop();
+
+         for (hier::MultiblockPatchLevelIterator mi(coarse_level); mi; mi++) {
+
+            d_patch_strategy->setBlockNumber(mi.getBlockNumber());
+
+            (*mi)->allocatePatchData(d_temp_var_scratch_data, sync_time);
+
+            d_patch_strategy->initializeDataOnPatch(**mi,
+               sync_time,
+               initial_time);
+            (*mi)->deallocatePatchData(d_temp_var_scratch_data);
+
+            d_patch_strategy->clearBlockNumber();
+         }
+      }
+
+      d_patch_strategy->clearDataContext();
+
+   } // if (initial_time)
+
+   t_sync_new_levels->stop();
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Synchronize data between coarse and fine patch levels according to    *
+ * the standard hyperbolic flux correction algorithm.  The steps of      *
+ * the algorithm are:                                                    *
+ *                                                                       *
+ *    (1) Replace coarse time-space flux integrals at coarse-fine        *
+ *        boundaries with time-space flux integrals computed on fine     *
+ *        level.                                                         *
+ *    (2) Repeat conservative difference on coarse level with corrected  *
+ *        fluxes.                                                        *
+ *    (3) Conservatively coarsen solution on interior of fine level to   *
+ *        coarse level.                                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+MblkHyperbolicLevelIntegrator::synchronizeLevelWithCoarser(
+   const tbox::Pointer<hier::MultiblockPatchLevel> mblk_fine_level,
+   const tbox::Pointer<hier::MultiblockPatchLevel> mblk_coarse_level,
+   const double sync_time,
+   const double coarse_sim_time)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!mblk_fine_level.isNull());
+   TBOX_ASSERT(!mblk_coarse_level.isNull());
+   TBOX_ASSERT(mblk_coarse_level->getLevelNumber() ==
+      (mblk_fine_level->getLevelNumber() - 1));
+#endif
+
+   tbox::Pointer<tbox::Timer> t_coarsen_fluxsum_create =
+      tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::coarsen_fluxsum_create");
+   tbox::Pointer<tbox::Timer> t_coarsen_fluxsum_comm =
+      tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::coarsen_fluxsum_comm");
+   tbox::Pointer<tbox::Timer> t_coarsen_sync_create =
+      tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::coarsen_sync_create");
+   tbox::Pointer<tbox::Timer> t_coarsen_sync_comm =
+      tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::coarsen_sync_comm");
+
+   /*
+    * Coarsen flux integrals around fine patch boundaries to coarser level
+    * and replace coarse flux information where appropriate.  NULL patch
+    * model is passed in to avoid over complicating coarsen process;
+    * i.e. patch model is not needed in coarsening of flux integrals.
+    */
+
+   t_coarsen_fluxsum_create->start();
+   tbox::Pointer<xfer::MultiblockCoarsenSchedule> sched =
+      d_mblk_coarsen_fluxsum->createSchedule(mblk_coarse_level,
+         mblk_fine_level,
+         NULL);
+   t_coarsen_fluxsum_create->stop();
+
+   d_patch_strategy->setDataContext(d_current);
+   t_coarsen_fluxsum_comm->start();
+   //sched->coarsenData();
+   t_coarsen_fluxsum_comm->stop();
+   d_patch_strategy->clearDataContext();
+
+   /*
+    * Repeat conservative difference on coarser level.
+    */
+   mblk_coarse_level->allocatePatchData(d_saved_var_scratch_data,
+      coarse_sim_time);
+   mblk_coarse_level->setTime(coarse_sim_time, d_flux_var_data);
+
+   d_patch_strategy->setDataContext(d_scratch);
+   t_advance_bdry_fill_comm->start();
+   d_mblk_bdry_sched_advance[mblk_coarse_level->getLevelNumber()]->
+   fillData(coarse_sim_time);
+   t_advance_bdry_fill_comm->stop();
+
+   const double reflux_dt = sync_time - coarse_sim_time;
+
+   int nb;
+
+   for (hier::MultiblockPatchLevelIterator mi(mblk_coarse_level); mi; mi++) {
+
+      d_patch_strategy->setBlockNumber(mi.getBlockNumber());
+
+      (*mi)->allocatePatchData(d_temp_var_scratch_data, coarse_sim_time);
+
+      bool at_syncronization = true;
+      d_patch_strategy->conservativeDifferenceOnPatch(**mi,
+         coarse_sim_time,
+         reflux_dt,
+         at_syncronization);
+      (*mi)->deallocatePatchData(d_temp_var_scratch_data);
+
+      d_patch_strategy->clearBlockNumber();
+
+   } // loop over patches
+
+   d_patch_strategy->clearDataContext();
+
+   for (nb = 0; nb < mblk_coarse_level->getNumberOfBlocks(); nb++) {
+      tbox::Pointer<hier::PatchLevel> patch_level =
+         mblk_coarse_level->getPatchLevelForBlock(nb);
+
+      if (!patch_level.isNull()) {
+         copyTimeDependentData(patch_level, d_scratch, d_new);
+      }
+
+   }
+
+   mblk_coarse_level->deallocatePatchData(d_saved_var_scratch_data);
+
+   /*
+    * Coarsen time-dependent data from fine patch interiors to coarse patches.
+    */
+
+   t_coarsen_sync_create->start();
+   sched = d_mblk_coarsen_sync_data->createSchedule(mblk_coarse_level,
+         mblk_fine_level,
+         d_patch_strategy);
+   t_coarsen_sync_create->stop();
+
+   d_patch_strategy->setDataContext(d_new);
+
+   t_coarsen_sync_comm->start();
+   //sched->coarsenData();
+   t_coarsen_sync_comm->stop();
+
+   d_patch_strategy->clearDataContext();
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Reset time-dependent data on patch level by replacing current data    *
+ * with new.  The boolean argument is used for odd refinement ratios     *
+ * (in particular 3 used in certain applications).                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkHyperbolicLevelIntegrator::resetTimeDependentData(
+   const tbox::Pointer<hier::BasePatchLevel> level,
+   const double new_time,
+   const bool can_be_refined)
+{
+   tbox::Pointer<hier::MultiblockPatchLevel> mblk_level = level;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!mblk_level.isNull());
+#endif
+
+   hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+
+   double cur_time = 0.;
+
+   for (hier::MultiblockPatchLevelIterator mi(mblk_level); mi; mi++) {
+
+      tbox::List<tbox::Pointer<hier::Variable> >::Iterator
+      time_dep_var = d_time_dep_variables.listStart();
+      while (time_dep_var) {
+
+         int cur_indx =
+            variable_db->mapVariableAndContextToIndex(time_dep_var(),
+               d_current);
+         int new_indx =
+            variable_db->mapVariableAndContextToIndex(time_dep_var(),
+               d_new);
+
+         cur_time = (*mi)->getPatchData(cur_indx)->getTime();
+
+         if (can_be_refined && d_number_time_data_levels == 3) {
+
+            int old_indx =
+               variable_db->mapVariableAndContextToIndex(time_dep_var(),
+                  d_old);
+
+            (*mi)->setPatchData(old_indx, (*mi)->getPatchData(cur_indx));
+
+            (*mi)->setPatchData(cur_indx, (*mi)->getPatchData(new_indx));
+
+         } else {
+
+            if (d_number_time_data_levels == 3) {
+
+               int old_indx =
+                  variable_db->mapVariableAndContextToIndex(time_dep_var(),
+                     d_old);
+
+               (*mi)->setPatchData(old_indx, (*mi)->getPatchData(cur_indx));
+
+            }
+
+            (*mi)->setPatchData(cur_indx, (*mi)->getPatchData(new_indx));
+
+         }
+
+         (*mi)->deallocatePatchData(new_indx);
+
+         time_dep_var++;
+
+      }
+
+   } // loop over patches
+
+   mblk_level->setTime(new_time, d_new_patch_init_data);
+
+   if (d_number_time_data_levels == 3) {
+      mblk_level->setTime(cur_time, d_old_time_dep_data);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Discard new data on level.  This is used primarily to reset patch     *
+ * data after error estimation (e.g., Richardson extrapolation.)         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+MblkHyperbolicLevelIntegrator::resetDataToPreadvanceState(
+   const tbox::Pointer<hier::BasePatchLevel> level)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!level.isNull());
+#endif
+
+   /*
+    * De-allocate new context
+    */
+   level->deallocatePatchData(d_new_time_dep_data);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register given variable with algorithm according to specified         *
+ * algorithm role (i.e., HYP_VAR_TYPE).  Assignment of descriptor        *
+ * indices to variable lists, component selectors, and communication     *
+ * algorithms takes place here.  The different cases are:                *
+ *                                                                       *
+ * TIME_DEP:                                                             *
+ *            The number of factories depends on the number of time      *
+ *            levels of data that must be stored on patches to satisfy   *
+ *            regridding reqs.  Currently, there are two possibilities:  *
+ *                                                                       *
+ *            (1) If the coarsen ratios between levels are even, the     *
+ *                error coarsening ratio will be two and so only two     *
+ *                time levels of data must be maintained on every level  *
+ *                but the finest as usual.                               *
+ *                                                                       *
+ *            (2) If the coarsen ratios between levels are three, and    *
+ *                time integration is used during regridding (e.g., Rich-*
+ *                ardson extrapolation), then three time levels of data  *
+ *                must be maintained on every level but the finest so    *
+ *                that error estimation can be executed properly.        *
+ *                                                                       *
+ *            In case (1), three factories are needed:                   *
+ *                         SCRATCH, CURRENT, NEW.                        *
+ *            In case (2), four factories are needed:                    *
+ *                         SCRATCH, OLD, CURRENT, NEW.                   *
+ *                                                                       *
+ *            SCRATCH index is added to d_saved_var_scratch_data.        *
+ *            CURRENT index is added to d_new_patch_init_data.           *
+ *            NEW index is added to d_new_time_dep_data.                 *
+ *                                                                       *
+ * INPUT:                                                                *
+ *            Only one time level of data is maintained and once values  *
+ *            are set on patches, they do not change in time.            *
+ *                                                                       *
+ *            Two factories are needed: SCRATCH, CURRENT.                *
+ *                                                                       *
+ *            SCRATCH index is added to d_saved_var_scratch_data.        *
+ *            CURRENT index is added to d_new_patch_init_data.           *
+ *                                                                       *
+ * NO_FILL:                                                              *
+ *            Only one time level of data is stored and no scratch space *
+ *            is used.  Data may be set and manipulated at will in user  *
+ *            routines.  Data (including ghost values) is never touched  *
+ *            outside of user routines.                                  *
+ *                                                                       *
+ *            Two factories are needed: CURRENT, SCRATCH.                *
+ *                                                                       *
+ *            CURRENT index is added to d_new_patch_init_data.           *
+ *            SCRATCH index is needed only for temporary work space to   *
+ *            fill new patch levels.                                     *
+ *                                                                       *
+ * FLUX:                                                                 *
+ *            One factory is needed: SCRATCH.                            *
+ *                                                                       *
+ *            SCRATCH index is added to d_flux_var_data.                 *
+ *                                                                       *
+ *            Additionally, a variable for flux integral data is created *
+ *            for each FLUX variable. It has a single factory, SCRATCH,  *
+ *            which is added to d_fluxsum_data.                          *
+ *                                                                       *
+ * TEMPORARY:                                                            *
+ *            One factory needed: SCRATCH.                               *
+ *            SCRATCH index is added to d_temp_var_scratch_data.         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkHyperbolicLevelIntegrator::registerVariable(
+   const tbox::Pointer<hier::Variable> var,
+   const hier::IntVector ghosts,
+   const HYP_VAR_TYPE h_v_type,
+   const tbox::Pointer<xfer::CoarsenOperator> coarsen_op,
+   const tbox::Pointer<xfer::RefineOperator> refine_op,
+   const tbox::Pointer<xfer::TimeInterpolateOperator> time_int)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!var.isNull());
+#endif
+
+   hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+
+   const hier::IntVector zero_ghosts(d_dim, 0);
+
+   d_all_variables.appendItem(var);
+
+   switch (h_v_type) {
+
+      case TIME_DEP: {
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         //TBOX_ASSERT(!refine_op.isNull());
+         //TBOX_ASSERT(!coarsen_op.isNull());
+         //TBOX_ASSERT(!time_int.isNull());
+#endif
+
+         d_time_dep_variables.appendItem(var);
+
+         int cur_id = variable_db->registerVariableAndContext(var,
+               d_current,
+               zero_ghosts);
+         int new_id = variable_db->registerVariableAndContext(var,
+               d_new,
+               zero_ghosts);
+         int scr_id = variable_db->registerVariableAndContext(var,
+               d_scratch,
+               ghosts);
+
+         d_saved_var_scratch_data.setFlag(scr_id);
+
+         d_new_patch_init_data.setFlag(cur_id);
+
+         d_new_time_dep_data.setFlag(new_id);
+
+         /*
+          * Register variable and context needed for restart.
+          */
+         hier::VariableDatabase::getDatabase()->
+         registerPatchDataForRestart(cur_id);
+
+         /*
+          * Set boundary fill schedules for time-dependent variable.
+          * If time interpolation operator is non-NULL, regular advance
+          * bdry fill algorithm will time interpolate between current and
+          * new data on coarser levels, and fill from current data on
+          * same level.  New advance bdry fill algorithm will time interpolate
+          * between current and new data on coarser levels, and fill from new
+          * data on same level.  If time interpolation operator is NULL,
+          * regular and new bdry fill algorithms will use current and new
+          * data, respectively.
+          */
+
+         d_mblk_bdry_fill_advance->registerRefine(
+            scr_id, cur_id, cur_id, new_id, scr_id, refine_op, time_int);
+         d_mblk_bdry_fill_advance_new->registerRefine(
+            scr_id, new_id, cur_id, new_id, scr_id, refine_op, time_int);
+         d_mblk_fill_new_level->registerRefine(
+            cur_id, cur_id, cur_id, new_id, scr_id, refine_op, time_int);
+
+         /*
+          * For data synchronization between levels, the coarsen algorithm
+          * will coarsen new data on finer level to new data on coarser.
+          * Recall that coarser level data pointers will not be reset until
+          * after synchronization so we always coarsen to new
+          * (see synchronizeLevelWithCoarser routine).
+          */
+
+         d_mblk_coarsen_sync_data->registerCoarsen(new_id, new_id, coarsen_op);
+
+         d_mblk_sync_initial_data->registerCoarsen(cur_id, cur_id, coarsen_op);
+
+         /*
+          * Coarsen operations used in Richardson extrapolation.  The init
+          * initializes data on coarser level, before the coarse level
+          * advance.  If two time levels are used, coarsening occurs between
+          * the CURRENT context on both levels.  If three levels are used,
+          * coarsening occurs between the OLD context on the fine level and
+          * the CURRENT context on the coarse level.  The final coarsen
+          * algorithm coarsens data after it has been advanced on the fine
+          * level to the NEW context on the coarser level.
+          */
+
+         if (d_number_time_data_levels == 3) {
+
+            int old_id = variable_db->registerVariableAndContext(var,
+                  d_old,
+                  zero_ghosts);
+            d_old_time_dep_data.setFlag(old_id);
+
+            d_mblk_bdry_fill_advance_old->registerRefine(
+               scr_id, cur_id, old_id, new_id, scr_id, refine_op, time_int);
+
+            d_coarsen_rich_extrap_init->
+            registerCoarsen(cur_id, old_id, coarsen_op);
+
+         } else {
+
+            d_coarsen_rich_extrap_init->
+            registerCoarsen(cur_id, cur_id, coarsen_op);
+         }
+
+         d_coarsen_rich_extrap_final->
+         registerCoarsen(new_id, new_id, coarsen_op);
+
+         break;
+      }
+
+      case INPUT: {
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         //         TBOX_ASSERT(!refine_op.isNull());
+         //         TBOX_ASSERT(!coarsen_op.isNull());
+#endif
+
+         int cur_id = variable_db->registerVariableAndContext(var,
+               d_current,
+               zero_ghosts);
+         int scr_id = variable_db->registerVariableAndContext(var,
+               d_scratch,
+               ghosts);
+
+         d_saved_var_scratch_data.setFlag(scr_id);
+
+         d_new_patch_init_data.setFlag(cur_id);
+
+         /*
+          * Register variable and context needed for restart.
+          */
+         hier::VariableDatabase::getDatabase()->
+         registerPatchDataForRestart(cur_id);
+
+         /*
+          * Bdry algorithms for input variables will fill from current only.
+          */
+
+         d_mblk_bdry_fill_advance->registerRefine(
+            scr_id, cur_id, scr_id, refine_op);
+         d_mblk_bdry_fill_advance_new->registerRefine(
+            scr_id, cur_id, scr_id, refine_op);
+         d_mblk_fill_new_level->registerRefine(
+            cur_id, cur_id, scr_id, refine_op);
+
+         /*
+          * At initialization, it may be necessary to coarsen INPUT data
+          * up through the hierarchy so that all levels are consistent.
+          */
+
+         d_mblk_sync_initial_data->registerCoarsen(cur_id, cur_id, coarsen_op);
+
+         /*
+          * Coarsen operation for setting initial data on coarser level
+          * in the Richardson extrapolation algorithm.
+          */
+
+         d_coarsen_rich_extrap_init->
+         registerCoarsen(cur_id, cur_id, coarsen_op);
+
+         break;
+      }
+
+      case NO_FILL: {
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!refine_op.isNull());
+         TBOX_ASSERT(!coarsen_op.isNull());
+#endif
+         int cur_id = variable_db->registerVariableAndContext(var,
+               d_current,
+               ghosts);
+
+         int scr_id = variable_db->registerVariableAndContext(var,
+               d_scratch,
+               ghosts);
+
+         d_new_patch_init_data.setFlag(cur_id);
+
+         /*
+          * Register variable and context needed for restart.
+          */
+         hier::VariableDatabase::getDatabase()->
+         registerPatchDataForRestart(cur_id);
+
+         d_mblk_fill_new_level->registerRefine(
+            cur_id, cur_id, scr_id, refine_op);
+
+         /*
+          * Coarsen operation for setting initial data on coarser level
+          * in the Richardson extrapolation algorithm.
+          */
+
+         d_coarsen_rich_extrap_init->
+         registerCoarsen(cur_id, cur_id, coarsen_op);
+
+         break;
+      }
+
+      case FLUX: {
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+//         TBOX_ASSERT(!coarsen_op.isNull());
+#endif
+         /*
+          * Note that we force all flux variables to hold double precision
+          * data and be face- or side-centered.  Also, for each flux variable,
+          * a corresponding "fluxsum" variable is created to manage
+          * synchronization of data betweeen patch levels in the hierarchy.
+          */
+         const tbox::Pointer<pdat::FaceVariable<double> > face_var(var);
+         const tbox::Pointer<pdat::SideVariable<double> > side_var(var);
+
+         if (!(face_var.isNull())) {
+            if (d_flux_side_registered) {
+               TBOX_ERROR(
+                  d_object_name << ":  "
+                  <<
+                  "Attempt to register FaceVariable when "
+                  << "SideVariable already registered."
+                  << std::endl);
+            }
+
+            d_flux_is_face = true;
+
+         } else if (!(side_var.isNull())) {
+            if (d_flux_face_registered) {
+               TBOX_ERROR(
+                  d_object_name << ":  "
+                  <<
+                  "Attempt to register SideVariable when "
+                  << "FaceVariable already registered."
+                  << std::endl);
+            }
+
+            d_flux_is_face = false;
+
+         } else {
+            TBOX_ERROR(
+               d_object_name << ":  "
+               <<
+               "Flux is neither face- or side-centered." << std::endl);
+         }
+
+         d_flux_variables.appendItem(var);
+
+         int scr_id = variable_db->registerVariableAndContext(var,
+               d_scratch,
+               ghosts);
+
+         d_flux_var_data.setFlag(scr_id);
+
+         string var_name = var->getName();
+         string fs_suffix = "_fluxsum";
+         string fsum_name = var_name;
+         fsum_name += fs_suffix;
+
+         tbox::Pointer<hier::Variable> fluxsum;
+
+         if (d_flux_is_face) {
+            fluxsum = new pdat::OuterfaceVariable<double>(
+                  d_dim,
+                  fsum_name,
+                  ((tbox::Pointer<pdat::FaceDataFactory<double> >)
+                   var->getPatchDataFactory())->getDepth());
+            d_flux_face_registered = true;
+         } else {
+            fluxsum = new pdat::OutersideVariable<double>(
+                  d_dim,
+                  fsum_name,
+                  ((tbox::Pointer<pdat::SideDataFactory<double> >)
+                   var->getPatchDataFactory())->getDepth());
+            d_flux_side_registered = true;
+         }
+
+         d_fluxsum_variables.appendItem(fluxsum);
+
+         int fs_id = variable_db->registerVariableAndContext(fluxsum,
+               d_scratch,
+               zero_ghosts);
+
+         d_fluxsum_data.setFlag(fs_id);
+
+         d_mblk_coarsen_fluxsum->registerCoarsen(scr_id, fs_id, coarsen_op);
+
+         break;
+      }
+
+      case TEMPORARY: {
+
+         int scr_id = variable_db->registerVariableAndContext(var,
+               d_scratch,
+               ghosts);
+
+         d_temp_var_scratch_data.setFlag(scr_id);
+
+         break;
+      }
+
+      default: {
+
+         TBOX_ERROR(
+            d_object_name << ":  "
+            << "unknown HYP_VAR_TYPE = " << h_v_type
+            << std::endl);
+
+      }
+
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Process FLUX and FLUX INTEGRAL data before integration on the level.  *
+ *                                                                       *
+ * We allocate FLUX storage if appropriate.                              *
+ *                                                                       *
+ * If the advance is not temporary, we also zero out the FLUX INTEGRALS  *
+ * on the first step of any level finer than level zero.                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkHyperbolicLevelIntegrator::preprocessFluxData(
+   const tbox::Pointer<hier::MultiblockPatchLevel> mblk_level,
+   const double cur_time,
+   const double new_time,
+   const bool regrid_advance,
+   const bool first_step,
+   const bool last_step)
+{
+   NULL_USE(cur_time);
+   NULL_USE(last_step);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!mblk_level.isNull());
+#endif
+
+   hier::VariableDatabase* variable_db =
+      hier::VariableDatabase::getDatabase();
+
+   const int level_number = mblk_level->getLevelNumber();
+
+   if (!regrid_advance) {
+      if (((level_number > 0) && first_step) ||
+          ((level_number == 0) && !d_have_flux_on_level_zero)) {
+         mblk_level->allocatePatchData(d_flux_var_data, new_time);
+         if (level_number == 0) {
+            d_have_flux_on_level_zero = true;
+         }
+      }
+   } else {
+      if (first_step) {
+         mblk_level->allocatePatchData(d_flux_var_data, new_time);
+      }
+   }
+
+   if (!regrid_advance && (level_number > 0)) {
+
+      if (first_step) {
+
+         mblk_level->allocatePatchData(d_fluxsum_data, new_time);
+
+         for (hier::MultiblockPatchLevelIterator mi(mblk_level); mi; mi++) {
+
+            tbox::List<tbox::Pointer<hier::Variable> >::Iterator
+            fs_var = d_fluxsum_variables.listStart();
+
+            while (fs_var) {
+               int fsum_id =
+                  variable_db->mapVariableAndContextToIndex(fs_var(),
+                     d_scratch);
+
+               if (d_flux_is_face) {
+                  tbox::Pointer<pdat::OuterfaceData<double> > fsum_data =
+                     (*mi)->getPatchData(fsum_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+                  TBOX_ASSERT(!(fsum_data.isNull()));
+#endif
+                  fsum_data->fillAll(0.0);
+               } else {
+                  tbox::Pointer<pdat::OutersideData<double> > fsum_data =
+                     (*mi)->getPatchData(fsum_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+                  TBOX_ASSERT(!(fsum_data.isNull()));
+#endif
+                  fsum_data->fillAll(0.0);
+               }
+
+               fs_var++;
+            }
+
+         } // loop over patches
+
+      } else {
+         mblk_level->setTime(new_time, d_fluxsum_data);
+      }
+
+   } // if ( !regrid_advance && (level_number > 0) )
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Process FLUX and FLUX INTEGRAL data after advancing the solution on   *
+ * the level.  During normal integration steps, the flux integrals are   *
+ * updated for subsequent synchronization by adding FLUX values to       *
+ * flux integrals.                                                       *
+ *                                                                       *
+ * If the advance is not temporary (regular integration step):           *
+ * 1) If the level is the finest in the hierarchy, FLUX data is          *
+ *    deallocated.  It is not used during synchronization, and is only   *
+ *    maintained if needed for the advance.                              *
+ *                                                                       *
+ * 2) If the level is not the coarsest in the hierarchy, update the      *
+ *    flux integrals for later synchronization by adding FLUX values to  *
+ *    flux integrals.                                                    *
+ *                                                                       *
+ * If the advance is temporary, deallocate the flux data if first step.  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkHyperbolicLevelIntegrator::postprocessFluxData(
+   const tbox::Pointer<hier::MultiblockPatchLevel> mblk_level,
+   const bool regrid_advance,
+   const bool first_step,
+   const bool last_step)
+{
+   NULL_USE(last_step);
+
+   TBOX_ASSERT(!mblk_level.isNull());
+
+   if (regrid_advance && first_step) {
+      mblk_level->deallocatePatchData(d_flux_var_data);
+   }
+
+   if (!regrid_advance && (mblk_level->getLevelNumber() > 0)) {
+
+      for (hier::MultiblockPatchLevelIterator mi(mblk_level); mi; mi++) {
+
+         tbox::List<tbox::Pointer<hier::Variable> >::Iterator
+         flux_var = d_flux_variables.listStart();
+         tbox::List<tbox::Pointer<hier::Variable> >::Iterator
+         fluxsum_var = d_fluxsum_variables.listStart();
+
+         const hier::Index& ilo = (*mi)->getBox().lower();
+         const hier::Index& ihi = (*mi)->getBox().upper();
+
+         while (flux_var) {
+
+            tbox::Pointer<hier::PatchData> flux_data =
+               (*mi)->getPatchData(flux_var(), d_scratch);
+            tbox::Pointer<hier::PatchData> fsum_data =
+               (*mi)->getPatchData(fluxsum_var(), d_scratch);
+
+            tbox::Pointer<pdat::FaceData<double> > fflux_data;
+            tbox::Pointer<pdat::OuterfaceData<double> > ffsum_data;
+
+            tbox::Pointer<pdat::SideData<double> > sflux_data;
+            tbox::Pointer<pdat::OutersideData<double> > sfsum_data;
+
+            int ddepth;
+            hier::IntVector flux_ghosts(d_dim);
+
+            if (d_flux_is_face) {
+               fflux_data = flux_data;
+               ffsum_data = fsum_data;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+               TBOX_ASSERT(!(fflux_data.isNull()) && !(ffsum_data.isNull()));
+               TBOX_ASSERT(fflux_data->getDepth() == ffsum_data->getDepth());
+#endif
+               ddepth = fflux_data->getDepth();
+               flux_ghosts = fflux_data->getGhostCellWidth();
+            } else {
+               sflux_data = flux_data;
+               sfsum_data = fsum_data;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+               TBOX_ASSERT(!(sflux_data.isNull()) && !(sfsum_data.isNull()));
+               TBOX_ASSERT(sflux_data->getDepth() == sfsum_data->getDepth());
+#endif
+               ddepth = sflux_data->getDepth();
+               flux_ghosts = sflux_data->getGhostCellWidth();
+            }
+
+            for (int d = 0; d < ddepth; d++) {
+               // loop over lower and upper parts of outer face/side arrays
+               for (int ifs = 0; ifs < 2; ifs++) {
+                  if (d_flux_is_face) {
+                     if (d_dim == tbox::Dimension(2)) {
+                        F77_FUNC(upfluxsumface2d0,
+                           UPFLUXSUMFACE2D0) (ilo(0), ilo(1), ihi(0),
+                           ihi(1),
+                           flux_ghosts(0),
+                           flux_ghosts(1),
+                           ifs,
+                           fflux_data->getPointer(0, d),
+                           ffsum_data->getPointer(0, ifs, d));
+                        F77_FUNC(upfluxsumface2d1,
+                           UPFLUXSUMFACE2D1) (ilo(0), ilo(1), ihi(0),
+                           ihi(1),
+                           flux_ghosts(0),
+                           flux_ghosts(1),
+                           ifs,
+                           fflux_data->getPointer(1, d),
+                           ffsum_data->getPointer(1, ifs, d));
+                     }
+                     if (d_dim == tbox::Dimension(3)) {
+                        F77_FUNC(upfluxsumface3d0,
+                           UPFLUXSUMFACE3D0) (ilo(0), ilo(1), ilo(2),
+                           ihi(0), ihi(1), ihi(2),
+                           flux_ghosts(0),
+                           flux_ghosts(1),
+                           flux_ghosts(2),
+                           ifs,
+                           fflux_data->getPointer(0, d),
+                           ffsum_data->getPointer(0, ifs, d));
+                        F77_FUNC(upfluxsumface3d1,
+                           UPFLUXSUMFACE3D1) (ilo(0), ilo(1), ilo(2),
+                           ihi(0), ihi(1), ihi(2),
+                           flux_ghosts(0),
+                           flux_ghosts(1),
+                           flux_ghosts(2),
+                           ifs,
+                           fflux_data->getPointer(1, d),
+                           ffsum_data->getPointer(1, ifs, d));
+                        F77_FUNC(upfluxsumface3d2,
+                           UPFLUXSUMFACE3D2) (ilo(0), ilo(1), ilo(2),
+                           ihi(0), ihi(1), ihi(2),
+                           flux_ghosts(0),
+                           flux_ghosts(1),
+                           flux_ghosts(2),
+                           ifs,
+                           fflux_data->getPointer(2, d),
+                           ffsum_data->getPointer(2, ifs, d));
+                     }
+                  } else {
+                     if (d_dim == tbox::Dimension(2)) {
+                        F77_FUNC(upfluxsumside2d0,
+                           UPFLUXSUMSIDE2D0) (ilo(0), ilo(1), ihi(0),
+                           ihi(1),
+                           flux_ghosts(0),
+                           flux_ghosts(1),
+                           ifs,
+                           sflux_data->getPointer(0, d),
+                           sfsum_data->getPointer(0, ifs, d));
+                        F77_FUNC(upfluxsumside2d1,
+                           UPFLUXSUMSIDE2D1) (ilo(0), ilo(1), ihi(0),
+                           ihi(1),
+                           flux_ghosts(0),
+                           flux_ghosts(1),
+                           ifs,
+                           sflux_data->getPointer(1, d),
+                           sfsum_data->getPointer(1, ifs, d));
+                     }
+                     if (d_dim == tbox::Dimension(3)) {
+                        F77_FUNC(upfluxsumside3d0,
+                           UPFLUXSUMSIDE3D0) (ilo(0), ilo(1), ilo(2),
+                           ihi(0), ihi(1), ihi(2),
+                           flux_ghosts(0),
+                           flux_ghosts(1),
+                           flux_ghosts(2),
+                           ifs,
+                           sflux_data->getPointer(0, d),
+                           sfsum_data->getPointer(0, ifs, d));
+                        F77_FUNC(upfluxsumside3d1,
+                           UPFLUXSUMSIDE3D1) (ilo(0), ilo(1), ilo(2),
+                           ihi(0), ihi(1), ihi(2),
+                           flux_ghosts(0),
+                           flux_ghosts(1),
+                           flux_ghosts(2),
+                           ifs,
+                           sflux_data->getPointer(1, d),
+                           sfsum_data->getPointer(1, ifs, d));
+                        F77_FUNC(upfluxsumside3d2,
+                           UPFLUXSUMSIDE3D2) (ilo(0), ilo(1), ilo(2),
+                           ihi(0), ihi(1), ihi(2),
+                           flux_ghosts(0),
+                           flux_ghosts(1),
+                           flux_ghosts(2),
+                           ifs,
+                           sflux_data->getPointer(2, d),
+                           sfsum_data->getPointer(2, ifs, d));
+                     }
+                  }  // if face operations vs. side operations
+               }  // loop over lower and upper sides/faces
+            }  // loop over depth
+
+            flux_var++;
+            fluxsum_var++;
+
+         }  // loop over flux variables
+
+      } // loop over patches
+
+   }  // if !regrid_advance and level number > 0 ....
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Copy time-dependent data from source to destination on level.         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkHyperbolicLevelIntegrator::copyTimeDependentData(
+   const tbox::Pointer<hier::PatchLevel> level,
+   const tbox::Pointer<hier::VariableContext> src_context,
+   const tbox::Pointer<hier::VariableContext> dst_context)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!level.isNull());
+   TBOX_ASSERT(!src_context.isNull());
+   TBOX_ASSERT(!src_context.isNull());
+#endif
+
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      tbox::List<tbox::Pointer<hier::Variable> >::Iterator
+      time_dep_var = d_time_dep_variables.listStart();
+      while (time_dep_var) {
+         tbox::Pointer<hier::PatchData> src_data =
+            patch->getPatchData(time_dep_var(), src_context);
+         tbox::Pointer<hier::PatchData> dst_data =
+            patch->getPatchData(time_dep_var(), dst_context);
+
+         dst_data->copy(*src_data);
+         time_dep_var++;
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print all class data for MblkHyperbolicLevelIntegrator object.      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkHyperbolicLevelIntegrator::printClassData(
+   ostream& os) const
+{
+   os << "\nMblkHyperbolicLevelIntegrator::printClassData..." << std::endl;
+   os << "MblkHyperbolicLevelIntegrator: this = "
+      << (MblkHyperbolicLevelIntegrator *)this << std::endl;
+   os << "d_object_name = " << d_object_name << std::endl;
+   os << "d_cfl = " << d_cfl << "\n"
+      << "d_cfl_init = " << d_cfl_init << std::endl;
+   os << "d_lag_dt_computation = " << d_lag_dt_computation << "\n"
+      << "d_use_ghosts_for_dt = "
+      << d_use_ghosts_for_dt << std::endl;
+   os << "d_patch_strategy = "
+      << (MblkHyperbolicPatchStrategy *)d_patch_strategy << std::endl;
+   os
+   <<
+   "NOTE: Not printing variable arrays, ComponentSelectors, communication schedules, etc."
+   << std::endl;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Writes out the class version number, d_cfl, d_cfl_init,              *
+ * d_lag_dt_computation, and d_use_ghosts_for_dt to the database.	*
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkHyperbolicLevelIntegrator::putToDatabase(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   db->putInteger("ALGS_HYPERBOLIC_LEVEL_INTEGRATOR_VERSION",
+      ALGS_HYPERBOLIC_LEVEL_INTEGRATOR_VERSION);
+
+   db->putDouble("d_cfl", d_cfl);
+   db->putDouble("d_cfl_init", d_cfl_init);
+   db->putBool("d_lag_dt_computation", d_lag_dt_computation);
+   db->putBool("d_use_ghosts_for_dt", d_use_ghosts_for_dt);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Reads in cfl, cfl_init, lag_dt_computation, and                      *
+ * use_ghosts_to_compute_dt from the input database.                    *
+ * Note all restart values are overriden with values from the input	*
+ * database.								*
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkHyperbolicLevelIntegrator::getFromInput(
+   tbox::Pointer<tbox::Database> db,
+   bool is_from_restart)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   if (db->keyExists("cfl")) {
+      d_cfl = db->getDouble("cfl");
+   } else {
+      if (!is_from_restart) {
+         d_cfl = db->getDoubleWithDefault("cfl", d_cfl);
+      }
+   }
+
+   if (db->keyExists("cfl_init")) {
+      d_cfl_init = db->getDouble("cfl_init");
+   } else {
+      if (!is_from_restart) {
+         d_cfl_init = db->getDoubleWithDefault("cfl_init", d_cfl_init);
+      }
+   }
+
+   if (db->keyExists("lag_dt_computation")) {
+      d_lag_dt_computation = db->getBool("lag_dt_computation");
+   } else {
+      if (!is_from_restart) {
+         d_lag_dt_computation =
+            db->getDoubleWithDefault("lag_dt_computation",
+               d_lag_dt_computation);
+      }
+   }
+
+   if (db->keyExists("use_ghosts_to_compute_dt")) {
+      d_use_ghosts_for_dt = db->getBool("use_ghosts_to_compute_dt");
+   } else {
+      if (!is_from_restart) {
+         d_use_ghosts_for_dt =
+            db->getDoubleWithDefault("use_ghosts_for_dt",
+               d_use_ghosts_for_dt);
+         TBOX_WARNING(
+            d_object_name << ":  "
+            <<
+            "Key data `use_ghosts_to_compute_dt' not found in input."
+            << "  Using default value "
+            << d_use_ghosts_for_dt << std::endl);
+      }
+   }
+
+   if (db->keyExists("distinguish_mpi_reduction_costs")) {
+      d_distinguish_mpi_reduction_costs =
+         db->getBool("distinguish_mpi_reduction_costs");
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * First, gets the database corresponding to the object_name from the    *
+ * restart file.   If this database exists, this method checks to make   *
+ * sure that the version number of the class matches the version number  *
+ * of the restart file.  If they match, then d_cfl, d_cfl_init,          *
+ * d_lag_dt_computation, and d_use_ghosts_to_compute_dt are read from    *
+ * restart database.                                                    *
+ * Note all restart values can be overriden with values from the input	*
+ * database.								*
+ *                                                                       *
+ *************************************************************************
+ */
+void MblkHyperbolicLevelIntegrator::getFromRestart()
+{
+
+   tbox::Pointer<tbox::Database> root_db =
+      tbox::RestartManager::getManager()->getRootDatabase();
+
+   tbox::Pointer<tbox::Database> db;
+   if (root_db->isDatabase(d_object_name)) {
+      db = root_db->getDatabase(d_object_name);
+   } else {
+      TBOX_ERROR("Restart database corresponding to "
+         << d_object_name << " not found in restart file" << std::endl);
+   }
+
+   int ver = db->getInteger("ALGS_HYPERBOLIC_LEVEL_INTEGRATOR_VERSION");
+   if (ver != ALGS_HYPERBOLIC_LEVEL_INTEGRATOR_VERSION) {
+      TBOX_ERROR(d_object_name << ":  "
+                               << "Restart file version different "
+                               << "than class version." << std::endl);
+   }
+
+   d_cfl = db->getDouble("d_cfl");
+   d_cfl_init = db->getDouble("d_cfl_init");
+   d_lag_dt_computation = db->getBool("d_lag_dt_computation");
+   d_use_ghosts_for_dt = db->getBool("d_use_ghosts_for_dt");
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Utility routines to retrieve variable contexts used by integrator.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::VariableContext>
+MblkHyperbolicLevelIntegrator::getCurrentContext() const
+{
+   return d_current;
+}
+
+tbox::Pointer<hier::VariableContext>
+MblkHyperbolicLevelIntegrator::getNewContext() const
+{
+   return d_new;
+}
+
+tbox::Pointer<hier::VariableContext>
+MblkHyperbolicLevelIntegrator::getOldContext() const
+{
+   return d_old;
+}
+
+tbox::Pointer<hier::VariableContext>
+MblkHyperbolicLevelIntegrator::getScratchContext() const
+{
+   return d_scratch;
+}
+
+tbox::Pointer<hier::VariableContext>
+MblkHyperbolicLevelIntegrator::getPlotContext() const
+{
+   return d_plot_context;
+}
+
+bool
+MblkHyperbolicLevelIntegrator::usingRefinedTimestepping() const
+{
+   return d_use_time_refinement;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkEuler/MblkHyperbolicLevelIntegrator.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkEuler/MblkHyperbolicLevelIntegrator.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1058 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Integration routines for single level in AMR hierarchy
+ *                (basic hyperbolic systems) 
+ *
+ ************************************************************************/
+
+#ifndef included_MblkHyperbolicLevelIntegratorXD
+#define included_MblkHyperbolicLevelIntegratorXD
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "MblkHyperbolicPatchStrategy.h"
+#include "SAMRAI/algs/TimeRefinementLevelStrategy.h"
+#include "SAMRAI/hier/ComponentSelector.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/mesh/BaseGriddingAlgorithm.h"
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+#include "SAMRAI/hier/MultiblockPatchHierarchy.h"
+#include "SAMRAI/mesh/StandardTagAndInitStrategy.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/List.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Serializable.h"
+#include "SAMRAI/xfer/CoarsenAlgorithm.h"
+#include "SAMRAI/xfer/MultiblockCoarsenAlgorithm.h"
+#include "SAMRAI/xfer/RefineAlgorithm.h"
+#include "SAMRAI/xfer/MultiblockRefineAlgorithm.h"
+#include "SAMRAI/xfer/MultiblockRefineSchedule.h"
+#include "SAMRAI/tbox/Timer.h"
+
+#include <string>
+#include <iostream>
+
+using namespace std;
+
+/**
+ * Class MblkHyperbolicLevelIntegrator provides routines needed to
+ * integrate a system of hyperbolic conservation laws on a structured
+ * AMR patch hierarchy using local time refinement.  The routines include
+ * initializing a level, advance a level, and synchronize levels in a
+ * time-dependent AMR application.  The AMR timestepping algorithm that
+ * cycles through the patch levels and calls these routines is provided by
+ * the TimeRefinementIntegrator class.  Together, that hierarchy
+ * integration class and this single level integration class produce the
+ * common AMR algorithm due to Berger, Colella and Oliger
+ * (see e.g., Berger and Colella, J. Comp. Phys. (82)1:64-84, 1989).
+ * The operations performed on single patches on each level are implemented
+ * in the user-defined, problem-specific class derived from the abstract
+ * base class HyperbolicPatchStrategy.
+ *
+ * It is important to note that the variable contexts used by the concrete
+ * patch strategy subclass must be consistent with those defined in this
+ * class which manages the data for the variables.
+ *
+ * This class is derived from the abstract base class
+ * TimeRefinementLevelStrategy, which defines routines needed by
+ * the time refinement integrator.  There is an argument in the constructor
+ * that determines whether this class will be used by the time
+ * refinement integrator for refined timestepping or synchronized
+ * timestepping.  The routines overloaded in
+ * TimeRefinementLevelStrategy are: initializeLevelIntegrator(),
+ * getLevelDt(), getMaxFinerLevelDt(), advanceLevel(),
+ * standardLevelSynchronization(), synchronizeNewLevels(),
+ * resetTimeDependentData(), and resetDataToPreadvanceState().
+ * This class is also derived from mesh::StandardTagAndInitStrategy,
+ * which defines routines needed by the gridding algorithm classes.  The
+ * routines overloaded in mesh::StandardTagAndInitStrategy are:
+ * initializeLevelData(), resetHierarchyConfiguration(),
+ * applyGradientDetector(), applyRichardsonExtrapolation(), and
+ * coarsenDataForRichardsonExtrapolation().
+ *
+ * An object of this class requires numerous parameters to be read from
+ * input.  Also, data must be written to and read from files for restart.
+ * The input and restart data are summarized as follows.
+ *
+ * Required input keys and data types: NONE
+ *
+ * Optional input keys, data types, and defaults:
+ *
+ *
+ *
+ *
+ *    - \b    cfl
+ *       double value for the CFL factor used for timestep selection
+ *       (dt used = CFL * max dt).  If no input value is given, a default
+ *       value of 0.9 is used.
+ *
+ *    - \b    cfl_init
+ *       double value for CFL factor used for initial timestep.
+ *       If no input value is given, a default value of 0.9 is used.
+ *
+ *    - \b    lag_dt_computation
+ *       boolean value indicating whether dt is based on current
+ *       solution or solution from previous step (possible optimization
+ *       in communication for characteristic analysis).  If no input
+ *       value is given, a default value of TRUE is used.
+ *
+ *
+ *    - \b    use_ghosts_to_compute_dt
+ *       boolean value indicating whether ghost data must be filled before
+ *       timestep is computed on each patch (possible communication
+ *       optimization).  if no input value is given, a default value
+ *       of TRUE is used.
+ *
+ *    - \b    distinguish_mpi_reduction_costs
+ *       boolean specifying whether to separate reduction costs in tbox::MPI
+ *       from costs of load imbalances.  By specifying it true, a
+ *       barrier is put in place before the reduction call, so an extra
+ *       operation is incurred.  For this reason, it is defaulted FALSE.
+ *
+ *
+ *
+ *
+ *
+ * Note that when continuing from restart, the input values in the
+ * input file override all values read in from the restart database.
+ *
+ * A sample input file entry might look like:
+ *
+ * \verbatim
+ *
+ *    cfl = 0.9
+ *    cfl_init = 0.9
+ *    lag_dt_computation = FALSE
+ *    use_ghosts_to_compute_dt = TRUE
+ *    distinguish_mpi_reduction_costs = TRUE
+ *
+ * \endverbatim
+ *
+ * @see algs::TimeRefinementIntegrator
+ * @see mesh::StandardTagAndInitStrategy
+ * @see algs::HyperbolicPatchStrategy
+ */
+
+using namespace SAMRAI;
+using namespace algs;
+
+class MblkHyperbolicLevelIntegrator:
+   public TimeRefinementLevelStrategy,
+   public mesh::StandardTagAndInitStrategy,
+   public tbox::Serializable
+{
+public:
+   /**
+    * Enumerated type for the different ways in which variable storage
+    * can be manipulated by the level integration algorithm.
+    * See registerVariable(...) function for more details.
+    *
+    *
+    *
+    * - \b TIME_DEP      {Data that changes in time and needs more than one
+    *                      time level to be stored.}
+    * - \b INPUT          {Data that is set once and do not change during
+    *                      the ghosts are never re-filled outside of
+    *                      user-defined routines.}
+    * - \b FLUX           {Face-centered double values used in conservative
+    *                      difference and synchronization (i.e., refluxing)
+    *                      process.  A corresponding variable to store flux
+    *                      integral information is created for each FLUX
+    *                      variable.}
+    * - \b TEMPORARY      {Accessory values intended to live only for
+    *                      computation on a single patch (i.e., they cannot
+    *                      be assumed to exist between patch routine function
+    *                      calls.)}
+    *
+    *
+    *
+    */
+   enum HYP_VAR_TYPE { TIME_DEP = 0,
+                       INPUT = 1,
+                       NO_FILL = 2,
+                       FLUX = 3,
+                       TEMPORARY = 4 };
+
+   /**
+    * Constructor for MblkHyperbolicLevelIntegrator initializes
+    * integration parameters to default values and constructs standard
+    * communication algorithms.  Other data members are read in from
+    * the specified input database or the restart database corresponding
+    * to the specified object_name.  The constructor also registers
+    * this object for restart using the specified object name when
+    * the boolean argument is true.  Whether object will write its state to
+    * restart files during program execution is determined by this argument.
+    * Note that it has a default state of true.  This class is used by
+    * the time refinement integrator for refined timestepping when the
+    * use_time_refinement argument is true, and for synchronized
+    * timestepping when the boolean is false.
+    *
+    * When assertion checking is active, passing in any null pointer
+    * or an empty string will result in an unrecoverable assertion.
+    */
+   MblkHyperbolicLevelIntegrator(
+      const string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> input_db,
+      MblkHyperbolicPatchStrategy* patch_strategy,
+      tbox::Pointer<hier::MultiblockPatchHierarchy>& mblk_hierarchy,
+      bool register_for_restart = true,
+      bool use_time_refinement = true);
+
+   /**
+    * The destructor for MblkHyperbolicLevelIntegrator unregisters
+    * the integrator object with the restart manager when so registered.
+    */
+   virtual ~MblkHyperbolicLevelIntegrator();
+
+   /**
+    * Initialize level integrator by by setting the number of time levels
+    * of data needed based on specifications of the gridding algorithm.
+    *
+    * This routine also invokes variable registration in the patch strategy.
+    *
+    * Assertion checking will throw unrecoverable assertions if either
+    * pointer is null.
+    */
+   virtual void
+   initializeLevelIntegrator(
+      tbox::Pointer<mesh::BaseGriddingAlgorithm> gridding_alg);
+
+   /**
+    * Determine time increment to advance data on level and return that
+    * value.  The double dt_time argument is the simulation time when
+    * the routine is called.  The initial_time boolean is true if this
+    * routine is called during hierarchy initialization (i.e., at the
+    * initial simulation time).  Otherwise, it is false.  The
+    * recompute_dt option specifies whether to compute the timestep using
+    * the current level data or to return the value stored by the time
+    * integrator. The default true setting means the timestep will be
+    * computed if no value is supplied.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the level pointer is null.
+    */
+   virtual double
+   getLevelDt(
+      const tbox::Pointer<hier::BasePatchLevel> level,
+      const double dt_time,
+      const bool initial_time);
+
+   /**
+    * Return the maximum allowable time increment for the level with
+    * the specified level number based on the time increment for the
+    * next coarser level and the mesh refinement ratio between the two
+    * levels.  For the common explicit integration methods for hyperbolic
+    * conservation laws (constrained by a CFL limit), the fine time increment
+    * is typically the coarse increment divided by the refinement ratio.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the ratio vector is not acceptable (i.e., all values > 0).
+    */
+   virtual double
+   getMaxFinerLevelDt(
+      const int finer_level_number,
+      const double coarse_dt,
+      const hier::IntVector& ratio_to_coarser);
+
+   /**
+    * Integrate data on all patches on the given patch level from current
+    * time (current_time) to new time (new_time).  This routine is used
+    * to advance the solution on each level in the hierarchy and during
+    * time-dependent regridding procedures, such as Richardson extrapolation.
+    * The boolean arguments are used to determine the state of the algorithm
+    * and the data when the advance routine is called.   The first_step
+    * and last_step indicate whether the step is the first or last in the
+    * current timestep sequence on the level.  Typically, the current timestep
+    * sequence means each step on the level between advance steps on a
+    * coarser level in the hierarchy, if one exists.  The regrid_advance
+    * value is true when the advance is called as part of a time-dependent
+    * regridding procedure.  Usually when this happens, the results of the
+    * colution advance will be discarded.  So, for example, when this is true
+    * flux information is not maintained and flux integrals are not updated.
+    * The final boolean argument indicates whether or not the level resides
+    * in the hierarchy.  For example, during time-dependent regridding, such
+    * as Richardson extrapolation, a temporary level that is not in the
+    * hierarchy is created and advanced.  Then, a communication schedule
+    * must be generated for the level before the advance begins.
+    *
+    * This routine is called at two different points during time integration:
+    * during the regular time advance sequence, and possibly at the initial
+    * simulation time.  The second call advances the solution on a coarser
+    * level ahead in time to provide time-dependent boundary values for some
+    * finer level when time-dependent regridding is used.  In the first case,
+    * the values of the boolean flags are:
+    *
+    *
+    *
+    *    - \b  first_step
+    *        = true for first step in level time step sequence; else, false.
+    *    - \b  last_step
+    *        = true for last step in level time step sequence; else, false.
+    *    - \b  regrid_advance
+    *        = false.
+    *
+    *
+    *
+    * In the second case, the values of the boolean flags are:
+    *
+    *
+    *
+    *    - \b  first_step
+    *        = true.
+    *    - \b  last_step
+    *        = false.
+    *    - \b  regrid_advance
+    *        = true.
+    *
+    *
+    *
+    *
+    * When time-dependent regridding (i.e., Richardson extrapolation) is
+    * used, the routine is called from two different points in addition to
+    * those described above: to advance a temporary level that is coarser
+    * than the hierarchy level on which error estimation is performed, and
+    * to advance the hierarchy level itself.  In the first case, the values of
+    * the boolean flags are:
+    *
+    *
+    *
+    *    - \b  first_step
+    *        = true.
+    *    - \b  last_step
+    *        = true.
+    *    - \b  regrid_advance
+    *        = true.
+    *
+    *
+    *
+    * In the second case, the values of the boolean flags are:
+    *
+    *
+    *
+    *    - \b  first_step
+    *      (when regridding during time integration sequence)
+    *        = true when the level is not coarsest level to synchronize
+    *          immediately before the regridding process; else, false.
+    *      (when generating initial hierarchy construction)
+    *        = true, even though there may be multiple advance steps.
+    *    - \b  last_step
+    *        = true when the advance is the last in the Richardson
+    *          extrapolation step sequence; else false.
+    *    - \b  regrid_advance
+    *        = true.
+    *
+    *
+    *
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if either the level or hierarchy pointer is null, or the
+    * new time is not greater than the given time.
+    */
+
+   virtual double
+   advanceLevel(
+      const tbox::Pointer<hier::BasePatchLevel> level,
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const double current_time,
+      const double new_time,
+      const bool first_step,
+      const bool last_step,
+      const bool regrid_advance = false);
+
+   /**
+    * Synchronize data between given patch levels in patch hierarchy
+    * according to the standard hyperbolic AMR flux correction algorithm.
+    * This routine synchronizes data between two levels at a time from
+    * the level with index finest_level down to the level with index
+    * coarsest_level.  The array of old time values are used in the
+    * re-integration of the time-dependent data.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the hierarchy pointer is null, the level numbers do
+    * not properly match existing levels in the hierarchy (either
+    * coarsest_level > finest_level or some level is null), or
+    * all of the old time values are less than the value of sync_time.
+    */
+   virtual void
+   standardLevelSynchronization(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level,
+      const double sync_time,
+      const tbox::Array<double>& old_times);
+
+   /**
+    * This overloaded version of standardLevelSynchronization implements
+    * a routine used for synchronized timestepping.  Only a single
+    * value for the old time is needed, since all levels would have the
+    * same old time.
+    */
+   virtual void
+   standardLevelSynchronization(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level,
+      const double sync_time,
+      const double old_time);
+
+   /**
+    * Coarsen current solution data from finest hierarchy level specified
+    * down through the coarsest hierarchy level specified, if initial_time
+    * is true.  In this case, the hierarchy is being constructed at the
+    * initial simulation time,  After data is coarsened, the application-
+    * specific initialization routine is called to set data before that
+    * solution is further coarsened to the next coarser level in the
+    * hierarchy.  This operation makes the solution consistent between
+    * coarser levels and finer levels that did not exist when the coarse
+    * levels where created and initialized originally.
+    *
+    * When initial_time is false, this routine does nothing since the
+    * standard hyperbolic AMR algorithm for conservation laws requires
+    * no data synchronization after regridding beyond interpolation of
+    * data from coarser levels in the hierarchy in some conservative fashion.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the hierarchy pointer is null, the level numbers do
+    * not properly match existing levels in the hierarchy (either
+    * coarsest_level > finest_level or some level is null).
+    */
+   virtual void
+   synchronizeNewLevels(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level,
+      const double sync_time,
+      const bool initial_time);
+
+   /**
+    * Resets time-dependent data storage and update time for patch level.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the level pointer is null.
+    */
+   virtual void
+   resetTimeDependentData(
+      const tbox::Pointer<hier::BasePatchLevel> level,
+      const double new_time,
+      const bool can_be_refined);
+
+   /**
+    * Deallocate all new simulation data on the given level.  This may
+    * be necessary during regridding, or setting up levels initially.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the level pointer is null.
+    */
+   virtual void
+   resetDataToPreadvanceState(
+      const tbox::Pointer<hier::BasePatchLevel> level);
+
+   /**
+    * Initialize data on a new level after it is inserted into an AMR patch
+    * hierarchy by the gridding algorithm.  The level number indicates
+    * that of the new level.  The old_level pointer corresponds to
+    * the level that resided in the hierarchy before the level with the
+    * specified number was introduced.  If the pointer is null, there was
+    * no level in the hierarchy prior to the call and the level data is set
+    * based on the user routines and the simulation time.  Otherwise, the
+    * specified level replaces the old level and the new level receives data
+    * from the old level appropriately before it is destroyed.
+    *
+    * Typically, when data is set, it is interpolated from coarser levels
+    * in the hierarchy.  If the data is to be set, the level number must
+    * match that of the old level, if non-null.  If the old level is
+    * non-null, then data is copied from the old level to the new level
+    * on regions of intersection between those levels before interpolation
+    * occurs.  Then, user-supplied patch routines are called to further
+    * initialize the data if needed.  The boolean argument initial_time
+    * is passed into the user's routines.
+    *
+    * The boolean argument initial_time indicates whether the level is
+    * being introduced for the first time (i.e., at initialization time),
+    * or after some regrid process during the calculation beyond the initial
+    * hierarchy construction.  This information is provided since the
+    * initialization of the data on a patch may be different in each of those
+    * circumstances.  The can_be_refined boolean argument indicates whether
+    * the level is the finest level allowed in the hierarchy.  This may or
+    * may not affect the data initialization process depending on the problem.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the hierarchy pointer is null, the level number does
+    * not match any level in the hierarchy, or the old level number
+    * does not match the level number (if the old level pointer is non-null).
+    */
+   virtual void
+   initializeLevelData(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double init_data_time,
+      const bool can_be_refined,
+      const bool initial_time,
+      const tbox::Pointer<hier::BasePatchLevel> old_level =
+         tbox::Pointer<hier::BasePatchLevel>(NULL),
+      const bool allocate_data = true);
+
+   /**
+    * Reset cached communication schedules after the hierarchy has changed
+    * (due to regidding, for example) and the data has been initialized on
+    * the new levels.  The intent is that the cost of data movement on the
+    * hierarchy will be amortized across multiple communication cycles,
+    * if possible.  The level numbers indicate the range of levels in the
+    * hierarchy that have changed.  However, this routine updates
+    * communication schedules every level finer than and including that
+    * indexed by the coarsest level number given.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the hierarchy pointer is null, any pointer to a level
+    * in the hierarchy that is coarser than the finest level is null,
+    * or the given level numbers not specified properly; e.g.,
+    * coarsest_level > finest_level.
+    */
+   virtual void
+   resetHierarchyConfiguration(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level);
+
+   /**
+    * Set integer tags to "one" in cells where refinement of the given
+    * level should occur according to some user-supplied gradient criteria.
+    * The double time argument is the regrid time.  The integer "tag_index"
+    * argument is the patch descriptor index of the cell-centered integer tag
+    * array on each patch in the hierarchy.  The boolean argument
+    * initial_time indicates whether the level is being subject to refinement
+    * at the initial simulation time.  If it is false, then the error
+    * estimation process is being invoked at some later time after the AMR
+    * hierarchy was initially constructed.  The boolean argument
+    * uses_richardson_extrapolation_too is true when Richardson
+    * extrapolation error estimation is used in addition to the gradient
+    * detector, and false otherwise.  This argument helps the user to
+    * manage multiple regridding criteria.   This information is passed along
+    * to the user's patch tagging routines since the application of the
+    * gradient detector may be different in each case.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the hierarchy pointer is null or the level number does
+    * not match any existing level in the hierarchy.
+    */
+   virtual void
+   applyGradientDetector(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double error_data_time,
+      const int tag_index,
+      const bool initial_time,
+      const bool uses_richardson_extrapolation_too);
+
+   /**
+    * Set integer tags to "one" where refinement onf the given
+    * level should occur according to some user-supplied Richardson
+    * extrapolation criteria.  The "error_data_time" argument is the
+    * regrid time.  The "deltat" argument is the time increment to advance
+    * the solution on the level to be refined.  Note that that level is
+    * finer than the level in the argument list, in general.  The
+    * ratio between the argument level and the actual hierarchy level
+    * is given by the integer "coarsen ratio".
+    *
+    * The integer "tag_index" argument is the patch descriptor index of
+    * the cell-centered integer tag array on each patch in the hierarchy.
+    *
+    * The boolean argument initial_time indicates whether the level is being
+    * subject to refinement at the initial simulation time.  If it is false,
+    * then the error estimation process is being invoked at some later time
+    * after the AMR hierarchy was initially constructed.  Typically, this
+    * information is passed to the user's patch tagging routines since the
+    * application of the Richardson extrapolation process may be different
+    * in each case.
+    *
+    * The boolean uses_gradient_detector_too is true when a gradient
+    * detector procedure is used in addition to Richardson extrapolation,
+    * and false otherwise.  This argument helps the user to manage multiple
+    * regridding criteria.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the level pointer is null.
+    *
+    * ANDY, THIS ROUTINE HAS TO BE ALTERED TO TAKE IN MultiblockPatchHierarchy
+    * and MultiblockPatchLevel WHEN WE GET READY TO DO RICHARDSON
+    * EXTRAPOLATION.
+    */
+   virtual void
+   applyRichardsonExtrapolation(
+      const tbox::Pointer<hier::PatchLevel> level,
+      const double error_data_time,
+      const int tag_index,
+      const double deltat,
+      const int error_coarsen_ratio,
+      const bool initial_time,
+      const bool uses_gradient_detector_too);
+
+   /**
+    * Coarsen solution data from level to coarse_level for Richardson
+    * extrapolation.  Note that this routine will be called twice during
+    * the Richardson extrapolation error estimation process.  The
+    * before_advance boolean argument indicates whether data is
+    * set on the coarse level by coarsening the "old" time level solution
+    * (i.e., before it has been advanced) or by coarsening the "new"
+    * solution on the fine level (i.e., after it has been advanced).
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if either level pointer is null.
+    *
+    * ANDY, THIS ROUTINE HAS TO BE ALTERED TO TAKE IN MultiblockPatchHierarchy
+    * and MultiblockPatchLevel WHEN WE GET READY TO DO RICHARDSON
+    * EXTRAPOLATION.
+    */
+   virtual void
+   coarsenDataForRichardsonExtrapolation(
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int level_number,
+      const tbox::Pointer<hier::PatchLevel> coarse_level,
+      const double coarsen_data_time,
+      const bool before_advance);
+
+   /**
+    * Register a variable with the hyperbolic integration algorithm.  The
+    * variable type must be one of the options defined by the enumerated
+    * type defined above.  Typically, this routine is called from the
+    * hyperbolic patch model when the variable registration process is
+    * invoked by calling the function initializeLevelIntegrator() above.
+    * In fact, that function should be called before this routine is called.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the variable pointer or geometry pointer is null.
+    */
+   virtual void
+   registerVariable(
+      const tbox::Pointer<hier::Variable> var,
+      const hier::IntVector ghosts,
+      const HYP_VAR_TYPE h_v_type,
+      const tbox::Pointer<xfer::CoarsenOperator> coarsen_op =
+         tbox::Pointer<xfer::CoarsenOperator>(
+            NULL),
+      const tbox::Pointer<xfer::RefineOperator> refine_op =
+         tbox::Pointer<xfer::RefineOperator>(
+            NULL),
+      const tbox::Pointer<xfer::TimeInterpolateOperator> time_int =
+         tbox::Pointer<xfer::TimeInterpolateOperator>(NULL));
+
+   /**
+    * Print class data representation for hyperbolic level integrator object.
+    * This is done automatically, when an unrecoverable run-time assertion
+    * is thrown within some member function of this class.
+    */
+   virtual void
+   printClassData(
+      ostream& os) const;
+
+   /**
+    * Write out object state to the given database.
+    *
+    * When assertion checking is active, database point must be non-null.
+    */
+   virtual void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> db);
+
+   /**
+    * Return pointer to "current" variable context used by integrator.
+    * Current data corresponds to state data at the beginning of a
+    * timestep, or when a new level is initialized.
+    */
+   tbox::Pointer<hier::VariableContext>
+   getCurrentContext() const;
+
+   /**
+    * Return pointer to "new" variable context used by integrator.
+    * New data corresponds to advanced state data at the end of a timestep.
+    * The data is one timestep later than the "current" data.
+    */
+   tbox::Pointer<hier::VariableContext>
+   getNewContext() const;
+
+   /**
+    * Return pointer to "old" variable context used by integrator.
+    * Old data corresponds to an extra time level of state data used
+    * for Richardson extrapolation error estimation.  The data is
+    * one timestep earlier than the "current" data.
+    *
+    * Note that only in certain cases when using time-dependent error
+    * estimation, such as Richardson extrapolation, is the returned
+    * pointer will non-null.  See contructor for more information.
+    */
+   tbox::Pointer<hier::VariableContext>
+   getOldContext() const;
+
+   /**
+    * Return pointer to "scratch" variable context used by integrator.
+    * Scratch data typically corresponds to storage that user-routines
+    * in the concrete HyperbolicPatchStrategy object manipulate;
+    * in particular, scratch data contains ghost cells.
+    */
+   tbox::Pointer<hier::VariableContext>
+   getScratchContext() const;
+
+   /**
+    * Return pointer to variable context used for plotting.  This
+    * context corresponds to the data storage that should be written
+    * to plot files.  Typically, this is the same as the "current" context.
+    */
+   tbox::Pointer<hier::VariableContext>
+   getPlotContext() const;
+
+   /**
+    * Return true if this class has been constructed to use refined
+    * timestepping and false if it has been constructed to use
+    * synchronized timestepping.
+    */
+   bool
+   usingRefinedTimestepping() const;
+
+protected:
+   /**
+    * Read input values, indicated above, from given database.  The boolean
+    * argument is_from_restart should be set to true if the simulation
+    * is beginning from restart.  Otherwise it should be set to false.
+    *
+    * When assertion checking is active, the database pointer must be non-null.
+    */
+   virtual void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db,
+      bool is_from_restart);
+
+   /**
+    * Read object state from the restart file and initialize class
+    * data members.  The database from which the restart data is read is
+    * determined by the object_name specified in the constructor.
+    *
+    * Unrecoverable Errors:
+    *
+    *
+    *
+    *
+    *    -
+    *        The database corresponding to object_name is not found
+    *        in the restart file.
+    *
+    *    -
+    *        The class version number and restart version number do not
+    *        match.
+    *
+    *
+    *
+    *
+    *
+    */
+   virtual void
+   getFromRestart();
+
+   /*
+    * Pre-process flux storage before advancing solution on level from
+    * cur_time to new_time.  The boolean flags are used to determine
+    * how flux and flux integral storage is allocated and initialized.
+    * These are needed since the advanceLevel() routine is used for
+    * both level integration and time-dependent error estimation.
+    *
+    * When assertion checking is active, the level and schedule pointers
+    * must be non-null and the current time must be less than the new time.
+    */
+   virtual void
+   preprocessFluxData(
+      const tbox::Pointer<hier::MultiblockPatchLevel> level,
+      const double cur_time,
+      const double new_time,
+      const bool regrid_advance,
+      const bool first_step,
+      const bool last_step);
+
+   /*
+    * Post-process flux storage after advancing solution on level.
+    * The boolean flag is used to determine how flux and flux integral
+    * storage is copied and de-allocated. This is needed since the
+    * advanceLevel() routine is used for both level integration and
+    * time-dependent error estimation.
+    *
+    * When assertion checking is active, the level pointer must be non-null.
+    */
+   virtual void
+   postprocessFluxData(
+      const tbox::Pointer<hier::MultiblockPatchLevel> level,
+      const bool regrid_advance,
+      const bool first_step,
+      const bool last_step);
+
+   /*
+    * Copy time-dependent data from source space to destination space.
+    *
+    * When assertion checking is active, the level and context pointers
+    * must be non-null.
+    */
+   virtual void
+   copyTimeDependentData(
+      const tbox::Pointer<hier::PatchLevel> level,
+      const tbox::Pointer<hier::VariableContext> src_context,
+      const tbox::Pointer<hier::VariableContext> dst_context);
+
+   /**
+    * Apply the standard AMR hyperbolic flux synchronization process preserve
+    * conservation properties in the solution between the fine level and the
+    * coarse level.  The sync_time argument indicates the time at which
+    * the solution on the two levels is being synchronized.  The variable
+    * coarse_sim_time indicates the previous simulation time on the
+    * coarse level (recall the conservative difference will be repeated on the
+    * coarse level during the synchronization process).  After the
+    * synchronization, the flux and flux integral data storage is reset on
+    * the levels.
+    *
+    * When assertion checking is turned on, an unrecoverable assertion
+    * will result if either level pointer is null, the levels are not
+    * consecutive in the AMR hierarchy, or the coarse sim time is not
+    * less than the sync time.
+    */
+   virtual void
+   synchronizeLevelWithCoarser(
+      const tbox::Pointer<hier::MultiblockPatchLevel> fine,
+      const tbox::Pointer<hier::MultiblockPatchLevel> coarse,
+      const double sync_time,
+      const double coarse_sim_time);
+
+private:
+   /*
+    * The patch strategy supplies the application-specific operations
+    * needed to treat data on patches in the AMR hierarchy.
+    */
+   MblkHyperbolicPatchStrategy* d_patch_strategy;
+
+   /*
+    * The object name is used as a handle to databases stored in
+    * restart files and for error reporting purposes.  The boolean
+    * is used to control restart file writing operations.
+    */
+   string d_object_name;
+
+   const tbox::Dimension d_dim;
+
+   bool d_use_time_refinement;
+   bool d_registered_for_restart;
+
+   /*
+    * Courant-Friedrichs-Levy parameters for time increment selection.
+    */
+   double d_cfl;
+   double d_cfl_init;
+
+   /*
+    * Boolean flags for algorithm variations during time integration.
+    *
+    * d_lag_dt_computation indicates when time increment is computed for
+    *                      next step on a level.  A value of true means
+    *                      that the current solution values will be used to
+    *                      compute dt.  A value of false means that dt will
+    *                      be computed after the current solution is advanced
+    *                      and the new solution is used to compute dt. The
+    *                      default value is true.
+    *
+    * d_use_ghosts_for_dt  indicates whether the time increment computation
+    *                      on a patch requires ghost cell data (e.g., if
+    *                      boundary conditions are needed).  This value must
+    *                      be consistent with the numerical routines used
+    *                      in the hyperbolic patch strategy object to
+    *                      calculate the time step size.  The default is true.
+    */
+   bool d_lag_dt_computation;
+   bool d_use_ghosts_for_dt;
+
+   /*
+    * Boolean flags for indicated whether face or side data types are
+    * used for fluxes (choice is determined by numerical routines in
+    * hyperbolic patch model).
+    */
+   bool d_flux_is_face;
+   bool d_flux_face_registered;
+   bool d_flux_side_registered;
+
+/*
+ * The following communication algorithms and schedules are created and
+ * maintained to manage inter-patch communication during AMR integration.
+ * The algorithms are created in the class constructor.  They are initialized
+ * when variables are "registered" are registered with the integrator.
+ */
+
+   /*
+    * The "advance" schedule is used prior to advancing a level and
+    * prior to computing dt at initialization. It must be reset each
+    * time a level is regridded. All ghosts are filled with TIME_DEP
+    * and INPUT data at specified time. TIME_DEP data in patch interiors
+    * will be filled with CURRENT_VAR values.
+    */
+   tbox::Pointer<xfer::MultiblockRefineAlgorithm>
+   d_mblk_bdry_fill_advance;
+   tbox::Array<tbox::Pointer<xfer::MultiblockRefineSchedule> >
+   d_mblk_bdry_sched_advance;
+
+   /*
+    * The "advance new" schedule can be used twice during a time integration
+    * cycle. The first is when ghost cell data is required during the
+    * conservative difference process (i.e., d_use_ghosts_for_cons_diff
+    * is true).  If this is the case, ghosts must be refilled before the
+    * conservative difference on a coarser level during the refluxing
+    * process can take place.  See synchronizeLevelWithCoarser in class
+    * MblkHyperbolicLevelIntegrator second occurs when the dt calculation is
+    * not lagged and the physical boundary conditions are needed to compute dt
+    * (i.e., (!d_lag_dt_computation && d_use_ghosts_for_dt_computation)
+    * is true).  In either case, all ghosts are filled with TIME_DEP and INPUT
+    * data at specified time.  TIME_DEP data in patch interiors will be filled
+    * with values corresponding to NEW descriptor indices.  See notes
+    * accompanying MblkHyperbolicLevelIntegrator::advanceLevel.
+    */
+   tbox::Pointer<xfer::MultiblockRefineAlgorithm>
+   d_mblk_bdry_fill_advance_new;
+   tbox::Array<tbox::Pointer<xfer::MultiblockRefineSchedule> >
+   d_mblk_bdry_sched_advance_new;
+
+   /*
+    * The "advance old" algorithm is used to fill ghosts using time
+    * interpolated data from OLD_VAR and NEW_VAR on the coarser hierarchy
+    * level.  It is currently only used for advancing data on a temporary
+    * level during the Richardson extrapolation algorithm. Use of OLD_VAR
+    * data is required only when three time levels are used
+    * (i.e. d_number_time_data_levels=3).
+    */
+   tbox::Pointer<xfer::MultiblockRefineAlgorithm>
+   d_mblk_bdry_fill_advance_old;
+
+   /*
+    * Coarsen algorithms for conservative data synchronization
+    * (e.g., flux correction or refluxing).
+    */
+   tbox::Pointer<xfer::MultiblockCoarsenAlgorithm>
+   d_mblk_coarsen_fluxsum;
+   tbox::Pointer<xfer::MultiblockCoarsenAlgorithm>
+   d_mblk_coarsen_sync_data;
+   tbox::Pointer<xfer::MultiblockCoarsenAlgorithm>
+   d_mblk_sync_initial_data;
+
+   /*
+    * Coarsen algorithms for Richardson extrapolation.
+    */
+   tbox::Pointer<xfer::CoarsenAlgorithm> d_coarsen_rich_extrap_init;
+   tbox::Pointer<xfer::CoarsenAlgorithm> d_coarsen_rich_extrap_final;
+
+   /*
+    * Algorithm for filling a new patch level in the hierarchy.
+    */
+   tbox::Pointer<xfer::MultiblockRefineAlgorithm>
+   d_mblk_fill_new_level;
+
+   /*
+    * Number of levels of time-dependent data that must be maintained
+    * on each patch level.  This value is used to coordinate the needs
+    * of the time integration and the regridding process with the
+    * patch data types and descriptor indices.
+    */
+   int d_number_time_data_levels;
+
+   /*
+    * hier::Variable contexts and lists of variables used for data management.
+    * The contexts are set in the constructor.   Note that they must
+    * be consistent with those defined by the concrete subclass of
+    * the HyperbolicPatchStrategy object.  The variable lists
+    * and component selectors are set in the registerVariable() function.
+    */
+
+   tbox::Pointer<hier::VariableContext> d_scratch;
+   tbox::Pointer<hier::VariableContext> d_current;
+   tbox::Pointer<hier::VariableContext> d_new;
+   tbox::Pointer<hier::VariableContext> d_old;
+   tbox::Pointer<hier::VariableContext> d_plot_context;
+
+   tbox::List<tbox::Pointer<hier::Variable> > d_all_variables;
+   tbox::List<tbox::Pointer<hier::Variable> > d_time_dep_variables;
+   tbox::List<tbox::Pointer<hier::Variable> > d_flux_variables;
+   tbox::List<tbox::Pointer<hier::Variable> > d_fluxsum_variables;
+
+   /*
+    * SCRATCH descriptor indices for (non-TEMPORARY) variables
+    * (i.e., TIME_DEP, INPUT, FLUX). Note that these are used
+    * to create scratch space before ghost cells are filled
+    * on level prior to advancing the data.
+    */
+   hier::ComponentSelector d_saved_var_scratch_data;
+
+   /*
+    * SCRATCH descriptor indices for TEMPORARY variables.  Note that
+    * these are used to create scratch space on a patch-by-patch basis.
+    */
+   hier::ComponentSelector d_temp_var_scratch_data;
+
+   /*
+    * CURRENT descriptor indices for TIME_DEP, INPUT, NO_FILL
+    * variables.  Note that these are used to create storage for quantities
+    * when new patches are made (e.g., during hierachy initialization,
+    * before error estimation during regridding, after regridding new
+    * patch levels, etc.).
+    */
+   hier::ComponentSelector d_new_patch_init_data;
+
+   /*
+    * NEW descriptor indices for TIME_DEP variables.  Note that these
+    * are used to create space for new data before patch level is advanced.
+    */
+   hier::ComponentSelector d_new_time_dep_data;
+
+   /*
+    * Descriptor indices for FLUX quantities and integrals of fluxes
+    * (used to accumulate flux information around fine patch boundaries).
+    * Also, a boolean flag to track flux storage on level 0.
+    */
+   hier::ComponentSelector d_flux_var_data;
+   hier::ComponentSelector d_fluxsum_data;
+   bool d_have_flux_on_level_zero;
+
+   /*
+    * OLD descriptor indices for TIME_DEP variables.  Note that
+    * these are used only when three time levels of data are used.
+    */
+   hier::ComponentSelector d_old_time_dep_data;
+
+   /*
+    * Option to distinguish tbox::MPI reduction costs from load imbalances
+    * when doing performance timings.
+    */
+   bool d_distinguish_mpi_reduction_costs;
+
+   /*
+    * Timers interspersed throughout the class.
+    */
+   tbox::Pointer<tbox::Timer> t_advance_bdry_fill_comm;
+   tbox::Pointer<tbox::Timer> t_error_bdry_fill_create;
+   tbox::Pointer<tbox::Timer> t_error_bdry_fill_comm;
+   tbox::Pointer<tbox::Timer> t_mpi_reductions;
+   tbox::Pointer<tbox::Timer> t_initialize_level_data;
+   tbox::Pointer<tbox::Timer> t_fill_new_level_create;
+   tbox::Pointer<tbox::Timer> t_fill_new_level_comm;
+   tbox::Pointer<tbox::Timer> t_advance_bdry_fill_create;
+   tbox::Pointer<tbox::Timer> t_new_advance_bdry_fill_create;
+   tbox::Pointer<tbox::Timer> t_apply_gradient_detector;
+   tbox::Pointer<tbox::Timer> t_coarsen_rich_extrap;
+   tbox::Pointer<tbox::Timer> t_get_level_dt;
+   tbox::Pointer<tbox::Timer> t_get_level_dt_sync;
+   tbox::Pointer<tbox::Timer> t_advance_level;
+   tbox::Pointer<tbox::Timer> t_new_advance_bdry_fill_comm;
+   tbox::Pointer<tbox::Timer> t_patch_num_kernel;
+   tbox::Pointer<tbox::Timer> t_advance_level_sync;
+   tbox::Pointer<tbox::Timer> t_std_level_sync;
+   tbox::Pointer<tbox::Timer> t_sync_new_levels;
+
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkEuler/MblkHyperbolicPatchStrategy.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkEuler/MblkHyperbolicPatchStrategy.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to patch routines for hyperbolic integration scheme. 
+ *
+ ************************************************************************/
+
+#include "MblkHyperbolicPatchStrategy.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+using namespace SAMRAI;
+
+MblkHyperbolicPatchStrategy::MblkHyperbolicPatchStrategy(
+   const tbox::Dimension& dim):
+   xfer::MultiblockRefinePatchStrategy(dim),
+   xfer::MultiblockCoarsenPatchStrategy(dim),
+   d_dim(dim)
+{
+   d_data_context.setNull();
+}
+
+MblkHyperbolicPatchStrategy::~MblkHyperbolicPatchStrategy()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default virtual function implementations.                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkHyperbolicPatchStrategy::tagGradientDetectorCells(
+   hier::Patch& patch,
+   const double regrid_time,
+   const bool initial_error,
+   const int tag_index,
+   const bool uses_richardson_extrapolation_too)
+{
+   NULL_USE(patch);
+   NULL_USE(regrid_time);
+   NULL_USE(initial_error);
+   NULL_USE(tag_index);
+   NULL_USE(uses_richardson_extrapolation_too);
+   TBOX_WARNING("MblkHyperbolicPatchStrategy::tagGradientDetectorCells()"
+      << "\nNo class supplies a concrete implementation for "
+      << "\nthis method.  The default abstract method (which "
+      << "\ndoes no cell tagging) is executed" << std::endl);
+}
+
+void MblkHyperbolicPatchStrategy::tagRichardsonExtrapolationCells(
+   hier::Patch& patch,
+   const int error_level_number,
+   const tbox::Pointer<hier::VariableContext> coarsened_fine,
+   const tbox::Pointer<hier::VariableContext> advanced_coarse,
+   const double regrid_time,
+   const double deltat,
+   const int error_coarsen_ratio,
+   const bool initial_error,
+   const int tag_index,
+   const bool uses_gradient_detector_too)
+{
+   NULL_USE(patch);
+   NULL_USE(error_level_number);
+   NULL_USE(coarsened_fine);
+   NULL_USE(advanced_coarse);
+   NULL_USE(regrid_time);
+   NULL_USE(deltat);
+   NULL_USE(error_coarsen_ratio);
+   NULL_USE(initial_error);
+   NULL_USE(tag_index);
+   NULL_USE(uses_gradient_detector_too);
+   TBOX_WARNING(
+      "MblkHyperbolicPatchStrategy::tagRichardsonExtrapolationCells()"
+      << "\nNo class supplies a concrete implementation for "
+      << "\nthis method.  The default abstract method (which "
+      << "\ndoes no cell tagging) is executed" << std::endl);
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkEuler/MblkHyperbolicPatchStrategy.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkEuler/MblkHyperbolicPatchStrategy.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,523 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to patch routines for hyperbolic integration scheme. 
+ *
+ ************************************************************************/
+
+#ifndef included_MblkHyperbolicPatchStrategyXD
+#define included_MblkHyperbolicPatchStrategyXD
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/xfer/RefinePatchStrategy.h"
+#include "SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h"
+#include "SAMRAI/mesh/MultiblockGriddingAlgorithm.h"
+#include "SAMRAI/xfer/MultiblockRefineSchedule.h"
+#include "SAMRAI/xfer/MultiblockRefinePatchStrategy.h"
+
+/**
+ * Class MblkHyperbolicPatchStrategy is an abstract base class defining the
+ * interface between an MblkHyperbolicLevelIntegrator object and operations
+ * applied to a single patch in a structured AMR hierarchy.   The operations
+ * include patch initialization, dt calculation, flux computation,
+ * conservative differencing, and error estimation.  This class is derived
+ * from the xfer::RefinePatchStrategy and xfer::CoarsenPatchStrategy
+ * abstract base classes.   These base classes provide the interface for
+ * user-defined interlevel data refining and coarsening operations and the
+ * specification of physical boundary conditions.  The functions
+ * setPhysicalBoundaryConditions(), and pre/postprocessRefine() are
+ * overloaded from the class xfer::RefinePatchStrategy.  The operations
+ * pre/postprocessCoarsen() are overloaded from xfer::CoarsenPatchStrategy.
+ * The pre/postprocessCoarsen/Refine() operations are given empty
+ * implementations here so that the user does not need to proovide them if
+ * the operations are not needed.
+ *
+ * It is important to recognize that for the concrete patch strategy subclass
+ * and the MblkHyperbolicLevelIntegrator to work together, the concrete
+ * strategy must know which patch data to operate on.  The patch data storage
+ * is manipulated by the level integrator.  The set/clearDataContext() methods
+ * allow the integrator to inform the patch strategy of the correct data
+ * context.  The concrete patch strategy subclass can access the appropriate
+ * context via the getDataContext() method.
+ *
+ * @see algs::MblkHyperbolicLevelIntegrator
+ * @see xfer::RefinePatchStrategy
+ * @see xfer::CoarsenPatchStrategy
+ */
+
+using namespace SAMRAI;
+
+class MblkHyperbolicLevelIntegrator;
+
+class MblkHyperbolicPatchStrategy:
+   public xfer::MultiblockRefinePatchStrategy,
+   public xfer::MultiblockCoarsenPatchStrategy
+{
+public:
+   /**
+    * Blank constructor for MblkHyperbolicPatchStrategy.
+    */
+   MblkHyperbolicPatchStrategy(
+      const tbox::Dimension& dim);
+
+   /**
+    * Virtual destructor for MblkHyperbolicPatchStrategy.
+    */
+   virtual ~MblkHyperbolicPatchStrategy();
+
+   /**
+    * Register specific variables needed in the numerical routines with the
+    * hyperbolic level integrator using the registerVariable() function in that
+    * class.  The integrator manipulates storage for the data and this
+    * registration defines the way in which data for each quantity will
+    * be manipulated on the patches.  Typically, the derived data quantities
+    * for plotting are registered with a visualization data writer in this
+    * routine as well, since the hyperbolic level integrator provides the
+    * variable context for plotting (i.e., which data is available when a
+    * plot file is generated).  The integrator pointer cannot be null in
+    * most cases.
+    *
+    * The gridding algorithm pointer is provided so that patch data objects
+    * may be registered with the load balancer object (owned by the gridding
+    * algorithm) for non-uniform load balancing, if needed.
+    */
+   virtual void
+   registerModelVariables(
+      MblkHyperbolicLevelIntegrator* integrator) = 0;
+
+   /**
+    * Set up parameters in the load balancer object (owned by the gridding
+    * algorithm) if needed.  This function is called immediately after the
+    * registerModelVariables() function is called.  The hyperbolic level
+    * integrator pointer is provided so that the integrator can be used
+    * to manage data for the load balancer if needed (e.g., when using
+    * non-uniform load balancing).
+    *
+    * Note that this function is not pure virtual. It is given a
+    * dummy implementation here so that users may ignore it when
+    * inheriting from this class.
+    */
+   virtual void setupLoadBalancer(
+      MblkHyperbolicLevelIntegrator* integrator,
+      mesh::BaseGriddingAlgorithm* gridding_algorithm)
+   {
+      NULL_USE(integrator);
+      NULL_USE(gridding_algorithm);
+   }
+
+   /**
+    * Set the initial data on a patch interior only.  Note that no ghost cells
+    * need to be set in this routine regardless of whether the patch data
+    * corresponding to the context requires ghost cells.  The data_time
+    * is the simulation time when the routine is called.  The boolean
+    * initial_time is true if the routine is called at the initial time
+    * when the hierarchy is initially constructed, otherwise it is false.
+    */
+   virtual void
+   initializeDataOnPatch(
+      hier::Patch& patch,
+      const double data_time,
+      const bool initial_time) = 0;
+
+   /**
+    * Compute the stable time increment for a patch on the level with the
+    * given number.  The boolean flag initial_time is true if the routine
+    * is called at the initial simulation time; otherwise it is false.
+    * The double argument dt_time is the simulation time.
+    */
+   virtual double
+   computeStableDtOnPatch(
+      hier::Patch& patch,
+      const bool initial_time,
+      const double dt_time) = 0;
+
+   /**
+    * Compute TIME INTEGRALS of fluxes to be used in conservative difference
+    * for patch integration.  That is, it is assumed that this numerical
+    * routine will compute the fluxes corresponding to the cell faces
+    * multiplied by the time increment.  Typically, the numerical flux is
+    * the normal flux at the cell face.  The flux integrals will be used in
+    * the conservative difference that updates the conserved quantities.
+    *
+    * Note that the numerical routines in this method generally require
+    * ghost cells.  Ghost cells data is filled before this routine is called.
+    */
+   virtual void
+   computeFluxesOnPatch(
+      hier::Patch& patch,
+      const double time,
+      const double dt) = 0;
+
+   /**
+    * Update patch data with a conservative difference (approximating
+    * the divergence theorem) using the flux integrals computed in
+    * computeFluxesOnPatch() routine.  The boolean flag is true when this
+    * routine is called during a flux synchronization step.   Otherwise,
+    * it is false.  Note that the computeFluxesOnPatch() routine computes
+    * TIME INTEGRALs of the numerical fluxes (e.g., they have been multiplied
+    * by dt).  So the conservative difference routine should be consistent
+    * with this.
+    */
+   virtual void
+   conservativeDifferenceOnPatch(
+      hier::Patch& patch,
+      const double time,
+      const double dt,
+      bool at_syncronization) = 0;
+
+   /**
+    * This is an optional routine for user to process any application-specific
+    * patch strategy data BEFORE patches are advanced on the given level.
+    * This routine is called after patch boundary data is filled
+    * (i.e., ghosts) and before computeFluxesOnPatch().  The arguments are:
+    * level -- level that will be advanced, current_time -- current
+    * integration time, dt -- current time increment, first_step -- boolean
+    * flag that is true if advance is first in time step sequence on level
+    * (i.e., previous advance step was on another level, false otherwise,
+    * last_step -- boolean flag that is true if advance is last in time step
+    * sequence on level (i.e., synchronization with coarser level will occur
+    * immediately after this advance), regrid_advance -- boolean flag that
+    * is true if the advance is during a regridding phase (i.e., the advance
+    * is not used to integrate data on the hierarchy) in which case the
+    * results of the advance will be discarded.
+    *
+    * Note that when this routine is called, the scratch data is filled on
+    * all patches (i.e., ghost cells) and that data is the same as the
+    * current level data on all patch interiors.  That is, both scratch and
+    * current data correspond to current_time.
+    *
+    * Note that this function is not pure virtual. It is given a
+    * dummy implementation here so that users may ignore it when
+    * inheriting from this class.
+    */
+   virtual void
+   preprocessAdvanceLevelState(
+      const tbox::Pointer<hier::PatchLevel>& level,
+      double current_time,
+      double dt,
+      bool first_step,
+      bool last_step,
+      bool regrid_advance)
+   {
+      NULL_USE(level);
+      NULL_USE(current_time);
+      NULL_USE(dt);
+      NULL_USE(first_step);
+      NULL_USE(last_step);
+      NULL_USE(regrid_advance);
+   }
+
+   /**
+    * This is an optional routine for user to process any application-specific
+    * patch strategy data AFTER patches are advanced on the given level.
+    * This routine is called after conservativeDifferenceOnPatch() is called
+    * and before computeStableDtOnPatch().  The arguments are:
+    * level -- level that will be advanced, current_time -- current
+    * integration time, dt -- current time increment, first_step -- boolean
+    * flag that is true if advance is first in time step sequence on level
+    * (i.e., previous advance step was on another level, false otherwise,
+    * last_step -- boolean flag that is true if advance is last in time step
+    * sequence on level (i.e., synchronization with coarser
+    * level will occur immediately after this advance), regrid_advance --
+    * boolean flag that is true if the advance is during a regridding phase
+    * (i.e., the advance is not used to integrate data on the hierarchy) in
+    * which case the results of the advance will be discarded.
+    *
+    * Note that when this routine is called, the scratch data is filled on
+    * all patches (i.e., ghost cells) and that data is the same as the
+    * new level data on all patch interiors.  That is, both scratch and
+    * new data correspond to current_time + dt on patch interiors.
+    * The current data and ghost values correspond to the current_time.
+    *
+    * Note that this function is not pure virtual. It is given a
+    * dummy implementation here so that users may ignore it when
+    * inheriting from this class.
+    */
+   virtual void
+   postprocessAdvanceLevelState(
+      const tbox::Pointer<hier::PatchLevel>& level,
+      double current_time,
+      double dt,
+      bool first_step,
+      bool last_step,
+      bool regrid_advance)
+   {
+      NULL_USE(level);
+      NULL_USE(current_time);
+      NULL_USE(dt);
+      NULL_USE(first_step);
+      NULL_USE(last_step);
+      NULL_USE(regrid_advance);
+   }
+
+   /**
+    * Tag cells on the given patch that require refinement based on
+    * application-specific numerical quantities.  The tag index argument
+    * indicates the index of the tag data on the patch data array.  The
+    * boolean argument initial_error is true if tagging is being done at the
+    * initial simulation time; otherwise, it is false.  The other boolean
+    * flag uses_richardson_extrapolation_too is true when Richardson
+    * extrapolation is used in addition to the gradient detector.  This flag
+    * helps users manage multiple regridding criteria.
+    *
+    * Note that this function is not pure virtual. It is given a
+    * dummy implementation here so that users may ignore it when
+    * inheriting from this class.
+    */
+   virtual void
+   tagGradientDetectorCells(
+      hier::Patch& patch,
+      const double regrid_time,
+      const bool initial_error,
+      const int tag_index,
+      const bool uses_richardson_extrapolation_too);
+
+   /**
+    * Tag cells based from differences computed in the Richardson
+    * extrapolation.  The Richardson
+    * extrapolation algorithm creates a coarsened version of some hierarchy
+    * patch level and advances data in time on both the coarsened patch
+    * level and the hierarchy level. This routine takes the data resulting
+    * from the advance on both the coarse and fine levels, compares them, and
+    * tags cells according to the difference.
+    * \verbatim
+    *              (2)
+    *      n+1 ^------->x finish      (1) advanced_coarse
+    *          |        ^             (2) coarsened_fine
+    *  time  n -        |
+    *          ^        |(1)
+    *          |        |
+    *          <--------o start
+    *        fine     coarse
+    * \endverbatim
+    *
+    * The patch supplied to this routine is on the coarsened level.  However,
+    * the error_level_number corresponds to the actual hierarchy level
+    * from which it was coarsened.   Data resides on this patch in two
+    * contexts - ``advanced_coarse'' and ``coarsened_fine''.  Advanced
+    * coarse is data advanced on the coarsened version of the level, while
+    * coarsened fine is the data advanced on the fine level and then
+    * coarsened to the coarse level.  The regrid time and the time increment
+    * are given for the actual hierarchy level.  The error coarsen ratio
+    * argument is the ratio between the index spaces on the hierarchy level
+    * and the coarsened hierarchy level.  The boolean flag ``initial_error''
+    * is true when the error estimation is performed at the initial simulation
+    * time; i.e., when the hierarchy levels are being constructed for the first
+    * time.  The tag index argument is the index of the tag data on the patch
+    * data array.  The other boolean flag uses_gradient_detector_too is
+    * true when a gradient detector scheme is used in addition to Richardson
+    * extrapolation.  This flag helps users manage multiple regridding
+    * criteria.
+    *
+    * Note that this function is not pure virtual. It is given a
+    * dummy implementation here so that users may ignore it when
+    * inheriting from this class.
+    */
+   virtual void
+   tagRichardsonExtrapolationCells(
+      hier::Patch& patch,
+      const int error_level_number,
+      const tbox::Pointer<hier::VariableContext> coarsened_fine,
+      const tbox::Pointer<hier::VariableContext> advanced_coarse,
+      const double regrid_time,
+      const double deltat,
+      const int error_coarsen_ratio,
+      const bool initial_error,
+      const int tag_index,
+      const bool uses_gradient_detector_too);
+
+   /**
+    * Set user-defined boundary conditions at the physical domain boundary.
+    */
+   virtual void
+   setPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const double fill_time,
+      const hier::IntVector& ghost_width_to_fill) = 0;
+
+   /**
+    * Fill the singularity conditions for the multi-block case
+    */
+   virtual void
+   fillSingularityBoundaryConditions(
+      hier::Patch& patch,
+      tbox::List<tbox::Pointer<hier::Patch> >& sing_patches,
+      const double fill_time,
+      const hier::Box& fill_box,
+      const hier::BoundaryBox& bbox) = 0;
+
+   /**
+    * Return maximum stencil width needed for user-defined
+    * data interpolation operations.  Default is to return
+    * zero, assuming no user-defined operations provided.
+    *
+    * Note that this function is not pure virtual. It is given a
+    * dummy implementation here so that users may ignore it when
+    * inheriting from this class.
+    */
+   virtual hier::IntVector getRefineOpStencilWidth() const
+   {
+      return hier::IntVector(SAMRAI::xfer::CoarsenPatchStrategy::getDim(), 0);
+   }
+
+   /**
+    * Pre- and post-processing routines for implementing user-defined
+    * spatial interpolation routines applied to variables.  The
+    * interpolation routines are used in the hyperbolic AMR algorithm
+    * for filling patch ghost cells before advancing data on a level
+    * and after regridding a level to fill portions of the new level
+    * from some coarser level.  These routines are called automatically
+    * from within patch boundary filling schedules; thus, some concrete
+    * function matching these signatures must be provided in the user's
+    * patch routines.  However, the routines only need to perform some
+    * operations when "USER_DEFINED_REFINE" is given as the interpolation
+    * method for some variable when the patch routines register variables
+    * with the hyperbolic level integration algorithm, typically.  If the
+    * user does not provide operations that refine such variables in either
+    * of these routines, then they will not be refined.
+    *
+    * The order in which these operations are used in each patch
+    * boundary filling schedule is:
+    *
+    * - \b (1) {Call user's preprocessRefine() routine.}
+    * - \b (2) {Refine all variables with standard interpolation operators.}
+    * - \b (3) {Call user's postprocessRefine() routine.}
+    *
+    * Note that these functions are not pure virtual. They are given
+    * dummy implementations here so that users may ignore them when
+    * inheriting from this class.
+    */
+   virtual void preprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio)
+   {
+      NULL_USE(fine);
+      NULL_USE(coarse);
+      NULL_USE(fine_box);
+      NULL_USE(ratio);
+   }
+
+   ///
+   virtual void postprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio)
+   {
+      NULL_USE(fine);
+      NULL_USE(coarse);
+      NULL_USE(fine_box);
+      NULL_USE(ratio);
+   }
+
+   /**
+    * Return maximum stencil width needed for user-defined
+    * data coarsen operations.  Default is to return
+    * zero, assuming no user-defined operations provided.
+    *
+    * Note that this function is not pure virtual. It is given a
+    * dummy implementation here so that users may ignore it when
+    * inheriting from this class.
+    */
+   virtual hier::IntVector getCoarsenOpStencilWidth() const
+   {
+      return hier::IntVector(SAMRAI::xfer::CoarsenPatchStrategy::getDim(), 0);
+   }
+
+   /**
+    * Pre- and post-processing routines for implementing user-defined
+    * spatial coarsening routines applied to variables.  The coarsening
+    * routines are used in the hyperbolic AMR algorithm synchronizing
+    * coarse and fine levels when they have been integrated to the same
+    * point.  These routines are called automatically from within the
+    * data synchronization coarsen schedules; thus, some concrete
+    * function matching these signatures must be provided in the user's
+    * patch routines.  However, the routines only need to perform some
+    * operations when "USER_DEFINED_COARSEN" is given as the coarsening
+    * method for some variable when the patch routines register variables
+    * with the hyperbolic level integration algorithm, typically.  If the
+    * user does not provide operations that coarsen such variables in either
+    * of these routines, then they will not be coarsened.
+    *
+    * The order in which these operations are used in each coarsening
+    * schedule is:
+    *
+    * - \b (1) {Call user's preprocessCoarsen() routine.}
+    * - \b (2) {Coarsen all variables with standard coarsening operators.}
+    * - \b (3) {Call user's postprocessCoarsen() routine.}
+    *
+    * Note that these functions are not pure virtual. They are given
+    * dummy implementations here so that users may ignore them when
+    * inheriting from this class.
+    */
+   virtual void preprocessCoarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio)
+   {
+      NULL_USE(coarse);
+      NULL_USE(fine);
+      NULL_USE(coarse_box);
+      NULL_USE(ratio);
+   }
+
+   ///
+   virtual void postprocessCoarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio)
+   {
+      NULL_USE(coarse);
+      NULL_USE(fine);
+      NULL_USE(coarse_box);
+      NULL_USE(ratio);
+   }
+
+   /**
+    * Return pointer to patch data context.
+    */
+   tbox::Pointer<hier::VariableContext> getDataContext() const
+   {
+      return d_data_context;
+   }
+
+   /**
+    * The hyperbolic integrator controls the context for the data to be used
+    * in the numerical routines implemented in the concrete patch strategy.
+    * The setDataContext() allows the integrator to set the context for
+    * data on a patch on which to operate.
+    */
+   void setDataContext(
+      tbox::Pointer<hier::VariableContext> context)
+   {
+      d_data_context = context;
+   }
+
+   /**
+    * The clearDataContext() routine resets the data context to be null.
+    */
+   void clearDataContext()
+   {
+      d_data_context.setNull();
+   }
+
+private:
+   tbox::Pointer<hier::VariableContext> d_data_context;
+
+   const tbox::Dimension d_dim;
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkEuler/Pointer-MblkHyperbolicLevelIntegrator.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkEuler/Pointer-MblkHyperbolicLevelIntegrator.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,19 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright
+ * information, see COPYRIGHT and COPYING.LESSER.
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Pointer.C"
+#include "MblkHyperbolicLevelIntegrator.h"
+
+using namespace SAMRAI;
+
+#ifndef LACKS_EXPLICIT_TEMPLATE_INSTANTIATION
+template class tbox::Pointer<MblkHyperbolicLevelIntegrator>;
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkEuler/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkEuler/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,29 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   Multiblock Linear Advection Equation Example
+##
+#########################################################################
+
+This example is similar to the single-block AMR LinAdv sample application.
+Please see the README in that example for details on how to compile
+and run.  This example has the following differences:
+
+   1. It works on non-cartesian mapped grids 
+   2. It works with multiblock grids
+   3. All numerical kernel operations (e.g. computeFluxesOnPatch()) are
+      c-based rather than fortran
+
+The three test cases included are:
+
+   1. cart-1blk   - single block Cartesian grid 
+   2. wedge-1blk  - single block mapped wedge grid 
+   3. octant-3blk - multi block (3 blocks) mapped octant grid 
+
+Note that this example will compile in 2D but the numerics have not been fully
+tested so it currently should only run in 3D.  For further information, please
+contact Andy Wissink: awissink at llnl.gov
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkEuler/bc_common.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkEuler/bc_common.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,69 @@
+c
+c     define some boundary condition constants
+c
+
+c
+c     define faces, edges and corners that match up to 
+c     apputils/boundary/CartesianBoundaryDefines.h
+c
+
+	integer XLO      
+	integer XHI      
+	integer YLO      
+	integer YHI      
+	integer ZLO      
+	integer ZHI      
+
+	integer Y0Z0     
+	integer Y1Z0     
+	integer Y0Z1     
+	integer Y1Z1     
+	integer X0Z0     
+	integer X0Z1     
+	integer X1Z0     
+	integer X1Z1     
+	integer X0Y0     
+	integer X1Y0     
+	integer X0Y1     
+	integer X1Y1     
+
+	integer X0Y0Z0   
+	integer X1Y0Z0   
+	integer X0Y1Z0   
+	integer X1Y1Z0   
+	integer X0Y0Z1   
+	integer X1Y0Z1   
+	integer X0Y1Z1   
+	integer X1Y1Z1   
+
+	parameter( XLO = 0)
+	parameter( XHI = 1)
+	parameter( YLO = 2)
+	parameter( YHI = 3)
+	parameter( ZLO = 4)
+	parameter( ZHI = 5)
+
+	parameter( Y0Z0 = 0)  
+	parameter( Y1Z0 = 1)
+	parameter( Y0Z1 = 2)
+	parameter( Y1Z1 = 3)
+	parameter( X0Z0 = 4)
+	parameter( X0Z1 = 5)
+	parameter( X1Z0 = 6)
+	parameter( X1Z1 = 7)
+	parameter( X0Y0 = 8)
+	parameter( X1Y0 = 9)
+	parameter( X0Y1 = 10)
+	parameter( X1Y1 = 11)
+
+	parameter( X0Y0Z0 = 0)
+	parameter( X1Y0Z0 = 1)
+	parameter( X0Y1Z0 = 2)
+	parameter( X1Y1Z0 = 3)
+	parameter( X0Y0Z1 = 4)
+	parameter( X1Y0Z1 = 5)
+	parameter( X0Y1Z1 = 6)
+	parameter( X1Y1Z1 = 7)
+c
+c     end of include file
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkEuler/boundaryconditions.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkEuler/boundaryconditions.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,516 @@
+
+c
+c  This code is post-processed fortran that has been cleaned up
+c
+
+c     ----------------------------------------------------------------------
+
+      subroutine bcmultiblock(
+     *    x_ilo, x_ihi, x_jlo, x_jhi, x_klo, x_khi, x, 
+     *    d_ilo, d_ihi, d_jlo, d_jhi, d_klo, d_khi, d,  nd,
+     *    dlo, dhi,  
+     *    glo, ghi,  
+     *    lo,  hi,
+     *    dir, side )
+c
+c     Extrapolate boundary conditions
+c
+c     x = nodal positions
+c     d = state array
+c     dlo, dhi = domain bounds
+c     glo, ghi = ghost box bounds
+c     lo,  hi  = patch bounds
+c
+      implicit none
+
+c     ... input
+      integer x_ilo,x_ihi,x_jlo,x_jhi,x_klo,x_khi
+      real*8 x(x_ilo:x_ihi+1,x_jlo:x_jhi+1,x_klo:x_khi+1,3)
+
+      integer nd
+      integer d_ilo,d_ihi,d_jlo,d_jhi,d_klo,d_khi
+      real*8 d(d_ilo:d_ihi,d_jlo:d_jhi,d_klo:d_khi,nd)
+
+      integer dlo(3), dhi(3)  ! the index space high and low
+      integer glo(3), ghi(3)  ! the zonal grown high and low
+      integer lo(3),  hi(3)   ! the interior high and low
+      integer dir, side       ! the direction we are filling in and low(0) or high(1)
+
+c     ... local
+      integer i, j, k, n
+      integer ii, jj, kk
+
+c     -------------------------- begin here ---------------------------
+
+c
+c first we sweep out i-1 ghosts then i+1 ghosts, note to get at the edges
+c and corners, we make sure that we populate the ghosts used in the extrapolation
+c with valid data, hence the changing expanding bounds when we then go to the j, and k
+c ghosts
+c
+c     for zones we just extrapolate piece-wise constant (even bc)
+c     for nodal positions we extrapolate linearly (preserves mesh size and spacing)
+c
+
+c     ilo conditions
+      if (dir.eq.0 .and. side.eq.0) then
+         
+         do k = max(glo(3),dlo(3)), min(ghi(3),dhi(3)) 
+            do j = max(glo(2),dlo(2)), min(ghi(2),dhi(2)) 
+               do i = glo(1), dlo(1)-1
+                  do n = 1, nd
+                     d(i,j,k,n) = d(dlo(1),j,k,n)
+                  end do
+               end do
+            end do 
+         end do 
+         
+         do k = max(glo(3),dlo(3)), min(ghi(3)+1,dhi(3)+1) 
+            do j = max(glo(2),dlo(2)), min(ghi(2)+1,dhi(2)+1) 
+               do i = glo(1), dlo(1)-1
+                  ii = 2*(dlo(1))-i
+                  x(i,j,k,1) = 2.*x(dlo(1),j,k,1) - x(ii,j,k,1)
+                  x(i,j,k,2) = 2.*x(dlo(1),j,k,2) - x(ii,j,k,2) 
+                  x(i,j,k,3) = 2.*x(dlo(1),j,k,3) - x(ii,j,k,3) 
+               end do
+            end do 
+         end do 
+         
+c     ihi conditions
+      else if (dir.eq.0 .and. side.eq.1) then
+         
+         do k = max(glo(3),dlo(3)), min(ghi(3),dhi(3)) 
+            do j = max(glo(2),dlo(2)), min(ghi(2),dhi(2)) 
+               do i = dhi(1)+1, ghi(1)
+                  do n = 1, nd
+                     d(i,j,k,n) = d(dhi(1),j,k,n)
+                  end do
+               end do
+            end do 
+         end do 
+         
+         do k = max(glo(3),dlo(3)), min(ghi(3)+1,dhi(3)+1) 
+            do j = max(glo(2),dlo(2)), min(ghi(2)+1,dhi(2)+1) 
+               do i = dhi(1)+2,ghi(1)+1
+                  ii = 2*(dhi(1)+1)-i
+                  x(i,j,k,1) = 2.*x(dhi(1)+1,j,k,1) - x(ii,j,k,1)
+                  x(i,j,k,2) = 2.*x(dhi(1)+1,j,k,2) - x(ii,j,k,2) 
+                  x(i,j,k,3) = 2.*x(dhi(1)+1,j,k,3) - x(ii,j,k,3) 
+               end do
+            end do 
+         end do 
+         
+      
+c     jlo conditions
+      else if (dir.eq.1 .and. side.eq.0) then
+         do k = max(glo(3),dlo(3)), min(ghi(3),dhi(3)) 
+            do j = glo(2), dlo(2)-1
+               do i = glo(1), ghi(1)
+                  do n = 1, nd
+                     d(i,j,k,n) = d(i,dlo(2),k,n)
+                  end do
+               end do
+            end do
+         end do 
+         
+         do k = max(glo(3),dlo(3)), min(ghi(3)+1,dhi(3)+1) 
+            do j = glo(2), dlo(2)-1
+               do i = glo(1), ghi(1)+1
+                  jj = 2*(dlo(2))-j
+                  x(i,j,k,1) = 2.*x(i,dlo(2),k,1) - x(i,jj,k,1)
+                  x(i,j,k,2) = 2.*x(i,dlo(2),k,2) - x(i,jj,k,2)
+                  x(i,j,k,3) = 2.*x(i,dlo(2),k,3) - x(i,jj,k,3)
+               end do
+            end do
+         end do 
+         
+c     jhi conditions
+      else if (dir.eq.1 .and. side.eq.1) then
+         
+         do k = max(glo(3),dlo(3)), min(ghi(3),dhi(3)) 
+            do j = dhi(2)+1, ghi(2)
+               do i = glo(1), ghi(1)
+                  do n = 1, nd
+                     d(i,j,k,n) = d(i,dhi(2),k,n)
+                  end do
+               end do
+            end do
+         end do 
+         
+         do k = max(glo(3),dlo(3)), min(ghi(3)+1,dhi(3)+1) 
+            do j = dhi(2)+2, ghi(2)+1
+               do i = glo(1), ghi(1)+1
+                  jj = 2*(dhi(2)+1)-j
+                  x(i,j,k,1) = 2.*x(i,dhi(2)+1,k,1) - x(i,jj,k,1)
+                  x(i,j,k,2) = 2.*x(i,dhi(2)+1,k,2) - x(i,jj,k,2)
+                  x(i,j,k,3) = 2.*x(i,dhi(2)+1,k,3) - x(i,jj,k,3)
+               end do
+            end do
+         end do 
+         
+c     klo conditions
+      else if (dir.eq.2 .and. side.eq.0) then
+         
+         do k = glo(3), dlo(3)-1
+            do j = glo(2), ghi(2)
+               do i = glo(1), ghi(1)
+                  do n = 1, nd
+                     d(i,j,k,n) = d(i,j,dlo(3),n)
+                  end do
+               end do
+            end do
+         end do
+         
+         do k = glo(3), dlo(3)-1
+            do j = glo(2), ghi(2)+1
+               do i = glo(1), ghi(1)+1
+                  kk = 2*(dlo(3))-k
+                  x(i,j,k,1) = 2.*x(i,j,dlo(3),1) - x(i,j,kk,1)
+                  x(i,j,k,2) = 2.*x(i,j,dlo(3),2) - x(i,j,kk,2)
+                  x(i,j,k,3) = 2.*x(i,j,dlo(3),3) - x(i,j,kk,3)
+               end do
+            end do
+         end do
+         
+c     khi conditions
+      else if (dir.eq.2 .and. side.eq.1) then
+         
+         do k = dhi(3)+1, ghi(3)
+            do j = glo(2), ghi(2)
+               do i = glo(1), ghi(1)
+                  do n = 1, nd
+                     d(i,j,k,n) = d(i,j,dhi(3),n)
+                  end do
+               end do
+            end do
+         end do
+         
+         do k = dhi(3)+2, ghi(3)+1
+            do j = glo(2), ghi(2)+1
+               do i = glo(1), ghi(1)+1
+                  kk = 2*(dhi(3)+1)-k
+                  x(i,j,k,1) = 2.*x(i,j,dhi(3)+1,1) - x(i,j,kk,1)
+                  x(i,j,k,2) = 2.*x(i,j,dhi(3)+1,2) - x(i,j,kk,2)
+                  x(i,j,k,3) = 2.*x(i,j,dhi(3)+1,3) - x(i,j,kk,3)
+               end do
+            end do
+         end do
+         
+      end if
+c
+c     end of subroutine
+c
+      return
+      end
+
+c---------------------------------------------------------------
+
+      subroutine getmyfacebdry(
+     &     d_ilo, d_ihi, d_jlo, d_jhi, d_klo, d_khi, d,  nd,
+     &     ifirst0, ilast0,
+     $     ifirst1, ilast1,
+     $     ifirst2, ilast2,      ! interior bounds
+     &     ibeg0, iend0,
+     $     ibeg1, iend1,
+     $     ibeg2, iend2,         ! bounds to fill
+     &     bdry_loc )
+c
+c     fill in the faces
+c
+c     input
+c
+      implicit none
+      integer nd
+      integer d_ilo,d_ihi,d_jlo,d_jhi,d_klo,d_khi
+      real*8 d(d_ilo:d_ihi,d_jlo:d_jhi,d_klo:d_khi,nd)
+
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      integer bdry_loc
+c
+c     locals
+c
+      include 'bc_common.f'
+      integer ic2, ic1, ic0, ict0, ict1, ict2, k
+      integer ipivot0, ipivot1, ipivot2
+c
+c     -------------------
+c
+      if ( (bdry_loc .eq. XLO).or.(bdry_loc .eq. XHI) ) then
+
+         if ( bdry_loc .eq. XLO ) then
+            ipivot0 = ifirst0
+         else
+            ipivot0 = ilast0
+         endif
+
+         do ic2=ibeg2,iend2
+            ict2 = ic2
+            do ic1=ibeg1,iend1
+               ict1 = ic1
+               do ic0=ibeg0,iend0
+                  ict0 = ipivot0
+                  do k=0,nd-1
+                     d(ic0,ic1,ic2,k) = d(ict0,ict1,ict2,k)
+                  enddo
+               enddo
+            enddo
+         enddo
+
+      else if ( (bdry_loc .eq. YLO).or.(bdry_loc .eq. YHI) ) then
+
+         if ( bdry_loc .eq. YLO ) then
+            ipivot1 = ifirst1
+         else
+            ipivot1 = ilast1
+         endif
+
+         do ic2 = ibeg2,iend2
+            ict2 = ic2
+            do ic1 = ibeg1,iend1
+               ict1 = ipivot1
+               do ic0 = ibeg0,iend0
+                  ict0 = ic0
+                  do k = 1, nd
+                     d(ic0,ic1,ic2,k)=d(ict0,ict1,ict2,k)
+                  enddo
+               enddo
+            enddo
+         enddo
+
+      else if ( (bdry_loc .eq. ZLO).or.(bdry_loc .eq. ZHI) ) then
+
+         if ( bdry_loc .eq. ZLO ) then
+            ipivot2 = ifirst2
+         else
+            ipivot2 = ilast2
+         endif
+
+         do ic2 = ibeg2,iend2
+            ict2 = ipivot2
+            do ic1 = ibeg1,iend1
+               ict1 = ic1
+               do ic0 = ibeg0,iend0
+                  ict0 = ic0
+                  do k = 1, nd
+                     d(ic0,ic1,ic2,k)=d(ict0,ict1,ict2,k)
+                  enddo
+               enddo
+            enddo
+         enddo
+
+      endif
+c
+c     end of subroutine
+c
+      return
+      end
+
+c---------------------------------------------------------------
+
+      subroutine getmyedgebdry(
+     &     d_ilo, d_ihi, d_jlo, d_jhi, d_klo, d_khi, d,  nd,
+     &     ifirst0, ilast0,
+     $     ifirst1, ilast1,
+     $     ifirst2, ilast2,      ! interior bounds
+     &     ibeg0, iend0,
+     $     ibeg1, iend1,
+     $     ibeg2, iend2,         ! bounds to fill
+     &     bdry_loc )
+c
+c     fill in the edges
+c
+c     input
+c
+      implicit none
+      integer nd
+      integer d_ilo,d_ihi,d_jlo,d_jhi,d_klo,d_khi
+      real*8 d(d_ilo:d_ihi,d_jlo:d_jhi,d_klo:d_khi,nd)
+
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      integer bdry_loc
+c
+c     locals
+c
+      include 'bc_common.f'
+      integer ic2, ic1, ic0, ict0, ict1, ict2
+      integer k
+      integer ipivot
+c
+c     ------------------- the i edges
+c
+      if (  (bdry_loc .eq. Y0Z0).or.
+     $     (bdry_loc .eq. Y1Z0).or.
+     &     (bdry_loc .eq. Y0Z1).or.
+     $     (bdry_loc .eq. Y1Z1) ) then
+
+         if ( bdry_loc .eq. Y0Z0 ) then
+            ipivot = ifirst1
+         else if ( bdry_loc .eq. Y1Z0 ) then
+            ipivot = ilast1
+         else if ( bdry_loc .eq. Y0Z1 ) then
+            ipivot = ifirst1
+         else
+            ipivot = ilast1
+         endif
+
+         do ic2 = ibeg2,iend2
+            ict2 = ic2
+            do ic1 = ibeg1,iend1
+               ict1 = ipivot
+               do ic0 = ibeg0,iend0
+                  ict0 = ic0
+                  do k = 1, nd
+                     d(ic0,ic1,ic2,k)=d(ict0,ict1,ict2,k)
+                  enddo
+               enddo
+            enddo
+         enddo
+c
+c     ------------------- the j edges
+c
+      else if ( 
+     $        (bdry_loc .eq. X0Z0).or.
+     $        (bdry_loc .eq. X0Z1).or.
+     &        (bdry_loc .eq. X1Z0).or.
+     $        (bdry_loc .eq. X1Z1) ) then
+
+         if ( bdry_loc .eq. X0Z0 ) then
+            ipivot = ifirst0
+         else if ( bdry_loc .eq. X0Z1 ) then
+            ipivot = ifirst0
+         else if ( bdry_loc .eq. X1Z0 ) then
+            ipivot = ilast0
+         else
+            ipivot = ilast0
+         endif
+
+         do ic2 = ibeg2,iend2
+            ict2 = ic2
+            do ic1 = ibeg1,iend1
+               ict1 = ic1
+               do ic0 = ibeg0,iend0
+                  ict0 = ipivot
+                  do k =1, nd
+                     d(ic0,ic1,ic2,k)=d(ict0,ict1,ict2,k)
+                  enddo
+               enddo
+            enddo
+         enddo
+
+c
+c     ------------------- the k edges
+c
+      else if ( 
+     $        (bdry_loc .eq. X0Y0).or.
+     $        (bdry_loc .eq. X1Y0).or.
+     &        (bdry_loc .eq. X0Y1).or.
+     $        (bdry_loc .eq. X1Y1) ) then
+
+         if ( bdry_loc .eq. X0Y0 ) then
+            ipivot = ifirst0
+         else if ( bdry_loc .eq. X1Y0 ) then
+            ipivot = ilast0
+         else if ( bdry_loc .eq. X0Y1 ) then
+            ipivot = ifirst0
+         else
+            ipivot = ilast0
+         endif
+
+         do ic2 = ibeg2,iend2
+            ict2 = ic2
+            do ic1 = ibeg1,iend1
+               ict1 = ic1
+               do ic0 = ibeg0,iend0
+                  ict0 = ipivot
+                  do k= 1, nd
+                     d(ic0,ic1,ic2,k)=d(ict0,ict1,ict2,k)
+                  enddo
+               enddo
+            enddo
+         enddo
+      
+      endif
+c
+c     end of subroutine
+c
+      return
+      end
+
+
+c-------------------------------------------------------------------------
+
+
+      subroutine getmynodebdry(
+     &     d_ilo, d_ihi, d_jlo, d_jhi, d_klo, d_khi, d,  nd,
+     &     ifirst0, ilast0,
+     $     ifirst1, ilast1,
+     $     ifirst2, ilast2,      ! interior bounds
+     &     ibeg0, iend0,
+     $     ibeg1, iend1,
+     $     ibeg2, iend2,         ! bounds to fill
+     &     bdry_loc )
+c
+c     fill in the nodes (corners)
+c
+      implicit none
+      integer nd
+      integer d_ilo,d_ihi,d_jlo,d_jhi,d_klo,d_khi
+      real*8 d(d_ilo:d_ihi,d_jlo:d_jhi,d_klo:d_khi,nd)
+
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      integer bdry_loc
+c
+c     locals
+c
+      include 'bc_common.f'
+      integer ic2, ic1, ic0, ict0, ict1, ict2, k
+      integer ipivot
+c
+c     -------------------
+c
+      if ( bdry_loc .eq. X0Y0Z0 ) then
+         ipivot = ifirst0
+
+      else if ( bdry_loc .eq. X1Y0Z0 ) then
+         ipivot = ilast0
+
+      else if ( bdry_loc .eq. X0Y1Z0 ) then
+         ipivot = ifirst0
+
+      else if ( bdry_loc .eq. X1Y1Z0 ) then
+         ipivot = ilast0
+
+      else if ( bdry_loc .eq. X0Y0Z1 ) then
+         ipivot = ifirst0
+
+      else if ( bdry_loc .eq. X1Y0Z1 ) then
+         ipivot = ilast0
+
+      else if ( bdry_loc .eq. X0Y1Z1 ) then
+         ipivot = ifirst0
+
+      else if ( bdry_loc .eq. X1Y1Z1 ) then
+         ipivot = ilast0
+
+      endif
+
+      do ic2 = ibeg2,iend2
+         ict2 = ic2
+         do ic1 = ibeg1, iend1
+            ict1 = ic1
+            do ic0 = ibeg0, iend0
+               ict0 = ipivot
+               do k= 1, nd
+                  d(ic0,ic1,ic2,k)=d(ict0,ict1,ict2,k)
+               enddo
+            enddo
+         enddo
+      enddo
+c
+c     end of subroutine
+c
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkEuler/example_inputs/cart_1blk.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkEuler/example_inputs/cart_1blk.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,245 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI LinAdv example problem 
+ *
+ ************************************************************************/
+MblkGeometry {
+   problem_type = "CARTESIAN"
+
+   CartesianGeometry {
+      domain_xlo_0 = 0.e0 , 0.e0 , 0.e0    // lower end of computational domain.
+      domain_xhi_0 = 30.e0 , 20.e0 , 20.e0  // upper end of computational domain.
+   }
+
+   refine_boxes_0_0 = [(5,5,5),(9,9,9)]
+}
+
+
+MblkLinAdv {
+
+   advection_velocity = 2.0e0 , 1.0e0 , 1.0e0
+   godunov_order    = 2                // order of Goduov slopes (1, 2, or 4)
+   corner_transport = "CORNER_TRANSPORT_1"  
+
+   data_problem      = "SPHERE" 
+
+   Initial_data {
+      radius            = 2.9   
+      center            = 5.5 , 5.5 , 5.5
+
+      uval_inside       = 80.0
+      uval_outside      = 5.0
+ 
+   }
+
+   Refinement_data {
+//      refine_criteria = "USER_DEFINED", "UVAL_GRADIENT", "UVAL_SHOCK"
+      refine_criteria = "USER_DEFINED"
+ 
+      UVAL_GRADIENT {
+         grad_tol = 10.0
+      }
+ 
+      UVAL_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "FLOW"
+      }
+
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+
+   }
+
+}
+
+Main {
+   dim = 3
+// log file parameters 
+   log_file_name    = "sphere-3d.log"
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_cart-1blk"
+   viz_dump_filename     = "cart-1blk"    // not used by VisIt
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+
+// restart dump parameters
+   restart_interval       = 0         // zero to turn off
+   restart_write_dirname  = "restart_cart-1blk"
+
+}
+
+TimerManager {
+   timer_list               = "apps::*::*",
+                              "algs::*::*",
+                              "mesh::*::*"
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+//   print_timer_overhead   = TRUE
+   print_threshold        = 0.0
+}
+
+
+Multiblock {
+   num_blocks = 1
+
+   // Geometries of the hierachy blocks
+   BlockGeometry0{
+      domain_boxes	= [ (0,0,0) , (29,19,19) ]
+   }
+
+   // Singularity defn and neighbors
+   Singularity0 {
+      blocks = 0
+      sing_box_0 = [(30,20,20),(30,20,20)]
+   }
+
+}
+
+
+
+
+PatchHierarchy {
+   max_levels = 2         // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 2 , 2 , 2
+      level_2 = 2 , 2 , 2
+      level_3 = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 40 , 40 , 40
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 9 , 9 , 9
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance    = 0.85e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.95e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.5e0    // max cfl factor used in problem
+   cfl_init                  = 0.5e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+TimeRefinementIntegrator{
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 25     // max number of simulation timesteps
+}
+
+LoadBalancer {
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkEuler/example_inputs/cdw.3d.inc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkEuler/example_inputs/cdw.3d.inc	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright
+ * information, see COPYRIGHT and COPYING.LESSER.
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   $Description
+ *
+ ************************************************************************/
+
+Multiblock {
+
+   num_blocks = 4
+
+   // Geometries of the hierachy blocks
+   BlockGeometry0 {
+       domain_boxes = [ (0,0,0) , (2,2,2) ]
+   }
+
+   BlockGeometry1 {
+       domain_boxes = [ (0,0,0) , (2,2,7) ]
+   }
+
+   BlockGeometry2 {
+       domain_boxes = [ (0,0,0) , (2,7,2) ]
+   }
+
+   BlockGeometry3 {
+       domain_boxes = [ (0,0,0) , (7,2,2) ]
+   }
+
+   // Singularity edge definition
+   Singularity0 {
+       blocks = 0, 1, 2
+       sing_box_0 = [ (0,3,3), (2,3,3) ]
+       sing_box_1 = [ (0,3,-1), (2,3,-1) ]
+       sing_box_2 = [ (0,-1,3), (2,-1,3) ]
+   }
+
+   Singularity1 {
+       blocks = 0, 1, 3
+       sing_box_0 = [ (3,0,3), (3,2,3) ]
+       sing_box_1 = [ (3,0,-1), (3,2,-1) ]
+       sing_box_3 = [ (-1,0,3), (-1,2,3) ]
+   }
+
+   Singularity2 {
+       blocks = 0, 2, 3
+       sing_box_0 = [ (3,3,0), (3,3,2) ]
+       sing_box_2 = [ (3,-1,0), (3,-1,2) ]
+       sing_box_3 = [ (-1,3,0), (-1,3,2) ]
+   }
+
+   Singularity3 {
+       blocks = 1, 2, 3
+       sing_box_1 = [ (3,3,0), (3,3,7) ]
+       sing_box_2 = [ (3,0,3), (3,7,3) ]
+       sing_box_3 = [ (0,3,3), (7,3,3) ]
+   }
+
+   // define face connectivity
+   BlockNeighbors0 {
+       block_a = 0
+       block_b = 1
+       rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+       point_in_a_space = 0, 0, 0
+       point_in_b_space = 0, 0, -3
+   }
+
+   BlockNeighbors1 {
+       block_a = 0
+       block_b = 2
+       rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+       point_in_a_space = 0, 0, 0
+       point_in_b_space = 0, -3, 0
+   }
+
+   BlockNeighbors2 {
+       block_a = 0
+       block_b = 3
+       rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+       point_in_a_space = 0, 0, 0
+       point_in_b_space = -3, 0, 0
+   }
+
+   BlockNeighbors3 {
+       block_a = 1
+       block_b = 2
+       rotation_b_to_a = "I_UP", "K_DOWN", "J_UP"
+       point_in_a_space = 0, 0, 0
+       point_in_b_space = 0, 0, 5
+   }
+
+   BlockNeighbors4 {
+       block_a = 1
+       block_b = 3
+       rotation_b_to_a = "K_DOWN", "J_UP", "I_UP"
+       point_in_a_space = 0, 0, 0
+       point_in_b_space = 0, 0, 5
+   }
+
+   BlockNeighbors5 {
+       block_a = 2
+       block_b = 3
+       rotation_b_to_a = "J_DOWN", "I_UP", "K_UP"
+       point_in_a_space = 0, 0, 0
+       point_in_b_space = 0, 5, 0
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkEuler/example_inputs/cdw.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkEuler/example_inputs/cdw.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,189 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright
+ * information, see COPYRIGHT and COPYING.LESSER.
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for the multiblock linear advector for advecting
+ *                a blob through a spherical shell
+ *
+ ************************************************************************/
+
+// -------------------------------------------------------------------
+//  problem setup
+// -------------------------------------------------------------------
+
+// ----------------- define the size of each block
+MLEVELS = 1
+
+MblkGeometry {
+   problem_type = "TRILINEAR"
+
+   TrilinearGeometry {
+      mesh_filename = "cdw.3d.mesh"
+   }
+
+}
+
+MblkEuler {
+
+   advection_test     = 1
+
+   // 0, cartesian, 1 R translation, 2 rigid body theta rotation, 4, rigid body phi rotation
+   advection_vel_type = 0
+	
+   // advection_velocity = 2.0e0 , 0.0e0 , 0.0e0
+   // advection_velocity = 0.0e0 , 2.0e0 , 0.0e0
+   advection_velocity = 2.0e0 , 0.0e0 , 0.0e0
+
+   data_problem      = "SPHERE"
+
+   // center            = xx, yy, zz     // middle of block 0
+   // center            = yy, xx, zz  // middle of block 1
+   // center               = xxx, yyy, zzz  // middle of block 2
+   // center            = 0.75 , 0.75, 0.75 // middle of the shell
+   // front_position    = 0.0, 0.2, 1.e20
+   
+   //center            = 8.0, 4.0, 4.0 // middle of the shell
+   //center            = 4.0, 8.0, 4.0 // middle of the shell
+   center            = 4.0, 4.0, 8.0 // middle of the shell
+   front_position    = 0.0, 1.5, 1.e20
+
+   // center            = 1.25, 1.25, 1.25 // middle of the shell
+   // front_position    = 0.0, 0.75, 1.e20
+
+   state_names = "rho"
+
+   state_data {
+      rho = 1.0, 0.0
+   }
+
+/*
+   state_names = "rho", "u", "v", "w", "p", "ss"
+
+   state_data {
+      rho = 1.0, 2.0
+      u   = 1.0, 0.0
+      v   = 1.0, 4.0
+      w   = 1.0, 0.0
+      p   = 1.0, 6.0
+      ss  = 1.0, 0.0
+   }
+*/
+
+   Refinement_data {
+      refine_criteria = "GRADIENT"
+
+      GRADIENT {
+         names = "rho"
+         rho   = 0.5
+      }
+   }
+
+}
+
+
+// -------------------------------------------------------------------
+//  hydro blocks
+// -------------------------------------------------------------------
+
+Main {
+   dim = 3
+// log file parameters 
+   log_file_name    = "cdw.log"
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_cdw"
+   viz_dump_filename     = "octant"    // not used by VisIt
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+
+// restart dump parameters
+   restart_interval       = 0         // zero to turn off
+   restart_write_dirname  = "restart_cdw"
+
+}
+
+
+TimerManager {
+   timer_list               = "apps::*::*",
+                              "algs::*::*",
+                              "mesh::*::*"
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+//   print_timer_overhead   = TRUE
+   print_threshold        = 0.0
+}
+
+
+PatchHierarchy {
+   max_levels = MLEVELS       // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 2 , 2 , 2
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm {
+
+   // efficiency_tolerance    = 0.85e0   // min % of tag cells in new patch level
+   // combine_efficiency      = 0.85e0   // chop box if sum of volumes of smaller
+   efficiency_tolerance    = 0.7e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.7e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.5e0    // max cfl factor used in problem
+   cfl_init                  = 0.5e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+
+TimeRefinementIntegrator{
+   tag_buffer           = 2, 2, 2 // number of zones used in the tag buffer
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 100    // max number of simulation timesteps
+}
+
+
+LoadBalancer {
+}
+
+
+// -------------------------------------------------------------------
+//  The mesh
+// -------------------------------------------------------------------
+
+#include "cdw.3d.inc"
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkEuler/example_inputs/cdw.3d.mesh
Binary file source/test/MblkEuler/example_inputs/cdw.3d.mesh has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkEuler/example_inputs/octant_cart.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkEuler/example_inputs/octant_cart.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,263 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for the multiblock linear advector for 
+ *                advecting a blob through a spherical shell
+ *
+ ************************************************************************/
+
+// -------------------------------------------------------------------
+//  problem setup
+// -------------------------------------------------------------------
+
+// ----------------- define the size of each block
+NRAD    = 10 // 4
+NRADM   = NRAD - 1
+MLEVELS = 2
+
+MblkGeometry {
+   problem_type = "SPHERICAL_SHELL"
+
+   ShellGeometry {
+      rmin = 1.e0 
+      rmax = 2.e0 
+
+      shell_type = "OCTANT"
+   }
+
+
+   // The refinement boxes are specified here because the MultiblockGriddingAlg does not have any
+   // way to take in refinement boxes for multiple blocks.  The format is "refine_boxes[block][lev]".
+   // level 0
+   // refine_boxes_0_0 = [(5,0,0),(5,9,9)]
+   // refine_boxes_1_0 = [(5,0,0),(5,9,9)]
+   // refine_boxes_2_0 = [(5,0,0),(5,9,9)]
+   // level 1
+   // refine_boxes_0_1 = [(20,0,0),(20,39,39)]
+   // refine_boxes_1_1 = [(20,0,0),(20,39,39)]
+   // refine_boxes_2_1 = [(20,0,0),(20,39,39)]
+}
+
+// -------------- some calculations for placing the blob in the middle of each octant
+r    = 1.5
+pi   = 3.14159265358979
+pio8 = pi/8
+pio4 = pi/4
+phi1 = 3.0*pi/8.0
+xx   = r*cos(pio8)*cos(pio8)
+yy   = r*sin(pio8)*cos(pio8)
+zz   = r*sin(pio8)
+
+xxx   = r*cos(pio4)*cos(phi1)
+yyy   = r*sin(pio4)*cos(phi1)
+zzz   = r*sin(phi1)
+
+MblkEuler {
+
+   advection_test     = 1
+
+   // 0, cartesian, 1 R translation, 2 rigid body theta rotation, 4, rigid body phi rotation
+   advection_vel_type = 0
+	
+   // advection_velocity = 2.0e0 , 0.0e0 , 0.0e0
+   // advection_velocity = 0.0e0 , 2.0e0 , 0.0e0
+   advection_velocity = 0.0e0 , 0.0e0 , 2.0e0
+
+   data_problem      = "SPHERE"
+
+   // center            = xx, yy, zz     // middle of block 0
+   // center            = yy, xx, zz  // middle of block 1
+   // center               = xxx, yyy, zzz  // middle of block 2
+   // center            = 0.75 , 0.75, 0.75 // middle of the shell
+   // front_position    = 0.0, 0.2, 1.e20
+   
+   center            = 0.75 , 0.75, 0.75 // middle of the shell
+   front_position    = 0.0, 0.2, 1.e20
+
+   state_names = "rho"
+
+   state_data {
+      rho = 1.0, 2.0
+   }
+
+/*
+   state_names = "rho", "u", "v", "w", "p", "ss"
+
+   state_data {
+      rho = 1.0, 2.0
+      u   = 1.0, 0.0
+      v   = 1.0, 4.0
+      w   = 1.0, 0.0
+      p   = 1.0, 6.0
+      ss  = 1.0, 0.0
+   }
+*/
+
+   Refinement_data {
+      refine_criteria = "GRADIENT"
+
+      GRADIENT {
+         names = "rho"
+         rho   = 0.5
+      }
+   }
+
+}
+
+
+// -------------------------------------------------------------------
+//  hydro blocks
+// -------------------------------------------------------------------
+
+Main {
+   dim = 3
+// log file parameters 
+   log_file_name    = "octant.log"
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_octant-cart"
+   viz_dump_filename     = "octant"    // not used by VisIt
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+
+// restart dump parameters
+   restart_interval       = 0         // zero to turn off
+   restart_write_dirname  = "restart_octant"
+
+}
+
+
+TimerManager {
+   timer_list               = "apps::*::*",
+                              "algs::*::*",
+                              "mesh::*::*"
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+//   print_timer_overhead   = TRUE
+   print_threshold        = 0.0
+}
+
+
+PatchHierarchy {
+   max_levels = MLEVELS       // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 2 , 2 , 2
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+   // efficiency_tolerance    = 0.85e0   // min % of tag cells in new patch level
+   // combine_efficiency      = 0.85e0   // chop box if sum of volumes of smaller
+   efficiency_tolerance    = 0.7e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.7e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.5e0    // max cfl factor used in problem
+   cfl_init                  = 0.5e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+
+TimeRefinementIntegrator{
+   tag_buffer           = 2, 2, 2 // number of zones used in the tag buffer
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 100    // max number of simulation timesteps
+}
+
+
+LoadBalancer {
+}
+
+
+// -------------------------------------------------------------------
+//  The mesh
+// -------------------------------------------------------------------
+
+
+Multiblock {
+   num_blocks = 3
+
+   // Geometries of the hierachy blocks
+   BlockGeometry0{
+      domain_boxes	= [ (0,0,0) , (NRADM,NRADM,NRADM) ]
+   }
+   BlockGeometry1{
+      domain_boxes	= [ (0,0,0) , (NRADM,NRADM,NRADM) ]
+   }
+   BlockGeometry2{
+      domain_boxes	= [ (0,0,0) , (NRADM,NRADM,NRADM) ]
+   }
+
+   // Singularity defn and neighbors
+   Singularity0 {
+      blocks = 0 , 1 , 2
+      sing_box_0 = [ (0,NRAD,NRAD), (NRADM,NRAD,NRAD) ]
+      sing_box_1 = [ (0,-1,  NRAD), (NRADM,-1,  NRAD) ]
+      sing_box_2 = [ (0,NRAD,NRAD), (NRADM,NRAD,NRAD) ]
+   }
+
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP" 
+      point_in_a_space = 0, NRAD, 0
+      point_in_b_space = 0, 0,    0
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      // j index in block a is k up in block b index
+      rotation_b_to_a = "I_UP", "K_UP" , "J_DOWN"
+      point_in_a_space = 0, 0, NRAD
+      point_in_b_space = 0, NRADM, 0
+   }
+
+   BlockNeighbors2 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "I_UP", "J_DOWN" , "K_DOWN"
+      point_in_a_space = 0, 0, NRAD
+      point_in_b_space = 0, NRADM , NRADM
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkEuler/example_inputs/wedge_1blk.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkEuler/example_inputs/wedge_1blk.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,249 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI LinAdv example problem 
+ *
+ ************************************************************************/
+MblkGeometry {
+   problem_type = "WEDGE"
+
+   WedgeGeometry {
+      rmin_0 = 1.e0 
+      rmax_0 = 2.e0 
+
+      pi     = 3.14159265358979325873406851315
+      thmin  = -30 * pi/180 // should be in radians
+      thmax  = 30 * pi/180
+
+      zmin   = 0.
+      zmax   = 2.
+
+   }
+}
+
+
+MblkEuler {
+
+   advection_test = 1
+
+   advection_velocity = 2.0e0 , 0.1e0 , 0.1e0
+   godunov_order    = 2                // order of Goduov slopes (1, 2, or 4)
+   corner_transport = "CORNER_TRANSPORT_1"  
+
+   data_problem      = "SPHERE" 
+
+   Initial_data {
+      radius            = 0.75 
+      center            = 1.25 , -0.5 , 1.0
+
+      uval_inside       = 80.0
+      uval_outside      = 5.0
+ 
+   }
+
+   Refinement_data {
+      refine_criteria = "UVAL_GRADIENT", "UVAL_SHOCK"
+ 
+      UVAL_GRADIENT {
+         grad_tol = 10.0
+      }
+ 
+      UVAL_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "FLOW"
+      }
+
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+
+   }
+
+}
+
+Main {
+   dim = 3
+// log file parameters 
+   log_file_name    = "wedge.log"
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_wedge"
+   viz_dump_filename     = "wedge"    // not used by VisIt
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+
+// restart dump parameters
+   restart_interval       = 0         // zero to turn off
+   restart_write_dirname  = "restart_wedge"
+
+}
+
+TimerManager {
+   timer_list               = "apps::*::*",
+                              "algs::*::*",
+                              "mesh::*::*"
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+//   print_timer_overhead   = TRUE
+   print_threshold        = 0.0
+}
+
+
+Multiblock {
+   num_blocks = 1
+
+   // Geometries of the hierachy blocks
+   BlockGeometry0{
+      domain_boxes	= [ (0,0,0) , (29,19,19) ]
+   }
+
+   // Singularity defn and neighbors
+   Singularity0 {
+      blocks = 0
+      sing_box_0 = [(30,20,20),(30,20,20)]
+   }
+
+}
+
+PatchHierarchy {
+   max_levels = 1         // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 2 , 2 , 2
+      level_2 = 2 , 2 , 2
+      level_3 = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 40 , 40 , 40
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 9 , 9 , 9
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm{
+
+   efficiency_tolerance    = 0.85e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.95e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.9e0    // max cfl factor used in problem
+   cfl_init                  = 0.9e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+TimeRefinementIntegrator{
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 25     // max number of simulation timesteps
+}
+
+LoadBalancer {
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkEuler/main.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkEuler/main.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,519 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Run multiblock Euler AMR
+ *
+ ************************************************************************/
+
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string>
+#include <fstream>
+using namespace std;
+
+#ifndef _MSC_VER
+#include <unistd.h>
+#endif
+
+#include <sys/stat.h>
+
+// Headers for basic SAMRAI objects
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/InputDatabase.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+// Headers for major algorithm/data structure objects
+
+#include "SAMRAI/mesh/BergerRigoutsos.h"
+#include "SAMRAI/geom/BlockGridGeometry.h"
+#include "SAMRAI/mesh/MultiblockGriddingAlgorithm.h"
+#include "MblkHyperbolicLevelIntegrator.h"
+#include "SAMRAI/mesh/TreeLoadBalancer.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/MultiblockPatchHierarchy.h"
+#include "SAMRAI/mesh/StandardTagAndInitialize.h"
+#include "SAMRAI/algs/TimeRefinementIntegrator.h"
+#include "SAMRAI/algs/TimeRefinementLevelStrategy.h"
+#include "SAMRAI/appu/VisItDataWriter.h"
+
+// Header for application-specific algorithm/data structure object
+
+#include "MblkEuler.h"
+
+using namespace SAMRAI;
+
+void
+setupHierarchy(
+   tbox::Pointer<tbox::Database> main_input_db,
+   const tbox::Dimension& dim,
+   tbox::Pointer<hier::MultiblockGridGeometry>& geometry,
+   tbox::Pointer<hier::MultiblockPatchHierarchy>& mblk_hierarchy);
+
+//
+// ===================================== The main code =======================
+//
+
+int main(
+   int argc,
+   char* argv[])
+{
+   //
+   // initialize startup
+   //
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   string input_filename;
+   string restart_read_dirname;
+   int restore_num = 0;
+
+   bool is_from_restart = false;
+
+   if ((argc != 2) && (argc != 4)) {
+      tbox::pout << "USAGE:  " << argv[0] << " <input filename> "
+                                          <<
+      "<restart dir> <restore number> [options]\n"
+                                          << "  options:\n"
+                                          << "  none at this time"
+                                          << endl;
+      tbox::SAMRAI_MPI::abort();
+      return -1;
+   } else {
+      input_filename = argv[1];
+      if (argc == 4) {
+         restart_read_dirname = argv[2];
+         restore_num = atoi(argv[3]);
+
+         is_from_restart = true;
+      }
+   }
+
+   //
+   // fire up the log file
+   //
+   string log_file_name = "MblkEuler.log";
+   bool log_all_nodes = false;
+   if (log_all_nodes) {
+      tbox::PIO::logAllNodes(log_file_name);
+   } else {
+      tbox::PIO::logOnlyNodeZero(log_file_name);
+   }
+
+   tbox::plog << "input_filename       = " << input_filename << endl;
+   tbox::plog << "restart_read_dirname = " << restart_read_dirname << endl;
+   tbox::plog << "restore_num          = " << restore_num << endl;
+
+   //
+   // Create input database and parse all data in input file.
+   //
+
+   tbox::Pointer<tbox::Database> input_db(new tbox::InputDatabase("input_db"));
+   tbox::InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+   tbox::plog << "---- done parsing input file" << endl << endl;
+
+   //
+   // Retrieve "GlobalInputs" section of the input database and set
+   // values accordingly.
+   //
+   if (input_db->keyExists("GlobalInputs")) {
+      tbox::Pointer<tbox::Database> global_db =
+         input_db->getDatabase("GlobalInputs");
+//      if (global_db->keyExists("tag_clustering_method")) {
+//	 string tag_clustering_method =
+//	    global_db->getString("tag_clustering_method");
+//	 mesh::BergerRigoutsos::setClusteringOption(tag_clustering_method);
+//     }
+      if (global_db->keyExists("call_abort_in_serial_instead_of_exit")) {
+         bool flag = global_db->
+            getBool("call_abort_in_serial_instead_of_exit");
+         tbox::SAMRAI_MPI::setCallAbortInSerialInsteadOfExit(flag);
+      }
+   }
+
+   //
+   // Retrieve "Main" section of the input database.  First, read dump
+   // information, which is used for writing plot files.  Second, if
+   // proper restart information was given on command line, and the
+   // restart interval is non-zero, create a restart database.
+   //
+   tbox::Pointer<tbox::Database> main_db = input_db->getDatabase("Main");
+
+   const tbox::Dimension dim(static_cast<unsigned short>(main_db->getInteger("dim")));
+
+   //
+   //..Initialize VisIt
+   //
+   int viz_dump_interval = 0;
+   if (main_db->keyExists("viz_dump_interval")) {
+      viz_dump_interval = main_db->getInteger("viz_dump_interval");
+   }
+
+   string viz_dump_dirname = "";
+   string visit_dump_dirname = "";
+   int visit_number_procs_per_file = 1;
+
+   if (viz_dump_interval > 0) {
+      if (main_db->keyExists("viz_dump_dirname")) {
+         viz_dump_dirname = main_db->getString("viz_dump_dirname");
+      }
+      visit_dump_dirname = viz_dump_dirname;
+      if (viz_dump_dirname.empty()) {
+         TBOX_ERROR("main(): "
+            << "\nviz_dump_dirname is null ... "
+            << "\nThis must be specified for use with VisIt"
+            << endl);
+      }
+      if (main_db->keyExists("visit_number_procs_per_file")) {
+         visit_number_procs_per_file =
+            main_db->getInteger("visit_number_procs_per_file");
+      }
+   }
+
+   const bool viz_dump_data = (viz_dump_interval > 0);
+
+   int restart_interval = 0;
+   if (main_db->keyExists("restart_interval")) {
+      restart_interval = main_db->getInteger("restart_interval");
+   }
+
+   string restart_write_dirname;
+   if (restart_interval > 0) {
+      if (main_db->keyExists("restart_write_dirname")) {
+         restart_write_dirname = main_db->getString("restart_write_dirname");
+      } else {
+         TBOX_ERROR("restart_interval > 0, but key `restart_write_dirname'"
+            << " not specifed in input file");
+      }
+   }
+
+   bool use_refined_timestepping = true;
+   if (main_db->keyExists("timestepping")) {
+      string timestepping_method = main_db->getString("timestepping");
+      if (timestepping_method == "SYNCHRONIZED") {
+         use_refined_timestepping = false;
+      }
+   }
+
+   const bool write_restart = (restart_interval > 0)
+      && !(restart_write_dirname.empty());
+
+   //
+   // Get restart manager and root restart database.  If run is from
+   // restart, open the restart file.
+   //
+   tbox::RestartManager* restart_manager = tbox::RestartManager::getManager();
+
+   if (is_from_restart) {
+      restart_manager->
+      openRestartFile(restart_read_dirname, restore_num,
+         mpi.getSize());
+   }
+
+   //
+   // Setup the timer manager to trace timing statistics during execution
+   // of the code.  The list of timers is given in the TimerManager
+   // section of the input file.  Timing information is stored in the
+   // restart file.  Timers will automatically be initialized to their
+   // previous state if the run is restarted, unless they are explicitly
+   // reset using the TimerManager::resetAllTimers() routine.
+   //
+
+   tbox::TimerManager::createManager(input_db->getDatabase("TimerManager"));
+
+   //
+   // CREATE THE MULTIBLOCK HIERARCHY
+   //
+   tbox::Pointer<hier::MultiblockPatchHierarchy> mblk_patch_hierarchy;
+   tbox::Pointer<hier::MultiblockGridGeometry> geom;
+
+   setupHierarchy(input_db,
+      dim,
+      geom,
+      mblk_patch_hierarchy);
+
+   //
+   // -------------------- the patch operations --------------
+   //
+   MblkEuler* euler_model = new MblkEuler("MblkEuler",
+         dim,
+         input_db,
+         geom->getBlockGeometryArray());
+
+   //
+   // -------------------- the multiphase level operations --------------
+   //
+   tbox::Pointer<MblkHyperbolicLevelIntegrator> mblk_hyp_level_integrator(
+      new MblkHyperbolicLevelIntegrator(
+         "HyperbolicLevelIntegrator",
+         dim,
+         input_db->getDatabase("HyperbolicLevelIntegrator"),
+         euler_model,
+         mblk_patch_hierarchy,
+         true,
+         use_refined_timestepping));
+
+   //
+   // -------------------- the mesh refinement operations --------------
+   //
+   tbox::Pointer<mesh::StandardTagAndInitialize> error_detector(
+      new mesh::StandardTagAndInitialize(dim,
+         "StandardTagAndInitialize",
+         mblk_hyp_level_integrator,
+         input_db->getDatabase("StandardTagAndInitialize")));
+
+   tbox::Pointer<mesh::BergerRigoutsos> box_generator(new mesh::BergerRigoutsos(
+                                                         dim));
+
+   tbox::Pointer<mesh::TreeLoadBalancer> load_balancer(
+      new mesh::TreeLoadBalancer(dim, "TreeLoadBalancer", input_db->getDatabase(
+            "TreeLoadBalancer")));
+   load_balancer->setSAMRAI_MPI(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   tbox::Pointer<mesh::MultiblockGriddingAlgorithm>
+   mblk_gridding_algorithm(
+      new mesh::MultiblockGriddingAlgorithm(mblk_patch_hierarchy,
+         "MultiblockGriddingAlgorithm",
+         input_db->getDatabase("GriddingAlgorithm"),
+         error_detector,
+         box_generator,
+         load_balancer,
+         load_balancer));
+
+   tbox::Pointer<algs::TimeRefinementIntegrator> time_integrator(
+      new algs::TimeRefinementIntegrator("TimeRefinementIntegrator",
+         input_db->getDatabase("TimeRefinementIntegrator"),
+         mblk_patch_hierarchy,
+         mblk_hyp_level_integrator,
+         mblk_gridding_algorithm));
+
+#ifdef HAVE_HDF5
+   //
+   // ----------------------------- Set up Visualization writer(s).
+   //
+   bool is_multiblock = true;
+   tbox::Pointer<appu::VisItDataWriter> visit_data_writer(
+      new appu::VisItDataWriter(dim,
+         "MblkEuler VisIt Writer",
+         visit_dump_dirname,
+         visit_number_procs_per_file,
+         is_multiblock));
+   euler_model->
+   registerVisItDataWriter(visit_data_writer);
+#endif
+
+   //
+   // Initialize hierarchy configuration and data on all patches.
+   // Then, close restart file and write initial state for visualization.
+   //
+   double dt_now = time_integrator->initializeHierarchy();
+
+   tbox::RestartManager::getManager()->closeRestartFile();
+
+   //
+   // After creating all objects and initializing their state, we
+   // print the input database and variable database contents
+   // to the log file.
+   //
+   tbox::plog << "\nCheck input data and variables before simulation:" << endl;
+   tbox::plog << "Input database..." << endl;
+   input_db->printClassData(tbox::plog);
+   tbox::plog << "\nVariable database..." << endl;
+   hier::VariableDatabase::getDatabase()->printClassData(tbox::plog);
+
+   tbox::plog << "\nPrinting a summary of model input... " << endl;
+   euler_model->printClassData(tbox::plog);
+
+#ifdef HAVE_HDF5
+   if (viz_dump_data) {
+      visit_data_writer->writePlotData(
+         mblk_patch_hierarchy,
+         time_integrator->getIntegratorStep(),
+         time_integrator->getIntegratorTime());
+   }
+#endif
+
+   //
+   // ==============================================================
+   // Time step loop.  Note that the step count and integration
+   // time are maintained by TimeRefinementIntegrator.
+   // ==============================================================
+   //
+
+   double loop_time = time_integrator->getIntegratorTime();
+   double loop_time_end = time_integrator->getEndTime();
+
+   int iteration_num = time_integrator->getIntegratorStep();
+
+   int old_log_style = 1;
+
+   while ((loop_time < loop_time_end) && time_integrator->stepsRemaining()) {
+
+      iteration_num = time_integrator->getIntegratorStep() + 1;
+
+      if (old_log_style) {
+         tbox::pout << "++++++++++++++++++++++++++++++++++++++++++++" << endl;
+         tbox::pout << "At begining of timestep # " << iteration_num - 1
+                    << endl;
+         tbox::pout << "Simulation time is " << loop_time << endl;
+      }
+
+      //
+      // advance the heirarchy a timestep
+      //
+      double dt_new = time_integrator->advanceHierarchy(dt_now);
+
+      loop_time += dt_now;
+      dt_now = dt_new;
+
+      if (!old_log_style) {
+         //
+         // write out the timestep header
+         //
+         char my_line[256];
+         sprintf(my_line, "%4d time: %9.5e dt: %10.6e  ",
+            iteration_num,
+            loop_time,
+            dt_new);
+
+         tbox::pout << my_line << endl;
+      }
+
+      if (old_log_style) {
+         tbox::pout << "At end of timestep # " << iteration_num - 1 << endl;
+         tbox::pout << "Simulation time is " << loop_time << endl;
+         tbox::pout << "++++++++++++++++++++++++++++++++++++++++++++" << endl;
+      }
+
+      //
+      // At specified intervals, write restart files.
+      //
+      if (write_restart) {
+
+         if ((iteration_num % restart_interval) == 0) {
+            tbox::RestartManager::getManager()->
+            writeRestartFile(restart_write_dirname,
+               iteration_num);
+         }
+      }
+
+#ifdef HAVE_HDF5
+      //
+      // At specified intervals, write out data files for plotting.
+      //
+      if (viz_dump_data) {
+         if ((iteration_num % viz_dump_interval) == 0) {
+            visit_data_writer->writePlotData(mblk_patch_hierarchy,
+               iteration_num,
+               loop_time);
+         }
+      }
+#endif
+
+   }   //-----------------------------------------------END TIME STEPPING LOOP
+
+   //
+   // Output timer results.
+   //
+   tbox::TimerManager::getManager()->print(tbox::plog);
+
+   //
+   // At conclusion of simulation, deallocate objects.
+   //
+#ifdef HAVE_HDF5
+   visit_data_writer.setNull();
+#endif
+   time_integrator.setNull();
+   mblk_gridding_algorithm.setNull();
+   load_balancer.setNull();
+   box_generator.setNull();
+   error_detector.setNull();
+   mblk_hyp_level_integrator.setNull();
+
+   if (euler_model) delete euler_model;
+
+   mblk_patch_hierarchy.setNull();
+   geom.setNull();
+
+   input_db.setNull();
+   main_db.setNull();
+
+   tbox::pout << "\nPASSED:  MblkEuler" << endl;
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return 0;
+}
+
+// ----------------------------------------------------------------
+
+//
+// this function builds the skeleton grid geometry
+//
+void setupHierarchy(
+   tbox::Pointer<tbox::Database> main_input_db,
+   const tbox::Dimension& dim,
+   tbox::Pointer<hier::MultiblockGridGeometry>& geometry,
+   tbox::Pointer<hier::MultiblockPatchHierarchy>& mblk_hierarchy)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!main_input_db.isNull());
+#endif
+
+   tbox::Pointer<tbox::Database> mult_db =
+      main_input_db->getDatabase("MultiblockPatchHierarchy");
+
+   int num_blocks = mult_db->getInteger("num_blocks");
+
+   tbox::Array<tbox::Pointer<hier::GridGeometry> > geoms(num_blocks);
+
+   /*
+    * Read the geometry information and build array of geometries
+    */
+
+   char geom_name[32];
+
+   for (int nb = 0; nb < num_blocks; nb++) {
+
+      sprintf(geom_name, "BlockGeometry%d", nb);
+      if (mult_db->keyExists(geom_name)) {
+         geoms[nb] =
+            new geom::BlockGridGeometry(
+               dim,
+               geom_name,
+               mult_db->getDatabase(geom_name),
+               nb);
+      } else {
+         TBOX_ERROR("main::setupHierarchy(): could not find entry `"
+            << geom_name << "' in input.");
+      }
+   }
+
+   geometry = new hier::MultiblockGridGeometry(geoms);
+
+   mblk_hierarchy =
+      new hier::MultiblockPatchHierarchy("MultiblockPatchHierarchy",
+         mult_db, geometry, true);
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkEuler/skelbdry.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkEuler/skelbdry.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1414 @@
+c
+c***********************************************************************
+c***********************************************************************
+      subroutine getskelfacebdry3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,
+     &  ngc0,ngc1,ngc2,
+     &  dx,
+     &  bdry_loc,
+     &  bdry_cond,
+     &  face_values,
+     &  arrdata,
+     &  arrdepth)
+c***********************************************************************
+      implicit none
+c
+c  File:        appu_cartbdryparams3d.i
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    
+c  Modified:    
+c  Description: m4 include file for 3d boundary constant common blocks
+c
+      common/skelbdrylocparams3d/
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT, 
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1
+      integer
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT,
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1  
+c
+c
+      common/skelbdrycondparams3d/
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+      integer
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+c***********************************************************************
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      integer ngc0,ngc1,ngc2
+c
+      double precision dx(0:3-1)
+c
+      integer bdry_loc,
+     &        arrdepth, 
+     &        bdry_cond
+      double precision
+     &        face_values(0:arrdepth-1,0:2*3-1)
+c
+      double precision
+     &  arrdata(ifirst0-ngc0:ilast0+ngc0,
+     &          ifirst1-ngc1:ilast1+ngc1,
+     &          ifirst2-ngc2:ilast2+ngc2,0:arrdepth-1)
+c
+      integer ic2,ic1,ic0,ict0,ict1,ict2
+      integer k
+      integer ipivot0,ipivot1,ipivot2
+      integer face_loc
+      double precision    dirsign0,dirsign1,dirsign2
+c
+c***********************************************************************
+c   bdry_loc   index     bdry_loc    index     bdry_loc   index
+c       0     (-1, 0, 0)     2     (0,-1, 0)      4     (0, 0,-1)
+c       1     ( 1, 0, 0)     3     (0, 1, 0)      5     (0, 0, 1)
+c***********************************************************************
+c***********************************************************************
+      face_loc = bdry_loc
+      if ((bdry_loc.eq.XLEFT).or.(bdry_loc.eq.XRIGHT)) then
+         if (bdry_loc.eq.XLEFT) then
+c                             x0 boundary
+            ipivot0  = ifirst0
+            dirsign0 = -1.d0 
+         else
+c                             x1 boundary
+            ipivot0  = ilast0
+            dirsign0 = 1.d0 
+         endif
+           if (bdry_cond.eq.DIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.NEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign0
+     &       * face_values(k,face_loc) * dble(ic0-ict0) * dx(0)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.FLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.REFLECT) then
+             do ic2=ibeg2,iend2
+              ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,0)= -arrdata(ic0,ic1,ic2,0)
+                 enddo
+               enddo
+             enddo
+          else
+             write(6,*) "INVALID FACE bdry_cond in getskelfacebdry3d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+          endif
+      else if ((bdry_loc.eq.YLEFT).or.(bdry_loc.eq.YRIGHT)) then
+         if (bdry_loc.eq.YLEFT) then
+c                             y0 boundary
+            ipivot1  = ifirst1
+            dirsign1 = -1.d0 
+         else
+c                             y1 boundary
+            ipivot1  = ilast1
+            dirsign1 = 1.d0 
+         endif
+           if (bdry_cond.eq.DIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.NEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign1
+     &       * face_values(k,face_loc) * dble(ic1-ict1) * dx(1)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.FLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.REFLECT) then
+             do ic2=ibeg2,iend2
+              ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,1)= -arrdata(ic0,ic1,ic2,1)
+                 enddo
+               enddo
+             enddo
+          else
+             write(6,*) "INVALID FACE bdry_cond in getskelfacebdry3d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+          endif
+      else if ((bdry_loc.eq.ZLEFT).or.(bdry_loc.eq.ZRIGHT)) then
+         if (bdry_loc.eq.ZLEFT) then
+c                             z0 boundary
+            ipivot2  = ifirst2
+            dirsign2 = -1.d0 
+         else
+c                             z1 boundary
+            ipivot2  = ilast2
+            dirsign2 = 1.d0 
+         endif
+           if (bdry_cond.eq.DIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.NEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign2
+     &       * face_values(k,face_loc) * dble(ic2-ict2) * dx(2)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.FLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.REFLECT) then
+             do ic2=ibeg2,iend2
+              ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,2)= -arrdata(ic0,ic1,ic2,2)
+                 enddo
+               enddo
+             enddo
+          else
+             write(6,*) "INVALID FACE bdry_cond in getskelfacebdry3d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+          endif
+      endif
+c
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine getskeledgebdry3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,
+     &  ngc0,ngc1,ngc2,
+     &  dx,
+     &  bdry_loc,
+     &  bdry_cond,
+     &  face_values,
+     &  arrdata,
+     &  arrdepth)
+c***********************************************************************
+      implicit none
+c
+c  File:        appu_skelbdryparams3d.i
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    
+c  Modified:    
+c  Description: m4 include file for 3d boundary constant common blocks
+c
+      common/skelbdrylocparams3d/
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT, 
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1
+      integer
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT,
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1  
+c
+c
+      common/skelbdrycondparams3d/
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+      integer
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+c***********************************************************************
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      integer ngc0,ngc1,ngc2
+c
+      double precision dx(0:3-1)
+c
+      integer bdry_loc,
+     &        arrdepth,
+     &        bdry_cond
+      double precision
+     &        face_values(0:arrdepth-1,0:2*3-1)
+c
+      double precision
+     &  arrdata(ifirst0-ngc0:ilast0+ngc0,
+     &          ifirst1-ngc1:ilast1+ngc1,
+     &          ifirst2-ngc2:ilast2+ngc2,0:arrdepth-1)
+c
+      integer ic2,ic1,ic0,ict0,ict1,ict2
+      integer k
+      integer ipivot0,ipivot1,ipivot2
+      integer face_loc0,face_loc1,face_loc2
+      double precision    dirsign0,dirsign1,dirsign2
+c
+c***********************************************************************
+c***********************************************************************
+c    bdry_loc   index    bdry_loc   index     bdry_loc   index
+c       0     (0,-1,-1)      4     (-1,0,-1)      8     (-1,-1,0)
+c       1     (0, 1,-1)      5     (-1,0, 1)      9     ( 1,-1,0)
+c       2     (0,-1, 1)      6     ( 1,0,-1)     10     (-1, 1,0)
+c       3     (0, 1, 1)      7     ( 1,0, 1)     11     ( 1, 1,0)
+c***********************************************************************
+c***********************************************************************
+      if ((bdry_loc.eq.Y0Z0).or.(bdry_loc.eq.Y1Z0).or.
+     &    (bdry_loc.eq.Y0Z1).or.(bdry_loc.eq.Y1Z1)) then
+         if (bdry_loc.eq.Y0Z0) then
+            face_loc1 = YLEFT
+            ipivot1   = ifirst1
+            dirsign1  = -1.d0
+            face_loc2 = ZLEFT
+            ipivot2   = ifirst2
+            dirsign2  = -1.d0
+         else if (bdry_loc.eq.Y1Z0) then
+            face_loc1 = YRIGHT
+            ipivot1   = ilast1
+            dirsign1  = 1.d0
+            face_loc2 = ZLEFT
+            ipivot2   = ifirst2
+            dirsign2  = -1.d0
+         else if (bdry_loc.eq.Y0Z1) then
+            face_loc1 = YLEFT
+            ipivot1   = ifirst1
+            dirsign1  = -1.d0
+            face_loc2 = ZRIGHT
+            ipivot2   = ilast2
+            dirsign2  = 1.d0
+         else
+            face_loc1 = YRIGHT
+            ipivot1   = ilast1
+            dirsign1  = 1.d0
+            face_loc2 = ZRIGHT
+            ipivot2   = ilast2
+            dirsign2  = 1.d0
+         endif
+           if (bdry_cond.eq.XDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc0)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc1)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc2)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign0
+     &       * face_values(k,face_loc0) * dble(ic0-ict0) * dx(0)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign1
+     &       * face_values(k,face_loc1) * dble(ic1-ict1) * dx(1)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign2
+     &       * face_values(k,face_loc2) * dble(ic2-ict2) * dx(2)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,0)= -arrdata(ic0,ic1,ic2,0)
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,1)= -arrdata(ic0,ic1,ic2,1)
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,2)= -arrdata(ic0,ic1,ic2,2)
+                   enddo
+                enddo
+             enddo
+           else
+             write(6,*) "INVALID EDGE bdry_cond in getskeledgebdry3d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+           endif
+      else if ((bdry_loc.eq.X0Z0).or.(bdry_loc.eq.X0Z1).or.
+     &         (bdry_loc.eq.X1Z0).or.(bdry_loc.eq.X1Z1)) then
+         if (bdry_loc.eq.X0Z0) then
+            face_loc2 = ZLEFT
+            ipivot2   = ifirst2
+            dirsign2  = -1.d0
+            face_loc0 = XLEFT
+            ipivot0   = ifirst0
+            dirsign0  = -1.d0
+         else if (bdry_loc.eq.X0Z1) then
+            face_loc2 = ZRIGHT
+            ipivot2   = ilast2
+            dirsign2  = 1.d0
+            face_loc0 = XLEFT
+            ipivot0   = ifirst0
+            dirsign0  = -1.d0
+         else if (bdry_loc.eq.X1Z0) then
+            face_loc2 = ZLEFT
+            ipivot2   = ifirst2
+            dirsign2  = -1.d0
+            face_loc0 = XRIGHT
+            ipivot0   = ilast0
+            dirsign0  = 1.d0
+         else
+            face_loc2 = ZRIGHT
+            ipivot2   = ilast2
+            dirsign2  = 1.d0
+            face_loc0 = XRIGHT
+            ipivot0   = ilast0
+            dirsign0  = 1.d0
+         endif
+           if (bdry_cond.eq.XDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc0)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc1)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc2)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign0
+     &       * face_values(k,face_loc0) * dble(ic0-ict0) * dx(0)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign1
+     &       * face_values(k,face_loc1) * dble(ic1-ict1) * dx(1)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign2
+     &       * face_values(k,face_loc2) * dble(ic2-ict2) * dx(2)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,0)= -arrdata(ic0,ic1,ic2,0)
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,1)= -arrdata(ic0,ic1,ic2,1)
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,2)= -arrdata(ic0,ic1,ic2,2)
+                   enddo
+                enddo
+             enddo
+           else
+             write(6,*) "INVALID EDGE bdry_cond in getskeledgebdry3d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+           endif
+      else if ((bdry_loc.eq.X0Y0).or.(bdry_loc.eq.X1Y0).or.
+     &         (bdry_loc.eq.X0Y1).or.(bdry_loc.eq.X1Y1)) then
+         if (bdry_loc.eq.X0Y0) then
+            face_loc1 = YLEFT
+            ipivot1   = ifirst1
+            dirsign1  = -1.d0
+            face_loc0 = XLEFT
+            ipivot0   = ifirst0
+            dirsign0  = -1.d0
+         else if (bdry_loc.eq.X1Y0) then
+            face_loc1 = YLEFT
+            ipivot1   = ifirst1
+            dirsign1  = -1.d0
+            face_loc0 = XRIGHT
+            ipivot0   = ilast0
+            dirsign0  = 1.d0
+         else if (bdry_loc.eq.X0Y1) then
+            face_loc1 = YRIGHT
+            ipivot1   = ilast1
+            dirsign1  = 1.d0
+            face_loc0 = XLEFT
+            ipivot0   = ifirst0
+            dirsign0  = -1.d0
+         else
+            face_loc1 = YRIGHT
+            ipivot1   = ilast1
+            dirsign1  = 1.d0
+            face_loc0 = XRIGHT
+            ipivot0   = ilast0
+            dirsign0  = 1.d0
+         endif
+           if (bdry_cond.eq.XDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc0)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc1)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc2)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign0
+     &       * face_values(k,face_loc0) * dble(ic0-ict0) * dx(0)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign1
+     &       * face_values(k,face_loc1) * dble(ic1-ict1) * dx(1)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign2
+     &       * face_values(k,face_loc2) * dble(ic2-ict2) * dx(2)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,0)= -arrdata(ic0,ic1,ic2,0)
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,1)= -arrdata(ic0,ic1,ic2,1)
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,2)= -arrdata(ic0,ic1,ic2,2)
+                   enddo
+                enddo
+             enddo
+           else
+             write(6,*) "INVALID EDGE bdry_cond in getskeledgebdry3d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+           endif
+      endif
+c
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine getskelnodebdry3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,
+     &  ngc0,ngc1,ngc2,
+     &  dx,
+     &  bdry_loc,
+     &  bdry_cond,
+     &  face_values,
+     &  arrdata,
+     &  arrdepth)
+c***********************************************************************
+      implicit none
+c
+c  File:        appu_skelbdryparams3d.i
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    
+c  Modified:    
+c  Description: m4 include file for 3d boundary constant common blocks
+c
+      common/skelbdrylocparams3d/
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT, 
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1
+      integer
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT,
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1  
+c
+c
+      common/skelbdrycondparams3d/
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+      integer
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+c***********************************************************************
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      integer ngc0,ngc1,ngc2
+c
+      double precision dx(0:3-1)
+c
+      integer bdry_loc,
+     &        arrdepth,
+     &        bdry_cond
+      double precision
+     &        face_values(0:arrdepth-1,0:2*3-1)
+c
+      double precision
+     &  arrdata(ifirst0-ngc0:ilast0+ngc0,
+     &          ifirst1-ngc1:ilast1+ngc1,
+     &          ifirst2-ngc2:ilast2+ngc2,0:arrdepth-1)
+c
+      integer ic2,ic1,ic0,ict0,ict1,ict2
+      integer k
+      integer ipivot0,ipivot1,ipivot2
+      integer face_loc0,face_loc1,face_loc2
+      double precision    dirsign0,dirsign1,dirsign2
+c
+c***********************************************************************
+c***********************************************************************
+c    bdry_loc   index     bdry_loc    index
+c       0     (-1,-1,-1)      4     (-1,-1, 1)
+c       1     ( 1,-1,-1)      5     ( 1,-1, 1)
+c       2     (-1, 1,-1)      6     (-1, 1, 1)
+c       3     ( 1, 1,-1)      7     ( 1, 1, 1)
+c***********************************************************************
+c***********************************************************************
+      if (bdry_loc.eq.X0Y0Z0) then
+         face_loc0 = XLEFT
+         ipivot0   = ifirst0
+         dirsign0  = -1.d0
+         face_loc1 = YLEFT
+         ipivot1   = ifirst1
+         dirsign1  = -1.d0
+         face_loc2 = ZLEFT
+         ipivot2   = ifirst2
+         dirsign2  = -1.d0
+      else if (bdry_loc.eq.X1Y0Z0) then
+         face_loc0 = XRIGHT
+         ipivot0   = ilast0
+         dirsign0  = 1.d0
+         face_loc1 = YLEFT
+         ipivot1   = ifirst1
+         dirsign1  = -1.d0
+         face_loc2 = ZLEFT
+         ipivot2   = ifirst2
+         dirsign2  = -1.d0
+      else if (bdry_loc.eq.X0Y1Z0) then
+         face_loc0 = XLEFT
+         ipivot0   = ifirst0
+         dirsign0  = -1.d0
+         face_loc1 = YRIGHT
+         ipivot1   = ilast1
+         dirsign1  = 1.d0
+         face_loc2 = ZLEFT
+         ipivot2   = ifirst2
+         dirsign2  = -1.d0
+      else if (bdry_loc.eq.X1Y1Z0) then
+         face_loc0 = XRIGHT
+         ipivot0   = ilast0
+         dirsign0  = 1.d0
+         face_loc1 = YRIGHT
+         ipivot1   = ilast1
+         dirsign1  = 1.d0
+         face_loc2 = ZLEFT
+         ipivot2   = ifirst2
+         dirsign2  = -1.d0
+      else if (bdry_loc.eq.X0Y0Z1) then
+         face_loc0 = XLEFT
+         ipivot0   = ifirst0
+         dirsign0  = -1.d0
+         face_loc1 = YLEFT
+         ipivot1   = ifirst1
+         dirsign1  = -1.d0
+         face_loc2 = ZRIGHT
+         ipivot2   = ilast2
+         dirsign2  = 1.d0
+      else if (bdry_loc.eq.X1Y0Z1) then
+         face_loc0 = XRIGHT
+         ipivot0   = ilast0
+         dirsign0  = 1.d0
+         face_loc1 = YLEFT
+         ipivot1   = ifirst1
+         dirsign1  = -1.d0
+         face_loc2 = ZRIGHT
+         ipivot2   = ilast2
+         dirsign2  = 1.d0
+      else if (bdry_loc.eq.X0Y1Z1) then
+         face_loc0 = XLEFT
+         ipivot0   = ifirst0
+         dirsign0  = -1.d0
+         face_loc1 = YRIGHT
+         ipivot1   = ilast1
+         dirsign1  = 1.d0
+         face_loc2 = ZRIGHT
+         ipivot2   = ilast2
+         dirsign2  = 1.d0
+      else if (bdry_loc.eq.X1Y1Z1) then
+         face_loc0 = XRIGHT
+         ipivot0   = ilast0
+         dirsign0  = 1.d0
+         face_loc1 = YRIGHT
+         ipivot1   = ilast1
+         dirsign1  = 1.d0
+         face_loc2 = ZRIGHT
+         ipivot2   = ilast2
+         dirsign2  = 1.d0
+      endif
+           if (bdry_cond.eq.XDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc0)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc1)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc2)
+         enddo
+                   enddo
+                enddo
+             enddo
+          else if (bdry_cond.eq.XNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign0
+     &       * face_values(k,face_loc0) * dble(ic0-ict0) * dx(0)
+         enddo
+                   enddo
+                enddo
+             enddo
+          else if (bdry_cond.eq.YNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign1
+     &       * face_values(k,face_loc1) * dble(ic1-ict1) * dx(1)
+         enddo
+                   enddo
+                enddo
+             enddo
+          else if (bdry_cond.eq.ZNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign2
+     &       * face_values(k,face_loc2) * dble(ic2-ict2) * dx(2)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,0)= -arrdata(ic0,ic1,ic2,0)
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,1)= -arrdata(ic0,ic1,ic2,1)
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,2)= -arrdata(ic0,ic1,ic2,2)
+                   enddo
+                enddo
+             enddo
+           else
+             write(6,*) "INVALID NODE bdry_cond in getskelnodebdry3d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+           endif
+c
+      return
+      end
+
+c***********************************************************************
+c***********************************************************************
+      subroutine stufskelbdryloc3d(
+     &  XLEFTin, XRIGHTin, YLEFTin, YRIGHTin, ZLEFTin, ZRIGHTin,
+     &  Y0Z0in, Y1Z0in, Y0Z1in, Y1Z1in,
+     &  X0Z0in, X0Z1in, X1Z0in, X1Z1in,
+     &  X0Y0in, X1Y0in, X0Y1in, X1Y1in,
+     &  X0Y0Z0in, X1Y0Z0in, X0Y1Z0in, X1Y1Z0in,
+     &  X0Y0Z1in, X1Y0Z1in, X0Y1Z1in, X1Y1Z1in)
+      implicit none
+      integer
+     &  XLEFTin, XRIGHTin, YLEFTin, YRIGHTin, ZLEFTin, ZRIGHTin,
+     &  Y0Z0in, Y1Z0in, Y0Z1in, Y1Z1in,
+     &  X0Z0in, X0Z1in, X1Z0in, X1Z1in,
+     &  X0Y0in, X1Y0in, X0Y1in, X1Y1in,
+     &  X0Y0Z0in, X1Y0Z0in, X0Y1Z0in, X1Y1Z0in,
+     &  X0Y0Z1in, X1Y0Z1in, X0Y1Z1in, X1Y1Z1in
+c
+c  File:        appu_skelbdryparams3d.i
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    
+c  Modified:    
+c  Description: m4 include file for 3d boundary constant common blocks
+c
+      common/skelbdrylocparams3d/
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT, 
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1
+      integer
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT,
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1  
+c
+c
+      common/skelbdrycondparams3d/
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+      integer
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+
+c 3d faces
+        XLEFT=XLEFTin
+        XRIGHT=XRIGHTin
+        YLEFT=YLEFTin
+        YRIGHT=YRIGHTin
+        ZLEFT=ZLEFTin
+        ZRIGHT=ZRIGHTin
+
+c 3d edges
+        Y0Z0=Y0Z0in
+        Y1Z0=Y1Z0in
+        Y0Z1=Y0Z1in
+        Y1Z1=Y1Z1in
+        X0Z0=X0Z0in
+        X0Z1=X0Z1in
+        X1Z0=X1Z0in
+        X1Z1=X1Z1in
+        X0Y0=X0Y0in
+        X1Y0=X1Y0in
+        X0Y1=X0Y1in
+        X1Y1=X1Y1in
+
+c 3d nodes
+        X0Y0Z0=X0Y0Z0in
+        X1Y0Z0=X1Y0Z0in
+        X0Y1Z0=X0Y1Z0in
+        X1Y1Z0=X1Y1Z0in
+        X0Y0Z1=X0Y0Z1in
+        X1Y0Z1=X1Y0Z1in
+        X0Y1Z1=X0Y1Z1in
+        X1Y1Z1=X1Y1Z1in
+
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine stufskelbdrycond3d(
+     &  FLOWin, XFLOWin, YFLOWin, ZFLOWin,
+     &  REFLECTin, XREFLECTin, YREFLECTin, ZREFLECTin, 
+     &  DIRICHLETin, XDIRICHLETin, YDIRICHLETin, ZDIRICHLETin,
+     &  NEUMANNin, XNEUMANNin, YNEUMANNin, ZNEUMANNin)
+      implicit none
+      integer
+     &  FLOWin, XFLOWin, YFLOWin, ZFLOWin,
+     &  REFLECTin, XREFLECTin, YREFLECTin, ZREFLECTin,
+     &  DIRICHLETin, XDIRICHLETin, YDIRICHLETin, ZDIRICHLETin,
+     &  NEUMANNin, XNEUMANNin, YNEUMANNin, ZNEUMANNin
+c
+c  File:        appu_skelbdryparams3d.i
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    
+c  Modified:    
+c  Description: m4 include file for 3d boundary constant common blocks
+c
+      common/skelbdrylocparams3d/
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT, 
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1
+      integer
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT,
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1  
+c
+c
+      common/skelbdrycondparams3d/
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+      integer
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+
+        FLOW=FLOWin
+        XFLOW=XFLOWin
+        YFLOW=YFLOWin
+        ZFLOW=ZFLOWin
+
+        REFLECT=REFLECTin
+        XREFLECT=XREFLECTin
+        YREFLECT=YREFLECTin
+        ZREFLECT=ZREFLECTin
+
+        DIRICHLET=DIRICHLETin
+        XDIRICHLET=XDIRICHLETin
+        YDIRICHLET=YDIRICHLETin
+        ZDIRICHLET=ZDIRICHLETin
+
+        NEUMANN=NEUMANNin
+        XNEUMANN=XNEUMANNin
+        YNEUMANN=YNEUMANNin
+        ZNEUMANN=ZNEUMANNin
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkEuler/test_inputs/octant_3blk.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkEuler/test_inputs/octant_3blk.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,262 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for the multiblock linear advector for
+ *                advecting a blob through a spherical shell
+ *
+ ************************************************************************/
+
+// -------------------------------------------------------------------
+//  problem setup
+// -------------------------------------------------------------------
+
+// ----------------- define the size of each block
+NRAD    = 20 // 4
+NRADM   = NRAD - 1
+MLEVELS = 2
+
+MblkGeometry {
+   problem_type = "SPHERICAL_SHELL"
+
+   ShellGeometry {
+      rmin = 1.e0 
+      rmax = 2.e0 
+
+      shell_type = "OCTANT"
+   }
+
+
+   // The refinement boxes are specified here because the MultiblockGriddingAlg does not have any
+   // way to take in refinement boxes for multiple blocks.  The format is "refine_boxes[block][lev]".
+   // level 0
+   // refine_boxes_0_0 = [(5,0,0),(5,9,9)]
+   // refine_boxes_1_0 = [(5,0,0),(5,9,9)]
+   // refine_boxes_2_0 = [(5,0,0),(5,9,9)]
+   // level 1
+   // refine_boxes_0_1 = [(20,0,0),(20,39,39)]
+   // refine_boxes_1_1 = [(20,0,0),(20,39,39)]
+   // refine_boxes_2_1 = [(20,0,0),(20,39,39)]
+}
+
+// -------------- some calculations for placing the blob in the middle of each octant
+r    = 1.5
+pi   = 3.14159265358979
+pio8 = pi/8
+pio4 = pi/4
+phi1 = 3.0*pi/8.0
+xx   = r*cos(pio8)*cos(pio8)
+yy   = r*sin(pio8)*cos(pio8)
+zz   = r*sin(pio8)
+
+xxx   = r*cos(pio4)*cos(phi1)
+yyy   = r*sin(pio4)*cos(phi1)
+zzz   = r*sin(phi1)
+
+MblkEuler {
+
+   advection_test     = 1
+
+   // 0, cartesian, 1 R translation, 2 rigid body theta rotation, 4, rigid body phi rotation
+   advection_vel_type = 1
+	
+   // advection_velocity = 2.0e0 , 0.0e0 , 0.0e0
+   // advection_velocity = 0.0e0 , 2.0e0 , 0.0e0
+   advection_velocity = 0.0e0 , 0.0e0 , 2.0e0
+
+   data_problem      = "SPHERE"
+
+   // center            = xx, yy, zz     // middle of block 0
+   // center            = yy, xx, zz  // middle of block 1
+   // center               = xxx, yyy, zzz  // middle of block 2
+   // center            = 0.75 , 0.75, 0.75 // middle of the shell
+   // front_position    = 0.0, 0.2, 1.e20
+   
+   center            = 0.0, 0.0, 0.0 // middle of the shell
+   front_position    = 0.0, 1.5, 1.e20
+
+   state_names = "rho"
+
+   state_data {
+      rho = 1.0, 2.0
+   }
+
+/*
+   state_names = "rho", "u", "v", "w", "p", "ss"
+
+   state_data {
+      rho = 1.0, 2.0
+      u   = 1.0, 0.0
+      v   = 1.0, 4.0
+      w   = 1.0, 0.0
+      p   = 1.0, 6.0
+      ss  = 1.0, 0.0
+   }
+*/
+
+   Refinement_data {
+      refine_criteria = "GRADIENT"
+
+      GRADIENT {
+         names = "rho"
+         rho   = 0.5
+      }
+   }
+
+}
+
+
+// -------------------------------------------------------------------
+//  hydro blocks
+// -------------------------------------------------------------------
+
+Main {
+   dim = 3
+// log file parameters 
+   log_file_name    = "octant.log"
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_octant-3blk"
+   viz_dump_filename     = "octant"    // not used by VisIt
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+
+// restart dump parameters
+   restart_interval       = 0         // zero to turn off
+   restart_write_dirname  = "restart_octant"
+
+}
+
+
+TimerManager {
+//   timer_list               = "apps::*::*",
+//                              "algs::*::*",
+//                              "mesh::*::*"
+//   print_exclusive      = TRUE
+//   print_summed           = TRUE
+//   print_max              = TRUE
+//   print_timer_overhead   = TRUE
+   print_threshold        = 0.0
+}
+
+
+GriddingAlgorithm{
+   efficiency_tolerance    = 0.7e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.7e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+
+   sequentialize_patch_indices = TRUE
+
+}
+
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.5e0    // max cfl factor used in problem
+   cfl_init                  = 0.5e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+
+TimeRefinementIntegrator{
+   tag_buffer           = 2, 2, 2 // number of zones used in the tag buffer
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 1000.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 10 // 2 // 100    // max number of simulation timesteps
+}
+
+
+TreeLoadBalancer {
+}
+
+
+// -------------------------------------------------------------------
+//  The mesh
+// -------------------------------------------------------------------
+
+
+MultiblockPatchHierarchy {
+   num_blocks = 3
+
+   // Geometries of the hierachy blocks
+   BlockGeometry0{
+      domain_boxes	= [ (0,0,0) , (NRADM,NRADM,NRADM) ]
+   }
+   BlockGeometry1{
+      domain_boxes	= [ (0,0,0) , (NRADM,NRADM,NRADM) ]
+   }
+   BlockGeometry2{
+      domain_boxes	= [ (0,0,0) , (NRADM,NRADM,NRADM) ]
+   }
+
+   // Singularity defn and neighbors
+   Singularity0 {
+      blocks = 0 , 1 , 2
+      sing_box_0 = [ (0,NRAD,NRAD), (NRADM,NRAD,NRAD) ]
+      sing_box_1 = [ (0,-1,  NRAD), (NRADM,-1,  NRAD) ]
+      sing_box_2 = [ (0,NRAD,NRAD), (NRADM,NRAD,NRAD) ]
+   }
+
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP" 
+      point_in_a_space = 0, NRAD, 0
+      point_in_b_space = 0, 0,    0
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      // j index in block a is k up in block b index
+      rotation_b_to_a = "I_UP", "K_UP" , "J_DOWN"
+      point_in_a_space = 0, 0, NRAD
+      point_in_b_space = 0, NRADM, 0
+   }
+
+   BlockNeighbors2 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "I_UP", "J_DOWN" , "K_DOWN"
+      point_in_a_space = 0, 0, NRAD
+      point_in_b_space = 0, NRADM , NRADM
+   }
+
+   PatchHierarchy {
+      max_levels = MLEVELS       // Maximum number of levels in hierarchy.
+      ratio_to_coarser {      // vector ratio to next coarser level
+         level_1 = 2 , 2 , 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2 , 2 , 2
+         // all finer levels will use same values as level_0...
+      }
+      sequentialize_patch_indices = TRUE
+   }
+
+}
+
+
+MappedBoxHierarchy {
+    log_actions = 'n'
+    check_input_connectors = 'n'
+    check_output_connectors = 'n'
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkEuler/upfluxsum.f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkEuler/upfluxsum.f	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,244 @@
+c
+c  File:        algs_upfluxsum3d.m4
+c  Package:     SAMRAI algorithms
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: F77 routines for updating 3d flux sums from fluxes.
+c
+c
+c  File:        pdat_m4arrdim3d.i
+c  Package:     SAMRAI patchdata
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: m4 include file for dimensioning 3d arrays in FORTRAN routines.
+c
+c
+c***********************************************************************
+c Add flux integrals to fluxsums
+c***********************************************************************
+c
+c
+c
+      subroutine upfluxsumface3d0(
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iface,
+     &  flux,fluxsum)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iface
+      double precision
+     &  flux(ilo0-flxgc0:ihi0+1+flxgc0,
+     &          ilo1-flxgc1:ihi1+flxgc1,
+     &          ilo2-flxgc2:ihi2+flxgc2),
+     &  fluxsum(ilo1:ihi1,
+     &          ilo2:ihi2)
+      integer ie0,ic1,ic2
+c
+c***********************************************************************
+c
+      if (iface.eq.0) then
+        ie0 = ilo0
+      else
+        ie0 = ihi0+1
+      endif 
+ 
+      do ic2=ilo2,ihi2
+         do ic1=ilo1,ihi1
+            fluxsum(ic1,ic2)=fluxsum(ic1,ic2)+flux(ie0,ic1,ic2)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine upfluxsumface3d1(
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iface,
+     &  flux,fluxsum)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iface
+      double precision
+     &  flux(ilo0-flxgc0:ihi0+flxgc0,
+     &          ilo1-flxgc1:ihi1+1+flxgc1,
+     &          ilo2-flxgc2:ihi2+flxgc2),
+     &  fluxsum(ilo0:ihi0,
+     &          ilo2:ihi2)
+      integer ie1,ic2,ic0
+c
+c***********************************************************************
+c
+      if (iface.eq.0) then
+        ie1 = ilo1
+      else
+        ie1 = ihi1+1
+      endif 
+ 
+      do ic0=ilo0,ihi0
+         do ic2=ilo2,ihi2
+            fluxsum(ic2,ic0)=fluxsum(ic2,ic0)+flux(ie1,ic2,ic0)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine upfluxsumface3d2(
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iface,
+     &  flux,fluxsum)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iface
+      double precision
+     &  flux(ilo0-flxgc0:ihi0+flxgc0,
+     &          ilo1-flxgc1:ihi1+flxgc1,
+     &          ilo2-flxgc2:ihi2+1+flxgc2),
+     &  fluxsum(ilo0:ihi0,
+     &          ilo1:ihi1)
+      integer ie2,ic0,ic1
+c
+c***********************************************************************
+c
+      if (iface.eq.0) then
+        ie2 = ilo2
+      else
+        ie2 = ihi2+1
+      endif 
+ 
+      do ic1=ilo1,ihi1
+         do ic0=ilo0,ihi0
+            fluxsum(ic0,ic1)=fluxsum(ic0,ic1)+flux(ie2,ic0,ic1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine upfluxsumside3d0(
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iside,
+     &  flux,fluxsum)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iside
+      double precision
+     &  flux(ilo0-flxgc0:ihi0+1+flxgc0,
+     &          ilo1-flxgc1:ihi1+flxgc1,
+     &          ilo2-flxgc2:ihi2+flxgc2),
+     &  fluxsum(ilo1:ihi1,
+     &          ilo2:ihi2)
+      integer ic0,ic1,ic2
+c
+c***********************************************************************
+c
+      if (iside.eq.0) then
+        ic0 = ilo0
+      else
+        ic0 = ihi0+1
+      endif 
+ 
+      do ic2=ilo2,ihi2
+         do ic1=ilo1,ihi1
+            fluxsum(ic1,ic2)=fluxsum(ic1,ic2)+flux(ic0,ic1,ic2)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine upfluxsumside3d1(
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iside,
+     &  flux,fluxsum)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iside
+      double precision
+     &  flux(ilo0-flxgc0:ihi0+flxgc0,
+     &          ilo1-flxgc1:ihi1+1+flxgc1,
+     &          ilo2-flxgc2:ihi2+flxgc2),
+     &  fluxsum(ilo0:ihi0,
+     &          ilo2:ihi2)
+      integer ic1,ic0,ic2
+c
+c***********************************************************************
+c
+      if (iside.eq.0) then
+        ic1 = ilo1
+      else
+        ic1 = ihi1+1
+      endif 
+ 
+      do ic2=ilo2,ihi2
+         do ic0=ilo0,ihi0
+            fluxsum(ic0,ic2)=fluxsum(ic0,ic2)+flux(ic0,ic1,ic2)
+         enddo
+      enddo
+c
+      return
+      end
+c
+      subroutine upfluxsumside3d2(
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iside,
+     &  flux,fluxsum)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iside
+      double precision
+     &  flux(ilo0-flxgc0:ihi0+flxgc0,
+     &          ilo1-flxgc1:ihi1+flxgc1,
+     &          ilo2-flxgc2:ihi2+1+flxgc2),
+     &  fluxsum(ilo0:ihi0,
+     &          ilo1:ihi1)
+      integer ic2,ic0,ic1
+c
+c***********************************************************************
+c
+      if (iside.eq.0) then
+        ic2 = ilo2
+      else
+        ic2 = ihi2+1
+      endif 
+ 
+      do ic1=ilo1,ihi1
+         do ic0=ilo0,ihi0
+            fluxsum(ic0,ic1)=fluxsum(ic0,ic1)+flux(ic0,ic1,ic2)
+         enddo
+      enddo
+c
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,2534 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=MblkGeometry.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/BlockGridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/geom/BlockGridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	MblkGeometry.C MblkGeometry.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=MblkHyperbolicLevelIntegrator.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementLevelStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevelIterator.I	\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevelIterator.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingAlgorithm.I	\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingAlgorithm.h	\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingTagger.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	MblkHyperbolicLevelIntegrator.C MblkHyperbolicLevelIntegrator.h	\
+	MblkHyperbolicPatchStrategy.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=MblkHyperbolicPatchStrategy.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingAlgorithm.I	\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingAlgorithm.h	\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingTagger.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	MblkHyperbolicPatchStrategy.C MblkHyperbolicPatchStrategy.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=MblkLinAdv.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementLevelStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryUtilityStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryDefines.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/BlockGridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/geom/BlockGridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingAlgorithm.I	\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingAlgorithm.h	\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingTagger.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDoubleLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDoubleInjection.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDoubleLinearTimeInterpolateOp.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h MblkGeometry.h	\
+	MblkHyperbolicLevelIntegrator.h MblkHyperbolicPatchStrategy.h	\
+	MblkLinAdv.C MblkLinAdv.h SkeletonBoundaryUtilities2.h		\
+	SkeletonBoundaryUtilities3.h					\
+	SkeletonCellDoubleConservativeLinearRefine.h			\
+	SkeletonCellDoubleWeightedAverage.h				\
+	SkeletonOutersideDoubleWeightedAverage.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
+FILE_4=Pointer-MblkHyperbolicLevelIntegrator.o
+DEPENDS_4:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementLevelStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingAlgorithm.I	\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingAlgorithm.h	\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingTagger.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	MblkHyperbolicLevelIntegrator.h MblkHyperbolicPatchStrategy.h	\
+	Pointer-MblkHyperbolicLevelIntegrator.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_4 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C
+endif
+
+${FILE_4:X.o=${NDIM}.o}: ${DEPENDS_4}
+
+FILE_5=Pointer-SkeletonCellDoubleConservativeLinearRefine.o
+DEPENDS_5:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	Pointer-SkeletonCellDoubleConservativeLinearRefine.C		\
+	SkeletonCellDoubleConservativeLinearRefine.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_5 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C
+endif
+
+${FILE_5:X.o=${NDIM}.o}: ${DEPENDS_5}
+
+FILE_6=Pointer-SkeletonCellDoubleWeightedAverage.o
+DEPENDS_6:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	Pointer-SkeletonCellDoubleWeightedAverage.C			\
+	SkeletonCellDoubleWeightedAverage.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_6 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C
+endif
+
+${FILE_6:X.o=${NDIM}.o}: ${DEPENDS_6}
+
+FILE_7=Pointer-SkeletonOutersideDoubleWeightedAverage.o
+DEPENDS_7:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	Pointer-SkeletonOutersideDoubleWeightedAverage.C		\
+	SkeletonOutersideDoubleWeightedAverage.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_7 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C
+endif
+
+${FILE_7:X.o=${NDIM}.o}: ${DEPENDS_7}
+
+FILE_8=SkeletonBoundaryUtilities2.o
+DEPENDS_8:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryUtilityStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryDefines.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	SkeletonBoundaryUtilities2.C SkeletonBoundaryUtilities2.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_8 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_8:X.o=${NDIM}.o}: ${DEPENDS_8}
+
+FILE_9=SkeletonBoundaryUtilities3.o
+DEPENDS_9:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryUtilityStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryDefines.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	SkeletonBoundaryUtilities3.C SkeletonBoundaryUtilities3.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_9 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_9:X.o=${NDIM}.o}: ${DEPENDS_9}
+
+FILE_10=SkeletonCellDoubleConservativeLinearRefine.o
+DEPENDS_10:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	SkeletonCellDoubleConservativeLinearRefine.C			\
+	SkeletonCellDoubleConservativeLinearRefine.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_10 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_10:X.o=${NDIM}.o}: ${DEPENDS_10}
+
+FILE_11=SkeletonCellDoubleWeightedAverage.o
+DEPENDS_11:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	SkeletonCellDoubleWeightedAverage.C				\
+	SkeletonCellDoubleWeightedAverage.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_11 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_11:X.o=${NDIM}.o}: ${DEPENDS_11}
+
+FILE_12=SkeletonOutersideDoubleWeightedAverage.o
+DEPENDS_12:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	SkeletonOutersideDoubleWeightedAverage.C			\
+	SkeletonOutersideDoubleWeightedAverage.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_12 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_12:X.o=${NDIM}.o}: ${DEPENDS_12}
+
+FILE_13=main.o
+DEPENDS_13:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementIntegrator.I		\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementIntegrator.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementLevelStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryUtilityStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/BlockGridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/geom/BlockGridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BergerRigoutsos.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingAlgorithm.I	\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingAlgorithm.h	\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingTagger.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h MblkGeometry.h	\
+	MblkHyperbolicLevelIntegrator.h MblkHyperbolicPatchStrategy.h	\
+	MblkLinAdv.h SkeletonCellDoubleConservativeLinearRefine.h	\
+	SkeletonCellDoubleWeightedAverage.h				\
+	SkeletonOutersideDoubleWeightedAverage.h main.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_13 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_13:X.o=${NDIM}.o}: ${DEPENDS_13}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,104 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for linear advection sample application 
+##
+#########################################################################
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/test/MblkLinAdv
+VPATH         = @srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+default:      check
+
+include $(OBJECT)/config/Makefile.config
+
+CPPFLAGS_EXTRA= -DTESTING=0
+
+NUM_TESTS     = 2
+
+TEST_NPROCS   = @TEST_NPROCS@
+
+CXX_OBJS      = MblkGeometry.o main.o MblkLinAdv.o MblkHyperbolicLevelIntegrator.o \
+	MblkHyperbolicPatchStrategy.o Pointer-MblkHyperbolicLevelIntegrator.o \
+	SkeletonCellDoubleConservativeLinearRefine.o Pointer-SkeletonCellDoubleConservativeLinearRefine.o \
+	SkeletonCellDoubleWeightedAverage.o Pointer-SkeletonCellDoubleWeightedAverage.o \
+	SkeletonOutersideDoubleWeightedAverage.o Pointer-SkeletonOutersideDoubleWeightedAverage.o \
+	SkeletonBoundaryUtilities2.o \
+	SkeletonBoundaryUtilities3.o
+
+F_OBJS      = upfluxsum2d.o skelbdry2d.o upfluxsum3d.o skelbdry3d.o
+
+main:	$(CXX_OBJS) $(F_OBJS) $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) $(F_OBJS) \
+	$(LIBSAMRAI) $(LDLIBS) -o $@
+
+check:
+	$(MAKE) check3d
+
+check2d:
+
+check3d:       main
+	@for i in test_inputs/*.3d.input ; do \
+	 $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+	       ./main $${i}; \
+	done
+
+checkcompile: main
+
+checktest:
+	rm -f makecheck.logfile
+	$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+	$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+	rm -f makecheck.logfile
+
+examples2d: 
+
+examples3d: main
+	@for i in $(SRCDIR)/example_inputs/*.3d.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+examples:
+	$(MAKE) examples2d
+	$(MAKE) examples3d
+
+clean-check:
+	$(SAMCLEAN)
+
+clean: 
+	$(SAMCLEAN)
+	$(RM) *.f main viz*
+
+redo: 
+	$(RM) main
+
+include $(SRCDIR)/Makefile.depend
+
+FORTRAN       = $(SRCDIR)/fortran
+M4DIRS        = -DFORTDIR=$(FORTRAN) $(SAMRAI_M4_FLAGS)
+
+skelbdry2d.o:	$(FORTRAN)/2d/skelbdry2d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/2d/skelbdry2d.m4 > skelbdry2d.f
+	$(F77) $(FFLAGS) -c skelbdry2d.f -o $@
+
+upfluxsum2d.o:	$(FORTRAN)/2d/upfluxsum2d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/2d/upfluxsum2d.m4 > upfluxsum2d.f
+	$(F77) $(FFLAGS) -c upfluxsum2d.f -o $@
+
+
+skelbdry3d.o:	$(FORTRAN)/3d/skelbdry3d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/3d/skelbdry3d.m4 > skelbdry3d.f
+	$(F77) $(FFLAGS) -c skelbdry3d.f -o $@
+
+upfluxsum3d.o:	$(FORTRAN)/3d/upfluxsum3d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/3d/upfluxsum3d.m4 > upfluxsum3d.f
+	$(F77) $(FFLAGS) -c upfluxsum3d.f -o $@
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/MblkGeometry.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/MblkGeometry.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1156 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   set geometry for multiblock domain 
+ *
+ ************************************************************************/
+
+#include "MblkGeometry.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#define POLY3(i, j, k, imin, jmin, kmin, nx, nxny) \
+   ((i - imin) + (j - jmin) * (nx) + (k - kmin) * (nxny))
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * This class creates the mapped multi-block grid geometry used
+ * for calculations in the MblkLinAdv code.
+ *                                                                       *
+ *************************************************************************
+ */
+MblkGeometry::MblkGeometry(
+   const std::string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> input_db,
+   const int nblocks):
+   d_dim(dim)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!input_db.isNull());
+#endif
+
+   d_object_name = object_name;
+   //tbox::RestartManager::getManager()->registerRestartItem(d_object_name, this);
+
+   d_nblocks = nblocks;
+
+   d_metrics_set.resizeArray(10);
+   for (int i = 0; i < 10; i++) {
+      d_metrics_set[i] = false;
+   }
+
+   /*
+    * Initialize object with data read from given input/restart databases.
+    */
+   bool is_from_restart = tbox::RestartManager::getManager()->isFromRestart();
+   if (is_from_restart) {
+//      getFromRestart();  // ADD
+   }
+   getFromInput(input_db, is_from_restart);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Empty destructor.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+MblkGeometry::~MblkGeometry()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return the geometry (CARTESIAN, WEDGE, or SPHERICAL_SHELL)
+ *                                                                       *
+ *************************************************************************
+ */
+std::string MblkGeometry::getGeometryType()
+{
+   return d_geom_problem;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return the user-specified refine boxes for a particular block/level
+ * number.  If no boxes exist, it returns false.  If they do exist, it
+ * returns true and sets the refine boxes argument.
+ *                                                                       *
+ *************************************************************************
+ */
+bool MblkGeometry::getRefineBoxes(
+   hier::BoxArray& refine_boxes,
+   const int block_number,
+   const int level_number)
+{
+   bool boxes_exist = false;
+   if (block_number < d_refine_boxes.getSize()) {
+      if (level_number < d_refine_boxes[level_number].getSize()) {
+         boxes_exist = true;
+         refine_boxes = d_refine_boxes[block_number][level_number];
+      }
+   }
+   return boxes_exist;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Tag cells for spherical octant problem
+ *                                                                       *
+ *************************************************************************
+ */
+void MblkGeometry::tagOctantCells(
+   hier::Patch& patch,
+   const int xyz_id,
+   tbox::Pointer<pdat::CellData<int> >& temp_tags,
+   const double regrid_time,
+   const int refine_tag_val)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(d_geom_problem == "SPHERICAL_SHELL" &&
+      d_sshell_type == "OCTANT");
+   TBOX_ASSERT(!temp_tags.isNull());
+#endif
+
+   tbox::Pointer<pdat::NodeData<double> > xyz =
+      patch.getPatchData(xyz_id);
+
+   if (d_dim == tbox::Dimension(3)) {
+      /*
+       * Tag in X direction only
+       */
+      double xtag_loc_lo = d_sshell_rmin
+         + (regrid_time * d_tag_velocity) - (0.5 * d_tag_width);
+      double xtag_loc_hi = d_sshell_rmin
+         + (regrid_time * d_tag_velocity) + (0.5 * d_tag_width);
+
+      hier::Box pbox = patch.getBox();
+      for (int k = pbox.lower(2); k <= pbox.upper(2) + 1; k++) {
+         for (int j = pbox.lower(1); j <= pbox.upper(1) + 1; j++) {
+            for (int i = pbox.lower(0); i <= pbox.upper(0) + 1; i++) {
+               hier::Index ic(i, j, k);
+               pdat::NodeIndex node(ic, pdat::NodeIndex::LLL);
+               hier::Index icm1(i - 1, j - 1, k - 1);
+               pdat::CellIndex cell(icm1);
+
+               double node_x_loc = (*xyz)(node, 0);
+
+               if ((node_x_loc > xtag_loc_lo) &&
+                   (node_x_loc < xtag_loc_hi)) {
+                  (*temp_tags)(cell) = refine_tag_val;
+               }
+            }
+         }
+      }
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Read data members from input.  All values set from restart can be	*
+ * overridden by values in the input database.
+ *                                                                       *
+ *************************************************************************
+ */
+void MblkGeometry::getFromInput(
+   tbox::Pointer<tbox::Database> input_db,
+   bool is_from_restart)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!input_db.isNull());
+#endif
+
+   (void)is_from_restart;
+
+   tbox::Pointer<tbox::Database> db = input_db->getDatabase("MblkGeometry");
+
+   d_geom_problem = db->getString("problem_type");
+
+   bool found = false;
+   int i, nb;
+   char block_name[128];
+   double temp_domain[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   /*
+    * Cartesian geometry
+    */
+   if (d_geom_problem == "CARTESIAN") {
+
+      tbox::Pointer<tbox::Database> cart_db =
+         db->getDatabase("CartesianGeometry");
+
+      d_cart_xlo.resizeArray(d_nblocks);
+      d_cart_xhi.resizeArray(d_nblocks);
+
+      for (nb = 0; nb < d_nblocks; nb++) {
+
+         // xlo
+         sprintf(block_name, "domain_xlo_%d", nb);
+         if (!cart_db->keyExists(block_name)) {
+            TBOX_ERROR(d_object_name << ":  "
+                                     << "Key data `" << block_name
+                                     << "' domain_xlo for block " << nb
+                                     << " not found in input." << std::endl);
+         }
+         d_cart_xlo[nb].resizeArray(d_dim.getValue());
+         cart_db->getDoubleArray(block_name, temp_domain, d_dim.getValue());
+         for (i = 0; i < d_dim.getValue(); i++) {
+            d_cart_xlo[nb][i] = temp_domain[i];
+         }
+
+         // xhi
+         sprintf(block_name, "domain_xhi_%d", nb);
+         if (!cart_db->keyExists(block_name)) {
+            TBOX_ERROR(d_object_name << ":  "
+                                     << "Key data `" << block_name
+                                     << "' domain_xhi for block " << nb
+                                     << " not found in input." << std::endl);
+         }
+         d_cart_xhi[nb].resizeArray(d_dim.getValue());
+         cart_db->getDoubleArray(block_name, temp_domain, d_dim.getValue());
+         for (i = 0; i < d_dim.getValue(); i++) {
+            d_cart_xhi[nb][i] = temp_domain[i];
+         }
+
+      }
+      found = true;
+   }
+
+   /*
+    * Wedge geometry
+    */
+   if (d_geom_problem == "WEDGE") {
+
+      tbox::Pointer<tbox::Database> wedge_db =
+         db->getDatabase("WedgeGeometry");
+
+      d_wedge_rmin.resizeArray(d_nblocks);
+      d_wedge_rmax.resizeArray(d_nblocks);
+
+      for (nb = 0; nb < d_nblocks; nb++) {
+
+         // rmin
+         sprintf(block_name, "rmin_%d", nb);
+         if (!wedge_db->keyExists(block_name)) {
+            TBOX_ERROR(d_object_name << ":  "
+                                     << "Key data `" << block_name
+                                     << "' rmin for block " << nb
+                                     << " not found in input." << std::endl);
+         }
+
+         d_wedge_rmin[nb] = wedge_db->getDouble(block_name);
+
+         // rmax
+         sprintf(block_name, "rmax_%d", nb);
+         if (!wedge_db->keyExists(block_name)) {
+            TBOX_ERROR(d_object_name << ":  "
+                                     << "Key data `" << block_name
+                                     << "' rmax for block " << nb
+                                     << " not found in input." << std::endl);
+         }
+
+         d_wedge_rmax[nb] = wedge_db->getDouble(block_name);
+
+         // theta min/max
+         d_wedge_thmin = wedge_db->getDouble("thmin");
+         d_wedge_thmax = wedge_db->getDouble("thmax");
+
+         if (d_dim == tbox::Dimension(3)) {
+            // Z min/max
+            d_wedge_zmin = wedge_db->getDouble("zmin");
+            d_wedge_zmax = wedge_db->getDouble("zmax");
+         }
+
+      }
+      found = true;
+   }
+
+   /*
+    * Spherical shell
+    */
+   if (d_geom_problem == "SPHERICAL_SHELL") {
+
+      /*
+       * This case only works in 3 dimensions
+       */
+      if (d_dim < tbox::Dimension(3)) {
+         TBOX_ERROR(d_object_name << ": The " << d_geom_problem
+                                  << "only works in 3D." << std::endl);
+      }
+
+      tbox::Pointer<tbox::Database> sshell_db =
+         db->getDatabase("ShellGeometry");
+
+      d_sshell_rmin = sshell_db->getDouble("rmin");
+      d_sshell_rmax = sshell_db->getDouble("rmax");
+      d_sshell_type = sshell_db->getString("shell_type");
+      // types are: SOLID, OCTANT
+
+      if (d_sshell_type == "SOLID") {
+         double lpi = 3.14159265358979325873406851315;
+
+         d_sangle_degrees = sshell_db->getDouble("solid_angle_degrees");
+         d_sangle_thmin =
+            -(lpi / 180.0) * tbox::MathUtilities<double>::Abs(d_sangle_degrees);
+         // we only need the minimum of the angle coverage in radians
+      }
+
+      if (d_sshell_type == "OCTANT") {
+         d_tag_velocity = 0.;
+         if (sshell_db->keyExists("tag_velocity")) {
+            d_tag_velocity = sshell_db->getDouble("tag_velocity");
+         }
+         if (sshell_db->keyExists("tag_width")) {
+            d_tag_width = sshell_db->getDouble("tag_width");
+         }
+      }
+      found = true;
+   }
+
+   if (!found) {
+      TBOX_ERROR(
+         d_object_name << ": Could not identify problem.\n"
+         << d_geom_problem << " is not a valid input."
+         << std::endl);
+   }
+
+   /*
+    * Block rotation
+    */
+   d_block_rotation.resizeArray(d_nblocks);
+   for (nb = 0; nb < d_nblocks; nb++) {
+      d_block_rotation[nb] = 0;
+      sprintf(block_name, "rotation_%d", nb);
+      if (db->keyExists(block_name)) {
+         d_block_rotation[nb] = db->getInteger(block_name);
+      }
+   }
+
+   /*
+    * Block refine boxes.  These are supplied via input of the
+    * form:
+    *
+    *    refine_boxes_<block number>_<level number>
+    *
+    * For example,
+    *
+    *    refine_boxes_2_0 = [(0,0),(9,9)],...
+    *
+    * would specify the refinement region on block 2, level 0.
+    *
+    */
+   d_refine_boxes.resizeArray(d_nblocks);
+   for (nb = 0; nb < d_nblocks; nb++) {
+
+      // see what the max number of levels is
+      int max_ln = 0;
+      int ln;
+      for (ln = 0; ln < 10; ln++) {
+         sprintf(block_name, "refine_boxes_%d_%d", nb, ln);
+         if (db->keyExists(block_name)) {
+            max_ln++;
+         }
+      }
+      d_refine_boxes[nb].resizeArray(max_ln, hier::BoxArray(d_dim));
+
+      for (ln = 0; ln < max_ln; ln++) {
+         sprintf(block_name, "refine_boxes_%d_%d", nb, ln);
+         if (db->keyExists(block_name)) {
+            d_refine_boxes[nb][ln] = db->getDatabaseBoxArray(block_name);
+         } else {
+            TBOX_ERROR(
+               d_object_name << ": input entry `"
+               << block_name << "' does not exist."
+               << std::endl);
+         }
+      }
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Build grid on patch for supplied inputs for different goemetries
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkGeometry::buildGridOnPatch(
+   const hier::Patch& patch,
+   const hier::Box& domain,
+   const int xyz_id,
+   const int level_number,
+   const int block_number)
+{
+
+   if (d_geom_problem == "CARTESIAN") {
+      if (!d_metrics_set[level_number]) {
+         setCartesianMetrics(domain,
+            level_number);
+      }
+      buildCartesianGridOnPatch(patch,
+         xyz_id,
+         level_number,
+         block_number);
+   }
+
+   if (d_geom_problem == "WEDGE") {
+      if (!d_metrics_set[level_number]) {
+         setWedgeMetrics(domain,
+            level_number);
+      }
+      buildWedgeGridOnPatch(patch,
+         xyz_id,
+         level_number,
+         block_number);
+   }
+
+   if (d_geom_problem == "SPHERICAL_SHELL") {
+      if (!d_metrics_set[level_number]) {
+         setSShellMetrics(domain,
+            level_number);
+      }
+      buildSShellGridOnPatch(patch,
+         domain,
+         xyz_id,
+         level_number,
+         block_number);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Access the stored dx
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkGeometry::getDx(
+   const hier::Box& domain,
+   const int level_number,
+   double* dx)
+
+{
+   if (d_geom_problem == "CARTESIAN") {
+      if (!d_metrics_set[level_number]) {
+         setCartesianMetrics(domain,
+            level_number);
+      }
+   }
+
+   if (d_geom_problem == "WEDGE") {
+      if (!d_metrics_set[level_number]) {
+         setWedgeMetrics(domain,
+            level_number);
+      }
+   }
+
+   if (d_geom_problem == "SPHERICAL_SHELL") {
+      if (!d_metrics_set[level_number]) {
+         setSShellMetrics(domain,
+            level_number);
+      }
+   }
+
+   getDx(level_number,
+      dx);
+
+}
+
+void MblkGeometry::getDx(
+   const int level_number,
+   double* dx)
+
+{
+   if (!d_metrics_set[level_number]) {
+      TBOX_ERROR(
+         d_object_name << ":metrics have not been set.\n"
+         <<
+         "Use the alternative 'getDx()' method call that "
+         << "takes in the domain." << std::endl);
+   }
+
+   for (int i = 0; i < d_dim.getValue(); i++) {
+      dx[i] = d_dx[level_number][i];
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Access the block rotation
+ *                                                                       *
+ *************************************************************************
+ */
+
+int MblkGeometry::getBlockRotation(
+   const int block_number)
+
+{
+   return d_block_rotation[block_number];
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set the Cartesian metrics (dx)
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkGeometry::setCartesianMetrics(
+   const hier::Box& domain,
+   const int level_number)
+{
+   hier::Index lower(domain.lower());
+   hier::Index upper(domain.upper());
+   hier::Index diff(upper - lower + hier::Index(lower.getDim(), 1));
+
+   if (d_dx.getSize() < (level_number + 1)) {
+      d_dx.resizeArray(level_number + 1);
+      d_dx[level_number].resizeArray(d_dim.getValue());
+   }
+
+   /*
+    * Compute dx from first grid geometry block only.  Its assumed
+    * to be uniform across the multiple blocks.
+    */
+   for (int i = 0; i < d_dim.getValue(); i++) {
+      d_dx[level_number][i] =
+         (d_cart_xhi[0][i] - d_cart_xlo[0][i]) / (double)diff(i);
+   }
+
+   d_metrics_set[level_number] = true;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Build the Cartesian grid
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkGeometry::buildCartesianGridOnPatch(
+   const hier::Patch& patch,
+   const int xyz_id,
+   const int level_number,
+   const int block_number)
+{
+
+   tbox::Pointer<pdat::NodeData<double> > xyz =
+      patch.getPatchData(xyz_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!xyz.isNull());
+#endif
+
+   for (pdat::NodeIterator ni(patch.getBox()); ni; ni++) {
+      pdat::NodeIndex node = ni();
+      if (d_block_rotation[block_number] == 0) {
+
+         (*xyz)(node, 0) =
+            d_cart_xlo[block_number][0] + node(0) * d_dx[level_number][0];
+         (*xyz)(node, 1) =
+            d_cart_xlo[block_number][1] + node(1) * d_dx[level_number][1];
+         if (d_dim == tbox::Dimension(3)) {
+            (*xyz)(node, 2) =
+               d_cart_xlo[block_number][2] + node(2) * d_dx[level_number][2];
+         }
+      }
+      if (d_block_rotation[block_number] == 1) { // I sideways, J down
+
+         (*xyz)(node, 0) =
+            d_cart_xlo[block_number][0] - node(0) * d_dx[level_number][0];
+         (*xyz)(node, 1) =
+            d_cart_xlo[block_number][1] + node(1) * d_dx[level_number][1];
+         if (d_dim == tbox::Dimension(3)) {
+            (*xyz)(node, 2) =
+               d_cart_xlo[block_number][2] + node(2) * d_dx[level_number][2];
+         }
+      }
+
+   }
+
+#if 1
+   tbox::plog << "xyz locations...."
+              << "\tblock: " << block_number
+              << "\tlevel: " << level_number
+              << "\tpatch: " << patch.getLocalId()
+              << std::endl;
+
+   xyz->print(patch.getBox(), tbox::plog);
+#endif
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set the wedge metrics (dx)
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkGeometry::setWedgeMetrics(
+   const hier::Box& domain,
+   const int level_number)
+{
+
+   //
+   // Set dx (dr, dth, dz) for the level
+   //
+   d_dx.resizeArray(level_number + 1);
+   d_dx[level_number].resizeArray(d_dim.getValue());
+
+   double nr = (domain.upper(0) - domain.lower(0) + 1);
+   double nth = (domain.upper(1) - domain.lower(1) + 1);
+   d_dx[level_number][0] = (d_wedge_rmax[0] - d_wedge_rmin[0]) / nr;
+   d_dx[level_number][1] = (d_wedge_thmax - d_wedge_thmin) / nth;
+
+   if (d_dim == tbox::Dimension(3)) {
+      double nz = (domain.upper(2) - domain.lower(2) + 1);
+      d_dx[level_number][2] = (d_wedge_zmax - d_wedge_zmin) / nz;
+   }
+
+   d_metrics_set[level_number] = true;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Build the Wedge grid
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkGeometry::buildWedgeGridOnPatch(
+   const hier::Patch& patch,
+   const int xyz_id,
+   const int level_number,
+   const int block_number)
+{
+
+   tbox::Pointer<pdat::NodeData<double> > xyz =
+      patch.getPatchData(xyz_id);
+
+   TBOX_ASSERT(!xyz.isNull());
+
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+   hier::IntVector nghost_cells = xyz->getGhostCellWidth();
+
+   int nd_imin = ifirst(0) - nghost_cells(0);
+   int nd_imax = ilast(0) + 1 + nghost_cells(0);
+   int nd_jmin = ifirst(1) - nghost_cells(1);
+   int nd_jmax = ilast(1) + 1 + nghost_cells(1);
+   int nd_nx = nd_imax - nd_imin + 1;
+   int nd_ny = nd_jmax - nd_jmin + 1;
+   //int nd_nz   = nd_kmax - nd_kmin + 1;
+   int nd_nxny = nd_nx * nd_ny;
+   //int nd_nel  = nd_nx*nd_ny*nd_nz;
+
+   double dx[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   dx[0] = d_dx[level_number][0];
+   dx[1] = d_dx[level_number][1];
+
+   double* x = xyz->getPointer(0);
+   double* y = xyz->getPointer(1);
+
+   int nd_kmin;
+   int nd_kmax;
+   dx[2] = d_dx[level_number][2];
+   double* z = NULL;
+   if (d_dim == tbox::Dimension(3)) {
+      nd_kmin = ifirst(2) - nghost_cells(2);
+      nd_kmax = ilast(2) + 1 + nghost_cells(2);
+      dx[2] = d_dx[level_number][2];
+      z = xyz->getPointer(2);
+   } else {
+      nd_kmin = 0;
+      nd_kmax = 0;
+   }
+
+   //
+   // ----------- set the wedge nodal positions
+   //
+
+   for (int k = nd_kmin; k <= nd_kmax; k++) {
+      for (int j = nd_jmin; j <= nd_jmax; j++) {
+         for (int i = nd_imin; i <= nd_imax; i++) {
+
+            int ind = POLY3(i, j, k, nd_imin, nd_jmin, nd_kmin, nd_nx, nd_nxny);
+
+            double r = d_wedge_rmin[block_number] + dx[0] * (i);
+            double th = d_wedge_thmin + dx[1] * (j);
+
+            double xx = r * cos(th);
+            double yy = r * sin(th);
+
+            x[ind] = xx;
+            y[ind] = yy;
+
+            if (d_dim == tbox::Dimension(3)) {
+               double zz = d_wedge_zmin + dx[2] * (k);
+               z[ind] = zz;
+            }
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set the spherical shell metrics
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkGeometry::setSShellMetrics(
+   const hier::Box& domain,
+   const int level_number)
+{
+
+   //
+   // Set dx (drad, dth, dphi) for the level
+   //
+   d_dx.resizeArray(level_number + 1);
+   d_dx[level_number].resizeArray(d_dim.getValue());
+
+   double nrad = (domain.upper(0) - domain.lower(0) + 1);
+   double nth = (domain.upper(1) - domain.lower(1) + 1);
+   double nphi = 0;
+   if (d_dim == tbox::Dimension(3)) {
+      nphi = (domain.upper(2) - domain.lower(2) + 1);
+   }
+
+   /*
+    * If its a solid shell, its a single block and dx = dr, dth, dphi
+    */
+   if (d_sshell_type == "SOLID") {
+
+      d_dx[level_number][0] = (d_sshell_rmax - d_sshell_rmin) / nrad;
+      d_dx[level_number][1] =
+         2.0 * tbox::MathUtilities<double>::Abs(d_sangle_thmin) / nth;
+      if (d_dim == tbox::Dimension(3)) {
+         d_dx[level_number][2] =
+            2.0 * tbox::MathUtilities<double>::Abs(d_sangle_thmin) / nphi;
+      }
+   } else {
+      d_dx[level_number][0] = 0.0001;
+      d_dx[level_number][1] = 0.0001;
+      if (d_dim == tbox::Dimension(3)) {
+         d_dx[level_number][2] = 0.0001;
+      }
+   }
+
+   /*
+    * If its an OCTANT shell, then everything is set in the
+    * computeUnitSphereOctant() method so all we do here is allocate
+    * space for d_dx.
+    */
+   d_metrics_set[level_number] = true;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Build the spherical shell grid
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkGeometry::buildSShellGridOnPatch(
+   const hier::Patch& patch,
+   const hier::Box& domain,
+   const int xyz_id,
+   const int level_number,
+   const int block_number)
+{
+
+   bool xyz_allocated = patch.checkAllocated(xyz_id);
+   if (!xyz_allocated) {
+      TBOX_ERROR("xyz data not allocated" << std::endl);
+      //patch.allocatePatchData(xyz_id);
+   }
+
+   tbox::Pointer<pdat::NodeData<double> > xyz =
+      patch.getPatchData(xyz_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!xyz.isNull());
+#endif
+
+   if (d_dim == tbox::Dimension(3)) {
+
+      const hier::Index ifirst = patch.getBox().lower();
+      const hier::Index ilast = patch.getBox().upper();
+      hier::IntVector nghost_cells = xyz->getGhostCellWidth();
+
+      //int imin = ifirst(0);
+      //int imax = ilast(0)  + 1;
+      //int jmin = ifirst(1);
+      //int jmax = ilast(1)  + 1;
+      //int kmin = ifirst(2);
+      //int kmax = ilast(2)  + 1;
+      //int nx   = imax - imin + 1;
+      //int ny   = jmax - jmin + 1;
+      //int nxny = nx*ny;
+
+      int nd_imin = ifirst(0) - nghost_cells(0);
+      int nd_imax = ilast(0) + 1 + nghost_cells(0);
+      int nd_jmin = ifirst(1) - nghost_cells(1);
+      int nd_jmax = ilast(1) + 1 + nghost_cells(1);
+      int nd_kmin = ifirst(2) - nghost_cells(2);
+      int nd_kmax = ilast(2) + 1 + nghost_cells(2);
+      int nd_nx = nd_imax - nd_imin + 1;
+      int nd_ny = nd_jmax - nd_jmin + 1;
+      int nd_nxny = nd_nx * nd_ny;
+
+      double* x = xyz->getPointer(0);
+      double* y = xyz->getPointer(1);
+      double* z = xyz->getPointer(2);
+
+      bool found = false;
+
+      int nrad = (domain.upper(0) - domain.lower(0) + 1);
+      int nth = (domain.upper(1) - domain.lower(1) + 1);
+      int nphi = (domain.upper(2) - domain.lower(2) + 1);
+
+      /*
+       * If its a solid shell, its a single block and dx = dr, dth, dphi
+       */
+      if (d_sshell_type == "SOLID") {
+
+         d_dx[level_number][0] = (d_sshell_rmax - d_sshell_rmin) / (double)nrad;
+         d_dx[level_number][1] =
+            2.0 * tbox::MathUtilities<double>::Abs(d_sangle_thmin)
+            / (double)nth;
+         d_dx[level_number][2] =
+            2.0 * tbox::MathUtilities<double>::Abs(d_sangle_thmin)
+            / (double)nphi;
+
+         //
+         // step in a radial direction in x and set y and z appropriately
+         // for a solid angle we go -th to th and -phi to phi
+         //
+         for (int k = nd_kmin; k <= nd_kmax; k++) {
+            for (int j = nd_jmin; j <= nd_jmax; j++) {
+
+               double theta = d_sangle_thmin + j * d_dx[level_number][1]; // dx used for dth
+               double phi = d_sangle_thmin + k * d_dx[level_number][2];
+
+               double xface = cos(theta) * cos(phi);
+               double yface = sin(theta) * cos(phi);
+               double zface = sin(phi);
+
+               for (int i = nd_imin; i <= nd_imax; i++) {
+
+                  int ind = POLY3(i,
+                        j,
+                        k,
+                        nd_imin,
+                        nd_jmin,
+                        nd_kmin,
+                        nd_nx,
+                        nd_nxny);
+
+                  double r = d_sshell_rmin + d_dx[level_number][0] * (i);
+
+                  double xx = r * xface;
+                  double yy = r * yface;
+                  double zz = r * zface;
+
+                  x[ind] = xx;
+                  y[ind] = yy;
+                  z[ind] = zz;
+               }
+            }
+         }
+
+         found = true;
+      }
+
+      /*
+       * If its an octant problem, then its got multiple (three) blocks
+       */
+      if (d_sshell_type == "OCTANT") {
+
+         double drad = (d_sshell_rmax - d_sshell_rmin) / nrad;
+
+         //
+         // as in the solid angle we go along a radial direction in
+         // x setting y and z appropriately, but here we have logic for
+         // the block we are in.  This is contained in the dispOctant.m
+         // matlab code.
+         //
+         for (int k = nd_kmin; k <= nd_kmax; k++) {
+            for (int j = nd_jmin; j <= nd_jmax; j++) {
+
+               //
+               // compute the position on the unit sphere for our radial line
+               //
+               double xface, yface, zface;
+               computeUnitSphereOctant(block_number, nth, j, k,
+                  &xface, &yface, &zface);
+
+               for (int i = nd_imin; i <= nd_imax; i++) {
+                  int ind = POLY3(i,
+                        j,
+                        k,
+                        nd_imin,
+                        nd_jmin,
+                        nd_kmin,
+                        nd_nx,
+                        nd_nxny);
+
+                  double r = d_sshell_rmin + drad * (i);
+
+                  double xx = r * xface;
+                  double yy = r * yface;
+                  double zz = r * zface;
+
+                  x[ind] = xx;
+                  y[ind] = yy;
+                  z[ind] = zz;
+               }
+            }
+         }
+         found = true;
+      }
+
+      if (!found) {
+         TBOX_ERROR(
+            d_object_name << ": "
+            << "spherical shell nodal positions for "
+            << d_sshell_type
+            << " not found" << std::endl);
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * For a given j, k, compute the position on the unit sphere with
+ * the supplied block number.  "nth" is the number of cells in the theta
+ * direction (it should be the same for all blocks).  The three faces
+ * "xface", "yface", "zface" are the different block faces.  The
+ * code that performs this operation is in Dave's dispOctant.m matlab
+ * code.
+ *                                                                       *
+ *************************************************************************
+ */
+void MblkGeometry::computeUnitSphereOctant(
+   int nblock,
+   int nth,
+   int j,
+   int k,
+   double* xface,
+   double* yface,
+   double* zface)
+{
+   static int jmn[3] = { 0, 0, 2 }; // matrix of rotations
+   static int jmx[3] = { 1, 1, 1 };
+   static int kmn[3] = { 0, 1, 0 };
+   static int kmx[3] = { 2, 2, 2 };
+
+   //
+   // coefficients are of the form
+   //
+   // jto = j0 + jslp*jfrom + k0 + kslp*kfrom
+   // kto = j0 + jslp*jfrom + k0 + kslp*kfrom
+
+   static int jcoef[3][3][4] = // how to convert j from one block to another
+                               // [from][to][4]
+   { { { 0, 1, 0, 0 },         // [0][0]
+       { -nth, 1, 0, 0 },    // [0][1]
+       { 0, 0, 0, 1 } },       // [0][2]
+
+     { { nth, 1, 0, 0 },      // [1][0]
+       { 0, 1, 0, 0 },       // [1][1]
+       { 0, 0, nth, -1 } },    // [1][2]
+
+     { { 0, 0, 2 * nth, -1 }, // [2][0]
+       { 0, 0, 1, 0 },       // [2][1]
+       { nth, -1, 0, 0 } } };  // [2][2]
+
+   static int kcoef[3][3][4] = // the k conversion
+   { { { 0, 0, 0, 1 },        // [0][0]
+       { 0, 0, 0, 1 },       // [0][1]
+       { 0, 0, 2 * nth, -1 } }, // [0][2]
+
+     { { 0, 0, 0, 1 },        // [1][0]
+       { 0, 0, 0, 1 },       // [1][1]
+       { 0, 0, 2 * nth, -1 } }, // [1][2]
+
+     { { 0, 1, 0, 0 },        // [2][0]
+       { 2 * nth, -1, 0, 0 }, // [2][1]
+       { 0, 0, 0, 1 } } };    // [2][2]
+
+   static double pio4 = 0.25 * 3.14159265358979325873406851315;
+
+   //
+   // decide which position in the unit sphere we break out on
+   //
+   // nblock = 1, xface = 2, yface, = 3, zface
+
+   int tb = nblock;
+   int tj = j;
+   int tk = k;
+
+   int sb = tb;
+   int ttj = tj;
+   int ttk = tk;
+   if (j < 0) {
+      tb = jmn[sb];
+      tj = jcoef[sb][tb][0] + jcoef[sb][tb][1] * ttj + jcoef[sb][tb][2]
+         + jcoef[sb][tb][3] * ttk;
+      tk = kcoef[sb][tb][0] + kcoef[sb][tb][1] * ttj + kcoef[sb][tb][2]
+         + kcoef[sb][tb][3] * ttk;
+   }
+
+   sb = tb;
+   ttj = tj;
+   ttk = tk;
+   if (j > nth) {
+      tb = jmx[sb];
+      tj = jcoef[sb][tb][0] + jcoef[sb][tb][1] * ttj + jcoef[sb][tb][2]
+         + jcoef[sb][tb][3] * ttk;
+      tk = kcoef[sb][tb][0] + kcoef[sb][tb][1] * ttj + kcoef[sb][tb][2]
+         + kcoef[sb][tb][3] * ttk;
+   }
+
+   sb = tb;
+   ttj = tj;
+   ttk = tk;
+   if (k < 0) {   // this catches corner terms now
+      tb = kmn[sb];
+      tj = jcoef[sb][tb][0] + jcoef[sb][tb][1] * ttj + jcoef[sb][tb][2]
+         + jcoef[sb][tb][3] * ttk;
+      tk = kcoef[sb][tb][0] + kcoef[sb][tb][1] * ttj + kcoef[sb][tb][2]
+         + kcoef[sb][tb][3] * ttk;
+   }
+
+   sb = tb;
+   ttj = tj;
+   ttk = tk;
+   if (k > nth) {
+      tb = kmx[sb];
+      tj = jcoef[sb][tb][0] + jcoef[sb][tb][1] * ttj + jcoef[sb][tb][2]
+         + jcoef[sb][tb][3] * ttk;
+      tk = kcoef[sb][tb][0] + kcoef[sb][tb][1] * ttj + kcoef[sb][tb][2]
+         + kcoef[sb][tb][3] * ttk;
+   }
+
+   //
+   // once we know where we are in our block, we can return our position on the unit sphere
+   //
+   if (tb == 0) {   // we go along an x face  (block 0)
+      double lj = tj / (double)nth;
+      double lk = tk / (double)nth;
+
+      double sz = sin(pio4 * lj);
+      double cz = cos(pio4 * lj);
+      double sy = sin(pio4 * lk);
+      double cy = cos(pio4 * lk);
+
+      double den = sqrt(1. - sy * sy * sz * sz);
+
+      *xface = cy * cz / den;
+      *yface = cy * sz / den;
+      *zface = sy * cz / den;
+   } else if (tb == 1) { // a y face (block 1)
+      double li = 1 - tj / (double)nth;
+      double lk = tk / (double)nth;
+
+      double sx = sin(pio4 * lk);
+      double cx = cos(pio4 * lk);
+      double sz = sin(pio4 * li);
+      double cz = cos(pio4 * li);
+
+      double den = sqrt(1. - sx * sx * sz * sz);
+
+      *xface = cx * sz / den;
+      *yface = cx * cz / den;
+      *zface = sx * cz / den;
+   } else if (tb == 2) { // a z face (block 2)
+      double li = tj / (double)nth; // 1 - tj;
+      double lj = tk / (double)nth; // 1 - tk;
+
+      double sx = sin(pio4 * lj);
+      double cx = cos(pio4 * lj);
+      double sy = sin(pio4 * li);
+      double cy = cos(pio4 * li);
+
+      double den = sqrt(1. - sx * sx * sy * sy);
+
+      *xface = cx * sy / den;
+      *yface = sx * cy / den;
+      *zface = cx * cy / den;
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute the rotations for the particular block number.  The
+ * "local_blocks" argument is basically saying who is the ne
+ *                                                                       *
+ *************************************************************************
+ */
+void computeBlocksOctant(
+   const hier::Box& bb,
+   int local_blocks[6],
+   int nblock,
+   int nth)
+{
+   const hier::Index ifirst = bb.lower();
+   const hier::Index ilast = bb.upper();
+
+   local_blocks[0] = nblock; // imin stays local
+   local_blocks[3] = nblock; // jmin stays local
+
+   static int jmn[3] = { 0, 0, 2 }; // matrix of rotations
+   static int jmx[3] = { 1, 1, 1 };
+   static int kmn[3] = { 0, 1, 0 };
+   static int kmx[3] = { 2, 2, 2 };
+
+   //
+   // bounds of the patch zones go from 0 to nth-1
+   //
+   if (ifirst(1) <= 0) local_blocks[1] = jmn[nblock];
+   if (ifirst(2) <= 0) local_blocks[2] = kmn[nblock];
+
+   if (ilast(1) >= nth - 1) local_blocks[4] = jmx[nblock];
+   if (ilast(2) >= nth - 1) local_blocks[5] = kmx[nblock];
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/MblkGeometry.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/MblkGeometry.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,251 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   set geometry for multiblock domain 
+ *
+ ************************************************************************/
+
+#ifndef included_MblkGeometryXD
+#define included_MblkGeometryXD
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Serializable.h"
+#include "SAMRAI/geom/BlockGridGeometry.h"
+
+using namespace SAMRAI;
+
+/*!
+ * This class creates the mapped multi-block grid geometry used
+ * for calculations in the MblkLinAdv code.  The supported grid types
+ * include Cartesian, Wedge, and Spherical shell.  The spherical shell
+ * case is a full multi-block grid with 3 blocks.
+ */
+class MblkGeometry
+{
+public:
+   /*!
+    * Reads geometry information from the "MblkGeometry" input file
+    * entry.
+    */
+   MblkGeometry(
+      const std::string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> input_db,
+      const int nblocks);
+
+   ~MblkGeometry();
+
+   /*!
+    * Return the geometry type (CARTESIAN, WEDGE, or SPHERICAL_SHELL)
+    */
+   std::string
+   getGeometryType();
+
+   /*!
+    * Return the user-specified refine boxes, given a block and
+    * level number
+    */
+   bool
+   getRefineBoxes(
+      hier::BoxArray& refine_boxes,
+      const int block_number,
+      const int level_number);
+
+   /*!
+    * Build mapped grid on patch.  The method defers the actual grid
+    * construction to private members, depending on the geometry
+    * choice in input.
+    */
+   void
+   buildGridOnPatch(
+      const hier::Patch& patch,
+      const hier::Box& domain,
+      const int xyz_id,
+      const int level_number,
+      const int block_number);
+
+   /*!
+    * Access the stored dx
+    */
+
+   void
+   getDx(
+      const hier::Box& domain,
+      const int level_number,
+      double* dx);
+
+   void
+   getDx(
+      const int level_number,
+      double* dx);
+
+   /*!
+    * Access the block rotation
+    */
+   int
+   getBlockRotation(
+      const int block_number);
+
+   /*!
+    * Tag cells for the octant problem.
+    */
+   void
+   tagOctantCells(
+      hier::Patch& patch,
+      const int xyz_id,
+      tbox::Pointer<pdat::CellData<int> >& temp_tags,
+      const double regrid_time,
+      const int refine_tag_val);
+
+private:
+   /*
+    * Read data members from input.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> input_db,
+      bool is_from_restart);
+
+   /*
+    * Cartesian grid construction.
+    */
+   void
+   setCartesianMetrics(
+      const hier::Box& domain,
+      const int level_number);
+
+   void
+   buildCartesianGridOnPatch(
+      const hier::Patch& patch,
+      const int xyz_id,
+      const int level_number,
+      const int block_number);
+
+   /*
+    * Wedge grid construction.
+    */
+   void
+   setWedgeMetrics(
+      const hier::Box& domain,
+      const int level_number);
+
+   void
+   buildWedgeGridOnPatch(
+      const hier::Patch& patch,
+      const int xyz_id,
+      const int level_number,
+      const int block_number);
+
+   /*
+    * Spherical shell grid construction
+    */
+   void
+   setSShellMetrics(
+      const hier::Box& domain,
+      const int level_number);
+
+   void
+   buildSShellGridOnPatch(
+      const hier::Patch& patch,
+      const hier::Box& domain,
+      const int xyz_id,
+      const int level_number,
+      const int block_number);
+
+   /*
+    * For the spherical shell construction, i always points in the r direction
+    * and j,k are points on the shell.  Given a certain j,k compute the
+    * unit sphere locations for block face (actual xyz is computed
+    * by x = r*xface, y = r*yface, z = r*zface.  Note that the dimension
+    * in the theta direction (nth) should be the same for each block.
+    */
+   void
+   computeUnitSphereOctant(
+      int nblock,
+      int nth,
+      int j,
+      int k,
+      double* xface,
+      double* yface,
+      double* zface);
+
+   /*
+    * Geometry type.  Choices are CARTESIAN, WEDGE, SPHERICAL_SHELL
+    */
+   std::string d_geom_problem;
+   std::string d_object_name;
+
+   const tbox::Dimension d_dim;
+
+   /*
+    * The number of blocks and the set of skelton grid geometries that make
+    * up a multiblock mesh.
+    */
+   int d_nblocks;
+   tbox::Array<bool> d_metrics_set;
+
+   /*
+    * The grid spacing.  For cartesian, d_dx = (dx,dy,dz).  For wedge,
+    * d_dx = (dr, dth, dz). For spherical shell, d_dx = (dr, dth, dphi)
+    */
+   tbox::Array<tbox::Array<double> > d_dx;
+
+   /*
+    * Cartesian inputs
+    */
+   tbox::Array<tbox::Array<double> > d_cart_xlo;
+   tbox::Array<tbox::Array<double> > d_cart_xhi;
+
+   /*
+    * Wedge inputs
+    */
+   tbox::Array<double> d_wedge_rmin;
+   tbox::Array<double> d_wedge_rmax;
+   double d_wedge_thmin;
+   double d_wedge_thmax;
+   double d_wedge_zmin;
+   double d_wedge_zmax;
+
+   /*
+    * Shell inputs
+    */
+   double d_sshell_rmin;
+   double d_sshell_rmax;
+
+   // options are SOLID, OCTANT
+   std::string d_sshell_type;
+
+   /*
+    * For tagging in the spherical octant case
+    */
+   double d_tag_velocity;
+   double d_tag_width;
+
+   // if SOLID, need to read in these...
+   double d_sangle_degrees;
+   double d_sangle_thmin;
+
+   /*
+    * Specify block rotation.
+    */
+   tbox::Array<int> d_block_rotation;
+
+   /*
+    * Refine boxes for different blocks/levels
+    */
+   tbox::Array<tbox::Array<hier::BoxArray> > d_refine_boxes;
+
+};
+
+#endif // included_MblkGeometry
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/MblkHyperbolicLevelIntegrator.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/MblkHyperbolicLevelIntegrator.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,2694 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Integration routines for single level in AMR hierarchy
+ *                (basic hyperbolic systems) 
+ *
+ ************************************************************************/
+
+#include "MblkHyperbolicLevelIntegrator.h"
+
+#include <stdlib.h>
+#include <fstream>
+#include <string>
+using namespace std;
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/hier/MultiblockPatchLevelIterator.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/hier/PatchDataFactory.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceDataFactory.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/pdat/OuterfaceData.h"
+#include "SAMRAI/pdat/OuterfaceVariable.h"
+#include "SAMRAI/pdat/OutersideData.h"
+#include "SAMRAI/pdat/OutersideVariable.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/SideDataFactory.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/xfer/CoarsenSchedule.h"
+
+//#define RECORD_STATS
+#undef RECORD_STATS
+#ifdef RECORD_STATS
+#include "SAMRAI/tbox/Statistic.h"
+#include "SAMRAI/tbox/Statistician.h"
+#endif
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN 77 routines used in flux            *
+ * synchronization process between hierarchy levels.                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+extern "C" {
+// in upfluxsum.m4:
+
+void F77_FUNC(upfluxsumface2d0, UPFLUXSUMFACE2D0) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double *, double *);
+void F77_FUNC(upfluxsumface2d1, UPFLUXSUMFACE2D1) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double *, double *);
+void F77_FUNC(upfluxsumside2d0, UPFLUXSUMSIDE2D0) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double *, double *);
+void F77_FUNC(upfluxsumside2d1, UPFLUXSUMSIDE2D1) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double *, double *);
+
+void F77_FUNC(upfluxsumface3d0, UPFLUXSUMFACE3D0) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &,
+   const double *, double *);
+void F77_FUNC(upfluxsumface3d1, UPFLUXSUMFACE3D1) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &,
+   const double *, double *);
+void F77_FUNC(upfluxsumface3d2, UPFLUXSUMFACE3D2) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &,
+   const double *, double *);
+void F77_FUNC(upfluxsumside3d0, UPFLUXSUMSIDE3D0) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &,
+   const double *, double *);
+void F77_FUNC(upfluxsumside3d1, UPFLUXSUMSIDE3D1) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &,
+   const double *, double *);
+void F77_FUNC(upfluxsumside3d2, UPFLUXSUMSIDE3D2) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &,
+   const double *, double *);
+}
+
+#ifndef NULL
+#define NULL (0)
+#endif
+
+#define ALGS_HYPERBOLIC_LEVEL_INTEGRATOR_VERSION (3)
+
+using namespace SAMRAI;
+using namespace algs;
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * This constructor sets the HyperbolicPatchStrategy pointer and   *
+ * initializes integration parameters to default values.  Communication  *
+ * algorithms are created here too.  Other data members are read in     *
+ * from the input database or from the restart database corresponding    *
+ * to the specified object_name.                                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+MblkHyperbolicLevelIntegrator::MblkHyperbolicLevelIntegrator(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> input_db,
+   MblkHyperbolicPatchStrategy* patch_strategy,
+   tbox::Pointer<hier::MultiblockPatchHierarchy>& mblk_hierarchy,
+   bool register_for_restart,
+   bool use_time_refinement):
+   d_dim(dim)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!input_db.isNull());
+   TBOX_ASSERT(patch_strategy != ((MblkHyperbolicPatchStrategy *)NULL));
+#endif
+
+   d_object_name = object_name;
+   d_use_time_refinement = use_time_refinement;
+   d_registered_for_restart = register_for_restart;
+
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->
+      registerRestartItem(d_object_name, this);
+   }
+
+   d_patch_strategy = patch_strategy;
+
+   /*
+    * Default parameter values.
+    */
+   d_number_time_data_levels = 2;
+
+   d_flux_is_face = true;
+   d_flux_face_registered = false;
+   d_flux_side_registered = false;
+
+   d_have_flux_on_level_zero = false;
+
+   d_lag_dt_computation = true;
+   d_use_ghosts_for_dt = false;
+   d_distinguish_mpi_reduction_costs = false;
+
+   d_cfl = tbox::MathUtilities<double>::getSignalingNaN();
+   d_cfl_init = tbox::MathUtilities<double>::getSignalingNaN();
+
+   /*
+    * Communication algorithms.
+    */
+   // "regular" single hierarchy Coarsen/Refine algs
+   d_coarsen_rich_extrap_init = new xfer::CoarsenAlgorithm(dim);
+   d_coarsen_rich_extrap_final = new xfer::CoarsenAlgorithm(dim);
+
+   // multi-block versions of Coarsen/Refine algs
+   d_mblk_bdry_fill_advance =
+      new xfer::MultiblockRefineAlgorithm(mblk_hierarchy, d_dim);
+   d_mblk_bdry_fill_advance_new =
+      new xfer::MultiblockRefineAlgorithm(mblk_hierarchy, d_dim);
+   d_mblk_bdry_fill_advance_old =
+      new xfer::MultiblockRefineAlgorithm(mblk_hierarchy, d_dim);
+   d_mblk_fill_new_level =
+      new xfer::MultiblockRefineAlgorithm(mblk_hierarchy, d_dim);
+   d_mblk_coarsen_fluxsum =
+      new xfer::MultiblockCoarsenAlgorithm(mblk_hierarchy);
+   d_mblk_coarsen_sync_data =
+      new xfer::MultiblockCoarsenAlgorithm(mblk_hierarchy);
+   d_mblk_sync_initial_data =
+      new xfer::MultiblockCoarsenAlgorithm(mblk_hierarchy);
+
+   /*
+    * hier::Variable contexts used in algorithm.  Note that "OLD" context
+    * is only created and used in the case of Richardson extrapolation
+    * and a refinement ratio of 3 (see registerModelVariables()).
+    */
+   d_scratch = hier::VariableDatabase::getDatabase()->getContext("SCRATCH");
+   d_current = hier::VariableDatabase::getDatabase()->getContext("CURRENT");
+   d_new = hier::VariableDatabase::getDatabase()->getContext("NEW");
+
+   d_plot_context = d_current;
+
+   /*
+    * Timers:  one for each of the communication algorithms ("create"
+    * indicates schedule creation, "comm" indicates communication)
+    */
+   t_advance_bdry_fill_comm = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::advance_bdry_fill_comm");
+   t_error_bdry_fill_create = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::error_bdry_fill_create");
+   t_error_bdry_fill_comm = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::error_bdry_fill_comm");
+   t_mpi_reductions = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::mpi_reductions");
+   t_initialize_level_data = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::initializeLevelData()");
+   t_fill_new_level_create = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::fill_new_level_create");
+   t_fill_new_level_comm = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::fill_new_level_comm");
+   t_advance_bdry_fill_create = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::advance_bdry_fill_create");
+   t_new_advance_bdry_fill_create = tbox::TimerManager::getManager()->
+      getTimer(
+         "algs::MblkHyperbolicLevelIntegrator::new_advance_bdry_fill_create");
+   t_apply_gradient_detector = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::applyGradientDetector()");
+   t_coarsen_rich_extrap = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::coarsen_rich_extrap");
+   t_get_level_dt = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::getLevelDt()");
+   t_get_level_dt_sync = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::getLevelDt()_sync");
+   t_advance_level = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::advanceLevel()");
+   t_new_advance_bdry_fill_comm = tbox::TimerManager::getManager()->
+      getTimer(
+         "algs::MblkHyperbolicLevelIntegrator::new_advance_bdry_fill_comm");
+   t_patch_num_kernel = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::patch_numerical_kernels");
+   t_advance_level_sync = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::advanceLevel()_sync");
+   t_std_level_sync = tbox::TimerManager::getManager()->
+      getTimer(
+         "algs::MblkHyperbolicLevelIntegrator::standardLevelSynchronization()");
+   t_sync_new_levels = tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::synchronizeNewLevels()");
+
+   /*
+    * Initialize object with data read from the input and restart databases.
+    */
+
+   bool from_restart = tbox::RestartManager::getManager()->isFromRestart();
+   if (from_restart) {
+      getFromRestart();
+   }
+   getFromInput(input_db, from_restart);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destructor tells the tbox::RestartManager to remove this object from   *
+ * the list of restart items.                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+MblkHyperbolicLevelIntegrator::~MblkHyperbolicLevelIntegrator()
+{
+   if (d_registered_for_restart) {
+      tbox::RestartManager::getManager()->unregisterRestartItem(d_object_name);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialize integration data on all patches on level.  This process    *
+ * is used at the start of the simulation to set the initial hierarchy   *
+ * data and after adaptive regridding.  In the second case, the old      *
+ * level pointer points to the level that existed in the hierarchy       *
+ * before regridding.  This pointer may be null, in which case it is     *
+ * ignored.  If it is non-null, then data is copied from the old level   *
+ * to the new level before the old level is discarded.                   *
+ *                                                                       *
+ * Note that we also allocate flux storage for the coarsest AMR          *
+ * hierarchy level here (i.e., level 0).  The time step sequence on      *
+ * level 0 is dictated by the user code; so to avoid any memory          *
+ * management errors, flux storage on level 0 persists as long as the    *
+ * level does.
+ *                                                                       *
+ *************************************************************************
+ */
+void MblkHyperbolicLevelIntegrator::initializeLevelData(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const double init_data_time,
+   const bool can_be_refined,
+   const bool initial_time,
+   const tbox::Pointer<hier::BasePatchLevel> old_level,
+   const bool allocate_data)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= hierarchy->getFinestLevelNumber()));
+   if (!(old_level.isNull())) {
+      TBOX_ASSERT(level_number == old_level->getLevelNumber());
+   }
+   TBOX_ASSERT(!(hierarchy->getPatchLevel(level_number)).isNull());
+#endif
+
+   t_initialize_level_data->start();
+
+   tbox::Pointer<hier::MultiblockPatchHierarchy> mblk_hierarchy =
+      hierarchy;
+
+   tbox::Pointer<hier::MultiblockPatchLevel> mblk_level =
+      mblk_hierarchy->getPatchLevel(level_number);
+
+   tbox::Pointer<hier::MultiblockPatchLevel> mblk_old_level =
+      old_level;
+
+   /*
+    * Allocate storage needed to initialize level and fill data
+    * from coarser levels in AMR hierarchy, potentially. Since
+    * time gets set when we allocate data, re-stamp it to current
+    * time if we don't need to allocate.
+    */
+   if (allocate_data) {
+      mblk_level->allocatePatchData(d_new_patch_init_data, init_data_time);
+      mblk_level->allocatePatchData(d_old_time_dep_data, init_data_time);
+   } else {
+      mblk_level->setTime(init_data_time, d_new_patch_init_data);
+   }
+
+   /*
+    * Create schedules for filling new level and fill data.
+    */
+
+   if ((level_number > 0) || !old_level.isNull()) {
+      t_fill_new_level_create->start();
+
+      tbox::Pointer<xfer::MultiblockRefineSchedule> sched =
+         d_mblk_fill_new_level->createSchedule(mblk_level,
+            mblk_old_level,
+            level_number - 1,
+            mblk_hierarchy,
+            d_patch_strategy);
+      t_fill_new_level_create->stop();
+
+      d_patch_strategy->setDataContext(d_scratch);
+
+      t_fill_new_level_comm->start();
+      sched->fillData(init_data_time);
+      t_fill_new_level_comm->stop();
+
+      d_patch_strategy->clearDataContext();
+   }
+
+   if ((d_number_time_data_levels == 3) && can_be_refined) {
+
+      hier::VariableDatabase* variable_db =
+         hier::VariableDatabase::getDatabase();
+
+      for (hier::MultiblockPatchLevelIterator mi(mblk_level); mi; mi++) {
+
+         tbox::List<tbox::Pointer<hier::Variable> >::Iterator
+         time_dep_var = d_time_dep_variables.listStart();
+         while (time_dep_var) {
+            int old_indx =
+               variable_db->mapVariableAndContextToIndex(time_dep_var(),
+                  d_old);
+            int cur_indx =
+               variable_db->mapVariableAndContextToIndex(time_dep_var(),
+                  d_current);
+
+            (*mi)->setPatchData(old_indx, (*mi)->getPatchData(cur_indx));
+
+            time_dep_var++;
+         }
+      }
+
+   } // loop over patches
+
+   /*
+    * Initialize data on patch interiors.
+    */
+   d_patch_strategy->setDataContext(d_current);
+
+   for (hier::MultiblockPatchLevelIterator mi(mblk_level); mi; mi++) {
+
+      d_patch_strategy->setBlockNumber(mi.getBlockNumber());
+
+      (*mi)->allocatePatchData(d_temp_var_scratch_data, init_data_time);
+
+      d_patch_strategy->initializeDataOnPatch(**mi,
+         init_data_time,
+         initial_time);
+
+      (*mi)->deallocatePatchData(d_temp_var_scratch_data);
+
+      d_patch_strategy->clearBlockNumber();
+
+   } // loop over patches
+
+   d_patch_strategy->clearDataContext();
+
+   //d_mblk_fill_new_level.setNull();
+
+   t_initialize_level_data->stop();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Reset hierarchy configuration information where the range of new      *
+ * hierarchy levels is specified.   The information updated involves     *
+ * the cached communication schedules maintained by the algorithm.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+MblkHyperbolicLevelIntegrator::resetHierarchyConfiguration(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (coarsest_level <= finest_level)
+      && (finest_level <= hierarchy->getFinestLevelNumber()));
+   for (int ln0 = 0; ln0 <= finest_level; ln0++) {
+      TBOX_ASSERT(!(hierarchy->getPatchLevel(ln0)).isNull());
+   }
+#else
+   NULL_USE(finest_level);
+#endif
+
+   tbox::Pointer<hier::MultiblockPatchHierarchy> mblk_hierarchy =
+      hierarchy;
+
+   int finest_hiera_level = hierarchy->getFinestLevelNumber();
+
+   d_mblk_bdry_sched_advance.resizeArray(finest_hiera_level + 1);
+   d_mblk_bdry_sched_advance_new.resizeArray(finest_hiera_level + 1);
+
+   for (int ln = coarsest_level; ln <= finest_hiera_level; ln++) {
+      tbox::Pointer<hier::MultiblockPatchLevel>
+      mblk_level = mblk_hierarchy->getPatchLevel(ln);
+
+      t_advance_bdry_fill_create->start();
+      d_mblk_bdry_sched_advance[ln] =
+         d_mblk_bdry_fill_advance->createSchedule(mblk_level,
+            ln - 1,
+            mblk_hierarchy,
+            d_patch_strategy);
+      t_advance_bdry_fill_create->stop();
+
+      if (!d_lag_dt_computation && d_use_ghosts_for_dt) {
+         t_new_advance_bdry_fill_create->start();
+         d_mblk_bdry_sched_advance_new[ln] =
+            d_mblk_bdry_fill_advance_new->createSchedule(mblk_level,
+               ln - 1,
+               mblk_hierarchy,
+               d_patch_strategy);
+         t_new_advance_bdry_fill_create->stop();
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Call patch routines to tag cells near large gradients.                *
+ * These cells will be refined.                                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkHyperbolicLevelIntegrator::applyGradientDetector(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const double error_data_time,
+   const int tag_index,
+   const bool initial_time,
+   const bool uses_richardson_extrapolation_too)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= hierarchy->getFinestLevelNumber()));
+   TBOX_ASSERT(!(hierarchy->getPatchLevel(level_number)).isNull());
+#endif
+
+   t_apply_gradient_detector->start();
+
+   tbox::Pointer<hier::MultiblockPatchHierarchy> mblk_hierarchy =
+      hierarchy;
+
+   tbox::Pointer<hier::MultiblockPatchLevel> mblk_level =
+      mblk_hierarchy->getPatchLevel(level_number);
+
+   mblk_level->allocatePatchData(d_saved_var_scratch_data, error_data_time);
+
+   d_patch_strategy->setDataContext(d_scratch);
+
+   t_error_bdry_fill_comm->start();
+   d_mblk_bdry_sched_advance[level_number]->fillData(error_data_time);
+   t_error_bdry_fill_comm->stop();
+
+   for (hier::MultiblockPatchLevelIterator mi(mblk_level); mi; mi++) {
+
+      d_patch_strategy->setBlockNumber(mi.getBlockNumber());
+
+      d_patch_strategy->
+      tagGradientDetectorCells(**mi,
+         error_data_time,
+         initial_time,
+         tag_index,
+         uses_richardson_extrapolation_too);
+
+      d_patch_strategy->clearBlockNumber();
+
+   } // loop over patches
+
+   d_patch_strategy->clearDataContext();
+
+   mblk_level->deallocatePatchData(d_saved_var_scratch_data);
+
+   t_apply_gradient_detector->stop();
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The Richardson extrapolation algorithm requires a coarsened version   *
+ * of the level on which error estiamtion is performed.  This routine    *
+ * is used to coarsen data from a level in the AMR hierarchy to some     *
+ * coarsened version of it.  Note that this routine will be called twice *
+ * The init_coarse_level boolean argument indicates whether data is    *
+ * set on the coarse level by coarsening the "old" time level solution   *
+ * or by coarsening the "new" solution on the fine level (i.e., after    *
+ * it has been advanced).                                                *
+ *                                                                       *
+ * The contexts used for coarsening old data depends on the number of    *
+ * time levels.  We always want to use data at the oldest time on the    *
+ * fine level, coarsened to the CURRENT context on the coarse level.     *
+ * Thus, if the problem uses two time levels, we coarsen data from       *
+ * CURRENT on fine level (since CURRENT is the oldest time maintained)   *
+ * to CURRENT on the coarse level.  If the problem uses three time       *
+ * levels, we coarsen from OLD on the fine level (since OLD is the       *
+ * time maintained) to CURRENT on the coarse level.                      *
+ *                                                                       *
+ * When the boolean is false, indicating we are operating at the new     *
+ * time, we coarsen the time advanced solution at the NEW context on     *
+ * the fine level to the NEW context on the coarse level so that they    *
+ * may be compared later.                                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+/*
+ *  ANDY, THIS ROUTINE HAS TO BE CHANGED TO TAKE IN MultiblockPatchLevels
+ *  WHEN WE GET READY TO DO RICHARDSON EXTRAPOLATION. 7/05
+ */
+void
+MblkHyperbolicLevelIntegrator::coarsenDataForRichardsonExtrapolation(
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int level_number,
+   const tbox::Pointer<hier::PatchLevel> coarse_level,
+   const double coarsen_data_time,
+   const bool before_advance)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= hierarchy->getFinestLevelNumber()));
+   TBOX_ASSERT(!(hierarchy->getPatchLevel(level_number)).isNull());
+   TBOX_ASSERT(!coarse_level.isNull());
+#endif
+   t_coarsen_rich_extrap->start();
+
+   tbox::Pointer<hier::PatchLevel> level =
+      hierarchy->getPatchLevel(level_number);
+
+   if (before_advance) {
+
+      coarse_level->allocatePatchData(d_new_patch_init_data,
+         coarsen_data_time);
+
+      if (d_number_time_data_levels == 3) {
+         d_patch_strategy->setDataContext(d_old);
+      } else {
+         d_patch_strategy->setDataContext(d_current);
+      }
+
+      TBOX_ERROR("Incomplete DLBG code.");
+//      d_coarsen_rich_extrap_init->
+//         createSchedule(coarse_level, level, d_patch_strategy)->
+//            coarsenData();
+
+      d_patch_strategy->clearDataContext();
+
+   } else {
+
+      coarse_level->allocatePatchData(d_new_time_dep_data,
+         coarsen_data_time);
+
+      d_patch_strategy->setDataContext(d_new);
+
+      TBOX_ERROR("Incomplete DLBG code.");
+//      d_coarsen_rich_extrap_final->
+//         createSchedule(coarse_level, level, d_patch_strategy)->
+//         coarsenData();
+
+      d_patch_strategy->clearDataContext();
+
+   }
+
+   t_coarsen_rich_extrap->stop();
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Call patch routines to tag cells for refinement using Richardson      *
+ * extrapolation.    Richardson extrapolation requires two copies of     *
+ * the solution to compare.  The NEW context holds the solution          *
+ * computed on the fine level and coarsened, whereas the CURRENT         *
+ * context holds the solution integrated on the coarse level after       *
+ * coarsening the initial data from the fine level.                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+/*
+ *  ANDY, THIS ROUTINE HAS TO BE CHANGED TO TAKE IN MultiblockPatchLevels
+ *  WHEN WE GET READY TO DO RICHARDSON EXTRAPOLATION. 7/05
+ */
+void
+MblkHyperbolicLevelIntegrator::applyRichardsonExtrapolation(
+   const tbox::Pointer<hier::PatchLevel> level,
+   const double error_data_time,
+   const int tag_index,
+   const double deltat,
+   const int error_coarsen_ratio,
+   const bool initial_time,
+   const bool uses_gradient_detector_too)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!level.isNull());
+#endif
+   /*
+    * Compare solutions computed on level (stored in NEW context) and on
+    * the coarser level (stored in CURR context) on the patches of the
+    * coarser level.  The patch strategy implements the compare operations
+    * performed on each patch.
+    */
+
+   int error_level_number =
+      level->getLevelNumber() + 2;
+
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      d_patch_strategy->
+      tagRichardsonExtrapolationCells(*patch,
+         error_level_number,
+         d_new,                                     //  finer context
+         d_current,                                 //  coarser context
+         error_data_time,
+         deltat,
+         error_coarsen_ratio,
+         initial_time,
+         tag_index,
+         uses_gradient_detector_too);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Initialize level integrator by:                                       *
+ *                                                                       *
+ *   (1) Setting the number of time data levels based on needs of        *
+ *       the gridding algorithm                                          *
+ *   (2) Invoking variable registration in patch strategy.               *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+MblkHyperbolicLevelIntegrator::initializeLevelIntegrator(
+   tbox::Pointer<mesh::BaseGriddingAlgorithm> gridding_alg)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!gridding_alg.isNull());
+#endif
+
+   d_number_time_data_levels = 2;
+
+   if ((gridding_alg->getTagAndInitializeStrategy()->getErrorCoarsenRatio() < 1) ||
+       (gridding_alg->getTagAndInitializeStrategy()->getErrorCoarsenRatio() > 3)) {
+      TBOX_ERROR("MblkHyperbolicLevelIntegrator::initializeLevelIntegrator "
+         << "error...\n" << "   object name = " << d_object_name
+         << "   gridding algorithm has bad error coarsen ratio" << endl);
+   }
+
+   if ((gridding_alg->errorEstimationUsesTimeIntegration()) &&
+       (gridding_alg->getTagAndInitializeStrategy()->getErrorCoarsenRatio() == 3)) {
+      d_number_time_data_levels = 3;
+      d_old = hier::VariableDatabase::getDatabase()->getContext("OLD");
+   }
+
+   d_patch_strategy->registerModelVariables(this);
+
+   d_patch_strategy->setupLoadBalancer(this,
+      gridding_alg.getPointer());
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Invoke dt calculation routines in patch strategy and take a min       *
+ * over all patches on the level.  The result will be the max of the     *
+ * next timestep on the level. If the boolean recompute_dt is true,      *
+ * the max timestep on the level will be computed.  If it is false,      *
+ * the method will simply access the latest dt stored in the time        *
+ * refinement integrator.                                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double
+MblkHyperbolicLevelIntegrator::getLevelDt(
+   const tbox::Pointer<hier::BasePatchLevel> level,
+   const double dt_time,
+   const bool initial_time)
+{
+   tbox::Pointer<hier::MultiblockPatchLevel> mblk_patch_level = level;
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!mblk_patch_level.isNull());
+#endif
+   t_get_level_dt->start();
+
+   double dt = tbox::MathUtilities<double>::getMax();
+
+   if (!d_use_ghosts_for_dt) {
+
+      d_patch_strategy->setDataContext(d_current);
+
+      for (hier::MultiblockPatchLevelIterator mi(mblk_patch_level); mi; mi++) {
+
+         d_patch_strategy->setBlockNumber(mi.getBlockNumber());
+
+         (*mi)->allocatePatchData(d_temp_var_scratch_data, dt_time);
+
+         double patch_dt;
+         patch_dt = d_patch_strategy->
+            computeStableDtOnPatch(**mi,
+               initial_time,
+               dt_time);
+
+         dt = tbox::MathUtilities<double>::Min(dt, patch_dt);
+
+         (*mi)->deallocatePatchData(d_temp_var_scratch_data);
+
+         d_patch_strategy->clearBlockNumber();
+
+      } // loop over patches
+
+      d_patch_strategy->clearDataContext();
+
+   } else {
+
+      mblk_patch_level->allocatePatchData(d_saved_var_scratch_data,
+         dt_time);
+
+      d_patch_strategy->setDataContext(d_scratch);
+
+      t_advance_bdry_fill_comm->start();
+      d_mblk_bdry_sched_advance[mblk_patch_level->getLevelNumber()]->
+      fillData(dt_time);
+      t_advance_bdry_fill_comm->stop();
+
+      for (hier::MultiblockPatchLevelIterator mi(mblk_patch_level); mi; mi++) {
+
+         d_patch_strategy->setBlockNumber(mi.getBlockNumber());
+
+         (*mi)->allocatePatchData(d_temp_var_scratch_data, dt_time);
+
+         double patch_dt;
+         patch_dt = d_patch_strategy->
+            computeStableDtOnPatch(**mi,
+               initial_time,
+               dt_time);
+
+         dt = tbox::MathUtilities<double>::Min(dt, patch_dt);
+
+         (*mi)->deallocatePatchData(d_temp_var_scratch_data);
+
+         d_patch_strategy->clearBlockNumber();
+
+      } // loop over patches
+
+      d_patch_strategy->clearDataContext();
+
+      /*
+       * Copy data from scratch to current and de-allocate scratch storage.
+       * This may be excessive here, but seems necessary if the
+       * computation of dt affects the state of the problem solution.
+       * Also, this getLevelDt() routine is called at initialization only
+       * in most cases.
+       */
+
+      for (int nb = 0; nb < mblk_patch_level->getNumberOfBlocks(); nb++) {
+         tbox::Pointer<hier::PatchLevel> patch_level =
+            mblk_patch_level->getPatchLevelForBlock(nb);
+
+         if (!patch_level.isNull()) {
+            copyTimeDependentData(patch_level, d_scratch, d_current);
+         }
+
+      } // loop over blocks
+
+      mblk_patch_level->deallocatePatchData(d_saved_var_scratch_data);
+
+   }
+
+   t_get_level_dt_sync->start();
+
+   if (d_distinguish_mpi_reduction_costs) {
+      tbox::SAMRAI_MPI::getSAMRAIWorld().Barrier();
+      t_get_level_dt_sync->stop();
+      t_mpi_reductions->start();
+   }
+
+   /*
+    * The level time increment is a global min over all patches.
+    */
+
+   double global_dt = dt;
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&global_dt, 1, MPI_MIN);
+   }
+   global_dt *= tbox::MathUtilities<double>::Min(d_cfl_init, d_cfl);
+
+   if (d_distinguish_mpi_reduction_costs) {
+      t_mpi_reductions->stop();
+   } else {
+      t_get_level_dt_sync->stop();
+   }
+
+   t_get_level_dt->stop();
+
+   return global_dt;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * For the standard explicit integration algorithm for hyperbolic        *
+ * conservation laws, the fine time increment is the coarse increment    *
+ * divided by the maximum mesh ratio (independent of level number).      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double
+MblkHyperbolicLevelIntegrator::getMaxFinerLevelDt(
+   const int finer_level_number,
+   const double coarse_dt,
+   const hier::IntVector& ratio)
+{
+   NULL_USE(finer_level_number);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   for (int id = 0; id < d_dim.getValue(); id++) {
+      TBOX_ASSERT(ratio(id) > 0);
+   }
+#endif
+   return coarse_dt / double(ratio.max());
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Integrate data on all patches in patch level from current time        *
+ * to new time (new_time) using a single time step.  Before the advance  *
+ * can occur, proper ghost cell information is obtained for all patches  *
+ * on the level.  Then, local patches are advanced sequentially in the   *
+ * loop over patches.  The details of the routine are as follows:        *
+ *                                                                       *
+ *  0) Allocate storage for new time level data. Also, allocate          *
+ *     necessary FLUX and flux integral storage if needed                *
+ *     (i.e., if regrid_advance is false, first_step is true, and        *
+ *     coarser or finer level than current level exists in hierarchy.)   *
+ *                                                                       *
+ *  1) Scratch space is filled so that, for each patch, interior data    *
+ *     and ghost cell bdry data correspond to specified time.            *
+ *                                                                       *
+ *  1a) Call user routines to pre-process advance data, if needed.       *
+ *                                                                       *
+ *  2) Compute explicit fluxes in scratch space using data on            *
+ *     patch + ghosts at given time.                                     *
+ *                                                                       *
+ *  3) Apply conservative difference in scratch space to advance patch   *
+ *     interior data to time = new_time.                                 *
+ *                                                                       *
+ *  3a) Call user routines to post-process advance data, if needed.      *
+ *                                                                       *
+ *  4) Compute next stable time increment for subsequent level advances: *
+ *                                                                       *
+ *     4a) If (d_lag_dt_computation == true) {                           *
+ *            DO NOT RECOMPUTE characteristic data after advancing       *
+ *            data on patch. Use characteristic data corresponding       *
+ *            to current time level, computed prior to flux computation, *
+ *            in dt calculation.                                         *
+ *            If (d_use_ghosts_for_dt == true)                           *
+ *               - Compute dt using data on patch+ghosts at time.        *
+ *            Else                                                       *
+ *               - Compute dt using data on patch interior ONLY.         *
+ *         }                                                             *
+ *                                                                       *
+ *     4b) Copy data from scratch space patch interior to new data       *
+ *         storage for patch (i.e., at time = new_time).                 *
+ *                                                                       *
+ *     4a) If (d_lag_dt_computation == false) {                          *
+ *            RECOMPUTE characteristic data after advancing data on      *
+ *            patch. Use characteristic data corresponding to new time   *
+ *            level in dt calculation.                                   *
+ *            If (d_use_ghosts_for_dt == true)                           *
+ *               - Refill scratch space with new interior patch data     *
+ *                 and ghost cell bdry data correspond to new time.      *
+ *                 (NOTE: This requires a new boundary schedule.)        *
+ *               - Compute dt using data on patch+ghosts at new_time.    *
+ *            Else                                                       *
+ *               - Compute dt using data on patch interior ONLY.         *
+ *                 (using patch interior data at new_time)               *
+ *         }                                                             *
+ *                                                                       *
+ *  5) If (ln > 0), update flux integrals by adding patch bdry FLUXes    *
+ *     to flux sums.                                                     *
+ *                                                                       *
+ * Important Notes:                                                      *
+ *    1) In order to advance finer levels (if they exist), both old      *
+ *       and new data for each patch on the level must be maintained.    *
+ *    2) If the timestep is the first in the timestep loop on the level  *
+ *       (indicated by first_step), then time interpolation is           *
+ *       is unnecessary to fill ghost cells from the next coarser level. *
+ *    3) The new dt is not calculated if regrid_advance is true.         *
+ *       If this is the case, it is assumed that the results of the      *
+ *       advance and the timestep calculation will be discarded          *
+ *       (e.g., during regridding, or initialization).  Also, allocation *
+ *       and post-processing of FLUX/flux integral data is not performed *
+ *       in this case.                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double
+MblkHyperbolicLevelIntegrator::advanceLevel(
+   const tbox::Pointer<hier::BasePatchLevel> level,
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const double current_time,
+   const double new_time,
+   const bool first_step,
+   const bool last_step,
+   const bool regrid_advance)
+{
+
+   tbox::Pointer<hier::MultiblockPatchHierarchy> mblk_hierarchy =
+      hierarchy;
+
+   tbox::Pointer<hier::MultiblockPatchLevel> mblk_level =
+      level;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!mblk_level.isNull());
+   TBOX_ASSERT(!mblk_hierarchy.isNull());
+   TBOX_ASSERT(current_time <= new_time);
+#endif
+
+   int nb;
+
+#ifdef RECORD_STATS
+   tbox::Pointer<tbox::Statistic> num_boxes_l0 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("NumberBoxesL0", "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> num_boxes_l1 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("NumberBoxesL1", "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> num_boxes_l2 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("NumberBoxesL2", "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> num_boxes_l3 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("NumberBoxesL3", "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> num_gridcells_l0 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("NumberGridcellsL0", "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> num_gridcells_l1 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("NumberGridcellsL1", "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> num_gridcells_l2 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("NumberGridcellsL2", "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> num_gridcells_l3 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("NumberGridcellsL3", "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> timestamp_l0 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("TimeStampL0", "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> timestamp_l1 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("TimeStampL1", "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> timestamp_l2 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("TimeStampL2", "PROC_STAT");
+   tbox::Pointer<tbox::Statistic> timestamp_l3 =
+      tbox::Statistician::getStatistician()->
+      getStatistic("TimeStampL3", "PROC_STAT");
+
+   int level_num = mblk_level->getLevelNumber();
+
+   /*
+    * Record number of gridcells on each patch.  Note that patch
+    * stat requires a seq number to be identified.
+    */
+   double level_gridcells = 0.;
+   double level_local_patches = 0.;
+   // to count total gridcells on mblk_level
+   //hier::BoxArray boxes = mblk_level->getBoxes();
+   //for (int i = 0; i < boxes.getNumberOfBoxes(); i++) {
+   //   level_gridcells += boxes(i).size();
+   //}
+   // to count gridcells on this processor
+
+   for (hier::MultiblockPatchLevelIterator mi(mblk_level); mi; mi++) {
+      level_gridcells += (*mi)->getBox().size();
+      level_local_patches += 1.0;
+   } // loop over patches
+
+   if (level_num == 0) {
+      num_boxes_l0->recordProcStat(level_local_patches);
+      num_gridcells_l0->recordProcStat(level_gridcells);
+      timestamp_l0->recordProcStat(current_time);
+   }
+   if (level_num == 1) {
+      num_boxes_l1->recordProcStat(level_local_patches);
+      num_gridcells_l1->recordProcStat(level_gridcells);
+      timestamp_l1->recordProcStat(current_time);
+   }
+   if (level_num == 2) {
+      num_boxes_l2->recordProcStat(level_local_patches);
+      num_gridcells_l2->recordProcStat(level_gridcells);
+      timestamp_l2->recordProcStat(current_time);
+   }
+   if (level_num == 3) {
+      num_boxes_l3->recordProcStat(level_local_patches);
+      num_gridcells_l3->recordProcStat(level_gridcells);
+      timestamp_l3->recordProcStat(current_time);
+   }
+#endif
+
+   t_advance_level->start();
+
+   const int level_number = mblk_level->getLevelNumber();
+   const double dt = new_time - current_time;
+
+   /*
+    * (1) Allocate data needed for advancing level.
+    * (2) Generate temporary communication schedule to fill ghost
+    *     cells, if needed.
+    * (3) Fill ghost cell data.
+    * (4) Process flux storage before the advance.
+    */
+
+   mblk_level->allocatePatchData(d_new_time_dep_data, new_time);
+   mblk_level->allocatePatchData(d_saved_var_scratch_data, current_time);
+
+   tbox::Pointer<xfer::MultiblockRefineSchedule> mblk_fill_schedule;
+
+   bool in_hierarchy = false;
+   for (nb = 0; nb < mblk_level->getNumberOfBlocks(); nb++) {
+      tbox::Pointer<hier::PatchLevel> patch_level =
+         mblk_level->getPatchLevelForBlock(nb);
+      if (!patch_level.isNull()) {
+         in_hierarchy = patch_level->inHierarchy();
+      }
+   }
+
+   if (!in_hierarchy) {
+      t_error_bdry_fill_create->start();
+      if (d_number_time_data_levels == 3) {
+         mblk_fill_schedule = d_mblk_bdry_fill_advance_old->
+            createSchedule(mblk_level,
+               mblk_level->getLevelNumber() - 1,
+               mblk_hierarchy,
+               d_patch_strategy);
+      } else {
+         mblk_fill_schedule = d_mblk_bdry_fill_advance->
+            createSchedule(mblk_level,
+               mblk_level->getLevelNumber() - 1,
+               mblk_hierarchy,
+               d_patch_strategy);
+      }
+      t_error_bdry_fill_create->stop();
+   } else {
+      mblk_fill_schedule = d_mblk_bdry_sched_advance[level_number];
+   }
+
+   d_patch_strategy->setDataContext(d_scratch);
+   if (regrid_advance) {
+      t_error_bdry_fill_comm->start();
+   } else {
+      t_advance_bdry_fill_comm->start();
+   }
+   mblk_fill_schedule->fillData(current_time);
+   if (regrid_advance) {
+      t_error_bdry_fill_comm->stop();
+   } else {
+      t_advance_bdry_fill_comm->stop();
+   }
+
+   d_patch_strategy->clearDataContext();
+   mblk_fill_schedule.setNull();
+
+   preprocessFluxData(mblk_level,
+      current_time,
+      new_time,
+      regrid_advance,
+      first_step,
+      last_step);
+
+   for (nb = 0; nb < mblk_level->getNumberOfBlocks(); nb++) {
+      tbox::Pointer<hier::PatchLevel> patch_level =
+         mblk_level->getPatchLevelForBlock(nb);
+
+      d_patch_strategy->setBlockNumber(nb);
+
+      if (!patch_level.isNull()) {
+
+         /*
+          * (5) Call user-routine to pre-process state data, if needed.
+          * (6) Advance solution on all level patches (scratch storage).
+          * (7) Copy new solution to from scratch to new storage.
+          * (8) Call user-routine to post-process state data, if needed.
+          */
+         t_patch_num_kernel->start();
+         d_patch_strategy->preprocessAdvanceLevelState(patch_level,
+            current_time,
+            dt,
+            first_step,
+            last_step,
+            regrid_advance);
+         t_patch_num_kernel->stop();
+
+         d_patch_strategy->setDataContext(d_scratch);
+         for (hier::PatchLevel::Iterator ip(patch_level); ip; ip++) {
+            tbox::Pointer<hier::Patch> patch = *ip;
+
+            patch->allocatePatchData(d_temp_var_scratch_data, current_time);
+
+            t_patch_num_kernel->start();
+            d_patch_strategy->computeFluxesOnPatch(*patch,
+               current_time,
+               dt);
+            t_patch_num_kernel->stop();
+
+            bool at_syncronization = false;
+
+            t_patch_num_kernel->start();
+            d_patch_strategy->conservativeDifferenceOnPatch(*patch,
+               current_time,
+               dt,
+               at_syncronization);
+            t_patch_num_kernel->stop();
+
+            patch->deallocatePatchData(d_temp_var_scratch_data);
+         }
+         d_patch_strategy->clearDataContext();
+
+         patch_level->setTime(new_time, d_saved_var_scratch_data);
+         patch_level->setTime(new_time, d_flux_var_data);
+
+         copyTimeDependentData(patch_level, d_scratch, d_new);
+
+         t_patch_num_kernel->start();
+         d_patch_strategy->postprocessAdvanceLevelState(patch_level,
+            current_time,
+            dt,
+            first_step,
+            last_step,
+            regrid_advance);
+         t_patch_num_kernel->stop();
+      }
+
+      d_patch_strategy->clearBlockNumber();
+
+   } // loop over blocks
+
+   /*
+    * (9) If the level advance is for regridding, we compute the next timestep:
+    *
+    * (a) If the dt computation is lagged (i.e., we use pre-advance data
+    *     to compute timestep), we reset scratch space on patch interiors
+    *     if needed.  Then, we set the strategy context to current or scratch
+    *     depending on whether ghost values are used to compute dt.
+    * (b) If the dt computation is not lagged (i.e., we use advanced data
+    *     to compute timestep), we refill scratch space, including ghost
+    *     data with new solution values if needed.  Then, we set the strategy
+    *     context to new or scratch depending on whether ghost values are
+    *     used to compute dt.
+    * (c) Then, we loop over patches and compute the dt on each patch.
+    */
+
+   double dt_next = tbox::MathUtilities<double>::getMax();
+
+   if (!regrid_advance) {
+
+      if (d_lag_dt_computation) {
+
+         if (d_use_ghosts_for_dt) {
+            d_patch_strategy->setDataContext(d_scratch);
+            for (nb = 0; nb < mblk_level->getNumberOfBlocks(); nb++) {
+               tbox::Pointer<hier::PatchLevel> patch_level =
+                  mblk_level->getPatchLevelForBlock(nb);
+
+               if (!patch_level.isNull()) {
+                  copyTimeDependentData(patch_level, d_current, d_scratch);
+               }
+
+            }
+         } else {
+            d_patch_strategy->setDataContext(d_current);
+         }
+
+      } else {
+
+         if (d_use_ghosts_for_dt) {
+
+            if (d_mblk_bdry_sched_advance_new[level_number].isNull()) {
+               TBOX_ERROR(
+                  d_object_name << ":  "
+                  <<
+                  "Attempt to fill new ghost data for timestep"
+                  <<
+                  "computation, but schedule not defined." << endl);
+            }
+
+            d_patch_strategy->setDataContext(d_scratch);
+            t_new_advance_bdry_fill_comm->start();
+            d_mblk_bdry_sched_advance_new[level_number]->fillData(new_time);
+            t_new_advance_bdry_fill_comm->stop();
+
+         } else {
+            d_patch_strategy->setDataContext(d_new);
+         }
+
+      }
+
+      for (hier::MultiblockPatchLevelIterator mi(mblk_level); mi; mi++) {
+
+         d_patch_strategy->setBlockNumber(mi.getBlockNumber());
+
+         (*mi)->allocatePatchData(d_temp_var_scratch_data, new_time);
+         // "false" argument indicates "initial_time" is false.
+         t_patch_num_kernel->start();
+         double patch_dt =
+            d_patch_strategy->computeStableDtOnPatch(**mi,
+               false,
+               new_time);
+         t_patch_num_kernel->stop();
+
+         dt_next = tbox::MathUtilities<double>::Min(dt_next, patch_dt);
+
+         (*mi)->deallocatePatchData(d_temp_var_scratch_data);
+
+         d_patch_strategy->clearBlockNumber();
+
+      } // loop over patches
+
+      d_patch_strategy->clearDataContext();
+
+   } // !regrid_advance
+
+   mblk_level->deallocatePatchData(d_saved_var_scratch_data);
+
+   postprocessFluxData(mblk_level,
+      regrid_advance,
+      first_step,
+      last_step);
+
+   t_advance_level->stop();
+
+   t_advance_level_sync->start();
+
+   if (d_distinguish_mpi_reduction_costs) {
+      tbox::SAMRAI_MPI::getSAMRAIWorld().Barrier();
+      t_advance_level_sync->stop();
+      t_mpi_reductions->start();
+   }
+
+   double next_dt = dt_next;
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&next_dt, 1, MPI_MIN);
+   }
+   next_dt *= d_cfl;
+
+   if (d_distinguish_mpi_reduction_costs) {
+      t_mpi_reductions->stop();
+   } else {
+      t_advance_level_sync->stop();
+   }
+
+   return next_dt;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Synchronize data between patch levels according to the standard       *
+ * hyperbolic flux correction algorithm.                                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+MblkHyperbolicLevelIntegrator::standardLevelSynchronization(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level,
+   const double sync_time,
+   const double old_time)
+{
+   tbox::Array<double> old_times(finest_level - coarsest_level + 1);
+   for (int i = coarsest_level; i <= finest_level; i++) {
+      old_times[i] = old_time;
+   }
+   standardLevelSynchronization(hierarchy, coarsest_level, finest_level,
+      sync_time, old_times);
+}
+
+void
+MblkHyperbolicLevelIntegrator::standardLevelSynchronization(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level,
+   const double sync_time,
+   const tbox::Array<double>& old_times)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (coarsest_level < finest_level)
+      && (finest_level <= hierarchy->getFinestLevelNumber()));
+   TBOX_ASSERT(old_times.getSize() >= finest_level);
+   for (int ln = coarsest_level; ln < finest_level; ln++) {
+      TBOX_ASSERT(!(hierarchy->getPatchLevel(ln)).isNull());
+      TBOX_ASSERT(sync_time >= old_times[ln]);
+   }
+   TBOX_ASSERT(!(hierarchy->getPatchLevel(finest_level)).isNull());
+#endif
+   t_std_level_sync->start();
+
+   tbox::Pointer<hier::MultiblockPatchHierarchy> mblk_hierarchy =
+      hierarchy;
+
+   for (int fine_ln = finest_level; fine_ln > coarsest_level; fine_ln--) {
+      const int coarse_ln = fine_ln - 1;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(sync_time >= old_times[coarse_ln]);
+#endif
+
+      tbox::Pointer<hier::MultiblockPatchLevel>
+      mblk_fine_level = mblk_hierarchy->getPatchLevel(fine_ln);
+      tbox::Pointer<hier::MultiblockPatchLevel>
+      mblk_coarse_level = mblk_hierarchy->getPatchLevel(coarse_ln);
+
+      synchronizeLevelWithCoarser(mblk_fine_level,
+         mblk_coarse_level,
+         sync_time,
+         old_times[coarse_ln]);
+
+      mblk_fine_level->deallocatePatchData(d_fluxsum_data);
+      mblk_fine_level->deallocatePatchData(d_flux_var_data);
+
+      if (coarse_ln > coarsest_level) {
+         mblk_coarse_level->deallocatePatchData(d_flux_var_data);
+      } else {
+         if (coarsest_level == 0) {
+            mblk_coarse_level->deallocatePatchData(d_flux_var_data);
+            d_have_flux_on_level_zero = false;
+         }
+      }
+
+   }
+
+   t_std_level_sync->stop();
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Coarsen current solution data from finest hierarchy level specified   *
+ * down through the coarsest hierarchy level specified, if initial_time  *
+ * is true (i.e., hierarchy is being constructed at initial simulation   *
+ * time).  After data is coarsened, the user's initialization routine    *
+ * is called to reset data (as needed by the application) before         *
+ * that solution is further coarsened to the next coarser level in the   *
+ * hierarchy.  If initial_time is false, then this routine does nothing  *
+ * In that case, interpolation of data from coarser levels is sufficient *
+ * to set data on new levels in the hierarchy during regridding.         *
+ *                                                                       *
+ * NOTE: The fact that this routine does nothing when called at any      *
+ *       time later than when the AMR hierarchy is constructed initially *
+ *        may need to change at some point based on application needs.   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkHyperbolicLevelIntegrator::synchronizeNewLevels(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level,
+   const double sync_time,
+   const bool initial_time)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (coarsest_level < finest_level)
+      && (finest_level <= hierarchy->getFinestLevelNumber()));
+   for (int ln = coarsest_level; ln <= finest_level; ln++) {
+      TBOX_ASSERT(!(hierarchy->getPatchLevel(ln)).isNull());
+   }
+#endif
+
+   tbox::Pointer<tbox::Timer> t_sync_initial_create =
+      tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::sync_initial_create");
+   tbox::Pointer<tbox::Timer> t_sync_initial_comm =
+      tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::sync_initial_comm");
+
+   t_sync_new_levels->start();
+
+   tbox::Pointer<hier::MultiblockPatchHierarchy> mblk_hierarchy =
+      hierarchy;
+
+   if (initial_time) {
+
+      d_patch_strategy->setDataContext(d_current);
+
+      for (int fine_ln = finest_level; fine_ln > coarsest_level; fine_ln--) {
+         const int coarse_ln = fine_ln - 1;
+
+         tbox::Pointer<hier::MultiblockPatchLevel> fine_level =
+            mblk_hierarchy->getPatchLevel(fine_ln);
+
+         tbox::Pointer<hier::MultiblockPatchLevel> coarse_level =
+            mblk_hierarchy->getPatchLevel(coarse_ln);
+
+         t_sync_initial_create->start();
+         tbox::Pointer<xfer::MultiblockCoarsenSchedule> sched =
+            d_mblk_sync_initial_data->createSchedule(coarse_level,
+               fine_level,
+               d_patch_strategy);
+         t_sync_initial_create->stop();
+
+         t_sync_initial_comm->start();
+         sched->coarsenData();
+         t_sync_initial_comm->stop();
+
+         for (hier::MultiblockPatchLevelIterator mi(coarse_level); mi; mi++) {
+
+            d_patch_strategy->setBlockNumber(mi.getBlockNumber());
+
+            (*mi)->allocatePatchData(d_temp_var_scratch_data, sync_time);
+
+            d_patch_strategy->initializeDataOnPatch(**mi,
+               sync_time,
+               initial_time);
+            (*mi)->deallocatePatchData(d_temp_var_scratch_data);
+
+            d_patch_strategy->clearBlockNumber();
+         }
+      }
+
+      d_patch_strategy->clearDataContext();
+
+   } // if (initial_time)
+
+   t_sync_new_levels->stop();
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Synchronize data between coarse and fine patch levels according to    *
+ * the standard hyperbolic flux correction algorithm.  The steps of      *
+ * the algorithm are:                                                    *
+ *                                                                       *
+ *    (1) Replace coarse time-space flux integrals at coarse-fine        *
+ *        boundaries with time-space flux integrals computed on fine     *
+ *        level.                                                         *
+ *    (2) Repeat conservative difference on coarse level with corrected  *
+ *        fluxes.                                                        *
+ *    (3) Conservatively coarsen solution on interior of fine level to   *
+ *        coarse level.                                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+MblkHyperbolicLevelIntegrator::synchronizeLevelWithCoarser(
+   const tbox::Pointer<hier::MultiblockPatchLevel> mblk_fine_level,
+   const tbox::Pointer<hier::MultiblockPatchLevel> mblk_coarse_level,
+   const double sync_time,
+   const double coarse_sim_time)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!mblk_fine_level.isNull());
+   TBOX_ASSERT(!mblk_coarse_level.isNull());
+   TBOX_ASSERT(mblk_coarse_level->getLevelNumber() ==
+      (mblk_fine_level->getLevelNumber() - 1));
+#endif
+
+   tbox::Pointer<tbox::Timer> t_coarsen_fluxsum_create =
+      tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::coarsen_fluxsum_create");
+   tbox::Pointer<tbox::Timer> t_coarsen_fluxsum_comm =
+      tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::coarsen_fluxsum_comm");
+   tbox::Pointer<tbox::Timer> t_coarsen_sync_create =
+      tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::coarsen_sync_create");
+   tbox::Pointer<tbox::Timer> t_coarsen_sync_comm =
+      tbox::TimerManager::getManager()->
+      getTimer("algs::MblkHyperbolicLevelIntegrator::coarsen_sync_comm");
+
+   /*
+    * Coarsen flux integrals around fine patch boundaries to coarser level
+    * and replace coarse flux information where appropriate.  NULL patch
+    * model is passed in to avoid over complicating coarsen process;
+    * i.e. patch model is not needed in coarsening of flux integrals.
+    */
+
+   t_coarsen_fluxsum_create->start();
+   tbox::Pointer<xfer::MultiblockCoarsenSchedule> sched =
+      d_mblk_coarsen_fluxsum->createSchedule(mblk_coarse_level,
+         mblk_fine_level,
+         NULL);
+   t_coarsen_fluxsum_create->stop();
+
+   d_patch_strategy->setDataContext(d_current);
+   t_coarsen_fluxsum_comm->start();
+   sched->coarsenData();
+   t_coarsen_fluxsum_comm->stop();
+   d_patch_strategy->clearDataContext();
+
+   /*
+    * Repeat conservative difference on coarser level.
+    */
+   mblk_coarse_level->allocatePatchData(d_saved_var_scratch_data,
+      coarse_sim_time);
+   mblk_coarse_level->setTime(coarse_sim_time, d_flux_var_data);
+
+   d_patch_strategy->setDataContext(d_scratch);
+   t_advance_bdry_fill_comm->start();
+   d_mblk_bdry_sched_advance[mblk_coarse_level->getLevelNumber()]->
+   fillData(coarse_sim_time);
+   t_advance_bdry_fill_comm->stop();
+
+   const double reflux_dt = sync_time - coarse_sim_time;
+
+   int nb;
+
+   for (hier::MultiblockPatchLevelIterator mi(mblk_coarse_level); mi; mi++) {
+
+      d_patch_strategy->setBlockNumber(mi.getBlockNumber());
+
+      (*mi)->allocatePatchData(d_temp_var_scratch_data, coarse_sim_time);
+
+      bool at_syncronization = true;
+      d_patch_strategy->conservativeDifferenceOnPatch(**mi,
+         coarse_sim_time,
+         reflux_dt,
+         at_syncronization);
+      (*mi)->deallocatePatchData(d_temp_var_scratch_data);
+
+      d_patch_strategy->clearBlockNumber();
+
+   } // loop over patches
+
+   d_patch_strategy->clearDataContext();
+
+   for (nb = 0; nb < mblk_coarse_level->getNumberOfBlocks(); nb++) {
+      tbox::Pointer<hier::PatchLevel> patch_level =
+         mblk_coarse_level->getPatchLevelForBlock(nb);
+
+      if (!patch_level.isNull()) {
+         copyTimeDependentData(patch_level, d_scratch, d_new);
+      }
+
+   }
+
+   mblk_coarse_level->deallocatePatchData(d_saved_var_scratch_data);
+
+   /*
+    * Coarsen time-dependent data from fine patch interiors to coarse patches.
+    */
+
+   t_coarsen_sync_create->start();
+   sched = d_mblk_coarsen_sync_data->createSchedule(mblk_coarse_level,
+         mblk_fine_level,
+         d_patch_strategy);
+   t_coarsen_sync_create->stop();
+
+   d_patch_strategy->setDataContext(d_new);
+
+   t_coarsen_sync_comm->start();
+   sched->coarsenData();
+   t_coarsen_sync_comm->stop();
+
+   d_patch_strategy->clearDataContext();
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Reset time-dependent data on patch level by replacing current data    *
+ * with new.  The boolean argument is used for odd refinement ratios     *
+ * (in particular 3 used in certain applications).                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkHyperbolicLevelIntegrator::resetTimeDependentData(
+   const tbox::Pointer<hier::BasePatchLevel> level,
+   const double new_time,
+   const bool can_be_refined)
+{
+   tbox::Pointer<hier::MultiblockPatchLevel> mblk_level = level;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!mblk_level.isNull());
+#endif
+
+   hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+
+   double cur_time = 0.;
+
+   for (hier::MultiblockPatchLevelIterator mi(mblk_level); mi; mi++) {
+
+      tbox::List<tbox::Pointer<hier::Variable> >::Iterator
+      time_dep_var = d_time_dep_variables.listStart();
+      while (time_dep_var) {
+
+         int cur_indx =
+            variable_db->mapVariableAndContextToIndex(time_dep_var(),
+               d_current);
+         int new_indx =
+            variable_db->mapVariableAndContextToIndex(time_dep_var(),
+               d_new);
+
+         cur_time = (*mi)->getPatchData(cur_indx)->getTime();
+
+         if (can_be_refined && d_number_time_data_levels == 3) {
+
+            int old_indx =
+               variable_db->mapVariableAndContextToIndex(time_dep_var(),
+                  d_old);
+
+            (*mi)->setPatchData(old_indx, (*mi)->getPatchData(cur_indx));
+
+            (*mi)->setPatchData(cur_indx, (*mi)->getPatchData(new_indx));
+
+         } else {
+
+            if (d_number_time_data_levels == 3) {
+
+               int old_indx =
+                  variable_db->mapVariableAndContextToIndex(time_dep_var(),
+                     d_old);
+
+               (*mi)->setPatchData(old_indx, (*mi)->getPatchData(cur_indx));
+
+            }
+
+            (*mi)->setPatchData(cur_indx, (*mi)->getPatchData(new_indx));
+
+         }
+
+         (*mi)->deallocatePatchData(new_indx);
+
+         time_dep_var++;
+
+      }
+
+   } // loop over patches
+
+   mblk_level->setTime(new_time, d_new_patch_init_data);
+
+   if (d_number_time_data_levels == 3) {
+      mblk_level->setTime(cur_time, d_old_time_dep_data);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Discard new data on level.  This is used primarily to reset patch     *
+ * data after error estimation (e.g., Richardson extrapolation.)         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+MblkHyperbolicLevelIntegrator::resetDataToPreadvanceState(
+   const tbox::Pointer<hier::BasePatchLevel> level)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!level.isNull());
+#endif
+
+   /*
+    * De-allocate new context
+    */
+   level->deallocatePatchData(d_new_time_dep_data);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register given variable with algorithm according to specified         *
+ * algorithm role (i.e., HYP_VAR_TYPE).  Assignment of descriptor        *
+ * indices to variable lists, component selectors, and communication     *
+ * algorithms takes place here.  The different cases are:                *
+ *                                                                       *
+ * TIME_DEP:                                                             *
+ *            The number of factories depends on the number of time      *
+ *            levels of data that must be stored on patches to satisfy   *
+ *            regridding reqs.  Currently, there are two possibilities:  *
+ *                                                                       *
+ *            (1) If the coarsen ratios between levels are even, the     *
+ *                error coarsening ratio will be two and so only two     *
+ *                time levels of data must be maintained on every level  *
+ *                but the finest as usual.                               *
+ *                                                                       *
+ *            (2) If the coarsen ratios between levels are three, and    *
+ *                time integration is used during regridding (e.g., Rich-*
+ *                ardson extrapolation), then three time levels of data  *
+ *                must be maintained on every level but the finest so    *
+ *                that error estimation can be executed properly.        *
+ *                                                                       *
+ *            In case (1), three factories are needed:                   *
+ *                         SCRATCH, CURRENT, NEW.                        *
+ *            In case (2), four factories are needed:                    *
+ *                         SCRATCH, OLD, CURRENT, NEW.                   *
+ *                                                                       *
+ *            SCRATCH index is added to d_saved_var_scratch_data.        *
+ *            CURRENT index is added to d_new_patch_init_data.           *
+ *            NEW index is added to d_new_time_dep_data.                 *
+ *                                                                       *
+ * INPUT:                                                                *
+ *            Only one time level of data is maintained and once values  *
+ *            are set on patches, they do not change in time.            *
+ *                                                                       *
+ *            Two factories are needed: SCRATCH, CURRENT.                *
+ *                                                                       *
+ *            SCRATCH index is added to d_saved_var_scratch_data.        *
+ *            CURRENT index is added to d_new_patch_init_data.           *
+ *                                                                       *
+ * NO_FILL:                                                              *
+ *            Only one time level of data is stored and no scratch space *
+ *            is used.  Data may be set and manipulated at will in user  *
+ *            routines.  Data (including ghost values) is never touched  *
+ *            outside of user routines.                                  *
+ *                                                                       *
+ *            Two factories are needed: CURRENT, SCRATCH.                *
+ *                                                                       *
+ *            CURRENT index is added to d_new_patch_init_data.           *
+ *            SCRATCH index is needed only for temporary work space to   *
+ *            fill new patch levels.                                     *
+ *                                                                       *
+ * FLUX:                                                                 *
+ *            One factory is needed: SCRATCH.                            *
+ *                                                                       *
+ *            SCRATCH index is added to d_flux_var_data.                 *
+ *                                                                       *
+ *            Additionally, a variable for flux integral data is created *
+ *            for each FLUX variable. It has a single factory, SCRATCH,  *
+ *            which is added to d_fluxsum_data.                          *
+ *                                                                       *
+ * TEMPORARY:                                                            *
+ *            One factory needed: SCRATCH.                               *
+ *            SCRATCH index is added to d_temp_var_scratch_data.         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkHyperbolicLevelIntegrator::registerVariable(
+   const tbox::Pointer<hier::Variable> var,
+   const hier::IntVector ghosts,
+   const HYP_VAR_TYPE h_v_type,
+   const tbox::Pointer<xfer::CoarsenOperator> coarsen_op,
+   const tbox::Pointer<xfer::RefineOperator> refine_op,
+   const tbox::Pointer<xfer::TimeInterpolateOperator> time_int)
+{
+   TBOX_ASSERT(!var.isNull());
+
+   hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+
+   const hier::IntVector zero_ghosts(d_dim, 0);
+
+   d_all_variables.appendItem(var);
+
+   switch (h_v_type) {
+
+      case TIME_DEP: {
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         //TBOX_ASSERT(!refine_op.isNull());
+         //TBOX_ASSERT(!coarsen_op.isNull());
+         //TBOX_ASSERT(!time_int.isNull());
+#endif
+
+         d_time_dep_variables.appendItem(var);
+
+         int cur_id = variable_db->registerVariableAndContext(var,
+               d_current,
+               zero_ghosts);
+         int new_id = variable_db->registerVariableAndContext(var,
+               d_new,
+               zero_ghosts);
+         int scr_id = variable_db->registerVariableAndContext(var,
+               d_scratch,
+               ghosts);
+
+         d_saved_var_scratch_data.setFlag(scr_id);
+
+         d_new_patch_init_data.setFlag(cur_id);
+
+         d_new_time_dep_data.setFlag(new_id);
+
+         /*
+          * Register variable and context needed for restart.
+          */
+         hier::VariableDatabase::getDatabase()->
+         registerPatchDataForRestart(cur_id);
+
+         /*
+          * Set boundary fill schedules for time-dependent variable.
+          * If time interpolation operator is non-NULL, regular advance
+          * bdry fill algorithm will time interpolate between current and
+          * new data on coarser levels, and fill from current data on
+          * same level.  New advance bdry fill algorithm will time interpolate
+          * between current and new data on coarser levels, and fill from new
+          * data on same level.  If time interpolation operator is NULL,
+          * regular and new bdry fill algorithms will use current and new
+          * data, respectively.
+          */
+
+         d_mblk_bdry_fill_advance->registerRefine(
+            scr_id, cur_id, cur_id, new_id, scr_id, refine_op, time_int);
+         d_mblk_bdry_fill_advance_new->registerRefine(
+            scr_id, new_id, cur_id, new_id, scr_id, refine_op, time_int);
+         d_mblk_fill_new_level->registerRefine(
+            cur_id, cur_id, cur_id, new_id, scr_id, refine_op, time_int);
+
+         /*
+          * For data synchronization between levels, the coarsen algorithm
+          * will coarsen new data on finer level to new data on coarser.
+          * Recall that coarser level data pointers will not be reset until
+          * after synchronization so we always coarsen to new
+          * (see synchronizeLevelWithCoarser routine).
+          */
+
+         d_mblk_coarsen_sync_data->registerCoarsen(new_id, new_id, coarsen_op);
+
+         d_mblk_sync_initial_data->registerCoarsen(cur_id, cur_id, coarsen_op);
+
+         /*
+          * Coarsen operations used in Richardson extrapolation.  The init
+          * initializes data on coarser level, before the coarse level
+          * advance.  If two time levels are used, coarsening occurs between
+          * the CURRENT context on both levels.  If three levels are used,
+          * coarsening occurs between the OLD context on the fine level and
+          * the CURRENT context on the coarse level.  The final coarsen
+          * algorithm coarsens data after it has been advanced on the fine
+          * level to the NEW context on the coarser level.
+          */
+
+         if (d_number_time_data_levels == 3) {
+
+            int old_id = variable_db->registerVariableAndContext(var,
+                  d_old,
+                  zero_ghosts);
+            d_old_time_dep_data.setFlag(old_id);
+
+            d_mblk_bdry_fill_advance_old->registerRefine(
+               scr_id, cur_id, old_id, new_id, scr_id, refine_op, time_int);
+
+            d_coarsen_rich_extrap_init->
+            registerCoarsen(cur_id, old_id, coarsen_op);
+
+         } else {
+
+            d_coarsen_rich_extrap_init->
+            registerCoarsen(cur_id, cur_id, coarsen_op);
+         }
+
+         d_coarsen_rich_extrap_final->
+         registerCoarsen(new_id, new_id, coarsen_op);
+
+         break;
+      }
+
+      case INPUT: {
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         //         TBOX_ASSERT(!refine_op.isNull());
+         //         TBOX_ASSERT(!coarsen_op.isNull());
+#endif
+
+         int cur_id = variable_db->registerVariableAndContext(var,
+               d_current,
+               zero_ghosts);
+         int scr_id = variable_db->registerVariableAndContext(var,
+               d_scratch,
+               ghosts);
+
+         d_saved_var_scratch_data.setFlag(scr_id);
+
+         d_new_patch_init_data.setFlag(cur_id);
+
+         /*
+          * Register variable and context needed for restart.
+          */
+         hier::VariableDatabase::getDatabase()->
+         registerPatchDataForRestart(cur_id);
+
+         /*
+          * Bdry algorithms for input variables will fill from current only.
+          */
+
+         d_mblk_bdry_fill_advance->registerRefine(
+            scr_id, cur_id, scr_id, refine_op);
+         d_mblk_bdry_fill_advance_new->registerRefine(
+            scr_id, cur_id, scr_id, refine_op);
+         d_mblk_fill_new_level->registerRefine(
+            cur_id, cur_id, scr_id, refine_op);
+
+         /*
+          * At initialization, it may be necessary to coarsen INPUT data
+          * up through the hierarchy so that all levels are consistent.
+          */
+
+         d_mblk_sync_initial_data->registerCoarsen(cur_id, cur_id, coarsen_op);
+
+         /*
+          * Coarsen operation for setting initial data on coarser level
+          * in the Richardson extrapolation algorithm.
+          */
+
+         d_coarsen_rich_extrap_init->
+         registerCoarsen(cur_id, cur_id, coarsen_op);
+
+         break;
+      }
+
+      case NO_FILL: {
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!refine_op.isNull());
+         TBOX_ASSERT(!coarsen_op.isNull());
+#endif
+         int cur_id = variable_db->registerVariableAndContext(var,
+               d_current,
+               ghosts);
+
+         int scr_id = variable_db->registerVariableAndContext(var,
+               d_scratch,
+               ghosts);
+
+         d_new_patch_init_data.setFlag(cur_id);
+
+         /*
+          * Register variable and context needed for restart.
+          */
+         hier::VariableDatabase::getDatabase()->
+         registerPatchDataForRestart(cur_id);
+
+         d_mblk_fill_new_level->registerRefine(
+            cur_id, cur_id, scr_id, refine_op);
+
+         /*
+          * Coarsen operation for setting initial data on coarser level
+          * in the Richardson extrapolation algorithm.
+          */
+
+         d_coarsen_rich_extrap_init->
+         registerCoarsen(cur_id, cur_id, coarsen_op);
+
+         break;
+      }
+
+      case FLUX: {
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!coarsen_op.isNull());
+#endif
+         /*
+          * Note that we force all flux variables to hold double precision
+          * data and be face- or side-centered.  Also, for each flux variable,
+          * a corresponding "fluxsum" variable is created to manage
+          * synchronization of data betweeen patch levels in the hierarchy.
+          */
+         const tbox::Pointer<pdat::FaceVariable<double> > face_var(var);
+         const tbox::Pointer<pdat::SideVariable<double> > side_var(var);
+
+         if (!(face_var.isNull())) {
+            if (d_flux_side_registered) {
+               TBOX_ERROR(
+                  d_object_name << ":  "
+                  <<
+                  "Attempt to register FaceVariable when "
+                  << "SideVariable already registered."
+                  << endl);
+            }
+
+            d_flux_is_face = true;
+
+         } else if (!(side_var.isNull())) {
+            if (d_flux_face_registered) {
+               TBOX_ERROR(
+                  d_object_name << ":  "
+                  <<
+                  "Attempt to register SideVariable when "
+                  << "FaceVariable already registered."
+                  << endl);
+            }
+
+            d_flux_is_face = false;
+
+         } else {
+            TBOX_ERROR(
+               d_object_name << ":  "
+               <<
+               "Flux is neither face- or side-centered." << endl);
+         }
+
+         d_flux_variables.appendItem(var);
+
+         int scr_id = variable_db->registerVariableAndContext(var,
+               d_scratch,
+               ghosts);
+
+         d_flux_var_data.setFlag(scr_id);
+
+         string var_name = var->getName();
+         string fs_suffix = "_fluxsum";
+         string fsum_name = var_name;
+         fsum_name += fs_suffix;
+
+         tbox::Pointer<hier::Variable> fluxsum;
+
+         if (d_flux_is_face) {
+            fluxsum = new pdat::OuterfaceVariable<double>(
+                  d_dim,
+                  fsum_name,
+                  ((tbox::Pointer<pdat::FaceDataFactory<double> >)
+                   var->getPatchDataFactory())->getDepth());
+            d_flux_face_registered = true;
+         } else {
+            fluxsum = new pdat::OutersideVariable<double>(
+                  d_dim,
+                  fsum_name,
+                  ((tbox::Pointer<pdat::SideDataFactory<double> >)
+                   var->getPatchDataFactory())->getDepth());
+            d_flux_side_registered = true;
+         }
+
+         d_fluxsum_variables.appendItem(fluxsum);
+
+         int fs_id = variable_db->registerVariableAndContext(fluxsum,
+               d_scratch,
+               zero_ghosts);
+
+         d_fluxsum_data.setFlag(fs_id);
+
+         d_mblk_coarsen_fluxsum->registerCoarsen(scr_id, fs_id, coarsen_op);
+
+         break;
+      }
+
+      case TEMPORARY: {
+
+         int scr_id = variable_db->registerVariableAndContext(var,
+               d_scratch,
+               ghosts);
+
+         d_temp_var_scratch_data.setFlag(scr_id);
+
+         break;
+      }
+
+      default: {
+
+         TBOX_ERROR(
+            d_object_name << ":  "
+            << "unknown HYP_VAR_TYPE = " << h_v_type
+            << endl);
+
+      }
+
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Process FLUX and FLUX INTEGRAL data before integration on the level.  *
+ *                                                                       *
+ * We allocate FLUX storage if appropriate.                              *
+ *                                                                       *
+ * If the advance is not temporary, we also zero out the FLUX INTEGRALS  *
+ * on the first step of any level finer than level zero.                 *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkHyperbolicLevelIntegrator::preprocessFluxData(
+   const tbox::Pointer<hier::MultiblockPatchLevel> mblk_level,
+   const double cur_time,
+   const double new_time,
+   const bool regrid_advance,
+   const bool first_step,
+   const bool last_step)
+{
+   NULL_USE(cur_time);
+   NULL_USE(last_step);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!mblk_level.isNull());
+#endif
+
+   hier::VariableDatabase* variable_db =
+      hier::VariableDatabase::getDatabase();
+
+   const int level_number = mblk_level->getLevelNumber();
+
+   if (!regrid_advance) {
+      if (((level_number > 0) && first_step) ||
+          ((level_number == 0) && !d_have_flux_on_level_zero)) {
+         mblk_level->allocatePatchData(d_flux_var_data, new_time);
+         if (level_number == 0) {
+            d_have_flux_on_level_zero = true;
+         }
+      }
+   } else {
+      if (first_step) {
+         mblk_level->allocatePatchData(d_flux_var_data, new_time);
+      }
+   }
+
+   if (!regrid_advance && (level_number > 0)) {
+
+      if (first_step) {
+
+         mblk_level->allocatePatchData(d_fluxsum_data, new_time);
+
+         for (hier::MultiblockPatchLevelIterator mi(mblk_level); mi; mi++) {
+
+            tbox::List<tbox::Pointer<hier::Variable> >::Iterator
+            fs_var = d_fluxsum_variables.listStart();
+
+            while (fs_var) {
+               int fsum_id =
+                  variable_db->mapVariableAndContextToIndex(fs_var(),
+                     d_scratch);
+
+               if (d_flux_is_face) {
+                  tbox::Pointer<pdat::OuterfaceData<double> > fsum_data =
+                     (*mi)->getPatchData(fsum_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+                  TBOX_ASSERT(!(fsum_data.isNull()));
+#endif
+                  fsum_data->fillAll(0.0);
+               } else {
+                  tbox::Pointer<pdat::OutersideData<double> > fsum_data =
+                     (*mi)->getPatchData(fsum_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+                  TBOX_ASSERT(!(fsum_data.isNull()));
+#endif
+                  fsum_data->fillAll(0.0);
+               }
+
+               fs_var++;
+            }
+         } // loop over patches
+
+      } else {
+         mblk_level->setTime(new_time, d_fluxsum_data);
+      }
+
+   } // if ( !regrid_advance && (level_number > 0) )
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Process FLUX and FLUX INTEGRAL data after advancing the solution on   *
+ * the level.  During normal integration steps, the flux integrals are   *
+ * updated for subsequent synchronization by adding FLUX values to       *
+ * flux integrals.                                                       *
+ *                                                                       *
+ * If the advance is not temporary (regular integration step):           *
+ * 1) If the level is the finest in the hierarchy, FLUX data is          *
+ *    deallocated.  It is not used during synchronization, and is only   *
+ *    maintained if needed for the advance.                              *
+ *                                                                       *
+ * 2) If the level is not the coarsest in the hierarchy, update the      *
+ *    flux integrals for later synchronization by adding FLUX values to  *
+ *    flux integrals.                                                    *
+ *                                                                       *
+ * If the advance is temporary, deallocate the flux data if first step.  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkHyperbolicLevelIntegrator::postprocessFluxData(
+   const tbox::Pointer<hier::MultiblockPatchLevel> mblk_level,
+   const bool regrid_advance,
+   const bool first_step,
+   const bool last_step)
+{
+   NULL_USE(last_step);
+
+   TBOX_ASSERT(!mblk_level.isNull());
+
+   if (regrid_advance && first_step) {
+      mblk_level->deallocatePatchData(d_flux_var_data);
+   }
+
+   if (!regrid_advance && (mblk_level->getLevelNumber() > 0)) {
+
+      for (hier::MultiblockPatchLevelIterator mi(mblk_level); mi; mi++) {
+
+         tbox::List<tbox::Pointer<hier::Variable> >::Iterator
+         flux_var = d_flux_variables.listStart();
+         tbox::List<tbox::Pointer<hier::Variable> >::Iterator
+         fluxsum_var = d_fluxsum_variables.listStart();
+
+         const hier::Index& ilo = (*mi)->getBox().lower();
+         const hier::Index& ihi = (*mi)->getBox().upper();
+
+         while (flux_var) {
+
+            tbox::Pointer<hier::PatchData> flux_data =
+               (*mi)->getPatchData(flux_var(), d_scratch);
+            tbox::Pointer<hier::PatchData> fsum_data =
+               (*mi)->getPatchData(fluxsum_var(), d_scratch);
+
+            tbox::Pointer<pdat::FaceData<double> > fflux_data;
+            tbox::Pointer<pdat::OuterfaceData<double> > ffsum_data;
+
+            tbox::Pointer<pdat::SideData<double> > sflux_data;
+            tbox::Pointer<pdat::OutersideData<double> > sfsum_data;
+
+            int ddepth;
+            hier::IntVector flux_ghosts(d_dim);
+
+            if (d_flux_is_face) {
+               fflux_data = flux_data;
+               ffsum_data = fsum_data;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+               TBOX_ASSERT(!(fflux_data.isNull()) && !(ffsum_data.isNull()));
+               TBOX_ASSERT(fflux_data->getDepth() == ffsum_data->getDepth());
+#endif
+               ddepth = fflux_data->getDepth();
+               flux_ghosts = fflux_data->getGhostCellWidth();
+            } else {
+               sflux_data = flux_data;
+               sfsum_data = fsum_data;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+               TBOX_ASSERT(!(sflux_data.isNull()) && !(sfsum_data.isNull()));
+               TBOX_ASSERT(sflux_data->getDepth() == sfsum_data->getDepth());
+#endif
+               ddepth = sflux_data->getDepth();
+               flux_ghosts = sflux_data->getGhostCellWidth();
+            }
+
+            for (int d = 0; d < ddepth; d++) {
+               // loop over lower and upper parts of outer face/side arrays
+               for (int ifs = 0; ifs < 2; ifs++) {
+                  if (d_flux_is_face) {
+                     if (d_dim == tbox::Dimension(2)) {
+                        F77_FUNC(upfluxsumface2d0, UPFLUXSUMFACE2D0) (
+                           ilo(0), ilo(1), ihi(0), ihi(1),
+                           flux_ghosts(0),
+                           flux_ghosts(1),
+                           ifs,
+                           fflux_data->getPointer(0, d),
+                           ffsum_data->getPointer(0, ifs, d));
+                        F77_FUNC(upfluxsumface2d1, UPFLUXSUMFACE2D1) (
+                           ilo(0), ilo(1), ihi(0), ihi(1),
+                           flux_ghosts(0),
+                           flux_ghosts(1),
+                           ifs,
+                           fflux_data->getPointer(1, d),
+                           ffsum_data->getPointer(1, ifs, d));
+                     }
+                     if (d_dim == tbox::Dimension(3)) {
+                        F77_FUNC(upfluxsumface3d0, UPFLUXSUMFACE3D0) (
+                           ilo(0), ilo(1), ilo(2),
+                           ihi(0), ihi(1), ihi(2),
+                           flux_ghosts(0),
+                           flux_ghosts(1),
+                           flux_ghosts(2),
+                           ifs,
+                           fflux_data->getPointer(0, d),
+                           ffsum_data->getPointer(0, ifs, d));
+                        F77_FUNC(upfluxsumface3d1, UPFLUXSUMFACE3D1) (
+                           ilo(0), ilo(1), ilo(2),
+                           ihi(0), ihi(1), ihi(2),
+                           flux_ghosts(0),
+                           flux_ghosts(1),
+                           flux_ghosts(2),
+                           ifs,
+                           fflux_data->getPointer(1, d),
+                           ffsum_data->getPointer(1, ifs, d));
+                        F77_FUNC(upfluxsumface3d2, UPFLUXSUMFACE3D2) (
+                           ilo(0), ilo(1), ilo(2),
+                           ihi(0), ihi(1), ihi(2),
+                           flux_ghosts(0),
+                           flux_ghosts(1),
+                           flux_ghosts(2),
+                           ifs,
+                           fflux_data->getPointer(2, d),
+                           ffsum_data->getPointer(2, ifs, d));
+                     }
+                  } else {
+                     if (d_dim == tbox::Dimension(2)) {
+                        F77_FUNC(upfluxsumside2d0, UPFLUXSUMSIDE2D0) (
+                           ilo(0), ilo(1), ihi(0), ihi(1),
+                           flux_ghosts(0),
+                           flux_ghosts(1),
+                           ifs,
+                           sflux_data->getPointer(0, d),
+                           sfsum_data->getPointer(0, ifs, d));
+                        F77_FUNC(upfluxsumside2d1, UPFLUXSUMSIDE2D1) (
+                           ilo(0), ilo(1), ihi(0), ihi(1),
+                           flux_ghosts(0),
+                           flux_ghosts(1),
+                           ifs,
+                           sflux_data->getPointer(1, d),
+                           sfsum_data->getPointer(1, ifs, d));
+                     }
+                     if (d_dim == tbox::Dimension(3)) {
+                        F77_FUNC(upfluxsumside3d0, UPFLUXSUMSIDE3D0) (
+                           ilo(0), ilo(1), ilo(2),
+                           ihi(0), ihi(1), ihi(2),
+                           flux_ghosts(0),
+                           flux_ghosts(1),
+                           flux_ghosts(2),
+                           ifs,
+                           sflux_data->getPointer(0, d),
+                           sfsum_data->getPointer(0, ifs, d));
+                        F77_FUNC(upfluxsumside3d1, UPFLUXSUMSIDE3D1) (
+                           ilo(0), ilo(1), ilo(2),
+                           ihi(0), ihi(1), ihi(2),
+                           flux_ghosts(0),
+                           flux_ghosts(1),
+                           flux_ghosts(2),
+                           ifs,
+                           sflux_data->getPointer(1, d),
+                           sfsum_data->getPointer(1, ifs, d));
+                        F77_FUNC(upfluxsumside3d2, UPFLUXSUMSIDE3D2) (
+                           ilo(0), ilo(1), ilo(2),
+                           ihi(0), ihi(1), ihi(2),
+                           flux_ghosts(0),
+                           flux_ghosts(1),
+                           flux_ghosts(2),
+                           ifs,
+                           sflux_data->getPointer(2, d),
+                           sfsum_data->getPointer(2, ifs, d));
+                     }
+                  }  // if face operations vs. side operations
+               }  // loop over lower and upper sides/faces
+            }  // loop over depth
+
+            flux_var++;
+            fluxsum_var++;
+
+         }  // loop over flux variables
+
+      }  // loop over patches
+
+   }  // if !regrid_advance and level number > 0 ....
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Copy time-dependent data from source to destination on level.         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkHyperbolicLevelIntegrator::copyTimeDependentData(
+   const tbox::Pointer<hier::PatchLevel> level,
+   const tbox::Pointer<hier::VariableContext> src_context,
+   const tbox::Pointer<hier::VariableContext> dst_context)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!level.isNull());
+   TBOX_ASSERT(!src_context.isNull());
+   TBOX_ASSERT(!src_context.isNull());
+#endif
+
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      tbox::List<tbox::Pointer<hier::Variable> >::Iterator
+      time_dep_var = d_time_dep_variables.listStart();
+      while (time_dep_var) {
+         tbox::Pointer<hier::PatchData> src_data =
+            patch->getPatchData(time_dep_var(), src_context);
+         tbox::Pointer<hier::PatchData> dst_data =
+            patch->getPatchData(time_dep_var(), dst_context);
+
+         dst_data->copy(*src_data);
+         time_dep_var++;
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print all class data for MblkHyperbolicLevelIntegrator object.      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkHyperbolicLevelIntegrator::printClassData(
+   ostream& os) const
+{
+   os << "\nMblkHyperbolicLevelIntegrator::printClassData..." << endl;
+   os << "MblkHyperbolicLevelIntegrator: this = "
+      << (MblkHyperbolicLevelIntegrator *)this << endl;
+   os << "d_object_name = " << d_object_name << endl;
+   os << "d_cfl = " << d_cfl << "\n"
+      << "d_cfl_init = " << d_cfl_init << endl;
+   os << "d_lag_dt_computation = " << d_lag_dt_computation << "\n"
+      << "d_use_ghosts_for_dt = "
+      << d_use_ghosts_for_dt << endl;
+   os << "d_patch_strategy = "
+      << (MblkHyperbolicPatchStrategy *)d_patch_strategy << endl;
+   os
+   <<
+   "NOTE: Not printing variable arrays, ComponentSelectors, communication schedules, etc."
+   << endl;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Writes out the class version number, d_cfl, d_cfl_init,              *
+ * d_lag_dt_computation, and d_use_ghosts_for_dt to the database.	*
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkHyperbolicLevelIntegrator::putToDatabase(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   db->putInteger("ALGS_HYPERBOLIC_LEVEL_INTEGRATOR_VERSION",
+      ALGS_HYPERBOLIC_LEVEL_INTEGRATOR_VERSION);
+
+   db->putDouble("d_cfl", d_cfl);
+   db->putDouble("d_cfl_init", d_cfl_init);
+   db->putBool("d_lag_dt_computation", d_lag_dt_computation);
+   db->putBool("d_use_ghosts_for_dt", d_use_ghosts_for_dt);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Reads in cfl, cfl_init, lag_dt_computation, and                      *
+ * use_ghosts_to_compute_dt from the input database.                    *
+ * Note all restart values are overriden with values from the input	*
+ * database.								*
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkHyperbolicLevelIntegrator::getFromInput(
+   tbox::Pointer<tbox::Database> db,
+   bool is_from_restart)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   if (db->keyExists("cfl")) {
+      d_cfl = db->getDouble("cfl");
+   } else {
+      if (!is_from_restart) {
+         d_cfl = db->getDoubleWithDefault("cfl", d_cfl);
+      }
+   }
+
+   if (db->keyExists("cfl_init")) {
+      d_cfl_init = db->getDouble("cfl_init");
+   } else {
+      if (!is_from_restart) {
+         d_cfl_init = db->getDoubleWithDefault("cfl_init", d_cfl_init);
+      }
+   }
+
+   if (db->keyExists("lag_dt_computation")) {
+      d_lag_dt_computation = db->getBool("lag_dt_computation");
+   } else {
+      if (!is_from_restart) {
+         d_lag_dt_computation =
+            db->getDoubleWithDefault("lag_dt_computation",
+               d_lag_dt_computation);
+      }
+   }
+
+   if (db->keyExists("use_ghosts_to_compute_dt")) {
+      d_use_ghosts_for_dt = db->getBool("use_ghosts_to_compute_dt");
+   } else {
+      if (!is_from_restart) {
+         d_use_ghosts_for_dt =
+            db->getDoubleWithDefault("use_ghosts_for_dt",
+               d_use_ghosts_for_dt);
+         TBOX_WARNING(
+            d_object_name << ":  "
+            <<
+            "Key data `use_ghosts_to_compute_dt' not found in input."
+            << "  Using default value "
+            << d_use_ghosts_for_dt << endl);
+      }
+   }
+
+   if (db->keyExists("distinguish_mpi_reduction_costs")) {
+      d_distinguish_mpi_reduction_costs =
+         db->getBool("distinguish_mpi_reduction_costs");
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * First, gets the database corresponding to the object_name from the    *
+ * restart file.   If this database exists, this method checks to make   *
+ * sure that the version number of the class matches the version number  *
+ * of the restart file.  If they match, then d_cfl, d_cfl_init,          *
+ * d_lag_dt_computation, and d_use_ghosts_to_compute_dt are read from    *
+ * restart database.                                                    *
+ * Note all restart values can be overriden with values from the input	*
+ * database.								*
+ *                                                                       *
+ *************************************************************************
+ */
+void MblkHyperbolicLevelIntegrator::getFromRestart()
+{
+
+   tbox::Pointer<tbox::Database> root_db =
+      tbox::RestartManager::getManager()->getRootDatabase();
+
+   tbox::Pointer<tbox::Database> db;
+   if (root_db->isDatabase(d_object_name)) {
+      db = root_db->getDatabase(d_object_name);
+   } else {
+      TBOX_ERROR("Restart database corresponding to "
+         << d_object_name << " not found in restart file" << endl);
+   }
+
+   int ver = db->getInteger("ALGS_HYPERBOLIC_LEVEL_INTEGRATOR_VERSION");
+   if (ver != ALGS_HYPERBOLIC_LEVEL_INTEGRATOR_VERSION) {
+      TBOX_ERROR(d_object_name << ":  "
+                               << "Restart file version different "
+                               << "than class version." << endl);
+   }
+
+   d_cfl = db->getDouble("d_cfl");
+   d_cfl_init = db->getDouble("d_cfl_init");
+   d_lag_dt_computation = db->getBool("d_lag_dt_computation");
+   d_use_ghosts_for_dt = db->getBool("d_use_ghosts_for_dt");
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Utility routines to retrieve variable contexts used by integrator.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+tbox::Pointer<hier::VariableContext>
+MblkHyperbolicLevelIntegrator::getCurrentContext() const
+{
+   return d_current;
+}
+
+tbox::Pointer<hier::VariableContext>
+MblkHyperbolicLevelIntegrator::getNewContext() const
+{
+   return d_new;
+}
+
+tbox::Pointer<hier::VariableContext>
+MblkHyperbolicLevelIntegrator::getOldContext() const
+{
+   return d_old;
+}
+
+tbox::Pointer<hier::VariableContext>
+MblkHyperbolicLevelIntegrator::getScratchContext() const
+{
+   return d_scratch;
+}
+
+tbox::Pointer<hier::VariableContext>
+MblkHyperbolicLevelIntegrator::getPlotContext() const
+{
+   return d_plot_context;
+}
+
+bool
+MblkHyperbolicLevelIntegrator::usingRefinedTimestepping() const
+{
+   return d_use_time_refinement;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/MblkHyperbolicLevelIntegrator.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/MblkHyperbolicLevelIntegrator.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1062 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Integration routines for single level in AMR hierarchy
+ *                (basic hyperbolic systems) 
+ *
+ ************************************************************************/
+
+#ifndef included_MblkHyperbolicLevelIntegratorXD
+#define included_MblkHyperbolicLevelIntegratorXD
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#ifndef included_iostream
+#define included_iostream
+#include <iostream>
+using namespace std;
+#endif
+#include "MblkHyperbolicPatchStrategy.h"
+#include "SAMRAI/algs/TimeRefinementLevelStrategy.h"
+#include "SAMRAI/hier/ComponentSelector.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/mesh/BaseGriddingAlgorithm.h"
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+#include "SAMRAI/hier/MultiblockPatchHierarchy.h"
+#include "SAMRAI/mesh/StandardTagAndInitStrategy.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/List.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Serializable.h"
+#ifndef included_String
+#include <string>
+using namespace std;
+#define included_String
+#endif
+#include "SAMRAI/xfer/CoarsenAlgorithm.h"
+#include "SAMRAI/xfer/MultiblockCoarsenAlgorithm.h"
+#include "SAMRAI/xfer/RefineAlgorithm.h"
+#include "SAMRAI/xfer/MultiblockRefineAlgorithm.h"
+#include "SAMRAI/xfer/MultiblockRefineSchedule.h"
+#include "SAMRAI/tbox/Timer.h"
+
+/**
+ * Class MblkHyperbolicLevelIntegrator provides routines needed to
+ * integrate a system of hyperbolic conservation laws on a structured
+ * AMR patch hierarchy using local time refinement.  The routines include
+ * initializing a level, advance a level, and synchronize levels in a
+ * time-dependent AMR application.  The AMR timestepping algorithm that
+ * cycles through the patch levels and calls these routines is provided by
+ * the TimeRefinementIntegrator class.  Together, that hierarchy
+ * integration class and this single level integration class produce the
+ * common AMR algorithm due to Berger, Colella and Oliger
+ * (see e.g., Berger and Colella, J. Comp. Phys. (82)1:64-84, 1989).
+ * The operations performed on single patches on each level are implemented
+ * in the user-defined, problem-specific class derived from the abstract
+ * base class HyperbolicPatchStrategy.
+ *
+ * It is important to note that the variable contexts used by the concrete
+ * patch strategy subclass must be consistent with those defined in this
+ * class which manages the data for the variables.
+ *
+ * This class is derived from the abstract base class
+ * TimeRefinementLevelStrategy, which defines routines needed by
+ * the time refinement integrator.  There is an argument in the constructor
+ * that determines whether this class will be used by the time
+ * refinement integrator for refined timestepping or synchronized
+ * timestepping.  The routines overloaded in
+ * TimeRefinementLevelStrategy are: initializeLevelIntegrator(),
+ * getLevelDt(), getMaxFinerLevelDt(), advanceLevel(),
+ * standardLevelSynchronization(), synchronizeNewLevels(),
+ * resetTimeDependentData(), and resetDataToPreadvanceState().
+ * This class is also derived from mesh::StandardTagAndInitStrategy,
+ * which defines routines needed by the gridding algorithm classes.  The
+ * routines overloaded in mesh::StandardTagAndInitStrategy are:
+ * initializeLevelData(), resetHierarchyConfiguration(),
+ * applyGradientDetector(), applyRichardsonExtrapolation(), and
+ * coarsenDataForRichardsonExtrapolation().
+ *
+ * An object of this class requires numerous parameters to be read from
+ * input.  Also, data must be written to and read from files for restart.
+ * The input and restart data are summarized as follows.
+ *
+ * Required input keys and data types: NONE
+ *
+ * Optional input keys, data types, and defaults:
+ *
+ *
+ *
+ *
+ *    - \b    cfl
+ *       double value for the CFL factor used for timestep selection
+ *       (dt used = CFL * max dt).  If no input value is given, a default
+ *       value of 0.9 is used.
+ *
+ *    - \b    cfl_init
+ *       double value for CFL factor used for initial timestep.
+ *       If no input value is given, a default value of 0.9 is used.
+ *
+ *    - \b    lag_dt_computation
+ *       boolean value indicating whether dt is based on current
+ *       solution or solution from previous step (possible optimization
+ *       in communication for characteristic analysis).  If no input
+ *       value is given, a default value of TRUE is used.
+ *
+ *
+ *    - \b    use_ghosts_to_compute_dt
+ *       boolean value indicating whether ghost data must be filled before
+ *       timestep is computed on each patch (possible communication
+ *       optimization).  if no input value is given, a default value
+ *       of TRUE is used.
+ *
+ *    - \b    distinguish_mpi_reduction_costs
+ *       boolean specifying whether to separate reduction costs in tbox::MPI
+ *       from costs of load imbalances.  By specifying it true, a
+ *       barrier is put in place before the reduction call, so an extra
+ *       operation is incurred.  For this reason, it is defaulted FALSE.
+ *
+ *
+ *
+ *
+ *
+ * Note that when continuing from restart, the input values in the
+ * input file override all values read in from the restart database.
+ *
+ * A sample input file entry might look like:
+ *
+ * \verbatim
+ *
+ *    cfl = 0.9
+ *    cfl_init = 0.9
+ *    lag_dt_computation = FALSE
+ *    use_ghosts_to_compute_dt = TRUE
+ *    distinguish_mpi_reduction_costs = TRUE
+ *
+ * \endverbatim
+ *
+ * @see algs::TimeRefinementIntegrator
+ * @see mesh::StandardTagAndInitStrategy
+ * @see algs::HyperbolicPatchStrategy
+ */
+
+using namespace SAMRAI;
+using namespace algs;
+
+class MblkHyperbolicLevelIntegrator:
+   public TimeRefinementLevelStrategy,
+   public mesh::StandardTagAndInitStrategy,
+   public tbox::Serializable
+{
+public:
+   /**
+    * Enumerated type for the different ways in which variable storage
+    * can be manipulated by the level integration algorithm.
+    * See registerVariable(...) function for more details.
+    *
+    *
+    *
+    * - \b TIME_DEP      {Data that changes in time and needs more than one
+    *                      time level to be stored.}
+    * - \b INPUT          {Data that is set once and do not change during
+    *                      the ghosts are never re-filled outside of
+    *                      user-defined routines.}
+    * - \b FLUX           {Face-centered double values used in conservative
+    *                      difference and synchronization (i.e., refluxing)
+    *                      process.  A corresponding variable to store flux
+    *                      integral information is created for each FLUX
+    *                      variable.}
+    * - \b TEMPORARY      {Accessory values intended to live only for
+    *                      computation on a single patch (i.e., they cannot
+    *                      be assumed to exist between patch routine function
+    *                      calls.)}
+    *
+    *
+    *
+    */
+   enum HYP_VAR_TYPE { TIME_DEP = 0,
+                       INPUT = 1,
+                       NO_FILL = 2,
+                       FLUX = 3,
+                       TEMPORARY = 4 };
+
+   /**
+    * Constructor for MblkHyperbolicLevelIntegrator initializes
+    * integration parameters to default values and constructs standard
+    * communication algorithms.  Other data members are read in from
+    * the specified input database or the restart database corresponding
+    * to the specified object_name.  The constructor also registers
+    * this object for restart using the specified object name when
+    * the boolean argument is true.  Whether object will write its state to
+    * restart files during program execution is determined by this argument.
+    * Note that it has a default state of true.  This class is used by
+    * the time refinement integrator for refined timestepping when the
+    * use_time_refinement argument is true, and for synchronized
+    * timestepping when the boolean is false.
+    *
+    * When assertion checking is active, passing in any null pointer
+    * or an empty string will result in an unrecoverable assertion.
+    */
+   MblkHyperbolicLevelIntegrator(
+      const string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> input_db,
+      MblkHyperbolicPatchStrategy* patch_strategy,
+      tbox::Pointer<hier::MultiblockPatchHierarchy>& mblk_hierarchy,
+      bool register_for_restart = true,
+      bool use_time_refinement = true);
+
+   /**
+    * The destructor for MblkHyperbolicLevelIntegrator unregisters
+    * the integrator object with the restart manager when so registered.
+    */
+   virtual ~MblkHyperbolicLevelIntegrator();
+
+   /**
+    * Initialize level integrator by by setting the number of time levels
+    * of data needed based on specifications of the gridding algorithm.
+    *
+    * This routine also invokes variable registration in the patch strategy.
+    *
+    * Assertion checking will throw unrecoverable assertions if either
+    * pointer is null.
+    */
+   virtual void
+   initializeLevelIntegrator(
+      tbox::Pointer<mesh::BaseGriddingAlgorithm> gridding_alg);
+
+   /**
+    * Determine time increment to advance data on level and return that
+    * value.  The double dt_time argument is the simulation time when
+    * the routine is called.  The initial_time boolean is true if this
+    * routine is called during hierarchy initialization (i.e., at the
+    * initial simulation time).  Otherwise, it is false.  The
+    * recompute_dt option specifies whether to compute the timestep using
+    * the current level data or to return the value stored by the time
+    * integrator. The default true setting means the timestep will be
+    * computed if no value is supplied.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the level pointer is null.
+    */
+   virtual double
+   getLevelDt(
+      const tbox::Pointer<hier::BasePatchLevel> level,
+      const double dt_time,
+      const bool initial_time);
+
+   /**
+    * Return the maximum allowable time increment for the level with
+    * the specified level number based on the time increment for the
+    * next coarser level and the mesh refinement ratio between the two
+    * levels.  For the common explicit integration methods for hyperbolic
+    * conservation laws (constrained by a CFL limit), the fine time increment
+    * is typically the coarse increment divided by the refinement ratio.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the ratio vector is not acceptable (i.e., all values > 0).
+    */
+   virtual double
+   getMaxFinerLevelDt(
+      const int finer_level_number,
+      const double coarse_dt,
+      const hier::IntVector& ratio_to_coarser);
+
+   /**
+    * Integrate data on all patches on the given patch level from current
+    * time (current_time) to new time (new_time).  This routine is used
+    * to advance the solution on each level in the hierarchy and during
+    * time-dependent regridding procedures, such as Richardson extrapolation.
+    * The boolean arguments are used to determine the state of the algorithm
+    * and the data when the advance routine is called.   The first_step
+    * and last_step indicate whether the step is the first or last in the
+    * current timestep sequence on the level.  Typically, the current timestep
+    * sequence means each step on the level between advance steps on a
+    * coarser level in the hierarchy, if one exists.  The regrid_advance
+    * value is true when the advance is called as part of a time-dependent
+    * regridding procedure.  Usually when this happens, the results of the
+    * colution advance will be discarded.  So, for example, when this is true
+    * flux information is not maintained and flux integrals are not updated.
+    * The final boolean argument indicates whether or not the level resides
+    * in the hierarchy.  For example, during time-dependent regridding, such
+    * as Richardson extrapolation, a temporary level that is not in the
+    * hierarchy is created and advanced.  Then, a communication schedule
+    * must be generated for the level before the advance begins.
+    *
+    * This routine is called at two different points during time integration:
+    * during the regular time advance sequence, and possibly at the initial
+    * simulation time.  The second call advances the solution on a coarser
+    * level ahead in time to provide time-dependent boundary values for some
+    * finer level when time-dependent regridding is used.  In the first case,
+    * the values of the boolean flags are:
+    *
+    *
+    *
+    *    - \b  first_step
+    *        = true for first step in level time step sequence; else, false.
+    *    - \b  last_step
+    *        = true for last step in level time step sequence; else, false.
+    *    - \b  regrid_advance
+    *        = false.
+    *
+    *
+    *
+    * In the second case, the values of the boolean flags are:
+    *
+    *
+    *
+    *    - \b  first_step
+    *        = true.
+    *    - \b  last_step
+    *        = false.
+    *    - \b  regrid_advance
+    *        = true.
+    *
+    *
+    *
+    *
+    * When time-dependent regridding (i.e., Richardson extrapolation) is
+    * used, the routine is called from two different points in addition to
+    * those described above: to advance a temporary level that is coarser
+    * than the hierarchy level on which error estimation is performed, and
+    * to advance the hierarchy level itself.  In the first case, the values of
+    * the boolean flags are:
+    *
+    *
+    *
+    *    - \b  first_step
+    *        = true.
+    *    - \b  last_step
+    *        = true.
+    *    - \b  regrid_advance
+    *        = true.
+    *
+    *
+    *
+    * In the second case, the values of the boolean flags are:
+    *
+    *
+    *
+    *    - \b  first_step
+    *      (when regridding during time integration sequence)
+    *        = true when the level is not coarsest level to synchronize
+    *          immediately before the regridding process; else, false.
+    *      (when generating initial hierarchy construction)
+    *        = true, even though there may be multiple advance steps.
+    *    - \b  last_step
+    *        = true when the advance is the last in the Richardson
+    *          extrapolation step sequence; else false.
+    *    - \b  regrid_advance
+    *        = true.
+    *
+    *
+    *
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if either the level or hierarchy pointer is null, or the
+    * new time is not greater than the given time.
+    */
+
+   virtual double
+   advanceLevel(
+      const tbox::Pointer<hier::BasePatchLevel> level,
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const double current_time,
+      const double new_time,
+      const bool first_step,
+      const bool last_step,
+      const bool regrid_advance = false);
+
+   /**
+    * Synchronize data between given patch levels in patch hierarchy
+    * according to the standard hyperbolic AMR flux correction algorithm.
+    * This routine synchronizes data between two levels at a time from
+    * the level with index finest_level down to the level with index
+    * coarsest_level.  The array of old time values are used in the
+    * re-integration of the time-dependent data.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the hierarchy pointer is null, the level numbers do
+    * not properly match existing levels in the hierarchy (either
+    * coarsest_level > finest_level or some level is null), or
+    * all of the old time values are less than the value of sync_time.
+    */
+   virtual void
+   standardLevelSynchronization(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level,
+      const double sync_time,
+      const tbox::Array<double>& old_times);
+
+   /**
+    * This overloaded version of standardLevelSynchronization implements
+    * a routine used for synchronized timestepping.  Only a single
+    * value for the old time is needed, since all levels would have the
+    * same old time.
+    */
+   virtual void
+   standardLevelSynchronization(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level,
+      const double sync_time,
+      const double old_time);
+
+   /**
+    * Coarsen current solution data from finest hierarchy level specified
+    * down through the coarsest hierarchy level specified, if initial_time
+    * is true.  In this case, the hierarchy is being constructed at the
+    * initial simulation time,  After data is coarsened, the application-
+    * specific initialization routine is called to set data before that
+    * solution is further coarsened to the next coarser level in the
+    * hierarchy.  This operation makes the solution consistent between
+    * coarser levels and finer levels that did not exist when the coarse
+    * levels where created and initialized originally.
+    *
+    * When initial_time is false, this routine does nothing since the
+    * standard hyperbolic AMR algorithm for conservation laws requires
+    * no data synchronization after regridding beyond interpolation of
+    * data from coarser levels in the hierarchy in some conservative fashion.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the hierarchy pointer is null, the level numbers do
+    * not properly match existing levels in the hierarchy (either
+    * coarsest_level > finest_level or some level is null).
+    */
+   virtual void
+   synchronizeNewLevels(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level,
+      const double sync_time,
+      const bool initial_time);
+
+   /**
+    * Resets time-dependent data storage and update time for patch level.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the level pointer is null.
+    */
+   virtual void
+   resetTimeDependentData(
+      const tbox::Pointer<hier::BasePatchLevel> level,
+      const double new_time,
+      const bool can_be_refined);
+
+   /**
+    * Deallocate all new simulation data on the given level.  This may
+    * be necessary during regridding, or setting up levels initially.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the level pointer is null.
+    */
+   virtual void
+   resetDataToPreadvanceState(
+      const tbox::Pointer<hier::BasePatchLevel> level);
+
+   /**
+    * Initialize data on a new level after it is inserted into an AMR patch
+    * hierarchy by the gridding algorithm.  The level number indicates
+    * that of the new level.  The old_level pointer corresponds to
+    * the level that resided in the hierarchy before the level with the
+    * specified number was introduced.  If the pointer is null, there was
+    * no level in the hierarchy prior to the call and the level data is set
+    * based on the user routines and the simulation time.  Otherwise, the
+    * specified level replaces the old level and the new level receives data
+    * from the old level appropriately before it is destroyed.
+    *
+    * Typically, when data is set, it is interpolated from coarser levels
+    * in the hierarchy.  If the data is to be set, the level number must
+    * match that of the old level, if non-null.  If the old level is
+    * non-null, then data is copied from the old level to the new level
+    * on regions of intersection between those levels before interpolation
+    * occurs.  Then, user-supplied patch routines are called to further
+    * initialize the data if needed.  The boolean argument initial_time
+    * is passed into the user's routines.
+    *
+    * The boolean argument initial_time indicates whether the level is
+    * being introduced for the first time (i.e., at initialization time),
+    * or after some regrid process during the calculation beyond the initial
+    * hierarchy construction.  This information is provided since the
+    * initialization of the data on a patch may be different in each of those
+    * circumstances.  The can_be_refined boolean argument indicates whether
+    * the level is the finest level allowed in the hierarchy.  This may or
+    * may not affect the data initialization process depending on the problem.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the hierarchy pointer is null, the level number does
+    * not match any level in the hierarchy, or the old level number
+    * does not match the level number (if the old level pointer is non-null).
+    */
+   virtual void
+   initializeLevelData(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double init_data_time,
+      const bool can_be_refined,
+      const bool initial_time,
+      const tbox::Pointer<hier::BasePatchLevel> old_level,
+      const bool allocate_data = true);
+
+   /**
+    * Reset cached communication schedules after the hierarchy has changed
+    * (due to regidding, for example) and the data has been initialized on
+    * the new levels.  The intent is that the cost of data movement on the
+    * hierarchy will be amortized across multiple communication cycles,
+    * if possible.  The level numbers indicate the range of levels in the
+    * hierarchy that have changed.  However, this routine updates
+    * communication schedules every level finer than and including that
+    * indexed by the coarsest level number given.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the hierarchy pointer is null, any pointer to a level
+    * in the hierarchy that is coarser than the finest level is null,
+    * or the given level numbers not specified properly; e.g.,
+    * coarsest_level > finest_level.
+    */
+   virtual void
+   resetHierarchyConfiguration(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level);
+
+   /**
+    * Set integer tags to "one" in cells where refinement of the given
+    * level should occur according to some user-supplied gradient criteria.
+    * The double time argument is the regrid time.  The integer "tag_index"
+    * argument is the patch descriptor index of the cell-centered integer tag
+    * array on each patch in the hierarchy.  The boolean argument
+    * initial_time indicates whether the level is being subject to refinement
+    * at the initial simulation time.  If it is false, then the error
+    * estimation process is being invoked at some later time after the AMR
+    * hierarchy was initially constructed.  The boolean argument
+    * uses_richardson_extrapolation_too is true when Richardson
+    * extrapolation error estimation is used in addition to the gradient
+    * detector, and false otherwise.  This argument helps the user to
+    * manage multiple regridding criteria.   This information is passed along
+    * to the user's patch tagging routines since the application of the
+    * gradient detector may be different in each case.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the hierarchy pointer is null or the level number does
+    * not match any existing level in the hierarchy.
+    */
+   virtual void
+   applyGradientDetector(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double error_data_time,
+      const int tag_index,
+      const bool initial_time,
+      const bool uses_richardson_extrapolation_too);
+
+   /**
+    * Set integer tags to "one" where refinement onf the given
+    * level should occur according to some user-supplied Richardson
+    * extrapolation criteria.  The "error_data_time" argument is the
+    * regrid time.  The "deltat" argument is the time increment to advance
+    * the solution on the level to be refined.  Note that that level is
+    * finer than the level in the argument list, in general.  The
+    * ratio between the argument level and the actual hierarchy level
+    * is given by the integer "coarsen ratio".
+    *
+    * The integer "tag_index" argument is the patch descriptor index of
+    * the cell-centered integer tag array on each patch in the hierarchy.
+    *
+    * The boolean argument initial_time indicates whether the level is being
+    * subject to refinement at the initial simulation time.  If it is false,
+    * then the error estimation process is being invoked at some later time
+    * after the AMR hierarchy was initially constructed.  Typically, this
+    * information is passed to the user's patch tagging routines since the
+    * application of the Richardson extrapolation process may be different
+    * in each case.
+    *
+    * The boolean uses_gradient_detector_too is true when a gradient
+    * detector procedure is used in addition to Richardson extrapolation,
+    * and false otherwise.  This argument helps the user to manage multiple
+    * regridding criteria.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the level pointer is null.
+    *
+    * ANDY, THIS ROUTINE HAS TO BE ALTERED TO TAKE IN MultiblockPatchHierarchy
+    * and MultiblockPatchLevel WHEN WE GET READY TO DO RICHARDSON
+    * EXTRAPOLATION.
+    */
+   virtual void
+   applyRichardsonExtrapolation(
+      const tbox::Pointer<hier::PatchLevel> level,
+      const double error_data_time,
+      const int tag_index,
+      const double deltat,
+      const int error_coarsen_ratio,
+      const bool initial_time,
+      const bool uses_gradient_detector_too);
+
+   /**
+    * Coarsen solution data from level to coarse_level for Richardson
+    * extrapolation.  Note that this routine will be called twice during
+    * the Richardson extrapolation error estimation process.  The
+    * before_advance boolean argument indicates whether data is
+    * set on the coarse level by coarsening the "old" time level solution
+    * (i.e., before it has been advanced) or by coarsening the "new"
+    * solution on the fine level (i.e., after it has been advanced).
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if either level pointer is null.
+    *
+    * ANDY, THIS ROUTINE HAS TO BE ALTERED TO TAKE IN MultiblockPatchHierarchy
+    * and MultiblockPatchLevel WHEN WE GET READY TO DO RICHARDSON
+    * EXTRAPOLATION.
+    */
+   virtual void
+   coarsenDataForRichardsonExtrapolation(
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const int level_number,
+      const tbox::Pointer<hier::PatchLevel> coarse_level,
+      const double coarsen_data_time,
+      const bool before_advance);
+
+   /**
+    * Register a variable with the hyperbolic integration algorithm.  The
+    * variable type must be one of the options defined by the enumerated
+    * type defined above.  Typically, this routine is called from the
+    * hyperbolic patch model when the variable registration process is
+    * invoked by calling the function initializeLevelIntegrator() above.
+    * In fact, that function should be called before this routine is called.
+    *
+    * When assertion checking is active, an unrecoverable assertion will
+    * result if the variable pointer or geometry pointer is null.
+    */
+   virtual void
+   registerVariable(
+      const tbox::Pointer<hier::Variable> var,
+      const hier::IntVector ghosts,
+      const HYP_VAR_TYPE h_v_type,
+      const tbox::Pointer<xfer::CoarsenOperator> coarsen_op =
+         tbox::Pointer<xfer::CoarsenOperator>(
+            NULL),
+      const tbox::Pointer<xfer::RefineOperator> refine_op =
+         tbox::Pointer<xfer::RefineOperator>(
+            NULL),
+      const tbox::Pointer<xfer::TimeInterpolateOperator> time_int =
+         tbox::Pointer<xfer::TimeInterpolateOperator>(NULL));
+
+   /**
+    * Print class data representation for hyperbolic level integrator object.
+    * This is done automatically, when an unrecoverable run-time assertion
+    * is thrown within some member function of this class.
+    */
+   virtual void
+   printClassData(
+      ostream& os) const;
+
+   /**
+    * Write out object state to the given database.
+    *
+    * When assertion checking is active, database point must be non-null.
+    */
+   virtual void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> db);
+
+   /**
+    * Return pointer to "current" variable context used by integrator.
+    * Current data corresponds to state data at the beginning of a
+    * timestep, or when a new level is initialized.
+    */
+   tbox::Pointer<hier::VariableContext>
+   getCurrentContext() const;
+
+   /**
+    * Return pointer to "new" variable context used by integrator.
+    * New data corresponds to advanced state data at the end of a timestep.
+    * The data is one timestep later than the "current" data.
+    */
+   tbox::Pointer<hier::VariableContext>
+   getNewContext() const;
+
+   /**
+    * Return pointer to "old" variable context used by integrator.
+    * Old data corresponds to an extra time level of state data used
+    * for Richardson extrapolation error estimation.  The data is
+    * one timestep earlier than the "current" data.
+    *
+    * Note that only in certain cases when using time-dependent error
+    * estimation, such as Richardson extrapolation, is the returned
+    * pointer will non-null.  See contructor for more information.
+    */
+   tbox::Pointer<hier::VariableContext>
+   getOldContext() const;
+
+   /**
+    * Return pointer to "scratch" variable context used by integrator.
+    * Scratch data typically corresponds to storage that user-routines
+    * in the concrete HyperbolicPatchStrategy object manipulate;
+    * in particular, scratch data contains ghost cells.
+    */
+   tbox::Pointer<hier::VariableContext>
+   getScratchContext() const;
+
+   /**
+    * Return pointer to variable context used for plotting.  This
+    * context corresponds to the data storage that should be written
+    * to plot files.  Typically, this is the same as the "current" context.
+    */
+   tbox::Pointer<hier::VariableContext>
+   getPlotContext() const;
+
+   /**
+    * Return true if this class has been constructed to use refined
+    * timestepping and false if it has been constructed to use
+    * synchronized timestepping.
+    */
+   bool
+   usingRefinedTimestepping() const;
+
+protected:
+   /**
+    * Read input values, indicated above, from given database.  The boolean
+    * argument is_from_restart should be set to true if the simulation
+    * is beginning from restart.  Otherwise it should be set to false.
+    *
+    * When assertion checking is active, the database pointer must be non-null.
+    */
+   virtual void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db,
+      bool is_from_restart);
+
+   /**
+    * Read object state from the restart file and initialize class
+    * data members.  The database from which the restart data is read is
+    * determined by the object_name specified in the constructor.
+    *
+    * Unrecoverable Errors:
+    *
+    *
+    *
+    *
+    *    -
+    *        The database corresponding to object_name is not found
+    *        in the restart file.
+    *
+    *    -
+    *        The class version number and restart version number do not
+    *        match.
+    *
+    *
+    *
+    *
+    *
+    */
+   virtual void
+   getFromRestart();
+
+   /*
+    * Pre-process flux storage before advancing solution on level from
+    * cur_time to new_time.  The boolean flags are used to determine
+    * how flux and flux integral storage is allocated and initialized.
+    * These are needed since the advanceLevel() routine is used for
+    * both level integration and time-dependent error estimation.
+    *
+    * When assertion checking is active, the level and schedule pointers
+    * must be non-null and the current time must be less than the new time.
+    */
+   virtual void
+   preprocessFluxData(
+      const tbox::Pointer<hier::MultiblockPatchLevel> level,
+      const double cur_time,
+      const double new_time,
+      const bool regrid_advance,
+      const bool first_step,
+      const bool last_step);
+
+   /*
+    * Post-process flux storage after advancing solution on level.
+    * The boolean flag is used to determine how flux and flux integral
+    * storage is copied and de-allocated. This is needed since the
+    * advanceLevel() routine is used for both level integration and
+    * time-dependent error estimation.
+    *
+    * When assertion checking is active, the level pointer must be non-null.
+    */
+   virtual void
+   postprocessFluxData(
+      const tbox::Pointer<hier::MultiblockPatchLevel> level,
+      const bool regrid_advance,
+      const bool first_step,
+      const bool last_step);
+
+   /*
+    * Copy time-dependent data from source space to destination space.
+    *
+    * When assertion checking is active, the level and context pointers
+    * must be non-null.
+    */
+   virtual void
+   copyTimeDependentData(
+      const tbox::Pointer<hier::PatchLevel> level,
+      const tbox::Pointer<hier::VariableContext> src_context,
+      const tbox::Pointer<hier::VariableContext> dst_context);
+
+   /**
+    * Apply the standard AMR hyperbolic flux synchronization process preserve
+    * conservation properties in the solution between the fine level and the
+    * coarse level.  The sync_time argument indicates the time at which
+    * the solution on the two levels is being synchronized.  The variable
+    * coarse_sim_time indicates the previous simulation time on the
+    * coarse level (recall the conservative difference will be repeated on the
+    * coarse level during the synchronization process).  After the
+    * synchronization, the flux and flux integral data storage is reset on
+    * the levels.
+    *
+    * When assertion checking is turned on, an unrecoverable assertion
+    * will result if either level pointer is null, the levels are not
+    * consecutive in the AMR hierarchy, or the coarse sim time is not
+    * less than the sync time.
+    */
+   virtual void
+   synchronizeLevelWithCoarser(
+      const tbox::Pointer<hier::MultiblockPatchLevel> fine,
+      const tbox::Pointer<hier::MultiblockPatchLevel> coarse,
+      const double sync_time,
+      const double coarse_sim_time);
+
+private:
+   /*
+    * The patch strategy supplies the application-specific operations
+    * needed to treat data on patches in the AMR hierarchy.
+    */
+   MblkHyperbolicPatchStrategy* d_patch_strategy;
+
+   /*
+    * The object name is used as a handle to databases stored in
+    * restart files and for error reporting purposes.  The boolean
+    * is used to control restart file writing operations.
+    */
+   string d_object_name;
+
+   const tbox::Dimension d_dim;
+
+   bool d_use_time_refinement;
+   bool d_registered_for_restart;
+
+   /*
+    * Courant-Friedrichs-Levy parameters for time increment selection.
+    */
+   double d_cfl;
+   double d_cfl_init;
+
+   /*
+    * Boolean flags for algorithm variations during time integration.
+    *
+    * d_lag_dt_computation indicates when time increment is computed for
+    *                      next step on a level.  A value of true means
+    *                      that the current solution values will be used to
+    *                      compute dt.  A value of false means that dt will
+    *                      be computed after the current solution is advanced
+    *                      and the new solution is used to compute dt. The
+    *                      default value is true.
+    *
+    * d_use_ghosts_for_dt  indicates whether the time increment computation
+    *                      on a patch requires ghost cell data (e.g., if
+    *                      boundary conditions are needed).  This value must
+    *                      be consistent with the numerical routines used
+    *                      in the hyperbolic patch strategy object to
+    *                      calculate the time step size.  The default is true.
+    */
+   bool d_lag_dt_computation;
+   bool d_use_ghosts_for_dt;
+
+   /*
+    * Boolean flags for indicated whether face or side data types are
+    * used for fluxes (choice is determined by numerical routines in
+    * hyperbolic patch model).
+    */
+   bool d_flux_is_face;
+   bool d_flux_face_registered;
+   bool d_flux_side_registered;
+
+/*
+ * The following communication algorithms and schedules are created and
+ * maintained to manage inter-patch communication during AMR integration.
+ * The algorithms are created in the class constructor.  They are initialized
+ * when variables are "registered" are registered with the integrator.
+ */
+
+   /*
+    * The "advance" schedule is used prior to advancing a level and
+    * prior to computing dt at initialization. It must be reset each
+    * time a level is regridded. All ghosts are filled with TIME_DEP
+    * and INPUT data at specified time. TIME_DEP data in patch interiors
+    * will be filled with CURRENT_VAR values.
+    */
+   tbox::Pointer<xfer::MultiblockRefineAlgorithm>
+   d_mblk_bdry_fill_advance;
+   tbox::Array<tbox::Pointer<xfer::MultiblockRefineSchedule> >
+   d_mblk_bdry_sched_advance;
+
+   /*
+    * The "advance new" schedule can be used twice during a time integration
+    * cycle. The first is when ghost cell data is required during the
+    * conservative difference process (i.e., d_use_ghosts_for_cons_diff
+    * is true).  If this is the case, ghosts must be refilled before the
+    * conservative difference on a coarser level during the refluxing
+    * process can take place.  See synchronizeLevelWithCoarser in class
+    * MblkHyperbolicLevelIntegrator second occurs when the dt calculation is
+    * not lagged and the physical boundary conditions are needed to compute dt
+    * (i.e., (!d_lag_dt_computation && d_use_ghosts_for_dt_computation)
+    * is true).  In either case, all ghosts are filled with TIME_DEP and INPUT
+    * data at specified time.  TIME_DEP data in patch interiors will be filled
+    * with values corresponding to NEW descriptor indices.  See notes
+    * accompanying MblkHyperbolicLevelIntegrator::advanceLevel.
+    */
+   tbox::Pointer<xfer::MultiblockRefineAlgorithm>
+   d_mblk_bdry_fill_advance_new;
+   tbox::Array<tbox::Pointer<xfer::MultiblockRefineSchedule> >
+   d_mblk_bdry_sched_advance_new;
+
+   /*
+    * The "advance old" algorithm is used to fill ghosts using time
+    * interpolated data from OLD_VAR and NEW_VAR on the coarser hierarchy
+    * level.  It is currently only used for advancing data on a temporary
+    * level during the Richardson extrapolation algorithm. Use of OLD_VAR
+    * data is required only when three time levels are used
+    * (i.e. d_number_time_data_levels=3).
+    */
+   tbox::Pointer<xfer::MultiblockRefineAlgorithm>
+   d_mblk_bdry_fill_advance_old;
+
+   /*
+    * Coarsen algorithms for conservative data synchronization
+    * (e.g., flux correction or refluxing).
+    */
+   tbox::Pointer<xfer::MultiblockCoarsenAlgorithm>
+   d_mblk_coarsen_fluxsum;
+   tbox::Pointer<xfer::MultiblockCoarsenAlgorithm>
+   d_mblk_coarsen_sync_data;
+   tbox::Pointer<xfer::MultiblockCoarsenAlgorithm>
+   d_mblk_sync_initial_data;
+
+   /*
+    * Coarsen algorithms for Richardson extrapolation.
+    */
+   tbox::Pointer<xfer::CoarsenAlgorithm> d_coarsen_rich_extrap_init;
+   tbox::Pointer<xfer::CoarsenAlgorithm> d_coarsen_rich_extrap_final;
+
+   /*
+    * Algorithm for filling a new patch level in the hierarchy.
+    */
+   tbox::Pointer<xfer::MultiblockRefineAlgorithm>
+   d_mblk_fill_new_level;
+
+   /*
+    * Number of levels of time-dependent data that must be maintained
+    * on each patch level.  This value is used to coordinate the needs
+    * of the time integration and the regridding process with the
+    * patch data types and descriptor indices.
+    */
+   int d_number_time_data_levels;
+
+   /*
+    * hier::Variable contexts and lists of variables used for data management.
+    * The contexts are set in the constructor.   Note that they must
+    * be consistent with those defined by the concrete subclass of
+    * the HyperbolicPatchStrategy object.  The variable lists
+    * and component selectors are set in the registerVariable() function.
+    */
+
+   tbox::Pointer<hier::VariableContext> d_scratch;
+   tbox::Pointer<hier::VariableContext> d_current;
+   tbox::Pointer<hier::VariableContext> d_new;
+   tbox::Pointer<hier::VariableContext> d_old;
+   tbox::Pointer<hier::VariableContext> d_plot_context;
+
+   tbox::List<tbox::Pointer<hier::Variable> > d_all_variables;
+   tbox::List<tbox::Pointer<hier::Variable> > d_time_dep_variables;
+   tbox::List<tbox::Pointer<hier::Variable> > d_flux_variables;
+   tbox::List<tbox::Pointer<hier::Variable> > d_fluxsum_variables;
+
+   /*
+    * SCRATCH descriptor indices for (non-TEMPORARY) variables
+    * (i.e., TIME_DEP, INPUT, FLUX). Note that these are used
+    * to create scratch space before ghost cells are filled
+    * on level prior to advancing the data.
+    */
+   hier::ComponentSelector d_saved_var_scratch_data;
+
+   /*
+    * SCRATCH descriptor indices for TEMPORARY variables.  Note that
+    * these are used to create scratch space on a patch-by-patch basis.
+    */
+   hier::ComponentSelector d_temp_var_scratch_data;
+
+   /*
+    * CURRENT descriptor indices for TIME_DEP, INPUT, NO_FILL
+    * variables.  Note that these are used to create storage for quantities
+    * when new patches are made (e.g., during hierachy initialization,
+    * before error estimation during regridding, after regridding new
+    * patch levels, etc.).
+    */
+   hier::ComponentSelector d_new_patch_init_data;
+
+   /*
+    * NEW descriptor indices for TIME_DEP variables.  Note that these
+    * are used to create space for new data before patch level is advanced.
+    */
+   hier::ComponentSelector d_new_time_dep_data;
+
+   /*
+    * Descriptor indices for FLUX quantities and integrals of fluxes
+    * (used to accumulate flux information around fine patch boundaries).
+    * Also, a boolean flag to track flux storage on level 0.
+    */
+   hier::ComponentSelector d_flux_var_data;
+   hier::ComponentSelector d_fluxsum_data;
+   bool d_have_flux_on_level_zero;
+
+   /*
+    * OLD descriptor indices for TIME_DEP variables.  Note that
+    * these are used only when three time levels of data are used.
+    */
+   hier::ComponentSelector d_old_time_dep_data;
+
+   /*
+    * Option to distinguish tbox::MPI reduction costs from load imbalances
+    * when doing performance timings.
+    */
+   bool d_distinguish_mpi_reduction_costs;
+
+   /*
+    * Timers interspersed throughout the class.
+    */
+   tbox::Pointer<tbox::Timer> t_advance_bdry_fill_comm;
+   tbox::Pointer<tbox::Timer> t_error_bdry_fill_create;
+   tbox::Pointer<tbox::Timer> t_error_bdry_fill_comm;
+   tbox::Pointer<tbox::Timer> t_mpi_reductions;
+   tbox::Pointer<tbox::Timer> t_initialize_level_data;
+   tbox::Pointer<tbox::Timer> t_fill_new_level_create;
+   tbox::Pointer<tbox::Timer> t_fill_new_level_comm;
+   tbox::Pointer<tbox::Timer> t_advance_bdry_fill_create;
+   tbox::Pointer<tbox::Timer> t_new_advance_bdry_fill_create;
+   tbox::Pointer<tbox::Timer> t_apply_gradient_detector;
+   tbox::Pointer<tbox::Timer> t_coarsen_rich_extrap;
+   tbox::Pointer<tbox::Timer> t_get_level_dt;
+   tbox::Pointer<tbox::Timer> t_get_level_dt_sync;
+   tbox::Pointer<tbox::Timer> t_advance_level;
+   tbox::Pointer<tbox::Timer> t_new_advance_bdry_fill_comm;
+   tbox::Pointer<tbox::Timer> t_patch_num_kernel;
+   tbox::Pointer<tbox::Timer> t_advance_level_sync;
+   tbox::Pointer<tbox::Timer> t_std_level_sync;
+   tbox::Pointer<tbox::Timer> t_sync_new_levels;
+
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/MblkHyperbolicPatchStrategy.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/MblkHyperbolicPatchStrategy.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to patch routines for hyperbolic integration scheme. 
+ *
+ ************************************************************************/
+
+#include "MblkHyperbolicPatchStrategy.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+using namespace std;
+using namespace SAMRAI;
+
+MblkHyperbolicPatchStrategy::MblkHyperbolicPatchStrategy(
+   const tbox::Dimension& dim):
+   xfer::MultiblockRefinePatchStrategy(dim),
+   xfer::MultiblockCoarsenPatchStrategy(dim),
+   d_dim(dim)
+{
+   d_data_context.setNull();
+}
+
+MblkHyperbolicPatchStrategy::~MblkHyperbolicPatchStrategy()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default virtual function implementations.                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkHyperbolicPatchStrategy::tagGradientDetectorCells(
+   hier::Patch& patch,
+   const double regrid_time,
+   const bool initial_error,
+   const int tag_index,
+   const bool uses_richardson_extrapolation_too)
+{
+   NULL_USE(patch);
+   NULL_USE(regrid_time);
+   NULL_USE(initial_error);
+   NULL_USE(tag_index);
+   NULL_USE(uses_richardson_extrapolation_too);
+   TBOX_WARNING("MblkHyperbolicPatchStrategy::tagGradientDetectorCells()"
+      << "\nNo class supplies a concrete implementation for "
+      << "\nthis method.  The default abstract method (which "
+      << "\ndoes no cell tagging) is executed" << endl);
+}
+
+void MblkHyperbolicPatchStrategy::tagRichardsonExtrapolationCells(
+   hier::Patch& patch,
+   const int error_level_number,
+   const tbox::Pointer<hier::VariableContext> coarsened_fine,
+   const tbox::Pointer<hier::VariableContext> advanced_coarse,
+   const double regrid_time,
+   const double deltat,
+   const int error_coarsen_ratio,
+   const bool initial_error,
+   const int tag_index,
+   const bool uses_gradient_detector_too)
+{
+   NULL_USE(patch);
+   NULL_USE(error_level_number);
+   NULL_USE(coarsened_fine);
+   NULL_USE(advanced_coarse);
+   NULL_USE(regrid_time);
+   NULL_USE(deltat);
+   NULL_USE(error_coarsen_ratio);
+   NULL_USE(initial_error);
+   NULL_USE(tag_index);
+   NULL_USE(uses_gradient_detector_too);
+   TBOX_WARNING(
+      "MblkHyperbolicPatchStrategy::tagRichardsonExtrapolationCells()"
+      << "\nNo class supplies a concrete implementation for "
+      << "\nthis method.  The default abstract method (which "
+      << "\ndoes no cell tagging) is executed" << endl);
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/MblkHyperbolicPatchStrategy.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/MblkHyperbolicPatchStrategy.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,524 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Interface to patch routines for hyperbolic integration scheme. 
+ *
+ ************************************************************************/
+
+#ifndef included_MblkHyperbolicPatchStrategyXD
+#define included_MblkHyperbolicPatchStrategyXD
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/xfer/RefinePatchStrategy.h"
+#include "SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h"
+#include "SAMRAI/mesh/MultiblockGriddingAlgorithm.h"
+#include "SAMRAI/xfer/MultiblockRefineSchedule.h"
+#include "SAMRAI/xfer/MultiblockRefinePatchStrategy.h"
+
+/**
+ * Class MblkHyperbolicPatchStrategy is an abstract base class defining the
+ * interface between an MblkHyperbolicLevelIntegrator object and operations
+ * applied to a single patch in a structured AMR hierarchy.   The operations
+ * include patch initialization, dt calculation, flux computation,
+ * conservative differencing, and error estimation.  This class is derived
+ * from the xfer::RefinePatchStrategy and xfer::CoarsenPatchStrategy
+ * abstract base classes.   These base classes provide the interface for
+ * user-defined interlevel data refining and coarsening operations and the
+ * specification of physical boundary conditions.  The functions
+ * setPhysicalBoundaryConditions(), and pre/postprocessRefine() are
+ * overloaded from the class xfer::RefinePatchStrategy.  The operations
+ * pre/postprocessCoarsen() are overloaded from xfer::CoarsenPatchStrategy.
+ * The pre/postprocessCoarsen/Refine() operations are given empty
+ * implementations here so that the user does not need to proovide them if
+ * the operations are not needed.
+ *
+ * It is important to recognize that for the concrete patch strategy subclass
+ * and the MblkHyperbolicLevelIntegrator to work together, the concrete
+ * strategy must know which patch data to operate on.  The patch data storage
+ * is manipulated by the level integrator.  The set/clearDataContext() methods
+ * allow the integrator to inform the patch strategy of the correct data
+ * context.  The concrete patch strategy subclass can access the appropriate
+ * context via the getDataContext() method.
+ *
+ * @see algs::MblkHyperbolicLevelIntegrator
+ * @see xfer::RefinePatchStrategy
+ * @see xfer::CoarsenPatchStrategy
+ */
+
+using namespace SAMRAI;
+
+class MblkHyperbolicLevelIntegrator;
+
+class MblkHyperbolicPatchStrategy:
+   public xfer::MultiblockRefinePatchStrategy,
+   public xfer::MultiblockCoarsenPatchStrategy
+{
+public:
+   /**
+    * Default constructor for MblkHyperbolicPatchStrategy.
+    */
+   MblkHyperbolicPatchStrategy(
+      const tbox::Dimension& dim);
+
+   /**
+    * Virtual destructor for MblkHyperbolicPatchStrategy.
+    */
+   virtual ~MblkHyperbolicPatchStrategy();
+
+   /**
+    * Register specific variables needed in the numerical routines with the
+    * hyperbolic level integrator using the registerVariable() function in that
+    * class.  The integrator manipulates storage for the data and this
+    * registration defines the way in which data for each quantity will
+    * be manipulated on the patches.  Typically, the derived data quantities
+    * for plotting are registered with a visualization data writer in this
+    * routine as well, since the hyperbolic level integrator provides the
+    * variable context for plotting (i.e., which data is available when a
+    * plot file is generated).  The integrator pointer cannot be null in
+    * most cases.
+    *
+    * The gridding algorithm pointer is provided so that patch data objects
+    * may be registered with the load balancer object (owned by the gridding
+    * algorithm) for non-uniform load balancing, if needed.
+    */
+   virtual void
+   registerModelVariables(
+      MblkHyperbolicLevelIntegrator* integrator) = 0;
+
+   /**
+    * Set up parameters in the load balancer object (owned by the gridding
+    * algorithm) if needed.  This function is called immediately after the
+    * registerModelVariables() function is called.  The hyperbolic level
+    * integrator pointer is provided so that the integrator can be used
+    * to manage data for the load balancer if needed (e.g., when using
+    * non-uniform load balancing).
+    *
+    * Note that this function is not pure virtual. It is given a
+    * dummy implementation here so that users may ignore it when
+    * inheriting from this class.
+    */
+   virtual void setupLoadBalancer(
+      MblkHyperbolicLevelIntegrator* integrator,
+      mesh::BaseGriddingAlgorithm* gridding_algorithm)
+   {
+      NULL_USE(integrator);
+      NULL_USE(gridding_algorithm);
+   }
+
+   /**
+    * Set the initial data on a patch interior only.  Note that no ghost cells
+    * need to be set in this routine regardless of whether the patch data
+    * corresponding to the context requires ghost cells.  The data_time
+    * is the simulation time when the routine is called.  The boolean
+    * initial_time is true if the routine is called at the initial time
+    * when the hierarchy is initially constructed, otherwise it is false.
+    */
+   virtual void
+   initializeDataOnPatch(
+      hier::Patch& patch,
+      const double data_time,
+      const bool initial_time) = 0;
+
+   /**
+    * Compute the stable time increment for a patch on the level with the
+    * given number.  The boolean flag initial_time is true if the routine
+    * is called at the initial simulation time; otherwise it is false.
+    * The double argument dt_time is the simulation time.
+    */
+   virtual double
+   computeStableDtOnPatch(
+      hier::Patch& patch,
+      const bool initial_time,
+      const double dt_time) = 0;
+
+   /**
+    * Compute TIME INTEGRALS of fluxes to be used in conservative difference
+    * for patch integration.  That is, it is assumed that this numerical
+    * routine will compute the fluxes corresponding to the cell faces
+    * multiplied by the time increment.  Typically, the numerical flux is
+    * the normal flux at the cell face.  The flux integrals will be used in
+    * the conservative difference that updates the conserved quantities.
+    *
+    * Note that the numerical routines in this method generally require
+    * ghost cells.  Ghost cells data is filled before this routine is called.
+    */
+   virtual void
+   computeFluxesOnPatch(
+      hier::Patch& patch,
+      const double time,
+      const double dt) = 0;
+
+   /**
+    * Update patch data with a conservative difference (approximating
+    * the divergence theorem) using the flux integrals computed in
+    * computeFluxesOnPatch() routine.  The boolean flag is true when this
+    * routine is called during a flux synchronization step.   Otherwise,
+    * it is false.  Note that the computeFluxesOnPatch() routine computes
+    * TIME INTEGRALs of the numerical fluxes (e.g., they have been multiplied
+    * by dt).  So the conservative difference routine should be consistent
+    * with this.
+    */
+   virtual void
+   conservativeDifferenceOnPatch(
+      hier::Patch& patch,
+      const double time,
+      const double dt,
+      bool at_syncronization) = 0;
+
+   /**
+    * This is an optional routine for user to process any application-specific
+    * patch strategy data BEFORE patches are advanced on the given level.
+    * This routine is called after patch boundary data is filled
+    * (i.e., ghosts) and before computeFluxesOnPatch().  The arguments are:
+    * level -- level that will be advanced, current_time -- current
+    * integration time, dt -- current time increment, first_step -- boolean
+    * flag that is true if advance is first in time step sequence on level
+    * (i.e., previous advance step was on another level, false otherwise,
+    * last_step -- boolean flag that is true if advance is last in time step
+    * sequence on level (i.e., synchronization with coarser level will occur
+    * immediately after this advance), regrid_advance -- boolean flag that
+    * is true if the advance is during a regridding phase (i.e., the advance
+    * is not used to integrate data on the hierarchy) in which case the
+    * results of the advance will be discarded.
+    *
+    * Note that when this routine is called, the scratch data is filled on
+    * all patches (i.e., ghost cells) and that data is the same as the
+    * current level data on all patch interiors.  That is, both scratch and
+    * current data correspond to current_time.
+    *
+    * Note that this function is not pure virtual. It is given a
+    * dummy implementation here so that users may ignore it when
+    * inheriting from this class.
+    */
+   virtual void
+   preprocessAdvanceLevelState(
+      const tbox::Pointer<hier::PatchLevel>& level,
+      double current_time,
+      double dt,
+      bool first_step,
+      bool last_step,
+      bool regrid_advance)
+   {
+      NULL_USE(level);
+      NULL_USE(current_time);
+      NULL_USE(dt);
+      NULL_USE(first_step);
+      NULL_USE(last_step);
+      NULL_USE(regrid_advance);
+   }
+
+   /**
+    * This is an optional routine for user to process any application-specific
+    * patch strategy data AFTER patches are advanced on the given level.
+    * This routine is called after conservativeDifferenceOnPatch() is called
+    * and before computeStableDtOnPatch().  The arguments are:
+    * level -- level that will be advanced, current_time -- current
+    * integration time, dt -- current time increment, first_step -- boolean
+    * flag that is true if advance is first in time step sequence on level
+    * (i.e., previous advance step was on another level, false otherwise,
+    * last_step -- boolean flag that is true if advance is last in time step
+    * sequence on level (i.e., synchronization with coarser
+    * level will occur immediately after this advance), regrid_advance --
+    * boolean flag that is true if the advance is during a regridding phase
+    * (i.e., the advance is not used to integrate data on the hierarchy) in
+    * which case the results of the advance will be discarded.
+    *
+    * Note that when this routine is called, the scratch data is filled on
+    * all patches (i.e., ghost cells) and that data is the same as the
+    * new level data on all patch interiors.  That is, both scratch and
+    * new data correspond to current_time + dt on patch interiors.
+    * The current data and ghost values correspond to the current_time.
+    *
+    * Note that this function is not pure virtual. It is given a
+    * dummy implementation here so that users may ignore it when
+    * inheriting from this class.
+    */
+   virtual void
+   postprocessAdvanceLevelState(
+      const tbox::Pointer<hier::PatchLevel>& level,
+      double current_time,
+      double dt,
+      bool first_step,
+      bool last_step,
+      bool regrid_advance)
+   {
+      NULL_USE(level);
+      NULL_USE(current_time);
+      NULL_USE(dt);
+      NULL_USE(first_step);
+      NULL_USE(last_step);
+      NULL_USE(regrid_advance);
+   }
+
+   /**
+    * Tag cells on the given patch that require refinement based on
+    * application-specific numerical quantities.  The tag index argument
+    * indicates the index of the tag data on the patch data array.  The
+    * boolean argument initial_error is true if tagging is being done at the
+    * initial simulation time; otherwise, it is false.  The other boolean
+    * flag uses_richardson_extrapolation_too is true when Richardson
+    * extrapolation is used in addition to the gradient detector.  This flag
+    * helps users manage multiple regridding criteria.
+    *
+    * Note that this function is not pure virtual. It is given a
+    * dummy implementation here so that users may ignore it when
+    * inheriting from this class.
+    */
+   virtual void
+   tagGradientDetectorCells(
+      hier::Patch& patch,
+      const double regrid_time,
+      const bool initial_error,
+      const int tag_index,
+      const bool uses_richardson_extrapolation_too);
+
+   /**
+    * Tag cells based from differences computed in the Richardson
+    * extrapolation.  The Richardson
+    * extrapolation algorithm creates a coarsened version of some hierarchy
+    * patch level and advances data in time on both the coarsened patch
+    * level and the hierarchy level. This routine takes the data resulting
+    * from the advance on both the coarse and fine levels, compares them, and
+    * tags cells according to the difference.
+    * \verbatim
+    *              (2)
+    *      n+1 ^------->x finish      (1) advanced_coarse
+    *          |        ^             (2) coarsened_fine
+    *  time  n -        |
+    *          ^        |(1)
+    *          |        |
+    *          <--------o start
+    *        fine     coarse
+    * \endverbatim
+    *
+    * The patch supplied to this routine is on the coarsened level.  However,
+    * the error_level_number corresponds to the actual hierarchy level
+    * from which it was coarsened.   Data resides on this patch in two
+    * contexts - ``advanced_coarse'' and ``coarsened_fine''.  Advanced
+    * coarse is data advanced on the coarsened version of the level, while
+    * coarsened fine is the data advanced on the fine level and then
+    * coarsened to the coarse level.  The regrid time and the time increment
+    * are given for the actual hierarchy level.  The error coarsen ratio
+    * argument is the ratio between the index spaces on the hierarchy level
+    * and the coarsened hierarchy level.  The boolean flag ``initial_error''
+    * is true when the error estimation is performed at the initial simulation
+    * time; i.e., when the hierarchy levels are being constructed for the first
+    * time.  The tag index argument is the index of the tag data on the patch
+    * data array.  The other boolean flag uses_gradient_detector_too is
+    * true when a gradient detector scheme is used in addition to Richardson
+    * extrapolation.  This flag helps users manage multiple regridding
+    * criteria.
+    *
+    * Note that this function is not pure virtual. It is given a
+    * dummy implementation here so that users may ignore it when
+    * inheriting from this class.
+    */
+   virtual void
+   tagRichardsonExtrapolationCells(
+      hier::Patch& patch,
+      const int error_level_number,
+      const tbox::Pointer<hier::VariableContext> coarsened_fine,
+      const tbox::Pointer<hier::VariableContext> advanced_coarse,
+      const double regrid_time,
+      const double deltat,
+      const int error_coarsen_ratio,
+      const bool initial_error,
+      const int tag_index,
+      const bool uses_gradient_detector_too);
+
+   /**
+    * Set user-defined boundary conditions at the physical domain boundary.
+    */
+   virtual void
+   setPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const double fill_time,
+      const hier::IntVector& ghost_width_to_fill) = 0;
+
+   /**
+    * Fill the singularity conditions for the multi-block case
+    */
+   virtual void
+   fillSingularityBoundaryConditions(
+      hier::Patch& patch,
+      tbox::List<tbox::Pointer<hier::Patch> >& sing_patches,
+      const double fill_time,
+      const hier::Box& fill_box,
+      const hier::BoundaryBox& bbox) = 0;
+
+   /**
+    * Return maximum stencil width needed for user-defined
+    * data interpolation operations.  Default is to return
+    * zero, assuming no user-defined operations provided.
+    *
+    * Note that this function is not pure virtual. It is given a
+    * dummy implementation here so that users may ignore it when
+    * inheriting from this class.
+    */
+   virtual hier::IntVector getRefineOpStencilWidth() const
+   {
+      return hier::IntVector(d_dim, 0);
+   }
+
+   /**
+    * Pre- and post-processing routines for implementing user-defined
+    * spatial interpolation routines applied to variables.  The
+    * interpolation routines are used in the hyperbolic AMR algorithm
+    * for filling patch ghost cells before advancing data on a level
+    * and after regridding a level to fill portions of the new level
+    * from some coarser level.  These routines are called automatically
+    * from within patch boundary filling schedules; thus, some concrete
+    * function matching these signatures must be provided in the user's
+    * patch routines.  However, the routines only need to perform some
+    * operations when "USER_DEFINED_REFINE" is given as the interpolation
+    * method for some variable when the patch routines register variables
+    * with the hyperbolic level integration algorithm, typically.  If the
+    * user does not provide operations that refine such variables in either
+    * of these routines, then they will not be refined.
+    *
+    * The order in which these operations are used in each patch
+    * boundary filling schedule is:
+    *
+    * - \b (1) {Call user's preprocessRefine() routine.}
+    * - \b (2) {Refine all variables with standard interpolation operators.}
+    * - \b (3) {Call user's postprocessRefine() routine.}
+    *
+    * Note that these functions are not pure virtual. They are given
+    * dummy implementations here so that users may ignore them when
+    * inheriting from this class.
+    */
+   virtual void preprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio)
+   {
+      NULL_USE(fine);
+      NULL_USE(coarse);
+      NULL_USE(fine_box);
+      NULL_USE(ratio);
+   }
+
+   ///
+   virtual void postprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio)
+   {
+      NULL_USE(fine);
+      NULL_USE(coarse);
+      NULL_USE(fine_box);
+      NULL_USE(ratio);
+   }
+
+   /**
+    * Return maximum stencil width needed for user-defined
+    * data coarsen operations.  Default is to return
+    * zero, assuming no user-defined operations provided.
+    *
+    * Note that this function is not pure virtual. It is given a
+    * dummy implementation here so that users may ignore it when
+    * inheriting from this class.
+    */
+   virtual hier::IntVector getCoarsenOpStencilWidth() const
+   {
+      return hier::IntVector(d_dim, 0);
+   }
+
+   /**
+    * Pre- and post-processing routines for implementing user-defined
+    * spatial coarsening routines applied to variables.  The coarsening
+    * routines are used in the hyperbolic AMR algorithm synchronizing
+    * coarse and fine levels when they have been integrated to the same
+    * point.  These routines are called automatically from within the
+    * data synchronization coarsen schedules; thus, some concrete
+    * function matching these signatures must be provided in the user's
+    * patch routines.  However, the routines only need to perform some
+    * operations when "USER_DEFINED_COARSEN" is given as the coarsening
+    * method for some variable when the patch routines register variables
+    * with the hyperbolic level integration algorithm, typically.  If the
+    * user does not provide operations that coarsen such variables in either
+    * of these routines, then they will not be coarsened.
+    *
+    * The order in which these operations are used in each coarsening
+    * schedule is:
+    *
+    * - \b (1) {Call user's preprocessCoarsen() routine.}
+    * - \b (2) {Coarsen all variables with standard coarsening operators.}
+    * - \b (3) {Call user's postprocessCoarsen() routine.}
+    *
+    * Note that these functions are not pure virtual. They are given
+    * dummy implementations here so that users may ignore them when
+    * inheriting from this class.
+    */
+   virtual void preprocessCoarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio)
+   {
+      NULL_USE(coarse);
+      NULL_USE(fine);
+      NULL_USE(coarse_box);
+      NULL_USE(ratio);
+   }
+
+   ///
+   virtual void postprocessCoarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio)
+   {
+      NULL_USE(coarse);
+      NULL_USE(fine);
+      NULL_USE(coarse_box);
+      NULL_USE(ratio);
+   }
+
+   /**
+    * Return pointer to patch data context.
+    */
+   tbox::Pointer<hier::VariableContext> getDataContext() const
+   {
+      return d_data_context;
+   }
+
+   /**
+    * The hyperbolic integrator controls the context for the data to be used
+    * in the numerical routines implemented in the concrete patch strategy.
+    * The setDataContext() allows the integrator to set the context for
+    * data on a patch on which to operate.
+    */
+   void setDataContext(
+      tbox::Pointer<hier::VariableContext> context)
+   {
+      d_data_context = context;
+   }
+
+   /**
+    * The clearDataContext() routine resets the data context to be null.
+    */
+   void clearDataContext()
+   {
+      d_data_context.setNull();
+   }
+
+private:
+   const tbox::Dimension d_dim;
+
+   tbox::Pointer<hier::VariableContext> d_data_context;
+
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/MblkLinAdv.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/MblkLinAdv.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,3592 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Numerical routines for single patch in linear advection ex. 
+ *
+ ************************************************************************/
+#include "MblkLinAdv.h"
+
+#include <iostream>
+#include <iomanip>
+#include <fstream>
+
+#ifndef LACKS_SSTREAM
+#ifndef included_sstream
+#define included_sstream
+#include <sstream>
+#endif
+#else
+#ifndef included_strstream
+#define included_strstream
+#include <strstream.h>
+#endif
+#endif
+
+using namespace std;
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+#include <float.h>
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/pdat/CellDoubleLinearTimeInterpolateOp.h"
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/pdat/NodeIndex.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/SideIndex.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/geom/BlockGridGeometry.h"
+#include "SAMRAI/hier/BlockPatchGeometry.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/mesh/TreeLoadBalancer.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeIndex.h"
+#include "SAMRAI/pdat/NodeIterator.h"
+#include "SAMRAI/pdat/NodeDoubleInjection.h"
+#include "SAMRAI/pdat/NodeDoubleLinearTimeInterpolateOp.h"
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/hier/BlockPatchGeometry.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+//integer constants for boundary conditions
+#define CHECK_BDRY_DATA (0)
+#include "SAMRAI/appu/CartesianBoundaryDefines.h"
+
+//integer constant for debugging improperly set boundary dat
+#define BOGUS_BDRY_DATA (-9999)
+
+// routines for managing boundary data
+#include "SkeletonBoundaryUtilities2.h"
+#include "SkeletonBoundaryUtilities3.h"
+
+// Depth of the advected variable
+#define DEPTH (1)
+
+// Number of ghosts cells used for each variable quantity
+#define CELLG (4)
+#define FACEG (4)
+#define FLUXG (0)
+#define NODEG (0)
+
+// defines for initialization
+#define PIECEWISE_CONSTANT_X (10)
+#define PIECEWISE_CONSTANT_Y (11)
+#define PIECEWISE_CONSTANT_Z (12)
+#define SINE_CONSTANT_X (20)
+#define SINE_CONSTANT_Y (21)
+#define SINE_CONSTANT_Z (22)
+#define SPHERE (40)
+
+// defines for Riemann solver used in Godunov flux calculation
+#define APPROX_RIEM_SOLVE (20)   // Colella-Glaz approx Riemann solver
+#define EXACT_RIEM_SOLVE (21)    // Exact Riemann solver
+#define HLLC_RIEM_SOLVE (22)     // Harten, Lax, van Leer approx Riemann solver
+
+// defines for cell tagging routines
+#define RICHARDSON_NEWLY_TAGGED (-10)
+#define RICHARDSON_ALREADY_TAGGED (-11)
+#ifndef TRUE
+#define TRUE (1)
+#endif
+#ifndef FALSE
+#define FALSE (0)
+#endif
+
+// Version of MblkLinAdv restart file data
+#define MBLKLINADV_VERSION (3)
+
+//
+// some extra defines for C code
+//
+#define real8 double
+#define POLY3(i, j, k, imin, jmin, kmin, nx, \
+              nxny) ((i - imin) + (j - jmin) * (nx) + (k - kmin) * (nxny))
+#define MAX(a, b) (a > b ? a : b)
+#define MIN(a, b) (a < b ? a : b)
+
+/*
+ *************************************************************
+ *
+ * Extra non-class inlined C functions used by class methods
+ *
+ *************************************************************
+ */
+//
+// calculate the flux through a face
+//
+SAMRAI_INLINE_KEYWORD
+real8 UpwindFlux(
+   const real8 x1,
+   const real8 x2,
+   const real8 x3,
+   const real8 x4,
+   const real8 y1,
+   const real8 y2,
+   const real8 y3,
+   const real8 y4,
+   const real8 z1,
+   const real8 z2,
+   const real8 z3,
+   const real8 z4,
+   real8 u,
+   real8 v,
+   real8 w,
+   real8 psiLo,
+   real8 psiHi)
+{
+   real8 dx31 = x3 - x1;
+   real8 dx42 = x4 - x2;
+
+   real8 dy31 = y3 - y1;
+   real8 dy42 = y4 - y2;
+
+   real8 dz31 = z3 - z1;
+   real8 dz42 = z4 - z2;
+
+   real8 Ax = 0.5 * (dy42 * dz31 - dz42 * dy31);
+   real8 Ay = 0.5 * (dz42 * dx31 - dx42 * dz31);
+   real8 Az = 0.5 * (dx42 * dy31 - dy42 * dx31);
+
+   real8 Audotn = Ax * u + Ay * v + Az * w;
+
+   real8 flux = (Audotn > 0.0 ? psiLo : psiHi) * Audotn;
+
+   return flux;
+}
+
+//
+// calculate the flux through a face, assuming a velocity in the radial direction
+//
+SAMRAI_INLINE_KEYWORD
+real8 UpwindFluxRadial(
+   const real8 x1,
+   const real8 x2,
+   const real8 x3,
+   const real8 x4,
+   const real8 y1,
+   const real8 y2,
+   const real8 y3,
+   const real8 y4,
+   const real8 z1,
+   const real8 z2,
+   const real8 z3,
+   const real8 z4,
+   real8 u0,
+   real8 psiLo,
+   real8 psiHi)
+{
+   // --------- set the velocity
+   real8 xm = 0.25 * (x1 + x2 + x3 + x4);
+   real8 ym = 0.25 * (y1 + y2 + y3 + y4);
+   real8 zm = 0.25 * (z1 + z2 + z3 + z4);
+   real8 xnorm = sqrt(xm * xm + ym * ym + zm * zm);
+
+   real8 u = u0 * xm / xnorm;
+   real8 v = u0 * ym / xnorm;
+   real8 w = u0 * zm / xnorm;
+
+   // --------- set the flux
+   real8 dx31 = x3 - x1;
+   real8 dx42 = x4 - x2;
+
+   real8 dy31 = y3 - y1;
+   real8 dy42 = y4 - y2;
+
+   real8 dz31 = z3 - z1;
+   real8 dz42 = z4 - z2;
+
+   real8 Ax = 0.5 * (dy42 * dz31 - dz42 * dy31);
+   real8 Ay = 0.5 * (dz42 * dx31 - dx42 * dz31);
+   real8 Az = 0.5 * (dx42 * dy31 - dy42 * dx31);
+
+   real8 Audotn = Ax * u + Ay * v + Az * w;
+
+   real8 flux = (Audotn > 0.0 ? psiLo : psiHi) * Audotn;
+
+   return flux;
+}
+
+//
+// calculate the volume of a hexahedral element
+//
+SAMRAI_INLINE_KEYWORD
+real8 UpwindVolume(
+   const real8 x0,
+   const real8 x1,
+   const real8 x2,
+   const real8 x3,
+   const real8 x4,
+   const real8 x5,
+   const real8 x6,
+   const real8 x7,
+   const real8 y0,
+   const real8 y1,
+   const real8 y2,
+   const real8 y3,
+   const real8 y4,
+   const real8 y5,
+   const real8 y6,
+   const real8 y7,
+   const real8 z0,
+   const real8 z1,
+   const real8 z2,
+   const real8 z3,
+   const real8 z4,
+   const real8 z5,
+   const real8 z6,
+   const real8 z7)
+{
+   const real8 twelfth = 1.0 / 12.0;
+   real8 volume, s1234, s5678, s1265, s4378, s2376, s1485;
+
+   s1234 =
+      (x1 + x2) * ((y0 + y1) * (z2 + z3) - (z0 + z1) * (y2 + y3))
+      + (y1 + y2) * ((z0 + z1) * (x2 + x3) - (x0 + x1) * (z2 + z3))
+      + (z1 + z2) * ((x0 + x1) * (y2 + y3) - (y0 + y1) * (x2 + x3));
+
+   s5678 =
+      (x5 + x6) * ((y4 + y5) * (z6 + z7) - (z4 + z5) * (y6 + y7))
+      + (y5 + y6) * ((z4 + z5) * (x6 + x7) - (x4 + x5) * (z6 + z7))
+      + (z5 + z6) * ((x4 + x5) * (y6 + y7) - (y4 + y5) * (x6 + x7));
+
+   s1265 =
+      (x1 + x5) * ((y0 + y1) * (z5 + z4) - (z0 + z1) * (y5 + y4))
+      + (y1 + y5) * ((z0 + z1) * (x5 + x4) - (x0 + x1) * (z5 + z4))
+      + (z1 + z5) * ((x0 + x1) * (y5 + y4) - (y0 + y1) * (x5 + x4));
+
+   s4378 =
+      (x2 + x6) * ((y3 + y2) * (z6 + z7) - (z3 + z2) * (y6 + y7))
+      + (y2 + y6) * ((z3 + z2) * (x6 + x7) - (x3 + x2) * (z6 + z7))
+      + (z2 + z6) * ((x3 + x2) * (y6 + y7) - (y3 + y2) * (x6 + x7));
+
+   s2376 =
+      (x2 + x6) * ((y1 + y2) * (z6 + z5) - (z1 + z2) * (y6 + y5))
+      + (y2 + y6) * ((z1 + z2) * (x6 + x5) - (x1 + x2) * (z6 + z5))
+      + (z2 + z6) * ((x1 + x2) * (y6 + y5) - (y1 + y2) * (x6 + x5));
+
+   s1485 =
+      (x3 + x7) * ((y0 + y3) * (z7 + z4) - (z0 + z3) * (y7 + y4))
+      + (y3 + y7) * ((z0 + z3) * (x7 + x4) - (x0 + x3) * (z7 + z4))
+      + (z3 + z7) * ((x0 + x3) * (y7 + y4) - (y0 + y3) * (x7 + x4));
+
+   volume = (s1234 - s5678 - s1265 + s4378 - s2376 + s1485) * twelfth;
+   return volume;
+}
+
+//
+// compute the area of a face
+//
+SAMRAI_INLINE_KEYWORD real8
+UpwindAreaFace(
+   const real8 x0,
+   const real8 x1,
+   const real8 x2,
+   const real8 x3,
+   const real8 y0,
+   const real8 y1,
+   const real8 y2,
+   const real8 y3,
+   const real8 z0,
+   const real8 z1,
+   const real8 z2,
+   const real8 z3)
+{
+   real8 fx = (x2 - x0) - (x3 - x1);
+   real8 fy = (y2 - y0) - (y3 - y1);
+   real8 fz = (z2 - z0) - (z3 - z1);
+   real8 gx = (x2 - x0) + (x3 - x1);
+   real8 gy = (y2 - y0) + (y3 - y1);
+   real8 gz = (z2 - z0) + (z3 - z1);
+   real8 area =
+      (fx * fx + fy * fy + fz * fz)
+      * (gx * gx + gy * gy + gz * gz)
+      - (fx * gx + fy * gy + fz * gz)
+      * (fx * gx + fy * gy + fz * gz);
+   return area;
+}
+
+//
+// compute a characteristic length
+//
+SAMRAI_INLINE_KEYWORD real8
+UpwindCharacteristicLength(
+   const real8 x[8],
+   const real8 y[8],
+   const real8 z[8],
+   const real8 volume)
+{
+   real8 a, charLength = 0.0;
+
+   a = UpwindAreaFace(x[0], x[1], x[2], x[3],
+         y[0], y[1], y[2], y[3],
+         z[0], z[1], z[2], z[3]);
+   charLength = MAX(a, charLength);
+
+   a = UpwindAreaFace(x[4], x[5], x[6], x[7],
+         y[4], y[5], y[6], y[7],
+         z[4], z[5], z[6], z[7]);
+   charLength = MAX(a, charLength);
+
+   a = UpwindAreaFace(x[0], x[1], x[5], x[4],
+         y[0], y[1], y[5], y[4],
+         z[0], z[1], z[5], z[4]);
+   charLength = MAX(a, charLength);
+
+   a = UpwindAreaFace(x[1], x[2], x[6], x[5],
+         y[1], y[2], y[6], y[5],
+         z[1], z[2], z[6], z[5]);
+   charLength = MAX(a, charLength);
+
+   a = UpwindAreaFace(x[2], x[3], x[7], x[6],
+         y[2], y[3], y[7], y[6],
+         z[2], z[3], z[7], z[6]);
+   charLength = MAX(a, charLength);
+
+   a = UpwindAreaFace(x[3], x[0], x[4], x[7],
+         y[3], y[0], y[4], y[7],
+         z[3], z[0], z[4], z[7]);
+   charLength = MAX(a, charLength);
+
+   charLength = 4.0 * volume / sqrt(charLength);
+
+   return charLength;
+}
+
+///
+/// the cartesian uniform grid monotonic slope finder
+///
+SAMRAI_INLINE_KEYWORD void my_slopesCart(
+   double psi,
+   double pim,
+   double pip,
+   double pjm,
+   double pjp,
+   double pkm,
+   double pkp,
+   double& pxi,
+   double& peta,
+   double& pzeta)
+{
+   real8 del, sfp, sbm, scale;
+   real8 elDenp, elDenC, elDenm;
+   real8 sfact = 0.25;  // due to the fact that xi ranges from -1 to 1
+   elDenC = psi;
+
+   //
+   // xi
+   //
+   elDenp = pip;
+   elDenm = pim;
+
+   del = sfact * (elDenp - elDenm) + 1.e-80;
+   sfp = (elDenp - elDenC) * 2. / del;
+   sbm = (elDenC - elDenm) * 2. / del;
+
+   scale = MIN(sfp, sbm);
+   scale = (scale > 1.0 ? 1.0 : scale);
+   scale = (scale < 0.0 ? 0.0 : scale);
+   scale = (sfp * sbm < 0.0 ? 0.0 : scale);
+
+   pxi = del * scale;  // xi, eta, zeta vary from -1 to 1
+
+   //
+   // eta
+   //
+   elDenp = pjp;
+   elDenm = pjm;
+
+   del = sfact * (elDenp - elDenm) + 1.e-80;
+   sfp = (elDenp - elDenC) * 2. / del;
+   sbm = (elDenC - elDenm) * 2. / del;
+
+   scale = MIN(sfp, sbm);
+   scale = (scale > 1.0 ? 1.0 : scale);
+   scale = (scale < 0.0 ? 0.0 : scale);
+   scale = (sfp * sbm < 0.0 ? 0.0 : scale);
+
+   peta = del * scale;
+
+   //
+   // eta
+   //
+   elDenp = pkp;
+   elDenm = pkm;
+
+   del = sfact * (elDenp - elDenm) + 1.e-80;
+   sfp = (elDenp - elDenC) * 2. / del;
+   sbm = (elDenC - elDenm) * 2. / del;
+
+   scale = MIN(sfp, sbm);
+   scale = (scale > 1.0 ? 1.0 : scale);
+   scale = (scale < 0.0 ? 0.0 : scale);
+   scale = (sfp * sbm < 0.0 ? 0.0 : scale);
+
+   pzeta = del * scale;
+}
+
+///
+/// the non-uniform grid monotonic slope finder
+///
+SAMRAI_INLINE_KEYWORD void my_slopes(
+   double psi,
+   double pim,
+   double pip,
+   double pjm,
+   double pjp,
+   double pkm,
+   double pkp,
+   double w_i,
+   double w_ip,
+   double w_im,
+   double w_jp,
+   double w_jm,
+   double w_kp,
+   double w_km,
+   double& pxi,
+   double& peta,
+   double& pzeta)
+{
+   real8 sumf, sumb;
+   real8 elDenm, elDenp, del, sfp, sbm, scale;
+
+   real8 elDenC = psi;
+   real8 scale_fact = 1.0;
+   real8 slope_fact = 1.0;
+
+   //
+   // compute weight functions
+   //
+   real8 volzrc = w_i;
+
+   real8 volzrxim = w_im;
+   real8 volzrxip = w_ip;
+   real8 volzretam = w_jm;
+   real8 volzretap = w_jp;
+   real8 volzrzetam = w_km;
+   real8 volzrzetap = w_kp;
+
+   sumf = volzrc + volzrxip;
+   sumb = volzrc + volzrxim;
+   real8 wgtxi1 = volzrc / sumf;
+   real8 wgtxi2 = volzrxip / sumf;
+   real8 wgtxi3 = volzrc / sumb;
+   real8 wgtxi4 = volzrxim / sumb;
+
+   sumf = volzrc + volzretap;
+   sumb = volzrc + volzretam;
+   real8 wgteta1 = volzrc / sumf;
+   real8 wgteta2 = volzretap / sumf;
+   real8 wgteta3 = volzrc / sumb;
+   real8 wgteta4 = volzretam / sumb;
+
+   sumf = volzrc + volzrzetap;
+   sumb = volzrc + volzrzetam;
+   real8 wgtzeta1 = volzrc / sumf;
+   real8 wgtzeta2 = volzrzetap / sumf;
+   real8 wgtzeta3 = volzrc / sumb;
+   real8 wgtzeta4 = volzrzetam / sumb;
+
+   elDenm = pim;
+   elDenp = pip;
+
+   del = (wgtxi2 * elDenp + wgtxi1 * elDenC
+          - wgtxi4 * elDenm - wgtxi3 * elDenC) + 1e-80;
+
+   sfp = (elDenp - elDenC) * scale_fact / del;
+   sbm = (elDenC - elDenm) * scale_fact / del;
+
+   scale = MIN(sfp, sbm);
+   if (scale > 1.)
+      scale = 1.0;
+   else if (scale < 0.)
+      scale = 0.;
+
+   if ((sfp * sbm) < 0.0) scale = 0.;
+
+   pxi = slope_fact * del * scale;
+
+   // --------------------------------- eta
+
+   elDenm = pjm;
+   elDenp = pjp;
+
+   del = (wgteta2 * elDenp + wgteta1 * elDenC
+          - wgteta4 * elDenm - wgteta3 * elDenC) + 1e-80;
+
+   sfp = (elDenp - elDenC) * scale_fact / del;
+   sbm = (elDenC - elDenm) * scale_fact / del;
+
+   scale = MIN(sfp, sbm);
+   if (scale > 1.)
+      scale = 1.0;
+   else if (scale < 0.)
+      scale = 0.;
+
+   if ((sfp * sbm) < 0.0) scale = 0.;
+
+   peta = slope_fact * del * scale;
+
+   // --------------------------------- zeta
+
+   elDenm = pkm;
+   elDenp = pkp;
+
+   del = (wgtzeta2 * elDenp + wgtzeta1 * elDenC
+          - wgtzeta4 * elDenm - wgtzeta3 * elDenC) + 1e-80;
+
+   sfp = (elDenp - elDenC) * scale_fact / del;
+   sbm = (elDenC - elDenm) * scale_fact / del;
+
+   scale = MIN(sfp, sbm);
+   if (scale > 1.)
+      scale = 1.0;
+   else if (scale < 0.)
+      scale = 0.;
+
+   if ((sfp * sbm) < 0.0) scale = 0.;
+
+   pzeta = slope_fact * del * scale;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The constructor for MblkLinAdv class sets data members to defualt values, *
+ * creates variables that define the solution state for the linear       *
+ * advection equation.
+ *                                                                       *
+ * After default values are set, this routine calls getFromRestart()     *
+ * if execution from a restart file is specified.  Finally,              *
+ * getFromInput() is called to read values from the given input          *
+ * database (potentially overriding those found in the restart file).    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+MblkLinAdv::MblkLinAdv(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> input_db,
+   tbox::Array<tbox::Pointer<hier::GridGeometry> >& grid_geoms):
+   MblkHyperbolicPatchStrategy(dim),
+   d_dim(dim),
+   d_nghosts(hier::IntVector(dim, CELLG)),
+   d_fluxghosts(hier::IntVector(dim, FLUXG)),
+   d_nodeghosts(hier::IntVector(dim, NODEG))
+{
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!input_db.isNull());
+   TBOX_ASSERT(grid_geoms.getSize() > 0);
+
+   d_object_name = object_name;
+   tbox::RestartManager::getManager()->registerRestartItem(d_object_name, this);
+
+   d_grid_geometries = grid_geoms;
+
+   /*
+    * Setup MblkGeometry object to manage construction of mapped grids
+    */
+   d_mblk_geometry = new MblkGeometry("MblkGeometry",
+         d_dim,
+         input_db,
+         grid_geoms.getSize());
+
+   d_use_nonuniform_workload = false;
+
+   /*
+    * hier::Variable quantities that define state of linear advection problem.
+    */
+   d_uval = new pdat::CellVariable<double>(dim, "uval", DEPTH);
+   d_vol = new pdat::CellVariable<double>(dim, "vol", 1);
+   d_flux = new pdat::SideVariable<double>(dim, "flux", 1);
+   d_xyz = new pdat::NodeVariable<double>(dim, "xyz", d_dim.getValue());
+
+   d_dx_set = false;
+
+   /*
+    * Default parameters for the numerical method.
+    */
+   d_godunov_order = 1;
+   d_corner_transport = "CORNER_TRANSPORT_1";
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(CELLG == FACEG);
+#endif
+
+   /*
+    * Defaults for problem type and initial data.
+    */
+   d_data_problem_int = tbox::MathUtilities<int>::getMax();
+
+   int k;
+
+   // SPHERE problem...
+   d_radius = tbox::MathUtilities<double>::getSignalingNaN();
+   tbox::MathUtilities<double>::setArrayToSignalingNaN(d_center, d_dim.getValue());
+   d_uval_inside = tbox::MathUtilities<double>::getSignalingNaN();
+   d_uval_outside = tbox::MathUtilities<double>::getSignalingNaN();
+
+   d_number_of_intervals = 0;
+   d_front_position.resizeArray(0);
+   d_interval_uval.resizeArray(0);
+
+   // SINE problem
+   d_amplitude = 0.;
+   for (k = 0; k < d_dim.getValue(); k++) d_frequency[k] = 0.;
+
+   /*
+    * Defaults for boundary conditions. Set to bogus values
+    * for error checking.
+    */
+
+   if (d_dim == tbox::Dimension(2)) {
+      d_scalar_bdry_edge_conds.resizeArray(NUM_2D_EDGES);
+      for (int ei = 0; ei < NUM_2D_EDGES; ei++) {
+         d_scalar_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+      }
+
+      d_scalar_bdry_node_conds.resizeArray(NUM_2D_NODES);
+      d_node_bdry_edge.resizeArray(NUM_2D_NODES);
+
+      for (int ni = 0; ni < NUM_2D_NODES; ni++) {
+         d_scalar_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+         d_node_bdry_edge[ni] = BOGUS_BDRY_DATA;
+      }
+
+      d_bdry_edge_uval.resizeArray(NUM_2D_EDGES);
+      tbox::MathUtilities<double>::setArrayToSignalingNaN(d_bdry_edge_uval);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      d_scalar_bdry_face_conds.resizeArray(NUM_3D_FACES);
+      for (int fi = 0; fi < NUM_3D_FACES; fi++) {
+         d_scalar_bdry_face_conds[fi] = BOGUS_BDRY_DATA;
+      }
+
+      d_scalar_bdry_edge_conds.resizeArray(NUM_3D_EDGES);
+      d_edge_bdry_face.resizeArray(NUM_3D_EDGES);
+      for (int ei = 0; ei < NUM_3D_EDGES; ei++) {
+         d_scalar_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+         d_edge_bdry_face[ei] = BOGUS_BDRY_DATA;
+      }
+
+      d_scalar_bdry_node_conds.resizeArray(NUM_3D_NODES);
+      d_node_bdry_face.resizeArray(NUM_3D_NODES);
+
+      for (int ni = 0; ni < NUM_3D_NODES; ni++) {
+         d_scalar_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+         d_node_bdry_face[ni] = BOGUS_BDRY_DATA;
+      }
+
+      d_bdry_face_uval.resizeArray(NUM_3D_FACES);
+      tbox::MathUtilities<double>::setArrayToSignalingNaN(d_bdry_face_uval);
+   }
+
+   /*
+    * Initialize object with data read from given input/restart databases.
+    */
+   bool is_from_restart = tbox::RestartManager::getManager()->isFromRestart();
+   if (is_from_restart) {
+      getFromRestart();
+   }
+   getFromInput(input_db, is_from_restart);
+
+   /*
+    * Set problem data to values read from input/restart.
+    */
+
+   if (d_data_problem == "PIECEWISE_CONSTANT_X") {
+      d_data_problem_int = PIECEWISE_CONSTANT_X;
+   } else if (d_data_problem == "PIECEWISE_CONSTANT_Y") {
+      d_data_problem_int = PIECEWISE_CONSTANT_Y;
+   } else if (d_data_problem == "PIECEWISE_CONSTANT_Z") {
+      d_data_problem_int = PIECEWISE_CONSTANT_Z;
+   } else if (d_data_problem == "SINE_CONSTANT_X") {
+      d_data_problem_int = SINE_CONSTANT_X;
+   } else if (d_data_problem == "SINE_CONSTANT_Y") {
+      d_data_problem_int = SINE_CONSTANT_Y;
+   } else if (d_data_problem == "SINE_CONSTANT_Z") {
+      d_data_problem_int = SINE_CONSTANT_Z;
+   } else if (d_data_problem == "SPHERE") {
+      d_data_problem_int = SPHERE;
+   } else {
+      TBOX_ERROR(
+         d_object_name << ": "
+         << "Unknown d_data_problem string = "
+         << d_data_problem
+         << " encountered in constructor" << endl);
+   }
+
+   /*
+    * Postprocess boundary data from input/restart values.  Note: scalar
+    * quantity in this problem cannot have reflective boundary conditions
+    * so we reset them to FLOW.
+    */
+   if (d_dim == tbox::Dimension(2)) {
+      for (int i = 0; i < NUM_2D_EDGES; i++) {
+         if (d_scalar_bdry_edge_conds[i] == REFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = FLOW_BC;
+         }
+      }
+
+      for (int i = 0; i < NUM_2D_NODES; i++) {
+         if (d_scalar_bdry_node_conds[i] == XREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = XFLOW_BC;
+         }
+         if (d_scalar_bdry_node_conds[i] == YREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = YFLOW_BC;
+         }
+
+         if (d_scalar_bdry_node_conds[i] != BOGUS_BDRY_DATA) {
+            d_node_bdry_edge[i] =
+               SkeletonBoundaryUtilities2::getEdgeLocationForNodeBdry(
+                  i, d_scalar_bdry_node_conds[i]);
+         }
+      }
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      for (int i = 0; i < NUM_3D_FACES; i++) {
+         if (d_scalar_bdry_face_conds[i] == REFLECT_BC) {
+            d_scalar_bdry_face_conds[i] = FLOW_BC;
+         }
+      }
+
+      for (int i = 0; i < NUM_3D_EDGES; i++) {
+         if (d_scalar_bdry_edge_conds[i] == XREFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = XFLOW_BC;
+         }
+         if (d_scalar_bdry_edge_conds[i] == YREFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = YFLOW_BC;
+         }
+         if (d_scalar_bdry_edge_conds[i] == ZREFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = ZFLOW_BC;
+         }
+
+         if (d_scalar_bdry_edge_conds[i] != BOGUS_BDRY_DATA) {
+            d_edge_bdry_face[i] =
+               SkeletonBoundaryUtilities3::getFaceLocationForEdgeBdry(
+                  i, d_scalar_bdry_edge_conds[i]);
+         }
+      }
+
+      for (int i = 0; i < NUM_3D_NODES; i++) {
+         if (d_scalar_bdry_node_conds[i] == XREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = XFLOW_BC;
+         }
+         if (d_scalar_bdry_node_conds[i] == YREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = YFLOW_BC;
+         }
+         if (d_scalar_bdry_node_conds[i] == ZREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = ZFLOW_BC;
+         }
+
+         if (d_scalar_bdry_node_conds[i] != BOGUS_BDRY_DATA) {
+            d_node_bdry_face[i] =
+               SkeletonBoundaryUtilities3::getFaceLocationForNodeBdry(
+                  i, d_scalar_bdry_node_conds[i]);
+         }
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Empty destructor for MblkLinAdv class.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+MblkLinAdv::~MblkLinAdv() {
+   if (d_mblk_geometry) delete d_mblk_geometry;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register conserved variable (u) (i.e., solution state variable) and   *
+ * flux variable with hyperbolic integrator that manages storage for     *
+ * those quantities.  Also, register plot data with Vizamrai or VisIt.   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkLinAdv::registerModelVariables(
+   MblkHyperbolicLevelIntegrator* integrator)
+{
+   TBOX_ASSERT(integrator != (MblkHyperbolicLevelIntegrator *)NULL);
+   TBOX_ASSERT(CELLG == FACEG);
+
+   d_cell_cons_linear_refine_op =
+      new SkeletonCellDoubleConservativeLinearRefine(d_dim);
+   d_cell_cons_coarsen_op =
+      new SkeletonCellDoubleWeightedAverage(d_dim);
+   d_cell_time_interp_op =
+      new pdat::CellDoubleLinearTimeInterpolateOp();
+   d_side_cons_coarsen_op =
+      new SkeletonOutersideDoubleWeightedAverage(d_dim);
+
+   // Note that the Node linear refine operator is null for this case,
+   // which is OK because the only node data is the grid coordinates,
+   // which we explicitly set on any new patch
+   tbox::Pointer<xfer::RefineOperator> node_linear_refine_op;
+   tbox::Pointer<pdat::NodeDoubleInjection> node_cons_coarsen_op(
+      new pdat::NodeDoubleInjection(d_dim));
+
+   integrator->registerVariable(d_uval, d_nghosts,
+      MblkHyperbolicLevelIntegrator::TIME_DEP,
+      d_cell_cons_coarsen_op,
+      d_cell_cons_linear_refine_op,
+      d_cell_time_interp_op);
+
+   integrator->registerVariable(d_vol, d_nghosts,
+      MblkHyperbolicLevelIntegrator::TIME_DEP,
+      d_cell_cons_coarsen_op,
+      d_cell_cons_linear_refine_op,
+      d_cell_time_interp_op);
+
+   integrator->registerVariable(d_flux, d_fluxghosts,
+      MblkHyperbolicLevelIntegrator::FLUX,
+      d_side_cons_coarsen_op);
+
+   tbox::Pointer<xfer::TimeInterpolateOperator> node_time_interp_op(
+      new pdat::NodeDoubleLinearTimeInterpolateOp());
+   integrator->registerVariable(d_xyz, d_nodeghosts,
+      MblkHyperbolicLevelIntegrator::TIME_DEP,
+      node_cons_coarsen_op,
+      node_linear_refine_op,
+      node_time_interp_op);
+
+   hier::VariableDatabase* vardb = hier::VariableDatabase::getDatabase();
+
+#ifdef HAVE_HDF5
+   if (!(d_visit_writer.isNull())) {
+      d_visit_writer->
+      registerPlotQuantity("U",
+         "SCALAR",
+         vardb->mapVariableAndContextToIndex(
+            d_uval, integrator->getPlotContext()));
+      d_visit_writer->
+      registerPlotQuantity("vol",
+         "SCALAR",
+         vardb->mapVariableAndContextToIndex(
+            d_vol, integrator->getPlotContext()));
+      d_visit_writer->
+      registerNodeCoordinates(
+         vardb->mapVariableAndContextToIndex(
+            d_xyz, integrator->getPlotContext()));
+   }
+
+   if (d_visit_writer.isNull()) {
+      TBOX_WARNING(
+         d_object_name << ": registerModelVariables()"
+         << "\nVisit data writer was"
+         <<
+         "\nregistered.  Consequently, no plot data will"
+         << "\nbe written." << endl);
+   }
+#endif
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set initial data for solution variables on patch interior.            *
+ * This routine is called whenever a new patch is introduced to the      *
+ * AMR patch hierarchy.  Note that the routine does nothing unless       *
+ * we are at the initial time.  In all other cases, conservative         *
+ * interpolation from coarser levels and copies from patches at the      *
+ * same mesh resolution are sufficient to set data.                      *
+ *                                                                       *
+ *************************************************************************
+ */
+void MblkLinAdv::initializeDataOnPatch(
+   hier::Patch& patch,
+   const double data_time,
+   const bool initial_time)
+{
+   (void)data_time;
+   /*
+    * Build the mapped grid on the patch.
+    */
+   int block_number = getBlockNumber();
+   int level_number = patch.getPatchLevelNumber();
+   setMappedGridOnPatch(patch, level_number, block_number);
+
+   /*
+    * Set the dx in the operators
+    */
+   double dx[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   d_mblk_geometry->getDx(level_number, dx);
+   d_dx_set = true;
+
+   d_cell_cons_linear_refine_op->setDx(level_number, dx);
+   d_cell_cons_coarsen_op->setDx(level_number, dx);
+   d_side_cons_coarsen_op->setDx(level_number, dx);
+
+   if (initial_time) {
+
+      tbox::Pointer<pdat::CellData<double> > uval =
+         patch.getPatchData(d_uval, getDataContext());
+      tbox::Pointer<pdat::CellData<double> > vol =
+         patch.getPatchData(d_vol, getDataContext());
+      tbox::Pointer<pdat::NodeData<double> > xyz =
+         patch.getPatchData(d_xyz, getDataContext());
+
+      TBOX_ASSERT(!uval.isNull());
+      TBOX_ASSERT(!vol.isNull());
+      TBOX_ASSERT(!xyz.isNull());
+      TBOX_ASSERT(uval->getGhostCellWidth() == vol->getGhostCellWidth());
+
+      hier::IntVector uval_ghosts = uval->getGhostCellWidth();
+      hier::IntVector xyz_ghosts = xyz->getGhostCellWidth();
+
+      const hier::Index ifirst = patch.getBox().lower();
+      const hier::Index ilast = patch.getBox().upper();
+
+      int imin = ifirst(0) - uval_ghosts(0);
+      int imax = ilast(0) + uval_ghosts(0);
+      int jmin = ifirst(1) - uval_ghosts(1);
+      int jmax = ilast(1) + uval_ghosts(1);
+      int kmin = ifirst(2) - uval_ghosts(2);
+      //int kmax = ilast(2)  + uval_ghosts(2);
+      int nx = imax - imin + 1;
+      int ny = jmax - jmin + 1;
+      // int nz   = kmax - kmin + 1;
+      int nxny = nx * ny;
+      // int nel  = nx*ny*nz;
+
+      int nd_imin = ifirst(0) - xyz_ghosts(0);
+      int nd_imax = ilast(0) + 1 + xyz_ghosts(0);
+      int nd_jmin = ifirst(1) - xyz_ghosts(1);
+      int nd_jmax = ilast(1) + 1 + xyz_ghosts(1);
+      int nd_kmin = ifirst(2) - xyz_ghosts(2);
+      //int nd_kmax = ilast(2)  + 1 + xyz_ghosts(2);
+      int nd_nx = nd_imax - nd_imin + 1;
+      int nd_ny = nd_jmax - nd_jmin + 1;
+      // int nd_nz   = nd_kmax - nd_kmin + 1;
+      int nd_nxny = nd_nx * nd_ny;
+      // int nd_nel  = nd_nx*nd_ny*nd_nz;
+
+      //
+      // get the pointers
+      //
+      double* psi = uval->getPointer();
+      double* cvol = vol->getPointer();
+
+      double* x = xyz->getPointer(0);
+      double* y = xyz->getPointer(1);
+      double* z = xyz->getPointer(2);
+
+      //
+      // compute the source due to the upwind method
+      //
+      for (int k = ifirst(2); k <= ilast(2); k++) {
+         for (int j = ifirst(1); j <= ilast(1); j++) {
+            for (int i = ifirst(0); i <= ilast(0); i++) {
+
+               int cind = POLY3(i, j, k, imin, jmin, kmin, nx, nxny);
+
+               int n1 = POLY3(i,
+                     j,
+                     k,
+                     nd_imin,
+                     nd_jmin,
+                     nd_kmin,
+                     nd_nx,
+                     nd_nxny);
+               int n2 = n1 + 1;
+               int n3 = n1 + 1 + nd_nx;
+               int n4 = n1 + nd_nx;
+
+               int n5 = n1 + nd_nxny;
+               int n6 = n1 + nd_nxny + 1;
+               int n7 = n1 + nd_nxny + 1 + nd_nx;
+               int n8 = n1 + nd_nxny + nd_nx;
+
+               real8 vol = UpwindVolume(x[n1], x[n2], x[n3], x[n4],
+                     x[n5], x[n6], x[n7], x[n8],
+
+                     y[n1], y[n2], y[n3], y[n4],
+                     y[n5], y[n6], y[n7], y[n8],
+
+                     z[n1], z[n2], z[n3], z[n4],
+                     z[n5], z[n6], z[n7], z[n8]);
+
+               cvol[cind] = vol;
+
+               real8 xmid = 0.125 * (x[n1] + x[n2] + x[n3] + x[n4]
+                                     + x[n5] + x[n6] + x[n7] + x[n8]);
+
+               real8 ymid = 0.125 * (y[n1] + y[n2] + y[n3] + y[n4]
+                                     + y[n5] + y[n6] + y[n7] + y[n8]);
+
+               real8 zmid = 0.125 * (z[n1] + z[n2] + z[n3] + z[n4]
+                                     + z[n5] + z[n6] + z[n7] + z[n8]);
+
+               real8 xc = xmid - d_center[0];
+               real8 yc = ymid - d_center[0];
+               real8 zc = zmid - d_center[0];
+
+               real8 radsq = xc * xc + yc * yc + zc * zc;
+
+               bool inside = (d_radius * d_radius) > radsq;
+
+               if (inside) {
+                  psi[cind] = d_uval_inside;
+               } else {
+                  psi[cind] = d_uval_outside;
+               }
+
+            }
+         }
+      }
+
+   }
+
+   if (d_use_nonuniform_workload) {
+      if (!patch.checkAllocated(d_workload_data_id)) {
+         patch.allocatePatchData(d_workload_data_id);
+      }
+      tbox::Pointer<pdat::CellData<double> > workload_data =
+         patch.getPatchData(d_workload_data_id);
+      workload_data->fillAll(1.0);
+   }
+
+}
+
+//
+// ==================================================================
+//    extra code
+// ==================================================================
+//
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute stable time increment for patch.  Return this value.          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double MblkLinAdv::computeStableDtOnPatch(
+   hier::Patch& patch,
+   const bool initial_time,
+   const double dt_time)
+{
+   (void)initial_time;
+   (void)dt_time;
+
+   /*
+    * Build the mapped grid on the patch.
+    */
+   int block_number = getBlockNumber();
+   int level_number = patch.getPatchLevelNumber();
+   setMappedGridOnPatch(patch, level_number, block_number);
+
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+
+   tbox::Pointer<pdat::CellData<double> > uval =
+      patch.getPatchData(d_uval, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > vol =
+      patch.getPatchData(d_vol, getDataContext());
+   tbox::Pointer<pdat::NodeData<double> > xyz =
+      patch.getPatchData(d_xyz, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!uval.isNull());
+   TBOX_ASSERT(!vol.isNull());
+   TBOX_ASSERT(!xyz.isNull());
+   TBOX_ASSERT(uval->getGhostCellWidth() == vol->getGhostCellWidth());
+#endif
+
+   hier::IntVector uval_ghosts = uval->getGhostCellWidth();
+   hier::IntVector xyz_ghosts = xyz->getGhostCellWidth();
+
+   /*
+    * Adjust advection velocity based on rotation of block
+    */
+   //int block_number = getBlockNumber();
+
+   int imin = ifirst(0) - uval_ghosts(0);
+   int imax = ilast(0) + uval_ghosts(0);
+   int jmin = ifirst(1) - uval_ghosts(1);
+   int jmax = ilast(1) + uval_ghosts(1);
+   int kmin = ifirst(2) - uval_ghosts(2);
+   //int kmax = ilast(2)  + uval_ghosts(2);
+   int nx = imax - imin + 1;
+   int ny = jmax - jmin + 1;
+   // int nz   = kmax - kmin + 1;
+   int nxny = nx * ny;
+   // int nel  = nx*ny*nz;
+
+   int nd_imin = ifirst(0) - xyz_ghosts(0);
+   int nd_imax = ilast(0) + 1 + xyz_ghosts(0);
+   int nd_jmin = ifirst(1) - xyz_ghosts(1);
+   int nd_jmax = ilast(1) + 1 + xyz_ghosts(1);
+   int nd_kmin = ifirst(2) - xyz_ghosts(2);
+   //int nd_kmax = ilast(2)  + 1 + xyz_ghosts(2);
+   int nd_nx = nd_imax - nd_imin + 1;
+   int nd_ny = nd_jmax - nd_jmin + 1;
+   // int nd_nz   = nd_kmax - nd_kmin + 1;
+   int nd_nxny = nd_nx * nd_ny;
+   // int nd_nel  = nd_nx*nd_ny*nd_nz;
+
+   //int rot = d_mblk_geometry->getBlockRotation(block_number);
+
+   real8 u = d_advection_velocity[0];
+   real8 v = d_advection_velocity[1];
+   real8 w = d_advection_velocity[2];
+
+   //
+   // compute the source due to the upwind method
+   //
+   double stabdt = 1.e20;
+
+   double* cvol = vol->getPointer();
+
+   double* x = xyz->getPointer(0);
+   double* y = xyz->getPointer(1);
+   double* z = xyz->getPointer(2);
+
+   for (int k = ifirst(2); k <= ilast(2); k++) {
+      for (int j = ifirst(1); j <= ilast(1); j++) {
+         for (int i = ifirst(0); i <= ilast(0); i++) {
+
+            int cind = POLY3(i, j, k, imin, jmin, kmin, nx, nxny);
+
+            //   have set up the normal so that it always points in the positive, i, j, and k directions
+
+            int n1 = POLY3(i, j, k, nd_imin, nd_jmin, nd_kmin, nd_nx, nd_nxny);
+            int n2 = n1 + 1;
+            int n3 = n1 + 1 + nd_nx;
+            int n4 = n1 + nd_nx;
+
+            int n5 = n1 + nd_nxny;
+            int n6 = n1 + nd_nxny + 1;
+            int n7 = n1 + nd_nxny + 1 + nd_nx;
+            int n8 = n1 + nd_nxny + nd_nx;
+
+            real8 vol = UpwindVolume(x[n1], x[n2], x[n3], x[n4],
+                  x[n5], x[n6], x[n7], x[n8],
+
+                  y[n1], y[n2], y[n3], y[n4],
+                  y[n5], y[n6], y[n7], y[n8],
+
+                  z[n1], z[n2], z[n3], z[n4],
+                  z[n5], z[n6], z[n7], z[n8]);
+
+            cvol[cind] = vol;
+
+            if (vol < 0.) {
+               TBOX_ERROR("Error:  negative volume computed in UpwindVolume");
+            }
+
+            real8 xx[8];
+            real8 yy[8];
+            real8 zz[8];
+
+            xx[0] = x[n1];
+            xx[1] = x[n2];
+            xx[2] = x[n3];
+            xx[3] = x[n4];
+            xx[4] = x[n5];
+            xx[5] = x[n6];
+            xx[6] = x[n7];
+            xx[7] = x[n8];
+
+            yy[0] = y[n1];
+            yy[1] = y[n2];
+            yy[2] = y[n3];
+            yy[3] = y[n4];
+            yy[4] = y[n5];
+            yy[5] = y[n6];
+            yy[6] = y[n7];
+            yy[7] = y[n8];
+
+            zz[0] = z[n1];
+            zz[1] = z[n2];
+            zz[2] = z[n3];
+            zz[3] = z[n4];
+            zz[4] = z[n5];
+            zz[5] = z[n6];
+            zz[6] = z[n7];
+            zz[7] = z[n8];
+
+            real8 arealg = UpwindCharacteristicLength(xx, yy, zz, vol);
+
+            real8 uu = MAX(u, MAX(v, w));
+
+            stabdt = MIN(stabdt, arealg / uu);
+
+         }
+      }
+   }
+   return stabdt;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute time integral of numerical fluxes for finite difference       *
+ * at each cell face on patch.  When d_dim == tbox::Dimension(3)), there are two options    *
+ * for the transverse flux correction.  Otherwise, there is only one.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkLinAdv::computeFluxesOnPatch(
+   hier::Patch& patch,
+   const double time,
+   const double dt)
+{
+   (void)time;
+
+   //return;
+
+   int block_number = getBlockNumber();
+   int level_number = patch.getPatchLevelNumber();
+   setMappedGridOnPatch(patch, level_number, block_number);
+
+   hier::Box pbox = patch.getBox();
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+
+   tbox::Pointer<pdat::CellData<double> > uval =
+      patch.getPatchData(d_uval, getDataContext());
+
+   tbox::Pointer<pdat::CellData<double> > vol =
+      patch.getPatchData(d_vol, getDataContext());
+
+   tbox::Pointer<pdat::SideData<double> > flux =
+      patch.getPatchData(d_flux, getDataContext());
+
+   tbox::Pointer<pdat::NodeData<double> > xyz =
+      patch.getPatchData(d_xyz, getDataContext());
+
+   /*
+    * Verify that the integrator providing the context correctly
+    * created it, and that the ghost cell width associated with the
+    * context matches the ghosts defined in this class...
+    */
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!uval.isNull());
+   TBOX_ASSERT(!flux.isNull());
+   TBOX_ASSERT(!vol.isNull());
+   TBOX_ASSERT(uval->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(vol->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(flux->getGhostCellWidth() == d_fluxghosts);
+   TBOX_ASSERT(xyz->getGhostCellWidth() == d_nodeghosts);
+#endif
+
+   //
+   // ------------------------------- spliced in code ----------------------------
+   //
+
+   int fx_imn = ifirst(0) - d_fluxghosts(0);
+   int fx_imx = ilast(0) + 1 + d_fluxghosts(0);
+   int fx_jmn = ifirst(1) - d_fluxghosts(1);
+   int fx_jmx = ilast(1) + d_fluxghosts(1);
+   int fx_kmn = ifirst(2) - d_fluxghosts(2);
+   //int fx_kmx  = ilast(2)      + d_fluxghosts(2);
+   int fx_nx = fx_imx - fx_imn + 1;
+   int fx_ny = fx_jmx - fx_jmn + 1;
+   //int fx_nz   = fx_kmx - fx_kmn + 1;
+   int fx_nxny = fx_nx * fx_ny;
+   //int fx_nel  = fx_nx*fx_ny*fx_nz;
+
+   int fy_imn = ifirst(0) - d_fluxghosts(0);
+   int fy_imx = ilast(0) + d_fluxghosts(0);
+   int fy_jmn = ifirst(1) - d_fluxghosts(1);
+   int fy_jmx = ilast(1) + 1 + d_fluxghosts(1);
+   int fy_kmn = ifirst(2) - d_fluxghosts(2);
+   //int fy_kmx  = ilast(2)      + d_fluxghosts(2);
+   int fy_nx = fy_imx - fy_imn + 1;
+   int fy_ny = fy_jmx - fy_jmn + 1;
+   //int fy_nz   = fy_kmx - fy_kmn + 1;
+   int fy_nxny = fy_nx * fy_ny;
+   //int fy_nel  = fy_nx*fy_ny*fy_nz;
+
+   int fz_imn = ifirst(0) - d_fluxghosts(0);
+   int fz_imx = ilast(0) + d_fluxghosts(0);
+   int fz_jmn = ifirst(1) - d_fluxghosts(1);
+   int fz_jmx = ilast(1) + d_fluxghosts(1);
+   int fz_kmn = ifirst(2) - d_fluxghosts(2);
+   //int fz_kmx  = ilast(2)   + 1 + d_fluxghosts(2);
+   int fz_nx = fz_imx - fz_imn + 1;
+   int fz_ny = fz_jmx - fz_jmn + 1;
+   //int fz_nz   = fz_kmx - fz_kmn + 1;
+   int fz_nxny = fz_nx * fz_ny;
+   //int fz_nel  = fz_nx*fz_ny*fz_nz;
+
+   int imin = ifirst(0) - d_nghosts(0);
+   int imax = ilast(0) + d_nghosts(0);
+   int jmin = ifirst(1) - d_nghosts(1);
+   int jmax = ilast(1) + d_nghosts(1);
+   int kmin = ifirst(2) - d_nghosts(2);
+   //int kmax = ilast(2)  + d_nghosts(2);
+   int nx = imax - imin + 1;
+   int ny = jmax - jmin + 1;
+   // int nz   = kmax - kmin + 1;
+   int nxny = nx * ny;
+   // int nel  = nx*ny*nz;
+
+   int nd_imin = ifirst(0) - d_nodeghosts(0);
+   int nd_imax = ilast(0) + 1 + d_nodeghosts(0);
+   int nd_jmin = ifirst(1) - d_nodeghosts(1);
+   int nd_jmax = ilast(1) + 1 + d_nodeghosts(1);
+   int nd_kmin = ifirst(2) - d_nodeghosts(2);
+   //int nd_kmax = ilast(2)  + 1 + d_nodeghosts(2);
+   int nd_nx = nd_imax - nd_imin + 1;
+   int nd_ny = nd_jmax - nd_jmin + 1;
+   // int nd_nz   = nd_kmax - nd_kmin + 1;
+   int nd_nxny = nd_nx * nd_ny;
+   // int nd_nel  = nd_nx*nd_ny*nd_nz;
+
+   //
+   // get the pointers
+   //
+   double* psi = uval->getPointer();
+
+   double* cvol = vol->getPointer();
+
+   double* fx = flux->getPointer(0);
+   double* fy = flux->getPointer(1);
+   double* fz = flux->getPointer(2);
+
+   double* x = xyz->getPointer(0);
+   double* y = xyz->getPointer(1);
+   double* z = xyz->getPointer(2);
+
+   real8 u = -d_advection_velocity[0];
+   real8 v = -d_advection_velocity[1];
+   real8 w = -d_advection_velocity[2];
+
+   //
+   // compute the source due to the upwind method
+   //
+   for (int k = ifirst(2); k <= ilast(2); k++) {
+      for (int j = ifirst(1); j <= ilast(1); j++) {
+         for (int i = ifirst(0); i <= ilast(0) + 1; i++) {
+
+            int ifx = POLY3(i, j, k, fx_imn, fx_jmn, fx_kmn, fx_nx, fx_nxny);
+
+            // --------- get the neighbors
+            int ind = POLY3(i, j, k, imin, jmin, kmin, nx, nxny);
+            int ib = ind - 1;
+
+            // ---------- use a righthand rule in evaluating face data, n1 -- n4 go around the bottom plane
+            //   of the element, n5-n8 go around the top plane of the element.  note, I
+            //   have set up the normal so that it always points in the positive, i, j, and k directions
+            int n1 = POLY3(i, j, k, nd_imin, nd_jmin, nd_kmin, nd_nx, nd_nxny);
+            int n4 = n1 + nd_nx;
+            int n5 = n1 + nd_nxny;
+            int n8 = n1 + nd_nxny + nd_nx;
+
+            fx[ifx] = UpwindFlux(x[n1], x[n4], x[n8], x[n5],  // 1 - 4 - 8 - 5
+                  y[n1], y[n4], y[n8], y[n5],
+                  z[n1], z[n4], z[n8], z[n5],
+                  u, v, w,
+                  psi[ib], psi[ind]);
+         }
+      }
+   }
+
+   for (int k = ifirst(2); k <= ilast(2); k++) {
+      for (int j = ifirst(1); j <= ilast(1) + 1; j++) {
+         for (int i = ifirst(0); i <= ilast(0); i++) {
+
+            int ify = POLY3(i, j, k, fy_imn, fy_jmn, fy_kmn, fy_nx, fy_nxny);
+
+            // --------- get the neighbors
+            int ind = POLY3(i, j, k, imin, jmin, kmin, nx, nxny);
+            int jb = ind - nx;
+
+            // ---------- use a righthand rule in evaluating face data, n1 -- n4 go around the bottom plane
+            //   of the element, n5-n8 go around the top plane of the element.  note, I
+            //   have set up the normal so that it always points in the positive, i, j, and k directions
+            int n1 = POLY3(i, j, k, nd_imin, nd_jmin, nd_kmin, nd_nx, nd_nxny);
+            int n2 = n1 + 1;
+            int n5 = n1 + nd_nxny;
+            int n6 = n1 + nd_nxny + 1;
+
+            fy[ify] = UpwindFlux(x[n1], x[n5], x[n6], x[n2],  // 1 - 5 - 6 - 2
+                  y[n1], y[n5], y[n6], y[n2],
+                  z[n1], z[n5], z[n6], z[n2],
+                  u, v, w,
+                  psi[jb], psi[ind]);
+         }
+      }
+   }
+
+   for (int k = ifirst(2); k <= ilast(2) + 1; k++) {
+      for (int j = ifirst(1); j <= ilast(1); j++) {
+         for (int i = ifirst(0); i <= ilast(0); i++) {
+
+            int ifz = POLY3(i, j, k, fz_imn, fz_jmn, fz_kmn, fz_nx, fz_nxny);
+
+            // --------- get the neighbors
+            int ind = POLY3(i, j, k, imin, jmin, kmin, nx, nxny);
+            int kb = ind - nxny;
+
+            // ---------- use a righthand rule in evaluating face data, n1 -- n4 go around the bottom plane
+            //   of the element, n5-n8 go around the top plane of the element.  note, I
+            //   have set up the normal so that it always points in the positive, i, j, and k directions
+            int n1 = POLY3(i, j, k, nd_imin, nd_jmin, nd_kmin, nd_nx, nd_nxny);
+            int n2 = n1 + 1;
+            int n3 = n1 + 1 + nd_nx;
+            int n4 = n1 + nd_nx;
+
+            fz[ifz] = UpwindFlux(x[n1], x[n2], x[n3], x[n4],  // 1 - 2 - 3 - 4
+                  y[n1], y[n2], y[n3], y[n4],
+                  z[n1], z[n2], z[n3], z[n4],
+                  u, v, w,
+                  psi[kb], psi[ind]);
+         }
+      }
+   }
+
+   //
+   // compute the source due to the upwind method
+   //
+   for (int k = ifirst(2); k <= ilast(2); k++) {
+      for (int j = ifirst(1); j <= ilast(1); j++) {
+         for (int i = ifirst(0); i <= ilast(0); i++) {
+
+            int ind = POLY3(i, j, k, imin, jmin, kmin, nx, nxny);
+
+            int ib = POLY3(i, j, k, fx_imn, fx_jmn, fx_kmn, fx_nx, fx_nxny);
+            int ie = POLY3(i + 1, j, k, fx_imn, fx_jmn, fx_kmn, fx_nx, fx_nxny);
+
+            int jb = POLY3(i, j, k, fy_imn, fy_jmn, fy_kmn, fy_nx, fy_nxny);
+            int je = POLY3(i, j + 1, k, fy_imn, fy_jmn, fy_kmn, fy_nx, fy_nxny);
+
+            int kb = POLY3(i, j, k, fz_imn, fz_jmn, fz_kmn, fz_nx, fz_nxny);
+            int ke = POLY3(i, j, k + 1, fz_imn, fz_jmn, fz_kmn, fz_nx, fz_nxny);
+
+            //   have set up the normal so that it always points in the positive, i, j, and k directions
+            int n1 = POLY3(i, j, k, nd_imin, nd_jmin, nd_kmin, nd_nx, nd_nxny);
+            int n2 = n1 + 1;
+            int n3 = n1 + 1 + nd_nx;
+            int n4 = n1 + nd_nx;
+
+            int n5 = n1 + nd_nxny;
+            int n6 = n1 + nd_nxny + 1;
+            int n7 = n1 + nd_nxny + 1 + nd_nx;
+            int n8 = n1 + nd_nxny + nd_nx;
+
+            real8 vol = UpwindVolume(x[n1], x[n2], x[n3], x[n4],
+                  x[n5], x[n6], x[n7], x[n8],
+
+                  y[n1], y[n2], y[n3], y[n4],
+                  y[n5], y[n6], y[n7], y[n8],
+
+                  z[n1], z[n2], z[n3], z[n4],
+                  z[n5], z[n6], z[n7], z[n8]);
+
+            cvol[ind] = vol;
+
+            psi[ind] -= dt * ((fx[ie] - fx[ib])
+                              + (fy[je] - fy[jb])
+                              + (fz[ke] - fz[kb])) / vol;
+
+         }
+      }
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Update solution variables by performing a conservative                *
+ * difference with the fluxes calculated in computeFluxesOnPatch().      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkLinAdv::conservativeDifferenceOnPatch(
+   hier::Patch& patch,
+   const double time,
+   const double dt,
+   bool at_syncronization)
+{
+   (void)patch;
+   (void)time;
+   (void)dt;
+   (void)at_syncronization;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set the data in ghost cells corresponding to physical boundary        *
+ * conditions.  Note that boundary geometry configuration information    *
+ * (i.e., faces, edges, and nodes) is obtained from the patch geometry   *
+ * object owned by the patch.                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkLinAdv::setPhysicalBoundaryConditions(
+   hier::Patch& patch,
+   const double fill_time,
+   const hier::IntVector& ghost_width_to_fill)
+{
+   (void)fill_time;
+
+   tbox::Pointer<pdat::CellData<double> > uval =
+      patch.getPatchData(d_uval, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!uval.isNull());
+#endif
+   hier::IntVector uval_ghosts = uval->getGhostCellWidth();
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(uval->getGhostCellWidth() == d_nghosts);
+#endif
+
+   if (d_dim == tbox::Dimension(2)) {
+
+      /*
+       * Set boundary conditions for cells corresponding to patch edges.
+       */
+      SkeletonBoundaryUtilities2::
+      fillEdgeBoundaryData("uval", uval,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_edge_conds,
+         d_bdry_edge_uval);
+
+      /*
+       *  Set boundary conditions for cells corresponding to patch nodes.
+       */
+
+      SkeletonBoundaryUtilities2::
+      fillNodeBoundaryData("uval", uval,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_node_conds,
+         d_bdry_edge_uval);
+
+   } // d_dim == tbox::Dimension(2))
+
+   if (d_dim == tbox::Dimension(3)) {
+
+      /*
+       *  Set boundary conditions for cells corresponding to patch faces.
+       */
+
+      SkeletonBoundaryUtilities3::
+      fillFaceBoundaryData("uval", uval,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_face_conds,
+         d_bdry_face_uval);
+
+      /*
+       *  Set boundary conditions for cells corresponding to patch edges.
+       */
+
+      SkeletonBoundaryUtilities3::
+      fillEdgeBoundaryData("uval", uval,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_edge_conds,
+         d_bdry_face_uval);
+
+      /*
+       *  Set boundary conditions for cells corresponding to patch nodes.
+       */
+
+      SkeletonBoundaryUtilities3::
+      fillNodeBoundaryData("uval", uval,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_node_conds,
+         d_bdry_face_uval);
+   } // d_dim == tbox::Dimension(3))
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Refine operations
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkLinAdv::preprocessRefine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio)
+{
+   (void)fine_box;
+   (void)ratio;
+
+   int xyz_id = hier::VariableDatabase::getDatabase()->
+      mapVariableAndContextToIndex(d_xyz, getDataContext());
+
+   int fln = fine.getPatchLevelNumber();
+   int cln = coarse.getPatchLevelNumber();
+   if (fln < 0) {
+      fln = cln + 1;
+      if (!fine.checkAllocated(xyz_id)) {
+         TBOX_ERROR(d_object_name << ":preprocessRefine()"
+                                  << "\nfine xyz data not allocated" << endl);
+      }
+   }
+   if (cln < 0) {
+      cln = fln - 1;
+      if (!coarse.checkAllocated(xyz_id)) {
+         TBOX_ERROR(d_object_name << ":preprocessRefine()"
+                                  << "\ncoarse xyz data not allocated" << endl);
+      }
+   }
+   int block_number = getBlockNumber();
+   setMappedGridOnPatch(coarse, cln, block_number);
+   setMappedGridOnPatch(fine, fln, block_number);
+
+}
+
+void MblkLinAdv::postprocessRefine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio)
+{
+
+   tbox::Pointer<pdat::CellData<double> > cuval =
+      coarse.getPatchData(d_uval, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > cvol =
+      coarse.getPatchData(d_vol, getDataContext());
+
+   tbox::Pointer<pdat::CellData<double> > fuval =
+      fine.getPatchData(d_uval, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > fvol =
+      fine.getPatchData(d_vol, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!cuval.isNull());
+   TBOX_ASSERT(!fuval.isNull());
+   TBOX_ASSERT(!cvol.isNull());
+   TBOX_ASSERT(!fvol.isNull());
+   TBOX_ASSERT(cuval->getDepth() == fuval->getDepth());
+#endif
+
+   //
+   // get the needed geometry and box information
+   //
+   const hier::Box cgbox(cuval->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fuval->getGhostBox().lower();
+   const hier::Index fihi = fuval->getGhostBox().upper();
+
+   const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+   const hier::Index ifirstf = fine_box.lower();
+   const hier::Index ilastf = fine_box.upper();
+
+   int flev = fine.getPatchLevelNumber();
+   int clev = coarse.getPatchLevelNumber();
+
+   tbox::plog << "--------------------- start postprocessRefineData ("
+              << flev << "," << clev << ")" << endl;
+   tbox::plog << "flevel     = " << flev << endl;
+   tbox::plog << "clevel     = " << clev << endl;
+   tbox::plog << "fine       = " << fine.getBox() << endl;
+   tbox::plog << "coarse     = " << coarse.getBox() << endl;
+   tbox::plog << "fine_box   = " << fine_box << endl;
+   tbox::plog << "coarse_box = " << coarse_box << endl;
+
+   tbox::plog << "filo = " << filo << ", fihi = " << fihi << endl;
+   tbox::plog << "cilo = " << cilo << ", cihi = " << cihi << endl;
+
+   //
+   // setup work variables
+   //
+   const hier::IntVector tmp_ghosts(d_dim, 0);
+   const int numInterp = 1;
+   pdat::CellData<double> val_vals(coarse_box, numInterp, tmp_ghosts);
+   pdat::CellData<double> slope0_vals(coarse_box, numInterp, tmp_ghosts);
+   pdat::CellData<double> slope1_vals(coarse_box, numInterp, tmp_ghosts);
+   pdat::CellData<double> slope2_vals(coarse_box, numInterp, tmp_ghosts);
+   double* val = val_vals.getPointer();
+   double* slope0 = slope0_vals.getPointer();
+   double* slope1 = slope1_vals.getPointer();
+   double* slope2 = slope2_vals.getPointer();
+
+   int imin = ifirstc(0);  // the box of coarse elements being refined
+   int imax = ilastc(0);   // the work data is sized to this box
+   int jmin = ifirstc(1);
+   int jmax = ilastc(1);
+   int kmin = ifirstc(2);
+   int kmax = ilastc(2);
+   int nx = imax - imin + 1;
+   int ny = jmax - jmin + 1;
+   int nz = kmax - kmin + 1;
+   int nxny = nx * ny;
+   int nel = nx * ny * nz;
+
+   int cimin = cilo(0);  // the coarse data bounds
+   int cimax = cihi(0);
+   int cjmin = cilo(1);
+   int cjmax = cihi(1);
+   int ckmin = cilo(2);
+   int ckmax = cihi(2);
+   int cnx = cimax - cimin + 1;
+   int cny = cjmax - cjmin + 1;
+   int cnz = ckmax - ckmin + 1;
+   int cnxny = cnx * cny;
+   int cnel = cnx * cny * cnz;
+
+   int fimin = filo(0);  // the fine data bounds
+   int fimax = fihi(0);
+   int fjmin = filo(1);
+   int fjmax = fihi(1);
+   int fkmin = filo(2);
+   int fkmax = fihi(2);
+   int fnx = fimax - fimin + 1;
+   int fny = fjmax - fjmin + 1;
+   int fnz = fkmax - fkmin + 1;
+   int fnxny = fnx * fny;
+   int fnel = fnx * fny * fnz;
+
+   double rat0 = ratio[0];
+   double rat1 = ratio[1];
+   double rat2 = ratio[2];
+   double fact = 2.0;  // xi varies from -1 to 1
+
+   double* cvolume = cvol->getPointer();
+   double* cdata = cuval->getPointer();
+   double* fdata = fuval->getPointer();
+
+   //
+   // ================================= history variable refinement ====================
+   //
+   for (int n = 0; n < DEPTH; n++) {
+
+      for (int l = 0; l < nel; l++) {       // default slopes are zero
+         slope0[l] = 0.0;  // this yields piecewise constant interpolation
+         slope1[l] = 0.0;  // and makes a handy initializer
+         slope2[l] = 0.0;
+      }
+
+      for (int k = ifirstc(2); k <= ilastc(2); k++) {
+         for (int j = ifirstc(1); j <= ilastc(1); j++) {
+            for (int i = ifirstc(0); i <= ilastc(0); i++) {
+
+               int ind = POLY3(i, j, k, imin, jmin, kmin, nx, nxny);
+               int chind =
+                  POLY3(i, j, k, cimin, cjmin, ckmin, cnx, cnxny) + n * cnel;
+
+               int wind = POLY3(i, j, k, cimin, cjmin, ckmin, cnx, cnxny);
+               double w_i = cvolume[wind];
+               double w_im = cvolume[wind - 1];
+               double w_ip = cvolume[wind + 1];
+               double w_jm = cvolume[wind - cnx];
+               double w_jp = cvolume[wind + cnx];
+               double w_km = cvolume[wind - cnxny];
+               double w_kp = cvolume[wind + cnxny];
+
+               int im1 = chind - 1;
+               int ip1 = chind + 1;
+               int jm1 = chind - cnx;
+               int jp1 = chind + cnx;
+               int km1 = chind - cnxny;
+               int kp1 = chind + cnxny;
+
+               double aii = cdata[chind];
+
+               double aip = cdata[ip1];
+               double aim = cdata[im1];
+               double ajp = cdata[jp1];
+               double ajm = cdata[jm1];
+               double akp = cdata[kp1];
+               double akm = cdata[km1];
+
+               val[ind] = aii;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+               TBOX_ASSERT(ind >= 0);   // debug assertions
+               TBOX_ASSERT(ind < nel);
+#endif
+               my_slopes(aii, aip, aim, ajp, ajm, akp, akm,
+                  w_i, w_ip, w_im, w_jp, w_jm, w_kp, w_km,
+                  slope0[ind],
+                  slope1[ind],
+                  slope2[ind]);
+
+            }
+         }
+      }
+
+      //
+      // compute the interpolated data from the cached slopes, looping
+      // over the fine zones
+      //
+      for (int k = ifirstf(2); k <= ilastf(2); k++) {
+         for (int j = ifirstf(1); j <= ilastf(1); j++) {
+            for (int i = ifirstf(0); i <= ilastf(0); i++) {
+
+               int fhind =
+                  POLY3(i, j, k, fimin, fjmin, fkmin, fnx, fnxny) + n * fnel;
+
+               double ric = (double(i) + 0.5) / rat0 - 0.5;
+               double rjc = (double(j) + 0.5) / rat1 - 0.5;
+               double rkc = (double(k) + 0.5) / rat2 - 0.5;
+
+               int ic = (int)(ric + (ric >= 0 ? 0.5 : -0.5));
+               int jc = (int)(rjc + (rjc >= 0 ? 0.5 : -0.5));
+               int kc = (int)(rkc + (rkc >= 0 ? 0.5 : -0.5));
+
+               double ldx = fact * (ric - ic);
+               double ldy = fact * (rjc - jc);
+               double ldz = fact * (rkc - kc);
+
+               int ind = POLY3(ic, jc, kc, imin, jmin, kmin, nx, nxny);  // work pos
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+               TBOX_ASSERT(0 <= ind);
+               TBOX_ASSERT(ind < nel);
+#endif
+
+               fdata[fhind] =
+                  cdata[ind]
+                  + ldx * slope0[ind]
+                  + ldy * slope1[ind]
+                  + ldz * slope2[ind];
+
+            }
+         }
+      } // end of i,j,k loops for finding the fine history variables
+
+   } // end of history loop
+
+   tbox::plog << "--------------------- end postprocessRefine" << endl;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Coarsen operations
+ *                                                                       *
+ *************************************************************************
+ */
+void MblkLinAdv::preprocessCoarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio)
+{
+   (void)coarse_box;
+   (void)ratio;
+
+   int xyz_id = hier::VariableDatabase::getDatabase()->
+      mapVariableAndContextToIndex(d_xyz, getDataContext());
+
+   int fln = fine.getPatchLevelNumber();
+   int cln = coarse.getPatchLevelNumber();
+   if (fln < 0) {
+      fln = cln + 1;
+      if (!fine.checkAllocated(xyz_id)) {
+         TBOX_ERROR(d_object_name << ":preprocessCoarsen()"
+                                  << "\nfine xyz data not allocated" << endl);
+      }
+   }
+   if (cln < 0) {
+      cln = fln - 1;
+      if (!coarse.checkAllocated(xyz_id)) {
+         TBOX_ERROR(d_object_name << ":preprocessCoarsen()"
+                                  << "\ncoarse xyz data not allocated" << endl);
+      }
+   }
+   int block_number = getCoarsenBlockNumber();
+   setMappedGridOnPatch(coarse, cln, block_number);
+   setMappedGridOnPatch(fine, fln, block_number);
+
+}
+
+//
+// the coarsening function
+//
+void MblkLinAdv::postprocessCoarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio)
+{
+
+   tbox::Pointer<pdat::CellData<double> > cuval =
+      coarse.getPatchData(d_uval, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > cvol =
+      coarse.getPatchData(d_vol, getDataContext());
+
+   tbox::Pointer<pdat::CellData<double> > fuval =
+      fine.getPatchData(d_uval, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > fvol =
+      fine.getPatchData(d_vol, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!cuval.isNull());
+   TBOX_ASSERT(!cvol.isNull());
+   TBOX_ASSERT(!fuval.isNull());
+   TBOX_ASSERT(!fvol.isNull());
+   TBOX_ASSERT(cuval->getDepth() == fuval->getDepth());
+#endif
+
+   //
+   // box and geometry information
+   //
+   const hier::Index filo = fuval->getGhostBox().lower();
+   const hier::Index fihi = fuval->getGhostBox().upper();
+   const hier::Index cilo = cuval->getGhostBox().lower();
+   const hier::Index cihi = cuval->getGhostBox().upper();
+
+   const hier::Box fine_box = hier::Box::refine(coarse_box, ratio);
+   const hier::Index ifirstc = coarse_box.lower();  // coarse basis
+   const hier::Index ilastc = coarse_box.upper();
+   const hier::Index ifirstf = fine_box.lower();    // fine data
+   const hier::Index ilastf = fine_box.upper();
+
+   int flev = fine.getPatchLevelNumber();
+   int clev = coarse.getPatchLevelNumber();
+
+   tbox::plog << "--------------------- start postprocessCoarsenData ("
+              << flev << "," << clev << ")" << endl;
+   tbox::plog << "flevel     = " << flev << endl;
+   tbox::plog << "clevel     = " << clev << endl;
+   tbox::plog << "fine       = " << fine.getBox() << endl;
+   tbox::plog << "coarse     = " << coarse.getBox() << endl;
+   tbox::plog << "fine_box   = " << fine_box << endl;
+   tbox::plog << "coarse_box = " << coarse_box << endl;
+
+   tbox::plog << "filo = " << filo << ", fihi = " << fihi << endl;
+   tbox::plog << "cilo = " << cilo << ", cihi = " << cihi << endl;
+
+   //
+   // work variables
+   //
+
+   int cimin = cilo(0);
+   int cimax = cihi(0);
+   int cjmin = cilo(1);
+   int cjmax = cihi(1);
+   int ckmin = cilo(2);
+   int ckmax = cihi(2);
+   int cnx = cimax - cimin + 1;
+   int cny = cjmax - cjmin + 1;
+   int cnz = ckmax - ckmin + 1;
+   int cnxny = cnx * cny;
+   int cnel = cnx * cny * cnz;
+
+   int fimin = filo(0);
+   int fimax = fihi(0);
+   int fjmin = filo(1);
+   int fjmax = fihi(1);
+   int fkmin = filo(2);
+   int fkmax = fihi(2);
+   int fnx = fimax - fimin + 1;
+   int fny = fjmax - fjmin + 1;
+   int fnz = fkmax - fkmin + 1;
+   int fnxny = fnx * fny;
+   int fnel = fnx * fny * fnz;
+
+   double rat0 = (double)(ratio(0));
+   double rat1 = (double)(ratio(1));
+   double rat2 = (double)(ratio(2));
+
+   double* cvolume = cvol->getPointer();
+   double* fvolume = fvol->getPointer();
+   double* cdata = cuval->getPointer();
+   double* fdata = fuval->getPointer();
+
+   //
+   // average the data
+   //
+   for (int n = 0; n < DEPTH; n++) {
+
+      //
+      // zero out the underlying coarse data to serve as a counter
+      //
+      for (int k = ifirstc(2); k <= ilastc(2); k++) {    // loop over the coarse zones
+         for (int j = ifirstc(1); j <= ilastc(1); j++) {
+            for (int i = ifirstc(0); i <= ilastc(0); i++) {
+
+               int chind =
+                  POLY3(i, j, k, cimin, cjmin, ckmin, cnx, cnxny) + n * cnel;
+
+               cdata[chind] = 0.0;
+            }
+         }
+      }
+
+      //
+      // compute the interpolated data from the cached slopes
+      //
+
+      for (int k = ifirstf(2); k <= ilastf(2); k++) {    // loop over the coarse zones
+         for (int j = ifirstf(1); j <= ilastf(1); j++) {
+            for (int i = ifirstf(0); i <= ilastf(0); i++) {
+
+               int vol_ind = POLY3(i, j, k, fimin, fjmin, fkmin, fnx, fnxny);
+               int fhind = vol_ind + n * fnel;
+
+               real8 ric = (double(i) + 0.5) / rat0 - 0.5;
+               real8 rjc = (double(j) + 0.5) / rat1 - 0.5;
+               real8 rkc = (double(k) + 0.5) / rat2 - 0.5;
+
+               int ic = (int)(ric + (ric >= 0 ? 0.5 : -0.5));        // a round operation
+               int jc = (int)(rjc + (rjc >= 0 ? 0.5 : -0.5));        // shift up and truncate if ic > 0
+               int kc = (int)(rkc + (rkc >= 0 ? 0.5 : -0.5));        // shift down and truncate if ic < 0
+
+               int chind =
+                  POLY3(ic, jc, kc, cimin, cjmin, ckmin, cnx, cnxny) + n * cnel;  // post + history offset
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+               TBOX_ASSERT(cimin <= ic && ic <= cimax);
+               TBOX_ASSERT(cjmin <= jc && jc <= cjmax);
+               TBOX_ASSERT(ckmin <= kc && kc <= ckmax);
+#endif
+
+               real8 fmass = fvolume[vol_ind];
+
+               cdata[chind] += fmass * fdata[fhind];  // sum of fine extensives now
+            }
+         }
+      }
+
+      //
+      // normalize the completed sum by converting back from extensive to intensive
+      //
+      for (int k = ifirstc(2); k <= ilastc(2); k++) {    // loop over the coarse zones
+         for (int j = ifirstc(1); j <= ilastc(1); j++) {
+            for (int i = ifirstc(0); i <= ilastc(0); i++) {
+
+               int vol_ind = POLY3(i, j, k, cimin, cjmin, ckmin, cnx, cnxny);
+               int chind = vol_ind + n * cnel;
+
+               real8 cmass = cvolume[vol_ind];
+
+               cdata[chind] /= cmass + 1.e-80;
+            }
+         }
+      }
+
+   }
+   tbox::plog << "--------------------- end postprocessCoarsen" << endl;
+}
+
+// -------------------------------------------------------------------
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Tag cells for refinement using gradient detector.  Tagging criteria   *
+ * defined in input.                                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+//
+// tag cells for refinement
+//
+void MblkLinAdv::tagGradientDetectorCells(
+   hier::Patch& patch,
+   const double regrid_time,
+   const bool initial_error,
+   const int tag_indx,
+   const bool uses_richardson_extrapolation_too)
+{
+   (void)regrid_time;
+   (void)uses_richardson_extrapolation_too;
+
+   NULL_USE(initial_error);
+
+   int block_number = getBlockNumber();
+   int level_number = patch.getPatchLevelNumber();
+   setMappedGridOnPatch(patch, level_number, block_number);
+
+   //
+   // get geometry data
+   //
+   const int error_level_number = patch.getPatchLevelNumber();
+
+   tbox::Pointer<pdat::NodeData<double> > xyz =
+      patch.getPatchData(d_xyz, getDataContext());
+   double* x = xyz->getPointer(0);
+   double* y = xyz->getPointer(1);
+   double* z = xyz->getPointer(2);
+
+   hier::Box pbox = patch.getBox();
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+   int level = patch.getPatchLevelNumber();
+
+   tbox::plog << "--------------------- start tagGradientCells (" << level
+              << ")" << endl;
+   tbox::plog << "level  = " << level << endl;
+   tbox::plog << "box    = " << patch.getBox() << endl;
+
+   tbox::Pointer<pdat::CellData<int> > tags =
+      patch.getPatchData(tag_indx);
+   tbox::Pointer<pdat::CellData<double> > var =
+      patch.getPatchData(d_uval, getDataContext());
+
+   //
+   // Create a set of temporary tags and set to untagged value.
+   //
+   tbox::Pointer<pdat::CellData<int> > temp_tags(
+      new pdat::CellData<int>(pbox, 1, d_nghosts));
+   temp_tags->fillAll(FALSE);
+
+   hier::IntVector tag_ghost = tags->getGhostCellWidth();
+
+   hier::IntVector nghost_cells = xyz->getGhostCellWidth();
+   int nd_imin = ifirst(0) - nghost_cells(0);
+   int nd_imax = ilast(0) + 1 + nghost_cells(0);
+   int nd_jmin = ifirst(1) - nghost_cells(1);
+   int nd_jmax = ilast(1) + 1 + nghost_cells(1);
+   int nd_kmin = ifirst(2) - nghost_cells(2);
+   //int nd_kmax = ilast(2)  + 1 + nghost_cells(2);
+   int nd_nx = nd_imax - nd_imin + 1;
+   int nd_ny = nd_jmax - nd_jmin + 1;
+   //int nd_nz   = nd_kmax - nd_kmin + 1;
+   int nd_nxny = nd_nx * nd_ny;
+   //int nd_nel  = nd_nx*nd_ny*nd_nz;
+
+   hier::IntVector v_ghost = var->getGhostCellWidth();     // has ghost zones
+   int imin = ifirst(0) - v_ghost(0); // the polynomial for the field
+   int imax = ilast(0) + v_ghost(0);
+   int jmin = ifirst(1) - v_ghost(1);
+   int jmax = ilast(1) + v_ghost(1);
+   int kmin = ifirst(2) - v_ghost(2);
+   //int kmax = ilast(2)  + v_ghost(2);
+   int nx = imax - imin + 1;
+   int ny = jmax - jmin + 1;
+   // int nz   = kmax - kmin + 1;
+   int nxny = nx * ny;
+   //int nel  = nx*ny*nz;
+
+   hier::IntVector temp_tag_ghost = temp_tags->getGhostCellWidth();
+   int imn = ifirst(0) - temp_tag_ghost(0);  // the polynomial for temp_tags
+   int imx = ilast(0) + temp_tag_ghost(0);
+   int jmn = ifirst(1) - temp_tag_ghost(1);
+   int jmx = ilast(1) + temp_tag_ghost(1);
+   int kmn = ifirst(2) - temp_tag_ghost(2);
+   //int kmx = ilast(2)  + temp_tag_ghost(2);
+   int tnx = imx - imn + 1;
+   int tny = jmx - jmn + 1;
+   //int tnz   = kmx - kmn + 1;
+   int tnxny = tnx * tny;
+   //int tnel  = tnx*tny*tnz;
+
+   double* lvar = var->getPointer();
+   int* ltags = temp_tags->getPointer();
+   double dv_x[3];
+   double dv_xi[3];
+   double xfact = 0.5;
+
+   //
+   // Possible tagging criteria includes
+   //    DENSITY_DEVIATION, DENSITY_GRADIENT, DENSITY_SHOCK
+   //    PRESSURE_DEVIATION, PRESSURE_GRADIENT, PRESSURE_SHOCK
+   // The criteria is specified over a time interval.
+   //
+   // Loop over criteria provided and check to make sure we are in the
+   // specified time interval.  If so, apply appropriate tagging for
+   // the level.
+   //
+   for (int ncrit = 0; ncrit < d_refinement_criteria.getSize(); ncrit++) {
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!var.isNull());
+#endif
+      string ref = d_refinement_criteria[ncrit];
+      int size = 0;
+      double tol = 0.;
+
+      if (ref == "UVAL_GRADIENT") {
+         size = d_grad_tol.getSize();  // max depth of gradient tolerance
+         tol = ((error_level_number < size)    // find the tolerance
+                ? d_grad_tol[error_level_number]
+                : d_grad_tol[size - 1]);
+
+         for (int k = ifirst(2); k <= ilast(2); k++) {
+            for (int j = ifirst(1); j <= ilast(1); j++) {
+               for (int i = ifirst(0); i <= ilast(0); i++) {
+
+                  int ind = POLY3(i, j, k, imin, jmin, kmin, nx, nxny);
+                  int tind = POLY3(i, j, k, imn, jmn, kmn, tnx, tnxny);
+
+                  int ib = ind - 1;
+                  int ie = ind + 1;
+                  int jb = ind - nx;
+                  int je = ind + nx;
+                  int kb = ind - nxny;
+                  int ke = ind + nxny;
+
+                  //
+                  // vector is now a max gradient in xi, eta, zeta
+                  //
+                  dv_xi[0] = xfact
+                     * MAX(fabs(lvar[ind] - lvar[ib]),
+                        fabs(lvar[ind] - lvar[ie]));
+                  dv_xi[1] = xfact
+                     * MAX(fabs(lvar[ind] - lvar[jb]),
+                        fabs(lvar[ind] - lvar[je]));
+                  dv_xi[2] = xfact
+                     * MAX(fabs(lvar[ind] - lvar[kb]),
+                        fabs(lvar[ind] - lvar[ke]));
+
+                  //
+                  // convert vector to max gradine in x, y, z
+                  //
+                  int n1 = POLY3(i,
+                        j,
+                        k,
+                        nd_imin,
+                        nd_jmin,
+                        nd_kmin,
+                        nd_nx,
+                        nd_nxny);                                               // -1, -1, -1
+                  int n2 = n1 + 1;                                              //  1, -1, -1
+                  int n3 = n1 + 1 + nd_nx;                                      //  1,  1, -1
+                  int n4 = n1 + nd_nx;                                          // -1,  1, -1
+
+                  int n5 = n1 + nd_nxny;                                        // -1, -1,  1
+                  int n6 = n1 + nd_nxny + 1;                                 //  1, -1,  1
+                  int n7 = n1 + nd_nxny + 1 + nd_nx;                         //  1,  1,  1
+                  int n8 = n1 + nd_nxny + nd_nx;                                     // -1,  1,  1
+
+                  // ------------------------------------------------ x
+
+                  real8 x1 = 0.25 * (x[n1] + x[n4] + x[n5] + x[n8]);  // xi
+                  real8 x2 = 0.25 * (x[n2] + x[n3] + x[n6] + x[n7]);
+
+                  real8 x3 = 0.25 * (x[n1] + x[n2] + x[n5] + x[n6]);  // eta
+                  real8 x4 = 0.25 * (x[n3] + x[n4] + x[n7] + x[n8]);
+
+                  real8 x5 = 0.25 * (x[n1] + x[n2] + x[n3] + x[n4]);  // zeta
+                  real8 x6 = 0.25 * (x[n5] + x[n6] + x[n7] + x[n8]);
+
+                  // ------------------------------------------------ y
+
+                  real8 y1 = 0.25 * (y[n1] + y[n4] + y[n5] + y[n8]);
+                  real8 y2 = 0.25 * (y[n2] + y[n3] + y[n6] + y[n7]);
+
+                  real8 y3 = 0.25 * (y[n1] + y[n2] + y[n5] + y[n6]);
+                  real8 y4 = 0.25 * (y[n3] + y[n4] + y[n7] + y[n8]);
+
+                  real8 y5 = 0.25 * (y[n1] + y[n2] + y[n3] + y[n4]);
+                  real8 y6 = 0.25 * (y[n5] + y[n6] + y[n7] + y[n8]);
+
+                  // ------------------------------------------------ z
+
+                  real8 z1 = 0.25 * (z[n1] + z[n4] + z[n5] + z[n8]);
+                  real8 z2 = 0.25 * (z[n2] + z[n3] + z[n6] + z[n7]);
+
+                  real8 z3 = 0.25 * (z[n1] + z[n2] + z[n5] + z[n6]);
+                  real8 z4 = 0.25 * (z[n3] + z[n4] + z[n7] + z[n8]);
+
+                  real8 z5 = 0.25 * (z[n1] + z[n2] + z[n3] + z[n4]);
+                  real8 z6 = 0.25 * (z[n5] + z[n6] + z[n7] + z[n8]);
+
+                  //
+                  // the components of the matrices that we want to invert
+                  //
+                  real8 dx_xi = 0.5 * (x2 - x1);
+                  real8 dy_xi = 0.5 * (y2 - y1);
+                  real8 dz_xi = 0.5 * (z2 - z1);
+
+                  real8 dx_eta = 0.5 * (x4 - x3);
+                  real8 dy_eta = 0.5 * (y4 - y3);
+                  real8 dz_eta = 0.5 * (z4 - z3);
+
+                  real8 dx_zeta = 0.5 * (x6 - x5);
+                  real8 dy_zeta = 0.5 * (y6 - y5);
+                  real8 dz_zeta = 0.5 * (z6 - z5);
+
+                  //
+                  // invert dx/dxi as in dx/dxi d/dx = d/dxi, note this
+                  // is the transpose of the above matrix M, also via
+                  // Kramer's rule
+                  //
+                  real8 detMt = (dx_xi * dy_eta * dz_zeta
+                                 + dx_eta * dy_zeta * dz_xi
+                                 + dx_zeta * dy_xi * dz_eta
+                                 - dx_zeta * dy_eta * dz_xi
+                                 - dx_eta * dy_xi * dz_zeta
+                                 - dx_xi * dy_zeta * dz_eta);
+
+                  real8 detC11 = dy_eta * dz_zeta - dz_eta * dy_zeta;
+                  real8 detC21 = dx_eta * dz_zeta - dz_eta * dx_zeta;
+                  real8 detC31 = dx_eta * dy_zeta - dy_eta * dx_zeta;
+
+                  real8 detC12 = dy_xi * dz_zeta - dz_xi * dy_zeta;
+                  real8 detC22 = dx_xi * dz_zeta - dz_xi * dx_zeta;
+                  real8 detC32 = dx_xi * dy_zeta - dy_xi * dx_zeta;
+
+                  real8 detC13 = dy_xi * dz_eta - dz_xi * dy_eta;
+                  real8 detC23 = dx_xi * dz_eta - dz_xi * dx_eta;
+                  real8 detC33 = dx_xi * dy_eta - dy_xi + dx_eta;
+
+                  // -------------------
+
+                  real8 b11 = detC11 / detMt;
+                  real8 b21 = detC21 / detMt;
+                  real8 b31 = detC31 / detMt;
+
+                  real8 b12 = detC12 / detMt;
+                  real8 b22 = detC22 / detMt;
+                  real8 b32 = detC32 / detMt;
+
+                  real8 b13 = detC13 / detMt;
+                  real8 b23 = detC23 / detMt;
+                  real8 b33 = detC33 / detMt;
+
+                  //
+                  // determine the maximum gradient in x, y and z (nice orthonormal basis)
+                  //
+                  dv_x[0] = b11 * dv_xi[0] + b12 * dv_xi[1] + b13 * dv_xi[2];
+                  dv_x[1] = b21 * dv_xi[0] + b22 * dv_xi[1] + b23 * dv_xi[2];
+                  dv_x[2] = b31 * dv_xi[0] + b32 * dv_xi[1] + b33 * dv_xi[2];
+
+                  double vmax = MAX(dv_x[0], MAX(dv_x[1], dv_x[2]));
+
+                  if (vmax > tol)
+                     ltags[tind] = TRUE;
+               }
+            }
+         }
+
+      } // criteria = UVAL_GRADIENT
+
+      if (ref == "USER_DEFINED") {
+
+         /*
+          * For user-defined, access refine box data from the MblkGeometry
+          * class.
+          */
+         int level_number = patch.getPatchLevelNumber();
+         int block_number = getBlockNumber();
+         hier::BoxArray refine_boxes(d_dim, 1);
+         if (d_mblk_geometry->getRefineBoxes(refine_boxes,
+                block_number,
+                level_number)) {
+            for (int b = 0; b < refine_boxes.getNumberOfBoxes(); b++) {
+               hier::Box intersect = pbox * refine_boxes[b];
+               if (!intersect.empty()) {
+                  temp_tags->fill(TRUE, intersect);
+               }
+            }
+         }
+
+      } // criteria = USER_DEFINED
+
+   }  // loop over criteria
+
+   //
+   // Update tags
+   //
+   for (pdat::CellIterator ic(pbox); ic; ic++) {
+      (*tags)(ic(), 0) = (*temp_tags)(ic(), 0);
+   }
+
+   tbox::plog << "--------------------- end tagGradientCells" << endl;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Fill the singularity conditions for the multi-block case
+ *                                                                       *
+ *************************************************************************
+ */
+void MblkLinAdv::fillSingularityBoundaryConditions(
+   hier::Patch& patch,
+   tbox::List<tbox::Pointer<hier::Patch> >& sing_patches,
+   const double fill_time,
+   const hier::Box& fill_box,
+   const hier::BoundaryBox& bbox)
+{
+
+   NULL_USE(patch);
+   NULL_USE(sing_patches);
+   NULL_USE(fill_time);
+   NULL_USE(fill_box);
+   NULL_USE(bbox);
+
+   /*
+    * Here we need to specify how to fill the singularities...
+    */
+#if 0
+   for (int i = 0; i < d_variables.getSize(); i++) {
+
+      tbox::Pointer<pdat::CellData<double> > cell_data =
+         patch.getPatchData(d_variables[i], getDataContext());
+
+      hier::Box sing_fill_box(cell_data->getGhostBox() * fill_box);
+      cell_data->fillAll(0.0, sing_fill_box);
+
+      int depth = cell_data->getDepth();
+
+      /*
+       * If sing_patches is not empty, that means there is enhanced
+       * connectivity, and we get data from other blocks
+       */
+
+      if (sing_patches.size()) {
+
+         for (tbox::List
+              <xfer::MultiblockRefineSchedule::SingularityPatch>::
+              Iterator sp(sing_patches); sp; sp++) {
+            tbox::Pointer<pdat::CellData<double> > sing_data =
+               sp().d_patch->getPatchData(d_variables[i], getDataContext());
+            int sing_neighbor_id = sp().getBlockNumber();
+            for (pdat::CellIterator ci(sing_fill_box); ci; ci++) {
+               for (int d = 0; d < depth; d++) {
+                  (*cell_data)(ci(), d) += sing_neighbor_id;
+               }
+            }
+         }
+
+         for (pdat::CellIterator ci(sing_fill_box); ci; ci++) {
+            for (int d = 0; d < depth; d++) {
+               (*cell_data)(ci(), d) /= sing_patches.size();
+            }
+         }
+
+         /*
+          * In cases of reduced connectivity, there are no other blocks
+          * from which to acquire data.
+          */
+
+      } else {
+
+         cell_data->fillAll(
+            (double)bbox.getLocationIndex() + 200.0, fill_box);
+
+      }
+   }
+#endif
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Private method to build XYZ coordinates on a patch                    *
+ *                                                                       *
+ *************************************************************************
+ */
+void MblkLinAdv::setMappedGridOnPatch(
+   const hier::Patch& patch,
+   const int level_number,
+   const int block_number)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(level_number >= 0);
+#endif
+
+   // compute level domain
+   const tbox::Pointer<hier::BlockPatchGeometry>
+   patch_geom = patch.getPatchGeometry();
+   hier::IntVector ratio = patch_geom->getRatio();
+   hier::BoxArray domain_boxes(d_dim);
+   d_grid_geometries[block_number]->computePhysicalDomain(domain_boxes, ratio);
+   int num_domain_boxes = domain_boxes.getNumberOfBoxes();
+
+   if (num_domain_boxes > 1) {
+      TBOX_ERROR("Sorry, cannot handle non-rectangular domains..." << endl);
+   }
+
+   int xyz_id = hier::VariableDatabase::getDatabase()->
+      mapVariableAndContextToIndex(d_xyz, getDataContext());
+
+   d_mblk_geometry->buildGridOnPatch(patch,
+      domain_boxes[0],
+      xyz_id,
+      level_number,
+      block_number);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register VisIt data writer to write data to plot files that may       *
+ * be postprocessed by the VisIt tool.                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+#ifdef HAVE_HDF5
+void MblkLinAdv::registerVisItDataWriter(
+   tbox::Pointer<appu::VisItDataWriter> viz_writer)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(viz_writer.isNull()));
+#endif
+   d_visit_writer = viz_writer;
+}
+#endif
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Write MblkLinAdv object state to specified stream.                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkLinAdv::printClassData(
+   ostream& os) const
+{
+   int j, k;
+
+   os << "\nMblkLinAdv::printClassData..." << endl;
+   os << "MblkLinAdv: this = " << (MblkLinAdv *)this << endl;
+   os << "d_object_name = " << d_object_name << endl;
+   os << "d_grid_geometries = " << endl;
+//   for (j=0; j < d_grid_geometries.getSize(); j++) {
+//      os << (*((tbox::Pointer<geom::BlockGridGeometry >)(d_grid_geometries[j]))) << endl;
+//   }
+
+   os << "Parameters for numerical method ..." << endl;
+   os << "   d_advection_velocity = ";
+   for (j = 0; j < d_dim.getValue(); j++) os << d_advection_velocity[j] << " ";
+   os << endl;
+   os << "   d_godunov_order = " << d_godunov_order << endl;
+   os << "   d_corner_transport = " << d_corner_transport << endl;
+   os << "   d_nghosts = " << d_nghosts << endl;
+   os << "   d_fluxghosts = " << d_fluxghosts << endl;
+
+   os << "Problem description and initial data..." << endl;
+   os << "   d_data_problem = " << d_data_problem << endl;
+   os << "   d_data_problem_int = " << d_data_problem << endl;
+
+   os << "       d_radius = " << d_radius << endl;
+   os << "       d_center = ";
+   for (j = 0; j < d_dim.getValue(); j++) os << d_center[j] << " ";
+   os << endl;
+   os << "       d_uval_inside = " << d_uval_inside << endl;
+   os << "       d_uval_outside = " << d_uval_outside << endl;
+
+   os << "       d_number_of_intervals = " << d_number_of_intervals << endl;
+   os << "       d_front_position = ";
+   for (k = 0; k < d_number_of_intervals - 1; k++) {
+      os << d_front_position[k] << "  ";
+   }
+   os << endl;
+   os << "       d_interval_uval = " << endl;
+   for (k = 0; k < d_number_of_intervals; k++) {
+      os << "            " << d_interval_uval[k] << endl;
+   }
+   os << "   Boundary condition data " << endl;
+
+   if (d_dim == tbox::Dimension(2)) {
+      for (j = 0; j < d_scalar_bdry_edge_conds.getSize(); j++) {
+         os << "       d_scalar_bdry_edge_conds[" << j << "] = "
+         << d_scalar_bdry_edge_conds[j] << endl;
+         if (d_scalar_bdry_edge_conds[j] == DIRICHLET_BC) {
+            os << "         d_bdry_edge_uval[" << j << "] = "
+            << d_bdry_edge_uval[j] << endl;
+         }
+      }
+      os << endl;
+      for (j = 0; j < d_scalar_bdry_node_conds.getSize(); j++) {
+         os << "       d_scalar_bdry_node_conds[" << j << "] = "
+         << d_scalar_bdry_node_conds[j] << endl;
+         os << "       d_node_bdry_edge[" << j << "] = "
+         << d_node_bdry_edge[j] << endl;
+      }
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      for (j = 0; j < d_scalar_bdry_face_conds.getSize(); j++) {
+         os << "       d_scalar_bdry_face_conds[" << j << "] = "
+         << d_scalar_bdry_face_conds[j] << endl;
+         if (d_scalar_bdry_face_conds[j] == DIRICHLET_BC) {
+            os << "         d_bdry_face_uval[" << j << "] = "
+            << d_bdry_face_uval[j] << endl;
+         }
+      }
+      os << endl;
+      for (j = 0; j < d_scalar_bdry_edge_conds.getSize(); j++) {
+         os << "       d_scalar_bdry_edge_conds[" << j << "] = "
+         << d_scalar_bdry_edge_conds[j] << endl;
+         os << "       d_edge_bdry_face[" << j << "] = "
+         << d_edge_bdry_face[j] << endl;
+      }
+      os << endl;
+      for (j = 0; j < d_scalar_bdry_node_conds.getSize(); j++) {
+         os << "       d_scalar_bdry_node_conds[" << j << "] = "
+         << d_scalar_bdry_node_conds[j] << endl;
+         os << "       d_node_bdry_face[" << j << "] = "
+         << d_node_bdry_face[j] << endl;
+      }
+   }
+
+   os << "   Refinement criteria parameters " << endl;
+
+   for (j = 0; j < d_refinement_criteria.getSize(); j++) {
+      os << "       d_refinement_criteria[" << j << "] = "
+      << d_refinement_criteria[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_dev_tol.getSize(); j++) {
+      os << "       d_dev_tol[" << j << "] = "
+      << d_dev_tol[j] << endl;
+   }
+   for (j = 0; j < d_dev.getSize(); j++) {
+      os << "       d_dev[" << j << "] = "
+      << d_dev[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_dev_time_max.getSize(); j++) {
+      os << "       d_dev_time_max[" << j << "] = "
+      << d_dev_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_dev_time_min.getSize(); j++) {
+      os << "       d_dev_time_min[" << j << "] = "
+      << d_dev_time_min[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_grad_tol.getSize(); j++) {
+      os << "       d_grad_tol[" << j << "] = "
+      << d_grad_tol[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_grad_time_max.getSize(); j++) {
+      os << "       d_grad_time_max[" << j << "] = "
+      << d_grad_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_grad_time_min.getSize(); j++) {
+      os << "       d_grad_time_min[" << j << "] = "
+      << d_grad_time_min[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_shock_onset.getSize(); j++) {
+      os << "       d_shock_onset[" << j << "] = "
+      << d_shock_onset[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_shock_tol.getSize(); j++) {
+      os << "       d_shock_tol[" << j << "] = "
+      << d_shock_tol[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_shock_time_max.getSize(); j++) {
+      os << "       d_shock_time_max[" << j << "] = "
+      << d_shock_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_shock_time_min.getSize(); j++) {
+      os << "       d_shock_time_min[" << j << "] = "
+      << d_shock_time_min[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_rich_tol.getSize(); j++) {
+      os << "       d_rich_tol[" << j << "] = "
+      << d_rich_tol[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_rich_time_max.getSize(); j++) {
+      os << "       d_rich_time_max[" << j << "] = "
+      << d_rich_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_rich_time_min.getSize(); j++) {
+      os << "       d_rich_time_min[" << j << "] = "
+      << d_rich_time_min[j] << endl;
+   }
+   os << endl;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Read data members from input.  All values set from restart can be	*
+ * overridden by values in the input database.
+ *                                                                       *
+ *************************************************************************
+ */
+void MblkLinAdv::getFromInput(
+   tbox::Pointer<tbox::Database> input_db,
+   bool is_from_restart)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!input_db.isNull());
+#endif
+
+   tbox::Pointer<tbox::Database> db = input_db->getDatabase("MblkLinAdv");
+
+   /*
+    * Note: if we are restarting, then we only allow nonuniform
+    * workload to be used if nonuniform workload was used originally.
+    */
+   if (!is_from_restart) {
+      d_use_nonuniform_workload =
+         db->getBoolWithDefault("use_nonuniform_workload",
+            d_use_nonuniform_workload);
+   } else {
+      if (d_use_nonuniform_workload) {
+         d_use_nonuniform_workload =
+            db->getBool("use_nonuniform_workload");
+      }
+   }
+
+   if (db->keyExists("advection_velocity")) {
+      db->getDoubleArray("advection_velocity",
+         d_advection_velocity, d_dim.getValue());
+   } else {
+      TBOX_ERROR(
+         d_object_name << ":  "
+         <<
+         "Key data `advection_velocity' not found in input.");
+   }
+
+   if (db->keyExists("godunov_order")) {
+      d_godunov_order = db->getInteger("godunov_order");
+      if ((d_godunov_order != 1) &&
+          (d_godunov_order != 2) &&
+          (d_godunov_order != 4)) {
+         TBOX_ERROR(
+            d_object_name << ": "
+            <<
+            "`godunov_order' in input must be 1, 2, or 4." << endl);
+      }
+   } else {
+      d_godunov_order = db->getIntegerWithDefault("d_godunov_order",
+            d_godunov_order);
+   }
+
+   if (db->keyExists("corner_transport")) {
+      d_corner_transport = db->getString("corner_transport");
+      if ((d_corner_transport != "CORNER_TRANSPORT_1") &&
+          (d_corner_transport != "CORNER_TRANSPORT_2")) {
+         TBOX_ERROR(
+            d_object_name << ": "
+            <<
+            "`corner_transport' in input must be either string"
+            <<
+            " 'CORNER_TRANSPORT_1' or 'CORNER_TRANSPORT_2'." << endl);
+      }
+   } else {
+      d_corner_transport = db->getStringWithDefault("corner_transport",
+            d_corner_transport);
+   }
+
+   if (db->keyExists("Refinement_data")) {
+      tbox::Pointer<tbox::Database> refine_db = db->getDatabase(
+            "Refinement_data");
+      tbox::Array<string> refinement_keys = refine_db->getAllKeys();
+      int num_keys = refinement_keys.getSize();
+
+      if (refine_db->keyExists("refine_criteria")) {
+         d_refinement_criteria =
+            refine_db->getStringArray("refine_criteria");
+      } else {
+         TBOX_WARNING(
+            d_object_name << ": "
+            <<
+            "No key `refine_criteria' found in data for"
+            <<
+            " RefinementData. No refinement will occur." << endl);
+      }
+
+      tbox::Array<string> ref_keys_defined(num_keys);
+      int def_key_cnt = 0;
+      tbox::Pointer<tbox::Database> error_db;
+      for (int i = 0; i < refinement_keys.getSize(); i++) {
+
+         string error_key = refinement_keys[i];
+         error_db.setNull();
+
+         if (!(error_key == "refine_criteria")) {
+
+            if (!(error_key == "UVAL_DEVIATION" ||
+                  error_key == "UVAL_GRADIENT" ||
+                  error_key == "UVAL_SHOCK" ||
+                  error_key == "UVAL_RICHARDSON")) {
+               TBOX_ERROR(
+                  d_object_name << ": "
+                  << "Unknown refinement criteria: "
+                  << error_key
+                  << "\nin input." << endl);
+            } else {
+               error_db = refine_db->getDatabase(error_key);
+               ref_keys_defined[def_key_cnt] = error_key;
+               def_key_cnt++;
+            }
+
+            if (!error_db.isNull() && error_key == "UVAL_DEVIATION") {
+
+               if (error_db->keyExists("dev_tol")) {
+                  d_dev_tol =
+                     error_db->getDoubleArray("dev_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `dev_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("uval_dev")) {
+                  d_dev =
+                     error_db->getDoubleArray("uval_dev");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `uval_dev' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_dev_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_dev_time_max.resizeArray(1);
+                  d_dev_time_max[0] = tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_dev_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_dev_time_min.resizeArray(1);
+                  d_dev_time_min[0] = 0.;
+               }
+
+            }
+
+            if (!error_db.isNull() && error_key == "UVAL_GRADIENT") {
+
+               if (error_db->keyExists("grad_tol")) {
+                  d_grad_tol =
+                     error_db->getDoubleArray("grad_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `grad_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_grad_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_grad_time_max.resizeArray(1);
+                  d_grad_time_max[0] = tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_grad_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_grad_time_min.resizeArray(1);
+                  d_grad_time_min[0] = 0.;
+               }
+
+            }
+
+            if (!error_db.isNull() && error_key == "UVAL_SHOCK") {
+
+               if (error_db->keyExists("shock_onset")) {
+                  d_shock_onset =
+                     error_db->getDoubleArray("shock_onset");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `shock_onset' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("shock_tol")) {
+                  d_shock_tol =
+                     error_db->getDoubleArray("shock_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `shock_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_shock_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_shock_time_max.resizeArray(1);
+                  d_shock_time_max[0] = tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_shock_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_shock_time_min.resizeArray(1);
+                  d_shock_time_min[0] = 0.;
+               }
+
+            }
+
+            if (!error_db.isNull() && error_key == "UVAL_RICHARDSON") {
+
+               if (error_db->keyExists("rich_tol")) {
+                  d_rich_tol =
+                     error_db->getDoubleArray("rich_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `rich_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_rich_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_rich_time_max.resizeArray(1);
+                  d_rich_time_max[0] = tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_rich_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_rich_time_min.resizeArray(1);
+                  d_rich_time_min[0] = 0.;
+               }
+
+            }
+
+         }
+
+      } // loop over refine criteria
+
+   } // refine db entry exists
+
+   if (!is_from_restart) {
+
+      if (db->keyExists("data_problem")) {
+         d_data_problem = db->getString("data_problem");
+      } else {
+         TBOX_ERROR(
+            d_object_name << ": "
+            << "`data_problem' value not found in input."
+            << endl);
+      }
+
+      tbox::Pointer<tbox::Database> init_data_db;
+      if (db->keyExists("Initial_data")) {
+         init_data_db = db->getDatabase("Initial_data");
+      } else {
+         TBOX_ERROR(
+            d_object_name << ": "
+            <<
+            "No `Initial_data' database found in input." << endl);
+      }
+
+      bool found_problem_data = false;
+
+      if (d_data_problem == "SPHERE") {
+
+         if (init_data_db->keyExists("radius")) {
+            d_radius = init_data_db->getDouble("radius");
+         } else {
+            TBOX_ERROR(
+               d_object_name << ": "
+               <<
+               "`radius' input required for SPHERE problem." << endl);
+         }
+         if (init_data_db->keyExists("center")) {
+            init_data_db->getDoubleArray("center", d_center, d_dim.getValue());
+         } else {
+            TBOX_ERROR(
+               d_object_name << ": "
+               <<
+               "`center' input required for SPHERE problem." << endl);
+         }
+         if (init_data_db->keyExists("uval_inside")) {
+            d_uval_inside = init_data_db->getDouble("uval_inside");
+         } else {
+            TBOX_ERROR(d_object_name << ": "
+                                     << "`uval_inside' input required for "
+                                     << "SPHERE problem." << endl);
+         }
+         if (init_data_db->keyExists("uval_outside")) {
+            d_uval_outside = init_data_db->getDouble("uval_outside");
+         } else {
+            TBOX_ERROR(d_object_name << ": "
+                                     << "`uval_outside' input required for "
+                                     << "SPHERE problem." << endl);
+         }
+
+         found_problem_data = true;
+
+      }
+
+      if (!found_problem_data && (
+             (d_data_problem == "PIECEWISE_CONSTANT_X") ||
+             (d_data_problem == "PIECEWISE_CONSTANT_Y") ||
+             (d_data_problem == "PIECEWISE_CONSTANT_Z") ||
+             (d_data_problem == "SINE_CONSTANT_X") ||
+             (d_data_problem == "SINE_CONSTANT_Y") ||
+             (d_data_problem == "SINE_CONSTANT_Z"))) {
+
+         int idir = 0;
+         if (d_data_problem == "PIECEWISE_CONSTANT_Y") {
+            if (d_dim < tbox::Dimension(2)) {
+               TBOX_ERROR(
+                  d_object_name << ": `PIECEWISE_CONSTANT_Y' "
+                  << "problem invalid in 1 dimension."
+                  << endl);
+            }
+            idir = 1;
+         }
+
+         if (d_data_problem == "PIECEWISE_CONSTANT_Z") {
+            if (d_dim < tbox::Dimension(3)) {
+               TBOX_ERROR(
+                  d_object_name << ": `PIECEWISE_CONSTANT_Z' "
+                  <<
+                  "problem invalid in 1 or 2 dimensions." << endl);
+            }
+            idir = 2;
+         }
+
+         tbox::Array<string> init_data_keys = init_data_db->getAllKeys();
+
+         if (init_data_db->keyExists("front_position")) {
+            d_front_position = init_data_db->getDoubleArray("front_position");
+         } else {
+            TBOX_ERROR(d_object_name << ": "
+                                     << "`front_position' input required for "
+                                     << d_data_problem << " problem." << endl);
+         }
+
+         d_number_of_intervals =
+            tbox::MathUtilities<int>::Min(d_front_position.getSize() + 1,
+               init_data_keys.getSize() - 1);
+
+         d_interval_uval.resizeArray(d_number_of_intervals);
+
+         int i = 0;
+         int nkey = 0;
+         bool found_interval_data = false;
+
+         while (!found_interval_data
+                && (i < d_number_of_intervals)
+                && (nkey < init_data_keys.getSize())) {
+
+            if (!(init_data_keys[nkey] == "front_position")) {
+
+               tbox::Pointer<tbox::Database> interval_db =
+                  init_data_db->getDatabase(init_data_keys[nkey]);
+
+               if (interval_db->keyExists("uval")) {
+                  d_interval_uval[i] = interval_db->getDouble("uval");
+               } else {
+                  TBOX_ERROR(d_object_name << ": "
+                     << "`uval' data missing in input for key = "
+                     << init_data_keys[nkey] << endl);
+               }
+               i++;
+
+               found_interval_data = (i == d_number_of_intervals);
+
+            }
+
+            nkey++;
+
+         }
+
+         if ((d_data_problem == "SINE_CONSTANT_X") ||
+             (d_data_problem == "SINE_CONSTANT_Y") ||
+             (d_data_problem == "SINE_CONSTANT_Z")) {
+            if (init_data_db->keyExists("amplitude")) {
+               d_amplitude = init_data_db->getDouble("amplitude");
+            }
+            if (init_data_db->keyExists("frequency")) {
+               init_data_db->getDoubleArray("frequency", d_frequency, d_dim.getValue());
+            } else {
+               TBOX_ERROR(
+                  d_object_name << ": "
+                  <<
+                  "`frequency' input required for SINE problem." << endl);
+            }
+         }
+
+         if (!found_interval_data) {
+            TBOX_ERROR(
+               d_object_name << ": "
+               <<
+               "Insufficient interval data given in input"
+               << " for PIECEWISE_CONSTANT_*problem."
+               << endl);
+         }
+
+         found_problem_data = true;
+      }
+
+      if (!found_problem_data) {
+         TBOX_ERROR(d_object_name << ": "
+                                  << "`Initial_data' database found in input."
+                                  << " But bad data supplied." << endl);
+      }
+
+   } // if !is_from_restart read in problem data
+
+   hier::IntVector periodic = d_grid_geometries[0]->getPeriodicShift(
+         hier::IntVector(d_dim, 1));
+   int num_per_dirs = 0;
+   for (int id = 0; id < d_dim.getValue(); id++) {
+      if (periodic(id)) num_per_dirs++;
+   }
+
+   /*
+    * If there are multiple blocks, periodicity is not currently supported.
+    */
+   if ((d_grid_geometries.getSize() > 1) && (num_per_dirs > 0)) {
+      TBOX_ERROR(d_object_name << ": cannot have periodic BCs when there"
+                               << "\nare multiple blocks." << endl);
+   }
+
+   if (db->keyExists("Boundary_data")) {
+
+      tbox::Pointer<tbox::Database> bdry_db = db->getDatabase("Boundary_data");
+
+      if (d_dim == tbox::Dimension(2)) {
+         SkeletonBoundaryUtilities2::readBoundaryInput(this,
+            bdry_db,
+            d_scalar_bdry_edge_conds,
+            d_scalar_bdry_node_conds,
+            periodic);
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         SkeletonBoundaryUtilities3::readBoundaryInput(this,
+            bdry_db,
+            d_scalar_bdry_face_conds,
+            d_scalar_bdry_edge_conds,
+            d_scalar_bdry_node_conds,
+            periodic);
+      }
+
+   } else {
+      TBOX_ERROR(
+         d_object_name << ": "
+         <<
+         "Key data `Boundary_data' not found in input. " << endl);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to put/get data members to/from restart database.            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkLinAdv::putToDatabase(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   db->putInteger("MBLKLINADV_VERSION", MBLKLINADV_VERSION);
+
+   db->putDoubleArray("d_advection_velocity", d_advection_velocity, d_dim.getValue());
+
+   db->putInteger("d_godunov_order", d_godunov_order);
+   db->putString("d_corner_transport", d_corner_transport);
+   db->putIntegerArray("d_nghosts", &d_nghosts[0], d_dim.getValue());
+   db->putIntegerArray("d_fluxghosts", &d_fluxghosts[0], d_dim.getValue());
+
+   db->putString("d_data_problem", d_data_problem);
+
+   if (d_data_problem == "SPHERE") {
+      db->putDouble("d_radius", d_radius);
+      db->putDoubleArray("d_center", d_center, d_dim.getValue());
+      db->putDouble("d_uval_inside", d_uval_inside);
+      db->putDouble("d_uval_outside", d_uval_outside);
+   }
+
+   if ((d_data_problem == "PIECEWISE_CONSTANT_X") ||
+       (d_data_problem == "PIECEWISE_CONSTANT_Y") ||
+       (d_data_problem == "PIECEWISE_CONSTANT_Z") ||
+       (d_data_problem == "SINE_CONSTANT_X") ||
+       (d_data_problem == "SINE_CONSTANT_Y") ||
+       (d_data_problem == "SINE_CONSTANT_Z")) {
+      db->putInteger("d_number_of_intervals", d_number_of_intervals);
+      if (d_number_of_intervals > 0) {
+         db->putDoubleArray("d_front_position", d_front_position);
+         db->putDoubleArray("d_interval_uval", d_interval_uval);
+      }
+   }
+
+   db->putIntegerArray("d_scalar_bdry_edge_conds", d_scalar_bdry_edge_conds);
+   db->putIntegerArray("d_scalar_bdry_node_conds", d_scalar_bdry_node_conds);
+
+   db->putDoubleArray("d_bdry_edge_uval", d_bdry_edge_uval);
+   db->putIntegerArray("d_scalar_bdry_face_conds", d_scalar_bdry_face_conds);
+   db->putDoubleArray("d_bdry_face_uval", d_bdry_face_uval);
+
+   if (d_refinement_criteria.getSize() > 0) {
+      db->putStringArray("d_refinement_criteria", d_refinement_criteria);
+   }
+   for (int i = 0; i < d_refinement_criteria.getSize(); i++) {
+
+      if (d_refinement_criteria[i] == "UVAL_DEVIATION") {
+         db->putDoubleArray("d_dev_tol", d_dev_tol);
+         db->putDoubleArray("d_dev", d_dev);
+         db->putDoubleArray("d_dev_time_max", d_dev_time_max);
+         db->putDoubleArray("d_dev_time_min", d_dev_time_min);
+      } else if (d_refinement_criteria[i] == "UVAL_GRADIENT") {
+         db->putDoubleArray("d_grad_tol", d_grad_tol);
+         db->putDoubleArray("d_grad_time_max", d_grad_time_max);
+         db->putDoubleArray("d_grad_time_min", d_grad_time_min);
+      } else if (d_refinement_criteria[i] == "UVAL_SHOCK") {
+         db->putDoubleArray("d_shock_onset", d_shock_onset);
+         db->putDoubleArray("d_shock_tol", d_shock_tol);
+         db->putDoubleArray("d_shock_time_max", d_shock_time_max);
+         db->putDoubleArray("d_shock_time_min", d_shock_time_min);
+      } else if (d_refinement_criteria[i] == "UVAL_RICHARDSON") {
+         db->putDoubleArray("d_rich_tol", d_rich_tol);
+         db->putDoubleArray("d_rich_time_max", d_rich_time_max);
+         db->putDoubleArray("d_rich_time_min", d_rich_time_min);
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ *    Access class information from restart database.                    *
+ *                                                                       *
+ *************************************************************************
+ */
+void MblkLinAdv::getFromRestart()
+{
+   tbox::Pointer<tbox::Database> root_db =
+      tbox::RestartManager::getManager()->getRootDatabase();
+
+   tbox::Pointer<tbox::Database> db;
+   if (root_db->isDatabase(d_object_name)) {
+      db = root_db->getDatabase(d_object_name);
+   } else {
+      TBOX_ERROR("Restart database corresponding to "
+         << d_object_name << " not found in restart file.");
+   }
+
+   int ver = db->getInteger("MBLKLINADV_VERSION");
+   if (ver != MBLKLINADV_VERSION) {
+      TBOX_ERROR(
+         d_object_name << ":  "
+         <<
+         "Restart file version different than class version.");
+   }
+
+   db->getDoubleArray("d_advection_velocity", d_advection_velocity, d_dim.getValue());
+
+   d_godunov_order = db->getInteger("d_godunov_order");
+   d_corner_transport = db->getString("d_corner_transport");
+
+#if 0
+   int* tmp_nghosts = d_nghosts;
+   db->getIntegerArray("d_nghosts", tmp_nghosts, d_dim);
+   if (!(d_nghosts == CELLG)) {
+      TBOX_ERROR(
+         d_object_name << ": "
+         <<
+         "Key data `d_nghosts' in restart file != CELLG." << endl);
+   }
+   int* tmp_fluxghosts = d_fluxghosts;
+   db->getIntegerArray("d_fluxghosts", tmp_fluxghosts, d_dim);
+   if (!(d_fluxghosts == FLUXG)) {
+      TBOX_ERROR(
+         d_object_name << ": "
+         <<
+         "Key data `d_fluxghosts' in restart file != FLUXG." << endl);
+   }
+#endif
+
+   d_data_problem = db->getString("d_data_problem");
+
+   if (d_data_problem == "SPHERE") {
+      d_data_problem_int = SPHERE;
+      d_radius = db->getDouble("d_radius");
+      db->getDoubleArray("d_center", d_center, d_dim.getValue());
+      d_uval_inside = db->getDouble("d_uval_inside");
+      d_uval_outside = db->getDouble("d_uval_outside");
+   }
+
+   if ((d_data_problem == "PIECEWISE_CONSTANT_X") ||
+       (d_data_problem == "PIECEWISE_CONSTANT_Y") ||
+       (d_data_problem == "PIECEWISE_CONSTANT_Z") ||
+       (d_data_problem == "SINE_CONSTANT_X") ||
+       (d_data_problem == "SINE_CONSTANT_Y") ||
+       (d_data_problem == "SINE_CONSTANT_Z")) {
+      d_number_of_intervals = db->getInteger("d_number_of_intervals");
+      if (d_number_of_intervals > 0) {
+         d_front_position = db->getDoubleArray("d_front_position");
+         d_interval_uval = db->getDoubleArray("d_interval_uval");
+      }
+   }
+
+   d_scalar_bdry_edge_conds = db->getIntegerArray("d_scalar_bdry_edge_conds");
+   d_scalar_bdry_node_conds = db->getIntegerArray("d_scalar_bdry_node_conds");
+
+   if (d_dim == tbox::Dimension(2)) {
+      d_bdry_edge_uval = db->getDoubleArray("d_bdry_edge_uval");
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      d_scalar_bdry_face_conds = db->getIntegerArray("d_scalar_bdry_face_conds");
+
+      d_bdry_face_uval = db->getDoubleArray("d_bdry_face_uval");
+   }
+
+   if (db->keyExists("d_refinement_criteria")) {
+      d_refinement_criteria = db->getStringArray("d_refinement_criteria");
+   }
+   for (int i = 0; i < d_refinement_criteria.getSize(); i++) {
+
+      if (d_refinement_criteria[i] == "UVAL_DEVIATION") {
+         d_dev_tol = db->getDoubleArray("d_dev_tol");
+         d_dev_time_max = db->getDoubleArray("d_dev_time_max");
+         d_dev_time_min = db->getDoubleArray("d_dev_time_min");
+      } else if (d_refinement_criteria[i] == "UVAL_GRADIENT") {
+         d_grad_tol = db->getDoubleArray("d_grad_tol");
+         d_grad_time_max = db->getDoubleArray("d_grad_time_max");
+         d_grad_time_min = db->getDoubleArray("d_grad_time_min");
+      } else if (d_refinement_criteria[i] == "UVAL_SHOCK") {
+         d_shock_onset = db->getDoubleArray("d_shock_onset");
+         d_shock_tol = db->getDoubleArray("d_shock_tol");
+         d_shock_time_max = db->getDoubleArray("d_shock_time_max");
+         d_shock_time_min = db->getDoubleArray("d_shock_time_min");
+      } else if (d_refinement_criteria[i] == "UVAL_RICHARDSON") {
+         d_rich_tol = db->getDoubleArray("d_rich_tol");
+         d_rich_time_max = db->getDoubleArray("d_rich_time_max");
+         d_rich_time_min = db->getDoubleArray("d_rich_time_min");
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to read boundary data from input database.                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkLinAdv::readDirichletBoundaryDataEntry(
+   tbox::Pointer<tbox::Database> db,
+   string& db_name,
+   int bdry_location_index)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+   TBOX_ASSERT(!db_name.empty());
+#endif
+   if (d_dim == tbox::Dimension(2)) {
+      readStateDataEntry(db,
+         db_name,
+         bdry_location_index,
+         d_bdry_edge_uval);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      readStateDataEntry(db,
+         db_name,
+         bdry_location_index,
+         d_bdry_face_uval);
+   }
+}
+
+void MblkLinAdv::readStateDataEntry(
+   tbox::Pointer<tbox::Database> db,
+   const string& db_name,
+   int array_indx,
+   tbox::Array<double>& uval)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+   TBOX_ASSERT(!db_name.empty());
+   TBOX_ASSERT(array_indx >= 0);
+   TBOX_ASSERT(uval.getSize() > array_indx);
+#endif
+
+   if (db->keyExists("uval")) {
+      uval[array_indx] = db->getDouble("uval");
+   } else {
+      TBOX_ERROR(d_object_name << ": "
+                               << "`uval' entry missing from " << db_name
+                               << " input database. " << endl);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routine to check boundary data when debugging.                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MblkLinAdv::checkBoundaryData(
+   int btype,
+   const hier::Patch& patch,
+   const hier::IntVector& ghost_width_to_check,
+   const tbox::Array<int>& scalar_bconds) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_dim == tbox::Dimension(2)) {
+      TBOX_ASSERT(btype == EDGE2D_BDRY_TYPE ||
+         btype == NODE2D_BDRY_TYPE);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      TBOX_ASSERT(btype == FACE3D_BDRY_TYPE ||
+         btype == EDGE3D_BDRY_TYPE ||
+         btype == NODE3D_BDRY_TYPE);
+   }
+#endif
+
+   const tbox::Pointer<hier::BlockPatchGeometry> pgeom = patch.getPatchGeometry();
+   const tbox::Array<hier::BoundaryBox> bdry_boxes =
+      pgeom->getCodimensionBoundaries(btype);
+
+   hier::VariableDatabase* vdb = hier::VariableDatabase::getDatabase();
+
+   for (int i = 0; i < bdry_boxes.getSize(); i++) {
+      hier::BoundaryBox bbox = bdry_boxes[i];
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(bbox.getBoundaryType() == btype);
+#endif
+      int bloc = bbox.getLocationIndex();
+
+      int bscalarcase, refbdryloc;
+      if (d_dim == tbox::Dimension(2)) {
+         if (btype == EDGE2D_BDRY_TYPE) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(scalar_bconds.getSize() == NUM_2D_EDGES);
+#endif
+            bscalarcase = scalar_bconds[bloc];
+            refbdryloc = bloc;
+         } else { // btype == NODE2D_BDRY_TYPE
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(scalar_bconds.getSize() == NUM_2D_NODES);
+#endif
+            bscalarcase = scalar_bconds[bloc];
+            refbdryloc = d_node_bdry_edge[bloc];
+         }
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         if (btype == FACE3D_BDRY_TYPE) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(scalar_bconds.getSize() == NUM_3D_FACES);
+#endif
+            bscalarcase = scalar_bconds[bloc];
+            refbdryloc = bloc;
+         } else if (btype == EDGE3D_BDRY_TYPE) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(scalar_bconds.getSize() == NUM_3D_EDGES);
+#endif
+            bscalarcase = scalar_bconds[bloc];
+            refbdryloc = d_edge_bdry_face[bloc];
+         } else { // btype == NODE3D_BDRY_TYPE
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(scalar_bconds.getSize() == NUM_3D_NODES);
+#endif
+            bscalarcase = scalar_bconds[bloc];
+            refbdryloc = d_node_bdry_face[bloc];
+         }
+      }
+
+      int num_bad_values = 0;
+
+      if (d_dim == tbox::Dimension(2)) {
+         num_bad_values =
+            SkeletonBoundaryUtilities2::checkBdryData(
+               d_uval->getName(),
+               patch,
+               vdb->mapVariableAndContextToIndex(d_uval, getDataContext()), 0,
+               ghost_width_to_check,
+               bbox,
+               bscalarcase,
+               d_bdry_edge_uval[refbdryloc]);
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         num_bad_values =
+            SkeletonBoundaryUtilities3::checkBdryData(
+               d_uval->getName(),
+               patch,
+               vdb->mapVariableAndContextToIndex(d_uval, getDataContext()), 0,
+               ghost_width_to_check,
+               bbox,
+               bscalarcase,
+               d_bdry_face_uval[refbdryloc]);
+      }
+#if (TESTING == 1)
+      if (num_bad_values > 0) {
+         tbox::perr << "\nMblkLinAdv Boundary Test FAILED: \n"
+                    << "     " << num_bad_values
+                    << " bad UVAL values found for\n"
+                    << "     boundary type " << btype << " at location "
+                    << bloc << endl;
+      }
+#endif
+
+   }
+
+}
+
+hier::IntVector MblkLinAdv::getMultiblockRefineOpStencilWidth() const
+{
+   return hier::IntVector(d_dim, 1);
+}
+
+hier::IntVector MblkLinAdv::getMultiblockCoarsenOpStencilWidth()
+{
+   return hier::IntVector(d_dim, 0);
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/MblkLinAdv.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/MblkLinAdv.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,515 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Numerical routines for single patch in linear advection ex. 
+ *
+ ************************************************************************/
+
+#ifndef included_MblkLinAdvXD
+#define included_MblkLinAdvXD
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/appu/BoundaryUtilityStrategy.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/xfer/MultiblockRefineSchedule.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Serializable.h"
+#include "SAMRAI/geom/BlockGridGeometry.h"
+#include "SkeletonCellDoubleConservativeLinearRefine.h"
+#include "SkeletonCellDoubleWeightedAverage.h"
+#include "SkeletonOutersideDoubleWeightedAverage.h"
+#include <string>
+using namespace std;
+#define included_String
+#include "SAMRAI/xfer/TimeInterpolateOperator.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/appu/VisItDataWriter.h"
+
+// Local classes used for this application
+#include "MblkGeometry.h"
+#include "MblkHyperbolicLevelIntegrator.h"
+#include "MblkHyperbolicPatchStrategy.h"
+
+/**
+ * The MblkLinAdv class provides routines for a sample application code that
+ * solves linear advection.  This code illustrates the manner in which
+ * a code employing the standard Berger/Oliger AMR algorithm for
+ * explicit hydrodynamics can be used in the SAMRAI framework.
+ * This class is derived from the algs::HyperbolicPatchStrategy abstract base
+ * class which defines the bulk of the interface between the hyperbolic
+ * intergration algorithm provided by SAMRAI and the numerical routines
+ * specific to linear advection.  In particular, this class provides routines
+ * which maybe applied to any patch in an AMR patch hierarchy.
+ *
+ * The linear advection problem is simply du/dt + div(a*u) = 0, where
+ * "u" is a scalar-valued function and "a" is a constant vector.  The
+ * primary numerical quantities are "uval" and "flux", which represent
+ * "u" and "a*u", respectively.  All other variables are temporary
+ * quantities used in the numerical routines.  The numerical routines
+ * use explicit timestepping and a second-order unsplit Godunov method.
+ */
+
+using namespace SAMRAI;
+
+class MblkLinAdv:
+   public tbox::Serializable,
+   public MblkHyperbolicPatchStrategy,
+   public appu::BoundaryUtilityStrategy
+{
+public:
+   /**
+    * The constructor for MblkLinAdv sets default parameters for the linear
+    * advection model.  Specifically, it creates variables that represent
+    * the state of the solution.  The constructor also registers this
+    * object for restart with the restart manager using the object name.
+    *
+    * After default values are set, this routine calls getFromRestart()
+    * if execution from a restart file is specified.  Finally,
+    * getFromInput() is called to read values from the given input
+    * database (potentially overriding those found in the restart file).
+    */
+   MblkLinAdv(
+      const string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> input_db,
+      tbox::Array<tbox::Pointer<hier::GridGeometry> >& grid_geoms);
+
+   /**
+    * The destructor for MblkLinAdv does nothing.
+    */
+   ~MblkLinAdv();
+
+   ///
+   ///  The following routines:
+   ///
+   ///      registerModelVariables(),
+   ///      initializeDataOnPatch(),
+   ///      computeStableDtOnPatch(),
+   ///      computeFluxesOnPatch(),
+   ///      conservativeDifferenceOnPatch(),
+   ///      tagGradientDetectorCells(),
+   ///      tagRichardsonExtrapolationCells()
+   ///
+   ///  are concrete implementations of functions declared in the
+   ///  algs::HyperbolicPatchStrategy abstract base class.
+   ///
+
+   /**
+    * Register MblkLinAdv model variables with algs::HyperbolicLevelIntegrator
+    * according to variable registration function provided by the integrator.
+    * In other words, variables are registered according to their role
+    * in the integration process (e.g., time-dependent, flux, etc.).
+    * This routine also registers variables for plotting with the
+    * Vis writer (Vizamrai or VisIt).
+    */
+   void
+   registerModelVariables(
+      MblkHyperbolicLevelIntegrator* integrator);
+
+   /**
+    * Set the data on the patch interior to some initial values,
+    * depending on the input parameters and numerical routines.
+    * If the "initial_time" flag is false, indicating that the
+    * routine is called after a regridding step, the routine does nothing.
+    */
+   void
+   initializeDataOnPatch(
+      hier::Patch& patch,
+      const double data_time,
+      const bool initial_time);
+
+   /**
+    * Compute the stable time increment for patch using a CFL
+    * condition and return the computed dt.
+    */
+   double
+   computeStableDtOnPatch(
+      hier::Patch& patch,
+      const bool initial_time,
+      const double dt_time);
+
+   /**
+    * Compute time integral of fluxes to be used in conservative difference
+    * for patch integration.  When d_dim == tbox::Dimension(3)), this function calls either
+    * compute3DFluxesWithCornerTransport1(), or
+    * compute3DFluxesWithCornerTransport2() depending on which
+    * transverse flux correction option that is specified in input.
+    * The conservative difference used to update the integrated quantities
+    * is implemented in the conservativeDifferenceOnPatch() routine.
+    */
+   void
+   computeFluxesOnPatch(
+      hier::Patch& patch,
+      const double time,
+      const double dt);
+
+   /**
+    * Update linear advection solution variables by performing a conservative
+    * difference with the fluxes calculated in computeFluxesOnPatch().
+    */
+   void
+   conservativeDifferenceOnPatch(
+      hier::Patch& patch,
+      const double time,
+      const double dt,
+      bool at_syncronization);
+
+   /**
+    * Tag cells for refinement using gradient detector.
+    */
+   void
+   tagGradientDetectorCells(
+      hier::Patch& patch,
+      const double regrid_time,
+      const bool initial_error,
+      const int tag_indexindx,
+      const bool uses_richardson_extrapolation_too);
+
+   ///
+   ///  The following routines:
+   ///
+   ///      postprocessRefine()
+   ///      setPhysicalBoundaryConditions()
+   ///
+   ///  are concrete implementations of functions declared in the
+   ///  RefinePatchStrategy abstract base class.
+   ///
+
+   /**
+    * Set the data in ghost cells corresponding to physical boundary
+    * conditions.  Specific boundary conditions are determined by
+    * information specified in input file and numerical routines.
+    */
+   void
+   setPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const double fill_time,
+      const hier::IntVector&
+      ghost_width_to_fill);
+
+   /**
+    * Refine operations for cell data.
+    */
+   void
+   preprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio);
+   void
+   postprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio);
+
+   /**
+    * Coarsen operations for cell data.
+    */
+   void
+   preprocessCoarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio);
+
+   void
+   postprocessCoarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio);
+
+   /**
+    * Fill the singularity conditions for the multi-block case
+    */
+   void
+   fillSingularityBoundaryConditions(
+      hier::Patch& patch,
+      tbox::List<tbox::Pointer<hier::Patch> >& sing_patches,
+      const double fill_time,
+      const hier::Box& fill_box,
+      const hier::BoundaryBox& bbox);
+
+   /**
+    * Build mapped grid on patch
+    */
+   void
+   setMappedGridOnPatch(
+      const hier::Patch& patch,
+      const int level_number,
+      const int block_number);
+
+   /**
+    * Write state of MblkLinAdv object to the given database for restart.
+    *
+    * This routine is a concrete implementation of the function
+    * declared in the tbox::Serializable abstract base class.
+    */
+   void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> db);
+
+   /**
+    * This routine is a concrete implementation of the virtual function
+    * in the base class BoundaryUtilityStrategy.  It reads DIRICHLET
+    * boundary state values from the given database with the
+    * given name string idenifier.  The integer location index
+    * indicates the face (in 3D) or edge (in 2D) to which the boundary
+    * condition applies.
+    */
+   void
+   readDirichletBoundaryDataEntry(
+      tbox::Pointer<tbox::Database> db,
+      string& db_name,
+      int bdry_location_index);
+
+   hier::IntVector
+   getMultiblockRefineOpStencilWidth() const;
+   hier::IntVector
+   getMultiblockCoarsenOpStencilWidth();
+
+#ifdef HAVE_HDF5
+   /**
+    * Register a VisIt data writer so this class will write
+    * plot files that may be postprocessed with the VisIt
+    * visualization tool.
+    */
+   void
+   registerVisItDataWriter(
+      tbox::Pointer<appu::VisItDataWriter> viz_writer);
+#endif
+
+   /**
+    * Print all data members for MblkLinAdv class.
+    */
+   void
+   printClassData(
+      ostream& os) const;
+
+private:
+   /*
+    * These private member functions read data from input and restart.
+    * When beginning a run from a restart file, all data members are read
+    * from the restart file.  If the boolean flag is true when reading
+    * from input, some restart values may be overridden by those in the
+    * input file.
+    *
+    * An assertion results if the database pointer is null.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db,
+      bool is_from_restart);
+
+   void
+   getFromRestart();
+
+   void
+   readStateDataEntry(
+      tbox::Pointer<tbox::Database> db,
+      const string& db_name,
+      int array_indx,
+      tbox::Array<double>& uval);
+
+   /*
+    * Private member function to check correctness of boundary data.
+    */
+   void
+   checkBoundaryData(
+      int btype,
+      const hier::Patch& patch,
+      const hier::IntVector& ghost_width_to_fill,
+      const tbox::Array<int>& scalar_bconds) const;
+
+   /*
+    * Three-dimensional flux computation routines corresponding to
+    * either of the two transverse flux correction options.  These
+    * routines are called from the computeFluxesOnPatch() function.
+    */
+   void
+   compute3DFluxesWithCornerTransport1(
+      hier::Patch& patch,
+      const double dt);
+   void
+   compute3DFluxesWithCornerTransport2(
+      hier::Patch& patch,
+      const double dt);
+
+   /*
+    * The object name is used for error/warning reporting and also as a
+    * string label for restart database entries.
+    */
+   string d_object_name;
+
+   const tbox::Dimension d_dim;
+
+   /*
+    * We cache pointers to the grid geometry and Vizamrai data writer
+    * object to set up initial data, set physical boundary conditions,
+    * and register plot variables.
+    */
+   tbox::Array<tbox::Pointer<hier::GridGeometry> >
+   d_grid_geometries;
+#ifdef HAVE_HDF5
+   tbox::Pointer<appu::VisItDataWriter> d_visit_writer;
+#endif
+
+   /*
+    * Data items used for nonuniform load balance, if used.
+    */
+   tbox::Pointer<pdat::CellVariable<double> > d_workload_variable;
+   int d_workload_data_id;
+   bool d_use_nonuniform_workload;
+
+   /**
+    * tbox::Pointer to state variable vector - [u]
+    */
+   tbox::Pointer<pdat::CellVariable<double> > d_uval;
+
+   /**
+    * tbox::Pointer to cell volume - [v]
+    */
+   tbox::Pointer<pdat::CellVariable<double> > d_vol;
+
+   /**
+    * tbox::Pointer to flux variable vector  - [F]
+    */
+   tbox::Pointer<pdat::SideVariable<double> > d_flux;
+
+   /**
+    * tbox::Pointer to grid - [xyz]
+    */
+   tbox::Pointer<pdat::NodeVariable<double> > d_xyz;
+   int d_xyz_id;
+   bool d_dx_set;
+
+   /**
+    * linear advection velocity vector
+    */
+   double d_advection_velocity[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   /*
+    *  Parameters for numerical method:
+    *
+    *    d_godunov_order ....... order of Godunov slopes (1, 2, or 4)
+    *
+    *    d_corner_transport .... type of finite difference approximation
+    *                            for 3d transverse flux correction
+    *
+    *    d_nghosts ............. number of ghost cells for cell-centered
+    *                            and face/side-centered variables
+    *
+    *    d_fluxghosts .......... number of ghost cells for fluxes
+    *
+    */
+   int d_godunov_order;
+   string d_corner_transport;
+   hier::IntVector d_nghosts;
+   hier::IntVector d_fluxghosts;
+   hier::IntVector d_nodeghosts;
+
+   /*
+    * Indicator for problem type and initial conditions
+    */
+   string d_data_problem;
+   int d_data_problem_int;
+
+   /*
+    * Input for SPHERE problem
+    */
+   double d_radius;
+   double d_center[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   double d_uval_inside;
+   double d_uval_outside;
+
+   /*
+    * Input for FRONT problem
+    */
+   int d_number_of_intervals;
+   tbox::Array<double> d_front_position;
+   tbox::Array<double> d_interval_uval;
+
+   /*
+    * Boundary condition cases and boundary values.
+    * Options are: FLOW, REFLECT, DIRICHLET
+    * and variants for nodes and edges.
+    *
+    * Input file values are read into these arrays.
+    */
+   tbox::Array<int> d_scalar_bdry_edge_conds;
+   tbox::Array<int> d_scalar_bdry_node_conds;
+   tbox::Array<int> d_scalar_bdry_face_conds; // 3D only
+
+   /*
+    * Boundary condition cases for scalar and vector (i.e., depth > 1)
+    * variables.  These are post-processed input values and are passed
+    * to the boundary routines.
+    */
+   tbox::Array<int> d_node_bdry_edge; // 2D only
+   tbox::Array<int> d_edge_bdry_face; // 3D only
+   tbox::Array<int> d_node_bdry_face; // 3D only
+
+   /*
+    * Arrays of face (3d) or edge (2d) boundary values for DIRICHLET case.
+    */
+   tbox::Array<double> d_bdry_edge_uval;
+   tbox::Array<double> d_bdry_face_uval;
+
+   /*
+    * Input for Sine problem initialization
+    */
+   double d_amplitude;
+   double d_frequency[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   /*
+    * Refinement criteria parameters for gradient detector and
+    * Richardson extrapolation.
+    */
+   tbox::Array<string> d_refinement_criteria;
+   tbox::Array<double> d_dev_tol;
+   tbox::Array<double> d_dev;
+   tbox::Array<double> d_dev_time_max;
+   tbox::Array<double> d_dev_time_min;
+   tbox::Array<double> d_grad_tol;
+   tbox::Array<double> d_grad_time_max;
+   tbox::Array<double> d_grad_time_min;
+   tbox::Array<double> d_shock_onset;
+   tbox::Array<double> d_shock_tol;
+   tbox::Array<double> d_shock_time_max;
+   tbox::Array<double> d_shock_time_min;
+   tbox::Array<double> d_rich_tol;
+   tbox::Array<double> d_rich_time_max;
+   tbox::Array<double> d_rich_time_min;
+
+   /*
+    * This class stores geometry information used for constructing the
+    * mapped multiblock hierarchy
+    */
+   MblkGeometry* d_mblk_geometry;
+
+   /*
+    * Operators to be used with BlockGridGeometry
+    */
+   tbox::Pointer<SkeletonCellDoubleConservativeLinearRefine>
+   d_cell_cons_linear_refine_op;
+   tbox::Pointer<SkeletonCellDoubleWeightedAverage> d_cell_cons_coarsen_op;
+   tbox::Pointer<xfer::TimeInterpolateOperator> d_cell_time_interp_op;
+   tbox::Pointer<SkeletonOutersideDoubleWeightedAverage> d_side_cons_coarsen_op;
+
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/MblkLinAdvFort.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/MblkLinAdvFort.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,373 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   F77 external declarations for SAMRAI linear advection example. 
+ *
+ ************************************************************************/
+
+#include <math.h>
+#include <signal.h>
+
+extern "C" {
+
+// 2D:
+
+void F77_FUNC(linadvinit, LINADVINIT) (
+   const int &, const double *, const double *, const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   double *,
+   const int &,
+   const double *, const double *);
+
+void F77_FUNC(linadvinitsine, LINADVINITSINE) (
+   const int &, const double *, const double *,
+   const double *, const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   double *,
+   const int &,
+   const double *, const double *,
+   const double &, const double *);
+
+void F77_FUNC(initsphere, INITSPHERE) (
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   double *,
+   double *,
+   const double &, const double &,
+   const double *, const double &);
+
+void F77_FUNC(stabledt, STABLEDT) (
+   const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   const double *,
+   const double *,
+   double &);
+
+void F77_FUNC(inittraceflux, INITTRACEFLUX) (
+   const int &, const int &,
+   const int &, const int &,
+   const double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(chartracing0, CHARTRACING0) (
+   const double &, const int &, const int &,
+   const int &, const int &,
+   const int &, const double &, const double &, const int &,
+   const double *,
+   double *, double *,
+   double *, double *,
+   double *, double *);
+
+void F77_FUNC(chartracing1, CHARTRACING1) (
+   const double &, const int &, const int &, const int &, const int &,
+   const int &, const double &, const double &, const int &,
+   const double *,
+   double *, double *,
+   double *, double *,
+   double *, double *);
+
+void F77_FUNC(fluxcalculation, FLUXCALCULATION) (
+   const double &, const int &, const int &,
+   const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const double *,
+   const double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(fluxcorrec, FLUXCORREC) (
+   const double &, const int &, const int &, const int &, const int &,
+   const double *,
+   const double *, const double *,
+   double *, double *,
+   double *, double *,
+   double *, double *);
+
+void F77_FUNC(consdiff, CONSDIFF) (
+   const int &, const int &,
+   const int &, const int &,
+   const double *,
+   const double *, const double *,
+   const double *,
+   double *);
+
+void F77_FUNC(getbdry, GETBDRY) (
+   const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &,
+   const int &,
+   const int &,
+   const double *, const double &,
+   double *,
+   const double *, const double *, const int &);
+
+void F77_FUNC(detectgrad, DETECTGRAD) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double *,
+   const double &,
+   const int &, const int &,
+   const double *,
+   int *, int *);
+
+void F77_FUNC(detectshock, DETECTSHOCK) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double *,
+   const double &, const double &,
+   const int &, const int &,
+   const double *,
+   int *, int *);
+
+void F77_FUNC(stufprobc, STUFPROBC) (
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &);
+
+// in cartrefine2d.f:
+void F77_FUNC(cartclinrefcelldoub2d, CARTCLINREFCELLDOUB2D) (
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *,
+   double *, double *, double *, double *);
+
+// 3D:
+
+void F77_FUNC(linadvinit, LINADVINIT) (
+   const int &, const double *, const double *, const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   const int &,
+   double *,
+   const int &,
+   const double *, const double *);
+
+void F77_FUNC(linadvinitsine, LINADVINITSINE) (
+   const int &, const double *, const double *,
+   const double *, const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   const int &,
+   double *,
+   const int &,
+   const double *, const double *,
+   const double &, const double *);
+
+void F77_FUNC(initsphere, INITSPHERE) (
+   const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   const int &,
+   double *,
+   double *,
+   const double &, const double &,
+   const double *, const double &);
+
+void F77_FUNC(stabledt, STABLEDT) (
+   const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   const int &,
+   const double *,
+   const double *,
+   double &);
+
+void F77_FUNC(inittraceflux, INITTRACEFLUX) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double *,
+   double *, double *, double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(chartracing0, CHARTRACING0) (
+   const double &, const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const double &, const double &, const int &,
+   const double *,
+   double *, double *,
+   double *, double *,
+   double *, double *);
+
+void F77_FUNC(chartracing1, CHARTRACING1) (
+   const double &, const int &, const int &, const int &, const int &,
+   const int &, const int &,
+   const int &, const double &, const double &, const int &,
+   const double *,
+   double *, double *,
+   double *, double *,
+   double *, double *);
+
+void F77_FUNC(chartracing2, CHARTRACING2) (
+   const double &, const int &, const int &, const int &, const int &,
+   const int &, const int &,
+   const int &, const double &, const double &, const int &,
+   const double *,
+   double *, double *,
+   double *, double *,
+   double *, double *);
+
+void F77_FUNC(fluxcalculation, FLUXCALCULATION) (
+   const double &, const int &, const int &,
+   const int &,
+   const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double *,
+   const double *,
+   double *, double *, double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(fluxcorrec2d, FLUXCORREC2D) (
+   const double &, const int &, const int &, const int &, const int &,
+   const int &, const int &,
+   const double *, const double *, const int &,
+   const double *,
+   const double *, const double *, const double *,
+   const double *, const double *, const double *,
+   const double *, const double *, const double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(fluxcorrec3d, FLUXCORREC3D) (
+   const double &, const int &, const int &, const int &, const int &,
+   const int &, const int &,
+   const double *, const double *,
+   const double *,
+   const double *, const double *, const double *,
+   const double *, const double *, const double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(consdiff, CONSDIFF) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double *,
+   const double *, const double *,
+   const double *,
+   const double *,
+   double *);
+
+void F77_FUNC(getbdry, GETBDRY) (
+   const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &,
+   const int &,
+   const int &,
+   const int &,
+   const double *, const double &,
+   double *,
+   const double *, const double *, const int &);
+
+void F77_FUNC(onethirdstate, ONETHIRDSTATE) (
+   const double &, const double *, const int &,
+   const int &, const int &, const int &, const int &, const int &, const int &,
+   const double *, const double *,
+   const double *, const double *, const double *,
+   double *);
+
+void F77_FUNC(fluxthird, FLUXTHIRD) (
+   const double &, const double *, const int &,
+   const int &, const int &, const int &, const int &, const int &, const int &,
+   const double *, const double *,
+   const double *,
+   double *, double *, double *);
+
+void F77_FUNC(fluxcorrecjt, FLUXCORRECJT) (
+   const double &, const double *, const int &,
+   const int &, const int &, const int &, const int &, const int &, const int &,
+   const double *, const double *,
+   const double *, const double *, const double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(detectgrad, DETECTGRAD) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double *,
+   const double &,
+   const int &, const int &,
+   const double *,
+   int *, int *);
+
+void F77_FUNC(detectshock, DETECTSHOCK) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double *,
+   const double &, const double &,
+   const int &, const int &,
+   const double *,
+   int *, int *);
+
+void F77_FUNC(stufprobc, STUFPROBC) (
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &);
+
+// in cartrefine3d.f:
+void F77_FUNC(cartclinrefcelldoub3d, CARTCLINREFCELLDOUB3D) (
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *,
+   double *, double *, double *,
+   double *, double *, double *);
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/Pointer-MblkHyperbolicLevelIntegrator.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/Pointer-MblkHyperbolicLevelIntegrator.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,19 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright
+ * information, see COPYRIGHT and COPYING.LESSER.
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Pointer.C"
+#include "MblkHyperbolicLevelIntegrator.h"
+
+using namespace SAMRAI;
+
+#ifndef LACKS_EXPLICIT_TEMPLATE_INSTANTIATION
+template class tbox::Pointer<MblkHyperbolicLevelIntegrator>;
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/Pointer-SkeletonCellDoubleConservativeLinearRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/Pointer-SkeletonCellDoubleConservativeLinearRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,19 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright
+ * information, see COPYRIGHT and COPYING.LESSER.
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Pointer.C"
+#include "SkeletonCellDoubleConservativeLinearRefine.h"
+
+using namespace SAMRAI;
+
+#ifndef LACKS_EXPLICIT_TEMPLATE_INSTANTIATION
+template class tbox::Pointer<SkeletonCellDoubleConservativeLinearRefine>;
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/Pointer-SkeletonCellDoubleWeightedAverage.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/Pointer-SkeletonCellDoubleWeightedAverage.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,19 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright
+ * information, see COPYRIGHT and COPYING.LESSER.
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Pointer.C"
+#include "SkeletonCellDoubleWeightedAverage.h"
+
+using namespace SAMRAI;
+
+#ifndef LACKS_EXPLICIT_TEMPLATE_INSTANTIATION
+template class tbox::Pointer<SkeletonCellDoubleWeightedAverage>;
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/Pointer-SkeletonOutersideDoubleWeightedAverage.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/Pointer-SkeletonOutersideDoubleWeightedAverage.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,19 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright
+ * information, see COPYRIGHT and COPYING.LESSER.
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Pointer.C"
+#include "SkeletonOutersideDoubleWeightedAverage.h"
+
+using namespace SAMRAI;
+
+#ifndef LACKS_EXPLICIT_TEMPLATE_INSTANTIATION
+template class tbox::Pointer<SkeletonOutersideDoubleWeightedAverage>;
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,29 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   MULTIBLOCK LINEAR ADVECTION EQUATION EXAMPLE
+##
+#########################################################################
+
+This example is similar to the single-block AMR LinAdv sample application.
+Please see the README in that example for details on how to compile
+and run.  This example has the following differences:
+
+   1. It works on non-cartesian mapped grids 
+   2. It works with multiblock grids
+   3. All numerical kernel operations (e.g. computeFluxesOnPatch()) are
+      c-based rather than fortran
+
+The three test cases included are:
+
+   1. cart-1blk   - single block Cartesian grid 
+   2. wedge-1blk  - single block mapped wedge grid 
+   3. octant-3blk - multi block (3 blocks) mapped octant grid 
+
+Note that this example will compile in 2D but the numerics have not been fully
+tested so it currently should only run in 3D.  For further information, please
+contact Andy Wissink: awissink at llnl.gov
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/SkeletonBoundaryUtilities2.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/SkeletonBoundaryUtilities2.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,864 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility routines for manipulating 2D Skeleton boundary data 
+ *
+ ************************************************************************/
+
+#include "SkeletonBoundaryUtilities2.h"
+
+#include "SAMRAI/appu/CartesianBoundaryDefines.h"
+
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/hier/BlockPatchGeometry.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN 77 routines used in                 *
+ * boundary condition implementation.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+extern "C" {
+
+void F77_FUNC(stufskelbdryloc2d, STUFSKELBDRYLOC2D) (
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &);
+
+void F77_FUNC(stufskelbdrycond2d, STUFSKELBDRYCOND2D) (
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &);
+
+void F77_FUNC(getskeledgebdry2d, GETSKELEDGEBDRY2D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   const double *,
+   double *,
+   const int &);
+
+void F77_FUNC(getskelnodebdry2d, GETSKELNODEBDRY2D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   const double *,
+   double *,
+   const int &);
+
+}
+
+using namespace std;
+using namespace SAMRAI;
+using namespace appu;
+
+bool SkeletonBoundaryUtilities2::s_fortran_constants_stuffed = false;
+
+/*
+ * This function reads 2D boundary data from given input database.
+ * The integer boundary condition types are placed in the integer
+ * arrays supplied by the caller (typically, the concrete BoundaryStrategy
+ * provided).  When DIRICHLET or NEUMANN conditions are specified, control
+ * is passed to the BoundaryStrategy to read the boundary state data
+ * specific to the problem.
+ *
+ * Errors will be reported and the program will abort whenever necessary
+ * boundary condition information is missing in the input database, or
+ * when the data read in is either unknown or inconsistent.  The periodic
+ * domain information is used to determine which boundary edges or
+ * node entries are not required from input.  Error checking requires
+ * that node boundary conditions are consistent with those
+ * specified for the edges.
+ *
+ * Arguments are:
+ *    bdry_strategy .... object that reads DIRICHLET or NEUMANN data
+ *    bdry_db .......... input database containing all boundary data
+ *    edge_conds ....... array into which integer boundary conditions
+ *                       for edges are read
+ *    node_conds ....... array into which integer boundary conditions
+ *                       for nodes are read
+ *    periodic ......... integer vector specifying which coordinate
+ *                       directions are periodic (value returned from
+ *                       GridGeometry2::getPeriodicShift())
+ */
+
+void SkeletonBoundaryUtilities2::readBoundaryInput(
+   BoundaryUtilityStrategy* bdry_strategy,
+   tbox::Pointer<tbox::Database> bdry_db,
+   tbox::Array<int>& edge_conds,
+   tbox::Array<int>& node_conds,
+   const hier::IntVector& periodic)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(bdry_strategy != (BoundaryUtilityStrategy *)NULL);
+   TBOX_ASSERT(!bdry_db.isNull());
+   TBOX_ASSERT(edge_conds.getSize() == NUM_2D_EDGES);
+   TBOX_ASSERT(node_conds.getSize() == NUM_2D_NODES);
+#endif
+
+   if (!s_fortran_constants_stuffed) {
+      stuff2dBdryFortConst();
+   }
+
+   read2dBdryEdges(bdry_strategy,
+      bdry_db,
+      edge_conds,
+      periodic);
+
+   read2dBdryNodes(bdry_db,
+      edge_conds,
+      node_conds,
+      periodic);
+
+}
+
+/*
+ * Function to fill edge boundary values.
+ *
+ * Arguments are:
+ *    varname .............. name of variable (for error reporting)
+ *    vardata .............. cell-centered patch data object to check
+ *    patch ................ patch on which data object lives
+ *    ghost_width_to_fill .. width of ghost region to fill
+ *    bdry_edge_conds ...... array of boundary conditions for patch edges
+ *    bdry_edge_values ..... array of boundary values for edges
+ *                           (this must be consistent with boundary
+ *                           condition types)
+ */
+
+void SkeletonBoundaryUtilities2::fillEdgeBoundaryData(
+   const string& varname,
+   tbox::Pointer<pdat::CellData<double> >& vardata,
+   const hier::Patch& patch,
+   const hier::IntVector& ghost_fill_width,
+   const tbox::Array<int>& bdry_edge_conds,
+   const tbox::Array<double>& bdry_edge_values)
+{
+   NULL_USE(varname);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!vardata.isNull());
+   TBOX_ASSERT(bdry_edge_conds.getSize() == NUM_2D_EDGES);
+   TBOX_ASSERT(bdry_edge_values.getSize() == NUM_2D_EDGES * (vardata->getDepth()));
+#endif
+
+   if (!s_fortran_constants_stuffed) {
+      stuff2dBdryFortConst();
+   }
+
+   const tbox::Pointer<hier::BlockPatchGeometry> pgeom =
+      patch.getPatchGeometry();
+
+   const hier::Box& interior = patch.getBox();
+   const hier::Index& ifirst(interior.lower());
+   const hier::Index& ilast(interior.upper());
+
+   const hier::IntVector& ghost_cells = vardata->getGhostCellWidth();
+
+   hier::IntVector gcw_to_fill = hier::IntVector::min(ghost_cells,
+         ghost_fill_width);
+
+   const tbox::Array<hier::BoundaryBox>& edge_bdry =
+      pgeom->getCodimensionBoundaries(EDGE2D_BDRY_TYPE);
+   for (int i = 0; i < edge_bdry.getSize(); i++) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(edge_bdry[i].getBoundaryType() == EDGE2D_BDRY_TYPE);
+#endif
+
+      int bedge_loc = edge_bdry[i].getLocationIndex();
+
+      hier::Box fill_box(pgeom->getBoundaryFillBox(edge_bdry[i],
+                            interior,
+                            gcw_to_fill));
+
+      if (!fill_box.empty()) {
+         const hier::Index& ibeg(fill_box.lower());
+         const hier::Index& iend(fill_box.upper());
+
+         F77_FUNC(getskeledgebdry2d, GETSKELEDGEBDRY2D) (
+            ifirst(0), ilast(0),
+            ifirst(1), ilast(1),
+            ibeg(0), iend(0),
+            ibeg(1), iend(1),
+            ghost_cells(0), ghost_cells(1),
+            bedge_loc,
+            bdry_edge_conds[bedge_loc],
+            bdry_edge_values.getPointer(),
+            vardata->getPointer(),
+            vardata->getDepth());
+      }
+
+   }
+
+}
+
+/*
+ * Function to fill node boundary values.
+ *
+ * Arguments are:
+ *    varname .............. name of variable (for error reporting)
+ *    vardata .............. cell-centered patch data object to check
+ *    patch ................ patch on which data object lives
+ *    ghost_width_to_fill .. width of ghost region to fill
+ *    bdry_node_conds ...... array of boundary conditions for patch nodes
+ *    bdry_edge_values ..... array of boundary values for edges
+ *                           (this must be consistent with boundary
+ *                           condition types)
+ */
+
+void SkeletonBoundaryUtilities2::fillNodeBoundaryData(
+   const string& varname,
+   tbox::Pointer<pdat::CellData<double> >& vardata,
+   const hier::Patch& patch,
+   const hier::IntVector& ghost_fill_width,
+   const tbox::Array<int>& bdry_node_conds,
+   const tbox::Array<double>& bdry_edge_values)
+{
+   NULL_USE(varname);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!vardata.isNull());
+   TBOX_ASSERT(bdry_node_conds.getSize() == NUM_2D_NODES);
+   TBOX_ASSERT(bdry_edge_values.getSize() == NUM_2D_EDGES * (vardata->getDepth()));
+#endif
+
+   if (!s_fortran_constants_stuffed) {
+      stuff2dBdryFortConst();
+   }
+
+   const tbox::Pointer<hier::BlockPatchGeometry> pgeom =
+      patch.getPatchGeometry();
+
+   const hier::Box& interior(patch.getBox());
+   const hier::Index& ifirst(interior.lower());
+   const hier::Index& ilast(interior.upper());
+
+   const hier::IntVector& ghost_cells = vardata->getGhostCellWidth();
+
+   hier::IntVector gcw_to_fill = hier::IntVector::min(ghost_cells,
+         ghost_fill_width);
+
+   const tbox::Array<hier::BoundaryBox>& node_bdry =
+      pgeom->getCodimensionBoundaries(NODE2D_BDRY_TYPE);
+
+   for (int i = 0; i < node_bdry.getSize(); i++) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(node_bdry[i].getBoundaryType() == NODE2D_BDRY_TYPE);
+#endif
+
+      int bnode_loc = node_bdry[i].getLocationIndex();
+
+      hier::Box fill_box(pgeom->getBoundaryFillBox(node_bdry[i],
+                            interior,
+                            gcw_to_fill));
+
+      if (!fill_box.empty()) {
+         const hier::Index& ibeg(fill_box.lower());
+         const hier::Index& iend(fill_box.upper());
+
+         F77_FUNC(getskelnodebdry2d, GETSKELNODEBDRY2D) (
+            ifirst(0), ilast(0),
+            ifirst(1), ilast(1),
+            ibeg(0), iend(0),
+            ibeg(1), iend(1),
+            ghost_cells(0), ghost_cells(1),
+            bnode_loc,
+            bdry_node_conds[bnode_loc],
+            bdry_edge_values.getPointer(),
+            vardata->getPointer(),
+            vardata->getDepth());
+      }
+
+   }
+
+}
+
+/*
+ * Function that returns the integer edge boundary location
+ * corresponding to the given node location and node boundary
+ * condition.
+ *
+ * If the node boundary condition type or node location are unknown,
+ * or the boundary condition type is inconsistant with the node location
+ * an error results.
+ */
+
+int SkeletonBoundaryUtilities2::getEdgeLocationForNodeBdry(
+   int node_loc,
+   int node_btype)
+{
+
+   int ret_edge = -1;
+
+   switch (node_btype) {
+      case XFLOW_BC:
+      case XREFLECT_BC:
+      case XDIRICHLET_BC:
+      {
+         if (node_loc == XLO_YLO_2D || node_loc == XLO_YHI_2D) {
+            ret_edge = XLO;
+         } else {
+            ret_edge = XHI;
+         }
+         break;
+      }
+      case YFLOW_BC:
+      case YREFLECT_BC:
+      case YDIRICHLET_BC:
+      {
+         if (node_loc == XLO_YLO_2D || node_loc == XHI_YLO_2D) {
+            ret_edge = YLO;
+         } else {
+            ret_edge = YHI;
+         }
+         break;
+      }
+      default: {
+         TBOX_ERROR("Unknown node boundary condition type = "
+            << node_btype << " passed to \n"
+            << "SkeletonBoundaryUtilities2::getEdgeLocationForNodeBdry"
+            << endl);
+      }
+   }
+
+   if (ret_edge == -1) {
+      TBOX_ERROR("Node boundary condition type = "
+         << node_btype << " and node location = " << node_loc
+         << "\n passed to "
+         << "SkeletonBoundaryUtilities2::getEdgeLocationForNodeBdry"
+         << " are inconsistant." << endl);
+   }
+
+   return ret_edge;
+
+}
+
+/*
+ * Function to check 2D boundary data filling.  Arguments are:
+ *
+ *    varname ..... name of variable (for error reporting)
+ *    patch ....... patch on which boundary data to check lives
+ *    data_id ..... patch data index on patch
+ *    depth ....... depth index of data to check
+ *    gcw_to_check. boundary ghost width to fill
+ *    bbox ........ boundary box to check
+ *    bcase ....... boundary condition case for edge or a node to check
+ *    bstate ...... boundary state that applies when such a value is
+ *                  required, such as when using Dirichlet conditions
+ */
+
+int SkeletonBoundaryUtilities2::checkBdryData(
+   const string& varname,
+   const hier::Patch& patch,
+   int data_id,
+   int depth,
+   const hier::IntVector& gcw_to_check,
+   const hier::BoundaryBox& bbox,
+   int bcase,
+   double bstate)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!varname.empty());
+   TBOX_ASSERT(data_id >= 0);
+   TBOX_ASSERT(depth >= 0);
+#endif
+
+   int num_bad_values = 0;
+
+   int btype = bbox.getBoundaryType();
+   int bloc = bbox.getLocationIndex();
+
+   tbox::Pointer<hier::BlockPatchGeometry> pgeom =
+      patch.getPatchGeometry();
+
+   tbox::Pointer<pdat::CellData<double> > vardata =
+      patch.getPatchData(data_id);
+
+   string bdry_type_str;
+   if (btype == EDGE2D_BDRY_TYPE) {
+      bdry_type_str = "EDGE";
+   } else if (btype == NODE2D_BDRY_TYPE) {
+      bdry_type_str = "NODE";
+   } else {
+      TBOX_ERROR(
+         "Unknown btype " << btype
+         <<
+         " passed to SkeletonBoundaryUtilities2::checkBdryData()! "
+         << endl);
+   }
+
+   tbox::plog << "\n\nCHECKING 2D " << bdry_type_str << " BDRY DATA..." << endl;
+   tbox::plog << "varname = " << varname << " : depth = " << depth << endl;
+   tbox::plog << "bbox = " << bbox.getBox() << endl;
+   tbox::plog << "btype, bloc, bcase = "
+              << btype << ", = " << bloc << ", = " << bcase << endl;
+
+   int idir;
+   double valfact = 0.0, constval = 0.0, dxfact = 0.0;
+   int offsign;
+
+   get2dBdryDirectionCheckValues(idir, offsign,
+      btype, bloc, bcase);
+
+   if (btype == EDGE2D_BDRY_TYPE) {
+
+      if (bcase == FLOW_BC) {
+         valfact = 1.0;
+         constval = 0.0;
+         dxfact = 0.0;
+      } else if (bcase == REFLECT_BC) {
+         valfact = -1.0;
+         constval = 0.0;
+         dxfact = 0.0;
+      } else if (bcase == DIRICHLET_BC) {
+         valfact = 0.0;
+         constval = bstate;
+         dxfact = 0.0;
+      } else {
+         TBOX_ERROR(
+            "Unknown bcase " << bcase
+            <<
+            " passed to SkeletonBoundaryUtilities2::checkBdryData()"
+            << "\n for " << bdry_type_str
+            << " at location " << bloc << endl);
+      }
+
+   } else if (btype == NODE2D_BDRY_TYPE) {
+
+      if (bcase == XFLOW_BC || bcase == YFLOW_BC) {
+         valfact = 1.0;
+         constval = 0.0;
+         dxfact = 0.0;
+      } else if (bcase == XREFLECT_BC || bcase == YREFLECT_BC) {
+         valfact = -1.0;
+         constval = 0.0;
+         dxfact = 0.0;
+      } else if (bcase == XDIRICHLET_BC || bcase == YDIRICHLET_BC) {
+         valfact = 0.0;
+         constval = bstate;
+         dxfact = 0.0;
+      } else {
+         TBOX_ERROR(
+            "Unknown bcase " << bcase
+            <<
+            " passed to SkeletonBoundaryUtilities2::checkBdryData()"
+            << "\n for " << bdry_type_str
+            << " at location " << bloc << endl);
+      }
+
+   }
+
+   hier::Box gbox_to_check(
+      vardata->getGhostBox() * pgeom->getBoundaryFillBox(bbox,
+         patch.getBox(),
+         gcw_to_check));
+
+   hier::Box cbox(gbox_to_check);
+   hier::Box dbox(gbox_to_check);
+   hier::Index ifirst(vardata->getBox().lower());
+   hier::Index ilast(vardata->getBox().upper());
+
+   if (offsign == -1) {
+      cbox.lower(idir) = ifirst(idir) - 1;
+      cbox.upper(idir) = ifirst(idir) - 1;
+      dbox.lower(idir) = ifirst(idir);
+      dbox.upper(idir) = ifirst(idir);
+   } else {
+      cbox.lower(idir) = ilast(idir) + 1;
+      cbox.upper(idir) = ilast(idir) + 1;
+      dbox.lower(idir) = ilast(idir);
+      dbox.upper(idir) = ilast(idir);
+   }
+
+   pdat::CellIterator id(dbox);
+   for (pdat::CellIterator ic(cbox); ic; ic++) {
+      double checkval = valfact * (*vardata)(id(), depth) + constval;
+      pdat::CellIndex check = ic();
+      for (int p = 0; p < gbox_to_check.numberCells(idir); p++) {
+         double offcheckval = checkval + dxfact * (p + 1);
+         if ((*vardata)(check, depth) != offcheckval) {
+            num_bad_values++;
+            TBOX_WARNING("Bad " << bdry_type_str
+                                << " boundary value for " << varname
+                                << " found in cell " << check
+                                << "\n   found = " << (*vardata)(check, depth)
+                                << " : correct = " << offcheckval << endl);
+         }
+         check(idir) += offsign;
+      }
+      id++;
+   }
+
+   return num_bad_values;
+
+}
+
+/*
+ * Private function to read 2D edge boundary data from input database.
+ */
+
+void SkeletonBoundaryUtilities2::read2dBdryEdges(
+   BoundaryUtilityStrategy* bdry_strategy,
+   tbox::Pointer<tbox::Database> bdry_db,
+   tbox::Array<int>& edge_conds,
+   const hier::IntVector& periodic)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(bdry_strategy != (BoundaryUtilityStrategy *)NULL);
+   TBOX_ASSERT(!bdry_db.isNull());
+   TBOX_ASSERT(edge_conds.getSize() == NUM_2D_EDGES);
+#endif
+
+   int num_per_dirs = 0;
+   for (int id = 0; id < 2; id++) {
+      if (periodic(id)) num_per_dirs++;
+   }
+
+   if (num_per_dirs < 2) { // face boundary input required
+
+      for (int s = 0; s < NUM_2D_EDGES; s++) {
+
+         string bdry_loc_str;
+         switch (s) {
+            case XLO: { bdry_loc_str = "boundary_edge_xlo";
+                        break;
+            }
+            case XHI: { bdry_loc_str = "boundary_edge_xhi";
+                        break;
+            }
+            case YLO: { bdry_loc_str = "boundary_edge_ylo";
+                        break;
+            }
+            case YHI: { bdry_loc_str = "boundary_edge_yhi";
+                        break;
+            }
+            default: NULL_STATEMENT;
+         }
+
+         bool need_data_read = true;
+         if (num_per_dirs > 0) {
+            if (periodic(0) && (s == XLO || s == XHI)) {
+               need_data_read = false;
+            } else if (periodic(1) && (s == YLO || s == YHI)) {
+               need_data_read = false;
+            }
+         }
+
+         if (need_data_read) {
+            if (bdry_db->keyExists(bdry_loc_str)) {
+               tbox::Pointer<tbox::Database> bdry_loc_db =
+                  bdry_db->getDatabase(bdry_loc_str);
+               if (!bdry_loc_db.isNull()) {
+                  if (bdry_loc_db->keyExists("boundary_condition")) {
+                     string bdry_cond_str =
+                        bdry_loc_db->getString("boundary_condition");
+                     if (bdry_cond_str == "FLOW") {
+                        edge_conds[s] = FLOW_BC;
+                     } else if (bdry_cond_str == "REFLECT") {
+                        edge_conds[s] = REFLECT_BC;
+                     } else if (bdry_cond_str == "DIRICHLET") {
+                        edge_conds[s] = DIRICHLET_BC;
+                        bdry_strategy->
+                        readDirichletBoundaryDataEntry(bdry_loc_db,
+                           bdry_loc_str,
+                           s);
+                     } else {
+                        TBOX_ERROR("Unknown edge boundary string = "
+                           << bdry_cond_str << " found in input." << endl);
+                     }
+                  } else {
+                     TBOX_ERROR("'boundary_condition' entry missing from "
+                        << bdry_loc_str << " input database." << endl);
+                  }
+               }
+            } else {
+               TBOX_ERROR(bdry_loc_str
+                  << " database entry not found in input." << endl);
+            }
+         } // if (need_data_read)
+
+      } // for (int s = 0 ...
+
+   } // if (num_per_dirs < 2)
+
+}
+
+/*
+ * Private function to read 2D node boundary data from input database.
+ */
+
+void SkeletonBoundaryUtilities2::read2dBdryNodes(
+   tbox::Pointer<tbox::Database> bdry_db,
+   const tbox::Array<int>& edge_conds,
+   tbox::Array<int>& node_conds,
+   const hier::IntVector& periodic)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!bdry_db.isNull());
+   TBOX_ASSERT(edge_conds.getSize() == NUM_2D_EDGES);
+   TBOX_ASSERT(node_conds.getSize() == NUM_2D_NODES);
+#endif
+
+   int num_per_dirs = 0;
+   for (int id = 0; id < 2; id++) {
+      if (periodic(id)) num_per_dirs++;
+   }
+
+   if (num_per_dirs < 1) { // node boundary data required
+
+      for (int s = 0; s < NUM_2D_NODES; s++) {
+
+         string bdry_loc_str;
+         switch (s) {
+            case XLO_YLO_2D: { bdry_loc_str = "boundary_node_xlo_ylo";
+                               break;
+            }
+            case XHI_YLO_2D: { bdry_loc_str = "boundary_node_xhi_ylo";
+                               break;
+            }
+            case XLO_YHI_2D: { bdry_loc_str = "boundary_node_xlo_yhi";
+                               break;
+            }
+            case XHI_YHI_2D: { bdry_loc_str = "boundary_node_xhi_yhi";
+                               break;
+            }
+            default: NULL_STATEMENT;
+         }
+
+         if (bdry_db->keyExists(bdry_loc_str)) {
+            tbox::Pointer<tbox::Database> bdry_loc_db =
+               bdry_db->getDatabase(bdry_loc_str);
+            if (!bdry_loc_db.isNull()) {
+               if (bdry_loc_db->keyExists("boundary_condition")) {
+                  string bdry_cond_str =
+                     bdry_loc_db->getString("boundary_condition");
+                  if (bdry_cond_str == "XFLOW") {
+                     node_conds[s] = XFLOW_BC;
+                  } else if (bdry_cond_str == "YFLOW") {
+                     node_conds[s] = YFLOW_BC;
+                  } else if (bdry_cond_str == "XREFLECT") {
+                     node_conds[s] = XREFLECT_BC;
+                  } else if (bdry_cond_str == "YREFLECT") {
+                     node_conds[s] = YREFLECT_BC;
+                  } else if (bdry_cond_str == "XDIRICHLET") {
+                     node_conds[s] = XDIRICHLET_BC;
+                  } else if (bdry_cond_str == "YDIRICHLET") {
+                     node_conds[s] = YDIRICHLET_BC;
+                  } else {
+                     TBOX_ERROR("Unknown node boundary string = "
+                        << bdry_cond_str << " found in input." << endl);
+                  }
+
+                  string proper_edge;
+                  string proper_edge_data;
+                  bool no_edge_data_found = false;
+                  if (bdry_cond_str == "XFLOW" ||
+                      bdry_cond_str == "XDIRICHLET" ||
+                      bdry_cond_str == "XREFLECT") {
+                     if (s == XLO_YLO_2D || s == XLO_YHI_2D) {
+                        proper_edge = "XLO";
+                        if (bdry_cond_str == "XFLOW" &&
+                            edge_conds[XLO] != FLOW_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "FLOW";
+                        }
+                        if (bdry_cond_str == "XDIRICHLET" &&
+                            edge_conds[XLO] != DIRICHLET_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "DIRICHLET";
+                        }
+                        if (bdry_cond_str == "XREFLECT" &&
+                            edge_conds[XLO] != REFLECT_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "REFLECT";
+                        }
+                     } else {
+                        proper_edge = "XHI";
+                        if (bdry_cond_str == "XFLOW" &&
+                            edge_conds[XHI] != FLOW_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "FLOW";
+                        }
+                        if (bdry_cond_str == "XDIRICHLET" &&
+                            edge_conds[XHI] != DIRICHLET_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "DIRICHLET";
+                        }
+                        if (bdry_cond_str == "XREFLECT" &&
+                            edge_conds[XHI] != REFLECT_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "REFLECT";
+                        }
+                     }
+                  } else if (bdry_cond_str == "YFLOW" ||
+                             bdry_cond_str == "YDIRICHLET" ||
+                             bdry_cond_str == "YREFLECT") {
+                     if (s == XLO_YLO_2D || s == XHI_YLO_2D) {
+                        proper_edge = "YLO";
+                        if (bdry_cond_str == "YFLOW" &&
+                            edge_conds[YLO] != FLOW_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "FLOW";
+                        }
+                        if (bdry_cond_str == "YDIRICHLET" &&
+                            edge_conds[YLO] != DIRICHLET_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "DIRICHLET";
+                        }
+                        if (bdry_cond_str == "YREFLECT" &&
+                            edge_conds[YLO] != REFLECT_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "REFLECT";
+                        }
+                     } else {
+                        proper_edge = "YHI";
+                        if (bdry_cond_str == "YFLOW" &&
+                            edge_conds[YHI] != FLOW_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "FLOW";
+                        }
+                        if (bdry_cond_str == "YDIRICHLET" &&
+                            edge_conds[YHI] != DIRICHLET_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "DIRICHLET";
+                        }
+                        if (bdry_cond_str == "YREFLECT" &&
+                            edge_conds[YHI] != REFLECT_BC) {
+                           no_edge_data_found = true;
+                           proper_edge_data = "REFLECT";
+                        }
+                     }
+                  }
+                  if (no_edge_data_found) {
+                     TBOX_ERROR(
+                        "Bdry condition " << bdry_cond_str
+                        << " found for "
+                        << bdry_loc_str
+                        << "\n but no "
+                        << proper_edge_data
+                        << " data found for edge "
+                        << proper_edge << endl);
+                  }
+
+               } else {
+                  TBOX_ERROR("'boundary_condition' entry missing from "
+                     << bdry_loc_str << " input database." << endl);
+               }
+            }
+         } else {
+            TBOX_ERROR(bdry_loc_str
+               << " database entry not found in input." << endl);
+         }
+
+      } // for (int s = 0 ...
+
+   } // if (num_per_dirs < 1)
+
+}
+
+/*
+ * Private function to get boundary orientation information for
+ * 2D boundary condition checking.  Called from checkBdryData().
+ */
+
+void SkeletonBoundaryUtilities2::get2dBdryDirectionCheckValues(
+   int& idir,
+   int& offsign,
+   int btype,
+   int bloc,
+   int bcase)
+{
+
+   string bdry_type_str;
+
+   if (btype == EDGE2D_BDRY_TYPE) {
+
+      bdry_type_str = "NODE";
+
+      if (bloc == XLO || bloc == XHI) {
+         idir = 0;
+         if (bloc == XLO) {
+            offsign = -1;
+         } else {
+            offsign = 1;
+         }
+      } else if (bloc == YLO || bloc == YHI) {
+         idir = 1;
+         if (bloc == YLO) {
+            offsign = -1;
+         } else {
+            offsign = 1;
+         }
+      } else {
+         TBOX_ERROR(
+            "Unknown boundary location " << bloc
+            <<
+            " passed to SkeletonBoundaryUtilities2::checkBdryData()"
+            << "\n for "
+            << bdry_type_str << " boundary " << endl);
+      }
+
+   } else if (btype == NODE2D_BDRY_TYPE) {
+
+      bdry_type_str = "NODE";
+
+      if (bcase == XFLOW_BC || bcase == XREFLECT_BC ||
+          bcase == XDIRICHLET_BC) {
+         idir = 0;
+         if (bloc == XLO_YLO_2D || bloc == XLO_YHI_2D) {
+            offsign = -1;
+         } else {
+            offsign = 1;
+         }
+      } else if (bcase == YFLOW_BC || bcase == YREFLECT_BC ||
+                 bcase == YDIRICHLET_BC) {
+         idir = 1;
+         if (bloc == XLO_YLO_2D || bloc == XHI_YLO_2D) {
+            offsign = -1;
+         } else {
+            offsign = 1;
+         }
+      }
+
+   } else {
+      TBOX_ERROR(
+         "Unknown boundary type " << btype
+         <<
+         " passed to SkeletonBoundaryUtilities2::checkBdryData()"
+         << "\n for " << bdry_type_str
+         << " at location " << bloc << endl);
+   }
+
+}
+
+/*
+ * Private function to stuff 2D boundary contants into Fortran common blocks
+ */
+
+void SkeletonBoundaryUtilities2::stuff2dBdryFortConst()
+{
+   F77_FUNC(stufskelbdryloc2d, STUFSKELBDRYLOC2D) (
+      XLO, XHI, YLO, YHI,
+      XLO_YLO_2D, XHI_YLO_2D, XLO_YHI_2D, XHI_YHI_2D);
+   F77_FUNC(stufskelbdrycond2d, STUFSKELBDRYCOND2D) (
+      FLOW_BC,
+      XFLOW_BC, YFLOW_BC,
+      REFLECT_BC,
+      XREFLECT_BC, YREFLECT_BC,
+      DIRICHLET_BC,
+      XDIRICHLET_BC, YDIRICHLET_BC);
+   s_fortran_constants_stuffed = true;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/SkeletonBoundaryUtilities2.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/SkeletonBoundaryUtilities2.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,261 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility routines for manipulating Skeleton 2d boundary data 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/appu/BoundaryUtilityStrategy.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Pointer.h"
+#ifndef included_String
+#include <string>
+#define included_String
+#endif
+
+/*!
+ * @brief Class SkeletonBoundaryUtilities2 is a utility class that
+ * simplifies the implementation of simple physical boundary data in
+ * 2 spatial dimensions.  It contains routines for reading boundary data
+ * information from input files, applying those boundary conditions,
+ * and error checking boundary data.  These routines apply to the
+ * case of cell-centered double data only.  One may use all of these
+ * capabilities, or use the input reading, boundary setting, and error
+ * checking routines independently.
+ *
+ * To use the boundary condition input reading capabilities, the format
+ * of the input file section containing the boundary information must
+ * be as described next.  Boundary node and edge entries are only
+ * required for those that are not filled automatically when periodic
+ * conditions apply.
+ *
+ * The boundary condition for edge "*" is provided in a section as follows:
+ *
+ * \verbatim
+ *
+ *    boundary_edge_* {
+ *       boundary_condition  = ...  // boundary condition string identifier
+ *       // Any problem-specific boundary data read by user routines
+ *       // is placed here...
+ *    }
+ *
+ * Allowable edge identifiers (i.e., values for "*") are:
+ *       xlo, xhi, ylo, yhi
+ * Supported edge boundary_condition strin values are:
+ *       "FLOW", "REFLECT", "DIRICHLET", "NEUMANN"
+ *
+ * \endverbatim
+ *
+ * The boundary condition for node "*" is provided in a section as follows:
+ *
+ * \verbatim
+ *
+ *    boundary_node_* {
+ *       boundary_condition  = ...  // boundary condition string identifier
+ *    }
+ *
+ * Allowable node identifiers (i.e., values for "*") are:
+ *       xlo_ylo, xhi_ylo, xlo_yhi, xhi_yhi
+ * Supported node boundary_condition string values are:
+ *       "XFLOW", "YFLOW",
+ *       "XREFLECT", "YREFLECT",
+ *       "XDIRICHLET", "YDIRICHLET",
+ *       "XNEUMANN", "YNEUMANN"
+ *
+ * \endverbatim
+ *
+ * Note that node conditions must be consistent with adjacent edge conditions.
+ *
+ * See the include file SkeletonBoundaryDefines.h for integer constant
+ * definitions that apply for the various boundary types, locations,
+ * and boundary conditions.  If you choose to use the input reading
+ * capabilities only and write your own boundary condition routines in
+ * FORTRAN, you should note that the integer constants for the various
+ * boundary condition types and locations are automatically "stuffed" into
+ * FORTRAN common blocks.  This avoids potential problems with
+ * inconsistencies between C++ and FORTRAN usage.  Please see the
+ * FORTRAN include file cartbdryparams2d.i for details.
+ *
+ * @see appu::BoundaryUtilityStrategy2
+ */
+
+using namespace std;
+using namespace SAMRAI;
+using namespace appu;
+
+struct SkeletonBoundaryUtilities2 {
+public:
+   /*!
+    * Function to read 2d boundary data from input database.
+    * The integer boundary condition types are placed in the integer
+    * arrays supplied by the caller (typically, the concrete
+    * BoundaryUtilityStrategy object provided).  When DIRICHLET or
+    * NEUMANN conditions are specified, control is passed to the
+    * BoundaryUtilityStrategy to read the boundary state data specific to
+    * the problem.
+    *
+    * Errors will be reported and the program will abort whenever necessary
+    * boundary condition information is missing in the input database, or
+    * when the data read in is either unknown or inconsistent.  The periodic
+    * domain information is used to determine which boundary edge or
+    * node entries are not required from input.  Error checking
+    * requires that node boundary conditions are consistent
+    * with those specified for the edges.
+    *
+    * When assertion checking is active, assertions will result when any
+    * of the pointer arguments is null, or an array is passed in with the
+    * the wrong size.
+    *
+    * @param bdry_strategy user-defined object that reads DIRICHLET or NEUMANN
+    *                      conditions
+    * @param bdry_db       input database containing all boundary data
+    * @param edge_conds    array into which integer edge boundary condition types
+    *                      are read
+    * @param node_conds    array into which integer node boundary condition types
+    *                      are read
+    * @param periodic      integer vector specifying which coordinate
+    *                      directions are periodic (e.g., value returned from
+    *                      GridGeometry2::getPeriodicShift())
+    */
+   static void
+   readBoundaryInput(
+      BoundaryUtilityStrategy* bdry_strategy,
+      tbox::Pointer<tbox::Database> bdry_db,
+      tbox::Array<int>& edge_conds,
+      tbox::Array<int>& node_conds,
+      const hier::IntVector& periodic);
+
+   /*!
+    * Function to fill 2d edge boundary values for a patch.
+    *
+    * When assertion checking is active, assertions will result when any
+    * of the pointer arguments is null, or an array is passed in with the
+    * the wrong size.
+    *
+    * @param varname             String name of variable (for error reporting).
+    * @param vardata             Cell-centered patch data object to fill.
+    * @param patch               hier::Patch on which data object lives.
+    * @param ghost_width_to_fill Width of ghost region to fill.
+    * @param bdry_edge_conds     tbox::Array of boundary condition types for patch edges.
+    * @param bdry_edge_values    tbox::Array of boundary values for patch edges.
+    */
+   static void
+   fillEdgeBoundaryData(
+      const string& varname,
+      tbox::Pointer<pdat::CellData<double> >& vardata,
+      const hier::Patch& patch,
+      const hier::IntVector& ghost_width_to_fill,
+      const tbox::Array<int>& bdry_edge_conds,
+      const tbox::Array<double>& bdry_edge_values);
+
+   /*!
+    * Function to fill 2d node boundary values for a patch.
+    *
+    * When assertion checking is active, assertions will result when any
+    * of the pointer arguments is null, or an array is passed in with the
+    * the wrong size.
+    *
+    * @param varname             String name of variable (for error reporting).
+    * @param vardata             Cell-centered patch data object to fill.
+    * @param patch               hier::Patch on which data object lives.
+    * @param ghost_width_to_fill Width of ghost region to fill.
+    * @param bdry_node_conds     tbox::Array of boundary condition types for patch nodes.
+    * @param bdry_edge_values    tbox::Array of boundary values for patch edges.
+    */
+   static void
+   fillNodeBoundaryData(
+      const string& varname,
+      tbox::Pointer<pdat::CellData<double> >& vardata,
+      const hier::Patch& patch,
+      const hier::IntVector& ghost_width_to_fill,
+      const tbox::Array<int>& bdry_node_conds,
+      const tbox::Array<double>& bdry_edge_values);
+
+   /*!
+    * Function that returns the integer edge boundary location
+    * corresponding to the given node location and node boundary
+    * condition.
+    *
+    * If the node boundary condition type or node location are unknown,
+    * or the boundary condition type is inconsistant with the node location
+    * an error results.
+    *
+    * @return Integer edge location for node location and boundary condition type.
+    *
+    * @param node_loc   Integer location for node.
+    * @param node_btype Integer boundary condition type for node.
+    */
+   static int
+   getEdgeLocationForNodeBdry(
+      int node_loc,
+      int node_btype);
+
+   /*!
+    * Function to check 2d boundary data for a patch data quantity on
+    * a patch after it is set.  A warning message will be sent to log
+    * file for each bad boundary value that is found.
+    *
+    * When assertion checking is active, assertions will result when any
+    * of the pointer arguments is null, or an array is passed in with the
+    * the wrong size.
+    *
+    * @return Integer number of bad boundary values found.
+    *
+    * @param varname       String name of variable (for error reporting).
+    * @param patch         hier::Patch on which data object lives.
+    * @param data_id       hier::Patch data index for data on patch.
+    * @param depth         Depth index of patch data to check.
+    * @param gcw_to_check  Width of ghost region to check.
+    * @param bbox          Boundary box to check.
+    * @param bcase         Boundary condition type for given edge or node.
+    * @param bstate        Boundary value that applies in DIRICHLET or NEUMANN case.
+    */
+   static int
+   checkBdryData(
+      const string& varname,
+      const hier::Patch& patch,
+      int data_id,
+      int depth,
+      const hier::IntVector& gcw_to_check,
+      const hier::BoundaryBox& bbox,
+      int bcase,
+      double bstate);
+
+private:
+   static bool s_fortran_constants_stuffed;
+
+   static void
+   read2dBdryEdges(
+      BoundaryUtilityStrategy* bdry_strategy,
+      tbox::Pointer<tbox::Database> bdry_db,
+      tbox::Array<int>& edge_conds,
+      const hier::IntVector& periodic);
+
+   static void
+   read2dBdryNodes(
+      tbox::Pointer<tbox::Database> bdry_db,
+      const tbox::Array<int>& edge_conds,
+      tbox::Array<int>& node_conds,
+      const hier::IntVector& periodic);
+
+   static void
+   get2dBdryDirectionCheckValues(
+      int& idir,
+      int& offsign,
+      int btype,
+      int bloc,
+      int bcase);
+
+   static void
+   stuff2dBdryFortConst();
+};
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/SkeletonBoundaryUtilities3.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/SkeletonBoundaryUtilities3.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1634 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility routines for manipulating 3D Skeleton boundary data 
+ *
+ ************************************************************************/
+
+#include "SkeletonBoundaryUtilities3.h"
+
+#include "SAMRAI/appu/CartesianBoundaryDefines.h"
+
+#include "SAMRAI/hier/BlockPatchGeometry.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN 77 routines used in                 *
+ * boundary condition implementation.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+extern "C" {
+
+void F77_FUNC(stufcartbdryloc3d, STUFCARTBDRYLOC3D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &);
+
+void F77_FUNC(stufcartbdrycond3d, STUFCARTBDRYCOND3D) (
+   const int &,
+   const int &, const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &,
+   const int &, const int &, const int &);
+
+void F77_FUNC(getcartfacebdry3d, GETCARTFACEBDRY3D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const double *,
+   const int &,
+   const int &,
+   const double *,
+   double *,
+   const int &);
+
+void F77_FUNC(getcartedgebdry3d, GETCARTEDGEBDRY3D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const double *,
+   const int &,
+   const int &,
+   const double *,
+   double *,
+   const int &);
+
+void F77_FUNC(getcartnodebdry3d, GETCARTNODEBDRY3D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const double *,
+   const int &,
+   const int &,
+   const double *,
+   double *,
+   const int &);
+
+}
+using namespace SAMRAI;
+using namespace appu;
+
+bool SkeletonBoundaryUtilities3::s_fortran_constants_stuffed = false;
+
+/*
+ * This function reads 3D boundary data from given input database.
+ * The integer boundary condition types are placed in the integer
+ * arrays supplied by the caller (typically, the concrete BoundaryStrategy
+ * provided).  When DIRICHLET or NEUMANN conditions are specified, control
+ * is passed to the BoundaryStrategy to read the boundary state data
+ * specific to the problem.
+ *
+ * Errors will be reported and the program will abort whenever necessary
+ * boundary condition information is missing in the input database, or
+ * when the data read in is either unknown or inconsistent.  The periodic
+ * domain information is used to determine which boundary face, edge, or
+ * node entries are not required from input.  Error checking requires
+ * that node and edge boundary conditions are consistent with those
+ * specified for the faces.
+ *
+ * Arguments are:
+ *    bdry_strategy .... object that reads DIRICHLET or NEUMANN conditions
+ *    bdry_db .......... input database containing all boundary data
+ *    face_conds ....... array into which integer boundary conditions
+ *                       for faces are read
+ *    edge_conds ....... array into which integer boundary conditions
+ *                       for edges are read
+ *    node_conds ....... array into which integer boundary conditions
+ *                       for nodes are read
+ *    periodic ......... integer vector specifying which coordinate
+ *                       directions are periodic (value returned from
+ *                       GridGeometry3::getPeriodicShift())
+ */
+
+void SkeletonBoundaryUtilities3::readBoundaryInput(
+   BoundaryUtilityStrategy* bdry_strategy,
+   tbox::Pointer<tbox::Database> bdry_db,
+   tbox::Array<int>& face_conds,
+   tbox::Array<int>& edge_conds,
+   tbox::Array<int>& node_conds,
+   const hier::IntVector& periodic)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(bdry_strategy != (BoundaryUtilityStrategy *)NULL);
+   TBOX_ASSERT(!bdry_db.isNull());
+   TBOX_ASSERT(face_conds.getSize() == NUM_3D_FACES);
+   TBOX_ASSERT(edge_conds.getSize() == NUM_3D_EDGES);
+   TBOX_ASSERT(node_conds.getSize() == NUM_3D_NODES);
+#endif
+
+   if (!s_fortran_constants_stuffed) {
+      stuff3dBdryFortConst();
+   }
+
+   read3dBdryFaces(bdry_strategy,
+      bdry_db,
+      face_conds,
+      periodic);
+
+   read3dBdryEdges(bdry_db,
+      face_conds,
+      edge_conds,
+      periodic);
+
+   read3dBdryNodes(bdry_db,
+      face_conds,
+      node_conds,
+      periodic);
+
+}
+
+/*
+ * Function to fill face boundary values.
+ *
+ * Arguments are:
+ *    varname .............. name of variable (for error reporting)
+ *    vardata .............. cell-centered patch data object to check
+ *    patch ................ patch on which data object lives
+ *    ghost_width_to_fill .. width of ghost region to fill
+ *    bdry_face_conds ...... array of boundary conditions for patch faces
+ *    bdry_face_values ..... array of boundary values for faces
+ *                           (this must be consistent with boundary
+ *                           condition types)
+ */
+
+void SkeletonBoundaryUtilities3::fillFaceBoundaryData(
+   const string& varname,
+   tbox::Pointer<pdat::CellData<double> >& vardata,
+   const hier::Patch& patch,
+   const hier::IntVector& ghost_fill_width,
+   const tbox::Array<int>& bdry_face_conds,
+   const tbox::Array<double>& bdry_face_values)
+{
+   NULL_USE(varname);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!vardata.isNull());
+   TBOX_ASSERT(bdry_face_conds.getSize() == NUM_3D_FACES);
+//   TBOX_ASSERT(bdry_face_values.getSize() == NUM_3D_FACES*(vardata->getDepth()));
+#endif
+
+   if (!s_fortran_constants_stuffed) {
+      stuff3dBdryFortConst();
+   }
+
+   const tbox::Pointer<hier::BlockPatchGeometry> pgeom =
+      patch.getPatchGeometry();
+   //const double* dx = pgeom->getDx();
+   const double dx[3] = { 0., 0., 0. };
+
+   const hier::Box& interior(patch.getBox());
+   const hier::Index& ifirst(interior.lower());
+   const hier::Index& ilast(interior.upper());
+
+   const hier::IntVector& ghost_cells = vardata->getGhostCellWidth();
+
+   hier::IntVector gcw_to_fill = hier::IntVector::min(ghost_cells,
+         ghost_fill_width);
+   const tbox::Array<hier::BoundaryBox>& face_bdry =
+      pgeom->getCodimensionBoundaries(FACE3D_BDRY_TYPE);
+   for (int i = 0; i < face_bdry.getSize(); i++) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(face_bdry[i].getBoundaryType() == FACE3D_BDRY_TYPE);
+#endif
+
+      int bface_loc = face_bdry[i].getLocationIndex();
+
+      hier::Box fill_box(pgeom->getBoundaryFillBox(face_bdry[i],
+                            interior,
+                            gcw_to_fill));
+      const hier::Index& ibeg(fill_box.lower());
+      const hier::Index& iend(fill_box.upper());
+
+      F77_FUNC(getcartfacebdry3d, GETCARTFACEBDRY3D) (
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         ibeg(0), iend(0),
+         ibeg(1), iend(1),
+         ibeg(2), iend(2),
+         ghost_cells(0), ghost_cells(1), ghost_cells(2),
+         dx,
+         bface_loc,
+         bdry_face_conds[bface_loc],
+         bdry_face_values.getPointer(),
+         vardata->getPointer(),
+         vardata->getDepth());
+
+   }
+
+}
+
+/*
+ * Function to fill edge boundary values.
+ *
+ * Arguments are:
+ *    varname .............. name of variable (for error reporting)
+ *    vardata .............. cell-centered patch data object to check
+ *    patch ................ patch on which data object lives
+ *    ghost_width_to_fill .. width of ghost region to fill
+ *    bdry_edge_conds ...... array of boundary conditions for patch edges
+ *    bdry_face_values ..... array of boundary values for faces
+ *                           (this must be consistent with boundary
+ *                           condition types)
+ */
+
+void SkeletonBoundaryUtilities3::fillEdgeBoundaryData(
+   const string& varname,
+   tbox::Pointer<pdat::CellData<double> >& vardata,
+   const hier::Patch& patch,
+   const hier::IntVector& ghost_fill_width,
+   const tbox::Array<int>& bdry_edge_conds,
+   const tbox::Array<double>& bdry_face_values)
+{
+   NULL_USE(varname);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!vardata.isNull());
+   TBOX_ASSERT(bdry_edge_conds.getSize() == NUM_3D_EDGES);
+   TBOX_ASSERT(bdry_face_values.getSize() == NUM_3D_FACES * (vardata->getDepth()));
+#endif
+
+   if (!s_fortran_constants_stuffed) {
+      stuff3dBdryFortConst();
+   }
+
+   const tbox::Pointer<hier::BlockPatchGeometry> pgeom =
+      patch.getPatchGeometry();
+   //const double* dx = pgeom->getDx();
+   const double dx[3] = { 0., 0., 0. };
+
+   const hier::Box& interior(patch.getBox());
+   const hier::Index& ifirst(interior.lower());
+   const hier::Index& ilast(interior.upper());
+
+   const hier::IntVector& ghost_cells = vardata->getGhostCellWidth();
+
+   hier::IntVector gcw_to_fill = hier::IntVector::min(ghost_cells,
+         ghost_fill_width);
+
+   const tbox::Array<hier::BoundaryBox>& edge_bdry =
+      pgeom->getCodimensionBoundaries(EDGE3D_BDRY_TYPE);
+   for (int i = 0; i < edge_bdry.getSize(); i++) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(edge_bdry[i].getBoundaryType() == EDGE3D_BDRY_TYPE);
+#endif
+
+      int bedge_loc = edge_bdry[i].getLocationIndex();
+
+      hier::Box fill_box(pgeom->getBoundaryFillBox(edge_bdry[i],
+                            interior,
+                            gcw_to_fill));
+      const hier::Index& ibeg(fill_box.lower());
+      const hier::Index& iend(fill_box.upper());
+
+      F77_FUNC(getcartedgebdry3d, GETCARTEDGEBDRY3D) (
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         ibeg(0), iend(0),
+         ibeg(1), iend(1),
+         ibeg(2), iend(2),
+         ghost_cells(0), ghost_cells(1), ghost_cells(2),
+         dx,
+         bedge_loc,
+         bdry_edge_conds[bedge_loc],
+         bdry_face_values.getPointer(),
+         vardata->getPointer(),
+         vardata->getDepth());
+
+   }
+
+}
+
+/*
+ * Function to fill node boundary values.
+ *
+ * Arguments are:
+ *    varname .............. name of variable (for error reporting)
+ *    vardata .............. cell-centered patch data object to check
+ *    patch ................ patch on which data object lives
+ *    ghost_width_to_fill .. width of ghost region to fill
+ *    bdry_node_conds ...... array of boundary conditions for patch nodes
+ *    bdry_face_values ..... array of boundary values for faces
+ *                           (this must be consistent with boundary
+ *                           condition types)
+ */
+
+void SkeletonBoundaryUtilities3::fillNodeBoundaryData(
+   const string& varname,
+   tbox::Pointer<pdat::CellData<double> >& vardata,
+   const hier::Patch& patch,
+   const hier::IntVector& ghost_fill_width,
+   const tbox::Array<int>& bdry_node_conds,
+   const tbox::Array<double>& bdry_face_values)
+{
+   NULL_USE(varname);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!vardata.isNull());
+   TBOX_ASSERT(bdry_node_conds.getSize() == NUM_3D_NODES);
+   TBOX_ASSERT(bdry_face_values.getSize() == NUM_3D_FACES * (vardata->getDepth()));
+#endif
+
+   if (!s_fortran_constants_stuffed) {
+      stuff3dBdryFortConst();
+   }
+
+   const tbox::Pointer<hier::BlockPatchGeometry> pgeom =
+      patch.getPatchGeometry();
+   //const double* dx = pgeom->getDx();
+   const double dx[3] = { 0., 0., 0. };
+
+   const hier::Box& interior(patch.getBox());
+   const hier::Index& ifirst(interior.lower());
+   const hier::Index& ilast(interior.upper());
+
+   const hier::IntVector& ghost_cells = vardata->getGhostCellWidth();
+
+   hier::IntVector gcw_to_fill = hier::IntVector::min(ghost_cells,
+         ghost_fill_width);
+
+   const tbox::Array<hier::BoundaryBox>& node_bdry =
+      pgeom->getCodimensionBoundaries(NODE3D_BDRY_TYPE);
+   for (int i = 0; i < node_bdry.getSize(); i++) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(node_bdry[i].getBoundaryType() == NODE3D_BDRY_TYPE);
+#endif
+
+      int bnode_loc = node_bdry[i].getLocationIndex();
+
+      hier::Box fill_box(pgeom->getBoundaryFillBox(node_bdry[i],
+                            interior,
+                            gcw_to_fill));
+      const hier::Index& ibeg(fill_box.lower());
+      const hier::Index& iend(fill_box.upper());
+
+      F77_FUNC(getcartnodebdry3d, GETCARTNODEBDRY3D) (
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         ibeg(0), iend(0),
+         ibeg(1), iend(1),
+         ibeg(2), iend(2),
+         ghost_cells(0), ghost_cells(1), ghost_cells(2),
+         dx,
+         bnode_loc,
+         bdry_node_conds[bnode_loc],
+         bdry_face_values.getPointer(),
+         vardata->getPointer(),
+         vardata->getDepth());
+
+   }
+
+}
+
+/*
+ * Function that returns the integer face boundary location
+ * corresponding to the given edge location and edge boundary
+ * condition.
+ *
+ * If the edge boundary condition type or edge location are unknown,
+ * or the boundary condition type is inconsistant with the edge location
+ * an error results.
+ */
+
+int SkeletonBoundaryUtilities3::getFaceLocationForEdgeBdry(
+   int edge_loc,
+   int edge_btype)
+{
+
+   int ret_face = -1;
+
+   switch (edge_btype) {
+      case XFLOW_BC:
+      case XREFLECT_BC:
+      case XDIRICHLET_BC:
+      case XNEUMANN_BC:
+      {
+         if (edge_loc == XLO_ZLO_3D || edge_loc == XLO_ZHI_3D ||
+             edge_loc == XLO_YLO_3D || edge_loc == XLO_YHI_3D) {
+            ret_face = XLO;
+         } else if (edge_loc == XHI_ZLO_3D || edge_loc == XHI_ZHI_3D ||
+                    edge_loc == XHI_YLO_3D || edge_loc == XHI_YHI_3D) {
+            ret_face = XHI;
+         }
+         break;
+      }
+      case YFLOW_BC:
+      case YREFLECT_BC:
+      case YDIRICHLET_BC:
+      case YNEUMANN_BC:
+      {
+         if (edge_loc == YLO_ZLO_3D || edge_loc == YLO_ZHI_3D ||
+             edge_loc == XLO_YLO_3D || edge_loc == XHI_YLO_3D) {
+            ret_face = YLO;
+         } else if (edge_loc == YHI_ZLO_3D || edge_loc == YHI_ZHI_3D ||
+                    edge_loc == XLO_YHI_3D || edge_loc == XHI_YHI_3D) {
+            ret_face = YHI;
+         }
+         break;
+      }
+      case ZFLOW_BC:
+      case ZREFLECT_BC:
+      case ZDIRICHLET_BC:
+      case ZNEUMANN_BC:
+      {
+         if (edge_loc == YLO_ZLO_3D || edge_loc == YHI_ZLO_3D ||
+             edge_loc == XLO_ZLO_3D || edge_loc == XHI_ZLO_3D) {
+            ret_face = ZLO;
+         } else if (edge_loc == YLO_ZHI_3D || edge_loc == YHI_ZHI_3D ||
+                    edge_loc == XLO_ZHI_3D || edge_loc == XHI_ZHI_3D) {
+            ret_face = ZHI;
+         }
+         break;
+      }
+      default: {
+         TBOX_ERROR("Unknown edge boundary condition type = "
+            << edge_btype << " passed to \n"
+            << "SkeletonBoundaryUtilities3::getFaceLocationForEdgeBdry"
+            << endl);
+      }
+   }
+
+   if (ret_face == -1) {
+      TBOX_ERROR("Edge boundary condition type = "
+         << edge_btype << " and edge location = " << edge_loc
+         << "\n passed to "
+         << "SkeletonBoundaryUtilities3::getFaceLocationForEdgeBdry"
+         << " are inconsistant." << endl);
+   }
+
+   return ret_face;
+
+}
+
+/*
+ * Function that returns the integer face boundary location
+ * corresponding to the given node location and node boundary
+ * condition.
+ *
+ * If the node boundary condition type or node location are unknown,
+ * or the boundary condition type is inconsistant with the node location
+ * an error results.
+ */
+
+int SkeletonBoundaryUtilities3::getFaceLocationForNodeBdry(
+   int node_loc,
+   int node_btype)
+{
+
+   int ret_face = -1;
+
+   switch (node_btype) {
+      case XFLOW_BC:
+      case XREFLECT_BC:
+      case XDIRICHLET_BC:
+      case XNEUMANN_BC:
+      {
+         if (node_loc == XLO_YLO_ZLO || node_loc == XLO_YHI_ZLO ||
+             node_loc == XLO_YLO_ZHI || node_loc == XLO_YHI_ZHI) {
+            ret_face = XLO;
+         } else {
+            ret_face = XHI;
+         }
+         break;
+      }
+      case YFLOW_BC:
+      case YREFLECT_BC:
+      case YDIRICHLET_BC:
+      case YNEUMANN_BC:
+      {
+         if (node_loc == XLO_YLO_ZLO || node_loc == XHI_YLO_ZLO ||
+             node_loc == XLO_YLO_ZHI || node_loc == XHI_YLO_ZHI) {
+            ret_face = YLO;
+         } else {
+            ret_face = YHI;
+         }
+         break;
+      }
+      case ZFLOW_BC:
+      case ZREFLECT_BC:
+      case ZDIRICHLET_BC:
+      case ZNEUMANN_BC:
+      {
+         if (node_loc == XLO_YLO_ZLO || node_loc == XHI_YLO_ZLO ||
+             node_loc == XLO_YHI_ZLO || node_loc == XHI_YHI_ZLO) {
+            ret_face = ZLO;
+         } else {
+            ret_face = ZHI;
+         }
+         break;
+      }
+      default: {
+         TBOX_ERROR("Unknown node boundary condition type = "
+            << node_btype << " passed to \n"
+            << "SkeletonBoundaryUtilities3::getFaceLocationForNodeBdry"
+            << endl);
+      }
+   }
+
+   if (ret_face == -1) {
+      TBOX_ERROR("Node boundary condition type = "
+         << node_btype << " and node location = " << node_loc
+         << "\n passed to "
+         << "SkeletonBoundaryUtilities3::getFaceLocationForNodeBdry"
+         << " are inconsistant." << endl);
+   }
+
+   return ret_face;
+
+}
+
+/*
+ * Function to check 3D boundary data filling.  Arguments are:
+ *
+ *    varname ..... name of variable (for error reporting)
+ *    patch ....... patch on which boundary data to check lives
+ *    data_id ..... patch data index on patch
+ *    depth ....... depth index of data to check
+ *    gcw_to_check. boundary ghost width to fill
+ *    bbox ........ boundary box to check
+ *    bcase ....... boundary condition case for edge or a node to check
+ *    bstate ...... boundary state that applies when such a value is
+ *                  required, such as when using Dirichlet conditions
+ */
+
+int SkeletonBoundaryUtilities3::checkBdryData(
+   const string& varname,
+   const hier::Patch& patch,
+   int data_id,
+   int depth,
+   const hier::IntVector& gcw_to_check,
+   const hier::BoundaryBox& bbox,
+   int bcase,
+   double bstate)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!varname.empty());
+   TBOX_ASSERT(data_id >= 0);
+   TBOX_ASSERT(depth >= 0);
+#endif
+
+   int num_bad_values = 0;
+
+   int btype = bbox.getBoundaryType();
+   int bloc = bbox.getLocationIndex();
+
+   tbox::Pointer<hier::BlockPatchGeometry> pgeom =
+      patch.getPatchGeometry();
+
+   tbox::Pointer<pdat::CellData<double> > vardata =
+      patch.getPatchData(data_id);
+
+   string bdry_type_str;
+   if (btype == FACE3D_BDRY_TYPE) {
+      bdry_type_str = "FACE";
+   } else if (btype == EDGE3D_BDRY_TYPE) {
+      bdry_type_str = "EDGE";
+   } else if (btype == NODE3D_BDRY_TYPE) {
+      bdry_type_str = "NODE";
+   } else {
+      TBOX_ERROR(
+         "Unknown btype " << btype
+         <<
+         " passed to SkeletonBoundaryUtilities3::checkBdryData()! "
+         << endl);
+   }
+
+   tbox::plog << "\n\nCHECKING 3D " << bdry_type_str << " BDRY DATA..." << endl;
+   tbox::plog << "varname = " << varname << " : depth = " << depth << endl;
+   tbox::plog << "bbox = " << bbox.getBox() << endl;
+   tbox::plog << "btype, bloc, bcase = "
+              << btype << ", = " << bloc << ", = " << bcase << endl;
+
+   int idir;
+   double valfact = 0.0, constval = 0.0, dxfact = 0.0;
+   int offsign;
+
+   get3dBdryDirectionCheckValues(idir, offsign,
+      btype, bloc, bcase);
+
+   if (btype == FACE3D_BDRY_TYPE) {
+
+      if (bcase == FLOW_BC) {
+         valfact = 1.0;
+         constval = 0.0;
+         dxfact = 0.0;
+      } else if (bcase == REFLECT_BC) {
+         valfact = -1.0;
+         constval = 0.0;
+         dxfact = 0.0;
+      } else if (bcase == DIRICHLET_BC) {
+         valfact = 0.0;
+         constval = bstate;
+         dxfact = 0.0;
+      } else {
+         TBOX_ERROR(
+            "Unknown bcase " << bcase
+            <<
+            " passed to SkeletonBoundaryUtilities3::checkBdryData()"
+            << "\n for " << bdry_type_str
+            << " at location " << bloc << endl);
+      }
+
+   } else if (btype == EDGE3D_BDRY_TYPE) {
+
+      if (bcase == XFLOW_BC || bcase == YFLOW_BC || bcase == ZFLOW_BC) {
+         valfact = 1.0;
+         constval = 0.0;
+         dxfact = 0.0;
+      } else if (bcase == XREFLECT_BC || bcase == YREFLECT_BC ||
+                 bcase == ZREFLECT_BC) {
+         valfact = -1.0;
+         constval = 0.0;
+         dxfact = 0.0;
+      } else if (bcase == XDIRICHLET_BC || bcase == YDIRICHLET_BC ||
+                 bcase == ZDIRICHLET_BC) {
+         valfact = 0.0;
+         constval = bstate;
+         dxfact = 0.0;
+      } else {
+         TBOX_ERROR(
+            "Unknown bcase " << bcase
+            <<
+            " passed to SkeletonBoundaryUtilities3::checkBdryData()"
+            << "\n for " << bdry_type_str
+            << " at location " << bloc << endl);
+      }
+
+   } else if (btype == NODE3D_BDRY_TYPE) {
+
+      if (bcase == XFLOW_BC || bcase == YFLOW_BC || bcase == ZFLOW_BC) {
+         valfact = 1.0;
+         constval = 0.0;
+         dxfact = 0.0;
+      } else if (bcase == XREFLECT_BC || bcase == YREFLECT_BC ||
+                 bcase == ZREFLECT_BC) {
+         valfact = -1.0;
+         constval = 0.0;
+         dxfact = 0.0;
+      } else if (bcase == XDIRICHLET_BC || bcase == YDIRICHLET_BC ||
+                 bcase == ZDIRICHLET_BC) {
+         valfact = 0.0;
+         constval = bstate;
+         dxfact = 0.0;
+      } else {
+         TBOX_ERROR(
+            "Unknown bcase " << bcase
+            <<
+            " passed to SkeletonBoundaryUtilities3::checkBdryData()"
+            << "\n for " << bdry_type_str
+            << " at location " << bloc << endl);
+      }
+
+   }
+
+   hier::Box gbox_to_check(vardata->getGhostBox() * pgeom->getBoundaryFillBox(
+                              bbox,
+                              patch.getBox(),
+                              gcw_to_check));
+
+   hier::Box cbox(gbox_to_check);
+   hier::Box dbox(gbox_to_check);
+   hier::Index ifirst(vardata->getBox().lower());
+   hier::Index ilast(vardata->getBox().upper());
+
+   if (offsign == -1) {
+      cbox.lower(idir) = ifirst(idir) - 1;
+      cbox.upper(idir) = ifirst(idir) - 1;
+      dbox.lower(idir) = ifirst(idir);
+      dbox.upper(idir) = ifirst(idir);
+   } else {
+      cbox.lower(idir) = ilast(idir) + 1;
+      cbox.upper(idir) = ilast(idir) + 1;
+      dbox.lower(idir) = ilast(idir);
+      dbox.upper(idir) = ilast(idir);
+   }
+
+   pdat::CellIterator id(dbox);
+   for (pdat::CellIterator ic(cbox); ic; ic++) {
+      double checkval = valfact * (*vardata)(id(), depth) + constval;
+      pdat::CellIndex check = ic();
+      for (int p = 0; p < gbox_to_check.numberCells(idir); p++) {
+         double offcheckval = checkval + dxfact * (p + 1);
+         if ((*vardata)(check, depth) != offcheckval) {
+            num_bad_values++;
+            TBOX_WARNING("Bad " << bdry_type_str
+                                << " boundary value for " << varname
+                                << " found in cell " << check
+                                << "\n   found = " << (*vardata)(check, depth)
+                                << " : correct = " << offcheckval << endl);
+         }
+         check(idir) += offsign;
+      }
+      id++;
+   }
+
+   return num_bad_values;
+
+}
+
+/*
+ * Private function to read 3D face boundary data from input database.
+ */
+
+void SkeletonBoundaryUtilities3::read3dBdryFaces(
+   BoundaryUtilityStrategy* bdry_strategy,
+   tbox::Pointer<tbox::Database> bdry_db,
+   tbox::Array<int>& face_conds,
+   const hier::IntVector& periodic)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(bdry_strategy != (BoundaryUtilityStrategy *)NULL);
+   TBOX_ASSERT(!bdry_db.isNull());
+   TBOX_ASSERT(face_conds.getSize() == NUM_3D_FACES);
+#endif
+
+   int num_per_dirs = 0;
+   for (int id = 0; id < 3; id++) {
+      if (periodic(id)) num_per_dirs++;
+   }
+
+   if (num_per_dirs < 3) { // face boundary input required
+
+      for (int s = 0; s < NUM_3D_FACES; s++) {
+
+         string bdry_loc_str;
+         switch (s) {
+            case XLO: { bdry_loc_str = "boundary_face_xlo";
+                        break;
+            }
+            case XHI: { bdry_loc_str = "boundary_face_xhi";
+                        break;
+            }
+            case YLO: { bdry_loc_str = "boundary_face_ylo";
+                        break;
+            }
+            case YHI: { bdry_loc_str = "boundary_face_yhi";
+                        break;
+            }
+            case ZLO: { bdry_loc_str = "boundary_face_zlo";
+                        break;
+            }
+            case ZHI: { bdry_loc_str = "boundary_face_zhi";
+                        break;
+            }
+            default: NULL_STATEMENT;
+         }
+
+         bool need_data_read = true;
+         if (num_per_dirs > 0) {
+            if (periodic(0) && (s == XLO || s == XHI)) {
+               need_data_read = false;
+            } else if (periodic(1) && (s == YLO || s == YHI)) {
+               need_data_read = false;
+            } else if (periodic(2) && (s == ZLO || s == ZHI)) {
+               need_data_read = false;
+            }
+         }
+
+         if (need_data_read) {
+            if (bdry_db->keyExists(bdry_loc_str)) {
+               tbox::Pointer<tbox::Database> bdry_loc_db =
+                  bdry_db->getDatabase(bdry_loc_str);
+               if (!bdry_loc_db.isNull()) {
+                  if (bdry_loc_db->keyExists("boundary_condition")) {
+                     string bdry_cond_str =
+                        bdry_loc_db->getString("boundary_condition");
+                     if (bdry_cond_str == "FLOW") {
+                        face_conds[s] = FLOW_BC;
+                     } else if (bdry_cond_str == "REFLECT") {
+                        face_conds[s] = REFLECT_BC;
+                     } else if (bdry_cond_str == "DIRICHLET") {
+                        face_conds[s] = DIRICHLET_BC;
+                        bdry_strategy->
+                        readDirichletBoundaryDataEntry(bdry_loc_db,
+                           bdry_loc_str,
+                           s);
+                     } else if (bdry_cond_str == "NEUMANN") {
+                        face_conds[s] = NEUMANN_BC;
+                        bdry_strategy->
+                        readNeumannBoundaryDataEntry(bdry_loc_db,
+                           bdry_loc_str,
+                           s);
+                     } else {
+                        TBOX_ERROR("Unknown face boundary string = "
+                           << bdry_cond_str << " found in input." << endl);
+                     }
+                  } else {
+                     TBOX_ERROR("'boundary_condition' entry missing from "
+                        << bdry_loc_str << " input database." << endl);
+                  }
+               }
+            } else {
+               TBOX_ERROR(bdry_loc_str
+                  << " database entry not found in input." << endl);
+            }
+         } // if (need_data_read)
+
+      } // for (int s = 0 ...
+
+   } // if (num_per_dirs < 3)
+
+}
+
+/*
+ * Private function to read 3D edge boundary data from input database.
+ */
+
+void SkeletonBoundaryUtilities3::read3dBdryEdges(
+   tbox::Pointer<tbox::Database> bdry_db,
+   const tbox::Array<int>& face_conds,
+   tbox::Array<int>& edge_conds,
+   const hier::IntVector& periodic)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!bdry_db.isNull());
+   TBOX_ASSERT(face_conds.getSize() == NUM_3D_FACES);
+   TBOX_ASSERT(edge_conds.getSize() == NUM_3D_EDGES);
+#endif
+
+   int num_per_dirs = 0;
+   for (int id = 0; id < 3; id++) {
+      if (periodic(id)) num_per_dirs++;
+   }
+
+   if (num_per_dirs < 2) {  // edge boundary input required
+
+      for (int s = 0; s < NUM_3D_EDGES; s++) {
+
+         string bdry_loc_str;
+         switch (s) {
+            case YLO_ZLO_3D: { bdry_loc_str = "boundary_edge_ylo_zlo";
+                               break;
+            }
+            case YHI_ZLO_3D: { bdry_loc_str = "boundary_edge_yhi_zlo";
+                               break;
+            }
+            case YLO_ZHI_3D: { bdry_loc_str = "boundary_edge_ylo_zhi";
+                               break;
+            }
+            case YHI_ZHI_3D: { bdry_loc_str = "boundary_edge_yhi_zhi";
+                               break;
+            }
+            case XLO_ZLO_3D: { bdry_loc_str = "boundary_edge_xlo_zlo";
+                               break;
+            }
+            case XLO_ZHI_3D: { bdry_loc_str = "boundary_edge_xlo_zhi";
+                               break;
+            }
+            case XHI_ZLO_3D: { bdry_loc_str = "boundary_edge_xhi_zlo";
+                               break;
+            }
+            case XHI_ZHI_3D: { bdry_loc_str = "boundary_edge_xhi_zhi";
+                               break;
+            }
+            case XLO_YLO_3D: { bdry_loc_str = "boundary_edge_xlo_ylo";
+                               break;
+            }
+            case XHI_YLO_3D: { bdry_loc_str = "boundary_edge_xhi_ylo";
+                               break;
+            }
+            case XLO_YHI_3D: { bdry_loc_str = "boundary_edge_xlo_yhi";
+                               break;
+            }
+            case XHI_YHI_3D: { bdry_loc_str = "boundary_edge_xhi_yhi";
+                               break;
+            }
+            default: NULL_STATEMENT;
+         }
+
+         bool need_data_read = false;
+         if (num_per_dirs == 0) {
+            need_data_read = true;
+         } else if (periodic(0) &&
+                    (s == YLO_ZLO_3D || s == YHI_ZLO_3D ||
+                     s == YLO_ZHI_3D || s == YHI_ZHI_3D)) {
+            need_data_read = true;
+         } else if (periodic(1) &&
+                    (s == XLO_ZLO_3D || s == XLO_ZHI_3D ||
+                     s == XHI_ZLO_3D || s == XHI_ZHI_3D)) {
+            need_data_read = true;
+         } else if (periodic(2) &&
+                    (s == XLO_YLO_3D || s == XHI_YLO_3D ||
+                     s == XLO_YHI_3D || s == XHI_YHI_3D)) {
+            need_data_read = true;
+         }
+
+         if (need_data_read) {
+            if (bdry_db->keyExists(bdry_loc_str)) {
+               tbox::Pointer<tbox::Database> bdry_loc_db =
+                  bdry_db->getDatabase(bdry_loc_str);
+               if (!bdry_loc_db.isNull()) {
+                  if (bdry_loc_db->keyExists("boundary_condition")) {
+                     string bdry_cond_str =
+                        bdry_loc_db->getString("boundary_condition");
+                     if (bdry_cond_str == "XFLOW") {
+                        edge_conds[s] = XFLOW_BC;
+                     } else if (bdry_cond_str == "YFLOW") {
+                        edge_conds[s] = YFLOW_BC;
+                     } else if (bdry_cond_str == "ZFLOW") {
+                        edge_conds[s] = ZFLOW_BC;
+                     } else if (bdry_cond_str == "XREFLECT") {
+                        edge_conds[s] = XREFLECT_BC;
+                     } else if (bdry_cond_str == "YREFLECT") {
+                        edge_conds[s] = YREFLECT_BC;
+                     } else if (bdry_cond_str == "ZREFLECT") {
+                        edge_conds[s] = ZREFLECT_BC;
+                     } else if (bdry_cond_str == "XDIRICHLET") {
+                        edge_conds[s] = XDIRICHLET_BC;
+                     } else if (bdry_cond_str == "YDIRICHLET") {
+                        edge_conds[s] = YDIRICHLET_BC;
+                     } else if (bdry_cond_str == "ZDIRICHLET") {
+                        edge_conds[s] = ZDIRICHLET_BC;
+                     } else if (bdry_cond_str == "XNEUMANN") {
+                        edge_conds[s] = XNEUMANN_BC;
+                     } else if (bdry_cond_str == "YNEUMANN") {
+                        edge_conds[s] = YNEUMANN_BC;
+                     } else if (bdry_cond_str == "ZNEUMANN") {
+                        edge_conds[s] = ZNEUMANN_BC;
+                     } else {
+                        TBOX_ERROR("Unknown edge boundary string = "
+                           << bdry_cond_str << " found in input." << endl);
+                     }
+
+                     bool ambiguous_type = false;
+                     if (bdry_cond_str == "XFLOW" ||
+                         bdry_cond_str == "XREFLECT" ||
+                         bdry_cond_str == "XDIRICHLET" ||
+                         bdry_cond_str == "XNEUMANN") {
+                        if (s == YLO_ZLO_3D || s == YHI_ZLO_3D ||
+                            s == YLO_ZHI_3D || s == YHI_ZHI_3D) {
+                           ambiguous_type = true;
+                        }
+                     } else if (bdry_cond_str == "YFLOW" ||
+                                bdry_cond_str == "YREFLECT" ||
+                                bdry_cond_str == "YDIRICHLET" ||
+                                bdry_cond_str == "YNEUMANN") {
+                        if (s == XLO_ZLO_3D || s == XLO_ZHI_3D ||
+                            s == XHI_ZLO_3D || s == XHI_ZHI_3D) {
+                           ambiguous_type = true;
+                        }
+                     } else if (bdry_cond_str == "ZFLOW" ||
+                                bdry_cond_str == "ZREFLECT" ||
+                                bdry_cond_str == "ZDIRICHLET" ||
+                                bdry_cond_str == "ZNEUMANN") {
+                        if (s == XLO_YLO_3D || s == XHI_YLO_3D ||
+                            s == XLO_YHI_3D || s == XHI_YHI_3D) {
+                           ambiguous_type = true;
+                        }
+                     }
+                     if (ambiguous_type) {
+                        TBOX_ERROR("Ambiguous bdry condition "
+                           << bdry_cond_str
+                           << " found for " << bdry_loc_str << endl);
+                     }
+
+                     string proper_face;
+                     string proper_face_data;
+                     bool no_face_data_found = false;
+                     if (bdry_cond_str == "XFLOW" ||
+                         bdry_cond_str == "XDIRICHLET" ||
+                         bdry_cond_str == "XNEUMANN" ||
+                         bdry_cond_str == "XREFLECT") {
+                        if (s == XLO_ZLO_3D || s == XLO_ZHI_3D ||
+                            s == XLO_YLO_3D || s == XLO_YHI_3D) {
+                           proper_face = "XLO";
+                           if (bdry_cond_str == "XFLOW" &&
+                               face_conds[XLO] != FLOW_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "FLOW";
+                           }
+                           if (bdry_cond_str == "XDIRICHLET" &&
+                               face_conds[XLO] != DIRICHLET_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "DIRICHLET";
+                           }
+                           if (bdry_cond_str == "XNEUMANN" &&
+                               face_conds[XLO] != NEUMANN_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "NEUMANN";
+                           }
+                           if (bdry_cond_str == "XREFLECT" &&
+                               face_conds[XLO] != REFLECT_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "REFLECT";
+                           }
+                        } else {
+                           proper_face = "XHI";
+                           if (bdry_cond_str == "XFLOW" &&
+                               face_conds[XHI] != FLOW_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "FLOW";
+                           }
+                           if (bdry_cond_str == "XDIRICHLET" &&
+                               face_conds[XHI] != DIRICHLET_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "DIRICHLET";
+                           }
+                           if (bdry_cond_str == "XNEUMANN" &&
+                               face_conds[XHI] != NEUMANN_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "NEUMANN";
+                           }
+                           if (bdry_cond_str == "XREFLECT" &&
+                               face_conds[XHI] != REFLECT_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "REFLECT";
+                           }
+                        }
+                     } else if (bdry_cond_str == "YFLOW" ||
+                                bdry_cond_str == "YDIRICHLET" ||
+                                bdry_cond_str == "YNEUMANN" ||
+                                bdry_cond_str == "YREFLECT") {
+                        if (s == XLO_ZLO_3D || s == YLO_ZHI_3D ||
+                            s == XLO_YLO_3D || s == XHI_YLO_3D) {
+                           proper_face = "YLO";
+                           if (bdry_cond_str == "YFLOW" &&
+                               face_conds[YLO] != FLOW_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "FLOW";
+                           }
+                           if (bdry_cond_str == "YDIRICHLET" &&
+                               face_conds[YLO] != DIRICHLET_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "DIRICHLET";
+                           }
+                           if (bdry_cond_str == "YNEUMANN" &&
+                               face_conds[YLO] != NEUMANN_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "NEUMANN";
+                           }
+                           if (bdry_cond_str == "YREFLECT" &&
+                               face_conds[YLO] != REFLECT_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "REFLECT";
+                           }
+                        } else {
+                           proper_face = "YHI";
+                           if (bdry_cond_str == "YFLOW" &&
+                               face_conds[YHI] != FLOW_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "FLOW";
+                           }
+                           if (bdry_cond_str == "YDIRICHLET" &&
+                               face_conds[YHI] != DIRICHLET_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "DIRICHLET";
+                           }
+                           if (bdry_cond_str == "YNEUMANN" &&
+                               face_conds[YHI] != NEUMANN_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "NEUMANN";
+                           }
+                           if (bdry_cond_str == "YREFLECT" &&
+                               face_conds[YHI] != REFLECT_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "REFLECT";
+                           }
+                        }
+                     } else if (bdry_cond_str == "ZFLOW" ||
+                                bdry_cond_str == "ZDIRICHLET" ||
+                                bdry_cond_str == "ZNEUMANN" ||
+                                bdry_cond_str == "ZREFLECT") {
+                        if (s == XLO_ZLO_3D || s == YHI_ZLO_3D ||
+                            s == XLO_ZLO_3D || s == XHI_ZLO_3D) {
+                           proper_face = "ZLO";
+                           if (bdry_cond_str == "ZFLOW" &&
+                               face_conds[ZLO] != FLOW_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "FLOW";
+                           }
+                           if (bdry_cond_str == "ZDIRICHLET" &&
+                               face_conds[ZLO] != DIRICHLET_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "DIRICHLET";
+                           }
+                           if (bdry_cond_str == "ZNEUMANN" &&
+                               face_conds[ZLO] != NEUMANN_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "NEUMANN";
+                           }
+                           if (bdry_cond_str == "ZREFLECT" &&
+                               face_conds[ZLO] != REFLECT_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "REFLECT";
+                           }
+                        } else {
+                           proper_face = "ZHI";
+                           if (bdry_cond_str == "ZFLOW" &&
+                               face_conds[ZHI] != FLOW_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "FLOW";
+                           }
+                           if (bdry_cond_str == "ZDIRICHLET" &&
+                               face_conds[ZHI] != DIRICHLET_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "DIRICHLET";
+                           }
+                           if (bdry_cond_str == "ZNEUMANN" &&
+                               face_conds[ZHI] != NEUMANN_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "NEUMANN";
+                           }
+                           if (bdry_cond_str == "ZREFLECT" &&
+                               face_conds[ZHI] != REFLECT_BC) {
+                              no_face_data_found = true;
+                              proper_face_data = "REFLECT";
+                           }
+                        }
+                     }
+                     if (no_face_data_found) {
+                        TBOX_ERROR(
+                           "Bdry condition " << bdry_cond_str
+                           << " found for "
+                           << bdry_loc_str
+                           << "\n but no "
+                           << proper_face_data
+                           << " data found for face "
+                           << proper_face << endl);
+                     }
+                  } else {
+                     TBOX_ERROR("'boundary_condition' entry missing from "
+                        << bdry_loc_str << " input database." << endl);
+                  }
+               }
+            } else {
+               TBOX_ERROR(bdry_loc_str
+                  << " database entry not found in input." << endl);
+            }
+
+         } // if (need_data_read)
+
+      } // for (int s = 0 ...
+
+   } // if (num_per_dirs < 2)
+
+}
+
+/*
+ * Private function to read 3D node boundary data from input database.
+ */
+
+void SkeletonBoundaryUtilities3::read3dBdryNodes(
+   tbox::Pointer<tbox::Database> bdry_db,
+   const tbox::Array<int>& face_conds,
+   tbox::Array<int>& node_conds,
+   const hier::IntVector& periodic)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!bdry_db.isNull());
+   TBOX_ASSERT(face_conds.getSize() == NUM_3D_FACES);
+   TBOX_ASSERT(node_conds.getSize() == NUM_3D_NODES);
+#endif
+
+   int num_per_dirs = 0;
+   for (int id = 0; id < 3; id++) {
+      if (periodic(id)) num_per_dirs++;
+   }
+
+   if (num_per_dirs < 1) { // node boundary data required
+
+      for (int s = 0; s < NUM_3D_NODES; s++) {
+
+         string bdry_loc_str;
+         switch (s) {
+            case XLO_YLO_ZLO: { bdry_loc_str = "boundary_node_xlo_ylo_zlo";
+                                break;
+            }
+            case XHI_YLO_ZLO: { bdry_loc_str = "boundary_node_xhi_ylo_zlo";
+                                break;
+            }
+            case XLO_YHI_ZLO: { bdry_loc_str = "boundary_node_xlo_yhi_zlo";
+                                break;
+            }
+            case XHI_YHI_ZLO: { bdry_loc_str = "boundary_node_xhi_yhi_zlo";
+                                break;
+            }
+            case XLO_YLO_ZHI: { bdry_loc_str = "boundary_node_xlo_ylo_zhi";
+                                break;
+            }
+            case XHI_YLO_ZHI: { bdry_loc_str = "boundary_node_xhi_ylo_zhi";
+                                break;
+            }
+            case XLO_YHI_ZHI: { bdry_loc_str = "boundary_node_xlo_yhi_zhi";
+                                break;
+            }
+            case XHI_YHI_ZHI: { bdry_loc_str = "boundary_node_xhi_yhi_zhi";
+                                break;
+            }
+            default: NULL_STATEMENT;
+         }
+
+         if (bdry_db->keyExists(bdry_loc_str)) {
+            tbox::Pointer<tbox::Database> bdry_loc_db =
+               bdry_db->getDatabase(bdry_loc_str);
+            if (!bdry_loc_db.isNull()) {
+               if (bdry_loc_db->keyExists("boundary_condition")) {
+                  string bdry_cond_str =
+                     bdry_loc_db->getString("boundary_condition");
+                  if (bdry_cond_str == "XFLOW") {
+                     node_conds[s] = XFLOW_BC;
+                  } else if (bdry_cond_str == "YFLOW") {
+                     node_conds[s] = YFLOW_BC;
+                  } else if (bdry_cond_str == "ZFLOW") {
+                     node_conds[s] = ZFLOW_BC;
+                  } else if (bdry_cond_str == "XREFLECT") {
+                     node_conds[s] = XREFLECT_BC;
+                  } else if (bdry_cond_str == "YREFLECT") {
+                     node_conds[s] = YREFLECT_BC;
+                  } else if (bdry_cond_str == "ZREFLECT") {
+                     node_conds[s] = ZREFLECT_BC;
+                  } else if (bdry_cond_str == "XDIRICHLET") {
+                     node_conds[s] = XDIRICHLET_BC;
+                  } else if (bdry_cond_str == "YDIRICHLET") {
+                     node_conds[s] = YDIRICHLET_BC;
+                  } else if (bdry_cond_str == "ZDIRICHLET") {
+                     node_conds[s] = ZDIRICHLET_BC;
+                  } else if (bdry_cond_str == "XNEUMANN") {
+                     node_conds[s] = XNEUMANN_BC;
+                  } else if (bdry_cond_str == "YNEUMANN") {
+                     node_conds[s] = YNEUMANN_BC;
+                  } else if (bdry_cond_str == "ZNEUMANN") {
+                     node_conds[s] = ZNEUMANN_BC;
+                  } else {
+                     TBOX_ERROR("Unknown node boundary string = "
+                        << bdry_cond_str << " found in input." << endl);
+                  }
+
+                  string proper_face;
+                  string proper_face_data;
+                  bool no_face_data_found = false;
+                  if (bdry_cond_str == "XFLOW" ||
+                      bdry_cond_str == "XDIRICHLET" ||
+                      bdry_cond_str == "XNEUMANN" ||
+                      bdry_cond_str == "XREFLECT") {
+                     if (s == XLO_YLO_ZLO || s == XLO_YHI_ZLO ||
+                         s == XLO_YLO_ZHI || s == XLO_YHI_ZHI) {
+                        proper_face = "XLO";
+                        if (bdry_cond_str == "XFLOW" &&
+                            face_conds[XLO] != FLOW_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "FLOW";
+                        }
+                        if (bdry_cond_str == "XDIRICHLET" &&
+                            face_conds[XLO] != DIRICHLET_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "DIRICHLET";
+                        }
+                        if (bdry_cond_str == "XNEUMANN" &&
+                            face_conds[XLO] != NEUMANN_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "NEUMANN";
+                        }
+                        if (bdry_cond_str == "XREFLECT" &&
+                            face_conds[XLO] != REFLECT_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "REFLECT";
+                        }
+                     } else {
+                        proper_face = "XHI";
+                        if (bdry_cond_str == "XFLOW" &&
+                            face_conds[XHI] != FLOW_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "FLOW";
+                        }
+                        if (bdry_cond_str == "XDIRICHLET" &&
+                            face_conds[XHI] != DIRICHLET_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "DIRICHLET";
+                        }
+                        if (bdry_cond_str == "XNEUMANN" &&
+                            face_conds[XHI] != NEUMANN_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "NEUMANN";
+                        }
+                        if (bdry_cond_str == "XREFLECT" &&
+                            face_conds[XHI] != REFLECT_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "REFLECT";
+                        }
+                     }
+                  } else if (bdry_cond_str == "YFLOW" ||
+                             bdry_cond_str == "YDIRICHLET" ||
+                             bdry_cond_str == "YNEUMANN" ||
+                             bdry_cond_str == "YREFLECT") {
+                     if (s == XLO_YLO_ZLO || s == XHI_YLO_ZLO ||
+                         s == XLO_YLO_ZHI || s == XHI_YLO_ZHI) {
+                        proper_face = "YLO";
+                        if (bdry_cond_str == "YFLOW" &&
+                            face_conds[YLO] != FLOW_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "FLOW";
+                        }
+                        if (bdry_cond_str == "YDIRICHLET" &&
+                            face_conds[YLO] != DIRICHLET_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "DIRICHLET";
+                        }
+                        if (bdry_cond_str == "YNEUMANN" &&
+                            face_conds[YLO] != NEUMANN_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "NEUMANN";
+                        }
+                        if (bdry_cond_str == "YREFLECT" &&
+                            face_conds[YLO] != REFLECT_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "REFLECT";
+                        }
+                     } else {
+                        proper_face = "YHI";
+                        if (bdry_cond_str == "YFLOW" &&
+                            face_conds[YHI] != FLOW_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "FLOW";
+                        }
+                        if (bdry_cond_str == "YDIRICHLET" &&
+                            face_conds[YHI] != DIRICHLET_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "DIRICHLET";
+                        }
+                        if (bdry_cond_str == "YNEUMANN" &&
+                            face_conds[YHI] != NEUMANN_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "NEUMANN";
+                        }
+                        if (bdry_cond_str == "YREFLECT" &&
+                            face_conds[YHI] != REFLECT_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "REFLECT";
+                        }
+                     }
+                  } else if (bdry_cond_str == "ZFLOW" ||
+                             bdry_cond_str == "ZDIRICHLET" ||
+                             bdry_cond_str == "ZNEUMANN" ||
+                             bdry_cond_str == "ZREFLECT") {
+                     if (s == XLO_YLO_ZLO || s == XHI_YLO_ZLO ||
+                         s == XLO_YHI_ZLO || s == XHI_YHI_ZLO) {
+                        proper_face = "ZLO";
+                        if (bdry_cond_str == "ZFLOW" &&
+                            face_conds[ZLO] != FLOW_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "FLOW";
+                        }
+                        if (bdry_cond_str == "ZDIRICHLET" &&
+                            face_conds[ZLO] != DIRICHLET_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "DIRICHLET";
+                        }
+                        if (bdry_cond_str == "ZNEUMANN" &&
+                            face_conds[ZLO] != NEUMANN_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "NEUMANN";
+                        }
+                        if (bdry_cond_str == "ZREFLECT" &&
+                            face_conds[ZLO] != REFLECT_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "REFLECT";
+                        }
+                     } else {
+                        proper_face = "ZHI";
+                        if (bdry_cond_str == "ZFLOW" &&
+                            face_conds[ZHI] != FLOW_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "FLOW";
+                        }
+                        if (bdry_cond_str == "ZDIRICHLET" &&
+                            face_conds[ZHI] != DIRICHLET_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "DIRICHLET";
+                        }
+                        if (bdry_cond_str == "ZNEUMANN" &&
+                            face_conds[ZHI] != NEUMANN_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "NEUMANN";
+                        }
+                        if (bdry_cond_str == "ZREFLECT" &&
+                            face_conds[ZHI] != REFLECT_BC) {
+                           no_face_data_found = true;
+                           proper_face_data = "REFLECT";
+                        }
+                     }
+                  }
+                  if (no_face_data_found) {
+                     TBOX_ERROR(
+                        "Bdry condition " << bdry_cond_str
+                        << " found for "
+                        << bdry_loc_str
+                        << "\n but no "
+                        << proper_face_data
+                        << " data found for face "
+                        << proper_face << endl);
+                  }
+
+               } else {
+                  TBOX_ERROR("'boundary_condition' entry missing from "
+                     << bdry_loc_str << " input database." << endl);
+               }
+            }
+         } else {
+            TBOX_ERROR(bdry_loc_str
+               << " database entry not found in input." << endl);
+         }
+
+      } // for (int s = 0 ...
+
+   } // if (num_per_dirs < 1)
+
+}
+
+/*
+ * Private function to get boundary orientation information for
+ * 3D boundary condition checking.  Called from checkBdryData().
+ */
+
+void SkeletonBoundaryUtilities3::get3dBdryDirectionCheckValues(
+   int& idir,
+   int& offsign,
+   int btype,
+   int bloc,
+   int bcase)
+{
+
+   string bdry_type_str;
+
+   if (btype == FACE3D_BDRY_TYPE) {
+
+      bdry_type_str = "FACE";
+
+      if (bloc == XLO || bloc == XHI) {
+         idir = 0;
+         if (bloc == XLO) {
+            offsign = -1;
+         } else {
+            offsign = 1;
+         }
+      } else if (bloc == YLO || bloc == YHI) {
+         idir = 1;
+         if (bloc == YLO) {
+            offsign = -1;
+         } else {
+            offsign = 1;
+         }
+      } else if (bloc == ZLO || bloc == ZHI) {
+         idir = 2;
+         if (bloc == ZLO) {
+            offsign = -1;
+         } else {
+            offsign = 1;
+         }
+      } else {
+         TBOX_ERROR(
+            "Unknown boundary location " << bloc
+            <<
+            " passed to SkeletonBoundaryUtilities3::checkBdryData()"
+            << "\n for "
+            << bdry_type_str << " boundary " << endl);
+      }
+
+   } else if (btype == EDGE3D_BDRY_TYPE) {
+
+      bdry_type_str = "EDGE";
+
+      bool bad_case = false;
+      if (bcase == XFLOW_BC || bcase == XREFLECT_BC ||
+          bcase == XDIRICHLET_BC || bcase == XNEUMANN_BC) {
+         idir = 0;
+         if (bloc == XLO_ZLO_3D || bloc == XLO_ZHI_3D ||
+             bloc == XLO_YLO_3D || bloc == XLO_YHI_3D) {
+            offsign = -1;
+         } else if (bloc == XHI_ZLO_3D || bloc == XHI_ZHI_3D ||
+                    bloc == XHI_YLO_3D || bloc == XHI_YHI_3D) {
+            offsign = 1;
+         } else {
+            bad_case = true;
+         }
+      } else if (bcase == YFLOW_BC || bcase == YREFLECT_BC ||
+                 bcase == YDIRICHLET_BC || bcase == YNEUMANN_BC) {
+         idir = 1;
+         if (bloc == YLO_ZLO_3D || bloc == YLO_ZHI_3D ||
+             bloc == XLO_YLO_3D || bloc == XHI_YLO_3D) {
+            offsign = -1;
+         } else if (bloc == YHI_ZLO_3D || bloc == YHI_ZHI_3D ||
+                    bloc == XLO_YHI_3D || bloc == XHI_YHI_3D) {
+            offsign = 1;
+         } else {
+            bad_case = true;
+         }
+      } else if (bcase == ZFLOW_BC || bcase == ZREFLECT_BC ||
+                 bcase == ZDIRICHLET_BC || bcase == ZNEUMANN_BC) {
+         idir = 2;
+         if (bloc == YLO_ZLO_3D || bloc == YHI_ZLO_3D ||
+             bloc == XLO_ZLO_3D || bloc == XHI_ZLO_3D) {
+            offsign = -1;
+         } else if (bloc == YLO_ZHI_3D || bloc == YHI_ZHI_3D ||
+                    bloc == XLO_ZHI_3D || bloc == XHI_ZHI_3D) {
+            offsign = 1;
+         } else {
+            bad_case = true;
+         }
+      }
+      if (bad_case) {
+         TBOX_ERROR(
+            "Unknown or ambigous bcase " << bcase
+            <<
+            " passed to SkeletonBoundaryUtilities3::checkBdryData()"
+            << "\n for " << bdry_type_str
+            << " at location " << bloc
+            << endl);
+      }
+
+   } else if (btype == NODE3D_BDRY_TYPE) {
+
+      bdry_type_str = "NODE";
+
+      if (bcase == XFLOW_BC || bcase == XREFLECT_BC ||
+          bcase == XDIRICHLET_BC || bcase == XNEUMANN_BC) {
+         idir = 0;
+         if (bloc == XLO_YLO_ZLO || bloc == XLO_YHI_ZLO ||
+             bloc == XLO_YLO_ZHI || bloc == XLO_YHI_ZHI) {
+            offsign = -1;
+         } else {
+            offsign = 1;
+         }
+      } else if (bcase == YFLOW_BC || bcase == YREFLECT_BC ||
+                 bcase == YDIRICHLET_BC || bcase == YNEUMANN_BC) {
+         idir = 1;
+         if (bloc == XLO_YLO_ZLO || bloc == XHI_YLO_ZLO ||
+             bloc == XLO_YLO_ZHI || bloc == XHI_YLO_ZHI) {
+            offsign = -1;
+         } else {
+            offsign = 1;
+         }
+      } else if (bcase == ZFLOW_BC || bcase == ZREFLECT_BC ||
+                 bcase == ZDIRICHLET_BC || bcase == ZNEUMANN_BC) {
+         idir = 2;
+         if (bloc == XLO_YLO_ZLO || bloc == XHI_YLO_ZLO ||
+             bloc == XLO_YHI_ZLO || bloc == XHI_YHI_ZLO) {
+            offsign = -1;
+         } else {
+            offsign = 1;
+         }
+      }
+
+   } else {
+      TBOX_ERROR(
+         "Unknown boundary type " << btype
+         <<
+         " passed to SkeletonBoundaryUtilities3::checkBdryData()"
+         << "\n for " << bdry_type_str
+         << " at location " << bloc << endl);
+   }
+
+}
+
+/*
+ * Private function to stuff 3D boundary contants into Fortran common blocks
+ */
+
+void SkeletonBoundaryUtilities3::stuff3dBdryFortConst()
+{
+   F77_FUNC(stufcartbdryloc3d, STUFCARTBDRYLOC3D) (
+      XLO, XHI, YLO, YHI, ZLO, ZHI,
+      YLO_ZLO_3D, YHI_ZLO_3D, YLO_ZHI_3D, YHI_ZHI_3D,
+      XLO_ZLO_3D, XLO_ZHI_3D, XHI_ZLO_3D, XHI_ZHI_3D,
+      XLO_YLO_3D, XHI_YLO_3D, XLO_YHI_3D, XHI_YHI_3D,
+      XLO_YLO_ZLO, XHI_YLO_ZLO, XLO_YHI_ZLO, XHI_YHI_ZLO,
+      XLO_YLO_ZHI, XHI_YLO_ZHI, XLO_YHI_ZHI, XHI_YHI_ZHI);
+   F77_FUNC(stufcartbdrycond3d, STUFCARTBDRYCOND3D) (
+      FLOW_BC,
+      XFLOW_BC, YFLOW_BC, ZFLOW_BC,
+      REFLECT_BC,
+      XREFLECT_BC, YREFLECT_BC, ZREFLECT_BC,
+      DIRICHLET_BC,
+      XDIRICHLET_BC, YDIRICHLET_BC, ZDIRICHLET_BC,
+      NEUMANN_BC,
+      XNEUMANN_BC, YNEUMANN_BC, ZNEUMANN_BC);
+   s_fortran_constants_stuffed = true;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/SkeletonBoundaryUtilities3.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/SkeletonBoundaryUtilities3.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,341 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility routines for manipulating Skeleton 3d boundary data 
+ *
+ ************************************************************************/
+
+#ifndef included_appu_SkeletonBoundaryUtilities3
+#define included_appu_SkeletonBoundaryUtilities3
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/appu/BoundaryUtilityStrategy.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+using namespace std;
+using namespace SAMRAI;
+using namespace appu;
+
+/*!
+ * @brief Class SkeletonBoundaryUtilities2 is a utility class that
+ * simplifies the implementation of simple physical boundary data in
+ * 3 spatial dimensions.  It contains routines for reading boundary data
+ * information from input files, applying those boundary conditions,
+ * and error checking boundary data.  These routines apply to the
+ * case of cell-centered double data only.  One may use all of these
+ * capabilities, or use the input reading, boundary setting, and error
+ * checking routines independently.
+ *
+ * To use the boundary condition input reading capabilities, the format
+ * of the input file section containing the boundary information must
+ * be as described next.  Boundary face, node, and edge entries are only
+ * required for those that are not filled automatically when periodic
+ * conditions apply.
+ *
+ * The boundary condition for face "*" is provided in a section as follows:
+ *
+ * \verbatim
+ *
+ *    boundary_face_* {
+ *       boundary_condition  = ...  // boundary condition string identifier
+ *       // Any problem-specific boundary data read by user routines
+ *       // is placed here...
+ *    }
+ *
+ * Allowable face identifiers (i.e., values for "*") are:
+ *       xlo, xhi, ylo, yhi, zlo, zhi
+ * Supported face boundary_condition string values are:
+ *       "FLOW", "REFLECT", "DIRICHLET", "NEUMANN"
+ *
+ * \endverbatim
+ *
+ * The boundary condition for edge "*" is provided in a section as follows:
+ *
+ * \verbatim
+ *
+ *    boundary_edge_* {
+ *       boundary_condition  = ...  // boundary condition string identifier
+ *    }
+ *
+ * Allowable edge identifiers (i.e., values for "*") are:
+ *       ylo_zlo, yhi_zlo, ylo_zhi, yhi_zhi,
+ *       xlo_zlo, xlo_zhi, xhi_zlo, xhi_zhi,
+ *       xlo_ylo, xhi_ylo, xlo_yhi, xhi_yhi
+ * Supported edge boundary_condition string values are:
+ *       "XFLOW", "YFLOW", "ZFLOW",
+ *       "XREFLECT", "YREFLECT", "ZREFLECT",
+ *       "XDIRICHLET", "YDIRICHLET", "ZDIRICHLET"
+ *       "XNEUMANN", "YNEUMANN", "ZNEUMANN"
+ *
+ * \endverbatim
+ *
+ * Note that edge conditions must be consistent with adjacent face conditions.
+ *
+ * The boundary condition for node "*" is provided in a section as follows:
+ *
+ * \verbatim
+ *
+ *    boundary_node_* {
+ *       boundary_condition  = ...  // boundary condition string identifier
+ *    }
+ *
+ * Allowable node identifiers (i.e., values for "*") are:
+ *       ylo_zlo, yhi_zlo, ylo_zhi, yhi_zhi,
+ *       xlo_zlo, xlo_zhi, xhi_zlo, xhi_zhi,
+ *       xlo_ylo, xhi_ylo, xlo_yhi, xhi_yhi
+ * Supported node boundary_condition values are:
+ *       "XFLOW", "YFLOW", "ZFLOW",
+ *       "XREFLECT", "YREFLECT", "ZREFLECT",
+ *       "XDIRICHLET", "YDIRICHLET", "ZDIRICHLET"
+ *       "XNEUMANN", "YNEUMANN", "ZNEUMANN"
+ *
+ * \endverbatim
+ *
+ * Note that node conditions must be consistent with adjacent face conditions.
+ *
+ * See the include file SkeletonBoundaryDefines.h for integer constant
+ * definitions that apply for the various boundary types, locations,
+ * and boundary conditions.  If you choose to use the input reading
+ * capabilities only and write your own boundary condition routines in
+ * FORTRAN, you should note that the integer constants for the various
+ * boundary condition types and locations are automatically "stuffed" into
+ * FORTRAN common blocks.  This avoids potential problems with
+ * inconsistencies between C++ and FORTRAN usage.  Please see the
+ * FORTRAN include file cartbdryparams3d.i for details.
+ *
+ * @see appu::BoundaryUtilityStrategy3
+ */
+
+struct SkeletonBoundaryUtilities3 {
+public:
+   /*!
+    * Function to read 3d boundary data from input database.
+    * The integer boundary condition types are placed in the integer
+    * arrays supplied by the caller (typically, the concrete
+    * BoundaryUtilityStrategy object provided).  When DIRICHLET or
+    * NEUMANN conditions are specified, control is passed to the
+    * BoundaryUtilityStrategy to read the boundary state data specific to
+    * the problem.
+    *
+    * Errors will be reported and the program will abort whenever necessary
+    * boundary condition information is missing in the input database, or
+    * when the data read in is either unknown or inconsistent.  The periodic
+    * domain information is used to determine which boundary face, edge, or
+    * node entries are not required from input.  Error checking
+    * requires that node and edge boundary conditions are consistent
+    * with those specified for the faces.
+    *
+    *
+    * When assertion checking is active, assertions will result when any
+    * of the pointer arguments is null, or an array is passed in with the
+    * the wrong size.
+    *
+    * @param bdry_strategy user-defined object that reads DIRICHLET or NEUMANN
+    *                      conditions
+    * @param bdry_db       input database containing all boundary data
+    * @param face_conds    array into which integer face boundary condition types
+    *                      are read
+    * @param edge_conds    array into which integer edge boundary condition types
+    *                      are read
+    * @param node_conds    array into which integer node boundary condition types
+    *                      are read
+    * @param periodic      integer vector specifying which coordinate
+    *                      directions are periodic (e.g., value returned from
+    *                      GridGeometry2::getPeriodicShift())
+    */
+   static void
+   readBoundaryInput(
+      appu::BoundaryUtilityStrategy* bdry_strategy,
+      tbox::Pointer<tbox::Database> bdry_db,
+      tbox::Array<int>& face_conds,
+      tbox::Array<int>& edge_conds,
+      tbox::Array<int>& node_conds,
+      const hier::IntVector& periodic);
+
+   /*!
+    * Function to fill 3d face boundary values for a patch.
+    *
+    * When assertion checking is active, assertions will result when any
+    * of the pointer arguments is null, or an array is passed in with the
+    * the wrong size.
+    *
+    * @param varname             String name of variable (for error reporting).
+    * @param vardata             Cell-centered patch data object to fill.
+    * @param patch               hier::Patch on which data object lives.
+    * @param ghost_width_to_fill Width of ghost region to fill.
+    * @param bdry_face_conds     tbox::Array of boundary condition types for patch faces.
+    * @param bdry_face_values    tbox::Array of boundary values for patch faces.
+    */
+   static void
+   fillFaceBoundaryData(
+      const string& varname,
+      tbox::Pointer<pdat::CellData<double> >& vardata,
+      const hier::Patch& patch,
+      const hier::IntVector& ghost_width_to_fill,
+      const tbox::Array<int>& bdry_face_conds,
+      const tbox::Array<double>& bdry_face_values);
+
+   /*!
+    * Function to fill 3d edge boundary values for a patch.
+    *
+    * When assertion checking is active, assertions will result when any
+    * of the pointer arguments is null, or an array is passed in with the
+    * the wrong size.
+    *
+    * @param varname             String name of variable (for error reporting).
+    * @param vardata             Cell-centered patch data object to fill.
+    * @param patch               hier::Patch on which data object lives.
+    * @param ghost_width_to_fill Width of ghost region to fill.
+    * @param bdry_edge_conds     tbox::Array of boundary condition types for patch edges.
+    * @param bdry_face_values    tbox::Array of boundary values for patch faces.
+    */
+   static void
+   fillEdgeBoundaryData(
+      const string& varname,
+      tbox::Pointer<pdat::CellData<double> >& vardata,
+      const hier::Patch& patch,
+      const hier::IntVector& ghost_width_to_fill,
+      const tbox::Array<int>& bdry_edge_conds,
+      const tbox::Array<double>& bdry_face_values);
+
+   /*!
+    * Function to fill 3d node boundary values for a patch.
+    *
+    * When assertion checking is active, assertions will result when any
+    * of the pointer arguments is null, or an array is passed in with the
+    * the wrong size.
+    *
+    * @param varname             String name of variable (for error reporting).
+    * @param vardata             Cell-centered patch data object to fill.
+    * @param patch               hier::Patch on which data object lives.
+    * @param ghost_width_to_fill Width of ghost region to fill.
+    * @param bdry_node_conds     tbox::Array of boundary condition types for patch nodes.
+    * @param bdry_face_values    tbox::Array of boundary values for patch faces.
+    */
+   static void
+   fillNodeBoundaryData(
+      const string& varname,
+      tbox::Pointer<pdat::CellData<double> >& vardata,
+      const hier::Patch& patch,
+      const hier::IntVector& ghost_width_to_fill,
+      const tbox::Array<int>& bdry_node_conds,
+      const tbox::Array<double>& bdry_face_values);
+
+   /*!
+    * Function that returns the integer face boundary location
+    * corresponding to the given edge location and edge boundary
+    * condition.
+    *
+    * If the edge boundary condition type or edge location are unknown,
+    * or the boundary condition type is inconsistant with the edge location
+    * an error results.
+    *
+    * @return Integer face location for edge location and boundary condition type.
+    *
+    * @param edge_loc   Integer location for edge.
+    * @param edge_btype Integer boundary condition type for edge.
+    */
+   static int
+   getFaceLocationForEdgeBdry(
+      int edge_loc,
+      int edge_btype);
+
+   /*!
+    * Function that returns the integer face boundary location
+    * corresponding to the given node location and node boundary
+    * condition.
+    *
+    * If the node boundary condition type or node location are unknown,
+    * or the boundary condition type is inconsistant with the node location
+    * an error results.
+    *
+    * @return Integer face location for node location and boundary condition type.
+    *
+    * @param node_loc   Integer location for node.
+    * @param node_btype Integer boundary condition type for node.
+    */
+   static int
+   getFaceLocationForNodeBdry(
+      int node_loc,
+      int node_btype);
+
+   /*!
+    * Function to check 3d boundary data for a patch data quantity on
+    * a patch after it is set.  A warning message will be sent to log
+    * file for each bad boundary value that is found.
+    *
+    * When assertion checking is active, assertions will result when any
+    * of the pointer arguments is null, or an array is passed in with the
+    * the wrong size.
+    *
+    * @return Integer number of bad boundary values found.
+    *
+    * @param varname       String name of variable (for error reporting).
+    * @param patch         hier::Patch on which data object lives.
+    * @param data_id       hier::Patch data index for data on patch.
+    * @param depth         Depth index of patch data to check.
+    * @param gcw_to_check  Width of ghost region to check.
+    * @param bbox          Boundary box to check.
+    * @param bcase         Boundary condition type for given edge or node.
+    * @param bstate        Boundary value that applies in DIRICHLET or NEUMANN case.
+    */
+   static int
+   checkBdryData(
+      const string& varname,
+      const hier::Patch& patch,
+      int data_id,
+      int depth,
+      const hier::IntVector& gcw_to_check,
+      const hier::BoundaryBox& bbox,
+      int bcase,
+      double bstate);
+
+private:
+   static bool s_fortran_constants_stuffed;
+
+   static void
+   read3dBdryFaces(
+      appu::BoundaryUtilityStrategy* bdry_strategy,
+      tbox::Pointer<tbox::Database> bdry_db,
+      tbox::Array<int>& face_conds,
+      const hier::IntVector& periodic);
+
+   static void
+   read3dBdryEdges(
+      tbox::Pointer<tbox::Database> bdry_db,
+      const tbox::Array<int>& face_conds,
+      tbox::Array<int>& edge_conds,
+      const hier::IntVector& periodic);
+
+   static void
+   read3dBdryNodes(
+      tbox::Pointer<tbox::Database> bdry_db,
+      const tbox::Array<int>& face_conds,
+      tbox::Array<int>& node_conds,
+      const hier::IntVector& periodic);
+
+   static void
+   get3dBdryDirectionCheckValues(
+      int& idir,
+      int& offsign,
+      int btype,
+      int bloc,
+      int bcase);
+
+   static void
+   stuff3dBdryFortConst();
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/SkeletonCellDoubleConservativeLinearRefine.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/SkeletonCellDoubleConservativeLinearRefine.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,278 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Conservative linear refine operator for cell-centered
+ *                double data on a Skeleton mesh. 
+ *
+ ************************************************************************/
+
+#include "SkeletonCellDoubleConservativeLinearRefine.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/hier/BlockPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+extern "C" {
+// in cartrefine1d.f:
+void F77_FUNC(cartclinrefcelldoub1d, CARTCLINREFCELLDOUB1D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *,
+   double *, double *);
+// in cartrefine2d.f:
+void F77_FUNC(cartclinrefcelldoub2d, CARTCLINREFCELLDOUB2D) (
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *,
+   double *, double *, double *, double *);
+// in cartrefine3d.f:
+void F77_FUNC(cartclinrefcelldoub3d, CARTCLINREFCELLDOUB3D) (
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *,
+   double *, double *, double *,
+   double *, double *, double *);
+}
+
+using namespace SAMRAI;
+
+SkeletonCellDoubleConservativeLinearRefine::
+SkeletonCellDoubleConservativeLinearRefine(
+   const tbox::Dimension& dim):
+   xfer::RefineOperator(dim, "SKELETON_CONSERVATIVE_LINEAR_REFINE")
+{
+   d_name_id = "SKELETON_CONSERVATIVE_LINEAR_REFINE";
+
+   const int max_levels = 10;
+   d_dx.resizeArray(max_levels);
+   for (int n = 0; n < max_levels; n++) {
+      d_dx[n].resizeArray(getDim().getValue());
+      for (int i = 0; i < getDim().getValue(); i++) {
+         d_dx[n][i] = 1.;
+      }
+   }
+
+}
+
+SkeletonCellDoubleConservativeLinearRefine::~
+SkeletonCellDoubleConservativeLinearRefine()
+{
+}
+
+bool SkeletonCellDoubleConservativeLinearRefine::findRefineOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const string& op_name) const
+{
+   const tbox::Pointer<pdat::CellVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const string&
+SkeletonCellDoubleConservativeLinearRefine::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int
+SkeletonCellDoubleConservativeLinearRefine::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+SkeletonCellDoubleConservativeLinearRefine::getStencilWidth() const {
+   return hier::IntVector(getDim(), 1);
+}
+
+void SkeletonCellDoubleConservativeLinearRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::BoxOverlap& fine_overlap,
+   const hier::IntVector& ratio) const
+{
+   const pdat::CellOverlap* t_overlap =
+      dynamic_cast<const pdat::CellOverlap *>(&fine_overlap);
+
+   TBOX_ASSERT(t_overlap != NULL);
+
+   const hier::BoxList& boxes = t_overlap->getDestinationBoxList();
+   for (hier::BoxList::Iterator b(boxes); b; b++) {
+      refine(fine,
+         coarse,
+         dst_component,
+         src_component,
+         b(),
+         ratio);
+   }
+}
+
+void SkeletonCellDoubleConservativeLinearRefine::refine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio) const
+{
+   tbox::Pointer<pdat::CellData<double> >
+   cdata = coarse.getPatchData(src_component);
+   tbox::Pointer<pdat::CellData<double> >
+   fdata = fine.getPatchData(dst_component);
+
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+
+   const hier::Box cgbox(cdata->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+
+   const tbox::Pointer<hier::BlockPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+   const tbox::Pointer<hier::BlockPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+
+   const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+   const hier::Index ifirstf = fine_box.lower();
+   const hier::Index ilastf = fine_box.upper();
+
+   const hier::IntVector tmp_ghosts(getDim(), 0);
+   tbox::Array<double> diff0(cgbox.numberCells(0) + 1);
+   pdat::CellData<double> slope0(cgbox, 1, tmp_ghosts);
+
+   int flev_num = fine.getPatchLevelNumber();
+   int clev_num = coarse.getPatchLevelNumber();
+
+   // deal with levels not in hierarchy
+   if (flev_num < 0) flev_num = clev_num + 1;
+   if (clev_num < 0) clev_num = flev_num - 1;
+
+   double cdx[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   double fdx[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   getDx(clev_num, cdx);
+   getDx(flev_num, fdx);
+
+   for (int d = 0; d < fdata->getDepth(); d++) {
+      if (getDim() == tbox::Dimension(1)) {
+         F77_FUNC(cartclinrefcelldoub1d, CARTCLINREFCELLDOUB1D) (
+            ifirstc(0), ilastc(0),
+            ifirstf(0), ilastf(0),
+            cilo(0), cihi(0),
+            filo(0), fihi(0),
+            &ratio[0],
+            cdx,
+            fdx,
+            cdata->getPointer(d),
+            fdata->getPointer(d),
+            diff0.getPointer(), slope0.getPointer());
+      } else if (getDim() == tbox::Dimension(2)) {
+
+         tbox::Array<double> diff1(cgbox.numberCells(1) + 1);
+         pdat::CellData<double> slope1(cgbox, 1, tmp_ghosts);
+
+         F77_FUNC(cartclinrefcelldoub2d, CARTCLINREFCELLDOUB2D) (
+            ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+            ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            &ratio[0],
+            cdx,
+            fdx,
+            cdata->getPointer(d),
+            fdata->getPointer(d),
+            diff0.getPointer(), slope0.getPointer(),
+            diff1.getPointer(), slope1.getPointer());
+      } else if (getDim() == tbox::Dimension(3)) {
+
+         tbox::Array<double> diff1(cgbox.numberCells(1) + 1);
+         pdat::CellData<double> slope1(cgbox, 1, tmp_ghosts);
+
+         tbox::Array<double> diff2(cgbox.numberCells(2) + 1);
+         pdat::CellData<double> slope2(cgbox, 1, tmp_ghosts);
+
+         F77_FUNC(cartclinrefcelldoub3d, CARTCLINREFCELLDOUB3D) (
+            ifirstc(0), ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            ifirstf(0), ifirstf(1), ifirstf(2),
+            ilastf(0), ilastf(1), ilastf(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            &ratio[0],
+            cdx,
+            fdx,
+            cdata->getPointer(d),
+            fdata->getPointer(d),
+            diff0.getPointer(), slope0.getPointer(),
+            diff1.getPointer(), slope1.getPointer(),
+            diff2.getPointer(), slope2.getPointer());
+      } else {
+         TBOX_ERROR("SkeletonCellDoubleConservativeLinearRefine error...\n"
+            << "getDim() > 3 not supported." << endl);
+
+      }
+   }
+}
+
+void SkeletonCellDoubleConservativeLinearRefine::setDx(
+   const int level_number,
+   const double* dx)
+{
+   if (level_number >= d_dx.getSize()) {
+      d_dx.resizeArray(level_number + 1);
+      d_dx[level_number].resizeArray(getDim().getValue());
+      for (int i = 0; i < getDim().getValue(); i++) {
+         d_dx[level_number][i] = dx[i];
+      }
+   }
+}
+
+void SkeletonCellDoubleConservativeLinearRefine::getDx(
+   const int level_number,
+   double* dx) const
+{
+   for (int i = 0; i < getDim().getValue(); i++) {
+      dx[i] = d_dx[level_number][i];
+   }
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/SkeletonCellDoubleConservativeLinearRefine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/SkeletonCellDoubleConservativeLinearRefine.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,135 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Conservative linear refine operator for cell-centered
+ *                double data on a Skeleton mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_SkeletonCellDoubleConservativeLinearRefineXD
+#define included_SkeletonCellDoubleConservativeLinearRefineXD
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+#ifndef included_String
+#include <string>
+#define included_String
+#endif
+#include "SAMRAI/xfer/RefineOperator.h"
+
+using namespace std;
+using namespace SAMRAI;
+
+/**
+ * Class SkeletonCellDoubleConservativeLinearRefine implements
+ * conservative linear interpolation for cell-centered double patch data
+ * defined over a Skeleton mesh.  It is derived from the base class
+ * xfer::RefineOperator.  The numerical operations for the interpolation
+ * use FORTRAN numerical routines.
+ *
+ * The findRefineOperator() operator function returns true if the input
+ * variable is cell-centered double, and the string is
+ * "CONSERVATIVE_LINEAR_REFINE".
+ *
+ * @see xfer::RefineOperator
+ */
+
+class SkeletonCellDoubleConservativeLinearRefine:
+   public xfer::RefineOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   SkeletonCellDoubleConservativeLinearRefine(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~SkeletonCellDoubleConservativeLinearRefine();
+
+   /**
+    * Return true if the variable and name string match cell-centered
+    * double conservative linear interpolation; otherwise, return false.
+    */
+   bool
+   findRefineOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const string& op_name) const;
+
+   /**
+    * Return name string identifier of this refinement operator.
+    */
+   const string&
+   getOperatorName() const;
+
+   /**
+    * The priority of cell-centered double conservative linear is 0.
+    * It will be performed before any user-defined interpolation operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the conservative linear interpolation operator is
+    * the vector of ones.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Refine the source component on the coarse patch to the destination
+    * component on the fine patch using the cell-centered double conservative
+    * linear interpolation operator.  Interpolation is performed on the
+    * intersection of the destination patch and the fine box.   It is assumed
+    * that the coarse patch contains sufficient data for the stencil width of
+    * the refinement operator.
+    */
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::BoxOverlap& fine_overlap,
+      const hier::IntVector& ratio) const;
+
+   void
+   refine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio) const;
+
+   /**
+    * Set the dx, the distance between mesh nodes.
+    */
+   void
+   setDx(
+      const int level_number,
+      const double* dx);
+
+private:
+   /**
+    * Return the dx
+    */
+   void
+   getDx(
+      const int level_number,
+      double* dx) const;
+
+   string d_name_id;
+   tbox::Array<tbox::Array<double> > d_dx;
+
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/SkeletonCellDoubleWeightedAverage.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/SkeletonCellDoubleWeightedAverage.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,202 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for cell-centered double data on
+ *                a Skeleton mesh. 
+ *
+ ************************************************************************/
+
+#include "SkeletonCellDoubleWeightedAverage.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/hier/BlockPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+// in cartcoarsen1d.f:
+void F77_FUNC(cartwgtavgcelldoub1d, CARTWGTAVGCELLDOUB1D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+// in cartcoarsen2d.f:
+void F77_FUNC(cartwgtavgcelldoub2d, CARTWGTAVGCELLDOUB2D) (
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+// in cartcoarsen3d.f:
+void F77_FUNC(cartwgtavgcelldoub3d, CARTWGTAVGCELLDOUB3D) (
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+}
+
+using namespace SAMRAI;
+
+SkeletonCellDoubleWeightedAverage::SkeletonCellDoubleWeightedAverage(
+   const tbox::Dimension& dim):
+   xfer::CoarsenOperator(dim, "SKELETON_CONSERVATIVE_COARSEN")
+{
+   d_name_id = "SKELETON_CONSERVATIVE_COARSEN";
+}
+
+SkeletonCellDoubleWeightedAverage::~SkeletonCellDoubleWeightedAverage()
+{
+}
+
+bool SkeletonCellDoubleWeightedAverage::findCoarsenOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const string& op_name) const
+{
+   const tbox::Pointer<pdat::CellVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const string&
+SkeletonCellDoubleWeightedAverage::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int SkeletonCellDoubleWeightedAverage::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+SkeletonCellDoubleWeightedAverage::getStencilWidth() const {
+   return hier::IntVector(getDim(), 0);
+}
+
+void SkeletonCellDoubleWeightedAverage::coarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   tbox::Pointer<pdat::CellData<double> >
+   fdata = fine.getPatchData(src_component);
+   tbox::Pointer<pdat::CellData<double> >
+   cdata = coarse.getPatchData(dst_component);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+#endif
+
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+   const hier::Index cilo = cdata->getGhostBox().lower();
+   const hier::Index cihi = cdata->getGhostBox().upper();
+
+   const tbox::Pointer<hier::BlockPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+   const tbox::Pointer<hier::BlockPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+
+   int flev_num = fine.getPatchLevelNumber();
+   int clev_num = coarse.getPatchLevelNumber();
+
+   // deal with levels not in hierarchy
+   if (flev_num < 0) flev_num = clev_num + 1;
+   if (clev_num < 0) clev_num = flev_num - 1;
+
+   double cdx[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   double fdx[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   getDx(clev_num, cdx);
+   getDx(flev_num, fdx);
+
+   for (int d = 0; d < cdata->getDepth(); d++) {
+      if (getDim() == tbox::Dimension(1)) {
+         F77_FUNC(cartwgtavgcelldoub1d, CARTWGTAVGCELLDOUB1D) (
+            ifirstc(0), ilastc(0),
+            filo(0), fihi(0),
+            cilo(0), cihi(0),
+            &ratio[0],
+            fdx,
+            cdx,
+            fdata->getPointer(d),
+            cdata->getPointer(d));
+      } else if (getDim() == tbox::Dimension(2)) {
+         F77_FUNC(cartwgtavgcelldoub2d, CARTWGTAVGCELLDOUB2D) (
+            ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+            filo(0), filo(1), fihi(0), fihi(1),
+            cilo(0), cilo(1), cihi(0), cihi(1),
+            &ratio[0],
+            fdx,
+            cdx,
+            fdata->getPointer(d),
+            cdata->getPointer(d));
+      } else if (getDim() == tbox::Dimension(3)) {
+         F77_FUNC(cartwgtavgcelldoub3d, CARTWGTAVGCELLDOUB3D) (
+            ifirstc(0), ifirstc(1), ifirstc(2),
+            ilastc(0), ilastc(1), ilastc(2),
+            filo(0), filo(1), filo(2),
+            fihi(0), fihi(1), fihi(2),
+            cilo(0), cilo(1), cilo(2),
+            cihi(0), cihi(1), cihi(2),
+            &ratio[0],
+            fdx,
+            cdx,
+            fdata->getPointer(d),
+            cdata->getPointer(d));
+      } else {
+         TBOX_ERROR("SkeletonCellDoubleWeightedAverage error...\n"
+            << "getDim() > 3 not supported." << endl);
+
+      }
+   }
+}
+
+void SkeletonCellDoubleWeightedAverage::setDx(
+   const int level_number,
+   const double* dx)
+{
+   if (level_number >= d_dx.getSize()) {
+      d_dx.resizeArray(level_number + 1);
+      d_dx[level_number].resizeArray(getDim().getValue());
+      for (int i = 0; i < getDim().getValue(); i++) {
+         d_dx[level_number][i] = dx[i];
+      }
+   }
+}
+
+void SkeletonCellDoubleWeightedAverage::getDx(
+   const int level_number,
+   double* dx) const
+{
+   for (int i = 0; i < getDim().getValue(); i++) {
+      dx[i] = d_dx[level_number][i];
+   }
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/SkeletonCellDoubleWeightedAverage.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/SkeletonCellDoubleWeightedAverage.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for cell-centered double data on
+ *                a Skeleton mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_SkeletonCellDoubleWeightedAverageXD
+#define included_SkeletonCellDoubleWeightedAverageXD
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+#ifndef included_String
+#include <string>
+#define included_String
+#endif
+#include "SAMRAI/xfer/CoarsenOperator.h"
+
+using namespace std;
+using namespace SAMRAI;
+
+/**
+ * Class SkeletonCellDoubleWeightedAverageX implements conservative
+ * cell-weighted averaging for cell-centered double patch data defined over a
+ * Skeleton mesh.  It is derived from the xfer::CoarsenOperator base class.
+ * The numerical operations for the averaging use FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is cell-centered double, and the string is "CONSERVATIVE_COARSEN".
+ *
+ * @see xfer::CoarsenOperator
+ */
+
+class SkeletonCellDoubleWeightedAverage:
+   public xfer::CoarsenOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   SkeletonCellDoubleWeightedAverage(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~SkeletonCellDoubleWeightedAverage();
+
+   /**
+    * Return true if the variable and name string match cell-centered
+    * double weighted averaging; otherwise, return false.
+    */
+   bool
+   findCoarsenOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const string& op_name) const;
+
+   /**
+    * Return name string identifier of this coarsening operation.
+    */
+   const string&
+   getOperatorName() const;
+
+   /**
+    * The priority of cell-centered double weighted averaging is 0.
+    * It will be performed before any user-defined coarsen operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the weighted averaging operator is the vector of
+    * zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Coarsen the source component on the fine patch to the destination
+    * component on the coarse patch using the cell-centered double weighted
+    * averaging operator.  Coarsening is performed on the intersection of
+    * the destination patch and the coarse box.  It is assumed that the
+    * fine patch contains sufficient data for the stencil width of the
+    * coarsening operator.
+    */
+   void
+   coarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+   /**
+    * Set the dx, the distance between mesh nodes.
+    */
+   void
+   setDx(
+      const int level_number,
+      const double* dx);
+
+private:
+   /**
+    * Return the dx
+    */
+   void
+   getDx(
+      const int level_number,
+      double* dx) const;
+
+   string d_name_id;
+   tbox::Array<tbox::Array<double> > d_dx;
+
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/SkeletonOutersideDoubleWeightedAverage.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/SkeletonOutersideDoubleWeightedAverage.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,268 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for outerside double data on
+ *                a Skeleton mesh. 
+ *
+ ************************************************************************/
+
+#include "SkeletonOutersideDoubleWeightedAverage.h"
+
+#include <float.h>
+#include <math.h>
+#include "SAMRAI/hier/BlockPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/OutersideData.h"
+#include "SAMRAI/pdat/OutersideVariable.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * External declarations for FORTRAN  routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+extern "C" {
+// in cartcoarsen1d.f:
+void F77_FUNC(cartwgtavgoutsidedoub1d, CARTWGTAVGOUTSIDEDOUB1D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+// in cartcoarsen2d.f:
+void F77_FUNC(cartwgtavgoutsidedoub2d0, CARTWGTAVGOUTSIDEDOUB2D0) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+
+void F77_FUNC(cartwgtavgoutsidedoub2d1, CARTWGTAVGOUTSIDEDOUB2D1) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+// in cartcoarsen3d.f:
+void F77_FUNC(cartwgtavgoutsidedoub3d0, CARTWGTAVGOUTSIDEDOUB3D0) (
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+void F77_FUNC(cartwgtavgoutsidedoub3d1, CARTWGTAVGOUTSIDEDOUB3D1) (
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+void F77_FUNC(cartwgtavgoutsidedoub3d2, CARTWGTAVGOUTSIDEDOUB3D2) (
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *,
+   const double *, double *);
+}
+
+using namespace SAMRAI;
+
+SkeletonOutersideDoubleWeightedAverage::SkeletonOutersideDoubleWeightedAverage(
+   const tbox::Dimension& dim):
+   xfer::CoarsenOperator(dim, "SKELETON_CONSERVATIVE_COARSEN")
+{
+   d_name_id = "SKELETON_CONSERVATIVE_COARSEN";
+}
+
+SkeletonOutersideDoubleWeightedAverage::~SkeletonOutersideDoubleWeightedAverage()
+{
+}
+
+bool SkeletonOutersideDoubleWeightedAverage::findCoarsenOperator(
+   const tbox::Pointer<hier::Variable>& var,
+   const string& op_name) const
+{
+   const tbox::Pointer<pdat::OutersideVariable<double> > cast_var(var);
+   if (!cast_var.isNull() && (op_name == d_name_id)) {
+      return true;
+   } else {
+      return false;
+   }
+}
+
+const string&
+SkeletonOutersideDoubleWeightedAverage::getOperatorName() const
+{
+   return d_name_id;
+}
+
+int SkeletonOutersideDoubleWeightedAverage::getOperatorPriority() const
+{
+   return 0;
+}
+
+hier::IntVector
+SkeletonOutersideDoubleWeightedAverage::getStencilWidth() const {
+   return hier::IntVector(getDim(), 0);
+}
+
+void SkeletonOutersideDoubleWeightedAverage::coarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const int dst_component,
+   const int src_component,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   tbox::Pointer<pdat::OutersideData<double> >
+   fdata = fine.getPatchData(src_component);
+   tbox::Pointer<pdat::OutersideData<double> >
+   cdata = coarse.getPatchData(dst_component);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!fdata.isNull());
+   TBOX_ASSERT(!cdata.isNull());
+   TBOX_ASSERT(cdata->getDepth() == fdata->getDepth());
+#endif
+
+   const hier::Index filo = fdata->getGhostBox().lower();
+   const hier::Index fihi = fdata->getGhostBox().upper();
+   const hier::Index cilo = cdata->getGhostBox().lower();
+   const hier::Index cihi = cdata->getGhostBox().upper();
+
+   const tbox::Pointer<hier::BlockPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+   const tbox::Pointer<hier::BlockPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+
+   int flev_num = fine.getPatchLevelNumber();
+   int clev_num = coarse.getPatchLevelNumber();
+
+   // deal with levels not in hierarchy
+   if (flev_num < 0) flev_num = clev_num + 1;
+   if (clev_num < 0) clev_num = flev_num - 1;
+
+   double cdx[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   double fdx[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   getDx(clev_num, cdx);
+   getDx(flev_num, fdx);
+
+   for (int d = 0; d < cdata->getDepth(); d++) {
+      // loop over lower and upper outerside arrays
+      for (int i = 0; i < 2; i++) {
+         if (getDim() == tbox::Dimension(1)) {
+            F77_FUNC(cartwgtavgoutsidedoub1d, CARTWGTAVGOUTSIDEDOUB1D) (
+               ifirstc(0), ilastc(0),
+               filo(0), fihi(0),
+               cilo(0), cihi(0),
+               &ratio[0],
+               fdx,
+               cdx,
+               fdata->getPointer(0, i, d),
+               cdata->getPointer(0, i, d));
+         } else if (getDim() == tbox::Dimension(2)) {
+            F77_FUNC(cartwgtavgoutsidedoub2d0, CARTWGTAVGOUTSIDEDOUB2D0) (
+               ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+               filo(0), filo(1), fihi(0), fihi(1),
+               cilo(0), cilo(1), cihi(0), cihi(1),
+               &ratio[0],
+               fdx,
+               cdx,
+               fdata->getPointer(0, i, d),
+               cdata->getPointer(0, i, d));
+            F77_FUNC(cartwgtavgoutsidedoub2d1, CARTWGTAVGOUTSIDEDOUB2D1) (
+               ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+               filo(0), filo(1), fihi(0), fihi(1),
+               cilo(0), cilo(1), cihi(0), cihi(1),
+               &ratio[0],
+               fdx,
+               cdx,
+               fdata->getPointer(1, i, d),
+               cdata->getPointer(1, i, d));
+         } else if (getDim() == tbox::Dimension(3)) {
+            F77_FUNC(cartwgtavgoutsidedoub3d0, CARTWGTAVGOUTSIDEDOUB3D0) (
+               ifirstc(0), ifirstc(1), ifirstc(2),
+               ilastc(0), ilastc(1), ilastc(2),
+               filo(0), filo(1), filo(2),
+               fihi(0), fihi(1), fihi(2),
+               cilo(0), cilo(1), cilo(2),
+               cihi(0), cihi(1), cihi(2),
+               &ratio[0],
+               fdx,
+               cdx,
+               fdata->getPointer(0, i, d),
+               cdata->getPointer(0, i, d));
+            F77_FUNC(cartwgtavgoutsidedoub3d1, CARTWGTAVGOUTSIDEDOUB3D1) (
+               ifirstc(0), ifirstc(1), ifirstc(2),
+               ilastc(0), ilastc(1), ilastc(2),
+               filo(0), filo(1), filo(2),
+               fihi(0), fihi(1), fihi(2),
+               cilo(0), cilo(1), cilo(2),
+               cihi(0), cihi(1), cihi(2),
+               &ratio[0],
+               fdx,
+               cdx,
+               fdata->getPointer(1, i, d),
+               cdata->getPointer(1, i, d));
+            F77_FUNC(cartwgtavgoutsidedoub3d2, CARTWGTAVGOUTSIDEDOUB3D2) (
+               ifirstc(0), ifirstc(1), ifirstc(2),
+               ilastc(0), ilastc(1), ilastc(2),
+               filo(0), filo(1), filo(2),
+               fihi(0), fihi(1), fihi(2),
+               cilo(0), cilo(1), cilo(2),
+               cihi(0), cihi(1), cihi(2),
+               &ratio[0],
+               fdx,
+               cdx,
+               fdata->getPointer(2, i, d),
+               cdata->getPointer(2, i, d));
+         } else {
+            TBOX_ERROR("SkeletonOutersideDoubleWeightedAverage error...\n"
+               << "getDim() > 3 not supported." << endl);
+         }
+      }
+   }
+}
+
+void SkeletonOutersideDoubleWeightedAverage::setDx(
+   const int level_number,
+   const double* dx)
+{
+   if (level_number >= d_dx.getSize()) {
+      d_dx.resizeArray(level_number + 1);
+      d_dx[level_number].resizeArray(getDim().getValue());
+      for (int i = 0; i < getDim().getValue(); i++) {
+         d_dx[level_number][i] = dx[i];
+      }
+   }
+}
+
+void SkeletonOutersideDoubleWeightedAverage::getDx(
+   const int level_number,
+   double* dx) const
+{
+   for (int i = 0; i < getDim().getValue(); i++) {
+      dx[i] = d_dx[level_number][i];
+   }
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/SkeletonOutersideDoubleWeightedAverage.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/SkeletonOutersideDoubleWeightedAverage.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Weighted averaging operator for outerside double data on
+ *                a Skeleton mesh. 
+ *
+ ************************************************************************/
+
+#ifndef included_SkeletonOutersideDoubleWeightedAverageXD
+#define included_SkeletonOutersideDoubleWeightedAverageXD
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+#ifndef included_String
+#include <string>
+#define included_String
+#endif
+#include "SAMRAI/xfer/CoarsenOperator.h"
+
+using namespace std;
+using namespace SAMRAI;
+
+/**
+ * Class SkeletonOutersideDoubleWeightedAverage implements conservative
+ * side-weighted averaging for outerside double patch data defined over
+ * a Skeleton mesh.  It is derived from the xfer::CoarsenOperator base class.
+ * The numerical operations for theaveraging use FORTRAN numerical routines.
+ *
+ * The findCoarsenOperator() operator function returns true if the input
+ * variable is outerside double, and the string is "CONSERVATIVE_COARSEN".
+ *
+ * @see xfer::CoarsenOperator
+ */
+
+class SkeletonOutersideDoubleWeightedAverage:
+   public xfer::CoarsenOperator
+{
+public:
+   /**
+    * Uninteresting default constructor.
+    */
+   SkeletonOutersideDoubleWeightedAverage(
+      const tbox::Dimension& dim);
+
+   /**
+    * Uninteresting virtual destructor.
+    */
+   virtual ~SkeletonOutersideDoubleWeightedAverage();
+
+   /**
+    * Return true if the variable and name string match the outerside
+    * double weighted averaging; otherwise, return false.
+    */
+   bool
+   findCoarsenOperator(
+      const tbox::Pointer<hier::Variable>& var,
+      const string& op_name) const;
+
+   /**
+    * Return name string identifier of this coarsening operator.
+    */
+   const string&
+   getOperatorName() const;
+
+   /**
+    * The priority of outerside double weighted averaging is 0.
+    * It will be performed before any user-defined coarsen operations.
+    */
+   int
+   getOperatorPriority() const;
+
+   /**
+    * The stencil width of the weighted averaging operator is the vector of
+    * zeros.  That is, its stencil does not extend outside the fine box.
+    */
+   hier::IntVector
+   getStencilWidth() const;
+
+   /**
+    * Coarsen the source component on the fine patch to the destination
+    * component on the coarse patch using the outerside double weighted
+    * averaging operator.  Coarsening is performed on the intersection of
+    * the destination patch and the coarse box.  It is assumed that the
+    * fine patch contains sufficient data for the stencil width of the
+    * coarsening operator.
+    */
+   void
+   coarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const int dst_component,
+      const int src_component,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+   /**
+    * Set the dx, the distance between mesh nodes.
+    */
+   void
+   setDx(
+      const int level_number,
+      const double* dx);
+
+private:
+   /**
+    * Return the dx
+    */
+   void
+   getDx(
+      const int level_number,
+      double* dx) const;
+
+   string d_name_id;
+   tbox::Array<tbox::Array<double> > d_dx;
+
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/example_inputs/cart_1blk.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/example_inputs/cart_1blk.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,244 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI LinAdv example problem 
+ *
+ ************************************************************************/
+
+MblkGeometry {
+   problem_type = "CARTESIAN"
+
+   CartesianGeometry {
+      domain_xlo_0 = 0.e0 , 0.e0 , 0.e0    // lower end of computational domain.
+      domain_xhi_0 = 30.e0 , 20.e0 , 20.e0  // upper end of computational domain.
+   }
+
+   refine_boxes_0_0 = [(5,5,5),(9,9,9)]
+}
+
+
+MblkLinAdv {
+
+   advection_velocity = 2.0e0 , 1.0e0 , 1.0e0
+   godunov_order    = 2                // order of Goduov slopes (1, 2, or 4)
+   corner_transport = "CORNER_TRANSPORT_1"  
+
+   data_problem      = "SPHERE" 
+
+   Initial_data {
+      radius            = 2.9   
+      center            = 5.5 , 5.5 , 5.5
+
+      uval_inside       = 80.0
+      uval_outside      = 5.0
+ 
+   }
+
+   Refinement_data {
+//      refine_criteria = "USER_DEFINED", "UVAL_GRADIENT", "UVAL_SHOCK"
+      refine_criteria = "USER_DEFINED"
+ 
+      UVAL_GRADIENT {
+         grad_tol = 10.0
+      }
+ 
+      UVAL_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "FLOW"
+      }
+
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+
+   }
+
+}
+
+Main {
+   dim = 3
+// log file parameters 
+   log_file_name    = "sphere-3d.log"
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_cart-1blk"
+   viz_dump_filename     = "cart-1blk"    // not used by VisIt
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+
+// restart dump parameters
+   restart_interval       = 0         // zero to turn off
+   restart_write_dirname  = "restart_cart-1blk"
+
+}
+
+TimerManager {
+   timer_list               = "apps::*::*",
+                              "algs::*::*",
+                              "mesh::*::*"
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+//   print_timer_overhead   = TRUE
+   print_threshold        = 0.0
+}
+
+
+Multiblock {
+   num_blocks = 1
+
+   // Geometries of the hierachy blocks
+   BlockGeometry0{
+      domain_boxes	= [ (0,0,0) , (29,19,19) ]
+   }
+
+   // Singularity defn and neighbors
+   Singularity0 {
+      blocks = 0
+      sing_box_0 = [(30,20,20),(30,20,20)]
+   }
+
+   PatchHierarchy {
+      max_levels = 2         // Maximum number of levels in hierarchy.
+
+   // Note: For the following regridding information, data is required for each
+   //       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+   //       If more data values than needed are given, only the number required
+   //       will be read in.  If fewer values are given, an error will result.
+   //
+   // Specify coarsening ratios for each level 1 through max_levels-1
+
+      ratio_to_coarser {      // vector ratio to next coarser level
+         level_1 = 2 , 2 , 2
+         level_2 = 2 , 2 , 2
+         level_3 = 2 , 2 , 2
+      }
+
+      largest_patch_size {
+         level_0 = 40 , 40 , 40
+         // all finer levels will use same values as level_0...
+      }
+
+      smallest_patch_size {
+         level_0 = 9 , 9 , 9
+         // all finer levels will use same values as level_0...
+      }
+                                      // boxes < efficiency * vol of large box
+   }
+}
+
+
+GriddingAlgorithm{
+
+   efficiency_tolerance    = 0.85e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.95e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.5e0    // max cfl factor used in problem
+   cfl_init                  = 0.5e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+TimeRefinementIntegrator{
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 25     // max number of simulation timesteps
+}
+
+LoadBalancer {
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/fortran/2d/skelbdry2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/fortran/2d/skelbdry2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,430 @@
+c
+c
+c general boundary condition cases
+c
+c
+c node boundary conditions
+c
+c
+c edge boundary conditions
+c
+c***********************************************************************
+c***********************************************************************
+      subroutine getskeledgebdry2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  ibeg0,iend0,ibeg1,iend1,
+     &  ngc0,ngc1,
+     &  bdry_loc,
+     &  bdry_cond,
+     &  edge_values,
+     &  arrdata,
+     &  arrdepth)
+c***********************************************************************
+      implicit none
+c
+c  File:        appu_skelbdryparams2d.i
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    
+c  Modified:    
+c  Description: m4 include file for 2d boundary constant common blocks
+c
+      common/skelbdrylocparams2d/
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,
+     &  X0Y0,X1Y0,X0Y1,X1Y1
+      integer
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,
+     &  X0Y0,X1Y0,X0Y1,X1Y1
+c
+c
+      common/skelbdrycondparams2d/
+     &  FLOW,XFLOW,YFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET
+      integer
+     &  FLOW,XFLOW,YFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET
+c***********************************************************************
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer ibeg0,iend0,ibeg1,iend1
+      integer ngc0,ngc1
+c
+c
+      integer bdry_loc,
+     &        arrdepth, 
+     &        bdry_cond
+      double precision
+     &        edge_values(0:arrdepth-1,0:2*2-1)
+c
+      double precision
+     &  arrdata(ifirst0-ngc0:ilast0+ngc0,
+     &          ifirst1-ngc1:ilast1+ngc1,0:arrdepth-1)
+c
+      integer ic1,ic0,ict0,ict1
+      integer k
+      integer ipivot0,ipivot1
+      integer edge_loc
+      double precision    dirsign0,dirsign1
+c
+c***********************************************************************
+c   bdry_loc   index     bdry_loc  index   
+c       0     (-1, 0)       2     (0,-1)  
+c       1     ( 1, 0)       3     (0, 1)  
+c***********************************************************************
+c***********************************************************************
+      edge_loc = bdry_loc
+      if ((bdry_loc.eq.XLEFT).or.(bdry_loc.eq.XRIGHT)) then
+         if (bdry_loc.eq.XLEFT) then
+c                             x0 boundary
+            ipivot0  = ifirst0
+            dirsign0 = -1.d0
+         else
+c                             x1 boundary
+            ipivot0  = ilast0
+            dirsign0 = 1.d0
+         endif
+           if (bdry_cond.eq.DIRICHLET) then
+             do ic1=ibeg1,iend1
+               do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=edge_values(k,edge_loc)
+         enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.FLOW) then
+             do ic1=ibeg1,iend1
+               ict1 = ic1
+               do ic0=ibeg0,iend0
+                 ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=arrdata(ict0,ict1,k)
+         enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.REFLECT) then
+             do ic1=ibeg1,iend1
+               ict1 = ic1
+               do ic0=ibeg0,iend0
+                 ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=arrdata(ict0,ict1,k)
+         enddo
+         arrdata(ic0,ic1,0)= -arrdata(ic0,ic1,0)
+               enddo
+             enddo
+          else
+             write(6,*) "INVALID EDGE bdry_cond in getskeledgebdry2d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+          endif
+      else if ((bdry_loc.eq.YLEFT).or.(bdry_loc.eq.YRIGHT)) then
+         if (bdry_loc.eq.YLEFT) then
+c                             y0 boundary
+            ipivot1  = ifirst1
+            dirsign1 = -1.d0
+         else
+c                             y1 boundary
+            ipivot1  = ilast1
+            dirsign1 = 1.d0
+         endif
+           if (bdry_cond.eq.DIRICHLET) then
+             do ic1=ibeg1,iend1
+               do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=edge_values(k,edge_loc)
+         enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.FLOW) then
+             do ic1=ibeg1,iend1
+               ict1 = ipivot1
+               do ic0=ibeg0,iend0
+                 ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=arrdata(ict0,ict1,k)
+         enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.REFLECT) then
+             do ic1=ibeg1,iend1
+               ict1 = ipivot1
+               do ic0=ibeg0,iend0
+                 ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=arrdata(ict0,ict1,k)
+         enddo
+         arrdata(ic0,ic1,1)= -arrdata(ic0,ic1,1)
+               enddo
+             enddo
+          else
+             write(6,*) "INVALID EDGE bdry_cond in getskeledgebdry2d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+          endif
+      endif
+c
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine getskelnodebdry2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  ibeg0,iend0,ibeg1,iend1,
+     &  ngc0,ngc1,
+     &  bdry_loc,
+     &  bdry_cond,
+     &  edge_values,
+     &  arrdata,
+     &  arrdepth)
+c***********************************************************************
+      implicit none
+c
+c  File:        appu_skelbdryparams2d.i
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    
+c  Modified:    
+c  Description: m4 include file for 2d boundary constant common blocks
+c
+      common/skelbdrylocparams2d/
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,
+     &  X0Y0,X1Y0,X0Y1,X1Y1
+      integer
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,
+     &  X0Y0,X1Y0,X0Y1,X1Y1
+c
+c
+      common/skelbdrycondparams2d/
+     &  FLOW,XFLOW,YFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET
+      integer
+     &  FLOW,XFLOW,YFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET
+c***********************************************************************
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer ibeg0,iend0,ibeg1,iend1
+      integer ngc0,ngc1
+c
+c
+      integer bdry_loc,
+     &        arrdepth,
+     &        bdry_cond
+      double precision
+     &        edge_values(0:arrdepth-1,0:2*2-1)
+c
+      double precision
+     &  arrdata(ifirst0-ngc0:ilast0+ngc0,
+     &          ifirst1-ngc1:ilast1+ngc1,0:arrdepth-1)
+c
+      integer ic1,ic0,ict0,ict1
+      integer k
+      integer ipivot0,ipivot1
+      integer edge_loc0,edge_loc1
+      double precision    dirsign0,dirsign1
+c
+c***********************************************************************
+c***********************************************************************
+c    bdry_loc   index 
+c       0     (-1,-1)
+c       1     ( 1,-1)
+c       2     (-1, 1)
+c       3     ( 1, 1)
+c***********************************************************************
+c***********************************************************************
+      if (bdry_loc.eq.X0Y0) then
+         edge_loc0 = XLEFT
+         ipivot0   = ifirst0
+         dirsign0  = -1.d0
+         edge_loc1 = YLEFT
+         ipivot1   = ifirst1
+         dirsign1  = -1.d0
+      else if (bdry_loc.eq.X1Y0) then
+         edge_loc0 = XRIGHT
+         ipivot0   = ilast0
+         dirsign0  = 1.d0
+         edge_loc1 = YLEFT
+         ipivot1   = ifirst1
+         dirsign1  = -1.d0
+      else if (bdry_loc.eq.X0Y1) then
+         edge_loc0 = XLEFT
+         ipivot0   = ifirst0
+         dirsign0  = -1.d0
+         edge_loc1 = YRIGHT
+         ipivot1   = ilast1
+         dirsign1  = 1.d0
+      else if (bdry_loc.eq.X1Y1) then
+         edge_loc0 = XRIGHT
+         ipivot0   = ilast0
+         dirsign0  = 1.d0
+         edge_loc1 = YRIGHT
+         ipivot1   = ilast1
+         dirsign1  = 1.d0
+      endif
+           if (bdry_cond.eq.XDIRICHLET) then
+             do ic1=ibeg1,iend1
+               do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=edge_values(k,edge_loc0)
+         enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.YDIRICHLET) then
+             do ic1=ibeg1,iend1
+               do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=edge_values(k,edge_loc1)
+         enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.XFLOW) then
+             do ic1=ibeg1,iend1
+               ict1 = ic1
+               do ic0=ibeg0,iend0
+                 ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=arrdata(ict0,ict1,k)
+         enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YFLOW) then
+             do ic1=ibeg1,iend1
+               ict1 = ipivot1
+               do ic0=ibeg0,iend0
+                 ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=arrdata(ict0,ict1,k)
+         enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XREFLECT) then
+             do ic1=ibeg1,iend1
+               ict1 = ic1
+               do ic0=ibeg0,iend0
+                 ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=arrdata(ict0,ict1,k)
+         enddo
+         arrdata(ic0,ic1,0)= -arrdata(ic0,ic1,0)
+               enddo
+             enddo
+           else if (bdry_cond.eq.YREFLECT) then
+             do ic1=ibeg1,iend1
+               ict1 = ipivot1
+               do ic0=ibeg0,iend0
+                 ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,k)=arrdata(ict0,ict1,k)
+         enddo
+         arrdata(ic0,ic1,1)= -arrdata(ic0,ic1,1)
+               enddo
+             enddo
+           else
+             write(6,*) "INVALID NODE bdry_cond in getskelnodebdry2d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+           endif
+c
+      return
+      end
+
+c***********************************************************************
+c***********************************************************************
+      subroutine stufskelbdryloc2d(
+     &  XLEFTin, XRIGHTin, YLEFTin, YRIGHTin,
+     &  X0Y0in, X1Y0in, X0Y1in, X1Y1in)
+      implicit none
+      integer
+     &  XLEFTin, XRIGHTin, YLEFTin, YRIGHTin,
+     &  X0Y0in, X1Y0in, X0Y1in, X1Y1in
+c
+c  File:        appu_skelbdryparams2d.i
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    
+c  Modified:    
+c  Description: m4 include file for 2d boundary constant common blocks
+c
+      common/skelbdrylocparams2d/
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,
+     &  X0Y0,X1Y0,X0Y1,X1Y1
+      integer
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,
+     &  X0Y0,X1Y0,X0Y1,X1Y1
+c
+c
+      common/skelbdrycondparams2d/
+     &  FLOW,XFLOW,YFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET
+      integer
+     &  FLOW,XFLOW,YFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET
+
+c 2d edges
+        XLEFT=XLEFTin
+        XRIGHT=XRIGHTin
+        YLEFT=YLEFTin
+        YRIGHT=YRIGHTin
+
+c 2d nodes
+        X0Y0=X0Y0in
+        X1Y0=X1Y0in
+        X0Y1=X0Y1in
+        X1Y1=X1Y1in
+
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine stufskelbdrycond2d(
+     &  FLOWin, XFLOWin, YFLOWin, 
+     &  REFLECTin, XREFLECTin, YREFLECTin,
+     &  DIRICHLETin, XDIRICHLETin, YDIRICHLETin)
+      implicit none
+      integer
+     &  FLOWin, XFLOWin, YFLOWin, 
+     &  REFLECTin, XREFLECTin, YREFLECTin,
+     &  DIRICHLETin, XDIRICHLETin, YDIRICHLETin
+c
+c  File:        appu_skelbdryparams2d.i
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    
+c  Modified:    
+c  Description: m4 include file for 2d boundary constant common blocks
+c
+      common/skelbdrylocparams2d/
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,
+     &  X0Y0,X1Y0,X0Y1,X1Y1
+      integer
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,
+     &  X0Y0,X1Y0,X0Y1,X1Y1
+c
+c
+      common/skelbdrycondparams2d/
+     &  FLOW,XFLOW,YFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET
+      integer
+     &  FLOW,XFLOW,YFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET
+
+        FLOW=FLOWin
+        XFLOW=XFLOWin
+        YFLOW=YFLOWin
+
+        REFLECT=REFLECTin
+        XREFLECT=XREFLECTin
+        YREFLECT=YREFLECTin
+
+        DIRICHLET=DIRICHLETin
+        XDIRICHLET=XDIRICHLETin
+        YDIRICHLET=YDIRICHLETin
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/fortran/2d/upfluxsum2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/fortran/2d/upfluxsum2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,90 @@
+c
+c  File:        algs_upfluxsum2d.m4
+c  Package:     SAMRAI algorithms
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: F77 routines for updating 2d flux sums from fluxes.
+c
+define(SAMRAI_FORTDIR,../../patchdata/fortran)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+c
+c***********************************************************************
+c Add flux integrals to fluxsums
+c***********************************************************************
+c
+define(upfluxsumface_case_2d,`dnl
+      subroutine upfluxsumface2d$1(
+     &  ilo0,ilo1,ihi0,ihi1,
+     &  flxgc0,flxgc1,
+     &  iface,
+     &  flux,fluxsum)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ilo0,ilo1,ihi0,ihi1,
+     &  flxgc0,flxgc1,
+     &  iface
+      REAL
+     &  flux(SIDE2d$1VECG(ilo,ihi,flxgc)),
+     &  fluxsum(OUTERSIDE2d$1(ilo,ihi,0))
+      integer ie$1,ic$2
+c
+c***********************************************************************
+c
+      if (iface.eq.0) then
+        ie$1 = ilo$1
+      else 
+        ie$1 = ihi$1+1
+      endif 
+ 
+      do ic$2=ilo$2,ihi$2
+         fluxsum(ic$2)=fluxsum(ic$2)+flux(ie$1,ic$2)
+      enddo
+c
+      return
+      end
+')dnl
+define(upfluxsumside_case_2d,`dnl
+      subroutine upfluxsumside2d$1(
+     &  ilo0,ilo1,ihi0,ihi1,
+     &  flxgc0,flxgc1,
+     &  iface,
+     &  flux,fluxsum)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ilo0,ilo1,ihi0,ihi1,
+     &  flxgc0,flxgc1,
+     &  iface
+      REAL
+     &  flux(SIDE2d$1VECG(ilo,ihi,flxgc)),
+     &  fluxsum(OUTERSIDE2d$1(ilo,ihi,0))
+      integer ic$1,ic$2
+c
+c***********************************************************************
+c
+      if (iface.eq.0) then
+        ic$1 = ilo$1
+      else 
+        ic$1 = ihi$1+1
+      endif 
+ 
+      do ic$2=ilo$2,ihi$2
+         fluxsum(ic$2)=fluxsum(ic$2)+flux(ic0,ic1)
+      enddo
+c
+      return
+      end
+')dnl
+upfluxsumface_case_2d(0,1)dnl
+c
+upfluxsumface_case_2d(1,0)dnl
+c
+upfluxsumside_case_2d(0,1)dnl
+c
+upfluxsumside_case_2d(1,0)dnl
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/fortran/3d/skelbdry3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/fortran/3d/skelbdry3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1414 @@
+c
+c***********************************************************************
+c***********************************************************************
+      subroutine getskelfacebdry3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,
+     &  ngc0,ngc1,ngc2,
+     &  dx,
+     &  bdry_loc,
+     &  bdry_cond,
+     &  face_values,
+     &  arrdata,
+     &  arrdepth)
+c***********************************************************************
+      implicit none
+c
+c  File:        appu_cartbdryparams3d.i
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    
+c  Modified:    
+c  Description: m4 include file for 3d boundary constant common blocks
+c
+      common/skelbdrylocparams3d/
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT, 
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1
+      integer
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT,
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1  
+c
+c
+      common/skelbdrycondparams3d/
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+      integer
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+c***********************************************************************
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      integer ngc0,ngc1,ngc2
+c
+      double precision dx(0:3-1)
+c
+      integer bdry_loc,
+     &        arrdepth, 
+     &        bdry_cond
+      double precision
+     &        face_values(0:arrdepth-1,0:2*3-1)
+c
+      double precision
+     &  arrdata(ifirst0-ngc0:ilast0+ngc0,
+     &          ifirst1-ngc1:ilast1+ngc1,
+     &          ifirst2-ngc2:ilast2+ngc2,0:arrdepth-1)
+c
+      integer ic2,ic1,ic0,ict0,ict1,ict2
+      integer k
+      integer ipivot0,ipivot1,ipivot2
+      integer face_loc
+      double precision    dirsign0,dirsign1,dirsign2
+c
+c***********************************************************************
+c   bdry_loc   index     bdry_loc    index     bdry_loc   index
+c       0     (-1, 0, 0)     2     (0,-1, 0)      4     (0, 0,-1)
+c       1     ( 1, 0, 0)     3     (0, 1, 0)      5     (0, 0, 1)
+c***********************************************************************
+c***********************************************************************
+      face_loc = bdry_loc
+      if ((bdry_loc.eq.XLEFT).or.(bdry_loc.eq.XRIGHT)) then
+         if (bdry_loc.eq.XLEFT) then
+c                             x0 boundary
+            ipivot0  = ifirst0
+            dirsign0 = -1.d0 
+         else
+c                             x1 boundary
+            ipivot0  = ilast0
+            dirsign0 = 1.d0 
+         endif
+           if (bdry_cond.eq.DIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.NEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign0
+     &       * face_values(k,face_loc) * dble(ic0-ict0) * dx(0)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.FLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.REFLECT) then
+             do ic2=ibeg2,iend2
+              ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,0)= -arrdata(ic0,ic1,ic2,0)
+                 enddo
+               enddo
+             enddo
+          else
+             write(6,*) "INVALID FACE bdry_cond in getskelfacebdry3d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+          endif
+      else if ((bdry_loc.eq.YLEFT).or.(bdry_loc.eq.YRIGHT)) then
+         if (bdry_loc.eq.YLEFT) then
+c                             y0 boundary
+            ipivot1  = ifirst1
+            dirsign1 = -1.d0 
+         else
+c                             y1 boundary
+            ipivot1  = ilast1
+            dirsign1 = 1.d0 
+         endif
+           if (bdry_cond.eq.DIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.NEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign1
+     &       * face_values(k,face_loc) * dble(ic1-ict1) * dx(1)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.FLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.REFLECT) then
+             do ic2=ibeg2,iend2
+              ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,1)= -arrdata(ic0,ic1,ic2,1)
+                 enddo
+               enddo
+             enddo
+          else
+             write(6,*) "INVALID FACE bdry_cond in getskelfacebdry3d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+          endif
+      else if ((bdry_loc.eq.ZLEFT).or.(bdry_loc.eq.ZRIGHT)) then
+         if (bdry_loc.eq.ZLEFT) then
+c                             z0 boundary
+            ipivot2  = ifirst2
+            dirsign2 = -1.d0 
+         else
+c                             z1 boundary
+            ipivot2  = ilast2
+            dirsign2 = 1.d0 
+         endif
+           if (bdry_cond.eq.DIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.NEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign2
+     &       * face_values(k,face_loc) * dble(ic2-ict2) * dx(2)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.FLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                 enddo
+               enddo
+             enddo
+           else if (bdry_cond.eq.REFLECT) then
+             do ic2=ibeg2,iend2
+              ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,2)= -arrdata(ic0,ic1,ic2,2)
+                 enddo
+               enddo
+             enddo
+          else
+             write(6,*) "INVALID FACE bdry_cond in getskelfacebdry3d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+          endif
+      endif
+c
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine getskeledgebdry3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,
+     &  ngc0,ngc1,ngc2,
+     &  dx,
+     &  bdry_loc,
+     &  bdry_cond,
+     &  face_values,
+     &  arrdata,
+     &  arrdepth)
+c***********************************************************************
+      implicit none
+c
+c  File:        appu_skelbdryparams3d.i
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    
+c  Modified:    
+c  Description: m4 include file for 3d boundary constant common blocks
+c
+      common/skelbdrylocparams3d/
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT, 
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1
+      integer
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT,
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1  
+c
+c
+      common/skelbdrycondparams3d/
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+      integer
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+c***********************************************************************
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      integer ngc0,ngc1,ngc2
+c
+      double precision dx(0:3-1)
+c
+      integer bdry_loc,
+     &        arrdepth,
+     &        bdry_cond
+      double precision
+     &        face_values(0:arrdepth-1,0:2*3-1)
+c
+      double precision
+     &  arrdata(ifirst0-ngc0:ilast0+ngc0,
+     &          ifirst1-ngc1:ilast1+ngc1,
+     &          ifirst2-ngc2:ilast2+ngc2,0:arrdepth-1)
+c
+      integer ic2,ic1,ic0,ict0,ict1,ict2
+      integer k
+      integer ipivot0,ipivot1,ipivot2
+      integer face_loc0,face_loc1,face_loc2
+      double precision    dirsign0,dirsign1,dirsign2
+c
+c***********************************************************************
+c***********************************************************************
+c    bdry_loc   index    bdry_loc   index     bdry_loc   index
+c       0     (0,-1,-1)      4     (-1,0,-1)      8     (-1,-1,0)
+c       1     (0, 1,-1)      5     (-1,0, 1)      9     ( 1,-1,0)
+c       2     (0,-1, 1)      6     ( 1,0,-1)     10     (-1, 1,0)
+c       3     (0, 1, 1)      7     ( 1,0, 1)     11     ( 1, 1,0)
+c***********************************************************************
+c***********************************************************************
+      if ((bdry_loc.eq.Y0Z0).or.(bdry_loc.eq.Y1Z0).or.
+     &    (bdry_loc.eq.Y0Z1).or.(bdry_loc.eq.Y1Z1)) then
+         if (bdry_loc.eq.Y0Z0) then
+            face_loc1 = YLEFT
+            ipivot1   = ifirst1
+            dirsign1  = -1.d0
+            face_loc2 = ZLEFT
+            ipivot2   = ifirst2
+            dirsign2  = -1.d0
+         else if (bdry_loc.eq.Y1Z0) then
+            face_loc1 = YRIGHT
+            ipivot1   = ilast1
+            dirsign1  = 1.d0
+            face_loc2 = ZLEFT
+            ipivot2   = ifirst2
+            dirsign2  = -1.d0
+         else if (bdry_loc.eq.Y0Z1) then
+            face_loc1 = YLEFT
+            ipivot1   = ifirst1
+            dirsign1  = -1.d0
+            face_loc2 = ZRIGHT
+            ipivot2   = ilast2
+            dirsign2  = 1.d0
+         else
+            face_loc1 = YRIGHT
+            ipivot1   = ilast1
+            dirsign1  = 1.d0
+            face_loc2 = ZRIGHT
+            ipivot2   = ilast2
+            dirsign2  = 1.d0
+         endif
+           if (bdry_cond.eq.XDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc0)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc1)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc2)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign0
+     &       * face_values(k,face_loc0) * dble(ic0-ict0) * dx(0)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign1
+     &       * face_values(k,face_loc1) * dble(ic1-ict1) * dx(1)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign2
+     &       * face_values(k,face_loc2) * dble(ic2-ict2) * dx(2)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,0)= -arrdata(ic0,ic1,ic2,0)
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,1)= -arrdata(ic0,ic1,ic2,1)
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,2)= -arrdata(ic0,ic1,ic2,2)
+                   enddo
+                enddo
+             enddo
+           else
+             write(6,*) "INVALID EDGE bdry_cond in getskeledgebdry3d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+           endif
+      else if ((bdry_loc.eq.X0Z0).or.(bdry_loc.eq.X0Z1).or.
+     &         (bdry_loc.eq.X1Z0).or.(bdry_loc.eq.X1Z1)) then
+         if (bdry_loc.eq.X0Z0) then
+            face_loc2 = ZLEFT
+            ipivot2   = ifirst2
+            dirsign2  = -1.d0
+            face_loc0 = XLEFT
+            ipivot0   = ifirst0
+            dirsign0  = -1.d0
+         else if (bdry_loc.eq.X0Z1) then
+            face_loc2 = ZRIGHT
+            ipivot2   = ilast2
+            dirsign2  = 1.d0
+            face_loc0 = XLEFT
+            ipivot0   = ifirst0
+            dirsign0  = -1.d0
+         else if (bdry_loc.eq.X1Z0) then
+            face_loc2 = ZLEFT
+            ipivot2   = ifirst2
+            dirsign2  = -1.d0
+            face_loc0 = XRIGHT
+            ipivot0   = ilast0
+            dirsign0  = 1.d0
+         else
+            face_loc2 = ZRIGHT
+            ipivot2   = ilast2
+            dirsign2  = 1.d0
+            face_loc0 = XRIGHT
+            ipivot0   = ilast0
+            dirsign0  = 1.d0
+         endif
+           if (bdry_cond.eq.XDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc0)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc1)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc2)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign0
+     &       * face_values(k,face_loc0) * dble(ic0-ict0) * dx(0)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign1
+     &       * face_values(k,face_loc1) * dble(ic1-ict1) * dx(1)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign2
+     &       * face_values(k,face_loc2) * dble(ic2-ict2) * dx(2)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,0)= -arrdata(ic0,ic1,ic2,0)
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,1)= -arrdata(ic0,ic1,ic2,1)
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,2)= -arrdata(ic0,ic1,ic2,2)
+                   enddo
+                enddo
+             enddo
+           else
+             write(6,*) "INVALID EDGE bdry_cond in getskeledgebdry3d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+           endif
+      else if ((bdry_loc.eq.X0Y0).or.(bdry_loc.eq.X1Y0).or.
+     &         (bdry_loc.eq.X0Y1).or.(bdry_loc.eq.X1Y1)) then
+         if (bdry_loc.eq.X0Y0) then
+            face_loc1 = YLEFT
+            ipivot1   = ifirst1
+            dirsign1  = -1.d0
+            face_loc0 = XLEFT
+            ipivot0   = ifirst0
+            dirsign0  = -1.d0
+         else if (bdry_loc.eq.X1Y0) then
+            face_loc1 = YLEFT
+            ipivot1   = ifirst1
+            dirsign1  = -1.d0
+            face_loc0 = XRIGHT
+            ipivot0   = ilast0
+            dirsign0  = 1.d0
+         else if (bdry_loc.eq.X0Y1) then
+            face_loc1 = YRIGHT
+            ipivot1   = ilast1
+            dirsign1  = 1.d0
+            face_loc0 = XLEFT
+            ipivot0   = ifirst0
+            dirsign0  = -1.d0
+         else
+            face_loc1 = YRIGHT
+            ipivot1   = ilast1
+            dirsign1  = 1.d0
+            face_loc0 = XRIGHT
+            ipivot0   = ilast0
+            dirsign0  = 1.d0
+         endif
+           if (bdry_cond.eq.XDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc0)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc1)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc2)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign0
+     &       * face_values(k,face_loc0) * dble(ic0-ict0) * dx(0)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign1
+     &       * face_values(k,face_loc1) * dble(ic1-ict1) * dx(1)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign2
+     &       * face_values(k,face_loc2) * dble(ic2-ict2) * dx(2)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,0)= -arrdata(ic0,ic1,ic2,0)
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,1)= -arrdata(ic0,ic1,ic2,1)
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,2)= -arrdata(ic0,ic1,ic2,2)
+                   enddo
+                enddo
+             enddo
+           else
+             write(6,*) "INVALID EDGE bdry_cond in getskeledgebdry3d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+           endif
+      endif
+c
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine getskelnodebdry3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,
+     &  ngc0,ngc1,ngc2,
+     &  dx,
+     &  bdry_loc,
+     &  bdry_cond,
+     &  face_values,
+     &  arrdata,
+     &  arrdepth)
+c***********************************************************************
+      implicit none
+c
+c  File:        appu_skelbdryparams3d.i
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    
+c  Modified:    
+c  Description: m4 include file for 3d boundary constant common blocks
+c
+      common/skelbdrylocparams3d/
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT, 
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1
+      integer
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT,
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1  
+c
+c
+      common/skelbdrycondparams3d/
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+      integer
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+c***********************************************************************
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      integer ngc0,ngc1,ngc2
+c
+      double precision dx(0:3-1)
+c
+      integer bdry_loc,
+     &        arrdepth,
+     &        bdry_cond
+      double precision
+     &        face_values(0:arrdepth-1,0:2*3-1)
+c
+      double precision
+     &  arrdata(ifirst0-ngc0:ilast0+ngc0,
+     &          ifirst1-ngc1:ilast1+ngc1,
+     &          ifirst2-ngc2:ilast2+ngc2,0:arrdepth-1)
+c
+      integer ic2,ic1,ic0,ict0,ict1,ict2
+      integer k
+      integer ipivot0,ipivot1,ipivot2
+      integer face_loc0,face_loc1,face_loc2
+      double precision    dirsign0,dirsign1,dirsign2
+c
+c***********************************************************************
+c***********************************************************************
+c    bdry_loc   index     bdry_loc    index
+c       0     (-1,-1,-1)      4     (-1,-1, 1)
+c       1     ( 1,-1,-1)      5     ( 1,-1, 1)
+c       2     (-1, 1,-1)      6     (-1, 1, 1)
+c       3     ( 1, 1,-1)      7     ( 1, 1, 1)
+c***********************************************************************
+c***********************************************************************
+      if (bdry_loc.eq.X0Y0Z0) then
+         face_loc0 = XLEFT
+         ipivot0   = ifirst0
+         dirsign0  = -1.d0
+         face_loc1 = YLEFT
+         ipivot1   = ifirst1
+         dirsign1  = -1.d0
+         face_loc2 = ZLEFT
+         ipivot2   = ifirst2
+         dirsign2  = -1.d0
+      else if (bdry_loc.eq.X1Y0Z0) then
+         face_loc0 = XRIGHT
+         ipivot0   = ilast0
+         dirsign0  = 1.d0
+         face_loc1 = YLEFT
+         ipivot1   = ifirst1
+         dirsign1  = -1.d0
+         face_loc2 = ZLEFT
+         ipivot2   = ifirst2
+         dirsign2  = -1.d0
+      else if (bdry_loc.eq.X0Y1Z0) then
+         face_loc0 = XLEFT
+         ipivot0   = ifirst0
+         dirsign0  = -1.d0
+         face_loc1 = YRIGHT
+         ipivot1   = ilast1
+         dirsign1  = 1.d0
+         face_loc2 = ZLEFT
+         ipivot2   = ifirst2
+         dirsign2  = -1.d0
+      else if (bdry_loc.eq.X1Y1Z0) then
+         face_loc0 = XRIGHT
+         ipivot0   = ilast0
+         dirsign0  = 1.d0
+         face_loc1 = YRIGHT
+         ipivot1   = ilast1
+         dirsign1  = 1.d0
+         face_loc2 = ZLEFT
+         ipivot2   = ifirst2
+         dirsign2  = -1.d0
+      else if (bdry_loc.eq.X0Y0Z1) then
+         face_loc0 = XLEFT
+         ipivot0   = ifirst0
+         dirsign0  = -1.d0
+         face_loc1 = YLEFT
+         ipivot1   = ifirst1
+         dirsign1  = -1.d0
+         face_loc2 = ZRIGHT
+         ipivot2   = ilast2
+         dirsign2  = 1.d0
+      else if (bdry_loc.eq.X1Y0Z1) then
+         face_loc0 = XRIGHT
+         ipivot0   = ilast0
+         dirsign0  = 1.d0
+         face_loc1 = YLEFT
+         ipivot1   = ifirst1
+         dirsign1  = -1.d0
+         face_loc2 = ZRIGHT
+         ipivot2   = ilast2
+         dirsign2  = 1.d0
+      else if (bdry_loc.eq.X0Y1Z1) then
+         face_loc0 = XLEFT
+         ipivot0   = ifirst0
+         dirsign0  = -1.d0
+         face_loc1 = YRIGHT
+         ipivot1   = ilast1
+         dirsign1  = 1.d0
+         face_loc2 = ZRIGHT
+         ipivot2   = ilast2
+         dirsign2  = 1.d0
+      else if (bdry_loc.eq.X1Y1Z1) then
+         face_loc0 = XRIGHT
+         ipivot0   = ilast0
+         dirsign0  = 1.d0
+         face_loc1 = YRIGHT
+         ipivot1   = ilast1
+         dirsign1  = 1.d0
+         face_loc2 = ZRIGHT
+         ipivot2   = ilast2
+         dirsign2  = 1.d0
+      endif
+           if (bdry_cond.eq.XDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc0)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc1)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZDIRICHLET) then
+             do ic2=ibeg2,iend2
+               do ic1=ibeg1,iend1
+                 do ic0=ibeg0,iend0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=face_values(k,face_loc2)
+         enddo
+                   enddo
+                enddo
+             enddo
+          else if (bdry_cond.eq.XNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign0
+     &       * face_values(k,face_loc0) * dble(ic0-ict0) * dx(0)
+         enddo
+                   enddo
+                enddo
+             enddo
+          else if (bdry_cond.eq.YNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign1
+     &       * face_values(k,face_loc1) * dble(ic1-ict1) * dx(1)
+         enddo
+                   enddo
+                enddo
+             enddo
+          else if (bdry_cond.eq.ZNEUMANN) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k) + dirsign2
+     &       * face_values(k,face_loc2) * dble(ic2-ict2) * dx(2)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZFLOW) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.XREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ipivot0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,0)= -arrdata(ic0,ic1,ic2,0)
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.YREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ic2
+               do ic1=ibeg1,iend1
+                 ict1 = ipivot1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,1)= -arrdata(ic0,ic1,ic2,1)
+                   enddo
+                enddo
+             enddo
+           else if (bdry_cond.eq.ZREFLECT) then
+             do ic2=ibeg2,iend2
+               ict2 = ipivot2
+               do ic1=ibeg1,iend1
+                 ict1 = ic1
+                 do ic0=ibeg0,iend0
+                   ict0 = ic0
+         do k=0,arrdepth-1
+           arrdata(ic0,ic1,ic2,k)=arrdata(ict0,ict1,ict2,k)
+         enddo
+         arrdata(ic0,ic1,ic2,2)= -arrdata(ic0,ic1,ic2,2)
+                   enddo
+                enddo
+             enddo
+           else
+             write(6,*) "INVALID NODE bdry_cond in getskelnodebdry3d"
+             write(6,*) "bdry_loc = ",bdry_loc,
+     &                  "bdry_cond = ",bdry_cond
+           endif
+c
+      return
+      end
+
+c***********************************************************************
+c***********************************************************************
+      subroutine stufskelbdryloc3d(
+     &  XLEFTin, XRIGHTin, YLEFTin, YRIGHTin, ZLEFTin, ZRIGHTin,
+     &  Y0Z0in, Y1Z0in, Y0Z1in, Y1Z1in,
+     &  X0Z0in, X0Z1in, X1Z0in, X1Z1in,
+     &  X0Y0in, X1Y0in, X0Y1in, X1Y1in,
+     &  X0Y0Z0in, X1Y0Z0in, X0Y1Z0in, X1Y1Z0in,
+     &  X0Y0Z1in, X1Y0Z1in, X0Y1Z1in, X1Y1Z1in)
+      implicit none
+      integer
+     &  XLEFTin, XRIGHTin, YLEFTin, YRIGHTin, ZLEFTin, ZRIGHTin,
+     &  Y0Z0in, Y1Z0in, Y0Z1in, Y1Z1in,
+     &  X0Z0in, X0Z1in, X1Z0in, X1Z1in,
+     &  X0Y0in, X1Y0in, X0Y1in, X1Y1in,
+     &  X0Y0Z0in, X1Y0Z0in, X0Y1Z0in, X1Y1Z0in,
+     &  X0Y0Z1in, X1Y0Z1in, X0Y1Z1in, X1Y1Z1in
+c
+c  File:        appu_skelbdryparams3d.i
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    
+c  Modified:    
+c  Description: m4 include file for 3d boundary constant common blocks
+c
+      common/skelbdrylocparams3d/
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT, 
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1
+      integer
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT,
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1  
+c
+c
+      common/skelbdrycondparams3d/
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+      integer
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+
+c 3d faces
+        XLEFT=XLEFTin
+        XRIGHT=XRIGHTin
+        YLEFT=YLEFTin
+        YRIGHT=YRIGHTin
+        ZLEFT=ZLEFTin
+        ZRIGHT=ZRIGHTin
+
+c 3d edges
+        Y0Z0=Y0Z0in
+        Y1Z0=Y1Z0in
+        Y0Z1=Y0Z1in
+        Y1Z1=Y1Z1in
+        X0Z0=X0Z0in
+        X0Z1=X0Z1in
+        X1Z0=X1Z0in
+        X1Z1=X1Z1in
+        X0Y0=X0Y0in
+        X1Y0=X1Y0in
+        X0Y1=X0Y1in
+        X1Y1=X1Y1in
+
+c 3d nodes
+        X0Y0Z0=X0Y0Z0in
+        X1Y0Z0=X1Y0Z0in
+        X0Y1Z0=X0Y1Z0in
+        X1Y1Z0=X1Y1Z0in
+        X0Y0Z1=X0Y0Z1in
+        X1Y0Z1=X1Y0Z1in
+        X0Y1Z1=X0Y1Z1in
+        X1Y1Z1=X1Y1Z1in
+
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+      subroutine stufskelbdrycond3d(
+     &  FLOWin, XFLOWin, YFLOWin, ZFLOWin,
+     &  REFLECTin, XREFLECTin, YREFLECTin, ZREFLECTin, 
+     &  DIRICHLETin, XDIRICHLETin, YDIRICHLETin, ZDIRICHLETin,
+     &  NEUMANNin, XNEUMANNin, YNEUMANNin, ZNEUMANNin)
+      implicit none
+      integer
+     &  FLOWin, XFLOWin, YFLOWin, ZFLOWin,
+     &  REFLECTin, XREFLECTin, YREFLECTin, ZREFLECTin,
+     &  DIRICHLETin, XDIRICHLETin, YDIRICHLETin, ZDIRICHLETin,
+     &  NEUMANNin, XNEUMANNin, YNEUMANNin, ZNEUMANNin
+c
+c  File:        appu_skelbdryparams3d.i
+c  Package:     SAMRAI application utilities
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    
+c  Modified:    
+c  Description: m4 include file for 3d boundary constant common blocks
+c
+      common/skelbdrylocparams3d/
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT, 
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1
+      integer
+     &  XLEFT,XRIGHT,YLEFT,YRIGHT,ZLEFT,ZRIGHT,
+     &  Y0Z0,Y1Z0,Y0Z1,Y1Z1,
+     &  X0Z0,X0Z1,X1Z0,X1Z1,
+     &  X0Y0,X1Y0,X0Y1,X1Y1,
+     &  X0Y0Z0,X1Y0Z0,X0Y1Z0,X1Y1Z0,
+     &  X0Y0Z1,X1Y0Z1,X0Y1Z1,X1Y1Z1  
+c
+c
+      common/skelbdrycondparams3d/
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+      integer
+     &  FLOW,XFLOW,YFLOW,ZFLOW,
+     &  REFLECT,XREFLECT,YREFLECT,ZREFLECT,
+     &  DIRICHLET,XDIRICHLET,YDIRICHLET,ZDIRICHLET,
+     &  NEUMANN,XNEUMANN,YNEUMANN,ZNEUMANN
+
+        FLOW=FLOWin
+        XFLOW=XFLOWin
+        YFLOW=YFLOWin
+        ZFLOW=ZFLOWin
+
+        REFLECT=REFLECTin
+        XREFLECT=XREFLECTin
+        YREFLECT=YREFLECTin
+        ZREFLECT=ZREFLECTin
+
+        DIRICHLET=DIRICHLETin
+        XDIRICHLET=XDIRICHLETin
+        YDIRICHLET=YDIRICHLETin
+        ZDIRICHLET=ZDIRICHLETin
+
+        NEUMANN=NEUMANNin
+        XNEUMANN=XNEUMANNin
+        YNEUMANN=YNEUMANNin
+        ZNEUMANN=ZNEUMANNin
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/fortran/3d/upfluxsum3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/fortran/3d/upfluxsum3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,99 @@
+c
+c  File:        algs_upfluxsum3d.m4
+c  Package:     SAMRAI algorithms
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 4081 $
+c  Modified:    $LastChangedDate: 2010-07-15 16:07:05 -0700 (Thu, 15 Jul 2010) $
+c  Description: F77 routines for updating 3d flux sums from fluxes.
+c
+define(SAMRAI_FORTDIR,../../patchdata/fortran)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+c
+c***********************************************************************
+c Add flux integrals to fluxsums
+c***********************************************************************
+c
+define(upfluxsumface_case_3d,`dnl
+      subroutine upfluxsumface3d$1(
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iface,
+     &  flux,fluxsum)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iface
+      REAL
+     &  flux(SIDE3d$1VECG(ilo,ihi,flxgc)),
+     &  fluxsum(OUTERSIDE3d$1(ilo,ihi,0))
+      integer ie$1,ic$2,ic$3
+c
+c***********************************************************************
+c
+      if (iface.eq.0) then
+        ie$1 = ilo$1
+      else
+        ie$1 = ihi$1+1
+      endif 
+ 
+      do ic$3=ilo$3,ihi$3
+         do ic$2=ilo$2,ihi$2
+            fluxsum(ic$2,ic$3)=fluxsum(ic$2,ic$3)+flux(ie$1,ic$2,ic$3)
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+c
+c
+define(upfluxsumside_case_3d,`dnl
+      subroutine upfluxsumside3d$1(
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iside,
+     &  flux,fluxsum)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ilo0,ilo1,ilo2,ihi0,ihi1,ihi2,
+     &  flxgc0,flxgc1,flxgc2,
+     &  iside
+      REAL
+     &  flux(SIDE3d$1VECG(ilo,ihi,flxgc)),
+     &  fluxsum(OUTERSIDE3d$1(ilo,ihi,0))
+      integer ic$1,ic$2,ic$3
+c
+c***********************************************************************
+c
+      if (iside.eq.0) then
+        ic$1 = ilo$1
+      else
+        ic$1 = ihi$1+1
+      endif 
+ 
+      do ic$3=ilo$3,ihi$3
+         do ic$2=ilo$2,ihi$2
+            fluxsum(ic$2,ic$3)=fluxsum(ic$2,ic$3)+flux(ic0,ic1,ic2)
+         enddo
+      enddo
+c
+      return
+      end
+')dnl
+upfluxsumface_case_3d(0,1,2)dnl
+c
+upfluxsumface_case_3d(1,2,0)dnl
+c
+upfluxsumface_case_3d(2,0,1)dnl
+c
+upfluxsumside_case_3d(0,1,2)dnl
+c
+upfluxsumside_case_3d(1,0,2)dnl
+c
+upfluxsumside_case_3d(2,0,1)dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/main.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/main.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,655 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program for SAMRAI Linear Advection example problem. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <cstdio>
+#include <cstdlib>
+#include <string>
+#include <fstream>
+using namespace std;
+
+#ifndef _MSC_VER
+#include <unistd.h>
+#endif
+
+#include <sys/stat.h>
+
+// Headers for basic SAMRAI objects
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/InputDatabase.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+// Headers for major algorithm/data structure objects
+
+#include "SAMRAI/mesh/BergerRigoutsos.h"
+#include "SAMRAI/geom/BlockGridGeometry.h"
+#include "SAMRAI/mesh/MultiblockGriddingAlgorithm.h"
+#include "MblkHyperbolicLevelIntegrator.h"
+#include "SAMRAI/mesh/TreeLoadBalancer.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/MultiblockPatchHierarchy.h"
+#include "SAMRAI/mesh/StandardTagAndInitialize.h"
+#include "SAMRAI/algs/TimeRefinementIntegrator.h"
+#include "SAMRAI/algs/TimeRefinementLevelStrategy.h"
+#include "SAMRAI/appu/VisItDataWriter.h"
+
+// Header for application-specific algorithm/data structure object
+
+#include "MblkLinAdv.h"
+
+// Classes for run-time plotting and autotesting.
+
+#if (TESTING == 1)
+#include "AutoTester.h"
+#endif
+
+using namespace SAMRAI;
+
+/************************************************************************
+ *                                                                      *
+ * This is the main program for an AMR solution of the linear advection *
+ * equation: du/dt + div(a*u) = 0, where  "u" is a scalar-valued        *
+ * function and "a" is a constant vector.  This application program is  *
+ * constructed by composing several algorithm objects found in the      *
+ * SAMRAI library with a few that are specific to this application.     *
+ * A brief description of these object follows.                         *
+ *                                                                      *
+ * There are two main data containment objects.  These are:             *
+ *                                                                      *
+ *    hier::PatchHierarchy - A container for the AMR patch hierarchy and      *
+ *       the data on the grid.                                          *
+ *                                                                      *
+ *    geom::BlockGridGeometry - Defines and maintains the Skeleton       *
+ *       coordinate system on the grid.  The hier::PatchHierarchy             *
+ *       maintains a reference to this object.                          *
+ *                                                                      *
+ * A single overarching algorithm object drives the time integration    *
+ * and adaptive gridding processes:                                     *
+ *                                                                      *
+ *    algs::TimeRefinementIntegrator - Coordinates time integration and       *
+ *       adaptive gridding procedures for the various levels            *
+ *       in the AMR patch hierarchy.  Local time refinement is          *
+ *       employed during hierarchy integration; i.e., finer             *
+ *       levels are advanced using smaller time increments than         *
+ *       coarser level.  Thus, this object also invokes data            *
+ *       synchronization procedures which couple the solution on        *
+ *       different patch hierarchy levels.                              *
+ *                                                                      *
+ * The time refinement integrator is not specific to the numerical      *
+ * methods used and the problem being solved.   It maintains references *
+ * to two other finer grain algorithmic objects that are more specific  *
+ * to the problem at hand and with which it is configured when they are *
+ * passed into its constructor.   These finer grain algorithm objects   *
+ * are:                                                                 *
+ *                                                                      *
+ *    algs::HyperbolicLevelIntegrator - Defines data management procedures    *
+ *       for level integration, data synchronization between levels,    *
+ *       and tagging cells for refinement.  These operations are        *
+ *       tailored to explicit time integration algorithms used for      *
+ *       hyperbolic systems of conservation laws, such as the Euler     *
+ *       equations.  This integrator manages data for numerical         *
+ *       routines that treat individual patches in the AMR patch        *
+ *       hierarchy.  In this particular application, it maintains a     *
+ *       pointer to the LinAdv object that defines variables and        *
+ *       provides numerical routines for the linear advection problem.  *
+ *                                                                      *
+ *       LinAdv - Defines variables and numerical routines for the      *
+ *          discrete linear advection equation on each patch in the     *
+ *          AMR hierarchy.                                              *
+ *                                                                      *
+ *    mesh::GriddingAlgorithm - Drives the AMR patch hierarchy generation     *
+ *       and regridding procedures.  This object maintains              *
+ *       references to three other algorithmic objects with             *
+ *       which it is configured when they are passed into its           *
+ *       constructor.   They are:                                       *
+ *                                                                      *
+ *       mesh::BergerRigoutsos - Clusters cells tagged for refinement on a    *
+ *          patch level into a collection of logically-rectangular      *
+ *          box domains.                                                *
+ *                                                                      *
+ *       mesh::LoadBalancer - Processes the boxes generated by the            *
+ *          mesh::BergerRigoutsos algorithm into a configuration from         *
+ *          which patches are contructed.  The algorithm used in this   *
+ *          class assumes a spatially-uniform workload distribution;    *
+ *          thus, it attempts to produce a collection of boxes          *
+ *          each of which contains the same number of cells.  The       *
+ *          load balancer also assigns patches to processors.           *
+ *                                                                      *
+ *       mesh::StandardTagAndInitialize - Couples the gridding algorithm      *
+ *          to the HyperbolicIntegrator. Selects cells for              *
+ *          refinement based on either Gradient detection, Richardson   *
+ *          extrapolation, or pre-defined Refine box region.  The       *
+ *          object maintains a pointer to the algs::HyperbolicLevelIntegrator,*
+ *          which is passed into its constructor, for this purpose.     *
+ *                                                                      *
+ ************************************************************************
+ */
+
+/*
+ *******************************************************************
+ *                                                                 *
+ * For each run, the input filename and restart information        *
+ * (if needed) must be given on the command line.                  *
+ *                                                                 *
+ *      For non-restarted case, command line is:                   *
+ *                                                                 *
+ *          executable <input file name>                           *
+ *                                                                 *
+ *      For restarted run, command line is:                        *
+ *                                                                 *
+ *          executable <input file name> <restart directory> \     *
+ *                     <restart number>                            *
+ *                                                                 *
+ *******************************************************************
+ */
+
+void
+setupHierarchy(
+   tbox::Pointer<tbox::Database> main_input_db,
+   const tbox::Dimension& dim,
+   tbox::Pointer<hier::MultiblockGridGeometry>& geometry,
+   tbox::Pointer<hier::MultiblockPatchHierarchy>& mblk_hierarchy);
+
+int main(
+   int argc,
+   char* argv[])
+{
+   /*
+    * Initialize tbox::MPI and SAMRAI, enable logging, and process command line.
+    */
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+
+   /*
+    * Run problem twice to test startup/shutdown process for multi-block problems.
+    */
+   for(int run = 0; run < 2; run++) {
+
+      tbox::SAMRAIManager::startup();
+      const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+      string input_filename;
+      string restart_read_dirname;
+      int restore_num = 0;
+
+      bool is_from_restart = false;
+
+      if ((argc != 2) && (argc != 4)) {
+         tbox::pout << "USAGE:  " << argv[0] << " <input filename> "
+                                             <<
+         "<restart dir> <restore number> [options]\n"
+                                             << "  options:\n"
+                                             << "  none at this time"
+                                             << endl;
+         tbox::SAMRAI_MPI::abort();
+         return -1;
+      } else {
+         input_filename = argv[1];
+         if (argc == 4) {
+            restart_read_dirname = argv[2];
+            restore_num = atoi(argv[3]);
+
+            is_from_restart = true;
+         }
+      }
+
+      tbox::plog << "input_filename = " << input_filename << endl;
+      tbox::plog << "restart_read_dirname = " << restart_read_dirname << endl;
+      tbox::plog << "restore_num = " << restore_num << endl;
+
+      /*
+       * Create input database and parse all data in input file.
+       */
+
+      tbox::Pointer<tbox::Database> input_db(new tbox::InputDatabase("input_db"));
+      tbox::InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      /*
+       * Retrieve "GlobalInputs" section of the input database and set
+       * values accordingly.
+       */
+
+      if (input_db->keyExists("GlobalInputs")) {
+         tbox::Pointer<tbox::Database> global_db =
+            input_db->getDatabase("GlobalInputs");
+//         if (global_db->keyExists("tag_clustering_method")) {
+//            string tag_clustering_method =
+//               global_db->getString("tag_clustering_method");
+//            mesh::BergerRigoutsos::setClusteringOption(tag_clustering_method);
+//         }
+         if (global_db->keyExists("call_abort_in_serial_instead_of_exit")) {
+            bool flag = global_db->
+               getBool("call_abort_in_serial_instead_of_exit");
+            tbox::SAMRAI_MPI::setCallAbortInSerialInsteadOfExit(flag);
+         }
+      }
+
+      /*
+       * Retrieve "Main" section of the input database.  First, read dump
+       * information, which is used for writing vizamrai plot files.  Second,
+       * if proper restart information was given on command line, and the restart
+       * interval is non-zero, create a restart database.
+       */
+
+      tbox::Pointer<tbox::Database> main_db = input_db->getDatabase("Main");
+
+      const tbox::Dimension dim(static_cast<unsigned short>(main_db->getInteger("dim")));
+
+      string log_file_name = "linadv.log";
+      if (main_db->keyExists("log_file_name")) {
+         log_file_name = main_db->getString("log_file_name");
+      }
+      bool log_all_nodes = false;
+      if (main_db->keyExists("log_all_nodes")) {
+         log_all_nodes = main_db->getBool("log_all_nodes");
+      }
+      if (log_all_nodes) {
+         tbox::PIO::logAllNodes(log_file_name);
+      } else {
+         tbox::PIO::logOnlyNodeZero(log_file_name);
+      }
+
+      int viz_dump_interval = 0;
+      if (main_db->keyExists("viz_dump_interval")) {
+         viz_dump_interval = main_db->getInteger("viz_dump_interval");
+      }
+
+      string viz_dump_dirname = "";
+      string visit_dump_dirname = "";
+      int visit_number_procs_per_file = 1;
+      if (viz_dump_interval > 0) {
+         if (main_db->keyExists("viz_dump_dirname")) {
+            viz_dump_dirname = main_db->getString("viz_dump_dirname");
+         }
+         visit_dump_dirname = viz_dump_dirname;
+         if (viz_dump_dirname.empty()) {
+            TBOX_ERROR("main(): "
+               << "\nviz_dump_dirname is null ... "
+               << "\nThis must be specified for use with VisIt"
+               << endl);
+         }
+         if (main_db->keyExists("visit_number_procs_per_file")) {
+            visit_number_procs_per_file =
+               main_db->getInteger("visit_number_procs_per_file");
+         }
+      }
+      const bool viz_dump_data = (viz_dump_interval > 0);
+
+      int restart_interval = 0;
+      if (main_db->keyExists("restart_interval")) {
+         restart_interval = main_db->getInteger("restart_interval");
+      }
+
+      string restart_write_dirname;
+      if (restart_interval > 0) {
+         if (main_db->keyExists("restart_write_dirname")) {
+            restart_write_dirname = main_db->getString("restart_write_dirname");
+         } else {
+            TBOX_ERROR("restart_interval > 0, but key `restart_write_dirname'"
+               << " not specifed in input file");
+         }
+      }
+
+      bool use_refined_timestepping = true;
+      if (main_db->keyExists("timestepping")) {
+         string timestepping_method = main_db->getString("timestepping");
+         if (timestepping_method == "SYNCHRONIZED") {
+            use_refined_timestepping = false;
+         }
+      }
+
+#if (TESTING == 1) && !(HAVE_HDF5)
+      /*
+       * If we are autotesting on a system w/o HDF5, the read from
+       * restart will result in an error.  We want this to happen
+       * for users, so they know there is a problem with the restart,
+       * but we don't want it to happen when autotesting.
+       */
+      is_from_restart = false;
+      restart_interval = 0;
+#endif
+
+      const bool write_restart = (restart_interval > 0)
+         && !(restart_write_dirname.empty());
+
+      /*
+       * Get the restart manager and root restart database.  If run is from
+       * restart, open the restart file.
+       */
+
+      tbox::RestartManager* restart_manager = tbox::RestartManager::getManager();
+
+      if (is_from_restart) {
+         restart_manager->
+         openRestartFile(restart_read_dirname, restore_num,
+            mpi.getSize());
+      }
+
+      /*
+       * Setup the timer manager to trace timing statistics during execution
+       * of the code.  The list of timers is given in the tbox::TimerManager
+       * section of the input file.  Timing information is stored in the
+       * restart file.  Timers will automatically be initialized to their
+       * previous state if the run is restarted, unless they are explicitly
+       * reset using the tbox::TimerManager::resetAllTimers() routine.
+       */
+
+      tbox::TimerManager::createManager(input_db->getDatabase("TimerManager"));
+
+      /*
+       * Create major algorithm and data objects which comprise application.
+       * Each object will be initialized either from input data or restart
+       * files, or a combination of both.  Refer to each class constructor
+       * for details.  For more information on the composition of objects
+       * for this application, see comments at top of file.
+       */
+
+      /*
+       * CREATE THE MULTIBLOCK HIERARCHY
+       */
+      tbox::Pointer<hier::MultiblockPatchHierarchy> mblk_patch_hierarchy;
+      tbox::Pointer<hier::MultiblockGridGeometry> geom;
+
+      setupHierarchy(input_db,
+         dim,
+         geom,
+         mblk_patch_hierarchy);
+
+      MblkLinAdv* linear_advection_model = new MblkLinAdv("MblkLinAdv",
+            dim,
+            input_db,
+            geom->getBlockGeometryArray());
+
+      tbox::Pointer<MblkHyperbolicLevelIntegrator> mblk_hyp_level_integrator(
+         new MblkHyperbolicLevelIntegrator(
+            "HyperbolicLevelIntegrator",
+            dim,
+            input_db->getDatabase("HyperbolicLevelIntegrator"),
+            linear_advection_model,
+            mblk_patch_hierarchy,
+            true,
+            use_refined_timestepping));
+
+      tbox::Pointer<mesh::StandardTagAndInitialize> error_detector(
+         new mesh::StandardTagAndInitialize(dim,
+            "StandardTagAndInitialize",
+            mblk_hyp_level_integrator,
+            input_db->getDatabase("StandardTagAndInitialize")));
+
+      tbox::Pointer<mesh::BergerRigoutsos> box_generator(
+         new mesh::BergerRigoutsos(dim));
+
+      tbox::Pointer<mesh::TreeLoadBalancer> load_balancer(
+         new mesh::TreeLoadBalancer(dim,
+            "TreeLoadBalancer",
+            input_db->getDatabase("TreeLoadBalancer")));
+      load_balancer->setSAMRAI_MPI(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+      tbox::Pointer<mesh::MultiblockGriddingAlgorithm>
+      mblk_gridding_algorithm(
+         new mesh::MultiblockGriddingAlgorithm(
+            mblk_patch_hierarchy,
+            "MultiblockGriddingAlgorithm",
+            input_db->getDatabase("GriddingAlgorithm"),
+            error_detector,
+            box_generator,
+            load_balancer,
+            load_balancer));
+
+      tbox::Pointer<algs::TimeRefinementIntegrator> time_integrator(
+         new algs::TimeRefinementIntegrator("TimeRefinementIntegrator",
+            input_db->getDatabase(
+               "TimeRefinementIntegrator"),
+            mblk_patch_hierarchy,
+            mblk_hyp_level_integrator,
+            mblk_gridding_algorithm));
+
+      /*
+       * Set up Visualization plot file writer(s).
+       */
+      // VisitDataWriter is only present if HDF is available
+#ifdef HAVE_HDF5
+      bool is_multiblock = true;
+      tbox::Pointer<appu::VisItDataWriter> visit_data_writer(
+         new appu::VisItDataWriter(dim,
+            "MblkLinAdv VisIt Writer",
+            visit_dump_dirname,
+            visit_number_procs_per_file,
+            is_multiblock));
+      linear_advection_model->
+      registerVisItDataWriter(visit_data_writer);
+#endif
+
+      /*
+       * Initialize hierarchy configuration and data on all patches.
+       * Then, close restart file and write initial state for visualization.
+       */
+
+      double dt_now = time_integrator->initializeHierarchy();
+
+      tbox::RestartManager::getManager()->closeRestartFile();
+
+#if (TESTING == 1)
+      /*
+       * Create the autotesting object which will verify correctness
+       * of the problem. If no automated testing is done, the object does
+       * not get used.
+       */
+      AutoTester autotester("AutoTester", input_db);
+#endif
+
+      /*
+       * After creating all objects and initializing their state, we
+       * print the input database and variable database contents
+       * to the log file.
+       */
+
+      tbox::plog << "\nCheck input data and variables before simulation:"
+                 << endl;
+      tbox::plog << "Input database..." << endl;
+      input_db->printClassData(tbox::plog);
+      tbox::plog << "\nVariable database..." << endl;
+      hier::VariableDatabase::getDatabase()->printClassData(tbox::plog);
+
+      tbox::plog << "\nCheck Linear Advection data... " << endl;
+      linear_advection_model->printClassData(tbox::plog);
+
+      if (viz_dump_data) {
+#ifdef HAVE_HDF5
+         visit_data_writer->writePlotData(
+            mblk_patch_hierarchy,
+            time_integrator->getIntegratorStep(),
+            time_integrator->getIntegratorTime());
+#endif
+      }
+
+      /*
+       * Time step loop.  Note that the step count and integration
+       * time are maintained by algs::TimeRefinementIntegrator.
+       */
+
+      double loop_time = time_integrator->getIntegratorTime();
+      double loop_time_end = time_integrator->getEndTime();
+
+      int iteration_num = time_integrator->getIntegratorStep();
+
+#if (TESTING == 1)
+      /*
+       * If we are doing autotests, check result...
+       */
+      autotester.evalTestData(iteration_num,
+         patch_hierarchy,
+         time_integrator,
+         hyp_level_integrator,
+         gridding_algorithm);
+#endif
+
+      while ((loop_time < loop_time_end) &&
+             time_integrator->stepsRemaining()) {
+
+         iteration_num = time_integrator->getIntegratorStep() + 1;
+
+         tbox::pout << "++++++++++++++++++++++++++++++++++++++++++++" << endl;
+         tbox::pout << "At begining of timestep # " << iteration_num - 1
+                    << endl;
+         tbox::pout << "Simulation time is " << loop_time << endl;
+
+         double dt_new = time_integrator->advanceHierarchy(dt_now);
+
+         loop_time += dt_now;
+         dt_now = dt_new;
+
+         tbox::pout << "At end of timestep # " << iteration_num - 1 << endl;
+         tbox::pout << "Simulation time is " << loop_time << endl;
+         tbox::pout << "++++++++++++++++++++++++++++++++++++++++++++" << endl;
+
+         /*
+          * At specified intervals, write restart and visualization files.
+          */
+         if (write_restart) {
+
+            if ((iteration_num % restart_interval) == 0) {
+               tbox::RestartManager::getManager()->
+               writeRestartFile(restart_write_dirname,
+                  iteration_num);
+            }
+         }
+
+         /*
+          * At specified intervals, write out data files for plotting.
+          */
+
+         if (viz_dump_data) {
+            if ((iteration_num % viz_dump_interval) == 0) {
+#ifdef HAVE_HDF5
+               visit_data_writer->writePlotData(mblk_patch_hierarchy,
+                  iteration_num,
+                  loop_time);
+#endif
+            }
+         }
+
+#if (TESTING == 1)
+            /*
+             * If we are doing autotests, check result...
+             */
+            autotester.evalTestData(iteration_num,
+               patch_hierarchy,
+               time_integrator,
+               hyp_level_integrator,
+               gridding_algorithm);
+#endif
+
+         }
+
+         /*
+          * Output timer results.
+          */
+#if (TESTING != 1)
+         tbox::TimerManager::getManager()->print(tbox::plog);
+#endif
+
+         /*
+          * At conclusion of simulation, deallocate objects.
+          */
+
+#ifdef HAVE_HDF5
+         visit_data_writer.setNull();
+#endif
+
+         time_integrator.setNull();
+         mblk_gridding_algorithm.setNull();
+         load_balancer.setNull();
+         box_generator.setNull();
+         error_detector.setNull();
+         mblk_hyp_level_integrator.setNull();
+
+         if (linear_advection_model) {
+	    delete linear_advection_model;
+	 }
+
+         mblk_patch_hierarchy.setNull();
+         geom.setNull();
+
+         input_db.setNull();
+         main_db.setNull();
+
+
+
+	 tbox::SAMRAIManager::shutdown();
+      }
+
+      tbox::SAMRAIManager::finalize();
+      tbox::SAMRAI_MPI::finalize();
+
+      tbox::pout << "\nPASSED:  MblkLinAdv" << endl;
+
+      return 0;
+   }
+
+   void setupHierarchy(
+      tbox::Pointer<tbox::Database> main_input_db,
+      const tbox::Dimension& dim,
+      tbox::Pointer<hier::MultiblockGridGeometry>& geometry,
+      tbox::Pointer<hier::MultiblockPatchHierarchy>& mblk_hierarchy)
+   {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!main_input_db.isNull());
+#endif
+
+      tbox::Pointer<tbox::Database> mult_db =
+         main_input_db->getDatabase("MultiblockPatchHierarchy");
+
+      int num_blocks = mult_db->getInteger("num_blocks");
+
+      tbox::Array<tbox::Pointer<hier::GridGeometry> > geoms(num_blocks);
+      /*
+       * Read the geometry information and build array of geometries
+       */
+      geoms.resizeArray(num_blocks);
+
+      char geom_name[32];
+
+      for (int nb = 0; nb < num_blocks; nb++) {
+
+         sprintf(geom_name, "BlockGeometry%d", nb);
+         if (mult_db->keyExists(geom_name)) {
+            geoms[nb] =
+               new geom::BlockGridGeometry(
+                  dim,
+                  geom_name,
+                  mult_db->getDatabase(geom_name),
+                  nb);
+         } else {
+            TBOX_ERROR("main::setupHierarchy(): could not find entry `"
+               << geom_name << "' in input.");
+         }
+      }
+
+      geometry = new hier::MultiblockGridGeometry(geoms);
+
+      mblk_hierarchy =
+         new hier::MultiblockPatchHierarchy("MultiblockPatchHierarchy",
+            mult_db, geometry, true);
+
+   }
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/test_inputs/octant_3blk.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/test_inputs/octant_3blk.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,273 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI LinAdv example problem 
+ *
+ ************************************************************************/
+MblkGeometry {
+   problem_type = "SPHERICAL_SHELL"
+
+   ShellGeometry {
+      rmin = 1.e0 
+      rmax = 2.e0 
+
+      shell_type = "OCTANT"
+   }
+
+
+   // The refinement boxes are specified here because the MultiblockGriddingAlg does not have any
+   // way to take in refinement boxes for multiple blocks.  The format is "refine_boxes[block][lev]".
+   // level 0
+   refine_boxes_0_0 = [(5,0,0),(5,9,9)]
+   refine_boxes_1_0 = [(5,0,0),(5,9,9)]
+   refine_boxes_2_0 = [(5,0,0),(5,9,9)]
+   // level 1
+   refine_boxes_0_1 = [(20,0,0),(20,39,39)]
+   refine_boxes_1_1 = [(20,0,0),(20,39,39)]
+   refine_boxes_2_1 = [(20,0,0),(20,39,39)]
+}
+
+
+MblkLinAdv {
+
+   advection_velocity = 0.0e0 , 2.0e0 , 0.0e0
+   godunov_order    = 2                // order of Goduov slopes (1, 2, or 4)
+   corner_transport = "CORNER_TRANSPORT_1"  
+
+   data_problem      = "SPHERE" 
+
+   Initial_data {
+      radius            = 0.2   
+      center            = 0.75 , 1.0 , 0.75
+
+      uval_inside       = 80.0
+      uval_outside      = 5.0
+ 
+   }
+
+   Refinement_data {
+      refine_criteria = "USER_DEFINED"
+   }
+
+   // valid boundary_condition values are "REFLECT", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "REFLECT"
+      }
+
+
+      boundary_edge_ylo_zlo { // XREFLECT, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zlo { // XREFLECT, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_ylo_zhi { // XREFLECT, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zhi { // XREFLECT, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_xlo_zlo { // YREFLECT, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_zhi { // YREFLECT, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zlo { // YREFLECT, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zhi { // YREFLECT, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_ylo { // ZREFLECT, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_ylo { // ZREFLECT, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xlo_yhi { // ZREFLECT, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_yhi { // ZREFLECT, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+
+   }
+
+}
+
+Main {
+   dim = 3
+// log file parameters 
+   log_file_name    = "octant.log"
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_octant-3blk"
+   viz_dump_filename     = "octant"    // not used by VisIt
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+
+// restart dump parameters
+   restart_interval       = 0         // zero to turn off
+   restart_write_dirname  = "restart_octant"
+
+}
+
+TimerManager {
+   timer_list               = "apps::*::*",
+                              "algs::*::*",
+                              "mesh::*::*"
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+//   print_timer_overhead   = TRUE
+   print_threshold        = 0.0
+}
+
+
+MultiblockPatchHierarchy {
+   num_blocks = 3
+
+   // Geometries of the hierachy blocks
+   BlockGeometry0{
+      domain_boxes	= [ (0,0,0) , (19,19,19) ]
+   }
+   BlockGeometry1{
+      domain_boxes	= [ (0,0,0) , (19,19,19) ]
+   }
+   BlockGeometry2{
+      domain_boxes	= [ (0,0,0) , (19,19,19) ]
+   }
+
+   // Singularity defn and neighbors
+   Singularity0 {
+      blocks = 0 , 1 , 2
+      sing_box_0 = [(0,20,20),(19,20,20)]
+      sing_box_1 = [(0,20,20),(19,20,20)]
+      sing_box_2 = [(0,-1,20),(19,-1,20)]
+   }
+
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "I_UP", "K_UP", "J_DOWN" 
+      point_in_a_space = 0, 0, 20
+      point_in_b_space = 0, 19, 0
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      rotation_b_to_a = "I_UP", "J_UP" , "K_UP"
+      point_in_a_space = 0, 20, 0
+      point_in_b_space = 0, 0, 0
+   }
+
+   BlockNeighbors2 {
+      block_a = 2
+      block_b = 1
+
+      rotation_b_to_a = "I_UP", "J_DOWN" , "K_DOWN"
+      point_in_a_space = 0, 0, 20
+      point_in_b_space = 0, 19 , 19
+   }
+
+   PatchHierarchy {
+      allow_patches_smaller_than_ghostwidth = TRUE
+      max_levels = 1         // Maximum number of levels in hierarchy.
+      ratio_to_coarser {      // vector ratio to next coarser level
+         level_1 = 2 , 2 , 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2 , 2 , 2
+         // all finer levels will use same values as level_0...
+      }
+   }
+
+}
+
+
+
+
+GriddingAlgorithm{
+   sequentialize_patch_indices = TRUE
+
+   efficiency_tolerance    = 0.85e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.95e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.5e0    // max cfl factor used in problem
+   cfl_init                  = 0.5e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+TimeRefinementIntegrator{
+   tag_buffer           = 2, 2, 2 // number of zones used in the tag buffer
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 50    // max number of simulation timesteps
+}
+
+TreeLoadBalancer {
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/MblkLinAdv/test_inputs/wedge_1blk.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/MblkLinAdv/test_inputs/wedge_1blk.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,242 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI LinAdv example problem 
+ *
+ ************************************************************************/
+
+MblkGeometry {
+   problem_type = "WEDGE"
+
+   WedgeGeometry {
+      rmin_0 = 1.e0 
+      rmax_0 = 2.e0 
+
+      pi     = 3.14159265358979325873406851315
+      thmin  = -30 * pi/180 // should be in radians
+      thmax  = 30 * pi/180
+
+      zmin   = 0.
+      zmax   = 2.
+
+   }
+}
+
+
+MblkLinAdv {
+
+   advection_velocity = 2.0e0 , 0.1e0 , 0.1e0
+   godunov_order    = 2                // order of Goduov slopes (1, 2, or 4)
+   corner_transport = "CORNER_TRANSPORT_1"  
+
+   data_problem      = "SPHERE" 
+
+   Initial_data {
+      radius            = 0.75 
+      center            = 1.25 , -0.5 , 1.0
+
+      uval_inside       = 80.0
+      uval_outside      = 5.0
+ 
+   }
+
+   Refinement_data {
+      refine_criteria = "UVAL_GRADIENT", "UVAL_SHOCK"
+ 
+      UVAL_GRADIENT {
+         grad_tol = 10.0
+      }
+ 
+      UVAL_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "FLOW"
+      }
+
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+
+   }
+
+}
+
+Main {
+   dim = 3
+// log file parameters 
+   log_file_name    = "wedge.log"
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_wedge"
+   viz_dump_filename     = "wedge"    // not used by VisIt
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+
+// restart dump parameters
+   restart_interval       = 0         // zero to turn off
+   restart_write_dirname  = "restart_wedge"
+
+}
+
+TimerManager {
+   timer_list               = "apps::*::*",
+                              "algs::*::*",
+                              "mesh::*::*"
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+//   print_timer_overhead   = TRUE
+   print_threshold        = 0.0
+}
+
+
+MultiblockPatchHierarchy {
+   num_blocks = 1
+
+   // Geometries of the hierachy blocks
+   BlockGeometry0{
+      domain_boxes	= [ (0,0,0) , (29,19,19) ]
+   }
+
+   // Singularity defn and neighbors
+   Singularity0 {
+      blocks = 0
+      sing_box_0 = [(30,20,20),(30,20,20)]
+   }
+
+   PatchHierarchy {
+      max_levels = 1         // Maximum number of levels in hierarchy.
+      ratio_to_coarser {      // vector ratio to next coarser level
+         level_1 = 2 , 2 , 2
+         level_2 = 2 , 2 , 2
+         level_3 = 2 , 2 , 2
+      }
+      largest_patch_size {
+         level_0 = 40 , 40 , 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 9 , 9 , 9
+         // all finer levels will use same values as level_0...
+      }
+   }
+
+}
+
+
+
+
+GriddingAlgorithm{
+   sequentialize_patch_indices = TRUE
+
+   efficiency_tolerance    = 0.85e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.95e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.9e0    // max cfl factor used in problem
+   cfl_init                  = 0.9e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+TimeRefinementIntegrator{
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 25     // max number of simulation timesteps
+}
+
+TreeLoadBalancer {
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,131 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   README SAMRAI test package.
+##
+#########################################################################
+
+The SAMRAI/source/test directory contains test codes that
+verify correctness of various components in the library.  
+All tests included here are run through our autotest suite
+to assure accurate results.
+
+The following summarizes the tests carried out in the 
+different sub-directories:
+
+applications:   
+   Compile cases in the /source/applications directory
+   with the local "AutoTester" class included.  The AutoTester
+   class checks the state of various objects used in the 
+   application at the end of the run and compares them to 
+   the expected "correct" result entered in the input file.
+
+   The Euler case carries out one additional test on the
+   correctness of the Riemann problem.  Data files specify 
+   the correct fluxes after a certain number of steps (to
+   10 digits accuracy).  The solution can be verified by
+   doing a "diff" on the output data file with these
+   correct result files.
+
+async_comm:
+
+boundary:
+   A set of tests to check the correctness of the routines to set various 
+   physical boundary conditions supplied by the CartesianBoundaryUtilities
+   classes in the Application Utilities package.
+
+   All test source code is contained in the SAMRAI/examples/boundary directory.
+
+clustering:
+
+communication:
+   Performs a set of tests that invoke data transfer operations
+   between patches using cell, face, node, and side datatypes.
+   In addition to communication, this test verifies the accuracy
+   of the interpolation (i.e. coarsen and refine) operations 
+   carried out on these various datatypes.  The grid hierarchy 
+   configuration and number of processors may be set through the 
+   input file.  
+
+dataaccess:
+
+dataops:
+   Tests various data operations with cell, face, node, side,
+   and edge datatypes across the hierarchy and for complex
+   operations.  The operations set data on patches and 
+   test operations like linear_sum(), dot_product(), 
+   axmy(), etc. on the hierarchy.  The grid hierarchy is
+   fixed so it must be run on 1 or 2 processors.
+   of processors.
+
+dlbg:
+
+emb_bdry:
+
+FAC:
+
+HDF5:
+   A set of tests to check the correctness of the routines to read from and 
+   write to an HDF5 file in the tbox::HDFDatabase class (used for writing and
+   reading SAMRAI restart files).
+
+   All test source code is contained in the SAMRAI/source/test/HDF5 directory.
+
+hierarchy:
+   A set of tests to check the correctness of the PatchHierarchy operations
+   to make coarsened and refined versions of a given AMR patch hierarchy.
+
+   All test source code is contained in the SAMRAI/source/test/hierarchy directory.
+
+hypre:
+
+ieee:
+
+inputdb:
+   A set of tests to check the correctness of the routines to read data
+   from SAMRAI inut files defined in the tbox:InputDatabase class.
+
+   All test source code is contained in the SAMRAI/source/test/inputdb directory.
+
+locally_active:
+   A set of tests to check coarsening and refinement communication operations for
+   locally-active data defined on a SAMRAI patch hierarchy.
+
+   All test source code is contained in the SAMRAI/source/test/locally_active directory.
+
+mblkcomm:
+
+nonlinear:
+
+patchbdrysum:
+   A set of tests to check operations for summing node and edge data across shared points
+   on the boundaries of patches in a SAMRAI patch hierarchy. 
+
+   All test source code is contained in the SAMRAI/examples/patchbdrysum directory.
+
+pointer:
+   A set of tests to basic operation of SAMRAI smart pointers.
+
+   All test source code is contained in the SAMRAI/source/test/pointer directory.
+
+sundials:
+
+schedules:
+
+timers:
+   Tests use of timers, verifying nested structure, input,
+   parallel usage, and restart capability.
+
+variables:
+   A set of tests to check operations provided by the SAMRAI VariableDatabase class.
+
+   All test source code is contained in the SAMRAI/source/test/variables directory.
+
+vector:
+   Tests the SAMRAI vector classes. In particular, the SAMRAI-PETSc
+   and SAMRAI-Kinsol vector interfaces.  Tests use a specific
+   grid hierarchy layout and can only be tested on 1 or 2 processors.
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/AutoTester.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/AutoTester.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,598 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+ *                Description:   Class used for auto testing applications 
+ *
+ ************************************************************************/
+
+#include "AutoTester.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/List.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+AutoTester::AutoTester(
+   const std::string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> input_db):
+   d_dim(dim)
+#ifdef HAVE_HDF5
+   , d_hdf_db("AutoTesterDatabase")
+#endif
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   d_object_name = object_name;
+   d_test_fluxes = false;
+   d_test_iter_num = 10;
+   d_output_correct = false;
+
+   d_write_patch_boxes = false;
+   d_read_patch_boxes = false;
+   d_test_patch_boxes_at_steps.resizeArray(0);
+   d_test_patch_boxes_step_count = 0;
+
+   getFromInput(input_db);
+
+   const std::string hdf_filename =
+      d_test_patch_boxes_filename
+      + "." + tbox::Utilities::nodeToString(mpi.getSize())
+      + "." + tbox::Utilities::processorToString(mpi.getRank());
+
+#ifdef HAVE_HDF5
+   if (d_read_patch_boxes) {
+      d_hdf_db.open(hdf_filename);
+      if (d_output_correct) {
+         d_hdf_db.printClassData(tbox::pout);
+      }
+
+   }
+
+   if (d_write_patch_boxes) {
+      d_hdf_db.create(hdf_filename);
+   }
+#endif
+
+}
+
+AutoTester::~AutoTester()
+{
+}
+
+/*
+ ******************************************************************
+ *                                                                *
+ *  Method "evalTestData" compares the result of the run with     *
+ *  the correct result for runs with the TimeRefinementIntegrator *
+ *  and HyperbolicLevelIntegrator.                                *
+ *                                                                *
+ ******************************************************************
+ */
+int AutoTester::evalTestData(
+   int iter,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const tbox::Pointer<algs::TimeRefinementIntegrator> tri,
+   const tbox::Pointer<algs::HyperbolicLevelIntegrator> hli,
+   const tbox::Pointer<mesh::GriddingAlgorithm> ga)
+{
+   NULL_USE(ga);
+
+   int num_failures = 0;
+
+   /*
+    * Compare "correct_result" array to the computed result on specified
+    * iteration.
+    */
+   if (iter == d_test_iter_num && !d_test_fluxes) {
+
+      /*
+       * set precision of output stream.
+       */
+      tbox::plog.precision(12);
+
+      /*
+       * determine level.
+       */
+      int nlevels = hierarchy->getNumberOfLevels() - 1;
+      tbox::Pointer<hier::PatchLevel> level =
+         hierarchy->getPatchLevel(nlevels);
+
+      /*
+       * Test 0: Time Refinement Integrator
+       */
+      double time = tri->getIntegratorTime();
+      if (d_correct_result.getSize() > 0) {
+         if (d_output_correct) {
+            tbox::plog << "Test 0: Time Refinement Integrator "
+                       << "\n   computed result: " << time;
+
+            tbox::plog << "\n   specified result = "
+            << d_correct_result[0];
+         }
+         tbox::plog << std::endl;
+
+         if (tbox::MathUtilities<double>::equalEps(time,
+                d_correct_result[0])) {
+            tbox::plog << "Test 0: Time Refinement check successful"
+                       << std::endl;
+         } else {
+            tbox::perr << "Test 0 FAILED: Check Time Refinement Integrator"
+                       << std::endl;
+            num_failures++;
+         }
+      }
+
+      /*
+       * Test 1: Time Refinement Integrator
+       */
+      double dt = tri->getLevelDtMax(nlevels);
+      if (d_correct_result.getSize() > 1) {
+         if (d_output_correct) {
+            tbox::plog << "Test 1: Time Refinement Integrator "
+                       << "\n   computed result: " << dt;
+            tbox::plog << "\n   specified result = "
+            << d_correct_result[1];
+         }
+         tbox::plog << std::endl;
+
+         if (tbox::MathUtilities<double>::equalEps(dt, d_correct_result[1])) {
+            tbox::plog << "Test 1: Time Refinement check successful"
+                       << std::endl;
+         } else {
+            tbox::perr << "Test 1 FAILED: Check Time Refinement Integrator"
+                       << std::endl;
+            num_failures++;
+         }
+      }
+
+      /*
+       * Test 2: Hyperbolic Level Integrator
+       */
+      dt = hli->getLevelDt(level, time, false);
+      if (d_correct_result.getSize() > 2) {
+         if (d_output_correct) {
+            tbox::plog << "Test 2: Hyperbolic Level Integrator "
+                       << "\n   computed result: " << dt;
+
+            tbox::plog << "\n   specified result = "
+            << d_correct_result[2];
+         }
+         tbox::plog << std::endl;
+
+         if (tbox::MathUtilities<double>::equalEps(dt, d_correct_result[2])) {
+            tbox::plog << "Test 2: Hyperbolic Level Int check successful"
+                       << std::endl;
+         } else {
+            tbox::perr << "Test 2 FAILED: Check Hyperbolic Level Integrator"
+                       << std::endl;
+            num_failures++;
+         }
+      }
+
+      /*
+       * Test 3: Gridding Algorithm
+       */
+      int n = hierarchy->getMaxNumberOfLevels();
+      if (d_output_correct) {
+         tbox::plog << "Test 3: Gridding Algorithm "
+                    << "\n   computed result: " << n;
+         tbox::plog << "\n   correct result = " << nlevels + 1;
+         tbox::plog << std::endl;
+      }
+      if (n == (nlevels + 1)) {
+         tbox::plog << "Test 3: Gridding Algorithm check successful"
+                    << std::endl;
+      } else {
+         tbox::perr << "Test 3 FAILED: Check Gridding Algorithm" << std::endl;
+         num_failures++;
+      }
+
+   }
+
+   if ((d_test_patch_boxes_at_steps.getSize() >
+        d_test_patch_boxes_step_count) &&
+       (d_test_patch_boxes_at_steps[d_test_patch_boxes_step_count] == iter)) {
+
+      int num_levels = hierarchy->getNumberOfLevels();
+
+#ifdef HAVE_HDF5
+      if (d_read_patch_boxes) {
+
+         if (d_output_correct) {
+            d_hdf_db.printClassData(tbox::pout);
+         }
+
+         const std::string step_name =
+            std::string("step_number_") + tbox::Utilities::intToString(
+               d_test_patch_boxes_step_count,
+               2);
+         std::cout << std::endl;
+         tbox::Pointer<tbox::Database> step_db =
+            d_hdf_db.getDatabase(step_name);
+
+         /*
+          * FIXME: This check give false positives!!!!!
+          * It writes the same file regardless of the number of processors.
+          * We should be checking against base runs with the same number of processors,
+          * compare different data.
+          */
+         for (int ln = 0; ln < num_levels; ln++) {
+
+            const std::string level_name =
+               std::string("level_number_") + tbox::Utilities::levelToString(ln);
+            tbox::Pointer<tbox::Database> level_db =
+               step_db->getDatabase(level_name);
+            hier::MappedBoxLevel correct_mapped_box_level(d_dim);
+            correct_mapped_box_level.getFromDatabase(*level_db);
+
+            num_failures += checkHierarchyBoxes(hierarchy,
+                  ln,
+                  correct_mapped_box_level,
+                  iter);
+         }
+
+      }
+
+      if (d_write_patch_boxes) {
+
+         const std::string step_name =
+            std::string("step_number_") + tbox::Utilities::intToString(
+               d_test_patch_boxes_step_count,
+               2);
+         std::cout << std::endl;
+         tbox::Pointer<tbox::Database> step_db =
+            d_hdf_db.putDatabase(step_name);
+
+         for (int ln = 0; ln < num_levels; ln++) {
+            tbox::Pointer<hier::PatchLevel> level =
+               hierarchy->getPatchLevel(ln);
+
+            const std::string level_name =
+               std::string("level_number_") + tbox::Utilities::levelToString(ln);
+            tbox::Pointer<tbox::Database> level_db =
+               step_db->putDatabase(level_name);
+            level->getMappedBoxLevel()->putToDatabase(*level_db);
+         }
+
+         if (d_output_correct) {
+            d_hdf_db.printClassData(tbox::pout);
+         }
+      }
+#endif
+
+      d_test_patch_boxes_step_count++;
+
+   }
+
+   return num_failures;
+}
+
+/*
+ ******************************************************************
+ *                                                                *
+ *  Method "evalTestData" compares the result of the run with     *
+ *  the correct result for runs with the MethodOfLinesIntegrator. *
+ *                                                                *
+ ******************************************************************
+ */
+int AutoTester::evalTestData(
+   int iter,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   double time,
+   const tbox::Pointer<algs::MethodOfLinesIntegrator> mol,
+   const tbox::Pointer<mesh::GriddingAlgorithm> ga)
+{
+   NULL_USE(ga);
+
+   int num_failures = 0;
+
+   /*
+    * Compare "correct_result" array to the computed result on specified
+    * iteration.
+    */
+   if (iter == d_test_iter_num && !d_test_fluxes) {
+
+      /*
+       * set precision of output stream.
+       */
+      tbox::plog.precision(12);
+
+      /*
+       * determine level.
+       */
+      int nlevels = hierarchy->getNumberOfLevels() - 1;
+      tbox::Pointer<hier::PatchLevel> level =
+         hierarchy->getPatchLevel(nlevels);
+
+      /*
+       * Test 0: Time test
+       */
+      if (d_output_correct) {
+         tbox::plog << "Test 0: Simulation Time: "
+                    << "\n   computed result: " << time;
+         if (d_correct_result.getSize() > 0) {
+            tbox::plog << "\n   specified result = "
+            << d_correct_result[0];
+         }
+         tbox::plog << std::endl;
+      }
+      if (tbox::MathUtilities<double>::equalEps(time, d_correct_result[0])) {
+         tbox::plog << "Test 0: Simulation Time check successful" << std::endl;
+      } else {
+         tbox::perr << "Test 0 FAILED: Simulation time incorrect" << std::endl;
+         num_failures++;
+      }
+
+      /*
+       * Test 1: MethodOfLinesIntegrator
+       */
+      double dt = mol->getTimestep(hierarchy, time);
+      if (d_output_correct) {
+         tbox::plog << "Test 1: Method of Lines Integrator "
+                    << "\n   computed result: " << dt;
+         if (d_correct_result.getSize() > 1) {
+            tbox::plog << "\n   specified result = "
+            << d_correct_result[1];
+         }
+         tbox::plog << std::endl;
+      }
+      if (tbox::MathUtilities<double>::equalEps(dt, d_correct_result[1])) {
+         tbox::plog << "Test 1: MOL Int check successful" << std::endl;
+      } else {
+         tbox::perr << "Test 1 FAILED: Check Method of Lines Integrator"
+                    << std::endl;
+         num_failures++;
+      }
+
+      /*
+       * Test 2: Gridding Algorithm
+       */
+      int n = hierarchy->getMaxNumberOfLevels();
+      if (d_output_correct) {
+         tbox::plog << "Test 2: Gridding Algorithm "
+                    << "\n   computed result: " << n;
+         tbox::plog << "\n   correct result = " << nlevels + 1;
+         tbox::plog << std::endl;
+      }
+      if (n == (nlevels + 1)) {
+         tbox::plog << "Test 2: Gridding Alg check successful" << std::endl;
+      } else {
+         tbox::perr << "Test 2 FAILED: Check Gridding Algorithm" << std::endl;
+         num_failures++;
+      }
+
+   }
+
+   if ((d_test_patch_boxes_at_steps.getSize() > 0) &&
+       (d_test_patch_boxes_at_steps[d_test_patch_boxes_step_count] == iter)) {
+
+      int num_levels = hierarchy->getNumberOfLevels();
+
+#ifdef HAVE_HDF5
+      if (d_read_patch_boxes) {
+
+         if (d_output_correct) {
+            d_hdf_db.printClassData(tbox::pout);
+         }
+
+         const std::string step_name =
+            std::string("step_number_") + tbox::Utilities::intToString(
+               d_test_patch_boxes_step_count,
+               2);
+         std::cout << std::endl;
+         tbox::Pointer<tbox::Database> step_db =
+            d_hdf_db.getDatabase(step_name);
+
+         for (int ln = 0; ln < num_levels; ln++) {
+
+            const std::string level_name =
+               std::string("level_number_") + tbox::Utilities::levelToString(ln);
+            tbox::Pointer<tbox::Database> level_db =
+               step_db->getDatabase(level_name);
+            hier::MappedBoxLevel correct_mapped_box_level(d_dim);
+            correct_mapped_box_level.getFromDatabase(*level_db);
+
+            num_failures += checkHierarchyBoxes(hierarchy,
+                  ln,
+                  correct_mapped_box_level,
+                  iter);
+         }
+
+      }
+
+      if (d_write_patch_boxes) {
+
+         if (d_output_correct) {
+            d_hdf_db.printClassData(tbox::pout);
+         }
+
+         const std::string step_name =
+            std::string("step_number_") + tbox::Utilities::intToString(
+               d_test_patch_boxes_step_count,
+               2);
+         std::cout << std::endl;
+         tbox::Pointer<tbox::Database> step_db =
+            d_hdf_db.putDatabase(step_name);
+
+         for (int ln = 0; ln < num_levels; ln++) {
+            tbox::Pointer<hier::PatchLevel> level =
+               hierarchy->getPatchLevel(ln);
+
+            const std::string level_name =
+               std::string("level_number_") + tbox::Utilities::levelToString(ln);
+            tbox::Pointer<tbox::Database> level_db =
+               step_db->putDatabase(level_name);
+            level->getMappedBoxLevel()->putToDatabase(*level_db);
+         }
+
+      }
+#endif
+
+      d_test_patch_boxes_step_count++;
+
+   }
+
+   return num_failures;
+}
+
+/*
+ ******************************************************************
+ *                                                                *
+ *  Get test parameters from input.                               *
+ *                                                                *
+ ******************************************************************
+ */
+
+void AutoTester::getFromInput(
+   tbox::Pointer<tbox::Database> input_db)
+{
+   tbox::Pointer<tbox::Database> tester_db =
+      input_db->getDatabase(d_object_name);
+
+   /*
+    * Read testing parameters from testing_db
+    */
+   if (tester_db->keyExists("test_fluxes")) {
+      d_test_fluxes = tester_db->getBool("test_fluxes");
+   }
+
+   if (tester_db->keyExists("test_iter_num")) {
+      d_test_iter_num = tester_db->getInteger("test_iter_num");
+   }
+
+   if (tester_db->keyExists("write_patch_boxes")) {
+      d_write_patch_boxes = tester_db->getBool("write_patch_boxes");
+   }
+   if (tester_db->keyExists("read_patch_boxes")) {
+      d_read_patch_boxes = tester_db->getBool("read_patch_boxes");
+   }
+   if (d_read_patch_boxes && d_write_patch_boxes) {
+      tbox::perr << "FAILED: - AutoTester " << d_object_name << "\n"
+                 << "Cannot 'read_patch_boxes' and 'write_patch_boxes' \n"
+                 << "at the same time." << std::endl;
+   }
+   if (d_read_patch_boxes || d_write_patch_boxes) {
+      if (!tester_db->keyExists("test_patch_boxes_at_steps")) {
+         tbox::perr << "FAILED: - AutoTester " << d_object_name << "\n"
+                    << "Must provide 'test_patch_boxes_at_steps' data."
+                    << std::endl;
+      } else {
+         d_test_patch_boxes_at_steps =
+            tester_db->getIntegerArray("test_patch_boxes_at_steps");
+      }
+      if (!tester_db->keyExists("test_patch_boxes_filename")) {
+         tbox::perr << "FAILED: - AutoTester " << d_object_name << "\n"
+                    << "Must provide 'test_patch_boxes_filename' data."
+                    << std::endl;
+      } else {
+         d_test_patch_boxes_filename =
+            tester_db->getString("test_patch_boxes_filename");
+      }
+   }
+
+   if (d_test_fluxes) {
+
+      /*
+       * Read expected result for flux test...
+       * Fluxes not verified in this routine.  Rather, we let it
+       * write the result and do a "diff" within the script
+       */
+
+      tbox::pout << "Do a diff on the resulting *.dat file to verify result."
+                 << std::endl;
+
+   } else {
+
+      /*
+       * Read correct_result array for timestep test...
+       */
+      if (tester_db->keyExists("correct_result")) {
+         d_correct_result = tester_db->getDoubleArray("correct_result");
+      } else {
+         TBOX_WARNING("main.C: TESTING is on but no `correct_result' array"
+            << "is given in input file." << std::endl);
+      }
+
+      /* Specify whether to output "correct_result" result */
+
+      if (tester_db->keyExists("output_correct")) {
+         d_output_correct = tester_db->getBool("output_correct");
+      }
+
+   }
+
+}
+
+int AutoTester::checkHierarchyBoxes(
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number,
+   const hier::MappedBoxLevel& correct_mapped_box_level,
+   int iter)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   const tbox::Pointer<hier::PatchLevel> patch_level =
+      hierarchy->getPatchLevel(level_number);
+   const hier::MappedBoxLevel& mapped_box_level =
+      *patch_level->getMappedBoxLevel();
+
+   const int local_exact_match =
+      mapped_box_level == correct_mapped_box_level;
+
+   int global_exact_match = local_exact_match;
+   if (mpi.getSize() > 1) {
+      mpi.AllReduce(&global_exact_match, 1, MPI_MIN);
+   }
+
+   /*
+    * Check to make sure hierarchy's MappedBoxLevel and
+    * correct_mapped_box_level are identical.  If not, write an error
+    * message.
+    */
+
+   int num_failures = 0;
+
+   if (local_exact_match && global_exact_match) {
+      tbox::plog << "Test 4: Level " << level_number
+                 << " MappedBoxLevel check successful for step " << iter
+                 << std::endl << std::endl;
+   } else {
+      tbox::perr << "Test 4: FAILED: Level " << level_number
+                 <<
+      " hier::MappedBoxLevel configuration doesn't match at step " << iter
+                 << std::endl << std::endl;
+      num_failures++;
+   }
+
+   if (d_output_correct) {
+
+      tbox::pout << "-------------------------------------------------------"
+                 << std::endl;
+
+      if (!local_exact_match) {
+         tbox::pout << "LOCAL MAPPED BOX LEVEL DOES NOT MATCH "
+                    << "ON LEVEL: " << level_number << std::endl;
+      }
+
+      if (!global_exact_match) {
+         tbox::pout << "GLOBAL MAPPED BOX LEVEL DOES NOT MATCH "
+                    << "ON LEVEL: " << level_number << std::endl;
+      }
+      tbox::pout << "MappedBoxLevel: " << std::endl;
+      mapped_box_level.recursivePrint(tbox::pout, "", 3);
+      tbox::pout << "correct MappedBoxLevel: " << std::endl;
+      correct_mapped_box_level.recursivePrint(tbox::pout, "", 3);
+
+      tbox::pout << "-------------------------------------------------------"
+                 << std::endl << std::endl;
+
+   }
+
+   return num_failures;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/AutoTester.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/AutoTester.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,143 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+ *                Description:   Simple class used for autotesting. 
+ *
+ ************************************************************************/
+
+#ifndef included_AutoTesterXD
+#define included_AutoTesterXD
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/algs/HyperbolicLevelIntegrator.h"
+#include "SAMRAI/algs/MethodOfLinesIntegrator.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/tbox/HDFDatabase.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/algs/TimeRefinementIntegrator.h"
+
+using namespace SAMRAI;
+
+/**
+ *  Class AutoTester sets and verifies certain testing information
+ *  used for autotesting the applications codes.
+ *
+ *  The following input parameters may be specified:
+ *
+ *
+ *
+ *     - \b test_fluxes (bool) specifies whether we will do
+ *                 Riemann test or test on timesteps.
+ *     - \b test_iter_num (int) iteration to carry out test.
+ *     - \b correct_result (double array) holds correct result
+ *     - \b output_correct (bool) specifies whether we will write
+ *                 correct result (useful if changing problems
+ *                 and want to set "correct" array).
+ *
+ *
+ *
+ */
+
+class AutoTester
+{
+public:
+   /**
+    * Default constructor for AutoTester
+    */
+   AutoTester(
+      const std::string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> input_db);
+
+   /**
+    * Virtual destructor for AutoTester
+    */
+   virtual ~AutoTester();
+
+   /**
+    * Checks result for applications using TimeRefinementIntegrator
+    * and HyperbolicLevelIntegrator.
+    */
+   int
+   evalTestData(
+      int iter,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const tbox::Pointer<algs::TimeRefinementIntegrator> tri,
+      const tbox::Pointer<algs::HyperbolicLevelIntegrator> hli,
+      const tbox::Pointer<mesh::GriddingAlgorithm> ga);
+
+   /**
+    * Checks result for applications using MethodOfLinesIntegrator
+    */
+   int
+   evalTestData(
+      int iter,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      const double time,
+      const tbox::Pointer<algs::MethodOfLinesIntegrator> mol,
+      const tbox::Pointer<mesh::GriddingAlgorithm> ga);
+
+   /**
+    * Check boxes on specified hierarchy level against test boxes.
+    */
+   int
+   checkHierarchyBoxes(
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int ln,
+      const hier::MappedBoxLevel& correct_mapped_box_level,
+      int iter);
+
+private:
+   /*
+    *  Sets the parameters in the struct, based
+    *  on data read from input.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> input_db);
+
+   std::string d_object_name;
+
+   const tbox::Dimension d_dim;
+
+   bool d_test_fluxes;    //  specifies whether to check Riemann problem
+   bool d_output_correct;   // output  result?
+   int d_test_iter_num;     // iteration number to check result.
+
+   tbox::Array<double> d_correct_result;  // array to hold correct values
+
+   //!@brief Time steps at which to checkHierarchyBoxes().
+   tbox::Array<int> d_test_patch_boxes_at_steps;
+   //!@brief checkHierarchyBoxes() at d_test_patch_boxes_at_steps[d_test_patch_boxes_step_count].
+   int d_test_patch_boxes_step_count;
+   //!@brief File containing "correct" results used by checkHierarchyBoxes().
+   std::string d_test_patch_boxes_filename;
+   //!@brief Whether to write file d_test_patch_boxes_filename.
+   bool d_write_patch_boxes;
+   //!@brief Whether to read file d_test_patch_boxes_filename.
+   bool d_read_patch_boxes;
+
+#ifdef HAVE_HDF5
+   /*!
+    * @brief Database containing correct results for the
+    * MappedBoxLevels generated, for comparison check.
+    *
+    * Database /step_number_SN/level_number_LN is the correct result
+    * for the MappedBoxLevel level number LN at the sequence number
+    * SN.
+    */
+   tbox::HDFDatabase d_hdf_db;
+#endif
+
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/ConvDiff.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/ConvDiff/ConvDiff.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1332 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Numerical routines for single patch in convection
+ *                diffusion example. 
+ *
+ ************************************************************************/
+
+#include "ConvDiff.h"
+
+#include <iostream>
+#include <iomanip>
+#include <fstream>
+
+#ifndef LACKS_SSTREAM
+#ifndef included_sstream
+#define included_sstream
+#include <sstream>
+#endif
+#else
+#ifndef included_strstream
+#define included_strstream
+#include <strstream>
+#endif
+#endif
+
+using namespace std;
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+
+#include <float.h>
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+//integer constants for boundary conditions
+#define CHECK_BDRY_DATA (1)
+#include "SAMRAI/appu/CartesianBoundaryDefines.h"
+
+//integer constant for debugging improperly set boundary dat
+#define BOGUS_BDRY_DATA (-9999)
+
+// routines for managing boundary data
+#include "SAMRAI/appu/CartesianBoundaryUtilities2.h"
+#include "SAMRAI/appu/CartesianBoundaryUtilities3.h"
+
+// external definitions for Fortran numerical routines
+#include "ConvDiffFort.h"
+
+// defines for initialization
+#define SPHERE (40)
+
+// Number of ghosts cells used for each variable quantity.
+#define CELLG (1)
+
+// Define class version number
+#define CONV_DIFF_VERSION (2)
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The constructor for ConvDiff class sets data members to defualt       *
+ * values, creates variables that define the solution state for the      *
+ * convection diffusion equation.
+ *                                                                       *
+ * After default values are set, this routine calls getFromRestart()     *
+ * if execution from a restart file is specified.  Finally,              *
+ * getFromInput() is called to read values from the given input          *
+ * database (potentially overriding those found in the restart file).    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+ConvDiff::ConvDiff(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> input_db,
+   tbox::Pointer<geom::CartesianGridGeometry> grid_geom):
+   algs::MethodOfLinesPatchStrategy::MethodOfLinesPatchStrategy(dim),
+   d_dim(dim),
+   d_nghosts(d_dim, 1),
+   d_zero_ghosts(d_dim, 0)
+{
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!input_db.isNull());
+   TBOX_ASSERT(!grid_geom.isNull());
+
+   d_object_name = object_name;
+   tbox::RestartManager::getManager()->registerRestartItem(d_object_name, this);
+
+   d_grid_geometry = grid_geom;
+
+   int k;
+
+   /*
+    *hier::Variable quantities that define state of convection diffusion
+    * problem.
+    *
+    *     dU/dt + alpha dU/dx = mu d^2U/dx^2 + gamma
+    *
+    *     U     = primitive variable(s)
+    *     F(U)  = function evaluation
+    *     alpha = convection coefficient
+    *     mu    = diffusion coefficient
+    *     gamma = source coefficient
+    */
+   d_primitive_vars = new pdat::CellVariable<double>(dim, "primitive_vars", 1);
+   d_function_eval = new pdat::CellVariable<double>(dim, "function_eval", 1);
+   d_diffusion_coeff = 1.;
+   for (k = 0; k < d_dim.getValue(); k++) d_convection_coeff[k] = 0.;
+   d_source_coeff = 0.;
+
+   // Physics parameters
+   d_cfl = 0.9;
+   for (k = 0; k < NEQU; k++) d_tolerance[k] = 0.;
+
+   /*
+    * Defaults for problem type and initial data.  Set initial
+    * data to NaNs so we make sure input has set it to appropriate
+    * problem.
+    */
+   d_data_problem = tbox::MathUtilities<char>::getMax();
+
+   // SPHERE problem...
+   d_radius = tbox::MathUtilities<double>::getSignalingNaN();
+   tbox::MathUtilities<double>::setArrayToSignalingNaN(d_center, d_dim.getValue());
+   tbox::MathUtilities<double>::setArrayToSignalingNaN(d_val_inside, NEQU);
+   tbox::MathUtilities<double>::setArrayToSignalingNaN(d_val_inside, NEQU);
+
+   /*
+    * Boundary condition initialization.
+    */
+   if (d_dim == tbox::Dimension(2)) {
+      d_scalar_bdry_edge_conds.resizeArray(NUM_2D_EDGES);
+      for (int ei = 0; ei < NUM_2D_EDGES; ei++) {
+         d_scalar_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+      }
+
+      d_scalar_bdry_node_conds.resizeArray(NUM_2D_NODES);
+      d_node_bdry_edge.resizeArray(NUM_2D_NODES);
+
+      for (int ni = 0; ni < NUM_2D_NODES; ni++) {
+         d_scalar_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+         d_node_bdry_edge[ni] = BOGUS_BDRY_DATA;
+      }
+
+      d_bdry_edge_val.resizeArray(NUM_2D_EDGES);
+      tbox::MathUtilities<double>::setArrayToSignalingNaN(d_bdry_edge_val);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      d_scalar_bdry_face_conds.resizeArray(NUM_3D_FACES);
+      for (int fi = 0; fi < NUM_3D_FACES; fi++) {
+         d_scalar_bdry_face_conds[fi] = BOGUS_BDRY_DATA;
+      }
+
+      d_scalar_bdry_edge_conds.resizeArray(NUM_3D_EDGES);
+      d_edge_bdry_face.resizeArray(NUM_3D_EDGES);
+      for (int ei = 0; ei < NUM_3D_EDGES; ei++) {
+         d_scalar_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+         d_edge_bdry_face[ei] = BOGUS_BDRY_DATA;
+      }
+
+      d_scalar_bdry_node_conds.resizeArray(NUM_3D_NODES);
+      d_node_bdry_face.resizeArray(NUM_3D_NODES);
+
+      for (int ni = 0; ni < NUM_3D_NODES; ni++) {
+         d_scalar_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+         d_node_bdry_face[ni] = BOGUS_BDRY_DATA;
+      }
+
+      d_bdry_face_val.resizeArray(NUM_3D_FACES);
+      tbox::MathUtilities<double>::setArrayToSignalingNaN(d_bdry_face_val);
+   }
+
+   /*
+    * Initialize object with data read from given input/restart databases.
+    */
+   bool is_from_restart = tbox::RestartManager::getManager()->isFromRestart();
+   if (is_from_restart) {
+      getFromRestart();
+   }
+   getFromInput(input_db, is_from_restart);
+
+   /*
+    * Set problem data to values read from input/restart.
+    */
+
+   if (d_data_problem == "SPHERE") {
+      d_data_problem_int = SPHERE;
+   } else {
+      TBOX_ERROR(
+         d_object_name << ": "
+         << "Unknown d_data_problem string = "
+         << d_data_problem
+         << " encountered in constructor" << endl);
+   }
+
+   /*
+    * Postprocess boundary data from input/restart values.  Note: scalar
+    * quantity in this problem cannot have reflective boundary conditions
+    * so we reset them to FLOW.
+    */
+   if (d_dim == tbox::Dimension(2)) {
+      for (int i = 0; i < NUM_2D_EDGES; i++) {
+         if (d_scalar_bdry_edge_conds[i] == REFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = FLOW_BC;
+         }
+      }
+
+      for (int i = 0; i < NUM_2D_NODES; i++) {
+         if (d_scalar_bdry_node_conds[i] == XREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = XFLOW_BC;
+         }
+         if (d_scalar_bdry_node_conds[i] == YREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = YFLOW_BC;
+         }
+
+         if (d_scalar_bdry_node_conds[i] != BOGUS_BDRY_DATA) {
+            d_node_bdry_edge[i] =
+               appu::CartesianBoundaryUtilities2::getEdgeLocationForNodeBdry(
+                  i, d_scalar_bdry_node_conds[i]);
+         }
+      }
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      for (int i = 0; i < NUM_3D_FACES; i++) {
+         if (d_scalar_bdry_face_conds[i] == REFLECT_BC) {
+            d_scalar_bdry_face_conds[i] = FLOW_BC;
+         }
+      }
+
+      for (int i = 0; i < NUM_3D_EDGES; i++) {
+         if (d_scalar_bdry_edge_conds[i] == XREFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = XFLOW_BC;
+         }
+         if (d_scalar_bdry_edge_conds[i] == YREFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = YFLOW_BC;
+         }
+         if (d_scalar_bdry_edge_conds[i] == ZREFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = ZFLOW_BC;
+         }
+
+         if (d_scalar_bdry_edge_conds[i] != BOGUS_BDRY_DATA) {
+            d_edge_bdry_face[i] =
+               appu::CartesianBoundaryUtilities3::getFaceLocationForEdgeBdry(
+                  i, d_scalar_bdry_edge_conds[i]);
+         }
+      }
+
+      for (int i = 0; i < NUM_3D_NODES; i++) {
+         if (d_scalar_bdry_node_conds[i] == XREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = XFLOW_BC;
+         }
+         if (d_scalar_bdry_node_conds[i] == YREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = YFLOW_BC;
+         }
+         if (d_scalar_bdry_node_conds[i] == ZREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = ZFLOW_BC;
+         }
+
+         if (d_scalar_bdry_node_conds[i] != BOGUS_BDRY_DATA) {
+            d_node_bdry_face[i] =
+               appu::CartesianBoundaryUtilities3::getFaceLocationForNodeBdry(
+                  i, d_scalar_bdry_node_conds[i]);
+         }
+      }
+
+   }
+
+}
+
+/*************************************************/
+ConvDiff::~ConvDiff()
+{
+}
+
+/*
+ *************************************************************************
+ *
+ * Register variables with the MOL integrator.  Since the integrator
+ * that manages storage for these quantities, this is how it finds
+ * out about them.
+ *
+ *
+ *************************************************************************
+ */
+void ConvDiff::registerModelVariables(
+   algs::MethodOfLinesIntegrator* integrator)
+{
+   /*
+    * Only two types of variables are used by the integrator - SOLN
+    * and RHS.  The primitive variables are of type SOLN while
+    * the function evaluation is of type RHS.
+    *
+    * SOLN needs two contexts - current (without ghosts) and
+    * scratch (with ghosts). Current is maintained between timesteps,
+    * while scratch is created and destroyed within a timestep.
+    */
+
+   integrator->registerVariable(d_primitive_vars, d_nghosts,
+      algs::MethodOfLinesIntegrator::SOLN,
+      d_grid_geometry,
+      "CONSERVATIVE_COARSEN",
+      "LINEAR_REFINE");
+
+   /*
+    * RHS needs only one context - scratch (with ghosts).  It is used
+    * to store communicated ghost information within the timestep.
+    * The function evaluation is not communicated across levels,
+    * it is recomputed using the interpolated primitive variables.
+    * Hence, we don't need to define a coarsen or refine operator.
+    */
+   integrator->registerVariable(d_function_eval, d_nghosts,
+      algs::MethodOfLinesIntegrator::RHS,
+      d_grid_geometry,
+      "NO_COARSEN",
+      "NO_REFINE");
+
+   /*
+    * Loop over primitive variables and register each with the
+    * data writer.
+    */
+   hier::VariableDatabase* vardb = hier::VariableDatabase::getDatabase();
+
+   int prim_var_id = vardb->mapVariableAndContextToIndex(
+         d_primitive_vars, getInteriorContext());
+
+   string dump_name = "Primitive Var #";
+   const int size = static_cast<int>(dump_name.length()) + 16;
+   char* buffer = new char[size];
+
+   for (int n = 0; n < NEQU; n++) {
+      sprintf(buffer, "%s%01d", dump_name.c_str(), n);
+      string variable_name(buffer);
+#ifdef HAVE_HDF5
+      if (!(d_visit_writer.isNull())) {
+         d_visit_writer->
+         registerPlotQuantity(variable_name, "SCALAR",
+            prim_var_id, n);
+      }
+      if (d_visit_writer.isNull()) {
+         TBOX_WARNING(
+            d_object_name << ": registerModelVariables()\n"
+            <<
+            "Visit data writer was not registered.\n"
+            << "Consequently, no plot data will\n"
+            << "be written." << endl);
+      }
+#endif
+
+   }
+
+   delete[] buffer;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set initial data for solution variables on patch interior.            *
+ * This routine is called whenever a new patch is introduced to the      *
+ * AMR patch hierarchy.  Note that the routine does nothing unless       *
+ * we are at the initial time.  In all other cases, conservative         *
+ * interpolation from coarser levels and copies from patches at the      *
+ * same mesh resolution are sufficient to set data.                      *
+ *                                                                       *
+ *************************************************************************
+ */
+void ConvDiff::initializeDataOnPatch(
+   hier::Patch& patch,
+   const double time,
+   const bool initial_time) const
+{
+   (void)time;
+
+   if (initial_time) {
+
+      const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+         patch.getPatchGeometry();
+
+      const double* dx = patch_geom->getDx();
+      const double* xlo = patch_geom->getXLower();
+      const double* xhi = patch_geom->getXUpper();
+
+      tbox::Pointer<pdat::CellData<double> > primitive_vars =
+         patch.getPatchData(d_primitive_vars, getInteriorContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!primitive_vars.isNull());
+#endif
+      hier::IntVector ghost_cells = primitive_vars->getGhostCellWidth();
+
+      hier::Box pbox = patch.getBox();
+      tbox::Pointer<pdat::CellData<double> > temp_var;
+      temp_var = new pdat::CellData<double>(pbox, 1, ghost_cells);
+
+      const hier::Index ifirst = patch.getBox().lower();
+      const hier::Index ilast = patch.getBox().upper();
+
+      if (d_dim == tbox::Dimension(2)) {
+         F77_FUNC(initsphere2d, INITSPHERE2D) (dx, xlo, xhi,
+            ifirst(0), ilast(0), ifirst(1), ilast(1),
+            ghost_cells(0), ghost_cells(1),
+            primitive_vars->getPointer(),
+            d_val_inside,
+            d_val_outside,
+            d_center, d_radius,
+            NEQU);
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         F77_FUNC(initsphere3d, INITSPHERE3D) (dx, xlo, xhi,
+            ifirst(0), ilast(0), ifirst(1), ilast(1),
+            ifirst(2), ilast(2),
+            ghost_cells(0), ghost_cells(1),
+            ghost_cells(2),
+            primitive_vars->getPointer(),
+            d_val_inside,
+            d_val_outside,
+            d_center, d_radius,
+            NEQU);
+      }
+
+      // tbox::plog << "Level:" << patch.getPatchLevelNumber() << "\n" << endl;
+      // tbox::plog << "Patch:" << endl;
+      // primitive_vars->print(patch.getBox(),tbox::plog);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute stable time increment for patch.  Return this value.          *
+ * (See Hirsch, Vol 1, pp 448 for description of stability analysis)     *
+ *                                                                       *
+ *************************************************************************
+ */
+double ConvDiff::computeStableDtOnPatch(
+   hier::Patch& patch,
+   const double time) const
+{
+   (void)time;
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+
+   tbox::Pointer<pdat::CellData<double> > primitive_vas =
+      patch.getPatchData(d_primitive_vars, getInteriorContext());
+
+   double stabdt = 0.0;
+
+//  Use the condition defined on pg. 448 of Hirsch, Vol. 1.
+//     for system du/dt = beta*u_xx
+//           0 <= beta*dt/(dx**2) <= 1
+//     assume Beta=d_cfl for this case.
+
+   if (d_dim == tbox::Dimension(2)) {
+      stabdt = d_cfl * ((*dx) * (*dx));
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      stabdt = d_cfl * ((*dx) * (*dx) * (*dx));
+   }
+
+//   Alternatively, one could use a fortran function here if you want
+//   something more complex.
+//
+//   FORT_STABLE_DT(stabdt
+//                  ifirst(0),ilast(0),
+//                  ifirst(1),ilast(1),
+//                  ifirst(2),ilast(2),
+//                  d_params,
+//                  density->getPointer(),
+//                  velocity->getPointer(),
+//                  pressure->getPointer(),
+//                  stabdt);
+   return stabdt;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Perform a single Runge-Kutta sub-iteration using the passed-in        *
+ * alpha.                                                                *
+ *                                                                       *
+ *************************************************************************
+ */
+void ConvDiff::singleStep(
+   hier::Patch& patch,
+   const double dt,
+   const double alpha_1,
+   const double alpha_2,
+   const double beta) const
+{
+
+   tbox::Pointer<pdat::CellData<double> > prim_var_updated =
+      patch.getPatchData(d_primitive_vars, getInteriorWithGhostsContext());
+
+   tbox::Pointer<pdat::CellData<double> > prim_var_fixed =
+      patch.getPatchData(d_primitive_vars, getInteriorContext());
+
+   tbox::Pointer<pdat::CellData<double> > function_eval =
+      patch.getPatchData(d_function_eval, getInteriorContext());
+
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+
+//      tbox::plog << "----primitive_var_current" << endl;
+//      prim_var_current->print(prim_var_current->getGhostBox(),tbox::plog);
+//      tbox::plog << "----primitive_var_scratch" << endl;
+//      prim_var_scratch->print(prim_var_scratch->getGhostBox(),tbox::plog);
+//
+// Evaluate Right hand side F(prim_var_scratch)
+//
+   if (d_dim == tbox::Dimension(2)) {
+      F77_FUNC(computerhs2d, COMPUTERHS2D) (ifirst(0), ilast(0), ifirst(1),
+         ilast(1),
+         d_nghosts(0), d_nghosts(1),
+         dx,
+         d_convection_coeff,
+         d_diffusion_coeff,
+         d_source_coeff,
+         prim_var_updated->getPointer(),
+         function_eval->getPointer(),
+         NEQU);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      F77_FUNC(computerhs3d, COMPUTERHS3D) (ifirst(0), ilast(0), ifirst(1),
+         ilast(1),
+         ifirst(2), ilast(2),
+         d_nghosts(0), d_nghosts(1),
+         d_nghosts(2),
+         dx,
+         d_convection_coeff,
+         d_diffusion_coeff,
+         d_source_coeff,
+         prim_var_updated->getPointer(),
+         function_eval->getPointer(),
+         NEQU);
+   }
+
+//    tbox::plog << "Function Evaluation" << endl;
+//    function_eval->print(function_eval->getBox());
+//
+// Take RK step
+//
+   if (d_dim == tbox::Dimension(2)) {
+      F77_FUNC(rkstep2d, RKSTEP2D) (ifirst(0), ilast(0), ifirst(1), ilast(1),
+         d_nghosts(0), d_nghosts(1),
+         dt, alpha_1, alpha_2, beta,
+         d_convection_coeff,
+         d_diffusion_coeff,
+         d_source_coeff,
+         prim_var_updated->getPointer(),
+         prim_var_fixed->getPointer(),
+         function_eval->getPointer(),
+         NEQU);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      F77_FUNC(rkstep3d, RKSTEP3D) (ifirst(0), ilast(0), ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         d_nghosts(0), d_nghosts(1),
+         d_nghosts(2),
+         dt, alpha_1, alpha_2, beta,
+         d_convection_coeff,
+         d_diffusion_coeff,
+         d_source_coeff,
+         prim_var_updated->getPointer(),
+         prim_var_fixed->getPointer(),
+         function_eval->getPointer(),
+         NEQU);
+   }
+//        tbox::plog << "----prim_var_scratch after RK step" << endl;
+//        prim_var_scratch->print(prim_var_scratch->getGhostBox(),tbox::plog);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ *  Cell tagging routine - tag cells that require refinement based on    *
+ *  a provided condition.                                                *
+ *                                                                       *
+ *************************************************************************
+ */
+void ConvDiff::tagGradientDetectorCells(
+   hier::Patch& patch,
+   const double regrid_time,
+   const bool initial_error,
+   const int tag_index,
+   const bool uses_richardson_extrapolation_too)
+{
+   (void)regrid_time;
+   (void)initial_error;
+   (void)uses_richardson_extrapolation_too;
+
+   tbox::Pointer<pdat::CellData<int> > tags = patch.getPatchData(tag_index);
+   tbox::Pointer<pdat::CellData<double> > primitive_vars =
+      patch.getPatchData(d_primitive_vars, getInteriorWithGhostsContext());
+
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+
+   const hier::IntVector var_ghosts = primitive_vars->getGhostCellWidth();
+
+   if (d_dim == tbox::Dimension(2)) {
+      F77_FUNC(tagcells2d, TAGCELLS2D) (ifirst(0), ilast(0), ifirst(1), ilast(1),
+         var_ghosts(0), var_ghosts(1),
+         tags->getPointer(),
+         primitive_vars->getPointer(),
+         true,
+         d_tolerance,
+         NEQU);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      F77_FUNC(tagcells3d, TAGCELLS3D) (ifirst(0), ilast(0), ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         var_ghosts(0), var_ghosts(1),
+         var_ghosts(2),
+         tags->getPointer(),
+         primitive_vars->getPointer(),
+         true,
+         d_tolerance,
+         NEQU);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set the data in ghost cells corresponding to physical boundary        *
+ * conditions.  Note that boundary geometry configuration information    *
+ * (i.e., faces, edges, and nodes) is obtained from the patch geometry   *
+ * object owned by the patch.                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+void ConvDiff::setPhysicalBoundaryConditions(
+   hier::Patch& patch,
+   const double fill_time,
+   const hier::IntVector& ghost_width_to_fill)
+{
+   (void)fill_time;
+
+   tbox::Pointer<pdat::CellData<double> > primitive_vars =
+      patch.getPatchData(d_primitive_vars, getInteriorWithGhostsContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!primitive_vars.isNull());
+#endif
+   hier::IntVector ghost_cells = primitive_vars->getGhostCellWidth();
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(primitive_vars->getGhostCellWidth() == d_nghosts);
+#endif
+
+   if (d_dim == tbox::Dimension(2)) {
+
+      /*
+       * Set boundary conditions for cells corresponding to patch edges.
+       */
+      appu::CartesianBoundaryUtilities2::
+      fillEdgeBoundaryData("primitive_vars", primitive_vars,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_edge_conds,
+         d_bdry_edge_val);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+#if CHECK_BDRY_DATA
+      checkBoundaryData(EDGE2D_BDRY_TYPE, patch, ghost_width_to_fill,
+         d_scalar_bdry_edge_conds);
+#endif
+#endif
+
+      /*
+       *  Set boundary conditions for cells corresponding to patch nodes.
+       */
+
+      appu::CartesianBoundaryUtilities2::
+      fillNodeBoundaryData("primitive_vars", primitive_vars,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_node_conds,
+         d_bdry_edge_val);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+#if CHECK_BDRY_DATA
+      checkBoundaryData(NODE2D_BDRY_TYPE, patch, ghost_width_to_fill,
+         d_scalar_bdry_node_conds);
+#endif
+#endif
+
+   } // d_dim == tbox::Dimension(2))
+
+   if (d_dim == tbox::Dimension(3)) {
+
+      /*
+       *  Set boundary conditions for cells corresponding to patch faces.
+       */
+      appu::CartesianBoundaryUtilities3::
+      fillFaceBoundaryData("primitive_vars", primitive_vars,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_face_conds,
+         d_bdry_face_val);
+#ifdef DEBUG_CHECK_ASSERTIONS
+#if CHECK_BDRY_DATA
+      checkBoundaryData(FACE3D_BDRY_TYPE, patch, ghost_width_to_fill,
+         d_scalar_bdry_face_conds);
+#endif
+#endif
+
+      /*
+       *  Set boundary conditions for cells corresponding to patch edges.
+       */
+
+      appu::CartesianBoundaryUtilities3::
+      fillEdgeBoundaryData("primitive_vars", primitive_vars,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_edge_conds,
+         d_bdry_face_val);
+#ifdef DEBUG_CHECK_ASSERTIONS
+#if CHECK_BDRY_DATA
+      checkBoundaryData(EDGE3D_BDRY_TYPE, patch, ghost_width_to_fill,
+         d_scalar_bdry_edge_conds);
+#endif
+#endif
+
+      /*
+       *  Set boundary conditions for cells corresponding to patch nodes.
+       */
+
+      appu::CartesianBoundaryUtilities3::
+      fillNodeBoundaryData("primitive_vars", primitive_vars,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_node_conds,
+         d_bdry_face_val);
+#ifdef DEBUG_CHECK_ASSERTIONS
+#if CHECK_BDRY_DATA
+      checkBoundaryData(NODE3D_BDRY_TYPE, patch, ghost_width_to_fill,
+         d_scalar_bdry_node_conds);
+#endif
+#endif
+
+   } // d_dim == tbox::Dimension(3))
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register VisIt data writer to write data to plot files that may       *
+ * be postprocessed by the VisIt tool.                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+#ifdef HAVE_HDF5
+void ConvDiff::registerVisItDataWriter(
+   tbox::Pointer<appu::VisItDataWriter> viz_writer)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(viz_writer.isNull()));
+#endif
+   d_visit_writer = viz_writer;
+}
+#endif
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Prints class data - writes out info in class if assertion is thrown   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ConvDiff::printClassData(
+   ostream& os) const
+{
+   fflush(stdout);
+   int j;
+
+   os << "ptr ConvDiff = " << (ConvDiff *)this << endl;
+   os << "ptr grid geometry = "
+      << (geom::CartesianGridGeometry *)d_grid_geometry << endl;
+
+   os << "Coefficients..." << endl;
+   for (j = 0; j < d_dim.getValue(); j++) os << "d_convection_coeff[" << j << "] = "
+      << d_convection_coeff[j] << endl;
+   os << "d_diffusion_coeff = " << d_diffusion_coeff << endl;
+   os << "d_source_coeff = " << d_source_coeff << endl;
+
+   os << "Problem description and initial data..." << endl;
+   os << "   d_data_problem = " << d_data_problem << endl;
+
+   os << "       d_radius = " << d_radius << endl;
+   os << "       d_center = ";
+   for (j = 0; j < d_dim.getValue(); j++) os << d_center[j] << " ";
+   os << endl;
+   os << "       d_val_inside = ";
+   for (j = 0; j < NEQU; j++) os << d_val_inside[j] << " ";
+   os << endl;
+   os << "       d_val_outside = ";
+   for (j = 0; j < NEQU; j++) os << d_val_outside[j] << " ";
+   os << endl;
+
+   os << "Boundary Condition data..." << endl;
+   if (d_dim == tbox::Dimension(2)) {
+      for (j = 0; j < d_scalar_bdry_edge_conds.getSize(); j++) {
+         os << "       d_scalar_bdry_edge_conds[" << j << "] = "
+         << d_scalar_bdry_edge_conds[j] << endl;
+         if (d_scalar_bdry_edge_conds[j] == DIRICHLET_BC) {
+            os << "         d_bdry_edge_val[" << j << "] = "
+            << d_bdry_edge_val[j] << endl;
+         }
+      }
+      os << endl;
+      for (j = 0; j < d_scalar_bdry_node_conds.getSize(); j++) {
+         os << "       d_scalar_bdry_node_conds[" << j << "] = "
+         << d_scalar_bdry_node_conds[j] << endl;
+         os << "       d_node_bdry_edge[" << j << "] = "
+         << d_node_bdry_edge[j] << endl;
+      }
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      for (j = 0; j < d_scalar_bdry_face_conds.getSize(); j++) {
+         os << "       d_scalar_bdry_face_conds[" << j << "] = "
+         << d_scalar_bdry_face_conds[j] << endl;
+         if (d_scalar_bdry_face_conds[j] == DIRICHLET_BC) {
+            os << "         d_bdry_face_val[" << j << "] = "
+            << d_bdry_face_val[j] << endl;
+         }
+      }
+      os << endl;
+      for (j = 0; j < d_scalar_bdry_edge_conds.getSize(); j++) {
+         os << "       d_scalar_bdry_edge_conds[" << j << "] = "
+         << d_scalar_bdry_edge_conds[j] << endl;
+         os << "       d_edge_bdry_face[" << j << "] = "
+         << d_edge_bdry_face[j] << endl;
+      }
+      os << endl;
+      for (j = 0; j < d_scalar_bdry_node_conds.getSize(); j++) {
+         os << "       d_scalar_bdry_node_conds[" << j << "] = "
+         << d_scalar_bdry_node_conds[j] << endl;
+         os << "       d_node_bdry_face[" << j << "] = "
+         << d_node_bdry_face[j] << endl;
+      }
+   }
+
+   os << "         d_nghosts = " << d_nghosts << endl;
+   os << "         d_zero_ghosts = " << d_zero_ghosts << endl;
+   os << "         d_cfl = " << d_cfl << endl;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+void ConvDiff::getFromInput(
+   tbox::Pointer<tbox::Database> db,
+   bool is_from_restart)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   if (db->keyExists("convection_coeff")) {
+      db->getDoubleArray("convection_coeff",
+         d_convection_coeff, d_dim.getValue());
+   } else {
+      TBOX_ERROR(
+         d_object_name << ":  "
+         <<
+         "Key data `convection_coeff' not found in input.");
+   }
+   if (db->keyExists("diffusion_coeff")) {
+      d_diffusion_coeff = db->getDouble("diffusion_coeff");
+   } else {
+      TBOX_ERROR(
+         d_object_name << ":  "
+         <<
+         "Key data `diffusion_coeff' not found in input.");
+   }
+   if (db->keyExists("source_coeff")) {
+      d_source_coeff = db->getDouble("source_coeff");
+   } else {
+      TBOX_ERROR(d_object_name << ":  "
+                               << "Key data `source_coeff' not found in input.");
+   }
+
+   d_cfl = db->getDoubleWithDefault("cfl", d_cfl);
+
+   if (db->keyExists("cell_tagging_tolerance")) {
+      db->getDoubleArray("cell_tagging_tolerance",
+         d_tolerance, NEQU);
+   } else {
+      TBOX_ERROR(
+         d_object_name << ":  "
+         <<
+         "Key data `cell_tagging_tolerance' not found in input.");
+   }
+
+   if (!is_from_restart) {
+
+      if (db->keyExists("data_problem")) {
+         d_data_problem = db->getString("data_problem");
+      } else {
+         TBOX_ERROR(
+            d_object_name << ": "
+            << "`data_problem' value not found in input."
+            << endl);
+      }
+
+      tbox::Pointer<tbox::Database> init_data_db;
+      if (db->keyExists("Initial_data")) {
+         init_data_db = db->getDatabase("Initial_data");
+      } else {
+         TBOX_ERROR(
+            d_object_name << ": "
+            <<
+            "No `Initial_data' database found in input." << endl);
+      }
+
+      bool found_problem_data = false;
+
+      if (d_data_problem == "SPHERE") {
+
+         if (init_data_db->keyExists("radius")) {
+            d_radius = init_data_db->getDouble("radius");
+         } else {
+            TBOX_ERROR(
+               d_object_name << ": "
+               <<
+               "`radius' input required for SPHERE problem." << endl);
+         }
+         if (init_data_db->keyExists("center")) {
+            init_data_db->getDoubleArray("center", d_center, d_dim.getValue());
+         } else {
+            TBOX_ERROR(
+               d_object_name << ": "
+               <<
+               "`center' input required for SPHERE problem." << endl);
+         }
+         if (init_data_db->keyExists("val_inside")) {
+            init_data_db->getDoubleArray("val_inside", d_val_inside, NEQU);
+         } else {
+            TBOX_ERROR(d_object_name << ": "
+                                     << "val_inside' input required for "
+                                     << "SPHERE problem." << endl);
+         }
+         if (init_data_db->keyExists("val_outside")) {
+            init_data_db->getDoubleArray("val_outside", d_val_outside, NEQU);
+         } else {
+            TBOX_ERROR(d_object_name << ": "
+                                     << "`val_outside' input required for "
+                                     << "SPHERE problem." << endl);
+         }
+
+         found_problem_data = true;
+
+      }
+
+      if (!found_problem_data) {
+         TBOX_ERROR(
+            d_object_name << ": "
+            << "Bad data in `Initial_data' database."
+            << endl);
+      }
+
+      const hier::IntVector one_vec = hier::IntVector::getOne(d_dim);
+      hier::IntVector periodic = d_grid_geometry->getPeriodicShift(one_vec);
+      int num_per_dirs = 0;
+      for (int id = 0; id < d_dim.getValue(); id++) {
+         if (periodic(id)) num_per_dirs++;
+      }
+
+      if (db->keyExists("Boundary_data")) {
+         tbox::Pointer<tbox::Database> boundary_db = db->getDatabase(
+               "Boundary_data");
+
+         if (d_dim == tbox::Dimension(2)) {
+            appu::CartesianBoundaryUtilities2::readBoundaryInput(this,
+               boundary_db,
+               d_scalar_bdry_edge_conds,
+               d_scalar_bdry_node_conds,
+               periodic);
+         }
+         if (d_dim == tbox::Dimension(3)) {
+            appu::CartesianBoundaryUtilities3::readBoundaryInput(this,
+               boundary_db,
+               d_scalar_bdry_face_conds,
+               d_scalar_bdry_edge_conds,
+               d_scalar_bdry_node_conds,
+               periodic);
+         }
+
+      } else {
+         TBOX_WARNING(
+            d_object_name << ": "
+            <<
+            "Key data `Boundary_data' not found in input. "
+            <<
+            "Using default FLOW boundary conditions." << endl);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to put/get data members to/from restart database.            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ConvDiff::putToDatabase(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   db->putInteger("CONV_DIFF_VERSION", CONV_DIFF_VERSION);
+
+   db->putDouble("d_diffusion_coeff", d_diffusion_coeff);
+   db->putDoubleArray("d_convection_coeff", d_convection_coeff, d_dim.getValue());
+   db->putDouble("d_source_coeff", d_source_coeff);
+   db->putIntegerArray("d_nghosts", &d_nghosts[0], d_dim.getValue());
+
+   db->putString("d_data_problem", d_data_problem);
+
+   db->putDouble("d_radius", d_radius);
+   db->putDoubleArray("d_center", d_center, d_dim.getValue());
+   db->putDoubleArray("d_val_inside", d_val_inside, NEQU);
+   db->putDoubleArray("d_val_outside", d_val_outside, NEQU);
+
+   db->putDouble("d_cfl", d_cfl);
+
+   db->putIntegerArray("d_scalar_bdry_edge_conds", d_scalar_bdry_edge_conds);
+   db->putIntegerArray("d_scalar_bdry_node_conds", d_scalar_bdry_node_conds);
+
+   if (d_dim == tbox::Dimension(2)) {
+      db->putDoubleArray("d_bdry_edge_val", d_bdry_edge_val);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      db->putIntegerArray("d_scalar_bdry_face_conds", d_scalar_bdry_face_conds);
+      db->putDoubleArray("d_bdry_face_val", d_bdry_face_val);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+void ConvDiff::getFromRestart()
+{
+
+   tbox::Pointer<tbox::Database> root_db =
+      tbox::RestartManager::getManager()->getRootDatabase();
+
+   tbox::Pointer<tbox::Database> db;
+   if (root_db->isDatabase(d_object_name)) {
+      db = root_db->getDatabase(d_object_name);
+   } else {
+      TBOX_ERROR("Restart database corresponding to "
+         << d_object_name << " not found in the restart file.");
+   }
+
+   int ver = db->getInteger("CONV_DIFF_VERSION");
+   if (ver != CONV_DIFF_VERSION) {
+      TBOX_ERROR(
+         d_object_name << ":  "
+         <<
+         "Restart file version different than class version.");
+   }
+
+   d_diffusion_coeff = db->getDouble("d_diffusion_coeff");
+   db->getDoubleArray("d_convection_coeff", d_convection_coeff, d_dim.getValue());
+   d_source_coeff = db->getDouble("d_source_coeff");
+   db->getIntegerArray("d_nghosts", &d_nghosts[0], d_dim.getValue());
+
+   d_data_problem = static_cast<char>(db->getInteger("d_data_problem"));
+
+   d_radius = db->getDouble("d_radius");
+   db->getDoubleArray("d_center", d_center, d_dim.getValue());
+   db->getDoubleArray("d_val_inside", d_val_inside, NEQU);
+   db->getDoubleArray("d_val_outside", d_val_outside, NEQU);
+
+   d_cfl = db->getDouble("d_cfl");
+
+   d_scalar_bdry_edge_conds = db->getIntegerArray("d_scalar_bdry_edge_conds");
+   d_scalar_bdry_node_conds = db->getIntegerArray("d_scalar_bdry_node_conds");
+
+   if (d_dim == tbox::Dimension(2)) {
+      d_bdry_edge_val = db->getDoubleArray("d_bdry_edge_val");
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      d_scalar_bdry_face_conds = db->getIntegerArray("d_scalar_bdry_face_conds");
+
+      d_bdry_face_val = db->getDoubleArray("d_bdry_face_val");
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to read boundary data from input database.                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ConvDiff::readDirichletBoundaryDataEntry(
+   tbox::Pointer<tbox::Database> db,
+   string& db_name,
+   int bdry_location_index)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+   TBOX_ASSERT(!db_name.empty());
+#endif
+   if (d_dim == tbox::Dimension(2)) {
+      readStateDataEntry(db,
+         db_name,
+         bdry_location_index,
+         d_bdry_edge_val);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      readStateDataEntry(db,
+         db_name,
+         bdry_location_index,
+         d_bdry_face_val);
+   }
+}
+
+void ConvDiff::readNeumannBoundaryDataEntry(
+   tbox::Pointer<tbox::Database> db,
+   string& db_name,
+   int bdry_location_index)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+   TBOX_ASSERT(!db_name.empty());
+#endif
+   if (d_dim == tbox::Dimension(2)) {
+      readStateDataEntry(db,
+         db_name,
+         bdry_location_index,
+         d_bdry_edge_val);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      readStateDataEntry(db,
+         db_name,
+         bdry_location_index,
+         d_bdry_face_val);
+   }
+}
+
+void ConvDiff::readStateDataEntry(
+   tbox::Pointer<tbox::Database> db,
+   const string& db_name,
+   int array_indx,
+   tbox::Array<double>& val)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+   TBOX_ASSERT(!db_name.empty());
+   TBOX_ASSERT(array_indx >= 0);
+   TBOX_ASSERT(val.getSize() > array_indx);
+#endif
+
+   if (db->keyExists("val")) {
+      val[array_indx] = db->getDouble("val");
+   } else {
+      TBOX_ERROR(d_object_name << ": "
+                               << "`val' entry missing from " << db_name
+                               << " input database. " << endl);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routine to check boundary data when debugging.                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ConvDiff::checkBoundaryData(
+   int btype,
+   const hier::Patch& patch,
+   const hier::IntVector& ghost_width_to_check,
+   const tbox::Array<int>& scalar_bconds) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_dim == tbox::Dimension(2)) {
+      TBOX_ASSERT(btype == EDGE2D_BDRY_TYPE ||
+         btype == NODE2D_BDRY_TYPE);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      TBOX_ASSERT(btype == FACE3D_BDRY_TYPE ||
+         btype == EDGE3D_BDRY_TYPE ||
+         btype == NODE3D_BDRY_TYPE);
+   }
+#endif
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+      patch.getPatchGeometry();
+   const tbox::Array<hier::BoundaryBox> bdry_boxes =
+      pgeom->getCodimensionBoundaries(btype);
+
+   hier::VariableDatabase* vdb = hier::VariableDatabase::getDatabase();
+
+   for (int i = 0; i < bdry_boxes.getSize(); i++) {
+      hier::BoundaryBox bbox = bdry_boxes[i];
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(bbox.getBoundaryType() == btype);
+#endif
+      int bloc = bbox.getLocationIndex();
+
+      int bscalarcase, refbdryloc;
+      if (d_dim == tbox::Dimension(2)) {
+         if (btype == EDGE2D_BDRY_TYPE) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(scalar_bconds.getSize() == NUM_2D_EDGES);
+#endif
+            bscalarcase = scalar_bconds[bloc];
+            refbdryloc = bloc;
+         } else { // btype == NODE2D_BDRY_TYPE
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(scalar_bconds.getSize() == NUM_2D_NODES);
+#endif
+            bscalarcase = scalar_bconds[bloc];
+            refbdryloc = d_node_bdry_edge[bloc];
+         }
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         if (btype == FACE3D_BDRY_TYPE) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(scalar_bconds.getSize() == NUM_3D_FACES);
+#endif
+            bscalarcase = scalar_bconds[bloc];
+            refbdryloc = bloc;
+         } else if (btype == EDGE3D_BDRY_TYPE) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(scalar_bconds.getSize() == NUM_3D_EDGES);
+#endif
+            bscalarcase = scalar_bconds[bloc];
+            refbdryloc = d_edge_bdry_face[bloc];
+         } else { // btype == NODE3D_BDRY_TYPE
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(scalar_bconds.getSize() == NUM_3D_NODES);
+#endif
+            bscalarcase = scalar_bconds[bloc];
+            refbdryloc = d_node_bdry_face[bloc];
+         }
+      }
+
+      int num_bad_values = 0;
+
+      if (d_dim == tbox::Dimension(2)) {
+         num_bad_values =
+            appu::CartesianBoundaryUtilities2::checkBdryData(
+               d_primitive_vars->getName(),
+               patch,
+               vdb->mapVariableAndContextToIndex(d_primitive_vars,
+                  getInteriorWithGhostsContext()),
+               0,
+               ghost_width_to_check,
+               bbox,
+               bscalarcase,
+               d_bdry_edge_val[refbdryloc]);
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         num_bad_values =
+            appu::CartesianBoundaryUtilities3::checkBdryData(
+               d_primitive_vars->getName(),
+               patch,
+               vdb->mapVariableAndContextToIndex(d_primitive_vars,
+                  getInteriorWithGhostsContext()),
+               0,
+               ghost_width_to_check,
+               bbox,
+               bscalarcase,
+               d_bdry_face_val[refbdryloc]);
+      }
+#if (TESTING == 1)
+      if (num_bad_values > 0) {
+         tbox::perr << "\nConvDiff Boundary Test FAILED: \n"
+                    << "     " << num_bad_values
+                    << " bad VAL values found for\n"
+                    << "     boundary type " << btype << " at location "
+                    << bloc << endl;
+      }
+#endif
+
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/ConvDiff.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/ConvDiff/ConvDiff.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,359 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Numerical routines for single patch in Heat equation ex. 
+ *
+ ************************************************************************/
+
+#ifndef included_ConvDiffXD
+#define included_ConvDiffXD
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/MessageStream.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/appu/BoundaryUtilityStrategy.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/algs/MethodOfLinesIntegrator.h"
+#include "SAMRAI/algs/MethodOfLinesPatchStrategy.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Serializable.h"
+#include <string>
+using namespace std;
+#define included_String
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/appu/VisItDataWriter.h"
+
+/**
+ * The ConvDiff class provides numerical routines for a sample problem
+ * which illustrates use of AMR for solution of a system of ODEs.
+ * This class is derived from the algs::MethodOfLinesPatchStrategy
+ * and provides implementations of the virtual functions declared in that
+ * class.  Other member functions are specific to this application.  Most
+ * member functions in ConvDiff provide numerical routines that apply to
+ * individual patches in an AMR hierarchy.
+ *
+ * The convection-diffusion equation is  du/dt + div(a*u) = mu * div^2(u)
+ * + gamma, where "u" is a scalar-valued function and "a", "mu" and "gamma"
+ * are constant vectors.  Time integration of this equation is performed
+ * using the algs::MethodOfLinesIntegrator.  The PDE is cast as a set of ODEs
+ * (i.e. du/dt = F(u) where F(u) = -div(a*u) + mu*div^2(u) + gamma).
+ *
+ * The primary numerical quantities are "u" and "F(u)", defined in the
+ * code as "primitive_vars" and "function_eval", respectively.  All
+ * other variables are temporary quantities used in the numerical routines.
+ */
+
+#define NEQU (1)  // depth of u
+
+using namespace SAMRAI;
+
+class ConvDiff:
+   public tbox::Serializable,
+   public algs::MethodOfLinesPatchStrategy,
+   public appu::BoundaryUtilityStrategy
+{
+public:
+   /**
+    * The constructor for ConvDiff sets default model parameters to
+    * initialize the object. It creates variables that represent
+    * the state of the solution, and initializes pertinent private
+    * data members.  It also registers the object with the
+    * tbox::RestartManager.
+    *
+    * After setting the default values, the routine calls
+    * calls getFromRestart() if this is a restart case.  It next
+    * calls getfromInput() to read values from the input database,
+    * potentially overriding those in the restart file.
+    */
+   ConvDiff(
+      const string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> input_db,
+      tbox::Pointer<geom::CartesianGridGeometry> grid_geom);
+
+   /**
+    * The destructor for ConvDiff.
+    */
+   ~ConvDiff();
+
+   ///
+   ///  The following routines:
+   ///
+   ///      registerModelVariables(),
+   ///      initializeDataOnPatch(),
+   ///      computeStableDtOnPatch(),
+   ///      singleStep,
+   ///      tagGradientDetectorCells(),
+   ///
+   ///  are concrete implementations of functions declared in the
+   ///  algs::MethodOfLinesPatchStrategy abstract base class.
+   ///
+
+   /**
+    * Register the variables with algs::MethodOfLinesIntegrator.  This
+    * registration defines the ways in which data will be manipulated on
+    * patches.  Two variable types are available; SOLN and RHS.  For
+    * instance, in the solution of du/dt = F(u), u is of SOLN type and
+    * F(u) is RHS type.
+    *
+    * @see algs::MethodOfLinesIntegrator.
+    */
+   void
+   registerModelVariables(
+      algs::MethodOfLinesIntegrator* integrator);
+
+   /**
+    * Set the data on the patch interior to some initial values,
+    * depending on the input parameters and numerical routines.
+    * If the "initial_time" flag is false, indicating that the
+    * routine is called after a regridding stepa the routine does nothing.
+    */
+   void
+   initializeDataOnPatch(
+      hier::Patch& patch,
+      const double time,
+      const bool initial_time) const;
+
+   /**
+    * Compute the stable time increment for a patch using a CFL-based
+    * criteria.  Return computed dt.
+    */
+   double
+   computeStableDtOnPatch(
+      hier::Patch& patch,
+      const double time) const;
+
+   /**
+    * Perform a single step of Runge-Kutta routine.  That is, an nth-order
+    * RK scheme will perform n sub-iterations at each timestep to integrate
+    * over time dt.  The singleStep routine performs one of these
+    * sub-iterations.
+    */
+   void
+   singleStep(
+      hier::Patch& patch,
+      const double dt,
+      const double alpha_1,
+      const double alpha_2,
+      const double beta) const;
+
+   /**
+    * Tag cells which need refinement.
+    */
+   void
+   tagGradientDetectorCells(
+      hier::Patch& patch,
+      const double regrid_time,
+      const bool initial_error,
+      const int tag_index,
+      const bool uses_richardson_extrapolation_too);
+
+   ///
+   ///  The following routines:
+   ///
+   ///      setPhysicalBoundaryConditions()
+   ///
+   ///  are concrete implementations of functions declared in the
+   ///  RefinePatchStrategy abstract base class.
+   ///
+
+   /**
+    * Set the data in ghost cells corresponding to the physical domain
+    * boundary.  Specific boundary conditions are determined by information
+    * specified in input file and numerical routines.
+    */
+   void
+   setPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const double fill_time,
+      const hier::IntVector&
+      ghost_width_to_fill);
+
+   /**
+    * Writes state of ConvDiff object to the specified database.
+    *
+    * This routine is a concrete implementation of the function
+    * declared in the tbox::Serializable abstract base class.
+    */
+   void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> db);
+
+   /**
+    * This routine is a concrete implementation of the virtual function
+    * in the base class BoundaryUtilityStrategy.  It reads DIRICHLET
+    * boundary state values from the given database with the
+    * given name string idenifier.  The integer location index
+    * indicates the face (in 3D) or edge (in 2D) to which the boundary
+    * condition applies.
+    */
+   void
+   readDirichletBoundaryDataEntry(
+      tbox::Pointer<tbox::Database> db,
+      string& db_name,
+      int bdry_location_index);
+
+   void
+   readNeumannBoundaryDataEntry(
+      tbox::Pointer<tbox::Database> db,
+      string& db_name,
+      int bdry_location_index);
+
+   /**
+    * Register a VisIt data writer so this class will write
+    * plot files that may be postprocessed with the VisIt
+    * visualization tool.
+    */
+#ifdef HAVE_HDF5
+   void
+   registerVisItDataWriter(
+      tbox::Pointer<appu::VisItDataWriter> viz_writer);
+#endif
+
+   /**
+    * Prints all class data members, if assertion is thrown.
+    */
+   void
+   printClassData(
+      ostream& os) const;
+
+private:
+   /*
+    * These private member functions read data from input and restart.
+    * When beginning a run from a restart file, all data members are read
+    * from the restart file.  If the boolean flag is true when reading
+    * from input, some restart values may be overridden by those in the
+    * input file.
+    *
+    * An assertion results if the database pointer is null.
+    */
+   virtual void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db,
+      bool is_from_restart);
+
+   virtual void
+   getFromRestart();
+
+   void
+   readStateDataEntry(
+      tbox::Pointer<tbox::Database> db,
+      const string& db_name,
+      int array_indx,
+      tbox::Array<double>& uval);
+
+   /*
+    * Private member function to check correctness of boundary data.
+    */
+   void
+   checkBoundaryData(
+      int btype,
+      const hier::Patch& patch,
+      const hier::IntVector& ghost_width_to_fill,
+      const tbox::Array<int>& scalar_bconds) const;
+
+   /*
+    * Object name used for error/warning reporting and as a label
+    * for restart database entries.
+    */
+   string d_object_name;
+
+   /*
+    * Dimension of problem.
+    */
+   tbox::Dimension d_dim;
+
+   /*
+    * tbox::Pointer to the grid geometry object used (Cartesian) to setup
+    * initial data and to set physical boundary conditions.
+    */
+   tbox::Pointer<geom::CartesianGridGeometry> d_grid_geometry;
+
+#ifdef HAVE_HDF5
+   tbox::Pointer<appu::VisItDataWriter> d_visit_writer;
+#endif
+
+   /*
+    * Pointers to variables.  d_primitive_vars - [u]
+    *                         d_function_eval  - [F(u)]
+    */
+   tbox::Pointer<pdat::CellVariable<double> > d_primitive_vars;
+   tbox::Pointer<pdat::CellVariable<double> > d_function_eval;
+
+   /*
+    * Convection-diffusion equation constant vectors
+    */
+   double d_convection_coeff[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   double d_diffusion_coeff;
+   double d_source_coeff;
+
+   /*
+    *  Parameters for numerical method:
+    *
+    *    d_cfl ................ CFL condition for timestepping.
+    *
+    *    d_tolerance .......... Tolerance used for tagging cells - if
+    *                           value[N] > d_tolerance[n] (where N is
+    *                           between 0 and NEQU-1) cell is tagged.
+    *
+    *    d_nghosts ............ number of ghost cells for cell-centered
+    *                           variables
+    *
+    */
+   double d_cfl;
+   double d_tolerance[NEQU];
+   hier::IntVector d_nghosts;
+   hier::IntVector d_zero_ghosts;
+
+   /*
+    * Indicator for problem type and initial conditions
+    */
+   string d_data_problem;
+   int d_data_problem_int;
+
+   /*
+    * Input for SPHERE problem
+    */
+   double d_radius;
+   double d_center[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   double d_val_inside[NEQU];
+   double d_val_outside[NEQU];
+
+   /*
+    * Boundary condition cases and boundary values.
+    * Options are: FLOW, REFLECT, DIRICHLET, NEUMANN
+    * and variants for nodes and edges.
+    *
+    * Input file values are read into these arrays.
+    */
+   tbox::Array<int> d_scalar_bdry_edge_conds;
+   tbox::Array<int> d_scalar_bdry_node_conds;
+   tbox::Array<int> d_scalar_bdry_face_conds; // 3D use only.
+
+   /*
+    * Boundary condition cases for scalar and vector (i.e., depth > 1)
+    * variables.  These are post-processed input values and are passed
+    * to the boundary routines.
+    */
+   tbox::Array<int> d_node_bdry_edge; // 2D use only.
+   tbox::Array<int> d_edge_bdry_face; // 3D use only.
+   tbox::Array<int> d_node_bdry_face; // 3D use only.
+
+   /*
+    * Arrays of face (3d) or edge (2d) boundary values for DIRICHLET case.
+    */
+   tbox::Array<double> d_bdry_edge_val; // 2D use only.
+   tbox::Array<double> d_bdry_face_val; // 3D use only.
+
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/ConvDiffFort.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/ConvDiff/ConvDiffFort.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,111 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   F77 external declarations for SAMRAI Heat Equation example. 
+ *
+ ************************************************************************/
+
+#include <math.h>
+#include <signal.h>
+
+// Function argument list interfaces
+extern "C" {
+
+void F77_FUNC(initsphere2d, INITSPHERE2D) (
+   const double *, const double *, const double *,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &,
+   double *,
+   const double *,
+   const double *,
+   const double *,
+   const double &,
+   const int &);
+
+void F77_FUNC(initsphere3d, INITSPHERE3D) (
+   const double *, const double *, const double *,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   double *,
+   const double *,
+   const double *,
+   const double *,
+   const double &,
+   const int &);
+
+void F77_FUNC(computerhs2d, COMPUTERHS2D) (
+   const int &, const int &, const int &, const int &,
+   const int &, const int &,
+   const double *, // dx
+   const double *, // d_convection_coeff
+   const double &, // d_diffusion_coeff
+   const double &, // d_source_coeff
+   double *,      // prim_var_updated
+   double *,      // function_eval
+   const int &);  // NEQU
+
+void F77_FUNC(computerhs3d, COMPUTERHS3D) (
+   const int &, const int &, const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double *, // dx
+   const double *, // d_convection_coeff
+   const double &, // d_diffusion_coeff
+   const double &, // d_source_coeff
+   double *,      // prim_var_updated
+   double *,      // function_eval
+   const int &);  // NEQU
+
+void F77_FUNC(rkstep2d, RKSTEP2D) (
+   const int &, const int &, const int &, const int &,
+   const int &, const int &,
+   const double &, const double &, const double &, const double &,
+   const double *,
+   const double &,
+   const double &,
+   double *,
+   const double *,
+   const double *,
+   const int &);
+
+void F77_FUNC(rkstep3d, RKSTEP3D) (
+   const int &, const int &, const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double &, const double &, const double &, const double &,
+   const double *,
+   const double &,
+   const double &,
+   double *,
+   const double *,
+   const double *,
+   const int &);
+
+void F77_FUNC(tagcells2d, TAGCELLS2D) (
+   const int &, const int &, const int &, const int &,
+   const int &, const int &,
+   int *,
+   const double *,
+   const int &,
+   const double *,
+   const int &);
+
+void F77_FUNC(tagcells3d, TAGCELLS3D) (
+   const int &, const int &, const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   int *,
+   const double *,
+   const int &,
+   const double *,
+   const int &);
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/MainRestartData.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/ConvDiff/MainRestartData.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,196 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Concrete subclass of tbox 
+ *
+ ************************************************************************/
+
+#include "MainRestartData.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor                                                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+MainRestartData::MainRestartData(
+   const string& object_name,
+   tbox::Pointer<tbox::Database> input_db):
+   d_object_name(object_name)
+{
+   TBOX_ASSERT(!input_db.isNull());
+
+   tbox::RestartManager::getManager()->registerRestartItem(d_object_name, this);
+
+   /*
+    * Initialize object with data read from given input/restart databases.
+    */
+   bool is_from_restart = tbox::RestartManager::getManager()->isFromRestart();
+   if (is_from_restart) {
+      getFromRestart();
+   }
+   getFromInput(input_db, is_from_restart);
+
+   /* if not starting from restart file, set loop_time and iteration_number */
+   if (!is_from_restart) {
+      d_loop_time = d_start_time;
+      d_iteration_number = 0;
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destructor                                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+MainRestartData::~MainRestartData()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Accessor methods for data                                             *
+ *                                                                       *
+ *************************************************************************
+ */
+int MainRestartData::getMaxTimesteps()
+{
+   return d_max_timesteps;
+}
+
+double MainRestartData::getStartTime()
+{
+   return d_start_time;
+}
+
+double MainRestartData::getEndTime()
+{
+   return d_end_time;
+}
+
+int MainRestartData::getRegridStep()
+{
+   return d_regrid_step;
+}
+
+int MainRestartData::getTagBuffer()
+{
+   return d_tag_buffer;
+}
+
+double MainRestartData::getLoopTime()
+{
+   return d_loop_time;
+}
+
+void MainRestartData::setLoopTime(
+   const double loop_time)
+{
+   d_loop_time = loop_time;
+}
+
+int MainRestartData::getIterationNumber()
+{
+   return d_iteration_number;
+}
+
+void MainRestartData::setIterationNumber(
+   const int iter_num)
+{
+   d_iteration_number = iter_num;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * tbox::Database input/output methods                                         *
+ *                                                                       *
+ *************************************************************************
+ */
+void MainRestartData::putToDatabase(
+   tbox::Pointer<tbox::Database> db)
+{
+   TBOX_ASSERT(!db.isNull());
+
+   db->putInteger("d_max_timesteps", d_max_timesteps);
+   db->putDouble("d_start_time", d_start_time);
+   db->putDouble("d_end_time", d_end_time);
+   db->putInteger("d_regrid_step", d_regrid_step);
+   db->putInteger("d_tag_buffer", d_tag_buffer);
+   db->putDouble("d_loop_time", d_loop_time);
+   db->putInteger("d_iteration_number", d_iteration_number);
+}
+
+void MainRestartData::getFromInput(
+   tbox::Pointer<tbox::Database> input_db,
+   bool is_from_restart)
+{
+   TBOX_ASSERT(!input_db.isNull());
+
+   if (input_db->keyExists("max_timesteps")) {
+      d_max_timesteps = input_db->getInteger("max_timesteps");
+   } else {
+      if (!is_from_restart) {
+         TBOX_ERROR("max_timesteps not entered in input file" << endl);
+      }
+   }
+
+   if (input_db->keyExists("start_time")) {
+      d_start_time = input_db->getDouble("start_time");
+   } else {
+      d_start_time = 0.0;
+   }
+
+   if (input_db->keyExists("end_time")) {
+      d_end_time = input_db->getDouble("end_time");
+   } else {
+      d_end_time = 100000.;
+   }
+
+   if (input_db->keyExists("regrid_step")) {
+      d_regrid_step = input_db->getInteger("regrid_step");
+   } else {
+      d_regrid_step = 2;
+   }
+
+   if (input_db->keyExists("tag_buffer")) {
+      d_tag_buffer = input_db->getInteger("tag_buffer");
+   } else {
+      d_tag_buffer = d_regrid_step;
+   }
+}
+
+void MainRestartData::getFromRestart()
+{
+   tbox::Pointer<tbox::Database> root_db =
+      tbox::RestartManager::getManager()->getRootDatabase();
+
+   tbox::Pointer<tbox::Database> restart_db;
+
+   if (root_db->isDatabase(d_object_name)) {
+      restart_db = root_db->getDatabase(d_object_name);
+   } else {
+      TBOX_ERROR("Restart database corresponding to "
+         << d_object_name << " not found in the restart file.");
+   }
+
+   d_max_timesteps = restart_db->getInteger("d_max_timesteps");
+   d_start_time = restart_db->getDouble("d_start_time");
+   d_end_time = restart_db->getDouble("d_end_time");
+   d_regrid_step = restart_db->getInteger("d_regrid_step");
+   d_tag_buffer = restart_db->getInteger("d_tag_buffer");
+   d_loop_time = restart_db->getDouble("d_loop_time");
+   d_iteration_number = restart_db->getInteger("d_iteration_number");
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/MainRestartData.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/ConvDiff/MainRestartData.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,170 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Concrete subclass of tbox 
+ *
+ ************************************************************************/
+
+#ifndef included_MainRestartData
+#define included_MainRestartData
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/DescribedClass.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Serializable.h"
+#ifndef included_String
+#include <string>
+#define included_String
+#endif
+
+using namespace std;
+using namespace SAMRAI;
+
+/**
+ * Class MainRestartData is a concrete subclass of tbox::Serializable that is
+ * used for storing and accessing the data in main that is necessary for
+ * restart.
+ *
+ * The input and restart data for the main program are summarized as follows:
+ *
+ * \verbatim
+ * Input:
+ *    Required keyword assignments: max_timesteps
+ *    Optional keyword assignments: start_time, end_time, regrid_step,
+ *                                  tag_buffer
+ *
+ * A sample input file entry might look like:
+ *
+ *   max_timesteps       = 10
+ *   start_time          = 0.
+ *   end_time            = 10.
+ *   regrid_step         = 2
+ *   tag_buffer          = 2
+ *
+ * Restart:
+ *    Data written: d_max_timesteps, d_start_time, d_end_time, d_regrid_step,
+ *                  d_tag_buffer, d_loop_time, d_iteration_number
+ *    Data read:    d_max_timesteps, d_start_time, d_end_time, d_regrid_step,
+ *                  d_tag_buffer, d_loop_time, d_iteration_number
+ *
+ *    Input overwrites all restart values.
+ * \endverbatim
+ *
+ */
+
+class MainRestartData:public tbox::Serializable
+{
+public:
+   /**
+    * The constructor for the serializable base class does nothing interesting.
+    */
+   MainRestartData(
+      const string& object_name,
+      tbox::Pointer<tbox::Database> input_db);
+
+   /**
+    * The virtual destructor for the serializable base class does nothing
+    * interesting.
+    */
+   virtual ~MainRestartData();
+
+   /**
+    * Returns d_max_timesteps.
+    */
+   virtual int
+   getMaxTimesteps();
+
+   /**
+    * Returns d_start_time.
+    */
+   virtual double
+   getStartTime();
+
+   /**
+    * Returns d_end_time.
+    */
+   virtual double
+   getEndTime();
+
+   /**
+    * Returns d_regrid_step.
+    */
+   virtual int
+   getRegridStep();
+
+   /**
+    * Returns d_tag_buffer.
+    */
+   virtual int
+   getTagBuffer();
+
+   /**
+    * Returns d_loop_time.
+    */
+   virtual double
+   getLoopTime();
+
+   /**
+    * Sets d_loop_time.
+    */
+   virtual void
+   setLoopTime(
+      const double loop_time);
+
+   /**
+    * Returns d_iteration_number.
+    */
+   virtual int
+   getIterationNumber();
+
+   /**
+    * Sets d_iteration_number.
+    */
+   virtual void
+   setIterationNumber(
+      const int iter_num);
+
+   /**
+    * Writes out d_max_timesteps, d_start_time, d_end_time,
+    * d_regrid_step, d_tag_buffer, d_loop_time, d_iteration_number.
+    */
+   virtual void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> db);
+
+private:
+   /**
+    * Reads in max_timesteps, start_time, end_time,
+    * regrid_step, tag_buffer from the specified input database.
+    * Any values from the input database override values found
+    * in the restart database.
+    */
+   virtual void
+   getFromInput(
+      tbox::Pointer<tbox::Database> input_db,
+      bool is_from_restart);
+
+   /**
+    * Reads in d_max_timesteps, d_start_time, d_end_time,
+    * d_regrid_step, d_tag_buffer, d_loop_time, d_iteration_number
+    * from the specified restart database.
+    */
+   virtual void
+   getFromRestart();
+
+   int d_max_timesteps;
+   double d_start_time;
+   double d_end_time;
+   int d_regrid_step;
+   int d_tag_buffer;
+   double d_loop_time;
+   int d_iteration_number;
+
+   string d_object_name;
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/ConvDiff/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,520 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=ConvDiff.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/MethodOfLinesIntegrator.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/MethodOfLinesPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryUtilityStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryDefines.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryUtilities2.h	\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryUtilities3.h	\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h ConvDiff.C	\
+	ConvDiff.h ConvDiffFort.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=MainRestartData.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h MainRestartData.C	\
+	MainRestartData.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=main.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/MethodOfLinesIntegrator.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/MethodOfLinesPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryUtilityStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BergerRigoutsos.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h ConvDiff.h	\
+	MainRestartData.h main.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/ConvDiff/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,121 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for Convection-Diffusion ODE sample application 
+##
+#########################################################################
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/test/applications/ConvDiff
+VPATH         = @srcdir@
+TESTTOOLS     = ../../testtools
+OBJECT        = ../../../..
+
+default: check	
+
+include $(OBJECT)/config/Makefile.config
+
+AUTOTEST      = $(SAMRAI)/source/test/applications
+CPPFLAGS_EXTRA= -I$(AUTOTEST) -DTESTING=1
+
+NUM_TESTS = 2
+
+TEST_NPROCS = @TEST_NPROCS@
+
+CXX_OBJS      = main.o ConvDiff.o MainRestartData.o AutoTester.o
+F77_OBJS      = compute_rhs2d.o init2d.o rkstep2d.o tag_cells2d.o \
+		compute_rhs3d.o init3d.o rkstep3d.o tag_cells3d.o
+
+
+main:	$(CXX_OBJS) $(F77_OBJS) $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) $(F77_OBJS)	\
+	$(LIBSAMRAI3D) $(LIBSAMRAI) $(LDLIBS) -o main
+
+check:
+	$(MAKE) check2d
+	$(MAKE) check3d
+
+check2d:	main
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main test_inputs/test.2d.input;
+
+check3d:	main
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main test_inputs/test.3d.input;
+
+checkcompile: main
+
+checktest:
+	rm -f makecheck.logfile
+	$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+	$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+	rm -f makecheck.logfile
+
+examples2d: main
+	@for i in $(SRCDIR)/example_inputs/*.2d.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+examples3d: main
+	@for i in $(SRCDIR)/example_inputs/*.3d.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+examples:
+	$(MAKE) examples2d
+	$(MAKE) examples3d
+
+clean-check:
+	$(SAMCLEAN)
+
+clean:		clean-check
+	$(RM) *.f main
+
+redo:
+	$(RM) core main*d
+
+include $(SRCDIR)/Makefile.depend
+
+AutoTester.o:	$(AUTOTEST)/AutoTester.C
+	$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(AUTOTEST)/AutoTester.C -o $@
+
+FORTRAN		= $(SRCDIR)/fortran
+M4DIRS		= -DFORTDIR=$(FORTRAN) $(SAMRAI_M4_FLAGS)
+
+compute_rhs2d.o:	$(FORTRAN)/compute_rhs2d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/compute_rhs2d.m4 > compute_rhs2d.f
+	$(F77) $(FFLAGS) -c compute_rhs2d.f -o $@
+
+init2d.o:		$(FORTRAN)/init2d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/init2d.m4 > init2d.f
+	$(F77) $(FFLAGS) -c init2d.f -o $@
+
+tag_cells2d.o:	$(FORTRAN)/tag_cells2d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/tag_cells2d.m4 > tag_cells2d.f
+	$(F77) $(FFLAGS) -c tag_cells2d.f -o $@
+
+rkstep2d.o:	$(FORTRAN)/rkstep2d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/rkstep2d.m4 > rkstep2d.f
+	$(F77) $(FFLAGS) -c rkstep2d.f -o $@
+
+
+compute_rhs3d.o:	$(FORTRAN)/compute_rhs3d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/compute_rhs3d.m4 > compute_rhs3d.f
+	$(F77) $(FFLAGS) -c compute_rhs3d.f -o $@
+
+init3d.o:		$(FORTRAN)/init3d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/init3d.m4 > init3d.f
+	$(F77) $(FFLAGS) -c init3d.f -o $@
+
+tag_cells3d.o:	$(FORTRAN)/tag_cells3d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/tag_cells3d.m4 > tag_cells3d.f
+	$(F77) $(FFLAGS) -c tag_cells3d.f -o $@
+
+rkstep3d.o:	$(FORTRAN)/rkstep3d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/rkstep3d.m4 > rkstep3d.f
+	$(F77) $(FFLAGS) -c rkstep3d.f -o $@
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/ConvDiff/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,457 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   CONVECTION DIFFUSION EQUATION EXAMPLE                         ##
+#########################################################################
+
+This README explains how to run the Convection Diffusion example which uses
+an adaptive Runge-Kutta time integration. The files included in this 
+directory are as follows:  
+
+          main.C         -  application driver program
+          ConvDiff.[C,h] -  C++ class containing routines specific to the 
+                            ConvDiff example and which are called 
+                            from SAMRAI AMR library routines
+          ConvDiffFort.h -  header file defining external fortran routines
+          fortran/2d,3d  -  Fortran numerical routines for 2d,3d problems.
+
+To understand the construction of this application code from pieces 
+specific to the ConvDiff model and more generic pieces in the SAMRAI
+library consider the object construction pattern in the main.C file.
+For more details on these files and the Euler class consult the comments
+in those files and the ConvDiff.h class header file.
+
+COMPILE and RUN
+---------------
+Compile:  make <prog name>   where <prog name> = "main2d" for 2D case
+                                               = "main3d" for 3D case  
+
+Run: 
+
+   main2d <input file>                     ... Serial run   (w/o  MPI)
+   mpirun -np <nprocs> main2d <input file> ... Parallel run (with MPI)
+
+      NOTE: <input file> is the FULL-PATH of the input file
+
+   There are sample input files in the subdirectory sample_input.
+      sphere-2d.input - advecting sphere in a box with fixed boundaries
+      sphere-3d.input - advecting sphere in a cube with fixed boundaries
+      heated-flr-2d.input  - mimics a heated floor, demonstrating diffusion. 
+
+   example:
+      main2d sample_input/sphere-2d.input
+      mpirun -np 2 main2d sample_input/sphere-2d.input
+
+Restarted Run:
+
+      same format as regular run but add <restart dir> <restore num>
+      to end of command.
+         <restart dir> is directory where restart files are stored
+                       (set in input file).
+         <restore num> is the identifier of which restart file to use
+                       (generally the timestep).
+     
+      example:  (to start from timestep #5)
+        
+        main2d sample_input/sphere-2d.input restart_sphere-2d 5
+        mpirun -np 2 main2d sample_input/sphere-2d.input restart_sphere-2d 5
+
+      NOTE:  The ordinary use of our restart functionality requires that
+             a problem can only be restarted on on the same number of
+             processors on which the problem was originally run.  To restart
+             on a different number of processors, used the
+             restart-redistribute tool in SAMRAI/tools/restart.
+
+
+CONSTRUCTION:
+-------------
+
+   The ConvDiff application code is composed of various classes that implement
+   the algorithmic and numerical routines in the AMR solution process (see 
+   comments in the main.C code for more discussion of the various objects 
+   used to build the application).  User-specified inputs control the 
+   behavior of the objects.  Those objects expecting input are:
+
+   Main program .... creates objects used in the simulation - controls output
+                     of viz and restart information.
+
+   MainRestart  .... Stores data used in the main program for restart.
+
+   ConvDiff ........... defines variables and provides numerical kernels for
+                     ConvDiff problem, including data initialization, time
+                     integration, boundary routines, etc.
+
+   CartesianGeometry ..... manages Cartesian grid coordinate system 
+                           on AMR patch hierarchy.
+
+   GriddingAlgorithm ..... constructs AMR patch hierarchy and
+                           regrids levels during simulation.
+
+ 
+   StandardTagAndInitialize .... manages tagging and initialization during
+                                 regridding operation.
+
+   MethodOfLinesIntegrator ... manages time integration using  Runge-Kutta
+                               algorithm on levels in AMR patch hierarchy.
+
+   LoadBalancer .... manages mapping of patches to processors.
+
+
+   The input options for these objects are discussed below.  The TYPE is 
+   shown in (parenthesis) and the DEFAULT setting (value set if no input
+   is given) for the option is shown in [brackets].  Required inputs are 
+   designated by [REQD].
+
+   "Main" input section
+   --------------------
+   Main {
+      // Log file where output is directed  
+      // log_file_name -- (char string) name of log file ["euler.log"]
+      // log_all_nodes -- (bool) option to specify whether output on different
+      //                  processors should be directed to multiple log files
+      //                  (named "log_file_name.<processor id>") or to the 
+      //                  single file. [FALSE]
+      log_file_name    = "sphere-2d.log"
+      log_all_nodes    = TRUE
+
+      // Visualization dump parameters.
+      // viz_dump_interval -- (int) the interval in timesteps over coarsest 
+      //                      level between writing of consecutive 
+      //                      visualization dumps.  Setting it to zero turns off 
+      //                      writing of visualization files.
+      // viz_dump_dirname  -- (char string) directory where viz files are 
+      //                      writen (may include a path).  VisIt requires a
+      //                      non-empty string.  Vizamrai permits an empty string,
+      //                      in which case dumps go to directory where main2d/3d
+      //                      exists. If both data writers are used, directory name
+      //                      must be nonempty, and main.C will append _VisIt,
+      //                       _Vizamrai to dirname.
+      // visit_number_procs_per_file
+      //                   -- (int >= 1) for parallel runs, number of processors 
+      //                      that share a single common dump file. If this parameter
+      //                      > number processors being used, all processors share 
+      //                      single dump file.  Not used by Vizamrai.
+      //
+      //                      For example, the following inputs:
+      viz_writer            = "Vizamrai", "VisIt"
+      viz_dump_interval     = 1
+      viz_dump_dirname      = "viz_sphere-2d"
+      //                       would result in the following dump structure:
+      //                         main2d
+      //                         viz_sphere-2d_VisIt/
+      //                           visit_dump.00000/
+      //                           visit_dump.00001/
+      //                           ...
+      //                           dumps.visit
+
+      // Restart dump parameters.
+      // restart_interval -- (int) the interval in timesteps over coarsest
+      //                      level between writing of consecutive restart
+      //                      files. Setting it to zero turns off writing
+      //                      of restart files.  [0]
+      // restart_write_dirname  -- (char string) directory where restart files 
+      //                           are written [empty string] 
+      //                           (assertion thrown if not specified 
+      //                           and restart_interval > 0)     
+      //
+      restart_interval      = 1
+      restart_write_dirname = "restart_sphere-2d"
+
+      // Run-time plotting arguments (only apply in 2d):
+      //
+      // X-windows plotting specification for each primitive variable.
+      // Options:  NO_PLOTTING, BOXES_ONLY, CONTOURS_ONLY, SHADE_ONLY, 
+      //           CONTOUR_WITH_SHADE, BOTH_CONTOUR_AND_SHADE
+      // (see "euler_const.input" below for discussion of these options).
+      // plotting_interval  -- (int) interval for which values are plotted
+      //                       in X window during run [1]
+      // plot2d_density  -- (above options) specification of plotting for 
+      //                    density [NO_PLOTTING]
+      // plot2d_pressure -- (above options) specification of plotting for 
+      //                    pressure [NO_PLOTTING]
+      // plot2d_velocity -- (above options) specification of plotting for 
+      //                    velocity [NO_PLOTTING]
+      plotting_interval = 5   
+      plot2d_var = SHADE_ONLY
+   }
+
+   "MainRestart" input section
+   --------------------
+   MainRestart {
+      // max_timesteps -- (int) max number of timesteps to be used [REQD]
+      // start_time    -- (double) simulation start time [0.]
+      // end_time      -- (double) simulation stops when end time is reached
+      //                  (or if max timesteps is reached) [100000.]
+      // regrid_step   -- (int) regrid interval [2]
+      // tag_buffer    -- (int) buffer to be placed around tagged regions
+                          [regrid_step]
+   }
+
+   "ConvDiff" input section
+   ---------------------
+   ConvDiff {
+      //  Problem specification parameters
+      //  convection_coeff  -- (double array) convection coefficient in each 
+      //                       direction [0,0]
+      //  diffusion_coeff   -- (double) diffusion coefficient  [0]
+      //  source_coeff      -- (double) source coefficient [0]
+      //  cfl               -- (double) cfl condition to control timestep
+      //                        dt = cfl*dx^2 (dx^3 in 3d) [0.9]      
+      //  cell_tagging_tolerance -- (double) value at which cells are tagged.
+      //                            (i.e. cells tagged if value > tol).
+      //  data_problem      -- (SPHERE) specification of the problem [REQD] 
+      //
+      convection_coeff = 40.0, 20.0
+      diffusion_coeff  = 0.1
+      source_coeff     = 0.0
+      cfl              = 0.5
+      cell_tagging_tol = 20.0
+      data_problem     = SPHERE      
+
+      //  Initial data  for SPHERE problem:
+      //     radius -- (double) radius of sphere [REQD] 
+      //     center -- (double array) location of sphere center [REQD] 
+      //     val_inside   -- (double) value inside sphere [REQD] 
+      //     val_outside  -- (double) value outside sphere [REQD]  
+      Initial_data {
+            radius            = 2.9
+            center            = 5.5 , 5.5
+ 
+            val_inside    = 80.
+            val_outside   = 0.
+      }
+
+
+      //  Boundary conditions  
+      //  Options:  DIRICHLET, NEUMANN
+      // Boundary_data {
+      //   boundary_node_x0y0 -- (above options) lower left corner [DIRICHLET]
+      //   boundary_node_x1y0 -- (above options) lower right corner [DIRICHLET]
+      //   boundary_node_x0y1 -- (above options) upper left corner [DIRICHLET]
+      //   boundary_node_x1y1 -- (above options) upper right corner [DIRICHLET]
+      //   boundary_edge_x0 { -- left edge
+      //   boundary_edge_x1 { -- right edge
+      //   boundary_edge_y0 { -- bottom edge
+      //   boundary_edge_y1 { -- top edge
+      //      boundary_type   -- (above options) type at prescribed 
+      //                         edge [DIRICHLET]
+      //      bdry_val        -- (double) value at prescribed edge [0]
+      //   }
+      //
+      //                       edge_y1
+      //         node_x0y1 o--------------o node_x1y1
+      //                   |              |
+      //                   |              |
+      //          edge_x0  |              | edge_x1
+      //                   |              |
+      //                   |              |
+      //         node_x0y0 o--------------o node_x1y0
+      //                       edge_y0
+      //
+      //  NOTE: 3D case specifies data at faces as well.  See
+      //        /SAMRAI/docs/userdocs/boundaries.ps for further discussion.
+      Boundary_data {
+         boundary_node_x0y0 = DIRICHLET
+         boundary_node_x1y0 = DIRICHLET
+         boundary_node_x0y1 = DIRICHLET
+         boundary_node_x1y1 = DIRICHLET
+         boundary_edge_x0 {
+           boundary_type      = DIRICHLET
+         }
+         boundary_edge_x1 {
+            boundary_type      = DIRICHLET
+         }
+         boundary_edge_y0 {
+            boundary_type      = DIRICHLET
+         }
+         boundary_edge_y1 {
+            boundary_type      = DIRICHLET
+         }
+      }
+
+   }
+
+   "CartesianGeometry" input section
+   ---------------------------------
+   CartesianGeometry {
+      //  Specify lower/upper corners of the computational domain and a
+      //  set of non-overlapping boxes defining domain interior.  If union 
+      //  of boxes is not a parallelpiped, lower/upper corner data corresponds 
+      //  to min/max corner indices over all boxes given.
+      //  x_lo  -- (double array) lower corner of computational domain [REQD]
+      //  x_up  -- (double array) upper corner of computational domain [REQD]
+      //  domain_boxes  -- (box array) set of boxes that define interior of 
+      //                   hysical domain. [REQD]
+      //  periodic_dimension -- (int array) coordinate directions in which 
+      //                        domain is periodic.  Zero indicates not
+      //                        periodic, non-zero value indicates periodicity.
+      //                        [0]
+      x_lo = 0.e0 , 0.e0           
+      x_up = 65.e0 , 55.e0       
+      domain_boxes      = [(0,0),(59,39)]
+      periodic_dimension = 0, 1  // periodic in y only
+   }
+
+
+   "GriddingAlgorithm" input section
+   ---------------------------------
+   GriddingAlgorithm {
+      // Information used to create patches in AMR hierarchy.
+      // max_levels -- (int) max number of mesh levels in hierarchy [REQD]
+      // 
+      // For most of the following parameters, the number of precribed data
+      // values need not match the number of levels in the hierarchy 
+      // (determined by max_levels).  If more values are given than number 
+      // of levels, extraneous values will be ignored.  If less are give, then
+      // values that correspond to individual levels will apply to those 
+      // levels.  Missing values will be taken from those for the finest
+      // level specified.
+      //
+      // ratio_to_coarser {
+      //   level_1 -- (int array) ratio between index spaces on 
+      //              level 1 to level 0 [REQD]
+      //   level_2 -- (int array)  ratio between index spaces on 
+      //              level 2 to level 1 [REQD]
+      //   etc....
+      // }
+      // largest_patch_size {
+      //   level_0 -- (int array) largest patch allowed on level 0. 
+      //              [REQD]    
+      //   level_1 -- (int array)    "       "      "   "  level 1 
+      //              [level 0 entry]
+      //   etc....                       
+      // }
+      // smallest_patch_size {
+      //   level_0 -- (int array) smallest patch allowed on level 0. 
+      //              [max ghost width for all variables]    
+      //   level_1 -- (int array)    "       "      "   "  level 1 
+      //              [level 0 entry]
+      //   etc....                       
+      // }
+      max_levels = 3
+      ratio_to_coarser {
+         level_1 = 4 , 4
+         level_2 = 4 , 4
+         level_3 = 4 , 4
+      }
+      largest_patch_size {
+         level_0 = 48 , 48
+      }
+      smallest_patch_size {
+         level_0 = 8 , 8
+      }
+
+      // Tolerances for gridding efficiency and box chopping operations.
+      // efficiency_tolerance -- (double array) minimum percentage of tagged 
+      //                         cells allowed in a box [0.8 for each level]
+      // combine_efficiency   -- (double array) threshold specifying when a  
+      //                         box may be chopped into two smaller boxes.
+      //                         If sum of the volumes of smaller boxes is > 
+      //                         combine efficiency * volume of larger box, 
+      //                         then larger box will not be chopped.
+      //                         [0.8 for each level]
+      // proper_nesting_buffer -- (int array) number of coarse cells by which
+      //                          the next finer level is nested within its
+      //                          interior. [1 for each level]
+      efficiency_tolerance    = 0.85e0
+      combine_efficiency      = 0.95e0
+      proper_nesting_buffer   = 1
+
+      // Option to read or write gridding information
+      // write_regrid_boxes    -- (bool) Output sequence of refine boxes to file
+      // read_regrid_boxes     -- (bool) Read sequence of refine boxes from file
+      // regrid_boxes_filename -- (string) file name used for reading or writing
+      //                          boxes.
+      //
+      // Reading and writing options require some user intervention to assure
+      // they work properly.  Please consult Andy Wissink (awissink at llnl.gov)
+      // if you are interested in using these options.
+      write_regrid_boxes    = TRUE
+      regrid_boxes_filename = TRUE
+   }
+
+   "StandardTagAndInitialize" input section
+   ---------------------------------------------
+   StandardTagAndInitialize {
+      // Specification of the type of tagging to be performed
+      // tagging_method -- (string array) one or more entries specifying
+      //                 the tagging algorithm used.  Options include:
+      //                 "GRADIENT_DETECTOR"
+      //                 "RICHARDSON_EXTRAPOLATION"
+      //                 "REFINE_BOXES"
+      //
+      // REFINE_BOXES allows you to prescribe where refinement should occur.
+      // If this option is used, you must also supply a RefineBoxes database
+      // entry with the refine boxes on different levels specified.  i.e.
+      //    RefineBoxes{
+      //        level_0 -- (BoxArray) Boxes to be refined on level 0
+      //        level_1 -- (BoxArray) Boxes to be refined on level 1
+      //        etc.
+      //
+      // Gradient detection option.
+      tagging_method = "GRADIENT_DETECTOR"
+      //
+      // Richarson extrapolation option.
+      tagging_method = "RICHARDSON_EXTRAPOLATION"
+      //
+      // Static refine boxes option.
+      tagging_method = "REFINE_BOXES"
+      RefineBoxes {
+        level0_boxes = [(15,0),(29,14)]
+        level1_boxes = [(65,10),(114,40)]
+      }
+      // Combination.
+      tagging_method = "RICHARDSON_EXTRAPOLATION", "GRADIENT_DETECTOR"
+   }
+
+   "MethodOfLinesIntegrator" input section
+   -----------------------------------------
+   MethodOfLinesIntegrator{
+      //  order    -- (int) order of the Runge-Kutta scheme (which will be 
+      //              the number of sub-iterations at each timestep.
+      //  alpha    -- (double array) sequence of alphas applied at each 
+      //              sub-iteration.  The number of entries in the array
+      //              should be the same as the order. 
+      order    = 2
+      alpha    = 0.5 , 1.0
+   }
+
+   "LoadBalancer" input section
+   ----------------------------------
+   LoadBalancer {
+      // using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+   }
+
+
+"euler_const.input"
+-------------------
+   // This file specifies some constants used within the ConvDiff code.  These
+   // names and values map to those specified via "#define" statements in 
+   // ConvDiff.C
+
+   // 2D X Window plotting options
+   // Plotting will execute while the program is running for 2D cases. 
+   // Note that since it pipes data to an X-window, it slows the 
+   // performance of the code somewhat, but it sure is PRETTY!
+   NO_PLOTTING            = 0  // no plotting
+   BOXES_ONLY             = 1  // plot bounding boxes only
+   CONTOURS_ONLY          = 2  // plot contours only
+   SHADE_ONLY             = 3  // plot color shade only
+   CONTOUR_WITH_SHADE     = 4  // plot contours and color shade in same window
+   BOTH_CONTOUR_AND_SHADE = 5  // plot contours and color shade in separate 
+                               // window
+
+ 
+   //
+   // Data problem (only one at this point - more could be added)
+   // SPHERE : sphere problem
+   SPHERE         = 40
+
+   // Boundary types
+   // DIRICHLET 
+   // NEUMANN 
+   DIRICHLET      = 1
+   NEUMANN        = 2
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/example_inputs/heated_floor.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/ConvDiff/example_inputs/heated_floor.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,141 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Heated floor input for SAMRAI ConvDiff example problem 
+ *
+ ************************************************************************/
+ConvDiff {
+   convection_coeff  = 0.0, 0.0  // vector [NDIM]
+   diffusion_coeff   = 0.5       // scalar
+   source_coeff      = 0.0       // scalar
+
+   cfl               = 0.5
+   cell_tagging_tolerance = 11.0  // vector [NEQU] 
+
+   data_problem      = "SPHERE"
+
+   Initial_data {
+      radius            = 2.9   
+      center            = 15.0, 10.0    // vector [NDIM]
+
+      val_inside     = 100.0          // vector [NEQU]
+      val_outside    = 10.            // vector [NEQU]
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   // and "NEUMANN"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "DIRICHLET"
+         val                     = 10. 
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 10. 
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "DIRICHLET"
+         val                     = 100. 
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 10. 
+      }
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "YDIRICHLET"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "YDIRICHLET"
+      }
+   }
+
+}
+
+Main {
+   dim = 2
+   base_name = "heated_floor.2d"
+// log file parameters 
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_htdflr2d"
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters
+   restart_interval       = 0         // zero to turn off
+}
+
+MainRestartData{
+   max_timesteps       = 20 
+   start_time          = 0.
+   end_time            = 100.
+   regrid_step         = 3
+   tag_buffer          = 2
+}
+
+
+CartesianGeometry{
+   domain_boxes	= [(0,0),(59,39)]
+   x_lo = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up = 30.e0 , 20.e0   // upper end of computational domain.
+//   periodic_dimension = 1, 0
+}
+
+PatchHierarchy {
+   max_levels = 3         // Maximum number of levels in hierarchy.
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 4 , 4
+      level_2 = 4 , 4
+      level_3 = 4 , 4
+   }
+
+   largest_patch_size {
+      level_0 = 48 , 48
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 8 , 8 
+      // all finer levels will use same values as level_0...
+   }
+                                      // boxes < efficiency * vol of large box
+}
+
+GriddingAlgorithm{
+
+   efficiency_tolerance    = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.85e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+MethodOfLinesIntegrator{
+   order              = 2
+   alpha              = 0.5 , 1.0
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/example_inputs/sphere.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/ConvDiff/example_inputs/sphere.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,139 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Advecting sphere input for SAMRAI ConvDiff example problem 
+ *
+ ************************************************************************/
+ConvDiff {
+   convection_coeff  = 40.0, 20.0  // vector [NDIM]
+   diffusion_coeff   = 0.1       // scalar
+   source_coeff      = 0.0       // scalar
+
+   cfl               = 0.5
+   cell_tagging_tolerance = 20.0  // vector [NEQU] 
+
+   data_problem      = "SPHERE"
+
+   Initial_data {
+      radius            = 2.9   
+      center            = 5.5, 5.5    // vector [NDIM]
+
+      val_inside     = 80.0          // vector [NEQU]
+      val_outside    = 10.            // vector [NEQU]
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET", 
+   // and "NEUMANN"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "FLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "XFLOW"
+      }
+   }
+}
+
+Main {
+   dim = 2
+   base_name = "sphere.2d"
+// log file parameters 
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_sphere2d"
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters
+   restart_interval       = 0         // zero to turn off
+
+   plotting_interval = 5   
+}
+
+MainRestartData{
+   max_timesteps       = 50 
+   start_time          = 0.
+   end_time            = 100.
+   regrid_step         = 3
+   tag_buffer          = 2
+}
+
+
+CartesianGeometry{
+   domain_boxes	= [(0,0),(59,39)]
+   x_lo = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up = 30.e0 , 20.e0   // upper end of computational domain.
+//   periodic_dimension = 1, 0
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+   max_levels = 3         // Maximum number of levels in hierarchy.
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 4 , 4
+      level_2 = 4 , 4
+      level_3 = 4 , 4
+   }
+
+   largest_patch_size {
+      level_0 = 48 , 48
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 8 , 8 
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm{
+
+   efficiency_tolerance    = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.85e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+MethodOfLinesIntegrator{
+   order              = 2
+   alpha              = 0.5 , 1.0
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/example_inputs/sphere.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/ConvDiff/example_inputs/sphere.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,216 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Advecting sphere input for SAMRAI ConvDiff example problem 
+ *
+ ************************************************************************/
+ConvDiff {
+   convection_coeff =  4.0e0 , 2.0e0 , 2.0e0 // vector [NDIM]
+   diffusion_coeff   = 0.5       // scalar
+   source_coeff      = 0.0       // scalar
+
+   cfl               = 0.5
+   cell_tagging_tolerance = 20.0  // vector [NEQU]
+
+   data_problem      = "SPHERE"
+
+   Initial_data {
+      radius            = 2.9
+      center            = 5.5, 5.5, 5.5    // vector [NDIM]
+
+      val_inside     = 80.0           // vector [NEQU]
+      val_outside    = 10.            // vector [NEQU]
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   // and "NEUMANN"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "DIRICHLET"
+         val                     = 10. 
+      }
+      boundary_face_xhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 10. 
+      }
+      boundary_face_ylo {
+         boundary_condition      = "DIRICHLET"
+         val                     = 10. 
+      }
+      boundary_face_yhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 10. 
+      }
+      boundary_face_zlo {
+         boundary_condition      = "DIRICHLET"
+         val                     = 100. 
+      }
+      boundary_face_zhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 10. 
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for an edge, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent face has either a FLOW
+      //            or REFLECT condition, the resulting edge boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YDIRICHLET"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YDIRICHLET"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YDIRICHLET"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YDIRICHLET"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent faces have either FLOW
+      //            or REFLECT conditions, the resulting node boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XDIRICHLET"
+      }
+
+   }
+
+}
+
+Main {
+   dim = 3
+   base_name = "sphere.3d"
+// log file parameters 
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_sphere3d"
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters
+   restart_interval       = 0         // zero to turn off
+
+}
+
+MainRestartData{
+   max_timesteps       = 10
+   start_time          = 0.
+   end_time            = 100.
+   regrid_step         = 3
+   tag_buffer          = 2
+}
+
+CartesianGeometry{
+   domain_boxes	= [ (0,0,0) , (14,9,9) ]
+
+   x_lo = 0.e0 , 0.e0 , 0.e0    // lower end of computational domain.
+   x_up = 30.e0 , 20.e0 , 20.e0 // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3         // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 2 , 2 , 2
+      level_2 = 2 , 2 , 2
+      level_3 = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 40 , 40 , 40
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 9 , 9 , 9 
+      // all finer levels will use same values as level_0...
+   }
+                                      // boxes < efficiency * vol of large box
+}
+
+GriddingAlgorithm{
+
+   efficiency_tolerance    = 0.85e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.95e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+MethodOfLinesIntegrator{
+   order              = 2
+   alpha              = 0.5 , 1.0
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/fortran/compute_rhs2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/ConvDiff/fortran/compute_rhs2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,93 @@
+define(NDIM,2)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+      subroutine computerhs2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  gcw0,gcw1,
+     &  dx,
+     &  conv_coeff,
+     &  diff_coeff,
+     &  src_coeff,
+     &  var,
+     &  rhs,
+     &  nequ)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer gcw0,gcw1
+      integer nequ
+
+      REAL    dx(0:NDIM-1)
+      REAL    conv_coeff(0:NDIM-1)
+      REAL    diff_coeff, src_coeff
+c
+c variables in 2d cell indexed
+      REAL
+     &     var(CELL2dVECG(ifirst,ilast,gcw),0:nequ-1),
+     &     rhs(CELL2d(ifirst,ilast,0),0:nequ-1)
+c
+c***********************************************************************
+c***********************************************************************     
+c
+      integer ic0,ic1,ineq
+      REAL conv_term_x, conv_term_y, conv_term
+      REAL diff_term_x, diff_term_y, diff_term
+c
+c Compute the RHS for the convection-diffusion equation: 
+c    du/dt + div(a*u) = mu div^2(u) + gamma
+c
+c Compute as:
+c    du/dt = RHS = -div(a*u) + mu div^2(u) + gamma
+c
+      do ic1=ifirst1,ilast1
+         do ic0=ifirst0,ilast0
+            do ineq=0,nequ-1
+
+c
+c  2nd order accurate difference for convective terms (div(au))
+c
+               conv_term_x = 
+     &            ( var(ic0+1,ic1,ineq) - var(ic0-1,ic1,ineq) ) / 
+     &            ( 2.*dx(0) )
+
+               conv_term_y = 
+     &            ( var(ic0,ic1+1,ineq) - var(ic0,ic1-1,ineq) ) /  
+     &            ( 2.*dx(1) )
+
+               conv_term = conv_coeff(0)*conv_term_x
+     &                   + conv_coeff(1)*conv_term_y
+
+c
+c  2nd order accurate difference for diffusive terms (div^2(u))
+c
+               diff_term_x = ( var(ic0+1,ic1,ineq) 
+     &                     - 2*var(ic0,ic1,ineq) 
+     &                     +   var(ic0-1,ic1,ineq) )
+     &                     / dx(0)**2
+
+               diff_term_y = ( var(ic0,ic1+1,ineq) 
+     &                     - 2*var(ic0,ic1,ineq) 
+     &                     +   var(ic0,ic1-1,ineq) )
+     &                     / dx(1)**2
+
+               diff_term   =  diff_coeff*
+     &                       (diff_term_x + diff_term_y)
+
+c
+c  function evaluation (RHS) 
+c
+               rhs(ic0,ic1,ineq) = -1.*(conv_term) 
+     &            + diff_term 
+     &            + src_coeff
+ 
+            end do
+         end do
+      end do
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/fortran/compute_rhs3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/ConvDiff/fortran/compute_rhs3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,104 @@
+define(NDIM,3)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine computerhs3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  gcw0,gcw1,gcw2,
+     &  dx,
+     &  conv_coeff,
+     &  diff_coeff,
+     &  src_coeff,
+     &  var,
+     &  rhs,
+     &  nequ)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer gcw0,gcw1,gcw2
+      integer nequ
+
+      REAL dx(0:NDIM-1)
+      REAL conv_coeff(0:NDIM-1)
+      REAL diff_coeff, src_coeff
+c
+c variables in 3d cell indexed         
+      REAL
+     &     var(CELL3dVECG(ifirst,ilast,gcw),0:nequ-1),
+     &     rhs(CELL3d(ifirst,ilast,0),0:nequ-1)
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2,ineq
+      REAL conv_term_x, conv_term_y, conv_term_z, conv_term
+      REAL diff_term_x, diff_term_y, diff_term_z, diff_term
+c
+c Compute the RHS for the convection-diffusion equation:
+c    du/dt + div(a*u) = mu div^2(u) + gamma
+c
+c Compute as:
+c    du/dt = RHS = -div(a*u) + mu div^2(u) + gamma
+c
+      do ic2=ifirst2,ilast2
+        do ic1=ifirst1,ilast1
+          do ic0=ifirst0,ilast0
+            do ineq=0,nequ-1
+
+c
+c  2nd order accurate difference for convective terms (div(au))
+c
+             conv_term_x =
+     &         ( var(ic0+1,ic1,ic2,ineq) - var(ic0-1,ic1,ic2,ineq) ) /
+     &         ( 2.*dx(0) )
+
+             conv_term_y =
+     &         ( var(ic0,ic1+1,ic2,ineq) - var(ic0,ic1-1,ic2,ineq) ) /
+     &         ( 2.*dx(1) )
+
+             conv_term_z =
+     &         ( var(ic0,ic1,ic2+1,ineq) - var(ic0,ic1,ic2-1,ineq) ) /
+     &         ( 2.*dx(2) )
+
+             conv_term = conv_coeff(0)*conv_term_x
+     &                   + conv_coeff(1)*conv_term_y
+     &                   + conv_coeff(2)*conv_term_z
+
+c
+c  2nd order accurate difference for diffusive terms (div^2(u))
+c
+             diff_term_x = (   var(ic0+1,ic1,ic2,ineq)
+     &                     - 2*var(ic0,ic1,ic2,ineq)
+     &                     +   var(ic0-1,ic1,ic2,ineq) )
+     &                     / dx(0)**2
+
+             diff_term_y = (   var(ic0,ic1+1,ic2,ineq)
+     &                     - 2*var(ic0,ic1,ic2,ineq)
+     &                     +   var(ic0,ic1-1,ic2,ineq) )
+     &                     / dx(1)**2
+
+             diff_term_z = (   var(ic0,ic1,ic2+1,ineq)
+     &                     - 2*var(ic0,ic1,ic2,ineq)
+     &                     +   var(ic0,ic1,ic2-1,ineq) )
+     &                     / dx(2)**2
+
+             diff_term   =  diff_coeff*
+     &                       (diff_term_x + diff_term_y + diff_term_z)
+
+c
+c  function evaluation (RHS) 
+c
+             rhs(ic0,ic1,ic2,ineq) = -1.*(conv_term) 
+     &          + diff_term 
+     &          + src_coeff
+
+            end do
+          end do
+        end do
+      end do
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/fortran/const.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/ConvDiff/fortran/const.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,18 @@
+      REAL zero,tenth,sixth,fourth,third,half,twothird,
+     &  rt75,one,onept5,two,three,pi,four,seven,smallr
+      parameter (zero=0.d0)
+      parameter (tenth=0.1d0)
+      parameter (sixth=0.16666666666667d0)
+      parameter (fourth=.25d0)
+      parameter (third=.333333333333333d0)
+      parameter (half=.5d0)
+      parameter (twothird=.66666666666667d0)
+      parameter (rt75=.8660254037844d0)
+      parameter (one=1.d0)
+      parameter (onept5=1.5d0)
+      parameter (two=2.d0)
+      parameter (three=3.d0)
+      parameter(pi=3.14159265358979323846d0)
+      parameter (four=4.d0)
+      parameter (seven=7.d0)
+      parameter (smallr=1.0d-10)
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/fortran/init2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/ConvDiff/fortran/init2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,54 @@
+define(NDIM,2)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+      subroutine initsphere2d(dx,xlo,xhi,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  gcw0,gcw1,
+     &  var,
+     &  i_var,o_var,
+     &  center, radius,
+     &  nequ)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+c***********************************************************************     
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer gcw0,gcw1
+      integer nequ
+      REAL i_var(0:nequ-1),o_var(0:nequ-1)
+      REAL radius,center(0:NDIM-1)
+      REAL
+     &     dx(0:NDIM-1),xlo(0:NDIM-1),xhi(0:NDIM-1)
+c
+c variables in 2d cell indexed         
+      REAL
+     &     var(CELL2dVECG(ifirst,ilast,gcw),0:nequ-1)
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ineq
+      REAL xc(0:NDIM-1),x0,x1
+
+      do ic1=ifirst1,ilast1
+        xc(1) = xlo(1)+dx(1)*(dble(ic1-ifirst1)+half)
+        x1 = xc(1)-center(1)
+        do ic0=ifirst0,ilast0
+           xc(0) = xlo(0)+dx(0)*(dble(ic0-ifirst0)+half)
+           x0 = xc(0)-center(0)
+
+           do ineq=0, nequ-1
+              if ((x0**2+x1**2).lt.radius**2) then
+                 var(ic0,ic1,ineq) = i_var(ineq)
+              else
+                 var(ic0,ic1,ineq) = o_var(ineq)
+              endif
+           enddo
+
+         enddo
+      enddo
+c
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/fortran/init3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/ConvDiff/fortran/init3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,62 @@
+define(NDIM,3)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine initsphere3d(dx,xlo,xhi,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  gcw0,gcw1,gcw2,
+     &  var,
+     &  i_var,o_var,
+     &  center, radius,
+     &  nequ)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+c***********************************************************************     
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer gcw0,gcw1,gcw2
+      integer nequ
+      REAL i_var(0:nequ-1),o_var(0:nequ-1)
+      REAL radius,center(0:NDIM-1)
+      REAL
+     &     dx(0:NDIM-1),xlo(0:NDIM-1),xhi(0:NDIM-1)
+c
+c variables in 3d cell indexed         
+      REAL
+     &     var(CELL3dVECG(ifirst,ilast,gcw),0:nequ-1)
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2,ineq
+      REAL xc(0:NDIM-1),x0,x1,x2
+
+      do ic2=ifirst2,ilast2
+        xc(2) = xlo(2)+dx(2)*(dble(ic2-ifirst2)+half)
+        x2 = xc(2) - center(2)
+
+        do ic1=ifirst1,ilast1
+          xc(1) = xlo(1)+dx(1)*(dble(ic1-ifirst1)+half)
+          x1 = xc(1)-center(1)
+
+          do ic0=ifirst0,ilast0
+            xc(0) = xlo(0)+dx(0)*(dble(ic0-ifirst0)+half)
+            x0 = xc(0)-center(0)
+
+            do ineq=0, nequ-1
+              if ((x0**2+x1**2+x2**2).lt.radius**2) then
+                 var(ic0,ic1,ic2,ineq) = i_var(ineq)
+              else
+                 var(ic0,ic1,ic2,ineq) = o_var(ineq)
+              endif
+            enddo
+
+          enddo
+
+        enddo
+
+      enddo
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/fortran/rkstep2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/ConvDiff/fortran/rkstep2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,53 @@
+define(NDIM,2)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+      subroutine rkstep2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  gcw0,gcw1,
+     &  dt, alpha_1, alpha_2, beta,
+     &  conv_coeff,
+     &  diff_coeff,
+     &  src_coeff,
+     &  soln_updated,
+     &  soln_fixed,
+     &  rhs,
+     &  nequ)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer gcw0,gcw1
+      integer nequ
+
+      REAL    dt, alpha_1, alpha_2, beta  
+      REAL    conv_coeff(0:NDIM-1)
+      REAL    diff_coeff, src_coeff
+c
+c variables in 2d cell indexed
+      REAL
+     &     soln_updated(CELL2dVECG(ifirst,ilast,gcw),0:nequ-1),
+     &     soln_fixed(CELL2d(ifirst,ilast,0),0:nequ-1),
+     &     rhs(CELL2d(ifirst,ilast,0),0:nequ-1)
+c
+c***********************************************************************
+c***********************************************************************
+c
+      integer ic0,ic1,ineq
+c
+      do ic1=ifirst1,ilast1
+         do ic0=ifirst0,ilast0
+            do ineq=0,nequ-1
+               soln_updated(ic0,ic1,ineq) = 
+     &            alpha_1*soln_fixed(ic0,ic1,ineq) + 
+     &            alpha_2*soln_updated(ic0,ic1,ineq) +
+     &            beta*dt*rhs(ic0,ic1,ineq)
+            end do
+         end do
+      end do
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/fortran/rkstep3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/ConvDiff/fortran/rkstep3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,53 @@
+define(NDIM,3)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine rkstep3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  gcw0,gcw1,gcw2,
+     &  dt, alpha_1, alpha_2, beta,
+     &  conv_coeff,
+     &  diff_coeff,
+     &  src_coeff,
+     &  soln_updated,
+     &  soln_fixed,
+     &  rhs,
+     &  nequ)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer gcw0,gcw1,gcw2
+      integer nequ
+
+      REAL dt, alpha_1, alpha_2, beta
+      REAL conv_coeff(0:NDIM-1)
+      REAL diff_coeff, src_coeff
+
+c
+c variables in 2d cell indexed         
+      REAL
+     &     soln_updated(CELL3dVECG(ifirst,ilast,gcw),0:nequ-1),
+     &     soln_fixed(CELL3d(ifirst,ilast,0),0:nequ-1),
+     &     rhs(CELL3d(ifirst,ilast,0),0:nequ-1)
+c
+c*********************************************************************** 
+      integer ic0,ic1,ic2,ineq
+c
+      do ic2=ifirst2,ilast2
+        do ic1=ifirst1,ilast1
+          do ic0=ifirst0,ilast0
+            do ineq=0,nequ-1
+              soln_updated(ic0,ic1,ic2,ineq) = 
+     &             alpha_1*soln_fixed(ic0,ic1,ic2,ineq) +
+     &             alpha_2*soln_updated(ic0,ic1,ic2,ineq) +
+     &             beta*dt*rhs(ic0,ic1,ic2,ineq)
+            end do
+          end do
+        end do
+      end do
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/fortran/tag_cells2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/ConvDiff/fortran/tag_cells2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,67 @@
+define(NDIM,2)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+      subroutine tagcells2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  gcw0,gcw1,
+     &  tags,
+     &  var,
+     &  refine_tag_val,
+     &  tolerance,
+     &  nequ)
+c***********************************************************************
+c***********************************************************************     
+      implicit none
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer gcw0,gcw1
+      integer refine_tag_val
+      integer nequ
+      REAL    tolerance(0:nequ-1)
+c
+c variables in 2d cell indexed         
+      integer 
+     &     tags(CELL2d(ifirst,ilast,0))
+      REAL
+     &     var(CELL2dVECG(ifirst,ilast,gcw),0:nequ-1)
+c
+      integer ic0,ic1,ineq
+c
+c***********************************************************************     
+
+c//// Constant value - tag wherever var > tol //////
+       do ic1=ifirst1,ilast1
+          do ic0=ifirst0,ilast0
+             do ineq=0,nequ-1
+                tags(ic0,ic1) = 0
+                if (var(ic0,ic1,ineq) .gt. tolerance(ineq)) 
+     &            tags(ic0,ic1) = refine_tag_val
+             end do
+          end do
+       end do
+
+c//// Gradient, double sided  - tag wherever grad > tol //////
+c      do ic1=ifirst1,ilast1
+c         do ic0=ifirst0,ilast0
+c            do ineq=0,nequ-1
+c               tags(ic0,ic1) = 0
+c               gradxp = abs(var(ic0+1,ic1,ineq) - var(ic0,ic1,ineq))
+c               gradxm = abs(var(ic0,ic1,ineq)   - var(ic0-1,ic1,ineq))
+c               gradyp = abs(var(ic0,ic1+1,ineq) - var(ic0,ic1,ineq))
+c               gradym = abs(var(ic0,ic1,ineq)   - var(ic0,ic1-1,ineq))
+c               if (gradxp .gt. tolerance(ineq))
+c     &            tags(ic0,ic1) = refine_tag_val
+c               if (gradxm .gt. tolerance(ineq))
+c     &            tags(ic0,ic1) = refine_tag_val
+c               if (gradyp .gt. tolerance(ineq))
+c     &            tags(ic0,ic1) = refine_tag_val
+c               if (gradym .gt. tolerance(ineq))
+c     &            tags(ic0,ic1) = refine_tag_val
+c            end do
+c        end do
+c      end do
+
+      return
+      end
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/fortran/tag_cells3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/ConvDiff/fortran/tag_cells3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,45 @@
+define(NDIM,3)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine tagcells3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  gcw0,gcw1,gcw2,
+     &  tags,
+     &  var, 
+     &  refine_tag_val,
+     &  tolerance,
+     &  nequ)
+c***********************************************************************
+c***********************************************************************     
+      implicit none
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer gcw0,gcw1,gcw2
+      integer refine_tag_val
+      integer nequ
+      REAL    tolerance(0:nequ-1)
+c
+c variables in 3d cell indexed         
+      integer 
+     &     tags(CELL3d(ifirst,ilast,0))
+      REAL
+     &     var(CELL3dVECG(ifirst,ilast,gcw),0:nequ-1)
+c
+      integer ic0,ic1,ic2,ineq
+c
+c***********************************************************************     
+      do ic2=ifirst2,ilast2
+        do ic1=ifirst1,ilast1
+          do ic0=ifirst0,ilast0
+            do ineq=0,nequ-1
+              tags(ic0,ic1,ic2) = 0
+              if (var(ic0,ic1,ic2,ineq) .gt. tolerance(ineq)) 
+     &            tags(ic0,ic1,ic2) = refine_tag_val
+            end do
+          end do
+        end do
+      end do
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/main.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/ConvDiff/main.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,626 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program for SAMRAI convection-diffusion ex. problem. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string>
+#include <fstream>
+using namespace std;
+
+#ifndef _MSC_VER
+#include <unistd.h>
+#endif
+
+#include <sys/stat.h>
+
+// Headers for basic SAMRAI objects
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/mesh/BergerRigoutsos.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/mesh/TreeLoadBalancer.h"
+#include "SAMRAI/tbox/InputDatabase.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "MainRestartData.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+// Headers for major algorithm/data structure objects
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/mesh/StandardTagAndInitialize.h"
+#include "SAMRAI/algs/MethodOfLinesIntegrator.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+
+// Header for application-specific algorithm/data structure object
+#include "ConvDiff.h"
+
+// Classes for autotesting.
+#if (TESTING == 1)
+#include "AutoTester.h"
+#endif
+
+using namespace SAMRAI;
+using namespace algs;
+
+/************************************************************************
+ *                                                                      *
+ * This is the main program for an AMR application of the method        *
+ * of lines algorithm.  Specifically, it uses a Runge-Kutta method      *
+ * to integrate the convection-diffusion in time with spatial           *
+ * refinement.  The timestep loop in this file controls gridding        *
+ * operations.                                                          *
+ *                                                                      *
+ * The gridding objects used in this application are as follows:        *
+ *                                                                      *
+ *    hier::PatchHierarchy - A container for the AMR patch hierarchy and      *
+ *       the data on the grid.                                          *
+ *                                                                      *
+ *    geom::CartesianGridGeometry - Defines and maintains the Cartesian       *
+ *       coordinate system on the grid.  The hier::PatchHierarchy             *
+ *       maintains a reference to this object.                          *
+ *                                                                      *
+ * The Method-of-Lines algorithm uses these two components to integrate *
+ * data one timestep.  Time-stepping is done in the main routine.       *
+ * This case uses the same timestep across all patches, regardless      *
+ * of the refinement.  See either the Euler or Linear Advection         *
+ * cases for examples of time-refinement cases.                         *
+ *                                                                      *
+ *    algs::MethodOfLinesIntegrator - advances solution on patches.           *
+ *             Controls integration of quantities over entire patch     *
+ *             hierarchy. Takes the user-defined class that defines     *
+ *             patch operations (ConvDiff in this case) as an argument  *
+ *                                                                      *
+ * The user-supplied object defines characteristics and operations to   *
+ * be carried out on each patch.  We pass this object to the integrator *
+ * which will orchestrate the integration on all patches.               *
+ *                                                                      *
+ *    ConvDiff - Defines variables and numerical routines on a single   *
+ *               patch.                                                 *
+ *                                                                      *
+ *    mesh::GriddingAlgorithm - Drives the AMR patch hierarchy generation     *
+ *       and regridding procedures.  This object maintains              *
+ *       references to three other algorithmic objects with             *
+ *       which it is configured when they are passed into its           *
+ *       constructor.   They are:                                       *
+ *                                                                      *
+ *       mesh::BergerRigoutsos - Clusters cells tagged for refinement on a    *
+ *          patch level into a collection of logically-rectangular      *
+ *          box domains.                                                *
+ *                                                                      *
+ *       mesh::DistributedLoadBalancer - Processes the boxes generated by the            *
+ *          mesh::BergerRigoutsos algorithm into a configuration from         *
+ *          which patches are contructed.  The algorithm we use in this *
+ *          class assumes a spatially-uniform workload distribution;    *
+ *          thus, it attempt to produce a collection of boxes           *
+ *          each of which contains the same number of cells.  The       *
+ *          load balancer also assigns patches to processors.           *
+ *                                                                      *
+ *       mesh::StandardTagAndInitialize - Couples the gridding algorithm      *
+ *          to the HyperbolicIntegrator. Selects cells for              *
+ *          refinement based on either Gradient detection, Richardson   *
+ *          extrapolation, or pre-defined Refine box region.  The       *
+ *          object maintains a pointer to the algs::MethodOfLinesIntegrator,  *
+ *          which is passed into its constructor, for this purpose.     *
+ *                                                                      *
+ ************************************************************************
+ */
+
+int main(
+   int argc,
+   char* argv[])
+{
+   /*
+    * Initialize MPI, SAMRAI, and enable logging.
+    */
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   int num_failures = 0;
+
+   /* This extra code block is used to scope some temporaries that are
+    * created, it forces the destruction before the manager is
+    * shutdown.
+    */
+   {
+
+      /*
+       * Process command line arguments and dump to log file.
+       * For non-restarted case, command line is:
+       *
+       *    executable <input file name>
+       *
+       * For restarted run, command line is:
+       *
+       *    executable <input file name> <restart directory> \
+       *               <restart number>
+       */
+
+      string input_filename;
+      string restart_read_dirname;
+      int restore_num = 0;
+      bool is_from_restart = false;
+
+      if ((argc != 2) && (argc != 4)) {
+         tbox::pout << "USAGE:  " << argv[0] << " <input filename> "
+                                             <<
+         "<restart dir> <restore number> [options]\n"
+                                             << "  options:\n"
+                                             << "  none at this time"
+                                             << endl;
+         tbox::SAMRAI_MPI::abort();
+         return -1;
+      } else {
+         input_filename = argv[1];
+         if (argc == 4) {
+            restart_read_dirname = argv[2];
+            restore_num = atoi(argv[3]);
+
+            is_from_restart = true;
+         }
+      }
+
+      tbox::plog << "input_filename = " << input_filename << endl;
+      tbox::plog << "restart_read_dirname = " << restart_read_dirname << endl;
+      tbox::plog << "restore_num = " << restore_num << endl;
+
+      /*
+       * Create input database and parse all data in input file.
+       */
+
+      tbox::Pointer<tbox::Database> input_db(new tbox::InputDatabase("input_db"));
+      tbox::InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      /*
+       * Retrieve "GlobalInputs" section of the input database and set
+       * values accordingly.
+       */
+
+      if (input_db->keyExists("GlobalInputs")) {
+         tbox::Pointer<tbox::Database> global_db =
+            input_db->getDatabase("GlobalInputs");
+         if (global_db->keyExists("call_abort_in_serial_instead_of_exit")) {
+            bool flag = global_db->
+               getBool("call_abort_in_serial_instead_of_exit");
+            tbox::SAMRAI_MPI::setCallAbortInSerialInsteadOfExit(flag);
+         }
+      }
+
+      /*
+       * Retrieve "Main" section of the input database.  First, read dump
+       * information, which is used for writing plot files.  Second,
+       * if proper restart information was given on command line, and the restart
+       * interval is non-zero, create a restart database.
+       */
+
+      tbox::Pointer<tbox::Database> main_db = input_db->getDatabase("Main");
+
+      const tbox::Dimension dim(static_cast<unsigned short>(main_db->getInteger("dim")));
+
+      const std::string base_name =
+         main_db->getStringWithDefault("base_name", "unnamed");
+
+      const std::string log_filename =
+         main_db->getStringWithDefault("log_filename", base_name + ".log");
+
+      bool log_all_nodes = false;
+      if (main_db->keyExists("log_all_nodes")) {
+         log_all_nodes = main_db->getBool("log_all_nodes");
+      }
+      if (log_all_nodes) {
+         tbox::PIO::logAllNodes(log_filename);
+      } else {
+         tbox::PIO::logOnlyNodeZero(log_filename);
+      }
+
+      int viz_dump_interval = 0;
+      if (main_db->keyExists("viz_dump_interval")) {
+         viz_dump_interval = main_db->getInteger("viz_dump_interval");
+      }
+
+      const std::string visit_dump_dirname =
+         main_db->getStringWithDefault("viz_dump_dirname", base_name + ".visit");
+
+      int visit_number_procs_per_file = 1;
+      if (viz_dump_interval > 0) {
+         if (main_db->keyExists("visit_number_procs_per_file")) {
+            visit_number_procs_per_file =
+               main_db->getInteger("visit_number_procs_per_file");
+         }
+      }
+
+      const bool viz_dump_data = (viz_dump_interval > 0);
+
+      int restart_interval = 0;
+      if (main_db->keyExists("restart_interval")) {
+         restart_interval = main_db->getInteger("restart_interval");
+      }
+
+      const std::string restart_write_dirname =
+         main_db->getStringWithDefault("restart_write_dirname",
+            base_name + ".restart");
+
+#if (TESTING == 1) && !(HAVE_HDF5)
+      /*
+       * If we are autotesting on a system w/o HDF5, the read from
+       * restart will result in an error.  We want this to happen
+       * for users, so they know there is a problem with the restart,
+       * but we don't want it to happen when autotesting.
+       */
+      is_from_restart = false;
+      restart_interval = 0;
+#endif
+
+      const bool write_restart = (restart_interval > 0)
+         && !(restart_write_dirname.empty());
+
+      /*
+       * Get restart manager and root restart database.  If run is from
+       * restart, open the restart file.
+       */
+
+      tbox::RestartManager* restart_manager = tbox::RestartManager::getManager();
+
+      if (is_from_restart) {
+         restart_manager->
+         openRestartFile(restart_read_dirname, restore_num,
+            mpi.getSize());
+      }
+
+      /*
+       * Initialize the MainRestartData object which stores the state of the
+       * main program for restart.
+       */
+      MainRestartData* main_restart_data = new MainRestartData(
+            "MainRestartData",
+            input_db->getDatabase("MainRestartData"));
+
+      /*
+       * Create major algorithm and data objects which comprise application.
+       * Each object will be initialized either from input data or restart
+       * files, or a combination of both.  Refer to each class constructor
+       * for details.  For more information on the composition of objects
+       * for this application, see comments at top of file.
+       */
+
+      tbox::Pointer<geom::CartesianGridGeometry> grid_geometry(
+         new geom::CartesianGridGeometry(dim,
+            "CartesianGeometry",
+            input_db->getDatabase("CartesianGeometry")));
+
+      tbox::Pointer<hier::PatchHierarchy> patch_hierarchy(
+         new hier::PatchHierarchy("PatchHierarchy", grid_geometry,
+            input_db->getDatabase("PatchHierarchy")));
+
+      ConvDiff* convdiff_model = new ConvDiff("ConvDiff",
+            dim,
+            input_db->getDatabase("ConvDiff"),
+            grid_geometry);
+
+      tbox::Pointer<algs::MethodOfLinesIntegrator> mol_integrator(
+         new algs::MethodOfLinesIntegrator(
+            "MethodOfLinesIntegrator",
+            input_db->getDatabase("MethodOfLinesIntegrator"),
+            convdiff_model));
+
+      tbox::Pointer<mesh::StandardTagAndInitialize> error_detector(
+         new mesh::StandardTagAndInitialize(
+            dim,
+            "StandardTagAndInitialize",
+            mol_integrator,
+            input_db->getDatabase("StandardTagAndInitialize")));
+
+      tbox::Pointer<mesh::BergerRigoutsos> box_generator(
+         new mesh::BergerRigoutsos(
+            dim,
+            input_db->getDatabaseWithDefault(
+               "BergerRigoutsos",
+               SAMRAI::tbox::Pointer<SAMRAI::tbox::Database>(NULL))));
+
+      tbox::Pointer<mesh::TreeLoadBalancer> load_balancer(
+         new mesh::TreeLoadBalancer(dim,
+            "LoadBalancer", input_db->getDatabase("LoadBalancer")));
+      load_balancer->setSAMRAI_MPI(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+      tbox::Pointer<mesh::GriddingAlgorithm> gridding_algorithm(
+         new mesh::GriddingAlgorithm(
+            patch_hierarchy,
+            "GriddingAlgorithm",
+            input_db->getDatabase("GriddingAlgorithm"),
+            error_detector,
+            box_generator,
+            load_balancer));
+
+      /*
+       * Set up Visualization plot file writer(s).
+       */
+#ifdef HAVE_HDF5
+      tbox::Pointer<appu::VisItDataWriter> visit_data_writer(
+         new appu::VisItDataWriter(dim,
+            "ConvDiff VisIt Writer",
+            visit_dump_dirname,
+            visit_number_procs_per_file));
+      convdiff_model->registerVisItDataWriter(visit_data_writer);
+#endif
+
+      /*
+       * After creating all objects and initializing their state, we
+       * print the input database and variable database contents to
+       * the log file.
+       */
+
+      tbox::plog << "\nCheck input data and variables before simulation:"
+                 << endl;
+      tbox::plog << "Input database..." << endl;
+      input_db->printClassData(tbox::plog);
+      tbox::plog << "\nVariable database..." << endl;
+      hier::VariableDatabase::getDatabase()->printClassData(tbox::plog);
+      mol_integrator->initializeIntegrator(gridding_algorithm);
+
+      /****************************************************************
+      *                                                              *
+      *  INITIALIZE DATA ON PATCHES                                  *
+      *                                                              *
+      ****************************************************************
+      *                                                              *
+      *  Build patch hierarchy and initialize the data on the patches*
+      *  in the hierarchy. Note: this step is performed by the       *
+      *  algs::TimeRefinementIntegrator in Euler/LinAdv example cases.     *
+      *  1) Create a "tag_buffer" for each level in the Hierarchy.   *
+      *  2) Create the coarse (i.e. level 0) grid.                   *
+      *  3) Cycle through levels 1-max_levels, initializing data     *
+      *     on each.  The makeFinerLevel method calls the error      *
+      *     estimator (remember, it was registered with the          *
+      *     gridding algorithm object) and tags cells for refinement *
+      *     as it generates patches on the finer levels.             *
+      *  4) Dump this initial data to viz file.                      *
+      *                                                              *
+      ****************************************************************/
+
+      tbox::Array<int>
+         tag_buffer_array(patch_hierarchy->getMaxNumberOfLevels());
+      for (int il = 0; il < patch_hierarchy->getMaxNumberOfLevels(); il++) {
+         tag_buffer_array[il] = main_restart_data->getTagBuffer();
+         tbox::pout << "il = " << il << " tag_buffer = "
+         << tag_buffer_array[il]
+         << endl;
+      }
+
+      tbox::Array<double>
+         regrid_start_time(patch_hierarchy->getMaxNumberOfLevels());
+
+      double loop_time = main_restart_data->getLoopTime();
+
+      if (tbox::RestartManager::getManager()->isFromRestart()) {
+
+         patch_hierarchy->getFromRestart();
+
+         gridding_algorithm->getTagAndInitializeStrategy()->
+         resetHierarchyConfiguration(patch_hierarchy,
+            0,
+            patch_hierarchy->getFinestLevelNumber());
+
+      } else {
+
+         gridding_algorithm->makeCoarsestLevel(loop_time);
+
+         bool done = false;
+         bool initial_time = true;
+         for (int ln = 0;
+              patch_hierarchy->levelCanBeRefined(ln) && !done;
+              ln++) {
+            gridding_algorithm->makeFinerLevel(
+               loop_time,
+               initial_time,
+               tag_buffer_array[ln]);
+            done = !(patch_hierarchy->finerLevelExists(ln));
+         }
+      }
+
+      tbox::RestartManager::getManager()->closeRestartFile();
+
+#if (TESTING == 1)
+      /*
+       * Create the autotesting component which will verify correctness
+       * of the problem. If no automated testing is done, the object does
+       * not get used.
+       */
+      AutoTester* autotester = new AutoTester("AutoTester", dim, input_db);
+#endif
+
+      /*******************************************************************
+       *                                                                 *
+       *  MAIN TIME ADVANCE LOOP                                         *
+       *                                                                 *
+       *******************************************************************
+       *
+       *  1) Set start and end time.
+       *  2) Start integration timesteps.
+       *     While (loop_time < end_time) {
+       *        2a) Write restart data.
+       *        2b) Advance all levels in the hierarchy by time
+       *            dt by calling algs::MethodOfLinesIntegrator's
+       *            advanceHierarchy method.
+       *        2c) Check if it is time to do a regrid step.  If so,
+       *            have the mesh::GriddingAlgorithm
+       *            call its regridAllFiner
+       *            Levels method, passing in the coarsest (0) level.
+       *            This method will invoke the Gradient detector,
+       *            Berger Rigoutsos algorithm, and load balancer
+       *            while generating finer grid levels.
+       *     }
+       *
+       ******************************************************************/
+      int iteration_num = main_restart_data->getIterationNumber();
+
+#if (TESTING == 1)
+      /*
+       * If we are doing autotests, check result...
+       */
+      num_failures += autotester->evalTestData(iteration_num,
+            patch_hierarchy,
+            loop_time,
+            mol_integrator,
+            gridding_algorithm);
+#endif
+
+      if (viz_dump_data) {
+
+#ifdef HAVE_HDF5
+         visit_data_writer->writePlotData(
+            patch_hierarchy,
+            iteration_num,
+            loop_time);
+
+#endif
+      }
+
+      while ((loop_time < main_restart_data->getEndTime()) &&
+             (iteration_num < main_restart_data->getMaxTimesteps())) {
+
+         iteration_num = main_restart_data->getIterationNumber();
+         iteration_num++;
+
+         tbox::pout << "++++++++++++++++++++++++++++++++++++++++++++" << endl;
+         tbox::pout << "At begining of timestep # " << iteration_num - 1
+                    << endl;
+         tbox::pout << "Simulation time is " << loop_time << endl;
+
+         double dt = mol_integrator->getTimestep(patch_hierarchy, loop_time);
+
+         mol_integrator->advanceHierarchy(patch_hierarchy, loop_time, dt);
+
+         loop_time += dt;
+
+         tbox::pout << "At end of timestep # " << iteration_num - 1 << endl;
+         tbox::pout << "Simulation time is " << loop_time << endl;
+         tbox::pout << "++++++++++++++++++++++++++++++++++++++++++++" << endl;
+
+         /*
+          * Write restart file at specified intervals.  Set current state
+          * of "main" in the main_restart_data object, before writing restart.
+          */
+         main_restart_data->setLoopTime(loop_time);
+         main_restart_data->setIterationNumber(iteration_num);
+         if (write_restart) {
+            if ((iteration_num % restart_interval) == 0) {
+               tbox::RestartManager::getManager()->
+               writeRestartFile(restart_write_dirname,
+                  iteration_num);
+            }
+         }
+
+         /*
+          * At specified intervals, write out data files for plotting.
+          */
+#ifdef HAVE_HDF5
+         if (viz_dump_data) {
+            if ((iteration_num % viz_dump_interval) == 0) {
+
+               visit_data_writer->writePlotData(patch_hierarchy,
+                  iteration_num,
+                  loop_time);
+            }
+         }
+#endif
+
+         /*
+          *  At specified intervals, regrid.
+          */
+         if ((iteration_num % main_restart_data->getRegridStep()) == 0 &&
+             patch_hierarchy->getMaxNumberOfLevels() > 1) {
+            tbox::plog << "\n\n############################################"
+                       << endl;
+            tbox::plog << "                 REGRIDDING" << endl;
+            tbox::plog << "Finest level before regrid: "
+                       << patch_hierarchy->getFinestLevelNumber() << endl;
+
+            gridding_algorithm->regridAllFinerLevels(0,
+               loop_time,
+               tag_buffer_array,
+               regrid_start_time);
+
+            tbox::plog << "Finest level after regrid: "
+                       << patch_hierarchy->getFinestLevelNumber() << endl;
+            tbox::plog << "############################################\n\n"
+                       << endl;
+         }
+
+#if (TESTING == 1)
+         /*
+          * If we are doing autotests, check result...
+          */
+         num_failures += autotester->evalTestData(iteration_num,
+               patch_hierarchy,
+               loop_time,
+               mol_integrator,
+               gridding_algorithm);
+#endif
+
+      }
+
+      /*
+       * At conclusion of simulation, deallocate objects.
+       */
+
+      box_generator.setNull();
+
+      load_balancer.setNull();
+      gridding_algorithm.setNull();
+
+#ifdef HAVE_HDF5
+      visit_data_writer.setNull();
+#endif
+
+      //delete tag_buffer_array;
+
+      error_detector.setNull();
+      mol_integrator.setNull();
+
+      if (convdiff_model) delete convdiff_model;
+
+      patch_hierarchy.setNull();
+
+      grid_geometry.setNull();
+
+      if (main_restart_data) delete main_restart_data;
+
+      main_db.setNull();
+      input_db.setNull();
+
+#if (TESTING == 1)
+      delete autotester;
+#endif
+
+   }
+
+   if (num_failures == 0) {
+      tbox::pout << "\nPASSED:  ConvDiff" << endl;
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return num_failures;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/test_inputs/test.2d.boxes.0000001.0000000
Binary file source/test/applications/ConvDiff/test_inputs/test.2d.boxes.0000001.0000000 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/test_inputs/test.2d.boxes.0000002.0000000
Binary file source/test/applications/ConvDiff/test_inputs/test.2d.boxes.0000002.0000000 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/test_inputs/test.2d.boxes.0000002.0000001
Binary file source/test/applications/ConvDiff/test_inputs/test.2d.boxes.0000002.0000001 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/test_inputs/test.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/ConvDiff/test_inputs/test.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,166 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Advecting sphere input for SAMRAI ConvDiff example problem 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+AutoTester {
+   test_iter_num = 10
+   correct_result = 0.0048828125,  0.00048828125
+   output_correct = FALSE
+
+   write_patch_boxes = FALSE
+   read_patch_boxes = TRUE
+   test_patch_boxes_at_steps = 0, 5, 10  // 0 checks initial data
+   test_patch_boxes_filename = "test_inputs/test.2d.boxes"
+   simplify_test_boxes = TRUE
+}
+
+ConvDiff {
+   convection_coeff  = 40.0, 20.0  // vector [NDIM]
+   diffusion_coeff   = 0.1       // scalar
+   source_coeff      = 0.0       // scalar
+
+   cfl               = 0.5
+   cell_tagging_tolerance = 20.0  // vector [NEQU]
+
+   data_problem      = "SPHERE"
+
+   Initial_data {
+      radius            = 2.9
+      center            = 5.5, 5.5    // vector [NDIM]
+
+      val_inside     = 80.0          // vector [NEQU]
+      val_outside    = 10.            // vector [NEQU]
+   }
+
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "DIRICHLET"
+         val                     = 10.
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 10.
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "DIRICHLET"
+         val                     = 100.
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 10.
+      }
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "YDIRICHLET"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "YDIRICHLET"
+      }
+   }
+
+}
+
+Main {
+   dim = 2
+   base_name = "test.2d"
+// log file parameters
+   log_all_nodes    = TRUE
+
+// visualization dump parameters
+   viz_dump_interval     = 0         // zero to turn off
+   viz_dump_dirname     = "viz_test-2d"
+
+// restart dump parameters
+   restart_interval       = 5         // zero to turn off
+
+   plotting_interval = 0              // zero to turn off
+}
+
+MainRestartData{
+   max_timesteps       = 10
+   start_time          = 0.
+   end_time            = 100.
+   regrid_step         = 3
+   tag_buffer          = 2
+}
+
+
+CartesianGeometry{
+   domain_boxes	= [(0,0),(59,39)]
+   x_lo = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up = 30.e0 , 20.e0   // upper end of computational domain.
+//   periodic_dimension = 1, 0
+}
+
+PatchHierarchy {
+   max_levels = 3         // Maximum number of levels in hierarchy.
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 4 , 4
+      level_2 = 4 , 4
+      level_3 = 4 , 4
+   }
+
+   largest_patch_size {
+      level_0 = 48 , 48
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 8 , 8
+      // all finer levels will use same values as level_0...
+   }
+                                      // boxes < efficiency * vol of large box
+}
+
+GriddingAlgorithm{
+
+   efficiency_tolerance    = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.85e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+BergerRigoutsos {
+  sort_output_nodes = TRUE // Makes results repeatable.
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+MethodOfLinesIntegrator{
+   order              = 2
+   alpha              = 0.5 , 1.0
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
+
+MappedBoxHierarchy {
+   check_input_connectors = 'y'
+   check_output_connectors = 'y'
+   log_actions = 'y'
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/test_inputs/test.3d.boxes.0000001.0000000
Binary file source/test/applications/ConvDiff/test_inputs/test.3d.boxes.0000001.0000000 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/test_inputs/test.3d.boxes.0000002.0000000
Binary file source/test/applications/ConvDiff/test_inputs/test.3d.boxes.0000002.0000000 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/test_inputs/test.3d.boxes.0000002.0000001
Binary file source/test/applications/ConvDiff/test_inputs/test.3d.boxes.0000002.0000001 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/ConvDiff/test_inputs/test.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/ConvDiff/test_inputs/test.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,230 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Advecting sphere input for SAMRAI ConvDiff example problem 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+AutoTester {
+   test_iter_num = 10
+   correct_result = 0.625, 0.0625
+   output_correct = FALSE
+
+   test_patch_boxes_at_steps = 0, 5, 10  // 0 checks initial data
+   test_patch_boxes_filename = "test_inputs/test.3d.boxes"
+   simplify_test_boxes = TRUE
+}
+
+ConvDiff {
+   convection_coeff =  4.0e0 , 2.0e0 , 2.0e0 // vector [NDIM]
+   diffusion_coeff   = 0.5       // scalar
+   source_coeff      = 0.0       // scalar
+
+   cfl               = 0.5
+   cell_tagging_tolerance = 20.0  // vector [NEQU]
+
+   data_problem      = "SPHERE"
+
+   Initial_data {
+      radius            = 2.9
+      center            = 5.5, 5.5, 5.5    // vector [NDIM]
+
+      val_inside     = 80.0           // vector [NEQU]
+      val_outside    = 10.            // vector [NEQU]
+   }
+
+  Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "DIRICHLET"
+         val                     = 10.
+      }
+      boundary_face_xhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 10.
+      }
+      boundary_face_ylo {
+         boundary_condition      = "DIRICHLET"
+         val                     = 10.
+      }
+      boundary_face_yhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 10.
+      }
+      boundary_face_zlo {
+         boundary_condition      = "DIRICHLET"
+         val                     = 100.
+      }
+      boundary_face_zhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 10.
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for an edge, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent face has either a FLOW
+      //            or REFLECT condition, the resulting edge boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YDIRICHLET"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YDIRICHLET"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YDIRICHLET"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YDIRICHLET"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent faces have either FLOW
+      //            or REFLECT conditions, the resulting node boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XDIRICHLET"
+      }
+
+   }
+
+}
+
+Main {
+   dim = 3
+   base_name = "test.3d"
+// log file parameters
+   log_all_nodes    = TRUE
+
+// visualization dump parameters
+   viz_dump_interval     = 0         // zero to turn off
+   viz_dump_dirname     = "viz_test-3d"
+
+// restart dump parameters
+   restart_interval       = 5         // zero to turn off
+
+}
+
+MainRestartData{
+   max_timesteps       = 10
+   start_time          = 0.
+   end_time            = 100.
+   regrid_step         = 3
+   tag_buffer          = 2
+}
+
+CartesianGeometry{
+   domain_boxes	= [ (0,0,0) , (14,9,9) ]
+
+   x_lo = 0.e0 , 0.e0 , 0.e0    // lower end of computational domain.
+   x_up = 30.e0 , 20.e0 , 20.e0 // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3         // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 2 , 2 , 2
+      level_2 = 2 , 2 , 2
+      level_3 = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 40 , 40 , 40
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 9 , 9 , 9
+      // all finer levels will use same values as level_0...
+   }
+                                      // boxes < efficiency * vol of large box
+}
+GriddingAlgorithm{
+
+   efficiency_tolerance    = 0.85e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.95e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+BergerRigoutsos {
+  sort_output_nodes = TRUE // Makes results repeatable.
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+MethodOfLinesIntegrator{
+   order              = 2
+   alpha              = 0.5 , 1.0
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/Euler.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/Euler.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,4728 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Numerical routines for Euler equations SAMRAI example 
+ *
+ ************************************************************************/
+
+#include "Euler.h"
+
+#include <iostream>
+#include <iomanip>
+#include <fstream>
+
+#ifndef LACKS_SSTREAM
+#ifndef included_sstream
+#define included_sstream
+#include <sstream>
+#endif
+#else
+#ifndef included_strstream
+#define included_strstream
+#include <strstream>
+#endif
+#endif
+
+using namespace std;
+
+#include <cstdlib>
+#include <cstdio>
+#include <cmath>
+#include <cfloat>
+
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceIndex.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/mesh/TreeLoadBalancer.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+//integer constants for boundary conditions
+#define CHECK_BDRY_DATA (0)
+#include "SAMRAI/appu/CartesianBoundaryDefines.h"
+
+//integer constant for debugging improperly set boundary dat
+#define BOGUS_BDRY_DATA (-9999)
+
+// routines for managing boundary data
+#include "SAMRAI/appu/CartesianBoundaryUtilities2.h"
+#include "SAMRAI/appu/CartesianBoundaryUtilities3.h"
+
+// External definitions for Fortran numerical routines
+#include "EulerFort.h"
+
+// Number of entries in state vector (d_dim velocity comps + pressure + density)
+#define NEQU (d_dim.getValue() + 2)
+
+// Number of ghosts cells used for each variable quantity.
+#define CELLG (4)
+#define FACEG (4)
+#define FLUXG (1)
+
+// defines for initialization
+#define PIECEWISE_CONSTANT_X (10)
+#define PIECEWISE_CONSTANT_Y (11)
+#define PIECEWISE_CONSTANT_Z (12)
+#define SPHERE (40)
+#define STEP (80)
+
+// defines for Riemann solver used in Godunov flux calculation
+#define APPROX_RIEM_SOLVE (20)   // Colella-Glaz approx Riemann solver
+#define EXACT_RIEM_SOLVE (21)    // Exact Riemann solver
+#define HLLC_RIEM_SOLVE (22)     // Harten, Lax, van Leer approx Riemann solver
+
+// defines for cell tagging routines
+#define RICHARDSON_NEWLY_TAGGED (-10)
+#define RICHARDSON_ALREADY_TAGGED (-11)
+#ifndef TRUE
+#define TRUE (1)
+#endif
+#ifndef FALSE
+#define FALSE (0)
+#endif
+
+// Version of Euler restart file data
+#define EULER_VERSION (3)
+
+tbox::Pointer<tbox::Timer> Euler::t_init;
+tbox::Pointer<tbox::Timer> Euler::t_compute_dt;
+tbox::Pointer<tbox::Timer> Euler::t_compute_fluxes;
+tbox::Pointer<tbox::Timer> Euler::t_conservdiff;
+tbox::Pointer<tbox::Timer> Euler::t_setphysbcs;
+tbox::Pointer<tbox::Timer> Euler::t_taggradient;
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The constructor for Euler class sets data members to defualt values,  *
+ * creates variables that define the solution state for the Euler        *
+ * equations.                                                            *
+ *                                                                       *
+ * After default values are set, this routine calls getFromRestart()     *
+ * if execution from a restart file is specified.  Finally,              *
+ * getFromInput() is called to read values from the given input          *
+ * database (potentially overriding those found in the restart file).    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+Euler::Euler(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> input_db,
+   tbox::Pointer<geom::CartesianGridGeometry> grid_geom):
+   algs::HyperbolicPatchStrategy(dim),
+   d_dim(dim),
+   d_nghosts(d_dim),
+   d_fluxghosts(d_dim)
+{
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!input_db.isNull());
+   TBOX_ASSERT(!grid_geom.isNull());
+
+   d_object_name = object_name;
+   tbox::RestartManager::getManager()->registerRestartItem(d_object_name, this);
+
+   if (t_init.isNull()) {
+      t_init = tbox::TimerManager::getManager()->
+         getTimer("apps::Euler::initializeDataOnPatch()");
+      t_compute_dt = tbox::TimerManager::getManager()->
+         getTimer("apps::Euler::computeStableDtOnPatch()");
+      t_compute_fluxes = tbox::TimerManager::getManager()->
+         getTimer("apps::Euler::computeFluxesOnPatch()");
+      t_conservdiff = tbox::TimerManager::getManager()->
+         getTimer("apps::Euler::conservativeDifferenceOnPatch()");
+      t_setphysbcs = tbox::TimerManager::getManager()->
+         getTimer("apps::Euler::setPhysicalBoundaryConditions()");
+      t_taggradient = tbox::TimerManager::getManager()->
+         getTimer("apps::Euler::tagGradientDetectorCells()");
+   }
+
+   d_grid_geometry = grid_geom;
+
+   d_use_nonuniform_workload = false;
+
+   /*
+    *hier::Variable quantities that define state of Euler problem.
+    */
+   d_density = new pdat::CellVariable<double>(d_dim, "density", 1);
+   d_velocity = new pdat::CellVariable<double>(d_dim, "velocity", d_dim.getValue());
+   d_pressure = new pdat::CellVariable<double>(d_dim, "pressure", 1);
+   d_flux = new pdat::FaceVariable<double>(d_dim, "flux", NEQU);
+
+   /*
+    * Default parameters for physical constants
+    */
+
+   d_gamma = 1.4;  // specific heat ratio for ideal diatomic gas (e.g., air)
+
+   /*
+    * Default parameters for numerical methods
+    */
+
+   d_riemann_solve = "APPROX_RIEM_SOLVE";
+   d_godunov_order = 1;
+   d_corner_transport = "CORNER_TRANSPORT_1";
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(CELLG == FACEG);
+#endif
+   d_nghosts = hier::IntVector(d_dim, CELLG);
+   d_fluxghosts = hier::IntVector(d_dim, FLUXG);
+
+   /*
+    * Defaults for problem type and initial data
+    */
+
+   d_radius = tbox::MathUtilities<double>::getSignalingNaN();
+   tbox::MathUtilities<double>::setArrayToSignalingNaN(d_center, d_dim.getValue());
+   d_density_inside = tbox::MathUtilities<double>::getSignalingNaN();
+   tbox::MathUtilities<double>::setArrayToSignalingNaN(d_velocity_inside, d_dim.getValue());
+   d_pressure_inside = tbox::MathUtilities<double>::getSignalingNaN();
+   d_density_outside = tbox::MathUtilities<double>::getSignalingNaN();
+   tbox::MathUtilities<double>::setArrayToSignalingNaN(d_velocity_outside,
+      d_dim.getValue());
+   d_pressure_outside = tbox::MathUtilities<double>::getSignalingNaN();
+
+   d_number_of_intervals = 0;
+   d_front_position.resizeArray(0);
+   d_interval_density.resizeArray(0);
+   d_interval_velocity.resizeArray(0);
+   d_interval_pressure.resizeArray(0);
+
+   /*
+    * Defaults for boundary conditions. Set to bogus values
+    * for error checking.
+    */
+
+   if (d_dim == tbox::Dimension(2)) {
+      d_master_bdry_edge_conds.resizeArray(NUM_2D_EDGES);
+      d_scalar_bdry_edge_conds.resizeArray(NUM_2D_EDGES);
+      d_vector_bdry_edge_conds.resizeArray(NUM_2D_EDGES);
+      for (int ei = 0; ei < NUM_2D_EDGES; ei++) {
+         d_master_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+         d_scalar_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+         d_vector_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+      }
+
+      d_master_bdry_node_conds.resizeArray(NUM_2D_NODES);
+      d_scalar_bdry_node_conds.resizeArray(NUM_2D_NODES);
+      d_vector_bdry_node_conds.resizeArray(NUM_2D_NODES);
+      d_node_bdry_edge.resizeArray(NUM_2D_NODES);
+
+      for (int ni = 0; ni < NUM_2D_NODES; ni++) {
+         d_master_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+         d_scalar_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+         d_vector_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+         d_node_bdry_edge[ni] = BOGUS_BDRY_DATA;
+      }
+
+      d_bdry_edge_density.resizeArray(NUM_2D_EDGES);
+      d_bdry_edge_velocity.resizeArray(NUM_2D_EDGES * d_dim.getValue());
+      d_bdry_edge_pressure.resizeArray(NUM_2D_EDGES);
+      tbox::MathUtilities<double>::setArrayToSignalingNaN(d_bdry_edge_density);
+      tbox::MathUtilities<double>::setArrayToSignalingNaN(d_bdry_edge_velocity);
+      tbox::MathUtilities<double>::setArrayToSignalingNaN(d_bdry_edge_pressure);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      d_master_bdry_face_conds.resizeArray(NUM_3D_FACES);
+      d_scalar_bdry_face_conds.resizeArray(NUM_3D_FACES);
+      d_vector_bdry_face_conds.resizeArray(NUM_3D_FACES);
+      for (int fi = 0; fi < NUM_3D_FACES; fi++) {
+         d_master_bdry_face_conds[fi] = BOGUS_BDRY_DATA;
+         d_scalar_bdry_face_conds[fi] = BOGUS_BDRY_DATA;
+         d_vector_bdry_face_conds[fi] = BOGUS_BDRY_DATA;
+      }
+
+      d_master_bdry_edge_conds.resizeArray(NUM_3D_EDGES);
+      d_scalar_bdry_edge_conds.resizeArray(NUM_3D_EDGES);
+      d_vector_bdry_edge_conds.resizeArray(NUM_3D_EDGES);
+      d_edge_bdry_face.resizeArray(NUM_3D_EDGES);
+      for (int ei = 0; ei < NUM_3D_EDGES; ei++) {
+         d_master_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+         d_scalar_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+         d_vector_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+         d_edge_bdry_face[ei] = BOGUS_BDRY_DATA;
+      }
+
+      d_master_bdry_node_conds.resizeArray(NUM_3D_NODES);
+      d_scalar_bdry_node_conds.resizeArray(NUM_3D_NODES);
+      d_vector_bdry_node_conds.resizeArray(NUM_3D_NODES);
+      d_node_bdry_face.resizeArray(NUM_3D_NODES);
+
+      for (int ni = 0; ni < NUM_3D_NODES; ni++) {
+         d_master_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+         d_scalar_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+         d_vector_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+         d_node_bdry_face[ni] = BOGUS_BDRY_DATA;
+      }
+
+      d_bdry_face_density.resizeArray(NUM_3D_FACES);
+      d_bdry_face_velocity.resizeArray(NUM_3D_FACES * d_dim.getValue());
+      d_bdry_face_pressure.resizeArray(NUM_3D_FACES);
+      tbox::MathUtilities<double>::setArrayToSignalingNaN(d_bdry_face_density);
+      tbox::MathUtilities<double>::setArrayToSignalingNaN(d_bdry_face_velocity);
+      tbox::MathUtilities<double>::setArrayToSignalingNaN(d_bdry_face_pressure);
+   }
+
+   /*
+    * Initialize object with data read from given input/restart databases.
+    */
+   bool is_from_restart = tbox::RestartManager::getManager()->isFromRestart();
+   if (is_from_restart) {
+      getFromRestart();
+   }
+   getFromInput(input_db, is_from_restart);
+
+   /*
+    * Set problem data to values read from input/restart.
+    */
+
+   if (d_riemann_solve == "APPROX_RIEM_SOLVE") {
+      d_riemann_solve_int = APPROX_RIEM_SOLVE;
+   } else if (d_riemann_solve == "EXACT_RIEM_SOLVE") {
+      d_riemann_solve_int = EXACT_RIEM_SOLVE;
+   } else if (d_riemann_solve == "HLLC_RIEM_SOLVE") {
+      d_riemann_solve_int = HLLC_RIEM_SOLVE;
+   } else {
+      TBOX_ERROR(
+         d_object_name << ": "
+         << "Unknown d_riemann_solve string = "
+         << d_riemann_solve
+         << " encountered in constructor" << endl);
+   }
+
+   if (d_data_problem == "PIECEWISE_CONSTANT_X") {
+      d_data_problem_int = PIECEWISE_CONSTANT_X;
+   } else if (d_data_problem == "PIECEWISE_CONSTANT_Y") {
+      d_data_problem_int = PIECEWISE_CONSTANT_Y;
+   } else if (d_data_problem == "PIECEWISE_CONSTANT_Z") {
+      d_data_problem_int = PIECEWISE_CONSTANT_Z;
+   } else if (d_data_problem == "SPHERE") {
+      d_data_problem_int = SPHERE;
+   } else if (d_data_problem == "STEP") {
+      d_data_problem_int = STEP;
+   } else {
+      TBOX_ERROR(
+         d_object_name << ": "
+         << "Unknown d_data_problem string = "
+         << d_data_problem
+         << " encountered in constructor" << endl);
+   }
+
+   /*
+    * Postprocess boundary data from input/restart values.
+    */
+   if (d_dim == tbox::Dimension(2)) {
+      for (int i = 0; i < NUM_2D_EDGES; i++) {
+         d_scalar_bdry_edge_conds[i] = d_master_bdry_edge_conds[i];
+         d_vector_bdry_edge_conds[i] = d_master_bdry_edge_conds[i];
+
+         if (d_master_bdry_edge_conds[i] == REFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = FLOW_BC;
+         }
+      }
+
+      for (int i = 0; i < NUM_2D_NODES; i++) {
+         d_scalar_bdry_node_conds[i] = d_master_bdry_node_conds[i];
+         d_vector_bdry_node_conds[i] = d_master_bdry_node_conds[i];
+
+         if (d_master_bdry_node_conds[i] == XREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = XFLOW_BC;
+         }
+         if (d_master_bdry_node_conds[i] == YREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = YFLOW_BC;
+         }
+
+         if (d_master_bdry_node_conds[i] != BOGUS_BDRY_DATA) {
+            d_node_bdry_edge[i] =
+               appu::CartesianBoundaryUtilities2::getEdgeLocationForNodeBdry(
+                  i, d_master_bdry_node_conds[i]);
+         }
+      }
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      for (int i = 0; i < NUM_3D_FACES; i++) {
+         d_scalar_bdry_face_conds[i] = d_master_bdry_face_conds[i];
+         d_vector_bdry_face_conds[i] = d_master_bdry_face_conds[i];
+
+         if (d_master_bdry_face_conds[i] == REFLECT_BC) {
+            d_scalar_bdry_face_conds[i] = FLOW_BC;
+         }
+      }
+
+      for (int i = 0; i < NUM_3D_EDGES; i++) {
+         d_scalar_bdry_edge_conds[i] = d_master_bdry_edge_conds[i];
+         d_vector_bdry_edge_conds[i] = d_master_bdry_edge_conds[i];
+
+         if (d_master_bdry_edge_conds[i] == XREFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = XFLOW_BC;
+         }
+         if (d_master_bdry_edge_conds[i] == YREFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = YFLOW_BC;
+         }
+         if (d_master_bdry_edge_conds[i] == ZREFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = ZFLOW_BC;
+         }
+
+         if (d_master_bdry_edge_conds[i] != BOGUS_BDRY_DATA) {
+            d_edge_bdry_face[i] =
+               appu::CartesianBoundaryUtilities3::getFaceLocationForEdgeBdry(
+                  i, d_master_bdry_edge_conds[i]);
+         }
+      }
+
+      for (int i = 0; i < NUM_3D_NODES; i++) {
+         d_scalar_bdry_node_conds[i] = d_master_bdry_node_conds[i];
+         d_vector_bdry_node_conds[i] = d_master_bdry_node_conds[i];
+
+         if (d_master_bdry_node_conds[i] == XREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = XFLOW_BC;
+         }
+         if (d_master_bdry_node_conds[i] == YREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = YFLOW_BC;
+         }
+         if (d_master_bdry_node_conds[i] == ZREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = ZFLOW_BC;
+         }
+
+         if (d_master_bdry_node_conds[i] != BOGUS_BDRY_DATA) {
+            d_node_bdry_face[i] =
+               appu::CartesianBoundaryUtilities3::getFaceLocationForNodeBdry(
+                  i, d_master_bdry_node_conds[i]);
+         }
+      }
+
+   }
+
+   F77_FUNC(stufprobc, STUFPROBC) (APPROX_RIEM_SOLVE, EXACT_RIEM_SOLVE,
+      HLLC_RIEM_SOLVE,
+      PIECEWISE_CONSTANT_X, PIECEWISE_CONSTANT_Y, PIECEWISE_CONSTANT_Z,
+      SPHERE, STEP,
+      CELLG, FACEG, FLUXG);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Empty destructor for Euler class.                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+Euler::~Euler()
+{
+   t_init = NULL;
+   t_compute_dt = NULL;
+   t_compute_fluxes = NULL;
+   t_conservdiff = NULL;
+   t_setphysbcs = NULL;
+   t_taggradient = NULL;
+}
+
+/*
+ *************************************************************************
+ *
+ * Register density, velocity, pressure (i.e., solution state variables),
+ * and flux variables with hyperbolic integrator that manages storage
+ * for those quantities.  Also, register plot data with the vis tool.
+ *
+ * Note that density coarsening/refining uses standard conservative
+ * operations provided in SAMRAI library.   Velocity and pressure
+ * are not conserved.  The Euler code provides operations to coarsen/
+ * refine momentum and total energy conservatively.  Velocity and
+ * pressure are calculated from the conserved quantities.
+ *
+ *************************************************************************
+ */
+
+void Euler::registerModelVariables(
+   algs::HyperbolicLevelIntegrator* integrator)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(integrator != (algs::HyperbolicLevelIntegrator *)NULL);
+   TBOX_ASSERT(CELLG == FACEG);
+#endif
+
+   integrator->registerVariable(d_density, d_nghosts,
+      algs::HyperbolicLevelIntegrator::TIME_DEP,
+      d_grid_geometry,
+      "CONSERVATIVE_COARSEN",
+      "CONSERVATIVE_LINEAR_REFINE");
+
+   integrator->registerVariable(d_velocity, d_nghosts,
+      algs::HyperbolicLevelIntegrator::TIME_DEP,
+      d_grid_geometry,
+      "USER_DEFINED_COARSEN",
+      "USER_DEFINED_REFINE");
+
+   integrator->registerVariable(d_pressure, d_nghosts,
+      algs::HyperbolicLevelIntegrator::TIME_DEP,
+      d_grid_geometry,
+      "USER_DEFINED_COARSEN",
+      "USER_DEFINED_REFINE");
+
+   integrator->registerVariable(d_flux, d_fluxghosts,
+      algs::HyperbolicLevelIntegrator::FLUX,
+      d_grid_geometry,
+      "CONSERVATIVE_COARSEN",
+      "NO_REFINE");
+
+   hier::VariableDatabase* vardb = hier::VariableDatabase::getDatabase();
+
+   d_plot_context = integrator->getPlotContext();
+
+#ifdef HAVE_HDF5
+   if (!(d_visit_writer.isNull())) {
+      d_visit_writer->registerPlotQuantity("Density",
+         "SCALAR",
+         vardb->mapVariableAndContextToIndex(
+            d_density, d_plot_context));
+
+      d_visit_writer->registerPlotQuantity("Velocity",
+         "VECTOR",
+         vardb->mapVariableAndContextToIndex(
+            d_velocity, d_plot_context));
+
+      d_visit_writer->registerPlotQuantity("Pressure",
+         "SCALAR",
+         vardb->mapVariableAndContextToIndex(
+            d_pressure, d_plot_context));
+
+      d_visit_writer->registerDerivedPlotQuantity("Total Energy",
+         "SCALAR",
+         this);
+      d_visit_writer->registerDerivedPlotQuantity("Momentum",
+         "VECTOR",
+         this);
+   }
+
+   if (d_visit_writer.isNull()) {
+      TBOX_WARNING(d_object_name << ": registerModelVariables()\n"
+                                 << "Visit data writer was not registered\n"
+                                 << "Consequently, no plot data will\n"
+                                 << "be written." << endl);
+   }
+#endif
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set up parameters for nonuniform load balancing, if used.             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::setupLoadBalancer(
+   algs::HyperbolicLevelIntegrator* integrator,
+   mesh::GriddingAlgorithm* gridding_algorithm)
+{
+   (void)integrator;
+
+   const hier::IntVector& zero_vec = hier::IntVector::getZero(d_dim);
+
+   hier::VariableDatabase* vardb = hier::VariableDatabase::getDatabase();
+
+   if (d_use_nonuniform_workload && gridding_algorithm) {
+      tbox::Pointer<mesh::TreeLoadBalancer> load_balancer =
+         gridding_algorithm->getLoadBalanceStrategy();
+
+      if (!load_balancer.isNull()) {
+         d_workload_variable = new pdat::CellVariable<double>(
+               d_dim,
+               "workload_variable",
+               1);
+         d_workload_data_id =
+            vardb->registerVariableAndContext(d_workload_variable,
+               vardb->getContext("WORKLOAD"),
+               zero_vec);
+         load_balancer->setWorkloadPatchDataIndex(d_workload_data_id);
+         vardb->registerPatchDataForRestart(d_workload_data_id);
+      } else {
+         TBOX_WARNING(
+            d_object_name << ": "
+            <<
+            "  Unknown load balancer used in gridding algorithm."
+            <<
+            "  Ignoring request for nonuniform load balancing." << endl);
+         d_use_nonuniform_workload = false;
+      }
+   } else {
+      d_use_nonuniform_workload = false;
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set initial data for solution variables on patch interior.            *
+ * This routine is called whenever a new patch is introduced to the      *
+ * AMR patch hierarchy.  Note that the routine does nothing unless       *
+ * we are at the initial time.  In all other cases, conservative         *
+ * interpolation from coarser levels and copies from patches at the      *
+ * same mesh resolution are sufficient to set data.                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::initializeDataOnPatch(
+   hier::Patch& patch,
+   const double data_time,
+   const bool initial_time)
+{
+   (void)data_time;
+
+   t_init->start();
+
+   if (initial_time) {
+
+      const tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+         patch.getPatchGeometry();
+      const double* dx = pgeom->getDx();
+      const double* xlo = pgeom->getXLower();
+      const double* xhi = pgeom->getXUpper();
+
+      tbox::Pointer<pdat::CellData<double> > density =
+         patch.getPatchData(d_density, getDataContext());
+      tbox::Pointer<pdat::CellData<double> > velocity =
+         patch.getPatchData(d_velocity, getDataContext());
+      tbox::Pointer<pdat::CellData<double> > pressure =
+         patch.getPatchData(d_pressure, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!density.isNull());
+      TBOX_ASSERT(!velocity.isNull());
+      TBOX_ASSERT(!pressure.isNull());
+#endif
+      const hier::IntVector& ghost_cells = density->getGhostCellWidth();
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(velocity->getGhostCellWidth() == ghost_cells);
+      TBOX_ASSERT(pressure->getGhostCellWidth() == ghost_cells);
+#endif
+
+      const hier::Index ifirst = patch.getBox().lower();
+      const hier::Index ilast = patch.getBox().upper();
+
+      if (d_data_problem == "SPHERE") {
+
+         if (d_dim == tbox::Dimension(2)) {
+            F77_FUNC(eulerinitsphere2d, EULERINITSPHERE2d) (d_data_problem_int,
+               dx, xlo, xhi,
+               ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ghost_cells(0),
+               ghost_cells(1),
+               d_gamma,
+               density->getPointer(),
+               velocity->getPointer(),
+               pressure->getPointer(),
+               d_density_inside,
+               d_velocity_inside,
+               d_pressure_inside,
+               d_density_outside,
+               d_velocity_outside,
+               d_pressure_outside,
+               d_center, d_radius);
+         } else if (d_dim == tbox::Dimension(3)) {
+            F77_FUNC(eulerinitsphere3d, EULERINITSPHERE3d) (d_data_problem_int,
+               dx, xlo, xhi,
+               ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ifirst(2), ilast(2),
+               ghost_cells(0),
+               ghost_cells(1),
+               ghost_cells(2),
+               d_gamma,
+               density->getPointer(),
+               velocity->getPointer(),
+               pressure->getPointer(),
+               d_density_inside,
+               d_velocity_inside,
+               d_pressure_inside,
+               d_density_outside,
+               d_velocity_outside,
+               d_pressure_outside,
+               d_center, d_radius);
+         }
+
+      } else {
+
+         if (d_dim == tbox::Dimension(2)) {
+            F77_FUNC(eulerinit2d, EULERINIT2D) (d_data_problem_int,
+               dx, xlo, xhi,
+               ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ghost_cells(0),
+               ghost_cells(1),
+               d_gamma,
+               density->getPointer(),
+               velocity->getPointer(),
+               pressure->getPointer(),
+               d_number_of_intervals,
+               d_front_position.getPointer(),
+               d_interval_density.getPointer(),
+               d_interval_velocity.getPointer(),
+               d_interval_pressure.getPointer());
+         } else if (d_dim == tbox::Dimension(3)) {
+            F77_FUNC(eulerinit3d, EULERINIT3D) (d_data_problem_int,
+               dx, xlo, xhi,
+               ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ifirst(2), ilast(2),
+               ghost_cells(0),
+               ghost_cells(1),
+               ghost_cells(2),
+               d_gamma,
+               density->getPointer(),
+               velocity->getPointer(),
+               pressure->getPointer(),
+               d_number_of_intervals,
+               d_front_position.getPointer(),
+               d_interval_density.getPointer(),
+               d_interval_velocity.getPointer(),
+               d_interval_pressure.getPointer());
+         }
+
+      }
+
+   }
+
+   if (d_use_nonuniform_workload) {
+      if (!patch.checkAllocated(d_workload_data_id)) {
+         patch.allocatePatchData(d_workload_data_id);
+      }
+      tbox::Pointer<pdat::CellData<double> > workload_data =
+         patch.getPatchData(d_workload_data_id);
+      workload_data->fillAll(1.0);
+   }
+
+   t_init->stop();
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute stable time increment for patch.  Return this value.          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double Euler::computeStableDtOnPatch(
+   hier::Patch& patch,
+   const bool initial_time,
+   const double dt_time)
+{
+   (void)initial_time;
+   (void)dt_time;
+
+   t_compute_dt->start();
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+
+   const tbox::Pointer<pdat::CellData<double> > density =
+      patch.getPatchData(d_density, getDataContext());
+   const tbox::Pointer<pdat::CellData<double> > velocity =
+      patch.getPatchData(d_velocity, getDataContext());
+   const tbox::Pointer<pdat::CellData<double> > pressure =
+      patch.getPatchData(d_pressure, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!density.isNull());
+   TBOX_ASSERT(!velocity.isNull());
+   TBOX_ASSERT(!pressure.isNull());
+#endif
+   const hier::IntVector& ghost_cells = density->getGhostCellWidth();
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(velocity->getGhostCellWidth() == ghost_cells);
+   TBOX_ASSERT(pressure->getGhostCellWidth() == ghost_cells);
+#endif
+
+   double stabdt = 0.;
+   if (d_dim == tbox::Dimension(2)) {
+      F77_FUNC(stabledt2d, STABLEDT2D) (dx,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ghost_cells(0),
+         ghost_cells(1),
+         d_gamma,
+         density->getPointer(),
+         velocity->getPointer(),
+         pressure->getPointer(),
+         stabdt);
+   } else if (d_dim == tbox::Dimension(3)) {
+      F77_FUNC(stabledt3d, STABLEDT3D) (dx,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         ghost_cells(0),
+         ghost_cells(1),
+         ghost_cells(2),
+         d_gamma,
+         density->getPointer(),
+         velocity->getPointer(),
+         pressure->getPointer(),
+         stabdt);
+   }
+
+   t_compute_dt->stop();
+   return stabdt;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute time integral of numerical fluxes for finite difference       *
+ * at each cell face on patch.  When d_dim == tbox::Dimension(3)), there are two options   *
+ * for the transverse flux correction.  Otherwise, there is only one.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::computeFluxesOnPatch(
+   hier::Patch& patch,
+   const double time,
+   const double dt)
+{
+   (void)time;
+
+   t_compute_fluxes->start();
+
+   if (d_dim == tbox::Dimension(3)) {
+      if (d_corner_transport == "CORNER_TRANSPORT_2") {
+         compute3DFluxesWithCornerTransport2(patch, dt);
+      } else {
+         compute3DFluxesWithCornerTransport1(patch, dt);
+      }
+   }
+
+   if (d_dim == tbox::Dimension(2)) {
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(CELLG == FACEG);
+#endif
+
+      const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+         patch.getPatchGeometry();
+      const double* dx = patch_geom->getDx();
+
+      hier::Box pbox = patch.getBox();
+      const hier::Index ifirst = pbox.lower();
+      const hier::Index ilast = pbox.upper();
+
+      tbox::Pointer<pdat::CellData<double> > density =
+         patch.getPatchData(d_density, getDataContext());
+      tbox::Pointer<pdat::CellData<double> > velocity =
+         patch.getPatchData(d_velocity, getDataContext());
+      tbox::Pointer<pdat::CellData<double> > pressure =
+         patch.getPatchData(d_pressure, getDataContext());
+      tbox::Pointer<pdat::FaceData<double> > flux =
+         patch.getPatchData(d_flux, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!density.isNull());
+      TBOX_ASSERT(!velocity.isNull());
+      TBOX_ASSERT(!pressure.isNull());
+      TBOX_ASSERT(!flux.isNull());
+      TBOX_ASSERT(density->getGhostCellWidth() == d_nghosts);
+      TBOX_ASSERT(velocity->getGhostCellWidth() == d_nghosts);
+      TBOX_ASSERT(pressure->getGhostCellWidth() == d_nghosts);
+      TBOX_ASSERT(flux->getGhostCellWidth() == d_fluxghosts);
+#endif
+
+      /*
+       * Allocate patch data for temporaries local to this routine.
+       */
+      pdat::FaceData<double> traced_left(pbox, NEQU, d_nghosts);
+      pdat::FaceData<double> traced_right(pbox, NEQU, d_nghosts);
+      pdat::CellData<double> sound_speed(pbox, 1, d_nghosts);
+
+      /*
+       *  Initialize traced states (w^R and w^L) with proper cell-centered values.
+       */
+      F77_FUNC(inittraceflux2d, INITTRACEFLUX2D) (ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         density->getPointer(),
+         velocity->getPointer(),
+         pressure->getPointer(),
+         traced_left.getPointer(0),
+         traced_left.getPointer(1),
+         traced_right.getPointer(0),
+         traced_right.getPointer(1),
+         flux->getPointer(0),
+         flux->getPointer(1));
+
+      /*
+       * If Godunov method requires slopes with order greater than one, perform
+       * characteristic tracing to compute higher-order slopes.
+       */
+      if (d_godunov_order > 1) {
+
+         /*
+          * Prepare temporary data for characteristic tracing.
+          */
+         int Mcells = 0;
+         for (int k = 0; k < d_dim.getValue(); k++) {
+            Mcells = tbox::MathUtilities<int>::Max(Mcells, pbox.numberCells(k));
+         }
+
+         // Face-centered temporary arrays
+         tbox::Array<double> ttedgslp((2 * FACEG + 1 + Mcells) * NEQU);
+         tbox::Array<double> ttraclft((2 * FACEG + 1 + Mcells) * NEQU);
+         tbox::Array<double> ttracrgt((2 * FACEG + 1 + Mcells) * NEQU);
+
+         // Cell-centered temporary arrays
+         tbox::Array<double> ttsound((2 * CELLG + Mcells));
+         tbox::Array<double> ttcelslp((2 * CELLG + Mcells) * NEQU);
+
+         /*
+          * Compute local sound speed in each computational cell.
+          */
+         F77_FUNC(computesound2d, COMPUTESOUND2D) (ifirst(0), ilast(0),
+            ifirst(1), ilast(1),
+            d_gamma,
+            density->getPointer(),
+            velocity->getPointer(),
+            pressure->getPointer(),
+            sound_speed.getPointer());
+
+         /*
+          *  Apply characteristic tracing to compute initial estimate of
+          *  traces w^L and w^R at faces.
+          *  Inputs: sound_speed, w^L, w^R (traced_left/right)
+          *  Output: w^L, w^R
+          */
+         F77_FUNC(chartracing2d0, CHARTRACING2D0) (dt,
+            ifirst(0), ilast(0),
+            ifirst(1), ilast(1),
+            Mcells, dx[0], d_gamma, d_godunov_order,
+            sound_speed.getPointer(),
+            traced_left.getPointer(0),
+            traced_right.getPointer(0),
+            ttcelslp.getPointer(),
+            ttedgslp.getPointer(),
+            ttsound.getPointer(),
+            ttraclft.getPointer(),
+            ttracrgt.getPointer());
+
+         F77_FUNC(chartracing2d1, CHARTRACING2D1) (dt,
+            ifirst(0), ilast(0),
+            ifirst(1), ilast(1),
+            Mcells, dx[1], d_gamma, d_godunov_order,
+            sound_speed.getPointer(),
+            traced_left.getPointer(1),
+            traced_right.getPointer(1),
+            ttcelslp.getPointer(),
+            ttedgslp.getPointer(),
+            ttsound.getPointer(),
+            ttraclft.getPointer(),
+            ttracrgt.getPointer());
+
+      }  // if (d_godunov_order > 1) ...
+
+// F77_FUNC(fluxcalculation,FLUXCALCULATION)(dt,*,1,dx, to get artificial viscosity
+// F77_FUNC(fluxcalculation,FLUXCALCULATION)(dt,*,0,dx, to get NO artificial viscosity
+
+      /*
+       *  Compute preliminary fluxes at faces by solving approximate
+       *  Riemann problem using the trace states computed so far.
+       *  Inputs: P, rho, v, w^L, w^R (traced_left/right)
+       *  Output: F (flux)
+       */
+      F77_FUNC(fluxcalculation2d, FLUXCALCULATION2D) (dt, 1, 0, dx,
+         ifirst(0), ilast(0), ifirst(1), ilast(1),
+         d_gamma,
+         d_riemann_solve_int,
+         density->getPointer(),
+         velocity->getPointer(),
+         pressure->getPointer(),
+         flux->getPointer(0),
+         flux->getPointer(1),
+         traced_left.getPointer(0),
+         traced_left.getPointer(1),
+         traced_right.getPointer(0),
+         traced_right.getPointer(1));
+
+      /*
+       *  Update trace states at cell faces with transverse correction applied.
+       *  Inputs: F (flux)
+       *  Output: w^L, w^R (traced_left/right)
+       */
+      F77_FUNC(fluxcorrec, FLUXCORREC) (dt,
+         ifirst(0), ilast(0), ifirst(1), ilast(1),
+         dx, d_gamma,
+         density->getPointer(),
+         velocity->getPointer(),
+         pressure->getPointer(),
+         flux->getPointer(0),
+         flux->getPointer(1),
+         traced_left.getPointer(0),
+         traced_left.getPointer(1),
+         traced_right.getPointer(0),
+         traced_right.getPointer(1));
+
+      boundaryReset(patch, traced_left, traced_right);
+
+      /*
+       *  Re-compute fluxes with updated trace states.
+       *  Inputs: w^L, w^R (traced_left/right)
+       *  Output: F (flux)
+       */
+      F77_FUNC(fluxcalculation2d, FLUXCALCULATION2D) (dt, 0, 0, dx,
+         ifirst(0), ilast(0), ifirst(1), ilast(1),
+         d_gamma,
+         d_riemann_solve_int,
+         density->getPointer(),
+         velocity->getPointer(),
+         pressure->getPointer(),
+         flux->getPointer(0),
+         flux->getPointer(1),
+         traced_left.getPointer(0),
+         traced_left.getPointer(1),
+         traced_right.getPointer(0),
+         traced_right.getPointer(1));
+
+   }
+
+   t_compute_fluxes->stop();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute numerical approximations to flux terms using an extension     *
+ * to three dimensions of Collella's corner transport upwind approach.   *
+ * I.E. input value corner_transport = "CORNER_TRANSPORT_1"              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::compute3DFluxesWithCornerTransport1(
+   hier::Patch& patch,
+   const double dt)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(CELLG == FACEG);
+#endif
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+
+   hier::Box pbox = patch.getBox();
+   const hier::Index ifirst = pbox.lower();
+   const hier::Index ilast = pbox.upper();
+
+   tbox::Pointer<pdat::CellData<double> > density =
+      patch.getPatchData(d_density, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > velocity =
+      patch.getPatchData(d_velocity, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > pressure =
+      patch.getPatchData(d_pressure, getDataContext());
+   tbox::Pointer<pdat::FaceData<double> > flux =
+      patch.getPatchData(d_flux, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!density.isNull());
+   TBOX_ASSERT(!velocity.isNull());
+   TBOX_ASSERT(!pressure.isNull());
+   TBOX_ASSERT(!flux.isNull());
+   TBOX_ASSERT(density->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(velocity->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(pressure->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(flux->getGhostCellWidth() == d_fluxghosts);
+#endif
+
+   /*
+    * Allocate patch data for temporaries local to this routine.
+    */
+   pdat::FaceData<double> traced_left(pbox, NEQU, d_nghosts);
+   pdat::FaceData<double> traced_right(pbox, NEQU, d_nghosts);
+   pdat::CellData<double> sound_speed(pbox, 1, d_nghosts);
+   pdat::FaceData<double> temp_flux(pbox, NEQU, d_fluxghosts);
+   pdat::FaceData<double> temp_traced_left(pbox, NEQU, d_nghosts);
+   pdat::FaceData<double> temp_traced_right(pbox, NEQU, d_nghosts);
+
+   /*
+    *  Initialize traced states (w^R and w^L) with proper cell-centered values.
+    */
+   F77_FUNC(inittraceflux3d, INITTRACEFLUX3D) (ifirst(0), ilast(0),
+      ifirst(1), ilast(1),
+      ifirst(2), ilast(2),
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2));
+
+   /*
+    * If Godunov method requires slopes with order greater than one, perform
+    * characteristic tracing to compute higher-order slopes.
+    */
+   if (d_godunov_order > 1) {
+
+      /*
+       * Prepare temporary data for characteristic tracing.
+       */
+      int Mcells = 0;
+      for (int k = 0; k < d_dim.getValue(); k++) {
+         Mcells = tbox::MathUtilities<int>::Max(Mcells, pbox.numberCells(k));
+      }
+
+      // Face-centered temporary arrays
+      tbox::Array<double> ttedgslp((2 * FACEG + 1 + Mcells) * NEQU);
+      tbox::Array<double> ttraclft((2 * FACEG + 1 + Mcells) * NEQU);
+      tbox::Array<double> ttracrgt((2 * FACEG + 1 + Mcells) * NEQU);
+
+      // Cell-centered temporary arrays
+      tbox::Array<double> ttsound((2 * CELLG + Mcells));
+      tbox::Array<double> ttcelslp((2 * CELLG + Mcells) * NEQU);
+
+      /*
+       * Compute local sound speed in each computational cell.
+       */
+      F77_FUNC(computesound3d, COMPUTESOUND3D) (ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         d_gamma,
+         density->getPointer(),
+         velocity->getPointer(),
+         pressure->getPointer(),
+         sound_speed.getPointer());
+
+      /*
+       *  Apply characteristic tracing to compute initial estimate of
+       *  traces w^L and w^R at faces.
+       *  Inputs: sound_speed, w^L, w^R (traced_left/right)
+       *  Output: w^L, w^R
+       */
+      F77_FUNC(chartracing3d0, CHARTRACING3D0) (dt,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         Mcells, dx[0], d_gamma, d_godunov_order,
+         sound_speed.getPointer(),
+         traced_left.getPointer(0),
+         traced_right.getPointer(0),
+         ttcelslp.getPointer(),
+         ttedgslp.getPointer(),
+         ttsound.getPointer(),
+         ttraclft.getPointer(),
+         ttracrgt.getPointer());
+
+      F77_FUNC(chartracing3d1, CHARTRACING3D1) (dt,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         Mcells, dx[1], d_gamma, d_godunov_order,
+         sound_speed.getPointer(),
+         traced_left.getPointer(1),
+         traced_right.getPointer(1),
+         ttcelslp.getPointer(),
+         ttedgslp.getPointer(),
+         ttsound.getPointer(),
+         ttraclft.getPointer(),
+         ttracrgt.getPointer());
+
+      F77_FUNC(chartracing3d2, CHARTRACING3D2) (dt,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         Mcells, dx[2], d_gamma, d_godunov_order,
+         sound_speed.getPointer(),
+         traced_left.getPointer(2),
+         traced_right.getPointer(2),
+         ttcelslp.getPointer(),
+         ttedgslp.getPointer(),
+         ttsound.getPointer(),
+         ttraclft.getPointer(),
+         ttracrgt.getPointer());
+
+   }  // if (d_godunov_order > 1) ...
+
+   /*
+    *  Compute preliminary fluxes at faces by solving approximate
+    *  Riemann problem using the trace states computed so far.
+    *  Inputs: P, rho, v, w^L, w^R (traced_left/right)
+    *  Output: F (flux)
+    */
+//  F77_FUNC(fluxcalculation,FLUXCALCULATION)(dt,*,*,1,dx,  to do artificial viscosity
+//  F77_FUNC(fluxcalculation,FLUXCALCULATION)(dt,*,*,0,dx,  to do NO artificial viscosity
+   F77_FUNC(fluxcalculation3d, FLUXCALCULATION3D) (dt, 1, 0, 0, dx,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      d_gamma,
+      d_riemann_solve_int,
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2));
+
+   /*
+    *  Re-compute face traces to include one set of correction terms with
+    *  transverse flux differences.  Store result in temporary vectors
+    *  (i.e. temp_traced_left/right).
+    *  Inputs: F (flux), P, rho, v, w^L, w^R (traced_left/right)
+    *  Output: temp_traced_left/right
+    */
+   F77_FUNC(fluxcorrec2d, FLUXCORREC2D) (dt,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      dx, d_gamma, 1,
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2),
+      temp_traced_left.getPointer(0),
+      temp_traced_left.getPointer(1),
+      temp_traced_left.getPointer(2),
+      temp_traced_right.getPointer(0),
+      temp_traced_right.getPointer(1),
+      temp_traced_right.getPointer(2));
+
+   boundaryReset(patch, traced_left, traced_right);
+
+   /*
+    *  Compute fluxes with partially-corrected trace states.  Store
+    *  result in temporary flux vector.
+    *  Inputs: P, rho, v, temp_traced_left/right
+    *  Output: temp_flux
+    */
+   F77_FUNC(fluxcalculation3d, FLUXCALCULATION3D) (dt, 0, 1, 0, dx,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      d_gamma,
+      d_riemann_solve_int,
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      temp_flux.getPointer(0),
+      temp_flux.getPointer(1),
+      temp_flux.getPointer(2),
+      temp_traced_left.getPointer(0),
+      temp_traced_left.getPointer(1),
+      temp_traced_left.getPointer(2),
+      temp_traced_right.getPointer(0),
+      temp_traced_right.getPointer(1),
+      temp_traced_right.getPointer(2));
+   /*
+    *  Compute face traces with other transverse correction flux
+    *  difference terms included.  Store result in temporary vectors
+    *  (i.e. temp_traced_left/right).
+    *  Inputs: F (flux), P, rho, v, w^L, w^R (traced_left/right)
+    *  Output: temp_traced_left/right
+    */
+   F77_FUNC(fluxcorrec2d, FLUXCORREC2D) (dt,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      dx, d_gamma, -1,
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2),
+      temp_traced_left.getPointer(0),
+      temp_traced_left.getPointer(1),
+      temp_traced_left.getPointer(2),
+      temp_traced_right.getPointer(0),
+      temp_traced_right.getPointer(1),
+      temp_traced_right.getPointer(2));
+
+   boundaryReset(patch, traced_left, traced_right);
+
+   /*
+    *  Compute final predicted fluxes with both sets of transverse flux
+    *  differences included.  Store the result in regular flux vector.
+    *  NOTE:  the fact that we store  these fluxes in the regular (i.e.
+    *  not temporary) flux vector does NOT indicate this is the final result.
+    *  Rather, the flux vector is used as a convenient storage location.
+    *  Inputs: P, rho, v, temp_traced_left/right
+    *  Output: flux
+    */
+   F77_FUNC(fluxcalculation3d, FLUXCALCULATION3D) (dt, 1, 0, 0, dx,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      d_gamma,
+      d_riemann_solve_int,
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      temp_traced_left.getPointer(0),
+      temp_traced_left.getPointer(1),
+      temp_traced_left.getPointer(2),
+      temp_traced_right.getPointer(0),
+      temp_traced_right.getPointer(1),
+      temp_traced_right.getPointer(2));
+   /*
+    *  Compute the final trace state vectors at cell faces using transverse
+    *  differences of final predicted fluxes.  Store the result in w^L
+    *  (traced_left) and w^R (traced_right) vectors.
+    *  Inputs: temp_flux, flux
+    *  Output: w^L, w^R (traced_left/right)
+    */
+   F77_FUNC(fluxcorrec3d, FLUXCORREC3D) (dt,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      dx, d_gamma,
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      temp_flux.getPointer(0),
+      temp_flux.getPointer(1),
+      temp_flux.getPointer(2),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2));
+
+   /*
+    *  Final flux calculation using corrected trace states.
+    *  Inputs:  w^L, w^R (traced_left/right)
+    *  Output:  F (flux)
+    */
+   F77_FUNC(fluxcalculation3d, FLUXCALCULATION3D) (dt, 0, 0, 0, dx,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      d_gamma,
+      d_riemann_solve_int,
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2));
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute numerical approximations to flux terms using John             *
+ * Trangenstein's interpretation of the three-dimensional version of     *
+ * Collella's corner transport upwind approach.                          *
+ * I.E. input value corner_transport = "CORNER_TRANSPORT_2"              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::compute3DFluxesWithCornerTransport2(
+   hier::Patch& patch,
+   const double dt)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(CELLG == FACEG);
+#endif
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+
+   hier::Box pbox = patch.getBox();
+   const hier::Index ifirst = pbox.lower();
+   const hier::Index ilast = pbox.upper();
+
+   tbox::Pointer<pdat::CellData<double> > density =
+      patch.getPatchData(d_density, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > velocity =
+      patch.getPatchData(d_velocity, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > pressure =
+      patch.getPatchData(d_pressure, getDataContext());
+   tbox::Pointer<pdat::FaceData<double> > flux =
+      patch.getPatchData(d_flux, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!density.isNull());
+   TBOX_ASSERT(!velocity.isNull());
+   TBOX_ASSERT(!pressure.isNull());
+   TBOX_ASSERT(!flux.isNull());
+   TBOX_ASSERT(density->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(velocity->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(pressure->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(flux->getGhostCellWidth() == d_fluxghosts);
+#endif
+
+   /*
+    * Allocate patch data for temporaries local to this routine.
+    */
+   pdat::FaceData<double> traced_left(pbox, NEQU, d_nghosts);
+   pdat::FaceData<double> traced_right(pbox, NEQU, d_nghosts);
+   pdat::CellData<double> sound_speed(pbox, 1, d_nghosts);
+   pdat::FaceData<double> temp_flux(pbox, NEQU, d_fluxghosts);
+   pdat::CellData<double> third_state(pbox, NEQU, d_nghosts);
+
+   /*
+    *  Initialize traced states (w^R and w^L) with proper cell-centered values.
+    */
+   F77_FUNC(inittraceflux3d, INITTRACEFLUX3D) (ifirst(0), ilast(0),
+      ifirst(1), ilast(1),
+      ifirst(2), ilast(2),
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2));
+
+   /*
+    *  Compute fluxes at faces by solving approximate Riemann problem
+    *  using initial trace states.
+    *  Inputs: P, rho, v, w^L, w^R (traced_left/right)
+    *  Output: F (flux)
+    */
+//  F77_FUNC(fluxcalculation,FLUXCALCULATION)(dt,*,*,1,dx,  to do artificial viscosity
+//  F77_FUNC(fluxcalculation,FLUXCALCULATION)(dt,*,*,0,dx,  to do NO artificial viscosity
+   F77_FUNC(fluxcalculation3d, FLUXCALCULATION3D) (dt, 1, 1, 0, dx,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      d_gamma,
+      d_riemann_solve_int,
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2));
+
+   /*
+    * If Godunov method requires slopes with order greater than one, perform
+    * characteristic tracing to compute higher-order slopes.
+    */
+   if (d_godunov_order > 1) {
+
+      /*
+       * Prepare temporary data for characteristic tracing.
+       */
+      int Mcells = 0;
+      for (int k = 0; k < d_dim.getValue(); k++) {
+         Mcells = tbox::MathUtilities<int>::Max(Mcells, pbox.numberCells(k));
+      }
+
+      // Face-centered temporary arrays
+      tbox::Array<double> ttedgslp((2 * FACEG + 1 + Mcells) * NEQU);
+      tbox::Array<double> ttraclft((2 * FACEG + 1 + Mcells) * NEQU);
+      tbox::Array<double> ttracrgt((2 * FACEG + 1 + Mcells) * NEQU);
+
+      // Cell-centered temporary arrays
+      tbox::Array<double> ttsound((2 * CELLG + Mcells));
+      tbox::Array<double> ttcelslp((2 * CELLG + Mcells) * NEQU);
+
+      /*
+       * Compute local sound speed in each computational cell.
+       */
+      F77_FUNC(computesound3d, COMPUTESOUND3D) (ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         d_gamma,
+         density->getPointer(),
+         velocity->getPointer(),
+         pressure->getPointer(),
+         sound_speed.getPointer());
+
+      /*
+       *  Apply characteristic tracing to update traces w^L and w^R at faces.
+       *  Inputs: sound_speed, w^L, w^R (traced_left/right)
+       *  Output: w^L, w^R
+       */
+      F77_FUNC(chartracing3d0, CHARTRACING3D0) (dt,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         Mcells, dx[0], d_gamma, d_godunov_order,
+         sound_speed.getPointer(),
+         traced_left.getPointer(0),
+         traced_right.getPointer(0),
+         ttcelslp.getPointer(),
+         ttedgslp.getPointer(),
+         ttsound.getPointer(),
+         ttraclft.getPointer(),
+         ttracrgt.getPointer());
+
+      F77_FUNC(chartracing3d1, CHARTRACING3D1) (dt,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         Mcells, dx[1], d_gamma, d_godunov_order,
+         sound_speed.getPointer(),
+         traced_left.getPointer(1),
+         traced_right.getPointer(1),
+         ttcelslp.getPointer(),
+         ttedgslp.getPointer(),
+         ttsound.getPointer(),
+         ttraclft.getPointer(),
+         ttracrgt.getPointer());
+
+      F77_FUNC(chartracing3d2, CHARTRACING3D2) (dt,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         Mcells, dx[2], d_gamma, d_godunov_order,
+         sound_speed.getPointer(),
+         traced_left.getPointer(2),
+         traced_right.getPointer(2),
+         ttcelslp.getPointer(),
+         ttedgslp.getPointer(),
+         ttsound.getPointer(),
+         ttraclft.getPointer(),
+         ttracrgt.getPointer());
+
+   } // if (d_godunov_order > 1) ...
+
+   for (int idir = 0; idir < d_dim.getValue(); idir++) {
+
+      /*
+       *    Approximate traces at cell centers (in idir direction);
+       * i.e.,  "1/3 state".
+       *    Inputs:  F (flux), rho, v, P
+       *    Output:  third_state
+       */
+      F77_FUNC(onethirdstate, ONETHIRDSTATE) (dt, dx, idir,
+         ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+         d_gamma,
+         density->getPointer(),
+         velocity->getPointer(),
+         pressure->getPointer(),
+         flux->getPointer(0),
+         flux->getPointer(1),
+         flux->getPointer(2),
+         third_state.getPointer());
+
+      /*
+       *    Compute fluxes using 1/3 state traces, in the two directions OTHER
+       *    than idir.
+       *    Inputs:  third_state, rho, v, P
+       *    Output:  temp_flux (only directions other than idir are modified)
+       */
+      F77_FUNC(fluxthird, FLUXTHIRD) (dt, dx, idir,
+         ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+         d_gamma,
+         d_riemann_solve_int,
+         density->getPointer(),
+         velocity->getPointer(),
+         pressure->getPointer(),
+         third_state.getPointer(),
+         temp_flux.getPointer(0),
+         temp_flux.getPointer(1),
+         temp_flux.getPointer(2));
+      /*
+       *    Compute transverse corrections for the traces in the two
+       *    directions (OTHER than idir) using the flux differences
+       *    computed in those directions.
+       *    Inputs:  temp_flux, rho, v, P
+       *    Output:  w^L, w^R (traced_left/right)
+       */
+      F77_FUNC(fluxcorrecjt, FLUXCORRECJT) (dt, dx, idir,
+         ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+         d_gamma,
+         density->getPointer(),
+         velocity->getPointer(),
+         pressure->getPointer(),
+         temp_flux.getPointer(0),
+         temp_flux.getPointer(1),
+         temp_flux.getPointer(2),
+         traced_left.getPointer(0),
+         traced_left.getPointer(1),
+         traced_left.getPointer(2),
+         traced_right.getPointer(0),
+         traced_right.getPointer(1),
+         traced_right.getPointer(2));
+
+   }  // loop over directions...
+
+   boundaryReset(patch, traced_left, traced_right);
+
+   /*
+    *  Final flux calculation using corrected trace states.
+    *  Inputs:  w^L, w^R (traced_left/right)
+    *  Output:  F (flux)
+    */
+   F77_FUNC(fluxcalculation3d, FLUXCALCULATION3D) (dt, 0, 0, 0, dx,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      d_gamma,
+      d_riemann_solve_int,
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2));
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Update Euler solution variables by performing a conservative          *
+ * difference with the fluxes calculated in computeFluxesOnPatch().      *
+ * Although, "primitive" variables are maintained (i.e., density,        *
+ * velocity, pressure), "conserved" variables (i.e., density,            *
+ * momentum, total energy) are conserved.                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::conservativeDifferenceOnPatch(
+   hier::Patch& patch,
+   const double time,
+   const double dt,
+   bool at_syncronization)
+{
+   (void)time;
+   (void)dt;
+   (void)at_syncronization;
+
+   t_conservdiff->start();
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+
+   hier::Box pbox = patch.getBox();
+   const hier::Index ifirst = pbox.lower();
+   const hier::Index ilast = pbox.upper();
+
+   tbox::Pointer<pdat::FaceData<double> > flux =
+      patch.getPatchData(d_flux, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > density =
+      patch.getPatchData(d_density, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > velocity =
+      patch.getPatchData(d_velocity, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > pressure =
+      patch.getPatchData(d_pressure, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!density.isNull());
+   TBOX_ASSERT(!velocity.isNull());
+   TBOX_ASSERT(!pressure.isNull());
+   TBOX_ASSERT(!flux.isNull());
+   TBOX_ASSERT(density->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(velocity->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(pressure->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(flux->getGhostCellWidth() == d_fluxghosts);
+#endif
+
+   if (d_dim == tbox::Dimension(2)) {
+      F77_FUNC(consdiff2d, CONSDIFF2D) (ifirst(0), ilast(0), ifirst(1), ilast(1),
+         dx,
+         flux->getPointer(0),
+         flux->getPointer(1),
+         d_gamma,
+         density->getPointer(),
+         velocity->getPointer(),
+         pressure->getPointer());
+   } else if (d_dim == tbox::Dimension(3)) {
+      F77_FUNC(consdiff3d, CONSDIFF3D) (ifirst(0), ilast(0), ifirst(1), ilast(1),
+         ifirst(2), ilast(2), dx,
+         flux->getPointer(0),
+         flux->getPointer(1),
+         flux->getPointer(2),
+         d_gamma,
+         density->getPointer(),
+         velocity->getPointer(),
+         pressure->getPointer());
+   }
+
+   t_conservdiff->stop();
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Reset physical boundary values for special cases, such as those       *
+ * involving reflective boundary conditions and when the "STEP"          *
+ * problem is run.                                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::boundaryReset(
+   hier::Patch& patch,
+   pdat::FaceData<double>& traced_left,
+   pdat::FaceData<double>& traced_right) const
+{
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+   int i, idir;
+   bool bdry_cell = true;
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   hier::BoxArray domain_boxes(d_dim);
+   d_grid_geometry->computePhysicalDomain(domain_boxes, patch_geom->getRatio());
+   int num_domain_boxes = domain_boxes.getNumberOfBoxes();
+   const double* dx = patch_geom->getDx();
+   const double* xpatchhi = patch_geom->getXUpper();
+   const double* xdomainhi = d_grid_geometry->getXUpper();
+
+   pdat::CellIndex icell(ifirst);
+   hier::BoxArray bdrybox(d_dim, 2 * d_dim.getValue());
+   hier::Index ibfirst = ifirst;
+   hier::Index iblast = ilast;
+   int bdry_case = 0;
+
+   for (idir = 0; idir < d_dim.getValue(); idir++) {
+      ibfirst(idir) = ifirst(idir) - 1;
+      iblast(idir) = ifirst(idir) - 1;
+      bdrybox[2 * idir] = hier::Box(ibfirst, iblast);
+
+      ibfirst(idir) = ilast(idir) + 1;
+      iblast(idir) = ilast(idir) + 1;
+      bdrybox[2 * idir + 1] = hier::Box(ibfirst, iblast);
+   }
+
+   for (idir = 0; idir < d_dim.getValue(); idir++) {
+      int bside = 2 * idir;
+      if (d_dim == tbox::Dimension(2)) {
+         bdry_case = d_master_bdry_edge_conds[bside];
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         bdry_case = d_master_bdry_face_conds[bside];
+      }
+      if (bdry_case == REFLECT_BC) {
+         for (pdat::CellIterator ic(bdrybox[bside]); ic; ic++) {
+            for (i = 0; i < num_domain_boxes; i++) {
+               if (domain_boxes[i].contains(ic()))
+                  bdry_cell = false;
+            }
+            if (bdry_cell) {
+               pdat::FaceIndex sidein = pdat::FaceIndex(ic(), idir, 1);
+               (traced_left)(sidein, 0) = (traced_right)(sidein, 0);
+            }
+         }
+      }
+
+      int bnode = 2 * idir + 1;
+      if (d_dim == tbox::Dimension(2)) {
+         bdry_case = d_master_bdry_edge_conds[bnode];
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         bdry_case = d_master_bdry_face_conds[bnode];
+      }
+// BEGIN SIMPLE-MINDED FIX FOR STEP PROBLEM
+      if ((d_data_problem == "STEP") && (bnode == 1) &&
+          (tbox::MathUtilities<double>::Abs(xpatchhi[0] - xdomainhi[0]) < dx[0])) {
+         bdry_case = FLOW_BC;
+      }
+// END SIMPLE-MINDED FIX FOR STEP PROBLEM
+      if (bdry_case == REFLECT_BC) {
+         for (pdat::CellIterator ic(bdrybox[bnode]); ic; ic++) {
+            for (i = 0; i < num_domain_boxes; i++) {
+               if (domain_boxes[i].contains(ic()))
+                  bdry_cell = false;
+            }
+            if (bdry_cell) {
+               pdat::FaceIndex sidein = pdat::FaceIndex(ic(), idir, 0);
+               (traced_right)(sidein, 0) = (traced_left)(sidein, 0);
+            }
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Refine velocity and pressure by conservatively refining               *
+ * momentum and total energy.                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+hier::IntVector Euler::getRefineOpStencilWidth() const
+{
+   return hier::IntVector(d_dim, 1);
+}
+
+void Euler::postprocessRefine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio)
+{
+
+   tbox::Pointer<pdat::CellData<double> > cdensity =
+      coarse.getPatchData(d_density, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > cvelocity =
+      coarse.getPatchData(d_velocity, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > cpressure =
+      coarse.getPatchData(d_pressure, getDataContext());
+
+   tbox::Pointer<pdat::CellData<double> > fdensity =
+      fine.getPatchData(d_density, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > fvelocity =
+      fine.getPatchData(d_velocity, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > fpressure =
+      fine.getPatchData(d_pressure, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!cdensity.isNull());
+   TBOX_ASSERT(!cvelocity.isNull());
+   TBOX_ASSERT(!cpressure.isNull());
+   TBOX_ASSERT(!fdensity.isNull());
+   TBOX_ASSERT(!fvelocity.isNull());
+   TBOX_ASSERT(!fpressure.isNull());
+
+   hier::IntVector gccheck = cdensity->getGhostCellWidth();
+   TBOX_ASSERT(cvelocity->getGhostCellWidth() == gccheck);
+   TBOX_ASSERT(cpressure->getGhostCellWidth() == gccheck);
+
+   gccheck = fdensity->getGhostCellWidth();
+   TBOX_ASSERT(fvelocity->getGhostCellWidth() == gccheck);
+   TBOX_ASSERT(fpressure->getGhostCellWidth() == gccheck);
+#endif
+
+   const hier::Box cgbox(cdensity->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdensity->getGhostBox().lower();
+   const hier::Index fihi = fdensity->getGhostBox().upper();
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+   const tbox::Pointer<geom::CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+
+   const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+   const hier::Index ifirstf = fine_box.lower();
+   const hier::Index ilastf = fine_box.upper();
+
+   const hier::IntVector cons_ghosts(d_dim, 1);
+   pdat::CellData<double> conserved(coarse_box, 1, cons_ghosts);
+
+   const hier::IntVector tmp_ghosts(d_dim, 0);
+
+   double* diff0 = new double[coarse_box.numberCells(0) + 1];
+   pdat::CellData<double> slope0(coarse_box, 1, tmp_ghosts);
+
+   double* diff1 = new double[coarse_box.numberCells(1) + 1];
+   pdat::CellData<double> slope1(coarse_box, 1, tmp_ghosts);
+
+   double* diff2 = d_dim ==
+      tbox::Dimension(3) ? new double[coarse_box.numberCells(2) + 1] : NULL;
+   pdat::CellData<double> slope2(coarse_box, 1, tmp_ghosts);
+
+   if (d_dim == tbox::Dimension(2)) {
+      pdat::CellData<double> flat0(coarse_box, 1, tmp_ghosts);
+      pdat::CellData<double> flat1(coarse_box, 1, tmp_ghosts);
+      int mc = cihi(0) - cilo(0) + 1;
+      mc = tbox::MathUtilities<int>::Max(mc, cihi(1) - cilo(1) + 1);
+      double* tflat = new double[mc];
+      double* tflat2 = new double[mc];
+      double* tsound = new double[mc];
+      double* tdensc = new double[mc];
+      double* tpresc = new double[mc];
+      double* tvelc = new double[mc];
+      F77_FUNC(conservlinint2d, CONSERVLININT2D) (ifirstc(0), ifirstc(1),
+         ilastc(0), ilastc(1),                                                              /* input */
+         ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+         cilo(0), cilo(1), cihi(0), cihi(1),
+         filo(0), filo(1), fihi(0), fihi(1),
+         &ratio[0],
+         cgeom->getDx(),
+         fgeom->getDx(),
+         d_gamma,
+         cdensity->getPointer(),
+         fdensity->getPointer(),
+         cvelocity->getPointer(),
+         cpressure->getPointer(),
+         fvelocity->getPointer(),                                 /* output */
+         fpressure->getPointer(),
+         conserved.getPointer(),                                 /* temporaries */
+         tflat, tflat2, tsound, mc,
+         tdensc, tpresc, tvelc,
+         flat0.getPointer(),
+         flat1.getPointer(),
+         diff0, slope0.getPointer(),
+         diff1, slope1.getPointer());
+      delete[] tflat;
+      delete[] tflat2;
+      delete[] tsound;
+      delete[] tdensc;
+      delete[] tpresc;
+      delete[] tvelc;
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      pdat::CellData<double> flat0(coarse_box, 1, tmp_ghosts);
+      pdat::CellData<double> flat1(coarse_box, 1, tmp_ghosts);
+      pdat::CellData<double> flat2(coarse_box, 1, tmp_ghosts);
+      int mc = cihi(0) - cilo(0) + 1;
+      mc = tbox::MathUtilities<int>::Max(mc, cihi(1) - cilo(1) + 1);
+      mc = tbox::MathUtilities<int>::Max(mc, cihi(2) - cilo(2) + 1);
+      double* tflat = new double[mc];
+      double* tflat2 = new double[mc];
+      double* tsound = new double[mc];
+      double* tdensc = new double[mc];
+      double* tpresc = new double[mc];
+      double* tvelc = new double[mc];
+      F77_FUNC(conservlinint3d, CONSERVLININT3D) (ifirstc(0), ifirstc(1),
+         ifirstc(2),                                                                      /* input */
+         ilastc(0), ilastc(1), ilastc(2),
+         ifirstf(0), ifirstf(1), ifirstf(2),
+         ilastf(0), ilastf(1), ilastf(2),
+         cilo(0), cilo(1), cilo(2), cihi(0), cihi(1), cihi(2),
+         filo(0), filo(1), filo(2), fihi(0), fihi(1), fihi(2),
+         &ratio[0],
+         cgeom->getDx(),
+         fgeom->getDx(),
+         d_gamma,
+         cdensity->getPointer(),
+         fdensity->getPointer(),
+         cvelocity->getPointer(),
+         cpressure->getPointer(),
+         fvelocity->getPointer(),                                 /* output */
+         fpressure->getPointer(),
+         conserved.getPointer(),                                 /* temporaries */
+         tflat, tflat2, tsound, mc,
+         tdensc, tpresc, tvelc,
+         flat0.getPointer(),
+         flat1.getPointer(),
+         flat2.getPointer(),
+         diff0, slope0.getPointer(),
+         diff1, slope1.getPointer(),
+         diff2, slope2.getPointer());
+      delete[] tflat;
+      delete[] tflat2;
+      delete[] tsound;
+      delete[] tdensc;
+      delete[] tpresc;
+      delete[] tvelc;
+   }
+
+   delete[] diff0;
+   delete[] diff1;
+   if (d_dim == tbox::Dimension(3)) {
+      delete[] diff2;
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Coarsen velocity and pressure by conservatively coarsening            *
+ * momentum and total energy.                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+hier::IntVector Euler::getCoarsenOpStencilWidth() const
+{
+   return hier::IntVector(d_dim, 0);
+}
+
+void Euler::postprocessCoarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio)
+{
+
+   tbox::Pointer<pdat::CellData<double> > fdensity = fine.getPatchData(
+         d_density, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > fvelocity = fine.getPatchData(
+         d_velocity, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > fpressure = fine.getPatchData(
+         d_pressure, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > cdensity = coarse.getPatchData(
+         d_density, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > cvelocity = coarse.getPatchData(
+         d_velocity, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > cpressure = coarse.getPatchData(
+         d_pressure, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!cdensity.isNull());
+   TBOX_ASSERT(!cvelocity.isNull());
+   TBOX_ASSERT(!cpressure.isNull());
+   TBOX_ASSERT(!fdensity.isNull());
+   TBOX_ASSERT(!fvelocity.isNull());
+   TBOX_ASSERT(!fpressure.isNull());
+
+   hier::IntVector gccheck = cdensity->getGhostCellWidth();
+   TBOX_ASSERT(cvelocity->getGhostCellWidth() == gccheck);
+   TBOX_ASSERT(cpressure->getGhostCellWidth() == gccheck);
+
+   gccheck = fdensity->getGhostCellWidth();
+   TBOX_ASSERT(fvelocity->getGhostCellWidth() == gccheck);
+   TBOX_ASSERT(fpressure->getGhostCellWidth() == gccheck);
+#endif
+
+   const hier::Index filo = fdensity->getGhostBox().lower();
+   const hier::Index fihi = fdensity->getGhostBox().upper();
+   const hier::Index cilo = cdensity->getGhostBox().lower();
+   const hier::Index cihi = cdensity->getGhostBox().upper();
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+   const tbox::Pointer<geom::CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+
+   const hier::Box fine_box = hier::Box::refine(coarse_box, ratio);
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+   const hier::Index ifirstf = fine_box.lower();
+   const hier::Index ilastf = fine_box.upper();
+
+   const hier::IntVector cons_ghosts(d_dim, 0);
+   pdat::CellData<double> conserved(fine_box, 1, cons_ghosts);
+
+   if (d_dim == tbox::Dimension(2)) {
+      F77_FUNC(conservavg2d, CONSERVAVG2D) (ifirstf(0), ifirstf(1), ilastf(0),
+         ilastf(1),                                                                   /* input */
+         ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+         filo(0), filo(1), fihi(0), fihi(1),
+         cilo(0), cilo(1), cihi(0), cihi(1),
+         &ratio[0],
+         fgeom->getDx(),
+         cgeom->getDx(),
+         d_gamma,
+         fdensity->getPointer(),
+         cdensity->getPointer(),
+         fvelocity->getPointer(),
+         fpressure->getPointer(),
+         cvelocity->getPointer(),                               /* output */
+         cpressure->getPointer(),
+         conserved.getPointer());                              /* temporary */
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      F77_FUNC(conservavg3d, CONSERVAVG3D) (ifirstf(0), ifirstf(1), ifirstf(2),       /* input */
+         ilastf(0), ilastf(1), ilastf(2),
+         ifirstc(0), ifirstc(1), ifirstc(2),
+         ilastc(0), ilastc(1), ilastc(2),
+         filo(0), filo(1), filo(2), fihi(0), fihi(1), fihi(2),
+         cilo(0), cilo(1), cilo(2), cihi(0), cihi(1), cihi(2),
+         &ratio[0],
+         fgeom->getDx(),
+         cgeom->getDx(),
+         d_gamma,
+         fdensity->getPointer(),
+         cdensity->getPointer(),
+         fvelocity->getPointer(),
+         fpressure->getPointer(),
+         cvelocity->getPointer(),                               /* output */
+         cpressure->getPointer(),
+         conserved.getPointer());
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set the data in ghost cells corresponding to physical boundary        *
+ * conditions.  Note that boundary geometry configuration information    *
+ * (i.e., faces, edges, and nodes) is obtained from the patch geometry   *
+ * object owned by the patch.                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::setPhysicalBoundaryConditions(
+   hier::Patch& patch,
+   const double fill_time,
+   const hier::IntVector& ghost_width_to_fill)
+{
+   (void)fill_time;
+   t_setphysbcs->start();
+
+   tbox::Pointer<pdat::CellData<double> > density =
+      patch.getPatchData(d_density, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > velocity =
+      patch.getPatchData(d_velocity, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > pressure =
+      patch.getPatchData(d_pressure, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!density.isNull());
+   TBOX_ASSERT(!velocity.isNull());
+   TBOX_ASSERT(!pressure.isNull());
+#endif
+   hier::IntVector ghost_cells = density->getGhostCellWidth();
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(velocity->getGhostCellWidth() == ghost_cells);
+   TBOX_ASSERT(pressure->getGhostCellWidth() == ghost_cells);
+#endif
+
+   if (d_dim == tbox::Dimension(2)) {
+
+      /*
+       * Set boundary conditions for cells corresponding to patch edges.
+       *
+       * Note: We apply a simple-minded adjustment for the "STEP" problem
+       *       so that the right edge of the domain gets (out)FLOW conditions
+       *       whereas the right edge at the step gets REFLECT condtions (from input),
+       */
+      tbox::Array<int> tmp_edge_scalar_bcond(NUM_2D_EDGES);
+      tbox::Array<int> tmp_edge_vector_bcond(NUM_2D_EDGES);
+      for (int i = 0; i < NUM_2D_EDGES; i++) {
+         tmp_edge_scalar_bcond[i] = d_scalar_bdry_edge_conds[i];
+         tmp_edge_vector_bcond[i] = d_vector_bdry_edge_conds[i];
+      }
+
+      if (d_data_problem == "STEP") {
+
+         const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+            patch.getPatchGeometry();
+         const double* dx = patch_geom->getDx();
+         const double* xpatchhi = patch_geom->getXUpper();
+         const double* xdomainhi = d_grid_geometry->getXUpper();
+
+         if (tbox::MathUtilities<double>::Abs(xpatchhi[0] - xdomainhi[0]) <
+             dx[0]) {
+            tmp_edge_scalar_bcond[XHI] = FLOW_BC;
+            tmp_edge_vector_bcond[XHI] = FLOW_BC;
+         }
+
+      }
+
+      appu::CartesianBoundaryUtilities2::
+      fillEdgeBoundaryData("density", density,
+         patch,
+         ghost_width_to_fill,
+         tmp_edge_scalar_bcond,
+         d_bdry_edge_density);
+      appu::CartesianBoundaryUtilities2::
+      fillEdgeBoundaryData("velocity", velocity,
+         patch,
+         ghost_width_to_fill,
+         tmp_edge_vector_bcond,
+         d_bdry_edge_velocity);
+      appu::CartesianBoundaryUtilities2::
+      fillEdgeBoundaryData("pressure", pressure,
+         patch,
+         ghost_width_to_fill,
+         tmp_edge_scalar_bcond,
+         d_bdry_edge_pressure);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+#if CHECK_BDRY_DATA
+      checkBoundaryData(EDGE2D_BDRY_TYPE, patch, ghost_width_to_fill,
+         tmp_edge_scalar_bcond, tmp_edge_vector_bcond);
+#endif
+#endif
+
+      /*
+       *  Set boundary conditions for cells corresponding to patch nodes.
+       */
+
+      appu::CartesianBoundaryUtilities2::
+      fillNodeBoundaryData("density", density,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_node_conds,
+         d_bdry_edge_density);
+      appu::CartesianBoundaryUtilities2::
+      fillNodeBoundaryData("velocity", velocity,
+         patch,
+         ghost_width_to_fill,
+         d_vector_bdry_node_conds,
+         d_bdry_edge_velocity);
+      appu::CartesianBoundaryUtilities2::
+      fillNodeBoundaryData("pressure", pressure,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_node_conds,
+         d_bdry_edge_pressure);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+#if CHECK_BDRY_DATA
+      checkBoundaryData(NODE2D_BDRY_TYPE, patch, ghost_width_to_fill,
+         d_scalar_bdry_node_conds, d_vector_bdry_node_conds);
+#endif
+#endif
+
+   }
+
+   if (d_dim == tbox::Dimension(3)) {
+
+      /*
+       *  Set boundary conditions for cells corresponding to patch faces.
+       */
+
+      appu::CartesianBoundaryUtilities3::
+      fillFaceBoundaryData("density", density,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_face_conds,
+         d_bdry_face_density);
+      appu::CartesianBoundaryUtilities3::
+      fillFaceBoundaryData("velocity", velocity,
+         patch,
+         ghost_width_to_fill,
+         d_vector_bdry_face_conds,
+         d_bdry_face_velocity);
+      appu::CartesianBoundaryUtilities3::
+      fillFaceBoundaryData("pressure", pressure,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_face_conds,
+         d_bdry_face_pressure);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+#if CHECK_BDRY_DATA
+      checkBoundaryData(FACE3D_BDRY_TYPE, patch, ghost_width_to_fill,
+         d_scalar_bdry_face_conds, d_vector_bdry_face_conds);
+#endif
+#endif
+
+      /*
+       *  Set boundary conditions for cells corresponding to patch edges.
+       */
+
+      appu::CartesianBoundaryUtilities3::
+      fillEdgeBoundaryData("density", density,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_edge_conds,
+         d_bdry_face_density);
+      appu::CartesianBoundaryUtilities3::
+      fillEdgeBoundaryData("velocity", velocity,
+         patch,
+         ghost_width_to_fill,
+         d_vector_bdry_edge_conds,
+         d_bdry_face_velocity);
+      appu::CartesianBoundaryUtilities3::
+      fillEdgeBoundaryData("pressure", pressure,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_edge_conds,
+         d_bdry_face_pressure);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+#if CHECK_BDRY_DATA
+      checkBoundaryData(EDGE3D_BDRY_TYPE, patch, ghost_width_to_fill,
+         d_scalar_bdry_edge_conds, d_vector_bdry_edge_conds);
+#endif
+#endif
+
+      /*
+       *  Set boundary conditions for cells corresponding to patch nodes.
+       */
+
+      appu::CartesianBoundaryUtilities3::
+      fillNodeBoundaryData("density", density,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_node_conds,
+         d_bdry_face_density);
+      appu::CartesianBoundaryUtilities3::
+      fillNodeBoundaryData("velocity", velocity,
+         patch,
+         ghost_width_to_fill,
+         d_vector_bdry_node_conds,
+         d_bdry_face_velocity);
+      appu::CartesianBoundaryUtilities3::
+      fillNodeBoundaryData("pressure", pressure,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_node_conds,
+         d_bdry_face_pressure);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+#if CHECK_BDRY_DATA
+      checkBoundaryData(NODE3D_BDRY_TYPE, patch, ghost_width_to_fill,
+         d_scalar_bdry_node_conds, d_scalar_bdry_node_conds);
+#endif
+#endif
+
+   }
+
+   t_setphysbcs->stop();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Tag cells for refinement using gradient detector.  Tagging criteria   *
+ * defined in input.                                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::tagGradientDetectorCells(
+   hier::Patch& patch,
+   const double regrid_time,
+   const bool initial_error,
+   const int tag_indx,
+   const bool uses_richardson_extrapolation_too)
+{
+   (void)initial_error;
+
+   t_taggradient->start();
+
+   const int error_level_number = patch.getPatchLevelNumber();
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+
+   tbox::Pointer<pdat::CellData<int> > tags = patch.getPatchData(tag_indx);
+
+   hier::Box pbox = patch.getBox();
+   hier::BoxArray domain_boxes(d_dim);
+   d_grid_geometry->computePhysicalDomain(domain_boxes, patch_geom->getRatio());
+   /*
+    * Construct domain bounding box
+    */
+   hier::Box domain(d_dim);
+   for (int i = 0; i < domain_boxes.getNumberOfBoxes(); i++) {
+      domain += domain_boxes[i];
+   }
+
+   const hier::Index domfirst = domain.lower();
+   const hier::Index domlast = domain.upper();
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+
+   /*
+    * Create a set of temporary tags and set to untagged value.
+    */
+
+   tbox::Pointer<pdat::CellData<int> > temp_tags(new pdat::CellData<int>(
+                                                    pbox,
+                                                    1,
+                                                    d_nghosts));
+   temp_tags->fillAll(FALSE);
+
+   if (d_dim == tbox::Dimension(2)) {
+      /*
+       * Problem specific criteria for step case.
+       */
+      if (initial_error && d_data_problem == "STEP") {
+         if (error_level_number < 2) {
+            hier::Box tagbox(hier::Index(9, 0), hier::Index(9, 3));
+            if (error_level_number == 1) {
+               tagbox.refine(hier::IntVector(d_dim, 2));
+            }
+            hier::Box ibox = pbox * tagbox;
+
+            for (pdat::CellIterator itc(ibox); itc; itc++) {
+               (*temp_tags)(itc(), 0) = TRUE;
+            }
+         }
+      }
+   }
+
+   /*
+    * Possible tagging criteria includes
+    *    DENSITY_DEVIATION, DENSITY_GRADIENT, DENSITY_SHOCK
+    *    PRESSURE_DEVIATION, PRESSURE_GRADIENT, PRESSURE_SHOCK
+    * The criteria is specified over a time interval.
+    *
+    * Loop over criteria provided and check to make sure we are in the
+    * specified time interval.  If so, apply appropriate tagging for
+    * the level.
+    */
+   for (int ncrit = 0; ncrit < d_refinement_criteria.getSize(); ncrit++) {
+
+      string ref = d_refinement_criteria[ncrit];
+      tbox::Pointer<pdat::CellData<double> > var;
+      int size = 0;
+      double tol = 0.;
+      double onset = 0.;
+      double dev = 0.;
+      bool time_allowed = false;
+
+      if (ref == "DENSITY_DEVIATION") {
+         var = patch.getPatchData(d_density, getDataContext());
+         size = d_density_dev_tol.getSize();
+         tol = ((error_level_number < size)
+                ? d_density_dev_tol[error_level_number]
+                : d_density_dev_tol[size - 1]);
+         size = d_density_dev.getSize();
+         dev = ((error_level_number < size)
+                ? d_density_dev[error_level_number]
+                : d_density_dev[size - 1]);
+         size = d_density_dev_time_min.getSize();
+         double time_min = ((error_level_number < size)
+                            ? d_density_dev_time_min[error_level_number]
+                            : d_density_dev_time_min[size - 1]);
+         size = d_density_dev_time_max.getSize();
+         double time_max = ((error_level_number < size)
+                            ? d_density_dev_time_max[error_level_number]
+                            : d_density_dev_time_max[size - 1]);
+         time_allowed = (time_min <= regrid_time) && (time_max > regrid_time);
+      }
+
+      if (ref == "DENSITY_GRADIENT") {
+         var = patch.getPatchData(d_density, getDataContext());
+         size = d_density_grad_tol.getSize();
+         tol = ((error_level_number < size)
+                ? d_density_grad_tol[error_level_number]
+                : d_density_grad_tol[size - 1]);
+         size = d_density_grad_time_min.getSize();
+         double time_min = ((error_level_number < size)
+                            ? d_density_grad_time_min[error_level_number]
+                            : d_density_grad_time_min[size - 1]);
+         size = d_density_grad_time_max.getSize();
+         double time_max = ((error_level_number < size)
+                            ? d_density_grad_time_max[error_level_number]
+                            : d_density_grad_time_max[size - 1]);
+         time_allowed = (time_min <= regrid_time) && (time_max > regrid_time);
+      }
+
+      if (ref == "DENSITY_SHOCK") {
+         var = patch.getPatchData(d_density, getDataContext());
+         size = d_density_shock_tol.getSize();
+         tol = ((error_level_number < size)
+                ? d_density_shock_tol[error_level_number]
+                : d_density_shock_tol[size - 1]);
+         size = d_density_shock_onset.getSize();
+         onset = ((error_level_number < size)
+                  ? d_density_shock_onset[error_level_number]
+                  : d_density_shock_onset[size - 1]);
+         size = d_density_shock_time_min.getSize();
+         double time_min = ((error_level_number < size)
+                            ? d_density_shock_time_min[error_level_number]
+                            : d_density_shock_time_min[size - 1]);
+         size = d_density_shock_time_max.getSize();
+         double time_max = ((error_level_number < size)
+                            ? d_density_shock_time_max[error_level_number]
+                            : d_density_shock_time_max[size - 1]);
+         time_allowed = (time_min <= regrid_time) && (time_max > regrid_time);
+      }
+
+      if (ref == "PRESSURE_DEVIATION") {
+         var = patch.getPatchData(d_pressure, getDataContext());
+         size = d_pressure_dev_tol.getSize();
+         tol = ((error_level_number < size)
+                ? d_pressure_dev_tol[error_level_number]
+                : d_pressure_dev_tol[size - 1]);
+         size = d_pressure_dev.getSize();
+         dev = ((error_level_number < size)
+                ? d_pressure_dev[error_level_number]
+                : d_pressure_dev[size - 1]);
+         size = d_pressure_dev_time_min.getSize();
+         double time_min = ((error_level_number < size)
+                            ? d_pressure_dev_time_min[error_level_number]
+                            : d_pressure_dev_time_min[size - 1]);
+         size = d_pressure_dev_time_max.getSize();
+         double time_max = ((error_level_number < size)
+                            ? d_pressure_dev_time_max[error_level_number]
+                            : d_pressure_dev_time_max[size - 1]);
+         time_allowed = (time_min <= regrid_time) && (time_max > regrid_time);
+      }
+
+      if (ref == "PRESSURE_GRADIENT") {
+         var = patch.getPatchData(d_pressure, getDataContext());
+         size = d_pressure_grad_tol.getSize();
+         tol = ((error_level_number < size)
+                ? d_pressure_grad_tol[error_level_number]
+                : d_pressure_grad_tol[size - 1]);
+         size = d_pressure_grad_time_min.getSize();
+         double time_min = ((error_level_number < size)
+                            ? d_pressure_grad_time_min[error_level_number]
+                            : d_pressure_grad_time_min[size - 1]);
+         size = d_pressure_grad_time_max.getSize();
+         double time_max = ((error_level_number < size)
+                            ? d_pressure_grad_time_max[error_level_number]
+                            : d_pressure_grad_time_max[size - 1]);
+         time_allowed = (time_min <= regrid_time) && (time_max > regrid_time);
+      }
+
+      if (ref == "PRESSURE_SHOCK") {
+         var = patch.getPatchData(d_pressure, getDataContext());
+         size = d_pressure_shock_tol.getSize();
+         tol = ((error_level_number < size)
+                ? d_pressure_shock_tol[error_level_number]
+                : d_pressure_shock_tol[size - 1]);
+         size = d_pressure_shock_onset.getSize();
+         onset = ((error_level_number < size)
+                  ? d_pressure_shock_onset[error_level_number]
+                  : d_pressure_shock_onset[size - 1]);
+         size = d_pressure_shock_time_min.getSize();
+         double time_min = ((error_level_number < size)
+                            ? d_pressure_shock_time_min[error_level_number]
+                            : d_pressure_shock_time_min[size - 1]);
+         size = d_pressure_shock_time_max.getSize();
+         double time_max = ((error_level_number < size)
+                            ? d_pressure_shock_time_max[error_level_number]
+                            : d_pressure_shock_time_max[size - 1]);
+         time_allowed = (time_min <= regrid_time) && (time_max > regrid_time);
+      }
+
+      if (time_allowed) {
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!var.isNull());
+#endif
+
+         hier::IntVector vghost = var->getGhostCellWidth();
+         hier::IntVector tagghost = tags->getGhostCellWidth();
+
+         if (ref == "DENSITY_DEVIATION" || ref == "PRESSURE_DEVIATION") {
+
+            /*
+             * Check for tags that have already been set in a previous
+             * step.  Do NOT consider values tagged with value
+             * RICHARDSON_NEWLY_TAGGED since these were set most recently
+             * by Richardson extrapolation.
+             */
+            for (pdat::CellIterator ic(pbox); ic; ic++) {
+               double locden = tol;
+               int tag_val = (*tags)(ic(), 0);
+               if (tag_val) {
+                  if (tag_val != RICHARDSON_NEWLY_TAGGED) {
+                     locden *= 0.75;
+                  }
+               }
+               if (tbox::MathUtilities<double>::Abs((*var)(ic()) - dev) >
+                   locden) {
+                  (*temp_tags)(ic(), 0) = TRUE;
+               }
+            }
+         }
+
+         if (ref == "DENSITY_GRADIENT" || ref == "PRESSURE_GRADIENT") {
+            if (d_dim == tbox::Dimension(2)) {
+               F77_FUNC(detectgrad2d, DETECTGRAD2D) (ifirst(0), ilast(0),
+                  ifirst(1), ilast(1),
+                  vghost(0), tagghost(0), d_nghosts(0),
+                  vghost(1), tagghost(1), d_nghosts(1),
+                  dx,
+                  tol,
+                  TRUE, FALSE,
+                  var->getPointer(),
+                  tags->getPointer(), temp_tags->getPointer());
+            } else if (d_dim == tbox::Dimension(3)) {
+               F77_FUNC(detectgrad3d, DETECTGRAD3D) (ifirst(0), ilast(0),
+                  ifirst(1), ilast(1),
+                  ifirst(2), ilast(2),
+                  vghost(0), tagghost(0), d_nghosts(0),
+                  vghost(1), tagghost(1), d_nghosts(1),
+                  vghost(2), tagghost(2), d_nghosts(2),
+                  dx,
+                  tol,
+                  TRUE, FALSE,
+                  var->getPointer(),
+                  tags->getPointer(), temp_tags->getPointer());
+            }
+         }
+
+         if (ref == "DENSITY_SHOCK" || ref == "PRESSURE_SHOCK") {
+            if (d_dim == tbox::Dimension(2)) {
+               F77_FUNC(detectshock2d, DETECTSHOCK2D) (ifirst(0), ilast(0),
+                  ifirst(1), ilast(1),
+                  vghost(0), tagghost(0), d_nghosts(0),
+                  vghost(1), tagghost(1), d_nghosts(1),
+                  dx,
+                  tol,
+                  onset,
+                  TRUE, FALSE,
+                  var->getPointer(),
+                  tags->getPointer(), temp_tags->getPointer());
+            } else if (d_dim == tbox::Dimension(3)) {
+               F77_FUNC(detectshock3d, DETECTSHOCK3D) (ifirst(0), ilast(0),
+                  ifirst(1), ilast(1),
+                  ifirst(2), ilast(2),
+                  vghost(0), tagghost(0), d_nghosts(0),
+                  vghost(1), tagghost(1), d_nghosts(1),
+                  vghost(2), tagghost(2), d_nghosts(2),
+                  dx,
+                  tol,
+                  onset,
+                  TRUE, FALSE,
+                  var->getPointer(),
+                  tags->getPointer(), temp_tags->getPointer());
+            }
+         }
+
+      }  // if time_allowed
+
+   }  // loop over criteria
+
+   /*
+    * Adjust temp_tags from those tags set in Richardson extrapolation.
+    */
+   if (uses_richardson_extrapolation_too) {
+      for (pdat::CellIterator ic(pbox); ic; ic++) {
+         if ((*tags)(ic(), 0) == RICHARDSON_ALREADY_TAGGED ||
+             (*tags)(ic(), 0) == RICHARDSON_NEWLY_TAGGED) {
+            (*temp_tags)(ic(), 0) = TRUE;
+         }
+      }
+   }
+
+   /*
+    * Update tags
+    */
+   for (pdat::CellIterator ic(pbox); ic; ic++) {
+      (*tags)(ic(), 0) = (*temp_tags)(ic(), 0);
+   }
+
+   t_taggradient->stop();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Tag cells for refinement using Richardson extrapolation.  Criteria    *
+ * defined in input.                                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::tagRichardsonExtrapolationCells(
+   hier::Patch& patch,
+   const int error_level_number,
+   const tbox::Pointer<hier::VariableContext> coarsened_fine,
+   const tbox::Pointer<hier::VariableContext> advanced_coarse,
+   const double regrid_time,
+   const double deltat,
+   const int error_coarsen_ratio,
+   const bool initial_error,
+   const int tag_index,
+   const bool uses_gradient_detector_too)
+{
+   (void)initial_error;
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* xdomainlo = d_grid_geometry->getXLower();
+   const double* xdomainhi = d_grid_geometry->getXUpper();
+
+   hier::Box pbox = patch.getBox();
+
+   tbox::Pointer<pdat::CellData<int> > tags = patch.getPatchData(tag_index);
+
+   /*
+    * Possible tagging criteria includes
+    *    DENSITY_RICHARDSON, PRESSURE_RICHARDSON
+    * The criteria is specified over a time interval.
+    *
+    * Loop over criteria provided and check to make sure we are in the
+    * specified time interval.  If so, apply appropriate tagging for
+    * the level.
+    */
+   for (int ncrit = 0; ncrit < d_refinement_criteria.getSize(); ncrit++) {
+
+      string ref = d_refinement_criteria[ncrit];
+      tbox::Pointer<pdat::CellData<double> > coarsened_fine_var;
+      tbox::Pointer<pdat::CellData<double> > advanced_coarse_var;
+      int size = 0;
+      double tol = 0.;
+      bool time_allowed = false;
+
+      if (ref == "DENSITY_RICHARDSON") {
+         coarsened_fine_var = patch.getPatchData(d_density, coarsened_fine);
+         advanced_coarse_var = patch.getPatchData(d_density, advanced_coarse);
+         size = d_density_rich_tol.getSize();
+         tol = ((error_level_number < size)
+                ? d_density_rich_tol[error_level_number]
+                : d_density_rich_tol[size - 1]);
+         size = d_density_rich_time_min.getSize();
+         double time_min = ((error_level_number < size)
+                            ? d_density_rich_time_min[error_level_number]
+                            : d_density_rich_time_min[size - 1]);
+         size = d_density_rich_time_max.getSize();
+         double time_max = ((error_level_number < size)
+                            ? d_density_rich_time_max[error_level_number]
+                            : d_density_rich_time_max[size - 1]);
+         time_allowed = (time_min <= regrid_time) && (time_max > regrid_time);
+      }
+
+      if (ref == "PRESSURE_RICHARDSON") {
+         coarsened_fine_var = patch.getPatchData(d_pressure, coarsened_fine);
+         advanced_coarse_var = patch.getPatchData(d_pressure, advanced_coarse);
+         size = d_pressure_rich_tol.getSize();
+         tol = ((error_level_number < size)
+                ? d_pressure_rich_tol[error_level_number]
+                : d_pressure_rich_tol[size - 1]);
+         size = d_pressure_rich_time_min.getSize();
+         double time_min = ((error_level_number < size)
+                            ? d_pressure_rich_time_min[error_level_number]
+                            : d_pressure_rich_time_min[size - 1]);
+         size = d_pressure_rich_time_max.getSize();
+         double time_max = ((error_level_number < size)
+                            ? d_pressure_rich_time_max[error_level_number]
+                            : d_pressure_rich_time_max[size - 1]);
+         time_allowed = (time_min <= regrid_time) && (time_max > regrid_time);
+      }
+
+      if (time_allowed) {
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!coarsened_fine_var.isNull());
+         TBOX_ASSERT(!advanced_coarse_var.isNull());
+#endif
+
+         if (ref == "DENSITY_RICHARDSON" || ref == "PRESSURE_RICHARDSON") {
+
+            /*
+             * We tag wherever the global error > specified tolerance.
+             * The estimated global error is the
+             * local truncation error * the approximate number of steps
+             * used in the simulation.  Approximate the number of steps as:
+             *
+             *       steps = L / (s*deltat)
+             * where
+             *       L = length of problem domain
+             *       s = wave speed
+             *       delta t = timestep on current level
+             *
+             * Compute max wave speed from delta t.  This presumes that
+             * deltat was computed as deltat = dx/s_max.  We have deltat
+             * and dx, so back out s_max from this.
+             */
+
+            const double* dx = patch_geom->getDx();
+            double max_dx = 0.;
+            double max_length = 0.;
+            for (int idir = 0; idir < d_dim.getValue(); idir++) {
+               max_dx = tbox::MathUtilities<double>::Max(max_dx, dx[idir]);
+               double length = xdomainhi[idir] - xdomainlo[idir];
+               max_length =
+                  tbox::MathUtilities<double>::Max(max_length, length);
+            }
+            double max_wave_speed = max_dx / deltat;
+            double steps = max_length / (max_wave_speed * deltat);
+
+            /*
+             * Tag cells where |w_c - w_f| * (r^n -1) * steps
+             *
+             * where
+             *       w_c = soln on coarse level (pressure_crse)
+             *       w_f = soln on fine level (pressure_fine)
+             *       r   = error coarsen ratio
+             *       n   = spatial order of scheme (1st or 2nd depending
+             *             on whether Godunov order is 1st or 2nd/4th)
+             */
+            int order = 1;
+            if (d_godunov_order > 1) order = 2;
+            double r = error_coarsen_ratio;
+            double rnminus1 = pow(r, order) - 1;
+
+            double diff = 0.;
+            double error = 0.;
+
+            for (pdat::CellIterator ic(pbox); ic; ic++) {
+
+               /*
+                * Compute error norm
+                */
+               diff = (*advanced_coarse_var)(ic(), 0)
+                  - (*coarsened_fine_var)(ic(), 0);
+               error =
+                  tbox::MathUtilities<double>::Abs(diff) * rnminus1 * steps;
+
+               /*
+                * Tag cell if error > prescribed threshold. Since we are
+                * operating on the actual tag values (not temporary ones)
+                * distinguish here tags that were previously set before
+                * coming into this routine and those that are set here.
+                *     RICHARDSON_ALREADY_TAGGED - tagged before coming
+                *                                 into this method.
+                *     RICHARDSON_NEWLY_TAGGED - newly tagged in this method
+                */
+               if (error > tol) {
+                  if ((*tags)(ic(), 0)) {
+                     (*tags)(ic(), 0) = RICHARDSON_ALREADY_TAGGED;
+                  } else {
+                     (*tags)(ic(), 0) = RICHARDSON_NEWLY_TAGGED;
+                  }
+               }
+            }
+
+         }
+
+      } // time_allowed
+
+   } // loop over refinement criteria
+
+   /*
+    * If we are NOT performing gradient detector (i.e. only
+    * doing Richardson extrapolation) set tags marked in this method
+    * to TRUE and all others false.  Otherwise, leave tags set to the
+    * RICHARDSON_ALREADY_TAGGED and RICHARDSON_NEWLY_TAGGED as we may
+    * use this information in the gradient detector.
+    */
+   if (!uses_gradient_detector_too) {
+      for (pdat::CellIterator ic(pbox); ic; ic++) {
+         if ((*tags)(ic(), 0) == RICHARDSON_ALREADY_TAGGED ||
+             (*tags)(ic(), 0) == RICHARDSON_NEWLY_TAGGED) {
+            (*tags)(ic(), 0) = TRUE;
+         } else {
+            (*tags)(ic(), 0) = FALSE;
+         }
+      }
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register VisIt data writer to write data to plot files that may       *
+ * be postprocessed by the VisIt tool.                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+#ifdef HAVE_HDF5
+void Euler::registerVisItDataWriter(
+   tbox::Pointer<appu::VisItDataWriter> viz_writer)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(viz_writer.isNull()));
+#endif
+   d_visit_writer = viz_writer;
+}
+#endif
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Pack "total energy" and "momentum" (derived Vis plot quantities)      *
+ * for the patch into a double precision buffer.                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool Euler::packDerivedDataIntoDoubleBuffer(
+   double* dbuffer,
+   const hier::Patch& patch,
+   const hier::Box& region,
+   const string& variable_name,
+   int depth_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((region * patch.getBox()) == region);
+#endif
+
+   bool data_on_patch = FALSE;
+
+   tbox::Pointer<pdat::CellData<double> > density =
+      patch.getPatchData(d_density, d_plot_context);
+   tbox::Pointer<pdat::CellData<double> > velocity =
+      patch.getPatchData(d_velocity, d_plot_context);
+   tbox::Pointer<pdat::CellData<double> > pressure =
+      patch.getPatchData(d_pressure, d_plot_context);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!density.isNull());
+   TBOX_ASSERT(!velocity.isNull());
+   TBOX_ASSERT(!pressure.isNull());
+   TBOX_ASSERT(density->getGhostBox() == patch.getBox());
+   TBOX_ASSERT(velocity->getGhostBox() == patch.getBox());
+   TBOX_ASSERT(pressure->getGhostBox() == patch.getBox());
+#endif
+
+   const hier::Box& data_box = density->getGhostBox();
+   const int box_w0 = region.numberCells(0);
+   const int dat_w0 = data_box.numberCells(0);
+   const int box_w1 = region.numberCells(1);
+   const int dat_w1 = d_dim >
+      tbox::Dimension(2) ? data_box.numberCells(1) : tbox::MathUtilities<int>::getMax();
+   const int box_w2 = d_dim >
+      tbox::Dimension(2) ? region.numberCells(2) : tbox::MathUtilities<int>::getMax();
+
+   if (variable_name == "Total Energy") {
+      const double * const dens = density->getPointer();
+      const double * const xvel = velocity->getPointer(0);
+      const double * const yvel = velocity->getPointer(1);
+      const double * const zvel = d_dim > tbox::Dimension(2) ? velocity->getPointer(2) : NULL;
+      const double * const pres = pressure->getPointer();
+
+      double valinv = 1.0 / (d_gamma - 1.0);
+      int buf_b1 = 0;
+      int dat_b2 = data_box.offset(region.lower());
+
+      if (d_dim > tbox::Dimension(2)) {
+         for (int i2 = 0; i2 < box_w2; i2++) {
+            int dat_b1 = dat_b2;
+            for (int i1 = 0; i1 < box_w1; i1++) {
+               for (int i0 = 0; i0 < box_w0; i0++) {
+                  int dat_indx = dat_b1 + i0;
+                  double v2norm = pow(xvel[dat_indx], 2.0)
+                     + pow(yvel[dat_indx], 2.0)
+                     + pow(zvel[dat_indx], 2.0)
+                  ;
+                  double rho = dens[dat_indx];
+                  double int_energy = 0.0;
+                  if (rho > 0.0) {
+                     int_energy = valinv * pres[dat_indx] / dens[dat_indx];
+                  }
+                  dbuffer[buf_b1 + i0] =
+                     dens[dat_indx] * (0.5 * v2norm + int_energy);
+               }
+               dat_b1 += dat_w0;
+               buf_b1 += box_w0;
+            }
+            dat_b2 += dat_w1 * dat_w0;
+         }
+      }
+
+      if (d_dim == tbox::Dimension(2)) {
+         int dat_b1 = dat_b2;
+         for (int i1 = 0; i1 < box_w1; i1++) {
+            for (int i0 = 0; i0 < box_w0; i0++) {
+               int dat_indx = dat_b1 + i0;
+               double v2norm = pow(xvel[dat_indx], 2.0)
+                  + pow(yvel[dat_indx], 2.0)
+               ;
+               double rho = dens[dat_indx];
+               double int_energy = 0.0;
+               if (rho > 0.0) {
+                  int_energy = valinv * pres[dat_indx] / dens[dat_indx];
+               }
+               dbuffer[buf_b1 + i0] =
+                  dens[dat_indx] * (0.5 * v2norm + int_energy);
+            }
+            dat_b1 += dat_w0;
+            buf_b1 += box_w0;
+         }
+      }
+
+      data_on_patch = TRUE;
+
+   } else if (variable_name == "Momentum") {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(depth_id < d_dim.getValue());
+#endif
+
+      const double * const dens = density->getPointer();
+      const double * const vel = velocity->getPointer(depth_id);
+      int buf_b1 = 0;
+      int dat_b2 = data_box.offset(region.lower());
+
+      if (d_dim == tbox::Dimension(2)) {
+         int dat_b1 = dat_b2;
+         for (int i1 = 0; i1 < box_w1; i1++) {
+            for (int i0 = 0; i0 < box_w0; i0++) {
+               int dat_indx = dat_b1 + i0;
+               dbuffer[buf_b1 + i0] = dens[dat_indx] * vel[dat_indx];
+            }
+            dat_b1 += dat_w0;
+            buf_b1 += box_w0;
+         }
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         for (int i2 = 0; i2 < box_w2; i2++) {
+            int dat_b1 = dat_b2;
+            for (int i1 = 0; i1 < box_w1; i1++) {
+               for (int i0 = 0; i0 < box_w0; i0++) {
+                  int dat_indx = dat_b1 + i0;
+                  dbuffer[buf_b1 + i0] = dens[dat_indx] * vel[dat_indx];
+               }
+               dat_b1 += dat_w0;
+               buf_b1 += box_w0;
+            }
+            dat_b2 += dat_w1 * dat_w0;
+         }
+      }
+
+      data_on_patch = TRUE;
+
+   } else {
+      TBOX_ERROR("Euler::packDerivedDataIntoDoubleBuffer()"
+         << "\n    unknown variable_name " << variable_name << "\n");
+   }
+
+   return data_on_patch;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Write 1d data intersection of patch and pencil box to file            *
+ * with given name for plotting with Matlab.                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::writeData1dPencil(
+   const tbox::Pointer<hier::Patch> patch,
+   const hier::Box& pencil_box,
+   const int idir,
+   ostream& file)
+{
+
+   const hier::Box& patchbox = patch->getBox();
+   const hier::Box box = pencil_box * patchbox;
+
+   if (!box.empty()) {
+
+      tbox::Pointer<pdat::CellData<double> > density =
+         patch->getPatchData(d_density, getDataContext());
+      tbox::Pointer<pdat::CellData<double> > velocity =
+         patch->getPatchData(d_velocity, getDataContext());
+      tbox::Pointer<pdat::CellData<double> > pressure =
+         patch->getPatchData(d_pressure, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!density.isNull());
+      TBOX_ASSERT(!velocity.isNull());
+      TBOX_ASSERT(!pressure.isNull());
+#endif
+
+      const tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+         patch->getPatchGeometry();
+      const double* dx = pgeom->getDx();
+      const double* xlo = pgeom->getXLower();
+
+      const double cell_center = xlo[idir]
+         + (double(box.lower(idir)
+                   - patchbox.lower(idir))
+            + 0.5) * dx[idir];
+
+      double valinv = 1.0 / (d_gamma - 1.0);
+
+      int ccount = 0;
+      for (pdat::CellIterator ic(box); ic; ic++) {
+         file << cell_center + ccount * dx[idir] << " ";
+         ccount++;
+
+         double rho = (*density)(ic(), 0);
+         double vel = (*velocity)(ic(), idir);
+         double p = (*pressure)(ic(), 0);
+
+         double mom = rho * vel;
+         double eint = 0.0;
+         if (rho > 0.0) {
+            eint = valinv * (p / rho);
+         }
+         double etot = rho * (0.5 * vel * vel + eint);
+
+         /*
+          * Write out conserved quantities.
+          */
+         file << rho << " ";
+         file << mom << " ";
+         file << etot << " ";
+
+         /*
+          * Write out "primitive" quantities and internal energy.
+          */
+         file << p << " ";
+         file << vel << " ";
+         file << eint << " ";
+
+         file << endl;
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Write all class data members to specified output stream.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::printClassData(
+   ostream& os) const
+{
+   int j, k;
+
+   os << "\nEuler::printClassData..." << endl;
+   os << "Euler: this = " << (Euler *)this << endl;
+   os << "d_object_name = " << d_object_name << endl;
+   os << "d_grid_geometry = "
+      << (geom::CartesianGridGeometry *)d_grid_geometry << endl;
+
+   os << "Parameters for physical problem ..." << endl;
+   os << "   d_gamma = " << d_gamma << endl;
+
+   os << "Numerical method description and ghost sizes..." << endl;
+   os << "   d_riemann_solve = " << d_riemann_solve << endl;
+   os << "   d_riemann_solve_int = " << d_riemann_solve_int << endl;
+   os << "   d_godunov_order = " << d_godunov_order << endl;
+   os << "   d_corner_transport = " << d_corner_transport << endl;
+   os << "   d_nghosts = " << d_nghosts << endl;
+   os << "   d_fluxghosts = " << d_fluxghosts << endl;
+
+   os << "Problem description and initial data..." << endl;
+   os << "   d_data_problem = " << d_data_problem << endl;
+   os << "   d_data_problem_int = " << d_data_problem_int << endl;
+
+   os << "       d_radius = " << d_radius << endl;
+   os << "       d_center = ";
+   for (j = 0; j < d_dim.getValue(); j++) os << d_center[j] << " ";
+   os << endl;
+   os << "       d_density_inside = " << d_density_inside << endl;
+   os << "       d_velocity_inside = ";
+   for (j = 0; j < d_dim.getValue(); j++) os << d_velocity_inside[j] << " ";
+   os << endl;
+   os << "       d_pressure_inside = " << d_pressure_inside << endl;
+   os << "       d_density_outside = " << d_density_outside << endl;
+   os << "       d_velocity_outside = ";
+   for (j = 0; j < d_dim.getValue(); j++) os << d_velocity_outside[j] << " ";
+   os << endl;
+   os << "       d_pressure_outside = " << d_pressure_outside << endl;
+
+   os << "       d_number_of_intervals = " << d_number_of_intervals << endl;
+   os << "       d_front_position = ";
+   for (k = 0; k < d_number_of_intervals - 1; k++) {
+      os << d_front_position[k] << "  ";
+   }
+   os << endl;
+   os << "       d_interval_density = " << endl;
+   for (k = 0; k < d_number_of_intervals; k++) {
+      os << "            " << d_interval_density[k] << endl;
+   }
+   os << "       d_interval_velocity = " << endl;
+   for (k = 0; k < d_number_of_intervals; k++) {
+      os << "            ";
+      for (j = 0; j < d_dim.getValue(); j++) {
+         os << d_interval_velocity[k * d_dim.getValue() + j] << "  ";
+      }
+      os << endl;
+   }
+   os << "       d_interval_pressure = " << endl;
+   for (k = 0; k < d_number_of_intervals; k++) {
+      os << "            " << d_interval_pressure[k] << endl;
+   }
+
+   os << "   Boundary condition data " << endl;
+
+   if (d_dim == tbox::Dimension(2)) {
+      for (j = 0; j < d_master_bdry_edge_conds.getSize(); j++) {
+         os << "\n       d_master_bdry_edge_conds[" << j << "] = "
+         << d_master_bdry_edge_conds[j] << endl;
+         os << "       d_scalar_bdry_edge_conds[" << j << "] = "
+         << d_scalar_bdry_edge_conds[j] << endl;
+         os << "       d_vector_bdry_edge_conds[" << j << "] = "
+         << d_vector_bdry_edge_conds[j] << endl;
+         if (d_master_bdry_edge_conds[j] == DIRICHLET_BC) {
+            os << "         d_bdry_edge_density[" << j << "] = "
+            << d_bdry_edge_density[j] << endl;
+            os << "         d_bdry_edge_velocity[" << j << "] = "
+            << d_bdry_edge_velocity[j * d_dim.getValue() + 0] << " , "
+            << d_bdry_edge_velocity[j * d_dim.getValue() + 1] << endl;
+            os << "         d_bdry_edge_pressure[" << j << "] = "
+            << d_bdry_edge_pressure[j] << endl;
+         }
+      }
+      os << endl;
+      for (j = 0; j < d_master_bdry_node_conds.getSize(); j++) {
+         os << "\n       d_master_bdry_node_conds[" << j << "] = "
+         << d_master_bdry_node_conds[j] << endl;
+         os << "       d_scalar_bdry_node_conds[" << j << "] = "
+         << d_scalar_bdry_node_conds[j] << endl;
+         os << "       d_vector_bdry_node_conds[" << j << "] = "
+         << d_vector_bdry_node_conds[j] << endl;
+         os << "       d_node_bdry_edge[" << j << "] = "
+         << d_node_bdry_edge[j] << endl;
+      }
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      for (j = 0; j < d_master_bdry_face_conds.getSize(); j++) {
+         os << "\n       d_master_bdry_face_conds[" << j << "] = "
+         << d_master_bdry_face_conds[j] << endl;
+         os << "       d_scalar_bdry_face_conds[" << j << "] = "
+         << d_scalar_bdry_face_conds[j] << endl;
+         os << "       d_vector_bdry_face_conds[" << j << "] = "
+         << d_vector_bdry_face_conds[j] << endl;
+         if (d_master_bdry_face_conds[j] == DIRICHLET_BC) {
+            os << "         d_bdry_face_density[" << j << "] = "
+            << d_bdry_face_density[j] << endl;
+            os << "         d_bdry_face_velocity[" << j << "] = "
+            << d_bdry_face_velocity[j * d_dim.getValue() + 0] << " , "
+            << d_bdry_face_velocity[j * d_dim.getValue() + 1] << " , "
+            << d_bdry_face_velocity[j * d_dim.getValue() + 2] << endl;
+            os << "         d_bdry_face_pressure[" << j << "] = "
+            << d_bdry_face_pressure[j] << endl;
+         }
+      }
+      os << endl;
+      for (j = 0; j < d_master_bdry_edge_conds.getSize(); j++) {
+         os << "\n       d_master_bdry_edge_conds[" << j << "] = "
+         << d_master_bdry_edge_conds[j] << endl;
+         os << "       d_scalar_bdry_edge_conds[" << j << "] = "
+         << d_scalar_bdry_edge_conds[j] << endl;
+         os << "       d_vector_bdry_edge_conds[" << j << "] = "
+         << d_vector_bdry_edge_conds[j] << endl;
+         os << "       d_edge_bdry_face[" << j << "] = "
+         << d_edge_bdry_face[j] << endl;
+      }
+      os << endl;
+      for (j = 0; j < d_master_bdry_node_conds.getSize(); j++) {
+         os << "\n       d_master_bdry_node_conds[" << j << "] = "
+         << d_master_bdry_node_conds[j] << endl;
+         os << "       d_scalar_bdry_node_conds[" << j << "] = "
+         << d_scalar_bdry_node_conds[j] << endl;
+         os << "       d_vector_bdry_node_conds[" << j << "] = "
+         << d_vector_bdry_node_conds[j] << endl;
+         os << "       d_node_bdry_face[" << j << "] = "
+         << d_node_bdry_face[j] << endl;
+      }
+   }
+
+   os << "   Refinement criteria parameters " << endl;
+
+   for (j = 0; j < d_refinement_criteria.getSize(); j++) {
+      os << "       d_refinement_criteria[" << j << "] = "
+      << d_refinement_criteria[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_dev_tol.getSize(); j++) {
+      os << "       d_density_dev_tol[" << j << "] = "
+      << d_density_dev_tol[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_dev.getSize(); j++) {
+      os << "       d_density_dev[" << j << "] = "
+      << d_density_dev[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_dev_time_max.getSize(); j++) {
+      os << "       d_density_dev_time_max[" << j << "] = "
+      << d_density_dev_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_dev_time_min.getSize(); j++) {
+      os << "       d_density_dev_time_min[" << j << "] = "
+      << d_density_dev_time_min[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_grad_tol.getSize(); j++) {
+      os << "       d_density_grad_tol[" << j << "] = "
+      << d_density_grad_tol[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_grad_time_max.getSize(); j++) {
+      os << "       d_density_grad_time_max[" << j << "] = "
+      << d_density_grad_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_grad_time_min.getSize(); j++) {
+      os << "       d_density_grad_time_min[" << j << "] = "
+      << d_density_grad_time_min[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_shock_onset.getSize(); j++) {
+      os << "       d_density_shock_onset[" << j << "] = "
+      << d_density_shock_onset[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_shock_tol.getSize(); j++) {
+      os << "       d_density_shock_tol[" << j << "] = "
+      << d_density_shock_tol[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_shock_time_max.getSize(); j++) {
+      os << "       d_density_shock_time_max[" << j << "] = "
+      << d_density_shock_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_shock_time_min.getSize(); j++) {
+      os << "       d_density_shock_time_min[" << j << "] = "
+      << d_density_shock_time_min[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_rich_tol.getSize(); j++) {
+      os << "       d_density_rich_tol[" << j << "] = "
+      << d_density_rich_tol[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_rich_time_max.getSize(); j++) {
+      os << "       d_density_rich_time_max[" << j << "] = "
+      << d_density_rich_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_rich_time_min.getSize(); j++) {
+      os << "       d_density_rich_time_min[" << j << "] = "
+      << d_density_rich_time_min[j] << endl;
+   }
+   os << endl;
+
+   for (j = 0; j < d_pressure_dev_tol.getSize(); j++) {
+      os << "       d_pressure_dev_tol[" << j << "] = "
+      << d_pressure_dev_tol[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_pressure_dev.getSize(); j++) {
+      os << "       d_pressure_dev[" << j << "] = "
+      << d_pressure_dev[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_pressure_dev_time_max.getSize(); j++) {
+      os << "       d_pressure_dev_time_max[" << j << "] = "
+      << d_pressure_dev_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_pressure_dev_time_min.getSize(); j++) {
+      os << "       d_pressure_dev_time_min[" << j << "] = "
+      << d_pressure_dev_time_min[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_pressure_grad_tol.getSize(); j++) {
+      os << "       d_pressure_grad_tol[" << j << "] = "
+      << d_pressure_grad_tol[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_pressure_grad_time_max.getSize(); j++) {
+      os << "       d_pressure_grad_time_max[" << j << "] = "
+      << d_pressure_grad_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_pressure_grad_time_min.getSize(); j++) {
+      os << "       d_pressure_grad_time_min[" << j << "] = "
+      << d_pressure_grad_time_min[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_pressure_shock_onset.getSize(); j++) {
+      os << "       d_pressure_shock_onset[" << j << "] = "
+      << d_pressure_shock_onset[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_pressure_shock_tol.getSize(); j++) {
+      os << "       d_pressure_shock_tol[" << j << "] = "
+      << d_pressure_shock_tol[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_pressure_shock_time_max.getSize(); j++) {
+      os << "       d_pressure_shock_time_max[" << j << "] = "
+      << d_pressure_shock_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_pressure_shock_time_min.getSize(); j++) {
+      os << "       d_pressure_shock_time_min[" << j << "] = "
+      << d_pressure_shock_time_min[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_pressure_rich_tol.getSize(); j++) {
+      os << "       d_pressure_rich_tol[" << j << "] = "
+      << d_pressure_rich_tol[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_pressure_rich_time_max.getSize(); j++) {
+      os << "       d_pressure_rich_time_max[" << j << "] = "
+      << d_pressure_rich_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_pressure_rich_time_min.getSize(); j++) {
+      os << "       d_pressure_rich_time_min[" << j << "] = "
+      << d_pressure_rich_time_min[j] << endl;
+   }
+   os << endl;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Read data members from input.  Note all values set from restart       *
+ * can be overridden by values in the input database.                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::getFromInput(
+   tbox::Pointer<tbox::Database> db,
+   bool is_from_restart)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   /*
+    * Note: if we are restarting, then we only allow nonuniform
+    * workload to be used if nonuniform workload was used originally.
+    */
+   if (!is_from_restart) {
+      d_use_nonuniform_workload =
+         db->getBoolWithDefault("use_nonuniform_workload",
+            d_use_nonuniform_workload);
+   } else {
+      if (d_use_nonuniform_workload) {
+         d_use_nonuniform_workload =
+            db->getBool("use_nonuniform_workload");
+      }
+   }
+
+   if (!is_from_restart) {
+      d_gamma = db->getDoubleWithDefault("gamma", d_gamma);
+   }
+
+   if (db->keyExists("riemann_solve")) {
+      d_riemann_solve = db->getString("riemann_solve");
+      if ((d_riemann_solve != "APPROX_RIEM_SOLVE") &&
+          (d_riemann_solve != "EXACT_RIEM_SOLVE") &&
+          (d_riemann_solve != "HLLC_RIEM_SOLVE")) {
+         TBOX_ERROR(
+            d_object_name << ": "
+            <<
+            "`riemann_solve' in input must be either string "
+            <<
+            "'APPROX_RIEM_SOLVE', 'EXACT_RIEM_SOLVE', "
+            << "'HLLC_RIEM_SOLVE'." << endl);
+
+      }
+   } else {
+      d_riemann_solve = db->getStringWithDefault("d_riemann_solve",
+            d_riemann_solve);
+   }
+
+   if (db->keyExists("godunov_order")) {
+      d_godunov_order = db->getInteger("godunov_order");
+      if ((d_godunov_order != 1) &&
+          (d_godunov_order != 2) &&
+          (d_godunov_order != 4)) {
+         TBOX_ERROR(
+            d_object_name << ": "
+            <<
+            "`godunov_order' in input must be 1, 2, or 4." << endl);
+
+      }
+   } else {
+      d_godunov_order = db->getIntegerWithDefault("d_godunov_order",
+            d_godunov_order);
+   }
+
+   if (db->keyExists("corner_transport")) {
+      d_corner_transport = db->getString("corner_transport");
+      if ((d_corner_transport != "CORNER_TRANSPORT_1") &&
+          (d_corner_transport != "CORNER_TRANSPORT_2")) {
+         TBOX_ERROR(
+            d_object_name << ": "
+            <<
+            "`corner_transport' in input must be either string"
+            <<
+            " 'CORNER_TRANSPORT_1' or 'CORNER_TRANSPORT_2'." << endl);
+      }
+   } else {
+      d_corner_transport = db->getStringWithDefault("corner_transport",
+            d_corner_transport);
+   }
+
+   if (db->keyExists("Refinement_data")) {
+      tbox::Pointer<tbox::Database> refine_db = db->getDatabase(
+            "Refinement_data");
+      tbox::Array<string> refinement_keys = refine_db->getAllKeys();
+      int num_keys = refinement_keys.getSize();
+
+      if (refine_db->keyExists("refine_criteria")) {
+         d_refinement_criteria =
+            refine_db->getStringArray("refine_criteria");
+      } else {
+         TBOX_WARNING(
+            d_object_name << ": "
+            <<
+            "No key `refine_criteria' found in data for"
+            <<
+            " RefinementData. No refinement will occur." << endl);
+      }
+
+      tbox::Array<string> ref_keys_defined(num_keys);
+      int def_key_cnt = 0;
+      tbox::Pointer<tbox::Database> error_db;
+      for (int i = 0; i < refinement_keys.getSize(); i++) {
+
+         string error_key = refinement_keys[i];
+         error_db.setNull();
+
+         if (!(error_key == "refine_criteria")) {
+
+            if (!(error_key == "DENSITY_DEVIATION" ||
+                  error_key == "DENSITY_GRADIENT" ||
+                  error_key == "DENSITY_SHOCK" ||
+                  error_key == "DENSITY_RICHARDSON" ||
+                  error_key == "PRESSURE_DEVIATION" ||
+                  error_key == "PRESSURE_GRADIENT" ||
+                  error_key == "PRESSURE_SHOCK" ||
+                  error_key == "PRESSURE_RICHARDSON")) {
+               TBOX_ERROR(
+                  d_object_name << ": "
+                  << "Unknown refinement criteria: "
+                  << error_key
+                  << "\nin input." << endl);
+            } else {
+               error_db = refine_db->getDatabase(error_key);
+               ref_keys_defined[def_key_cnt] = error_key;
+               def_key_cnt++;
+            }
+
+            if (!error_db.isNull() && error_key == "DENSITY_DEVIATION") {
+
+               if (error_db->keyExists("dev_tol")) {
+                  d_density_dev_tol =
+                     error_db->getDoubleArray("dev_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `dev_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("density_dev")) {
+                  d_density_dev =
+                     error_db->getDoubleArray("density_dev");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `density_dev' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_density_dev_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_density_dev_time_max.resizeArray(1);
+                  d_density_dev_time_max[0] =
+                     tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_density_dev_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_density_dev_time_min.resizeArray(1);
+                  d_density_dev_time_min[0] = 0.;
+               }
+
+            }
+
+            if (!error_db.isNull() && error_key == "DENSITY_GRADIENT") {
+
+               if (error_db->keyExists("grad_tol")) {
+                  d_density_grad_tol =
+                     error_db->getDoubleArray("grad_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `grad_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_density_grad_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_density_grad_time_max.resizeArray(1);
+                  d_density_grad_time_max[0] =
+                     tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_density_grad_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_density_grad_time_min.resizeArray(1);
+                  d_density_grad_time_min[0] = 0.;
+               }
+
+            }
+
+            if (!error_db.isNull() && error_key == "DENSITY_SHOCK") {
+
+               if (error_db->keyExists("shock_onset")) {
+                  d_density_shock_onset =
+                     error_db->getDoubleArray("shock_onset");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `shock_onset' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("shock_tol")) {
+                  d_density_shock_tol =
+                     error_db->getDoubleArray("shock_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `shock_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_density_shock_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_density_shock_time_max.resizeArray(1);
+                  d_density_shock_time_max[0] =
+                     tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_density_shock_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_density_shock_time_min.resizeArray(1);
+                  d_density_shock_time_min[0] = 0.;
+               }
+
+            }
+
+            if (!error_db.isNull() && error_key == "DENSITY_RICHARDSON") {
+
+               if (error_db->keyExists("rich_tol")) {
+                  d_density_rich_tol =
+                     error_db->getDoubleArray("rich_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `rich_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_density_rich_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_density_rich_time_max.resizeArray(1);
+                  d_density_rich_time_max[0] =
+                     tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_density_rich_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_density_rich_time_min.resizeArray(1);
+                  d_density_rich_time_min[0] = 0.;
+               }
+
+            }
+
+            if (!error_db.isNull() && error_key == "PRESSURE_DEVIATION") {
+
+               if (error_db->keyExists("dev_tol")) {
+                  d_pressure_dev_tol =
+                     error_db->getDoubleArray("dev_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `dev_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("pressure_dev")) {
+                  d_pressure_dev =
+                     error_db->getDoubleArray("pressure_dev");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `pressure_dev' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_pressure_dev_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_pressure_dev_time_max.resizeArray(1);
+                  d_pressure_dev_time_max[0] =
+                     tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_pressure_dev_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_pressure_dev_time_min.resizeArray(1);
+                  d_pressure_dev_time_min[0] = 0.;
+               }
+
+            }
+
+            if (!error_db.isNull() && error_key == "PRESSURE_GRADIENT") {
+
+               if (error_db->keyExists("grad_tol")) {
+                  d_pressure_grad_tol =
+                     error_db->getDoubleArray("grad_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `grad_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_pressure_grad_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_pressure_grad_time_max.resizeArray(1);
+                  d_pressure_grad_time_max[0] =
+                     tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_pressure_grad_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_pressure_grad_time_min.resizeArray(1);
+                  d_pressure_grad_time_min[0] = 0.;
+               }
+
+            }
+
+            if (!error_db.isNull() && error_key == "PRESSURE_SHOCK") {
+
+               if (error_db->keyExists("shock_onset")) {
+                  d_pressure_shock_onset =
+                     error_db->getDoubleArray("shock_onset");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `shock_onset' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("shock_tol")) {
+                  d_pressure_shock_tol =
+                     error_db->getDoubleArray("shock_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `shock_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_pressure_shock_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_pressure_shock_time_max.resizeArray(1);
+                  d_pressure_shock_time_max[0] =
+                     tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_pressure_shock_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_pressure_shock_time_min.resizeArray(1);
+                  d_pressure_shock_time_min[0] = 0.;
+               }
+
+            }
+
+            if (!error_db.isNull() && error_key == "PRESSURE_RICHARDSON") {
+
+               if (error_db->keyExists("rich_tol")) {
+                  d_pressure_rich_tol =
+                     error_db->getDoubleArray("rich_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `rich_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_pressure_rich_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_pressure_rich_time_max.resizeArray(1);
+                  d_pressure_rich_time_max[0] =
+                     tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_pressure_rich_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_pressure_rich_time_min.resizeArray(1);
+                  d_pressure_rich_time_min[0] = 0.;
+               }
+
+            }
+
+         }
+
+      } // loop over refine criteria
+
+      /*
+       * Check that input is found for each string identifier in key list.
+       */
+      for (int k0 = 0; k0 < d_refinement_criteria.getSize(); k0++) {
+         string use_key = d_refinement_criteria[k0];
+         bool key_found = false;
+         for (int k1 = 0; k1 < def_key_cnt; k1++) {
+            string def_key = ref_keys_defined[k1];
+            if (def_key == use_key) key_found = true;
+         }
+
+         if (!key_found) {
+            TBOX_ERROR(d_object_name << ": "
+               << "No input found for specified refine criteria: "
+               << d_refinement_criteria[k0] << endl);
+         }
+      }
+
+   } // if "Refinement_data" db entry exists
+
+   if (!is_from_restart) {
+
+      if (db->keyExists("data_problem")) {
+         d_data_problem = db->getString("data_problem");
+      } else {
+         TBOX_ERROR(
+            d_object_name << ": "
+            << "`data_problem' value not found in input."
+            << endl);
+      }
+
+      tbox::Pointer<tbox::Database> init_data_db;
+      if (db->keyExists("Initial_data")) {
+         init_data_db = db->getDatabase("Initial_data");
+      } else {
+         TBOX_ERROR(
+            d_object_name << ": "
+            <<
+            "No `Initial_data' database found in input." << endl);
+      }
+
+      bool found_problem_data = false;
+
+      if (d_data_problem == "SPHERE") {
+
+         if (init_data_db->keyExists("radius")) {
+            d_radius = init_data_db->getDouble("radius");
+         } else {
+            TBOX_ERROR(
+               d_object_name << ": "
+               <<
+               "`radius' input required for SPHERE problem." << endl);
+         }
+         if (init_data_db->keyExists("center")) {
+            init_data_db->getDoubleArray("center", d_center, d_dim.getValue());
+         } else {
+            TBOX_ERROR(
+               d_object_name << ": "
+               <<
+               "`center' input required for SPHERE problem." << endl);
+         }
+         if (init_data_db->keyExists("density_inside")) {
+            d_density_inside = init_data_db->getDouble("density_inside");
+         } else {
+            TBOX_ERROR(d_object_name << ": "
+                                     << "`density_inside' input required for "
+                                     << "SPHERE problem." << endl);
+         }
+         if (init_data_db->keyExists("velocity_inside")) {
+            init_data_db->getDoubleArray("velocity_inside",
+               d_velocity_inside, d_dim.getValue());
+         } else {
+            TBOX_ERROR(d_object_name << ": "
+                                     << "`velocity_inside' input required for "
+                                     << "SPHERE problem." << endl);
+         }
+         if (init_data_db->keyExists("pressure_inside")) {
+            d_pressure_inside = init_data_db->getDouble("pressure_inside");
+         } else {
+            TBOX_ERROR(d_object_name << ": "
+                                     << "`pressure_inside' input required for "
+                                     << "SPHERE problem." << endl);
+         }
+         if (init_data_db->keyExists("density_outside")) {
+            d_density_outside = init_data_db->getDouble("density_outside");
+         } else {
+            TBOX_ERROR(d_object_name << ": "
+                                     << "`density_outside' input required for "
+                                     << "SPHERE problem." << endl);
+         }
+         if (init_data_db->keyExists("velocity_outside")) {
+            init_data_db->getDoubleArray("velocity_outside",
+               d_velocity_outside, d_dim.getValue());
+         } else {
+            TBOX_ERROR(
+               d_object_name << ": "
+               <<
+               "`velocity_outside' input required for "
+               << "SPHERE problem." << endl);
+         }
+         if (init_data_db->keyExists("pressure_outside")) {
+            d_pressure_outside = init_data_db->getDouble("pressure_outside");
+         } else {
+            TBOX_ERROR(
+               d_object_name << ": "
+               <<
+               "`pressure_outside' input required for "
+               << "SPHERE problem." << endl);
+         }
+
+         found_problem_data = true;
+
+      }
+
+      if (!found_problem_data &&
+          ((d_data_problem == "PIECEWISE_CONSTANT_X") ||
+           (d_data_problem == "PIECEWISE_CONSTANT_Y") ||
+           (d_data_problem == "PIECEWISE_CONSTANT_Z") ||
+           (d_data_problem == "STEP"))) {
+
+         int idir = 0;
+         if (d_data_problem == "PIECEWISE_CONSTANT_Y") {
+            idir = 1;
+         }
+
+         if (d_data_problem == "PIECEWISE_CONSTANT_Z") {
+            if (d_dim < tbox::Dimension(3)) {
+               TBOX_ERROR(
+                  d_object_name << ": `PIECEWISE_CONSTANT_Z' "
+                  << "problem invalid in 2 dimensions."
+                  << endl);
+            }
+            idir = 2;
+         }
+
+         tbox::Array<string> init_data_keys = init_data_db->getAllKeys();
+
+         if (init_data_db->keyExists("front_position")) {
+            d_front_position = init_data_db->getDoubleArray("front_position");
+         } else {
+            TBOX_ERROR(d_object_name << ": "
+                                     << "`front_position' input required for "
+                                     << "PIECEWISE_CONSTANT_* problem." << endl);
+         }
+
+         d_number_of_intervals =
+            tbox::MathUtilities<int>::Min(d_front_position.getSize() + 1,
+               init_data_keys.getSize() - 1);
+
+         d_front_position.resizeArray(d_front_position.getSize() + 1);
+         d_front_position[d_front_position.getSize() - 1] =
+            d_grid_geometry->getXUpper()[idir];
+
+         d_interval_density.resizeArray(d_number_of_intervals);
+         d_interval_velocity.resizeArray(d_number_of_intervals * d_dim.getValue());
+         d_interval_pressure.resizeArray(d_number_of_intervals);
+
+         int i = 0;
+         int nkey = 0;
+         bool found_interval_data = false;
+
+         while (!found_interval_data
+                && (i < d_number_of_intervals)
+                && (nkey < init_data_keys.getSize())) {
+
+            if (!(init_data_keys[nkey] == "front_position")) {
+
+               tbox::Pointer<tbox::Database> interval_db =
+                  init_data_db->getDatabase(init_data_keys[nkey]);
+
+               readStateDataEntry(interval_db,
+                  init_data_keys[nkey],
+                  i,
+                  d_interval_density,
+                  d_interval_velocity,
+                  d_interval_pressure);
+
+               i++;
+
+               found_interval_data = (i == d_number_of_intervals);
+
+            }
+
+            nkey++;
+
+         }
+
+         if (!found_interval_data) {
+            TBOX_ERROR(
+               d_object_name << ": "
+               <<
+               "Insufficient interval data given in input"
+               <<
+               " for PIECEWISE_CONSTANT_* or STEP problem." << endl);
+         }
+
+         found_problem_data = true;
+
+      }
+
+      if (!found_problem_data) {
+         TBOX_ERROR(d_object_name << ": "
+                                  << "`Initial_data' database found in input."
+                                  << " But bad data supplied." << endl);
+      }
+
+   } // if !is_from_restart read in problem data
+
+   const hier::IntVector& one_vec = hier::IntVector::getOne(d_dim);
+   hier::IntVector periodic = d_grid_geometry->getPeriodicShift(one_vec);
+   int num_per_dirs = 0;
+   for (int id = 0; id < d_dim.getValue(); id++) {
+      if (periodic(id)) num_per_dirs++;
+   }
+
+   if (num_per_dirs < d_dim.getValue()) {
+
+      if (db->keyExists("Boundary_data")) {
+
+         tbox::Pointer<tbox::Database> bdry_db = db->getDatabase(
+               "Boundary_data");
+
+         if (d_dim == tbox::Dimension(2)) {
+            appu::CartesianBoundaryUtilities2::readBoundaryInput(this,
+               bdry_db,
+               d_master_bdry_edge_conds,
+               d_master_bdry_node_conds,
+               periodic);
+         }
+         if (d_dim == tbox::Dimension(3)) {
+            appu::CartesianBoundaryUtilities3::readBoundaryInput(this,
+               bdry_db,
+               d_master_bdry_face_conds,
+               d_master_bdry_edge_conds,
+               d_master_bdry_node_conds,
+               periodic);
+         }
+
+      } else {
+         TBOX_ERROR(
+            d_object_name << ": "
+            <<
+            "Key data `Boundary_data' not found in input. " << endl);
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to put/get data members to/from from restart database.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::putToDatabase(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   db->putInteger("EULER_VERSION", EULER_VERSION);
+
+   db->putDouble("d_gamma", d_gamma);
+
+   db->putString("d_riemann_solve", d_riemann_solve);
+   db->putInteger("d_godunov_order", d_godunov_order);
+   db->putString("d_corner_transport", d_corner_transport);
+   db->putIntegerArray("d_nghosts", &d_nghosts[0], d_dim.getValue());
+   db->putIntegerArray("d_fluxghosts", &d_fluxghosts[0], d_dim.getValue());
+
+   db->putString("d_data_problem", d_data_problem);
+
+   if (d_data_problem == "SPHERE") {
+      db->putDouble("d_radius", d_radius);
+      db->putDoubleArray("d_center", d_center, d_dim.getValue());
+      db->putDouble("d_density_inside", d_density_inside);
+      db->putDoubleArray("d_velocity_inside", d_velocity_inside, d_dim.getValue());
+      db->putDouble("d_pressure_inside", d_pressure_inside);
+      db->putDouble("d_density_outside", d_density_outside);
+      db->putDoubleArray("d_velocity_outside", d_velocity_outside, d_dim.getValue());
+      db->putDouble("d_pressure_outside", d_pressure_outside);
+   }
+
+   if ((d_data_problem == "PIECEWISE_CONSTANT_X") ||
+       (d_data_problem == "PIECEWISE_CONSTANT_Y") ||
+       (d_data_problem == "PIECEWISE_CONSTANT_Z") ||
+       (d_data_problem == "STEP")) {
+      db->putInteger("d_number_of_intervals", d_number_of_intervals);
+      if (d_number_of_intervals > 0) {
+         db->putDoubleArray("d_front_position", d_front_position);
+         db->putDoubleArray("d_interval_density", d_interval_density);
+         db->putDoubleArray("d_interval_velocity", d_interval_velocity);
+         db->putDoubleArray("d_interval_pressure", d_interval_pressure);
+      }
+   }
+
+   db->putIntegerArray("d_master_bdry_edge_conds", d_master_bdry_edge_conds);
+   db->putIntegerArray("d_master_bdry_node_conds", d_master_bdry_node_conds);
+
+   if (d_dim == tbox::Dimension(2)) {
+      db->putDoubleArray("d_bdry_edge_density", d_bdry_edge_density);
+      db->putDoubleArray("d_bdry_edge_velocity", d_bdry_edge_velocity);
+      db->putDoubleArray("d_bdry_edge_pressure", d_bdry_edge_pressure);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      db->putIntegerArray("d_master_bdry_face_conds", d_master_bdry_face_conds);
+
+      db->putDoubleArray("d_bdry_face_density", d_bdry_face_density);
+      db->putDoubleArray("d_bdry_face_velocity", d_bdry_face_velocity);
+      db->putDoubleArray("d_bdry_face_pressure", d_bdry_face_pressure);
+   }
+
+   if (d_refinement_criteria.getSize() > 0) {
+      db->putStringArray("d_refinement_criteria", d_refinement_criteria);
+   }
+   for (int i = 0; i < d_refinement_criteria.getSize(); i++) {
+
+      if (d_refinement_criteria[i] == "DENSITY_DEVIATION") {
+
+         db->putDoubleArray("d_density_dev_tol",
+            d_density_dev_tol);
+         db->putDoubleArray("d_density_dev",
+            d_density_dev);
+         db->putDoubleArray("d_density_dev_time_max",
+            d_density_dev_time_max);
+         db->putDoubleArray("d_density_dev_time_min",
+            d_density_dev_time_min);
+
+      } else if (d_refinement_criteria[i] == "DENSITY_GRADIENT") {
+
+         db->putDoubleArray("d_density_grad_tol",
+            d_density_grad_tol);
+         db->putDoubleArray("d_density_grad_time_max",
+            d_density_grad_time_max);
+         db->putDoubleArray("d_density_grad_time_min",
+            d_density_grad_time_min);
+
+      } else if (d_refinement_criteria[i] == "DENSITY_SHOCK") {
+
+         db->putDoubleArray("d_density_shock_onset",
+            d_density_shock_onset);
+         db->putDoubleArray("d_density_shock_tol",
+            d_density_shock_tol);
+         db->putDoubleArray("d_density_shock_time_max",
+            d_density_shock_time_max);
+         db->putDoubleArray("d_density_shock_time_min",
+            d_density_shock_time_min);
+
+      } else if (d_refinement_criteria[i] == "DENSITY_RICHARDSON") {
+
+         db->putDoubleArray("d_density_rich_tol",
+            d_density_rich_tol);
+         db->putDoubleArray("d_density_rich_time_max",
+            d_density_rich_time_max);
+         db->putDoubleArray("d_density_rich_time_min",
+            d_density_rich_time_min);
+
+      } else if (d_refinement_criteria[i] == "PRESSURE_DEVIATION") {
+
+         db->putDoubleArray("d_pressure_dev_tol",
+            d_pressure_dev_tol);
+         db->putDoubleArray("d_pressure_dev",
+            d_pressure_dev);
+         db->putDoubleArray("d_pressure_dev_time_max",
+            d_pressure_dev_time_max);
+         db->putDoubleArray("d_pressure_dev_time_min",
+            d_pressure_dev_time_min);
+
+      } else if (d_refinement_criteria[i] == "PRESSURE_GRADIENT") {
+
+         db->putDoubleArray("d_pressure_grad_tol",
+            d_pressure_grad_tol);
+         db->putDoubleArray("d_pressure_grad_time_max",
+            d_pressure_grad_time_max);
+         db->putDoubleArray("d_pressure_grad_time_min",
+            d_pressure_grad_time_min);
+
+      } else if (d_refinement_criteria[i] == "PRESSURE_SHOCK") {
+
+         db->putDoubleArray("d_pressure_shock_onset",
+            d_pressure_shock_onset);
+         db->putDoubleArray("d_pressure_shock_tol",
+            d_pressure_shock_tol);
+         db->putDoubleArray("d_pressure_shock_time_max",
+            d_pressure_shock_time_max);
+         db->putDoubleArray("d_pressure_shock_time_min",
+            d_pressure_shock_time_min);
+
+      } else if (d_refinement_criteria[i] == "PRESSURE_RICHARDSON") {
+
+         db->putDoubleArray("d_pressure_rich_tol",
+            d_pressure_rich_tol);
+         db->putDoubleArray("d_pressure_rich_time_max",
+            d_pressure_rich_time_max);
+         db->putDoubleArray("d_pressure_rich_time_min",
+            d_pressure_rich_time_min);
+      }
+
+   }
+
+}
+
+void Euler::getFromRestart()
+{
+
+   tbox::Pointer<tbox::Database> root_db =
+      tbox::RestartManager::getManager()->getRootDatabase();
+
+   tbox::Pointer<tbox::Database> db;
+   if (root_db->isDatabase(d_object_name)) {
+      db = root_db->getDatabase(d_object_name);
+   } else {
+      TBOX_ERROR("Restart database corresponding to "
+         << d_object_name << " not found in restart file." << endl);
+   }
+
+   int ver = db->getInteger("EULER_VERSION");
+   if (ver != EULER_VERSION) {
+      TBOX_ERROR(
+         d_object_name << ": "
+         <<
+         "Restart file version different than class version." << endl);
+   }
+
+   d_gamma = db->getDouble("d_gamma");
+
+   d_riemann_solve = db->getString("d_riemann_solve");
+   d_godunov_order = db->getInteger("d_godunov_order");
+   d_corner_transport = db->getString("d_corner_transport");
+
+   int* tmp_nghosts = &d_nghosts[0];
+   db->getIntegerArray("d_nghosts", tmp_nghosts, d_dim.getValue());
+   for (int i = 0; i < d_dim.getValue(); i++) {
+      if (d_nghosts(i) != CELLG) {
+         TBOX_ERROR(
+            d_object_name << ": "
+            <<
+            "Key data `d_nghosts' in restart file != CELLG." << endl);
+      }
+   }
+   int* tmp_fluxghosts = &d_fluxghosts[0];
+   db->getIntegerArray("d_fluxghosts", tmp_fluxghosts, d_dim.getValue());
+   for (int i = 0; i < d_dim.getValue(); i++) {
+      if (d_fluxghosts(i) != FLUXG) {
+         TBOX_ERROR(
+            d_object_name << ": "
+            <<
+            "Key data `d_fluxghosts' in restart file != FLUXG." << endl);
+      }
+   }
+
+   d_data_problem = db->getString("d_data_problem");
+
+   if (d_data_problem == "SPHERE") {
+      d_radius = db->getDouble("d_radius");
+      db->getDoubleArray("d_center", d_center, d_dim.getValue());
+      d_density_inside = db->getDouble("d_density_inside");
+      db->getDoubleArray("d_velocity_inside", d_velocity_inside, d_dim.getValue());
+      d_pressure_inside = db->getDouble("d_pressure_inside");
+      d_density_outside = db->getDouble("d_density_outside");
+      db->getDoubleArray("d_velocity_outside", d_velocity_outside, d_dim.getValue());
+      d_pressure_outside = db->getDouble("d_pressure_outside");
+   }
+
+   if ((d_data_problem == "PIECEWISE_CONSTANT_X") ||
+       (d_data_problem == "PIECEWISE_CONSTANT_Y") ||
+       (d_data_problem == "PIECEWISE_CONSTANT_Z") ||
+       (d_data_problem == "STEP")) {
+      d_number_of_intervals = db->getInteger("d_number_of_intervals");
+      if (d_number_of_intervals > 0) {
+         d_front_position = db->getDoubleArray("d_front_position");
+         d_interval_density = db->getDoubleArray("d_interval_density");
+         d_interval_velocity = db->getDoubleArray("d_interval_velocity");
+         d_interval_pressure = db->getDoubleArray("d_interval_pressure");
+      }
+   }
+
+   d_master_bdry_edge_conds = db->getIntegerArray("d_master_bdry_edge_conds");
+   d_master_bdry_node_conds = db->getIntegerArray("d_master_bdry_node_conds");
+
+   if (d_dim == tbox::Dimension(2)) {
+      d_bdry_edge_density = db->getDoubleArray("d_bdry_edge_density");
+      d_bdry_edge_velocity = db->getDoubleArray("d_bdry_edge_velocity");
+      d_bdry_edge_pressure = db->getDoubleArray("d_bdry_edge_pressure");
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      d_master_bdry_face_conds = db->getIntegerArray("d_master_bdry_face_conds");
+
+      d_bdry_face_density = db->getDoubleArray("d_bdry_face_density");
+      d_bdry_face_velocity = db->getDoubleArray("d_bdry_face_velocity");
+      d_bdry_face_pressure = db->getDoubleArray("d_bdry_face_pressure");
+   }
+
+   if (db->keyExists("d_refinement_criteria")) {
+      d_refinement_criteria = db->getStringArray("d_refinement_criteria");
+   }
+
+   for (int i = 0; i < d_refinement_criteria.getSize(); i++) {
+
+      if (d_refinement_criteria[i] == "DENSITY_DEVIATION") {
+
+         d_density_dev_tol =
+            db->getDoubleArray("d_density_dev_tol");
+         d_density_dev =
+            db->getDoubleArray("d_density_dev");
+         d_density_dev_time_max =
+            db->getDoubleArray("d_density_dev_time_max");
+         d_density_dev_time_min =
+            db->getDoubleArray("d_density_dev_time_min");
+
+      } else if (d_refinement_criteria[i] == "DENSITY_GRADIENT") {
+
+         d_density_grad_tol =
+            db->getDoubleArray("d_density_grad_tol");
+         d_density_grad_time_max =
+            db->getDoubleArray("d_density_grad_time_max");
+         d_density_grad_time_min =
+            db->getDoubleArray("d_density_grad_time_min");
+
+      } else if (d_refinement_criteria[i] == "DENSITY_SHOCK") {
+
+         d_density_shock_onset =
+            db->getDoubleArray("d_density_shock_onset");
+         d_density_shock_tol =
+            db->getDoubleArray("d_density_shock_tol");
+         d_density_shock_time_max =
+            db->getDoubleArray("d_density_shock_time_max");
+         d_density_shock_time_min =
+            db->getDoubleArray("d_density_shock_time_min");
+
+      } else if (d_refinement_criteria[i] == "DENSITY_RICHARDSON") {
+
+         d_density_rich_tol =
+            db->getDoubleArray("d_density_rich_tol");
+         d_density_rich_time_max =
+            db->getDoubleArray("d_density_rich_time_max");
+         d_density_rich_time_min =
+            db->getDoubleArray("d_density_rich_time_min");
+
+      } else if (d_refinement_criteria[i] == "PRESSURE_DEVIATION") {
+
+         d_pressure_dev_tol =
+            db->getDoubleArray("d_pressure_dev_tol");
+         d_pressure_dev =
+            db->getDoubleArray("d_pressure_dev");
+         d_pressure_dev_time_max =
+            db->getDoubleArray("d_pressure_dev_time_max");
+         d_pressure_dev_time_min =
+            db->getDoubleArray("d_pressure_dev_time_min");
+
+      } else if (d_refinement_criteria[i] == "PRESSURE_GRADIENT") {
+
+         d_pressure_grad_tol =
+            db->getDoubleArray("d_pressure_grad_tol");
+         d_pressure_grad_time_max =
+            db->getDoubleArray("d_pressure_grad_time_max");
+         d_pressure_grad_time_min =
+            db->getDoubleArray("d_pressure_grad_time_min");
+
+      } else if (d_refinement_criteria[i] == "PRESSURE_SHOCK") {
+
+         d_pressure_shock_onset =
+            db->getDoubleArray("d_pressure_shock_onset");
+         d_pressure_shock_tol =
+            db->getDoubleArray("d_pressure_shock_tol");
+         d_pressure_shock_time_max =
+            db->getDoubleArray("d_pressure_shock_time_max");
+         d_pressure_shock_time_min =
+            db->getDoubleArray("d_pressure_shock_time_min");
+
+      } else if (d_refinement_criteria[i] == "PRESSURE_RICHARDSON") {
+
+         d_pressure_rich_tol =
+            db->getDoubleArray("d_pressure_rich_tol");
+         d_pressure_rich_time_max =
+            db->getDoubleArray("d_pressure_rich_time_max");
+         d_pressure_rich_time_min =
+            db->getDoubleArray("d_pressure_rich_time_min");
+
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to read boundary data from input database.                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::readDirichletBoundaryDataEntry(
+   tbox::Pointer<tbox::Database> db,
+   string& db_name,
+   int bdry_location_index)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+   TBOX_ASSERT(!db_name.empty());
+#endif
+   if (d_dim == tbox::Dimension(2)) {
+      readStateDataEntry(db,
+         db_name,
+         bdry_location_index,
+         d_bdry_edge_density,
+         d_bdry_edge_velocity,
+         d_bdry_edge_pressure);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      readStateDataEntry(db,
+         db_name,
+         bdry_location_index,
+         d_bdry_face_density,
+         d_bdry_face_velocity,
+         d_bdry_face_pressure);
+   }
+}
+
+void Euler::readStateDataEntry(
+   tbox::Pointer<tbox::Database> db,
+   const string& db_name,
+   int array_indx,
+   tbox::Array<double>& density,
+   tbox::Array<double>& velocity,
+   tbox::Array<double>& pressure)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+   TBOX_ASSERT(!db_name.empty());
+   TBOX_ASSERT(array_indx >= 0);
+   TBOX_ASSERT(density.getSize() > array_indx);
+   TBOX_ASSERT(velocity.getSize() > array_indx * d_dim.getValue());
+   TBOX_ASSERT(pressure.getSize() > array_indx);
+#endif
+
+   if (db->keyExists("density")) {
+      density[array_indx] = db->getDouble("density");
+   } else {
+      TBOX_ERROR(d_object_name << ": "
+                               << "`density' entry missing from " << db_name
+                               << " input database. " << endl);
+   }
+   if (db->keyExists("velocity")) {
+      tbox::Array<double> tmp_vel(0);
+      tmp_vel = db->getDoubleArray("velocity");
+      if (tmp_vel.getSize() < d_dim.getValue()) {
+         TBOX_ERROR(d_object_name << ": "
+                                  << "Insufficient number `velocity' values"
+                                  << " given in " << db_name
+                                  << " input database." << endl);
+      }
+      for (int iv = 0; iv < d_dim.getValue(); iv++) {
+         velocity[array_indx * d_dim.getValue() + iv] = tmp_vel[iv];
+      }
+   } else {
+      TBOX_ERROR(d_object_name << ": "
+                               << "`velocity' entry missing from " << db_name
+                               << " input database. " << endl);
+   }
+   if (db->keyExists("pressure")) {
+      pressure[array_indx] = db->getDouble("pressure");
+   } else {
+      TBOX_ERROR(d_object_name << ": "
+                               << "`pressure' entry missing from " << db_name
+                               << " input database. " << endl);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routine to check boundary data when debugging.                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::checkBoundaryData(
+   int btype,
+   const hier::Patch& patch,
+   const hier::IntVector& ghost_width_to_check,
+   const tbox::Array<int>& scalar_bconds,
+   const tbox::Array<int>& vector_bconds) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_dim == tbox::Dimension(2)) {
+      TBOX_ASSERT(btype == EDGE2D_BDRY_TYPE ||
+         btype == NODE2D_BDRY_TYPE);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      TBOX_ASSERT(btype == FACE3D_BDRY_TYPE ||
+         btype == EDGE3D_BDRY_TYPE ||
+         btype == NODE3D_BDRY_TYPE);
+   }
+#endif
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+      patch.getPatchGeometry();
+   const tbox::Array<hier::BoundaryBox> bdry_boxes =
+      pgeom->getCodimensionBoundaries(btype);
+
+   hier::VariableDatabase* vdb = hier::VariableDatabase::getDatabase();
+
+   for (int i = 0; i < bdry_boxes.getSize(); i++) {
+      hier::BoundaryBox bbox = bdry_boxes[i];
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(bbox.getBoundaryType() == btype);
+#endif
+      int bloc = bbox.getLocationIndex();
+
+      int bscalarcase = 0;
+      int bvelocitycase = 0;
+      int refbdryloc = 0;
+      if (d_dim == tbox::Dimension(2)) {
+         if (btype == EDGE2D_BDRY_TYPE) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(scalar_bconds.getSize() == NUM_2D_EDGES);
+            TBOX_ASSERT(vector_bconds.getSize() == NUM_2D_EDGES);
+#endif
+            bscalarcase = scalar_bconds[bloc];
+            bvelocitycase = vector_bconds[bloc];
+            refbdryloc = bloc;
+         } else { // btype == NODE2D_BDRY_TYPE
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(scalar_bconds.getSize() == NUM_2D_NODES);
+            TBOX_ASSERT(vector_bconds.getSize() == NUM_2D_NODES);
+#endif
+            bscalarcase = scalar_bconds[bloc];
+            bvelocitycase = vector_bconds[bloc];
+            refbdryloc = d_node_bdry_edge[bloc];
+         }
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         if (btype == FACE3D_BDRY_TYPE) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(scalar_bconds.getSize() == NUM_3D_FACES);
+            TBOX_ASSERT(vector_bconds.getSize() == NUM_3D_FACES);
+#endif
+            bscalarcase = scalar_bconds[bloc];
+            bvelocitycase = vector_bconds[bloc];
+            refbdryloc = bloc;
+         } else if (btype == EDGE3D_BDRY_TYPE) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(scalar_bconds.getSize() == NUM_3D_EDGES);
+            TBOX_ASSERT(vector_bconds.getSize() == NUM_3D_EDGES);
+#endif
+            bscalarcase = scalar_bconds[bloc];
+            bvelocitycase = vector_bconds[bloc];
+            refbdryloc = d_edge_bdry_face[bloc];
+         } else { // btype == NODE3D_BDRY_TYPE
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(scalar_bconds.getSize() == NUM_3D_NODES);
+            TBOX_ASSERT(vector_bconds.getSize() == NUM_3D_NODES);
+#endif
+            bscalarcase = scalar_bconds[bloc];
+            bvelocitycase = vector_bconds[bloc];
+            refbdryloc = d_node_bdry_face[bloc];
+         }
+      }
+
+      int num_bad_values = 0;
+
+      if (d_dim == tbox::Dimension(2)) {
+         num_bad_values =
+            appu::CartesianBoundaryUtilities2::checkBdryData(
+               d_density->getName(),
+               patch,
+               vdb->mapVariableAndContextToIndex(d_density,
+                  getDataContext()), 0,
+               ghost_width_to_check,
+               bbox,
+               bscalarcase,
+               d_bdry_edge_density[refbdryloc]);
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         num_bad_values =
+            appu::CartesianBoundaryUtilities3::checkBdryData(
+               d_density->getName(),
+               patch,
+               vdb->mapVariableAndContextToIndex(d_density,
+                  getDataContext()), 0,
+               ghost_width_to_check,
+               bbox,
+               bscalarcase,
+               d_bdry_face_density[refbdryloc]);
+      }
+#if (TESTING == 1)
+      if (num_bad_values > 0) {
+         tbox::perr << "\nEuler Boundary Test FAILED: \n"
+                    << "     " << num_bad_values
+                    << " bad DENSITY values found for\n"
+                    << "     boundary type " << btype << " at location "
+                    << bloc << endl;
+      }
+#endif
+
+      if (d_dim == tbox::Dimension(2)) {
+         num_bad_values =
+            appu::CartesianBoundaryUtilities2::checkBdryData(
+               d_pressure->getName(),
+               patch,
+               vdb->mapVariableAndContextToIndex(d_pressure, getDataContext()),
+               0,
+               ghost_width_to_check,
+               bbox,
+               bscalarcase,
+               d_bdry_edge_density[refbdryloc]);
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         num_bad_values =
+            appu::CartesianBoundaryUtilities3::checkBdryData(
+               d_pressure->getName(),
+               patch,
+               vdb->mapVariableAndContextToIndex(d_pressure, getDataContext()),
+               0,
+               ghost_width_to_check,
+               bbox,
+               bscalarcase,
+               d_bdry_face_density[refbdryloc]);
+      }
+#if (TESTING == 1)
+      if (num_bad_values > 0) {
+         tbox::perr << "\nEuler Boundary Test FAILED: \n"
+                    << "     " << num_bad_values
+                    << " bad PRESSURE values found for\n"
+                    << "     boundary type " << btype << " at location "
+                    << bloc << endl;
+      }
+#endif
+
+      for (int idir = 0; idir < d_dim.getValue(); idir++) {
+
+         int vbcase = bscalarcase;
+         if (d_dim == tbox::Dimension(2)) {
+            if (btype == EDGE2D_BDRY_TYPE) {
+               if ((idir == 0 && (bloc == XLO || bloc == XHI)) ||
+                   (idir == 1 && (bloc == YLO || bloc == YHI))) {
+                  vbcase = bvelocitycase;
+               }
+            } else if (btype == NODE2D_BDRY_TYPE) {
+               if ((idir == 0 && bvelocitycase == XREFLECT_BC) ||
+                   (idir == 1 && bvelocitycase == YREFLECT_BC)) {
+                  vbcase = bvelocitycase;
+               }
+            }
+         }
+         if (d_dim == tbox::Dimension(3)) {
+            if (btype == FACE3D_BDRY_TYPE) {
+               if ((idir == 0 && (bloc == XLO || bloc == XHI)) ||
+                   (idir == 1 && (bloc == YLO || bloc == YHI)) ||
+                   (idir == 2 && (bloc == ZLO || bloc == ZHI))) {
+                  vbcase = bvelocitycase;
+               }
+            } else if (btype == EDGE3D_BDRY_TYPE || btype ==
+                       NODE3D_BDRY_TYPE) {
+               if ((idir == 0 && bvelocitycase == XREFLECT_BC) ||
+                   (idir == 1 && bvelocitycase == YREFLECT_BC) ||
+                   (idir == 2 && bvelocitycase == ZREFLECT_BC)) {
+                  vbcase = bvelocitycase;
+               }
+            }
+         }
+
+         if (d_dim == tbox::Dimension(2)) {
+            num_bad_values =
+               appu::CartesianBoundaryUtilities2::checkBdryData(
+                  d_velocity->getName(),
+                  patch,
+                  vdb->mapVariableAndContextToIndex(d_velocity, getDataContext()),
+                  idir,
+                  ghost_width_to_check,
+                  bbox,
+                  vbcase,
+                  d_bdry_edge_velocity[refbdryloc * d_dim.getValue() + idir]);
+         }
+         if (d_dim == tbox::Dimension(3)) {
+            num_bad_values =
+               appu::CartesianBoundaryUtilities3::checkBdryData(
+                  d_velocity->getName(),
+                  patch,
+                  vdb->mapVariableAndContextToIndex(d_velocity, getDataContext()),
+                  idir,
+                  ghost_width_to_check,
+                  bbox,
+                  vbcase,
+                  d_bdry_face_velocity[refbdryloc * d_dim.getValue() + idir]);
+         }
+#if (TESTING == 1)
+         if (num_bad_values > 0) {
+            tbox::perr << "\nEuler Boundary Test FAILED: \n"
+                       << "     " << num_bad_values
+                       << " bad VELOCITY values found in direction " << idir
+                       << " for\n"
+                       << "     boundary type " << btype << " at location "
+                       << bloc << endl;
+         }
+#endif
+      }
+
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/Euler.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/Euler.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,602 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Numerical routines for single patch in Euler equation ex. 
+ *
+ ************************************************************************/
+
+#ifndef included_EulerXD
+#define included_EulerXD
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/appu/VisDerivedDataStrategy.h"
+#include "SAMRAI/appu/VisItDataWriter.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/appu/BoundaryUtilityStrategy.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/mesh/GriddingAlgorithm.h"
+#include "SAMRAI/algs/HyperbolicLevelIntegrator.h"
+#include "SAMRAI/algs/HyperbolicPatchStrategy.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Serializable.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/MessageStream.h"
+#include "SAMRAI/tbox/Array.h"
+
+#include <string>
+using namespace std;
+
+/**
+ * The Euler class provides routines for a sample application code that
+ * solves the Euler equations of gas dynamics.  This code illustrates the
+ * manner in which a code employing the standard Berger/Oliger AMR algorithm
+ * for explicit hydrodynamics can be used in the SAMRAI framework.
+ * This class is derived from the algs::HyperbolicPatchStrategy abstract base
+ * class which defines the bulk of the interface between the hyperbolic
+ * intergration algorithm provided by SAMRAI and the numerical routines
+ * specific to Euler.  In particular, this class provides routines which
+ * maybe applied to any patch in an AMR patch hierarchy.
+ *
+ * The numerical routines model the Euler equations of gas dynamics with
+ * explicit timestepping and a second-order unsplit Godunov method.
+ * The primary numerical quantities are density, velocity, and pressure.
+ */
+
+using namespace SAMRAI;
+
+class Euler:
+   public tbox::Serializable,
+   public algs::HyperbolicPatchStrategy,
+   public appu::BoundaryUtilityStrategy,
+   public appu::VisDerivedDataStrategy
+{
+public:
+   /**
+    * The constructor for Euler sets default parameters for the
+    * Euler model.  Specifically, it allocates the variables that represent
+    * the state of the solution.  The constructor also registers this
+    * object for restart with the restart manager using the object name.
+    *
+    * After default values are set, this routine calls getFromRestart()
+    * if execution from a restart file is specified.  Finally,
+    * getFromInput() is called to read values from the given input
+    * database (potentially overriding those found in the restart file).
+    */
+   Euler(
+      const string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> input_db,
+      tbox::Pointer<geom::CartesianGridGeometry> grid_geom);
+
+   /**
+    * The destructor for Euler does nothing.
+    */
+   ~Euler();
+
+   ///
+   ///  The following routines:
+   ///
+   ///      registerModelVariables(),
+   ///      initializeDataOnPatch(),
+   ///      computeStableDtOnPatch(),
+   ///      computeFluxesOnPatch(),
+   ///      conservativeDifferenceOnPatch(),
+   ///      tagGradientDetectorCells(),
+   ///      tagRichardsonExtrapolationCells()
+   ///
+   ///  are concrete implementations of functions declared in the
+   ///  algs::HyperbolicPatchStrategy abstract base class.
+   ///
+
+   /**
+    * Register Euler model variables with algs::HyperbolicLevelIntegrator
+    * according to variable registration function provided by the integrator.
+    * In other words, variables are registered according to their role
+    * in the integration process (e.g., time-dependent, flux, etc.).
+    * This routine also registers variables for plotting with the
+    * Vis writer.
+    */
+   void
+   registerModelVariables(
+      algs::HyperbolicLevelIntegrator* integrator);
+
+   /**
+    * Set up parameters in the load balancer object (owned by the gridding
+    * algorithm) if needed.  The Euler model allows non-uniform load balancing
+    * to be used based on the input file parameter called
+    * "use_nonuniform_workload".  The default case is to use uniform
+    * load balancing (i.e., use_nonuniform_workload == false).  For
+    * illustrative and testing purposes, when non-uniform load balancing is
+    * turned on, a weight of one will be applied to every grid cell.  This
+    * should produce an identical patch configuration to the uniform load
+    * balance case.
+    */
+   void
+   setupLoadBalancer(
+      algs::HyperbolicLevelIntegrator* integrator,
+      mesh::GriddingAlgorithm* gridding_algorithm);
+
+   /**
+    * Set the data on the patch interior to some initial values,
+    * depending on the input parameters and numerical routines.
+    * If the "initial_time" flag is false, indicating that the
+    * routine is called after a regridding step, the routine does nothing.
+    */
+   void
+   initializeDataOnPatch(
+      hier::Patch& patch,
+      const double data_time,
+      const bool initial_time);
+
+   /**
+    * Compute the stable time increment for patch using a CFL
+    * condition and return the computed dt.
+    */
+   double
+   computeStableDtOnPatch(
+      hier::Patch& patch,
+      const bool initial_time,
+      const double dt_time);
+
+   /**
+    * Compute time integral of fluxes to be used in conservative difference
+    * for patch integration.  When d_dim == tbox::Dimension(3)), this function calls either
+    * compute3DFluxesWithCornerTransport1(), or
+    * compute3DFluxesWithCornerTransport2() depending on which
+    * transverse flux correction option that is specified in input.
+    * The conservative difference used to update the integrated quantities
+    * is implemented in the conservativeDifferenceOnPatch() routine.
+    */
+   void
+   computeFluxesOnPatch(
+      hier::Patch& patch,
+      const double time,
+      const double dt);
+
+   /**
+    * Update Euler solution variables by performing a conservative
+    * difference with the fluxes calculated in computeFluxesOnPatch().
+    */
+   void
+   conservativeDifferenceOnPatch(
+      hier::Patch& patch,
+      const double time,
+      const double dt,
+      bool at_syncronization);
+
+   /**
+    * Tag cells for refinement using gradient detector.
+    */
+   void
+   tagGradientDetectorCells(
+      hier::Patch& patch,
+      const double regrid_time,
+      const bool initial_error,
+      const int tag_indx,
+      const bool uses_richardson_extrapolation_too);
+
+   /**
+    * Tag cells for refinement using Richardson extrapolation.
+    */
+   void
+   tagRichardsonExtrapolationCells(
+      hier::Patch& patch,
+      const int error_level_number,
+      const tbox::Pointer<hier::VariableContext> coarsened_fine,
+      const tbox::Pointer<hier::VariableContext> advanced_coarse,
+      const double regrid_time,
+      const double deltat,
+      const int error_coarsen_ratio,
+      const bool initial_error,
+      const int tag_index,
+      const bool uses_gradient_detector_too);
+
+   ///
+   ///  The following routines:
+   ///
+   ///      setPhysicalBoundaryConditions(),
+   ///      getRefineOpStencilWidth(),
+   ///      postprocessRefine()
+   ///
+   ///  are concrete implementations of functions declared in the
+   ///  RefinePatchStrategy abstract base class.
+   ///
+
+   /**
+    * Set the data in ghost cells corresponding to physical boundary
+    * conditions.  Specific boundary conditions are determined by
+    * information specified in input file and numerical routines.
+    */
+   void
+   setPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const double fill_time,
+      const hier::IntVector&
+      ghost_width_to_fill);
+
+   /**
+    * Return stencil width of conservative linear interpolation operations.
+    */
+   virtual hier::IntVector
+   getRefineOpStencilWidth() const;
+
+   /**
+    * Refine velocity and pressure from coarse patch to fine patch
+    * so that momentum and total energy are conserved.
+    */
+   void
+   postprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio);
+
+   ///
+   ///  The following routines:
+   ///
+   ///      getCoarsenOpStencilWidth(),
+   ///      postprocessCoarsen()
+   ///
+   ///  are concrete implementations of functions declared in the
+   ///  CoarsenPatchStrategy abstract base class.
+   ///
+
+   /**
+    * Return stencil width of conservative averaging operations.
+    */
+   hier::IntVector
+   getCoarsenOpStencilWidth() const;
+
+   /**
+    * Coarsen velocity and pressure from coarse patch to fine patch
+    * so that momentum and total energy are conserved.
+    */
+   void
+   postprocessCoarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio);
+
+   /**
+    * Write state of Euler object to the given database for restart.
+    *
+    * This routine is a concrete implementation of the function
+    * declared in the tbox::Serializable abstract base class.
+    */
+   void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> db);
+
+   /**
+    * This routine is a concrete implementation of the virtual function
+    * in the base class BoundaryUtilityStrategy.  It reads DIRICHLET
+    * boundary state values from the given database with the
+    * given name string idenifier.  The integer location index
+    * indicates the face (in 3D) or edge (in 2D) to which the boundary
+    * condition applies.
+    */
+   void
+   readDirichletBoundaryDataEntry(
+      tbox::Pointer<tbox::Database> db,
+      string& db_name,
+      int bdry_location_index);
+
+   /**
+    * Register a VisIt data writer so this class will write
+    * plot files that may be postprocessed with the VisIt
+    * visualization tool.
+    */
+#ifdef HAVE_HDF5
+   void
+   registerVisItDataWriter(
+      tbox::Pointer<appu::VisItDataWriter> viz_writer);
+#endif
+
+   /**
+    * This routine is a concrete implementation of the virtual function
+    * in the base class appu::VisDerivedDataStrategy.  It computes derived
+    * plot quantities registered with the VisIt data
+    * writers from data  that is maintained on each patch in the
+    * hierarchy.  In particular, it writes the plot quantity
+    * identified by the string variable name to the specified
+    * double buffer on the patch in the given region.  The depth_id
+    * integer argument indicates which entry in the "depth" of the
+    * vector is being written; for a scalar quantity, this may be
+    * ignored.  For a vector quantity, it may be used to compute
+    * the quantity at the particular depth (e.g. mom[depth_id] =
+    * rho * vel[depth_id]).  The boolean return value specifies
+    * whether or not derived data exists on the patch.  Generally,
+    * this will be TRUE.  If the derived data does NOT exist on
+    * the patch, return FALSE.
+    */
+   bool
+   packDerivedDataIntoDoubleBuffer(
+      double* buffer,
+      const hier::Patch& patch,
+      const hier::Box& region,
+      const string& variable_name,
+      int depth_id) const;
+
+   ///
+   ///  The following routines are specific to the Euler class and
+   ///  are not declared in any base class.
+   ///
+
+   /**
+    * Reset physical boundary values in special cases, such as when
+    * using symmetric (i.e., reflective) boundary conditions.
+    */
+   void
+   boundaryReset(
+      hier::Patch& patch,
+      pdat::FaceData<double>& traced_left,
+      pdat::FaceData<double>& traced_right) const;
+
+   /**
+    * Print all data members for Euler class.
+    */
+   void
+   printClassData(
+      ostream& os) const;
+
+   /*
+    * Dump data in intersection of 1-dimensional "pencil box" to file
+    * with given name.  The direction corresponds to the axis of the
+    * pencil box in the domain.  Data dumped by this routine is
+    * readable by Matlab.
+    */
+   void
+   writeData1dPencil(
+      const tbox::Pointer<hier::Patch> patch,
+      const hier::Box& pencil_box,
+      const int idir,
+      ostream& file);
+
+private:
+   /*
+    * These private member functions read data from input and restart.
+    * When beginning a run from a restart file, all data members are read
+    * from the restart file.   If the boolean flag "is_from_restart"
+    * is true when reading from input, some restart values may be
+    * overridden by those in the input file.
+    *
+    * An assertion results if the database pointer is null.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db,
+      bool is_from_restart);
+   void
+   getFromRestart();
+
+   void
+   readStateDataEntry(
+      tbox::Pointer<tbox::Database> db,
+      const string& db_name,
+      int array_indx,
+      tbox::Array<double>& density,
+      tbox::Array<double>& velocity,
+      tbox::Array<double>& pressure);
+
+   /*
+    * Private member function to check correctness of boundary data.
+    */
+   void
+   checkBoundaryData(
+      int btype,
+      const hier::Patch& patch,
+      const hier::IntVector& ghost_width_to_fill,
+      const tbox::Array<int>& scalar_bconds,
+      const tbox::Array<int>& vector_bconds) const;
+
+   /*
+    * Three-dimensional flux computation routines corresponding to
+    * either of the two transverse flux correction options.  These
+    * routines are called from the computeFluxesOnPatch() function.
+    */
+   void
+   compute3DFluxesWithCornerTransport1(
+      hier::Patch& patch,
+      const double dt);
+   void
+   compute3DFluxesWithCornerTransport2(
+      hier::Patch& patch,
+      const double dt);
+
+   /*
+    * The object name is used for error/warning reporting and also as a
+    * string label for restart database entries.
+    */
+   string d_object_name;
+
+   /*
+    * We cache pointers to the grid geometry and Vis data writers
+    * to set up initial data, set physical boundary conditions,
+    * and register plot variables.  We also cache a pointer to the
+    * plot context passed to the variable registration routine.
+    */
+   tbox::Pointer<geom::CartesianGridGeometry> d_grid_geometry;
+
+#ifdef HAVE_HDF5
+   tbox::Pointer<appu::VisItDataWriter> d_visit_writer;
+#endif
+   tbox::Pointer<hier::VariableContext> d_plot_context;
+
+   /*
+    * Problem dimension.
+    */
+   const tbox::Dimension d_dim;
+
+   /*
+    * Data items used for nonuniform load balance, if used.
+    */
+   tbox::Pointer<pdat::CellVariable<double> > d_workload_variable;
+   int d_workload_data_id;
+   bool d_use_nonuniform_workload;
+
+   /*
+    * Euler solution state is represented by "primitive" variables,
+    * density, velocity, and pressure.
+    */
+   tbox::Pointer<pdat::CellVariable<double> > d_density;
+   tbox::Pointer<pdat::CellVariable<double> > d_velocity;
+   tbox::Pointer<pdat::CellVariable<double> > d_pressure;
+
+   /*
+    * tbox::Pointer to flux variable vector  - [frho, fu, fp]
+    */
+   tbox::Pointer<pdat::FaceVariable<double> > d_flux;
+
+   /*
+    * Ratio of specific heats for ideal gas.
+    */
+   double d_gamma;
+
+   /*
+    *  Parameters for numerical method:
+    *
+    *    d_riemann_solve ....... Riemann solver used in flux calculation
+    *
+    *    d_godunov_order ....... order of Godunov slopes (1, 2, or 4)
+    *
+    *    d_corner_transport .... type of finite difference approximation
+    *                            for 3d transverse flux correction
+    *
+    *    d_nghosts ............. number of ghost cells for cell-centered
+    *                            and face/side-centered variables
+    *
+    *    d_fluxghosts .......... number of ghost cells for fluxes
+    *
+    */
+   string d_riemann_solve;
+   int d_riemann_solve_int;
+   int d_godunov_order;
+   string d_corner_transport;
+   hier::IntVector d_nghosts;
+   hier::IntVector d_fluxghosts;
+
+   /*
+    * Indicator for problem type and initial conditions
+    */
+   string d_data_problem;
+   int d_data_problem_int;
+
+   /*
+    * Input for SPHERE problem
+    */
+   double d_radius;
+   double d_center[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   double d_density_inside;
+   double d_velocity_inside[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   double d_pressure_inside;
+   double d_density_outside;
+   double d_velocity_outside[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   double d_pressure_outside;
+
+   /*
+    * Input for PIECEWISE_CONSTANT_*  and STEP problems
+    */
+   int d_number_of_intervals;
+   tbox::Array<double> d_front_position;
+   tbox::Array<double> d_interval_density;
+   tbox::Array<double> d_interval_velocity;
+   tbox::Array<double> d_interval_pressure;
+
+   /*
+    * Boundary condition cases and boundary values.
+    * Options are: FLOW, REFLECT, DIRICHLET
+    * and variants for nodes and edges.
+    *
+    * Input file values are read into these arrays.
+    */
+   tbox::Array<int> d_master_bdry_edge_conds;
+   tbox::Array<int> d_master_bdry_node_conds;
+   tbox::Array<int> d_master_bdry_face_conds; // Used in 3D only.
+
+   /*
+    * Boundary condition cases for scalar and vector (i.e., depth > 1)
+    * variables.  These are post-processed input values and are passed
+    * to the boundary routines.
+    */
+   tbox::Array<int> d_scalar_bdry_edge_conds;
+   tbox::Array<int> d_vector_bdry_edge_conds;
+
+   tbox::Array<int> d_scalar_bdry_node_conds;
+   tbox::Array<int> d_vector_bdry_node_conds;
+
+   tbox::Array<int> d_scalar_bdry_face_conds; // Used in 3D only.
+   tbox::Array<int> d_vector_bdry_face_conds; // Used in 3D only.
+
+   tbox::Array<int> d_node_bdry_edge; // Used in 2D only.
+   tbox::Array<int> d_edge_bdry_face; // Used in 3D only.
+   tbox::Array<int> d_node_bdry_face; // Used in 3D only.
+
+   /*
+    * Arrays of face (3d) or edge (2d) boundary values for DIRICHLET case.
+    */
+   tbox::Array<double> d_bdry_edge_density; // Used in 2D only.
+   tbox::Array<double> d_bdry_edge_velocity; // Used in 2D only.
+   tbox::Array<double> d_bdry_edge_pressure; // Used in 2D only.
+   tbox::Array<double> d_bdry_face_density; // Used in 3D only.
+   tbox::Array<double> d_bdry_face_velocity; // Used in 3D only.
+   tbox::Array<double> d_bdry_face_pressure; // Used in 3D only.
+
+   /*
+    * Refinement criteria parameters for gradient detector and
+    * Richardson extrapolation.
+    */
+   tbox::Array<string> d_refinement_criteria;
+   tbox::Array<double> d_density_dev_tol;
+   tbox::Array<double> d_density_dev;
+   tbox::Array<double> d_density_dev_time_max;
+   tbox::Array<double> d_density_dev_time_min;
+   tbox::Array<double> d_density_grad_tol;
+   tbox::Array<double> d_density_grad_time_max;
+   tbox::Array<double> d_density_grad_time_min;
+   tbox::Array<double> d_density_shock_onset;
+   tbox::Array<double> d_density_shock_tol;
+   tbox::Array<double> d_density_shock_time_max;
+   tbox::Array<double> d_density_shock_time_min;
+   tbox::Array<double> d_density_rich_tol;
+   tbox::Array<double> d_density_rich_time_max;
+   tbox::Array<double> d_density_rich_time_min;
+   tbox::Array<double> d_pressure_dev_tol;
+   tbox::Array<double> d_pressure_dev;
+   tbox::Array<double> d_pressure_dev_time_max;
+   tbox::Array<double> d_pressure_dev_time_min;
+   tbox::Array<double> d_pressure_grad_tol;
+   tbox::Array<double> d_pressure_grad_time_max;
+   tbox::Array<double> d_pressure_grad_time_min;
+   tbox::Array<double> d_pressure_shock_onset;
+   tbox::Array<double> d_pressure_shock_tol;
+   tbox::Array<double> d_pressure_shock_time_max;
+   tbox::Array<double> d_pressure_shock_time_min;
+   tbox::Array<double> d_pressure_rich_tol;
+   tbox::Array<double> d_pressure_rich_time_max;
+   tbox::Array<double> d_pressure_rich_time_min;
+
+   /*
+    * Timers.
+    */
+   static tbox::Pointer<tbox::Timer> t_init;
+   static tbox::Pointer<tbox::Timer> t_compute_dt;
+   static tbox::Pointer<tbox::Timer> t_compute_fluxes;
+   static tbox::Pointer<tbox::Timer> t_conservdiff;
+   static tbox::Pointer<tbox::Timer> t_setphysbcs;
+   static tbox::Pointer<tbox::Timer> t_taggradient;
+
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/EulerFort.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/EulerFort.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,390 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   F77 external declarations for SAMRAI Euler gas dynamics ex. 
+ *
+ ************************************************************************/
+
+extern "C" {
+
+void F77_FUNC(eulerinit2d, EULERINIT2D) (
+   const int &, const double *, const double *, const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   const double &,
+   double *, double *, double *,
+   const int &,
+   const double *,
+   const double *, const double *, const double *);
+
+void F77_FUNC(eulerinit3d, EULERINIT3D) (
+   const int &, const double *, const double *, const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   const int &,
+   const double &,
+   double *, double *, double *,
+   const int &,
+   const double *,
+   const double *, const double *, const double *);
+
+void F77_FUNC(eulerinitsphere2d, EULERINITSPHERE2D) (
+   const int &, const double *, const double *, const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   const double &,
+   double *, double *, double *,
+   const double &, const double *, const double &,
+   const double &, const double *, const double &,
+   const double *, const double &);
+
+void F77_FUNC(eulerinitsphere3d, EULERINITSPHERE3D) (
+   const int &, const double *, const double *, const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   const int &,
+   const double &,
+   double *, double *, double *,
+   const double &, const double *, const double &,
+   const double &, const double *, const double &,
+   const double *, const double &);
+
+void F77_FUNC(stabledt2d, STABLEDT2D) (
+   const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   const double &,
+   const double *, const double *, const double *, double &);
+
+void F77_FUNC(stabledt3d, STABLEDT3D) (
+   const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   const int &,
+   const double &,
+   const double *, const double *, const double *, double &);
+
+void F77_FUNC(inittraceflux2d, INITTRACEFLUX2D) (
+   const int &, const int &,
+   const int &, const int &,
+   const double *, const double *, const double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(inittraceflux3d, INITTRACEFLUX3D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double *, const double *, const double *,
+   double *, double *, double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(computesound2d, COMPUTESOUND2D) (
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const double *, const double *, const double *,
+   double *);
+
+void F77_FUNC(computesound3d, COMPUTESOUND3D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const double *, const double *, const double *,
+   double *);
+
+void F77_FUNC(chartracing2d0, CHARTRACING2D0) (
+   const double &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const double &, const double &, const int &,
+   const double *,
+   double *, double *,
+   double *, double *,
+   double *,
+   double *, double *);
+
+void F77_FUNC(chartracing3d0, CHARTRACING3D0) (
+   const double &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const double &, const double &, const int &,
+   const double *,
+   double *, double *,
+   double *, double *,
+   double *,
+   double *, double *);
+
+void F77_FUNC(chartracing2d1, CHARTRACING2D1) (
+   const double &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const double &, const double &, const int &,
+   const double *,
+   double *, double *,
+   double *, double *,
+   double *,
+   double *, double *);
+
+void F77_FUNC(chartracing3d1, CHARTRACING3D1) (
+   const double &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const double &, const double &, const int &,
+   const double *,
+   double *, double *,
+   double *, double *,
+   double *,
+   double *, double *);
+
+void F77_FUNC(chartracing3d2, CHARTRACING3D2) (
+   const double &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const double &, const double &, const int &,
+   const double *,
+   double *, double *,
+   double *, double *,
+   double *,
+   double *, double *);
+
+void F77_FUNC(fluxcalculation2d, FLUXCALCULATION2D) (
+   const double &, const int &,
+   const int &,
+   const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const int &,
+   const double *, const double *, const double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(fluxcalculation3d, FLUXCALCULATION3D) (
+   const double &, const int &,
+   const int &,
+   const int &,
+   const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   const int &,
+   const double *, const double *, const double *,
+   double *, double *, double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(fluxcorrec2d, FLUXCORREC2D) (
+   const double &,
+   const int &, const int &, const int &, const int &, const int &, const int &,
+   const double *, const double &, const int &,
+   const double *,
+   const double *,
+   const double *,
+   const double *, const double *, const double *,
+   const double *, const double *, const double *,
+   const double *, const double *, const double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(fluxcorrec3d, FLUXCORREC3D) (
+   const double &,
+   const int &, const int &, const int &, const int &, const int &, const int &,
+   const double *, const double &,
+   const double *, const double *, const double *,
+   const double *, const double *, const double *,
+   const double *, const double *, const double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(fluxcorrec, FLUXCORREC) (
+   const double &,
+   const int &, const int &, const int &, const int &,
+   const double *, const double &,
+   const double *, const double *, const double *,
+   double *, double *,
+   double *, double *,
+   double *, double *);
+
+void F77_FUNC(consdiff2d, CONSDIFF2D) (
+   const int &, const int &,
+   const int &, const int &,
+   const double *,
+   const double *,
+   const double *,
+   const double &,
+   double *, double *, double *);
+
+void F77_FUNC(consdiff3d, CONSDIFF3D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double &,
+   double *, double *, double *);
+
+void F77_FUNC(onethirdstate, onethirdstate) (
+   const double &, const double *, const int &,
+   const int &, const int &, const int &, const int &, const int &, const int &,
+   const double &,
+   const double *, const double *, const double *,
+   const double *, const double *, const double *,
+   double *);
+
+void F77_FUNC(fluxthird, fluxthird) (
+   const double &, const double *, const int &,
+   const int &, const int &, const int &, const int &, const int &, const int &,
+   const double &,
+   const int &,
+   const double *, const double *, const double *, const double *,
+   double *, double *, double *);
+
+void F77_FUNC(fluxcorrecjt, fluxcorrecjt) (
+   const double &, const double *, const int &,
+   const int &, const int &, const int &, const int &, const int &, const int &,
+   const double &,
+   const double *, const double *, const double *,
+   const double *, const double *, const double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(conservlinint2d, conservlinint2d) (
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *, const double &,
+   const double *, const double *,
+   const double *, const double *,
+   double *, double *,
+   double *,
+   double *, double *, double *, const int &,
+   double *, double *, double *,
+   double *, double *,
+   double *, double *, double *, double *);
+
+void F77_FUNC(conservavg2d, conservavg2d) (
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *, const double &,
+   const double *, const double *,
+   const double *, const double *,
+   double *, double *,
+   double *);
+void F77_FUNC(conservlinint3d, conservlinint3d) (
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *, const double &,
+   const double *, const double *,
+   const double *, const double *,
+   double *, double *,
+   double *,
+   double *, double *, double *, const int &,
+   double *, double *, double *,
+   double *, double *, double *,
+   double *, double *, double *, double *, double *, double *);
+
+void F77_FUNC(conservavg3d, conservavg3d) (
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *, const double &,
+   const double *, const double *,
+   const double *, const double *,
+   double *, double *,
+   double *);
+
+void F77_FUNC(detectgrad2d, detectgrad2d) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double *,
+   const double &,
+   const int &, const int &,
+   const double *,
+   int *, int *);
+
+void F77_FUNC(detectgrad3d, detectgrad3d) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double *,
+   const double &,
+   const int &, const int &,
+   const double *,
+   int *, int *);
+
+void F77_FUNC(detectshock2d, detectshock2d) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double *,
+   const double &, const double &,
+   const int &, const int &,
+   const double *,
+   int *, int *);
+
+void F77_FUNC(detectshock3d, detectshock3d) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double *,
+   const double &, const double &,
+   const int &, const int &,
+   const double *,
+   int *, int *);
+
+void F77_FUNC(stufprobc, stufprobc) (
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &);
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,532 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=Euler.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/HyperbolicLevelIntegrator.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/HyperbolicPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementLevelStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryUtilityStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryDefines.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryUtilities2.h	\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryUtilities3.h	\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h Euler.C Euler.h\
+	EulerFort.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=main.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/HyperbolicLevelIntegrator.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/HyperbolicPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementIntegrator.I		\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementIntegrator.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementLevelStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryUtilityStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BergerRigoutsos.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SiloDatabaseFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h Euler.h main.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,155 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for Euler gas dynamics sample application 
+##
+#########################################################################
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/test/applications/Euler
+VPATH         = @srcdir@
+TESTTOOLS     = ../../testtools
+OBJECT        = ../../../..
+
+default:        check
+
+include $(OBJECT)/config/Makefile.config
+
+AUTOTEST      = $(SAMRAI)/source/test/applications
+CPPFLAGS_EXTRA= -I$(AUTOTEST) -DNDIM=$(PDIM) -DTESTING=1
+FORTRAN       = $(SRCDIR)/fortran/$(PDIM)d
+
+NUM_TESTS = 12
+
+TEST_NPROCS = @TEST_NPROCS@
+
+CXX_OBJS      = main.o Euler.o AutoTester.o
+F_OBJS      = \
+		avgint2d.o flaten1d2d.o flux2d.o grad2d.o init2d.o stable2d.o \
+		stufprobc.o trace2d.o trace1d2d.o \
+		avgint3d.o flaten1d3d.o flux3d.o grad3d.o init3d.o stable3d.o \
+		trace3d.o trace1d3d.o fluxcorner3d.o
+
+main:		$(CXX_OBJS) $(F_OBJS) $(LIBSAMRAIDEPEND)
+		$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) $(F_OBJS)	\
+		$(LIBSAMRAI3D) $(LIBSAMRAI) $(LDLIBS) -o main
+
+check:
+		$(MAKE) check2d
+		$(MAKE) check3d
+
+check2d:	main
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main test_inputs/test.2d.input;
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main test_inputs/test.2d.input test.2d.restart 5;
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main test_inputs/test_sync.2d.input;
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main test_inputs/test_sync.2d.input test_sync.2d.restart 5;
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main test_inputs/test_restart.2d.input;
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main test_inputs/test_restart.2d.input test_restart.2d.restart 5
+
+check3d:	main
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main test_inputs/test.3d.input;
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main test_inputs/test.3d.input test.3d.restart 5;
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main test_inputs/test_sync.3d.input;
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main test_inputs/test_sync.3d.input test_sync.3d.restart 5;
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main test_inputs/test_sync_restart.3d.input;
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main test_inputs/test_sync_restart.3d.input test_sync_restart.3d.restart 5
+
+checkcompile: main
+
+checktest:
+		rm -f makecheck.logfile
+		$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+		$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+		rm -f makecheck.logfile
+
+clean-check:
+		$(SAMCLEAN)
+
+clean:		clean-check
+		$(RM) *.f main
+		$(RM) -rf test.*d.restart test_sync.*d.restart
+
+include $(SRCDIR)/Makefile.depend
+
+FORTRAN       = $(SRCDIR)/fortran
+M4DIRS        = -DFORTDIR=$(FORTRAN) $(SAMRAI_M4_FLAGS)
+
+AutoTester.o:	$(AUTOTEST)/AutoTester.C
+		$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c  $(AUTOTEST)/AutoTester.C \
+		-o $@
+
+avgint2d.o:	$(FORTRAN)/avgint2d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/avgint2d.m4 > avgint2d.f
+		$(F77) $(FFLAGS) -c avgint2d.f -o $@
+
+avgint3d.o:	$(FORTRAN)/avgint3d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/avgint3d.m4 > avgint3d.f
+		$(F77) $(FFLAGS) -c avgint3d.f -o $@
+
+flaten1d2d.o:	$(FORTRAN)/flaten1d2d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/flaten1d2d.m4 > flaten1d2d.f
+		$(F77) $(FFLAGS) -c flaten1d2d.f -o $@
+
+flaten1d3d.o:	$(FORTRAN)/flaten1d3d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/flaten1d3d.m4 > flaten1d3d.f
+		$(F77) $(FFLAGS) -c flaten1d3d.f -o $@
+
+flux2d.o:		$(FORTRAN)/flux2d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/flux2d.m4 > flux2d.f
+		$(F77) $(FFLAGS) -c flux2d.f -o $@
+
+flux3d.o:		$(FORTRAN)/flux3d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/flux3d.m4 > flux3d.f
+		$(F77) $(FFLAGS) -c flux3d.f -o $@
+
+fluxcorner3d.o:	$(FORTRAN)/fluxcorner3d.m4
+		$(M4) -B8096 $(M4DIRS) $(FORTRAN)/fluxcorner3d.m4 > fluxcorner3d.f
+		$(F77) $(FFLAGS) -c fluxcorner3d.f -o $@
+
+grad2d.o:		$(FORTRAN)/grad2d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/grad2d.m4 > grad2d.f
+		$(F77) $(FFLAGS) -c grad2d.f -o $@
+
+grad3d.o:		$(FORTRAN)/grad3d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/grad3d.m4 > grad3d.f
+		$(F77) $(FFLAGS) -c grad3d.f -o $@
+
+init2d.o:		$(FORTRAN)/init2d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/init2d.m4 > init2d.f
+		$(F77) $(FFLAGS) -c init2d.f -o $@
+
+init3d.o:		$(FORTRAN)/init3d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/init3d.m4 > init3d.f
+		$(F77) $(FFLAGS) -c init3d.f -o $@
+
+stable2d.o:	$(FORTRAN)/stable2d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/stable2d.m4 > stable2d.f
+		$(F77) $(FFLAGS) -c stable2d.f -o $@
+
+stable3d.o:	$(FORTRAN)/stable3d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/stable3d.m4 > stable3d.f
+		$(F77) $(FFLAGS) -c stable3d.f -o $@
+
+stufprobc.o:	$(FORTRAN)/stufprobc.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/stufprobc.m4 > stufprobc.f
+		$(F77) $(FFLAGS) -c stufprobc.f -o $@
+
+trace2d.o:	$(FORTRAN)/trace2d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/trace2d.m4 > trace2d.f
+		$(F77) $(FFLAGS) -c trace2d.f -o $@
+
+trace3d.o:	$(FORTRAN)/trace3d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/trace3d.m4 > trace3d.f
+		$(F77) $(FFLAGS) -c trace3d.f -o $@
+
+trace1d2d.o:	$(FORTRAN)/trace1d2d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/trace1d2d.m4 > trace1d2d.f
+		$(F77) $(FFLAGS) -c trace1d2d.f -o $@
+
+trace1d3d.o:	$(FORTRAN)/trace1d3d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/trace1d3d.m4 > trace1d3d.f
+		$(F77) $(FFLAGS) -c trace1d3d.f -o $@
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,98 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   README file for Euler test.
+##
+#########################################################################
+
+This directory contains a Makefile to build an Automatic testing
+version of the Euler application.  It is used in the autotest
+suite of SAMRAI.
+
+The Makefile operates on the Euler code in the applications
+directory.  However, it performs two functions not done in the
+standard Euler application.  First, it builds and links the 
+AutoTester class, located in /SAMRAI/source/test/applications.
+This class reads information from input and performs an
+"evaluate" function to assure the computed information is 
+correct.  Second, it sets to TRUE the TESTING preprocessor
+option so that the autotest part of Euler is included.
+
+The following segment should be added to the input file 
+to satisfy the input requirements for AutoTester:
+
+// Automated testing arguments.
+//    test_iter_num  -- (int) iteration number (i.e. coarse-grid
+//                      timestep) for which to check result [10].
+//    test_fluxes    -- (bool) test Riemann solver.
+//                      If TRUE, it outputs primitive variables to a
+//                      file which can then be verified against some
+//                      known "correct" result.  If FALSE, it will
+//                      simply check timesteps in the
+//                      HyperbolicLevelIntegrator. [FALSE]
+//    correct_result -- (double array) specification of correct result
+//                      for the different test performed.  If the
+//                      computed result does not match the specified
+//                      result, the code will report an error [0].
+//    output_correct -- (bool) output computed result.  Useful for
+//                      setting baseline "correct_result" values for a
+//                      new problem.  That is, set to TRUE and run the
+//                      case. Enter the output values in the
+//                      correct_result array in input, and use the
+//                      input file for automated testing. [FALSE]
+AutoTester {
+   test_iter_num = 10
+   test_fluxes = FALSE
+   correct_result = 2.25, 0.0140625, 0.0140625
+   output_correct = FALSE
+}
+
+A 2D and a 3D test input file are included with Euler:
+   test-2d.input - contains input and "correct" output data for 2D
+                   test of Euler
+   test-3d.input - same, but for 3D test. 
+
+
+RESETTING BASELINES
+
+The tests that are run from this directory include comparisons of the results
+to baseline data that represent expected results.  The tests compare the
+box configuration of the hierarchy, and certain timestep floating point values,
+as specified in the AutoTester input described above.  The baseline boxes
+are stored in HDF data files, and the expected timestep values are listed
+in the AutoTester input.
+
+If a SAMRAI developer makes changes to the library that can legitimately change
+the box configuration of a hierarchy, then the baselines here need to be reset,
+according to the following steps
+
+1. Change the AutoTester input block in each input file to include these
+   two entries:
+
+     write_patch_boxes = TRUE
+     read_patch_boxes = FALSE
+
+2. Comment out all of the lines that read restart files in the
+   Makefile's check2d and check3d rules.
+
+3. make check.  The baseline HDF files will be regenerated here.
+
+4. If you get floating-point-difference errors when the "correct_result"
+   values are compared, do the following
+
+   a. set output_correct = TRUE in the AutoTester input
+
+   b. make check
+
+   c. Find the new values of the three floating-point outputs in the log
+      file, and put them on the line "correct_result = ..."
+      (make sure they don't differ too much).
+
+5. Undo all makefile and input file changes (except for changes to
+   correct_results).
+
+6. make checktest (there should be no more errors).
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/README-test
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/README-test	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,45 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   README file for Euler test.
+##
+#########################################################################
+
+The input files implement three different problems:
+
+1.  testX-1-2d - Sod shock tube
+       Tests Sod shock tube problem in the X direction in 2D.
+       (coupled RP-testX-2d.input with RP-test1.data in the RP_input
+       directory in the applications directory).  50 timesteps  
+
+2.  testY-3-3d - left side, Woodward Colella blast wave
+       Tests Woodward-Colella problem in the Y direction in 3D.
+       (coupled RP-testY-3d.input with RP-test3.data in the RP_input
+       directory in the applications directory).  75 timesteps.
+
+3.  testZ-6-3d - slow moving contact discontinuity 
+       Tests contact discontinuity problem in Z direction in 3D.
+       (coupled RP-testZ-3d.input with RP-test6Z.data in the RP_input
+       directory in the applications directory).  60 timesteps.
+
+An input file, a "correct" solution file, and a plot of the solution
+are included for each of these tests:
+
+    <test name>.input - input file for the test
+    <test name>_<timestep>.correct - data file with the "correct" 
+                        solution at the specified timestep.
+    <test name>_<timestep>.jpg - JPEG image file showing plots of the
+                        solution at the specified step.
+
+To run a test and compare with the correct solution, do the following:
+
+1.  Run the test case with the appropriate input file:
+       main3d-test RP_test/testY-3-3d.input
+
+2.  Compare the *.dat file (written to the RP_test directory) to the
+    correct solution:
+       diff testY-3-3d_0060.dat testY-3-3d_0060.correct 
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/READ_ME
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/READ_ME	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,166 @@
+                     RIEMANN test examples for Euler
+
+This directory contains a set of input files (*.input) for tests of
+the numerical flux calculation routines (using different Riemann solvers)
+in the Euler sample application.  Input files specify 1D "shock-tube"
+problems applied along each coordinate direction in either two or 
+three dimensional cases. Initial conditions (density, velocity, and 
+pressure) are set on either side of the tube at time zero. The code 
+then outputs computed values of density, velocity, pressure, momentum, 
+internal and total energy along a specified "pencil" at the
+end of the calculation:
+
+         __________________
+        |\                 \
+        | \                 \
+        |  \                 \               "Pencil"
+        |   \_________________\         ___________________
+        | |\ |                |        |\__________________\
+    ----->\| |                |---->   \|__________________|
+         \   |                |             rho, p, e
+          \  |                |
+           \ |                |
+            \|________________|
+
+
+A set of MATLAB scripts are included compute and plot the exact Riemann 
+solution, providing a mechanism for the user to compare the computed 
+to the exact solution.
+
+INPUT FILES
+-----------
+
+Different input files specify the pencils of data written:
+
+    RP-testX-2d.input ................. 2D calculation with pencil in "X" dir.
+    RP-testY-2d.input ................. 2D calculation with pencil in "Y" dir.
+    RP-testX-3d.input ................. 3D calculation with pencil in "X" dir.
+    RP-testY-3d.input ................. 3D calculation with pencil in "Y" dir.
+    RP-testZ-3d.input ................. 3D calculation with pencil in "Z" dir.
+
+The input files specify a region [-0.5 , 0.5] on which the Riemann solution is 
+computed by the Euler code.
+
+DATA FILES
+----------
+
+Seven data files specify initial conditions (density, velocity, and pressure) 
+on either side of the interval.  They are invoked by including them in the 
+input files.
+ 
+    RP-test1.data .............. Sod shock tube 
+                                 left:  rho = 1.0,   v = [0,0,0],  p = 1.0
+                                 right: rho = 0.125, v = [0,0,0],  p = 0.1
+    RP-test2[XYZ].data ......... "123 problem" -- 2 rarefactions, stationary 
+                                 contact
+                                 left:  rho = 1.0,   v = [-2,0,0], p = 0.4
+                                 left:  rho = 1.0,   v = [2,0,0],  p = 0.4
+    RP-test3.data .............. left half, Woodward-Colella blast wave
+                                 left:  rho = 1.0,   v = [0,0,0],  p = 1000.
+                                 right: rho = 1.0,   v = [0,0,0],  p = 0.01 
+    RP-test4.data .............. right half, Woodward-Colella blast wave
+                                 left:  rho = 1.0,   v = [0,0,0],  p = 0.01 
+                                 right: rho = 1.0,   v = [0,0,0],  p = 100. 
+    RP-test5[XYZ].data ......... colliding shocks
+                                 left:  rho=5.99924, v=[19.5975,0,0], p=460.894
+                                 right: rho=5.99924, v=[-6.19633,0,0], p=46.0950
+    RP-test6[XYZ].data ......... slow moving contact
+                                 left:  rho = 1.0 ,  v=[-19.5975,0,0], p=1000.  
+                                 left:  rho = 1.0 ,  v=[-19.5975,0,0], p=0.01   
+    RP-test7[XYZ].data ......... contact discontinuity
+                                 left:  rho = 1.0 ,  v = [4,0,0], p = 1.  
+                                 left:  rho = 0.5 ,  v = [4,0,0], p = 1.  
+
+MATLAB validation scripts  
+-------------------------
+
+Matlab scripts compute the exact Riemann solution and provide a way to 
+compare graphically the result of the calculation.
+
+   plotRPdat.m ...... plots numerical solution computed by the Euler code
+
+   plotRPexact.m ..... plots exact analytic solution, given data on either
+                       side of the discontinuity.
+
+Example Use
+-----------
+
+1) Run the code with one of the input files:
+
+      main3d ./RP_input/RP-testY-3d.input
+
+2) go into the visualization dump directory. Data files (*.dat) 
+   that contain primitive and conserved variable values at different 
+   timesteps should have been output here.
+
+      cd RPtest_viz
+
+3) start Matlab
+
+      matlab
+
+4) set path to directory containing Matlab scripts
+
+      >> path(path,'../RP_input')
+
+5) plot numerical solution computed by Euler code.  First enter
+   the script name (plotRPdata) and then enter the
+   prefix of the data file for the last computed timestep.  
+
+      >> plotRPdat
+
+      1d Riemann problem plotting for SAMRAI Euler code...
+
+      Enter data file name without ".dat" extension
+      (type "quit" to stop):  RPtestY_3d_0050
+
+   The "plotRPdat" Matlab script accepts the name of a file containing
+   the numerical solution produced by the Euler code.  Specifying the
+   filename above plots the solution (density, momentum, total energy,
+   velocity, pressure, and internal energy) after 50 timesteps.
+
+   The script will prompt for more entries.  Enter another data file
+   if you choose, or "quit" to stop.
+   
+      Enter data file name without ".dat" extension
+      (type "quit" to stop):  quit
+
+6) plot the analytic solution.  Here, you must enter parameters that
+   correspond to the input file.  These can be determined from the
+   input file as follows:
+      system length  -- difference in "Y" parameters of the x_lo and 
+                        x_up entries in "CartesianGeometry" input section 
+                        of RP-testY-3d.input
+      gamma          -- set in "Euler" input section of RP-testY-3d.input
+      left density   -- interval_0 entry in RP-test1.data
+      left velocity  -- interval_0  "    "     "
+      left pressure  -- interval_0  "    "     "
+      right density  -- interval_1  "    "     "
+      right velocity -- interval_1  "    "     "
+      right pressure -- interval_1  "    "     "
+      output time    -- entries on first line of *.dat file
+                        being plotted.
+
+      >> plotRPexact
+      Riemann solver for ideal gas 
+      Enter system length: 1.0
+      Enter gamma parameter for ideal gas: 1.4
+      Enter [density, velocity, pressure] for
+      Left side:  [1., 0., 1.0]
+      Enter [density, velocity, pressure] for
+      Right side: [0.125, 0., 0.1]
+      Enter output time (type "0" to quit): 0.161861
+
+   The exact Riemann solution will be shown in solid lines on the 
+   plot window.  You may enter a different time if you choose, or 
+   quit.
+     
+        
+      Enter output time (type "0" to quit): 0
+
+
+
+
+
+
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/RP-test1.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/RP-test1.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,26 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+ *                Description:   Input for testing Euler Riemann solvers 
+ *
+ ************************************************************************/
+ ************************************************************************/
+//
+// Test #1: Sod shock tube
+//          NOTE: to get reasonable wave profiles, run for about 50 steps
+//
+      front_position = 0.0
+      interval_0 {
+         density      = 1.0
+         velocity     = 0.0 , 0.0 , 0.0
+         pressure     = 1.0
+      }
+      interval_1 {
+         density      = 0.125
+         velocity     = 0.0 , 0.0 , 0.0
+         pressure     = 0.1
+      }
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/RP-test2X.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/RP-test2X.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input for testing Euler Riemann solvers 
+ *
+ ************************************************************************/
+
+//
+// Test #2X: "123 problem" -- 2 rarefactions and stationary contact
+//          NOTE: to get reasonable wave profiles, run for about 50 steps
+//
+      front_position = 0.0
+      interval_0 {
+         density      = 1.0
+         velocity     = -2.0 , 0.0, 0.0
+         pressure     = 0.4
+      }
+      interval_1 {
+         density      = 1.0
+         velocity     = 2.0 , 0.0 , 0.0
+         pressure     = 0.4
+      }
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/RP-test2Y.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/RP-test2Y.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input for testing Euler Riemann solvers 
+ *
+ ************************************************************************/
+
+//
+// Test #2Y: "123 problem" -- 2 rarefactions and stationary contact
+//          NOTE: to get reasonable wave profiles, run for about 50 steps100
+//
+      front_position = 0.0
+      interval_0 {
+         density      = 1.0
+         velocity     = 0.0, -2.0, 0.0
+         pressure     = 0.4
+      }
+      interval_1 {
+         density      = 1.0
+         velocity     = 0.0 , -2.0 , 0.0
+         pressure     = 0.4
+      }
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/RP-test2Z.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/RP-test2Z.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input for testing Euler Riemann solvers 
+ *
+ ************************************************************************/
+
+//
+// Test #2Z: "123 problem" -- 2 rarefactions and stationary contact
+//          NOTE: to get reasonable wave profiles, run for about 50 steps100
+//
+      front_position = 0.0
+      interval_0 {
+         density      = 1.0
+         velocity     = 0.0, 0.0, -2.0
+         pressure     = 0.4
+      }
+      interval_1 {
+         density      = 1.0
+         velocity     = 0.0, 0.0 , -2.0
+         pressure     = 0.4
+      }
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/RP-test3.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/RP-test3.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input for testing Euler Riemann solvers 
+ *
+ ************************************************************************/
+
+//
+// Test #3: left half of Woodward-Colella blast wave (severe test)
+//          NOTE: to get reasonable wave profiles, run for about 75 steps
+//
+      front_position = 0.0
+      interval_0 {
+         density      = 1.0
+         velocity     = 0.0, 0.0, 0.0
+         pressure     = 1000.0
+      }
+      interval_1 {
+         density      = 1.0
+         velocity     = 0.0 , 0.0 , 0.0
+         pressure     = 0.01
+      }
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/RP-test4.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/RP-test4.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input for testing Euler Riemann solvers 
+ *
+ ************************************************************************/
+
+//
+// Test #4: right half of Woodward-Colella blast wave (severe test)
+//          NOTE: to get reasonable wave profiles, run for about 75 steps
+//
+      front_position = 0.0
+      interval_0 {
+         density      = 1.0
+         velocity     = 0.0, 0.0, 0.0
+         pressure     = 0.01
+      }
+      interval_1 {
+         density      = 1.0
+         velocity     = 0.0 , 0.0 , 0.0
+         pressure     = 100.0
+      }
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/RP-test5X.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/RP-test5X.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input for testing Euler Riemann solvers 
+ *
+ ************************************************************************/
+
+//
+// Test #5X: two shocks colliding 
+//          NOTE: to get reasonable wave profiles, run for about 125 steps
+//
+      front_position = 0.0
+      interval_0 {
+         density      = 5.99924
+         velocity     = 19.5975 , 0.0 , 0.0
+         pressure     = 460.894
+      }
+      interval_1 {
+         density      = 5.99242
+         velocity     = -6.19633 , 0.0 , 0.0
+         pressure     = 46.0950
+      }
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/RP-test5Y.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/RP-test5Y.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input for testing Euler Riemann solvers 
+ *
+ ************************************************************************/
+
+//
+// Test #5Y: two shocks colliding 
+//          NOTE: to get reasonable wave profiles, run for about 125 steps
+//
+      front_position = 0.0
+      interval_0 {
+         density      = 5.99924
+         velocity     = 0.0, 19.5975 , 0.0
+         pressure     = 460.894
+      }
+      interval_1 {
+         density      = 5.99242
+         velocity     = 0.0, -6.19633 , 0.0
+         pressure     = 46.0950
+      }
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/RP-test5Z.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/RP-test5Z.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input for testing Euler Riemann solvers 
+ *
+ ************************************************************************/
+
+//
+// Test #5Z: two shocks colliding 
+//          NOTE: to get reasonable wave profiles, run for about 125 steps
+//
+      front_position = 0.0
+      interval_0 {
+         density      = 5.99924
+         velocity     = 0.0, 0.0, 19.5975
+         pressure     = 460.894
+      }
+      interval_1 {
+         density      = 5.99242
+         velocity     = 0.0, 0.0, -6.19633
+         pressure     = 46.0950
+      }
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/RP-test6X.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/RP-test6X.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input for testing Euler Riemann solvers 
+ *
+ ************************************************************************/
+
+//
+// Test #6X: slow-moving contact test
+//          NOTE: to get reasonable wave profiles, run for about 60 steps
+//
+      front_position = 0.0
+      interval_0 {
+         density      = 1.0
+         velocity     = -19.59745 , 0.0 , 0.0
+         pressure     = 1000.0
+      }
+      interval_1 {
+         density      = 1.0
+         velocity     = -19.59745 , 0.0 , 0.0
+         pressure     = 0.01
+      }
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/RP-test6Y.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/RP-test6Y.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input for testing Euler Riemann solvers 
+ *
+ ************************************************************************/
+
+//
+// Test #6Y: slow-moving contact test
+//          NOTE: to get reasonable wave profiles, run for about 60 steps
+//
+      front_position = 0.0
+      interval_0 {
+         density          = 1.0
+         velocity         = 0.0, -19.59745, 0.0
+         pressure         = 1000.0
+      }
+      interval_1 {
+         density          = 1.0
+         velocity         = 0.0, -19.59745, 0.0
+         pressure         = 0.01
+      }
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/RP-test6Z.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/RP-test6Z.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input for testing Euler Riemann solvers 
+ *
+ ************************************************************************/
+
+//
+// Test #6Z: slow-moving contact test
+//          NOTE: to get reasonable wave profiles, run for about 60 steps
+//
+      front_position = 0.0 
+      interval_0 {
+         density          = 1.0
+         velocity         = 0.0, 0.0 , -19.59745
+         pressure         = 1000.0
+      }
+      interval_1 {
+         density          = 1.0
+         velocity         = 0.0, 0.0 , -19.59745
+         pressure         = 0.01
+      }
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/RP-test7X.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/RP-test7X.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input for testing Euler Riemann solvers 
+ *
+ ************************************************************************/
+
+//
+// Test #7X: another contact discontinuity test
+//          NOTE: to get reasonable wave profiles, run for about 75 steps
+//
+      front_position = 0.0
+      interval_0 {
+         density          = 1.0
+         velocity         = 4.0 , 0.0 , 0.0
+         pressure         = 1.0
+      }
+      interval_1 {
+         density          = 0.5
+         velocity         = 4.0 , 0.0 , 0.0
+         pressure         = 1.0
+      }
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/RP-test7Y.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/RP-test7Y.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input for testing Euler Riemann solvers 
+ *
+ ************************************************************************/
+
+//
+// Test #7Y: another contact discontinuity test
+//          NOTE: to get reasonable wave profile, run for about 75 steps
+//
+      front_position = 0.0
+      interval_0 {
+         density          = 1.0
+         velocity         = 0.0 , 4.0 , 0.0 
+         pressure         = 1.0
+      }
+      interval_1 {
+         density          = 0.5
+         velocity         = 0.0 , 4.0 , 0.0 
+         pressure         = 1.0
+      }
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/RP-test7Z.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/RP-test7Z.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input for testing Euler Riemann solvers 
+ *
+ ************************************************************************/
+
+//
+// Test #7Z: another contact discontinuity test
+//          NOTE: to get reasonable wave profile, run for about 75 steps
+//
+      front_position = 0.0
+      interval_0 {
+         density          = 1.0
+         velocity         = 0.0 , 0.0 , 4.0
+         pressure         = 1.0
+      }
+      interval_1 {
+         density          = 0.5
+         velocity         = 0.0 , 0.0 , 4.0
+         pressure         = 1.0
+      }
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/RP-testX-2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/RP-testX-2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,139 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input for testing Euler Riemann solvers in 2d code (X direction) 
+ *
+ ************************************************************************/
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4        // order of Goduov slopes (1, 2, or 4)
+
+   data_problem           = "PIECEWISE_CONSTANT_X"
+
+   riemann_solve    = "APPROX_RIEM_SOLVE"
+//   riemann_solve    = "EXACT_RIEM_SOLVE"
+//   riemann_solve    = "HLLC_RIEM_SOLVE"
+
+   Initial_data {
+//    Run test 1 for 50 steps
+//#include "RP-test1.data"
+//    Run test 2 for 50 steps
+//#include "RP-test2X.data"
+//    Run test 3 for 75 steps
+//#include "RP-test3.data"
+//    Run test 4 for 75 steps
+  #include "RP-test4.data"
+//    Run test 5 for 125 steps
+//#include "RP-test5X.data"
+//    Run test 6 for 60 steps
+//#include "RP-test6X.data"
+//    Run test 7 for 75 steps
+//#include "RP-test7X.data"
+   }
+
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "FLOW"
+      }
+
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "XFLOW"
+      }
+   }
+
+}
+
+Main {
+   dim = 3
+   base_name = "RP-testX-2d"
+// log file parameters
+   log_all_nodes    = TRUE
+
+// Vizamrai visualization file dump parameters
+   viz_dump_interval        = 5         // zero to turn off
+   viz_dump_dirname         = "RPtest_viz"
+
+// Matlab 1d plot file dump parameters
+   matlab_dump_interval        = 1         // zero to turn off
+   matlab_dump_dirname         = "RPtest_matlab"
+   matlab_dump_filename        = "RPtestX_2d"
+   matlab_pencil_direction  = 0        // 0 <-> x, 1 <-> y, 2 <-> z
+                                       // default is 0
+   matlab_pencil_index      = 2        // default is lower domain index
+                                       // perpendicular to pencil direction
+
+// restart dump parameters
+   restart_interval         = 0         // zero to turn off
+}
+
+TimerManager{
+   maintain_exclusive_time = TRUE
+   maintain_concurrent_time = TRUE
+   timer_list               = ""
+}
+
+CartesianGeometry {
+   domain_boxes = [ (0,0) , (99,4) ]
+   x_lo         = -0.5e0, 0.0e0      // lower end of computational domain.
+   x_up         = 0.5e0 , 0.04e0     // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels               = 1       // Maximum number of levels in hierarchy.
+
+   largest_patch_size {
+      level_0 = 100,100
+   }
+
+   smallest_patch_size {
+      level_0 = 4,4
+   }
+}
+
+GriddingAlgorithm {
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0    // initial simulation time
+   end_time              = 100.e0  // final simulation time
+   grow_dt               = 1.1e0   // growth factor for timesteps
+   max_integrator_steps  = 75      // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/RP-testX-3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/RP-testX-3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,195 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input for testing Euler Riemann solvers in 3d code (X direction) 
+ *
+ ************************************************************************/
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4        // order of Goduov slopes (1, 2, or 4)
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   corner_transport = "CORNER_TRANSPORT_2"
+
+   data_problem     = "PIECEWISE_CONSTANT_X"
+
+   Initial_data {
+//    Run test 1 for 50 steps
+  #include "RP-test1.data"
+//    Run test 2 for 50 steps
+//#include "RP-test2X.data"
+//    Run test 3 for 75 steps
+//#include "RP-test3.data"
+//    Run test 4 for 75 steps
+//#include "RP-test4.data"
+//    Run test 5 for 125 steps
+//#include "RP-test5X.data"
+//    Run test 6 for 60 steps
+//#include "RP-test6X.data"
+//    Run test 7 for 75 steps
+//#include "RP-test7X.data"
+   }
+
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "FLOW"
+      }
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+
+     boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+   }
+}
+
+Main {
+   dim = 3
+   base_name = "RP-testX-3d"
+// log file parameters
+   log_all_nodes    = TRUE
+
+// Vizamrai visualization file dump parameters
+   viz_dump_interval        = 5         // zero to turn off
+   viz_dump_dirname         = "RPtest_viz"
+
+// MATLAB 1d plot file dump parameters
+   matlab_dump_interval        = 0         // zero to turn off
+   matlab_dump_dirname         = "RPtest_matlab"
+   matlab_dump_filename        = "RPtestX_3d"
+   matlab_pencil_direction  = 0        // 0 <-> x, 1 <-> y, 2 <-> z
+                                       // default is 0
+   matlab_pencil_index      = 0, 0     // default is lower domain index
+                                       // perpendicular to pencil direction
+
+// restart dump parameters
+   restart_interval         = 0         // zero to turn off
+}
+
+TimerManager{
+   maintain_exclusive_time = TRUE
+   maintain_concurrent_time = TRUE
+   timer_list               = ""
+}
+
+CartesianGeometry {
+   domain_boxes = [ (0,0,0) , (99,4,4) ]
+   x_lo         = -0.5e0, 0.0e0, 0.0e0   // lower end of computational domain.
+   x_up         = 0.5e0 , 0.04e0, 0.04e0 // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels               = 1       // Maximum number of levels in hierarchy.
+
+   largest_patch_size {
+      level_0 = 100,100,100
+   }
+
+   smallest_patch_size {
+      level_0 = 4,4,4
+   }
+}
+
+GriddingAlgorithm {
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0    // initial simulation time
+   end_time              = 100.e0  // final simulation time
+   grow_dt               = 1.1e0   // growth factor for timesteps
+   max_integrator_steps  = 50      // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/RP-testY-2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/RP-testY-2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,140 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input for testing Euler Riemann solvers in 2d code (Y direction) 
+ *
+ ************************************************************************/
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4        // order of Goduov slopes (1, 2, or 4)
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   data_problem     = "PIECEWISE_CONSTANT_Y"
+
+   Initial_data {
+//    Run test 1 for 50 steps
+  #include "RP-test1.data"
+//    Run test 2 for 50 steps
+//#include "RP-test2Y.data"
+//    Run test 3 for 75 steps
+//#include "RP-test3.data"
+//    Run test 4 for 75 steps
+//#include "RP-test4.data"
+//    Run test 5 for 125 steps
+//#include "RP-test5Y.data"
+//    Run test 6 for 60 steps
+//#include "RP-test6Y.data"
+//    Run test 7 for 75 steps
+//#include "RP-test7Y.data"
+   }
+
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "FLOW"
+      }
+
+      boundary_node_xlo_ylo {
+         boundary_condition      = "YFLOW"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "YFLOW"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "YFLOW"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "YFLOW"
+      }
+   }
+
+
+}
+
+Main {
+   dim = 3
+   base_name = "RP-testY-2d"
+// log file parameters
+   log_all_nodes    = TRUE
+
+// Vizamrai visualization file dump parameters
+   viz_dump_interval        = 5         // zero to turn off
+   viz_dump_dirname         = "RPtest_viz"
+
+// MATLAB 1d plot file dump parameters
+   matlab_dump_interval        = 1         // zero to turn off
+   matlab_dump_dirname         = "RPtest_matlab"
+   matlab_dump_filename        = "RPtestY_2d"
+   matlab_pencil_direction  = 1        // 0 <-> x, 1 <-> y, 2 <-> z
+                                       // default is 0
+   matlab_pencil_index      = 2        // default is lower domain index
+                                       // perpendicular to pencil direction
+
+// restart dump parameters
+   restart_interval         = 0         // zero to turn off
+}
+
+TimerManager{
+   maintain_exclusive_time = TRUE
+   maintain_concurrent_time = TRUE
+   timer_list               = ""
+}
+
+CartesianGeometry {
+   domain_boxes = [ (0,0) , (4,99) ]
+   x_lo         = 0.0e0 , -0.5e0     // lower end of computational domain.
+   x_up         = 0.04e0 , 0.5e0      // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels               = 1       // Maximum number of levels in hierarchy.
+
+   largest_patch_size {
+      level_0 = 100,100
+   }
+
+   smallest_patch_size {
+      level_0 = 4,4
+   }
+}
+
+GriddingAlgorithm {
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0    // initial simulation time
+   end_time              = 100.e0  // final simulation time
+   grow_dt               = 1.1e0   // growth factor for timesteps
+   max_integrator_steps  = 50       // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/RP-testY-3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/RP-testY-3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,197 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input for testing Euler Riemann solvers in 3d code (Y direction) 
+ *
+ ************************************************************************/
+
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4        // order of Goduov slopes (1, 2, or 4)
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   corner_transport = "CORNER_TRANSPORT_2"
+
+   data_problem     = "PIECEWISE_CONSTANT_Y"
+
+   Initial_data {
+//    Run test 1 for 50 steps
+  #include "RP-test1.data"
+//    Run test 2 for 50 steps
+//#include "RP-test2Y.data"
+//    Run test 3 for 75 steps
+//#include "RP-test3.data"
+//    Run test 4 for 75 steps
+//#include "RP-test4.data"
+//    Run test 5 for 125 steps
+//#include "RP-test5Y.data"
+//    Run test 6 for 60 steps
+//#include "RP-test6Y.data"
+//    Run test 7 for 75 steps
+//#include "RP-test7Y.data"
+   }
+
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "FLOW"
+      }
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+
+     boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "YFLOW"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "YFLOW"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "YFLOW"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "YFLOW"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "YFLOW"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "YFLOW"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "YFLOW"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "YFLOW"
+      }
+   }
+
+}
+
+Main {
+   dim = 3
+   base_name = "RP-testY-3d"
+// log file parameters
+   log_all_nodes    = TRUE
+
+// Vizamrai visualization file dump parameters
+   viz_dump_interval        = 5         // zero to turn off
+   viz_dump_dirname         = "RPtest_viz"
+
+// MATLAB 1d plot file dump parameters
+   matlab_dump_interval        = 1         // zero to turn off
+   matlab_dump_dirname         = "RPtest_matlab"
+   matlab_dump_filename        = "RPtestY_3d"
+   matlab_pencil_direction  = 1        // 0 <-> x, 1 <-> y, 2 <-> z
+                                       // default is 0
+   matlab_pencil_index      = 0, 0     // default is lower domain index
+                                       // perpendicular to pencil direction
+
+// restart dump parameters
+   restart_interval         = 0         // zero to turn off
+}
+
+TimerManager{
+   maintain_exclusive_time = TRUE
+   maintain_concurrent_time = TRUE
+   timer_list               = ""
+}
+
+CartesianGeometry {
+   domain_boxes = [ (0,0,0) , (4,99,4) ]
+   x_lo         = 0.0e0 , -0.5e0 , 0.0e0  // lower end of computational domain.
+   x_up         = 0.04e0 , 0.5e0 , 0.04e0 // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels               = 1       // Maximum number of levels in hierarchy.
+
+   largest_patch_size {
+      level_0 = 100,100,100
+   }
+
+   smallest_patch_size {
+      level_0 = 4,4,4
+   }
+}
+
+GriddingAlgorithm {
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0    // initial simulation time
+   end_time              = 100.e0  // final simulation time
+   grow_dt               = 1.1e0   // growth factor for timesteps
+   max_integrator_steps  = 50       // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/RP-testZ-3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/RP-testZ-3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,200 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input for testing Euler Riemann solvers in 3d code (Z direction) 
+ *
+ ************************************************************************/
+
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4        // order of Goduov slopes (1, 2, or 4)
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   corner_transport = "CORNER_TRANSPORT_2"
+
+   data_problem     = "PIECEWISE_CONSTANT_Z"
+
+   Initial_data {
+//    Run test 1 for 50 steps
+  #include "RP-test1.data"
+//    Run test 2 for 50 steps
+//#include "RP-test2Z.data"
+//    Run test 3 for 75 steps
+//#include "RP-test3.data"
+//    Run test 4 for 75 steps
+//#include "RP-test4.data"
+//    Run test 5 for 125 steps
+//#include "RP-test5Z.data"
+//    Run test 6 for 60 steps
+//#include "RP-test6Z.data"
+//    Run test 7 for 75 steps
+//#include "RP-test7Z.data"
+   }
+
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "FLOW"
+      }
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+
+     boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "ZFLOW"
+      }
+   }
+
+}
+
+Main {
+   dim = 3
+   base_name = "RP-testZ-3d"
+// log file parameters
+   log_all_nodes    = TRUE
+
+// Vizamrai visualization file dump parameters
+   viz_dump_interval        = 5         // zero to turn off
+   viz_dump_dirname         = "RPtest_viz"
+
+// MATLAB 1d plot file dump parameters
+   matlab_dump_interval        = 1         // zero to turn off
+   matlab_dump_dirname         = "RPtest_matlab"
+   matlab_dump_filename        = "RPtestZ_3d"
+   matlab_pencil_direction  = 2        // 0 <-> x, 1 <-> y, 2 <-> z
+                                       // default is 0
+   matlab_pencil_index      = 2, 1     // default is lower domain index
+                                       // perpendicular to pencil direction
+
+// restart dump parameters
+   restart_interval         = 0         // zero to turn off
+}
+
+TimerManager{
+   maintain_exclusive_time = TRUE
+   maintain_concurrent_time = TRUE
+   timer_list               = ""
+}
+
+CartesianGeometry {
+   domain_boxes = [ (0,0,0) , (4,4,99) ]
+   x_lo         = 0.0e0 , 0.0e0 , -0.5e0  // lower end of computational domain.
+   x_up         = 0.04e0 , 0.04e0 , 0.5e0 // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels               = 1       // Maximum number of levels in hierarchy.
+
+   largest_patch_size {
+      level_0 = 100,100,100
+   }
+
+   smallest_patch_size {
+      level_0 = 4,4,4
+   }
+}
+
+GriddingAlgorithm {
+}
+
+GriddingAlgorithm {
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0    // initial simulation time
+   end_time              = 100.e0  // final simulation time
+   grow_dt               = 1.1e0   // growth factor for timesteps
+   max_integrator_steps  = 50       // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/plotRPdat.m
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/plotRPdat.m	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,50 @@
+fprintf('\n1d Riemann problem plotting for SAMRAI Euler code...\n\n');
+fprintf('Enter data file name without ".dat" extension\n');
+pname = input('(type "quit" to stop): ', 's');
+while( strcmp(pname,'quit') == 0 )
+   fname = [pname, '.dat'] 
+   load(fname);
+   RPtest = eval(pname);
+   [nx, nv] = size(RPtest);
+   figure(1);
+   hold off
+   subplot(2,3,1)
+   hold on
+   title(['time = ', num2str(RPtest(1,1))])
+   xlabel('x')
+   ylabel('density')
+   plot(RPtest(2:nx,1),RPtest(2:nx,2), '+')
+   subplot(2,3,2)
+   hold on
+   title(['time = ', num2str(RPtest(1,1))])
+   xlabel('x')
+   ylabel('momentum')
+   plot(RPtest(2:nx,1),RPtest(2:nx,3), '+')
+   subplot(2,3,3)
+   hold on
+   title(['time = ', num2str(RPtest(1,1))])
+   xlabel('x')
+   ylabel('total energy')
+   plot(RPtest(2:nx,1),RPtest(2:nx,4), '+')
+   subplot(2,3,4)
+   hold on
+   title(['time = ', num2str(RPtest(1,1))])
+   xlabel('x')
+   ylabel('pressure')
+   plot(RPtest(2:nx,1),RPtest(2:nx,5), '+')
+   subplot(2,3,5)
+   hold on
+   title(['time = ', num2str(RPtest(1,1))])
+   xlabel('x')
+   ylabel('velocity')
+   plot(RPtest(2:nx,1),RPtest(2:nx,6), '+')
+   subplot(2,3,6)
+   hold on
+   title(['time = ', num2str(RPtest(1,1))])
+   xlabel('x')
+   ylabel('internal energy')
+   plot(RPtest(2:nx,1),RPtest(2:nx,7), '+')
+   hold off;
+   fprintf('Enter data file name without ".dat" extension\n');
+   pname = input('(type "quit" to stop): ', 's');
+end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/plotRPexact.m
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/plotRPexact.m	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,95 @@
+% Exact Riemann solver for ideal gases
+% Matlab version of Fortran program from Toro's book
+clear all; 
+%help riemann;
+global gamma g1 g2 g3 g4 g5 g6 g7 g8 g9;
+mPoints = 200;
+fprintf('Riemann solver for ideal gas \n');
+Length = input('Enter system length: ');
+xL = -Length/2;  xR = Length/2;  % Left, right coord. for plot
+gamma = input('Enter gamma parameter for ideal gas: ');
+fprintf('Enter [density, velocity, pressure] for\n');
+junk = input('Left side:  ');
+densityL = junk(1);  uL = junk(2);  pressL = junk(3);
+fprintf('Enter [density, velocity, pressure] for\n');
+junk = input('Right side: ');
+densityR = junk(1);  uR = junk(2);  pressR = junk(3);
+% Compute gamma constants
+g1 = (gamma-1)/(2*gamma);
+g2 = (gamma+1)/(2*gamma);
+g3 = 2*gamma/(gamma-1);
+g4 = 2/(gamma-1);
+g5 = 2/(gamma+1);
+g6 = (gamma-1)/(gamma+1);
+g7 = (gamma-1)/2;
+g8 = 1/gamma;
+g9 = gamma-1;
+% Compute sound speeds
+cL = sqrt(gamma*pressL/densityL);
+cR = sqrt(gamma*pressR/densityR);
+% Exact Riemann solver for pressM and uM is called
+[pressM, uM] = riemann(densityL,uL,pressL,cL,...
+                       densityR,uR,pressR,cR);
+% Plot the solution at t = timeOut	
+densityS = zeros(mPoints,1);
+uS = zeros(mPoints,1);
+densityS = zeros(mPoints,1);
+xS = linspace(xL,xR,mPoints);
+momentumS = zeros(mPoints,1);
+eIntS = zeros(mPoints,1);
+eTotS = zeros(mPoints,1);
+timeOut = input('Enter output time (type "0" to quit): ');
+while( timeOut > 0 )				   
+  for i=1:mPoints
+    S = xS(i)/timeOut;
+    [densityS(i), uS(i), pressS(i)] = sample(pressM, uM, S, ...
+        densityL,uL,pressL,cL,densityR,uR,pressR,cR);
+    momentumS(i) = densityS(i) * uS(i);
+    eIntS(i) = 0.0;
+    if (densityS(i) > 0.0)
+       eIntS(i) = (1.0/(gamma-1.0))*pressS(i)/densityS(i);
+    end
+    eTotS(i) = densityS(i)*(0.5*uS(i)*uS(i) + eIntS(i));
+  end
+  figure(1);
+  hold on
+  subplot(2,3,1)
+  hold on
+  title(sprintf('Time = %g',timeOut));
+  xlabel('x'); ylabel('density')
+  plot(xS,densityS,'k-')
+  grid
+  subplot(2,3,2)
+  hold on 
+  title(sprintf('Time = %g',timeOut));
+  xlabel('x'); ylabel('momentum')
+  plot(xS,momentumS,'k-')
+  grid
+  subplot(2,3,3)
+  hold on
+  title(sprintf('Time = %g',timeOut));
+  xlabel('x'); ylabel('total energy');
+  plot(xS,eTotS,'k-')
+  grid
+  subplot(2,3,4)
+  hold on
+  title(sprintf('Time = %g',timeOut));
+  xlabel('x'); ylabel('pressure');
+  plot(xS,pressS,'k-')
+  grid
+  subplot(2,3,5)
+  hold on
+  title(sprintf('Time = %g',timeOut));
+  xlabel('x'); ylabel('velocity');
+  plot(xS,uS,'k-')
+  grid
+  subplot(2,3,6)
+  hold on
+  title(sprintf('Time = %g',timeOut));
+  xlabel('x'); ylabel('internal energy');
+  plot(xS,eIntS,'k-')
+  grid
+  hold off
+
+  timeOut = input('Enter output time (type "0" to quit): ');
+end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/prefun.m
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/prefun.m	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,19 @@
+function [f, fDeriv] = prefun(press, densityK, pressK, cK)
+%
+% Evaluate pressure function and its derivative
+%
+global gamma g1 g2 g3 g4 g5 g6 g7 g8 g9;
+if( press < pressK )
+  % Rarefaction wave
+  pRat = press/pressK;
+  f = g4*cK*(pRat^g1 - 1);
+  fDeriv = (1/(densityK*cK))*pRat^(-g2);
+else
+  % Shock wave
+  aK = g5/densityK;
+  bK = g6*pressK;
+  qrt = sqrt(aK/(bK+press));
+  f = (press-pressK)*qrt;
+  fDeriv = (1 - 0.5*(press-pressK)/(bK+press))*qrt;
+end
+return
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/riemann.m
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/riemann.m	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,34 @@
+function [press, u] = riemann(densityL,uL,pressL,cL,...
+                                densityR,uR,pressR,cR);
+%
+% Compute pressure and velocity in the *star* region
+%
+global gamma g1 g2 g3 g4 g5 g6 g7 g8 g9;
+tol = 1e-6;
+deltaU = uR - uL;
+% Compute critical velocity
+deltaUCrit = g4*(cL+cR) - deltaU;
+if( deltaUCrit <= 0 ) 
+  error('Vacuum is generated by given data');
+end
+% Compute the initial guess
+press = startE(densityL,uL,pressL,cL,...
+                                densityR,uR,pressR,cR);
+% Perform Newton root finding
+press0 = press;
+nIter = 20;
+for i=1:nIter
+  [fL, fLderiv] = prefun(press, densityL, pressL, cL);
+  [fR, fRderiv] = prefun(press, densityR, pressR, cR);  
+  press = press - (fL+fR+deltaU)/(fLderiv+fRderiv);
+  if( 2*abs((press-press0)/(press+press0)) < tol )
+    break;
+  end
+  if( i == nIter ) 
+    error('Newton root finding failed');
+  end
+  if( press < 0 ) press = tol; end
+  press0 = press;
+end
+u = (uL + uR + (fR-fL))/2;
+return;
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/sample.m
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/sample.m	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,65 @@
+function [density, u, press] = sample(pressM, uM, S, ...
+        densityL,uL,pressL,cL,densityR,uR,pressR,cR);
+%
+% Compute solution according to computed wave patterns
+%
+global gamma g1 g2 g3 g4 g5 g6 g7 g8 g9;
+if( S <= uM )
+  % Sample point is to the left of the contact
+  if( pressM <= pressL ) % Left fan
+    ShL = uL - cL;
+	if( S <= ShL ) % Left data state
+	  density = densityL; u = uL; press = pressL;
+	else
+	  cmL = cL*(pressM/pressL)^g1;
+	  StL = uM - cmL;
+	  if( S > StL ) % Middle left state
+	    density = densityL*(pressM/pressL)^g8;
+		u = uM;  press = pressM;
+	  else % A left state (inside fan)
+	    u = g5*(cL+g7*uL+S);
+		c = g5*(cL+g7*(uL-S));
+		density = densityL*(c/cL)^g4;
+		press = pressL*(c/cL)^g3;
+	  end
+	end
+  else % Left shock
+    pmL = pressM/pressL;
+	SL = uL - cL*sqrt(g2*pmL + g1);
+	if( S <= SL ) % Left data state
+	  density = densityL; u = uL; press = pressL;
+	else % Middle left state (behind shock)
+	  density = densityL*(pmL+g6)/(pmL*g6+1);
+	  u = uM; press = pressM;
+	end
+  end
+else % Right of contact
+  if( pressM > pressR ) % Right shock
+    pMR = pressM/pressR;
+	SR = uR + cR*sqrt(g2*pMR+g1);
+	if( S >= SR ) % Right data state
+	  density = densityR; u = uR; press = pressR;
+	else % Middle right state (behind shock)
+	  density = densityR*(pMR+g6)/(pMR*g6+1);
+	  u = uM; press = pressM;
+	end
+  else % Right fan
+    ShR = uR + cR;
+	if( S >= ShR ) % Right data state
+	  density = densityR; u = uR; press = pressR;
+	else
+	  cMR = cR*(pressM/pressR)^g1;
+	  StR = uM + cMR;
+	  if( S <= StR ) % Middle right state
+	    density = densityR*(pressM/pressR)^g8;
+		u = uM; press = pressM;
+	  else % Fan right state (inside fan)
+	    u = g5*(-cR + g7*uR + S);
+		c = g5*(cR - g7*(uR-S));
+		density = densityR*(c/cR)^g4;
+		press = pressR*(c/cR)^g3;
+	  end
+	end
+  end
+end
+return;
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_input/startE.m
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_input/startE.m	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,28 @@
+function press = startE(densityL,uL,pressL,cL,...
+                                densityR,uR,pressR,cR);
+%
+% Hybrid starter using PVRS, TRRS and TSRS
+%
+global gamma g1 g2 g3 g4 g5 g6 g7 g8 g9;
+tol = 1.e-6;
+qMax = 2.0;
+% Compute guess value from PVRS Riemann solver
+pV = (pressL+pressR)/2 - (uR-uL)*(densityL+densityR)*(cL+cR)/8;
+pMin = min([pressL, pressR]);
+pMax = max([pressL, pressR]);
+qRat = pMax/pMin;
+if( (qRat <= qMax) & (pMin <= pV) & (pV <= pMax) ) 
+  press = max([tol,pV]);  % Use PVRS solution as guess
+else
+  if( pV < pMin ) % Use two-rarefaction solution
+    pNU = cL + cR - g7*(uR-uL);
+	pDE = cL/(pressL^g1) + cR/(pressR^g1);
+	press = (pNU/pDE)^g3;
+  else            % Use two-shock approximation
+    geL = sqrt((g5/densityL)/(g6*pressL+max([tol,pV])));
+	geR = sqrt((g5/densityR)/(g6*pressR+max([tol,pV])));
+	press = (geL*pressL + geR*pressR - (uR-uL))/(geL+geR);
+	press = max([tol,press]);
+  end
+end
+return;
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_test/testX-1-2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_test/testX-1-2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,125 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Sod Shock test for Euler Riemann in 2d (X direction) 
+ *
+ ************************************************************************/
+
+#include "euler_const.input"
+
+//
+// NOTE: See "euler_const.input" for Euler input parameters
+//
+
+SAMRAIManager {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+AutoTester{
+   test_fluxes = TRUE
+   test_iter_num = 50
+}
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4        // order of Goduov slopes (1, 2, or 4)
+
+   data_problem           = PIECEWISE_CONSTANT_X
+
+   flux_method      = APPROX_RIEM_SOLVE
+
+
+   Initial_data {
+// Test #1: Sod shock tube
+//          NOTE: to get reasonable wave profiles, run for about 50 steps
+//
+      front_position = 0.0
+      interval_0 {
+         density      = 1.0
+         velocity     = 0.0 , 0.0 , 0.0
+         pressure     = 1.0
+      }
+      interval_1 {
+         density      = 0.125
+         velocity     = 0.0 , 0.0 , 0.0
+         pressure     = 0.1
+      }
+
+
+   }
+
+   // Use default FLOW boundary conditions...
+
+}
+
+Main {
+   dim = 3
+   base_name = "testX-1-2d"
+// log file parameters
+   log_all_nodes    = TRUE
+
+// visualization dump parameters
+   viz_dump_interval        = 50        // zero to turn off
+
+// 1d MATLAB plot parameters
+   matlab_plot_1d           = TRUE     // default is FALSE
+   matlab_pencil_direction  = 0        // 0 <-> x, 1 <-> y, 2 <-> z
+                                       // default is 0
+   matlab_pencil_index      = 2        // default is lower domain index
+                                       // perpendicular to pencil direction
+
+// restart dump parameters
+   restart_interval         = 25       // zero to turn off
+
+   run_time_plotting = FALSE
+
+}
+
+TimerManager{
+   maintain_exclusive_time = TRUE
+   maintain_concurrent_time = TRUE
+   timer_list               = ""
+}
+
+CartesianGeometry {
+   domain_boxes = [ (0,0) , (99,4) ]
+   x_lo         = -0.5e0, 0.0e0      // lower end of computational domain.
+   x_up         = 0.5e0 , 0.04e0     // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels               = 1       // Maximum number of levels in hierarchy.
+
+   largest_patch_size {
+      level_0 = 100,100
+   }
+
+   smallest_patch_size {
+      level_0 = 4,4
+   }
+}
+
+GriddingAlgorithm {
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0    // initial simulation time
+   end_time              = 100.e0  // final simulation time
+   grow_dt               = 1.1e0   // growth factor for timesteps
+   max_integrator_steps  = 50      // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_test/testX-1-2d_0050.correct
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_test/testX-1-2d_0050.correct	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,101 @@
+1.6186054819e-01  1.6186054819e-01  1.6186054819e-01  1.6186054819e-01  1.6186054819e-01  1.6186054819e-01  1.6186054819e-01  
+-4.9500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e+00 1.0000000000e+00 0.0000000000e+00 2.5000000000e+00 
+-4.8500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e+00 1.0000000000e+00 0.0000000000e+00 2.5000000000e+00 
+-4.7500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e+00 1.0000000000e+00 0.0000000000e+00 2.5000000000e+00 
+-4.6500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e+00 1.0000000000e+00 0.0000000000e+00 2.5000000000e+00 
+-4.5500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e+00 1.0000000000e+00 0.0000000000e+00 2.5000000000e+00 
+-4.4500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e+00 1.0000000000e+00 0.0000000000e+00 2.5000000000e+00 
+-4.3500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e+00 1.0000000000e+00 0.0000000000e+00 2.5000000000e+00 
+-4.2500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e+00 1.0000000000e+00 0.0000000000e+00 2.5000000000e+00 
+-4.1500000000e-01 1.0000000000e+00 8.6736173799e-17 2.5000000000e+00 1.0000000000e+00 8.6736173799e-17 2.5000000000e+00 
+-4.0500000000e-01 1.0000000000e+00 1.7347234760e-16 2.5000000000e+00 1.0000000000e+00 1.7347234760e-16 2.5000000000e+00 
+-3.9500000000e-01 1.0000000000e+00 1.0408340856e-15 2.5000000000e+00 1.0000000000e+00 1.0408340856e-15 2.5000000000e+00 
+-3.8500000000e-01 1.0000000000e+00 1.7347234760e-14 2.5000000000e+00 1.0000000000e+00 1.7347234760e-14 2.5000000000e+00 
+-3.7500000000e-01 1.0000000000e+00 7.0603245472e-14 2.5000000000e+00 1.0000000000e+00 7.0603245472e-14 2.5000000000e+00 
+-3.6500000000e-01 1.0000000000e+00 3.0609195734e-13 2.5000000000e+00 1.0000000000e+00 3.0609195734e-13 2.5000000000e+00 
+-3.5500000000e-01 1.0000000000e+00 4.7293766126e-12 2.5000000000e+00 9.9999999999e-01 4.7293766126e-12 2.5000000000e+00 
+-3.4500000000e-01 9.9999999997e-01 3.6824796684e-11 2.4999999999e+00 9.9999999996e-01 3.6824796685e-11 2.5000000000e+00 
+-3.3500000000e-01 9.9999999991e-01 1.0889076099e-10 2.4999999997e+00 9.9999999987e-01 1.0889076100e-10 2.4999999999e+00 
+-3.2500000000e-01 9.9999999948e-01 6.1427729223e-10 2.4999999982e+00 9.9999999927e-01 6.1427729255e-10 2.4999999995e+00 
+-3.1500000000e-01 9.9999999354e-01 7.6391896281e-09 2.4999999774e+00 9.9999999096e-01 7.6391896774e-09 2.4999999935e+00 
+-3.0500000000e-01 9.9999997753e-01 2.6586234256e-08 2.4999999214e+00 9.9999996854e-01 2.6586234853e-08 2.4999999775e+00 
+-2.9500000000e-01 9.9999995274e-01 5.5918479135e-08 2.4999998346e+00 9.9999993384e-01 5.5918481778e-08 2.4999999527e+00 
+-2.8500000000e-01 9.9999964869e-01 4.1567831902e-07 2.4999987704e+00 9.9999950816e-01 4.1567846506e-07 2.4999996487e+00 
+-2.7500000000e-01 9.9999713510e-01 3.3897893366e-06 2.4999899729e+00 9.9999598914e-01 3.3897990480e-06 2.4999971351e+00 
+-2.6500000000e-01 9.9999255852e-01 8.8048387989e-06 2.4999739549e+00 9.9998958195e-01 8.8049043203e-06 2.4999925585e+00 
+-2.5500000000e-01 9.9998675634e-01 1.5669978071e-05 2.4999536475e+00 9.9998145893e-01 1.5670185601e-05 2.4999867563e+00 
+-2.4500000000e-01 9.9993103613e-01 8.1595194605e-05 2.4997586350e+00 9.9990345266e-01 8.1600822113e-05 2.4999310366e+00 
+-2.3500000000e-01 9.9959289868e-01 4.8156097168e-04 2.4985754115e+00 9.9943011818e-01 4.8175709563e-04 2.4995928830e+00 
+-2.2500000000e-01 9.9906470075e-01 1.1060253905e-03 2.4967277388e+00 9.9869085062e-01 1.1070608237e-03 2.4990644997e+00 
+-2.1500000000e-01 9.9861016315e-01 1.6431959887e-03 2.4951383805e+00 9.9805481142e-01 1.6454829415e-03 2.4986096884e+00 
+-2.0500000000e-01 9.9659302441e-01 4.0224671525e-03 2.4880934901e+00 9.9523414892e-01 4.0362184502e-03 2.4965911976e+00 
+-1.9500000000e-01 9.8617477352e-01 1.6215026668e-02 2.4519066944e+00 9.8070935515e-01 1.6442345822e-02 2.4861449042e+00 
+-1.8500000000e-01 9.6265430816e-01 4.3143042611e-02 2.3713186622e+00 9.4814075866e-01 4.4816755345e-02 2.4623085115e+00 
+-1.7500000000e-01 9.2971172522e-01 7.9544625515e-02 2.2610126955e+00 9.0304393640e-01 8.5558376169e-02 2.4282901675e+00 
+-1.6500000000e-01 8.9251009655e-01 1.1868653129e-01 2.1400567576e+00 8.5286610175e-01 1.3298060352e-01 2.3889536517e+00 
+-1.5500000000e-01 8.5435952408e-01 1.5660146469e-01 2.0200083205e+00 8.0226241512e-01 1.8329691457e-01 2.3475550764e+00 
+-1.4500000000e-01 8.1671862559e-01 1.9171472190e-01 1.9055247375e+00 7.5320935715e-01 2.3473778593e-01 2.3055962407e+00 
+-1.3500000000e-01 7.8012997854e-01 2.2357927359e-01 1.7980000487e+00 7.0638479817e-01 2.8659233685e-01 2.2636766231e+00 
+-1.2500000000e-01 7.4479476300e-01 2.5215542394e-01 1.6976579751e+00 6.6198939712e-01 3.3855692396e-01 2.2220530742e+00 
+-1.1500000000e-01 7.1078232528e-01 2.7754122385e-01 1.6042947836e+00 6.2004344907e-01 3.9047288315e-01 2.1808485770e+00 
+-1.0500000000e-01 6.7810655705e-01 2.9989835949e-01 1.5175520908e+00 5.8049431918e-01 4.4225845683e-01 2.1401294278e+00 
+-9.5000000000e-02 6.4674721758e-01 3.1941023265e-01 1.4369936253e+00 5.4324790683e-01 4.9387183117e-01 2.0999236335e+00 
+-8.5000000000e-02 6.1666613893e-01 3.3626749041e-01 1.3621620164e+00 5.0819153459e-01 5.4529909977e-01 2.0602377142e+00 
+-7.5000000000e-02 5.8781636131e-01 3.5065900393e-01 1.2926071042e+00 4.7520605554e-01 5.9654515766e-01 2.0210651099e+00 
+-6.5000000000e-02 5.6014567907e-01 3.6276412419e-01 1.2278937856e+00 4.4417051971e-01 6.4762460507e-01 1.9823884050e+00 
+-5.5000000000e-02 5.3360113498e-01 3.7275306996e-01 1.1676157554e+00 4.1496813287e-01 6.9856123896e-01 1.9441868920e+00 
+-4.5000000000e-02 5.0813085965e-01 3.8078335643e-01 1.1113966287e+00 3.8748832726e-01 7.4938049756e-01 1.9064396498e+00 
+-3.5000000000e-02 4.8369652339e-01 3.8699900206e-01 1.0589118377e+00 3.6163820869e-01 8.0008638338e-01 1.8691379367e+00 
+-2.5000000000e-02 4.6038879732e-01 3.9151618999e-01 1.0101219409e+00 3.3745943798e-01 8.5040338136e-01 1.8324698599e+00 
+-1.5000000000e-02 4.3914984534e-01 3.9438702948e-01 9.6672143469e-01 3.1585119084e-01 8.9806938034e-01 1.7980832408e+00 
+-5.0000000000e-03 4.2393152372e-01 3.9566605362e-01 9.3622161865e-01 3.0063161290e-01 9.3332538742e-01 1.7728783782e+00 
+5.0000000000e-03 4.2042885186e-01 3.9589938121e-01 9.2923351723e-01 2.9713319565e-01 9.4165607203e-01 1.7668458904e+00 
+1.5000000000e-02 4.2751405631e-01 3.9547556783e-01 9.4327639588e-01 3.0414294084e-01 9.2505863139e-01 1.7785552098e+00 
+2.5000000000e-02 4.2551693977e-01 3.9564481040e-01 9.3924868731e-01 3.0212552223e-01 9.2979802546e-01 1.7750499098e+00 
+3.5000000000e-02 4.2705240295e-01 3.9557486172e-01 9.4225329635e-01 3.0361781978e-01 9.2629115064e-01 1.7774037664e+00 
+4.5000000000e-02 4.2685232117e-01 3.9560937216e-01 9.4183737024e-01 3.0340430535e-01 9.2680618691e-01 1.7769863856e+00 
+5.5000000000e-02 4.2688217390e-01 3.9566814085e-01 9.4181950280e-01 3.0338049957e-01 9.2687904307e-01 1.7767227007e+00 
+6.5000000000e-02 4.2709999279e-01 3.9575983445e-01 9.4208173447e-01 3.0348881685e-01 9.2662102816e-01 1.7764506086e+00 
+7.5000000000e-02 4.2679820943e-01 3.9586683494e-01 9.4133101680e-01 3.0309697633e-01 9.2752693472e-01 1.7754114803e+00 
+8.5000000000e-02 4.2690785660e-01 3.9602749803e-01 9.4127414140e-01 3.0303348283e-01 9.2766504975e-01 1.7745836610e+00 
+9.5000000000e-02 4.2706820616e-01 3.9614853813e-01 9.4138371758e-01 3.0305999724e-01 9.2760016412e-01 1.7740725771e+00 
+1.0500000000e-01 4.2713453802e-01 3.9605518767e-01 9.4165176299e-01 3.0321325587e-01 9.2723756199e-01 1.7746940887e+00 
+1.1500000000e-01 4.2678001947e-01 3.9579256344e-01 9.4139575004e-01 3.0314729382e-01 9.2739243962e-01 1.7757819016e+00 
+1.2500000000e-01 4.2474693727e-01 3.9405752316e-01 9.4028983228e-01 3.0299882814e-01 9.2774659118e-01 1.7834079634e+00 
+1.3500000000e-01 4.1173425908e-01 3.8193916805e-01 9.3477351032e-01 3.0304936522e-01 9.2763514237e-01 1.8400786341e+00 
+1.4500000000e-01 3.6676601763e-01 3.4007256502e-01 9.1571747632e-01 3.0322261492e-01 9.2721939512e-01 2.0668668875e+00 
+1.5500000000e-01 3.0588882458e-01 2.8358291010e-01 8.8961401839e-01 3.0326489146e-01 9.2707836086e-01 2.4785548465e+00 
+1.6500000000e-01 2.7111011564e-01 2.5147137454e-01 8.7435946481e-01 3.0309274005e-01 9.2756175456e-01 2.7949228244e+00 
+1.7500000000e-01 2.6601814522e-01 2.4683865502e-01 8.7193384827e-01 3.0296514413e-01 9.2790157158e-01 2.8472225444e+00 
+1.8500000000e-01 2.6565944608e-01 2.4642166316e-01 8.7192496860e-01 3.0305458980e-01 9.2758479622e-01 2.8519086585e+00 
+1.9500000000e-01 2.6553752891e-01 2.4621006806e-01 8.7205153309e-01 3.0316273741e-01 9.2721382575e-01 2.8542362605e+00 
+2.0500000000e-01 2.6552667069e-01 2.4617299393e-01 8.7206711717e-01 3.0318085373e-01 9.2711211756e-01 2.8545235488e+00 
+2.1500000000e-01 2.6561507909e-01 2.4623946637e-01 8.7214023280e-01 3.0320064689e-01 9.2705379236e-01 2.8537597332e+00 
+2.2500000000e-01 2.6549194170e-01 2.4630479299e-01 8.7174018637e-01 3.0299521398e-01 9.2772982642e-01 2.8531488756e+00 
+2.3500000000e-01 2.6539633323e-01 2.4635564902e-01 8.7154368128e-01 3.0288126729e-01 9.2825566209e-01 2.8531033531e+00 
+2.4500000000e-01 2.6564532715e-01 2.4634410657e-01 8.7242158144e-01 3.0327957831e-01 9.2734214155e-01 2.8541776131e+00 
+2.5500000000e-01 2.6575581596e-01 2.4641846818e-01 8.7283082670e-01 3.0343469562e-01 9.2723640792e-01 2.8544501888e+00 
+2.6500000000e-01 2.6494418424e-01 2.4540108170e-01 8.6957171049e-01 3.0236877642e-01 9.2623690686e-01 2.8531365700e+00 
+2.7500000000e-01 2.5572402688e-01 2.2447822475e-01 8.1658909293e-01 2.8722559502e-01 8.7781436689e-01 2.8079644933e+00 
+2.8500000000e-01 1.9721462224e-01 1.1018233694e-01 5.2700036725e-01 1.9848853711e-01 5.5869253346e-01 2.5161488389e+00 
+2.9500000000e-01 1.3502789790e-01 1.1599980328e-02 2.7996024337e-01 1.1178479106e-01 8.5908027214e-02 2.0696610256e+00 
+3.0500000000e-01 1.2516882057e-01 1.7896507980e-04 2.5047323220e-01 1.0018924170e-01 1.4297896153e-03 2.0010822434e+00 
+3.1500000000e-01 1.2500725066e-01 7.6738973226e-06 2.5002030277e-01 1.0000812101e-01 6.1387617775e-05 2.0000464070e+00 
+3.2500000000e-01 1.2500054015e-01 5.7164545962e-07 2.5000151243e-01 1.0000060497e-01 4.5731439155e-06 2.0000034570e+00 
+3.3500000000e-01 1.2500003987e-01 4.2198197280e-08 2.5000011165e-01 1.0000004466e-01 3.3758547056e-07 2.0000002552e+00 
+3.4500000000e-01 1.2500000327e-01 3.4644426867e-09 2.5000000917e-01 1.0000000367e-01 2.7715540768e-08 2.0000000210e+00 
+3.5500000000e-01 1.2500000028e-01 2.9160052736e-10 2.5000000077e-01 1.0000000031e-01 2.3328042138e-09 2.0000000018e+00 
+3.6500000000e-01 1.2500000003e-01 2.7052324139e-11 2.5000000007e-01 1.0000000003e-01 2.1641859307e-10 2.0000000002e+00 
+3.7500000000e-01 1.2500000000e-01 2.3954796480e-12 2.5000000001e-01 1.0000000000e-01 1.9163837183e-11 2.0000000000e+00 
+3.8500000000e-01 1.2500000000e-01 1.9705916586e-13 2.5000000000e-01 1.0000000000e-01 1.5764733269e-12 2.0000000000e+00 
+3.9500000000e-01 1.2500000000e-01 1.5097515252e-14 2.5000000000e-01 1.0000000000e-01 1.2078012201e-13 2.0000000000e+00 
+4.0500000000e-01 1.2500000000e-01 1.0896231833e-15 2.5000000000e-01 1.0000000000e-01 8.7169854668e-15 2.0000000000e+00 
+4.1500000000e-01 1.2500000000e-01 7.0473141212e-17 2.5000000000e-01 1.0000000000e-01 5.6378512969e-16 2.0000000000e+00 
+4.2500000000e-01 1.2500000000e-01 0.0000000000e+00 2.5000000000e-01 1.0000000000e-01 0.0000000000e+00 2.0000000000e+00 
+4.3500000000e-01 1.2500000000e-01 0.0000000000e+00 2.5000000000e-01 1.0000000000e-01 0.0000000000e+00 2.0000000000e+00 
+4.4500000000e-01 1.2500000000e-01 0.0000000000e+00 2.5000000000e-01 1.0000000000e-01 0.0000000000e+00 2.0000000000e+00 
+4.5500000000e-01 1.2500000000e-01 0.0000000000e+00 2.5000000000e-01 1.0000000000e-01 0.0000000000e+00 2.0000000000e+00 
+4.6500000000e-01 1.2500000000e-01 0.0000000000e+00 2.5000000000e-01 1.0000000000e-01 0.0000000000e+00 2.0000000000e+00 
+4.7500000000e-01 1.2500000000e-01 0.0000000000e+00 2.5000000000e-01 1.0000000000e-01 0.0000000000e+00 2.0000000000e+00 
+4.8500000000e-01 1.2500000000e-01 0.0000000000e+00 2.5000000000e-01 1.0000000000e-01 0.0000000000e+00 2.0000000000e+00 
+4.9500000000e-01 1.2500000000e-01 0.0000000000e+00 2.5000000000e-01 1.0000000000e-01 0.0000000000e+00 2.0000000000e+00 
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_test/testX-1-2d_0050.jpg
Binary file source/test/applications/Euler/RP_test/testX-1-2d_0050.jpg has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_test/testY-3-3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_test/testY-3-3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,126 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input for testing Euler Riemann solvers in 3d code (Y direction) 
+ *
+ ************************************************************************/
+
+#include "euler_const.input"
+
+//
+// NOTE: See "euler_const.input" for Euler input parameters
+//
+
+SAMRAIManager {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+AutoTester {
+   test_fluxes = TRUE
+   test_iter_num = 75
+}
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4        // order of Goduov slopes (1, 2, or 4)
+
+   flux_method      = APPROX_RIEM_SOLVE
+// flux_method      = EXACT_RIEM_SOLVE
+
+   corner_transport = CORNER_TRANSPORT_2
+
+   data_problem     = PIECEWISE_CONSTANT_Y
+
+   Initial_data {
+//
+// Test #3: left half of Woodward-Colella blast wave (severe test)
+//          NOTE: to get reasonable wave profiles, run for about 75 steps
+//
+      front_position = 0.0
+      interval_0 {
+         density      = 1.0
+         velocity     = 0.0, 0.0, 0.0
+         pressure     = 1000.0
+      }
+      interval_1 {
+         density      = 1.0
+         velocity     = 0.0 , 0.0 , 0.0
+         pressure     = 0.01
+      }
+
+   }
+
+   // Use default FLOW boundary conditions...
+
+}
+
+Main {
+   dim = 3
+   base_name = "testY-3-3d"
+// log file parameters
+   log_all_nodes    = TRUE
+
+// visualization dump parameters
+   viz_dump_interval        = 75        // zero to turn off
+
+// 1d MATLAB plot parameters
+   matlab_plot_1d           = TRUE     // default is FALSE
+   matlab_pencil_direction  = 1        // 0 <-> x, 1 <-> y, 2 <-> z
+                                       // default is 0
+   matlab_pencil_index      = 0, 0     // default is lower domain index
+                                       // perpendicular to pencil direction
+
+// restart dump parameters
+   restart_interval         = 25        // zero to turn off
+ 
+   run_time_plotting = FALSE
+}
+
+TimerManager{
+   maintain_exclusive_time = TRUE
+   maintain_concurrent_time = TRUE
+   timer_list               = ""
+}
+
+CartesianGeometry {
+   domain_boxes = [ (0,0,0) , (4,99,4) ]
+   x_lo         = 0.0e0 , -0.5e0 , 0.0e0  // lower end of computational domain.
+   x_up         = 0.04e0 , 0.5e0 , 0.04e0 // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels               = 1       // Maximum number of levels in hierarchy.
+
+   largest_patch_size {
+      level_0 = 100,100,100
+   }
+
+   smallest_patch_size {
+      level_0 = 4,4,4
+   }
+}
+
+GriddingAlgorithm {
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0    // initial simulation time
+   end_time              = 100.e0  // final simulation time
+   grow_dt               = 1.1e0   // growth factor for timesteps
+   max_integrator_steps  = 75       // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_test/testY-3-3d_0075.correct
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_test/testY-3-3d_0075.correct	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,101 @@
+1.0354862078e-02  1.0354862078e-02  1.0354862078e-02  1.0354862078e-02  1.0354862078e-02  1.0354862078e-02  1.0354862078e-02  
+-4.9500000000e-01 9.9999984756e-01 5.7038520906e-06 2.4999994665e+03 9.9999978658e+02 5.7038529601e-06 2.4999998476e+03 
+-4.8500000000e-01 9.9999897824e-01 3.8230567098e-05 2.4999964239e+03 9.9999856954e+02 3.8230606161e-05 2.4999989782e+03 
+-4.7500000000e-01 9.9999726939e-01 1.0216990556e-04 2.4999904429e+03 9.9999617715e+02 1.0217018455e-04 2.4999972694e+03 
+-4.6500000000e-01 9.9999471950e-01 1.9757761062e-04 2.4999815183e+03 9.9999260732e+02 1.9757865394e-04 2.4999947195e+03 
+-4.5500000000e-01 9.9997762470e-01 8.3719429302e-04 2.4999216872e+03 9.9996867476e+02 8.3721302592e-04 2.4999776247e+03 
+-4.4500000000e-01 9.9989141008e-01 4.0627777296e-03 2.4996199536e+03 9.9984797813e+02 4.0632189542e-03 2.4998914083e+03 
+-4.3500000000e-01 9.9974212371e-01 9.6473170945e-03 2.4990975299e+03 9.9963899335e+02 9.6498055505e-03 2.4997421076e+03 
+-4.2500000000e-01 9.9955675807e-01 1.6580479174e-02 2.4984489381e+03 9.9937952023e+02 1.6587831596e-02 2.4995567089e+03 
+-4.1500000000e-01 9.9877017093e-01 4.5979727336e-02 2.4956978824e+03 9.9827872963e+02 4.6036344170e-02 2.4987698839e+03 
+-4.0500000000e-01 9.9543380522e-01 1.7036209510e-01 2.4840496729e+03 9.9361403790e+02 1.7114356998e-01 2.4954297129e+03 
+-3.9500000000e-01 9.8774381733e-01 4.5506799861e-01 2.4573218616e+03 9.8288681334e+02 4.6071460092e-01 2.4877068226e+03 
+-3.8500000000e-01 9.7567595543e-01 8.9651851292e-01 2.4157100884e+03 9.6611927872e+02 9.1886912651e-01 2.4755126775e+03 
+-3.7500000000e-01 9.6046718471e-01 1.4434088155e+00 2.3638449363e+03 9.4510413794e+02 1.5028195012e+00 2.4600115261e+03 
+-3.6500000000e-01 9.4351672934e-01 2.0403429909e+00 2.3067989487e+03 9.2183713630e+02 2.1624873492e+00 2.4425564159e+03 
+-3.5500000000e-01 9.2579965554e-01 2.6498436932e+00 2.2480298146e+03 8.9769503791e+02 2.8622215156e+00 2.4241071828e+03 
+-3.4500000000e-01 9.0783871284e-01 3.2524493706e+00 2.1893460874e+03 8.7340797101e+02 3.5826290778e+00 2.4051848601e+03 
+-3.3500000000e-01 8.8987771421e-01 3.8394136916e+00 2.1315628064e+03 8.4931206116e+02 4.3145407850e+00 2.3860358777e+03 
+-3.2500000000e-01 8.7202608808e-01 4.4070542270e+00 2.0750229968e+03 8.2555471573e+02 5.0538100720e+00 2.3667718403e+03 
+-3.1500000000e-01 8.5433444033e-01 4.9538619455e+00 2.0198657353e+03 8.0220129614e+02 5.7985043230e+00 2.3474451522e+03 
+-3.0500000000e-01 8.3682630271e-01 5.4793029032e+00 1.9661378159e+03 7.7927973996e+02 6.5477183084e+00 2.3280809215e+03 
+-2.9500000000e-01 8.1951159043e-01 5.9833335036e+00 1.9138403511e+03 7.5679916093e+02 7.3010968648e+00 2.3086896200e+03 
+-2.8500000000e-01 8.0239278384e-01 6.4661471882e+00 1.8629511960e+03 7.3475888433e+02 8.0585809325e+00 2.2892743402e+03 
+-2.7500000000e-01 7.8546937259e-01 6.9280291676e+00 1.8134390267e+03 7.1315423330e+02 8.8202410042e+00 2.2698346307e+03 
+-2.6500000000e-01 7.6874042972e-01 7.3692712008e+00 1.7652714656e+03 6.9197997900e+02 9.5861631780e+00 2.2503694103e+03 
+-2.5500000000e-01 7.5220615480e-01 7.7901389037e+00 1.7184198156e+03 6.7123238581e+02 1.0356388144e+01 2.2308790666e+03 
+-2.4500000000e-01 7.3586863010e-01 8.1908612837e+00 1.6728607498e+03 6.5091001030e+02 1.1130874383e+01 2.2113662129e+03 
+-2.3500000000e-01 7.1973186921e-01 8.5716290330e+00 1.6285760025e+03 6.3101367990e+02 1.1909475458e+01 2.1918359701e+03 
+-2.2500000000e-01 7.0380162129e-01 8.9326066773e+00 1.5855514490e+03 6.1154616122e+02 1.2691938193e+01 2.1722959379e+03 
+-2.1500000000e-01 6.8808491623e-01 9.2739547810e+00 1.5437755415e+03 5.9251148889e+02 1.3477921928e+01 2.1527556953e+03 
+-2.0500000000e-01 6.7258880577e-01 9.5958676248e+00 1.5032359568e+03 5.7391341096e+02 1.4267064130e+01 2.1332254047e+03 
+-1.9500000000e-01 6.5731625535e-01 9.8986502007e+00 1.4639091581e+03 5.5575053295e+02 1.5059189728e+01 2.1137105938e+03 
+-1.8500000000e-01 6.4225686027e-01 1.0182865758e+01 1.4257378096e+03 5.3800562678e+02 1.5854818201e+01 2.0941996110e+03 
+-1.7500000000e-01 6.2737048061e-01 1.0449555890e+01 1.3885928678e+03 5.2062734281e+02 1.6656116621e+01 2.0746407382e+03 
+-1.6500000000e-01 6.1257827579e-01 1.0700247577e+01 1.3522573002e+03 5.0352147750e+02 1.7467559657e+01 2.0549270901e+03 
+-1.5500000000e-01 5.9784120071e-01 1.0935541663e+01 1.3166220293e+03 4.8664284649e+02 1.8291716346e+01 2.0350004563e+03 
+-1.4500000000e-01 5.8348997286e-01 1.1150556224e+01 1.2824556684e+03 4.7036460129e+02 1.9110107702e+01 2.0153071311e+03 
+-1.3500000000e-01 5.7093290086e-01 1.1326917258e+01 1.2530007273e+03 4.5625663666e+02 1.9839314288e+01 1.9978557724e+03 
+-1.2500000000e-01 5.6289619214e-01 1.1434507059e+01 1.2343241370e+03 4.4727421469e+02 2.0313704762e+01 1.9864862337e+03 
+-1.1500000000e-01 5.6058465991e-01 1.1462069519e+01 1.2291410442e+03 4.4478426898e+02 2.0446634271e+01 1.9835731371e+03 
+-1.0500000000e-01 5.6078167038e-01 1.1462552070e+01 1.2294040948e+03 4.4490201074e+02 2.0440311578e+01 1.9834011802e+03 
+-9.5000000000e-02 5.6402828094e-01 1.1421323467e+01 1.2368353133e+03 4.4847877462e+02 2.0249558139e+01 1.9878381536e+03 
+-8.5000000000e-02 5.6636350126e-01 1.1388082937e+01 1.2423949467e+03 4.5116108935e+02 2.0107374348e+01 1.9914820091e+03 
+-7.5000000000e-02 5.6653840731e-01 1.1385447410e+01 1.2428236196e+03 4.5136788568e+02 2.0096514664e+01 1.9917797269e+03 
+-6.5000000000e-02 5.6533686006e-01 1.1401536817e+01 1.2400295903e+03 4.5002331107e+02 2.0167686953e+01 1.9900670859e+03 
+-5.5000000000e-02 5.6449532335e-01 1.1415206220e+01 1.2379147230e+03 4.4899830281e+02 2.0221967743e+01 1.9884943428e+03 
+-4.5000000000e-02 5.6451852995e-01 1.1412745026e+01 1.2381023233e+03 4.4909514593e+02 2.0216776635e+01 1.9888414733e+03 
+-3.5000000000e-02 5.6679479577e-01 1.1382118955e+01 1.2434083207e+03 4.5164920638e+02 2.0081551629e+01 1.9921195896e+03 
+-2.5000000000e-02 5.6952371573e-01 1.1344340425e+01 1.2498275132e+03 4.5473743174e+02 1.9918995665e+01 1.9961303594e+03 
+-1.5000000000e-02 5.7066823436e-01 1.1337707595e+01 1.2519251320e+03 4.5571984471e+02 1.9867423684e+01 1.9964307512e+03 
+-5.0000000000e-03 5.7064495620e-01 1.1331762615e+01 1.2522701192e+03 4.5590323601e+02 1.9857816128e+01 1.9973156297e+03 
+5.0000000000e-03 5.7061730191e-01 1.1328179001e+01 1.2524578071e+03 4.5600459204e+02 1.9852498274e+01 1.9978564903e+03 
+1.5000000000e-02 5.7071755029e-01 1.1325270847e+01 1.2527902775e+03 4.5616856744e+02 1.9843915508e+01 1.9982238465e+03 
+2.5000000000e-02 5.7114788405e-01 1.1326225332e+01 1.2533632241e+03 4.5642404110e+02 1.9830635196e+01 1.9978365229e+03 
+3.5000000000e-02 5.7164268563e-01 1.1325634050e+01 1.2541241973e+03 4.5677199926e+02 1.9812435871e+01 1.9976289855e+03 
+4.5000000000e-02 5.7192138831e-01 1.1319226186e+01 1.2549327989e+03 4.5716805225e+02 1.9791576985e+01 1.9983867608e+03 
+5.5000000000e-02 5.7202433456e-01 1.1310062547e+01 1.2556623297e+03 4.5754043079e+02 1.9771995463e+01 1.9996545739e+03 
+6.5000000000e-02 5.7212614209e-01 1.1303360585e+01 1.2562411099e+03 4.5783288076e+02 1.9756762982e+01 2.0005766521e+03 
+7.5000000000e-02 5.7251910132e-01 1.1304340773e+01 1.2567578693e+03 4.5806249906e+02 1.9744914619e+01 2.0002061853e+03 
+8.5000000000e-02 5.7304250746e-01 1.1308050697e+01 1.2572859889e+03 4.5828524190e+02 1.9733354070e+01 1.9993509903e+03 
+9.5000000000e-02 5.7318814186e-01 1.1304661314e+01 1.2577137649e+03 4.5849443436e+02 1.9722427051e+01 1.9997554070e+03 
+1.0500000000e-01 5.7315548087e-01 1.1298885022e+01 1.2580359213e+03 4.5866631584e+02 1.9713472870e+01 2.0006190778e+03 
+1.1500000000e-01 5.7317950506e-01 1.1293716559e+01 1.2584043941e+03 4.5885631645e+02 1.9703629420e+01 2.0013639375e+03 
+1.2500000000e-01 5.7334340393e-01 1.1290246270e+01 1.2588681397e+03 4.5908187615e+02 1.9691944117e+01 2.0017753453e+03 
+1.3500000000e-01 5.7362771543e-01 1.1290842890e+01 1.2592410830e+03 4.5924839494e+02 1.9683224130e+01 2.0015089168e+03 
+1.4500000000e-01 5.7531441352e-01 1.1320608529e+01 1.2597766701e+03 4.5935896745e+02 1.9677255190e+01 1.9961214105e+03 
+1.5500000000e-01 5.8242446941e-01 1.1455298090e+01 1.2614756830e+03 4.5952902964e+02 1.9668298108e+01 1.9724833595e+03 
+1.6500000000e-01 5.9467890190e-01 1.1691063206e+01 1.2641784740e+03 4.5970340302e+02 1.9659455159e+01 1.9325698354e+03 
+1.7500000000e-01 6.2854427191e-01 1.2355152369e+01 1.2708379490e+03 4.5976269332e+02 1.9656773470e+01 1.8286806271e+03 
+1.8500000000e-01 8.2075520049e-01 1.6131222655e+01 1.3080860980e+03 4.5982543633e+02 1.9654121771e+01 1.4006168832e+03 
+1.9500000000e-01 1.6033374997e+00 3.1499137710e+01 1.4596089336e+03 4.6007728262e+02 1.9645980784e+01 7.1737435615e+02 
+2.0500000000e-01 3.0385093638e+00 5.9698850847e+01 1.7371458299e+03 4.6027272660e+02 1.9647413814e+01 3.7869944724e+02 
+2.1500000000e-01 4.4817447884e+00 8.8040845438e+01 2.0167012380e+03 4.6077992159e+02 1.9644323716e+01 2.5703154873e+02 
+2.2500000000e-01 5.1490885984e+00 1.0108432094e+02 2.1425383245e+03 4.6012800714e+02 1.9631497693e+01 2.2340264609e+02 
+2.3500000000e-01 5.2195187924e+00 1.0033114880e+02 2.0584913543e+03 4.3767748143e+02 1.9222298604e+01 2.0963497730e+02 
+2.4500000000e-01 4.5195423521e+00 7.7163873405e+01 1.4729647556e+03 3.2569624356e+02 1.7073382080e+01 1.8015996875e+02 
+2.5500000000e-01 2.4086138430e+00 2.3832384254e+01 3.8580972754e+02 1.0716128412e+02 9.8946472151e+00 1.1122713218e+02 
+2.6500000000e-01 1.1244479978e+00 9.5250645159e-01 7.8386493881e+00 2.9740883904e+00 8.4708804093e-01 6.6123297748e+00 
+2.7500000000e-01 1.0003997961e+00 8.4347242862e-05 2.5026257789e-02 1.0010501693e-02 8.4313534637e-05 2.5016252831e-02 
+2.8500000000e-01 1.0000000750e+00 8.8749543623e-09 2.5000002625e-02 1.0000001050e-02 8.8749536966e-09 2.5000000750e-02 
+2.9500000000e-01 1.0000000000e+00 2.1288887757e-13 2.5000000000e-02 1.0000000000e-02 2.1288887757e-13 2.5000000000e-02 
+3.0500000000e-01 1.0000000000e+00 1.2070219498e-18 2.5000000000e-02 1.0000000000e-02 1.2070219498e-18 2.5000000000e-02 
+3.1500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e-02 1.0000000000e-02 0.0000000000e+00 2.5000000000e-02 
+3.2500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e-02 1.0000000000e-02 0.0000000000e+00 2.5000000000e-02 
+3.3500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e-02 1.0000000000e-02 0.0000000000e+00 2.5000000000e-02 
+3.4500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e-02 1.0000000000e-02 0.0000000000e+00 2.5000000000e-02 
+3.5500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e-02 1.0000000000e-02 0.0000000000e+00 2.5000000000e-02 
+3.6500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e-02 1.0000000000e-02 0.0000000000e+00 2.5000000000e-02 
+3.7500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e-02 1.0000000000e-02 0.0000000000e+00 2.5000000000e-02 
+3.8500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e-02 1.0000000000e-02 0.0000000000e+00 2.5000000000e-02 
+3.9500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e-02 1.0000000000e-02 0.0000000000e+00 2.5000000000e-02 
+4.0500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e-02 1.0000000000e-02 0.0000000000e+00 2.5000000000e-02 
+4.1500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e-02 1.0000000000e-02 0.0000000000e+00 2.5000000000e-02 
+4.2500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e-02 1.0000000000e-02 0.0000000000e+00 2.5000000000e-02 
+4.3500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e-02 1.0000000000e-02 0.0000000000e+00 2.5000000000e-02 
+4.4500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e-02 1.0000000000e-02 0.0000000000e+00 2.5000000000e-02 
+4.5500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e-02 1.0000000000e-02 0.0000000000e+00 2.5000000000e-02 
+4.6500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e-02 1.0000000000e-02 0.0000000000e+00 2.5000000000e-02 
+4.7500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e-02 1.0000000000e-02 0.0000000000e+00 2.5000000000e-02 
+4.8500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e-02 1.0000000000e-02 0.0000000000e+00 2.5000000000e-02 
+4.9500000000e-01 1.0000000000e+00 0.0000000000e+00 2.5000000000e-02 1.0000000000e-02 0.0000000000e+00 2.5000000000e-02 
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_test/testY-3-3d_0075.jpg
Binary file source/test/applications/Euler/RP_test/testY-3-3d_0075.jpg has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_test/testZ-6-3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_test/testZ-6-3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input for testing Euler Riemann solvers in 3d code (Z direction) 
+ *
+ ************************************************************************/
+
+#include "euler_const.input"
+
+//
+// NOTE: See "euler_const.input" for Euler input parameters
+//
+
+SAMRAIManager {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+AutoTester {
+   test_fluxes = TRUE
+   test_iter_num = 60
+}
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4        // order of Goduov slopes (1, 2, or 4)
+
+   flux_method      = APPROX_RIEM_SOLVE
+// flux_method      = EXACT_RIEM_SOLVE
+
+   corner_transport = CORNER_TRANSPORT_2
+
+   data_problem     = PIECEWISE_CONSTANT_Z
+
+   Initial_data {
+// Test #6Z: slow-moving contact test
+//          NOTE: to get reasonable wave profiles, run for about 60 steps
+//
+      front_position = 0.0
+      interval_0 {
+         density          = 1.0
+         velocity         = 0.0, 0.0 , -19.59745
+         pressure         = 1000.0
+      }
+      interval_1 {
+         density          = 1.0
+         velocity         = 0.0, 0.0 , -19.59745
+         pressure         = 0.01
+      }
+   }
+
+   // Use default FLOW boundary conditions...
+
+}
+
+Main {
+   dim = 3
+   base_name = "testZ-6-3d"
+// log file parameters
+   log_all_nodes    = TRUE
+
+// visualization dump parameters
+   viz_dump_interval        = 60        // zero to turn off
+
+// 1d MATLAB plot parameters
+   matlab_plot_1d           = TRUE     // default is FALSE
+   matlab_pencil_direction  = 2        // 0 <-> x, 1 <-> y, 2 <-> z
+                                       // default is 0
+   matlab_pencil_index      = 2, 1     // default is lower domain index
+                                       // perpendicular to pencil direction
+
+// restart dump parameters
+   restart_interval         = 25        // zero to turn off
+
+   run_time_plotting = FALSE
+}
+
+TimerManager{
+   maintain_exclusive_time = TRUE
+   maintain_concurrent_time = TRUE
+   timer_list               = ""
+}
+
+CartesianGeometry {
+   domain_boxes = [ (0,0,0) , (4,4,99) ]
+   x_lo         = 0.0e0 , 0.0e0 , -0.5e0  // lower end of computational domain.
+   x_up         = 0.04e0 , 0.04e0 , 0.5e0 // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels               = 1       // Maximum number of levels in hierarchy.
+
+   largest_patch_size {
+      level_0 = 100,100,100
+   }
+
+   smallest_patch_size {
+      level_0 = 4,4,4
+   }
+}
+
+GriddingAlgorithm {
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0    // initial simulation time
+   end_time              = 100.e0  // final simulation time
+   grow_dt               = 1.1e0   // growth factor for timesteps
+   max_integrator_steps  = 60       // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_test/testZ-6-3d_0060.correct
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/RP_test/testZ-6-3d_0060.correct	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,101 @@
+7.2350151583e-03  7.2350151583e-03  7.2350151583e-03  7.2350151583e-03  7.2350151583e-03  7.2350151583e-03  7.2350151583e-03  
+-4.9500000000e-01 9.9999891367e-01 -1.9597388064e+01 2.6920252159e+03 9.9999847914e+02 -1.9597409353e+01 2.4999989137e+03 
+-4.8500000000e-01 9.9999684544e-01 -1.9597270147e+01 2.6920160634e+03 9.9999558364e+02 -1.9597331967e+01 2.4999968455e+03 
+-4.7500000000e-01 9.9998306926e-01 -1.9596484716e+01 2.6919551003e+03 9.9997629708e+02 -1.9596816505e+01 2.4999830693e+03 
+-4.6500000000e-01 9.9989413571e-01 -1.9591414449e+01 2.6915615564e+03 9.9985179102e+02 -1.9593488700e+01 2.4998941271e+03 
+-4.5500000000e-01 9.9965251888e-01 -1.9577642323e+01 2.6904926453e+03 9.9951359630e+02 -1.9584447548e+01 2.4996525728e+03 
+-4.4500000000e-01 9.9909347275e-01 -1.9545783868e+01 2.6880200378e+03 9.9873115337e+02 -1.9563518731e+01 2.4990933797e+03 
+-4.3500000000e-01 9.9663040890e-01 -1.9405602655e+01 2.6771406577e+03 9.9528613979e+02 -1.9471212680e+01 2.4966279649e+03 
+-4.2500000000e-01 9.8878949893e-01 -1.8961169906e+01 2.6426557533e+03 9.8434187609e+02 -1.9176144089e+01 2.4887548795e+03 
+-4.1500000000e-01 9.7420672994e-01 -1.8142139333e+01 2.5791310564e+03 9.6408211956e+02 -1.8622473829e+01 2.4740183216e+03 
+-4.0500000000e-01 9.5442125977e-01 -1.7046438908e+01 2.4941985930e+03 9.3678785994e+02 -1.7860497902e+01 2.4538112766e+03 
+-3.9500000000e-01 9.3165117189e-01 -1.5807989460e+01 2.3982467986e+03 9.0565363459e+02 -1.6967712742e+01 2.4302380062e+03 
+-3.8500000000e-01 9.0747176369e-01 -1.4519831379e+01 2.2984671853e+03 8.7292250759e+02 -1.6000312032e+01 2.4048200245e+03 
+-3.7500000000e-01 8.8275022504e-01 -1.3232100569e+01 2.1987101971e+03 8.3981521656e+02 -1.4989631487e+01 2.3784055578e+03 
+-3.6500000000e-01 8.5793136174e-01 -1.1969776033e+01 2.1008701225e+03 8.0694781568e+02 -1.3951904042e+01 2.3514346592e+03 
+-3.5500000000e-01 8.3325673844e-01 -1.0745763576e+01 2.0059037931e+03 7.7464582544e+02 -1.2896101621e+01 2.3241510981e+03 
+-3.4500000000e-01 8.0887548001e-01 -9.5673618458e+00 1.9143343487e+03 7.4310122931e+02 -1.1827978573e+01 2.2967108278e+03 
+-3.3500000000e-01 7.8489158226e-01 -8.4390093769e+00 1.8264655076e+03 7.1243926890e+02 -1.0751815369e+01 2.2692282762e+03 
+-3.2500000000e-01 7.6138414024e-01 -7.3634772403e+00 1.7424753524e+03 6.8274744948e+02 -9.6711723441e+00 2.2417969242e+03 
+-3.1500000000e-01 7.3841827383e-01 -6.3425063566e+00 1.6624669008e+03 6.5409120470e+02 -8.5893139178e+00 2.2145010080e+03 
+-3.0500000000e-01 7.1605471089e-01 -5.3773006673e+00 1.5865072256e+03 6.2652659046e+02 -7.5096226385e+00 2.1874256985e+03 
+-2.9500000000e-01 6.9436499879e-01 -4.4691834266e+00 1.5146800460e+03 6.0011896329e+02 -6.4363604651e+00 2.1606754529e+03 
+-2.8500000000e-01 6.7345850783e-01 -3.6206073675e+00 1.4471691804e+03 5.7497469359e+02 -5.3761402155e+00 2.1344102380e+03 
+-2.7500000000e-01 6.5351109887e-01 -2.8360320733e+00 1.3843351911e+03 5.5127257947e+02 -4.3396846330e+00 2.1088875936e+03 
+-2.6500000000e-01 6.3475596719e-01 -2.1212184602e+00 1.3266667694e+03 5.2924897621e+02 -3.3417857726e+00 2.0844584516e+03 
+-2.5500000000e-01 6.1742951720e-01 -1.4810198179e+00 1.2746075551e+03 5.0913252160e+02 -2.3986864519e+00 2.0615005738e+03 
+-2.4500000000e-01 6.0181242793e-01 -9.2094168457e-01 1.2286857193e+03 4.9119242793e+02 -1.5302802698e+00 2.0404714373e+03 
+-2.3500000000e-01 5.8856734577e-01 -4.5874285295e-01 1.1904810634e+03 4.7612091444e+02 -7.7942287530e-01 2.0223722819e+03 
+-2.2500000000e-01 5.7914873266e-01 -1.3728943231e-01 1.1637253999e+03 4.6548365095e+02 -2.3705384224e-01 2.0093441662e+03 
+-2.1500000000e-01 5.7501523356e-01 1.8075917377e-03 1.1520896816e+03 4.6083587151e+02 3.1435545220e-03 2.0035811428e+03 
+-2.0500000000e-01 5.7430260268e-01 2.5748506799e-02 1.1500883111e+03 4.6003509357e+02 4.4834389882e-02 2.0025814415e+03 
+-1.9500000000e-01 5.7422630758e-01 2.8277242522e-02 1.1498728868e+03 4.5994887620e+02 4.9244073544e-02 2.0024721531e+03 
+-1.8500000000e-01 5.7416890294e-01 3.0200437030e-02 1.1497125925e+03 4.5988471929e+02 5.2598524364e-02 2.0023930107e+03 
+-1.7500000000e-01 5.7382663517e-01 4.1639606060e-02 1.1487556187e+03 4.5950164317e+02 7.2564784394e-02 2.0019184149e+03 
+-1.6500000000e-01 5.7256118897e-01 8.3871838400e-02 1.1452163181e+03 4.5808407004e+02 1.4648537137e-01 2.0001533411e+03 
+-1.5500000000e-01 5.7104118710e-01 1.3445308839e-01 1.1409718376e+03 4.5638240356e+02 2.3545252326e-01 1.9980275236e+03 
+-1.4500000000e-01 5.7057695582e-01 1.4986346405e-01 1.1396751852e+03 4.5586220169e+02 2.6265250027e-01 1.9973738732e+03 
+-1.3500000000e-01 5.7058405935e-01 1.4976783763e-01 1.1396843852e+03 4.5586589182e+02 2.6248163645e-01 1.9973651750e+03 
+-1.2500000000e-01 5.7102927761e-01 1.3523128582e-01 1.1409057807e+03 4.5635590718e+02 2.3682023168e-01 1.9979531921e+03 
+-1.1500000000e-01 5.7273737329e-01 7.8571983865e-02 1.1456614582e+03 4.5826242747e+02 1.3718675876e-01 2.0003165886e+03 
+-1.0500000000e-01 5.7486256030e-01 7.0593202603e-03 1.1516558558e+03 4.6066232499e+02 1.2280013951e-02 2.0033585278e+03 
+-9.5000000000e-02 5.7581840238e-01 -2.7269140354e-02 1.1545289011e+03 4.6181130215e+02 -4.7357188032e-02 2.0050214627e+03 
+-8.5000000000e-02 5.7577957829e-01 -3.0437575639e-02 1.1547963479e+03 4.6191821737e+02 -5.2863242786e-02 2.0056208781e+03 
+-7.5000000000e-02 5.7555285600e-01 -2.5597408349e-02 1.1543925442e+03 4.6175679001e+02 -4.4474470211e-02 2.0057097502e+03 
+-6.5000000000e-02 5.7503030314e-01 4.8161365192e-03 1.1518497305e+03 4.6073988415e+02 8.3754482032e-03 2.0031113214e+03 
+-5.5000000000e-02 5.7528651783e-01 4.5690074342e-02 1.1484287345e+03 4.5937076803e+02 7.9421423804e-02 1.9962694839e+03 
+-4.5000000000e-02 5.7705766704e-01 6.4777632433e-02 1.1468415481e+03 4.5873516493e+02 1.1225504162e-01 1.9873887443e+03 
+-3.5000000000e-02 5.7638011215e-01 6.5989083428e-02 1.1467180967e+03 4.5868572769e+02 1.1448882783e-01 1.9895105592e+03 
+-2.5000000000e-02 5.6459253179e-01 5.7824692644e-02 1.1472963116e+03 4.5891734017e+02 1.0241845116e-01 2.0320731959e+03 
+-1.5000000000e-02 5.4431422258e-01 3.6246156389e-02 1.1490497384e+03 4.5961941263e+02 6.6590500277e-02 2.1110022188e+03 
+-5.0000000000e-03 6.0273632803e-01 6.6868721225e-03 1.1511091431e+03 4.6044364241e+02 1.1094191293e-02 1.9098054199e+03 
+5.0000000000e-03 4.8179792314e+00 -2.7574984280e-02 1.1572167686e+03 4.6288667589e+02 -5.7233505906e-03 2.4018714780e+02 
+1.5000000000e-02 5.9171825192e+00 -6.1451896334e-01 1.1582788303e+03 4.6329876814e+02 -1.0385330541e-01 1.9574297676e+02 
+2.5000000000e-02 5.4847258557e+00 -4.8383936105e+00 1.0172832680e+03 4.0605966187e+02 -8.8215778470e-01 1.8508658070e+02 
+3.5000000000e-02 1.9842308698e+00 -1.9881274470e+01 3.4839665201e+02 9.9518027282e+01 -1.0019637721e+01 1.2538614936e+02 
+4.5000000000e-02 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+5.5000000000e-02 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+6.5000000000e-02 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+7.5000000000e-02 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+8.5000000000e-02 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+9.5000000000e-02 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+1.0500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+1.1500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+1.2500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+1.3500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+1.4500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+1.5500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+1.6500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+1.7500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+1.8500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+1.9500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+2.0500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+2.1500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+2.2500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+2.3500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+2.4500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+2.5500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+2.6500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+2.7500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+2.8500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+2.9500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+3.0500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+3.1500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+3.2500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+3.3500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+3.4500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+3.5500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+3.6500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+3.7500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+3.8500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+3.9500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+4.0500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+4.1500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+4.2500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+4.3500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+4.4500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+4.5500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+4.6500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+4.7500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+4.8500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
+4.9500000000e-01 1.0000000000e+00 -1.9597450000e+01 1.9205502325e+02 1.0000000000e-02 -1.9597450000e+01 2.5000000000e-02 
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/RP_test/testZ-6-3d_0060.jpg
Binary file source/test/applications/Euler/RP_test/testZ-6-3d_0060.jpg has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/example_inputs/box.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/example_inputs/box.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,231 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (3d box) 
+ *
+ ************************************************************************/
+
+Euler {
+   use_nonuniform_workload = TRUE
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4
+
+   riemann_solve      = "APPROX_RIEM_SOLVE" 
+//   riemann_solve      = "EXACT_RIEM_SOLVE" 
+//   riemann_solve      = "HLLC_RIEM_SOLVE"
+
+   corner_transport = "CORNER_TRANSPORT_2"
+
+   data_problem      = "SPHERE"
+
+   Initial_data {
+      radius            = 0.125
+      center            = 0.5 , 0.5 , 0.5
+
+      density_inside    = 8.0
+      velocity_inside   = 0.0 , 0.0 , 0.0
+      pressure_inside   = 40.0
+
+      density_outside    = 1.0
+      velocity_outside   = 0.0 , 0.0 , 0.0
+      pressure_outside   = 1.0
+
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT", "PRESSURE_SHOCK"
+ 
+      PRESSURE_GRADIENT {
+         grad_tol = 10.0
+      }
+ 
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "FLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for an edge, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent face has either a FLOW
+      //            or REFLECT condition, the resulting edge boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent faces have either FLOW
+      //            or REFLECT conditions, the resulting node boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_node_xlo_ylo_zlo { 
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zlo { 
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zlo { 
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zlo { 
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_ylo_zhi { 
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zhi { 
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zhi { 
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zhi { 
+         boundary_condition      = "XFLOW"
+      }
+
+   }
+
+}
+
+Main {
+   dim = 3
+   base_name = "box.3d"
+// log file parameters 
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_box3d"
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 1        // zero to turn off
+}
+
+TimerManager {
+   print_exclusive      = TRUE   // output exclusive time
+   timer_list               = "apps::main::*",
+                              "apps::Euler::*",
+                              "algs::GriddingAlgorithm::*",
+                              "algs::HyperbolicLevelIntegrator::*"
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (9,9,9) ]
+   x_lo          = 0.e0,0.e0,0.e0     // lower end of computational domain.
+   x_up          = 1.e0,1.e0,1.e0  // upper end of computational domain.
+}
+
+StandardTagAndInitialize{
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+   max_levels             = 3        // Maximum number of levels in hierarchy.
+   ratio_to_coarser {            // vector ratio to next coarser level
+      level_1             = 2,2,2
+      level_2             = 2,2,2
+   }
+
+   largest_patch_size {
+      level_0 =  10, 10, 10  // largest patch allowed in hierarchy
+           // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 =  8, 8, 8 
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance   = 0.70e0    // min % of tag cells in new patch level
+   combine_efficiency     = 0.85e0    // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 100.e0   // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   max_integrator_steps  = 25     // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/example_inputs/room.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/example_inputs/room.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,171 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (2d room) 
+ *
+ ************************************************************************/
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4        // order of Goduov slopes (1, 2, or 4)
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   data_problem         = "SPHERE"
+
+   Initial_data {
+      radius            = 6.0
+      center            = 34.0 , 28.0
+
+      density_inside    = 8.0
+      velocity_inside   = 0.0 , 0.0  
+      pressure_inside   = 40.0
+
+      density_outside    = 1.0
+      velocity_outside   = 0.0 , 0.0 
+      pressure_outside   = 1.0
+
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT", "PRESSURE_SHOCK"
+ 
+      PRESSURE_GRADIENT {
+         grad_tol = 10.0
+      }
+
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85 
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "XREFLECT"
+      }
+   }
+}
+
+Main {
+   dim = 2
+   base_name = "room.2d"
+// log file parameters 
+   log_all_nodes    = TRUE
+
+// visualization dump parameters
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_room2d"
+   visit_file_cluster_size = 1        // not used by Vizamrai
+
+// restart dump parameters
+   restart_interval       = 1         // zero to turn off
+}
+
+TimerManager{
+   print_exclusive      = TRUE   // output exclusive time
+   timer_list               = "apps::main::*",
+                              "apps::Euler::*",
+                              "algs::GriddingAlgorithm::*",
+                              "algs::HyperbolicLevelIntegrator::*"
+}
+
+CartesianGeometry{
+   domain_boxes	= [(0,9),(14,20)],
+                  [(0,21),(19,35)],
+                  [(0,36),(14,49)],
+                  [(20,0),(49,54)],
+                  [(50,0),(64,35)],
+                  [(50,46),(64,54)],
+                  [(57,36),(64,45)]
+
+   x_lo = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up = 65.e0 , 55.e0 // upper end of computational domain.
+}
+
+StandardTagAndInitialize{
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+   max_levels = 3         // Maximum number of levels in hierarchy.
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 4 , 4
+      level_2 = 4 , 4
+      level_3 = 4 , 4
+   }
+
+   largest_patch_size {
+      level_0 = 48 , 48
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 8 , 8 
+      level_1 = 16 , 16 
+      // all finer levels will use same values as level_1...
+   }
+
+}
+
+GriddingAlgorithm{
+
+   efficiency_tolerance    = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.85e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.9e0    // max cfl factor used in problem
+   cfl_init                  = 0.1e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+TimeRefinementIntegrator{
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 301      // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/example_inputs/room.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/example_inputs/room.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,237 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (3d room) 
+ *
+ ************************************************************************/
+
+Euler {
+   gamma           = 1.4     // gamma = Ratio of specific heats
+
+   godunov_order   = 4       // order of Godunov slopes 
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   corner_transport     = "CORNER_TRANSPORT_2"
+
+   data_problem         = "SPHERE"
+
+   Initial_data {
+      radius            = 6.0
+      center            = 34.0 , 28.0 , 10.0
+
+      density_inside    = 8.0
+      velocity_inside   = 0.0 , 0.0 , 0.0
+      pressure_inside   = 40.0
+
+      density_outside    = 1.0
+      velocity_outside   = 0.0 , 0.0 , 0.0
+      pressure_outside   = 1.0
+
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT", "PRESSURE_SHOCK"
+ 
+      PRESSURE_GRADIENT {
+         grad_tol = 10.0
+      }
+ 
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for an edge, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent face has either a FLOW
+      //            or REFLECT condition, the resulting edge boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent faces have either FLOW
+      //            or REFLECT conditions, the resulting node boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+
+   }
+
+}
+
+
+Main {
+   dim = 3
+   base_name = "room.3d"
+// log file parameters
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_room3d"
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters
+   restart_interval       = 1         // zero to turn off
+}
+
+TimerManager{
+   print_exclusive      = TRUE   // output exclusive time
+   timer_list               = "apps::main::*",
+                              "apps::Euler::*",
+                              "algs::GriddingAlgorithmX::*"
+}
+
+CartesianGeometry {
+   domain_boxes   = [ (0,9,0) , (14,20,20) ],
+                    [ (0,21,0) , (19,35,20) ],
+                    [ (0,36,0) , (14,49,20) ],
+                    [ (20,0,0) , (49,54,20) ],
+                    [ (50,0,0) , (64,35,20) ],
+                    [ (50,46,0) , (64,54,20) ],
+                    [ (57,36,0) , (64,45,20) ]
+   x_lo           = 0.e0 , 0.e0 , 0.e0    // lower end of computational domain.
+   x_up           = 65.e0 , 55.e0 , 20.e0 // upper end of computational domain.
+}
+
+StandardTagAndInitialize{
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+   max_levels              = 1         // Maximum number of levels in hierarchy.
+   ratio_to_coarser {            // vector ratio to next coarser level
+      level_1               = 4 , 4 , 4
+      level_2               = 4 , 4 , 4
+      level_3               = 4 , 4 , 4
+   }
+
+   largest_patch_size {
+      level_0 =  48, 48, 48  // largest patch allowed in hierarchy
+           // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 =  8, 8, 8
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance    = 0.70e0    // min % of tag cells in new patch level
+   combine_efficiency      = 0.85e0    // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0      // initial simulation time
+   end_time              = 100.e0    // final simulation time
+   grow_dt               = 1.1e0     // growth factor for timesteps
+   max_integrator_steps  = 25        // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/example_inputs/sphere_restart.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/example_inputs/sphere_restart.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,182 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (2d sphere) 
+ *
+ ************************************************************************/
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4        // order of Goduov slopes (1, 2, or 4)
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   data_problem         = "SPHERE"
+
+   Initial_data {
+      radius            = 6.0
+      center            = 30.0 , 30.0
+
+      density_inside    = 8.0
+      velocity_inside   = 0.0 , 0.0  
+      pressure_inside   = 40.0
+
+      density_outside    = 1.0
+      velocity_outside   = 0.0 , 0.0 
+      pressure_outside   = 1.0
+
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT", 
+                        "PRESSURE_SHOCK", 
+                        "PRESSURE_RICHARDSON"
+ 
+      PRESSURE_RICHARDSON {
+         rich_tol = 0.001
+      }
+
+      // PRESSURE_GRADIENT and PRESSURE_SHOCK criteria are applied only if 
+      // the gradient detector is turned on in StandardTagAndInitialize 
+      // input below...
+      PRESSURE_GRADIENT {
+         grad_tol = 10.0
+      }
+ 
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+ 
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "XREFLECT"
+      }
+   }
+}
+
+Main {
+   dim = 2
+   base_name = "sphere_restart.2d"
+// log file parameters 
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_sphere2d"
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters
+   restart_interval       = 0        // zero to turn off
+}
+
+TimerManager{
+   print_exclusive      = TRUE   // output exclusive time
+   timer_list               = "apps::main::*",
+                              "apps::Euler::*",
+                              "algs::GriddingAlgorithm::*",
+                              "algs::HyperbolicLevelIntegrator::*"
+}
+
+CartesianGeometry{
+   domain_boxes	= [(0,0),(59,59)]
+
+   x_lo = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up = 60.e0 , 60.e0 // upper end of computational domain.
+}
+
+StandardTagAndInitialize {
+//   tagging_method = "GRADIENT_DETECTOR"
+   tagging_method = "RICHARDSON_EXTRAPOLATION"
+//   tagging_method = "RICHARDSON_EXTRAPOLATION", "GRADIENT_DETECTOR"
+//   tagging_method = "REFINE_BOXES"
+//   RefineBoxes {
+//      level_0 = [(20,20),(40,40)]
+//      level_1 = [(90,90),(150,150)]
+//   }
+}
+
+PatchHierarchy {
+   max_levels = 3         // Maximum number of levels in hierarchy.
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 4 , 4
+      level_2 = 4 , 4
+      level_3 = 4 , 4
+   }
+
+   largest_patch_size {
+      level_0 = 48 , 48
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 8 , 8 
+      level_1 = 16 , 16 
+      // all finer levels will use same values as level_1...
+   }
+
+}
+
+GriddingAlgorithm{
+
+   efficiency_tolerance    = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.85e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.9e0    // max cfl factor used in problem
+   cfl_init                  = 0.1e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+TimeRefinementIntegrator{
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 301      // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/example_inputs/step.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/example_inputs/step.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,164 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (2d step) 
+ *
+ ************************************************************************/
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4        // order of Goduov slopes (1, 2, or 4)
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   data_problem         = "STEP"
+
+   Initial_data {
+      front_position = 0.0
+      interval_0 {
+         density         = 1.4
+         velocity        = 3.0 , 0.0
+         pressure        = 1.0
+      }
+      interval_1 {
+         density         = 1.4
+         velocity        = 3.0 , 0.0
+         pressure        = 1.0
+      }
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT", "PRESSURE_SHOCK"
+ 
+      PRESSURE_GRADIENT {
+         grad_tol = 20.0
+      }
+ 
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.90 
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "YREFLECT"
+      }
+   }
+}
+
+Main {
+   dim = 2
+   base_name = "step.2d"
+// log file parameters 
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_step2d"
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters
+   restart_interval       = 1         // zero to turn off
+}
+
+TimerManager{
+   print_exclusive      = TRUE   // output exclusive time 
+   timer_list               = "apps::main::*",
+                              "apps::Euler::*",
+                              "algs::GriddingAlgorithm::*",
+                              "algs::HyperbolicLevelIntegrator::*"
+}
+
+CartesianGeometry {
+   domain_boxes = [ (0,0) , (9,19) ],
+                  [ (10,4) , (49,19) ]
+   x_lo         = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 2.5e0 , 1.e0  // upper end of computational domain.
+}
+
+StandardTagAndInitialize{
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+   max_levels          = 3         // Maximum number of levels in hierarchy.
+
+   ratio_to_coarser {              // vector ratio to next coarser level
+      level_1            = 4 , 4
+      level_2            = 4 , 4
+   }
+
+   largest_patch_size {
+      level_0 = 32 , 32
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 8 , 8
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance = 0.75e0   // min % of tag cells in new patch level
+   combine_efficiency   = 0.85e0   // chop box if sum of volumes of smaller
+                                   // boxes < efficiency * vol of large box
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 20.e0    // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   max_integrator_steps  = 401      // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/example_inputs/step_5levels.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/example_inputs/step_5levels.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,169 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (2d step) 
+ *
+ ************************************************************************/
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4        // order of Goduov slopes (1, 2, or 4)
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   data_problem         = "STEP"
+
+   Initial_data {
+      front_position = 0.0
+      interval_0 {
+         density         = 1.4
+         velocity        = 3.0 , 0.0
+         pressure        = 1.0
+      }
+      interval_1 {
+         density         = 1.4
+         velocity        = 3.0 , 0.0
+         pressure        = 1.0
+      }
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT", "PRESSURE_SHOCK"
+ 
+      PRESSURE_GRADIENT {
+         grad_tol = 20.0
+      }
+ 
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.90
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "YREFLECT"
+      }
+   }
+}
+
+Main {
+   dim = 2
+   base_name = "step_5levels.2d"
+// log file parameters 
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_step2d"
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters
+   restart_interval       = 1         // zero to turn off
+}
+
+TimerManager{
+   print_exclusive      = TRUE   // output exclusive time 
+   timer_list               = "apps::main::*",
+                              "apps::Euler::*",
+                              "algs::GriddingAlgorithm::*",
+                              "algs::HyperbolicLevelIntegrator::*"
+}
+
+CartesianGeometry {
+   domain_boxes = [ (0,0) , (9,19) ],
+                  [ (10,4) , (49,19) ]
+   x_lo         = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 2.5e0 , 1.e0  // upper end of computational domain.
+}
+
+StandardTagAndInitialize{
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+   max_levels          = 5         // Maximum number of levels in hierarchy.
+
+   ratio_to_coarser {              // vector ratio to next coarser level
+      level_1            = 2 , 2
+      level_2            = 2 , 2
+      level_3            = 2 , 2
+      level_4            = 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 32 , 32
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 8 , 8
+      level_1 = 8 , 8
+      level_2 = 8 , 8
+      level_3 = 12 , 12
+      // all finer levels will use same values as level_3...
+   }
+
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance = 0.75e0   // min % of tag cells in new patch level
+   combine_efficiency   = 0.85e0   // chop box if sum of volumes of smaller
+                                   // boxes < efficiency * vol of large box
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 20.e0    // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   max_integrator_steps  = 401      // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/amrflaten2d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/amrflaten2d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,89 @@
+c
+c***********************************************************************
+c flatten routine
+c***********************************************************************
+c
+      subroutine amrflaten2d(ifirst,ilast,
+     &                  cilo,cihi,
+     &                  mc,gamma,
+     &                  densc,presc,velc,flattn,flat2,sound)
+c***********************************************************************
+c description of arguments:
+c   input:
+c     p        ==> pressure            tracest(NEQU)
+c     vn       ==> normal velocity     tracest(2+idir)
+c   output:
+c     flattn   ==> flattening coefficient
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+cnclude(FORTDIR/../const.i)dnl
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      integer ifirst,ilast,
+     &  cilo,cihi,
+     &  mc
+      REAL gamma
+      REAL
+     &  densc(cilo:cilo+mc),
+     &  velc(cilo:cilo+mc),
+     &  presc(cilo:cilo+mc)
+      REAL  flattn(ifirst:ifirst+mc)
+      REAL  flat2(cilo:cilo+mc),sound(cilo:cilo+mc)
+
+      REAL zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+      parameter (two=2.d0)
+
+c
+c***********************************************************************
+c
+
+
+      REAL shktst, zcut1, zcut2, dzcut, smallp
+      REAL denom, zeta, tst, tmp, dp,zi
+      REAL rhoc1,rhoc2,chi
+      integer ic
+
+c
+c***********************************************************************
+c
+      shktst =0.33d0
+      zcut1 =0.75d0
+      zcut2 =0.85d0
+      smallp =1.0d-6
+      dzcut = one/(zcut2-zcut1)
+
+      do ic=ifirst,ilast    
+         flattn(ic) = one
+      enddo
+      do ic=ifirst-1,ilast+1   
+         sound(ic) = sqrt(gamma*presc(ic)/densc(ic))
+      enddo
+
+      do ic=ifirst+1,ilast-1
+         dp = presc(ic+1) - presc(ic-1)
+         denom = max(smallp,abs(presc(ic+2)-presc(ic-2)))
+         zeta = abs(dp)/denom
+         zi = min( one, max( zero, dzcut*(zeta - zcut1) ) )
+         if ((velc(ic-1) - velc(ic+1)).gt.zero) then
+            tst = one
+         else
+            tst = zero
+         endif
+         rhoc1 = densc(ic+1)*sound(ic+1)**2
+         rhoc2 = densc(ic-1)*sound(ic-1)**2
+         tmp = min(rhoc1,rhoc2)
+         if ((abs(dp)/tmp).gt.shktst) then
+            chi = tst
+         else
+            chi = zero
+         endif
+         flat2(ic) = chi*zi
+      enddo
+      do ic=ifirst+2,ilast-2
+         flattn(ic) = one - max(flat2(ic-1),flat2(ic),flat2(ic+1))
+      enddo
+      
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/amrflaten3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/amrflaten3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,89 @@
+c
+c***********************************************************************
+c flatten routine
+c***********************************************************************
+c
+      subroutine amrflaten3d(ifirst,ilast,
+     &                  cilo,cihi,
+     &                  mc,gamma,
+     &                  densc,presc,velc,flattn,flat2,sound)
+c***********************************************************************
+c description of arguments:
+c   input:
+c     p        ==> pressure            tracest(NEQU)
+c     vn       ==> normal velocity     tracest(2+idir)
+c   output:
+c     flattn   ==> flattening coefficient
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+cnclude(FORTDIR/../const.i)dnl
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      integer ifirst,ilast,
+     &  cilo,cihi,
+     &  mc
+      REAL gamma
+      REAL
+     &  densc(cilo:cilo+mc),
+     &  velc(cilo:cilo+mc),
+     &  presc(cilo:cilo+mc)
+      REAL  flattn(ifirst:ifirst+mc)
+      REAL  flat2(cilo:cilo+mc),sound(cilo:cilo+mc)
+
+      REAL zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+      parameter (two=2.d0)
+
+c
+c***********************************************************************
+c
+
+
+      REAL shktst, zcut1, zcut2, dzcut, smallp
+      REAL denom, zeta, tst, tmp, dp,zi
+      REAL rhoc1,rhoc2,chi
+      integer ic
+
+c
+c***********************************************************************
+c
+      shktst =0.33d0
+      zcut1 =0.75d0
+      zcut2 =0.85d0
+      smallp =1.0d-6
+      dzcut = one/(zcut2-zcut1)
+
+      do ic=ifirst,ilast    
+         flattn(ic) = one
+      enddo
+      do ic=ifirst-1,ilast+1   
+         sound(ic) = sqrt(gamma*presc(ic)/densc(ic))
+      enddo
+
+      do ic=ifirst+1,ilast-1
+         dp = presc(ic+1) - presc(ic-1)
+         denom = max(smallp,abs(presc(ic+2)-presc(ic-2)))
+         zeta = abs(dp)/denom
+         zi = min( one, max( zero, dzcut*(zeta - zcut1) ) )
+         if ((velc(ic-1) - velc(ic+1)).gt.zero) then
+            tst = one
+         else
+            tst = zero
+         endif
+         rhoc1 = densc(ic+1)*sound(ic+1)**2
+         rhoc2 = densc(ic-1)*sound(ic-1)**2
+         tmp = min(rhoc1,rhoc2)
+         if ((abs(dp)/tmp).gt.shktst) then
+            chi = tst
+         else
+            chi = zero
+         endif
+         flat2(ic) = chi*zi
+      enddo
+      do ic=ifirst+2,ilast-2
+         flattn(ic) = one - max(flat2(ic-1),flat2(ic),flat2(ic+1))
+      enddo
+      
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/avgint2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/avgint2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,449 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/examples/Euler/fortran/2d/avgint.m4 $
+c  Package:     SAMRAI applications
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 1917 $
+c  Modified:    $LastChangedDate: 2008-01-25 13:28:01 -0800 (Fri, 25 Jan 2008) $
+c  Description: F77 routines for interlevel transfer of velocity and 
+c               pressure for 2d euler equations.
+c
+define(NDIM,2)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+include(FORTDIR/amrflaten2d.i)dnl
+c
+define(coarsen_index,`dnl
+      if ($1.lt.0) then
+         $2=($1+1)/$3-1
+      else
+         $2=$1/$3
+      endif
+')dnl
+define(coarse_fine_cell_deltas,`dnl
+      do ir$1=0,ratio($1)-1
+         deltax(ir$1,$1)=(dble(ir$1)+half)*dxf($1)-dxc($1)*half
+      enddo
+')dnl
+define(muscl_limited_conserved_slopes,`dnl
+      do ie$1=ifirstc$1,ilastc$1+1
+         diff$1(ie$1)=conservc($2)
+     &               -conservc($3)
+      enddo
+      do ic$1=ifirstc$1,ilastc$1
+         coef2=half*(diff$1(ic$1+1)+diff$1(ic$1))
+         bound=two*min(abs(diff$1(ic$1+1)),abs(diff$1(ic$1)))
+         if (diff$1(ic$1)*diff$1(ic$1+1).gt.zero) then
+            slope$1($4)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc($1)
+         else
+            slope$1($4)=zero
+         endif
+         slope$1($4)=slope$1($4)*flat$1($4)
+      enddo
+')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d flux variables.
+c***********************************************************************
+c
+      subroutine conservlinint2d(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  gamma,
+     &  densc,densf,
+     &  velc,presc,
+     &  velf,presf,
+     &  conservc,
+     &  tflat,tflat2,sound,mc,
+     &  tdensc,tpresc,tvelc,
+     &  flat0,flat1,
+     &  diff0,slope0,diff1,slope1)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:NDIM-1)
+      REAL
+     &  dxc(0:NDIM-1),
+     &  dxf(0:NDIM-1),
+     &  gamma
+      REAL
+     &  densc(CELL2d(cilo,cihi,0)),
+     &  densf(CELL2d(filo,fihi,0)),
+     &  velc(CELL2d(cilo,cihi,0),0:NDIM-1),
+     &  presc(CELL2d(cilo,cihi,0))
+      REAL 
+     &  velf(CELL2d(filo,fihi,0),0:NDIM-1),
+     &  presf(CELL2d(filo,fihi,0))
+      REAL
+     &  conservc(CELL2d(ifirstc,ilastc,1)),
+     &  flat0(CELL2d(ifirstc,ilastc,0)),
+     &  flat1(CELL2d(ifirstc,ilastc,0)),
+     &  diff0(ifirstc0:ilastc0+1),
+     &  slope0(CELL2d(ifirstc,ilastc,0)),
+     &  diff1(ifirstc1:ilastc1+1),
+     &  slope1(CELL2d(ifirstc,ilastc,0))
+      REAL
+     &  deltax(0:15,0:NDIM-1)
+      integer mc
+      REAL
+     &  tdensc(0:mc-1),tpresc(0:mc-1),tvelc(0:mc-1)
+      REAL
+     &  tflat(0:mc-1),tflat2(0:mc-1),sound(0:mc-1)
+
+      integer id,ic0,ic1,ie0,ie1,if0,if1,ir0,ir1,it
+      REAL coef2,bound,val,valinv,deltax1,v2norm
+      logical presneg
+c
+c***********************************************************************
+c
+
+      presneg = .false.
+
+coarse_fine_cell_deltas(0)dnl
+
+coarse_fine_cell_deltas(1)dnl
+
+c
+c     compute the flatten coefficients to further limit the slopes
+c
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0-1,ilastc0+1
+            it = ic0-cilo0
+            tdensc(it) = densc(ic0,ic1)
+            tpresc(it) = presc(ic0,ic1)
+            tvelc(it)  = velc(ic0,ic1,0)
+c           write(6,*) "presc(",ic0,ic1,") ",presc(ic0,ic1)
+c           write(6,*) "tpresc(",it,") ",tpresc(it)
+         enddo
+         call amrflaten2d(ifirstc0,ilastc0,cilo0,cihi0,mc,gamma,
+     &                  tdensc,tpresc,tvelc,tflat,tflat2,sound)
+         do ic0=ifirstc0,ilastc0
+              flat0(ic0,ic1) = tflat(ic0-ifirstc0)
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         do ic1=ifirstc1-1,ilastc1+1
+            it = ic1-cilo1
+            tdensc(it) = densc(ic0,ic1)
+            tpresc(it) = presc(ic0,ic1)
+            tvelc(it)  = velc(ic0,ic1,1)
+         enddo
+         call amrflaten2d(ifirstc1,ilastc1,cilo1,cihi1,mc,gamma,
+     &                  tdensc,tpresc,tvelc,tflat,tflat2,sound)
+         do ic1=ifirstc1,ilastc1
+              flat1(ic0,ic1) = tflat(ic1-ifirstc1)
+         enddo
+      enddo
+
+c
+c
+
+c
+c construct fine velocity values using conservative linear 
+c interpolation on momentum
+c
+      do id=0,NDIM-1
+
+         do ic1=ifirstc1-1,ilastc1+1
+            do ic0=ifirstc0-1,ilastc0+1
+               conservc(ic0,ic1) = densc(ic0,ic1)*velc(ic0,ic1,id) 
+            enddo
+         enddo
+
+         do ic1=ifirstc1,ilastc1
+muscl_limited_conserved_slopes(0,`ie0,ic1',`ie0-1,ic1',`ic0,ic1')dnl
+         enddo
+
+         do ic0=ifirstc0,ilastc0
+muscl_limited_conserved_slopes(1,`ic0,ie1',`ic0,ie1-1',`ic0,ic1')dnl
+         enddo
+
+         do if1=ifirstf1,ilastf1
+coarsen_index(if1,ic1,ratio(1))dnl
+            ir1=if1-ic1*ratio(1)
+            deltax1=deltax(ir1,1)
+            do if0=ifirstf0,ilastf0
+coarsen_index(if0,ic0,ratio(0))dnl
+               ir0=if0-ic0*ratio(0)
+               velf(if0,if1,id) = (conservc(ic0,ic1)
+     &                          + slope0(ic0,ic1)*deltax(ir0,0)
+     &                          + slope1(ic0,ic1)*deltax1)
+     &                          / densf(if0,if1)
+           enddo
+         enddo
+
+      enddo
+
+c
+c construct fine pressure values using conservative linear 
+c interpolation on energy
+c
+      val = (gamma-one) 
+      valinv = one/(gamma-one) 
+
+      do ic1=ifirstc1-1,ilastc1+1
+         do ic0=ifirstc0-1,ilastc0+1
+            v2norm = velc(ic0,ic1,0)**2+velc(ic0,ic1,1)**2 
+            conservc(ic0,ic1) = presc(ic0,ic1)*valinv
+     &                        + half*densc(ic0,ic1)*v2norm
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+muscl_limited_conserved_slopes(0,`ie0,ic1',`ie0-1,ic1',`ic0,ic1')dnl
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+muscl_limited_conserved_slopes(1,`ic0,ie1',`ic0,ie1-1',`ic0,ic1')dnl
+      enddo
+
+      do if1=ifirstf1,ilastf1
+coarsen_index(if1,ic1,ratio(1))dnl
+         ir1=if1-ic1*ratio(1)
+         deltax1=deltax(ir1,1)
+         do if0=ifirstf0,ilastf0
+coarsen_index(if0,ic0,ratio(0))dnl
+            ir0=if0-ic0*ratio(0)
+            v2norm = velf(if0,if1,0)**2+velf(if0,if1,1)**2
+            presf(if0,if1) = ((conservc(ic0,ic1)
+     &                     +  slope0(ic0,ic1)*deltax(ir0,0)
+     &                     +  slope1(ic0,ic1)*deltax1)
+     &                     - half*densf(if0,if1)*v2norm) * val
+            presf(if0,if1) = max(presf(if0,if1),smallr)
+            if (presf(if0,if1).lt.zero) then
+c               write(6,*) "IN conservlinint2d"
+c               write(6,*) "gamma,val,valinv = ",
+c    &                      gamma,val,valinv
+c               write(6,*) "ifirstf0,ilastf0 ",ifirstf0,ilastf0,
+c    &                     ", ifirstf1,ilastf1 ",ifirstf1,ilastf1
+c               write(6,*) "if0,if1 ",if0,if1
+c               write(6,*) "ic0,ic1 ",ic0,ic1
+c               write(6,*) "fine energy = ",
+c    &   conservc(ic0,ic1) + slope0(ic0,ic1)*deltax(ir0,0)
+c    &                     +  slope1(ic0,ic1)*deltax1
+c               write(6,*) "densf(if0,if1) ",densf(if0,if1)
+c               write(6,*) "vel() ",velf(if0,if1,0),velf(if0,if1,1)
+c               write(6,*) "presf(if0,if1) ",presf(if0,if1)
+c               write(6,*) "conservc(",ic0,ic1,") ",conservc(ic0,ic1)
+c               write(6,*) "slope0(",ic0,ic1,") ",slope0(ic0,ic1)
+c               write(6,*) "deltax(",ir0,0,") ",deltax(ir0,0)
+c               write(6,*) "slope1(",ic0,ic1,") ",slope1(ic0,ic1)
+c               write(6,*) "deltax1(",ir1,1,") ",deltax1
+c               write(6,*) "val ",val,", v2norm ",v2norm
+c               write(6,*) "presc(",ic0,ic1,") ",presc(ic0,ic1)
+c               write(6,*) "densc(",ic0,ic1,") ",densc(ic0,ic1)
+c               write(6,*) "velc() ",velc(ic0,ic1,0),velc(ic0,ic1,1)
+                presneg = .true.
+            endif
+        enddo
+      enddo
+
+      if (presneg) then
+        write(6,*) "negative pressure reported in conservlinint2d"
+c       write(6,*) "coarse conserved values"
+c       do ic1=ifirstc1-1,ilastc1+1
+c          do ic0=ifirstc0-1,ilastc0+1
+c             write(6,*) "ic0,ic1,conservc = ",
+c    &        ic0,ic1,conservc(ic0,ic1)
+c          enddo
+c       enddo
+c       write(6,*) "coarse density values"
+c       do ic1=ifirstc1-1,ilastc1+1
+c          do ic0=ifirstc0-1,ilastc0+1
+c             write(6,*) "ic0,ic1,densc = ",
+c    &        ic0,ic1,densc(ic0,ic1)
+c          enddo
+c       enddo
+c       write(6,*) "coarse velocity0 values"
+c       do ic1=ifirstc1-1,ilastc1+1
+c          do ic0=ifirstc0-1,ilastc0+1
+c             write(6,*) "ic0,ic1,velc0 = ",
+c    &        ic0,ic1,velc(ic0,ic1,0)
+c          enddo
+c       enddo
+c       write(6,*) "coarse velocity1 values"
+c       do ic1=ifirstc1-1,ilastc1+1
+c          do ic0=ifirstc0-1,ilastc0+1
+c             write(6,*) "ic0,ic1,velc1 = ",
+c    &        ic0,ic1,velc(ic0,ic1,1)
+c          enddo
+c       enddo
+c       write(6,*) "coarse pressure values"
+c       do ic1=ifirstc1-1,ilastc1+1
+c          do ic0=ifirstc0-1,ilastc0+1
+c             write(6,*) "ic0,ic1,presc = ",
+c    &        ic0,ic1,presc(ic0,ic1)
+c          enddo
+c       enddo
+c       write(6,*) "fine density values"
+c       do if1=ifirstf1,ilastf1
+c          do if0=ifirstf0,ilastf0
+c              write(6,*) "if0,if1,densf = ",
+c    &         if0,if1,densf(if0,if1)
+c          enddo
+c        enddo
+c       write(6,*) "fine velocity0 values"
+c       do if1=ifirstf1,ilastf1
+c          do if0=ifirstf0,ilastf0
+c              write(6,*) "if0,if1,velf0 = ",
+c    &         if0,if1,velf(if0,if1,0)
+c          enddo
+c       enddo
+c       write(6,*) "fine velocity1 values"
+c       do if1=ifirstf1,ilastf1
+c          do if0=ifirstf0,ilastf0
+c              write(6,*) "if0,if1,velf1 = ",
+c    &         if0,if1,velf(if0,if1,1)
+c          enddo
+c       enddo
+c        call flush(6)
+	stop
+      endif
+c
+      return
+      end
+c
+c
+c***********************************************************************
+c Volume weighted averaging for 2d flux variables.
+c***********************************************************************
+c
+      subroutine conservavg2d(
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  gamma,
+     &  densf,densc,
+     &  velf,presf,
+     &  velc,presc,
+     &  conservf)
+c***********************************************************************
+      implicit none
+      REAL zero,half,one
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:NDIM-1)
+      REAL
+     &  dxf(0:NDIM-1),
+     &  dxc(0:NDIM-1),
+     &  gamma
+      REAL
+     &  densf(CELL2d(filo,fihi,0)),
+     &  densc(CELL2d(cilo,cihi,0)),
+     &  velf(CELL2d(filo,fihi,0),0:NDIM-1),
+     &  presf(CELL2d(filo,fihi,0))
+      REAL
+     &  velc(CELL2d(cilo,cihi,0),0:NDIM-1),
+     &  presc(CELL2d(cilo,cihi,0))
+      REAL
+     &  conservf(CELL2d(ifirstf,ilastf,0)) 
+      integer ic0,ic1,if0,if1,ir0,ir1,id
+      REAL dVf,dVc,val,valinv,v2norm
+c
+c***********************************************************************
+c
+      dVf = dxf(0)*dxf(1)
+      dVc = dxc(0)*dxc(1)
+c
+c construct coarse velocity values using conservative average
+c of momentum
+c
+      do id=0,NDIM-1 
+
+         do if1=ifirstf1,ilastf1
+            do if0=ifirstf0,ilastf0
+               conservf(if0,if1) = densf(if0,if1)*velf(if0,if1,id)
+            enddo
+         enddo
+
+         do ic1=ifirstc1,ilastc1
+            do ic0=ifirstc0,ilastc0
+	       velc(ic0,ic1,id) = zero
+            enddo
+         enddo
+
+         do ir1=0,ratio(1)-1
+            do ir0=0,ratio(0)-1
+               do ic1=ifirstc1,ilastc1
+                  if1=ic1*ratio(1)+ir1
+                  do ic0=ifirstc0,ilastc0
+                     if0=ic0*ratio(0)+ir0
+                     velc(ic0,ic1,id) = velc(ic0,ic1,id)
+     &                                + conservf(if0,if1)*dVf
+                  enddo
+               enddo
+            enddo
+         enddo
+
+         do ic1=ifirstc1,ilastc1
+            do ic0=ifirstc0,ilastc0
+               velc(ic0,ic1,id) = velc(ic0,ic1,id)
+     &                          / (densc(ic0,ic1)*dVc)
+           enddo
+         enddo
+
+      enddo
+
+c
+c construct coarse velocity values using conservative average
+c of energy
+c
+      val = (gamma-one)
+      valinv = one/(gamma-one)
+
+      do if1=ifirstf1,ilastf1
+         do if0=ifirstf0,ilastf0
+            v2norm = velf(if0,if1,0)**2 + velf(if0,if1,1)**2
+            conservf(if0,if1) = presf(if0,if1)*valinv
+     &                        + half*densf(if0,if1)*v2norm
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            presc(ic0,ic1) = zero
+         enddo
+      enddo
+
+      do ir1=0,ratio(1)-1
+         do ir0=0,ratio(0)-1
+            do ic1=ifirstc1,ilastc1
+               if1=ic1*ratio(1)+ir1
+               do ic0=ifirstc0,ilastc0
+                  if0=ic0*ratio(0)+ir0
+                  presc(ic0,ic1) = presc(ic0,ic1)
+     &                           + conservf(if0,if1)*dVf
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            v2norm = velc(ic0,ic1,0)**2 + velc(ic0,ic1,1)**2
+            presc(ic0,ic1) = ((presc(ic0,ic1)/dVc)
+     &                     - half*densc(ic0,ic1)*v2norm) * val
+        enddo
+      enddo
+c
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/avgint3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/avgint3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,591 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/examples/Euler/fortran/3d/avgint.m4 $
+c  Package:     SAMRAI applications
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 1917 $
+c  Modified:    $LastChangedDate: 2008-01-25 13:28:01 -0800 (Fri, 25 Jan 2008) $
+c  Description: F77 routines for conservative interlevel transfer of velocity 
+c               and pressure for 3d euler equations.
+c
+define(NDIM,3)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+include(FORTDIR/amrflaten3d.i)dnl
+c
+define(coarsen_index,`dnl
+      if ($1.lt.0) then
+         $2=($1+1)/$3-1
+      else
+         $2=$1/$3
+      endif
+')dnl
+define(coarse_fine_cell_deltas,`dnl
+      do ir$1=0,ratio($1)-1
+         deltax(ir$1,$1)=(dble(ir$1)+half)*dxf($1)-dxc($1)*half
+      enddo
+')dnl
+define(muscl_limited_conserved_slopes,`dnl
+      do ie$1=ifirstc$1,ilastc$1+1
+         diff$1(ie$1)=conservc($2)
+     &               -conservc($3)
+      enddo
+      do ic$1=ifirstc$1,ilastc$1
+         coef2=half*(diff$1(ic$1+1)+diff$1(ic$1))
+         bound=two*min(abs(diff$1(ic$1+1)),abs(diff$1(ic$1)))
+         if (diff$1(ic$1)*diff$1(ic$1+1).gt.zero) then
+            slope$1($4)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc($1)
+         else
+            slope$1($4)=zero
+         endif
+         slope$1($4)=slope$1($4)*flat$1($4)
+      enddo
+')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d flux variables.
+c***********************************************************************
+c
+      subroutine conservlinint3d(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  gamma,
+     &  densc,densf,
+     &  velc,presc,
+     &  velf,presf,
+     &  conservc,
+     &  tflat,tflat2,sound,mc,
+     &  tdensc,tpresc,tvelc,
+     &  flat0,flat1,flat2,
+     &  diff0,slope0,diff1,slope1,diff2,slope2)
+c***********************************************************************
+      implicit none
+      REAL zero,half,one,two
+      parameter (zero=0.0d0)
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:NDIM-1)
+      REAL
+     &  dxc(0:NDIM-1),
+     &  dxf(0:NDIM-1),
+     &  gamma
+      REAL
+     &  densc(CELL3d(cilo,cihi,0)),
+     &  densf(CELL3d(filo,fihi,0)),
+     &  velc(CELL3d(cilo,cihi,0),0:NDIM-1),
+     &  presc(CELL3d(cilo,cihi,0))
+      REAL 
+     &  velf(CELL3d(filo,fihi,0),0:NDIM-1),
+     &  presf(CELL3d(filo,fihi,0))
+      REAL
+     &  conservc(CELL3d(ifirstc,ilastc,1)),
+     &  flat0(CELL3d(ifirstc,ilastc,0)),
+     &  flat1(CELL3d(ifirstc,ilastc,0)),
+     &  flat2(CELL3d(ifirstc,ilastc,0)),
+     &  diff0(ifirstc0:ilastc0+1),
+     &  slope0(CELL3d(ifirstc,ilastc,0)),
+     &  diff1(ifirstc1:ilastc1+1),
+     &  slope1(CELL3d(ifirstc,ilastc,0)),
+     &  diff2(ifirstc2:ilastc2+1),
+     &  slope2(CELL3d(ifirstc,ilastc,0))
+      REAL
+     &  deltax(0:15,0:NDIM-1)
+      integer mc
+      REAL
+     &  tdensc(0:mc-1),tpresc(0:mc-1),tvelc(0:mc-1)
+      REAL
+     &  tflat(0:mc-1),tflat2(0:mc-1),sound(0:mc-1)
+
+      integer id,ic0,ic1,ic2,ie0,ie1,ie2,if0,if1,if2,ir0,ir1,ir2,it
+      REAL coef2,bound,val,valinv,
+     &  deltax1,deltax2,v2norm
+      logical presneg
+c
+c***********************************************************************
+c
+
+      presneg = .false.
+
+coarse_fine_cell_deltas(0)dnl
+
+coarse_fine_cell_deltas(1)dnl
+
+coarse_fine_cell_deltas(2)dnl
+
+c
+c     compute the flatten coefficients to further limit the slopes
+c
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            do ic0=ifirstc0-1,ilastc0+1
+               it = ic0-cilo0
+               tdensc(it) = densc(ic0,ic1,ic2)
+               tpresc(it) = presc(ic0,ic1,ic2)
+               tvelc(it)  = velc(ic0,ic1,ic2,0)
+            enddo
+            call amrflaten3d(ifirstc0,ilastc0,cilo0,cihi0,mc,gamma,
+     &                     tdensc,tpresc,tvelc,tflat,tflat2,sound)
+            do ic0=ifirstc0,ilastc0
+                 flat0(ic0,ic1,ic2) = tflat(ic0-ifirstc0)
+            enddo
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         do ic2=ifirstc2,ilastc2
+            do ic1=ifirstc1-1,ilastc1+1
+               it = ic1-cilo1
+               tdensc(it) = densc(ic0,ic1,ic2)
+               tpresc(it) = presc(ic0,ic1,ic2)
+               tvelc(it)  = velc(ic0,ic1,ic2,1)
+            enddo
+            call amrflaten3d(ifirstc1,ilastc1,cilo1,cihi1,mc,gamma,
+     &                     tdensc,tpresc,tvelc,tflat,tflat2,sound)
+            do ic1=ifirstc1,ilastc1
+                 flat1(ic0,ic1,ic2) = tflat(ic1-ifirstc1)
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            do ic2=ifirstc2-1,ilastc2+1
+               it = ic2-cilo2
+               tdensc(it) = densc(ic0,ic1,ic2)
+               tpresc(it) = presc(ic0,ic1,ic2)
+               tvelc(it)  = velc(ic0,ic1,ic2,2)
+            enddo
+            call amrflaten3d(ifirstc2,ilastc2,cilo2,cihi2,mc,gamma,
+     &                  tdensc,tpresc,tvelc,tflat,tflat2,sound)
+            do ic2=ifirstc2,ilastc2
+                 flat2(ic0,ic1,ic2) = tflat(ic2-ifirstc2)
+            enddo
+         enddo
+      enddo
+
+c
+c
+
+c
+c construct fine velocity values using conservative linear 
+c interpolation on momentum
+c
+      do id=0,NDIM-1
+
+         do ic2=ifirstc2-1,ilastc2+1
+            do ic1=ifirstc1-1,ilastc1+1
+               do ic0=ifirstc0-1,ilastc0+1
+                  conservc(ic0,ic1,ic2) = 
+     &            densc(ic0,ic1,ic2)*velc(ic0,ic1,ic2,id) 
+               enddo
+            enddo
+         enddo
+
+         do ic2=ifirstc2,ilastc2
+            do ic1=ifirstc1,ilastc1
+muscl_limited_conserved_slopes(0,`ie0,ic1,ic2',`ie0-1,ic1,ic2',`ic0,ic1,ic2')dnl
+            enddo
+         enddo
+
+         do ic2=ifirstc2,ilastc2
+            do ic0=ifirstc0,ilastc0
+muscl_limited_conserved_slopes(1,`ic0,ie1,ic2',`ic0,ie1-1,ic2',`ic0,ic1,ic2')dnl
+            enddo
+         enddo
+
+         do ic1=ifirstc1,ilastc1
+            do ic0=ifirstc0,ilastc0
+muscl_limited_conserved_slopes(2,`ic0,ic1,ie2',`ic0,ic1,ie2-1',`ic0,ic1,ic2')dnl
+            enddo
+         enddo
+
+         do if2=ifirstf2,ilastf2
+coarsen_index(if2,ic2,ratio(2))dnl
+            ir2=if2-ic2*ratio(2)
+            deltax2=deltax(ir2,2)
+            do if1=ifirstf1,ilastf1
+coarsen_index(if1,ic1,ratio(1))dnl
+               ir1=if1-ic1*ratio(1)
+               deltax1=deltax(ir1,1)
+               do if0=ifirstf0,ilastf0
+coarsen_index(if0,ic0,ratio(0))dnl
+                  ir0=if0-ic0*ratio(0)
+                  velf(if0,if1,if2,id)=(conservc(ic0,ic1,ic2)
+     &                        + slope0(ic0,ic1,ic2)*deltax(ir0,0)
+     &                        + slope1(ic0,ic1,ic2)*deltax1
+     &                        + slope2(ic0,ic1,ic2)*deltax2)
+     &                        / densf(if0,if1,if2)
+             enddo
+           enddo
+         enddo
+
+      enddo
+
+c
+c construct fine pressure values using conservative linear 
+c interpolation on energy
+c
+      val = (gamma-one) 
+      valinv = one/(gamma-one) 
+
+      do ic2=ifirstc2-1,ilastc2+1
+         do ic1=ifirstc1-1,ilastc1+1
+            do ic0=ifirstc0-1,ilastc0+1
+               v2norm = velc(ic0,ic1,ic2,0)**2
+     &                + velc(ic0,ic1,ic2,1)**2
+     &                + velc(ic0,ic1,ic2,2)**2
+               conservc(ic0,ic1,ic2) = presc(ic0,ic1,ic2)*valinv
+     &                               + half*densc(ic0,ic1,ic2)*v2norm
+            enddo
+         enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+muscl_limited_conserved_slopes(0,`ie0,ic1,ic2',`ie0-1,ic1,ic2',`ic0,ic1,ic2')dnl
+         enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic0=ifirstc0,ilastc0
+muscl_limited_conserved_slopes(1,`ic0,ie1,ic2',`ic0,ie1-1,ic2',`ic0,ic1,ic2')dnl
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+muscl_limited_conserved_slopes(2,`ic0,ic1,ie2',`ic0,ic1,ie2-1',`ic0,ic1,ic2')dnl
+         enddo
+      enddo
+
+      do if2=ifirstf2,ilastf2
+coarsen_index(if2,ic2,ratio(2))dnl
+         ir2=if2-ic2*ratio(2)
+         deltax2=deltax(ir2,2)
+         do if1=ifirstf1,ilastf1
+coarsen_index(if1,ic1,ratio(1))dnl
+            ir1=if1-ic1*ratio(1)
+            deltax1=deltax(ir1,1)
+            do if0=ifirstf0,ilastf0
+coarsen_index(if0,ic0,ratio(0))dnl
+               ir0=if0-ic0*ratio(0)
+               v2norm = velf(if0,if1,if2,0)**2
+     &                + velf(if0,if1,if2,1)**2
+     &                + velf(if0,if1,if2,2)**2
+               presf(if0,if1,if2) = ((conservc(ic0,ic1,ic2)
+     &                            + slope0(ic0,ic1,ic2)*deltax(ir0,0)
+     &                            + slope1(ic0,ic1,ic2)*deltax1
+     &                            + slope2(ic0,ic1,ic2)*deltax2)
+     &                     - half*densf(if0,if1,if2)*v2norm) * val
+            if (presf(if0,if1,if2).lt.zero) then
+c             write(6,*) "IN conservlinint3d"
+c             write(6,*) "gamma,val,valinv = ",
+c    &                      gamma,val,valinv
+c               write(6,*) "ifirstf0,ilastf0 ",ifirstf0,ilastf0,
+c    &                     ", ifirstf1,ilastf1 ",ifirstf1,ilastf1
+c    &                     ", ifirstf2,ilastf2 ",ifirstf2,ilastf2
+c               write(6,*) "if0,if1,if2 ",if0,if,if21
+c               write(6,*) "ic0,ic1,if2 ",ic0,ic,if21
+c               write(6,*) "fine energy = ",
+c    &   conservc(ic0,ic1,ic2) + slope0(ic0,ic1,ic2)*deltax(ir0,0)
+c    &                     +  slope1(ic0,ic1,ic2)*deltax1
+c    &                     +  slope2(ic0,ic1,ic2)*deltax2
+c               write(6,*) "densf(if0,if1,if2) ",densf(if0,if1,if2)
+c               write(6,*) "vel() ",velf(if0,if1,if2,0),
+c    &                              velf(if0,if1,if2,1),
+c    &                              velf(if0,if1,if2,2)
+c               write(6,*) "presf(if0,if1,if2) ",presf(if0,if1,if2)
+c               write(6,*) "conservc(",ic0,ic1,ic2,") ",
+c    &                      conservc(ic0,ic1,ic2)
+c               write(6,*) "slope0(",ic0,ic1,ic2,") ",
+c    &                      slope0(ic0,ic1,ic2)
+c               write(6,*) "deltax(",ir0,0,") ",deltax(ir0,0)
+c               write(6,*) "slope1(",ic0,ic1,ic2,") ",
+c    &                      slope1(ic0,ic1,ic2)
+c               write(6,*) "deltax1(",ir1,1,") ",deltax1
+c               write(6,*) "slope2(",ic0,ic1,ic2,") ",
+c    &                      slope2(ic0,ic1,ic2)
+c               write(6,*) "deltax2(",ir2,2,") ",deltax2
+c               write(6,*) "val ",val,", v2norm ",v2norm
+c               write(6,*) "presc(",ic0,ic1,ic2,") ",presc(ic0,ic1,ic2)
+c               write(6,*) "densc(",ic0,ic1,ic2,") ",densc(ic0,ic1,ic2)
+c               write(6,*) "velc() ",velc(ic0,ic1,ic2,0),
+c    &                               velc(ic0,ic1,ic2,1),
+c    &                               velc(ic0,ic1,ic2,2)
+                presneg = .true.
+            endif
+          enddo
+        enddo
+      enddo
+
+      if (presneg) then
+        write(6,*) "negative pressure reported in conservlinint3d"
+c       write(6,*) "coarse conserved values"
+c       do ic2=ifirstc2-1,ilastc2+1
+c          do ic1=ifirstc1-1,ilastc1+1
+c             do ic0=ifirstc0-1,ilastc0+1
+c                write(6,*) "ic0,ic1,ic2,conservc = ",
+c    &                       ic0,ic1,ic2,conservc(ic0,ic1,ic2)
+c             enddo
+c          enddo
+c       enddo
+c       write(6,*) "coarse density values"
+c       do ic2=ifirstc2-1,ilastc2+1
+c          do ic1=ifirstc1-1,ilastc1+1
+c             do ic0=ifirstc0-1,ilastc0+1
+c                write(6,*) "ic0,ic1,ic2,densc = ",
+c    &                       ic0,ic1,ic2,densc(ic0,ic1,ic2)
+c             enddo
+c          enddo
+c       enddo
+c       write(6,*) "coarse velocity0 values"
+c       do ic2=ifirstc2-1,ilastc2+1
+c          do ic1=ifirstc1-1,ilastc1+1
+c             do ic0=ifirstc0-1,ilastc0+1
+c                write(6,*) "ic0,ic1,ic2,velc = ",
+c    &                       ic0,ic1,ic2,velc(ic0,ic1,ic2,0)
+c             enddo
+c          enddo
+c       enddo
+c       write(6,*) "coarse velocity1 values"
+c       do ic2=ifirstc2-1,ilastc2+1
+c          do ic1=ifirstc1-1,ilastc1+1
+c             do ic0=ifirstc0-1,ilastc0+1
+c                write(6,*) "ic0,ic1,ic2,velc = ",
+c    &                       ic0,ic1,ic2,velc(ic0,ic1,ic2,1)
+c             enddo
+c          enddo
+c       enddo
+c       write(6,*) "coarse velocity2 values"
+c       do ic2=ifirstc2-1,ilastc2+1
+c          do ic1=ifirstc1-1,ilastc1+1
+c             do ic0=ifirstc0-1,ilastc0+1
+c                write(6,*) "ic0,ic1,ic2,velc = ",
+c    &                       ic0,ic1,ic2,velc(ic0,ic1,ic2,2)
+c             enddo
+c          enddo
+c       enddo
+c       write(6,*) "coarse pressure values"
+c       do ic2=ifirstc2-1,ilastc2+1
+c          do ic1=ifirstc1-1,ilastc1+1
+c             do ic0=ifirstc0-1,ilastc0+1
+c                write(6,*) "ic0,ic1,ic2,presc = ",
+c    &                       ic0,ic1,ic2,presc(ic0,ic1,ic2)
+c             enddo
+c          enddo
+c       enddo
+c       write(6,*) "fine density values"
+c       do if2=ifirstf2,ilastf2
+c          do if1=ifirstf1,ilastf1
+c             do if0=ifirstf0,ilastf0
+c                write(6,*) "if0,if1,if2,densf = ",
+c    &           if0,if1,if2,densf(if0,if1,if2)
+c             enddo
+c          enddo
+c       enddo
+c       write(6,*) "fine velocity0 values"
+c       do if2=ifirstf2,ilastf2
+c          do if1=ifirstf1,ilastf1
+c             do if0=ifirstf0,ilastf0
+c                write(6,*) "if0,if1,if2,velf = ",
+c    &           if0,if1,if2,velf(if0,if1,if2,0)
+c             enddo
+c          enddo
+c       enddo
+c       write(6,*) "fine velocity1 values"
+c       do if2=ifirstf2,ilastf2
+c          do if1=ifirstf1,ilastf1
+c             do if0=ifirstf0,ilastf0
+c                write(6,*) "if0,if1,if2,velf = ",
+c    &           if0,if1,if2,velf(if0,if1,if2,1)
+c             enddo
+c          enddo
+c       enddo
+c       write(6,*) "fine velocity2 values"
+c       do if2=ifirstf2,ilastf2
+c          do if1=ifirstf1,ilastf1
+c             do if0=ifirstf0,ilastf0
+c                write(6,*) "if0,if1,if2,velf = ",
+c    &           if0,if1,if2,velf(if0,if1,if2,2)
+c             enddo
+c          enddo
+c       enddo
+	stop
+      endif
+c
+      return
+      end
+c
+c
+c***********************************************************************
+c Volume weighted averaging for 3d flux variables.
+c***********************************************************************
+c
+      subroutine conservavg3d(
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  gamma,
+     &  densf,densc,
+     &  velf,presf,
+     &  velc,presc,
+     &  conservf)
+c***********************************************************************
+      implicit none
+      REAL zero,half,one 
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:NDIM-1)
+      REAL
+     &  dxf(0:NDIM-1),
+     &  dxc(0:NDIM-1),
+     &  gamma
+      REAL
+     &  densf(CELL3d(filo,fihi,0)),
+     &  densc(CELL3d(cilo,cihi,0)),
+     &  velf(CELL3d(filo,fihi,0),0:NDIM-1),
+     &  presf(CELL3d(filo,fihi,0))
+      REAL
+     &  velc(CELL3d(cilo,cihi,0),0:NDIM-1),
+     &  presc(CELL3d(cilo,cihi,0))
+      REAL
+     &  conservf(CELL3d(ifirstf,ilastf,0))
+      integer ic0,ic1,ic2,if0,if1,if2,ir0,ir1,ir2,id
+      REAL dVf,dVc,val,valinv,v2norm
+c
+c***********************************************************************
+c
+      dVf = dxf(0)*dxf(1)*dxf(2)
+      dVc = dxc(0)*dxc(1)*dxc(2)
+c
+c construct coarse velocity values using conservative average
+c of momentum
+c
+      do id=0,NDIM-1
+
+         do if2=ifirstf2,ilastf2
+            do if1=ifirstf1,ilastf1
+               do if0=ifirstf0,ilastf0
+                  conservf(if0,if1,if2) = 
+     &            densf(if0,if1,if2)*velf(if0,if1,if2,id)
+               enddo
+            enddo
+         enddo
+
+         do ic2=ifirstc2,ilastc2
+            do ic1=ifirstc1,ilastc1
+               do ic0=ifirstc0,ilastc0
+                  velc(ic0,ic1,ic2,id) = zero
+               enddo
+            enddo
+         enddo
+
+         do ir2=0,ratio(2)-1
+            do ir1=0,ratio(1)-1
+               do ir0=0,ratio(0)-1
+                  do ic2=ifirstc2,ilastc2
+                     if2=ic2*ratio(2)+ir2
+                     do ic1=ifirstc1,ilastc1
+                        if1=ic1*ratio(1)+ir1
+                        do ic0=ifirstc0,ilastc0
+                           if0=ic0*ratio(0)+ir0
+                           velc(ic0,ic1,ic2,id) = velc(ic0,ic1,ic2,id)
+     &                     + conservf(if0,if1,if2)*dVf
+                        enddo
+                     enddo
+                  enddo
+               enddo
+            enddo
+         enddo
+
+         do ic2=ifirstc2,ilastc2
+            do ic1=ifirstc1,ilastc1
+               do ic0=ifirstc0,ilastc0
+                  velc(ic0,ic1,ic2,id) = velc(ic0,ic1,ic2,id)
+     &                                 / (densc(ic0,ic1,ic2)*dVc)
+               enddo
+            enddo
+         enddo
+
+      enddo
+
+c
+c construct coarse velocity values using conservative average
+c of energy
+c
+      val = (gamma-one)
+      valinv = one/(gamma-one)
+
+      do if2=ifirstf2,ilastf2
+         do if1=ifirstf1,ilastf1
+            do if0=ifirstf0,ilastf0
+               v2norm = velf(if0,if1,if2,0)**2
+     &                + velf(if0,if1,if2,1)**2
+     &                + velf(if0,if1,if2,2)**2
+               conservf(if0,if1,if2) = presf(if0,if1,if2)*valinv
+     &                               + half*densf(if0,if1,if2)*v2norm
+            enddo
+         enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            do ic0=ifirstc0,ilastc0
+               presc(ic0,ic1,ic2) = zero
+            enddo
+         enddo
+      enddo
+
+      do ir2=0,ratio(2)-1
+         do ir1=0,ratio(1)-1
+            do ir0=0,ratio(0)-1
+               do ic2=ifirstc2,ilastc2
+                  if2=ic2*ratio(2)+ir2
+                  do ic1=ifirstc1,ilastc1
+                     if1=ic1*ratio(1)+ir1
+                     do ic0=ifirstc0,ilastc0
+                        if0=ic0*ratio(0)+ir0
+                        presc(ic0,ic1,ic2) = presc(ic0,ic1,ic2)
+     &                  + conservf(if0,if1,if2)*dVf
+                     enddo
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            do ic0=ifirstc0,ilastc0
+               v2norm = velc(ic0,ic1,ic2,0)**2
+     &                + velc(ic0,ic1,ic2,1)**2
+     &                + velc(ic0,ic1,ic2,2)**2
+               presc(ic0,ic1,ic2) = ((presc(ic0,ic1,ic2)/dVc)
+     &         - half*densc(ic0,ic1,ic2)*v2norm) * val 
+            enddo
+         enddo
+      enddo
+
+
+c
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/const.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/const.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,18 @@
+      REAL zero,tenth,sixth,fourth,third,half,twothird,
+     &  rt75,one,onept5,two,three,pi,four,seven,smallr
+      parameter (zero=0.d0)
+      parameter (tenth=0.1d0)
+      parameter (sixth=0.16666666666667d0)
+      parameter (fourth=.25d0)
+      parameter (third=.333333333333333d0)
+      parameter (half=.5d0)
+      parameter (twothird=.66666666666667d0)
+      parameter (rt75=.8660254037844d0)
+      parameter (one=1.d0)
+      parameter (onept5=1.5d0)
+      parameter (two=2.d0)
+      parameter (three=3.d0)
+      parameter(pi=3.14159265358979323846d0)
+      parameter (four=4.d0)
+      parameter (seven=7.d0)
+      parameter (smallr=1.0d-32)
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/flaten1d2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/flaten1d2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,3 @@
+define(NEQU,4)dnl
+define(REAL,`double precision')dnl
+include(FORTDIR/flaten2d.i)dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/flaten1d3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/flaten1d3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,3 @@
+define(NEQU,5)dnl
+define(REAL,`double precision')dnl
+include(FORTDIR/flaten3d.i)dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/flaten2d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/flaten2d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,75 @@
+c***********************************************************************
+      subroutine flaten2d(ifirst,ilast,i,mc,idir,
+     &                  tracest,sound,flattn)
+c***********************************************************************
+c Compute "flattn" (flattening coefficient) for cell i
+c description of arguments:
+c   input:
+c     ifirst,ilast,mc  ==> array dimensions 
+c     i                ==> cell index flattn is being computed on
+c     idir             ==> coordinate direction
+c     tracest          ==> array of traced states
+c     sound            ==> array of sound speeds
+c   output:
+c     flattn   ==> flattening coefficient
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      integer ifirst,ilast,i,mc,idir
+      REAL tracest(ifirst-FACEG:ifirst+mc+FACEG,NEQU)
+      REAL  sound(ifirst-CELLG:ifirst+mc-1+CELLG)
+      REAL flat2(3)
+      REAL flattn
+
+      REAL shktst, zcut1, zcut2, dzcut, smallp
+      REAL denom, zeta, tst, tmp, dp,zi
+      REAL rhoc1,rhoc2,chi
+      integer j,ii
+c
+c***********************************************************************
+c
+      shktst =0.33d0
+      zcut1 =0.75d0
+      zcut2 =0.85d0
+      smallp =1.0d-6
+      dzcut = one/(zcut2-zcut1)
+      
+      flattn = one 
+
+c
+c  Leave flattn = 1. at bounds.
+c
+       if ((i.lt.ifirst-1) .or. (i.gt.ilast+1)) return
+c
+c  Compute "flat2" at i-1,i,i+1
+c
+      do j=1,3
+         ii = (i-2) + j  
+         dp = tracest(ii+1,NEQU) - tracest(ii-1,NEQU)
+         denom = max(smallp,abs(tracest(ii+2,NEQU)-tracest(ii-2,NEQU)))
+         zeta = abs(dp)/denom
+         zi = min( one, max( zero, dzcut*(zeta - zcut1) ) )
+         if ((tracest(ii-1,idir+2) - tracest(ii+1,idir+2)).gt.zero) then
+            tst = one
+         else 
+            tst = zero
+         endif
+         rhoc1 = tracest(ii+1,1)*sound(ii+1)**2
+         rhoc2 = tracest(ii-1,1)*sound(ii-1)**2
+         tmp = min(rhoc1,rhoc2)
+         if ((abs(dp)/tmp).gt.shktst) then
+            chi = tst
+         else 
+            chi = zero
+         endif
+         flat2(j) = chi*zi
+      enddo
+c
+c  Compute "flattn" at cell i, using flat2 at i-1,i,i+1
+c
+      flattn = one - max(flat2(1),flat2(2),flat2(3))
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/flaten3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/flaten3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,75 @@
+c***********************************************************************
+      subroutine flaten3d(ifirst,ilast,i,mc,idir,
+     &                  tracest,sound,flattn)
+c***********************************************************************
+c Compute "flattn" (flattening coefficient) for cell i
+c description of arguments:
+c   input:
+c     ifirst,ilast,mc  ==> array dimensions 
+c     i                ==> cell index flattn is being computed on
+c     idir             ==> coordinate direction
+c     tracest          ==> array of traced states
+c     sound            ==> array of sound speeds
+c   output:
+c     flattn   ==> flattening coefficient
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      integer ifirst,ilast,i,mc,idir
+      REAL tracest(ifirst-FACEG:ifirst+mc+FACEG,NEQU)
+      REAL  sound(ifirst-CELLG:ifirst+mc-1+CELLG)
+      REAL flat2(3)
+      REAL flattn
+
+      REAL shktst, zcut1, zcut2, dzcut, smallp
+      REAL denom, zeta, tst, tmp, dp,zi
+      REAL rhoc1,rhoc2,chi
+      integer j,ii
+c
+c***********************************************************************
+c
+      shktst =0.33d0
+      zcut1 =0.75d0
+      zcut2 =0.85d0
+      smallp =1.0d-6
+      dzcut = one/(zcut2-zcut1)
+      
+      flattn = one 
+
+c
+c  Leave flattn = 1. at bounds.
+c
+       if ((i.lt.ifirst-1) .or. (i.gt.ilast+1)) return
+c
+c  Compute "flat2" at i-1,i,i+1
+c
+      do j=1,3
+         ii = (i-2) + j  
+         dp = tracest(ii+1,NEQU) - tracest(ii-1,NEQU)
+         denom = max(smallp,abs(tracest(ii+2,NEQU)-tracest(ii-2,NEQU)))
+         zeta = abs(dp)/denom
+         zi = min( one, max( zero, dzcut*(zeta - zcut1) ) )
+         if ((tracest(ii-1,idir+2) - tracest(ii+1,idir+2)).gt.zero) then
+            tst = one
+         else 
+            tst = zero
+         endif
+         rhoc1 = tracest(ii+1,1)*sound(ii+1)**2
+         rhoc2 = tracest(ii-1,1)*sound(ii-1)**2
+         tmp = min(rhoc1,rhoc2)
+         if ((abs(dp)/tmp).gt.shktst) then
+            chi = tst
+         else 
+            chi = zero
+         endif
+         flat2(j) = chi*zi
+      enddo
+c
+c  Compute "flattn" at cell i, using flat2 at i-1,i,i+1
+c
+      flattn = one - max(flat2(1),flat2(2),flat2(3))
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/flux2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/flux2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,277 @@
+define(NDIM,2)dnl
+define(NEQU,4)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+include(FORTDIR/m4flux2d.i)dnl
+
+      subroutine fluxcorrec(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  dx,
+     &  gamma,density,velocity,pressure,
+     &  flux0,flux1,
+     &  trlft0,trlft1,
+     &  trrgt0,trrgt1)
+c***********************************************************************
+      implicit none 
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      REAL dt 
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     density(CELL2d(ifirst,ilast,CELLG)),
+     &     velocity(CELL2d(ifirst,ilast,CELLG),0:NDIM-1),
+     &     pressure(CELL2d(ifirst,ilast,CELLG)),
+     &     flux0(FACE2d0(ifirst,ilast,FLUXG),NEQU),
+     &     flux1(FACE2d1(ifirst,ilast,FLUXG),NEQU),
+     &     trlft0(FACE2d0(ifirst,ilast,FACEG),NEQU),
+     &     trrgt0(FACE2d0(ifirst,ilast,FACEG),NEQU),
+     &     trlft1(FACE2d1(ifirst,ilast,FACEG),NEQU),
+     &     trrgt1(FACE2d1(ifirst,ilast,FACEG),NEQU)
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,k
+      REAL trnsvers(NEQU)
+c     REAL ttvlft(NEQU),ttvrgt(NEQU)     
+      REAL ttv(NEQU)
+      REAL v2norm,rho,vel1,vel0,gamma,
+     &     gam_min_one
+     
+c     write(6,*) "In fluxcorrec()"
+      if (FLUXG.lt.1) then
+         write(6,*) "flux ghosts < 1!"
+c         call flush(6)
+	stop
+      endif
+c     ******************************************************************
+c     * complete tracing at cell edges
+c     ******************************************************************
+      gam_min_one = gamma-one
+c   correct the 1-direction with 0-fluxes
+c     write(6,*) " correct the 1-direction with 0-fluxes"
+      do ic1=ifirst1-(FLUXG),ilast1+(FLUXG)
+        do ic0=ifirst0-(FLUXG-1),ilast0+(FLUXG-1)
+          rho  = density(ic0,ic1)
+          vel0 = velocity(ic0,ic1,0)
+          vel1 = velocity(ic0,ic1,1)
+          v2norm= vel1**2 +vel0**2
+          do k=1,NEQU
+            trnsvers(k)=
+     &        (flux0(ic0+1,ic1,k)-flux0(ic0,ic1,k))*half/dx(0)
+          enddo
+
+          ttv(1)= trnsvers(1) 
+          ttv(2)= (trnsvers(2) - vel0*trnsvers(1))/rho
+          ttv(3)= (trnsvers(3) - vel1*trnsvers(1))/rho
+          ttv(NEQU)= (v2norm*half*trnsvers(1) -
+     &             vel0*trnsvers(2) - vel1*trnsvers(3) +
+     &             trnsvers(NEQU))*gam_min_one
+          do k=1,NEQU
+            trrgt1(ic1  ,ic0,k)= trrgt1(ic1  ,ic0,k) - ttv(k)
+            trlft1(ic1+1,ic0,k)= trlft1(ic1+1,ic0,k) - ttv(k)
+          enddo
+          trrgt1(ic1  ,ic0,NEQU) = max(smallr,trrgt1(ic1  ,ic0,NEQU))
+          trlft1(ic1+1,ic0,NEQU) = max(smallr,trlft1(ic1+1,ic0,NEQU))
+        enddo
+      enddo
+c     call flush(6)     
+
+c   correct the 0-direction with 1-fluxes
+c     write(6,*) " correct the 0-direction with 1-fluxes"
+      do ic0=ifirst0-(FLUXG),ilast0+(FLUXG)
+        do ic1=ifirst1-(FLUXG-1),ilast1+(FLUXG-1)
+          rho  = density(ic0,ic1)
+          vel0 = velocity(ic0,ic1,0)
+          vel1 = velocity(ic0,ic1,1)
+          v2norm= vel1**2 +vel0**2
+          do k=1,NEQU
+            trnsvers(k)=
+     &        (flux1(ic1+1,ic0,k)-flux1(ic1,ic0,k))*half/dx(1)
+          enddo
+c         write(6,*) "   flux1(",ic1+1,ic0,")= ",flux1(ic1+1,ic0,1),
+c    &      flux1(ic1+1,ic0,2),flux1(ic1+1,ic0,3),flux1(ic1+1,ic0,4)
+c         write(6,*) "   flux1(",ic1,ic0,")= ",flux1(ic1,ic0,1),
+c    &      flux1(ic1,ic0,2),flux1(ic1,ic0,3),flux1(ic1,ic0,4)
+c      
+          ttv(1)= trnsvers(1)
+          ttv(2)= (trnsvers(2) - vel0*trnsvers(1))/rho
+          ttv(3)= (trnsvers(3) - vel1*trnsvers(1))/rho
+          ttv(NEQU)= (v2norm*half*trnsvers(1) -
+     &             vel0*trnsvers(2) - vel1*trnsvers(3) +
+     &             trnsvers(NEQU))*gam_min_one
+c         write(6,*) " old trrgt0(",ic0,ic1,"=",trrgt0(ic0,ic1,1),
+c    &               trrgt0(ic0,ic1,2),trrgt0(ic0,ic1,3),
+c    &               trrgt0(ic0,ic1,4) 
+c         write(6,*) " old trlft0(",ic0+1,ic1,"=",trlft0(ic0+1,ic1,1),
+c    &               trlft0(ic0+1,ic1,2),trlft0(ic0+1,ic1,3),
+c    &               trlft0(ic0+1,ic1,4) 
+          do k=1,NEQU
+            trrgt0(ic0  ,ic1,k)= trrgt0(ic0  ,ic1,k) - ttv(k)
+            trlft0(ic0+1,ic1,k)= trlft0(ic0+1,ic1,k) - ttv(k)
+          enddo
+          trrgt0(ic0  ,ic1,NEQU) = max(smallr,trrgt0(ic0  ,ic1,NEQU))
+          trlft0(ic0+1,ic1,NEQU) = max(smallr,trlft0(ic0+1,ic1,NEQU))
+c         write(6,*) " new trrgt0(",ic0,ic1,"=",trrgt0(ic0,ic1,1),
+c    &               trrgt0(ic0,ic1,2),trrgt0(ic0,ic1,3),
+c    &               trrgt0(ic0,ic1,4) 
+c         write(6,*) " new trlft0(",ic0+1,ic1,"=",trlft0(ic0+1,ic1,1),
+c    &               trlft0(ic0+1,ic1,2),trlft0(ic0+1,ic1,3),
+c    &               trlft0(ic0+1,ic1,4) 
+        enddo
+      enddo
+c      call flush(6)     
+      return
+      end   
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine fluxcalculation2d(dt,extra_cell,visco,dx,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  gamma,rpchoice,
+     &  density,velocity,pressure,
+     &  flux0,flux1,
+     &  trlft0,trlft1,trrgt0,trrgt1)
+     
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer extra_cell,visco,rpchoice
+      REAL dt,dx(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     density(CELL2d(ifirst,ilast,CELLG)),
+     &     velocity(CELL2d(ifirst,ilast,CELLG),NDIM),
+     &     pressure(CELL2d(ifirst,ilast,CELLG))
+c variables in 2d side indexed         
+      REAL
+     &     flux0(FACE2d0(ifirst,ilast,FLUXG),NEQU),
+     &     flux1(FACE2d1(ifirst,ilast,FLUXG),NEQU), 
+     &     trlft0(FACE2d0(ifirst,ilast,FACEG),NEQU),
+     &     trrgt0(FACE2d0(ifirst,ilast,FACEG),NEQU),
+     &     trlft1(FACE2d1(ifirst,ilast,FACEG),NEQU),
+     &     trrgt1(FACE2d1(ifirst,ilast,FACEG),NEQU)
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ie0,ie1,j
+      REAL   stateL(NEQU),stateR(NEQU),
+     &       riemst(NEQU),gamma
+      REAL mom0,mom1,Hent,v2norm,vel_tan
+      REAL mom0L,mom1L,enerL,mom0R,mom1R,enerR
+      REAL maxeig, vcoef,vcorr(NEQU),gam_min_one
+c
+c variables for hllc scheme
+      REAL aLsq,aRsq,keL,keR,flux(NEQU),diff(NEQU)
+      REAL mfL,mfR,star(NEQU),sL,sM,sR
+      REAL w,omw,hat(NEQU+1),denom
+c
+      if (FLUXG.lt.1) then
+         write(6,*) "flux ghosts < 1!" 
+c         call flush(6)
+	stop
+      endif
+c
+c***********************************************************************
+c solve riemann problems for conservative flux
+c  arguments: ( axis for RP, other axis, extra cells-direction)
+c***********************************************************************
+c      
+c     write(6,*) "In fluxcalculation2d(",extra_cell,")"
+c     write(6,*) "ifirst0,ilast0,ifirst1,ilast1,extra_cell",
+c    &       ifirst0,ilast0,ifirst1,ilast1,extra_cell
+      gam_min_one = gamma-one
+riemann_solve(0,1,(extra_cell+(FLUXG-1)))dnl
+c
+riemann_solve(1,0,(extra_cell+(FLUXG-1)))dnl
+
+      if (visco.eq.1) then
+      write(6,*) "doing artificial viscosity"
+c
+artificial_viscosity1(0,1)dnl
+c
+artificial_viscosity1(1,0)dnl
+c
+      endif
+c      call flush(6)     
+      return
+      end 
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+  
+      subroutine consdiff2d(ifirst0,ilast0,ifirst1,ilast1,dx,
+     &  flux0,flux1,
+     &  gamma,density,velocity,pressure)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+      integer ifirst0, ilast0,ifirst1, ilast1
+      REAL dx(0:NDIM-1)
+      REAL
+     &     flux0(FACE2d0(ifirst,ilast,FLUXG),NEQU),
+     &     flux1(FACE2d1(ifirst,ilast,FLUXG),NEQU),
+     &     gamma,
+     &     density(CELL2d(ifirst,ilast,CELLG)),
+     &     velocity(CELL2d(ifirst,ilast,CELLG),NDIM),
+     &     pressure(CELL2d(ifirst,ilast,CELLG))
+c
+      integer ic0,ic1,k
+      REAL temp,v2norm,mom(NDIM),energy,
+     &     gam_min_one
+      
+c***********************************************************************
+c update conserved variables to full time
+c note the permutation of indices in 2nd coordinate direction
+c***********************************************************************
+      gam_min_one = gamma-one 
+
+      do ic1=ifirst1,ilast1
+        do ic0=ifirst0,ilast0
+          mom(1) = density(ic0,ic1)*velocity(ic0,ic1,1)
+          mom(2) = density(ic0,ic1)*velocity(ic0,ic1,2)
+          v2norm = (velocity(ic0,ic1,1)**2+velocity(ic0,ic1,2)**2)
+          energy = pressure(ic0,ic1)/gam_min_one +
+     &                        half*density(ic0,ic1)*v2norm
+ 
+          density(ic0,ic1) = density(ic0,ic1)
+     &          -(flux0(ic0+1,ic1,1)-flux0(ic0,ic1,1))/dx(0)
+     &          -(flux1(ic1+1,ic0,1)-flux1(ic1,ic0,1))/dx(1)
+          density(ic0,ic1) = max(smallr,density(ic0,ic1))
+          do k=1,NDIM
+            mom(k) = mom(k)
+     &        -(flux0(ic0+1,ic1,k+1)-flux0(ic0,ic1,k+1))/dx(0)
+     &        -(flux1(ic1+1,ic0,k+1)-flux1(ic1,ic0,k+1))/dx(1)
+            velocity(ic0,ic1,k) = mom(k)/density(ic0,ic1)
+          enddo
+          energy = energy
+     &       -(flux0(ic0+1,ic1,NEQU)-flux0(ic0,ic1,NEQU))/dx(0)
+     &       -(flux1(ic1+1,ic0,NEQU)-flux1(ic1,ic0,NEQU))/dx(1)
+c      
+          v2norm = (velocity(ic0,ic1,1)**2+velocity(ic0,ic1,2)**2)
+          temp = energy - half*density(ic0,ic1)*v2norm
+          pressure(ic0,ic1) = gam_min_one*temp
+          pressure(ic0,ic1) = max(smallr,pressure(ic0,ic1))
+        enddo
+      enddo
+c
+      return
+      end
+c***********************************************************************
+include(FORTDIR/gas1d_approxrp2d.i)dnl
+include(FORTDIR/gas1d_exactrp2d.i)dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/flux3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/flux3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,336 @@
+define(NDIM,3)dnl
+define(NEQU,5)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+include(FORTDIR/m4flux3d.i)dnl
+
+      subroutine fluxcorrec2d(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  dx,gamma,idir,
+     &  density,velocity,pressure,
+     &  flux0,flux1,flux2,
+     &  tracelft0,tracelft1,tracelft2,
+     &  tracergt0,tracergt1,tracergt2,
+     &  ttracelft0,ttracelft1,ttracelft2,
+     &  ttracergt0,ttracergt1,ttracergt2)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL dt 
+      integer idir
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     gamma,
+     &     density(CELL3d(ifirst,ilast,CELLG)),
+     &     velocity(CELL3d(ifirst,ilast,CELLG),0:NDIM-1),
+     &     pressure(CELL3d(ifirst,ilast,CELLG)),
+c
+     &     flux0(FACE3d0(ifirst,ilast,FLUXG),NEQU), 
+     &     flux1(FACE3d1(ifirst,ilast,FLUXG),NEQU), 
+     &     flux2(FACE3d2(ifirst,ilast,FLUXG),NEQU), 
+c
+     &     tracelft0(FACE3d0(ifirst,ilast,FACEG),NEQU),
+     &     tracelft1(FACE3d1(ifirst,ilast,FACEG),NEQU),
+     &     tracelft2(FACE3d2(ifirst,ilast,FACEG),NEQU),
+     &     tracergt0(FACE3d0(ifirst,ilast,FACEG),NEQU),
+     &     tracergt1(FACE3d1(ifirst,ilast,FACEG),NEQU),
+     &     tracergt2(FACE3d2(ifirst,ilast,FACEG),NEQU),
+c
+     &     ttracelft0(FACE3d0(ifirst,ilast,FACEG),NEQU),
+     &     ttracelft1(FACE3d1(ifirst,ilast,FACEG),NEQU),
+     &     ttracelft2(FACE3d2(ifirst,ilast,FACEG),NEQU),
+     &     ttracergt0(FACE3d0(ifirst,ilast,FACEG),NEQU),
+     &     ttracergt1(FACE3d1(ifirst,ilast,FACEG),NEQU),
+     &     ttracergt2(FACE3d2(ifirst,ilast,FACEG),NEQU)
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2,k
+      REAL trnsvers(NEQU)
+c     REAL ttvlft(NEQU),ttvrgt(NEQU)     
+      REAL ttv(NEQU)
+      REAL v2norm,rho,vel1,vel2,vel0,gam_min_one
+c     write(6,*) "In fluxcorrec2d()"
+      if (FLUXG.lt.1) then
+         write(6,*) "flux ghosts < 1!"
+	 stop
+      endif
+c    
+      gam_min_one = gamma - one
+c
+c  "Forward" computation of transverse flux terms
+c
+      if (idir.eq.1) then
+c
+correc_flux2d(0,`ic1,ic2',1,`ic2,ic0',2)dnl
+c
+correc_flux2d(1,`ic2,ic0',0,`ic1,ic2',2)dnl
+c
+correc_flux2d(2,`ic0,ic1',0,`ic1,ic2',1)dnl
+c
+c  "Backward" computation of transverse flux terms
+c
+      elseif (idir.eq.-1) then
+c
+correc_flux2d(0,`ic1,ic2',2,`ic0,ic1',1)dnl
+c
+correc_flux2d(1,`ic2,ic0',2,`ic0,ic1',0)dnl
+c
+correc_flux2d(2,`ic0,ic1',1,`ic2,ic0',0)dnl
+c
+      endif
+c
+      return
+      end   
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine fluxcorrec3d(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  dx,
+     &  gamma,density,velocity,pressure,
+     &  fluxa0,fluxa1,fluxa2,
+     &  fluxb0,fluxb1,fluxb2,
+     &  tracelft0,tracelft1,tracelft2,
+     &  tracergt0,tracergt1,tracergt2)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL dt 
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     gamma,
+     &     density(CELL3d(ifirst,ilast,CELLG)),
+     &     velocity(CELL3d(ifirst,ilast,CELLG),0:NDIM-1),
+     &     pressure(CELL3d(ifirst,ilast,CELLG)),
+     &     fluxa0(FACE3d0(ifirst,ilast,FLUXG),NEQU),
+     &     fluxa1(FACE3d1(ifirst,ilast,FLUXG),NEQU), 
+     &     fluxa2(FACE3d2(ifirst,ilast,FLUXG),NEQU), 
+     &     fluxb0(FACE3d0(ifirst,ilast,FLUXG),NEQU),
+     &     fluxb1(FACE3d1(ifirst,ilast,FLUXG),NEQU), 
+     &     fluxb2(FACE3d2(ifirst,ilast,FLUXG),NEQU), 
+     &     tracelft0(FACE3d0(ifirst,ilast,FACEG),NEQU),
+     &     tracergt0(FACE3d0(ifirst,ilast,FACEG),NEQU),
+     &     tracelft1(FACE3d1(ifirst,ilast,FACEG),NEQU),
+     &     tracergt1(FACE3d1(ifirst,ilast,FACEG),NEQU),
+     &     tracelft2(FACE3d2(ifirst,ilast,FACEG),NEQU),
+     &     tracergt2(FACE3d2(ifirst,ilast,FACEG),NEQU)
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2,k
+      REAL trnsvers(NEQU)
+c     REAL ttvlft(NEQU),ttvrgt(NEQU)     
+      REAL ttv(NEQU)
+      REAL v2norm,rho,vel1,vel2,vel0,gam_min_one 
+c
+      if (FLUXG.lt.1) then
+         write(6,*) "flux ghosts < 1!"
+	 stop
+      endif
+     
+c     ******************************************************************
+c     * complete tracing at cell edges
+c     ******************************************************************
+      gam_min_one = gamma - one
+c         
+correc_flux3d(2,0,1,a0,a1,`ic1,ic2',`ic2,ic0')dnl
+c         
+correc_flux3d(1,2,0,a2,b0,`ic0,ic1',`ic1,ic2')dnl
+c         
+correc_flux3d(0,1,2,b1,b2,`ic2,ic0',`ic0,ic1')dnl
+c   
+      return
+      end   
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine fluxcalculation3d(dt,xcell0,xcell1,visco,dx,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  gamma,rpchoice,
+     &  density,velocity,pressure,
+     &  flux0,flux1,flux2,
+     &  trlft0,trlft1,trlft2,
+     &  trrgt0,trrgt1,trrgt2)
+     
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer xcell0,xcell1,visco,rpchoice
+      REAL dt,dx(0:NDIM-1),gamma 
+c variables in 2d cell indexed         
+      REAL
+     &     density(CELL3d(ifirst,ilast,CELLG)),
+     &     velocity(CELL3d(ifirst,ilast,CELLG),NDIM),
+     &     pressure(CELL3d(ifirst,ilast,CELLG))
+c variables in 2d side indexed         
+      REAL
+     &     flux0(FACE3d0(ifirst,ilast,FLUXG),NEQU),
+     &     flux1(FACE3d1(ifirst,ilast,FLUXG),NEQU), 
+     &     flux2(FACE3d2(ifirst,ilast,FLUXG),NEQU), 
+     &     trlft0(FACE3d0(ifirst,ilast,FACEG),NEQU),
+     &     trrgt0(FACE3d0(ifirst,ilast,FACEG),NEQU),
+     &     trlft1(FACE3d1(ifirst,ilast,FACEG),NEQU),
+     &     trrgt1(FACE3d1(ifirst,ilast,FACEG),NEQU),
+     &     trlft2(FACE3d2(ifirst,ilast,FACEG),NEQU),
+     &     trrgt2(FACE3d2(ifirst,ilast,FACEG),NEQU)
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2,ie0,ie1,ie2,j
+      REAL   stateL(NEQU),stateR(NEQU),
+     &       riemst(NEQU)
+      REAL mom0,mom1,mom2,Hent,v2norm,vel(0:NDIM-1)
+      REAL mom0L,mom1L,mom2L,enerL,mom0R,mom1R,mom2R,enerR
+      REAL maxeig, vcoef,vcorr(NEQU),gam_min_one
+c
+c variables for hllc scheme
+      REAL aLsq,aRsq,keL,keR,flux(NEQU),diff(NEQU)
+      REAL mfL,mfR,star(NEQU),sL,sM,sR
+      REAL w,omw,hat(NEQU+1),denom
+c
+      if (FLUXG.lt.1) then
+         write(6,*) "flux ghosts < 1!"
+	stop
+      endif
+c
+c***********************************************************************
+c solve riemann problems for conservative flux
+c  arguments: ( axis for RP, other axis, extra cells-direction)
+c***********************************************************************
+c      
+      gam_min_one = gamma-one
+
+c     write(6,*) "in fluxcalculation3d..."
+c     write(6,*) "ifirst = ",ifirst0,ifirst1,ifirst2
+c     write(6,*) "ilast = ",ilast0,ilast1,ilast2
+c     write(6,*) "xcell0,xcell1 = ",xcell0,xcell1
+c     write(6,*) "visco = ",visco
+c     write(6,*) "gamma = ",gamma
+c     write(6,*) "rpchoice = ",rpchoice
+c     write(6,*) "gam_min_one = ",gam_min_one
+c     call flush(6)
+riemann_solve(0,1,2,`ic1,ic2',(xcell0+FLUXG-1),(xcell1+FLUXG-1))dnl
+
+c
+riemann_solve(1,0,2,`ic2,ic0',(xcell0+FLUXG-1),(xcell1+FLUXG-1))dnl
+
+c
+riemann_solve(2,0,1,`ic0,ic1',(xcell0+FLUXG-1),(xcell1+FLUXG-1))dnl
+
+      if (visco.eq.1) then
+c     write(6,*) "doing artificial viscosity"
+c
+artificial_viscosity1(0,1,2)dnl
+c
+artificial_viscosity1(1,2,0)dnl
+c
+artificial_viscosity1(2,0,1)dnl
+c
+      endif
+      return
+      end 
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+  
+      subroutine consdiff3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  dx,
+     &  flux0,flux1,flux2,
+     &  gamma,density,velocity,pressure)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+      integer ifirst0, ilast0,ifirst1, ilast1,ifirst2,ilast2
+      REAL dx(0:NDIM-1)
+      REAL
+     &     flux0(FACE3d0(ifirst,ilast,FLUXG),NEQU),
+     &     flux1(FACE3d1(ifirst,ilast,FLUXG),NEQU),
+     &     flux2(FACE3d2(ifirst,ilast,FLUXG),NEQU),
+     &     gamma,
+     &     density(CELL3d(ifirst,ilast,CELLG)),
+     &     velocity(CELL3d(ifirst,ilast,CELLG),NDIM),
+     &     pressure(CELL3d(ifirst,ilast,CELLG))
+c
+      integer ic0,ic1,ic2,k
+      REAL temp,v2norm,mom(NDIM),energy,
+     &     gam_min_one
+      
+c***********************************************************************
+c update conserved to full time
+c note the permutation of indices in 2nd, 3rd coordinate directions
+c***********************************************************************
+      gam_min_one = gamma - one
+
+      do ic2=ifirst2,ilast2
+         do ic1=ifirst1,ilast1
+           do ic0=ifirst0,ilast0
+             mom(1) = density(ic0,ic1,ic2)*velocity(ic0,ic1,ic2,1)
+             mom(2) = density(ic0,ic1,ic2)*velocity(ic0,ic1,ic2,2)
+             mom(3) = density(ic0,ic1,ic2)*velocity(ic0,ic1,ic2,3)
+             v2norm = (velocity(ic0,ic1,ic2,1)**2+
+     &                 velocity(ic0,ic1,ic2,2)**2+
+     &                 velocity(ic0,ic1,ic2,3)**2)
+             energy = pressure(ic0,ic1,ic2)/gam_min_one +
+     &                        half*density(ic0,ic1,ic2)*v2norm
+ 
+             density(ic0,ic1,ic2) = density(ic0,ic1,ic2)
+     &          -(flux0(ic0+1,ic1,ic2,1)-flux0(ic0,ic1,ic2,1))/dx(0)
+     &          -(flux1(ic1+1,ic2,ic0,1)-flux1(ic1,ic2,ic0,1))/dx(1)
+     &          -(flux2(ic2+1,ic0,ic1,1)-flux2(ic2,ic0,ic1,1))/dx(2)
+             density(ic0,ic1,ic2) = max(smallr,density(ic0,ic1,ic2))
+
+             do k=1,3
+               mom(k) = mom(k)
+     &          -(flux0(ic0+1,ic1,ic2,k+1)-flux0(ic0,ic1,ic2,k+1))/dx(0)
+     &          -(flux1(ic1+1,ic2,ic0,k+1)-flux1(ic1,ic2,ic0,k+1))/dx(1)
+     &          -(flux2(ic2+1,ic0,ic1,k+1)-flux2(ic2,ic0,ic1,k+1))/dx(2)
+               velocity(ic0,ic1,ic2,k) = mom(k)/density(ic0,ic1,ic2)
+             enddo
+             energy = energy
+     &        -(flux0(ic0+1,ic1,ic2,NEQU)-flux0(ic0,ic1,ic2,NEQU))/dx(0)
+     &        -(flux1(ic1+1,ic2,ic0,NEQU)-flux1(ic1,ic2,ic0,NEQU))/dx(1)
+     &        -(flux2(ic2+1,ic0,ic1,NEQU)-flux2(ic2,ic0,ic1,NEQU))/dx(2)
+c      
+             v2norm = (velocity(ic0,ic1,ic2,1)**2+
+     &            velocity(ic0,ic1,ic2,2)**2+velocity(ic0,ic1,ic2,3)**2)
+             temp = energy - half*density(ic0,ic1,ic2)*v2norm
+             pressure(ic0,ic1,ic2) = gam_min_one*temp
+             pressure(ic0,ic1,ic2) = max(smallr,pressure(ic0,ic1,ic2))
+           enddo
+         enddo
+      enddo
+c
+      return
+      end
+c***********************************************************************
+include(FORTDIR/gas1d_approxrp3d.i)dnl
+include(FORTDIR/gas1d_exactrp3d.i)dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/fluxcorner3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/fluxcorner3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,215 @@
+define(NDIM,3)dnl
+define(NEQU,5)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+include(FORTDIR/m4fluxcorner3d.i)dnl
+
+      subroutine onethirdstate(dt,dx,idir,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  gamma,density,velocity,pressure,
+     &  flux0,flux1,flux2,
+     &  st3)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************     
+c input arrays:
+      integer idir,ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL dt 
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:NDIM-1), gamma
+c variables in 3d cell indexed         
+      REAL
+     &     density(CELL3d(ifirst,ilast,CELLG)),
+     &     velocity(CELL3d(ifirst,ilast,CELLG),0:NDIM-1),
+     &     pressure(CELL3d(ifirst,ilast,CELLG)),
+     &     flux0(FACE3d0(ifirst,ilast,FLUXG),NEQU),
+     &     flux1(FACE3d1(ifirst,ilast,FLUXG),NEQU),
+     &     flux2(FACE3d2(ifirst,ilast,FLUXG),NEQU),
+     &     st3(CELL3d(ifirst,ilast,CELLG),NEQU)
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2,k
+      REAL trnsvers(NEQU)
+c     REAL ttvlft(NEQU),ttvrgt(NEQU)     
+      REAL ttv(NEQU)
+      REAL v2norm,rho,vel1,vel2,vel0,pres,
+     &     gam_min_one
+c
+      if (FLUXG.lt.1) then
+         write(6,*) "flux ghosts < 1!"
+	stop
+      endif
+     
+c     ******************************************************************
+c     * complete tracing at cell edges
+c     ******************************************************************
+      gam_min_one = gamma - one
+c
+      if (idir.eq.0) then
+c         
+st_third(0,1,2,`ic1,ic2')dnl
+c
+      elseif (idir.eq.1) then
+c         
+st_third(1,2,0,`ic2,ic0')dnl
+c
+      elseif (idir.eq.2) then
+c         
+st_third(2,0,1,`ic0,ic1')dnl
+c
+      endif
+      return
+      end   
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine fluxthird(dt,dx,idir,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  gamma,rpchoice,
+     &  density,velocity,pressure,
+     &  st3,
+     &  flux0,flux1,flux2 )
+     
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer idir,ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL dt,dx(0:NDIM-1),gamma 
+      integer rpchoice
+      REAL
+     &     density(CELL3d(ifirst,ilast,CELLG)),
+     &     velocity(CELL3d(ifirst,ilast,CELLG),0:NDIM-1),
+     &     pressure(CELL3d(ifirst,ilast,CELLG))
+c variables in 2d side indexed         
+      REAL
+     &     flux0(FACE3d0(ifirst,ilast,FLUXG),NEQU),
+     &     flux1(FACE3d1(ifirst,ilast,FLUXG),NEQU),
+     &     flux2(FACE3d2(ifirst,ilast,FLUXG),NEQU),
+     &     st3(CELL3d(ifirst,ilast,CELLG),NEQU)
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2
+      REAL   stateL(4),stateR(4),
+     &       riemst(4)
+      REAL mom2,mom1,mom0,Hent,v2norm,vel(0:3-1),
+     &     gam_min_one
+c
+      if (FLUXG.lt.1) then
+         write(6,*) "flux ghosts < 1!"
+	stop
+      endif
+c
+c***********************************************************************
+c solve riemann problems for conservative flux
+c  arguments: ( axis for RP, other axis, extra cells-direction)
+c***********************************************************************
+c      
+      gam_min_one = gamma - one
+c
+      if (idir.eq.0) then
+c
+f_third(1,0,2,`ic2,ic0',`ic0,ic1-1,ic2')dnl
+c
+f_third(2,0,1,`ic0,ic1',`ic0,ic1,ic2-1')dnl
+c
+      elseif (idir.eq.1) then
+c
+f_third(0,1,2,`ic1,ic2',`ic0-1,ic1,ic2')dnl
+c
+f_third(2,1,0,`ic0,ic1',`ic0,ic1,ic2-1')dnl
+c
+      elseif (idir.eq.2) then
+c
+f_third(1,2,0,`ic2,ic0',`ic0,ic1-1,ic2')dnl
+c
+f_third(0,2,1,`ic1,ic2',`ic0-1,ic1,ic2')dnl
+c
+      endif
+c
+      return
+      end 
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine fluxcorrecjt(dt,dx,idir,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  gamma,density,velocity,pressure,
+     &  flux0,flux1,flux2,
+     &  tracelft0,tracelft1,tracelft2,
+     &  tracergt0,tracergt1,tracergt2)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer idir,ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL dt 
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:3-1)
+c variables in 2d cell indexed         
+      REAL
+     &     density(CELL3d(ifirst,ilast,CELLG)),
+     &     velocity(CELL3d(ifirst,ilast,CELLG),0:NDIM-1),
+     &     pressure(CELL3d(ifirst,ilast,CELLG)),
+     &     flux0(FACE3d0(ifirst,ilast,FLUXG),NEQU),
+     &     flux1(FACE3d1(ifirst,ilast,FLUXG),NEQU),
+     &     flux2(FACE3d2(ifirst,ilast,FLUXG),NEQU),
+     &     tracelft0(FACE3d0(ifirst,ilast,FACEG),NEQU),
+     &     tracergt0(FACE3d0(ifirst,ilast,FACEG),NEQU),
+     &     tracelft1(FACE3d1(ifirst,ilast,FACEG),NEQU),
+     &     tracergt1(FACE3d1(ifirst,ilast,FACEG),NEQU),
+     &     tracelft2(FACE3d2(ifirst,ilast,FACEG),NEQU),
+     &     tracergt2(FACE3d2(ifirst,ilast,FACEG),NEQU)
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2,k
+      REAL trnsvers(NEQU)
+c     REAL ttvlft(NEQU),ttvrgt(NEQU)     
+      REAL ttv(NEQU)
+      REAL v2norm,rho,vel1,vel2,vel0,gamma,
+     &     gam_min_one
+c
+      if (FLUXG.lt.1) then
+         write(6,*) "flux ghosts < 1!"
+	stop
+      endif
+     
+c     ******************************************************************
+c     * complete tracing at cell edges
+c     ******************************************************************
+      gam_min_one = gamma - one
+c
+      if (idir.eq.0) then
+c
+correc_fluxjt(0,2,1,`ic2,ic0',`ic0,ic1')dnl
+c
+      elseif (idir.eq.1) then
+c
+correc_fluxjt(1,0,2,`ic0,ic1',`ic1,ic2')dnl
+c
+      elseif (idir.eq.2) then
+c
+correc_fluxjt(2,1,0,`ic1,ic2',`ic2,ic0')dnl
+c
+      endif
+c
+      return
+      end   
+c
+c***********************************************************************
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/gas1d_approxrp2d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/gas1d_approxrp2d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,114 @@
+      subroutine gas1dapproxrp2d(eosgam,wleft,wright, striem)
+c***********************************************************************
+c description of arguments:
+c   input:
+c     eosgam ==> ratio of specific heats
+c     wleft  ==> left state
+c     wright ==> right state
+c                components ordered: density, vn, pressure
+c   output:
+c     striem (density,velocity,pressure) 
+c             <== solution to riemann problem
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+include(FORTDIR/const.i)
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      REAL wleft(3),wright(3),eosgam,striem(3)
+c
+      REAL clsqp,clsqm,pstar,zp,zm,ustarm,ustarp,zsum
+      REAL wsqm,wsqp,wm,wp,ustar,sein,ro,uo,po,co,wo
+      REAL dummy, rstar,cstar,wso,wsi,ushok,t4,t3,t5
+      REAL gp1g2i, gp1o2gm1
+      integer it
+      REAL separ
+c
+c     ******************************************************************
+c     * the entries of wleft, wright, and wriem are (in order):
+c     *   density, tangential velocity, normal velocity, pressure
+c     ******************************************************************
+
+      separ = zero
+      do it=1,3
+         separ = separ+abs(wleft(it) - wright(it))
+      enddo
+      if (separ.lt.smallr) then
+         do it=1,3
+            striem(it) = half*(wleft(it)+wright(it))
+         enddo
+         return
+      endif
+ 
+	
+      gp1g2i=half*(eosgam+one)/eosgam
+      gp1o2gm1=half*(eosgam+one)/(eosgam-one)
+      clsqp=eosgam*wleft(1)*max(smallr,wleft(3))
+      wp=sqrt(clsqp)
+      clsqm=eosgam*wright(1)*max(smallr,wright(3))
+      wm=sqrt(clsqm)
+      pstar=(wp*wright(3)+wm*wleft(3)-wm*wp*(wright(2)-wleft(2)))
+     &          /(wp+wm)
+      pstar=max(pstar,smallr  )
+c
+      do it=1,5
+          wsqp=clsqp*( one +gp1g2i*(pstar/wleft(3)- one ))
+          wp=sqrt(wsqp)
+          wsqm=clsqm*( one +gp1g2i*(pstar/wright(3)- one ))
+          wm=sqrt(wsqm)
+          zp= two *wp*wsqp/(wsqp+clsqp)
+          zm= two *wm*wsqm/(wsqm+clsqm)
+          ustarm=wright(2)-(wright(3)-pstar)/wm
+          ustarp=wleft(2)+(wleft(3)-pstar)/wp
+          zsum=zp+zm
+          pstar=pstar-zp*zm*(ustarm-ustarp)/zsum
+          pstar=max(pstar,smallr)
+      enddo
+c
+  
+        ustar=(zp*ustarm+zm*ustarp)/zsum
+        sein=-dsign( one ,ustar)
+        if (sein.ge.zero) then
+          ro=wright(1)
+          uo=wright(2)
+          po=wright(3)
+        else
+          ro=wleft(1)
+          uo=wleft(2)
+          po=wleft(3)
+        endif
+        po=max(smallr,po)
+        co=sqrt(po*eosgam/ro)
+        dummy=pstar-po
+        wo=eosgam*ro*po*( one +gp1g2i*dummy/po)
+        rstar=ro/( one -ro*dummy/wo)
+        wo=sqrt(wo)
+        cstar=sqrt(eosgam*pstar/rstar)
+        wso=sein*uo+co
+        wsi=sein*ustar+cstar
+        ushok=sein*ustar+wo/rstar
+        if (dummy.ge.zero) then
+          wsi=ushok
+          wso=ushok
+        else
+          wsi=wsi
+          wso=wso
+        endif
+        if (wsi.ge.zero) then
+          striem(1)=rstar
+          striem(2)=ustar
+          striem(3)=pstar
+        else if (wso.lt.zero) then
+          striem(1)=ro
+          striem(2)=uo
+          striem(3)=po
+        else 
+          t4=(wso+wsi)/max(wso-wsi,wso+wsi,smallr)
+          t4= half *(t4+ one )
+          t5= one -t4
+          t3=t4*cstar+t5*co
+          striem(1)=t4*rstar+t5*ro
+          striem(2) =t4*ustar+t5*uo
+          striem(3)=t3*t3*striem(1)/eosgam
+        endif
+  
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/gas1d_approxrp3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/gas1d_approxrp3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,114 @@
+      subroutine gas1dapproxrp3d(eosgam,wleft,wright, striem)
+c***********************************************************************
+c description of arguments:
+c   input:
+c     eosgam ==> ratio of specific heats
+c     wleft  ==> left state
+c     wright ==> right state
+c                components ordered: density, vn, pressure
+c   output:
+c     striem (density,velocity,pressure) 
+c             <== solution to riemann problem
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+include(FORTDIR/const.i)
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      REAL wleft(3),wright(3),eosgam,striem(3)
+c
+      REAL clsqp,clsqm,pstar,zp,zm,ustarm,ustarp,zsum
+      REAL wsqm,wsqp,wm,wp,ustar,sein,ro,uo,po,co,wo
+      REAL dummy, rstar,cstar,wso,wsi,ushok,t4,t3,t5
+      REAL gp1g2i, gp1o2gm1
+      integer it
+      REAL separ
+c
+c     ******************************************************************
+c     * the entries of wleft, wright, and wriem are (in order):
+c     *   density, tangential velocity, normal velocity, pressure
+c     ******************************************************************
+
+      separ = zero
+      do it=1,3
+         separ = separ+abs(wleft(it) - wright(it))
+      enddo
+      if (separ.lt.smallr) then
+         do it=1,3
+            striem(it) = half*(wleft(it)+wright(it))
+         enddo
+         return
+      endif
+ 
+	
+      gp1g2i=half*(eosgam+one)/eosgam
+      gp1o2gm1=half*(eosgam+one)/(eosgam-one)
+      clsqp=eosgam*wleft(1)*max(smallr,wleft(3))
+      wp=sqrt(clsqp)
+      clsqm=eosgam*wright(1)*max(smallr,wright(3))
+      wm=sqrt(clsqm)
+      pstar=(wp*wright(3)+wm*wleft(3)-wm*wp*(wright(2)-wleft(2)))
+     &          /(wp+wm)
+      pstar=max(pstar,smallr  )
+c
+      do it=1,5
+          wsqp=clsqp*( one +gp1g2i*(pstar/wleft(3)- one ))
+          wp=sqrt(wsqp)
+          wsqm=clsqm*( one +gp1g2i*(pstar/wright(3)- one ))
+          wm=sqrt(wsqm)
+          zp= two *wp*wsqp/(wsqp+clsqp)
+          zm= two *wm*wsqm/(wsqm+clsqm)
+          ustarm=wright(2)-(wright(3)-pstar)/wm
+          ustarp=wleft(2)+(wleft(3)-pstar)/wp
+          zsum=zp+zm
+          pstar=pstar-zp*zm*(ustarm-ustarp)/zsum
+          pstar=max(pstar,smallr)
+      enddo
+c
+  
+        ustar=(zp*ustarm+zm*ustarp)/zsum
+        sein=-dsign( one ,ustar)
+        if (sein.ge.zero) then
+          ro=wright(1)
+          uo=wright(2)
+          po=wright(3)
+        else
+          ro=wleft(1)
+          uo=wleft(2)
+          po=wleft(3)
+        endif
+        po=max(smallr,po)
+        co=sqrt(po*eosgam/ro)
+        dummy=pstar-po
+        wo=eosgam*ro*po*( one +gp1g2i*dummy/po)
+        rstar=ro/( one -ro*dummy/wo)
+        wo=sqrt(wo)
+        cstar=sqrt(eosgam*pstar/rstar)
+        wso=sein*uo+co
+        wsi=sein*ustar+cstar
+        ushok=sein*ustar+wo/rstar
+        if (dummy.ge.zero) then
+          wsi=ushok
+          wso=ushok
+        else
+          wsi=wsi
+          wso=wso
+        endif
+        if (wsi.ge.zero) then
+          striem(1)=rstar
+          striem(2)=ustar
+          striem(3)=pstar
+        else if (wso.lt.zero) then
+          striem(1)=ro
+          striem(2)=uo
+          striem(3)=po
+        else 
+          t4=(wso+wsi)/max(wso-wsi,wso+wsi,smallr)
+          t4= half *(t4+ one )
+          t5= one -t4
+          t3=t4*cstar+t5*co
+          striem(1)=t4*rstar+t5*ro
+          striem(2) =t4*ustar+t5*uo
+          striem(3)=t3*t3*striem(1)/eosgam
+        endif
+  
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/gas1d_exactrp2d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/gas1d_exactrp2d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,346 @@
+define(rarefvel,`dnl
+      $3= ($1*two/(gamma-one))*(one- exp(log($2)*tau))
+')dnl
+
+define(shockvel,`dnl
+      $3= $1*alpha*(one-$2)/sqrt(1+ $2*beta)
+')dnl
+
+define(derrvel,`dnl
+      $3= (two*tau*$1/(one-gamma))*exp(log($2)*(tau-one))
+')dnl
+
+define(dersvel,`dnl
+      $3=  (-1)*$1*half*alpha*(two+beta*(one+$2))
+     &           /(sqrt(one+ $2*beta)*(one+ $2*beta))
+')dnl
+
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine gas1dexactrp2d(gamma,minpres,wleft,wright,striem)
+c***********************************************************************
+c description of arguments:
+c   input:
+c     wleft  ==> left state
+c     wright ==> right state
+c                components ordered: density, vn, pressure
+c   output:
+c     striem (density,velocity,pressure)
+c             <== solution to riemann problem)
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+include(FORTDIR/const.i)
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      REAL wleft(3),wright(3),striem(3)
+      REAL gamma,minpres
+c
+      REAL pstar,ustarl,ustarr,rstarl,rstarr
+      REAL px,pxl,pxr,pstarl,pstarr
+      REAL ustar,sein,ro,uo,po,co,wo
+      REAL feval,dfeval
+      REAL cxl,cxr
+      REAL dummy, rstar,cstar,wso,wsi,ushok,t4,t3,t5
+      REAL gp1g2i,tau,beta,alpha
+      REAL lpres,lvel,lrho,rpres,rvel,rrho
+      REAL fleft,fright,dfleft,dfright,temp
+      integer it,leftwave,rightwave
+c
+      tau=half*(gamma-one)/gamma
+      gp1g2i=half*(gamma+one)/gamma
+      alpha=sqrt(two/(gamma*(gamma-one)))
+      beta=(gamma+one)/(gamma-one)
+      lrho  = wleft(1)
+      lvel  = wleft(2)
+      lpres = wleft(3)
+      rrho  = wright(1)
+      rvel  = wright(2)
+      rpres = wright(3)
+
+      temp = abs(lvel-rvel)
+      temp = max(abs(lpres-rpres),temp)
+      if (temp.lt.smallr) then
+         striem(2)=half*(lvel+rvel)
+         striem(3)=half*(lpres+rpres)
+         if (striem(2).gt.zero) then
+            striem(1)=lrho
+         else
+            striem(1)=rrho
+         endif
+         goto 666
+      endif
+
+      cxl = sqrt(gamma*lpres/lrho)
+      cxr = sqrt(gamma*rpres/rrho)
+
+c  TERMINAL VELOCITIES
+
+      ustarl = lvel + two*cxl/(gamma-1)
+      ustarr = rvel - two*cxr/(gamma-1)
+
+      if (ustarl.lt.ustarr) then
+         write(6,*)" VACUUM in RS: "
+         write(6,*)"     left state  ",lrho,lvel,lpres
+         write(6,*)"     right state ",rrho,rvel,rpres
+         write(6,*)"     vacuum vels ",ustarl,ustarr
+         if (ustarl.gt.zero) then
+            ustar = ustarl
+            ro=lrho
+            uo=lvel
+            po=lpres
+         else if (ustarr.lt.zero) then
+            ustar = ustarr
+            ro=rrho
+            uo=rvel
+            po=rpres
+         else
+            ustar = 0
+            striem(1)=0
+            striem(2)=half*(ustarl+ustarr)
+            striem(3)=0
+            goto 666
+         endif
+         pstar = 0
+         rstar  = 0
+         rstarl = 0
+         rstarr = 0
+         cstar  = 0
+         sein=-dsign( one ,ustar)
+         co=sqrt(po*gamma/ro)
+         wso=sein*uo+co
+         wsi=sein*ustar
+         if (wso.lt.zero) then
+            striem(1)=ro
+            striem(2)=uo
+            striem(3)=po
+         else
+            t4=(wso+wsi)/max(wso-wsi,wso+wsi,smallr)
+            t4= half *(t4+ one )
+            t5= one -t4
+            t3=t5*co
+            striem(1)=t5*ro
+            striem(2)=t4*ustar+t5*uo
+            striem(3)=t3*t3*striem(1)/gamma
+         endif
+         return
+      endif
+      
+c-----------------------------------------------------------------
+c        CLASSIFY the problem by 1 and  3 waves
+c     shock= 1, rarefaction=2
+
+      px = lpres/rpres
+      if (px .lt. one ) then
+rarefvel(cxr,px,temp)dnl
+      else
+shockvel(cxr,px,temp)dnl
+      endif
+      if (lvel .gt. (rvel - temp)) then
+         leftwave = 1
+      else
+         leftwave = 2
+      endif
+
+
+      px = rpres/lpres
+      if (px .lt. one ) then
+rarefvel(cxl,px,temp)
+      else
+shockvel(cxl,px,temp)
+      endif
+      if ((lvel + temp) .gt. rvel ) then
+         rightwave = 1
+      else
+         rightwave = 2
+      endif
+
+c-----------------------------------------------------------------
+c     SOLVE RIEMANN PROBLEM
+
+      if ((leftwave.eq.2).and.(rightwave.eq.1)) then
+c 	LEFT RAREF , RIGHT SHOCK
+         pstar = rpres
+         pxl = pstar/lpres
+         pxr = pstar/rpres
+rarefvel(cxl,pxl,fleft)dnl
+shockvel(cxr,pxr,fright)dnl
+derrvel(cxl,pxl,dfleft)dnl
+dersvel(cxr,pxr,dfright)dnl
+         do it=1,9
+            feval = lvel + fleft - rvel + fright
+            dfeval = dfleft/lpres + dfright/rpres
+            pstar = pstar -feval/dfeval
+            pxl = pstar/lpres
+            pxr = pstar/rpres
+            if (pstar.lt.minpres) then
+               write(6,*)" pressure is too small or negative in
+     &                 exactsolver"
+               write(6,*)"   left state  ",lrho,lvel,lpres
+               write(6,*)"   right state ",rrho,rvel,rpres
+               write(6,*)"   lwave rwave = ",leftwave,rightwave
+            endif
+rarefvel(cxl,pxl,fleft)dnl
+shockvel(cxr,pxr,fright)dnl
+derrvel(cxl,pxl,dfleft)dnl
+dersvel(cxr,pxr,dfright)dnl
+         enddo
+         pstar=max(pstar,minpres  )
+         ustarl = lvel + fleft
+         ustarr = rvel - fright
+         rstarl = lrho*exp(log(pxl)/gamma)
+         rstarr = rrho*(1+beta*pxr)/(beta+pxr)
+      elseif ((leftwave.eq.1).and.(rightwave.eq.2)) then
+c 	LEFT SHOCK ,RIGHT RAREF
+         pstar = lpres
+         pxl = pstar/lpres
+         pxr = pstar/rpres
+shockvel(cxl,pxl,fleft)dnl
+rarefvel(cxr,pxr,fright)dnl
+dersvel(cxl,pxl,dfleft)dnl
+derrvel(cxr,pxr,dfright)dnl
+         do it=1,5
+            feval = lvel + fleft - rvel + fright
+            dfeval = dfleft/lpres + dfright/rpres
+            pstar = pstar -feval/dfeval
+            pxl = pstar/lpres
+            pxr = pstar/rpres
+            if (pstar.lt.minpres) then
+               write(6,*)" pressure is too small or negative in
+     &                 exactsolver"
+               write(6,*)"   left state  ",lrho,lvel,lpres
+               write(6,*)"   right state ",rrho,rvel,rpres
+               write(6,*)"   lwave rwave = ",leftwave,rightwave
+            endif
+shockvel(cxl,pxl,fleft)dnl
+rarefvel(cxr,pxr,fright)dnl
+dersvel(cxl,pxl,dfleft)dnl
+derrvel(cxr,pxr,dfright)dnl
+         enddo
+         pstar=max(pstar,minpres  )
+         ustarl = lvel + fleft
+         ustarr = rvel - fright
+         rstarl = lrho*(1+beta*pxl)/(beta+pxl)
+         rstarr = rrho*exp(log(pxr)/gamma)
+      elseif ((leftwave.eq.1).and.(rightwave.eq.1)) then
+c 	RIGHT SHOCK, LEFT SHOCK
+         pstar = max(rpres,lpres)
+         pxl = pstar/lpres
+         pxr = pstar/rpres
+shockvel(cxl,pxl,fleft)dnl
+shockvel(cxr,pxr,fright)dnl
+dersvel(cxl,pxl,dfleft)dnl
+dersvel(cxr,pxr,dfright)dnl
+         do it=1,5
+            feval = lvel + fleft - rvel + fright
+            dfeval = dfleft/lpres + dfright/rpres
+            pstar = pstar -feval/dfeval
+            pxl = pstar/lpres
+            pxr = pstar/rpres
+            if (pstar.lt.minpres) then
+               write(6,*)" pressure is too small or negative in
+     &                 exactsolver"
+               write(6,*)"   left state  ",lrho,lvel,lpres
+               write(6,*)"   right state ",rrho,rvel,rpres
+               write(6,*)"   lwave rwave = ",leftwave,rightwave
+            endif
+shockvel(cxl,pxl,fleft)dnl
+shockvel(cxr,pxr,fright)dnl
+dersvel(cxl,pxl,dfleft)dnl
+dersvel(cxr,pxr,dfright)dnl
+         enddo
+         pstar=max(pstar,minpres  )
+         ustarl = lvel + fleft
+         ustarr = rvel - fright
+         rstarl = lrho*(1+beta*pxl)/(beta+pxl)
+         rstarr = rrho*(1+beta*pxr)/(beta+pxr)
+      else
+c 	RIGHT RAREF, LEFT RAREF
+         pstarl =  exp(tau*log(lpres))
+         pstarr =  exp(tau*log(rpres))
+         pstar = (half*(gamma-1)*(lvel-rvel)+cxl+cxr)/
+     &           (cxr/pstarr +cxl/pstarl)
+         pstar = exp(log(pstar)/tau)
+         if (pstar.lt.minpres) then
+            write(6,*)" pressure is too small or negative in
+     &              exactsolver"
+            write(6,*)"   left state  ",lrho,lvel,lpres
+            write(6,*)"   right state ",rrho,rvel,rpres
+            write(6,*)"   lwave rwave = ",leftwave,rightwave
+         endif
+         pstar=max(pstar,minpres  )
+         pxl = pstar/lpres
+         pxr = pstar/rpres
+rarefvel(cxl,pxl,fleft)dnl
+rarefvel(cxr,pxr,fright)dnl
+         ustarl = lvel + fleft
+         ustarr = rvel - fright
+         rstarl = lrho*exp(log(pxl)/gamma)
+         rstarr = rrho*exp(log(pxr)/gamma)
+      endif
+      pstarl = pstar
+      pstarr = pstar
+ 
+      ustar=half*(ustarl+ustarr)
+
+c-----------------------------------------------------------------
+c     PICK STATE FOR FLUXES
+
+      sein=-dsign( one ,ustar)
+      if (sein.ge.zero) then
+          ro=rrho
+          uo=rvel
+          po=rpres
+          rstar =rstarr
+      else
+          ro=lrho
+          uo=lvel
+          po=lpres
+          rstar =rstarl
+      endif
+      cstar=sqrt(gamma*pstar/rstar)
+      dummy=pstar-po
+      if (dummy.ge.zero) then
+c		shock
+         wo=sqrt(gamma*ro*po*( one +gp1g2i*dummy/po))
+         ushok=sein*ustar+wo/rstar
+         if (ushok.ge.zero) then
+            striem(1)=rstar
+            striem(2)=ustar
+            striem(3)=pstar
+         else 
+            striem(1)=ro
+            striem(2)=uo
+            striem(3)=po
+         endif
+      else
+c		rarefaction
+         co=sqrt(po*gamma/ro)
+         wso=sein*uo+co
+         wsi=sein*ustar+cstar
+         if (wsi.ge.zero) then
+            striem(1)=rstar
+            striem(2)=ustar
+            striem(3)=pstar
+         else if (wso.lt.zero) then
+            striem(1)=ro
+            striem(2)=uo
+            striem(3)=po
+         else
+            t4=(wso+wsi)/max(wso-wsi,wso+wsi,smallr)
+            t4= half *(t4+ one )
+            t5= one -t4
+            t3=t4*cstar+t5*co
+            striem(1)=t4*rstar+t5*ro
+            striem(2)=t4*ustar+t5*uo
+            striem(3)=t3*t3*striem(1)/gamma
+         endif
+      endif
+c     ------------------------------------------------------------------
+c     write(6,*) "leaving riemnv"
+c     ------------------------------------------------------------------
+ 666  return
+      end
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/gas1d_exactrp3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/gas1d_exactrp3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,346 @@
+define(rarefvel,`dnl
+      $3= ($1*two/(gamma-one))*(one- exp(log($2)*tau))
+')dnl
+
+define(shockvel,`dnl
+      $3= $1*alpha*(one-$2)/sqrt(1+ $2*beta)
+')dnl
+
+define(derrvel,`dnl
+      $3= (two*tau*$1/(one-gamma))*exp(log($2)*(tau-one))
+')dnl
+
+define(dersvel,`dnl
+      $3=  (-1)*$1*half*alpha*(two+beta*(one+$2))
+     &           /(sqrt(one+ $2*beta)*(one+ $2*beta))
+')dnl
+
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine gas1dexactrp3d(gamma,minpres,wleft,wright,striem)
+c***********************************************************************
+c description of arguments:
+c   input:
+c     wleft  ==> left state
+c     wright ==> right state
+c                components ordered: density, vn, pressure
+c   output:
+c     striem (density,velocity,pressure)
+c             <== solution to riemann problem)
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+include(FORTDIR/const.i)
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      REAL wleft(3),wright(3),striem(3)
+      REAL gamma,minpres
+c
+      REAL pstar,ustarl,ustarr,rstarl,rstarr
+      REAL px,pxl,pxr,pstarl,pstarr
+      REAL ustar,sein,ro,uo,po,co,wo
+      REAL feval,dfeval
+      REAL cxl,cxr
+      REAL dummy, rstar,cstar,wso,wsi,ushok,t4,t3,t5
+      REAL gp1g2i,tau,beta,alpha
+      REAL lpres,lvel,lrho,rpres,rvel,rrho
+      REAL fleft,fright,dfleft,dfright,temp
+      integer it,leftwave,rightwave
+c
+      tau=half*(gamma-one)/gamma
+      gp1g2i=half*(gamma+one)/gamma
+      alpha=sqrt(two/(gamma*(gamma-one)))
+      beta=(gamma+one)/(gamma-one)
+      lrho  = wleft(1)
+      lvel  = wleft(2)
+      lpres = wleft(3)
+      rrho  = wright(1)
+      rvel  = wright(2)
+      rpres = wright(3)
+
+      temp = abs(lvel-rvel)
+      temp = max(abs(lpres-rpres),temp)
+      if (temp.lt.smallr) then
+         striem(2)=half*(lvel+rvel)
+         striem(3)=half*(lpres+rpres)
+         if (striem(2).gt.zero) then
+            striem(1)=lrho
+         else
+            striem(1)=rrho
+         endif
+         goto 666
+      endif
+
+      cxl = sqrt(gamma*lpres/lrho)
+      cxr = sqrt(gamma*rpres/rrho)
+
+c  TERMINAL VELOCITIES
+
+      ustarl = lvel + two*cxl/(gamma-1)
+      ustarr = rvel - two*cxr/(gamma-1)
+
+      if (ustarl.lt.ustarr) then
+         write(6,*)" VACUUM in RS: "
+         write(6,*)"     left state  ",lrho,lvel,lpres
+         write(6,*)"     right state ",rrho,rvel,rpres
+         write(6,*)"     vacuum vels ",ustarl,ustarr
+         if (ustarl.gt.zero) then
+            ustar = ustarl
+            ro=lrho
+            uo=lvel
+            po=lpres
+         else if (ustarr.lt.zero) then
+            ustar = ustarr
+            ro=rrho
+            uo=rvel
+            po=rpres
+         else
+            ustar = 0
+            striem(1)=0
+            striem(2)=half*(ustarl+ustarr)
+            striem(3)=0
+            goto 666
+         endif
+         pstar = 0
+         rstar  = 0
+         rstarl = 0
+         rstarr = 0
+         cstar  = 0
+         sein=-dsign( one ,ustar)
+         co=sqrt(po*gamma/ro)
+         wso=sein*uo+co
+         wsi=sein*ustar
+         if (wso.lt.zero) then
+            striem(1)=ro
+            striem(2)=uo
+            striem(3)=po
+         else
+            t4=(wso+wsi)/max(wso-wsi,wso+wsi,smallr)
+            t4= half *(t4+ one )
+            t5= one -t4
+            t3=t5*co
+            striem(1)=t5*ro
+            striem(2)=t4*ustar+t5*uo
+            striem(3)=t3*t3*striem(1)/gamma
+         endif
+         return
+      endif
+      
+c-----------------------------------------------------------------
+c        CLASSIFY the problem by 1 and  3 waves
+c     shock= 1, rarefaction=2
+
+      px = lpres/rpres
+      if (px .lt. one ) then
+rarefvel(cxr,px,temp)dnl
+      else
+shockvel(cxr,px,temp)dnl
+      endif
+      if (lvel .gt. (rvel - temp)) then
+         leftwave = 1
+      else
+         leftwave = 2
+      endif
+
+
+      px = rpres/lpres
+      if (px .lt. one ) then
+rarefvel(cxl,px,temp)
+      else
+shockvel(cxl,px,temp)
+      endif
+      if ((lvel + temp) .gt. rvel ) then
+         rightwave = 1
+      else
+         rightwave = 2
+      endif
+
+c-----------------------------------------------------------------
+c     SOLVE RIEMANN PROBLEM
+
+      if ((leftwave.eq.2).and.(rightwave.eq.1)) then
+c 	LEFT RAREF , RIGHT SHOCK
+         pstar = rpres
+         pxl = pstar/lpres
+         pxr = pstar/rpres
+rarefvel(cxl,pxl,fleft)dnl
+shockvel(cxr,pxr,fright)dnl
+derrvel(cxl,pxl,dfleft)dnl
+dersvel(cxr,pxr,dfright)dnl
+         do it=1,9
+            feval = lvel + fleft - rvel + fright
+            dfeval = dfleft/lpres + dfright/rpres
+            pstar = pstar -feval/dfeval
+            pxl = pstar/lpres
+            pxr = pstar/rpres
+            if (pstar.lt.minpres) then
+               write(6,*)" pressure is too small or negative in
+     &                 exactsolver"
+               write(6,*)"   left state  ",lrho,lvel,lpres
+               write(6,*)"   right state ",rrho,rvel,rpres
+               write(6,*)"   lwave rwave = ",leftwave,rightwave
+            endif
+rarefvel(cxl,pxl,fleft)dnl
+shockvel(cxr,pxr,fright)dnl
+derrvel(cxl,pxl,dfleft)dnl
+dersvel(cxr,pxr,dfright)dnl
+         enddo
+         pstar=max(pstar,minpres  )
+         ustarl = lvel + fleft
+         ustarr = rvel - fright
+         rstarl = lrho*exp(log(pxl)/gamma)
+         rstarr = rrho*(1+beta*pxr)/(beta+pxr)
+      elseif ((leftwave.eq.1).and.(rightwave.eq.2)) then
+c 	LEFT SHOCK ,RIGHT RAREF
+         pstar = lpres
+         pxl = pstar/lpres
+         pxr = pstar/rpres
+shockvel(cxl,pxl,fleft)dnl
+rarefvel(cxr,pxr,fright)dnl
+dersvel(cxl,pxl,dfleft)dnl
+derrvel(cxr,pxr,dfright)dnl
+         do it=1,5
+            feval = lvel + fleft - rvel + fright
+            dfeval = dfleft/lpres + dfright/rpres
+            pstar = pstar -feval/dfeval
+            pxl = pstar/lpres
+            pxr = pstar/rpres
+            if (pstar.lt.minpres) then
+               write(6,*)" pressure is too small or negative in
+     &                 exactsolver"
+               write(6,*)"   left state  ",lrho,lvel,lpres
+               write(6,*)"   right state ",rrho,rvel,rpres
+               write(6,*)"   lwave rwave = ",leftwave,rightwave
+            endif
+shockvel(cxl,pxl,fleft)dnl
+rarefvel(cxr,pxr,fright)dnl
+dersvel(cxl,pxl,dfleft)dnl
+derrvel(cxr,pxr,dfright)dnl
+         enddo
+         pstar=max(pstar,minpres  )
+         ustarl = lvel + fleft
+         ustarr = rvel - fright
+         rstarl = lrho*(1+beta*pxl)/(beta+pxl)
+         rstarr = rrho*exp(log(pxr)/gamma)
+      elseif ((leftwave.eq.1).and.(rightwave.eq.1)) then
+c 	RIGHT SHOCK, LEFT SHOCK
+         pstar = max(rpres,lpres)
+         pxl = pstar/lpres
+         pxr = pstar/rpres
+shockvel(cxl,pxl,fleft)dnl
+shockvel(cxr,pxr,fright)dnl
+dersvel(cxl,pxl,dfleft)dnl
+dersvel(cxr,pxr,dfright)dnl
+         do it=1,5
+            feval = lvel + fleft - rvel + fright
+            dfeval = dfleft/lpres + dfright/rpres
+            pstar = pstar -feval/dfeval
+            pxl = pstar/lpres
+            pxr = pstar/rpres
+            if (pstar.lt.minpres) then
+               write(6,*)" pressure is too small or negative in
+     &                 exactsolver"
+               write(6,*)"   left state  ",lrho,lvel,lpres
+               write(6,*)"   right state ",rrho,rvel,rpres
+               write(6,*)"   lwave rwave = ",leftwave,rightwave
+            endif
+shockvel(cxl,pxl,fleft)dnl
+shockvel(cxr,pxr,fright)dnl
+dersvel(cxl,pxl,dfleft)dnl
+dersvel(cxr,pxr,dfright)dnl
+         enddo
+         pstar=max(pstar,minpres  )
+         ustarl = lvel + fleft
+         ustarr = rvel - fright
+         rstarl = lrho*(1+beta*pxl)/(beta+pxl)
+         rstarr = rrho*(1+beta*pxr)/(beta+pxr)
+      else
+c 	RIGHT RAREF, LEFT RAREF
+         pstarl =  exp(tau*log(lpres))
+         pstarr =  exp(tau*log(rpres))
+         pstar = (half*(gamma-1)*(lvel-rvel)+cxl+cxr)/
+     &           (cxr/pstarr +cxl/pstarl)
+         pstar = exp(log(pstar)/tau)
+         if (pstar.lt.minpres) then
+            write(6,*)" pressure is too small or negative in
+     &              exactsolver"
+            write(6,*)"   left state  ",lrho,lvel,lpres
+            write(6,*)"   right state ",rrho,rvel,rpres
+            write(6,*)"   lwave rwave = ",leftwave,rightwave
+         endif
+         pstar=max(pstar,minpres  )
+         pxl = pstar/lpres
+         pxr = pstar/rpres
+rarefvel(cxl,pxl,fleft)dnl
+rarefvel(cxr,pxr,fright)dnl
+         ustarl = lvel + fleft
+         ustarr = rvel - fright
+         rstarl = lrho*exp(log(pxl)/gamma)
+         rstarr = rrho*exp(log(pxr)/gamma)
+      endif
+      pstarl = pstar
+      pstarr = pstar
+ 
+      ustar=half*(ustarl+ustarr)
+
+c-----------------------------------------------------------------
+c     PICK STATE FOR FLUXES
+
+      sein=-dsign( one ,ustar)
+      if (sein.ge.zero) then
+          ro=rrho
+          uo=rvel
+          po=rpres
+          rstar =rstarr
+      else
+          ro=lrho
+          uo=lvel
+          po=lpres
+          rstar =rstarl
+      endif
+      cstar=sqrt(gamma*pstar/rstar)
+      dummy=pstar-po
+      if (dummy.ge.zero) then
+c		shock
+         wo=sqrt(gamma*ro*po*( one +gp1g2i*dummy/po))
+         ushok=sein*ustar+wo/rstar
+         if (ushok.ge.zero) then
+            striem(1)=rstar
+            striem(2)=ustar
+            striem(3)=pstar
+         else 
+            striem(1)=ro
+            striem(2)=uo
+            striem(3)=po
+         endif
+      else
+c		rarefaction
+         co=sqrt(po*gamma/ro)
+         wso=sein*uo+co
+         wsi=sein*ustar+cstar
+         if (wsi.ge.zero) then
+            striem(1)=rstar
+            striem(2)=ustar
+            striem(3)=pstar
+         else if (wso.lt.zero) then
+            striem(1)=ro
+            striem(2)=uo
+            striem(3)=po
+         else
+            t4=(wso+wsi)/max(wso-wsi,wso+wsi,smallr)
+            t4= half *(t4+ one )
+            t5= one -t4
+            t3=t4*cstar+t5*co
+            striem(1)=t4*rstar+t5*ro
+            striem(2)=t4*ustar+t5*uo
+            striem(3)=t3*t3*striem(1)/gamma
+         endif
+      endif
+c     ------------------------------------------------------------------
+c     write(6,*) "leaving riemnv"
+c     ------------------------------------------------------------------
+ 666  return
+      end
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/grad2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/grad2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,213 @@
+define(NDIM,2)dnl
+define(NEQU,4)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+
+      subroutine detectgrad2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  vghost0,tagghost0,ttagghost0,
+     &  vghost1,tagghost1,ttagghost1,
+     &  dx,
+     &  gradtol,
+     &  dotag,donttag,
+     &  var,
+     &  tags,temptags)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c input arrays:
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  dotag,donttag,
+     &  vghost0,vghost1,
+     &  tagghost0,tagghost1,
+     &  ttagghost0,ttagghost1
+      REAL
+     &  dx(0:NDIM-1),
+     &  gradtol
+c variables indexed as 2dimensional
+      REAL
+     &  var(CELL2dVECG(ifirst,ilast,vghost))
+      integer
+     &  tags(CELL2dVECG(ifirst,ilast,tagghost)),
+     &  temptags(CELL2dVECG(ifirst,ilast,ttagghost))
+c
+      REAL tol
+      REAL facejump, loctol
+      REAL presm1,presp1,diag01
+      logical tagcell
+      integer ic0,ic1
+c
+c***********************************************************************
+c
+      tol = gradtol
+      diag01 = sqrt(dx(0)**2+dx(1)**2)
+
+      do ic1=ifirst1,ilast1
+        do ic0=ifirst0,ilast0
+
+          if (tags(ic0,ic1) .ne. 0) then
+            loctol = 0.125*tol
+          else 
+            loctol = tol
+          endif
+   
+          tagcell = .false.
+
+          presm1 = var(ic0-1,ic1)
+          presp1 = var(ic0+1,ic1)
+          facejump = abs(var(ic0,ic1)-presm1)
+          facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+          tagcell = ((facejump).gt.(loctol*dx(0)))
+          if (.not.tagcell) then
+            presm1 = var(ic0,ic1-1)
+            presp1 = var(ic0,ic1+1)
+            facejump = abs(var(ic0,ic1)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+            tagcell = ((facejump).gt.(loctol*dx(1)))
+          endif
+
+          if (.not.tagcell) then
+            presm1 = var(ic0-1,ic1-1)
+            presp1 = var(ic0+1,ic1+1)
+            facejump = abs(var(ic0,ic1)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+            tagcell = ((facejump).gt.(loctol*diag01))
+          endif
+          if (.not.tagcell) then
+            presm1 = var(ic0-1,ic1+1)
+            presp1 = var(ic0+1,ic1-1)
+            facejump = abs(var(ic0,ic1)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+            tagcell = ((facejump).gt.(loctol*diag01))
+          endif
+
+          if ( tagcell ) then
+            temptags(ic0,ic1) = dotag
+          endif
+        enddo
+      enddo
+      return
+      end
+
+      subroutine detectshock2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  vghost0,tagghost0,ttagghost0,
+     &  vghost1,tagghost1,ttagghost1,
+     &  dx,
+     &  gradtol,gradonset,
+     &  dotag,donttag,
+     &  var,
+     &  tags,temptags)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c input arrays:
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  dotag,donttag,
+     &  vghost0,vghost1,
+     &  tagghost0,tagghost1,
+     &  ttagghost0,ttagghost1
+      REAL
+     &  dx(0:NDIM-1),
+     &  gradtol,gradonset
+c variables indexed as 2dimensional
+      REAL
+     &  var(CELL2dVECG(ifirst,ilast,vghost))
+      integer
+     &  tags(CELL2dVECG(ifirst,ilast,tagghost)),
+     &  temptags(CELL2dVECG(ifirst,ilast,ttagghost))
+c
+      REAL tol,onset
+      REAL jump1, jump2, facejump, loctol,locon
+      REAL presm1,presm2,presp1,presp2
+      REAL diag01 
+      logical tagcell
+      integer ic0,ic1
+c
+c***********************************************************************
+c
+      tol = gradtol
+      onset = gradonset
+      diag01 = sqrt(dx(0)**2+dx(1)**2)
+
+      do ic1=ifirst1,ilast1
+        do ic0=ifirst0,ilast0
+
+          if (tags(ic0,ic1) .ne. 0) then
+            loctol = 0.125*tol
+            locon = 0.66*onset
+          else 
+            loctol = tol
+            locon = onset
+          endif
+   
+          tagcell = .false.
+
+          presm1 = var(ic0-1,ic1)
+          presm2 = var(ic0-2,ic1)
+          presp1 = var(ic0+1,ic1)
+          presp2 = var(ic0+2,ic1)
+          jump2 = presp2-presm2
+          jump1 = presp1-presm1
+          facejump = abs(var(ic0,ic1)-presm1)
+          facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+          tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                ((jump1*jump2).lt.zero)).and.
+     &               ((facejump).gt.(loctol*dx(0))))
+          if (.not.tagcell) then
+            presm1 = var(ic0,ic1-1)
+            presm2 = var(ic0,ic1-2)
+            presp1 = var(ic0,ic1+1)
+            presp2 = var(ic0,ic1+2)
+            jump2 = presp2-presm2
+            jump1 = presp1-presm1
+            facejump = abs(var(ic0,ic1)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+            tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                ((jump1*jump2).lt.zero)).and.
+     &               ((facejump).gt.(loctol*dx(1)))) 
+          endif
+
+          if (.not.tagcell) then
+            presm1 = var(ic0-1,ic1-1)
+            presp1 = var(ic0+1,ic1+1)
+            presm2 = var(ic0-2,ic1-2)
+            presp2 = var(ic0+2,ic1+2)
+            jump1 = presp1-presm1
+            jump2 = presp2-presm2
+            facejump = abs(var(ic0,ic1)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+            tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag01)))
+          endif
+          if (.not.tagcell) then
+            presm1 = var(ic0-1,ic1+1)
+            presp1 = var(ic0+1,ic1-1)
+            presm2 = var(ic0-2,ic1+2)
+            presp2 = var(ic0+2,ic1-2)
+            jump1 = presp1-presm1
+            jump2 = presp2-presm2
+            facejump = abs(var(ic0,ic1)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+            tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag01)))
+          endif
+
+          if ( tagcell ) then
+            temptags(ic0,ic1) = dotag
+          endif
+        enddo
+      enddo
+      return
+      end
+
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/grad3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/grad3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,424 @@
+define(NDIM,3)dnl
+define(NEQU,5)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine detectgrad3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  vghost0,tagghost0,ttagghost0,
+     &  vghost1,tagghost1,ttagghost1,
+     &  vghost2,tagghost2,ttagghost2,
+     &  dx,
+     &  gradtol,
+     &  dotag,donttag,
+     &  var,
+     &  tags,temptags)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c input arrays:
+      integer
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  dotag,donttag,
+     &  vghost0,vghost1,vghost2,
+     &  tagghost0,tagghost1,tagghost2,
+     &  ttagghost0,ttagghost1,ttagghost2
+      REAL
+     &  dx(0:NDIM-1),
+     &  gradtol
+c variables indexed as 3dimensional
+      REAL
+     &  var(CELL3dVECG(ifirst,ilast,vghost))
+      integer
+     &  tags(CELL3dVECG(ifirst,ilast,tagghost)),
+     &  temptags(CELL3dVECG(ifirst,ilast,ttagghost))
+c
+      REAL tol
+      REAL facejump, loctol
+      REAL presm1,presp1
+      REAL diag(0:NDIM-1),diag012 
+      logical tagcell
+      integer ic0,ic1,ic2
+c
+c***********************************************************************
+c
+      tol = gradtol
+      diag(0) = sqrt(dx(2)**2+dx(1)**2)
+      diag(1) = sqrt(dx(0)**2+dx(2)**2)
+      diag(2) = sqrt(dx(0)**2+dx(1)**2)
+      diag012= sqrt(dx(0)**2+dx(1)**2+dx(2)**2)
+
+      do ic2=ifirst2,ilast2
+        do ic1=ifirst1,ilast1
+          do ic0=ifirst0,ilast0
+
+            if (tags(ic0,ic1,ic2) .ne. 0) then
+              loctol = 0.125*tol
+            else 
+              loctol = tol
+            endif
+     
+            tagcell = .false.
+  
+            presm1 = var(ic0-1,ic1,ic2)
+            presp1 = var(ic0+1,ic1,ic2)
+            facejump = abs(var(ic0,ic1,ic2)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+            tagcell = ((facejump).gt.(loctol*dx(0)))
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1-1,ic2)
+              presp1 = var(ic0,ic1+1,ic2)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*dx(1)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1,ic2-1)
+              presp1 = var(ic0,ic1,ic2+1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*dx(2)))
+            endif
+
+
+c   2Dimensional diagonals
+
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1-1,ic2-1)
+              presp1 = var(ic0,ic1+1,ic2+1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag(0)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1+1,ic2-1)
+              presp1 = var(ic0,ic1-1,ic2+1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag(0)))
+            endif
+  
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1,ic2-1)
+              presp1 = var(ic0+1,ic1,ic2+1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag(1)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1,ic2+1)
+              presp1 = var(ic0+1,ic1,ic2-1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag(1)))
+            endif
+
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1-1,ic2)
+              presp1 = var(ic0+1,ic1+1,ic2)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag(2)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1+1,ic2)
+              presp1 = var(ic0+1,ic1-1,ic2)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag(2)))
+            endif
+
+c   End 2Dimensional diagonals
+c   3Dimensional diagonals
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1-1,ic2-1)
+              presp1 = var(ic0+1,ic1+1,ic2+1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag012))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1-1,ic2+1)
+              presp1 = var(ic0+1,ic1+1,ic2-1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag012))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1+1,ic2-1)
+              presp1 = var(ic0+1,ic1-1,ic2+1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag012))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1+1,ic2+1)
+              presp1 = var(ic0+1,ic1-1,ic2-1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag012))
+            endif
+
+c   End 3Dimensional diagonals
+
+            if ( tagcell ) then
+              temptags(ic0,ic1,ic2) = dotag
+            endif
+          enddo
+        enddo
+      enddo
+      return
+      end
+
+      subroutine detectshock3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  vghost0,tagghost0,ttagghost0,
+     &  vghost1,tagghost1,ttagghost1,
+     &  vghost2,tagghost2,ttagghost2,
+     &  dx,
+     &  gradtol,gradonset,
+     &  dotag,donttag,
+     &  var,
+     &  tags,temptags)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c input arrays:
+      integer
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  dotag,donttag,
+     &  vghost0,vghost1,vghost2,
+     &  tagghost0,tagghost1,tagghost2,
+     &  ttagghost0,ttagghost1,ttagghost2
+      REAL
+     &  dx(0:NDIM-1),
+     &  gradtol,gradonset
+c variables indexed as 3dimensional
+      REAL
+     &  var(CELL3dVECG(ifirst,ilast,vghost))
+      integer
+     &  tags(CELL3dVECG(ifirst,ilast,tagghost)),
+     &  temptags(CELL3dVECG(ifirst,ilast,ttagghost))
+c
+      REAL tol,onset
+      REAL jump1, jump2, facejump, loctol,locon
+      REAL presm1,presm2,presp1,presp2
+      REAL diag(0:NDIM-1),diag012 
+      logical tagcell
+      integer ic0,ic1,ic2
+c
+c***********************************************************************
+c
+      tol = gradtol
+      onset = gradonset
+      diag(0) = sqrt(dx(2)**2+dx(1)**2)
+      diag(1) = sqrt(dx(0)**2+dx(2)**2)
+      diag(2) = sqrt(dx(0)**2+dx(1)**2)
+      diag012= sqrt(dx(0)**2+dx(1)**2+dx(2)**2)
+
+      do ic2=ifirst2,ilast2
+        do ic1=ifirst1,ilast1
+          do ic0=ifirst0,ilast0
+
+            if (tags(ic0,ic1,ic2) .ne. 0) then
+              loctol = 0.125*tol
+              locon = 0.66*onset
+            else 
+              loctol = tol
+              locon = onset
+            endif
+     
+            tagcell = .false.
+  
+            presm1 = var(ic0-1,ic1,ic2)
+            presm2 = var(ic0-2,ic1,ic2)
+            presp1 = var(ic0+1,ic1,ic2)
+            presp2 = var(ic0+2,ic1,ic2)
+            jump2 = presp2-presm2
+            jump1 = presp1-presm1
+            facejump = abs(var(ic0,ic1,ic2)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+            tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                ((jump1*jump2).lt.zero)).and.
+     &               ((facejump).gt.(loctol*dx(0))))
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1-1,ic2)
+              presm2 = var(ic0,ic1-2,ic2)
+              presp1 = var(ic0,ic1+1,ic2)
+              presp2 = var(ic0,ic1+2,ic2)
+              jump2 = presp2-presm2
+              jump1 = presp1-presm1
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                    ((jump1*jump2).lt.zero)).and.
+     &                   ((facejump).gt.(loctol*dx(1)))) 
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1,ic2-1)
+              presm2 = var(ic0,ic1,ic2-2)
+              presp1 = var(ic0,ic1,ic2+1)
+              presp2 = var(ic0,ic1,ic2+2)
+              jump2 = presp2-presm2
+              jump1 = presp1-presm1
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*dx(2)))) 
+            endif
+
+
+c   2Dimensional diagonals
+
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1-1,ic2-1)
+              presp1 = var(ic0,ic1+1,ic2+1)
+              presm2 = var(ic0,ic1-2,ic2-2)
+              presp2 = var(ic0,ic1+2,ic2+2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                    ((jump1*jump2).lt.zero)).and.
+     &                   ((facejump).gt.(loctol*diag(0))))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1+1,ic2-1)
+              presp1 = var(ic0,ic1-1,ic2+1)
+              presm2 = var(ic0,ic1+2,ic2-2)
+              presp2 = var(ic0,ic1-2,ic2+2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                    ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag(0))))
+            endif
+  
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1,ic2-1)
+              presp1 = var(ic0+1,ic1,ic2+1)
+              presm2 = var(ic0-2,ic1,ic2-2)
+              presp2 = var(ic0+2,ic1,ic2+2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag(1))))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1,ic2+1)
+              presp1 = var(ic0+1,ic1,ic2-1)
+              presm2 = var(ic0-2,ic1,ic2+2)
+              presp2 = var(ic0+2,ic1,ic2-2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                    ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag(1))))
+            endif
+
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1-1,ic2)
+              presp1 = var(ic0+1,ic1+1,ic2)
+              presm2 = var(ic0-2,ic1-2,ic2)
+              presp2 = var(ic0+2,ic1+2,ic2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                    ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag(2))))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1+1,ic2)
+              presp1 = var(ic0+1,ic1-1,ic2)
+              presm2 = var(ic0-2,ic1+2,ic2)
+              presp2 = var(ic0+2,ic1-2,ic2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag(2))))
+            endif
+
+c   End 2Dimensional diagonals
+c   3Dimensional diagonals
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1-1,ic2-1)
+              presp1 = var(ic0+1,ic1+1,ic2+1)
+              presm2 = var(ic0-2,ic1-2,ic2-2)
+              presp2 = var(ic0+2,ic1+2,ic2+2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                   ((facejump).gt.(loctol*diag012)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1-1,ic2+1)
+              presp1 = var(ic0+1,ic1+1,ic2-1)
+              presm2 = var(ic0-2,ic1-2,ic2+2)
+              presp2 = var(ic0+2,ic1+2,ic2-2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag012)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1+1,ic2-1)
+              presp1 = var(ic0+1,ic1-1,ic2+1)
+              presm2 = var(ic0-2,ic1+2,ic2-2)
+              presp2 = var(ic0+2,ic1-2,ic2+2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                   ((facejump).gt.(loctol*diag012)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1+1,ic2+1)
+              presp1 = var(ic0+1,ic1-1,ic2-1)
+              presm2 = var(ic0-2,ic1+2,ic2+2)
+              presp2 = var(ic0+2,ic1-2,ic2-2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag012)))
+            endif
+
+c   End 3Dimensional diagonals
+
+            if ( tagcell ) then
+              temptags(ic0,ic1,ic2) = dotag
+            endif
+          enddo
+        enddo
+      enddo
+      return
+      end
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/init2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/init2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,176 @@
+define(NDIM,2)dnl
+define(NEQU,4)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+      subroutine eulerinit2d(data_problem,dx,xlo,xhi,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  gcw0,gcw1,
+     &  gamma,
+     &  density,velocity,pressure,
+     &  nintervals,front,
+     &  i_dens,i_vel,i_pres)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer gcw0,gcw1
+      integer data_problem
+      integer nintervals
+      REAL front(1:nintervals)
+      REAL 
+     &     dx(0:NDIM-1),xlo(0:NDIM-1),xhi(0:NDIM-1)
+      REAL i_dens(1:nintervals),
+     &     i_vel(0:NDIM-1,1:nintervals),
+     &     i_pres(1:nintervals) 
+c variables in 2d cell indexed         
+      REAL
+     &     density(CELL2dVECG(ifirst,ilast,gcw)),
+     &     velocity(CELL2dVECG(ifirst,ilast,gcw),0:NDIM-1),
+     &     pressure(CELL2dVECG(ifirst,ilast,gcw))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,dir,ifr
+      REAL xc(0:NDIM-1)
+      REAL gamma
+c
+c   dir 0 two linear states (L,R) indp of y,z
+c   dir 1 two linear states (L,R) indp of x,z
+    
+c     write(6,*) "Inside eulerinit"
+c     write(6,*) "data_problem= ",data_problem
+c     write(6,*) "PIECEWISE_CONSTANT_X= ",PIECEWISE_CONSTANT_X
+c     write(6,*) "STEP = ",STEP 
+c     write(6,*) "PIECEWISE_CONSTANT_Y= ",PIECEWISE_CONSTANT_Y
+c     write(6,*) "dx= ",dx(0), dx(1)
+c     write(6,*) "xlo= ",xlo(0), xlo(1),", xhi = ",xhi(0), xhi(1)
+c     write(6,*) "ifirst, ilast= ",ifirst0,ilast0,"and ",ifirst1,ilast1
+c     write(6,*) "gamma= ",gamma
+c     call flush(6)
+
+      dir = 0
+      if (data_problem.eq.PIECEWISE_CONSTANT_X) then
+         dir = 0
+      else if (data_problem.eq.STEP) then
+         dir = 0
+      else if (data_problem.eq.PIECEWISE_CONSTANT_Y) then
+         dir = 1
+      endif
+
+      if (dir.eq.0) then
+         ifr = 1
+         do ic0=ifirst0,ilast0
+            xc(0) = xlo(0) + dx(0)*(dble(ic0-ifirst0)+half)
+            if (xc(dir).gt.front(ifr)) then
+              ifr = ifr+1
+            endif
+            do ic1=ifirst1,ilast1
+               density(ic0,ic1) = i_dens(ifr)
+               velocity(ic0,ic1,0) = i_vel(0,ifr)
+               velocity(ic0,ic1,1) = i_vel(1,ifr)
+               pressure(ic0,ic1) = i_pres(ifr)
+           enddo
+         enddo
+      else if (dir.eq.1) then
+         ifr = 1
+         do ic1=ifirst1,ilast1
+            xc(1) =xlo(1)+ dx(1)*(dble(ic1-ifirst1)+half)
+            if (xc(dir).gt.front(ifr)) then
+               ifr = ifr+1
+            endif
+            do ic0=ifirst0,ilast0
+               density(ic0,ic1) = i_dens(ifr)
+               velocity(ic0,ic1,0) = i_vel(0,ifr)
+               velocity(ic0,ic1,1) = i_vel(1,ifr)
+               pressure(ic0,ic1) = i_pres(ifr)
+           enddo
+         enddo
+      endif
+c
+      return
+      end   
+c***********************************************************************
+c
+c    Initialization routine where we use a spherical profile 
+c
+c***********************************************************************
+      subroutine eulerinitsphere2d(data_problem,dx,xlo,xhi,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  gcw0,gcw1,
+     &  gamma,
+     &  density,velocity,pressure,
+     &  i_dens,i_vel,i_pres,
+     &  o_dens,o_vel,o_pres,
+     &  center,radius)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer gcw0,gcw1
+      integer data_problem
+      REAL i_dens,i_vel(0:NDIM-1),i_pres,
+     &     o_dens,o_vel(0:NDIM-1),o_pres
+      REAL center(0:NDIM-1),radius
+      REAL 
+     &     dx(0:NDIM-1),xlo(0:NDIM-1),xhi(0:NDIM-1),gamma
+c variables in 2d cell indexed         
+      REAL
+     &     density(CELL2dVECG(ifirst,ilast,gcw)),
+     &     velocity(CELL2dVECG(ifirst,ilast,gcw),0:NDIM-1),
+     &     pressure(CELL2dVECG(ifirst,ilast,gcw))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1
+      REAL xc(0:NDIM-1),x0,x1
+      REAL angle
+c
+c     write(6,*) "Inside eulerinitsphere"
+c     write(6,*) "data_problem= ",data_problem
+c     write(6,*) "dx= ",dx(0), dx(1)
+c     write(6,*) "xlo= ",xlo(0), xlo(1),", xhi = ",xhi(0), xhi(1)
+c     write(6,*) "ifirst, ilast= ",ifirst0,ilast0,ifirst1,ilast1
+c     write(6,*) "gamma= ",gamma
+c     write(6,*) "radius= ",radius
+c     write(6,*) "center= ",center(0),center(1)
+c     call flush(6)
+
+      do ic1=ifirst1,ilast1
+        xc(1) = xlo(1)+dx(1)*(dble(ic1-ifirst1)+half)
+        x1 = xc(1)-center(1)
+        do ic0=ifirst0,ilast0
+           xc(0) = xlo(0)+dx(0)*(dble(ic0-ifirst0)+half)
+           x0 = xc(0)-center(0)
+           if (x1.eq.zero .and. x0.eq.zero) then
+              angle = zero
+           else
+              angle = atan2(x1,x0)
+           endif
+           if ((x0**2+x1**2).lt.radius**2) then
+              density(ic0,ic1) = i_dens
+              velocity(ic0,ic1,0) = i_vel(0)*cos(angle)
+              velocity(ic0,ic1,1) = i_vel(1)*sin(angle)
+              pressure(ic0,ic1) = i_pres
+           else
+              density(ic0,ic1) = o_dens
+              velocity(ic0,ic1,0) = o_vel(0)*cos(angle)
+              velocity(ic0,ic1,1) = o_vel(1)*sin(angle)
+              pressure(ic0,ic1) = o_pres
+           endif
+c          write(6,*) "cell, state = ",ic0,ic1, density(ic0,ic1),
+c    &     pressure(ic0,ic1),velocity(ic0,ic1,0),velocity(ic0,ic1,1)
+c          call flush(6)
+         enddo
+      enddo
+c
+      return
+      end   
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/init3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/init3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,212 @@
+define(NDIM,3)dnl
+define(NEQU,5)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine eulerinit3d(data_problem,dx,xlo,xhi,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  gcw0,gcw1,gcw2,
+     &  gamma,
+     &  density,velocity,pressure,
+     &  nintervals,front,
+     &  i_dens,i_vel,i_pres)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer gcw0,gcw1,gcw2
+      integer data_problem 
+      integer nintervals
+      REAL front(1:nintervals)
+      REAL
+     &     dx(0:NDIM-1),xlo(0:NDIM-1),xhi(0:NDIM-1),gamma
+      REAL i_dens(1:nintervals),
+     &     i_vel(0:NDIM-1,1:nintervals),
+     &     i_pres(1:nintervals)
+c variables in 3d cell indexed         
+      REAL
+     &     density(CELL3dVECG(ifirst,ilast,gcw)),
+     &     velocity(CELL3dVECG(ifirst,ilast,gcw),0:NDIM-1),
+     &     pressure(CELL3dVECG(ifirst,ilast,gcw))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2,dir,ifr
+      REAL xc(0:NDIM-1)
+c
+c   dir 0 two linear states (L,R) indp of y,z
+c   dir 1 two linear states (L,R) indp of x,z
+c   dir 2 two linear states (L,R) indp of x,y
+
+c     write(6,*) "Inside eulerinit"
+c     write(6,*) "data_problem= ",data_problem
+c     write(6,*) "dx= ",dx(0), dx(1), dx(2)
+c     write(6,*) "xlo= ",xlo(0), xlo(1),xhi(2)
+c     write(6,*) "xhi= ",xhi(0), xhi(1),xhi(2)
+c     write(6,*) "ifirst= ",ifirst0,ifirst1,ifirst2
+c     write(6,*) "ilast= ",ilast0,ilast1,ilast2
+c     write(6,*) "gamma= ",gamma
+c     call flush(6)
+
+      dir = 0
+      if (data_problem.eq.PIECEWISE_CONSTANT_X) then
+         dir = 0
+      else if (data_problem.eq.PIECEWISE_CONSTANT_Y) then
+         dir = 1
+      else if (data_problem.eq.PIECEWISE_CONSTANT_Z) then
+         dir = 2
+      endif
+
+      if (dir.eq.0) then
+         ifr = 1
+         do ic0=ifirst0,ilast0
+            xc(0) = xlo(0)+ dx(0)*(dble(ic0-ifirst0)+half)
+            if (xc(dir).gt.front(ifr)) then
+               ifr = ifr+1
+            endif
+            do ic1=ifirst1,ilast1
+               do ic2=ifirst2,ilast2
+                  density(ic0,ic1,ic2) = i_dens(ifr)
+                  velocity(ic0,ic1,ic2,0) = i_vel(0,ifr)
+                  velocity(ic0,ic1,ic2,1) = i_vel(1,ifr)
+                  velocity(ic0,ic1,ic2,2) = i_vel(2,ifr)
+                  pressure(ic0,ic1,ic2) = i_pres(ifr)
+               enddo
+            enddo
+         enddo
+      else if (dir.eq.1) then
+         ifr = 1
+         do ic1=ifirst1,ilast1
+            xc(1) = xlo(1)+ dx(1)*(dble(ic1-ifirst1)+half)
+            if (xc(dir).gt.front(ifr)) then
+               ifr = ifr+1
+            endif
+            do ic2=ifirst2,ilast2
+               do ic0=ifirst0,ilast0
+                  density(ic0,ic1,ic2) = i_dens(ifr)
+                  velocity(ic0,ic1,ic2,0) = i_vel(0,ifr)
+                  velocity(ic0,ic1,ic2,1) = i_vel(1,ifr)
+                  velocity(ic0,ic1,ic2,2) = i_vel(2,ifr)
+                  pressure(ic0,ic1,ic2) = i_pres(ifr)
+              enddo
+           enddo
+         enddo
+      else if (dir.eq.2) then
+         ifr = 1
+         do ic2=ifirst2,ilast2
+            xc(2) = xlo(2)+ dx(2)*(dble(ic2-ifirst2)+half)
+            if (xc(dir).gt.front(ifr)) then
+               ifr = ifr+1
+            endif
+            do ic1=ifirst1,ilast1
+               do ic0=ifirst0,ilast0
+                  density(ic0,ic1,ic2) = i_dens(ifr)
+                  velocity(ic0,ic1,ic2,0) = i_vel(0,ifr)
+                  velocity(ic0,ic1,ic2,1) = i_vel(1,ifr)
+                  velocity(ic0,ic1,ic2,2) = i_vel(2,ifr)
+                  pressure(ic0,ic1,ic2) = i_pres(ifr)
+              enddo
+           enddo
+         enddo
+      endif
+c
+      return
+      end   
+c
+c***********************************************************************
+c
+c    Initialization routine where we use a spherical profile 
+c
+c***********************************************************************
+      subroutine eulerinitsphere3d(data_problem,dx,xlo,xhi,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  gcw0,gcw1,gcw2,
+     &  gamma,
+     &  density,velocity,pressure,
+     &  i_dens,i_vel,i_pres,
+     &  o_dens,o_vel,o_pres,
+     &  center,radius)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer gcw0,gcw1,gcw2
+      integer data_problem
+      REAL i_dens,i_vel(0:NDIM-1),i_pres,
+     &     o_dens,o_vel(0:NDIM-1),o_pres
+      REAL center(0:NDIM-1),radius
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:NDIM-1),xlo(0:NDIM-1),xhi(0:NDIM-1),gamma
+c variables in 2d cell indexed         
+      REAL
+     &     density(CELL3dVECG(ifirst,ilast,gcw)),
+     &     velocity(CELL3dVECG(ifirst,ilast,gcw),0:NDIM-1),
+     &     pressure(CELL3dVECG(ifirst,ilast,gcw))
+c
+c**********************************************************************     
+c
+      integer ic0,ic1,ic2
+      REAL xc(0:NDIM-1)
+      REAL angle,phi,rad2,rad3,x0,x1,x2
+c
+c     write(6,*) "Inside eulerinitsphere"
+c     write(6,*) "data_problem= ",data_problem
+c     write(6,*) "dx= ",dx(0), dx(1), dx(2)
+c     write(6,*) "xlo= ",xlo(0), xlo(1),xhi(2)
+c     write(6,*) "xhi= ",xhi(0), xhi(1),xhi(2)
+c     write(6,*) "ifirst= ",ifirst0,ifirst1,ifirst2
+c     write(6,*) "ilast= ",ilast0,ilast1,ilast2
+c     write(6,*) "gamma= ",gamma
+c     write(6,*) "front= ",front(0),front(1),front(2),front(3)
+c     write(6,*) "     = ",front(4),front(5)
+c     call flush(6)
+
+      do ic2=ifirst2,ilast2
+        xc(2) = xlo(2)+dx(2)*(dble(ic2-ifirst2)+half)
+        x2 = xc(2)-center(2)
+        do ic1=ifirst1,ilast1
+           xc(1) = xlo(1)+dx(1)*(dble(ic1-ifirst1)+half)
+           x1 = xc(1)-center(1)
+           do ic0=ifirst0,ilast0
+              xc(0) = xlo(0)+dx(0)*(dble(ic0-ifirst0)+half)
+              x0 = xc(0)-center(0)
+              if (x1.eq.zero .and. x0.eq.zero) then
+                angle = zero
+              else
+                angle = atan2(x1,x0)
+              endif
+              rad2 = sqrt(x0**2+x1**2)
+              if (rad2.eq.zero .and. x2.eq.zero) then
+                phi = zero
+              else
+                phi  = atan2(rad2,x2)
+              endif
+              rad3 = sqrt(rad2**2+x2**2)
+              if (rad3.lt.radius) then
+                 density(ic0,ic1,ic2)   = i_dens
+                 velocity(ic0,ic1,ic2,0)= i_vel(0)*sin(phi)*cos(angle)
+                 velocity(ic0,ic1,ic2,1)= i_vel(1)*sin(phi)*sin(angle)
+                 velocity(ic0,ic1,ic2,2)= i_vel(2)*cos(phi)
+                 pressure(ic0,ic1,ic2)  = i_pres
+              else
+                 density(ic0,ic1,ic2)   = o_dens
+                 velocity(ic0,ic1,ic2,0)= o_vel(0)*sin(phi)*cos(angle)
+                 velocity(ic0,ic1,ic2,1)= o_vel(1)*sin(phi)*sin(angle)
+                 velocity(ic0,ic1,ic2,2)= o_vel(2)*cos(phi)
+                 pressure(ic0,ic1,ic2)  = o_pres
+              endif
+           enddo
+        enddo
+      enddo
+      return
+      end   
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/m4flux2d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/m4flux2d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,267 @@
+define(riemann_solve,`dnl
+c     write(6,*) "checking onedr sol in riemann solve  "
+c     write(6,*) "         dt= ",dt
+c     write(6,*) "  calculating flux$1, 1+extra_cell= ",$3
+c     write(6,*) "  ic$2=",ifirst$2-1-$3,ilast$2+1+$3
+c     write(6,*) "  ie$1=",ifirst$1-1-$3,ilast$1+1+1+$3
+
+      if (rpchoice.eq.APPROX_RIEM_SOLVE
+     &    .or. rpchoice.eq.EXACT_RIEM_SOLVE ) then
+
+      do ic$2=ifirst$2-$3,    
+     &        ilast$2+$3
+         do ie$1=ifirst$1-$3,
+     &           ilast$1+1+$3
+ 
+c           ************************************************************
+c           *  Assign left and right states.  Note only normal vel used.
+c           ************************************************************
+            stateL(1) = trlft$1(ie$1,ic$2,1)
+            stateL(2) = trlft$1(ie$1,ic$2,2+$1)
+            stateL(3) = trlft$1(ie$1,ic$2,NEQU)
+  
+            stateR(1) = trrgt$1(ie$1,ic$2,1)
+            stateR(2) = trrgt$1(ie$1,ic$2,2+$1)
+            stateR(3) = trrgt$1(ie$1,ic$2,NEQU)
+
+            if (rpchoice.eq.APPROX_RIEM_SOLVE) then
+               call gas1dapproxrp2d(gamma,stateL,stateR,riemst)
+            else 
+               call gas1dexactrp2d(gamma,smallr,stateL,stateR,riemst)
+            endif
+
+            if (riemst(2).le.zero) then
+               vel_tan=trrgt$1(ie$1,ic$2,2+$2)
+            else
+               vel_tan=trlft$1(ie$1,ic$2,2+$2)
+            endif
+
+            mom$1=riemst(1)*riemst(2)
+            v2norm = riemst(2)**2+vel_tan**2
+            Hent = riemst(3)/gam_min_one + v2norm*riemst(1)/two
+
+            flux$1(ie$1,ic$2,1)= dt*mom$1
+            flux$1(ie$1,ic$2,2+$1)= dt*(riemst(3)+mom$1*riemst(2))
+            flux$1(ie$1,ic$2,2+$2)= dt*mom$1*vel_tan 
+            flux$1(ie$1,ic$2,NEQU)= dt*riemst(2)*(Hent+riemst(3))
+
+         enddo
+      enddo
+
+      elseif (rpchoice.eq.HLLC_RIEM_SOLVE) then
+
+      do ic$2=ifirst$2-$3,
+     &        ilast$2+$3
+         do ie$1=ifirst$1-$3,
+     &           ilast$1+1+$3
+ 
+c        ************************************************************
+c        *  Assign left and right states.
+c        *  Note all vel comps used for Roe average.
+c        ************************************************************
+         do j=1,NEQU
+            stateL(j) = trlft$1(ie$1,ic$2,j)
+            stateR(j) = trrgt$1(ie$1,ic$2,j)
+         enddo
+
+c        ************************************************************
+c        *  Calculate bounding signal speeds. To do this, need the
+c        *  Roe-average of the velocity and sound speed.
+c        ************************************************************
+         w    = one / ( one + sqrt( stateR(1)/stateL(1) ) )
+         omw  = one - w
+         hat(2+$1) = w*stateL(2+$1) + omw*stateR(2+$1)
+         aLsq = gamma * stateL(NEQU) / stateL(1)
+         aRsq = gamma * stateR(NEQU) / stateR(1)
+         hat(NEQU+1) = sqrt( w*aLsq + omw*aRsq
+     &               + half*gam_min_one*w*omw*(
+     &                  (stateR(2)-stateL(2))**2
+     &                + (stateR(3)-stateL(3))**2 ) )
+
+         sL = min(stateL(2+$1) - sqrt(aLsq), hat(2+$1) - hat(NEQU+1))
+         sR = max(stateR(2+$1) + sqrt(aRsq), hat(2+$1) + hat(NEQU+1))
+         mfL = stateL(1) * ( sL - stateL(2+$1) )
+         mfR = stateR(1) * ( sR - stateR(2+$1) )
+         sM  = ( stateR(NEQU) - stateL(NEQU)
+     &     + mfL*stateL(2+$1) - mfR*stateR(2+$1) ) / ( mfL - mfR )
+
+c        ************************************************************
+c        *  Calculate flux starting at upwind state.
+c        ************************************************************
+         if ( sM.gt.zero ) then
+
+c           *********************************************************
+c           * Flow is to the right; start from left state.
+c           *********************************************************
+            flux(1)   = stateL(1) * stateL(2+$1)
+            flux(2+$1) = flux(1) * stateL(2+$1) + stateL(NEQU)
+            flux(3-$1) = flux(1) * stateL(3-$1)
+            keL = half * (stateL(2)**2 + stateL(3)**2)
+            flux(NEQU) = flux(1) * (aLsq / gam_min_one + keL)
+
+c           *********************************************************
+c           * Check if flow is subsonic.
+c           *********************************************************
+            if ( sL.lt.zero ) then
+
+c              ******************************************************
+c              * Add contribution from left acoustic wave.
+c              ******************************************************
+               denom = one / (sL-sM)
+               star(1)    = stateL(1) * (sL-stateL(2+$1)) * denom
+               star(2+$1) = sM
+               star(3-$1) = stateL(3-$1)
+               star(NEQU) = stateL(NEQU)*( one + gamma * denom
+     &                                   * ( sM-stateL(2+$1) ) )
+     &                    + half * gam_min_one
+     &                        * star(1) * ( sM-stateL(2+$1) )**2
+
+               diff(1) = star(1) - stateL(1)
+               diff(2) = star(1)*star(2) - stateL(1)*stateL(2)
+               diff(3) = star(1)*star(3) - stateL(1)*stateL(3)
+               diff(NEQU) = ( star(NEQU)-stateL(NEQU) )
+     &                 / gam_min_one
+     &                 + half * star(1) * (star(2)**2 + star(3)**2)
+     &                         - stateL(1) * keL
+
+               do j=1,NEQU
+                  flux(j) = flux(j) + sL*diff(j)
+               enddo
+
+            endif
+
+         else
+
+c           *********************************************************
+c           *  Flow is to the left; start from right state.
+c           *********************************************************
+            flux(1)   = stateR(1) * stateR(2+$1)
+            flux(2+$1) = flux(1) * stateR(2+$1) + stateR(NEQU)
+            flux(3-$1) = flux(1) * stateR(3-$1)
+            keR = half * (stateR(2)**2 + stateR(3)**2)
+            flux(NEQU)   = flux(1) * (aRsq / gam_min_one + keR)
+
+c           *********************************************************
+c           * Check if flow is subsonic.
+c           *********************************************************
+            if ( sR.gt.zero ) then
+
+c              ******************************************************
+c              * Add contribution from right acoustic wave.
+c              ******************************************************
+               denom = one / (sR-sM)
+               star(1)    = stateR(1) * (sR-stateR(2+$1)) * denom
+               star(2+$1) = sM
+               star(3-$1) = stateR(3-$1)
+               star(NEQU) = stateR(NEQU) * (1 + gamma * denom
+     &                                   * ( sM-stateR(2+$1) ) )
+     &                    + half * gam_min_one
+     &                           * star(1) * ( sM-stateR(2+$1) )**2
+
+               diff(1) = star(1) - stateR(1)
+               diff(2) = star(1)*star(2) - stateR(1)*stateR(2)
+               diff(3) = star(1)*star(3) - stateR(1)*stateR(3)
+               diff(NEQU) = ( star(NEQU)-stateR(NEQU) )
+     &                 / gam_min_one
+     &                 + half * star(1) * (star(2)**2 + star(3)**2)
+     &                      - stateR(1) * keR
+
+               do j=1,NEQU
+                 flux(j) = flux(j) + sR*diff(j)
+               enddo
+
+            endif
+
+         endif
+
+c        ************************************************************
+c        *  Assign average interface fluxes.
+c        ************************************************************
+         do j=1,NEQU
+            flux$1(ie$1,ic$2,j) = dt * flux(j)
+         enddo
+
+         enddo
+      enddo
+
+      endif
+')dnl
+define(artificial_viscosity1,`dnl
+           do ic$2=ifirst$2-(FLUXG-1),ilast$2+(FLUXG-1)
+             do ie$1=ifirst$1-(FLUXG-1),ilast$1+(FLUXG)
+               maxeig =trrgt$1(ie$1,ic$2,4)-trlft$1(ie$1,ic$2,4)
+               vcoef = tenth*abs(maxeig)
+     
+               mom0L=trlft$1(ie$1,ic$2,1)*trlft$1(ie$1,ic$2,2)
+               mom1L=trlft$1(ie$1,ic$2,1)*trlft$1(ie$1,ic$2,3)
+               v2norm = mom1L**2+mom0L**2
+               enerL=trlft$1(ie$1,ic$2,NEQU)/gam_min_one+
+     &                v2norm/(trlft$1(ie$1,ic$2,1)*two)
+               mom0R=trrgt$1(ie$1,ic$2,1)*trrgt$1(ie$1,ic$2,2)
+               mom1R=trrgt$1(ie$1,ic$2,1)*trrgt$1(ie$1,ic$2,3)
+               v2norm = mom1R**2+mom0R**2
+               enerR=trrgt$1(ie$1,ic$2,NEQU)/gam_min_one+
+     &                  v2norm/(trrgt$1(ie$1,ic$2,1)*two)
+  
+               vcorr(1) = dt*vcoef*
+     &           (trrgt$1(ie$1,ic$2,1)-trlft$1(ie$1,ic$2,1))
+               vcorr(2) = dt*vcoef*(mom0R-mom0L)
+               vcorr(3) = dt*vcoef*(mom1R-mom1L)
+               vcorr(NEQU) = dt*vcoef*(enerR-enerL)
+               do j=1,NEQU
+                 flux$1(ie$1,ic$2,j)= flux$1(ie$1,ic$2,j) 
+     &                                     -vcorr(j)
+               enddo
+             enddo
+           enddo
+')dnl
+define(artificial_viscosity2,`dnl
+        do ic1=ifirst1-(FLUXG-1),ilast1+(FLUXG-1)
+          do ie0=ifirst0-(FLUXG-1),ilast0+(FLUXG)
+            maxeig =pressure(ie0,ic1)-pressure(ie0-1,ic1)
+            vcoef = tenth*abs(maxeig)
+            mom0L=density(ie0-1,ic1,1)*velocity(ie0-1,ic1,0)
+            mom1L=density(ie0-1,ic1,1)*velocity(ie0-1,ic1,1)
+            mom0R=density(ie0  ,ic1,1)*velocity(ie0  ,ic1,0)
+                mom1R=density(ie0  ,ic1,1)*velocity(ie0  ,ic1,1)
+            v2norm = mom1L**2+mom0L**2
+            enerL=pressure(ie0-1,ic1)/gam_min_one+
+     &               v2norm/(density(ie0-1,ic1)*two)
+            v2norm = mom1R**2+mom0R**2
+            enerR=pressure(ie0,ic1)/gam_min_one+
+     &             v2norm/(density(ie0,ic1)*two)
+            vcorr1= dt*vcoef*(density(ie0,ic1)-density(ie0-1,ic1))
+            vcorr2= dt*vcoef*(mom0R-mom0L)
+            vcorr3= dt*vcoef*(mom1R-mom1L)
+            vcorr4= dt*vcoef*(enerR-enerL)
+            flux0(ie0,ic1,1)= flux0(ie0,ic1,1) - vcorr1
+            flux0(ie0,ic1,2)= flux0(ie0,ic1,2) - vcorr2
+            flux0(ie0,ic1,3)= flux0(ie0,ic1,3) - vcorr3
+            flux0(ie0,ic1,4)= flux0(ie0,ic1,4) - vcorr4
+          enddo
+        enddo
+        do ic0=ifirst0,ilast0
+          do ie1=ifirst1,ilast1+1
+            maxeig =pressure(ic0,ie1)-pressure(ic0-1,ie1)
+            vcoef = tenth*abs(maxeig)
+            mom0L=density(ic0,ie1-1,1)*velocity(ic0,ie1-1,0)
+            mom1L=density(ic0,ie1-1,1)*velocity(ic0,ie1-1,1)
+            mom0R=density(ic0,ie1  ,1)*velocity(ic0,ie1  ,0)
+            mom1R=density(ic0,ie1  ,1)*velocity(ic0,ie1  ,1)
+            v2norm = mom1L**2+mom0L**2
+            enerL=pressure(ic0,ie1-1)/gam_min_one+
+     &             v2norm/(density(ic0,ie1-1)*two)
+            v2norm = mom1R**2+mom0R**2
+            enerR=pressure(ic0,ie1)/gam_min_one+
+     &             v2norm/(density(ic0,ie1)*two)
+            vcorr1= dt*vcoef*(density(ic0,ie1)-density(ic0,ie1-1))
+            vcorr2= dt*vcoef*(mom0R-mom0L)
+            vcorr3= dt*vcoef*(mom1R-mom1L)
+            vcorr4= dt*vcoef*(enerR-enerL)
+            flux1(ie1,ic0,1)= flux1(ie1,ic0,1) - vcorr1
+            flux1(ie1,ic0,2)= flux1(ie1,ic0,2) - vcorr2
+            flux1(ie1,ic0,3)= flux1(ie1,ic0,3) - vcorr3
+            flux1(ie1,ic0,4)= flux1(ie1,ic0,4) - vcorr4
+          enddo
+        enddo
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/m4flux3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/m4flux3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,364 @@
+define(riemann_solve,`dnl
+c     write(6,*) "checking onedr sol in riemann solve  "
+c     write(6,*) "         dt= ",dt
+
+      if (rpchoice.eq.APPROX_RIEM_SOLVE
+     &    .or. rpchoice.eq.EXACT_RIEM_SOLVE ) then
+c     ************************************************************
+c     *  Approximate Riemann solver and exact Riemann solver have
+c     *  identical setup and post-process phases.
+c     ************************************************************
+
+      do ic$3=ifirst$3-$6,ilast$3+$6
+         do ic$2=ifirst$2-$5,ilast$2+$5
+           do ie$1=ifirst$1-(FLUXG-1),ilast$1+1+(FLUXG-1)
+
+c          ************************************************************
+c          *  Assign left and right states.  Note only normal vel used.
+c          ************************************************************
+              stateL(1) = trlft$1(ie$1,$4,1)
+              stateL(2) = trlft$1(ie$1,$4,2+$1)
+              stateL(3) = trlft$1(ie$1,$4,NEQU)
+
+              stateR(1) = trrgt$1(ie$1,$4,1)
+              stateR(2) = trrgt$1(ie$1,$4,2+$1)
+              stateR(3) = trrgt$1(ie$1,$4,NEQU)
+
+              if (rpchoice.eq.APPROX_RIEM_SOLVE) then
+                 call gas1dapproxrp3d(gamma,stateL,stateR,riemst)
+              else if (rpchoice.eq.EXACT_RIEM_SOLVE) then
+                 call gas1dexactrp3d(gamma,smallr,stateL,stateR,riemst)
+              endif
+
+              if (riemst(2).le.zero) then
+                 vel($2)=trrgt$1(ie$1,$4,2+$2)
+                 vel($3)=trrgt$1(ie$1,$4,2+$3)
+              else
+                 vel($2)=trlft$1(ie$1,$4,2+$2)
+                 vel($3)=trlft$1(ie$1,$4,2+$3)
+              endif
+              vel($1)=riemst(2)
+
+              mom$1 =riemst(1)*vel($1)
+              v2norm = vel(0)**2+vel(1)**2+vel(2)**2
+              Hent =riemst(3)/gam_min_one+v2norm*riemst(1)/two
+
+              flux$1(ie$1,$4,1)= dt*mom$1
+              flux$1(ie$1,$4,2+$1)= dt*(mom$1*vel($1)+riemst(3))
+              flux$1(ie$1,$4,2+$2)= dt*mom$1*vel($2)
+              flux$1(ie$1,$4,2+$3)= dt*mom$1*vel($3)
+              flux$1(ie$1,$4,5)= dt*riemst(2)*(Hent+riemst(3))
+
+           enddo
+         enddo
+      enddo
+
+      elseif (rpchoice.eq.HLLC_RIEM_SOLVE) then
+c     ******************************************************************
+c     *  HLLC Riemann Solver
+c     ******************************************************************
+
+      do ic$3=ifirst$3-$6,ilast$3+$6
+         do ic$2=ifirst$2-$5,ilast$2+$5
+            do ie$1=ifirst$1-(FLUXG-1),ilast$1+1+(FLUXG-1)
+
+c           ************************************************************
+c           *  Assign left and right states.
+c           ************************************************************
+            do j=1,NEQU
+               stateL(j) = trlft$1(ie$1,$4,j)
+               stateR(j) = trrgt$1(ie$1,$4,j)
+            enddo
+
+c           ************************************************************
+c           *  Calculate bounding signal speeds. To do this, need the
+c           *  Roe-average of the velocity and sound speed.
+c           ************************************************************
+            w    = one / ( one + sqrt( stateR(1)/stateL(1) ) )
+            omw  = one - w
+            hat(2+$1) = w*stateL(2+$1) + omw*stateR(2+$1)
+            aLsq = gamma * stateL(NEQU) / stateL(1)
+            aRsq = gamma * stateR(NEQU) / stateR(1)
+            hat(NEQU+1) = sqrt( w*aLsq + omw*aRsq
+     &                 + half*gam_min_one*w*omw*(
+     &                     (stateR(2)-stateL(2))**2
+     &                   + (stateR(3)-stateL(3))**2
+     &                   + (stateR(4)-stateL(4))**2 ) )
+
+            sL  = min( stateL(2+$1) - sqrt(aLsq),
+     &                    hat(2+$1) - hat(NEQU+1) )
+            sR  = max( stateR(2+$1) + sqrt(aRsq),
+     &                    hat(2+$1) + hat(NEQU+1) )
+            mfL = stateL(1) * ( sL - stateL(2+$1) )
+            mfR = stateR(1) * ( sR - stateR(2+$1) )
+            sM  = ( stateR(NEQU) - stateL(NEQU)
+     &             + mfL*stateL(2+$1) - mfR*stateR(2+$1) )/(mfL-mfR)
+
+c           ************************************************************
+c           *  Calculate flux starting at upwind state.
+c           ************************************************************
+            if ( sM.gt.zero ) then
+
+c              *********************************************************
+c              * Flow is to the right; start from left state.
+c              *********************************************************
+               flux(1)   = stateL(1) * stateL(2+$1)
+               flux(2+$1) = flux(1) * stateL(2+$1) + stateL(NEQU)
+               flux(2+$2) = flux(1) * stateL(2+$2)
+               flux(2+$3) = flux(1) * stateL(2+$3)
+               keL = half * (stateL(2)**2 + stateL(3)**2 +
+     &                               stateL(4)**2)
+               flux(NEQU) = flux(1)
+     &                    * (aLsq / gam_min_one + keL)
+
+c              *********************************************************
+c              * Check if flow is subsonic.
+c              *********************************************************
+               if ( sL.lt.zero ) then
+
+c                 ******************************************************
+c                 * Add contribution from left acoustic wave.
+c                 ******************************************************
+                  denom = one / (sL-sM)
+                  star(1)    = stateL(1) * (sL-stateL(2+$1)) * denom
+                  star(2+$1) = sM
+                  star(2+$2) = stateL(2+$2)
+                  star(2+$3) = stateL(2+$3)
+                  star(NEQU) = stateL(NEQU)*( one + gamma * denom
+     &                                        * ( sM-stateL(2+$1) ) )
+     &                       + half * gam_min_one
+     &                              * star(1) * ( sM-stateL(2+$1) )**2
+
+                  diff(1) = star(1) - stateL(1)
+                  diff(2) = star(1)*star(2) - stateL(1)*stateL(2)
+                  diff(3) = star(1)*star(3) - stateL(1)*stateL(3)
+                  diff(4) = star(1)*star(4) - stateL(1)*stateL(4)
+                  diff(NEQU) = ( star(NEQU)-stateL(NEQU) )
+     &               / gam_min_one
+     &               + half * star(1) *
+     &                   (star(2)**2 + star(3)**2+ star(4)**2)
+     &               - stateL(1) * keL
+
+                  do j=1,NEQU
+                    flux(j) = flux(j) + sL*diff(j)
+                  enddo
+
+               endif
+
+            else
+
+c              *********************************************************
+c              *  Flow is to the left; start from right state.
+c              *********************************************************
+               flux(1)   = stateR(1) * stateR(2+$1)
+               flux(2+$1) = flux(1) * stateR(2+$1) + stateR(NEQU)
+               flux(2+$2) = flux(1) * stateR(2+$2)
+               flux(2+$3) = flux(1) * stateR(2+$3)
+               keR = half * (stateR(2)**2 + stateR(3)**2 +
+     &                               stateR(4)**2)
+               flux(NEQU) = flux(1)
+     &                    * (aRsq / gam_min_one + keR)
+
+c              *********************************************************
+c              * Check if flow is subsonic.
+c              *********************************************************
+               if ( sR.gt.zero ) then
+
+c                 ******************************************************
+c                 * Add contribution from right acoustic wave.
+c                 ******************************************************
+                  denom = one / (sR-sM)
+                  star(1)    = stateR(1) * (sR-stateR(2+$1)) * denom
+                  star(2+$1) = sM
+                  star(2+$2) = stateR(2+$2)
+                  star(2+$3) = stateR(2+$3)
+                  star(NEQU) = stateR(NEQU)*(1 + gamma * denom
+     &                                      * ( sM-stateR(2+$1) ) )
+     &                       + half * gam_min_one
+     &                              * star(1) * ( sM-stateR(2+$1) )**2
+
+                  diff(1) = star(1) - stateR(1)
+                  diff(2) = star(1)*star(2) - stateR(1)*stateR(2)
+                  diff(3) = star(1)*star(3) - stateR(1)*stateR(3)
+                  diff(4) = star(1)*star(4) - stateR(1)*stateR(4)
+                  diff(NEQU) = ( star(NEQU)-stateR(NEQU) )
+     &                       / gam_min_one
+     &                       + half * star(1) *
+     &                         (star(2)**2 + star(3)**2+ star(4)**2)
+     &                       - stateR(1) * keR
+
+                  do j=1,NEQU
+                     flux(j) = flux(j) + sR*diff(j)
+                  enddo
+
+               endif
+
+            endif
+
+c        ************************************************************
+c        *  Assign average interface fluxes.
+c        ************************************************************
+            do j=1,NEQU
+               flux$1(ie$1,$4,j) = dt * flux(j)
+            enddo
+
+            enddo
+         enddo
+      enddo
+
+      endif
+')dnl
+define(correc_flux2d,`dnl
+c   correct the $1-direction with $3-fluxes
+      do ic$5=ifirst$5-(FLUXG),ilast$5+(FLUXG)
+         do ic$3=ifirst$3-(FLUXG-1),ilast$3+(FLUXG-1)
+           do ic$1=ifirst$1-(FLUXG),ilast$1+(FLUXG)
+             rho  = density(ic0,ic1,ic2)
+             vel0 = velocity(ic0,ic1,ic2,0)
+             vel1 = velocity(ic0,ic1,ic2,1)
+             vel2 = velocity(ic0,ic1,ic2,2)
+             v2norm= vel0**2+vel1**2 +vel2**2
+             do k=1,NEQU
+               trnsvers(k)=
+     &           (flux$3(ic$3+1,$4,k)-flux$3(ic$3,$4,k))*0.5/dx($3)
+             enddo
+c
+             ttv(1)= trnsvers(1)
+             ttv(2)= (trnsvers(2) - vel0*trnsvers(1))/rho
+             ttv(3)= (trnsvers(3) - vel1*trnsvers(1))/rho
+             ttv(4)= (trnsvers(4) - vel2*trnsvers(1))/rho
+             ttv(NEQU)= (v2norm*half*trnsvers(1) -
+     &                vel0*trnsvers(2) - vel1*trnsvers(3) -
+     &                vel2*trnsvers(4) +
+     &                trnsvers(NEQU))*gam_min_one
+             do k=1,NEQU
+               ttracelft$1(ic$1+1,$2,k)=tracelft$1(ic$1+1,$2,k)
+     &                                    - ttv(k)
+               ttracergt$1(ic$1  ,$2,k)=tracergt$1(ic$1  ,$2,k)
+     &                                    - ttv(k)
+             enddo
+           enddo
+         enddo
+      enddo
+')dnl
+define(correc_flux3d,`dnl
+c   correct the $1-direction with $2$3-fluxes
+      do ic$1=ifirst$1-FLUXG,ilast$1+FLUXG
+         do ic$3=ifirst$3-(FLUXG-1),ilast$3+(FLUXG-1)
+           do ic$2=ifirst$2-(FLUXG-1),ilast$2+(FLUXG-1)
+             rho  = density(ic0,ic1,ic2)
+             vel0 = velocity(ic0,ic1,ic2,0)
+             vel1 = velocity(ic0,ic1,ic2,1)
+             vel2 = velocity(ic0,ic1,ic2,2)
+             v2norm= vel0**2+vel1**2 +vel2**2
+             do k=1,NEQU
+               trnsvers(k)=0.5*(
+     &          (flux$4(ic$2+1,$6,k)-flux$4(ic$2,$6,k))/dx($2)+
+     &          (flux$5(ic$3+1,$7,k)-flux$5(ic$3,$7,k))/dx($3))
+             enddo
+  
+             ttv(1)= trnsvers(1)
+             ttv(2)= (trnsvers(2) - vel0*trnsvers(1))/rho
+             ttv(3)= (trnsvers(3) - vel1*trnsvers(1))/rho
+             ttv(4)= (trnsvers(4) - vel2*trnsvers(1))/rho
+             ttv(NEQU)= (v2norm*half*trnsvers(1) -
+     &                vel0*trnsvers(2) - vel1*trnsvers(3) -
+     &                vel2*trnsvers(4) +
+     &                trnsvers(NEQU))*gam_min_one
+             do k=1,NEQU
+               tracelft$1(ic$1+1,ic$2,ic$3,k)=tracelft$1(ic$1+1,ic$2,ic$3,k)
+     &                                           - ttv(k)
+               tracergt$1(ic$1  ,ic$2,ic$3,k)=tracergt$1(ic$1  ,ic$2,ic$3,k)
+     &                                           - ttv(k)
+             enddo
+           enddo
+         enddo
+      enddo
+')dnl
+define(artificial_viscosity1,`dnl
+      do ic$3=ifirst$3-(FLUXG-1),ilast$3+(FLUXG-1)
+         do ic$2=ifirst$2-(FLUXG-1),ilast$2+(FLUXG-1)
+           do ie$1=ifirst$1-(FLUXG-1),ilast$1+(FLUXG)
+             maxeig =trrgt$1(ie$1,ic$2,ic$3,NEQU)-trlft$1(ie$1,ic$2,ic$3,NEQU)
+             vcoef = tenth*abs(maxeig)
+   
+             mom0L=trlft$1(ie$1,ic$2,ic$3,1)*trlft$1(ie$1,ic$2,ic$3,2)
+             mom1L=trlft$1(ie$1,ic$2,ic$3,1)*trlft$1(ie$1,ic$2,ic$3,3)
+             mom2L=trlft$1(ie$1,ic$2,ic$3,1)*trlft$1(ie$1,ic$2,ic$3,4)
+             v2norm = mom1L**2+mom0L**2+mom2L**2
+             enerL=trlft$1(ie$1,ic$2,ic$3,NEQU)/gam_min_one+
+     &                v2norm/(trlft$1(ie$1,ic$2,ic$3,1)*two)
+             mom0R=trrgt$1(ie$1,ic$2,ic$3,1)*trrgt$1(ie$1,ic$2,ic$3,2)
+             mom1R=trrgt$1(ie$1,ic$2,ic$3,1)*trrgt$1(ie$1,ic$2,ic$3,3)
+             mom2R=trrgt$1(ie$1,ic$2,ic$3,1)*trrgt$1(ie$1,ic$2,ic$3,4)
+             v2norm = mom1R**2+mom0R**2+mom2R**2
+             enerR=trrgt$1(ie$1,ic$2,ic$3,NEQU)/gam_min_one+
+     &             v2norm/(trrgt$1(ie$1,ic$2,ic$3,1)*two)
+
+             vcorr(1) = dt*vcoef*
+     &         (trrgt$1(ie$1,ic$2,ic$3,1)-trlft$1(ie$1,ic$2,ic$3,1))
+             vcorr(2) = dt*vcoef*(mom0R-mom0L)
+             vcorr(3) = dt*vcoef*(mom1R-mom1L)
+             vcorr(4) = dt*vcoef*(mom2R-mom2L)
+             vcorr(NEQU) = dt*vcoef*(enerR-enerL)
+             do j=1,NEQU
+                flux$1(ie$1,ic$2,ic$3,j)=flux$1(ie$1,ic$2,ic$3,j)
+     &                                   -vcorr(j)
+             enddo
+           enddo
+         enddo
+      enddo
+')dnl
+c
+define(artificial_viscosity2,`dnl
+      do ic1=ifirst1,ilast1
+        do ie0=ifirst0,ilast0+1
+          maxeig =pressure(ie0,ic1)-pressure(ie0-1,ic1)
+          vcoef = tenth*abs(maxeig)
+          mom0L=density(ie0-1,ic1,1)*velocity(ie0-1,ic1,0)
+          mom1L=density(ie0-1,ic1,1)*velocity(ie0-1,ic1,1)
+          mom0R=density(ie0  ,ic1,1)*velocity(ie0  ,ic1,0)
+          mom1R=density(ie0  ,ic1,1)*velocity(ie0  ,ic1,1)
+          v2norm = mom1L**2+mom0L**2
+          enerL=pressure(ie0-1,ic1)/gam_min_one+
+     &             v2norm/(density(ie0-1,ic1)*two)
+          v2norm = mom1R**2+mom0R**2
+          enerR=pressure(ie0,ic1)/gam_min_one+
+     &             v2norm/(density(ie0,ic1)*two)
+          vcorr(1)= dt*vcoef*(density(ie0,ic1)-density(ie0-1,ic1))
+          vcorr(2)= dt*vcoef*(mom0R-mom0L)
+          vcorr(3)= dt*vcoef*(mom1R-mom1L)
+          vcorr(4)= dt*vcoef*(mom2R-mom2L)
+          vcorr(NEQU)= dt*vcoef*(enerR-enerL)
+             do j=1,NEQU
+                flux0(ie0,ic1,ic2,j)=flux0(ie0,ic1,ic2,j)
+     &                                   -vcorr(j)
+             enddo
+        enddo
+      enddo
+      do ic0=ifirst0,ilast0
+        do ie1=ifirst1,ilast1+1
+          maxeig =pressure(ic0,ie1)-pressure(ic0-1,ie1)
+          vcoef = 0.1*abs(maxeig)
+          mom0L=density(ic0,ie1-1,1)*velocity(ic0,ie1-1,0)
+          mom1L=density(ic0,ie1-1,1)*velocity(ic0,ie1-1,1)
+          mom0R=density(ic0,ie1  ,1)*velocity(ic0,ie1  ,0)
+          mom1R=density(ic0,ie1  ,1)*velocity(ic0,ie1  ,1)
+          v2norm = mom1L**2+mom0L**2
+          enerL=pressure(ic0,ie1-1)/gam_min_one+
+     &             v2norm/(density(ic0,ie1-1)*two)
+          v2norm = mom1R**2+mom0R**2
+          enerR=pressure(ic0,ie1)/gam_min_one+
+     &             v2norm/(density(ic0,ie1)*two)
+          vcorr1= dt*vcoef*(density(ic0,ie1)-density(ic0,ie1-1))
+          vcorr2= dt*vcoef*(mom0R-mom0L)
+          vcorr3= dt*vcoef*(mom1R-mom1L)
+          vcorr4= dt*vcoef*(enerR-enerL)
+          flux1(ie1,ic0,1)= flux1(ie1,ic0,1) - vcorr1
+          flux1(ie1,ic0,2)= flux1(ie1,ic0,2) - vcorr2
+          flux1(ie1,ic0,3)= flux1(ie1,ic0,3) - vcorr3
+          flux1(ie1,ic0,4)= flux1(ie1,ic0,4) - vcorr4
+        enddo
+      enddo
+')dnl
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/m4fluxcorner3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/m4fluxcorner3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,236 @@
+define(st_third,`dnl
+      do ic$3=ifirst$3-FLUXG,ilast$3+FLUXG
+         do ic$2=ifirst$2-FLUXG,ilast$2+FLUXG
+           do ic$1=ifirst$1-(FLUXG-1),ilast$1+(FLUXG-1)
+             rho  = density(ic0,ic1,ic2)
+             vel0 = velocity(ic0,ic1,ic2,0)
+             vel1 = velocity(ic0,ic1,ic2,1)
+             vel2 = velocity(ic0,ic1,ic2,2)
+             pres = pressure(ic0,ic1,ic2)
+             v2norm= vel0**2+vel1**2 +vel2**2
+             do k=1,NEQU
+               trnsvers(k)=
+     &           (flux$1(ic$1+1,$4,k)-flux$1(ic$1,$4,k))/(3*dx($1))
+             enddo
+c
+             ttv(1)= trnsvers(1)
+             ttv(2)= (trnsvers(2) - vel0*trnsvers(1))/rho
+             ttv(3)= (trnsvers(3) - vel1*trnsvers(1))/rho
+             ttv(4)= (trnsvers(4) - vel2*trnsvers(1))/rho
+             ttv(NEQU)= (v2norm*half*trnsvers(1) -
+     &                vel0*trnsvers(2) - vel1*trnsvers(3) -
+     &                vel2*trnsvers(4) +
+     &                trnsvers(NEQU))*gam_min_one
+             st3(ic0,ic1,ic2,1)=rho -ttv(1)
+             st3(ic0,ic1,ic2,2)=vel0 -ttv(2)
+             st3(ic0,ic1,ic2,3)=vel1 -ttv(3)
+             st3(ic0,ic1,ic2,4)=vel2 -ttv(4)
+             st3(ic0,ic1,ic2,5)=pres -ttv(5)
+           enddo
+         enddo
+      enddo
+')dnl
+define(f_third,`dnl
+c     write(6,*) "checking onedr sol in riemann solve  "
+c     write(6,*) "         dt= ",dt
+      do ic$3=ifirst$3-FLUXG,ilast$3+FLUXG
+         do ic$2=ifirst$2-(FLUXG-1),ilast$2+(FLUXG-1)
+           do ic$1=ifirst$1-(FLUXG-1),ilast$1+FLUXG
+ 
+             stateL(1) = st3($5,1)
+             stateL(2) = st3($5,2+$1)
+             stateL(3) = st3($5,NEQU)
+             stateL(4) = stateL(3)/gam_min_one
+
+             stateR(1) = st3(ic0,ic1,ic2,1)
+             stateR(2) = st3(ic0,ic1,ic2,2+$1)
+             stateR(3) = st3(ic0,ic1,ic2,NEQU)
+             stateR(4) = stateR(3)/gam_min_one
+
+             if (rpchoice.eq.APPROX_RIEM_SOLVE) then
+                call gas1dapproxrp3d(gamma,stateL,stateR,riemst)
+             else if (rpchoice.eq.EXACT_RIEM_SOLVE) then
+                call gas1dexactrp3d(gamma,smallr,stateL,stateR,riemst)
+c            else if (rpchoice.eq.ROE_RIEM_SOLVE) then
+c            else if (rpchoice.eq.HLLC_RIEM_SOLVE) then
+             endif
+ 
+             if (riemst(2).le.zero) then
+               vel($2)=st3(ic0,ic1,ic2,2+$2)
+               vel($3)=st3(ic0,ic1,ic2,2+$3)
+             else
+               vel($2)=st3($5,2+$2)
+               vel($3)=st3($5,2+$3)
+             endif
+             vel($1)=riemst(2)
+
+             mom$1 =riemst(1)*vel($1)
+             v2norm = vel(0)**2+vel(1)**2+vel(2)**2
+             Hent =riemst(3)/gam_min_one+v2norm*riemst(1)/two
+             flux$1(ic$1,$4,1)= dt*mom$1
+             flux$1(ic$1,$4,2+$1)= dt*(mom$1*vel($1)+riemst(3))
+             flux$1(ic$1,$4,2+$2)= dt*mom$1*vel($2)
+             flux$1(ic$1,$4,2+$3)= dt*mom$1*vel($3)
+             flux$1(ic$1,$4,5)= dt*riemst(2)*(Hent+riemst(3))
+
+           enddo
+         enddo
+      enddo
+')dnl
+define(correc_fluxjt,`dnl
+c   correct the $2-direction with $3-fluxes
+      do ic$3=ifirst$3-(FLUXG-1),ilast$3+(FLUXG-1)
+        do ic$1=ifirst$1-(FLUXG-1),ilast$1+(FLUXG-1)
+           ic$2=ifirst$2-FLUXG
+           rho  = density(ic0,ic1,ic2)
+           vel0 = velocity(ic0,ic1,ic2,0)
+           vel1 = velocity(ic0,ic1,ic2,1)
+           vel2 = velocity(ic0,ic1,ic2,2)
+           v2norm= vel0**2+vel1**2 +vel2**2
+           do k=1,NEQU
+             trnsvers(k)=half*
+     &        (flux$3(ic$3+1,$4,k)-flux$3(ic$3,$4,k))/dx($3)
+           enddo
+  
+           ttv(1)= trnsvers(1)
+           ttv(2)= (trnsvers(2) - vel0*trnsvers(1))/rho
+           ttv(3)= (trnsvers(3) - vel1*trnsvers(1))/rho
+           ttv(4)= (trnsvers(4) - vel2*trnsvers(1))/rho
+           ttv(NEQU)= (v2norm*half*trnsvers(1) -
+     &              vel0*trnsvers(2) - vel1*trnsvers(3) -
+     &              vel2*trnsvers(4) +
+     &              trnsvers(NEQU))*gam_min_one
+           do k=1,NEQU
+             tracelft$2(ic$2+1,ic$1,ic$3,k)=tracelft$2(ic$2+1,ic$1,ic$3,k)
+     &                                         - ttv(k)
+           enddo
+           do ic$2=ifirst$2-(FLUXG-1),ilast$2+(FLUXG-1)
+             rho  = density(ic0,ic1,ic2)
+             vel0 = velocity(ic0,ic1,ic2,0)
+             vel1 = velocity(ic0,ic1,ic2,1)
+             vel2 = velocity(ic0,ic1,ic2,2)
+             v2norm= vel0**2+vel1**2 +vel2**2
+             do k=1,NEQU
+               trnsvers(k)=half*
+     &          (flux$3(ic$3+1,$4,k)-flux$3(ic$3,$4,k))/dx($3)
+             enddo
+  
+             ttv(1)= trnsvers(1)
+             ttv(2)= (trnsvers(2) - vel0*trnsvers(1))/rho
+             ttv(3)= (trnsvers(3) - vel1*trnsvers(1))/rho
+             ttv(4)= (trnsvers(4) - vel2*trnsvers(1))/rho
+             ttv(NEQU)= (v2norm*half*trnsvers(1) -
+     &                vel0*trnsvers(2) - vel1*trnsvers(3) -
+     &                vel2*trnsvers(4) +
+     &                trnsvers(NEQU))*gam_min_one
+             do k=1,NEQU
+               tracelft$2(ic$2+1,ic$1,ic$3,k)=tracelft$2(ic$2+1,ic$1,ic$3,k)
+     &                                           - ttv(k)
+               tracergt$2(ic$2  ,ic$1,ic$3,k)=tracergt$2(ic$2  ,ic$1,ic$3,k)
+     &                                           - ttv(k)
+             enddo
+           enddo
+           ic$2=ilast$2+FLUXG
+           rho  = density(ic0,ic1,ic2)
+           vel0 = velocity(ic0,ic1,ic2,0)
+           vel1 = velocity(ic0,ic1,ic2,1)
+           vel2 = velocity(ic0,ic1,ic2,2)
+           v2norm= vel0**2+vel1**2 +vel2**2
+           do k=1,NEQU
+             trnsvers(k)=half*
+     &        (flux$3(ic$3+1,$4,k)-flux$3(ic$3,$4,k))/dx($3)
+           enddo
+  
+           ttv(1)= trnsvers(1)
+           ttv(2)= (trnsvers(2) - vel0*trnsvers(1))/rho
+           ttv(3)= (trnsvers(3) - vel1*trnsvers(1))/rho
+           ttv(4)= (trnsvers(4) - vel2*trnsvers(1))/rho
+           ttv(NEQU)= (v2norm*half*trnsvers(1) -
+     &              vel0*trnsvers(2) - vel1*trnsvers(3) -
+     &              vel2*trnsvers(4) +
+     &              trnsvers(NEQU))*gam_min_one
+           do k=1,NEQU
+             tracergt$2(ic$2  ,ic$1,ic$3,k)=tracergt$2(ic$2  ,ic$1,ic$3,k)
+     &                                        - ttv(k)
+           enddo
+         enddo
+      enddo
+c
+c   correct the $3-direction with $2-fluxes
+      do ic$1=ifirst$1-(FLUXG-1),ilast$1+(FLUXG-1)
+        do ic$2=ifirst$2-(FLUXG-1),ilast$2+(FLUXG-1)
+           ic$3=ifirst$3-FLUXG
+           rho  = density(ic0,ic1,ic2)
+           vel0 = velocity(ic0,ic1,ic2,0)
+           vel1 = velocity(ic0,ic1,ic2,1)
+           vel2 = velocity(ic0,ic1,ic2,2)
+           v2norm= vel0**2+vel1**2 +vel2**2
+           do k=1,NEQU
+             trnsvers(k)=half*
+     &        (flux$2(ic$2+1,$5,k)-flux$2(ic$2,$5,k))/dx($2)
+           enddo
+  
+           ttv(1)= trnsvers(1)
+           ttv(2)= (trnsvers(2) - vel0*trnsvers(1))/rho
+           ttv(3)= (trnsvers(3) - vel1*trnsvers(1))/rho
+           ttv(4)= (trnsvers(4) - vel2*trnsvers(1))/rho
+           ttv(NEQU)= (v2norm*half*trnsvers(1) -
+     &              vel0*trnsvers(2) - vel1*trnsvers(3) -
+     &              vel2*trnsvers(4) +
+     &              trnsvers(NEQU))*gam_min_one
+           do k=1,NEQU
+             tracelft$3(ic$3+1,ic$2,ic$1,k)=tracelft$3(ic$3+1,ic$2,ic$1,k)
+     &                                         - ttv(k)
+           enddo
+           do ic$3=ifirst$3-(FLUXG-1),ilast$3+(FLUXG-1)
+             rho  = density(ic0,ic1,ic2)
+             vel0 = velocity(ic0,ic1,ic2,0)
+             vel1 = velocity(ic0,ic1,ic2,1)
+             vel2 = velocity(ic0,ic1,ic2,2)
+             v2norm= vel0**2+vel1**2 +vel2**2
+             do k=1,NEQU
+               trnsvers(k)=half*
+     &          (flux$2(ic$2+1,$5,k)-flux$2(ic$2,$5,k))/dx($2)
+             enddo
+  
+             ttv(1)= trnsvers(1)
+             ttv(2)= (trnsvers(2) - vel0*trnsvers(1))/rho
+             ttv(3)= (trnsvers(3) - vel1*trnsvers(1))/rho
+             ttv(4)= (trnsvers(4) - vel2*trnsvers(1))/rho
+             ttv(NEQU)= (v2norm*half*trnsvers(1) -
+     &                vel0*trnsvers(2) - vel1*trnsvers(3) -
+     &                vel2*trnsvers(4) +
+     &                trnsvers(NEQU))*gam_min_one
+             do k=1,NEQU
+               tracelft$3(ic$3+1,ic$2,ic$1,k)=tracelft$3(ic$3+1,ic$2,ic$1,k)
+     &                                           - ttv(k)
+               tracergt$3(ic$3  ,ic$2,ic$1,k)=tracergt$3(ic$3  ,ic$2,ic$1,k)
+     &                                           - ttv(k)
+             enddo
+           enddo
+           ic$3=ilast$3+FLUXG
+           rho  = density(ic0,ic1,ic2)
+           vel0 = velocity(ic0,ic1,ic2,0)
+           vel1 = velocity(ic0,ic1,ic2,1)
+           vel2 = velocity(ic0,ic1,ic2,2)
+           v2norm= vel0**2+vel1**2 +vel2**2
+           do k=1,NEQU
+             trnsvers(k)=half*
+     &        (flux$2(ic$2+1,$5,k)-flux$2(ic$2,$5,k))/dx($2)
+           enddo
+  
+           ttv(1)= trnsvers(1)
+           ttv(2)= (trnsvers(2) - vel0*trnsvers(1))/rho
+           ttv(3)= (trnsvers(3) - vel1*trnsvers(1))/rho
+           ttv(4)= (trnsvers(4) - vel2*trnsvers(1))/rho
+           ttv(NEQU)= (v2norm*half*trnsvers(1) -
+     &              vel0*trnsvers(2) - vel1*trnsvers(3) -
+     &              vel2*trnsvers(4) +
+     &              trnsvers(NEQU))*gam_min_one
+           do k=1,NEQU
+             tracergt$3(ic$3  ,ic$2,ic$1,k)=tracergt$3(ic$3  ,ic$2,ic$1,k)
+     &                                        - ttv(k)
+           enddo
+         enddo
+      enddo
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/m4trace2d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/m4trace2d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,61 @@
+define(trace_init,`dnl
+         do  ic$2=ifirst$2-FACEG,ilast$2+FACEG
+           ie$1=ifirst$1-FACEG
+           tracelft$1(ie$1,ic$2,1)=zero
+           tracelft$1(ie$1,ic$2,2)=zero
+           tracelft$1(ie$1,ic$2,3)=zero
+           tracelft$1(ie$1,ic$2,NEQU)=zero
+           tracergt$1(ie$1,ic$2,1)=density($5)
+           tracergt$1(ie$1,ic$2,2)=velocity($5,1)
+           tracergt$1(ie$1,ic$2,3)=velocity($5,2)
+           tracergt$1(ie$1,ic$2,NEQU)=pressure($5)
+
+           do  ie$1=ifirst$1+1-FACEG,ilast$1+FACEG
+             tracelft$1(ie$1,ic$2,1)=density($4)
+             tracelft$1(ie$1,ic$2,2)=velocity($4,1)
+             tracelft$1(ie$1,ic$2,3)=velocity($4,2)
+             tracelft$1(ie$1,ic$2,NEQU)=pressure($4)
+
+             tracergt$1(ie$1,ic$2,1)=density($5)
+             tracergt$1(ie$1,ic$2,2)=velocity($5,1)
+             tracergt$1(ie$1,ic$2,3)=velocity($5,2)
+             tracergt$1(ie$1,ic$2,NEQU)=pressure($5)
+
+           enddo
+
+           ie$1=ilast$1+FACEG+1
+           tracelft$1(ie$1,ic$2,1)=density($4)
+           tracelft$1(ie$1,ic$2,2)=velocity($4,1)
+           tracelft$1(ie$1,ic$2,3)=velocity($4,2)
+           tracelft$1(ie$1,ic$2,NEQU)=pressure($4)
+           tracergt$1(ie$1,ic$2,1)=zero
+           tracergt$1(ie$1,ic$2,2)=zero
+           tracergt$1(ie$1,ic$2,3)=zero
+           tracergt$1(ie$1,ic$2,NEQU)=zero
+         enddo
+ 
+')dnl
+define(trace_call,`dnl
+          do ic$2=ifirst$2-2,ilast$2+2
+            do ic$1=ifirst$1-CELLG,ilast$1+CELLG
+              ttsound(ic$1)= sound(ic0,ic1)
+            enddo
+            do ic$1=ifirst$1-FACEG,ilast$1+FACEG+1
+              do k=1,NEQU
+                ttraclft(ic$1,k) = tracelft(ic$1,ic$2,k)
+                ttracrgt(ic$1,k) = tracergt(ic$1,ic$2,k)
+              enddo
+            enddo
+
+            call trace2d(dt,ifirst$1,ilast$1,mc,
+     &        dx,idir,igdnv,ttsound,
+     &        ttraclft,ttracrgt,
+     &        ttcelslp,ttedgslp)
+            do ic$1=ifirst$1-FACEG,ilast$1+FACEG+1
+              do k=1,NEQU
+                tracelft(ic$1,ic$2,k) = ttraclft(ic$1,k)
+                tracergt(ic$1,ic$2,k) = ttracrgt(ic$1,k)
+              enddo
+            enddo
+          enddo
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/m4trace3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/m4trace3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,71 @@
+define(trace_init,`dnl
+      do  ic$3=ifirst$3-FACEG,ilast$3+FACEG
+         do  ic$2=ifirst$2-FACEG,ilast$2+FACEG
+           ie$1=ifirst$1-FACEG
+             tracelft$1(ie$1,ic$2,ic$3,1)=zero
+             tracelft$1(ie$1,ic$2,ic$3,2)=zero
+             tracelft$1(ie$1,ic$2,ic$3,3)=zero
+             tracelft$1(ie$1,ic$2,ic$3,4)=zero
+             tracelft$1(ie$1,ic$2,ic$3,5)=zero
+             tracergt$1(ie$1,ic$2,ic$3,1)=density($5)
+             tracergt$1(ie$1,ic$2,ic$3,2)=velocity($5,1)
+             tracergt$1(ie$1,ic$2,ic$3,3)=velocity($5,2)
+             tracergt$1(ie$1,ic$2,ic$3,4)=velocity($5,3)
+             tracergt$1(ie$1,ic$2,ic$3,5)=pressure($5)
+
+           do  ie$1=ifirst$1+1-FACEG,ilast$1+FACEG
+             tracelft$1(ie$1,ic$2,ic$3,1)=density($4)
+             tracelft$1(ie$1,ic$2,ic$3,2)=velocity($4,1)
+             tracelft$1(ie$1,ic$2,ic$3,3)=velocity($4,2)
+             tracelft$1(ie$1,ic$2,ic$3,4)=velocity($4,3)
+             tracelft$1(ie$1,ic$2,ic$3,5)=pressure($4)
+ 
+             tracergt$1(ie$1,ic$2,ic$3,1)=density($5)
+             tracergt$1(ie$1,ic$2,ic$3,2)=velocity($5,1)
+             tracergt$1(ie$1,ic$2,ic$3,3)=velocity($5,2)
+             tracergt$1(ie$1,ic$2,ic$3,4)=velocity($5,3)
+             tracergt$1(ie$1,ic$2,ic$3,5)=pressure($5)
+    
+           enddo
+
+           ie$1=ilast$1+FACEG+1
+             tracelft$1(ie$1,ic$2,ic$3,1)=density($4)
+             tracelft$1(ie$1,ic$2,ic$3,2)=velocity($4,1)
+             tracelft$1(ie$1,ic$2,ic$3,3)=velocity($4,2)
+             tracelft$1(ie$1,ic$2,ic$3,4)=velocity($4,3)
+             tracelft$1(ie$1,ic$2,ic$3,5)=pressure($4)
+             tracergt$1(ie$1,ic$2,ic$3,1)=zero
+             tracergt$1(ie$1,ic$2,ic$3,2)=zero
+             tracergt$1(ie$1,ic$2,ic$3,3)=zero
+             tracergt$1(ie$1,ic$2,ic$3,4)=zero
+             tracergt$1(ie$1,ic$2,ic$3,5)=zero
+         enddo
+      enddo
+
+')dnl
+define(trace_call,`dnl
+        do ic$3=ifirst$3-2,ilast$3+2
+          do ic$2=ifirst$2-2,ilast$2+2
+            do ic$1=ifirst$1-CELLG,ilast$1+CELLG
+              ttsound(ic$1)= sound(ic0,ic1,ic2)
+            enddo
+            do k=1,NEQU
+              do ic$1=ifirst$1-FACEG,ilast$1+FACEG+1
+                ttraclft(ic$1,k) = tracelft(ic$1,ic$2,ic$3,k)
+                ttracrgt(ic$1,k) = tracergt(ic$1,ic$2,ic$3,k)
+              enddo
+            enddo
+   
+            call trace3d(dt,ifirst$1,ilast$1,mc,
+     &        dx,idir,igdnv,ttsound,
+     &        ttraclft,ttracrgt,
+     &        ttcelslp,ttedgslp)
+            do k=1,NEQU
+              do ic$1=ifirst$1-FACEG,ilast$1+FACEG+1
+                tracelft(ic$1,ic$2,ic$3,k) = ttraclft(ic$1,k)
+                tracergt(ic$1,ic$2,ic$3,k) = ttracrgt(ic$1,k)
+              enddo
+            enddo
+          enddo
+        enddo
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/probparams.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/probparams.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,11 @@
+      common/probparams/APPROX_RIEM_SOLVE,EXACT_RIEM_SOLVE,
+     &  HLLC_RIEM_SOLVE,
+     &  PIECEWISE_CONSTANT_X,PIECEWISE_CONSTANT_Y,PIECEWISE_CONSTANT_Z,
+     &  SPHERE,STEP,
+     &  CELLG,FACEG,FLUXG
+      integer 
+     &  APPROX_RIEM_SOLVE,EXACT_RIEM_SOLVE,HLLC_RIEM_SOLVE,
+     &  PIECEWISE_CONSTANT_X,PIECEWISE_CONSTANT_Y,PIECEWISE_CONSTANT_Z,
+     &  SPHERE,STEP,
+     &  CELLG,FACEG,FLUXG
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/stable2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/stable2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,47 @@
+define(NDIM,2)dnl
+define(NEQU,4)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+      subroutine stabledt2d(dx,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  ngc0,ngc1,
+     &  gamma,density,velocity,pressure,stabdt)
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+include(FORTDIR/const.i)dnl
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      REAL stabdt,dx(0:NDIM-1)
+      integer ifirst0,ilast0,ifirst1,ilast1,ngc0,ngc1
+c
+      REAL  
+     &  gamma,
+     &  density(CELL2dVECG(ifirst,ilast,ngc)),
+     &  velocity(CELL2dVECG(ifirst,ilast,ngc),0:NDIM-1),
+     &  pressure(CELL2dVECG(ifirst,ilast,ngc))
+c    
+      integer ic0,ic1
+      integer ighoslft(0:NDIM-1),ighosrgt(0:NDIM-1)
+
+      REAL maxspeed(0:NDIM-1),lambda
+c
+      ighoslft(0) = ifirst0 - ngc0
+      ighoslft(1) = ifirst1 - ngc1
+      ighosrgt(0) = ilast0 + ngc0
+      ighosrgt(1) = ilast1 + ngc1
+
+      maxspeed(0)=zero
+      maxspeed(1)=zero
+
+      do  ic1=ighoslft(1),ighosrgt(1)
+         do  ic0=ighoslft(0),ighosrgt(0)
+            lambda = 
+     &       sqrt(max(zero,gamma*pressure(ic0,ic1)/density(ic0,ic1)))
+            maxspeed(0) = max(maxspeed(0),
+     &           abs(velocity(ic0,ic1,0))+lambda)
+            maxspeed(1) = max(maxspeed(1),
+     &           abs(velocity(ic0,ic1,1))+lambda)
+         enddo
+      enddo
+      stabdt = min((dx(1)/maxspeed(1)),(dx(0)/maxspeed(0)))
+      return
+      end 
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/stable3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/stable3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,59 @@
+define(NDIM,3)dnl
+define(NEQU,5)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+      subroutine stabledt3d(dx,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  ngc0,ngc1,ngc2,
+     &  gamma,density,velocity,pressure,stabdt)
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+include(FORTDIR/const.i)dnl
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      REAL stabdt,dx(0:NDIM-1)
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  ngc0,ngc1,ngc2
+c
+      REAL  
+     &  density(CELL3dVECG(ifirst,ilast,ngc)),
+     &  velocity(CELL3dVECG(ifirst,ilast,ngc),0:NDIM-1),
+     &  pressure(CELL3dVECG(ifirst,ilast,ngc))
+c    
+      integer ic0,ic1,ic2
+      integer ighoslft(0:NDIM-1),ighosrgt(0:NDIM-1)
+
+      REAL maxspeed(0:NDIM-1),gamma,lambda
+c
+      ighoslft(0) = ifirst0 - ngc0
+      ighoslft(1) = ifirst1 - ngc1
+      ighoslft(2) = ifirst2 - ngc2
+      ighosrgt(0) = ilast0 + ngc0
+      ighosrgt(1) = ilast1 + ngc1
+      ighosrgt(2) = ilast2 + ngc2
+
+      maxspeed(0)=zero
+      maxspeed(1)=zero
+      maxspeed(2)=zero
+
+      do  ic2=ighoslft(2),ighosrgt(2)
+         do  ic1=ighoslft(1),ighosrgt(1)
+            do  ic0=ighoslft(0),ighosrgt(0)
+               lambda = sqrt(max(zero,
+     &              gamma*pressure(ic0,ic1,ic2)/density(ic0,ic1,ic2)))
+               maxspeed(0) = max(maxspeed(0),
+     &              abs(velocity(ic0,ic1,ic2,0))+lambda)
+               maxspeed(1) = max(maxspeed(1),
+     &              abs(velocity(ic0,ic1,ic2,1))+lambda)
+               maxspeed(2) = max(maxspeed(2),
+     &              abs(velocity(ic0,ic1,ic2,2))+lambda)
+            enddo
+         enddo
+      enddo
+      stabdt = min((dx(1)/maxspeed(1)),(dx(0)/maxspeed(0)))
+      stabdt = min((dx(2)/maxspeed(2)),stabdt)
+c     write(6,*) " dx(0),maxspeed(0)= ",dx(0),maxspeed(0)
+c      write(6,*) " dx(1),maxspeed(1)= ",dx(1),maxspeed(1)
+c      write(6,*) " dx(2),maxspeed(2)= ",dx(2),maxspeed(2)
+c      write(6,*) "        stabdt= ",stabdt
+      return
+      end 
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/stufprobc.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/stufprobc.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,29 @@
+      subroutine stufprobc(
+     &  APPROX_RIEM_SOLVEin,EXACT_RIEM_SOLVEin,HLLC_RIEM_SOLVEin,
+     &  PIECEWISE_CONSTANT_Xin,PIECEWISE_CONSTANT_Yin,
+     &  PIECEWISE_CONSTANT_Zin,
+     &  SPHEREin,STEPin,
+     &  CELLGin,FACEGin,FLUXGin)
+      implicit none
+      integer 
+     &  APPROX_RIEM_SOLVEin,EXACT_RIEM_SOLVEin,HLLC_RIEM_SOLVEin,
+     &  PIECEWISE_CONSTANT_Xin,PIECEWISE_CONSTANT_Yin,
+     &  PIECEWISE_CONSTANT_Zin,
+     &  SPHEREin,STEPin,
+     &  CELLGin,FACEGin,FLUXGin
+include(FORTDIR/probparams.i)dnl
+
+      APPROX_RIEM_SOLVE=APPROX_RIEM_SOLVEin
+      EXACT_RIEM_SOLVE=EXACT_RIEM_SOLVEin
+      HLLC_RIEM_SOLVE=HLLC_RIEM_SOLVEin
+      PIECEWISE_CONSTANT_X=PIECEWISE_CONSTANT_Xin
+      PIECEWISE_CONSTANT_Y=PIECEWISE_CONSTANT_Yin
+      PIECEWISE_CONSTANT_Z=PIECEWISE_CONSTANT_Zin
+      SPHERE=SPHEREin
+      STEP=STEPin
+      CELLG=CELLGin
+      FACEG=FACEGin
+      FLUXG=FLUXGin
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/trace1d2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/trace1d2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,195 @@
+define(NEQU,4)dnl
+define(REAL,`double precision')dnl
+
+      subroutine trace2d(dt,ifirst,ilast,mc,
+     &  dx,dir,igdnv,sound,
+     &  tracelft,tracergt, 
+     &  celslope,edgslope)
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      REAL dt
+      integer ifirst,ilast,mc,dir,igdnv
+c     REAL dx, flattn
+      REAL dx
+c
+      REAL  
+     &  celslope(ifirst-CELLG:ifirst+mc-1+CELLG,NEQU),
+     &  flattn(ifirst-CELLG:ifirst+mc-1+CELLG),
+     &  sound  (ifirst-CELLG:ifirst+mc-1+CELLG),
+c       side variables
+     &  tracelft(ifirst-FACEG:ifirst+mc+FACEG,NEQU),
+     &  tracergt(ifirst-FACEG:ifirst+mc+FACEG,NEQU),
+     &  edgslope(ifirst-FACEG:ifirst+mc+FACEG,NEQU)
+c
+      integer ie,ic,i,k
+      REAL bound,coef4,slope2,dtdx,slope4
+      REAL csq, rho, u, v, p
+      REAL drho, du, dv, dp
+      REAL spminus, spplus, spzero, smminus, smplus, smzero
+      REAL alpham, alphap, alpha0r
+      REAL alpha0v
+      REAL apright, amright, azrright
+      REAL azv1rght
+      REAL apleft, amleft, azrleft
+      REAL azv1left,ceigv
+      integer dir1,dir2
+
+      if (dir.eq.0) then
+        dir1 = 2
+        dir2 = 3
+      else 
+        dir1 = 3
+        dir2 = 2
+      endif
+c
+c     write(6,*) "in trace"
+c
+c     do  ic=ifirst-4,ilast+4
+c       write(6,*) "ic,state, flat =",ic,
+c    &         tracergt(ic,1),tracergt(ic,2),
+c    &         tracergt(ic,3),tracergt(ic,4),
+c         call flush(6)
+c     enddo
+
+c***********************************************************************
+c     ******************************************************************
+c     * check for inflection points in characteristic speeds
+c     * compute slopes at cell edges
+c     * zero slopes if neighboring cells have different loading
+c     ******************************************************************
+      do ie=ifirst+1-FACEG,ilast+FACEG
+        do k=1,NEQU
+          edgslope(ie,k)=tracergt(ie,k)-tracelft(ie,k)
+        enddo
+      enddo
+c     ******************************************************************
+c     * limit slopes
+c     ******************************************************************
+      do i=1,NEQU
+        do ic=ifirst-CELLG,ilast+CELLG
+          celslope(ic,i)=zero
+        enddo
+      enddo
+      if (igdnv.eq.2) then
+c       write(6,*) "second-order slopes"
+c       ****************************************************************
+c       * second-order slopes
+c       ****************************************************************
+        do ic=ifirst+1-CELLG,ilast+CELLG-1
+           call flaten2d(
+     &       ifirst,ilast,ic,mc,dir,tracergt,sound,flattn(ic))
+        enddo
+        do ic=ifirst+1-CELLG,ilast+CELLG-1
+c         call flaten2d(ifirst,ilast,ic,mc,dir,tracergt,sound,flattn)
+c         flattn=one
+          do i=1,NEQU
+            slope2=half*(edgslope(ic,i)+edgslope(ic+1,i))
+            celslope(ic,i)=half*(edgslope(ic,i)+edgslope(ic+1,i))
+            if (edgslope(ic,i)*edgslope(ic+1,i).le.zero) then
+              celslope(ic,i)=zero
+            else
+              bound=min(abs(edgslope(ic,i)),abs(edgslope(ic+1,i)))
+              celslope(ic,i)=sign(min(two*bound,abs(slope2)),slope2)
+c             celslope(ic,i)=flattn*celslope(ic,i)
+              celslope(ic,i)=flattn(ic)*celslope(ic,i)
+            endif
+c            write(6,*) "i,ic,celslope= ", i,ic,celslope(ic,i)
+c            call flush(6)
+          enddo
+        enddo
+      else if (igdnv.eq.4) then
+c       write(6,*) "fourth-order slopes"
+c       ****************************************************************
+c       * fourth-order slopes
+c       ****************************************************************
+        do ic=ifirst+1-CELLG,ilast+CELLG-1
+           call flaten2d(
+     &       ifirst,ilast,ic,mc,dir,tracergt,sound,flattn(ic))
+        enddo
+        do ic=ifirst+2-CELLG,ilast+CELLG-2
+c         call flaten2d(ifirst,ilast,ic,mc,dir,tracergt,sound,flattn)
+c         flattn=one
+          do i=1,NEQU
+            slope4=fourth*(tracergt(ic+2,i)-tracergt(ic-2,i))
+            celslope(ic,i)=half*(edgslope(ic,i)+edgslope(ic+1,i))
+            coef4=third*(four*celslope(ic,i)-slope4)
+            if (edgslope(ic,i)*edgslope(ic+1,i).le.zero .or.
+     &      coef4*celslope(ic,i).lt.zero) then
+              celslope(ic,i)=zero
+            else
+              bound=min(abs(edgslope(ic,i)),abs(edgslope(ic+1,i)))
+              celslope(ic,i)=sign(min(two*bound,abs(coef4)),coef4)
+c             celslope(ic,i)=flattn(ic)*celslope(ic,i)
+            endif
+          enddo
+        enddo
+      endif
+c     ******************************************************************
+c     * characteristic projection
+c     ******************************************************************
+      do ic=ifirst-FACEG+1,ilast+FACEG
+        dtdx=dt/dx
+        rho = max(smallr,tracergt(ic,1))
+        u = tracergt(ic,dir1)
+        v = tracergt(ic,dir2)
+        p = tracergt(ic,NEQU)
+        drho = celslope(ic,1)
+        du = celslope(ic,dir1)
+        dv = celslope(ic,dir2)
+        dp = celslope(ic,NEQU)
+ 
+        ceigv = sound(ic)
+        csq = ceigv**2
+ 
+        alpham  = half*(dp/(rho*ceigv) - du)*rho/ceigv
+        alphap  = half*(dp/(rho*ceigv) + du)*rho/ceigv
+        alpha0r = drho - dp/csq
+        alpha0v = dv
+ 
+        if ((u-ceigv).gt.0) then
+           spminus = -one
+           smminus = (u-ceigv)*dtdx
+        else
+           spminus = (u-ceigv)*dtdx
+           smminus = one
+        endif
+        if ((u+ceigv).gt.0) then
+           spplus = -one
+           smplus = (u+ceigv)*dtdx
+        else
+           spplus = (u+ceigv)*dtdx
+           smplus = one
+        endif
+        if ((u).gt.0) then
+           spzero = -one
+           smzero = u*dtdx
+        else
+           spzero = u*dtdx
+           smzero = one
+        endif
+        apright  = half*(-one - spplus )*alphap
+        amright  = half*(-one - spminus)*alpham
+        azrright = half*(-one - spzero )*alpha0r
+        azv1rght = half*(-one - spzero )*alpha0v
+        tracergt(ic,1) = rho + apright + amright + azrright
+        tracergt(ic,1) = max(smallr,tracergt(ic,1))
+        tracergt(ic,dir1) = u + (apright - amright)*ceigv/rho
+        tracergt(ic,dir2) = v + azv1rght
+        tracergt(ic,NEQU) = p + (apright + amright)*csq
+ 
+        apleft  = half*(one - smplus )*alphap
+        amleft  = half*(one - smminus)*alpham
+        azrleft = half*(one - smzero )*alpha0r
+        azv1left = half*(one - smzero )*alpha0v
+        tracelft(ic+1,1) = rho + apleft + amleft + azrleft
+        tracelft(ic+1,1) = max(smallr,tracelft(ic+1,1))
+        tracelft(ic+1,dir1) = u + (apleft - amleft)*ceigv/rho
+        tracelft(ic+1,dir2) = v + azv1left
+        tracelft(ic+1,NEQU) = p + (apleft + amleft)*csq
+      enddo
+c      call flush(6)
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/trace1d3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/trace1d3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,183 @@
+define(NEQU,5)dnl
+define(REAL,`double precision')dnl
+
+      subroutine trace3d(dt,ifirst,ilast,mc,
+     &  dx,dir,igdnv,sound,
+     &  tracelft,tracergt, 
+     &  celslope,edgslope)
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      REAL dt
+      integer ifirst,ilast,mc,dir,igdnv
+      REAL dx, flattn
+c
+      REAL  
+     &  celslope(ifirst-CELLG:ifirst+mc-1+CELLG,NEQU),
+     &  sound  (ifirst-CELLG:ifirst+mc-1+CELLG),
+c       side variables
+     &  tracelft(ifirst-FACEG:ifirst+mc+FACEG,NEQU),
+     &  tracergt(ifirst-FACEG:ifirst+mc+FACEG,NEQU),
+     &  edgslope(ifirst-FACEG:ifirst+mc+FACEG,NEQU)
+c
+      integer ie,ic,i,k
+      REAL bound,coef4,slope2,dtdx,slope4
+      REAL csq, rho, u, v, w, p
+      REAL drho, du, dv, dw, dp
+      REAL spminus, spplus, spzero, smminus, smplus, smzero
+      REAL alpham, alphap, alpha0r
+      REAL alpha0v,alpha0w
+      REAL apright, amright, azrright
+      REAL azv1rght,azw1rght
+      REAL apleft, amleft, azrleft
+      REAL azv1left,azw1left,ceigv
+      integer dir1,dir2,dir3
+
+      if (dir.eq.0) then
+        dir1 = 2
+        dir2 = 3
+        dir3 = 4
+      else if (dir.eq.1) then
+        dir1 = 3
+        dir2 = 4
+        dir3 = 2
+      else if (dir.eq.2) then
+        dir1 = 4
+        dir2 = 2
+        dir3 = 3
+      endif
+c
+c***********************************************************************
+c     ******************************************************************
+c     * check for inflection points in characteristic speeds
+c     * compute slopes at cell edges
+c     * zero slopes if neighboring cells have different loading
+c     ******************************************************************
+      do ie=ifirst+1-FACEG,ilast+FACEG
+        do k=1,NEQU
+          edgslope(ie,k)=tracergt(ie,k)-tracelft(ie,k)
+        enddo
+      enddo
+c     ******************************************************************
+c     * limit slopes
+c     ******************************************************************
+      do i=1,NEQU
+        do ic=ifirst-CELLG,ilast+CELLG
+          celslope(ic,i)=zero
+        enddo
+      enddo
+      if (igdnv.eq.2) then
+c       ****************************************************************
+c       * second-order slopes
+c       ****************************************************************
+        do ic=ifirst+1-CELLG,ilast+CELLG-1
+c         call flaten3d(ifirst,ilast,ic,mc,dir,tracergt,sound,flattn)
+          flattn=one
+          do i=1,NEQU
+            slope2=half*(edgslope(ic,i)+edgslope(ic+1,i))
+            celslope(ic,i)=half*(edgslope(ic,i)+edgslope(ic+1,i))
+            if (edgslope(ic,i)*edgslope(ic+1,i).le.zero) then
+              celslope(ic,i)=zero
+            else
+              bound=min(abs(edgslope(ic,i)),abs(edgslope(ic+1,i)))
+              celslope(ic,i)=sign(min(two*bound,abs(slope2)),slope2)
+              celslope(ic,i)=flattn*celslope(ic,i)
+            endif
+          enddo
+        enddo
+      else if (igdnv.eq.4) then
+c       ****************************************************************
+c       * fourth-order slopes
+c       ****************************************************************
+        do ic=ifirst+2-CELLG,ilast+CELLG-2
+c         call flaten3d(ifirst,ilast,ic,mc,dir,tracergt,sound,flattn)
+          flattn=one
+          do i=1,NEQU
+            slope4=fourth*(tracergt(ic+2,i)-tracergt(ic-2,i))
+            celslope(ic,i)=half*(edgslope(ic,i)+edgslope(ic+1,i))
+            coef4=third*(four*celslope(ic,i)-slope4)
+            if (edgslope(ic,i)*edgslope(ic+1,i).le.zero .or.
+     &      coef4*celslope(ic,i).lt.zero) then
+              celslope(ic,i)=zero
+            else
+              bound=min(abs(edgslope(ic,i)),abs(edgslope(ic+1,i)))
+              celslope(ic,i)=sign(min(two*bound,abs(coef4)),coef4)
+              celslope(ic,i)=flattn*celslope(ic,i)
+            endif
+          enddo
+        enddo
+      endif
+c     ******************************************************************
+c     * characteristic projection
+c     ******************************************************************
+      do ic=ifirst-FACEG+1,ilast+FACEG
+        dtdx=dt/dx
+        rho = max(smallr,tracergt(ic,1))
+        u = tracergt(ic,dir1)
+        v = tracergt(ic,dir2)
+        p = tracergt(ic,NEQU)
+        drho = celslope(ic,1)
+        du = celslope(ic,dir1)
+        dv = celslope(ic,dir2)
+        dp = celslope(ic,NEQU)
+        w = tracergt(ic,dir3)
+        dw = celslope(ic,dir3)
+        alpha0w = dw
+ 
+        ceigv = sound(ic)
+        csq = ceigv**2
+ 
+        alpham  = half*(dp/(rho*ceigv) - du)*rho/ceigv
+        alphap  = half*(dp/(rho*ceigv) + du)*rho/ceigv
+        alpha0r = drho - dp/csq
+        alpha0v = dv
+ 
+        if ((u-ceigv).gt.0) then
+           spminus = -one
+           smminus = (u-ceigv)*dtdx
+        else
+           spminus = (u-ceigv)*dtdx
+           smminus = one
+        endif
+        if ((u+ceigv).gt.0) then
+           spplus = -one
+           smplus = (u+ceigv)*dtdx
+        else
+           spplus = (u+ceigv)*dtdx
+           smplus = one
+        endif
+        if ((u).gt.0) then
+           spzero = -one
+           smzero = u*dtdx
+        else
+           spzero = u*dtdx
+           smzero = one
+        endif
+        apright  = half*(-one - spplus )*alphap
+        amright  = half*(-one - spminus)*alpham
+        azrright = half*(-one - spzero )*alpha0r
+        azv1rght = half*(-one - spzero )*alpha0v
+        azw1rght = half*(-one - spzero )*alpha0w
+        tracergt(ic,1) = rho + apright + amright + azrright
+        tracergt(ic,1) = max(smallr,tracergt(ic,1))
+        tracergt(ic,dir1) = u + (apright - amright)*ceigv/rho
+        tracergt(ic,dir2) = v + azv1rght
+        tracergt(ic,dir3) = w + azw1rght
+        tracergt(ic,NEQU) = p + (apright + amright)*csq
+ 
+        apleft  = half*(one - smplus )*alphap
+        amleft  = half*(one - smminus)*alpham
+        azrleft = half*(one - smzero )*alpha0r
+        azv1left = half*(one - smzero )*alpha0v
+        azw1left = half*(one - smzero )*alpha0w
+        tracelft(ic+1,1) = rho + apleft + amleft + azrleft
+        tracelft(ic+1,1) = max(smallr,tracelft(ic+1,1))
+        tracelft(ic+1,dir1) = u + (apleft - amleft)*ceigv/rho
+        tracelft(ic+1,dir2) = v + azv1left
+        tracelft(ic+1,dir3) = w + azw1left
+        tracelft(ic+1,NEQU) = p + (apleft + amleft)*csq
+      enddo
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/trace2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/trace2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,258 @@
+define(NDIM,2)dnl
+define(NEQU,4)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+include(FORTDIR/m4trace2d.i)dnl
+
+      subroutine computesound2d(ifirst0,ilast0,ifirst1,ilast1,
+     &  gamma,density, velocity,pressure,sound)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+c variables indexed as 2dimensional
+      REAL
+     &     gamma,
+     &     density(CELL2d(ifirst,ilast,CELLG)),
+     &     velocity(CELL2d(ifirst,ilast,CELLG),0:NDIM-1),
+     &     pressure(CELL2d(ifirst,ilast,CELLG)),
+     &     sound(CELL2d(ifirst,ilast,CELLG))
+c
+      integer ic0,ic1
+c
+c***********************************************************************
+c
+c     write(6,*) "in computesound"
+c     do  ic1=ifirst1-4,ilast1+4
+c       do  ic0=ifirst0-4,ilast0+4
+c         write(6,*) "ic01,d_p_v=",ic0,ic1,
+c    &         density(ic0,ic1),pressure(ic0,ic1),
+c    &         velocity(ic0,ic1,0),velocity(ic0,ic1,1) 
+c         call flush(6)
+c       enddo
+c     enddo
+c     write(6,*)
+
+      do  ic0=ifirst0-CELLG,ilast0+CELLG
+        do  ic1=ifirst1-CELLG,ilast1+CELLG
+c         write(6,*) "        density,pressure = ",ic0,ic1,
+c    &                        density(ic0,ic1),pressure(ic0,ic1)
+c         write(6,*) "        velocity,        = ",ic0,ic1,
+c    &                        velocity(ic0,ic1,0),velocity(ic0,ic1,1)
+c         call flush(6)
+            sound(ic0,ic1) = 
+     &        sqrt(max(smallr,gamma*pressure(ic0,ic1)/density(ic0,ic1)))
+c           call flush(6)
+c
+        enddo
+      enddo
+
+c     write(6,*) "leaving computesound"
+c      call flush(6)
+      return
+      end 
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+c
+      subroutine inittraceflux2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  density,velocity,pressure,
+     &  tracelft0,tracelft1,
+     &  tracergt0,tracergt1,
+     &  fluxriem0,fluxriem1)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      REAL
+     &       density(CELL2d(ifirst,ilast,CELLG)),
+     &      velocity(CELL2d(ifirst,ilast,CELLG),NDIM),
+     &      pressure(CELL2d(ifirst,ilast,CELLG)),
+     &     fluxriem0(FACE2d0(ifirst,ilast,FLUXG),NEQU),
+     &     tracelft0(FACE2d0(ifirst,ilast,FACEG),NEQU),
+     &     tracergt0(FACE2d0(ifirst,ilast,FACEG),NEQU),
+     &     fluxriem1(FACE2d1(ifirst,ilast,FLUXG),NEQU),
+     &     tracelft1(FACE2d1(ifirst,ilast,FACEG),NEQU),
+     &     tracergt1(FACE2d1(ifirst,ilast,FACEG),NEQU)
+      integer ic0,ic1,k,ie0,ie1
+c***********************************************************************
+c initialize left and right states at cell edges
+c (first-order upwind)
+c***********************************************************************
+      if (FLUXG.lt.1) then
+         write(6,*) "flux ghosts < 1!" 
+	stop
+      endif
+c*********************************************************************** 
+c     write(6,*) "in init_trace_flux"
+c     call flush(6)
+c     write(6,*) "ifirst0,ilast0,ifirst1,ilast1",
+c    &     ifirst0,ilast0,ifirst1,ilast1
+c     write(6,*) "cell ghosts ", CELLG
+c     write(6,*) "face ghosts ", FACEG
+c     call flush(6)
+
+c     write(6,*) " "
+c     write(6,*) " In trace_init0"
+trace_init(0,1,2,`ie0-1,ic1',`ie0,ic1')dnl
+ 
+c     write(6,*) " "
+c     write(6,*) " In trace_init1"
+trace_init(1,0,2,`ic0,ie1-1',`ic0,ie1')dnl
+c     write(6,*) " "
+ 
+c
+c     we initialize the flux to be 0
+
+      do ic1=ifirst1-FLUXG,ilast1+FLUXG
+        do ie0=ifirst0-FLUXG,ilast0+FLUXG+1
+          do k=1,NEQU  
+            fluxriem0(ie0,ic1,k) = zero
+          enddo  
+        enddo
+      enddo
+c
+      do ic0=ifirst0-FLUXG,ilast0+FLUXG
+        do ie1=ifirst1-FLUXG,ilast1+FLUXG+1
+          do k=1,NEQU  
+            fluxriem1(ie1,ic0,k) = zero
+          enddo  
+        enddo
+      enddo
+c
+c      call flush(6)
+      return
+      end 
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine chartracing2d0(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  mc, dx,
+     &  gamma,igdnv,
+     &  sound,
+     &  tracelft,tracergt,
+     &  ttcelslp, ttedgslp, 
+     &  ttsound,
+     &  ttraclft, ttracrgt)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer mc,igdnv 
+      REAL dt 
+c variables in 1d axis indexed
+      REAL 
+     &     dx, gamma
+      REAL 
+     &     sound(CELL2d(ifirst,ilast,CELLG))
+      REAL 
+     &     tracelft(FACE2d0(ifirst,ilast,FACEG),NEQU),
+     &     tracergt(FACE2d0(ifirst,ilast,FACEG),NEQU)
+c  side variables ifirst0 to ifirst0+mc plus ghost cells
+      REAL
+     &  ttedgslp(ifirst0-FACEG:ifirst0+mc+FACEG,NEQU),
+     &  ttraclft(ifirst0-FACEG:ifirst0+mc+FACEG,NEQU),
+     &  ttracrgt(ifirst0-FACEG:ifirst0+mc+FACEG,NEQU)
+c  cell variables ifirst0 to ifirst0+mc-1 plus ghost cells
+      REAL 
+     &  ttcelslp(ifirst0-CELLG:ifirst0+mc-1+CELLG,NEQU),
+     &  ttsound(ifirst0-CELLG:ifirst0+mc-1+CELLG)
+c***********************************************************************
+c
+      integer ic0,ic1,k,idir
+c*********************************************************************** 
+c***********************************************************************
+c trace higher order states at cell edges
+c***********************************************************************
+c     write(6,*) "traced right chartracing2d0"
+c     do  ic1=ifirst1-FACEG,ilast1+FACEG
+c       do  ic0=ifirst0-FACEG,ilast0+FACEG+1
+c         write(6,*) "ic,state=",ic0,ic1,
+c    &         tracergt(ic0,ic1,1),tracergt(ic0,ic1,2),
+c    &         tracergt(ic0,ic1,3),tracergt(ic0,ic1,4) 
+c         call flush(6)
+c       enddo
+c     enddo
+c     write(6,*)
+c
+c     call flush(6)
+c
+      idir = 0
+trace_call(0,1)dnl
+c
+c***********************************************************************
+c     write(6,*) "leaving chartracing2d"
+c      call flush(6)
+      return
+      end
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine chartracing2d1(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  mc, dx,
+     &  gamma,igdnv,
+     &  sound,
+     &  tracelft,tracergt,
+     &  ttcelslp, ttedgslp,  
+     &  ttsound,
+     &  ttraclft, ttracrgt)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer mc,igdnv
+      REAL dt 
+c variables in 1d axis indexed
+      REAL 
+     &     dx, gamma
+      REAL 
+     &     sound(CELL2d(ifirst,ilast,CELLG))
+      REAL 
+     &     tracelft(FACE2d1(ifirst,ilast,FACEG),NEQU),
+     &     tracergt(FACE2d1(ifirst,ilast,FACEG),NEQU)
+c  side variables ifirst1 to ifirst1+mc plus ghost cells
+      REAL
+     &  ttedgslp(ifirst1-FACEG:ifirst1+mc+FACEG,NEQU),
+     &  ttraclft(ifirst1-FACEG:ifirst1+mc+FACEG,NEQU),
+     &  ttracrgt(ifirst1-FACEG:ifirst1+mc+FACEG,NEQU)
+c  cell variables ifirst1 to ifirst1+mc-1 plus ghost cells
+      REAL 
+     &  ttcelslp(ifirst1-CELLG:ifirst1+mc-1+CELLG,NEQU),
+     &  ttsound(ifirst1-CELLG:ifirst1+mc-1+CELLG)
+c***********************************************************************
+c
+      integer ic0,ic1,k,idir
+c*********************************************************************** 
+c***********************************************************************
+c trace higher order states at cell edges
+c***********************************************************************
+c     write(6,*) "Entering chartracing2d1"
+c     call flush(6)
+c
+      idir = 1
+trace_call(1,0)dnl
+c
+c***********************************************************************
+c     write(6,*) "leaving chartracing2d"
+c      call flush(6)
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/fortran/trace3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/fortran/trace3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,271 @@
+define(NDIM,3)dnl
+define(NEQU,5)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+include(FORTDIR/m4trace3d.i)dnl
+
+      subroutine computesound3d(ifirst0,ilast0,ifirst1,ilast1,
+     &  ifirst2,ilast2,gamma,density,velocity,pressure,sound)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+c variables indexed as 3dimensional
+      REAL
+     &      gamma,
+     &      density(CELL3d(ifirst,ilast,CELLG)),
+     &      velocity(CELL3d(ifirst,ilast,CELLG),0:NDIM-1),
+     &      pressure(CELL3d(ifirst,ilast,CELLG)),
+     &      sound(CELL3d(ifirst,ilast,CELLG))
+c
+      integer ic0,ic1,ic2
+c
+c***********************************************************************
+c
+      do  ic0=ifirst0-CELLG,ilast0+CELLG
+        do  ic1=ifirst1-CELLG,ilast1+CELLG
+          do  ic2=ifirst2-CELLG,ilast2+CELLG
+            sound(ic0,ic1,ic2) = sqrt(max(smallr,
+     &                                    gamma*pressure(ic0,ic1,ic2)
+     &                                    /density(ic0,ic1,ic2)))
+          enddo
+        enddo
+      enddo
+
+      return
+      end 
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+c
+      subroutine inittraceflux3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  density,velocity,pressure,
+     &  tracelft0,tracelft1,tracelft2,
+     &  tracergt0,tracergt1,tracergt2,
+     &  fluxriem0,fluxriem1,fluxriem2)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL
+     &       density(CELL3d(ifirst,ilast,CELLG)),
+     &      velocity(CELL3d(ifirst,ilast,CELLG),NDIM),
+     &      pressure(CELL3d(ifirst,ilast,CELLG)),
+     &     fluxriem0(FACE3d0(ifirst,ilast,FLUXG),NEQU),
+     &     tracelft0(FACE3d0(ifirst,ilast,FACEG),NEQU),
+     &     tracergt0(FACE3d0(ifirst,ilast,FACEG),NEQU),
+     &     fluxriem1(FACE3d1(ifirst,ilast,FLUXG),NEQU),
+     &     tracelft1(FACE3d1(ifirst,ilast,FACEG),NEQU),
+     &     tracergt1(FACE3d1(ifirst,ilast,FACEG),NEQU),
+     &     fluxriem2(FACE3d2(ifirst,ilast,FLUXG),NEQU),
+     &     tracelft2(FACE3d2(ifirst,ilast,FACEG),NEQU),
+     &     tracergt2(FACE3d2(ifirst,ilast,FACEG),NEQU)
+      integer ic0,ic1,k,ie0,ie1,ic2,ie2
+c***********************************************************************
+c initialize left and right states at cell edges
+c (first-order upwind)
+c***********************************************************************
+      if (FLUXG.lt.1) then
+         write(6,*) "flux ghosts < 1!"
+	stop
+      endif
+c
+c***********************************************************************
+
+trace_init(0,1,2,`ie0-1,ic1,ic2',`ie0,ic1,ic2')dnl
+
+trace_init(1,2,0,`ic0,ie1-1,ic2',`ic0,ie1,ic2')dnl
+
+trace_init(2,0,1,`ic0,ic1,ie2-1',`ic0,ic1,ie2')dnl
+
+c
+c     we initialize the flux to be 0
+
+      do ic2=ifirst2-FLUXG,ilast2+FLUXG
+         do ic1=ifirst1-FLUXG,ilast1+FLUXG
+           do ie0=ifirst0-FLUXG,ilast0+FLUXG+1
+             do k=1,NEQU  
+               fluxriem0(ie0,ic1,ic2,k) = zero
+             enddo  
+           enddo
+         enddo
+      enddo
+c
+      do ic2=ifirst2-FLUXG,ilast2+FLUXG
+         do ic0=ifirst0-FLUXG,ilast0+FLUXG
+            do ie1=ifirst1-FLUXG,ilast1+FLUXG+1
+               do k=1,NEQU  
+                 fluxriem1(ie1,ic2,ic0,k) = zero
+               enddo  
+            enddo
+         enddo
+      enddo
+c
+      do ic1=ifirst1-FLUXG,ilast1+FLUXG
+         do ic0=ifirst0-FLUXG,ilast0+FLUXG
+            do ie2=ifirst2-FLUXG,ilast2+FLUXG+1
+               do k=1,NEQU  
+                 fluxriem2(ie2,ic0,ic1,k) = zero
+               enddo  
+            enddo
+         enddo
+      enddo
+c
+      return
+      end 
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+c
+      subroutine chartracing3d0(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  mc,dx,
+     &  gamma,igdnv,
+     &  sound,
+     &  tracelft,tracergt,
+     &  ttcelslp, ttedgslp,
+     &  ttsound,
+     &  ttraclft, ttracrgt)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer mc,igdnv
+      REAL dt 
+c variables in 1d axis indexed
+      REAL 
+     &     dx, gamma
+      REAL 
+     &     sound(CELL3d(ifirst,ilast,CELLG))
+      REAL 
+     &     tracelft(FACE3d0(ifirst,ilast,FACEG),NEQU),
+     &     tracergt(FACE3d0(ifirst,ilast,FACEG),NEQU)
+c  side variables ifirst0 to ifirst0+mc plus ghost cells
+      REAL
+     & ttedgslp(ifirst0-FACEG:ifirst0+mc+FACEG,NEQU),
+     & ttraclft(ifirst0-FACEG:ifirst0+mc+FACEG,NEQU),
+     & ttracrgt(ifirst0-FACEG:ifirst0+mc+FACEG,NEQU)
+c  cell variables ifirst0 to ifirst0+mc-1 plus ghost cells
+      REAL 
+     &  ttcelslp(ifirst0-CELLG:ifirst0+mc-1+CELLG,NEQU),
+     &  ttsound(ifirst0-CELLG:ifirst0+mc-1+CELLG)
+c***********************************************************************
+      integer ic0,ic1,ic2,k,idir
+c***********************************************************************
+c trace higher order states at cell edges
+c***********************************************************************
+      idir = 0
+trace_call(0,1,2)dnl
+c***********************************************************************
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine chartracing3d1(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  mc,dx,
+     &  gamma,igdnv,
+     &  sound,
+     &  tracelft,tracergt,
+     &  ttcelslp, ttedgslp,
+     &  ttsound,
+     &  ttraclft, ttracrgt)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer mc,igdnv
+      REAL dt 
+c variables in 1d axis indexed
+      REAL 
+     &     dx, gamma
+      REAL 
+     &     sound(CELL3d(ifirst,ilast,CELLG))
+      REAL 
+     &     tracelft(FACE3d1(ifirst,ilast,FACEG),NEQU),
+     &     tracergt(FACE3d1(ifirst,ilast,FACEG),NEQU)
+      REAL
+     & ttedgslp(ifirst1-FACEG:ifirst1+mc+FACEG,NEQU),
+     & ttraclft(ifirst1-FACEG:ifirst1+mc+FACEG,NEQU),
+     & ttracrgt(ifirst1-FACEG:ifirst1+mc+FACEG,NEQU)
+c  cell variables ifirst1 to ifirst1+mc-1 plus ghost cells
+      REAL 
+     &  ttcelslp(ifirst1-CELLG:ifirst1+mc-1+CELLG,NEQU),
+     &  ttsound(ifirst1-CELLG:ifirst1+mc-1+CELLG)
+c***********************************************************************
+      integer ic0,ic1,ic2,k,idir
+c***********************************************************************
+c trace higher order states at cell edges
+c***********************************************************************
+      idir = 1
+trace_call(1,2,0)dnl
+c
+c***********************************************************************
+      return
+      end
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine chartracing3d2(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  mc,dx,
+     &  gamma,igdnv,
+     &  sound,
+     &  tracelft,tracergt,
+     &  ttcelslp, ttedgslp,
+     &  ttsound,
+     &  ttraclft, ttracrgt)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer mc,igdnv
+      REAL dt 
+c variables in 1d axis indexed
+      REAL 
+     &     dx, gamma
+      REAL 
+     &     sound(CELL3d(ifirst,ilast,CELLG))
+      REAL 
+     &     tracelft(FACE3d2(ifirst,ilast,FACEG),NEQU),
+     &     tracergt(FACE3d2(ifirst,ilast,FACEG),NEQU)
+      REAL
+     & ttedgslp(ifirst2-FACEG:ifirst2+mc+FACEG,NEQU),
+     & ttraclft(ifirst2-FACEG:ifirst2+mc+FACEG,NEQU),
+     & ttracrgt(ifirst2-FACEG:ifirst2+mc+FACEG,NEQU)
+c  cell variables ifirst2 to ifirst2+mc-1 plus ghost cells
+      REAL 
+     &  ttcelslp(ifirst2-CELLG:ifirst2+mc-1+CELLG,NEQU),
+     &  ttsound(ifirst2-CELLG:ifirst2+mc-1+CELLG)
+c***********************************************************************
+      integer ic0,ic1,ic2,k,idir
+c***********************************************************************
+c trace higher order states at cell edges
+c***********************************************************************
+      idir = 2
+trace_call(2,0,1)dnl
+c
+c***********************************************************************
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/main.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/main.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,845 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program for SAMRAI Euler gas dynamics sample application 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+// Header for application-specific algorithm/data structure object
+
+#include "Euler.h"
+
+// Headers for major algorithm/data structure objects from SAMRAI
+
+#include "SAMRAI/mesh/BergerRigoutsos.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/mesh/GriddingAlgorithm.h"
+#include "SAMRAI/mesh/TreeLoadBalancer.h"
+#include "SAMRAI/algs/HyperbolicLevelIntegrator.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/mesh/StandardTagAndInitialize.h"
+#include "SAMRAI/algs/TimeRefinementIntegrator.h"
+#include "SAMRAI/algs/TimeRefinementLevelStrategy.h"
+#include "SAMRAI/appu/VisItDataWriter.h"
+
+// Headers for basic SAMRAI objects
+
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/SiloDatabaseFactory.h"
+#include "SAMRAI/tbox/InputDatabase.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/TimerManager.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string>
+#include <fstream>
+using namespace std;
+
+#ifndef _MSC_VER
+#include <unistd.h>
+#endif
+
+#include <sys/stat.h>
+
+// Classes for autotesting.
+
+#if (TESTING == 1)
+#include "AutoTester.h"
+#endif
+
+using namespace SAMRAI;
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * This is the main program for an AMR Euler gas dynamics application   *
+ * built using SAMRAI.   The application program is constructed by      *
+ * composing a variety of algorithm objects found in SAMRAI plus some   *
+ * others that are specific to this application.   The following brief  *
+ * discussion summarizes these objects.                                 *
+ *                                                                      *
+ *    hier::PatchHierarchy - A container for the AMR patch hierarchy and      *
+ *       the data on the grid.                                          *
+ *                                                                      *
+ *    geom::CartesianGridGeometry - Defines and maintains the Cartesian       *
+ *       coordinate system on the grid.  The hier::PatchHierarchy             *
+ *       maintains a reference to this object.                          *
+ *                                                                      *
+ * A single overarching algorithm object drives the time integration    *
+ * and adaptive gridding processes:                                     *
+ *                                                                      *
+ *    algs::TimeRefinementIntegrator - Coordinates time integration and       *
+ *       adaptive gridding procedures for the various levels            *
+ *       in the AMR patch hierarchy.  Local time refinement is          *
+ *       employed during hierarchy integration; i.e., finer             *
+ *       levels are advanced using smaller time increments than         *
+ *       coarser level.  Thus, this object also invokes data            *
+ *       synchronization procedures which couple the solution on        *
+ *       different patch hierarchy levels.                              *
+ *                                                                      *
+ * The time refinement integrator is not specific to the numerical      *
+ * methods used and the problem being solved.   It maintains references *
+ * to two other finer grain algorithmic objects, more specific to       *
+ * the problem at hand, with which it is configured when they are       *
+ * passed into its constructor.   They are:                             *
+ *                                                                      *
+ *    algs::HyperbolicLevelIntegrator - Defines data management procedures    *
+ *       for level integration, data synchronization between levels,    *
+ *       and tagging cells for refinement.  These operations are        *
+ *       tailored to explicit time integration algorithms used for      *
+ *       hyperbolic systems of conservation laws, such as the Euler     *
+ *       equations.  This integrator manages data for numerical         *
+ *       routines that treat individual patches in the AMR patch        *
+ *       hierarchy.  In this particular application, it maintains a     *
+ *       pointer to the Euler object that defines variables and         *
+ *       provides numerical routines for the Euler model.               *
+ *                                                                      *
+ *       Euler - Defines variables and numerical routines for the       *
+ *          discrete Euler equations on each patch in the AMR           *
+ *          hierarchy.                                                  *
+ *                                                                      *
+ *    mesh::GriddingAlgorithm - Drives the AMR patch hierarchy generation     *
+ *       and regridding procedures.  This object maintains              *
+ *       references to three other algorithmic objects with             *
+ *       which it is configured when they are passed into its           *
+ *       constructor.   They are:                                       *
+ *                                                                      *
+ *       mesh::BergerRigoutsos - Clusters cells tagged for refinement on a    *
+ *          patch level into a collection of logically-rectangular      *
+ *          box domains.                                                *
+ *                                                                      *
+ *       mesh::LoadBalancer - Processes the boxes generated by the            *
+ *          mesh::BergerRigoutsos algorithm into a configuration from         *
+ *          which patches are contructed.  The algorithm we use in this *
+ *          class assumes a spatially-uniform workload distribution;    *
+ *          thus, it attempts to produce a collection of boxes          *
+ *          each of which contains the same number of cells.  The       *
+ *          load balancer also assigns patches to processors.           *
+ *                                                                      *
+ *       mesh::StandardTagAndInitialize - Couples the gridding algorithm      *
+ *          to the HyperbolicIntegrator. Selects cells for              *
+ *          refinement based on either Gradient detection, Richardson   *
+ *          extrapolation, or pre-defined Refine box region.  The       *
+ *          object maintains a pointer to the algs::HyperbolicLevelIntegrator,*
+ *          which is passed into its constructor, for this purpose.     *
+ *                                                                      *
+ ************************************************************************
+ */
+
+/*
+ *******************************************************************
+ *                                                                 *
+ * For each run, the input filename and restart information        *
+ * (if needed) must be given on the command line.                  *
+ *                                                                 *
+ *      For non-restarted case, command line is:                   *
+ *                                                                 *
+ *          executable <input file name>                           *
+ *                                                                 *
+ *      For restarted run, command line is:                        *
+ *                                                                 *
+ *          executable <input file name> <restart directory> \     *
+ *                     <restart number>                            *
+ *                                                                 *
+ * Accessory routines used within the main program:                *
+ *                                                                 *
+ *   dumpVizData1dPencil - Writes 1d pencil of Euler solution data *
+ *      to plot files so that it may be viewed in MatLab.  This    *
+ *      routine assumes a single patch level in 2d and 3d.  In     *
+ *      other words, it only plots data on level zero.  It can     *
+ *      handle AMR in 1d.                                          *
+ *                                                                 *
+ *******************************************************************
+ */
+
+static void
+dumpMatlabData1dPencil(
+   const string& dirname,
+   const string& filename,
+   const int ext,
+   const double plot_time,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int pencil_direction,
+   const bool default_pencil,
+   const tbox::Array<int>& pencil_index,
+   Euler* euler_model);
+
+int main(
+   int argc,
+   char* argv[])
+{
+
+   /*
+    * Initialize tbox::MPI and SAMRAI, enable logging, and process command line.
+    */
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   int num_failures = 0;
+
+   {
+
+      string input_filename;
+      string restart_read_dirname;
+      int restore_num = 0;
+
+      bool is_from_restart = false;
+
+      if ((argc != 2) && (argc != 4)) {
+         tbox::pout << "USAGE:  " << argv[0] << " <input filename> "
+                                             <<
+         "<restart dir> <restore number> [options]\n"
+                                             << "  options:\n"
+                                             << "  none at this time"
+                                             << endl;
+         tbox::SAMRAI_MPI::abort();
+         return -1;
+      } else {
+         input_filename = argv[1];
+         if (argc == 4) {
+            restart_read_dirname = argv[2];
+            restore_num = atoi(argv[3]);
+
+            is_from_restart = true;
+         }
+      }
+
+      tbox::plog << "input_filename = " << input_filename << endl;
+      tbox::plog << "restart_read_dirname = " << restart_read_dirname << endl;
+      tbox::plog << "restore_num = " << restore_num << endl;
+
+      /*
+       * Create input database and parse all data in input file.
+       */
+
+      tbox::Pointer<tbox::Database> input_db(new tbox::InputDatabase("input_db"));
+      tbox::InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      /*
+       * Retrieve "GlobalInputs" section of the input database and set
+       * values accordingly.
+       */
+
+      if (input_db->keyExists("GlobalInputs")) {
+         tbox::Pointer<tbox::Database> global_db =
+            input_db->getDatabase("GlobalInputs");
+
+#ifdef SGS
+         // TODO change to what?
+         if (global_db->keyExists("tag_clustering_method")) {
+            string tag_clustering_method =
+               global_db->getString("tag_clustering_method");
+            mesh::BergerRigoutsos::setClusteringOption(tag_clustering_method);
+         }
+#endif
+
+         if (global_db->keyExists("call_abort_in_serial_instead_of_exit")) {
+            bool flag = global_db->
+               getBool("call_abort_in_serial_instead_of_exit");
+            tbox::SAMRAI_MPI::setCallAbortInSerialInsteadOfExit(flag);
+         }
+      }
+
+      /*
+       * Retrieve "Main" section of the input database.  First, read dump
+       * information, which is used for writing plot files.  Second, if
+       * proper restart information was given on command line, and the
+       * restart interval is non-zero, create a restart database.
+       */
+
+      tbox::Pointer<tbox::Database> main_db = input_db->getDatabase("Main");
+
+      const tbox::Dimension dim(static_cast<unsigned short>(main_db->getInteger("dim")));
+
+      const std::string base_name =
+         main_db->getStringWithDefault("base_name", "unnamed");
+
+      const std::string log_filename =
+         main_db->getStringWithDefault("log_filename", base_name + ".log");
+
+      bool log_all_nodes = false;
+      if (main_db->keyExists("log_all_nodes")) {
+         log_all_nodes = main_db->getBool("log_all_nodes");
+      }
+      if (log_all_nodes) {
+         tbox::PIO::logAllNodes(log_filename);
+      } else {
+         tbox::PIO::logOnlyNodeZero(log_filename);
+      }
+
+      int viz_dump_interval = 0;
+      if (main_db->keyExists("viz_dump_interval")) {
+         viz_dump_interval = main_db->getInteger("viz_dump_interval");
+      }
+
+      const std::string visit_dump_dirname =
+         main_db->getStringWithDefault("viz_dump_dirname", base_name + ".visit");
+
+      int visit_number_procs_per_file = 1;
+      if (viz_dump_interval > 0) {
+         if (main_db->keyExists("visit_number_procs_per_file")) {
+            visit_number_procs_per_file =
+               main_db->getInteger("visit_number_procs_per_file");
+         }
+      }
+
+      string matlab_dump_filename;
+      string matlab_dump_dirname;
+      int matlab_dump_interval = 0;
+      int matlab_pencil_direction = 0;
+      tbox::Array<int> matlab_pencil_index(dim.getValue() - 1);
+      bool matlab_default_pencil = true;
+      for (int id = 0; id < dim.getValue() - 1; id++) {
+         matlab_pencil_index[id] = 0;
+      }
+
+      if (main_db->keyExists("matlab_dump_interval")) {
+         matlab_dump_interval = main_db->getInteger("matlab_dump_interval");
+      }
+      if (matlab_dump_interval > 0) {
+         if (main_db->keyExists("matlab_dump_filename")) {
+            matlab_dump_filename = main_db->getString("matlab_dump_filename");
+         }
+         if (main_db->keyExists("matlab_dump_dirname")) {
+            matlab_dump_dirname = main_db->getString("matlab_dump_dirname");
+         }
+         if (main_db->keyExists("matlab_pencil_direction")) {
+            matlab_pencil_direction =
+               main_db->getInteger("matlab_pencil_direction");
+         }
+         if (main_db->keyExists("matlab_pencil_index")) {
+            matlab_default_pencil = false;
+            matlab_pencil_index = main_db->getIntegerArray(
+                  "matlab_pencil_index");
+            if (matlab_pencil_index.getSize() != dim.getValue() - 1) {
+               TBOX_ERROR("`matlab_pencil_index' has "
+                  << matlab_pencil_index.getSize() << " values in input. "
+                  << dim.getValue() - 1 << " values must be specified when default"
+                  << " is overridden.");
+            }
+         }
+      }
+
+      int restart_interval = 0;
+      if (main_db->keyExists("restart_interval")) {
+         restart_interval = main_db->getInteger("restart_interval");
+      }
+
+      const std::string restart_write_dirname =
+         main_db->getStringWithDefault("restart_write_dirname",
+            base_name + ".restart");
+
+      bool use_refined_timestepping = true;
+      if (main_db->keyExists("timestepping")) {
+         string timestepping_method = main_db->getString("timestepping");
+         if (timestepping_method == "SYNCHRONIZED") {
+            use_refined_timestepping = false;
+         }
+      }
+
+#if (TESTING == 1) && !(HAVE_HDF5)
+      /*
+       * If we are autotesting on a system w/o HDF5, the read from
+       * restart will result in an error.  We want this to happen
+       * for users, so they know there is a problem with the restart,
+       * but we don't want it to happen when autotesting.
+       */
+      is_from_restart = false;
+      restart_interval = 0;
+#endif
+
+      const bool write_restart = (restart_interval > 0)
+         && !(restart_write_dirname.empty());
+
+      /*
+       * Get restart manager and root restart database.  If run is from
+       * restart, open the restart file.
+       */
+
+      tbox::RestartManager* restart_manager = tbox::RestartManager::getManager();
+
+#ifdef HAVE_SILO
+      /*
+       * If SILO is present then use SILO as the file storage format
+       * for this example, otherwise it will default to HDF5.
+       */
+      tbox::Pointer<tbox::SiloDatabaseFactory> silo_database_factory(
+         new tbox::SiloDatabaseFactory());
+      restart_manager->setDatabaseFactory(silo_database_factory);
+#endif
+
+      if (is_from_restart) {
+         restart_manager->
+         openRestartFile(restart_read_dirname, restore_num,
+            mpi.getSize());
+      }
+
+      /*
+       * Setup the timer manager to trace timing statistics during execution
+       * of the code.  The list of timers is given in the tbox::TimerManager
+       * section of the input file.  Timing information is stored in the
+       * restart file.  Timers will automatically be initialized to their
+       * previous state if the run is restarted, unless they are explicitly
+       * reset using the tbox::TimerManager::resetAllTimers() routine.
+       */
+
+      tbox::TimerManager::createManager(input_db->getDatabase("TimerManager"));
+
+      /*
+       * Create major algorithm and data objects which comprise application.
+       * Each object is initialized either from input data or restart
+       * files, or a combination of both.  Refer to each class constructor
+       * for details.  For more information on the composition of objects
+       * and the roles they play in this application, see comments at top of file.
+       */
+
+      tbox::Pointer<geom::CartesianGridGeometry> grid_geometry(
+         new geom::CartesianGridGeometry(dim,
+            "CartesianGeometry",
+            input_db->getDatabase("CartesianGeometry")));
+
+      tbox::Pointer<hier::PatchHierarchy> patch_hierarchy(
+         new hier::PatchHierarchy("PatchHierarchy", grid_geometry,
+            input_db->getDatabase("PatchHierarchy")));
+
+      Euler* euler_model = new Euler("Euler",
+            dim,
+            input_db->getDatabase("Euler"),
+            grid_geometry);
+
+      tbox::Pointer<algs::HyperbolicLevelIntegrator> hyp_level_integrator(
+         new algs::HyperbolicLevelIntegrator("HyperbolicLevelIntegrator",
+            input_db->getDatabase(
+               "HyperbolicLevelIntegrator"),
+            euler_model, true,
+            use_refined_timestepping));
+
+      tbox::Pointer<mesh::StandardTagAndInitialize> error_detector(
+         new mesh::StandardTagAndInitialize(dim,
+            "StandardTagAndInitialize",
+            hyp_level_integrator,
+            input_db->getDatabase("StandardTagAndInitialize")));
+
+      tbox::Pointer<mesh::BergerRigoutsos> box_generator(
+         new mesh::BergerRigoutsos(
+            dim,
+            input_db->getDatabaseWithDefault(
+               "BergerRigoutsos",
+               SAMRAI::tbox::Pointer<SAMRAI::tbox::Database>(NULL))));
+
+      tbox::Pointer<mesh::TreeLoadBalancer> load_balancer(
+         new mesh::TreeLoadBalancer(dim,
+            "LoadBalancer", input_db->getDatabase("LoadBalancer")));
+      load_balancer->setSAMRAI_MPI(
+         SAMRAI::tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+      tbox::Pointer<mesh::GriddingAlgorithm> gridding_algorithm(
+         new mesh::GriddingAlgorithm(
+            patch_hierarchy,
+            "GriddingAlgorithm",
+            input_db->getDatabase("GriddingAlgorithm"),
+            error_detector,
+            box_generator,
+            load_balancer));
+
+      tbox::Pointer<algs::TimeRefinementIntegrator> time_integrator(
+         new algs::TimeRefinementIntegrator("TimeRefinementIntegrator",
+            input_db->getDatabase(
+               "TimeRefinementIntegrator"),
+            patch_hierarchy,
+            hyp_level_integrator,
+            gridding_algorithm));
+
+      /*
+       * Set up Visualization writer(s).  Note that the Euler application
+       * creates some derived data quantities so we register the Euler model
+       * as a derived data writer.  If no derived data is written, this step
+       * is not necessary.
+       */
+#ifdef HAVE_HDF5
+      tbox::Pointer<appu::VisItDataWriter> visit_data_writer(
+         new appu::VisItDataWriter(dim,
+            "Euler VisIt Writer",
+            visit_dump_dirname,
+            visit_number_procs_per_file));
+      euler_model->registerVisItDataWriter(visit_data_writer);
+#endif
+
+      /*
+       * Initialize hierarchy configuration and data on all patches.
+       * Then, close restart file and write initial state for visualization.
+       */
+
+      double dt_now = time_integrator->initializeHierarchy();
+
+      tbox::RestartManager::getManager()->closeRestartFile();
+
+#if (TESTING == 1)
+      /*
+       * Create the autotesting component which will verify correctness
+       * of the problem. If no automated testing is done, the object does
+       * not get used.
+       */
+      AutoTester autotester("AutoTester", dim, input_db);
+#endif
+
+      /*
+       * After creating all objects and initializing their state, we
+       * print the input database and variable database contents
+       * to the log file.
+       */
+
+#if 1
+      tbox::plog << "\nCheck input data and variables before simulation:"
+                 << endl;
+      tbox::plog << "Input database..." << endl;
+      input_db->printClassData(tbox::plog);
+      tbox::plog << "\nVariable database..." << endl;
+      hier::VariableDatabase::getDatabase()->printClassData(tbox::plog);
+
+#endif
+      tbox::plog << "\nCheck Euler data... " << endl;
+      euler_model->printClassData(tbox::plog);
+
+      /*
+       * Create timers for measuring I/O.
+       */
+      tbox::Pointer<tbox::Timer> t_write_viz =
+         tbox::TimerManager::getManager()->
+         getTimer("apps::main::write_viz");
+      tbox::Pointer<tbox::Timer> t_write_restart =
+         tbox::TimerManager::getManager()->
+         getTimer("apps::main::write_restart");
+
+      t_write_viz->start();
+      if (matlab_dump_interval > 0) {
+         dumpMatlabData1dPencil(matlab_dump_dirname,
+            matlab_dump_filename,
+            time_integrator->getIntegratorStep(),
+            time_integrator->getIntegratorTime(),
+            patch_hierarchy,
+            matlab_pencil_direction,
+            matlab_default_pencil,
+            matlab_pencil_index,
+            euler_model);
+      }
+#ifdef HAVE_HDF5
+      if (viz_dump_interval > 0) {
+
+         visit_data_writer->writePlotData(
+            patch_hierarchy,
+            time_integrator->getIntegratorStep(),
+            time_integrator->getIntegratorTime());
+      }
+#endif
+      t_write_viz->stop();
+
+      /*
+       * Time step loop.  Note that the step count and integration
+       * time are maintained by algs::TimeRefinementIntegrator.
+       */
+
+      double loop_time = time_integrator->getIntegratorTime();
+      double loop_time_end = time_integrator->getEndTime();
+
+#if (TESTING == 1)
+      /*
+       * If we are doing autotests, check result...
+       */
+      num_failures += autotester.evalTestData(
+            time_integrator->getIntegratorStep(),
+            patch_hierarchy,
+            time_integrator,
+            hyp_level_integrator,
+            gridding_algorithm);
+#endif
+
+      while ((loop_time < loop_time_end) &&
+             time_integrator->stepsRemaining()) {
+
+         int iteration_num = time_integrator->getIntegratorStep() + 1;
+
+         tbox::pout << "++++++++++++++++++++++++++++++++++++++++++++" << endl;
+         tbox::pout << "At begining of timestep # " << iteration_num - 1
+                    << endl;
+         tbox::pout << "Simulation time is " << loop_time << endl;
+         tbox::pout << "Current dt is " << dt_now << endl;
+
+         double dt_new = time_integrator->advanceHierarchy(dt_now);
+
+         loop_time += dt_now;
+         dt_now = dt_new;
+
+         tbox::pout << "At end of timestep # " << iteration_num - 1 << endl;
+         tbox::pout << "Simulation time is " << loop_time << endl;
+         tbox::pout << "++++++++++++++++++++++++++++++++++++++++++++" << endl;
+
+         /*
+          * At specified intervals, write restart files.
+          */
+         if (write_restart) {
+
+            if ((iteration_num % restart_interval) == 0) {
+               t_write_restart->start();
+               tbox::RestartManager::getManager()->
+               writeRestartFile(restart_write_dirname,
+                  iteration_num);
+               t_write_restart->stop();
+            }
+         }
+
+         /*
+          * At specified intervals, write out data files for plotting.
+          */
+         t_write_viz->start();
+#ifdef HAVE_HDF5
+         if ((viz_dump_interval > 0)
+             && (iteration_num % viz_dump_interval) == 0) {
+            visit_data_writer->writePlotData(patch_hierarchy,
+               iteration_num,
+               loop_time);
+         }
+#endif
+         if ((matlab_dump_interval > 0)
+             && (iteration_num % matlab_dump_interval) == 0) {
+            dumpMatlabData1dPencil(matlab_dump_dirname,
+               matlab_dump_filename,
+               iteration_num,
+               loop_time,
+               patch_hierarchy,
+               matlab_pencil_direction,
+               matlab_default_pencil,
+               matlab_pencil_index,
+               euler_model);
+         }
+         t_write_viz->stop();
+
+#if (TESTING == 1)
+         /*
+          * If we are doing autotests, check result...
+          */
+         num_failures += autotester.evalTestData(iteration_num,
+               patch_hierarchy,
+               time_integrator,
+               hyp_level_integrator,
+               gridding_algorithm);
+#endif
+
+         /*
+          * Write byte transfer information to log file.
+          */
+#if 0
+         char num_buf[8];
+         sprintf(num_buf, "%02d", iteration_num);
+         tbox::plog << "Step " << num_buf
+                    << " P" << mpi.getRank()
+                    << ": " << tbox::SAMRAI_MPI::getIncomingBytes()
+                    << " bytes in" << endl;
+#endif
+
+      }
+
+      /*
+       * Output timer results.
+       */
+      tbox::TimerManager::getManager()->print(tbox::plog);
+
+      /*
+       * At conclusion of simulation, deallocate objects.
+       */
+      patch_hierarchy.setNull();
+      grid_geometry.setNull();
+
+      box_generator.setNull();
+      load_balancer.setNull();
+      hyp_level_integrator.setNull();
+      error_detector.setNull();
+      gridding_algorithm.setNull();
+      time_integrator.setNull();
+#ifdef HAVE_HDF5
+      visit_data_writer.setNull();
+#endif
+
+      if (euler_model) delete euler_model;
+
+   }
+
+   if (num_failures == 0) {
+      tbox::pout << "\nPASSED:  Euler" << endl;
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return num_failures;
+}
+
+static void dumpMatlabData1dPencil(
+   const string& dirname,
+   const string& filename,
+   const int ext,
+   const double plot_time,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   const int pencil_direction,
+   const bool default_pencil,
+   const tbox::Array<int>& pencil_index,
+   Euler* euler_model)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   /*
+    * Compute the boxes to write out data at each level of the hierarchy.
+    */
+
+   const tbox::Dimension& dim = hierarchy->getDim();
+
+   int nlevels = 1;
+
+   if ((dim == tbox::Dimension(1))) {
+      nlevels = hierarchy->getNumberOfLevels();
+   }
+
+   hier::BoxList domain(hierarchy->getGridGeometry()->getPhysicalDomain());
+   hier::Box pencil_box(domain.getBoundingBox());
+
+   if (dim > tbox::Dimension(1)) {
+      int indx = 0;
+      int id = 0;
+      tbox::Array<int> tmp(dim.getValue() - 1);
+      for (id = 0; id < dim.getValue() - 1; id++) {
+         tmp[id] = pencil_index[id];
+      }
+      if (default_pencil) {
+         hier::Index ifirst = domain.getBoundingBox().lower();
+         indx = 0;
+         for (id = 0; id < dim.getValue(); id++) {
+            if (id != pencil_direction) {
+               tmp[indx] = ifirst(id);
+               indx++;
+            }
+         }
+      }
+      indx = 0;
+      for (id = 0; id < dim.getValue(); id++) {
+         if (id != pencil_direction) {
+            pencil_box.lower(id) = tmp[indx];
+            pencil_box.upper(id) = tmp[indx];
+            indx++;
+         }
+      }
+   }
+
+   tbox::Array<hier::BoxList> outboxes(nlevels);
+
+   for (int l1 = 0; l1 < nlevels; l1++) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(l1);
+      outboxes[l1] = hier::BoxList(level->getBoxes());
+
+      if (l1 < nlevels - 1) {
+
+         tbox::Pointer<hier::PatchLevel> finer_level =
+            hierarchy->getPatchLevel(l1 + 1);
+         hier::IntVector coarsen_ratio =
+            finer_level->getRatioToCoarserLevel();
+         hier::BoxList takeaway = hier::BoxList(finer_level->getBoxes());
+         takeaway.coarsen(coarsen_ratio);
+         outboxes[l1].removeIntersections(takeaway);
+      }
+
+   }
+
+   /*
+    * Create matlab filename and open the output stream.
+    */
+
+   string dump_filename = filename;
+   if (!dirname.empty()) {
+      tbox::Utilities::recursiveMkdir(dirname);
+      dump_filename = dirname;
+      dump_filename += "/";
+      dump_filename += filename;
+   }
+
+   const int size = static_cast<int>(dump_filename.length()) + 16;
+   char* buffer = new char[size];
+
+   if (mpi.getSize() > 1) {
+      sprintf(buffer, "%s.%04d.dat.%05d", dump_filename.c_str(),
+         ext, mpi.getRank());
+   } else {
+      sprintf(buffer, "%s_%04d.dat", dump_filename.c_str(), ext);
+   }
+
+   /*
+    * Open a new output file having name name of buffer character array.
+    */
+
+   ofstream outfile(buffer, ios::out);
+   outfile.setf(ios::scientific);
+   outfile.precision(10);
+
+   delete[] buffer;
+
+   /*
+    * There are 7 values dumped for every cell.  Here we dump the time.
+    */
+   for (int i = 0; i < 6 + 1; i++) {
+      outfile << plot_time << "  ";
+   }
+   outfile << endl;
+
+   euler_model->setDataContext(
+      hier::VariableDatabase::getDatabase()->getContext("CURRENT"));
+
+   for (int l5 = 0; l5 < nlevels; l5++) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(l5);
+
+      hier::Box level_pencil_box = pencil_box;
+      if (l5 > 0) {
+         level_pencil_box.refine(level->getRatioToLevelZero());
+      }
+
+      for (hier::PatchLevel::Iterator i(level); i; i++) {
+         tbox::Pointer<hier::Patch> patch = *i;
+         hier::Box pbox = patch->getBox();
+
+         for (hier::BoxList::Iterator b(outboxes[l5]); b; b++) {
+            const hier::Box box = b() * pbox * level_pencil_box;
+
+            euler_model->writeData1dPencil(patch,
+               box,
+               pencil_direction,
+               outfile);
+         }
+
+      }
+
+   }
+
+   euler_model->clearDataContext();
+
+   outfile.close();
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/test_inputs/test-2d-re.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/test_inputs/test-2d-re.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,183 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (2d room) 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+AutoTester {
+   test_fluxes = FALSE
+   test_iter_num = 10
+   correct_result = 0.602378029044, 0.0118573379806, 0.00131668704346
+   output_correct = FALSE
+
+   write_patch_boxes = FALSE
+   read_patch_boxes = TRUE
+   test_patch_boxes_at_steps = 0, 5, 10  // 0 checks initial data
+   test_patch_boxes_filename = "test_inputs/test-2d-re.boxes"
+   simplify_test_boxes = TRUE
+}
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4        // order of Goduov slopes (1, 2, or 4)
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   data_problem         = "SPHERE"
+
+   Initial_data {
+      radius            = 6.0
+      center            = 30.0 , 30.0
+
+      density_inside    = 8.0
+      velocity_inside   = 0.0 , 0.0
+      pressure_inside   = 40.0
+
+      density_outside    = 1.0
+      velocity_outside   = 0.0 , 0.0
+      pressure_outside   = 1.0
+
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_RICHARDSON"
+
+      PRESSURE_RICHARDSON {
+         rich_tol = 0.001
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "XREFLECT"
+      }
+   }
+
+}
+
+Main {
+   dim = 2
+   base_name = "test-2d-re"
+// log file parameters
+   log_all_nodes    = TRUE
+
+// visualization dump parameters
+   viz_dump_interval     = 0         // zero to turn off
+   viz_dump_dirname     = "viz-test-2d-re"
+
+// restart dump parameters
+   restart_interval       = 1         // zero to turn off
+
+   plotting_interval = 0
+}
+
+TimerManager{
+   print_exclusive      = TRUE   // output exclusive time
+   timer_list               = "apps::main::*",
+                              "apps::Euler::*",
+                              "algs::GriddingAlgorithm::*",
+                              "algs::HyperbolicLevelIntegrator::*"
+}
+
+CartesianGeometry{
+   domain_boxes	= [(0,0),(59,59)]
+
+   x_lo = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up = 60.e0 , 60.e0 // upper end of computational domain.
+}
+
+StandardTagAndInitialize {
+   tagging_method = "RICHARDSON_EXTRAPOLATION"
+}
+
+PatchHierarchy {
+   max_levels = 3         // Maximum number of levels in hierarchy.
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 4 , 4
+      level_2 = 4 , 4
+      level_3 = 4 , 4
+   }
+
+   largest_patch_size {
+      level_0 = 48 , 48
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 8 , 8
+      level_1 = 16 , 16
+      // all finer levels will use same values as level_1...
+   }
+
+}
+
+GriddingAlgorithm{
+
+   efficiency_tolerance    = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.85e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+BergerRigoutsos {
+  sort_output_nodes = TRUE // Makes results repeatable.
+}
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.9e0    // max cfl factor used in problem
+   cfl_init                  = 0.1e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+TimeRefinementIntegrator{
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 10       // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/test_inputs/test.2d.boxes.0000001.0000000
Binary file source/test/applications/Euler/test_inputs/test.2d.boxes.0000001.0000000 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/test_inputs/test.2d.boxes.0000002.0000000
Binary file source/test/applications/Euler/test_inputs/test.2d.boxes.0000002.0000000 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/test_inputs/test.2d.boxes.0000002.0000001
Binary file source/test/applications/Euler/test_inputs/test.2d.boxes.0000002.0000001 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/test_inputs/test.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/test_inputs/test.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,218 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler 2d test problem 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+AutoTester {
+   test_fluxes = FALSE
+   test_iter_num = 10
+   correct_result =  0.0199217807513, 0.000626631372170, 6.97075036474e-05
+   output_correct = FALSE
+
+   write_patch_boxes = FALSE
+   read_patch_boxes = TRUE
+   test_patch_boxes_at_steps = 0, 5, 10  // 0 checks initial data
+   test_patch_boxes_filename = "test_inputs/test.2d.boxes"
+   simplify_test_boxes = TRUE
+}
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4        // order of Goduov slopes (1, 2, or 4)
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   data_problem         = "STEP"
+
+   Initial_data {
+      front_position = 0.0
+      interval_0 {
+         density         = 1.4
+         velocity        = 3.0 , 0.0
+         pressure        = 1.0
+      }
+      interval_1 {
+         density         = 1.4
+         velocity        = 3.0 , 0.0
+         pressure        = 1.0
+      }
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT", "PRESSURE_SHOCK"
+
+      PRESSURE_GRADIENT {
+         grad_tol = 20.0
+      }
+
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.90
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "YREFLECT"
+      }
+   }
+
+}
+
+BergerRigoutsos {
+   algo_advance_mode = "ADVANCE_SOME"
+   owner_mode = "MOST_OVERLAP"
+   log_node_history = FALSE
+   use_level_boxes = FALSE
+   use_private_communicator = TRUE
+   sort_output_nodes = TRUE // Makes results repeatable.
+   max_box_size = 100, 100
+   log_cluster_summary = TRUE
+   log_cluster = FALSE
+   barrier_before = TRUE
+   barrier_after = TRUE
+}
+
+Main {
+   dim = 2
+   base_name = "test.2d"
+// log file parameters
+   log_all_nodes    = TRUE
+
+// visualization dump parameters
+   viz_dump_interval     = 1         // zero to turn off
+
+// restart dump parameters
+   restart_interval       = 1         // zero to turn off
+
+   plotting_interval = 0
+}
+
+TimerManager{
+   print_exclusive      = TRUE   // output exclusive time
+   timer_list               = "apps::main::*",
+                              "apps::Euler::*",
+                              "algs::GriddingAlgorithm::*",
+                              "algs::HyperbolicLevelIntegrator::*"
+}
+
+CartesianGeometry {
+   domain_boxes = [ (0,0) , (9,19) ],
+                  [ (10,4) , (49,19) ]
+   x_lo         = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 2.5e0 , 1.e0  // upper end of computational domain.
+}
+
+StandardTagAndInitialize{
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+
+   max_levels = 5         // Maximum number of levels in hierarchy.
+
+   ratio_to_coarser {              // vector ratio to next coarser level
+      level_1            = 2 , 2
+      level_2            = 2 , 2
+      level_3            = 2 , 2
+      level_4            = 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 320 , 320
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 8 , 8
+      level_1 = 8 , 8
+      level_2 = 8 , 8
+      level_3 = 12 , 12
+   }
+
+   allow_patches_smaller_than_ghostwidth = TRUE
+   allow_patches_smaller_than_minimum_size_to_prevent_overlaps = TRUE
+
+   proper_nesting_buffer = 1, 1
+
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   check_nonrefined_tags = "IGNORE"
+
+   efficiency_tolerance = 0.75e0   // min % of tag cells in new patch level
+   combine_efficiency   = 0.85e0   // chop box if sum of volumes of smaller
+                                   // boxes < efficiency * vol of large box
+   sequentialize_patch_indices = TRUE // Required for plotting.
+
+   check_overlapping_patches = "IGNORE"
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 100.e0    // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   max_integrator_steps  = 10      // max number of simulation timesteps
+}
+
+LoadBalancer {
+  report_load_balance = FALSE
+  barrier_before = TRUE
+  barrier_after = TRUE
+  n_root_cycles = 1
+}
+
+RefineSchedule {
+  extra_debug = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/test_inputs/test.3d.boxes.0000001.0000000
Binary file source/test/applications/Euler/test_inputs/test.3d.boxes.0000001.0000000 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/test_inputs/test.3d.boxes.0000002.0000000
Binary file source/test/applications/Euler/test_inputs/test.3d.boxes.0000002.0000000 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/test_inputs/test.3d.boxes.0000002.0000001
Binary file source/test/applications/Euler/test_inputs/test.3d.boxes.0000002.0000001 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/test_inputs/test.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/test_inputs/test.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,252 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (3d box) 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+AutoTester {
+   test_fluxes = FALSE
+   test_iter_num = 10
+   correct_result = 0.0463367714649 ,  0.00370820618904 ,   0.000414460472703
+   output_correct = FALSE
+
+   write_patch_boxes = FALSE
+   read_patch_boxes = TRUE
+   test_patch_boxes_at_steps = 0, 5, 10  // 0 checks initial data
+   test_patch_boxes_filename = "test_inputs/test.3d.boxes"
+   simplify_test_boxes = TRUE
+}
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4
+
+  riemann_solve      = "APPROX_RIEM_SOLVE"
+//   riemann_solve      = "EXACT_RIEM_SOLVE"
+//   riemann_solve      = "HLLC_RIEM_SOLVE"
+
+   corner_transport = "CORNER_TRANSPORT_2"
+
+   data_problem      = "SPHERE"
+
+   Initial_data {
+      radius            = 0.125
+      center            = 0.5 , 0.5 , 0.5
+
+      density_inside    = 8.0
+      velocity_inside   = 0.0 , 0.0 , 0.0
+      pressure_inside   = 40.0
+
+      density_outside    = 1.0
+      velocity_outside   = 0.0 , 0.0 , 0.0
+      pressure_outside   = 1.0
+
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT", "PRESSURE_SHOCK"
+
+      PRESSURE_GRADIENT {
+         grad_tol = 10.0
+      }
+
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "FLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for an edge, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent face has either a FLOW
+      //            or REFLECT condition, the resulting edge boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent faces have either FLOW
+      //            or REFLECT conditions, the resulting node boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+
+   }
+
+}
+
+Main {
+   dim = 3
+   base_name = "test.3d"
+// log file parameters
+   log_all_nodes    = TRUE
+
+// visualization dump parameters
+   viz_dump_interval     = 1         // zero to turn off
+
+// restart dump parameters
+   restart_interval        = 1        // zero to turn off
+}
+
+TimerManager {
+   print_exclusive      = TRUE   // output exclusive time
+   timer_list               = "apps::main::*",
+                              "apps::Euler::*",
+                              "algs::GriddingAlgorithm::*",
+                              "algs::HyperbolicLevelIntegrator::*"
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (12,12,12) ]
+   x_lo          = 0.e0,0.e0,0.e0     // lower end of computational domain.
+   x_up          = 1.e0,1.e0,1.e0  // upper end of computational domain.
+}
+
+StandardTagAndInitialize{
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+   max_levels             = 3        // Maximum number of levels in hierarchy.
+   ratio_to_coarser {            // vector ratio to next coarser level
+      level_1             = 2,2,2
+      level_2             = 2,2,2
+   }
+
+   largest_patch_size {
+      level_0 =  19, 19, 19  // largest patch allowed in hierarchy
+           // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 =  8, 8, 8
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance   = 0.70e0    // min % of tag cells in new patch level
+   combine_efficiency     = 0.85e0    // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+BergerRigoutsos {
+  sort_output_nodes = TRUE // Makes results repeatable.
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 100.e0   // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   max_integrator_steps  = 10     // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
+
+RefineSchedule {
+  extra_debug = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/test_inputs/test_restart.2d.boxes.0000001.0000000
Binary file source/test/applications/Euler/test_inputs/test_restart.2d.boxes.0000001.0000000 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/test_inputs/test_restart.2d.boxes.0000002.0000000
Binary file source/test/applications/Euler/test_inputs/test_restart.2d.boxes.0000002.0000000 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/test_inputs/test_restart.2d.boxes.0000002.0000001
Binary file source/test/applications/Euler/test_inputs/test_restart.2d.boxes.0000002.0000001 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/test_inputs/test_restart.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/test_inputs/test_restart.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,184 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (2d room) 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+AutoTester {
+   test_fluxes = FALSE
+   test_iter_num = 10
+   correct_result = 0.602378029044, 0.0118573379806, 0.00131668704346
+   output_correct = FALSE
+
+   write_patch_boxes = FALSE
+   read_patch_boxes = TRUE
+   test_patch_boxes_at_steps = 0, 5, 10  // 0 checks initial data
+   test_patch_boxes_filename = "test_inputs/test_restart.2d.boxes"
+   simplify_test_boxes = TRUE
+}
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4        // order of Goduov slopes (1, 2, or 4)
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   data_problem         = "SPHERE"
+
+   Initial_data {
+      radius            = 6.0
+      center            = 30.0 , 30.0
+
+      density_inside    = 8.0
+      velocity_inside   = 0.0 , 0.0
+      pressure_inside   = 40.0
+
+      density_outside    = 1.0
+      velocity_outside   = 0.0 , 0.0
+      pressure_outside   = 1.0
+
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_RICHARDSON"
+
+      PRESSURE_RICHARDSON {
+         rich_tol = 0.001
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "XREFLECT"
+      }
+   }
+
+}
+
+Main {
+   dim = 2
+   base_name = "test_restart.2d"
+// log file parameters
+   log_all_nodes    = TRUE
+
+// visualization dump parameters
+   viz_dump_interval     = 1         // zero to turn off
+   viz_dump_dirname     = "viz-test-2d-re"
+
+// restart dump parameters
+   restart_interval       = 1         // zero to turn off
+
+   plotting_interval = 0
+}
+
+TimerManager{
+   print_exclusive      = TRUE   // output exclusive time
+   timer_list               = "apps::main::*",
+                              "apps::Euler::*",
+                              "algs::GriddingAlgorithm::*",
+                              "algs::HyperbolicLevelIntegrator::*"
+}
+
+CartesianGeometry{
+   domain_boxes	= [(0,0),(59,59)]
+
+   x_lo = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up = 60.e0 , 60.e0 // upper end of computational domain.
+}
+
+StandardTagAndInitialize {
+   tagging_method = "RICHARDSON_EXTRAPOLATION"
+}
+
+PatchHierarchy {
+   max_levels = 3         // Maximum number of levels in hierarchy.
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 4 , 4
+      level_2 = 4 , 4
+      level_3 = 4 , 4
+   }
+
+   largest_patch_size {
+      level_0 = 48 , 48
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 8 , 8
+      level_1 = 16 , 16
+      // all finer levels will use same values as level_1...
+   }
+
+}
+
+GriddingAlgorithm{
+
+   efficiency_tolerance    = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.85e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+   sequentialize_patch_indices = TRUE // Required for plotting.
+}
+
+BergerRigoutsos {
+  sort_output_nodes = TRUE // Makes results repeatable.
+}
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.9e0    // max cfl factor used in problem
+   cfl_init                  = 0.1e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+TimeRefinementIntegrator{
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 10       // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/test_inputs/test_sync.2d.boxes.0000001.0000000
Binary file source/test/applications/Euler/test_inputs/test_sync.2d.boxes.0000001.0000000 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/test_inputs/test_sync.2d.boxes.0000002.0000000
Binary file source/test/applications/Euler/test_inputs/test_sync.2d.boxes.0000002.0000000 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/test_inputs/test_sync.2d.boxes.0000002.0000001
Binary file source/test/applications/Euler/test_inputs/test_sync.2d.boxes.0000002.0000001 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/test_inputs/test_sync.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/test_inputs/test_sync.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,197 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler 2d test problem 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+AutoTester {
+   test_fluxes = FALSE
+   test_iter_num = 10
+   correct_result = 0.00491625520151, 0.000664890679259, 7.29562576939e-05
+   output_correct = FALSE
+
+   write_patch_boxes = FALSE
+   read_patch_boxes = TRUE
+   test_patch_boxes_at_steps = 0, 5, 10  // 0 checks initial data
+   test_patch_boxes_filename = "test_inputs/test_sync.2d.boxes"
+   simplify_test_boxes = TRUE
+}
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4        // order of Goduov slopes (1, 2, or 4)
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   data_problem         = "STEP"
+
+   Initial_data {
+      front_position = 0.0
+      interval_0 {
+         density         = 1.4
+         velocity        = 3.0 , 0.0
+         pressure        = 1.0
+      }
+      interval_1 {
+         density         = 1.4
+         velocity        = 3.0 , 0.0
+         pressure        = 1.0
+      }
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT", "PRESSURE_SHOCK"
+
+      PRESSURE_GRADIENT {
+         grad_tol = 20.0
+      }
+
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.90
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "YREFLECT"
+      }
+   }
+}
+
+Main {
+   dim = 2
+   base_name = "test_sync.2d"
+// log file parameters
+   log_all_nodes    = TRUE
+
+// visualization dump parameters
+   viz_dump_interval     = 0         // zero to turn off
+   viz_dump_dirname     = "viz-test-2d-sync"
+
+// restart dump parameters
+   restart_interval       = 1         // zero to turn off
+
+   plotting_interval = 0
+
+   timestepping = "SYNCHRONIZED"
+}
+
+TimerManager{
+   print_exclusive      = TRUE   // output exclusive time
+   timer_list               = "apps::main::*",
+                              "apps::Euler::*",
+                              "algs::GriddingAlgorithm::*",
+                              "algs::HyperbolicLevelIntegrator::*"
+}
+
+CartesianGeometry {
+   domain_boxes = [ (0,0) , (9,19) ],
+                  [ (10,4) , (49,19) ]
+   x_lo         = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 2.5e0 , 1.e0  // upper end of computational domain.
+}
+
+StandardTagAndInitialize{
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+   max_levels = 5         // Maximum number of levels in hierarchy.
+
+   ratio_to_coarser {              // vector ratio to next coarser level
+      level_1            = 2 , 2
+      level_2            = 2 , 2
+      level_3            = 2 , 2
+      level_4            = 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 32 , 32
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 8 , 8
+      level_1 = 8 , 8
+      level_2 = 8 , 8
+      level_3 = 12 , 12
+   }
+
+   allow_patches_smaller_than_ghostwidth = TRUE
+   allow_patches_smaller_than_minimum_size_to_prevent_overlaps = TRUE
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance = 0.75e0   // min % of tag cells in new patch level
+   combine_efficiency   = 0.85e0   // chop box if sum of volumes of smaller
+                                   // boxes < efficiency * vol of large box
+
+   allow_patches_smaller_than_ghostwidth = TRUE
+   allow_patches_smaller_than_minimum_size_to_prevent_overlaps = TRUE
+}
+
+BergerRigoutsos {
+  sort_output_nodes = TRUE // Makes results repeatable.
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 100.e0    // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   max_integrator_steps  = 10      // max number of simulation timesteps
+   regrid_interval       = 2
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/test_inputs/test_sync.3d.boxes.0000001.0000000
Binary file source/test/applications/Euler/test_inputs/test_sync.3d.boxes.0000001.0000000 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/test_inputs/test_sync.3d.boxes.0000002.0000000
Binary file source/test/applications/Euler/test_inputs/test_sync.3d.boxes.0000002.0000000 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/test_inputs/test_sync.3d.boxes.0000002.0000001
Binary file source/test/applications/Euler/test_inputs/test_sync.3d.boxes.0000002.0000001 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/test_inputs/test_sync.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/test_inputs/test_sync.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,253 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (3d box) 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+AutoTester {
+   test_fluxes = FALSE
+   test_iter_num = 10
+   correct_result = 0.0150594507261, 0.00245085625513, 0.000514174342157
+   output_correct = FALSE
+
+   write_patch_boxes = FALSE
+   read_patch_boxes = TRUE
+   test_patch_boxes_at_steps = 0, 5, 10  // 0 checks initial data
+   test_patch_boxes_filename = "test_inputs/test_sync.3d.boxes"
+   simplify_test_boxes = TRUE
+}
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4
+
+   riemann_solve      = "APPROX_RIEM_SOLVE"
+//   riemann_solve      = "EXACT_RIEM_SOLVE"
+//   riemann_solve      = "HLLC_RIEM_SOLVE"
+
+   corner_transport = "CORNER_TRANSPORT_2"
+
+   data_problem      = "SPHERE"
+
+   Initial_data {
+      radius            = 0.125
+      center            = 0.5 , 0.5 , 0.5
+
+      density_inside    = 8.0
+      velocity_inside   = 0.0 , 0.0 , 0.0
+      pressure_inside   = 40.0
+
+      density_outside    = 1.0
+      velocity_outside   = 0.0 , 0.0 , 0.0
+      pressure_outside   = 1.0
+
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT", "PRESSURE_SHOCK"
+
+      PRESSURE_GRADIENT {
+         grad_tol = 10.0
+      }
+
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "FLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for an edge, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent face has either a FLOW
+      //            or REFLECT condition, the resulting edge boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent faces have either FLOW
+      //            or REFLECT conditions, the resulting node boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+
+   }
+
+}
+
+
+Main {
+   dim = 3
+   base_name = "test_sync.3d"
+// log file parameters
+   log_all_nodes    = TRUE
+
+// visualization dump parameters
+   viz_dump_interval     = 0         // zero to turn off
+   viz_dump_dirname      = "viz-test-3d-sync"
+
+// restart dump parameters
+   restart_interval        = 1        // zero to turn off
+
+   timestepping = "SYNCHRONIZED"
+}
+
+TimerManager {
+   print_exclusive      = TRUE   // output exclusive time
+   timer_list               = "apps::main::*",
+                              "apps::Euler::*",
+                              "algs::GriddingAlgorithm::*",
+                              "algs::HyperbolicLevelIntegrator::*"
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (9,9,9) ]
+   x_lo          = 0.e0,0.e0,0.e0     // lower end of computational domain.
+   x_up          = 1.e0,1.e0,1.e0  // upper end of computational domain.
+}
+
+StandardTagAndInitialize{
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+   max_levels             = 3        // Maximum number of levels in hierarchy.
+   ratio_to_coarser {            // vector ratio to next coarser level
+      level_1             = 2,2,2
+      level_2             = 2,2,2
+   }
+
+   largest_patch_size {
+      level_0 =  19, 19, 19  // largest patch allowed in hierarchy
+           // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 =  8, 8, 8
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance   = 0.70e0    // min % of tag cells in new patch level
+   combine_efficiency     = 0.85e0    // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+BergerRigoutsos {
+  sort_output_nodes = TRUE // Makes results repeatable.
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 100.e0   // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   max_integrator_steps  = 10     // max number of simulation timesteps
+   regrid_interval       = 2
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/test_inputs/test_sync_restart.3d.boxes
Binary file source/test/applications/Euler/test_inputs/test_sync_restart.3d.boxes has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/test_inputs/test_sync_restart.3d.boxes.0000001.0000000
Binary file source/test/applications/Euler/test_inputs/test_sync_restart.3d.boxes.0000001.0000000 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/test_inputs/test_sync_restart.3d.boxes.0000002.0000000
Binary file source/test/applications/Euler/test_inputs/test_sync_restart.3d.boxes.0000002.0000000 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/test_inputs/test_sync_restart.3d.boxes.0000002.0000001
Binary file source/test/applications/Euler/test_inputs/test_sync_restart.3d.boxes.0000002.0000001 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Euler/test_inputs/test_sync_restart.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Euler/test_inputs/test_sync_restart.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,261 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (3d box) 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+AutoTester {
+   test_fluxes = FALSE
+   test_iter_num = 10
+   correct_result = 0.0150594507261,  0.00245085625513 , 0.000514174342157
+   output_correct = FALSE
+
+   write_patch_boxes = FALSE
+   read_patch_boxes = TRUE
+   test_patch_boxes_at_steps = 0, 5, 10  // 0 checks initial data
+   test_patch_boxes_filename = "test_inputs/test_sync_restart.3d.boxes"
+   simplify_test_boxes = TRUE
+}
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4
+
+   riemann_solve      = "APPROX_RIEM_SOLVE"
+//   riemann_solve      = "EXACT_RIEM_SOLVE"
+//   riemann_solve      = "HLLC_RIEM_SOLVE"
+
+   corner_transport = "CORNER_TRANSPORT_2"
+
+   data_problem      = "SPHERE"
+
+   Initial_data {
+      radius            = 0.125
+      center            = 0.5 , 0.5 , 0.5
+
+      density_inside    = 8.0
+      velocity_inside   = 0.0 , 0.0 , 0.0
+      pressure_inside   = 40.0
+
+      density_outside    = 1.0
+      velocity_outside   = 0.0 , 0.0 , 0.0
+      pressure_outside   = 1.0
+
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT",
+                        "PRESSURE_SHOCK",
+                        "PRESSURE_RICHARDSON"
+
+      PRESSURE_RICHARDSON {
+         rich_tol = 0.001
+      }
+
+      // PRESSURE_GRADIENT and PRESSURE_SHOCK criteria are applied only if
+      // the gradient detector is turned on in StandardTagAndInitialize
+      // input below...
+      PRESSURE_GRADIENT {
+         grad_tol = 10.0
+      }
+
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for an edge, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent face has either a FLOW
+      //            or REFLECT condition, the resulting edge boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent faces have either FLOW
+      //            or REFLECT conditions, the resulting node boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+
+   }
+
+}
+
+Main {
+   dim = 3
+   base_name = "test_sync_restart.3d"
+// log file parameters
+   log_all_nodes    = TRUE
+
+// visualization dump parameters
+   viz_dump_interval     = 0         // zero to turn off
+   viz_dump_dirname      = "viz-test-3d-sync-re"
+
+// restart dump parameters
+   restart_interval        = 1        // zero to turn off
+
+   timestepping = "SYNCHRONIZED"
+}
+
+TimerManager {
+   print_exclusive      = TRUE   // output exclusive time
+   timer_list               = "apps::main::*",
+                              "apps::Euler::*",
+                              "algs::GriddingAlgorithm::*",
+                              "algs::HyperbolicLevelIntegrator::*"
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (9,9,9) ]
+   x_lo          = 0.e0,0.e0,0.e0     // lower end of computational domain.
+   x_up          = 1.e0,1.e0,1.e0  // upper end of computational domain.
+}
+
+StandardTagAndInitialize{
+//   tagging_method = "GRADIENT_DETECTOR"
+   tagging_method = "RICHARDSON_EXTRAPOLATION"
+}
+
+PatchHierarchy {
+   max_levels             = 3        // Maximum number of levels in hierarchy.
+   ratio_to_coarser {            // vector ratio to next coarser level
+      level_1             = 2,2,2
+      level_2             = 2,2,2
+   }
+
+   largest_patch_size {
+      level_0 =  19, 19, 19  // largest patch allowed in hierarchy
+           // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 =  8, 8, 8
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance   = 0.70e0    // min % of tag cells in new patch level
+   combine_efficiency     = 0.85e0    // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+BergerRigoutsos {
+  sort_output_nodes = TRUE // Makes results repeatable.
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 100.e0   // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   max_integrator_steps  = 10     // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/LinAdv.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/LinAdv.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,3112 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Numerical routines for single patch in linear advection ex. 
+ *
+ ************************************************************************/
+#include "LinAdv.h"
+
+#include <iostream>
+#include <iomanip>
+#include <fstream>
+
+#ifndef LACKS_SSTREAM
+#ifndef included_sstream
+#define included_sstream
+#include <sstream>
+#endif
+#else
+#ifndef included_strstream
+#define included_strstream
+#include <strstream.h>
+#endif
+#endif
+
+using namespace std;
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+#include <float.h>
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceIndex.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/mesh/TreeLoadBalancer.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+//integer constants for boundary conditions
+#define CHECK_BDRY_DATA (0)
+#include "SAMRAI/appu/CartesianBoundaryDefines.h"
+
+//integer constant for debugging improperly set boundary dat
+#define BOGUS_BDRY_DATA (-9999)
+
+// routines for managing boundary data
+#include "SAMRAI/appu/CartesianBoundaryUtilities2.h"
+#include "SAMRAI/appu/CartesianBoundaryUtilities3.h"
+
+// External definitions for Fortran numerical routines
+#include "LinAdvFort.h"
+
+// Number of ghosts cells used for each variable quantity
+#define CELLG (4)
+#define FACEG (4)
+#define FLUXG (1)
+
+// defines for initialization
+#define PIECEWISE_CONSTANT_X (10)
+#define PIECEWISE_CONSTANT_Y (11)
+#define PIECEWISE_CONSTANT_Z (12)
+#define SINE_CONSTANT_X (20)
+#define SINE_CONSTANT_Y (21)
+#define SINE_CONSTANT_Z (22)
+#define SPHERE (40)
+
+// defines for Riemann solver used in Godunov flux calculation
+#define APPROX_RIEM_SOLVE (20)   // Colella-Glaz approx Riemann solver
+#define EXACT_RIEM_SOLVE (21)    // Exact Riemann solver
+#define HLLC_RIEM_SOLVE (22)     // Harten, Lax, van Leer approx Riemann solver
+
+// defines for cell tagging routines
+#define RICHARDSON_NEWLY_TAGGED (-10)
+#define RICHARDSON_ALREADY_TAGGED (-11)
+#ifndef TRUE
+#define TRUE (1)
+#endif
+#ifndef FALSE
+#define FALSE (0)
+#endif
+
+// Version of LinAdv restart file data
+#define LINADV_VERSION (3)
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The constructor for LinAdv class sets data members to defualt values, *
+ * creates variables that define the solution state for the linear       *
+ * advection equation.
+ *                                                                       *
+ * After default values are set, this routine calls getFromRestart()     *
+ * if execution from a restart file is specified.  Finally,              *
+ * getFromInput() is called to read values from the given input          *
+ * database (potentially overriding those found in the restart file).    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+LinAdv::LinAdv(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> input_db,
+   tbox::Pointer<geom::CartesianGridGeometry> grid_geom):
+   algs::HyperbolicPatchStrategy(dim),
+   d_dim(dim),
+   d_advection_velocity(dim.getValue()),
+   d_nghosts(d_dim, CELLG),
+   d_fluxghosts(d_dim, FLUXG),
+   d_center(dim.getValue()),
+   d_frequency(dim.getValue())
+{
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!input_db.isNull());
+   TBOX_ASSERT(!grid_geom.isNull());
+
+   d_object_name = object_name;
+   tbox::RestartManager::getManager()->registerRestartItem(d_object_name, this);
+
+   d_grid_geometry = grid_geom;
+
+   d_use_nonuniform_workload = false;
+
+   /*
+    * hier::Variable quantities that define state of linear advection problem.
+    */
+   d_uval = new pdat::CellVariable<double>(dim, "uval", 1);
+   d_flux = new pdat::FaceVariable<double>(dim, "flux", 1);
+
+   /*
+    * Default parameters for the numerical method.
+    */
+   d_godunov_order = 1;
+   d_corner_transport = "CORNER_TRANSPORT_1";
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(CELLG == FACEG);
+#endif
+
+   /*
+    * Defaults for problem type and initial data.
+    */
+   d_data_problem_int = tbox::MathUtilities<int>::getMax();
+
+   int k;
+
+   // SPHERE problem...
+   d_radius = tbox::MathUtilities<double>::getSignalingNaN();
+   tbox::MathUtilities<double>::setArrayToSignalingNaN(&d_center[0], d_dim.getValue());
+   d_uval_inside = tbox::MathUtilities<double>::getSignalingNaN();
+   d_uval_outside = tbox::MathUtilities<double>::getSignalingNaN();
+
+   d_number_of_intervals = 0;
+   d_front_position.resizeArray(0);
+   d_interval_uval.resizeArray(0);
+
+   // SINE problem
+   d_amplitude = 0.;
+   for (k = 0; k < d_dim.getValue(); k++) d_frequency[k] = 0.;
+
+   /*
+    * Defaults for boundary conditions. Set to bogus values
+    * for error checking.
+    */
+
+   if (d_dim == tbox::Dimension(2)) {
+      d_scalar_bdry_edge_conds.resizeArray(NUM_2D_EDGES);
+      for (int ei = 0; ei < NUM_2D_EDGES; ei++) {
+         d_scalar_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+      }
+
+      d_scalar_bdry_node_conds.resizeArray(NUM_2D_NODES);
+      d_node_bdry_edge.resizeArray(NUM_2D_NODES);
+
+      for (int ni = 0; ni < NUM_2D_NODES; ni++) {
+         d_scalar_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+         d_node_bdry_edge[ni] = BOGUS_BDRY_DATA;
+      }
+
+      d_bdry_edge_uval.resizeArray(NUM_2D_EDGES);
+      tbox::MathUtilities<double>::setArrayToSignalingNaN(d_bdry_edge_uval);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      d_scalar_bdry_face_conds.resizeArray(NUM_3D_FACES);
+      for (int fi = 0; fi < NUM_3D_FACES; fi++) {
+         d_scalar_bdry_face_conds[fi] = BOGUS_BDRY_DATA;
+      }
+
+      d_scalar_bdry_edge_conds.resizeArray(NUM_3D_EDGES);
+      d_edge_bdry_face.resizeArray(NUM_3D_EDGES);
+      for (int ei = 0; ei < NUM_3D_EDGES; ei++) {
+         d_scalar_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+         d_edge_bdry_face[ei] = BOGUS_BDRY_DATA;
+      }
+
+      d_scalar_bdry_node_conds.resizeArray(NUM_3D_NODES);
+      d_node_bdry_face.resizeArray(NUM_3D_NODES);
+
+      for (int ni = 0; ni < NUM_3D_NODES; ni++) {
+         d_scalar_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+         d_node_bdry_face[ni] = BOGUS_BDRY_DATA;
+      }
+
+      d_bdry_face_uval.resizeArray(NUM_3D_FACES);
+      tbox::MathUtilities<double>::setArrayToSignalingNaN(d_bdry_face_uval);
+   }
+
+   /*
+    * Initialize object with data read from given input/restart databases.
+    */
+   bool is_from_restart = tbox::RestartManager::getManager()->isFromRestart();
+   if (is_from_restart) {
+      getFromRestart();
+   }
+   getFromInput(input_db, is_from_restart);
+
+   /*
+    * Set problem data to values read from input/restart.
+    */
+
+   if (d_data_problem == "PIECEWISE_CONSTANT_X") {
+      d_data_problem_int = PIECEWISE_CONSTANT_X;
+   } else if (d_data_problem == "PIECEWISE_CONSTANT_Y") {
+      d_data_problem_int = PIECEWISE_CONSTANT_Y;
+   } else if (d_data_problem == "PIECEWISE_CONSTANT_Z") {
+      d_data_problem_int = PIECEWISE_CONSTANT_Z;
+   } else if (d_data_problem == "SINE_CONSTANT_X") {
+      d_data_problem_int = SINE_CONSTANT_X;
+   } else if (d_data_problem == "SINE_CONSTANT_Y") {
+      d_data_problem_int = SINE_CONSTANT_Y;
+   } else if (d_data_problem == "SINE_CONSTANT_Z") {
+      d_data_problem_int = SINE_CONSTANT_Z;
+   } else if (d_data_problem == "SPHERE") {
+      d_data_problem_int = SPHERE;
+   } else {
+      TBOX_ERROR(
+         d_object_name << ": "
+         << "Unknown d_data_problem string = "
+         << d_data_problem
+         << " encountered in constructor" << endl);
+   }
+
+   /*
+    * Postprocess boundary data from input/restart values.  Note: scalar
+    * quantity in this problem cannot have reflective boundary conditions
+    * so we reset them to FLOW.
+    */
+   if (d_dim == tbox::Dimension(2)) {
+      for (int i = 0; i < NUM_2D_EDGES; i++) {
+         if (d_scalar_bdry_edge_conds[i] == REFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = FLOW_BC;
+         }
+      }
+
+      for (int i = 0; i < NUM_2D_NODES; i++) {
+         if (d_scalar_bdry_node_conds[i] == XREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = XFLOW_BC;
+         }
+         if (d_scalar_bdry_node_conds[i] == YREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = YFLOW_BC;
+         }
+
+         if (d_scalar_bdry_node_conds[i] != BOGUS_BDRY_DATA) {
+            d_node_bdry_edge[i] =
+               appu::CartesianBoundaryUtilities2::getEdgeLocationForNodeBdry(
+                  i, d_scalar_bdry_node_conds[i]);
+         }
+      }
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      for (int i = 0; i < NUM_3D_FACES; i++) {
+         if (d_scalar_bdry_face_conds[i] == REFLECT_BC) {
+            d_scalar_bdry_face_conds[i] = FLOW_BC;
+         }
+      }
+
+      for (int i = 0; i < NUM_3D_EDGES; i++) {
+         if (d_scalar_bdry_edge_conds[i] == XREFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = XFLOW_BC;
+         }
+         if (d_scalar_bdry_edge_conds[i] == YREFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = YFLOW_BC;
+         }
+         if (d_scalar_bdry_edge_conds[i] == ZREFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = ZFLOW_BC;
+         }
+
+         if (d_scalar_bdry_edge_conds[i] != BOGUS_BDRY_DATA) {
+            d_edge_bdry_face[i] =
+               appu::CartesianBoundaryUtilities3::getFaceLocationForEdgeBdry(
+                  i, d_scalar_bdry_edge_conds[i]);
+         }
+      }
+
+      for (int i = 0; i < NUM_3D_NODES; i++) {
+         if (d_scalar_bdry_node_conds[i] == XREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = XFLOW_BC;
+         }
+         if (d_scalar_bdry_node_conds[i] == YREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = YFLOW_BC;
+         }
+         if (d_scalar_bdry_node_conds[i] == ZREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = ZFLOW_BC;
+         }
+
+         if (d_scalar_bdry_node_conds[i] != BOGUS_BDRY_DATA) {
+            d_node_bdry_face[i] =
+               appu::CartesianBoundaryUtilities3::getFaceLocationForNodeBdry(
+                  i, d_scalar_bdry_node_conds[i]);
+         }
+      }
+
+   }
+
+   F77_FUNC(stufprobc, STUFPROBC) (PIECEWISE_CONSTANT_X, PIECEWISE_CONSTANT_Y,
+      PIECEWISE_CONSTANT_Z,
+      SINE_CONSTANT_X, SINE_CONSTANT_Y, SINE_CONSTANT_Z, SPHERE,
+      CELLG, FACEG, FLUXG);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Empty destructor for LinAdv class.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+LinAdv::~LinAdv() {
+}
+
+/*
+ *************************************************************************
+ *
+ * Register conserved variable (u) (i.e., solution state variable) and
+ * flux variable with hyperbolic integrator that manages storage for
+ * those quantities.  Also, register plot data with VisIt.
+ *
+ *************************************************************************
+ */
+
+void LinAdv::registerModelVariables(
+   algs::HyperbolicLevelIntegrator* integrator)
+{
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(integrator != (algs::HyperbolicLevelIntegrator *)NULL);
+   TBOX_ASSERT(CELLG == FACEG);
+#endif
+
+   integrator->registerVariable(d_uval, d_nghosts,
+      algs::HyperbolicLevelIntegrator::TIME_DEP,
+      d_grid_geometry,
+      "CONSERVATIVE_COARSEN",
+      "CONSERVATIVE_LINEAR_REFINE");
+
+   integrator->registerVariable(d_flux, d_fluxghosts,
+      algs::HyperbolicLevelIntegrator::FLUX,
+      d_grid_geometry,
+      "CONSERVATIVE_COARSEN",
+      "NO_REFINE");
+
+   hier::VariableDatabase* vardb = hier::VariableDatabase::getDatabase();
+
+#ifdef HAVE_HDF5
+   if (!(d_visit_writer.isNull())) {
+      d_visit_writer->
+      registerPlotQuantity("U",
+         "SCALAR",
+         vardb->mapVariableAndContextToIndex(
+            d_uval, integrator->getPlotContext()));
+   }
+#endif
+
+#ifdef HAVE_HDF5
+   if (d_visit_writer.isNull()) {
+      TBOX_WARNING(d_object_name << ": registerModelVariables()"
+                                 << "\nVisit data writer was not registered.\n"
+                                 << "Consequently, no plot data will"
+                                 << "\nbe written." << endl);
+   }
+#endif
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set up parameters for nonuniform load balancing, if used.             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void LinAdv::setupLoadBalancer(
+   algs::HyperbolicLevelIntegrator* integrator,
+   mesh::GriddingAlgorithm* gridding_algorithm)
+{
+
+   (void)integrator;
+   const hier::IntVector& zero_vec = hier::IntVector::getZero(d_dim);
+
+   hier::VariableDatabase* vardb = hier::VariableDatabase::getDatabase();
+
+   if (d_use_nonuniform_workload && gridding_algorithm) {
+      tbox::Pointer<mesh::TreeLoadBalancer> load_balancer =
+         gridding_algorithm->getLoadBalanceStrategy();
+      if (!load_balancer.isNull()) {
+         d_workload_variable = new pdat::CellVariable<double>(
+               d_dim,
+               "workload_variable",
+               1);
+         d_workload_data_id =
+            vardb->registerVariableAndContext(d_workload_variable,
+               vardb->getContext("WORKLOAD"),
+               zero_vec);
+         load_balancer->setWorkloadPatchDataIndex(d_workload_data_id);
+         vardb->registerPatchDataForRestart(d_workload_data_id);
+      } else {
+         TBOX_WARNING(
+            d_object_name << ": "
+            <<
+            "  Unknown load balancer used in gridding algorithm."
+            <<
+            "  Ignoring request for nonuniform load balancing." << endl);
+         d_use_nonuniform_workload = false;
+      }
+   } else {
+      d_use_nonuniform_workload = false;
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set initial data for solution variables on patch interior.            *
+ * This routine is called whenever a new patch is introduced to the      *
+ * AMR patch hierarchy.  Note that the routine does nothing unless       *
+ * we are at the initial time.  In all other cases, conservative         *
+ * interpolation from coarser levels and copies from patches at the      *
+ * same mesh resolution are sufficient to set data.                      *
+ *                                                                       *
+ *************************************************************************
+ */
+void LinAdv::initializeDataOnPatch(
+   hier::Patch& patch,
+   const double data_time,
+   const bool initial_time)
+{
+   (void)data_time;
+
+   if (initial_time) {
+
+      const tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+         patch.getPatchGeometry();
+      const double* dx = pgeom->getDx();
+      const double* xlo = pgeom->getXLower();
+      const double* xhi = pgeom->getXUpper();
+
+      tbox::Pointer<pdat::CellData<double> > uval =
+         patch.getPatchData(d_uval, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!uval.isNull());
+#endif
+      hier::IntVector ghost_cells(uval->getGhostCellWidth());
+
+      const hier::Index ifirst = patch.getBox().lower();
+      const hier::Index ilast = patch.getBox().upper();
+
+      if ((d_data_problem_int == SPHERE)) {
+
+         if (d_dim == tbox::Dimension(2)) {
+            F77_FUNC(initsphere2d, INITSPHERE2D) (d_data_problem_int, dx, xlo,
+               xhi,
+               ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ghost_cells(0),
+               ghost_cells(1),
+               uval->getPointer(),
+               d_uval_inside,
+               d_uval_outside,
+               &d_center[0], d_radius);
+         }
+         if (d_dim == tbox::Dimension(3)) {
+            F77_FUNC(initsphere3d, INITSPHERE3D) (d_data_problem_int, dx, xlo,
+               xhi,
+               ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ifirst(2), ilast(2),
+               ghost_cells(0),
+               ghost_cells(1),
+               ghost_cells(2),
+               uval->getPointer(),
+               d_uval_inside,
+               d_uval_outside,
+               &d_center[0], d_radius);
+         }
+
+      } else if (d_data_problem_int == SINE_CONSTANT_X ||
+                 d_data_problem_int == SINE_CONSTANT_Y ||
+                 d_data_problem_int == SINE_CONSTANT_Z) {
+
+         const double* domain_xlo = d_grid_geometry->getXLower();
+         const double* domain_xhi = d_grid_geometry->getXUpper();
+         std::vector<double> domain_length(d_dim.getValue());
+         for (int i = 0; i < d_dim.getValue(); i++) {
+            domain_length[i] = domain_xhi[i] - domain_xlo[i];
+         }
+
+         if (d_dim == tbox::Dimension(2)) {
+            F77_FUNC(linadvinitsine2d, LINADVINITSINE2D) (d_data_problem_int,
+               dx, xlo,
+               domain_xlo, &domain_length[0],
+               ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ghost_cells(0),
+               ghost_cells(1),
+               uval->getPointer(),
+               d_number_of_intervals,
+               d_front_position.getPointer(),
+               d_interval_uval.getPointer(),
+               d_amplitude,
+               &d_frequency[0]);
+         }
+         if (d_dim == tbox::Dimension(3)) {
+            F77_FUNC(linadvinitsine3d, LINADVINITSINE3D) (d_data_problem_int,
+               dx, xlo,
+               domain_xlo, &domain_length[0],
+               ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ifirst(2), ilast(2),
+               ghost_cells(0),
+               ghost_cells(1),
+               ghost_cells(2),
+               uval->getPointer(),
+               d_number_of_intervals,
+               d_front_position.getPointer(),
+               d_interval_uval.getPointer(),
+               d_amplitude,
+               &d_frequency[0]);
+         }
+      } else {
+
+         if (d_dim == tbox::Dimension(2)) {
+            F77_FUNC(linadvinit2d, LINADVINIT2D) (d_data_problem_int, dx, xlo,
+               xhi,
+               ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ghost_cells(0),
+               ghost_cells(1),
+               uval->getPointer(),
+               d_number_of_intervals,
+               d_front_position.getPointer(),
+               d_interval_uval.getPointer());
+         }
+         if (d_dim == tbox::Dimension(3)) {
+            F77_FUNC(linadvinit3d, LINADVINIT3D) (d_data_problem_int, dx, xlo,
+               xhi,
+               ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ifirst(2), ilast(2),
+               ghost_cells(0),
+               ghost_cells(1),
+               ghost_cells(2),
+               uval->getPointer(),
+               d_number_of_intervals,
+               d_front_position.getPointer(),
+               d_interval_uval.getPointer());
+         }
+      }
+
+   }
+
+   if (d_use_nonuniform_workload) {
+      if (!patch.checkAllocated(d_workload_data_id)) {
+         patch.allocatePatchData(d_workload_data_id);
+      }
+      tbox::Pointer<pdat::CellData<double> > workload_data =
+         patch.getPatchData(d_workload_data_id);
+      workload_data->fillAll(1.0);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute stable time increment for patch.  Return this value.          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double LinAdv::computeStableDtOnPatch(
+   hier::Patch& patch,
+   const bool initial_time,
+   const double dt_time)
+{
+   (void)initial_time;
+   (void)dt_time;
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+
+   tbox::Pointer<pdat::CellData<double> > uval =
+      patch.getPatchData(d_uval, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!uval.isNull());
+#endif
+   hier::IntVector ghost_cells(uval->getGhostCellWidth());
+
+   double stabdt;
+   if (d_dim == tbox::Dimension(2)) {
+      F77_FUNC(stabledt2d, STABLEDT2D) (dx,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ghost_cells(0),
+         ghost_cells(1),
+         &d_advection_velocity[0],
+         uval->getPointer(),
+         stabdt);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      F77_FUNC(stabledt3d, STABLEDT3D) (dx,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         ghost_cells(0),
+         ghost_cells(1),
+         ghost_cells(2),
+         &d_advection_velocity[0],
+         uval->getPointer(),
+         stabdt);
+   }
+
+   return stabdt;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute time integral of numerical fluxes for finite difference       *
+ * at each cell face on patch.  When d_dim == tbox::Dimension(3)), there are two options    *
+ * for the transverse flux correction.  Otherwise, there is only one.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void LinAdv::computeFluxesOnPatch(
+   hier::Patch& patch,
+   const double time,
+   const double dt)
+{
+   (void)time;
+
+   if (d_dim == tbox::Dimension(3)) {
+
+      if (d_corner_transport == "CORNER_TRANSPORT_2") {
+         compute3DFluxesWithCornerTransport2(patch, dt);
+      } else {
+         compute3DFluxesWithCornerTransport1(patch, dt);
+      }
+
+   }
+
+   if (d_dim < tbox::Dimension(3)) {
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(CELLG == FACEG);
+#endif
+
+      const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+         patch.getPatchGeometry();
+      const double* dx = patch_geom->getDx();
+
+      hier::Box pbox = patch.getBox();
+      const hier::Index ifirst = patch.getBox().lower();
+      const hier::Index ilast = patch.getBox().upper();
+
+      tbox::Pointer<pdat::CellData<double> > uval =
+         patch.getPatchData(d_uval, getDataContext());
+      tbox::Pointer<pdat::FaceData<double> > flux =
+         patch.getPatchData(d_flux, getDataContext());
+
+      /*
+       * Verify that the integrator providing the context correctly
+       * created it, and that the ghost cell width associated with the
+       * context matches the ghosts defined in this class...
+       */
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!uval.isNull());
+      TBOX_ASSERT(!flux.isNull());
+      TBOX_ASSERT(uval->getGhostCellWidth() == d_nghosts);
+      TBOX_ASSERT(flux->getGhostCellWidth() == d_fluxghosts);
+#endif
+
+      /*
+       * Allocate patch data for temporaries local to this routine.
+       */
+      pdat::FaceData<double> traced_left(pbox, 1, d_nghosts);
+      pdat::FaceData<double> traced_right(pbox, 1, d_nghosts);
+
+      if (d_dim == tbox::Dimension(2)) {
+         F77_FUNC(inittraceflux2d, INITTRACEFLUX2D) (ifirst(0), ilast(0),
+            ifirst(1), ilast(1),
+            uval->getPointer(),
+            traced_left.getPointer(0),
+            traced_left.getPointer(1),
+            traced_right.getPointer(0),
+            traced_right.getPointer(1),
+            flux->getPointer(0),
+            flux->getPointer(1)
+            );
+      }
+
+      if (d_godunov_order > 1) {
+
+         /*
+          * Prepare temporary data for characteristic tracing.
+          */
+         int Mcells = 0;
+         for (int k = 0; k < d_dim.getValue(); k++) {
+            Mcells = tbox::MathUtilities<int>::Max(Mcells, pbox.numberCells(k));
+         }
+
+// Face-centered temporary arrays
+         tbox::Array<double> ttedgslp(2 * FACEG + 1 + Mcells);
+         tbox::Array<double> ttraclft(2 * FACEG + 1 + Mcells);
+         tbox::Array<double> ttracrgt(2 * FACEG + 1 + Mcells);
+
+// Cell-centered temporary arrays
+         tbox::Array<double> ttcelslp(2 * CELLG + Mcells);
+
+/*
+ *  Apply characteristic tracing to compute initial estimate of
+ *  traces w^L and w^R at faces.
+ *  Inputs: w^L, w^R (traced_left/right)
+ *  Output: w^L, w^R
+ */
+         if (d_dim == tbox::Dimension(2)) {
+            F77_FUNC(chartracing2d0, CHARTRACING2D0) (dt,
+               ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               Mcells, dx[0], d_advection_velocity[0], d_godunov_order,
+               uval->getPointer(),
+               traced_left.getPointer(0),
+               traced_right.getPointer(0),
+               ttcelslp.getPointer(),
+               ttedgslp.getPointer(),
+               ttraclft.getPointer(),
+               ttracrgt.getPointer());
+
+            F77_FUNC(chartracing2d1, CHARTRACING2D1) (dt,
+               ifirst(0), ilast(0), ifirst(1), ilast(1),
+               Mcells, dx[1], d_advection_velocity[1], d_godunov_order,
+               uval->getPointer(),
+               traced_left.getPointer(1),
+               traced_right.getPointer(1),
+               ttcelslp.getPointer(),
+               ttedgslp.getPointer(),
+               ttraclft.getPointer(),
+               ttracrgt.getPointer());
+         }
+
+      }  // if (d_godunov_order > 1) ...
+
+      if (d_dim == tbox::Dimension(2)) {
+/*
+ *  Compute fluxes at faces using the face states computed so far.
+ *  Inputs: w^L, w^R (traced_left/right)
+ *  Output: F (flux)
+ */
+// fluxcalculation_(dt,*,1,dx, to get artificial viscosity
+// fluxcalculation_(dt,*,0,dx, to get NO artificial viscosity
+
+         F77_FUNC(fluxcalculation2d, FLUXCALCULATION2D) (dt, 1, 0, dx,
+            ifirst(0), ilast(0), ifirst(1), ilast(1),
+            &d_advection_velocity[0],
+            uval->getPointer(),
+            flux->getPointer(0),
+            flux->getPointer(1),
+            traced_left.getPointer(0),
+            traced_left.getPointer(1),
+            traced_right.getPointer(0),
+            traced_right.getPointer(1));
+
+/*
+ *  Re-compute traces at cell faces with transverse correction applied.
+ *  Inputs: F (flux)
+ *  Output: w^L, w^R (traced_left/right)
+ */
+         F77_FUNC(fluxcorrec, FLUXCORREC) (dt, ifirst(0), ilast(0), ifirst(1),
+            ilast(1),
+            dx, &d_advection_velocity[0],
+            uval->getPointer(),
+            flux->getPointer(0),
+            flux->getPointer(1),
+            traced_left.getPointer(0),
+            traced_left.getPointer(1),
+            traced_right.getPointer(0),
+            traced_right.getPointer(1));
+
+         boundaryReset(patch, traced_left, traced_right);
+
+/*
+ *  Re-compute fluxes with updated traces.
+ *  Inputs: w^L, w^R (traced_left/right)
+ *  Output: F (flux)
+ */
+         F77_FUNC(fluxcalculation2d, FLUXCALCULATION2D) (dt, 0, 0, dx,
+            ifirst(0), ilast(0), ifirst(1), ilast(1),
+            &d_advection_velocity[0],
+            uval->getPointer(),
+            flux->getPointer(0),
+            flux->getPointer(1),
+            traced_left.getPointer(0),
+            traced_left.getPointer(1),
+            traced_right.getPointer(0),
+            traced_right.getPointer(1));
+
+      }
+
+//     tbox::plog << "flux values: option1...." << endl;
+//     flux->print(pbox, tbox::plog);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute numerical approximations to flux terms using an extension     *
+ * to three dimensions of Collella's corner transport upwind approach.   *
+ * I.E. input value corner_transport = CORNER_TRANSPORT_1                *
+ *                                                                       *
+ *************************************************************************
+ */
+void LinAdv::compute3DFluxesWithCornerTransport1(
+   hier::Patch& patch,
+   const double dt)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(CELLG == FACEG);
+   TBOX_ASSERT(d_dim == tbox::Dimension(3));
+#endif
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+
+   hier::Box pbox = patch.getBox();
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+
+   tbox::Pointer<pdat::CellData<double> > uval =
+      patch.getPatchData(d_uval, getDataContext());
+   tbox::Pointer<pdat::FaceData<double> > flux =
+      patch.getPatchData(d_flux, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!uval.isNull());
+   TBOX_ASSERT(!flux.isNull());
+   TBOX_ASSERT(uval->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(flux->getGhostCellWidth() == d_fluxghosts);
+#endif
+
+   /*
+    * Allocate patch data for temporaries local to this routine.
+    */
+   pdat::FaceData<double> traced_left(pbox, 1, d_nghosts);
+   pdat::FaceData<double> traced_right(pbox, 1, d_nghosts);
+   pdat::FaceData<double> temp_flux(pbox, 1, d_fluxghosts);
+   pdat::FaceData<double> temp_traced_left(pbox, 1, d_nghosts);
+   pdat::FaceData<double> temp_traced_right(pbox, 1, d_nghosts);
+
+   F77_FUNC(inittraceflux3d, INITTRACEFLUX3D) (
+      ifirst(0), ilast(0),
+      ifirst(1), ilast(1),
+      ifirst(2), ilast(2),
+      uval->getPointer(),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2));
+
+   /*
+    * If Godunov method requires slopes with order greater than one, perform
+    * characteristic tracing to compute higher-order slopes.
+    */
+   if (d_godunov_order > 1) {
+
+      /*
+       * Prepare temporary data for characteristic tracing.
+       */
+      int Mcells = 0;
+      for (int k = 0; k < d_dim.getValue(); k++) {
+         Mcells = tbox::MathUtilities<int>::Max(Mcells, pbox.numberCells(k));
+      }
+
+      // Face-centered temporary arrays
+      tbox::Array<double> ttedgslp(2 * FACEG + 1 + Mcells);
+      tbox::Array<double> ttraclft(2 * FACEG + 1 + Mcells);
+      tbox::Array<double> ttracrgt(2 * FACEG + 1 + Mcells);
+
+      // Cell-centered temporary arrays
+      tbox::Array<double> ttcelslp(2 * CELLG + Mcells);
+
+      /*
+       *  Apply characteristic tracing to compute initial estimate of
+       *  traces w^L and w^R at faces.
+       *  Inputs: w^L, w^R (traced_left/right)
+       *  Output: w^L, w^R
+       */
+      F77_FUNC(chartracing3d0, CHARTRACING3D0) (dt,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         Mcells, dx[0], d_advection_velocity[0], d_godunov_order,
+         uval->getPointer(),
+         traced_left.getPointer(0),
+         traced_right.getPointer(0),
+         ttcelslp.getPointer(),
+         ttedgslp.getPointer(),
+         ttraclft.getPointer(),
+         ttracrgt.getPointer());
+
+      F77_FUNC(chartracing3d1, CHARTRACING3D1) (dt,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         Mcells, dx[1], d_advection_velocity[1], d_godunov_order,
+         uval->getPointer(),
+         traced_left.getPointer(1),
+         traced_right.getPointer(1),
+         ttcelslp.getPointer(),
+         ttedgslp.getPointer(),
+         ttraclft.getPointer(),
+         ttracrgt.getPointer());
+
+      F77_FUNC(chartracing3d2, CHARTRACING3D2) (dt,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         Mcells, dx[2], d_advection_velocity[2], d_godunov_order,
+         uval->getPointer(),
+         traced_left.getPointer(2),
+         traced_right.getPointer(2),
+         ttcelslp.getPointer(),
+         ttedgslp.getPointer(),
+         ttraclft.getPointer(),
+         ttracrgt.getPointer());
+   }
+
+   /*
+    *  Compute preliminary fluxes at faces using the face states computed
+    *  so far.
+    *  Inputs: w^L, w^R (traced_left/right)
+    *  Output: F (flux)
+    */
+
+//  fluxcalculation_(dt,*,*,1,dx,  to do artificial viscosity
+//  fluxcalculation_(dt,*,*,0,dx,  to do NO artificial viscosity
+   F77_FUNC(fluxcalculation3d, FLUXCALCULATION3d) (dt, 1, 0, 0, dx,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      &d_advection_velocity[0],
+      uval->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2));
+   /*
+    *  Re-compute face traces to include one set of correction terms with
+    *  transverse flux differences.  Store result in temporary vectors
+    *  (i.e. temp_traced_left/right).
+    *  Inputs: F (flux), w^L, w^R (traced_left/right)
+    *  Output: temp_traced_left/right
+    */
+   F77_FUNC(fluxcorrec2d, FLUXCORREC2D) (dt, ifirst(0), ilast(0), ifirst(1),
+      ilast(1), ifirst(2), ilast(2),
+      dx, &d_advection_velocity[0], 1,
+      uval->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2),
+      temp_traced_left.getPointer(0),
+      temp_traced_left.getPointer(1),
+      temp_traced_left.getPointer(2),
+      temp_traced_right.getPointer(0),
+      temp_traced_right.getPointer(1),
+      temp_traced_right.getPointer(2));
+
+   boundaryReset(patch, traced_left, traced_right);
+
+   /*
+    *  Compute fluxes with partially-corrected trace states.  Store result in
+    *  temporary flux vector.
+    *  Inputs: temp_traced_left/right
+    *  Output: temp_flux
+    */
+   F77_FUNC(fluxcalculation3d, FLUXCALCULATION3d) (dt, 0, 1, 0, dx,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      &d_advection_velocity[0],
+      uval->getPointer(),
+      temp_flux.getPointer(0),
+      temp_flux.getPointer(1),
+      temp_flux.getPointer(2),
+      temp_traced_left.getPointer(0),
+      temp_traced_left.getPointer(1),
+      temp_traced_left.getPointer(2),
+      temp_traced_right.getPointer(0),
+      temp_traced_right.getPointer(1),
+      temp_traced_right.getPointer(2));
+   /*
+    *  Compute face traces with other transverse correction flux
+    *  difference terms included.  Store result in temporary vectors
+    *  (i.e. temp_traced_left/right).
+    *  Inputs: F (flux), w^L, w^R (traced_left/right)
+    *  Output: temp_traced_left/right
+    */
+   F77_FUNC(fluxcorrec2d, FLUXCORREC2D) (dt, ifirst(0), ilast(0), ifirst(1),
+      ilast(1), ifirst(2), ilast(2),
+      dx, &d_advection_velocity[0], -1,
+      uval->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2),
+      temp_traced_left.getPointer(0),
+      temp_traced_left.getPointer(1),
+      temp_traced_left.getPointer(2),
+      temp_traced_right.getPointer(0),
+      temp_traced_right.getPointer(1),
+      temp_traced_right.getPointer(2));
+
+   boundaryReset(patch, traced_left, traced_right);
+
+   /*
+    *  Compute final predicted fluxes with both sets of transverse flux
+    *  differences included.  Store the result in regular flux vector.
+    *  NOTE:  the fact that we store  these fluxes in the regular (i.e.
+    *  not temporary) flux vector does NOT indicate this is the final result.
+    *  Rather, the flux vector is used as a convenient storage location.
+    *  Inputs: temp_traced_left/right
+    *  Output: flux
+    */
+   F77_FUNC(fluxcalculation3d, FLUXCALCULATION3d) (dt, 1, 0, 0, dx,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      &d_advection_velocity[0],
+      uval->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      temp_traced_left.getPointer(0),
+      temp_traced_left.getPointer(1),
+      temp_traced_left.getPointer(2),
+      temp_traced_right.getPointer(0),
+      temp_traced_right.getPointer(1),
+      temp_traced_right.getPointer(2));
+
+   /*
+    *  Compute the final trace state vectors at cell faces, using transverse
+    *  differences of final predicted fluxes.  Store result w^L
+    *  (traced_left) and w^R (traced_right) vectors.
+    *  Inputs: temp_flux, flux
+    *  Output: w^L, w^R (traced_left/right)
+    */
+   F77_FUNC(fluxcorrec3d, FLUXCORREC3D) (dt, ifirst(0), ilast(0), ifirst(1),
+      ilast(1), ifirst(2), ilast(2),
+      dx, &d_advection_velocity[0],
+      uval->getPointer(),
+      temp_flux.getPointer(0),
+      temp_flux.getPointer(1),
+      temp_flux.getPointer(2),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2));
+   /*
+    *  Final flux calculation using corrected trace states.
+    *  Inputs:  w^L, w^R (traced_left/right)
+    *  Output:  F (flux)
+    */
+   F77_FUNC(fluxcalculation3d, FLUXCALCULATION3d) (dt, 0, 0, 0, dx,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      &d_advection_velocity[0],
+      uval->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2));
+
+//     tbox::plog << "flux values: option1...." << endl;
+//     flux->print(pbox, tbox::plog);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute numerical approximations to flux terms using John             *
+ * Trangenstein's interpretation of the three-dimensional version of     *
+ * Collella's corner transport upwind approach.                          *
+ * I.E. input value corner_transport = CORNER_TRANSPORT_2                *
+ *                                                                       *
+ *************************************************************************
+ */
+void LinAdv::compute3DFluxesWithCornerTransport2(
+   hier::Patch& patch,
+   const double dt)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(CELLG == FACEG);
+   TBOX_ASSERT(d_dim == tbox::Dimension(3));
+#endif
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+
+   hier::Box pbox = patch.getBox();
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+
+   tbox::Pointer<pdat::CellData<double> > uval =
+      patch.getPatchData(d_uval, getDataContext());
+   tbox::Pointer<pdat::FaceData<double> > flux =
+      patch.getPatchData(d_flux, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!uval.isNull());
+   TBOX_ASSERT(!flux.isNull());
+   TBOX_ASSERT(uval->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(flux->getGhostCellWidth() == d_fluxghosts);
+#endif
+
+   /*
+    * Allocate patch data for temporaries local to this routine.
+    */
+   pdat::FaceData<double> traced_left(pbox, 1, d_nghosts);
+   pdat::FaceData<double> traced_right(pbox, 1, d_nghosts);
+   pdat::FaceData<double> temp_flux(pbox, 1, d_fluxghosts);
+   pdat::CellData<double> third_state(pbox, 1, d_nghosts);
+
+   /*
+    *  Initialize trace fluxes (w^R and w^L) with cell-centered values.
+    */
+   F77_FUNC(inittraceflux3d, INITTRACEFLUX3D) (
+      ifirst(0), ilast(0),
+      ifirst(1), ilast(1),
+      ifirst(2), ilast(2),
+      uval->getPointer(),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2));
+
+   /*
+    *  Compute preliminary fluxes at faces using the face states computed
+    *  so far.
+    *  Inputs: w^L, w^R (traced_left/right)
+    *  Output: F (flux)
+    */
+   F77_FUNC(fluxcalculation3d, FLUXCALCULATION3d) (dt, 1, 1, 0, dx,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      &d_advection_velocity[0],
+      uval->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2));
+
+   /*
+    * If Godunov method requires slopes with order greater than one, perform
+    * characteristic tracing to compute higher-order slopes.
+    */
+   if (d_godunov_order > 1) {
+
+      /*
+       * Prepare temporary data for characteristic tracing.
+       */
+      int Mcells = 0;
+      for (int k = 0; k < d_dim.getValue(); k++) {
+         Mcells = tbox::MathUtilities<int>::Max(Mcells, pbox.numberCells(k));
+      }
+
+      // Face-centered temporary arrays
+      tbox::Array<double> ttedgslp(2 * FACEG + 1 + Mcells);
+      tbox::Array<double> ttraclft(2 * FACEG + 1 + Mcells);
+      tbox::Array<double> ttracrgt(2 * FACEG + 1 + Mcells);
+
+      // Cell-centered temporary arrays
+      tbox::Array<double> ttcelslp(2 * CELLG + Mcells);
+
+      /*
+       *  Apply characteristic tracing to update traces w^L and
+       *  w^R at faces.
+       *  Inputs: w^L, w^R (traced_left/right)
+       *  Output: w^L, w^R
+       */
+      F77_FUNC(chartracing3d0, CHARTRACING3D0) (dt,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         Mcells, dx[0], d_advection_velocity[0], d_godunov_order,
+         uval->getPointer(),
+         traced_left.getPointer(0),
+         traced_right.getPointer(0),
+         ttcelslp.getPointer(),
+         ttedgslp.getPointer(),
+         ttraclft.getPointer(),
+         ttracrgt.getPointer());
+
+      F77_FUNC(chartracing3d1, CHARTRACING3D1) (dt,
+         ifirst(0), ilast(0), ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         Mcells, dx[1], d_advection_velocity[1], d_godunov_order,
+         uval->getPointer(),
+         traced_left.getPointer(1),
+         traced_right.getPointer(1),
+         ttcelslp.getPointer(),
+         ttedgslp.getPointer(),
+         ttraclft.getPointer(),
+         ttracrgt.getPointer());
+
+      F77_FUNC(chartracing3d2, CHARTRACING3D2) (dt,
+         ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+         Mcells, dx[2], d_advection_velocity[2], d_godunov_order,
+         uval->getPointer(),
+         traced_left.getPointer(2),
+         traced_right.getPointer(2),
+         ttcelslp.getPointer(),
+         ttedgslp.getPointer(),
+         ttraclft.getPointer(),
+         ttracrgt.getPointer());
+
+   } //  if (d_godunov_order > 1) ...
+
+   for (int idir = 0; idir < d_dim.getValue(); idir++) {
+
+      /*
+       *    Approximate traces at cell centers (in idir direction) - denoted
+       *    1/3 state.
+       *    Inputs:  F (flux)
+       *    Output:  third_state
+       */
+      F77_FUNC(onethirdstate3d, ONETHIRDSTATE3D) (dt, dx, idir,
+         ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+         &d_advection_velocity[0],
+         uval->getPointer(),
+         flux->getPointer(0),
+         flux->getPointer(1),
+         flux->getPointer(2),
+         third_state.getPointer());
+      /*
+       *    Compute fluxes using 1/3 state traces, in the two directions OTHER
+       *    than idir.
+       *    Inputs:  third_state
+       *    Output:  temp_flux (only two directions (i.e. those other than idir)
+       *             are modified)
+       */
+      F77_FUNC(fluxthird3d, FLUXTHIRD3D) (dt, dx, idir,
+         ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+         &d_advection_velocity[0],
+         uval->getPointer(),
+         third_state.getPointer(),
+         temp_flux.getPointer(0),
+         temp_flux.getPointer(1),
+         temp_flux.getPointer(2));
+
+      /*
+       *    Compute transverse corrections for the traces in the two directions
+       *    (OTHER than idir) using the differenced fluxes computed in those
+       *    directions.
+       *    Inputs:  temp_flux
+       *    Output:  w^L, w^R (traced_left/right)
+       */
+      F77_FUNC(fluxcorrecjt3d, FLUXCORRECJT3D) (dt, dx, idir,
+         ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+         &d_advection_velocity[0],
+         uval->getPointer(),
+         temp_flux.getPointer(0),
+         temp_flux.getPointer(1),
+         temp_flux.getPointer(2),
+         traced_left.getPointer(0),
+         traced_left.getPointer(1),
+         traced_left.getPointer(2),
+         traced_right.getPointer(0),
+         traced_right.getPointer(1),
+         traced_right.getPointer(2));
+
+   } // loop over directions...
+
+   boundaryReset(patch, traced_left, traced_right);
+
+   /*
+    *  Final flux calculation using corrected trace states.
+    *  Inputs:  w^L, w^R (traced_left/right)
+    *  Output:  F (flux)
+    */
+   F77_FUNC(fluxcalculation3d, FLUXCALCULATION3D) (dt, 0, 0, 0, dx,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      &d_advection_velocity[0],
+      uval->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2));
+
+//     tbox::plog << "flux values: option2...." << endl;
+//     flux->print(pbox, tbox::plog);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Update solution variables by performing a conservative                *
+ * difference with the fluxes calculated in computeFluxesOnPatch().      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void LinAdv::conservativeDifferenceOnPatch(
+   hier::Patch& patch,
+   const double time,
+   const double dt,
+   bool at_syncronization)
+{
+   (void)time;
+   (void)dt;
+   (void)at_syncronization;
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+
+   tbox::Pointer<pdat::CellData<double> > uval =
+      patch.getPatchData(d_uval, getDataContext());
+   tbox::Pointer<pdat::FaceData<double> > flux =
+      patch.getPatchData(d_flux, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!uval.isNull());
+   TBOX_ASSERT(!flux.isNull());
+   TBOX_ASSERT(uval->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(flux->getGhostCellWidth() == d_fluxghosts);
+#endif
+
+   if (d_dim == tbox::Dimension(2)) {
+      F77_FUNC(consdiff2d, CONSDIFF2D) (ifirst(0), ilast(0), ifirst(1), ilast(1),
+         dx,
+         flux->getPointer(0),
+         flux->getPointer(1),
+         &d_advection_velocity[0],
+         uval->getPointer());
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      F77_FUNC(consdiff3d, CONSDIFF3D) (ifirst(0), ilast(0), ifirst(1), ilast(1),
+         ifirst(2), ilast(2), dx,
+         flux->getPointer(0),
+         flux->getPointer(1),
+         flux->getPointer(2),
+         &d_advection_velocity[0],
+         uval->getPointer());
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Reset physical boundary values for special cases, such as those       *
+ * involving symmetric (i.e., reflective) boundary conditions and        *
+ * when the "STEP" problem is run.                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+void LinAdv::boundaryReset(
+   hier::Patch& patch,
+   pdat::FaceData<double>& traced_left,
+   pdat::FaceData<double>& traced_right) const
+{
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+   int i, idir;
+   bool bdry_cell = true;
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   hier::BoxArray domain_boxes(d_dim);
+   d_grid_geometry->computePhysicalDomain(domain_boxes, patch_geom->getRatio());
+   int num_domain_boxes = domain_boxes.getNumberOfBoxes();
+
+   pdat::CellIndex icell(ifirst);
+   hier::BoxArray bdrybox(d_dim, 2 * d_dim.getValue());
+   hier::Index ibfirst = ifirst;
+   hier::Index iblast = ilast;
+   int bdry_case = 0;
+   int bside;
+
+   for (idir = 0; idir < d_dim.getValue(); idir++) {
+      ibfirst(idir) = ifirst(idir) - 1;
+      iblast(idir) = ifirst(idir) - 1;
+      bdrybox[2 * idir] = hier::Box(ibfirst, iblast);
+
+      ibfirst(idir) = ilast(idir) + 1;
+      iblast(idir) = ilast(idir) + 1;
+      bdrybox[2 * idir + 1] = hier::Box(ibfirst, iblast);
+   }
+
+   for (idir = 0; idir < d_dim.getValue(); idir++) {
+      bside = 2 * idir;
+      if (d_dim == tbox::Dimension(2)) {
+         bdry_case = d_scalar_bdry_edge_conds[bside];
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         bdry_case = d_scalar_bdry_face_conds[bside];
+      }
+      if (bdry_case == REFLECT_BC) {
+         for (pdat::CellIterator ic(bdrybox[bside]); ic; ic++) {
+            for (i = 0; i < num_domain_boxes; i++) {
+               if (domain_boxes[i].contains(ic()))
+                  bdry_cell = false;
+            }
+            if (bdry_cell) {
+               pdat::FaceIndex sidein = pdat::FaceIndex(ic(), idir, 1);
+               (traced_left)(sidein, 0) = (traced_right)(sidein, 0);
+            }
+         }
+      }
+
+      int bnode = 2 * idir + 1;
+      if (d_dim == tbox::Dimension(2)) {
+         bdry_case = d_scalar_bdry_edge_conds[bnode];
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         bdry_case = d_scalar_bdry_face_conds[bnode];
+      }
+      if (bdry_case == REFLECT_BC) {
+         for (pdat::CellIterator ic(bdrybox[bside]); ic; ic++) {
+            for (i = 0; i < num_domain_boxes; i++) {
+               if (domain_boxes[i].contains(ic()))
+                  bdry_cell = false;
+            }
+            if (bdry_cell) {
+               pdat::FaceIndex sidein = pdat::FaceIndex(ic(), idir, 0);
+               (traced_right)(sidein, 0) = (traced_left)(sidein, 0);
+            }
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set the data in ghost cells corresponding to physical boundary        *
+ * conditions.  Note that boundary geometry configuration information    *
+ * (i.e., faces, edges, and nodes) is obtained from the patch geometry   *
+ * object owned by the patch.                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void LinAdv::setPhysicalBoundaryConditions(
+   hier::Patch& patch,
+   const double fill_time,
+   const hier::IntVector& ghost_width_to_fill)
+{
+   (void)fill_time;
+
+   tbox::Pointer<pdat::CellData<double> > uval =
+      patch.getPatchData(d_uval, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!uval.isNull());
+#endif
+   hier::IntVector ghost_cells(uval->getGhostCellWidth());
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(uval->getGhostCellWidth() == d_nghosts);
+#endif
+
+   if (d_dim == tbox::Dimension(2)) {
+
+      /*
+       * Set boundary conditions for cells corresponding to patch edges.
+       */
+      appu::CartesianBoundaryUtilities2::
+      fillEdgeBoundaryData("uval", uval,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_edge_conds,
+         d_bdry_edge_uval);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+#if CHECK_BDRY_DATA
+      checkBoundaryData(EDGE2D_BDRY_TYPE, patch, ghost_width_to_fill,
+         d_scalar_bdry_edge_conds);
+#endif
+#endif
+
+      /*
+       *  Set boundary conditions for cells corresponding to patch nodes.
+       */
+
+      appu::CartesianBoundaryUtilities2::
+      fillNodeBoundaryData("uval", uval,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_node_conds,
+         d_bdry_edge_uval);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+#if CHECK_BDRY_DATA
+      checkBoundaryData(NODE2D_BDRY_TYPE, patch, ghost_width_to_fill,
+         d_scalar_bdry_node_conds);
+#endif
+#endif
+
+   } // d_dim == tbox::Dimension(2))
+
+   if (d_dim == tbox::Dimension(3)) {
+
+      /*
+       *  Set boundary conditions for cells corresponding to patch faces.
+       */
+
+      appu::CartesianBoundaryUtilities3::
+      fillFaceBoundaryData("uval", uval,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_face_conds,
+         d_bdry_face_uval);
+#ifdef DEBUG_CHECK_ASSERTIONS
+#if CHECK_BDRY_DATA
+      checkBoundaryData(FACE3D_BDRY_TYPE, patch, ghost_width_to_fill,
+         d_scalar_bdry_face_conds);
+#endif
+#endif
+
+      /*
+       *  Set boundary conditions for cells corresponding to patch edges.
+       */
+
+      appu::CartesianBoundaryUtilities3::
+      fillEdgeBoundaryData("uval", uval,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_edge_conds,
+         d_bdry_face_uval);
+#ifdef DEBUG_CHECK_ASSERTIONS
+#if CHECK_BDRY_DATA
+      checkBoundaryData(EDGE3D_BDRY_TYPE, patch, ghost_width_to_fill,
+         d_scalar_bdry_edge_conds);
+#endif
+#endif
+
+      /*
+       *  Set boundary conditions for cells corresponding to patch nodes.
+       */
+
+      appu::CartesianBoundaryUtilities3::
+      fillNodeBoundaryData("uval", uval,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_node_conds,
+         d_bdry_face_uval);
+#ifdef DEBUG_CHECK_ASSERTIONS
+#if CHECK_BDRY_DATA
+      checkBoundaryData(NODE3D_BDRY_TYPE, patch, ghost_width_to_fill,
+         d_scalar_bdry_node_conds);
+#endif
+#endif
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Tag cells for refinement using Richardson extrapolation.  Criteria    *
+ * defined in input.                                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+void LinAdv::tagRichardsonExtrapolationCells(
+   hier::Patch& patch,
+   const int error_level_number,
+   const tbox::Pointer<hier::VariableContext> coarsened_fine,
+   const tbox::Pointer<hier::VariableContext> advanced_coarse,
+   const double regrid_time,
+   const double deltat,
+   const int error_coarsen_ratio,
+   const bool initial_error,
+   const int tag_index,
+   const bool uses_gradient_detector_too)
+{
+   (void)initial_error;
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   hier::Box pbox = patch.getBox();
+
+   tbox::Pointer<pdat::CellData<int> > tags = patch.getPatchData(tag_index);
+
+   /*
+    * Possible tagging criteria includes
+    *    UVAL_RICHARDSON
+    * The criteria is specified over a time interval.
+    *
+    * Loop over criteria provided and check to make sure we are in the
+    * specified time interval.  If so, apply appropriate tagging for
+    * the level.
+    */
+   for (int ncrit = 0; ncrit < d_refinement_criteria.getSize(); ncrit++) {
+
+      string ref = d_refinement_criteria[ncrit];
+      tbox::Pointer<pdat::CellData<double> > coarsened_fine_var;
+      tbox::Pointer<pdat::CellData<double> > advanced_coarse_var;
+      int size;
+      double tol;
+      bool time_allowed;
+
+      if (ref == "UVAL_RICHARDSON") {
+         coarsened_fine_var = patch.getPatchData(d_uval, coarsened_fine);
+         advanced_coarse_var = patch.getPatchData(d_uval, advanced_coarse);
+         size = d_rich_tol.getSize();
+         tol = ((error_level_number < size)
+                ? d_rich_tol[error_level_number]
+                : d_rich_tol[size - 1]);
+         size = d_rich_time_min.getSize();
+         double time_min = ((error_level_number < size)
+                            ? d_rich_time_min[error_level_number]
+                            : d_rich_time_min[size - 1]);
+         size = d_rich_time_max.getSize();
+         double time_max = ((error_level_number < size)
+                            ? d_rich_time_max[error_level_number]
+                            : d_rich_time_max[size - 1]);
+         time_allowed = (time_min <= regrid_time) && (time_max > regrid_time);
+
+         if (time_allowed) {
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!coarsened_fine_var.isNull());
+            TBOX_ASSERT(!advanced_coarse_var.isNull());
+#endif
+            /*
+             * We tag wherever the global error > specified tolerance
+             * (i.e. d_rich_tol).  The estimated global error is the
+             * local truncation error * the approximate number of steps
+             * used in the simulation.  Approximate the number of steps as:
+             *
+             *       steps = L / (s*deltat)
+             * where
+             *       L = length of problem domain
+             *       s = wave speed
+             *       delta t = timestep on current level
+             *
+             */
+            const double* xdomainlo = d_grid_geometry->getXLower();
+            const double* xdomainhi = d_grid_geometry->getXUpper();
+            double max_length = 0.;
+            double max_wave_speed = 0.;
+            for (int idir = 0; idir < d_dim.getValue(); idir++) {
+               double length = xdomainhi[idir] - xdomainlo[idir];
+               if (length > max_length) max_length = length;
+
+               double wave_speed = d_advection_velocity[idir];
+               if (wave_speed > max_wave_speed) max_wave_speed = wave_speed;
+            }
+
+            double steps = max_length / (max_wave_speed * deltat);
+
+            /*
+             * Tag cells where |w_c - w_f| * (r^n -1) * steps
+             *
+             * where
+             *       w_c = soln on coarse level (pressure_crse)
+             *       w_f = soln on fine level (pressure_fine)
+             *       r   = error coarsen ratio
+             *       n   = spatial order of scheme (1st or 2nd depending
+             *             on whether Godunov order is 1st or 2nd/4th)
+             */
+            int order = 1;
+            if (d_godunov_order > 1) order = 2;
+            double r = error_coarsen_ratio;
+            double rnminus1 = pow(r, order) - 1;
+
+            double diff = 0.;
+            double error = 0.;
+
+            for (pdat::CellIterator ic(pbox); ic; ic++) {
+
+               /*
+                * Compute error norm
+                */
+               diff = (*advanced_coarse_var)(ic(), 0)
+                  - (*coarsened_fine_var)(ic(), 0);
+               error =
+                  tbox::MathUtilities<double>::Abs(diff) * rnminus1 * steps;
+
+               /*
+                * Tag cell if error > prescribed threshold. Since we are
+                * operating on the actual tag values (not temporary ones)
+                * distinguish here tags that were previously set before
+                * coming into this routine and those that are set here.
+                *     RICHARDSON_ALREADY_TAGGED - tagged before coming
+                *                                 into this method.
+                *     RICHARDSON_NEWLY_TAGGED - newly tagged in this method
+                *
+                */
+               if (error > tol) {
+                  if ((*tags)(ic(), 0)) {
+                     (*tags)(ic(), 0) = RICHARDSON_ALREADY_TAGGED;
+                  } else {
+                     (*tags)(ic(), 0) = RICHARDSON_NEWLY_TAGGED;
+                  }
+               }
+
+            }
+
+         } // time_allowed
+
+      } // if UVAL_RICHARDSON
+
+   } // loop over refinement criteria
+
+   /*
+    * If we are NOT performing gradient detector (i.e. only
+    * doing Richardson extrapolation) set tags marked in this method
+    * to TRUE and all others false.  Otherwise, leave tags set to the
+    * RICHARDSON_ALREADY_TAGGED and RICHARDSON_NEWLY_TAGGED as we may
+    * use this information in the gradient detector.
+    */
+   if (!uses_gradient_detector_too) {
+      for (pdat::CellIterator ic(pbox); ic; ic++) {
+         if ((*tags)(ic(), 0) == RICHARDSON_ALREADY_TAGGED ||
+             (*tags)(ic(), 0) == RICHARDSON_NEWLY_TAGGED) {
+            (*tags)(ic(), 0) = TRUE;
+         } else {
+            (*tags)(ic(), 0) = FALSE;
+         }
+      }
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Tag cells for refinement using gradient detector.  Tagging criteria   *
+ * defined in input.                                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void LinAdv::tagGradientDetectorCells(
+   hier::Patch& patch,
+   const double regrid_time,
+   const bool initial_error,
+   const int tag_indx,
+   const bool uses_richardson_extrapolation_too)
+{
+   (void)initial_error;
+
+   const int error_level_number = patch.getPatchLevelNumber();
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+
+   tbox::Pointer<pdat::CellData<int> > tags = patch.getPatchData(tag_indx);
+
+   hier::Box pbox(patch.getBox());
+   hier::BoxArray domain_boxes(d_dim);
+   d_grid_geometry->computePhysicalDomain(domain_boxes, patch_geom->getRatio());
+   /*
+    * Construct domain bounding box
+    */
+   hier::Box domain(d_dim);
+   for (int i = 0; i < domain_boxes.getNumberOfBoxes(); i++) {
+      domain += domain_boxes[i];
+   }
+
+   const hier::Index domfirst(domain.lower());
+   const hier::Index domlast(domain.upper());
+   const hier::Index ifirst(patch.getBox().lower());
+   const hier::Index ilast(patch.getBox().upper());
+
+   hier::Index ict(d_dim);
+
+   int not_refine_tag_val = FALSE;
+   int refine_tag_val = TRUE;
+
+   /*
+    * Create a set of temporary tags and set to untagged value.
+    */
+   tbox::Pointer<pdat::CellData<int> > temp_tags(
+      new pdat::CellData<int>(pbox, 1, d_nghosts));
+   temp_tags->fillAll(not_refine_tag_val);
+
+   /*
+    * Possible tagging criteria includes
+    *    UVAL_DEVIATION, UVAL_GRADIENT, UVAL_SHOCK
+    * The criteria is specified over a time interval.
+    *
+    * Loop over criteria provided and check to make sure we are in the
+    * specified time interval.  If so, apply appropriate tagging for
+    * the level.
+    */
+   for (int ncrit = 0; ncrit < d_refinement_criteria.getSize(); ncrit++) {
+
+      string ref = d_refinement_criteria[ncrit];
+      tbox::Pointer<pdat::CellData<double> > var =
+         patch.getPatchData(d_uval, getDataContext());
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!var.isNull());
+#endif
+      hier::IntVector vghost(var->getGhostCellWidth());
+      hier::IntVector tagghost(tags->getGhostCellWidth());
+
+      int size = 0;
+      double tol = 0.;
+      double onset = 0.;
+      bool time_allowed = false;
+
+      if (ref == "UVAL_DEVIATION") {
+         size = d_dev_tol.getSize();
+         tol = ((error_level_number < size)
+                ? d_dev_tol[error_level_number]
+                : d_dev_tol[size - 1]);
+         size = d_dev.getSize();
+         double dev = ((error_level_number < size)
+                       ? d_dev[error_level_number]
+                       : d_dev[size - 1]);
+         size = d_dev_time_min.getSize();
+         double time_min = ((error_level_number < size)
+                            ? d_dev_time_min[error_level_number]
+                            : d_dev_time_min[size - 1]);
+         size = d_dev_time_max.getSize();
+         double time_max = ((error_level_number < size)
+                            ? d_dev_time_max[error_level_number]
+                            : d_dev_time_max[size - 1]);
+         time_allowed = (time_min <= regrid_time) && (time_max > regrid_time);
+
+         if (time_allowed) {
+
+            /*
+             * Check for tags that have already been set in a previous
+             * step.  Do NOT consider values tagged with value
+             * RICHARDSON_NEWLY_TAGGED since these were set most recently
+             * by Richardson extrapolation.
+             */
+            for (pdat::CellIterator ic(pbox); ic; ic++) {
+               double locden = tol;
+               int tag_val = (*tags)(ic(), 0);
+               if (tag_val) {
+                  if (tag_val != RICHARDSON_NEWLY_TAGGED) {
+                     locden *= 0.75;
+                  }
+               }
+               if (tbox::MathUtilities<double>::Abs((*var)(ic()) - dev) >
+                   locden) {
+                  (*temp_tags)(ic(), 0) = refine_tag_val;
+               }
+            }
+         }
+      }
+
+      if (ref == "UVAL_GRADIENT") {
+         size = d_grad_tol.getSize();
+         tol = ((error_level_number < size)
+                ? d_grad_tol[error_level_number]
+                : d_grad_tol[size - 1]);
+         size = d_grad_time_min.getSize();
+         double time_min = ((error_level_number < size)
+                            ? d_grad_time_min[error_level_number]
+                            : d_grad_time_min[size - 1]);
+         size = d_grad_time_max.getSize();
+         double time_max = ((error_level_number < size)
+                            ? d_grad_time_max[error_level_number]
+                            : d_grad_time_max[size - 1]);
+         time_allowed = (time_min <= regrid_time) && (time_max > regrid_time);
+
+         if (time_allowed) {
+
+            if (d_dim == tbox::Dimension(2)) {
+               F77_FUNC(detectgrad2d, DETECTGRAD2D) (
+                  ifirst(0), ilast(0), ifirst(1), ilast(1),
+                  vghost(0), tagghost(0), d_nghosts(0),
+                  vghost(1), tagghost(1), d_nghosts(1),
+                  dx,
+                  tol,
+                  refine_tag_val, not_refine_tag_val,
+                  var->getPointer(),
+                  tags->getPointer(), temp_tags->getPointer());
+            }
+            if (d_dim == tbox::Dimension(3)) {
+               F77_FUNC(detectgrad3d, DETECTGRAD3D) (
+                  ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+                  vghost(0), tagghost(0), d_nghosts(0),
+                  vghost(1), tagghost(1), d_nghosts(1),
+                  vghost(2), tagghost(2), d_nghosts(2),
+                  dx,
+                  tol,
+                  refine_tag_val, not_refine_tag_val,
+                  var->getPointer(),
+                  tags->getPointer(), temp_tags->getPointer());
+            }
+         }
+
+      }
+
+      if (ref == "UVAL_SHOCK") {
+         size = d_shock_tol.getSize();
+         tol = ((error_level_number < size)
+                ? d_shock_tol[error_level_number]
+                : d_shock_tol[size - 1]);
+         size = d_shock_onset.getSize();
+         onset = ((error_level_number < size)
+                  ? d_shock_onset[error_level_number]
+                  : d_shock_onset[size - 1]);
+         size = d_shock_time_min.getSize();
+         double time_min = ((error_level_number < size)
+                            ? d_shock_time_min[error_level_number]
+                            : d_shock_time_min[size - 1]);
+         size = d_shock_time_max.getSize();
+         double time_max = ((error_level_number < size)
+                            ? d_shock_time_max[error_level_number]
+                            : d_shock_time_max[size - 1]);
+         time_allowed = (time_min <= regrid_time) && (time_max > regrid_time);
+
+         if (time_allowed) {
+
+            if (d_dim == tbox::Dimension(2)) {
+               F77_FUNC(detectshock2d, DETECTSHOCK2D) (
+                  ifirst(0), ilast(0), ifirst(1), ilast(1),
+                  vghost(0), tagghost(0), d_nghosts(0),
+                  vghost(1), tagghost(1), d_nghosts(1),
+                  dx,
+                  tol,
+                  onset,
+                  refine_tag_val, not_refine_tag_val,
+                  var->getPointer(),
+                  tags->getPointer(), temp_tags->getPointer());
+            }
+            if (d_dim == tbox::Dimension(3)) {
+               F77_FUNC(detectshock3d, DETECTSHOCK3D) (
+                  ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+                  vghost(0), tagghost(0), d_nghosts(0),
+                  vghost(1), tagghost(1), d_nghosts(1),
+                  vghost(2), tagghost(2), d_nghosts(2),
+                  dx,
+                  tol,
+                  onset,
+                  refine_tag_val, not_refine_tag_val,
+                  var->getPointer(),
+                  tags->getPointer(), temp_tags->getPointer());
+            }
+         }
+
+      }
+
+   }  // loop over criteria
+
+   /*
+    * Adjust temp_tags from those tags set in Richardson extrapolation.
+    * Here, we just reset any tags that were set in Richardson extrapolation
+    * to be the designated "refine_tag_val".
+    */
+   if (uses_richardson_extrapolation_too) {
+      for (pdat::CellIterator ic(pbox); ic; ic++) {
+         if ((*tags)(ic(), 0) == RICHARDSON_ALREADY_TAGGED ||
+             (*tags)(ic(), 0) == RICHARDSON_NEWLY_TAGGED) {
+            (*temp_tags)(ic(), 0) = refine_tag_val;
+         }
+      }
+   }
+
+   /*
+    * Update tags.
+    */
+   for (pdat::CellIterator ic(pbox); ic; ic++) {
+      (*tags)(ic(), 0) = (*temp_tags)(ic(), 0);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register VisIt data writer to write data to plot files that may       *
+ * be postprocessed by the VisIt tool.                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+#ifdef HAVE_HDF5
+void LinAdv::registerVisItDataWriter(
+   tbox::Pointer<appu::VisItDataWriter> viz_writer)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(viz_writer.isNull()));
+#endif
+   d_visit_writer = viz_writer;
+}
+#endif
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Write LinAdv object state to specified stream.                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void LinAdv::printClassData(
+   ostream& os) const
+{
+   int j, k;
+
+   os << "\nLinAdv::printClassData..." << endl;
+   os << "LinAdv: this = " << (LinAdv *)this << endl;
+   os << "d_object_name = " << d_object_name << endl;
+   os << "d_grid_geometry = "
+      << (geom::CartesianGridGeometry *)d_grid_geometry << endl;
+
+   os << "Parameters for numerical method ..." << endl;
+   os << "   d_advection_velocity = ";
+   for (j = 0; j < d_dim.getValue(); j++) os << d_advection_velocity[j] << " ";
+   os << endl;
+   os << "   d_godunov_order = " << d_godunov_order << endl;
+   os << "   d_corner_transport = " << d_corner_transport << endl;
+   os << "   d_nghosts = " << d_nghosts << endl;
+   os << "   d_fluxghosts = " << d_fluxghosts << endl;
+
+   os << "Problem description and initial data..." << endl;
+   os << "   d_data_problem = " << d_data_problem << endl;
+   os << "   d_data_problem_int = " << d_data_problem << endl;
+
+   os << "       d_radius = " << d_radius << endl;
+   os << "       d_center = ";
+   for (j = 0; j < d_dim.getValue(); j++) os << d_center[j] << " ";
+   os << endl;
+   os << "       d_uval_inside = " << d_uval_inside << endl;
+   os << "       d_uval_outside = " << d_uval_outside << endl;
+
+   os << "       d_number_of_intervals = " << d_number_of_intervals << endl;
+   os << "       d_front_position = ";
+   for (k = 0; k < d_number_of_intervals - 1; k++) {
+      os << d_front_position[k] << "  ";
+   }
+   os << endl;
+   os << "       d_interval_uval = " << endl;
+   for (k = 0; k < d_number_of_intervals; k++) {
+      os << "            " << d_interval_uval[k] << endl;
+   }
+   os << "   Boundary condition data " << endl;
+
+   if (d_dim == tbox::Dimension(2)) {
+      for (j = 0; j < d_scalar_bdry_edge_conds.getSize(); j++) {
+         os << "       d_scalar_bdry_edge_conds[" << j << "] = "
+         << d_scalar_bdry_edge_conds[j] << endl;
+         if (d_scalar_bdry_edge_conds[j] == DIRICHLET_BC) {
+            os << "         d_bdry_edge_uval[" << j << "] = "
+            << d_bdry_edge_uval[j] << endl;
+         }
+      }
+      os << endl;
+      for (j = 0; j < d_scalar_bdry_node_conds.getSize(); j++) {
+         os << "       d_scalar_bdry_node_conds[" << j << "] = "
+         << d_scalar_bdry_node_conds[j] << endl;
+         os << "       d_node_bdry_edge[" << j << "] = "
+         << d_node_bdry_edge[j] << endl;
+      }
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      for (j = 0; j < d_scalar_bdry_face_conds.getSize(); j++) {
+         os << "       d_scalar_bdry_face_conds[" << j << "] = "
+         << d_scalar_bdry_face_conds[j] << endl;
+         if (d_scalar_bdry_face_conds[j] == DIRICHLET_BC) {
+            os << "         d_bdry_face_uval[" << j << "] = "
+            << d_bdry_face_uval[j] << endl;
+         }
+      }
+      os << endl;
+      for (j = 0; j < d_scalar_bdry_edge_conds.getSize(); j++) {
+         os << "       d_scalar_bdry_edge_conds[" << j << "] = "
+         << d_scalar_bdry_edge_conds[j] << endl;
+         os << "       d_edge_bdry_face[" << j << "] = "
+         << d_edge_bdry_face[j] << endl;
+      }
+      os << endl;
+      for (j = 0; j < d_scalar_bdry_node_conds.getSize(); j++) {
+         os << "       d_scalar_bdry_node_conds[" << j << "] = "
+         << d_scalar_bdry_node_conds[j] << endl;
+         os << "       d_node_bdry_face[" << j << "] = "
+         << d_node_bdry_face[j] << endl;
+      }
+   }
+
+   os << "   Refinement criteria parameters " << endl;
+
+   for (j = 0; j < d_refinement_criteria.getSize(); j++) {
+      os << "       d_refinement_criteria[" << j << "] = "
+      << d_refinement_criteria[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_dev_tol.getSize(); j++) {
+      os << "       d_dev_tol[" << j << "] = "
+      << d_dev_tol[j] << endl;
+   }
+   for (j = 0; j < d_dev.getSize(); j++) {
+      os << "       d_dev[" << j << "] = "
+      << d_dev[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_dev_time_max.getSize(); j++) {
+      os << "       d_dev_time_max[" << j << "] = "
+      << d_dev_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_dev_time_min.getSize(); j++) {
+      os << "       d_dev_time_min[" << j << "] = "
+      << d_dev_time_min[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_grad_tol.getSize(); j++) {
+      os << "       d_grad_tol[" << j << "] = "
+      << d_grad_tol[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_grad_time_max.getSize(); j++) {
+      os << "       d_grad_time_max[" << j << "] = "
+      << d_grad_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_grad_time_min.getSize(); j++) {
+      os << "       d_grad_time_min[" << j << "] = "
+      << d_grad_time_min[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_shock_onset.getSize(); j++) {
+      os << "       d_shock_onset[" << j << "] = "
+      << d_shock_onset[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_shock_tol.getSize(); j++) {
+      os << "       d_shock_tol[" << j << "] = "
+      << d_shock_tol[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_shock_time_max.getSize(); j++) {
+      os << "       d_shock_time_max[" << j << "] = "
+      << d_shock_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_shock_time_min.getSize(); j++) {
+      os << "       d_shock_time_min[" << j << "] = "
+      << d_shock_time_min[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_rich_tol.getSize(); j++) {
+      os << "       d_rich_tol[" << j << "] = "
+      << d_rich_tol[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_rich_time_max.getSize(); j++) {
+      os << "       d_rich_time_max[" << j << "] = "
+      << d_rich_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_rich_time_min.getSize(); j++) {
+      os << "       d_rich_time_min[" << j << "] = "
+      << d_rich_time_min[j] << endl;
+   }
+   os << endl;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Read data members from input.  All values set from restart can be	*
+ * overridden by values in the input database.
+ *                                                                       *
+ *************************************************************************
+ */
+void LinAdv::getFromInput(
+   tbox::Pointer<tbox::Database> db,
+   bool is_from_restart)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   /*
+    * Note: if we are restarting, then we only allow nonuniform
+    * workload to be used if nonuniform workload was used originally.
+    */
+   if (!is_from_restart) {
+      d_use_nonuniform_workload =
+         db->getBoolWithDefault("use_nonuniform_workload",
+            d_use_nonuniform_workload);
+   } else {
+      if (d_use_nonuniform_workload) {
+         d_use_nonuniform_workload =
+            db->getBool("use_nonuniform_workload");
+      }
+   }
+
+   if (db->keyExists("advection_velocity")) {
+      db->getDoubleArray("advection_velocity",
+         &d_advection_velocity[0], d_dim.getValue());
+   } else {
+      TBOX_ERROR(
+         d_object_name << ":  "
+         <<
+         "Key data `advection_velocity' not found in input.");
+   }
+
+   if (db->keyExists("godunov_order")) {
+      d_godunov_order = db->getInteger("godunov_order");
+      if ((d_godunov_order != 1) &&
+          (d_godunov_order != 2) &&
+          (d_godunov_order != 4)) {
+         TBOX_ERROR(
+            d_object_name << ": "
+            <<
+            "`godunov_order' in input must be 1, 2, or 4." << endl);
+      }
+   } else {
+      d_godunov_order = db->getIntegerWithDefault("d_godunov_order",
+            d_godunov_order);
+   }
+
+   if (db->keyExists("corner_transport")) {
+      d_corner_transport = db->getString("corner_transport");
+      if ((d_corner_transport != "CORNER_TRANSPORT_1") &&
+          (d_corner_transport != "CORNER_TRANSPORT_2")) {
+         TBOX_ERROR(
+            d_object_name << ": "
+            <<
+            "`corner_transport' in input must be either string"
+            <<
+            " 'CORNER_TRANSPORT_1' or 'CORNER_TRANSPORT_2'." << endl);
+      }
+   } else {
+      d_corner_transport = db->getStringWithDefault("corner_transport",
+            d_corner_transport);
+   }
+
+   if (db->keyExists("Refinement_data")) {
+      tbox::Pointer<tbox::Database> refine_db = db->getDatabase(
+            "Refinement_data");
+      tbox::Array<string> refinement_keys = refine_db->getAllKeys();
+      int num_keys = refinement_keys.getSize();
+
+      if (refine_db->keyExists("refine_criteria")) {
+         d_refinement_criteria =
+            refine_db->getStringArray("refine_criteria");
+      } else {
+         TBOX_WARNING(
+            d_object_name << ": "
+            <<
+            "No key `refine_criteria' found in data for"
+            <<
+            " RefinementData. No refinement will occur." << endl);
+      }
+
+      tbox::Array<string> ref_keys_defined(num_keys);
+      int def_key_cnt = 0;
+      tbox::Pointer<tbox::Database> error_db;
+      for (int i = 0; i < refinement_keys.getSize(); i++) {
+
+         string error_key = refinement_keys[i];
+         error_db.setNull();
+
+         if (!(error_key == "refine_criteria")) {
+
+            if (!(error_key == "UVAL_DEVIATION" ||
+                  error_key == "UVAL_GRADIENT" ||
+                  error_key == "UVAL_SHOCK" ||
+                  error_key == "UVAL_RICHARDSON")) {
+               TBOX_ERROR(
+                  d_object_name << ": "
+                  << "Unknown refinement criteria: "
+                  << error_key
+                  << "\nin input." << endl);
+            } else {
+               error_db = refine_db->getDatabase(error_key);
+               ref_keys_defined[def_key_cnt] = error_key;
+               def_key_cnt++;
+            }
+
+            if (!error_db.isNull() && error_key == "UVAL_DEVIATION") {
+
+               if (error_db->keyExists("dev_tol")) {
+                  d_dev_tol =
+                     error_db->getDoubleArray("dev_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `dev_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("uval_dev")) {
+                  d_dev =
+                     error_db->getDoubleArray("uval_dev");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `uval_dev' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_dev_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_dev_time_max.resizeArray(1);
+                  d_dev_time_max[0] = tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_dev_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_dev_time_min.resizeArray(1);
+                  d_dev_time_min[0] = 0.;
+               }
+
+            }
+
+            if (!error_db.isNull() && error_key == "UVAL_GRADIENT") {
+
+               if (error_db->keyExists("grad_tol")) {
+                  d_grad_tol =
+                     error_db->getDoubleArray("grad_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `grad_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_grad_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_grad_time_max.resizeArray(1);
+                  d_grad_time_max[0] = tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_grad_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_grad_time_min.resizeArray(1);
+                  d_grad_time_min[0] = 0.;
+               }
+
+            }
+
+            if (!error_db.isNull() && error_key == "UVAL_SHOCK") {
+
+               if (error_db->keyExists("shock_onset")) {
+                  d_shock_onset =
+                     error_db->getDoubleArray("shock_onset");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `shock_onset' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("shock_tol")) {
+                  d_shock_tol =
+                     error_db->getDoubleArray("shock_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `shock_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_shock_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_shock_time_max.resizeArray(1);
+                  d_shock_time_max[0] = tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_shock_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_shock_time_min.resizeArray(1);
+                  d_shock_time_min[0] = 0.;
+               }
+
+            }
+
+            if (!error_db.isNull() && error_key == "UVAL_RICHARDSON") {
+
+               if (error_db->keyExists("rich_tol")) {
+                  d_rich_tol =
+                     error_db->getDoubleArray("rich_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `rich_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_rich_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_rich_time_max.resizeArray(1);
+                  d_rich_time_max[0] = tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_rich_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_rich_time_min.resizeArray(1);
+                  d_rich_time_min[0] = 0.;
+               }
+
+            }
+
+         }
+
+      } // loop over refine criteria
+
+      /*
+       * Check that input is found for each string identifier in key list.
+       */
+      for (int k0 = 0; k0 < d_refinement_criteria.getSize(); k0++) {
+         string use_key = d_refinement_criteria[k0];
+         bool key_found = false;
+         for (int k1 = 0; k1 < def_key_cnt; k1++) {
+            string def_key = ref_keys_defined[k1];
+            if (def_key == use_key) key_found = true;
+         }
+
+         if (!key_found) {
+            TBOX_ERROR(d_object_name << ": "
+               << "No input found for specified refine criteria: "
+               << d_refinement_criteria[k0] << endl);
+         }
+      }
+
+   } // refine db entry exists
+
+   if (!is_from_restart) {
+
+      if (db->keyExists("data_problem")) {
+         d_data_problem = db->getString("data_problem");
+      } else {
+         TBOX_ERROR(
+            d_object_name << ": "
+            << "`data_problem' value not found in input."
+            << endl);
+      }
+
+      tbox::Pointer<tbox::Database> init_data_db;
+      if (db->keyExists("Initial_data")) {
+         init_data_db = db->getDatabase("Initial_data");
+      } else {
+         TBOX_ERROR(
+            d_object_name << ": "
+            <<
+            "No `Initial_data' database found in input." << endl);
+      }
+
+      bool found_problem_data = false;
+
+      if (d_data_problem == "SPHERE") {
+
+         if (init_data_db->keyExists("radius")) {
+            d_radius = init_data_db->getDouble("radius");
+         } else {
+            TBOX_ERROR(
+               d_object_name << ": "
+               <<
+               "`radius' input required for SPHERE problem." << endl);
+         }
+         if (init_data_db->keyExists("center")) {
+            init_data_db->getDoubleArray("center", &d_center[0], d_dim.getValue());
+         } else {
+            TBOX_ERROR(
+               d_object_name << ": "
+               <<
+               "`center' input required for SPHERE problem." << endl);
+         }
+         if (init_data_db->keyExists("uval_inside")) {
+            d_uval_inside = init_data_db->getDouble("uval_inside");
+         } else {
+            TBOX_ERROR(d_object_name << ": "
+                                     << "`uval_inside' input required for "
+                                     << "SPHERE problem." << endl);
+         }
+         if (init_data_db->keyExists("uval_outside")) {
+            d_uval_outside = init_data_db->getDouble("uval_outside");
+         } else {
+            TBOX_ERROR(d_object_name << ": "
+                                     << "`uval_outside' input required for "
+                                     << "SPHERE problem." << endl);
+         }
+
+         found_problem_data = true;
+
+      }
+
+      if (!found_problem_data &&
+          ((d_data_problem == "PIECEWISE_CONSTANT_X") ||
+           (d_data_problem == "PIECEWISE_CONSTANT_Y") ||
+           (d_data_problem == "PIECEWISE_CONSTANT_Z") ||
+           (d_data_problem == "SINE_CONSTANT_X") ||
+           (d_data_problem == "SINE_CONSTANT_Y") ||
+           (d_data_problem == "SINE_CONSTANT_Z"))) {
+
+         int idir = 0;
+         if (d_data_problem == "PIECEWISE_CONSTANT_Y") {
+            if (d_dim < tbox::Dimension(2)) {
+               TBOX_ERROR(
+                  d_object_name << ": `PIECEWISE_CONSTANT_Y' "
+                  << "problem invalid in 1 dimension."
+                  << endl);
+            }
+            idir = 1;
+         }
+
+         if (d_data_problem == "PIECEWISE_CONSTANT_Z") {
+            if (d_dim < tbox::Dimension(3)) {
+               TBOX_ERROR(
+                  d_object_name << ": `PIECEWISE_CONSTANT_Z' "
+                  <<
+                  "problem invalid in 1 or 2 dimensions." << endl);
+            }
+            idir = 2;
+         }
+
+         tbox::Array<string> init_data_keys = init_data_db->getAllKeys();
+
+         if (init_data_db->keyExists("front_position")) {
+            d_front_position = init_data_db->getDoubleArray("front_position");
+         } else {
+            TBOX_ERROR(d_object_name << ": "
+                                     << "`front_position' input required for "
+                                     << d_data_problem << " problem." << endl);
+         }
+
+         d_number_of_intervals =
+            tbox::MathUtilities<int>::Min(d_front_position.getSize() + 1,
+               init_data_keys.getSize() - 1);
+
+         d_front_position.resizeArray(d_front_position.getSize() + 1);
+         d_front_position[d_front_position.getSize() - 1] =
+            d_grid_geometry->getXUpper()[idir];
+
+         d_interval_uval.resizeArray(d_number_of_intervals);
+
+         int i = 0;
+         int nkey = 0;
+         bool found_interval_data = false;
+
+         while (!found_interval_data
+                && (i < d_number_of_intervals)
+                && (nkey < init_data_keys.getSize())) {
+
+            if (!(init_data_keys[nkey] == "front_position")) {
+
+               tbox::Pointer<tbox::Database> interval_db =
+                  init_data_db->getDatabase(init_data_keys[nkey]);
+
+               if (interval_db->keyExists("uval")) {
+                  d_interval_uval[i] = interval_db->getDouble("uval");
+               } else {
+                  TBOX_ERROR(d_object_name << ": "
+                     << "`uval' data missing in input for key = "
+                     << init_data_keys[nkey] << endl);
+               }
+               i++;
+
+               found_interval_data = (i == d_number_of_intervals);
+
+            }
+
+            nkey++;
+
+         }
+
+         if ((d_data_problem == "SINE_CONSTANT_X") ||
+             (d_data_problem == "SINE_CONSTANT_Y") ||
+             (d_data_problem == "SINE_CONSTANT_Z")) {
+            if (init_data_db->keyExists("amplitude")) {
+               d_amplitude = init_data_db->getDouble("amplitude");
+            }
+            if (init_data_db->keyExists("frequency")) {
+               init_data_db->getDoubleArray("frequency", &d_frequency[0], d_dim.getValue());
+            } else {
+               TBOX_ERROR(
+                  d_object_name << ": "
+                  <<
+                  "`frequency' input required for SINE problem." << endl);
+            }
+         }
+
+         if (!found_interval_data) {
+            TBOX_ERROR(
+               d_object_name << ": "
+               <<
+               "Insufficient interval data given in input"
+               << " for PIECEWISE_CONSTANT_*problem."
+               << endl);
+         }
+
+         found_problem_data = true;
+      }
+
+      if (!found_problem_data) {
+         TBOX_ERROR(d_object_name << ": "
+                                  << "`Initial_data' database found in input."
+                                  << " But bad data supplied." << endl);
+      }
+
+   } // if !is_from_restart read in problem data
+
+   const hier::IntVector& one_vec = hier::IntVector::getOne(d_dim);
+   hier::IntVector periodic(d_grid_geometry->getPeriodicShift(one_vec));
+   int num_per_dirs = 0;
+   for (int id = 0; id < d_dim.getValue(); id++) {
+      if (periodic(id)) num_per_dirs++;
+   }
+
+   if (db->keyExists("Boundary_data")) {
+
+      tbox::Pointer<tbox::Database> bdry_db = db->getDatabase("Boundary_data");
+
+      if (d_dim == tbox::Dimension(2)) {
+         appu::CartesianBoundaryUtilities2::readBoundaryInput(this,
+            bdry_db,
+            d_scalar_bdry_edge_conds,
+            d_scalar_bdry_node_conds,
+            periodic);
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         appu::CartesianBoundaryUtilities3::readBoundaryInput(this,
+            bdry_db,
+            d_scalar_bdry_face_conds,
+            d_scalar_bdry_edge_conds,
+            d_scalar_bdry_node_conds,
+            periodic);
+      }
+
+   } else {
+      TBOX_ERROR(
+         d_object_name << ": "
+         <<
+         "Key data `Boundary_data' not found in input. " << endl);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to put/get data members to/from restart database.            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void LinAdv::putToDatabase(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   db->putInteger("LINADV_VERSION", LINADV_VERSION);
+
+   db->putDoubleArray("d_advection_velocity", &d_advection_velocity[0], d_dim.getValue());
+
+   db->putInteger("d_godunov_order", d_godunov_order);
+   db->putString("d_corner_transport", d_corner_transport);
+   db->putIntegerArray("d_nghosts", &d_nghosts[0], d_dim.getValue());
+   db->putIntegerArray("d_fluxghosts", &d_fluxghosts[0], d_dim.getValue());
+
+   db->putString("d_data_problem", d_data_problem);
+
+   if (d_data_problem == "SPHERE") {
+      db->putDouble("d_radius", d_radius);
+      db->putDoubleArray("d_center", &d_center[0], d_dim.getValue());
+      db->putDouble("d_uval_inside", d_uval_inside);
+      db->putDouble("d_uval_outside", d_uval_outside);
+   }
+
+   if ((d_data_problem == "PIECEWISE_CONSTANT_X") ||
+       (d_data_problem == "PIECEWISE_CONSTANT_Y") ||
+       (d_data_problem == "PIECEWISE_CONSTANT_Z") ||
+       (d_data_problem == "SINE_CONSTANT_X") ||
+       (d_data_problem == "SINE_CONSTANT_Y") ||
+       (d_data_problem == "SINE_CONSTANT_Z")) {
+      db->putInteger("d_number_of_intervals", d_number_of_intervals);
+      if (d_number_of_intervals > 0) {
+         db->putDoubleArray("d_front_position", d_front_position);
+         db->putDoubleArray("d_interval_uval", d_interval_uval);
+      }
+   }
+
+   db->putIntegerArray("d_scalar_bdry_edge_conds", d_scalar_bdry_edge_conds);
+   db->putIntegerArray("d_scalar_bdry_node_conds", d_scalar_bdry_node_conds);
+
+   if (d_dim == tbox::Dimension(2)) {
+      db->putDoubleArray("d_bdry_edge_uval", d_bdry_edge_uval);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      db->putIntegerArray("d_scalar_bdry_face_conds", d_scalar_bdry_face_conds);
+      db->putDoubleArray("d_bdry_face_uval", d_bdry_face_uval);
+   }
+
+   if (d_refinement_criteria.getSize() > 0) {
+      db->putStringArray("d_refinement_criteria", d_refinement_criteria);
+   }
+   for (int i = 0; i < d_refinement_criteria.getSize(); i++) {
+
+      if (d_refinement_criteria[i] == "UVAL_DEVIATION") {
+         db->putDoubleArray("d_dev_tol", d_dev_tol);
+         db->putDoubleArray("d_dev", d_dev);
+         db->putDoubleArray("d_dev_time_max", d_dev_time_max);
+         db->putDoubleArray("d_dev_time_min", d_dev_time_min);
+      } else if (d_refinement_criteria[i] == "UVAL_GRADIENT") {
+         db->putDoubleArray("d_grad_tol", d_grad_tol);
+         db->putDoubleArray("d_grad_time_max", d_grad_time_max);
+         db->putDoubleArray("d_grad_time_min", d_grad_time_min);
+      } else if (d_refinement_criteria[i] == "UVAL_SHOCK") {
+         db->putDoubleArray("d_shock_onset", d_shock_onset);
+         db->putDoubleArray("d_shock_tol", d_shock_tol);
+         db->putDoubleArray("d_shock_time_max", d_shock_time_max);
+         db->putDoubleArray("d_shock_time_min", d_shock_time_min);
+      } else if (d_refinement_criteria[i] == "UVAL_RICHARDSON") {
+         db->putDoubleArray("d_rich_tol", d_rich_tol);
+         db->putDoubleArray("d_rich_time_max", d_rich_time_max);
+         db->putDoubleArray("d_rich_time_min", d_rich_time_min);
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ *    Access class information from restart database.                    *
+ *                                                                       *
+ *************************************************************************
+ */
+void LinAdv::getFromRestart()
+{
+   tbox::Pointer<tbox::Database> root_db =
+      tbox::RestartManager::getManager()->getRootDatabase();
+
+   tbox::Pointer<tbox::Database> db;
+   if (root_db->isDatabase(d_object_name)) {
+      db = root_db->getDatabase(d_object_name);
+   } else {
+      TBOX_ERROR("Restart database corresponding to "
+         << d_object_name << " not found in restart file.");
+   }
+
+   int ver = db->getInteger("LINADV_VERSION");
+   if (ver != LINADV_VERSION) {
+      TBOX_ERROR(
+         d_object_name << ":  "
+         <<
+         "Restart file version different than class version.");
+   }
+
+   db->getDoubleArray("d_advection_velocity", &d_advection_velocity[0], d_dim.getValue());
+
+   d_godunov_order = db->getInteger("d_godunov_order");
+   d_corner_transport = db->getString("d_corner_transport");
+
+   int* tmp_nghosts = &d_nghosts[0];
+   db->getIntegerArray("d_nghosts", tmp_nghosts, d_dim.getValue());
+   if (!(d_nghosts == CELLG)) {
+      TBOX_ERROR(
+         d_object_name << ": "
+         <<
+         "Key data `d_nghosts' in restart file != CELLG." << endl);
+   }
+   int* tmp_fluxghosts = &d_fluxghosts[0];
+   db->getIntegerArray("d_fluxghosts", tmp_fluxghosts, d_dim.getValue());
+   if (!(d_fluxghosts == FLUXG)) {
+      TBOX_ERROR(
+         d_object_name << ": "
+         <<
+         "Key data `d_fluxghosts' in restart file != FLUXG." << endl);
+   }
+
+   d_data_problem = db->getString("d_data_problem");
+
+   if (d_data_problem == "SPHERE") {
+      d_data_problem_int = SPHERE;
+      d_radius = db->getDouble("d_radius");
+      db->getDoubleArray("d_center", &d_center[0], d_dim.getValue());
+      d_uval_inside = db->getDouble("d_uval_inside");
+      d_uval_outside = db->getDouble("d_uval_outside");
+   }
+
+   if ((d_data_problem == "PIECEWISE_CONSTANT_X") ||
+       (d_data_problem == "PIECEWISE_CONSTANT_Y") ||
+       (d_data_problem == "PIECEWISE_CONSTANT_Z") ||
+       (d_data_problem == "SINE_CONSTANT_X") ||
+       (d_data_problem == "SINE_CONSTANT_Y") ||
+       (d_data_problem == "SINE_CONSTANT_Z")) {
+      d_number_of_intervals = db->getInteger("d_number_of_intervals");
+      if (d_number_of_intervals > 0) {
+         d_front_position = db->getDoubleArray("d_front_position");
+         d_interval_uval = db->getDoubleArray("d_interval_uval");
+      }
+   }
+
+   d_scalar_bdry_edge_conds = db->getIntegerArray("d_scalar_bdry_edge_conds");
+   d_scalar_bdry_node_conds = db->getIntegerArray("d_scalar_bdry_node_conds");
+
+   if (d_dim == tbox::Dimension(2)) {
+      d_bdry_edge_uval = db->getDoubleArray("d_bdry_edge_uval");
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      d_scalar_bdry_face_conds = db->getIntegerArray("d_scalar_bdry_face_conds");
+
+      d_bdry_face_uval = db->getDoubleArray("d_bdry_face_uval");
+   }
+
+   if (db->keyExists("d_refinement_criteria")) {
+      d_refinement_criteria = db->getStringArray("d_refinement_criteria");
+   }
+   for (int i = 0; i < d_refinement_criteria.getSize(); i++) {
+
+      if (d_refinement_criteria[i] == "UVAL_DEVIATION") {
+         d_dev_tol = db->getDoubleArray("d_dev_tol");
+         d_dev_time_max = db->getDoubleArray("d_dev_time_max");
+         d_dev_time_min = db->getDoubleArray("d_dev_time_min");
+      } else if (d_refinement_criteria[i] == "UVAL_GRADIENT") {
+         d_grad_tol = db->getDoubleArray("d_grad_tol");
+         d_grad_time_max = db->getDoubleArray("d_grad_time_max");
+         d_grad_time_min = db->getDoubleArray("d_grad_time_min");
+      } else if (d_refinement_criteria[i] == "UVAL_SHOCK") {
+         d_shock_onset = db->getDoubleArray("d_shock_onset");
+         d_shock_tol = db->getDoubleArray("d_shock_tol");
+         d_shock_time_max = db->getDoubleArray("d_shock_time_max");
+         d_shock_time_min = db->getDoubleArray("d_shock_time_min");
+      } else if (d_refinement_criteria[i] == "UVAL_RICHARDSON") {
+         d_rich_tol = db->getDoubleArray("d_rich_tol");
+         d_rich_time_max = db->getDoubleArray("d_rich_time_max");
+         d_rich_time_min = db->getDoubleArray("d_rich_time_min");
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to read boundary data from input database.                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void LinAdv::readDirichletBoundaryDataEntry(
+   tbox::Pointer<tbox::Database> db,
+   string& db_name,
+   int bdry_location_index)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+   TBOX_ASSERT(!db_name.empty());
+#endif
+   if (d_dim == tbox::Dimension(2)) {
+      readStateDataEntry(db,
+         db_name,
+         bdry_location_index,
+         d_bdry_edge_uval);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      readStateDataEntry(db,
+         db_name,
+         bdry_location_index,
+         d_bdry_face_uval);
+   }
+}
+
+void LinAdv::readStateDataEntry(
+   tbox::Pointer<tbox::Database> db,
+   const string& db_name,
+   int array_indx,
+   tbox::Array<double>& uval)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+   TBOX_ASSERT(!db_name.empty());
+   TBOX_ASSERT(array_indx >= 0);
+   TBOX_ASSERT(uval.getSize() > array_indx);
+#endif
+
+   if (db->keyExists("uval")) {
+      uval[array_indx] = db->getDouble("uval");
+   } else {
+      TBOX_ERROR(d_object_name << ": "
+                               << "`uval' entry missing from " << db_name
+                               << " input database. " << endl);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routine to check boundary data when debugging.                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void LinAdv::checkBoundaryData(
+   int btype,
+   const hier::Patch& patch,
+   const hier::IntVector& ghost_width_to_check,
+   const tbox::Array<int>& scalar_bconds) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_dim == tbox::Dimension(2)) {
+      TBOX_ASSERT(btype == EDGE2D_BDRY_TYPE ||
+         btype == NODE2D_BDRY_TYPE);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      TBOX_ASSERT(btype == FACE3D_BDRY_TYPE ||
+         btype == EDGE3D_BDRY_TYPE ||
+         btype == NODE3D_BDRY_TYPE);
+   }
+#endif
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+      patch.getPatchGeometry();
+   const tbox::Array<hier::BoundaryBox> bdry_boxes =
+      pgeom->getCodimensionBoundaries(btype);
+
+   hier::VariableDatabase* vdb = hier::VariableDatabase::getDatabase();
+
+   for (int i = 0; i < bdry_boxes.getSize(); i++) {
+      hier::BoundaryBox bbox = bdry_boxes[i];
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(bbox.getBoundaryType() == btype);
+#endif
+      int bloc = bbox.getLocationIndex();
+
+      int bscalarcase, refbdryloc;
+      if (d_dim == tbox::Dimension(2)) {
+         if (btype == EDGE2D_BDRY_TYPE) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(scalar_bconds.getSize() == NUM_2D_EDGES);
+#endif
+            bscalarcase = scalar_bconds[bloc];
+            refbdryloc = bloc;
+         } else { // btype == NODE2D_BDRY_TYPE
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(scalar_bconds.getSize() == NUM_2D_NODES);
+#endif
+            bscalarcase = scalar_bconds[bloc];
+            refbdryloc = d_node_bdry_edge[bloc];
+         }
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         if (btype == FACE3D_BDRY_TYPE) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(scalar_bconds.getSize() == NUM_3D_FACES);
+#endif
+            bscalarcase = scalar_bconds[bloc];
+            refbdryloc = bloc;
+         } else if (btype == EDGE3D_BDRY_TYPE) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(scalar_bconds.getSize() == NUM_3D_EDGES);
+#endif
+            bscalarcase = scalar_bconds[bloc];
+            refbdryloc = d_edge_bdry_face[bloc];
+         } else { // btype == NODE3D_BDRY_TYPE
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(scalar_bconds.getSize() == NUM_3D_NODES);
+#endif
+            bscalarcase = scalar_bconds[bloc];
+            refbdryloc = d_node_bdry_face[bloc];
+         }
+      }
+
+      int num_bad_values = 0;
+
+      if (d_dim == tbox::Dimension(2)) {
+         num_bad_values =
+            appu::CartesianBoundaryUtilities2::checkBdryData(
+               d_uval->getName(),
+               patch,
+               vdb->mapVariableAndContextToIndex(d_uval, getDataContext()), 0,
+               ghost_width_to_check,
+               bbox,
+               bscalarcase,
+               d_bdry_edge_uval[refbdryloc]);
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         num_bad_values =
+            appu::CartesianBoundaryUtilities3::checkBdryData(
+               d_uval->getName(),
+               patch,
+               vdb->mapVariableAndContextToIndex(d_uval, getDataContext()), 0,
+               ghost_width_to_check,
+               bbox,
+               bscalarcase,
+               d_bdry_face_uval[refbdryloc]);
+      }
+#if (TESTING == 1)
+      if (num_bad_values > 0) {
+         tbox::perr << "\nLinAdv Boundary Test FAILED: \n"
+                    << "     " << num_bad_values
+                    << " bad UVAL values found for\n"
+                    << "     boundary type " << btype << " at location "
+                    << bloc << endl;
+      }
+#endif
+
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/LinAdv.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/LinAdv.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,462 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Numerical routines for single patch in linear advection ex. 
+ *
+ ************************************************************************/
+
+#ifndef included_LinAdvXD
+#define included_LinAdvXD
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/appu/BoundaryUtilityStrategy.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/mesh/GriddingAlgorithm.h"
+#include "SAMRAI/algs/HyperbolicLevelIntegrator.h"
+#include "SAMRAI/algs/HyperbolicPatchStrategy.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Serializable.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/appu/VisItDataWriter.h"
+
+#include <string>
+
+using namespace std;
+
+/**
+ * The LinAdv class provides routines for a sample application code that
+ * solves linear advection.  This code illustrates the manner in which
+ * a code employing the standard Berger/Oliger AMR algorithm for
+ * explicit hydrodynamics can be used in the SAMRAI framework.
+ * This class is derived from the algs::HyperbolicPatchStrategy abstract base
+ * class which defines the bulk of the interface between the hyperbolic
+ * intergration algorithm provided by SAMRAI and the numerical routines
+ * specific to linear advection.  In particular, this class provides routines
+ * which maybe applied to any patch in an AMR patch hierarchy.
+ *
+ * The linear advection problem is simply du/dt + div(a*u) = 0, where
+ * "u" is a scalar-valued function and "a" is a constant vector.  The
+ * primary numerical quantities are "uval" and "flux", which represent
+ * "u" and "a*u", respectively.  All other variables are temporary
+ * quantities used in the numerical routines.  The numerical routines
+ * use explicit timestepping and a second-order unsplit Godunov method.
+ */
+
+using namespace SAMRAI;
+
+class LinAdv:
+   public tbox::Serializable,
+   public algs::HyperbolicPatchStrategy,
+   public appu::BoundaryUtilityStrategy
+{
+public:
+   /**
+    * The constructor for LinAdv sets default parameters for the linear
+    * advection model.  Specifically, it creates variables that represent
+    * the state of the solution.  The constructor also registers this
+    * object for restart with the restart manager using the object name.
+    *
+    * After default values are set, this routine calls getFromRestart()
+    * if execution from a restart file is specified.  Finally,
+    * getFromInput() is called to read values from the given input
+    * database (potentially overriding those found in the restart file).
+    */
+   LinAdv(
+      const string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> input_db,
+      tbox::Pointer<geom::CartesianGridGeometry> grid_geom);
+
+   /**
+    * The destructor for LinAdv does nothing.
+    */
+   ~LinAdv();
+
+   ///
+   ///  The following routines:
+   ///
+   ///      registerModelVariables(),
+   ///      initializeDataOnPatch(),
+   ///      computeStableDtOnPatch(),
+   ///      computeFluxesOnPatch(),
+   ///      conservativeDifferenceOnPatch(),
+   ///      tagGradientDetectorCells(),
+   ///      tagRichardsonExtrapolationCells()
+   ///
+   ///  are concrete implementations of functions declared in the
+   ///  algs::HyperbolicPatchStrategy abstract base class.
+   ///
+
+   /**
+    * Register LinAdv model variables with algs::HyperbolicLevelIntegrator
+    * according to variable registration function provided by the integrator.
+    * In other words, variables are registered according to their role
+    * in the integration process (e.g., time-dependent, flux, etc.).
+    * This routine also registers variables for plotting with the
+    * Vis writer.
+    */
+   void
+   registerModelVariables(
+      algs::HyperbolicLevelIntegrator* integrator);
+
+   /**
+    * Set up parameters in the load balancer object (owned by the gridding
+    * algorithm) if needed.  The Euler model allows non-uniform load balancing
+    * to be used based on the input file parameter called
+    * "use_nonuniform_workload".  The default case is to use uniform
+    * load balancing (i.e., use_nonuniform_workload == false).  For
+    * illustrative and testing purposes, when non-uniform load balancing is
+    * turned on, a weight of one will be applied to every grid cell.  This
+    * should produce an identical patch configuration to the uniform load
+    * balance case.
+    */
+   void
+   setupLoadBalancer(
+      algs::HyperbolicLevelIntegrator* integrator,
+      mesh::GriddingAlgorithm* gridding_algorithm);
+
+   /**
+    * Set the data on the patch interior to some initial values,
+    * depending on the input parameters and numerical routines.
+    * If the "initial_time" flag is false, indicating that the
+    * routine is called after a regridding step, the routine does nothing.
+    */
+   void
+   initializeDataOnPatch(
+      hier::Patch& patch,
+      const double data_time,
+      const bool initial_time);
+
+   /**
+    * Compute the stable time increment for patch using a CFL
+    * condition and return the computed dt.
+    */
+   double
+   computeStableDtOnPatch(
+      hier::Patch& patch,
+      const bool initial_time,
+      const double dt_time);
+
+   /**
+    * Compute time integral of fluxes to be used in conservative difference
+    * for patch integration.  When (dim == tbox::Dimension(3)), this function calls either
+    * compute3DFluxesWithCornerTransport1(), or
+    * compute3DFluxesWithCornerTransport2() depending on which
+    * transverse flux correction option that is specified in input.
+    * The conservative difference used to update the integrated quantities
+    * is implemented in the conservativeDifferenceOnPatch() routine.
+    */
+   void
+   computeFluxesOnPatch(
+      hier::Patch& patch,
+      const double time,
+      const double dt);
+
+   /**
+    * Update linear advection solution variables by performing a conservative
+    * difference with the fluxes calculated in computeFluxesOnPatch().
+    */
+   void
+   conservativeDifferenceOnPatch(
+      hier::Patch& patch,
+      const double time,
+      const double dt,
+      bool at_syncronization);
+
+   /**
+    * Tag cells for refinement using gradient detector.
+    */
+   void
+   tagGradientDetectorCells(
+      hier::Patch& patch,
+      const double regrid_time,
+      const bool initial_error,
+      const int tag_indexindx,
+      const bool uses_richardson_extrapolation_too);
+
+   /**
+    * Tag cells for refinement using Richardson extrapolation.
+    */
+   void
+   tagRichardsonExtrapolationCells(
+      hier::Patch& patch,
+      const int error_level_number,
+      const tbox::Pointer<hier::VariableContext> coarsened_fine,
+      const tbox::Pointer<hier::VariableContext> advanced_coarse,
+      const double regrid_time,
+      const double deltat,
+      const int error_coarsen_ratio,
+      const bool initial_error,
+      const int tag_index,
+      const bool uses_gradient_detector_too);
+
+   ///
+   ///  The following routines:
+   ///
+   ///      setPhysicalBoundaryConditions()
+   ///
+   ///  are concrete implementations of functions declared in the
+   ///  RefinePatchStrategy abstract base class.
+   ///
+
+   /**
+    * Set the data in ghost cells corresponding to physical boundary
+    * conditions.  Specific boundary conditions are determined by
+    * information specified in input file and numerical routines.
+    */
+   void
+   setPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const double fill_time,
+      const hier::IntVector&
+      ghost_width_to_fill);
+
+   /**
+    * Write state of LinAdv object to the given database for restart.
+    *
+    * This routine is a concrete implementation of the function
+    * declared in the tbox::Serializable abstract base class.
+    */
+   void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> db);
+
+   /**
+    * This routine is a concrete implementation of the virtual function
+    * in the base class BoundaryUtilityStrategy.  It reads DIRICHLET
+    * boundary state values from the given database with the
+    * given name string idenifier.  The integer location index
+    * indicates the face (in 3D) or edge (in 2D) to which the boundary
+    * condition applies.
+    */
+   void
+   readDirichletBoundaryDataEntry(
+      tbox::Pointer<tbox::Database> db,
+      string& db_name,
+      int bdry_location_index);
+
+#ifdef HAVE_HDF5
+   /**
+    * Register a VisIt data writer so this class will write
+    * plot files that may be postprocessed with the VisIt
+    * visualization tool.
+    */
+   void
+   registerVisItDataWriter(
+      tbox::Pointer<appu::VisItDataWriter> viz_writer);
+#endif
+
+   /**
+    * Reset physical boundary values in special cases, such as when
+    * using symmetric (i.e., reflective) boundary conditions.
+    */
+   void
+   boundaryReset(
+      hier::Patch& patch,
+      pdat::FaceData<double>& traced_left,
+      pdat::FaceData<double>& traced_right) const;
+
+   /**
+    * Print all data members for LinAdv class.
+    */
+   void
+   printClassData(
+      ostream& os) const;
+
+private:
+   /*
+    * These private member functions read data from input and restart.
+    * When beginning a run from a restart file, all data members are read
+    * from the restart file.  If the boolean flag is true when reading
+    * from input, some restart values may be overridden by those in the
+    * input file.
+    *
+    * An assertion results if the database pointer is null.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db,
+      bool is_from_restart);
+
+   void
+   getFromRestart();
+
+   void
+   readStateDataEntry(
+      tbox::Pointer<tbox::Database> db,
+      const string& db_name,
+      int array_indx,
+      tbox::Array<double>& uval);
+
+   /*
+    * Private member function to check correctness of boundary data.
+    */
+   void
+   checkBoundaryData(
+      int btype,
+      const hier::Patch& patch,
+      const hier::IntVector& ghost_width_to_fill,
+      const tbox::Array<int>& scalar_bconds) const;
+
+   /*
+    * Three-dimensional flux computation routines corresponding to
+    * either of the two transverse flux correction options.  These
+    * routines are called from the computeFluxesOnPatch() function.
+    */
+   void
+   compute3DFluxesWithCornerTransport1(
+      hier::Patch& patch,
+      const double dt);
+   void
+   compute3DFluxesWithCornerTransport2(
+      hier::Patch& patch,
+      const double dt);
+
+   /*
+    * The object name is used for error/warning reporting and also as a
+    * string label for restart database entries.
+    */
+   string d_object_name;
+
+   const tbox::Dimension d_dim;
+
+   /*
+    * We cache pointers to the grid geometry object to set up initial
+    * data, set physical boundary conditions, and register plot
+    * variables.
+    */
+   tbox::Pointer<geom::CartesianGridGeometry> d_grid_geometry;
+
+#ifdef HAVE_HDF5
+   tbox::Pointer<appu::VisItDataWriter> d_visit_writer;
+#endif
+
+   /*
+    * Data items used for nonuniform load balance, if used.
+    */
+   tbox::Pointer<pdat::CellVariable<double> > d_workload_variable;
+   int d_workload_data_id;
+   bool d_use_nonuniform_workload;
+
+   /**
+    * tbox::Pointer to state variable vector - [u]
+    */
+   tbox::Pointer<pdat::CellVariable<double> > d_uval;
+
+   /**
+    * tbox::Pointer to flux variable vector  - [F]
+    */
+   tbox::Pointer<pdat::FaceVariable<double> > d_flux;
+
+   /**
+    * linear advection velocity vector
+    */
+   std::vector<double> d_advection_velocity;
+
+   /*
+    *  Parameters for numerical method:
+    *
+    *    d_godunov_order ....... order of Godunov slopes (1, 2, or 4)
+    *
+    *    d_corner_transport .... type of finite difference approximation
+    *                            for 3d transverse flux correction
+    *
+    *    d_nghosts ............. number of ghost cells for cell-centered
+    *                            and face/side-centered variables
+    *
+    *    d_fluxghosts .......... number of ghost cells for fluxes
+    *
+    */
+   int d_godunov_order;
+   string d_corner_transport;
+   hier::IntVector d_nghosts;
+   hier::IntVector d_fluxghosts;
+
+   /*
+    * Indicator for problem type and initial conditions
+    */
+   string d_data_problem;
+   int d_data_problem_int;
+
+   /*
+    * Input for SPHERE problem
+    */
+   double d_radius;
+   std::vector<double> d_center;
+   double d_uval_inside;
+   double d_uval_outside;
+
+   /*
+    * Input for FRONT problem
+    */
+   int d_number_of_intervals;
+   tbox::Array<double> d_front_position;
+   tbox::Array<double> d_interval_uval;
+
+   /*
+    * Boundary condition cases and boundary values.
+    * Options are: FLOW, REFLECT, DIRICHLET
+    * and variants for nodes and edges.
+    *
+    * Input file values are read into these arrays.
+    */
+   tbox::Array<int> d_scalar_bdry_edge_conds;
+   tbox::Array<int> d_scalar_bdry_node_conds;
+   tbox::Array<int> d_scalar_bdry_face_conds; // only for (dim == tbox::Dimension(3))
+
+   /*
+    * Boundary condition cases for scalar and vector (i.e., depth > 1)
+    * variables.  These are post-processed input values and are passed
+    * to the boundary routines.
+    */
+   tbox::Array<int> d_node_bdry_edge; // only for (dim == tbox::Dimension(2))
+   tbox::Array<int> d_edge_bdry_face; // only for (dim == tbox::Dimension(3))
+   tbox::Array<int> d_node_bdry_face; // only for (dim == tbox::Dimension(3))
+
+   /*
+    * Arrays of face (3d) or edge (2d) boundary values for DIRICHLET case.
+    */
+   tbox::Array<double> d_bdry_edge_uval; // only for (dim == tbox::Dimension(2))
+   tbox::Array<double> d_bdry_face_uval; // only for (dim == tbox::Dimension(3))
+
+   /*
+    * Input for Sine problem initialization
+    */
+   double d_amplitude;
+   std::vector<double> d_frequency;
+
+   /*
+    * Refinement criteria parameters for gradient detector and
+    * Richardson extrapolation.
+    */
+   tbox::Array<string> d_refinement_criteria;
+   tbox::Array<double> d_dev_tol;
+   tbox::Array<double> d_dev;
+   tbox::Array<double> d_dev_time_max;
+   tbox::Array<double> d_dev_time_min;
+   tbox::Array<double> d_grad_tol;
+   tbox::Array<double> d_grad_time_max;
+   tbox::Array<double> d_grad_time_min;
+   tbox::Array<double> d_shock_onset;
+   tbox::Array<double> d_shock_tol;
+   tbox::Array<double> d_shock_time_max;
+   tbox::Array<double> d_shock_time_min;
+   tbox::Array<double> d_rich_tol;
+   tbox::Array<double> d_rich_time_max;
+   tbox::Array<double> d_rich_time_min;
+
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/LinAdvFort.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/LinAdvFort.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,349 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   F77 external declarations for SAMRAI linear advection example. 
+ *
+ ************************************************************************/
+
+#include <math.h>
+#include <signal.h>
+
+extern "C" {
+
+void F77_FUNC(linadvinit2d, LINADVINIT2D) (
+   const int &, const double *, const double *, const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   double *,
+   const int &,
+   const double *, const double *);
+
+void F77_FUNC(linadvinit3d, LINADVINIT3D) (
+   const int &, const double *, const double *, const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   const int &,
+   double *,
+   const int &,
+   const double *, const double *);
+
+void F77_FUNC(linadvinitsine2d, LINADVINITSINE2D) (
+   const int &, const double *, const double *,
+   const double *, const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   double *,
+   const int &,
+   const double *, const double *,
+   const double &, const double *);
+
+void F77_FUNC(linadvinitsine3d, LINADVINITSINE3D) (
+   const int &, const double *, const double *,
+   const double *, const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   const int &,
+   double *,
+   const int &,
+   const double *, const double *,
+   const double &, const double *);
+
+void F77_FUNC(initsphere2d, INITSPHERE2D) (
+   const int &, const double *, const double *, const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   double *,
+   const double &, const double &,
+   const double *, const double &);
+
+void F77_FUNC(initsphere3d, INITSPHERE3D) (
+   const int &, const double *, const double *, const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   const int &,
+   double *,
+   const double &, const double &,
+   const double *, const double &);
+
+void F77_FUNC(stabledt2d, STABLEDT2D) (
+   const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   const double *,
+   const double *,
+   double &);
+
+void F77_FUNC(stabledt3d, STABLEDT3D) (
+   const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   const int &,
+   const double *,
+   const double *,
+   double &);
+
+void F77_FUNC(inittraceflux1d, INITTRACEFLUX1D) (
+   const int &, const int &,
+   const double *,
+   double *, double *, double *);
+
+void F77_FUNC(inittraceflux2d, INITTRACEFLUX2D) (
+   const int &, const int &,
+   const int &, const int &,
+   const double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(inittraceflux3d, INITTRACEFLUX3D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double *,
+   double *, double *, double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(chartracing1d0, CHARTRACING1D0) (
+   const double &, const int &, const int &,
+   const int &, const double &, const double &, const int &,
+   const double *,
+   double *, double *,
+   double *, double *,
+   double *, double *);
+
+void F77_FUNC(chartracing2d0, CHARTRACING2D0) (
+   const double &, const int &, const int &,
+   const int &, const int &,
+   const int &, const double &, const double &, const int &,
+   const double *,
+   double *, double *,
+   double *, double *,
+   double *, double *);
+
+void F77_FUNC(chartracing2d1, CHARTRACING2D1) (
+   const double &, const int &, const int &, const int &, const int &,
+   const int &, const double &, const double &, const int &,
+   const double *,
+   double *, double *,
+   double *, double *,
+   double *, double *);
+
+void F77_FUNC(chartracing3d0, CHARTRACING3D0) (
+   const double &, const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const double &, const double &, const int &,
+   const double *,
+   double *, double *,
+   double *, double *,
+   double *, double *);
+
+void F77_FUNC(chartracing3d1, CHARTRACING3D1) (
+   const double &, const int &, const int &, const int &, const int &,
+   const int &, const int &,
+   const int &, const double &, const double &, const int &,
+   const double *,
+   double *, double *,
+   double *, double *,
+   double *, double *);
+
+void F77_FUNC(chartracing3d2, CHARTRACING3D2) (
+   const double &, const int &, const int &, const int &, const int &,
+   const int &, const int &,
+   const int &, const double &, const double &, const int &,
+   const double *,
+   double *, double *,
+   double *, double *,
+   double *, double *);
+
+void F77_FUNC(fluxcalculation2d, FLUXCALCULATION2d) (
+   const double &, const int &, const int &,
+   const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const double *,
+   const double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(fluxcalculation3d, FLUXCALCULATION3d) (
+   const double &, const int &, const int &,
+   const int &,
+   const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double *,
+   const double *,
+   double *, double *, double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(fluxcorrec2d, FLUXCORREC2D) (
+   const double &, const int &, const int &, const int &, const int &,
+   const int &, const int &,
+   const double *, const double *, const int &,
+   const double *,
+   const double *, const double *, const double *,
+   const double *, const double *, const double *,
+   const double *, const double *, const double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(fluxcorrec3d, FLUXCORREC3D) (
+   const double &, const int &, const int &, const int &, const int &,
+   const int &, const int &,
+   const double *, const double *,
+   const double *,
+   const double *, const double *, const double *,
+   const double *, const double *, const double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(fluxcorrec, FLUXCORREC) (
+   const double &, const int &, const int &, const int &, const int &,
+   const double *,
+   const double *, const double *,
+   double *, double *,
+   double *, double *,
+   double *, double *);
+
+void F77_FUNC(consdiff2d, CONSDIFF2D) (
+   const int &, const int &,
+   const int &, const int &,
+   const double *,
+   const double *, const double *,
+   const double *,
+   double *);
+
+void F77_FUNC(consdiff3d, CONSDIFF3D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double *,
+   const double *, const double *,
+   const double *,
+   const double *,
+   double *);
+
+void F77_FUNC(getbdry2d, GETBDRY2D) (const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &,
+   const int &,
+   const int &,
+   const double *, const double &,
+   double *,
+   const double *, const double *, const int &);
+
+void F77_FUNC(getbdry3d, GETBDRY3D) (const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &,
+   const int &,
+   const int &,
+   const int &,
+   const double *, const double &,
+   double *,
+   const double *, const double *, const int &);
+
+void F77_FUNC(onethirdstate3d, ONETHIRDSTATE3D) (
+   const double &, const double *, const int &,
+   const int &, const int &, const int &, const int &, const int &, const int &,
+   const double *, const double *,
+   const double *, const double *, const double *,
+   double *);
+
+void F77_FUNC(fluxthird3d, FLUXTHIRD3D) (
+   const double &, const double *, const int &,
+   const int &, const int &, const int &, const int &, const int &, const int &,
+   const double *, const double *,
+   const double *,
+   double *, double *, double *);
+
+void F77_FUNC(fluxcorrecjt3d, FLUXCORRECJT3D) (
+   const double &, const double *, const int &,
+   const int &, const int &, const int &, const int &, const int &, const int &,
+   const double *, const double *,
+   const double *, const double *, const double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(detectgrad2d, DETECTGRAD2D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double *,
+   const double &,
+   const int &, const int &,
+   const double *,
+   int *, int *);
+
+void F77_FUNC(detectgrad3d, DETECTGRAD3D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double *,
+   const double &,
+   const int &, const int &,
+   const double *,
+   int *, int *);
+
+void F77_FUNC(detectshock2d, DETECTSHOCK2D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double *,
+   const double &, const double &,
+   const int &, const int &,
+   const double *,
+   int *, int *);
+
+void F77_FUNC(detectshock3d, DETECTSHOCK3D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double *,
+   const double &, const double &,
+   const int &, const int &,
+   const double *,
+   int *, int *);
+
+void F77_FUNC(stufprobc, STUFPROBC) (
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &);
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,531 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=LinAdv.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/HyperbolicLevelIntegrator.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/HyperbolicPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementLevelStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryUtilityStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryDefines.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryUtilities2.h	\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryUtilities3.h	\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h LinAdv.C	\
+	LinAdv.h LinAdvFort.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=main.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/HyperbolicLevelIntegrator.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/HyperbolicPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementIntegrator.I		\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementIntegrator.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementLevelStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryUtilityStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BergerRigoutsos.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h LinAdv.h main.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,132 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for linear advection sample application 
+##
+#########################################################################
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/test/applications/LinAdv
+VPATH         = @srcdir@
+TESTTOOLS     = ../../testtools
+OBJECT        = ../../../..
+
+default: check	
+
+include $(OBJECT)/config/Makefile.config
+
+AUTOTEST      = $(SAMRAI)/source/test/applications
+CPPFLAGS_EXTRA= -I$(AUTOTEST) -DTESTING=1 
+
+NUM_TESTS = 10
+
+TEST_NPROCS = @TEST_NPROCS@
+
+CXX_OBJS      = main.o LinAdv.o AutoTester.o
+F_OBJS        = flux2d.o grad2d.o init2d.o stable2d.o stufprobc.o trace1d.o trace2d.o flux3d.o init3d.o grad3d.o trace3d.o stable3d.o fluxcorner3d.o
+
+main:		$(CXX_OBJS) $(F_OBJS) $(LIBSAMRAIDEPEND)
+		$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) $(F_OBJS)	\
+		$(LIBSAMRAI3D) $(LIBSAMRAI) $(LDLIBS) -o main
+
+check:
+		$(MAKE) check2d
+		$(MAKE) check3d
+
+# WARNING: Checking of the redistribute routine is a bit of a problem since it needs only a single run 
+#          to have been done.  So remove the old stuff.
+check2d:	main
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main test_inputs/test.2d.input;
+		$(RM) -rf  test.2d.restart/restore.000003/nodes.*[2-9]
+		$(OBJECT)/tools/restart/restart-redistribute test.2d.restart test_restart_redistribute_2d 3 4;
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main test_inputs/test.2d.input test.2d.restart 5;
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main test_inputs/test_sync.2d.input;
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main test_inputs/test_sync.2d.input test_sync.2d.restart 5;
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main test_inputs/test_sync_restart.2d.input;
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main test_inputs/test_sync_restart.2d.input test_sync_restart.2d.restart 5
+
+check3d:	main
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main test_inputs/test.3d.input;
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main test_inputs/test.3d.input test.3d.restart 5;
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main test_inputs/test_sync.3d.input;
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main test_inputs/test_sync.3d.input test_sync.3d.restart 5
+
+checkcompile: main
+
+checktest:
+		rm -f makecheck.logfile
+		$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+		$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+		rm -f makecheck.logfile
+
+clean-check:
+		$(SAMCLEAN)
+
+clean:		clean-check
+		$(RM) *.f *main* 
+		$(RM) -rf test.?d.restart
+
+include $(SRCDIR)/Makefile.depend
+
+FORTRAN       = $(SRCDIR)/fortran/$(PDIM)d
+M4DIRS        = -DFORTDIR=$(SRCDIR)/fortran $(SAMRAI_M4_FLAGS)
+
+AutoTester.o:	$(AUTOTEST)/AutoTester.C
+		$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c  $(AUTOTEST)/AutoTester.C \
+		-o $@
+
+flux2d.o:	fortran/flux2d.m4
+		$(M4) $(M4DIRS) $(SRCDIR)/fortran/flux2d.m4 > flux2d.f
+		$(F77) $(FFLAGS) -c flux2d.f -o $@
+
+flux3d.o:	fortran/flux3d.m4
+		$(M4) $(M4DIRS) $(SRCDIR)/fortran/flux3d.m4 > flux3d.f
+		$(F77) $(FFLAGS) -c flux3d.f -o $@
+
+fluxcorner3d.o:	fortran/fluxcorner3d.m4
+		$(M4) $(M4DIRS) $(SRCDIR)/fortran/fluxcorner3d.m4 > fluxcorner3d.f
+		$(F77) $(FFLAGS) -c fluxcorner3d.f -o $@
+
+grad2d.o:	fortran/grad2d.m4
+		$(M4) $(M4DIRS) $(SRCDIR)/fortran/grad2d.m4 > grad2d.f
+		$(F77) $(FFLAGS) -c grad2d.f -o $@
+
+grad3d.o:	fortran/grad3d.m4
+		$(M4) $(M4DIRS) $(SRCDIR)/fortran/grad3d.m4 > grad3d.f
+		$(F77) $(FFLAGS) -c grad3d.f -o $@
+
+init2d.o:	fortran/init2d.m4
+		$(M4) $(M4DIRS) $(SRCDIR)/fortran/init2d.m4 > init2d.f
+		$(F77) $(FFLAGS) -c init2d.f -o $@
+
+init3d.o:	fortran/init3d.m4
+		$(M4) $(M4DIRS) $(SRCDIR)/fortran/init3d.m4 > init3d.f
+		$(F77) $(FFLAGS) -c init3d.f -o $@
+
+stable2d.o:	fortran/stable2d.m4
+		$(M4) $(M4DIRS) $(SRCDIR)/fortran/stable2d.m4 > stable2d.f
+		$(F77) $(FFLAGS) -c stable2d.f -o $@
+
+stable3d.o:	fortran/stable3d.m4
+		$(M4) $(M4DIRS) $(SRCDIR)/fortran/stable3d.m4 > stable3d.f
+		$(F77) $(FFLAGS) -c stable3d.f -o $@
+
+stufprobc.o:	fortran/stufprobc.m4
+		$(M4) $(M4DIRS) $(SRCDIR)/fortran/stufprobc.m4 > stufprobc.f
+		$(F77) $(FFLAGS) -c stufprobc.f -o $@
+
+trace2d.o:	fortran/trace2d.m4
+		$(M4) $(M4DIRS) $(SRCDIR)/fortran/trace2d.m4 > trace2d.f
+		$(F77) $(FFLAGS) -c trace2d.f -o $@
+
+trace3d.o:	fortran/trace3d.m4
+		$(M4) $(M4DIRS) $(SRCDIR)/fortran/trace3d.m4 > trace3d.f
+		$(F77) $(FFLAGS) -c trace3d.f -o $@
+
+trace1d.o:	fortran/trace1d.m4
+		$(M4) $(M4DIRS) $(SRCDIR)/fortran/trace1d.m4 > trace1d.f
+		$(F77) $(FFLAGS) -c trace1d.f -o $@
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,98 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   README file for LinAdv test.
+##
+#########################################################################
+
+This directory contains a Makefile to build an Automatic testing
+version of the LinAdv application.  It is used in the autotest
+suite of SAMRAI.
+
+The Makefile operates on the LinAdv code in the applications
+directory.  However, it performs two functions not done in the
+standard LinAdv application.  First, it builds and links the 
+AutoTester class, located in /SAMRAI/source/test/applications.
+This class reads information from input and performs an
+"evaluate" function to assure the computed information is 
+correct.  Second, it sets to TRUE the TESTING preprocessor
+option so that the autotest part of LinAdv is included.
+
+The following segment should be added to the input file 
+to satisfy the input requirements for AutoTester:
+
+// Automated testing arguments.
+//    test_iter_num  -- (int) iteration number (i.e. coarse-grid
+//                      timestep) for which to check result [10].
+//    test_fluxes    -- (bool) test Riemann solver.
+//                      If TRUE, it outputs primitive variables to a
+//                      file which can then be verified against some
+//                      known "correct" result.  If FALSE, it will
+//                      simply check timesteps in the
+//                      HyperbolicLevelIntegrator. [FALSE]
+//    correct_result -- (double array) specification of correct result
+//                      for the different test performed.  If the
+//                      computed result does not match the specified
+//                      result, the code will report an error [0].
+//    output_correct -- (bool) output computed result.  Useful for
+//                      setting baseline "correct_result" values for a
+//                      new problem.  That is, set to TRUE and run the
+//                      case. Enter the output values in the
+//                      correct_result array in input, and use the
+//                      input file for automated testing. [FALSE]
+AutoTester {
+   test_iter_num = 10
+   test_fluxes = FALSE
+   correct_result = 2.25, 0.0140625, 0.0140625
+   output_correct = FALSE
+}
+
+A 2D and a 3D test input file are included with LinAdv:
+   test-2d.input - contains input and "correct" output data for 2D
+                   test of LinAdv
+   test-3d.input - same, but for 3D test. 
+
+
+RESETTING BASELINES
+
+The tests that are run from this directory include comparisons of the results
+to baseline data that represent expected results.  The tests compare the
+box configuration of the hierarchy, and certain timestep floating point values,
+as specified in the AutoTester input described above.  The baseline boxes
+are stored in HDF data files, and the expected timestep values are listed
+in the AutoTester input.
+
+If a SAMRAI developer makes changes to the library that can legitimately change
+the box configuration of a hierarchy, then the baselines here need to be reset,
+according to the following steps
+
+1. Change the AutoTester input block in each input file to include these
+   two entries:
+ 
+     write_patch_boxes = TRUE
+     read_patch_boxes = FALSE
+
+2. Comment out all of the lines that read restart files in the
+   Makefile's check2d and check3d rules.
+
+3. make check.  The baseline HDF files will be regenerated here.
+
+4. If you get floating-point-difference errors when the "correct_result"
+   values are compared, do the following
+
+   a. set output_correct = TRUE in the AutoTester input
+
+   b. make check
+
+   c. Find the new values of the three floating-point outputs in the log
+      file, and put them on the line "correct_result = ..."
+      (make sure they don't differ too much).
+
+5. Undo all makefile and input file changes (except for changes to
+   correct_results).
+
+6. make checktest (there should be no more errors).
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/example_inputs/sine_front.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/example_inputs/sine_front.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,164 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Linadv example problem
+ *                (2d sinusoidal fronusoidal frontt) 
+ *
+ ************************************************************************/
+
+
+LinAdv {
+   advection_velocity = 2.0e0 , 0.1e0
+
+   godunov_order    = 4
+   corner_transport = "CORNER_TRANSPORT_1"
+
+   data_problem      = "SINE_CONSTANT_X"
+
+   Initial_data {
+      front_position    = 0.0
+      interval_0 {
+         uval      = 40.0
+      }
+      interval_1 {
+         uval      = 1.0
+      }
+      amplitude = 0.25 
+      frequency = 2.0, 2.0
+
+   }
+
+   Refinement_data {
+      refine_criteria = "UVAL_GRADIENT", "UVAL_SHOCK"
+ 
+      UVAL_GRADIENT {
+         grad_tol = 10.0
+      }
+ 
+      UVAL_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+   }
+
+  // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "FLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "XFLOW"
+      }
+   }
+}
+
+Main {
+   dim = 2
+   base_name = "sine_front.2d"
+// log file parameters 
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_sine2d"
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+
+   run_time_plotting = FALSE
+}
+
+TimerManager {
+   print_exclusive      = TRUE   
+   timer_list               = "apps::*::*",
+                              "algs::*::*",
+                              "mesh::*::*"
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0) , (39,19) ]
+   x_lo          = -2.e0, -1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels             = 3        // Maximum number of levels in hierarchy.
+   ratio_to_coarser {            // vector ratio to next coarser level
+      level_1             = 4 , 4 
+      level_2             = 4 , 4 
+   }
+
+   largest_patch_size {
+      level_0 =  19, 19  // largest patch allowed in hierarchy
+           // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 =  8, 8
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance   = 0.70e0    // min % of tag cells in new patch level
+   combine_efficiency     = 0.85e0    // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+//   write_regrid_boxes    = TRUE
+   regrid_boxes_filename  = "regrid_boxes"
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 100.e0   // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   max_integrator_steps  = 25     // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/example_inputs/sphere.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/example_inputs/sphere.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,163 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI LinAdv example problem 
+ *
+ ************************************************************************/
+
+LinAdv {
+
+   advection_velocity = 2.0e0 , 1.0e0 
+   godunov_order    = 4                // order of Goduov slopes (1, 2, or 4)
+   corner_transport = "CORNER_TRANSPORT_1"
+
+   data_problem      = "SPHERE"
+
+   Initial_data {
+      radius            = 2.9   
+      center            = 22.5 , 5.5 
+
+      uval_inside       = 80.0
+      uval_outside      = 5.0
+ 
+   }
+
+   Refinement_data {
+      refine_criteria = "UVAL_GRADIENT", "UVAL_SHOCK"
+ 
+      UVAL_GRADIENT {
+         grad_tol = 10.0
+      }
+ 
+      UVAL_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+   }
+
+  // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "FLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "XFLOW"
+      }
+   }
+
+}
+
+Main {
+   dim = 2
+   base_name = "sphere.2d"
+// log file parameters 
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_sphere2d"
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters
+   restart_interval       = 0         // zero to turn off
+
+}
+
+CartesianGeometry{
+   domain_boxes	= [(0,0),(29,19)]
+
+   x_lo = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up = 30.e0 , 20.e0 // upper end of computational domain.
+
+   periodic_dimension = 1,0
+}
+
+PatchHierarchy {
+   max_levels = 3         // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 4 , 4
+      level_2 = 4 , 4
+      level_3 = 4 , 4
+      level_4 = 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 40 , 40
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 16 , 16 
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm{
+
+   efficiency_tolerance    = 0.85e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.95e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.9e0    // max cfl factor used in problem
+   cfl_init                  = 0.9e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+TimeRefinementIntegrator{
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 25       // max number of simulation timesteps
+
+   tag_buffer = 2,2,2
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/example_inputs/sphere.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/example_inputs/sphere.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,224 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI LinAdv example problem 
+ *
+ ************************************************************************/
+
+LinAdv {
+
+   advection_velocity = 2.0e0 , 1.0e0 , 1.0e0
+   godunov_order    = 2                // order of Goduov slopes (1, 2, or 4)
+   corner_transport = "CORNER_TRANSPORT_1"  
+
+   data_problem      = "SPHERE" 
+
+   Initial_data {
+      radius            = 2.9   
+      center            = 5.5 , 5.5 , 5.5
+
+      uval_inside       = 80.0
+      uval_outside      = 5.0
+ 
+   }
+
+   Refinement_data {
+      refine_criteria = "UVAL_GRADIENT", "UVAL_SHOCK"
+ 
+      UVAL_GRADIENT {
+         grad_tol = 10.0
+      }
+ 
+      UVAL_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "FLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for an edge, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent face has either a FLOW
+      //            or REFLECT condition, the resulting edge boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent faces have either FLOW
+      //            or REFLECT conditions, the resulting node boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+
+   }
+
+}
+
+Main {
+   dim = 2
+   base_name = "sphere.3d"
+// log file parameters 
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_sphere3d"
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+
+// restart dump parameters
+   restart_interval       = 0         // zero to turn off
+
+}
+
+CartesianGeometry{
+   domain_boxes	= [ (0,0,0) , (29,19,19) ]
+
+   x_lo = 0.e0 , 0.e0 , 0.e0    // lower end of computational domain.
+   x_up = 30.e0 , 20.e0 , 20.e0 // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3         // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 2 , 2 , 2
+      level_2 = 2 , 2 , 2
+      level_3 = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 40 , 40 , 40
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 9 , 9 , 9 
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm{
+
+   efficiency_tolerance    = 0.85e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.95e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.9e0    // max cfl factor used in problem
+   cfl_init                  = 0.9e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+TimeRefinementIntegrator{
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 25      // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/example_inputs/sphere_4levels.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/example_inputs/sphere_4levels.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,162 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI LinAdv example problem 
+ *
+ ************************************************************************/
+
+LinAdv {
+
+   advection_velocity = 2.0e0 , 1.0e0 
+   godunov_order    = 4                // order of Goduov slopes (1, 2, or 4)
+   corner_transport = "CORNER_TRANSPORT_1"
+
+   data_problem      = "SPHERE" 
+
+   Initial_data {
+      radius            = 2.9   
+      center            = 22.5 , 5.5 
+
+      uval_inside       = 80.0
+      uval_outside      = 5.0
+ 
+   }
+
+   Refinement_data {
+      refine_criteria = "UVAL_GRADIENT", "UVAL_SHOCK"
+ 
+      UVAL_GRADIENT {
+         grad_tol = 10.0
+      }
+ 
+      UVAL_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+   }
+
+  // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "FLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "XFLOW"
+      }
+   }
+
+}
+
+Main {
+   dim = 2
+   base_name = "sphere_4levels.2d"
+// log file parameters 
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_sphere2d"
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters
+   restart_interval       = 0         // zero to turn off
+}
+
+CartesianGeometry{
+   domain_boxes	= [(0,0),(29,19)]
+
+   x_lo = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up = 30.e0 , 20.e0 // upper end of computational domain.
+
+   periodic_dimension = 1,0
+}
+
+PatchHierarchy {
+   max_levels = 4      // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 2 , 2
+      level_2 = 2 , 2
+      level_3 = 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 40 , 40
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 16 , 16 
+      level_1 = 12 , 12 
+      // all finer levels will use same values as level_1...
+   }
+
+}
+
+GriddingAlgorithm{
+
+   efficiency_tolerance    = 0.85e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.95e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.9e0    // max cfl factor used in problem
+   cfl_init                  = 0.9e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+TimeRefinementIntegrator{
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 25       // max number of simulation timesteps
+
+   tag_buffer = 3,3,3
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/example_inputs/sphere_restart.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/example_inputs/sphere_restart.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,173 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI LinAdv example problem 
+ *
+ ************************************************************************/
+LinAdv {
+
+   advection_velocity = 2.0e0 , 1.0e0 
+   godunov_order    = 4                // order of Goduov slopes (1, 2, or 4)
+   corner_transport = "CORNER_TRANSPORT_1"
+
+   data_problem      = "SPHERE" 
+
+   Initial_data {
+      radius            = 2.9   
+      center            = 22.5 , 5.5 
+
+      uval_inside       = 80.0
+      uval_outside      = 5.0
+ 
+   }
+
+   Refinement_data {
+      refine_criteria = "UVAL_RICHARDSON", "UVAL_GRADIENT", "UVAL_SHOCK"
+ 
+      UVAL_RICHARDSON {
+         rich_tol = 0.1, 0.1, 0.001
+      }
+
+      // UVAL_GRADIENT AND UVAL_SHOCK criteria are applied only if the gradient 
+      // detector is turned on in the StandardTagAndInitialize input below...
+      UVAL_GRADIENT {
+         grad_tol = 10.0
+      }
+ 
+      UVAL_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+   }
+
+  // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "FLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "XFLOW"
+      }
+   }
+
+}
+
+Main {
+   dim = 2
+   base_name = "sphere_restart.2d"
+// log file parameters 
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_sphere2d"
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters
+   restart_interval       = 0         // zero to turn off
+}
+
+CartesianGeometry{
+   domain_boxes	= [(0,0),(29,19)]
+
+   x_lo = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up = 30.e0 , 20.e0 // upper end of computational domain.
+
+   periodic_dimension = 1,0
+}
+
+PatchHierarchy {
+   max_levels = 4         // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 4 , 4
+      level_2 = 2 , 2
+      level_3 = 2 , 2
+      level_4 = 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 40 , 40
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 16 , 16 
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm{
+
+   efficiency_tolerance    = 0.85e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.95e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize {
+//   tagging_method = "GRADIENT_DETECTOR"
+   tagging_method = "RICHARDSON_EXTRAPOLATION"
+//   tagging_method = "RICHARDSON_EXTRAPOLATION", "GRADIENT_DETECTOR"
+//   tagging_method = "REFINE_BOXES"
+//   RefineBoxes {
+//      level_0 = [(15,0),(29,14)]
+//      level_1 = [(65,10),(114,40)]
+//   }
+}
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.9e0    // max cfl factor used in problem
+   cfl_init                  = 0.9e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+TimeRefinementIntegrator{
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 25       // max number of simulation timesteps
+
+   tag_buffer = 2,2,2
+}
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/fortran/const.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/fortran/const.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,17 @@
+      REAL zero,sixth,fourth,third,half,twothird,rt75,one,
+     &  onept5,two,three,pi,four,seven,smallr
+      parameter (zero=0.d0)
+      parameter (sixth=0.16666666666667d0)
+      parameter (fourth=.25d0)
+      parameter (third=.333333333333333d0)
+      parameter (half=.5d0)
+      parameter (twothird=.66666666666667d0)
+      parameter (rt75=.8660254037844d0)
+      parameter (one=1.d0)
+      parameter (onept5=1.5d0)
+      parameter (two=2.d0)
+      parameter (three=3.d0)
+      parameter(pi=3.14159265358979323846d0)
+      parameter (four=4.d0)
+      parameter (seven=7.d0)
+      parameter (smallr=1.0d-32)
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/fortran/flux2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/fortran/flux2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,230 @@
+define(NDIM,2)dnl
+define(NEQU,1)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+include(FORTDIR/m4flux2d.i)dnl
+
+      subroutine fluxcorrec(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  dx,
+     &  advecspeed,uval,
+     &  flux0,flux1,
+     &  trlft0,trlft1,
+     &  trrgt0,trrgt1)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      REAL dt 
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     advecspeed(0:NDIM-1),
+     &     uval(CELL2d(ifirst,ilast,CELLG)),
+     &     flux0(FACE2d0(ifirst,ilast,FLUXG)),
+     &     flux1(FACE2d1(ifirst,ilast,FLUXG)), 
+     &     trlft0(FACE2d0(ifirst,ilast,FACEG)),
+     &     trrgt0(FACE2d0(ifirst,ilast,FACEG)),
+     &     trlft1(FACE2d1(ifirst,ilast,FACEG)),
+     &     trrgt1(FACE2d1(ifirst,ilast,FACEG))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1
+      REAL trnsvers
+     
+c     write(6,*) "In fluxcorrec()"
+c     ******************************************************************
+c     * complete tracing at cell edges
+c     ******************************************************************
+c   correct the 1-direction with 0-fluxes
+c     write(6,*) " correct the 1-direction with 0-fluxes"
+      do ic1=ifirst1-1,ilast1+1
+        do ic0=ifirst0-1,ilast0+1
+          trnsvers= (flux0(ic0+1,ic1)-flux0(ic0,ic1))*0.5/dx(0)
+
+          trrgt1(ic1  ,ic0)= trrgt1(ic1  ,ic0) - trnsvers
+          trlft1(ic1+1,ic0)= trlft1(ic1+1,ic0) - trnsvers
+        enddo
+      enddo
+c     call flush(6)     
+
+c   correct the 0-direction with 1-fluxes
+c     write(6,*) " correct the 0-direction with 1-fluxes"
+      do ic0=ifirst0-1,ilast0+1
+        do ic1=ifirst1-1,ilast1+1
+          trnsvers= (flux1(ic1+1,ic0)-flux1(ic1,ic0))*0.5/dx(1)
+          trrgt0(ic0  ,ic1)= trrgt0(ic0  ,ic1) - trnsvers
+          trlft0(ic0+1,ic1)= trlft0(ic0+1,ic1) - trnsvers
+        enddo
+      enddo
+c     call flush(6)     
+      return
+      end   
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine fluxcalculation2d(dt,extra_cell,visco,dx,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  advecspeed,
+     &  uval,
+     &  flux0,flux1,
+     &  trlft0,trlft1,trrgt0,trrgt1)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,extra_cell,visco
+      REAL dt 
+      REAL 
+     &     dx(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     advecspeed(0:NDIM-1),
+     &     uval(CELL2d(ifirst,ilast,CELLG)),
+c variables in 2d side indexed         
+     &     flux0(FACE2d0(ifirst,ilast,FLUXG)),
+     &     flux1(FACE2d1(ifirst,ilast,FLUXG)), 
+     &     trlft0(FACE2d0(ifirst,ilast,FACEG)),
+     &     trrgt0(FACE2d0(ifirst,ilast,FACEG)),
+     &     trlft1(FACE2d1(ifirst,ilast,FACEG)),
+     &     trrgt1(FACE2d1(ifirst,ilast,FACEG))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ie0,ie1
+      REAL   riemst
+c
+c***********************************************************************
+c solve riemann problems for conservative flux
+c  arguments: ( axis for RP, other axis, extra cells-direction)
+c***********************************************************************
+c      
+c     write(6,*) "In fluxcalculation2d(",extra_cell,")"
+c     write(6,*) "ifirst0,ilast0,ifirst1,ilast1,extra_cell",
+c    &       ifirst0,ilast0,ifirst1,ilast1,extra_cell
+
+riemann_solve(0,1,extra_cell)dnl
+c
+riemann_solve(1,0,extra_cell)dnl
+
+      if (visco.eq.1) then
+      write(6,*) "doing artificial viscosity"
+c
+crtificial_viscosity1(0,1)dnl
+c
+crtificial_viscosity1(1,0)dnl
+c
+      endif
+c     call flush(6)     
+      return
+      end 
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+  
+      subroutine consdiff2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  dx,
+     &  flux0,flux1,
+     &  advecspeed,uval)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+      integer ifirst0, ilast0,ifirst1, ilast1
+      REAL dx(0:NDIM-1)
+      REAL
+     &     flux0(FACE2d0(ifirst,ilast,FLUXG)),
+     &     flux1(FACE2d1(ifirst,ilast,FLUXG)),
+     &     advecspeed(0:NDIM-1),
+     &     uval(CELL2d(ifirst,ilast,CELLG))
+c
+      integer ic0,ic1
+      
+c***********************************************************************
+c update velocity to full time
+c note the reversal of indices in 2nd coordinate direction
+c***********************************************************************
+c***********************************************************************
+c     write(6,*) "at top of consdiff2d"
+c         call flush(6)
+c     write(6,*) "flux0"
+c     do  ic1=ifirst1,ilast1
+c       do  ic0=ifirst0,ilast0+1
+c         write(6,*) "ic0,flux0= ",ic0,ic1,
+c    &			flux0(ic0,ic1,1),flux0(ic0,ic1,2),
+c    &                  flux0(ic0,ic1,3),flux0(ic0,ic1,4)
+c         call flush(6)
+c       enddo
+c     enddo
+c     write(6,*) "flux1"
+c     do  ic1=ifirst1,ilast1
+c       do  ic0=ifirst0,ilast0+1
+c         write(6,*) "ic0,flux1= ",ic0,ic1,
+c    &			flux1(ic0,ic1,1),flux1(ic0,ic1,2),
+c    &                  flux1(ic0,ic1,3),flux1(ic0,ic1,4)
+c         call flush(6)
+c       enddo
+c     enddo
+c     do  ic1=ifirst1,ilast1
+c       do  ic0=ifirst0,ilast0
+c         write(6,*) "ic0,ic1,all = ",ic0,ic1,
+c    &                        density(ic0,ic1),
+c    &                        velocity(ic0,ic1,1),velocity(ic0,ic1,2),
+c    &                        pressure(ic0,ic1)
+c         call flush(6)
+c       enddo
+c     enddo
+c***********************************************************************
+      do ic1=ifirst1,ilast1
+        do ic0=ifirst0,ilast0
+          uval(ic0,ic1) = uval(ic0,ic1)
+     &          -(flux0(ic0+1,ic1)-flux0(ic0,ic1))/dx(0)
+     &          -(flux1(ic1+1,ic0)-flux1(ic1,ic0))/dx(1)
+        enddo
+      enddo
+c***********************************************************************
+c     write(6,*) "in consdiff2d"
+c     do  ic1=ifirst1,ilast1+1
+c       do  ic0=ifirst0,ilast0+1
+c         write(6,*) "ic0,ic1,flux0= ",ic0,ic1,
+c    &                        flux0(ic0,ic1,1),flux0(ic0,ic1,2),
+c    &                        flux0(ic0,ic1,3),flux0(ic0,ic1,4) 
+c         call flush(6)
+c       enddo
+c     enddo
+c     do  ic1=ifirst1,ilast1+1
+c       do  ic0=ifirst0,ilast0+1
+c         write(6,*) "ic0,ic1,flux1= ",ic0,ic1,
+c    &                        flux1(ic0,ic1,1),flux1(ic0,ic1,2),
+c    &                        flux1(ic0,ic1,3),flux1(ic0,ic1,4) 
+c         call flush(6)
+c       enddo
+c     enddo
+c***********************************************************************
+c***********************************************************************
+c     do  ic1=ifirst1,ilast1
+c       do  ic0=ifirst0,ilast0
+c         write(6,*) "ic0,ic1,all = ",ic0,ic1,
+c    &                        density(ic0,ic1),
+c    &                        velocity(ic0,ic1,1),velocity(ic0,ic1,2),
+c    &                        momentum(ic0,ic1,1),momentum(ic0,ic1,2),
+c    &                        pressure(ic0,ic1),
+c    &                        energy(ic0,ic1)
+c         call flush(6)
+c       enddo
+c     enddo
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/fortran/flux3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/fortran/flux3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,261 @@
+define(NDIM,3)dnl
+define(NEQU,1)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+include(FORTDIR/m4flux3d.i)dnl
+
+      subroutine fluxcorrec2d(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  dx,advecspeed,idir,
+     &  uval,
+     &  flux0,flux1,flux2,
+     &  tracelft0,tracelft1,tracelft2,
+     &  tracergt0,tracergt1,tracergt2,
+     &  ttracelft0,ttracelft1,ttracelft2,
+     &  ttracergt0,ttracergt1,ttracergt2)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL dt 
+      integer idir
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     advecspeed(0:NDIM-1),
+     &     uval(CELL3d(ifirst,ilast,CELLG)),
+c
+     &     flux0(FACE3d0(ifirst,ilast,FLUXG)),
+     &     flux1(FACE3d1(ifirst,ilast,FLUXG)), 
+     &     flux2(FACE3d2(ifirst,ilast,FLUXG)), 
+c
+     &     tracelft0(FACE3d0(ifirst,ilast,FACEG)),
+     &     tracelft1(FACE3d1(ifirst,ilast,FACEG)),
+     &     tracelft2(FACE3d2(ifirst,ilast,FACEG)),
+     &     tracergt0(FACE3d0(ifirst,ilast,FACEG)),
+     &     tracergt1(FACE3d1(ifirst,ilast,FACEG)),
+     &     tracergt2(FACE3d2(ifirst,ilast,FACEG)),
+c
+     &     ttracelft0(FACE3d0(ifirst,ilast,FACEG)),
+     &     ttracelft1(FACE3d1(ifirst,ilast,FACEG)),
+     &     ttracelft2(FACE3d2(ifirst,ilast,FACEG)),
+     &     ttracergt0(FACE3d0(ifirst,ilast,FACEG)),
+     &     ttracergt1(FACE3d1(ifirst,ilast,FACEG)),
+     &     ttracergt2(FACE3d2(ifirst,ilast,FACEG)) 
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2
+      REAL trnsvers
+     
+c     ******************************************************************
+c     * complete tracing at cell edges
+c     ******************************************************************
+c         
+c
+c  "Forward" computation of transverse flux terms
+c
+      if (idir.eq.1) then
+c
+correc_flux2d(0,`ic1,ic2',1,`ic2,ic0',2)dnl
+c
+correc_flux2d(1,`ic2,ic0',0,`ic1,ic2',2)dnl
+c
+correc_flux2d(2,`ic0,ic1',0,`ic1,ic2',1)dnl
+c
+c  "Backward" computation of transverse flux terms
+c
+      elseif (idir.eq.-1) then
+c
+correc_flux2d(0,`ic1,ic2',2,`ic0,ic1',1)dnl
+c
+correc_flux2d(1,`ic2,ic0',2,`ic0,ic1',0)dnl
+c
+correc_flux2d(2,`ic0,ic1',1,`ic2,ic0',0)dnl
+c
+      endif
+c
+      return
+      end   
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine fluxcorrec3d(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  dx,
+     &  advecspeed,uval,
+     &  fluxa0,fluxa1,fluxa2,
+     &  fluxb0,fluxb1,fluxb2,
+     &  tracelft0,tracelft1,tracelft2,
+     &  tracergt0,tracergt1,tracergt2)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL dt 
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     advecspeed(0:NDIM-1),
+     &     uval(CELL3d(ifirst,ilast,CELLG)),
+     &     fluxa0(FACE3d0(ifirst,ilast,FLUXG)),
+     &     fluxa1(FACE3d1(ifirst,ilast,FLUXG)), 
+     &     fluxa2(FACE3d2(ifirst,ilast,FLUXG)), 
+     &     fluxb0(FACE3d0(ifirst,ilast,FLUXG)),
+     &     fluxb1(FACE3d1(ifirst,ilast,FLUXG)), 
+     &     fluxb2(FACE3d2(ifirst,ilast,FLUXG)), 
+     &     tracelft0(FACE3d0(ifirst,ilast,FACEG)),
+     &     tracergt0(FACE3d0(ifirst,ilast,FACEG)),
+     &     tracelft1(FACE3d1(ifirst,ilast,FACEG)),
+     &     tracergt1(FACE3d1(ifirst,ilast,FACEG)),
+     &     tracelft2(FACE3d2(ifirst,ilast,FACEG)),
+     &     tracergt2(FACE3d2(ifirst,ilast,FACEG))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2
+      REAL trnsvers
+     
+c     ******************************************************************
+c     * complete tracing at cell edges
+c     ******************************************************************
+c         
+correc_flux3d(2,0,1,a0,a1,`ic1,ic2',`ic2,ic0')dnl
+c         
+correc_flux3d(1,2,0,a2,b0,`ic0,ic1',`ic1,ic2')dnl
+c         
+correc_flux3d(0,1,2,b1,b2,`ic2,ic0',`ic0,ic1')dnl
+c   
+c      call flush(6)     
+      return
+      end   
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine fluxcalculation3d(dt,xcell0,xcell1,visco,dx,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  advecspeed,
+     &  uval,
+     &  flux0,flux1,flux2,
+     &  trlft0,trlft1,trlft2,
+     &  trrgt0,trrgt1,trrgt2)
+     
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer xcell0,xcell1,visco
+      REAL dt 
+      REAL 
+     &     dx(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     advecspeed(0:NDIM-1),
+     &     uval(CELL3d(ifirst,ilast,CELLG))
+c variables in 2d side indexed         
+      REAL
+     &     flux0(FACE3d0(ifirst,ilast,FLUXG)),
+     &     flux1(FACE3d1(ifirst,ilast,FLUXG)), 
+     &     flux2(FACE3d2(ifirst,ilast,FLUXG)), 
+     &     trlft0(FACE3d0(ifirst,ilast,FACEG)),
+     &     trrgt0(FACE3d0(ifirst,ilast,FACEG)),
+     &     trlft1(FACE3d1(ifirst,ilast,FACEG)),
+     &     trrgt1(FACE3d1(ifirst,ilast,FACEG)),
+     &     trlft2(FACE3d2(ifirst,ilast,FACEG)),
+     &     trrgt2(FACE3d2(ifirst,ilast,FACEG))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2,ie0,ie1,ie2
+      REAL   riemst
+c
+c***********************************************************************
+c solve riemann problems for conservative flux
+c  arguments: ( axis for RP, other axis, extra cells-direction)
+c***********************************************************************
+c      
+
+riemann_solve(0,1,2,`ic1,ic2',xcell0,xcell1)dnl
+
+c
+riemann_solve(1,0,2,`ic2,ic0',xcell0,xcell1)dnl
+
+c
+riemann_solve(2,0,1,`ic0,ic1',xcell0,xcell1)dnl
+
+      if (visco.eq.1) then
+      write(6,*) "doing artificial viscosity"
+c
+crtificial_viscosity1(0,1,2)dnl
+c
+crtificial_viscosity1(1,2,0)dnl
+c
+crtificial_viscosity1(2,0,1)dnl
+c
+      endif
+c      call flush(6)     
+      return
+      end 
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+  
+      subroutine consdiff3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  dx,
+     &  flux0,flux1,flux2,
+     &  advecspeed,uval)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+      integer ifirst0, ilast0,ifirst1, ilast1,ifirst2,ilast2
+      REAL dx(0:NDIM-1)
+      REAL
+     &     flux0(FACE3d0(ifirst,ilast,FLUXG)),
+     &     flux1(FACE3d1(ifirst,ilast,FLUXG)),
+     &     flux2(FACE3d2(ifirst,ilast,FLUXG)),
+     &     advecspeed(0:NDIM-1),
+     &     uval(CELL3d(ifirst,ilast,CELLG))
+c
+      integer ic0,ic1,ic2
+      
+c***********************************************************************
+c update velocity to full time
+c note the reversal of indices in 2nd coordinate direction
+c***********************************************************************
+c***********************************************************************
+      do ic2=ifirst2,ilast2
+         do ic1=ifirst1,ilast1
+           do ic0=ifirst0,ilast0
+             uval(ic0,ic1,ic2) = uval(ic0,ic1,ic2)
+     &          -(flux0(ic0+1,ic1,ic2)-flux0(ic0,ic1,ic2))/dx(0)
+     &          -(flux1(ic1+1,ic2,ic0)-flux1(ic1,ic2,ic0))/dx(1)
+     &          -(flux2(ic2+1,ic0,ic1)-flux2(ic2,ic0,ic1))/dx(2)
+           enddo
+         enddo
+      enddo
+      return
+      end
+c***********************************************************************
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/fortran/fluxcorner3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/fortran/fluxcorner3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,168 @@
+include(FORTDIR/m4fluxjt.i)dnl
+
+      subroutine onethirdstates(dt,dx,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  advecspeed,uval,
+     &  flux0,flux1,flux2,
+     &  st3_0,st3_1,st3_2)
+c***********************************************************************
+include(FORTDIR/const.i)dnl
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL dt 
+c variables in 1d axis indexed
+c
+      REAL dx(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     advecspeed(0:NDIM-1),
+     &     uval(CELL3d(ifirst,ilast,CELLG)),
+     &     flux0(FACE3d0(ifirst,ilast,FLUXG)),
+     &     flux1(FACE3d1(ifirst,ilast,FLUXG)),
+     &     flux2(FACE3d2(ifirst,ilast,FLUXG)),
+     &     st3_0(CELL3d(ifirst,ilast,CELLG)),
+     &     st3_1(CELL3d(ifirst,ilast,CELLG)),
+     &     st3_2(CELL3d(ifirst,ilast,CELLG))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2
+      REAL trnsvers
+     
+c     ******************************************************************
+c     * complete tracing at cell edges
+c     ******************************************************************
+c         
+st_third(0,1,2,`ic1,ic2')dnl
+c
+st_third(1,2,0,`ic2,ic0')dnl
+c
+st_third(2,0,1,`ic0,ic1')dnl
+c
+      return
+      end   
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine fluxthird(dt,dx,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  advecspeed,
+     &  uval,
+     &  st3_0,st3_1,st3_2,
+     &  flux01,flux12,flux20,
+     &  flux02,flux10,flux21)
+     
+c***********************************************************************
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL dt 
+      REAL 
+     &     dx(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     advecspeed(0:NDIM-1),
+     &     uval(CELL3d(ifirst,ilast,CELLG))
+c variables in 2d side indexed         
+      REAL
+     &     flux01(FACE3d0(ifirst,ilast,FLUXG)),
+     &     flux10(FACE3d1(ifirst,ilast,FLUXG)),
+     &     flux20(FACE3d2(ifirst,ilast,FLUXG)),
+     &     flux02(FACE3d0(ifirst,ilast,FLUXG)),
+     &     flux12(FACE3d1(ifirst,ilast,FLUXG)),
+     &     flux21(FACE3d2(ifirst,ilast,FLUXG)),
+     &       st3_0(CELL3d(ifirst,ilast,CELLG)),
+     &       st3_1(CELL3d(ifirst,ilast,CELLG)),
+     &       st3_2(CELL3d(ifirst,ilast,CELLG))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2
+      REAL   riemst
+c
+c***********************************************************************
+c solve riemann problems for conservative flux
+c  arguments: ( axis for RP, other axis, extra cells-direction)
+c***********************************************************************
+c      
+
+f_third(0,1,2,`ic1,ic2',`ic0-1,ic1,ic2')dnl
+c
+f_third(0,2,1,`ic1,ic2',`ic0-1,ic1,ic2')dnl
+c
+f_third(1,0,2,`ic2,ic0',`ic0,ic1-1,ic2')dnl
+c
+f_third(1,2,0,`ic2,ic0',`ic0,ic1-1,ic2')dnl
+c
+f_third(2,0,1,`ic0,ic1',`ic0,ic1,ic2-1')dnl
+c
+f_third(2,1,0,`ic0,ic1',`ic0,ic1,ic2-1')dnl
+c
+c      call flush(6)     
+      return
+      end 
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine fluxcorrecjt(dt,dx,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  advecspeed,uval,
+     &  flux01,flux12,flux20,
+     &  flux02,flux10,flux21,
+     &  tracelft0,tracelft1,tracelft2,
+     &  tracergt0,tracergt1,tracergt2)
+c***********************************************************************
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL dt 
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:3-1)
+c variables in 2d cell indexed         
+      REAL
+     &     advecspeed(0:NDIM-1),
+     &     uval(CELL3d(ifirst,ilast,CELLG)),
+     &     flux01(FACE3d0(ifirst,ilast,FLUXG)),
+     &     flux10(FACE3d1(ifirst,ilast,FLUXG)),
+     &     flux20(FACE3d2(ifirst,ilast,FLUXG)),
+     &     flux02(FACE3d0(ifirst,ilast,FLUXG)),
+     &     flux12(FACE3d1(ifirst,ilast,FLUXG)),
+     &     flux21(FACE3d2(ifirst,ilast,FLUXG)),
+     &     tracelft0(FACE3d0(ifirst,ilast,FACEG)),
+     &     tracergt0(FACE3d0(ifirst,ilast,FACEG)),
+     &     tracelft1(FACE3d1(ifirst,ilast,FACEG)),
+     &     tracergt1(FACE3d1(ifirst,ilast,FACEG)),
+     &     tracelft2(FACE3d2(ifirst,ilast,FACEG)),
+     &     tracergt2(FACE3d2(ifirst,ilast,FACEG))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2
+      REAL trnsvers
+c     REAL ttvlft,ttvrgt     
+     
+c     ******************************************************************
+c     * complete tracing at cell edges
+c     ******************************************************************
+c         
+correc_fluxjt(2,0,1,`ic1,ic2',`ic2,ic0')dnl
+c
+correc_fluxjt(1,2,0,`ic0,ic1',`ic1,ic2')dnl
+c
+correc_fluxjt(0,1,2,`ic2,ic0',`ic0,ic1')dnl
+c
+c      call flush(6)     
+      return
+      end   
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/fortran/fluxcorner3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/fortran/fluxcorner3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,187 @@
+define(NDIM,3)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+include(FORTDIR/m4fluxcorner3d.i)dnl
+
+      subroutine onethirdstate3d(dt,dx,idir,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  advecspeed,uval,
+     &  flux0,flux1,flux2,
+     &  st3)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************     
+c input arrays:
+      integer idir,ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL dt 
+c variables in 1d axis indexed
+c
+      REAL dx(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     advecspeed(0:NDIM-1),
+     &     uval(CELL3d(ifirst,ilast,CELLG)),
+     &     flux0(FACE3d0(ifirst,ilast,FLUXG)),
+     &     flux1(FACE3d1(ifirst,ilast,FLUXG)),
+     &     flux2(FACE3d2(ifirst,ilast,FLUXG)),
+     &     st3(CELL3d(ifirst,ilast,CELLG))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2
+      REAL trnsvers
+     
+c     ******************************************************************
+c     * complete tracing at cell edges
+c     ******************************************************************
+c         
+      if (idir.eq.0) then
+c
+st_third(0,1,2,`ic1,ic2')dnl
+c
+      elseif (idir.eq.1) then
+c
+st_third(1,2,0,`ic2,ic0')dnl
+c
+      elseif (idir.eq.2) then
+c
+st_third(2,0,1,`ic0,ic1')dnl
+c
+      endif
+      return
+      end   
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine fluxthird3d(dt,dx,idir,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  advecspeed,
+     &  uval,
+     &  st3,
+     &  flux0,flux1,flux2)
+     
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer idir,ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL dt 
+      REAL 
+     &     dx(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     advecspeed(0:NDIM-1),
+     &     uval(CELL3d(ifirst,ilast,CELLG))
+c variables in 2d side indexed         
+      REAL
+     &     flux0(FACE3d0(ifirst,ilast,FLUXG)),
+     &     flux1(FACE3d1(ifirst,ilast,FLUXG)),
+     &     flux2(FACE3d2(ifirst,ilast,FLUXG)),
+     &     st3(CELL3d(ifirst,ilast,CELLG)) 
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2
+      REAL   riemst
+c
+c***********************************************************************
+c solve riemann problems for conservative flux
+c  arguments: ( axis for RP, other axis, extra cells-direction)
+c***********************************************************************
+c      
+      if (idir.eq.0) then
+c
+f_third(1,0,2,`ic2,ic0',`ic0,ic1-1,ic2')dnl
+c
+f_third(2,0,1,`ic0,ic1',`ic0,ic1,ic2-1')dnl
+c
+      elseif (idir.eq.1) then
+c
+f_third(0,1,2,`ic1,ic2',`ic0-1,ic1,ic2')dnl
+c
+f_third(2,1,0,`ic0,ic1',`ic0,ic1,ic2-1')dnl
+c
+      elseif (idir.eq.2) then
+c
+f_third(1,2,0,`ic2,ic0',`ic0,ic1-1,ic2')dnl
+c
+f_third(0,2,1,`ic1,ic2',`ic0-1,ic1,ic2')dnl
+c
+      endif
+c
+c      call flush(6)     
+      return
+      end 
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine fluxcorrecjt3d(dt,dx,idir,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  advecspeed,uval,
+     &  flux0,flux1,flux2,
+     &  tracelft0,tracelft1,tracelft2,
+     &  tracergt0,tracergt1,tracergt2)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer idir,ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL dt 
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:3-1)
+c variables in 2d cell indexed         
+      REAL
+     &     advecspeed(0:NDIM-1),
+     &     uval(CELL3d(ifirst,ilast,CELLG)),
+     &     flux0(FACE3d0(ifirst,ilast,FLUXG)),
+     &     flux1(FACE3d1(ifirst,ilast,FLUXG)),
+     &     flux2(FACE3d2(ifirst,ilast,FLUXG)),
+     &     tracelft0(FACE3d0(ifirst,ilast,FACEG)),
+     &     tracergt0(FACE3d0(ifirst,ilast,FACEG)),
+     &     tracelft1(FACE3d1(ifirst,ilast,FACEG)),
+     &     tracergt1(FACE3d1(ifirst,ilast,FACEG)),
+     &     tracelft2(FACE3d2(ifirst,ilast,FACEG)),
+     &     tracergt2(FACE3d2(ifirst,ilast,FACEG))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2
+      REAL trnsvers
+c     REAL ttvlft,ttvrgt     
+     
+c     ******************************************************************
+c     * complete tracing at cell edges
+c     ******************************************************************
+c         
+      if (idir.eq.0) then
+c
+correc_fluxjt(0,2,1,`ic2,ic0',`ic0,ic1')dnl
+c
+      elseif (idir.eq.1) then
+c
+correc_fluxjt(1,0,2,`ic0,ic1',`ic1,ic2')dnl
+c
+      elseif (idir.eq.2) then
+c
+correc_fluxjt(2,1,0,`ic1,ic2',`ic2,ic0')dnl
+c
+      endif
+c
+c      call flush(6)     
+      return
+      end   
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/fortran/grad2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/fortran/grad2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,212 @@
+define(NDIM,2)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+
+      subroutine detectgrad2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  vghost0,tagghost0,ttagghost0,
+     &  vghost1,tagghost1,ttagghost1,
+     &  dx,
+     &  gradtol,
+     &  dotag,donttag,
+     &  var,
+     &  tags,temptags)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c input arrays:
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  dotag,donttag,
+     &  vghost0,vghost1,
+     &  tagghost0,tagghost1,
+     &  ttagghost0,ttagghost1
+      REAL
+     &  dx(0:NDIM-1),
+     &  gradtol
+c variables indexed as 2dimensional
+      REAL
+     &  var(CELL2dVECG(ifirst,ilast,vghost))
+      integer
+     &  tags(CELL2dVECG(ifirst,ilast,tagghost)),
+     &  temptags(CELL2dVECG(ifirst,ilast,ttagghost))
+c
+      REAL tol
+      REAL facejump, loctol
+      REAL presm1,presp1,diag01
+      logical tagcell
+      integer ic0,ic1
+c
+c***********************************************************************
+c
+      tol = gradtol
+      diag01 = sqrt(dx(0)**2+dx(1)**2)
+
+      do ic1=ifirst1,ilast1
+        do ic0=ifirst0,ilast0
+
+          if (tags(ic0,ic1) .ne. 0) then
+            loctol = 0.125*tol
+          else 
+            loctol = tol
+          endif
+   
+          tagcell = .false.
+
+          presm1 = var(ic0-1,ic1)
+          presp1 = var(ic0+1,ic1)
+          facejump = abs(var(ic0,ic1)-presm1)
+          facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+          tagcell = ((facejump).gt.(loctol*dx(0)))
+          if (.not.tagcell) then
+            presm1 = var(ic0,ic1-1)
+            presp1 = var(ic0,ic1+1)
+            facejump = abs(var(ic0,ic1)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+            tagcell = ((facejump).gt.(loctol*dx(1)))
+          endif
+
+          if (.not.tagcell) then
+            presm1 = var(ic0-1,ic1-1)
+            presp1 = var(ic0+1,ic1+1)
+            facejump = abs(var(ic0,ic1)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+            tagcell = ((facejump).gt.(loctol*diag01))
+          endif
+          if (.not.tagcell) then
+            presm1 = var(ic0-1,ic1+1)
+            presp1 = var(ic0+1,ic1-1)
+            facejump = abs(var(ic0,ic1)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+            tagcell = ((facejump).gt.(loctol*diag01))
+          endif
+
+          if ( tagcell ) then
+            temptags(ic0,ic1) = dotag
+          endif
+        enddo
+      enddo
+      return
+      end
+
+      subroutine detectshock2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  vghost0,tagghost0,ttagghost0,
+     &  vghost1,tagghost1,ttagghost1,
+     &  dx,
+     &  gradtol,gradonset,
+     &  dotag,donttag,
+     &  var,
+     &  tags,temptags)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c input arrays:
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  dotag,donttag,
+     &  vghost0,vghost1,
+     &  tagghost0,tagghost1,
+     &  ttagghost0,ttagghost1
+      REAL
+     &  dx(0:NDIM-1),
+     &  gradtol,gradonset
+c variables indexed as 2dimensional
+      REAL
+     &  var(CELL2dVECG(ifirst,ilast,vghost))
+      integer
+     &  tags(CELL2dVECG(ifirst,ilast,tagghost)),
+     &  temptags(CELL2dVECG(ifirst,ilast,ttagghost))
+c
+      REAL tol,onset
+      REAL jump1, jump2, facejump, loctol,locon
+      REAL presm1,presm2,presp1,presp2
+      REAL diag01 
+      logical tagcell
+      integer ic0,ic1
+c
+c***********************************************************************
+c
+      tol = gradtol
+      onset = gradonset
+      diag01 = sqrt(dx(0)**2+dx(1)**2)
+
+      do ic1=ifirst1,ilast1
+        do ic0=ifirst0,ilast0
+
+          if (tags(ic0,ic1) .ne. 0) then
+            loctol = 0.125*tol
+            locon = 0.66*onset
+          else 
+            loctol = tol
+            locon = onset
+          endif
+   
+          tagcell = .false.
+
+          presm1 = var(ic0-1,ic1)
+          presm2 = var(ic0-2,ic1)
+          presp1 = var(ic0+1,ic1)
+          presp2 = var(ic0+2,ic1)
+          jump2 = presp2-presm2
+          jump1 = presp1-presm1
+          facejump = abs(var(ic0,ic1)-presm1)
+          facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+          tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                ((jump1*jump2).lt.zero)).and.
+     &               ((facejump).gt.(loctol*dx(0))))
+          if (.not.tagcell) then
+            presm1 = var(ic0,ic1-1)
+            presm2 = var(ic0,ic1-2)
+            presp1 = var(ic0,ic1+1)
+            presp2 = var(ic0,ic1+2)
+            jump2 = presp2-presm2
+            jump1 = presp1-presm1
+            facejump = abs(var(ic0,ic1)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+            tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                ((jump1*jump2).lt.zero)).and.
+     &               ((facejump).gt.(loctol*dx(1)))) 
+          endif
+
+          if (.not.tagcell) then
+            presm1 = var(ic0-1,ic1-1)
+            presp1 = var(ic0+1,ic1+1)
+            presm2 = var(ic0-2,ic1-2)
+            presp2 = var(ic0+2,ic1+2)
+            jump1 = presp1-presm1
+            jump2 = presp2-presm2
+            facejump = abs(var(ic0,ic1)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+            tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag01)))
+          endif
+          if (.not.tagcell) then
+            presm1 = var(ic0-1,ic1+1)
+            presp1 = var(ic0+1,ic1-1)
+            presm2 = var(ic0-2,ic1+2)
+            presp2 = var(ic0+2,ic1-2)
+            jump1 = presp1-presm1
+            jump2 = presp2-presm2
+            facejump = abs(var(ic0,ic1)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+            tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag01)))
+          endif
+
+          if ( tagcell ) then
+            temptags(ic0,ic1) = dotag
+          endif
+        enddo
+      enddo
+      return
+      end
+
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/fortran/grad3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/fortran/grad3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,423 @@
+define(NDIM,3)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine detectgrad3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  vghost0,tagghost0,ttagghost0,
+     &  vghost1,tagghost1,ttagghost1,
+     &  vghost2,tagghost2,ttagghost2,
+     &  dx,
+     &  gradtol,
+     &  dotag,donttag,
+     &  var,
+     &  tags,temptags)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c input arrays:
+      integer
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  dotag,donttag,
+     &  vghost0,vghost1,vghost2,
+     &  tagghost0,tagghost1,tagghost2,
+     &  ttagghost0,ttagghost1,ttagghost2
+      REAL
+     &  dx(0:NDIM-1),
+     &  gradtol
+c variables indexed as 3dimensional
+      REAL
+     &  var(CELL3dVECG(ifirst,ilast,vghost))
+      integer
+     &  tags(CELL3dVECG(ifirst,ilast,tagghost)),
+     &  temptags(CELL3dVECG(ifirst,ilast,ttagghost))
+c
+      REAL tol
+      REAL facejump, loctol
+      REAL presm1,presp1
+      REAL diag(0:NDIM-1),diag012 
+      logical tagcell
+      integer ic0,ic1,ic2
+c
+c***********************************************************************
+c
+      tol = gradtol
+      diag(0) = sqrt(dx(2)**2+dx(1)**2)
+      diag(1) = sqrt(dx(0)**2+dx(2)**2)
+      diag(2) = sqrt(dx(0)**2+dx(1)**2)
+      diag012= sqrt(dx(0)**2+dx(1)**2+dx(2)**2)
+
+      do ic2=ifirst2,ilast2
+        do ic1=ifirst1,ilast1
+          do ic0=ifirst0,ilast0
+
+            if (tags(ic0,ic1,ic2) .ne. 0) then
+              loctol = 0.125*tol
+            else 
+              loctol = tol
+            endif
+     
+            tagcell = .false.
+  
+            presm1 = var(ic0-1,ic1,ic2)
+            presp1 = var(ic0+1,ic1,ic2)
+            facejump = abs(var(ic0,ic1,ic2)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+            tagcell = ((facejump).gt.(loctol*dx(0)))
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1-1,ic2)
+              presp1 = var(ic0,ic1+1,ic2)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*dx(1)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1,ic2-1)
+              presp1 = var(ic0,ic1,ic2+1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*dx(2)))
+            endif
+
+
+c   2Dimensional diagonals
+
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1-1,ic2-1)
+              presp1 = var(ic0,ic1+1,ic2+1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag(0)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1+1,ic2-1)
+              presp1 = var(ic0,ic1-1,ic2+1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag(0)))
+            endif
+  
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1,ic2-1)
+              presp1 = var(ic0+1,ic1,ic2+1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag(1)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1,ic2+1)
+              presp1 = var(ic0+1,ic1,ic2-1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag(1)))
+            endif
+
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1-1,ic2)
+              presp1 = var(ic0+1,ic1+1,ic2)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag(2)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1+1,ic2)
+              presp1 = var(ic0+1,ic1-1,ic2)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag(2)))
+            endif
+
+c   End 2Dimensional diagonals
+c   3Dimensional diagonals
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1-1,ic2-1)
+              presp1 = var(ic0+1,ic1+1,ic2+1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag012))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1-1,ic2+1)
+              presp1 = var(ic0+1,ic1+1,ic2-1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag012))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1+1,ic2-1)
+              presp1 = var(ic0+1,ic1-1,ic2+1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag012))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1+1,ic2+1)
+              presp1 = var(ic0+1,ic1-1,ic2-1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag012))
+            endif
+
+c   End 3Dimensional diagonals
+
+            if ( tagcell ) then
+              temptags(ic0,ic1,ic2) = dotag
+            endif
+          enddo
+        enddo
+      enddo
+      return
+      end
+
+      subroutine detectshock3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  vghost0,tagghost0,ttagghost0,
+     &  vghost1,tagghost1,ttagghost1,
+     &  vghost2,tagghost2,ttagghost2,
+     &  dx,
+     &  gradtol,gradonset,
+     &  dotag,donttag,
+     &  var,
+     &  tags,temptags)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c input arrays:
+      integer
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  dotag,donttag,
+     &  vghost0,vghost1,vghost2,
+     &  tagghost0,tagghost1,tagghost2,
+     &  ttagghost0,ttagghost1,ttagghost2
+      REAL
+     &  dx(0:NDIM-1),
+     &  gradtol,gradonset
+c variables indexed as 3dimensional
+      REAL
+     &  var(CELL3dVECG(ifirst,ilast,vghost))
+      integer
+     &  tags(CELL3dVECG(ifirst,ilast,tagghost)),
+     &  temptags(CELL3dVECG(ifirst,ilast,ttagghost))
+c
+      REAL tol,onset
+      REAL jump1, jump2, facejump, loctol,locon
+      REAL presm1,presm2,presp1,presp2
+      REAL diag(0:NDIM-1),diag012 
+      logical tagcell
+      integer ic0,ic1,ic2
+c
+c***********************************************************************
+c
+      tol = gradtol
+      onset = gradonset
+      diag(0) = sqrt(dx(2)**2+dx(1)**2)
+      diag(1) = sqrt(dx(0)**2+dx(2)**2)
+      diag(2) = sqrt(dx(0)**2+dx(1)**2)
+      diag012= sqrt(dx(0)**2+dx(1)**2+dx(2)**2)
+
+      do ic2=ifirst2,ilast2
+        do ic1=ifirst1,ilast1
+          do ic0=ifirst0,ilast0
+
+            if (tags(ic0,ic1,ic2) .ne. 0) then
+              loctol = 0.125*tol
+              locon = 0.66*onset
+            else 
+              loctol = tol
+              locon = onset
+            endif
+     
+            tagcell = .false.
+  
+            presm1 = var(ic0-1,ic1,ic2)
+            presm2 = var(ic0-2,ic1,ic2)
+            presp1 = var(ic0+1,ic1,ic2)
+            presp2 = var(ic0+2,ic1,ic2)
+            jump2 = presp2-presm2
+            jump1 = presp1-presm1
+            facejump = abs(var(ic0,ic1,ic2)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+            tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                ((jump1*jump2).lt.zero)).and.
+     &               ((facejump).gt.(loctol*dx(0))))
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1-1,ic2)
+              presm2 = var(ic0,ic1-2,ic2)
+              presp1 = var(ic0,ic1+1,ic2)
+              presp2 = var(ic0,ic1+2,ic2)
+              jump2 = presp2-presm2
+              jump1 = presp1-presm1
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                    ((jump1*jump2).lt.zero)).and.
+     &                   ((facejump).gt.(loctol*dx(1)))) 
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1,ic2-1)
+              presm2 = var(ic0,ic1,ic2-2)
+              presp1 = var(ic0,ic1,ic2+1)
+              presp2 = var(ic0,ic1,ic2+2)
+              jump2 = presp2-presm2
+              jump1 = presp1-presm1
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*dx(2)))) 
+            endif
+
+
+c   2Dimensional diagonals
+
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1-1,ic2-1)
+              presp1 = var(ic0,ic1+1,ic2+1)
+              presm2 = var(ic0,ic1-2,ic2-2)
+              presp2 = var(ic0,ic1+2,ic2+2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                    ((jump1*jump2).lt.zero)).and.
+     &                   ((facejump).gt.(loctol*diag(0))))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1+1,ic2-1)
+              presp1 = var(ic0,ic1-1,ic2+1)
+              presm2 = var(ic0,ic1+2,ic2-2)
+              presp2 = var(ic0,ic1-2,ic2+2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                    ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag(0))))
+            endif
+  
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1,ic2-1)
+              presp1 = var(ic0+1,ic1,ic2+1)
+              presm2 = var(ic0-2,ic1,ic2-2)
+              presp2 = var(ic0+2,ic1,ic2+2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag(1))))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1,ic2+1)
+              presp1 = var(ic0+1,ic1,ic2-1)
+              presm2 = var(ic0-2,ic1,ic2+2)
+              presp2 = var(ic0+2,ic1,ic2-2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                    ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag(1))))
+            endif
+
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1-1,ic2)
+              presp1 = var(ic0+1,ic1+1,ic2)
+              presm2 = var(ic0-2,ic1-2,ic2)
+              presp2 = var(ic0+2,ic1+2,ic2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                    ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag(2))))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1+1,ic2)
+              presp1 = var(ic0+1,ic1-1,ic2)
+              presm2 = var(ic0-2,ic1+2,ic2)
+              presp2 = var(ic0+2,ic1-2,ic2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag(2))))
+            endif
+
+c   End 2Dimensional diagonals
+c   3Dimensional diagonals
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1-1,ic2-1)
+              presp1 = var(ic0+1,ic1+1,ic2+1)
+              presm2 = var(ic0-2,ic1-2,ic2-2)
+              presp2 = var(ic0+2,ic1+2,ic2+2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                   ((facejump).gt.(loctol*diag012)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1-1,ic2+1)
+              presp1 = var(ic0+1,ic1+1,ic2-1)
+              presm2 = var(ic0-2,ic1-2,ic2+2)
+              presp2 = var(ic0+2,ic1+2,ic2-2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag012)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1+1,ic2-1)
+              presp1 = var(ic0+1,ic1-1,ic2+1)
+              presm2 = var(ic0-2,ic1+2,ic2-2)
+              presp2 = var(ic0+2,ic1-2,ic2+2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                   ((facejump).gt.(loctol*diag012)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1+1,ic2+1)
+              presp1 = var(ic0+1,ic1-1,ic2-1)
+              presm2 = var(ic0-2,ic1+2,ic2+2)
+              presp2 = var(ic0+2,ic1-2,ic2-2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag012)))
+            endif
+
+c   End 3Dimensional diagonals
+
+            if ( tagcell ) then
+              temptags(ic0,ic1,ic2) = dotag
+            endif
+          enddo
+        enddo
+      enddo
+      return
+      end
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/fortran/init2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/fortran/init2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,224 @@
+define(NDIM,2)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+      subroutine linadvinit2d(data_problem,dx,xlo,xhi,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  gcw0,gcw1,
+     &  uval,
+     &  nintervals,front,
+     &  i_uval)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer gcw0,gcw1
+      integer data_problem
+      integer nintervals
+      REAL front(1:nintervals)
+      REAL 
+     &     dx(0:NDIM-1),xlo(0:NDIM-1),xhi(0:NDIM-1)
+      REAL
+     &     i_uval(1:nintervals)
+      REAL
+     &     uval(CELL2dVECG(ifirst,ilast,gcw))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,dir,ifr
+      REAL xc(0:NDIM-1)
+c
+c   dir 0 two linear states (L,R) indp of y,z
+c   dir 1 two linear states (L,R) indp of x,z
+
+c     write(6,*) "Inside initplane"
+c     write(6,*) "data_problem= ",data_problem
+c     write(6,*) "dx= ",dx(0), dx(1)
+c     write(6,*) "xlo= ",xlo(0), xlo(1),", xhi = ",xhi(0), xhi(1)
+c     write(6,*) "ifirst, ilast= ",ifirst0,ilast0,"and ",ifirst1,ilast1
+c     call flush(6)
+
+      dir = 0
+      if (data_problem.eq.PIECEWISE_CONSTANT_X) then
+         dir = 0
+      else if (data_problem.eq.PIECEWISE_CONSTANT_Y) then
+         dir = 1
+      endif
+
+      if (dir.eq.0) then
+         ifr = 1
+         do ic0=ifirst0,ilast0
+            xc(0) = xlo(0) + dx(0)*(dble(ic0-ifirst0)+half)
+            if (xc(dir).gt.front(ifr)) then
+              ifr = ifr+1
+            endif
+            do ic1=ifirst1,ilast1
+               uval(ic0,ic1) = i_uval(ifr)
+           enddo
+         enddo
+      else if (dir.eq.1) then
+         ifr = 1
+         do ic1=ifirst1,ilast1
+            xc(1) =xlo(1)+ dx(1)*(dble(ic1-ifirst1)+half)
+            if (xc(dir).gt.front(ifr)) then
+               ifr = ifr+1
+            endif
+            do ic0=ifirst0,ilast0
+               uval(ic0,ic1) = i_uval(ifr)
+           enddo
+         enddo
+      endif
+c
+      return
+      end
+
+c***********************************************************************
+c
+c    Initialization routine where we use a spherical profile 
+c
+c***********************************************************************
+      subroutine initsphere2d(data_problem,dx,xlo,xhi,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  gcw0,gcw1,
+     &  uval,
+     &  i_uval,o_uval,
+     &  center,radius)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer gcw0,gcw1
+      integer data_problem
+      REAL i_uval,o_uval
+      REAL radius,center(0:NDIM-1)
+      REAL 
+     &     dx(0:NDIM-1),xlo(0:NDIM-1),xhi(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     uval(CELL2dVECG(ifirst,ilast,gcw))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1
+      REAL xc(0:NDIM-1),x0,x1
+      REAL angle
+
+c     write(6,*) "in initsphere"
+c     write(6,*) "data_problem= ",data_problem
+c     write(6,*) "dx = ",(dx(i),i=0,NDIM-1)
+c     write(6,*) "xlo = ",(xlo(i),i=0,NDIM-1)
+c     write(6,*) "xhi = ",(xhi(i),i=0,NDIM-1)
+c     write(6,*) "ce = ",(ce(i),i=0,NDIM-1)
+c     write(6,*) "radius = ",radius
+c     write(6,*) "ifirst0,ilast0 = ",ifirst0,ilast0
+c     write(6,*) "ifirst1,ilast1 = ",ifirst1,ilast1
+c
+
+      do ic1=ifirst1,ilast1
+        xc(1) = xlo(1)+dx(1)*(dble(ic1-ifirst1)+half)
+        x1 = xc(1)-center(1)
+        do ic0=ifirst0,ilast0
+           xc(0) = xlo(0)+dx(0)*(dble(ic0-ifirst0)+half)
+           x0 = xc(0)-center(0)
+           if (x1.eq.zero .and. x0.eq.zero) then
+              angle = zero
+           else
+              angle = atan2(x1,x0)
+           endif
+           if ((x0**2+x1**2).lt.radius**2) then
+              uval(ic0,ic1) = i_uval
+           else
+              uval(ic0,ic1) = o_uval
+           endif
+         enddo
+      enddo
+c
+      return
+      end
+
+c***********************************************************************
+c
+c   Sine profile
+c
+c***********************************************************************
+ 
+      subroutine linadvinitsine2d(data_problem,dx,xlo,
+     &  domain_xlo, domain_length,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  gcw0,gcw1,
+     &  uval,
+     &  nintervals,front,
+     &  i_uval,
+     &  amplitude,frequency)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer gcw0,gcw1
+      integer data_problem
+      integer nintervals
+      REAL
+     &     dx(0:NDIM-1),xlo(0:NDIM-1),
+     &     domain_xlo(0:NDIM-1),domain_length(0:NDIM-1)
+      REAL front(1:nintervals)
+      REAL i_uval(1:nintervals)
+      REAL amplitude,frequency(0:NDIM-1)
+c variables in 2d cell indexed
+      REAL
+     &     uval(CELL2dVECG(ifirst,ilast,gcw))
+c
+c***********************************************************************
+c
+      integer ic0,ic1,j,ifr
+      REAL xc(0:NDIM-1),xmid(1:10)
+      REAL coef(0:NDIM-1),coscoef(1:2)
+c
+c     write(6,*) "Inside eulerinitsine"
+c     write(6,*) "data_problem= ",data_problem
+c     write(6,*) "dx= ",dx(0), dx(1)
+c     write(6,*) "mc= ",mc(0), mc(1)
+c     write(6,*) "xlo= ",xlo(0), xlo(1),", xhi = ",xhi(0), xhi(1)
+c     write(6,*) "ifirst, ilast= ",ifirst0,ilast0,ifirst1,ilast1
+c     write(6,*) "gamma= ",gamma
+c     call flush(6)
+ 
+      if (data_problem.eq.SINE_CONSTANT_Y) then
+         write(6,*) "Sorry, Y direction not implemented :-("
+         return
+      endif
+ 
+      coef(0) = zero
+      do j=1,NDIM-1
+        coef(j) = two*pi*frequency(j)/domain_length(j)
+      enddo
+ 
+      do ic1=ifirst1,ilast1
+        xc(1) = xlo(1)+dx(1)*(dble(ic1-ifirst1)+half)
+        coscoef(1) = amplitude*
+     &         cos((xc(1)-domain_xlo(1))*coef(1))
+        do j=1,(nintervals-1)
+           xmid(j) = front(j) + coscoef(1)
+        enddo
+        do ic0=ifirst0,ilast0
+           xc(0) = xlo(0)+dx(0)*(dble(ic0-ifirst0)+half)
+           ifr = 1
+           do j=1,(nintervals-1)
+              if( xc(0) .gt. xmid(j) ) ifr = j+1
+           enddo
+           uval(ic0,ic1) = i_uval(ifr)
+        enddo
+      enddo
+ 
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/fortran/init3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/fortran/init3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,271 @@
+define(NDIM,3)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine linadvinit3d(data_problem,dx,xlo,xhi,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  gcw0,gcw1,gcw2,
+     &  uval,
+     &  nintervals,front,
+     &  i_uval)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer gcw0,gcw1,gcw2
+      integer data_problem
+      integer nintervals
+      REAL front(1:nintervals)
+      REAL 
+     &     dx(0:NDIM-1),xlo(0:NDIM-1),xhi(0:NDIM-1)
+      REAL 
+     &     i_uval(1:nintervals)
+c variables in 2d cell indexed         
+      REAL
+     &     uval(CELL3dVECG(ifirst,ilast,gcw))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2,dir,ifr
+      REAL xc(0:NDIM-1)
+c
+c   dir 0 two linear states (L,R) indp of y,z
+c   dir 1 two linear states (L,R) indp of x,z
+c   dir 2 two linear states (L,R) indp of x,y
+
+c     write(6,*) "Inside eulerinit"
+c     write(6,*) "data_problem= ",data_problem
+c     write(6,*) "dx= ",dx(0), dx(1), dx(2)
+c     write(6,*) "xlo= ",xlo(0), xlo(1),xhi(2)
+c     write(6,*) "xhi= ",xhi(0), xhi(1),xhi(2)
+c     write(6,*) "ifirst= ",ifirst0,ifirst1,ifirst2
+c     write(6,*) "ilast= ",ilast0,ilast1,ilast2
+c     write(6,*) "gamma= ",gamma
+c     call flush(6)
+
+      dir = 0
+      if (data_problem.eq.PIECEWISE_CONSTANT_X) then
+         dir = 0
+      else if (data_problem.eq.PIECEWISE_CONSTANT_Y) then
+         dir = 1
+      else if (data_problem.eq.PIECEWISE_CONSTANT_Z) then
+         dir = 2
+      endif
+
+      if (dir.eq.0) then
+         ifr = 1
+         do ic0=ifirst0,ilast0
+            xc(0) = xlo(0)+ dx(0)*(dble(ic0-ifirst0)+half)
+            if (xc(dir).gt.front(ifr)) then
+               ifr = ifr+1
+            endif
+            do ic1=ifirst1,ilast1
+               do ic2=ifirst2,ilast2
+                  uval(ic0,ic1,ic2) = i_uval(ifr)
+               enddo
+            enddo
+         enddo
+      else if (dir.eq.1) then
+         ifr = 1
+         do ic1=ifirst1,ilast1
+            xc(1) = xlo(1)+ dx(1)*(dble(ic1-ifirst1)+half)
+            if (xc(dir).gt.front(ifr)) then
+               ifr = ifr+1
+            endif
+            do ic2=ifirst2,ilast2
+               do ic0=ifirst0,ilast0
+                  uval(ic0,ic1,ic2) = i_uval(ifr)
+              enddo
+           enddo
+         enddo
+      else if (dir.eq.2) then
+         ifr = 1
+         do ic2=ifirst2,ilast2
+            xc(2) = xlo(2)+ dx(2)*(dble(ic2-ifirst2)+half)
+            if (xc(dir).gt.front(ifr)) then
+               ifr = ifr+1
+            endif
+            do ic1=ifirst1,ilast1
+               do ic0=ifirst0,ilast0
+                  uval(ic0,ic1,ic2) = i_uval(ifr)
+              enddo
+           enddo
+         enddo
+      endif
+c
+      return
+      end
+
+c***********************************************************************
+c
+c    Initialization routine where we use a spherical profile 
+c
+c***********************************************************************
+      subroutine initsphere3d(data_problem,dx,xlo,xhi,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  gcw0,gcw1,gcw2,
+     &  uval,
+     &  l_uval,r_uval,
+     &  ce,rad)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer gcw0,gcw1,gcw2
+      integer data_problem
+      REAL rad,ce(0:NDIM-1)
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:NDIM-1),xlo(0:NDIM-1),xhi(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     uval(CELL3dVECG(ifirst,ilast,gcw))
+      REAL 
+     &     l_uval(0:4),
+     &     r_uval(0:4)
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2,side
+      REAL xc(0:NDIM-1),x0,x1,x2
+      REAL theta,phi,rad2,rad3
+c
+
+c     write(6,*) "    dx = ",dx(0),dx(1),dx(2)
+c     write(6,*) "    xlo= ",xlo(0),xlo(1),xlo(2)
+c     write(6,*) "    ce = ",ce(0),ce(1),ce(2)," rad ",rad
+      do ic2=ifirst2,ilast2
+        xc(2) = xlo(2)+dx(2)*(dble(ic2-ifirst2)+half)
+        x2 = xc(2) - ce(2)
+        do ic1=ifirst1,ilast1
+           xc(1) = xlo(1)+dx(1)*(dble(ic1-ifirst1)+half)
+           x1 = xc(1) - ce(1)
+           do ic0=ifirst0,ilast0
+              xc(0) = xlo(0)+dx(0)*(dble(ic0-ifirst0)+half)
+              x0 = xc(0)-ce(0)
+              if (x1.eq.zero .and. x0.eq.zero) then
+                theta = zero
+              else
+                theta = atan2(x1,x0)
+              endif
+              rad2 = sqrt(x0**2+x1**2)
+              if (rad2.eq.zero .and. x2.eq.zero) then
+                phi = zero
+              else
+                phi  = atan2(rad2,x2)
+              endif
+              rad3 = sqrt(rad2**2 + x2**2)
+              if (rad3.lt.rad) then
+                side = 0
+              else
+                side = 1
+              endif
+              uval(ic0,ic1,ic2)   = l_uval(side)
+           enddo
+        enddo
+      enddo
+      return
+      end   
+
+c
+c***********************************************************************
+c
+c    Sine-wave interface
+c
+c***********************************************************************
+ 
+      subroutine linadvinitsine3d(data_problem,dx,xlo,
+     &  domain_xlo,domain_length,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  gcw0,gcw1,gcw2,
+     &  uval,
+     &  nintervals,front,
+     &  i_uval,
+     &  amplitude,frequency)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+ 
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer gcw0,gcw1,gcw2
+      integer data_problem
+      integer nintervals
+      REAL front(1:nintervals)
+      REAL
+     &     dx(0:NDIM-1),xlo(0:NDIM-1),
+     &     domain_xlo(0:NDIM-1),domain_length(0:NDIM-1)
+      REAL i_uval(1:nintervals)
+      REAL amplitude,frequency(0:NDIM-1)
+c variables in 3d cell indexed
+      REAL
+     &     uval(CELL3dVECG(ifirst,ilast,gcw))
+c
+c***********************************************************************
+c
+      integer ic0,ic1,ic2,j,ifr
+      REAL xc(0:NDIM-1),xmid(1:10)
+      REAL coef(0:NDIM-1),coscoef(1:2)
+c
+c     write(6,*) "Inside eulerinitrm"
+c     write(6,*) "data_problem= ",data_problem
+c     write(6,*) "dx= ",dx(0), dx(1), dx(2)
+c     write(6,*) "xlo= ",xlo(0), xlo(1), xlo(2)
+c     write(6,*) "domain_xlo= ",
+c    &   domain_xlo(0), domain_xlo(1), domain_xlo(2)
+c     write(6,*) "domain_length= ",domain_length(0),
+c    &   domain_length(1), domain_length(2)
+c     write(6,*) "ifirst = ",ifirst0,ifirst1,ifirst2
+c     write(6,*) "ilast = ",ilast0,ilast1,ilast2
+c     write(6,*) "front= ",front(1)
+c     write(6,*) "amplitude= ",amplitude
+c     write(6,*) "frequency= ",frequency(0),
+c    &  frequency(1),frequency(2)
+c     call flush(6)
+ 
+      if (data_problem.eq.SINE_CONSTANT_Y .or.
+     &    data_problem.eq.SINE_CONSTANT_Z) then
+         write(6,*) "Sorry, Y and Z directions not implemented :-("
+         return
+      endif
+ 
+      coef(0) = zero
+      do j=1,NDIM-1
+        coef(j) = two*pi*frequency(j)/domain_length(j)
+      enddo
+c
+      do ic2=ifirst2,ilast2
+         xc(2) = xlo(2)+dx(2)*(dble(ic2-ifirst2)+half)
+         coscoef(2) = amplitude*cos((xc(2)-domain_xlo(2))*coef(2))
+         do ic1=ifirst1,ilast1
+            xc(1) = xlo(1)+dx(1)*(dble(ic1-ifirst1)+half)
+            coscoef(1) =
+     &         cos((xc(1)-domain_xlo(1))*coef(1))*coscoef(2)
+            do j=1,(nintervals-1)
+              xmid(j) = front(j) + coscoef(1)
+            enddo
+            do ic0=ifirst0,ilast0
+               xc(0) = xlo(0)+dx(0)*(dble(ic0-ifirst0)+half)
+               ifr = 1
+               do j=1,(nintervals-1)
+                 if( xc(0) .gt. xmid(j) ) ifr = j+1
+               enddo
+               uval(ic0,ic1,ic2) = i_uval(ifr)
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/fortran/m3fluxjt3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/fortran/m3fluxjt3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,60 @@
+define(st_third,`dnl
+      do ic$3=ifirst$3-1,ilast$3+1
+         do ic$2=ifirst$2-1,ilast$2+1
+           do ic$1=ifirst$1,ilast$1
+             trnsvers=
+     &           (flux$1(ic$1+1,$4)-flux$1(ic$1,$4))/(3*dx($1))
+c
+             st3_$1(ic0,ic1,ic2)=uval(ic0,ic1,ic2) -trnsvers
+           enddo
+         enddo
+      enddo
+')dnl
+define(f_third,`dnl
+c     write(6,*) "checking onedr sol in riemann solve  "
+c     write(6,*) "         dt= ",dt
+      do ic$3=ifirst$3-1,ilast$3+1
+         do ic$2=ifirst$2,ilast$2
+           do ic$1=ifirst$1,ilast$1+1
+ 
+             if (advecspeed($1).ge.zero) then
+               riemst = st3_$2($5)
+             else
+               riemst = st3_$2(ic0,ic1,ic2)
+             endif
+             flux$1$2(ic$1,$4)= dt*riemst*advecspeed($1)
+           enddo
+         enddo
+      enddo
+')dnl
+define(correc_fluxjt,`dnl
+c   correct the $1-direction with $2$3-fluxes
+      do ic$3=ifirst$3,ilast$3
+        do ic$2=ifirst$2,ilast$2
+           ic$1=ifirst$1-1
+           trnsvers=0.5*(
+     &        (flux$2$3(ic$2+1,$4)-flux$2$3(ic$2,$4))/dx($2)+
+     &        (flux$3$2(ic$3+1,$5)-flux$3$2(ic$3,$5))/dx($3))
+  
+           tracelft$1(ic$1+1,ic$2,ic$3)=tracelft$1(ic$1+1,ic$2,ic$3)
+     &                                         - trnsvers
+           do ic$1=ifirst$1,ilast$1
+             trnsvers=0.5*(
+     &          (flux$2$3(ic$2+1,$4)-flux$2$3(ic$2,$4))/dx($2)+
+     &          (flux$3$2(ic$3+1,$5)-flux$3$2(ic$3,$5))/dx($3))
+  
+             tracelft$1(ic$1+1,ic$2,ic$3)=tracelft$1(ic$1+1,ic$2,ic$3)
+     &                                           - trnsvers
+               tracergt$1(ic$1  ,ic$2,ic$3)=tracergt$1(ic$1  ,ic$2,ic$3)
+     &                                           - trnsvers
+           enddo
+           ic$1=ilast$1+1
+           trnsvers=0.5*(
+     &        (flux$2$3(ic$2+1,$4)-flux$2$3(ic$2,$4))/dx($2)+
+     &        (flux$3$2(ic$3+1,$5)-flux$3$2(ic$3,$5))/dx($3))
+  
+           tracergt$1(ic$1  ,ic$2,ic$3)=tracergt$1(ic$1  ,ic$2,ic$3)
+     &                                        - trnsvers
+         enddo
+      enddo
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/fortran/m4bdry3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/fortran/m4bdry3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,167 @@
+define(cell_even,`dnl
+                  uval(ic0,ic1,ic2)=uval($1)
+')dnl
+define(lin_boundary,`dnl
+                  ict$1 = $2
+                  uval0 = uval(ict0,ict1,ict2)
+                  ict$1 = $3
+                  slope=(uval0-uval(ict0,ict1,ict2))/($2-$3)
+                  uval(ic0,ic1,ic2)=uval0 + (ic$1-$2)*slope
+')dnl
+define(fixed_state,`dnl
+                  uval(ic0,ic1,ic2)=bdry_states(1+(sn-1))
+')dnl
+define(symmetry,`dnl
+                  ict$1 = 3*$2-$3-ic$1
+                  uval(ic0,ic1,ic2)=uval(ict0,ict1,ict2)
+')dnl
+define(do_bdry_face,`dnl
+c          write(6,*) "ibdebug ",ibdebug
+c          write(6,*) "iedebug ",iedebug
+           if ((bdry_case.eq.FLOW)) then
+             do ic$2=ibeg$2,iend$2
+               ict$2 = ic$2
+               do ic$3=ibeg$3,iend$3
+                 ict$3 = ic$3
+                 do ic$1=$4
+                   ict$1 = $5
+cell_even(`ict0,ict1,ict2')dnl
+                 enddo
+               enddo
+             enddo
+           else if (bdry_case.eq.LINEAR) then
+             do ic$2=ibeg$2,iend$2
+                ict$2 = ic$2
+                do ic$3=ibeg$3,iend$3
+                   ict$3 = ic$3
+                   do ic$1=$4
+lin_boundary(`$1',`$5',`$6')dnl
+                   enddo
+                enddo
+             enddo
+           else if (bdry_case.eq.FIXED) then
+             do ic$2=ibeg$2,iend$2
+                ict$2 = ic$2
+                do ic$3=ibeg$3,iend$3
+                   ict$3 = ic$3
+                   do ic$1=$4
+                      ict$1 = $5
+fixed_state(`ict0,ict1,ict2')dnl
+                   enddo
+                enddo
+             enddo
+           else if (bdry_case.eq.SYMMETRIC) then
+             do ic$2=ibeg$2,iend$2
+                ict$2 = ic$2
+                do ic$3=ibeg$3,iend$3
+                   ict$3 = ic$3
+                   do ic$1=$4
+symmetry(`$1',`$5',`$6')dnl
+                   enddo
+                enddo
+             enddo
+          endif
+')dnl
+c
+define(do_bdry_node,`dnl
+c          write(6,*) "ibdebug ",ibdebug
+c          write(6,*) "iedebug ",iedebug
+           if ((bdry_case.eq.FLOW)) then
+             do ic0=$1
+                ict0 = $4
+                do ic1=$2
+                   ict1 = ic1
+                   do ic2=$3
+                      ict2 = ic2
+cell_even(`ict0,ict1,ict2')dnl
+                   enddo
+                enddo
+             enddo
+           else if (bdry_case.eq.LINEAR) then
+             do ic0=$1
+                ict0 = $4
+                do ic1=$2
+                   ict1 = ic1
+                   do ic2=$3
+                      ict2 = ic2
+lin_boundary(`0',`$4',`$5')dnl
+                   enddo
+                enddo
+             enddo
+           else if (bdry_case.eq.FIXED) then
+             do ic0=$1
+                ict0 = $4
+                do ic1=$2
+                   ict1 = ic1
+                   do ic2=$3
+                      ict2 = ic2
+fixed_state(`ict0,ict1,ict2')dnl
+                   enddo
+                enddo
+             enddo
+           else if (bdry_case.eq.SYMMETRIC) then
+             do ic0=$1
+                ict0 = $4
+                do ic1=$2
+                   ict1 = ic1
+                   do ic2=$3
+                      ict2 = ic2
+symmetry(`0',`$4',`$5')dnl
+                   enddo
+                enddo
+             enddo
+           endif
+')dnl
+c
+define(do_bdry_edge,`dnl
+c          write(6,*) "ibdebug ",ibdebug
+c          write(6,*) "iedebug ",iedebug
+          if ((bdry_case.eq.FLOW)) then
+            do ic$2=$4
+              ict$2 = ic$2
+              do ic$3=$5
+                ict$3 = ic$3
+                do ic$1=ibeg$1,iend$1
+                   ict$1 = ic$1
+                   ict$2 = $6
+cell_even(`ict0,ict1,ict2')dnl
+                enddo
+              enddo
+            enddo
+          else if (bdry_case.eq.LINEAR) then
+            do ic$2=$4
+              ict$2 = ic$2
+              do ic$3=$5
+                ict$3 = ic$3
+                do ic$1=ibeg$1,iend$1
+                   ict$1 = ic$1
+lin_boundary($2,`$6',`$7')dnl
+                enddo
+              enddo
+            enddo
+          else if (bdry_case.eq.FIXED) then
+            do ic$2=$4
+              ict$2 = ic$2
+              do ic$3=$5
+                ict$3 = ic$3
+                do ic$1=ibeg$1,iend$1
+                   ict$1 = ic$1
+                   ict$2 = $6
+fixed_state(`ict0,ict1,ict2')dnl
+                enddo
+              enddo
+            enddo
+          else if (bdry_case.eq.SYMMETRIC) then
+            do ic$2=$4
+              ict$2 = ic$2
+              do ic$3=$5
+                ict$3 = ic$3
+                do ic$1=ibeg$1,iend$1
+                   ict$1 = ic$1
+symmetry($2,`$6',`$7')dnl
+                enddo
+              enddo
+            enddo
+          endif
+')dnl
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/fortran/m4flux2d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/fortran/m4flux2d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,22 @@
+define(riemann_solve,`dnl
+c     write(6,*) "checking onedr sol in riemann solve  "
+c     write(6,*) "         dt= ",dt
+c     write(6,*) "  calculating flux$1, 1+extra_cell= ",$3
+c     write(6,*) "  ic$2=",ifirst$2-1-$3,ilast$2+1+$3
+c     write(6,*) "  ie$1=",ifirst$1-1-$3,ilast$1+1+1+$3
+        do ic$2=ifirst$2-$3,ilast$2+$3
+          do ie$1=ifirst$1-$3,ilast$1+1+$3
+ 
+            if (advecspeed($1).ge.zero) then
+               riemst= trlft$1(ie$1,ic$2)
+             else
+               riemst= trrgt$1(ie$1,ic$2)
+             endif
+ 
+            flux$1(ie$1,ic$2)= dt*riemst*advecspeed($1)
+c           write(6,*) "   flux$1(",ie$1,ic$2,")= ",flux$1(ie$1,ic$2,1),
+c    &                   flux$1(ie$1,ic$2,2),
+c    &          flux$1(ie$1,ic$2,3),flux$1(ie$1,ic$2,4)
+          enddo
+        enddo
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/fortran/m4flux3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/fortran/m4flux3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,51 @@
+define(riemann_solve,`dnl
+c     write(6,*) "checking onedr sol in riemann solve  "
+c     write(6,*) "         dt= ",dt
+      do ic$3=ifirst$3-$6,ilast$3+$6
+         do ic$2=ifirst$2-$5,ilast$2+$5
+           do ie$1=ifirst$1,ilast$1+1
+ 
+             if (advecspeed($1).ge.zero) then
+               riemst= trlft$1(ie$1,$4)
+             else
+               riemst= trrgt$1(ie$1,$4)
+             endif
+             flux$1(ie$1,$4)= dt*riemst*advecspeed($1)
+
+           enddo
+         enddo
+      enddo
+')dnl
+define(correc_flux2d,`dnl
+c   correct the $1-direction with $3-fluxes
+      do ic$5=ifirst$5-1,ilast$5+1
+         do ic$3=ifirst$3,ilast$3
+           do ic$1=ifirst$1-1,ilast$1+1
+             trnsvers=
+     &           (flux$3(ic$3+1,$4)-flux$3(ic$3,$4))*half/dx($3)
+c
+             ttracelft$1(ic$1+1,$2)=tracelft$1(ic$1+1,$2)
+     &                                    - trnsvers
+             ttracergt$1(ic$1  ,$2)=tracergt$1(ic$1  ,$2)
+     &                                    - trnsvers
+           enddo
+         enddo
+      enddo
+')dnl
+define(correc_flux3d,`dnl
+c   correct the $1-direction with $2$3-fluxes
+      do ic$1=ifirst$1-1,ilast$1+1
+         do ic$3=ifirst$3,ilast$3
+           do ic$2=ifirst$2,ilast$2
+             trnsvers=half*(
+     &          (flux$4(ic$2+1,$6)-flux$4(ic$2,$6))/dx($2)+
+     &          (flux$5(ic$3+1,$7)-flux$5(ic$3,$7))/dx($3))
+  
+             tracelft$1(ic$1+1,ic$2,ic$3)=tracelft$1(ic$1+1,ic$2,ic$3)
+     &                                           - trnsvers
+             tracergt$1(ic$1  ,ic$2,ic$3)=tracergt$1(ic$1  ,ic$2,ic$3)
+     &                                           - trnsvers
+           enddo
+         enddo
+      enddo
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/fortran/m4fluxcorner3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/fortran/m4fluxcorner3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,84 @@
+define(st_third,`dnl
+      do ic$3=ifirst$3-1,ilast$3+1
+         do ic$2=ifirst$2-1,ilast$2+1
+           do ic$1=ifirst$1,ilast$1
+             trnsvers=
+     &           (flux$1(ic$1+1,$4)-flux$1(ic$1,$4))/(3*dx($1))
+c
+             st3(ic0,ic1,ic2)=uval(ic0,ic1,ic2) -trnsvers
+           enddo
+         enddo
+      enddo
+')dnl
+define(f_third,`dnl
+c     write(6,*) "checking onedr sol in riemann solve  "
+c     write(6,*) "         dt= ",dt
+      do ic$3=ifirst$3-1,ilast$3+1
+         do ic$2=ifirst$2,ilast$2
+           do ic$1=ifirst$1,ilast$1+1
+ 
+             if (advecspeed($1).ge.zero) then
+               riemst = st3($5)
+             else
+               riemst = st3(ic0,ic1,ic2)
+             endif
+             flux$1(ic$1,$4)= dt*riemst*advecspeed($1)
+           enddo
+         enddo
+      enddo
+')dnl
+define(correc_fluxjt,`dnl
+c   correct the $2-direction with $3-fluxes
+      do ic$3=ifirst$3,ilast$3
+        do ic$1=ifirst$1,ilast$1
+           ic$2=ifirst$2-1
+           trnsvers=half*
+     &        (flux$3(ic$3+1,$4)-flux$3(ic$3,$4))/dx($3)
+  
+           tracelft$2(ic$2+1,ic$1,ic$3)=tracelft$2(ic$2+1,ic$1,ic$3)
+     &                                         - trnsvers
+           do ic$2=ifirst$2,ilast$2
+             trnsvers=half*
+     &          (flux$3(ic$3+1,$4)-flux$3(ic$3,$4))/dx($3)
+  
+             tracelft$2(ic$2+1,ic$1,ic$3)=tracelft$2(ic$2+1,ic$1,ic$3)
+     &                                           - trnsvers
+             tracergt$2(ic$2  ,ic$1,ic$3)=tracergt$2(ic$2  ,ic$1,ic$3)
+     &                                           - trnsvers
+           enddo
+           ic$2=ilast$2+1
+           trnsvers=half*
+     &        (flux$3(ic$3+1,$4)-flux$3(ic$3,$4))/dx($3)
+  
+           tracergt$2(ic$2  ,ic$1,ic$3)=tracergt$2(ic$2  ,ic$1,ic$3)
+     &                                        - trnsvers
+         enddo
+      enddo
+c
+c   correct the $3-direction with $2-fluxes
+      do ic$1=ifirst$1,ilast$1
+        do ic$2=ifirst$2,ilast$2
+           ic$3=ifirst$3-1
+           trnsvers=half*
+     &        (flux$2(ic$2+1,$5)-flux$2(ic$2,$5))/dx($2)
+  
+           tracelft$3(ic$3+1,ic$2,ic$1)=tracelft$3(ic$3+1,ic$2,ic$1)
+     &                                         - trnsvers
+           do ic$3=ifirst$3,ilast$3
+             trnsvers=half*
+     &          (flux$2(ic$2+1,$5)-flux$2(ic$2,$5))/dx($2)
+  
+             tracelft$3(ic$3+1,ic$2,ic$1)=tracelft$3(ic$3+1,ic$2,ic$1)
+     &                                           - trnsvers
+             tracergt$3(ic$3  ,ic$2,ic$1)=tracergt$3(ic$3  ,ic$2,ic$1)
+     &                                           - trnsvers
+           enddo
+           ic$3=ilast$3+1
+           trnsvers=half*
+     &        (flux$2(ic$2+1,$5)-flux$2(ic$2,$5))/dx($2)
+  
+           tracergt$3(ic$3  ,ic$2,ic$1)=tracergt$3(ic$3  ,ic$2,ic$1)
+     &                                        - trnsvers
+         enddo
+      enddo
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/fortran/m4trace2d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/fortran/m4trace2d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,33 @@
+define(trace_init,`dnl
+         do  ic$2=ifirst$2-FACEG,ilast$2+FACEG
+           ie$1=ifirst$1-FACEG
+           tracergt$1(ie$1,ic$2)=uval($5)
+           tracelft$1(ie$1,ic$2)=uval($5)
+
+           do  ie$1=ifirst$1+1-FACEG,ilast$1+FACEG
+             tracelft$1(ie$1,ic$2)=uval($4)
+             tracergt$1(ie$1,ic$2)=uval($5)
+           enddo
+
+           ie$1=ilast$1+FACEG+1
+           tracelft$1(ie$1,ic$2)=uval($4)
+           tracergt$1(ie$1,ic$2)=uval($4)
+         enddo
+')dnl
+define(trace_call,`dnl
+          do ic$2=ifirst$2-2,ilast$2+2
+            do ic$1=ifirst$1-FACEG,ilast$1+FACEG
+                ttraclft(ic$1) = tracelft(ic$1,ic$2)
+                ttracrgt(ic$1) = tracergt(ic$1,ic$2)
+            enddo
+
+            call trace(dt,ifirst$1,ilast$1,mc,
+     &        dx,idir,advecspeed,igdnv,
+     &        ttraclft,ttracrgt,
+     &        ttcelslp,ttedgslp)
+            do ic$1=ifirst$1-FACEG,ilast$1+FACEG
+                tracelft(ic$1,ic$2) = ttraclft(ic$1)
+                tracergt(ic$1,ic$2) = ttracrgt(ic$1)
+            enddo
+          enddo
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/fortran/m4trace3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/fortran/m4trace3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,39 @@
+define(trace_init,`dnl
+      do  ic$3=ifirst$3-FACEG,ilast$3+FACEG
+         do  ic$2=ifirst$2-FACEG,ilast$2+FACEG
+           ie$1=ifirst$1-FACEG
+           tracergt$1(ie$1,ic$2,ic$3)=uval($5)
+           tracelft$1(ie$1,ic$2,ic$3)=uval($5)
+
+           do  ie$1=ifirst$1+1-FACEG,ilast$1+FACEG
+             tracelft$1(ie$1,ic$2,ic$3)=uval($4)
+             tracergt$1(ie$1,ic$2,ic$3)=uval($5)
+           enddo
+
+           ie$1=ilast$1+FACEG+1
+           tracelft$1(ie$1,ic$2,ic$3)=uval($4)
+           tracergt$1(ie$1,ic$2,ic$3)=uval($4)
+         enddo
+      enddo
+
+ 
+')dnl
+define(trace_call,`dnl
+        do ic$3=ifirst$3-2,ilast$3+2
+          do ic$2=ifirst$2-2,ilast$2+2
+              do ic$1=ifirst$1-FACEG,ilast$1+FACEG
+                ttraclft(ic$1) = tracelft(ic$1,ic$2,ic$3)
+                ttracrgt(ic$1) = tracergt(ic$1,ic$2,ic$3)
+              enddo
+   
+            call trace(dt,ifirst$1,ilast$1,mc,
+     &        dx,idir,advecspeed,igdnv,
+     &        ttraclft,ttracrgt,
+     &        ttcelslp,ttedgslp)
+            do ic$1=ifirst$1-FACEG,ilast$1+FACEG
+                tracelft(ic$1,ic$2,ic$3) = ttraclft(ic$1)
+                tracergt(ic$1,ic$2,ic$3) = ttracrgt(ic$1)
+            enddo
+          enddo
+        enddo
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/fortran/probparams.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/fortran/probparams.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,8 @@
+      common/probparams/
+     &  PIECEWISE_CONSTANT_X,PIECEWISE_CONSTANT_Y,PIECEWISE_CONSTANT_Z,
+     &  SINE_CONSTANT_X,SINE_CONSTANT_Y,SINE_CONSTANT_Z,SPHERE,
+     &  CELLG,FACEG,FLUXG
+      integer 
+     &  PIECEWISE_CONSTANT_X,PIECEWISE_CONSTANT_Y,PIECEWISE_CONSTANT_Z,
+     &  SINE_CONSTANT_X,SINE_CONSTANT_Y,SINE_CONSTANT_Z,SPHERE,
+     &  CELLG,FACEG,FLUXG
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/fortran/stable2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/fortran/stable2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,44 @@
+define(NDIM,2)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+      subroutine stabledt2d(dx,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  ngc0,ngc1,
+     &  advecspeed,uval,stabdt)
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+include(FORTDIR/const.i)dnl
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      REAL stabdt,dx(0:NDIM-1)
+      integer ifirst0,ilast0,ifirst1,ilast1,ngc0,ngc1
+c
+      REAL  
+     &  advecspeed(0:NDIM-1),
+     &  uval(CELL2dVECG(ifirst,ilast,ngc))
+c    
+      REAL maxspeed(0:NDIM-1)
+c
+      maxspeed(0)=zero
+      maxspeed(1)=zero
+
+      maxspeed(0) = max(maxspeed(0), abs(advecspeed(0)))
+      maxspeed(1) = max(maxspeed(1), abs(advecspeed(1)))
+
+c     Do the following with checks for zero
+c      stabdt = min((dx(1)/maxspeed(1)),(dx(0)/maxspeed(0)))      
+
+      if ( maxspeed(0) .EQ. 0.0 ) then
+         if( maxspeed(1) .EQ. 0.0 ) then
+            stabdt = 1.0E9
+         else 
+            stabdt = dx(1)/maxspeed(1)
+         endif
+      elseif ( maxspeed(1) .EQ. 0.0 ) then
+            stabdt = dx(0)/maxspeed(0) 
+      else
+         stabdt = min((dx(1)/maxspeed(1)),(dx(0)/maxspeed(0)))
+      endif
+      
+      return
+      end 
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/fortran/stable3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/fortran/stable3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,52 @@
+define(NDIM,3)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine stabledt3d(dx,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  ngc0,ngc1,ngc2,
+     &  advecspeed,uval,stabdt)
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+include(FORTDIR/const.i)dnl
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      REAL stabdt,dx(0:NDIM-1)
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     & ngc0,ngc1,ngc2
+c
+      REAL
+     &  advecspeed(0:NDIM-1),
+     &  uval(CELL3dVECG(ifirst,ilast,ngc))
+c
+      REAL maxspeed(0:NDIM-1)
+c
+      maxspeed(0)=zero
+      maxspeed(1)=zero
+      maxspeed(2)=zero
+
+      maxspeed(0) = max(maxspeed(0), abs(advecspeed(0)))
+      maxspeed(1) = max(maxspeed(1), abs(advecspeed(1)))
+      maxspeed(2) = max(maxspeed(2), abs(advecspeed(2)))
+
+c     Do the following with checks for zero
+c      stabdt = min((dx(1)/maxspeed(1)),(dx(0)/maxspeed(0)))
+c      stabdt = min((dx(2)/maxspeed(2)),stabdt)
+
+      if ( maxspeed(0) .EQ. 0.0 ) then
+         if( maxspeed(1) .EQ. 0.0 ) then
+            stabdt = 1.0E9
+         else 
+            stabdt = dx(1)/maxspeed(1)
+         endif
+      elseif ( maxspeed(1) .EQ. 0.0 ) then
+            stabdt = dx(0)/maxspeed(0) 
+      else
+         stabdt = min((dx(1)/maxspeed(1)),(dx(0)/maxspeed(0)))
+      endif
+
+      if (maxspeed(2) .NE. 0.0 ) then
+         stabdt = min((dx(2)/maxspeed(2)),stabdt)
+      endif
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/fortran/stufprobc.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/fortran/stufprobc.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,28 @@
+      subroutine stufprobc(
+     &  PIECEWISE_CONSTANT_Xin,PIECEWISE_CONSTANT_Yin,
+     &  PIECEWISE_CONSTANT_Zin,
+     &  SINE_CONSTANT_Xin,SINE_CONSTANT_Yin,SINE_CONSTANT_Zin,
+     &  SPHEREin,
+     &  CELLGin,FACEGin,FLUXGin)
+      implicit none
+      integer 
+     &  PIECEWISE_CONSTANT_Xin,PIECEWISE_CONSTANT_Yin,
+     &  PIECEWISE_CONSTANT_Zin,
+     &  SINE_CONSTANT_Xin,SINE_CONSTANT_Yin,SINE_CONSTANT_Zin,
+     &  SPHEREin,
+     &  CELLGin,FACEGin,FLUXGin
+include(FORTDIR/probparams.i)dnl
+
+      PIECEWISE_CONSTANT_X=PIECEWISE_CONSTANT_Xin
+      PIECEWISE_CONSTANT_Y=PIECEWISE_CONSTANT_Yin
+      PIECEWISE_CONSTANT_Z=PIECEWISE_CONSTANT_Zin
+      SINE_CONSTANT_X=SINE_CONSTANT_Xin
+      SINE_CONSTANT_Y=SINE_CONSTANT_Yin  
+      SINE_CONSTANT_Z=SINE_CONSTANT_Zin
+      SPHERE=SPHEREin
+      CELLG=CELLGin
+      FACEG=FACEGin
+      FLUXG=FLUXGin
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/fortran/trace1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/fortran/trace1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,94 @@
+define(NEQU,1)dnl
+define(REAL,`double precision')dnl
+
+      subroutine trace(dt,ifirst,ilast,mc,
+     &  dx,dir,advecspeed,igdnv,
+     &  tracelft,tracergt,
+     &  celslope,edgslope)
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      REAL dt
+      integer ifirst,ilast,mc,dir,igdnv
+      REAL dx,advecspeed
+c
+      REAL
+     &  celslope(ifirst-CELLG:ifirst+mc-1+CELLG),
+c       side variables
+     &  tracelft(ifirst-FACEG:ifirst+mc+FACEG),
+     &  tracergt(ifirst-FACEG:ifirst+mc+FACEG),
+     &  edgslope(ifirst-FACEG:ifirst+mc+FACEG)
+c
+      integer ie,ic
+      REAL bound,coef4,slope2,dtdx,slope4
+      REAL du,nu
+c
+c***********************************************************************
+c     ******************************************************************
+c     * check for inflection points in characteristic speeds
+c     * compute slopes at cell edges
+c     * zero slopes if neighboring cells have different loading
+c     ******************************************************************
+      do ie=ifirst+1-FACEG,ilast+FACEG
+          edgslope(ie)=tracergt(ie)-tracelft(ie)
+      enddo
+c     ******************************************************************
+c     * limit slopes
+c     ******************************************************************
+        do ic=ifirst+1-CELLG,ilast+CELLG-1
+          celslope(ic)=zero
+        enddo
+      if (igdnv.eq.2) then
+c       write(6,*) "second-order slopes"
+c       ****************************************************************
+c       * second-order slopes
+c       ****************************************************************
+          do ic=ifirst+1-CELLG,ilast+CELLG-1
+            slope2=half*(edgslope(ic)+edgslope(ic+1))
+            celslope(ic)=half*(edgslope(ic)+edgslope(ic+1))
+            if (edgslope(ic)*edgslope(ic+1).le.zero) then
+              celslope(ic)=zero
+            else
+              bound=min(abs(edgslope(ic)),abs(edgslope(ic+1)))
+              celslope(ic)=sign(min(two*bound,abs(slope2)),slope2)
+            endif
+c            write(6,*) "ic,celslope= ", ic,celslope(ic)
+c            call flush(6)
+          enddo
+      else if (igdnv.eq.4) then
+c       write(6,*) "fourth-order slopes"
+c       ****************************************************************
+c       * fourth-order slopes
+c       ****************************************************************
+          do ic=ifirst+2-CELLG,ilast+CELLG-2
+            slope4=fourth*(tracergt(ic+2)-tracergt(ic-2))
+            celslope(ic)=half*(edgslope(ic)+edgslope(ic+1))
+            coef4=third*(four*celslope(ic)-slope4)
+            if (edgslope(ic)*edgslope(ic+1).le.zero .or.
+     &      coef4*celslope(ic).lt.zero) then
+              celslope(ic)=zero
+            else
+              bound=min(abs(edgslope(ic)),abs(edgslope(ic+1)))
+              celslope(ic)=sign(min(two*bound,abs(coef4)),coef4)
+            endif
+          enddo
+      endif
+c     ******************************************************************
+c     * characteristic projection
+c     ******************************************************************
+      dtdx=dt/dx
+      nu = advecspeed*dtdx
+      do ic=ifirst-1,ilast+1
+        du = celslope(ic)
+        if (nu.gt.0) then
+          tracelft(ic+1) = tracelft(ic+1) + half*(one -nu)*du
+          tracergt(ic) = tracergt(ic)
+        else
+          tracelft(ic+1) = tracelft(ic+1)
+          tracergt(ic) = tracergt(ic) -half*(one + nu)*du
+        endif
+      enddo
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/fortran/trace2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/fortran/trace2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,158 @@
+define(NDIM,2)dnl
+define(NEQU,4)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+include(FORTDIR/m4trace2d.i)dnl
+
+      subroutine inittraceflux2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  uval,
+     &  tracelft0,tracelft1,
+     &  tracergt0,tracergt1,
+     &  fluxriem0,fluxriem1)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      REAL
+     &     uval(CELL2d(ifirst,ilast,CELLG)),
+     &     fluxriem0(FACE2d0(ifirst,ilast,FLUXG)),
+     &     tracelft0(FACE2d0(ifirst,ilast,FACEG)),
+     &     tracergt0(FACE2d0(ifirst,ilast,FACEG)),
+     &     fluxriem1(FACE2d1(ifirst,ilast,FLUXG)),
+     &     tracelft1(FACE2d1(ifirst,ilast,FACEG)),
+     &     tracergt1(FACE2d1(ifirst,ilast,FACEG))
+c***********************************************************************
+c initialize left and right states at cell edges
+c (first-order upwind)
+c***********************************************************************
+c
+      integer ic0,ic1,ie0,ie1
+c*********************************************************************** 
+
+trace_init(0,1,2,`ie0-1,ic1',`ie0,ic1')dnl
+ 
+trace_init(1,0,2,`ic0,ie1-1',`ic0,ie1')dnl
+ 
+c
+c     we initialize the flux to be zero
+
+      do ic1=ifirst1-FLUXG,ilast1+FLUXG
+        do ie0=ifirst0-FLUXG,ilast0+FLUXG+1
+            fluxriem0(ie0,ic1) = zero
+        enddo
+      enddo
+c
+      do ic0=ifirst0-FLUXG,ilast0+FLUXG
+        do ie1=ifirst1-FLUXG,ilast1+FLUXG+1
+            fluxriem1(ie1,ic0) = zero
+        enddo
+      enddo
+c
+c     call flush(6)
+      return
+      end 
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine chartracing2d0(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  mc,
+     &  dx,
+     &  advecspeed,igdnv,
+     &  uval,
+     &  tracelft,tracergt,
+     &  ttcelslp,ttedgslp, 
+     &  ttraclft,ttracrgt)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer mc,igdnv
+      REAL dt 
+c variables in 1d axis indexed
+      REAL 
+     &     dx,advecspeed
+c variables in 2d axis indexed         
+      REAL
+     &     uval(CELL2d(ifirst,ilast,CELLG)),
+     &     tracelft(FACE2d0(ifirst,ilast,FACEG)),
+     &     tracergt(FACE2d0(ifirst,ilast,FACEG))
+c  side variables ifirst0 to ifirst0+mc plus ghost cells
+      REAL
+     &  ttedgslp(ifirst0-FACEG:ifirst0+mc+FACEG),
+     &  ttraclft(ifirst0-FACEG:ifirst0+mc+FACEG),
+     &  ttracrgt(ifirst0-FACEG:ifirst0+mc+FACEG)
+c  cell variables ifirst0 to ifirst0+mc-1 plus ghost cells
+      REAL 
+     &  ttcelslp(ifirst0-CELLG:ifirst0+mc-1+CELLG)
+c***********************************************************************
+c
+      integer ic0,ic1,idir
+c*********************************************************************** 
+c***********************************************************************
+c trace higher order states at cell edges
+c***********************************************************************
+      idir = 0
+trace_call(0,1)dnl
+c***********************************************************************
+      return
+      end
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine chartracing2d1(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  mc,
+     &  dx,
+     &  advecspeed,igdnv,
+     &  uval,
+     &  tracelft,tracergt,
+     &  ttcelslp,ttedgslp,  
+     &  ttraclft,ttracrgt)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer mc,igdnv
+      REAL dt
+c variables in 1d axis indexed
+      REAL 
+     &     dx,advecspeed
+c variables in 2d axis indexed         
+      REAL
+     &     uval(CELL2d(ifirst,ilast,CELLG)),
+     &     tracelft(FACE2d1(ifirst,ilast,FACEG)),
+     &     tracergt(FACE2d1(ifirst,ilast,FACEG))
+c  side variables ifirst1 to ifirst1+mc plus ghost cells
+      REAL
+     &  ttedgslp(ifirst1-FACEG:ifirst1+mc+FACEG),
+     &  ttraclft(ifirst1-FACEG:ifirst1+mc+FACEG),
+     &  ttracrgt(ifirst1-FACEG:ifirst1+mc+FACEG)
+c  cell variables ifirst1 to ifirst1+mc-1 plus ghost cells
+      REAL 
+     &  ttcelslp(ifirst1-CELLG:ifirst1+mc-1+CELLG)
+c***********************************************************************
+c
+      integer ic0,ic1,idir
+c*********************************************************************** 
+c***********************************************************************
+c trace higher order states at cell edges
+c***********************************************************************
+      idir = 1
+trace_call(1,0)dnl
+c***********************************************************************
+      return
+      end
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/fortran/trace3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/fortran/trace3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,218 @@
+define(NDIM,3)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+include(FORTDIR/m4trace3d.i)dnl
+
+      subroutine inittraceflux3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  uval,
+     &  tracelft0,tracelft1,tracelft2,
+     &  tracergt0,tracergt1,tracergt2,
+     &  fluxriem0,fluxriem1,fluxriem2)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL
+     &     uval(CELL3d(ifirst,ilast,CELLG)),
+     &     fluxriem0(FACE3d0(ifirst,ilast,FLUXG)),
+     &     tracelft0(FACE3d0(ifirst,ilast,FACEG)),
+     &     tracergt0(FACE3d0(ifirst,ilast,FACEG)),
+     &     fluxriem1(FACE3d1(ifirst,ilast,FLUXG)),
+     &     tracelft1(FACE3d1(ifirst,ilast,FACEG)),
+     &     tracergt1(FACE3d1(ifirst,ilast,FACEG)),
+     &     fluxriem2(FACE3d2(ifirst,ilast,FLUXG)),
+     &     tracelft2(FACE3d2(ifirst,ilast,FACEG)),
+     &     tracergt2(FACE3d2(ifirst,ilast,FACEG))
+c***********************************************************************
+c initialize left and right states at cell edges
+c (first-order upwind)
+c***********************************************************************
+c
+      integer ic0,ic1,ie0,ie1,ic2,ie2
+c***********************************************************************
+
+trace_init(0,1,2,`ie0-1,ic1,ic2',`ie0,ic1,ic2')dnl
+
+trace_init(1,2,0,`ic0,ie1-1,ic2',`ic0,ie1,ic2')dnl
+
+trace_init(2,0,1,`ic0,ic1,ie2-1',`ic0,ic1,ie2')dnl
+
+c
+c     we initialize the flux to be zero
+
+      do ic2=ifirst2-FLUXG,ilast2+FLUXG
+         do ic1=ifirst1-FLUXG,ilast1+FLUXG
+           do ie0=ifirst0-FLUXG,ilast0+FLUXG+1
+               fluxriem0(ie0,ic1,ic2) = zero
+           enddo
+         enddo
+      enddo
+c
+      do ic2=ifirst2-FLUXG,ilast2+FLUXG
+         do ic0=ifirst0-FLUXG,ilast0+FLUXG
+            do ie1=ifirst1-FLUXG,ilast1+FLUXG+1
+                 fluxriem1(ie1,ic2,ic0) = zero
+            enddo
+         enddo
+      enddo
+c
+      do ic1=ifirst1-FLUXG,ilast1+FLUXG
+         do ic0=ifirst0-FLUXG,ilast0+FLUXG
+            do ie2=ifirst2-FLUXG,ilast2+FLUXG+1
+                 fluxriem2(ie2,ic0,ic1) = zero
+            enddo
+         enddo
+      enddo
+c
+c      call flush(6)
+      return
+      end 
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+c
+      subroutine chartracing3d0(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  mc,
+     &  dx,
+     &  advecspeed,igdnv,
+     &  uval,
+     &  tracelft,tracergt,
+     &  ttcelslp,ttedgslp,
+     &  ttraclft,ttracrgt)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer mc,igdnv
+      REAL dt 
+c variables in 1d axis indexed
+      REAL 
+     &     dx,advecspeed
+c variables in 2d axis indexed         
+      REAL
+     &     uval(CELL3d(ifirst,ilast,CELLG)),
+     &     tracelft(FACE3d0(ifirst,ilast,FACEG)),
+     &     tracergt(FACE3d0(ifirst,ilast,FACEG))
+c  side variables ifirst0 to ifirst0+mc plus ghost cells
+      REAL
+     & ttedgslp(ifirst0-FACEG:ifirst0+mc+FACEG),
+     & ttraclft(ifirst0-FACEG:ifirst0+mc+FACEG),
+     & ttracrgt(ifirst0-FACEG:ifirst0+mc+FACEG)
+c  cell variables ifirst0 to ifirst0+mc-1 plus ghost cells
+      REAL 
+     &  ttcelslp(ifirst0-CELLG:ifirst0+mc-1+CELLG)
+c***********************************************************************
+      integer ic0,ic1,ic2,idir
+c***********************************************************************
+c trace higher order states at cell edges
+c***********************************************************************
+      idir = 0
+trace_call(0,1,2)dnl
+c***********************************************************************
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine chartracing3d1(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  mc,
+     &  dx,
+     &  advecspeed,igdnv,
+     &  uval,
+     &  tracelft,tracergt,
+     &  ttcelslp,ttedgslp,
+     &  ttraclft,ttracrgt)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer mc,igdnv
+      REAL dt 
+c variables in 1d axis indexed
+      REAL 
+     &     dx,advecspeed
+c variables in 2d axis indexed         
+      REAL
+     &     uval(CELL3d(ifirst,ilast,CELLG)),
+     &     tracelft(FACE3d1(ifirst,ilast,FACEG)),
+     &     tracergt(FACE3d1(ifirst,ilast,FACEG))
+      REAL
+     & ttedgslp(ifirst1-FACEG:ifirst1+mc+FACEG),
+     & ttraclft(ifirst1-FACEG:ifirst1+mc+FACEG),
+     & ttracrgt(ifirst1-FACEG:ifirst1+mc+FACEG)
+c  cell variables ifirst1 to ifirst1+mc-1 plus ghost cells
+      REAL 
+     &  ttcelslp(ifirst1-CELLG:ifirst1+mc-1+CELLG)
+c***********************************************************************
+      integer ic0,ic1,ic2,idir
+c***********************************************************************
+c trace higher order states at cell edges
+c***********************************************************************
+      idir = 1
+trace_call(1,2,0)dnl
+c***********************************************************************
+      return
+      end
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine chartracing3d2(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  mc,
+     &  dx,
+     &  advecspeed,igdnv,
+     &  uval,
+     &  tracelft,tracergt,
+     &  ttcelslp,ttedgslp,
+     &  ttraclft,ttracrgt)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer mc,igdnv
+      REAL dt 
+c variables in 1d axis indexed
+      REAL 
+     &     dx,advecspeed
+c variables in 2d axis indexed         
+      REAL
+     &     uval(CELL3d(ifirst,ilast,CELLG)),
+     &     tracelft(FACE3d2(ifirst,ilast,FACEG)),
+     &     tracergt(FACE3d2(ifirst,ilast,FACEG))
+      REAL
+     & ttedgslp(ifirst2-FACEG:ifirst2+mc+FACEG),
+     & ttraclft(ifirst2-FACEG:ifirst2+mc+FACEG),
+     & ttracrgt(ifirst2-FACEG:ifirst2+mc+FACEG)
+c  cell variables ifirst2 to ifirst2+mc-1 plus ghost cells
+      REAL 
+     &  ttcelslp(ifirst2-CELLG:ifirst2+mc-1+CELLG)
+c***********************************************************************
+      integer ic0,ic1,ic2,idir
+c***********************************************************************
+c trace higher order states at cell edges
+c***********************************************************************
+      idir = 2
+trace_call(2,0,1)dnl
+c***********************************************************************
+      return
+      end
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/main.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/main.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,561 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program for SAMRAI Linear Advection example problem. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+// Header for application-specific algorithm/data structure object
+
+#include "LinAdv.h"
+
+// Headers for major algorithm/data structure objects
+
+#include "SAMRAI/appu/VisItDataWriter.h"
+#include "SAMRAI/mesh/BergerRigoutsos.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/mesh/GriddingAlgorithm.h"
+#include "SAMRAI/algs/HyperbolicLevelIntegrator.h"
+#include "SAMRAI/mesh/TreeLoadBalancer.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/mesh/StandardTagAndInitialize.h"
+#include "SAMRAI/algs/TimeRefinementIntegrator.h"
+#include "SAMRAI/algs/TimeRefinementLevelStrategy.h"
+
+// Headers for basic SAMRAI objects
+
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/InputDatabase.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+// Classes for run-time plotting and autotesting.
+
+#if (TESTING == 1)
+#include "AutoTester.h"
+#endif
+
+#ifndef _MSC_VER
+#include <unistd.h>
+#endif
+
+#include <sys/stat.h>
+#include <cstdio>
+#include <cstdlib>
+#include <string>
+#include <fstream>
+
+using namespace std;
+using namespace SAMRAI;
+
+/************************************************************************
+ *                                                                      *
+ * This is the main program for an AMR solution of the linear advection *
+ * equation: du/dt + div(a*u) = 0, where  "u" is a scalar-valued        *
+ * function and "a" is a constant vector.  This application program is  *
+ * constructed by composing several algorithm objects found in the      *
+ * SAMRAI library with a few that are specific to this application.     *
+ * A brief description of these object follows.                         *
+ *                                                                      *
+ * There are two main data containment objects.  These are:             *
+ *                                                                      *
+ *    hier::PatchHierarchy - A container for the AMR patch hierarchy and      *
+ *       the data on the grid.                                          *
+ *                                                                      *
+ *    geom::CartesianGridGeometry - Defines and maintains the Cartesian       *
+ *       coordinate system on the grid.  The hier::PatchHierarchy             *
+ *       maintains a reference to this object.                          *
+ *                                                                      *
+ * A single overarching algorithm object drives the time integration    *
+ * and adaptive gridding processes:                                     *
+ *                                                                      *
+ *    algs::TimeRefinementIntegrator - Coordinates time integration and       *
+ *       adaptive gridding procedures for the various levels            *
+ *       in the AMR patch hierarchy.  Local time refinement is          *
+ *       employed during hierarchy integration; i.e., finer             *
+ *       levels are advanced using smaller time increments than         *
+ *       coarser level.  Thus, this object also invokes data            *
+ *       synchronization procedures which couple the solution on        *
+ *       different patch hierarchy levels.                              *
+ *                                                                      *
+ * The time refinement integrator is not specific to the numerical      *
+ * methods used and the problem being solved.   It maintains references *
+ * to two other finer grain algorithmic objects that are more specific  *
+ * to the problem at hand and with which it is configured when they are *
+ * passed into its constructor.   These finer grain algorithm objects   *
+ * are:                                                                 *
+ *                                                                      *
+ *    algs::HyperbolicLevelIntegrator - Defines data management procedures    *
+ *       for level integration, data synchronization between levels,    *
+ *       and tagging cells for refinement.  These operations are        *
+ *       tailored to explicit time integration algorithms used for      *
+ *       hyperbolic systems of conservation laws, such as the Euler     *
+ *       equations.  This integrator manages data for numerical         *
+ *       routines that treat individual patches in the AMR patch        *
+ *       hierarchy.  In this particular application, it maintains a     *
+ *       pointer to the LinAdv object that defines variables and        *
+ *       provides numerical routines for the linear advection problem.  *
+ *                                                                      *
+ *       LinAdv - Defines variables and numerical routines for the      *
+ *          discrete linear advection equation on each patch in the     *
+ *          AMR hierarchy.                                              *
+ *                                                                      *
+ *    mesh::GriddingAlgorithm - Drives the AMR patch hierarchy generation     *
+ *       and regridding procedures.  This object maintains              *
+ *       references to three other algorithmic objects with             *
+ *       which it is configured when they are passed into its           *
+ *       constructor.   They are:                                       *
+ *                                                                      *
+ *       mesh::BergerRigoutsos<NDIM> - Clusters cells tagged for refinement on a    *
+ *          patch level into a collection of logically-rectangular      *
+ *          box domains.                                                *
+ *                                                                      *
+ *       mesh::LoadBalancer<NDIM> - Processes the boxes generated by the            *
+ *          mesh::BergerRigoutsos<NDIM> algorithm into a configuration from         *
+ *          which patches are contructed.  The algorithm used in this   *
+ *          class assumes a spatially-uniform workload distribution;    *
+ *          thus, it attempts to produce a collection of boxes          *
+ *          each of which contains the same number of cells.  The       *
+ *          load balancer also assigns patches to processors.           *
+ *                                                                      *
+ *       mesh::StandardTagAndInitialize - Couples the gridding algorithm      *
+ *          to the HyperbolicIntegrator. Selects cells for              *
+ *          refinement based on either Gradient detection, Richardson   *
+ *          extrapolation, or pre-defined Refine box region.  The       *
+ *          object maintains a pointer to the algs::HyperbolicLevelIntegrator,*
+ *          which is passed into its constructor, for this purpose.     *
+ *                                                                      *
+ ************************************************************************
+ */
+
+/*
+ *******************************************************************
+ *                                                                 *
+ * For each run, the input filename and restart information        *
+ * (if needed) must be given on the command line.                  *
+ *                                                                 *
+ *      For non-restarted case, command line is:                   *
+ *                                                                 *
+ *          executable <input file name>                           *
+ *                                                                 *
+ *      For restarted run, command line is:                        *
+ *                                                                 *
+ *          executable <input file name> <restart directory> \     *
+ *                     <restart number>                            *
+ *                                                                 *
+ *******************************************************************
+ */
+
+int main(
+   int argc,
+   char* argv[])
+{
+
+   int num_failures = 0;
+   const int number_of_runs = 2;
+
+   /*
+    * Initialize tbox::MPI.
+    */
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+
+   for (int run = 0; run < number_of_runs; ++run) {
+      /*
+       * Initialize SAMRAI, enable logging, and process command line.
+       */
+      tbox::SAMRAIManager::startup();
+      const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+      {
+         string input_filename;
+         string restart_read_dirname;
+         int restore_num = 0;
+
+         bool is_from_restart = false;
+
+         if ((argc != 2) && (argc != 4)) {
+            tbox::pout << "USAGE:  " << argv[0] << " <input filename> "
+                                                <<
+            "<restart dir> <restore number> [options]\n"
+                                                << "  options:\n"
+                                                << "  none at this time"
+                                                << endl;
+            tbox::SAMRAI_MPI::abort();
+            return -1;
+         } else {
+            input_filename = argv[1];
+            if (argc == 4) {
+               restart_read_dirname = argv[2];
+               restore_num = atoi(argv[3]);
+
+               is_from_restart = true;
+            }
+         }
+
+         tbox::plog << "input_filename = " << input_filename << endl;
+         tbox::plog << "restart_read_dirname = " << restart_read_dirname << endl;
+         tbox::plog << "restore_num = " << restore_num << endl;
+
+         /*
+          * Create input database and parse all data in input file.
+          */
+
+         tbox::Pointer<tbox::Database> input_db(new tbox::InputDatabase("input_db"));
+         tbox::InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+         /*
+          * Retrieve "GlobalInputs" section of the input database and set
+          * values accordingly.
+          */
+
+         if (input_db->keyExists("GlobalInputs")) {
+            tbox::Pointer<tbox::Database> global_db =
+               input_db->getDatabase("GlobalInputs");
+#ifdef SGS
+            if (global_db->keyExists("tag_clustering_method")) {
+               string tag_clustering_method =
+                  global_db->getString("tag_clustering_method");
+               mesh::BergerRigoutsos::setClusteringOption(tag_clustering_method);
+            }
+#endif
+            if (global_db->keyExists("call_abort_in_serial_instead_of_exit")) {
+               bool flag = global_db->
+                  getBool("call_abort_in_serial_instead_of_exit");
+               tbox::SAMRAI_MPI::setCallAbortInSerialInsteadOfExit(flag);
+            }
+         }
+
+         /*
+          * Retrieve "Main" section of the input database.  First, read
+          * dump information, which is used for writing plot files.
+          * Second, if proper restart information was given on command
+          * line, and the restart interval is non-zero, create a restart
+          * database.
+          */
+
+         tbox::Pointer<tbox::Database> main_db = input_db->getDatabase("Main");
+
+         const tbox::Dimension dim(static_cast<unsigned short>(main_db->getInteger("dim")));
+
+         const std::string base_name =
+            main_db->getStringWithDefault("base_name", "unnamed");
+
+         const std::string log_filename =
+            main_db->getStringWithDefault("log_filename", base_name + ".log");
+
+         bool log_all_nodes = false;
+         if (main_db->keyExists("log_all_nodes")) {
+            log_all_nodes = main_db->getBool("log_all_nodes");
+         }
+         if (log_all_nodes) {
+            tbox::PIO::logAllNodes(log_filename);
+         } else {
+            tbox::PIO::logOnlyNodeZero(log_filename);
+         }
+
+         int viz_dump_interval = 0;
+         if (main_db->keyExists("viz_dump_interval")) {
+            viz_dump_interval = main_db->getInteger("viz_dump_interval");
+         }
+
+         const std::string viz_dump_dirname =
+            main_db->getStringWithDefault("viz_dump_dirname", base_name + ".visit");
+         int visit_number_procs_per_file = 1;
+
+         const bool viz_dump_data = (viz_dump_interval > 0);
+
+         int restart_interval = 0;
+         if (main_db->keyExists("restart_interval")) {
+            restart_interval = main_db->getInteger("restart_interval");
+         }
+
+         const std::string restart_write_dirname =
+            main_db->getStringWithDefault("restart_write_dirname",
+               base_name + ".restart");
+
+         bool use_refined_timestepping = true;
+         if (main_db->keyExists("timestepping")) {
+            string timestepping_method = main_db->getString("timestepping");
+            if (timestepping_method == "SYNCHRONIZED") {
+               use_refined_timestepping = false;
+            }
+         }
+
+#if (TESTING == 1) && !(HAVE_HDF5)
+         /*
+          * If we are autotesting on a system w/o HDF5, the read from
+          * restart will result in an error.  We want this to happen
+          * for users, so they know there is a problem with the restart,
+          * but we don't want it to happen when autotesting.
+          */
+         is_from_restart = false;
+         restart_interval = 0;
+#endif
+
+         const bool write_restart = (restart_interval > 0)
+            && !(restart_write_dirname.empty());
+
+         /*
+          * Get the restart manager and root restart database.  If run is from
+          * restart, open the restart file.
+          */
+
+         tbox::RestartManager* restart_manager = tbox::RestartManager::getManager();
+
+         if (is_from_restart) {
+            restart_manager->
+            openRestartFile(restart_read_dirname, restore_num,
+               mpi.getSize());
+         }
+
+         /*
+          * Create major algorithm and data objects which comprise application.
+          * Each object will be initialized either from input data or restart
+          * files, or a combination of both.  Refer to each class constructor
+          * for details.  For more information on the composition of objects
+          * for this application, see comments at top of file.
+          */
+
+         tbox::Pointer<geom::CartesianGridGeometry> grid_geometry(
+            new geom::CartesianGridGeometry(
+               dim,
+               "CartesianGeometry",
+               input_db->getDatabase("CartesianGeometry")));
+
+         tbox::Pointer<hier::PatchHierarchy> patch_hierarchy(
+            new hier::PatchHierarchy("PatchHierarchy", grid_geometry,
+               input_db->getDatabase("PatchHierarchy")));
+
+         LinAdv* linear_advection_model = new LinAdv(
+               "LinAdv",
+               dim,
+               input_db->getDatabase("LinAdv"),
+               grid_geometry);
+
+         tbox::Pointer<algs::HyperbolicLevelIntegrator> hyp_level_integrator(
+            new algs::HyperbolicLevelIntegrator(
+               "HyperbolicLevelIntegrator",
+               input_db->getDatabase("HyperbolicLevelIntegrator"),
+               linear_advection_model, true, use_refined_timestepping));
+
+         tbox::Pointer<mesh::StandardTagAndInitialize> error_detector(
+            new mesh::StandardTagAndInitialize(
+               dim,
+               "StandardTagAndInitialize",
+               hyp_level_integrator,
+               input_db->getDatabase("StandardTagAndInitialize")));
+
+         tbox::Pointer<mesh::BergerRigoutsos> box_generator(
+            new mesh::BergerRigoutsos(
+               dim,
+               input_db->getDatabaseWithDefault(
+                  "BergerRigoutsos",
+                  SAMRAI::tbox::Pointer<SAMRAI::tbox::Database>(NULL))));
+
+         tbox::Pointer<mesh::TreeLoadBalancer> load_balancer(
+            new mesh::TreeLoadBalancer(dim,
+               "LoadBalancer",
+               input_db->getDatabase("LoadBalancer")));
+         load_balancer->setSAMRAI_MPI(
+            SAMRAI::tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+         tbox::Pointer<mesh::GriddingAlgorithm> gridding_algorithm(
+            new mesh::GriddingAlgorithm(patch_hierarchy,
+               "GriddingAlgorithm",
+               input_db->getDatabase("GriddingAlgorithm"),
+               error_detector,
+               box_generator,
+               load_balancer));
+
+         tbox::Pointer<algs::TimeRefinementIntegrator> time_integrator(
+            new algs::TimeRefinementIntegrator("TimeRefinementIntegrator",
+               input_db->getDatabase(
+                  "TimeRefinementIntegrator"),
+               patch_hierarchy,
+               hyp_level_integrator,
+               gridding_algorithm));
+
+         // VisitDataWriter is only present if HDF is available
+#ifdef HAVE_HDF5
+         tbox::Pointer<appu::VisItDataWriter> visit_data_writer(
+            new appu::VisItDataWriter(dim,
+               "LinAdv VisIt Writer",
+               viz_dump_dirname,
+               visit_number_procs_per_file));
+         linear_advection_model->
+         registerVisItDataWriter(visit_data_writer);
+#endif
+
+         /*
+          * Initialize hierarchy configuration and data on all patches.
+          * Then, close restart file and write initial state for visualization.
+          */
+
+         double dt_now = time_integrator->initializeHierarchy();
+
+         tbox::RestartManager::getManager()->closeRestartFile();
+
+#if (TESTING == 1)
+         /*
+          * Create the autotesting object which will verify correctness
+          * of the problem. If no automated testing is done, the object does
+          * not get used.
+          */
+         AutoTester autotester("AutoTester", dim, input_db);
+#endif
+
+         /*
+          * After creating all objects and initializing their state, we
+          * print the input database and variable database contents
+          * to the log file.
+          */
+
+         tbox::plog << "\nCheck input data and variables before simulation:"
+                    << endl;
+         tbox::plog << "Input database..." << endl;
+         input_db->printClassData(tbox::plog);
+         tbox::plog << "\nVariable database..." << endl;
+         hier::VariableDatabase::getDatabase()->printClassData(tbox::plog);
+
+         tbox::plog << "\nCheck Linear Advection data... " << endl;
+         linear_advection_model->printClassData(tbox::plog);
+
+         if (viz_dump_data &&
+             time_integrator->getIntegratorStep() % viz_dump_interval == 0) {
+#ifdef HAVE_HDF5
+            visit_data_writer->writePlotData(
+               patch_hierarchy,
+               time_integrator->getIntegratorStep(),
+               time_integrator->getIntegratorTime());
+#endif
+         }
+
+         /*
+          * Time step loop.  Note that the step count and integration
+          * time are maintained by algs::TimeRefinementIntegrator.
+          */
+
+         double loop_time = time_integrator->getIntegratorTime();
+         double loop_time_end = time_integrator->getEndTime();
+
+         int iteration_num = time_integrator->getIntegratorStep();
+
+#if (TESTING == 1)
+         /*
+          * If we are doing autotests, check result...
+          */
+         num_failures += autotester.evalTestData(iteration_num,
+               patch_hierarchy,
+               time_integrator,
+               hyp_level_integrator,
+               gridding_algorithm);
+#endif
+
+         while ((loop_time < loop_time_end) &&
+                time_integrator->stepsRemaining()) {
+
+            iteration_num = time_integrator->getIntegratorStep() + 1;
+
+            tbox::pout << "++++++++++++++++++++++++++++++++++++++++++++" << endl;
+            tbox::pout << "At begining of timestep # " << iteration_num - 1
+                       << endl;
+            tbox::pout << "Simulation time is " << loop_time << endl;
+
+            double dt_new = time_integrator->advanceHierarchy(dt_now);
+
+            loop_time += dt_now;
+            dt_now = dt_new;
+
+            tbox::pout << "At end of timestep # " << iteration_num - 1 << endl;
+            tbox::pout << "Simulation time is " << loop_time << endl;
+            tbox::pout << "++++++++++++++++++++++++++++++++++++++++++++" << endl;
+
+            /*
+             * At specified intervals, write restart and visualization files.
+             */
+            if (write_restart) {
+
+               if ((iteration_num % restart_interval) == 0) {
+                  tbox::RestartManager::getManager()->
+                  writeRestartFile(restart_write_dirname,
+                     iteration_num);
+               }
+            }
+
+            /*
+             * At specified intervals, write out data files for plotting.
+             */
+
+            if (viz_dump_data) {
+               if ((iteration_num % viz_dump_interval) == 0) {
+#ifdef HAVE_HDF5
+                  visit_data_writer->writePlotData(patch_hierarchy,
+                     iteration_num,
+                     loop_time);
+#endif
+               }
+            }
+
+#if (TESTING == 1)
+            /*
+             * If we are doing autotests, check result...
+             */
+            num_failures += autotester.evalTestData(iteration_num,
+                  patch_hierarchy,
+                  time_integrator,
+                  hyp_level_integrator,
+                  gridding_algorithm);
+#endif
+
+         }
+
+         /*
+          * At conclusion of simulation, deallocate objects.
+          */
+
+#ifdef HAVE_HDF5
+         visit_data_writer.setNull();
+#endif
+
+         time_integrator.setNull();
+         gridding_algorithm.setNull();
+         load_balancer.setNull();
+         box_generator.setNull();
+         error_detector.setNull();
+         hyp_level_integrator.setNull();
+
+         if (linear_advection_model) delete linear_advection_model;
+
+         patch_hierarchy.setNull();
+         grid_geometry.setNull();
+
+         input_db.setNull();
+         main_db.setNull();
+
+      }
+      tbox::SAMRAIManager::shutdown();
+   }
+
+   if (num_failures == 0) {
+      tbox::pout << "\nPASSED:  LinAdv" << endl;
+   }
+
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return num_failures;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/test_inputs/test.2d.boxes.0000001.0000000
Binary file source/test/applications/LinAdv/test_inputs/test.2d.boxes.0000001.0000000 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/test_inputs/test.2d.boxes.0000002.0000000
Binary file source/test/applications/LinAdv/test_inputs/test.2d.boxes.0000002.0000000 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/test_inputs/test.2d.boxes.0000002.0000001
Binary file source/test/applications/LinAdv/test_inputs/test.2d.boxes.0000002.0000001 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/test_inputs/test.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/test_inputs/test.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,184 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI LinAdv example problem 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+AutoTester {
+   test_fluxes = FALSE
+   test_iter_num = 10
+   correct_result = 4.5, 0.028125, 0.028125
+   output_correct = FALSE
+
+   write_patch_boxes = FALSE
+   read_patch_boxes = TRUE
+   test_patch_boxes_at_steps = 0, 5, 10  // 0 checks initial data
+   test_patch_boxes_filename = "test_inputs/test.2d.boxes"
+   simplify_test_boxes = TRUE
+}
+
+LinAdv {
+
+   advection_velocity = 2.0e0 , 1.0e0
+   godunov_order    = 2                // order of Goduov slopes (1, 2, or 4)
+   corner_transport = "CORNER_TRANSPORT_1"
+
+   data_problem      = "SPHERE"
+
+   Initial_data {
+      radius            = 2.9
+      center            = 22.5 , 5.5
+
+      uval_inside       = 80.0
+      uval_outside      = 5.0
+
+   }
+
+   Refinement_data {
+      refine_criteria = "UVAL_GRADIENT", "UVAL_SHOCK"
+
+      UVAL_GRADIENT {
+         grad_tol = 10.0
+      }
+
+      UVAL_SHOCK {
+         shock_tol = 0.10
+         shock_onset = 0.85
+      }
+   }
+
+  // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "FLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "XFLOW"
+      }
+   }
+}
+
+Main {
+   dim = 2
+   base_name = "test.2d"
+// log file parameters
+   log_all_nodes    = TRUE
+
+// visualization dump parameters
+   viz_dump_interval     = 1         // zero to turn off
+   viz_dump_dirname     = "viz-test-2d"
+
+// restart dump parameters
+   restart_interval       = 1         // zero to turn off
+
+   plotting_interval = 0
+
+}
+
+CartesianGeometry{
+   domain_boxes	= [(0,0),(29,19)]
+
+   x_lo = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up = 30.e0 , 20.e0 // upper end of computational domain.
+
+   periodic_dimension = 1,0
+}
+
+PatchHierarchy {
+   max_levels = 3         // Maximum number of levels in hierarchy.
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 4 , 4
+      // SGS TODO this was added for DistributedGriddingAlgorthm
+      level_2 = 4 , 4
+      // all finer levels will use same values as level_0...
+   }
+
+   largest_patch_size {
+      level_0 = 40 , 40
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 16 , 16
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm{
+
+   efficiency_tolerance    = 0.85e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.95e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+
+   sequentialize_patch_indices = TRUE // Required for plotting.
+
+   print_mapped_box_level_hierarchy = 'y'
+}
+
+BergerRigoutsos {
+  sort_output_nodes = TRUE // Makes results repeatable.
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.9e0    // max cfl factor used in problem
+   cfl_init                  = 0.9e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+TimeRefinementIntegrator{
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 10       // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
+
+MappedBoxHierarchy {
+   check_input_connectors = 'y'
+   check_output_connectors = 'y'
+   log_actions = 'y'
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/test_inputs/test.3d.boxes.0000001.0000000
Binary file source/test/applications/LinAdv/test_inputs/test.3d.boxes.0000001.0000000 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/test_inputs/test.3d.boxes.0000002.0000000
Binary file source/test/applications/LinAdv/test_inputs/test.3d.boxes.0000002.0000000 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/test_inputs/test.3d.boxes.0000002.0000001
Binary file source/test/applications/LinAdv/test_inputs/test.3d.boxes.0000002.0000001 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/test_inputs/test.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/test_inputs/test.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,243 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI LinAdv example problem 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+AutoTester {
+   test_fluxes = FALSE
+   test_iter_num = 10
+   correct_result = 9.0, 0.225, 0.225
+   output_correct = FALSE
+
+   write_patch_boxes = FALSE
+   read_patch_boxes = TRUE
+   test_patch_boxes_at_steps = 0, 5, 10  // 0 checks initial data
+   test_patch_boxes_filename = "test_inputs/test.3d.boxes"
+   simplify_test_boxes = TRUE
+
+}
+
+LinAdv {
+
+   advection_velocity = 2.0e0 , 1.0e0 , 1.0e0
+   godunov_order    = 2                // order of Goduov slopes (1, 2, or 4)
+   corner_transport = "CORNER_TRANSPORT_1"
+
+   data_problem      = "SPHERE"
+
+   Initial_data {
+      radius            = 2.9
+      center            = 5.5 , 5.5 , 5.5
+
+      uval_inside       = 80.0
+      uval_outside      = 5.0
+
+   }
+
+   Refinement_data {
+      refine_criteria = "UVAL_GRADIENT", "UVAL_SHOCK"
+
+      UVAL_GRADIENT {
+         grad_tol = 10.0
+      }
+
+      UVAL_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "FLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for an edge, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent face has either a FLOW
+      //            or REFLECT condition, the resulting edge boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent faces have either FLOW
+      //            or REFLECT conditions, the resulting node boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+
+   }
+
+}
+
+Main {
+   dim = 3
+   base_name = "test.3d"
+// log file parameters
+   log_all_nodes    = TRUE
+
+// visualization dump parameters
+   viz_dump_interval     = 0         // zero to turn off
+   viz_dump_dirname     = "viz-test-3d"
+
+// restart dump parameters
+   restart_interval       = 1         // zero to turn off
+}
+
+CartesianGeometry{
+   domain_boxes	= [ (0,0,0) , (14,9,9) ]
+
+   x_lo = 0.e0 , 0.e0 , 0.e0    // lower end of computational domain.
+   x_up = 30.e0 , 20.e0 , 20.e0 // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3         // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 2 , 2 , 2
+      level_2 = 2 , 2 , 2
+      level_3 = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 40 , 40 , 40
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 9 , 9 , 9
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm{
+
+   efficiency_tolerance    = 0.85e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.95e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+BergerRigoutsos {
+  sort_output_nodes = TRUE // Makes results repeatable.
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.9e0    // max cfl factor used in problem
+   cfl_init                  = 0.9e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+TimeRefinementIntegrator{
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 10      // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/test_inputs/test_restart.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/test_inputs/test_restart.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,170 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI LinAdv example problem 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+AutoTester {
+   test_fluxes = FALSE
+   test_iter_num = 10
+   correct_result = 4.5, 0.028125, 0.028125
+   output_correct = FALSE
+
+   write_patch_boxes = FALSE
+   read_patch_boxes = TRUE
+   test_patch_boxes_at_steps = 0, 5, 10  // 0 checks initial data
+   test_patch_boxes_filename = "test_inputs/test_restart.2d.boxes"
+   simplify_test_boxes = TRUE
+
+}
+
+LinAdv {
+
+   advection_velocity = 2.0e0 , 1.0e0
+   godunov_order    = 2                // order of Goduov slopes (1, 2, or 4)
+   corner_transport = "CORNER_TRANSPORT_1"
+
+   data_problem      = "SPHERE"
+
+   Initial_data {
+      radius            = 2.9
+      center            = 22.5 , 5.5
+
+      uval_inside       = 80.0
+      uval_outside      = 5.0
+
+   }
+
+   Refinement_data {
+      refine_criteria = "UVAL_RICHARDSON"
+
+      UVAL_RICHARDSON {
+         rich_tol = 0.1, 0.1, 0.001
+      }
+   }
+
+  // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "FLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "XFLOW"
+      }
+   }
+
+}
+
+Main {
+   dim = 2
+   base_name = "test_restart.2d"
+// log file parameters
+   log_all_nodes    = TRUE
+
+// visualization dump parameters
+   viz_dump_interval     = 0         // zero to turn off
+   viz_dump_dirname     = "viz-test-2d-re"
+
+// restart dump parameters
+   restart_interval       = 1         // zero to turn off
+
+   plotting_interval = 0
+
+}
+
+CartesianGeometry{
+   domain_boxes	= [(0,0),(29,19)]
+
+   x_lo = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up = 30.e0 , 20.e0 // upper end of computational domain.
+
+   periodic_dimension = 1,0
+}
+
+PatchHierarchy {
+   max_levels = 3         // Maximum number of levels in hierarchy.
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 4 , 4
+      level_2 = 4 , 4
+      level_3 = 4 , 4
+   }
+
+   largest_patch_size {
+      level_0 = 40 , 40
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 16 , 16
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm{
+
+   efficiency_tolerance    = 0.85e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.95e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+BergerRigoutsos {
+  sort_output_nodes = TRUE // Makes results repeatable.
+}
+
+StandardTagAndInitialize {
+   tagging_method = "RICHARDSON_EXTRAPOLATION"
+}
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.9e0    // max cfl factor used in problem
+   cfl_init                  = 0.9e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+TimeRefinementIntegrator{
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 10       // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/test_inputs/test_sync.2d.boxes.0000001.0000000
Binary file source/test/applications/LinAdv/test_inputs/test_sync.2d.boxes.0000001.0000000 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/test_inputs/test_sync.2d.boxes.0000002.0000000
Binary file source/test/applications/LinAdv/test_inputs/test_sync.2d.boxes.0000002.0000000 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/test_inputs/test_sync.2d.boxes.0000002.0000001
Binary file source/test/applications/LinAdv/test_inputs/test_sync.2d.boxes.0000002.0000001 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/test_inputs/test_sync.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/test_inputs/test_sync.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,176 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI LinAdv example problem 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+AutoTester {
+   test_fluxes = FALSE
+   test_iter_num = 10
+   correct_result = 0.28125, 0.028125, 0.028125
+   output_correct = FALSE
+
+   write_patch_boxes = FALSE
+   read_patch_boxes = TRUE
+   test_patch_boxes_at_steps = 0, 5, 10  // 0 checks initial data
+   test_patch_boxes_filename = "test_inputs/test_sync.2d.boxes"
+   simplify_test_boxes = TRUE
+
+}
+
+LinAdv {
+
+   advection_velocity = 2.0e0 , 1.0e0
+   godunov_order    = 2                // order of Goduov slopes (1, 2, or 4)
+   corner_transport = "CORNER_TRANSPORT_1"
+
+   data_problem      = "SPHERE"
+
+   Initial_data {
+      radius            = 2.9
+      center            = 22.5 , 5.5
+
+      uval_inside       = 80.0
+      uval_outside      = 5.0
+
+   }
+
+   Refinement_data {
+      refine_criteria = "UVAL_GRADIENT", "UVAL_SHOCK"
+
+      UVAL_GRADIENT {
+         grad_tol = 10.0
+      }
+
+      UVAL_SHOCK {
+         shock_tol = 0.10
+         shock_onset = 0.85
+      }
+   }
+
+  // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "FLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "XFLOW"
+      }
+   }
+}
+
+Main {
+   dim = 2
+   base_name = "test_sync.2d"
+// log file parameters
+   log_all_nodes    = TRUE
+
+// visualization dump parameters
+   viz_dump_interval     = 0         // zero to turn off
+   viz_dump_dirname     = "viz-test-2d-sync"
+
+// restart dump parameters
+   restart_interval       = 1         // zero to turn off
+
+   plotting_interval = 0
+
+   timestepping = "SYNCHRONIZED"
+}
+
+CartesianGeometry{
+   domain_boxes	= [(0,0),(29,19)]
+
+   x_lo = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up = 30.e0 , 20.e0 // upper end of computational domain.
+
+   periodic_dimension = 1,0
+}
+
+PatchHierarchy {
+   max_levels = 3         // Maximum number of levels in hierarchy.
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 4 , 4
+      level_2 = 4 , 4
+      level_3 = 4 , 4
+   }
+
+   largest_patch_size {
+      level_0 = 40 , 40
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 16 , 16
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm{
+
+   efficiency_tolerance    = 0.85e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.95e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+BergerRigoutsos {
+  sort_output_nodes = TRUE // Makes results repeatable.
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.9e0    // max cfl factor used in problem
+   cfl_init                  = 0.9e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+TimeRefinementIntegrator{
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 10       // max number of simulation timesteps
+   regrid_interval      = 2
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/test_inputs/test_sync.3d.boxes.0000001.0000000
Binary file source/test/applications/LinAdv/test_inputs/test_sync.3d.boxes.0000001.0000000 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/test_inputs/test_sync.3d.boxes.0000002.0000000
Binary file source/test/applications/LinAdv/test_inputs/test_sync.3d.boxes.0000002.0000000 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/test_inputs/test_sync.3d.boxes.0000002.0000001
Binary file source/test/applications/LinAdv/test_inputs/test_sync.3d.boxes.0000002.0000001 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/test_inputs/test_sync.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/test_inputs/test_sync.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,246 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI LinAdv example problem 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+AutoTester {
+   test_fluxes = FALSE
+   test_iter_num = 10
+   correct_result = 2.25, 0.225, 0.225
+   output_correct = FALSE
+
+   write_patch_boxes = FALSE
+   read_patch_boxes = TRUE
+   test_patch_boxes_at_steps = 0, 5, 10  // 0 checks initial data
+   test_patch_boxes_filename = "test_inputs/test_sync.3d.boxes"
+   simplify_test_boxes = TRUE
+
+}
+
+LinAdv {
+
+   advection_velocity = 2.0e0 , 1.0e0 , 1.0e0
+   godunov_order    = 2                // order of Goduov slopes (1, 2, or 4)
+   corner_transport = "CORNER_TRANSPORT_1"
+
+   data_problem     = "SPHERE"
+
+   Initial_data {
+      radius            = 2.9
+      center            = 5.5 , 5.5 , 5.5
+
+      uval_inside       = 80.0
+      uval_outside      = 5.0
+
+   }
+
+   Refinement_data {
+      refine_criteria = "UVAL_GRADIENT", "UVAL_SHOCK"
+
+      UVAL_GRADIENT {
+         grad_tol = 10.0
+      }
+
+      UVAL_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "FLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for an edge, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent face has either a FLOW
+      //            or REFLECT condition, the resulting edge boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent faces have either FLOW
+      //            or REFLECT conditions, the resulting node boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+
+   }
+
+}
+
+Main {
+   dim = 3
+   base_name = "test_sync.3d"
+// log file parameters
+   log_all_nodes    = TRUE
+
+// visualization dump parameters
+   viz_dump_interval     = 0         // zero to turn off
+   viz_dump_dirname     = "viz-test-3d-sync"
+
+// restart dump parameters
+   restart_interval       = 1         // zero to turn off
+
+   timestepping = "SYNCHRONIZED"
+}
+
+CartesianGeometry{
+   domain_boxes	= [ (0,0,0) , (14,9,9) ]
+
+   x_lo = 0.e0 , 0.e0 , 0.e0    // lower end of computational domain.
+   x_up = 30.e0 , 20.e0 , 20.e0 // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3         // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 2 , 2 , 2
+      level_2 = 2 , 2 , 2
+      level_3 = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 40 , 40 , 40
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 9 , 9 , 9
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm{
+
+   efficiency_tolerance    = 0.85e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.95e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+BergerRigoutsos {
+  sort_output_nodes = TRUE // Makes results repeatable.
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.9e0    // max cfl factor used in problem
+   cfl_init                  = 0.9e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+TimeRefinementIntegrator{
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 10      // max number of simulation timesteps
+   regrid_interval      = 2
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/test_inputs/test_sync_restart.2d.boxes.0000001.0000000
Binary file source/test/applications/LinAdv/test_inputs/test_sync_restart.2d.boxes.0000001.0000000 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/test_inputs/test_sync_restart.2d.boxes.0000002.0000000
Binary file source/test/applications/LinAdv/test_inputs/test_sync_restart.2d.boxes.0000002.0000000 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/test_inputs/test_sync_restart.2d.boxes.0000002.0000001
Binary file source/test/applications/LinAdv/test_inputs/test_sync_restart.2d.boxes.0000002.0000001 has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/LinAdv/test_inputs/test_sync_restart.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/LinAdv/test_inputs/test_sync_restart.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,189 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI LinAdv example problem 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+AutoTester {
+   test_fluxes = FALSE
+   test_iter_num = 10
+   correct_result = 0.28125, 0.028125, 0.028125
+   output_correct = FALSE
+
+   write_patch_boxes = FALSE
+   read_patch_boxes = TRUE
+   test_patch_boxes_at_steps = 0, 5, 10  // 0 checks initial data
+   test_patch_boxes_filename = "test_inputs/test_sync_restart.2d.boxes"
+   simplify_test_boxes = TRUE
+
+}
+
+LinAdv {
+
+   advection_velocity = 2.0e0 , 1.0e0
+   godunov_order    = 2                // order of Goduov slopes (1, 2, or 4)
+   corner_transport = "CORNER_TRANSPORT_1"
+
+   data_problem      = "SPHERE"
+
+   Initial_data {
+      radius            = 2.9
+      center            = 22.5 , 5.5
+
+      uval_inside       = 80.0
+      uval_outside      = 5.0
+
+   }
+
+   Refinement_data {
+      refine_criteria = "UVAL_GRADIENT",
+                        "UVAL_SHOCK",
+                        "UVAL_RICHARDSON"
+
+      UVAL_GRADIENT {
+         grad_tol = 10.0
+      }
+
+      UVAL_SHOCK {
+         shock_tol = 0.10
+         shock_onset = 0.85
+      }
+
+      UVAL_RICHARDSON {
+         rich_tol = 0.001
+      }
+   }
+
+  // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "FLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "XFLOW"
+      }
+   }
+
+}
+
+Main {
+   dim = 2
+   base_name = "test_sync_restart.2d"
+// log file parameters
+   log_all_nodes    = TRUE
+
+// visualization dump parameters
+   viz_dump_interval     = 0         // zero to turn off
+   viz_dump_dirname     = "viz-test-2d-sync-re"
+
+// restart dump parameters
+   restart_interval       = 1         // zero to turn off
+
+   plotting_interval = 0
+
+   timestepping = "SYNCHRONIZED"
+}
+
+CartesianGeometry{
+   domain_boxes	= [(0,0),(29,19)]
+
+   x_lo = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up = 30.e0 , 20.e0 // upper end of computational domain.
+
+   periodic_dimension = 1,0
+}
+
+PatchHierarchy {
+   max_levels = 3         // Maximum number of levels in hierarchy.
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 4 , 4
+      level_2 = 4 , 4
+      level_3 = 4 , 4
+   }
+
+   largest_patch_size {
+      level_0 = 40 , 40
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 16 , 16
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm{
+
+   efficiency_tolerance    = 0.85e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.95e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+BergerRigoutsos {
+  sort_output_nodes = TRUE // Makes results repeatable.
+}
+
+StandardTagAndInitialize {
+//   tagging_method = "GRADIENT_DETECTOR"
+   tagging_method = "RICHARDSON_EXTRAPOLATION"
+}
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.9e0    // max cfl factor used in problem
+   cfl_init                  = 0.9e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+TimeRefinementIntegrator{
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 10       // max number of simulation timesteps
+   regrid_interval      = 2
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
+
+MappedBoxHierarchy {
+   check_input_connectors = 'n'
+   check_output_connectors = 'n'
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,232 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=AutoTester.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/HyperbolicLevelIntegrator.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/HyperbolicPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/MethodOfLinesIntegrator.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/MethodOfLinesPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementIntegrator.I		\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementIntegrator.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementLevelStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h AutoTester.C	\
+	AutoTester.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/applications/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/applications/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,43 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for the applications directory 
+##
+#########################################################################
+
+SAMRAI	      =	@top_srcdir@
+SRCDIR	      =	@srcdir@
+SUBDIR        = source/test/applications
+OBJECT        = ../../..
+
+default: library
+
+include $(OBJECT)/config/Makefile.config
+
+SUBDIRS = LinAdv Euler ConvDiff
+
+library:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+lib1d:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+lib2d:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+lib3d:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+libXd:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+check:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+check2d:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+check3d:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+checkcompile:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+checktest:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+clean:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
diff -r 000000000000 -r 5eda1a3f24e8 source/test/async_comm/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/async_comm/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,126 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=main-async_comm.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommGroup.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommGroup.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h main-async_comm.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=main-peer_comm.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h main-peer_comm.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/async_comm/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/async_comm/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,56 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for the asynchromous communication class tests 
+##
+#########################################################################
+
+SAMRAI	      =	@top_srcdir@
+SRCDIR	      =	@srcdir@
+SUBDIR        = source/test/async_comm
+VPATH	      =	@srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+CPPFLAGS_EXTRA =  -DTESTING=1
+
+default: check
+
+include $(OBJECT)/config/Makefile.config
+
+NUM_TESTS = 2
+
+TEST_NPROCS = @TEST_NPROCS@
+
+main-async_comm: main-async_comm.o $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) main-async_comm.o $(LIBSAMRAI) $(LDLIBS) -o $@
+
+main-peer_comm: main-peer_comm.o $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) main-peer_comm.o $(LIBSAMRAI) $(LDLIBS) -o $@
+
+check:		checkcompile
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main-async_comm test_inputs/async.default.input
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main-peer_comm test_inputs/peer.default.input
+
+check2d:
+	$(MAKE) check
+
+check3d:
+	$(MAKE) check
+
+checkcompile: main-async_comm main-peer_comm
+
+checktest:      checkcompile
+	rm -f makecheck.logfile
+	$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+	$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+	rm -f makecheck.logfile
+
+clean:
+	$(SAMCLEAN)
+	$(RM) main-async_comm main-peer_comm
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/test/async_comm/main-async_comm.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/async_comm/main-async_comm.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,656 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Test program for asynchromous communication classes 
+ *
+ ************************************************************************/
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/AsyncCommGroup.h"
+#include "SAMRAI/tbox/AsyncCommStage.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/TimerManager.h"
+
+#include <iomanip>
+
+using namespace SAMRAI;
+using namespace tbox;
+
+/*
+ ************************************************************************
+ *
+ * This program tests the asynchronous communication classes:
+ * AsyncCommGroup
+ * AsyncCommStage
+ *
+ * 1. Group the processors.  See code for heuristic rule for
+ * defining groups.
+ *
+ * 2. Perform asynchronous communication within each group.
+ *
+ * 3. Check results.
+ *
+ *************************************************************************
+ */
+
+int main(
+   int argc,
+   char* argv[])
+{
+   /*
+    * Initialize MPI, SAMRAI.
+    */
+
+   SAMRAI_MPI::init(&argc, &argv);
+   SAMRAIManager::initialize();
+   SAMRAIManager::startup();
+   tbox::SAMRAI_MPI mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   const int rank = mpi.getRank();
+   int fail_count = 0;
+
+   {
+
+      /*
+       * Process command line arguments.  For each run, the input
+       * filename must be specified.  Usage is:
+       *
+       * executable <input file name>
+       *
+       */
+      std::string input_filename;
+
+      if (argc != 2) {
+         TBOX_ERROR("USAGE:  " << argv[0] << " <input file> \n"
+                                          << "  options:\n"
+                                          << "  none at this time" << std::endl);
+      } else {
+         input_filename = argv[1];
+      }
+
+      /*
+       * Make sure all processes are alive and well before running test.
+       */
+      SAMRAI_MPI::getSAMRAIWorld().Barrier();
+      plog << "Process " << std::setw(5) << rank << " is ready." << std::endl;
+
+      /*
+       * Created a separate communicator for testing,
+       * to avoid possible interference with other communications
+       * by SAMRAI library.
+       */
+      tbox::SAMRAI_MPI::Comm isolated_communicator(MPI_COMM_NULL);
+      if ( tbox::SAMRAI_MPI::usingMPI() ) {
+         tbox::SAMRAI_MPI::getSAMRAIWorld().Comm_dup(&isolated_communicator);
+      }
+      tbox::SAMRAI_MPI isolated_mpi(isolated_communicator);
+      plog << "Process " << std::setw(5) << rank
+           << " duplicated Communicator." << std::endl;
+
+      /*
+       * Create input database and parse all data in input file.
+       */
+
+      Pointer<Database> input_db(new InputDatabase("input_db"));
+      InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      /*
+       * Set up the timer manager.
+       */
+      if (input_db->isDatabase("TimerManager")) {
+         TimerManager::createManager(input_db->getDatabase("TimerManager"));
+      }
+
+      /*
+       * Retrieve "Main" section from input database.
+       * The main database is used only in main().
+       * The base_name variable is a base name for
+       * all name strings in this program.
+       */
+
+      Pointer<Database> main_db = input_db->getDatabase("Main");
+      std::string base_name = "unnamed";
+      base_name = main_db->getStringWithDefault("base_name", base_name);
+
+      /*
+       * Start logging.
+       */
+      const std::string log_file_name = base_name + ".log";
+      bool log_all_nodes = false;
+      log_all_nodes = main_db->getBoolWithDefault("log_all_nodes",
+            log_all_nodes);
+      if (log_all_nodes) {
+         PIO::logAllNodes(log_file_name);
+      } else {
+         PIO::logOnlyNodeZero(log_file_name);
+      }
+
+      plog << "********************* Note! *********************\n"
+           << "* The asychronous communication classes are meant for\n"
+           << "* large processor counts.\n"
+           << "*\n"
+           << "* For this test to be significant, you should run it on\n"
+           << "* lots of processors.  I recommend running on a\n"
+           << "* 'massively parallel' processor count (however you\n"
+           << "* would like to define massively parallel).\n"
+           << "*\n"
+           << "* This program should not be used for performance\n"
+           << "* testing because performance may be context-sensitive\n"
+           << "* and these groups are rather contrived.";
+
+      plog << "\n\n\n";
+
+      const int sync_bcast_cycles =
+         main_db->getIntegerWithDefault("sync_bcast_cycles", 1);
+      const int sync_sumreduce_cycles =
+         main_db->getIntegerWithDefault("sync_sumreduce_cycles", 1);
+      const int asyncany_bcast_cycles =
+         main_db->getIntegerWithDefault("asyncany_bcast_cycles", 1);
+      const int asyncany_sumreduce_cycles =
+         main_db->getIntegerWithDefault("asyncany_sumreduce_cycles", 1);
+      const int asyncsome_bcast_cycles =
+         main_db->getIntegerWithDefault("asyncsome_bcast_cycles", 1);
+      const int asyncsome_sumreduce_cycles =
+         main_db->getIntegerWithDefault("asyncsome_sumreduce_cycles", 1);
+
+      int sync_bcast_count = 0;
+      int sync_sumreduce_count = 0;
+      int asyncany_bcast_count = 0;
+      int asyncany_sumreduce_count = 0;
+      int asyncsome_bcast_count = 0;
+      int asyncsome_sumreduce_count = 0;
+
+      const int def_num_groups = (mpi.getSize() + 1) / 2;
+      plog << "Default num groups: " << def_num_groups << std::endl;
+      const int num_groups =
+         main_db->getIntegerWithDefault("num_groups", def_num_groups);
+      plog << "Num groups: " << num_groups << std::endl;
+      const int num_children =
+         main_db->getIntegerWithDefault("num_children", 2);
+
+      if (mpi.getRank() == 0) {
+         plog << "Running num_groups = " << num_groups << std::endl;
+         plog << "Running num_children = " << num_children << std::endl;
+      }
+
+      int pass_count = 0;
+
+      int gi; // Group index.
+      int ai; // Active group index.
+
+      /*
+       * Output data for stage methods.
+       */
+      AsyncCommStage::MemberVec completed;
+      int num_complete = 0;
+
+      int count = 0;
+      while ((sync_bcast_count < sync_bcast_cycles) ||
+             (sync_sumreduce_count < sync_sumreduce_cycles) ||
+             (asyncany_bcast_count < asyncany_bcast_cycles) ||
+             (asyncany_sumreduce_count < asyncany_sumreduce_cycles) ||
+             (asyncsome_bcast_count < asyncsome_bcast_cycles) ||
+             (asyncsome_sumreduce_count < asyncsome_sumreduce_cycles)) {
+
+         if (mpi.getRank() == 0) {
+            plog << " Starting cycle number " << count << std::endl;
+         }
+
+         plog << "\n\n\n***************** Beginning Cycle Number "
+              << count << " *******************\n\n";
+
+         Array<Array<int> > group_ids(num_groups);
+         Array<int> owners(num_groups);
+         Array<int> active_flags(num_groups);
+
+         Array<int> active_groups(num_groups);
+         int num_active_groups = 0;
+
+         /*
+          * Define groups.
+          * Group n includes all process whose rank divisible by n+1 -- with
+          * a slight variation.  With each testing cycle, the "rank" is
+          * increased by one.
+          * Set owner of each group to roughly the processor in the middle
+          * of the group.
+          */
+         for (int n = 0; n < num_groups; ++n) {
+
+            int gsize = (mpi.getSize() + n) / (n + 1);
+            group_ids[n].resizeArray(gsize);
+            active_flags[n] = false;
+            for (int i = 0; i < gsize; ++i) {
+               group_ids[n][i] = i * (n + 1);
+               group_ids[n][i] =
+                  (group_ids[n][i] + count) % mpi.getSize();
+               if (group_ids[n][i] == rank) {
+                  active_groups[num_active_groups++] = n;
+                  active_flags[n] = true;
+               }
+            }
+
+            owners[n] = group_ids[n][gsize / 2];
+
+         }
+         active_groups.resizeArray(num_active_groups);
+
+         /*
+          * Write out group data.
+          */
+         plog << "Group definitions (" << num_groups << " groups):\n";
+         plog << "(Groups with '*' contains the local process, "
+              << rank << ".)\n";
+         plog << "(Groups with '**' is owned by the local process\n\n";
+         plog << " ID  size owner members...\n";
+         for (int n = 0; n < num_groups; ++n) {
+            plog << std::setw(3) << n
+            << std::setw(5) << group_ids[n].size()
+            << std::setw(4) << owners[n]
+            << (active_flags[n] ? '*' : ' ')
+            << (owners[n] == rank ? '*' : ' ') << ':';
+            for (int i = 0; i < group_ids[n].size(); ++i) {
+               plog << "  " << group_ids[n][i];
+            }
+            plog << '\n';
+         }
+         plog << '\n';
+
+         plog << "Active groups (" << num_active_groups << " groups):";
+         for (ai = 0; ai < num_active_groups; ++ai) {
+            plog << "  " << active_groups[ai];
+         }
+         plog << "\n\n";
+
+         /*
+          * Initialize data for sum-reduce tests.
+          * Compute the correct sum for comparison.
+          */
+
+         Array<int> sum(num_active_groups);
+         Array<int> correct_sum(num_active_groups);
+
+         for (ai = 0; ai < num_active_groups; ++ai) {
+            sum[ai] = 1 + rank;
+            correct_sum[ai] = 0;
+            Array<int>& g = group_ids[active_groups[ai]];
+            for (int j = 0; j < g.size(); ++j) {
+               correct_sum[ai] += 1 + g[j];
+            }
+         }
+
+         /*
+          * Initialize data for broadcast test.
+          * Broadcast data is 1001 + the group index.
+          */
+         Array<int> bcdata(num_active_groups);
+         Array<int> correct_bcdata(num_active_groups);
+         for (ai = 0; ai < num_active_groups; ++ai) {
+            gi = active_groups[ai];
+            bcdata[ai] = rank == owners[gi] ? 1001 + gi : -1;
+            correct_bcdata[ai] = 1001 + gi;
+         }
+
+         /*
+          * Create the communication stage and groups.
+          * Each group uses its group index as the MPI tag.
+          */
+         AsyncCommStage comm_stage;
+         AsyncCommGroup* comm_groups = new AsyncCommGroup[num_active_groups];
+         for (ai = 0; ai < num_active_groups; ++ai) {
+            gi = active_groups[ai];
+            plog << "Initializing group " << gi << "\n";
+            comm_groups[ai].initialize(num_children,
+               &comm_stage);
+            comm_groups[ai].setGroupAndRootRank(isolated_mpi,
+               group_ids[gi].getPointer(),
+               group_ids[gi].size(),
+               owners[gi]);
+            comm_groups[ai].setMPITag(1000000 * count + gi);
+            comm_groups[ai].setUseBlockingSendToParent(false);
+            comm_groups[ai].setUseBlockingSendToChildren(false);
+         }
+
+         if (sync_bcast_count < sync_bcast_cycles) {
+            /*
+             * For the synchronous (groupwise) broadcast test,
+             * each group broadcasts the its group id.
+             */
+            plog << "\n\n\n*********** Synchronous Broadcast "
+                 << sync_bcast_count << " ************\n";
+            for (ai = 0; ai < num_active_groups; ++ai)
+               if (rank != owners[active_groups[ai]]) bcdata[ai] = -1;
+            plog << "Job Group Result Correct  Note\n";
+            for (ai = 0; ai < num_active_groups; ++ai) {
+               AsyncCommGroup& comm_group = comm_groups[ai];
+               comm_group.beginBcast(&bcdata[ai], 1);
+               comm_group.completeCurrentOperation();
+               TBOX_ASSERT(comm_group.isDone());
+               gi = active_groups[ai];
+               plog << std::setw(3) << ai
+               << std::setw(5) << gi
+               << std::setw(8) << bcdata[ai]
+               << std::setw(8) << correct_bcdata[ai]
+               ;
+               plog << "  Bcast difference = "
+               << bcdata[ai] - correct_bcdata[ai];
+               if (bcdata[ai] != correct_bcdata[ai]) {
+                  plog << "  Error!";
+                  tbox::pout << "Error in bcast result for group "
+                             << gi << std::endl;
+                  ++fail_count;
+               } else ++pass_count;
+               plog << std::endl;
+            }
+            for (ai = 0; ai < num_active_groups; ++ai) {
+               TBOX_ASSERT(comm_groups[ai].isDone());
+            }
+            TBOX_ASSERT(!comm_stage.hasPendingRequests());
+            ++sync_bcast_count;
+         }
+
+         if (sync_sumreduce_count < sync_sumreduce_cycles) {
+            /*
+             * For the sum advanceSome reduce test,
+             * each group sums up the ranks of its members, plus 1.
+             */
+            plog << "\n\n\n*********** Synchronous Sum Reduce "
+                 << sync_sumreduce_count << " ************\n";
+            for (ai = 0; ai < num_active_groups; ++ai) sum[ai] = 1 + rank;
+            plog << "Job Group Result Correct  Note\n";
+            for (ai = 0; ai < num_active_groups; ++ai) {
+               AsyncCommGroup& comm_group = comm_groups[ai];
+               comm_group.beginSumReduce(&sum[ai], 1);
+               comm_group.completeCurrentOperation();
+               TBOX_ASSERT(comm_group.isDone());
+               gi = active_groups[ai];
+               plog << std::setw(3) << ai
+               << std::setw(5) << gi
+               << std::setw(8) << sum[ai]
+               << std::setw(8) << correct_sum[ai]
+               ;
+               if (rank == owners[gi]) {
+                  plog << "  Sum reduce difference = "
+                  << sum[ai] - correct_sum[ai];
+                  if (sum[ai] != correct_sum[ai]) {
+                     plog << "  Error!";
+                     tbox::pout << "Error in sum reduce result for group "
+                                << gi << std::endl;
+                     ++fail_count;
+                  } else ++pass_count;
+               } else {
+                  plog << "  Not owner (not checking)";
+               }
+               plog << std::endl;
+            }
+            for (ai = 0; ai < num_active_groups; ++ai) {
+               TBOX_ASSERT(comm_groups[ai].isDone());
+            }
+            TBOX_ASSERT(!comm_stage.hasPendingRequests());
+            ++sync_sumreduce_count;
+         }
+
+         if (asyncany_bcast_count < asyncany_bcast_cycles) {
+            /*
+             * For the advanceSome broadcast test,
+             * each group broadcasts the its group id.
+             */
+            plog << "\n\n\n*********** advanceAny Broadcast "
+                 << asyncany_bcast_count << " ************\n";
+            for (ai = 0; ai < num_active_groups; ++ai)
+               if (rank != owners[active_groups[ai]]) bcdata[ai] = -1;
+            plog << "Job Group Result Correct  Note\n";
+            ai = 0;
+            int counter = 0;
+            while (counter < num_active_groups ||
+                   comm_stage.hasPendingRequests()) {
+               AsyncCommGroup* completed_group = NULL;
+               if (counter < num_active_groups) {
+                  if (comm_groups[counter].beginBcast(&bcdata[counter], 1)) {
+                     TBOX_ASSERT(comm_groups[counter].isDone());
+                     completed_group = &comm_groups[counter];
+                  }
+                  ++counter;
+               } else {
+                  AsyncCommStage::Member* completed_member =
+                     comm_stage.advanceAny();
+                  completed_group =
+                     dynamic_cast<AsyncCommGroup *>(completed_member);
+                  TBOX_ASSERT(completed_group != NULL);
+               }
+               if (completed_group != NULL) {
+                  ai = static_cast<int>(completed_group - comm_groups);
+                  gi = active_groups[ai];
+                  plog << std::setw(3) << ai
+                  << std::setw(5) << gi
+                  << std::setw(8) << bcdata[ai]
+                  << std::setw(8) << correct_bcdata[ai]
+                  ;
+                  plog << "  Bcast difference = "
+                  << bcdata[ai] - correct_bcdata[ai];
+                  if (bcdata[ai] != correct_bcdata[ai]) {
+                     plog << "  Error!";
+                     tbox::pout << "Error in bcast result for group "
+                                << gi << std::endl;
+                     ++fail_count;
+                  } else ++pass_count;
+                  plog << std::endl;
+                  TBOX_ASSERT(comm_groups[ai].isDone());
+               }
+               ++ai;
+            }
+            for (ai = 0; ai < num_active_groups; ++ai) {
+               TBOX_ASSERT(comm_groups[ai].isDone());
+            }
+            TBOX_ASSERT(!comm_stage.hasPendingRequests());
+            ++asyncany_bcast_count;
+         }
+
+         if (asyncany_sumreduce_count < asyncany_sumreduce_cycles) {
+            /*
+             * For the advanceSome broadcast test,
+             * each group broadcasts the its group id.
+             */
+            plog << "\n\n\n*********** advanceAny Sum Reduce "
+                 << asyncany_sumreduce_count << " ************\n";
+            for (ai = 0; ai < num_active_groups; ++ai) sum[ai] = 1 + rank;
+            plog << "Job Group Result Correct  Note\n";
+            ai = 0;
+            int counter = 0;
+            while (counter < num_active_groups ||
+                   comm_stage.hasPendingRequests()) {
+               AsyncCommGroup* completed_group = NULL;
+               if (counter < num_active_groups) {
+                  if (comm_groups[counter].beginSumReduce(&sum[counter], 1)) {
+                     TBOX_ASSERT(comm_groups[counter].isDone());
+                     completed_group = &comm_groups[counter];
+                  }
+                  ++counter;
+               } else {
+                  AsyncCommStage::Member* completed_member =
+                     comm_stage.advanceAny();
+                  completed_group =
+                     dynamic_cast<AsyncCommGroup *>(completed_member);
+                  TBOX_ASSERT(completed_group != NULL);
+               }
+               if (completed_group != NULL) {
+                  ai = static_cast<int>(completed_group - comm_groups);
+                  gi = active_groups[ai];
+                  plog << std::setw(3) << ai
+                  << std::setw(5) << gi
+                  << std::setw(8) << sum[ai]
+                  << std::setw(8) << correct_sum[ai]
+                  ;
+                  if (rank == owners[gi]) {
+                     plog << "  Sum reduce difference = "
+                     << sum[ai] - correct_sum[ai];
+                     if (sum[ai] != correct_sum[ai]) {
+                        plog << "  Error!";
+                        tbox::pout << "Error in sum reduce result for group "
+                                   << gi << std::endl;
+                        ++fail_count;
+                     } else ++pass_count;
+                  } else {
+                     plog << "  Not owner (not checking)";
+                  }
+                  plog << std::endl;
+                  TBOX_ASSERT(comm_groups[ai].isDone());
+               }
+               ++ai;
+            }
+            for (ai = 0; ai < num_active_groups; ++ai) {
+               TBOX_ASSERT(comm_groups[ai].isDone());
+            }
+            TBOX_ASSERT(!comm_stage.hasPendingRequests());
+            ++asyncany_sumreduce_count;
+         }
+
+         if (asyncsome_bcast_count < asyncsome_bcast_cycles) {
+            /*
+             * For the advanceSome broadcast test,
+             * each group broadcasts the its group id.
+             */
+            plog << "\n\n\n*********** advanceSome Broadcast "
+                 << asyncsome_bcast_count << " ************\n";
+            for (ai = 0; ai < num_active_groups; ++ai)
+               if (rank != owners[active_groups[ai]]) bcdata[ai] = -1;
+            completed.resize(num_active_groups);
+            num_complete = 0;
+            for (ai = 0; ai < num_active_groups; ++ai) {
+               AsyncCommGroup& comm_group = comm_groups[ai];
+               bool fin = comm_group.beginBcast(&bcdata[ai], 1);
+               if (fin) {
+                  completed[num_complete++] = &comm_groups[ai];
+               }
+            }
+            plog << "Job Group Result Correct  Note\n";
+            do {
+               for (int n = 0; n < num_complete; ++n) {
+                  AsyncCommGroup* completed_group =
+                     dynamic_cast<AsyncCommGroup *>(completed[n]);
+                  TBOX_ASSERT(completed_group != NULL);
+                  ai = static_cast<int>(completed_group - comm_groups);
+                  gi = active_groups[ai];
+                  plog << std::setw(3) << ai
+                  << std::setw(5) << gi
+                  << std::setw(8) << bcdata[ai]
+                  << std::setw(8) << correct_bcdata[ai]
+                  ;
+                  plog << "  Bcast difference = "
+                  << bcdata[ai] - correct_bcdata[ai];
+                  if (bcdata[ai] != correct_bcdata[ai]) {
+                     plog << "  Error!";
+                     tbox::pout << "Error in bcast result for group "
+                                << gi << std::endl;
+                     ++fail_count;
+                  } else ++pass_count;
+                  plog << std::endl;
+                  TBOX_ASSERT(comm_groups[ai].isDone());
+               }
+               num_complete = static_cast<int>(comm_stage.advanceSome(completed));
+            } while (num_complete != 0);
+            for (ai = 0; ai < num_active_groups; ++ai) {
+               TBOX_ASSERT(comm_groups[ai].isDone());
+            }
+            TBOX_ASSERT(!comm_stage.hasPendingRequests());
+            ++asyncsome_bcast_count;
+         }
+
+         if (asyncsome_sumreduce_count < asyncsome_sumreduce_cycles) {
+            /*
+             * For the sum advanceSome reduce test,
+             * each group sums up the ranks of its members, plus 1.
+             */
+            plog << "\n\n\n*********** advanceSome Sum Reduce "
+                 << asyncsome_sumreduce_count << " ************\n";
+            for (ai = 0; ai < num_active_groups; ++ai) sum[ai] = 1 + rank;
+            completed.resize(num_active_groups);
+            num_complete = 0;
+            for (ai = 0; ai < num_active_groups; ++ai) {
+               AsyncCommGroup& comm_group = comm_groups[ai];
+               bool fin = comm_group.beginSumReduce(&sum[ai], 1);
+               if (fin) {
+                  completed[num_complete++] = &comm_groups[ai];
+               }
+            }
+            plog << "Job Group Result Correct  Note\n";
+            do {
+               for (int n = 0; n < num_complete; ++n) {
+                  AsyncCommGroup* completed_group =
+                     dynamic_cast<AsyncCommGroup *>(completed[n]);
+                  TBOX_ASSERT(completed_group != NULL);
+                  ai = static_cast<int>(completed_group - comm_groups);
+                  gi = active_groups[ai];
+                  plog << std::setw(3) << ai
+                  << std::setw(5) << gi
+                  << std::setw(8) << sum[ai]
+                  << std::setw(8) << correct_sum[ai]
+                  ;
+                  if (rank == owners[gi]) {
+                     plog << "  Sum reduce difference = "
+                     << sum[ai] - correct_sum[ai];
+                     if (sum[ai] != correct_sum[ai]) {
+                        plog << "  Error!";
+                        tbox::pout << "Error in sum reduce result for group "
+                                   << gi << std::endl;
+                        ++fail_count;
+                     } else ++pass_count;
+                  } else {
+                     plog << "  Not owner (not checking)";
+                  }
+                  plog << std::endl;
+                  TBOX_ASSERT(comm_groups[ai].isDone());
+               }
+               num_complete = static_cast<int>(
+                  comm_stage.advanceSome(completed));
+            } while (num_complete != 0);
+            for (ai = 0; ai < num_active_groups; ++ai) {
+               TBOX_ASSERT(comm_groups[ai].isDone());
+            }
+            TBOX_ASSERT(!comm_stage.hasPendingRequests());
+            ++asyncsome_sumreduce_count;
+         }
+
+         ++count;
+         delete[] comm_groups;
+      }
+
+      plog << '\n';
+      plog << "pass_count = " << pass_count << std::endl;
+      plog << "fail_count = " << fail_count << std::endl;
+      plog << "\n************** Test completed **************\n" << std::endl;
+      input_db->printClassData(tbox::plog);
+
+      /*
+       * Clean up and exit.
+       */
+
+      TimerManager::getManager()->print(plog);
+
+#if defined(HAVE_MPI)
+      MPI_Comm_free(&isolated_communicator);
+#endif
+
+   }
+
+   if (fail_count == 0) {
+      tbox::pout << "\nPASSED:  peer_comm" << std::endl;
+   }
+
+   SAMRAIManager::shutdown();
+   SAMRAIManager::finalize();
+
+   if (fail_count == 0) {
+      SAMRAI_MPI::finalize();
+   } else {
+      plog << "Process " << std::setw(5) << rank << " aborting." << std::endl;
+      SAMRAI::tbox::Utilities::abort("Aborting due to nonzero fail count",
+         __FILE__, __LINE__);
+   }
+
+   plog << "Process " << std::setw(5) << rank << " exiting." << std::endl;
+   return fail_count;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/async_comm/main-peer_comm.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/async_comm/main-peer_comm.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,562 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Test program for asynchromous peer communication classes 
+ *
+ ************************************************************************/
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/AsyncCommStage.h"
+#include "SAMRAI/tbox/AsyncCommPeer.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/TimerManager.h"
+
+#include <iomanip>
+#include <vector>
+
+using namespace SAMRAI;
+using namespace tbox;
+
+/*
+ ************************************************************************
+ * Define data to communicate, based on sender, recipient and count.
+ ************************************************************************
+ */
+template<class TYPE>
+class TypeIndependentTester
+{
+
+public:
+   void
+   runTest(
+      int& pass_count,
+      int& fail_count,
+      tbox::SAMRAI_MPI::Comm isolated_communicator,
+      int max_first_data_length,
+      int use_advance_some,
+      int num_cycles,
+      int group_rel_first,
+      int group_rel_last);
+   void setSendData(
+      int fr,
+      int to,
+      int count,
+      std::vector<TYPE>& send_data) {
+      (void)to;
+      send_data.resize(count);
+      for (int i = 0; i < count; ++i) send_data[i] = (TYPE)(fr + count + i);
+   }
+   bool checkRecvData(
+      int fr,
+      int to,
+      int count,
+      int recv_size,
+      const TYPE* recv_data,
+      std::string& size_correct,
+      std::string& data_correct) {
+      (void)to;
+
+      bool rval = false;
+      if (recv_size == count) size_correct = "SIZE OK";
+      else {
+         size_correct = "WRONG SIZE";
+         rval = true;
+      }
+      data_correct = "DATA OK";
+      for (int i = 0; i < count; ++i) {
+         if (!tbox::MathUtilities<double>::equalEps(recv_data[i], fr + count
+                + i)) {
+            data_correct = " WRONG DATA";
+            rval = true;
+            break;
+         }
+      }
+      return rval;
+   }
+};
+
+template<class TYPE>
+void TypeIndependentTester<TYPE>::runTest(
+   int& pass_count,
+   int& fail_count,
+   tbox::SAMRAI_MPI::Comm isolated_communicator,
+   int max_first_data_length,
+   int use_advance_some,
+   int num_cycles,
+   int group_rel_first,
+   int group_rel_last)
+{
+   tbox::SAMRAI_MPI mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   const int nproc = mpi.getSize();
+   const int iproc = mpi.getRank();
+
+   /*
+    * Compute group size from the range given by group_rel_first
+    * and group_rel_last, but to avoid duplicating members, don't
+    * let group get bigger than nproc.
+    */
+   if (group_rel_last < group_rel_first) {
+      TBOX_ERROR("Invalid input: group_rel_last < group_rel_first");
+   }
+   const int group_size =
+      tbox::MathUtilities<int>::Min(group_rel_last - group_rel_first + 1, nproc);
+
+   plog << num_cycles << " cycles." << std::endl;
+   plog << "num procs = " << nproc << std::endl;
+   plog << "group size = " << group_size << std::endl;
+
+   pass_count = 0;
+   fail_count = 0;
+
+   if (group_size < 2) {
+      plog << "Bypassing TypeIndependentTester::runTest due to trivial group size.\n";
+      return;
+   }
+
+   /*
+    * Allocate 2*group_size communication objects.  The group_size objects
+    * are senders, the others are receivers.
+    */
+   AsyncCommPeer<TYPE>* peer_comms = new AsyncCommPeer<TYPE>[2 * group_size];
+   AsyncCommStage stage;
+
+   // Counter for number of completions of each communication group.
+   std::vector<int> completion_counter(2 * group_size);
+
+   for (int i = 0; i < 2 * group_size; ++i) {
+      peer_comms[i].initialize(&stage);
+      peer_comms[i].setMPI(SAMRAI_MPI(isolated_communicator));
+      peer_comms[i].setMPITag(0, 1);
+      peer_comms[i].limitFirstDataLength(max_first_data_length);
+      completion_counter[i] = 0;
+   }
+
+   /*
+    * First half of peer_comms is used for sending.
+    * Second half is used for receiving.
+    * Set peer ranks for each object in peer_comms.
+    */
+
+   for (int i = 0; i < group_size; ++i) {
+      int peer_rank = iproc + group_rel_first + i;
+      while (peer_rank < 0) peer_rank += nproc;
+      peer_rank %= nproc;
+      peer_comms[i].setPeerRank(peer_rank);
+      plog << "Proc " << std::setw(3) << iproc
+           << " peer_comms[" << std::setw(3) << i
+           << "] send to " << std::setw(3) << peer_rank << std::endl;
+   }
+
+   for (int i = 0; i < group_size; ++i) {
+      int peer_rank = iproc - group_rel_last + i;
+      while (peer_rank < 0) peer_rank += nproc;
+      peer_rank %= nproc;
+      peer_comms[i + group_size].setPeerRank(peer_rank);
+      plog << "Proc " << std::setw(3) << iproc
+           << " peer_comms[" << std::setw(3) << i + group_size
+           << "] recv fr " << std::setw(3) << peer_rank << std::endl;
+   }
+
+   AsyncCommStage::MemberVec completed_members(1);
+
+   /*
+    * Test loop.  Each process will send and receive from every
+    * member in its group num_cycles times.
+    *
+    * completion_counter tracks how many
+    * of these operations have completed.
+    */
+   int count = 0;
+   while (count < 2 * group_size * num_cycles) {
+
+      /*
+       * Find a list of completed members using either advanceSome
+       * or advanceAny, as controlled by input file.
+       */
+      if (use_advance_some) {
+         stage.advanceSome(completed_members);
+      } else {
+         completed_members.resize(1);
+         completed_members[0] = stage.advanceAny();
+         if (completed_members[0] == NULL) completed_members.clear();
+      }
+
+      /*
+       * Check completed members for correctness.
+       */
+      for (size_t i = 0; i < completed_members.size(); ++i) {
+
+         AsyncCommStage::Member* completed_member = completed_members[i];
+
+         /*
+          * If there has been a completed prop, process it.
+          * Else process everything that has not reached
+          * the required number of test cycles.
+          */
+
+         AsyncCommPeer<TYPE>* completed_comm_ =
+            dynamic_cast<AsyncCommPeer<TYPE> *>(completed_member);
+         AsyncCommPeer<TYPE>& completed_comm = *completed_comm_;
+
+         int completed_comm_index = static_cast<int>(completed_comm_ - peer_comms);
+
+         /*
+          * Whether completed_comm is a sender or receiver is based on its index in peer_comms.
+          */
+         if (completed_comm_index < group_size) {
+            // completed_comm is a sender.  No accuracy checks needed.
+            plog << "comm_peer[" << std::setw(3) << completed_comm_index
+            << "] finished send # " << std::setw(3)
+            << completion_counter[completed_comm_index]
+            << " to " << std::setw(3) << completed_comm.getPeerRank() << "."
+            << std::endl;
+         } else {
+            // completed_comm is a receiver.  Do accuracy check on received data.
+            std::string size_correct, data_correct;
+            bool fail = checkRecvData(completed_comm.getPeerRank(),
+                  iproc,
+                  completion_counter[completed_comm_index],
+                  completed_comm.getRecvSize(),
+                  completed_comm.getRecvData(),
+                  size_correct,
+                  data_correct);
+            plog << "comm_peer[" << std::setw(3) << completed_comm_index
+            << "] finished recv # " << std::setw(3)
+            << completion_counter[completed_comm_index]
+            << " fr " << std::setw(3) << completed_comm.getPeerRank() << ": "
+            << std::setw(5) << size_correct << ' '
+            << std::setw(5) << data_correct << ' '
+            << std::endl;
+            if (fail) ++fail_count;
+            else ++pass_count;
+         }
+
+         // Count number of completions for the current AsyncCommPeer.
+         ++completion_counter[completed_comm_index];
+
+         // Count number of completions for the whole test.
+         ++count;
+
+      }
+
+      /*
+       * Launch another cycle for members that are done but have not
+       * completed all required cycles.
+       */
+      for (int i = 0; i < 2 * group_size; ++i) {
+
+         AsyncCommPeer<TYPE>& peer_comm = peer_comms[i];
+
+         if (completion_counter[i] < num_cycles &&
+             peer_comm.isDone()) {
+
+            if (i < group_size) {
+               // This is a sender.
+               peer_comm.setMPITag(2 * completion_counter[i],
+                  2 * completion_counter[i] + 1);
+               std::vector<TYPE> send_data;
+               setSendData(iproc,
+                  peer_comm.getPeerRank(),
+                  completion_counter[i],
+                  send_data);
+               peer_comm.beginSend(send_data.size() > 0 ? &send_data[0] : NULL,
+                  static_cast<int>(send_data.size()));
+               /*
+                * Check if the new communication is done (because if it is,
+                * the stage won't detect it--stage only detects non-NULL request.
+                */
+               if (peer_comm.isDone()) {
+                  plog << "comm_peer[" << std::setw(3) << i
+                  << "] finished send # " << std::setw(3)
+                  << completion_counter[i]
+                  << " items of size " << sizeof(TYPE) << " to "
+                  << std::setw(3) << peer_comm.getPeerRank() << "."
+                  << std::endl;
+                  ++completion_counter[i];
+                  ++count;
+               }
+            } else {
+               // This is a receiver.
+               peer_comm.setMPITag(2 * completion_counter[i],
+                  2 * completion_counter[i] + 1);
+               peer_comm.beginRecv();
+               /*
+                * Check if the new communication is done (because if it is,
+                * the stage won't detect it--stage only detects non-NULL request.
+                */
+               if (peer_comm.isDone()) {
+                  std::string size_correct, data_correct;
+                  bool fail = checkRecvData(peer_comm.getPeerRank(),
+                        iproc,
+                        completion_counter[i],
+                        peer_comm.getRecvSize(),
+                        peer_comm.getRecvData(),
+                        size_correct,
+                        data_correct);
+                  plog << "comm_peer[" << std::setw(3) << i
+                  << "] finished recv # " << std::setw(3)
+                  << completion_counter[i]
+                  << " items of size " << sizeof(TYPE) << " fr "
+                  << std::setw(3) << peer_comm.getPeerRank() << ": "
+                  << std::setw(5) << size_correct << ' '
+                  << std::setw(5) << data_correct << ' '
+                  << std::endl;
+                  if (fail) ++fail_count;
+                  else ++pass_count;
+                  ++completion_counter[i];
+                  ++count;
+               }
+            }
+
+         }
+
+      }
+
+   }
+
+   delete[] peer_comms;
+}
+
+template class TypeIndependentTester<int>;
+template class TypeIndependentTester<float>;
+template class TypeIndependentTester<double>;
+template class TypeIndependentTester<char>;
+
+/*
+ ************************************************************************
+ *
+ * This program tests the asynchronous communication classes:
+ * AsyncCommPeer
+ * AsyncCommStage
+ *
+ *************************************************************************
+ */
+
+int main(
+   int argc,
+   char* argv[])
+{
+   /*
+    * Initialize MPI, SAMRAI.
+    */
+
+   SAMRAI_MPI::init(&argc, &argv);
+   SAMRAIManager::initialize();
+   SAMRAIManager::startup();
+   tbox::SAMRAI_MPI mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   const int iproc = mpi.getRank();
+   int total_fail_count = 0;
+
+   {
+
+      /*
+       * Process command line arguments.  For each run, the input
+       * filename must be specified.  Usage is:
+       *
+       * executable <input file name>
+       *
+       */
+      std::string input_filename;
+
+      if (argc != 2) {
+         TBOX_ERROR("USAGE:  " << argv[0] << " <input file> \n"
+                                          << "  options:\n"
+                                          << "  none at this time" << std::endl);
+      } else {
+         input_filename = argv[1];
+      }
+
+      /*
+       * Make sure all processes are alive and well before running test.
+       */
+      SAMRAI_MPI::getSAMRAIWorld().Barrier();
+      plog << "Process " << std::setw(5) << iproc << " is ready." << std::endl;
+
+      /*
+       * Created a separate communicator for testing,
+       * to avoid possible interference with other communications
+       * by SAMRAI library.
+       */
+      tbox::SAMRAI_MPI::Comm isolated_communicator(MPI_COMM_NULL);
+      if ( tbox::SAMRAI_MPI::usingMPI() ) {
+         tbox::SAMRAI_MPI::getSAMRAIWorld().Comm_dup(&isolated_communicator);
+      }
+      tbox::SAMRAI_MPI isolated_mpi(isolated_communicator);
+      plog << "Process " << std::setw(5) << isolated_mpi.getRank()
+           << " duplicated Communicator." << std::endl;
+
+      /*
+       * Create input database and parse all data in input file.
+       */
+
+      Pointer<Database> input_db(new InputDatabase("input_db"));
+      InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      /*
+       * Set up the timer manager.
+       */
+      if (input_db->isDatabase("TimerManager")) {
+         TimerManager::createManager(input_db->getDatabase("TimerManager"));
+      }
+
+      /*
+       * Retrieve "Main" section from input database.
+       * The main database is used only in main().
+       * The base_name variable is a base name for
+       * all name strings in this program.
+       */
+
+      Pointer<Database> main_db = input_db->getDatabase("Main");
+      std::string base_name = "unnamed";
+      base_name = main_db->getStringWithDefault("base_name", base_name);
+
+      int max_first_data_length =
+         main_db->getIntegerWithDefault("max_first_data_length", 1);
+
+      bool use_advance_some = false;
+      use_advance_some = main_db->getBoolWithDefault("use_advance_some",
+            use_advance_some);
+
+      /*
+       * Start logging.
+       */
+      const std::string log_file_name = base_name + ".log";
+      bool log_all_nodes = false;
+      log_all_nodes = main_db->getBoolWithDefault("log_all_nodes",
+            log_all_nodes);
+      if (log_all_nodes) {
+         PIO::logAllNodes(log_file_name);
+      } else {
+         PIO::logOnlyNodeZero(log_file_name);
+      }
+
+      plog << "********************* Note! *********************\n"
+           << "* The asychronous communication classes are meant for\n"
+           << "* large processor counts.\n"
+           << "*\n"
+           << "* For this test to be significant, you should run it on\n"
+           << "* lots of processors.  I recommend running on a\n"
+           << "* 'massively parallel' processor count (however you\n"
+           << "* would like to define massively parallel).\n"
+           << "*\n"
+           << "* This program should not be used for performance\n"
+           << "* testing because performance may be context-sensitive\n"
+           << "* and these groups are rather contrived.";
+
+      plog << "\n\n\n";
+
+      const int num_cycles =
+         main_db->getIntegerWithDefault("num_cycles", 1);
+
+      const int group_rel_first =
+         main_db->getIntegerWithDefault("group_rel_first", 0);
+      const int group_rel_last =
+         main_db->getIntegerWithDefault("group_rel_last", 1);
+
+      int pass_count, fail_count;
+
+      plog << "\nTesting passing integer data:\n";
+      plog << "sizeof(int) = " << sizeof(int) << "\n";
+      TypeIndependentTester<int> tester_int;
+      tester_int.runTest(pass_count,
+         fail_count,
+         isolated_communicator,
+         max_first_data_length,
+         use_advance_some,
+         num_cycles,
+         group_rel_first,
+         group_rel_last);
+      plog << "pass_count = " << pass_count << std::endl;
+      plog << "bad_count  = " << fail_count << std::endl;
+      total_fail_count += fail_count;
+
+      plog << "\nTesting passing float data:\n";
+      plog << "sizeof(float) = " << sizeof(float) << "\n";
+      TypeIndependentTester<float> tester_float;
+      tester_float.runTest(pass_count,
+         fail_count,
+         isolated_communicator,
+         max_first_data_length,
+         use_advance_some,
+         num_cycles,
+         group_rel_first,
+         group_rel_last);
+      plog << "pass_count = " << pass_count << std::endl;
+      plog << "bad_count  = " << fail_count << std::endl;
+      total_fail_count += fail_count;
+
+      plog << "\nTesting passing double data:\n";
+      plog << "sizeof(double) = " << sizeof(double) << "\n";
+      TypeIndependentTester<double> tester_double;
+      tester_double.runTest(pass_count,
+         fail_count,
+         isolated_communicator,
+         max_first_data_length,
+         use_advance_some,
+         num_cycles,
+         group_rel_first,
+         group_rel_last);
+      plog << "pass_count = " << pass_count << std::endl;
+      plog << "bad_count  = " << fail_count << std::endl;
+      total_fail_count += fail_count;
+
+      plog << "\nTesting passing char data:\n";
+      plog << "sizeof(char) = " << sizeof(char) << "\n";
+      TypeIndependentTester<char> tester_char;
+      tester_char.runTest(pass_count,
+         fail_count,
+         isolated_communicator,
+         max_first_data_length,
+         use_advance_some,
+         num_cycles,
+         group_rel_first,
+         group_rel_last);
+      plog << "pass_count = " << pass_count << std::endl;
+      plog << "bad_count  = " << fail_count << std::endl;
+      total_fail_count += fail_count;
+
+      plog << "\n************** Test completed **************\n" << std::endl;
+      input_db->printClassData(tbox::plog);
+
+      /*
+       * Clean up and exit.
+       */
+
+      TimerManager::getManager()->print(plog);
+
+#if defined(HAVE_MPI)
+      MPI_Comm_free(&isolated_communicator);
+#endif
+
+      plog << "Process " << std::setw(5) << iproc << " got " << fail_count
+           << " failures and " << pass_count << " successes." << std::endl;
+
+   }
+
+   if (total_fail_count == 0) {
+      tbox::pout << "\nPASSED:  peer_comm" << std::endl;
+   }
+
+   SAMRAIManager::shutdown();
+   SAMRAIManager::finalize();
+
+   if (total_fail_count == 0) {
+      SAMRAI_MPI::finalize();
+   } else {
+      perr << "Process " << std::setw(5) << iproc << " got "
+           << total_fail_count
+           << " failures.  Aborting." << std::endl;
+      SAMRAI::tbox::Utilities::abort("Aborting due to nonzero fail count",
+         __FILE__, __LINE__);
+   }
+
+   plog << "Process " << std::setw(5) << iproc << " exiting." << std::endl;
+
+   return total_fail_count;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/async_comm/test_inputs/async.default.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/async_comm/test_inputs/async.default.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,36 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   $Description 
+ *
+ ************************************************************************/
+
+Main {
+
+        // Number of communication groups in test:
+        num_groups = 10
+
+        // Whether to log all nodes:
+        log_all_nodes = TRUE
+
+        // Number of children per branching of the communication tree:
+        // (2 children creates a binary tree.)
+        num_children = 2
+
+        // Test selection:
+        //
+        // Set number of cycles to 0 to disable.
+
+        sync_bcast_cycles = 8
+        sync_sumreduce_cycles = 8
+
+        asyncany_bcast_cycles = 8
+        asyncany_sumreduce_cycles = 8
+
+        asyncsome_bcast_cycles = 8
+        asyncsome_sumreduce_cycles = 8
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/async_comm/test_inputs/default.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/async_comm/test_inputs/default.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,20 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for asynchronous communication tests. 
+ *
+ ************************************************************************/
+
+        sync_bcast_cycles = 8
+        sync_sumreduce_cycles = 8
+
+        asyncany_bcast_cycles = 8
+        asyncany_sumreduce_cycles = 8
+
+        asyncsome_bcast_cycles = 8
+        asyncsome_sumreduce_cycles = 8
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/async_comm/test_inputs/peer.default.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/async_comm/test_inputs/peer.default.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,28 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   $Description 
+ *
+ ************************************************************************/
+
+Main {
+
+        base_name = "peer_test"
+
+        // Whether to log all nodes:
+        log_all_nodes = TRUE
+
+        num_cycles = 20
+
+        max_first_data_length = 6
+
+        // First and last in group.  Specify rank relative to local rank.
+        group_rel_first = -3
+        group_rel_last = 4
+
+        use_advance_some = TRUE
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/boundary/BoundaryDataTester.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/boundary/BoundaryDataTester.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,988 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Class to test usage of boundary utilities 
+ *
+ ************************************************************************/
+
+#include "BoundaryDataTester.h"
+
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/xfer/RefineAlgorithm.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+//integer constants for boundary conditions
+#define CHECK_BDRY_DATA (1)
+#include "SAMRAI/appu/CartesianBoundaryDefines.h"
+
+//integer constant for debugging improperly set boundary data
+#define BOGUS_BDRY_DATA (-9999)
+
+// routines for managing boundary data
+#include "SAMRAI/appu/CartesianBoundaryUtilities2.h"
+#include "SAMRAI/appu/CartesianBoundaryUtilities3.h"
+
+/*
+ *************************************************************************
+ *									*
+ * The constructor and destructor.                                       *
+ *									*
+ *************************************************************************
+ */
+
+BoundaryDataTester::BoundaryDataTester(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> input_db,
+   tbox::Pointer<geom::CartesianGridGeometry> grid_geom):
+   xfer::RefinePatchStrategy(dim),
+   d_dim(dim)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!input_db.isNull());
+#endif
+
+   d_object_name = object_name;
+   d_grid_geometry = grid_geom;
+
+   d_variable_context =
+      hier::VariableDatabase::getDatabase()->getContext("BOUNDARY_TEST");
+
+   readVariableInputAndMakeVariables(input_db);
+
+   setBoundaryDataDefaults();
+
+   readBoundaryDataInput(input_db);
+
+   postprocessBoundaryInput();
+
+}
+
+BoundaryDataTester::~BoundaryDataTester()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set physical boundary values for each variable acording to input data.*
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BoundaryDataTester::setPhysicalBoundaryConditions(
+   hier::Patch& patch,
+   const double fill_time,
+   const hier::IntVector& ghost_width_to_fill)
+{
+   (void)fill_time;
+   tbox::plog << "\n\nFilling boundary data on patch = " << patch.getBox()
+              << endl;
+   tbox::plog << "ghost_width_to_fill = " << ghost_width_to_fill << endl;
+
+   for (int iv = 0; iv < d_variables.getSize(); iv++) {
+
+      tbox::Pointer<pdat::CellData<double> > cvdata =
+         patch.getPatchData(d_variables[iv], d_variable_context);
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!cvdata.isNull());
+#endif
+
+      tbox::plog << "\n   iv = " << iv << " : " << d_variable_name[iv] << endl;
+      tbox::plog << "   depth = " << cvdata->getDepth() << endl;
+
+      hier::IntVector fill_gcw(hier::IntVector::min(cvdata->getGhostCellWidth(),
+                                  ghost_width_to_fill));
+
+      if (d_dim == tbox::Dimension(3)) {
+         appu::CartesianBoundaryUtilities3::
+         fillFaceBoundaryData(d_variable_name[iv], cvdata,
+            patch,
+            fill_gcw,
+            ((cvdata->getDepth() > 1) ?
+             d_vector_bdry_face_conds :
+             d_scalar_bdry_face_conds),
+            d_variable_bc_values[iv]);
+         appu::CartesianBoundaryUtilities3::
+         fillEdgeBoundaryData(d_variable_name[iv], cvdata,
+            patch,
+            fill_gcw,
+            ((cvdata->getDepth() > 1) ?
+             d_vector_bdry_edge_conds :
+             d_scalar_bdry_edge_conds),
+            d_variable_bc_values[iv]);
+
+         appu::CartesianBoundaryUtilities3::
+         fillNodeBoundaryData(d_variable_name[iv], cvdata,
+            patch,
+            fill_gcw,
+            ((cvdata->getDepth() > 1) ?
+             d_vector_bdry_node_conds :
+             d_scalar_bdry_node_conds),
+            d_variable_bc_values[iv]);
+      }
+
+      if (d_dim == tbox::Dimension(2)) {
+         appu::CartesianBoundaryUtilities2::
+         fillEdgeBoundaryData(d_variable_name[iv], cvdata,
+            patch,
+            fill_gcw,
+            ((cvdata->getDepth() > 1) ?
+             d_vector_bdry_edge_conds :
+             d_scalar_bdry_edge_conds),
+            d_variable_bc_values[iv]);
+
+         appu::CartesianBoundaryUtilities2::
+         fillNodeBoundaryData(d_variable_name[iv], cvdata,
+            patch,
+            fill_gcw,
+            ((cvdata->getDepth() > 1) ?
+             d_vector_bdry_node_conds :
+             d_scalar_bdry_node_conds),
+            d_variable_bc_values[iv]);
+      }
+
+   }
+
+   if (d_dim == tbox::Dimension(2)) {
+      checkBoundaryData(EDGE2D_BDRY_TYPE, patch, ghost_width_to_fill);
+      checkBoundaryData(NODE2D_BDRY_TYPE, patch, ghost_width_to_fill);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      checkBoundaryData(FACE3D_BDRY_TYPE, patch, ghost_width_to_fill);
+      checkBoundaryData(EDGE3D_BDRY_TYPE, patch, ghost_width_to_fill);
+      checkBoundaryData(NODE3D_BDRY_TYPE, patch, ghost_width_to_fill);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set data for each variable on patch interior acording to input data.  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BoundaryDataTester::initializeDataOnPatchInteriors(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number)
+{
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT(level_number == 0);
+
+   tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(
+         level_number);
+   TBOX_ASSERT(!level.isNull());
+
+   level->allocatePatchData(d_patch_data_components);
+
+   /*
+    * Undefine the data so it is initialized to some value.
+    */
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      for (int iv = 0; iv < d_variables.getSize(); iv++) {
+         tbox::Pointer<pdat::CellData<double> > cvdata =
+            patch->getPatchData(d_variables[iv], d_variable_context);
+
+         TBOX_ASSERT(!cvdata.isNull());
+         cvdata->getArrayData().undefineData();
+      }
+
+   }
+
+   for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+
+      for (int iv = 0; iv < d_variables.getSize(); iv++) {
+         tbox::Pointer<pdat::CellData<double> > cvdata =
+            patch->getPatchData(d_variables[iv], d_variable_context);
+
+         TBOX_ASSERT(!cvdata.isNull());
+         for (int id = 0; id < cvdata->getDepth(); id++) {
+            cvdata->fill(d_variable_interior_values[iv][id],
+               patch->getBox(),
+               id);
+         }
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Run boundary test:                                                    *
+ *                                                                       *
+ *  1) register boundary filling operation for each variable             *
+ *     with refine algorithm.                                            *
+ *                                                                       *
+ *  2) create communication schedule and fill data.                      *
+ *                                                                       *
+ *  3) check all patch boundary values for correctness.                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int BoundaryDataTester::runBoundaryTest(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT(level_number == 0);
+#endif
+
+   int d_fail_count = 0;
+
+   hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+
+   xfer::RefineAlgorithm boundary_fill(d_dim);
+
+   for (int iv = 0; iv < d_variables.getSize(); iv++) {
+      int datid =
+         variable_db->mapVariableAndContextToIndex(d_variables[iv],
+            d_variable_context);
+
+      boundary_fill.registerRefine(datid, datid, datid,
+         tbox::Pointer<SAMRAI::xfer::VariableFillPattern>(NULL));
+   }
+
+   tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(
+         level_number);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!level.isNull());
+#endif
+
+   boundary_fill.createSchedule(level, this)->fillData(0.0);
+
+   return d_fail_count;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Read variable data from input, create variables,                      *
+ * and map variables into variable database.                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BoundaryDataTester::readVariableInputAndMakeVariables(
+   tbox::Pointer<tbox::Database> db)
+{
+   TBOX_ASSERT(!db.isNull());
+
+   tbox::Array<string> var_keys = db->getAllKeys();
+   int nkeys = var_keys.getSize();
+
+   int var_cnt = 0;
+   for (int i = 0; i < nkeys; i++) {
+      tbox::Pointer<tbox::Database> var_db = db->getDatabase(var_keys[i]);
+      if (var_db->keyExists("name")) {
+         var_cnt++;
+      }
+   }
+
+   d_variable_name.resizeArray(var_cnt);
+   d_variable_depth.resizeArray(var_cnt);
+   d_variable_num_ghosts.resizeArray(var_cnt, hier::IntVector(d_dim, 1));
+   d_variable_interior_values.resizeArray(var_cnt);
+
+   for (int i = 0; i < nkeys; i++) {
+
+      tbox::Pointer<tbox::Database> var_db = db->getDatabase(var_keys[i]);
+
+      if (var_keys[i] != "Boundary_data" && var_db->keyExists("name")) {
+
+         if (var_db->keyExists("name")) {
+            d_variable_name[i] = var_db->getString("name");
+         } else {
+            TBOX_ERROR(d_object_name << ": "
+               << "Variable input error: No 'name' string found for "
+               << "key = " << var_keys[i] << endl);
+         }
+
+         if (var_db->keyExists("depth")) {
+            d_variable_depth[i] = var_db->getInteger("depth");
+         } else {
+            d_variable_depth[i] = 1;
+         }
+
+         if (var_db->keyExists("num_ghosts")) {
+            int* tmpg = &d_variable_num_ghosts[i][0];
+            var_db->getIntegerArray("num_ghosts", tmpg, d_dim.getValue());
+         }
+
+         if (var_db->keyExists("interior_values")) {
+            d_variable_interior_values[i].resizeArray(d_variable_depth[i]);
+            var_db->getDoubleArray("interior_values",
+               d_variable_interior_values[i].getPointer(),
+               d_variable_depth[i]);
+         } else {
+            TBOX_ERROR(d_object_name << ": "
+               << "Variable input error: No 'interior_values' entry found for "
+               << "key = " << var_keys[i] << endl);
+         }
+
+      }
+
+   }
+
+   hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+
+   d_variables.resizeArray(d_variable_name.getSize());
+
+   for (int iv = 0; iv < d_variable_name.getSize(); iv++) {
+      d_variables[iv] =
+         new pdat::CellVariable<double>(d_dim, d_variable_name[iv],
+                                        d_variable_depth[iv]);
+
+      int datid =
+         variable_db->registerVariableAndContext(d_variables[iv],
+            d_variable_context,
+            d_variable_num_ghosts[iv]);
+
+      d_patch_data_components.setFlag(datid);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set all boundary data to bogus default values for error checking.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BoundaryDataTester::setBoundaryDataDefaults()
+{
+   /*
+    * Defaults for boundary conditions. Set to bogus values
+    * for error checking.
+    */
+
+   if (d_dim == tbox::Dimension(2)) {
+      d_master_bdry_edge_conds.resizeArray(NUM_2D_EDGES);
+      d_scalar_bdry_edge_conds.resizeArray(NUM_2D_EDGES);
+      d_vector_bdry_edge_conds.resizeArray(NUM_2D_EDGES);
+      for (int ei = 0; ei < NUM_2D_EDGES; ei++) {
+         d_master_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+         d_scalar_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+         d_vector_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+      }
+
+      d_master_bdry_node_conds.resizeArray(NUM_2D_NODES);
+      d_scalar_bdry_node_conds.resizeArray(NUM_2D_NODES);
+      d_vector_bdry_node_conds.resizeArray(NUM_2D_NODES);
+      d_node_bdry_edge.resizeArray(NUM_2D_NODES);
+
+      for (int ni = 0; ni < NUM_2D_NODES; ni++) {
+         d_master_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+         d_scalar_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+         d_vector_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+         d_node_bdry_edge[ni] = BOGUS_BDRY_DATA;
+      }
+   }
+
+   if (d_dim == tbox::Dimension(3)) {
+      d_master_bdry_face_conds.resizeArray(NUM_3D_FACES);
+      d_scalar_bdry_face_conds.resizeArray(NUM_3D_FACES);
+      d_vector_bdry_face_conds.resizeArray(NUM_3D_FACES);
+      for (int fi = 0; fi < NUM_3D_FACES; fi++) {
+         d_master_bdry_face_conds[fi] = BOGUS_BDRY_DATA;
+         d_scalar_bdry_face_conds[fi] = BOGUS_BDRY_DATA;
+         d_vector_bdry_face_conds[fi] = BOGUS_BDRY_DATA;
+      }
+
+      d_master_bdry_edge_conds.resizeArray(NUM_3D_EDGES);
+      d_scalar_bdry_edge_conds.resizeArray(NUM_3D_EDGES);
+      d_vector_bdry_edge_conds.resizeArray(NUM_3D_EDGES);
+      d_edge_bdry_face.resizeArray(NUM_3D_EDGES);
+      for (int ei = 0; ei < NUM_3D_EDGES; ei++) {
+         d_master_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+         d_scalar_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+         d_vector_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+         d_edge_bdry_face[ei] = BOGUS_BDRY_DATA;
+      }
+
+      d_master_bdry_node_conds.resizeArray(NUM_3D_NODES);
+      d_scalar_bdry_node_conds.resizeArray(NUM_3D_NODES);
+      d_vector_bdry_node_conds.resizeArray(NUM_3D_NODES);
+      d_node_bdry_face.resizeArray(NUM_3D_NODES);
+
+      for (int ni = 0; ni < NUM_3D_NODES; ni++) {
+         d_master_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+         d_scalar_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+         d_vector_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+         d_node_bdry_face[ni] = BOGUS_BDRY_DATA;
+      }
+   }
+
+   d_variable_bc_values.resizeArray(d_variable_name.getSize());
+   for (int iv = 0; iv < d_variable_name.getSize(); iv++) {
+      if (d_dim == tbox::Dimension(2)) {
+         d_variable_bc_values[iv].resizeArray(NUM_2D_EDGES
+            * d_variable_depth[iv]);
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         d_variable_bc_values[iv].resizeArray(NUM_3D_FACES
+            * d_variable_depth[iv]);
+      }
+      tbox::MathUtilities<double>::setArrayToSignalingNaN(d_variable_bc_values[
+            iv]);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Functions to read boundary information from input database.           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BoundaryDataTester::readDirichletBoundaryDataEntry(
+   tbox::Pointer<tbox::Database> db,
+   string& db_name,
+   int bdry_location_index)
+{
+   readBoundaryDataStateEntry(db, db_name, bdry_location_index);
+}
+
+void BoundaryDataTester::readNeumannBoundaryDataEntry(
+   tbox::Pointer<tbox::Database> db,
+   string& db_name,
+   int bdry_location_index)
+{
+   readBoundaryDataStateEntry(db, db_name, bdry_location_index);
+}
+
+void BoundaryDataTester::readBoundaryDataStateEntry(
+   tbox::Pointer<tbox::Database> db,
+   string& db_name,
+   int bdry_location_index)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+   TBOX_ASSERT(!db_name.empty());
+   TBOX_ASSERT(d_variable_bc_values.getSize() == d_variable_name.getSize());
+#endif
+
+   for (int iv = 0; iv < d_variable_name.getSize(); iv++) {
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      if (d_dim == tbox::Dimension(2)) {
+         TBOX_ASSERT(d_variable_bc_values[iv].getSize() ==
+            NUM_2D_EDGES * d_variable_depth[iv]);
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         TBOX_ASSERT(d_variable_bc_values[iv].getSize() ==
+            NUM_3D_FACES * d_variable_depth[iv]);
+      }
+#endif
+
+      if (db->keyExists(d_variable_name[iv])) {
+         int depth = d_variable_depth[iv];
+         tbox::Array<double> tmp_val(0);
+         tmp_val = db->getDoubleArray(d_variable_name[iv]);
+         if (tmp_val.getSize() < depth) {
+            TBOX_ERROR(d_object_name << ": "
+               << "Insufficient number of "
+               << d_variable_name[iv] << " values given in "
+                                      << db_name << " input database." << endl);
+         }
+         for (int id = 0; id < depth; id++) {
+            d_variable_bc_values[iv][bdry_location_index * depth + id] =
+               tmp_val[id];
+         }
+      } else {
+         TBOX_ERROR(d_object_name << ": "
+            << d_variable_name[iv]
+            << " entry missing from " << db_name
+            << " input database. " << endl);
+      }
+
+   }
+
+}
+
+void BoundaryDataTester::readBoundaryDataInput(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   hier::IntVector periodic(d_grid_geometry->getPeriodicShift(hier::IntVector(
+                                  d_dim,
+                                  1)));
+   int num_per_dirs = 0;
+   for (int id = 0; id < d_dim.getValue(); id++) {
+      if (periodic(id)) num_per_dirs++;
+   }
+
+   if (num_per_dirs < d_dim.getValue()) {
+
+      if (db->keyExists("Boundary_data")) {
+
+         tbox::Pointer<tbox::Database> bdry_db = db->getDatabase(
+               "Boundary_data");
+
+         if (d_dim == tbox::Dimension(2)) {
+            appu::CartesianBoundaryUtilities2::
+            readBoundaryInput(this,
+               bdry_db,
+               d_master_bdry_edge_conds,
+               d_master_bdry_node_conds,
+               periodic);
+         }
+         if (d_dim == tbox::Dimension(3)) {
+            appu::CartesianBoundaryUtilities3::
+            readBoundaryInput(this,
+               bdry_db,
+               d_master_bdry_face_conds,
+               d_master_bdry_edge_conds,
+               d_master_bdry_node_conds,
+               periodic);
+         }
+
+      } else {
+         TBOX_ERROR(
+            d_object_name << ": "
+            <<
+            "Key data 'Boundary_data' not found in input. " << endl);
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Postprocess boundary data from input values                           *
+ * to make setting and checking easier.                                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BoundaryDataTester::postprocessBoundaryInput()
+{
+   if (d_dim == tbox::Dimension(2)) {
+      for (int i = 0; i < NUM_2D_EDGES; i++) {
+         d_scalar_bdry_edge_conds[i] = d_master_bdry_edge_conds[i];
+         d_vector_bdry_edge_conds[i] = d_master_bdry_edge_conds[i];
+
+         if (d_master_bdry_edge_conds[i] == REFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = FLOW_BC;
+         }
+      }
+      for (int i = 0; i < NUM_2D_NODES; i++) {
+         d_scalar_bdry_node_conds[i] = d_master_bdry_node_conds[i];
+         d_vector_bdry_node_conds[i] = d_master_bdry_node_conds[i];
+
+         if (d_master_bdry_node_conds[i] == XREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = XFLOW_BC;
+         }
+         if (d_master_bdry_node_conds[i] == YREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = YFLOW_BC;
+         }
+
+         if (d_master_bdry_node_conds[i] != BOGUS_BDRY_DATA) {
+            d_node_bdry_edge[i] =
+               appu::CartesianBoundaryUtilities2::getEdgeLocationForNodeBdry(
+                  i, d_master_bdry_node_conds[i]);
+         }
+      }
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      for (int i = 0; i < NUM_3D_FACES; i++) {
+         d_scalar_bdry_face_conds[i] = d_master_bdry_face_conds[i];
+         d_vector_bdry_face_conds[i] = d_master_bdry_face_conds[i];
+
+         if (d_master_bdry_face_conds[i] == REFLECT_BC) {
+            d_scalar_bdry_face_conds[i] = FLOW_BC;
+         }
+      }
+
+      for (int i = 0; i < NUM_3D_EDGES; i++) {
+         d_scalar_bdry_edge_conds[i] = d_master_bdry_edge_conds[i];
+         d_vector_bdry_edge_conds[i] = d_master_bdry_edge_conds[i];
+
+         if (d_master_bdry_edge_conds[i] == XREFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = XFLOW_BC;
+         }
+         if (d_master_bdry_edge_conds[i] == YREFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = YFLOW_BC;
+         }
+         if (d_master_bdry_edge_conds[i] == ZREFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = ZFLOW_BC;
+         }
+
+         if (d_master_bdry_edge_conds[i] != BOGUS_BDRY_DATA) {
+            d_edge_bdry_face[i] =
+               appu::CartesianBoundaryUtilities3::getFaceLocationForEdgeBdry(
+                  i, d_master_bdry_edge_conds[i]);
+         }
+      }
+
+      for (int i = 0; i < NUM_3D_NODES; i++) {
+         d_scalar_bdry_node_conds[i] = d_master_bdry_node_conds[i];
+         d_vector_bdry_node_conds[i] = d_master_bdry_node_conds[i];
+
+         if (d_master_bdry_node_conds[i] == XREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = XFLOW_BC;
+         }
+         if (d_master_bdry_node_conds[i] == YREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = YFLOW_BC;
+         }
+         if (d_master_bdry_node_conds[i] == ZREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = ZFLOW_BC;
+         }
+
+         if (d_master_bdry_node_conds[i] != BOGUS_BDRY_DATA) {
+            d_node_bdry_face[i] =
+               appu::CartesianBoundaryUtilities3::getFaceLocationForNodeBdry(
+                  i, d_master_bdry_node_conds[i]);
+         }
+      }
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Check boundary values on patch for correctness.                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BoundaryDataTester::checkBoundaryData(
+   int btype,
+   const hier::Patch& patch,
+   const hier::IntVector& ghost_width_to_check)
+{
+   (void)btype;
+   (void)patch;
+   (void)ghost_width_to_check;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_dim == tbox::Dimension(2)) {
+      TBOX_ASSERT(btype == EDGE2D_BDRY_TYPE ||
+         btype == NODE2D_BDRY_TYPE);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      TBOX_ASSERT(btype == FACE3D_BDRY_TYPE ||
+         btype == EDGE3D_BDRY_TYPE ||
+         btype == NODE3D_BDRY_TYPE);
+   }
+#endif
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+      patch.getPatchGeometry();
+   const tbox::Array<hier::BoundaryBox> bdry_boxes =
+      pgeom->getCodimensionBoundaries(btype);
+
+   for (int i = 0; i < bdry_boxes.getSize(); i++) {
+      hier::BoundaryBox bbox = bdry_boxes[i];
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(bbox.getBoundaryType() == btype);
+#endif
+      int bloc = bbox.getLocationIndex();
+
+      for (int iv = 0; iv < d_variables.getSize(); iv++) {
+         tbox::Pointer<pdat::CellData<double> > cvdata =
+            patch.getPatchData(d_variables[iv], d_variable_context);
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!cvdata.isNull());
+#endif
+
+         int depth = d_variable_depth[iv];
+
+         int bscalarcase = 0;
+         int bvectorcase = 0;
+         int refbdryloc = 0;
+         if (d_dim == tbox::Dimension(2)) {
+            if (btype == EDGE2D_BDRY_TYPE) {
+               bscalarcase = d_scalar_bdry_edge_conds[bloc];
+               bvectorcase = d_vector_bdry_edge_conds[bloc];
+               refbdryloc = bloc;
+            } else { // btype == NODE2D_BDRY_TYPE
+               bscalarcase = d_scalar_bdry_node_conds[bloc];
+               bvectorcase = d_vector_bdry_node_conds[bloc];
+               refbdryloc = d_node_bdry_edge[bloc];
+            }
+         }
+         if (d_dim == tbox::Dimension(3)) {
+            if (btype == FACE3D_BDRY_TYPE) {
+               bscalarcase = d_scalar_bdry_face_conds[bloc];
+               bvectorcase = d_vector_bdry_face_conds[bloc];
+               refbdryloc = bloc;
+            } else if (btype == EDGE3D_BDRY_TYPE) {
+               bscalarcase = d_scalar_bdry_edge_conds[bloc];
+               bvectorcase = d_vector_bdry_edge_conds[bloc];
+               refbdryloc = d_edge_bdry_face[bloc];
+            } else { // btype == NODE3D_BDRY_TYPE
+               bscalarcase = d_scalar_bdry_node_conds[bloc];
+               bvectorcase = d_vector_bdry_node_conds[bloc];
+               refbdryloc = d_node_bdry_face[bloc];
+            }
+         }
+
+         int data_id = hier::VariableDatabase::getDatabase()->
+            mapVariableAndContextToIndex(d_variables[iv], d_variable_context);
+
+         int num_bad_values = 0;
+
+         if (depth == 1) {
+
+            if (d_dim == tbox::Dimension(2)) {
+               num_bad_values =
+                  appu::CartesianBoundaryUtilities2::
+                  checkBdryData(d_variable_name[iv],
+                     patch,
+                     data_id,
+                     0,
+                     ghost_width_to_check,
+                     bbox,
+                     bscalarcase,
+                     d_variable_bc_values[iv][refbdryloc]);
+            }
+            if (d_dim == tbox::Dimension(3)) {
+               num_bad_values =
+                  appu::CartesianBoundaryUtilities3::
+                  checkBdryData(d_variable_name[iv],
+                     patch,
+                     data_id,
+                     0,
+                     ghost_width_to_check,
+                     bbox,
+                     bscalarcase,
+                     d_variable_bc_values[iv][refbdryloc]);
+            }
+#if (TESTING == 1)
+            if (num_bad_values > 0) {
+               d_fail_count++;
+               tbox::perr << "\nBoundary Test FAILED: \n"
+               << "     " << num_bad_values << " bad "
+               << d_variable_name[iv] << " values found for"
+                                      << "     boundary type " << btype
+                                      << " at location "
+                                      << bloc << endl;
+            }
+#endif
+
+         } else {
+            for (int id = 0; id < depth; id++) {
+               int vbcase = bscalarcase;
+               if (d_dim == tbox::Dimension(2)) {
+                  if (btype == EDGE2D_BDRY_TYPE) {
+                     if ((id == 0 && (bloc == XLO || bloc == XHI)) ||
+                         (id == 1 && (bloc == YLO || bloc == YHI))) {
+                        vbcase = bvectorcase;
+                     }
+                  } else {
+                     if ((id == 0 && bvectorcase == XREFLECT_BC) ||
+                         (id == 1 && bvectorcase == YREFLECT_BC)) {
+                        vbcase = bvectorcase;
+                     }
+                  }
+               }
+               if (d_dim == tbox::Dimension(3)) {
+                  if (btype == FACE3D_BDRY_TYPE) {
+                     if ((id == 0 && (bloc == XLO || bloc == XHI)) ||
+                         (id == 1 && (bloc == YLO || bloc == YHI)) ||
+                         (id == 2 && (bloc == ZLO || bloc == ZHI))) {
+                        vbcase = bvectorcase;
+                     }
+                  } else {
+                     if ((id == 0 && bvectorcase == XREFLECT_BC) ||
+                         (id == 1 && bvectorcase == YREFLECT_BC) ||
+                         (id == 2 && bvectorcase == ZREFLECT_BC)) {
+                        vbcase = bvectorcase;
+                     }
+                  }
+               }
+
+               if (d_dim == tbox::Dimension(2)) {
+                  num_bad_values =
+                     appu::CartesianBoundaryUtilities2::
+                     checkBdryData(d_variable_name[iv],
+                        patch,
+                        data_id,
+                        id,
+                        ghost_width_to_check,
+                        bbox,
+                        vbcase,
+                        d_variable_bc_values[iv][refbdryloc * depth + id]);
+               }
+               if (d_dim == tbox::Dimension(3)) {
+                  num_bad_values =
+                     appu::CartesianBoundaryUtilities3::
+                     checkBdryData(d_variable_name[iv],
+                        patch,
+                        data_id,
+                        id,
+                        ghost_width_to_check,
+                        bbox,
+                        vbcase,
+                        d_variable_bc_values[iv][refbdryloc * depth + id]);
+               }
+#if (TESTING == 1)
+               if (num_bad_values > 0) {
+                  d_fail_count++;
+                  tbox::perr << "\nBoundary Test FAILED: \n"
+                  << "     " << num_bad_values << " bad "
+                  << d_variable_name[iv] << " values found for"
+                                         << "     boundary type " << btype
+                                         << " at location "
+                                         << bloc << endl;
+               }
+#endif
+
+            }  // for (int id = 0; id < depth; id++)
+
+         }  // else
+
+      }   // for (int iv = 0; iv < d_variables.getSize(); iv++)
+
+   }  // for (int i = 0; i < bdry_boxes.getSize(); i++ )
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Write all class data members to specified output stream.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void BoundaryDataTester::printClassData(
+   ostream& os) const
+{
+   int i, j;
+   os << "\nBoundaryDataTester::printClassData..." << endl;
+   os << "BoundaryDataTester: this = " << (BoundaryDataTester *)this << endl;
+   os << "d_object_name = " << d_object_name << endl;
+   os << "d_grid_geometry = "
+      << (geom::CartesianGridGeometry *)d_grid_geometry << endl;
+
+   if (!d_variable_context.isNull()) {
+      os << "d_variable_context = "
+         << d_variable_context->getName() << endl;
+   } else {
+      os << "d_variable_context = NULL" << endl;
+   }
+
+   os << "\nVariables ...\n" << endl;
+   for (i = 0; i < d_variable_name.getSize(); i++) {
+      os << "Variable " << i << endl;
+      os << "   name       = " << d_variable_name[i] << endl;
+      os << "   depth      = " << d_variable_depth[i] << endl;
+      os << "   num_ghosts = " << d_variable_num_ghosts[i] << endl;
+      os << "   interior_values = " << d_variable_interior_values[i][0];
+      for (j = 1; j < d_variable_depth[i]; j++) {
+         os << " ,  " << d_variable_interior_values[i][j];
+      }
+      os << endl;
+   }
+
+   os << "\n   Boundary condition data... " << endl;
+
+   if (d_dim == tbox::Dimension(2)) {
+      for (j = 0; j < d_master_bdry_edge_conds.getSize(); j++) {
+         os << "\n       d_master_bdry_edge_conds[" << j << "] = "
+         << d_master_bdry_edge_conds[j] << endl;
+         os << "       d_scalar_bdry_edge_conds[" << j << "] = "
+         << d_scalar_bdry_edge_conds[j] << endl;
+         os << "       d_vector_bdry_edge_conds[" << j << "] = "
+         << d_vector_bdry_edge_conds[j] << endl;
+         if (d_master_bdry_edge_conds[j] == DIRICHLET_BC ||
+             d_master_bdry_edge_conds[j] == NEUMANN_BC) {
+            for (i = 0; i < d_variable_name.getSize(); i++) {
+               os << d_variable_name[i] << " bdry edge value[" << j << "] = "
+               << d_variable_bc_values[i][j * d_variable_depth[i]];
+               for (int id = 1; id < d_variable_depth[i]; id++) {
+                  os << " , "
+                  << d_variable_bc_values[i][j * d_variable_depth[i] + id];
+               }
+               os << endl;
+            }
+         }
+      }
+      os << endl;
+      for (j = 0; j < d_master_bdry_node_conds.getSize(); j++) {
+         os << "\n       d_master_bdry_node_conds[" << j << "] = "
+         << d_master_bdry_node_conds[j] << endl;
+         os << "       d_scalar_bdry_node_conds[" << j << "] = "
+         << d_scalar_bdry_node_conds[j] << endl;
+         os << "       d_vector_bdry_node_conds[" << j << "] = "
+         << d_vector_bdry_node_conds[j] << endl;
+         os << "       d_node_bdry_edge[" << j << "] = "
+         << d_node_bdry_edge[j] << endl;
+      }
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      for (j = 0; j < d_master_bdry_face_conds.getSize(); j++) {
+         os << "\n       d_master_bdry_face_conds[" << j << "] = "
+         << d_master_bdry_face_conds[j] << endl;
+         os << "       d_scalar_bdry_face_conds[" << j << "] = "
+         << d_scalar_bdry_face_conds[j] << endl;
+         os << "       d_vector_bdry_face_conds[" << j << "] = "
+         << d_vector_bdry_face_conds[j] << endl;
+         if (d_master_bdry_face_conds[j] == DIRICHLET_BC) {
+            for (i = 0; i < d_variable_name.getSize(); i++) {
+               os << d_variable_name[i] << " bdry edge value[" << j << "] = "
+               << d_variable_bc_values[i][j * d_variable_depth[i]];
+               for (int id = 1; id < d_variable_depth[i]; id++) {
+                  os << " , "
+                  << d_variable_bc_values[i][j * d_variable_depth[i] + id];
+               }
+               os << endl;
+            }
+         }
+      }
+      os << endl;
+      for (j = 0; j < d_master_bdry_edge_conds.getSize(); j++) {
+         os << "\n       d_master_bdry_edge_conds[" << j << "] = "
+         << d_master_bdry_edge_conds[j] << endl;
+         os << "       d_scalar_bdry_edge_conds[" << j << "] = "
+         << d_scalar_bdry_edge_conds[j] << endl;
+         os << "       d_vector_bdry_edge_conds[" << j << "] = "
+         << d_vector_bdry_edge_conds[j] << endl;
+         os << "       d_edge_bdry_face[" << j << "] = "
+         << d_edge_bdry_face[j] << endl;
+      }
+      os << endl;
+      for (j = 0; j < d_master_bdry_node_conds.getSize(); j++) {
+         os << "\n       d_master_bdry_node_conds[" << j << "] = "
+         << d_master_bdry_node_conds[j] << endl;
+         os << "       d_scalar_bdry_node_conds[" << j << "] = "
+         << d_scalar_bdry_node_conds[j] << endl;
+         os << "       d_vector_bdry_node_conds[" << j << "] = "
+         << d_vector_bdry_node_conds[j] << endl;
+         os << "       d_node_bdry_face[" << j << "] = "
+         << d_node_bdry_face[j] << endl;
+      }
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/boundary/BoundaryDataTester.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/boundary/BoundaryDataTester.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,223 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Class to test usage of boundary utilities 
+ *
+ ************************************************************************/
+
+#ifndef included_BoundaryDataTester
+#define included_BoundaryDataTester
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/appu/BoundaryUtilityStrategy.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/xfer/RefinePatchStrategy.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/ComponentSelector.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include <string>
+
+using namespace std;
+using namespace SAMRAI;
+
+class BoundaryDataTester:
+   public xfer::RefinePatchStrategy,
+   public appu::BoundaryUtilityStrategy
+{
+public:
+   /**
+    * The constructor reads variable data from input database.
+    */
+   BoundaryDataTester(
+      const string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> input_db,
+      tbox::Pointer<geom::CartesianGridGeometry> grid_geom);
+
+   /**
+    * Virtual destructor for BoundaryDataTester.
+    */
+   virtual ~BoundaryDataTester();
+
+   /**
+    * This routine is a concrete implementation of the virtual function
+    * in the base class RefinePatchStrategy.  It sets the boundary
+    * conditions for the variables.
+    */
+   void
+   setPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const double fill_time,
+      const hier::IntVector& ghost_width_to_fill);
+
+   /**
+    * The next three functions are dummy implementations of the pure
+    * virtual functions declared in the RefinePatchStrategy base class.
+    * They are not needed for this example since we only have one level
+    * in the hierarchy.
+    */
+   hier::IntVector getRefineOpStencilWidth() const {
+      return hier::IntVector(d_dim, 0);
+   }
+
+   void preprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio)
+   {
+      (void)fine;
+      (void)coarse;
+      (void)fine_box;
+      (void)ratio;
+   }
+
+   void postprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio)
+   {
+      (void)fine;
+      (void)coarse;
+      (void)fine_box;
+      (void)ratio;
+   }
+
+   /**
+    * This routine is a concrete implementation of a virtual function
+    * in the base class BoundaryUtilityStrategy.  It reads DIRICHLET
+    * face or edge boundary state values from the given database with the
+    * given name string idenifier.  The integer location index
+    * indicates the face or edge to which the boundary condition applies.
+    */
+   void
+   readDirichletBoundaryDataEntry(
+      tbox::Pointer<tbox::Database> db,
+      string& db_name,
+      int bdry_location_index);
+
+   /**
+    * This routine is a concrete implementation of a virtual function
+    * in the base class BoundaryUtilityStrategy.  It reads NEUMANN
+    * face or edge boundary state values from the given database with the
+    * given name string idenifier.  The integer location index
+    * indicates the face or edge to which the boundary condition applies.
+    */
+   void
+   readNeumannBoundaryDataEntry(
+      tbox::Pointer<tbox::Database> db,
+      string& db_name,
+      int bdry_location_index);
+
+   /**
+    * Set data on patch interiors on given level in hierarchy.
+    */
+   void
+   initializeDataOnPatchInteriors(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number);
+
+   /**
+    * Run boundary tests for given level in hierarchy and return integer
+    * number of test failures.
+    */
+   int
+   runBoundaryTest(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number);
+
+   /**
+    * Print all class data members to given output stream.
+    */
+   void
+   printClassData(
+      ostream& os) const;
+
+private:
+   /*
+    * The object name is used for error/warning reporting.
+    */
+   string d_object_name;
+
+   const tbox::Dimension d_dim;
+
+   tbox::Pointer<geom::CartesianGridGeometry> d_grid_geometry;
+
+   /*
+    * Arrays of information read from input file describing test variables
+    */
+   tbox::Array<string> d_variable_name;
+   tbox::Array<int> d_variable_depth;
+   tbox::Array<hier::IntVector> d_variable_num_ghosts;
+   tbox::Array<tbox::Array<double> > d_variable_interior_values;
+
+   /*
+    * Items used to manage variables and data in test program.
+    */
+   tbox::Array<tbox::Pointer<hier::Variable> > d_variables;
+   tbox::Pointer<hier::VariableContext> d_variable_context;
+   hier::ComponentSelector d_patch_data_components;
+
+   /*
+    * Arrays of information read from input file for boundary conditions
+    */
+   tbox::Array<int> d_master_bdry_edge_conds;
+   tbox::Array<int> d_scalar_bdry_edge_conds;
+   tbox::Array<int> d_vector_bdry_edge_conds;
+
+   tbox::Array<int> d_master_bdry_node_conds;
+   tbox::Array<int> d_scalar_bdry_node_conds;
+   tbox::Array<int> d_vector_bdry_node_conds;
+
+   tbox::Array<int> d_master_bdry_face_conds; // Used only in 3D
+   tbox::Array<int> d_scalar_bdry_face_conds; // Used only in 3D
+   tbox::Array<int> d_vector_bdry_face_conds; // Used only in 3D
+
+   tbox::Array<int> d_node_bdry_edge; // Used only in 2D
+   tbox::Array<int> d_edge_bdry_face; // Used only in 3D
+   tbox::Array<int> d_node_bdry_face; // Used only in 3D
+
+   tbox::Array<tbox::Array<double> > d_variable_bc_values;
+
+   int d_fail_count;
+
+   /*
+    * Private functions to perform tasks for boundary testing.
+    */
+   void
+   readVariableInputAndMakeVariables(
+      tbox::Pointer<tbox::Database> db);
+   void
+   readBoundaryDataInput(
+      tbox::Pointer<tbox::Database> db);
+   void
+   readBoundaryDataStateEntry(
+      tbox::Pointer<tbox::Database> db,
+      string& db_name,
+      int bdry_location_index);
+   void
+   setBoundaryDataDefaults();
+   void
+   postprocessBoundaryInput();
+   void
+   checkBoundaryData(
+      int btype,
+      const hier::Patch& patch,
+      const hier::IntVector& ghost_width_to_check);
+
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/boundary/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/boundary/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,361 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=BoundaryDataTester.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryUtilityStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryDefines.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryUtilities2.h	\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryUtilities3.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	BoundaryDataTester.C BoundaryDataTester.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=main.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryUtilityStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelConnectorUtils.I	\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelConnectorUtils.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	BoundaryDataTester.h main.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/boundary/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/boundary/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,66 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for boundary utilities sample application 
+##
+#########################################################################
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/test/boundary
+VPATH         = @srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+default: check	
+
+include $(OBJECT)/config/Makefile.config
+
+AUTOTEST      = $(SAMRAI)/source/test/boundary
+CPPFLAGS_EXTRA= -I$(AUTOTEST) -DNDIM=$(PDIM) -DTESTING=1
+
+NUM_TESTS = 13
+
+TEST_NPROCS = @TEST_NPROCS@
+
+CXX_OBJS      = main.o BoundaryDataTester.o
+
+main:	$(CXX_OBJS) $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) \
+	$(LIBSAMRAI3D) $(LIBSAMRAI) $(LDLIBS) -o $@
+
+check:
+	$(MAKE) check2d
+	$(MAKE) check3d
+
+check2d:	main
+	@for i in test_inputs/*2d*.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+check3d:	main
+	@for i in test_inputs/*3d*.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+checkcompile: main
+
+checktest:
+	rm -f makecheck.logfile
+	$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+	$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+	rm -f makecheck.logfile
+
+
+clean-check:
+	$(SAMCLEAN)
+
+clean:		clean-check
+	$(RM) *main* 
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/test/boundary/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/boundary/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,117 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   Boundary Utilities example
+##
+#########################################################################
+
+This example demonstrates use of simple boundary utilities to implement
+and test basic boundary conditions in a SAMRAI application. 
+The files included in this directory are as follows:
+ 
+          main.C                      -  example main program
+          BoundaryDataTester.[Ch]     -  example user routines for boundary data
+          sample_input/*.input        -  various 2d and 3d input files
+ 
+COMPILE and RUN
+---------------
+Compile:  make main*d  to build the *d version of the example
+Run:      main*d sample_input/*.input
+
+Results will be reported in a log file whose name corresponds to the 
+given input file; i.e., main*d sample_input/*.input produces a log
+file named *.log.
+ 
+
+INPUTS:
+------------
+  
+Each input file contains 3 sections used to describe the test and to
+initialize the various object involved inthe test.
+
+The "Main" section includes the log file name, and describes how the 
+domain should be chopped into patches when it is a parallelepiped
+(in 3d or a rectangle in 2d).  For example in 2d this might look like:
+
+Main {
+    log_file_name    = "basic2d-flow.log"
+    num_domain_boxes = 2 , 1
+}
+
+The "CartesianGridGeometry" section describes the physical coordinates
+of the domain and the periodic directions (if any).  For example in 2d 
+this might look like: 
+ 
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (7,3) ]
+   x_lo         = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 0.5e0   // upper end of computational domain.
+   periodic_dimension = 0, 0
+}
+
+The "BoundaryDataTester" section describes the variables and their
+attributes in the test problem.  Applicable boundary information is
+described in a subdatabase called "Boundary_data".  For example in 2d  
+this might look like:
+ 
+BoundaryDataTester {
+
+   //
+   // Variable information is read in by the BoundaryDataTester object
+   // Each variable has its own sub-database which must contain the proper
+   // variable information.  The name of each sub-database for a variable
+   // is arbitrary.  But the names must be distinct.  Also the names of the
+   // individual variables must be distinct.
+   //
+   //    Required input:  name
+   //                     interior_values    (# of values must = depth)
+   //    Optional input:  depth              (default = 1)
+   //                     num_ghosts         (default = 1,1)
+   //
+ 
+   variable_1 {
+      name            = "var1"
+      depth           = 1
+      num_ghosts      = 2 , 2
+      interior_values = 1.0
+   }
+ 
+   variable_2 {
+      name            = "var2"
+      depth           = 2
+      num_ghosts      = 1 , 1
+      interior_values = 2.0 , 3.0
+   }
+
+   //
+   // Boundary conditioninformation is read in by the BoundaryDataTester object
+   // Each boundary type and location has its own sub-database which must be
+   // named properly and contain valid boundary information.
+   //
+   // Valid boundary_condition entries for edges in 2d are:
+   //     "FLOW", "SYMMETRIC", "DIRICHLET"
+   //
+   // Valid boundary_condition entries for nodes in 2d are:
+   //     "*FLOW", "*SYMMETRIC", "*DIRICHLET"
+   // Here, "*" may be either "X" or "Y".  The condition given for a node
+   // must match that of the appropriate adjacent edge.  This is enforced
+   // for consistency.  Note that when a REFLECT edge condition is given
+   // and the other adjacent edge has either a FLOW or REFLECT condition,
+   // the resulting node boundary values will be the same regardless of
+   // which edge is used.
+   //
+   // Boundary data must be given for each edge and node in a non-periodic
+   // direction.  Any input values given for periodic directions will be ignored.
+   //
+   //
+   Boundary_data {
+
+      // see the various sample input files for more details....
+
+   }
+
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/boundary/main.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/boundary/main.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,252 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Example program to demonstrate boundary utilities. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <string>
+using namespace std;
+
+// Headers for basic SAMRAI objects used in this code.
+#include "SAMRAI/tbox/SAMRAIManager.h"
+
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/BoxUtilities.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/hier/MappedBoxLevelConnectorUtils.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/ProcessorMapping.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+// Headers for classes specific to this example
+#include "BoundaryDataTester.h"
+
+using namespace SAMRAI;
+
+int main(
+   int argc,
+   char* argv[])
+{
+   int fail_count = -1;
+
+   /*
+    * Initialize tbox::MPI and SAMRAI, enable logging, and process command line.
+    * Note this example is set up to run in serial only.
+    */
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   {
+
+      if (argc != 2) {
+         TBOX_ERROR(
+            "USAGE:  " << argv[0] << " <input filename> "
+                                  <<
+            "<restart dir> <restore number> [options]\n"
+                                  << "  options:\n"
+                                  << "  none at this time"
+                                  << endl);
+         return -1;
+      }
+
+      /*
+       * This test only is valid on 1 processor.
+       * This should be removed.
+       */
+      if (mpi.getSize() != 1) {
+         tbox::pout << "This test is valid for 1 processor only" << endl;
+         tbox::pout << "\nPASSED:  boundary" << endl;
+         tbox::SAMRAIManager::shutdown();
+         tbox::SAMRAIManager::finalize();
+         tbox::SAMRAI_MPI::finalize();
+         return 0;
+      }
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      /*
+       * This should never be true.
+       */
+      TBOX_ASSERT(mpi.getSize() == 1);
+#endif
+
+      string input_filename = argv[1];
+
+      /*
+       * Create input database and parse all data in input file.
+       */
+
+      tbox::Pointer<tbox::Database> input_db(new tbox::InputDatabase("input_db"));
+      tbox::InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      /*
+       * Retrieve "GlobalInputs" section of the input database and set
+       * values accordingly.
+       */
+
+      if (input_db->keyExists("GlobalInputs")) {
+         tbox::Pointer<tbox::Database> global_db =
+            input_db->getDatabase("GlobalInputs");
+         if (global_db->keyExists("call_abort_in_serial_instead_of_exit")) {
+            bool flag = global_db->
+               getBool("call_abort_in_serial_instead_of_exit");
+            tbox::SAMRAI_MPI::setCallAbortInSerialInsteadOfExit(flag);
+         }
+      }
+
+      /*
+       * Read "Main" input data.
+       */
+
+      tbox::Pointer<tbox::Database> main_db = input_db->getDatabase("Main");
+
+      const tbox::Dimension dim(static_cast<unsigned short>(main_db->getInteger("dim")));
+
+      string log_file_name = "boundary.log";
+      if (main_db->keyExists("log_file_name")) {
+         log_file_name = main_db->getString("log_file_name");
+      }
+      tbox::PIO::logOnlyNodeZero(log_file_name);
+
+      hier::IntVector num_boxes(dim, 1);
+      if (main_db->keyExists("num_domain_boxes")) {
+         int* tmp_arr = &num_boxes[0];
+         main_db->getIntegerArray("num_domain_boxes", tmp_arr, dim.getValue());
+      }
+
+      /*
+       * Create objects used in boundary data test.  Then, print out
+       * state of BoundaryDataTester to log file for checking.
+       */
+
+      tbox::Pointer<geom::CartesianGridGeometry> grid_geometry(
+         new geom::CartesianGridGeometry(
+            dim,
+            "CartesianGridGeometry",
+            input_db->getDatabase("CartesianGridGeometry")));
+
+      tbox::Pointer<hier::PatchHierarchy> patch_hierarchy(
+         new hier::PatchHierarchy("PatchHierarchy", grid_geometry));
+
+      BoundaryDataTester* btester =
+         new BoundaryDataTester(
+            "BoundaryDataTester",
+            dim,
+            input_db->getDatabase("BoundaryDataTester"),
+            grid_geometry);
+
+      tbox::plog
+      << "\nPRINTING BoundaryDataTester object state after initialization..."
+      << endl;
+      btester->printClassData(tbox::plog);
+
+      /*
+       * For simplicity, we manually create a hierachy with a single patch level.
+       */
+
+      tbox::plog << "\nBuilding patch hierarchy..." << endl;
+
+      const hier::BoxArray& domain = grid_geometry->getPhysicalDomain();
+      hier::BoxList boxes(domain);
+      if ((domain.getNumberOfBoxes() == 1) &&
+          (num_boxes != hier::IntVector(dim, 1))) {
+         const hier::Box& dbox = domain[0];
+         hier::IntVector max_size(dbox.numberCells());
+         hier::IntVector min_size(dbox.numberCells() / num_boxes);
+         hier::IntVector cut_factor(dim, 1);
+         hier::IntVector bad_interval(dim, 1);
+         hier::BoxUtilities::chopBoxes(boxes,
+            max_size,
+            min_size,
+            cut_factor,
+            bad_interval,
+            domain);
+      }
+      hier::BoxArray patch_boxes(dim, boxes);
+
+#if 0
+      hier::ProcessorMapping mapping(patch_boxes.getNumberOfBoxes());
+
+      for (int ib = 0; ib < patch_boxes.getNumberOfBoxes(); ib++) {
+         mapping.setProcessorAssignment(ib, 0);
+      }
+
+      patch_hierarchy->makeNewPatchLevel(0,
+         hier::IntVector(dim, 1),
+         patch_boxes,
+         mapping);
+
+#else
+
+      hier::MappedBoxLevelConnectorUtils edge_utils;
+      hier::MappedBoxLevel layer0(hier::IntVector(dim, 1));
+      for (hier::LocalId ib(0); ib < patch_boxes.getNumberOfBoxes(); ib++) {
+         layer0.addMappedBox(hier::MappedBox(domain[ib.getValue()], ib, 0));
+      }
+      edge_utils.addPeriodicImages(
+         layer0,
+         patch_hierarchy->getDomainSearchTree(),
+         hier::IntVector(dim, 2));
+
+      patch_hierarchy->makeNewPatchLevel(0, layer0);
+
+      // Add Connector required for schedule construction.
+      tbox::Pointer<hier::PatchLevel> level0 = patch_hierarchy->getPatchLevel(0);
+      level0->getMappedBoxLevel()->getPersistentOverlapConnectors().
+      createConnector(
+         *level0->getMappedBoxLevel(),
+         hier::IntVector(dim, 2));
+
+#endif
+
+      /*
+       * Allocate data on hierarchy and set variable data on patch interiors
+       * to input values.
+       */
+
+      tbox::plog << "\nAllocate and initialize data on patch hierarchy..."
+                 << endl;
+
+      btester->initializeDataOnPatchInteriors(patch_hierarchy, 0);
+
+      tbox::plog << "Performing tests..." << endl;
+
+      fail_count = btester->runBoundaryTest(patch_hierarchy, 0);
+
+      tbox::plog << "\n\n\nDone." << endl;
+
+      /*
+       * At conclusion of test, deallocate objects.
+       */
+      patch_hierarchy.setNull();
+      grid_geometry.setNull();
+
+      if (btester) delete btester;
+
+      if (fail_count == 0) {
+         tbox::pout << "\nPASSED:  boundary test" << endl;
+      }
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return fail_count;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/boundary/test_inputs/dirichlet.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/boundary/test_inputs/dirichlet.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,119 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing 2d dirichlet boundary conditions 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+    dim = 2
+    log_file_name    = "basic2d-dirichlet.log"
+    num_domain_boxes = 2 , 1
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (7,3) ]
+   x_lo         = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 0.5e0   // upper end of computational domain.
+   periodic_dimension = 0, 0
+}
+
+BoundaryDataTester {
+
+   //
+   // Variable information is read in by the BoundaryDataTester object
+   // Each variable has its own sub-database which must contain the proper
+   // variable information.  The name of each sub-database for a variable 
+   // is arbitrary.  But the names must be distinct.  Also the names of the
+   // individual variables must be distinct.
+   //
+   //    Required input:  name
+   //                     interior_values    (# of values must = depth)
+   //    Optional input:  depth              (default = 1)
+   //                     num_ghosts         (default = 1,1)
+   //
+
+   variable_1 {
+      name            = "var1"
+      depth           = 1
+      num_ghosts      = 2 , 2
+      interior_values = 1.0
+   }
+
+   variable_2 {
+      name            = "var2"
+      depth           = 2
+      num_ghosts      = 1 , 1
+      interior_values = 2.0 , 3.0
+   }
+
+   //
+   // Boundary conditioninformation is read in by the BoundaryDataTester object
+   // Each boundary type and location has its own sub-database which must be 
+   // named properly and contain valid boundary information.
+   // 
+   // Valid boundary_condition entries for edges in 2d are:
+   //     "FLOW", "REFLECT", "DIRICHLET", "NEUMANN"
+   //
+   // Valid boundary_condition entries for nodes in 2d are:
+   //     "*FLOW", "*REFLECT", "*DIRICHLET", "*NEUMANN"
+   // Here, "*" may be either "X" or "Y".  The condition given for a node
+   // must match that of the appropriate adjacent edge.  This is enforced 
+   // for consistency.  Note that when a REFLECT edge condition is given 
+   // and the other adjacent edge has either a FLOW or REFLECT condition, 
+   // the resulting node boundary values will be the same regardless of 
+   // which edge is used.
+   //
+   // Boundary data must be given for each edge and node in a non-periodic 
+   // direction.  Any input values given for periodic directions will be ignored.
+   //
+   //
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "DIRICHLET"
+         var1                    = 0.0
+         var2                    = 1.0 , 2.0
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "DIRICHLET"
+         var1                    = 0.0
+         var2                    = 1.0 , 2.0
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "DIRICHLET"
+         var1                    = 3.0
+         var2                    = 4.0 , 5.0
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "DIRICHLET"
+         var1                    = 3.0
+         var2                    = 4.0 , 5.0
+      }
+
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XDIRICHLET"
+//       boundary_condition      = "YDIRICHLET"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XDIRICHLET"
+//       boundary_condition      = "YDIRICHLET"
+      }
+      boundary_node_xlo_yhi {
+//       boundary_condition      = "XDIRICHLET"
+         boundary_condition      = "YDIRICHLET"
+      }
+      boundary_node_xhi_yhi {
+//       boundary_condition      = "XDIRICHLET"
+         boundary_condition      = "YDIRICHLET"
+      }
+
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/boundary/test_inputs/dirichlet.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/boundary/test_inputs/dirichlet.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,203 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing 3d dirichlet boundary conditions 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+    dim = 3
+    log_file_name    = "basic3d-dirichlet.log"
+    num_domain_boxes = 2 , 1 , 2
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (7,3,7) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 0.5e0 , 1.e0   // upper end of computational domain.
+   periodic_dimension = 0, 0, 0
+}
+
+BoundaryDataTester {
+
+   //
+   // Variable information is read in by the BoundaryDataTester object
+   // Each variable has its own sub-database which must contain the proper
+   // variable information.  The name of each sub-database for a variable 
+   // is arbitrary.  But the names must be distinct.  Also the names of the
+   // individual variables must be distinct.
+   //
+   //    Required input:  name
+   //                     interior_values    (# of values must = depth)
+   //    Optional input:  depth              (default = 1)
+   //                     num_ghosts         (default = 1,1,1)
+   //
+
+   variable_1 {
+      name            = "var1"
+      depth           = 1
+      num_ghosts      = 2 , 2 , 2
+      interior_values = 1.0
+   }
+
+   variable_2 {
+      name            = "var2"
+      depth           = 3
+      num_ghosts      = 1 , 1 , 1
+      interior_values = 2.0 , 3.0 , 4.0
+   }
+
+   //
+   // Boundary conditioninformation is read in by the BoundaryDataTester object
+   // Each boundary type and location has its own sub-database which must be 
+   // named properly and contain valid boundary information.
+   // 
+   // Valid boundary_condition entries for faces in 3d are:
+   //     "FLOW", "SYMMETRIC", "DIRICHLET", "NEUMANN"
+   //
+   // Valid boundary_condition entries for edges and nodes in 3d are:
+   //     "*FLOW", "*SYMMETRIC", "*DIRICHLET", "*NEUMANN"
+   // Here, "*" may be either "X", "Y", or "Z".  The condition given for 
+   // an edge or node must match that of the appropriate adjacent face.  
+   // This is enforced for consistency.  Note that when a REFLECT face 
+   // condition is given and the other adjacent face has either a FLOW 
+   // or REFLECT condition, the resulting edge or node boundary values 
+   // will be the same regardless of which face is used.
+   //
+   // Boundary data must be given for each face, edge, and node in a 
+   // non-periodic direction.  Any input values given for periodic 
+   // directions will be ignored.
+   //
+   //
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "DIRICHLET"
+         var1                    = 0.0
+         var2                    = 1.0, 2.0, 3.0
+      }
+      boundary_face_xhi {
+         boundary_condition      = "DIRICHLET"
+         var1                    = 4.0
+         var2                    = 5.0, 6.0, 7.0
+      }
+      boundary_face_ylo {
+         boundary_condition      = "DIRICHLET"
+         var1                    = 0.0
+         var2                    = 1.0, 2.0, 3.0
+      }
+      boundary_face_yhi {
+         boundary_condition      = "DIRICHLET"
+         var1                    = 4.0
+         var2                    = 5.0, 6.0, 7.0
+      }
+      boundary_face_zlo {
+         boundary_condition      = "DIRICHLET"
+         var1                    = 0.0
+         var2                    = 1.0, 2.0, 3.0
+      }
+      boundary_face_zhi {
+         boundary_condition      = "DIRICHLET"
+         var1                    = 4.0
+         var2                    = 5.0, 6.0, 7.0
+      }
+
+      boundary_edge_ylo_zlo {  // X*** conditions not allowed
+//       boundary_condition      = "YDIRICHLET"
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_yhi_zlo { // X*** conditions not allowed
+//       boundary_condition      = "YDIRICHLET"
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_ylo_zhi { // X*** conditions not allowed
+//       boundary_condition      = "YDIRICHLET"
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_yhi_zhi { // X*** conditions not allowed
+//       boundary_condition      = "YDIRICHLET"
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_xlo_zlo { // Y*** conditions not allowed
+         boundary_condition      = "XDIRICHLET"
+//       boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_xlo_zhi { // Y*** conditions not allowed
+         boundary_condition      = "XDIRICHLET"
+//       boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_xhi_zlo { // Y*** conditions not allowed
+         boundary_condition      = "XDIRICHLET"
+//       boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_xhi_zhi { // Y*** conditions not allowed
+         boundary_condition      = "XDIRICHLET"
+//       boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_xlo_ylo { // Z*** conditions not allowed
+//       boundary_condition      = "XDIRICHLET"
+         boundary_condition      = "YDIRICHLET"
+      }
+      boundary_edge_xhi_ylo { // Z*** conditions not allowed 
+//       boundary_condition      = "XDIRICHLET"
+         boundary_condition      = "YDIRICHLET"
+      }
+      boundary_edge_xlo_yhi { // Z*** conditions not allowed
+//       boundary_condition      = "XDIRICHLET"
+         boundary_condition      = "YDIRICHLET"
+      }
+      boundary_edge_xhi_yhi { // Z*** conditions not allowed
+//       boundary_condition      = "XDIRICHLET"
+         boundary_condition      = "YDIRICHLET"
+      }
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XDIRICHLET"
+//       boundary_condition      = "YDIRICHLET"
+//       boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XDIRICHLET"
+//       boundary_condition      = "YDIRICHLET"
+//       boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XDIRICHLET"
+//       boundary_condition      = "YDIRICHLET"
+//       boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XDIRICHLET"
+//       boundary_condition      = "YDIRICHLET"
+//       boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XDIRICHLET"
+//       boundary_condition      = "YDIRICHLET"
+//       boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XDIRICHLET"
+//       boundary_condition      = "YDIRICHLET"
+//       boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XDIRICHLET"
+//       boundary_condition      = "YDIRICHLET"
+//       boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XDIRICHLET"
+//       boundary_condition      = "YDIRICHLET"
+//       boundary_condition      = "ZDIRICHLET"
+      }
+
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/boundary/test_inputs/flow.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/boundary/test_inputs/flow.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,111 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing 2d flow boundary conditions 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+    dim = 2
+    log_file_name    = "basic2d-flow.log"
+    num_domain_boxes = 2 , 1
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (7,3) ]
+   x_lo         = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 0.5e0   // upper end of computational domain.
+   periodic_dimension = 0, 0
+}
+
+BoundaryDataTester {
+
+   //
+   // Variable information is read in by the BoundaryDataTester object
+   // Each variable has its own sub-database which must contain the proper
+   // variable information.  The name of each sub-database for a variable 
+   // is arbitrary.  But the names must be distinct.  Also the names of the
+   // individual variables must be distinct.
+   //
+   //    Required input:  name
+   //                     interior_values    (# of values must = depth)
+   //    Optional input:  depth              (default = 1)
+   //                     num_ghosts         (default = 1,1)
+   //
+
+   variable_1 {
+      name            = "var1"
+      depth           = 1
+      num_ghosts      = 2 , 2
+      interior_values = 1.0
+   }
+
+   variable_2 {
+      name            = "var2"
+      depth           = 2
+      num_ghosts      = 1 , 1
+      interior_values = 2.0 , 3.0
+   }
+
+   //
+   // Boundary conditioninformation is read in by the BoundaryDataTester object
+   // Each boundary type and location has its own sub-database which must be 
+   // named properly and contain valid boundary information.
+   // 
+   // Valid boundary_condition entries for edges in 2d are:
+   //     "FLOW", "SYMMETRIC", "DIRICHLET". "NEUMANN"
+   //
+   // Valid boundary_condition entries for nodes in 2d are:
+   //     "*FLOW", "*SYMMETRIC", "*DIRICHLET", "*NEUMANN" 
+   // Here, "*" may be either "X" or "Y".  The condition given for a node
+   // must match that of the appropriate adjacent edge.  This is enforced 
+   // for consistency.  Note that when a REFLECT edge condition is given 
+   // and the other adjacent edge has either a FLOW or REFLECT condition, 
+   // the resulting node boundary values will be the same regardless of 
+   // which edge is used.
+   //
+   // Boundary data must be given for each edge and node in a non-periodic 
+   // direction.  Any input values given for periodic directions will be ignored.
+   //
+   //
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "FLOW"
+      }
+
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XFLOW"
+//       boundary_condition      = "YFLOW"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XFLOW"
+//       boundary_condition      = "YFLOW"
+      }
+      boundary_node_xlo_yhi {
+//       boundary_condition      = "XFLOW"
+         boundary_condition      = "YFLOW"
+      }
+      boundary_node_xhi_yhi {
+//       boundary_condition      = "XFLOW"
+         boundary_condition      = "YFLOW"
+      }
+
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/boundary/test_inputs/flow.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/boundary/test_inputs/flow.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,192 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing 3d flow boundary conditions 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+    dim = 3
+    log_file_name    = "basic3d-flow.log"
+    num_domain_boxes = 2 , 1 , 2
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (7,3,7) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 0.5e0 , 1.e0   // upper end of computational domain.
+   periodic_dimension = 0, 0, 0
+}
+
+BoundaryDataTester {
+
+   //
+   // Variable information is read in by the BoundaryDataTester object
+   // Each variable has its own sub-database which must contain the proper
+   // variable information.  The name of each sub-database for a variable 
+   // is arbitrary.  But the names must be distinct.  Also the names of the
+   // individual variables must be distinct.
+   //
+   //    Required input:  name
+   //                     interior_values    (# of values must = depth)
+   //    Optional input:  depth              (default = 1)
+   //                     num_ghosts         (default = 1,1,1)
+   //
+
+   variable_1 {
+      name            = "var1"
+      depth           = 1
+      num_ghosts      = 2 , 2 , 2
+      interior_values = 1.0
+   }
+
+   variable_2 {
+      name            = "var2"
+      depth           = 3
+      num_ghosts      = 1 , 1 , 1
+      interior_values = 2.0 , 3.0 , 4.0
+   }
+
+   //
+   // Boundary conditioninformation is read in by the BoundaryDataTester object
+   // Each boundary type and location has its own sub-database which must be 
+   // named properly and contain valid boundary information.
+   // 
+   // Valid boundary_condition entries for faces in 3d are:
+   //     "FLOW", "SYMMETRIC", "DIRICHLET", "NEUMANN"
+   //
+   // Valid boundary_condition entries for edges and nodes in 3d are:
+   //     "*FLOW", "*SYMMETRIC", "*DIRICHLET", "*NEUMANN"
+   // Here, "*" may be either "X", "Y", or "Z".  The condition given for 
+   // an edge or node must match that of the appropriate adjacent face.  
+   // This is enforced for consistency.  Note that when a REFLECT face 
+   // condition is given and the other adjacent face has either a FLOW 
+   // or REFLECT condition, the resulting edge or node boundary values 
+   // will be the same regardless of which face is used.
+   //
+   // Boundary data must be given for each face, edge, and node in a 
+   // non-periodic direction.  Any input values given for periodic 
+   // directions will be ignored.
+   //
+   //
+   Boundary_data {
+
+      boundary_face_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "FLOW"
+      }
+
+      boundary_edge_ylo_zlo {  // X*** conditions not allowed
+//       boundary_condition      = "YFLOW"
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zlo { // X*** conditions not allowed
+//       boundary_condition      = "YFLOW"
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_ylo_zhi { // X*** conditions not allowed
+//       boundary_condition      = "YFLOW"
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zhi { // X*** conditions not allowed
+//       boundary_condition      = "YFLOW"
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_xlo_zlo { // Y*** conditions not allowed
+         boundary_condition      = "XFLOW"
+//       boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_xlo_zhi { // Y*** conditions not allowed
+         boundary_condition      = "XFLOW"
+//       boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_xhi_zlo { // Y*** conditions not allowed
+         boundary_condition      = "XFLOW"
+//       boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_xhi_zhi { // Y*** conditions not allowed
+         boundary_condition      = "XFLOW"
+//       boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_xlo_ylo { // Z*** conditions not allowed
+//       boundary_condition      = "XFLOW"
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_ylo { // Z*** conditions not allowed
+//       boundary_condition      = "XFLOW"
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xlo_yhi { // Z*** conditions not allowed
+//       boundary_condition      = "XFLOW"
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_yhi { // Z*** conditions not allowed
+//       boundary_condition      = "XFLOW"
+         boundary_condition      = "YFLOW"
+      }
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XFLOW"
+//       boundary_condition      = "YFLOW"
+//       boundary_condition      = "ZFLOW"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XFLOW"
+//       boundary_condition      = "YFLOW"
+//       boundary_condition      = "ZFLOW"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XFLOW"
+//       boundary_condition      = "YFLOW"
+//       boundary_condition      = "ZFLOW"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XFLOW"
+//       boundary_condition      = "YFLOW"
+//       boundary_condition      = "ZFLOW"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XFLOW"
+//       boundary_condition      = "YFLOW"
+//       boundary_condition      = "ZFLOW"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XFLOW"
+//       boundary_condition      = "YFLOW"
+//       boundary_condition      = "ZFLOW"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XFLOW"
+//       boundary_condition      = "YFLOW"
+//       boundary_condition      = "ZFLOW"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XFLOW"
+//       boundary_condition      = "YFLOW"
+//       boundary_condition      = "ZFLOW"
+      }
+
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/boundary/test_inputs/neumann.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/boundary/test_inputs/neumann.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,119 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing 2d neumann boundary conditions 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+    dim = 2
+    log_file_name    = "basic2d-neumann.log"
+    num_domain_boxes = 2 , 1
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (7,3) ]
+   x_lo         = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 0.5e0   // upper end of computational domain.
+   periodic_dimension = 0, 0
+}
+
+BoundaryDataTester {
+
+   //
+   // Variable information is read in by the BoundaryDataTester object
+   // Each variable has its own sub-database which must contain the proper
+   // variable information.  The name of each sub-database for a variable 
+   // is arbitrary.  But the names must be distinct.  Also the names of the
+   // individual variables must be distinct.
+   //
+   //    Required input:  name
+   //                     interior_values    (# of values must = depth)
+   //    Optional input:  depth              (default = 1)
+   //                     num_ghosts         (default = 1,1)
+   //
+
+   variable_1 {
+      name            = "var1"
+      depth           = 1
+      num_ghosts      = 2 , 2
+      interior_values = 1.0
+   }
+
+   variable_2 {
+      name            = "var2"
+      depth           = 2
+      num_ghosts      = 1 , 1
+      interior_values = 2.0 , 3.0
+   }
+
+   //
+   // Boundary conditioninformation is read in by the BoundaryDataTester object
+   // Each boundary type and location has its own sub-database which must be 
+   // named properly and contain valid boundary information.
+   // 
+   // Valid boundary_condition entries for edges in 2d are:
+   //     "FLOW", "REFLECT", "DIRICHLET", "NEUMANN"
+   //
+   // Valid boundary_condition entries for nodes in 2d are:
+   //     "*FLOW", "*REFLECT", "*DIRICHLET", "*NEUMANN"
+   // Here, "*" may be either "X" or "Y".  The condition given for a node
+   // must match that of the appropriate adjacent edge.  This is enforced 
+   // for consistency.  Note that when a REFLECT edge condition is given 
+   // and the other adjacent edge has either a FLOW or REFLECT condition, 
+   // the resulting node boundary values will be the same regardless of 
+   // which edge is used.
+   //
+   // Boundary data must be given for each edge and node in a non-periodic 
+   // direction.  Any input values given for periodic directions will be ignored.
+   //
+   //
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "NEUMANN"
+         var1                    = 0.0
+         var2                    = 1.0 , 2.0
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "NEUMANN"
+         var1                    = 0.0
+         var2                    = 1.0 , 2.0
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "NEUMANN"
+         var1                    = 3.0
+         var2                    = 4.0 , 5.0
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "NEUMANN"
+         var1                    = 3.0
+         var2                    = 4.0 , 5.0
+      }
+
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XNEUMANN"
+//       boundary_condition      = "YNEUMANN"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XNEUMANN"
+//       boundary_condition      = "YNEUMANN"
+      }
+      boundary_node_xlo_yhi {
+//       boundary_condition      = "XNEUMANN"
+         boundary_condition      = "YNEUMANN"
+      }
+      boundary_node_xhi_yhi {
+//       boundary_condition      = "XNEUMANN"
+         boundary_condition      = "YNEUMANN"
+      }
+
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/boundary/test_inputs/neumann.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/boundary/test_inputs/neumann.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,203 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing 3d neumann boundary conditions 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+    dim = 3
+    log_file_name    = "basic3d-neumann.log"
+    num_domain_boxes = 2 , 1 , 2
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (7,3,7) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 0.5e0 , 1.e0   // upper end of computational domain.
+   periodic_dimension = 0, 0, 0
+}
+
+BoundaryDataTester {
+
+   //
+   // Variable information is read in by the BoundaryDataTester object
+   // Each variable has its own sub-database which must contain the proper
+   // variable information.  The name of each sub-database for a variable 
+   // is arbitrary.  But the names must be distinct.  Also the names of the
+   // individual variables must be distinct.
+   //
+   //    Required input:  name
+   //                     interior_values    (# of values must = depth)
+   //    Optional input:  depth              (default = 1)
+   //                     num_ghosts         (default = 1,1,1)
+   //
+
+   variable_1 {
+      name            = "var1"
+      depth           = 1
+      num_ghosts      = 2 , 2 , 2
+      interior_values = 1.0
+   }
+
+   variable_2 {
+      name            = "var2"
+      depth           = 3
+      num_ghosts      = 1 , 1 , 1
+      interior_values = 2.0 , 3.0 , 4.0
+   }
+
+   //
+   // Boundary conditioninformation is read in by the BoundaryDataTester object
+   // Each boundary type and location has its own sub-database which must be 
+   // named properly and contain valid boundary information.
+   // 
+   // Valid boundary_condition entries for faces in 3d are:
+   //     "FLOW", "SYMMETRIC", "DIRICHLET", "NEUMANN"
+   //
+   // Valid boundary_condition entries for edges and nodes in 3d are:
+   //     "*FLOW", "*SYMMETRIC", "*DIRICHLET", "*NEUMANN"
+   // Here, "*" may be either "X", "Y", or "Z".  The condition given for 
+   // an edge or node must match that of the appropriate adjacent face.  
+   // This is enforced for consistency.  Note that when a REFLECT face 
+   // condition is given and the other adjacent face has either a FLOW 
+   // or REFLECT condition, the resulting edge or node boundary values 
+   // will be the same regardless of which face is used.
+   //
+   // Boundary data must be given for each face, edge, and node in a 
+   // non-periodic direction.  Any input values given for periodic 
+   // directions will be ignored.
+   //
+   //
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "NEUMANN"
+         var1                    = 0.0
+         var2                    = 1.0, 2.0, 3.0
+      }
+      boundary_face_xhi {
+         boundary_condition      = "NEUMANN"
+         var1                    = 4.0
+         var2                    = 5.0, 6.0, 7.0
+      }
+      boundary_face_ylo {
+         boundary_condition      = "NEUMANN"
+         var1                    = 0.0
+         var2                    = 1.0, 2.0, 3.0
+      }
+      boundary_face_yhi {
+         boundary_condition      = "NEUMANN"
+         var1                    = 4.0
+         var2                    = 5.0, 6.0, 7.0
+      }
+      boundary_face_zlo {
+         boundary_condition      = "NEUMANN"
+         var1                    = 0.0
+         var2                    = 1.0, 2.0, 3.0
+      }
+      boundary_face_zhi {
+         boundary_condition      = "NEUMANN"
+         var1                    = 4.0
+         var2                    = 5.0, 6.0, 7.0
+      }
+
+      boundary_edge_ylo_zlo { // X*** conditions not allowed
+//       boundary_condition      = "YNEUMANN"
+         boundary_condition      = "ZNEUMANN"
+      }
+      boundary_edge_yhi_zlo { // X*** conditions not allowed
+//       boundary_condition      = "YNEUMANN"
+         boundary_condition      = "ZNEUMANN"
+      }
+      boundary_edge_ylo_zhi { // X*** conditions not allowed
+//       boundary_condition      = "YNEUMANN"
+         boundary_condition      = "ZNEUMANN"
+      }
+      boundary_edge_yhi_zhi { // X*** conditions not allowed
+//       boundary_condition      = "YNEUMANN"
+         boundary_condition      = "ZNEUMANN"
+      }
+      boundary_edge_xlo_zlo { // Y*** conditions not allowed
+         boundary_condition      = "XNEUMANN"
+//       boundary_condition      = "ZNEUMANN"
+      }
+      boundary_edge_xlo_zhi { // Y*** conditions not allowed
+         boundary_condition      = "XNEUMANN"
+//       boundary_condition      = "ZNEUMANN"
+      }
+      boundary_edge_xhi_zlo { // Y*** conditions not allowed
+         boundary_condition      = "XNEUMANN"
+//       boundary_condition      = "ZNEUMANN"
+      }
+      boundary_edge_xhi_zhi { // Y*** conditions not allowed
+         boundary_condition      = "XNEUMANN"
+//       boundary_condition      = "ZNEUMANN"
+      }
+      boundary_edge_xlo_ylo { // Z*** conditions not allowed
+//       boundary_condition      = "XNEUMANN"
+         boundary_condition      = "YNEUMANN"
+      }
+      boundary_edge_xhi_ylo { // Z*** conditions not allowed
+//       boundary_condition      = "XNEUMANN"
+         boundary_condition      = "YNEUMANN"
+      }
+      boundary_edge_xlo_yhi { // Z*** conditions not allowed
+//       boundary_condition      = "XNEUMANN"
+         boundary_condition      = "YNEUMANN"
+      }
+      boundary_edge_xhi_yhi { // Z*** conditions not allowed
+//       boundary_condition      = "XNEUMANN"
+         boundary_condition      = "YNEUMANN"
+      }
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XNEUMANN"
+//       boundary_condition      = "YNEUMANN"
+//       boundary_condition      = "ZNEUMANN"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XNEUMANN"
+//       boundary_condition      = "YNEUMANN"
+//       boundary_condition      = "ZNEUMANN"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XNEUMANN"
+//       boundary_condition      = "YNEUMANN"
+//       boundary_condition      = "ZNEUMANN"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XNEUMANN"
+//       boundary_condition      = "YNEUMANN"
+//       boundary_condition      = "ZNEUMANN"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XNEUMANN"
+//       boundary_condition      = "YNEUMANN"
+//       boundary_condition      = "ZNEUMANN"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XNEUMANN"
+//       boundary_condition      = "YNEUMANN"
+//       boundary_condition      = "ZNEUMANN"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XNEUMANN"
+//       boundary_condition      = "YNEUMANN"
+//       boundary_condition      = "ZNEUMANN"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XNEUMANN"
+//       boundary_condition      = "YNEUMANN"
+//       boundary_condition      = "ZNEUMANN"
+      }
+
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/boundary/test_inputs/periodic01.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/boundary/test_inputs/periodic01.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing 2d reflect & periodic boundary conditions 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+    dim = 2
+    log_file_name    = "basic2d-periodic01.log"
+    num_domain_boxes = 2 , 1
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (7,3) ]
+   x_lo         = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 0.5e0   // upper end of computational domain.
+   periodic_dimension = 0, 1
+}
+
+BoundaryDataTester {
+
+   //
+   // Variable information is read in by the BoundaryDataTester object
+   // Each variable has its own sub-database which must contain the proper
+   // variable information.  The name of each sub-database for a variable 
+   // is arbitrary.  But the names must be distinct.  Also the names of the
+   // individual variables must be distinct.
+   //
+   //    Required input:  name
+   //                     interior_values    (# of values must = depth)
+   //    Optional input:  depth              (default = 1)
+   //                     num_ghosts         (default = 1,1)
+   //
+
+   variable_1 {
+      name            = "var1"
+      depth           = 1
+      num_ghosts      = 2 , 2
+      interior_values = 1.0
+   }
+
+   variable_2 {
+      name            = "var2"
+      depth           = 2
+      num_ghosts      = 1 , 1
+      interior_values = 2.0 , 3.0
+   }
+
+   //
+   // Boundary conditioninformation is read in by the BoundaryDataTester object
+   // Each boundary type and location has its own sub-database which must be 
+   // named properly and contain valid boundary information.
+   // 
+   // Valid boundary_condition entries for edges in 2d are:
+   //     "FLOW", "REFLECT", "DIRICHLET", "NEUMANN"
+   //
+   // Valid boundary_condition entries for nodes in 2d are:
+   //     "*FLOW", "*REFLECT", "*DIRICHLET", "*NEUMANN"
+   // Here, "*" may be either "X" or "Y".  The condition given for a node
+   // must match that of the appropriate adjacent edge.  This is enforced 
+   // for consistency.  Note that when a REFLECT edge condition is given 
+   // and the other adjacent edge has either a FLOW or REFLECT condition, 
+   // the resulting node boundary values will be the same regardless of 
+   // which edge is used.
+   //
+   // Boundary data must be given for each edge and node in a non-periodic 
+   // direction.  Any input values given for periodic directions will be ignored.
+   //
+   //
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "DIRICHLET"
+         var1                    = 0.0
+         var2                    = 1.0 , 2.0
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "DIRICHLET"
+         var1                    = 0.0
+         var2                    = 1.0 , 2.0
+      }
+
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/boundary/test_inputs/periodic010.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/boundary/test_inputs/periodic010.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing 3d periodic boundary conditions 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+    dim = 3
+    log_file_name    = "basic3d-periodic010.log"
+    num_domain_boxes = 2 , 1 , 2
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (7,3,7) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 0.5e0 , 1.e0   // upper end of computational domain.
+   periodic_dimension = 0, 1, 0
+}
+
+BoundaryDataTester {
+
+   //
+   // Variable information is read in by the BoundaryDataTester object
+   // Each variable has its own sub-database which must contain the proper
+   // variable information.  The name of each sub-database for a variable 
+   // is arbitrary.  But the names must be distinct.  Also the names of the
+   // individual variables must be distinct.
+   //
+   //    Required input:  name
+   //                     interior_values    (# of values must = depth)
+   //    Optional input:  depth              (default = 1)
+   //                     num_ghosts         (default = 1,1,1)
+   //
+
+   variable_1 {
+      name            = "var1"
+      depth           = 1
+      num_ghosts      = 2 , 2 , 2
+      interior_values = 1.0
+   }
+
+   variable_2 {
+      name            = "var2"
+      depth           = 3
+      num_ghosts      = 1 , 1 , 1
+      interior_values = 2.0 , 3.0 , 4.0
+   }
+
+   //
+   // Boundary conditioninformation is read in by the BoundaryDataTester object
+   // Each boundary type and location has its own sub-database which must be 
+   // named properly and contain valid boundary information.
+   // 
+   // Valid boundary_condition entries for faces in 3d are:
+   //     "FLOW", "SYMMETRIC", "DIRICHLET", "NEUMANN" 
+   //
+   // Valid boundary_condition entries for edges and nodes in 3d are:
+   //     "*FLOW", "*SYMMETRIC", "*DIRICHLET, "*NEUMANN""
+   // Here, "*" may be either "X", "Y", or "Z".  The condition given for 
+   // an edge or node must match that of the appropriate adjacent face.  
+   // This is enforced for consistency.  Note that when a REFLECT face 
+   // condition is given and the other adjacent face has either a FLOW 
+   // or REFLECT condition, the resulting edge or node boundary values 
+   // will be the same regardless of which face is used.
+   //
+   // Boundary data must be given for each face, edge, and node in a 
+   // non-periodic direction.  Any input values given for periodic 
+   // directions will be ignored.
+   //
+   //
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "DIRICHLET"
+         var1                    = 0.0
+         var2                    = 1.0, 2.0, 3.0
+      }
+      boundary_face_xhi {
+         boundary_condition      = "DIRICHLET"
+         var1                    = 4.0
+         var2                    = 5.0, 6.0, 7.0
+      }
+      boundary_face_zlo {
+         boundary_condition      = "DIRICHLET"
+         var1                    = 0.0
+         var2                    = 1.0, 2.0, 3.0
+      }
+      boundary_face_zhi {
+         boundary_condition      = "DIRICHLET"
+         var1                    = 4.0
+         var2                    = 5.0, 6.0, 7.0
+      }
+
+      boundary_edge_xlo_zlo { // Y*** conditions not allowed
+         boundary_condition      = "XDIRICHLET"
+//       boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_xlo_zhi { // Y*** conditions not allowed
+         boundary_condition      = "XDIRICHLET"
+//       boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_xhi_zlo { // Y*** conditions not allowed
+         boundary_condition      = "XDIRICHLET"
+//       boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_xhi_zhi { // Y*** conditions not allowed
+         boundary_condition      = "XDIRICHLET"
+//       boundary_condition      = "ZDIRICHLET"
+      }
+
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/boundary/test_inputs/periodic011.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/boundary/test_inputs/periodic011.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing 3d periodic boundary conditions 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+    dim = 3
+    log_file_name    = "basic3d-periodic011.log"
+    num_domain_boxes = 2 , 1 , 2
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (7,3,7) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 0.5e0 , 1.e0   // upper end of computational domain.
+   periodic_dimension = 0, 1, 1
+}
+
+BoundaryDataTester {
+
+   //
+   // Variable information is read in by the BoundaryDataTester object
+   // Each variable has its own sub-database which must contain the proper
+   // variable information.  The name of each sub-database for a variable 
+   // is arbitrary.  But the names must be distinct.  Also the names of the
+   // individual variables must be distinct.
+   //
+   //    Required input:  name
+   //                     interior_values    (# of values must = depth)
+   //    Optional input:  depth              (default = 1)
+   //                     num_ghosts         (default = 1,1,1)
+   //
+
+   variable_1 {
+      name            = "var1"
+      depth           = 1
+      num_ghosts      = 2 , 2 , 2
+      interior_values = 1.0
+   }
+
+   variable_2 {
+      name            = "var2"
+      depth           = 3
+      num_ghosts      = 1 , 1 , 1
+      interior_values = 2.0 , 3.0 , 4.0
+   }
+
+   //
+   // Boundary conditioninformation is read in by the BoundaryDataTester object
+   // Each boundary type and location has its own sub-database which must be 
+   // named properly and contain valid boundary information.
+   // 
+   // Valid boundary_condition entries for faces in 3d are:
+   //     "FLOW", "SYMMETRIC", "DIRICHLET", "NEUMANN"
+   //
+   // Valid boundary_condition entries for edges and nodes in 3d are:
+   //     "*FLOW", "*SYMMETRIC", "*DIRICHLET", "*NEUMANN"
+   // Here, "*" may be either "X", "Y", or "Z".  The condition given for 
+   // an edge or node must match that of the appropriate adjacent face.  
+   // This is enforced for consistency.  Note that when a REFLECT face 
+   // condition is given and the other adjacent face has either a FLOW 
+   // or REFLECT condition, the resulting edge or node boundary values 
+   // will be the same regardless of which face is used.
+   //
+   // Boundary data must be given for each face, edge, and node in a 
+   // non-periodic direction.  Any input values given for periodic 
+   // directions will be ignored.
+   //
+   //
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "DIRICHLET"
+         var1                    = 0.0
+         var2                    = 1.0, 2.0, 3.0
+      }
+      boundary_face_xhi {
+         boundary_condition      = "DIRICHLET"
+         var1                    = 4.0
+         var2                    = 5.0, 6.0, 7.0
+      }
+
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/boundary/test_inputs/periodic11.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/boundary/test_inputs/periodic11.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing 2d periodic boundary conditions 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+    dim = 2
+    log_file_name    = "basic2d-periodic11.log"
+    num_domain_boxes = 2 , 1
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (7,3) ]
+   x_lo         = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 0.5e0   // upper end of computational domain.
+   periodic_dimension = 1, 1
+}
+
+BoundaryDataTester {
+
+   //
+   // Variable information is read in by the BoundaryDataTester object
+   // Each variable has its own sub-database which must contain the proper
+   // variable information.  The name of each sub-database for a variable 
+   // is arbitrary.  But the names must be distinct.  Also the names of the
+   // individual variables must be distinct.
+   //
+   //    Required input:  name
+   //                     interior_values    (# of values must = depth)
+   //    Optional input:  depth              (default = 1)
+   //                     num_ghosts         (default = 1,1)
+   //
+
+   variable_1 {
+      name            = "var1"
+      depth           = 1
+      num_ghosts      = 2 , 2
+      interior_values = 1.0
+   }
+
+   variable_2 {
+      name            = "var2"
+      depth           = 2
+      num_ghosts      = 1 , 1
+      interior_values = 2.0 , 3.0
+   }
+
+   //
+   // Boundary conditioninformation is read in by the BoundaryDataTester object
+   // Each boundary type and location has its own sub-database which must be 
+   // named properly and contain valid boundary information.
+   // 
+   // Valid boundary_condition entries for edges in 2d are:
+   //     "FLOW", "REFLECT", "DIRICHLET", "NEUMANN"
+   //
+   // Valid boundary_condition entries for nodes in 2d are:
+   //     "*FLOW", "*REFLECT", "*DIRICHLET", "*NEUMANN"
+   // Here, "*" may be either "X" or "Y".  The condition given for a node
+   // must match that of the appropriate adjacent edge.  This is enforced 
+   // for consistency.  Note that when a REFLECT edge condition is given 
+   // and the other adjacent edge has either a FLOW or REFLECT condition, 
+   // the resulting node boundary values will be the same regardless of 
+   // which edge is used.
+   //
+   // Boundary data must be given for each edge and node in a non-periodic 
+   // direction.  Any input values given for periodic directions will be ignored.
+   //
+   //
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/boundary/test_inputs/periodic111.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/boundary/test_inputs/periodic111.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing 3d periodic boundary conditions 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+    dim = 3
+    log_file_name    = "basic3d-periodic111.log"
+    num_domain_boxes = 2 , 1 , 2
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (7,3,7) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 0.5e0 , 1.e0   // upper end of computational domain.
+   periodic_dimension = 1, 1, 1
+}
+
+BoundaryDataTester {
+
+   //
+   // Variable information is read in by the BoundaryDataTester object
+   // Each variable has its own sub-database which must contain the proper
+   // variable information.  The name of each sub-database for a variable 
+   // is arbitrary.  But the names must be distinct.  Also the names of the
+   // individual variables must be distinct.
+   //
+   //    Required input:  name
+   //                     interior_values    (# of values must = depth)
+   //    Optional input:  depth              (default = 1)
+   //                     num_ghosts         (default = 1,1,1)
+   //
+
+   variable_1 {
+      name            = "var1"
+      depth           = 1
+      num_ghosts      = 2 , 2 , 2
+      interior_values = 1.0
+   }
+
+   variable_2 {
+      name            = "var2"
+      depth           = 3
+      num_ghosts      = 1 , 1 , 1
+      interior_values = 2.0 , 3.0 , 4.0
+   }
+
+   //
+   // Boundary conditioninformation is read in by the BoundaryDataTester object
+   // Each boundary type and location has its own sub-database which must be 
+   // named properly and contain valid boundary information.
+   // 
+   // Valid boundary_condition entries for faces in 3d are:
+   //     "FLOW", "SYMMETRIC", "DIRICHLET", "NEUMANN"
+   //
+   // Valid boundary_condition entries for edges and nodes in 3d are:
+   //     "*FLOW", "*SYMMETRIC", "*DIRICHLET", "*NEUMANN"
+   // Here, "*" may be either "X", "Y", or "Z".  The condition given for 
+   // an edge or node must match that of the appropriate adjacent face.  
+   // This is enforced for consistency.  Note that when a REFLECT face 
+   // condition is given and the other adjacent face has either a FLOW 
+   // or REFLECT condition, the resulting edge or node boundary values 
+   // will be the same regardless of which face is used.
+   //
+   // Boundary data must be given for each face, edge, and node in a 
+   // non-periodic direction.  Any input values given for periodic 
+   // directions will be ignored.
+   //
+   //
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/boundary/test_inputs/reflect.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/boundary/test_inputs/reflect.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,111 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing 2d reflect boundary conditions 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+    dim = 2
+    log_file_name    = "basic2d-reflect.log"
+    num_domain_boxes = 2 , 1
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (7,3) ]
+   x_lo         = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 0.5e0   // upper end of computational domain.
+   periodic_dimension = 0, 0
+}
+
+BoundaryDataTester {
+
+   //
+   // Variable information is read in by the BoundaryDataTester object
+   // Each variable has its own sub-database which must contain the proper
+   // variable information.  The name of each sub-database for a variable 
+   // is arbitrary.  But the names must be distinct.  Also the names of the
+   // individual variables must be distinct.
+   //
+   //    Required input:  name
+   //                     interior_values    (# of values must = depth)
+   //    Optional input:  depth              (default = 1)
+   //                     num_ghosts         (default = 1,1)
+   //
+
+   variable_1 {
+      name            = "var1"
+      depth           = 1
+      num_ghosts      = 2 , 2
+      interior_values = 1.0
+   }
+
+   variable_2 {
+      name            = "var2"
+      depth           = 2
+      num_ghosts      = 1 , 1
+      interior_values = 2.0 , 3.0
+   }
+
+   //
+   // Boundary conditioninformation is read in by the BoundaryDataTester object
+   // Each boundary type and location has its own sub-database which must be 
+   // named properly and contain valid boundary information.
+   // 
+   // Valid boundary_condition entries for edges in 2d are:
+   //     "FLOW", "REFLECT", "DIRICHLET", "NEUMANN"
+   //
+   // Valid boundary_condition entries for nodes in 2d are:
+   //     "*FLOW", "*REFLECT", "*DIRICHLET", "*NEUMANN"
+   // Here, "*" may be either "X" or "Y".  The condition given for a node
+   // must match that of the appropriate adjacent edge.  This is enforced 
+   // for consistency.  Note that when a REFLECT edge condition is given 
+   // and the other adjacent edge has either a FLOW or REFLECT condition, 
+   // the resulting node boundary values will be the same regardless of 
+   // which edge is used.
+   //
+   // Boundary data must be given for each edge and node in a non-periodic 
+   // direction.  Any input values given for periodic directions will be ignored.
+   //
+   //
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XREFLECT"
+//       boundary_condition      = "YREFLECT"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XREFLECT"
+//       boundary_condition      = "YREFLECT"
+      }
+      boundary_node_xlo_yhi {
+//       boundary_condition      = "XREFLECT"
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_node_xhi_yhi {
+//       boundary_condition      = "XREFLECT"
+         boundary_condition      = "YREFLECT"
+      }
+
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/boundary/test_inputs/reflect.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/boundary/test_inputs/reflect.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,192 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing 3d reflect boundary conditions 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+    dim = 3
+    log_file_name    = "basic3d-reflect.log"
+    num_domain_boxes = 2 , 1 , 2
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (7,3,7) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 0.5e0 , 1.e0   // upper end of computational domain.
+   periodic_dimension = 0, 0, 0
+}
+
+BoundaryDataTester {
+
+   //
+   // Variable information is read in by the BoundaryDataTester object
+   // Each variable has its own sub-database which must contain the proper
+   // variable information.  The name of each sub-database for a variable 
+   // is arbitrary.  But the names must be distinct.  Also the names of the
+   // individual variables must be distinct.
+   //
+   //    Required input:  name
+   //                     interior_values    (# of values must = depth)
+   //    Optional input:  depth              (default = 1)
+   //                     num_ghosts         (default = 1,1,1)
+   //
+
+   variable_1 {
+      name            = "var1"
+      depth           = 1
+      num_ghosts      = 2 , 2 , 2
+      interior_values = 1.0
+   }
+
+   variable_2 {
+      name            = "var2"
+      depth           = 3
+      num_ghosts      = 1 , 1 , 1
+      interior_values = 2.0 , 3.0 , 4.0
+   }
+
+   //
+   // Boundary conditioninformation is read in by the BoundaryDataTester object
+   // Each boundary type and location has its own sub-database which must be 
+   // named properly and contain valid boundary information.
+   // 
+   // Valid boundary_condition entries for faces in 3d are:
+   //     "FLOW", "SYMMETRIC", "DIRICHLET", "NEUMANN"
+   //
+   // Valid boundary_condition entries for edges and nodes in 3d are:
+   //     "*FLOW", "*SYMMETRIC", "*DIRICHLET", "*NEUMANN"
+   // Here, "*" may be either "X", "Y", or "Z".  The condition given for 
+   // an edge or node must match that of the appropriate adjacent face.  
+   // This is enforced for consistency.  Note that when a REFLECT face 
+   // condition is given and the other adjacent face has either a FLOW 
+   // or REFLECT condition, the resulting edge or node boundary values 
+   // will be the same regardless of which face is used.
+   //
+   // Boundary data must be given for each face, edge, and node in a 
+   // non-periodic direction.  Any input values given for periodic 
+   // directions will be ignored.
+   //
+   //
+   Boundary_data {
+
+      boundary_face_xlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      boundary_edge_ylo_zlo { // X*** conditions not allowed
+//       boundary_condition      = "YREFLECT"
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zlo { // X*** conditions not allowed
+//       boundary_condition      = "YREFLECT"
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_ylo_zhi { // X*** conditions not allowed
+//       boundary_condition      = "YREFLECT"
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zhi { // X*** conditions not allowed
+//       boundary_condition      = "YREFLECT"
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_xlo_zlo { // Y*** conditions not allowed
+         boundary_condition      = "XREFLECT"
+//       boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_xlo_zhi { // Y*** conditions not allowed
+         boundary_condition      = "XREFLECT"
+//       boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_xhi_zlo { // Y*** conditions not allowed
+         boundary_condition      = "XREFLECT"
+//       boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_xhi_zhi { // Y*** conditions not allowed
+         boundary_condition      = "XREFLECT"
+//       boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_xlo_ylo { // Z*** conditions not allowed
+//       boundary_condition      = "XREFLECT"
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_ylo { // Z*** conditions not allowed
+//       boundary_condition      = "XREFLECT"
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xlo_yhi { // Z*** conditions not allowed
+//       boundary_condition      = "XREFLECT"
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_yhi { // Z*** conditions not allowed
+//       boundary_condition      = "XREFLECT"
+         boundary_condition      = "YREFLECT"
+      }
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+//       boundary_condition      = "YREFLECT"
+//       boundary_condition      = "ZREFLECT"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+//       boundary_condition      = "YREFLECT"
+//       boundary_condition      = "ZREFLECT"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+//       boundary_condition      = "YREFLECT"
+//       boundary_condition      = "ZREFLECT"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+//       boundary_condition      = "YREFLECT"
+//       boundary_condition      = "ZREFLECT"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+//       boundary_condition      = "YREFLECT"
+//       boundary_condition      = "ZREFLECT"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+//       boundary_condition      = "YREFLECT"
+//       boundary_condition      = "ZREFLECT"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+//       boundary_condition      = "YREFLECT"
+//       boundary_condition      = "ZREFLECT"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+//       boundary_condition      = "YREFLECT"
+//       boundary_condition      = "ZREFLECT"
+      }
+
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/clustering/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/clustering/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,47 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for testing parts of SAMRAI library 
+##
+#########################################################################
+
+SAMRAI	      = @top_srcdir@
+SRCDIR        = @srcdir@
+OBJECT        = ../../..
+SUBDIR        = source/test/clustering
+
+SUBDIRS = async_br
+
+# TODO SGS need to add parallel back in
+#SUBDIRS = parallel_br async_br
+
+default: check	
+
+include $(OBJECT)/config/Makefile.config
+
+library:
+lib1d:
+lib2d:
+lib3d:
+libXd:
+
+check:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+
+check2d:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+
+check3d:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+
+checkcompile:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+
+checktest:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+
+clean:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
diff -r 000000000000 -r 5eda1a3f24e8 source/test/clustering/async_br/ABRTest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/clustering/async_br/ABRTest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,112 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   ABRTest class implementation 
+ *
+ ************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "ABRTest.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/math/HierarchyCellDataOpsReal.h"
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+
+#include <iomanip>
+
+using namespace SAMRAI;
+
+ABRTest::ABRTest(
+   const std::string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<hier::PatchHierarchy> patch_hierarchy,
+   tbox::Pointer<tbox::Database> database):
+   d_name(object_name),
+   d_dim(dim),
+   d_hierarchy(patch_hierarchy),
+   d_tagger(object_name + ":tagger",
+            dim,
+            database->isDatabase("sine_tagger") ?
+            database->getDatabase("sine_tagger").getPointer():NULL),
+   d_time(0.5)
+{
+   d_tagger.resetHierarchyConfiguration(d_hierarchy, 0, 0);
+}
+
+ABRTest::~ABRTest()
+{
+}
+
+mesh::StandardTagAndInitStrategy *ABRTest::getStandardTagAndInitObject()
+{
+   return &d_tagger;
+}
+
+/*
+ * Deallocate patch data allocated by this class.
+ */
+void ABRTest::computeHierarchyData(
+   hier::PatchHierarchy& hierarchy,
+   double time)
+{
+   d_tagger.computeHierarchyData(hierarchy, time);
+}
+
+/*
+ * Deallocate patch data allocated by this class.
+ */
+void ABRTest::deallocatePatchData(
+   hier::PatchHierarchy& hierarchy)
+{
+   d_tagger.deallocatePatchData(hierarchy);
+}
+
+/*
+ * Deallocate patch data allocated by this class.
+ */
+void ABRTest::deallocatePatchData(
+   hier::PatchLevel& level)
+{
+   d_tagger.deallocatePatchData(level);
+}
+
+#ifdef HAVE_HDF5
+int ABRTest::registerVariablesWithPlotter(
+   tbox::Pointer<appu::VisItDataWriter> writer)
+{
+   if (!writer.isNull())
+      d_tagger.registerVariablesWithPlotter(*writer);
+   return 0;
+}
+#endif
+
+bool ABRTest::packDerivedDataIntoDoubleBuffer(
+   double* buffer,
+   const hier::Patch& patch,
+   const hier::Box& region,
+   const std::string& variable_name,
+   int depth_id) const
+{
+   (void)depth_id;
+
+   if (variable_name == "Patch level number") {
+      double pln = patch.getPatchLevelNumber();
+      int i, size = region.size();
+      for (i = 0; i < size; ++i) buffer[i] = pln;
+   } else {
+      // Did not register this name.
+      TBOX_ERROR(
+         "Unregistered variable name '" << variable_name << "' in\n"
+         <<
+         "ABRTest::packDerivedPatchDataIntoDoubleBuffer");
+   }
+
+   return false;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/clustering/async_br/ABRTest.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/clustering/async_br/ABRTest.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   ABRTest class declaration 
+ *
+ ************************************************************************/
+#ifndef included_ABRTest
+#define included_ABRTest
+
+#include <string>
+using namespace std;
+
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Database.h"
+
+/*
+ * SAMRAI classes
+ */
+#include "SAMRAI/appu/VisItDataWriter.h"
+#include "SAMRAI/appu/VisDerivedDataStrategy.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/solv/CartesianRobinBcHelper.h"
+#include "SAMRAI/solv/RobinBcCoefStrategy.h"
+#include "SinusoidalFrontTagger.h"
+
+using namespace SAMRAI;
+
+/*!
+ * @brief Class to test new PIND algorithm.
+ */
+class ABRTest:
+   public appu::VisDerivedDataStrategy
+{
+
+public:
+   /*!
+    * @brief Constructor.
+    */
+   ABRTest(
+      const std::string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<hier::PatchHierarchy> patch_hierarchy,
+      SAMRAI::tbox::Pointer<SAMRAI::tbox::Database> database);
+
+   ~ABRTest();
+
+   mesh::StandardTagAndInitStrategy *
+   getStandardTagAndInitObject();
+
+   //@{ @name SAMRAI::appu::VisDerivedDataStrategy virtuals
+
+   virtual bool
+   packDerivedDataIntoDoubleBuffer(
+      double* buffer,
+      const hier::Patch& patch,
+      const hier::Box& region,
+      const std::string& variable_name,
+      int depth_id) const;
+
+   //@}
+
+public:
+   /*
+    * Deallocate patch data allocated by this class.
+    */
+   void
+   computeHierarchyData(
+      hier::PatchHierarchy& hierarchy,
+      double time);
+
+   /*!
+    * @brief Deallocate internally managed patch data on level.
+    */
+   void
+   deallocatePatchData(
+      hier::PatchLevel& level);
+
+   /*!
+    * @brief Deallocate internally managed patch data on hierarchy.
+    */
+   void
+   deallocatePatchData(
+      hier::PatchHierarchy& hierarchy);
+
+#ifdef HAVE_HDF5
+   /*!
+    * @brief Tell a VisIt plotter which data to write for this class.
+    */
+   int
+   registerVariablesWithPlotter(
+      tbox::Pointer<appu::VisItDataWriter> writer);
+#endif
+
+private:
+   std::string d_name;
+
+   const tbox::Dimension d_dim;
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+
+   SinusoidalFrontTagger d_tagger;
+
+   /*!
+    * @brief Front time.
+    */
+   double d_time;
+
+};
+
+#endif  // included_ABRTest
diff -r 000000000000 -r 5eda1a3f24e8 source/test/clustering/async_br/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/clustering/async_br/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,877 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=ABRTest.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CartesianRobinBcHelper.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h ABRTest.C	\
+	ABRTest.h SinusoidalFrontTagger.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=SinusoidalFrontTagger.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MDA_Access.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	SinusoidalFrontTagger.C SinusoidalFrontTagger.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=get-input-filename.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h get-input-filename.C	\
+	get-input-filename.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=main.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BergerRigoutsos.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CartesianRobinBcHelper.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACOperatorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h ABRTest.h	\
+	SinusoidalFrontTagger.h get-input-filename.h main.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/clustering/async_br/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/clustering/async_br/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,69 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for asynchronous Berger-Rigoutsos test 
+##
+#########################################################################
+
+SAMRAI	      = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/test/clustering/async_br
+VPATH         = @top_srcdir@/source/test/clustering/async_br
+TESTTOOLS     = ../../testtools
+OBJECT        = ../../../..
+
+default: check
+
+include $(OBJECT)/config/Makefile.config
+
+CPPFLAGS_EXTRA= -DTESTING=1
+
+CXX_OBJS      = main.o ABRTest.o SinusoidalFrontTagger.o get-input-filename.o
+
+main:	$(CXX_OBJS) $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS)	\
+	$(LIBSAMRAI3D) $(LIBSAMRAI) $(LDLIBS) -o $@
+
+NUM_TESTS = 2
+
+TEST_NPROCS = @TEST_NPROCS@
+
+check:
+	$(MAKE) check2d
+	$(MAKE) check3d
+
+check2d:	main
+	@for i in test_inputs/*2d*.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+check3d:	main
+	@for i in test_inputs/*3d*.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+checkcompile: main
+
+checktest:
+	rm -f makecheck.logfile
+	$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+	$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+	rm -f makecheck.logfile
+
+clean-check:
+	$(SAMCLEAN)
+
+clean:
+	$(SAMCLEAN)
+	$(RM) *.f *main*
+	$(RM) -rf restart-*d*
+
+lib2d lib3d:
+		cd $(OBJECT) && make $@
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/test/clustering/async_br/SinusoidalFrontTagger.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/clustering/async_br/SinusoidalFrontTagger.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,592 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   SinusoidalFrontTagger class implementation 
+ *
+ ************************************************************************/
+#include "SinusoidalFrontTagger.h"
+
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/math/HierarchyCellDataOpsReal.h"
+#include "SAMRAI/pdat/MDA_Access.h"
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <iomanip>
+
+using namespace SAMRAI;
+
+// using namespace std;
+
+SinusoidalFrontTagger::SinusoidalFrontTagger(
+   const std::string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Database* database):
+   d_name(object_name),
+   d_dim(dim),
+   d_hierarchy(),
+   d_period(1.0),
+   d_init_disp(dim.getValue()),
+   d_velocity(dim.getValue()),
+   d_amplitude(0.2),
+   d_ghost_cell_width(dim, 0),
+   d_buffer_cells(dim, 1),
+   d_allocate_data(true),
+   d_time(0.5)
+{
+   hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(variable_db != NULL);
+#endif
+
+   tbox::Array<double> init_disp;
+   tbox::Array<double> velocity;
+
+   if (database != NULL) {
+      d_allocate_data =
+         database->getBoolWithDefault("allocate_data",
+            d_allocate_data);
+      if (database->isInteger("buffer_cells")) {
+         database->getIntegerArray("buffer_cells",
+            &d_buffer_cells[0], d_dim.getValue());
+      }
+      for (int ln = 0; true; ++ln) {
+         std::string name("buffer_space_");
+         name = name + tbox::Utilities::intToString(ln);
+         if (database->isDouble(name)) {
+            d_buffer_space.resizeArray(d_dim.getValue() * (ln + 1));
+            database->getDoubleArray(name, &d_buffer_space[d_dim.getValue() * ln], d_dim.getValue());
+         } else {
+            break;
+         }
+      }
+      d_period =
+         database->getDoubleWithDefault("period",
+            d_period);
+      if (database->isDouble("init_disp")) {
+         init_disp =
+            database->getDoubleArray("init_disp");
+      }
+      if (database->isDouble("velocity")) {
+         velocity =
+            database->getDoubleArray("velocity");
+      }
+      d_amplitude =
+         database->getDoubleWithDefault("amplitude",
+            d_amplitude);
+      d_time =
+         database->getDoubleWithDefault("time",
+            d_time);
+   }
+
+   for (int idim = 0; idim < d_dim.getValue(); ++idim) {
+      d_init_disp[idim] = idim < init_disp.size() ? init_disp[idim] : 0.0;
+      d_velocity[idim] = idim < velocity.size() ? velocity[idim] : 0.0;
+   }
+
+   const std::string context_name = d_name + std::string(":context");
+   d_context = variable_db->getContext(context_name);
+
+   if (database->isInteger("ghost_cell_width")) {
+      database->getIntegerArray("ghost_cell_width",
+         &d_ghost_cell_width[0], d_dim.getValue());
+   }
+
+   tbox::Pointer<hier::Variable> dist_var(
+      new pdat::NodeVariable<double>(dim, d_name + ":dist"));
+   d_dist_id = variable_db->registerVariableAndContext(dist_var,
+         d_context,
+         d_ghost_cell_width);
+
+   tbox::Pointer<hier::Variable> tag_var(
+      new pdat::CellVariable<int>(dim, d_name + ":tag"));
+   d_tag_id = variable_db->registerVariableAndContext(tag_var,
+         d_context,
+         d_ghost_cell_width);
+
+   t_setup = tbox::TimerManager::getManager()->
+      getTimer("apps::SinusoidalFrontTagger::setup");
+   t_node_pos = tbox::TimerManager::getManager()->
+      getTimer("apps::SinusoidalFrontTagger::node_pos");
+   t_distance = tbox::TimerManager::getManager()->
+      getTimer("apps::SinusoidalFrontTagger::distance");
+   t_tag_cells = tbox::TimerManager::getManager()->
+      getTimer("apps::SinusoidalFrontTagger::tag_cells");
+   t_copy = tbox::TimerManager::getManager()->
+      getTimer("apps::SinusoidalFrontTagger::copy");
+}
+
+SinusoidalFrontTagger::~SinusoidalFrontTagger()
+{
+}
+
+void SinusoidalFrontTagger::initializeLevelData(
+   /*! Hierarchy to initialize */
+   const tbox::Pointer<hier::BasePatchHierarchy> base_hierarchy,
+   /*! Level to initialize */
+   const int ln,
+   const double init_data_time,
+   const bool can_be_refined,
+   /*! Whether level is being introduced for the first time */
+   const bool initial_time,
+   /*! Level to copy data from */
+   const tbox::Pointer<hier::BasePatchLevel> old_base_level,
+   const bool allocate_data)
+{
+   (void)can_be_refined;
+
+   tbox::Pointer<hier::PatchHierarchy> hierarchy = base_hierarchy;
+   tbox::Pointer<hier::PatchLevel> old_level = old_base_level;
+   if (!old_base_level.isNull()) {
+      TBOX_ASSERT(!old_level.isNull());
+   }
+   TBOX_ASSERT(!hierarchy.isNull());
+
+   /*
+    * Reference the level object with the given index from the hierarchy.
+    */
+   tbox::Pointer<hier::PatchLevel> level =
+      hierarchy->getPatchLevel(ln);
+
+   for (hier::PatchLevel::Iterator pi(level); pi; pi++) {
+      hier::Patch& patch = **pi;
+      initializePatchData(patch,
+         init_data_time,
+         initial_time,
+         allocate_data);
+   }
+
+#if 0
+   if (d_allocate_data) {
+      /*
+       * If instructed, allocate all patch data on the level.
+       * Allocate only persistent data.  Scratch data will
+       * generally be allocated and deallocated as needed.
+       */
+      if (allocate_data) {
+         level->allocatePatchData(d_dist_id);
+         level->allocatePatchData(d_tag_id);
+      }
+      computeLevelData(hierarchy, ln, d_time /*init_data_time*/,
+         d_dist_id, d_tag_id, old_level);
+   }
+#endif
+}
+
+void SinusoidalFrontTagger::initializePatchData(
+   hier::Patch& patch,
+   const double init_data_time,
+   const bool initial_time,
+   const bool allocate_data)
+{
+   (void)initial_time;
+
+   if (d_allocate_data) {
+      /*
+       * If instructed, allocate all patch data on the level.
+       * Allocate only persistent data.  Scratch data will
+       * generally be allocated and deallocated as needed.
+       */
+      if (allocate_data) {
+         if (!patch.checkAllocated(d_dist_id)) {
+            patch.allocatePatchData(d_dist_id);
+         }
+         if (!patch.checkAllocated(d_tag_id)) {
+            patch.allocatePatchData(d_tag_id);
+         }
+         tbox::Pointer<pdat::NodeData<double> > dist_data =
+            patch.getPatchData(d_dist_id);
+         tbox::Pointer<pdat::CellData<int> > tag_data =
+            patch.getPatchData(d_tag_id);
+         TBOX_ASSERT(!dist_data.isNull());
+         TBOX_ASSERT(!tag_data.isNull());
+         computePatchData(patch, init_data_time,
+            dist_data.getPointer(), tag_data.getPointer());
+      }
+   }
+}
+
+void SinusoidalFrontTagger::resetHierarchyConfiguration(
+   /*! New hierarchy */ tbox::Pointer<hier::BasePatchHierarchy> new_hierarchy,
+   /*! Coarsest level */ int coarsest_level,
+   /*! Finest level */ int finest_level)
+{
+   (void)coarsest_level;
+   (void)finest_level;
+   d_hierarchy = new_hierarchy;
+   TBOX_ASSERT(!d_hierarchy.isNull());
+}
+
+void SinusoidalFrontTagger::applyGradientDetector(
+   const tbox::Pointer<hier::BasePatchHierarchy> base_hierarchy_,
+   const int ln,
+   const double error_data_time,
+   const int tag_index,
+   const bool initial_time,
+   const bool uses_richardson_extrapolation)
+{
+   (void)initial_time;
+   (void)uses_richardson_extrapolation;
+
+   tbox::Pointer<hier::PatchHierarchy> hierarchy_ = base_hierarchy_;
+   TBOX_ASSERT(!hierarchy_.isNull());
+   tbox::Pointer<hier::PatchLevel> level_ = hierarchy_->getPatchLevel(ln);
+   TBOX_ASSERT(!level_.isNull());
+
+   hier::PatchLevel& level = *level_;
+
+   for (hier::PatchLevel::Iterator pi(level); pi; pi++) {
+      hier::Patch& patch = **pi;
+
+      tbox::Pointer<hier::PatchData>
+      tag_data = patch.getPatchData(tag_index);
+      if (tag_data.isNull()) {
+         TBOX_ERROR("Data index " << tag_index
+                                  << " does not exist for patch.\n");
+      }
+      tbox::Pointer<pdat::CellData<int> > tag_cell_data_ = tag_data;
+      if (tag_cell_data_.isNull()) {
+         TBOX_ERROR("Data index " << tag_index
+                                  << " is not cell int data.\n");
+      }
+
+      if (d_allocate_data) {
+         // Use internally stored data.
+         tbox::Pointer<hier::PatchData>
+         saved_tag_data = patch.getPatchData(d_tag_id);
+         tag_cell_data_->copy(*saved_tag_data);
+      } else {
+         // Compute tag data for patch.
+         computePatchData(patch,
+            error_data_time,
+            NULL,
+            tag_cell_data_.getPointer());
+      }
+
+   }
+}
+
+/*
+ * Deallocate patch data allocated by this class.
+ */
+
+void SinusoidalFrontTagger::deallocatePatchData(
+   hier::PatchHierarchy& hierarchy)
+{
+   int ln;
+   for (ln = 0; ln < hierarchy.getNumberOfLevels(); ++ln) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy.getPatchLevel(ln);
+      deallocatePatchData(*level);
+   }
+}
+
+/*
+ * Deallocate patch data allocated by this class.
+ */
+
+void SinusoidalFrontTagger::deallocatePatchData(
+   hier::PatchLevel& level)
+{
+   level.deallocatePatchData(d_dist_id);
+   level.deallocatePatchData(d_tag_id);
+}
+
+/*
+ * Deallocate patch data allocated by this class.
+ */
+void SinusoidalFrontTagger::computeHierarchyData(
+   hier::PatchHierarchy& hierarchy,
+   double time)
+{
+   d_time = time;
+   if (!d_allocate_data) return;
+
+   for (int ln = 0; ln < hierarchy.getNumberOfLevels(); ++ln) {
+      computeLevelData(hierarchy, ln, time, d_dist_id, d_tag_id);
+   }
+}
+
+/*
+ * Compute the solution data for a level.
+ * Can copy data from old level (if any) to support
+ * initializeLevelData().
+ */
+
+void SinusoidalFrontTagger::computeLevelData(
+   const hier::PatchHierarchy& hierarchy,
+   const int ln,
+   const double time,
+   const int dist_id,
+   const int tag_id,
+   const tbox::Pointer<hier::PatchLevel>& old_level) const
+{
+   (void)old_level;
+
+   const tbox::Pointer<hier::PatchLevel> level =
+      hierarchy.getPatchLevel(ln);
+
+   /*
+    * Initialize data in all patches in the level.
+    */
+   for (hier::PatchLevel::Iterator pi(level); pi; pi++) {
+      hier::Patch& patch = **pi;
+      tbox::Pointer<pdat::NodeData<double> > dist_data = (dist_id >= 0) ?
+         patch.getPatchData(dist_id) : tbox::Pointer<hier::PatchData>(NULL);
+      tbox::Pointer<pdat::CellData<int> > tag_data = (tag_id >= 0) ?
+         patch.getPatchData(tag_id) : tbox::Pointer<hier::PatchData>(NULL);
+      computePatchData(patch, time,
+         dist_data.getPointer(),
+         tag_data.getPointer());
+   }
+}
+
+/*
+ * Compute the solution data for a patch.
+ */
+
+void SinusoidalFrontTagger::computePatchData(
+   const hier::Patch& patch,
+   const double time,
+   pdat::NodeData<double>* dist_data,
+   pdat::CellData<int>* tag_data) const
+{
+
+   t_setup->start();
+
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT(patch.inHierarchy());
+   const int ln = patch.getPatchLevelNumber();
+   const tbox::Pointer<hier::PatchLevel> level =
+      d_hierarchy->getPatchLevel(ln);
+   const hier::IntVector& ratio(level->getRatioToLevelZero());
+
+   const hier::Box& pbox = patch.getBox();
+   tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+
+   const double* xlo = patch_geom->getXLower();
+
+   const double* dx = patch_geom->getDx();
+
+   // Compute the size of buffer to tag around cells crossing front.
+   hier::IntVector buffer(d_buffer_cells);
+   for (int i = 0; i < d_dim.getValue(); ++i) {
+      if (d_buffer_space.size() > ln * d_dim.getValue() + i) {
+         int space_based_buffer =
+            int(d_buffer_space[ln * d_dim.getValue() + i] / dx[i] + 0.5);
+         if (space_based_buffer > buffer(i)) buffer(i) = space_based_buffer;
+      }
+   }
+   // std::cout << "buffer for ln of " << ln << " is " << buffer << std::endl;
+
+   /*
+    * We need at least buffer ghost cells to compute
+    * the tags, but the data does not have as many ghost cells.
+    * So we create temporary patch data with the required "ghost"
+    * buffer for computing tag values.  (We could give the real
+    * data the required ghost cells, but that may affect the
+    * regridding algorithm I'm testing.)
+    */
+   hier::IntVector required_tmp_buffer(buffer);
+   required_tmp_buffer *= ratio;
+   pdat::NodeData<double> tmp_dist(pbox, 1, required_tmp_buffer);
+   pdat::CellData<int> tmp_tag(pbox, 1, required_tmp_buffer);
+
+   /*
+    * Determine what x-node-index contains the sinusoidal front.
+    */
+
+   const double wave_number = 2 * 3.141592654 / d_period;
+
+   t_setup->stop();
+
+   t_node_pos->start();
+
+   hier::Box front_box = pbox;
+   front_box.grow(required_tmp_buffer);
+   front_box.growUpper(hier::IntVector(d_dim, 1));
+   // Squash front_box to a single plane.
+   front_box.upper(0) = front_box.lower(0);
+   const int ifront = front_box.lower(0);
+
+   pdat::ArrayData<int> front_i_(front_box, 1);
+
+   MDA_Access<int, 2, MDA_OrderColMajor<2> > front_i2;
+   MDA_Access<int, 3, MDA_OrderColMajor<3> > front_i3;
+   if (d_dim == tbox::Dimension(2)) {
+      front_i2 = MDA_Access<int, 2, MDA_OrderColMajor<2> >(
+            front_i_.getPointer(0),
+            &front_i_.getBox().lower()[0],
+            &front_i_.getBox().upper()[0]);
+      for (int j = front_i2.beg(1); j < front_i2.end(1); ++j) {
+         double y = xlo[1] + dx[1] * (j - pbox.lower(1));
+         double siny =
+            sin(wave_number * (y + d_init_disp[1] - d_velocity[1] * time));
+         double fx = d_amplitude * siny + d_init_disp[0] + d_velocity[0] * time;
+         front_i2(ifront, j) = int((fx - xlo[0]) / dx[0]) + pbox.lower(0);
+         // std::cout << i << '\t' << j << '\t' << y << '\t' << front_i(i,j) << std::endl;
+      }
+   } else if (d_dim == tbox::Dimension(3)) {
+      front_i3 = MDA_Access<int, 3, MDA_OrderColMajor<3> >(
+            front_i_.getPointer(0),
+            &front_i_.getBox().lower()[0],
+            &front_i_.getBox().upper()[0]);
+      for (int k = front_i3.beg(2); k < front_i3.end(2); ++k) {
+         double z = xlo[2] + dx[2] * (k - pbox.lower(2));
+         double sinz =
+            sin(wave_number * (z + d_init_disp[2] - d_velocity[2] * time));
+         for (int j = front_i3.beg(1); j < front_i3.end(1); ++j) {
+            double y = xlo[1] + dx[1] * (j - pbox.lower(1));
+            double siny =
+               sin(wave_number * (y + d_init_disp[1] + d_velocity[1] * time));
+            double fx = d_amplitude * siny * sinz + d_init_disp[0]
+               + d_velocity[0] * time;
+            front_i3(ifront, j, k) = int((fx - xlo[0]) / dx[0]) + pbox.lower(0);
+            // std::cout << i << '\t' << j << '\t' << k << '\t' << y << '\t' << z << '\t' << front_i(i,j,k) << std::endl;
+         }
+      }
+   }
+
+   t_node_pos->stop();
+
+   if (dist_data != NULL) {
+      t_distance->start();
+
+      pdat::NodeData<double>::Iterator ni(tmp_dist.getGhostBox());
+      for ( ; ni; ni++) {
+         const pdat::NodeIndex& index = *ni;
+         if (d_dim == tbox::Dimension(2)) {
+            tmp_dist(index) = xlo[0] + (index(0) - pbox.lower(0)) * dx[0]
+               - front_i2(ifront, index(1)) * dx[0];
+         } else if (d_dim == tbox::Dimension(3)) {
+            tmp_dist(index) = xlo[0] + (index(0) - pbox.lower(0)) * dx[0]
+               - front_i3(ifront, index(1), index(2)) * dx[0];
+         }
+      }
+      // tmp_dist.print(tmp_dist.getBox(),0,plog);
+
+      t_distance->stop();
+   }
+
+   if (tag_data != NULL) {
+
+      t_tag_cells->start();
+
+      tag_data->fill(0);
+
+      const hier::IntVector tag_growth(buffer);
+
+      if (d_dim == tbox::Dimension(2)) {
+         MDA_Access<int, 2, MDA_OrderColMajor<2> > tag_aa(
+            tag_data->getPointer(0),
+            &tag_data->getGhostBox().lower()[0],
+            &tag_data->getGhostBox().upper()[0]);
+         for (int j = pbox.lower(1); j <= pbox.upper(1); ++j) {
+            int mini = front_i2(ifront, j) - buffer(0);
+            int maxi = front_i2(ifront, j) + buffer(0);
+            if (mini < pbox.lower() (0)) mini = pbox.lower() (0);
+            if (maxi > pbox.upper() (0)) maxi = pbox.upper() (0);
+            for (int i = mini; i <= maxi; ++i) {
+               tag_aa(i, j) = 1;
+            }
+         }
+      } else if (d_dim == tbox::Dimension(3)) {
+         MDA_Access<int, 3, MDA_OrderColMajor<3> > tag_aa(
+            tag_data->getPointer(0),
+            &tag_data->getGhostBox().lower()[0],
+            &tag_data->getGhostBox().upper()[0]);
+         for (int k = pbox.lower(2); k <= pbox.upper(2); ++k) {
+            for (int j = pbox.lower(1); j <= pbox.upper(1); ++j) {
+               int mini = front_i3(ifront, j, k) - buffer(0);
+               int maxi = front_i3(ifront, j, k) + buffer(0);
+               if (mini < pbox.lower() (0)) mini = pbox.lower() (0);
+               if (maxi > pbox.upper() (0)) maxi = pbox.upper() (0);
+               for (int i = mini; i <= maxi; ++i) {
+                  tag_aa(i, j, k) = 1;
+               }
+            }
+         }
+      }
+
+      t_tag_cells->stop();
+
+   }
+
+   t_copy->start();
+
+   /*
+    * Copy computed data to output.  Recall that the convention is
+    * to send in a NULL pointer to indicate that data is not wanted.
+    */
+   if (dist_data != NULL) {
+      dist_data->copy(tmp_dist);
+   }
+
+   t_copy->stop();
+}
+
+#ifdef HAVE_HDF5
+int SinusoidalFrontTagger::registerVariablesWithPlotter(
+   appu::VisItDataWriter& writer)
+{
+   /*
+    * Register variables with plotter.
+    */
+   if (d_allocate_data) {
+      writer.registerPlotQuantity("Distance to front", "SCALAR", d_dist_id);
+      writer.registerPlotQuantity("Tag value", "SCALAR", d_tag_id);
+   } else {
+      writer.registerDerivedPlotQuantity("Distance to front", "SCALAR", this,
+         // hier::IntVector(0),
+         1.0,
+         "NODE");
+      writer.registerDerivedPlotQuantity("Tag value", "SCALAR", this);
+   }
+   return 0;
+}
+#endif
+
+bool SinusoidalFrontTagger::packDerivedDataIntoDoubleBuffer(
+   double* buffer,
+   const hier::Patch& patch,
+   const hier::Box& region,
+   const std::string& variable_name,
+   int depth_index) const
+{
+   (void)region;
+   (void)depth_index;
+
+   TBOX_ASSERT(d_allocate_data == false);
+   if (variable_name == "Distance to front") {
+      pdat::NodeData<double> dist_data(patch.getBox(), 1, hier::IntVector(d_dim,
+                                          0));
+      computePatchData(patch, d_time, &dist_data, NULL);
+      for (pdat::NodeData<double>::Iterator ci(patch.getBox()); ci; ci++) {
+         *(buffer++) = dist_data(*ci);
+      }
+   } else if (variable_name == "Tag value") {
+      pdat::CellData<int> tag_data(patch.getBox(), 1, hier::IntVector(d_dim, 0));
+      computePatchData(patch, d_time, NULL, &tag_data);
+      for (pdat::CellData<double>::Iterator ci(patch.getBox()); ci; ci++) {
+         *(buffer++) = tag_data(*ci);
+      }
+   } else {
+      TBOX_ERROR("Unrecognized name " << variable_name);
+   }
+   return true;
+}
+
+void SinusoidalFrontTagger::setTime(
+   double time)
+{
+   d_time = time;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/clustering/async_br/SinusoidalFrontTagger.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/clustering/async_br/SinusoidalFrontTagger.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,246 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   SinusoidalFrontTagger class declaration 
+ *
+ ************************************************************************/
+#ifndef included_SinusoidalFrontTagger
+#define included_SinusoidalFrontTagger
+
+#include <string>
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Database.h"
+
+/*
+ * SAMRAI classes
+ */
+#include "SAMRAI/appu/VisItDataWriter.h"
+#include "SAMRAI/appu/VisDerivedDataStrategy.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/mesh/StandardTagAndInitStrategy.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/tbox/Timer.h"
+
+using namespace std;
+using namespace SAMRAI;
+
+/*!
+ * @brief Class to tag a sinusoidal "front" in given domain.
+ */
+class SinusoidalFrontTagger:
+   public mesh::StandardTagAndInitStrategy,
+   public appu::VisDerivedDataStrategy
+{
+
+public:
+   /*!
+    * @brief Constructor.
+    */
+   SinusoidalFrontTagger(
+      /*! Ojbect name */
+      const std::string& object_name,
+      const tbox::Dimension& dim,
+      /*! Input database */
+      SAMRAI::tbox::Database* database = NULL);
+
+   ~SinusoidalFrontTagger();
+
+   //@{ @name SAMRAI::mesh::StandardTagAndInitStrategy virtuals
+
+public:
+   /*!
+    * @brief Allocate and initialize data for a new level
+    * in the patch hierarchy.
+    *
+    * This is where you implement the code for initialize data on the
+    * grid.  Nevermind when it is called or where in the program that
+    * happens.  All the information you need to initialize the grid
+    * are in the arguments.
+    *
+    * @see SAMRAI::mesh::StandardTagAndInitStrategy::initializeLevelData()
+    */
+   virtual void
+   initializeLevelData(
+      /*! Hierarchy to initialize */
+      const tbox::Pointer<SAMRAI::hier::BasePatchHierarchy> hierarchy,
+      /*! Level to initialize */
+      const int level_number,
+      const double init_data_time,
+      const bool can_be_refined,
+      /*! Whether level is being introduced for the first time */
+      const bool initial_time,
+      /*! Level to copy data from */
+      const tbox::Pointer<SAMRAI::hier::BasePatchLevel> old_level =
+         tbox::Pointer<SAMRAI::hier::PatchLevel>((0)),
+      /*! Whether data on new patch needs to be allocated */
+      const bool allocate_data = true);
+
+   virtual void
+   resetHierarchyConfiguration(
+      /*! New hierarchy */
+      tbox::Pointer<SAMRAI::hier::BasePatchHierarchy> new_hierarchy,
+      /*! Coarsest level */ int coarsest_level,
+      /*! Finest level */ int finest_level);
+
+   virtual void
+   applyGradientDetector(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double error_data_time,
+      const int tag_index,
+      const bool initial_time,
+      const bool uses_richardson_extrapolation);
+
+   //@}
+
+   void
+   initializePatchData(
+      hier::Patch& patch,
+      const double init_data_time,
+      const bool initial_time,
+      const bool allocate_data);
+
+   bool
+   packDerivedDataIntoDoubleBuffer(
+      double* buffer,
+      const hier::Patch& patch,
+      const hier::Box& region,
+      const std::string& variable_name,
+      int depth_index) const;
+
+   void
+   setTime(
+      double time);
+
+public:
+   /*!
+    * @brief Deallocate internally managed patch data on level.
+    */
+   void
+   deallocatePatchData(
+      hier::PatchLevel& level);
+
+   /*!
+    * @brief Deallocate internally managed patch data on hierarchy.
+    */
+   void
+   deallocatePatchData(
+      hier::PatchHierarchy& hierarchy);
+
+#ifdef HAVE_HDF5
+   /*!
+    * @brief Tell a VisIt plotter which data to write for this class.
+    */
+   int
+   registerVariablesWithPlotter(
+      appu::VisItDataWriter& writer);
+#endif
+
+   /*
+    * Compute patch data allocated by this class, on a hierarchy.
+    */
+   void
+   computeHierarchyData(
+      hier::PatchHierarchy& hierarchy,
+      double time);
+
+   /*!
+    * @brief Compute distance and tag data for a level.
+    */
+   void
+   computeLevelData(
+      const hier::PatchHierarchy& hierarchy,
+      const int ln,
+      const double time,
+      const int dist_id,
+      const int tag_id,
+      const tbox::Pointer<hier::PatchLevel>& old_level =
+         tbox::Pointer<hier::PatchLevel>()) const;
+
+   /*!
+    * @brief Compute distance and tag data for a patch.
+    */
+   void
+   computePatchData(
+      const hier::Patch& patch,
+      const double time,
+      pdat::NodeData<double>* dist_data,
+      pdat::CellData<int>* tag_data) const;
+
+private:
+   std::string d_name;
+
+   const tbox::Dimension d_dim;
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+
+   /*!
+    * @brief Period of sinusoid.
+    */
+   double d_period;
+
+   /*!
+    * @brief Initial displacement.
+    */
+   std::vector<double> d_init_disp;
+
+   /*!
+    * @brief Front velocity.
+    */
+   std::vector<double> d_velocity;
+
+   /*!
+    * @brief Amplitude of sinusoid.
+    */
+   double d_amplitude;
+
+   /*!
+    * @brief ghost cell width of internal data.
+    *
+    * Optional.  Meant to influence gridding parameters.  Defaults to zero.
+    */
+   hier::IntVector d_ghost_cell_width;
+
+   /*!
+    * @brief Number of cells to tag around cells intersecting the front.
+    */
+   hier::IntVector d_buffer_cells;
+
+   tbox::Array<double> d_buffer_space;
+
+   tbox::Pointer<hier::VariableContext> d_context;
+
+   /*!
+    * @brief Distance from the front in the x direction.
+    */
+   int d_dist_id;
+   /*!
+    * @brief Value of tag based on distance from front.
+    */
+   int d_tag_id;
+
+   /*!
+    * @brief Whether to allocate data on the mesh.
+    */
+   bool d_allocate_data;
+
+   /*!
+    * @brief Front time.
+    */
+   double d_time;
+
+   tbox::Pointer<tbox::Timer> t_setup;
+   tbox::Pointer<tbox::Timer> t_node_pos;
+   tbox::Pointer<tbox::Timer> t_distance;
+   tbox::Pointer<tbox::Timer> t_tag_cells;
+   tbox::Pointer<tbox::Timer> t_copy;
+
+};
+
+#endif  // included_ssup_SinusoidalFrontTagger
diff -r 000000000000 -r 5eda1a3f24e8 source/test/clustering/async_br/get-input-filename.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/clustering/async_br/get-input-filename.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,48 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility for getting input file name. 
+ *
+ ************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <string>
+
+#ifndef NAMESPACE_IS_BROKEN
+// using namespace std;
+#endif
+
+#include "get-input-filename.h"
+
+int get_input_filename(
+   int* argc,
+   char* argv[],
+   std::string& input_filename) {
+
+   int rval = 0;
+   std::string argv0(argv[0]);
+   if (*argc > 1) {
+      // Input file is the first argument.  Shift other arguments down.
+      input_filename = argv[1];
+      --(*argc);
+      int i;
+      for (i = 1; i < (*argc); ++i) {
+         argv[i] = argv[i + 1];
+      }
+   } else if (*argc == 1 && argv0.rfind("check-") < argv0.size()) {
+      /*
+       * No argument but input file is implicit in program name
+       * which has the form check-<input file without .input>.
+       */
+      input_filename = argv0.substr(argv0.rfind("check-") + 6) + ".input";
+   } else if (*argc == 1) {
+      // No argument and not invoked as "check-blah".
+      rval = 1;
+   }
+   return rval;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/clustering/async_br/get-input-filename.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/clustering/async_br/get-input-filename.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,34 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility for getting input file name. 
+ *
+ ************************************************************************/
+#include <string>
+
+#ifndef NAMESPACE_IS_BROKEN
+
+#endif
+
+/*!
+ * This function gets the input file name from the argument list.
+ * For most cases, this is simply the first
+ * command-line argument (after the program name).
+ * The variable @c input_filename is set to the filename,
+ * and all arguments following it are shifed down one.
+ * Unless you are a developer, this is all you need to know.
+ *
+ * For the special case with no command-line argument,
+ * if the program is invoked with the name "check-blah",
+ * it assumes the input file is "blah.input".
+ * The purpose of this setup is so that it is compatible with
+ * the automake make-check mechanism, which runs programs without
+ * arguments.  At the same time, an input file can be manually
+ * specified for operational flexibility.
+ *
+ * @return 0 if filename is found, 1 otherwise.
+ */
+int get_input_filename(int* argc, char* argv[], std::string & input_filename);
diff -r 000000000000 -r 5eda1a3f24e8 source/test/clustering/async_br/main.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/clustering/async_br/main.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,429 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Test program for asynchronous BR implementation 
+ *
+ ************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <iostream>
+#include <iomanip>
+#include <sstream>
+#include <string>
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/MemoryUtilities.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+
+/*
+ * Headers for basic SAMRAI objects used in this code.
+ */
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Statistician.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ * Headers for major algorithm/data structure objects from SAMRAI
+ */
+#include "SAMRAI/appu/VisItDataWriter.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/GridGeometry.h"
+#include "SAMRAI/hier/Connector.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/mesh/BergerRigoutsos.h"
+#include "SAMRAI/mesh/GriddingAlgorithm.h"
+#include "SAMRAI/mesh/StandardTagAndInitialize.h"
+#include "SAMRAI/mesh/TreeLoadBalancer.h"
+#include "SAMRAI/solv/FACPreconditioner.h"
+#include "ABRTest.h"
+
+#include "get-input-filename.h"
+
+#ifndef LACKS_NAMESPACE
+using namespace SAMRAI;
+#endif
+
+int main(
+   int argc,
+   char** argv)
+{
+
+   std::string input_filename;
+
+   /*
+    * Initialize MPI, process argv, and initialize SAMRAI
+    */
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   if (get_input_filename(&argc, argv, input_filename) == 1) {
+      cout << "Usage: " << argv[0]
+      << " <input file>."
+      << endl;
+      tbox::SAMRAI_MPI::finalize();
+      return 0;
+   }
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+
+      tbox::plog << "Input file is " << input_filename << endl;
+
+      string case_name;
+      if (argc >= 2) {
+         case_name = argv[1];
+      }
+
+      /*
+       * Create input database and parse all data in input file into it.
+       */
+
+      tbox::Pointer<tbox::Database> input_db(new tbox::InputDatabase("input_db"));
+      tbox::InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      /*
+       * Retrieve "GlobalInputs" section of the input database and set
+       * values accordingly.
+       */
+
+      if (input_db->keyExists("GlobalInputs")) {
+         tbox::Pointer<tbox::Database> global_db =
+            input_db->getDatabase("GlobalInputs");
+         if (global_db->keyExists("call_abort_in_serial_instead_of_exit")) {
+            bool flag = global_db->
+               getBool("call_abort_in_serial_instead_of_exit");
+            tbox::SAMRAI_MPI::setCallAbortInSerialInsteadOfExit(flag);
+         }
+      }
+
+      /*
+       * Get the Main database part of the input database.
+       * This database contains information relevant to main.
+       */
+
+      tbox::Pointer<tbox::Database> main_db = input_db->getDatabase("Main");
+      tbox::plog << "Main database:" << endl;
+      main_db->printClassData(tbox::plog);
+
+      const tbox::Dimension dim(static_cast<unsigned short>(main_db->getInteger("dim")));
+
+      if (input_db->isDatabase("TimerManager")) {
+         tbox::TimerManager::createManager(input_db->getDatabase("TimerManager"));
+      }
+
+      /*
+       * Base filename info.
+       */
+
+      string base_name = main_db->getStringWithDefault("base_name", "fp");
+
+      /*
+       * Modify basename for this particular run.
+       * Add the number of processes and the case name.
+       */
+      if (!case_name.empty()) {
+         base_name = base_name + '-' + case_name;
+      }
+      if (mpi.getSize() > 1) {
+         base_name = base_name + '-'
+            + tbox::Utilities::intToString(mpi.getSize(), 5);
+      }
+      tbox::plog << "Added case name (" << case_name << ") and nprocs ("
+                 << mpi.getSize() << ") to base name -> '"
+                 << base_name << "'\n";
+
+      /*
+       * Set the vis filename, defaults to base_name.
+       */
+      string vis_filename =
+         main_db->getStringWithDefault("vis_filename", base_name);
+
+      /*
+       * Log file info.
+       */
+
+      string log_filename =
+         main_db->getStringWithDefault("log_filename", base_name + ".log");
+      bool log_all = false;
+      log_all = main_db->getBoolWithDefault("log_all", log_all);
+      if (log_all && mpi.getSize() > 1) {
+         tbox::PIO::logAllNodes(log_filename);
+      } else {
+         tbox::PIO::logOnlyNodeZero(log_filename);
+      }
+
+      if (!case_name.empty()) {
+         tbox::plog << "Added case name (" << case_name << ") and nprocs ("
+                    << mpi.getSize() << ") to base name -> '"
+                    << base_name << "'\n";
+      }
+      tbox::plog << "Running on " << mpi.getSize()
+                 << " processes.\n";
+
+      /*
+       * Choose which BR implementation to use.
+       */
+      char which_br = 'o';
+      which_br = main_db->getCharWithDefault("which_br", which_br);
+      tbox::plog << "which_br is " << which_br << endl;
+
+      int plot_step = main_db->getIntegerWithDefault("plot_step", 0);
+
+      /*
+       * Create a patch hierarchy for use later.
+       * This object is a required input for these objects: abrtest.
+       */
+      tbox::Pointer<hier::PatchHierarchy> patch_hierarchy;
+      {
+         /*
+          * Create a grid geometry required for the
+          * hier::PatchHierarchy object.
+          */
+         tbox::Pointer<geom::CartesianGridGeometry> grid_geometry(
+            new geom::CartesianGridGeometry(dim, "CartesianGridGeometry",
+               input_db->getDatabase("CartesianGridGeometry")));
+         tbox::plog << "Grid Geometry:" << endl;
+         grid_geometry->printClassData(tbox::plog);
+         patch_hierarchy =
+            new hier::PatchHierarchy("Patch Hierarchy", grid_geometry,
+                                     input_db->getDatabase("PatchHierarchy"));
+      }
+
+      /*
+       * Create the problem-specific object implementing the required
+       * SAMRAI virtual functions.
+       */
+      tbox::plog << "Creating abrtest.\n";
+      ABRTest abrtest("ABRTest",
+                      dim,
+                      patch_hierarchy,
+                      input_db->getDatabase("ABRTest"));
+
+      tbox::plog << "Creating box generator.\n";
+      tbox::Pointer<mesh::BergerRigoutsos> new_br(
+         new mesh::BergerRigoutsos(dim,
+            input_db->isDatabase("BergerRigoutsos") ?
+            input_db->getDatabase("BergerRigoutsos") :
+            tbox::Pointer<tbox::Database>(NULL)));
+      new_br->setMPI(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+      tbox::Pointer<mesh::BoxGeneratorStrategy> box_generator =
+         tbox::Pointer<mesh::BoxGeneratorStrategy>(new_br);
+      TBOX_ASSERT(!box_generator.isNull());
+
+      tbox::plog << "Creating grid algorithm.\n";
+      tbox::Pointer<mesh::GriddingAlgorithm> gridding_algorithm;
+      {
+         /*
+          * Create the tag-and-initializer, box-generator and load-balancer
+          * object references required by the gridding_algorithm object.
+          */
+         tbox::Pointer<mesh::StandardTagAndInitialize> tag_and_initializer(
+            new mesh::StandardTagAndInitialize(
+               dim,
+               "CellTaggingMethod",
+               tbox::Pointer<mesh::StandardTagAndInitStrategy>(
+                  abrtest.getStandardTagAndInitObject(),
+                  false),
+               input_db->getDatabase("StandardTagAndInitialize")
+               ));
+         tbox::Pointer<mesh::TreeLoadBalancer> load_balancer(
+            new mesh::TreeLoadBalancer(dim,
+               "tree load balancer",
+               input_db->getDatabase("TreeLoadBalancer")));
+         load_balancer->setSAMRAI_MPI(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+         /*
+          * Create the gridding algorithm used to generate the SAMR grid
+          * and create the grid.
+          */
+         gridding_algorithm =
+            new mesh::GriddingAlgorithm(
+               patch_hierarchy,
+               "Distributed Gridding Algorithm",
+               input_db->getDatabase("GriddingAlgorithm"),
+               tag_and_initializer,
+               box_generator,
+               load_balancer);
+         tbox::plog << "Sistributed gridding algorithm:" << std::endl;
+         gridding_algorithm->printClassData(tbox::plog);
+
+      }
+
+      bool log_hierarchy = false;
+      log_hierarchy = main_db->getBoolWithDefault("log_hierarchy",
+            log_hierarchy);
+      int num_steps = main_db->getIntegerWithDefault("num_steps", 0);
+
+      /*
+       * After setting up the problem and initializing the object states,
+       * we print the input database and variable database contents
+       * to the log file.
+       */
+      tbox::plog << "\nCheck input data:" << endl;
+      tbox::plog << "Input database..." << endl;
+      input_db->printClassData(tbox::plog);
+      tbox::plog << "\nVariable database..." << endl;
+      hier::VariableDatabase::getDatabase()->printClassData(tbox::plog);
+
+      tbox::plog
+      << "**********************************************************\n";
+      tbox::plog << "Memory used before mesh generation:" << endl;
+      tbox::MemoryUtilities::printMemoryInfo(tbox::plog);
+      tbox::plog
+      << "**********************************************************\n";
+
+      /*
+       * Make the patch levels.
+       */
+
+      tbox::Pointer<tbox::Timer> t_generate_mesh =
+         tbox::TimerManager::getManager()->
+         getTimer("apps::main::generate_mesh");
+      t_generate_mesh->start();
+      gridding_algorithm->makeCoarsestLevel(0.0);
+      tbox::plog << "Memory used after creating level 0:" << endl;
+      tbox::MemoryUtilities::printMemoryInfo(tbox::plog);
+      bool done = false;
+      for (int ln = 0; patch_hierarchy->levelCanBeRefined(ln) && !done;
+           ln++) {
+         tbox::plog << "Adding finer levels with ln = " << ln << endl;
+         tbox::Pointer<hier::PatchLevel> level_ =
+            patch_hierarchy->getPatchLevel(ln);
+         gridding_algorithm->makeFinerLevel(
+            /* simulation time */ 0.0,
+            /* whether initial time */ true,
+            /* tag buffer size */ 0);
+         tbox::plog << "Just added finer level " << ln << " -> " << ln + 1;
+         if (patch_hierarchy->getNumberOfLevels() < ln + 2) {
+            tbox::plog << " (no new level!)" << endl;
+         } else {
+            tbox::Pointer<hier::PatchLevel> finer_level_ =
+               patch_hierarchy->getPatchLevel(ln + 1);
+            tbox::plog
+            << " (" << level_->getNumberOfPatches()
+            << " -> " << finer_level_->getNumberOfPatches()
+            << " patches)"
+            << endl;
+         }
+         done = !(patch_hierarchy->finerLevelExists(ln));
+
+         tbox::plog << "Memory used after creating level " << ln + 1 << ":"
+                    << endl;
+         tbox::MemoryUtilities::printMemoryInfo(tbox::plog);
+
+      }
+      t_generate_mesh->stop();
+
+      if (mpi.getRank() == 0) {
+         tbox::plog << "Hierarchy generated:" << endl;
+         patch_hierarchy->recursivePrint(tbox::plog, string("    "), 1);
+      }
+      if (log_hierarchy) {
+         tbox::plog << "Hierarchy generated:" << endl;
+         patch_hierarchy->recursivePrint(tbox::plog, string("H-> "), 3);
+      }
+
+#ifdef HAVE_HDF5
+      /*
+       * Write a plot file.
+       */
+      /* Get the output filename. */
+      if (plot_step > 0) {
+         const string visit_filename = vis_filename + ".visit";
+         /* Create the VisIt data writer. */
+         tbox::Pointer<appu::VisItDataWriter> visit_data_writer(
+            new appu::VisItDataWriter(dim, "VisIt Writer", visit_filename));
+         /* Register variables with plotter. */
+         abrtest.registerVariablesWithPlotter(visit_data_writer);
+         /* Write the plot file. */
+         visit_data_writer->writePlotData(patch_hierarchy, 0);
+      }
+#endif
+
+      /*
+       * Adapt the grid.
+       */
+      tbox::Array<int> tag_buffer(10);
+      for (int i = 0; i < tag_buffer.size(); ++i) tag_buffer[i] = 1;
+
+      for (int istep = 0; istep < num_steps; ++istep) {
+
+         tbox::plog << "Adaption number " << istep << endl;
+
+         // Recompute the front-dependent data at next time step.
+         abrtest.computeHierarchyData(*patch_hierarchy,
+            double(istep + 1));
+
+         tbox::Array<double> regrid_start_time(patch_hierarchy->getMaxNumberOfLevels());
+         for (int i = 0; i < regrid_start_time.size(); ++i)
+            regrid_start_time[i] = istep;
+
+         gridding_algorithm->regridAllFinerLevels(
+            0,
+            double(istep + 1),
+            tag_buffer,
+            regrid_start_time);
+
+         if (mpi.getRank() == 0) {
+            patch_hierarchy->recursivePrint(tbox::plog, string("    "), 1);
+         }
+         if (log_hierarchy) {
+            tbox::plog << "Hierarchy adapted:" << endl;
+            patch_hierarchy->recursivePrint(tbox::plog, string("H-> "), 3);
+         }
+
+         tbox::plog << "Memory used after adaption number " << istep << endl;
+         tbox::MemoryUtilities::printMemoryInfo(tbox::plog);
+
+#ifdef HAVE_HDF5
+         if (plot_step > 0 && (istep + 1) % plot_step == 0) {
+            const string visit_filename = vis_filename + ".visit";
+            /* Create the VisIt data writer. */
+            tbox::Pointer<appu::VisItDataWriter> visit_data_writer(
+               new appu::VisItDataWriter(dim,
+                  "VisIt Writer",
+                  visit_filename));
+            /* Register variables with plotter. */
+            abrtest.registerVariablesWithPlotter(visit_data_writer);
+            /* Write the plot file. */
+            visit_data_writer->writePlotData(patch_hierarchy, istep + 1);
+         }
+#endif
+      }
+
+      tbox::TimerManager::getManager()->print(tbox::plog);
+
+      tbox::pout << "\nPASSED:  async_br" << endl;
+
+   }
+
+   /*
+    * Exit properly by shutting down services in correct order.
+    */
+   tbox::plog << "\nShutting down..." << endl;
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return 0;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/clustering/async_br/test_inputs/front.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/clustering/async_br/test_inputs/front.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,136 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for 2D DLBG test. 
+ *
+ ************************************************************************/
+
+Main {
+  dim = 2
+  which_br = 'n'
+  base_name = "front2d"
+  log_all = TRUE
+  plot_step = 1
+  check_graph = FALSE
+  // restart_write_dirname = "restart"
+  // time_nlbg_random_rmi = TRUE
+  log_hierarchy = FALSE
+  num_steps = 5
+}
+
+ABRTest {
+  sine_tagger {
+    allocate_data = TRUE
+    adaption_buffer = 1
+    period = 1
+    amplitude = .3
+    init_disp = 0.5, 0.0
+    velocity = 0.02, 0.005
+  }
+}
+
+
+BergerRigoutsos {
+  // log_node_history = TRUE
+  log_cluster_summary = TRUE
+    // algo_advance_mode: "SYNCHRONOUS", "ADVANCE_SOME", "ROUND_ROBIN" or "ADVANCE_ANY"
+  // algo_advance_mode = "ADVANCE_ANY"
+  algo_advance_mode = "ADVANCE_SOME"
+  // algo_advance_mode = "SYNCHRONOUS"
+  // owner_mode: "SINGLE_OWNER", "MOST_OVERLAP" (default), "FEWEST_OWNED", "LEAST_ACTIVE"
+  // owner_mode = "SINGLE_OWNER"
+  owner_mode = "MOST_OVERLAP"
+  // owner_mode = "FEWEST_OWNED"
+  // owner_mode = "LEAST_ACTIVE"
+  use_level_boxes = FALSE
+  use_private_communicator = TRUE
+  max_gcw = 0, 0
+}
+
+
+CartesianGridGeometry {
+  // domain_boxes = [(0,0), (9,3)]
+  // domain_boxes = [(0,0), (23,15)]
+  domain_boxes = [(0,0), (47,31)]
+  // domain_boxes = [(0,0), (95,63)]
+  // domain_boxes = [(0,0), (191,127)]
+  // domain_boxes = [(0,0), (383,255)]
+  // domain_boxes = [(0,0), (767,511)]
+  x_lo         = 0, 0
+  x_up         = 3, 2
+}
+
+StandardTagAndInitialize {
+  tagging_method = "GRADIENT_DETECTOR"
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE
+  num_cycles = 2
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'n'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+PatchHierarchy {
+   max_levels = 5
+   largest_patch_size {
+      level_0 = 64, 64
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 4,4
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+      level_3            = 2, 2
+      level_4            = 2, 2
+      level_5            = 2, 2
+      level_6            = 2, 2
+      level_7            = 2, 2
+      level_8            = 2, 2
+      level_9            = 2, 2
+      //  etc.
+   }
+   proper_nesting_buffer = 0, 0, 0, 0, 0
+
+   allow_patches_smaller_than_ghostwidth = TRUE
+   allow_patches_smaller_than_minimum_size_to_prevent_overlaps = TRUE
+}
+
+GriddingAlgorithm {
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+
+   check_nonrefined_tags = "IGNORE"
+   sort_boxes_after_clustering = TRUE
+   sequentialize_patch_indices = TRUE // For VisIt
+   // extend_tags_to_bdry = TRUE
+   // use_new_alg = TRUE
+   print_steps = 'y'
+}
+
+
+GlobalInputs{
+   tag_clustering_method = "BINARY_TREE"
+}
+
+
+TimerManager{
+  timer_list = "hier::*::*", "mesh::*::*", "tbox::*::*", "apps::*::*"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+  print_threshold = 0
+  print_summed = TRUE
+  print_max = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/clustering/async_br/test_inputs/front.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/clustering/async_br/test_inputs/front.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,116 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for 3D DLBG test. 
+ *
+ ************************************************************************/
+
+Main {
+  dim = 3
+  which_br = 'n'
+  base_name = "front3d"
+  log_all = TRUE
+  plot_step = 1
+  check_graph = FALSE
+  // restart_write_dirname = "restart"
+  // time_nlbg_random_rmi = TRUE
+  log_hierarchy = FALSE
+  num_steps = 3
+}
+
+ABRTest {
+  sine_tagger {
+    allocate_data = FALSE
+    adaption_buffer = 1
+    period = 1
+    amplitude = .3
+    init_disp = 0.5, 0.0, 0.0
+    velocity = 0.02, 0.005, 0.005
+  }
+}
+
+
+BergerRigoutsos {
+  // log_node_history = TRUE
+  log_cluster_summary = TRUE
+    // algo_advance_mode = "SYNCHRONOUS", "ADVANCE_SOME", "ROUND_ROBIN" or "ADVANCE_ANY"
+  // algo_advance_mode = "ADVANCE_ANY"
+  algo_advance_mode = "ADVANCE_SOME"
+  // algo_advance_mode = "SYNCHRONOUS"
+  // owner_mode: "SINGLE_OWNER", "MOST_OVERLAP" (default), "FEWEST_OWNED", "LEAST_ACTIVE"
+  // owner_mode = "SINGLE_OWNER"
+  owner_mode = "MOST_OVERLAP"
+  // owner_mode = "FEWEST_OWNED"
+  // owner_mode = "LEAST_ACTIVE"
+  use_level_boxes = FALSE
+  use_private_communicator = TRUE
+  max_gcw = 0, 0, 0
+}
+
+
+CartesianGridGeometry {
+  domain_boxes = [(0,0,0), (23,15,15)]
+  // domain_boxes = [(0,0,0), (9,3,3)]
+  x_lo         = 0, 0, 0
+  x_up         = 3, 2, 2
+}
+
+StandardTagAndInitialize {
+  tagging_method = "GRADIENT_DETECTOR"
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE
+  num_cycles = 2
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 32,32,32
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 4,4,4
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+      level_3            = 2, 2, 2
+      level_4            = 2, 2, 2
+      level_5            = 2, 2, 2
+      level_6            = 2, 2, 2
+      level_7            = 2, 2, 2
+      level_8            = 2, 2, 2
+      level_9            = 2, 2, 2
+      //  etc.
+   }
+   allow_patches_smaller_than_ghostwidth = TRUE
+
+   allow_patches_smaller_than_minimum_size_to_prevent_overlaps = TRUE
+}
+
+GriddingAlgorithm {
+   combine_efficiency = 0.88
+   efficiency_tolerance = 0.88
+   allow_patches_smaller_than_minimum_size_to_prevent_overlaps = TRUE
+}
+
+
+GlobalInputs{
+   tag_clustering_method = "BINARY_TREE"
+}
+
+
+TimerManager{
+  timer_list = "hier::*::*", "mesh::*::*", "tbox::*::*", "apps::*::*"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+  print_threshold = 0
+  print_summed = TRUE
+  print_max = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/clustering/parallel_br/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/clustering/parallel_br/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,123 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for Euler gas dynamics sample application 
+##
+#########################################################################
+
+SAMRAI	      = @top_srcdir@
+SRCDIR        = @top_srcdir@/examples/Euler
+SUBDIR        = source/test/clustering/parallel_br
+VPATH         = @top_srcdir@/examples/Euler
+TESTTOOLS     = ../../testtools
+OBJECT        = ../../../..
+
+default: check	
+
+include $(OBJECT)/config/Makefile.config
+
+AUTOTEST      = $(SAMRAI)/source/test/applications
+CPPFLAGS_EXTRA= -I$(AUTOTEST) -DNDIM=$(PDIM) -DTESTING=1
+
+NUM_TESTS = 3
+
+TEST_NPROCS = @TEST_NPROCS@
+
+CXX_OBJS      = main.o Euler.o AutoTester.o
+F2D_OBJS      = avgint.o flaten1d.o flux.o grad.o init.o stable.o \
+		stufprobc.o trace.o trace1d.o
+F3D_OBJS      = $(F2D_OBJS) fluxcorner.o 
+
+main2d:
+	if test -f stamp-3d; then $(MAKE) clean-check; fi
+	touch stamp-2d
+	$(MAKE) PDIM=2 main-2d
+
+main-2d:$(CXX_OBJS) $(F2D_OBJS) $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) $(F2D_OBJS)	\
+	$(LIBSAMRAI2D) $(LIBSAMRAI) $(LDLIBS) -o main2d
+
+TEST_NPROCS = @TEST_NPROCS@ 
+
+check:
+	$(MAKE) check2d
+	$(MAKE) check3d
+
+check2d:	main2d
+	@for i in test_inputs/*2d*.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main2d $${i};	\
+	done
+
+check3d:
+
+checkcompile: main2d main3d
+
+checktest:
+	rm -f makecheck.logfile
+	$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+	$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+	rm -f makecheck.logfile
+
+clean-check:
+	$(RM) *.f test-*d-append-*.input core
+	$(RM) *.o *.ii *.int.c stamp-[23]d
+	$(RM) -r ti_files ii_files
+
+clean:
+	$(SAMCLEAN)
+	$(MAKE) clean-check
+	$(RM) main*
+	$(RM) -r restart-*
+
+include $(SRCDIR)/Makefile.depend
+
+FORTRAN       = $(SRCDIR)/fortran/$(PDIM)d
+M4DIRS        = -DFORTDIR=$(FORTRAN) $(SAMRAI_M4_FLAGS)
+
+AutoTester.o:	$(AUTOTEST)/AutoTester.C
+		$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(AUTOTEST)/AutoTester.C \
+		-o $@
+
+avgint.o:	$(FORTRAN)/avgint.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/avgint.m4 > avgint.f
+		$(F77) $(FFLAGS) -c avgint.f -o $@
+
+flaten1d.o:	$(FORTRAN)/flaten1d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/flaten1d.m4 > flaten1d.f
+		$(F77) $(FFLAGS) -c flaten1d.f -o $@
+
+flux.o:		$(FORTRAN)/flux.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/flux.m4 > flux.f
+		$(F77) $(FFLAGS) -c flux.f -o $@
+
+fluxcorner.o:	$(FORTRAN)/fluxcorner.m4
+		$(M4) -B8096 $(M4DIRS) $(FORTRAN)/fluxcorner.m4 > fluxcorner.f
+		$(F77) $(FFLAGS) -c fluxcorner.f -o $@
+
+grad.o:		$(FORTRAN)/grad.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/grad.m4 > grad.f
+		$(F77) $(FFLAGS) -c grad.f -o $@
+
+init.o:		$(FORTRAN)/init.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/init.m4 > init.f
+		$(F77) $(FFLAGS) -c init.f -o $@
+
+stable.o:	$(FORTRAN)/stable.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/stable.m4 > stable.f
+		$(F77) $(FFLAGS) -c stable.f -o $@
+
+stufprobc.o:	$(FORTRAN)/../stufprobc.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/../stufprobc.m4 > stufprobc.f
+		$(F77) $(FFLAGS) -c stufprobc.f -o $@
+
+trace.o:	$(FORTRAN)/trace.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/trace.m4 > trace.f
+		$(F77) $(FFLAGS) -c trace.f -o $@
+
+trace1d.o:	$(FORTRAN)/trace1d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/trace1d.m4 > trace1d.f
+		$(F77) $(FFLAGS) -c trace1d.f -o $@
diff -r 000000000000 -r 5eda1a3f24e8 source/test/clustering/parallel_br/test_inputs/test.2d.boxes
Binary file source/test/clustering/parallel_br/test_inputs/test.2d.boxes has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/clustering/parallel_br/test_inputs/test.2d.inc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/clustering/parallel_br/test_inputs/test.2d.inc	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,182 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER.  
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler 2d test problem
+ *
+ ************************************************************************/
+
+AutoTester {
+   test_fluxes = FALSE
+   test_iter_num = 10
+  correct_result =  0.0199217807513,  0.000626511715916,   0.0000697047190579
+   output_correct = FALSE
+
+   write_patch_boxes = FALSE
+   read_patch_boxes = TRUE  
+   test_patch_boxes_at_steps = 0, 5, 10  // 0 checks initial data
+   test_patch_boxes_filename = "test-2d.boxes"
+   simplify_test_boxes = TRUE
+}
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4        // order of Goduov slopes (1, 2, or 4)
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   data_problem         = "STEP"
+
+   Initial_data {
+      front_position = 0.0
+      interval_0 {
+         density         = 1.4
+         velocity        = 3.0 , 0.0
+         pressure        = 1.0
+      }
+      interval_1 {
+         density         = 1.4
+         velocity        = 3.0 , 0.0
+         pressure        = 1.0
+      }
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT", "PRESSURE_SHOCK"
+ 
+      PRESSURE_GRADIENT {
+         grad_tol = 20.0
+      }
+ 
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.90
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "YREFLECT"
+      }
+   }
+
+}
+
+Main {
+// log file parameters 
+   log_file_name    = "test-2d.log"
+   log_all_nodes    = TRUE
+
+// visualization dump parameters
+   viz_dump_interval     = 0         // zero to turn off
+   viz_dump_dirname     = "viz-test-2d"
+   viz_dump_filename    = "step2d"
+
+// restart dump parameters
+   restart_interval       = 1         // zero to turn off
+   restart_write_dirname  = "restart-test-2d"
+
+   plotting_interval = 0
+}
+
+TimerManager{
+   print_exclusive      = TRUE   // output exclusive time 
+   timer_list               = "apps::main::*",
+                              "apps::Euler::*",
+                              "algs::GriddingAlgorithm::*",
+                              "algs::HyperbolicLevelIntegrator::*"
+}
+
+CartesianGeometry {
+   domain_boxes = [ (0,0) , (9,19) ],
+                  [ (10,4) , (49,19) ]
+   x_lo         = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 2.5e0 , 1.e0  // upper end of computational domain.
+}
+
+StandardTagAndInitialize{    
+   tagging_method = "GRADIENT_DETECTOR" 
+}
+
+GriddingAlgorithm {
+   max_levels = 5         // Maximum number of levels in hierarchy.
+
+   ratio_to_coarser {              // vector ratio to next coarser level
+      level_1            = 2 , 2
+      level_2            = 2 , 2
+      level_3            = 2 , 2
+      level_4            = 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 32 , 32
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 8 , 8
+      level_1 = 8 , 8
+      level_2 = 8 , 8
+      level_3 = 12 , 12
+   }
+
+   efficiency_tolerance = 0.75e0   // min % of tag cells in new patch level
+   combine_efficiency   = 0.85e0   // chop box if sum of volumes of smaller
+                                   // boxes < efficiency * vol of large box
+
+   allow_patches_smaller_than_ghostwidth = TRUE
+   allow_patches_smaller_than_minimum_size_to_prevent_overlaps = TRUE
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 100.e0    // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   max_integrator_steps  = 10      // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/clustering/parallel_br/test_inputs/test_1.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/clustering/parallel_br/test_inputs/test_1.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,16 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for parallel clustering tests.
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   tag_clustering_method = "ORIGINAL"
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+include test.2d.inc
diff -r 000000000000 -r 5eda1a3f24e8 source/test/clustering/parallel_br/test_inputs/test_2.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/clustering/parallel_br/test_inputs/test_2.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,16 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for parallel clustering tests.
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   tag_clustering_method = "COMMUNICATOR"
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+include test.2d.inc
diff -r 000000000000 -r 5eda1a3f24e8 source/test/clustering/parallel_br/test_inputs/test_3.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/clustering/parallel_br/test_inputs/test_3.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,16 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for parallel clustering test.
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   tag_clustering_method = "ORIG_FAST_REDUCE"
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+include test.2d.inc
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/CellDataTest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/CellDataTest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,621 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR communication tests for cell-centered patch data 
+ *
+ ************************************************************************/
+
+#include "CellDataTest.h"
+
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "CommTester.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/tbox/Database.h"
+
+namespace SAMRAI {
+
+using namespace std;
+
+CellDataTest::CellDataTest(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> main_input_db,
+   bool do_refine,
+   bool do_coarsen,
+   const string& refine_option):
+   PatchDataTestStrategy(dim),
+   d_dim(dim)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!main_input_db.isNull());
+   TBOX_ASSERT(!refine_option.empty());
+#endif
+
+   d_object_name = object_name;
+
+   d_do_refine = do_refine;
+   d_do_coarsen = false;
+   if (!do_refine) {
+      d_do_coarsen = do_coarsen;
+   }
+
+   d_refine_option = refine_option;
+
+   d_Acoef = 0.0;
+   d_Bcoef = 0.0;
+   d_Ccoef = 0.0;
+   d_Dcoef = 0.0;
+
+   d_finest_level_number = main_input_db->
+      getDatabase("PatchHierarchy")->
+      getInteger("max_levels") - 1;
+
+   d_cart_grid_geometry = new geom::CartesianGridGeometry(
+         dim,
+         "CartesianGridGeometry",
+         main_input_db->getDatabase("CartesianGridGeometry"));
+
+   hier::MappedBoxSet domain_nodes;
+   d_cart_grid_geometry->computePhysicalDomain(domain_nodes,
+      hier::IntVector(d_dim, 1));
+
+   setGridGeometry(d_cart_grid_geometry);
+
+   readTestInput(main_input_db->getDatabase("CellPatchDataTest"));
+
+}
+
+CellDataTest::~CellDataTest()
+{
+}
+
+void CellDataTest::readTestInput(
+   tbox::Pointer<tbox::Database> db)
+{
+   TBOX_ASSERT(!db.isNull());
+
+   /*
+    * Read coeeficients of linear profile to test interpolation.
+    */
+   if (db->keyExists("Acoef")) {
+      d_Acoef = db->getDouble("Acoef");
+   } else {
+      TBOX_ERROR(d_object_name << " input error: No `Acoeff' found." << endl);
+   }
+   if (db->keyExists("Dcoef")) {
+      d_Dcoef = db->getDouble("Dcoef");
+   } else {
+      TBOX_ERROR(d_object_name << " input error: No `Dcoef' found." << endl);
+   }
+   if (d_dim > tbox::Dimension(1)) {
+      if (db->keyExists("Bcoef")) {
+         d_Bcoef = db->getDouble("Bcoef");
+      } else {
+         TBOX_ERROR(d_object_name << " input error: No `Bcoef' found." << endl);
+      }
+   }
+   if (d_dim > tbox::Dimension(2)) {
+      if (db->keyExists("Ccoef")) {
+         d_Ccoef = db->getDouble("Ccoef");
+      } else {
+         TBOX_ERROR(d_object_name << " input error: No `Ccoef' found." << endl);
+      }
+   }
+
+   /*
+    * Base class reads variable parameters and boxes to refine.
+    */
+
+   readVariableInput(db->getDatabase("VariableData"));
+   readRefinementInput(db->getDatabase("RefinementData"));
+}
+
+void CellDataTest::registerVariables(
+   CommTester* commtest)
+{
+   TBOX_ASSERT(commtest != (CommTester *)NULL);
+
+   int nvars = d_variable_src_name.getSize();
+
+   d_variables.resizeArray(nvars);
+
+   for (int i = 0; i < nvars; i++) {
+      d_variables[i] = new pdat::CellVariable<double>(d_dim,
+                                                      d_variable_src_name[i],
+                                                      d_variable_depth[i]);
+
+      if (d_do_refine) {
+         commtest->registerVariable(d_variables[i],
+            d_variables[i],
+            d_variable_src_ghosts[i],
+            d_variable_dst_ghosts[i],
+            d_cart_grid_geometry,
+            d_variable_refine_op[i]);
+      } else if (d_do_coarsen) {
+         commtest->registerVariable(d_variables[i],
+            d_variables[i],
+            d_variable_src_ghosts[i],
+            d_variable_dst_ghosts[i],
+            d_cart_grid_geometry,
+            d_variable_coarsen_op[i]);
+      }
+
+   }
+
+}
+
+void CellDataTest::setLinearData(
+   tbox::Pointer<pdat::CellData<double> > data,
+   const hier::Box& box,
+   const hier::Patch& patch) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+
+   tbox::Pointer<geom::CartesianPatchGeometry> pgeom = patch.getPatchGeometry();
+   const pdat::CellIndex loweri(patch.getBox().lower());
+   const pdat::CellIndex upperi(patch.getBox().upper());
+   const double* pdx = pgeom->getDx();
+   const double* lowerx = pgeom->getXLower();
+   double x, y, z;
+
+   const int depth = data->getDepth();
+
+   const hier::Box sbox = data->getGhostBox() * box;
+
+   for (pdat::CellIterator ci(sbox); ci; ci++) {
+
+      /*
+       * Compute spatial location of cell center and
+       * set data to linear profile.
+       */
+
+      x = lowerx[0] + pdx[0] * (ci() (0) - loweri(0) + 0.5);
+      y = z = 0.;
+      if (d_dim > tbox::Dimension(1)) {
+         y = lowerx[1] + pdx[1] * (ci() (1) - loweri(1) + 0.5);
+      }
+      if (d_dim > tbox::Dimension(2)) {
+         z = lowerx[2] + pdx[2] * (ci() (2) - loweri(2) + 0.5);
+      }
+
+      for (int d = 0; d < depth; d++) {
+         (*data)(ci(), d) = d_Dcoef + d_Acoef * x + d_Bcoef * y + d_Ccoef * z;
+      }
+
+   }
+
+}
+
+void CellDataTest::setConservativeData(
+   tbox::Pointer<pdat::CellData<double> > data,
+   const hier::Box& box,
+   const hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= hierarchy->getFinestLevelNumber()));
+#endif
+
+   tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(
+         level_number);
+
+   hier::BoxArray domain = level->getPhysicalDomain();
+   int ncells = 0;
+   for (int i = 0; i < domain.getNumberOfBoxes(); i++) {
+      ncells += domain[i].size();
+   }
+
+   const int depth = data->getDepth();
+
+   const hier::Box sbox = data->getGhostBox() * box;
+
+   if (level_number == 0) {
+
+      /*
+       * Set cell value on level zero to u(i,j,k) = (i + j + k)/ncells.
+       */
+
+      for (pdat::CellIterator fi(sbox); fi; fi++) {
+         double value = 0.0;
+         for (int d = 0; d < d_dim.getValue(); d++) {
+            value += (double)(fi() (d));
+         }
+         value /= ncells;
+         for (int dep = 0; dep < depth; dep++) {
+            (*data)(fi(), dep) = value;
+         }
+      }
+
+   } else {
+
+      /*
+       * Set cell value on level > 0 to
+       *    u(i,j,k) = u_c + ci*del_i + cj*del_j + ck*del_k
+       * where u_c is underlying coarse value, (ci,cj,ck) is
+       * the underlying coarse cell index, and (del_i,del_j,del_k)
+       * is the vector between the coarse and fine cell centers.
+       */
+
+      hier::IntVector ratio(level->getRatioToLevelZero());
+
+      tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+         patch.getPatchGeometry();
+      const double* dx = pgeom->getDx();
+
+      int coarse_ncells = ncells;
+      std::vector<std::vector<double> > delta(d_dim.getValue());
+      for (int d = 0; d < d_dim.getValue(); d++) {
+         delta[d].resize(ratio(d), 0.0);
+         coarse_ncells /= ratio(d);
+         double coarse_dx = dx[d] * ratio(d);
+         for (int i = 0; i < ratio(d); i++) {
+            /*
+             * delta[d][i] is the physical distance from i-th fine
+             * cell centroid in d-direction to coarse cell centroid.
+             * The distance is the d-th component of the displacement
+             * vector.
+             */
+            delta[d][i] = (i + 0.5) * dx[d] - coarse_dx * 0.5;
+         }
+      }
+
+      for (pdat::CellIterator fi(sbox); fi; fi++) {
+
+         const hier::IntVector ci(hier::Index::coarsen(*fi, ratio));
+         hier::IntVector del(ci.getDim());  // Index vector from ci to fi.
+         double value = 0.0;
+         for (int d = 0; d < d_dim.getValue(); d++) {
+            del(d) = (int)delta[d][fi() (d) - ci(d) * ratio(d)];
+            value += (double)(ci(d));
+         }
+         value /= coarse_ncells;
+
+         for (int d = 0; d < d_dim.getValue(); d++) {
+            value += ci(d) * del(d);
+         }
+
+         for (int dep = 0; dep < depth; dep++) {
+            (*data)(fi(), dep) = value;
+         }
+
+      }
+
+   }
+
+}
+
+void CellDataTest::setPeriodicData(
+   tbox::Pointer<pdat::CellData<double> > data,
+   const hier::Box& box,
+   const hier::Patch& patch) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   NULL_USE(patch);
+
+   const double* xlo = d_cart_grid_geometry->getXLower();
+   const double* xup = d_cart_grid_geometry->getXUpper();
+   std::vector<double> domain_len(d_dim.getValue());
+   for (int d = 0; d < d_dim.getValue(); ++d) {
+      domain_len[d] = xup[d] - xlo[d];
+   }
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+
+   const int depth = data->getDepth();
+
+   const hier::Box sbox = data->getGhostBox() * box;
+
+   for (pdat::CellIterator ci(sbox); ci; ci++) {
+
+      double val = 1.0;
+      for (int d = 0; d < d_dim.getValue(); ++d) {
+         double tmpf = dx[d] * (ci() (d) + 0.5) / domain_len[d];
+         tmpf = sin(2 * M_PI * tmpf);
+         val *= tmpf;
+      }
+      for (int d = 0; d < depth; d++) {
+         (*data)(ci(), d) = val;
+      }
+
+   }
+
+}
+
+void CellDataTest::initializeDataOnPatch(
+   const hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number,
+   char src_or_dst)
+{
+   NULL_USE(src_or_dst);
+
+   const hier::IntVector periodic_shift(d_cart_grid_geometry->getPeriodicShift(
+                                           hier::IntVector(d_dim, 1)));
+   bool is_periodic = periodic_shift.max() > 0;
+
+   if (d_do_refine) {
+
+      for (int i = 0; i < d_variables.getSize(); i++) {
+
+         tbox::Pointer<pdat::CellData<double> > cell_data =
+            patch.getPatchData(d_variables[i], getDataContext());
+
+         hier::Box dbox = cell_data->getBox();
+
+         if (is_periodic) {
+            setPeriodicData(cell_data, dbox, patch);
+         } else {
+            setLinearData(cell_data, dbox, patch);
+         }
+
+      }
+
+   } else if (d_do_coarsen) {
+
+      for (int i = 0; i < d_variables.getSize(); i++) {
+
+         tbox::Pointer<pdat::CellData<double> > cell_data =
+            patch.getPatchData(d_variables[i], getDataContext());
+
+         hier::Box dbox = cell_data->getGhostBox();
+
+         if (is_periodic) {
+            setPeriodicData(cell_data, dbox, patch);
+         } else {
+            setConservativeData(cell_data, dbox, patch, hierarchy, level_number);
+         }
+
+      }
+
+   }
+
+}
+
+void CellDataTest::checkPatchInteriorData(
+   const tbox::Pointer<pdat::CellData<double> >& data,
+   const hier::Box& interior,
+   const hier::Patch& patch) const
+{
+   TBOX_ASSERT(!data.isNull());
+
+   const bool is_periodic =
+      d_cart_grid_geometry->getPeriodicShift(hier::IntVector(d_dim,
+            1)).max() > 0;
+
+   const int depth = data->getDepth();
+
+   tbox::Pointer<pdat::CellData<double> > correct_data(
+      new pdat::CellData<double>(data->getBox(),
+                                 depth,
+                                 data->getGhostCellWidth()));
+   if (is_periodic) {
+      setPeriodicData(correct_data, correct_data->getGhostBox(), patch);
+   } else {
+      setLinearData(correct_data, correct_data->getGhostBox(), patch);
+   }
+
+   for (pdat::CellIterator ci(interior); ci; ci++) {
+      for (int d = 0; d < depth; d++) {
+         if (!(tbox::MathUtilities<double>::equalEps((*data)(ci(), d),
+                  (*correct_data)(ci(), d)))) {
+            tbox::perr << "FAILED: -- patch interior not properly filled"
+                       << endl;
+         }
+      }
+   }
+
+}
+
+void CellDataTest::setPhysicalBoundaryConditions(
+   const hier::Patch& patch,
+   const double time,
+   const hier::IntVector& gcw_to_fill) const
+{
+   NULL_USE(time);
+
+   const hier::IntVector periodic_shift(
+      d_cart_grid_geometry->getPeriodicShift(hier::IntVector(d_dim, 1)));
+   bool is_periodic = periodic_shift.max() > 0;
+
+   tbox::Pointer<geom::CartesianPatchGeometry> pgeom = patch.getPatchGeometry();
+
+   const tbox::Array<hier::BoundaryBox> node_bdry =
+      pgeom->getCodimensionBoundaries(d_dim.getValue());
+   const int num_node_bdry_boxes = node_bdry.getSize();
+
+   tbox::Array<hier::BoundaryBox> edge_bdry;
+   if (d_dim > tbox::Dimension(1)) {
+      edge_bdry = pgeom->getCodimensionBoundaries(d_dim.getValue() - 1);
+   }
+   const int num_edge_bdry_boxes = d_dim > tbox::Dimension(1) ? edge_bdry.getSize() : -1;
+
+   tbox::Array<hier::BoundaryBox> face_bdry;
+   if (d_dim == tbox::Dimension(3)) {
+      face_bdry = pgeom->getCodimensionBoundaries(d_dim.getValue() - 2);
+   }
+   const int num_face_bdry_boxes = d_dim == tbox::Dimension(3) ? face_bdry.getSize() : -1;
+
+   for (int i = 0; i < d_variables.getSize(); i++) {
+
+      tbox::Pointer<pdat::CellData<double> > cell_data =
+         patch.getPatchData(d_variables[i], getDataContext());
+
+      hier::Box patch_interior = cell_data->getBox();
+      checkPatchInteriorData(cell_data, patch_interior, patch);
+
+      /*
+       * Set node boundary data.
+       */
+      for (int ni = 0; ni < num_node_bdry_boxes; ni++) {
+
+         hier::Box fill_box = pgeom->getBoundaryFillBox(node_bdry[ni],
+               patch.getBox(),
+               gcw_to_fill);
+
+         if (is_periodic) {
+            setPeriodicData(cell_data, fill_box, patch);
+         } else {
+            setLinearData(cell_data, fill_box, patch);
+         }
+      }
+
+      if (d_dim > tbox::Dimension(1)) {
+         /*
+          * Set edge boundary data.
+          */
+         for (int ei = 0; ei < num_edge_bdry_boxes; ei++) {
+
+            hier::Box fill_box = pgeom->getBoundaryFillBox(edge_bdry[ei],
+                  patch.getBox(),
+                  gcw_to_fill);
+
+            if (is_periodic) {
+               setPeriodicData(cell_data, fill_box, patch);
+            } else {
+               setLinearData(cell_data, fill_box, patch);
+            }
+         }
+      }
+
+      if (d_dim == tbox::Dimension(3)) {
+         /*
+          * Set face boundary data.
+          */
+         for (int fi = 0; fi < num_face_bdry_boxes; fi++) {
+
+            hier::Box fill_box = pgeom->getBoundaryFillBox(face_bdry[fi],
+                  patch.getBox(),
+                  gcw_to_fill);
+
+            if (is_periodic) {
+               setPeriodicData(cell_data, fill_box, patch);
+            } else {
+               setLinearData(cell_data, fill_box, patch);
+            }
+         }
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Verify results of communication operations.  This test must be        *
+ * consistent with data initialization and boundary operations above.    *
+ *                                                                       *
+ *************************************************************************
+ */
+bool CellDataTest::verifyResults(
+   const hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number)
+{
+
+   bool test_failed = false;
+
+   const hier::IntVector periodic_shift(
+      d_cart_grid_geometry->getPeriodicShift(hier::IntVector(d_dim, 1)));
+   bool is_periodic = periodic_shift.max() > 0;
+
+   if (d_do_refine || d_do_coarsen) {
+
+      tbox::plog << "\nEntering CellDataTest::verifyResults..." << endl;
+      tbox::plog << "level_number = " << level_number << endl;
+      tbox::plog << "Patch box = " << patch.getBox() << endl;
+
+      hier::IntVector tgcw(periodic_shift.getDim(), 0);
+      for (int i = 0; i < d_variables.getSize(); i++) {
+         tgcw.max(patch.getPatchData(d_variables[i], getDataContext())->
+            getGhostCellWidth());
+      }
+      hier::Box pbox = patch.getBox();
+
+      tbox::Pointer<pdat::CellData<double> > solution(
+         new pdat::CellData<double>(pbox, 1, tgcw));
+
+      hier::Box tbox(pbox);
+      tbox.grow(tgcw);
+
+      if (d_do_refine) {
+         if (is_periodic) {
+            setPeriodicData(solution, tbox, patch);
+         } else {
+            setLinearData(solution, tbox, patch);
+         }
+      } else {
+         if (is_periodic) {
+            setPeriodicData(solution, tbox, patch);
+         } else {
+            setConservativeData(solution, tbox, patch, hierarchy, level_number);
+         }
+      }
+
+      for (int i = 0; i < d_variables.getSize(); i++) {
+
+         tbox::Pointer<pdat::CellData<double> > cell_data =
+            patch.getPatchData(d_variables[i], getDataContext());
+         int depth = cell_data->getDepth();
+         hier::Box dbox = cell_data->getGhostBox();
+
+         for (pdat::CellIterator ci(dbox); ci; ci++) {
+            double correct = (*solution)(ci());
+            for (int d = 0; d < depth; d++) {
+               double result = (*cell_data)(ci(), d);
+               if (!tbox::MathUtilities<double>::equalEps(correct, result)) {
+                  tbox::perr << "Test FAILED: ...."
+                             << " : cell index = " << ci()
+                             << " of L" << level_number
+                             << " P" << patch.getLocalId()
+                             << " " << patch.getBox() << endl;
+                  tbox::perr << "    hier::Variable = "
+                  << d_variable_src_name[i]
+                  << " : depth index = " << d << endl;
+                  tbox::perr << "    result = " << result
+                             << " : correct = " << correct << endl;
+                  test_failed = true;
+               }
+            }
+         }
+
+      }
+      if (!test_failed) {
+         tbox::plog << "CellDataTest Successful!" << endl;
+      }
+
+      solution.setNull();   // just to be anal...
+
+      tbox::plog << "\nExiting CellDataTest::verifyResults..." << endl;
+      tbox::plog << "level_number = " << level_number << endl;
+      tbox::plog << "Patch box = " << patch.getBox() << endl << endl;
+
+   }
+
+   return !test_failed;
+
+}
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/CellDataTest.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/CellDataTest.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,199 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR communication tests for cell-centered patch data 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_CellDataTest
+#define included_pdat_CellDataTest
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/hier/Variable.h"
+
+#include "PatchDataTestStrategy.h"
+
+#include <string>
+
+using namespace std;
+
+namespace SAMRAI {
+
+class CommTester;
+
+/**
+ * Class CellDataTest provides routines to test communication operations
+ * for cell-centered patch data on an AMR patch hierarchy.
+ *
+ * Required input keys and data types:
+ *
+ *
+ *
+ *
+ *   Double values that define linear function initial data to test refine
+ *   operations (Ax + By + Cz + D = f(x,y,z), where f(x,y,z) is the value
+ *   assigned to each array value at initialization and against which
+ *   linear interpolation is tested:
+ *
+ *    Acoef, Dcoef always required.
+ *    If (dim > 1), Bcoef is needed.
+ *    If (dim > 2), Ccoef is needed.
+ *
+ *
+ *
+ *
+ *
+ * See PatchDataTestStrategy header file comments for variable and
+ * refinement input data description.
+ */
+
+class CellDataTest:public PatchDataTestStrategy
+{
+public:
+   /**
+    * The constructor initializes variable data arrays to zero length.
+    */
+   CellDataTest(
+      const std::string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> main_input_db,
+      bool do_refine,
+      bool do_coarsen,
+      const std::string& refine_option);
+
+   /**
+    * Virtual destructor for CellDataTest.
+    */
+   ~CellDataTest();
+
+   /**
+    * User-supplied boundary conditions.  Note that we do not implement
+    * user-defined coarsen and refine operations.
+    */
+   void
+   setPhysicalBoundaryConditions(
+      const hier::Patch& patch,
+      const double time,
+      const hier::IntVector& gcw_to_fill) const;
+
+   /**
+    * This function is called from the CommTester constructor.  Its
+    * purpose is to register variables used in the patch data test
+    * and appropriate communication parameters (ghost cell widths,
+    * coarsen/refine operations) with the CommTester object, which
+    * manages the variable storage.
+    */
+   void
+   registerVariables(
+      CommTester* commtest);
+
+   /**
+    * Function for setting data on new patch in hierarchy.
+    *
+    * @param src_or_dst Flag set to 's' for source or 'd' for destination
+    *        to indicate variables to set data for.
+    */
+   virtual void
+   initializeDataOnPatch(
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number,
+      char src_or_dst);
+
+   /**
+    * Function for checking results of communication operations.
+    */
+   bool
+   verifyResults(
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number);
+
+private:
+   /**
+    * Function for reading test data from input file.
+    */
+   void
+   readTestInput(
+      tbox::Pointer<tbox::Database> db);
+
+   /**
+    * Set linear function data for testing interpolation
+    */
+   void
+   setLinearData(
+      tbox::Pointer<pdat::CellData<double> > data,
+      const hier::Box& box,
+      const hier::Patch& patch) const;
+
+   /**
+    * Set conservative linear function data for testing coarsening
+    */
+   void
+   setConservativeData(
+      tbox::Pointer<pdat::CellData<double> > data,
+      const hier::Box& box,
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number) const;
+
+   /**
+    * Set periodic linear function data for testing interpolation in
+    * periodic domains.
+    */
+   void
+   setPeriodicData(
+      tbox::Pointer<pdat::CellData<double> > data,
+      const hier::Box& box,
+      const hier::Patch& patch) const;
+
+   void
+   checkPatchInteriorData(
+      const tbox::Pointer<pdat::CellData<double> >& data,
+      const hier::Box& interior,
+      const hier::Patch& patch) const;
+
+   const tbox::Dimension d_dim;
+
+   /*
+    * Object string identifier for error reporting
+    */
+   std::string d_object_name;
+
+   /*
+    * Data members specific to this cell data test.
+    */
+   tbox::Pointer<geom::CartesianGridGeometry> d_cart_grid_geometry;
+
+   /*
+    * Data members specific to this cell data test.
+    */
+   double d_Acoef;
+   double d_Bcoef;
+   double d_Ccoef;
+   double d_Dcoef;
+
+   bool d_do_refine;
+   bool d_do_coarsen;
+   std::string d_refine_option;
+   int d_finest_level_number;
+
+   tbox::Array<tbox::Pointer<hier::Variable> > d_variables;
+
+};
+
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/CommTester.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/CommTester.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,698 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Manager class for patch data communication tests. 
+ *
+ ************************************************************************/
+
+#include "CommTester.h"
+
+#include "SAMRAI/mesh/BergerRigoutsos.h"
+#include "SAMRAI/hier/OverlapConnectorAlgorithm.h"
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/mesh/StandardTagAndInitialize.h"
+#include "SAMRAI/mesh/GriddingAlgorithm.h"
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/mesh/TreeLoadBalancer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+namespace SAMRAI {
+
+using namespace std;
+
+/*
+ *************************************************************************
+ *									*
+ * The constructor initializes object state.  The destructor is empty.   *
+ *									*
+ *************************************************************************
+ */
+
+CommTester::CommTester(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> main_input_db,
+   PatchDataTestStrategy* data_test,
+   bool do_refine,
+   bool do_coarsen,
+   const string& refine_option):
+   RefinePatchStrategy(dim),
+   CoarsenPatchStrategy(dim),
+   d_dim(dim),
+   d_fill_source_algorithm(dim),
+   d_refine_algorithm(dim),
+   d_coarsen_algorithm(dim),
+   d_reset_refine_algorithm(dim),
+   d_reset_coarsen_algorithm(dim)
+{
+   NULL_USE(main_input_db);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!main_input_db.isNull());
+   TBOX_ASSERT(data_test != (PatchDataTestStrategy *)NULL);
+#endif
+
+   d_object_name = object_name;
+   d_data_test_strategy = data_test;
+   d_patch_hierarchy = NULL;
+
+   d_fake_time = 0.0;
+
+   d_is_reset = false;
+
+   d_do_refine = do_refine;
+   d_do_coarsen = false;
+   if (!do_refine) {
+      d_do_coarsen = do_coarsen;
+   }
+
+   d_refine_option = refine_option;
+   if (!((d_refine_option == "INTERIOR_FROM_SAME_LEVEL")
+         || (d_refine_option == "INTERIOR_FROM_COARSER_LEVEL"))) {
+      TBOX_ERROR(object_name << " input error: illegal refine_option = "
+                             << d_refine_option << endl);
+   }
+
+   d_patch_data_components.clrAllFlags();
+   d_fill_source_schedule.resizeArray(0);
+   d_refine_schedule.resizeArray(0);
+   d_coarsen_schedule.resizeArray(0);
+
+   d_source =
+      hier::VariableDatabase::getDatabase()->getContext("SOURCE");
+   d_destination =
+      hier::VariableDatabase::getDatabase()->getContext("DESTINATION");
+   d_refine_scratch =
+      hier::VariableDatabase::getDatabase()->getContext("REFINE_SCRATCH");
+
+   d_reset_source =
+      hier::VariableDatabase::getDatabase()->getContext("SOURCE");
+   d_reset_destination =
+      hier::VariableDatabase::getDatabase()->getContext("DESTINATION");
+   d_reset_refine_scratch =
+      hier::VariableDatabase::getDatabase()->getContext("REFINE_SCRATCH");
+
+   d_data_test_strategy->registerVariables(this);
+
+}
+
+CommTester::~CommTester()
+{
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Add variable with associated attributes to set of test variables.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CommTester::registerVariable(
+   const tbox::Pointer<hier::Variable> src_variable,
+   const tbox::Pointer<hier::Variable> dst_variable,
+   const hier::IntVector& src_ghosts,
+   const hier::IntVector& dst_ghosts,
+   const tbox::Pointer<xfer::Geometry> xfer_geom,
+   const string& operator_name)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(src_ghosts, dst_ghosts);
+
+   TBOX_ASSERT(!src_variable.isNull());
+   TBOX_ASSERT(!dst_variable.isNull());
+   TBOX_ASSERT(!xfer_geom.isNull());
+   TBOX_ASSERT(!operator_name.empty());
+
+   const tbox::Dimension dim(src_ghosts.getDim());
+
+   hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+
+   int src_id = variable_db->registerVariableAndContext(src_variable,
+         d_source,
+         src_ghosts);
+
+   int dst_id = variable_db->registerVariableAndContext(dst_variable,
+         d_destination,
+         dst_ghosts);
+
+   TBOX_ASSERT(src_id != -1);
+   TBOX_ASSERT(dst_id != -1);
+
+   d_patch_data_components.setFlag(src_id);
+   d_patch_data_components.setFlag(dst_id);
+
+   tbox::Pointer<xfer::RefineOperator> refine_operator(NULL);
+   tbox::Pointer<xfer::CoarsenOperator> coarsen_operator(NULL);
+
+   if (d_do_refine) {
+      refine_operator = xfer_geom->lookupRefineOperator(src_variable,
+            operator_name);
+
+      hier::IntVector scratch_ghosts(hier::IntVector::max(src_ghosts,
+                                        dst_ghosts));
+      scratch_ghosts.max(hier::IntVector(scratch_ghosts.getDim(), 1));
+      if (!refine_operator.isNull()) {
+         scratch_ghosts.max(refine_operator->getStencilWidth());
+      }
+      int scratch_id =
+         variable_db->registerVariableAndContext(src_variable,
+            d_refine_scratch,
+            scratch_ghosts);
+      TBOX_ASSERT(scratch_id != -1);
+
+      d_patch_data_components.setFlag(scratch_id);
+
+      d_refine_algorithm.registerRefine(dst_id,
+         src_id,
+         scratch_id,
+         refine_operator);
+
+      if (src_ghosts >= scratch_ghosts) {
+         d_fill_source_algorithm.registerRefine(src_id,
+            src_id,
+            src_id,
+            refine_operator);
+      }
+   } else if (d_do_coarsen) {
+      coarsen_operator = xfer_geom->lookupCoarsenOperator(src_variable,
+            operator_name);
+      d_coarsen_algorithm.registerCoarsen(dst_id,
+         src_id,
+         coarsen_operator);
+   }
+
+   registerVariableForReset(src_variable, dst_variable,
+      src_ghosts, dst_ghosts, xfer_geom,
+      operator_name);
+}
+
+void CommTester::registerVariableForReset(
+   const tbox::Pointer<hier::Variable> src_variable,
+   const tbox::Pointer<hier::Variable> dst_variable,
+   const hier::IntVector& src_ghosts,
+   const hier::IntVector& dst_ghosts,
+   const tbox::Pointer<xfer::Geometry> xfer_geom,
+   const string& operator_name)
+{
+   TBOX_DIM_ASSERT_CHECK_ARGS2(src_ghosts, dst_ghosts);
+
+   TBOX_ASSERT(!src_variable.isNull());
+   TBOX_ASSERT(!dst_variable.isNull());
+   TBOX_ASSERT(!xfer_geom.isNull());
+   TBOX_ASSERT(!operator_name.empty());
+
+   hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+
+   int src_id = variable_db->registerVariableAndContext(src_variable,
+         d_reset_source,
+         src_ghosts);
+
+   int dst_id = variable_db->registerVariableAndContext(dst_variable,
+         d_reset_destination,
+         dst_ghosts);
+
+   d_patch_data_components.setFlag(src_id);
+   d_patch_data_components.setFlag(dst_id);
+
+   tbox::Pointer<xfer::RefineOperator> refine_operator(NULL);
+   tbox::Pointer<xfer::CoarsenOperator> coarsen_operator(NULL);
+
+   if (d_do_refine) {
+      refine_operator = xfer_geom->lookupRefineOperator(src_variable,
+            operator_name);
+
+      hier::IntVector scratch_ghosts(hier::IntVector::max(src_ghosts,
+                                        dst_ghosts));
+      scratch_ghosts.max(hier::IntVector(scratch_ghosts.getDim(), 1));
+      if (!refine_operator.isNull()) {
+         scratch_ghosts.max(refine_operator->getStencilWidth());
+      }
+      int scratch_id =
+         variable_db->registerVariableAndContext(src_variable,
+            d_reset_refine_scratch,
+            scratch_ghosts);
+
+      d_patch_data_components.setFlag(scratch_id);
+
+      d_reset_refine_algorithm.registerRefine(dst_id,
+         src_id,
+         scratch_id,
+         refine_operator);
+
+   } else if (d_do_coarsen) {
+      coarsen_operator = xfer_geom->lookupCoarsenOperator(src_variable,
+            operator_name);
+      d_reset_coarsen_algorithm.registerCoarsen(dst_id,
+         src_id,
+         coarsen_operator);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create refine and coarsen communication schedules for hierarchy.      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CommTester::createRefineSchedule(
+   const int level_number)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= d_patch_hierarchy->getFinestLevelNumber()));
+#endif
+
+   tbox::Pointer<hier::PatchLevel> level = d_patch_hierarchy->getPatchLevel(
+         level_number);
+
+   if (d_do_refine) {
+
+      d_fill_source_schedule.resizeArray(d_patch_hierarchy->getNumberOfLevels());
+      d_fill_source_schedule[level_number].setNull();
+      d_refine_schedule.resizeArray(d_patch_hierarchy->getNumberOfLevels());
+      d_refine_schedule[level_number].setNull();
+
+      const hier::Connector& peer_cnect =
+         d_patch_hierarchy->getConnector(level_number, level_number);
+      const hier::Connector* cnect_to_coarser = level_number > 0 ?
+         &d_patch_hierarchy->getConnector(level_number, level_number - 1) : NULL;
+      const hier::Connector* cnect_from_coarser = level_number > 0 ?
+         &d_patch_hierarchy->getConnector(level_number - 1, level_number) : NULL;
+
+      if (0) {
+         // These are expensive checks.
+         hier::OverlapConnectorAlgorithm oca;
+         oca.assertOverlapCorrectness(peer_cnect);
+         if (cnect_to_coarser)
+            oca.assertOverlapCorrectness(*cnect_to_coarser);
+         if (cnect_from_coarser)
+            oca.assertOverlapCorrectness(*cnect_from_coarser);
+         d_patch_hierarchy->recursivePrint(tbox::plog, "", 3);
+      }
+
+      d_fill_source_schedule[level_number] =
+         d_fill_source_algorithm.createSchedule(level, this);
+
+      if ((level_number == 0) ||
+          (d_refine_option == "INTERIOR_FROM_SAME_LEVEL")) {
+         d_refine_schedule[level_number] =
+            d_refine_algorithm.createSchedule(level,
+               level_number - 1,
+               d_patch_hierarchy,
+               this);
+      } else if (d_refine_option == "INTERIOR_FROM_COARSER_LEVEL") {
+         d_refine_schedule[level_number] =
+            d_refine_algorithm.createSchedule(level,
+               tbox::Pointer<SAMRAI::hier::PatchLevel>(NULL),
+               level_number - 1,
+               d_patch_hierarchy,
+               this);
+      }
+
+   }
+
+}
+
+void CommTester::resetRefineSchedule(
+   const int level_number)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= d_patch_hierarchy->getFinestLevelNumber()));
+#endif
+
+   if (d_do_refine) {
+
+      d_reset_refine_algorithm.resetSchedule(d_refine_schedule[level_number]);
+
+   }
+
+   d_is_reset = true;
+}
+
+void CommTester::createCoarsenSchedule(
+   const int level_number)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= d_patch_hierarchy->getFinestLevelNumber()));
+#endif
+
+   if (d_do_coarsen && (level_number > 0)) {
+
+      d_coarsen_schedule.resizeArray(d_patch_hierarchy->getNumberOfLevels());
+      d_coarsen_schedule[level_number].setNull();
+
+      tbox::Pointer<hier::PatchLevel> level =
+         d_patch_hierarchy->getPatchLevel(level_number);
+      tbox::Pointer<hier::PatchLevel> coarser_level =
+         d_patch_hierarchy->getPatchLevel(level_number - 1);
+
+      d_coarsen_schedule[level_number] =
+         d_coarsen_algorithm.createSchedule(coarser_level,
+            level,
+            this);
+
+   }
+
+}
+
+void CommTester::resetCoarsenSchedule(
+   const int level_number)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= d_patch_hierarchy->getFinestLevelNumber()));
+#endif
+
+   if (d_do_coarsen && (level_number > 0)) {
+
+      d_reset_coarsen_algorithm.resetSchedule(d_coarsen_schedule[level_number]);
+
+   }
+
+   d_is_reset = true;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Perform data refine and coarsen operations.                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CommTester::performRefineOperations(
+   const int level_number)
+{
+   if (d_do_refine) {
+      if (!d_fill_source_schedule[level_number].isNull() &&
+          level_number < d_fill_source_schedule.size() - 1) {
+         d_data_test_strategy->setDataContext(d_source);
+         d_fill_source_schedule[level_number]->fillData(d_fake_time);
+      }
+      if (d_is_reset) {
+         d_data_test_strategy->setDataContext(d_reset_refine_scratch);
+      } else {
+         d_data_test_strategy->setDataContext(d_refine_scratch);
+      }
+      if (!d_refine_schedule[level_number].isNull()) {
+         d_refine_schedule[level_number]->fillData(d_fake_time);
+      }
+      d_data_test_strategy->clearDataContext();
+   }
+}
+
+void CommTester::performCoarsenOperations(
+   const int level_number)
+{
+   if (d_do_coarsen) {
+      if (d_is_reset) {
+         d_data_test_strategy->setDataContext(d_reset_source);
+      } else {
+         d_data_test_strategy->setDataContext(d_source);
+      }
+      if (!d_coarsen_schedule[level_number].isNull()) {
+         d_coarsen_schedule[level_number]->coarsenData();
+      }
+      d_data_test_strategy->clearDataContext();
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Verify results of communication operations.                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool CommTester::verifyCommunicationResults() const
+{
+   bool tests_pass = true;
+   if (d_is_reset) {
+      d_data_test_strategy->setDataContext(d_reset_destination);
+   } else {
+      d_data_test_strategy->setDataContext(d_destination);
+   }
+   for (int ln = 0;
+        ln <= d_patch_hierarchy->getFinestLevelNumber(); ln++) {
+      tbox::Pointer<hier::PatchLevel> level = d_patch_hierarchy->getPatchLevel(
+            ln);
+
+      for (hier::PatchLevel::Iterator p(level); p; p++) {
+         tbox::Pointer<hier::Patch> patch = *p;
+
+         tests_pass &=
+            d_data_test_strategy->verifyResults(*patch, d_patch_hierarchy, ln);
+      }
+   }
+   d_data_test_strategy->clearDataContext();
+
+   return tests_pass;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Cell tagging and patch level data initialization routines declared    *
+ * in the GradientDetectorStrategy interface.  They are used to          *
+ * construct the hierarchy initially.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CommTester::initializeLevelData(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const double time,
+   const bool can_be_refined,
+   const bool initial_time,
+   const tbox::Pointer<hier::BasePatchLevel> old_level,
+   const bool allocate_data)
+{
+   (void)can_be_refined;
+   (void)initial_time;
+   (void)old_level;
+   (void)allocate_data;
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(hierarchy.isNull()));
+   TBOX_ASSERT(!(hierarchy->getPatchLevel(level_number).isNull()));
+   TBOX_ASSERT(level_number >= 0);
+#endif
+
+   hier::PatchLevel& level =
+      (hier::PatchLevel &) * hierarchy->getPatchLevel(level_number);
+
+   level.allocatePatchData(d_patch_data_components, time);
+
+   for (hier::PatchLevel::Iterator p(level); p; p++) {
+      hier::Patch& patch = **p;
+
+      d_data_test_strategy->setDataContext(d_source);
+      d_data_test_strategy->initializeDataOnPatch(patch,
+         hierarchy,
+         level.getLevelNumber(),
+         's');
+      d_data_test_strategy->clearDataContext();
+
+      d_data_test_strategy->setDataContext(d_reset_source);
+      d_data_test_strategy->initializeDataOnPatch(patch,
+         hierarchy,
+         level.getLevelNumber(),
+         's');
+      d_data_test_strategy->clearDataContext();
+
+      if (d_do_coarsen) {
+
+         /*
+          * TODO: Why are we initializing destination data?  Shouldn't
+          * it be uninitialized so we can check whether coarsening
+          * actually set the data correctly?  Maybe we initialize it
+          * so the un-refined coarse cells (which are unchanged by
+          * coarsening) won't trigger a false positive during
+          * verification.  If that is the problem, it should be fixed
+          * by limiting the verification to refined coarse cells.
+          * --BTNG
+          */
+
+         d_data_test_strategy->setDataContext(d_destination);
+         d_data_test_strategy->initializeDataOnPatch(patch,
+            hierarchy,
+            level.getLevelNumber(),
+            'd');
+         d_data_test_strategy->clearDataContext();
+
+         d_data_test_strategy->setDataContext(d_reset_destination);
+         d_data_test_strategy->initializeDataOnPatch(patch,
+            hierarchy,
+            level.getLevelNumber(),
+            'd');
+         d_data_test_strategy->clearDataContext();
+
+      }
+
+   }
+
+}
+
+void CommTester::resetHierarchyConfiguration(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level)
+{
+   (void)hierarchy;
+   (void)coarsest_level;
+   (void)finest_level;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Physical boundary condition and user-defined coarsen and refine       *
+ * operations declared in RefinePatchStrategy and CoarsenPatchStrategy.  *
+ * They are passed off to patch data test object.                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CommTester::setPhysicalBoundaryConditions(
+   hier::Patch& patch,
+   const double time,
+   const hier::IntVector& gcw)
+{
+   (void)time;
+   d_data_test_strategy->setPhysicalBoundaryConditions(patch,
+      d_fake_time,
+      gcw);
+}
+
+hier::IntVector CommTester::getRefineOpStencilWidth() const
+{
+   return hier::IntVector::getOne(d_dim);
+}
+
+void CommTester::preprocessRefine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio)
+{
+   d_data_test_strategy->preprocessRefine(fine, coarse, fine_box, ratio);
+}
+
+void CommTester::postprocessRefine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio)
+{
+   d_data_test_strategy->postprocessRefine(fine, coarse, fine_box, ratio);
+}
+
+hier::IntVector CommTester::getCoarsenOpStencilWidth() const
+{
+   return hier::IntVector::getZero(d_dim);
+}
+
+void CommTester::preprocessCoarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio)
+{
+   d_data_test_strategy->preprocessCoarsen(coarse, fine, coarse_box, ratio);
+}
+
+void CommTester::postprocessCoarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio)
+{
+   d_data_test_strategy->postprocessCoarsen(coarse, fine, coarse_box, ratio);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create and configure gridding objects used to build the hierarchy.    *
+ * Then, create hierarchy and initialize data.  Note this routine        *
+ * must be called after variables are registered with this tester object.*
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CommTester::setupHierarchy(
+   tbox::Pointer<tbox::Database> main_input_db,
+   tbox::Pointer<mesh::StandardTagAndInitialize> cell_tagger)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!main_input_db.isNull());
+#endif
+
+   d_patch_hierarchy =
+      new hier::PatchHierarchy("PatchHierarchy",
+                               d_data_test_strategy->getGridGeometry(),
+                               main_input_db->getDatabase("PatchHierarchy"));
+
+   tbox::Pointer<mesh::BergerRigoutsos> box_generator(new mesh::BergerRigoutsos(
+                                                         d_dim));
+
+   tbox::Pointer<mesh::TreeLoadBalancer> load_balancer(
+      new mesh::TreeLoadBalancer(d_dim,
+         "TreeLoadBalancer",
+         main_input_db->getDatabase("TreeLoadBalancer")));
+   load_balancer->setSAMRAI_MPI(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   tbox::Pointer<mesh::GriddingAlgorithm> gridding_algorithm(
+      new mesh::GriddingAlgorithm(d_patch_hierarchy,
+         "GriddingAlgorithm",
+         main_input_db->getDatabase("GriddingAlgorithm"),
+         cell_tagger,
+         box_generator,
+         load_balancer));
+
+   int fake_tag_buffer = 0;
+
+   gridding_algorithm->makeCoarsestLevel(d_fake_time);
+
+   bool initial_time = true;
+   for (int ln = 0; d_patch_hierarchy->levelCanBeRefined(ln); ln++) {
+      gridding_algorithm->makeFinerLevel(
+         d_fake_time,
+         initial_time,
+         fake_tag_buffer);
+   }
+
+   /*
+    * Clear the PersistentOverlapConnectors so we can test whether
+    * the communication schedules can work properly in the mode where
+    * there are no precomputed Connectors.
+    */
+   for ( int ln=0; ln<d_patch_hierarchy->getNumberOfLevels(); ++ln ) {
+      tbox::Pointer<hier::PatchLevel> level(d_patch_hierarchy->getPatchLevel(ln));
+      level->getMappedBoxLevel()->getPersistentOverlapConnectors().clear();
+   }
+
+   if (0) {
+      tbox::plog << "h:  generated hierarchy:\n";
+      d_patch_hierarchy->recursivePrint(tbox::plog, "h:  ", 3);
+      tbox::plog << "h:  mapped_box_level hierarchy:\n";
+      d_patch_hierarchy->recursivePrint(tbox::plog,
+         "",
+         3);
+   }
+
+}
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/CommTester.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/CommTester.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,328 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Manager class for patch data communication tests. 
+ *
+ ************************************************************************/
+
+#ifndef included_CommTester
+#define included_CommTester
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/ComponentSelector.h"
+#include "SAMRAI/xfer/CoarsenAlgorithm.h"
+#include "SAMRAI/xfer/CoarsenPatchStrategy.h"
+#include "SAMRAI/xfer/CoarsenSchedule.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/xfer/Geometry.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "PatchDataTestStrategy.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/xfer/RefineAlgorithm.h"
+#include "SAMRAI/xfer/RefinePatchStrategy.h"
+#include "SAMRAI/xfer/RefineSchedule.h"
+#include "SAMRAI/mesh/StandardTagAndInitialize.h"
+#include "SAMRAI/mesh/StandardTagAndInitStrategy.h"
+#ifndef included_String
+#include <string>
+using namespace std;
+#define included_String
+#endif
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/hier/VariableContext.h"
+
+namespace SAMRAI {
+
+/**
+ * Class CommTester serves as a tool to test data communication operations
+ * in SAMRAI, such as coarsening, refining, and filling ghost cells.
+ *
+ * The functions in this class called from main() are:
+ * \begin{enumerate}
+ *    - [CommTester(...)] constructor which initializes object state and
+ *                            creates patch hierarchy and sets initial data.
+ *    - [createRefineSchedule(...)] creates communication schedule for
+ *                                      refining data to given level.
+ *    - [createCoarsenSchedule(...)] creates communication schedule for
+ *                                       coarsening data to given level.
+ *    - [performRefineOperations(...)] refines data to given level.
+ *    - [performCoarsenOperations(...)] coarsens data to given level.
+ * \end{enumerate}
+ */
+
+class CommTester:
+   public mesh::StandardTagAndInitStrategy,
+   public xfer::RefinePatchStrategy,
+   public xfer::CoarsenPatchStrategy
+{
+public:
+   /**
+    * Constructor performs basic setup operations.
+    */
+   CommTester(
+      const std::string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> main_input_db,
+      PatchDataTestStrategy* strategy,
+      bool do_refine = true,
+      bool do_coarsen = false,
+      const std::string& refine_option = "INTERIOR_FROM_SAME_LEVEL");
+
+   /**
+    * Destructor is empty.
+    */
+   ~CommTester();
+
+   /**
+    * Return pointer to patch hierarchy on which communication is tested.
+    */
+   tbox::Pointer<hier::PatchHierarchy> getPatchHierarchy() const
+   {
+      return d_patch_hierarchy;
+   }
+
+   /**
+    * Register variable for communication testing.
+    *
+    * The transfer operator look-up will use the src_variable.
+    */
+   void
+   registerVariable(
+      const tbox::Pointer<hier::Variable> src_variable,
+      const tbox::Pointer<hier::Variable> dst_variable,
+      const hier::IntVector& src_ghosts,
+      const hier::IntVector& dst_ghosts,
+      const tbox::Pointer<xfer::Geometry> xfer_geom,
+      const std::string& operator_name);
+
+   /**
+    * Register variable for communication testing.
+    *
+    * The transfer operator look-up will use the src_variable.
+    */
+   void
+   registerVariableForReset(
+      const tbox::Pointer<hier::Variable> src_variable,
+      const tbox::Pointer<hier::Variable> dst_variable,
+      const hier::IntVector& src_ghosts,
+      const hier::IntVector& dst_ghosts,
+      const tbox::Pointer<xfer::Geometry> xfer_geom,
+      const std::string& operator_name);
+
+   /**
+    * Create communication schedules for refining data to given level.
+    */
+   void
+   createRefineSchedule(
+      const int level_number);
+   void
+   resetRefineSchedule(
+      const int level_number);
+
+   /**
+    * Create communication schedule for coarsening data to given level.
+    */
+   void
+   createCoarsenSchedule(
+      const int level_number);
+   void
+   resetCoarsenSchedule(
+      const int level_number);
+
+   /**
+    * Refine data to specified level (or perform interpatch communication
+    * on that level).
+    */
+   void
+   performRefineOperations(
+      const int level_number);
+
+   /**
+    * Coarsen data to specified level.
+    */
+   void
+   performCoarsenOperations(
+      const int level_number);
+
+   /**
+    * After communication operations are performed, check results.
+    *
+    * @returns Whether test passed.
+    */
+   bool
+   verifyCommunicationResults() const;
+
+   /**
+    * Operations needed by mesh::GriddingAlgorithm to construct and
+    * initialize levels in patch hierarchy.  These operations are
+    * pure virtual in GradientDetectorStrategy.
+    */
+
+   void
+   initializeLevelData(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double init_time,
+      const bool can_be_refined,
+      const bool initial_time,
+      const tbox::Pointer<hier::BasePatchLevel> old_level =
+         tbox::Pointer<hier::BasePatchLevel>(NULL),
+      const bool allocate_data = true);
+
+   void
+   resetHierarchyConfiguration(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level);
+   /**
+    * These routines pass off physicial boundary and pre/postprocess
+    * coarsen/refine operations to patch data test object.  They are
+    * pure virtual in RefinePatchStrategy and CoarsenPatchStrategy.
+    */
+   void
+   setPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const double time,
+      const hier::IntVector& gcw);
+
+   hier::IntVector
+   getRefineOpStencilWidth() const;
+
+   void
+   preprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio);
+
+   void
+   postprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio);
+
+   hier::IntVector
+   getCoarsenOpStencilWidth() const;
+
+   void
+   preprocessCoarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio);
+
+   void
+   postprocessCoarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio);
+
+   double getLevelDt(
+      const tbox::Pointer<hier::BasePatchLevel> level,
+      const double dt_time,
+      const bool initial_time)
+   {
+      (void)level;
+      (void)dt_time;
+      (void)initial_time;
+      return 0.0;
+   }
+
+   /*
+    * Construct patch hierarchy and initialize data prior to tests.
+    */
+   void
+   setupHierarchy(
+      tbox::Pointer<tbox::Database> main_input_db,
+      tbox::Pointer<mesh::StandardTagAndInitialize> cell_tagger);
+
+private:
+   const tbox::Dimension d_dim;
+
+   /*
+    * Object name for error reporting.
+    */
+   std::string d_object_name;
+
+   /*
+    * Object supplying operatins for particular patch data test.
+    */
+   PatchDataTestStrategy* d_data_test_strategy;
+
+   /*
+    * Booleans to indicate whether refine or coarsen is operation to test.
+    */
+   bool d_do_refine;
+   bool d_do_coarsen;
+
+   /*
+    * String name for refine option; ; i.e., source of interior patch
+    * data on refined patches.  Options are "INTERIOR_FROM_SAME_LEVEL"
+    * and "INTERIOR_FROM_COARSER_LEVEL".
+    */
+   std::string d_refine_option;
+
+   /*
+    *hier::Patch hierarchy on which tests occur.
+    */
+   tbox::Pointer<hier::PatchHierarchy> d_patch_hierarchy;
+
+   /*
+    * Dummy time stamp for all data operations.
+    */
+   double d_fake_time;
+
+   /*
+    * The CommTester uses two variable contexts for each variable.
+    * The "source", and "destination" contexts indicate the source
+    * and destination patch data for the transfer operation.
+    *
+    * The "refine_scratch" context is used for managing scratch
+    * space during refine operations.
+    */
+   tbox::Pointer<hier::VariableContext> d_source;
+   tbox::Pointer<hier::VariableContext> d_destination;
+   tbox::Pointer<hier::VariableContext> d_refine_scratch;
+
+   tbox::Pointer<hier::VariableContext> d_reset_source;
+   tbox::Pointer<hier::VariableContext> d_reset_destination;
+   tbox::Pointer<hier::VariableContext> d_reset_refine_scratch;
+
+   /*
+    * Component selector for allocation/deallocation of variable data.
+    */
+   hier::ComponentSelector d_patch_data_components;
+
+   /*
+    * Refine/Coarsen algorithm and schedules for testing communication
+    * among levels in the patch hierarchy.
+    */
+
+   xfer::RefineAlgorithm d_fill_source_algorithm;
+   xfer::RefineAlgorithm d_refine_algorithm;
+   xfer::CoarsenAlgorithm d_coarsen_algorithm;
+
+   xfer::RefineAlgorithm d_reset_refine_algorithm;
+   xfer::CoarsenAlgorithm d_reset_coarsen_algorithm;
+
+   bool d_is_reset;
+
+   tbox::Array<tbox::Pointer<xfer::RefineSchedule> > d_fill_source_schedule;
+   tbox::Array<tbox::Pointer<xfer::RefineSchedule> > d_refine_schedule;
+   tbox::Array<tbox::Pointer<xfer::CoarsenSchedule> > d_coarsen_schedule;
+
+};
+
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/EdgeDataTest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/EdgeDataTest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,827 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR communication tests for edge-centered patch data 
+ *
+ ************************************************************************/
+
+#include "EdgeDataTest.h"
+
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "CommTester.h"
+#include "SAMRAI/pdat/EdgeGeometry.h"
+#include "SAMRAI/pdat/EdgeIndex.h"
+#include "SAMRAI/pdat/EdgeIterator.h"
+#include "SAMRAI/pdat/EdgeVariable.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+namespace SAMRAI {
+
+using namespace std;
+
+static double GETVALUE(
+   const int dim,
+   const double a,
+   const double b)
+{
+   return a * ((double)dim) + b;
+}
+
+EdgeDataTest::EdgeDataTest(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> main_input_db,
+   bool do_refine,
+   bool do_coarsen,
+   const string& refine_option):
+   PatchDataTestStrategy(dim),
+   d_dim(dim)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!main_input_db.isNull());
+   TBOX_ASSERT(!refine_option.empty());
+#endif
+
+   d_object_name = object_name;
+
+   d_do_refine = do_refine;
+   d_do_coarsen = false;
+   if (!do_refine) {
+      d_do_coarsen = do_coarsen;
+   }
+
+   d_refine_option = refine_option;
+
+   d_use_fine_value_at_interface.resizeArray(0);
+
+   d_Acoef = 0.0;
+   d_Bcoef = 0.0;
+   d_Ccoef = 0.0;
+   d_Dcoef = 0.0;
+
+   d_finest_level_number = main_input_db->
+      getDatabase("PatchHierarchy")->
+      getInteger("max_levels") - 1;
+
+   d_cart_grid_geometry = new geom::CartesianGridGeometry(
+         dim,
+         "CartesianGridGeometry",
+         main_input_db->getDatabase("CartesianGridGeometry"));
+
+   setGridGeometry(d_cart_grid_geometry);
+
+   readTestInput(main_input_db->getDatabase("EdgePatchDataTest"));
+
+}
+
+EdgeDataTest::~EdgeDataTest()
+{
+}
+
+void EdgeDataTest::readTestInput(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   /*
+    * Read coeeficients of linear profile to test interpolation.
+    */
+   if (db->keyExists("Acoef")) {
+      d_Acoef = db->getDouble("Acoef");
+   } else {
+      TBOX_ERROR(d_object_name << " input error: No `Acoeff' found." << endl);
+   }
+   if (db->keyExists("Dcoef")) {
+      d_Dcoef = db->getDouble("Dcoef");
+   } else {
+      TBOX_ERROR(d_object_name << " input error: No `Dcoef' found." << endl);
+   }
+   if (d_dim > tbox::Dimension(1)) {
+      if (db->keyExists("Bcoef")) {
+         d_Bcoef = db->getDouble("Bcoef");
+      } else {
+         TBOX_ERROR(d_object_name << " input error: No `Bcoef' found." << endl);
+      }
+   }
+   if (d_dim > tbox::Dimension(2)) {
+      if (db->keyExists("Ccoef")) {
+         d_Ccoef = db->getDouble("Ccoef");
+      } else {
+         TBOX_ERROR(d_object_name << " input error: No `Ccoef' found." << endl);
+      }
+   }
+
+   /*
+    * Base class reads variable parameters and boxes to refine.
+    */
+
+   readVariableInput(db->getDatabase("VariableData"));
+   readRefinementInput(db->getDatabase("RefinementData"));
+
+   tbox::Pointer<tbox::Database> var_data = db->getDatabase("VariableData");
+   tbox::Array<string> var_keys = var_data->getAllKeys();
+   int nkeys = var_keys.getSize();
+
+   d_use_fine_value_at_interface.resizeArray(nkeys);
+
+   for (int i = 0; i < nkeys; i++) {
+      tbox::Pointer<tbox::Database> var_db = var_data->getDatabase(var_keys[i]);
+
+      if (var_db->keyExists("use_fine_value_at_interface")) {
+         d_use_fine_value_at_interface[i] =
+            var_db->getBool("use_fine_value_at_interface");
+      } else {
+         d_use_fine_value_at_interface[i] = true;
+      }
+
+   }
+
+}
+
+void EdgeDataTest::registerVariables(
+   CommTester* commtest)
+{
+   TBOX_ASSERT(commtest != (CommTester *)NULL);
+
+   int nvars = d_variable_src_name.getSize();
+
+   d_variables.resizeArray(nvars);
+
+   for (int i = 0; i < nvars; i++) {
+      d_variables[i] =
+         new pdat::EdgeVariable<double>(d_dim, d_variable_src_name[i],
+                                        d_variable_depth[i],
+                                        d_use_fine_value_at_interface[i]);
+
+      if (d_do_refine) {
+         commtest->registerVariable(d_variables[i],
+            d_variables[i],
+            d_variable_src_ghosts[i],
+            d_variable_dst_ghosts[i],
+            d_cart_grid_geometry,
+            d_variable_refine_op[i]);
+      } else if (d_do_coarsen) {
+         commtest->registerVariable(d_variables[i],
+            d_variables[i],
+            d_variable_src_ghosts[i],
+            d_variable_dst_ghosts[i],
+            d_cart_grid_geometry,
+            d_variable_coarsen_op[i]);
+      }
+
+   }
+
+}
+
+void EdgeDataTest::setConstantData(
+   tbox::Pointer<pdat::EdgeData<double> > data,
+   const hier::Box& box,
+   double ndimfact,
+   double axfact) const
+{
+   (void)axfact;
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+
+   if (!box.empty()) {
+
+      for (int axis = 0; axis < d_dim.getValue(); axis++) {
+         pdat::ArrayData<double>& array = data->getArrayData(axis);
+
+         double value = GETVALUE(d_dim.getValue(), ndimfact, axis);
+         hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box, axis);
+         array.fillAll(value, edge_box);
+      }
+   }
+
+}
+
+void EdgeDataTest::setConservativeData(
+   tbox::Pointer<pdat::EdgeData<double> > data,
+   const hier::Box& box,
+   const hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= hierarchy->getFinestLevelNumber()));
+#endif
+
+   int i, j;
+   tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(
+         level_number);
+
+   hier::BoxArray domain = level->getPhysicalDomain();
+   int ncells = 0;
+   for (i = 0; i < domain.getNumberOfBoxes(); i++) {
+      ncells += domain[i].size();
+   }
+
+   const int depth = data->getDepth();
+
+   const hier::Box sbox = data->getGhostBox() * box;
+
+   if (level_number == 0) {
+
+      /*
+       * Set edge value on level zero as follows:
+       *
+       *    u0(i,j,k) = (j + k)/ncells
+       *    u1(i,j,k) = (i + k)/ncells
+       *    u2(i,j,k) = (i + j)/ncells
+       */
+
+      for (int axis = 0; axis < d_dim.getValue(); axis++) {
+         for (pdat::CellIterator ci(sbox); ci; ci++) {
+            double value = 0.0;
+            for (i = 0; i < d_dim.getValue(); i++) {
+               if (i == axis) {
+                  value += (double)(ci() (i));
+               }
+            }
+            value /= ncells;
+            if (d_dim == tbox::Dimension(1)) {
+               for (int edge = 0; edge < 1; edge++) {
+                  pdat::EdgeIndex si(ci(), axis, edge);
+                  for (int d = 0; d < depth; d++) {
+                     (*data)(si, d) = value;
+                  }
+               }
+            }
+            if (d_dim == tbox::Dimension(2)) {
+               for (int edge = pdat::EdgeIndex::Lower;
+                    edge <= pdat::EdgeIndex::Upper;
+                    edge++) {
+                  pdat::EdgeIndex si(ci(), axis, edge);
+                  for (int d = 0; d < depth; d++) {
+                     (*data)(si, d) = value;
+                  }
+               }
+            }
+            if (d_dim == tbox::Dimension(3)) {
+               for (int edge = pdat::EdgeIndex::LowerLeft;
+                    edge <= pdat::EdgeIndex::UpperRight;
+                    edge++) {
+                  pdat::EdgeIndex si(ci(), axis, edge);
+                  for (int d = 0; d < depth; d++) {
+                     (*data)(si, d) = value;
+                  }
+               }
+            }
+         }
+      }
+
+   } else {
+
+      /*
+       * Set edge value on level > 0 to
+       *    u(i,j,k) = u_c + ci*del_i + cj*del_j + ck*del_k
+       * where u_c is value on the underlying coarse edge, (ci,cj,ck) is
+       * the underlying coarse edge index, and (del_i,del_j,del_k)
+       * is the vector between the coarse and fine cell edge centers.
+       */
+
+      hier::IntVector ratio(level->getRatioToLevelZero());
+      const int max_ratio = ratio.max();
+
+      tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+         patch.getPatchGeometry();
+      const double* dx = pgeom->getDx();
+
+      int coarse_ncells = ncells;
+      double* delta = new double[max_ratio * d_dim.getValue()];
+      for (j = 0; j < d_dim.getValue(); j++) {
+         coarse_ncells /= ratio(j);
+         double coarse_dx = dx[j] * ratio(j);
+         for (i = 0; i < ratio(j); i++) {
+            delta[j * max_ratio + i] = (i + 0.5) * dx[j] - coarse_dx * 0.5;
+         }
+      }
+
+      for (int axis = 0; axis < d_dim.getValue(); axis++) {
+         hier::IntVector ci(ratio.getDim());
+         hier::IntVector del(ratio.getDim());
+         for (pdat::CellIterator fi(sbox); fi; fi++) {
+            double value = 0.0;
+            for (i = 0; i < d_dim.getValue(); i++) {
+               if (i == axis) {
+                  int findx = fi() (i);
+                  ci(i) = ((findx < 0) ? (findx + 1) / ratio(i) - 1
+                           : findx / ratio(i));
+                  del(i) = (int)delta[i * max_ratio + findx - ci(i) * ratio(i)];
+                  value += (double)(ci(i));
+               }
+            }
+            value /= coarse_ncells;
+
+            for (j = 0; j < d_dim.getValue(); j++) {
+               if (j == axis) {
+                  value += ci(j) * del(j);
+               }
+            }
+
+            if (d_dim == tbox::Dimension(1)) {
+               for (int edge = 0; edge < 1; edge++) {
+                  pdat::EdgeIndex si(fi(), axis, edge);
+                  for (int d = 0; d < depth; d++) {
+                     (*data)(si, d) = value;
+                  }
+               }
+            }
+            if (d_dim == tbox::Dimension(2)) {
+               for (int edge = pdat::EdgeIndex::Lower;
+                    edge <= pdat::EdgeIndex::Upper;
+                    edge++) {
+                  pdat::EdgeIndex si(fi(), axis, edge);
+                  for (int d = 0; d < depth; d++) {
+                     (*data)(si, d) = value;
+                  }
+               }
+            }
+            if (d_dim == tbox::Dimension(3)) {
+               for (int edge = pdat::EdgeIndex::LowerLeft;
+                    edge <= pdat::EdgeIndex::UpperRight;
+                    edge++) {
+                  pdat::EdgeIndex si(fi(), axis, edge);
+                  for (int d = 0; d < depth; d++) {
+                     (*data)(si, d) = value;
+                  }
+               }
+            }
+
+         }
+      }
+      delete[] delta;
+
+   }
+
+}
+
+void EdgeDataTest::initializeDataOnPatch(
+   const hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number,
+   char src_or_dst)
+{
+   (void)src_or_dst;
+
+   d_hierarchy = hierarchy;
+
+   if (d_do_refine) {
+
+      for (int i = 0; i < d_variables.getSize(); i++) {
+
+         tbox::Pointer<pdat::EdgeData<double> > edge_data =
+            patch.getPatchData(d_variables[i], getDataContext());
+
+         hier::Box dbox = edge_data->getBox();
+
+         setLinearData(edge_data, dbox,
+            patch);
+      }
+
+   } else if (d_do_coarsen) {
+
+      for (int i = 0; i < d_variables.getSize(); i++) {
+
+         tbox::Pointer<pdat::EdgeData<double> > edge_data =
+            patch.getPatchData(d_variables[i], getDataContext());
+
+         hier::Box dbox = edge_data->getGhostBox();
+
+         setConservativeData(edge_data, dbox,
+            patch, hierarchy, level_number);
+
+      }
+
+   }
+
+}
+
+void EdgeDataTest::setConstantBoundaryData(
+   tbox::Pointer<pdat::EdgeData<double> > data,
+   const hier::BoundaryBox& bbox,
+   double ndimfact,
+   double axfact) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   int lid = bbox.getLocationIndex();
+   const hier::IntVector& gcw(data->getGhostCellWidth());
+   hier::Box fillbox = bbox.getBox();
+
+   if (bbox.getBoundaryType() == d_dim.getValue()) {
+
+      for (int axis = 0; axis < d_dim.getValue(); axis++) {
+         if (axis == 0) {
+            if (lid % 2) {
+               fillbox.growLower(axis,
+                  tbox::MathUtilities<int>::Max(gcw(axis) - 1, 0));
+            } else {
+               fillbox.growUpper(axis,
+                  tbox::MathUtilities<int>::Max(gcw(axis) - 1, 0));
+            }
+         }
+         if (axis == 1) {
+            if ((lid == 0) || (lid == 1) || (lid == 4) || (lid == 5)) {
+               fillbox.growLower(axis,
+                  tbox::MathUtilities<int>::Max(gcw(axis) - 1, 0));
+            } else {
+               fillbox.growUpper(axis,
+                  tbox::MathUtilities<int>::Max(gcw(axis) - 1, 0));
+            }
+         }
+         if (axis == 2) {
+            if (lid < 4) {
+               fillbox.growLower(axis,
+                  tbox::MathUtilities<int>::Max(gcw(axis) - 1, 0));
+            } else {
+               fillbox.growUpper(axis,
+                  tbox::MathUtilities<int>::Max(gcw(axis) - 1, 0));
+            }
+         }
+      }
+
+   } else if (bbox.getBoundaryType() == 1) {
+      for (int axis = 0; axis < d_dim.getValue(); axis++) {
+         if (lid == 2 * axis) {
+            fillbox.growLower(axis,
+               tbox::MathUtilities<int>::Max(gcw(axis) - 1, 0));
+         } else if (lid == 2 * axis + 1) {
+            fillbox.growUpper(axis,
+               tbox::MathUtilities<int>::Max(gcw(axis) - 1, 0));
+         }
+      }
+   } else if (bbox.getBoundaryType() == 2) {
+      switch (lid) {
+         case 0: {
+            fillbox.growLower(1, tbox::MathUtilities<int>::Max(gcw(1) - 1, 0));
+            fillbox.growLower(2, tbox::MathUtilities<int>::Max(gcw(2) - 1, 0));
+            break;
+         }
+         case 1: {
+            fillbox.growUpper(1, tbox::MathUtilities<int>::Max(gcw(1) - 1, 0));
+            fillbox.growLower(2, tbox::MathUtilities<int>::Max(gcw(2) - 1, 0));
+            break;
+         }
+         case 2: {
+            fillbox.growLower(1, tbox::MathUtilities<int>::Max(gcw(1) - 1, 0));
+            fillbox.growUpper(2, tbox::MathUtilities<int>::Max(gcw(2) - 1, 0));
+            break;
+         }
+         case 3: {
+            fillbox.growUpper(1, tbox::MathUtilities<int>::Max(gcw(1) - 1, 0));
+            fillbox.growUpper(2, tbox::MathUtilities<int>::Max(gcw(2) - 1, 0));
+            break;
+         }
+         case 4: {
+            fillbox.growLower(0, tbox::MathUtilities<int>::Max(gcw(0) - 1, 0));
+            fillbox.growLower(2, tbox::MathUtilities<int>::Max(gcw(2) - 1, 0));
+            break;
+         }
+         case 5: {
+            fillbox.growLower(0, tbox::MathUtilities<int>::Max(gcw(0) - 1, 0));
+            fillbox.growUpper(2, tbox::MathUtilities<int>::Max(gcw(2) - 1, 0));
+            break;
+         }
+         case 6: {
+            fillbox.growUpper(0, tbox::MathUtilities<int>::Max(gcw(0) - 1, 0));
+            fillbox.growLower(2, tbox::MathUtilities<int>::Max(gcw(2) - 1, 0));
+            break;
+         }
+         case 7: {
+            fillbox.growUpper(0, tbox::MathUtilities<int>::Max(gcw(0) - 1, 0));
+            fillbox.growUpper(2, tbox::MathUtilities<int>::Max(gcw(2) - 1, 0));
+            break;
+         }
+         case 8: {
+            fillbox.growLower(0, tbox::MathUtilities<int>::Max(gcw(0) - 1, 0));
+            fillbox.growLower(1, tbox::MathUtilities<int>::Max(gcw(1) - 1, 0));
+            break;
+         }
+         case 9: {
+            fillbox.growUpper(0, tbox::MathUtilities<int>::Max(gcw(0) - 1, 0));
+            fillbox.growLower(1, tbox::MathUtilities<int>::Max(gcw(1) - 1, 0));
+            break;
+         }
+         case 10: {
+            fillbox.growLower(0, tbox::MathUtilities<int>::Max(gcw(0) - 1, 0));
+            fillbox.growUpper(1, tbox::MathUtilities<int>::Max(gcw(1) - 1, 0));
+            break;
+         }
+         case 11: {
+            fillbox.growUpper(0, tbox::MathUtilities<int>::Max(gcw(0) - 1, 0));
+            fillbox.growUpper(1, tbox::MathUtilities<int>::Max(gcw(1) - 1, 0));
+            break;
+         }
+      }
+   }
+
+   for (int id = 0; id < d_dim.getValue(); id++) {
+      double value = GETVALUE(d_dim.getValue(), ndimfact, axfact);
+      data->getArrayData(id).fillAll(value,
+         pdat::EdgeGeometry::toEdgeBox(fillbox, id));
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Verify results of communication operations.  This test must be        *
+ * consistent with data initialization and boundary operations above.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool EdgeDataTest::verifyResults(
+   const hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number)
+{
+   (void)hierarchy;
+   bool test_failed = false;
+   if (d_dim <= tbox::Dimension(1)) {
+      return !test_failed;
+   }
+   if (d_do_refine || d_do_coarsen) {
+
+      tbox::plog << "\nEntering EdgeDataTest::verifyResults..." << endl;
+      tbox::plog << "level_number = " << level_number << endl;
+      tbox::plog << "Patch box = " << patch.getBox() << endl;
+
+      hier::IntVector tgcw(d_dim, 0);
+      for (int i = 0; i < d_variables.getSize(); i++) {
+         tgcw.max(patch.getPatchData(d_variables[i], getDataContext())->
+            getGhostCellWidth());
+      }
+      hier::Box pbox = patch.getBox();
+
+      tbox::Pointer<pdat::EdgeData<double> > solution(
+         new pdat::EdgeData<double>(pbox, 1, tgcw));
+
+      hier::Box tbox(pbox);
+      tbox.grow(tgcw);
+
+      if (d_do_coarsen) {
+         setConservativeData(solution, tbox,
+            patch, hierarchy, level_number);
+      }
+
+      for (int i = 0; i < d_variables.getSize(); i++) {
+
+         tbox::Pointer<pdat::EdgeData<double> > edge_data =
+            patch.getPatchData(d_variables[i], getDataContext());
+         int depth = edge_data->getDepth();
+         hier::Box dbox = edge_data->getGhostBox();
+
+         if (d_do_refine) {
+
+            setLinearData(solution, tbox, patch);
+         }
+
+         for (int id = 0; id < d_dim.getValue(); id++) {
+            for (pdat::EdgeIterator si(dbox, id); si; si++) {
+               double correct = (*solution)(si());
+               for (int d = 0; d < depth; d++) {
+                  double result = (*edge_data)(si(), d);
+                  if (!tbox::MathUtilities<double>::equalEps(correct,
+                         result)) {
+                     test_failed = true;
+                     tbox::perr << "Test FAILED: ...."
+                                << " : edge_data index = " << si() << endl;
+                     tbox::perr << "    hier::Variable = "
+                     << d_variable_src_name[i]
+                     << " : depth index = " << d << endl;
+                     tbox::perr << "    result = " << result
+                                << " : correct = " << correct << endl;
+                  }
+               }
+            }
+         }
+
+      }
+
+      solution.setNull();   // just to be anal...
+
+      tbox::plog << "\nExiting EdgeDataTest::verifyResults..." << endl;
+      tbox::plog << "level_number = " << level_number << endl;
+      tbox::plog << "Patch box = " << patch.getBox() << endl << endl;
+
+   }
+
+   return !test_failed;
+}
+
+void EdgeDataTest::setLinearData(
+   tbox::Pointer<pdat::EdgeData<double> > data,
+   const hier::Box& box,
+   const hier::Patch& patch) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+
+   tbox::Pointer<geom::CartesianPatchGeometry> pgeom = patch.getPatchGeometry();
+   const double* dx = pgeom->getDx();
+   const double* lowerx = pgeom->getXLower();
+   double x, y, z;
+
+   const int depth = data->getDepth();
+
+   const hier::Box sbox = data->getGhostBox() * box;
+
+   for (int axis = 0; axis < d_dim.getValue(); axis++) {
+      const pdat::EdgeIndex loweri(patch.getBox().lower(), axis, 0);
+      for (pdat::EdgeIterator ei(sbox, axis); ei; ei++) {
+
+         /*
+          * Compute spatial location of cell center and
+          * set data to linear profile.
+          */
+
+         if (axis != 0) {
+            x = lowerx[0] + dx[0] * (ei() (0) - loweri(0));
+         } else {
+            x = lowerx[0] + dx[0] * (ei() (0) - loweri(0) + 0.5);
+         }
+         y = z = 0.;
+         if (d_dim > tbox::Dimension(1)) {
+            if (axis != 1) {
+               y = lowerx[1] + dx[1] * (ei() (1) - loweri(1));
+            } else {
+               y = lowerx[1] + dx[1] * (ei() (1) - loweri(1) + 0.5);
+            }
+         }
+         if (d_dim > tbox::Dimension(2)) {
+            if (axis != 2) {
+               z = lowerx[2] + dx[2] * (ei() (2) - loweri(2));
+            } else {
+               z = lowerx[2] + dx[2] * (ei() (2) - loweri(2) + 0.5);
+            }
+         }
+
+         for (int d = 0; d < depth; d++) {
+            (*data)(ei(),
+                    d) = d_Dcoef + d_Acoef * x + d_Bcoef * y + d_Ccoef * z;
+         }
+
+      }
+   }
+
+}
+
+void EdgeDataTest::checkPatchInteriorData(
+   const tbox::Pointer<pdat::EdgeData<double> >& data,
+   const hier::Box& interior,
+   const tbox::Pointer<geom::CartesianPatchGeometry>& pgeom) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+
+   const double* dx = pgeom->getDx();
+   const double* lowerx = pgeom->getXLower();
+   double x, y, z;
+
+   const int depth = data->getDepth();
+
+   for (int axis = 0; axis < d_dim.getValue(); axis++) {
+      const pdat::EdgeIndex loweri(interior.lower(), axis, 0);
+      for (pdat::EdgeIterator ei(interior, axis); ei; ei++) {
+
+         /*
+          * Compute spatial location of cell center and
+          * set data to linear profile.
+          */
+
+         if (axis != 0) {
+            x = lowerx[0] + dx[0] * (ei() (0) - loweri(0));
+         } else {
+            x = lowerx[0] + dx[0] * (ei() (0) - loweri(0) + 0.5);
+         }
+         y = z = 0.;
+         if (d_dim > tbox::Dimension(1)) {
+            if (axis != 1) {
+               y = lowerx[1] + dx[1] * (ei() (1) - loweri(1));
+            } else {
+               y = lowerx[1] + dx[1] * (ei() (1) - loweri(1) + 0.5);
+            }
+         }
+         if (d_dim > tbox::Dimension(2)) {
+            if (axis != 2) {
+               z = lowerx[2] + dx[2] * (ei() (2) - loweri(2));
+            } else {
+               z = lowerx[2] + dx[2] * (ei() (2) - loweri(2) + 0.5);
+            }
+         }
+
+         double value;
+         for (int d = 0; d < depth; d++) {
+            value = d_Dcoef + d_Acoef * x + d_Bcoef * y + d_Ccoef * z;
+            if (!(tbox::MathUtilities<double>::equalEps((*data)(ei(),
+                                                                d), value))) {
+               tbox::perr
+               << "FAILED:  -- patch interior not properly filled" << endl;
+            }
+         }
+
+      }
+   }
+
+}
+
+void EdgeDataTest::setPhysicalBoundaryConditions(
+   const hier::Patch& patch,
+   const double time,
+   const hier::IntVector& gcw) const
+{
+   (void)time;
+
+   tbox::Pointer<geom::CartesianPatchGeometry> pgeom = patch.getPatchGeometry();
+
+   const tbox::Array<hier::BoundaryBox> node_bdry =
+      pgeom->getCodimensionBoundaries(d_dim.getValue());
+   const int num_node_bdry_boxes = node_bdry.getSize();
+
+   tbox::Array<hier::BoundaryBox> edge_bdry;
+   if (d_dim > tbox::Dimension(1)) {
+      edge_bdry = pgeom->getCodimensionBoundaries(d_dim.getValue() - 1);
+   }
+   const int num_edge_bdry_boxes = d_dim > tbox::Dimension(1) ? edge_bdry.getSize() : -1;
+
+   tbox::Array<hier::BoundaryBox> face_bdry;
+   if (d_dim == tbox::Dimension(3)) {
+      face_bdry = pgeom->getCodimensionBoundaries(d_dim.getValue() - 2);
+   }
+   const int num_face_bdry_boxes = d_dim == tbox::Dimension(3) ? face_bdry.getSize() : -1;
+
+   for (int i = 0; i < d_variables.getSize(); i++) {
+
+      tbox::Pointer<pdat::EdgeData<double> > edge_data =
+         patch.getPatchData(d_variables[i], getDataContext());
+
+      hier::Box patch_interior = edge_data->getBox();
+      checkPatchInteriorData(edge_data, patch_interior, pgeom);
+
+      /*
+       * Set node boundary data.
+       */
+      for (int ni = 0; ni < num_node_bdry_boxes; ni++) {
+         hier::Box fill_box = pgeom->getBoundaryFillBox(node_bdry[ni],
+               patch.getBox(),
+               gcw);
+
+         setLinearData(edge_data, fill_box, patch);
+      }
+
+      if (d_dim > tbox::Dimension(1)) {
+         /*
+          * Set edge boundary data.
+          */
+         for (int ei = 0; ei < num_edge_bdry_boxes; ei++) {
+            hier::Box fill_box = pgeom->getBoundaryFillBox(edge_bdry[ei],
+                  patch.getBox(),
+                  gcw);
+
+            setLinearData(edge_data, fill_box, patch);
+         }
+      }
+
+      if (d_dim == tbox::Dimension(3)) {
+         /*
+          * Set face boundary data.
+          */
+         for (int fi = 0; fi < num_face_bdry_boxes; fi++) {
+            hier::Box fill_box = pgeom->getBoundaryFillBox(face_bdry[fi],
+                  patch.getBox(),
+                  gcw);
+
+            setLinearData(edge_data, fill_box, patch);
+         }
+      }
+
+   }
+
+}
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/EdgeDataTest.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/EdgeDataTest.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,215 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR communication tests for edge-centered patch data 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_EdgeDataTest
+#define included_pdat_EdgeDataTest
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "PatchDataTestStrategy.h"
+#include "SAMRAI/tbox/Pointer.h"
+#ifndef included_String
+#include <string>
+using namespace std;
+#define included_String
+#endif
+#include "SAMRAI/hier/Variable.h"
+
+namespace SAMRAI {
+
+class CommTester;
+
+/**
+ * Class EdgeDataTest provides routines to test communication operations
+ * for edge-centered patch data on an AMR patch hierarchy.
+ *
+ * Required input keys and data types for test:
+ *
+ *   NONE...
+ *
+ * See PatchDataTestStrategy header file comments for variable and
+ * refinement input data description.  Additionally, there are two
+ * optional input parameters for each edge variable.  These are:
+ *
+ *
+ *
+ *
+ *
+ *    - \b  use_fine_value_at_interface   which values to use at coarse-
+ *                                          fine interface (default = TRUE)
+ *
+ *
+ *
+ *
+ *
+ */
+
+class EdgeDataTest:public PatchDataTestStrategy
+{
+public:
+   /**
+    * The constructor initializes variable data arrays to zero length.
+    */
+   EdgeDataTest(
+      const std::string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> main_input_db,
+      bool do_refine,
+      bool do_coarsen,
+      const std::string& refine_option);
+
+   /**
+    * Virtual destructor for EdgeDataTest.
+    */
+   ~EdgeDataTest();
+
+   /**
+    * User-supplied boundary conditions.  Note that we do not implement
+    * user-defined coarsen and refine operations.
+    */
+   virtual void
+   setPhysicalBoundaryConditions(
+      const hier::Patch& patch,
+      const double time,
+      const hier::IntVector& gcw) const;
+
+   /**
+    * This function is called from the CommTester constructor.  Its
+    * purpose is to register variables used in the patch data test
+    * and appropriate communication parameters (ghost cell widths,
+    * coarsen/refine operations) with the CommTester object, which
+    * manages the variable storage.
+    */
+   void
+   registerVariables(
+      CommTester* commtest);
+
+   /**
+    * Function for setting data on new patch in hierarchy.
+    *
+    * @param src_or_dst Flag set to 's' for source or 'd' for destination
+    *        to indicate variables to set data for.
+    */
+   virtual void
+   initializeDataOnPatch(
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number,
+      char src_or_dst);
+
+   /**
+    * Function for checking results of communication operations.
+    */
+   bool
+   verifyResults(
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number);
+
+private:
+   /*
+    * Function for reading test data from input file.
+    */
+   void
+   readTestInput(
+      tbox::Pointer<tbox::Database> db);
+
+   /*
+    * Set constant function data for testing interpolation.
+    * Note the data is piecewise constant, where constant
+    * depends on axis and dim.  That is, data is set to
+    * data_i = ndimfact*dim + axfact*i, where i is
+    * axis index.
+    */
+   void
+   setConstantData(
+      tbox::Pointer<pdat::EdgeData<double> > data,
+      const hier::Box& box,
+      double ndimfact,
+      double axfact) const;
+
+   /*
+    * Set values for edges along physical boundaries; needed for zero
+    * ghost cell case.
+    */
+   void
+   setConstantBoundaryData(
+      tbox::Pointer<pdat::EdgeData<double> > data,
+      const hier::BoundaryBox& bbox,
+      double ndimfact,
+      double axfact) const;
+
+   /*
+    * Set conservative linear function data for testing coarsening
+    */
+   void
+   setConservativeData(
+      tbox::Pointer<pdat::EdgeData<double> > data,
+      const hier::Box& box,
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number) const;
+
+   void
+   setLinearData(
+      tbox::Pointer<pdat::EdgeData<double> > data,
+      const hier::Box& box,
+      const hier::Patch& patch) const;
+
+   void
+   checkPatchInteriorData(
+      const tbox::Pointer<pdat::EdgeData<double> >& data,
+      const hier::Box& interior,
+      const tbox::Pointer<geom::CartesianPatchGeometry>& pgeom) const;
+
+   const tbox::Dimension d_dim;
+
+   /*
+    * Object std::string identifier for error reporting
+    */
+   std::string d_object_name;
+
+   /*
+    * Data members specific to this edge data test.
+    */
+   tbox::Pointer<geom::CartesianGridGeometry> d_cart_grid_geometry;
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+
+   /*
+    * Data members specific to this edge data test.
+    */
+   tbox::Array<bool> d_use_fine_value_at_interface;
+
+   double d_Acoef;
+   double d_Bcoef;
+   double d_Ccoef;
+   double d_Dcoef;
+
+   bool d_do_refine;
+   bool d_do_coarsen;
+   std::string d_refine_option;
+   int d_finest_level_number;
+
+   tbox::Array<tbox::Pointer<hier::Variable> > d_variables;
+
+};
+
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/FaceDataTest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/FaceDataTest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,628 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR communication tests for face-centered patch data 
+ *
+ ************************************************************************/
+
+#include "FaceDataTest.h"
+
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "CommTester.h"
+#include "SAMRAI/pdat/FaceGeometry.h"
+#include "SAMRAI/pdat/FaceIndex.h"
+#include "SAMRAI/pdat/FaceIterator.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+namespace SAMRAI {
+
+using namespace std;
+
+FaceDataTest::FaceDataTest(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> main_input_db,
+   bool do_refine,
+   bool do_coarsen,
+   const string& refine_option):
+   PatchDataTestStrategy(dim),
+   d_dim(dim)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!main_input_db.isNull());
+   TBOX_ASSERT(!refine_option.empty());
+#endif
+
+   d_object_name = object_name;
+
+   d_do_refine = do_refine;
+   d_do_coarsen = false;
+   if (!do_refine) {
+      d_do_coarsen = do_coarsen;
+   }
+
+   d_refine_option = refine_option;
+
+   d_use_fine_value_at_interface.resizeArray(0);
+
+   d_Acoef = 0.0;
+   d_Bcoef = 0.0;
+   d_Ccoef = 0.0;
+   d_Dcoef = 0.0;
+
+   d_finest_level_number = main_input_db->
+      getDatabase("PatchHierarchy")->
+      getInteger("max_levels") - 1;
+
+   d_cart_grid_geometry = new geom::CartesianGridGeometry(
+         dim,
+         "CartesianGridGeometry",
+         main_input_db->getDatabase("CartesianGridGeometry"));
+
+   setGridGeometry(d_cart_grid_geometry);
+
+   readTestInput(main_input_db->getDatabase("FacePatchDataTest"));
+
+}
+
+FaceDataTest::~FaceDataTest()
+{
+}
+
+void FaceDataTest::readTestInput(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   /*
+    * Base class reads variable parameters and boxes to refine.
+    */
+
+   readVariableInput(db->getDatabase("VariableData"));
+   readRefinementInput(db->getDatabase("RefinementData"));
+
+   tbox::Pointer<tbox::Database> var_data = db->getDatabase("VariableData");
+   tbox::Array<string> var_keys = var_data->getAllKeys();
+   int nkeys = var_keys.getSize();
+
+   d_use_fine_value_at_interface.resizeArray(nkeys);
+
+   for (int i = 0; i < nkeys; i++) {
+      tbox::Pointer<tbox::Database> var_db = var_data->getDatabase(var_keys[i]);
+
+      if (var_db->keyExists("use_fine_value_at_interface")) {
+         d_use_fine_value_at_interface[i] =
+            var_db->getBool("use_fine_value_at_interface");
+      } else {
+         d_use_fine_value_at_interface[i] = true;
+      }
+
+   }
+
+   if (db->keyExists("Acoef")) {
+      d_Acoef = db->getDouble("Acoef");
+   } else {
+      TBOX_ERROR(d_object_name << " input error: No `Acoeff' found." << endl);
+   }
+   if (db->keyExists("Dcoef")) {
+      d_Dcoef = db->getDouble("Dcoef");
+   } else {
+      TBOX_ERROR(d_object_name << " input error: No `Dcoef' found." << endl);
+   }
+   if (d_dim > tbox::Dimension(1)) {
+      if (db->keyExists("Bcoef")) {
+         d_Bcoef = db->getDouble("Bcoef");
+      } else {
+         TBOX_ERROR(d_object_name << " input error: No `Bcoef' found." << endl);
+      }
+   }
+   if (d_dim > tbox::Dimension(2)) {
+      if (db->keyExists("Ccoef")) {
+         d_Ccoef = db->getDouble("Ccoef");
+      } else {
+         TBOX_ERROR(d_object_name << " input error: No `Ccoef' found." << endl);
+      }
+   }
+
+}
+
+void FaceDataTest::registerVariables(
+   CommTester* commtest)
+{
+   TBOX_ASSERT(commtest != (CommTester *)NULL);
+
+   int nvars = d_variable_src_name.getSize();
+
+   d_variables.resizeArray(nvars);
+
+   for (int i = 0; i < nvars; i++) {
+      d_variables[i] =
+         new pdat::FaceVariable<double>(d_dim,
+                                        d_variable_src_name[i],
+                                        d_variable_depth[i],
+                                        d_use_fine_value_at_interface[i]);
+
+      if (d_do_refine) {
+         commtest->registerVariable(d_variables[i],
+            d_variables[i],
+            d_variable_src_ghosts[i],
+            d_variable_dst_ghosts[i],
+            d_cart_grid_geometry,
+            d_variable_refine_op[i]);
+      } else if (d_do_coarsen) {
+         commtest->registerVariable(d_variables[i],
+            d_variables[i],
+            d_variable_src_ghosts[i],
+            d_variable_dst_ghosts[i],
+            d_cart_grid_geometry,
+            d_variable_coarsen_op[i]);
+      }
+
+   }
+
+}
+
+void FaceDataTest::setConservativeData(
+   tbox::Pointer<pdat::FaceData<double> > data,
+   const hier::Box& box,
+   const hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= hierarchy->getFinestLevelNumber()));
+#endif
+
+   int i, j;
+   tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(
+         level_number);
+
+   hier::BoxArray domain = level->getPhysicalDomain();
+   int ncells = 0;
+   for (i = 0; i < domain.getNumberOfBoxes(); i++) {
+      ncells += domain[i].size();
+   }
+
+   const int depth = data->getDepth();
+
+   const hier::Box sbox = data->getGhostBox() * box;
+
+   if (level_number == 0) {
+
+      /*
+       * Set face value on level zero as follows:
+       *
+       *    u0(i,j,k) = (j + k)/ncells
+       *    u1(i,j,k) = (i + k)/ncells
+       *    u2(i,j,k) = (i + j)/ncells
+       */
+
+      for (int axis = 0; axis < d_dim.getValue(); axis++) {
+         for (pdat::CellIterator ci(sbox); ci; ci++) {
+            double value = 0.0;
+            for (i = 0; i < d_dim.getValue(); i++) {
+               if (i != axis) {
+                  value += (double)(ci() (i));
+               }
+            }
+            value /= ncells;
+            for (int face = pdat::FaceIndex::Lower;
+                 face <= pdat::FaceIndex::Upper; face++) {
+               pdat::FaceIndex si(ci(), axis, face);
+               for (int d = 0; d < depth; d++) {
+                  (*data)(si, d) = value;
+               }
+            }
+         }
+      }
+
+   } else {
+
+      /*
+       * Set face value on level > 0 to
+       *    u(i,j,k) = u_c + ci*del_i + cj*del_j + ck*del_k
+       * where u_c is value on the underlying coarse face, (ci,cj,ck) is
+       * the underlying coarse face index, and (del_i,del_j,del_k)
+       * is the vector between the coarse and fine cell face centers.
+       */
+
+      hier::IntVector ratio(level->getRatioToLevelZero());
+      const int max_ratio = ratio.max();
+
+      tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+         patch.getPatchGeometry();
+      const double* dx = pgeom->getDx();
+
+      int coarse_ncells = ncells;
+      double* delta = new double[max_ratio * d_dim.getValue()];
+      for (j = 0; j < d_dim.getValue(); j++) {
+         coarse_ncells /= ratio(j);
+         double coarse_dx = dx[j] * ratio(j);
+         for (i = 0; i < ratio(j); i++) {
+            delta[j * max_ratio + i] = (i + 0.5) * dx[j] - coarse_dx * 0.5;
+         }
+      }
+
+      for (int axis = 0; axis < d_dim.getValue(); axis++) {
+         hier::IntVector ci(ratio.getDim());
+         hier::IntVector del(ratio.getDim());
+         for (pdat::CellIterator fi(sbox); fi; fi++) {
+            double value = 0.0;
+            for (i = 0; i < d_dim.getValue(); i++) {
+               if (i != axis) {
+                  int findx = fi() (i);
+                  ci(i) = ((findx < 0) ? (findx + 1) / ratio(i) - 1
+                           : findx / ratio(i));
+                  del(i) = (int)delta[i * max_ratio + findx - ci(i) * ratio(i)];
+                  value += (double)(ci(i));
+               }
+            }
+            value /= coarse_ncells;
+
+            for (j = 0; j < d_dim.getValue(); j++) {
+               if (j != axis) {
+                  value += ci(j) * del(j);
+               }
+            }
+
+            for (int face = pdat::FaceIndex::Lower;
+                 face <= pdat::FaceIndex::Upper; face++) {
+               pdat::FaceIndex si(fi(), axis, face);
+               for (int d = 0; d < depth; d++) {
+                  (*data)(si, d) = value;
+               }
+            }
+         }
+      }
+      delete[] delta;
+
+   }
+
+}
+
+void FaceDataTest::initializeDataOnPatch(
+   const hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number,
+   char src_or_dst)
+{
+   (void)hierarchy;
+   (void)src_or_dst;
+
+   if (d_do_refine) {
+
+      for (int i = 0; i < d_variables.getSize(); i++) {
+
+         tbox::Pointer<pdat::FaceData<double> > face_data =
+            patch.getPatchData(d_variables[i], getDataContext());
+
+         hier::Box dbox = face_data->getBox();
+
+         setLinearData(face_data, dbox, patch);
+      }
+
+   } else if (d_do_coarsen) {
+
+      for (int i = 0; i < d_variables.getSize(); i++) {
+
+         tbox::Pointer<pdat::FaceData<double> > face_data =
+            patch.getPatchData(d_variables[i], getDataContext());
+
+         hier::Box dbox = face_data->getGhostBox();
+
+         setConservativeData(face_data, dbox,
+            patch, hierarchy, level_number);
+
+      }
+
+   }
+
+}
+
+void FaceDataTest::checkPatchInteriorData(
+   const tbox::Pointer<pdat::FaceData<double> >& data,
+   const hier::Box& interior,
+   const tbox::Pointer<geom::CartesianPatchGeometry>& pgeom) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+
+   const double* dx = pgeom->getDx();
+   const double* lowerx = pgeom->getXLower();
+   double x = 0., y = 0., z = 0.;
+
+   const int depth = data->getDepth();
+
+   for (int axis = 0; axis < d_dim.getValue(); axis++) {
+      const pdat::FaceIndex loweri(interior.lower(), axis, 0);
+      for (pdat::FaceIterator fi(interior, axis); fi; fi++) {
+
+         /*
+          * Compute spatial location of face and
+          * set data to linear profile.
+          */
+
+         if (axis == 0) {
+            x = lowerx[0] + dx[0] * (fi() (0) - loweri(0));
+            if (d_dim > tbox::Dimension(1)) {
+               y = lowerx[1] + dx[1] * (fi() (1) - loweri(1) + 0.5);
+            }
+            if (d_dim > tbox::Dimension(2)) {
+               z = lowerx[2] + dx[2] * (fi() (2) - loweri(2) + 0.5);
+            }
+         } else if (axis == 1) {
+            x = lowerx[0] + dx[0]
+               * (fi() (d_dim.getValue() - 1) - loweri(d_dim.getValue() - 1) + 0.5);
+            if (d_dim > tbox::Dimension(1)) {
+               y = lowerx[1] + dx[1] * (fi() (0) - loweri(0));
+            }
+            if (d_dim > tbox::Dimension(2)) {
+               z = lowerx[2] + dx[2] * (fi() (1) - loweri(1) + 0.5);
+            }
+         } else if (axis == 2) {
+            x = lowerx[0] + dx[0] * (fi() (1) - loweri(1) + 0.5);
+            if (d_dim > tbox::Dimension(1)) {
+               y = lowerx[1] + dx[1] * (fi() (2) - loweri(2) + 0.5);
+            }
+            if (d_dim > tbox::Dimension(2)) {
+               z = lowerx[2] + dx[2] * (fi() (0) - loweri(0));
+            }
+         }
+
+         double value;
+         for (int d = 0; d < depth; d++) {
+            value = d_Dcoef + d_Acoef * x + d_Bcoef * y + d_Ccoef * z;
+            if (!(tbox::MathUtilities<double>::equalEps((*data)(fi(),
+                                                                d), value))) {
+               tbox::perr << "FAILED: -- patch interior not properly filled"
+                          << endl;
+            }
+         }
+      }
+   }
+}
+
+void FaceDataTest::setPhysicalBoundaryConditions(
+   const hier::Patch& patch,
+   const double time,
+   const hier::IntVector& gcw) const
+{
+   (void)time;
+
+   tbox::Pointer<geom::CartesianPatchGeometry> pgeom = patch.getPatchGeometry();
+
+   const tbox::Array<hier::BoundaryBox> node_bdry =
+      pgeom->getCodimensionBoundaries(d_dim.getValue());
+   const int num_node_bdry_boxes = node_bdry.getSize();
+
+   tbox::Array<hier::BoundaryBox> edge_bdry;
+   if (d_dim > tbox::Dimension(1)) {
+      edge_bdry = pgeom->getCodimensionBoundaries(d_dim.getValue() - 1);
+   }
+   const int num_edge_bdry_boxes = d_dim.getValue() > 1 ? edge_bdry.getSize() : -1;
+
+   tbox::Array<hier::BoundaryBox> face_bdry;
+   if (d_dim == tbox::Dimension(3)) {
+      face_bdry = pgeom->getCodimensionBoundaries(d_dim.getValue() - 2);
+   }
+   const int num_face_bdry_boxes = d_dim == tbox::Dimension(3) ? face_bdry.getSize() : -1;
+
+   for (int i = 0; i < d_variables.getSize(); i++) {
+
+      tbox::Pointer<pdat::FaceData<double> > face_data =
+         patch.getPatchData(d_variables[i], getDataContext());
+
+      hier::Box patch_interior = face_data->getBox();
+      checkPatchInteriorData(face_data, patch_interior, pgeom);
+
+      /*
+       * Set node boundary data.
+       */
+      for (int ni = 0; ni < num_node_bdry_boxes; ni++) {
+
+         hier::Box fill_box = pgeom->getBoundaryFillBox(node_bdry[ni],
+               patch.getBox(),
+               gcw);
+
+         setLinearData(face_data, fill_box, patch);
+      }
+
+      if (d_dim > tbox::Dimension(1)) {
+         /*
+          * Set edge boundary data.
+          */
+         for (int ei = 0; ei < num_edge_bdry_boxes; ei++) {
+
+            hier::Box fill_box = pgeom->getBoundaryFillBox(edge_bdry[ei],
+                  patch.getBox(),
+                  gcw);
+
+            setLinearData(face_data, fill_box, patch);
+         }
+      }
+
+      if (d_dim > tbox::Dimension(2)) {
+         /*
+          * Set face boundary data.
+          */
+         for (int fi = 0; fi < num_face_bdry_boxes; fi++) {
+
+            hier::Box fill_box = pgeom->getBoundaryFillBox(face_bdry[fi],
+                  patch.getBox(),
+                  gcw);
+
+            setLinearData(face_data, fill_box, patch);
+         }
+      }
+
+   }
+
+}
+
+void FaceDataTest::setLinearData(
+   tbox::Pointer<pdat::FaceData<double> > data,
+   const hier::Box& box,
+   const hier::Patch& patch) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+
+   tbox::Pointer<geom::CartesianPatchGeometry> pgeom = patch.getPatchGeometry();
+   const double* dx = pgeom->getDx();
+   const double* lowerx = pgeom->getXLower();
+   double x = 0., y = 0., z = 0.;
+
+   const int depth = data->getDepth();
+
+   const hier::Box sbox = data->getGhostBox() * box;
+
+   for (int axis = 0; axis < d_dim.getValue(); axis++) {
+      const pdat::FaceIndex loweri(patch.getBox().lower(), axis, 0);
+      for (pdat::FaceIterator fi(sbox, axis); fi; fi++) {
+
+         /*
+          * Compute spatial location of cell center and
+          * set data to linear profile.
+          */
+
+         if (axis == 0) {
+            x = lowerx[0] + dx[0] * (fi() (0) - loweri(0));
+            if (d_dim > tbox::Dimension(1)) {
+               y = lowerx[1] + dx[1] * (fi() (1) - loweri(1) + 0.5);
+            }
+            if (d_dim > tbox::Dimension(2)) {
+               z = lowerx[2] + dx[2] * (fi() (2) - loweri(2) + 0.5);
+            }
+         } else if (axis == 1) {
+            x = lowerx[0] + dx[0]
+               * (fi() (d_dim.getValue() - 1) - loweri(d_dim.getValue() - 1) + 0.5);
+            if (d_dim > tbox::Dimension(1)) {
+               y = lowerx[1] + dx[1] * (fi() (0) - loweri(0));
+            }
+            if (d_dim > tbox::Dimension(2)) {
+               z = lowerx[2] + dx[2] * (fi() (1) - loweri(1) + 0.5);
+            }
+         } else if (axis == 2) {
+            x = lowerx[0] + dx[0] * (fi() (1) - loweri(1) + 0.5);
+            if (d_dim > tbox::Dimension(1)) {
+               y = lowerx[1] + dx[1] * (fi() (2) - loweri(2) + 0.5);
+            }
+            if (d_dim > tbox::Dimension(2)) {
+               z = lowerx[2] + dx[2] * (fi() (0) - loweri(0));
+            }
+         }
+
+         for (int d = 0; d < depth; d++) {
+            (*data)(fi(),
+                    d) = d_Dcoef + d_Acoef * x + d_Bcoef * y + d_Ccoef * z;
+         }
+
+      }
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Verify results of communication operations.  This test must be        *
+ * consistent with data initialization and boundary operations above.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool FaceDataTest::verifyResults(
+   const hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number)
+{
+   (void)hierarchy;
+   bool test_failed = false;
+   if (d_do_refine || d_do_coarsen) {
+
+      tbox::plog << "\nEntering FaceDataTest::verifyResults..." << endl;
+      tbox::plog << "level_number = " << level_number << endl;
+      tbox::plog << "Patch box = " << patch.getBox() << endl;
+
+      hier::IntVector tgcw(d_dim, 0);
+      for (int i = 0; i < d_variables.getSize(); i++) {
+         tgcw.max(patch.getPatchData(d_variables[i], getDataContext())->
+            getGhostCellWidth());
+      }
+      hier::Box pbox = patch.getBox();
+
+      tbox::Pointer<pdat::FaceData<double> > solution(
+         new pdat::FaceData<double>(pbox, 1, tgcw));
+
+      hier::Box tbox(pbox);
+      tbox.grow(tgcw);
+
+      if (d_do_coarsen) {
+         setConservativeData(solution, tbox,
+            patch, hierarchy, level_number);
+      }
+
+      for (int i = 0; i < d_variables.getSize(); i++) {
+
+         tbox::Pointer<pdat::FaceData<double> > face_data =
+            patch.getPatchData(d_variables[i], getDataContext());
+         int depth = face_data->getDepth();
+         hier::Box dbox = face_data->getGhostBox();
+
+         if (d_do_refine) {
+            setLinearData(solution, tbox, patch);
+         }
+
+         for (int id = 0; id < d_dim.getValue(); id++) {
+            for (pdat::FaceIterator si(dbox, id); si; si++) {
+               double correct = (*solution)(si());
+               for (int d = 0; d < depth; d++) {
+                  double result = (*face_data)(si(), d);
+                  if (!tbox::MathUtilities<double>::equalEps(correct,
+                         result)) {
+                     test_failed = true;
+                     tbox::perr << "Test FAILED: ...."
+                                << " : face_data index = " << si() << endl;
+                     tbox::perr << "    hier::Variable = "
+                     << d_variable_src_name[i]
+                     << " : depth index = " << d << endl;
+                     tbox::perr << "    result = " << result
+                                << " : correct = " << correct << endl;
+                  }
+               }
+            }
+         }
+
+      }
+
+      solution.setNull();   // just to be anal...
+
+      tbox::plog << "\nExiting FaceDataTest::verifyResults..." << endl;
+      tbox::plog << "level_number = " << level_number << endl;
+      tbox::plog << "Patch box = " << patch.getBox() << endl << endl;
+
+   }
+
+   return !test_failed;
+}
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/FaceDataTest.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/FaceDataTest.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,189 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR communication tests for face-centered patch data 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_FaceDataTest
+#define included_pdat_FaceDataTest
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "PatchDataTestStrategy.h"
+#include "SAMRAI/tbox/Pointer.h"
+#ifndef included_String
+#include <string>
+using namespace std;
+#define included_String
+#endif
+#include "SAMRAI/hier/Variable.h"
+
+namespace SAMRAI {
+
+class CommTester;
+
+/**
+ * Class FaceDataTest provides routines to test communication operations
+ * for face-centered patch data on an AMR patch hierarchy.
+ *
+ * Required input keys and data types for test:
+ *
+ *   NONE...
+ *
+ * See PatchDataTestStrategy header file comments for variable and
+ * refinement input data description.  Additionally, there are two
+ * optional input parameters for each face variable.  These are:
+ *
+ *
+ *
+ *
+ *
+ *    - \b  use_fine_value_at_interface   which values to use at coarse-
+ *                                          fine interface (default = TRUE)
+ *
+ *
+ *
+ *
+ *
+ */
+
+class FaceDataTest:public PatchDataTestStrategy
+{
+public:
+   /**
+    * The constructor initializes variable data arrays to zero length.
+    */
+   FaceDataTest(
+      const std::string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> main_input_db,
+      bool do_refine,
+      bool do_coarsen,
+      const std::string& refine_option);
+
+   /**
+    * Virtual destructor for FaceDataTest.
+    */
+   ~FaceDataTest();
+
+   /**
+    * User-supplied boundary conditions.  Note that we do not implement
+    * user-defined coarsen and refine operations.
+    */
+   virtual void
+   setPhysicalBoundaryConditions(
+      const hier::Patch& patch,
+      const double time,
+      const hier::IntVector& gcw) const;
+
+   /**
+    * This function is called from the CommTester constructor.  Its
+    * purpose is to register variables used in the patch data test
+    * and appropriate communication parameters (ghost cell widths,
+    * coarsen/refine operations) with the CommTester object, which
+    * manages the variable storage.
+    */
+   void
+   registerVariables(
+      CommTester* commtest);
+
+   /**
+    * Function for setting data on new patch in hierarchy.
+    *
+    * @param src_or_dst Flag set to 's' for source or 'd' for destination
+    *        to indicate variables to set data for.
+    */
+   virtual void
+   initializeDataOnPatch(
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number,
+      char src_or_dst);
+
+   /**
+    * Function for checking results of communication operations.
+    */
+   bool
+   verifyResults(
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number);
+
+private:
+   /*
+    * Function for reading test data from input file.
+    */
+   void
+   readTestInput(
+      tbox::Pointer<tbox::Database> db);
+
+   void
+   setLinearData(
+      tbox::Pointer<pdat::FaceData<double> > data,
+      const hier::Box& box,
+      const hier::Patch& patch) const;
+
+   /*
+    * Set conservative linear function data for testing coarsening
+    */
+   void
+   setConservativeData(
+      tbox::Pointer<pdat::FaceData<double> > data,
+      const hier::Box& box,
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number) const;
+
+   void
+   checkPatchInteriorData(
+      const tbox::Pointer<pdat::FaceData<double> >& data,
+      const hier::Box& interior,
+      const tbox::Pointer<geom::CartesianPatchGeometry>& pgeom) const;
+
+   const tbox::Dimension d_dim;
+
+   /*
+    * Object std::string identifier for error reporting
+    */
+   std::string d_object_name;
+
+   /*
+    * Data members specific to this face data test.
+    */
+   tbox::Pointer<geom::CartesianGridGeometry> d_cart_grid_geometry;
+
+   /*
+    * Data members specific to this face data test.
+    */
+   tbox::Array<bool> d_use_fine_value_at_interface;
+
+   double d_Acoef;
+   double d_Bcoef;
+   double d_Ccoef;
+   double d_Dcoef;
+
+   bool d_do_refine;
+   bool d_do_coarsen;
+   std::string d_refine_option;
+   int d_finest_level_number;
+
+   tbox::Array<tbox::Pointer<hier::Variable> > d_variables;
+
+};
+
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,2651 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=CellDataTest.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h CellDataTest.C	\
+	CellDataTest.h CommTester.h PatchDataTestStrategy.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=CommTester.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/OverlapConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BergerRigoutsos.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h CommTester.C	\
+	CommTester.h PatchDataTestStrategy.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=EdgeDataTest.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h CommTester.h	\
+	EdgeDataTest.C EdgeDataTest.h PatchDataTestStrategy.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=FaceDataTest.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h CommTester.h	\
+	FaceDataTest.C FaceDataTest.h PatchDataTestStrategy.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
+FILE_4=NodeDataTest.o
+DEPENDS_4:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h CommTester.h	\
+	NodeDataTest.C NodeDataTest.h PatchDataTestStrategy.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_4 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_4:X.o=${NDIM}.o}: ${DEPENDS_4}
+
+FILE_5=OuterfaceDataTest.o
+DEPENDS_5:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h CommTester.h	\
+	OuterfaceDataTest.C OuterfaceDataTest.h PatchDataTestStrategy.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_5 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_5:X.o=${NDIM}.o}: ${DEPENDS_5}
+
+FILE_6=OuternodeDataTest.o
+DEPENDS_6:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h CommTester.h	\
+	OuternodeDataTest.C OuternodeDataTest.h PatchDataTestStrategy.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_6 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_6:X.o=${NDIM}.o}: ${DEPENDS_6}
+
+FILE_7=OutersideDataTest.o
+DEPENDS_7:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h CommTester.h	\
+	OutersideDataTest.C OutersideDataTest.h PatchDataTestStrategy.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_7 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_7:X.o=${NDIM}.o}: ${DEPENDS_7}
+
+FILE_8=PatchDataTestStrategy.o
+DEPENDS_8:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	PatchDataTestStrategy.C PatchDataTestStrategy.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_8 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_8:X.o=${NDIM}.o}: ${DEPENDS_8}
+
+FILE_9=Pointer-CommTester.o
+DEPENDS_9:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h CommTester.h	\
+	PatchDataTestStrategy.h Pointer-CommTester.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_9 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C
+endif
+
+${FILE_9:X.o=${NDIM}.o}: ${DEPENDS_9}
+
+FILE_10=SideDataTest.o
+DEPENDS_10:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h CommTester.h	\
+	PatchDataTestStrategy.h SideDataTest.C SideDataTest.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_10 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_10:X.o=${NDIM}.o}: ${DEPENDS_10}
+
+FILE_11=VisItDerivedData.o
+DEPENDS_11:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h VisItDerivedData.C	\
+	VisItDerivedData.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_11 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_11:X.o=${NDIM}.o}: ${DEPENDS_11}
+
+FILE_12=main.o
+DEPENDS_12:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h CellDataTest.h	\
+	CommTester.h EdgeDataTest.h FaceDataTest.h NodeDataTest.h	\
+	OuterfaceDataTest.h OuternodeDataTest.h OutersideDataTest.h	\
+	PatchDataTestStrategy.h SideDataTest.h VisItDerivedData.h main.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_12 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_12:X.o=${NDIM}.o}: ${DEPENDS_12}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,78 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for SAMRAI communication tests 
+##
+#########################################################################
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/test/communication
+VPATH         = @srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+default: check
+
+include $(OBJECT)/config/Makefile.config
+
+CPPFLAGS_EXTRA= -DNDIM=$(PDIM)  -DTESTING=1
+
+NUM_TESTS = 56
+
+TEST_NPROCS = @TEST_NPROCS@
+
+CXX_OBJS      = \
+	CommTester.o \
+	PatchDataTestStrategy.o \
+	main.o \
+	VisItDerivedData.o \
+	CellDataTest.o \
+	EdgeDataTest.o \
+	FaceDataTest.o \
+	NodeDataTest.o \
+	OuterfaceDataTest.o \
+	OuternodeDataTest.o \
+	OutersideDataTest.o \
+	Pointer-CommTester.o \
+	SideDataTest.o
+
+main: $(CXX_OBJS) $(LIBSAMRAI)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) \
+	$(LIBSAMRAI) $(LDLIBS) -o $@
+
+check:
+	$(MAKE) check2d
+	$(MAKE) check3d
+
+check2d: main
+	@for i in test_inputs/*2d*.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+check3d: main
+	@for i in test_inputs/*3d*.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+checkcompile: main
+
+checktest:
+	rm -f makecheck.logfile
+	$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+	$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+	rm -f makecheck.logfile
+
+clean-check:
+	$(SAMCLEAN)
+
+clean:		clean-check
+	$(RM) main
+
+include $(SRCDIR)/Makefile.depend
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/NodeDataTest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/NodeDataTest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,525 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR communication tests for node-centered patch data 
+ *
+ ************************************************************************/
+
+#include "NodeDataTest.h"
+
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/NodeGeometry.h"
+#include "SAMRAI/pdat/NodeIndex.h"
+#include "SAMRAI/pdat/NodeIterator.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "CommTester.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+namespace SAMRAI {
+
+using namespace std;
+
+NodeDataTest::NodeDataTest(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> main_input_db,
+   bool do_refine,
+   bool do_coarsen,
+   const string& refine_option):
+   PatchDataTestStrategy(dim),
+   d_dim(dim)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!main_input_db.isNull());
+   TBOX_ASSERT(!refine_option.empty());
+#endif
+
+   d_object_name = object_name;
+
+   d_do_refine = do_refine;
+   d_do_coarsen = false;
+   if (!do_refine) {
+      d_do_coarsen = do_coarsen;
+   }
+
+   d_refine_option = refine_option;
+
+   d_Acoef = 0.0;
+   d_Bcoef = 0.0;
+   d_Ccoef = 0.0;
+   d_Dcoef = 0.0;
+
+   d_finest_level_number = main_input_db->
+      getDatabase("PatchHierarchy")->
+      getInteger("max_levels") - 1;
+
+   d_cart_grid_geometry = new geom::CartesianGridGeometry(
+         dim,
+         "CartesianGridGeometry",
+         main_input_db->getDatabase("CartesianGridGeometry"));
+
+   setGridGeometry(d_cart_grid_geometry);
+
+   readTestInput(main_input_db->getDatabase("NodePatchDataTest"));
+
+}
+
+NodeDataTest::~NodeDataTest()
+{
+}
+
+void NodeDataTest::readTestInput(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   /*
+    * Read coeeficients of linear profile to test interpolation.
+    */
+   if (db->keyExists("Acoef")) {
+      d_Acoef = db->getDouble("Acoef");
+   } else {
+      TBOX_ERROR(d_object_name << " input error: No `Acoeff' found." << endl);
+   }
+   if (db->keyExists("Dcoef")) {
+      d_Dcoef = db->getDouble("Dcoef");
+   } else {
+      TBOX_ERROR(d_object_name << " input error: No `Dcoef' found." << endl);
+   }
+   if (d_dim > tbox::Dimension(1)) {
+      if (db->keyExists("Bcoef")) {
+         d_Bcoef = db->getDouble("Bcoef");
+      } else {
+         TBOX_ERROR(d_object_name << " input error: No `Bcoef' found." << endl);
+      }
+   }
+   if (d_dim > tbox::Dimension(2)) {
+      if (db->keyExists("Ccoef")) {
+         d_Ccoef = db->getDouble("Ccoef");
+      } else {
+         TBOX_ERROR(d_object_name << " input error: No `Ccoef' found." << endl);
+      }
+   }
+
+   /*
+    * Base class reads variable parameters and boxes to refine.
+    */
+
+   readVariableInput(db->getDatabase("VariableData"));
+   readRefinementInput(db->getDatabase("RefinementData"));
+}
+
+void NodeDataTest::registerVariables(
+   CommTester* commtest)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(commtest != (CommTester *)NULL);
+#endif
+
+   int nvars = d_variable_src_name.getSize();
+
+   d_variables.resizeArray(nvars);
+
+   for (int i = 0; i < nvars; i++) {
+      d_variables[i] = new pdat::NodeVariable<double>(d_dim,
+                                                      d_variable_src_name[i],
+                                                      d_variable_depth[i]);
+
+      if (d_do_refine) {
+         commtest->registerVariable(d_variables[i],
+            d_variables[i],
+            d_variable_src_ghosts[i],
+            d_variable_dst_ghosts[i],
+            d_cart_grid_geometry,
+            d_variable_refine_op[i]);
+      } else if (d_do_coarsen) {
+         commtest->registerVariable(d_variables[i],
+            d_variables[i],
+            d_variable_src_ghosts[i],
+            d_variable_dst_ghosts[i],
+            d_cart_grid_geometry,
+            d_variable_coarsen_op[i]);
+      }
+
+   }
+
+}
+
+void NodeDataTest::setLinearData(
+   tbox::Pointer<pdat::NodeData<double> > data,
+   const hier::Box& box,
+   const hier::Patch& patch) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+
+   tbox::Pointer<geom::CartesianPatchGeometry> pgeom = patch.getPatchGeometry();
+   const pdat::NodeIndex loweri(
+      patch.getBox().lower(), (pdat::NodeIndex::Corner)0);
+   const double* dx = pgeom->getDx();
+   const double* lowerx = pgeom->getXLower();
+   double x, y, z;
+
+   const int depth = data->getDepth();
+
+   const hier::Box sbox = data->getGhostBox() * box;
+
+   for (pdat::NodeIterator ci(sbox); ci; ci++) {
+
+      /*
+       * Compute spatial location of node center and
+       * set data to linear profile.
+       */
+
+      x = lowerx[0] + dx[0] * (ci() (0) - loweri(0));
+      y = z = 0.;
+      if (d_dim > tbox::Dimension(1)) {
+         y = lowerx[1] + dx[1] * (ci() (1) - loweri(1));
+      }
+      if (d_dim > tbox::Dimension(2)) {
+         z = lowerx[2] + dx[2] * (ci() (2) - loweri(2));
+      }
+
+      for (int d = 0; d < depth; d++) {
+         (*data)(ci(), d) = d_Dcoef + d_Acoef * x + d_Bcoef * y + d_Ccoef * z;
+      }
+
+   }
+
+}
+
+void NodeDataTest::setPeriodicData(
+   tbox::Pointer<pdat::NodeData<double> > data,
+   const hier::Box& box,
+   const hier::Patch& patch) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   NULL_USE(patch);
+
+   const double* xlo = d_cart_grid_geometry->getXLower();
+   const double* xup = d_cart_grid_geometry->getXUpper();
+   std::vector<double> domain_len(d_dim.getValue());
+   for (int d = 0; d < d_dim.getValue(); ++d) {
+      domain_len[d] = xup[d] - xlo[d];
+   }
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+
+   const int depth = data->getDepth();
+
+   const hier::Box sbox = data->getGhostBox() * box;
+
+   for (pdat::NodeIterator ni(sbox); ni; ni++) {
+
+      double val = 1.0;
+      for (int d = 0; d < d_dim.getValue(); ++d) {
+         double tmpf = dx[d] * ni() (d) / domain_len[d];
+         tmpf = sin(2 * M_PI * tmpf);
+         val *= tmpf;
+      }
+      val = val + 20.0; // Shift function range to [1,3] to avoid bad floating point compares.
+      for (int d = 0; d < depth; d++) {
+         (*data)(ni(), d) = val;
+      }
+
+   }
+
+}
+
+void NodeDataTest::initializeDataOnPatch(
+   const hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number,
+   char src_or_dst)
+{
+   NULL_USE(src_or_dst);
+   NULL_USE(level_number);
+   NULL_USE(hierarchy);
+
+   const hier::IntVector periodic_shift(
+      d_cart_grid_geometry->getPeriodicShift(hier::IntVector(d_dim, 1)));
+   bool is_periodic = periodic_shift.max() > 0;
+
+   if (d_do_refine) {
+
+      for (int i = 0; i < d_variables.getSize(); i++) {
+
+         tbox::Pointer<pdat::NodeData<double> > node_data =
+            patch.getPatchData(d_variables[i], getDataContext());
+
+         hier::Box dbox = node_data->getBox();
+
+         if (is_periodic) {
+            setPeriodicData(node_data, dbox, patch);
+         } else {
+            setLinearData(node_data, dbox, patch);
+         }
+
+      }
+
+   } else if (d_do_coarsen) {
+
+      for (int i = 0; i < d_variables.getSize(); i++) {
+
+         tbox::Pointer<pdat::NodeData<double> > node_data =
+            patch.getPatchData(d_variables[i], getDataContext());
+
+         hier::Box dbox = node_data->getGhostBox();
+
+         if (is_periodic) {
+            setPeriodicData(node_data, dbox, patch);
+         } else {
+            setLinearData(node_data, dbox, patch);
+         }
+
+      }
+
+   }
+
+}
+
+void NodeDataTest::checkPatchInteriorData(
+   const tbox::Pointer<pdat::NodeData<double> >& data,
+   const hier::Box& interior,
+   const hier::Patch& patch) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+
+   const bool is_periodic =
+      d_cart_grid_geometry->getPeriodicShift(hier::IntVector(d_dim,
+            1)).max() > 0;
+
+   const int depth = data->getDepth();
+
+   tbox::Pointer<pdat::NodeData<double> > correct_data(
+      new pdat::NodeData<double>(data->getBox(),
+                                 depth,
+                                 data->getGhostCellWidth()));
+   if (is_periodic) {
+      setPeriodicData(correct_data, correct_data->getGhostBox(), patch);
+   } else {
+      setLinearData(correct_data, correct_data->getGhostBox(), patch);
+   }
+
+   for (pdat::NodeIterator ni(interior); ni; ni++) {
+      for (int d = 0; d < depth; d++) {
+         if (!(tbox::MathUtilities<double>::equalEps((*data)(ni(), d),
+                  (*correct_data)(ni(), d)))) {
+            tbox::perr << "FAILED: -- patch interior not properly filled"
+                       << endl;
+         }
+      }
+   }
+
+}
+
+void NodeDataTest::setPhysicalBoundaryConditions(
+   const hier::Patch& patch,
+   const double time,
+   const hier::IntVector& gcw) const
+{
+   NULL_USE(time);
+
+   const hier::IntVector periodic_shift =
+      d_cart_grid_geometry->getPeriodicShift(hier::IntVector(d_dim, 1));
+   bool is_periodic = periodic_shift.max() > 0;
+
+   tbox::Pointer<geom::CartesianPatchGeometry> pgeom = patch.getPatchGeometry();
+
+   const tbox::Array<hier::BoundaryBox> node_bdry =
+      pgeom->getCodimensionBoundaries(d_dim.getValue());
+   const int num_node_bdry_boxes = node_bdry.getSize();
+
+   tbox::Array<hier::BoundaryBox> edge_bdry;
+   if (d_dim > tbox::Dimension(1)) {
+      edge_bdry = pgeom->getCodimensionBoundaries(d_dim.getValue() - 1);
+   }
+   const int num_edge_bdry_boxes = d_dim > tbox::Dimension(1) ? edge_bdry.getSize() : -1;
+
+   tbox::Array<hier::BoundaryBox> face_bdry;
+   if (d_dim == tbox::Dimension(3)) {
+      face_bdry = pgeom->getCodimensionBoundaries(d_dim.getValue() - 2);
+   }
+   const int num_face_bdry_boxes = d_dim == tbox::Dimension(3) ? face_bdry.getSize() : -1;
+
+   for (int i = 0; i < d_variables.getSize(); i++) {
+
+      tbox::Pointer<pdat::NodeData<double> > node_data =
+         patch.getPatchData(d_variables[i], getDataContext());
+
+      hier::Box patch_interior = node_data->getBox();
+      checkPatchInteriorData(node_data, patch_interior, patch);
+
+      /*
+       * Set node boundary data.
+       */
+      for (int ni = 0; ni < num_node_bdry_boxes; ni++) {
+
+         hier::Box fill_box = pgeom->getBoundaryFillBox(node_bdry[ni],
+               patch.getBox(),
+               gcw);
+
+         if (is_periodic) {
+            setPeriodicData(node_data, fill_box, patch);
+         } else {
+            setLinearData(node_data, fill_box, patch);
+         }
+      }
+
+      if (d_dim > tbox::Dimension(1)) {
+         /*
+          * Set edge boundary data.
+          */
+         for (int ei = 0; ei < num_edge_bdry_boxes; ei++) {
+
+            hier::Box fill_box = pgeom->getBoundaryFillBox(edge_bdry[ei],
+                  patch.getBox(),
+                  gcw);
+
+            if (is_periodic) {
+               setPeriodicData(node_data, fill_box, patch);
+            } else {
+               setLinearData(node_data, fill_box, patch);
+            }
+         }
+      }
+
+      if (d_dim == tbox::Dimension(3)) {
+         /*
+          * Set face boundary data.
+          */
+         for (int fi = 0; fi < num_face_bdry_boxes; fi++) {
+
+            hier::Box fill_box = pgeom->getBoundaryFillBox(face_bdry[fi],
+                  patch.getBox(),
+                  gcw);
+
+            if (is_periodic) {
+               setPeriodicData(node_data, fill_box, patch);
+            } else {
+               setLinearData(node_data, fill_box, patch);
+            }
+         }
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Verify results of communication operations.  This test must be        *
+ * consistent with data initialization and boundary operations above.    *
+ *                                                                       *
+ *************************************************************************
+ */
+bool NodeDataTest::verifyResults(
+   const hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number)
+{
+   NULL_USE(hierarchy);
+
+   bool test_failed = false;
+
+   const hier::IntVector periodic_shift(
+      d_cart_grid_geometry->getPeriodicShift(hier::IntVector(d_dim, 1)));
+   bool is_periodic = periodic_shift.max() > 0;
+
+   if (d_do_refine || d_do_coarsen) {
+
+      tbox::plog << "\nEntering NodeDataTest::verifyResults..." << endl;
+      tbox::plog << "level_number = " << level_number << endl;
+      tbox::plog << "Patch box = " << patch.getBox() << endl;
+
+      hier::IntVector tgcw(periodic_shift.getDim(), 0);
+      for (int i = 0; i < d_variables.getSize(); i++) {
+         tgcw.max(patch.getPatchData(d_variables[i], getDataContext())->
+            getGhostCellWidth());
+      }
+      hier::Box pbox = patch.getBox();
+
+      tbox::Pointer<pdat::NodeData<double> > solution(
+         new pdat::NodeData<double>(pbox, 1, tgcw));
+
+      hier::Box gbox(pbox);
+      gbox.grow(tgcw);
+
+      if (d_do_refine) {
+         if (is_periodic) {
+            setPeriodicData(solution, gbox, patch);
+         } else {
+            setLinearData(solution, gbox, patch);
+         }
+      } else {
+         if (is_periodic) {
+            setPeriodicData(solution, gbox, patch);
+         } else {
+            setLinearData(solution, gbox, patch);
+         }
+      }
+
+      for (int i = 0; i < d_variables.getSize(); i++) {
+
+         tbox::Pointer<pdat::NodeData<double> > node_data =
+            patch.getPatchData(d_variables[i], getDataContext());
+         int depth = node_data->getDepth();
+         hier::Box dbox = node_data->getGhostBox();
+
+         for (pdat::NodeIterator ci(dbox); ci; ci++) {
+            double correct = (*solution)(ci());
+            for (int d = 0; d < depth; d++) {
+               double result = (*node_data)(ci(), d);
+               if (!tbox::MathUtilities<double>::equalEps(correct, result)) {
+                  tbox::perr << "Test FAILED: ...."
+                             << " : node index = " << ci()
+                             << " of L" << level_number
+                             << " P" << patch.getLocalId()
+                             << " " << patch.getBox() << endl;
+                  tbox::perr << "    hier::Variable = "
+                  << d_variable_src_name[i]
+                  << " : depth index = " << d << endl;
+                  tbox::perr << "    result = " << result
+                             << " : correct = " << correct << endl;
+                  test_failed = true;
+               }
+            }
+         }
+
+      }
+      if (!test_failed) {
+         tbox::plog << "Node test Successful!" << endl;
+      }
+
+      solution.setNull();   // just to be anal...
+
+      tbox::plog << "\nExiting NodeDataTest::verifyResults..." << endl;
+      tbox::plog << "level_number = " << level_number << endl;
+      tbox::plog << "Patch box = " << patch.getBox() << endl << endl;
+
+   }
+
+   return !test_failed;
+
+}
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/NodeDataTest.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/NodeDataTest.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,188 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR communication tests for node-centered patch data 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_NodeDataTest
+#define included_pdat_NodeDataTest
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/hier/Patch.h"
+#include "PatchDataTestStrategy.h"
+#include "SAMRAI/tbox/Pointer.h"
+#ifndef included_String
+#include <string>
+using namespace std;
+#define included_String
+#endif
+#include "SAMRAI/hier/Variable.h"
+
+namespace SAMRAI {
+
+class CommTester;
+
+/**
+ * Class NodeDataTest provides routines to test communication operations
+ * for node-centered patch data on an AMR patch hierarchy.
+ *
+ * Required input keys and data types:
+ *
+ *
+ *
+ *
+ *   Double values that define linear function initial data to test refine
+ *   operations (Ax + By + Cz + D = f(x,y,z), where f(x,y,z) is the value
+ *   assigned to each array value at initialization and against which
+ *   linear interpolation is tested:
+ *
+ *    Acoef, Dcoef always required.
+ *    If (dim > 1), Bcoef is needed.
+ *    If (dim > 2), Ccoef is needed.
+ *
+ *
+ *
+ *
+ *
+ * See PatchDataTestStrategy header file comments for variable and
+ * refinement input data description.
+ */
+
+class NodeDataTest:public PatchDataTestStrategy
+{
+public:
+   /**
+    * The constructor initializes variable data arrays to zero length.
+    */
+   NodeDataTest(
+      const std::string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> main_input_db,
+      bool do_refine,
+      bool do_coarsen,
+      const std::string& refine_option);
+
+   /**
+    * Virtual destructor for NodeDataTest.
+    */
+   ~NodeDataTest();
+
+   /**
+    * User-supplied boundary conditions.  Note that we do not implement
+    * user-defined coarsen and refine operations.
+    */
+   virtual void
+   setPhysicalBoundaryConditions(
+      const hier::Patch& patch,
+      const double time,
+      const hier::IntVector&) const;
+
+   /**
+    * This function is called from the CommTester constructor.  Its
+    * purpose is to register variables used in the patch data test
+    * and appropriate communication parameters (ghost node widths,
+    * coarsen/refine operations) with the CommTester object, which
+    * manages the variable storage.
+    */
+   void
+   registerVariables(
+      CommTester* commtest);
+
+   /**
+    * Function for setting data on new patch in hierarchy.
+    *
+    * @param src_or_dst Flag set to 's' for source or 'd' for destination
+    *        to indicate variables to set data for.
+    */
+   virtual void
+   initializeDataOnPatch(
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number,
+      char src_or_dst);
+
+   /**
+    * Function for checking results of communication operations.
+    */
+   bool
+   verifyResults(
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number);
+
+private:
+   /**
+    * Function for reading test data from input file.
+    */
+   void
+   readTestInput(
+      tbox::Pointer<tbox::Database> db);
+
+   /**
+    * Set linear function data for testing interpolation
+    */
+   void
+   setLinearData(
+      tbox::Pointer<pdat::NodeData<double> > data,
+      const hier::Box& box,
+      const hier::Patch& patch) const;
+
+   /**
+    * Set periodic linear function data for testing interpolation in
+    * periodic domains.
+    */
+   void
+   setPeriodicData(
+      tbox::Pointer<pdat::NodeData<double> > data,
+      const hier::Box& box,
+      const hier::Patch& patch) const;
+
+   void
+   checkPatchInteriorData(
+      const tbox::Pointer<pdat::NodeData<double> >& data,
+      const hier::Box& interior,
+      const hier::Patch& patch) const;
+
+   const tbox::Dimension d_dim;
+
+   /*
+    * Object std::string identifier for error reporting
+    */
+   std::string d_object_name;
+
+   /*
+    * Data members specific to this node data test.
+    */
+   tbox::Pointer<geom::CartesianGridGeometry> d_cart_grid_geometry;
+
+   /*
+    * Data members specific to this node data test.
+    */
+   double d_Acoef;
+   double d_Bcoef;
+   double d_Ccoef;
+   double d_Dcoef;
+
+   bool d_do_refine;
+   bool d_do_coarsen;
+   std::string d_refine_option;
+   int d_finest_level_number;
+
+   tbox::Array<tbox::Pointer<hier::Variable> > d_variables;
+
+};
+
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/OuterfaceDataTest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/OuterfaceDataTest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,543 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR communication tests for outerface-centered patch data 
+ *
+ ************************************************************************/
+
+#include "OuterfaceDataTest.h"
+
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "CommTester.h"
+#include "SAMRAI/pdat/FaceGeometry.h"
+#include "SAMRAI/pdat/FaceIndex.h"
+#include "SAMRAI/pdat/FaceIterator.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/pdat/OuterfaceGeometry.h"
+#include "SAMRAI/pdat/OuterfaceVariable.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+namespace SAMRAI {
+
+using namespace std;
+
+OuterfaceDataTest::OuterfaceDataTest(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> main_input_db,
+   bool do_refine,
+   bool do_coarsen,
+   const string& refine_option):
+   PatchDataTestStrategy(dim),
+   d_dim(dim)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!main_input_db.isNull());
+   TBOX_ASSERT(!refine_option.empty());
+#endif
+
+   d_object_name = object_name;
+
+   d_do_refine = do_refine;
+   d_do_coarsen = false;
+   if (!do_refine) {
+      d_do_coarsen = do_coarsen;
+   }
+
+   d_refine_option = refine_option;
+
+   d_use_fine_value_at_interface.resizeArray(0);
+
+   d_Acoef = 0.0;
+   d_Bcoef = 0.0;
+   d_Ccoef = 0.0;
+   d_Dcoef = 0.0;
+
+   d_finest_level_number = main_input_db->
+      getDatabase("PatchHierarchy")->
+      getInteger("max_levels") - 1;
+
+   d_cart_grid_geometry = new geom::CartesianGridGeometry(
+         dim,
+         "CartesianGridGeometry",
+         main_input_db->getDatabase("CartesianGridGeometry"));
+
+   setGridGeometry(d_cart_grid_geometry);
+
+   readTestInput(main_input_db->getDatabase("OuterfacePatchDataTest"));
+
+}
+
+OuterfaceDataTest::~OuterfaceDataTest()
+{
+}
+
+void OuterfaceDataTest::readTestInput(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   /*
+    * Base class reads variable parameters and boxes to refine.
+    */
+
+   readVariableInput(db->getDatabase("VariableData"));
+   readRefinementInput(db->getDatabase("RefinementData"));
+
+   tbox::Pointer<tbox::Database> var_data = db->getDatabase("VariableData");
+   tbox::Array<string> var_keys = var_data->getAllKeys();
+   int nkeys = var_keys.getSize();
+
+   d_use_fine_value_at_interface.resizeArray(nkeys);
+
+   for (int i = 0; i < nkeys; i++) {
+      tbox::Pointer<tbox::Database> var_db = var_data->getDatabase(var_keys[i]);
+
+      if (var_db->keyExists("use_fine_value_at_interface")) {
+         d_use_fine_value_at_interface[i] =
+            var_db->getBool("use_fine_value_at_interface");
+      } else {
+         d_use_fine_value_at_interface[i] = true;
+      }
+
+   }
+
+   if (db->keyExists("Acoef")) {
+      d_Acoef = db->getDouble("Acoef");
+   } else {
+      TBOX_ERROR(d_object_name << " input error: No `Acoeff' found." << endl);
+   }
+   if (db->keyExists("Dcoef")) {
+      d_Dcoef = db->getDouble("Dcoef");
+   } else {
+      TBOX_ERROR(d_object_name << " input error: No `Dcoef' found." << endl);
+   }
+   if (d_dim > tbox::Dimension(1)) {
+      if (db->keyExists("Bcoef")) {
+         d_Bcoef = db->getDouble("Bcoef");
+      } else {
+         TBOX_ERROR(d_object_name << " input error: No `Bcoef' found." << endl);
+      }
+   }
+   if (d_dim > tbox::Dimension(2)) {
+      if (db->keyExists("Ccoef")) {
+         d_Ccoef = db->getDouble("Ccoef");
+      } else {
+         TBOX_ERROR(d_object_name << " input error: No `Ccoef' found." << endl);
+      }
+   }
+
+}
+
+void OuterfaceDataTest::registerVariables(
+   CommTester* commtest)
+{
+   TBOX_ASSERT(commtest != (CommTester *)NULL);
+
+   const tbox::Dimension dim(d_dim);
+
+   int nvars = d_variable_src_name.getSize();
+
+   d_variables_src.resizeArray(nvars);
+   d_variables_dst.resizeArray(nvars);
+
+   for (int i = 0; i < nvars; i++) {
+      d_variables_src[i] =
+         new pdat::OuterfaceVariable<double>(dim,
+                                             d_variable_src_name[i],
+                                             d_variable_depth[i]);
+
+      d_variables_dst[i] =
+         new pdat::FaceVariable<double>(dim,
+                                        d_variable_dst_name[i],
+                                        d_variable_depth[i],
+                                        d_use_fine_value_at_interface[i]);
+
+      if (d_do_refine) {
+         commtest->registerVariable(d_variables_src[i],
+            d_variables_dst[i],
+            d_variable_src_ghosts[i],
+            d_variable_dst_ghosts[i],
+            d_cart_grid_geometry,
+            d_variable_refine_op[i]);
+      } else if (d_do_coarsen) {
+         commtest->registerVariable(d_variables_src[i],
+            d_variables_dst[i],
+            d_variable_src_ghosts[i],
+            d_variable_dst_ghosts[i],
+            d_cart_grid_geometry,
+            d_variable_coarsen_op[i]);
+      }
+
+   }
+
+}
+
+void OuterfaceDataTest::initializeDataOnPatch(
+   const hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number,
+   char src_or_dst)
+{
+   NULL_USE(hierarchy);
+   NULL_USE(level_number);
+   hier::VariableDatabase* variable_db =
+      hier::VariableDatabase::getDatabase();
+   variable_db->printClassData();
+   tbox::Array<tbox::Pointer<hier::Variable> >& variables =
+      src_or_dst == 's' ? d_variables_src : d_variables_dst;
+
+   if (d_do_refine) {
+
+      for (int i = 0; i < variables.getSize(); i++) {
+
+         tbox::Pointer<hier::PatchData> data =
+            patch.getPatchData(variables[i], getDataContext());
+
+         TBOX_ASSERT(!data.isNull());
+
+         tbox::Pointer<pdat::OuterfaceData<double> > oface_data = data;
+         tbox::Pointer<pdat::FaceData<double> > face_data = data;
+
+         hier::Box dbox = data->getBox();
+
+         if (!face_data.isNull()) {
+            setLinearData(face_data, dbox, patch);
+         }
+         if (!oface_data.isNull()) {
+            setLinearData(oface_data, dbox, patch);
+         }
+
+      }
+
+   } else if (d_do_coarsen) {
+
+      for (int i = 0; i < variables.getSize(); i++) {
+
+         tbox::Pointer<hier::PatchData> data =
+            patch.getPatchData(variables[i], getDataContext());
+
+         TBOX_ASSERT(!data.isNull());
+
+         tbox::Pointer<pdat::OuterfaceData<double> > oface_data = data;
+         tbox::Pointer<pdat::FaceData<double> > face_data = data;
+
+         hier::Box dbox = data->getGhostBox();
+
+         if (!face_data.isNull()) {
+            setLinearData(face_data, dbox, patch);
+         }
+         if (!oface_data.isNull()) {
+            setLinearData(oface_data, dbox, patch);
+         }
+
+      }
+
+   }
+
+}
+
+void OuterfaceDataTest::checkPatchInteriorData(
+   const tbox::Pointer<pdat::OuterfaceData<double> >& data,
+   const hier::Box& interior,
+   const tbox::Pointer<geom::CartesianPatchGeometry>& pgeom) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+
+   const double* dx = pgeom->getDx();
+   const double* lowerx = pgeom->getXLower();
+   double x = 0., y = 0., z = 0.;
+
+   const int depth = data->getDepth();
+
+   for (int axis = 0; axis < d_dim.getValue(); axis++) {
+      const pdat::FaceIndex loweri(interior.lower(), axis, 0);
+      for (pdat::FaceIterator fi(interior, axis); fi; fi++) {
+
+         /*
+          * Compute spatial location of face and
+          * set data to linear profile.
+          */
+
+         if (axis == 0) {
+            x = lowerx[0] + dx[0] * (fi() (0) - loweri(0));
+            if (d_dim > tbox::Dimension(1)) {
+               y = lowerx[1] + dx[1] * (fi() (1) - loweri(1) + 0.5);
+            }
+            if (d_dim > tbox::Dimension(2)) {
+               z = lowerx[2] + dx[2] * (fi() (2) - loweri(2) + 0.5);
+            }
+         } else if (axis == 1) {
+            x = lowerx[0] + dx[0]
+               * (fi() (d_dim.getValue() - 1) - loweri(d_dim.getValue() - 1) + 0.5);
+            if (d_dim > tbox::Dimension(1)) {
+               y = lowerx[1] + dx[1] * (fi() (0) - loweri(0));
+            }
+            if (d_dim > tbox::Dimension(2)) {
+               z = lowerx[2] + dx[2] * (fi() (1) - loweri(1) + 0.5);
+            }
+         } else if (axis == 2) {
+            x = lowerx[0] + dx[0] * (fi() (1) - loweri(1) + 0.5);
+            if (d_dim > tbox::Dimension(1)) {
+               y = lowerx[1] + dx[1] * (fi() (2) - loweri(2) + 0.5);
+            }
+            if (d_dim > tbox::Dimension(2)) {
+               z = lowerx[2] + dx[2] * (fi() (0) - loweri(0));
+            }
+         }
+
+         double value;
+         for (int d = 0; d < depth; d++) {
+            value = d_Dcoef + d_Acoef * x + d_Bcoef * y + d_Ccoef * z;
+            if (!(tbox::MathUtilities<double>::equalEps((*data)(fi(),
+                                                                d), value))) {
+               tbox::perr << "FAILED: -- patch interior not properly filled"
+                          << endl;
+            }
+         }
+      }
+   }
+}
+
+void OuterfaceDataTest::setPhysicalBoundaryConditions(
+   const hier::Patch& patch,
+   const double time,
+   const hier::IntVector& gcw) const
+{
+   (void)patch;
+   (void)time;
+   (void)gcw;
+}
+
+void OuterfaceDataTest::setLinearData(
+   tbox::Pointer<pdat::FaceData<double> > data,
+   const hier::Box& box,
+   const hier::Patch& patch) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+
+   tbox::Pointer<geom::CartesianPatchGeometry>
+   pgeom = patch.getPatchGeometry();
+   const double* dx = pgeom->getDx();
+   const double* lowerx = pgeom->getXLower();
+   double x = 0., y = 0., z = 0.;
+
+   const int depth = data->getDepth();
+
+   const hier::Box sbox = data->getGhostBox() * box;
+
+   for (int axis = 0; axis < d_dim.getValue(); axis++) {
+      const pdat::FaceIndex loweri(patch.getBox().lower(), axis, 0);
+      for (pdat::FaceIterator fi(sbox, axis); fi; fi++) {
+
+         /*
+          * Compute spatial location of cell center and
+          * set data to linear profile.
+          */
+
+         if (axis == 0) {
+            x = lowerx[0] + dx[0] * (fi() (0) - loweri(0));
+            if (d_dim > tbox::Dimension(1)) {
+               y = lowerx[1] + dx[1] * (fi() (1) - loweri(1) + 0.5);
+            }
+            if (d_dim > tbox::Dimension(2)) {
+               z = lowerx[2] + dx[2] * (fi() (2) - loweri(2) + 0.5);
+            }
+         } else if (axis == 1) {
+            x = lowerx[0] + dx[0]
+               * (fi() (d_dim.getValue() - 1) - loweri(d_dim.getValue() - 1) + 0.5);
+            if (d_dim > tbox::Dimension(1)) {
+               y = lowerx[1] + dx[1] * (fi() (0) - loweri(0));
+            }
+            if (d_dim > tbox::Dimension(2)) {
+               z = lowerx[2] + dx[2] * (fi() (1) - loweri(1) + 0.5);
+            }
+         } else if (axis == 2) {
+            x = lowerx[0] + dx[0] * (fi() (1) - loweri(1) + 0.5);
+            if (d_dim > tbox::Dimension(1)) {
+               y = lowerx[1] + dx[1] * (fi() (2) - loweri(2) + 0.5);
+            }
+            if (d_dim > tbox::Dimension(2)) {
+               z = lowerx[2] + dx[2] * (fi() (0) - loweri(0));
+            }
+         }
+
+         for (int d = 0; d < depth; d++) {
+            (*data)(fi(),
+                    d) = d_Dcoef + d_Acoef * x + d_Bcoef * y + d_Ccoef * z;
+         }
+
+      }
+   }
+
+}
+
+void OuterfaceDataTest::setLinearData(
+   tbox::Pointer<pdat::OuterfaceData<double> > data,
+   const hier::Box& box,
+   const hier::Patch& patch) const
+{
+   NULL_USE(box);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+
+   tbox::Pointer<geom::CartesianPatchGeometry>
+   pgeom = patch.getPatchGeometry();
+   const double* dx = pgeom->getDx();
+   const double* lowerx = pgeom->getXLower();
+   double x = 0., y = 0., z = 0.;
+
+   const int depth = data->getDepth();
+
+   for (int axis = 0; axis < d_dim.getValue(); axis++) {
+      for (int f = 0; f < 2; f++) {
+         const hier::Box databox = data->getArrayData(axis, f).getBox();
+
+         const pdat::FaceIndex loweri(patch.getBox().lower(), axis, 0);
+         for (hier::Box::Iterator bi(databox); bi; bi++) {
+
+            /*
+             * Compute spatial location of cell center and
+             * set data to linear profile.
+             */
+
+            if (axis == 0) {
+               x = lowerx[0] + dx[0] * (bi() (0) - loweri(0));
+               if (d_dim > tbox::Dimension(1)) {
+                  y = lowerx[1] + dx[1] * (bi() (1) - loweri(1) + 0.5);
+               }
+               if (d_dim > tbox::Dimension(2)) {
+                  z = lowerx[2] + dx[2] * (bi() (2) - loweri(2) + 0.5);
+               }
+            } else if (axis == 1) {
+               x = lowerx[0] + dx[0]
+                  * (bi() (d_dim.getValue() - 1) - loweri(d_dim.getValue() - 1) + 0.5);
+               if (d_dim > tbox::Dimension(1)) {
+                  y = lowerx[1] + dx[1] * (bi() (0) - loweri(0));
+               }
+               if (d_dim > tbox::Dimension(2)) {
+                  z = lowerx[2] + dx[2] * (bi() (1) - loweri(1) + 0.5);
+               }
+            } else if (axis == 2) {
+               x = lowerx[0] + dx[0] * (bi() (1) - loweri(1) + 0.5);
+               if (d_dim > tbox::Dimension(1)) {
+                  y = lowerx[1] + dx[1] * (bi() (2) - loweri(2) + 0.5);
+               }
+               if (d_dim > tbox::Dimension(2)) {
+                  z = lowerx[2] + dx[2] * (bi() (0) - loweri(0));
+               }
+            }
+            double value = d_Dcoef + d_Acoef * x + d_Bcoef * y + d_Ccoef * z;
+
+            for (int d = 0; d < depth; d++) {
+               data->getArrayData(axis, f) (bi(), d) = value;
+            }
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Verify results of communication operations.  This test must be        *
+ * consistent with data initialization and boundary operations above.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool OuterfaceDataTest::verifyResults(
+   const hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number)
+{
+   (void)hierarchy;
+   bool test_failed = false;
+   if (d_do_refine || d_do_coarsen) {
+
+      tbox::plog << "\nEntering OuterfaceDataTest::verifyResults..." << endl;
+      tbox::plog << "level_number = " << level_number << endl;
+      tbox::plog << "Patch box = " << patch.getBox() << endl;
+
+      hier::IntVector tgcw(d_dim, 0);
+      for (int i = 0; i < d_variables_dst.getSize(); i++) {
+         tgcw.max(patch.getPatchData(d_variables_dst[i], getDataContext())->
+            getGhostCellWidth());
+      }
+      hier::Box pbox = patch.getBox();
+
+      tbox::Pointer<pdat::FaceData<double> > solution(
+         new pdat::FaceData<double>(pbox, 1, tgcw));
+
+      hier::Box tbox(pbox);
+      tbox.grow(tgcw);
+
+      if (d_do_refine) {
+         setLinearData(solution, tbox, patch);
+      } else {
+         setLinearData(solution, tbox, patch); //, hierarchy, level_number);
+      }
+
+      for (int i = 0; i < d_variables_dst.getSize(); i++) {
+
+         tbox::Pointer<pdat::FaceData<double> > face_data =
+            patch.getPatchData(d_variables_dst[i], getDataContext());
+         int depth = face_data->getDepth();
+         hier::Box dbox = face_data->getGhostBox();
+
+         for (int id = 0; id < d_dim.getValue(); id++) {
+            for (pdat::FaceIterator fi(dbox, id); fi; fi++) {
+               double correct = (*solution)(fi());
+               for (int d = 0; d < depth; d++) {
+                  double result = (*face_data)(fi(), d);
+                  if (!tbox::MathUtilities<double>::equalEps(correct,
+                         result)) {
+                     tbox::perr << "Test FAILED: ...."
+                                << " : face_data index = " << fi() << endl;
+                     tbox::perr << "    hier::Variable = "
+                     << d_variable_src_name[i]
+                     << " : depth index = " << d << endl;
+                     tbox::perr << "    result = " << result
+                                << " : correct = " << correct << endl;
+                     test_failed = true;
+                  }
+               }
+            }
+         }
+
+      }
+      if (!test_failed) {
+         tbox::plog << "Outerface test Successful!" << endl;
+      }
+
+      solution.setNull();   // just to be anal...
+
+      tbox::plog << "\nExiting OuterfaceDataTest::verifyResults..." << endl;
+      tbox::plog << "level_number = " << level_number << endl;
+      tbox::plog << "Patch box = " << patch.getBox() << endl << endl;
+
+   }
+
+   return !test_failed;
+}
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/OuterfaceDataTest.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/OuterfaceDataTest.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,183 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR communication tests for outerface-centered patch data 
+ *
+ ************************************************************************/
+
+#ifndef included_OuterfaceDataTest
+#define included_OuterfaceDataTest
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/OuterfaceData.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "PatchDataTestStrategy.h"
+#include "SAMRAI/tbox/Pointer.h"
+#ifndef included_String
+#include <string>
+using namespace std;
+#define included_String
+#endif
+#include "SAMRAI/hier/Variable.h"
+
+namespace SAMRAI {
+
+class CommTester;
+
+/**
+ * Class OuterfaceDataTest provides routines to test communication operations
+ * for outerface-centered patch data on an AMR patch hierarchy.
+ *
+ * Required input keys and data types for test:
+ *
+ *   NONE...
+ *
+ * See PatchDataTestStrategy header file comments for variable and
+ * refinement input data description.  Additionally, there are two
+ * optional input parameters for each face variable.  These are:
+ *
+ *
+ *
+ *
+ *
+ *    - \b  use_fine_value_at_interface   which values to use at coarse-
+ *                                          fine interface (default = TRUE)
+ *
+ *
+ *
+ *
+ *
+ */
+
+class OuterfaceDataTest:public PatchDataTestStrategy
+{
+public:
+   /**
+    * The constructor initializes variable data arrays to zero length.
+    */
+   OuterfaceDataTest(
+      const std::string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> main_input_db,
+      bool do_refine,
+      bool do_coarsen,
+      const std::string& refine_option);
+
+   /**
+    * Virtual destructor for OuterfaceDataTest.
+    */
+   ~OuterfaceDataTest();
+
+   /**
+    * User-supplied boundary conditions.  Note that we do not implement
+    * user-defined coarsen and refine operations.
+    */
+   virtual void
+   setPhysicalBoundaryConditions(
+      const hier::Patch& patch,
+      const double time,
+      const hier::IntVector& gcw) const;
+
+   /**
+    * This function is called from the CommTester constructor.  Its
+    * purpose is to register variables used in the patch data test
+    * and appropriate communication parameters (ghost cell widths,
+    * coarsen/refine operations) with the CommTester object, which
+    * manages the variable storage.
+    */
+   void
+   registerVariables(
+      CommTester* commtest);
+
+   /**
+    * Function for setting data on new patch in hierarchy.
+    *
+    * @param src_or_dst Flag set to 's' for source or 'd' for destination
+    *        to indicate variables to set data for.
+    */
+   virtual void
+   initializeDataOnPatch(
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number,
+      char src_or_dst);
+
+   /**
+    * Function for checking results of communication operations.
+    */
+   bool
+   verifyResults(
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number);
+
+private:
+   /*
+    * Function for reading test data from input file.
+    */
+   void
+   readTestInput(
+      tbox::Pointer<tbox::Database> db);
+
+   void
+   setLinearData(
+      tbox::Pointer<pdat::FaceData<double> > data,
+      const hier::Box& box,
+      const hier::Patch& patch) const;
+
+   void
+   setLinearData(
+      tbox::Pointer<pdat::OuterfaceData<double> > data,
+      const hier::Box& box,
+      const hier::Patch& patch) const;
+
+   void
+   checkPatchInteriorData(
+      const tbox::Pointer<pdat::OuterfaceData<double> >& data,
+      const hier::Box& interior,
+      const tbox::Pointer<geom::CartesianPatchGeometry>& pgeom) const;
+
+   const tbox::Dimension d_dim;
+
+   /*
+    * Object std::string identifier for error reporting
+    */
+   std::string d_object_name;
+
+   /*
+    * Data members specific to this outerface data test.
+    */
+   tbox::Pointer<geom::CartesianGridGeometry> d_cart_grid_geometry;
+
+   tbox::Array<bool> d_use_fine_value_at_interface;
+
+   double d_Acoef;
+   double d_Bcoef;
+   double d_Ccoef;
+   double d_Dcoef;
+
+   bool d_do_refine;
+   bool d_do_coarsen;
+   std::string d_refine_option;
+   int d_finest_level_number;
+
+   tbox::Array<tbox::Pointer<hier::Variable> > d_variables_src;
+   tbox::Array<tbox::Pointer<hier::Variable> > d_variables_dst;
+
+};
+
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/OuternodeDataTest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/OuternodeDataTest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,476 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR communication tests for node-centered patch data 
+ *
+ ************************************************************************/
+
+#include "OuternodeDataTest.h"
+
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeIndex.h"
+#include "SAMRAI/pdat/NodeIterator.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "SAMRAI/pdat/OuternodeVariable.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "CommTester.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+namespace SAMRAI {
+
+using namespace std;
+
+OuternodeDataTest::OuternodeDataTest(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> main_input_db,
+   bool do_refine,
+   bool do_coarsen,
+   const string& refine_option):
+   PatchDataTestStrategy(dim),
+   d_dim(dim)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!main_input_db.isNull());
+   TBOX_ASSERT(!refine_option.empty());
+#endif
+
+   d_object_name = object_name;
+
+   d_do_refine = do_refine;
+   d_do_coarsen = false;
+   if (!do_refine) {
+      d_do_coarsen = do_coarsen;
+   }
+   if (d_do_refine) {
+      TBOX_ERROR("There is no refine test for Outernode data type, because\n"
+         << "Outernode refinement does not exist at this time.");
+      /*
+       * The refine codes are still kept in this class in case we
+       * somehow define Outernode refinement in the future.
+       */
+   }
+
+   d_refine_option = refine_option;
+
+   d_Acoef = 0.0;
+   d_Bcoef = 0.0;
+   d_Ccoef = 0.0;
+   d_Dcoef = 0.0;
+
+   d_finest_level_number = main_input_db->
+      getDatabase("PatchHierarchy")->
+      getInteger("max_levels") - 1;
+
+   d_cart_grid_geometry = new geom::CartesianGridGeometry(
+         dim,
+         "CartesianGridGeometry",
+         main_input_db->getDatabase("CartesianGridGeometry"));
+
+   setGridGeometry(d_cart_grid_geometry);
+
+   readTestInput(main_input_db->getDatabase("OuternodePatchDataTest"));
+
+}
+
+OuternodeDataTest::~OuternodeDataTest()
+{
+}
+
+void OuternodeDataTest::readTestInput(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   /*
+    * Read coeeficients of linear profile to test interpolation.
+    */
+   if (db->keyExists("Acoef")) {
+      d_Acoef = db->getDouble("Acoef");
+   } else {
+      TBOX_ERROR(d_object_name << " input error: No `Acoeff' found." << endl);
+   }
+   if (db->keyExists("Dcoef")) {
+      d_Dcoef = db->getDouble("Dcoef");
+   } else {
+      TBOX_ERROR(d_object_name << " input error: No `Dcoef' found." << endl);
+   }
+   if (d_dim > tbox::Dimension(1)) {
+      if (db->keyExists("Bcoef")) {
+         d_Bcoef = db->getDouble("Bcoef");
+      } else {
+         TBOX_ERROR(d_object_name << " input error: No `Bcoef' found." << endl);
+      }
+   }
+   if (d_dim > tbox::Dimension(2)) {
+      if (db->keyExists("Ccoef")) {
+         d_Ccoef = db->getDouble("Ccoef");
+      } else {
+         TBOX_ERROR(d_object_name << " input error: No `Ccoef' found." << endl);
+      }
+   }
+
+   /*
+    * Base class reads variable parameters and boxes to refine.
+    */
+
+   readVariableInput(db->getDatabase("VariableData"));
+   readRefinementInput(db->getDatabase("RefinementData"));
+}
+
+void OuternodeDataTest::registerVariables(
+   CommTester* commtest)
+{
+   TBOX_ASSERT(commtest != (CommTester *)NULL);
+
+   int nvars = d_variable_src_name.getSize();
+
+   d_variables_src.resizeArray(nvars);
+   d_variables_dst.resizeArray(nvars);
+
+   for (int i = 0; i < nvars; i++) {
+      d_variables_src[i] =
+         new pdat::OuternodeVariable<double>(
+            d_dim,
+            d_variable_src_name[i],
+            d_variable_depth[i]);
+      d_variables_dst[i] =
+         new pdat::NodeVariable<double>(
+            d_dim,
+            d_variable_dst_name[i],
+            d_variable_depth[i]);
+
+      if (d_do_refine) {
+         commtest->registerVariable(d_variables_src[i],
+            d_variables_dst[i],
+            d_variable_src_ghosts[i],
+            d_variable_dst_ghosts[i],
+            d_cart_grid_geometry,
+            d_variable_refine_op[i]);
+      } else if (d_do_coarsen) {
+         commtest->registerVariable(d_variables_src[i],
+            d_variables_dst[i],
+            d_variable_src_ghosts[i],
+            d_variable_dst_ghosts[i],
+            d_cart_grid_geometry,
+            d_variable_coarsen_op[i]);
+      }
+
+   }
+
+}
+
+void OuternodeDataTest::setLinearData(
+   tbox::Pointer<pdat::NodeData<double> > data,
+   const hier::Box& box,
+   const hier::Patch& patch) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+
+   tbox::Pointer<geom::CartesianPatchGeometry> pgeom = patch.getPatchGeometry();
+   const pdat::NodeIndex loweri(
+      patch.getBox().lower(), (pdat::NodeIndex::Corner)0);
+   const double* dx = pgeom->getDx();
+   const double* lowerx = pgeom->getXLower();
+   double x, y, z;
+
+   const int depth = data->getDepth();
+
+   const hier::Box sbox = data->getGhostBox() * box;
+
+   for (pdat::NodeIterator ci(sbox); ci; ci++) {
+
+      /*
+       * Compute spatial location of node center and
+       * set data to linear profile.
+       */
+
+      x = lowerx[0] + dx[0] * (ci() (0) - loweri(0));
+      y = z = 0.;
+      if (d_dim > tbox::Dimension(1)) {
+         y = lowerx[1] + dx[1] * (ci() (1) - loweri(1));
+      }
+      if (d_dim > tbox::Dimension(2)) {
+         z = lowerx[2] + dx[2] * (ci() (2) - loweri(2));
+      }
+
+      for (int d = 0; d < depth; d++) {
+         (*data)(ci(), d) = d_Dcoef + d_Acoef * x + d_Bcoef * y + d_Ccoef * z;
+      }
+
+   }
+
+}
+
+void OuternodeDataTest::setLinearData(
+   tbox::Pointer<pdat::OuternodeData<double> > data,
+   const hier::Box& box,
+   const hier::Patch& patch) const
+{
+   NULL_USE(box);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+   TBOX_ASSERT(box == patch.getBox());
+   if (box != data->getBox()) {
+      TBOX_ERROR("Box is not identical to data box, which is\n"
+         << "required for testing Outernode communication.");
+   }
+#endif
+
+   tbox::Pointer<geom::CartesianPatchGeometry> pgeom = patch.getPatchGeometry();
+   const pdat::NodeIndex loweri(
+      patch.getBox().lower(), (pdat::NodeIndex::Corner)0);
+   const double* dx = pgeom->getDx();
+   const double* lowerx = pgeom->getXLower();
+   double x, y, z;
+
+   const int depth = data->getDepth();
+
+   int n, s;
+   for (n = 0; n < d_dim.getValue(); ++n) {
+      for (s = 0; s < 2; ++s) {
+         const hier::Box databox = data->getDataBox(n, s);
+         for (hier::Box::Iterator bi(databox); bi; bi++) {
+
+            /*
+             * Compute spatial location of node center and
+             * set data to linear profile.
+             */
+
+            x = lowerx[0] + dx[0] * (bi() (0) - loweri(0));
+            y = z = 0.;
+            if (d_dim > tbox::Dimension(1)) {
+               y = lowerx[1] + dx[1] * (bi() (1) - loweri(1));
+            }
+            if (d_dim > tbox::Dimension(2)) {
+               z = lowerx[2] + dx[2] * (bi() (2) - loweri(2));
+            }
+
+            pdat::NodeIndex ni(bi(), (pdat::NodeIndex::Corner)0);
+            for (int d = 0; d < depth; d++) {
+               (*data)(ni,
+                       d) = d_Dcoef + d_Acoef * x + d_Bcoef * y + d_Ccoef * z;
+            }
+         }
+      }
+
+   }
+
+}
+
+void OuternodeDataTest::initializeDataOnPatch(
+   const hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number,
+   char src_or_dst)
+{
+   NULL_USE(hierarchy);
+   NULL_USE(level_number);
+   hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+   variable_db->printClassData();
+   tbox::Array<tbox::Pointer<hier::Variable> >& variables =
+      src_or_dst == 's' ? d_variables_src : d_variables_dst;
+
+   if (d_do_refine) {
+
+      for (int i = 0; i < variables.getSize(); i++) {
+
+         tbox::Pointer<hier::PatchData> data = patch.getPatchData(variables[i],
+               getDataContext());
+         TBOX_ASSERT(!data.isNull());
+
+         tbox::Pointer<pdat::OuternodeData<double> > onode_data = data;
+         tbox::Pointer<pdat::NodeData<double> > node_data = data;
+
+         hier::Box dbox = data->getBox();
+
+         if (!node_data.isNull()) {
+            setLinearData(node_data, dbox, patch);
+         }
+         if (!onode_data.isNull()) {
+            setLinearData(onode_data, dbox, patch);
+         }
+
+      }
+
+   } else if (d_do_coarsen) {
+
+      for (int i = 0; i < variables.getSize(); i++) {
+
+         tbox::Pointer<hier::PatchData> data = patch.getPatchData(variables[i],
+               getDataContext());
+         TBOX_ASSERT(!data.isNull());
+         tbox::Pointer<pdat::OuternodeData<double> > onode_data = data;
+         tbox::Pointer<pdat::NodeData<double> > node_data = data;
+
+         hier::Box dbox = data->getGhostBox();
+
+         if (!node_data.isNull()) {
+            setLinearData(node_data, dbox, patch);
+         }
+         if (!onode_data.isNull()) {
+            setLinearData(onode_data, dbox, patch);
+         }
+
+      }
+
+   }
+
+}
+
+void OuternodeDataTest::checkPatchInteriorData(
+   const tbox::Pointer<pdat::OuternodeData<double> >& data,
+   const hier::Box& interior,
+   const tbox::Pointer<geom::CartesianPatchGeometry>& pgeom) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+
+   const pdat::NodeIndex loweri(interior.lower(), (pdat::NodeIndex::Corner)0);
+   const double* dx = pgeom->getDx();
+   const double* lowerx = pgeom->getXLower();
+   double x, y, z;
+
+   const int depth = data->getDepth();
+
+   for (pdat::NodeIterator ci(interior); ci; ci++) {
+
+      /*
+       * Compute spatial location of edge and
+       * compare data to linear profile.
+       */
+
+      x = lowerx[0] + dx[0] * (ci() (0) - loweri(0));
+      y = z = 0.;
+      if (d_dim > tbox::Dimension(1)) {
+         y = lowerx[1] + dx[1] * (ci() (1) - loweri(1));
+      }
+      if (d_dim > tbox::Dimension(2)) {
+         z = lowerx[2] + dx[2] * (ci() (2) - loweri(2));
+      }
+
+      double value;
+      for (int d = 0; d < depth; d++) {
+         value = d_Dcoef + d_Acoef * x + d_Bcoef * y + d_Ccoef * z;
+         if (!(tbox::MathUtilities<double>::equalEps((*data)(ci(),
+                                                             d), value))) {
+            tbox::perr << "FAILED: -- patch interior not properly filled"
+                       << endl;
+         }
+      }
+
+   }
+
+}
+
+void OuternodeDataTest::setPhysicalBoundaryConditions(
+   const hier::Patch& patch,
+   const double time,
+   const hier::IntVector& gcw) const
+{
+   (void)patch;
+   (void)gcw;
+   (void)time;
+
+   TBOX_ERROR("Only coarsen operations can be done with this test.\n"
+      << "Coarsen operations should not need physical bc.\n");
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Verify results of communication operations.  This test must be        *
+ * consistent with data initialization and boundary operations above.    *
+ *                                                                       *
+ *************************************************************************
+ */
+bool OuternodeDataTest::verifyResults(
+   const hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number)
+{
+   (void)hierarchy;
+   bool test_failed = false;
+   if (d_do_refine || d_do_coarsen) {
+
+      tbox::plog << "\nEntering OuternodeDataTest::verifyResults..." << endl;
+      tbox::plog << "level_number = " << level_number << endl;
+      tbox::plog << "Patch box = " << patch.getBox() << endl;
+
+      hier::IntVector tgcw(d_dim, 0);
+      for (int i = 0; i < d_variables_dst.getSize(); i++) {
+         tgcw.max(patch.getPatchData(d_variables_dst[i], getDataContext())->
+            getGhostCellWidth());
+      }
+      hier::Box pbox = patch.getBox();
+
+      tbox::Pointer<pdat::NodeData<double> > solution(
+         new pdat::NodeData<double>(pbox, 1, tgcw));
+
+      hier::Box tbox(pbox);
+      tbox.grow(tgcw);
+
+      if (d_do_refine) {
+         setLinearData(solution, tbox, patch);
+      } else {
+         setLinearData(solution, tbox,
+            patch);                 //, hierarchy, level_number);
+      }
+
+      for (int i = 0; i < d_variables_dst.getSize(); i++) {
+
+         tbox::Pointer<pdat::NodeData<double> > node_data =
+            patch.getPatchData(d_variables_dst[i], getDataContext());
+         int depth = node_data->getDepth();
+         hier::Box dbox = node_data->getGhostBox();
+
+         for (pdat::NodeIterator ci(dbox); ci; ci++) {
+            double correct = (*solution)(ci());
+            for (int d = 0; d < depth; d++) {
+               double result = (*node_data)(ci(), d);
+               if (!tbox::MathUtilities<double>::equalEps(correct, result)) {
+                  tbox::perr << "Test FAILED: ...."
+                             << " : node index = " << ci() << endl;
+                  tbox::perr << "    hier::Variable = "
+                  << d_variable_src_name[i]
+                  << " : depth index = " << d << endl;
+                  tbox::perr << "    result = " << result
+                             << " : correct = " << correct << endl;
+                  test_failed = true;
+               }
+            }
+         }
+
+      }
+      if (!test_failed) {
+         tbox::plog << "Outernode test Successful!" << endl;
+      }
+
+      solution.setNull();   // just to be anal...
+
+      tbox::plog << "\nExiting OuternodeDataTest::verifyResults..." << endl;
+      tbox::plog << "level_number = " << level_number << endl;
+      tbox::plog << "Patch box = " << patch.getBox() << endl << endl;
+
+   }
+
+   return !test_failed;
+}
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/OuternodeDataTest.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/OuternodeDataTest.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,189 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR communication tests for node-centered patch data 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_OuternodeDataTest
+#define included_pdat_OuternodeDataTest
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/OuternodeData.h"
+#include "SAMRAI/hier/Patch.h"
+#include "PatchDataTestStrategy.h"
+#include "SAMRAI/tbox/Pointer.h"
+#ifndef included_String
+#include <string>
+using namespace std;
+#define included_String
+#endif
+#include "SAMRAI/hier/Variable.h"
+
+namespace SAMRAI {
+
+class CommTester;
+
+/**
+ * Class OuternodeDataTest provides routines to test communication operations
+ * for node-centered patch data on an AMR patch hierarchy.
+ *
+ * Required input keys and data types:
+ *
+ *
+ *
+ *
+ *   Double values that define linear function initial data to test refine
+ *   operations (Ax + By + Cz + D = f(x,y,z), where f(x,y,z) is the value
+ *   assigned to each array value at initialization and against which
+ *   linear interpolation is tested:
+ *
+ *    Acoef, Dcoef always required.
+ *    If (dim > 1), Bcoef is needed.
+ *    If (dim > 2), Ccoef is needed.
+ *
+ *
+ *
+ *
+ *
+ * See PatchDataTestStrategy header file comments for variable and
+ * refinement input data description.
+ */
+
+class OuternodeDataTest:public PatchDataTestStrategy
+{
+public:
+   /**
+    * The constructor initializes variable data arrays to zero length.
+    */
+   OuternodeDataTest(
+      const std::string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> main_input_db,
+      bool do_refine,
+      bool do_coarsen,
+      const std::string& refine_option);
+
+   /**
+    * Virtual destructor for OuternodeDataTest.
+    */
+   ~OuternodeDataTest();
+
+   /**
+    * User-supplied boundary conditions.  Note that we do not implement
+    * user-defined coarsen and refine operations.
+    */
+   virtual void
+   setPhysicalBoundaryConditions(
+      const hier::Patch& patch,
+      const double time,
+      const hier::IntVector&) const;
+
+   /**
+    * This function is called from the CommTester constructor.  Its
+    * purpose is to register variables used in the patch data test
+    * and appropriate communication parameters (ghost node widths,
+    * coarsen/refine operations) with the CommTester object, which
+    * manages the variable storage.
+    */
+   void
+   registerVariables(
+      CommTester* commtest);
+
+   /**
+    * Function for setting data on new patch in hierarchy.
+    *
+    * @param src_or_dst Flag set to 's' for source or 'd' for destination
+    *        to indicate variables to set data for.
+    */
+   virtual void
+   initializeDataOnPatch(
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number,
+      char src_or_dst);
+
+   /**
+    * Function for checking results of communication operations.
+    */
+   bool
+   verifyResults(
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number);
+
+private:
+   /**
+    * Function for reading test data from input file.
+    */
+   void
+   readTestInput(
+      tbox::Pointer<tbox::Database> db);
+
+   /**
+    * Set linear function data for testing interpolation
+    */
+   void
+   setLinearData(
+      tbox::Pointer<pdat::OuternodeData<double> > data,
+      const hier::Box& box,
+      const hier::Patch& patch) const;
+
+   /**
+    * Set linear function data for testing interpolation
+    */
+   void
+   setLinearData(
+      tbox::Pointer<pdat::NodeData<double> > data,
+      const hier::Box& box,
+      const hier::Patch& patch) const;
+
+   void
+   checkPatchInteriorData(
+      const tbox::Pointer<pdat::OuternodeData<double> >& data,
+      const hier::Box& interior,
+      const tbox::Pointer<geom::CartesianPatchGeometry>& pgeom) const;
+
+   const tbox::Dimension d_dim;
+
+   /*
+    * Object std::string identifier for error reporting
+    */
+   std::string d_object_name;
+
+   /*
+    * Data members specific to this node data test.
+    */
+   tbox::Pointer<geom::CartesianGridGeometry> d_cart_grid_geometry;
+
+   /*
+    * Data members specific to this node data test.
+    */
+   double d_Acoef;
+   double d_Bcoef;
+   double d_Ccoef;
+   double d_Dcoef;
+
+   bool d_do_refine;
+   bool d_do_coarsen;
+   std::string d_refine_option;
+   int d_finest_level_number;
+
+   tbox::Array<tbox::Pointer<hier::Variable> > d_variables_src;
+   tbox::Array<tbox::Pointer<hier::Variable> > d_variables_dst;
+
+};
+
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/OutersideDataTest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/OutersideDataTest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,542 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR communication tests for outerside-centered patch data 
+ *
+ ************************************************************************/
+
+#include "OutersideDataTest.h"
+
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "CommTester.h"
+#include "SAMRAI/pdat/SideGeometry.h"
+#include "SAMRAI/pdat/SideIndex.h"
+#include "SAMRAI/pdat/SideIterator.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/pdat/OutersideGeometry.h"
+#include "SAMRAI/pdat/OutersideVariable.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+namespace SAMRAI {
+
+using namespace std;
+
+OutersideDataTest::OutersideDataTest(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> main_input_db,
+   bool do_refine,
+   bool do_coarsen,
+   const string& refine_option):
+   PatchDataTestStrategy(dim),
+   d_dim(dim)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!main_input_db.isNull());
+   TBOX_ASSERT(!refine_option.empty());
+#endif
+
+   d_object_name = object_name;
+
+   d_do_refine = do_refine;
+   d_do_coarsen = false;
+   if (!do_refine) {
+      d_do_coarsen = do_coarsen;
+   }
+   if (d_do_refine) {
+      TBOX_ERROR("There is no refine test for Outerside data type, because\n"
+         << "Outerside refinement does not exist at this time.");
+      /*
+       * The refine codes are still kept in this class in case we
+       * implement Outerside refinement in the future.
+       */
+   }
+
+   d_refine_option = refine_option;
+
+   d_use_fine_value_at_interface.resizeArray(0);
+
+   d_Acoef = 0.0;
+   d_Bcoef = 0.0;
+   d_Ccoef = 0.0;
+   d_Dcoef = 0.0;
+
+   d_finest_level_number = main_input_db->
+      getDatabase("PatchHierarchy")->
+      getInteger("max_levels") - 1;
+
+   d_cart_grid_geometry = new geom::CartesianGridGeometry(
+         dim,
+         "CartesianGridGeometry",
+         main_input_db->getDatabase("CartesianGridGeometry"));
+
+   setGridGeometry(d_cart_grid_geometry);
+   readTestInput(main_input_db->getDatabase("OutersidePatchDataTest"));
+
+}
+
+OutersideDataTest::~OutersideDataTest()
+{
+}
+
+void OutersideDataTest::readTestInput(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   /*
+    * Base class reads variable parameters and boxes to refine.
+    */
+
+   readVariableInput(db->getDatabase("VariableData"));
+   readRefinementInput(db->getDatabase("RefinementData"));
+
+   tbox::Pointer<tbox::Database> var_data = db->getDatabase("VariableData");
+   tbox::Array<string> var_keys = var_data->getAllKeys();
+   int nkeys = var_keys.getSize();
+
+   d_use_fine_value_at_interface.resizeArray(nkeys);
+
+   for (int i = 0; i < nkeys; i++) {
+      tbox::Pointer<tbox::Database> var_db = var_data->getDatabase(var_keys[i]);
+
+      if (var_db->keyExists("use_fine_value_at_interface")) {
+         d_use_fine_value_at_interface[i] =
+            var_db->getBool("use_fine_value_at_interface");
+      } else {
+         d_use_fine_value_at_interface[i] = true;
+      }
+
+   }
+
+   if (db->keyExists("Acoef")) {
+      d_Acoef = db->getDouble("Acoef");
+   } else {
+      TBOX_ERROR(d_object_name << " input error: No `Acoeff' found." << endl);
+   }
+   if (db->keyExists("Dcoef")) {
+      d_Dcoef = db->getDouble("Dcoef");
+   } else {
+      TBOX_ERROR(d_object_name << " input error: No `Dcoef' found." << endl);
+   }
+   if (d_dim > tbox::Dimension(1)) {
+      if (db->keyExists("Bcoef")) {
+         d_Bcoef = db->getDouble("Bcoef");
+      } else {
+         TBOX_ERROR(d_object_name << " input error: No `Bcoef' found." << endl);
+      }
+   }
+   if (d_dim > tbox::Dimension(2)) {
+      if (db->keyExists("Ccoef")) {
+         d_Ccoef = db->getDouble("Ccoef");
+      } else {
+         TBOX_ERROR(d_object_name << " input error: No `Ccoef' found." << endl);
+      }
+   }
+
+}
+
+void OutersideDataTest::registerVariables(
+   CommTester* commtest)
+{
+   TBOX_ASSERT(commtest != (CommTester *)NULL);
+
+   int nvars = d_variable_src_name.getSize();
+
+   d_variables_src.resizeArray(nvars);
+   d_variables_dst.resizeArray(nvars);
+
+   for (int i = 0; i < nvars; i++) {
+      d_variables_src[i] =
+         new pdat::OutersideVariable<double>(
+            d_dim,
+            d_variable_src_name[i],
+            d_variable_depth[i]);
+      d_variables_dst[i] =
+         new pdat::SideVariable<double>(
+            d_dim,
+            d_variable_dst_name[i],
+            d_variable_depth[i],
+            d_use_fine_value_at_interface[i]);
+
+      if (d_do_refine) {
+         commtest->registerVariable(d_variables_src[i],
+            d_variables_dst[i],
+            d_variable_src_ghosts[i],
+            d_variable_dst_ghosts[i],
+            d_cart_grid_geometry,
+            d_variable_refine_op[i]);
+      } else if (d_do_coarsen) {
+         commtest->registerVariable(d_variables_src[i],
+            d_variables_dst[i],
+            d_variable_src_ghosts[i],
+            d_variable_dst_ghosts[i],
+            d_cart_grid_geometry,
+            d_variable_coarsen_op[i]);
+      }
+
+   }
+
+}
+
+void OutersideDataTest::initializeDataOnPatch(
+   const hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number,
+   char src_or_dst)
+{
+   NULL_USE(hierarchy);
+   NULL_USE(level_number);
+   hier::VariableDatabase* variable_db =
+      hier::VariableDatabase::getDatabase();
+   variable_db->printClassData();
+   tbox::Array<tbox::Pointer<hier::Variable> >& variables =
+      src_or_dst == 's' ? d_variables_src : d_variables_dst;
+
+   if (d_do_refine) {
+
+      for (int i = 0; i < variables.getSize(); i++) {
+
+         tbox::Pointer<hier::PatchData> data =
+            patch.getPatchData(variables[i], getDataContext());
+
+         TBOX_ASSERT(!data.isNull());
+
+         tbox::Pointer<pdat::OutersideData<double> > oside_data = data;
+         tbox::Pointer<pdat::SideData<double> > side_data = data;
+
+         hier::Box dbox = data->getBox();
+
+         if (!side_data.isNull()) {
+            setLinearData(side_data, dbox, patch);
+         }
+         if (!oside_data.isNull()) {
+            setLinearData(oside_data, dbox, patch);
+         }
+
+      }
+
+   } else if (d_do_coarsen) {
+
+      for (int i = 0; i < variables.getSize(); i++) {
+
+         tbox::Pointer<hier::PatchData> data =
+            patch.getPatchData(variables[i], getDataContext());
+
+         TBOX_ASSERT(!data.isNull());
+
+         tbox::Pointer<pdat::OutersideData<double> > oside_data = data;
+         tbox::Pointer<pdat::SideData<double> > side_data = data;
+
+         hier::Box dbox = data->getGhostBox();
+
+         if (!side_data.isNull()) {
+            setLinearData(side_data, dbox, patch);
+         }
+         if (!oside_data.isNull()) {
+            setLinearData(oside_data, dbox, patch);
+         }
+      }
+
+   }
+
+}
+
+void OutersideDataTest::checkPatchInteriorData(
+   const tbox::Pointer<pdat::OutersideData<double> >& data,
+   const hier::Box& interior,
+   const tbox::Pointer<geom::CartesianPatchGeometry>& pgeom) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+
+   const double* dx = pgeom->getDx();
+   const double* lowerx = pgeom->getXLower();
+   double x = 0., y = 0., z = 0.;
+
+   const int depth = data->getDepth();
+
+   for (int axis = 0; axis < d_dim.getValue(); axis++) {
+      const pdat::SideIndex loweri(interior.lower(), axis, 0);
+      for (pdat::SideIterator si(interior, axis); si; si++) {
+
+         /*
+          * Compute spatial location of face and
+          * set data to linear profile.
+          */
+
+         if (axis == 0) {
+            x = lowerx[0] + dx[0] * (si() (0) - loweri(0));
+         } else {
+            x = lowerx[0] + dx[0] * (si() (0) - loweri(0) + 0.5);
+         }
+         y = z = 0.;
+         if (d_dim > tbox::Dimension(1)) {
+            if (axis == 1) {
+               y = lowerx[1] + dx[1] * (si() (1) - loweri(1));
+            } else {
+               y = lowerx[1] + dx[1] * (si() (1) - loweri(1) + 0.5);
+            }
+         }
+         if (d_dim > tbox::Dimension(2)) {
+            if (axis == 2) {
+               z = lowerx[2] + dx[2] * (si() (2) - loweri(2));
+            } else {
+               z = lowerx[2] + dx[2] * (si() (2) - loweri(2) + 0.5);
+            }
+         }
+
+         double value;
+         for (int d = 0; d < depth; d++) {
+            value = d_Dcoef + d_Acoef * x + d_Bcoef * y + d_Ccoef * z;
+
+            if (!(tbox::MathUtilities<double>::equalEps((*data)(si(),
+                                                                d), value))) {
+               tbox::perr << "FAILED: -- patch interior not properly filled"
+                          << endl;
+            }
+         }
+      }
+   }
+}
+
+void OutersideDataTest::setPhysicalBoundaryConditions(
+   const hier::Patch& patch,
+   const double time,
+   const hier::IntVector& gcw) const
+{
+   (void)patch;
+   (void)gcw;
+   (void)time;
+   TBOX_ERROR("Only coarsen operations can be done with this test.\n"
+      << "Coarsen operations should not need physical bc.\n");
+}
+
+void OutersideDataTest::setLinearData(
+   tbox::Pointer<pdat::SideData<double> > data,
+   const hier::Box& box,
+   const hier::Patch& patch) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+
+   tbox::Pointer<geom::CartesianPatchGeometry>
+   pgeom = patch.getPatchGeometry();
+   const double* dx = pgeom->getDx();
+   const double* lowerx = pgeom->getXLower();
+   double x, y, z;
+
+   const int depth = data->getDepth();
+
+   const hier::Box sbox = data->getGhostBox() * box;
+
+   hier::IntVector directions(data->getDirectionVector());
+
+   for (int axis = 0; axis < d_dim.getValue(); axis++) {
+      if (directions(axis)) {
+         const pdat::SideIndex loweri(patch.getBox().lower(), axis, 0);
+         for (pdat::SideIterator ei(sbox, axis); ei; ei++) {
+
+            /*
+             * Compute spatial location of cell center and
+             * set data to linear profile.
+             */
+
+            if (axis == 0) {
+               x = lowerx[0] + dx[0] * (ei() (0) - loweri(0));
+            } else {
+               x = lowerx[0] + dx[0] * (ei() (0) - loweri(0) + 0.5);
+            }
+            y = z = 0.;
+            if (d_dim > tbox::Dimension(1)) {
+               if (axis == 1) {
+                  y = lowerx[1] + dx[1] * (ei() (1) - loweri(1));
+               } else {
+                  y = lowerx[1] + dx[1] * (ei() (1) - loweri(1) + 0.5);
+               }
+            }
+            if (d_dim > tbox::Dimension(2)) {
+               if (axis == 2) {
+                  z = lowerx[2] + dx[2] * (ei() (2) - loweri(2));
+               } else {
+                  z = lowerx[2] + dx[2] * (ei() (2) - loweri(2) + 0.5);
+               }
+            }
+
+            for (int d = 0; d < depth; d++) {
+               (*data)(ei(),
+                       d) = d_Dcoef + d_Acoef * x + d_Bcoef * y + d_Ccoef * z;
+            }
+
+         }
+      }
+   }
+}
+
+void OutersideDataTest::setLinearData(
+   tbox::Pointer<pdat::OutersideData<double> > data,
+   const hier::Box& box,
+   const hier::Patch& patch) const
+{
+   NULL_USE(box);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+
+   tbox::Pointer<geom::CartesianPatchGeometry>
+   pgeom = patch.getPatchGeometry();
+   const double* dx = pgeom->getDx();
+   const double* lowerx = pgeom->getXLower();
+   double x = 0., y = 0., z = 0.;
+
+   const int depth = data->getDepth();
+
+   for (int axis = 0; axis < d_dim.getValue(); axis++) {
+      for (int s = 0; s < 2; s++) {
+         const hier::Box databox = data->getArrayData(axis, s).getBox();
+         const pdat::SideIndex loweri(patch.getBox().lower(), axis, 0);
+         for (hier::Box::Iterator bi(databox); bi; bi++) {
+
+            /*
+             * Compute spatial location of cell center and
+             * set data to linear profile.
+             */
+
+            if (axis == 0) {
+               x = lowerx[0] + dx[0] * (bi() (0) - loweri(0));
+            } else {
+               x = lowerx[0] + dx[0] * (bi() (0) - loweri(0) + 0.5);
+            }
+            y = z = 0.;
+            if (d_dim > tbox::Dimension(1)) {
+               if (axis == 1) {
+                  y = lowerx[1] + dx[1] * (bi() (1) - loweri(1));
+               } else {
+                  y = lowerx[1] + dx[1] * (bi() (1) - loweri(1) + 0.5);
+               }
+            }
+            if (d_dim > tbox::Dimension(2)) {
+               if (axis == 2) {
+                  z = lowerx[2] + dx[2] * (bi() (2) - loweri(2));
+               } else {
+                  z = lowerx[2] + dx[2] * (bi() (2) - loweri(2) + 0.5);
+               }
+            }
+
+            double value = d_Dcoef + d_Acoef * x + d_Bcoef * y + d_Ccoef * z;
+            pdat::SideIndex si(bi(), axis, 0);
+            for (int d = 0; d < depth; d++) {
+               (*data)(si, s, d) = value;
+            }
+         }
+
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Verify results of communication operations.  This test must be        *
+ * consistent with data initialization and boundary operations above.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool OutersideDataTest::verifyResults(
+   const hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number)
+{
+   (void)hierarchy;
+   bool test_failed = false;
+   if (d_do_refine || d_do_coarsen) {
+
+      tbox::plog << "\nEntering OutersideDataTest::verifyResults..." << endl;
+      tbox::plog << "level_number = " << level_number << endl;
+      tbox::plog << "Patch box = " << patch.getBox() << endl;
+
+      hier::IntVector tgcw(d_dim, 0);
+      for (int i = 0; i < d_variables_dst.getSize(); i++) {
+         tgcw.max(patch.getPatchData(d_variables_dst[i], getDataContext())->
+            getGhostCellWidth());
+      }
+      hier::Box pbox = patch.getBox();
+
+      tbox::Pointer<pdat::SideData<double> > solution(
+         new pdat::SideData<double>(pbox, 1, tgcw));
+
+      hier::Box tbox(pbox);
+      tbox.grow(tgcw);
+
+      if (d_do_refine) {
+         setLinearData(solution, tbox, patch);
+      } else {
+         setLinearData(solution, tbox, patch); //, hierarchy, level_number);
+      }
+
+      for (int i = 0; i < d_variables_dst.getSize(); i++) {
+
+         tbox::Pointer<pdat::SideData<double> > side_data =
+            patch.getPatchData(d_variables_dst[i], getDataContext());
+         int depth = side_data->getDepth();
+         hier::Box dbox = side_data->getGhostBox();
+
+         hier::IntVector directions(side_data->getDirectionVector());
+
+         for (int id = 0; id < d_dim.getValue(); id++) {
+            if (directions(id)) {
+               for (pdat::SideIterator si(dbox, id); si; si++) {
+                  double correct = (*solution)(si());
+                  for (int d = 0; d < depth; d++) {
+                     double result = (*side_data)(si(), d);
+                     if (!tbox::MathUtilities<double>::equalEps(correct,
+                            result)) {
+                        tbox::perr << "Test FAILED: ...."
+                                   << " : side_data index = " << si() << endl;
+                        tbox::perr << "    hier::Variable = "
+                        << d_variable_src_name[i]
+                        << " : depth index = " << d << endl;
+                        tbox::perr << "    result = " << result
+                                   << " : correct = " << correct << endl;
+                        test_failed = true;
+                     }
+                  }
+               }
+            }
+         }
+
+      }
+      if (!test_failed) {
+         tbox::plog << "Outerside test Successful!" << endl;
+      }
+
+      solution.setNull();   // just to be anal...
+
+      tbox::plog << "\nExiting OutersidedataTest::verifyResults..." << endl;
+      tbox::plog << "level_number = " << level_number << endl;
+      tbox::plog << "Patch box = " << patch.getBox() << endl << endl;
+
+   }
+
+   return !test_failed;
+
+}
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/OutersideDataTest.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/OutersideDataTest.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,183 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR communication tests for outerside-centered patch data 
+ *
+ ************************************************************************/
+
+#ifndef included_OutersideDataTest
+#define included_OutersideDataTest
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/OutersideData.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "PatchDataTestStrategy.h"
+#include "SAMRAI/tbox/Pointer.h"
+#ifndef included_String
+#include <string>
+using namespace std;
+#define included_String
+#endif
+#include "SAMRAI/hier/Variable.h"
+
+namespace SAMRAI {
+
+class CommTester;
+
+/**
+ * Class OutersideDataTest provides routines to test communication operations
+ * for outerside-centered patch data on an AMR patch hierarchy.
+ *
+ * Required input keys and data types for test:
+ *
+ *   NONE...
+ *
+ * See PatchDataTestStrategy header file comments for variable and
+ * refinement input data description.  Additionally, there are two
+ * optional input parameters for each side variable.  These are:
+ *
+ *
+ *
+ *
+ *
+ *    - \b  use_fine_value_at_interface   which values to use at coarse-
+ *                                          fine interface (default = TRUE)
+ *
+ *
+ *
+ *
+ *
+ */
+
+class OutersideDataTest:public PatchDataTestStrategy
+{
+public:
+   /**
+    * The constructor initializes variable data arrays to zero length.
+    */
+   OutersideDataTest(
+      const std::string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> main_input_db,
+      bool do_refine,
+      bool do_coarsen,
+      const std::string& refine_option);
+
+   /**
+    * Virtual destructor for SideDataTest.
+    */
+   ~OutersideDataTest();
+
+   /**
+    * User-supplied boundary conditions.  Note that we do not implement
+    * user-defined coarsen and refine operations.
+    */
+   virtual void
+   setPhysicalBoundaryConditions(
+      const hier::Patch& patch,
+      const double time,
+      const hier::IntVector& gcw) const;
+
+   /**
+    * This function is called from the CommTester constructor.  Its
+    * purpose is to register variables used in the patch data test
+    * and appropriate communication parameters (ghost cell widths,
+    * coarsen/refine operations) with the CommTester object, which
+    * manages the variable storage.
+    */
+   void
+   registerVariables(
+      CommTester* commtest);
+
+   /**
+    * Function for setting data on new patch in hierarchy.
+    *
+    * @param src_or_dst Flag set to 's' for source or 'd' for destination
+    *        to indicate variables to set data for.
+    */
+   virtual void
+   initializeDataOnPatch(
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number,
+      char src_or_dst);
+
+   /**
+    * Function for checking results of communication operations.
+    */
+   bool
+   verifyResults(
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number);
+
+private:
+   /*
+    * Function for reading test data from input file.
+    */
+   void
+   readTestInput(
+      tbox::Pointer<tbox::Database> db);
+
+   void
+   setLinearData(
+      tbox::Pointer<pdat::OutersideData<double> > data,
+      const hier::Box& box,
+      const hier::Patch& patch) const;
+
+   void
+   setLinearData(
+      tbox::Pointer<pdat::SideData<double> > data,
+      const hier::Box& box,
+      const hier::Patch& patch) const;
+
+   void
+   checkPatchInteriorData(
+      const tbox::Pointer<pdat::OutersideData<double> >& data,
+      const hier::Box& interior,
+      const tbox::Pointer<geom::CartesianPatchGeometry>& pgeom) const;
+
+   const tbox::Dimension d_dim;
+
+   /*
+    * Object std::string identifier for error reporting
+    */
+   std::string d_object_name;
+
+   /*
+    * Data members specific to this outerside data test.
+    */
+   tbox::Pointer<geom::CartesianGridGeometry> d_cart_grid_geometry;
+
+   tbox::Array<bool> d_use_fine_value_at_interface;
+
+   double d_Acoef;
+   double d_Bcoef;
+   double d_Ccoef;
+   double d_Dcoef;
+
+   bool d_do_refine;
+   bool d_do_coarsen;
+   std::string d_refine_option;
+   int d_finest_level_number;
+
+   tbox::Array<tbox::Pointer<hier::Variable> > d_variables_src;
+   tbox::Array<tbox::Pointer<hier::Variable> > d_variables_dst;
+
+};
+
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/PatchDataTestStrategy.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/PatchDataTestStrategy.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,215 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Base class for patch data test operations. 
+ *
+ ************************************************************************/
+
+#include "PatchDataTestStrategy.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+namespace SAMRAI {
+
+using namespace std;
+
+// These are used in the cell tagging routine.
+#ifndef TRUE
+#define TRUE (1)
+#endif
+#ifndef FALSE
+#define FALSE (0)
+#endif
+
+/*
+ *************************************************************************
+ *									*
+ * The constructor and destructor.                                       *
+ *									*
+ *************************************************************************
+ */
+
+PatchDataTestStrategy::PatchDataTestStrategy(
+   const tbox::Dimension& dim):
+   d_dim(dim)
+{
+   d_variable_src_name.resizeArray(0);
+   d_variable_dst_name.resizeArray(0);
+   d_variable_depth.resizeArray(0);
+   d_variable_src_ghosts.resizeArray(0, hier::IntVector(d_dim));
+   d_variable_dst_ghosts.resizeArray(0, hier::IntVector(d_dim));
+   d_variable_coarsen_op.resizeArray(0);
+   d_variable_refine_op.resizeArray(0);
+}
+
+PatchDataTestStrategy::~PatchDataTestStrategy()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines for reading variable and refinement data from input.         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchDataTestStrategy::readVariableInput(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   tbox::Array<string> var_keys = db->getAllKeys();
+   int nkeys = var_keys.getSize();
+
+   d_variable_src_name.resizeArray(nkeys);
+   d_variable_dst_name.resizeArray(nkeys);
+   d_variable_depth.resizeArray(nkeys);
+   d_variable_src_ghosts.resizeArray(nkeys, hier::IntVector(d_dim, 0));
+   d_variable_dst_ghosts.resizeArray(nkeys, hier::IntVector(d_dim, 0));
+   d_variable_coarsen_op.resizeArray(nkeys);
+   d_variable_refine_op.resizeArray(nkeys);
+
+   for (int i = 0; i < nkeys; i++) {
+
+      tbox::Pointer<tbox::Database> var_db = db->getDatabase(var_keys[i]);
+
+      if (var_db->keyExists("src_name")) {
+         d_variable_src_name[i] = var_db->getString("src_name");
+      } else {
+         TBOX_ERROR("Variable input error: No `src_name' string found for "
+            << "key = " << var_keys[i] << endl);
+      }
+
+      if (var_db->keyExists("dst_name")) {
+         d_variable_dst_name[i] = var_db->getString("dst_name");
+      } else {
+         TBOX_ERROR("Variable input error: No `dst_name' string found for "
+            << "key = " << var_keys[i] << endl);
+      }
+
+      if (var_db->keyExists("depth")) {
+         d_variable_depth[i] = var_db->getInteger("depth");
+      } else {
+         d_variable_depth[i] = 1;
+      }
+
+      if (var_db->keyExists("src_ghosts")) {
+         int* tmp_ghosts = &d_variable_src_ghosts[i][0];
+         var_db->getIntegerArray("src_ghosts", tmp_ghosts, d_dim.getValue());
+      }
+
+      if (var_db->keyExists("dst_ghosts")) {
+         int* tmp_ghosts = &d_variable_dst_ghosts[i][0];
+         var_db->getIntegerArray("dst_ghosts", tmp_ghosts, d_dim.getValue());
+      }
+
+      if (var_db->keyExists("coarsen_operator")) {
+         d_variable_coarsen_op[i] = var_db->getString("coarsen_operator");
+      } else {
+         d_variable_coarsen_op[i] = "NO_COARSEN";
+      }
+
+      if (var_db->keyExists("refine_operator")) {
+         d_variable_refine_op[i] = var_db->getString("refine_operator");
+      } else {
+         d_variable_refine_op[i] = "NO_REFINE";
+      }
+
+   }
+
+}
+
+void PatchDataTestStrategy::readRefinementInput(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   tbox::Array<string> box_keys = db->getAllKeys();
+   int nkeys = box_keys.getSize();
+
+   d_refine_level_boxes.resizeArray(nkeys, hier::BoxArray(d_dim));
+   for (int i = 0; i < nkeys; i++) {
+      d_refine_level_boxes[i] = db->getDatabaseBoxArray(box_keys[i]);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Blank physical boundary and pre/postprocess coarsen/refine operations *
+ * so tester isn't required to implement them when not needed.           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchDataTestStrategy::setPhysicalBoundaryConditions(
+   const hier::Patch& patch,
+   const double time,
+   const hier::IntVector& gcw) const
+{
+   (void)patch;
+   (void)time;
+   (void)gcw;
+}
+
+void PatchDataTestStrategy::preprocessRefine(
+   const hier::Patch& fine,
+   const hier::Patch& coarse,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio) const
+{
+   (void)fine;
+   (void)coarse;
+   (void)fine_box;
+   (void)ratio;
+}
+
+void PatchDataTestStrategy::postprocessRefine(
+   const hier::Patch& fine,
+   const hier::Patch& coarse,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio) const
+{
+   (void)fine;
+   (void)coarse;
+   (void)fine_box;
+   (void)ratio;
+}
+
+void PatchDataTestStrategy::preprocessCoarsen(
+   const hier::Patch& coarse,
+   const hier::Patch& fine,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   (void)coarse;
+   (void)fine;
+   (void)coarse_box;
+   (void)ratio;
+}
+
+void PatchDataTestStrategy::postprocessCoarsen(
+   const hier::Patch& coarse,
+   const hier::Patch& fine,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   (void)coarse;
+   (void)fine;
+   (void)coarse_box;
+   (void)ratio;
+}
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/PatchDataTestStrategy.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/PatchDataTestStrategy.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,264 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Base class for patch data test operations. 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_PatchDataTestStrategy
+#define included_hier_PatchDataTestStrategy
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Database.h"
+
+#include <string>
+
+using namespace std;
+
+namespace SAMRAI {
+
+class CommTester;
+
+/**
+ * Class PatchDataTestStrategy defines an interface for testing specific
+ * patch data transfer operations on individual patches when using
+ * the CommTester class.  This base class provides two member functions
+ * for reading test input information.  These are:
+ *
+ * readVariableInput(): This function reads in a collection of databases,
+ * each of which contains parameters for a single variable.  The names of
+ * the sub-databases are arbitrary, but must be distinct.  Each variable
+ * sub-database has the following input keys:
+ *
+ *
+ *
+ *    - \b  name         variable name std::string (required)
+ *    - \b  depth        optional variable depth (default = 1)
+ *    - \b  src_ghosts   optional comm source ghost width (default = 0,0,0)
+ *    - \b  dst_ghosts   optional comm dest ghost width (default = 0,0,0)
+ *    - \b  coarsen_operator   opt. coarsen op name (default = "NO_COARSEN")
+ *    - \b  refine_operator    opt. refine op name (default = "NO_REFINE")
+ *
+ *
+ *
+ * readRefinementInput(): This function reads in a collection of box
+ * arrays, each of which describes the region to refine on each level.
+ * The key names of the box arrays are arbitrary, but must be distinct.
+ * For example,
+ *
+ *
+ *
+ *    - \b  level0_boxes   boxes to refine on level zero.
+ *    - \b  level1_boxes   boxes to refine on level one.
+ *    - \b  ...            etc...
+ *
+ *
+ *
+ *
+ * The pure virtual functions in this class that must be provided by
+ * concrete test subclass:
+ * \begin{enumerate}
+ *    - [registerVariables(...)] register variables with CommTester.
+ *    - [initializeDataOnPatch(...)] set patch data on new patch.
+ *    - [verifyResults(...)] check results of communication operations.
+ * \end{enumerate}
+ *
+ * The following virtual functions are given default non-operations in this
+ * class so that concrete test subclass can either implement them to test
+ * specific functionality or simply ignore.  They are pure virtual in the
+ * coarsen and refine patch strategy classes:
+ * \begin{enumerate}
+ *    - [setPhysicalBoundaryConditions(...)]
+ *    - [preprocessRefine(...)]
+ *    - [postprocessRefine(...)]
+ *    - [preprocessCoarsen(...)]
+ *    - [postprocessCoarsen(...)]
+ * \end{enumerate}
+ */
+
+class PatchDataTestStrategy
+{
+public:
+   /**
+    * The constructor initializes variable data arrays to zero length.
+    */
+   PatchDataTestStrategy(
+      const tbox::Dimension& dim);
+
+   /**
+    * Virtual destructor for PatchDataTestStrategy.
+    */
+   virtual ~PatchDataTestStrategy();
+
+   /**
+    * Grid geometry access operations.
+    */
+   void setGridGeometry(
+      tbox::Pointer<geom::CartesianGridGeometry> grid_geom)
+   {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!grid_geom.isNull());
+#endif
+      d_grid_geometry = grid_geom;
+   }
+
+   ///
+   tbox::Pointer<geom::CartesianGridGeometry> getGridGeometry() const
+   {
+      return d_grid_geometry;
+   }
+
+   /**
+    * Utility functions for managing patch data context.
+    */
+   void setDataContext(
+      tbox::Pointer<hier::VariableContext> context)
+   {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!context.isNull());
+#endif
+      d_data_context = context;
+   }
+
+   ///
+   tbox::Pointer<hier::VariableContext> getDataContext() const
+   {
+      return d_data_context;
+   }
+
+   void clearDataContext()
+   {
+      d_data_context.setNull();
+   }
+
+   /**
+    * Read variable parameters from input database.
+    */
+   void
+   readVariableInput(
+      tbox::Pointer<tbox::Database> db);
+
+   /**
+    * Read arrays of refinement boxes from input database.
+    */
+   void
+   readRefinementInput(
+      tbox::Pointer<tbox::Database> db);
+
+   /**
+    * Virtual functions in interface to user-supplied boundary conditions,
+    * coarsen and refine operations.
+    */
+   virtual void
+   setPhysicalBoundaryConditions(
+      const hier::Patch& patch,
+      const double time,
+      const hier::IntVector& gcw) const;
+
+   ///
+   virtual void
+   preprocessRefine(
+      const hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio) const;
+
+   ///
+   virtual void
+   postprocessRefine(
+      const hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio) const;
+
+   ///
+   virtual void
+   preprocessCoarsen(
+      const hier::Patch& coarse,
+      const hier::Patch& fine,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+   ///
+   virtual void
+   postprocessCoarsen(
+      const hier::Patch& coarse,
+      const hier::Patch& fine,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+   /**
+    * This function is called from the CommTester constructor.  Its
+    * purpose is to register variables used in the patch data test
+    * and appropriate communication parameters (ghost cell widths,
+    * coarsen/refine operations) with the CommTester object, which
+    * manages the variable storage.
+    */
+   virtual void
+   registerVariables(
+      CommTester* commtest) = 0;
+
+   /**
+    * Virtual function for setting data on new patch in hierarchy.
+    *
+    * @param src_or_dst Flag set to 's' for source or 'd' for destination
+    *        to indicate variables to set data for.
+    */
+   virtual void
+   initializeDataOnPatch(
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number,
+      char src_or_dst) = 0;
+   /**
+    * Virtual function for checking results of communication operations.
+    *
+    * @returns Whether test passed.
+    */
+   virtual bool
+   verifyResults(
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number) = 0;
+
+protected:
+   const tbox::Dimension d_dim;
+   /*
+    * Arrays of information read from input file describing test variables
+    */
+   tbox::Array<std::string> d_variable_src_name;
+   tbox::Array<std::string> d_variable_dst_name;
+   tbox::Array<int> d_variable_depth;
+   tbox::Array<hier::IntVector> d_variable_src_ghosts;
+   tbox::Array<hier::IntVector> d_variable_dst_ghosts;
+   tbox::Array<std::string> d_variable_coarsen_op;
+   tbox::Array<std::string> d_variable_refine_op;
+
+   /*
+    * Arrays of information read from input file describing test variables
+    */
+   tbox::Array<hier::BoxArray> d_refine_level_boxes;
+
+private:
+   tbox::Pointer<geom::CartesianGridGeometry> d_grid_geometry;
+
+   tbox::Pointer<hier::VariableContext> d_data_context;
+
+};
+
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/Pointer-CommTester.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/Pointer-CommTester.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,19 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   $Description 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Pointer.C"
+#include "CommTester.h"
+
+namespace SAMRAI {
+
+template class tbox::Pointer<CommTester>;
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/SideDataTest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/SideDataTest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,719 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR communication tests for side-centered patch data 
+ *
+ ************************************************************************/
+
+#include "SideDataTest.h"
+
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "CommTester.h"
+#include "SAMRAI/pdat/SideGeometry.h"
+#include "SAMRAI/pdat/SideIndex.h"
+#include "SAMRAI/pdat/SideIterator.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+namespace SAMRAI {
+
+using namespace std;
+
+SideDataTest::SideDataTest(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> main_input_db,
+   bool do_refine,
+   bool do_coarsen,
+   const string& refine_option):
+   PatchDataTestStrategy(dim),
+   d_dim(dim)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!main_input_db.isNull());
+   TBOX_ASSERT(!refine_option.empty());
+#endif
+
+   d_object_name = object_name;
+
+   d_do_refine = do_refine;
+   d_do_coarsen = false;
+   if (!do_refine) {
+      d_do_coarsen = do_coarsen;
+   }
+
+   d_refine_option = refine_option;
+
+   d_test_direction.resizeArray(0);
+   d_use_fine_value_at_interface.resizeArray(0);
+
+   d_Acoef = 0.0;
+   d_Bcoef = 0.0;
+   d_Ccoef = 0.0;
+   d_Dcoef = 0.0;
+
+   d_finest_level_number = main_input_db->
+      getDatabase("PatchHierarchy")->
+      getInteger("max_levels") - 1;
+
+   d_cart_grid_geometry = new geom::CartesianGridGeometry(
+         dim,
+         "CartesianGridGeometry",
+         main_input_db->getDatabase("CartesianGridGeometry"));
+
+   setGridGeometry(d_cart_grid_geometry);
+
+   readTestInput(main_input_db->getDatabase("SidePatchDataTest"));
+
+}
+
+SideDataTest::~SideDataTest()
+{
+}
+
+void SideDataTest::readTestInput(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   /*
+    * Base class reads variable parameters and boxes to refine.
+    */
+
+   readVariableInput(db->getDatabase("VariableData"));
+   readRefinementInput(db->getDatabase("RefinementData"));
+
+   tbox::Pointer<tbox::Database> var_data = db->getDatabase("VariableData");
+   tbox::Array<string> var_keys = var_data->getAllKeys();
+   int nkeys = var_keys.getSize();
+
+   d_test_direction.resizeArray(nkeys);
+   d_use_fine_value_at_interface.resizeArray(nkeys);
+
+   for (int i = 0; i < nkeys; i++) {
+      tbox::Pointer<tbox::Database> var_db = var_data->getDatabase(var_keys[i]);
+
+      if (var_db->keyExists("test_direction")) {
+         d_test_direction[i] = var_db->getInteger("test_direction");
+      } else {
+         d_test_direction[i] = -1;
+      }
+
+      if (var_db->keyExists("use_fine_value_at_interface")) {
+         d_use_fine_value_at_interface[i] =
+            var_db->getBool("use_fine_value_at_interface");
+      } else {
+         d_use_fine_value_at_interface[i] = true;
+      }
+
+   }
+
+   if (db->keyExists("Acoef")) {
+      d_Acoef = db->getDouble("Acoef");
+   } else {
+      TBOX_ERROR(d_object_name << " input error: No `Acoeff' found." << endl);
+   }
+   if (db->keyExists("Dcoef")) {
+      d_Dcoef = db->getDouble("Dcoef");
+   } else {
+      TBOX_ERROR(d_object_name << " input error: No `Dcoef' found." << endl);
+   }
+   if (d_dim > tbox::Dimension(1)) {
+      if (db->keyExists("Bcoef")) {
+         d_Bcoef = db->getDouble("Bcoef");
+      } else {
+         TBOX_ERROR(d_object_name << " input error: No `Bcoef' found." << endl);
+      }
+   }
+   if (d_dim > tbox::Dimension(2)) {
+      if (db->keyExists("Ccoef")) {
+         d_Ccoef = db->getDouble("Ccoef");
+      } else {
+         TBOX_ERROR(d_object_name << " input error: No `Ccoef' found." << endl);
+      }
+   }
+
+}
+
+void SideDataTest::registerVariables(
+   CommTester* commtest)
+{
+   TBOX_ASSERT(commtest != (CommTester *)NULL);
+
+   int nvars = d_variable_src_name.getSize();
+
+   d_variables.resizeArray(nvars);
+
+   for (int i = 0; i < nvars; i++) {
+      d_variables[i] =
+         new pdat::SideVariable<double>(
+            d_dim,
+            d_variable_src_name[i],
+            d_variable_depth[i],
+            d_use_fine_value_at_interface[i],
+            d_test_direction[i]);
+
+      if (d_do_refine) {
+         commtest->registerVariable(d_variables[i],
+            d_variables[i],
+            d_variable_src_ghosts[i],
+            d_variable_dst_ghosts[i],
+            d_cart_grid_geometry,
+            d_variable_refine_op[i]);
+      } else if (d_do_coarsen) {
+         commtest->registerVariable(d_variables[i],
+            d_variables[i],
+            d_variable_src_ghosts[i],
+            d_variable_dst_ghosts[i],
+            d_cart_grid_geometry,
+            d_variable_coarsen_op[i]);
+      }
+
+   }
+
+}
+
+void SideDataTest::setConservativeData(
+   tbox::Pointer<pdat::SideData<double> > data,
+   const hier::Box& box,
+   const hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= hierarchy->getFinestLevelNumber()));
+#endif
+
+   int i, j;
+   tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(
+         level_number);
+
+   hier::BoxArray domain = level->getPhysicalDomain();
+   int ncells = 0;
+   for (i = 0; i < domain.getNumberOfBoxes(); i++) {
+      ncells += domain[i].size();
+   }
+
+   const int depth = data->getDepth();
+
+   const hier::Box sbox = data->getGhostBox() * box;
+
+   const hier::IntVector& directions(data->getDirectionVector());
+
+   if (level_number == 0) {
+
+      /*
+       * Set side value on level zero as follows:
+       *
+       *    u0(i,j,k) = (j + k)/ncells
+       *    u1(i,j,k) = (i + k)/ncells
+       *    u2(i,j,k) = (i + j)/ncells
+       */
+
+      for (int axis = 0; axis < d_dim.getValue(); axis++) {
+         if (directions(axis)) {
+            for (pdat::CellIterator ci(sbox); ci; ci++) {
+               double value = 0.0;
+               for (i = 0; i < d_dim.getValue(); i++) {
+                  if (i != axis) {
+                     value += (double)(ci() (i));
+                  }
+               }
+               value /= ncells;
+               for (int side = pdat::SideIndex::Lower;
+                    side <= pdat::SideIndex::Upper; side++) {
+                  pdat::SideIndex si(ci(), axis, side);
+                  for (int d = 0; d < depth; d++) {
+                     (*data)(si, d) = value;
+                  }
+               }
+            }
+         }
+      }
+
+   } else {
+
+      /*
+       * Set side value on level > 0 to
+       *    u(i,j,k) = u_c + ci*del_i + cj*del_j + ck*del_k
+       * where u_c is value on the underlying coarse side, (ci,cj,ck) is
+       * the underlying coarse side index, and (del_i,del_j,del_k)
+       * is the vector between the coarse and fine cell side centers.
+       */
+
+      hier::IntVector ratio(level->getRatioToLevelZero());
+      const int max_ratio = ratio.max();
+
+      tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+         patch.getPatchGeometry();
+      const double* dx = pgeom->getDx();
+
+      int coarse_ncells = ncells;
+      double* delta = new double[max_ratio * d_dim.getValue()];
+      for (j = 0; j < d_dim.getValue(); j++) {
+         coarse_ncells /= ratio(j);
+         double coarse_dx = dx[j] * ratio(j);
+         for (i = 0; i < ratio(j); i++) {
+            delta[j * max_ratio + i] = (i + 0.5) * dx[j] - coarse_dx * 0.5;
+         }
+      }
+
+      for (int axis = 0; axis < d_dim.getValue(); axis++) {
+         if (directions(axis)) {
+            hier::IntVector ci(ratio.getDim());
+            hier::IntVector del(ratio.getDim());
+            for (pdat::CellIterator fi(sbox); fi; fi++) {
+               double value = 0.0;
+               for (i = 0; i < d_dim.getValue(); i++) {
+                  if (i != axis) {
+                     int findx = fi() (i);
+                     ci(i) = ((findx < 0) ? (findx + 1) / ratio(i) - 1
+                              : findx / ratio(i));
+                     del(i) =
+                        (int)delta[i * max_ratio + findx - ci(i) * ratio(i)];
+                     value += (double)(ci(i));
+                  }
+               }
+               value /= coarse_ncells;
+
+               for (j = 0; j < d_dim.getValue(); j++) {
+                  if (j != axis) {
+                     value += ci(j) * del(j);
+                  }
+               }
+
+               for (int side = pdat::SideIndex::Lower;
+                    side <= pdat::SideIndex::Upper; side++) {
+                  pdat::SideIndex si(fi(), axis, side);
+                  for (int d = 0; d < depth; d++) {
+                     (*data)(si, d) = value;
+                  }
+               }
+            }
+         }
+      }
+      delete[] delta;
+
+   }
+
+}
+
+void SideDataTest::initializeDataOnPatch(
+   const hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number,
+   char src_or_dst)
+{
+   NULL_USE(src_or_dst);
+   NULL_USE(level_number);
+   NULL_USE(hierarchy);
+
+   const hier::IntVector periodic_shift(
+      d_cart_grid_geometry->getPeriodicShift(hier::IntVector(tbox::Dimension(
+               d_dim), 1)));
+   const bool is_periodic = periodic_shift.max() > 0;
+
+   if (d_do_refine) {
+
+      for (int i = 0; i < d_variables.getSize(); i++) {
+
+         tbox::Pointer<pdat::SideData<double> > side_data =
+            patch.getPatchData(d_variables[i], getDataContext());
+
+         hier::Box dbox = side_data->getBox();
+
+         if (is_periodic) {
+            setPeriodicData(side_data, dbox, patch);
+         } else {
+            setLinearData(side_data, dbox, patch);
+         }
+      }
+
+   } else if (d_do_coarsen) {
+
+      for (int i = 0; i < d_variables.getSize(); i++) {
+
+         tbox::Pointer<pdat::SideData<double> > side_data =
+            patch.getPatchData(d_variables[i], getDataContext());
+
+         hier::Box dbox = side_data->getGhostBox();
+
+         setConservativeData(side_data, dbox,
+            patch, hierarchy, level_number);
+
+      }
+
+   }
+
+}
+
+void SideDataTest::checkPatchInteriorData(
+   const tbox::Pointer<pdat::SideData<double> >& data,
+   const hier::Box& interior,
+   const hier::Patch& patch) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+
+   const bool is_periodic =
+      d_cart_grid_geometry->getPeriodicShift(hier::IntVector(tbox::Dimension(
+               d_dim), 1)).max() > 0;
+
+   const int depth = data->getDepth();
+
+   tbox::Pointer<pdat::SideData<double> > correct_data(
+      new pdat::SideData<double>(
+         data->getBox(),
+         depth,
+         data->getGhostCellWidth(),
+         data->getDirectionVector()));
+
+   if (d_do_refine) {
+      if (is_periodic) {
+         setPeriodicData(correct_data, correct_data->getGhostBox(), patch);
+      } else {
+         setLinearData(correct_data, correct_data->getGhostBox(), patch);
+      }
+   }
+
+   const hier::IntVector& directions(data->getDirectionVector());
+
+   for (int axis = 0; axis < d_dim.getValue(); axis++) {
+      if (directions(axis)) {
+         const pdat::SideIndex loweri(interior.lower(), axis, 0);
+         for (pdat::SideIterator si(interior, axis); si; si++) {
+            for (int d = 0; d < depth; d++) {
+               if (!(tbox::MathUtilities<double>::equalEps((*data)(si(), d),
+                        (*correct_data)(si(), d)))) {
+                  tbox::perr << "FAILED: -- patch interior not properly filled"
+                             << " : side_data index = "
+                             << si().getAxis() << '/' << si()
+                             << endl;
+               }
+            }
+         }
+      }
+   }
+}
+
+void SideDataTest::setPhysicalBoundaryConditions(
+   const hier::Patch& patch,
+   const double time,
+   const hier::IntVector& gcw) const
+{
+   NULL_USE(time);
+
+   const hier::IntVector periodic_shift(
+      d_cart_grid_geometry->getPeriodicShift(hier::IntVector(gcw.getDim(), 1)));
+
+   const bool is_periodic = periodic_shift.max() > 0;
+
+   tbox::Pointer<geom::CartesianPatchGeometry> pgeom = patch.getPatchGeometry();
+
+   const tbox::Array<hier::BoundaryBox> node_bdry =
+      pgeom->getCodimensionBoundaries(d_dim.getValue());
+   const int num_node_bdry_boxes = node_bdry.getSize();
+
+   tbox::Array<hier::BoundaryBox> edge_bdry;
+   if (d_dim > tbox::Dimension(1)) {
+      edge_bdry = pgeom->getCodimensionBoundaries(d_dim.getValue() - 1);
+   }
+   const int num_edge_bdry_boxes = d_dim > tbox::Dimension(1) ? edge_bdry.getSize() : -1;
+
+   tbox::Array<hier::BoundaryBox> face_bdry;
+   if (d_dim == tbox::Dimension(3)) {
+      face_bdry = pgeom->getCodimensionBoundaries(d_dim.getValue() - 2);
+   }
+   const int num_face_bdry_boxes = d_dim == tbox::Dimension(3) ? face_bdry.getSize() : -1;
+
+   for (int i = 0; i < d_variables.getSize(); i++) {
+
+      tbox::Pointer<pdat::SideData<double> > side_data =
+         patch.getPatchData(d_variables[i], getDataContext());
+
+      hier::Box patch_interior = side_data->getBox();
+      checkPatchInteriorData(side_data, patch_interior, patch);
+
+      /*
+       * Set node boundary data.
+       */
+      for (int ni = 0; ni < num_node_bdry_boxes; ni++) {
+
+         hier::Box fill_box = pgeom->getBoundaryFillBox(node_bdry[ni],
+               patch.getBox(),
+               gcw);
+
+         if (is_periodic) {
+            setPeriodicData(side_data, fill_box, patch);
+         } else {
+            setLinearData(side_data, fill_box, patch);
+         }
+      }
+
+      if (d_dim > tbox::Dimension(1)) {
+         /*
+          * Set edge boundary data.
+          */
+         for (int ei = 0; ei < num_edge_bdry_boxes; ei++) {
+
+            hier::Box fill_box = pgeom->getBoundaryFillBox(edge_bdry[ei],
+                  patch.getBox(),
+                  gcw);
+
+            if (is_periodic) {
+               setPeriodicData(side_data, fill_box, patch);
+            } else {
+               setLinearData(side_data, fill_box, patch);
+            }
+         }
+      }
+
+      if (d_dim == tbox::Dimension(3)) {
+         /*
+          * Set face boundary data.
+          */
+         for (int fi = 0; fi < num_face_bdry_boxes; fi++) {
+            hier::Box fbox(face_bdry[fi].getBox());
+
+            hier::Box fill_box = pgeom->getBoundaryFillBox(face_bdry[fi],
+                  patch.getBox(),
+                  gcw);
+
+            if (is_periodic) {
+               setPeriodicData(side_data, fill_box, patch);
+            } else {
+               setLinearData(side_data, fill_box, patch);
+            }
+         }
+      }
+
+   }
+
+}
+
+void SideDataTest::setLinearData(
+   tbox::Pointer<pdat::SideData<double> > data,
+   const hier::Box& box,
+   const hier::Patch& patch) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+
+   tbox::Pointer<geom::CartesianPatchGeometry> pgeom = patch.getPatchGeometry();
+   const double* dx = pgeom->getDx();
+   const double* lowerx = pgeom->getXLower();
+   double x, y, z;
+
+   const int depth = data->getDepth();
+
+   const hier::Box sbox = data->getGhostBox() * box;
+
+   hier::IntVector directions(data->getDirectionVector());
+
+   for (int axis = 0; axis < d_dim.getValue(); axis++) {
+      if (directions(axis)) {
+         const pdat::SideIndex loweri(patch.getBox().lower(), axis, 0);
+         for (pdat::SideIterator ei(sbox, axis); ei; ei++) {
+
+            /*
+             * Compute spatial location of cell center and
+             * set data to linear profile.
+             */
+
+            if (axis == 0) {
+               x = lowerx[0] + dx[0] * (ei() (0) - loweri(0));
+            } else {
+               x = lowerx[0] + dx[0] * (ei() (0) - loweri(0) + 0.5);
+            }
+            y = z = 0.;
+            if (d_dim > tbox::Dimension(1)) {
+               if (axis == 1) {
+                  y = lowerx[1] + dx[1] * (ei() (1) - loweri(1));
+               } else {
+                  y = lowerx[1] + dx[1] * (ei() (1) - loweri(1) + 0.5);
+               }
+            }
+            if (d_dim > tbox::Dimension(2)) {
+               if (axis == 2) {
+                  z = lowerx[2] + dx[2] * (ei() (2) - loweri(2));
+               } else {
+                  z = lowerx[2] + dx[2] * (ei() (2) - loweri(2) + 0.5);
+               }
+            }
+
+            for (int d = 0; d < depth; d++) {
+               (*data)(ei(),
+                       d) = d_Dcoef + d_Acoef * x + d_Bcoef * y + d_Ccoef * z;
+            }
+
+         }
+      }
+   }
+}
+
+void SideDataTest::setPeriodicData(
+   tbox::Pointer<pdat::SideData<double> > data,
+   const hier::Box& box,
+   const hier::Patch& patch) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!data.isNull());
+#endif
+   NULL_USE(patch);
+
+   const double* xlo = d_cart_grid_geometry->getXLower();
+   const double* xup = d_cart_grid_geometry->getXUpper();
+   std::vector<double> domain_len(d_dim.getValue());
+   for (int d = 0; d < d_dim.getValue(); ++d) {
+      domain_len[d] = xup[d] - xlo[d];
+   }
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+
+   const int depth = data->getDepth();
+
+   const hier::Box sbox = data->getGhostBox() * box;
+
+   hier::IntVector directions(data->getDirectionVector());
+
+   for (int axis = 0; axis < d_dim.getValue(); axis++) {
+      if (directions(axis)) {
+         const pdat::SideIndex loweri(patch.getBox().lower(), axis, 0);
+         for (pdat::SideIterator si(sbox, axis); si; si++) {
+
+            double val = 1.0;
+            for (int d = 0; d < d_dim.getValue(); ++d) {
+               double tmpf = d == axis ? si() (d) : 0.5 + si() (d);
+               tmpf = tmpf * dx[d] / domain_len[d];
+               tmpf = sin(2 * M_PI * tmpf);
+               val *= tmpf;
+            }
+            val = val + 2.0; // Shift function range to [1,3] to avoid bad floating point compares.
+            for (int d = 0; d < depth; d++) {
+               (*data)(si(), d) = val;
+            }
+
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Verify results of communication operations.  This test must be        *
+ * consistent with data initialization and boundary operations above.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool SideDataTest::verifyResults(
+   const hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number)
+{
+   NULL_USE(hierarchy);
+
+   bool test_failed = false;
+
+   const hier::IntVector periodic_shift(
+      d_cart_grid_geometry->getPeriodicShift(hier::IntVector(tbox::Dimension(
+               d_dim), 1)));
+   bool is_periodic = periodic_shift.max() > 0;
+
+   if (d_do_refine || d_do_coarsen) {
+
+      tbox::plog << "\nEntering SideDataTest::verifyResults..." << endl;
+      tbox::plog << "level_number = " << level_number << endl;
+      tbox::plog << "Patch box = " << patch.getBox() << endl;
+
+      hier::IntVector tgcw(periodic_shift.getDim(), 0);
+      for (int i = 0; i < d_variables.getSize(); i++) {
+         tgcw.max(patch.getPatchData(d_variables[i], getDataContext())->
+            getGhostCellWidth());
+      }
+      const hier::Box& pbox = patch.getBox();
+
+      tbox::Pointer<pdat::SideData<double> > solution(
+         new pdat::SideData<double>(pbox, 1, tgcw));
+
+      hier::Box tbox(pbox);
+      tbox.grow(tgcw);
+
+      if (d_do_refine) {
+         if (is_periodic) {
+            setPeriodicData(solution, tbox, patch);
+         } else {
+            setLinearData(solution, tbox, patch);
+         }
+      }
+      if (d_do_coarsen) {
+         setConservativeData(solution, tbox,
+            patch, hierarchy, level_number);
+      }
+
+      for (int i = 0; i < d_variables.getSize(); i++) {
+
+         tbox::Pointer<pdat::SideData<double> > side_data =
+            patch.getPatchData(d_variables[i], getDataContext());
+         int depth = side_data->getDepth();
+         hier::Box dbox = side_data->getGhostBox();
+
+         hier::IntVector directions(side_data->getDirectionVector());
+
+         for (int id = 0; id < d_dim.getValue(); id++) {
+            if (directions(id)) {
+               for (pdat::SideIterator si(dbox, id); si; si++) {
+                  double correct = (*solution)(si());
+                  for (int d = 0; d < depth; d++) {
+                     double result = (*side_data)(si(), d);
+                     if (!tbox::MathUtilities<double>::equalEps(correct,
+                            result)) {
+                        test_failed = true;
+                        tbox::perr << "Test FAILED: ...."
+                                   << " : side_data index = "
+                                   << si().getAxis() << '/' << si() << endl;
+                        tbox::perr << "    hier::Variable = "
+                        << d_variable_src_name[i]
+                        << " : depth index = " << d << endl;
+                        tbox::perr << "    result = " << result
+                                   << " : correct = " << correct << endl;
+                     }
+                  }
+               }
+            }
+         }
+
+      }
+
+      solution.setNull();   // just to be anal...
+
+      tbox::plog << "\nExiting SideDataTest::verifyResults..." << endl;
+      tbox::plog << "level_number = " << level_number << endl;
+      tbox::plog << "Patch box = " << patch.getBox() << endl << endl;
+
+   }
+   return !test_failed;
+}
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/SideDataTest.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/SideDataTest.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,202 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR communication tests for side-centered patch data 
+ *
+ ************************************************************************/
+
+#ifndef included_pdat_SideDataTest
+#define included_pdat_SideDataTest
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "PatchDataTestStrategy.h"
+#include "SAMRAI/tbox/Pointer.h"
+#ifndef included_String
+#include <string>
+using namespace std;
+#define included_String
+#endif
+#include "SAMRAI/hier/Variable.h"
+
+namespace SAMRAI {
+
+class CommTester;
+
+/**
+ * Class SideDataTest provides routines to test communication operations
+ * for side-centered patch data on an AMR patch hierarchy.
+ *
+ * Required input keys and data types for test:
+ *
+ *   NONE...
+ *
+ * See PatchDataTestStrategy header file comments for variable and
+ * refinement input data description.  Additionally, there are two
+ * optional input parameters for each side variable.  These are:
+ *
+ *
+ *
+ *
+ *
+ *    - \b  test_direction   side directions to test
+ *                             (default = -1 ie, all directions)
+ *    - \b  use_fine_value_at_interface   which values to use at coarse-
+ *                                          fine interface (default = TRUE)
+ *
+ *
+ *
+ *
+ *
+ */
+
+class SideDataTest:public PatchDataTestStrategy
+{
+public:
+   /**
+    * The constructor initializes variable data arrays to zero length.
+    */
+   SideDataTest(
+      const std::string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> main_input_db,
+      bool do_refine,
+      bool do_coarsen,
+      const std::string& refine_option);
+
+   /**
+    * Virtual destructor for SideDataTest.
+    */
+   ~SideDataTest();
+
+   /**
+    * User-supplied boundary conditions.  Note that we do not implement
+    * user-defined coarsen and refine operations.
+    */
+   virtual void
+   setPhysicalBoundaryConditions(
+      const hier::Patch& patch,
+      const double time,
+      const hier::IntVector& gcw) const;
+
+   /**
+    * This function is called from the CommTester constructor.  Its
+    * purpose is to register variables used in the patch data test
+    * and appropriate communication parameters (ghost cell widths,
+    * coarsen/refine operations) with the CommTester object, which
+    * manages the variable storage.
+    */
+   void
+   registerVariables(
+      CommTester* commtest);
+
+   /**
+    * Function for setting data on new patch in hierarchy.
+    *
+    * @param src_or_dst Flag set to 's' for source or 'd' for destination
+    *        to indicate variables to set data for.
+    */
+   virtual void
+   initializeDataOnPatch(
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number,
+      char src_or_dst);
+
+   /**
+    * Function for checking results of communication operations.
+    */
+   bool
+   verifyResults(
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number);
+
+private:
+   /*
+    * Function for reading test data from input file.
+    */
+   void
+   readTestInput(
+      tbox::Pointer<tbox::Database> db);
+
+   void
+   setLinearData(
+      tbox::Pointer<pdat::SideData<double> > data,
+      const hier::Box& box,
+      const hier::Patch& patch) const;
+
+   /**
+    * Set periodic linear function data for testing interpolation in
+    * periodic domains.
+    */
+   void
+   setPeriodicData(
+      tbox::Pointer<pdat::SideData<double> > data,
+      const hier::Box& box,
+      const hier::Patch& patch) const;
+
+   /*
+    * Set conservative linear function data for testing coarsening
+    */
+   void
+   setConservativeData(
+      tbox::Pointer<pdat::SideData<double> > data,
+      const hier::Box& box,
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number) const;
+
+   void
+   checkPatchInteriorData(
+      const tbox::Pointer<pdat::SideData<double> >& data,
+      const hier::Box& interior,
+      const hier::Patch& patch) const;
+
+   const tbox::Dimension d_dim;
+
+   /*
+    * Object std::string identifier for error reporting
+    */
+   std::string d_object_name;
+
+   /*
+    * Data members specific to this side data test.
+    */
+   tbox::Pointer<geom::CartesianGridGeometry> d_cart_grid_geometry;
+
+   /*
+    * Data members specific to this side data test.
+    */
+   tbox::Array<int> d_test_direction;
+   tbox::Array<bool> d_use_fine_value_at_interface;
+
+   double d_Acoef;
+   double d_Bcoef;
+   double d_Ccoef;
+   double d_Dcoef;
+
+   bool d_do_refine;
+   bool d_do_coarsen;
+   std::string d_refine_option;
+   int d_finest_level_number;
+
+   tbox::Array<tbox::Pointer<hier::Variable> > d_variables;
+
+};
+
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/VisItDerivedData.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/VisItDerivedData.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,53 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   VisItDerivedData class to write patch owner value. 
+ *
+ ************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "VisItDerivedData.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+
+using namespace SAMRAI;
+
+VisItDerivedData::VisItDerivedData()
+{
+}
+
+VisItDerivedData::~VisItDerivedData()
+{
+}
+
+bool VisItDerivedData::packDerivedDataIntoDoubleBuffer(
+   double* buffer,
+   const hier::Patch& patch,
+   const hier::Box& region,
+   const std::string& variable_name,
+   int depth_id) const
+{
+   (void)patch;
+   (void)region;
+   (void)variable_name;
+   (void)depth_id;
+   if (variable_name == "Owner") {
+      const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+      double owner = mpi.getRank();
+      int i, size = region.size();
+      for (i = 0; i < size; ++i) buffer[i] = owner;
+   } else {
+      // Did not register this name.
+      TBOX_ERROR(
+         "Unregistered variable name '" << variable_name << "' in\n"
+         <<
+         "VisItDerivedData::packDerivedPatchDataIntoDoubleBuffer");
+   }
+
+   return true;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/VisItDerivedData.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/VisItDerivedData.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,49 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   VisItDerivedData class to write patch owner value. 
+ *
+ ************************************************************************/
+#ifndef included_VisItDerivedData
+#define included_VisItDerivedData
+
+/*
+ * SAMRAI classes
+ */
+#include "SAMRAI/appu/VisDerivedDataStrategy.h"
+
+using namespace SAMRAI;
+
+/*!
+ * @brief Class to implemement patch owners as VisIt derived data.
+ */
+class VisItDerivedData:
+   public appu::VisDerivedDataStrategy
+{
+
+public:
+   /*!
+    * @brief Constructor.
+    */
+   VisItDerivedData();
+
+   ~VisItDerivedData();
+
+   //@{ @name SAMRAI::appu::VisDerivedDataStrategy virtuals
+
+   virtual bool
+   packDerivedDataIntoDoubleBuffer(
+      double* buffer,
+      const hier::Patch& patch,
+      const hier::Box& region,
+      const std::string& variable_name,
+      int depth_id) const;
+
+   //@}
+
+};
+
+#endif  // included_VisItDerivedData
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/main.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/main.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,567 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program for patch data communication tests. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <string>
+using namespace std;
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+
+#include "CommTester.h"
+#include "VisItDerivedData.h"
+
+#include "SAMRAI/tbox/InputDatabase.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/mesh/StandardTagAndInitialize.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/appu/VisItDataWriter.h"
+
+// Different component tests available
+#include "CellDataTest.h"
+#include "EdgeDataTest.h"
+#include "FaceDataTest.h"
+#include "NodeDataTest.h"
+#include "OuternodeDataTest.h"
+#include "SideDataTest.h"
+#include "OutersideDataTest.h"
+#include "OuterfaceDataTest.h"
+//#include "MultiVariableDataTest.h"
+
+using namespace SAMRAI;
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * This is the driver program to test and time patch data               *
+ * communication operations on an SAMR patch hierarchy using            *
+ * SAMRAI.  CommTester is the primary object used in these              *
+ * processes.  It constructs the patch hierarchy based on               *
+ * input file information and invokes the communcation operations       *
+ * specified in the input file.  The implementation of data type        *
+ * specific operations (defining variables, initializing data,          *
+ * defining coarsen/refine operations, and verifying the results)       *
+ * are provided in a class implemented for the test to be performed.    *
+ * This test-specific class is derived from the PatchDataTestStrategy   *
+ * base class which declares the interface between the CommTester       *
+ * and the test.                                                        *
+ *                                                                      *
+ * Input data file sections and keys are defined as follows:            *
+ *                                                                      *
+ *    o Main program...                                                 *
+ *                                                                      *
+ *      Main {                                                          *
+ *         log_file_name  = <string> [name of log file]                 *
+ *                          (optional - "component_test.log" is default)*
+ *         log_all_nodes  = <bool> [log all nodes or node 0 only?]      *
+ *                          (optional - FALSE is default)               *
+ *         ntimes_run     = <int> [how many times to perform test]      *
+ *                          (optional - 1 is default)                   *
+ *         test_to_run    = <string> [name of test] (required)          *
+ *            Available tests are:                                      *
+ *               "CellDataTest"                                         *
+ *               "EdgeDataTest"                                         *
+ *               "FaceDataTest"                                         *
+ *               "NodeDataTest"                                         *
+ *               "OuterodeDataTest"                                     *
+ *               "SideDataTest"                                         *
+ *               "MultiVariableDataTest"                                *
+ *         do_refine      = <bool> [test refine operation?]             *
+ *                          (optional - FALSE is default)               *
+ *         do_coarsen     = <bool> [test coarsen operation?]            *
+ *                          (optional - FALSE is default)               *
+ *         NOTE: Only refine or coarsen test can be run, but not both.  *
+ *               If both are TRUE, only refine operations will execute. *
+ *         refine_option  = <string> [how interior of destination       *
+ *                                    level is filled during refine]    *
+ *            Options are:                                              *
+ *               "INTERIOR_FROM_SAME_LEVEL"                             *
+ *               "INTERIOR_FROM_COARSER_LEVEL"                          *
+ *               (default is "INTERIOR_FROM_SAME_LEVEL")                *
+ *      }                                                               *
+ *                                                                      *
+ *    o Timers...                                                       *
+ *                                                                      *
+ *      tbox::TimerManager {                                                  *
+ *         timer_list = <string array> [names of timers to run]         *
+ *            Available timers are:                                     *
+ *               "test::main::createRefineSchedule"                     *
+ *               "test::main::performRefineOperations"                  *
+ *               "test::main::createCoarsenSchedule"                    *
+ *               "test::main::performCoarsenOperations"                 *
+ *      }                                                               *
+ *                                                                      *
+ *    o hier::Patch data tests...                                             *
+ *                                                                      *
+ *      Each test defines the input parameters it needs.  Consult the   *
+ *      documentation in each class for details.  Default operations    *
+ *      for reading variable data and mesh refinement information       *
+ *      for data tests are provided in the PatchDataTestStrategy        *
+ *      base class.  These input are typically read from the input      *
+ *      file section for each test.  In this case, the input data       *
+ *      keys are similar to the following example:                      *
+ *                                                                      *
+ *      VariableData {  // The variable sub-database                    *
+ *                      // (key name VariableData not optional)         *
+ *                                                                      *
+ *         variable_1 { // sub-database for first variable              *
+ *                      // (Key name for each variable can be anything. *
+ *                      //  Key names for variable parameters are       *
+ *                      //  not optional. However, only name data is    *
+ *                      //  required)                                   *
+ *            name = "var1"    // <string> variable name (required)     *
+ *            depth = 1        // <int> variable depth (opt. - def is 1)*
+ *            src_ghosts = 0,0,0 // <int array> for ghost width of      *
+ *                                  source data (opt. - def is 0,0,0)   *
+ *            dst_ghosts = 1,1,1 // <int array> for ghost width of      *
+ *                                  dest data (opt. - def is 0,0,0)     *
+ *            coarsen_operator = "CONSERVATIVE_COARSEN"                 *
+ *            refine_operator = "LINEAR_REFINE"                         *
+ *            // Interlevel transfer operator name strings are optional *
+ *            // Default are "NO_COARSEN", and "NO_REFINE", resp.       *
+ *         }                                                            *
+ *                                                                      *
+ *         // data for other variables as needed...                     *
+ *                                                                      *
+ *      }                                                               *
+ *                                                                      *
+ *      RefinementData {  // The variable sub-database                  *
+ *                        // (key name RefinementData not optional)     *
+ *                                                                      *
+ *         // Lists of boxes to refine on each level.  Names of box     *
+ *         // arrays may be anything.  For example,                     *
+ *                                                                      *
+ *           level0_boxes = [ (1,2,3) , (3,3,5) ]                       *
+ *           level1_boxes = [ (8,10,6) , (10,10,12) ]                   *
+ *           // other level box information as needed...                *
+ *      }                                                               *
+ *                                                                      *
+ *  NOTES:                                                              *
+ *                                                                      *
+ *     o The CommTester uses the mesh::GriddingAlgorithm, and     *
+ *       mesh::LoadBalancer class to construct the patch hierarchy*
+ *       Appropriate input sections must be provided for these objects  *
+ *       as needed.                                                     *
+ *                                                                      *
+ *     o Each test must register a hier::GridGeometry object      *
+ *       with the                                                       *
+ *       PatchDataTestStrategy base class so the hierarchy can be       *
+ *       constructed.  Consult the constructor of each test class       *
+ *       for inforamation about which geomteyr object is constructed,   *
+ *       and thus which input data is required to initialize the geom.  *
+ *                                                                      *
+ ************************************************************************
+ */
+
+int main(
+   int argc,
+   char* argv[])
+{
+   int return_val = 1;
+
+   /*
+    * Initialize MPI, SAMRAI, and enable logging.
+    */
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   /*
+    * Make block to force Pointers to be deallocated to prevent memory
+    * leaks.
+    */
+   {
+
+      /*
+       * Process command line arguments.  For each run, the input
+       * filename must be specified.  Usage is:
+       *
+       *    executable <input file name>
+       *
+       */
+      string input_filename;
+
+      if (argc != 2) {
+         TBOX_ERROR("USAGE:  " << argv[0] << " <input file> \n"
+                                          << "  options:\n"
+                                          << "  none at this time" << endl);
+      } else {
+         input_filename = argv[1];
+      }
+
+      /*
+       * Create input database and parse all data in input file.
+       */
+
+      tbox::Pointer<tbox::Database> input_db(new tbox::InputDatabase("input_db"));
+      tbox::InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      /*
+       * Create timers from input data to check performance of comm. operations.
+       */
+
+      tbox::TimerManager::createManager(input_db->getDatabase("TimerManager"));
+
+      /*
+       * Retrieve "GlobalInputs" section of the input database and set
+       * values accordingly.
+       */
+
+      if (input_db->keyExists("GlobalInputs")) {
+         tbox::Pointer<tbox::Database> global_db =
+            input_db->getDatabase("GlobalInputs");
+         if (global_db->keyExists("call_abort_in_serial_instead_of_exit")) {
+            bool flag = global_db->
+               getBool("call_abort_in_serial_instead_of_exit");
+            tbox::SAMRAI_MPI::setCallAbortInSerialInsteadOfExit(flag);
+         }
+      }
+
+      /*
+       * Retrieve "Main" section from input database.  Set log file
+       * parameters, number of times to run tests (for performance
+       * analysis), and read in test information.
+       */
+
+      tbox::Pointer<tbox::Database> main_db = input_db->getDatabase("Main");
+
+      const tbox::Dimension dim(static_cast<unsigned short>(main_db->getInteger("dim")));
+
+      const string base_name =
+         main_db->getStringWithDefault("base_name", "component_test");
+
+      string log_file_name = base_name + ".log";
+      bool log_all_nodes = false;
+      if (main_db->keyExists("log_all_nodes")) {
+         log_all_nodes = main_db->getBool("log_all_nodes");
+      }
+      if (log_all_nodes) {
+         tbox::PIO::logAllNodes(log_file_name);
+      } else {
+         tbox::PIO::logOnlyNodeZero(log_file_name);
+      }
+
+      int ntimes_run = 1;
+      if (main_db->keyExists("ntimes_run")) {
+         ntimes_run = main_db->getInteger("ntimes_run");
+      }
+
+      string test_to_run;
+      if (main_db->keyExists("test_to_run")) {
+         test_to_run = main_db->getString("test_to_run");
+      } else {
+         TBOX_ERROR("Error in Main input: no test specified." << endl);
+      }
+
+      bool do_refine = false;
+      bool do_coarsen = false;
+      string refine_option = "INTERIOR_FROM_SAME_LEVEL";
+      if (main_db->keyExists("do_refine")) {
+         do_refine = main_db->getBool("do_refine");
+         if (do_refine) {
+            tbox::plog << "\nPerforming refine data test..." << endl;
+            if (main_db->keyExists("refine_option")) {
+               refine_option = main_db->getString("refine_option");
+            }
+            tbox::plog << "\nRefine data option = " << refine_option << endl;
+
+         }
+      }
+
+      if (!do_refine) {
+         if (main_db->keyExists("do_coarsen")) {
+            do_coarsen = main_db->getBool("do_coarsen");
+         }
+         if (do_coarsen) {
+            tbox::plog << "\nPerforming coarsen data test..." << endl;
+         }
+      }
+
+      /*
+       * Create communication tester and patch data test object
+       */
+
+      PatchDataTestStrategy* patch_data_test = NULL;
+
+      if (test_to_run == "CellDataTest") {
+         patch_data_test = new CellDataTest("CellDataTest",
+               dim,
+               input_db,
+               do_refine,
+               do_coarsen,
+               refine_option);
+
+      } else if (test_to_run == "EdgeDataTest") {
+         patch_data_test = new EdgeDataTest("EdgeDataTest",
+               dim,
+               input_db,
+               do_refine,
+               do_coarsen,
+               refine_option);
+      } else if (test_to_run == "FaceDataTest") {
+         patch_data_test = new FaceDataTest("FaceDataTest",
+               dim,
+               input_db,
+               do_refine,
+               do_coarsen,
+               refine_option);
+      } else if (test_to_run == "OuterfaceDataTest") {
+         patch_data_test = new OuterfaceDataTest("OuterfaceDataTest",
+               dim,
+               input_db,
+               do_refine,
+               do_coarsen,
+               refine_option);
+      } else if (test_to_run == "NodeDataTest") {
+         patch_data_test = new NodeDataTest("NodeDataTest",
+               dim,
+               input_db,
+               do_refine,
+               do_coarsen,
+               refine_option);
+      } else if (test_to_run == "OuternodeDataTest") {
+         patch_data_test = new OuternodeDataTest("OuternodeDataTest",
+               dim,
+               input_db,
+               do_refine,
+               do_coarsen,
+               refine_option);
+      } else if (test_to_run == "SideDataTest") {
+         patch_data_test = new SideDataTest("SideDataTest",
+               dim,
+               input_db,
+               do_refine,
+               do_coarsen,
+               refine_option);
+      } else if (test_to_run == "OutersideDataTest") {
+         patch_data_test = new OutersideDataTest("OutersideDataTest",
+               dim,
+               input_db,
+               do_refine,
+               do_coarsen,
+               refine_option);
+      } else if (test_to_run == "MultiVariableDataTest") {
+         TBOX_ERROR("Error in Main input: no multi-variable test yet." << endl);
+      } else {
+         TBOX_ERROR(
+            "Error in Main input: illegal test = " << test_to_run << endl);
+      }
+
+      tbox::Pointer<CommTester> comm_tester(new CommTester("CommTester",
+                                               dim,
+                                               input_db,
+                                               patch_data_test,
+                                               do_refine,
+                                               do_coarsen,
+                                               refine_option));
+
+      tbox::Pointer<mesh::StandardTagAndInitialize> cell_tagger(
+         new mesh::StandardTagAndInitialize(
+            dim,
+            "StandardTaggingAndInitializer",
+            comm_tester,
+            input_db->getDatabase("StandardTaggingAndInitializer")));
+
+      comm_tester->setupHierarchy(input_db, cell_tagger);
+
+      tbox::plog << "Specified input file is: " << input_filename << endl;
+
+      tbox::plog << "\nInput file data is ...." << endl;
+      input_db->printClassData(tbox::plog);
+
+      tbox::plog << "\nCheck hier::Variable database..." << endl;
+      hier::VariableDatabase::getDatabase()->printClassData(tbox::plog);
+
+      tbox::TimerManager* time_man = tbox::TimerManager::getManager();
+
+      tbox::Pointer<tbox::Timer> refine_create_time =
+         time_man->getTimer("test::main::createRefineSchedule");
+      tbox::Pointer<tbox::Timer> refine_comm_time =
+         time_man->getTimer("test::main::performRefineOperations");
+
+      tbox::Pointer<tbox::Timer> coarsen_create_time =
+         time_man->getTimer("test::main::createCoarsenSchedule");
+      tbox::Pointer<tbox::Timer> coarsen_comm_time =
+         time_man->getTimer("test::main::performCoarsenOperations");
+
+      const bool plot = main_db->getBoolWithDefault("plot", false);
+      VisItDerivedData vdd;
+      if (plot) {
+#ifdef HAVE_HDF5
+         const std::string visit_filename = base_name + ".visit";
+         /* Create the VisIt data writer. */
+         tbox::Pointer<appu::VisItDataWriter> visit_data_writer(
+            new appu::VisItDataWriter(dim, "VisIt Writer", visit_filename));
+         /*
+          * The VisItDataWriter requires some value to be plotted.
+          * We are registering the owner value just so we can plot.
+          */
+         visit_data_writer->registerDerivedPlotQuantity("Owner", "SCALAR", &vdd);
+         /* Write the plot file. */
+         visit_data_writer->writePlotData(
+            comm_tester->getPatchHierarchy(), 0);
+#else
+         TBOX_WARNING("Cannot write VisIt file--not configured with HDF5.");
+#endif
+      }
+
+      tbox::TimerManager::getManager()->resetAllTimers();
+
+      /*
+       * Create communication schedules and perform communication operations.
+       */
+
+      tbox::Pointer<hier::PatchHierarchy> patch_hierarchy =
+         comm_tester->getPatchHierarchy();
+      patch_hierarchy->recursivePrint(tbox::plog,
+         "H-> ",
+         3);
+      const int nlevels = patch_hierarchy->getNumberOfLevels();
+
+      if (do_refine) {
+
+         for (int n = 0; n < ntimes_run; n++) {
+
+            /*
+             * Create communication schedules for data refine tests.
+             */
+            refine_create_time->start();
+            for (int i = 0; i < nlevels; i++) {
+               comm_tester->createRefineSchedule(i);
+            }
+            refine_create_time->stop();
+
+            /*
+             * Perform refine data communication operations.
+             */
+            refine_comm_time->start();
+            for (int j = 0; j < nlevels; j++) {
+               comm_tester->performRefineOperations(j);
+            }
+            refine_comm_time->stop();
+
+         }
+
+      }
+
+      if (do_coarsen) {
+
+         for (int n = 0; n < ntimes_run; n++) {
+
+            /*
+             * Create communication schedules for data coarsen tests.
+             */
+            coarsen_create_time->start();
+            for (int i = nlevels - 1; i > 0; i--) {
+               comm_tester->createCoarsenSchedule(i);
+            }
+            coarsen_create_time->stop();
+
+            /*
+             * Perform coarsen data communication operations.
+             */
+            coarsen_comm_time->start();
+            for (int j = nlevels - 1; j > 0; j--) {
+               comm_tester->performCoarsenOperations(j);
+            }
+            coarsen_comm_time->stop();
+
+         }
+
+      }
+
+      bool test1_passed = comm_tester->verifyCommunicationResults();
+
+      if (do_refine) {
+
+         for (int n = 0; n < ntimes_run; n++) {
+
+            /*
+             * Create communication schedules for data refine tests.
+             */
+            refine_create_time->start();
+            for (int i = 0; i < nlevels; i++) {
+               comm_tester->resetRefineSchedule(i);
+            }
+            refine_create_time->stop();
+
+            /*
+             * Perform refine data communication operations.
+             */
+            refine_comm_time->start();
+            for (int j = 0; j < nlevels; j++) {
+               comm_tester->performRefineOperations(j);
+            }
+            refine_comm_time->stop();
+
+         }
+
+      }
+
+      if (do_coarsen) {
+
+         for (int n = 0; n < ntimes_run; n++) {
+
+            /*
+             * Create communication schedules for data coarsen tests.
+             */
+            coarsen_create_time->start();
+            for (int i = nlevels - 1; i > 0; i--) {
+               comm_tester->resetCoarsenSchedule(i);
+            }
+            coarsen_create_time->stop();
+
+            /*
+             * Perform coarsen data communication operations.
+             */
+            coarsen_comm_time->start();
+            for (int j = nlevels - 1; j > 0; j--) {
+               comm_tester->performCoarsenOperations(j);
+            }
+            coarsen_comm_time->stop();
+
+         }
+
+      }
+
+      bool test2_passed = comm_tester->verifyCommunicationResults();
+
+      /*
+       * Deallocate objects when done.
+       */
+
+      if (patch_data_test) delete patch_data_test;
+
+      tbox::TimerManager::getManager()->print(tbox::plog);
+
+      tbox::plog << "\nInput file data at end of run is ...." << endl;
+      input_db->printClassData(tbox::plog);
+
+      if (test1_passed && test2_passed) {
+         tbox::pout << "\nPASSED:  communication" << endl;
+         return_val = 0;
+      }
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   // 0 if passed, 1 otherwise
+   return return_val;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/cell_coarsen.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/cell_coarsen.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,208 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "cell-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+    test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = FALSE
+//    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = TRUE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+CellPatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0
+         dst_ghosts = 0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_3 {
+         src_name = "src_var3"
+         dst_name = "dst_var3"
+         depth = 2
+         src_ghosts = 0,0
+         dst_ghosts = 3,5
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (41,29) ],
+                  [ (42,0) , (53,29) ],
+                  [ (0,30) , (31,45) ],
+                  [ (6,46) , (42,61) ]
+   x_lo         = 0.e0 , 0.e0    // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0    // upper end of computational domain.
+   periodic_dimension = 0, 0
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 {
+         boxes_0 = [ (0,16) , (11,19)  ],
+                   [ (12,0) , (31,19)  ],
+                   [ (32,4) , (43,5)   ],
+                   [ (16,20) , (21,27) ],
+                   [ (8,28) , (27,41)  ],
+                   [ (20,42) , (27,55) ]
+      }
+      level_1 {
+         boxes_0 = [ (36,16) , (51,27) ],
+                   [ (24,64) , (31,75) ],
+                   [ (32,64) , (43,71) ]
+      }
+   }
+
+}
+
+TreeLoadBalancer {
+}
+
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/cell_coarsen.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/cell_coarsen.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,199 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "cell-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+    test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = FALSE
+//  refine_option = "INTERIOR_FROM_SAME_LEVEL"
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = TRUE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+CellPatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_3 {
+         src_name = "src_var3"
+         dst_name = "dst_var3"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 3,5,4
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (41,29,36) ],
+                  [ (42,0,4) , (53,29,32) ],
+                  [ (0,30,0) , (31,45,36) ],
+                  [ (6,46,19) , (42,61,36) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+       level_0 = [ (0,16,16) , (11,19,21) ],
+                      [ (12,0,0) , (31,19,21) ],
+                      [ (32,4,14) , (43,5,17) ],
+                      [ (16,20,4) , (21,27,11) ],
+                      [ (8,28,4) , (27,41,17) ]
+       level_1 = [ (36,16,14) , (51,27,17) ],
+                      [ (24,64,20) , (31,75,29) ],
+                      [ (32,64,20) , (43,71,25) ]
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/cell_ghostoverlap_a.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/cell_ghostoverlap_a.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,205 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "cell-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+    test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+    create_ghost_overlap = TRUE
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+CellPatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 1,1
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var3"
+         dst_name = "dst_var3"
+         depth = 2
+         src_ghosts = 2,1
+         dst_ghosts = 3,5
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (41,29) ],
+                  [ (42,0) , (53,29) ],
+                  [ (0,30) , (31,45) ],
+                  [ (6,46) , (42,61) ]
+   x_lo         = 0.e0 , 0.e0    // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0    // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+   barrier_before_regrid                 = FALSE
+   barrier_before_find_refinement        = FALSE
+   barrier_after_find_refinement         = FALSE
+   barrier_before_tag_cells              = FALSE
+   barrier_before_cluster                = FALSE
+   barrier_before_nest                   = FALSE
+   barrier_before_limit                  = FALSE
+   barrier_before_extend                 = FALSE
+   barrier_before_balance                = FALSE
+   barrier_before_make_new               = FALSE
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 {
+         boxes_0 = [ (0,16) , (11,19)  ],
+                   [ (12,0) , (31,19)  ],
+                   [ (32,4) , (43,5)   ],
+                   [ (16,20) , (21,27) ],
+                   [ (8,28) , (27,41)  ],
+                   [ (20,42) , (27,55) ]
+      }
+      level_1 {
+         boxes_0 = [ (36,16) , (51,27) ],
+                   [ (24,64) , (31,75) ],
+                   [ (32,64) , (43,71) ]
+      }
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/cell_ghostoverlap_b.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/cell_ghostoverlap_b.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,203 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "cell_ghostoverlap_b.3d"
+    log_all_nodes  = TRUE
+    plot = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+    test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+    create_ghost_overlap = TRUE
+
+    do_coarsen = FALSE
+
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+CellPatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 1,1,1
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_3 {
+         src_name = "src_var3"
+         dst_name = "dst_var3"
+         depth = 2
+         src_ghosts = 1,2,3
+         dst_ghosts = 3,5,4
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (41,29,36) ],
+                  [ (42,0,4) , (53,29,32) ],
+                  [ (0,30,0) , (31,45,36) ],
+                  [ (6,46,19) , (42,61,36) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 54.e0 , 62.e0 , 37.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 2
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+   check_nonnesting_user_boxes = "WARN"
+   check_boundary_proximity_violation_of_user_boxes = "ERROR"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+       level_0 = [ (0,16,16) , (11,19,21) ],
+                      [ (12,0,0) , (31,19,21) ],
+                      [ (32,5,14) , (43,6,17) ],
+                      [ (16,20,4) , (21,27,11) ],
+                      [ (8,28,4) , (27,41,17) ]
+       level_1 = [ (36,16,14) , (51,27,17) ],
+                      [ (24,64,20) , (31,75,29) ],
+                      [ (32,64,20) , (43,71,25) ]
+   }
+}
+
+RefineSchedule {
+   extra_debug = TRUE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/cell_periodic_a.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/cell_periodic_a.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,219 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "cell_periodic_a.2d"
+    log_all_nodes  = TRUE
+    plot = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+    test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+CellPatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0
+         dst_ghosts = 0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_3 {
+         src_name = "src_var3"
+         dst_name = "dst_var3"
+         depth = 2
+         src_ghosts = 0,0
+         dst_ghosts = 3,5
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (29,19) ]
+   x_lo         = 0.e0 , 0.e0    // lower end of computational domain.
+   x_up         = 3.e0 , 2.e0    // upper end of computational domain.
+   periodic_dimension = 1, 1
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      // level_0 = 40, 40
+      level_0 = -1, -1
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 1, 1
+      level_2            = 1, 1
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+   check_nonnesting_user_boxes = "WARN"
+}
+
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (0,0) , (5,5) ],
+                [ (0,6) , (5,12) ],
+                [ (24,6) , (29,10) ],
+                [ (24,11) , (29,19) ],
+                [ (18,13) , (23,19) ],
+                [ (21,0) , (29,5) ],
+                [ (0,14) , (9,19) ],
+                [ (11,5) , (17,11) ]
+      level_1 = [ (0,2) , (4,7) ],
+                [ (25,7) , (29,11) ],
+                [ (22,15) , (29,19) ],
+                [ (12,6) , (16,10) ]
+   }
+
+}
+
+MappedBoxHierarchy {
+   log_actions = 'y'
+   check_input_connectors = 'y'
+   check_output_connectors = 'y'
+}
+
+OverlapConnectorUtil {
+   print_bridge_steps = 'n'
+}
+
+MappingConnectorUtil {
+   print_modify_steps = 'n'
+}
+
+RefineSchedule {
+   extra_debug = TRUE
+}
+
+TreeLoadBalancer{
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/cell_periodic_a.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/cell_periodic_a.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,227 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "cell_periodic_a.3d"
+    log_all_nodes  = TRUE
+    plot = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+    test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+CellPatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_3 {
+         src_name = "src_var3"
+         dst_name = "dst_var3"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 3,5,4
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (29,19,39) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 3.e0 , 2.e0 , 4.e0   // upper end of computational domain.
+   periodic_dimension = 1, 1, 1
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 1, 1, 1
+      level_2            = 1, 1, 1
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+   check_nonnesting_user_boxes = "WARN"
+}
+
+
+TreeLoadBalancer {
+   barrier_after = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (0,0,0) , (5,5,22) ],
+                [ (0,6,0) , (5,10,19) ],
+                [ (0,0,25) , (5,8,39) ],
+                [ (26,1,6) , (29,8,10) ],
+                [ (26,6,11) , (29,11,14) ],
+                [ (26,14,11) , (29,19,22) ],
+                [ (26,0,11) , (29,5,22) ],
+                [ (24,10,30) , (29,19,39) ],
+                [ (0,14,35) , (2,19,39) ],
+                [ (0,14,0) , (2,19,3) ],
+                [ (24,0,0) , (29,19,5) ],
+                [ (26,0,30) , (29,8,39) ],
+                [ (18,13,15) , (23,19,39) ],
+                [ (0,14,10) , (17,19,29) ],
+                [ (11,0,14) , (20,11,24) ]
+      level_1 = [ (0,2,0) , (4,7,10) ],
+                [ (27,15,36) , (29,19,39) ],
+                [ (0,15,12) , (4,19,21) ],
+                [ (12,0,15) , (16,5,19) ],
+                [ (14,15,17) , (19,19,21) ]
+   }
+
+}
+
+MappedBoxHierarchy {
+   log_actions = 'n'
+   check_input_connectors = 'y'
+   check_output_connectors = 'y'
+}
+
+OverlapConnectorUtil {
+   print_bridge_steps = 'n'
+}
+
+MappingConnectorUtil {
+   print_modify_steps = 'n'
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/cell_periodic_b.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/cell_periodic_b.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,217 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "cell_periodic_b.2d"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+    test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+CellPatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0
+         dst_ghosts = 0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_3 {
+         src_name = "src_var3"
+         dst_name = "dst_var3"
+         depth = 2
+         src_ghosts = 0,0
+         dst_ghosts = 3,5
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (29,19) ]
+   x_lo         = 0.e0 , 0.e0    // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0    // upper end of computational domain.
+   periodic_dimension = 1, 1
+}
+
+PatchHierarchy {
+   max_levels = 2
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 1, 1
+      level_2            = 1, 1
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+   barrier_after = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (0,0) , (5,5) ],
+                [ (0,6) , (5,10) ],
+                [ (24,5) , (29,9) ],
+                [ (24,10) , (29,19) ],
+                [ (18,13) , (23,19) ],
+                [ (0,14) , (9,19) ],
+                [ (11,5) , (17,11) ]
+      level_1 = [ (0,2) , (4,7) ],
+                [ (25,6) , (29,12) ],
+                [ (22,15) , (29,19) ],
+                [ (0,15) , (4,19) ],
+                [ (12,6) , (16,10) ]
+   }
+
+}
+
+MappedBoxHierarchy {
+   log_actions = 'n'
+   check_input_connectors = 'y'
+   check_output_connectors = 'y'
+}
+
+OverlapConnectorUtil {
+   print_bridge_steps = 'n'
+}
+
+MappingConnectorUtil {
+   print_modify_steps = 'n'
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/cell_periodic_b.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/cell_periodic_b.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,218 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "cell_periodic_b.3d"
+    log_all_nodes  = TRUE
+    plot = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+    test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+CellPatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_3 {
+         src_name = "src_var3"
+         dst_name = "dst_var3"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 3,5,4
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (29,19,39) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 3.e0 , 2.e0 , 4.e0   // upper end of computational domain.
+   periodic_dimension = 1, 1, 1
+}
+
+PatchHierarchy {
+   max_levels = 2
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 1, 1, 1
+      level_2            = 1, 1, 1
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+   barrier_after = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (0,0,0) , (5,5,29) ],
+                [ (0,6,0) , (5,10,19) ],
+                [ (24,5,14) , (29,9,39) ],
+                [ (24,10,24) , (29,19,39) ],
+                [ (18,13,15) , (23,19,39) ],
+                [ (0,14,10) , (17,19,29) ],
+                [ (11,5,14) , (17,11,24) ]
+      level_1 = [ (0,2,0) , (4,7,14) ],
+                [ (25,6,35) , (29,12,39) ],
+                [ (22,15,25) , (29,19,39) ],
+                [ (0,15,12) , (4,19,21) ],
+                [ (12,6,15) , (16,10,19) ]
+   }
+
+}
+
+MappedBoxHierarchy {
+   log_actions = 'n'
+   check_input_connectors = 'y'
+   check_output_connectors = 'y'
+}
+
+OverlapConnectorUtil {
+   print_bridge_steps = 'n'
+}
+
+MappingConnectorUtil {
+   print_modify_steps = 'n'
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/cell_periodic_c.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/cell_periodic_c.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,220 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "cell_periodic_c.2d"
+    log_all_nodes  = TRUE
+    plot = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+    test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = FALSE
+//    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = TRUE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+CellPatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0
+         dst_ghosts = 0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_3 {
+         src_name = "src_var3"
+         dst_name = "dst_var3"
+         depth = 2
+         src_ghosts = 0,0
+         dst_ghosts = 3,5
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (29,19) ]
+   x_lo         = 0.e0 , 0.e0    // lower end of computational domain.
+   x_up         = 3.e0 , 2.e0    // upper end of computational domain.
+   periodic_dimension = 1, 0
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 1, 1
+      level_2            = 1, 1
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+   check_nonnesting_user_boxes = "WARN"
+   check_boundary_proximity_violation_of_user_boxes = "ERROR"
+}
+
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (0,0) , (5,5) ],
+                [ (0,6) , (5,12) ],
+                [ (24,6) , (29,10) ],
+                [ (24,11) , (29,19) ],
+                [ (18,13) , (23,19) ],
+                [ (21,0) , (29,5) ],
+                [ (0,14) , (9,19) ],
+                [ (11,5) , (17,11) ]
+      level_1 = [ (0,5) , (4,10) ],
+                [ (25,7) , (29,11) ],
+                [ (22,15) , (29,19) ],
+                [ (12,6) , (16,10) ]
+   }
+
+}
+
+MappedBoxHierarchy {
+   log_actions = 'y'
+   check_input_connectors = 'y'
+   check_output_connectors = 'y'
+}
+
+OverlapConnectorUtil {
+   print_bridge_steps = 'n'
+}
+
+MappingConnectorUtil {
+   print_modify_steps = 'n'
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+TreeLoadBalancer{
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/cell_periodic_c.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/cell_periodic_c.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,227 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "cell_periodic_c.3d"
+    log_all_nodes  = TRUE
+    plot = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+    test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = FALSE
+//    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = TRUE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+CellPatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_3 {
+         src_name = "src_var3"
+         dst_name = "dst_var3"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 3,5,4
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (29,19,39) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0 , 1.e0   // upper end of computational domain.
+   periodic_dimension = 1, 1, 1
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 1, 1, 1
+      level_2            = 1, 1, 1
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+   barrier_after = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (0,0,0) , (5,5,22) ],
+                [ (0,6,0) , (5,10,19) ],
+                [ (0,0,25) , (5,8,39) ],
+                [ (26,1,6) , (29,8,10) ],
+                [ (26,6,11) , (29,11,14) ],
+                [ (26,14,11) , (29,19,22) ],
+                [ (26,0,11) , (29,5,22) ],
+                [ (24,10,30) , (29,19,39) ],
+                [ (0,14,35) , (2,19,39) ],
+                [ (0,14,0) , (2,19,3) ],
+                [ (24,0,0) , (29,19,5) ],
+                [ (26,0,30) , (29,8,39) ],
+                [ (18,13,15) , (23,19,39) ],
+                [ (0,14,10) , (17,19,29) ],
+                [ (11,0,14) , (20,11,24) ]
+      level_1 = [ (0,2,0) , (4,7,10) ],
+                [ (27,15,36) , (29,19,39) ],
+                [ (0,15,12) , (4,19,21) ],
+                [ (12,0,15) , (16,5,19) ],
+                [ (14,15,17) , (19,19,21) ]
+   }
+
+}
+
+MappedBoxHierarchy {
+   log_actions = 'n'
+   check_input_connectors = 'y'
+   check_output_connectors = 'y'
+}
+
+OverlapConnectorUtil {
+   print_bridge_steps = 'n'
+}
+
+MappingConnectorUtil {
+   print_modify_steps = 'n'
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/cell_refine_a.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/cell_refine_a.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,214 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "cell-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+    test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+CellPatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0
+         dst_ghosts = 0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_3 {
+         src_name = "src_var3"
+         dst_name = "dst_var3"
+         depth = 2
+         src_ghosts = 0,0
+         dst_ghosts = 3,5
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (41,29) ],
+                  [ (42,0) , (53,29) ],
+                  [ (0,30) , (31,45) ],
+                  [ (6,46) , (42,61) ]
+   x_lo         = 0.e0 , 0.e0    // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0    // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+   barrier_before_regrid                 = FALSE
+   barrier_before_find_refinement        = FALSE
+   barrier_after_find_refinement         = FALSE
+   barrier_before_tag_cells              = FALSE
+   barrier_before_cluster                = FALSE
+   barrier_before_nest                   = FALSE
+   barrier_before_limit                  = FALSE
+   barrier_before_extend                 = FALSE
+   barrier_before_balance                = FALSE
+   barrier_before_make_new               = FALSE
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 {
+         boxes_0 = [ (0,16) , (11,19)  ],
+                   [ (12,0) , (31,19)  ],
+                   [ (32,4) , (43,5)   ],
+                   [ (16,20) , (21,27) ],
+                   [ (8,28) , (27,41)  ],
+                   [ (20,42) , (27,55) ]
+      }
+      level_1 {
+         boxes_0 = [ (36,16) , (51,27) ],
+                   [ (24,64) , (31,75) ],
+                   [ (32,64) , (43,71) ]
+      }
+   }
+}
+
+RefineSchedule {
+   extra_debug = TRUE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/cell_refine_a.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/cell_refine_a.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,198 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "cell-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+    test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+CellPatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_3 {
+         src_name = "src_var3"
+         dst_name = "dst_var3"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 3,5,4
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (41,29,36) ],
+                  [ (42,0,4) , (53,29,32) ],
+                  [ (0,30,0) , (31,45,36) ],
+                  [ (6,46,19) , (42,61,36) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+       level_0 = [ (0,16,16) , (11,19,21) ],
+                      [ (12,0,0) , (31,19,21) ],
+                      [ (32,4,14) , (43,5,17) ],
+                      [ (16,20,4) , (21,27,11) ],
+                      [ (8,28,4) , (27,41,17) ]
+       level_1 = [ (36,16,14) , (51,27,17) ],
+                      [ (24,64,20) , (31,75,29) ],
+                      [ (32,64,20) , (43,71,25) ]
+   }
+}
+
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/cell_refine_b.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/cell_refine_b.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,205 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "cell-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+    test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+CellPatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0
+         dst_ghosts = 0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_3 {
+         src_name = "src_var3"
+         dst_name = "dst_var3"
+         depth = 2
+         src_ghosts = 0,0
+         dst_ghosts = 3,5
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (41,29) ],
+                  [ (42,0) , (53,29) ],
+                  [ (0,30) , (31,45) ],
+                  [ (6,46) , (42,61) ]
+   x_lo         = 0.e0 , 0.e0    // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0    // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 2
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 {
+         boxes_0 = [ (0,16) , (11,19)  ],
+                   [ (12,0) , (31,19)  ],
+                   [ (32,4) , (43,5)   ],
+                   [ (16,20) , (21,27) ],
+                   [ (8,28) , (27,41)  ],
+                   [ (20,42) , (27,55) ]
+      }
+      level_1 {
+         boxes_0 = [ (36,16) , (51,27) ],
+                   [ (24,64) , (31,75) ],
+                   [ (32,64) , (43,71) ]
+      }
+   }
+
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/cell_refine_b.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/cell_refine_b.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,198 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "cell-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+    test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+CellPatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_3 {
+         src_name = "src_var3"
+         dst_name = "dst_var3"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 3,5,4
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (41,29,36) ],
+                  [ (42,0,4) , (53,29,32) ],
+                  [ (0,30,0) , (31,45,36) ],
+                  [ (6,46,19) , (42,61,36) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 2
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+       level_0 = [ (0,16,16) , (11,19,21) ],
+                      [ (12,0,0) , (31,19,21) ],
+                      [ (32,4,14) , (43,5,17) ],
+                      [ (16,20,4) , (21,27,11) ],
+                      [ (8,28,4) , (27,41,17) ]
+       level_1 = [ (36,16,14) , (51,27,17) ],
+                      [ (24,64,20) , (31,75,29) ],
+                      [ (32,64,20) , (43,71,25) ]
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/edge_coarsen.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/edge_coarsen.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,190 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI edge data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "edge-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+    test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = FALSE
+//    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = TRUE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+EdgePatchDataTest {
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //                     use_fine_value_at_interface  (default = TRUE)
+   //
+
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR"
+         use_fine_value_at_interface = TRUE
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (41,29) ],
+                  [ (42,0) , (53,29) ],
+                  [ (0,30) , (31,45) ],
+                  [ (6,46) , (42,61) ]
+   x_lo         = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 {
+         boxes_0 = [ (0,16) , (11,19)  ],
+                   [ (12,0) , (31,19)  ],
+                   [ (32,4) , (43,5)   ],
+                   [ (16,20) , (21,27) ],
+                   [ (8,28) , (27,41)  ],
+                   [ (20,42) , (27,55) ]
+      }
+      level_1 {
+         boxes_0 = [ (36,16) , (51,27) ],
+                   [ (24,64) , (31,75) ],
+                   [ (32,64) , (43,71) ]
+      }
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/edge_coarsen.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/edge_coarsen.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,192 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI edge data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "edge-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+    test_to_run = "EdgeDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = FALSE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+//  refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = TRUE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+EdgePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //                     use_fine_value_at_interface  (default = TRUE)
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (41,29,36) ],
+                  [ (42,0,4) , (53,29,32) ],
+                  [ (0,30,0) , (31,45,36) ],
+                  [ (6,46,19) , (42,61,36) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+       level_0 = [ (0,16,16) , (11,19,21) ],
+                      [ (12,0,0) , (31,19,21) ],
+                      [ (32,4,14) , (43,5,17) ],
+                      [ (16,20,4) , (21,27,11) ],
+                      [ (8,28,4) , (27,41,17) ]
+       level_1 = [ (36,16,14) , (51,27,17) ],
+                      [ (24,64,20) , (31,75,29) ],
+                      [ (32,64,20) , (43,71,25) ]
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/edge_refine_a.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/edge_refine_a.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,190 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI edge data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "edge-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+    test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+EdgePatchDataTest {
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //                     use_fine_value_at_interface  (default = TRUE)
+   //
+
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (41,29) ],
+                  [ (42,0) , (53,29) ],
+                  [ (0,30) , (31,45) ],
+                  [ (6,46) , (42,61) ]
+   x_lo         = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 {
+         boxes_0 = [ (0,16) , (11,19)  ],
+                   [ (12,0) , (31,19)  ],
+                   [ (32,4) , (43,5)   ],
+                   [ (16,20) , (21,27) ],
+                   [ (8,28) , (27,41)  ],
+                   [ (20,42) , (27,55) ]
+      }
+      level_1 {
+         boxes_0 = [ (36,16) , (51,27) ],
+                   [ (24,64) , (31,75) ],
+                   [ (32,64) , (43,71) ]
+      }
+   }
+
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/edge_refine_a.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/edge_refine_a.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,202 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI edge data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "edge-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+    test_to_run = "EdgeDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+EdgePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //                     use_fine_value_at_interface  (default = TRUE)
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_3 {
+         src_name = "src_var3"
+         dst_name = "dst_var3"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 2,2,2
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (41,29,36) ],
+                  [ (42,0,4) , (53,29,32) ],
+                  [ (0,30,0) , (31,45,36) ],
+                  [ (6,46,19) , (42,61,36) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+       level_0 = [ (0,16,16) , (11,19,21) ],
+                      [ (12,0,0) , (31,19,21) ],
+                      [ (32,4,14) , (43,5,17) ],
+                      [ (16,20,4) , (21,27,11) ],
+                      [ (8,28,4) , (27,41,17) ]
+       level_1 = [ (36,16,14) , (51,27,17) ],
+                      [ (24,64,20) , (31,75,29) ],
+                      [ (32,64,20) , (43,71,25) ]
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/edge_refine_b.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/edge_refine_b.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,190 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI edge data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "edge-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+    test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+EdgePatchDataTest {
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //                     use_fine_value_at_interface  (default = TRUE)
+   //
+
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (41,29) ],
+                  [ (42,0) , (53,29) ],
+                  [ (0,30) , (31,45) ],
+                  [ (6,46) , (42,61) ]
+   x_lo         = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 2
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 {
+         boxes_0 = [ (0,16) , (11,19)  ],
+                   [ (12,0) , (31,19)  ],
+                   [ (32,4) , (43,5)   ],
+                   [ (16,20) , (21,27) ],
+                   [ (8,28) , (27,41)  ],
+                   [ (20,42) , (27,55) ]
+      }
+      level_1 {
+         boxes_0 = [ (36,16) , (51,27) ],
+                   [ (24,64) , (31,75) ],
+                   [ (32,64) , (43,71) ]
+      }
+   }
+
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/edge_refine_b.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/edge_refine_b.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,191 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI edge data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "edge-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+    test_to_run = "EdgeDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+EdgePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //                     use_fine_value_at_interface  (default = TRUE)
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (41,29,36) ],
+                  [ (42,0,4) , (53,29,32) ],
+                  [ (0,30,0) , (31,45,36) ],
+                  [ (6,46,19) , (42,61,36) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 2
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+       level_0 = [ (0,16,16) , (11,19,21) ],
+                      [ (12,0,0) , (31,19,21) ],
+                      [ (32,4,14) , (43,5,17) ],
+                      [ (16,20,4) , (21,27,11) ],
+                      [ (8,28,4) , (27,41,17) ]
+       level_1 = [ (36,16,14) , (51,27,17) ],
+                      [ (24,64,20) , (31,75,29) ],
+                      [ (32,64,20) , (43,71,25) ]
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/face_coarsen.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/face_coarsen.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,198 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI face data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "face-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+    test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = FALSE
+//  refine_option = "INTERIOR_FROM_SAME_LEVEL"
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = TRUE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+FacePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //                     use_fine_value_at_interface  (default = TRUE)
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (41,29) ],
+                  [ (42,0) , (53,29) ],
+                  [ (0,30) , (31,45) ],
+                  [ (6,46) , (42,61) ]
+   x_lo         = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 {
+         boxes_0 = [ (0,16) , (11,19)  ],
+                   [ (12,0) , (31,19)  ],
+                   [ (32,4) , (43,5)   ],
+                   [ (16,20) , (21,27) ],
+                   [ (8,28) , (27,41)  ],
+                   [ (20,42) , (27,55) ]
+      }
+      level_1 {
+         boxes_0 = [ (36,16) , (51,27) ],
+                   [ (24,64) , (31,75) ],
+                   [ (32,64) , (43,71) ]
+      }
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/face_coarsen.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/face_coarsen.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,192 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI face data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "face-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+    test_to_run = "FaceDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = FALSE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+//  refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = TRUE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+FacePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //                     use_fine_value_at_interface  (default = TRUE)
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (41,29,36) ],
+                  [ (42,0,4) , (53,29,32) ],
+                  [ (0,30,0) , (31,45,36) ],
+                  [ (6,46,19) , (42,61,36) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+       level_0 = [ (0,16,16) , (11,19,21) ],
+                      [ (12,0,0) , (31,19,21) ],
+                      [ (32,4,14) , (43,5,17) ],
+                      [ (16,20,4) , (21,27,11) ],
+                      [ (8,28,4) , (27,41,17) ]
+       level_1 = [ (36,16,14) , (51,27,17) ],
+                      [ (24,64,20) , (31,75,29) ],
+                      [ (32,64,20) , (43,71,25) ]
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/face_refine_a.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/face_refine_a.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,198 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI face data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "face-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+    test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+FacePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //                     use_fine_value_at_interface  (default = TRUE)
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (41,29) ],
+                  [ (42,0) , (53,29) ],
+                  [ (0,30) , (31,45) ],
+                  [ (6,46) , (42,61) ]
+   x_lo         = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 {
+         boxes_0 = [ (0,16) , (11,19)  ],
+                   [ (12,0) , (31,19)  ],
+                   [ (32,4) , (43,5)   ],
+                   [ (16,20) , (21,27) ],
+                   [ (8,28) , (27,41)  ],
+                   [ (20,42) , (27,55) ]
+      }
+      level_1 {
+         boxes_0 = [ (36,16) , (51,27) ],
+                   [ (24,64) , (31,75) ],
+                   [ (32,64) , (43,71) ]
+      }
+   }
+
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/face_refine_a.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/face_refine_a.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,202 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI face data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "face-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+    test_to_run = "FaceDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+FacePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //                     use_fine_value_at_interface  (default = TRUE)
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_3 {
+         src_name = "src_var3"
+         dst_name = "dst_var3"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 3,5,4
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (41,29,36) ],
+                  [ (42,0,4) , (53,29,32) ],
+                  [ (0,30,0) , (31,45,36) ],
+                  [ (6,46,19) , (42,61,36) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+       level_0 = [ (0,16,16) , (11,19,21) ],
+                      [ (12,0,0) , (31,19,21) ],
+                      [ (32,4,14) , (43,5,17) ],
+                      [ (16,20,4) , (21,27,11) ],
+                      [ (8,28,4) , (27,41,17) ]
+       level_1 = [ (36,16,14) , (51,27,17) ],
+                      [ (24,64,20) , (31,75,29) ],
+                      [ (32,64,20) , (43,71,25) ]
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/face_refine_b.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/face_refine_b.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,198 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI face data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "face-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+    test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+FacePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //                     use_fine_value_at_interface  (default = TRUE)
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (41,29) ],
+                  [ (42,0) , (53,29) ],
+                  [ (0,30) , (31,45) ],
+                  [ (6,46) , (42,61) ]
+   x_lo         = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 2
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 {
+         boxes_0 = [ (0,16) , (11,19)  ],
+                   [ (12,0) , (31,19)  ],
+                   [ (32,4) , (43,5)   ],
+                   [ (16,20) , (21,27) ],
+                   [ (8,28) , (27,41)  ],
+                   [ (20,42) , (27,55) ]
+      }
+      level_1 {
+         boxes_0 = [ (36,16) , (51,27) ],
+                   [ (24,64) , (31,75) ],
+                   [ (32,64) , (43,71) ]
+      }
+   }
+
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/face_refine_b.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/face_refine_b.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,202 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI face data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "face-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+    test_to_run = "FaceDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+FacePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //                     use_fine_value_at_interface  (default = TRUE)
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_3 {
+         src_name = "src_var3"
+         dst_name = "dst_var3"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 3,5,4
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (41,29,36) ],
+                  [ (42,0,4) , (53,29,32) ],
+                  [ (0,30,0) , (31,45,36) ],
+                  [ (6,46,19) , (42,61,36) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 2
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+       level_0 = [ (0,16,16) , (11,19,21) ],
+                      [ (12,0,0) , (31,19,21) ],
+                      [ (32,4,14) , (43,5,17) ],
+                      [ (16,20,4) , (21,27,11) ],
+                      [ (8,28,4) , (27,41,17) ]
+       level_1 = [ (36,16,14) , (51,27,17) ],
+                      [ (24,64,20) , (31,75,29) ],
+                      [ (32,64,20) , (43,71,25) ]
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/node_coarsen.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/node_coarsen.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,197 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI node data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "node-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+    test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = FALSE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+//    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = TRUE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+NodePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0
+         dst_ghosts = 0,0
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (41,29) ],
+                  [ (42,0) , (53,29) ],
+                  [ (0,30) , (31,45) ],
+                  [ (6,46) , (42,61) ]
+   x_lo         = 0.e0 , 0.e0    // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0    // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 {
+         boxes_0 = [ (0,16) , (11,19)  ],
+                   [ (12,0) , (31,19)  ],
+                   [ (32,4) , (43,5)   ],
+                   [ (16,20) , (21,27) ],
+                   [ (8,28) , (27,41)  ],
+                   [ (20,42) , (27,55) ]
+      }
+      level_1 {
+         boxes_0 = [ (36,16) , (51,27) ],
+                   [ (24,64) , (31,75) ],
+                   [ (32,64) , (43,71) ]
+      }
+   }
+
+
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/node_coarsen.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/node_coarsen.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,190 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI node data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "node-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+    test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = FALSE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+//  refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = TRUE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+NodePatchDataTest {
+
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (41,29,36) ],
+                  [ (42,0,4) , (53,29,32) ],
+                  [ (0,30,0) , (31,45,36) ],
+                  [ (6,46,19) , (42,61,36) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+       level_0 = [ (0,16,16) , (11,19,21) ],
+                      [ (12,0,0) , (31,19,21) ],
+                      [ (32,4,14) , (43,5,17) ],
+                      [ (16,20,4) , (21,27,11) ],
+                      [ (8,28,4) , (27,41,17) ]
+       level_1 = [ (36,16,14) , (51,27,17) ],
+                      [ (24,64,20) , (31,75,29) ],
+                      [ (32,64,20) , (43,71,25) ]
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/node_ghostoverlap_a.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/node_ghostoverlap_a.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,189 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI node data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "node-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+    test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+    create_ghost_overlap = TRUE
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+NodePatchDataTest {
+
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 1,1,1
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var3"
+         dst_name = "dst_var3"
+         depth = 1
+         src_ghosts = 1,2,1
+         dst_ghosts = 2,2,2
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {}
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (41,29,36) ],
+                  [ (42,0,4) , (53,29,32) ],
+                  [ (0,30,0) , (31,45,36) ],
+                  [ (6,46,19) , (42,61,36) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+       level_0 = [ (0,16,16) , (11,19,21) ],
+                      [ (12,0,0) , (31,19,21) ],
+                      [ (32,4,14) , (43,5,17) ],
+                      [ (16,20,4) , (21,27,11) ],
+                      [ (8,28,4) , (27,41,17) ]
+       level_1 = [ (36,16,14) , (51,27,17) ],
+                      [ (24,64,20) , (31,75,29) ],
+                      [ (32,64,20) , (43,71,25) ]
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/node_ghostoverlap_b.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/node_ghostoverlap_b.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,183 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI node data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "node-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+    test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+    create_ghost_overlap = TRUE
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+NodePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 1,1
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (53,61) ]
+   x_lo         =  0.0e0 ,  0.0e0    // lower end of computational domain.
+   x_up         =  1.0e0 ,  1.0e0    // upper end of computational domain.
+   periodic_dimension = 0, 0
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 1, 1
+      level_2            = 1, 1
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (0,16) , (11,19) ],
+                     [ (12,0) , (31,19) ],
+                     [ (32,4) , (43,5) ],
+                     [ (16,20) , (21,27) ],
+                     [ (8,28) , (27,41) ],
+                     [ (20,42) , (27,55) ]
+      xlevel_1 = [ (36,16) , (51,27) ],
+                     [ (24,64) , (31,75) ],
+                     [ (32,64) , (43,71) ]
+      level_1 = [ (18,8) , (25,13) ],
+                     [ (12,32) , (15,37) ],
+                     [ (16,32) , (21,35) ]
+   }
+
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/node_periodic_a.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/node_periodic_a.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,208 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI node data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "node_periodic_a.2d"
+    log_all_nodes  = TRUE
+    plot = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+    test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+NodePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0
+         dst_ghosts = 0,0
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (29,19) ]
+   x_lo         = 0.e0 , 0.e0    // lower end of computational domain.
+   x_up         = 3.e0 , 2.e0    // upper end of computational domain.
+   periodic_dimension = 1, 1
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 1, 1
+      level_2            = 1, 1
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+   check_nonnesting_user_boxes = "WARN"
+}
+
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (0,0) , (5,5) ],
+                [ (0,6) , (5,12) ],
+                [ (24,6) , (29,10) ],
+                [ (24,11) , (29,19) ],
+                [ (18,13) , (23,19) ],
+                [ (21,0) , (29,5) ],
+                [ (0,14) , (9,19) ],
+                [ (11,5) , (17,11) ]
+      level_1 = [ (0,2) , (4,7) ],
+                [ (25,7) , (29,11) ],
+                [ (22,15) , (29,19) ],
+                [ (12,6) , (16,10) ]
+   }
+
+}
+
+MappedBoxHierarchy {
+   log_actions = 'y'
+   check_input_connectors = 'y'
+   check_output_connectors = 'y'
+}
+
+OverlapConnectorUtil {
+   print_bridge_steps = 'n'
+}
+
+MappingConnectorUtil {
+   print_modify_steps = 'n'
+}
+
+RefineSchedule {
+   extra_debug = TRUE
+}
+
+TreeLoadBalancer{
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/node_periodic_a.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/node_periodic_a.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,227 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI node data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "node-test"
+    log_all_nodes  = TRUE
+    plot = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+    test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+NodePatchDataTest {
+
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_3 {
+         src_name = "src_var3"
+         dst_name = "dst_var3"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 2,2,2
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {}
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (29,19,39) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 3.e0 , 2.e0 , 4.e0   // upper end of computational domain.
+   periodic_dimension = 1, 1, 1
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 1, 1, 1
+      level_2            = 1, 1, 1
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+   check_nonnesting_user_boxes = "WARN"
+}
+
+
+TreeLoadBalancer {
+   barrier_after = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (0,0,0) , (5,5,22) ],
+                [ (0,6,0) , (5,10,19) ],
+                [ (0,0,25) , (5,8,39) ],
+                [ (26,1,6) , (29,8,10) ],
+                [ (26,6,11) , (29,11,14) ],
+                [ (26,14,11) , (29,19,22) ],
+                [ (26,0,11) , (29,5,22) ],
+                [ (24,10,30) , (29,19,39) ],
+                [ (0,14,35) , (2,19,39) ],
+                [ (0,14,0) , (2,19,3) ],
+                [ (24,0,0) , (29,19,5) ],
+                [ (26,0,30) , (29,8,39) ],
+                [ (18,13,15) , (23,19,39) ],
+                [ (0,14,10) , (17,19,29) ],
+                [ (11,0,14) , (20,11,24) ]
+      level_1 = [ (0,2,0) , (4,7,10) ],
+                [ (27,15,36) , (29,19,39) ],
+                [ (0,15,12) , (4,19,21) ],
+                [ (12,0,15) , (16,5,19) ],
+                [ (14,15,17) , (19,19,21) ]
+   }
+
+}
+
+MappedBoxHierarchy {
+   log_actions = 'n'
+   check_input_connectors = 'y'
+   check_output_connectors = 'y'
+}
+
+OverlapConnectorUtil {
+   print_bridge_steps = 'n'
+}
+
+MappingConnectorUtil {
+   print_modify_steps = 'n'
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/node_periodic_b.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/node_periodic_b.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,208 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI node data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "node_periodic_b.2d"
+    log_all_nodes  = TRUE
+    plot = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+    test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+NodePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0
+         dst_ghosts = 0,0
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (29,19) ]
+   x_lo         = 0.e0 , 0.e0    // lower end of computational domain.
+   x_up         = 3.e0 , 2.e0    // upper end of computational domain.
+   periodic_dimension = 1, 1
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 1, 1
+      level_2            = 1, 1
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+   check_nonnesting_user_boxes = "WARN"
+}
+
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (0,0) , (5,5) ],
+                [ (0,6) , (5,12) ],
+                [ (24,6) , (29,10) ],
+                [ (24,11) , (29,19) ],
+                [ (18,13) , (23,19) ],
+                [ (21,0) , (29,5) ],
+                [ (0,14) , (9,19) ],
+                [ (11,5) , (17,11) ]
+      level_1 = [ (0,2) , (4,7) ],
+                [ (25,7) , (29,11) ],
+                [ (22,15) , (29,19) ],
+                [ (12,6) , (16,10) ]
+   }
+
+}
+
+MappedBoxHierarchy {
+   log_actions = 'y'
+   check_input_connectors = 'y'
+   check_output_connectors = 'y'
+}
+
+OverlapConnectorUtil {
+   print_bridge_steps = 'n'
+}
+
+MappingConnectorUtil {
+   print_modify_steps = 'n'
+}
+
+RefineSchedule {
+   extra_debug = TRUE
+}
+
+TreeLoadBalancer{
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/node_periodic_b.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/node_periodic_b.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,217 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI node data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "node_periodic_b.3d"
+    log_all_nodes  = TRUE
+    plot = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+    test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+NodePatchDataTest {
+
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {}
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (29,19,39) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 3.e0 , 2.e0 , 4.e0   // upper end of computational domain.
+   periodic_dimension = 1, 1, 1
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 1, 1, 1
+      level_2            = 1, 1, 1
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+   check_nonnesting_user_boxes = "WARN"
+}
+
+
+TreeLoadBalancer {
+   barrier_after = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (0,0,0) , (5,5,22) ],
+                [ (0,6,0) , (5,10,19) ],
+                [ (0,0,25) , (5,8,39) ],
+                [ (26,1,6) , (29,8,10) ],
+                [ (26,6,11) , (29,11,14) ],
+                [ (26,14,11) , (29,19,22) ],
+                [ (26,0,11) , (29,5,22) ],
+                [ (24,10,30) , (29,19,39) ],
+                [ (0,14,35) , (2,19,39) ],
+                [ (0,14,0) , (2,19,3) ],
+                [ (24,0,0) , (29,19,5) ],
+                [ (26,0,30) , (29,8,39) ],
+                [ (18,13,15) , (23,19,39) ],
+                [ (0,14,10) , (17,19,29) ],
+                [ (11,0,14) , (20,11,24) ]
+      level_1 = [ (0,2,0) , (4,7,10) ],
+                [ (27,15,36) , (29,19,39) ],
+                [ (0,15,12) , (4,19,21) ],
+                [ (12,0,15) , (16,5,19) ],
+                [ (14,15,17) , (19,19,21) ]
+   }
+
+}
+
+MappedBoxHierarchy {
+   log_actions = 'n'
+   check_input_connectors = 'y'
+   check_output_connectors = 'y'
+}
+
+OverlapConnectorUtil {
+   print_bridge_steps = 'n'
+}
+
+MappingConnectorUtil {
+   print_modify_steps = 'n'
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/node_periodic_c.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/node_periodic_c.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,223 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI node data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "node_periodic_c.2d"
+    log_all_nodes  = TRUE
+    plot = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+    test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = FALSE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+//    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = TRUE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+NodePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0
+         dst_ghosts = 0,0
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (29,19) ]
+   x_lo         = 0.e0 , 0.e0    // lower end of computational domain.
+   x_up         = 3.e0 , 2.e0    // upper end of computational domain.
+   periodic_dimension = 1, 1
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+   check_nonnesting_user_boxes = "WARN"
+}
+
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   xRefineBoxes {
+      level_0 = [ (0,0) , (5,5) ],
+                [ (0,6) , (5,10) ],
+                [ (24,5) , (29,9) ],
+                [ (24,10) , (29,19) ],
+                [ (18,13) , (23,19) ],
+                [ (0,14) , (9,19) ],
+                [ (11,5) , (17,11) ]
+      level_1 = [ (0,4) , (9,15) ],
+                [ (50,12) , (59,24) ],
+                [ (44,30) , (59,39) ],
+                [ (0,30) , (9,39) ],
+                [ (24,12) , (33,21) ]
+   }
+   RefineBoxes {
+      level_0 = [ (0,0) , (5,5) ],
+                [ (0,6) , (5,12) ],
+                [ (24,6) , (29,10) ],
+                [ (24,11) , (29,19) ],
+                [ (18,13) , (23,19) ],
+                [ (21,0) , (29,5) ],
+                [ (0,14) , (9,19) ],
+                [ (11,5) , (17,11) ]
+      level_1 = [ (0,4) , (9,15) ],
+                [ (50,14) , (59,23) ],
+                [ (44,30) , (59,39) ],
+                [ (24,12) , (33,21) ]
+   }
+
+}
+
+MappedBoxHierarchy {
+   log_actions = 'y'
+   check_input_connectors = 'y'
+   check_output_connectors = 'y'
+}
+
+OverlapConnectorUtil {
+   print_bridge_steps = 'n'
+}
+
+MappingConnectorUtil {
+   print_modify_steps = 'n'
+}
+
+RefineSchedule {
+   extra_debug = TRUE
+}
+
+TreeLoadBalancer{
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/node_periodic_c.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/node_periodic_c.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,219 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI node data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "node_periodic_c.3d"
+    log_all_nodes  = TRUE
+    plot = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+    test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = FALSE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+//  refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = TRUE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+NodePatchDataTest {
+
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (29,19,39) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 3.e0 , 2.e0 , 4.e0   // upper end of computational domain.
+   periodic_dimension = 1, 0, 0
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+   check_nonnesting_user_boxes = "WARN"
+}
+
+
+TreeLoadBalancer {
+   barrier_after = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (0,0,0) , (5,5,22) ],
+                [ (0,6,0) , (5,10,19) ],
+                [ (0,0,25) , (5,8,39) ],
+                [ (26,1,6) , (29,8,10) ],
+                [ (26,6,11) , (29,11,14) ],
+                [ (26,14,11) , (29,19,22) ],
+                [ (26,0,11) , (29,5,22) ],
+                [ (24,10,30) , (29,19,39) ],
+                [ (0,14,35) , (2,19,39) ],
+                [ (0,14,0) , (2,19,3) ],
+                [ (24,0,0) , (29,19,5) ],
+                [ (26,0,30) , (29,8,39) ],
+                [ (18,13,15) , (23,19,39) ],
+                [ (0,14,10) , (17,19,29) ],
+                [ (11,0,14) , (20,11,24) ]
+      level_1 = [ (0,4,0) , (9,15,21) ],
+                [ (54,30,72) , (59,39,79) ],
+                [ (0,30,24) , (9,39,43) ],
+                [ (24,0,30) , (33,11,39) ],
+                [ (28,30,34) , (39,39,43) ]
+   }
+
+}
+
+MappedBoxHierarchy {
+   log_actions = 'n'
+   check_input_connectors = 'y'
+   check_output_connectors = 'y'
+}
+
+OverlapConnectorUtil {
+   print_bridge_steps = 'n'
+}
+
+MappingConnectorUtil {
+   print_modify_steps = 'y'
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/node_refine_a.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/node_refine_a.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,195 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI node data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "node-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+    test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+NodePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0
+         dst_ghosts = 0,0
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (41,29) ],
+                  [ (42,0) , (53,29) ],
+                  [ (0,30) , (31,45) ],
+                  [ (6,46) , (42,61) ]
+   x_lo         = 0.e0 , 0.e0    // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0    // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 {
+         boxes_0 = [ (0,16) , (11,19)  ],
+                   [ (12,0) , (31,19)  ],
+                   [ (32,4) , (43,5)   ],
+                   [ (16,20) , (21,27) ],
+                   [ (8,28) , (27,41)  ],
+                   [ (20,42) , (27,55) ]
+      }
+      level_1 {
+         boxes_0 = [ (36,16) , (51,27) ],
+                   [ (24,64) , (31,75) ],
+                   [ (32,64) , (43,71) ]
+      }
+   }
+
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/node_refine_a.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/node_refine_a.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,198 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI node data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "node-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+    test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+NodePatchDataTest {
+
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_3 {
+         src_name = "src_var3"
+         dst_name = "dst_var3"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 2,2,2
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {}
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (41,29,36) ],
+                  [ (42,0,4) , (53,29,32) ],
+                  [ (0,30,0) , (31,45,36) ],
+                  [ (6,46,19) , (42,61,36) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+       level_0 = [ (0,16,16) , (11,19,21) ],
+                      [ (12,0,0) , (31,19,21) ],
+                      [ (32,4,14) , (43,5,17) ],
+                      [ (16,20,4) , (21,27,11) ],
+                      [ (8,28,4) , (27,41,17) ]
+       level_1 = [ (36,16,14) , (51,27,17) ],
+                      [ (24,64,20) , (31,75,29) ],
+                      [ (32,64,20) , (43,71,25) ]
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/node_refine_b.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/node_refine_b.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,192 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI node data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "node-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+    test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+NodePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0
+         dst_ghosts = 0,0
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (53,61) ]
+   x_lo         =  0.0e0 ,  0.0e0    // lower end of computational domain.
+   x_up         =  1.0e0 ,  1.0e0    // upper end of computational domain.
+   periodic_dimension = 0, 0
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 1, 1
+      level_2            = 1, 1
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (0,16) , (11,19) ],
+                     [ (12,0) , (31,19) ],
+                     [ (32,4) , (43,5) ],
+                     [ (16,20) , (21,27) ],
+                     [ (8,28) , (27,41) ],
+                     [ (20,42) , (27,55) ]
+      xlevel_1 = [ (36,16) , (51,27) ],
+                     [ (24,64) , (31,75) ],
+                     [ (32,64) , (43,71) ]
+      level_1 = [ (18,8) , (25,13) ],
+                     [ (12,32) , (15,37) ],
+                     [ (16,32) , (21,35) ]
+   }
+
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/node_refine_b.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/node_refine_b.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,188 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI node data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "node-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+    test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+NodePatchDataTest {
+
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {}
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (41,29,36) ],
+                  [ (42,0,4) , (53,29,32) ],
+                  [ (0,30,0) , (31,45,36) ],
+                  [ (6,46,19) , (42,61,36) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 2
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+       level_0 = [ (0,16,16) , (11,19,21) ],
+                      [ (12,0,0) , (31,19,21) ],
+                      [ (32,4,14) , (43,5,17) ],
+                      [ (16,20,4) , (21,27,11) ],
+                      [ (8,28,4) , (27,41,17) ]
+       level_1 = [ (36,16,14) , (51,27,17) ],
+                      [ (24,64,20) , (31,75,29) ],
+                      [ (32,64,20) , (43,71,25) ]
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/oface_coarsen.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/oface_coarsen.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,196 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI face data. 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "oface-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+    test_to_run = "OuterfaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = FALSE
+//  refine_option = "INTERIOR_FROM_SAME_LEVEL"
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = TRUE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+OuterfacePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //                     use_fine_value_at_interface  (default = TRUE)
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (41,29) ],
+                  [ (42,0) , (53,29) ],
+                  [ (0,30) , (31,45) ],
+                  [ (6,46) , (42,61) ]
+   x_lo         = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 {
+         boxes_0 = [ (0,16) , (11,19)  ],
+                   [ (12,0) , (31,19)  ],
+                   [ (32,4) , (43,5)   ],
+                   [ (16,20) , (21,27) ],
+                   [ (8,28) , (27,41)  ],
+                   [ (20,42) , (27,55) ]
+      }
+      level_1 {
+         boxes_0 = [ (36,16) , (51,27) ],
+                   [ (24,64) , (31,75) ],
+                   [ (32,64) , (43,71) ]
+      }
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/oface_coarsen.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/oface_coarsen.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,189 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI OuterfaceData. 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "oface-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//    test_to_run = "FaceDataTest"
+    test_to_run = "OuterfaceDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = FALSE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+//  refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = TRUE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+OuterfacePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //                     use_fine_value_at_interface  (default = TRUE)
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (41,29,36) ],
+                  [ (42,0,4) , (53,29,32) ],
+                  [ (0,30,0) , (31,45,36) ],
+                  [ (6,46,19) , (42,61,36) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+       level_0 = [ (0,16,16) , (11,19,21) ],
+                      [ (12,0,0) , (31,19,21) ],
+                      [ (32,4,14) , (43,5,17) ],
+                      [ (16,20,4) , (21,27,11) ],
+                      [ (8,28,4) , (27,41,17) ]
+       level_1 = [ (36,16,14) , (51,27,17) ],
+                      [ (24,64,20) , (31,75,29) ],
+                      [ (32,64,20) , (43,71,25) ]
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/onode_coarsen.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/onode_coarsen.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,193 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI node data. 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "onode-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+    test_to_run = "OuternodeDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = FALSE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+//    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = TRUE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+OuternodePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0
+         dst_ghosts = 0,0
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (41,29) ],
+                  [ (42,0) , (53,29) ],
+                  [ (0,30) , (31,45) ],
+                  [ (6,46) , (42,61) ]
+   x_lo         = 0.e0 , 0.e0    // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0    // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 {
+         boxes_0 = [ (0,16) , (11,19)  ],
+                   [ (12,0) , (31,19)  ],
+                   [ (32,4) , (43,5)   ],
+                   [ (16,20) , (21,27) ],
+                   [ (8,28) , (27,41)  ],
+                   [ (20,42) , (27,55) ]
+      }
+      level_1 {
+         boxes_0 = [ (36,16) , (51,27) ],
+                   [ (24,64) , (31,75) ],
+                   [ (32,64) , (43,71) ]
+      }
+   }
+
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/onode_coarsen.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/onode_coarsen.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,187 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI node data. 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "onode-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+    test_to_run = "OuternodeDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = FALSE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+//  refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = TRUE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+OuternodePatchDataTest {
+
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSTANT_COARSEN"
+         refine_operator = "LINEAR_REFINE"
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (41,29,36) ],
+                  [ (42,0,4) , (53,29,32) ],
+                  [ (0,30,0) , (31,45,36) ],
+                  [ (6,46,19) , (42,61,36) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+       level_0 = [ (0,16,16) , (11,19,21) ],
+                      [ (12,0,0) , (31,19,21) ],
+                      [ (32,4,14) , (43,5,17) ],
+                      [ (16,20,4) , (21,27,11) ],
+                      [ (8,28,4) , (27,41,17) ]
+       level_1 = [ (36,16,14) , (51,27,17) ],
+                      [ (24,64,20) , (31,75,29) ],
+                      [ (32,64,20) , (43,71,25) ]
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/oside_coarsen.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/oside_coarsen.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,202 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI outerside data. 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "oside-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+    test_to_run = "OutersideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = FALSE
+//  refine_option = "INTERIOR_FROM_SAME_LEVEL"
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = TRUE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+OutersidePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //                     use_fine_value_at_interface  (default = TRUE)
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+   }
+
+   RefinementData {}
+
+}
+
+//CartesianGridGeometry {
+//   domain_boxes = [ (0,0) , (3,1) ]
+
+ CartesianGridGeometry {
+    domain_boxes = [ (0,0) , (41,29) ],
+                   [ (42,0) , (53,29) ],
+                   [ (0,30) , (31,45) ],
+                   [ (6,46) , (42,61) ]
+
+//   domain_boxes = [ (0,0) , (3, 1) ]
+
+
+   x_lo         = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 {
+         boxes_0 = [ (0,16) , (11,19)  ],
+                   [ (12,0) , (31,19)  ],
+                   [ (32,4) , (43,5)   ],
+                   [ (16,20) , (21,27) ],
+                   [ (8,28) , (27,41)  ],
+                   [ (20,42) , (27,55) ]
+      }
+      level_1 {
+         boxes_0 = [ (36,16) , (51,27) ],
+                   [ (24,64) , (31,75) ],
+                   [ (32,64) , (43,71) ]
+      }
+   }
+
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/oside_coarsen.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/oside_coarsen.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,189 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI OutersideData. 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "oside-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+    test_to_run = "OutersideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = FALSE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+//  refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = TRUE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+OutersidePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //                     use_fine_value_at_interface  (default = TRUE)
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         use_fine_value_at_interface = TRUE
+      }
+
+   }
+
+   RefinementData {
+   }
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (41,29,36) ],
+                  [ (42,0,4) , (53,29,32) ],
+                  [ (0,30,0) , (31,45,36) ],
+                  [ (6,46,19) , (42,61,36) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+       level_0 = [ (0,16,16) , (11,19,21) ],
+                      [ (12,0,0) , (31,19,21) ],
+                      [ (32,4,14) , (43,5,17) ],
+                      [ (16,20,4) , (21,27,11) ],
+                      [ (8,28,4) , (27,41,17) ]
+       level_1 = [ (36,16,14) , (51,27,17) ],
+                      [ (24,64,20) , (31,75,29) ],
+                      [ (32,64,20) , (43,71,25) ]
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/side_coarsen.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/side_coarsen.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,200 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI side data. 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "side-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+    test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = FALSE
+//  refine_option = "INTERIOR_FROM_SAME_LEVEL"
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = TRUE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+SidePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //                     test_direction     (default = -1 ie, all directions)
+   //                     use_fine_value_at_interface  (default = TRUE)
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         test_direction = 1
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         test_direction = 0
+         use_fine_value_at_interface = TRUE
+      }
+
+   }
+
+   RefinementData {}
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (41,29) ],
+                  [ (42,0) , (53,29) ],
+                  [ (0,30) , (31,45) ],
+                  [ (6,46) , (42,61) ]
+   x_lo         = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 {
+         boxes_0 = [ (0,16) , (11,19)  ],
+                   [ (12,0) , (31,19)  ],
+                   [ (32,4) , (43,5)   ],
+                   [ (16,20) , (21,27) ],
+                   [ (8,28) , (27,41)  ],
+                   [ (20,42) , (27,55) ]
+      }
+      level_1 {
+         boxes_0 = [ (36,16) , (51,27) ],
+                   [ (24,64) , (31,75) ],
+                   [ (32,64) , (43,71) ]
+      }
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/side_coarsen.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/side_coarsen.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,189 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI side data. 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "side-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+    test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = FALSE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+//  refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = TRUE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+SidePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //                     test_direction     (default = -1 ie, all directions)
+   //                     use_fine_value_at_interface  (default = TRUE)
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         test_direction = -1
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         test_direction = 1
+         use_fine_value_at_interface = TRUE
+      }
+
+   }
+
+   RefinementData {}
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (41,29,36) ],
+                  [ (42,0,4) , (53,29,32) ],
+                  [ (0,30,0) , (31,45,36) ],
+                  [ (6,46,19) , (42,61,36) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+       level_0 = [ (0,16,16) , (11,19,21) ],
+                      [ (12,0,0) , (31,19,21) ],
+                      [ (32,4,14) , (43,5,17) ],
+                      [ (16,20,4) , (21,27,11) ],
+                      [ (8,28,4) , (27,41,17) ]
+       level_1 = [ (36,16,14) , (51,27,17) ],
+                      [ (24,64,20) , (31,75,29) ],
+                      [ (32,64,20) , (43,71,25) ]
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/side_periodic_a.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/side_periodic_a.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,209 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI side data. 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "side_periodic_a.2d"
+    log_all_nodes  = TRUE
+    plot = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+    test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+SidePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //                     test_direction     (default = -1 ie, all directions)
+   //                     use_fine_value_at_interface  (default = TRUE)
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         test_direction = 1
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         test_direction = 0
+         use_fine_value_at_interface = TRUE
+      }
+
+   }
+
+   RefinementData {}
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (29,19) ]
+   x_lo         =  0.0e0 ,  0.0e0    // lower end of computational domain.
+   x_up         =  3.0e0 ,  2.0e0    // upper end of computational domain.
+   periodic_dimension = 0, 1
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 1, 1
+      level_2            = 1, 1
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+   check_nonnesting_user_boxes = "WARN"
+}
+
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (0,0) , (5,5) ],
+                [ (0,6) , (5,12) ],
+                [ (24,6) , (29,10) ],
+                [ (24,11) , (29,19) ],
+                [ (18,13) , (23,19) ],
+                [ (21,0) , (29,5) ],
+                [ (0,14) , (9,19) ],
+                [ (11,5) , (17,11) ]
+      level_1 = [ (0,2) , (4,7) ],
+                [ (25,7) , (29,11) ],
+                [ (22,15) , (29,19) ],
+                [ (12,6) , (16,10) ]
+   }
+
+}
+
+MappedBoxHierarchy {
+   log_actions = 'y'
+   check_input_connectors = 'y'
+   check_output_connectors = 'y'
+}
+
+OverlapConnectorUtil {
+   print_bridge_steps = 'n'
+}
+
+MappingConnectorUtil {
+   print_modify_steps = 'n'
+}
+
+RefineSchedule {
+   extra_debug = TRUE
+}
+
+TreeLoadBalancer{
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/side_periodic_a.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/side_periodic_a.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,198 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI side data. 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "side-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+    test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+SidePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //                     test_direction     (default = -1 ie, all directions)
+   //                     use_fine_value_at_interface  (default = TRUE)
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         test_direction = -1
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         test_direction = 1
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_3 {
+         src_name = "src_var3"
+         dst_name = "dst_var3"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 2,2,2
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         test_direction = 1
+         use_fine_value_at_interface = TRUE
+      }
+
+   }
+
+   RefinementData {}
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (53,61,36) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0 , 1.e0   // upper end of computational domain.
+   periodic_dimension = 1, 1, 1
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 1, 1, 1
+      level_2            = 1, 1, 1
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+       level_0 = [ (0,16,16) , (11,19,21) ],
+                      [ (12,0,0) , (31,19,21) ],
+                      [ (32,4,14) , (43,5,17) ],
+                      [ (16,20,4) , (21,27,11) ],
+                      [ (8,28,4) , (27,41,17) ]
+       level_1 = [ (18,8,7) , (25,13,8) ],
+                      [ (12,32,10) , (15,37,14) ],
+                      [ (16,32,10) , (21,35,12) ]
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/side_periodic_b.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/side_periodic_b.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,209 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI side data. 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "side_periodic_b.2d"
+    log_all_nodes  = TRUE
+    plot = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+    test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+SidePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //                     test_direction     (default = -1 ie, all directions)
+   //                     use_fine_value_at_interface  (default = TRUE)
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         test_direction = 1
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         test_direction = 0
+         use_fine_value_at_interface = TRUE
+      }
+
+   }
+
+   RefinementData {}
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (29,19) ]
+   x_lo         =  0.0e0 ,  0.0e0    // lower end of computational domain.
+   x_up         =  3.0e0 ,  2.0e0    // upper end of computational domain.
+   periodic_dimension = 0, 1
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 1, 1
+      level_2            = 1, 1
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+   check_nonnesting_user_boxes = "WARN"
+}
+
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (0,0) , (5,5) ],
+                [ (0,6) , (5,12) ],
+                [ (24,6) , (29,10) ],
+                [ (24,11) , (29,19) ],
+                [ (18,13) , (23,19) ],
+                [ (21,0) , (29,5) ],
+                [ (0,14) , (9,19) ],
+                [ (11,5) , (17,11) ]
+      level_1 = [ (0,2) , (4,7) ],
+                [ (25,7) , (29,11) ],
+                [ (22,15) , (29,19) ],
+                [ (12,6) , (16,10) ]
+   }
+
+}
+
+MappedBoxHierarchy {
+   log_actions = 'y'
+   check_input_connectors = 'y'
+   check_output_connectors = 'y'
+}
+
+OverlapConnectorUtil {
+   print_bridge_steps = 'n'
+}
+
+MappingConnectorUtil {
+   print_modify_steps = 'n'
+}
+
+RefineSchedule {
+   extra_debug = TRUE
+}
+
+TreeLoadBalancer{
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/side_periodic_b.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/side_periodic_b.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,185 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI side data. 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "side-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+    test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+SidePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //                     test_direction     (default = -1 ie, all directions)
+   //                     use_fine_value_at_interface  (default = TRUE)
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         test_direction = -1
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         test_direction = 1
+         use_fine_value_at_interface = TRUE
+      }
+
+   }
+
+   RefinementData {}
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (53,61,36) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0 , 1.e0   // upper end of computational domain.
+   periodic_dimension = 1, 1, 1
+}
+
+PatchHierarchy {
+   max_levels = 2
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 1, 1, 1
+      level_2            = 1, 1, 1
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+       level_0 = [ (0,16,16) , (11,19,21) ],
+                      [ (12,0,0) , (31,19,21) ],
+                      [ (32,4,14) , (43,5,17) ],
+                      [ (16,20,4) , (21,27,11) ],
+                      [ (8,28,4) , (27,41,17) ]
+       level_1 = [ (18,8,7) , (25,13,8) ],
+                      [ (12,32,10) , (15,37,14) ],
+                      [ (16,32,10) , (21,35,12) ]
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/side_refine_a.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/side_refine_a.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,195 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI side data. 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "side-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+    test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+SidePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //                     test_direction     (default = -1 ie, all directions)
+   //                     use_fine_value_at_interface  (default = TRUE)
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         test_direction = 1
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         test_direction = 0
+         use_fine_value_at_interface = TRUE
+      }
+
+   }
+
+   RefinementData {}
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (41,29) ],
+                  [ (42,0) , (53,29) ],
+                  [ (0,30) , (31,45) ],
+                  [ (6,46) , (42,61) ]
+   x_lo         = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 {
+         boxes_0 = [ (0,16) , (11,19)  ],
+                   [ (12,0) , (31,19)  ],
+                   [ (32,4) , (43,5)   ],
+                   [ (16,20) , (21,27) ],
+                   [ (8,28) , (27,41)  ],
+                   [ (20,42) , (27,55) ]
+      }
+      level_1 {
+         boxes_0 = [ (36,16) , (51,27) ],
+                   [ (24,64) , (31,75) ],
+                   [ (32,64) , (43,71) ]
+      }
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/side_refine_a.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/side_refine_a.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,200 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI side data. 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "side-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+    test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+SidePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //                     test_direction     (default = -1 ie, all directions)
+   //                     use_fine_value_at_interface  (default = TRUE)
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         test_direction = -1
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         test_direction = 1
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_3 {
+         src_name = "src_var3"
+         dst_name = "dst_var3"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 2,2,2
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         test_direction = 1
+         use_fine_value_at_interface = TRUE
+      }
+
+   }
+
+   RefinementData {}
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (41,29,36) ],
+                  [ (42,0,4) , (53,29,32) ],
+                  [ (0,30,0) , (31,45,36) ],
+                  [ (6,46,19) , (42,61,36) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+       level_0 = [ (0,16,16) , (11,19,21) ],
+                      [ (12,0,0) , (31,19,21) ],
+                      [ (32,4,14) , (43,5,17) ],
+                      [ (16,20,4) , (21,27,11) ],
+                      [ (8,28,4) , (27,41,17) ]
+       level_1 = [ (36,16,14) , (51,27,17) ],
+                      [ (24,64,20) , (31,75,29) ],
+                      [ (32,64,20) , (43,71,25) ]
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/side_refine_b.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/side_refine_b.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,190 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI side data. 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 2
+//
+// Log file information
+//
+    base_name  = "side-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+    test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+SidePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //                     test_direction     (default = -1 ie, all directions)
+   //                     use_fine_value_at_interface  (default = TRUE)
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         test_direction = 1
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         test_direction = 0
+         use_fine_value_at_interface = TRUE
+      }
+
+   }
+
+   RefinementData {}
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (41,29) ],
+                  [ (42,0) , (53,29) ],
+                  [ (0,30) , (31,45) ],
+                  [ (6,46) , (42,61) ]
+   x_lo         = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 2
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0 = [ (0,16) , (11,19) ],
+                     [ (12,0) , (31,19) ],
+                     [ (32,4) , (43,5) ],
+                     [ (16,20) , (21,27) ],
+                     [ (8,28) , (27,41) ],
+                     [ (20,42) , (27,55) ]
+      level_1 = [ (36,16) , (51,27) ],
+                     [ (24,64) , (31,75) ],
+                     [ (32,64) , (43,71) ]
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/communication/test_inputs/side_refine_b.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/communication/test_inputs/side_refine_b.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,187 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI side data. 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 3
+//
+// Log file information
+//
+    base_name  = "side-test"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+//
+//  test_to_run = "CellDataTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+    test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//
+// Either refine test or coarsen test can be run, but not both.  This
+// ensures proper validation of communicated data.  Default test is
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors
+// from coarser levels.  Coarsen test has no options as coarse patch
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_COARSER_LEVEL"
+
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*", "xfer::RefineSchedule::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+
+}
+
+SidePatchDataTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each
+   //                 array value at initialization and
+   //                 against which interpolation is tested)
+   //
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.
+   //
+   //    Required input:  source name
+   //    Required input:  destination name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //                     test_direction     (default = -1 ie, all directions)
+   //                     use_fine_value_at_interface  (default = TRUE)
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         test_direction = -1
+         use_fine_value_at_interface = TRUE
+      }
+
+      variable_2 {
+         src_name = "src_var2"
+         dst_name = "dst_var2"
+         depth = 2
+         src_ghosts = 0,0,0
+         dst_ghosts = 0,0,0
+         coarsen_operator = "CONSERVATIVE_COARSEN"
+         refine_operator = "CONSERVATIVE_LINEAR_REFINE"
+         test_direction = 1
+         use_fine_value_at_interface = TRUE
+      }
+
+   }
+
+   RefinementData {}
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (41,29,36) ],
+                  [ (42,0,4) , (53,29,32) ],
+                  [ (0,30,0) , (31,45,36) ],
+                  [ (6,46,19) , (42,61,36) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 2
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.85
+   extend_tags_to_bdry = TRUE
+   check_nonrefined_tags = "IGNORE"
+}
+
+TreeLoadBalancer {
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+       level_0 = [ (0,16,16) , (11,19,21) ],
+                      [ (12,0,0) , (31,19,21) ],
+                      [ (32,4,14) , (43,5,17) ],
+                      [ (16,20,4) , (21,27,11) ],
+                      [ (8,28,4) , (27,41,17) ]
+       level_1 = [ (36,16,14) , (51,27,17) ],
+                      [ (24,64,20) , (31,75,29) ],
+                      [ (32,64,20) , (43,71,25) ]
+   }
+}
+
+RefineSchedule {
+   extra_debug = FALSE
+}
+
+PersistentOverlapConnectors {
+   check_created_connectors = TRUE
+   check_accessed_connectors = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dataaccess/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dataaccess/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,149 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=main.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h main.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dataaccess/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dataaccess/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,64 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for testing data access functionality 
+##
+#########################################################################
+
+SAMRAI	      =	@top_srcdir@
+SRCDIR	      =	@srcdir@
+SUBDIR        = source/test/dataaccess
+VPATH	      =	@srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+default: check
+
+include $(OBJECT)/config/Makefile.config
+
+CPPFLAGS_EXTRA	= -DTESTING=1
+
+NUM_TESTS = 2
+
+TEST_NPROCS = @TEST_NPROCS@
+
+CXX_OBJS	= main.o
+
+main:	$(CXX_OBJS) $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) main.o \
+	$(LIBSAMRAI) $(LDLIBS) -o $@
+
+check:
+		$(MAKE) check2d
+		$(MAKE) check3d
+
+check2d:	main
+	@for i in test_inputs/*2d*.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+check3d:	main
+	@for i in test_inputs/*3d*.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+checkcompile: main
+
+checktest:
+		rm -f makecheck.logfile
+		$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+		$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+		rm -f makecheck.logfile
+
+clean-check:
+		$(SAMCLEAN)
+
+clean:		clean-check
+		$(RM) *.f main
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dataaccess/main.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dataaccess/main.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,395 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program for testing SAMRAI data access 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+
+#include <stdlib.h>
+
+using namespace std;
+using namespace SAMRAI;
+
+int main(
+   int argc,
+   char* argv[])
+{
+   int error_count = 0;
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+
+      /*
+       * Process command line arguments.
+       */
+      string input_filename;
+
+      if (argc != 2) {
+         tbox::pout << "USAGE:  " << argv[0] << " <input filename> " << endl;
+         exit(-1);
+      } else {
+         input_filename = argv[1];
+      }
+
+      /*
+       * Create input database and parse all data in input file.
+       */
+      tbox::Pointer<tbox::Database> input_db(new tbox::InputDatabase("input_db"));
+      tbox::InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      /**************************************************************************
+      * Read input data and setup objects.
+      **************************************************************************/
+
+      /*
+       * Retreive "Main" section of input db.
+       */
+      tbox::Pointer<tbox::Database> main_db = input_db->getDatabase("Main");
+
+      const tbox::Dimension dim((unsigned short)main_db->getInteger("dim"));
+
+      const std::string log_fn =
+         "iteratortest" + tbox::Utilities::intToString(dim.getValue()) + "d.log";
+      tbox::PIO::logAllNodes(log_fn);
+
+      /*
+       * Regular pointer tests.
+       */
+
+      hier::Index box_lower(dim, 0);
+      hier::Index box_upper(dim);
+
+      for (int d = 0; d < dim.getValue(); d++) {
+         box_upper(d) = (d + 4) * 3;
+      }
+
+      hier::Box box(box_lower, box_upper);
+
+      pdat::CellData<double> cell_data(box, 1, hier::IntVector(dim, 0));
+      pdat::FaceData<double> face_data(box, 1, hier::IntVector(dim, 0));
+      pdat::NodeData<double> node_data(box, 1, hier::IntVector(dim, 0));
+      pdat::EdgeData<double> edge_data(box, 1, hier::IntVector(dim, 0));
+      pdat::SideData<double> side_data(box, 1, hier::IntVector(dim, 0));
+
+      /*
+       * The tests of the iterators first fill the patch data by directly
+       * accessing the pointer to the double data.  The iterators should access
+       * the data in exactly the same order that it was filled.
+       */
+
+      /*
+       * The tests of the index classes loop over the box with a CellIterator.
+       * The CellIterator gives each cell-centered index within the box.
+       * For each cell-centered index, the tests loop over every possible
+       * set of parameters for the datatype-specific index class (EdgeIndex,
+       * SideIndex, etc.).  Then the test checks that accessing the data using
+       * the index class retrieves data from the correct point in the data array.
+       */
+
+      /*
+       * Test CellIterator
+       */
+
+      double* cell_ptr = cell_data.getPointer();
+
+      int cell_data_size = box.size();
+
+      for (int i = 0; i < cell_data_size; i++) {
+         cell_ptr[i] = (double)i;
+      }
+
+      int j = 0;
+      for (pdat::CellIterator ci(box); ci; ci++) {
+         if (!tbox::MathUtilities<double>::equalEps(cell_data(ci()),
+                cell_ptr[j])) {
+            tbox::perr << "FAILED: - CellIterator test" << std::endl;
+            ++error_count;
+         }
+         j++;
+      }
+
+      /*
+       * Test FaceIterator
+       */
+
+      double* face_ptr[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+      for (int axis = 0; axis < dim.getValue(); axis++) {
+
+         face_ptr[axis] = face_data.getPointer(axis);
+
+         hier::Box face_box = pdat::FaceGeometry::toFaceBox(box,
+               axis);
+
+         int face_data_size = face_box.size();
+
+         for (int i = 0; i < face_data_size; i++) {
+            face_ptr[axis][i] = (double)i;
+         }
+
+         j = 0;
+         for (pdat::FaceIterator fi(box, axis); fi; fi++) {
+            if (!tbox::MathUtilities<double>::equalEps(face_data(fi()),
+                   face_ptr[axis][j])) {
+               tbox::perr << "FAILED: - FaceIterator test" << std::endl;
+               ++error_count;
+            }
+            j++;
+         }
+      }
+
+      /*
+       * Test FaceIndex
+       */
+
+      for (pdat::CellIterator ifc(box); ifc; ifc++) {
+
+         for (int a = 0; a < dim.getValue(); a++) {
+
+            hier::Box face_box = pdat::FaceGeometry::toFaceBox(box,
+                  a);
+            hier::Index flo = face_box.lower();
+            hier::Index fhi = face_box.upper();
+            for (int f = 0; f < 2; f++) {
+
+               pdat::FaceIndex findx(ifc(), a, f);
+
+               int offset = 0;
+               for (int i = dim.getValue() - 1; i > 0; i--) {
+                  offset = (fhi(i - 1) - flo(i - 1) + 1)
+                     * (findx(i) - flo(i) + offset);
+               }
+               offset += findx(0) - flo(0);
+
+               if (!tbox::MathUtilities<double>::equalEps(face_data(findx),
+                      face_ptr[a][offset])) {
+                  tbox::perr << "FAILED: - FaceIndex test" << std::endl;
+                  ++error_count;
+               }
+            }
+         }
+      }
+
+      /*
+       * Test NodeIterator
+       */
+
+      double* node_ptr = node_data.getPointer();
+
+      hier::Box node_box = pdat::NodeGeometry::toNodeBox(box);
+
+      hier::Index nlo = node_box.lower();
+      hier::Index nhi = node_box.upper();
+
+      int node_data_size = node_box.size();
+
+      for (int i = 0; i < node_data_size; i++) {
+         node_ptr[i] = (double)i;
+      }
+
+      j = 0;
+      for (pdat::NodeIterator ni(box); ni; ni++) {
+         if (!tbox::MathUtilities<double>::equalEps(node_data(ni()),
+                node_ptr[j])) {
+            tbox::perr << "FAILED: - NodeIterator test" << std::endl;
+            ++error_count;
+         }
+         j++;
+      }
+
+      /*
+       * Test NodeIndex
+       */
+
+      for (pdat::CellIterator inc(box); inc; inc++) {
+
+         hier::IntVector corner(dim, 0);
+
+         bool all_corners_complete = false;
+
+         while (!all_corners_complete) {
+
+            pdat::NodeIndex nindx(inc(), corner);
+
+            int offset = 0;
+            for (int i = dim.getValue() - 1; i > 0; i--) {
+               offset = (nhi(i - 1) - nlo(i - 1) + 1)
+                  * (nindx(i) - nlo(i) + offset);
+            }
+            offset += nindx(0) - nlo(0);
+
+            if (!tbox::MathUtilities<double>::equalEps(node_data(nindx),
+                   node_ptr[offset])) {
+               tbox::perr << "FAILED: - NodeIndex test" << std::endl;
+               ++error_count;
+            }
+
+            int u;
+            for (u = 0; u < dim.getValue(); u++) {
+               if (corner(u) == 1) {
+                  corner(u) = 0;
+               } else {
+                  corner(u)++;
+                  break;
+               }
+            }
+            if (u == dim.getValue()) {
+               all_corners_complete = true;
+            }
+         }
+      }
+
+      /*
+       * Test EdgeIterator
+       */
+
+      double* edge_ptr[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+      for (int axis = 0; axis < dim.getValue(); axis++) {
+
+         edge_ptr[axis] = edge_data.getPointer(axis);
+
+         hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box,
+               axis);
+         int edge_data_size = edge_box.size();
+
+         for (int i = 0; i < edge_data_size; i++) {
+            edge_ptr[axis][i] = (double)i;
+         }
+
+         j = 0;
+         for (pdat::EdgeIterator ei(box, axis); ei; ei++) {
+            if (!tbox::MathUtilities<double>::equalEps(edge_data(ei()),
+                   edge_ptr[axis][j])) {
+               tbox::perr << "FAILED: - EdgeIterator test" << std::endl;
+               ++error_count;
+            }
+            j++;
+         }
+      }
+
+      /*
+       * Test EdgeIndex
+       */
+
+      for (pdat::CellIterator iec(box); iec; iec++) {
+         for (int a = 0; a < dim.getValue(); a++) {
+
+            hier::Box edge_box = pdat::EdgeGeometry::toEdgeBox(box,
+                  a);
+            hier::Index elo = edge_box.lower();
+            hier::Index ehi = edge_box.upper();
+
+            for (int f = 0; f < (1 << (dim.getValue() - 1)); f++) {
+               pdat::EdgeIndex eindx(iec(), a, f);
+
+               int offset = 0;
+               for (int i = dim.getValue() - 1; i > 0; i--) {
+                  offset = (ehi(i - 1) - elo(i - 1) + 1)
+                     * (eindx(i) - elo(i) + offset);
+               }
+               offset += eindx(0) - elo(0);
+
+               if (!tbox::MathUtilities<double>::equalEps(edge_data(eindx),
+                      edge_ptr[a][offset])) {
+                  tbox::perr << "FAILED: - EdgeIndex test" << std::endl;
+                  ++error_count;
+               }
+            }
+         }
+      }
+
+      /*
+       * Test SideIterator
+       */
+
+      double* side_ptr[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+      for (int axis = 0; axis < dim.getValue(); axis++) {
+
+         side_ptr[axis] = side_data.getPointer(axis);
+
+         hier::Box side_box = pdat::SideGeometry::toSideBox(box,
+               axis);
+         int side_data_size = side_box.size();
+
+         for (int i = 0; i < side_data_size; i++) {
+            side_ptr[axis][i] = (double)i;
+         }
+
+         j = 0;
+         for (pdat::SideIterator si(box, axis); si; si++) {
+            if (!tbox::MathUtilities<double>::equalEps(side_data(si()),
+                   side_ptr[axis][j])) {
+               tbox::perr << "FAILED: - SideIterator test" << std::endl;
+               ++error_count;
+            }
+            j++;
+         }
+      }
+
+      /*
+       * Test SideIndex
+       */
+
+      for (pdat::CellIterator isc(box); isc; isc++) {
+         for (int a = 0; a < dim.getValue(); a++) {
+
+            hier::Box side_box = pdat::SideGeometry::toSideBox(box,
+                  a);
+            hier::Index slo = side_box.lower();
+            hier::Index shi = side_box.upper();
+
+            for (int f = 0; f < 2; f++) {
+               pdat::SideIndex sindx(isc(), a, f);
+
+               int offset = 0;
+               for (int i = dim.getValue() - 1; i > 0; i--) {
+                  offset = (shi(i - 1) - slo(i - 1) + 1)
+                     * (sindx(i) - slo(i) + offset);
+               }
+               offset += sindx(0) - slo(0);
+
+               if (!tbox::MathUtilities<double>::equalEps(side_data(sindx),
+                      side_ptr[a][offset])) {
+                  tbox::perr << "FAILED: - SideIndex test" << std::endl;
+                  ++error_count;
+               }
+            }
+         }
+      }
+
+      if (error_count == 0) {
+         tbox::pout << "\nPASSED:  dataaccess" << std::endl;
+      }
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return error_count;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dataaccess/test_inputs/default.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dataaccess/test_inputs/default.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,13 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   $Description 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 2
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dataaccess/test_inputs/default.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dataaccess/test_inputs/default.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,13 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   $Description 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 3
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dataops/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dataops/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,2969 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=SampleIndexData.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	SampleIndexData.C SampleIndexData.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=cell_cplxtest.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	cell_cplxtest.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=cell_hierops.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	cell_hierops.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=cell_hiertest.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	cell_hiertest.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
+FILE_4=cell_patchtest.o
+DEPENDS_4:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	cell_patchtest.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_4 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_4:X.o=${NDIM}.o}: ${DEPENDS_4}
+
+FILE_5=edge_cplxtest.o
+DEPENDS_5:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	edge_cplxtest.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_5 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_5:X.o=${NDIM}.o}: ${DEPENDS_5}
+
+FILE_6=edge_hiertest.o
+DEPENDS_6:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	edge_hiertest.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_6 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_6:X.o=${NDIM}.o}: ${DEPENDS_6}
+
+FILE_7=face_cplxtest.o
+DEPENDS_7:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	face_cplxtest.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_7 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_7:X.o=${NDIM}.o}: ${DEPENDS_7}
+
+FILE_8=face_hiertest.o
+DEPENDS_8:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	face_hiertest.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_8 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_8:X.o=${NDIM}.o}: ${DEPENDS_8}
+
+FILE_9=indx_dataops.o
+DEPENDS_9:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	SampleIndexData.h indx_dataops.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_9 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_9:X.o=${NDIM}.o}: ${DEPENDS_9}
+
+FILE_10=node_cplxtest.o
+DEPENDS_10:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	node_cplxtest.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_10 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_10:X.o=${NDIM}.o}: ${DEPENDS_10}
+
+FILE_11=node_hierops.o
+DEPENDS_11:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	node_hierops.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_11 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_11:X.o=${NDIM}.o}: ${DEPENDS_11}
+
+FILE_12=node_hiertest.o
+DEPENDS_12:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	node_hiertest.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_12 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_12:X.o=${NDIM}.o}: ${DEPENDS_12}
+
+FILE_13=side_cplxtest.o
+DEPENDS_13:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	side_cplxtest.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_13 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_13:X.o=${NDIM}.o}: ${DEPENDS_13}
+
+FILE_14=side_hiertest.o
+DEPENDS_14:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsComplex.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	side_hiertest.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_14 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_14:X.o=${NDIM}.o}: ${DEPENDS_14}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dataops/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dataops/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,145 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for testing patch data operations 
+##
+#########################################################################
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/test/dataops
+VPATH         = @srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+default: check	
+
+include $(OBJECT)/config/Makefile.config
+
+CPPFLAGS_EXTRA	= -DDISPLAY -DNDIM=$(PDIM)  -DTESTING=1
+
+ifneq (,$(findstring libdcomplex, "@SAMRAI_OPTIONAL_LIBS@ "))
+  NUM_TESTS = 17
+else
+  NUM_TESTS = 11
+endif
+
+TEST_NPROCS = @TEST_NPROCS@
+
+cell_patchtest:		cell_patchtest.o  $(LIBSAMRAIDEPEND) 
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) cell_patchtest.o $(LIBSAMRAI2D) $(LIBSAMRAI) $(LDLIBS) -o $@
+
+cell_hiertest:		cell_hiertest.o  $(LIBSAMRAIDEPEND) 
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) cell_hiertest.o $(LIBSAMRAI2D) $(LIBSAMRAI) $(LDLIBS) -o $@
+
+cell_hiertest3d:	cell_hiertest.o  $(LIBSAMRAIDEPEND) 
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) cell_hiertest.o $(LIBSAMRAI3D) $(LIBSAMRAI) $(LDLIBS) -o $@
+
+edge_hiertest:		edge_hiertest.o  $(LIBSAMRAIDEPEND) 
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) edge_hiertest.o $(LIBSAMRAI2D) $(LIBSAMRAI) $(LDLIBS) -o $@
+
+face_hiertest:		face_hiertest.o  $(LIBSAMRAIDEPEND) 
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) face_hiertest.o $(LIBSAMRAI2D) $(LIBSAMRAI) $(LDLIBS) -o $@
+
+side_hiertest:		side_hiertest.o  $(LIBSAMRAIDEPEND) 
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) side_hiertest.o $(LIBSAMRAI2D) $(LIBSAMRAI) $(LDLIBS) -o $@
+
+node_hiertest:		node_hiertest.o  $(LIBSAMRAIDEPEND) 
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) node_hiertest.o $(LIBSAMRAI2D) $(LIBSAMRAI) $(LDLIBS) -o $@
+
+cell_cplxtest:		cell_cplxtest.o  $(LIBSAMRAIDEPEND) 
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) cell_cplxtest.o $(LIBSAMRAI2D) $(LIBSAMRAI) $(LDLIBS) -o $@
+
+edge_cplxtest:		edge_cplxtest.o  $(LIBSAMRAIDEPEND) 
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) edge_cplxtest.o $(LIBSAMRAI2D) $(LIBSAMRAI) $(LDLIBS) -o $@
+
+node_cplxtest:		node_cplxtest.o  $(LIBSAMRAIDEPEND) 
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) node_cplxtest.o $(LIBSAMRAI2D) $(LIBSAMRAI) $(LDLIBS) -o $@
+
+face_cplxtest:		face_cplxtest.o  $(LIBSAMRAIDEPEND) 
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) face_cplxtest.o $(LIBSAMRAI2D) $(LIBSAMRAI) $(LDLIBS) -o $@
+
+side_cplxtest:		side_cplxtest.o  $(LIBSAMRAIDEPEND) 
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) side_cplxtest.o $(LIBSAMRAI2D) $(LIBSAMRAI) $(LDLIBS) -o $@
+
+
+TARGETS2D=	cell_patchtest \
+	        cell_hiertest \
+		face_hiertest \
+		node_hiertest \
+		side_hiertest \
+		edge_hiertest
+
+ifneq (,$(findstring complex, $(SAMRAI_LIBRARY_TARGETS)))
+TARGETS2D+=	cell_cplxtest \
+		face_cplxtest \
+		node_cplxtest \
+		side_cplxtest \
+		edge_cplxtest
+endif
+
+
+checkcompile:   $(TARGETS2D) cell_hiertest
+
+check:
+	$(MAKE) check2d
+	$(MAKE) check3d
+
+check2d:	$(SAMRAI_LIBRARY_TARGETS)
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./cell_patchtest 2;
+
+check3d:	cell_patchtest cell_hiertest
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./cell_patchtest 3;
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./cell_hiertest 3;
+
+libbool:
+
+libchar:
+
+libfloat:
+
+libdcomplex:	cell_cplxtest \
+		face_cplxtest \
+		node_cplxtest \
+		side_cplxtest \
+		edge_cplxtest
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./cell_cplxtest 2; \
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./cell_cplxtest 3; \
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./face_cplxtest 2; \
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./node_cplxtest 2; \
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./edge_cplxtest 2; \
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./side_cplxtest 2
+
+
+libdefault:	cell_patchtest \
+		cell_hiertest \
+		face_hiertest \
+		node_hiertest \
+		side_hiertest \
+		edge_hiertest
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./cell_hiertest 2; \
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./cell_hiertest 3; \
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./cell_patchtest 2; \
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./cell_patchtest 3; \
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./face_hiertest 2; \
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./node_hiertest 2; \
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./edge_hiertest 2; \
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./side_hiertest 2
+
+checktest:
+		rm -f makecheck.logfile
+		$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+		$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+		rm -f makecheck.logfile
+
+clean-check:
+		$(SAMCLEAN)
+
+clean:		clean-check
+		$(RM) *_hiertest* *_cplxtest* *_patchtest*
+
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dataops/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dataops/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,69 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   README file for data operations test.
+##
+#########################################################################
+
+The SAMRAI/source/test/dataops directory contains source code 
+to test the basic patch data operations.  Each of these test programs
+creates a 2 level patch hierarchy with 2 patches on each level.  The
+"hier"-tests test the operations associated with the built in C/C++ types 
+(e.g. addition, subtraction, etc.).  The "cplx"-tests test the operations
+associated with data types that are complex numbers.  The "patch"-tests
+test operations that are performed on subsets of the patches (in contrast
+with previous "hier"- and "cplx"- test programs which test operations that
+affect each patch its entirety).  These test programs can only be run with
+1 or 2 processors.
+
+Compilation: 
+             cell_patchtest  - make cellpatchtest
+             cell_hiertest   - make cellhiertest
+             cell_cplxtest   - make cellcplx_test
+             face_patchtest  - make facepatchtest
+             face_hiertest   - make facehiertest
+             face_cplxtest   - make facecplx_test
+             node_patchtest  - make nodepatchtest
+             node_hiertest   - make nodehiertest
+             node_cplxtest   - make nodecplx_test
+
+Execution:
+   serial - 
+             cell_patchtest  - ./cellpatchtest
+             cell_hiertest   - ./cellhiertest
+             cell_cplxtest   - ./cellcplx_test
+             face_patchtest  - ./facepatchtest
+             face_hiertest   - ./facehiertest
+             face_cplxtest   - ./facecplx_test
+             node_patchtest  - ./nodepatchtest
+             node_hiertest   - ./nodehiertest
+             node_cplxtest   - ./nodecplx_test
+   parallel - 
+             cell_patchtest  - mpirun -np <procs> [nec. options] cellpatchtest
+             cell_hiertest   - mpirun -np <procs> [nec. options] cellhiertest
+             cell_cplxtest   - mpirun -np <procs> [nec. options] cellcplx_test
+             face_patchtest  - mpirun -np <procs> [nec. options] facepatchtest
+             face_hiertest   - mpirun -np <procs> [nec. options] facehiertest
+             face_cplxtest   - mpirun -np <procs> [nec. options] facecplx_test
+             node_patchtest  - mpirun -np <procs> [nec. options] nodepatchtest
+             node_hiertest   - mpirun -np <procs> [nec. options] nodehiertest
+             node_cplxtest   - mpirun -np <procs> [nec. options] nodecplx_test
+
+             The necessary options are those required by MPI to run the
+             executable.  For example, on the CASC Sun Cluster, one needs
+             to specify the machines that will run the MPI processes in
+             a file and use the -machinefile <filename> option.
+
+Output:
+             cell_patchtest  -  cell_patchtest.log.*
+             cell_hiertest   -  cell_hiertest.log.*
+             cell_cplxtest   -  cell_cplxtest.log.*
+             face_patchtest  -  face_patchtest.log.*
+             face_hiertest   -  face_hiertest.log.*
+             face_cplxtest   -  face_cplxtest.log.*
+             node_patchtest  -  node_patchtest.log.*
+             node_hiertest   -  node_hiertest.log.*
+             node_cplxtest   -  node_cplxtest.log.*
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dataops/SampleIndexData.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dataops/SampleIndexData.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,291 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   SampleIndexData example demonstrating IndexData type. 
+ *
+ ************************************************************************/
+
+#include "SampleIndexData.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Default Constructor                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SampleIndexData::SampleIndexData()
+{
+   d_dummy_int = 0;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor providing cell index.                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SampleIndexData::SampleIndexData(
+   const pdat::CellIndex& ic)
+{
+   d_index = ic;
+   d_dummy_int = 0;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Copy Constructor                                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SampleIndexData::SampleIndexData(
+   const SampleIndexData& data):
+   d_index(data.d_index),
+   d_dummy_int(data.d_dummy_int)
+{
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Assignment operator                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+SampleIndexData& SampleIndexData::operator = (
+   const SampleIndexData& data)
+{
+   d_index = data.d_index;
+   d_dummy_int = data.d_dummy_int;
+   return *this;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Destructor
+ *                                                                       *
+ *************************************************************************
+ */
+
+SampleIndexData::~SampleIndexData()
+{
+}
+
+/*
+ *************************************************************************
+ *
+ * Set dummy int data
+ *                                                                       *
+ *************************************************************************
+ */
+void SampleIndexData::setInt(
+   const int dummy)
+{
+   d_dummy_int = dummy;
+}
+
+/*
+ *************************************************************************
+ *
+ *  Return dummy int data
+ *                                                                       *
+ *************************************************************************
+ */
+int SampleIndexData::getInt() const
+{
+   return d_dummy_int;
+}
+
+/*
+ *************************************************************************
+ *
+ *  Return index
+ *                                              *
+ *************************************************************************
+ */
+pdat::CellIndex SampleIndexData::getIndex() const
+{
+   return d_index;
+}
+
+/*
+ *************************************************************************
+ *
+ *  Print contents
+ *                                              *
+ *************************************************************************
+ */
+void SampleIndexData::printClassData(
+   std::ostream& os) const
+{
+
+}
+
+/*
+ *************************************************************************
+ *
+ * The copySourceItem() method allows SampleIndexData to be a templated
+ * data type for IndexData - i.e. IndexData<SampleIndexData>.
+ *                                                                       *
+ *************************************************************************
+ */
+void SampleIndexData::copySourceItem(
+   hier::Index& index,
+   const hier::IntVector<NDIM>& src_offset,
+   SampleIndexData& src_item)
+{
+
+   /*
+    * Copy src_item data into *this.  Note that we don't do
+    * anything with the src_offset.  This is because we have
+    * access to the index already.
+    */
+   d_index = (pdat::CellIndex)index;
+   d_dummy_int = src_item.d_dummy_int;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The getDataStreamSize(), packStream(), and unpackStream() methods
+ * are required to template SampleIndexData as IndexData type - i.e.
+ * IndexData<SampleIndexData>.  They are used to communicate SampleIndexData,
+ * specifying how many bytes will be packed during the "packStream()"
+ * method.
+ *                                                                       *
+ *************************************************************************
+ */
+
+size_t SampleIndexData::getDataStreamSize()
+{
+   /*
+    * #bytes =
+    *   d_index           (int[NDIM]) +
+    *   d_dummy_int       (int)
+    */
+   size_t bytes = (NDIM + 1) * tbox::MessageStream::getSizeof<int>();
+
+   return bytes;
+}
+
+void SampleIndexData::packStream(
+   tbox::MessageStream& stream)
+{
+   int counter = 0;
+   int ibuffer[NDIM + 1];
+   for (int i = 0; i < NDIM; i++) {
+      ibuffer[i] = d_index(i);
+      counter++;
+   }
+   ibuffer[counter] = d_dummy_int;
+   stream.pack(ibuffer, NDIM + 1);
+
+}
+
+void SampleIndexData::unpackStream(
+   tbox::MessageStream& stream,
+   const hier::IntVector<NDIM>& offset)
+{
+   int counter = 0;
+   int ibuffer[NDIM + 1];
+   stream.unpack(ibuffer, NDIM);
+   pdat::CellIndex index;
+   for (int i = 0; i < NDIM; i++) {
+      index[i] = ibuffer[i];
+      counter++;
+   }
+   d_index = index + offset;
+
+   d_dummy_int = ibuffer[counter];
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The putToDatabase() and getFromDatabase() methods
+ * are required to template SampleIndexData as IndexData type - i.e.
+ * IndexData<SampleIndexData>.  They are used to write/read SampleIndexData,
+ * data to/from the restart database.
+ *                                                                       *
+ *************************************************************************
+ */
+
+void SampleIndexData::putToDatabase(
+   tbox::Pointer<tbox::Database>& database)
+{
+
+   int counter = 0;
+   int ibuffer[NDIM + 1];
+   for (int i = 0; i < NDIM; i++) {
+      ibuffer[i] = d_index(i);
+      counter++;
+   }
+   ibuffer[counter] = d_dummy_int;
+
+   database->putIntegerArray("ibuffer", ibuffer, NDIM + 1);
+
+}
+
+void SampleIndexData::getFromDatabase(
+   tbox::Pointer<tbox::Database>& database)
+{
+   int ibuffer[NDIM + 1];
+   database->getIntegerArray("ibuffer", ibuffer, NDIM + 1);
+   pdat::CellIndex index;
+   for (int i = 0; i < NDIM; i++) {
+      index(i) = ibuffer[i];
+   }
+   d_index = index;
+   d_dummy_int = ibuffer[NDIM];
+
+}
+
+/*
+ *****************************************************************
+ *
+ *  Templates used for SampleIndexData
+ *
+ *****************************************************************
+ */
+
+#include "SampleIndexData.h"
+#include "SAMRAI/tbox/Array.C"
+#include "SAMRAI/pdat/IndexData.C"
+#include "SAMRAI/pdat/IndexDataFactory.C"
+#include "SAMRAI/pdat/IndexVariable.C"
+#include "SAMRAI/tbox/Pointer.C"
+#include "SAMRAI/pdat/CellGeometry.h"
+
+namespace SAMRAI {
+
+template class pdat::IndexData<NDIM, SampleIndexData, pdat::CellGeometry>;
+template class pdat::IndexDataFactory<SampleIndexData, pdat::CellGeometry>;
+template class pdat::IndexDataNode<NDIM, SampleIndexData, pdat::CellGeometry>;
+template class pdat::IndexIterator<NDIM, SampleIndexData, pdat::CellGeometry>;
+template class pdat::IndexVariable<SampleIndexData, pdat::CellGeometry>;
+template class tbox::Array<SampleIndexData>;
+template class tbox::Array<pdat::IndexDataNode<NDIM, SampleIndexData,
+                                               pdat::CellGeometry> >;
+template class tbox::Pointer<pdat::IndexData<NDIM, SampleIndexData,
+                                             pdat::CellGeometry> >;
+template class tbox::Pointer<pdat::IndexVariable<SampleIndexData,
+                                                 pdat::CellGeometry> >;
+template class tbox::Pointer<pdat::IndexDataFactory<SampleIndexData,
+                                                    pdat::CellGeometry> >;
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dataops/SampleIndexData.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dataops/SampleIndexData.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,144 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Boundary cell struct for embedded boundary implementations 
+ *
+ ************************************************************************/
+
+#ifndef included_SampleIndexDataXD
+#define included_SampleIndexDataXD
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/MessageStream.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/IOStream.h"
+
+/**
+ * The SampleClass struct holds some dummy data and methods.  It's intent
+ * is to indicate how a user could construct their own index data type.
+ */
+
+using namespace SAMRAI;
+
+class SampleIndexData
+{
+public:
+   /**
+    * The default constructor creates an ``empty'' SampleIndexData.
+    */
+   SampleIndexData();
+
+   /**
+    * Copy constructor.
+    */
+   SampleIndexData(
+      const SampleIndexData& data);
+
+   /**
+    * Constructor supplying cell index where data is defined.
+    */
+   SampleIndexData(
+      const pdat::CellIndex& ic);
+
+   /**
+    * The assignment operator copies the data of the argument cell.
+    */
+   SampleIndexData&
+   operator = (
+      const SampleIndexData& cell);
+
+   /**
+    * The destructor for SampleIndexData.
+    */
+   ~SampleIndexData();
+
+   /**
+    * Sets a dummy integer in this class.
+    */
+   void
+   setInt(
+      const int dummy);
+
+   /**
+    * Returns a dummy integer in this class.
+    */
+   int
+   getInt() const;
+
+   /**
+    * Returns the cell index where the index data is stored.
+    */
+   pdat::CellIndex
+   getIndex() const;
+
+   /**
+    * Print class data representation when an unrecoverable run-time
+    * assertion is thrown. Or, when desired.
+    */
+   void
+   printClassData(
+      std::ostream& os) const;
+
+   /**
+    * The copySourceItem() method allows SampleIndexData to be a templated
+    * data type for IndexData - i.e. IndexData<SampleIndexData>.  In
+    * addition to this method, the other methods that must be defined are
+    * getDataStreamSize(), packStream(), unpackStream() for communication,
+    * putToDatabase(), getFromDatabase for restart.  These are described
+    * below.
+    */
+   void
+   copySourceItem(
+      hier::Index& index,
+      const hier::IntVector<NDIM>& src_offset,
+      SampleIndexData& src_item);
+
+   /**
+    * The following functions enable parallel communication with SampleIndexDatas.
+    * They are used in SAMRAI communication infrastructure to
+    * specify the number of bytes of data stored in each SampleIndexData object,
+    * and to pack and unpack the data to the specified stream.
+    */
+   size_t
+   getDataStreamSize();
+   void
+   packStream(
+      tbox::MessageStream& stream);
+   void
+   unpackStream(
+      tbox::MessageStream& stream,
+      const hier::IntVector<NDIM>& offset);
+
+   /**
+    * These functions are used to read/write SampleIndexData data to/from
+    * restart.
+    */
+   void
+   getFromDatabase(
+      tbox::Pointer<tbox::Database>& database);
+   void
+   putToDatabase(
+      tbox::Pointer<tbox::Database>& database);
+
+private:
+   /*
+    * Cell index where SampleIndexData is defined.
+    */
+   pdat::CellIndex d_index;
+
+   /*
+    * Dummy int data
+    */
+   int d_dummy_int;
+
+   // ADD ANY OTHER DATA HERE
+};
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dataops/cell_cplxtest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dataops/cell_cplxtest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,829 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program to test cell-centered complex patch data ops 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/math/HierarchyDataOpsComplex.h"
+#include "SAMRAI/math/HierarchyCellDataOpsComplex.h"
+#include "SAMRAI/math/HierarchyDataOpsReal.h"
+#include "SAMRAI/math/HierarchyCellDataOpsReal.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/ProcessorMapping.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/hier/VariableContext.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fstream>
+#include <iomanip>
+
+using namespace SAMRAI;
+
+/* Helper function declarations */
+static bool
+complexDataSameAsValue(
+   int desc_id,
+   dcomplex value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy);
+static bool
+doubleDataSameAsValue(
+   int desc_id,
+   double value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+#define NVARS 4
+
+int main(
+   int argc,
+   char* argv[]) {
+
+   int num_failures = 0;
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   if (argc < 2) {
+      TBOX_ERROR("Usage: " << argv[0] << " [dimension]");
+   }
+
+   const int d = atoi(argv[1]);
+   TBOX_ASSERT(d > 0);
+   TBOX_ASSERT(d <= SAMRAI_MAXIMUM_DIMENSION_VALUE);
+   const tbox::Dimension dim(d);
+
+   const std::string log_fn = std::string("cell_cplxtest.")
+      + tbox::Utilities::intToString(dim, 1) + "d.log";
+   tbox::PIO::logAllNodes(log_fn);
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+      int ln, iv;
+
+      // Make a dummy hierarchy domain
+      double lo[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      double hi[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+      hier::Index clo0(dim);
+      hier::Index chi0(dim);
+      hier::Index clo1(dim);
+      hier::Index chi1(dim);
+      hier::Index flo0(dim);
+      hier::Index fhi0(dim);
+      hier::Index flo1(dim);
+      hier::Index fhi1(dim);
+
+      for (int i = 0; i < dim.getValue(); i++) {
+         lo[i] = 0.0;
+         clo0(i) = 0;
+         flo0(i) = 4;
+         fhi0(i) = 7;
+         if (i == 1) {
+            hi[i] = 0.5;
+            chi0(i) = 2;
+            clo1(i) = 3;
+            chi1(i) = 4;
+         } else {
+            hi[i] = 1.0;
+            chi0(i) = 9;
+            clo1(i) = 0;
+            chi1(i) = 9;
+         }
+         if (i == 0) {
+            flo1(i) = 8;
+            fhi1(i) = 13;
+         } else {
+            flo1(i) = flo0(i);
+            fhi1(i) = fhi0(i);
+         }
+      }
+
+      hier::Box coarse0(clo0, chi0);
+      hier::Box coarse1(clo1, chi1);
+      hier::Box fine0(flo0, fhi0);
+      hier::Box fine1(flo1, fhi1);
+      hier::IntVector ratio(dim, 2);
+
+      hier::BoxArray coarse_domain(dim, 2);
+      hier::BoxArray fine_boxes(dim, 2);
+      coarse_domain[0] = coarse0;
+      coarse_domain[1] = coarse1;
+      fine_boxes[0] = fine0;
+      fine_boxes[1] = fine1;
+
+      tbox::Pointer<geom::CartesianGridGeometry> geometry(
+         new geom::CartesianGridGeometry("CartesianGeometry",
+            lo,
+            hi,
+            coarse_domain));
+
+      tbox::Pointer<hier::PatchHierarchy> hierarchy(
+         new hier::PatchHierarchy("PatchHierarchy", geometry));
+
+      // Note: For these simple tests we allow at most 2 processors.
+      const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+      const int nproc = mpi.getSize();
+      TBOX_ASSERT(nproc < 3);
+
+      const int n_coarse_boxes = coarse_domain.getNumberOfBoxes();
+      const int n_fine_boxes = fine_boxes.getNumberOfBoxes();
+
+      hier::MappedBoxLevel layer0(hier::IntVector(dim, 1));
+      hier::MappedBoxLevel layer1(ratio);
+
+      for (int ib = 0; ib < n_coarse_boxes; ib++) {
+         if (nproc > 1) {
+            if (ib == layer0.getRank()) {
+               layer0.addMappedBox(hier::MappedBox(coarse_domain[ib], ib,
+                     layer0.getRank()));
+            }
+         } else {
+            layer0.addMappedBox(hier::MappedBox(coarse_domain[ib], ib, 0));
+         }
+      }
+
+      for (int ib = 0; ib < n_fine_boxes; ib++) {
+         if (nproc > 1) {
+            if (ib == layer1.getRank()) {
+               layer1.addMappedBox(hier::MappedBox(fine_boxes[ib], ib,
+                     layer1.getRank()));
+            }
+         } else {
+            layer1.addMappedBox(hier::MappedBox(fine_boxes[ib], ib, 0));
+         }
+      }
+
+      hierarchy->makeNewPatchLevel(0, layer0);
+      hierarchy->makeNewPatchLevel(1, layer1);
+
+      // Create instance of hier::Variable database
+      hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+      tbox::Pointer<hier::VariableContext> dummy = variable_db->getContext(
+            "dummy");
+      const hier::IntVector no_ghosts(dim, 0);
+
+      // Make some dummy variables and register them with hier::VariableDatabase
+      tbox::Pointer<pdat::CellVariable<dcomplex> > cvar[NVARS];
+      int cvindx[NVARS];
+      cvar[0] = new pdat::CellVariable<dcomplex>(dim, "cvar0", 1);
+      cvindx[0] = variable_db->registerVariableAndContext(
+            cvar[0], dummy, no_ghosts);
+      cvar[1] = new pdat::CellVariable<dcomplex>(dim, "cvar1", 1);
+      cvindx[1] = variable_db->registerVariableAndContext(
+            cvar[1], dummy, no_ghosts);
+      cvar[2] = new pdat::CellVariable<dcomplex>(dim, "cvar2", 1);
+      cvindx[2] = variable_db->registerVariableAndContext(
+            cvar[2], dummy, no_ghosts);
+      cvar[3] = new pdat::CellVariable<dcomplex>(dim, "cvar3", 1);
+      cvindx[3] = variable_db->registerVariableAndContext(
+            cvar[3], dummy, no_ghosts);
+
+      tbox::Pointer<pdat::CellVariable<double> > cwgt;
+      cwgt = new pdat::CellVariable<double>(dim, "cwgt", 1);
+      int cwgt_id = variable_db->registerVariableAndContext(
+            cwgt, dummy, no_ghosts);
+
+      // allocate data on hierarchy
+      for (ln = 0; ln < 2; ln++) {
+         hierarchy->getPatchLevel(ln)->allocatePatchData(cwgt_id);
+         for (iv = 0; iv < NVARS; iv++) {
+            hierarchy->getPatchLevel(ln)->allocatePatchData(cvindx[iv]);
+         }
+      }
+
+      tbox::Pointer<math::HierarchyDataOpsComplex> cell_ops(
+         new math::HierarchyCellDataOpsComplex(hierarchy, 0, 1));
+      TBOX_ASSERT(!cell_ops.isNull());
+
+      tbox::Pointer<math::HierarchyDataOpsReal<double> > cwgt_ops(
+         new math::HierarchyCellDataOpsReal<double>(hierarchy, 0, 1));
+
+      tbox::Pointer<hier::Patch> patch;
+      tbox::Pointer<geom::CartesianPatchGeometry> pgeom;
+
+      // Initialize control volume data for cell-centered components
+      hier::Box coarse_fine = fine0 + fine1;
+      coarse_fine.coarsen(ratio);
+      for (ln = 0; ln < 2; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            patch = level->getPatch(ip());
+            pgeom = patch->getPatchGeometry();
+            const double* dx = pgeom->getDx();
+            double cell_vol = dx[0];
+            for (int i = 1; i < dim.getValue(); i++) {
+               cell_vol *= dx[i];
+            }
+            tbox::Pointer<pdat::CellData<double> > cvdata =
+               patch->getPatchData(cwgt_id);
+            cvdata->fillAll(cell_vol);
+            if (ln == 0) cvdata->fillAll(0.0, (coarse_fine * patch->getBox()));
+         }
+      }
+
+      // Test #1: Print out control volume data and compute its integral
+
+      // Test #1a: Check control volume data set properly
+      // Expected: cwgt = 0.01 on coarse (except where finer patch exists) and
+      // 0.0025 on fine level for 2d.  0.001 and 0.000125 for 3d.
+      bool vol_test_passed = true;
+      for (ln = 0; ln < 2; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            patch = level->getPatch(ip());
+            tbox::Pointer<pdat::CellData<double> > cvdata = patch->getPatchData(
+                  cwgt_id);
+
+            for (pdat::CellIterator c(cvdata->getBox());
+                 c && vol_test_passed;
+                 c++) {
+               pdat::CellIndex cell_index = c();
+
+               if (ln == 0) {
+                  if ((coarse_fine * patch->getBox()).contains(cell_index)) {
+                     if (!tbox::MathUtilities<double>::equalEps((*cvdata)(
+                               cell_index), 0.0)) {
+                        vol_test_passed = false;
+                     }
+                  } else {
+                     double compare;
+                     if ((dim == tbox::Dimension(2)))
+                        compare = 0.01;
+                     else
+                        compare = 0.001;
+
+                     if (!tbox::MathUtilities<double>::equalEps((*cvdata)(
+                               cell_index), compare)) {
+
+                        vol_test_passed = false;
+                     }
+                  }
+               }
+
+               if (ln == 1) {
+                  double compare;
+                  if ((dim == tbox::Dimension(2)))
+                     compare = 0.0025;
+                  else
+                     compare = 0.000125;
+
+                  if (!tbox::MathUtilities<double>::equalEps((*cvdata)(
+                            cell_index), compare)) {
+                     vol_test_passed = false;
+                  }
+               }
+            }
+         }
+      }
+      if (!vol_test_passed) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #1a: Check control volume data set properly"
+         << std::endl;
+         cwgt_ops->printData(cwgt_id, tbox::plog);
+      }
+
+      // Test #1b: math::HierarchyCellDataOpsComplex::sumControlVolumes()
+      // Expected: norm = 0.5
+      double norm = cell_ops->sumControlVolumes(cvindx[0], cwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(norm, 0.5)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #1b: math::HierarchyCellDataOpsComplex::sumControlVolumes()\n"
+         << "Expected value = 0.5 , Computed value = "
+         << norm << std::endl;
+      }
+
+      // Test #2: math::HierarchyCellDataOpsComplex::numberOfEntries()
+      // Expected: num_data_points = 90 in 2d, 660 in 3d
+      int num_data_points = cell_ops->numberOfEntries(cvindx[0]);
+
+      {
+         int compare;
+         if ((dim == tbox::Dimension(2)))
+            compare = 90;
+         else
+            compare = 660;
+
+         if (num_data_points != compare) {
+            num_failures++;
+            tbox::perr
+            <<
+            "FAILED: - Test #2: math::HierarchyCellDataOpsReal::numberOfEntries()\n"
+            << "Expected value = " << compare
+            << ", Computed value = "
+            << num_data_points << std::endl;
+         }
+      }
+
+      // Test #3a: math::HierarchyCellDataOpsComplex::setToScalar()
+      // Expected: v0 = (2.0,1.5)
+      dcomplex val0 = dcomplex(2.0, 1.5);
+      cell_ops->setToScalar(cvindx[0], val0);
+      if (!complexDataSameAsValue(cvindx[0], val0, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #3a: math::HierarchyCellDataOpsComplex::setToScalar()\n"
+         << "Expected: v0 = " << val0 << std::endl;
+         cell_ops->printData(cvindx[0], tbox::plog);
+      }
+
+      // Test #3b: math::HierarchyCellDataOpsComplex::setToScalar()
+      // Expected: v1 = (4.0,3.0)
+      dcomplex val1(4.0, 3.0);
+      cell_ops->setToScalar(cvindx[1], val1);
+      if (!complexDataSameAsValue(cvindx[1], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #3b: math::HierarchyCellDataOpsComplex::setToScalar()\n"
+         << "Expected: v1 = " << val1 << std::endl;
+         cell_ops->printData(cvindx[1], tbox::plog);
+      }
+
+      // Test #4: math::HierarchyCellDataOpsComplex::copyData()
+      // Expected: v2 = v1 = (4.0, 3.0)
+      cell_ops->copyData(cvindx[2], cvindx[1]);
+      if (!complexDataSameAsValue(cvindx[2], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #4: math::HierarchyCellDataOpsComplex::copyData()\n"
+         << "Expected: v2 = v1 = " << val1 << std::endl;
+         cell_ops->printData(cvindx[2], tbox::plog);
+      }
+
+      // Test #5: math::HierarchyCellDataOpsComplex::swapData()
+      // Expected: v0 = (4.0, 3.0), v1 = (2.0,1.5)
+      cell_ops->swapData(cvindx[0], cvindx[1]);
+      if (!complexDataSameAsValue(cvindx[0], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #5a: math::HierarchyCellDataOpsComplex::swapData()\n"
+         << "Expected: v0 = " << val1 << std::endl;
+         cell_ops->printData(cvindx[0], tbox::plog);
+      }
+      if (!complexDataSameAsValue(cvindx[1], val0, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #5b: math::HierarchyCellDataOpsComplex::swapData()\n"
+         << "Expected: v1 = " << val0 << std::endl;
+         cell_ops->printData(cvindx[1], tbox::plog);
+      }
+
+      // Test #6: math::HierarchyCellDataOpsComplex::scale()
+      // Expected: v2 = 0.25 * v2 = (1.0,0.75)
+      cell_ops->scale(cvindx[2], 0.25, cvindx[2]);
+      dcomplex val_scale(1.0, 0.75);
+      if (!complexDataSameAsValue(cvindx[2], val_scale, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #6: math::HierarchyCellDataOpsComplex::scale()\n"
+         << "Expected: v2 = " << val_scale << std::endl;
+         cell_ops->printData(cvindx[2], tbox::plog);
+      }
+
+      // Test #7: math::HierarchyCellDataOpsComplex::add()
+      // Expected: v3 = v0 + v1 = (6.0, 4.5)
+      cell_ops->add(cvindx[3], cvindx[0], cvindx[1]);
+      dcomplex val_add(6.0, 4.5);
+      if (!complexDataSameAsValue(cvindx[3], val_add, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #7: math::HierarchyCellDataOpsComplex::add()\n"
+         << "Expected: v3 = " << val_add << std::endl;
+         cell_ops->printData(cvindx[3], tbox::plog);
+      }
+
+      // Reset v0:  v0 = (0.0,4.5)
+      cell_ops->setToScalar(cvindx[0], dcomplex(0.0, 4.5));
+
+      // Test #8: math::HierarchyCellDataOpsComplex::subtract()
+      // Expected: v1 = v3 - v0 = (6.0,0.0)
+      cell_ops->subtract(cvindx[1], cvindx[3], cvindx[0]);
+      dcomplex val_sub(6.0, 0.0);
+      if (!complexDataSameAsValue(cvindx[1], val_sub, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #8: math::HierarchyCellDataOpsComplex::subtract()\n"
+         << "Expected: v1 = " << val_sub << std::endl;
+         cell_ops->printData(cvindx[1], tbox::plog);
+      }
+
+      // Test #9a: math::HierarchyCellDataOpsComplex::addScalar()
+      // Expected: v1 = v1 + (0.0,-4.0) = (6.0,-4.0)
+      cell_ops->addScalar(cvindx[1], cvindx[1], dcomplex(0.0, -4.0));
+      dcomplex val_addScalar(6.0, -4.0);
+      if (!complexDataSameAsValue(cvindx[1], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #9a: math::HierarchyCellDataOpsComplex::addScalar()\n"
+         << "Expected: v1 = " << val_addScalar << std::endl;
+         cell_ops->printData(cvindx[1], tbox::plog);
+      }
+
+      // Test #9b: math::HierarchyCellDataOpsComplex::addScalar()
+      // Expected:   v2 = v2 + (0.0,0.25) = (1.0,1.0)
+      cell_ops->addScalar(cvindx[2], cvindx[2], dcomplex(0.0, 0.25));
+      val_addScalar = dcomplex(1.0, 1.0);
+      if (!complexDataSameAsValue(cvindx[2], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #9c: math::HierarchyCellDataOpsComplex::addScalar()\n"
+         << "Expected: v2 = " << val_addScalar << std::endl;
+         cell_ops->printData(cvindx[2], tbox::plog);
+      }
+
+      // Test #9c: math::HierarchyCellDataOpsComplex::addScalar()
+      // Expected:  v2 = v2 + (3.0,-4.0) = (4.0,-3.0)
+      cell_ops->addScalar(cvindx[2], cvindx[2], dcomplex(3.0, -4.0));
+      val_addScalar = dcomplex(4.0, -3.0);
+      if (!complexDataSameAsValue(cvindx[2], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #9d: math::HierarchyCellDataOpsComplex::addScalar()\n"
+         << "Expected: v2 = " << val_addScalar << std::endl;
+         cell_ops->printData(cvindx[2], tbox::plog);
+      }
+
+      // Reset v3: v3 = (0.5, 0.0)
+      cell_ops->setToScalar(cvindx[3], dcomplex(0.5, 0.0));
+
+      // Test #10: math::HierarchyCellDataOpsComplex::multiply()
+      // Expected:  v1 = v3 * v1 = (3.0,-2.0)
+      cell_ops->multiply(cvindx[1], cvindx[3], cvindx[1]);
+      dcomplex val_mult(3.0, -2.0);
+      if (!complexDataSameAsValue(cvindx[1], val_mult, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #10: math::HierarchyCellDataOpsComplex::multiply()\n"
+         << "Expected: v1 = " << val_mult << std::endl;
+         cell_ops->printData(cvindx[1], tbox::plog);
+      }
+
+      // Test #11: math::HierarchyCellDataOpsComplex::divide()
+      // Expected:  v0 = v2 / v1 = (1.3846153846154,-0.076923076923077)
+      cell_ops->divide(cvindx[0], cvindx[2], cvindx[1]);
+      dcomplex val_div(1.3846153846154, -0.076923076923077);
+      if (!complexDataSameAsValue(cvindx[0], val_div, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #11: math::HierarchyCellDataOpsComplex::divide()\n"
+         << "Expected: v0 = " << val_div << std::endl;
+         cell_ops->printData(cvindx[0], tbox::plog);
+      }
+
+      // Test #12: math::HierarchyCellDataOpsComplex::reciprocal()
+      // Expected:  v1 = 1 / v1 = (0.23076923076923, 0.15384615384615)
+      cell_ops->reciprocal(cvindx[1], cvindx[1]);
+      dcomplex val_rec(0.23076923076923, 0.15384615384615);
+      if (!complexDataSameAsValue(cvindx[1], val_rec, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #12: math::HierarchyCellDataOpsComplex::reciprocal()\n"
+         << "Expected: v1 = " << val_rec << std::endl;
+         cell_ops->printData(cvindx[1], tbox::plog);
+      }
+
+      // Test #13:  Place some bogus values on coarse level
+      tbox::Pointer<pdat::CellData<dcomplex> > cdata;
+
+      // set values
+      tbox::Pointer<hier::PatchLevel> level_zero =
+         hierarchy->getPatchLevel(0);
+      for (hier::PatchLevel::Iterator ip(level_zero); ip; ip++) {
+         patch = level_zero->getPatch(ip());
+         cdata = patch->getPatchData(cvindx[2]);
+         hier::Index index0(dim, 2);
+         hier::Index index1(dim, 3);
+         index1(0) = 5;
+         if (patch->getBox().contains(index0)) {
+            (*cdata)(pdat::CellIndex(index0), 0) = dcomplex(100.0, -50.0);
+         }
+         if (patch->getBox().contains(index1)) {
+            (*cdata)(pdat::CellIndex(index1), 0) = dcomplex(-1000.0, 20.0);
+         }
+      }
+
+      // check values
+      bool bogus_value_test_passed = true;
+      for (hier::PatchLevel::Iterator ipp(level_zero); ipp; ipp++) {
+         patch = level_zero->getPatch(ipp());
+         cdata = patch->getPatchData(cvindx[2]);
+         hier::Index index0(dim, 2);
+         hier::Index index1(dim, 3);
+         index1(0) = 5;
+
+         for (pdat::CellIterator c(cdata->getBox());
+              c && bogus_value_test_passed;
+              c++) {
+            pdat::CellIndex cell_index = c();
+
+            if (cell_index == pdat::CellIndex(index0)) {
+               if (!tbox::MathUtilities<dcomplex>::equalEps((*cdata)(cell_index),
+                      dcomplex(100.0, -50.0))) {
+                  bogus_value_test_passed = false;
+               }
+            } else {
+               if (cell_index == pdat::CellIndex(index1)) {
+                  if (!tbox::MathUtilities<dcomplex>::equalEps((*cdata)(
+                            cell_index),
+                         dcomplex(-1000.0, 20.0))) {
+                     bogus_value_test_passed = false;
+                  }
+               } else {
+                  if (!tbox::MathUtilities<dcomplex>::equalEps((*cdata)(
+                            cell_index),
+                         dcomplex(4.0, -3.0))) {
+                     bogus_value_test_passed = false;
+                  }
+               }
+            }
+         }
+      }
+      if (!bogus_value_test_passed) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #13:  Place some bogus values on coarse level"
+         << std::endl;
+         cell_ops->printData(cvindx[2], tbox::plog);
+      }
+
+      // Test norms on patch data with cvindx[2] on hierarchy with bogus values
+
+      // Test #14: math::HierarchyCellDataOpsComplex::L1Norm() - w/o control weight
+      // Expected:  bogus_l1_norm = 1552.00337888 in 2d, 4402.00337888 in 3d.
+      double bogus_l1_norm = cell_ops->L1Norm(cvindx[2]);
+
+      {
+         double compare;
+         if ((dim == tbox::Dimension(2)))
+            compare = 1552.00337888;
+         else
+            compare = 4402.00337888;
+
+         if (!tbox::MathUtilities<double>::equalEps(bogus_l1_norm, compare)) {
+            num_failures++;
+            tbox::perr
+            <<
+            "FAILED: - Test #14: math::HierarchyCellDataOpsComplex::L1Norm()"
+            << " - w/o control weight\n"
+            << "Expected value = " << compare
+            << ", Computed value = "
+            << std::setprecision(12) << bogus_l1_norm << std::endl;
+         }
+      }
+
+      // Test #15: math::HierarchyCellDataOpsComplex::L1Norm() - w/control weight
+      // Expected:  correct_l1_norm = 2.5
+      double correct_l1_norm = cell_ops->L1Norm(cvindx[2], cwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(correct_l1_norm, 2.5)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #15: math::HierarchyCellDataOpsComplex::L1Norm()"
+         << " - w/control weight\n"
+         << "Expected value = 2.5, Computed value = "
+         << correct_l1_norm << std::endl;
+      }
+
+      // Test #16: math::HierarchyCellDataOpsComplex::L2Norm()
+      // Expected:  l2_norm = 3.53553390593
+      double l2_norm = cell_ops->L2Norm(cvindx[2], cwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(l2_norm, 3.53553390593)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #16: math::HierarchyCellDataOpsComplex::L2Norm()\n"
+         << "Expected value = 3.53553390593, Computed value = "
+         << l2_norm << std::endl;
+      }
+
+      // Test #17: math::HierarchyCellDataOpsComplex::maxNorm() - w/o control weight
+      // Expected:  bogus_max_norm = 1000.19998
+      double bogus_max_norm = cell_ops->maxNorm(cvindx[2]);
+      if (!tbox::MathUtilities<double>::equalEps(bogus_max_norm, 1000.19998)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #17: math::HierarchyCellDataOpsComplex::maxNorm() "
+         << "- w/o control weight\n"
+         << "Expected value = 1000.19998, Computed value = "
+         << bogus_max_norm << std::endl;
+      }
+
+      // Test #18: math::HierarchyCellDataOpsComplex::maxNorm() - w/control weight
+      // Expected:  max_norm = 5.0
+      double max_norm = cell_ops->maxNorm(cvindx[2], cwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(max_norm, 5.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #18: math::HierarchyCellDataOpsComplex::maxNorm() "
+         << "- w/control weight\n"
+         << "Expected value = 5.0, Computed value = "
+         << max_norm << std::endl;
+      }
+
+      // Reset data and test sums, axpy's
+      cell_ops->setToScalar(cvindx[0], dcomplex(1.0, -3.0));
+      cell_ops->setToScalar(cvindx[1], dcomplex(2.5, 3.0));
+      cell_ops->setToScalar(cvindx[2], dcomplex(7.0, 0.0));
+
+      // Test #19: math::HierarchyCellDataOpsComplex::linearSum()
+      // Expected:  v3 = (2.0,5.0)
+      cell_ops->linearSum(cvindx[3],
+         dcomplex(2.0, 0.0), cvindx[1], dcomplex(0.0, -1.0), cvindx[0]);
+      dcomplex val_linearSum(2.0, 5.0);
+      if (!complexDataSameAsValue(cvindx[3], val_linearSum, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #19: math::HierarchyCellDataOpsComplex::linearSum()\n"
+         << "Expected: v3 = " << val_linearSum << std::endl;
+         cell_ops->printData(cvindx[3], tbox::plog);
+      }
+
+      // Test #20: math::HierarchyCellDataOpsComplex::axmy()
+      // Expected:  v3 = (6.5,12.0)
+      cell_ops->axmy(cvindx[3], 3.0, cvindx[1], cvindx[0]);
+      dcomplex val_axmy(6.5, 12.0);
+      if (!complexDataSameAsValue(cvindx[3], val_axmy, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #20: math::HierarchyCellDataOpsComplex::axmy()\n"
+         << "Expected: v3 = " << val_axmy << std::endl;
+         cell_ops->printData(cvindx[3], tbox::plog);
+      }
+
+      // Test #21a: math::HierarchyCellDataOpsComplex::dot()
+      // Expected:  cdot = (8.75,-10.5)
+      dcomplex cdot = cell_ops->dot(cvindx[2], cvindx[1], cwgt_id);
+      dcomplex ans_2_dot_1(8.75, -10.5);
+      if (!tbox::MathUtilities<dcomplex>::equalEps(cdot, ans_2_dot_1)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #21a: math::HierarchyCellDataOpsComplex::dot()\n"
+         << "Expected value = (8.75,-10.5), Computed value = "
+         << cdot << std::endl;
+      }
+
+      // Test #21b: math::HierarchyCellDataOpsComplex::dot()
+      // Expected:  cdot = (8.75,10.5)
+      dcomplex cdot2 = cell_ops->dot(cvindx[1], cvindx[2], cwgt_id);
+      dcomplex ans_1_dot_2(8.75, 10.5);
+      if (!tbox::MathUtilities<dcomplex>::equalEps(cdot2, ans_1_dot_2)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #21b: math::HierarchyCellDataOpsComplex::dot()\n"
+         << "Expected value = (8.75,10.5), Computed value = "
+         << cdot2 << std::endl;
+      }
+
+      // Test #22: math::HierarchyCellDataOpsComplex::abs()
+      // Expected:  abs(v0) = 5.0
+      cell_ops->setToScalar(cvindx[0], dcomplex(4.0, -3.0));
+      cell_ops->abs(cwgt_id, cvindx[0]);
+      if (!doubleDataSameAsValue(cwgt_id, 5.0, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #22: math::HierarchyCellDataOpsComplex::abs()\n"
+         << "Expected: abs(v0) = 5.0" << std::endl;
+         cwgt_ops->printData(cwgt_id, tbox::plog);
+      }
+
+      // deallocate data on hierarchy
+      for (ln = 0; ln < 2; ln++) {
+         hierarchy->getPatchLevel(ln)->deallocatePatchData(cwgt_id);
+         for (iv = 0; iv < NVARS; iv++) {
+            hierarchy->getPatchLevel(ln)->deallocatePatchData(cvindx[iv]);
+         }
+      }
+
+      for (iv = 0; iv < NVARS; iv++) {
+         cvar[iv].setNull();
+      }
+      cwgt.setNull();
+
+      geometry.setNull();
+      hierarchy.setNull();
+      cell_ops.setNull();
+      cwgt_ops.setNull();
+
+      if (num_failures == 0) {
+         tbox::pout << "\nPASSED:  cell cplxtest" << std::endl;
+      }
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return num_failures;
+}
+
+/*
+ * Returns true if all the data in the hierarchy is equal to the specified
+ * value.  Returns false otherwise.
+ */
+static bool
+complexDataSameAsValue(
+   int desc_id,
+   dcomplex value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   bool test_passed = true;
+
+   int ln;
+   tbox::Pointer<hier::Patch> patch;
+   for (ln = 0; ln < 2; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         patch = level->getPatch(ip());
+         tbox::Pointer<pdat::CellData<dcomplex> > cvdata = patch->getPatchData(
+               desc_id);
+
+         for (pdat::CellIterator c(cvdata->getBox()); c && test_passed; c++) {
+            pdat::CellIndex cell_index = c();
+            if (!tbox::MathUtilities<dcomplex>::equalEps((*cvdata)(cell_index),
+                   value)) {
+               test_passed = false;
+            }
+         }
+      }
+   }
+
+   return test_passed;
+}
+
+/*
+ * Returns true if all the data in the hierarchy is equal to the specified
+ * value.  Returns false otherwise.
+ */
+static bool
+doubleDataSameAsValue(
+   int desc_id,
+   double value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   bool test_passed = true;
+
+   int ln;
+   tbox::Pointer<hier::Patch> patch;
+   for (ln = 0; ln < 2; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         patch = level->getPatch(ip());
+         tbox::Pointer<pdat::CellData<double> > cvdata = patch->getPatchData(
+               desc_id);
+
+         for (pdat::CellIterator c(cvdata->getBox()); c && test_passed; c++) {
+            pdat::CellIndex cell_index = c();
+            if (!tbox::MathUtilities<double>::equalEps((*cvdata)(cell_index),
+                   value)) {
+               test_passed = false;
+            }
+         }
+      }
+   }
+
+   return test_passed;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dataops/cell_hierops.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dataops/cell_hierops.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,663 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program to test cell-centered patch data ops 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fstream>
+#include <iomanip>
+using namespace std;
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/math/HierarchyDataOpsComplex.h"
+#include "SAMRAI/math/HierarchyCellDataOpsComplex.h"
+#include "SAMRAI/math/HierarchyDataOpsReal.h"
+#include "SAMRAI/math/HierarchyCellDataOpsReal.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/ProcessorMapping.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/hier/VariableContext.h"
+
+using namespace SAMRAI;
+
+/* Helper function declarations */
+bool
+doubleDataSameAsValue(
+   int desc_id,
+   double value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+#define NVARS 4
+
+int main(
+   int argc,
+   char* argv[]) {
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+
+// tbox::PIO::logOnlyNodeZero("cell_hierops.log");
+      tbox::PIO::logAllNodes("cell_hierops.log");
+
+      int ln, iv;
+
+      /*
+       * Make a simple 2-level hierarchy.
+       */
+      double lo[2] = { 0.0, 0.0 };
+      double hi[2] = { 1.0, 0.5 };
+
+      hier::Box<2> coarse0(hier::Index<2>(0, 0), hier::Index<2>(9, 2));
+      hier::Box<2> coarse1(hier::Index<2>(0, 3), hier::Index<2>(9, 4));
+      hier::Box<2> fine0(hier::Index<2>(4, 4), hier::Index<2>(7, 7));
+      hier::Box<2> fine1(hier::Index<2>(8, 4), hier::Index<2>(13, 7));
+      hier::IntVector<2> ratio(2);
+
+      hier::BoxArray<2> coarse_domain(2);
+      hier::BoxArray<2> fine_domain(2);
+      coarse_domain[0] = coarse0;
+      coarse_domain[1] = coarse1;
+      fine_domain[0] = fine0;
+      fine_domain[1] = fine1;
+
+      tbox::Pointer<geom::CartesianGridGeometry> geometry =
+         new geom::CartesianGridGeometry("CartesianGeometry",
+            lo,
+            hi,
+            coarse_domain);
+
+      tbox::Pointer<hier::PatchHierarchy> hierarchy =
+         new hier::PatchHierarchy("PatchHierarchy", geometry);
+
+      // Note: For these simple tests we allow at most 2 processors.
+      tbox::SAMRAI_MPI mpi(SAMRAIManager::getSAMRAICommWorld());
+      const int nproc = mpi.getSize();
+      TBOX_ASSERT(nproc < 3);
+
+      const int n_coarse_boxes = coarse_domain.getNumberOfBoxes();
+      const int n_fine_boxes = fine_domain.getNumberOfBoxes();
+      hier::ProcessorMapping mapping0(n_coarse_boxes);
+      hier::ProcessorMapping mapping1(n_fine_boxes);
+
+      int ib;
+      for (ib = 0; ib < n_coarse_boxes; ib++) {
+         if (nproc > 1) {
+            mapping0.setProcessorAssignment(ib, ib);
+         } else {
+            mapping0.setProcessorAssignment(ib, 0);
+         }
+      }
+
+      for (ib = 0; ib < n_fine_boxes; ib++) {
+         if (nproc > 1) {
+            mapping1.setProcessorAssignment(ib, ib);
+         } else {
+            mapping1.setProcessorAssignment(ib, 0);
+         }
+      }
+
+      hierarchy->makeNewPatchLevel(0, hier::IntVector<2>(
+            1), coarse_domain, mapping0);
+      hierarchy->makeNewPatchLevel(1, ratio, fine_domain, mapping1);
+
+      /*
+       * Create some variables, a context, and register them with
+       * the variable database.
+       */
+      hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+      tbox::Pointer<hier::VariableContext> dummy = variable_db->getContext(
+            "dummy");
+      const hier::IntVector<2> no_ghosts(0);
+
+      tbox::Pointer<pdat::CellVariable<double> > cvar[NVARS];
+      int cvindx[NVARS];
+      cvar[0] = new pdat::CellVariable<double>("cvar0", 1);
+      cvindx[0] = variable_db->registerVariableAndContext(
+            cvar[0], dummy, no_ghosts);
+      cvar[1] = new pdat::CellVariable<double>("cvar1", 1);
+      cvindx[1] = variable_db->registerVariableAndContext(
+            cvar[1], dummy, no_ghosts);
+      cvar[2] = new pdat::CellVariable<double>("cvar2", 1);
+      cvindx[2] = variable_db->registerVariableAndContext(
+            cvar[2], dummy, no_ghosts);
+      cvar[3] = new pdat::CellVariable<double>("cvar3", 1);
+      cvindx[3] = variable_db->registerVariableAndContext(
+            cvar[3], dummy, no_ghosts);
+
+      tbox::Pointer<pdat::CellVariable<double> >
+      cwgt = new pdat::CellVariable<double>("cwgt", 1);
+      int cwgt_id = variable_db->registerVariableAndContext(
+            cwgt, dummy, no_ghosts);
+
+      // allocate data on hierarchy
+      for (ln = 0; ln < 2; ln++) {
+         hierarchy->getPatchLevel(ln)->allocatePatchData(cwgt_id);
+         for (iv = 0; iv < NVARS; iv++) {
+            hierarchy->getPatchLevel(ln)->allocatePatchData(cvindx[iv]);
+         }
+      }
+
+      /*
+       * Create instances of hierarchy operations to apply certain
+       * mathematical operators.  e.g. scale(), axpy(), min(), etc.
+       */
+      int coarsest = 0;
+      int finest = 1;
+      tbox::Pointer<math::HierarchyDataOpsReal<double> > cell_ops =
+         new math::HierarchyCellDataOpsReal<double>(hierarchy, coarsest, finest);
+      TBOX_ASSERT(!cell_ops.isNull());
+
+      tbox::Pointer<math::HierarchyDataOpsReal<double> > cwgt_ops =
+         new math::HierarchyCellDataOpsReal<double>(hierarchy, coarsest, finest);
+
+      tbox::Pointer<hier::Patch> patch;
+      tbox::Pointer<geom::CartesianPatchGeometry> pgeom;
+
+      // Initialize control volume data for cell-centered components
+      hier::Box<2> coarse_fine = fine0 + fine1;
+      coarse_fine.coarsen(ratio);
+      for (ln = 0; ln < 2; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            patch = level->getPatch(ip());
+            pgeom = patch->getPatchGeometry();
+            const double* dx = pgeom->getDx();
+            const double cell_vol = dx[0] * dx[1];
+            tbox::Pointer<pdat::CellData<double> > cvdata = patch->getPatchData(
+                  cwgt_id);
+            cvdata->fillAll(cell_vol);
+            if (ln == 0) cvdata->fillAll(0.0, (coarse_fine * patch->getBox()));
+         }
+      }
+
+      /*
+       * Apply various operations to the hierarchy data. Test the
+       * result to assure its accuracy.
+       */
+      // Test #1a: Check control volume data set properly
+      // Expected: cwgt = 0.01 on coarse (except where finer patch exists) and
+      // 0.0025 on fine level
+      bool vol_test_passed = true;
+      for (ln = 0; ln < 2; ln++) {
+
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            patch = level->getPatch(ip());
+            tbox::Pointer<pdat::CellData<double> > cvdata = patch->getPatchData(
+                  cwgt_id);
+
+            for (pdat::CellIterator c(cvdata->getBox());
+                 c && vol_test_passed;
+                 c++) {
+               pdat::CellIndex cell_index = c();
+
+               if (ln == 0) {
+                  if ((coarse_fine * patch->getBox()).contains(cell_index)) {
+                     if (!tbox::MathUtilities<double>::equalEps((*cvdata)(
+                               cell_index), 0.0)) {
+                        vol_test_passed = false;
+                     }
+                  } else {
+                     if (!tbox::MathUtilities<double>::equalEps((*cvdata)(
+                               cell_index), 0.01)) {
+                        vol_test_passed = false;
+                     }
+                  }
+               }
+
+               if (ln == 1) {
+                  if (!tbox::MathUtilities<double>::equalEps((*cvdata)(
+                            cell_index), 0.0025)) {
+                     vol_test_passed = false;
+                  }
+               }
+            }
+         }
+      }
+      if (!vol_test_passed) {
+         tbox::perr
+         << "FAILED: - Test #1a: Check control volume data set properly"
+         << endl;
+         cwgt_ops->printData(cwgt_id, tbox::pout);
+      }
+
+      // Test #1b: HierarchyCellDataOpsReal2::sumControlVolumes()
+      // Expected: norm = 0.5
+      double norm = cell_ops->sumControlVolumes(cvindx[0], cwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(norm, 0.5)) {
+         tbox::perr
+         <<
+         "FAILED: - Test #1b: HierarchyCellDataOpsReal2::sumControlVolumes()\n"
+         << "Expected value = 0.5 , Computed value = "
+         << norm << endl;
+      }
+
+      // Test #2: HierarchyCellDataOpsReal2::numberOfEntries()
+      // Expected: num_data_points = 90
+      int num_data_points = cell_ops->numberOfEntries(cvindx[0]);
+      if (num_data_points != 90) {
+         tbox::perr
+         << "FAILED: - Test #2: HierarchyCellDataOpsReal2::numberOfEntries()\n"
+         << "Expected value = 90 , Computed value = "
+         << num_data_points << endl;
+      }
+
+      // Test #3a: HierarchyCellDataOpsReal2::setToScalar()
+      // Expected: v0 = 2.0
+      double val0 = 2.0;
+      cell_ops->setToScalar(cvindx[0], val0);
+      if (!doubleDataSameAsValue(cvindx[0], val0, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #3a: HierarchyCellDataOpsReal2::setToScalar()\n"
+         << "Expected: v0 = " << val0 << endl;
+         cell_ops->printData(cvindx[0], tbox::pout);
+      }
+
+      // Test #3b: HierarchyCellDataOpsReal2::setToScalar()
+      // Expected: v1 = (4.0)
+      cell_ops->setToScalar(cvindx[1], 4.0);
+      double val1 = 4.0;
+      if (!doubleDataSameAsValue(cvindx[1], val1, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #3b: HierarchyCellDataOpsReal2::setToScalar()\n"
+         << "Expected: v1 = " << val1 << endl;
+         cell_ops->printData(cvindx[1], tbox::pout);
+      }
+
+      // Test #4: HierarchyCellDataOpsReal2::copyData()
+      // Expected: v2 = v1 = (4.0)
+      cell_ops->copyData(cvindx[2], cvindx[1]);
+      if (!doubleDataSameAsValue(cvindx[2], val1, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #4: HierarchyCellDataOpsReal2::copyData()\n"
+         << "Expected: v2 = " << val1 << endl;
+         cell_ops->printData(cvindx[2], tbox::pout);
+      }
+
+      // Test #5: HierarchyCellDataOpsReal2::swapData()
+      // Expected: v0 = (4.0), v1 = (2.0)
+      cell_ops->swapData(cvindx[0], cvindx[1]);
+      if (!doubleDataSameAsValue(cvindx[0], val1, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #5a: HierarchyCellDataOpsReal2::swapData()\n"
+         << "Expected: v0 = " << val1 << endl;
+         cell_ops->printData(cvindx[0], tbox::pout);
+      }
+      if (!doubleDataSameAsValue(cvindx[1], val0, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #5b: HierarchyCellDataOpsReal2::swapData()\n"
+         << "Expected: v1 = " << val0 << endl;
+         cell_ops->printData(cvindx[1], tbox::pout);
+      }
+
+      // Test #6: HierarchyCellDataOpsReal2::scale()
+      // Expected: v2 = 0.25 * v2 = (1.0)
+      cell_ops->scale(cvindx[2], 0.25, cvindx[2]);
+      double val_scale = 1.0;
+      if (!doubleDataSameAsValue(cvindx[2], val_scale, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #6: HierarchyCellDataOpsReal2::scale()\n"
+         << "Expected: v2 = " << val_scale << endl;
+         cell_ops->printData(cvindx[2], tbox::pout);
+      }
+
+      // Test #7: HierarchyCellDataOpsReal2::add()
+      // Expected: v3 = v0 + v1 = (6.0)
+      cell_ops->add(cvindx[3], cvindx[0], cvindx[1]);
+      double val_add = 6.0;
+      if (!doubleDataSameAsValue(cvindx[3], val_add, hierarchy)) {
+         tbox::perr << "FAILED: - Test #7: HierarchyCellDataOpsReal2::add()\n"
+                    << "Expected: v3 = " << val_add << endl;
+         cell_ops->printData(cvindx[3], tbox::pout);
+      }
+
+      // Reset v0: v0 = (0.0)
+      cell_ops->setToScalar(cvindx[0], 0.0);
+
+      // Test #8: HierarchyCellDataOpsReal2::subtract()
+      // Expected: v1 = v3 - v0 = (6.0)
+      cell_ops->subtract(cvindx[1], cvindx[3], cvindx[0]);
+      double val_sub = 6.0;
+      if (!doubleDataSameAsValue(cvindx[1], val_sub, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #8: HierarchyCellDataOpsReal2::subtract()\n"
+         << "Expected: v1 = " << val_sub << endl;
+         cell_ops->printData(cvindx[1], tbox::pout);
+      }
+
+      // Test #9a: HierarchyCellDataOpsReal2::addScalar()
+      // Expected: v1 = v1 + (0.0) = (6.0)
+      cell_ops->addScalar(cvindx[1], cvindx[1], 0.0);
+      double val_addScalar = 6.0;
+      if (!doubleDataSameAsValue(cvindx[1], val_addScalar, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #9a: HierarchyCellDataOpsReal2::addScalar()\n"
+         << "Expected: v1 = " << val_addScalar << endl;
+         cell_ops->printData(cvindx[1], tbox::pout);
+      }
+
+      // Test #9b: HierarchyCellDataOpsReal2::addScalar()
+      // Expected: v2 = v2 + (0.0) = (1.0)
+      cell_ops->addScalar(cvindx[2], cvindx[2], 0.0);
+      val_addScalar = 1.0;
+      if (!doubleDataSameAsValue(cvindx[2], val_addScalar, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #9b: HierarchyCellDataOpsReal2::addScalar()\n"
+         << "Expected: v2 = " << val_addScalar << endl;
+         cell_ops->printData(cvindx[2], tbox::pout);
+      }
+
+      // Test #9c: HierarchyCellDataOpsReal2::addScalar()
+      // Expected: v2 = v2 + (3.0) = (4.0)
+      cell_ops->addScalar(cvindx[2], cvindx[2], 3.0);
+      val_addScalar = 4.0;
+      if (!doubleDataSameAsValue(cvindx[2], val_addScalar, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #9c: HierarchyCellDataOpsReal2::addScalar()\n"
+         << "Expected: v2 = " << val_addScalar << endl;
+         cell_ops->printData(cvindx[2], tbox::pout);
+      }
+
+      // Reset v3:  v3 = (0.5)
+      cell_ops->setToScalar(cvindx[3], 0.5);
+
+      // Test #10: HierarchyCellDataOpsReal2::multiply()
+      // Expected: v1 = v3 * v1 = (3.0)
+      cell_ops->multiply(cvindx[1], cvindx[3], cvindx[1]);
+      double val_mult = 3.0;
+      if (!doubleDataSameAsValue(cvindx[1], val_mult, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #10: HierarchyCellDataOpsReal2::multiply()\n"
+         << "Expected: v1 = " << val_mult << endl;
+         cell_ops->printData(cvindx[1], tbox::pout);
+      }
+
+      // Test #11: HierarchyCellDataOpsReal2::divide()
+      // Expected: v0 = v2 / v1 = 1.3333333333
+      cell_ops->divide(cvindx[0], cvindx[2], cvindx[1]);
+      double val_div = 1.33333333333;
+      if (!doubleDataSameAsValue(cvindx[0], val_div, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #11: HierarchyCellDataOpsReal2::divide()\n"
+         << "Expected: v0 = " << val_div << endl;
+         cell_ops->printData(cvindx[0], tbox::pout);
+      }
+
+      // Test #12: HierarchyCellDataOpsReal2::reciprocal()
+      // Expected:  v1 = 1 / v1 = (0.333333333)
+      cell_ops->reciprocal(cvindx[1], cvindx[1]);
+      double val_rec = 0.33333333333;
+      if (!doubleDataSameAsValue(cvindx[1], val_rec, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #12: HierarchyCellDataOpsReal2::reciprocal()\n"
+         << "Expected: v1 = " << val_rec << endl;
+         cell_ops->printData(cvindx[1], tbox::pout);
+      }
+
+      // Test #13: HierarchyCellDataOpsReal2::abs()
+      // Expected:  v3 = abs(v2) = 4.0
+      cell_ops->abs(cvindx[3], cvindx[2]);
+      double val_abs = 4.0;
+      if (!doubleDataSameAsValue(cvindx[3], val_abs, hierarchy)) {
+         tbox::perr << "FAILED: - Test #13: HierarchyCellDataOpsReal2::abs()\n"
+                    << "Expected: v3 = " << val_abs << endl;
+         cell_ops->printData(cvindx[3], tbox::pout);
+      }
+
+      // Test #14: Place some bogus values on coarse level
+      tbox::Pointer<pdat::CellData<double> > cdata;
+
+      // set values
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(0);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         patch = level->getPatch(ip());
+         cdata = patch->getPatchData(cvindx[2]);
+         hier::Index<2> index0(2, 2);
+         hier::Index<2> index1(5, 3);
+         if (patch->getBox().contains(index0)) {
+            (*cdata)(pdat::CellIndex(index0), 0) = 100.0;
+         }
+         if (patch->getBox().contains(index1)) {
+            (*cdata)(pdat::CellIndex(index1), 0) = -1000.0;
+         }
+      }
+
+      // check values
+      bool bogus_value_test_passed = true;
+      for (hier::PatchLevel::Iterator ipp(level); ipp; ipp++) {
+         patch = level->getPatch(ipp());
+         cdata = patch->getPatchData(cvindx[2]);
+         hier::Index<2> index0(2, 2);
+         hier::Index<2> index1(5, 3);
+
+         for (pdat::CellIterator c(cdata->getBox());
+              c && bogus_value_test_passed;
+              c++) {
+            pdat::CellIndex cell_index = c();
+
+            if (cell_index == index0) {
+               if (!tbox::MathUtilities<double>::equalEps((*cdata)(cell_index),
+                      100.0)) {
+                  bogus_value_test_passed = false;
+               }
+            } else {
+               if (cell_index == index1) {
+                  if (!tbox::MathUtilities<double>::equalEps((*cdata)(
+                            cell_index), -1000.0)) {
+                     bogus_value_test_passed = false;
+                  }
+               } else {
+                  if (!tbox::MathUtilities<double>::equalEps((*cdata)(
+                            cell_index), 4.0)) {
+                     bogus_value_test_passed = false;
+                  }
+               }
+            }
+         }
+      }
+      if (!bogus_value_test_passed) {
+         tbox::perr
+         << "FAILED: - Test #14:  Place some bogus values on coarse level"
+         << endl;
+         cell_ops->printData(cvindx[2], tbox::pout);
+      }
+
+      // Test #15: HierarchyCellDataOpsReal2::L1Norm() - w/o control weight
+      // Expected:  bogus_l1_norm = 1452
+      double bogus_l1_norm = cell_ops->L1Norm(cvindx[2]);
+      if (!tbox::MathUtilities<double>::equalEps(bogus_l1_norm, 1452)) {
+         tbox::perr
+         << "FAILED: - Test #15: HierarchyCellDataOpsReal2::L1Norm()"
+         << " - w/o control weight\n"
+         << "Expected value = 1452, Computed value = "
+         << setprecision(12) << bogus_l1_norm << endl;
+      }
+
+      // Test #16: HierarchyCellDataOpsReal2::L1Norm() - w/control weight
+      // Expected:  correct_l1_norm = 2.0
+      double correct_l1_norm = cell_ops->L1Norm(cvindx[2], cwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(correct_l1_norm, 2.0)) {
+         tbox::perr
+         << "FAILED: - Test #16: HierarchyCellDataOpsReal2::L1Norm()"
+         << " - w/control weight\n"
+         << "Expected value = 2.0, Computed value = "
+         << correct_l1_norm << endl;
+      }
+
+      // Test #17: HierarchyCellDataOpsReal2::L2Norm()
+      // Expected:  l2_norm = 2.82842712475
+      double l2_norm = cell_ops->L2Norm(cvindx[2], cwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(l2_norm, 2.82842712475)) {
+         tbox::perr
+         << "FAILED: - Test #17: HierarchyCellDataOpsReal2::L2Norm()\n"
+         << "Expected value = 2.82842712475, Computed value = "
+         << l2_norm << endl;
+      }
+
+      // Test #18: HierarchyCellDataOpsReal2::L2Norm() - w/o control weight
+      // Expected:  bogus_max_norm = 1000.0
+      double bogus_max_norm = cell_ops->maxNorm(cvindx[2]);
+      if (!tbox::MathUtilities<double>::equalEps(bogus_max_norm, 1000.0)) {
+         tbox::perr
+         << "FAILED: - Test #18: HierarchyCellDataOpsReal2::L2Norm()"
+         << " - w/o control weight\n"
+         << "Expected value = 1000.0, Computed value = "
+         << bogus_max_norm << endl;
+      }
+
+      // Test #19: HierarchyCellDataOpsReal2::L2Norm() - w/control weight
+      // Expected:  max_norm = 4.0
+      double max_norm = cell_ops->maxNorm(cvindx[2], cwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(max_norm, 4.0)) {
+         tbox::perr
+         << "FAILED: - Test #19: HierarchyCellDataOpsReal2::L2Norm()"
+         << " - w/control weight\n"
+         << "Expected value = 4.0, Computed value = "
+         << max_norm << endl;
+      }
+
+      // Reset data and test sums, axpy's
+      cell_ops->setToScalar(cvindx[0], 1.00);
+      cell_ops->setToScalar(cvindx[1], 2.5);
+      cell_ops->setToScalar(cvindx[2], 7.0);
+
+      // Test #20: HierarchyCellDataOpsReal2::linearSum()
+      // Expected:  v3 = 5.0
+      cell_ops->linearSum(cvindx[3], 2.0, cvindx[1], 0.00, cvindx[0]);
+      double val_linearSum = 5.0;
+      if (!doubleDataSameAsValue(cvindx[3], val_linearSum, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #20: HierarchyCellDataOpsReal2::linearSum()\n"
+         << "Expected: v3 = " << val_linearSum << endl;
+         cell_ops->printData(cvindx[3], tbox::pout);
+      }
+
+      // Test #21: HierarchyCellDataOpsReal2::axmy()
+      // Expected:  v3 = 6.5
+      cell_ops->axmy(cvindx[3], 3.0, cvindx[1], cvindx[0]);
+      double val_axmy = 6.5;
+      if (!doubleDataSameAsValue(cvindx[3], val_axmy, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #21: HierarchyCellDataOpsReal2::axmy()\n"
+         << "Expected: v3 = " << val_axmy << endl;
+         cell_ops->printData(cvindx[3], tbox::pout);
+      }
+
+      // Test #22a: HierarchyCellDataOpsReal2::dot() - (ind2) * (ind1)
+      // Expected:  cdot = 8.75
+      double cdot = cell_ops->dot(cvindx[2], cvindx[1], cwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(cdot, 8.75)) {
+         tbox::perr
+         <<
+         "FAILED: - Test #22a: HierarchyCellDataOpsReal2::dot() - (ind2) * (ind1)\n"
+         << "Expected Value = 8.75, Computed Value = "
+         << cdot << endl;
+      }
+
+      // Test #22b: HierarchyCellDataOpsReal2::dot() - (ind1) * (ind2)
+      // Expected:  cdot = 8.75
+      cdot = cell_ops->dot(cvindx[1], cvindx[2], cwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(cdot, 8.75)) {
+         tbox::perr
+         <<
+         "FAILED: - Test #22b: HierarchyCellDataOpsReal2::dot() - (ind1) * (ind2)\n"
+         << "Expected Value = 8.75, Computed Value = "
+         << cdot << endl;
+      }
+
+      // deallocate data on hierarchy
+      for (ln = 0; ln < 2; ln++) {
+         hierarchy->getPatchLevel(ln)->deallocatePatchData(cwgt_id);
+         for (iv = 0; iv < NVARS; iv++) {
+            hierarchy->getPatchLevel(ln)->deallocatePatchData(cvindx[iv]);
+         }
+      }
+
+      for (iv = 0; iv < NVARS; iv++) {
+         cvar[iv].setNull();
+      }
+      cwgt.setNull();
+
+      geometry.setNull();
+      hierarchy.setNull();
+      cell_ops.setNull();
+      cwgt_ops.setNull();
+
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return 0;
+}
+
+/*
+ * Returns true if all the data in the hierarchy is equal to the specified
+ * value.  Returns false otherwise.
+ */
+bool
+doubleDataSameAsValue(
+   int desc_id,
+   double value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   bool test_passed = true;
+
+   int ln;
+   tbox::Pointer<hier::Patch> patch;
+   for (ln = 0; ln < 2; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         patch = level->getPatch(ip());
+         tbox::Pointer<pdat::CellData<double> > cvdata = patch->getPatchData(
+               desc_id);
+
+         for (pdat::CellIterator c(cvdata->getBox()); c && test_passed; c++) {
+            pdat::CellIndex cell_index = c();
+            if (!tbox::MathUtilities<double>::equalEps((*cvdata)(cell_index),
+                   value)) {
+               test_passed = false;
+            }
+         }
+      }
+   }
+
+   return test_passed;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dataops/cell_hiertest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dataops/cell_hiertest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,744 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program to test cell-centered patch data ops 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fstream>
+#include <iomanip>
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/math/HierarchyDataOpsReal.h"
+#include "SAMRAI/math/HierarchyCellDataOpsReal.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/ProcessorMapping.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/hier/VariableContext.h"
+
+using namespace SAMRAI;
+
+/* Helper function declarations */
+static bool
+doubleDataSameAsValue(
+   int desc_id,
+   double value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+#define NVARS 4
+
+int main(
+   int argc,
+   char* argv[]) {
+   int num_failures = 0;
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   if (argc < 2) {
+      TBOX_ERROR("Usage: " << argv[0] << " [dimension]");
+   }
+
+   const unsigned short d = static_cast<unsigned short>(atoi(argv[1]));
+   TBOX_ASSERT(d > 0);
+   TBOX_ASSERT(d <= tbox::Dimension::MAXIMUM_DIMENSION_VALUE);
+   const tbox::Dimension dim(d);
+
+   const std::string log_fn = std::string("cell_hiertest.")
+      + tbox::Utilities::intToString(dim.getValue(), 1) + "d.log";
+   tbox::PIO::logAllNodes(log_fn);
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+
+      int ln, iv;
+
+      // Make a dummy hierarchy domain
+      double lo[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      double hi[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+      hier::Index clo0(dim);
+      hier::Index chi0(dim);
+      hier::Index clo1(dim);
+      hier::Index chi1(dim);
+      hier::Index flo0(dim);
+      hier::Index fhi0(dim);
+      hier::Index flo1(dim);
+      hier::Index fhi1(dim);
+
+      for (int i = 0; i < dim.getValue(); i++) {
+         lo[i] = 0.0;
+         clo0(i) = 0;
+         flo0(i) = 4;
+         fhi0(i) = 7;
+         if (i == 1) {
+            hi[i] = 0.5;
+            chi0(i) = 2;
+            clo1(i) = 3;
+            chi1(i) = 4;
+         } else {
+            hi[i] = 1.0;
+            chi0(i) = 9;
+            clo1(i) = 0;
+            chi1(i) = 9;
+         }
+         if (i == 0) {
+            flo1(i) = 8;
+            fhi1(i) = 13;
+         } else {
+            flo1(i) = flo0(i);
+            fhi1(i) = fhi0(i);
+         }
+      }
+
+      hier::Box coarse0(clo0, chi0);
+      hier::Box coarse1(clo1, chi1);
+      hier::Box fine0(flo0, fhi0);
+      hier::Box fine1(flo1, fhi1);
+      hier::IntVector ratio(dim, 2);
+
+      hier::BoxArray coarse_domain(dim, 2);
+      hier::BoxArray fine_boxes(dim, 2);
+      coarse_domain[0] = coarse0;
+      coarse_domain[1] = coarse1;
+      fine_boxes[0] = fine0;
+      fine_boxes[1] = fine1;
+
+      tbox::Pointer<geom::CartesianGridGeometry> geometry(
+         new geom::CartesianGridGeometry("CartesianGeometry",
+            lo,
+            hi,
+            coarse_domain));
+
+      tbox::Pointer<hier::PatchHierarchy> hierarchy(
+         new hier::PatchHierarchy("PatchHierarchy", geometry));
+
+      hierarchy->setMaxNumberOfLevels(2);
+      hierarchy->setRatioToCoarserLevel(ratio, 1);
+
+      // Note: For these simple tests we allow at most 2 processors.
+      const int nproc = mpi.getSize();
+      TBOX_ASSERT(nproc < 3);
+
+      const int n_coarse_boxes = coarse_domain.getNumberOfBoxes();
+      const int n_fine_boxes = fine_boxes.getNumberOfBoxes();
+
+      hier::MappedBoxLevel layer0(hier::IntVector(dim, 1));
+      hier::MappedBoxLevel layer1(ratio);
+
+      for (int ib = 0; ib < n_coarse_boxes; ib++) {
+         if (nproc > 1) {
+            if (ib == layer0.getRank()) {
+               layer0.addMappedBox(hier::MappedBox(coarse_domain[ib], hier::LocalId(ib),
+                     layer0.getRank()));
+            }
+         } else {
+               layer0.addMappedBox(hier::MappedBox(coarse_domain[ib], hier::LocalId(ib), 0));
+         }
+      }
+
+      for (int ib = 0; ib < n_fine_boxes; ib++) {
+         if (nproc > 1) {
+            if (ib == layer1.getRank()) {
+               layer1.addMappedBox(hier::MappedBox(fine_boxes[ib], hier::LocalId(ib),
+                     layer1.getRank()));
+            }
+         } else {
+            layer1.addMappedBox(hier::MappedBox(fine_boxes[ib], hier::LocalId(ib), 0));
+         }
+      }
+
+      hierarchy->makeNewPatchLevel(0, layer0);
+      hierarchy->makeNewPatchLevel(1, layer1);
+
+      // Create instance of hier::Variable database
+      hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+      tbox::Pointer<hier::VariableContext> dummy = variable_db->getContext(
+            "dummy");
+      const hier::IntVector no_ghosts(dim, 0);
+
+      // Make some dummy variables and data on the hierarchy
+      tbox::Pointer<pdat::CellVariable<double> > cvar[NVARS];
+      int cvindx[NVARS];
+      cvar[0] = new pdat::CellVariable<double>(dim, "cvar0", 1);
+      cvindx[0] = variable_db->registerVariableAndContext(
+            cvar[0], dummy, no_ghosts);
+      cvar[1] = new pdat::CellVariable<double>(dim, "cvar1", 1);
+      cvindx[1] = variable_db->registerVariableAndContext(
+            cvar[1], dummy, no_ghosts);
+      cvar[2] = new pdat::CellVariable<double>(dim, "cvar2", 1);
+      cvindx[2] = variable_db->registerVariableAndContext(
+            cvar[2], dummy, no_ghosts);
+      cvar[3] = new pdat::CellVariable<double>(dim, "cvar3", 1);
+      cvindx[3] = variable_db->registerVariableAndContext(
+            cvar[3], dummy, no_ghosts);
+
+      tbox::Pointer<pdat::CellVariable<double> >
+      cwgt(new pdat::CellVariable<double>(dim, "cwgt", 1));
+      int cwgt_id = variable_db->registerVariableAndContext(
+            cwgt, dummy, no_ghosts);
+
+      // allocate data on hierarchy
+      for (ln = 0; ln < 2; ln++) {
+         hierarchy->getPatchLevel(ln)->allocatePatchData(cwgt_id);
+         for (iv = 0; iv < NVARS; iv++) {
+            hierarchy->getPatchLevel(ln)->allocatePatchData(cvindx[iv]);
+         }
+      }
+
+      tbox::Pointer<math::HierarchyDataOpsReal<double> > cell_ops(
+         new math::HierarchyCellDataOpsReal<double>(hierarchy, 0, 1));
+      TBOX_ASSERT(!cell_ops.isNull());
+
+      tbox::Pointer<math::HierarchyDataOpsReal<double> > cwgt_ops(
+         new math::HierarchyCellDataOpsReal<double>(hierarchy, 0, 1));
+
+      tbox::Pointer<hier::Patch> patch;
+      tbox::Pointer<geom::CartesianPatchGeometry> pgeom;
+
+      // Initialize control volume data for cell-centered components
+      hier::Box coarse_fine = fine0 + fine1;
+      coarse_fine.coarsen(ratio);
+      for (ln = 0; ln < 2; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            patch = *ip;
+            pgeom = patch->getPatchGeometry();
+            const double* dx = pgeom->getDx();
+            double cell_vol = dx[0];
+            for (int i = 1; i < dim.getValue(); i++) {
+               cell_vol *= dx[i];
+            }
+            tbox::Pointer<pdat::CellData<double> > cvdata =
+               patch->getPatchData(cwgt_id);
+            cvdata->fillAll(cell_vol);
+            if (ln == 0) cvdata->fillAll(0.0, (coarse_fine * patch->getBox()));
+         }
+      }
+
+      // Test #1: Print out control volume data and compute its integral
+
+      // Test #1a: Check control volume data set properly
+      // Expected: cwgt = 0.01 on coarse (except where finer patch exists) and
+      // 0.0025 on fine level
+      bool vol_test_passed = true;
+      for (ln = 0; ln < 2; ln++) {
+
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            patch = *ip;
+            tbox::Pointer<pdat::CellData<double> > cvdata =
+               patch->getPatchData(cwgt_id);
+
+            for (pdat::CellIterator c(cvdata->getBox());
+                 c && vol_test_passed; c++) {
+               pdat::CellIndex cell_index = c();
+
+               if (ln == 0) {
+                  if ((coarse_fine * patch->getBox()).contains(cell_index)) {
+                     if (!tbox::MathUtilities<double>::equalEps((*cvdata)(
+                               cell_index), 0.0)) {
+                        vol_test_passed = false;
+                     }
+                  } else {
+                     if (!tbox::MathUtilities<double>::equalEps((*cvdata)(
+                               cell_index), (dim == tbox::Dimension(2)) ? 0.01 : 0.001)) {
+                        vol_test_passed = false;
+                     }
+                  }
+               }
+
+               if (ln == 1) {
+                  if (!tbox::MathUtilities<double>::equalEps((*cvdata)(
+                            cell_index), (dim == tbox::Dimension(2)) ? 0.0025 : 0.000125)) {
+                     vol_test_passed = false;
+                  }
+               }
+            }
+         }
+      }
+      if (!vol_test_passed) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #1a: Check control volume data set properly"
+         << std::endl;
+         cwgt_ops->printData(cwgt_id, tbox::pout);
+      }
+
+      // Test #1b: math::HierarchyCellDataOpsReal::sumControlVolumes()
+      // Expected: norm = 0.5
+      double norm = cell_ops->sumControlVolumes(cvindx[0], cwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(norm, 0.5)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #1b: math::HierarchyCellDataOpsReal::sumControlVolumes()\n"
+         << "Expected value = 0.5 , Computed value = "
+         << norm << std::endl;
+      }
+
+      // Test #2: math::HierarchyCellDataOpsReal::numberOfEntries()
+      // Expected: num_data_points = 90 for 2D, 660 for 3D
+      int num_data_points = cell_ops->numberOfEntries(cvindx[0]);
+      if (num_data_points != ((dim == tbox::Dimension(2)) ? 90 : 660)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #2: math::HierarchyCellDataOpsReal::numberOfEntries()\n"
+         << "Expected value = " << ((dim == tbox::Dimension(2)) ? 90 : 660)
+         << " , Computed value = " << num_data_points << std::endl;
+      }
+
+      // Test #3a: math::HierarchyCellDataOpsReal::setToScalar()
+      // Expected: v0 = 2.0
+      double val0 = 2.0;
+      cell_ops->setToScalar(cvindx[0], val0);
+      if (!doubleDataSameAsValue(cvindx[0], val0, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #3a: math::HierarchyCellDataOpsReal::setToScalar()\n"
+         << "Expected: v0 = " << val0 << std::endl;
+         cell_ops->printData(cvindx[0], tbox::pout);
+      }
+
+      // Test #3b: math::HierarchyCellDataOpsReal::setToScalar()
+      // Expected: v1 = (4.0)
+      cell_ops->setToScalar(cvindx[1], 4.0);
+      double val1 = 4.0;
+      if (!doubleDataSameAsValue(cvindx[1], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #3b: math::HierarchyCellDataOpsReal::setToScalar()\n"
+         << "Expected: v1 = " << val1 << std::endl;
+         cell_ops->printData(cvindx[1], tbox::pout);
+      }
+
+      // Test #4: math::HierarchyCellDataOpsReal::copyData()
+      // Expected: v2 = v1 = (4.0)
+      cell_ops->copyData(cvindx[2], cvindx[1]);
+      if (!doubleDataSameAsValue(cvindx[2], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #4: math::HierarchyCellDataOpsReal::copyData()\n"
+         << "Expected: v2 = " << val1 << std::endl;
+         cell_ops->printData(cvindx[2], tbox::pout);
+      }
+
+      // Test #5: math::HierarchyCellDataOpsReal::swapData()
+      // Expected: v0 = (4.0), v1 = (2.0)
+      cell_ops->swapData(cvindx[0], cvindx[1]);
+      if (!doubleDataSameAsValue(cvindx[0], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #5a: math::HierarchyCellDataOpsReal::swapData()\n"
+         << "Expected: v0 = " << val1 << std::endl;
+         cell_ops->printData(cvindx[0], tbox::pout);
+      }
+      if (!doubleDataSameAsValue(cvindx[1], val0, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #5b: math::HierarchyCellDataOpsReal::swapData()\n"
+         << "Expected: v1 = " << val0 << std::endl;
+         cell_ops->printData(cvindx[1], tbox::pout);
+      }
+
+      // Test #6: math::HierarchyCellDataOpsReal::scale()
+      // Expected: v2 = 0.25 * v2 = (1.0)
+      cell_ops->scale(cvindx[2], 0.25, cvindx[2]);
+      double val_scale = 1.0;
+      if (!doubleDataSameAsValue(cvindx[2], val_scale, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #6: math::HierarchyCellDataOpsReal::scale()\n"
+         << "Expected: v2 = " << val_scale << std::endl;
+         cell_ops->printData(cvindx[2], tbox::pout);
+      }
+
+      // Test #7: math::HierarchyCellDataOpsReal::add()
+      // Expected: v3 = v0 + v1 = (6.0)
+      cell_ops->add(cvindx[3], cvindx[0], cvindx[1]);
+      double val_add = 6.0;
+      if (!doubleDataSameAsValue(cvindx[3], val_add, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #7: math::HierarchyCellDataOpsReal::add()\n"
+         << "Expected: v3 = " << val_add << std::endl;
+         cell_ops->printData(cvindx[3], tbox::pout);
+      }
+
+      // Reset v0: v0 = (0.0)
+      cell_ops->setToScalar(cvindx[0], 0.0);
+
+      // Test #8: math::HierarchyCellDataOpsReal::subtract()
+      // Expected: v1 = v3 - v0 = (6.0)
+      cell_ops->subtract(cvindx[1], cvindx[3], cvindx[0]);
+      double val_sub = 6.0;
+      if (!doubleDataSameAsValue(cvindx[1], val_sub, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #8: math::HierarchyCellDataOpsReal::subtract()\n"
+         << "Expected: v1 = " << val_sub << std::endl;
+         cell_ops->printData(cvindx[1], tbox::pout);
+      }
+
+      // Test #9a: math::HierarchyCellDataOpsReal::addScalar()
+      // Expected: v1 = v1 + (0.0) = (6.0)
+      cell_ops->addScalar(cvindx[1], cvindx[1], 0.0);
+      double val_addScalar = 6.0;
+      if (!doubleDataSameAsValue(cvindx[1], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #9a: math::HierarchyCellDataOpsReal::addScalar()\n"
+         << "Expected: v1 = " << val_addScalar << std::endl;
+         cell_ops->printData(cvindx[1], tbox::pout);
+      }
+
+      // Test #9b: math::HierarchyCellDataOpsReal::addScalar()
+      // Expected: v2 = v2 + (0.0) = (1.0)
+      cell_ops->addScalar(cvindx[2], cvindx[2], 0.0);
+      val_addScalar = 1.0;
+      if (!doubleDataSameAsValue(cvindx[2], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #9b: math::HierarchyCellDataOpsReal::addScalar()\n"
+         << "Expected: v2 = " << val_addScalar << std::endl;
+         cell_ops->printData(cvindx[2], tbox::pout);
+      }
+
+      // Test #9c: math::HierarchyCellDataOpsReal::addScalar()
+      // Expected: v2 = v2 + (3.0) = (4.0)
+      cell_ops->addScalar(cvindx[2], cvindx[2], 3.0);
+      val_addScalar = 4.0;
+      if (!doubleDataSameAsValue(cvindx[2], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #9c: math::HierarchyCellDataOpsReal::addScalar()\n"
+         << "Expected: v2 = " << val_addScalar << std::endl;
+         cell_ops->printData(cvindx[2], tbox::pout);
+      }
+
+      // Reset v3:  v3 = (0.5)
+      cell_ops->setToScalar(cvindx[3], 0.5);
+
+      // Test #10: math::HierarchyCellDataOpsReal::multiply()
+      // Expected: v1 = v3 * v1 = (3.0)
+      cell_ops->multiply(cvindx[1], cvindx[3], cvindx[1]);
+      double val_mult = 3.0;
+      if (!doubleDataSameAsValue(cvindx[1], val_mult, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #10: math::HierarchyCellDataOpsReal::multiply()\n"
+         << "Expected: v1 = " << val_mult << std::endl;
+         cell_ops->printData(cvindx[1], tbox::pout);
+      }
+
+      // Test #11: math::HierarchyCellDataOpsReal::divide()
+      // Expected: v0 = v2 / v1 = 1.3333333333
+      cell_ops->divide(cvindx[0], cvindx[2], cvindx[1]);
+      double val_div = 1.33333333333;
+      if (!doubleDataSameAsValue(cvindx[0], val_div, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #11: math::HierarchyCellDataOpsReal::divide()\n"
+         << "Expected: v0 = " << val_div << std::endl;
+         cell_ops->printData(cvindx[0], tbox::pout);
+      }
+
+      // Test #12: math::HierarchyCellDataOpsReal::reciprocal()
+      // Expected:  v1 = 1 / v1 = (0.333333333)
+      cell_ops->reciprocal(cvindx[1], cvindx[1]);
+      double val_rec = 0.33333333333;
+      if (!doubleDataSameAsValue(cvindx[1], val_rec, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #12: math::HierarchyCellDataOpsReal::reciprocal()\n"
+         << "Expected: v1 = " << val_rec << std::endl;
+         cell_ops->printData(cvindx[1], tbox::pout);
+      }
+
+      // Test #13: math::HierarchyCellDataOpsReal::abs()
+      // Expected:  v3 = abs(v2) = 4.0
+      cell_ops->abs(cvindx[3], cvindx[2]);
+      double val_abs = 4.0;
+      if (!doubleDataSameAsValue(cvindx[3], val_abs, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #13: math::HierarchyCellDataOpsReal::abs()\n"
+         << "Expected: v3 = " << val_abs << std::endl;
+         cell_ops->printData(cvindx[3], tbox::pout);
+      }
+
+      // Test #14: Place some bogus values on coarse level
+      tbox::Pointer<pdat::CellData<double> > cdata;
+
+      // set values
+      tbox::Pointer<hier::PatchLevel> level_zero =
+         hierarchy->getPatchLevel(0);
+      for (hier::PatchLevel::Iterator ip(level_zero); ip; ip++) {
+         patch = *ip;
+         cdata = patch->getPatchData(cvindx[2]);
+         hier::Index index0(dim, 2);
+         hier::Index index1(dim, 3);
+         index1(0) = 5;
+         if (patch->getBox().contains(index0)) {
+            (*cdata)(pdat::CellIndex(index0), 0) = 100.0;
+         }
+         if (patch->getBox().contains(index1)) {
+            (*cdata)(pdat::CellIndex(index1), 0) = -1000.0;
+         }
+      }
+
+      // check values
+      bool bogus_value_test_passed = true;
+      for (hier::PatchLevel::Iterator ipp(level_zero); ipp; ipp++) {
+         patch = *ipp;
+         cdata = patch->getPatchData(cvindx[2]);
+         hier::Index index0(dim, 2);
+         hier::Index index1(dim, 3);
+         index1(0) = 5;
+
+         for (pdat::CellIterator c(cdata->getBox());
+              c && bogus_value_test_passed; c++) {
+            pdat::CellIndex cell_index = c();
+
+            if (cell_index == pdat::CellIndex(index0)) {
+               if (!tbox::MathUtilities<double>::equalEps((*cdata)(cell_index),
+                      100.0)) {
+                  bogus_value_test_passed = false;
+               }
+            } else {
+               if (cell_index == pdat::CellIndex(index1)) {
+                  if (!tbox::MathUtilities<double>::equalEps((*cdata)(
+                            cell_index), -1000.0)) {
+                     bogus_value_test_passed = false;
+                  }
+               } else {
+                  if (!tbox::MathUtilities<double>::equalEps((*cdata)(
+                            cell_index), 4.0)) {
+                     bogus_value_test_passed = false;
+                  }
+               }
+            }
+         }
+      }
+      if (!bogus_value_test_passed) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #14:  Place some bogus values on coarse level"
+         << std::endl;
+         cell_ops->printData(cvindx[2], tbox::pout);
+      }
+
+      // Test #15: math::HierarchyCellDataOpsReal::L1Norm() - w/o control weight
+      // Expected:  bogus_l1_norm = 1452 in 2d, 3732 in 3d
+      double bogus_l1_norm = cell_ops->L1Norm(cvindx[2]);
+      if (!tbox::MathUtilities<double>::equalEps(bogus_l1_norm,
+             ((dim == tbox::Dimension(2)) ? 1452 : 3732))) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #15: math::HierarchyCellDataOpsReal::L1Norm()"
+         << " - w/o control weight\n"
+         << "Expected value = "
+         << ((dim == tbox::Dimension(2)) ? 1452 : 3732) << ", Computed value = "
+         << std::setprecision(12) << bogus_l1_norm << std::endl;
+      }
+
+      // Test #16: math::HierarchyCellDataOpsReal::L1Norm() - w/control weight
+      // Expected:  correct_l1_norm = 2.0
+      double correct_l1_norm = cell_ops->L1Norm(cvindx[2], cwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(correct_l1_norm, 2.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #16: math::HierarchyCellDataOpsReal::L1Norm()"
+         << " - w/control weight\n"
+         << "Expected value = 2.0, Computed value = "
+         << correct_l1_norm << std::endl;
+      }
+
+      // Test #17: math::HierarchyCellDataOpsReal::L2Norm()
+      // Expected:  l2_norm = 2.82842712475
+      double l2_norm = cell_ops->L2Norm(cvindx[2], cwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(l2_norm, 2.82842712475)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #17: math::HierarchyCellDataOpsReal::L2Norm()\n"
+         << "Expected value = 2.82842712475, Computed value = "
+         << l2_norm << std::endl;
+      }
+
+      // Test #18: math::HierarchyCellDataOpsReal::L2Norm() - w/o control weight
+      // Expected:  bogus_max_norm = 1000.0
+      double bogus_max_norm = cell_ops->maxNorm(cvindx[2]);
+      if (!tbox::MathUtilities<double>::equalEps(bogus_max_norm, 1000.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #18: math::HierarchyCellDataOpsReal::L2Norm()"
+         << " - w/o control weight\n"
+         << "Expected value = 1000.0, Computed value = "
+         << bogus_max_norm << std::endl;
+      }
+
+      // Test #19: math::HierarchyCellDataOpsReal::L2Norm() - w/control weight
+      // Expected:  max_norm = 4.0
+      double max_norm = cell_ops->maxNorm(cvindx[2], cwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(max_norm, 4.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #19: math::HierarchyCellDataOpsReal::L2Norm()"
+         << " - w/control weight\n"
+         << "Expected value = 4.0, Computed value = "
+         << max_norm << std::endl;
+      }
+
+      // Reset data and test sums, axpy's
+      cell_ops->setToScalar(cvindx[0], 1.00);
+      cell_ops->setToScalar(cvindx[1], 2.5);
+      cell_ops->setToScalar(cvindx[2], 7.0);
+
+      // Test #20: math::HierarchyCellDataOpsReal::linearSum()
+      // Expected:  v3 = 5.0
+      cell_ops->linearSum(cvindx[3], 2.0, cvindx[1], 0.00, cvindx[0]);
+      double val_linearSum = 5.0;
+      if (!doubleDataSameAsValue(cvindx[3], val_linearSum, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #20: math::HierarchyCellDataOpsReal::linearSum()\n"
+         << "Expected: v3 = " << val_linearSum << std::endl;
+         cell_ops->printData(cvindx[3], tbox::pout);
+      }
+
+      // Test #21: math::HierarchyCellDataOpsReal::axmy()
+      // Expected:  v3 = 6.5
+      cell_ops->axmy(cvindx[3], 3.0, cvindx[1], cvindx[0]);
+      double val_axmy = 6.5;
+      if (!doubleDataSameAsValue(cvindx[3], val_axmy, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #21: math::HierarchyCellDataOpsReal::axmy()\n"
+         << "Expected: v3 = " << val_axmy << std::endl;
+         cell_ops->printData(cvindx[3], tbox::pout);
+      }
+
+      // Test #22a: math::HierarchyCellDataOpsReal::dot() - (ind2) * (ind1)
+      // Expected:  cdot = 8.75
+      double cdot = cell_ops->dot(cvindx[2], cvindx[1], cwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(cdot, 8.75)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #22a: math::HierarchyCellDataOpsReal::dot() - (ind2) * (ind1)\n"
+         << "Expected Value = 8.75, Computed Value = "
+         << cdot << std::endl;
+      }
+
+      // Test #22b: math::HierarchyCellDataOpsReal::dot() - (ind1) * (ind2)
+      // Expected:  cdot = 8.75
+      cdot = cell_ops->dot(cvindx[1], cvindx[2], cwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(cdot, 8.75)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #22b: math::HierarchyCellDataOpsReal::dot() - (ind1) * (ind2)\n"
+         << "Expected Value = 8.75, Computed Value = "
+         << cdot << std::endl;
+      }
+
+      // deallocate data on hierarchy
+      for (ln = 0; ln < 2; ln++) {
+         hierarchy->getPatchLevel(ln)->deallocatePatchData(cwgt_id);
+         for (iv = 0; iv < NVARS; iv++) {
+            hierarchy->getPatchLevel(ln)->deallocatePatchData(cvindx[iv]);
+         }
+      }
+
+      for (iv = 0; iv < NVARS; iv++) {
+         cvar[iv].setNull();
+      }
+      cwgt.setNull();
+
+      geometry.setNull();
+      hierarchy.setNull();
+      cell_ops.setNull();
+      cwgt_ops.setNull();
+
+      if (num_failures == 0) {
+         tbox::pout << "\nPASSED:  cell hiertest" << std::endl;
+      }
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return num_failures;
+}
+
+/*
+ * Returns true if all the data in the hierarchy is equal to the specified
+ * value.  Returns false otherwise.
+ */
+static bool
+doubleDataSameAsValue(
+   int desc_id,
+   double value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   bool test_passed = true;
+
+   int ln;
+   tbox::Pointer<hier::Patch> patch;
+   for (ln = 0; ln < 2; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         patch = *ip;
+         tbox::Pointer<pdat::CellData<double> > cvdata = patch->getPatchData(
+               desc_id);
+
+         for (pdat::CellIterator c(cvdata->getBox()); c && test_passed; c++) {
+            pdat::CellIndex cell_index = c();
+            if (!tbox::MathUtilities<double>::equalEps((*cvdata)(cell_index),
+                   value)) {
+               test_passed = false;
+            }
+         }
+      }
+   }
+
+   return test_passed;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dataops/cell_patchtest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dataops/cell_patchtest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1275 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program to test cell patch data operations. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <typeinfo>
+// using namespace std;
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fstream>
+#include <iomanip>
+// using namespace std;
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellDataFactory.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/hier/ComponentSelector.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchDataFactory.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/hier/ProcessorMapping.h"
+#include <string>
+
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/hier/VariableContext.h"
+
+#include "SAMRAI/math/PatchCellDataOpsReal.h"
+
+// using namespace std;
+using namespace SAMRAI;
+
+/* Helper function declarations */
+static bool
+doubleDataSameAsValue(
+   int desc_id,
+   double value,
+   tbox::Pointer<hier::Patch> patch);
+
+int main(
+   int argc,
+   char* argv[]) {
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   if (argc < 2) {
+      TBOX_ERROR("Usage: " << argv[0] << " [dimension]");
+   }
+
+   const unsigned short d = static_cast<unsigned short>(atoi(argv[1]));
+   TBOX_ASSERT(d > 0);
+   TBOX_ASSERT(d <= tbox::Dimension::MAXIMUM_DIMENSION_VALUE);
+   const tbox::Dimension dim(d);
+
+   int num_failures = 0;
+
+   const std::string log_fn = std::string("cell_patchtest.")
+      + tbox::Utilities::intToString(dim.getValue(), 1) + "d.log";
+   tbox::PIO::logAllNodes(log_fn);
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+
+      /* Make a dummy mesh domain with one patch */
+      double lo[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      double hi[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+      for (int i = 0; i < dim.getValue(); i++) {
+         lo[i] = 0.0;
+         if (i == 1) {
+            hi[i] = 0.5;
+         } else {
+            hi[i] = 1.0;
+         }
+      }
+      hier::Index indxlo(dim, 0);
+      hier::Index indxhi(dim, 9);
+      indxhi(1) = 4;
+      hier::Box patch_box(indxlo, indxhi);
+      hier::BoxArray grid_domain(dim, 1);
+      grid_domain[0] = patch_box;
+      hier::IntVector ratio(dim, 1);
+
+      geom::CartesianGridGeometry geometry("CartesianGeometry",
+                                           lo, hi, grid_domain);
+      hier::ComponentSelector patch_components;
+
+      hier::MappedBox patch_node(patch_box, hier::LocalId::getZero(), mpi.getRank());
+      tbox::Pointer<hier::Patch> tpatch(
+         new hier::Patch(
+            patch_node,
+            hier::VariableDatabase::getDatabase()->getPatchDescriptor()));
+
+      /* Make a variety of data on the patch. */
+
+      /* Make three contexts for patch */
+      tbox::Pointer<hier::VariableContext> ghost_width_1_context =
+         hier::VariableDatabase::getDatabase()->getContext("ghost_width_1");
+      tbox::Pointer<hier::VariableContext> ghost_width_2_context =
+         hier::VariableDatabase::getDatabase()->getContext("ghost_width_2");
+      tbox::Pointer<hier::VariableContext> ghost_width_3_context =
+         hier::VariableDatabase::getDatabase()->getContext("ghost_width_3");
+
+      /* Make ghost cell IntVectors which are used when variables
+       * and contexts are registered
+       */
+      hier::IntVector nghosts_1(dim, 1);
+      hier::IntVector nghosts_2(dim, 2);
+      hier::IntVector nghosts_3(dim, 3);
+
+      /* Make cell-centered double variable for patch */
+      tbox::Pointer<pdat::CellVariable<double> > cell_double_variable(
+         new pdat::CellVariable<double>(dim, "cell_double_variable", 1));
+
+      int cdvindx[3];
+
+      /*
+       *Register cell-centered double variable and 3 contexts with
+       * hier::VariableDatabase.
+       */
+      cdvindx[0] =
+         hier::VariableDatabase::getDatabase()->registerVariableAndContext(
+            cell_double_variable, ghost_width_1_context, nghosts_1);
+      patch_components.setFlag(cdvindx[0]);
+
+      cdvindx[1] =
+         hier::VariableDatabase::getDatabase()->registerVariableAndContext(
+            cell_double_variable, ghost_width_2_context, nghosts_2);
+      patch_components.setFlag(cdvindx[1]);
+
+      cdvindx[2] =
+         hier::VariableDatabase::getDatabase()->registerVariableAndContext(
+            cell_double_variable, ghost_width_3_context, nghosts_3);
+      patch_components.setFlag(cdvindx[2]);
+
+      /* Make control volume for cell-centered patch variables */
+      tbox::Pointer<hier::VariableContext> ghost_width_0_context =
+         hier::VariableDatabase::getDatabase()->getContext("ghost_width_0");
+      hier::IntVector nghosts_0(dim, 0);
+      tbox::Pointer<pdat::CellVariable<double> > cwgt(
+         new pdat::CellVariable<double>(dim, "cwgt", 1));
+      int cwgt_id =
+         hier::VariableDatabase::getDatabase()->registerVariableAndContext(
+            cwgt, ghost_width_0_context, nghosts_0);
+      patch_components.setFlag(cwgt_id);
+
+      int ccvindx[3];
+
+      ccvindx[0] =
+         hier::VariableDatabase::getDatabase()->registerVariableAndContext(
+            cell_double_variable, ghost_width_1_context, nghosts_1);
+      patch_components.setFlag(ccvindx[0]);
+
+      ccvindx[1] =
+         hier::VariableDatabase::getDatabase()->registerVariableAndContext(
+            cell_double_variable, ghost_width_2_context, nghosts_2);
+      patch_components.setFlag(ccvindx[1]);
+
+      // Make two cell-centered int variables for the patch
+      tbox::Pointer<pdat::CellVariable<int> > cell_int_variable(
+         new pdat::CellVariable<int>(dim, "cell_int_variable", 1));
+
+      int civindx[3];
+
+      civindx[0] =
+         hier::VariableDatabase::getDatabase()->registerVariableAndContext(
+            cell_int_variable, ghost_width_1_context, nghosts_1);
+      patch_components.setFlag(civindx[0]);
+
+      civindx[1] =
+         hier::VariableDatabase::getDatabase()->registerVariableAndContext(
+            cell_int_variable, ghost_width_2_context, nghosts_2);
+      patch_components.setFlag(civindx[1]);
+
+      // Test #1: Check the state of hier::PatchDescriptor
+      int desc_id;
+      std::string var_ctxt_name;
+      bool descriptor_test_passed = true;
+      bool name_error_indx[6];
+      bool factory_error_indx[6];
+      for (desc_id = 0; desc_id < 6; desc_id++) {
+         name_error_indx[desc_id] = false;
+         factory_error_indx[desc_id] = false;
+      }
+      //make strings to be used for comparison during tests
+
+      std::string cell_double_variable1("cell_double_variable##ghost_width_1");
+      std::string cell_double_variable2("cell_double_variable##ghost_width_2");
+      std::string cell_double_variable3("cell_double_variable##ghost_width_3");
+      std::string cwgt_variable0("cwgt##ghost_width_0");
+      std::string cell_int_variable1("cell_int_variable##ghost_width_1");
+      std::string cell_int_variable2("cell_int_variable##ghost_width_2");
+
+      for (desc_id = 0; desc_id < 6; desc_id++) {
+         var_ctxt_name =
+            hier::VariableDatabase::getDatabase()->getPatchDescriptor()->
+            mapIndexToName(desc_id);
+
+         // test flag is used to overcome a compiler bug in GCC which
+         // complained if the the comparison was done inside the if;
+         // must be too complicated for it.
+         bool test;
+
+         switch (desc_id) {
+            case 0:
+               if (var_ctxt_name != cell_double_variable1) {
+                  descriptor_test_passed = false;
+                  name_error_indx[desc_id] = true;
+               }
+
+               test = typeid(*hier::VariableDatabase::getDatabase()
+                             ->getPatchDescriptor()
+                             ->getPatchDataFactory(desc_id)) ==
+                  typeid(pdat::CellDataFactory<double>);
+
+               if (!test) {
+                  descriptor_test_passed = false;
+                  factory_error_indx[desc_id] = true;
+               }
+               break;
+
+            case 1:
+               if (var_ctxt_name != cell_double_variable2) {
+                  descriptor_test_passed = false;
+                  name_error_indx[desc_id] = true;
+               }
+
+               test = typeid(*hier::VariableDatabase::getDatabase()
+                             ->getPatchDescriptor()
+                             ->getPatchDataFactory(desc_id)) ==
+                  typeid(pdat::CellDataFactory<double>);
+               if (!test) {
+                  descriptor_test_passed = false;
+                  factory_error_indx[desc_id] = true;
+               }
+               break;
+
+            case 2:
+               if (var_ctxt_name != cell_double_variable3) {
+                  descriptor_test_passed = false;
+                  name_error_indx[desc_id] = true;
+               }
+               test = typeid(*hier::VariableDatabase::getDatabase()
+                             ->getPatchDescriptor()
+                             ->getPatchDataFactory(desc_id)) ==
+                  typeid(pdat::CellDataFactory<double>);
+
+               if (!test) {
+                  descriptor_test_passed = false;
+                  factory_error_indx[desc_id] = true;
+               }
+               break;
+
+            case 3:
+               if (var_ctxt_name != cwgt_variable0) {
+                  descriptor_test_passed = false;
+                  name_error_indx[desc_id] = true;
+               }
+               test = typeid(*hier::VariableDatabase::getDatabase()
+                             ->getPatchDescriptor()
+                             ->getPatchDataFactory(desc_id)) ==
+                  typeid(pdat::CellDataFactory<double>);
+               if (!test) {
+                  descriptor_test_passed = false;
+                  factory_error_indx[desc_id] = true;
+               }
+               break;
+
+            case 4:
+               if (var_ctxt_name != cell_int_variable1) {
+                  descriptor_test_passed = false;
+                  name_error_indx[desc_id] = true;
+               }
+               test = typeid(*hier::VariableDatabase::getDatabase()
+                             ->getPatchDescriptor()
+                             ->getPatchDataFactory(desc_id)) ==
+                  typeid(pdat::CellDataFactory<int>);
+               if (!test) {
+                  descriptor_test_passed = false;
+                  factory_error_indx[desc_id] = true;
+               }
+               break;
+
+            case 5:
+               if (var_ctxt_name != cell_int_variable2) {
+                  descriptor_test_passed = false;
+                  name_error_indx[desc_id] = true;
+               }
+               test = typeid(*hier::VariableDatabase::getDatabase()
+                             ->getPatchDescriptor()
+                             ->getPatchDataFactory(desc_id)) ==
+                  typeid(pdat::CellDataFactory<int>);
+               if (!test) {
+                  descriptor_test_passed = false;
+                  factory_error_indx[desc_id] = true;
+               }
+               break;
+         }
+      }
+
+      if (!descriptor_test_passed) {
+         num_failures++;
+         tbox::perr << "FAILED: - Test #1: State of PatchDescriptor"
+                    << std::endl;
+
+         for (desc_id = 0; desc_id < 6; desc_id++) {
+            if (name_error_indx[desc_id] == true) {
+               tbox::plog << "Name for index = " << desc_id << " incorrect"
+                          << std::endl;
+            }
+            if (factory_error_indx[desc_id] == true) {
+               tbox::plog << "Factory for index = " << desc_id
+                          << " incorrect" << std::endl;
+            }
+         }
+      }
+
+      // Test #2: Check state of hier::Patch before allocating storage
+      if (tpatch->getBox() != patch_box) {
+         num_failures++;
+         tbox::perr << "FAILED: - Test #2a: hier::Patch box incorrectly set\n"
+                    << "Expected: d_box = " << patch_box << "\n"
+                    << "Set to: d_box = " << tpatch->getBox() << std::endl;
+      }
+      if (tpatch->getLocalId() != patch_node.getLocalId()) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #2b: hier::Patch number incorrectly set\n"
+         << "Expected: d_patch_number = "
+         << patch_node.getLocalId() << "\n"
+         << "Set to: d_patch_number = "
+         << tpatch->getLocalId() << std::endl;
+      }
+/*   HOW TO GET NUMBER OF COMPONENTS ON PATCH
+ *   FOR NOW JUST CHECK THAT getPatchData(0) returns NULL
+ *
+ *   num_failures++;
+ *   tbox::perr << "FAILED: - Test #2c: Number of components allocated incorrect\n"
+ *   << "Expected: number of components = 0\n"
+ *   << "Got: number of components = 0\n"
+ */
+      for (desc_id = 0; desc_id < 6; desc_id++) {
+         if (tpatch->checkAllocated(desc_id)) {
+            num_failures++;
+            tbox::perr << "FAILED: - Test #2c." << desc_id
+                       << ": Descriptor slot " << desc_id
+                       << " should not be allocated but is!" << std::endl;
+         }
+      }
+
+      // Allocate all data on patch
+      tpatch->allocatePatchData(patch_components);
+
+      // Test #3: Check state of hier::Patch after allocating storage
+      if (tpatch->getBox() != patch_box) {
+         num_failures++;
+         tbox::perr << "FAILED: - Test #3a: hier::Patch box incorrectly set\n"
+                    << "Expected: d_box = " << patch_box << "\n"
+                    << "Set to: d_box = " << tpatch->getBox() << std::endl;
+      }
+      if (tpatch->getLocalId() != patch_node.getLocalId()) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #3b: hier::Patch number incorrectly set\n"
+         << "Expected: d_patch_number = "
+         << patch_node.getLocalId() << "\n"
+         << "Set to: d_patch_number = "
+         << tpatch->getLocalId() << std::endl;
+      }
+/* SAME ISSUE AS ABOVE FOR NUMBER OF COMPONENTS */
+      for (desc_id = 0; desc_id < 6; desc_id++) {
+
+         if (!tpatch->checkAllocated(desc_id)) {
+            num_failures++;
+            tbox::perr << "FAILED: - Test #3c.0: Descriptor index " << desc_id
+                       << " should be allocated but isn't!" << std::endl;
+         } else {
+
+            std::string patch_data_name =
+               typeid(*tpatch->getPatchData(desc_id)).name();
+
+            hier::IntVector ghost_width(tpatch->getPatchData(
+                                           desc_id)->getGhostCellWidth());
+
+            switch (desc_id) {
+               case 0:
+                  if (typeid(*tpatch->getPatchData(desc_id)) !=
+                      typeid(pdat::CellData<double>)) {
+                     num_failures++;
+                     tbox::perr
+                     <<
+                     "FAILED: - Test #3c.0.a: hier::Patch Data name incorrect\n"
+                     << "Expected: pdat::CellData<double >\n"
+                     << "Actual: " << patch_data_name << std::endl;
+                  }
+                  if (ghost_width != hier::IntVector(dim, 1)) {
+                     num_failures++;
+                     tbox::perr
+                     << "FAILED: - Test #3c.0.b: Ghost width incorrect\n"
+                     << "Expected: (1,1)\n"
+                     << "Actual: " << ghost_width << std::endl;
+                  }
+                  break;
+
+               case 1:
+                  if (typeid(*tpatch->getPatchData(desc_id)) !=
+                      typeid(pdat::CellData<double>)) {
+                     num_failures++;
+                     tbox::perr
+                     <<
+                     "FAILED: - Test #3c.1.a: hier::Patch Data name incorrect\n"
+                     << "Expected: pdat::CellData<double >\n"
+                     << "Actual: " << patch_data_name << std::endl;
+                  }
+                  if (ghost_width != hier::IntVector(dim, 2)) {
+                     num_failures++;
+                     tbox::perr
+                     << "FAILED: - Test #3c.1.b: Ghost width incorrect\n"
+                     << "Expected: (2,2)\n"
+                     << "Actual: " << ghost_width << std::endl;
+                  }
+                  break;
+
+               case 2:
+                  if (typeid(*tpatch->getPatchData(desc_id)) !=
+                      typeid(pdat::CellData<double>)) {
+                     num_failures++;
+                     tbox::perr
+                     <<
+                     "FAILED: - Test #3c.2.a: hier::Patch Data name incorrect\n"
+                     << "Expected: pdat::CellData<double >\n"
+                     << "Actual: " << patch_data_name << std::endl;
+                  }
+                  if (ghost_width != hier::IntVector(dim, 3)) {
+                     num_failures++;
+                     tbox::perr
+                     << "FAILED: - Test #3c.2.b: Ghost width incorrect\n"
+                     << "Expected: (3,3)\n"
+                     << "Actual: " << ghost_width << std::endl;
+                  }
+                  break;
+
+               case 3:
+                  if (typeid(*tpatch->getPatchData(desc_id)) !=
+                      typeid(pdat::CellData<double>)) {
+                     num_failures++;
+                     tbox::perr
+                     <<
+                     "FAILED: - Test #3c.3.a: hier::Patch Data name incorrect\n"
+                     << "Expected: pdat::CellData<double >\n"
+                     << "Actual: " << patch_data_name << std::endl;
+                  }
+                  if (ghost_width != hier::IntVector(dim, 0)) {
+                     num_failures++;
+                     tbox::perr
+                     << "FAILED: - Test #3c.3.b: Ghost width incorrect\n"
+                     << "Expected: (0,0)\n"
+                     << "Actual: " << ghost_width << std::endl;
+                  }
+                  break;
+
+               case 4:
+                  if (typeid(*tpatch->getPatchData(desc_id)) !=
+                      typeid(pdat::CellData<int>)) {
+                     num_failures++;
+                     tbox::perr
+                     <<
+                     "FAILED: - Test #3c.4.a: hier::Patch Data name incorrect\n"
+                     << "Expected: pdat::CellData<int >\n"
+                     << "Actual: " << patch_data_name << std::endl;
+                  }
+                  if (ghost_width != hier::IntVector(dim, 1)) {
+                     num_failures++;
+                     tbox::perr
+                     << "FAILED: - Test #3c.4.b: Ghost width incorrect\n"
+                     << "Expected: (1,1)\n"
+                     << "Actual: " << ghost_width << std::endl;
+                  }
+                  break;
+
+               case 5:
+                  if (typeid(*tpatch->getPatchData(desc_id)) !=
+                      typeid(pdat::CellData<int>)) {
+                     num_failures++;
+                     tbox::perr
+                     <<
+                     "FAILED: - Test #3c.5.a: hier::Patch Data name incorrect\n"
+                     << "Expected: pdat::CellData<int >\n"
+                     << "Actual: " << patch_data_name << std::endl;
+                  }
+                  if (ghost_width != hier::IntVector(dim, 2)) {
+                     num_failures++;
+                     tbox::perr
+                     << "FAILED: - Test #3c.5.b: Ghost width incorrect\n"
+                     << "Expected: (2,2)\n"
+                     << "Actual: " << ghost_width << std::endl;
+                  }
+                  break;
+
+            }
+         }
+      }
+
+      // Initialize control volume data for cell-centered data
+      const double* dx = geometry.getDx();
+      double cell_vol = dx[0];
+      for (int i = 1; i < dim.getValue(); i++) {
+         cell_vol *= dx[i];
+      }
+
+      tbox::Pointer<pdat::CellData<double> > weight = tpatch->getPatchData(
+            cwgt_id);
+      weight->fillAll(cell_vol);
+
+      // Simple tests of cell data operations
+
+      math::PatchCellDataOpsReal<double> cdops_double;
+
+      // Get pointers to patch data objects
+      tbox::Pointer<pdat::CellData<double> > cddata0 = tpatch->getPatchData(
+            cdvindx[0]);
+      tbox::Pointer<pdat::CellData<double> > cddata1 = tpatch->getPatchData(
+            cdvindx[1]);
+      tbox::Pointer<pdat::CellData<double> > cddata2 = tpatch->getPatchData(
+            cdvindx[2]);
+
+      tbox::Pointer<pdat::CellData<int> > cidata0 = tpatch->getPatchData(
+            civindx[0]);
+      tbox::Pointer<pdat::CellData<int> > cidata1 = tpatch->getPatchData(
+            civindx[1]);
+
+      // Test #4a: math::PatchCellDataOpsReal::setToScalar()
+      // Expected: cddata0 = 0.0
+      cdops_double.setToScalar(cddata0, 0.0, cddata0->getGhostBox());
+      double val0 = 0.0;
+      if (!doubleDataSameAsValue(cdvindx[0], val0, tpatch)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #4a: math::PatchCellDataOpsReal::setToScalar()\n"
+         << "Expected: cddata0 = " << val0 << std::endl;
+         cdops_double.printData(cddata0, cddata0->getGhostBox(), tbox::plog);
+      }
+
+      // Test #4b: math::PatchCellDataOpsReal::setToScalar()
+      // Expected: cddata1 = 1.0
+      cdops_double.setToScalar(cddata1, 1.0, cddata1->getGhostBox());
+      double val1 = 1.0;
+      if (!doubleDataSameAsValue(cdvindx[1], val1, tpatch)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #4b: math::PatchCellDataOpsReal::setToScalar()\n"
+         << "Expected: cddata1 = " << val1 << std::endl;
+         cdops_double.printData(cddata1, cddata1->getGhostBox(), tbox::plog);
+      }
+
+      // Test #4c: math::PatchCellDataOpsReal::setToScalar()
+      // Expected: cddata2 = 2.0
+      cdops_double.setToScalar(cddata2, 2.0, cddata2->getGhostBox());
+      double val2 = 2.0;
+      if (!doubleDataSameAsValue(cdvindx[2], val2, tpatch)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #4b: math::PatchCellDataOpsReal::setToScalar()\n"
+         << "Expected: cddata2 = " << val2 << std::endl;
+         cdops_double.printData(cddata2, cddata2->getGhostBox(), tbox::plog);
+      }
+
+      // Test #5: math::PatchCellDataOpsReal::add()
+      // Expected: cddata0 =  cddata1 + cddata2
+      cdops_double.add(cddata0, cddata1, cddata2, tpatch->getBox());
+      double val_add = 3.0;
+      if (!doubleDataSameAsValue(cdvindx[0], val_add, tpatch)) {
+         num_failures++;
+         tbox::perr << "FAILED: - Test #5: math::PatchCellDataOpsReal::add()\n"
+                    << "Expected: cddata0 = " << val_add << std::endl;
+         cdops_double.printData(cddata0, cddata0->getGhostBox(), tbox::plog);
+      }
+
+      // Test #6: math::PatchCellDataOpsReal::subtract() on [(3,1),(5,2)]
+      // Expected: cddata0 = cddata0 - cddata2
+      hier::Index indx0(dim, 1);
+      hier::Index indx1(dim, 2);
+      indx0(0) = 3;
+      indx1(0) = 5;
+      cdops_double.subtract(cddata0, cddata0, cddata2,
+         hier::Box(indx0, indx1));
+      bool subtract_inbox_test_passed = true;
+      hier::Box inbox(indx0, indx1);
+      double val_inbox = 1.0;
+      double val_not_inbox = 3.0;
+      tbox::Pointer<pdat::CellData<double> > cvdata = tpatch->getPatchData(
+            cdvindx[0]);
+
+      for (pdat::CellIterator c(cvdata->getBox()); c &&
+           subtract_inbox_test_passed; c++) {
+         pdat::CellIndex cell_index = c();
+
+         double value;
+         if (inbox.contains(cell_index)) {
+            value = val_inbox;
+         } else {
+            value = val_not_inbox;
+         }
+
+         if (!tbox::MathUtilities<double>::equalEps((*cvdata)(cell_index),
+                value)) {
+            subtract_inbox_test_passed = false;
+         }
+      }
+
+      if (!subtract_inbox_test_passed) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #6: math::PatchCellDataOpsReal::subtract() on [(3,1),(5,2)]\n"
+         << "Expected: cddata0 = 1.0 in [(3,1),(5,2)]\n"
+         << "          cddata0 = 3.0 outside box\n" << std::endl;
+         cdops_double.printData(cddata0, tpatch->getBox(), tbox::plog);
+      }
+
+      // Test #7: math::PatchCellDataOpsReal::scale()
+      // Expected: cddata0 = 0.4 * cddata2
+      cdops_double.scale(cddata0, 0.4, cddata2, tpatch->getBox());
+      double val_scale = 0.8;
+      if (!doubleDataSameAsValue(cdvindx[0], val_scale, tpatch)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #7: math::PatchCellDataOpsReal::scale()\n"
+         << "Expected: cddata0 = " << val_scale << std::endl;
+         cdops_double.printData(cddata0, cddata0->getGhostBox(), tbox::plog);
+      }
+
+      // Test #8: math::PatchCellDataOpsReal::multiply()
+      // Expected: cddata0 = cddata0 * cddata2
+      cdops_double.multiply(cddata0, cddata0, cddata2, tpatch->getBox());
+      double val_mult = 1.6;
+      if (!doubleDataSameAsValue(cdvindx[0], val_mult, tpatch)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #8: math::PatchCellDataOpsReal::multiply()\n"
+         << "Expected: cddata0 = " << val_mult << std::endl;
+         cdops_double.printData(cddata0, cddata0->getGhostBox(), tbox::plog);
+      }
+
+      // Test #9: math::PatchCellDataOpsReal::divide() in box [(3,1),(5,2)]
+      // Expected: cddata0 = cddata0/cddata2
+      cdops_double.divide(cddata0, cddata0, cddata2,
+         hier::Box(indx0, indx1));
+      bool divide_inbox_test_passed = true;
+      val_inbox = 0.8;
+      val_not_inbox = 1.6;
+      cvdata = tpatch->getPatchData(cdvindx[0]);
+
+      for (pdat::CellIterator cc(cvdata->getBox()); cc &&
+           divide_inbox_test_passed; cc++) {
+         pdat::CellIndex cell_index = cc();
+
+         double value;
+         if (inbox.contains(cell_index)) {
+            value = val_inbox;
+         } else {
+            value = val_not_inbox;
+         }
+
+         if (!tbox::MathUtilities<double>::equalEps((*cvdata)(cell_index),
+                value)) {
+            divide_inbox_test_passed = false;
+         }
+      }
+
+      if (!divide_inbox_test_passed) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #9: math::PatchCellDataOpsReal::divide() on [(3,1),(5,2)]\n"
+         << "Expected: cddata0 = 1.0 in [(3,1),(5,2)]\n"
+         << "          cddata0 = 3.0 outside box\n" << std::endl;
+         cdops_double.printData(cddata0, tpatch->getBox(), tbox::plog);
+      }
+
+      // Test #10: math::PatchCellDataOpsReal::reciprocal()
+      // Expected: cddata0 = 1/cddata2
+      cdops_double.reciprocal(cddata0, cddata2, tpatch->getBox());
+      double val_rec = 0.5;
+      if (!doubleDataSameAsValue(cdvindx[0], val_rec, tpatch)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #10: math::PatchCellDataOpsReal::reciprocal()\n"
+         << "Expected: cddata0 = " << val_rec << std::endl;
+         cdops_double.printData(cddata0, cddata0->getGhostBox(), tbox::plog);
+      }
+
+      // Reset cddata1 and cddata2
+      cdops_double.setToScalar(cddata1, 1.0, cddata1->getGhostBox());
+      cdops_double.setToScalar(cddata2, 2.0, cddata2->getGhostBox());
+
+      // Test #11: math::PatchCellDataOpsReal::linearSum()
+      // Expected: cddata0 = 10*cddata1 + 20*cddata2
+      cdops_double.linearSum(cddata0,
+         10.0,
+         cddata1,
+         20.0,
+         cddata2,
+         tpatch->getBox());
+      double val_linearSum = 50.0;
+      if (!doubleDataSameAsValue(cdvindx[0], val_linearSum, tpatch)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #11: math::PatchCellDataOpsReal::linearSum()\n"
+         << "Expected: cddata0 = " << val_linearSum << std::endl;
+         cdops_double.printData(cddata0, cddata0->getGhostBox(), tbox::plog);
+      }
+
+      cdops_double.setRandomValues(cddata0, 1.0, 0.001, hier::Box(indx0, indx1));
+      tbox::plog << "\ncddata0 = random " << std::endl;
+      cdops_double.printData(cddata0, hier::Box(indx0, indx1), tbox::plog);
+
+      cdops_double.setRandomValues(cddata0, 1.0, 0.001, hier::Box(indx0, indx1));
+      tbox::plog << "\ncddata0 = random " << std::endl;
+      cdops_double.printData(cddata0, hier::Box(indx0, indx1), tbox::plog);
+
+      // Reset cddata0 to 0.0
+      cdops_double.setToScalar(cddata0, 0.0, cddata0->getGhostBox());
+
+      // Test #12: math::PatchCellDataOpsReal::linearSum() on box = [(3,1),(5,2)]
+      // Expected: cddata0 = 10*cddata1 + 20*cddata2 on [(3,1),(5,2)]
+      cdops_double.linearSum(cddata0, 10.0, cddata1, 20.0, cddata2,
+         hier::Box(indx0, indx1));
+      bool restricted_linSum_test_passed = true;
+      val_inbox = 50.0;
+      val_not_inbox = 0.0;
+      cvdata = tpatch->getPatchData(cdvindx[0]);
+
+      for (pdat::CellIterator cci(cvdata->getBox()); cci &&
+           restricted_linSum_test_passed; cci++) {
+         pdat::CellIndex cell_index = cci();
+
+         double value;
+         if (inbox.contains(cell_index)) {
+            value = val_inbox;
+         } else {
+            value = val_not_inbox;
+         }
+
+         if (!tbox::MathUtilities<double>::equalEps((*cvdata)(cell_index),
+                value)) {
+            restricted_linSum_test_passed = false;
+         }
+      }
+
+      if (!restricted_linSum_test_passed) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #12: math::PatchCellDataOpsReal::linearSum()\n"
+         << "Expected: cddata0 = " << val_linearSum
+         << " on box = [(3,1),(5,2)]" << std::endl;
+         cdops_double.printData(cddata0, tpatch->getBox(), tbox::plog);
+      }
+
+// set individual data points and check min/max routines
+      hier::Index newindx0(indx0);
+      hier::Index newindx1(indx0);
+      newindx0(1) = 2;
+      cdops_double.setToScalar(cddata1, 0.0003, hier::Box(indx0, newindx0));
+      newindx0(0) = 1;
+      cdops_double.setToScalar(cddata1, 12345.0, hier::Box(newindx0, newindx0));
+      newindx0(0) = 5;
+      newindx0(1) = 3;
+      newindx1(0) = 5;
+      newindx1(1) = 4;
+      cdops_double.setToScalar(cddata1, 21.0, hier::Box(newindx0, newindx1));
+
+      // Test #13: math::PatchCellDataOpsReal::setToScalar() on box
+      // Expected: cddata1 = 0.0003 in [(3,1),(3,2)]
+      //           cddata1 = 12345.0 in [(1,2),(1,2)]
+      //           cddata1 = 21.0 in [(5,3),(5,4)]
+      //           cddata1 = 1.0 everywhere else
+      bool setToScalar_onBox_test_passed = true;
+      newindx0 = indx0;
+      newindx0(1) = 2;
+      hier::Box box1(indx0, newindx0);
+      newindx0(0) = 1;
+      hier::Box box2(newindx0, newindx0);
+      newindx0(0) = 5;
+      newindx0(1) = 3;
+      newindx1(0) = 5;
+      newindx1(1) = 4;
+      hier::Box box3(newindx0, newindx1);
+      double val_inbox1 = 0.0003;
+      double val_inbox2 = 12345.0;
+      double val_inbox3 = 21.0;
+      val_not_inbox = 1.0;
+
+      cvdata = tpatch->getPatchData(cdvindx[1]);
+      for (pdat::CellIterator ci(cvdata->getBox()); ci &&
+           setToScalar_onBox_test_passed; ci++) {
+         pdat::CellIndex cell_index = ci();
+
+         double value;
+         if (box1.contains(cell_index)) {
+            value = val_inbox1;
+         } else {
+            if (box2.contains(cell_index)) {
+               value = val_inbox2;
+            } else {
+               if (box3.contains(cell_index)) {
+                  value = val_inbox3;
+               } else {
+                  value = val_not_inbox;
+               }
+            }
+         }
+
+         if (!tbox::MathUtilities<double>::equalEps((*cvdata)(cell_index),
+                value)) {
+            setToScalar_onBox_test_passed = false;
+         }
+      }
+
+      if (!setToScalar_onBox_test_passed) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #13: math::PatchCellDataOpsReal::setToScalar() on box\n"
+         << "Expected: cddata1 = 0.0003 in [(3,1),(3,2)]\n"
+         << "          cddata1 = 12345.0 in [(1,2),(1,2)]\n"
+         << "          cddata1 = 21.0 in [(5,3),(5,4)]\n"
+         << "          cddata1 = 1.0 everywhere else\n" << std::endl;
+         cdops_double.printData(cddata1, tpatch->getBox(), tbox::plog);
+      }
+
+      // Test #14: math::PatchCellDataOpsReal::max() on box [(3,1),(7,4)]
+      // Expected: lmax = 21.0
+      hier::Index indx2(dim, 4);
+      indx2(0) = 7;
+      double lmax = cdops_double.max(cddata1, hier::Box(indx0, indx2));
+      if (!tbox::MathUtilities<double>::equalEps(lmax, 21.0)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #14: math::PatchCellDataOpsReal::max() on box [(3,1),(7,4)]\n"
+         << "Expected value = 21.0, Computed value = "
+         << lmax << std::endl;
+      }
+
+      // Test #15: math::PatchCellDataOpsReal::max() in box [(0,0),(9,4)]
+      // Expected: lmax = 12345.0
+      lmax = cdops_double.max(cddata1, tpatch->getBox());
+      if (!tbox::MathUtilities<double>::equalEps(lmax, 12345.0)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #15: math::PatchCellDataOpsReal::max() in box [(0,0),(9,4)]\n"
+         << "Expected value = 12345.0, Computed value = "
+         << lmax << std::endl;
+      }
+
+// check axpy, axmy routines
+
+      // set cddata0, cddata1, cddata2
+      cdops_double.setToScalar(cddata0, 0.0, cddata0->getGhostBox());
+      cdops_double.setToScalar(cddata1, 1.0, cddata1->getGhostBox());
+      cdops_double.setToScalar(cddata2, 2.0, cddata2->getGhostBox());
+
+      // Test #16: math::PatchCellDataOpsReal::axpy()
+      // Expected: cddata0 = 0.5 * 1.0 + 2.0 = 2.5
+      cdops_double.axpy(cddata0, 0.5, cddata1, cddata2, tpatch->getBox());
+      double val_axpy = 2.5;
+      if (!doubleDataSameAsValue(cdvindx[0], val_axpy, tpatch)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #16: math::PatchCellDataOpsReal::axpy()\n"
+         << "Expected: cddata0 = " << val_axpy << std::endl;
+         cdops_double.printData(cddata0, cddata0->getBox(), tbox::plog);
+      }
+
+      // Test #17: math::PatchCellDataOpsReal::axmy()
+      // Expected: cddata0 = 1.5 * 2.0 - 1.0 = 2.0
+      cdops_double.axmy(cddata0, 1.5, cddata2, cddata1, tpatch->getBox());
+      double val_axmy = 2.0;
+      if (!doubleDataSameAsValue(cdvindx[0], val_axmy, tpatch)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #17: math::PatchCellDataOpsReal::axmy()\n"
+         << "Expected: cddata0 = " << val_axmy << std::endl;
+         cdops_double.printData(cddata0, cddata0->getBox(), tbox::plog);
+      }
+
+// Test the norm ops stuff
+
+      // Test #18a: math::PatchCellDataOpsReal::sumControlVolumes() for cddata1
+      // Expected: lsum = 0.5
+      double lsum = cdops_double.sumControlVolumes(cddata1,
+            weight,
+            tpatch->getBox());
+      if (!tbox::MathUtilities<double>::equalEps(lsum, 0.5)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #18a: math::PatchCellDataOpsReal::sumControlVolumes() for cddata1\n"
+         << "Expected value = 0.5, Computed value = "
+         << lsum << std::endl;
+      }
+
+      // Test #18b: math::PatchCellDataOpsReal::sumControlVolumes() for cddata2
+      // Expected: lsum = 0.5
+      lsum = cdops_double.sumControlVolumes(cddata2, weight, tpatch->getBox());
+      if (!tbox::MathUtilities<double>::equalEps(lsum, 0.5)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #18b: math::PatchCellDataOpsReal::sumControlVolumes() for cddata2\n"
+         << "Expected value = 0.5, Computed value = "
+         << lsum << std::endl;
+      }
+
+      // Test #19a: math::PatchCellDataOpsReal::L1norm() for cddata1
+      // Expected: l1norm = 0.5
+      double l1norm = cdops_double.L1Norm(cddata1, tpatch->getBox(), weight);
+      if (!tbox::MathUtilities<double>::equalEps(l1norm, 0.5)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #19a: math::PatchCellDataOpsReal::L1norm() for cddata1\n"
+         << "Expected value = 0.5, Computed value = "
+         << l1norm << std::endl;
+      }
+
+      // Test #19b: math::PatchCellDataOpsReal::L1norm() for cddata2
+      // Expected: l1norm = 1.0
+      l1norm = cdops_double.L1Norm(cddata2, tpatch->getBox(), weight);
+      if (!tbox::MathUtilities<double>::equalEps(l1norm, 1.0)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #19b: math::PatchCellDataOpsReal::L1norm() for cddata2\n"
+         << "Expected value = 1.0, Computed value = "
+         << l1norm << std::endl;
+      }
+
+      // Test #20: math::PatchCellDataOpsReal::L2norm() for cddata2
+      // Expected: l2norm = sqrt(2) = 1.4142135623731
+      double l2norm = cdops_double.L2Norm(cddata2, tpatch->getBox(), weight);
+      if (!tbox::MathUtilities<double>::equalEps(l2norm, 1.4142135623731)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #20: math::PatchCellDataOpsReal::L2norm() for cddata2\n"
+         <<
+         "Expected value = sqrt(2) = 1.4142135623731, Computed value = "
+         << std::setprecision(12) << l2norm << std::endl;
+      }
+
+      // Reset cddata1 to 0.5
+      cdops_double.setToScalar(cddata1, 0.5, tpatch->getBox());
+
+      // Test #21: math::PatchCellDataOpsReal::weightedL2norm() for cddata2
+      // Expected: wl2norm = sqrt(0.5) = 0.70710678118655
+      double wl2norm = cdops_double.weightedL2Norm(cddata2,
+            cddata1,
+            tpatch->getBox(),
+            weight);
+      if (!tbox::MathUtilities<double>::equalEps(wl2norm, 0.70710678118655)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #21: math::PatchCellDataOpsReal::weightedL2norm() for cddata2\n"
+         <<
+         "Expected value = sqrt(0.5) = 0.70710678118655, Computed value = "
+         << wl2norm << std::endl;
+      }
+
+      // Test #22: math::PatchCellDataOpsReal::RMSNorm() for cddata2
+      // Expected: rmsnorm= L2-Norm/sqrt(control volume) = 2.0
+      double rmsnorm = cdops_double.RMSNorm(cddata2, tpatch->getBox(), weight);
+      if (!tbox::MathUtilities<double>::equalEps(rmsnorm, 2.0)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #22: math::PatchCellDataOpsReal::RMSNorm() for cddata2\n"
+         << "Expected value = L2-Norm/sqrt(control volume) = 2.0, "
+         << "Computed value = " << rmsnorm << std::endl;
+      }
+
+      // Test #23: math::PatchCellDataOpsReal::weightedRMSNorm() for cddata2
+      // Expected: wrmsnorm= Weighted L2-Norm/sqrt(control volume) = 1.0
+      double wrmsnorm = cdops_double.weightedRMSNorm(cddata2,
+            cddata1,
+            tpatch->getBox(),
+            weight);
+      if (!tbox::MathUtilities<double>::equalEps(wrmsnorm, 1.0)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #23: math::PatchCellDataOpsReal::weightedRMSNorm() for cddata2\n"
+         <<
+         "Expected value = Weighted L2-Norm/sqrt(control volume) = 1.0, "
+         << "Computed value = " << wrmsnorm << std::endl;
+      }
+
+      // Test #24: math::PatchCellDataOpsReal::maxNorm() for cddata2
+      // Expected: maxnorm = 2.0
+      double maxnorm = cdops_double.maxNorm(cddata2, tpatch->getBox(), weight);
+      if (!tbox::MathUtilities<double>::equalEps(maxnorm, 2.0)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #24: math::PatchCellDataOpsReal::maxNorm() for cddata2\n"
+         << "Expected value = 2.0, Computed value = "
+         << maxnorm << std::endl;
+      }
+
+      // Reset cddata1 and cddata2
+      cdops_double.setToScalar(cddata1, 5.0, cddata1->getGhostBox());
+      cdops_double.setToScalar(cddata2, 3.0, cddata2->getGhostBox());
+
+      // Test #25: math::PatchCellDataOpsReal::dotp() - (cddata1) * (cddata2)
+      // Expected: dotp = 7.5
+      double dotp = cdops_double.dot(cddata1, cddata2, tpatch->getBox(), weight);
+      if (!tbox::MathUtilities<double>::equalEps(dotp, 7.5)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #25: math::PatchCellDataOpsReal::dotp() - (cddata1) * (cddata2)\n"
+         << "Expected value = 7.5, Computed value = "
+         << dotp << std::endl;
+      }
+
+      // Test #26: Check state of hier::Patch before deallocating storage
+      if (tpatch->getBox() != patch_box) {
+         num_failures++;
+         tbox::perr << "FAILED: - Test #26a: hier::Patch box incorrectly set\n"
+                    << "Expected: d_box = " << patch_box << "\n"
+                    << "Set to: d_box = " << tpatch->getBox() << std::endl;
+      }
+      if (tpatch->getLocalId() != patch_node.getLocalId()) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #26b: hier::Patch number incorrectly set\n"
+         << "Expected: d_patch_number = "
+         << patch_node.getLocalId() << "\n"
+         << "Set to: d_patch_number = "
+         << tpatch->getLocalId() << std::endl;
+      }
+/* SAME ISSUE AS ABOVE FOR NUMBER OF COMPONENTS */
+      for (desc_id = 0; desc_id < 6; desc_id++) {
+
+         if (!tpatch->checkAllocated(desc_id)) {
+            num_failures++;
+            tbox::perr << "FAILED: - Test #26c.0: Descriptor index " << desc_id
+                       << " should be allocated but isn't!" << std::endl;
+         } else {
+
+            std::string patch_data_name =
+               typeid(*tpatch->getPatchData(desc_id)).name();
+
+            hier::IntVector ghost_width(tpatch->getPatchData(
+                                           desc_id)->getGhostCellWidth());
+
+            switch (desc_id) {
+               case 0:
+                  if (typeid(*tpatch->getPatchData(desc_id)) !=
+                      typeid(pdat::CellData<double>)) {
+                     num_failures++;
+                     tbox::perr
+                     <<
+                     "FAILED: - Test #26c.0.a: hier::Patch Data name incorrect\n"
+                     << "Expected: pdat::CellData<double >\n"
+                     << "Actual: " << patch_data_name << std::endl;
+                  }
+                  if (ghost_width != hier::IntVector(dim, 1)) {
+                     num_failures++;
+                     tbox::perr
+                     << "FAILED: - Test #26c.0.b: Ghost width incorrect\n"
+                     << "Expected: (1,1)\n"
+                     << "Actual: " << ghost_width << std::endl;
+                  }
+                  break;
+
+               case 1:
+                  if (typeid(*tpatch->getPatchData(desc_id)) !=
+                      typeid(pdat::CellData<double>)) {
+                     num_failures++;
+                     tbox::perr
+                     <<
+                     "FAILED: - Test #26c.1.a: hier::Patch Data name incorrect\n"
+                     << "Expected: pdat::CellData<double >\n"
+                     << "Actual: " << patch_data_name << std::endl;
+                  }
+                  if (ghost_width != hier::IntVector(dim, 2)) {
+                     num_failures++;
+                     tbox::perr
+                     << "FAILED: - Test #26c.1.b: Ghost width incorrect\n"
+                     << "Expected: (2,2)\n"
+                     << "Actual: " << ghost_width << std::endl;
+                  }
+                  break;
+
+               case 2:
+                  if (typeid(*tpatch->getPatchData(desc_id)) !=
+                      typeid(pdat::CellData<double>)) {
+                     num_failures++;
+                     tbox::perr
+                     <<
+                     "FAILED: - Test #26c.2.a: hier::Patch Data name incorrect\n"
+                     << "Expected: pdat::CellData<double >\n"
+                     << "Actual: " << patch_data_name << std::endl;
+                  }
+                  if (ghost_width != hier::IntVector(dim, 3)) {
+                     num_failures++;
+                     tbox::perr
+                     << "FAILED: - Test #26c.2.b: Ghost width incorrect\n"
+                     << "Expected: (3,3)\n"
+                     << "Actual: " << ghost_width << std::endl;
+                  }
+                  break;
+
+               case 3:
+                  if (typeid(*tpatch->getPatchData(desc_id)) !=
+                      typeid(pdat::CellData<double>)) {
+                     num_failures++;
+                     tbox::perr
+                     <<
+                     "FAILED: - Test #26c.3.a: hier::Patch Data name incorrect\n"
+                     << "Expected: pdat::CellData<double >\n"
+                     << "Actual: " << patch_data_name << std::endl;
+                  }
+                  if (ghost_width != hier::IntVector(dim, 0)) {
+                     num_failures++;
+                     tbox::perr
+                     << "FAILED: - Test #26c.3.b: Ghost width incorrect\n"
+                     << "Expected: (0,0)\n"
+                     << "Actual: " << ghost_width << std::endl;
+                  }
+                  break;
+
+               case 4:
+                  if (typeid(*tpatch->getPatchData(desc_id)) !=
+                      typeid(pdat::CellData<int>)) {
+                     num_failures++;
+                     tbox::perr
+                     <<
+                     "FAILED: - Test #26c.4.a: hier::Patch Data name incorrect\n"
+                     << "Expected: pdat::CellData<int >\n"
+                     << "Actual: " << patch_data_name << std::endl;
+                  }
+                  if (ghost_width != hier::IntVector(dim, 1)) {
+                     num_failures++;
+                     tbox::perr
+                     << "FAILED: - Test #26c.4.b: Ghost width incorrect\n"
+                     << "Expected: (1,1)\n"
+                     << "Actual: " << ghost_width << std::endl;
+                  }
+                  break;
+
+               case 5:
+                  if (typeid(*tpatch->getPatchData(desc_id)) !=
+                      typeid(pdat::CellData<int>)) {
+                     num_failures++;
+                     tbox::perr
+                     <<
+                     "FAILED: - Test #26c.5.a: hier::Patch Data name incorrect\n"
+                     << "Expected: pdat::CellData<int >\n"
+                     << "Actual: " << patch_data_name << std::endl;
+                  }
+                  if (ghost_width != hier::IntVector(dim, 2)) {
+                     num_failures++;
+                     tbox::perr
+                     << "FAILED: - Test #26c.5.b: Ghost width incorrect\n"
+                     << "Expected: (2,2)\n"
+                     << "Actual: " << ghost_width << std::endl;
+                  }
+                  break;
+
+            }
+         }
+      }
+
+      // Deallocate all data on patch
+      tpatch->deallocatePatchData(patch_components);
+
+      // Test #27: Check state of hier::Patch after deallocating storage
+      if (tpatch->getBox() != patch_box) {
+         num_failures++;
+         tbox::perr << "FAILED: - Test #27a: hier::Patch box incorrectly set\n"
+                    << "Expected: d_box = " << patch_box << "\n"
+                    << "Set to: d_box = " << tpatch->getBox() << std::endl;
+      }
+      if (tpatch->getLocalId() != patch_node.getLocalId()) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #27b: hier::Patch number incorrectly set\n"
+         << "Expected: d_patch_number = "
+         << patch_node.getLocalId() << "\n"
+         << "Set to: d_patch_number = "
+         << tpatch->getLocalId() << std::endl;
+      }
+/* SAME ISSUE AS ABOVE FOR NUMBER OF COMPONENTS */
+      for (desc_id = 0; desc_id < 6; desc_id++) {
+
+         if (tpatch->checkAllocated(desc_id)) {
+            num_failures++;
+            tbox::perr << "FAILED: - Test #27c: Descriptor index " << desc_id
+                       << " should be deallocated but isn't!" << std::endl;
+         }
+      }
+
+      cwgt.setNull();
+      cell_double_variable.setNull();
+      cell_int_variable.setNull();
+
+      if (num_failures == 0) {
+         tbox::pout << "\nPASSED:  cell patchtest" << std::endl;
+      }
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return num_failures;
+}
+
+/*
+ * Returns true if all the data in the patch is equal to the specified
+ * value.  Returns false otherwise.
+ */
+static bool
+doubleDataSameAsValue(
+   int desc_id,
+   double value,
+   tbox::Pointer<hier::Patch> patch)
+{
+   bool test_passed = true;
+
+   tbox::Pointer<pdat::CellData<double> > cvdata = patch->getPatchData(desc_id);
+
+   for (pdat::CellIterator c(cvdata->getBox()); c && test_passed; c++) {
+      pdat::CellIndex cell_index = c();
+      if (!tbox::MathUtilities<double>::equalEps((*cvdata)(cell_index),
+             value)) {
+         test_passed = false;
+      }
+   }
+
+   return test_passed;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dataops/edge_cplxtest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dataops/edge_cplxtest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,879 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program to test edge-centered complex patch data ops 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/math/HierarchyDataOpsComplex.h"
+#include "SAMRAI/math/HierarchyEdgeDataOpsComplex.h"
+#include "SAMRAI/math/HierarchyDataOpsReal.h"
+#include "SAMRAI/math/HierarchyEdgeDataOpsReal.h"
+#include "SAMRAI/pdat/EdgeIndex.h"
+#include "SAMRAI/pdat/EdgeIterator.h"
+#include "SAMRAI/pdat/EdgeVariable.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/ProcessorMapping.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/hier/VariableContext.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <fstream>
+#include <iomanip>
+
+using namespace SAMRAI;
+
+/* Helper function declarations */
+static bool
+complexDataSameAsValue(
+   int desc_id,
+   dcomplex value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy);
+static bool
+doubleDataSameAsValue(
+   int desc_id,
+   double value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+#define NVARS 4
+
+int main(
+   int argc,
+   char* argv[]) {
+
+   int num_failures = 0;
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   if (argc < 2) {
+      TBOX_ERROR("Usage: " << argv[0] << " [dimension]");
+   }
+
+   const int d = atoi(argv[1]);
+   TBOX_ASSERT(d > 0);
+   TBOX_ASSERT(d <= SAMRAI_MAXIMUM_DIMENSION_VALUE);
+   const tbox::Dimension dim(d);
+
+   if (dim != 2) {
+      TBOX_ERROR("This test code is completed only for 2D!!!");
+   }
+
+   const std::string log_fn = std::string("edge_cplxtest.")
+      + tbox::Utilities::intToString(dim, 1) + "d.log";
+   tbox::PIO::logAllNodes(log_fn);
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+      const tbox::Dimension dim2d(2);
+
+      int ln, iv;
+
+      // Make a dummy hierarchy domain
+      double lo[2] = { 0.0, 0.0 };
+      double hi[2] = { 1.0, 0.5 };
+
+      hier::Box coarse0(hier::Index(0, 0), hier::Index(9, 2));
+      hier::Box coarse1(hier::Index(0, 3), hier::Index(9, 4));
+      hier::Box fine0(hier::Index(4, 4), hier::Index(7, 7));
+      hier::Box fine1(hier::Index(8, 4), hier::Index(13, 7));
+      hier::IntVector ratio(dim2d, 2);
+
+      hier::BoxArray coarse_domain(dim2d, 2);
+      hier::BoxArray fine_boxes(dim2d, 2);
+      coarse_domain[0] = coarse0;
+      coarse_domain[1] = coarse1;
+      fine_boxes[0] = fine0;
+      fine_boxes[1] = fine1;
+
+      tbox::Pointer<geom::CartesianGridGeometry> geometry(
+         new geom::CartesianGridGeometry("CartesianGeometry",
+            lo,
+            hi,
+            coarse_domain));
+
+      tbox::Pointer<hier::PatchHierarchy> hierarchy(
+         new hier::PatchHierarchy("PatchHierarchy", geometry));
+
+      // Note: For these simple tests we allow at most 2 processors.
+      const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+      const int nproc = mpi.getSize();
+      TBOX_ASSERT(nproc < 3);
+
+      const int n_coarse_boxes = coarse_domain.getNumberOfBoxes();
+      const int n_fine_boxes = fine_boxes.getNumberOfBoxes();
+
+      hier::MappedBoxLevel layer0(hier::IntVector(dim, 1));
+      hier::MappedBoxLevel layer1(ratio);
+
+      for (int ib = 0; ib < n_coarse_boxes; ib++) {
+         if (nproc > 1) {
+            if (ib == layer0.getRank()) {
+               layer0.addMappedBox(hier::MappedBox(coarse_domain[ib], ib,
+                     layer0.getRank()));
+            }
+         } else {
+            layer0.addMappedBox(hier::MappedBox(coarse_domain[ib], ib, 0));
+         }
+      }
+
+      for (int ib = 0; ib < n_fine_boxes; ib++) {
+         if (nproc > 1) {
+            if (ib == layer1.getRank()) {
+               layer1.addMappedBox(hier::MappedBox(fine_boxes[ib], ib,
+                     layer1.getRank()));
+            }
+         } else {
+            layer1.addMappedBox(hier::MappedBox(fine_boxes[ib], ib, 0));
+         }
+      }
+
+      hierarchy->makeNewPatchLevel(0, layer0);
+      hierarchy->makeNewPatchLevel(1, layer1);
+
+      // Create instance of hier::Variable database
+      hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+      tbox::Pointer<hier::VariableContext> dummy = variable_db->getContext(
+            "dummy");
+      const hier::IntVector no_ghosts(dim2d, 0);
+
+      // Make some dummy variables and data on the hierarchy
+      tbox::Pointer<pdat::EdgeVariable<dcomplex> > fvar[NVARS];
+      int svindx[NVARS];
+      fvar[0] = new pdat::EdgeVariable<dcomplex>(dim, "fvar0", 1);
+      svindx[0] = variable_db->registerVariableAndContext(
+            fvar[0], dummy, no_ghosts);
+      fvar[1] = new pdat::EdgeVariable<dcomplex>(dim, "fvar1", 1);
+      svindx[1] = variable_db->registerVariableAndContext(
+            fvar[1], dummy, no_ghosts);
+      fvar[2] = new pdat::EdgeVariable<dcomplex>(dim, "fvar2", 1);
+      svindx[2] = variable_db->registerVariableAndContext(
+            fvar[2], dummy, no_ghosts);
+      fvar[3] = new pdat::EdgeVariable<dcomplex>(dim, "fvar3", 1);
+      svindx[3] = variable_db->registerVariableAndContext(
+            fvar[3], dummy, no_ghosts);
+
+      tbox::Pointer<pdat::EdgeVariable<double> >
+      swgt(new pdat::EdgeVariable<double>(dim, "swgt", 1));
+      int swgt_id = variable_db->registerVariableAndContext(
+            swgt, dummy, no_ghosts);
+
+      // allocate data on hierarchy
+      for (ln = 0; ln < 2; ln++) {
+         hierarchy->getPatchLevel(ln)->allocatePatchData(swgt_id);
+         for (iv = 0; iv < NVARS; iv++) {
+            hierarchy->getPatchLevel(ln)->allocatePatchData(svindx[iv]);
+         }
+      }
+
+      tbox::Pointer<math::HierarchyDataOpsComplex> edge_ops(
+         new math::HierarchyEdgeDataOpsComplex(hierarchy, 0, 1));
+      TBOX_ASSERT(!edge_ops.isNull());
+
+      tbox::Pointer<math::HierarchyDataOpsReal<double> > swgt_ops(
+         new math::HierarchyEdgeDataOpsReal<double>(hierarchy, 0, 1));
+
+      tbox::Pointer<hier::Patch> patch;
+      tbox::Pointer<geom::CartesianPatchGeometry> pgeom;
+
+      // Initialize control volume data for edge-centered components
+      hier::Box coarse_fine = fine0 + fine1;
+      coarse_fine.coarsen(ratio);
+      for (ln = 0; ln < 2; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::Pointer<pdat::EdgeData<double> > data;
+            patch = level->getPatch(ip());
+            pgeom = patch->getPatchGeometry();
+            const double* dx = pgeom->getDx();
+            const double edge_vol = dx[0] * dx[1];
+            data = patch->getPatchData(swgt_id);
+            data->fillAll(edge_vol);
+            pdat::EdgeIndex fi(dim);
+            int plo0 = patch->getBox().lower(0);
+            int phi0 = patch->getBox().upper(0);
+            int plo1 = patch->getBox().lower(1);
+            int phi1 = patch->getBox().upper(1);
+            int ic;
+
+            if (ln == 0) {
+               data->fillAll(0.0, (coarse_fine * patch->getBox()));
+
+               if (patch->getLocalId() == 0) {
+                  //bottom edge boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::EdgeIndex(hier::Index(ic, plo1),
+                           pdat::EdgeIndex::X,
+                           pdat::EdgeIndex::Lower);
+                     (*data)(fi) *= 0.5;
+                  }
+                  //left and right edge boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     fi = pdat::EdgeIndex(hier::Index(plo0, ic),
+                           pdat::EdgeIndex::Y,
+                           pdat::EdgeIndex::Lower);
+                     (*data)(fi) *= 0.5;
+                     fi = pdat::EdgeIndex(hier::Index(phi0, ic),
+                           pdat::EdgeIndex::Y,
+                           pdat::EdgeIndex::Upper);
+                     (*data)(fi) *= 0.5;
+                  }
+               } else {
+                  //top and bottom edge boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::EdgeIndex(hier::Index(ic, plo1),
+                           pdat::EdgeIndex::X,
+                           pdat::EdgeIndex::Lower);
+                     (*data)(fi) = 0.0;
+                     fi = pdat::EdgeIndex(hier::Index(ic, phi1),
+                           pdat::EdgeIndex::X,
+                           pdat::EdgeIndex::Upper);
+                     (*data)(fi) *= 0.5;
+                  }
+                  //left and right edge boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     fi = pdat::EdgeIndex(hier::Index(plo0, ic),
+                           pdat::EdgeIndex::Y,
+                           pdat::EdgeIndex::Lower);
+                     (*data)(fi) *= 0.5;
+                     fi = pdat::EdgeIndex(hier::Index(phi0, ic),
+                           pdat::EdgeIndex::Y,
+                           pdat::EdgeIndex::Upper);
+                     (*data)(fi) *= 0.5;
+                  }
+               }
+            } else {
+               if (patch->getLocalId() == 0) {
+                  // top and bottom coarse-fine edge boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::EdgeIndex(hier::Index(ic, plo1),
+                           pdat::EdgeIndex::X,
+                           pdat::EdgeIndex::Lower);
+                     (*data)(fi) *= 1.5;
+                     fi = pdat::EdgeIndex(hier::Index(ic, phi1),
+                           pdat::EdgeIndex::X,
+                           pdat::EdgeIndex::Upper);
+                     (*data)(fi) *= 1.5;
+                  }
+                  //left coarse-fine edge boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     fi = pdat::EdgeIndex(hier::Index(plo0, ic),
+                           pdat::EdgeIndex::Y,
+                           pdat::EdgeIndex::Lower);
+                     (*data)(fi) *= 1.5;
+                  }
+               } else {
+                  // top and bottom coarse-fine edge boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::EdgeIndex(hier::Index(ic, plo1),
+                           pdat::EdgeIndex::X,
+                           pdat::EdgeIndex::Lower);
+                     (*data)(fi) *= 1.5;
+                     fi = pdat::EdgeIndex(hier::Index(ic, phi1),
+                           pdat::EdgeIndex::X,
+                           pdat::EdgeIndex::Upper);
+                     (*data)(fi) *= 1.5;
+                  }
+                  //left and right coarse-fine edge boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     fi = pdat::EdgeIndex(hier::Index(plo0, ic),
+                           pdat::EdgeIndex::Y,
+                           pdat::EdgeIndex::Lower);
+                     (*data)(fi) = 0.0;
+                     fi = pdat::EdgeIndex(hier::Index(phi0, ic),
+                           pdat::EdgeIndex::Y,
+                           pdat::EdgeIndex::Upper);
+                     (*data)(fi) *= 1.5;
+                  }
+               }
+            }
+         }
+      }
+
+      // Test #1: Print out control volume data and compute its integral
+
+      // Test #1a: Check control volume data set properly
+      // Expected: cwgt = 0.01 on coarse (except where finer patch exists) and
+      // 0.0025 on fine level
+/*   bool vol_test_passed = true;
+ *   for (ln = 0; ln < 2; ln++) {
+ *   for (hier::PatchLevel::Iterator ip(hierarchy->getPatchLevel(ln)); ip; ip++) {
+ *   patch = hierarchy->getPatchLevel(ln)->getPatch(ip());
+ *   tbox::Pointer< pdat::CellData<double> > svdata = patch->getPatchData(cwgt_id);
+ *
+ *   for (pdat::CellIterator c(svdata->getBox());c && vol_test_passed;c++) {
+ *   pdat::CellIndex cell_index = c();
+ *
+ *   if (ln == 0) {
+ *   if ((coarse_fine * patch->getBox()).contains(cell_index)) {
+ *   if ( !tbox::MathUtilities<double>::equalEps((*svdata)(cell_index),0.0) ) {
+ *   vol_test_passed = false;
+ *   }
+ *   } else {
+ *   if ( !tbox::MathUtilities<double>::equalEps((*svdata)(cell_index),0.01) ) {
+ *   vol_test_passed = false;
+ *   }
+ *   }
+ *   }
+ *
+ *   if (ln == 1) {
+ *   if ( !tbox::MathUtilities<double>::equalEps((*svdata)(cell_index),0.0025) ) {
+ *   vol_test_passed = false;
+ *   }
+ *   }
+ *   }
+ *   }
+ *   }
+ *   if (!vol_test_passed) {
+ *   num_failures++;
+ *   tbox::perr << "FAILED: - Test #1a: Check control volume data set properly" << std::endl;
+ *   cwgt_ops->printData(cwgt_id, tbox::plog);
+ *   }
+ */
+/*   tbox::plog << "edge control volume data" << std::endl;
+ *   swgt_ops->printData(swgt_id, tbox::plog);
+ */
+
+      // Test #1b: math::HierarchyEdgeDataOpsComplex::sumControlVolumes()
+      // Expected: norm = 1.0
+      double norm =
+         edge_ops->sumControlVolumes(svindx[0], swgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(norm, 1.0)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #1b: math::HierarchyEdgeDataOpsComplex::sumControlVolumes()\n"
+         << "Expected value = 1.0 , Computed value = "
+         << norm << std::endl;
+      }
+
+      // Test #2: math::HierarchyEdgeDataOpsComplex::numberOfEntries()
+      // Expected: num_data_points = 209
+      int num_data_points = edge_ops->numberOfEntries(svindx[0]);
+      if (num_data_points != 209) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #2: math::HierarchyEdgeDataOpsComplex::numberOfEntries()\n"
+         << "Expected value = 209 , Computed value = "
+         << num_data_points << std::endl;
+      }
+
+      // Test #3a: math::HierarchyEdgeDataOpsComplex::setToScalar()
+      // Expected: v0 = (2.0,1.5)
+      dcomplex val0 = dcomplex(2.0, 1.5);
+      edge_ops->setToScalar(svindx[0], val0);
+      if (!complexDataSameAsValue(svindx[0], val0, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #3a: math::HierarchyEdgeDataOpsComplex::setToScalar()\n"
+         << "Expected: v0 = " << val0 << std::endl;
+         edge_ops->printData(svindx[0], tbox::plog);
+      }
+
+      // Test #3b: math::HierarchyEdgeDataOpsComplex::setToScalar()
+      // Expected: v1 = (4.0, 3.0)
+      dcomplex val1(4.0, 3.0);
+      edge_ops->setToScalar(svindx[1], dcomplex(4.0, 3.0));
+      if (!complexDataSameAsValue(svindx[1], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #3b: math::HierarchyEdgeDataOpsComplex::setToScalar()\n"
+         << "Expected: v1 = " << val1 << std::endl;
+         edge_ops->printData(svindx[1], tbox::plog);
+      }
+
+      // Test #4: math::HierarchyEdgeDataOpsComplex::copyData()
+      // Expected: v2 = v1 = (4.0, 3.0)
+      edge_ops->copyData(svindx[2], svindx[1]);
+      if (!complexDataSameAsValue(svindx[2], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #4: math::HierarchyEdgeDataOpsComplex::copyData()\n"
+         << "Expected: v2 = " << val1 << std::endl;
+         edge_ops->printData(svindx[2], tbox::plog);
+      }
+
+      // Test #5: math::HierarchyEdgeDataOpsComplex::swapData()
+      // Expected:  v0 = (4.0, 3.0), v1 = (2.0,1.5)
+      edge_ops->swapData(svindx[0], svindx[1]);
+      if (!complexDataSameAsValue(svindx[0], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #5a: math::HierarchyEdgeDataOpsComplex::swapData()\n"
+         << "Expected: v0 = " << val1 << std::endl;
+         edge_ops->printData(svindx[0], tbox::plog);
+      }
+      if (!complexDataSameAsValue(svindx[1], val0, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #5b: math::HierarchyEdgeDataOpsComplex::swapData()\n"
+         << "Expected: v1 = " << val0 << std::endl;
+         edge_ops->printData(svindx[1], tbox::plog);
+      }
+
+      // Test #6: math::HierarchyEdgeDataOpsComplex::scale()
+      // Expected:  v2 = 0.25 * v2 = (1.0,0.75)
+      edge_ops->scale(svindx[2], 0.25, svindx[2]);
+      dcomplex val_scale(1.0, 0.75);
+      if (!complexDataSameAsValue(svindx[2], val_scale, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #6: math::HierarchyEdgeDataOpsComplex::scale()\n"
+         << "Expected: v2 = " << val_scale << std::endl;
+         edge_ops->printData(svindx[2], tbox::plog);
+      }
+
+      // Test #7: math::HierarchyEdgeDataOpsComplex::add()
+      // Expected:  v3 = v0 + v1 = (6.0, 4.5)
+      edge_ops->add(svindx[3], svindx[0], svindx[1]);
+      dcomplex val_add(6.0, 4.5);
+      if (!complexDataSameAsValue(svindx[3], val_add, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #7: math::HierarchyEdgeDataOpsComplex::add()\n"
+         << "Expected: v3 = " << val_add << std::endl;
+         edge_ops->printData(svindx[3], tbox::plog);
+      }
+
+      // Reset v0: v0 = (0.0,4.5)
+      edge_ops->setToScalar(svindx[0], dcomplex(0.0, 4.5));
+
+      // Test #8: math::HierarchyEdgeDataOpsComplex::subtract()
+      // Expected:  v1 = v3 - v0 = (6.0,0.0)
+      edge_ops->subtract(svindx[1], svindx[3], svindx[0]);
+      dcomplex val_sub(6.0, 0.0);
+      if (!complexDataSameAsValue(svindx[1], val_sub, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #8: math::HierarchyEdgeDataOpsComplex::subtract()\n"
+         << "Expected: v1 = " << val_sub << std::endl;
+         edge_ops->printData(svindx[1], tbox::plog);
+      }
+
+      // Test #9a: math::HierarchyEdgeDataOpsComplex::addScalar()
+      // Expected:  v1 = v1 + (0.0,-4.0) = (6.0,-4.0)
+      edge_ops->addScalar(svindx[1], svindx[1], dcomplex(0.0, -4.0));
+      dcomplex val_addScalar(6.0, -4.0);
+      if (!complexDataSameAsValue(svindx[1], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #9a: math::HierarchyEdgeDataOpsComplex::addScalar()\n"
+         << "Expected: v1 = " << val_addScalar << std::endl;
+         edge_ops->printData(svindx[1], tbox::plog);
+      }
+
+      // Test #9b: math::HierarchyEdgeDataOpsComplex::addScalar()
+      // Expected:  v2 = v2 + (0.0,0.25) = (1.0,1.0)
+      edge_ops->addScalar(svindx[2], svindx[2], dcomplex(0.0, 0.25));
+      val_addScalar = dcomplex(1.0, 1.0);
+      if (!complexDataSameAsValue(svindx[2], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #9b: math::HierarchyEdgeDataOpsComplex::addScalar()\n"
+         << "Expected: v2 = " << val_addScalar << std::endl;
+         edge_ops->printData(svindx[2], tbox::plog);
+      }
+
+      // Test #9c: math::HierarchyEdgeDataOpsComplex::addScalar()
+      // Expected:  v2 = v2 + (3.0,-4.0) = (4.0,-3.0)
+      edge_ops->addScalar(svindx[2], svindx[2], dcomplex(3.0, -4.0));
+      val_addScalar = dcomplex(4.0, -3.0);
+      if (!complexDataSameAsValue(svindx[2], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #9c: math::HierarchyEdgeDataOpsComplex::addScalar()\n"
+         << "Expected: v2 = " << val_addScalar << std::endl;
+         edge_ops->printData(svindx[2], tbox::plog);
+      }
+
+      // Rest v3:  v3 = (0.5, 0.0)
+      edge_ops->setToScalar(svindx[3], dcomplex(0.5, 0.0));
+
+      // Test #10: math::HierarchyEdgeDataOpsComplex::multiply()
+      // Expected:  v1 = v3 * v1 = (3.0,-2.0)
+      edge_ops->multiply(svindx[1], svindx[3], svindx[1]);
+      dcomplex val_mult(3.0, -2.0);
+      if (!complexDataSameAsValue(svindx[1], val_mult, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #10: math::HierarchyEdgeDataOpsComplex::multiply()\n"
+         << "Expected: v1 = " << val_mult << std::endl;
+         edge_ops->printData(svindx[1], tbox::plog);
+      }
+
+      // Test #11: math::HierarchyEdgeDataOpsComplex::divide()
+      // Expected:  v0 = v2 / v1 = (1.3846153846154,-0.076923076923077)
+      edge_ops->divide(svindx[0], svindx[2], svindx[1]);
+      dcomplex val_div(1.3846153846154, -0.076923076923077);
+      if (!complexDataSameAsValue(svindx[0], val_div, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #11: math::HierarchyEdgeDataOpsComplex::divide()\n"
+         << "Expected: v0 = " << val_div << std::endl;
+         edge_ops->printData(svindx[0], tbox::plog);
+      }
+
+      // Test #12: math::HierarchyEdgeDataOpsComplex::reciprocal()
+      // Expected:  v1 = 1 / v1 = (0.23076923076923, 0.15384615384615)
+      edge_ops->reciprocal(svindx[1], svindx[1]);
+      dcomplex val_rec(0.23076923076923, 0.15384615384615);
+      if (!complexDataSameAsValue(svindx[1], val_rec, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #12: math::HierarchyEdgeDataOpsComplex::reciprocal()\n"
+         << "Expected: v1 = " << val_rec << std::endl;
+         edge_ops->printData(svindx[1], tbox::plog);
+      }
+
+      // Test #13:  Place some bogus values on coarse level
+      tbox::Pointer<pdat::EdgeData<dcomplex> > sdata;
+
+      // set values
+
+      tbox::Pointer<hier::PatchLevel> level_zero = hierarchy->getPatchLevel(0);
+      for (hier::PatchLevel::Iterator ip(level_zero); ip; ip++) {
+         patch = level_zero->getPatch(ip());
+         sdata = patch->getPatchData(svindx[2]);
+         hier::Index index0(2, 2);
+         hier::Index index1(5, 3);
+         if (patch->getBox().contains(index0)) {
+            (*sdata)(pdat::EdgeIndex(index0, pdat::EdgeIndex::Y,
+                        pdat::EdgeIndex::Lower), 0) = dcomplex(100.0, -50.0);
+         }
+         if (patch->getBox().contains(index1)) {
+            (*sdata)(pdat::EdgeIndex(index1, pdat::EdgeIndex::Y,
+                        pdat::EdgeIndex::Upper), 0) = dcomplex(-1000.0, 20.0);
+         }
+      }
+
+      // check values
+      bool bogus_value_test_passed = true;
+      for (hier::PatchLevel::Iterator ipp(level_zero); ipp; ipp++) {
+         patch = level_zero->getPatch(ipp());
+         sdata = patch->getPatchData(svindx[2]);
+         pdat::EdgeIndex index0(hier::Index(2,
+                                   2), pdat::EdgeIndex::Y,
+                                pdat::EdgeIndex::Lower);
+         pdat::EdgeIndex index1(hier::Index(5,
+                                   3), pdat::EdgeIndex::Y,
+                                pdat::EdgeIndex::Upper);
+
+         // check X axis data
+         for (pdat::EdgeIterator c(sdata->getBox(), pdat::EdgeIndex::X);
+              c && bogus_value_test_passed;
+              c++) {
+            pdat::EdgeIndex edge_index = c();
+
+            if (!tbox::MathUtilities<dcomplex>::equalEps((*sdata)(edge_index),
+                   dcomplex(4.0, -3.0))) {
+               bogus_value_test_passed = false;
+            }
+         }
+
+         // check Y axis data
+         for (pdat::EdgeIterator cc(sdata->getBox(), pdat::EdgeIndex::Y);
+              cc && bogus_value_test_passed;
+              cc++) {
+            pdat::EdgeIndex edge_index = cc();
+
+            if (edge_index == index0) {
+               if (!tbox::MathUtilities<dcomplex>::equalEps((*sdata)(edge_index),
+                      dcomplex(100.0, -50.0))) {
+                  bogus_value_test_passed = false;
+               }
+            } else {
+               if (edge_index == index1) {
+                  if (!tbox::MathUtilities<dcomplex>::equalEps((*sdata)(
+                            edge_index),
+                         dcomplex(-1000.0, 20.0))) {
+                     bogus_value_test_passed = false;
+                  }
+               } else {
+                  if (!tbox::MathUtilities<dcomplex>::equalEps((*sdata)(
+                            edge_index),
+                         dcomplex(4.0, -3.0))) {
+                     bogus_value_test_passed = false;
+                  }
+               }
+            }
+         }
+      }
+      if (!bogus_value_test_passed) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #13:  Place some bogus values on coarse level"
+         << std::endl;
+         edge_ops->printData(svindx[2], tbox::plog);
+      }
+
+      // Test norms on patch data with svindx[2] on hierarchy with bogus values
+
+      // Test #14: math::HierarchyEdgeDataOpsComplex::L1Norm() - w/o control weight
+      // Expected:  bogus_l1_norm = 2217.003379
+      double bogus_l1_norm = edge_ops->L1Norm(svindx[2]);
+      if (!tbox::MathUtilities<double>::equalEps(bogus_l1_norm, 2217.003379)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #14: math::HierarchyEdgeDataOpsComplex::L1Norm()"
+         << " - w/o control weight\n"
+         << "Expected value = 2217.003379, Computed value = "
+         << std::setprecision(12) << bogus_l1_norm << std::endl;
+      }
+
+      // Test #15: math::HierarchyEdgeDataOpsComplex::L1Norm() - w/control weight
+      // Expected:  correct_l1_norm = 5.0
+      double correct_l1_norm = edge_ops->L1Norm(svindx[2], swgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(correct_l1_norm, 5.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #15: math::HierarchyEdgeDataOpsComplex::L1Norm()"
+         << " - w/control weight\n"
+         << "Expected value = 5.0, Computed value = "
+         << correct_l1_norm << std::endl;
+      }
+
+      // Test #16: math::HierarchyEdgeDataOpsComplex::L2Norm()
+      // Expected:  l2_norm = 5.0
+      double l2_norm = edge_ops->L2Norm(svindx[2], swgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(l2_norm, 5.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #16: math::HierarchyEdgeDataOpsComplex::L2Norm()\n"
+         << "Expected value = 5.0, Computed value = "
+         << l2_norm << std::endl;
+      }
+
+      // Test #17: math::HierarchyEdgeDataOpsComplex::maxNorm() - w/o control weight
+      // Expected:  bogus_max_norm = 1000.19998
+      double bogus_max_norm = edge_ops->maxNorm(svindx[2]);
+      if (!tbox::MathUtilities<double>::equalEps(bogus_max_norm, 1000.19998)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #17: math::HierarchyEdgeDataOpsComplex::maxNorm()"
+         << " - w/o control weight\n"
+         << "Expected value = 1000.19998, Computed value = "
+         << bogus_max_norm << std::endl;
+      }
+
+      // Test #18: math::HierarchyEdgeDataOpsComplex::maxNorm() - w/control weight
+      // Expected:  max_norm = 5.0
+      double max_norm = edge_ops->maxNorm(svindx[2], swgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(max_norm, 5.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #18: math::HierarchyEdgeDataOpsComplex::maxNorm()"
+         << " - w/control weight\n"
+         << "Expected value = 5.0, Computed value = "
+         << max_norm << std::endl;
+      }
+
+      // Reset data and test sums, axpy's
+      edge_ops->setToScalar(svindx[0], dcomplex(1.0, -3.0));
+      edge_ops->setToScalar(svindx[1], dcomplex(2.5, 3.0));
+      edge_ops->setToScalar(svindx[2], dcomplex(7.0, 0.0));
+
+      // Test #19: math::HierarchyEdgeDataOpsComplex::linearSum()
+      // Expected:  v3 = (2.0,5.0)
+      edge_ops->linearSum(svindx[3],
+         dcomplex(2.0, 0.0), svindx[1], dcomplex(0.0, -1.0), svindx[0]);
+      dcomplex val_linearSum(2.0, 5.0);
+      if (!complexDataSameAsValue(svindx[3], val_linearSum, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #19: math::HierarchyEdgeDataOpsComplex::linearSum()\n"
+         << "Expected: v3 = " << val_linearSum << std::endl;
+         edge_ops->printData(svindx[3], tbox::plog);
+      }
+
+      // Test #20: math::HierarchyEdgeDataOpsComplex::axmy()
+      // Expected:  v3 = (6.5,12.0)
+      edge_ops->axmy(svindx[3], 3.0, svindx[1], svindx[0]);
+      dcomplex val_axmy(6.5, 12.0);
+      if (!complexDataSameAsValue(svindx[3], val_axmy, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #20: math::HierarchyEdgeDataOpsComplex::axmy()\n"
+         << "Expected: v3 = " << val_axmy << std::endl;
+         edge_ops->printData(svindx[3], tbox::plog);
+      }
+
+      // Test #21a: math::HierarchyEdgeDataOpsComplex::dot() - (ind2) * (ind1)
+      // Expected:  cdot = (17.5,-21.0)
+      dcomplex cdot = edge_ops->dot(svindx[2], svindx[1], swgt_id);
+      dcomplex ans_2_dot_1(17.5, -21.0);
+      if (!tbox::MathUtilities<dcomplex>::equalEps(cdot, ans_2_dot_1)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #21a: math::HierarchyEdgeDataOpsComplex::dot() - (ind2) * (ind1)\n"
+         << "Expected value = (17.5,-21.0), Computed value = "
+         << cdot << std::endl;
+      }
+
+      // Test #21b: math::HierarchyEdgeDataOpsComplex::dot() - (ind1) * (ind2)
+      // Expected:  cdot = (17.5,-1.0)
+      dcomplex cdot2 = edge_ops->dot(svindx[1], svindx[2], swgt_id);
+      dcomplex ans_1_dot_2(17.5, 21.0);
+      if (!tbox::MathUtilities<dcomplex>::equalEps(cdot2, ans_1_dot_2)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #21b: math::HierarchyEdgeDataOpsComplex::dot() - (ind1) * (ind2)\n"
+         << "Expected value = (17.5,21.0), Computed value = "
+         << cdot2 << std::endl;
+      }
+
+      // Test #22: math::HierarchyEdgeDataOpsComplex::abs()
+      // Expected:  abs(v0) = 5.0
+      edge_ops->setToScalar(svindx[0], dcomplex(4.0, -3.0));
+      edge_ops->abs(swgt_id, svindx[0]);
+      if (!doubleDataSameAsValue(swgt_id, 5.0, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #22: math::HierarchyEdgeDataOpsComplex::abs()\n"
+         << "Expected: abs(v0) = 5.0" << std::endl;
+         swgt_ops->printData(swgt_id, tbox::plog);
+      }
+
+      // deallocate data on hierarchy
+      for (ln = 0; ln < 2; ln++) {
+         hierarchy->getPatchLevel(ln)->deallocatePatchData(swgt_id);
+         for (iv = 0; iv < NVARS; iv++) {
+            hierarchy->getPatchLevel(ln)->deallocatePatchData(svindx[iv]);
+         }
+      }
+
+      for (iv = 0; iv < NVARS; iv++) {
+         fvar[iv].setNull();
+      }
+      swgt.setNull();
+
+      geometry.setNull();
+      hierarchy.setNull();
+      edge_ops.setNull();
+      swgt_ops.setNull();
+
+      if (num_failures == 0) {
+         tbox::pout << "\nPASSED:  edge cplxtest" << std::endl;
+      }
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return num_failures;
+}
+
+/*
+ * Returns true if all the data in the hierarchy is equal to the specified
+ * value.  Returns false otherwise.
+ */
+static bool
+complexDataSameAsValue(
+   int desc_id,
+   dcomplex value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   bool test_passed = true;
+
+   int ln;
+   tbox::Pointer<hier::Patch> patch;
+   for (ln = 0; ln < 2; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         patch = level->getPatch(ip());
+         tbox::Pointer<pdat::EdgeData<dcomplex> > svdata = patch->getPatchData(
+               desc_id);
+
+         for (pdat::EdgeIterator c(svdata->getBox(), 1); c && test_passed;
+              c++) {
+            pdat::EdgeIndex edge_index = c();
+            if (!tbox::MathUtilities<dcomplex>::equalEps((*svdata)(edge_index),
+                   value)) {
+               test_passed = false;
+            }
+         }
+      }
+   }
+
+   return test_passed;
+}
+
+/*
+ * Returns true if all the data in the hierarchy is equal to the specified
+ * value.  Returns false otherwise.
+ */
+static bool
+doubleDataSameAsValue(
+   int desc_id,
+   double value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   bool test_passed = true;
+
+   int ln;
+   tbox::Pointer<hier::Patch> patch;
+   for (ln = 0; ln < 2; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         patch = level->getPatch(ip());
+         tbox::Pointer<pdat::EdgeData<double> > svdata = patch->getPatchData(
+               desc_id);
+
+         for (pdat::EdgeIterator c(svdata->getBox(), 1); c && test_passed;
+              c++) {
+            pdat::EdgeIndex edge_index = c();
+            if (!tbox::MathUtilities<double>::equalEps((*svdata)(edge_index),
+                   value)) {
+               test_passed = false;
+            }
+         }
+      }
+   }
+
+   return test_passed;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dataops/edge_hiertest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dataops/edge_hiertest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,813 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program to test edge-centered patch data ops 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fstream>
+#include <iomanip>
+// using namespace std;
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/math/HierarchyDataOpsComplex.h"
+#include "SAMRAI/math/HierarchyEdgeDataOpsComplex.h"
+#include "SAMRAI/math/HierarchyDataOpsReal.h"
+#include "SAMRAI/math/HierarchyEdgeDataOpsReal.h"
+#include "SAMRAI/pdat/EdgeIndex.h"
+#include "SAMRAI/pdat/EdgeIterator.h"
+#include "SAMRAI/pdat/EdgeVariable.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/ProcessorMapping.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/hier/VariableContext.h"
+
+using namespace SAMRAI;
+
+/* Helper function declarations */
+static bool
+doubleDataSameAsValue(
+   int desc_id,
+   double value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+#define NVARS 4
+
+int main(
+   int argc,
+   char* argv[]) {
+
+   int num_failures = 0;
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   if (argc < 2) {
+      TBOX_ERROR("Usage: " << argv[0] << " [dimension]");
+   }
+
+   const unsigned short d = static_cast<unsigned short>(atoi(argv[1]));
+   TBOX_ASSERT(d > 0);
+   TBOX_ASSERT(d <= tbox::Dimension::MAXIMUM_DIMENSION_VALUE);
+   const tbox::Dimension dim(d);
+
+   if (dim != tbox::Dimension(2)) {
+      TBOX_ERROR("This test code is completed only for 2D!!!");
+   }
+
+   const std::string log_fn = std::string("edge_hiertest.")
+      + tbox::Utilities::intToString(dim.getValue(), 1) + "d.log";
+   tbox::PIO::logAllNodes(log_fn);
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+
+      const tbox::Dimension dim2d(2);
+
+      int ln, iv;
+
+      // Make a dummy hierarchy domain
+      double lo[2] = { 0.0, 0.0 };
+      double hi[2] = { 1.0, 0.5 };
+
+      hier::Box coarse0(hier::Index(0, 0), hier::Index(9, 2));
+      hier::Box coarse1(hier::Index(0, 3), hier::Index(9, 4));
+      hier::Box fine0(hier::Index(4, 4), hier::Index(7, 7));
+      hier::Box fine1(hier::Index(8, 4), hier::Index(13, 7));
+      hier::IntVector ratio(dim2d, 2);
+
+      hier::BoxArray coarse_domain(dim2d, 2);
+      hier::BoxArray fine_boxes(dim2d, 2);
+      coarse_domain[0] = coarse0;
+      coarse_domain[1] = coarse1;
+      fine_boxes[0] = fine0;
+      fine_boxes[1] = fine1;
+
+      tbox::Pointer<geom::CartesianGridGeometry> geometry(
+         new geom::CartesianGridGeometry("CartesianGeometry",
+            lo,
+            hi,
+            coarse_domain));
+
+      tbox::Pointer<hier::PatchHierarchy> hierarchy(
+         new hier::PatchHierarchy("PatchHierarchy", geometry));
+
+      hierarchy->setMaxNumberOfLevels(2);
+      hierarchy->setRatioToCoarserLevel(ratio, 1);
+
+      // Note: For these simple tests we allow at most 2 processors.
+      const int nproc = mpi.getSize();
+      TBOX_ASSERT(nproc < 3);
+
+      const int n_coarse_boxes = coarse_domain.getNumberOfBoxes();
+      const int n_fine_boxes = fine_boxes.getNumberOfBoxes();
+
+      hier::MappedBoxLevel layer0(hier::IntVector(dim, 1));
+      hier::MappedBoxLevel layer1(ratio);
+
+      for (int ib = 0; ib < n_coarse_boxes; ib++) {
+         if (nproc > 1) {
+            if (ib == layer0.getRank()) {
+               layer0.addMappedBox(hier::MappedBox(coarse_domain[ib], hier::LocalId(ib),
+                     layer0.getRank()));
+            }
+         } else {
+            layer0.addMappedBox(hier::MappedBox(coarse_domain[ib], hier::LocalId(ib), 0));
+         }
+      }
+
+      for (int ib = 0; ib < n_fine_boxes; ib++) {
+         if (nproc > 1) {
+            if (ib == layer1.getRank()) {
+               layer1.addMappedBox(hier::MappedBox(fine_boxes[ib], hier::LocalId(ib),
+                     layer1.getRank()));
+            }
+         } else {
+            layer1.addMappedBox(hier::MappedBox(fine_boxes[ib], hier::LocalId(ib), 0));
+         }
+      }
+
+      hierarchy->makeNewPatchLevel(0, layer0);
+      hierarchy->makeNewPatchLevel(1, layer1);
+
+      // Create instance of hier::Variable database
+      hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+      tbox::Pointer<hier::VariableContext> dummy = variable_db->getContext(
+            "dummy");
+      const hier::IntVector no_ghosts(dim2d, 0);
+
+      // Make some dummy variables and data on the hierarchy
+      tbox::Pointer<pdat::EdgeVariable<double> > fvar[NVARS];
+      int svindx[NVARS];
+      fvar[0] = new pdat::EdgeVariable<double>(dim2d, "fvar0", 1);
+      svindx[0] = variable_db->registerVariableAndContext(
+            fvar[0], dummy, no_ghosts);
+      fvar[1] = new pdat::EdgeVariable<double>(dim2d, "fvar1", 1);
+      svindx[1] = variable_db->registerVariableAndContext(
+            fvar[1], dummy, no_ghosts);
+      fvar[2] = new pdat::EdgeVariable<double>(dim2d, "fvar2", 1);
+      svindx[2] = variable_db->registerVariableAndContext(
+            fvar[2], dummy, no_ghosts);
+      fvar[3] = new pdat::EdgeVariable<double>(dim2d, "fvar3", 1);
+      svindx[3] = variable_db->registerVariableAndContext(
+            fvar[3], dummy, no_ghosts);
+
+      tbox::Pointer<pdat::EdgeVariable<double> >
+      swgt(new pdat::EdgeVariable<double>(dim2d, "swgt", 1));
+      int swgt_id = variable_db->registerVariableAndContext(
+            swgt, dummy, no_ghosts);
+
+      // allocate data on hierarchy
+      for (ln = 0; ln < 2; ln++) {
+         hierarchy->getPatchLevel(ln)->allocatePatchData(swgt_id);
+         for (iv = 0; iv < NVARS; iv++) {
+            hierarchy->getPatchLevel(ln)->allocatePatchData(svindx[iv]);
+         }
+      }
+
+      tbox::Pointer<math::HierarchyDataOpsReal<double> > edge_ops(
+         new math::HierarchyEdgeDataOpsReal<double>(hierarchy, 0, 1));
+      TBOX_ASSERT(!edge_ops.isNull());
+
+      tbox::Pointer<math::HierarchyDataOpsReal<double> > swgt_ops(
+         new math::HierarchyEdgeDataOpsReal<double>(hierarchy, 0, 1));
+
+      tbox::Pointer<hier::Patch> patch;
+      tbox::Pointer<geom::CartesianPatchGeometry> pgeom;
+
+      // Initialize control volume data for edge-centered components
+      hier::Box coarse_fine = fine0 + fine1;
+      coarse_fine.coarsen(ratio);
+      for (ln = 0; ln < 2; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::Pointer<pdat::EdgeData<double> > data;
+            patch = *ip;
+            pgeom = patch->getPatchGeometry();
+            const double* dx = pgeom->getDx();
+            const double edge_vol = dx[0] * dx[1];
+            data = patch->getPatchData(swgt_id);
+            data->fillAll(edge_vol);
+            pdat::EdgeIndex fi(dim);
+            int plo0 = patch->getBox().lower(0);
+            int phi0 = patch->getBox().upper(0);
+            int plo1 = patch->getBox().lower(1);
+            int phi1 = patch->getBox().upper(1);
+            int ic;
+
+            if (ln == 0) {
+               data->fillAll(0.0, (coarse_fine * patch->getBox()));
+
+               if (patch->getLocalId() == 0) {
+                  //bottom edge boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::EdgeIndex(hier::Index(ic,
+                              plo1), pdat::EdgeIndex::X, pdat::EdgeIndex::Lower);
+                     (*data)(fi) *= 0.5;
+                  }
+                  //left and right edge boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     fi = pdat::EdgeIndex(hier::Index(plo0,
+                              ic), pdat::EdgeIndex::Y, pdat::EdgeIndex::Lower);
+                     (*data)(fi) *= 0.5;
+                     fi = pdat::EdgeIndex(hier::Index(phi0,
+                              ic), pdat::EdgeIndex::Y, pdat::EdgeIndex::Upper);
+                     (*data)(fi) *= 0.5;
+                  }
+               } else {
+                  //top and bottom edge boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::EdgeIndex(hier::Index(ic,
+                              plo1), pdat::EdgeIndex::X, pdat::EdgeIndex::Lower);
+                     (*data)(fi) = 0.0;
+                     fi = pdat::EdgeIndex(hier::Index(ic,
+                              phi1), pdat::EdgeIndex::X, pdat::EdgeIndex::Upper);
+                     (*data)(fi) *= 0.5;
+                  }
+                  //left and right edge boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     fi = pdat::EdgeIndex(hier::Index(plo0,
+                              ic), pdat::EdgeIndex::Y, pdat::EdgeIndex::Lower);
+                     (*data)(fi) *= 0.5;
+                     fi = pdat::EdgeIndex(hier::Index(phi0,
+                              ic), pdat::EdgeIndex::Y, pdat::EdgeIndex::Upper);
+                     (*data)(fi) *= 0.5;
+                  }
+               }
+            } else {
+               if (patch->getLocalId() == 0) {
+                  // top and bottom coarse-fine edge boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::EdgeIndex(hier::Index(ic,
+                              plo1), pdat::EdgeIndex::X, pdat::EdgeIndex::Lower);
+                     (*data)(fi) *= 1.5;
+                     fi = pdat::EdgeIndex(hier::Index(ic,
+                              phi1), pdat::EdgeIndex::X, pdat::EdgeIndex::Upper);
+                     (*data)(fi) *= 1.5;
+                  }
+                  //left coarse-fine edge boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     fi = pdat::EdgeIndex(hier::Index(plo0,
+                              ic), pdat::EdgeIndex::Y, pdat::EdgeIndex::Lower);
+                     (*data)(fi) *= 1.5;
+                  }
+               } else {
+                  // top and bottom coarse-fine edge boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::EdgeIndex(hier::Index(ic,
+                              plo1), pdat::EdgeIndex::X, pdat::EdgeIndex::Lower);
+                     (*data)(fi) *= 1.5;
+                     fi = pdat::EdgeIndex(hier::Index(ic,
+                              phi1), pdat::EdgeIndex::X, pdat::EdgeIndex::Upper);
+                     (*data)(fi) *= 1.5;
+                  }
+                  //left and right coarse-fine edge boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     fi = pdat::EdgeIndex(hier::Index(plo0,
+                              ic), pdat::EdgeIndex::Y, pdat::EdgeIndex::Lower);
+                     (*data)(fi) = 0.0;
+                     fi = pdat::EdgeIndex(hier::Index(phi0,
+                              ic), pdat::EdgeIndex::Y, pdat::EdgeIndex::Upper);
+                     (*data)(fi) *= 1.5;
+                  }
+               }
+            }
+         }
+      }
+
+      // Test #1: Print out control volume data and compute its integral
+
+      // Test #1a: Check control volume data set properly
+      // Expected: cwgt = 0.01 on coarse (except where finer patch exists) and
+      // 0.0025 on fine level
+/*   bool vol_test_passed = true;
+ *   for (ln = 0; ln < 2; ln++) {
+ *   for (hier::PatchLevel::Iterator ip(hierarchy->getPatchLevel(ln)); ip; ip++) {
+ *   patch = hierarchy->getPatchLevel(ln)->getPatch(ip());
+ *   tbox::Pointer< pdat::EdgeData<double> > cvdata = patch->getPatchData(cwgt_id);
+ *
+ *   for (pdat::EdgeIterator c(cvdata->getBox(),1);c && vol_test_passed;c++) {
+ *   pdat::EdgeIndex edge_index = c();
+ *
+ *   if (ln == 0) {
+ *   if ((coarse_fine * patch->getBox()).contains(edge_index)) {
+ *   if ( !tbox::MathUtilities<double>::equalEps((*cvdata)(edge_index),0.0) ) {
+ *   vol_test_passed = false;
+ *   }
+ *   } else {
+ *   if ( !tbox::MathUtilities<double>::equalEps((*cvdata)(edge_index),0.01) ) {
+ *   vol_test_passed = false;
+ *   }
+ *   }
+ *   }
+ *
+ *   if (ln == 1) {
+ *   if ( !tbox::MathUtilities<double>::equalEps((*cvdata)(edge_index),0.0025) ) {
+ *   vol_test_passed = false;
+ *   }
+ *   }
+ *   }
+ *   }
+ *   }
+ *   if (!vol_test_passed) {
+ *   num_failures++;
+ *   tbox::perr << "FAILED: - Test #1a: Check control volume data set properly" << std::endl;
+ *   cwgt_ops->printData(cwgt_id, tbox::plog);
+ *   }
+ */
+      // Print out control volume data and compute its integral
+/*   tbox::plog << "edge control volume data" << std::endl;
+ *   swgt_ops->printData(swgt_id, tbox::plog);
+ */
+
+      // Test #1b: math::HierarchyEdgeDataOpsReal::sumControlVolumes()
+      // Expected: norm = 1.0
+      double norm =
+         edge_ops->sumControlVolumes(svindx[0], swgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(norm, 1.0)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #1b: math::HierarchyEdgeDataOpsReal::sumControlVolumes()\n"
+         << "Expected value = 1.0 , Computed value = "
+         << norm << std::endl;
+      }
+
+      // Test #2: math::HierarchyEdgeDataOpsReal::numberOfEntries()
+      // Expected: num_data_points = 209
+      int num_data_points = edge_ops->numberOfEntries(svindx[0]);
+      if (num_data_points != 209) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #2: math::HierarchyEdgeDataOpsReal::numberOfEntries()\n"
+         << "Expected value = 209 , Computed value = "
+         << num_data_points << std::endl;
+      }
+
+      // Test #3a: math::HierarchyEdgeDataOpsReal::setToScalar()
+      // Expected: v0 = 2.0
+      double val0 = double(2.0);
+      edge_ops->setToScalar(svindx[0], val0);
+      if (!doubleDataSameAsValue(svindx[0], val0, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #3a: math::HierarchyEdgeDataOpsReal::setToScalar()\n"
+         << "Expected: v0 = " << val0 << std::endl;
+         edge_ops->printData(svindx[0], tbox::plog);
+      }
+
+      // Test #3b: math::HierarchyEdgeDataOpsReal::setToScalar()
+      // Expected: v1 = (4.0)
+      edge_ops->setToScalar(svindx[1], 4.0);
+      double val1 = 4.0;
+      if (!doubleDataSameAsValue(svindx[1], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #3b: math::HierarchyEdgeDataOpsReal::setToScalar()\n"
+         << "Expected: v1 = " << val1 << std::endl;
+         edge_ops->printData(svindx[1], tbox::plog);
+      }
+
+      // Test #4: math::HierarchyEdgeDataOpsReal::copyData()
+      // Expected:  v2 = v1 = (4.0)
+      edge_ops->copyData(svindx[2], svindx[1]);
+      if (!doubleDataSameAsValue(svindx[2], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #4: math::HierarchyEdgeDataOpsReal::copyData()\n"
+         << "Expected: v2 = " << val1 << std::endl;
+         edge_ops->printData(svindx[2], tbox::plog);
+      }
+
+      // Test #5: math::HierarchyEdgeDataOpsReal::swapData()
+      // Expected:  v0 = (4.0), v1 = (2.0)
+      edge_ops->swapData(svindx[0], svindx[1]);
+      if (!doubleDataSameAsValue(svindx[0], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #5a: math::HierarchyEdgeDataOpsReal::swapData()\n"
+         << "Expected: v0 = " << val1 << std::endl;
+         edge_ops->printData(svindx[0], tbox::plog);
+      }
+      if (!doubleDataSameAsValue(svindx[1], val0, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #5b: math::HierarchyEdgeDataOpsReal::swapData()\n"
+         << "Expected: v1 = " << val0 << std::endl;
+         edge_ops->printData(svindx[1], tbox::plog);
+      }
+
+      // Test #6: math::HierarchyEdgeDataOpsReal::scale()
+      // Expected:  v2 = 0.25 * v2 = (1.0)
+      edge_ops->scale(svindx[2], 0.25, svindx[2]);
+      double val_scale = 1.0;
+      if (!doubleDataSameAsValue(svindx[2], val_scale, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #6: math::HierarchyEdgeDataOpsReal::scale()\n"
+         << "Expected: v2 = " << val_scale << std::endl;
+         edge_ops->printData(svindx[2], tbox::plog);
+      }
+
+      // Test #7: math::HierarchyEdgeDataOpsReal::add()
+      // Expected: v3 = v0 + v1 = (6.0)
+      edge_ops->add(svindx[3], svindx[0], svindx[1]);
+      double val_add = 6.0;
+      if (!doubleDataSameAsValue(svindx[3], val_add, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #7: math::HierarchyEdgeDataOpsReal::add()\n"
+         << "Expected: v3 = " << val_add << std::endl;
+         edge_ops->printData(svindx[3], tbox::plog);
+      }
+
+      // Reset v0: v0 = (0.0)
+      edge_ops->setToScalar(svindx[0], 0.0);
+
+      // Test #8: math::HierarchyEdgeDataOpsReal::subtract()
+      // Expected: v1 = v3 - v0 = (6.0)
+      edge_ops->subtract(svindx[1], svindx[3], svindx[0]);
+      double val_sub = 6.0;
+      if (!doubleDataSameAsValue(svindx[1], val_sub, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #8: math::HierarchyEdgeDataOpsReal::subtract()\n"
+         << "Expected: v1 = " << val_sub << std::endl;
+         edge_ops->printData(svindx[1], tbox::plog);
+      }
+
+      // Test #9a: math::HierarchyEdgeDataOpsReal::addScalar()
+      // Expected:  v1 = v1 + (0.0) = (6.0)
+      edge_ops->addScalar(svindx[1], svindx[1], 0.0);
+      double val_addScalar = 6.0;
+      if (!doubleDataSameAsValue(svindx[1], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #9a: math::HierarchyEdgeDataOpsReal::addScalar()\n"
+         << "Expected: v1 = " << val_addScalar << std::endl;
+         edge_ops->printData(svindx[1], tbox::plog);
+      }
+
+      // Test #9b: math::HierarchyEdgeDataOpsReal::addScalar()
+      // Expected:  v2 = v2 + (0.0) = (1.0)
+      edge_ops->addScalar(svindx[2], svindx[2], 0.0);
+      val_addScalar = 1.0;
+      if (!doubleDataSameAsValue(svindx[2], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #9b: math::HierarchyEdgeDataOpsReal::addScalar()\n"
+         << "Expected: v2 = " << val_addScalar << std::endl;
+         edge_ops->printData(svindx[2], tbox::plog);
+      }
+
+      // Test #9c: math::HierarchyEdgeDataOpsReal::addScalar()
+      // Expected:  v2 = v2 + (3.0) = (4.0)
+      edge_ops->addScalar(svindx[2], svindx[2], 3.0);
+      val_addScalar = 4.0;
+      if (!doubleDataSameAsValue(svindx[2], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #9c: math::HierarchyEdgeDataOpsReal::addScalar()\n"
+         << "Expected: v2 = " << val_addScalar << std::endl;
+         edge_ops->printData(svindx[2], tbox::plog);
+      }
+
+      // Reset v3: v3 = (0.5)
+      edge_ops->setToScalar(svindx[3], 0.5);
+
+      // Test #10: math::HierarchyEdgeDataOpsReal::multiply()
+      // Expected: v1 = v3 * v1 = (3.0)
+      edge_ops->multiply(svindx[1], svindx[3], svindx[1]);
+      double val_mult = 3.0;
+      if (!doubleDataSameAsValue(svindx[1], val_mult, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #10 math::HierarchyEdgeDataOpsReal::multiply()\n"
+         << "Expected: v1 = " << val_mult << std::endl;
+         edge_ops->printData(svindx[1], tbox::plog);
+      }
+
+      // Test #11: math::HierarchyEdgeDataOpsReal::divide()
+      // Expected: v0 = v2 / v1 =  1.33333333333333
+      edge_ops->divide(svindx[0], svindx[2], svindx[1]);
+      double val_div = 1.333333333333;
+      if (!doubleDataSameAsValue(svindx[0], val_div, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #11 math::HierarchyEdgeDataOpsReal::divide()\n"
+         << "Expected: v0 = " << val_div << std::endl;
+         edge_ops->printData(svindx[0], tbox::plog);
+      }
+
+      // Test #12: math::HierarchyEdgeDataOpsReal::reciprocal()
+      // Expected: v1 = 1 / v1 = (0.333333333)
+      edge_ops->reciprocal(svindx[1], svindx[1]);
+      double val_rec = 0.33333333333333;
+      if (!doubleDataSameAsValue(svindx[1], val_rec, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #12 math::HierarchyEdgeDataOpsReal::reciprocal()\n"
+         << "Expected: v1 = " << val_rec << std::endl;
+         edge_ops->printData(svindx[1], tbox::plog);
+      }
+
+      // Test #13: math::HierarchyEdgeDataOpsReal::abs()
+      // Expected: v3 = abs(v2) = 4.0
+      edge_ops->abs(svindx[3], svindx[2]);
+      double val_abs = 4.0;
+      if (!doubleDataSameAsValue(svindx[3], val_abs, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #13 math::HierarchyEdgeDataOpsReal::abs()\n"
+         << "Expected: v3 = " << val_abs << std::endl;
+         edge_ops->printData(svindx[3], tbox::plog);
+      }
+
+      // Test #14: Place some bogus values on coarse level
+      tbox::Pointer<pdat::EdgeData<double> > cdata;
+
+      // set values
+      tbox::Pointer<hier::PatchLevel> level_zero = hierarchy->getPatchLevel(0);
+      for (hier::PatchLevel::Iterator ip(level_zero); ip; ip++) {
+         patch = *ip;
+         cdata = patch->getPatchData(svindx[2]);
+         hier::Index index0(2, 2);
+         hier::Index index1(5, 3);
+         if (patch->getBox().contains(index0)) {
+            (*cdata)(pdat::EdgeIndex(index0, pdat::EdgeIndex::Y,
+                        pdat::EdgeIndex::Lower), 0) = 100.0;
+         }
+         if (patch->getBox().contains(index1)) {
+            (*cdata)(pdat::EdgeIndex(index1, pdat::EdgeIndex::Y,
+                        pdat::EdgeIndex::Upper), 0) = -1000.0;
+         }
+      }
+
+      // check values
+      bool bogus_value_test_passed = true;
+      for (hier::PatchLevel::Iterator ipp(level_zero); ipp; ipp++) {
+         patch = *ipp;
+         cdata = patch->getPatchData(svindx[2]);
+         pdat::EdgeIndex index0(hier::Index(2,
+                                   2), pdat::EdgeIndex::Y,
+                                pdat::EdgeIndex::Lower);
+         pdat::EdgeIndex index1(hier::Index(5,
+                                   3), pdat::EdgeIndex::Y,
+                                pdat::EdgeIndex::Upper);
+
+         // check X axis data
+         for (pdat::EdgeIterator c(cdata->getBox(), pdat::EdgeIndex::X);
+              c && bogus_value_test_passed;
+              c++) {
+            pdat::EdgeIndex edge_index = c();
+
+            if (!tbox::MathUtilities<double>::equalEps((*cdata)(edge_index),
+                   4.0)) {
+               bogus_value_test_passed = false;
+            }
+         }
+
+         // check Y axis data
+         for (pdat::EdgeIterator cc(cdata->getBox(), pdat::EdgeIndex::Y);
+              cc && bogus_value_test_passed;
+              cc++) {
+            pdat::EdgeIndex edge_index = cc();
+
+            if (edge_index == index0) {
+               if (!tbox::MathUtilities<double>::equalEps((*cdata)(edge_index),
+                      100.0)) {
+                  bogus_value_test_passed = false;
+               }
+            } else {
+               if (edge_index == index1) {
+                  if (!tbox::MathUtilities<double>::equalEps((*cdata)(
+                            edge_index), -1000.0)) {
+                     bogus_value_test_passed = false;
+                  }
+               } else {
+                  if (!tbox::MathUtilities<double>::equalEps((*cdata)(
+                            edge_index), 4.0)) {
+                     bogus_value_test_passed = false;
+                  }
+               }
+            }
+         }
+      }
+      if (!bogus_value_test_passed) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #14:  Place some bogus values on coarse level"
+         << std::endl;
+         edge_ops->printData(svindx[2], tbox::plog);
+      }
+
+      // Test #15: math::HierarchyEdgeDataOpsReal::L1Norm() - w/o control weights
+      // Expected: bogus_l1_norm = 1984.00
+      double bogus_l1_norm = edge_ops->L1Norm(svindx[2]);
+      if (!tbox::MathUtilities<double>::equalEps(bogus_l1_norm, 1984.00)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #15: math::HierarchyEdgeDataOpsReal::L1Norm()"
+         << " - w/o control weights\n"
+         << "Expected value = 1984.00, Computed value = "
+         << std::setprecision(12) << bogus_l1_norm << std::endl;
+      }
+
+      // Test #16: math::HierarchyEdgeDataOpsReal::L1Norm() - w/control weights
+      // Expected: correct_l1_norm = 4.0
+      double correct_l1_norm = edge_ops->L1Norm(svindx[2], swgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(correct_l1_norm, 4.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #16: math::HierarchyEdgeDataOpsReal::L1Norm()"
+         << " - w/control weights\n"
+         << "Expected value = 4.0, Computed value = "
+         << correct_l1_norm << std::endl;
+      }
+
+      // Test #17: math::HierarchyEdgeDataOpsReal::L2Norm()
+      // Expected: l2_norm = 4.0
+      double l2_norm = edge_ops->L2Norm(svindx[2], swgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(l2_norm, 4.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #17: math::HierarchyEdgeDataOpsReal::L2Norm()\n"
+         << "Expected value = 4.0, Computed value = "
+         << l2_norm << std::endl;
+      }
+
+      // Test #18: math::HierarchyEdgeDataOpsReal::maxNorm() - w/o control weights
+      // Expected: bogus_max_norm = 1000.0
+      double bogus_max_norm = edge_ops->maxNorm(svindx[2]);
+      if (!tbox::MathUtilities<double>::equalEps(bogus_max_norm, 1000.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #18: math::HierarchyEdgeDataOpsReal::maxNorm()"
+         << " - w/o control weights\n"
+         << "Expected value = 1000.0, Computed value = "
+         << bogus_max_norm << std::endl;
+      }
+
+      // Test #19: math::HierarchyEdgeDataOpsReal::maxNorm() - w/control weights
+      // Expected: max_norm = 4.0
+      double max_norm = edge_ops->maxNorm(svindx[2], swgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(max_norm, 4.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #19: math::HierarchyEdgeDataOpsReal::maxNorm()"
+         << " - w/control weights\n"
+         << "Expected value = 4.0, Computed value = "
+         << max_norm << std::endl;
+      }
+
+      // Reset data and test sums, axpy's
+      edge_ops->setToScalar(svindx[0], 1.0);
+      edge_ops->setToScalar(svindx[1], 2.5);
+      edge_ops->setToScalar(svindx[2], 7.0);
+
+      // Test #20: math::HierarchyEdgeDataOpsReal::linearSum()
+      // Expected: v3 = 5.0
+      edge_ops->linearSum(svindx[3], 2.0, svindx[1], 0.0, svindx[0]);
+      double val_linearSum = 5.0;
+      if (!doubleDataSameAsValue(svindx[3], val_linearSum, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #20: math::HierarchyEdgeDataOpsReal::linearSum()\n"
+         << "Expected: v3 = " << val_linearSum << std::endl;
+         edge_ops->printData(svindx[3], tbox::plog);
+      }
+
+      // Test #21: math::HierarchyEdgeDataOpsReal::axmy()
+      // Expected: v3 = 6.5
+      edge_ops->axmy(svindx[3], 3.0, svindx[1], svindx[0]);
+      double val_axmy = 6.5;
+      if (!doubleDataSameAsValue(svindx[3], val_axmy, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #21: math::HierarchyEdgeDataOpsReal::axmy()\n"
+         << "Expected: v3 = " << val_axmy << std::endl;
+         edge_ops->printData(svindx[3], tbox::plog);
+      }
+
+      // Test #22a: math::HierarchyEdgeDataOpsReal::dot() - (ind2) * (ind1)
+      // Expected: cdot = 17.5
+      double cdot = edge_ops->dot(svindx[2], svindx[1], swgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(cdot, 17.5)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #22a: math::HierarchyEdgeDataOpsReal::dot() - (ind2) * (ind1)\n"
+         << "Expected Value = 17.5, Computed Value = "
+         << cdot << std::endl;
+      }
+
+      // Test #22b: math::HierarchyEdgeDataOpsReal::dot() - (ind2) * (ind1)
+      // Expected: cdot = 17.5
+      cdot = edge_ops->dot(svindx[1], svindx[2], swgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(cdot, 17.5)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #22b: math::HierarchyEdgeDataOpsReal::dot() - (ind2) * (ind1)\n"
+         << "Expected Value = 17.5, Computed Value = "
+         << cdot << std::endl;
+      }
+
+      // deallocate data on hierarchy
+      for (ln = 0; ln < 2; ln++) {
+         hierarchy->getPatchLevel(ln)->deallocatePatchData(swgt_id);
+         for (iv = 0; iv < NVARS; iv++) {
+            hierarchy->getPatchLevel(ln)->deallocatePatchData(svindx[iv]);
+         }
+      }
+
+      for (iv = 0; iv < NVARS; iv++) {
+         fvar[iv].setNull();
+      }
+      swgt.setNull();
+
+      geometry.setNull();
+      hierarchy.setNull();
+      edge_ops.setNull();
+      swgt_ops.setNull();
+
+      if (num_failures == 0) {
+         tbox::pout << "\nPASSED:  edge hiertest" << std::endl;
+      }
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return num_failures;
+}
+
+/*
+ * Returns true if all the data in the hierarchy is equal to the specified
+ * value.  Returns false otherwise.
+ */
+static bool
+doubleDataSameAsValue(
+   int desc_id,
+   double value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   bool test_passed = true;
+
+   int ln;
+   tbox::Pointer<hier::Patch> patch;
+   for (ln = 0; ln < 2; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         patch = *ip;
+         tbox::Pointer<pdat::EdgeData<double> > cvdata = patch->getPatchData(
+               desc_id);
+
+         for (pdat::EdgeIterator c(cvdata->getBox(), 1); c && test_passed;
+              c++) {
+            pdat::EdgeIndex edge_index = c();
+            if (!tbox::MathUtilities<double>::equalEps((*cvdata)(edge_index),
+                   value)) {
+               test_passed = false;
+            }
+         }
+      }
+   }
+
+   return test_passed;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dataops/face_cplxtest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dataops/face_cplxtest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,860 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program to test face-centered complex patch data ops 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fstream>
+#include <iomanip>
+using namespace std;
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/math/HierarchyDataOpsComplex.h"
+#include "SAMRAI/math/HierarchyFaceDataOpsComplex.h"
+#include "SAMRAI/math/HierarchyDataOpsReal.h"
+#include "SAMRAI/math/HierarchyFaceDataOpsReal.h"
+#include "SAMRAI/pdat/FaceIndex.h"
+#include "SAMRAI/pdat/FaceIterator.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/ProcessorMapping.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/hier/VariableContext.h"
+
+using namespace SAMRAI;
+
+/* Helper function declarations */
+static bool
+complexDataSameAsValue(
+   int desc_id,
+   dcomplex value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy);
+static bool
+doubleDataSameAsValue(
+   int desc_id,
+   double value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+#define NVARS 4
+
+int main(
+   int argc,
+   char* argv[]) {
+
+   int num_failures = 0;
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   if (argc < 2) {
+      TBOX_ERROR("Usage: " << argv[0] << " [dimension]");
+   }
+
+   const int d = atoi(argv[1]);
+   TBOX_ASSERT(d > 0);
+   TBOX_ASSERT(d <= SAMRAI_MAXIMUM_DIMENSION_VALUE);
+   const tbox::Dimension dim(d);
+
+   if (dim != 2) {
+      TBOX_ERROR("This test code is completed only for 2D!!!");
+   }
+
+   const std::string log_fn = std::string("face_cplxtest.")
+      + tbox::Utilities::intToString(dim, 1) + "d.log";
+   tbox::PIO::logAllNodes(log_fn);
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+      const tbox::Dimension dim2(2);
+
+      int ln, iv;
+
+      // Make a dummy hierarchy domain
+      double lo[2] = { 0.0, 0.0 };
+      double hi[2] = { 1.0, 0.5 };
+
+      hier::Box coarse0(hier::Index(0, 0), hier::Index(9, 2));
+      hier::Box coarse1(hier::Index(0, 3), hier::Index(9, 4));
+      hier::Box fine0(hier::Index(4, 4), hier::Index(7, 7));
+      hier::Box fine1(hier::Index(8, 4), hier::Index(13, 7));
+      hier::IntVector ratio(dim2, 2);
+
+      hier::BoxArray coarse_domain(dim2, 2);
+      hier::BoxArray fine_boxes(dim2, 2);
+      coarse_domain[0] = coarse0;
+      coarse_domain[1] = coarse1;
+      fine_boxes[0] = fine0;
+      fine_boxes[1] = fine1;
+
+      tbox::Pointer<geom::CartesianGridGeometry> geometry(
+         new geom::CartesianGridGeometry("CartesianGeometry",
+            lo,
+            hi,
+            coarse_domain));
+
+      tbox::Pointer<hier::PatchHierarchy> hierarchy(
+         new hier::PatchHierarchy("PatchHierarchy", geometry));
+
+      // Note: For these simple tests we allow at most 2 processors.
+      const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+      const int nproc = mpi.getSize();
+      TBOX_ASSERT(nproc < 3);
+
+      const int n_coarse_boxes = coarse_domain.getNumberOfBoxes();
+      const int n_fine_boxes = fine_boxes.getNumberOfBoxes();
+
+      hier::MappedBoxLevel layer0(hier::IntVector(dim, 1));
+      hier::MappedBoxLevel layer1(ratio);
+
+      for (int ib = 0; ib < n_coarse_boxes; ib++) {
+         if (nproc > 1) {
+            if (ib == layer0.getRank()) {
+               layer0.addMappedBox(hier::MappedBox(coarse_domain[ib], ib,
+                     layer0.getRank()));
+            }
+         } else {
+            layer0.addMappedBox(hier::MappedBox(coarse_domain[ib], ib, 0));
+         }
+      }
+
+      for (int ib = 0; ib < n_fine_boxes; ib++) {
+         if (nproc > 1) {
+            if (ib == layer1.getRank()) {
+               layer1.addMappedBox(hier::MappedBox(fine_boxes[ib], ib,
+                     layer1.getRank()));
+            }
+         } else {
+            layer1.addMappedBox(hier::MappedBox(fine_boxes[ib], ib, 0));
+         }
+      }
+
+      hierarchy->makeNewPatchLevel(0, layer0);
+      hierarchy->makeNewPatchLevel(1, layer1);
+
+      // Create instance of hier::Variable database
+      hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+      tbox::Pointer<hier::VariableContext> dummy = variable_db->getContext(
+            "dummy");
+      const hier::IntVector no_ghosts(dim2, 0);
+
+      // Make some dummy variables and data on the hierarchy
+      tbox::Pointer<pdat::FaceVariable<dcomplex> > fvar[NVARS];
+      int fvindx[NVARS];
+      fvar[0] = new pdat::FaceVariable<dcomplex>(dim, "fvar0", 1);
+      fvindx[0] = variable_db->registerVariableAndContext(
+            fvar[0], dummy, no_ghosts);
+      fvar[1] = new pdat::FaceVariable<dcomplex>(dim, "fvar1", 1);
+      fvindx[1] = variable_db->registerVariableAndContext(
+            fvar[1], dummy, no_ghosts);
+      fvar[2] = new pdat::FaceVariable<dcomplex>(dim, "fvar2", 1);
+      fvindx[2] = variable_db->registerVariableAndContext(
+            fvar[2], dummy, no_ghosts);
+      fvar[3] = new pdat::FaceVariable<dcomplex>(dim, "fvar3", 1);
+      fvindx[3] = variable_db->registerVariableAndContext(
+            fvar[3], dummy, no_ghosts);
+
+      tbox::Pointer<pdat::FaceVariable<double> >
+      fwgt(new pdat::FaceVariable<double>(dim, "fwgt", 1));
+      int fwgt_id = variable_db->registerVariableAndContext(
+            fwgt, dummy, no_ghosts);
+
+      // allocate data on hierarchy
+      for (ln = 0; ln < 2; ln++) {
+         hierarchy->getPatchLevel(ln)->allocatePatchData(fwgt_id);
+         for (iv = 0; iv < NVARS; iv++) {
+            hierarchy->getPatchLevel(ln)->allocatePatchData(fvindx[iv]);
+         }
+      }
+
+      tbox::Pointer<math::HierarchyDataOpsComplex> face_ops(
+         new math::HierarchyFaceDataOpsComplex(hierarchy, 0, 1));
+      TBOX_ASSERT(!face_ops.isNull());
+
+      tbox::Pointer<math::HierarchyDataOpsReal<double> > fwgt_ops(
+         new math::HierarchyFaceDataOpsReal<double>(hierarchy, 0, 1));
+
+      tbox::Pointer<hier::Patch> patch;
+      tbox::Pointer<geom::CartesianPatchGeometry> pgeom;
+
+      // Initialize control volume data for face-centered components
+      hier::Box coarse_fine = fine0 + fine1;
+      coarse_fine.coarsen(ratio);
+      for (ln = 0; ln < 2; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::Pointer<pdat::FaceData<double> > data;
+            patch = level->getPatch(ip());
+            pgeom = patch->getPatchGeometry();
+            const double* dx = pgeom->getDx();
+            const double face_vol = dx[0] * dx[1];
+            data = patch->getPatchData(fwgt_id);
+            data->fillAll(face_vol);
+            pdat::FaceIndex fi(dim);
+            int plo0 = patch->getBox().lower(0);
+            int phi0 = patch->getBox().upper(0);
+            int plo1 = patch->getBox().lower(1);
+            int phi1 = patch->getBox().upper(1);
+            int ic;
+
+            if (ln == 0) {
+               data->fillAll(0.0, (coarse_fine * patch->getBox()));
+
+               if (patch->getLocalId() == 0) {
+                  //bottom face boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::FaceIndex(hier::Index(ic,
+                              plo1), pdat::FaceIndex::Y, pdat::FaceIndex::Lower);
+                     (*data)(fi) *= 0.5;
+                  }
+                  //left and right face boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     fi = pdat::FaceIndex(hier::Index(plo0,
+                              ic), pdat::FaceIndex::X, pdat::FaceIndex::Lower);
+                     (*data)(fi) *= 0.5;
+                     fi = pdat::FaceIndex(hier::Index(phi0,
+                              ic), pdat::FaceIndex::X, pdat::FaceIndex::Upper);
+                     (*data)(fi) *= 0.5;
+                  }
+               } else {
+                  //top and bottom face boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::FaceIndex(hier::Index(ic,
+                              plo1), pdat::FaceIndex::Y, pdat::FaceIndex::Lower);
+                     (*data)(fi) = 0.0;
+                     fi = pdat::FaceIndex(hier::Index(ic,
+                              phi1), pdat::FaceIndex::Y, pdat::FaceIndex::Upper);
+                     (*data)(fi) *= 0.5;
+                  }
+                  //left and right face boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     fi = pdat::FaceIndex(hier::Index(plo0,
+                              ic), pdat::FaceIndex::X, pdat::FaceIndex::Lower);
+                     (*data)(fi) *= 0.5;
+                     fi = pdat::FaceIndex(hier::Index(phi0,
+                              ic), pdat::FaceIndex::X, pdat::FaceIndex::Upper);
+                     (*data)(fi) *= 0.5;
+                  }
+               }
+            } else {
+               if (patch->getLocalId() == 0) {
+                  // top and bottom coarse-fine face boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::FaceIndex(hier::Index(ic,
+                              plo1), pdat::FaceIndex::Y, pdat::FaceIndex::Lower);
+                     (*data)(fi) *= 1.5;
+                     fi = pdat::FaceIndex(hier::Index(ic,
+                              phi1), pdat::FaceIndex::Y, pdat::FaceIndex::Upper);
+                     (*data)(fi) *= 1.5;
+                  }
+                  //left coarse-fine face boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     fi = pdat::FaceIndex(hier::Index(plo0,
+                              ic), pdat::FaceIndex::X, pdat::FaceIndex::Lower);
+                     (*data)(fi) *= 1.5;
+                  }
+               } else {
+                  // top and bottom coarse-fine face boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::FaceIndex(hier::Index(ic,
+                              plo1), pdat::FaceIndex::Y, pdat::FaceIndex::Lower);
+                     (*data)(fi) *= 1.5;
+                     fi = pdat::FaceIndex(hier::Index(ic,
+                              phi1), pdat::FaceIndex::Y, pdat::FaceIndex::Upper);
+                     (*data)(fi) *= 1.5;
+                  }
+                  //left and right coarse-fine face boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     fi = pdat::FaceIndex(hier::Index(plo0,
+                              ic), pdat::FaceIndex::X, pdat::FaceIndex::Lower);
+                     (*data)(fi) = 0.0;
+                     fi = pdat::FaceIndex(hier::Index(phi0,
+                              ic), pdat::FaceIndex::X, pdat::FaceIndex::Upper);
+                     (*data)(fi) *= 1.5;
+                  }
+               }
+            }
+         }
+      }
+
+      // Test #1: Print out control volume data and compute its integral
+
+      // Test #1a: Check control volume data set properly
+      // Expected: cwgt =
+/*   bool vol_test_passed = true;
+ *   for (ln = 0; ln < 2; ln++) {
+ *   for (hier::PatchLevel::Iterator ip(hierarchy->getPatchLevel(ln)); ip; ip++) {
+ *   patch = hierarchy->getPatchLevel(ln)->getPatch(ip());
+ *   tbox::Pointer< pdat::FaceData<double> > fvdata = patch->getPatchData(fwgt_id);
+ *
+ *   for (pdat::FaceIterator c(fvdata->getBox(),1);c && vol_test_passed;c++) {
+ *   pdat::FaceIndex face_index = c();
+ *
+ *   if (ln == 0) {
+ *   if ((coarse_fine * patch->getBox()).contains(face_index)) {
+ *   if ( !tbox::MathUtilities<double>::equalEps((*fvdata)(face_index),0.0) ) {
+ *   vol_test_passed = false;
+ *   }
+ *   } else {
+ *   if ( !tbox::MathUtilities<double>::equalEps((*fvdata)(face_index),0.01) ) {
+ *   vol_test_passed = false;
+ *   }
+ *   }
+ *   }
+ *
+ *   if (ln == 1) {
+ *   if ( !tbox::MathUtilities<double>::equalEps((*fvdata)(face_index),0.0025) ) {
+ *   vol_test_passed = false;
+ *   }
+ *   }
+ *   }
+ *   }
+ *   }
+ *   if (!vol_test_passed) {
+ *   num_failures++;
+ *   tbox::perr << "FAILED: - Test #1a: Check control volume data set properly" << std::endl;
+ *   fwgt_ops->printData(fwgt_id, tbox::plog);
+ *   }
+ */
+      // Test #1b: math::HierarchyFaceDataOpsComplex::sumControlVolumes()
+      // Expected: norm = 1.0
+      double norm =
+         face_ops->sumControlVolumes(fvindx[0], fwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(norm, 1.0)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #1b: math::HierarchyFaceDataOpsComplex::sumControlVolumes()\n"
+         << "Expected value = 1.0 , Computed value = "
+         << norm << std::endl;
+      }
+
+      // Test #2: math::HierarchyFaceDataOpsComplex::numberOfEntries()
+      // Expected: num_data_points = 209
+      int num_data_points = face_ops->numberOfEntries(fvindx[0]);
+      if (num_data_points != 209) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #2: math::HierarchyFaceDataOpsComplex::numberOfEntries()\n"
+         << "Expected value = 209 , Computed value = "
+         << num_data_points << std::endl;
+      }
+
+      // Test #3a: math::HierarchyFaceDataOpsComplex::setToScalar()
+      // Expected: v0 = (2.0,1.5)
+      dcomplex val0 = dcomplex(2.0, 1.5);
+      face_ops->setToScalar(fvindx[0], val0);
+      if (!complexDataSameAsValue(fvindx[0], val0, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #3a: math::HierarchyFaceDataOpsComplex::setToScalar()\n"
+         << "Expected: v0 = " << val0 << std::endl;
+         face_ops->printData(fvindx[0], tbox::plog);
+      }
+
+      // Test #3b: math::HierarchyFaceDataOpsComplex::setToScalar()
+      // Expected: v1 = (4.0,3.0)
+      dcomplex val1(4.0, 3.0);
+      face_ops->setToScalar(fvindx[1], val1);
+      if (!complexDataSameAsValue(fvindx[1], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #3b: math::HierarchyFaceDataOpsComplex::setToScalar()\n"
+         << "Expected: v1 = " << val1 << std::endl;
+         face_ops->printData(fvindx[1], tbox::plog);
+      }
+
+      // Test #4: math::HierarchyFaceDataOpsComplex::copyData()
+      // Expected: v2 = v1 = (4.0,3.0)
+      face_ops->copyData(fvindx[2], fvindx[1]);
+      if (!complexDataSameAsValue(fvindx[2], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #3b: math::HierarchyFaceDataOpsComplex::copyData()\n"
+         << "Expected: v2 = v1 = " << val1 << std::endl;
+         face_ops->printData(fvindx[2], tbox::plog);
+      }
+
+      // Test #5: math::HierarchyFaceDataOpsComplex::swapData()
+      // Expected:  v0 = (4.0, 3.0),  v1 = (2.0,1.5)
+      face_ops->swapData(fvindx[0], fvindx[1]);
+      if (!complexDataSameAsValue(fvindx[0], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #5a: math::HierarchyFaceDataOpsComplex::swapData()\n"
+         << "Expected: v0 = " << val1 << std::endl;
+         face_ops->printData(fvindx[0], tbox::plog);
+      }
+      if (!complexDataSameAsValue(fvindx[1], val0, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #5b: math::HierarchyFaceDataOpsComplex::swapData()\n"
+         << "Expected: v1 = " << val0 << std::endl;
+         face_ops->printData(fvindx[1], tbox::plog);
+      }
+
+      // Test #6: math::HierarchyFaceDataOpsComplex::scale()
+      // Expected:  v2 = 0.25 * v2 = (1.0,0.75)
+      face_ops->scale(fvindx[2], 0.25, fvindx[2]);
+      dcomplex val_scale(1.0, 0.75);
+      if (!complexDataSameAsValue(fvindx[2], val_scale, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #6: math::HierarchyFaceDataOpsComplex::scale()\n"
+         << "Expected: v2 = " << val_scale << std::endl;
+         face_ops->printData(fvindx[2], tbox::plog);
+      }
+
+      // Test #7: math::HierarchyFaceDataOpsComplex::add()
+      // Expected:  v3 = v0 + v1 = (6.0, 4.5)
+      face_ops->add(fvindx[3], fvindx[0], fvindx[1]);
+      dcomplex val_add(6.0, 4.5);
+      if (!complexDataSameAsValue(fvindx[3], val_add, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #7: math::HierarchyFaceDataOpsComplex::add()\n"
+         << "Expected: v3 = " << val_add << std::endl;
+         face_ops->printData(fvindx[3], tbox::plog);
+      }
+
+      // Reset v0: v0 = (0.0, 4.5)
+      face_ops->setToScalar(fvindx[0], dcomplex(0.0, 4.5));
+
+      // Test #8: math::HierarchyFaceDataOpsComplex::subtract()
+      // Expected:  v1 = v3 - v0 = (6.0,0.0)
+      face_ops->subtract(fvindx[1], fvindx[3], fvindx[0]);
+      dcomplex val_sub(6.0, 0.0);
+      if (!complexDataSameAsValue(fvindx[1], val_sub, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #8: math::HierarchyFaceDataOpsComplex::subtract()\n"
+         << "Expected: v1 = " << val_sub << std::endl;
+         face_ops->printData(fvindx[1], tbox::plog);
+      }
+
+      // Test #9a: math::HierarchyFaceDataOpsComplex::addScalar()
+      // Expected:  v1 = v1 + (0.0,-4.0) = (6.0,-4.0)
+      face_ops->addScalar(fvindx[1], fvindx[1], dcomplex(0.0, -4.0));
+      dcomplex val_addScalar(6.0, -4.0);
+      if (!complexDataSameAsValue(fvindx[1], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #9a: math::HierarchyFaceDataOpsComplex::addScalar()\n"
+         << "Expected: v1 = " << val_addScalar << std::endl;
+         face_ops->printData(fvindx[1], tbox::plog);
+      }
+
+      // Test #9b: math::HierarchyFaceDataOpsComplex::addScalar()
+      // Expected:  v2 = v2 + (0.0,0.25) = (1.0,1.0)
+      face_ops->addScalar(fvindx[2], fvindx[2], dcomplex(0.0, 0.25));
+      val_addScalar = dcomplex(1.0, 1.0);
+      if (!complexDataSameAsValue(fvindx[2], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #9b: math::HierarchyFaceDataOpsComplex::addScalar()\n"
+         << "Expected: v2 = " << val_addScalar << std::endl;
+         face_ops->printData(fvindx[2], tbox::plog);
+      }
+
+      // Test #9c: math::HierarchyFaceDataOpsComplex::addScalar()
+      // Expected:  v2 = v2 + (3.0,-4.0) = (4.0,-3.0)
+      face_ops->addScalar(fvindx[2], fvindx[2], dcomplex(3.0, -4.0));
+      val_addScalar = dcomplex(4.0, -3.0);
+      if (!complexDataSameAsValue(fvindx[2], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #9c: math::HierarchyFaceDataOpsComplex::addScalar()\n"
+         << "Expected: v2 = " << val_addScalar << std::endl;
+         face_ops->printData(fvindx[2], tbox::plog);
+      }
+
+      // Reset v3: v3 = (0.5, 0.0)
+      face_ops->setToScalar(fvindx[3], dcomplex(0.5, 0.0));
+
+      // Test #10: math::HierarchyFaceDataOpsComplex::multiply()
+      // Expected:  v1 = v3 * v1 = (3.0,-2.0)
+      face_ops->multiply(fvindx[1], fvindx[3], fvindx[1]);
+      dcomplex val_mult(3.0, -2.0);
+      if (!complexDataSameAsValue(fvindx[1], val_mult, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #10: math::HierarchyFaceDataOpsComplex::multiply()\n"
+         << "Expected: v1 = " << val_mult << std::endl;
+         face_ops->printData(fvindx[1], tbox::plog);
+      }
+
+      // Test #11: math::HierarchyFaceDataOpsComplex::divide()
+      // Expected:  v0 = v2 / v1 = (1.3846153846154,-0.076923076923077)
+      face_ops->divide(fvindx[0], fvindx[2], fvindx[1]);
+      dcomplex val_div(1.3846153846154, -0.076923076923077);
+      if (!complexDataSameAsValue(fvindx[0], val_div, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #11: math::HierarchyFaceDataOpsComplex::divide()\n"
+         << "Expected: v0 = " << val_div << std::endl;
+         face_ops->printData(fvindx[0], tbox::plog);
+      }
+
+      // Test #12: math::HierarchyFaceDataOpsComplex::reciprocal()
+      // Expected:  v1 = 1 / v1 = (0.23076923076923, 0.15384615384615)
+      face_ops->reciprocal(fvindx[1], fvindx[1]);
+      dcomplex val_rec(0.23076923076923, 0.15384615384615);
+      if (!complexDataSameAsValue(fvindx[1], val_rec, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #12: math::HierarchyFaceDataOpsComplex::reciprocal()\n"
+         << "Expected: v1 = " << val_rec << std::endl;
+         face_ops->printData(fvindx[1], tbox::plog);
+      }
+
+      // Test #13: Place some bogus values on coarse level and test norms
+      tbox::Pointer<pdat::FaceData<dcomplex> > cdata;
+
+      // set values
+      tbox::Pointer<hier::PatchLevel> level_zero =
+         hierarchy->getPatchLevel(0);
+      for (hier::PatchLevel::Iterator ip(level_zero); ip; ip++) {
+         patch = level_zero->getPatch(ip());
+         cdata = patch->getPatchData(fvindx[2]);
+         hier::Index index0(2, 2);
+         hier::Index index1(5, 3);
+         if (patch->getBox().contains(index0)) {
+            (*cdata)(pdat::FaceIndex(index0, pdat::FaceIndex::Y,
+                        pdat::FaceIndex::Lower), 0) = dcomplex(100.0, -50.0);
+         }
+         if (patch->getBox().contains(index1)) {
+            (*cdata)(pdat::FaceIndex(index1, pdat::FaceIndex::Y,
+                        pdat::FaceIndex::Upper), 0) = dcomplex(-1000.0, 20.0);
+         }
+      }
+
+      // check values
+      bool bogus_value_test_passed = true;
+      for (hier::PatchLevel::Iterator ipp(level_zero); ipp; ipp++) {
+         patch = level_zero->getPatch(ipp());
+         cdata = patch->getPatchData(fvindx[2]);
+         pdat::FaceIndex index0(hier::Index(2,
+                                   2), pdat::FaceIndex::Y,
+                                pdat::FaceIndex::Lower);
+         pdat::FaceIndex index1(hier::Index(5,
+                                   3), pdat::FaceIndex::Y,
+                                pdat::FaceIndex::Upper);
+
+         // check X axis data
+         for (pdat::FaceIterator c(cdata->getBox(), pdat::FaceIndex::X);
+              c && bogus_value_test_passed;
+              c++) {
+            pdat::FaceIndex face_index = c();
+
+            if (!tbox::MathUtilities<dcomplex>::equalEps((*cdata)(face_index),
+                   dcomplex(4.0, -3.0))) {
+               bogus_value_test_passed = false;
+            }
+         }
+
+         // check Y axis data
+         for (pdat::FaceIterator cc(cdata->getBox(), pdat::FaceIndex::Y);
+              cc && bogus_value_test_passed;
+              cc++) {
+            pdat::FaceIndex face_index = cc();
+
+            if (face_index == index0) {
+               if (!tbox::MathUtilities<dcomplex>::equalEps((*cdata)(face_index),
+                      dcomplex(100.0, -50.0))) {
+                  bogus_value_test_passed = false;
+               }
+            } else {
+               if (face_index == (pdat::FaceIndex)index1) {
+                  if (!tbox::MathUtilities<dcomplex>::equalEps((*cdata)(
+                            face_index),
+                         dcomplex(-1000.0, 20.0))) {
+                     bogus_value_test_passed = false;
+                  }
+               } else {
+                  if (!tbox::MathUtilities<dcomplex>::equalEps((*cdata)(
+                            face_index),
+                         dcomplex(4.0, -3.0))) {
+                     bogus_value_test_passed = false;
+                  }
+               }
+            }
+         }
+      }
+      if (!bogus_value_test_passed) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #13:  Place some bogus values on coarse level"
+         << std::endl;
+         face_ops->printData(fvindx[2], tbox::plog);
+      }
+
+      // Test norms on patch data with fvindex[2] on hierarchy with bogus values
+
+      // Test #14: math::HierarchyFaceDataOpsComplex::L1Norm() - w/o control weight
+      // Expected:  bogus_l1_norm = 2217.003379
+      double bogus_l1_norm = face_ops->L1Norm(fvindx[2]);
+      if (!tbox::MathUtilities<double>::equalEps(bogus_l1_norm, 2217.003379)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #14: math::HierarchyFaceDataOpsComplex::L1Norm()"
+         << " - w/o control weight\n"
+         << "Expected value = 2217.003379, Computed value = "
+         << std::setprecision(12) << bogus_l1_norm << std::endl;
+      }
+
+      // Test #15: math::HierarchyFaceDataOpsComplex::L1Norm() - w/ control weight
+      // Expected:  correct_l1_norm = 5.0
+      double correct_l1_norm = face_ops->L1Norm(fvindx[2], fwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(correct_l1_norm, 5.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #15: math::HierarchyFaceDataOpsComplex::L1Norm()"
+         << " - w/ control weight\n"
+         << "Expected value = 5.0, Computed value = "
+         << std::setprecision(12) << correct_l1_norm << std::endl;
+      }
+
+      // Test #16: math::HierarchyFaceDataOpsComplex::L2Norm()
+      // Expected:  l2_norm = 5.0
+      double l2_norm = face_ops->L2Norm(fvindx[2], fwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(l2_norm, 5.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #16: math::HierarchyFaceDataOpsComplex::L2Norm()\n"
+         << "Expected value = 5.0, Computed value = "
+         << std::setprecision(12) << l2_norm << std::endl;
+      }
+
+      // Test #17: math::HierarchyFaceDataOpsComplex::maxNorm() - w/o control weight
+      // Expected:  bogus_max_norm = 1000.19998
+      double bogus_max_norm = face_ops->maxNorm(fvindx[2]);
+      if (!tbox::MathUtilities<double>::equalEps(bogus_max_norm, 1000.19998)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #17: math::HierarchyFaceDataOpsComplex::maxNorm()"
+         << " - w/o control weight\n"
+         << "Expected value = 1000.19998, Computed value = "
+         << std::setprecision(12) << bogus_max_norm << std::endl;
+      }
+
+      // Test #18: math::HierarchyFaceDataOpsComplex::maxNorm() - w/o control weight
+      // Expected:  bogus_max_norm = 1000.19998
+      double max_norm = face_ops->maxNorm(fvindx[2], fwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(max_norm, 5.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #18: math::HierarchyFaceDataOpsComplex::maxNorm()"
+         << " - w/ control weight\n"
+         << "Expected value = 5.0, Computed value = "
+         << std::setprecision(12) << max_norm << std::endl;
+      }
+
+      // Reset data and test sums, axpy's
+      face_ops->setToScalar(fvindx[0], dcomplex(1.0, -3.0));
+      face_ops->setToScalar(fvindx[1], dcomplex(2.5, 3.0));
+      face_ops->setToScalar(fvindx[2], dcomplex(7.0, 0.0));
+
+      // Test #19: math::HierarchyFaceDataOpsComplex::linearSum()
+      // Expected:  v3 = (2.0,5.0)
+      face_ops->linearSum(fvindx[3],
+         dcomplex(2.0, 0.0), fvindx[1], dcomplex(0.0, -1.0), fvindx[0]);
+      dcomplex val_linearSum(2.0, 5.0);
+      if (!complexDataSameAsValue(fvindx[3], val_linearSum, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #19: math::HierarchyFaceDataOpsComplex::linearSum()\n"
+         << "Expected: v3 = " << val_linearSum << std::endl;
+         face_ops->printData(fvindx[3], tbox::plog);
+      }
+
+      // Test #20: math::HierarchyFaceDataOpsComplex::axmy()
+      // Expected:  v3 = (6.5,12.0)
+      face_ops->axmy(fvindx[3], 3.0, fvindx[1], fvindx[0]);
+      dcomplex val_axmy(6.5, 12.0);
+      if (!complexDataSameAsValue(fvindx[3], val_axmy, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #20: math::HierarchyFaceDataOpsComplex::axmy()\n"
+         << "Expected: v3 = " << val_axmy << std::endl;
+         face_ops->printData(fvindx[3], tbox::plog);
+      }
+
+      // Test #21a: math::HierarchyFaceDataOpsComplex::dot()
+      // Expected:  cdot = (17.5,-21.0)
+      dcomplex cdot = face_ops->dot(fvindx[2], fvindx[1], fwgt_id);
+      dcomplex ans_2_dot_1(17.5, -21.0);
+      if (!tbox::MathUtilities<dcomplex>::equalEps(cdot, ans_2_dot_1)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #21a: math::HierarchyFaceDataOpsComplex::dot()\n"
+         << "Expected value = (17.5,-21.0), Computed value = "
+         << cdot << std::endl;
+      }
+
+      // Test #21b: math::HierarchyFaceDataOpsComplex::dot()
+      // Expected:  cdot = (17.5,21.0)
+      dcomplex cdot2 = face_ops->dot(fvindx[1], fvindx[2], fwgt_id);
+      dcomplex ans_1_dot_2(17.5, 21.0);
+      if (!tbox::MathUtilities<dcomplex>::equalEps(cdot2, ans_1_dot_2)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #21b: math::HierarchyFaceDataOpsComplex::dot()\n"
+         << "Expected value = (17.5,21.0), Computed value = "
+         << cdot2 << std::endl;
+      }
+
+      // Test #22: math::HierarchyFaceDataOpsComplex::abs()
+      // Expected: abs(v0) = 5.0
+      face_ops->setToScalar(fvindx[0], dcomplex(4.0, -3.0));
+      face_ops->abs(fwgt_id, fvindx[0]);
+      if (!doubleDataSameAsValue(fwgt_id, 5.0, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #22: math::HierarchyFaceDataOpsComplex::abs()\n"
+         << "Expected: abs(v0) = 5.0" << std::endl;
+         fwgt_ops->printData(fwgt_id, tbox::plog);
+      }
+
+      // deallocate data on hierarchy
+      for (ln = 0; ln < 2; ln++) {
+         hierarchy->getPatchLevel(ln)->deallocatePatchData(fwgt_id);
+         for (iv = 0; iv < NVARS; iv++) {
+            hierarchy->getPatchLevel(ln)->deallocatePatchData(fvindx[iv]);
+         }
+      }
+
+      for (iv = 0; iv < NVARS; iv++) {
+         fvar[iv].setNull();
+      }
+      fwgt.setNull();
+
+      geometry.setNull();
+      hierarchy.setNull();
+      face_ops.setNull();
+      fwgt_ops.setNull();
+
+      if (num_failures == 0) {
+         tbox::pout << "\nPASSED:  face cplxtest" << std::endl;
+      }
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return num_failures;
+}
+
+/*
+ * Returns true if all the data in the hierarchy is equal to the specified
+ * value.  Returns false otherwise.
+ */
+static bool
+complexDataSameAsValue(
+   int desc_id,
+   dcomplex value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   bool test_passed = true;
+
+   int ln;
+   tbox::Pointer<hier::Patch> patch;
+   for (ln = 0; ln < 2; ln++) {
+
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         patch = level->getPatch(ip());
+         tbox::Pointer<pdat::FaceData<dcomplex> > fvdata = patch->getPatchData(
+               desc_id);
+
+         for (pdat::FaceIterator f(fvdata->getBox(), 1); f && test_passed;
+              f++) {
+            pdat::FaceIndex face_index = f();
+            if (!tbox::MathUtilities<dcomplex>::equalEps((*fvdata)(face_index),
+                   value)) {
+               test_passed = false;
+            }
+         }
+      }
+   }
+
+   return test_passed;
+}
+
+/*
+ * Returns true if all the data in the hierarchy is equal to the specified
+ * value.  Returns false otherwise.
+ */
+static bool
+doubleDataSameAsValue(
+   int desc_id,
+   double value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   bool test_passed = true;
+
+   int ln;
+   tbox::Pointer<hier::Patch> patch;
+   for (ln = 0; ln < 2; ln++) {
+
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         patch = level->getPatch(ip());
+         tbox::Pointer<pdat::FaceData<double> > fvdata = patch->getPatchData(
+               desc_id);
+
+         for (pdat::FaceIterator f(fvdata->getBox(), 1); f && test_passed;
+              f++) {
+            pdat::FaceIndex face_index = f();
+            if (!tbox::MathUtilities<double>::equalEps((*fvdata)(face_index),
+                   value)) {
+               test_passed = false;
+            }
+         }
+      }
+   }
+
+   return test_passed;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dataops/face_hiertest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dataops/face_hiertest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,863 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program to test face-centered patch data ops 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fstream>
+#include <iomanip>
+using namespace std;
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/math/HierarchyDataOpsComplex.h"
+#include "SAMRAI/math/HierarchyFaceDataOpsComplex.h"
+#include "SAMRAI/math/HierarchyDataOpsReal.h"
+#include "SAMRAI/math/HierarchyFaceDataOpsReal.h"
+#include "SAMRAI/pdat/FaceIndex.h"
+#include "SAMRAI/pdat/FaceIterator.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/ProcessorMapping.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/hier/VariableContext.h"
+
+using namespace SAMRAI;
+
+/* Helper function declarations */
+static bool
+doubleDataSameAsValue(
+   int desc_id,
+   double value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+#define NVARS 4
+
+int main(
+   int argc,
+   char* argv[]) {
+
+   int num_failures = 0;
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   if (argc < 2) {
+      TBOX_ERROR("Usage: " << argv[0] << " [dimension]");
+   }
+
+   const unsigned short d = static_cast<unsigned short>(atoi(argv[1]));
+   TBOX_ASSERT(d > 0);
+   TBOX_ASSERT(d <= tbox::Dimension::MAXIMUM_DIMENSION_VALUE);
+   const tbox::Dimension dim(d);
+
+   if (dim != tbox::Dimension(2)) {
+      TBOX_ERROR("This test code is completed only for 2D!!!");
+   }
+
+   const std::string log_fn = std::string("face_hiertest.")
+      + tbox::Utilities::intToString(dim.getValue(), 1) + "d.log";
+   tbox::PIO::logAllNodes(log_fn);
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+
+      const tbox::Dimension dim2d(2);
+
+      int ln, iv;
+
+      // Make a dummy hierarchy domain
+      double lo[2] = { 0.0, 0.0 };
+      double hi[2] = { 1.0, 0.5 };
+
+      int coarse0_array[2][2] = { { 0, 0 }, { 9, 2 } };
+      hier::Box coarse0((hier::Index(dim2d, coarse0_array[0])), (hier::Index(
+                                                                    dim2d,
+                                                                    coarse0_array
+                                                                    [1])));
+
+      int coarse1_array[2][2] = { { 0, 3 }, { 9, 4 } };
+      hier::Box coarse1((hier::Index(dim2d, coarse1_array[0])), (hier::Index(
+                                                                    dim2d,
+                                                                    coarse1_array
+                                                                    [1])));
+
+      int fine0_array[2][2] = { { 4, 4 }, { 7, 7 } };
+      hier::Box fine0((hier::Index(dim2d, fine0_array[0])), (hier::Index(dim2d,
+                                                                fine0_array[1])));
+
+      int fine1_array[2][2] = { { 8, 4 }, { 13, 7 } };
+      hier::Box fine1((hier::Index(dim2d, fine1_array[0])), (hier::Index(dim2d,
+                                                                fine1_array[1])));
+
+      hier::IntVector ratio(dim2d, 2);
+
+      hier::BoxArray coarse_domain(dim2d, 2);
+      hier::BoxArray fine_boxes(dim2d, 2);
+      coarse_domain[0] = coarse0;
+      coarse_domain[1] = coarse1;
+      fine_boxes[0] = fine0;
+      fine_boxes[1] = fine1;
+
+      tbox::Pointer<geom::CartesianGridGeometry> geometry(
+         new geom::CartesianGridGeometry("CartesianGeometry",
+            lo,
+            hi,
+            coarse_domain));
+
+      tbox::Pointer<hier::PatchHierarchy> hierarchy(
+         new hier::PatchHierarchy("PatchHierarchy", geometry));
+
+      hierarchy->setMaxNumberOfLevels(2);
+      hierarchy->setRatioToCoarserLevel(ratio, 1);
+
+      // Note: For these simple tests we allow at most 2 processors.
+      const int nproc = mpi.getSize();
+      TBOX_ASSERT(nproc < 3);
+
+      const int n_coarse_boxes = coarse_domain.getNumberOfBoxes();
+      const int n_fine_boxes = fine_boxes.getNumberOfBoxes();
+
+      hier::MappedBoxLevel layer0(hier::IntVector(dim, 1));
+      hier::MappedBoxLevel layer1(ratio);
+
+      for (int ib = 0; ib < n_coarse_boxes; ib++) {
+         if (nproc > 1) {
+            if (ib == layer0.getRank()) {
+               layer0.addMappedBox(hier::MappedBox(coarse_domain[ib], hier::LocalId(ib),
+                     layer0.getRank()));
+            }
+         } else {
+            layer0.addMappedBox(hier::MappedBox(coarse_domain[ib], hier::LocalId(ib), 0));
+         }
+      }
+
+      for (int ib = 0; ib < n_fine_boxes; ib++) {
+         if (nproc > 1) {
+            if (ib == layer1.getRank()) {
+               layer1.addMappedBox(hier::MappedBox(fine_boxes[ib], hier::LocalId(ib),
+                     layer1.getRank()));
+            }
+         } else {
+            layer1.addMappedBox(hier::MappedBox(fine_boxes[ib], hier::LocalId(ib), 0));
+         }
+      }
+
+      hierarchy->makeNewPatchLevel(0, layer0);
+      hierarchy->makeNewPatchLevel(1, layer1);
+
+      // Create instance of hier::Variable database
+      hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+      tbox::Pointer<hier::VariableContext> dummy = variable_db->getContext(
+            "dummy");
+      const hier::IntVector no_ghosts(dim2d, 0);
+
+      // Make some dummy variables and data on the hierarchy
+      tbox::Pointer<pdat::FaceVariable<double> > fvar[NVARS];
+      int fvindx[NVARS];
+      fvar[0] = new pdat::FaceVariable<double>(dim, "fvar0", 1);
+      fvindx[0] = variable_db->registerVariableAndContext(
+            fvar[0], dummy, no_ghosts);
+      fvar[1] = new pdat::FaceVariable<double>(dim, "fvar1", 1);
+      fvindx[1] = variable_db->registerVariableAndContext(
+            fvar[1], dummy, no_ghosts);
+      fvar[2] = new pdat::FaceVariable<double>(dim, "fvar2", 1);
+      fvindx[2] = variable_db->registerVariableAndContext(
+            fvar[2], dummy, no_ghosts);
+      fvar[3] = new pdat::FaceVariable<double>(dim, "fvar3", 1);
+      fvindx[3] = variable_db->registerVariableAndContext(
+            fvar[3], dummy, no_ghosts);
+
+      tbox::Pointer<pdat::FaceVariable<double> >
+      fwgt(new pdat::FaceVariable<double>(dim, "fwgt", 1));
+      int fwgt_id = variable_db->registerVariableAndContext(
+            fwgt, dummy, no_ghosts);
+
+      // allocate data on hierarchy
+      for (ln = 0; ln < 2; ln++) {
+         hierarchy->getPatchLevel(ln)->allocatePatchData(fwgt_id);
+         for (iv = 0; iv < NVARS; iv++) {
+            hierarchy->getPatchLevel(ln)->allocatePatchData(fvindx[iv]);
+         }
+      }
+
+      tbox::Pointer<math::HierarchyDataOpsReal<double> > face_ops(
+         new math::HierarchyFaceDataOpsReal<double>(hierarchy, 0, 1));
+      TBOX_ASSERT(!face_ops.isNull());
+
+      tbox::Pointer<math::HierarchyDataOpsReal<double> > fwgt_ops(
+         new math::HierarchyFaceDataOpsReal<double>(hierarchy, 0, 1));
+
+      tbox::Pointer<hier::Patch> patch;
+      tbox::Pointer<geom::CartesianPatchGeometry> pgeom;
+
+      // Initialize control volume data for face-centered components
+      hier::Box coarse_fine = fine0 + fine1;
+      coarse_fine.coarsen(ratio);
+      for (ln = 0; ln < 2; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::Pointer<pdat::FaceData<double> > data;
+            patch = *ip;
+            pgeom = patch->getPatchGeometry();
+            const double* dx = pgeom->getDx();
+            const double face_vol = dx[0] * dx[1];
+            data = patch->getPatchData(fwgt_id);
+            data->fillAll(face_vol);
+            pdat::FaceIndex fi(dim);
+            int plo0 = patch->getBox().lower(0);
+            int phi0 = patch->getBox().upper(0);
+            int plo1 = patch->getBox().lower(1);
+            int phi1 = patch->getBox().upper(1);
+            int ic;
+
+            if (ln == 0) {
+               data->fillAll(0.0, (coarse_fine * patch->getBox()));
+
+               if (patch->getLocalId() == 0) {
+                  //bottom face boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     int array_lo[2] = { ic, plo1 };
+                     fi = pdat::FaceIndex(hier::Index(dim2d,
+                              array_lo), pdat::FaceIndex::Y,
+                           pdat::FaceIndex::Lower);
+                     (*data)(fi) *= 0.5;
+                  }
+                  //left and right face boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     int array_lo[2] = { plo0, ic };
+                     fi = pdat::FaceIndex(hier::Index(dim2d,
+                              array_lo), pdat::FaceIndex::X,
+                           pdat::FaceIndex::Lower);
+                     (*data)(fi) *= 0.5;
+                     int array_up[2] = { phi0, ic };
+                     fi = pdat::FaceIndex(hier::Index(dim2d,
+                              array_up), pdat::FaceIndex::X,
+                           pdat::FaceIndex::Upper);
+                     (*data)(fi) *= 0.5;
+                  }
+               } else {
+                  //top and bottom face boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     int array_lo[2] = { ic, plo1 };
+                     fi = pdat::FaceIndex(hier::Index(dim2d,
+                              array_lo), pdat::FaceIndex::Y,
+                           pdat::FaceIndex::Lower);
+                     (*data)(fi) = 0.0;
+                     int array_up[2] = { ic, phi1 };
+                     fi = pdat::FaceIndex(hier::Index(dim2d,
+                              array_up), pdat::FaceIndex::Y,
+                           pdat::FaceIndex::Upper);
+                     (*data)(fi) *= 0.5;
+                  }
+                  //left and right face boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     int array_lo[2] = { plo0, ic };
+                     fi = pdat::FaceIndex(hier::Index(dim2d,
+                              array_lo), pdat::FaceIndex::X,
+                           pdat::FaceIndex::Lower);
+                     (*data)(fi) *= 0.5;
+                     int array_up[2] = { phi0, ic };
+                     fi = pdat::FaceIndex(hier::Index(dim2d,
+                              array_up), pdat::FaceIndex::X,
+                           pdat::FaceIndex::Upper);
+                     (*data)(fi) *= 0.5;
+                  }
+               }
+            } else {
+               if (patch->getLocalId() == 0) {
+                  // top and bottom coarse-fine face boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     int array_lo[2] = { ic, plo1 };
+                     fi = pdat::FaceIndex(hier::Index(dim2d,
+                              array_lo), pdat::FaceIndex::Y,
+                           pdat::FaceIndex::Lower);
+                     (*data)(fi) *= 1.5;
+                     int array_up[2] = { ic, phi1 };
+                     fi = pdat::FaceIndex(hier::Index(dim2d,
+                              array_up), pdat::FaceIndex::Y,
+                           pdat::FaceIndex::Upper);
+                     (*data)(fi) *= 1.5;
+                  }
+                  //left coarse-fine face boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     int array_lo[2] = { plo0, ic };
+                     fi = pdat::FaceIndex(hier::Index(dim2d,
+                              array_lo), pdat::FaceIndex::X,
+                           pdat::FaceIndex::Lower);
+                     (*data)(fi) *= 1.5;
+                  }
+               } else {
+                  // top and bottom coarse-fine face boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     int array_lo[2] = { ic, plo1 };
+                     fi = pdat::FaceIndex(hier::Index(dim2d,
+                              array_lo), pdat::FaceIndex::Y,
+                           pdat::FaceIndex::Lower);
+                     (*data)(fi) *= 1.5;
+                     int array_up[2] = { ic, phi1 };
+                     fi = pdat::FaceIndex(hier::Index(dim2d,
+                              array_up), pdat::FaceIndex::Y,
+                           pdat::FaceIndex::Upper);
+                     (*data)(fi) *= 1.5;
+                  }
+                  //left and right coarse-fine face boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     int array_lo[2] = { plo0, ic };
+                     fi = pdat::FaceIndex(hier::Index(dim2d,
+                              array_lo), pdat::FaceIndex::X,
+                           pdat::FaceIndex::Lower);
+                     (*data)(fi) = 0.0;
+                     int array_up[2] = { phi0, ic };
+                     fi = pdat::FaceIndex(hier::Index(dim2d,
+                              array_up), pdat::FaceIndex::X,
+                           pdat::FaceIndex::Upper);
+                     (*data)(fi) *= 1.5;
+                  }
+               }
+            }
+         }
+      }
+
+      // Test #1: Print out control volume data and compute its integral
+
+      // Test #1a: Check control volume data set properly
+      // Expected: cwgt = 0.01 on coarse (except where finer patch exists) and
+      // 0.0025 on fine level
+/*   bool vol_test_passed = true;
+ *   for (ln = 0; ln < 2; ln++) {
+ *   for (hier::PatchLevel::Iterator ip(hierarchy->getPatchLevel(ln)); ip; ip++) {
+ *   patch = hierarchy->getPatchLevel(ln)->getPatch(ip());
+ *   tbox::Pointer< pdat::FaceData<double> > cvdata = patch->getPatchData(cwgt_id);
+ *
+ *   for (pdat::FaceIterator c(cvdata->getBox(),1);c && vol_test_passed;c++) {
+ *   pdat::FaceIndex face_index = c();
+ *
+ *   if (ln == 0) {
+ *   if ((coarse_fine * patch->getBox()).contains(face_index)) {
+ *   if ( !tbox::MathUtilities<double>::equalEps((*cvdata)(face_index),0.0) ) {
+ *   vol_test_passed = false;
+ *   }
+ *   } else {
+ *   if ( !tbox::MathUtilities<double>::equalEps((*cvdata)(face_index),0.01) ) {
+ *   vol_test_passed = false;
+ *   }
+ *   }
+ *   }
+ *
+ *   if (ln == 1) {
+ *   if ( !tbox::MathUtilities<double>::equalEps((*cvdata)(face_index),0.0025) ) {
+ *   vol_test_passed = false;
+ *   }
+ *   }
+ *   }
+ *   }
+ *   }
+ *   if (!vol_test_passed) {
+ *   num_failures++;
+ *   tbox::perr << "FAILED: - Test #1a: Check control volume data set properly" << std::endl;
+ *   cwgt_ops->printData(cwgt_id, tbox::plog);
+ *   }
+ */
+      // Print out control volume data and compute its integral
+/*   tbox::plog << "face control volume data" << std::endl;
+ *   fwgt_ops->printData(fwgt_id, tbox::plog);
+ */
+
+      // Test #1b: math::HierarchyFaceDataOpsReal::sumControlVolumes()
+      // Expected: norm = 1.0
+      double norm = face_ops->sumControlVolumes(fvindx[0], fwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(norm, 1.0)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #1b: math::HierarchyFaceDataOpsReal::sumControlVolumes()\n"
+         << "Expected value = 1.0 , Computed value = "
+         << norm << std::endl;
+      }
+
+      // Test #2: math::HierarchyFaceDataOpsReal::numberOfEntries()
+      // Expected: num_data_points = 209
+      int num_data_points = face_ops->numberOfEntries(fvindx[0]);
+      if (num_data_points != 209) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #2: math::HierarchyFaceDataOpsReal::numberOfEntries()\n"
+         << "Expected value = 209, Computed value = "
+         << num_data_points << std::endl;
+      }
+
+      // Test #3a: math::HierarchyFaceDataOpsReal::setToScalar()
+      // Expected: v0 = 2.0
+      double val0 = double(2.0);
+      face_ops->setToScalar(fvindx[0], val0);
+      if (!doubleDataSameAsValue(fvindx[0], val0, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #3a: math::HierarchyFaceDataOpsReal::setToScalar()\n"
+         << "Expected: v0 = " << val0 << std::endl;
+         face_ops->printData(fvindx[0], tbox::plog);
+      }
+
+      // Test #3b: math::HierarchyFaceDataOpsReal::setToScalar()
+      // Expected: v1 = (4.0)
+      face_ops->setToScalar(fvindx[1], 4.0);
+      double val1 = double(4.0);
+      if (!doubleDataSameAsValue(fvindx[1], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #3b: math::HierarchyFaceDataOpsReal::setToScalar()\n"
+         << "Expected: v1 = " << val1 << std::endl;
+         face_ops->printData(fvindx[1], tbox::plog);
+      }
+
+      // Test #4: math::HierarchyFaceDataOpsReal::copyData()
+      // Expected: v2 = v1 = (4.0)
+      face_ops->copyData(fvindx[2], fvindx[1]);
+      if (!doubleDataSameAsValue(fvindx[2], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #4: math::HierarchyFaceDataOpsReal::copyData()\n"
+         << "Expected: v2 = " << val1 << std::endl;
+         face_ops->printData(fvindx[2], tbox::plog);
+      }
+
+      // Test #5: math::HierarchyFaceDataOpsReal::swapData()
+      // Expected: v0 = (4.0), v1 = (2.0)
+      face_ops->swapData(fvindx[0], fvindx[1]);
+      if (!doubleDataSameAsValue(fvindx[0], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #5a: math::HierarchyFaceDataOpsReal::swapData()\n"
+         << "Expected: v0 = " << val1 << std::endl;
+         face_ops->printData(fvindx[0], tbox::plog);
+      }
+      if (!doubleDataSameAsValue(fvindx[1], val0, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #5b: math::HierarchyFaceDataOpsReal::swapData()\n"
+         << "Expected: v1 = " << val0 << std::endl;
+         face_ops->printData(fvindx[1], tbox::plog);
+      }
+
+      // Test #6: math::HierarchyFaceDataOpsReal::scale()
+      // Expected: v2 = 0.25 * v2 = (1.0)
+      face_ops->scale(fvindx[2], 0.25, fvindx[2]);
+      double val_scale = 1.0;
+      if (!doubleDataSameAsValue(fvindx[2], val_scale, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #6: math::HierarchyFaceDataOpsReal::swapData()\n"
+         << "Expected: v2 = " << val_scale << std::endl;
+         face_ops->printData(fvindx[2], tbox::plog);
+      }
+
+      // Test #7: math::HierarchyFaceDataOpsReal::add()
+      // Expected: v3 = v0 + v1 = (6.0)
+      face_ops->add(fvindx[3], fvindx[0], fvindx[1]);
+      double val_add = 6.0;
+      if (!doubleDataSameAsValue(fvindx[3], val_add, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #7: math::HierarchyFaceDataOpsReal::add()\n"
+         << "Expected: v3 = " << val_add << std::endl;
+         face_ops->printData(fvindx[3], tbox::plog);
+      }
+
+      // Reset v0: v0 = (0.0)
+      face_ops->setToScalar(fvindx[0], 0.0);
+
+      // Test #8: math::HierarchyFaceDataOpsReal::subtract()
+      // Expected: v1 = v3 - v0 = (6.0)
+      face_ops->subtract(fvindx[1], fvindx[3], fvindx[0]);
+      double val_sub = 6.0;
+      if (!doubleDataSameAsValue(fvindx[1], val_sub, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #8: math::HierarchyFaceDataOpsReal::subtract()\n"
+         << "Expected: v1 = " << val_sub << std::endl;
+         face_ops->printData(fvindx[1], tbox::plog);
+      }
+
+      // Test #9a: math::HierarchyFaceDataOpsReal::addScalar()
+      // Expected: v1 = v1 + (0.0) = (6.0)
+      face_ops->addScalar(fvindx[1], fvindx[1], 0.0);
+      double val_addScalar = 6.0;
+      if (!doubleDataSameAsValue(fvindx[1], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #9a: math::HierarchyFaceDataOpsReal::addScalar()\n"
+         << "Expected: v1 = " << val_addScalar << std::endl;
+         face_ops->printData(fvindx[1], tbox::plog);
+      }
+
+      // Test #9b: math::HierarchyFaceDataOpsReal::addScalar()
+      // Expected: v2 = v2 + (0.0) = (1.0)
+      face_ops->addScalar(fvindx[2], fvindx[2], 0.0);
+      val_addScalar = 1.0;
+      if (!doubleDataSameAsValue(fvindx[2], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #9b: math::HierarchyFaceDataOpsReal::addScalar()\n"
+         << "Expected: v2 = " << val_addScalar << std::endl;
+         face_ops->printData(fvindx[2], tbox::plog);
+      }
+
+      // Test #9c: math::HierarchyFaceDataOpsReal::addScalar()
+      // Expected: v2 = v2 + (3.0) = (4.0)
+      face_ops->addScalar(fvindx[2], fvindx[2], 3.0);
+      val_addScalar = 4.0;
+      if (!doubleDataSameAsValue(fvindx[2], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #9c: math::HierarchyFaceDataOpsReal::addScalar()\n"
+         << "Expected: v2 = " << val_addScalar << std::endl;
+         face_ops->printData(fvindx[2], tbox::plog);
+      }
+
+      // Reset v3: v3 = (0.5)
+      face_ops->setToScalar(fvindx[3], 0.5);
+
+      // Test #10: math::HierarchyFaceDataOpsReal::multiply()
+      // Expected:  v1 = v3 * v1 = (3.0)
+      face_ops->multiply(fvindx[1], fvindx[3], fvindx[1]);
+      double val_mult = 3.0;
+      if (!doubleDataSameAsValue(fvindx[1], val_mult, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #10: math::HierarchyFaceDataOpsReal::multiply()\n"
+         << "Expected: v1 = " << val_mult << std::endl;
+         face_ops->printData(fvindx[1], tbox::plog);
+      }
+
+      // Test #11: math::HierarchyFaceDataOpsReal::divide()
+      // Expected:  v0 = v2 / v1 = 1.3333333333
+      face_ops->divide(fvindx[0], fvindx[2], fvindx[1]);
+      double val_div = 1.3333333333333;
+      if (!doubleDataSameAsValue(fvindx[0], val_div, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #11: math::HierarchyFaceDataOpsReal::divide()\n"
+         << "Expected: v0 = " << val_div << std::endl;
+         face_ops->printData(fvindx[0], tbox::plog);
+      }
+
+      // Test #12: math::HierarchyFaceDataOpsReal::reciprocal()
+      // Expected:  v1 = 1 / v1 = (0.333333333)
+      face_ops->reciprocal(fvindx[1], fvindx[1]);
+      double val_rec = 0.3333333333333;
+      if (!doubleDataSameAsValue(fvindx[1], val_rec, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #12: math::HierarchyFaceDataOpsReal::reciprocal()\n"
+         << "Expected: v1 = " << val_rec << std::endl;
+         face_ops->printData(fvindx[1], tbox::plog);
+      }
+
+      // Test #13: math::HierarchyFaceDataOpsReal::abs()
+      // Expected:  v3 = abs(v2) = 4.0
+      face_ops->abs(fvindx[3], fvindx[2]);
+      double val_abs = 4.0;
+      if (!doubleDataSameAsValue(fvindx[3], val_abs, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #13: math::HierarchyFaceDataOpsReal::abs()\n"
+         << "Expected: v3 = " << val_abs << std::endl;
+         face_ops->printData(fvindx[3], tbox::plog);
+      }
+
+      // Test #14: Place some bogus values on coarse level
+      tbox::Pointer<pdat::FaceData<double> > fdata;
+
+      // set values
+      tbox::Pointer<hier::PatchLevel> level_zero =
+         hierarchy->getPatchLevel(0);
+      for (hier::PatchLevel::Iterator ip(level_zero); ip; ip++) {
+         patch = *ip;
+         fdata = patch->getPatchData(fvindx[2]);
+         int array0[2] = { 2, 2 };
+         hier::Index index0(dim2d, array0);
+         int array1[2] = { 5, 3 };
+         hier::Index index1(dim2d, array1);
+         if (patch->getBox().contains(index0)) {
+            (*fdata)(pdat::FaceIndex(index0, pdat::FaceIndex::Y,
+                        pdat::FaceIndex::Lower), 0) = 100.0;
+         }
+         if (patch->getBox().contains(index1)) {
+            (*fdata)(pdat::FaceIndex(index1, pdat::FaceIndex::Y,
+                        pdat::FaceIndex::Upper), 0) = -1000.0;
+         }
+      }
+
+      // check values
+      bool bogus_value_test_passed = true;
+
+      for (hier::PatchLevel::Iterator ipp(level_zero); ipp; ipp++) {
+         patch = *ipp;
+         fdata = patch->getPatchData(fvindx[2]);
+         int array0[2] = { 2, 2 };
+         pdat::FaceIndex index0(hier::Index(dim2d,
+                                   array0), pdat::FaceIndex::Y,
+                                pdat::FaceIndex::Lower);
+         int array1[2] = { 5, 3 };
+         pdat::FaceIndex index1(hier::Index(dim2d,
+                                   array1), pdat::FaceIndex::Y,
+                                pdat::FaceIndex::Upper);
+
+         // check X axis data
+         for (pdat::FaceIterator c(fdata->getBox(), pdat::FaceIndex::X);
+              c && bogus_value_test_passed;
+              c++) {
+            pdat::FaceIndex face_index = c();
+
+            if (!tbox::MathUtilities<double>::equalEps((*fdata)(face_index),
+                   4.0)) {
+               bogus_value_test_passed = false;
+            }
+         }
+
+         // check Y axis data
+         for (pdat::FaceIterator cc(fdata->getBox(), pdat::FaceIndex::Y);
+              cc && bogus_value_test_passed;
+              cc++) {
+            pdat::FaceIndex face_index = cc();
+
+            if (face_index == index0) {
+               if (!tbox::MathUtilities<double>::equalEps((*fdata)(face_index),
+                      100.0)) {
+                  bogus_value_test_passed = false;
+               }
+            } else {
+               if (face_index == index1) {
+                  if (!tbox::MathUtilities<double>::equalEps((*fdata)(
+                            face_index), -1000.0)) {
+                     bogus_value_test_passed = false;
+                  }
+               } else {
+                  if (!tbox::MathUtilities<double>::equalEps((*fdata)(
+                            face_index), 4.0)) {
+                     bogus_value_test_passed = false;
+                  }
+               }
+            }
+         }
+      }
+      if (!bogus_value_test_passed) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #14:  Place some bogus values on coarse level"
+         << std::endl;
+         face_ops->printData(fvindx[2], tbox::plog);
+      }
+
+      // Test #15: math::HierarchyFaceDataOpsReal::L1Norm() - w/o control weight
+      // Expected:  bogus_l1_norm = 1984.00
+      double bogus_l1_norm = face_ops->L1Norm(fvindx[2]);
+      if (!tbox::MathUtilities<double>::equalEps(bogus_l1_norm, 1984.00)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #15: math::HierarchyFaceDataOpsReal::L1Norm()"
+         << " - w/o control weight\n"
+         << "Expected value = 1984.00, Computed value = "
+         << std::setprecision(12) << bogus_l1_norm << std::endl;
+      }
+
+      // Test #16: math::HierarchyFaceDataOpsReal::L1Norm() - w/control weight
+      // Expected:  correct_l1_norm = 4.0
+      double correct_l1_norm = face_ops->L1Norm(fvindx[2], fwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(correct_l1_norm, 4.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #16: math::HierarchyFaceDataOpsReal::L1Norm()"
+         << " - w/control weight\n"
+         << "Expected value = 4.0, Computed value = "
+         << correct_l1_norm << std::endl;
+      }
+
+      // Test #17: math::HierarchyFaceDataOpsReal::L2Norm()
+      // Expected:  l2_norm =  4.0
+      double l2_norm = face_ops->L2Norm(fvindx[2], fwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(l2_norm, 4.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #17: math::HierarchyFaceDataOpsReal::L2Norm()\n"
+         << "Expected value = 4.0, Computed value = "
+         << l2_norm << std::endl;
+      }
+
+      // Test #18: math::HierarchyFaceDataOpsReal::L1Norm() - w/o control weight
+      // Expected:  bogus_max_norm = 1000.0
+      double bogus_max_norm = face_ops->maxNorm(fvindx[2]);
+      if (!tbox::MathUtilities<double>::equalEps(bogus_max_norm, 1000.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #18: math::HierarchyFaceDataOpsReal::L1Norm()"
+         << " - w/o control weight\n"
+         << "Expected value = 1000.0, Computed value = "
+         << bogus_max_norm << std::endl;
+      }
+
+      // Test #19: math::HierarchyFaceDataOpsReal::L1Norm() - w/control weight
+      // Expected:  max_norm = 4.0
+      double max_norm = face_ops->maxNorm(fvindx[2], fwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(max_norm, 4.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #19: math::HierarchyFaceDataOpsReal::L1Norm()"
+         << " - w/control weight\n"
+         << "Expected value = 4.0, Computed value = "
+         << max_norm << std::endl;
+      }
+
+      // Reset data and test sums, axpy's
+      face_ops->setToScalar(fvindx[0], 1.0);
+      face_ops->setToScalar(fvindx[1], 2.5);
+      face_ops->setToScalar(fvindx[2], 7.0);
+
+      // Test #20: math::HierarchyFaceDataOpsReal::linearSum()
+      // Expected:  v3 = 5.0
+      face_ops->linearSum(fvindx[3], 2.0, fvindx[1], 0.0, fvindx[0]);
+      double val_linearSum = 5.0;
+      if (!doubleDataSameAsValue(fvindx[3], val_linearSum, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #20: math::HierarchyFaceDataOpsReal::linearSum()\n"
+         << "Expected: v3 = " << val_linearSum << std::endl;
+         face_ops->printData(fvindx[3], tbox::plog);
+      }
+
+      // Test #21: math::HierarchyFaceDataOpsReal::axmy()
+      // Expected:  v3 = 6.5
+      face_ops->axmy(fvindx[3], 3.0, fvindx[1], fvindx[0]);
+      double val_axmy = 6.5;
+      if (!doubleDataSameAsValue(fvindx[3], val_axmy, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #21: math::HierarchyFaceDataOpsReal::axmy()\n"
+         << "Expected: v3 = " << val_axmy << std::endl;
+         face_ops->printData(fvindx[3], tbox::plog);
+      }
+
+      // Test #22a: math::HierarchyFaceDataOpsReal::dot() - (ind2) * (ind1)
+      // Expected:  cdot = 17.5
+      double cdot = face_ops->dot(fvindx[2], fvindx[1], fwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(cdot, 17.5)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #22a: math::HierarchyFaceDataOpsReal::dot() - (ind2) * (ind1)\n"
+         << "Expected Value = 17.5, Computed Value = "
+         << cdot << std::endl;
+      }
+
+      // Test #22b: math::HierarchyFaceDataOpsReal::dot() - (ind1) * (ind2)
+      // Expected:  cdot = 17.5
+      cdot = face_ops->dot(fvindx[1], fvindx[2], fwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(cdot, 17.5)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #22b: math::HierarchyFaceDataOpsReal::dot() - (ind1) * (ind2)\n"
+         << "Expected Value = 17.5, Computed Value = "
+         << cdot << std::endl;
+      }
+
+      // deallocate data on hierarchy
+      for (ln = 0; ln < 2; ln++) {
+         hierarchy->getPatchLevel(ln)->deallocatePatchData(fwgt_id);
+         for (iv = 0; iv < NVARS; iv++) {
+            hierarchy->getPatchLevel(ln)->deallocatePatchData(fvindx[iv]);
+         }
+      }
+
+      for (iv = 0; iv < NVARS; iv++) {
+         fvar[iv].setNull();
+      }
+      fwgt.setNull();
+
+      geometry.setNull();
+      hierarchy.setNull();
+      face_ops.setNull();
+      fwgt_ops.setNull();
+
+      if (num_failures == 0) {
+         tbox::pout << "\nPASSED:  face hiertest" << std::endl;
+      }
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return num_failures;
+}
+
+/*
+ * Returns true if all the data in the hierarchy is equal to the specified
+ * value.  Returns false otherwise.
+ */
+static bool
+doubleDataSameAsValue(
+   int desc_id,
+   double value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   bool test_passed = true;
+
+   int ln;
+   tbox::Pointer<hier::Patch> patch;
+   for (ln = 0; ln < 2; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         patch = *ip;
+         tbox::Pointer<pdat::FaceData<double> > fvdata = patch->getPatchData(
+               desc_id);
+
+         for (pdat::FaceIterator c(fvdata->getBox(), 1); c && test_passed;
+              c++) {
+            pdat::FaceIndex face_index = c();
+            if (!tbox::MathUtilities<double>::equalEps((*fvdata)(face_index),
+                   value)) {
+               test_passed = false;
+            }
+         }
+      }
+   }
+
+   return test_passed;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dataops/indx_dataops.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dataops/indx_dataops.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,197 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program to test index data operations 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+// class holding information stored in index data
+#include "SampleIndexData.h"
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "SAMRAI/pdat/IndexData.h"
+#include "SAMRAI/pdat/IndexVariable.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/ProcessorMapping.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/IOStream.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/hier/VariableContext.h"
+
+using namespace SAMRAI;
+
+int main(
+   int argc,
+   char* argv[]) {
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+// tbox::PIO::logOnlyNodeZero("indx_dataops.log");
+   tbox::PIO::logAllNodes("indx_dataops.log");
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+
+/*
+ ************************************************************************
+ *
+ *   Create a simple 2-level hierarchy to test.
+ *   (NOTE: it is setup to work on at most 2 processors)
+ *
+ ************************************************************************
+ */
+      double lo[2] = { 0.0, 0.0 };
+      double hi[2] = { 1.0, 0.5 };
+
+      hier::Box coarse0(hier::Index(0, 0), hier::Index(9, 2));
+      hier::Box coarse1(hier::Index(0, 3), hier::Index(9, 4));
+      hier::Box fine0(hier::Index(4, 4), hier::Index(7, 7));
+      hier::Box fine1(hier::Index(8, 4), hier::Index(13, 7));
+      hier::IntVector<NDIM> ratio(2);
+
+      hier::BoxArray coarse_domain(2);
+      hier::BoxArray fine_domain(2);
+      coarse_domain[0] = coarse0;
+      coarse_domain[1] = coarse1;
+      fine_domain[0] = fine0;
+      fine_domain[1] = fine1;
+
+      tbox::Pointer<geom::CartesianGridGeometry> geometry =
+         new geom::CartesianGridGeometry("CartesianGeometry",
+            lo,
+            hi,
+            coarse_domain);
+
+      tbox::Pointer<hier::PatchHierarchy> hierarchy =
+         new hier::PatchHierarchy("PatchHierarchy", geometry);
+
+      // Note: For these simple tests we allow at most 2 processors.
+      tbox::SAMRAI_MPI mpi(SAMRAIManager::getSAMRAICommWorld());
+      const int nproc = mpi.getSize();
+      TBOX_ASSERT(nproc < 3);
+
+      const int n_coarse_boxes = coarse_domain.getNumberOfBoxes();
+      const int n_fine_boxes = fine_domain.getNumberOfBoxes();
+      hier::ProcessorMapping mapping0(n_coarse_boxes);
+      hier::ProcessorMapping mapping1(n_fine_boxes);
+
+      int ib;
+      for (ib = 0; ib < n_coarse_boxes; ib++) {
+         if (nproc > 1) {
+            mapping0.setProcessorAssignment(ib, ib);
+         } else {
+            mapping0.setProcessorAssignment(ib, 0);
+         }
+      }
+
+      for (ib = 0; ib < n_fine_boxes; ib++) {
+         if (nproc > 1) {
+            mapping1.setProcessorAssignment(ib, ib);
+         } else {
+            mapping1.setProcessorAssignment(ib, 0);
+         }
+      }
+
+      hierarchy->makeNewPatchLevel(0, hier::IntVector<NDIM>(
+            1), coarse_domain, mapping0);
+      hierarchy->makeNewPatchLevel(1, ratio, fine_domain, mapping1);
+
+      /*
+       * Create an IndexData<SampleIndexData> variable and register it with
+       * the variable database.
+       */
+      hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+      tbox::Pointer<hier::VariableContext> cxt = variable_db->getContext(
+            "dummy");
+      const hier::IntVector<NDIM> no_ghosts(0);
+
+      tbox::Pointer<pdat::IndexVariable<NDIM, SampleIndexData,
+                                        pdat::CellGeometry> > data =
+         new pdat::IndexVariable<NDIM, SampleIndexData, pdat::CellGeometry>(
+            "sample");
+      int data_id = variable_db->registerVariableAndContext(
+            data, cxt, no_ghosts);
+
+/*
+ ************************************************************************
+ *
+ *   Set index data.
+ *
+ ************************************************************************
+ */
+
+      /*
+       * Loop over hierarchy levels and set index data on cells of patches
+       */
+      int counter = 0;
+      std::ostream& os = tbox::plog;
+      for (int ln = hierarchy->getFinestLevelNumber(); ln >= 0; ln--) {
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+
+         // allocate "sample" data
+         level->allocatePatchData(data_id);
+         os << "\nLevel: " << level->getLevelNumber() << " ";
+
+         // loop over patches on level
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::Pointer<hier::Patch> patch = level->getPatch(ip());
+            os << "Patch: " << patch->getLocalId() << std::endl;
+
+            // access sample data from patch
+            tbox::Pointer<pdat::IndexData<NDIM, SampleIndexData,
+                                          pdat::CellGeometry> > sample =
+               patch->getPatchData(data_id);
+
+            // iterate over cells of patch and invoke one "SampleIndexData"
+            // instance on each cell (its possible to do more).
+            for (pdat::CellIterator ic(patch->getBox()); ic; ic++) {
+               SampleIndexData sd(ic());
+               sd.setInt(counter);
+               sample->appendItem(ic(), sd);
+               counter++;
+            }
+
+            // iterate over the "SampleIndexData" index data stored on the patch
+            // and dump the integer stored on it.
+            for (pdat::IndexData<NDIM, SampleIndexData,
+                                 pdat::CellGeometry>::Iterator id(*sample);
+                 id;
+                 id++) {
+               os << "   Index: " << id().getIndex()
+                  << "      SampleIndexData data: " << id().getInt()
+                  << std::endl;
+            }
+
+         }
+      }
+
+      geometry.setNull();
+      hierarchy.setNull();
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return 0;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dataops/node_cplxtest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dataops/node_cplxtest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,866 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program to test node-centered complex patch data ops 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fstream>
+#include <iomanip>
+using namespace std;
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/math/HierarchyDataOpsComplex.h"
+#include "SAMRAI/math/HierarchyNodeDataOpsComplex.h"
+#include "SAMRAI/math/HierarchyDataOpsReal.h"
+#include "SAMRAI/math/HierarchyNodeDataOpsReal.h"
+#include "SAMRAI/pdat/NodeIndex.h"
+#include "SAMRAI/pdat/NodeIterator.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/ProcessorMapping.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/hier/VariableContext.h"
+
+using namespace SAMRAI;
+
+/* Helper function declarations */
+static bool
+complexDataSameAsValue(
+   int desc_id,
+   dcomplex value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy);
+static bool
+doubleDataSameAsValue(
+   int desc_id,
+   double value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+#define NVARS 4
+
+int main(
+   int argc,
+   char* argv[]) {
+
+   int num_failures = 0;
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   if (argc < 2) {
+      TBOX_ERROR("Usage: " << argv[0] << " [dimension]");
+   }
+
+   const int d = atoi(argv[1]);
+   TBOX_ASSERT(d > 0);
+   TBOX_ASSERT(d <= SAMRAI_MAXIMUM_DIMENSION_VALUE);
+   const tbox::Dimension dim(d);
+
+   if (dim != 2) {
+      TBOX_ERROR("This test code is completed only for 2D!!!");
+   }
+
+   const std::string log_fn = std::string("node_cplxtest.")
+      + tbox::Utilities::intToString(dim, 1) + "d.log";
+   tbox::PIO::logAllNodes(log_fn);
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+      const tbox::Dimension dim2d(2);
+
+      int ln, iv;
+
+      // Make a dummy hierarchy domain
+      double lo[2] = { 0.0, 0.0 };
+      double hi[2] = { 1.0, 0.5 };
+
+      hier::Box coarse0(hier::Index(0, 0), hier::Index(9, 2));
+      hier::Box coarse1(hier::Index(0, 3), hier::Index(9, 4));
+      hier::Box fine0(hier::Index(4, 4), hier::Index(7, 7));
+      hier::Box fine1(hier::Index(8, 4), hier::Index(13, 7));
+      hier::IntVector ratio(dim2d, 2);
+
+      hier::BoxArray coarse_domain(dim2d, 2);
+      hier::BoxArray fine_boxes(dim2d, 2);
+      coarse_domain[0] = coarse0;
+      coarse_domain[1] = coarse1;
+      fine_boxes[0] = fine0;
+      fine_boxes[1] = fine1;
+
+      tbox::Pointer<geom::CartesianGridGeometry> geometry(
+         new geom::CartesianGridGeometry("CartesianGeometry",
+            lo,
+            hi,
+            coarse_domain));
+
+      tbox::Pointer<hier::PatchHierarchy> hierarchy(
+         new hier::PatchHierarchy("PatchHierarchy", geometry));
+
+      // Note: For these simple tests we allow at most 2 processors.
+      const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+      const int nproc = mpi.getSize();
+      TBOX_ASSERT(nproc < 3);
+
+      const int n_coarse_boxes = coarse_domain.getNumberOfBoxes();
+      const int n_fine_boxes = fine_boxes.getNumberOfBoxes();
+
+      hier::MappedBoxLevel layer0(hier::IntVector(dim, 1));
+      hier::MappedBoxLevel layer1(ratio);
+
+      for (int ib = 0; ib < n_coarse_boxes; ib++) {
+         if (nproc > 1) {
+            if (ib == layer0.getRank()) {
+               layer0.addMappedBox(hier::MappedBox(coarse_domain[ib], ib,
+                     layer0.getRank()));
+            }
+         } else {
+            layer0.addMappedBox(hier::MappedBox(coarse_domain[ib], ib, 0));
+         }
+      }
+
+      for (int ib = 0; ib < n_fine_boxes; ib++) {
+         if (nproc > 1) {
+            if (ib == layer1.getRank()) {
+               layer1.addMappedBox(hier::MappedBox(fine_boxes[ib], ib,
+                     layer1.getRank()));
+            }
+         } else {
+            layer1.addMappedBox(hier::MappedBox(fine_boxes[ib], ib, 0));
+         }
+      }
+
+      hierarchy->makeNewPatchLevel(0, layer0);
+      hierarchy->makeNewPatchLevel(1, layer1);
+
+      // Create instance of hier::Variable database
+      hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+      tbox::Pointer<hier::VariableContext> dummy = variable_db->getContext(
+            "dummy");
+      const hier::IntVector no_ghosts(dim2d, 0);
+
+      // Make some dummy variables and data on the hierarchy
+      tbox::Pointer<pdat::NodeVariable<dcomplex> > nvar[NVARS];
+      int nvindx[NVARS];
+      nvar[0] = new pdat::NodeVariable<dcomplex>(dim, "nvar0", 1);
+      nvindx[0] = variable_db->registerVariableAndContext(
+            nvar[0], dummy, no_ghosts);
+      nvar[1] = new pdat::NodeVariable<dcomplex>(dim, "nvar1", 1);
+      nvindx[1] = variable_db->registerVariableAndContext(
+            nvar[1], dummy, no_ghosts);
+      nvar[2] = new pdat::NodeVariable<dcomplex>(dim, "nvar2", 1);
+      nvindx[2] = variable_db->registerVariableAndContext(
+            nvar[2], dummy, no_ghosts);
+      nvar[3] = new pdat::NodeVariable<dcomplex>(dim, "nvar3", 1);
+      nvindx[3] = variable_db->registerVariableAndContext(
+            nvar[3], dummy, no_ghosts);
+
+      tbox::Pointer<pdat::NodeVariable<double> >
+      nwgt(new pdat::NodeVariable<double>(dim, "nwgt", 1));
+      int nwgt_id = variable_db->registerVariableAndContext(
+            nwgt, dummy, no_ghosts);
+
+      // allocate data on hierarchy
+      for (ln = 0; ln < 2; ln++) {
+         hierarchy->getPatchLevel(ln)->allocatePatchData(nwgt_id);
+         for (iv = 0; iv < NVARS; iv++) {
+            hierarchy->getPatchLevel(ln)->allocatePatchData(nvindx[iv]);
+         }
+      }
+
+      tbox::Pointer<math::HierarchyDataOpsComplex> node_ops(
+         new math::HierarchyNodeDataOpsComplex(hierarchy, 0, 1));
+      TBOX_ASSERT(!node_ops.isNull());
+
+      tbox::Pointer<math::HierarchyDataOpsReal<double> > nwgt_ops(
+         new math::HierarchyNodeDataOpsReal<double>(hierarchy, 0, 1));
+
+      tbox::Pointer<hier::Patch> patch;
+      tbox::Pointer<geom::CartesianPatchGeometry> pgeom;
+
+      // Initialize control volume data for node-centered components
+      hier::Box coarse_fine = fine0 + fine1;
+      coarse_fine.coarsen(ratio);
+      for (ln = 0; ln < 2; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::Pointer<pdat::NodeData<double> > data;
+            patch = level->getPatch(ip());
+            pgeom = patch->getPatchGeometry();
+            const double* dx = pgeom->getDx();
+            const double node_vol = dx[0] * dx[1];
+            data = patch->getPatchData(nwgt_id);
+            data->fillAll(node_vol);
+            pdat::NodeIndex ni(dim);
+            int plo0 = patch->getBox().lower(0);
+            int phi0 = patch->getBox().upper(0);
+            int plo1 = patch->getBox().lower(1);
+            int phi1 = patch->getBox().upper(1);
+            int ic;
+
+            if (ln == 0) {
+               data->fillAll(0.0, (coarse_fine * patch->getBox()));
+
+               if (patch->getLocalId() == 0) {
+                  //bottom face boundaries
+                  for (ic = plo0; ic < phi0; ic++) {
+                     ni = pdat::NodeIndex(hier::Index(ic,
+                              plo1), pdat::NodeIndex::LowerRight);
+                     (*data)(ni) *= 0.5;
+                  }
+                  //left and right face boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     ni = pdat::NodeIndex(hier::Index(plo0,
+                              ic), pdat::NodeIndex::UpperLeft);
+                     (*data)(ni) *= 0.5;
+                     ni = pdat::NodeIndex(hier::Index(phi0,
+                              ic), pdat::NodeIndex::UpperRight);
+                     (*data)(ni) *= 0.5;
+                  }
+                  // corner boundaries
+                  (*data)(pdat::NodeIndex(hier::Index(plo0,
+                                plo1), pdat::NodeIndex::LowerLeft)) *= 0.25;
+                  (*data)(pdat::NodeIndex(hier::Index(phi0,
+                                plo1), pdat::NodeIndex::LowerRight)) *= 0.25;
+               } else {
+                  //top and bottom face boundaries
+                  for (ic = plo0; ic < phi0; ic++) {
+                     ni = pdat::NodeIndex(hier::Index(ic,
+                              phi1), pdat::NodeIndex::UpperRight);
+                     (*data)(ni) *= 0.5;
+                     ni = pdat::NodeIndex(hier::Index(ic,
+                              plo1), pdat::NodeIndex::LowerRight);
+                     (*data)(ni) = 0.0;
+                  }
+                  //left and right face boundaries
+                  for (ic = plo1; ic < phi1; ic++) {
+                     ni = pdat::NodeIndex(hier::Index(plo0,
+                              ic), pdat::NodeIndex::UpperLeft);
+                     (*data)(ni) *= 0.5;
+                     ni = pdat::NodeIndex(hier::Index(phi0,
+                              ic), pdat::NodeIndex::UpperRight);
+                     (*data)(ni) *= 0.5;
+                  }
+                  // corner boundaries
+                  (*data)(pdat::NodeIndex(hier::Index(plo0,
+                                plo1), pdat::NodeIndex::LowerLeft)) = 0.0;
+                  (*data)(pdat::NodeIndex(hier::Index(plo0,
+                                phi1), pdat::NodeIndex::UpperLeft)) *= 0.25;
+                  (*data)(pdat::NodeIndex(hier::Index(phi0,
+                                plo1), pdat::NodeIndex::LowerRight)) = 0.0;
+                  (*data)(pdat::NodeIndex(hier::Index(phi0,
+                                phi1), pdat::NodeIndex::UpperRight)) *= 0.25;
+               }
+            } else {
+               if (patch->getLocalId() == 0) {
+                  // top and bottom coarse-fine face boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     ni = pdat::NodeIndex(hier::Index(ic,
+                              plo1), pdat::NodeIndex::LowerRight);
+                     (*data)(ni) *= 1.5;
+                     ni = pdat::NodeIndex(hier::Index(ic,
+                              phi1), pdat::NodeIndex::UpperRight);
+                     (*data)(ni) *= 1.5;
+                  }
+                  //left coarse-fine face boundaries
+                  for (ic = plo1; ic < phi1; ic++) {
+                     ni = pdat::NodeIndex(hier::Index(plo0,
+                              ic), pdat::NodeIndex::UpperLeft);
+                     (*data)(ni) *= 1.5;
+                  }
+                  // coarse-fine corner boundaries
+                  (*data)(pdat::NodeIndex(hier::Index(plo0,
+                                plo1), pdat::NodeIndex::LowerLeft)) *= 2.25;
+                  (*data)(pdat::NodeIndex(hier::Index(plo0,
+                                phi1), pdat::NodeIndex::UpperLeft)) *= 2.25;
+               } else {
+                  // top and bottom coarse-fine face boundaries
+                  for (ic = plo0; ic < phi0; ic++) {
+                     ni = pdat::NodeIndex(hier::Index(ic,
+                              plo1), pdat::NodeIndex::LowerRight);
+                     (*data)(ni) *= 1.5;
+                     ni = pdat::NodeIndex(hier::Index(ic,
+                              phi1), pdat::NodeIndex::UpperRight);
+                     (*data)(ni) *= 1.5;
+                  }
+                  //right coarse-fine face boundaries
+                  for (ic = plo1; ic < phi1; ic++) {
+                     ni = pdat::NodeIndex(hier::Index(phi0,
+                              ic), pdat::NodeIndex::UpperRight);
+                     (*data)(ni) *= 1.5;
+                  }
+                  // coarse-fine corner boundaries
+                  (*data)(pdat::NodeIndex(hier::Index(phi0,
+                                plo1), pdat::NodeIndex::LowerRight)) *= 2.25;
+                  (*data)(pdat::NodeIndex(hier::Index(phi0,
+                                phi1), pdat::NodeIndex::UpperRight)) *= 2.25;
+                  //shared left boundaries
+                  for (ic = plo1; ic <= phi1 + 1; ic++) {
+                     ni = pdat::NodeIndex(hier::Index(plo0,
+                              ic), pdat::NodeIndex::LowerLeft);
+                     (*data)(ni) = 0;
+                  }
+               }
+            }
+         }
+      }
+
+      // Test #1: Print out control volume data and compute its integral
+
+      // Test #1a: Check control volume data set properly
+      // Expected: cwgt = 0.01 on coarse (except where finer patch exists) and
+      // 0.0025 on fine level
+/*   bool vol_test_passed = true;
+ *   for (ln = 0; ln < 2; ln++) {
+ *   for (hier::PatchLevel::Iterator ip(hierarchy->getPatchLevel(ln)); ip; ip++) {
+ *   patch = hierarchy->getPatchLevel(ln)->getPatch(ip());
+ *   tbox::Pointer< pdat::NodeData<double> > cvdata = patch->getPatchData(cwgt_id);
+ *
+ *   for (pdat::NodeIterator c(cvdata->getBox());c && vol_test_passed;c++) {
+ *   pdat::NodeIndex cell_index = c();
+ *
+ *   if (ln == 0) {
+ *   if ((coarse_fine * patch->getBox()).contains(cell_index)) {
+ *   if ( !tbox::MathUtilities<double>::equalEps((*cvdata)(cell_index),0.0) ) {
+ *   vol_test_passed = false;
+ *   }
+ *   } else {
+ *   if ( !tbox::MathUtilities<double>::equalEps((*cvdata)(cell_index),0.01) ) {
+ *   vol_test_passed = false;
+ *   }
+ *   }
+ *   }
+ *
+ *   if (ln == 1) {
+ *   if ( !tbox::MathUtilities<double>::equalEps((*cvdata)(cell_index),0.0025) ) {
+ *   vol_test_passed = false;
+ *   }
+ *   }
+ *   }
+ *   }
+ *   }
+ *   if (!vol_test_passed) {
+ *   num_failures++;
+ *   tbox::perr << "FAILED: - Test #1a: Check control volume data set properly" << std::endl;
+ *   cwgt_ops->printData(cwgt_id, tbox::plog);
+ *   }
+ */
+/*   tbox::plog << "node control volume data" << std::endl;
+ *   nwgt_ops->printData(nwgt_id, tbox::plog);
+ */
+
+      // Test #1b: math::HierarchyNodeDataOpsComplex::sumControlVolumes()
+      // Expected: norm = 0.5
+      double norm =
+         node_ops->sumControlVolumes(nvindx[0], nwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(norm, 0.5)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #1: math::HierarchyNodeDataOpsComplex::sumControlVolumes()\n"
+         << "Expected value = 0.5 , Computed value = "
+         << norm << std::endl;
+      }
+
+      // Test #2: math::HierarchyNodeDataOpsComplex::numberOfEntries()
+      // Expected: num_data_points = 121
+      int num_data_points = node_ops->numberOfEntries(nvindx[0]);
+      if (num_data_points != 121) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #2: math::HierarchyNodeDataOpsComplex::numberOfEntries()\n"
+         << "Expected value = 121 , Computed value = "
+         << num_data_points << std::endl;
+      }
+
+      // Test #3a: math::HierarchyNodeDataOpsComplex::setToScalar()
+      // Expected: v0 = (2.0,1.5)
+      dcomplex val0 = dcomplex(2.0, 1.5);
+      node_ops->setToScalar(nvindx[0], val0);
+      if (!complexDataSameAsValue(nvindx[0], val0, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #3a: math::HierarchyNodeDataOpsComplex::setToScalar()\n"
+         << "Expected: v0 = " << val0 << std::endl;
+         node_ops->printData(nvindx[0], tbox::plog);
+      }
+
+      // Test #3b: math::HierarchyNodeDataOpsComplex::setToScalar()
+      // Expected:  v1 = (4.0, 3.0)
+      dcomplex val1(4.0, 3.0);
+      node_ops->setToScalar(nvindx[1], dcomplex(4.0, 3.0));
+      if (!complexDataSameAsValue(nvindx[1], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #3b: math::HierarchyNodeDataOpsComplex::setToScalar()\n"
+         << "Expected: v1 = " << val1 << std::endl;
+         node_ops->printData(nvindx[1], tbox::plog);
+      }
+
+      // Test #4: math::HierarchyNodeDataOpsComplex::copyData()
+      // Expected:   v2 = v1 = (4.0, 3.0)
+      node_ops->copyData(nvindx[2], nvindx[1]);
+      if (!complexDataSameAsValue(nvindx[2], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #4: math::HierarchyNodeDataOpsComplex::copyData()\n"
+         << "Expected: v2 = " << val1 << std::endl;
+         node_ops->printData(nvindx[2], tbox::plog);
+      }
+
+      // Test #5: math::HierarchyNodeDataOpsComplex::swapData()
+      // Expected:  v0 = (4.0, 3.0), v1 = (2.0,1.5)
+      node_ops->swapData(nvindx[0], nvindx[1]);
+      if (!complexDataSameAsValue(nvindx[0], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #5a: math::HierarchyNodeDataOpsComplex::swapData()\n"
+         << "Expected: v0 = " << val1 << std::endl;
+         node_ops->printData(nvindx[0], tbox::plog);
+      }
+      if (!complexDataSameAsValue(nvindx[1], val0, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #5b: math::HierarchyNodeDataOpsComplex::swapData()\n"
+         << "Expected: v1 = " << val0 << std::endl;
+         node_ops->printData(nvindx[1], tbox::plog);
+      }
+
+      // Test #6: math::HierarchyNodeDataOpsComplex::scale()
+      // Expected:  v2 = 0.25 * v2 = (1.0,0.75)
+      node_ops->scale(nvindx[2], 0.25, nvindx[2]);
+      dcomplex val_scale(1.0, 0.75);
+      if (!complexDataSameAsValue(nvindx[2], val_scale, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #6: math::HierarchyNodeDataOpsComplex::scale()\n"
+         << "Expected: v2 = " << val_scale << std::endl;
+         node_ops->printData(nvindx[2], tbox::plog);
+      }
+
+      // Test #7: math::HierarchyNodeDataOpsComplex::add()
+      // Expected: v3 = v0 + v1 = (6.0, 4.5)
+      node_ops->add(nvindx[3], nvindx[0], nvindx[1]);
+      dcomplex val_add(6.0, 4.5);
+      if (!complexDataSameAsValue(nvindx[3], val_add, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #7: math::HierarchyNodeDataOpsComplex::add()\n"
+         << "Expected: v3 = " << val_add << std::endl;
+         node_ops->printData(nvindx[3], tbox::plog);
+      }
+
+      // Reset v0: v0 = (0.0,4.5)
+      node_ops->setToScalar(nvindx[0], dcomplex(0.0, 4.5));
+
+      // Test #8: math::HierarchyNodeDataOpsComplex::subtract()
+      // Expected: v1 = v3 - v0 = (6.0,0.0)
+      node_ops->subtract(nvindx[1], nvindx[3], nvindx[0]);
+      dcomplex val_sub(6.0, 0.0);
+      if (!complexDataSameAsValue(nvindx[1], val_sub, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #8: math::HierarchyNodeDataOpsComplex::subtract()\n"
+         << "Expected: v1 = " << val_sub << std::endl;
+         node_ops->printData(nvindx[1], tbox::plog);
+      }
+
+      // Test #9a: math::HierarchyNodeDataOpsComplex::addScalar()
+      // Expected: v1 = v1 + (0.0,-4.0) = (6.0,-4.0)
+      node_ops->addScalar(nvindx[1], nvindx[1], dcomplex(0.0, -4.0));
+      dcomplex val_addScalar(6.0, -4.0);
+      if (!complexDataSameAsValue(nvindx[1], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #9a: math::HierarchyNodeDataOpsComplex::addScalar()\n"
+         << "Expected: v1 = " << val_addScalar << std::endl;
+         node_ops->printData(nvindx[1], tbox::plog);
+      }
+
+      // Test #9b: math::HierarchyNodeDataOpsComplex::addScalar()
+      // Expected: v2 = v2 + (0.0,0.25) = (1.0,1.0)
+      node_ops->addScalar(nvindx[2], nvindx[2], dcomplex(0.0, 0.25));
+      val_addScalar = dcomplex(1.0, 1.0);
+      if (!complexDataSameAsValue(nvindx[2], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #9b: math::HierarchyNodeDataOpsComplex::addScalar()\n"
+         << "Expected: v2 = " << val_addScalar << std::endl;
+         node_ops->printData(nvindx[2], tbox::plog);
+      }
+
+      // Test #9c: math::HierarchyNodeDataOpsComplex::addScalar()
+      // Expected: v2 = v2 + (3.0,-4.0) = (4.0,-3.0)
+      node_ops->addScalar(nvindx[2], nvindx[2], dcomplex(3.0, -4.0));
+      val_addScalar = dcomplex(4.0, -3.0);
+      if (!complexDataSameAsValue(nvindx[2], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #9c: math::HierarchyNodeDataOpsComplex::addScalar()\n"
+         << "Expected: v2 = " << val_addScalar << std::endl;
+         node_ops->printData(nvindx[2], tbox::plog);
+      }
+
+      // Reset v3: v3 = (0.5, 0.0)
+      node_ops->setToScalar(nvindx[3], dcomplex(0.5, 0.0));
+
+      // Test #10: math::HierarchyNodeDataOpsComplex::multiply()
+      // Expected: v1 = v3 * v1 = (3.0,-2.0)
+      node_ops->multiply(nvindx[1], nvindx[3], nvindx[1]);
+      dcomplex val_mult(3.0, -2.0);
+      if (!complexDataSameAsValue(nvindx[1], val_mult, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #10: math::HierarchyNodeDataOpsComplex::multiply()\n"
+         << "Expected: v1 = " << val_mult << std::endl;
+         node_ops->printData(nvindx[1], tbox::plog);
+      }
+
+      // Test #11: math::HierarchyNodeDataOpsComplex::divide()
+      // Expected: v0 = v2 / v1 = (1.3846153846154,-0.076923076923077)
+      node_ops->divide(nvindx[0], nvindx[2], nvindx[1]);
+      dcomplex val_div(1.3846153846154, -0.076923076923077);
+      if (!complexDataSameAsValue(nvindx[0], val_div, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #11: math::HierarchyNodeDataOpsComplex::divide()\n"
+         << "Expected: v0 = " << val_div << std::endl;
+         node_ops->printData(nvindx[0], tbox::plog);
+      }
+
+      // Test #12: math::HierarchyNodeDataOpsComplex::reciprocal()
+      // Expected: v1 = 1 / v1 = (0.23076923076923, 0.15384615384615)
+      node_ops->reciprocal(nvindx[1], nvindx[1]);
+      dcomplex val_rec(0.23076923076923, 0.15384615384615);
+      if (!complexDataSameAsValue(nvindx[1], val_rec, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #12: math::HierarchyNodeDataOpsComplex::reciprocal()\n"
+         << "Expected: v1 = " << val_rec << std::endl;
+         node_ops->printData(nvindx[1], tbox::plog);
+      }
+      // Test #13: Place some bogus values on coarse level
+      tbox::Pointer<pdat::NodeData<dcomplex> > ndata;
+
+      // set values
+      tbox::Pointer<hier::PatchLevel> level_zero = hierarchy->getPatchLevel(0);
+      for (hier::PatchLevel::Iterator ip(level_zero); ip; ip++) {
+         patch = level_zero->getPatch(ip());
+         ndata = patch->getPatchData(nvindx[2]);
+         hier::Index index0(2, 2);
+         hier::Index index1(5, 3);
+         if (patch->getBox().contains(index0)) {
+            (*ndata)(pdat::NodeIndex(index0,
+                        pdat::NodeIndex::LowerLeft), 0) = dcomplex(100.0, -50.0);
+         }
+         if (patch->getBox().contains(index1)) {
+            (*ndata)(pdat::NodeIndex(index1,
+                        pdat::NodeIndex::UpperRight), 0) = dcomplex(-1000.0,
+                  20.0);
+         }
+      }
+
+      // check values
+      bool bogus_value_test_passed = true;
+      for (hier::PatchLevel::Iterator ipp(level_zero); ipp; ipp++) {
+         patch = level_zero->getPatch(ipp());
+         ndata = patch->getPatchData(nvindx[2]);
+         pdat::NodeIndex index0(hier::Index(2, 2), pdat::NodeIndex::LowerLeft);
+         pdat::NodeIndex index1(hier::Index(5, 3), pdat::NodeIndex::UpperRight);
+
+         for (pdat::NodeIterator c(ndata->getBox());
+              c && bogus_value_test_passed;
+              c++) {
+            pdat::NodeIndex node_index = c();
+
+            if (node_index == index0) {
+               if (!tbox::MathUtilities<dcomplex>::equalEps((*ndata)(node_index),
+                      dcomplex(100.0, -50.0))) {
+                  bogus_value_test_passed = false;
+               }
+            } else {
+               if (node_index == index1) {
+                  if (!tbox::MathUtilities<dcomplex>::equalEps((*ndata)(
+                            node_index),
+                         dcomplex(-1000.0, 20.0))) {
+                     bogus_value_test_passed = false;
+                  }
+               } else {
+                  if (!tbox::MathUtilities<dcomplex>::equalEps((*ndata)(
+                            node_index),
+                         dcomplex(4.0, -3.0))) {
+                     bogus_value_test_passed = false;
+                  }
+               }
+            }
+         }
+      }
+      if (!bogus_value_test_passed) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #13:  Place some bogus values on coarse level"
+         << std::endl;
+         node_ops->printData(nvindx[2], tbox::plog);
+      }
+
+      // Test norms on patch data with nvindx[2] on hierarchy with bogus values
+
+      // Test #14: math::HierarchyNodeDataOpsComplex::L1Norm() - w/o control weight
+      // Expected:  bogus_l1_norm = 1787.0034
+      double bogus_l1_norm = node_ops->L1Norm(nvindx[2]);
+      if (!tbox::MathUtilities<double>::equalEps(bogus_l1_norm, 1787.0034)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #14: math::HierarchyCellDataOpsComplex::L1Norm()"
+         << "Expected value = 1787.0034, Computed value = "
+         << std::setprecision(12) << bogus_l1_norm << std::endl;
+      }
+
+      // Test #15: math::HierarchyNodeDataOpsComplex::L1Norm() - w/ control weight
+      // Expected: l1_norm = 2.5
+      double correct_l1_norm = node_ops->L1Norm(nvindx[2], nwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(correct_l1_norm, 2.5)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #15: math::HierarchyNodeDataOpsComplex::L1Norm()"
+         << " - w/ control weight\n"
+         << "Expected value = 2.5, Computed value = "
+         << correct_l1_norm << std::endl;
+      }
+
+      // Test #16: math::HierarchyNodeDataOpsComplex::L2Norm()
+      // Expected: l2_norm = 3.53553390593
+      double l2_norm = node_ops->L2Norm(nvindx[2], nwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(l2_norm, 3.53553390593)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #16: math::HierarchyNodeDataOpsComplex::L2Norm()\n"
+         << "Expected value = 3.53553390593, Computed value = "
+         << l2_norm << std::endl;
+      }
+
+      // Test #17: math::HierarchyNodeDataOpsComplex::maxNorm() -w/o control weight
+      // Expected: bogus_max_norm = 1000.19998
+      double bogus_max_norm = node_ops->maxNorm(nvindx[2]);
+      if (!tbox::MathUtilities<double>::equalEps(bogus_max_norm, 1000.19998)) {
+         num_failures++;
+         tbox::perr << "FAILED: - Test #17: Bogus maxNorm of v2\n"
+                    << "Expected value = 1000.19998, Computed value = "
+                    << bogus_max_norm << std::endl;
+      }
+
+      // Test #18: math::HierarchyNodeDataOpsComplex::maxNorm() -w/control weight
+      // Expected: max_norm = 5.0
+      double max_norm = node_ops->maxNorm(nvindx[2], nwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(max_norm, 5.0)) {
+         num_failures++;
+         tbox::perr << "FAILED: - Test #18: maxNorm of v2\n"
+                    << "Expected value = 5.0, Computed value = "
+                    << max_norm << std::endl;
+      }
+
+      // Reset data and test sums, axpy's
+      node_ops->setToScalar(nvindx[0], dcomplex(1.0, -3.0));
+      node_ops->setToScalar(nvindx[1], dcomplex(2.5, 3.0));
+      node_ops->setToScalar(nvindx[2], dcomplex(7.0, 0.0));
+
+      // Test #19: math::HierarchyNodeDataOpsComplex::linearSum()
+      // Expected:  v3 = (2.0,5.0)
+      node_ops->linearSum(nvindx[3],
+         dcomplex(2.0, 0.0), nvindx[1], dcomplex(0.0, -1.0), nvindx[0]);
+      dcomplex val_linearSum(2.0, 5.0);
+      if (!complexDataSameAsValue(nvindx[3], val_linearSum, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #19: math::HierarchyNodeDataOpsComplex::linearSum()\n"
+         << "Expected: v3 = " << val_linearSum << std::endl;
+         node_ops->printData(nvindx[3], tbox::plog);
+      }
+
+      // Test #20: math::HierarchyNodeDataOpsComplex::axmy()
+      // Expected:  v3 = (6.5,12.0)
+      node_ops->axmy(nvindx[3], 3.0, nvindx[1], nvindx[0]);
+      dcomplex val_axmy(6.5, 12.0);
+      if (!complexDataSameAsValue(nvindx[3], val_axmy, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #20: math::HierarchyNodeDataOpsComplex::axmy()\n"
+         << "Expected: v3 = " << val_axmy << std::endl;
+         node_ops->printData(nvindx[3], tbox::plog);
+      }
+
+      // Test #21a: math::HierarchyNodeDataOpsComplex::dot()
+      // Expected:  cdot = (8.75,-10.5)
+      dcomplex cdot = node_ops->dot(nvindx[2], nvindx[1], nwgt_id);
+      dcomplex ans_2_dot_1(8.75, -10.5);
+      if (!tbox::MathUtilities<dcomplex>::equalEps(cdot, ans_2_dot_1)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #21a: math::HierarchyNodeDataOpsComplex::dot()\n"
+         << "Expected value = (8.75,-10.5), Computed value = "
+         << cdot << std::endl;
+      }
+
+      // Test #21b: math::HierarchyNodeDataOpsComplex::dot()
+      // Expected:  cdot = (8.75,10.5)
+      dcomplex cdot2 = node_ops->dot(nvindx[1], nvindx[2], nwgt_id);
+      dcomplex ans_1_dot_2(8.75, 10.5);
+      if (!tbox::MathUtilities<dcomplex>::equalEps(cdot2, ans_1_dot_2)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #21b: math::HierarchyNodeDataOpsComplex::dot()\n"
+         << "Expected value = (8.75,10.5), Computed value = "
+         << cdot2 << std::endl;
+      }
+
+      // Test #22: math::HierarchyNodeDataOpsComplex::abs()
+      // Expected: abs(v0) = 5.0
+      node_ops->setToScalar(nvindx[0], dcomplex(4.0, -3.0));
+      node_ops->abs(nwgt_id, nvindx[0]);
+      if (!doubleDataSameAsValue(nwgt_id, 5.0, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #22: math::HierarchyNodeDataOpsComplex::abs()\n"
+         << "Expected: abs(v0) = 5.0" << std::endl;
+         nwgt_ops->printData(nwgt_id, tbox::plog);
+      }
+
+      // deallocate data on hierarchy
+      for (ln = 0; ln < 2; ln++) {
+         hierarchy->getPatchLevel(ln)->deallocatePatchData(nwgt_id);
+         for (iv = 0; iv < NVARS; iv++) {
+            hierarchy->getPatchLevel(ln)->deallocatePatchData(nvindx[iv]);
+         }
+      }
+
+      for (iv = 0; iv < NVARS; iv++) {
+         nvar[iv].setNull();
+      }
+      nwgt.setNull();
+
+      geometry.setNull();
+      hierarchy.setNull();
+      node_ops.setNull();
+      nwgt_ops.setNull();
+
+      if (num_failures == 0) {
+         tbox::pout << "\nPASSED:  node cplxtest" << std::endl;
+      }
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return num_failures;
+}
+
+/*
+ * Returns true if all the data in the hierarchy is equal to the specified
+ * value.  Returns false otherwise.
+ */
+static bool
+complexDataSameAsValue(
+   int desc_id,
+   dcomplex value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   bool test_passed = true;
+
+   int ln;
+   tbox::Pointer<hier::Patch> patch;
+   for (ln = 0; ln < 2; ln++) {
+
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         patch = level->getPatch(ip());
+         tbox::Pointer<pdat::NodeData<dcomplex> > nvdata = patch->getPatchData(
+               desc_id);
+
+         for (pdat::NodeIterator c(nvdata->getBox()); c && test_passed; c++) {
+            pdat::NodeIndex node_index = c();
+            if (!tbox::MathUtilities<dcomplex>::equalEps((*nvdata)(node_index),
+                   value)) {
+               test_passed = false;
+            }
+         }
+      }
+   }
+
+   return test_passed;
+}
+
+/*
+ * Returns true if all the data in the hierarchy is equal to the specified
+ * value.  Returns false otherwise.
+ */
+static bool
+doubleDataSameAsValue(
+   int desc_id,
+   double value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   bool test_passed = true;
+
+   int ln;
+   tbox::Pointer<hier::Patch> patch;
+   for (ln = 0; ln < 2; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         patch = level->getPatch(ip());
+         tbox::Pointer<pdat::NodeData<double> > nvdata = patch->getPatchData(
+               desc_id);
+
+         for (pdat::NodeIterator c(nvdata->getBox()); c && test_passed; c++) {
+            pdat::NodeIndex node_index = c();
+            if (!tbox::MathUtilities<double>::equalEps((*nvdata)(node_index),
+                   value)) {
+               test_passed = false;
+            }
+         }
+      }
+   }
+
+   return test_passed;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dataops/node_hierops.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dataops/node_hierops.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,726 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program to test node-centered patch data ops 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fstream>
+#include <iomanip>
+using namespace std;
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/math/HierarchyDataOpsComplex.h"
+#include "SAMRAI/math/HierarchyNodeDataOpsComplex.h"
+#include "SAMRAI/math/HierarchyDataOpsReal.h"
+#include "SAMRAI/math/HierarchyNodeDataOpsReal.h"
+#include "SAMRAI/pdat/NodeIndex.h"
+#include "SAMRAI/pdat/NodeIterator.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/ProcessorMapping.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/hier/VariableContext.h"
+
+using namespace SAMRAI;
+
+/* Helper function declarations */
+bool
+doubleDataSameAsValue(
+   int desc_id,
+   double value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+#define NVARS 4
+
+int main(
+   int argc,
+   char* argv[]) {
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+// tbox::PIO::logOnlyNodeZero("node_hierops.log");
+   tbox::PIO::logAllNodes("node_hierops.log");
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+
+      int ln, iv;
+
+      /*
+       * Make a simple 2-level hierarchy.
+       */
+      double lo[2] = { 0.0, 0.0 };
+      double hi[2] = { 1.0, 0.5 };
+
+      hier::Box<2> coarse0(hier::Index<2>(0, 0), hier::Index<2>(9, 2));
+      hier::Box<2> coarse1(hier::Index<2>(0, 3), hier::Index<2>(9, 4));
+      hier::Box<2> fine0(hier::Index<2>(4, 4), hier::Index<2>(7, 7));
+      hier::Box<2> fine1(hier::Index<2>(8, 4), hier::Index<2>(13, 7));
+      hier::IntVector<2> ratio(2);
+
+      hier::BoxArray<2> coarse_domain(2);
+      hier::BoxArray<2> fine_domain(2);
+      coarse_domain(0) = coarse0;
+      coarse_domain(1) = coarse1;
+      fine_domain(0) = fine0;
+      fine_domain(1) = fine1;
+
+      tbox::Pointer<geom::CartesianGridGeometry> geometry =
+         new geom::CartesianGridGeometry("CartesianGeometry",
+            lo,
+            hi,
+            coarse_domain);
+
+      tbox::Pointer<hier::PatchHierarchy> hierarchy =
+         new hier::PatchHierarchy("PatchHierarchy", geometry);
+
+      // Note: For these simple tests we allow at most 2 processors.
+      tbox::SAMRAI_MPI mpi(SAMRAIManager::getSAMRAICommWorld());
+      const int nproc = mpi.getSize();
+      TBOX_ASSERT(nproc < 3);
+
+      const int n_coarse_boxes = coarse_domain.getNumberOfBoxes();
+      const int n_fine_boxes = fine_domain.getNumberOfBoxes();
+      hier::ProcessorMapping mapping0(n_coarse_boxes);
+      hier::ProcessorMapping mapping1(n_fine_boxes);
+
+      int ib;
+      for (ib = 0; ib < n_coarse_boxes; ib++) {
+         if (nproc > 1) {
+            mapping0.setProcessorAssignment(ib, ib);
+         } else {
+            mapping0.setProcessorAssignment(ib, 0);
+         }
+      }
+
+      for (ib = 0; ib < n_fine_boxes; ib++) {
+         if (nproc > 1) {
+            mapping1.setProcessorAssignment(ib, ib);
+         } else {
+            mapping1.setProcessorAssignment(ib, 0);
+         }
+      }
+
+      hierarchy->makeNewPatchLevel(0, hier::IntVector<2>(
+            1), coarse_domain, mapping0);
+      hierarchy->makeNewPatchLevel(1, ratio, fine_domain, mapping1);
+
+      /*
+       * Create some variables, a context, and register them with
+       * the variable database.
+       */
+      hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+      tbox::Pointer<hier::VariableContext> dummy = variable_db->getContext(
+            "dummy");
+      const hier::IntVector<2> no_ghosts(0);
+
+      tbox::Pointer<pdat::NodeVariable<double> > nvar[NVARS];
+      int nvindx[NVARS];
+      nvar[0] = new pdat::NodeVariable<double>("nvar0", 1);
+      nvindx[0] = variable_db->registerVariableAndContext(
+            nvar[0], dummy, no_ghosts);
+      nvar[1] = new pdat::NodeVariable<double>("nvar1", 1);
+      nvindx[1] = variable_db->registerVariableAndContext(
+            nvar[1], dummy, no_ghosts);
+      nvar[2] = new pdat::NodeVariable<double>("nvar2", 1);
+      nvindx[2] = variable_db->registerVariableAndContext(
+            nvar[2], dummy, no_ghosts);
+      nvar[3] = new pdat::NodeVariable<double>("nvar3", 1);
+      nvindx[3] = variable_db->registerVariableAndContext(
+            nvar[3], dummy, no_ghosts);
+
+      tbox::Pointer<pdat::NodeVariable<double> >
+      nwgt = new pdat::NodeVariable<double>("nwgt", 1);
+      int nwgt_id = variable_db->registerVariableAndContext(
+            nwgt, dummy, no_ghosts);
+
+      // allocate data on hierarchy
+      for (ln = 0; ln < 2; ln++) {
+         hierarchy->getPatchLevel(ln)->allocatePatchData(nwgt_id);
+         for (iv = 0; iv < NVARS; iv++) {
+            hierarchy->getPatchLevel(ln)->allocatePatchData(nvindx[iv]);
+         }
+      }
+
+      /*
+       * Create instances of hierarchy operations to apply certain
+       * mathematical operators.  e.g. scale(), axpy(), min(), etc.
+       */
+      int coarsest = 0;
+      int finest = 1;
+      tbox::Pointer<math::HierarchyDataOpsReal<double> > node_ops =
+         new math::HierarchyNodeDataOpsReal<double>(hierarchy, coarsest, finest);
+      TBOX_ASSERT(!node_ops.isNull());
+
+      tbox::Pointer<math::HierarchyDataOpsReal<double> > nwgt_ops =
+         new math::HierarchyNodeDataOpsReal<double>(hierarchy, coarsest, finest);
+
+      tbox::Pointer<hier::Patch> patch;
+      tbox::Pointer<geom::CartesianPatchGeometry> pgeom;
+
+      // Initialize control volume data for node-centered components
+      hier::Box<2> coarse_fine = fine0 + fine1;
+      coarse_fine.coarsen(ratio);
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+      for (ln = 0; ln < 2; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::Pointer<pdat::NodeData<double> > data;
+            patch = level->getPatch(ip());
+            pgeom = patch->getPatchGeometry();
+            const double* dx = pgeom->getDx();
+            const double node_vol = dx[0] * dx[1];
+            data = patch->getPatchData(nwgt_id);
+            data->fillAll(node_vol);
+            pdat::NodeIndex ni;
+            int plo0 = patch->getBox().lower(0);
+            int phi0 = patch->getBox().upper(0);
+            int plo1 = patch->getBox().lower(1);
+            int phi1 = patch->getBox().upper(1);
+            int ic;
+
+            if (ln == 0) {
+               data->fillAll(0.0, (coarse_fine * patch->getBox()));
+
+               if (patch->getLocalId() == 0) {
+                  //bottom boundaries
+                  for (ic = plo0; ic < phi0; ic++) {
+                     ni = pdat::NodeIndex(hier::Index<2>(ic,
+                              plo1), pdat::NodeIndex::LowerRight);
+                     (*data)(ni) *= 0.5;
+                  }
+                  //left and right boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     ni = pdat::NodeIndex(hier::Index<2>(plo0,
+                              ic), pdat::NodeIndex::UpperLeft);
+                     (*data)(ni) *= 0.5;
+                     ni = pdat::NodeIndex(hier::Index<2>(phi0,
+                              ic), pdat::NodeIndex::UpperRight);
+                     (*data)(ni) *= 0.5;
+                  }
+                  // corner boundaries
+                  (*data)(pdat::NodeIndex(hier::Index<2>(plo0,
+                                plo1), pdat::NodeIndex::LowerLeft)) *= 0.25;
+                  (*data)(pdat::NodeIndex(hier::Index<2>(phi0,
+                                plo1), pdat::NodeIndex::LowerRight)) *= 0.25;
+               } else {
+                  //top and bottom boundaries
+                  for (ic = plo0; ic < phi0; ic++) {
+                     ni = pdat::NodeIndex(hier::Index<2>(ic,
+                              phi1), pdat::NodeIndex::UpperRight);
+                     (*data)(ni) *= 0.5;
+                     ni = pdat::NodeIndex(hier::Index<2>(ic,
+                              plo1), pdat::NodeIndex::LowerRight);
+                     (*data)(ni) = 0.0;
+                  }
+                  //left and right boundaries
+                  for (ic = plo1; ic < phi1; ic++) {
+                     ni = pdat::NodeIndex(hier::Index<2>(plo0,
+                              ic), pdat::NodeIndex::UpperLeft);
+                     (*data)(ni) *= 0.5;
+                     ni = pdat::NodeIndex(hier::Index<2>(phi0,
+                              ic), pdat::NodeIndex::UpperRight);
+                     (*data)(ni) *= 0.5;
+                  }
+                  // corner boundaries
+                  (*data)(pdat::NodeIndex(hier::Index<2>(plo0,
+                                plo1), pdat::NodeIndex::LowerLeft)) = 0.0;
+                  (*data)(pdat::NodeIndex(hier::Index<2>(plo0,
+                                phi1), pdat::NodeIndex::UpperLeft)) *= 0.25;
+                  (*data)(pdat::NodeIndex(hier::Index<2>(phi0,
+                                plo1), pdat::NodeIndex::LowerRight)) = 0.0;
+                  (*data)(pdat::NodeIndex(hier::Index<2>(phi0,
+                                phi1), pdat::NodeIndex::UpperRight)) *= 0.25;
+               }
+            } else {
+               if (patch->getLocalId() == 0) {
+                  // top and bottom coarse-fine boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     ni = pdat::NodeIndex(hier::Index<2>(ic,
+                              plo1), pdat::NodeIndex::LowerRight);
+                     (*data)(ni) *= 1.5;
+                     ni = pdat::NodeIndex(hier::Index<2>(ic,
+                              phi1), pdat::NodeIndex::UpperRight);
+                     (*data)(ni) *= 1.5;
+                  }
+                  //left coarse-fine boundaries
+                  for (ic = plo1; ic < phi1; ic++) {
+                     ni = pdat::NodeIndex(hier::Index<2>(plo0,
+                              ic), pdat::NodeIndex::UpperLeft);
+                     (*data)(ni) *= 1.5;
+                  }
+                  // coarse-fine corner boundaries
+                  (*data)(pdat::NodeIndex(hier::Index<2>(plo0,
+                                plo1), pdat::NodeIndex::LowerLeft)) *= 2.25;
+                  (*data)(pdat::NodeIndex(hier::Index<2>(plo0,
+                                phi1), pdat::NodeIndex::UpperLeft)) *= 2.25;
+               } else {
+                  // top and bottom coarse-fine boundaries
+                  for (ic = plo0; ic < phi0; ic++) {
+                     ni = pdat::NodeIndex(hier::Index<2>(ic,
+                              plo1), pdat::NodeIndex::LowerRight);
+                     (*data)(ni) *= 1.5;
+                     ni = pdat::NodeIndex(hier::Index<2>(ic,
+                              phi1), pdat::NodeIndex::UpperRight);
+                     (*data)(ni) *= 1.5;
+                  }
+                  //right coarse-fine boundaries
+                  for (ic = plo1; ic < phi1; ic++) {
+                     ni = pdat::NodeIndex(hier::Index<2>(phi0,
+                              ic), pdat::NodeIndex::UpperRight);
+                     (*data)(ni) *= 1.5;
+                  }
+                  // coarse-fine corner boundaries
+                  (*data)(pdat::NodeIndex(hier::Index<2>(phi0,
+                                plo1), pdat::NodeIndex::LowerRight)) *= 2.25;
+                  (*data)(pdat::NodeIndex(hier::Index<2>(phi0,
+                                phi1), pdat::NodeIndex::UpperRight)) *= 2.25;
+                  //shared left boundaries
+                  for (ic = plo1; ic <= phi1 + 1; ic++) {
+                     ni = pdat::NodeIndex(hier::Index<2>(plo0,
+                              ic), pdat::NodeIndex::LowerLeft);
+                     (*data)(ni) = 0;
+                  }
+               }
+            }
+         }
+      }
+
+      // Test #1b: HierarchyNodeDataOpsReal2::sumControlVolumes()
+      // Expected: norm = 0.5
+      double norm = node_ops->sumControlVolumes(nvindx[0], nwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(norm, 0.5)) {
+         tbox::perr
+         <<
+         "FAILED: - Test #1b: HierarchyNodeDataOpsReal2::sumControlVolumes()\n"
+         << "Expected value = 0.5 , Computed value = "
+         << norm << endl;
+      }
+
+      // Test #2: HierarchyNodeDataOpsReal2::numberOfEntries()
+      // Expected: num_data_points = 121
+      int num_data_points = node_ops->numberOfEntries(nvindx[0]);
+      if (num_data_points != 121) {
+         tbox::perr
+         << "FAILED: - Test #2: HierarchyNodeDataOpsReal2::numberOfEntries()\n"
+         << "Expected value = 121 , Computed value = "
+         << num_data_points << endl;
+      }
+
+      // Test #3a: HierarchyNodeDataOpsReal2::setToScalar()
+      // Expected: v0 = 2.0
+      double val0 = double(2.0);
+      node_ops->setToScalar(nvindx[0], val0);
+      if (!doubleDataSameAsValue(nvindx[0], val0, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #3a: HierarchyNodeDataOpsReal2::setToScalar()\n"
+         << "Expected: v0 = " << val0 << endl;
+         node_ops->printData(nvindx[0], tbox::plog);
+      }
+
+      // Test #3b: HierarchyNodeDataOpsReal2::setToScalar()
+      // Expected: v1 = (4.0)
+      node_ops->setToScalar(nvindx[1], 4.0);
+      double val1 = 4.0;
+      if (!doubleDataSameAsValue(nvindx[1], val1, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #3b: HierarchyNodeDataOpsReal2::setToScalar()\n"
+         << "Expected: v1 = " << val1 << endl;
+         node_ops->printData(nvindx[1], tbox::plog);
+      }
+
+      // Test #4: HierarchyNodeDataOpsReal2::copyData()
+      // Expected: v2 = v1 = (4.0)
+      node_ops->copyData(nvindx[2], nvindx[1]);
+      if (!doubleDataSameAsValue(nvindx[2], val1, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #4: HierarchyNodeDataOpsReal2::setToScalar()\n"
+         << "Expected: v2 = " << val1 << endl;
+         node_ops->printData(nvindx[2], tbox::plog);
+      }
+
+      // Test #5: HierarchyNodeDataOpsReal2::swapData()
+      // Expected: v0 = (4.0), v1 = (2.0)
+      node_ops->swapData(nvindx[0], nvindx[1]);
+      if (!doubleDataSameAsValue(nvindx[0], val1, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #5a: HierarchyNodeDataOpsReal2::setToScalar()\n"
+         << "Expected: v0 = " << val1 << endl;
+         node_ops->printData(nvindx[0], tbox::plog);
+      }
+      if (!doubleDataSameAsValue(nvindx[1], val0, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #5b: HierarchyNodeDataOpsReal2::setToScalar()\n"
+         << "Expected: v1 = " << val0 << endl;
+         node_ops->printData(nvindx[1], tbox::plog);
+      }
+
+      // Test #6: HierarchyNodeDataOpsReal2::scale()
+      // Expected: v2 = 0.25 * v2 = (1.0)
+      node_ops->scale(nvindx[2], 0.25, nvindx[2]);
+      double val_scale = 1.0;
+      if (!doubleDataSameAsValue(nvindx[2], val_scale, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #6: HierarchyNodeDataOpsReal2::scale()\n"
+         << "Expected: v2 = " << val_scale << endl;
+         node_ops->printData(nvindx[2], tbox::plog);
+      }
+
+      // Test #7: HierarchyNodeDataOpsReal2::add()
+      // Expected: v3 = v0 + v1 = (6.0)
+      node_ops->add(nvindx[3], nvindx[0], nvindx[1]);
+      double val_add = 6.0;
+      if (!doubleDataSameAsValue(nvindx[3], val_add, hierarchy)) {
+         tbox::perr << "FAILED: - Test #7: HierarchyNodeDataOpsReal2::add()\n"
+                    << "Expected: v3 = " << val_add << endl;
+         node_ops->printData(nvindx[3], tbox::plog);
+      }
+
+      // Reset v0: v0 = (0.0)
+      node_ops->setToScalar(nvindx[0], 0.0);
+
+      // Test #8: HierarchyNodeDataOpsReal2::subtract()
+      // Expected: v1 = v3 - v0 = (6.0)
+      node_ops->subtract(nvindx[1], nvindx[3], nvindx[0]);
+      double val_sub = 6.0;
+      if (!doubleDataSameAsValue(nvindx[1], val_sub, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #8: HierarchyNodeDataOpsReal2::subtract()\n"
+         << "Expected: v1 = " << val_sub << endl;
+         node_ops->printData(nvindx[1], tbox::plog);
+      }
+
+      // Test #9a: HierarchyNodeDataOpsReal2::addScalar()
+      // Expected: v1 = v1 + (0.0) = (6.0)
+      node_ops->addScalar(nvindx[1], nvindx[1], 0.0);
+      double val_addScalar = 6.0;
+      if (!doubleDataSameAsValue(nvindx[1], val_addScalar, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #9a: HierarchyNodeDataOpsReal2::addScalar()\n"
+         << "Expected: v1 = " << val_addScalar << endl;
+         node_ops->printData(nvindx[1], tbox::plog);
+      }
+
+      // Test #9b: HierarchyNodeDataOpsReal2::addScalar()
+      // Expected: v2 = v2 + (0.0) = (1.0)
+      node_ops->addScalar(nvindx[2], nvindx[2], 0.0);
+      val_addScalar = 1.0;
+      if (!doubleDataSameAsValue(nvindx[2], val_addScalar, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #9b: HierarchyNodeDataOpsReal2::addScalar()\n"
+         << "Expected: v2 = " << val_addScalar << endl;
+         node_ops->printData(nvindx[2], tbox::plog);
+      }
+
+      // Test #9c: HierarchyNodeDataOpsReal2::addScalar()
+      // Expected:  v2 = v2 + (3.0) = (4.0)
+      node_ops->addScalar(nvindx[2], nvindx[2], 3.0);
+      val_addScalar = 4.0;
+      if (!doubleDataSameAsValue(nvindx[2], val_addScalar, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #9c: HierarchyNodeDataOpsReal2::addScalar()\n"
+         << "Expected: v2 = " << val_addScalar << endl;
+         node_ops->printData(nvindx[2], tbox::plog);
+      }
+
+      // Reset v3: v3 = (0.5)
+      node_ops->setToScalar(nvindx[3], 0.5);
+
+      // Test #10: HierarchyNodeDataOpsReal2::multiply()
+      // Expected:  v1 = v3 * v1 = (3.0)
+      node_ops->multiply(nvindx[1], nvindx[3], nvindx[1]);
+      double val_mult = 3.0;
+      if (!doubleDataSameAsValue(nvindx[1], val_mult, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #10: HierarchyNodeDataOpsReal2::multiply()\n"
+         << "Expected: v1 = " << val_mult << endl;
+         node_ops->printData(nvindx[1], tbox::plog);
+      }
+
+      // Test #11: HierarchyNodeDataOpsReal2::divide()
+      // Expected:  v0 = v2 / v1 = 1.3333333333333
+      node_ops->divide(nvindx[0], nvindx[2], nvindx[1]);
+      double val_div = 1.333333333333333;
+      if (!doubleDataSameAsValue(nvindx[0], val_div, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #11: HierarchyNodeDataOpsReal2::divide()\n"
+         << "Expected: v0 = " << val_div << endl;
+         node_ops->printData(nvindx[0], tbox::plog);
+      }
+
+      // Test #12: HierarchyNodeDataOpsReal2::reciprocal()
+      // Expected:  v1 = 1 / v1 = (0.333333333)
+      node_ops->reciprocal(nvindx[1], nvindx[1]);
+      double val_rec = 0.33333333333333;
+      if (!doubleDataSameAsValue(nvindx[1], val_rec, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #12: HierarchyNodeDataOpsReal2::reciprocal()\n"
+         << "Expected: v1 = " << val_rec << endl;
+         node_ops->printData(nvindx[1], tbox::plog);
+      }
+
+      // Test #13: HierarchyNodeDataOpsReal2::abs()
+      // Expected:  v3 = abs(v2) = 4.0
+      node_ops->abs(nvindx[3], nvindx[2]);
+      double val_abs = 4.0;
+      if (!doubleDataSameAsValue(nvindx[3], val_abs, hierarchy)) {
+         tbox::perr << "FAILED: - Test #13: HierarchyNodeDataOpsReal2::abs()\n"
+                    << "Expected: v3 = " << val_abs << endl;
+         node_ops->printData(nvindx[3], tbox::plog);
+      }
+
+      // Test #14: Place some bogus values on coarse level
+      tbox::Pointer<pdat::NodeData<double> > ndata;
+
+      // set values
+      tbox::Pointer<hier::PatchLevel> level_zero =
+         hierarchy->getPatchLevel(0);
+      for (hier::PatchLevel::Iterator ip(level_zero); ip; ip++) {
+         patch = level_zero->getPatch(ip());
+         ndata = patch->getPatchData(nvindx[2]);
+         hier::Index<2> index0(2, 2);
+         hier::Index<2> index1(5, 3);
+         if (patch->getBox().contains(index0)) {
+            (*ndata)(pdat::NodeIndex(index0,
+                        pdat::NodeIndex::LowerLeft), 0) = 100.0;
+         }
+         if (patch->getBox().contains(index1)) {
+            (*ndata)(pdat::NodeIndex(index1,
+                        pdat::NodeIndex::UpperRight), 0) = -1000.0;
+         }
+      }
+
+      // check values
+      bool bogus_value_test_passed = true;
+      for (hier::PatchLevel::Iterator ipp(level_zero); ipp; ipp++) {
+         patch = level_zero->getPatch(ipp());
+         ndata = patch->getPatchData(nvindx[2]);
+         pdat::NodeIndex index0(hier::Index<2>(2,
+                                               2), pdat::NodeIndex::LowerLeft);
+         pdat::NodeIndex index1(hier::Index<2>(5,
+                                               3), pdat::NodeIndex::UpperRight);
+
+         for (pdat::NodeIterator c(ndata->getBox());
+              c && bogus_value_test_passed;
+              c++) {
+            pdat::NodeIndex node_index = c();
+
+            if (node_index == index0) {
+               if (!tbox::MathUtilities<double>::equalEps((*ndata)(node_index),
+                      100.0)) {
+                  bogus_value_test_passed = false;
+               }
+            } else {
+               if (node_index == index1) {
+                  if (!tbox::MathUtilities<double>::equalEps((*ndata)(
+                            node_index), -1000.0)) {
+                     bogus_value_test_passed = false;
+                  }
+               } else {
+                  if (!tbox::MathUtilities<double>::equalEps((*ndata)(
+                            node_index), 4.0)) {
+                     bogus_value_test_passed = false;
+                  }
+               }
+            }
+         }
+      }
+      if (!bogus_value_test_passed) {
+         tbox::perr
+         << "FAILED: - Test #14:  Place some bogus values on coarse level"
+         << endl;
+         node_ops->printData(nvindx[2], tbox::plog);
+      }
+
+      // Test #15: HierarchyNodeDataOpsReal2::L1Norm() - w/o control weight
+      // Expected:  bogus_l1_norm = 1640.00
+      double bogus_l1_norm = node_ops->L1Norm(nvindx[2]);
+      if (!tbox::MathUtilities<double>::equalEps(bogus_l1_norm, 1640.00)) {
+         tbox::perr
+         << "FAILED: - Test #15: HierarchyNodeDataOpsReal2::L1Norm()"
+         << " - w/o control weight\n"
+         << "Expected value = 1640.00, Computed value = "
+         << setprecision(12) << bogus_l1_norm << endl;
+      }
+
+      // Test #16: HierarchyNodeDataOpsReal2::L1Norm() - w/control weight
+      // Expected:  correct_l1_norm = 2.0
+      double correct_l1_norm = node_ops->L1Norm(nvindx[2], nwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(correct_l1_norm, 2.0)) {
+         tbox::perr
+         << "FAILED: - Test #16: HierarchyNodeDataOpsReal2::L1Norm()"
+         << " - w/control weight\n"
+         << "Expected value = 2.0, Computed value = "
+         << correct_l1_norm << endl;
+      }
+
+      // Test #17: HierarchyNodeDataOpsReal2::L2Norm()
+      // Expected:  l2_norm = 2.8284271
+      double l2_norm = node_ops->L2Norm(nvindx[2], nwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(l2_norm, 2.82842712475)) {
+         tbox::perr
+         << "FAILED: - Test #17: HierarchyNodeDataOpsReal2::L2Norm()\n"
+         << "Expected value = 2.82842712475, Computed value = "
+         << l2_norm << endl;
+      }
+
+      // Test #18: HierarchyNodeDataOpsReal2::maxNorm() - w/o control weight
+      // Expected:  bogus_max_norm = 1000.0
+      double bogus_max_norm = node_ops->maxNorm(nvindx[2]);
+      if (!tbox::MathUtilities<double>::equalEps(bogus_max_norm, 1000.0)) {
+         tbox::perr
+         << "FAILED: - Test #18: HierarchyNodeDataOpsReal2::maxNorm()"
+         << " - w/o control weight\n"
+         << "Expected value = 1000.0, Computed value = "
+         << bogus_max_norm << endl;
+      }
+
+      // Test #19: HierarchyNodeDataOpsReal2::maxNorm() - w/control weight
+      // Expected:  max_norm = 4.0
+      double max_norm = node_ops->maxNorm(nvindx[2], nwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(max_norm, 4.0)) {
+         tbox::perr
+         << "FAILED: - Test #19: HierarchyNodeDataOpsReal2::maxNorm()"
+         << " - w/control weight\n"
+         << "Expected value = 4.0, Computed value = "
+         << max_norm << endl;
+      }
+
+      // Reset data and test sums, axpy's
+      node_ops->setToScalar(nvindx[0], 1.0);
+      node_ops->setToScalar(nvindx[1], 2.5);
+      node_ops->setToScalar(nvindx[2], 7.0);
+
+      // Test #20: HierarchyNodeDataOpsReal2::linearSum()
+      // Expected:  v3 = 5.0
+      double val_linearSum = 5.0;
+      node_ops->linearSum(nvindx[3], 2.0, nvindx[1], 0.00, nvindx[0]);
+      if (!doubleDataSameAsValue(nvindx[3], val_linearSum, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #20: HierarchyNodeDataOpsReal2::linearSum()\n"
+         << "Expected: v3 = " << val_linearSum << endl;
+         node_ops->printData(nvindx[3], tbox::plog);
+      }
+
+      // Test #21: HierarchyNodeDataOpsReal2::axmy()
+      // Expected:  v3 = 6.5
+      node_ops->axmy(nvindx[3], 3.0, nvindx[1], nvindx[0]);
+      double val_axmy = 6.5;
+      if (!doubleDataSameAsValue(nvindx[3], val_axmy, hierarchy)) {
+         tbox::perr
+         << "FAILED: - Test #21: HierarchyNodeDataOpsReal2::axmy()\n"
+         << "Expected: v3 = " << val_axmy << endl;
+         node_ops->printData(nvindx[3], tbox::plog);
+      }
+
+      // Test #22a: HierarchyNodeDataOpsReal2::dot() - (ind2) * (ind1)
+      // Expected:  cdot = 8.75
+      double cdot = node_ops->dot(nvindx[2], nvindx[1], nwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(cdot, 8.75)) {
+         tbox::perr
+         <<
+         "FAILED: - Test #22a: HierarchyNodeDataOpsReal2::dot() - (ind2) * (ind1)\n"
+         << "Expected Value = 8.75, Computed Value = "
+         << cdot << endl;
+      }
+
+      // Test #22a: HierarchyNodeDataOpsReal2::dot() - (ind1) * (ind2)
+      // Expected:  cdot = 8.75
+      cdot = node_ops->dot(nvindx[1], nvindx[2], nwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(cdot, 8.75)) {
+         tbox::perr
+         <<
+         "FAILED: - Test #22a: HierarchyNodeDataOpsReal2::dot() - (ind1) * (ind2)\n"
+         << "Expected Value = 8.75, Computed Value = "
+         << cdot << endl;
+      }
+
+      // deallocate data on hierarchy
+      for (ln = 0; ln < 2; ln++) {
+         hierarchy->getPatchLevel(ln)->deallocatePatchData(nwgt_id);
+         for (iv = 0; iv < NVARS; iv++) {
+            hierarchy->getPatchLevel(ln)->deallocatePatchData(nvindx[iv]);
+         }
+      }
+
+      for (iv = 0; iv < NVARS; iv++) {
+         nvar[iv].setNull();
+      }
+      nwgt.setNull();
+
+      geometry.setNull();
+      hierarchy.setNull();
+      node_ops.setNull();
+      nwgt_ops.setNull();
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return 0;
+}
+
+/*
+ * Returns true if all the data in the hierarchy is equal to the specified
+ * value.  Returns false otherwise.
+ */
+bool
+doubleDataSameAsValue(
+   int desc_id,
+   double value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   bool test_passed = true;
+
+   int ln;
+   tbox::Pointer<hier::Patch> patch;
+   for (ln = 0; ln < 2; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         patch = level->getPatch(ip());
+         tbox::Pointer<pdat::NodeData<double> > nvdata = patch->getPatchData(
+               desc_id);
+
+         for (pdat::NodeIterator c(nvdata->getBox()); c && test_passed; c++) {
+            pdat::NodeIndex node_index = c();
+            if (!tbox::MathUtilities<double>::equalEps((*nvdata)(node_index),
+                   value)) {
+               test_passed = false;
+            }
+         }
+      }
+   }
+
+   return test_passed;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dataops/node_hiertest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dataops/node_hiertest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,842 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program to test node-centered patch data ops 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fstream>
+#include <iomanip>
+using namespace std;
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/math/HierarchyDataOpsComplex.h"
+#include "SAMRAI/math/HierarchyNodeDataOpsComplex.h"
+#include "SAMRAI/math/HierarchyDataOpsReal.h"
+#include "SAMRAI/math/HierarchyNodeDataOpsReal.h"
+#include "SAMRAI/pdat/NodeIndex.h"
+#include "SAMRAI/pdat/NodeIterator.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/ProcessorMapping.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/hier/VariableContext.h"
+
+using namespace SAMRAI;
+
+/* Helper function declarations */
+static bool
+doubleDataSameAsValue(
+   int desc_id,
+   double value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+#define NVARS 4
+
+int main(
+   int argc,
+   char* argv[]) {
+
+   int num_failures = 0;
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   if (argc < 2) {
+      TBOX_ERROR("Usage: " << argv[0] << " [dimension]");
+   }
+
+   const unsigned short d = static_cast<unsigned short>(atoi(argv[1]));
+   TBOX_ASSERT(d > 0);
+   TBOX_ASSERT(d <= tbox::Dimension::MAXIMUM_DIMENSION_VALUE);
+   const tbox::Dimension dim(d);
+
+   if (dim != tbox::Dimension(2)) {
+      TBOX_ERROR("This test code is completed only for 2D!!!");
+   }
+
+   const std::string log_fn = std::string("node_hiertest.")
+      + tbox::Utilities::intToString(dim.getValue(), 1) + "d.log";
+   tbox::PIO::logAllNodes(log_fn);
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+
+      const tbox::Dimension dim2d(2);
+
+      int ln, iv;
+
+      // Make a dummy hierarchy domain
+      double lo[2] = { 0.0, 0.0 };
+      double hi[2] = { 1.0, 0.5 };
+
+      int coarse0_array[2][2] = { { 0, 0 }, { 9, 2 } };
+      hier::Box coarse0((hier::Index(dim2d, coarse0_array[0])), (hier::Index(
+                                                                    dim2d,
+                                                                    coarse0_array
+                                                                    [1])));
+
+      int coarse1_array[2][2] = { { 0, 3 }, { 9, 4 } };
+      hier::Box coarse1((hier::Index(dim2d, coarse1_array[0])), (hier::Index(
+                                                                    dim2d,
+                                                                    coarse1_array
+                                                                    [1])));
+
+      int fine0_array[2][2] = { { 4, 4 }, { 7, 7 } };
+      hier::Box fine0((hier::Index(dim2d, fine0_array[0])), (hier::Index(dim2d,
+                                                                fine0_array[1])));
+
+      int fine1_array[2][2] = { { 8, 4 }, { 13, 7 } };
+      hier::Box fine1((hier::Index(dim2d, fine1_array[0])), (hier::Index(dim2d,
+                                                                fine1_array[1])));
+
+      hier::IntVector ratio(dim2d, 2);
+
+      hier::BoxArray coarse_domain(dim2d, 2);
+      hier::BoxArray fine_boxes(dim2d, 2);
+      coarse_domain[0] = coarse0;
+      coarse_domain[1] = coarse1;
+      fine_boxes[0] = fine0;
+      fine_boxes[1] = fine1;
+
+      tbox::Pointer<geom::CartesianGridGeometry> geometry(
+         new geom::CartesianGridGeometry("CartesianGeometry",
+            lo,
+            hi,
+            coarse_domain));
+
+      tbox::Pointer<hier::PatchHierarchy> hierarchy(
+         new hier::PatchHierarchy("PatchHierarchy", geometry));
+
+      hierarchy->setMaxNumberOfLevels(2);
+      hierarchy->setRatioToCoarserLevel(ratio, 1);
+
+      // Note: For these simple tests we allow at most 2 processors.
+      const int nproc = mpi.getSize();
+      TBOX_ASSERT(nproc < 3);
+
+      const int n_coarse_boxes = coarse_domain.getNumberOfBoxes();
+      const int n_fine_boxes = fine_boxes.getNumberOfBoxes();
+
+      hier::MappedBoxLevel layer0(hier::IntVector(dim, 1));
+      hier::MappedBoxLevel layer1(ratio);
+
+      for (int ib = 0; ib < n_coarse_boxes; ib++) {
+         if (nproc > 1) {
+            if (ib == layer0.getRank()) {
+               layer0.addMappedBox(hier::MappedBox(coarse_domain[ib], hier::LocalId(ib),
+                     layer0.getRank()));
+            }
+         } else {
+            layer0.addMappedBox(hier::MappedBox(coarse_domain[ib], hier::LocalId(ib), 0));
+         }
+      }
+
+      for (int ib = 0; ib < n_fine_boxes; ib++) {
+         if (nproc > 1) {
+            if (ib == layer1.getRank()) {
+               layer1.addMappedBox(hier::MappedBox(fine_boxes[ib], hier::LocalId(ib),
+                     layer1.getRank()));
+            }
+         } else {
+            layer1.addMappedBox(hier::MappedBox(fine_boxes[ib], hier::LocalId(ib), 0));
+         }
+      }
+
+      hierarchy->makeNewPatchLevel(0, layer0);
+      hierarchy->makeNewPatchLevel(1, layer1);
+
+      // Create instance of hier::Variable database
+      hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+      tbox::Pointer<hier::VariableContext> dummy = variable_db->getContext(
+            "dummy");
+      const hier::IntVector no_ghosts(dim2d, 0);
+
+      // Make some dummy variables and data on the hierarchy
+      tbox::Pointer<pdat::NodeVariable<double> > nvar[NVARS];
+      int nvindx[NVARS];
+      nvar[0] = new pdat::NodeVariable<double>(dim2d, "nvar0", 1);
+      nvindx[0] = variable_db->registerVariableAndContext(
+            nvar[0], dummy, no_ghosts);
+      nvar[1] = new pdat::NodeVariable<double>(dim2d, "nvar1", 1);
+      nvindx[1] = variable_db->registerVariableAndContext(
+            nvar[1], dummy, no_ghosts);
+      nvar[2] = new pdat::NodeVariable<double>(dim2d, "nvar2", 1);
+      nvindx[2] = variable_db->registerVariableAndContext(
+            nvar[2], dummy, no_ghosts);
+      nvar[3] = new pdat::NodeVariable<double>(dim2d, "nvar3", 1);
+      nvindx[3] = variable_db->registerVariableAndContext(
+            nvar[3], dummy, no_ghosts);
+
+      tbox::Pointer<pdat::NodeVariable<double> >
+      nwgt(new pdat::NodeVariable<double>(dim2d, "nwgt", 1));
+      int nwgt_id = variable_db->registerVariableAndContext(
+            nwgt, dummy, no_ghosts);
+
+      // allocate data on hierarchy
+      for (ln = 0; ln < 2; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+         level->allocatePatchData(nwgt_id);
+         for (iv = 0; iv < NVARS; iv++) {
+            level->allocatePatchData(nvindx[iv]);
+         }
+      }
+
+      tbox::Pointer<math::HierarchyDataOpsReal<double> > node_ops(
+         new math::HierarchyNodeDataOpsReal<double>(hierarchy, 0, 1));
+      TBOX_ASSERT(!node_ops.isNull());
+
+      tbox::Pointer<math::HierarchyDataOpsReal<double> > nwgt_ops(
+         new math::HierarchyNodeDataOpsReal<double>(hierarchy, 0, 1));
+
+      tbox::Pointer<hier::Patch> patch;
+      tbox::Pointer<geom::CartesianPatchGeometry> pgeom;
+
+      // Initialize control volume data for node-centered components
+      hier::Box coarse_fine = fine0 + fine1;
+      coarse_fine.coarsen(ratio);
+      for (ln = 0; ln < 2; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::Pointer<pdat::NodeData<double> > data;
+            patch = *ip;
+            pgeom = patch->getPatchGeometry();
+            const double* dx = pgeom->getDx();
+            const double node_vol = dx[0] * dx[1];
+            data = patch->getPatchData(nwgt_id);
+            data->fillAll(node_vol);
+            pdat::NodeIndex ni(dim);
+            int plo0 = patch->getBox().lower(0);
+            int phi0 = patch->getBox().upper(0);
+            int plo1 = patch->getBox().lower(1);
+            int phi1 = patch->getBox().upper(1);
+            int ic;
+
+            if (ln == 0) {
+               data->fillAll(0.0, (coarse_fine * patch->getBox()));
+
+               if (patch->getLocalId() == 0) {
+                  //bottom boundaries
+                  for (ic = plo0; ic < phi0; ic++) {
+                     ni = pdat::NodeIndex(hier::Index(ic,
+                              plo1), pdat::NodeIndex::LowerRight);
+                     (*data)(ni) *= 0.5;
+                  }
+                  //left and right boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     ni = pdat::NodeIndex(hier::Index(plo0,
+                              ic), pdat::NodeIndex::UpperLeft);
+                     (*data)(ni) *= 0.5;
+                     ni = pdat::NodeIndex(hier::Index(phi0,
+                              ic), pdat::NodeIndex::UpperRight);
+                     (*data)(ni) *= 0.5;
+                  }
+                  // corner boundaries
+                  (*data)(pdat::NodeIndex(hier::Index(plo0,
+                                plo1), pdat::NodeIndex::LowerLeft)) *= 0.25;
+                  (*data)(pdat::NodeIndex(hier::Index(phi0,
+                                plo1), pdat::NodeIndex::LowerRight)) *= 0.25;
+               } else {
+                  //top and bottom boundaries
+                  for (ic = plo0; ic < phi0; ic++) {
+                     ni = pdat::NodeIndex(hier::Index(ic,
+                              phi1), pdat::NodeIndex::UpperRight);
+                     (*data)(ni) *= 0.5;
+                     ni = pdat::NodeIndex(hier::Index(ic,
+                              plo1), pdat::NodeIndex::LowerRight);
+                     (*data)(ni) = 0.0;
+                  }
+                  //left and right boundaries
+                  for (ic = plo1; ic < phi1; ic++) {
+                     ni = pdat::NodeIndex(hier::Index(plo0,
+                              ic), pdat::NodeIndex::UpperLeft);
+                     (*data)(ni) *= 0.5;
+                     ni = pdat::NodeIndex(hier::Index(phi0,
+                              ic), pdat::NodeIndex::UpperRight);
+                     (*data)(ni) *= 0.5;
+                  }
+                  // corner boundaries
+                  (*data)(pdat::NodeIndex(hier::Index(plo0,
+                                plo1), pdat::NodeIndex::LowerLeft)) = 0.0;
+                  (*data)(pdat::NodeIndex(hier::Index(plo0,
+                                phi1), pdat::NodeIndex::UpperLeft)) *= 0.25;
+                  (*data)(pdat::NodeIndex(hier::Index(phi0,
+                                plo1), pdat::NodeIndex::LowerRight)) = 0.0;
+                  (*data)(pdat::NodeIndex(hier::Index(phi0,
+                                phi1), pdat::NodeIndex::UpperRight)) *= 0.25;
+               }
+            } else {
+               if (patch->getLocalId() == 0) {
+                  // top and bottom coarse-fine boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     ni = pdat::NodeIndex(hier::Index(ic,
+                              plo1), pdat::NodeIndex::LowerRight);
+                     (*data)(ni) *= 1.5;
+                     ni = pdat::NodeIndex(hier::Index(ic,
+                              phi1), pdat::NodeIndex::UpperRight);
+                     (*data)(ni) *= 1.5;
+                  }
+                  //left coarse-fine boundaries
+                  for (ic = plo1; ic < phi1; ic++) {
+                     ni = pdat::NodeIndex(hier::Index(plo0,
+                              ic), pdat::NodeIndex::UpperLeft);
+                     (*data)(ni) *= 1.5;
+                  }
+                  // coarse-fine corner boundaries
+                  (*data)(pdat::NodeIndex(hier::Index(plo0,
+                                plo1), pdat::NodeIndex::LowerLeft)) *= 2.25;
+                  (*data)(pdat::NodeIndex(hier::Index(plo0,
+                                phi1), pdat::NodeIndex::UpperLeft)) *= 2.25;
+               } else {
+                  // top and bottom coarse-fine boundaries
+                  for (ic = plo0; ic < phi0; ic++) {
+                     ni = pdat::NodeIndex(hier::Index(ic,
+                              plo1), pdat::NodeIndex::LowerRight);
+                     (*data)(ni) *= 1.5;
+                     ni = pdat::NodeIndex(hier::Index(ic,
+                              phi1), pdat::NodeIndex::UpperRight);
+                     (*data)(ni) *= 1.5;
+                  }
+                  //right coarse-fine boundaries
+                  for (ic = plo1; ic < phi1; ic++) {
+                     ni = pdat::NodeIndex(hier::Index(phi0,
+                              ic), pdat::NodeIndex::UpperRight);
+                     (*data)(ni) *= 1.5;
+                  }
+                  // coarse-fine corner boundaries
+                  (*data)(pdat::NodeIndex(hier::Index(phi0,
+                                plo1), pdat::NodeIndex::LowerRight)) *= 2.25;
+                  (*data)(pdat::NodeIndex(hier::Index(phi0,
+                                phi1), pdat::NodeIndex::UpperRight)) *= 2.25;
+                  //shared left boundaries
+                  for (ic = plo1; ic <= phi1 + 1; ic++) {
+                     ni = pdat::NodeIndex(hier::Index(plo0,
+                              ic), pdat::NodeIndex::LowerLeft);
+                     (*data)(ni) = 0;
+                  }
+               }
+            }
+         }
+      }
+
+      // Test #1: Print out control volume data and compute its integral
+
+      // Test #1a: Check control volume data set properly
+      // Expected: cwgt = 0.01 on coarse (except where finer patch exists) and
+      // 0.0025 on fine level
+/*   bool vol_test_passed = true;
+ *   for (ln = 0; ln < 2; ln++) {
+ *   for (hier::PatchLevel::Iterator ip(hierarchy->getPatchLevel(ln)); ip; ip++) {
+ *   patch = hierarchy->getPatchLevel(ln)->getPatch(ip());
+ *   tbox::Pointer< pdat::NodeData<double> > cvdata = patch->getPatchData(cwgt_id);
+ *
+ *   for (pdat::NodeIterator c(cvdata->getBox());c && vol_test_passed;c++) {
+ *   pdat::NodeIndex node_index = c();
+ *
+ *   if (ln == 0) {
+ *   if ((coarse_fine * patch->getBox()).contains(node_index)) {
+ *   if ( !tbox::MathUtilities<double>::equalEps((*cvdata)(node_index),0.0) ) {
+ *   vol_test_passed = false;
+ *   }
+ *   } else {
+ *   if ( !tbox::MathUtilities<double>::equalEps((*cvdata)(node_index),0.01) ) {
+ *   vol_test_passed = false;
+ *   }
+ *   }
+ *   }
+ *
+ *   if (ln == 1) {
+ *   if ( !tbox::MathUtilities<double>::equalEps((*cvdata)(node_index),0.0025) ) {
+ *   vol_test_passed = false;
+ *   }
+ *   }
+ *   }
+ *   }
+ *   }
+ *   if (!vol_test_passed) {
+ *   num_failures++;
+ *   tbox::perr << "FAILED: - Test #1a: Check control volume data set properly" << std::endl;
+ *   cwgt_ops->printData(cwgt_id, tbox::plog);
+ *   }
+ */
+      // Print out control volume data and compute its integral
+/*
+ * tbox::plog << "node control volume data" << std::endl;
+ * nwgt_ops->printData(nwgt_id, tbox::plog);
+ */
+
+      // Test #1b: math::HierarchyNodeDataOpsReal::sumControlVolumes()
+      // Expected: norm = 0.5
+      double norm = node_ops->sumControlVolumes(nvindx[0], nwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(norm, 0.5)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #1b: math::HierarchyNodeDataOpsReal::sumControlVolumes()\n"
+         << "Expected value = 0.5 , Computed value = "
+         << norm << std::endl;
+      }
+
+      // Test #2: math::HierarchyNodeDataOpsReal::numberOfEntries()
+      // Expected: num_data_points = 121
+      int num_data_points = node_ops->numberOfEntries(nvindx[0]);
+      if (num_data_points != 121) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #2: math::HierarchyNodeDataOpsReal::numberOfEntries()\n"
+         << "Expected value = 121 , Computed value = "
+         << num_data_points << std::endl;
+      }
+
+      // Test #3a: math::HierarchyNodeDataOpsReal::setToScalar()
+      // Expected: v0 = 2.0
+      double val0 = double(2.0);
+      node_ops->setToScalar(nvindx[0], val0);
+      if (!doubleDataSameAsValue(nvindx[0], val0, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #3a: math::HierarchyNodeDataOpsReal::setToScalar()\n"
+         << "Expected: v0 = " << val0 << std::endl;
+         node_ops->printData(nvindx[0], tbox::plog);
+      }
+
+      // Test #3b: math::HierarchyNodeDataOpsReal::setToScalar()
+      // Expected: v1 = (4.0)
+      node_ops->setToScalar(nvindx[1], 4.0);
+      double val1 = 4.0;
+      if (!doubleDataSameAsValue(nvindx[1], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #3b: math::HierarchyNodeDataOpsReal::setToScalar()\n"
+         << "Expected: v1 = " << val1 << std::endl;
+         node_ops->printData(nvindx[1], tbox::plog);
+      }
+
+      // Test #4: math::HierarchyNodeDataOpsReal::copyData()
+      // Expected: v2 = v1 = (4.0)
+      node_ops->copyData(nvindx[2], nvindx[1]);
+      if (!doubleDataSameAsValue(nvindx[2], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #4: math::HierarchyNodeDataOpsReal::setToScalar()\n"
+         << "Expected: v2 = " << val1 << std::endl;
+         node_ops->printData(nvindx[2], tbox::plog);
+      }
+
+      // Test #5: math::HierarchyNodeDataOpsReal::swapData()
+      // Expected: v0 = (4.0), v1 = (2.0)
+      node_ops->swapData(nvindx[0], nvindx[1]);
+      if (!doubleDataSameAsValue(nvindx[0], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #5a: math::HierarchyNodeDataOpsReal::setToScalar()\n"
+         << "Expected: v0 = " << val1 << std::endl;
+         node_ops->printData(nvindx[0], tbox::plog);
+      }
+      if (!doubleDataSameAsValue(nvindx[1], val0, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #5b: math::HierarchyNodeDataOpsReal::setToScalar()\n"
+         << "Expected: v1 = " << val0 << std::endl;
+         node_ops->printData(nvindx[1], tbox::plog);
+      }
+
+      // Test #6: math::HierarchyNodeDataOpsReal::scale()
+      // Expected: v2 = 0.25 * v2 = (1.0)
+      node_ops->scale(nvindx[2], 0.25, nvindx[2]);
+      double val_scale = 1.0;
+      if (!doubleDataSameAsValue(nvindx[2], val_scale, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #6: math::HierarchyNodeDataOpsReal::scale()\n"
+         << "Expected: v2 = " << val_scale << std::endl;
+         node_ops->printData(nvindx[2], tbox::plog);
+      }
+
+      // Test #7: math::HierarchyNodeDataOpsReal::add()
+      // Expected: v3 = v0 + v1 = (6.0)
+      node_ops->add(nvindx[3], nvindx[0], nvindx[1]);
+      double val_add = 6.0;
+      if (!doubleDataSameAsValue(nvindx[3], val_add, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #7: math::HierarchyNodeDataOpsReal::add()\n"
+         << "Expected: v3 = " << val_add << std::endl;
+         node_ops->printData(nvindx[3], tbox::plog);
+      }
+
+      // Reset v0: v0 = (0.0)
+      node_ops->setToScalar(nvindx[0], 0.0);
+
+      // Test #8: math::HierarchyNodeDataOpsReal::subtract()
+      // Expected: v1 = v3 - v0 = (6.0)
+      node_ops->subtract(nvindx[1], nvindx[3], nvindx[0]);
+      double val_sub = 6.0;
+      if (!doubleDataSameAsValue(nvindx[1], val_sub, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #8: math::HierarchyNodeDataOpsReal::subtract()\n"
+         << "Expected: v1 = " << val_sub << std::endl;
+         node_ops->printData(nvindx[1], tbox::plog);
+      }
+
+      // Test #9a: math::HierarchyNodeDataOpsReal::addScalar()
+      // Expected: v1 = v1 + (0.0) = (6.0)
+      node_ops->addScalar(nvindx[1], nvindx[1], 0.0);
+      double val_addScalar = 6.0;
+      if (!doubleDataSameAsValue(nvindx[1], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #9a: math::HierarchyNodeDataOpsReal::addScalar()\n"
+         << "Expected: v1 = " << val_addScalar << std::endl;
+         node_ops->printData(nvindx[1], tbox::plog);
+      }
+
+      // Test #9b: math::HierarchyNodeDataOpsReal::addScalar()
+      // Expected: v2 = v2 + (0.0) = (1.0)
+      node_ops->addScalar(nvindx[2], nvindx[2], 0.0);
+      val_addScalar = 1.0;
+      if (!doubleDataSameAsValue(nvindx[2], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #9b: math::HierarchyNodeDataOpsReal::addScalar()\n"
+         << "Expected: v2 = " << val_addScalar << std::endl;
+         node_ops->printData(nvindx[2], tbox::plog);
+      }
+
+      // Test #9c: math::HierarchyNodeDataOpsReal::addScalar()
+      // Expected:  v2 = v2 + (3.0) = (4.0)
+      node_ops->addScalar(nvindx[2], nvindx[2], 3.0);
+      val_addScalar = 4.0;
+      if (!doubleDataSameAsValue(nvindx[2], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #9c: math::HierarchyNodeDataOpsReal::addScalar()\n"
+         << "Expected: v2 = " << val_addScalar << std::endl;
+         node_ops->printData(nvindx[2], tbox::plog);
+      }
+
+      // Reset v3: v3 = (0.5)
+      node_ops->setToScalar(nvindx[3], 0.5);
+
+      // Test #10: math::HierarchyNodeDataOpsReal::multiply()
+      // Expected:  v1 = v3 * v1 = (3.0)
+      node_ops->multiply(nvindx[1], nvindx[3], nvindx[1]);
+      double val_mult = 3.0;
+      if (!doubleDataSameAsValue(nvindx[1], val_mult, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #10: math::HierarchyNodeDataOpsReal::multiply()\n"
+         << "Expected: v1 = " << val_mult << std::endl;
+         node_ops->printData(nvindx[1], tbox::plog);
+      }
+
+      // Test #11: math::HierarchyNodeDataOpsReal::divide()
+      // Expected:  v0 = v2 / v1 = 1.3333333333333
+      node_ops->divide(nvindx[0], nvindx[2], nvindx[1]);
+      double val_div = 1.333333333333333;
+      if (!doubleDataSameAsValue(nvindx[0], val_div, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #11: math::HierarchyNodeDataOpsReal::divide()\n"
+         << "Expected: v0 = " << val_div << std::endl;
+         node_ops->printData(nvindx[0], tbox::plog);
+      }
+
+      // Test #12: math::HierarchyNodeDataOpsReal::reciprocal()
+      // Expected:  v1 = 1 / v1 = (0.333333333)
+      node_ops->reciprocal(nvindx[1], nvindx[1]);
+      double val_rec = 0.33333333333333;
+      if (!doubleDataSameAsValue(nvindx[1], val_rec, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #12: math::HierarchyNodeDataOpsReal::reciprocal()\n"
+         << "Expected: v1 = " << val_rec << std::endl;
+         node_ops->printData(nvindx[1], tbox::plog);
+      }
+
+      // Test #13: math::HierarchyNodeDataOpsReal::abs()
+      // Expected:  v3 = abs(v2) = 4.0
+      node_ops->abs(nvindx[3], nvindx[2]);
+      double val_abs = 4.0;
+      if (!doubleDataSameAsValue(nvindx[3], val_abs, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #13: math::HierarchyNodeDataOpsReal::abs()\n"
+         << "Expected: v3 = " << val_abs << std::endl;
+         node_ops->printData(nvindx[3], tbox::plog);
+      }
+
+      // Test #14: Place some bogus values on coarse level
+      tbox::Pointer<pdat::NodeData<double> > ndata;
+
+      // set values
+      tbox::Pointer<hier::PatchLevel> level_zero =
+         hierarchy->getPatchLevel(0);
+      for (hier::PatchLevel::Iterator ip(level_zero); ip; ip++) {
+         patch = *ip;
+         ndata = patch->getPatchData(nvindx[2]);
+         hier::Index index0(2, 2);
+         hier::Index index1(5, 3);
+         if (patch->getBox().contains(index0)) {
+            (*ndata)(pdat::NodeIndex(index0,
+                        pdat::NodeIndex::LowerLeft), 0) = 100.0;
+         }
+         if (patch->getBox().contains(index1)) {
+            (*ndata)(pdat::NodeIndex(index1,
+                        pdat::NodeIndex::UpperRight), 0) = -1000.0;
+         }
+      }
+
+      // check values
+      bool bogus_value_test_passed = true;
+      for (hier::PatchLevel::Iterator ipp(level_zero); ipp; ipp++) {
+         patch = *ipp;
+         ndata = patch->getPatchData(nvindx[2]);
+         pdat::NodeIndex index0(hier::Index(2, 2), pdat::NodeIndex::LowerLeft);
+         pdat::NodeIndex index1(hier::Index(5, 3), pdat::NodeIndex::UpperRight);
+
+         for (pdat::NodeIterator c(ndata->getBox());
+              c && bogus_value_test_passed;
+              c++) {
+            pdat::NodeIndex node_index = c();
+
+            if (node_index == index0) {
+               if (!tbox::MathUtilities<double>::equalEps((*ndata)(node_index),
+                      100.0)) {
+                  bogus_value_test_passed = false;
+               }
+            } else {
+               if (node_index == index1) {
+                  if (!tbox::MathUtilities<double>::equalEps((*ndata)(
+                            node_index), -1000.0)) {
+                     bogus_value_test_passed = false;
+                  }
+               } else {
+                  if (!tbox::MathUtilities<double>::equalEps((*ndata)(
+                            node_index), 4.0)) {
+                     bogus_value_test_passed = false;
+                  }
+               }
+            }
+         }
+      }
+      if (!bogus_value_test_passed) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #14:  Place some bogus values on coarse level"
+         << std::endl;
+         node_ops->printData(nvindx[2], tbox::plog);
+      }
+
+      // Test #15: math::HierarchyNodeDataOpsReal::L1Norm() - w/o control weight
+      // Expected:  bogus_l1_norm = 1640.00
+      double bogus_l1_norm = node_ops->L1Norm(nvindx[2]);
+      if (!tbox::MathUtilities<double>::equalEps(bogus_l1_norm, 1640.00)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #15: math::HierarchyNodeDataOpsReal::L1Norm()"
+         << " - w/o control weight\n"
+         << "Expected value = 1640.00, Computed value = "
+         << std::setprecision(12) << bogus_l1_norm << std::endl;
+      }
+
+      // Test #16: math::HierarchyNodeDataOpsReal::L1Norm() - w/control weight
+      // Expected:  correct_l1_norm = 2.0
+      double correct_l1_norm = node_ops->L1Norm(nvindx[2], nwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(correct_l1_norm, 2.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #16: math::HierarchyNodeDataOpsReal::L1Norm()"
+         << " - w/control weight\n"
+         << "Expected value = 2.0, Computed value = "
+         << correct_l1_norm << std::endl;
+      }
+
+      // Test #17: math::HierarchyNodeDataOpsReal::L2Norm()
+      // Expected:  l2_norm = 2.8284271
+      double l2_norm = node_ops->L2Norm(nvindx[2], nwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(l2_norm, 2.82842712475)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #17: math::HierarchyNodeDataOpsReal::L2Norm()\n"
+         << "Expected value = 2.82842712475, Computed value = "
+         << l2_norm << std::endl;
+      }
+
+      // Test #18: math::HierarchyNodeDataOpsReal::maxNorm() - w/o control weight
+      // Expected:  bogus_max_norm = 1000.0
+      double bogus_max_norm = node_ops->maxNorm(nvindx[2]);
+      if (!tbox::MathUtilities<double>::equalEps(bogus_max_norm, 1000.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #18: math::HierarchyNodeDataOpsReal::maxNorm()"
+         << " - w/o control weight\n"
+         << "Expected value = 1000.0, Computed value = "
+         << bogus_max_norm << std::endl;
+      }
+
+      // Test #19: math::HierarchyNodeDataOpsReal::maxNorm() - w/control weight
+      // Expected:  max_norm = 4.0
+      double max_norm = node_ops->maxNorm(nvindx[2], nwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(max_norm, 4.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #19: math::HierarchyNodeDataOpsReal::maxNorm()"
+         << " - w/control weight\n"
+         << "Expected value = 4.0, Computed value = "
+         << max_norm << std::endl;
+      }
+
+      // Reset data and test sums, axpy's
+      node_ops->setToScalar(nvindx[0], 1.0);
+      node_ops->setToScalar(nvindx[1], 2.5);
+      node_ops->setToScalar(nvindx[2], 7.0);
+
+      // Test #20: math::HierarchyNodeDataOpsReal::linearSum()
+      // Expected:  v3 = 5.0
+      double val_linearSum = 5.0;
+      node_ops->linearSum(nvindx[3], 2.0, nvindx[1], 0.00, nvindx[0]);
+      if (!doubleDataSameAsValue(nvindx[3], val_linearSum, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #20: math::HierarchyNodeDataOpsReal::linearSum()\n"
+         << "Expected: v3 = " << val_linearSum << std::endl;
+         node_ops->printData(nvindx[3], tbox::plog);
+      }
+
+      // Test #21: math::HierarchyNodeDataOpsReal::axmy()
+      // Expected:  v3 = 6.5
+      node_ops->axmy(nvindx[3], 3.0, nvindx[1], nvindx[0]);
+      double val_axmy = 6.5;
+      if (!doubleDataSameAsValue(nvindx[3], val_axmy, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #21: math::HierarchyNodeDataOpsReal::axmy()\n"
+         << "Expected: v3 = " << val_axmy << std::endl;
+         node_ops->printData(nvindx[3], tbox::plog);
+      }
+
+      // Test #22a: math::HierarchyNodeDataOpsReal::dot() - (ind2) * (ind1)
+      // Expected:  cdot = 8.75
+      double cdot = node_ops->dot(nvindx[2], nvindx[1], nwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(cdot, 8.75)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #22a: math::HierarchyNodeDataOpsReal::dot() - (ind2) * (ind1)\n"
+         << "Expected Value = 8.75, Computed Value = "
+         << cdot << std::endl;
+      }
+
+      // Test #22a: math::HierarchyNodeDataOpsReal::dot() - (ind1) * (ind2)
+      // Expected:  cdot = 8.75
+      cdot = node_ops->dot(nvindx[1], nvindx[2], nwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(cdot, 8.75)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #22a: math::HierarchyNodeDataOpsReal::dot() - (ind1) * (ind2)\n"
+         << "Expected Value = 8.75, Computed Value = "
+         << cdot << std::endl;
+      }
+
+      // deallocate data on hierarchy
+      for (ln = 0; ln < 2; ln++) {
+         hierarchy->getPatchLevel(ln)->deallocatePatchData(nwgt_id);
+         for (iv = 0; iv < NVARS; iv++) {
+            hierarchy->getPatchLevel(ln)->deallocatePatchData(nvindx[iv]);
+         }
+      }
+
+      for (iv = 0; iv < NVARS; iv++) {
+         nvar[iv].setNull();
+      }
+      nwgt.setNull();
+
+      geometry.setNull();
+      hierarchy.setNull();
+      node_ops.setNull();
+      nwgt_ops.setNull();
+
+      tbox::pout << "\nPASSED:  node hiertest" << std::endl;
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return 0;
+}
+
+/*
+ * Returns true if all the data in the hierarchy is equal to the specified
+ * value.  Returns false otherwise.
+ */
+static bool
+doubleDataSameAsValue(
+   int desc_id,
+   double value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   bool test_passed = true;
+
+   int ln;
+   tbox::Pointer<hier::Patch> patch;
+   for (ln = 0; ln < 2; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         patch = *ip;
+         tbox::Pointer<pdat::NodeData<double> > nvdata = patch->getPatchData(
+               desc_id);
+
+         for (pdat::NodeIterator c(nvdata->getBox()); c && test_passed; c++) {
+            pdat::NodeIndex node_index = c();
+            if (!tbox::MathUtilities<double>::equalEps((*nvdata)(node_index),
+                   value)) {
+               test_passed = false;
+            }
+         }
+      }
+   }
+
+   return test_passed;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dataops/side_cplxtest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dataops/side_cplxtest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,865 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program to test side-centered complex patch data ops 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fstream>
+#include <iomanip>
+using namespace std;
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/math/HierarchyDataOpsComplex.h"
+#include "SAMRAI/math/HierarchySideDataOpsComplex.h"
+#include "SAMRAI/math/HierarchyDataOpsReal.h"
+#include "SAMRAI/math/HierarchySideDataOpsReal.h"
+#include "SAMRAI/pdat/SideIndex.h"
+#include "SAMRAI/pdat/SideIterator.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/ProcessorMapping.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/hier/VariableContext.h"
+
+using namespace SAMRAI;
+
+/* Helper function declarations */
+static bool
+complexDataSameAsValue(
+   int desc_id,
+   dcomplex value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy);
+static bool
+doubleDataSameAsValue(
+   int desc_id,
+   double value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+#define NVARS 4
+
+int main(
+   int argc,
+   char* argv[]) {
+
+   int num_failures = 0;
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   if (argc < 2) {
+      TBOX_ERROR("Usage: " << argv[0] << " [dimension]");
+   }
+
+   const int d = atoi(argv[1]);
+   TBOX_ASSERT(d > 0);
+   TBOX_ASSERT(d <= SAMRAI_MAXIMUM_DIMENSION_VALUE);
+   const tbox::Dimension dim(d);
+
+   if (dim != 2) {
+      TBOX_ERROR("This test code is completed only for 2D!!!");
+   }
+
+   const std::string log_fn = std::string("side_cplxtest.")
+      + tbox::Utilities::intToString(dim, 1) + "d.log";
+   tbox::PIO::logAllNodes(log_fn);
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+      const tbox::Dimension dim2d(2);
+
+      int ln, iv;
+
+      // Make a dummy hierarchy domain
+      double lo[2] = { 0.0, 0.0 };
+      double hi[2] = { 1.0, 0.5 };
+
+      hier::Box coarse0(hier::Index(0, 0), hier::Index(9, 2));
+      hier::Box coarse1(hier::Index(0, 3), hier::Index(9, 4));
+      hier::Box fine0(hier::Index(4, 4), hier::Index(7, 7));
+      hier::Box fine1(hier::Index(8, 4), hier::Index(13, 7));
+      hier::IntVector ratio(dim2d, 2);
+
+      hier::BoxArray coarse_domain(dim2d, 2);
+      hier::BoxArray fine_boxes(dim2d, 2);
+      coarse_domain[0] = coarse0;
+      coarse_domain[1] = coarse1;
+      fine_boxes[0] = fine0;
+      fine_boxes[1] = fine1;
+
+      tbox::Pointer<geom::CartesianGridGeometry> geometry(
+         new geom::CartesianGridGeometry("CartesianGeometry",
+            lo,
+            hi,
+            coarse_domain));
+
+      tbox::Pointer<hier::PatchHierarchy> hierarchy(
+         new hier::PatchHierarchy("PatchHierarchy", geometry));
+
+      // Note: For these simple tests we allow at most 2 processors.
+      const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+      const int nproc = mpi.getSize();
+      TBOX_ASSERT(nproc < 3);
+
+      const int n_coarse_boxes = coarse_domain.getNumberOfBoxes();
+      const int n_fine_boxes = fine_boxes.getNumberOfBoxes();
+
+      hier::MappedBoxLevel layer0(hier::IntVector(dim, 1));
+      hier::MappedBoxLevel layer1(ratio);
+
+      for (int ib = 0; ib < n_coarse_boxes; ib++) {
+         if (nproc > 1) {
+            if (ib == layer0.getRank()) {
+               layer0.addMappedBox(hier::MappedBox(coarse_domain[ib], ib,
+                     layer0.getRank()));
+            }
+         } else {
+            layer0.addMappedBox(hier::MappedBox(coarse_domain[ib], ib, 0));
+         }
+      }
+
+      for (int ib = 0; ib < n_fine_boxes; ib++) {
+         if (nproc > 1) {
+            if (ib == layer1.getRank()) {
+               layer1.addMappedBox(hier::MappedBox(fine_boxes[ib], ib,
+                     layer1.getRank()));
+            }
+         } else {
+            layer1.addMappedBox(hier::MappedBox(fine_boxes[ib], ib, 0));
+         }
+      }
+
+      hierarchy->makeNewPatchLevel(0, layer0);
+      hierarchy->makeNewPatchLevel(1, layer1);
+
+      // Create instance of hier::Variable database
+      hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+      tbox::Pointer<hier::VariableContext> dummy = variable_db->getContext(
+            "dummy");
+      const hier::IntVector no_ghosts(dim2d, 0);
+
+      // Make some dummy variables and data on the hierarchy
+      tbox::Pointer<pdat::SideVariable<dcomplex> > fvar[NVARS];
+      int svindx[NVARS];
+      fvar[0] = new pdat::SideVariable<dcomplex>(dim, "fvar0", 1);
+      svindx[0] = variable_db->registerVariableAndContext(
+            fvar[0], dummy, no_ghosts);
+      fvar[1] = new pdat::SideVariable<dcomplex>(dim, "fvar1", 1);
+      svindx[1] = variable_db->registerVariableAndContext(
+            fvar[1], dummy, no_ghosts);
+      fvar[2] = new pdat::SideVariable<dcomplex>(dim, "fvar2", 1);
+      svindx[2] = variable_db->registerVariableAndContext(
+            fvar[2], dummy, no_ghosts);
+      fvar[3] = new pdat::SideVariable<dcomplex>(dim, "fvar3", 1);
+      svindx[3] = variable_db->registerVariableAndContext(
+            fvar[3], dummy, no_ghosts);
+
+      tbox::Pointer<pdat::SideVariable<double> >
+      swgt(new pdat::SideVariable<double>(dim, "swgt", 1));
+      int swgt_id = variable_db->registerVariableAndContext(
+            swgt, dummy, no_ghosts);
+
+      // allocate data on hierarchy
+      for (ln = 0; ln < 2; ln++) {
+         hierarchy->getPatchLevel(ln)->allocatePatchData(swgt_id);
+         for (iv = 0; iv < NVARS; iv++) {
+            hierarchy->getPatchLevel(ln)->allocatePatchData(svindx[iv]);
+         }
+      }
+
+      tbox::Pointer<math::HierarchyDataOpsComplex> side_ops(
+         new math::HierarchySideDataOpsComplex(hierarchy, 0, 1));
+      TBOX_ASSERT(!side_ops.isNull());
+
+      tbox::Pointer<math::HierarchyDataOpsReal<double> > swgt_ops(
+         new math::HierarchySideDataOpsReal<double>(hierarchy, 0, 1));
+
+      tbox::Pointer<hier::Patch> patch;
+      tbox::Pointer<geom::CartesianPatchGeometry> pgeom;
+
+      // Initialize control volume data for side-centered components
+      hier::Box coarse_fine = fine0 + fine1;
+      coarse_fine.coarsen(ratio);
+      for (ln = 0; ln < 2; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::Pointer<pdat::SideData<double> > data;
+            patch = level->getPatch(ip());
+            pgeom = patch->getPatchGeometry();
+            const double* dx = pgeom->getDx();
+            const double side_vol = dx[0] * dx[1];
+            data = patch->getPatchData(swgt_id);
+            data->fillAll(side_vol);
+            pdat::SideIndex fi(dim);
+            int plo0 = patch->getBox().lower(0);
+            int phi0 = patch->getBox().upper(0);
+            int plo1 = patch->getBox().lower(1);
+            int phi1 = patch->getBox().upper(1);
+            int ic;
+
+            if (ln == 0) {
+               data->fillAll(0.0, (coarse_fine * patch->getBox()));
+
+               if (patch->getLocalId() == 0) {
+                  //bottom side boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::SideIndex(hier::Index(ic,
+                              plo1), pdat::SideIndex::Y, pdat::SideIndex::Lower);
+                     (*data)(fi) *= 0.5;
+                  }
+                  //left and right side boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     fi = pdat::SideIndex(hier::Index(plo0,
+                              ic), pdat::SideIndex::X, pdat::SideIndex::Lower);
+                     (*data)(fi) *= 0.5;
+                     fi = pdat::SideIndex(hier::Index(phi0,
+                              ic), pdat::SideIndex::X, pdat::SideIndex::Upper);
+                     (*data)(fi) *= 0.5;
+                  }
+               } else {
+                  //top and bottom side boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::SideIndex(hier::Index(ic,
+                              plo1), pdat::SideIndex::Y, pdat::SideIndex::Lower);
+                     (*data)(fi) = 0.0;
+                     fi = pdat::SideIndex(hier::Index(ic,
+                              phi1), pdat::SideIndex::Y, pdat::SideIndex::Upper);
+                     (*data)(fi) *= 0.5;
+                  }
+                  //left and right side boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     fi = pdat::SideIndex(hier::Index(plo0,
+                              ic), pdat::SideIndex::X, pdat::SideIndex::Lower);
+                     (*data)(fi) *= 0.5;
+                     fi = pdat::SideIndex(hier::Index(phi0,
+                              ic), pdat::SideIndex::X, pdat::SideIndex::Upper);
+                     (*data)(fi) *= 0.5;
+                  }
+               }
+            } else {
+               if (patch->getLocalId() == 0) {
+                  // top and bottom coarse-fine side boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::SideIndex(hier::Index(ic,
+                              plo1), pdat::SideIndex::Y, pdat::SideIndex::Lower);
+                     (*data)(fi) *= 1.5;
+                     fi = pdat::SideIndex(hier::Index(ic,
+                              phi1), pdat::SideIndex::Y, pdat::SideIndex::Upper);
+                     (*data)(fi) *= 1.5;
+                  }
+                  //left coarse-fine side boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     fi = pdat::SideIndex(hier::Index(plo0,
+                              ic), pdat::SideIndex::X, pdat::SideIndex::Lower);
+                     (*data)(fi) *= 1.5;
+                  }
+               } else {
+                  // top and bottom coarse-fine side boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::SideIndex(hier::Index(ic,
+                              plo1), pdat::SideIndex::Y, pdat::SideIndex::Lower);
+                     (*data)(fi) *= 1.5;
+                     fi = pdat::SideIndex(hier::Index(ic,
+                              phi1), pdat::SideIndex::Y, pdat::SideIndex::Upper);
+                     (*data)(fi) *= 1.5;
+                  }
+                  //left and right coarse-fine side boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     fi = pdat::SideIndex(hier::Index(plo0,
+                              ic), pdat::SideIndex::X, pdat::SideIndex::Lower);
+                     (*data)(fi) = 0.0;
+                     fi = pdat::SideIndex(hier::Index(phi0,
+                              ic), pdat::SideIndex::X, pdat::SideIndex::Upper);
+                     (*data)(fi) *= 1.5;
+                  }
+               }
+            }
+         }
+      }
+
+      // Test #1: Print out control volume data and compute its integral
+
+      // Test #1a: Check control volume data set properly
+      // Expected: cwgt = 0.01 on coarse (except where finer patch exists) and
+      // 0.0025 on fine level
+/*   bool vol_test_passed = true;
+ *   for (ln = 0; ln < 2; ln++) {
+ *   for (hier::PatchLevel::Iterator ip(hierarchy->getPatchLevel(ln)); ip; ip++) {
+ *   patch = hierarchy->getPatchLevel(ln)->getPatch(ip());
+ *   tbox::Pointer< pdat::CellData<double> > svdata = patch->getPatchData(cwgt_id);
+ *
+ *   for (pdat::CellIterator c(svdata->getBox());c && vol_test_passed;c++) {
+ *   pdat::CellIndex cell_index = c();
+ *
+ *   if (ln == 0) {
+ *   if ((coarse_fine * patch->getBox()).contains(cell_index)) {
+ *   if ( !tbox::MathUtilities<double>::equalEps((*svdata)(cell_index),0.0) ) {
+ *   vol_test_passed = false;
+ *   }
+ *   } else {
+ *   if ( !tbox::MathUtilities<double>::equalEps((*svdata)(cell_index),0.01) ) {
+ *   vol_test_passed = false;
+ *   }
+ *   }
+ *   }
+ *
+ *   if (ln == 1) {
+ *   if ( !tbox::MathUtilities<double>::equalEps((*svdata)(cell_index),0.0025) ) {
+ *   vol_test_passed = false;
+ *   }
+ *   }
+ *   }
+ *   }
+ *   }
+ *   if (!vol_test_passed) {
+ *   num_failures++;
+ *   tbox::perr << "FAILED: - Test #1a: Check control volume data set properly" << std::endl;
+ *   cwgt_ops->printData(cwgt_id, tbox::plog);
+ *   }
+ */
+/*   tbox::plog << "side control volume data" << std::endl;
+ *   swgt_ops->printData(swgt_id, tbox::plog);
+ */
+
+      // Test #1b: math::HierarchySideDataOpsComplex::sumControlVolumes()
+      // Expected: norm = 1.0
+      double norm =
+         side_ops->sumControlVolumes(svindx[0], swgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(norm, 1.0)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #1b: math::HierarchySideDataOpsComplex::sumControlVolumes()\n"
+         << "Expected value = 1.0 , Computed value = "
+         << norm << std::endl;
+      }
+
+      // Test #2: math::HierarchySideDataOpsComplex::numberOfEntries()
+      // Expected: num_data_points = 209
+      int num_data_points = side_ops->numberOfEntries(svindx[0]);
+      if (num_data_points != 209) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #2: math::HierarchySideDataOpsComplex::numberOfEntries()\n"
+         << "Expected value = 209 , Computed value = "
+         << num_data_points << std::endl;
+      }
+
+      // Test #3a: math::HierarchySideDataOpsComplex::setToScalar()
+      // Expected: v0 = (2.0,1.5)
+      dcomplex val0 = dcomplex(2.0, 1.5);
+      side_ops->setToScalar(svindx[0], val0);
+      if (!complexDataSameAsValue(svindx[0], val0, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #3a: math::HierarchySideDataOpsComplex::setToScalar()\n"
+         << "Expected: v0 = " << val0 << std::endl;
+         side_ops->printData(svindx[0], tbox::plog);
+      }
+
+      // Test #3b: math::HierarchySideDataOpsComplex::setToScalar()
+      // Expected: v1 = (4.0, 3.0)
+      dcomplex val1(4.0, 3.0);
+      side_ops->setToScalar(svindx[1], dcomplex(4.0, 3.0));
+      if (!complexDataSameAsValue(svindx[1], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #3b: math::HierarchySideDataOpsComplex::setToScalar()\n"
+         << "Expected: v1 = " << val1 << std::endl;
+         side_ops->printData(svindx[1], tbox::plog);
+      }
+
+      // Test #4: math::HierarchySideDataOpsComplex::copyData()
+      // Expected: v2 = v1 = (4.0, 3.0)
+      side_ops->copyData(svindx[2], svindx[1]);
+      if (!complexDataSameAsValue(svindx[2], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #4: math::HierarchySideDataOpsComplex::copyData()\n"
+         << "Expected: v2 = " << val1 << std::endl;
+         side_ops->printData(svindx[2], tbox::plog);
+      }
+
+      // Test #5: math::HierarchySideDataOpsComplex::swapData()
+      // Expected:  v0 = (4.0, 3.0), v1 = (2.0,1.5)
+      side_ops->swapData(svindx[0], svindx[1]);
+      if (!complexDataSameAsValue(svindx[0], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #5a: math::HierarchySideDataOpsComplex::swapData()\n"
+         << "Expected: v0 = " << val1 << std::endl;
+         side_ops->printData(svindx[0], tbox::plog);
+      }
+      if (!complexDataSameAsValue(svindx[1], val0, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #5b: math::HierarchySideDataOpsComplex::swapData()\n"
+         << "Expected: v1 = " << val0 << std::endl;
+         side_ops->printData(svindx[1], tbox::plog);
+      }
+
+      // Test #6: math::HierarchySideDataOpsComplex::scale()
+      // Expected:  v2 = 0.25 * v2 = (1.0,0.75)
+      side_ops->scale(svindx[2], 0.25, svindx[2]);
+      dcomplex val_scale(1.0, 0.75);
+      if (!complexDataSameAsValue(svindx[2], val_scale, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #6: math::HierarchySideDataOpsComplex::scale()\n"
+         << "Expected: v2 = " << val_scale << std::endl;
+         side_ops->printData(svindx[2], tbox::plog);
+      }
+
+      // Test #7: math::HierarchySideDataOpsComplex::add()
+      // Expected:  v3 = v0 + v1 = (6.0, 4.5)
+      side_ops->add(svindx[3], svindx[0], svindx[1]);
+      dcomplex val_add(6.0, 4.5);
+      if (!complexDataSameAsValue(svindx[3], val_add, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #7: math::HierarchySideDataOpsComplex::add()\n"
+         << "Expected: v3 = " << val_add << std::endl;
+         side_ops->printData(svindx[3], tbox::plog);
+      }
+
+      // Reset v0: v0 = (0.0,4.5)
+      side_ops->setToScalar(svindx[0], dcomplex(0.0, 4.5));
+
+      // Test #8: math::HierarchySideDataOpsComplex::subtract()
+      // Expected:  v1 = v3 - v0 = (6.0,0.0)
+      side_ops->subtract(svindx[1], svindx[3], svindx[0]);
+      dcomplex val_sub(6.0, 0.0);
+      if (!complexDataSameAsValue(svindx[1], val_sub, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #8: math::HierarchySideDataOpsComplex::subtract()\n"
+         << "Expected: v1 = " << val_sub << std::endl;
+         side_ops->printData(svindx[1], tbox::plog);
+      }
+
+      // Test #9a: math::HierarchySideDataOpsComplex::addScalar()
+      // Expected:  v1 = v1 + (0.0,-4.0) = (6.0,-4.0)
+      side_ops->addScalar(svindx[1], svindx[1], dcomplex(0.0, -4.0));
+      dcomplex val_addScalar(6.0, -4.0);
+      if (!complexDataSameAsValue(svindx[1], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #9a: math::HierarchySideDataOpsComplex::addScalar()\n"
+         << "Expected: v1 = " << val_addScalar << std::endl;
+         side_ops->printData(svindx[1], tbox::plog);
+      }
+
+      // Test #9b: math::HierarchySideDataOpsComplex::addScalar()
+      // Expected:  v2 = v2 + (0.0,0.25) = (1.0,1.0)
+      side_ops->addScalar(svindx[2], svindx[2], dcomplex(0.0, 0.25));
+      val_addScalar = dcomplex(1.0, 1.0);
+      if (!complexDataSameAsValue(svindx[2], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #9b: math::HierarchySideDataOpsComplex::addScalar()\n"
+         << "Expected: v2 = " << val_addScalar << std::endl;
+         side_ops->printData(svindx[2], tbox::plog);
+      }
+
+      // Test #9c: math::HierarchySideDataOpsComplex::addScalar()
+      // Expected:  v2 = v2 + (3.0,-4.0) = (4.0,-3.0)
+      side_ops->addScalar(svindx[2], svindx[2], dcomplex(3.0, -4.0));
+      val_addScalar = dcomplex(4.0, -3.0);
+      if (!complexDataSameAsValue(svindx[2], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #9c: math::HierarchySideDataOpsComplex::addScalar()\n"
+         << "Expected: v2 = " << val_addScalar << std::endl;
+         side_ops->printData(svindx[2], tbox::plog);
+      }
+
+      // Rest v3:  v3 = (0.5, 0.0)
+      side_ops->setToScalar(svindx[3], dcomplex(0.5, 0.0));
+
+      // Test #10: math::HierarchySideDataOpsComplex::multiply()
+      // Expected:  v1 = v3 * v1 = (3.0,-2.0)
+      side_ops->multiply(svindx[1], svindx[3], svindx[1]);
+      dcomplex val_mult(3.0, -2.0);
+      if (!complexDataSameAsValue(svindx[1], val_mult, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #10: math::HierarchySideDataOpsComplex::multiply()\n"
+         << "Expected: v1 = " << val_mult << std::endl;
+         side_ops->printData(svindx[1], tbox::plog);
+      }
+
+      // Test #11: math::HierarchySideDataOpsComplex::divide()
+      // Expected:  v0 = v2 / v1 = (1.3846153846154,-0.076923076923077)
+      side_ops->divide(svindx[0], svindx[2], svindx[1]);
+      dcomplex val_div(1.3846153846154, -0.076923076923077);
+      if (!complexDataSameAsValue(svindx[0], val_div, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #11: math::HierarchySideDataOpsComplex::divide()\n"
+         << "Expected: v0 = " << val_div << std::endl;
+         side_ops->printData(svindx[0], tbox::plog);
+      }
+
+      // Test #12: math::HierarchySideDataOpsComplex::reciprocal()
+      // Expected:  v1 = 1 / v1 = (0.23076923076923, 0.15384615384615)
+      side_ops->reciprocal(svindx[1], svindx[1]);
+      dcomplex val_rec(0.23076923076923, 0.15384615384615);
+      if (!complexDataSameAsValue(svindx[1], val_rec, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #12: math::HierarchySideDataOpsComplex::reciprocal()\n"
+         << "Expected: v1 = " << val_rec << std::endl;
+         side_ops->printData(svindx[1], tbox::plog);
+      }
+
+      // Test #13:  Place some bogus values on coarse level
+      tbox::Pointer<pdat::SideData<dcomplex> > sdata;
+
+      // set values
+      tbox::Pointer<hier::PatchLevel> level_zero =
+         hierarchy->getPatchLevel(0);
+      for (hier::PatchLevel::Iterator ip(level_zero); ip; ip++) {
+         patch = level_zero->getPatch(ip());
+         sdata = patch->getPatchData(svindx[2]);
+         hier::Index index0(2, 2);
+         hier::Index index1(5, 3);
+         if (patch->getBox().contains(index0)) {
+            (*sdata)(pdat::SideIndex(index0, pdat::SideIndex::Y,
+                        pdat::SideIndex::Lower), 0) = dcomplex(100.0, -50.0);
+         }
+         if (patch->getBox().contains(index1)) {
+            (*sdata)(pdat::SideIndex(index1, pdat::SideIndex::Y,
+                        pdat::SideIndex::Upper), 0) = dcomplex(-1000.0, 20.0);
+         }
+      }
+
+      // check values
+      bool bogus_value_test_passed = true;
+      for (hier::PatchLevel::Iterator ipp(level_zero); ipp; ipp++) {
+         patch = level_zero->getPatch(ipp());
+         sdata = patch->getPatchData(svindx[2]);
+         pdat::SideIndex index0(hier::Index(2,
+                                   2), pdat::SideIndex::Y,
+                                pdat::SideIndex::Lower);
+         pdat::SideIndex index1(hier::Index(5,
+                                   3), pdat::SideIndex::Y,
+                                pdat::SideIndex::Upper);
+
+         // check X axis data
+         for (pdat::SideIterator c(sdata->getBox(), pdat::SideIndex::X);
+              c && bogus_value_test_passed;
+              c++) {
+            pdat::SideIndex side_index = c();
+
+            if (!tbox::MathUtilities<dcomplex>::equalEps((*sdata)(side_index),
+                   dcomplex(4.0, -3.0))) {
+               bogus_value_test_passed = false;
+            }
+         }
+
+         // check Y axis data
+         for (pdat::SideIterator cc(sdata->getBox(), pdat::SideIndex::Y);
+              cc && bogus_value_test_passed;
+              cc++) {
+            pdat::SideIndex side_index = cc();
+
+            if (side_index == index0) {
+               if (!tbox::MathUtilities<dcomplex>::equalEps((*sdata)(side_index),
+                      dcomplex(100.0, -50.0))) {
+                  bogus_value_test_passed = false;
+               }
+            } else {
+               if (side_index == index1) {
+                  if (!tbox::MathUtilities<dcomplex>::equalEps((*sdata)(
+                            side_index),
+                         dcomplex(-1000.0, 20.0))) {
+                     bogus_value_test_passed = false;
+                  }
+               } else {
+                  if (!tbox::MathUtilities<dcomplex>::equalEps((*sdata)(
+                            side_index),
+                         dcomplex(4.0, -3.0))) {
+                     bogus_value_test_passed = false;
+                  }
+               }
+            }
+         }
+      }
+      if (!bogus_value_test_passed) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #13:  Place some bogus values on coarse level"
+         << std::endl;
+         side_ops->printData(svindx[2], tbox::plog);
+      }
+
+      // Test norms on patch data with svindx[2] on hierarchy with bogus values
+
+      // Test #14: math::HierarchySideDataOpsComplex::L1Norm() - w/o control weight
+      // Expected:  bogus_l1_norm = 2217.003379
+      double bogus_l1_norm = side_ops->L1Norm(svindx[2]);
+      if (!tbox::MathUtilities<double>::equalEps(bogus_l1_norm, 2217.003379)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #14: math::HierarchySideDataOpsComplex::L1Norm()"
+         << " - w/o control weight\n"
+         << "Expected value = 2217.003379, Computed value = "
+         << std::setprecision(12) << bogus_l1_norm << std::endl;
+      }
+
+      // Test #15: math::HierarchySideDataOpsComplex::L1Norm() - w/control weight
+      // Expected:  correct_l1_norm = 5.0
+      double correct_l1_norm = side_ops->L1Norm(svindx[2], swgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(correct_l1_norm, 5.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #15: math::HierarchySideDataOpsComplex::L1Norm()"
+         << " - w/control weight\n"
+         << "Expected value = 5.0, Computed value = "
+         << correct_l1_norm << std::endl;
+      }
+
+      // Test #16: math::HierarchySideDataOpsComplex::L2Norm()
+      // Expected:  l2_norm = 5.0
+      double l2_norm = side_ops->L2Norm(svindx[2], swgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(l2_norm, 5.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #16: math::HierarchySideDataOpsComplex::L2Norm()\n"
+         << "Expected value = 5.0, Computed value = "
+         << l2_norm << std::endl;
+      }
+
+      // Test #17: math::HierarchySideDataOpsComplex::maxNorm() - w/o control weight
+      // Expected:  bogus_max_norm = 1000.19998
+      double bogus_max_norm = side_ops->maxNorm(svindx[2]);
+      if (!tbox::MathUtilities<double>::equalEps(bogus_max_norm, 1000.19998)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #17: math::HierarchySideDataOpsComplex::maxNorm()"
+         << " - w/o control weight\n"
+         << "Expected value = 1000.19998, Computed value = "
+         << bogus_max_norm << std::endl;
+      }
+
+      // Test #18: math::HierarchySideDataOpsComplex::maxNorm() - w/control weight
+      // Expected:  max_norm = 5.0
+      double max_norm = side_ops->maxNorm(svindx[2], swgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(max_norm, 5.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #18: math::HierarchySideDataOpsComplex::maxNorm()"
+         << " - w/control weight\n"
+         << "Expected value = 5.0, Computed value = "
+         << max_norm << std::endl;
+      }
+
+      // Reset data and test sums, axpy's
+      side_ops->setToScalar(svindx[0], dcomplex(1.0, -3.0));
+      side_ops->setToScalar(svindx[1], dcomplex(2.5, 3.0));
+      side_ops->setToScalar(svindx[2], dcomplex(7.0, 0.0));
+
+      // Test #19: math::HierarchySideDataOpsComplex::linearSum()
+      // Expected:  v3 = (2.0,5.0)
+      side_ops->linearSum(svindx[3],
+         dcomplex(2.0, 0.0), svindx[1], dcomplex(0.0, -1.0), svindx[0]);
+      dcomplex val_linearSum(2.0, 5.0);
+      if (!complexDataSameAsValue(svindx[3], val_linearSum, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #19: math::HierarchySideDataOpsComplex::linearSum()\n"
+         << "Expected: v3 = " << val_linearSum << std::endl;
+         side_ops->printData(svindx[3], tbox::plog);
+      }
+
+      // Test #20: math::HierarchySideDataOpsComplex::axmy()
+      // Expected:  v3 = (6.5,12.0)
+      side_ops->axmy(svindx[3], 3.0, svindx[1], svindx[0]);
+      dcomplex val_axmy(6.5, 12.0);
+      if (!complexDataSameAsValue(svindx[3], val_axmy, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #20: math::HierarchySideDataOpsComplex::axmy()\n"
+         << "Expected: v3 = " << val_axmy << std::endl;
+         side_ops->printData(svindx[3], tbox::plog);
+      }
+
+      // Test #21a: math::HierarchySideDataOpsComplex::dot() - (ind2) * (ind1)
+      // Expected:  cdot = (17.5,-21.0)
+      dcomplex cdot = side_ops->dot(svindx[2], svindx[1], swgt_id);
+      dcomplex ans_2_dot_1(17.5, -21.0);
+      if (!tbox::MathUtilities<dcomplex>::equalEps(cdot, ans_2_dot_1)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #21a: math::HierarchySideDataOpsComplex::dot() - (ind2) * (ind1)\n"
+         << "Expected value = (17.5,-21.0), Computed value = "
+         << cdot << std::endl;
+      }
+
+      // Test #21b: math::HierarchySideDataOpsComplex::dot() - (ind1) * (ind2)
+      // Expected:  cdot = (17.5,-1.0)
+      dcomplex cdot2 = side_ops->dot(svindx[1], svindx[2], swgt_id);
+      dcomplex ans_1_dot_2(17.5, 21.0);
+      if (!tbox::MathUtilities<dcomplex>::equalEps(cdot2, ans_1_dot_2)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #21b: math::HierarchySideDataOpsComplex::dot() - (ind1) * (ind2)\n"
+         << "Expected value = (17.5,21.0), Computed value = "
+         << cdot2 << std::endl;
+      }
+
+      // Test #22: math::HierarchySideDataOpsComplex::abs()
+      // Expected:  abs(v0) = 5.0
+      side_ops->setToScalar(svindx[0], dcomplex(4.0, -3.0));
+      side_ops->abs(swgt_id, svindx[0]);
+      if (!doubleDataSameAsValue(swgt_id, 5.0, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #22: math::HierarchySideDataOpsComplex::abs()\n"
+         << "Expected: abs(v0) = 5.0" << std::endl;
+         swgt_ops->printData(swgt_id, tbox::plog);
+      }
+
+      // deallocate data on hierarchy
+      for (ln = 0; ln < 2; ln++) {
+         hierarchy->getPatchLevel(ln)->deallocatePatchData(swgt_id);
+         for (iv = 0; iv < NVARS; iv++) {
+            hierarchy->getPatchLevel(ln)->deallocatePatchData(svindx[iv]);
+         }
+      }
+
+      for (iv = 0; iv < NVARS; iv++) {
+         fvar[iv].setNull();
+      }
+      swgt.setNull();
+
+      geometry.setNull();
+      hierarchy.setNull();
+      side_ops.setNull();
+      swgt_ops.setNull();
+
+      if (num_failures == 0) {
+         tbox::pout << "\nPASSED:  side cplxtest" << std::endl;
+      }
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return num_failures;
+}
+
+/*
+ * Returns true if all the data in the hierarchy is equal to the specified
+ * value.  Returns false otherwise.
+ */
+static bool
+complexDataSameAsValue(
+   int desc_id,
+   dcomplex value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   bool test_passed = true;
+
+   int ln;
+   tbox::Pointer<hier::Patch> patch;
+   for (ln = 0; ln < 2; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         patch = level->getPatch(ip());
+         tbox::Pointer<pdat::SideData<dcomplex> > svdata = patch->getPatchData(
+               desc_id);
+
+         for (pdat::SideIterator c(svdata->getBox(), 1); c && test_passed;
+              c++) {
+            pdat::SideIndex side_index = c();
+            if (!tbox::MathUtilities<dcomplex>::equalEps((*svdata)(side_index),
+                   value)) {
+               test_passed = false;
+            }
+         }
+      }
+   }
+
+   return test_passed;
+}
+
+/*
+ * Returns true if all the data in the hierarchy is equal to the specified
+ * value.  Returns false otherwise.
+ */
+static bool
+doubleDataSameAsValue(
+   int desc_id,
+   double value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   bool test_passed = true;
+
+   int ln;
+   tbox::Pointer<hier::Patch> patch;
+   for (ln = 0; ln < 2; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         patch = level->getPatch(ip());
+         tbox::Pointer<pdat::SideData<double> > svdata = patch->getPatchData(
+               desc_id);
+
+         for (pdat::SideIterator c(svdata->getBox(), 1); c && test_passed;
+              c++) {
+            pdat::SideIndex side_index = c();
+            if (!tbox::MathUtilities<double>::equalEps((*svdata)(side_index),
+                   value)) {
+               test_passed = false;
+            }
+         }
+      }
+   }
+
+   return test_passed;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dataops/side_hiertest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dataops/side_hiertest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,815 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program to test side-centered patch data ops 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <fstream>
+#include <iomanip>
+using namespace std;
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/math/HierarchyDataOpsComplex.h"
+#include "SAMRAI/math/HierarchySideDataOpsComplex.h"
+#include "SAMRAI/math/HierarchyDataOpsReal.h"
+#include "SAMRAI/math/HierarchySideDataOpsReal.h"
+#include "SAMRAI/pdat/SideIndex.h"
+#include "SAMRAI/pdat/SideIterator.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchDescriptor.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/ProcessorMapping.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/hier/VariableContext.h"
+
+using namespace SAMRAI;
+
+/* Helper function declarations */
+static bool
+doubleDataSameAsValue(
+   int desc_id,
+   double value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+#define NVARS 4
+
+int main(
+   int argc,
+   char* argv[]) {
+
+   int num_failures = 0;
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   if (argc < 2) {
+      TBOX_ERROR("Usage: " << argv[0] << " [dimension]");
+   }
+
+   const unsigned short d = static_cast<unsigned short>(atoi(argv[1]));
+   TBOX_ASSERT(d > 0);
+   TBOX_ASSERT(d <= tbox::Dimension::MAXIMUM_DIMENSION_VALUE);
+   const tbox::Dimension dim(d);
+
+   if (dim != tbox::Dimension(2)) {
+      TBOX_ERROR("This test code is completed only for 2D!!!");
+   }
+
+   const std::string log_fn = std::string("side_hiertest.")
+      + tbox::Utilities::intToString(dim.getValue(), 1) + "d.log";
+   tbox::PIO::logAllNodes(log_fn);
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+
+      const tbox::Dimension dim2d(2);
+
+      int ln, iv;
+
+      // Make a dummy hierarchy domain
+      double lo[2] = { 0.0, 0.0 };
+      double hi[2] = { 1.0, 0.5 };
+
+      hier::Box coarse0(hier::Index(0, 0), hier::Index(9, 2));
+      hier::Box coarse1(hier::Index(0, 3), hier::Index(9, 4));
+      hier::Box fine0(hier::Index(4, 4), hier::Index(7, 7));
+      hier::Box fine1(hier::Index(8, 4), hier::Index(13, 7));
+      hier::IntVector ratio(dim2d, 2);
+
+      hier::BoxArray coarse_domain(dim2d, 2);
+      hier::BoxArray fine_boxes(dim2d, 2);
+      coarse_domain[0] = coarse0;
+      coarse_domain[1] = coarse1;
+      fine_boxes[0] = fine0;
+      fine_boxes[1] = fine1;
+
+      tbox::Pointer<geom::CartesianGridGeometry> geometry(
+         new geom::CartesianGridGeometry("CartesianGeometry",
+            lo,
+            hi,
+            coarse_domain));
+
+      tbox::Pointer<hier::PatchHierarchy> hierarchy(
+         new hier::PatchHierarchy("PatchHierarchy", geometry));
+
+      hierarchy->setMaxNumberOfLevels(2);
+      hierarchy->setRatioToCoarserLevel(ratio, 1);
+
+      // Note: For these simple tests we allow at most 2 processors.
+      const int nproc = mpi.getSize();
+      TBOX_ASSERT(nproc < 3);
+
+      const int n_coarse_boxes = coarse_domain.getNumberOfBoxes();
+      const int n_fine_boxes = fine_boxes.getNumberOfBoxes();
+
+      hier::MappedBoxLevel layer0(hier::IntVector(dim, 1));
+      hier::MappedBoxLevel layer1(ratio);
+
+      for (int ib = 0; ib < n_coarse_boxes; ib++) {
+         if (nproc > 1) {
+            if (ib == layer0.getRank()) {
+               layer0.addMappedBox(hier::MappedBox(coarse_domain[ib], hier::LocalId(ib),
+                     layer0.getRank()));
+            }
+         } else {
+            layer0.addMappedBox(hier::MappedBox(coarse_domain[ib], hier::LocalId(ib), 0));
+         }
+      }
+
+      for (int ib = 0; ib < n_fine_boxes; ib++) {
+         if (nproc > 1) {
+            if (ib == layer1.getRank()) {
+               layer1.addMappedBox(hier::MappedBox(fine_boxes[ib], hier::LocalId(ib),
+                     layer1.getRank()));
+            }
+         } else {
+            layer1.addMappedBox(hier::MappedBox(fine_boxes[ib], hier::LocalId(ib), 0));
+         }
+      }
+
+      hierarchy->makeNewPatchLevel(0, layer0);
+      hierarchy->makeNewPatchLevel(1, layer1);
+
+      // Create instance of hier::Variable database
+      hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+      tbox::Pointer<hier::VariableContext> dummy = variable_db->getContext(
+            "dummy");
+      const hier::IntVector no_ghosts(dim2d, 0);
+
+      // Make some dummy variables and data on the hierarchy
+      tbox::Pointer<pdat::SideVariable<double> > fvar[NVARS];
+      int svindx[NVARS];
+      fvar[0] = new pdat::SideVariable<double>(dim2d, "fvar0", 1);
+      svindx[0] = variable_db->registerVariableAndContext(
+            fvar[0], dummy, no_ghosts);
+      fvar[1] = new pdat::SideVariable<double>(dim2d, "fvar1", 1);
+      svindx[1] = variable_db->registerVariableAndContext(
+            fvar[1], dummy, no_ghosts);
+      fvar[2] = new pdat::SideVariable<double>(dim2d, "fvar2", 1);
+      svindx[2] = variable_db->registerVariableAndContext(
+            fvar[2], dummy, no_ghosts);
+      fvar[3] = new pdat::SideVariable<double>(dim2d, "fvar3", 1);
+      svindx[3] = variable_db->registerVariableAndContext(
+            fvar[3], dummy, no_ghosts);
+
+      tbox::Pointer<pdat::SideVariable<double> >
+      swgt(new pdat::SideVariable<double>(dim2d, "swgt", 1));
+      int swgt_id = variable_db->registerVariableAndContext(
+            swgt, dummy, no_ghosts);
+
+      // allocate data on hierarchy
+      for (ln = 0; ln < 2; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+         level->allocatePatchData(swgt_id);
+         for (iv = 0; iv < NVARS; iv++) {
+            level->allocatePatchData(svindx[iv]);
+         }
+      }
+
+      tbox::Pointer<math::HierarchyDataOpsReal<double> > side_ops(
+         new math::HierarchySideDataOpsReal<double>(hierarchy, 0, 1));
+      TBOX_ASSERT(!side_ops.isNull());
+
+      tbox::Pointer<math::HierarchyDataOpsReal<double> > swgt_ops(
+         new math::HierarchySideDataOpsReal<double>(hierarchy, 0, 1));
+
+      tbox::Pointer<hier::Patch> patch;
+      tbox::Pointer<geom::CartesianPatchGeometry> pgeom;
+
+      // Initialize control volume data for side-centered components
+      hier::Box coarse_fine = fine0 + fine1;
+      coarse_fine.coarsen(ratio);
+      for (ln = 0; ln < 2; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::Pointer<pdat::SideData<double> > data;
+            patch = *ip;
+            pgeom = patch->getPatchGeometry();
+            const double* dx = pgeom->getDx();
+            const double side_vol = dx[0] * dx[1];
+            data = patch->getPatchData(swgt_id);
+            data->fillAll(side_vol);
+            pdat::SideIndex fi(dim);
+            int plo0 = patch->getBox().lower(0);
+            int phi0 = patch->getBox().upper(0);
+            int plo1 = patch->getBox().lower(1);
+            int phi1 = patch->getBox().upper(1);
+            int ic;
+
+            if (ln == 0) {
+               data->fillAll(0.0, (coarse_fine * patch->getBox()));
+
+               if (patch->getLocalId() == 0) {
+                  //bottom side boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::SideIndex(hier::Index(ic,
+                              plo1), pdat::SideIndex::Y, pdat::SideIndex::Lower);
+                     (*data)(fi) *= 0.5;
+                  }
+                  //left and right side boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     fi = pdat::SideIndex(hier::Index(plo0,
+                              ic), pdat::SideIndex::X, pdat::SideIndex::Lower);
+                     (*data)(fi) *= 0.5;
+                     fi = pdat::SideIndex(hier::Index(phi0,
+                              ic), pdat::SideIndex::X, pdat::SideIndex::Upper);
+                     (*data)(fi) *= 0.5;
+                  }
+               } else {
+                  //top and bottom side boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::SideIndex(hier::Index(ic,
+                              plo1), pdat::SideIndex::Y, pdat::SideIndex::Lower);
+                     (*data)(fi) = 0.0;
+                     fi = pdat::SideIndex(hier::Index(ic,
+                              phi1), pdat::SideIndex::Y, pdat::SideIndex::Upper);
+                     (*data)(fi) *= 0.5;
+                  }
+                  //left and right side boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     fi = pdat::SideIndex(hier::Index(plo0,
+                              ic), pdat::SideIndex::X, pdat::SideIndex::Lower);
+                     (*data)(fi) *= 0.5;
+                     fi = pdat::SideIndex(hier::Index(phi0,
+                              ic), pdat::SideIndex::X, pdat::SideIndex::Upper);
+                     (*data)(fi) *= 0.5;
+                  }
+               }
+            } else {
+               if (patch->getLocalId() == 0) {
+                  // top and bottom coarse-fine side boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::SideIndex(hier::Index(ic,
+                              plo1), pdat::SideIndex::Y, pdat::SideIndex::Lower);
+                     (*data)(fi) *= 1.5;
+                     fi = pdat::SideIndex(hier::Index(ic,
+                              phi1), pdat::SideIndex::Y, pdat::SideIndex::Upper);
+                     (*data)(fi) *= 1.5;
+                  }
+                  //left coarse-fine side boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     fi = pdat::SideIndex(hier::Index(plo0,
+                              ic), pdat::SideIndex::X, pdat::SideIndex::Lower);
+                     (*data)(fi) *= 1.5;
+                  }
+               } else {
+                  // top and bottom coarse-fine side boundaries
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::SideIndex(hier::Index(ic,
+                              plo1), pdat::SideIndex::Y, pdat::SideIndex::Lower);
+                     (*data)(fi) *= 1.5;
+                     fi = pdat::SideIndex(hier::Index(ic,
+                              phi1), pdat::SideIndex::Y, pdat::SideIndex::Upper);
+                     (*data)(fi) *= 1.5;
+                  }
+                  //left and right coarse-fine side boundaries
+                  for (ic = plo1; ic <= phi1; ic++) {
+                     fi = pdat::SideIndex(hier::Index(plo0,
+                              ic), pdat::SideIndex::X, pdat::SideIndex::Lower);
+                     (*data)(fi) = 0.0;
+                     fi = pdat::SideIndex(hier::Index(phi0,
+                              ic), pdat::SideIndex::X, pdat::SideIndex::Upper);
+                     (*data)(fi) *= 1.5;
+                  }
+               }
+            }
+         }
+      }
+
+      // Test #1: Print out control volume data and compute its integral
+
+      // Test #1a: Check control volume data set properly
+      // Expected: cwgt = 0.01 on coarse (except where finer patch exists) and
+      // 0.0025 on fine level
+/*   bool vol_test_passed = true;
+ *   for (ln = 0; ln < 2; ln++) {
+ *   for (hier::PatchLevel::Iterator ip(hierarchy->getPatchLevel(ln)); ip; ip++) {
+ *   patch = hierarchy->getPatchLevel(ln)->getPatch(ip());
+ *   tbox::Pointer< pdat::SideData<double> > cvdata = patch->getPatchData(cwgt_id);
+ *
+ *   for (pdat::SideIterator c(cvdata->getBox(),1);c && vol_test_passed;c++) {
+ *   pdat::SideIndex side_index = c();
+ *
+ *   if (ln == 0) {
+ *   if ((coarse_fine * patch->getBox()).contains(side_index)) {
+ *   if ( !tbox::MathUtilities<double>::equalEps((*cvdata)(side_index),0.0) ) {
+ *   vol_test_passed = false;
+ *   }
+ *   } else {
+ *   if ( !tbox::MathUtilities<double>::equalEps((*cvdata)(side_index),0.01) ) {
+ *   vol_test_passed = false;
+ *   }
+ *   }
+ *   }
+ *
+ *   if (ln == 1) {
+ *   if ( !tbox::MathUtilities<double>::equalEps((*cvdata)(side_index),0.0025) ) {
+ *   vol_test_passed = false;
+ *   }
+ *   }
+ *   }
+ *   }
+ *   }
+ *   if (!vol_test_passed) {
+ *   num_failures++;
+ *   tbox::perr << "FAILED: - Test #1a: Check control volume data set properly" << std::endl;
+ *   cwgt_ops->printData(cwgt_id, tbox::plog);
+ *   }
+ */
+      // Print out control volume data and compute its integral
+/*   tbox::plog << "side control volume data" << std::endl;
+ *   swgt_ops->printData(swgt_id, tbox::plog);
+ */
+
+      // Test #1b: math::HierarchySideDataOpsReal::sumControlVolumes()
+      // Expected: norm = 1.0
+      double norm =
+         side_ops->sumControlVolumes(svindx[0], swgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(norm, 1.0)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #1b: math::HierarchySideDataOpsReal::sumControlVolumes()\n"
+         << "Expected value = 1.0 , Computed value = "
+         << norm << std::endl;
+      }
+
+      // Test #2: math::HierarchySideDataOpsReal::numberOfEntries()
+      // Expected: num_data_points = 209
+      int num_data_points = side_ops->numberOfEntries(svindx[0]);
+      if (num_data_points != 209) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #2: math::HierarchySideDataOpsReal::numberOfEntries()\n"
+         << "Expected value = 209 , Computed value = "
+         << num_data_points << std::endl;
+      }
+
+      // Test #3a: math::HierarchySideDataOpsReal::setToScalar()
+      // Expected: v0 = 2.0
+      double val0 = double(2.0);
+      side_ops->setToScalar(svindx[0], val0);
+      if (!doubleDataSameAsValue(svindx[0], val0, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #3a: math::HierarchySideDataOpsReal::setToScalar()\n"
+         << "Expected: v0 = " << val0 << std::endl;
+         side_ops->printData(svindx[0], tbox::plog);
+      }
+
+      // Test #3b: math::HierarchySideDataOpsReal::setToScalar()
+      // Expected: v1 = (4.0)
+      side_ops->setToScalar(svindx[1], 4.0);
+      double val1 = 4.0;
+      if (!doubleDataSameAsValue(svindx[1], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #3b: math::HierarchySideDataOpsReal::setToScalar()\n"
+         << "Expected: v1 = " << val1 << std::endl;
+         side_ops->printData(svindx[1], tbox::plog);
+      }
+
+      // Test #4: math::HierarchySideDataOpsReal::copyData()
+      // Expected:  v2 = v1 = (4.0)
+      side_ops->copyData(svindx[2], svindx[1]);
+      if (!doubleDataSameAsValue(svindx[2], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #4: math::HierarchySideDataOpsReal::copyData()\n"
+         << "Expected: v2 = " << val1 << std::endl;
+         side_ops->printData(svindx[2], tbox::plog);
+      }
+
+      // Test #5: math::HierarchySideDataOpsReal::swapData()
+      // Expected:  v0 = (4.0), v1 = (2.0)
+      side_ops->swapData(svindx[0], svindx[1]);
+      if (!doubleDataSameAsValue(svindx[0], val1, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #5a: math::HierarchySideDataOpsReal::swapData()\n"
+         << "Expected: v0 = " << val1 << std::endl;
+         side_ops->printData(svindx[0], tbox::plog);
+      }
+      if (!doubleDataSameAsValue(svindx[1], val0, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #5b: math::HierarchySideDataOpsReal::swapData()\n"
+         << "Expected: v1 = " << val0 << std::endl;
+         side_ops->printData(svindx[1], tbox::plog);
+      }
+
+      // Test #6: math::HierarchySideDataOpsReal::scale()
+      // Expected:  v2 = 0.25 * v2 = (1.0)
+      side_ops->scale(svindx[2], 0.25, svindx[2]);
+      double val_scale = 1.0;
+      if (!doubleDataSameAsValue(svindx[2], val_scale, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #6: math::HierarchySideDataOpsReal::scale()\n"
+         << "Expected: v2 = " << val_scale << std::endl;
+         side_ops->printData(svindx[2], tbox::plog);
+      }
+
+      // Test #7: math::HierarchySideDataOpsReal::add()
+      // Expected: v3 = v0 + v1 = (6.0)
+      side_ops->add(svindx[3], svindx[0], svindx[1]);
+      double val_add = 6.0;
+      if (!doubleDataSameAsValue(svindx[3], val_add, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #7: math::HierarchySideDataOpsReal::add()\n"
+         << "Expected: v3 = " << val_add << std::endl;
+         side_ops->printData(svindx[3], tbox::plog);
+      }
+
+      // Reset v0: v0 = (0.0)
+      side_ops->setToScalar(svindx[0], 0.0);
+
+      // Test #8: math::HierarchySideDataOpsReal::subtract()
+      // Expected: v1 = v3 - v0 = (6.0)
+      side_ops->subtract(svindx[1], svindx[3], svindx[0]);
+      double val_sub = 6.0;
+      if (!doubleDataSameAsValue(svindx[1], val_sub, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #8: math::HierarchySideDataOpsReal::subtract()\n"
+         << "Expected: v1 = " << val_sub << std::endl;
+         side_ops->printData(svindx[1], tbox::plog);
+      }
+
+      // Test #9a: math::HierarchySideDataOpsReal::addScalar()
+      // Expected:  v1 = v1 + (0.0) = (6.0)
+      side_ops->addScalar(svindx[1], svindx[1], 0.0);
+      double val_addScalar = 6.0;
+      if (!doubleDataSameAsValue(svindx[1], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #9a: math::HierarchySideDataOpsReal::addScalar()\n"
+         << "Expected: v1 = " << val_addScalar << std::endl;
+         side_ops->printData(svindx[1], tbox::plog);
+      }
+
+      // Test #9b: math::HierarchySideDataOpsReal::addScalar()
+      // Expected:  v2 = v2 + (0.0) = (1.0)
+      side_ops->addScalar(svindx[2], svindx[2], 0.0);
+      val_addScalar = 1.0;
+      if (!doubleDataSameAsValue(svindx[2], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #9b: math::HierarchySideDataOpsReal::addScalar()\n"
+         << "Expected: v2 = " << val_addScalar << std::endl;
+         side_ops->printData(svindx[2], tbox::plog);
+      }
+
+      // Test #9c: math::HierarchySideDataOpsReal::addScalar()
+      // Expected:  v2 = v2 + (3.0) = (4.0)
+      side_ops->addScalar(svindx[2], svindx[2], 3.0);
+      val_addScalar = 4.0;
+      if (!doubleDataSameAsValue(svindx[2], val_addScalar, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #9c: math::HierarchySideDataOpsReal::addScalar()\n"
+         << "Expected: v2 = " << val_addScalar << std::endl;
+         side_ops->printData(svindx[2], tbox::plog);
+      }
+
+      // Reset v3: v3 = (0.5)
+      side_ops->setToScalar(svindx[3], 0.5);
+
+      // Test #10: math::HierarchySideDataOpsReal::multiply()
+      // Expected: v1 = v3 * v1 = (3.0)
+      side_ops->multiply(svindx[1], svindx[3], svindx[1]);
+      double val_mult = 3.0;
+      if (!doubleDataSameAsValue(svindx[1], val_mult, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #10 math::HierarchySideDataOpsReal::multiply()\n"
+         << "Expected: v1 = " << val_mult << std::endl;
+         side_ops->printData(svindx[1], tbox::plog);
+      }
+
+      // Test #11: math::HierarchySideDataOpsReal::divide()
+      // Expected: v0 = v2 / v1 =  1.33333333333333
+      side_ops->divide(svindx[0], svindx[2], svindx[1]);
+      double val_div = 1.333333333333;
+      if (!doubleDataSameAsValue(svindx[0], val_div, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #11 math::HierarchySideDataOpsReal::divide()\n"
+         << "Expected: v0 = " << val_div << std::endl;
+         side_ops->printData(svindx[0], tbox::plog);
+      }
+
+      // Test #12: math::HierarchySideDataOpsReal::reciprocal()
+      // Expected: v1 = 1 / v1 = (0.333333333)
+      side_ops->reciprocal(svindx[1], svindx[1]);
+      double val_rec = 0.33333333333333;
+      if (!doubleDataSameAsValue(svindx[1], val_rec, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #12 math::HierarchySideDataOpsReal::reciprocal()\n"
+         << "Expected: v1 = " << val_rec << std::endl;
+         side_ops->printData(svindx[1], tbox::plog);
+      }
+
+      // Test #13: math::HierarchySideDataOpsReal::abs()
+      // Expected: v3 = abs(v2) = 4.0
+      side_ops->abs(svindx[3], svindx[2]);
+      double val_abs = 4.0;
+      if (!doubleDataSameAsValue(svindx[3], val_abs, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #13 math::HierarchySideDataOpsReal::abs()\n"
+         << "Expected: v3 = " << val_abs << std::endl;
+         side_ops->printData(svindx[3], tbox::plog);
+      }
+
+      // Test #14: Place some bogus values on coarse level
+      tbox::Pointer<pdat::SideData<double> > cdata;
+
+      // set values
+      tbox::Pointer<hier::PatchLevel> level_zero = hierarchy->getPatchLevel(0);
+      for (hier::PatchLevel::Iterator ip(level_zero); ip; ip++) {
+         patch = *ip;
+         cdata = patch->getPatchData(svindx[2]);
+         hier::Index index0(2, 2);
+         hier::Index index1(5, 3);
+         if (patch->getBox().contains(index0)) {
+            (*cdata)(pdat::SideIndex(index0, pdat::SideIndex::Y,
+                        pdat::SideIndex::Lower), 0) = 100.0;
+         }
+         if (patch->getBox().contains(index1)) {
+            (*cdata)(pdat::SideIndex(index1, pdat::SideIndex::Y,
+                        pdat::SideIndex::Upper), 0) = -1000.0;
+         }
+      }
+
+      // check values
+      bool bogus_value_test_passed = true;
+      for (hier::PatchLevel::Iterator ipp(level_zero); ipp; ipp++) {
+         patch = *ipp;
+         cdata = patch->getPatchData(svindx[2]);
+         pdat::SideIndex index0(hier::Index(2,
+                                   2), pdat::SideIndex::Y,
+                                pdat::SideIndex::Lower);
+         pdat::SideIndex index1(hier::Index(5,
+                                   3), pdat::SideIndex::Y,
+                                pdat::SideIndex::Upper);
+
+         // check X axis data
+         for (pdat::SideIterator c(cdata->getBox(), pdat::SideIndex::X);
+              c && bogus_value_test_passed;
+              c++) {
+            pdat::SideIndex side_index = c();
+
+            if (!tbox::MathUtilities<double>::equalEps((*cdata)(side_index),
+                   4.0)) {
+               bogus_value_test_passed = false;
+            }
+         }
+
+         // check Y axis data
+         for (pdat::SideIterator cc(cdata->getBox(), pdat::SideIndex::Y);
+              cc && bogus_value_test_passed;
+              cc++) {
+            pdat::SideIndex side_index = cc();
+
+            if (side_index == index0) {
+               if (!tbox::MathUtilities<double>::equalEps((*cdata)(side_index),
+                      100.0)) {
+                  bogus_value_test_passed = false;
+               }
+            } else {
+               if (side_index == index1) {
+                  if (!tbox::MathUtilities<double>::equalEps((*cdata)(
+                            side_index), -1000.0)) {
+                     bogus_value_test_passed = false;
+                  }
+               } else {
+                  if (!tbox::MathUtilities<double>::equalEps((*cdata)(
+                            side_index), 4.0)) {
+                     bogus_value_test_passed = false;
+                  }
+               }
+            }
+         }
+      }
+      if (!bogus_value_test_passed) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #14:  Place some bogus values on coarse level"
+         << std::endl;
+         side_ops->printData(svindx[2], tbox::plog);
+      }
+
+      // Test #15: math::HierarchySideDataOpsReal::L1Norm() - w/o control weights
+      // Expected: bogus_l1_norm = 1984.00
+      double bogus_l1_norm = side_ops->L1Norm(svindx[2]);
+      if (!tbox::MathUtilities<double>::equalEps(bogus_l1_norm, 1984.00)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #15: math::HierarchySideDataOpsReal::L1Norm()"
+         << " - w/o control weights\n"
+         << "Expected value = 1984.00, Computed value = "
+         << std::setprecision(12) << bogus_l1_norm << std::endl;
+      }
+
+      // Test #16: math::HierarchySideDataOpsReal::L1Norm() - w/control weights
+      // Expected: correct_l1_norm = 4.0
+      double correct_l1_norm = side_ops->L1Norm(svindx[2], swgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(correct_l1_norm, 4.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #16: math::HierarchySideDataOpsReal::L1Norm()"
+         << " - w/control weights\n"
+         << "Expected value = 4.0, Computed value = "
+         << correct_l1_norm << std::endl;
+      }
+
+      // Test #17: math::HierarchySideDataOpsReal::L2Norm()
+      // Expected: l2_norm = 4.0
+      double l2_norm = side_ops->L2Norm(svindx[2], swgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(l2_norm, 4.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #17: math::HierarchySideDataOpsReal::L2Norm()\n"
+         << "Expected value = 4.0, Computed value = "
+         << l2_norm << std::endl;
+      }
+
+      // Test #18: math::HierarchySideDataOpsReal::maxNorm() - w/o control weights
+      // Expected: bogus_max_norm = 1000.0
+      double bogus_max_norm = side_ops->maxNorm(svindx[2]);
+      if (!tbox::MathUtilities<double>::equalEps(bogus_max_norm, 1000.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #18: math::HierarchySideDataOpsReal::maxNorm()"
+         << " - w/o control weights\n"
+         << "Expected value = 1000.0, Computed value = "
+         << bogus_max_norm << std::endl;
+      }
+
+      // Test #19: math::HierarchySideDataOpsReal::maxNorm() - w/control weights
+      // Expected: max_norm = 4.0
+      double max_norm = side_ops->maxNorm(svindx[2], swgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(max_norm, 4.0)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #19: math::HierarchySideDataOpsReal::maxNorm()"
+         << " - w/control weights\n"
+         << "Expected value = 4.0, Computed value = "
+         << max_norm << std::endl;
+      }
+
+      // Reset data and test sums, axpy's
+      side_ops->setToScalar(svindx[0], 1.0);
+      side_ops->setToScalar(svindx[1], 2.5);
+      side_ops->setToScalar(svindx[2], 7.0);
+
+      // Test #20: math::HierarchySideDataOpsReal::linearSum()
+      // Expected: v3 = 5.0
+      side_ops->linearSum(svindx[3], 2.0, svindx[1], 0.0, svindx[0]);
+      double val_linearSum = 5.0;
+      if (!doubleDataSameAsValue(svindx[3], val_linearSum, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #20: math::HierarchySideDataOpsReal::linearSum()\n"
+         << "Expected: v3 = " << val_linearSum << std::endl;
+         side_ops->printData(svindx[3], tbox::perr);
+      }
+
+      // Test #21: math::HierarchySideDataOpsReal::axmy()
+      // Expected: v3 = 6.5
+      side_ops->axmy(svindx[3], 3.0, svindx[1], svindx[0]);
+      double val_axmy = 6.5;
+      if (!doubleDataSameAsValue(svindx[3], val_axmy, hierarchy)) {
+         num_failures++;
+         tbox::perr
+         << "FAILED: - Test #21: math::HierarchySideDataOpsReal::axmy()\n"
+         << "Expected: v3 = " << val_axmy << std::endl;
+         side_ops->printData(svindx[3], tbox::plog);
+      }
+
+      // Test #22a: math::HierarchySideDataOpsReal::dot() - (ind2) * (ind1)
+      // Expected: cdot = 17.5
+      double cdot = side_ops->dot(svindx[2], svindx[1], swgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(cdot, 17.5)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #22a: math::HierarchySideDataOpsReal::dot() - (ind2) * (ind1)\n"
+         << "Expected Value = 17.5, Computed Value = "
+         << cdot << std::endl;
+      }
+
+      // Test #22b: math::HierarchySideDataOpsReal::dot() - (ind2) * (ind1)
+      // Expected: cdot = 17.5
+      cdot = side_ops->dot(svindx[1], svindx[2], swgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(cdot, 17.5)) {
+         num_failures++;
+         tbox::perr
+         <<
+         "FAILED: - Test #22b: math::HierarchySideDataOpsReal::dot() - (ind2) * (ind1)\n"
+         << "Expected Value = 17.5, Computed Value = "
+         << cdot << std::endl;
+      }
+
+      // deallocate data on hierarchy
+      for (ln = 0; ln < 2; ln++) {
+         hierarchy->getPatchLevel(ln)->deallocatePatchData(swgt_id);
+         for (iv = 0; iv < NVARS; iv++) {
+            hierarchy->getPatchLevel(ln)->deallocatePatchData(svindx[iv]);
+         }
+      }
+
+      for (iv = 0; iv < NVARS; iv++) {
+         fvar[iv].setNull();
+      }
+      swgt.setNull();
+
+      geometry.setNull();
+      hierarchy.setNull();
+      side_ops.setNull();
+      swgt_ops.setNull();
+
+      if (num_failures == 0) {
+         tbox::pout << "\nPASSED:  side hiertest" << std::endl;
+      }
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return num_failures;
+}
+
+/*
+ * Returns true if all the data in the hierarchy is equal to the specified
+ * value.  Returns false otherwise.
+ */
+static bool
+doubleDataSameAsValue(
+   int desc_id,
+   double value,
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   bool test_passed = true;
+
+   int ln;
+   tbox::Pointer<hier::Patch> patch;
+   for (ln = 0; ln < 2; ln++) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+      for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+         patch = *ip;
+         tbox::Pointer<pdat::SideData<double> > cvdata = patch->getPatchData(
+               desc_id);
+
+         for (pdat::SideIterator c(cvdata->getBox(), 1); c && test_passed;
+              c++) {
+            pdat::SideIndex side_index = c();
+            if (!tbox::MathUtilities<double>::equalEps((*cvdata)(side_index),
+                   value)) {
+               test_passed = false;
+            }
+         }
+      }
+   }
+
+   return test_passed;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dimension/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dimension/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,53 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=main.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h main.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dimension/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dimension/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,55 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for timer and statistician main programs 
+##
+#########################################################################
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/test/dimension
+VPATH         = @srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+default: check
+
+include $(OBJECT)/config/Makefile.config
+
+CPPFLAGS_EXTRA= -DTESTING=1
+
+main:  main.o $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) main.o \
+	       $(LIBSAMRAI) $(LDLIBS) -o main
+
+NUM_TESTS = 1
+
+TEST_NPROCS = @TEST_NPROCS@
+
+checkcompile: main
+
+check:  checkcompile
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main
+
+check2d:
+	$(MAKE) check
+
+check3d:
+	$(MAKE) check
+
+checktest:
+	rm -f makecheck.logfile
+	$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+	$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+	rm -f makecheck.logfile
+
+
+clean:
+	$(SAMCLEAN)
+	$(RM) main
+	$(RM) -rf *.log.* stats
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dimension/main.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dimension/main.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,148 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Test program to demonstrate/test the Dimension class 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+// Headers for basic SAMRAI objects used in this code.
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/Dimension.h"
+
+#include <string>
+#include <cassert>
+
+using namespace std;
+
+using namespace SAMRAI;
+
+int main(
+   int argc,
+   char* argv[])
+{
+   int fail_count = 0;
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+      /* This test assumes that the maximum dim is at least 3 which is the default */
+      assert(tbox::Dimension::MAXIMUM_DIMENSION_VALUE >= 3);
+
+      tbox::Dimension dim1(1);
+      tbox::Dimension dim2(2);
+      tbox::Dimension dim3(3);
+
+      if (dim1.getValue() != 1) {
+         fail_count++;
+         TBOX_ERROR("Failed dim check; dim = 1");
+      }
+
+      if (dim2.getValue() != 2) {
+         fail_count++;
+         TBOX_ERROR("Failed dim check; dim = 2");
+      }
+
+      if (dim3.getValue() != 3) {
+         fail_count++;
+         TBOX_ERROR("Failed dim check; dim = 3");
+      }
+
+      if (!dim3.isValid()) {
+         fail_count++;
+         TBOX_ERROR("Failed dim check: isValid");
+      }
+
+      tbox::Dimension a(2), b(2);
+      if (!(a == b)) {
+         fail_count++;
+         TBOX_ERROR("Failed dim comparison check: ==");
+      }
+
+      if (!(a != dim1)) {
+         fail_count++;
+         TBOX_ERROR("Failed dim comparison check: !=");
+      }
+
+      if (dim1 > dim2) {
+         fail_count++;
+         TBOX_ERROR("Failed dim comparison check: >");
+      }
+
+      if (!(dim3 > dim2)) {
+         fail_count++;
+         TBOX_ERROR("Failed dim comparison check: >");
+      }
+
+      if (dim1 >= dim2) {
+         fail_count++;
+         TBOX_ERROR("Failed dim comparison check: >=");
+      }
+
+      if (!(dim3 >= dim2)) {
+         fail_count++;
+         TBOX_ERROR("Failed dim comparison check: >=");
+      }
+
+      if (!(dim2 >= dim2)) {
+         fail_count++;
+         TBOX_ERROR("Failed dim comparison check: >=");
+      }
+
+      if (dim2 < dim1) {
+         fail_count++;
+         TBOX_ERROR("Failed dim comparison check: <");
+      }
+
+      if (!(dim2 < dim3)) {
+         fail_count++;
+         TBOX_ERROR("Failed dim comparison check: <");
+      }
+
+      if (dim2 <= dim1) {
+         fail_count++;
+         TBOX_ERROR("Failed dim comparison check: <=");
+      }
+
+      if (!(dim2 <= dim3)) {
+         fail_count++;
+         TBOX_ERROR("Failed dim comparison check: <=");
+      }
+
+      if (!(dim2 <= dim2)) {
+         fail_count++;
+         TBOX_ERROR("Failed dim comparison check: <=");
+      }
+
+#if 0
+      // Currently not allowed.
+      a = dim3;
+      if (a != dim3) {
+         fail_count++;
+         TBOX_ERROR("Failed dim assignment check");
+      }
+#endif
+
+   }
+
+   if (fail_count == 0) {
+      tbox::pout << "\nPASSED:  dimension" << std::endl;
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+   return fail_count;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dlbg/DLBGTest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dlbg/DLBGTest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   DLBGTest class implementation 
+ *
+ ************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "DLBGTest.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/math/HierarchyCellDataOpsReal.h"
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+
+#include <iomanip>
+
+using namespace SAMRAI;
+
+// using namespace std;
+
+DLBGTest::DLBGTest(
+   const std::string& object_name
+   ,
+   const tbox::Dimension& dim
+   ,
+   tbox::Pointer<hier::PatchHierarchy> patch_hierarchy
+   ,
+   tbox::Pointer<tbox::Database> database):
+   d_name(object_name),
+   d_dim(dim),
+   d_hierarchy(patch_hierarchy),
+   d_tagger(object_name + ":tagger",
+            d_dim,
+            database->isDatabase("sine_tagger") ?
+            database->getDatabase("sine_tagger").getPointer():NULL),
+   d_time(0.5)
+{
+   d_tagger.resetHierarchyConfiguration(patch_hierarchy, 0, 0);
+}
+
+DLBGTest::~DLBGTest()
+{
+}
+
+mesh::StandardTagAndInitStrategy *DLBGTest::getStandardTagAndInitObject()
+{
+   return &d_tagger;
+}
+
+/*
+ * Deallocate patch data allocated by this class.
+ */
+void DLBGTest::computeHierarchyData(
+   hier::PatchHierarchy& hierarchy,
+   double time)
+{
+   d_tagger.computeHierarchyData(hierarchy, time);
+}
+
+/*
+ * Deallocate patch data allocated by this class.
+ */
+void DLBGTest::deallocatePatchData(
+   hier::PatchHierarchy& hierarchy)
+{
+   d_tagger.deallocatePatchData(hierarchy);
+}
+
+/*
+ * Deallocate patch data allocated by this class.
+ */
+void DLBGTest::deallocatePatchData(
+   hier::PatchLevel& level)
+{
+   d_tagger.deallocatePatchData(level);
+}
+
+#ifdef HAVE_HDF5
+int DLBGTest::registerVariablesWithPlotter(
+   tbox::Pointer<appu::VisItDataWriter> writer)
+{
+   if (!writer.isNull()) {
+      d_tagger.registerVariablesWithPlotter(*writer);
+      writer->registerDerivedPlotQuantity("Owner",
+         "SCALAR",
+         this);
+   }
+   return 0;
+}
+#endif
+
+bool DLBGTest::packDerivedDataIntoDoubleBuffer(
+   double* buffer,
+   const hier::Patch& patch,
+   const hier::Box& region,
+   const std::string& variable_name,
+   int depth_id) const
+{
+   (void)patch;
+   (void)region;
+   (void)variable_name;
+   (void)depth_id;
+   if (variable_name == "Owner") {
+      const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+      double owner = mpi.getRank();
+      int i, size = region.size();
+      for (i = 0; i < size; ++i) buffer[i] = owner;
+   } else {
+      // Did not register this name.
+      TBOX_ERROR(
+         "Unregistered variable name '" << variable_name << "' in\n"
+         <<
+         "DLBGTest::packDerivedPatchDataIntoDoubleBuffer");
+   }
+
+   return true;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dlbg/DLBGTest.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dlbg/DLBGTest.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,119 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   DLBGTest class declaration 
+ *
+ ************************************************************************/
+#ifndef included_DLBGTest
+#define included_DLBGTest
+
+#include <string>
+
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Database.h"
+
+/*
+ * SAMRAI classes
+ */
+#include "SAMRAI/appu/VisItDataWriter.h"
+#include "SAMRAI/appu/VisDerivedDataStrategy.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/solv/CartesianRobinBcHelper.h"
+#include "SAMRAI/solv/RobinBcCoefStrategy.h"
+#include "SinusoidalFrontTagger.h"
+
+using namespace SAMRAI;
+
+/*!
+ * @brief Class to test new PIND algorithm.
+ */
+class DLBGTest:
+   public appu::VisDerivedDataStrategy
+{
+
+public:
+   /*!
+    * @brief Constructor.
+    */
+   DLBGTest(
+      const std::string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<hier::PatchHierarchy> patch_hierarchy,
+      SAMRAI::tbox::Pointer<SAMRAI::tbox::Database> database);
+
+   ~DLBGTest();
+
+   mesh::StandardTagAndInitStrategy *
+   getStandardTagAndInitObject();
+
+   //@{ @name SAMRAI::appu::VisDerivedDataStrategy virtuals
+
+   virtual bool
+   packDerivedDataIntoDoubleBuffer(
+      double* buffer,
+      const hier::Patch& patch,
+      const hier::Box& region,
+      const std::string& variable_name,
+      int depth_id) const;
+
+   //@}
+
+public:
+   /*
+    * Deallocate patch data allocated by this class.
+    */
+   void
+   computeHierarchyData(
+      hier::PatchHierarchy& hierarchy,
+      double time);
+
+   /*!
+    * @brief Deallocate internally managed patch data on level.
+    */
+   void
+   deallocatePatchData(
+      hier::PatchLevel& level);
+
+   /*!
+    * @brief Deallocate internally managed patch data on hierarchy.
+    */
+   void
+   deallocatePatchData(
+      hier::PatchHierarchy& hierarchy);
+
+#ifdef HAVE_HDF5
+   /*!
+    * @brief Tell a VisIt plotter which data to write for this class.
+    */
+   int
+   registerVariablesWithPlotter(
+      tbox::Pointer<appu::VisItDataWriter> writer);
+#endif
+
+   /*!
+    * @brief Test refinement accuracy (assuming DLBG is used).
+    */
+   void
+   checkDataRefinement(
+      hier::PatchHierarchy& hierarchy);
+
+private:
+   std::string d_name;
+   const tbox::Dimension d_dim;
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+
+   SinusoidalFrontTagger d_tagger;
+
+   /*!
+    * @brief Front time.
+    */
+   double d_time;
+
+};
+
+#endif  // included_DLBGTest
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dlbg/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dlbg/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,883 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=DLBGTest.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CartesianRobinBcHelper.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h DLBGTest.C	\
+	DLBGTest.h SinusoidalFrontTagger.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=SinusoidalFrontTagger.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MDA_Access.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	SinusoidalFrontTagger.C SinusoidalFrontTagger.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=get-input-filename.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h get-input-filename.C	\
+	get-input-filename.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=main.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/OverlapConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BergerRigoutsos.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CartesianRobinBcHelper.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACOperatorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h DLBGTest.h	\
+	SinusoidalFrontTagger.h get-input-filename.h main.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dlbg/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dlbg/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,67 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for DLBG test 
+##
+#########################################################################
+
+SAMRAI	      = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/test/dlbg
+VPATH         = @top_srcdir@/source/test/dlbg
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+default: check
+
+include $(OBJECT)/config/Makefile.config
+
+CPPFLAGS_EXTRA= -DNDIM=$(PDIM) -DTESTING=1
+
+CXX_OBJS      = main.o DLBGTest.o SinusoidalFrontTagger.o intToString.o get-input-filename.o
+NUM_TESTS = 3
+
+TEST_NPROCS = @TEST_NPROCS@
+
+CXX_OBJS      = main.o DLBGTest.o SinusoidalFrontTagger.o get-input-filename.o
+
+main:	$(CXX_OBJS) $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS)	\
+	$(LIBSAMRAI) $(LDLIBS) -o $@
+
+check:
+	$(MAKE) check2d
+	$(MAKE) check3d
+
+check2d:	main
+	@for i in test_inputs/*2d*.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+check3d:	main
+	@for i in test_inputs/*3d*.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+checkcompile: main
+
+checktest:
+	rm -f makecheck.logfile
+	$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+	$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+	rm -f makecheck.logfile
+
+clean-check:
+	$(SAMCLEAN)
+
+clean:
+	$(SAMCLEAN)
+	$(RM) *.f *main*
+	$(RM) -rf restart-*d*
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dlbg/SinusoidalFrontTagger.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dlbg/SinusoidalFrontTagger.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,588 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   SinusoidalFrontTagger class implementation 
+ *
+ ************************************************************************/
+#include "SinusoidalFrontTagger.h"
+
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/math/HierarchyCellDataOpsReal.h"
+#include "SAMRAI/pdat/MDA_Access.h"
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <iomanip>
+
+using namespace SAMRAI;
+
+SinusoidalFrontTagger::SinusoidalFrontTagger(
+   const std::string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Database* database):
+   d_name(object_name),
+   d_dim(dim),
+   d_hierarchy(),
+   d_period(1.0),
+   d_amplitude(0.2),
+   d_ghost_cell_width(dim, 0),
+   d_buffer_cells(dim, 1),
+   d_allocate_data(true),
+   d_time(0.5)
+{
+   hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(variable_db != NULL);
+#endif
+
+   tbox::Array<double> init_disp;
+   tbox::Array<double> velocity;
+
+   if (database != NULL) {
+      d_allocate_data =
+         database->getBoolWithDefault("allocate_data",
+            d_allocate_data);
+      if (database->isInteger("buffer_cells")) {
+         database->getIntegerArray("buffer_cells",
+            &d_buffer_cells[0], d_dim.getValue());
+      }
+      for (int ln = 0; true; ++ln) {
+         std::string name("buffer_space_");
+         name = name + tbox::Utilities::intToString(ln);
+         if (database->isDouble(name)) {
+            d_buffer_space.resizeArray(d_dim.getValue() * (ln + 1));
+            database->getDoubleArray(name, &d_buffer_space[d_dim.getValue() * ln], d_dim.getValue());
+         } else {
+            break;
+         }
+      }
+      d_period =
+         database->getDoubleWithDefault("period",
+            d_period);
+      if (database->isDouble("init_disp")) {
+         init_disp =
+            database->getDoubleArray("init_disp");
+      }
+      if (database->isDouble("velocity")) {
+         velocity =
+            database->getDoubleArray("velocity");
+      }
+      d_amplitude =
+         database->getDoubleWithDefault("amplitude",
+            d_amplitude);
+      d_time =
+         database->getDoubleWithDefault("time",
+            d_time);
+   }
+
+   for (int idim = 0; idim < d_dim.getValue(); ++idim) {
+      d_init_disp[idim] = idim < init_disp.size() ? init_disp[idim] : 0.0;
+      d_velocity[idim] = idim < velocity.size() ? velocity[idim] : 0.0;
+   }
+
+   const std::string context_name = d_name + std::string(":context");
+   d_context = variable_db->getContext(context_name);
+
+   if (database->isInteger("ghost_cell_width")) {
+      database->getIntegerArray("ghost_cell_width",
+         &d_ghost_cell_width[0], d_dim.getValue());
+   }
+
+   tbox::Pointer<hier::Variable> dist_var(
+      new pdat::NodeVariable<double>(dim, d_name + ":dist"));
+   d_dist_id = variable_db->registerVariableAndContext(dist_var,
+         d_context,
+         d_ghost_cell_width);
+
+   tbox::Pointer<hier::Variable> tag_var(
+      new pdat::CellVariable<int>(dim, d_name + ":tag"));
+   d_tag_id = variable_db->registerVariableAndContext(tag_var,
+         d_context,
+         d_ghost_cell_width);
+
+   t_setup = tbox::TimerManager::getManager()->
+      getTimer("apps::SinusoidalFrontTagger::setup");
+   t_node_pos = tbox::TimerManager::getManager()->
+      getTimer("apps::SinusoidalFrontTagger::node_pos");
+   t_distance = tbox::TimerManager::getManager()->
+      getTimer("apps::SinusoidalFrontTagger::distance");
+   t_tag_cells = tbox::TimerManager::getManager()->
+      getTimer("apps::SinusoidalFrontTagger::tag_cells");
+   t_copy = tbox::TimerManager::getManager()->
+      getTimer("apps::SinusoidalFrontTagger::copy");
+}
+
+SinusoidalFrontTagger::~SinusoidalFrontTagger()
+{
+}
+
+void SinusoidalFrontTagger::initializeLevelData(
+   /*! Hierarchy to initialize */
+   const tbox::Pointer<hier::BasePatchHierarchy> base_hierarchy,
+   /*! Level to initialize */
+   const int ln,
+   const double init_data_time,
+   const bool can_be_refined,
+   /*! Whether level is being introduced for the first time */
+   const bool initial_time,
+   /*! Level to copy data from */
+   const tbox::Pointer<hier::BasePatchLevel> old_base_level,
+   const bool allocate_data)
+{
+   NULL_USE(can_be_refined);
+
+   tbox::Pointer<hier::PatchHierarchy> hierarchy = base_hierarchy;
+   tbox::Pointer<hier::PatchLevel> old_level = old_base_level;
+   if (!old_base_level.isNull()) {
+      TBOX_ASSERT(!old_level.isNull());
+   }
+   TBOX_ASSERT(!hierarchy.isNull());
+
+   /*
+    * Reference the level object with the given index from the hierarchy.
+    */
+   tbox::Pointer<hier::PatchLevel> level =
+      hierarchy->getPatchLevel(ln);
+
+   for (hier::PatchLevel::Iterator pi(level); pi; pi++) {
+      hier::Patch& patch = **pi;
+      initializePatchData(patch,
+         init_data_time,
+         initial_time,
+         allocate_data);
+   }
+
+#if 0
+   if (d_allocate_data) {
+      /*
+       * If instructed, allocate all patch data on the level.
+       * Allocate only persistent data.  Scratch data will
+       * generally be allocated and deallocated as needed.
+       */
+      if (allocate_data) {
+         level->allocatePatchData(d_dist_id);
+         level->allocatePatchData(d_tag_id);
+      }
+      computeLevelData(hierarchy, ln, d_time /*init_data_time*/,
+         d_dist_id, d_tag_id, old_level);
+   }
+#endif
+}
+
+void SinusoidalFrontTagger::initializePatchData(
+   hier::Patch& patch,
+   const double init_data_time,
+   const bool initial_time,
+   const bool allocate_data)
+{
+   NULL_USE(initial_time);
+
+   if (d_allocate_data) {
+      /*
+       * If instructed, allocate all patch data on the level.
+       * Allocate only persistent data.  Scratch data will
+       * generally be allocated and deallocated as needed.
+       */
+      if (allocate_data) {
+         if (!patch.checkAllocated(d_dist_id)) {
+            patch.allocatePatchData(d_dist_id);
+         }
+         if (!patch.checkAllocated(d_tag_id)) {
+            patch.allocatePatchData(d_tag_id);
+         }
+         tbox::Pointer<pdat::NodeData<double> > dist_data =
+            patch.getPatchData(d_dist_id);
+         tbox::Pointer<pdat::CellData<int> > tag_data =
+            patch.getPatchData(d_tag_id);
+         TBOX_ASSERT(!dist_data.isNull());
+         TBOX_ASSERT(!tag_data.isNull());
+         computePatchData(patch, init_data_time,
+            dist_data.getPointer(), tag_data.getPointer());
+      }
+   }
+}
+
+void SinusoidalFrontTagger::resetHierarchyConfiguration(
+   /*! New hierarchy */ tbox::Pointer<hier::BasePatchHierarchy> new_hierarchy,
+   /*! Coarsest level */ int coarsest_level,
+   /*! Finest level */ int finest_level)
+{
+   NULL_USE(coarsest_level);
+   NULL_USE(finest_level);
+   d_hierarchy = new_hierarchy;
+   TBOX_ASSERT(!d_hierarchy.isNull());
+}
+
+void SinusoidalFrontTagger::applyGradientDetector(
+   const tbox::Pointer<hier::BasePatchHierarchy> base_hierarchy_,
+   const int ln,
+   const double error_data_time,
+   const int tag_index,
+   const bool initial_time,
+   const bool uses_richardson_extrapolation)
+{
+   NULL_USE(initial_time);
+   NULL_USE(uses_richardson_extrapolation);
+   tbox::Pointer<hier::PatchHierarchy> hierarchy_ = base_hierarchy_;
+   TBOX_ASSERT(!hierarchy_.isNull());
+   tbox::Pointer<hier::PatchLevel> level_ = hierarchy_->getPatchLevel(ln);
+   TBOX_ASSERT(!level_.isNull());
+
+   hier::PatchLevel& level = *level_;
+
+   for (hier::PatchLevel::Iterator pi(level); pi; pi++) {
+      hier::Patch& patch = **pi;
+
+      tbox::Pointer<hier::PatchData>
+      tag_data = patch.getPatchData(tag_index);
+      if (tag_data.isNull()) {
+         TBOX_ERROR("Data index " << tag_index
+                                  << " does not exist for patch.\n");
+      }
+      tbox::Pointer<pdat::CellData<int> > tag_cell_data_ = tag_data;
+      if (tag_cell_data_.isNull()) {
+         TBOX_ERROR("Data index " << tag_index
+                                  << " is not cell int data.\n");
+      }
+
+      if (d_allocate_data) {
+         // Use internally stored data.
+         tbox::Pointer<hier::PatchData>
+         saved_tag_data = patch.getPatchData(d_tag_id);
+         tag_cell_data_->copy(*saved_tag_data);
+      } else {
+         // Compute tag data for patch.
+         computePatchData(patch,
+            error_data_time,
+            NULL,
+            tag_cell_data_.getPointer());
+      }
+
+   }
+}
+
+/*
+ * Deallocate patch data allocated by this class.
+ */
+
+void SinusoidalFrontTagger::deallocatePatchData(
+   hier::PatchHierarchy& hierarchy)
+{
+   int ln;
+   for (ln = 0; ln < hierarchy.getNumberOfLevels(); ++ln) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy.getPatchLevel(ln);
+      deallocatePatchData(*level);
+   }
+}
+
+/*
+ * Deallocate patch data allocated by this class.
+ */
+
+void SinusoidalFrontTagger::deallocatePatchData(
+   hier::PatchLevel& level)
+{
+   level.deallocatePatchData(d_dist_id);
+   level.deallocatePatchData(d_tag_id);
+}
+
+/*
+ * Deallocate patch data allocated by this class.
+ */
+void SinusoidalFrontTagger::computeHierarchyData(
+   hier::PatchHierarchy& hierarchy,
+   double time)
+{
+   d_time = time;
+   if (!d_allocate_data) return;
+
+   for (int ln = 0; ln < hierarchy.getNumberOfLevels(); ++ln) {
+      computeLevelData(hierarchy, ln, time, d_dist_id, d_tag_id);
+   }
+}
+
+/*
+ * Compute the solution data for a level.
+ * Can copy data from old level (if any) to support
+ * initializeLevelData().
+ */
+
+void SinusoidalFrontTagger::computeLevelData(
+   const hier::PatchHierarchy& hierarchy,
+   const int ln,
+   const double time,
+   const int dist_id,
+   const int tag_id,
+   const tbox::Pointer<hier::PatchLevel>& old_level) const
+{
+   NULL_USE(old_level);
+
+   const tbox::Pointer<hier::PatchLevel> level =
+      hierarchy.getPatchLevel(ln);
+
+   /*
+    * Initialize data in all patches in the level.
+    */
+   for (hier::PatchLevel::Iterator pi(level); pi; pi++) {
+      hier::Patch& patch = **pi;
+      tbox::Pointer<pdat::NodeData<double> > dist_data = (dist_id >= 0) ?
+         patch.getPatchData(dist_id) : tbox::Pointer<hier::PatchData>(NULL);
+      tbox::Pointer<pdat::CellData<int> > tag_data = (tag_id >= 0) ?
+         patch.getPatchData(tag_id) : tbox::Pointer<hier::PatchData>(NULL);
+      computePatchData(patch, time,
+         dist_data.getPointer(),
+         tag_data.getPointer());
+   }
+}
+
+/*
+ * Compute the solution data for a patch.
+ */
+
+void SinusoidalFrontTagger::computePatchData(
+   const hier::Patch& patch,
+   const double time,
+   pdat::NodeData<double>* dist_data,
+   pdat::CellData<int>* tag_data) const
+{
+
+   t_setup->start();
+
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT(patch.inHierarchy());
+
+   const int ln = patch.getPatchLevelNumber();
+   const tbox::Pointer<hier::PatchLevel> level =
+      d_hierarchy->getPatchLevel(ln);
+   const hier::IntVector& ratio(level->getRatioToLevelZero());
+
+   const hier::Box& pbox = patch.getBox();
+   tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+
+   const double* xlo = patch_geom->getXLower();
+
+   const double* dx = patch_geom->getDx();
+
+   // Compute the size of buffer to tag around cells crossing front.
+   hier::IntVector buffer(d_buffer_cells);
+   for (int i = 0; i < d_dim.getValue(); ++i) {
+      if (d_buffer_space.size() > ln * d_dim.getValue() + i) {
+         int space_based_buffer =
+            int(d_buffer_space[ln * d_dim.getValue() + i] / dx[i] + 0.5);
+         if (space_based_buffer > buffer(i)) buffer(i) = space_based_buffer;
+      }
+   }
+   // std::cout << "buffer for ln of " << ln << " is " << buffer << std::endl;
+
+   /*
+    * We need at least buffer ghost cells to compute
+    * the tags, but the data does not have as many ghost cells.
+    * So we create temporary patch data with the required "ghost"
+    * buffer for computing tag values.  (We could give the real
+    * data the required ghost cells, but that may affect the
+    * regridding algorithm I'm testing.)
+    */
+   hier::IntVector required_tmp_buffer(buffer);
+   required_tmp_buffer *= ratio;
+   pdat::NodeData<double> tmp_dist(pbox, 1, required_tmp_buffer);
+   pdat::CellData<int> tmp_tag(pbox, 1, required_tmp_buffer);
+
+   /*
+    * Determine what x-node-index contains the sinusoidal front.
+    */
+
+   const double wave_number = 2 * 3.141592654 / d_period;
+
+   t_setup->stop();
+
+   t_node_pos->start();
+
+   hier::Box front_box = pbox;
+   front_box.grow(required_tmp_buffer);
+   front_box.growUpper(hier::IntVector(d_dim, 1));
+   // Squash front_box to a single plane.
+   front_box.upper(0) = front_box.lower(0);
+   const int ifront = front_box.lower(0);
+
+   pdat::ArrayData<int> front_i_(front_box, 1);
+
+   MDA_Access<int, 2, MDA_OrderColMajor<2> > front_i2;
+   MDA_Access<int, 3, MDA_OrderColMajor<3> > front_i3;
+   if (d_dim == tbox::Dimension(2)) {
+      front_i2 = MDA_Access<int, 2, MDA_OrderColMajor<2> >(
+            front_i_.getPointer(0),
+            &front_i_.getBox().lower()[0],
+            &front_i_.getBox().upper()[0]);
+      for (int j = front_i2.beg(1); j < front_i2.end(1); ++j) {
+         double y = xlo[1] + dx[1] * (j - pbox.lower(1));
+         double siny =
+            sin(wave_number * (y + d_init_disp[1] - d_velocity[1] * time));
+         double fx = d_amplitude * siny + d_init_disp[0] + d_velocity[0] * time;
+         front_i2(ifront, j) = int((fx - xlo[0]) / dx[0]) + pbox.lower(0);
+         // std::cout << i << '\t' << j << '\t' << y << '\t' << front_i(i,j) << std::endl;
+      }
+   } else if (d_dim == tbox::Dimension(3)) {
+      front_i3 = MDA_Access<int, 3, MDA_OrderColMajor<3> >(
+            front_i_.getPointer(0),
+            &front_i_.getBox().lower()[0],
+            &front_i_.getBox().upper()[0]);
+      for (int k = front_i3.beg(2); k < front_i3.end(2); ++k) {
+         double z = xlo[2] + dx[2] * (k - pbox.lower(2));
+         double sinz =
+            sin(wave_number * (z + d_init_disp[2] - d_velocity[2] * time));
+         for (int j = front_i3.beg(1); j < front_i3.end(1); ++j) {
+            double y = xlo[1] + dx[1] * (j - pbox.lower(1));
+            double siny =
+               sin(wave_number * (y + d_init_disp[1] + d_velocity[1] * time));
+            double fx = d_amplitude * siny * sinz + d_init_disp[0]
+               + d_velocity[0] * time;
+            front_i3(ifront, j, k) = int((fx - xlo[0]) / dx[0]) + pbox.lower(0);
+            // std::cout << i << '\t' << j << '\t' << k << '\t' << y << '\t' << z << '\t' << front_i(i,j,k) << std::endl;
+         }
+      }
+   }
+
+   t_node_pos->stop();
+
+   if (dist_data != NULL) {
+      t_distance->start();
+
+      pdat::NodeData<double>::Iterator ni(tmp_dist.getGhostBox());
+      for ( ; ni; ni++) {
+         const pdat::NodeIndex& index = *ni;
+         if (d_dim == tbox::Dimension(2)) {
+            tmp_dist(index) = xlo[0] + (index(0) - pbox.lower(0)) * dx[0]
+               - front_i2(ifront, index(1)) * dx[0];
+         } else if (d_dim == tbox::Dimension(3)) {
+            tmp_dist(index) = xlo[0] + (index(0) - pbox.lower(0)) * dx[0]
+               - front_i3(ifront, index(1), index(2)) * dx[0];
+         }
+      }
+      // tmp_dist.print(tmp_dist.getBox(),0,plog);
+
+      t_distance->stop();
+   }
+
+   if (tag_data != NULL) {
+
+      t_tag_cells->start();
+
+      tag_data->fill(0);
+
+      const hier::IntVector tag_growth(buffer);
+
+      if (d_dim == tbox::Dimension(2)) {
+         MDA_Access<int, 2, MDA_OrderColMajor<2> > tag_aa(
+            tag_data->getPointer(0),
+            &tag_data->getGhostBox().lower()[0],
+            &tag_data->getGhostBox().upper()[0]);
+         for (int j = pbox.lower(1); j <= pbox.upper(1); ++j) {
+            int mini = front_i2(ifront, j) - buffer(0);
+            int maxi = front_i2(ifront, j) + buffer(0);
+            if (mini < pbox.lower() (0)) mini = pbox.lower() (0);
+            if (maxi > pbox.upper() (0)) maxi = pbox.upper() (0);
+            for (int i = mini; i <= maxi; ++i) {
+               tag_aa(i, j) = 1;
+            }
+         }
+      } else if (d_dim == tbox::Dimension(3)) {
+         MDA_Access<int, 3, MDA_OrderColMajor<3> > tag_aa(
+            tag_data->getPointer(0),
+            &tag_data->getGhostBox().lower()[0],
+            &tag_data->getGhostBox().upper()[0]);
+         for (int k = pbox.lower(2); k <= pbox.upper(2); ++k) {
+            for (int j = pbox.lower(1); j <= pbox.upper(1); ++j) {
+               int mini = front_i3(ifront, j, k) - buffer(0);
+               int maxi = front_i3(ifront, j, k) + buffer(0);
+               if (mini < pbox.lower() (0)) mini = pbox.lower() (0);
+               if (maxi > pbox.upper() (0)) maxi = pbox.upper() (0);
+               for (int i = mini; i <= maxi; ++i) {
+                  tag_aa(i, j, k) = 1;
+               }
+            }
+         }
+      }
+
+      t_tag_cells->stop();
+
+   }
+
+   t_copy->start();
+
+   /*
+    * Copy computed data to output.  Recall that the convention is
+    * to send in a NULL pointer to indicate that data is not wanted.
+    */
+   if (dist_data != NULL) {
+      dist_data->copy(tmp_dist);
+   }
+
+   t_copy->stop();
+}
+
+#ifdef HAVE_HDF5
+int SinusoidalFrontTagger::registerVariablesWithPlotter(
+   appu::VisItDataWriter& writer)
+{
+   /*
+    * Register variables with plotter.
+    */
+   if (d_allocate_data) {
+      writer.registerPlotQuantity("Distance to front", "SCALAR", d_dist_id);
+      writer.registerPlotQuantity("Tag value", "SCALAR", d_tag_id);
+   } else {
+      writer.registerDerivedPlotQuantity("Distance to front", "SCALAR", this,
+         // hier::IntVector(0),
+         1.0,
+         "NODE");
+      writer.registerDerivedPlotQuantity("Tag value", "SCALAR", this);
+   }
+   return 0;
+}
+#endif
+
+bool SinusoidalFrontTagger::packDerivedDataIntoDoubleBuffer(
+   double* buffer,
+   const hier::Patch& patch,
+   const hier::Box& region,
+   const std::string& variable_name,
+   int depth_index) const
+{
+   (void)region;
+   (void)depth_index;
+
+   TBOX_ASSERT(d_allocate_data == false);
+   if (variable_name == "Distance to front") {
+      pdat::NodeData<double> dist_data(patch.getBox(), 1, hier::IntVector(d_dim,
+                                          0));
+      computePatchData(patch, d_time, &dist_data, NULL);
+      for (pdat::NodeData<double>::Iterator ci(patch.getBox()); ci; ci++) {
+         *(buffer++) = dist_data(*ci);
+      }
+   } else if (variable_name == "Tag value") {
+      pdat::CellData<int> tag_data(patch.getBox(), 1, hier::IntVector(d_dim, 0));
+      computePatchData(patch, d_time, NULL, &tag_data);
+      for (pdat::CellData<double>::Iterator ci(patch.getBox()); ci; ci++) {
+         *(buffer++) = tag_data(*ci);
+      }
+   } else {
+      TBOX_ERROR("Unrecognized name " << variable_name);
+   }
+   return true;
+}
+
+void SinusoidalFrontTagger::setTime(
+   double time)
+{
+   d_time = time;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dlbg/SinusoidalFrontTagger.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dlbg/SinusoidalFrontTagger.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,246 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   SinusoidalFrontTagger class declaration 
+ *
+ ************************************************************************/
+#ifndef included_SinusoidalFrontTagger
+#define included_SinusoidalFrontTagger
+
+#include <string>
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Database.h"
+
+/*
+ * SAMRAI classes
+ */
+#include "SAMRAI/appu/VisItDataWriter.h"
+#include "SAMRAI/appu/VisDerivedDataStrategy.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/mesh/StandardTagAndInitStrategy.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/tbox/Timer.h"
+
+using namespace std;
+using namespace SAMRAI;
+
+/*!
+ * @brief Class to tag a sinusoidal "front" in given domain.
+ */
+class SinusoidalFrontTagger:
+   public mesh::StandardTagAndInitStrategy,
+   public appu::VisDerivedDataStrategy
+{
+
+public:
+   /*!
+    * @brief Constructor.
+    */
+   SinusoidalFrontTagger(
+      /*! Ojbect name */
+      const std::string& object_name,
+      const tbox::Dimension& dim,
+      /*! Input database */
+      SAMRAI::tbox::Database* database = NULL);
+
+   ~SinusoidalFrontTagger();
+
+   //@{ @name SAMRAI::mesh::StandardTagAndInitStrategy virtuals
+
+public:
+   /*!
+    * @brief Allocate and initialize data for a new level
+    * in the patch hierarchy.
+    *
+    * This is where you implement the code for initialize data on the
+    * grid.  Nevermind when it is called or where in the program that
+    * happens.  All the information you need to initialize the grid
+    * are in the arguments.
+    *
+    * @see SAMRAI::mesh::StandardTagAndInitStrategy::initializeLevelData()
+    */
+   virtual void
+   initializeLevelData(
+      /*! Hierarchy to initialize */
+      const tbox::Pointer<SAMRAI::hier::BasePatchHierarchy> hierarchy,
+      /*! Level to initialize */
+      const int level_number,
+      const double init_data_time,
+      const bool can_be_refined,
+      /*! Whether level is being introduced for the first time */
+      const bool initial_time,
+      /*! Level to copy data from */
+      const tbox::Pointer<SAMRAI::hier::BasePatchLevel> old_level =
+         tbox::Pointer<SAMRAI::hier::PatchLevel>((0)),
+      /*! Whether data on new patch needs to be allocated */
+      const bool allocate_data = true);
+
+   virtual void
+   resetHierarchyConfiguration(
+      /*! New hierarchy */
+      tbox::Pointer<SAMRAI::hier::BasePatchHierarchy> new_hierarchy,
+      /*! Coarsest level */ int coarsest_level,
+      /*! Finest level */ int finest_level);
+
+   virtual void
+   applyGradientDetector(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double error_data_time,
+      const int tag_index,
+      const bool initial_time,
+      const bool uses_richardson_extrapolation);
+
+   //@}
+
+   void
+   initializePatchData(
+      hier::Patch& patch,
+      const double init_data_time,
+      const bool initial_time,
+      const bool allocate_data);
+
+   bool
+   packDerivedDataIntoDoubleBuffer(
+      double* buffer,
+      const hier::Patch& patch,
+      const hier::Box& region,
+      const std::string& variable_name,
+      int depth_index) const;
+
+   void
+   setTime(
+      double time);
+
+public:
+   /*!
+    * @brief Deallocate internally managed patch data on level.
+    */
+   void
+   deallocatePatchData(
+      hier::PatchLevel& level);
+
+   /*!
+    * @brief Deallocate internally managed patch data on hierarchy.
+    */
+   void
+   deallocatePatchData(
+      hier::PatchHierarchy& hierarchy);
+
+#ifdef HAVE_HDF5
+   /*!
+    * @brief Tell a VisIt plotter which data to write for this class.
+    */
+   int
+   registerVariablesWithPlotter(
+      appu::VisItDataWriter& writer);
+#endif
+
+   /*
+    * Compute patch data allocated by this class, on a hierarchy.
+    */
+   void
+   computeHierarchyData(
+      hier::PatchHierarchy& hierarchy,
+      double time);
+
+   /*!
+    * @brief Compute distance and tag data for a level.
+    */
+   void
+   computeLevelData(
+      const hier::PatchHierarchy& hierarchy,
+      const int ln,
+      const double time,
+      const int dist_id,
+      const int tag_id,
+      const tbox::Pointer<hier::PatchLevel>& old_level =
+         tbox::Pointer<hier::PatchLevel>()) const;
+
+   /*!
+    * @brief Compute distance and tag data for a patch.
+    */
+   void
+   computePatchData(
+      const hier::Patch& patch,
+      const double time,
+      pdat::NodeData<double>* dist_data,
+      pdat::CellData<int>* tag_data) const;
+
+private:
+   std::string d_name;
+
+   const tbox::Dimension d_dim;
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+
+   /*!
+    * @brief Period of sinusoid.
+    */
+   double d_period;
+
+   /*!
+    * @brief Initial displacement.
+    */
+   double d_init_disp[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   /*!
+    * @brief Front velocity.
+    */
+   double d_velocity[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   /*!
+    * @brief Amplitude of sinusoid.
+    */
+   double d_amplitude;
+
+   /*!
+    * @brief ghost cell width of internal data.
+    *
+    * Optional.  Meant to influence gridding parameters.  Defaults to zero.
+    */
+   hier::IntVector d_ghost_cell_width;
+
+   /*!
+    * @brief Number of cells to tag around cells intersecting the front.
+    */
+   hier::IntVector d_buffer_cells;
+
+   tbox::Array<double> d_buffer_space;
+
+   tbox::Pointer<hier::VariableContext> d_context;
+
+   /*!
+    * @brief Distance from the front in the x direction.
+    */
+   int d_dist_id;
+   /*!
+    * @brief Value of tag based on distance from front.
+    */
+   int d_tag_id;
+
+   /*!
+    * @brief Whether to allocate data on the mesh.
+    */
+   bool d_allocate_data;
+
+   /*!
+    * @brief Front time.
+    */
+   double d_time;
+
+   tbox::Pointer<tbox::Timer> t_setup;
+   tbox::Pointer<tbox::Timer> t_node_pos;
+   tbox::Pointer<tbox::Timer> t_distance;
+   tbox::Pointer<tbox::Timer> t_tag_cells;
+   tbox::Pointer<tbox::Timer> t_copy;
+
+};
+
+#endif  // included_ssup_SinusoidalFrontTagger
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dlbg/get-input-filename.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dlbg/get-input-filename.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,48 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility for getting input file name. 
+ *
+ ************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <string>
+
+#ifndef NAMESPACE_IS_BROKEN
+// using namespace std;
+#endif
+
+#include "get-input-filename.h"
+
+int get_input_filename(
+   int* argc,
+   char* argv[],
+   std::string& input_filename) {
+
+   int rval = 0;
+   std::string argv0(argv[0]);
+   if (*argc > 1) {
+      // Input file is the first argument.  Shift other arguments down.
+      input_filename = argv[1];
+      --(*argc);
+      int i;
+      for (i = 1; i < (*argc); ++i) {
+         argv[i] = argv[i + 1];
+      }
+   } else if (*argc == 1 && argv0.rfind("check-") < argv0.size()) {
+      /*
+       * No argument but input file is implicit in program name
+       * which has the form check-<input file without .input>.
+       */
+      input_filename = argv0.substr(argv0.rfind("check-") + 6) + ".input";
+   } else if (*argc == 1) {
+      // No argument and not invoked as "check-blah".
+      rval = 1;
+   }
+   return rval;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dlbg/get-input-filename.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dlbg/get-input-filename.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,34 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Utility for getting input file name. 
+ *
+ ************************************************************************/
+#include <string>
+
+#ifndef NAMESPACE_IS_BROKEN
+
+#endif
+
+/*!
+ * This function gets the input file name from the argument list.
+ * For most cases, this is simply the first
+ * command-line argument (after the program name).
+ * The variable @c input_filename is set to the filename,
+ * and all arguments following it are shifed down one.
+ * Unless you are a developer, this is all you need to know.
+ *
+ * For the special case with no command-line argument,
+ * if the program is invoked with the name "check-blah",
+ * it assumes the input file is "blah.input".
+ * The purpose of this setup is so that it is compatible with
+ * the automake make-check mechanism, which runs programs without
+ * arguments.  At the same time, an input file can be manually
+ * specified for operational flexibility.
+ *
+ * @return 0 if filename is found, 1 otherwise.
+ */
+int get_input_filename(int* argc, char* argv[], std::string & input_filename);
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dlbg/main.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dlbg/main.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,632 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Test program for asynchronous BR implementation 
+ *
+ ************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <string>
+#include "SAMRAI/SAMRAI_config.h"
+
+/*
+ * Headers for basic SAMRAI objects used in this code.
+ */
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Statistician.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+/*
+ * Headers for major algorithm/data structure objects from SAMRAI
+ */
+#include "SAMRAI/appu/VisItDataWriter.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/hier/GridGeometry.h"
+#include "SAMRAI/hier/Connector.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/mesh/BergerRigoutsos.h"
+#include "SAMRAI/mesh/GriddingAlgorithm.h"
+#include "SAMRAI/mesh/StandardTagAndInitialize.h"
+#include "SAMRAI/mesh/TreeLoadBalancer.h"
+#include "SAMRAI/solv/FACPreconditioner.h"
+#include "DLBGTest.h"
+#include "SAMRAI/xfer/RefineSchedule.h"
+#include "SAMRAI/xfer/CoarsenSchedule.h"
+#include "SAMRAI/hier/OverlapConnectorAlgorithm.h"
+
+#include "get-input-filename.h"
+
+#ifndef LACKS_NAMESPACE
+using namespace SAMRAI;
+using namespace tbox;
+using namespace hier;
+using namespace mesh;
+#endif
+
+static int
+createAndTestDLBG(
+   tbox::Database& main_db,
+   const tbox::Dimension& dim,
+   PatchHierarchy& patch_hierarchy);
+
+int main(
+   int argc,
+   char** argv)
+{
+   std::string input_filename;
+
+   /*
+    * Initialize MPI, process argv, and initialize SAMRAI
+    */
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   if (get_input_filename(&argc, argv, input_filename) == 1) {
+      std::cout << "Usage: " << argv[0]
+      << " <input file>."
+      << std::endl;
+      tbox::SAMRAI_MPI::finalize();
+      return 0;
+   }
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+      tbox::SAMRAI_MPI mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+      tbox::plog << "Input file is " << input_filename << std::endl;
+
+      std::string case_name;
+      if (argc >= 2) {
+         case_name = argv[1];
+      }
+
+      /*
+       * Create input database and parse all data in input file into it.
+       */
+
+      tbox::Pointer<tbox::Database> input_db(new tbox::InputDatabase("input_db"));
+      tbox::InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      /*
+       * Retrieve "GlobalInputs" section of the input database and set
+       * values accordingly.
+       */
+
+      if (input_db->keyExists("GlobalInputs")) {
+         tbox::Pointer<tbox::Database> global_db =
+            input_db->getDatabase("GlobalInputs");
+         if (global_db->keyExists("call_abort_in_serial_instead_of_exit")) {
+            bool flag = global_db->
+               getBool("call_abort_in_serial_instead_of_exit");
+            tbox::SAMRAI_MPI::setCallAbortInSerialInsteadOfExit(flag);
+         }
+      }
+
+      /*
+       * Get the Main database part of the input database.
+       * This database contains information relevant to main.
+       */
+
+      tbox::Pointer<tbox::Database> main_db = input_db->getDatabase("Main");
+
+      const tbox::Dimension dim(static_cast<unsigned short>(main_db->getInteger("dim")));
+      tbox::plog << "Main database:" << endl;
+      main_db->printClassData(tbox::plog);
+
+      int verbose = main_db->getIntegerWithDefault("verbose", 0);
+
+      if (input_db->isDatabase("TimerManager")) {
+         tbox::TimerManager::createManager(input_db->getDatabase("TimerManager"));
+      }
+
+      /*
+       * Base filename info.
+       */
+
+      std::string base_name = main_db->getStringWithDefault("base_name", "fp");
+
+      /*
+       * Modify basename for this particular run.
+       * Add the number of processes and the case name.
+       */
+      if (!case_name.empty()) {
+         base_name = base_name + '-' + case_name;
+      }
+      if (mpi.getSize() > 1) {
+         base_name = base_name + '-'
+            + tbox::Utilities::intToString(mpi.getSize(), 5);
+      }
+      tbox::plog << "Added case name (" << case_name << ") and nprocs ("
+                 << mpi.getSize() << ") to base name -> '"
+                 << base_name << "'\n";
+
+      /*
+       * Set the vis filename, defaults to base_name.
+       */
+      std::string vis_filename =
+         main_db->getStringWithDefault("vis_filename", base_name);
+
+      /*
+       * Log file info.
+       */
+
+      std::string log_filename =
+         main_db->getStringWithDefault("log_filename", base_name + ".log");
+      bool log_all = false;
+      log_all = main_db->getBoolWithDefault("log_all", log_all);
+      if (log_all && mpi.getSize() > 1) {
+         tbox::PIO::logAllNodes(log_filename);
+      } else {
+         tbox::PIO::logOnlyNodeZero(log_filename);
+      }
+
+      if (!case_name.empty()) {
+         tbox::plog << "Added case name (" << case_name << ") and nprocs ("
+                    << mpi.getSize() << ") to base name -> '"
+                    << base_name << "'\n";
+      }
+      tbox::plog << "Running on " << mpi.getSize()
+                 << " processes.\n";
+
+      /*
+       * Choose which BR implementation to use.
+       */
+      char which_br = 'o';
+      which_br = main_db->getCharWithDefault("which_br", which_br);
+      tbox::plog << "which_br is " << which_br << std::endl;
+
+      int ln;
+
+      int plot_step = main_db->getIntegerWithDefault("plot_step", 0);
+
+      /*
+       * Create a patch hierarchy for use later.
+       * This object is a required input for these objects: dlbgtest.
+       */
+      tbox::Pointer<hier::PatchHierarchy> patch_hierarchy;
+      {
+         /*
+          * Create a grid geometry required for the
+          * hier::PatchHierarchy object.
+          */
+         tbox::Pointer<geom::CartesianGridGeometry> grid_geometry(
+            new geom::CartesianGridGeometry(dim,
+               std::string("CartesianGridGeometry"),
+               input_db->getDatabase("CartesianGridGeometry")));
+         tbox::plog << "Grid Geometry:" << std::endl;
+         grid_geometry->printClassData(tbox::plog);
+         patch_hierarchy =
+            new hier::PatchHierarchy("Patch Hierarchy", grid_geometry,
+                                     input_db->getDatabase("PatchHierarchy"));
+      }
+
+      /*
+       * Create the problem-specific object implementing the required
+       * SAMRAI virtual functions.
+       */
+      tbox::plog << "Creating dlbgtest.\n";
+      DLBGTest dlbgtest("DLBGTest",
+                        dim,
+                        patch_hierarchy,
+                        input_db->getDatabase("DLBGTest"));
+
+      tbox::plog << "Creating box generator.\n";
+      tbox::Pointer<mesh::BergerRigoutsos> new_br(
+         new mesh::BergerRigoutsos(dim,
+            input_db->isDatabase("BergerRigoutsos") ?
+            input_db->getDatabase("BergerRigoutsos") :
+            tbox::Pointer<tbox::Database>(NULL)));
+      new_br->setMPI(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+      tbox::Pointer<mesh::BoxGeneratorStrategy> box_generator =
+         tbox::Pointer<mesh::BoxGeneratorStrategy>(new_br);
+      TBOX_ASSERT(!box_generator.isNull());
+
+      tbox::plog << "Creating grid algorithm.\n";
+      tbox::Pointer<mesh::GriddingAlgorithm> gridding_algorithm;
+      {
+         /*
+          * Create the tag-and-initializer, box-generator and load-balancer
+          * object references required by the gridding_algorithm object.
+          */
+         tbox::Pointer<mesh::StandardTagAndInitialize> tag_and_initializer(
+            new mesh::StandardTagAndInitialize(
+               dim,
+               "CellTaggingMethod",
+               tbox::Pointer<mesh::StandardTagAndInitStrategy>(
+                  dlbgtest.getStandardTagAndInitObject(),
+                  false),
+               input_db->getDatabase("StandardTagAndInitialize")
+               ));
+
+         tbox::Pointer<mesh::TreeLoadBalancer> tree_load_balancer(
+            new mesh::TreeLoadBalancer(dim,
+               "load balancer",
+               input_db->getDatabase("TreeLoadBalancer")));
+         tree_load_balancer->setSAMRAI_MPI(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+         tbox::Pointer<mesh::LoadBalanceStrategy> load_balancer =
+            tbox::Pointer<mesh::LoadBalanceStrategy>(tree_load_balancer);
+         TBOX_ASSERT(!load_balancer.isNull());
+
+         /*
+          * Create the gridding algorithm used to generate the SAMR grid
+          * and create the grid.
+          */
+         gridding_algorithm =
+            new mesh::GriddingAlgorithm(
+               patch_hierarchy,
+               "Distributed Gridding Algorithm",
+               input_db->getDatabase("GriddingAlgorithm"),
+               tag_and_initializer,
+               box_generator,
+               load_balancer);
+         tbox::plog << "Gridding algorithm:" << std::endl;
+         gridding_algorithm->printClassData(tbox::plog);
+
+      }
+
+      bool check_dlbg_in_main = false;
+      check_dlbg_in_main = main_db->getBoolWithDefault("check_dlbg_in_main",
+            check_dlbg_in_main);
+
+      bool log_hierarchy = false;
+      log_hierarchy = main_db->getBoolWithDefault("log_hierarchy",
+            log_hierarchy);
+      int num_steps = main_db->getIntegerWithDefault("num_steps", 0);
+
+      /*
+       * After setting up the problem and initializing the object states,
+       * we print the input database and variable database contents
+       * to the log file.
+       */
+      tbox::plog << "\nCheck input data:" << std::endl;
+      tbox::plog << "Input database..." << std::endl;
+      input_db->printClassData(tbox::plog);
+      tbox::plog << "\nVariable database..." << std::endl;
+      hier::VariableDatabase::getDatabase()->printClassData(tbox::plog);
+
+      tbox::Array<int> tag_buffer(10);
+      for (int i = 0; i < tag_buffer.size(); ++i) tag_buffer[i] = 0;
+      if (main_db->isInteger("tag_buffer")) {
+         tag_buffer = main_db->getIntegerArray("tag_buffer");
+      }
+
+      /*
+       * Make the patch levels.
+       */
+
+      tbox::Pointer<tbox::Timer> t_generate_mesh =
+         tbox::TimerManager::getManager()->
+         getTimer("apps::main::generate_mesh");
+      t_generate_mesh->start();
+      gridding_algorithm->makeCoarsestLevel(0.0);
+      bool done = false;
+      for (ln = 0; patch_hierarchy->levelCanBeRefined(ln) && !done; ln++) {
+         tbox::plog << "Adding finer levels with ln = " << ln << std::endl;
+         tbox::Pointer<hier::PatchLevel> level_ =
+            patch_hierarchy->getPatchLevel(ln);
+         gridding_algorithm->makeFinerLevel(
+            /* simulation time */ 0.0,
+            /* whether initial time */ true,
+            /* tag buffer size */ tag_buffer[ln]);
+         tbox::plog << "Just added finer level " << ln << " -> " << ln + 1;
+         if (patch_hierarchy->getNumberOfLevels() < ln + 2) {
+            tbox::plog << " (no new level!)" << std::endl;
+         } else {
+            tbox::Pointer<hier::PatchLevel> finer_level_ =
+               patch_hierarchy->getPatchLevel(ln + 1);
+            tbox::plog
+            << " (" << level_->getGlobalNumberOfPatches()
+            << " -> " << finer_level_->getGlobalNumberOfPatches()
+            << " patches)"
+            << std::endl;
+         }
+         done = !(patch_hierarchy->finerLevelExists(ln));
+
+      }
+      t_generate_mesh->stop();
+
+      if (mpi.getRank() == 0) {
+         tbox::plog << "Hierarchy generated:" << std::endl;
+         patch_hierarchy->recursivePrint(tbox::plog, std::string("    "), 1);
+      }
+      if (log_hierarchy) {
+         tbox::plog << "Hierarchy generated:" << std::endl;
+         patch_hierarchy->recursivePrint(
+            tbox::plog, std::string("H-> "), 2);
+      }
+
+      /*
+       * Write a plot file.
+       */
+      /* Get the output filename. */
+      if (plot_step > 0) {
+#ifdef HAVE_HDF5
+         const std::string visit_filename = vis_filename + ".visit";
+         /* Create the VisIt data writer. */
+         tbox::Pointer<appu::VisItDataWriter> visit_data_writer(
+            new appu::VisItDataWriter(dim, "VisIt Writer", visit_filename));
+         /* Register variables with plotter. */
+         dlbgtest.registerVariablesWithPlotter(visit_data_writer);
+         /* Write the plot file. */
+         visit_data_writer->writePlotData(patch_hierarchy, 0);
+#endif
+      }
+
+      if (check_dlbg_in_main)
+         createAndTestDLBG(*main_db, dim, *patch_hierarchy);
+
+      /*
+       * Adapt the grid.
+       */
+
+      for (int istep = 0; istep < num_steps; ++istep) {
+
+         tbox::plog << "Adaption number " << istep << std::endl;
+         if (verbose > 0 && mpi.getRank() == 0) {
+            tbox::pout << "Adaption number " << istep << std::endl;
+         }
+
+         // Recompute the front-dependent data at next time step.
+         dlbgtest.computeHierarchyData(*patch_hierarchy,
+            double(istep + 1));
+
+         tbox::Array<double>
+            regrid_start_time(patch_hierarchy->getMaxNumberOfLevels());
+         for (int i = 0; i < regrid_start_time.size(); ++i)
+            regrid_start_time[i] = istep;
+
+         gridding_algorithm->regridAllFinerLevels(
+            0,
+            double(istep),
+            tag_buffer,
+            regrid_start_time);
+
+         patch_hierarchy->recursivePrint(tbox::plog, std::string("    "), 1);
+         if (log_hierarchy) {
+            tbox::plog << "Hierarchy adapted:" << std::endl;
+            patch_hierarchy->recursivePrint(
+               tbox::plog, std::string("H-> "), 2);
+         }
+         if (verbose > 5 && mpi.getRank() == 0) {
+            patch_hierarchy->recursivePrint(tbox::pout, std::string("    "), 1);
+            if (log_hierarchy) {
+               tbox::plog << "Hierarchy adapted:" << std::endl;
+               patch_hierarchy->recursivePrint(
+                  tbox::pout, std::string("H-> "), 2);
+            }
+         }
+
+         if (plot_step > 0 && (istep + 1) % plot_step == 0) {
+#ifdef HAVE_HDF5
+            const std::string visit_filename = vis_filename + ".visit";
+            /* Create the VisIt data writer. */
+            tbox::Pointer<appu::VisItDataWriter> visit_data_writer(
+               new appu::VisItDataWriter(dim, "VisIt Writer", visit_filename));
+            /* Register variables with plotter. */
+            dlbgtest.registerVariablesWithPlotter(visit_data_writer);
+            /* Write the plot file. */
+            visit_data_writer->writePlotData(patch_hierarchy, istep + 1);
+#endif
+         }
+
+         if (check_dlbg_in_main)
+            createAndTestDLBG(*main_db, dim, *patch_hierarchy);
+
+      }
+
+      tbox::TimerManager::getManager()->print(tbox::plog);
+
+      tbox::pout << "\nPASSED:  DLBG" << std::endl;
+
+      /*
+       * Exit properly by shutting down services in correct order.
+       */
+      tbox::plog << "\nShutting down..." << std::endl;
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return 0;
+}
+
+static int createAndTestDLBG(
+   tbox::Database& main_db,
+   const tbox::Dimension& dim,
+   PatchHierarchy& patch_hierarchy)
+{
+   /*
+    * Generate the nested-level box-graph.
+    */
+
+   const bool build_cross_edge =
+      main_db.getBoolWithDefault("build_cross_edge", false);
+   const bool build_peer_edge =
+      main_db.getBoolWithDefault("build_peer_edge", false);
+
+   const bool globalize_mapped_box_levels =
+      main_db.getBoolWithDefault("globalize_mapped_box_levels", false);
+
+   const int node_log_detail =
+      main_db.getIntegerWithDefault("node_log_detail", -1);
+   const int edge_log_detail =
+      main_db.getIntegerWithDefault("edge_log_detail", -1);
+
+   pout << "Generating boxgraph in parallel." << std::endl;
+
+   Connector* crse_connectors = NULL;
+   Connector* fine_connectors = NULL;
+   Connector* peer_connectors = NULL;
+
+   int ln;
+
+   tbox::Array<MappedBoxLevel> mapped_box_levels(
+      patch_hierarchy.getNumberOfLevels(), MappedBoxLevel(dim));
+   if (build_peer_edge) {
+      peer_connectors = new Connector[patch_hierarchy.getNumberOfLevels()];
+   }
+   if (build_cross_edge) {
+      crse_connectors = new Connector[patch_hierarchy.getNumberOfLevels()];
+      fine_connectors = new Connector[patch_hierarchy.getNumberOfLevels()];
+   }
+
+   /*
+    * Set the mapped_box_level nodes.
+    */
+   for (ln = 0; ln < patch_hierarchy.getNumberOfLevels(); ++ln) {
+      Pointer<PatchLevel> level_ptr = patch_hierarchy.getPatchLevel(ln);
+      PatchLevel& level = *level_ptr;
+      mapped_box_levels[ln] = *level.getMappedBoxLevel();
+      plog << "****************************************\n";
+      plog << "mapped_box_levels[" << ln << "]:\n";
+      plog << "****************************************\n";
+      mapped_box_levels[ln].recursivePrint(plog, "", node_log_detail);
+      if (globalize_mapped_box_levels) {
+         pout << "Globalizing MappedBoxSet " << ln << ".\n";
+         mapped_box_levels[ln].setParallelState(MappedBoxLevel::GLOBALIZED);
+      }
+      pout << "MappedBoxSet " << ln << " done.\n";
+   }
+
+   /*
+    * Compute the cross edges by searching globalized node mapped_box_levels.
+    */
+   hier::OverlapConnectorAlgorithm oca;
+   if (build_cross_edge) {
+      for (ln = 0; ln < patch_hierarchy.getNumberOfLevels(); ++ln) {
+         Pointer<PatchLevel> level_ptr = patch_hierarchy.getPatchLevel(ln);
+         PatchLevel& level = *level_ptr;
+         if (ln < patch_hierarchy.getNumberOfLevels() - 1) {
+            fine_connectors[ln].initialize(
+               mapped_box_levels[ln],
+               mapped_box_levels[ln + 1],
+               IntVector(dim, 1));
+            oca.findOverlaps(fine_connectors[ln]);
+         }
+         if (ln > 0) {
+            crse_connectors[ln].initialize(
+               mapped_box_levels[ln],
+               mapped_box_levels[ln - 1],
+               level.getRatioToCoarserLevel());
+            oca.findOverlaps(crse_connectors[ln]);
+            if (edge_log_detail >= 0) {
+               plog << "****************************************\n";
+               plog << "fine_connectors[" << ln - 1 << "]:\n";
+               plog << "****************************************\n";
+               fine_connectors[ln - 1].recursivePrint(plog, "", edge_log_detail);
+               plog << "****************************************\n";
+               plog << "crse_connectors[" << ln << "]:\n";
+               plog << "****************************************\n";
+               crse_connectors[ln].recursivePrint(plog, "", edge_log_detail);
+            }
+         }
+      }
+   }
+
+   /*
+    * Compute the peer edges.  Use bridging operation centered on the coarse edge
+    * if available.  Else, search globalized node mapped_box_levels.
+    */
+   if (build_peer_edge) {
+      for (ln = 0; ln < patch_hierarchy.getNumberOfLevels(); ++ln) {
+         peer_connectors[ln].initialize(
+            mapped_box_levels[ln],
+            mapped_box_levels[ln],
+            IntVector(dim, 1));
+         if (build_cross_edge && ln > 0) {
+            // plog << " Bridging for level " << ln << std::endl;
+            oca.bridge(
+               peer_connectors[ln],
+               crse_connectors[ln],
+               fine_connectors[ln - 1],
+               crse_connectors[ln],
+               fine_connectors[ln - 1]);
+         } else {
+            oca.findOverlaps(peer_connectors[ln]);
+         }
+         if (edge_log_detail >= 0) {
+            plog << "****************************************\n";
+            plog << "peer_connectors[" << ln << "]:\n";
+            plog << "****************************************\n";
+            peer_connectors[ln].recursivePrint(plog, "", edge_log_detail);
+         }
+      }
+   }
+
+   /*
+    * Check for accuracy.
+    */
+
+   if (build_cross_edge) {
+      for (ln = 0; ln < patch_hierarchy.getNumberOfLevels() - 1; ++ln) {
+         fine_connectors[ln].assertConsistencyWithBase();
+         plog << "fine_connectors[" << ln
+              << "] passed assertConsistencyWithBase().\n";
+         fine_connectors[ln].assertConsistencyWithHead();
+         plog << "fine_connectors[" << ln
+              << "] passed assertConsistencyWithHead().\n";
+         crse_connectors[ln + 1].assertConsistencyWithBase();
+         plog << "crse_connectors[" << ln + 1
+              << "] passed assertConsistencyWithBase().\n";
+         crse_connectors[ln + 1].assertConsistencyWithHead();
+         plog << "crse_connectors[" << ln + 1
+              << "] passed assertConsistencyWithHead().\n";
+         oca.assertOverlapCorrectness(fine_connectors[ln]);
+         plog << "fine_connectors[" << ln
+              << "] passed assertOverlapCorrectness().\n";
+         oca.assertOverlapCorrectness(crse_connectors[ln + 1]);
+         plog << "crse_connectors[" << ln + 1
+              << "] passed assertOverlapCorrectness().\n";
+      }
+   }
+
+   if (build_peer_edge) {
+      for (ln = 0; ln < patch_hierarchy.getNumberOfLevels(); ++ln) {
+         peer_connectors[ln].assertConsistencyWithBase();
+         plog << "peer_connectors[" << ln
+              << "] passed assertConsistencyWithBase().\n";
+         peer_connectors[ln].assertConsistencyWithHead();
+         plog << "peer_connectors[" << ln
+              << "] passed assertConsistencyWithHead().\n";
+         oca.assertOverlapCorrectness(peer_connectors[ln]);
+         plog << "peer_connectors[" << ln
+              << "] passed assertOverlapCorrectness().\n";
+      }
+   }
+
+   plog
+   << "=====================================================================\n";
+   plog << "PatchHierarchy:\n";
+   plog
+   << "=====================================================================\n";
+   patch_hierarchy.recursivePrint(plog, "", 2);
+
+   mapped_box_levels.clear();
+
+   if (crse_connectors) delete[] crse_connectors;
+   if (fine_connectors) delete[] fine_connectors;
+   if (peer_connectors) delete[] peer_connectors;
+
+   return 0;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dlbg/test_inputs/front.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dlbg/test_inputs/front.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,173 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for DLBG tests.
+ *
+ ************************************************************************/
+
+Main {
+  dim = 2
+  check_dlbg_in_main = FALSE
+  which_br = 'n'
+  base_name = "front2d"
+  log_all = TRUE
+  plot_step = 1
+  check_graph = FALSE
+  // restart_write_dirname = "restart"
+  // time_nlbg_random_rmi = TRUE
+  log_hierarchy = TRUE
+  num_steps = 100
+  // num_steps = 1
+  build_cross_edge = TRUE
+  build_peer_edge = TRUE
+  globalize_node_sets = FALSE
+  node_log_detail = 2
+  edge_log_detail = 3
+  tag_buffer = 1, 1, 1, 1, 1, 1, 1, 1
+  verbose = 0
+}
+
+DLBGTest {
+  sine_tagger {
+    allocate_data = FALSE
+    period = 1
+    amplitude = .3
+    init_disp = -0.42, 0.0
+    // init_disp = 0.50, 0.25
+    velocity = 0.018, 0.005
+  }
+}
+
+
+BergerRigoutsos {
+  log_node_history = FALSE
+  log_cluster_summary = TRUE
+  log_cluster = FALSE
+    // algo_advance_mode: "SYNCHRONOUS", "ADVANCE_SOME", "ROUND_ROBIN" or "ADVANCE_ANY"
+  algo_advance_mode = "ADVANCE_SOME"
+  // algo_advance_mode = "SYNCHRONOUS"
+  // owner_mode: "SINGLE_OWNER", "MOST_OVERLAP" (default), "FEWEST_OWNED", "LEAST_ACTIVE"
+  // owner_mode = "FEWEST_OWNED"
+  owner_mode = "MOST_OVERLAP"
+  // owner_mode = "SINGLE_OWNER"
+  use_level_boxes = FALSE
+  use_private_communicator = TRUE
+  sequentialize_output_indices = FALSE
+  max_box_size = 40, 40
+  barrier_before_cluster = FALSE
+}
+
+
+CartesianGridGeometry {
+  // domain_boxes = [(0,0), (3,3)]
+  // domain_boxes = [(0,0), (15,31)]
+  // domain_boxes = [(0,0), (15,15)], [(1,16), (16,31)]
+  domain_boxes = [(0,0), (7,15)], [(8,-1), (15,14)], [(2,16), (9,31)], [(10,15), (17,30)]
+  x_lo         = 0, 0
+  x_up         = 1, 2
+  periodic_dimension = 0, 0
+}
+
+StandardTagAndInitialize {
+  tagging_method = "GRADIENT_DETECTOR"
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE
+  barrier_before = FALSE
+  barrier_after = FALSE
+  n_root_cycles = -1
+  interlace_groups = FALSE
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'n'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+PatchHierarchy {
+   max_levels = 4
+   proper_nesting_buffer = 2, 2, 2, 2, 2, 2
+   largest_patch_size {
+      // level_0 = 20, 20
+      level_0 = -1, -1
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 4,4
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+      level_3            = 2, 2
+      level_4            = 2, 2
+      level_5            = 2, 2
+      level_6            = 2, 2
+      level_7            = 2, 2
+      level_8            = 2, 2
+      level_9            = 2, 2
+      //  etc.
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+   allow_patches_smaller_than_minimum_size_to_prevent_overlaps = TRUE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = FALSE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.80
+   combine_efficiency = 0.75
+   // write_regrid_boxes = TRUE
+   // read_regrid_boxes = TRUE
+   // regrid_boxes_filename = "grid"
+   check_nonrefined_tags = "WARN"
+   check_overlapping_patches = "WARN"
+   extend_tags_to_bdry = TRUE
+   sequentialize_patch_indices = TRUE
+   barrier_before_regrid = TRUE
+   barrier_before_find_refinement = TRUE
+   barrier_before_cluster = TRUE
+   barrier_before_nest = TRUE
+   barrier_before_limit = TRUE
+   barrier_before_extend = TRUE
+   barrier_before_balance = TRUE
+   barrier_after_find_refinement = TRUE
+   coalesce_boxes = FALSE
+
+   check_overflow_nesting = 'n'
+   check_proper_nesting = 'y'
+   check_connectors = 'n'
+   print_layer_hierarchy = 'n'
+   print_steps = 'n'
+}
+
+
+GlobalInputs{
+   tag_clustering_method = "BINARY_TREE"
+}
+
+
+TimerManager{
+  timer_list = "*::*::*"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+  print_threshold = 0
+  print_summed = TRUE
+  print_max = TRUE
+}
+
+LayerHierarchy {
+   log_actions = 'n'
+   check_input_connectors = 'n'
+   check_output_connectors = 'n'
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dlbg/test_inputs/front.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dlbg/test_inputs/front.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,154 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for DLBG tests.
+ *
+ ************************************************************************/
+
+Main {
+  dim = 3
+  check_dlbg_in_main = FALSE
+  which_br = 'n'
+  base_name = "front3d"
+  log_all = TRUE
+  plot_step = 10
+  check_graph = FALSE
+  // restart_write_dirname = "restart"
+  // time_nlbg_random_rmi = TRUE
+  log_hierarchy = TRUE
+  num_steps = 100
+  build_cross_edge = TRUE
+  build_peer_edge = TRUE
+  globalize_node_sets = FALSE
+  node_log_detail = 2
+  edge_log_detail = 3
+  tag_buffer = 1, 1, 1, 1, 1, 1, 1, 1
+  verbose = 0
+}
+
+DLBGTest {
+  sine_tagger {
+    allocate_data = TRUE
+    period = 1
+    amplitude = .3
+    init_disp = -0.5, 0.0, 0.0
+    velocity = 0.02, 0.005, 0.01
+  }
+}
+
+
+BergerRigoutsos {
+  log_node_history = FALSE
+  log_cluster_summary = TRUE
+  log_cluster = FALSE
+    // algo_advance_mode: "SYNCHRONOUS", "ADVANCE_SOME", "ROUND_ROBIN" or "ADVANCE_ANY"
+  algo_advance_mode = "ADVANCE_SOME"
+  // algo_advance_mode = "SYNCHRONOUS"
+  // owner_mode: "SINGLE_OWNER", "MOST_OVERLAP" (default), "FEWEST_OWNED", "LEAST_ACTIVE"
+  owner_mode = "MOST_OVERLAP"
+  // owner_mode = "SINGLE_OWNER"
+  use_level_boxes = FALSE
+  use_private_communicator = TRUE
+  sequentialize_output_indices = TRUE
+}
+
+
+CartesianGridGeometry {
+  domain_boxes = [(0,0,0), (7,15,15)]
+  // domain_boxes = [(0,0,0), (9,3,3)]
+  x_lo         = 0, 0, 0
+  x_up         = 1, 2, 2
+}
+
+StandardTagAndInitialize {
+  tagging_method = "GRADIENT_DETECTOR"
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE
+  barrier_before = FALSE
+  barrier_after = FALSE
+  n_root_cycles = -1
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'n'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      // level_0 = 16,16,16
+      level_0 = -1, -1, -1 // No upper limit
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 4,4,4
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+      level_3            = 2, 2, 2
+      level_4            = 2, 2, 2
+      level_5            = 2, 2, 2
+      level_6            = 2, 2, 2
+      level_7            = 2, 2, 2
+      level_8            = 2, 2, 2
+      level_9            = 2, 2, 2
+      //  etc.
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+   allow_patches_smaller_than_minimum_size_to_prevent_overlaps = TRUE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   combine_efficiency = 0.88
+   efficiency_tolerance = 0.88
+   // write_regrid_boxes = TRUE
+   // read_regrid_boxes = TRUE
+   // regrid_boxes_filename = "grid"
+   allow_patches_smaller_than_ghostwidth = FALSE
+   check_nonrefined_tags = "WARN"
+   check_overlapping_patches = "WARN"
+   extend_tags_to_bdry = TRUE
+   sequentialize_patch_indices = TRUE
+   coalesce_boxes = FALSE
+
+   check_overflow_nesting = 'n'
+   check_proper_nesting = 'y'
+   check_connectors = 'n'
+   print_layer_hierarchy = 'n'
+   print_steps = 'n'
+}
+
+
+GlobalInputs{
+   tag_clustering_method = "BINARY_TREE"
+}
+
+
+TimerManager{
+  timer_list = "*::*::*"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+  print_threshold = 0
+  print_summed = TRUE
+  print_max = TRUE
+}
+
+LayerHierarchy {
+   log_actions = 'n'
+   check_input_connectors = 'n'
+   check_output_connectors = 'n'
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/dlbg/test_inputs/periodic.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/dlbg/test_inputs/periodic.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,183 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for DLBG tests.
+ *
+ ************************************************************************/
+
+Main {
+  dim = 2
+  check_dlbg_in_main = FALSE
+  which_br = 'n'
+  base_name = "periodic2d"
+  log_all = TRUE
+  plot_step = 1
+  check_graph = FALSE
+  // restart_write_dirname = "restart"
+  // time_nlbg_random_rmi = TRUE
+  log_hierarchy = TRUE
+  num_steps = 100
+  // num_steps = 10
+  build_cross_edge = TRUE
+  build_peer_edge = TRUE
+  globalize_node_sets = FALSE
+  node_log_detail = 2
+  edge_log_detail = 3
+//   tag_buffer = 0, 0, 0, 0, 0, 0, 0, 0
+  verbose = 0
+}
+
+DLBGTest {
+  sine_tagger {
+    allocate_data = FALSE
+    period = 1
+    amplitude = .3
+    init_disp = -0.42, 0.0
+    // init_disp = -0.00, 0.25
+    velocity = 0.018, 0.005
+  }
+}
+
+
+BergerRigoutsos {
+  log_node_history = FALSE
+  log_cluster_summary = TRUE
+  log_cluster = TRUE
+    // algo_advance_mode: "SYNCHRONOUS", "ADVANCE_SOME", "ROUND_ROBIN" or "ADVANCE_ANY"
+  algo_advance_mode = "ADVANCE_SOME"
+  // algo_advance_mode = "SYNCHRONOUS"
+  // owner_mode: "SINGLE_OWNER", "MOST_OVERLAP" (default), "FEWEST_OWNED", "LEAST_ACTIVE"
+  // owner_mode = "FEWEST_OWNED"
+  owner_mode = "MOST_OVERLAP"
+  // owner_mode = "SINGLE_OWNER"
+  use_level_boxes = FALSE
+  use_private_communicator = TRUE
+  sequentialize_output_indices = FALSE
+  max_box_size = 40, 40
+  barrier_before_cluster = FALSE
+}
+
+
+CartesianGridGeometry {
+  // domain_boxes = [(0,0), (3,3)]
+  //
+  // Domain of a single box:
+  domain_boxes = [(0,0), (15,31)]
+  //
+  // Domain of a single box, described as 4 boxes:
+  // domain_boxes = [(0,0), (7,15)], [(8,0), (15,15)], [(0,15), (7,31)], [(7,15), (15,31)]
+  //
+  // Domain with hole in the middle:
+  // domain_boxes = [(0,0), (4,17)], [(5,0), (15,13)], [(11,14), (15,31)], [(0,18), (10,31)]
+
+  periodic_dimension = 1, 1
+  x_lo         = 0, 0
+  x_up         = 1, 2
+}
+
+StandardTagAndInitialize {
+  tagging_method = "GRADIENT_DETECTOR"
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE
+  barrier_before = FALSE
+  barrier_after = FALSE
+  n_root_cycles = -1
+  interlace_groups = FALSE
+  balance_penalty_wt = 0.0
+  surface_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'n'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+PatchHierarchy {
+   max_levels = 4
+   proper_nesting_buffer = 2, 2, 2, 2, 2, 2
+   largest_patch_size {
+      // level_0 = 8, 8
+      level_0 = -1, -1
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 4,4
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+      level_3            = 2, 2
+      level_4            = 2, 2
+      level_5            = 2, 2
+      level_6            = 2, 2
+      level_7            = 2, 2
+      level_8            = 2, 2
+      level_9            = 2, 2
+      //  etc.
+   }
+   allow_patches_smaller_than_ghostwidth = FALSE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = FALSE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.80
+   combine_efficiency = 0.85
+   // write_regrid_boxes = TRUE
+   // read_regrid_boxes = TRUE
+   // regrid_boxes_filename = "grid"
+   check_nonrefined_tags = "WARN"
+   check_overlapping_patches = "WARN"
+   extend_tags_to_bdry = TRUE
+   sequentialize_patch_indices = TRUE
+   barrier_before_regrid = TRUE
+   barrier_before_find_refinement = TRUE
+   barrier_before_cluster = TRUE
+   barrier_before_nest = TRUE
+   barrier_before_limit = TRUE
+   barrier_before_extend = TRUE
+   barrier_before_balance = TRUE
+   barrier_after_find_refinement = TRUE
+   coalesce_boxes = FALSE
+
+   check_overflow_nesting = 'n'
+   check_proper_nesting = 'n'
+   check_connectors = 'n'
+   print_layer_hierarchy = 'n'
+   print_steps = 'y'
+}
+
+
+GlobalInputs{
+   tag_clustering_method = "BINARY_TREE"
+}
+
+
+TimerManager{
+  timer_list = "*::*::*"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+  print_threshold = 0
+  print_summed = TRUE
+  print_max = TRUE
+}
+
+LayerHierarchy {
+   log_actions = 'n'
+   check_input_connectors = 'n'
+   check_output_connectors = 'n'
+}
+
+OverlapConnectorUtil {
+   print_bridge_steps = 'n'
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/emb_bdry/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/emb_bdry/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,517 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=SampleApp.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryNode.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/CubesPatchInterface.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/CutCell.h				\
+	$(INCLUDE_SAM)/SAMRAI/appu/ElevenPatchInterface.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/EmbeddedBoundaryDefines.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/EmbeddedBoundaryGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/EmbeddedBoundaryShape.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h SampleApp.C	\
+	SampleApp.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=main.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryNode.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/CubesPatchInterface.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/CutCell.h				\
+	$(INCLUDE_SAM)/SAMRAI/appu/ElevenPatchInterface.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/EmbeddedBoundaryDefines.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/EmbeddedBoundaryGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/EmbeddedBoundaryShape.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BergerRigoutsos.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h SampleApp.h	\
+	main.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/emb_bdry/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/emb_bdry/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,93 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for embedded boundary sample application 
+##
+#########################################################################
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/test/emb_bdry
+VPATH         = @srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+OBJECT        = ../../..
+
+include $(OBJECT)/config/Makefile.config
+
+CPPFLAGS_EXTRA= -DNDIM=$(PDIM) -DTESTING=1
+
+NUM_TESTS = 4
+
+TEST_NPROCS = @TEST_NPROCS@
+
+CXX_OBJS      = main.o SampleApp.o
+F2D_OBJS      = fortran2d.o
+F3D_OBJS      = fortran3d.o
+
+main2d:
+	if test -f stamp-3d; then $(MAKE) clean-check ; fi
+	touch stamp-2d
+	$(MAKE) PDIM=2 main-2d
+
+main-2d:	$(CXX_OBJS) $(F2D_OBJS) $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) $(F2D_OBJS) \
+	$(LIBSAMRAI2D) $(LIBSAMRAI) $(LDLIBS) -o main2d
+
+main3d:
+	if test -f stamp-2d; then $(MAKE) clean-check ; fi
+	touch stamp-3d
+	$(MAKE) PDIM=3 main-3d
+
+main-3d:	$(CXX_OBJS) $(F3D_OBJS) $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) $(F3D_OBJS) \
+	$(LIBSAMRAI3D) $(LIBSAMRAI) $(LDLIBS) -o main3d
+
+check:
+	$(MAKE) check2d
+	$(MAKE) check3d
+
+
+check2d:	main2d
+	@for i in test_inputs/*2d*.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main2d $${i};	\
+	done
+
+check3d:	main3d
+	@for i in test_inputs/*3d*.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main3d $${i};	\
+	done
+
+checktest:
+	rm -f makecheck.logfile
+	$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+	$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+	rm -f makecheck.logfile
+
+clean-check:
+	$(SAMCLEAN)
+
+redo:
+	$(RM) main2d main3d
+
+clean:		clean-check
+	$(RM) *.f *main* core.*
+
+include $(SRCDIR)/Makefile.depend
+
+FORTRAN         = $(SRCDIR)
+M4DIRS          = -DFORTDIR=$(FORTRAN) $(SAMRAI_M4_FLAGS)
+
+fortran2d.o:	$(FORTRAN)/fortran2d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/fortran2d.m4 > fortran2d.f
+	$(F77) $(FFLAGS) -c fortran2d.f -o $@
+
+fortran3d.o:	$(FORTRAN)/fortran3d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/fortran3d.m4 > fortran3d.f
+	$(F77) $(FFLAGS) -c fortran3d.f -o $@
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/emb_bdry/SampleApp.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/emb_bdry/SampleApp.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,491 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Class to manage functions for QM calculations. 
+ *
+ ************************************************************************/
+
+#include "SampleApp.h"
+
+/*
+ * Header files for SAMRAI library classes
+ */
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/IndexData.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/xfer/RefineSchedule.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+/*
+ * Fortran function(s) used, if fortran is desired.
+ */
+extern "C" {
+#if (NDIM == 2)
+void F77_FUNC(tagcells, TAGCELLS) (const int &, const int &, // ifirst0, ilast0
+   const int &, const int &,               // ifirst1, ilast1
+   const int &, const int &,               // fgh0, fgh1
+   const int &, const int &,               // tgh0, tgh1
+   const int &,                            // flag value to tag
+   const int &,                            // tag_value
+   const int *,                            // flag
+   int *);                                 // tags
+#endif
+#if (NDIM == 3)
+void F77_FUNC(tagcells, TAGCELLS) (const int &, const int &, // ifirst0, ilast0
+   const int &, const int &,               // ifirst1, ilast1
+   const int &, const int &,               // ifirst2, ilast2
+   const int &, const int &, const int &,             // fgh0, fgh1, fgh2
+   const int &, const int &, const int &,             // tgh0, tgh1, tgh2
+   const int &,                            // cut_cell_tag
+   const int &,                            // tag_value
+   const int *,                            // flag
+   int *);                                 // tags
+#endif
+}
+
+using namespace pdat;
+using namespace geom;
+using namespace xfer;
+
+/*************************************************************************
+ *
+ * Constructor and Destructor for SampleApp class.
+ *
+ ************************************************************************/
+
+SampleApp::SampleApp(
+   const string& object_name,
+   Pointer<Database> input_db,
+   Pointer<CartesianGridGeometry> grid_geom,
+   Pointer<EmbeddedBoundaryGeometry> eb_geom,
+   Pointer<VisItDataWriter> viz_writer)
+{
+   d_object_name = object_name;
+   d_eb_geom = eb_geom;
+
+   /*
+    * Read in input values
+    */
+   getFromInput(input_db);
+
+   /*
+    * Create variable(s)
+    */
+   VariableDatabase* variable_db = VariableDatabase::getDatabase();
+
+   Pointer<CellVariable<int> > mark_var =
+      new CellVariable<int>("mark", 1);
+
+   Pointer<VariableContext> cur_cxt = variable_db->getContext("CURRENT");
+   IntVector<NDIM> zero_ghosts(0);
+   d_mark_id = variable_db->registerVariableAndContext(mark_var,
+         cur_cxt,
+         zero_ghosts);
+
+   viz_writer->registerPlotQuantity("MARK", "SCALAR", d_mark_id);
+
+#ifdef USE_NONUNIFORM_LB
+   Pointer<CellVariable<double> > weight_var =
+      new CellVariable<double>("weight", 1);
+   IntVector<NDIM> one_ghost(0);
+   d_weight_id = variable_db->registerVariableAndContext(weight_var,
+         cur_cxt,
+         one_ghost);
+
+   viz_writer->registerPlotQuantity("WEIGHT", "SCALAR", d_weight_id);
+#else
+   d_weight_id = -1;
+#endif
+
+   /*
+    * Create RefineAlgorithm used for regridding
+    */
+   d_fill_new_level = new RefineAlgorithm();
+
+   Pointer<RefineOperator<NDIM> > int_refine_op =
+      grid_geom->lookupRefineOperator(mark_var, "CONSTANT_REFINE");
+
+   d_fill_new_level->registerRefine(d_mark_id, // dst
+      d_mark_id,                               // src
+      d_mark_id,                               // scratch
+      int_refine_op);
+
+}
+
+SampleApp::~SampleApp()
+{
+}
+
+int SampleApp::getWorkloadIndex() const
+{
+   return d_weight_id;
+}
+
+void SampleApp::setMarkerOnPatch(
+   const Pointer<Patch>& patch,
+   const double time,
+   const bool initial_time)
+{
+   Pointer<CellData<int> > mark = patch->getPatchData(d_mark_id);
+
+   if (initial_time) {
+      mark->fillAll(0);
+   }
+
+   // Patch lower, upper indices, dx
+   const Pointer<CartesianPatchGeometry> patch_geom =
+      patch->getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+   const double* xlo = patch_geom->getXLower();
+   const Index ifirst = patch->getBox().lower();
+   const Index ilast = patch->getBox().upper();
+
+   double xyz[NDIM];
+   int loc_i, i;
+   double centroid[NDIM], radius, cell_rad_squared;
+   for (i = 0; i < NDIM; i++) {
+      centroid[i] = 0.;
+      xyz[i] = 0.;
+   }
+
+   Box pbox = patch->getBox();
+   for (CellIterator ib(pbox); ib; ib++) {
+
+      // determine centroid of cell
+      for (i = 0; i < NDIM; i++) {
+         loc_i = ib() (i) - ifirst(i);
+         xyz[i] = xlo[i] + ((double)(loc_i) + 0.5) * dx[i];
+      }
+
+      // Determine centroid/radius of moving,growing sphere
+      radius = d_radius + time * d_radius_growth_rate;
+      for (i = 0; i < NDIM; i++) {
+         centroid[i] = d_centroid[i] + time * d_centroid_velocity[i];
+      }
+
+      // see if cell_centroid falls in sphere
+      cell_rad_squared = 0.;
+      for (i = 0; i < NDIM; i++) {
+         cell_rad_squared += (xyz[i] - centroid[i]) * (xyz[i] - centroid[i]);
+      }
+      if (((radius * radius) - cell_rad_squared) > 0.) {
+         (*mark)(ib()) = 1;
+      }
+   }
+
+}
+
+void SampleApp::setWeightOnPatch(
+   const Pointer<Patch>& patch,
+   const double time,
+   const bool initial_time)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(d_weight_id >= 0);
+#endif
+
+   if (!patch->checkAllocated(d_weight_id)) {
+      patch->allocatePatchData(d_weight_id);
+   }
+   Pointer<CellData<double> > weight = patch->getPatchData(d_weight_id);
+
+   // Initiallly, all cells have weight = 1
+   weight->fillAll(1.0);
+
+   // Loop through cut cells on patch and assign weights.  Based on timings,
+   // cut cells take about 116.7 times longer to compute than regular cells,
+   // so thats the weight we use.
+   int eb_index = d_eb_geom->getIndexCutCellDataId();
+   if (patch->checkAllocated(eb_index)) {
+      Pointer<IndexData<NDIM, CutCell, pdat::CellGeometry> > eboundary =
+         patch->getPatchData(eb_index);
+
+      for (IndexData<NDIM, CutCell, pdat::CellGeometry>::Iterator cc(*eboundary);
+           cc;
+           cc++) {
+         Index ind = cc().getIndex();
+         CellIndex cind(ind);
+         Box box(ind, ind);
+         if (!box.intersects(weight->getGhostBox())) {
+            TBOX_ERROR("ouch");
+         }
+         (*weight)(cind) = 116.7;
+         //(*weight)(cind) = 1.;
+      }
+   }
+
+}
+
+void SampleApp::tagCellsOnPatch(
+   const Pointer<Patch>& patch,
+   const double time,
+   const int tag_index,
+   const bool initial_time)
+{
+   int flag_index = d_eb_geom->getCellFlagDataId();
+   Pointer<CellData<int> > tags = patch->getPatchData(tag_index);
+   Pointer<CellData<int> > flag = patch->getPatchData(flag_index);
+
+   tags->fillAll(0);
+   Box pbox = patch->getBox();
+
+   const Index ifirst = patch->getBox().lower();
+   const Index ilast = patch->getBox().upper();
+
+   IntVector<NDIM> tgh = tags->getGhostCellWidth();
+   IntVector<NDIM> fgh = flag->getGhostCellWidth();
+
+   /****************************************************************
+    * Tag cells that are CUT
+    ***************************************************************/
+
+   if (d_tag_cut_cells) {
+
+      int cut_cell_tag = EmbeddedBoundaryDefines::CUT;
+      int tag_value = 1;
+
+      F77_FUNC(tagcells, TAGCELLS) (ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+#if (NDIM == 3)
+         ifirst(2), ilast(2),
+#endif
+         fgh(0), fgh(1),
+#if (NDIM == 3)
+         fgh(2),
+#endif
+         tgh(0), tgh(1),
+#if (NDIM == 3)
+         tgh(2),
+#endif
+         cut_cell_tag,
+         tag_value,
+         flag->getPointer(),
+         tags->getPointer());
+   }
+
+   /****************************************************************
+    * If desired, tag around directed sphere
+    ***************************************************************/
+
+   if (d_tag_growing_sphere) {
+
+      Pointer<CellData<int> > mark = patch->getPatchData(d_mark_id);
+
+      IntVector<NDIM> mgh = mark->getGhostCellWidth();
+
+      int mark_tag = 1;
+      int tag_value = 1;
+
+      F77_FUNC(tagcells, TAGCELLS) (ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+#if (NDIM == 3)
+         ifirst(2), ilast(2),
+#endif
+         mgh(0), mgh(1),
+#if (NDIM == 3)
+         mgh(2),
+#endif
+         tgh(0), tgh(1),
+#if (NDIM == 3)
+         tgh(2),
+#endif
+         mark_tag,
+         tag_value,
+         mark->getPointer(),
+         tags->getPointer());
+
+   } // if d_tag_growing_sphere
+
+}
+
+void SampleApp::printBoundaryNodeData(
+   const Pointer<PatchLevel>& level,
+   const Pointer<EmbeddedBoundaryGeometry>& eb_geom)
+{
+
+   // loop over patches on level
+   for (PatchLevel::Iterator ip(level); ip; ip++) {
+      Pointer<Patch> patch = level->getPatch(ip());
+
+      // Pointers to eb_geometry cell, node flag data.
+      Pointer<CellData<int> > cell_flag =
+         patch->getPatchData(eb_geom->getCellFlagDataId());
+      Pointer<NodeData<int> > node_flag =
+         patch->getPatchData(eb_geom->getNodeInsideOutsideDataId());
+
+      Pointer<IndexData<NDIM, CutCell, pdat::CellGeometry> > eboundary =
+         patch->getPatchData(eb_geom->getIndexCutCellDataId());
+
+      Index ij;
+      for (IndexData<NDIM, CutCell, pdat::CellGeometry>::Iterator cc(*eboundary);
+           cc;
+           cc++) {
+
+         ij = cc().getIndex();
+         // print boundary node information for this cut cell
+         if (appu::CutCell::boundaryNodesEnabled()) {
+            cc().printBoundaryNodes(pout);
+
+#if 0
+            int num_bdry_nodes = cc().getNumberOfBoundaryNodes();
+            const double* front_centroid = cc().getFrontCentroid();
+            const double exposed_cut_surf_area = cc().getFrontArea();
+
+            // Loop thru boundary nodes of cut cell.
+            for (j = 0; j < num_bdry_nodes; j++) {
+               BoundaryNode bn = cc().getBoundaryNode(j);
+
+               NodeIndex bdry_node = bn.getIndex();
+            }
+#endif
+         }
+
+      } // loop over cut cells
+
+   } // loop over patches
+}
+
+#ifdef SGS
+void SampleApp::initializeLevelData(
+   const Pointer<BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const double time,
+   const bool can_be_refined,
+   const bool initial_time,
+   const Pointer<BasePatchLevel> old_level,
+   const bool allocate_data)
+#endif
+
+void SampleApp::initializeLevelData(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const double init_data_time,
+   const bool can_be_refined,
+   const bool initial_time,
+   const tbox::Pointer<hier::BasePatchLevel> old_level,
+   const tbox::Pointer<hier::Connector>& to_old_mapped_box_level,
+   const tbox::Pointer<hier::Connector>& from_old_mapped_box_level,
+   const bool allocate_data)
+{
+   Pointer<PatchHierarchy> reg_hierarchy = hierarchy;
+
+   Pointer<PatchLevel> level =
+      hierarchy->getPatchLevel(level_number);
+
+   /*
+    * Allocate storage for local vars.
+    */
+   if (allocate_data) {
+      level->allocatePatchData(d_mark_id, init_data_time);
+   } else {
+      level->setTime(init_data_time, d_mark_id);
+   }
+
+   /*
+    * Create schedules and fill marker and weight data on new level
+    */
+   if ((level_number > 0) || (!old_level.isNull())) {
+
+#ifdef SGS
+      Pointer<RefineSchedule> sched =
+         d_fill_new_level->createSchedule(level,
+            old_level,
+            level_number - 1,
+            hierarchy,
+            NULL);
+#endif
+
+      Pointer<RefineSchedule> sched =
+         d_fill_new_level->createSchedule(level,
+            old_level,
+            level_number - 1,
+            hierarchy,
+            NULL);
+
+      sched->fillData(init_data_time);
+   }
+
+   /*
+    * Set the marker on the new level
+    */
+   if (d_tag_growing_sphere) {
+
+      for (PatchLevel::Iterator ip(level); ip; ip++) {
+         Pointer<Patch> patch = level->getPatch(ip());
+         setMarkerOnPatch(patch, init_data_time, initial_time);
+      }
+
+   }
+
+#ifdef USE_NONUNIFORM_LB
+   /*
+    * Set the weight on the new level
+    */
+   for (PatchLevel::Iterator ip(level); ip; ip++) {
+      Pointer<Patch> patch = level->getPatch(ip());
+      setWeightOnPatch(patch, init_data_time, initial_time);
+   }
+#endif
+
+}
+
+void SampleApp::resetHierarchyConfiguration(
+   const Pointer<BasePatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level)
+{
+   (void)hierarchy;
+   (void)coarsest_level;
+   (void)finest_level;
+}
+
+void SampleApp::applyGradientDetector(
+   const Pointer<BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const double time,
+   const int tag_index,
+   const bool initial_time,
+   const bool uses_richardson_extrapolation_too)
+{
+   Pointer<PatchLevel> level = hierarchy->getPatchLevel(level_number);
+   for (PatchLevel::Iterator ip(level); ip; ip++) {
+      Pointer<Patch> patch = level->getPatch(ip());
+
+      tagCellsOnPatch(patch, time, tag_index, initial_time);
+
+   } // loop over patches
+}
+
+void
+SampleApp::getFromInput(
+   tbox::Pointer<tbox::Database> db)
+{
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   d_tag_cut_cells =
+      db->getBoolWithDefault("tag_cut_cells", false);
+
+   d_tag_growing_sphere =
+      db->getBoolWithDefault("tag_growing_sphere", false);
+
+   if (d_tag_growing_sphere) {
+      d_centroid = db->getDoubleArray("centroid");
+      d_centroid_velocity = db->getDoubleArray("centroid_velocity");
+      d_radius = db->getDouble("radius");
+      d_radius_growth_rate = db->getDouble("radius_growth_rate");
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/emb_bdry/SampleApp.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/emb_bdry/SampleApp.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,180 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Class to manage functions for QM calculations. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+/*
+ * Header files for SAMRAI classes referenced in this class.
+ */
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/appu/EmbeddedBoundaryGeometry.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/xfer/RefineAlgorithm.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/mesh/StandardTagAndInitStrategy.h"
+
+using namespace std;
+using namespace SAMRAI;
+using namespace appu;
+using namespace tbox;
+using namespace mesh;
+using namespace geom;
+using namespace xfer;
+using namespace hier;
+
+/**
+ * This class provides basic level initialization and boundary condtions
+ * for a simple application code.  It is intended to mimic a real app code
+ * for tests with the EmbeddedBoundaryGeometry classes.
+ */
+
+class SampleApp:
+   public StandardTagAndInitStrategy
+{
+public:
+   /**
+    * Default constructor for SampleApp.
+    */
+   SampleApp(
+      const string& object_name,
+      Pointer<Database> input_db,
+      Pointer<CartesianGridGeometry> grid_geom,
+      Pointer<EmbeddedBoundaryGeometry> eb_geom,
+      Pointer<VisItDataWriter> viz_writer);
+
+   /**
+    * Empty destructor for SampleApp.
+    */
+   virtual ~SampleApp();
+
+   /**
+    * Returns workload index for nonuniform load balance.
+    */
+   int
+   getWorkloadIndex() const;
+
+   /*
+    * Outputs boundary node information.
+    */
+   void
+   printBoundaryNodeData(
+      const Pointer<PatchLevel>& level,
+      const Pointer<EmbeddedBoundaryGeometry>& eb_geom);
+
+   /**
+    * Initialize data on level.
+    */
+   virtual void
+   initializeLevelData(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double init_data_time,
+      const bool can_be_refined,
+      const bool initial_time,
+      const tbox::Pointer<hier::BasePatchLevel> old_level =
+         tbox::Pointer<hier::BasePatchLevel>(NULL),
+      const tbox::Pointer<hier::Connector>& to_old_mapped_box_level =
+         tbox::Pointer<hier::Connector>(NULL),
+      const tbox::Pointer<hier::Connector>& from_old_mapped_box_level =
+         tbox::Pointer<hier::Connector>(NULL),
+      const bool allocate_data = true);
+
+   /**
+    * Reset hierarchy after regrid.
+    */
+   virtual void
+   resetHierarchyConfiguration(
+      const Pointer<BasePatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level);
+
+   /**
+    * Tag cells for refinement using gradient detector.
+    */
+   void
+   applyGradientDetector(
+      const Pointer<BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double time,
+      const int tag_index,
+      const bool initial_time,
+      const bool uses_richardson_extrapolation_too);
+
+   /**
+    * Sets the "mark" variable used to identify where to place refinement
+    * (called by initializeLevelData).
+    */
+   void
+   setMarkerOnPatch(
+      const Pointer<Patch>& patch,
+      const double time,
+      const bool initial_time);
+
+   /**
+    * Sets the "weight" variable used to assign workload weights on patch
+    * cells (called by initializeLevelData).
+    */
+   void
+   setWeightOnPatch(
+      const Pointer<Patch>& patch,
+      const double time,
+      const bool initial_time);
+
+   /**
+    * Tags cells on a patch (called by gradient detector).
+    */
+   void
+   tagCellsOnPatch(
+      const Pointer<Patch>& patch,
+      const double time,
+      const int tag_index,
+      const bool initial_time);
+private:
+   /*
+    * Reads in input parameters from the specified database.
+    */
+   void
+   getFromInput(
+      Pointer<Database> database);
+
+   /*
+    * Object name
+    */
+   string d_object_name;
+
+   /*
+    * RefineAlgorithm used in regridding
+    */
+   Pointer<RefineAlgorithm> d_fill_new_level;
+
+   /*
+    * Pointer to EmbeddedBoundaryGeometry object.
+    */
+   Pointer<EmbeddedBoundaryGeometry> d_eb_geom;
+
+   /*
+    * Local data
+    */
+   int d_mark_id;
+   int d_weight_id;
+
+   /*
+    * Tagging criteria
+    */
+   bool d_tag_growing_sphere;
+   bool d_tag_cut_cells;
+   Array<double> d_centroid;
+   Array<double> d_centroid_velocity;
+   double d_radius;
+   double d_radius_growth_rate;
+
+};
diff -r 000000000000 -r 5eda1a3f24e8 source/test/emb_bdry/cubes/simple-box/box1.tri
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/emb_bdry/cubes/simple-box/box1.tri	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,22 @@
+8 12 
+0. 0. 0.
+1. 0. 0.
+1. 1. 0.
+0. 1. 0.
+0. 0. .81 
+1. 0. .81
+1. 1. .81
+0. 1. .81
+1 2 6
+1 6 5
+2 3 6
+3 7 6
+4 7 3
+4 8 7
+5 4 1
+8 4 5
+6 7 8
+6 8 5
+2 4 3
+4 2 1
+1 1 1 1 1 1 1 1 1 1 1 1
diff -r 000000000000 -r 5eda1a3f24e8 source/test/emb_bdry/cubes/simple-box/cubes-test.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/emb_bdry/cubes/simple-box/cubes-test.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,95 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file to test SAMRAI-Cubes interface 
+ *
+ ************************************************************************/
+
+Main {
+
+   log_file_name            = "cubes-test.log"
+
+   visit_dump_interval        = 1      
+   visit_dump_dirname         = "viz_cubestest"
+
+}
+
+EmbeddedBoundaryGeometry {
+
+    CubesPatchInterface {
+       surface_tri_file = "box1.tri"
+       max_levels       = 5
+       verbose          = TRUE
+    }
+
+}
+
+SampleApp {
+   tag_growing_sphere   = FALSE
+   tag_cut_cells        = TRUE
+
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (5,5,5) ]   // coarse mesh
+   x_lo          = 0.31 , 0.3001, -0.36 // lower end of computational domain.
+   x_up          = 2.301 , 3.043 , 2.797979 // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 3 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 , 2
+      level_2               = 2 , 2 , 2
+      level_3               = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 6 , 6 , 6 
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 , 1
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize{
+   tagging_method = "GRADIENT_DETECTOR"
+//   tagging_method = "REFINE_BOXES"
+//   RefineBoxes {
+//      level_0  = [ (10,10) , (80,80) ]
+//   }
+}
+
+TimerManager {
+   timer_list = "apps::main::*"
+}
+
+
+UniformLoadBalance {  // for SAMRAI v1.3.1
+//   processors         = 1 , 1
+   use_spatial_bin_pack = TRUE
+}
+LoadBalancer {  // for SAMRAI v1.3.2
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/emb_bdry/cubes/simple-box/input.c3d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/emb_bdry/cubes/simple-box/input.c3d	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,58 @@
+"  _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
+  /                                                                     \
+  |                                                                     |
+  |           Cartesian Mesh Generation Input Specifications            |
+  |                                                                     |
+  \_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _/ 
+"
+1. Surface Geometry File Name (Cart3d surface triangulation file format):
+   box1.tri
+
+2. Outer Cartesian Box Specs:
+      Xmin     Xmax            Ymin    Ymax            Zmin     Zmax
+      .31       2.301            .3001  3.043             -.36      2.797979
+//      .255    .801       .33     3.92         .3    .833
+//      -1.255     3.01       -1.33      3.32         -1.3    3.33
+//   -3.01       3.01       -3.3      3.32         -1.3   6.3 bombs
+
+3. Starting Mesh Dimensions (# of nodes in each dimension, inclusive): 
+   # verts in X    # verts in Y     # verts in Z  
+         7             7              7
+//         3             3              3
+//       19              19              19   
+//    uniform mesh AR = 1 cells. 
+
+4. Maximum Hex Cell Aspect Ratio ( Isotropic = 1):
+        1
+
+5. Minimum Number of cell refinements on body surface (auto = -1):
+        0
+// let cubes do this automatically
+
+6. Maximum Number of cell refinements:
+        0
+
+7. Num of bits of resolution assigned to integer coordinates (maximum = 21):
+        21
+
+8. Bounday conditions (ONLY requried if converting mesh to tiger format):
+       LoX HiX  LoY  HiY  LoZ HiZ
+        1   0   0    0     0   0
+        
+------------------------------------------------------------------------
+** NOTES: 
+  o add comments after each entry but before next line. additional lines
+    may be added with out messing up the parsing. 
+
+  #1: Surface tri  with no internal geometry: output from "intersect"
+  #4: max diff in num of refinements of 2 directions. cell AR=2^N
+  #7: Dont touch this unless you're sure you konw what you're doing.
+  #8: boundary conditions on the mesh (applied boundary by boundary
+      (only apply if mesh will be converted to TIGER format). 
+        FAR_FIELD              0          Boundary Condition Types;   
+	SYMMETRY               1        
+        INFLOW                 2      // not implemented in 'cart2tiger'
+        OUTFLOW                3      // not implemented in 'cart2tiger'
+        OTHER_WALL             4      // not implemented in 'cart2tiger'
+        OTHER                  5      // not implemented in 'cart2tiger'
+------------------------------------------------------------------------
diff -r 000000000000 -r 5eda1a3f24e8 source/test/emb_bdry/cubes/slc/cubes-test.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/emb_bdry/cubes/slc/cubes-test.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file to test SAMRAI-Cubes interface 
+ *
+ ************************************************************************/
+
+Main {
+
+   time       = 0.0
+   dt         = 0.1
+   nsteps     = 5
+
+   tag_buffer = 1
+
+   log_file_name            = "slc-test.log"
+
+   visit_dump_interval        = 1      
+   visit_dump_dirname         = "viz_slc"
+
+}
+
+SampleApp {
+   tag_growing_sphere   = TRUE 
+   tag_cut_cells        = FALSE
+   centroid             = 6000., 7200., 5.
+   centroid_velocity    = 50., 30. , 1.
+   radius               = 20.
+   radius_growth_rate   = 10.
+}
+
+
+EmbeddedBoundaryGeometry {
+
+    CubesPatchInterface {
+       surface_tri_file = "slc-rev.tri"
+       max_levels       = 5
+       verbose          = TRUE
+    }
+
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (48,28,28) ]   // coarse mesh
+   x_lo          = 5656.01 , 7000.001 , 0.10001 // lower end of computational domain.
+   x_up          = 7015.e0 , 8000.e0 , 200.e0 // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 5 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 , 2
+      level_2               = 2 , 2 , 2
+      level_3               = 2 , 2 , 2
+      level_4               = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+//      level_0 = 199 , 199 , 199
+      level_0 = 19 , 19 , 19
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 4 , 4 , 4
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.90e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.95e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize{
+   tagging_method = "GRADIENT_DETECTOR"
+//   tagging_method = "REFINE_BOXES"
+//   RefineBoxes {
+//      level_0  = [ (10,10) , (80,80) ]
+//   }
+}
+
+TimerManager {
+   timer_list = "apps::main::*",
+                "appu::*::*"
+}
+
+
+UniformLoadBalance {  // for SAMRAI v1.3.1
+//   processors         = 1 , 1
+   use_spatial_bin_pack = TRUE
+}
+LoadBalancer {  // for SAMRAI v1.3.2
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/emb_bdry/cubes/slc/input.c3d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/emb_bdry/cubes/slc/input.c3d	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,36 @@
+ ********* LATHE generated CUBES input file ********* 
+
+
+1. Surface Geometry File Name:
+slc-rev.tri
+
+
+2. Outer Cartesian Box Specs:
+      Xmin     Xmax            Ymin    Ymax            Zmin     Zmax
+     5656.01     7015.           7000.001   8000.           0.10001      200.00
+
+
+3. Starting Mesh Dimensions (# of nodes in each dimension, inclusive):
+# verts in X    # verts in Y     # verts in Z
+50               30           30 
+
+
+4. Maximum Hex Cell Aspect Ratio ( Isotropic = 1):
+     1
+
+
+5. Minimum Number of cell refinements on body surface (auto = -1):
+    4
+
+
+6. Maximum Number of cell refinements:
+    5
+
+
+7. Num of bits of resolution assigned to integer coordinates (maximum = 21):
+   21
+
+
+8. Bounday conditions (ONLY requried if converting mesh to tiger format):
+     LoX HiX  LoY  HiY  LoZ HiZ
+     0   0   0    0     0   0
diff -r 000000000000 -r 5eda1a3f24e8 source/test/emb_bdry/cubes/slc/slc-rev.tri
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/emb_bdry/cubes/slc/slc-rev.tri	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,21133 @@
+ 4228  8452
+    0.56440000E+04    0.70575000E+04    0.00000000E+00
+    0.70280000E+04    0.70575000E+04    0.00000000E+00
+    0.70280000E+04    0.79555000E+04    0.00000000E+00
+    0.56440000E+04    0.79555000E+04    0.00000000E+00
+    0.63710000E+04    0.76980000E+04    0.43555599E+02
+    0.63710000E+04    0.77300000E+04    0.43555599E+02
+    0.64390000E+04    0.77300000E+04    0.43555599E+02
+    0.64390000E+04    0.77120000E+04    0.43555599E+02
+    0.64030000E+04    0.77120000E+04    0.43555599E+02
+    0.64030000E+04    0.77050000E+04    0.43555599E+02
+    0.63870000E+04    0.77050000E+04    0.43555599E+02
+    0.63870000E+04    0.76980000E+04    0.43555599E+02
+    0.62380000E+04    0.77220000E+04    0.21306499E+02
+    0.62780000E+04    0.77220000E+04    0.21306499E+02
+    0.62780000E+04    0.76890000E+04    0.21306499E+02
+    0.62380000E+04    0.76890000E+04    0.21306499E+02
+    0.61730000E+04    0.76900000E+04    0.23845200E+02
+    0.61480000E+04    0.76900000E+04    0.23845200E+02
+    0.61480000E+04    0.76910000E+04    0.23845200E+02
+    0.61360000E+04    0.76910000E+04    0.23845200E+02
+    0.61360000E+04    0.77000000E+04    0.23845200E+02
+    0.61310000E+04    0.77000000E+04    0.23845200E+02
+    0.61310000E+04    0.77210000E+04    0.23845200E+02
+    0.61600000E+04    0.77210000E+04    0.23845200E+02
+    0.61600000E+04    0.77280000E+04    0.23845200E+02
+    0.61810000E+04    0.77280000E+04    0.23845200E+02
+    0.61810000E+04    0.77160000E+04    0.23845200E+02
+    0.61930000E+04    0.77160000E+04    0.23845200E+02
+    0.61930000E+04    0.76900000E+04    0.23845200E+02
+    0.62920000E+04    0.77220000E+04    0.20640900E+02
+    0.63330000E+04    0.77220000E+04    0.20640900E+02
+    0.63330000E+04    0.76890000E+04    0.20640900E+02
+    0.62920000E+04    0.76890000E+04    0.20640900E+02
+    0.60280000E+04    0.76820000E+04    0.13893400E+02
+    0.60280000E+04    0.76940000E+04    0.13893400E+02
+    0.59950000E+04    0.76940000E+04    0.13893400E+02
+    0.59950000E+04    0.77310000E+04    0.13893400E+02
+    0.60870000E+04    0.77310000E+04    0.13893400E+02
+    0.60870000E+04    0.77120000E+04    0.13893400E+02
+    0.60780000E+04    0.77120000E+04    0.13893400E+02
+    0.60780000E+04    0.76820000E+04    0.13893400E+02
+    0.66090000E+04    0.76780000E+04    0.30000000E+01
+    0.66260000E+04    0.76780000E+04    0.30000000E+01
+    0.66260000E+04    0.76680000E+04    0.30000000E+01
+    0.66090000E+04    0.76680000E+04    0.30000000E+01
+    0.65230000E+04    0.76560000E+04    0.57002701E+02
+    0.65060000E+04    0.76560000E+04    0.57002701E+02
+    0.65060000E+04    0.76600000E+04    0.57002701E+02
+    0.64780000E+04    0.76600000E+04    0.57002701E+02
+    0.64780000E+04    0.76870000E+04    0.57002701E+02
+    0.64760000E+04    0.76870000E+04    0.57002701E+02
+    0.64760000E+04    0.77100000E+04    0.57002701E+02
+    0.64830000E+04    0.77100000E+04    0.57002701E+02
+    0.64830000E+04    0.77180000E+04    0.57002701E+02
+    0.64880000E+04    0.77180000E+04    0.57002701E+02
+    0.64990000E+04    0.77270000E+04    0.57002701E+02
+    0.64990000E+04    0.77310000E+04    0.57002701E+02
+    0.65230000E+04    0.77310000E+04    0.57002701E+02
+    0.65230000E+04    0.77120000E+04    0.57002701E+02
+    0.65300000E+04    0.77120000E+04    0.57002701E+02
+    0.65300000E+04    0.76940000E+04    0.57002701E+02
+    0.65230000E+04    0.76940000E+04    0.57002701E+02
+    0.59950000E+04    0.76400000E+04    0.91637001E+01
+    0.59950000E+04    0.76670000E+04    0.91637001E+01
+    0.60730000E+04    0.76670000E+04    0.91637001E+01
+    0.60730000E+04    0.76400000E+04    0.91637001E+01
+    0.61480000E+04    0.76400000E+04    0.11682000E+02
+    0.60970000E+04    0.76400000E+04    0.11682000E+02
+    0.60970000E+04    0.76750000E+04    0.11682000E+02
+    0.61200000E+04    0.76750000E+04    0.11682000E+02
+    0.61200000E+04    0.76760000E+04    0.11682000E+02
+    0.61480000E+04    0.76760000E+04    0.11682000E+02
+    0.61480000E+04    0.76560000E+04    0.11682000E+02
+    0.61530000E+04    0.76390000E+04    0.42729998E+01
+    0.61530000E+04    0.76700000E+04    0.42729998E+01
+    0.61600000E+04    0.76700000E+04    0.42729998E+01
+    0.61600000E+04    0.76770000E+04    0.42729998E+01
+    0.61720000E+04    0.76770000E+04    0.42729998E+01
+    0.61720000E+04    0.76780000E+04    0.42729998E+01
+    0.61950000E+04    0.76780000E+04    0.42729998E+01
+    0.61950000E+04    0.76390000E+04    0.42729998E+01
+    0.63160000E+04    0.76460000E+04    0.20453400E+02
+    0.63160000E+04    0.76650000E+04    0.20453400E+02
+    0.63160000E+04    0.76740000E+04    0.20453400E+02
+    0.63500000E+04    0.76740000E+04    0.20453400E+02
+    0.63500000E+04    0.76540000E+04    0.20453400E+02
+    0.63370000E+04    0.76540000E+04    0.20453400E+02
+    0.63370000E+04    0.76370000E+04    0.20453400E+02
+    0.63260000E+04    0.76370000E+04    0.20453400E+02
+    0.63260000E+04    0.76350000E+04    0.20453400E+02
+    0.63160000E+04    0.76350000E+04    0.20453400E+02
+    0.66480000E+04    0.77250000E+04    0.29400299E+02
+    0.66820000E+04    0.77250000E+04    0.29400299E+02
+    0.66820000E+04    0.76120000E+04    0.29400299E+02
+    0.66480000E+04    0.76120000E+04    0.29400299E+02
+    0.62350000E+04    0.76160000E+04    0.26249399E+02
+    0.62350000E+04    0.76430000E+04    0.26249399E+02
+    0.62460000E+04    0.76430000E+04    0.26249399E+02
+    0.62460000E+04    0.76550000E+04    0.26249399E+02
+    0.62490000E+04    0.76550000E+04    0.26249399E+02
+    0.62490000E+04    0.76790000E+04    0.26249399E+02
+    0.62770000E+04    0.76790000E+04    0.26249399E+02
+    0.62770000E+04    0.76730000E+04    0.26249399E+02
+    0.62840000E+04    0.76730000E+04    0.26249399E+02
+    0.62840000E+04    0.76800000E+04    0.26249399E+02
+    0.63050000E+04    0.76800000E+04    0.26249399E+02
+    0.63050000E+04    0.76250000E+04    0.26249399E+02
+    0.63040000E+04    0.76250000E+04    0.26249399E+02
+    0.63040000E+04    0.76070000E+04    0.26249399E+02
+    0.62720000E+04    0.76070000E+04    0.26249399E+02
+    0.62720000E+04    0.75980000E+04    0.26249399E+02
+    0.62470000E+04    0.75980000E+04    0.26249399E+02
+    0.62470000E+04    0.76160000E+04    0.26249399E+02
+    0.62820000E+04    0.75960000E+04    0.61429000E+01
+    0.63040000E+04    0.75960000E+04    0.61429000E+01
+    0.63040000E+04    0.75920000E+04    0.61429000E+01
+    0.62820000E+04    0.75920000E+04    0.61429000E+01
+    0.60730000E+04    0.75820000E+04    0.53643999E+01
+    0.60730000E+04    0.76190000E+04    0.53643999E+01
+    0.60940000E+04    0.76190000E+04    0.53643999E+01
+    0.60940000E+04    0.75950000E+04    0.53643999E+01
+    0.61090000E+04    0.75950000E+04    0.53643999E+01
+    0.61090000E+04    0.75840000E+04    0.53643999E+01
+    0.60940000E+04    0.75840000E+04    0.53643999E+01
+    0.60940000E+04    0.75820000E+04    0.53643999E+01
+    0.60330000E+04    0.75800000E+04    0.92503996E+01
+    0.60330000E+04    0.76120000E+04    0.92503996E+01
+    0.60330000E+04    0.76200000E+04    0.92503996E+01
+    0.60510000E+04    0.76200000E+04    0.92503996E+01
+    0.60510000E+04    0.76070000E+04    0.92503996E+01
+    0.60470000E+04    0.76070000E+04    0.92503996E+01
+    0.60470000E+04    0.76010000E+04    0.92503996E+01
+    0.60510000E+04    0.76010000E+04    0.92503996E+01
+    0.60510000E+04    0.75800000E+04    0.92503996E+01
+    0.62360000E+04    0.75680000E+04    0.40000000E+01
+    0.62490000E+04    0.75680000E+04    0.40000000E+01
+    0.62490000E+04    0.75560000E+04    0.40000000E+01
+    0.62360000E+04    0.75560000E+04    0.40000000E+01
+    0.59930000E+04    0.75680000E+04    0.65932999E+01
+    0.60170000E+04    0.75680000E+04    0.65932999E+01
+    0.60170000E+04    0.75290000E+04    0.65932999E+01
+    0.59930000E+04    0.75290000E+04    0.65932999E+01
+    0.60290000E+04    0.75280000E+04    0.11608800E+02
+    0.60290000E+04    0.75710000E+04    0.11608800E+02
+    0.60760000E+04    0.75710000E+04    0.11608800E+02
+    0.60760000E+04    0.75720000E+04    0.11608800E+02
+    0.60980000E+04    0.75720000E+04    0.11608800E+02
+    0.60980000E+04    0.75760000E+04    0.11608800E+02
+    0.61130000E+04    0.75760000E+04    0.11608800E+02
+    0.61130000E+04    0.75280000E+04    0.11608800E+02
+    0.62820000E+04    0.75290000E+04    0.24962400E+02
+    0.62820000E+04    0.75300000E+04    0.24962400E+02
+    0.62360000E+04    0.75300000E+04    0.24962400E+02
+    0.62360000E+04    0.75550000E+04    0.24962400E+02
+    0.62820000E+04    0.75550000E+04    0.24962400E+02
+    0.62820000E+04    0.75730000E+04    0.24962400E+02
+    0.63070000E+04    0.75730000E+04    0.24962400E+02
+    0.63070000E+04    0.75290000E+04    0.24962400E+02
+    0.61380000E+04    0.75880000E+04    0.11511500E+02
+    0.61380000E+04    0.76200000E+04    0.11511500E+02
+    0.61850000E+04    0.76200000E+04    0.11511500E+02
+    0.61850000E+04    0.75880000E+04    0.11511500E+02
+    0.63190000E+04    0.75380000E+04    0.58837601E+02
+    0.63190000E+04    0.75330000E+04    0.58837601E+02
+    0.63120000E+04    0.75330000E+04    0.58837601E+02
+    0.63120000E+04    0.75500000E+04    0.58837601E+02
+    0.63230000E+04    0.75500000E+04    0.58837601E+02
+    0.63230000E+04    0.75580000E+04    0.58837601E+02
+    0.63430000E+04    0.75580000E+04    0.58837601E+02
+    0.63430000E+04    0.75880000E+04    0.58837601E+02
+    0.63240000E+04    0.75880000E+04    0.58837601E+02
+    0.63240000E+04    0.76170000E+04    0.58837601E+02
+    0.63740000E+04    0.76170000E+04    0.58837601E+02
+    0.63740000E+04    0.75760000E+04    0.58837601E+02
+    0.63750000E+04    0.75760000E+04    0.58837601E+02
+    0.63750000E+04    0.75600000E+04    0.58837601E+02
+    0.63770000E+04    0.75600000E+04    0.58837601E+02
+    0.63770000E+04    0.75250000E+04    0.58837601E+02
+    0.63270000E+04    0.75250000E+04    0.58837601E+02
+    0.63270000E+04    0.75380000E+04    0.58837601E+02
+    0.63840000E+04    0.75250000E+04    0.13400600E+02
+    0.63840000E+04    0.75520000E+04    0.13400600E+02
+    0.63930000E+04    0.75520000E+04    0.13400600E+02
+    0.63930000E+04    0.75690000E+04    0.13400600E+02
+    0.63870000E+04    0.75690000E+04    0.13400600E+02
+    0.63870000E+04    0.75770000E+04    0.13400600E+02
+    0.63900000E+04    0.75770000E+04    0.13400600E+02
+    0.63900000E+04    0.76320000E+04    0.13400600E+02
+    0.63830000E+04    0.76320000E+04    0.13400600E+02
+    0.63830000E+04    0.76640000E+04    0.13400600E+02
+    0.63900000E+04    0.76640000E+04    0.13400600E+02
+    0.63900000E+04    0.76750000E+04    0.13400600E+02
+    0.63960000E+04    0.76750000E+04    0.13400600E+02
+    0.63960000E+04    0.76920000E+04    0.13400600E+02
+    0.64140000E+04    0.76920000E+04    0.13400600E+02
+    0.64230000E+04    0.77000000E+04    0.13400600E+02
+    0.64370000E+04    0.77000000E+04    0.13400600E+02
+    0.64370000E+04    0.75560000E+04    0.13400600E+02
+    0.64240000E+04    0.75560000E+04    0.13400600E+02
+    0.64240000E+04    0.75520000E+04    0.13400600E+02
+    0.64370000E+04    0.75520000E+04    0.13400600E+02
+    0.64370000E+04    0.75250000E+04    0.13400600E+02
+    0.65340000E+04    0.75240000E+04    0.17967400E+02
+    0.65340000E+04    0.75790000E+04    0.17967400E+02
+    0.65510000E+04    0.75790000E+04    0.17967400E+02
+    0.65510000E+04    0.75880000E+04    0.17967400E+02
+    0.66120000E+04    0.75880000E+04    0.17967400E+02
+    0.66120000E+04    0.75790000E+04    0.17967400E+02
+    0.66330000E+04    0.75790000E+04    0.17967400E+02
+    0.66330000E+04    0.75240000E+04    0.17967400E+02
+    0.66490000E+04    0.75370000E+04    0.13373600E+02
+    0.66590000E+04    0.75370000E+04    0.13373600E+02
+    0.66590000E+04    0.75550000E+04    0.13373600E+02
+    0.66540000E+04    0.75550000E+04    0.13373600E+02
+    0.66540000E+04    0.75680000E+04    0.13373600E+02
+    0.66770000E+04    0.75680000E+04    0.13373600E+02
+    0.66770000E+04    0.75240000E+04    0.13373600E+02
+    0.66490000E+04    0.75240000E+04    0.13373600E+02
+    0.62340000E+04    0.74870000E+04    0.53274999E+01
+    0.62800000E+04    0.74870000E+04    0.53274999E+01
+    0.62800000E+04    0.74630000E+04    0.53274999E+01
+    0.62340000E+04    0.74630000E+04    0.53274999E+01
+    0.60020000E+04    0.74810000E+04    0.44731998E+01
+    0.60020000E+04    0.74880000E+04    0.44731998E+01
+    0.60300000E+04    0.74880000E+04    0.44731998E+01
+    0.60300000E+04    0.74620000E+04    0.44731998E+01
+    0.59920000E+04    0.74620000E+04    0.44731998E+01
+    0.59920000E+04    0.74810000E+04    0.44731998E+01
+    0.63340000E+04    0.74360000E+04    0.14619700E+02
+    0.63340000E+04    0.74430000E+04    0.14619700E+02
+    0.63280000E+04    0.74430000E+04    0.14619700E+02
+    0.63280000E+04    0.74620000E+04    0.14619700E+02
+    0.63130000E+04    0.74620000E+04    0.14619700E+02
+    0.63130000E+04    0.74860000E+04    0.14619700E+02
+    0.63540000E+04    0.74860000E+04    0.14619700E+02
+    0.63540000E+04    0.74360000E+04    0.14619700E+02
+    0.64310000E+04    0.74360000E+04    0.50467800E+02
+    0.63880000E+04    0.74360000E+04    0.50467800E+02
+    0.63880000E+04    0.74740000E+04    0.50467800E+02
+    0.63770000E+04    0.74740000E+04    0.50467800E+02
+    0.63770000E+04    0.74850000E+04    0.50467800E+02
+    0.63890000E+04    0.74850000E+04    0.50467800E+02
+    0.63890000E+04    0.74820000E+04    0.50467800E+02
+    0.64310000E+04    0.74820000E+04    0.50467800E+02
+    0.61540000E+04    0.74330000E+04    0.84476004E+01
+    0.61540000E+04    0.74240000E+04    0.84476004E+01
+    0.61690000E+04    0.74240000E+04    0.84476004E+01
+    0.61690000E+04    0.74160000E+04    0.84476004E+01
+    0.61450000E+04    0.74160000E+04    0.84476004E+01
+    0.61450000E+04    0.74330000E+04    0.84476004E+01
+    0.62830000E+04    0.74190000E+04    0.41591001E+01
+    0.62960000E+04    0.74190000E+04    0.41591001E+01
+    0.62960000E+04    0.74090000E+04    0.41591001E+01
+    0.62830000E+04    0.74090000E+04    0.41591001E+01
+    0.62930000E+04    0.74030000E+04    0.11602600E+02
+    0.63020000E+04    0.74170000E+04    0.11602600E+02
+    0.63330000E+04    0.74170000E+04    0.11602600E+02
+    0.63330000E+04    0.73960000E+04    0.11602600E+02
+    0.63000000E+04    0.73960000E+04    0.11602600E+02
+    0.63000000E+04    0.74030000E+04    0.11602600E+02
+    0.63860000E+04    0.74150000E+04    0.76950002E+01
+    0.64350000E+04    0.74150000E+04    0.76950002E+01
+    0.64350000E+04    0.73950000E+04    0.76950002E+01
+    0.63860000E+04    0.73950000E+04    0.76950002E+01
+    0.60920000E+04    0.73930000E+04    0.20737499E+02
+    0.60850000E+04    0.73930000E+04    0.20737499E+02
+    0.60850000E+04    0.74000000E+04    0.20737499E+02
+    0.60880000E+04    0.74000000E+04    0.20737499E+02
+    0.60880000E+04    0.73960000E+04    0.20737499E+02
+    0.60930000E+04    0.73960000E+04    0.20737499E+02
+    0.60930000E+04    0.74880000E+04    0.20737499E+02
+    0.61240000E+04    0.74880000E+04    0.20737499E+02
+    0.61240000E+04    0.74790000E+04    0.20737499E+02
+    0.61190000E+04    0.74790000E+04    0.20737499E+02
+    0.61190000E+04    0.74750000E+04    0.20737499E+02
+    0.61250000E+04    0.74750000E+04    0.20737499E+02
+    0.61250000E+04    0.74650000E+04    0.20737499E+02
+    0.61090000E+04    0.74650000E+04    0.20737499E+02
+    0.61090000E+04    0.73880000E+04    0.20737499E+02
+    0.60920000E+04    0.73880000E+04    0.20737499E+02
+    0.60310000E+04    0.74430000E+04    0.24611001E+01
+    0.60310000E+04    0.74240000E+04    0.24611001E+01
+    0.60280000E+04    0.74240000E+04    0.24611001E+01
+    0.60280000E+04    0.73840000E+04    0.24611001E+01
+    0.60220000E+04    0.73840000E+04    0.24611001E+01
+    0.60220000E+04    0.74430000E+04    0.24611001E+01
+    0.65190000E+04    0.74870000E+04    0.19800100E+02
+    0.65190000E+04    0.74540000E+04    0.19800100E+02
+    0.65070000E+04    0.74540000E+04    0.19800100E+02
+    0.65070000E+04    0.74430000E+04    0.19800100E+02
+    0.65170000E+04    0.74430000E+04    0.19800100E+02
+    0.65170000E+04    0.74180000E+04    0.19800100E+02
+    0.65230000E+04    0.74180000E+04    0.19800100E+02
+    0.65230000E+04    0.74080000E+04    0.19800100E+02
+    0.65180000E+04    0.74080000E+04    0.19800100E+02
+    0.65180000E+04    0.73820000E+04    0.19800100E+02
+    0.65140000E+04    0.73820000E+04    0.19800100E+02
+    0.65140000E+04    0.73780000E+04    0.19800100E+02
+    0.65230000E+04    0.73780000E+04    0.19800100E+02
+    0.65230000E+04    0.73570000E+04    0.19800100E+02
+    0.64750000E+04    0.73570000E+04    0.19800100E+02
+    0.64750000E+04    0.74870000E+04    0.19800100E+02
+    0.65640000E+04    0.73840000E+04    0.10077300E+02
+    0.65420000E+04    0.73840000E+04    0.10077300E+02
+    0.65420000E+04    0.73890000E+04    0.10077300E+02
+    0.65370000E+04    0.73890000E+04    0.10077300E+02
+    0.65370000E+04    0.74540000E+04    0.10077300E+02
+    0.65310000E+04    0.74540000E+04    0.10077300E+02
+    0.65310000E+04    0.74620000E+04    0.10077300E+02
+    0.65310000E+04    0.74670000E+04    0.10077300E+02
+    0.65280000E+04    0.74670000E+04    0.10077300E+02
+    0.65280000E+04    0.74840000E+04    0.10077300E+02
+    0.65430000E+04    0.74840000E+04    0.10077300E+02
+    0.65430000E+04    0.74740000E+04    0.10077300E+02
+    0.65490000E+04    0.74740000E+04    0.10077300E+02
+    0.65490000E+04    0.74840000E+04    0.10077300E+02
+    0.66090000E+04    0.74840000E+04    0.10077300E+02
+    0.66090000E+04    0.74100000E+04    0.10077300E+02
+    0.65940000E+04    0.74100000E+04    0.10077300E+02
+    0.65940000E+04    0.73810000E+04    0.10077300E+02
+    0.65930000E+04    0.73810000E+04    0.10077300E+02
+    0.65930000E+04    0.73820000E+04    0.10077300E+02
+    0.65860000E+04    0.73820000E+04    0.10077300E+02
+    0.65860000E+04    0.73570000E+04    0.10077300E+02
+    0.65640000E+04    0.73570000E+04    0.10077300E+02
+    0.66410000E+04    0.74160000E+04    0.19451900E+02
+    0.66130000E+04    0.74160000E+04    0.19451900E+02
+    0.66130000E+04    0.74830000E+04    0.19451900E+02
+    0.66770000E+04    0.74830000E+04    0.19451900E+02
+    0.66770000E+04    0.73930000E+04    0.19451900E+02
+    0.66760000E+04    0.73820000E+04    0.19451900E+02
+    0.66760000E+04    0.73560000E+04    0.19451900E+02
+    0.66410000E+04    0.73560000E+04    0.19451900E+02
+    0.62350000E+04    0.73620000E+04    0.46296000E+01
+    0.62480000E+04    0.73620000E+04    0.46296000E+01
+    0.62480000E+04    0.73510000E+04    0.46296000E+01
+    0.62350000E+04    0.73510000E+04    0.46296000E+01
+    0.62520000E+04    0.73640000E+04    0.40416999E+01
+    0.62670000E+04    0.73640000E+04    0.40416999E+01
+    0.62670000E+04    0.73500000E+04    0.40416999E+01
+    0.62520000E+04    0.73500000E+04    0.40416999E+01
+    0.63340000E+04    0.73750000E+04    0.17218599E+02
+    0.63490000E+04    0.73750000E+04    0.17218599E+02
+    0.63490000E+04    0.73410000E+04    0.17218599E+02
+    0.63340000E+04    0.73410000E+04    0.17218599E+02
+    0.60420000E+04    0.73520000E+04    0.62500000E+01
+    0.60550000E+04    0.73520000E+04    0.62500000E+01
+    0.60550000E+04    0.73380000E+04    0.62500000E+01
+    0.60420000E+04    0.73380000E+04    0.62500000E+01
+    0.60020000E+04    0.73480000E+04    0.32692001E+01
+    0.60300000E+04    0.73480000E+04    0.32692001E+01
+    0.60300000E+04    0.73360000E+04    0.32692001E+01
+    0.60020000E+04    0.73360000E+04    0.32692001E+01
+    0.62340000E+04    0.73350000E+04    0.19722000E+01
+    0.62620000E+04    0.73350000E+04    0.19722000E+01
+    0.62620000E+04    0.73290000E+04    0.19722000E+01
+    0.62340000E+04    0.73290000E+04    0.19722000E+01
+    0.63630000E+04    0.73360000E+04    0.34500000E+01
+    0.63760000E+04    0.73360000E+04    0.34500000E+01
+    0.63760000E+04    0.73290000E+04    0.34500000E+01
+    0.63630000E+04    0.73290000E+04    0.34500000E+01
+    0.62340000E+04    0.73220000E+04    0.20208001E+01
+    0.62600000E+04    0.73220000E+04    0.20208001E+01
+    0.62600000E+04    0.73160000E+04    0.20208001E+01
+    0.62340000E+04    0.73160000E+04    0.20208001E+01
+    0.61530000E+04    0.73570000E+04    0.43105001E+01
+    0.61530000E+04    0.74050000E+04    0.43105001E+01
+    0.62020000E+04    0.74050000E+04    0.43105001E+01
+    0.62020000E+04    0.73790000E+04    0.43105001E+01
+    0.62020000E+04    0.73570000E+04    0.43105001E+01
+    0.63710000E+04    0.73140000E+04    0.40000000E+01
+    0.63760000E+04    0.73140000E+04    0.40000000E+01
+    0.63760000E+04    0.72940000E+04    0.40000000E+01
+    0.63710000E+04    0.72940000E+04    0.40000000E+01
+    0.61440000E+04    0.73040000E+04    0.69000001E+01
+    0.61550000E+04    0.73040000E+04    0.69000001E+01
+    0.61550000E+04    0.72930000E+04    0.69000001E+01
+    0.61440000E+04    0.72930000E+04    0.69000001E+01
+    0.60800000E+04    0.73400000E+04    0.10311100E+02
+    0.60820000E+04    0.73400000E+04    0.10311100E+02
+    0.60820000E+04    0.73510000E+04    0.10311100E+02
+    0.60600000E+04    0.73510000E+04    0.10311100E+02
+    0.60600000E+04    0.73550000E+04    0.10311100E+02
+    0.60460000E+04    0.73550000E+04    0.10311100E+02
+    0.60460000E+04    0.73650000E+04    0.10311100E+02
+    0.61050000E+04    0.73650000E+04    0.10311100E+02
+    0.61050000E+04    0.73550000E+04    0.10311100E+02
+    0.61000000E+04    0.73550000E+04    0.10311100E+02
+    0.61000000E+04    0.73340000E+04    0.10311100E+02
+    0.61120000E+04    0.73340000E+04    0.10311100E+02
+    0.61120000E+04    0.73230000E+04    0.10311100E+02
+    0.60990000E+04    0.73230000E+04    0.10311100E+02
+    0.60990000E+04    0.73040000E+04    0.10311100E+02
+    0.61050000E+04    0.73040000E+04    0.10311100E+02
+    0.61050000E+04    0.72930000E+04    0.10311100E+02
+    0.60800000E+04    0.72930000E+04    0.10311100E+02
+    0.63770000E+04    0.73740000E+04    0.18084999E+02
+    0.64320000E+04    0.73740000E+04    0.18084999E+02
+    0.64320000E+04    0.72910000E+04    0.18084999E+02
+    0.63770000E+04    0.72910000E+04    0.18084999E+02
+    0.59900000E+04    0.73080000E+04    0.49008999E+01
+    0.60260000E+04    0.73080000E+04    0.49008999E+01
+    0.60260000E+04    0.72870000E+04    0.49008999E+01
+    0.59900000E+04    0.72870000E+04    0.49008999E+01
+    0.60600000E+04    0.72870000E+04    0.41282001E+01
+    0.60600000E+04    0.73050000E+04    0.41282001E+01
+    0.60670000E+04    0.73130000E+04    0.41282001E+01
+    0.60720000E+04    0.73130000E+04    0.41282001E+01
+    0.60720000E+04    0.72870000E+04    0.41282001E+01
+    0.62580000E+04    0.72840000E+04    0.80868998E+01
+    0.62580000E+04    0.72880000E+04    0.80868998E+01
+    0.62330000E+04    0.72880000E+04    0.80868998E+01
+    0.62330000E+04    0.73150000E+04    0.80868998E+01
+    0.62710000E+04    0.73150000E+04    0.80868998E+01
+    0.62710000E+04    0.73090000E+04    0.80868998E+01
+    0.62800000E+04    0.73090000E+04    0.80868998E+01
+    0.62800000E+04    0.73160000E+04    0.80868998E+01
+    0.62870000E+04    0.73160000E+04    0.80868998E+01
+    0.62870000E+04    0.73300000E+04    0.80868998E+01
+    0.63060000E+04    0.73300000E+04    0.80868998E+01
+    0.63060000E+04    0.73270000E+04    0.80868998E+01
+    0.63200000E+04    0.73270000E+04    0.80868998E+01
+    0.63200000E+04    0.73140000E+04    0.80868998E+01
+    0.63060000E+04    0.73140000E+04    0.80868998E+01
+    0.63060000E+04    0.72840000E+04    0.80868998E+01
+    0.64720000E+04    0.72830000E+04    0.28794500E+02
+    0.64720000E+04    0.73420000E+04    0.28794500E+02
+    0.65220000E+04    0.73420000E+04    0.28794500E+02
+    0.65220000E+04    0.73190000E+04    0.28794500E+02
+    0.65030000E+04    0.73190000E+04    0.28794500E+02
+    0.65030000E+04    0.73140000E+04    0.28794500E+02
+    0.65210000E+04    0.73140000E+04    0.28794500E+02
+    0.65210000E+04    0.72950000E+04    0.28794500E+02
+    0.65250000E+04    0.72950000E+04    0.28794500E+02
+    0.65250000E+04    0.72830000E+04    0.28794500E+02
+    0.65460000E+04    0.72970000E+04    0.15295200E+02
+    0.65510000E+04    0.72970000E+04    0.15295200E+02
+    0.65510000E+04    0.73030000E+04    0.15295200E+02
+    0.65460000E+04    0.73030000E+04    0.15295200E+02
+    0.65410000E+04    0.73030000E+04    0.15295200E+02
+    0.65410000E+04    0.72990000E+04    0.15295200E+02
+    0.65300000E+04    0.72990000E+04    0.15295200E+02
+    0.65300000E+04    0.73050000E+04    0.15295200E+02
+    0.65250000E+04    0.73050000E+04    0.15295200E+02
+    0.65250000E+04    0.73210000E+04    0.15295200E+02
+    0.65430000E+04    0.73210000E+04    0.15295200E+02
+    0.65430000E+04    0.73400000E+04    0.15295200E+02
+    0.65660000E+04    0.73400000E+04    0.15295200E+02
+    0.65660000E+04    0.72820000E+04    0.15295200E+02
+    0.65460000E+04    0.72820000E+04    0.15295200E+02
+    0.65850000E+04    0.73070000E+04    0.72311001E+01
+    0.66450000E+04    0.73070000E+04    0.72311001E+01
+    0.66450000E+04    0.72820000E+04    0.72311001E+01
+    0.65850000E+04    0.72820000E+04    0.72311001E+01
+    0.66490000E+04    0.72990000E+04    0.69106998E+01
+    0.66510000E+04    0.72990000E+04    0.69106998E+01
+    0.66510000E+04    0.73110000E+04    0.69106998E+01
+    0.65860000E+04    0.73110000E+04    0.69106998E+01
+    0.65860000E+04    0.73360000E+04    0.69106998E+01
+    0.65920000E+04    0.73360000E+04    0.69106998E+01
+    0.65920000E+04    0.73370000E+04    0.69106998E+01
+    0.66750000E+04    0.73370000E+04    0.69106998E+01
+    0.66750000E+04    0.72830000E+04    0.69106998E+01
+    0.66640000E+04    0.72830000E+04    0.69106998E+01
+    0.66640000E+04    0.72820000E+04    0.69106998E+01
+    0.66490000E+04    0.72820000E+04    0.69106998E+01
+    0.65950000E+04    0.76530000E+04    0.76271000E+01
+    0.66030000E+04    0.76530000E+04    0.76271000E+01
+    0.66030000E+04    0.76310000E+04    0.76271000E+01
+    0.65780000E+04    0.76310000E+04    0.76271000E+01
+    0.65770000E+04    0.76530000E+04    0.76271000E+01
+    0.65870000E+04    0.76600000E+04    0.76271000E+01
+    0.65950000E+04    0.76600000E+04    0.76271000E+01
+    0.63360000E+04    0.70575000E+04    0.00000000E+00
+    0.70280000E+04    0.75065000E+04    0.00000000E+00
+    0.63360000E+04    0.79555000E+04    0.00000000E+00
+    0.56440000E+04    0.75065000E+04    0.00000000E+00
+    0.64050000E+04    0.77300000E+04    0.43555599E+02
+    0.64210000E+04    0.77120000E+04    0.43555599E+02
+    0.62620000E+04    0.76890000E+04    0.21306499E+02
+    0.63080000E+04    0.76890000E+04    0.20640900E+02
+    0.60410000E+04    0.77310000E+04    0.13893400E+02
+    0.60410000E+04    0.76670000E+04    0.91637001E+01
+    0.60340000E+04    0.76400000E+04    0.91637001E+01
+    0.61160000E+04    0.76400000E+04    0.11682000E+02
+    0.61480000E+04    0.76660000E+04    0.11682000E+02
+    0.61530000E+04    0.76540000E+04    0.42729998E+01
+    0.63330000E+04    0.76740000E+04    0.20453400E+02
+    0.66480000E+04    0.76610000E+04    0.29400299E+02
+    0.62920000E+04    0.76800000E+04    0.26249399E+02
+    0.63050000E+04    0.76570000E+04    0.26249399E+02
+    0.62880000E+04    0.76070000E+04    0.26249399E+02
+    0.60330000E+04    0.75960000E+04    0.92503996E+01
+    0.60610000E+04    0.75710000E+04    0.11608800E+02
+    0.62590000E+04    0.75550000E+04    0.24962400E+02
+    0.63070000E+04    0.75510000E+04    0.24962400E+02
+    0.61530000E+04    0.76200000E+04    0.11511500E+02
+    0.63120000E+04    0.75415000E+04    0.58837601E+02
+    0.63490000E+04    0.76170000E+04    0.58837601E+02
+    0.63770000E+04    0.75440000E+04    0.58837601E+02
+    0.63900000E+04    0.76045000E+04    0.13400600E+02
+    0.64370000E+04    0.76280000E+04    0.13400600E+02
+    0.66330000E+04    0.75470000E+04    0.17967400E+02
+    0.65690000E+04    0.75240000E+04    0.17967400E+02
+    0.66770000E+04    0.75460000E+04    0.13373600E+02
+    0.66630000E+04    0.75240000E+04    0.13373600E+02
+    0.61570000E+04    0.74160000E+04    0.84476004E+01
+    0.62973262E+04    0.74097295E+04    0.11602600E+02
+    0.60880000E+04    0.73930000E+04    0.20737499E+02
+    0.60850000E+04    0.73965000E+04    0.20737499E+02
+    0.60930000E+04    0.74420000E+04    0.20737499E+02
+    0.61085000E+04    0.74880000E+04    0.20737499E+02
+    0.61090000E+04    0.74265000E+04    0.20737499E+02
+    0.60220000E+04    0.74135000E+04    0.24611001E+01
+    0.65190000E+04    0.74700000E+04    0.19800100E+02
+    0.65190000E+04    0.73780000E+04    0.19800100E+02
+    0.64750000E+04    0.74220000E+04    0.19800100E+02
+    0.65370000E+04    0.74210000E+04    0.10077300E+02
+    0.66090000E+04    0.74420000E+04    0.10077300E+02
+    0.65940000E+04    0.73940000E+04    0.10077300E+02
+    0.66770000E+04    0.74380000E+04    0.19451900E+02
+    0.62520000E+04    0.73560000E+04    0.40416999E+01
+    0.60470000E+04    0.73520000E+04    0.62500000E+01
+    0.62500000E+04    0.73290000E+04    0.19722000E+01
+    0.61700000E+04    0.74050000E+04    0.43105001E+01
+    0.60540000E+04    0.73550000E+04    0.10311100E+02
+    0.60755000E+04    0.73650000E+04    0.10311100E+02
+    0.60800000E+04    0.73165000E+04    0.10311100E+02
+    0.64320000E+04    0.73230000E+04    0.18084999E+02
+    0.63770000E+04    0.73325000E+04    0.18084999E+02
+    0.60720000E+04    0.73000000E+04    0.41282001E+01
+    0.62550000E+04    0.73150000E+04    0.80868998E+01
+    0.64970000E+04    0.73420000E+04    0.28794500E+02
+    0.65220000E+04    0.73350000E+04    0.28794500E+02
+    0.65210000E+04    0.73060000E+04    0.28794500E+02
+    0.64985000E+04    0.72830000E+04    0.28794500E+02
+    0.65250000E+04    0.73130000E+04    0.15295200E+02
+    0.65660000E+04    0.73110000E+04    0.15295200E+02
+    0.66170000E+04    0.73070000E+04    0.72311001E+01
+    0.66450000E+04    0.72910000E+04    0.72311001E+01
+    0.66185000E+04    0.73110000E+04    0.69106998E+01
+    0.66335000E+04    0.73370000E+04    0.69106998E+01
+    0.66750000E+04    0.73100000E+04    0.69106998E+01
+    0.66820000E+04    0.70575000E+04    0.00000000E+00
+    0.59900000E+04    0.70575000E+04    0.00000000E+00
+    0.66820000E+04    0.79555000E+04    0.00000000E+00
+    0.59900000E+04    0.79555000E+04    0.00000000E+00
+    0.62540000E+04    0.76890000E+04    0.21306499E+02
+    0.60180000E+04    0.76670000E+04    0.91637001E+01
+    0.61530000E+04    0.76620000E+04    0.42729998E+01
+    0.66480000E+04    0.76930000E+04    0.29400299E+02
+    0.63050000E+04    0.76410000E+04    0.26249399E+02
+    0.60450000E+04    0.75710000E+04    0.11608800E+02
+    0.62520000E+04    0.75550000E+04    0.24962400E+02
+    0.63070000E+04    0.75400000E+04    0.24962400E+02
+    0.63770000E+04    0.75520000E+04    0.58837601E+02
+    0.62951631E+04    0.74063647E+04    0.11602600E+02
+    0.60930000E+04    0.74190000E+04    0.20737499E+02
+    0.60930000E+04    0.74650000E+04    0.20737499E+02
+    0.61090000E+04    0.74490000E+04    0.20737499E+02
+    0.60220000E+04    0.74282500E+04    0.24611001E+01
+    0.66090000E+04    0.74630000E+04    0.10077300E+02
+    0.64750000E+04    0.74545000E+04    0.19800100E+02
+    0.65370000E+04    0.74050000E+04    0.10077300E+02
+    0.66090000E+04    0.74260000E+04    0.10077300E+02
+    0.65940000E+04    0.73875000E+04    0.10077300E+02
+    0.60607500E+04    0.73650000E+04    0.10311100E+02
+    0.60902500E+04    0.73650000E+04    0.10311100E+02
+    0.60800000E+04    0.73047500E+04    0.10311100E+02
+    0.63770000E+04    0.73117500E+04    0.18084999E+02
+    0.63770000E+04    0.73580000E+04    0.18084999E+02
+    0.62410000E+04    0.73150000E+04    0.80868998E+01
+    0.62630000E+04    0.73150000E+04    0.80868998E+01
+    0.65220000E+04    0.73270000E+04    0.28794500E+02
+    0.65250000E+04    0.73170000E+04    0.15295200E+02
+    0.66347500E+04    0.73110000E+04    0.69106998E+01
+    0.66010000E+04    0.73070000E+04    0.72311001E+01
+    0.66450000E+04    0.72990000E+04    0.72311001E+01
+    0.66022500E+04    0.73110000E+04    0.69106998E+01
+    0.62440000E+04    0.75550000E+04    0.24962400E+02
+    0.63070000E+04    0.75345000E+04    0.24962400E+02
+    0.62962446E+04    0.74080469E+04    0.11602600E+02
+    0.60930000E+04    0.74075000E+04    0.20737499E+02
+    0.60220000E+04    0.74208750E+04    0.24611001E+01
+    0.66090000E+04    0.74735000E+04    0.10077300E+02
+    0.66090000E+04    0.74180000E+04    0.10077300E+02
+    0.65940000E+04    0.73842500E+04    0.10077300E+02
+    0.63770000E+04    0.72990000E+04    0.18084999E+02
+    0.63770000E+04    0.73221250E+04    0.18084999E+02
+    0.63770000E+04    0.73452500E+04    0.18084999E+02
+    0.62370000E+04    0.73150000E+04    0.80868998E+01
+    0.62590000E+04    0.73150000E+04    0.80868998E+01
+    0.65220000E+04    0.73230000E+04    0.28794500E+02
+    0.66428750E+04    0.73110000E+04    0.69106998E+01
+    0.66103750E+04    0.73110000E+04    0.69106998E+01
+    0.65941250E+04    0.73110000E+04    0.69106998E+01
+    0.62480000E+04    0.75550000E+04    0.24962400E+02
+    0.62967852E+04    0.74088882E+04    0.11602600E+02
+    0.60930000E+04    0.74017500E+04    0.20737499E+02
+    0.63770000E+04    0.73169375E+04    0.18084999E+02
+    0.65940000E+04    0.73826250E+04    0.10077300E+02
+    0.63770000E+04    0.72950000E+04    0.18084999E+02
+    0.63770000E+04    0.73273125E+04    0.18084999E+02
+    0.63770000E+04    0.73388750E+04    0.18084999E+02
+    0.62350000E+04    0.73150000E+04    0.80868998E+01
+    0.62610000E+04    0.73150000E+04    0.80868998E+01
+    0.62500000E+04    0.75550000E+04    0.24962400E+02
+    0.63770000E+04    0.73143438E+04    0.18084999E+02
+    0.63770000E+04    0.72930000E+04    0.18084999E+02
+    0.63770000E+04    0.73299063E+04    0.18084999E+02
+    0.63770000E+04    0.73356875E+04    0.18084999E+02
+    0.63770000E+04    0.73286094E+04    0.18084999E+02
+    0.62500000E+04    0.73160000E+04    0.20208001E+01
+    0.61090000E+04    0.74072500E+04    0.20737499E+02
+    0.62610000E+04    0.76790000E+04    0.26249399E+02
+    0.62470000E+04    0.73220000E+04    0.20208001E+01
+    0.62560000E+04    0.73160000E+04    0.20208001E+01
+    0.62420000E+04    0.73160000E+04    0.20208001E+01
+    0.63760000E+04    0.73320000E+04    0.34500000E+01
+    0.62910000E+04    0.74090000E+04    0.41591001E+01
+    0.65930000E+04    0.73070000E+04    0.72311001E+01
+    0.66090000E+04    0.73070000E+04    0.72311001E+01
+    0.60600000E+04    0.76820000E+04    0.13893400E+02
+    0.66820000E+04    0.76685000E+04    0.29400299E+02
+    0.66490000E+04    0.72910000E+04    0.69106998E+01
+    0.66150000E+04    0.72820000E+04    0.72311001E+01
+    0.61480000E+04    0.76480000E+04    0.11682000E+02
+    0.62960000E+04    0.74130000E+04    0.41591001E+01
+    0.63840000E+04    0.75360000E+04    0.13400600E+02
+    0.63740000E+04    0.75965000E+04    0.58837601E+02
+    0.62480000E+04    0.73350000E+04    0.19722000E+01
+    0.62480000E+04    0.73580000E+04    0.46296000E+01
+    0.66290000E+04    0.73070000E+04    0.72311001E+01
+    0.66130000E+04    0.74480000E+04    0.19451900E+02
+    0.63760000E+04    0.73020000E+04    0.40000000E+01
+    0.64990000E+04    0.73570000E+04    0.19800100E+02
+    0.62410000E+04    0.75560000E+04    0.40000000E+01
+    0.60280000E+04    0.74080000E+04    0.24611001E+01
+    0.63760000E+04    0.73340000E+04    0.34500000E+01
+    0.62580000E+04    0.73160000E+04    0.20208001E+01
+    0.62530000E+04    0.73160000E+04    0.20208001E+01
+    0.62380000E+04    0.73160000E+04    0.20208001E+01
+    0.63760000E+04    0.73310000E+04    0.34500000E+01
+    0.60440000E+04    0.76820000E+04    0.13893400E+02
+    0.62960000E+04    0.74110000E+04    0.41591001E+01
+    0.63840000E+04    0.75440000E+04    0.13400600E+02
+    0.63760000E+04    0.73060000E+04    0.40000000E+01
+    0.66130000E+04    0.74320000E+04    0.19451900E+02
+    0.66370000E+04    0.73070000E+04    0.72311001E+01
+    0.66130000E+04    0.74670000E+04    0.19451900E+02
+    0.63760000E+04    0.72980000E+04    0.40000000E+01
+    0.62450000E+04    0.75560000E+04    0.40000000E+01
+    0.60280000E+04    0.74160000E+04    0.24611001E+01
+    0.62400000E+04    0.73160000E+04    0.20208001E+01
+    0.62545000E+04    0.73160000E+04    0.20208001E+01
+    0.62360000E+04    0.73160000E+04    0.20208001E+01
+    0.62470000E+04    0.75560000E+04    0.40000000E+01
+    0.63760000E+04    0.73000000E+04    0.40000000E+01
+    0.66130000E+04    0.74240000E+04    0.19451900E+02
+    0.63760000E+04    0.73100000E+04    0.40000000E+01
+    0.66130000E+04    0.74400000E+04    0.19451900E+02
+    0.66130000E+04    0.74575000E+04    0.19451900E+02
+    0.66130000E+04    0.74750000E+04    0.19451900E+02
+    0.63760000E+04    0.72960000E+04    0.40000000E+01
+    0.62430000E+04    0.75560000E+04    0.40000000E+01
+    0.63760000E+04    0.73120000E+04    0.40000000E+01
+    0.66130000E+04    0.74622500E+04    0.19451900E+02
+    0.66090000E+04    0.74682500E+04    0.10077300E+02
+    0.66266250E+04    0.73110000E+04    0.69106998E+01
+    0.62480000E+04    0.73150000E+04    0.80868998E+01
+    0.62390000E+04    0.73150000E+04    0.80868998E+01
+    0.63770000E+04    0.73312031E+04    0.18084999E+02
+    0.66090000E+04    0.74525000E+04    0.10077300E+02
+    0.62405000E+04    0.73220000E+04    0.20208001E+01
+    0.63770000E+04    0.73340938E+04    0.18084999E+02
+    0.62460000E+04    0.75550000E+04    0.24962400E+02
+    0.63770000E+04    0.75345000E+04    0.58837601E+02
+    0.61530000E+04    0.76470000E+04    0.42729998E+01
+    0.62570000E+04    0.73150000E+04    0.80868998E+01
+    0.60570000E+04    0.76670000E+04    0.91637001E+01
+    0.63710000E+04    0.73040000E+04    0.40000000E+01
+    0.62535000E+04    0.73220000E+04    0.20208001E+01
+    0.60220000E+04    0.73987500E+04    0.24611001E+01
+    0.62996631E+04    0.74133647E+04    0.11602600E+02
+    0.63770000E+04    0.72970000E+04    0.18084999E+02
+    0.63770000E+04    0.73053750E+04    0.18084999E+02
+    0.66090000E+04    0.74340000E+04    0.10077300E+02
+    0.62400000E+04    0.75550000E+04    0.24962400E+02
+    0.62445000E+04    0.73150000E+04    0.80868998E+01
+    0.62515000E+04    0.73150000E+04    0.80868998E+01
+    0.66090000E+04    0.74577500E+04    0.10077300E+02
+    0.66090000E+04    0.74472500E+04    0.10077300E+02
+    0.60220000E+04    0.74061250E+04    0.24611001E+01
+    0.63770000E+04    0.73021875E+04    0.18084999E+02
+    0.63770000E+04    0.73085625E+04    0.18084999E+02
+    0.62497500E+04    0.73150000E+04    0.80868998E+01
+    0.62420000E+04    0.75550000E+04    0.24962400E+02
+    0.62427500E+04    0.73150000E+04    0.80868998E+01
+    0.62532500E+04    0.73150000E+04    0.80868998E+01
+    0.63770000E+04    0.73069688E+04    0.18084999E+02
+    0.63770000E+04    0.73005938E+04    0.18084999E+02
+    0.63770000E+04    0.73101563E+04    0.18084999E+02
+    0.62460000E+04    0.73160000E+04    0.20208001E+01
+    0.62440000E+04    0.73160000E+04    0.20208001E+01
+    0.66130000E+04    0.74527500E+04    0.19451900E+02
+    0.62515000E+04    0.73160000E+04    0.20208001E+01
+    0.62420000E+04    0.73290000E+04    0.19722000E+01
+    0.62480000E+04    0.73160000E+04    0.20208001E+01
+    0.62380000E+04    0.75560000E+04    0.40000000E+01
+    0.63760000E+04    0.73080000E+04    0.40000000E+01
+    0.60280000E+04    0.73960000E+04    0.24611001E+01
+    0.63760000E+04    0.73040000E+04    0.40000000E+01
+    0.66230000E+04    0.73070000E+04    0.72311001E+01
+    0.62395000E+04    0.75560000E+04    0.40000000E+01
+    0.62410000E+04    0.73350000E+04    0.19722000E+01
+    0.62380000E+04    0.75550000E+04    0.24962400E+02
+    0.63770000E+04    0.73037813E+04    0.18084999E+02
+    0.62462500E+04    0.73150000E+04    0.80868998E+01
+    0.66225625E+04    0.73110000E+04    0.69106998E+01
+    0.56440000E+04    0.72820000E+04    0.00000000E+00
+    0.61630000E+04    0.70575000E+04    0.00000000E+00
+    0.58163696E+04    0.74715000E+04    0.00000000E+00
+    0.60565132E+04    0.73947500E+04    0.00000000E+00
+    0.62541250E+04    0.73012363E+04    0.80868998E+01
+    0.61505000E+04    0.74835000E+04    0.00000000E+00
+    0.60680000E+04    0.75710000E+04    0.11608800E+02
+    0.60840000E+04    0.75720000E+04    0.11608800E+02
+    0.60860000E+04    0.75820000E+04    0.53643999E+01
+    0.56440000E+04    0.77310000E+04    0.00000000E+00
+    0.61040000E+04    0.76750000E+04    0.11682000E+02
+    0.61360000E+04    0.76760000E+04    0.11682000E+02
+    0.62001470E+04    0.75555000E+04    0.00000000E+00
+    0.62980000E+04    0.75290000E+04    0.24962400E+02
+    0.63040000E+04    0.76160000E+04    0.26249399E+02
+    0.62500000E+04    0.75300000E+04    0.24962400E+02
+    0.63050000E+04    0.76330000E+04    0.26249399E+02
+    0.61880000E+04    0.76780000E+04    0.42729998E+01
+    0.61640000E+04    0.76900000E+04    0.23845200E+02
+    0.61630000E+04    0.79555000E+04    0.00000000E+00
+    0.62850000E+04    0.78442148E+04    0.00000000E+00
+    0.64090000E+04    0.72910000E+04    0.18084999E+02
+    0.63464414E+04    0.72373823E+04    0.00000000E+00
+    0.64050000E+04    0.74820000E+04    0.50467800E+02
+    0.65090000E+04    0.70575000E+04    0.00000000E+00
+    0.66797012E+04    0.71702871E+04    0.00000000E+00
+    0.66560000E+04    0.72820000E+04    0.69106998E+01
+    0.65860000E+04    0.73730000E+04    0.10077300E+02
+    0.66410000E+04    0.73860000E+04    0.19451900E+02
+    0.70280000E+04    0.72820000E+04    0.00000000E+00
+    0.66450000E+04    0.74830000E+04    0.19451900E+02
+    0.65724375E+04    0.74446250E+04    0.10077300E+02
+    0.63750000E+04    0.75680000E+04    0.58837601E+02
+    0.64887012E+04    0.75540000E+04    0.00000000E+00
+    0.68559604E+04    0.75570000E+04    0.00000000E+00
+    0.64780000E+04    0.76735000E+04    0.57002701E+02
+    0.65090000E+04    0.79555000E+04    0.00000000E+00
+    0.63740000E+04    0.75840000E+04    0.58837601E+02
+    0.59737573E+04    0.74171875E+04    0.00000000E+00
+    0.66080000E+04    0.73370000E+04    0.69106998E+01
+    0.62360000E+04    0.75390000E+04    0.24962400E+02
+    0.62330000E+04    0.72990000E+04    0.80868998E+01
+    0.63680000E+04    0.73290000E+04    0.34500000E+01
+    0.63695000E+04    0.73360000E+04    0.34500000E+01
+    0.58168120E+04    0.72975000E+04    0.00000000E+00
+    0.60660000E+04    0.71597446E+04    0.00000000E+00
+    0.58134785E+04    0.76535000E+04    0.00000000E+00
+    0.61120000E+04    0.76750000E+04    0.11682000E+02
+    0.61280000E+04    0.76760000E+04    0.11682000E+02
+    0.62180771E+04    0.75555000E+04    0.00000000E+00
+    0.62900000E+04    0.75290000E+04    0.24962400E+02
+    0.62660000E+04    0.75300000E+04    0.24962400E+02
+    0.61800000E+04    0.76780000E+04    0.42729998E+01
+    0.61560000E+04    0.76900000E+04    0.23845200E+02
+    0.64063311E+04    0.73372813E+04    0.18084999E+02
+    0.64005684E+04    0.73130469E+04    0.18084999E+02
+    0.63930000E+04    0.72910000E+04    0.18084999E+02
+    0.66470000E+04    0.72213755E+04    0.00000000E+00
+    0.65935000E+04    0.73735000E+04    0.00000000E+00
+    0.66174722E+04    0.73858750E+04    0.00000000E+00
+    0.68625112E+04    0.73690000E+04    0.00000000E+00
+    0.66455430E+04    0.74503750E+04    0.19451900E+02
+    0.64628120E+04    0.75540000E+04    0.00000000E+00
+    0.66000000E+04    0.73370000E+04    0.69106998E+01
+    0.61495000E+04    0.72003247E+04    0.00000000E+00
+    0.62270454E+04    0.75555000E+04    0.00000000E+00
+    0.62740000E+04    0.75300000E+04    0.24962400E+02
+    0.63917520E+04    0.73348906E+04    0.18084999E+02
+    0.63888638E+04    0.73109531E+04    0.18084999E+02
+    0.63873984E+04    0.72997969E+04    0.18084999E+02
+    0.66470000E+04    0.72517207E+04    0.00000000E+00
+    0.66058486E+04    0.73834375E+04    0.00000000E+00
+    0.67695029E+04    0.73790454E+04    0.00000000E+00
+    0.63854370E+04    0.73292578E+04    0.18084999E+02
+    0.60800000E+04    0.73240000E+04    0.10311100E+02
+    0.62820000E+04    0.72840000E+04    0.80868998E+01
+    0.62002295E+04    0.73232529E+04    0.00000000E+00
+    0.61420000E+04    0.76910000E+04    0.23845200E+02
+    0.61660000E+04    0.76770000E+04    0.42729998E+01
+    0.64720000E+04    0.73125000E+04    0.28794500E+02
+    0.64750000E+04    0.73895000E+04    0.19800100E+02
+    0.66695000E+04    0.72830000E+04    0.69106998E+01
+    0.63900000E+04    0.75930000E+04    0.13400600E+02
+    0.66010000E+04    0.75240000E+04    0.17967400E+02
+    0.64760000E+04    0.77030000E+04    0.57002701E+02
+    0.62425000E+04    0.75680000E+04    0.40000000E+01
+    0.62360000E+04    0.75640000E+04    0.40000000E+01
+    0.62620000E+04    0.73059014E+04    0.80868998E+01
+    0.62488750E+04    0.73071445E+04    0.80868998E+01
+    0.60710000E+04    0.75280000E+04    0.11608800E+02
+    0.63040000E+04    0.76210000E+04    0.26249399E+02
+    0.61705000E+04    0.78416313E+04    0.00000000E+00
+    0.63602612E+04    0.72650229E+04    0.00000000E+00
+    0.65301104E+04    0.71693198E+04    0.00000000E+00
+    0.65810000E+04    0.74840000E+04    0.10077300E+02
+    0.65110000E+04    0.78429380E+04    0.00000000E+00
+    0.59045020E+04    0.74715000E+04    0.00000000E+00
+    0.62510000E+04    0.75425000E+04    0.24962400E+02
+    0.60660000E+04    0.72235137E+04    0.00000000E+00
+    0.62315366E+04    0.75555000E+04    0.00000000E+00
+    0.64933940E+04    0.73800000E+04    0.19800100E+02
+    0.66711958E+04    0.72580479E+04    0.00000000E+00
+    0.66167104E+04    0.75063423E+04    0.00000000E+00
+    0.68033037E+04    0.72506729E+04    0.00000000E+00
+    0.59493335E+04    0.73420000E+04    0.00000000E+00
+    0.62415000E+04    0.73800000E+04    0.00000000E+00
+    0.61020000E+04    0.75840000E+04    0.53643999E+01
+    0.62490000E+04    0.76670000E+04    0.26249399E+02
+    0.64085000E+04    0.75540000E+04    0.13400600E+02
+    0.63005000E+04    0.74070947E+04    0.11602600E+02
+    0.60708105E+04    0.73947500E+04    0.00000000E+00
+    0.60720000E+04    0.75710000E+04    0.11608800E+02
+    0.60700000E+04    0.75495347E+04    0.11608800E+02
+    0.60800000E+04    0.75720000E+04    0.11608800E+02
+    0.62753306E+04    0.76370000E+04    0.26249399E+02
+    0.63050000E+04    0.76290000E+04    0.26249399E+02
+    0.62850000E+04    0.77829067E+04    0.00000000E+00
+    0.66600000E+04    0.72820000E+04    0.69106998E+01
+    0.63750000E+04    0.75720000E+04    0.58837601E+02
+    0.67661421E+04    0.75570000E+04    0.00000000E+00
+    0.63740000E+04    0.75800000E+04    0.58837601E+02
+    0.66207500E+04    0.73370000E+04    0.69106998E+01
+    0.62360000E+04    0.75470000E+04    0.24962400E+02
+    0.62330000E+04    0.73070000E+04    0.80868998E+01
+    0.63720000E+04    0.73290000E+04    0.34500000E+01
+    0.61160000E+04    0.76750000E+04    0.11682000E+02
+    0.61240000E+04    0.76760000E+04    0.11682000E+02
+    0.62860000E+04    0.75290000E+04    0.24962400E+02
+    0.62840000E+04    0.75078569E+04    0.00000000E+00
+    0.61760000E+04    0.76780000E+04    0.42729998E+01
+    0.61520000E+04    0.76900000E+04    0.23845200E+02
+    0.63850000E+04    0.72910000E+04    0.18084999E+02
+    0.65935000E+04    0.73772666E+04    0.00000000E+00
+    0.66323047E+04    0.74646250E+04    0.19451900E+02
+    0.65960000E+04    0.73370000E+04    0.69106998E+01
+    0.61495000E+04    0.72468257E+04    0.00000000E+00
+    0.62780000E+04    0.75300000E+04    0.24962400E+02
+    0.63829053E+04    0.73109531E+04    0.18084999E+02
+    0.63832681E+04    0.73045781E+04    0.18084999E+02
+    0.66470000E+04    0.72669263E+04    0.00000000E+00
+    0.65998965E+04    0.73834375E+04    0.00000000E+00
+    0.67228389E+04    0.73832876E+04    0.00000000E+00
+    0.63830610E+04    0.73348906E+04    0.18084999E+02
+    0.60800000E+04    0.73320000E+04    0.10311100E+02
+    0.64760000E+04    0.76950000E+04    0.57002701E+02
+    0.62881250E+04    0.76230000E+04    0.26249399E+02
+    0.65893052E+04    0.74551250E+04    0.10077300E+02
+    0.63175000E+04    0.74170000E+04    0.11602600E+02
+    0.63160000E+04    0.73960000E+04    0.11602600E+02
+    0.63585000E+04    0.75700000E+04    0.58837601E+02
+    0.62450000E+04    0.75473501E+04    0.24962400E+02
+    0.62418750E+04    0.73080020E+04    0.80868998E+01
+    0.61140000E+04    0.76915000E+04    0.00000000E+00
+    0.60970000E+04    0.76590000E+04    0.11682000E+02
+    0.61950000E+04    0.76620000E+04    0.42729998E+01
+    0.61540000E+04    0.77060161E+04    0.23845200E+02
+    0.61260000E+04    0.76595000E+04    0.11682000E+02
+    0.61780000E+04    0.76615000E+04    0.42729998E+01
+    0.62420000E+04    0.72880000E+04    0.80868998E+01
+    0.62375000E+04    0.72360000E+04    0.00000000E+00
+    0.62300000E+04    0.73190000E+04    0.00000000E+00
+    0.62980000E+04    0.73300000E+04    0.80868998E+01
+    0.63020000E+04    0.73629092E+04    0.00000000E+00
+    0.63060000E+04    0.74390000E+04    0.00000000E+00
+    0.60066313E+04    0.76160000E+04    0.00000000E+00
+    0.65180000E+04    0.73950000E+04    0.19800100E+02
+    0.65890000E+04    0.73820000E+04    0.10077300E+02
+    0.64370000E+04    0.75880000E+04    0.13400600E+02
+    0.65460000E+04    0.75056875E+04    0.00000000E+00
+    0.65830000E+04    0.75880000E+04    0.17967400E+02
+    0.64920000E+04    0.76600000E+04    0.57002701E+02
+    0.64850000E+04    0.76090000E+04    0.00000000E+00
+    0.66650000E+04    0.78402500E+04    0.00000000E+00
+    0.65862446E+04    0.77435112E+04    0.00000000E+00
+    0.61374229E+04    0.74802310E+04    0.00000000E+00
+    0.64205000E+04    0.72142778E+04    0.00000000E+00
+    0.64780000E+04    0.76790000E+04    0.57002701E+02
+    0.64370000E+04    0.76640000E+04    0.13400600E+02
+    0.64557622E+04    0.76762500E+04    0.00000000E+00
+    0.59957646E+04    0.74024375E+04    0.00000000E+00
+    0.59047412E+04    0.76535000E+04    0.00000000E+00
+    0.64498286E+04    0.75540000E+04    0.00000000E+00
+    0.63812935E+04    0.73305547E+04    0.18084999E+02
+    0.64873428E+04    0.73165000E+04    0.28794500E+02
+    0.62490000E+04    0.75640000E+04    0.40000000E+01
+    0.62402500E+04    0.75610938E+04    0.40000000E+01
+    0.62560000E+04    0.73085273E+04    0.80868998E+01
+    0.65755000E+04    0.72169185E+04    0.00000000E+00
+    0.62486235E+04    0.74140000E+04    0.00000000E+00
+    0.60813945E+04    0.75579209E+04    0.11608800E+02
+    0.66620000E+04    0.72683423E+04    0.00000000E+00
+    0.66205313E+04    0.73239214E+04    0.69106998E+01
+    0.62880000E+04    0.75426152E+04    0.24962400E+02
+    0.63890000E+04    0.72624224E+04    0.00000000E+00
+    0.65860000E+04    0.73200000E+04    0.69106998E+01
+    0.65980000E+04    0.73505000E+04    0.00000000E+00
+    0.65980000E+04    0.73243823E+04    0.69106998E+01
+    0.60250000E+04    0.73657778E+04    0.00000000E+00
+    0.61000000E+04    0.73880000E+04    0.20737499E+02
+    0.65890000E+04    0.73360000E+04    0.69106998E+01
+    0.65875000E+04    0.73455000E+04    0.00000000E+00
+    0.65280000E+04    0.74750000E+04    0.10077300E+02
+    0.63805000E+04    0.75050000E+04    0.00000000E+00
+    0.65150000E+04    0.77310000E+04    0.57002701E+02
+    0.65190000E+04    0.77871836E+04    0.00000000E+00
+    0.65190000E+04    0.77589492E+04    0.00000000E+00
+    0.62580000E+04    0.77220000E+04    0.21306499E+02
+    0.60310000E+04    0.74335000E+04    0.24611001E+01
+    0.60625845E+04    0.74287500E+04    0.00000000E+00
+    0.63880000E+04    0.78322856E+04    0.00000000E+00
+    0.62740000E+04    0.72840000E+04    0.80868998E+01
+    0.62780000E+04    0.72430806E+04    0.00000000E+00
+    0.62161152E+04    0.73320000E+04    0.00000000E+00
+    0.61440000E+04    0.76910000E+04    0.23845200E+02
+    0.61430000E+04    0.76827002E+04    0.00000000E+00
+    0.61430000E+04    0.76981665E+04    0.23845200E+02
+    0.61680000E+04    0.76770000E+04    0.42729998E+01
+    0.61670000E+04    0.76838076E+04    0.00000000E+00
+    0.61670000E+04    0.76700713E+04    0.42729998E+01
+    0.66138335E+04    0.74948335E+04    0.00000000E+00
+    0.62106006E+04    0.73030000E+04    0.00000000E+00
+    0.66277656E+04    0.74503750E+04    0.19451900E+02
+    0.62760000E+04    0.75175737E+04    0.00000000E+00
+    0.63819067E+04    0.72997969E+04    0.18084999E+02
+    0.65930000E+04    0.74840000E+04    0.10077300E+02
+    0.63617339E+04    0.75820000E+04    0.58837601E+02
+    0.62510000E+04    0.75488872E+04    0.24962400E+02
+    0.61140000E+04    0.76627339E+04    0.11682000E+02
+    0.62375000E+04    0.72621948E+04    0.00000000E+00
+    0.64941606E+04    0.76762500E+04    0.57002701E+02
+    0.59998120E+04    0.74245625E+04    0.00000000E+00
+    0.62760000E+04    0.75418564E+04    0.24962400E+02
+    0.60925000E+04    0.72680000E+04    0.00000000E+00
+    0.60820000E+04    0.73440000E+04    0.10311100E+02
+    0.60710000E+04    0.73510000E+04    0.10311100E+02
+    0.61081787E+04    0.74770000E+04    0.20737499E+02
+    0.60730000E+04    0.76005000E+04    0.53643999E+01
+    0.60510000E+04    0.75930000E+04    0.92503996E+01
+    0.62900000E+04    0.75960000E+04    0.61429000E+01
+    0.62930000E+04    0.75920000E+04    0.61429000E+01
+    0.62875000E+04    0.75920000E+04    0.61429000E+01
+    0.63000000E+04    0.75920000E+04    0.61429000E+01
+    0.62970000E+04    0.75960000E+04    0.61429000E+01
+    0.62935000E+04    0.75960000E+04    0.61429000E+01
+    0.63240000E+04    0.76040000E+04    0.58837601E+02
+    0.63435391E+04    0.72990000E+04    0.00000000E+00
+    0.65230000E+04    0.73700000E+04    0.19800100E+02
+    0.66510000E+04    0.73050000E+04    0.69106998E+01
+    0.65370000E+04    0.74380000E+04    0.10077300E+02
+    0.63450000E+04    0.75250000E+04    0.58837601E+02
+    0.63315000E+04    0.76370000E+04    0.20453400E+02
+    0.64855000E+04    0.77312690E+04    0.00000000E+00
+    0.65627100E+04    0.76840576E+04    0.00000000E+00
+    0.65230000E+04    0.76780000E+04    0.57002701E+02
+    0.65887002E+04    0.74300000E+04    0.10077300E+02
+    0.65140000E+04    0.73190000E+04    0.28794500E+02
+    0.65130000E+04    0.73140000E+04    0.28794500E+02
+    0.63970000E+04    0.74820000E+04    0.50467800E+02
+    0.66290000E+04    0.74160000E+04    0.19451900E+02
+    0.66410000E+04    0.74000000E+04    0.19451900E+02
+    0.66660000E+04    0.72830000E+04    0.69106998E+01
+    0.66750000E+04    0.72990000E+04    0.69106998E+01
+    0.67503252E+04    0.73045000E+04    0.00000000E+00
+    0.66650000E+04    0.72940938E+04    0.69106998E+01
+    0.67124619E+04    0.73045000E+04    0.00000000E+00
+    0.63900000E+04    0.75850000E+04    0.13400600E+02
+    0.64128335E+04    0.75810000E+04    0.13400600E+02
+    0.64572568E+04    0.77065000E+04    0.00000000E+00
+    0.62255898E+04    0.75660000E+04    0.00000000E+00
+    0.61705000E+04    0.77843306E+04    0.00000000E+00
+    0.65037939E+04    0.73800000E+04    0.19800100E+02
+    0.60700000E+04    0.75603608E+04    0.11608800E+02
+    0.62805000E+04    0.76547988E+04    0.26249399E+02
+    0.63732500E+04    0.73315000E+04    0.34500000E+01
+    0.61260000E+04    0.76867002E+04    0.00000000E+00
+    0.62880000E+04    0.75181450E+04    0.00000000E+00
+    0.62947847E+04    0.76310000E+04    0.26249399E+02
+    0.61495000E+04    0.74579448E+04    0.00000000E+00
+    0.62598501E+04    0.75660000E+04    0.00000000E+00
+    0.65860000E+04    0.73280000E+04    0.69106998E+01
+    0.61000000E+04    0.73470000E+04    0.10311100E+02
+    0.63147998E+04    0.75940000E+04    0.00000000E+00
+    0.64105000E+04    0.75250000E+04    0.13400600E+02
+    0.66677500E+04    0.72770000E+04    0.00000000E+00
+    0.66650000E+04    0.72885020E+04    0.69106998E+01
+    0.64010000E+04    0.75022881E+04    0.00000000E+00
+    0.61288335E+04    0.73600000E+04    0.00000000E+00
+    0.61495000E+04    0.73303301E+04    0.00000000E+00
+    0.62502500E+04    0.73220000E+04    0.20208001E+01
+    0.61860000E+04    0.74050000E+04    0.43105001E+01
+    0.63220000E+04    0.76350000E+04    0.20453400E+02
+    0.65760000E+04    0.73113750E+04    0.00000000E+00
+    0.60180000E+04    0.78438179E+04    0.00000000E+00
+    0.65330000E+04    0.73210000E+04    0.15295200E+02
+    0.66290000E+04    0.72820000E+04    0.72311001E+01
+    0.63710000E+04    0.72990000E+04    0.40000000E+01
+    0.63572695E+04    0.73015000E+04    0.00000000E+00
+    0.63710000E+04    0.73090000E+04    0.40000000E+01
+    0.60471938E+04    0.74120000E+04    0.00000000E+00
+    0.70280000E+04    0.77310000E+04    0.00000000E+00
+    0.62392500E+04    0.75838252E+04    0.00000000E+00
+    0.63143096E+04    0.76205479E+04    0.00000000E+00
+    0.63807593E+04    0.73077656E+04    0.18084999E+02
+    0.65965288E+04    0.74446250E+04    0.10077300E+02
+    0.63099106E+04    0.74038677E+04    0.11602600E+02
+    0.62410000E+04    0.75501948E+04    0.24962400E+02
+    0.62453750E+04    0.73106807E+04    0.80868998E+01
+    0.61740000E+04    0.76390000E+04    0.42729998E+01
+    0.64852500E+04    0.72194126E+04    0.00000000E+00
+    0.62523750E+04    0.73108076E+04    0.80868998E+01
+    0.62780000E+04    0.72637358E+04    0.00000000E+00
+    0.62750972E+04    0.71403198E+04    0.00000000E+00
+    0.61827104E+04    0.72985000E+04    0.00000000E+00
+    0.65965288E+04    0.74656250E+04    0.10077300E+02
+    0.62980000E+04    0.75730000E+04    0.24962400E+02
+    0.60915835E+04    0.73420000E+04    0.10311100E+02
+    0.68228198E+04    0.76967500E+04    0.00000000E+00
+    0.63020000E+04    0.75821841E+04    0.00000000E+00
+    0.63130000E+04    0.73270000E+04    0.80868998E+01
+    0.63165000E+04    0.73445000E+04    0.00000000E+00
+    0.62802998E+04    0.73832998E+04    0.00000000E+00
+    0.64951201E+04    0.74107622E+04    0.19800100E+02
+    0.65530000E+04    0.73840000E+04    0.10077300E+02
+    0.63587646E+04    0.75480000E+04    0.58837601E+02
+    0.63830000E+04    0.76480000E+04    0.13400600E+02
+    0.65033398E+04    0.77028501E+04    0.57002701E+02
+    0.65910000E+04    0.76775557E+04    0.00000000E+00
+    0.63070000E+04    0.75650000E+04    0.24962400E+02
+    0.62153008E+04    0.75345000E+04    0.00000000E+00
+    0.62620000E+04    0.73105059E+04    0.80868998E+01
+    0.63672124E+04    0.72789253E+04    0.00000000E+00
+    0.59487666E+04    0.74715000E+04    0.00000000E+00
+    0.62337964E+04    0.75555000E+04    0.00000000E+00
+    0.62330000E+04    0.73110000E+04    0.80868998E+01
+    0.62210859E+04    0.73090000E+04    0.00000000E+00
+    0.63810000E+04    0.72910000E+04    0.18084999E+02
+    0.63830000E+04    0.72761514E+04    0.00000000E+00
+    0.63798813E+04    0.73279609E+04    0.18084999E+02
+    0.62490000E+04    0.75600000E+04    0.40000000E+01
+    0.60660000E+04    0.72599673E+04    0.00000000E+00
+    0.62960000E+04    0.76070000E+04    0.26249399E+02
+    0.63400000E+04    0.76170000E+04    0.58837601E+02
+    0.63240000E+04    0.76261113E+04    0.00000000E+00
+    0.62380000E+04    0.73104995E+04    0.80868998E+01
+    0.59825044E+04    0.75052080E+04    0.00000000E+00
+    0.59177300E+04    0.75479946E+04    0.00000000E+00
+    0.60865000E+04    0.74064165E+04    0.00000000E+00
+    0.62743999E+04    0.73320000E+04    0.00000000E+00
+    0.61310000E+04    0.77080000E+04    0.23845200E+02
+    0.61440000E+04    0.77210000E+04    0.23845200E+02
+    0.61375000E+04    0.77576431E+04    0.00000000E+00
+    0.62117939E+04    0.77467939E+04    0.00000000E+00
+    0.65170000E+04    0.74305000E+04    0.19800100E+02
+    0.65140000E+04    0.76560000E+04    0.57002701E+02
+    0.65100000E+04    0.76260215E+04    0.00000000E+00
+    0.62567500E+04    0.73220000E+04    0.20208001E+01
+    0.59760083E+04    0.73420000E+04    0.00000000E+00
+    0.59466748E+04    0.72975000E+04    0.00000000E+00
+    0.58170000E+04    0.70575000E+04    0.00000000E+00
+    0.59392549E+04    0.71722500E+04    0.00000000E+00
+    0.62458086E+04    0.73713823E+04    0.00000000E+00
+    0.62221665E+04    0.76673335E+04    0.00000000E+00
+    0.62983140E+04    0.74073110E+04    0.11602600E+02
+    0.60775815E+04    0.73982500E+04    0.00000000E+00
+    0.60663560E+04    0.74116675E+04    0.00000000E+00
+    0.62850000E+04    0.77520513E+04    0.00000000E+00
+    0.67236069E+04    0.75350000E+04    0.00000000E+00
+    0.66230908E+04    0.74598750E+04    0.19451900E+02
+    0.61495000E+04    0.72702402E+04    0.00000000E+00
+    0.63802861E+04    0.73029844E+04    0.18084999E+02
+    0.66014917E+04    0.73753833E+04    0.00000000E+00
+    0.66993428E+04    0.73854233E+04    0.00000000E+00
+    0.65875000E+04    0.73883862E+04    0.10077300E+02
+    0.65333350E+04    0.72370327E+04    0.00000000E+00
+    0.64628311E+04    0.77285854E+04    0.00000000E+00
+    0.64546748E+04    0.77926226E+04    0.00000000E+00
+    0.66200000E+04    0.72941802E+04    0.72311001E+01
+    0.63607207E+04    0.73115000E+04    0.00000000E+00
+    0.62360000E+04    0.75600000E+04    0.40000000E+01
+    0.62360000E+04    0.75510000E+04    0.24962400E+02
+    0.62522500E+04    0.73190835E+04    0.20208001E+01
+    0.60180000E+04    0.74880000E+04    0.44731998E+01
+    0.62460000E+04    0.76490000E+04    0.26249399E+02
+    0.62595000E+04    0.76460000E+04    0.26249399E+02
+    0.66490000E+04    0.72950000E+04    0.69106998E+01
+    0.65460000E+04    0.74622002E+04    0.10077300E+02
+    0.63810000E+04    0.74850000E+04    0.50467800E+02
+    0.63790000E+04    0.74949561E+04    0.00000000E+00
+    0.61320000E+04    0.76400000E+04    0.11682000E+02
+    0.61485000E+04    0.76295000E+04    0.00000000E+00
+    0.63770000E+04    0.75560000E+04    0.58837601E+02
+    0.63680000E+04    0.75540000E+04    0.58837601E+02
+    0.66542500E+04    0.73370000E+04    0.69106998E+01
+    0.60900000E+04    0.75820000E+04    0.53643999E+01
+    0.63750000E+04    0.75640000E+04    0.58837601E+02
+    0.63663862E+04    0.75660000E+04    0.58837601E+02
+    0.60695000E+04    0.73232271E+04    0.00000000E+00
+    0.63040000E+04    0.76230000E+04    0.26249399E+02
+    0.62960625E+04    0.76220000E+04    0.26249399E+02
+    0.63085000E+04    0.76220000E+04    0.00000000E+00
+    0.62998423E+04    0.76240000E+04    0.26249399E+02
+    0.60980000E+04    0.75840000E+04    0.53643999E+01
+    0.62490000E+04    0.76630000E+04    0.26249399E+02
+    0.62355566E+04    0.76650000E+04    0.00000000E+00
+    0.62630000E+04    0.76650000E+04    0.26249399E+02
+    0.60740000E+04    0.75710000E+04    0.11608800E+02
+    0.60750000E+04    0.75645522E+04    0.11608800E+02
+    0.60730000E+04    0.75755000E+04    0.00000000E+00
+    0.60780000E+04    0.75720000E+04    0.11608800E+02
+    0.60810000E+04    0.75820000E+04    0.53643999E+01
+    0.60790000E+04    0.75771499E+04    0.00000000E+00
+    0.60790000E+04    0.75675000E+04    0.11608800E+02
+    0.60835000E+04    0.75925000E+04    0.53643999E+01
+    0.63050000E+04    0.76270000E+04    0.26249399E+02
+    0.63117500E+04    0.76280000E+04    0.00000000E+00
+    0.66620000E+04    0.72820000E+04    0.69106998E+01
+    0.66610000E+04    0.72751714E+04    0.00000000E+00
+    0.66610000E+04    0.72864043E+04    0.69106998E+01
+    0.63750000E+04    0.75740000E+04    0.58837601E+02
+    0.63816250E+04    0.75730000E+04    0.00000000E+00
+    0.63705000E+04    0.75730000E+04    0.58837601E+02
+    0.63740000E+04    0.75780000E+04    0.58837601E+02
+    0.63675410E+04    0.75790000E+04    0.58837601E+02
+    0.63785000E+04    0.75790000E+04    0.00000000E+00
+    0.61180000E+04    0.76750000E+04    0.11682000E+02
+    0.61170000E+04    0.76685410E+04    0.11682000E+02
+    0.61170000E+04    0.76795000E+04    0.00000000E+00
+    0.61220000E+04    0.76760000E+04    0.11682000E+02
+    0.61230000E+04    0.76817236E+04    0.00000000E+00
+    0.61230000E+04    0.76715000E+04    0.11682000E+02
+    0.62840000E+04    0.75290000E+04    0.24962400E+02
+    0.62830000E+04    0.75224668E+04    0.00000000E+00
+    0.62850000E+04    0.75335000E+04    0.24962400E+02
+    0.61740000E+04    0.76780000E+04    0.42729998E+01
+    0.61830000E+04    0.76900000E+04    0.23845200E+02
+    0.61730000E+04    0.76839170E+04    0.00000000E+00
+    0.61750000E+04    0.76735000E+04    0.42729998E+01
+    0.61500000E+04    0.76900000E+04    0.23845200E+02
+    0.61510000E+04    0.76827144E+04    0.00000000E+00
+    0.61510000E+04    0.76945000E+04    0.23845200E+02
+    0.65940000E+04    0.73370000E+04    0.69106998E+01
+    0.65950000E+04    0.73440464E+04    0.00000000E+00
+    0.65950000E+04    0.73325000E+04    0.69106998E+01
+    0.62800000E+04    0.75300000E+04    0.24962400E+02
+    0.62790000E+04    0.75362656E+04    0.24962400E+02
+    0.62790000E+04    0.75255000E+04    0.00000000E+00
+    0.67140854E+04    0.73444692E+04    0.00000000E+00
+    0.60800000E+04    0.73360000E+04    0.10311100E+02
+    0.60675801E+04    0.73380000E+04    0.00000000E+00
+    0.60883818E+04    0.73340000E+04    0.10311100E+02
+    0.64760000E+04    0.76910000E+04    0.57002701E+02
+    0.64618735E+04    0.76930000E+04    0.00000000E+00
+    0.64850000E+04    0.76930000E+04    0.57002701E+02
+    0.62470000E+04    0.75509790E+04    0.24962400E+02
+    0.62418750E+04    0.73115557E+04    0.80868998E+01
+    0.62500000E+04    0.72880000E+04    0.80868998E+01
+    0.59536104E+04    0.76051221E+04    0.00000000E+00
+    0.65910000E+04    0.73820000E+04    0.10077300E+02
+    0.64780000E+04    0.76830000E+04    0.57002701E+02
+    0.64690000E+04    0.76810000E+04    0.00000000E+00
+    0.64866548E+04    0.76810000E+04    0.57002701E+02
+    0.65070000E+04    0.77310000E+04    0.57002701E+02
+    0.65030000E+04    0.77492681E+04    0.00000000E+00
+    0.62580000E+04    0.77052578E+04    0.21306499E+02
+    0.62660000E+04    0.72840000E+04    0.80868998E+01
+    0.61460000E+04    0.76910000E+04    0.23845200E+02
+    0.61450000E+04    0.76866694E+04    0.00000000E+00
+    0.61700000E+04    0.76770000E+04    0.42729998E+01
+    0.66628960E+04    0.73080000E+04    0.69106998E+01
+    0.62488750E+04    0.73115342E+04    0.80868998E+01
+    0.62902500E+04    0.75811187E+04    0.00000000E+00
+    0.63790000E+04    0.72831714E+04    0.00000000E+00
+    0.62606826E+04    0.73842051E+04    0.00000000E+00
+    0.62552500E+04    0.73189097E+04    0.20208001E+01
+    0.63009668E+04    0.76280000E+04    0.26249399E+02
+    0.62620000E+04    0.72679463E+04    0.00000000E+00
+    0.61470000E+04    0.76948931E+04    0.23845200E+02
+    0.61710000E+04    0.76731069E+04    0.42729998E+01
+    0.62481250E+04    0.73430000E+04    0.00000000E+00
+    0.61130000E+04    0.75520000E+04    0.11608800E+02
+    0.61060000E+04    0.75760000E+04    0.11608800E+02
+    0.65660000E+04    0.72965000E+04    0.15295200E+02
+    0.65485000E+04    0.73126665E+04    0.15295200E+02
+    0.66175000E+04    0.77106274E+04    0.00000000E+00
+    0.66000000E+04    0.72820000E+04    0.72311001E+01
+    0.65850000E+04    0.72910000E+04    0.72311001E+01
+    0.66075000E+04    0.72420249E+04    0.00000000E+00
+    0.62940000E+04    0.74090000E+04    0.41591001E+01
+    0.64163789E+04    0.75540000E+04    0.13400600E+02
+    0.66470000E+04    0.72745957E+04    0.00000000E+00
+    0.65971162E+04    0.73818125E+04    0.00000000E+00
+    0.63799780E+04    0.73348906E+04    0.18084999E+02
+    0.65993276E+04    0.74551250E+04    0.10077300E+02
+    0.61005000E+04    0.76884014E+04    0.00000000E+00
+    0.64135000E+04    0.76583184E+04    0.13400600E+02
+    0.60081050E+04    0.74098125E+04    0.00000000E+00
+    0.60620737E+04    0.76040000E+04    0.00000000E+00
+    0.63370000E+04    0.76455000E+04    0.20453400E+02
+    0.63050352E+04    0.75055996E+04    0.00000000E+00
+    0.61663569E+04    0.76505000E+04    0.42729998E+01
+    0.65585000E+04    0.74047856E+04    0.10077300E+02
+    0.63808203E+04    0.72960000E+04    0.18084999E+02
+    0.62440000E+04    0.75598291E+04    0.40000000E+01
+    0.65100000E+04    0.76412773E+04    0.00000000E+00
+    0.66566460E+04    0.72930000E+04    0.69106998E+01
+    0.61490000E+04    0.76861514E+04    0.00000000E+00
+    0.65930000E+04    0.73407358E+04    0.00000000E+00
+    0.64685117E+04    0.76890000E+04    0.00000000E+00
+    0.64164849E+04    0.75388828E+04    0.13400600E+02
+    0.61245000E+04    0.72985000E+04    0.00000000E+00
+    0.63900000E+04    0.76182500E+04    0.13400600E+02
+    0.64159375E+04    0.76113750E+04    0.13400600E+02
+    0.66590000E+04    0.75470000E+04    0.13373600E+02
+    0.60865000E+04    0.73877002E+04    0.00000000E+00
+    0.60898638E+04    0.73765962E+04    0.00000000E+00
+    0.65060000E+04    0.73420000E+04    0.28794500E+02
+    0.62372500E+04    0.73220000E+04    0.20208001E+01
+    0.65935000E+04    0.73791670E+04    0.00000000E+00
+    0.65860000E+04    0.73780000E+04    0.10077300E+02
+    0.65747271E+04    0.73800000E+04    0.10077300E+02
+    0.65898071E+04    0.73782168E+04    0.00000000E+00
+    0.66290000E+04    0.74830000E+04    0.19451900E+02
+    0.63798989E+04    0.73109531E+04    0.18084999E+02
+    0.63816704E+04    0.73156406E+04    0.18084999E+02
+    0.65288652E+04    0.75015952E+04    0.00000000E+00
+    0.64970000E+04    0.75125015E+04    0.00000000E+00
+    0.65460000E+04    0.74946362E+04    0.00000000E+00
+    0.65667954E+04    0.75001621E+04    0.00000000E+00
+    0.65670000E+04    0.75880000E+04    0.17967400E+02
+    0.65750000E+04    0.75562188E+04    0.17967400E+02
+    0.59468418E+04    0.76805000E+04    0.00000000E+00
+    0.58170000E+04    0.79555000E+04    0.00000000E+00
+    0.58591099E+04    0.77709756E+04    0.00000000E+00
+    0.63792935E+04    0.73318516E+04    0.18084999E+02
+    0.62387500E+04    0.75587124E+04    0.40000000E+01
+    0.60478638E+04    0.74382500E+04    0.00000000E+00
+    0.61430000E+04    0.76945137E+04    0.23845200E+02
+    0.61836470E+04    0.74200000E+04    0.00000000E+00
+    0.61856455E+04    0.74561357E+04    0.00000000E+00
+    0.63342500E+04    0.76270786E+04    0.00000000E+00
+    0.62480000E+04    0.77581396E+04    0.00000000E+00
+    0.67850381E+04    0.74683477E+04    0.00000000E+00
+    0.63085972E+04    0.76260000E+04    0.00000000E+00
+    0.66630000E+04    0.72783657E+04    0.00000000E+00
+    0.63785391E+04    0.75750000E+04    0.00000000E+00
+    0.65900000E+04    0.73856040E+04    0.10077300E+02
+    0.61690000E+04    0.76806240E+04    0.00000000E+00
+    0.61571260E+04    0.75400000E+04    0.00000000E+00
+    0.64850000E+04    0.76352563E+04    0.00000000E+00
+    0.65969712E+04    0.73782168E+04    0.00000000E+00
+    0.63880000E+04    0.74580000E+04    0.50467800E+02
+    0.65460000E+04    0.72890000E+04    0.15295200E+02
+    0.64090000E+04    0.73740000E+04    0.18084999E+02
+    0.64180000E+04    0.73950000E+04    0.76950002E+01
+    0.64105000E+04    0.74150000E+04    0.76950002E+01
+    0.64040000E+04    0.74360000E+04    0.50467800E+02
+    0.62437500E+04    0.73220000E+04    0.20208001E+01
+    0.60900000E+04    0.75720000E+04    0.11608800E+02
+    0.63097500E+04    0.74170000E+04    0.11602600E+02
+    0.62340000E+04    0.73200000E+04    0.20208001E+01
+    0.63024287E+04    0.74282856E+04    0.00000000E+00
+    0.62848501E+04    0.74400977E+04    0.00000000E+00
+    0.64980000E+04    0.76600000E+04    0.57002701E+02
+    0.64950000E+04    0.76457891E+04    0.00000000E+00
+    0.64563203E+04    0.75758696E+04    0.00000000E+00
+    0.62580000E+04    0.73115317E+04    0.80868998E+01
+    0.62661753E+04    0.74140000E+04    0.00000000E+00
+    0.66245938E+04    0.73179399E+04    0.69106998E+01
+    0.61090000E+04    0.73960000E+04    0.20737499E+02
+    0.61530000E+04    0.73730000E+04    0.43105001E+01
+    0.61327388E+04    0.73920000E+04    0.00000000E+00
+    0.65190000E+04    0.77446885E+04    0.00000000E+00
+    0.65527573E+04    0.77518188E+04    0.00000000E+00
+    0.65870322E+04    0.78183301E+04    0.00000000E+00
+    0.61670000E+04    0.76736079E+04    0.42729998E+01
+    0.66268384E+04    0.74360000E+04    0.19451900E+02
+    0.63610000E+04    0.75250000E+04    0.58837601E+02
+    0.64935000E+04    0.77225000E+04    0.57002701E+02
+    0.64010000E+04    0.74684375E+04    0.50467800E+02
+    0.63020000E+04    0.73439482E+04    0.00000000E+00
+    0.62917500E+04    0.76020000E+04    0.00000000E+00
+    0.62143662E+04    0.76873945E+04    0.00000000E+00
+    0.63621553E+04    0.75026060E+04    0.00000000E+00
+    0.66469375E+04    0.73247109E+04    0.69106998E+01
+    0.61020000E+04    0.75950000E+04    0.53643999E+01
+    0.60940000E+04    0.76110000E+04    0.53643999E+01
+    0.61142998E+04    0.76150000E+04    0.00000000E+00
+    0.62558569E+04    0.76650000E+04    0.26249399E+02
+    0.60730000E+04    0.75675435E+04    0.11608800E+02
+    0.63705381E+04    0.75770000E+04    0.58837601E+02
+    0.61190000E+04    0.76715381E+04    0.11682000E+02
+    0.62850000E+04    0.75255039E+04    0.00000000E+00
+    0.62810000E+04    0.75333721E+04    0.24962400E+02
+    0.62460000E+04    0.72740073E+04    0.00000000E+00
+    0.61130000E+04    0.75600000E+04    0.11608800E+02
+    0.61377822E+04    0.75560000E+04    0.00000000E+00
+    0.60975000E+04    0.75560000E+04    0.11608800E+02
+    0.62317856E+04    0.73172144E+04    0.00000000E+00
+    0.62262002E+04    0.73134146E+04    0.00000000E+00
+    0.65038887E+04    0.77154136E+04    0.57002701E+02
+    0.62160898E+04    0.73199575E+04    0.00000000E+00
+    0.60504375E+04    0.73204297E+04    0.00000000E+00
+    0.60391250E+04    0.73600000E+04    0.00000000E+00
+    0.63060000E+04    0.72980000E+04    0.80868998E+01
+    0.60170000E+04    0.75520000E+04    0.65932999E+01
+    0.60290000E+04    0.75550000E+04    0.11608800E+02
+    0.60290000E+04    0.75630000E+04    0.11608800E+02
+    0.60510000E+04    0.76150000E+04    0.92503996E+01
+    0.60619092E+04    0.76175000E+04    0.00000000E+00
+    0.60430000E+04    0.76200000E+04    0.92503996E+01
+    0.60535000E+04    0.76400000E+04    0.91637001E+01
+    0.60780000E+04    0.76970000E+04    0.13893400E+02
+    0.64320000E+04    0.73485000E+04    0.18084999E+02
+    0.64305000E+04    0.75560000E+04    0.13400600E+02
+    0.64305000E+04    0.75520000E+04    0.13400600E+02
+    0.64330000E+04    0.75520000E+04    0.13400600E+02
+    0.64370000E+04    0.75360000E+04    0.13400600E+02
+    0.64370000E+04    0.75440000E+04    0.13400600E+02
+    0.64370000E+04    0.75720000E+04    0.13400600E+02
+    0.64317500E+04    0.75463750E+04    0.13400600E+02
+    0.64600176E+04    0.75305000E+04    0.00000000E+00
+    0.65340000E+04    0.75470000E+04    0.17967400E+02
+    0.62400000E+04    0.73620000E+04    0.46296000E+01
+    0.63655000E+04    0.73207002E+04    0.00000000E+00
+    0.63720000E+04    0.73360000E+04    0.34500000E+01
+    0.63707500E+04    0.73426519E+04    0.00000000E+00
+    0.65180000E+04    0.73900000E+04    0.19800100E+02
+    0.65056177E+04    0.73925000E+04    0.19800100E+02
+    0.65276577E+04    0.73925000E+04    0.00000000E+00
+    0.66650000E+04    0.77813711E+04    0.00000000E+00
+    0.68550000E+04    0.79555000E+04    0.00000000E+00
+    0.67823813E+04    0.78108105E+04    0.00000000E+00
+    0.60974653E+04    0.73928447E+04    0.20737499E+02
+    0.61944453E+04    0.72490972E+04    0.00000000E+00
+    0.66210000E+04    0.74063335E+04    0.00000000E+00
+    0.66933271E+04    0.73045000E+04    0.00000000E+00
+    0.61303911E+04    0.73285000E+04    0.00000000E+00
+    0.65475000E+04    0.73660186E+04    0.00000000E+00
+    0.61094092E+04    0.77145000E+04    0.00000000E+00
+    0.67145986E+04    0.74229424E+04    0.00000000E+00
+    0.65814170E+04    0.74020000E+04    0.10077300E+02
+    0.62294834E+04    0.75490000E+04    0.00000000E+00
+    0.60240000E+04    0.75078623E+04    0.00000000E+00
+    0.62424268E+04    0.76650000E+04    0.00000000E+00
+    0.60733071E+04    0.73340000E+04    0.00000000E+00
+    0.61736401E+04    0.76667852E+04    0.42729998E+01
+    0.65755000E+04    0.72503335E+04    0.00000000E+00
+    0.64168325E+04    0.75677925E+04    0.13400600E+02
+    0.60771709E+04    0.73879219E+04    0.00000000E+00
+    0.65870000E+04    0.75035967E+04    0.00000000E+00
+    0.61055000E+04    0.76066299E+04    0.00000000E+00
+    0.64501216E+04    0.75400000E+04    0.00000000E+00
+    0.60990000E+04    0.73120000E+04    0.10311100E+02
+    0.61234678E+04    0.75862339E+04    0.00000000E+00
+    0.63405000E+04    0.73205000E+04    0.00000000E+00
+    0.63280000E+04    0.74525000E+04    0.14619700E+02
+    0.63540000E+04    0.74610000E+04    0.14619700E+02
+    0.65370000E+04    0.73970000E+04    0.10077300E+02
+    0.60520000E+04    0.77070815E+04    0.13893400E+02
+    0.62430000E+04    0.75081279E+04    0.00000000E+00
+    0.66590811E+04    0.73890835E+04    0.19451900E+02
+    0.65650000E+04    0.74840000E+04    0.10077300E+02
+    0.60201191E+04    0.76160000E+04    0.00000000E+00
+    0.65960000E+04    0.75880000E+04    0.17967400E+02
+    0.65895000E+04    0.76105464E+04    0.00000000E+00
+    0.61308066E+04    0.74785767E+04    0.00000000E+00
+    0.61369902E+04    0.74679019E+04    0.00000000E+00
+    0.64432583E+04    0.75540000E+04    0.00000000E+00
+    0.64465435E+04    0.75652300E+04    0.00000000E+00
+    0.60310000E+04    0.74280000E+04    0.24611001E+01
+    0.60437627E+04    0.74260000E+04    0.00000000E+00
+    0.64024678E+04    0.75890000E+04    0.13400600E+02
+    0.60529326E+04    0.75549478E+04    0.11608800E+02
+    0.63445000E+04    0.76028105E+04    0.58837601E+02
+    0.61183750E+04    0.77040000E+04    0.00000000E+00
+    0.62540000E+04    0.73290000E+04    0.19722000E+01
+    0.62550000E+04    0.73350000E+04    0.19722000E+01
+    0.61210000E+04    0.76791240E+04    0.00000000E+00
+    0.61750000E+04    0.76812119E+04    0.00000000E+00
+    0.61780000E+04    0.76900000E+04    0.23845200E+02
+    0.61930000E+04    0.77060000E+04    0.23845200E+02
+    0.61755000E+04    0.77034614E+04    0.23845200E+02
+    0.62161382E+04    0.77110000E+04    0.00000000E+00
+    0.61496201E+04    0.77010083E+04    0.23845200E+02
+    0.66050000E+04    0.72943198E+04    0.72311001E+01
+    0.66220000E+04    0.72599956E+04    0.00000000E+00
+    0.66348999E+04    0.72707612E+04    0.00000000E+00
+    0.65590000E+04    0.76129536E+04    0.00000000E+00
+    0.65338999E+04    0.72890000E+04    0.00000000E+00
+    0.64927729E+04    0.77290000E+04    0.00000000E+00
+    0.64924414E+04    0.77407266E+04    0.00000000E+00
+    0.64777295E+04    0.77697100E+04    0.00000000E+00
+    0.64719692E+04    0.77484761E+04    0.00000000E+00
+    0.62375000E+04    0.73700371E+04    0.00000000E+00
+    0.62189619E+04    0.73713960E+04    0.00000000E+00
+    0.65658770E+04    0.74634277E+04    0.10077300E+02
+    0.60372246E+04    0.74260000E+04    0.00000000E+00
+    0.63155000E+04    0.75235000E+04    0.00000000E+00
+    0.61680000E+04    0.77280000E+04    0.23845200E+02
+    0.61640000E+04    0.77543970E+04    0.00000000E+00
+    0.61640000E+04    0.77408955E+04    0.00000000E+00
+    0.65250000E+04    0.72870000E+04    0.28794500E+02
+    0.65090000E+04    0.72830000E+04    0.28794500E+02
+    0.65037500E+04    0.72507954E+04    0.00000000E+00
+    0.65170000E+04    0.72830000E+04    0.28794500E+02
+    0.65210000E+04    0.72625264E+04    0.00000000E+00
+    0.62510000E+04    0.75570000E+04    0.00000000E+00
+    0.62555000E+04    0.75550000E+04    0.24962400E+02
+    0.62550513E+04    0.75618677E+04    0.00000000E+00
+    0.62572500E+04    0.75489990E+04    0.24962400E+02
+    0.62705000E+04    0.75550000E+04    0.24962400E+02
+    0.62600000E+04    0.73200000E+04    0.20208001E+01
+    0.62670908E+04    0.73210000E+04    0.00000000E+00
+    0.62634751E+04    0.73210000E+04    0.00000000E+00
+    0.63750000E+04    0.72920000E+04    0.00000000E+00
+    0.63731768E+04    0.72858535E+04    0.00000000E+00
+    0.66560000E+04    0.75026221E+04    0.00000000E+00
+    0.60080000E+04    0.72313145E+04    0.00000000E+00
+    0.64953711E+04    0.73165000E+04    0.28794500E+02
+    0.64913569E+04    0.72992290E+04    0.28794500E+02
+    0.64913569E+04    0.73295586E+04    0.28794500E+02
+    0.65900000E+04    0.73360000E+04    0.69106998E+01
+    0.65860000E+04    0.73320000E+04    0.69106998E+01
+    0.65895000E+04    0.73395000E+04    0.00000000E+00
+    0.65895000E+04    0.73325000E+04    0.69106998E+01
+    0.65660000E+04    0.73255000E+04    0.15295200E+02
+    0.65752002E+04    0.73340000E+04    0.00000000E+00
+    0.65895000E+04    0.73377144E+04    0.00000000E+00
+    0.65895000E+04    0.73342856E+04    0.69106998E+01
+    0.62780000E+04    0.72962598E+04    0.80868998E+01
+    0.66201919E+04    0.74503750E+04    0.19451900E+02
+    0.62480000E+04    0.74870000E+04    0.53274999E+01
+    0.60749312E+04    0.73450347E+04    0.00000000E+00
+    0.66510000E+04    0.73030000E+04    0.69106998E+01
+    0.66575786E+04    0.73040000E+04    0.69106998E+01
+    0.66450000E+04    0.73030000E+04    0.72311001E+01
+    0.66542134E+04    0.73040000E+04    0.69106998E+01
+    0.65160000E+04    0.73250000E+04    0.28794500E+02
+    0.67313936E+04    0.72461265E+04    0.00000000E+00
+    0.62574907E+04    0.75836328E+04    0.00000000E+00
+    0.62490000E+04    0.73190469E+04    0.20208001E+01
+    0.65310000E+04    0.73150000E+04    0.15295200E+02
+    0.66330000E+04    0.72950000E+04    0.72311001E+01
+    0.63634521E+04    0.72965000E+04    0.00000000E+00
+    0.63524199E+04    0.72891812E+04    0.00000000E+00
+    0.63301704E+04    0.72779834E+04    0.00000000E+00
+    0.63070000E+04    0.75580000E+04    0.24962400E+02
+    0.62947402E+04    0.75545000E+04    0.24962400E+02
+    0.63812085E+04    0.75660000E+04    0.00000000E+00
+    0.60880000E+04    0.75880239E+04    0.53643999E+01
+    0.62930000E+04    0.74120000E+04    0.41591001E+01
+    0.62830000E+04    0.74140000E+04    0.41591001E+01
+    0.62895000E+04    0.74190000E+04    0.41591001E+01
+    0.62745879E+04    0.74165000E+04    0.00000000E+00
+    0.62645420E+04    0.74348989E+04    0.00000000E+00
+    0.62862500E+04    0.74293447E+04    0.00000000E+00
+    0.65334756E+04    0.76336494E+04    0.00000000E+00
+    0.62390000E+04    0.73191040E+04    0.20208001E+01
+    0.62450000E+04    0.73190469E+04    0.20208001E+01
+    0.61850000E+04    0.73570000E+04    0.43105001E+01
+    0.61250684E+04    0.75560000E+04    0.00000000E+00
+    0.64272500E+04    0.75660498E+04    0.13400600E+02
+    0.60636616E+04    0.73817139E+04    0.00000000E+00
+    0.61441118E+04    0.77102456E+04    0.23845200E+02
+    0.63235264E+04    0.75067988E+04    0.00000000E+00
+    0.62620000E+04    0.73170000E+04    0.00000000E+00
+    0.62670000E+04    0.73150000E+04    0.80868998E+01
+    0.62640000E+04    0.74870000E+04    0.53274999E+01
+    0.66480000E+04    0.73040000E+04    0.00000000E+00
+    0.66390000E+04    0.73010000E+04    0.72311001E+01
+    0.61314253E+04    0.75366592E+04    0.00000000E+00
+    0.60330000E+04    0.76040000E+04    0.92503996E+01
+    0.60172437E+04    0.76000000E+04    0.00000000E+00
+    0.64909102E+04    0.74485000E+04    0.19800100E+02
+    0.65322617E+04    0.73385000E+04    0.00000000E+00
+    0.63770000E+04    0.73156406E+04    0.18084999E+02
+    0.63740000E+04    0.73140000E+04    0.40000000E+01
+    0.63793354E+04    0.73149922E+04    0.18084999E+02
+    0.63746968E+04    0.73162891E+04    0.00000000E+00
+    0.63956113E+04    0.75400000E+04    0.13400600E+02
+    0.63740000E+04    0.73266748E+04    0.00000000E+00
+    0.63208242E+04    0.74307778E+04    0.00000000E+00
+    0.60250000E+04    0.73751357E+04    0.00000000E+00
+    0.60011768E+04    0.73720127E+04    0.00000000E+00
+    0.63880000E+04    0.77797300E+04    0.00000000E+00
+    0.63793887E+04    0.72997969E+04    0.18084999E+02
+    0.62510000E+04    0.75520254E+04    0.24962400E+02
+    0.60112124E+04    0.74245625E+04    0.00000000E+00
+    0.65347104E+04    0.73740000E+04    0.00000000E+00
+    0.66801006E+04    0.72694565E+04    0.00000000E+00
+    0.66998618E+04    0.72448521E+04    0.00000000E+00
+    0.58817437E+04    0.73237085E+04    0.00000000E+00
+    0.62326665E+04    0.75588428E+04    0.00000000E+00
+    0.62326665E+04    0.75521572E+04    0.00000000E+00
+    0.62372271E+04    0.76520000E+04    0.00000000E+00
+    0.62210942E+04    0.76512168E+04    0.00000000E+00
+    0.65384678E+04    0.74645000E+04    0.10077300E+02
+    0.61360854E+04    0.76520000E+04    0.11682000E+02
+    0.62389917E+04    0.76751558E+04    0.00000000E+00
+    0.60409751E+04    0.75590000E+04    0.11608800E+02
+    0.61805000E+04    0.76974272E+04    0.23845200E+02
+    0.65037500E+04    0.72673257E+04    0.00000000E+00
+    0.65800444E+04    0.73300000E+04    0.00000000E+00
+    0.65868931E+04    0.73386069E+04    0.00000000E+00
+    0.65797485E+04    0.73395972E+04    0.00000000E+00
+    0.66558960E+04    0.73090098E+04    0.69106998E+01
+    0.66576895E+04    0.73204395E+04    0.69106998E+01
+    0.63420000E+04    0.74360000E+04    0.14619700E+02
+    0.63930000E+04    0.75610000E+04    0.13400600E+02
+    0.63960000E+04    0.76835000E+04    0.13400600E+02
+    0.64090137E+04    0.76792500E+04    0.13400600E+02
+    0.64370000E+04    0.76820000E+04    0.13400600E+02
+    0.63770000E+04    0.73372813E+04    0.18084999E+02
+    0.63800884E+04    0.73380781E+04    0.18084999E+02
+    0.63874067E+04    0.73419238E+04    0.18084999E+02
+    0.63746582E+04    0.73380781E+04    0.00000000E+00
+    0.63770000E+04    0.73420625E+04    0.18084999E+02
+    0.63822256E+04    0.73436563E+04    0.18084999E+02
+    0.63885981E+04    0.73541016E+04    0.18084999E+02
+    0.62991387E+04    0.75372500E+04    0.24962400E+02
+    0.66028726E+04    0.73920259E+04    0.00000000E+00
+    0.62253091E+04    0.73320000E+04    0.00000000E+00
+    0.62207124E+04    0.73463159E+04    0.00000000E+00
+    0.65976680E+04    0.74220000E+04    0.10077300E+02
+    0.63160000E+04    0.76390000E+04    0.20453400E+02
+    0.63099546E+04    0.76370000E+04    0.00000000E+00
+    0.63182813E+04    0.75690000E+04    0.00000000E+00
+    0.59537515E+04    0.75321035E+04    0.00000000E+00
+    0.66002217E+04    0.73628750E+04    0.00000000E+00
+    0.63827856E+04    0.75580000E+04    0.00000000E+00
+    0.60770000E+04    0.75748662E+04    0.00000000E+00
+    0.63490576E+04    0.76412500E+04    0.00000000E+00
+    0.60687515E+04    0.74544609E+04    0.00000000E+00
+    0.65540000E+04    0.72820000E+04    0.15295200E+02
+    0.65500000E+04    0.72566060E+04    0.00000000E+00
+    0.65500000E+04    0.72696182E+04    0.00000000E+00
+    0.61205322E+04    0.73920000E+04    0.00000000E+00
+    0.65895000E+04    0.75694663E+04    0.17967400E+02
+    0.61780000E+04    0.73821538E+04    0.43105001E+01
+    0.67174629E+04    0.72000854E+04    0.00000000E+00
+    0.68550000E+04    0.70575000E+04    0.00000000E+00
+    0.67685000E+04    0.70575000E+04    0.00000000E+00
+    0.67430605E+04    0.71288208E+04    0.00000000E+00
+    0.64799258E+04    0.72590605E+04    0.00000000E+00
+    0.63287500E+04    0.76448086E+04    0.20453400E+02
+    0.60115000E+04    0.76940000E+04    0.13893400E+02
+    0.60180000E+04    0.77310000E+04    0.13893400E+02
+    0.60295000E+04    0.77874092E+04    0.00000000E+00
+    0.62560000E+04    0.75980000E+04    0.26249399E+02
+    0.62763999E+04    0.75940000E+04    0.00000000E+00
+    0.62754502E+04    0.75825000E+04    0.00000000E+00
+    0.62677671E+04    0.75889238E+04    0.00000000E+00
+    0.65370000E+04    0.72990000E+04    0.15295200E+02
+    0.65390000E+04    0.72928994E+04    0.00000000E+00
+    0.66030000E+04    0.76450000E+04    0.76271000E+01
+    0.66220000E+04    0.76490000E+04    0.00000000E+00
+    0.60420000E+04    0.73440000E+04    0.62500000E+01
+    0.67605122E+04    0.76402500E+04    0.00000000E+00
+    0.63805000E+04    0.75153062E+04    0.00000000E+00
+    0.60640000E+04    0.73510000E+04    0.10311100E+02
+    0.60620000E+04    0.73434561E+04    0.00000000E+00
+    0.63280000E+04    0.76370000E+04    0.20453400E+02
+    0.63270000E+04    0.76410366E+04    0.20453400E+02
+    0.63223813E+04    0.76454712E+04    0.20453400E+02
+    0.63265952E+04    0.76550410E+04    0.20453400E+02
+    0.63710000E+04    0.72965000E+04    0.40000000E+01
+    0.63672261E+04    0.72977500E+04    0.00000000E+00
+    0.63634521E+04    0.73028223E+04    0.00000000E+00
+    0.63710000E+04    0.73015000E+04    0.40000000E+01
+    0.63673291E+04    0.73027500E+04    0.00000000E+00
+    0.63710000E+04    0.73065000E+04    0.40000000E+01
+    0.63659722E+04    0.73077500E+04    0.00000000E+00
+    0.63710000E+04    0.73120000E+04    0.40000000E+01
+    0.63658447E+04    0.73130000E+04    0.00000000E+00
+    0.63068071E+04    0.72534082E+04    0.00000000E+00
+    0.63090273E+04    0.72018760E+04    0.00000000E+00
+    0.63280659E+04    0.77674790E+04    0.00000000E+00
+    0.63770000E+04    0.74810000E+04    0.50467800E+02
+    0.63653911E+04    0.74830000E+04    0.00000000E+00
+    0.63713682E+04    0.74830000E+04    0.00000000E+00
+    0.63683794E+04    0.74933218E+04    0.00000000E+00
+    0.61635986E+04    0.76603867E+04    0.42729998E+01
+    0.63058750E+04    0.74119399E+04    0.11602600E+02
+    0.66309097E+04    0.73265996E+04    0.69106998E+01
+    0.61009570E+04    0.74046250E+04    0.20737499E+02
+    0.60960000E+04    0.75895000E+04    0.53643999E+01
+    0.59626709E+04    0.73787441E+04    0.00000000E+00
+    0.59028721E+04    0.73796572E+04    0.00000000E+00
+    0.60055122E+04    0.74402720E+04    0.00000000E+00
+    0.66963936E+04    0.72833247E+04    0.00000000E+00
+    0.64041372E+04    0.75650000E+04    0.13400600E+02
+    0.66181875E+04    0.73673696E+04    0.00000000E+00
+    0.59459517E+04    0.77997529E+04    0.00000000E+00
+    0.60065000E+04    0.77627212E+04    0.00000000E+00
+    0.60681250E+04    0.73650000E+04    0.10311100E+02
+    0.63297500E+04    0.76332500E+04    0.00000000E+00
+    0.63710000E+04    0.76980000E+04    0.00000000E+00
+    0.63710000E+04    0.77300000E+04    0.00000000E+00
+    0.63870000E+04    0.76980000E+04    0.00000000E+00
+    0.64050000E+04    0.77300000E+04    0.00000000E+00
+    0.64390000E+04    0.77300000E+04    0.00000000E+00
+    0.64390000E+04    0.77120000E+04    0.00000000E+00
+    0.64210000E+04    0.77120000E+04    0.00000000E+00
+    0.64030000E+04    0.77120000E+04    0.00000000E+00
+    0.64030000E+04    0.77050000E+04    0.00000000E+00
+    0.63870000E+04    0.77050000E+04    0.00000000E+00
+    0.62380000E+04    0.77220000E+04    0.00000000E+00
+    0.62580000E+04    0.77220000E+04    0.00000000E+00
+    0.62380000E+04    0.76890000E+04    0.00000000E+00
+    0.62780000E+04    0.77220000E+04    0.00000000E+00
+    0.62780000E+04    0.76890000E+04    0.00000000E+00
+    0.62620000E+04    0.76890000E+04    0.00000000E+00
+    0.62540000E+04    0.76890000E+04    0.00000000E+00
+    0.61730000E+04    0.76900000E+04    0.00000000E+00
+    0.61780000E+04    0.76900000E+04    0.00000000E+00
+    0.61640000E+04    0.76900000E+04    0.00000000E+00
+    0.61480000E+04    0.76900000E+04    0.00000000E+00
+    0.61480000E+04    0.76910000E+04    0.00000000E+00
+    0.61500000E+04    0.76900000E+04    0.00000000E+00
+    0.61460000E+04    0.76910000E+04    0.00000000E+00
+    0.61360000E+04    0.76910000E+04    0.00000000E+00
+    0.61360000E+04    0.77000000E+04    0.00000000E+00
+    0.61420000E+04    0.76910000E+04    0.00000000E+00
+    0.61310000E+04    0.77000000E+04    0.00000000E+00
+    0.61310000E+04    0.77080000E+04    0.00000000E+00
+    0.61310000E+04    0.77210000E+04    0.00000000E+00
+    0.61440000E+04    0.77210000E+04    0.00000000E+00
+    0.61600000E+04    0.77210000E+04    0.00000000E+00
+    0.61600000E+04    0.77280000E+04    0.00000000E+00
+    0.61680000E+04    0.77280000E+04    0.00000000E+00
+    0.61810000E+04    0.77280000E+04    0.00000000E+00
+    0.61810000E+04    0.77160000E+04    0.00000000E+00
+    0.61930000E+04    0.77160000E+04    0.00000000E+00
+    0.61930000E+04    0.77060000E+04    0.00000000E+00
+    0.61930000E+04    0.76900000E+04    0.00000000E+00
+    0.61830000E+04    0.76900000E+04    0.00000000E+00
+    0.62920000E+04    0.77220000E+04    0.00000000E+00
+    0.62920000E+04    0.76890000E+04    0.00000000E+00
+    0.63330000E+04    0.77220000E+04    0.00000000E+00
+    0.63330000E+04    0.76890000E+04    0.00000000E+00
+    0.63080000E+04    0.76890000E+04    0.00000000E+00
+    0.60280000E+04    0.76820000E+04    0.00000000E+00
+    0.60280000E+04    0.76940000E+04    0.00000000E+00
+    0.60440000E+04    0.76820000E+04    0.00000000E+00
+    0.60115000E+04    0.76940000E+04    0.00000000E+00
+    0.59950000E+04    0.76940000E+04    0.00000000E+00
+    0.59950000E+04    0.77310000E+04    0.00000000E+00
+    0.60180000E+04    0.77310000E+04    0.00000000E+00
+    0.60870000E+04    0.77310000E+04    0.00000000E+00
+    0.60870000E+04    0.77120000E+04    0.00000000E+00
+    0.60410000E+04    0.77310000E+04    0.00000000E+00
+    0.60780000E+04    0.77120000E+04    0.00000000E+00
+    0.60780000E+04    0.76970000E+04    0.00000000E+00
+    0.60780000E+04    0.76820000E+04    0.00000000E+00
+    0.60600000E+04    0.76820000E+04    0.00000000E+00
+    0.66090000E+04    0.76780000E+04    0.00000000E+00
+    0.66260000E+04    0.76780000E+04    0.00000000E+00
+    0.66090000E+04    0.76680000E+04    0.00000000E+00
+    0.66260000E+04    0.76680000E+04    0.00000000E+00
+    0.65230000E+04    0.76560000E+04    0.00000000E+00
+    0.65140000E+04    0.76560000E+04    0.00000000E+00
+    0.65230000E+04    0.76780000E+04    0.00000000E+00
+    0.65060000E+04    0.76560000E+04    0.00000000E+00
+    0.65060000E+04    0.76600000E+04    0.00000000E+00
+    0.64980000E+04    0.76600000E+04    0.00000000E+00
+    0.64780000E+04    0.76600000E+04    0.00000000E+00
+    0.64920000E+04    0.76600000E+04    0.00000000E+00
+    0.64780000E+04    0.76735000E+04    0.00000000E+00
+    0.64780000E+04    0.76870000E+04    0.00000000E+00
+    0.64780000E+04    0.76830000E+04    0.00000000E+00
+    0.64760000E+04    0.76870000E+04    0.00000000E+00
+    0.64760000E+04    0.76910000E+04    0.00000000E+00
+    0.64760000E+04    0.77100000E+04    0.00000000E+00
+    0.64760000E+04    0.77030000E+04    0.00000000E+00
+    0.64830000E+04    0.77100000E+04    0.00000000E+00
+    0.64830000E+04    0.77180000E+04    0.00000000E+00
+    0.64880000E+04    0.77180000E+04    0.00000000E+00
+    0.64935000E+04    0.77225000E+04    0.00000000E+00
+    0.64990000E+04    0.77270000E+04    0.00000000E+00
+    0.64990000E+04    0.77310000E+04    0.00000000E+00
+    0.65070000E+04    0.77310000E+04    0.00000000E+00
+    0.65230000E+04    0.77310000E+04    0.00000000E+00
+    0.65150000E+04    0.77310000E+04    0.00000000E+00
+    0.65230000E+04    0.77120000E+04    0.00000000E+00
+    0.65300000E+04    0.77120000E+04    0.00000000E+00
+    0.65300000E+04    0.76940000E+04    0.00000000E+00
+    0.65230000E+04    0.76940000E+04    0.00000000E+00
+    0.59950000E+04    0.76400000E+04    0.00000000E+00
+    0.60340000E+04    0.76400000E+04    0.00000000E+00
+    0.59950000E+04    0.76670000E+04    0.00000000E+00
+    0.60180000E+04    0.76670000E+04    0.00000000E+00
+    0.60730000E+04    0.76670000E+04    0.00000000E+00
+    0.60570000E+04    0.76670000E+04    0.00000000E+00
+    0.60730000E+04    0.76400000E+04    0.00000000E+00
+    0.60535000E+04    0.76400000E+04    0.00000000E+00
+    0.61480000E+04    0.76400000E+04    0.00000000E+00
+    0.61480000E+04    0.76480000E+04    0.00000000E+00
+    0.61320000E+04    0.76400000E+04    0.00000000E+00
+    0.60970000E+04    0.76400000E+04    0.00000000E+00
+    0.60970000E+04    0.76590000E+04    0.00000000E+00
+    0.61160000E+04    0.76400000E+04    0.00000000E+00
+    0.60970000E+04    0.76750000E+04    0.00000000E+00
+    0.61040000E+04    0.76750000E+04    0.00000000E+00
+    0.61200000E+04    0.76750000E+04    0.00000000E+00
+    0.61200000E+04    0.76760000E+04    0.00000000E+00
+    0.61180000E+04    0.76750000E+04    0.00000000E+00
+    0.61220000E+04    0.76760000E+04    0.00000000E+00
+    0.61480000E+04    0.76760000E+04    0.00000000E+00
+    0.61480000E+04    0.76660000E+04    0.00000000E+00
+    0.61360000E+04    0.76760000E+04    0.00000000E+00
+    0.61480000E+04    0.76560000E+04    0.00000000E+00
+    0.61530000E+04    0.76390000E+04    0.00000000E+00
+    0.61530000E+04    0.76470000E+04    0.00000000E+00
+    0.61740000E+04    0.76390000E+04    0.00000000E+00
+    0.61530000E+04    0.76700000E+04    0.00000000E+00
+    0.61600000E+04    0.76700000E+04    0.00000000E+00
+    0.61530000E+04    0.76620000E+04    0.00000000E+00
+    0.61600000E+04    0.76770000E+04    0.00000000E+00
+    0.61660000E+04    0.76770000E+04    0.00000000E+00
+    0.61720000E+04    0.76770000E+04    0.00000000E+00
+    0.61720000E+04    0.76780000E+04    0.00000000E+00
+    0.61700000E+04    0.76770000E+04    0.00000000E+00
+    0.61740000E+04    0.76780000E+04    0.00000000E+00
+    0.61950000E+04    0.76780000E+04    0.00000000E+00
+    0.61950000E+04    0.76620000E+04    0.00000000E+00
+    0.61880000E+04    0.76780000E+04    0.00000000E+00
+    0.61950000E+04    0.76390000E+04    0.00000000E+00
+    0.63160000E+04    0.76460000E+04    0.00000000E+00
+    0.63160000E+04    0.76390000E+04    0.00000000E+00
+    0.63160000E+04    0.76650000E+04    0.00000000E+00
+    0.63160000E+04    0.76740000E+04    0.00000000E+00
+    0.63330000E+04    0.76740000E+04    0.00000000E+00
+    0.63500000E+04    0.76740000E+04    0.00000000E+00
+    0.63500000E+04    0.76540000E+04    0.00000000E+00
+    0.63370000E+04    0.76540000E+04    0.00000000E+00
+    0.63370000E+04    0.76455000E+04    0.00000000E+00
+    0.63370000E+04    0.76370000E+04    0.00000000E+00
+    0.63315000E+04    0.76370000E+04    0.00000000E+00
+    0.63260000E+04    0.76370000E+04    0.00000000E+00
+    0.63280000E+04    0.76370000E+04    0.00000000E+00
+    0.63260000E+04    0.76350000E+04    0.00000000E+00
+    0.63220000E+04    0.76350000E+04    0.00000000E+00
+    0.63160000E+04    0.76350000E+04    0.00000000E+00
+    0.66480000E+04    0.77250000E+04    0.00000000E+00
+    0.66480000E+04    0.76930000E+04    0.00000000E+00
+    0.66820000E+04    0.77250000E+04    0.00000000E+00
+    0.66820000E+04    0.76685000E+04    0.00000000E+00
+    0.66820000E+04    0.76120000E+04    0.00000000E+00
+    0.66480000E+04    0.76120000E+04    0.00000000E+00
+    0.66480000E+04    0.76610000E+04    0.00000000E+00
+    0.62350000E+04    0.76160000E+04    0.00000000E+00
+    0.62350000E+04    0.76430000E+04    0.00000000E+00
+    0.62470000E+04    0.76160000E+04    0.00000000E+00
+    0.62460000E+04    0.76430000E+04    0.00000000E+00
+    0.62460000E+04    0.76490000E+04    0.00000000E+00
+    0.62460000E+04    0.76550000E+04    0.00000000E+00
+    0.62490000E+04    0.76550000E+04    0.00000000E+00
+    0.62490000E+04    0.76630000E+04    0.00000000E+00
+    0.62490000E+04    0.76790000E+04    0.00000000E+00
+    0.62610000E+04    0.76790000E+04    0.00000000E+00
+    0.62490000E+04    0.76670000E+04    0.00000000E+00
+    0.62770000E+04    0.76790000E+04    0.00000000E+00
+    0.62770000E+04    0.76730000E+04    0.00000000E+00
+    0.62840000E+04    0.76730000E+04    0.00000000E+00
+    0.62840000E+04    0.76800000E+04    0.00000000E+00
+    0.62920000E+04    0.76800000E+04    0.00000000E+00
+    0.63050000E+04    0.76800000E+04    0.00000000E+00
+    0.63050000E+04    0.76570000E+04    0.00000000E+00
+    0.63050000E+04    0.76250000E+04    0.00000000E+00
+    0.63050000E+04    0.76270000E+04    0.00000000E+00
+    0.63040000E+04    0.76250000E+04    0.00000000E+00
+    0.63040000E+04    0.76230000E+04    0.00000000E+00
+    0.63040000E+04    0.76070000E+04    0.00000000E+00
+    0.63040000E+04    0.76160000E+04    0.00000000E+00
+    0.62960000E+04    0.76070000E+04    0.00000000E+00
+    0.62720000E+04    0.76070000E+04    0.00000000E+00
+    0.62720000E+04    0.75980000E+04    0.00000000E+00
+    0.62880000E+04    0.76070000E+04    0.00000000E+00
+    0.62560000E+04    0.75980000E+04    0.00000000E+00
+    0.62470000E+04    0.75980000E+04    0.00000000E+00
+    0.62820000E+04    0.75960000E+04    0.00000000E+00
+    0.62820000E+04    0.75920000E+04    0.00000000E+00
+    0.62900000E+04    0.75960000E+04    0.00000000E+00
+    0.63040000E+04    0.75960000E+04    0.00000000E+00
+    0.63040000E+04    0.75920000E+04    0.00000000E+00
+    0.62970000E+04    0.75960000E+04    0.00000000E+00
+    0.63000000E+04    0.75920000E+04    0.00000000E+00
+    0.62875000E+04    0.75920000E+04    0.00000000E+00
+    0.60730000E+04    0.75820000E+04    0.00000000E+00
+    0.60730000E+04    0.76005000E+04    0.00000000E+00
+    0.60810000E+04    0.75820000E+04    0.00000000E+00
+    0.60730000E+04    0.76190000E+04    0.00000000E+00
+    0.60940000E+04    0.76190000E+04    0.00000000E+00
+    0.60940000E+04    0.76110000E+04    0.00000000E+00
+    0.60940000E+04    0.75950000E+04    0.00000000E+00
+    0.61020000E+04    0.75950000E+04    0.00000000E+00
+    0.61090000E+04    0.75950000E+04    0.00000000E+00
+    0.61090000E+04    0.75840000E+04    0.00000000E+00
+    0.61020000E+04    0.75840000E+04    0.00000000E+00
+    0.60940000E+04    0.75840000E+04    0.00000000E+00
+    0.60940000E+04    0.75820000E+04    0.00000000E+00
+    0.60980000E+04    0.75840000E+04    0.00000000E+00
+    0.60900000E+04    0.75820000E+04    0.00000000E+00
+    0.60330000E+04    0.75800000E+04    0.00000000E+00
+    0.60510000E+04    0.75800000E+04    0.00000000E+00
+    0.60330000E+04    0.75960000E+04    0.00000000E+00
+    0.60330000E+04    0.76120000E+04    0.00000000E+00
+    0.60330000E+04    0.76200000E+04    0.00000000E+00
+    0.60330000E+04    0.76040000E+04    0.00000000E+00
+    0.60430000E+04    0.76200000E+04    0.00000000E+00
+    0.60510000E+04    0.76200000E+04    0.00000000E+00
+    0.60510000E+04    0.76150000E+04    0.00000000E+00
+    0.60510000E+04    0.76070000E+04    0.00000000E+00
+    0.60470000E+04    0.76070000E+04    0.00000000E+00
+    0.60470000E+04    0.76010000E+04    0.00000000E+00
+    0.60510000E+04    0.76010000E+04    0.00000000E+00
+    0.60510000E+04    0.75930000E+04    0.00000000E+00
+    0.62360000E+04    0.75680000E+04    0.00000000E+00
+    0.62425000E+04    0.75680000E+04    0.00000000E+00
+    0.62360000E+04    0.75640000E+04    0.00000000E+00
+    0.62490000E+04    0.75680000E+04    0.00000000E+00
+    0.62490000E+04    0.75640000E+04    0.00000000E+00
+    0.62490000E+04    0.75560000E+04    0.00000000E+00
+    0.62470000E+04    0.75560000E+04    0.00000000E+00
+    0.62490000E+04    0.75600000E+04    0.00000000E+00
+    0.62360000E+04    0.75560000E+04    0.00000000E+00
+    0.62380000E+04    0.75560000E+04    0.00000000E+00
+    0.62360000E+04    0.75600000E+04    0.00000000E+00
+    0.59930000E+04    0.75680000E+04    0.00000000E+00
+    0.59930000E+04    0.75290000E+04    0.00000000E+00
+    0.60170000E+04    0.75680000E+04    0.00000000E+00
+    0.60170000E+04    0.75520000E+04    0.00000000E+00
+    0.60170000E+04    0.75290000E+04    0.00000000E+00
+    0.60290000E+04    0.75280000E+04    0.00000000E+00
+    0.60710000E+04    0.75280000E+04    0.00000000E+00
+    0.60290000E+04    0.75550000E+04    0.00000000E+00
+    0.60290000E+04    0.75710000E+04    0.00000000E+00
+    0.60450000E+04    0.75710000E+04    0.00000000E+00
+    0.60290000E+04    0.75630000E+04    0.00000000E+00
+    0.60760000E+04    0.75710000E+04    0.00000000E+00
+    0.60760000E+04    0.75720000E+04    0.00000000E+00
+    0.60740000E+04    0.75710000E+04    0.00000000E+00
+    0.60780000E+04    0.75720000E+04    0.00000000E+00
+    0.60980000E+04    0.75720000E+04    0.00000000E+00
+    0.60980000E+04    0.75760000E+04    0.00000000E+00
+    0.60900000E+04    0.75720000E+04    0.00000000E+00
+    0.61060000E+04    0.75760000E+04    0.00000000E+00
+    0.61130000E+04    0.75760000E+04    0.00000000E+00
+    0.61130000E+04    0.75600000E+04    0.00000000E+00
+    0.61130000E+04    0.75280000E+04    0.00000000E+00
+    0.61130000E+04    0.75520000E+04    0.00000000E+00
+    0.62820000E+04    0.75290000E+04    0.00000000E+00
+    0.62840000E+04    0.75290000E+04    0.00000000E+00
+    0.62820000E+04    0.75300000E+04    0.00000000E+00
+    0.62800000E+04    0.75300000E+04    0.00000000E+00
+    0.62360000E+04    0.75300000E+04    0.00000000E+00
+    0.62360000E+04    0.75390000E+04    0.00000000E+00
+    0.62500000E+04    0.75300000E+04    0.00000000E+00
+    0.62360000E+04    0.75550000E+04    0.00000000E+00
+    0.62380000E+04    0.75550000E+04    0.00000000E+00
+    0.62360000E+04    0.75510000E+04    0.00000000E+00
+    0.62820000E+04    0.75550000E+04    0.00000000E+00
+    0.62705000E+04    0.75550000E+04    0.00000000E+00
+    0.62820000E+04    0.75730000E+04    0.00000000E+00
+    0.62980000E+04    0.75730000E+04    0.00000000E+00
+    0.63070000E+04    0.75730000E+04    0.00000000E+00
+    0.63070000E+04    0.75650000E+04    0.00000000E+00
+    0.63070000E+04    0.75290000E+04    0.00000000E+00
+    0.63070000E+04    0.75345000E+04    0.00000000E+00
+    0.62980000E+04    0.75290000E+04    0.00000000E+00
+    0.61380000E+04    0.75880000E+04    0.00000000E+00
+    0.61380000E+04    0.76200000E+04    0.00000000E+00
+    0.61850000E+04    0.75880000E+04    0.00000000E+00
+    0.61530000E+04    0.76200000E+04    0.00000000E+00
+    0.61850000E+04    0.76200000E+04    0.00000000E+00
+    0.63190000E+04    0.75380000E+04    0.00000000E+00
+    0.63190000E+04    0.75330000E+04    0.00000000E+00
+    0.63270000E+04    0.75380000E+04    0.00000000E+00
+    0.63120000E+04    0.75330000E+04    0.00000000E+00
+    0.63120000E+04    0.75415000E+04    0.00000000E+00
+    0.63120000E+04    0.75500000E+04    0.00000000E+00
+    0.63230000E+04    0.75500000E+04    0.00000000E+00
+    0.63230000E+04    0.75580000E+04    0.00000000E+00
+    0.63430000E+04    0.75580000E+04    0.00000000E+00
+    0.63430000E+04    0.75880000E+04    0.00000000E+00
+    0.63240000E+04    0.75880000E+04    0.00000000E+00
+    0.63240000E+04    0.76040000E+04    0.00000000E+00
+    0.63240000E+04    0.76170000E+04    0.00000000E+00
+    0.63400000E+04    0.76170000E+04    0.00000000E+00
+    0.63740000E+04    0.76170000E+04    0.00000000E+00
+    0.63740000E+04    0.75965000E+04    0.00000000E+00
+    0.63490000E+04    0.76170000E+04    0.00000000E+00
+    0.63740000E+04    0.75760000E+04    0.00000000E+00
+    0.63750000E+04    0.75760000E+04    0.00000000E+00
+    0.63740000E+04    0.75780000E+04    0.00000000E+00
+    0.63750000E+04    0.75740000E+04    0.00000000E+00
+    0.63750000E+04    0.75600000E+04    0.00000000E+00
+    0.63770000E+04    0.75600000E+04    0.00000000E+00
+    0.63750000E+04    0.75640000E+04    0.00000000E+00
+    0.63770000E+04    0.75560000E+04    0.00000000E+00
+    0.63770000E+04    0.75250000E+04    0.00000000E+00
+    0.63610000E+04    0.75250000E+04    0.00000000E+00
+    0.63770000E+04    0.75345000E+04    0.00000000E+00
+    0.63270000E+04    0.75250000E+04    0.00000000E+00
+    0.63450000E+04    0.75250000E+04    0.00000000E+00
+    0.63840000E+04    0.75250000E+04    0.00000000E+00
+    0.64105000E+04    0.75250000E+04    0.00000000E+00
+    0.63840000E+04    0.75360000E+04    0.00000000E+00
+    0.63840000E+04    0.75520000E+04    0.00000000E+00
+    0.63840000E+04    0.75440000E+04    0.00000000E+00
+    0.63930000E+04    0.75520000E+04    0.00000000E+00
+    0.63930000E+04    0.75610000E+04    0.00000000E+00
+    0.63930000E+04    0.75690000E+04    0.00000000E+00
+    0.63870000E+04    0.75690000E+04    0.00000000E+00
+    0.63870000E+04    0.75770000E+04    0.00000000E+00
+    0.63900000E+04    0.75770000E+04    0.00000000E+00
+    0.63900000E+04    0.75850000E+04    0.00000000E+00
+    0.63900000E+04    0.76320000E+04    0.00000000E+00
+    0.63830000E+04    0.76320000E+04    0.00000000E+00
+    0.63900000E+04    0.76182500E+04    0.00000000E+00
+    0.63830000E+04    0.76480000E+04    0.00000000E+00
+    0.63830000E+04    0.76640000E+04    0.00000000E+00
+    0.63900000E+04    0.76640000E+04    0.00000000E+00
+    0.63900000E+04    0.76750000E+04    0.00000000E+00
+    0.63960000E+04    0.76750000E+04    0.00000000E+00
+    0.63960000E+04    0.76835000E+04    0.00000000E+00
+    0.63960000E+04    0.76920000E+04    0.00000000E+00
+    0.64140000E+04    0.76920000E+04    0.00000000E+00
+    0.64230000E+04    0.77000000E+04    0.00000000E+00
+    0.64370000E+04    0.77000000E+04    0.00000000E+00
+    0.64370000E+04    0.76820000E+04    0.00000000E+00
+    0.64370000E+04    0.75560000E+04    0.00000000E+00
+    0.64370000E+04    0.75720000E+04    0.00000000E+00
+    0.64305000E+04    0.75560000E+04    0.00000000E+00
+    0.64240000E+04    0.75560000E+04    0.00000000E+00
+    0.64240000E+04    0.75520000E+04    0.00000000E+00
+    0.64305000E+04    0.75520000E+04    0.00000000E+00
+    0.64370000E+04    0.75520000E+04    0.00000000E+00
+    0.64330000E+04    0.75520000E+04    0.00000000E+00
+    0.64370000E+04    0.75440000E+04    0.00000000E+00
+    0.64370000E+04    0.75250000E+04    0.00000000E+00
+    0.64370000E+04    0.75360000E+04    0.00000000E+00
+    0.65340000E+04    0.75240000E+04    0.00000000E+00
+    0.65690000E+04    0.75240000E+04    0.00000000E+00
+    0.65340000E+04    0.75470000E+04    0.00000000E+00
+    0.65340000E+04    0.75790000E+04    0.00000000E+00
+    0.65510000E+04    0.75790000E+04    0.00000000E+00
+    0.65510000E+04    0.75880000E+04    0.00000000E+00
+    0.65670000E+04    0.75880000E+04    0.00000000E+00
+    0.66120000E+04    0.75880000E+04    0.00000000E+00
+    0.66120000E+04    0.75790000E+04    0.00000000E+00
+    0.65960000E+04    0.75880000E+04    0.00000000E+00
+    0.66330000E+04    0.75790000E+04    0.00000000E+00
+    0.66330000E+04    0.75470000E+04    0.00000000E+00
+    0.66330000E+04    0.75240000E+04    0.00000000E+00
+    0.66010000E+04    0.75240000E+04    0.00000000E+00
+    0.66490000E+04    0.75370000E+04    0.00000000E+00
+    0.66490000E+04    0.75240000E+04    0.00000000E+00
+    0.66590000E+04    0.75370000E+04    0.00000000E+00
+    0.66590000E+04    0.75470000E+04    0.00000000E+00
+    0.66590000E+04    0.75550000E+04    0.00000000E+00
+    0.66540000E+04    0.75550000E+04    0.00000000E+00
+    0.66540000E+04    0.75680000E+04    0.00000000E+00
+    0.66770000E+04    0.75680000E+04    0.00000000E+00
+    0.66770000E+04    0.75460000E+04    0.00000000E+00
+    0.66770000E+04    0.75240000E+04    0.00000000E+00
+    0.66630000E+04    0.75240000E+04    0.00000000E+00
+    0.62340000E+04    0.74870000E+04    0.00000000E+00
+    0.62480000E+04    0.74870000E+04    0.00000000E+00
+    0.62340000E+04    0.74630000E+04    0.00000000E+00
+    0.62800000E+04    0.74870000E+04    0.00000000E+00
+    0.62640000E+04    0.74870000E+04    0.00000000E+00
+    0.62800000E+04    0.74630000E+04    0.00000000E+00
+    0.60020000E+04    0.74810000E+04    0.00000000E+00
+    0.59920000E+04    0.74810000E+04    0.00000000E+00
+    0.60020000E+04    0.74880000E+04    0.00000000E+00
+    0.60180000E+04    0.74880000E+04    0.00000000E+00
+    0.60300000E+04    0.74880000E+04    0.00000000E+00
+    0.60300000E+04    0.74620000E+04    0.00000000E+00
+    0.59920000E+04    0.74620000E+04    0.00000000E+00
+    0.63340000E+04    0.74360000E+04    0.00000000E+00
+    0.63340000E+04    0.74430000E+04    0.00000000E+00
+    0.63420000E+04    0.74360000E+04    0.00000000E+00
+    0.63280000E+04    0.74430000E+04    0.00000000E+00
+    0.63280000E+04    0.74525000E+04    0.00000000E+00
+    0.63280000E+04    0.74620000E+04    0.00000000E+00
+    0.63130000E+04    0.74620000E+04    0.00000000E+00
+    0.63130000E+04    0.74860000E+04    0.00000000E+00
+    0.63540000E+04    0.74860000E+04    0.00000000E+00
+    0.63540000E+04    0.74610000E+04    0.00000000E+00
+    0.63540000E+04    0.74360000E+04    0.00000000E+00
+    0.64310000E+04    0.74360000E+04    0.00000000E+00
+    0.64310000E+04    0.74820000E+04    0.00000000E+00
+    0.64040000E+04    0.74360000E+04    0.00000000E+00
+    0.63880000E+04    0.74360000E+04    0.00000000E+00
+    0.63880000E+04    0.74580000E+04    0.00000000E+00
+    0.63880000E+04    0.74740000E+04    0.00000000E+00
+    0.63770000E+04    0.74740000E+04    0.00000000E+00
+    0.63770000E+04    0.74810000E+04    0.00000000E+00
+    0.63770000E+04    0.74850000E+04    0.00000000E+00
+    0.63810000E+04    0.74850000E+04    0.00000000E+00
+    0.63890000E+04    0.74850000E+04    0.00000000E+00
+    0.63890000E+04    0.74820000E+04    0.00000000E+00
+    0.63970000E+04    0.74820000E+04    0.00000000E+00
+    0.64050000E+04    0.74820000E+04    0.00000000E+00
+    0.61540000E+04    0.74330000E+04    0.00000000E+00
+    0.61450000E+04    0.74330000E+04    0.00000000E+00
+    0.61540000E+04    0.74240000E+04    0.00000000E+00
+    0.61690000E+04    0.74240000E+04    0.00000000E+00
+    0.61690000E+04    0.74160000E+04    0.00000000E+00
+    0.61570000E+04    0.74160000E+04    0.00000000E+00
+    0.61450000E+04    0.74160000E+04    0.00000000E+00
+    0.62830000E+04    0.74190000E+04    0.00000000E+00
+    0.62830000E+04    0.74140000E+04    0.00000000E+00
+    0.62895000E+04    0.74190000E+04    0.00000000E+00
+    0.62960000E+04    0.74190000E+04    0.00000000E+00
+    0.62960000E+04    0.74130000E+04    0.00000000E+00
+    0.62960000E+04    0.74090000E+04    0.00000000E+00
+    0.62960000E+04    0.74110000E+04    0.00000000E+00
+    0.62940000E+04    0.74090000E+04    0.00000000E+00
+    0.62830000E+04    0.74090000E+04    0.00000000E+00
+    0.62910000E+04    0.74090000E+04    0.00000000E+00
+    0.62930000E+04    0.74030000E+04    0.00000000E+00
+    0.63000000E+04    0.74030000E+04    0.00000000E+00
+    0.62951631E+04    0.74063647E+04    0.00000000E+00
+    0.63020000E+04    0.74170000E+04    0.00000000E+00
+    0.62996631E+04    0.74133647E+04    0.00000000E+00
+    0.63097500E+04    0.74170000E+04    0.00000000E+00
+    0.63330000E+04    0.74170000E+04    0.00000000E+00
+    0.63330000E+04    0.73960000E+04    0.00000000E+00
+    0.63175000E+04    0.74170000E+04    0.00000000E+00
+    0.63160000E+04    0.73960000E+04    0.00000000E+00
+    0.63000000E+04    0.73960000E+04    0.00000000E+00
+    0.63860000E+04    0.74150000E+04    0.00000000E+00
+    0.64105000E+04    0.74150000E+04    0.00000000E+00
+    0.63860000E+04    0.73950000E+04    0.00000000E+00
+    0.64350000E+04    0.74150000E+04    0.00000000E+00
+    0.64350000E+04    0.73950000E+04    0.00000000E+00
+    0.64180000E+04    0.73950000E+04    0.00000000E+00
+    0.60920000E+04    0.73930000E+04    0.00000000E+00
+    0.60920000E+04    0.73880000E+04    0.00000000E+00
+    0.60880000E+04    0.73930000E+04    0.00000000E+00
+    0.60850000E+04    0.73930000E+04    0.00000000E+00
+    0.60850000E+04    0.73965000E+04    0.00000000E+00
+    0.60850000E+04    0.74000000E+04    0.00000000E+00
+    0.60880000E+04    0.74000000E+04    0.00000000E+00
+    0.60880000E+04    0.73960000E+04    0.00000000E+00
+    0.60930000E+04    0.73960000E+04    0.00000000E+00
+    0.60930000E+04    0.74017500E+04    0.00000000E+00
+    0.60930000E+04    0.74880000E+04    0.00000000E+00
+    0.61085000E+04    0.74880000E+04    0.00000000E+00
+    0.60930000E+04    0.74650000E+04    0.00000000E+00
+    0.61240000E+04    0.74880000E+04    0.00000000E+00
+    0.61240000E+04    0.74790000E+04    0.00000000E+00
+    0.61190000E+04    0.74790000E+04    0.00000000E+00
+    0.61190000E+04    0.74750000E+04    0.00000000E+00
+    0.61250000E+04    0.74750000E+04    0.00000000E+00
+    0.61250000E+04    0.74650000E+04    0.00000000E+00
+    0.61090000E+04    0.74650000E+04    0.00000000E+00
+    0.61090000E+04    0.74490000E+04    0.00000000E+00
+    0.61090000E+04    0.73880000E+04    0.00000000E+00
+    0.61000000E+04    0.73880000E+04    0.00000000E+00
+    0.61090000E+04    0.73960000E+04    0.00000000E+00
+    0.60310000E+04    0.74430000E+04    0.00000000E+00
+    0.60220000E+04    0.74430000E+04    0.00000000E+00
+    0.60310000E+04    0.74335000E+04    0.00000000E+00
+    0.60310000E+04    0.74240000E+04    0.00000000E+00
+    0.60280000E+04    0.74240000E+04    0.00000000E+00
+    0.60310000E+04    0.74280000E+04    0.00000000E+00
+    0.60280000E+04    0.74160000E+04    0.00000000E+00
+    0.60280000E+04    0.73840000E+04    0.00000000E+00
+    0.60220000E+04    0.73840000E+04    0.00000000E+00
+    0.60280000E+04    0.73960000E+04    0.00000000E+00
+    0.60220000E+04    0.73987500E+04    0.00000000E+00
+    0.60220000E+04    0.74282500E+04    0.00000000E+00
+    0.65190000E+04    0.74870000E+04    0.00000000E+00
+    0.64750000E+04    0.74870000E+04    0.00000000E+00
+    0.65190000E+04    0.74700000E+04    0.00000000E+00
+    0.65190000E+04    0.74540000E+04    0.00000000E+00
+    0.65070000E+04    0.74540000E+04    0.00000000E+00
+    0.65070000E+04    0.74430000E+04    0.00000000E+00
+    0.65170000E+04    0.74430000E+04    0.00000000E+00
+    0.65170000E+04    0.74305000E+04    0.00000000E+00
+    0.65170000E+04    0.74180000E+04    0.00000000E+00
+    0.65230000E+04    0.74180000E+04    0.00000000E+00
+    0.65230000E+04    0.74080000E+04    0.00000000E+00
+    0.65180000E+04    0.74080000E+04    0.00000000E+00
+    0.65180000E+04    0.73950000E+04    0.00000000E+00
+    0.65180000E+04    0.73820000E+04    0.00000000E+00
+    0.65140000E+04    0.73820000E+04    0.00000000E+00
+    0.65180000E+04    0.73900000E+04    0.00000000E+00
+    0.65140000E+04    0.73780000E+04    0.00000000E+00
+    0.65190000E+04    0.73780000E+04    0.00000000E+00
+    0.65230000E+04    0.73780000E+04    0.00000000E+00
+    0.65230000E+04    0.73700000E+04    0.00000000E+00
+    0.65230000E+04    0.73570000E+04    0.00000000E+00
+    0.64990000E+04    0.73570000E+04    0.00000000E+00
+    0.64750000E+04    0.73570000E+04    0.00000000E+00
+    0.64750000E+04    0.73895000E+04    0.00000000E+00
+    0.64750000E+04    0.74545000E+04    0.00000000E+00
+    0.65640000E+04    0.73840000E+04    0.00000000E+00
+    0.65640000E+04    0.73570000E+04    0.00000000E+00
+    0.65530000E+04    0.73840000E+04    0.00000000E+00
+    0.65420000E+04    0.73840000E+04    0.00000000E+00
+    0.65420000E+04    0.73890000E+04    0.00000000E+00
+    0.65370000E+04    0.73890000E+04    0.00000000E+00
+    0.65370000E+04    0.73970000E+04    0.00000000E+00
+    0.65370000E+04    0.74540000E+04    0.00000000E+00
+    0.65310000E+04    0.74540000E+04    0.00000000E+00
+    0.65370000E+04    0.74380000E+04    0.00000000E+00
+    0.65310000E+04    0.74620000E+04    0.00000000E+00
+    0.65310000E+04    0.74670000E+04    0.00000000E+00
+    0.65280000E+04    0.74670000E+04    0.00000000E+00
+    0.65280000E+04    0.74750000E+04    0.00000000E+00
+    0.65280000E+04    0.74840000E+04    0.00000000E+00
+    0.65430000E+04    0.74840000E+04    0.00000000E+00
+    0.65430000E+04    0.74740000E+04    0.00000000E+00
+    0.65490000E+04    0.74740000E+04    0.00000000E+00
+    0.65490000E+04    0.74840000E+04    0.00000000E+00
+    0.65650000E+04    0.74840000E+04    0.00000000E+00
+    0.66090000E+04    0.74840000E+04    0.00000000E+00
+    0.66090000E+04    0.74735000E+04    0.00000000E+00
+    0.65930000E+04    0.74840000E+04    0.00000000E+00
+    0.66090000E+04    0.74100000E+04    0.00000000E+00
+    0.66090000E+04    0.74180000E+04    0.00000000E+00
+    0.65940000E+04    0.74100000E+04    0.00000000E+00
+    0.65940000E+04    0.73940000E+04    0.00000000E+00
+    0.65940000E+04    0.73810000E+04    0.00000000E+00
+    0.65930000E+04    0.73810000E+04    0.00000000E+00
+    0.65940000E+04    0.73826250E+04    0.00000000E+00
+    0.65930000E+04    0.73820000E+04    0.00000000E+00
+    0.65910000E+04    0.73820000E+04    0.00000000E+00
+    0.65860000E+04    0.73820000E+04    0.00000000E+00
+    0.65860000E+04    0.73780000E+04    0.00000000E+00
+    0.65890000E+04    0.73820000E+04    0.00000000E+00
+    0.65860000E+04    0.73570000E+04    0.00000000E+00
+    0.65860000E+04    0.73730000E+04    0.00000000E+00
+    0.66410000E+04    0.74160000E+04    0.00000000E+00
+    0.66410000E+04    0.74000000E+04    0.00000000E+00
+    0.66290000E+04    0.74160000E+04    0.00000000E+00
+    0.66130000E+04    0.74160000E+04    0.00000000E+00
+    0.66130000E+04    0.74240000E+04    0.00000000E+00
+    0.66130000E+04    0.74830000E+04    0.00000000E+00
+    0.66130000E+04    0.74750000E+04    0.00000000E+00
+    0.66290000E+04    0.74830000E+04    0.00000000E+00
+    0.66770000E+04    0.74830000E+04    0.00000000E+00
+    0.66450000E+04    0.74830000E+04    0.00000000E+00
+    0.66770000E+04    0.74380000E+04    0.00000000E+00
+    0.66770000E+04    0.73930000E+04    0.00000000E+00
+    0.66760000E+04    0.73820000E+04    0.00000000E+00
+    0.66760000E+04    0.73560000E+04    0.00000000E+00
+    0.66410000E+04    0.73560000E+04    0.00000000E+00
+    0.66410000E+04    0.73860000E+04    0.00000000E+00
+    0.62350000E+04    0.73620000E+04    0.00000000E+00
+    0.62400000E+04    0.73620000E+04    0.00000000E+00
+    0.62350000E+04    0.73510000E+04    0.00000000E+00
+    0.62480000E+04    0.73620000E+04    0.00000000E+00
+    0.62480000E+04    0.73580000E+04    0.00000000E+00
+    0.62480000E+04    0.73510000E+04    0.00000000E+00
+    0.62520000E+04    0.73640000E+04    0.00000000E+00
+    0.62520000E+04    0.73560000E+04    0.00000000E+00
+    0.62670000E+04    0.73640000E+04    0.00000000E+00
+    0.62670000E+04    0.73500000E+04    0.00000000E+00
+    0.62520000E+04    0.73500000E+04    0.00000000E+00
+    0.63340000E+04    0.73750000E+04    0.00000000E+00
+    0.63340000E+04    0.73410000E+04    0.00000000E+00
+    0.63490000E+04    0.73750000E+04    0.00000000E+00
+    0.63490000E+04    0.73410000E+04    0.00000000E+00
+    0.60420000E+04    0.73520000E+04    0.00000000E+00
+    0.60470000E+04    0.73520000E+04    0.00000000E+00
+    0.60420000E+04    0.73440000E+04    0.00000000E+00
+    0.60550000E+04    0.73520000E+04    0.00000000E+00
+    0.60550000E+04    0.73380000E+04    0.00000000E+00
+    0.60420000E+04    0.73380000E+04    0.00000000E+00
+    0.60020000E+04    0.73480000E+04    0.00000000E+00
+    0.60020000E+04    0.73360000E+04    0.00000000E+00
+    0.60300000E+04    0.73480000E+04    0.00000000E+00
+    0.60300000E+04    0.73360000E+04    0.00000000E+00
+    0.62340000E+04    0.73350000E+04    0.00000000E+00
+    0.62340000E+04    0.73290000E+04    0.00000000E+00
+    0.62410000E+04    0.73350000E+04    0.00000000E+00
+    0.62620000E+04    0.73350000E+04    0.00000000E+00
+    0.62620000E+04    0.73290000E+04    0.00000000E+00
+    0.62550000E+04    0.73350000E+04    0.00000000E+00
+    0.62540000E+04    0.73290000E+04    0.00000000E+00
+    0.62420000E+04    0.73290000E+04    0.00000000E+00
+    0.63630000E+04    0.73360000E+04    0.00000000E+00
+    0.63630000E+04    0.73290000E+04    0.00000000E+00
+    0.63695000E+04    0.73360000E+04    0.00000000E+00
+    0.63760000E+04    0.73360000E+04    0.00000000E+00
+    0.63720000E+04    0.73360000E+04    0.00000000E+00
+    0.63760000E+04    0.73340000E+04    0.00000000E+00
+    0.63760000E+04    0.73290000E+04    0.00000000E+00
+    0.63720000E+04    0.73290000E+04    0.00000000E+00
+    0.63760000E+04    0.73310000E+04    0.00000000E+00
+    0.63680000E+04    0.73290000E+04    0.00000000E+00
+    0.62340000E+04    0.73220000E+04    0.00000000E+00
+    0.62372500E+04    0.73220000E+04    0.00000000E+00
+    0.62340000E+04    0.73200000E+04    0.00000000E+00
+    0.62600000E+04    0.73220000E+04    0.00000000E+00
+    0.62600000E+04    0.73200000E+04    0.00000000E+00
+    0.62567500E+04    0.73220000E+04    0.00000000E+00
+    0.62600000E+04    0.73160000E+04    0.00000000E+00
+    0.62580000E+04    0.73160000E+04    0.00000000E+00
+    0.62340000E+04    0.73160000E+04    0.00000000E+00
+    0.62360000E+04    0.73160000E+04    0.00000000E+00
+    0.61530000E+04    0.73570000E+04    0.00000000E+00
+    0.61530000E+04    0.73730000E+04    0.00000000E+00
+    0.61850000E+04    0.73570000E+04    0.00000000E+00
+    0.61530000E+04    0.74050000E+04    0.00000000E+00
+    0.61700000E+04    0.74050000E+04    0.00000000E+00
+    0.62020000E+04    0.74050000E+04    0.00000000E+00
+    0.61860000E+04    0.74050000E+04    0.00000000E+00
+    0.62020000E+04    0.73790000E+04    0.00000000E+00
+    0.62020000E+04    0.73570000E+04    0.00000000E+00
+    0.63710000E+04    0.73140000E+04    0.00000000E+00
+    0.63740000E+04    0.73140000E+04    0.00000000E+00
+    0.63710000E+04    0.73120000E+04    0.00000000E+00
+    0.63760000E+04    0.73140000E+04    0.00000000E+00
+    0.63760000E+04    0.73120000E+04    0.00000000E+00
+    0.63760000E+04    0.72940000E+04    0.00000000E+00
+    0.63760000E+04    0.72960000E+04    0.00000000E+00
+    0.63710000E+04    0.72940000E+04    0.00000000E+00
+    0.63710000E+04    0.72965000E+04    0.00000000E+00
+    0.61440000E+04    0.73040000E+04    0.00000000E+00
+    0.61440000E+04    0.72930000E+04    0.00000000E+00
+    0.61550000E+04    0.73040000E+04    0.00000000E+00
+    0.61550000E+04    0.72930000E+04    0.00000000E+00
+    0.60800000E+04    0.73400000E+04    0.00000000E+00
+    0.60800000E+04    0.73360000E+04    0.00000000E+00
+    0.60820000E+04    0.73400000E+04    0.00000000E+00
+    0.60820000E+04    0.73440000E+04    0.00000000E+00
+    0.60820000E+04    0.73510000E+04    0.00000000E+00
+    0.60710000E+04    0.73510000E+04    0.00000000E+00
+    0.60600000E+04    0.73510000E+04    0.00000000E+00
+    0.60600000E+04    0.73550000E+04    0.00000000E+00
+    0.60640000E+04    0.73510000E+04    0.00000000E+00
+    0.60540000E+04    0.73550000E+04    0.00000000E+00
+    0.60460000E+04    0.73550000E+04    0.00000000E+00
+    0.60460000E+04    0.73650000E+04    0.00000000E+00
+    0.60607500E+04    0.73650000E+04    0.00000000E+00
+    0.61050000E+04    0.73650000E+04    0.00000000E+00
+    0.61050000E+04    0.73550000E+04    0.00000000E+00
+    0.60902500E+04    0.73650000E+04    0.00000000E+00
+    0.61000000E+04    0.73550000E+04    0.00000000E+00
+    0.61000000E+04    0.73470000E+04    0.00000000E+00
+    0.61000000E+04    0.73340000E+04    0.00000000E+00
+    0.61120000E+04    0.73340000E+04    0.00000000E+00
+    0.61120000E+04    0.73230000E+04    0.00000000E+00
+    0.60990000E+04    0.73230000E+04    0.00000000E+00
+    0.60990000E+04    0.73120000E+04    0.00000000E+00
+    0.60990000E+04    0.73040000E+04    0.00000000E+00
+    0.61050000E+04    0.73040000E+04    0.00000000E+00
+    0.61050000E+04    0.72930000E+04    0.00000000E+00
+    0.60800000E+04    0.72930000E+04    0.00000000E+00
+    0.60800000E+04    0.73047500E+04    0.00000000E+00
+    0.63770000E+04    0.73740000E+04    0.00000000E+00
+    0.63770000E+04    0.73580000E+04    0.00000000E+00
+    0.64090000E+04    0.73740000E+04    0.00000000E+00
+    0.64320000E+04    0.73740000E+04    0.00000000E+00
+    0.64320000E+04    0.73485000E+04    0.00000000E+00
+    0.64320000E+04    0.72910000E+04    0.00000000E+00
+    0.64320000E+04    0.73230000E+04    0.00000000E+00
+    0.64090000E+04    0.72910000E+04    0.00000000E+00
+    0.63770000E+04    0.72910000E+04    0.00000000E+00
+    0.63770000E+04    0.72930000E+04    0.00000000E+00
+    0.63810000E+04    0.72910000E+04    0.00000000E+00
+    0.59900000E+04    0.73080000E+04    0.00000000E+00
+    0.59900000E+04    0.72870000E+04    0.00000000E+00
+    0.60260000E+04    0.73080000E+04    0.00000000E+00
+    0.60260000E+04    0.72870000E+04    0.00000000E+00
+    0.60600000E+04    0.72870000E+04    0.00000000E+00
+    0.60720000E+04    0.72870000E+04    0.00000000E+00
+    0.60600000E+04    0.73050000E+04    0.00000000E+00
+    0.60670000E+04    0.73130000E+04    0.00000000E+00
+    0.60720000E+04    0.73130000E+04    0.00000000E+00
+    0.60720000E+04    0.73000000E+04    0.00000000E+00
+    0.62580000E+04    0.72840000E+04    0.00000000E+00
+    0.62580000E+04    0.72880000E+04    0.00000000E+00
+    0.62660000E+04    0.72840000E+04    0.00000000E+00
+    0.62500000E+04    0.72880000E+04    0.00000000E+00
+    0.62330000E+04    0.72880000E+04    0.00000000E+00
+    0.62330000E+04    0.72990000E+04    0.00000000E+00
+    0.62420000E+04    0.72880000E+04    0.00000000E+00
+    0.62330000E+04    0.73150000E+04    0.00000000E+00
+    0.62330000E+04    0.73110000E+04    0.00000000E+00
+    0.62350000E+04    0.73150000E+04    0.00000000E+00
+    0.62710000E+04    0.73150000E+04    0.00000000E+00
+    0.62710000E+04    0.73090000E+04    0.00000000E+00
+    0.62670000E+04    0.73150000E+04    0.00000000E+00
+    0.62800000E+04    0.73090000E+04    0.00000000E+00
+    0.62800000E+04    0.73160000E+04    0.00000000E+00
+    0.62870000E+04    0.73160000E+04    0.00000000E+00
+    0.62870000E+04    0.73300000E+04    0.00000000E+00
+    0.62980000E+04    0.73300000E+04    0.00000000E+00
+    0.63060000E+04    0.73300000E+04    0.00000000E+00
+    0.63060000E+04    0.73270000E+04    0.00000000E+00
+    0.63130000E+04    0.73270000E+04    0.00000000E+00
+    0.63200000E+04    0.73270000E+04    0.00000000E+00
+    0.63200000E+04    0.73140000E+04    0.00000000E+00
+    0.63060000E+04    0.73140000E+04    0.00000000E+00
+    0.63060000E+04    0.72980000E+04    0.00000000E+00
+    0.63060000E+04    0.72840000E+04    0.00000000E+00
+    0.62820000E+04    0.72840000E+04    0.00000000E+00
+    0.64720000E+04    0.72830000E+04    0.00000000E+00
+    0.64720000E+04    0.73125000E+04    0.00000000E+00
+    0.64985000E+04    0.72830000E+04    0.00000000E+00
+    0.64720000E+04    0.73420000E+04    0.00000000E+00
+    0.64970000E+04    0.73420000E+04    0.00000000E+00
+    0.65220000E+04    0.73420000E+04    0.00000000E+00
+    0.65220000E+04    0.73350000E+04    0.00000000E+00
+    0.65060000E+04    0.73420000E+04    0.00000000E+00
+    0.65220000E+04    0.73190000E+04    0.00000000E+00
+    0.65140000E+04    0.73190000E+04    0.00000000E+00
+    0.65220000E+04    0.73230000E+04    0.00000000E+00
+    0.65030000E+04    0.73190000E+04    0.00000000E+00
+    0.65030000E+04    0.73140000E+04    0.00000000E+00
+    0.65130000E+04    0.73140000E+04    0.00000000E+00
+    0.65210000E+04    0.73140000E+04    0.00000000E+00
+    0.65210000E+04    0.73060000E+04    0.00000000E+00
+    0.65210000E+04    0.72950000E+04    0.00000000E+00
+    0.65250000E+04    0.72950000E+04    0.00000000E+00
+    0.65250000E+04    0.72870000E+04    0.00000000E+00
+    0.65250000E+04    0.72830000E+04    0.00000000E+00
+    0.65170000E+04    0.72830000E+04    0.00000000E+00
+    0.65460000E+04    0.72970000E+04    0.00000000E+00
+    0.65510000E+04    0.72970000E+04    0.00000000E+00
+    0.65460000E+04    0.72890000E+04    0.00000000E+00
+    0.65510000E+04    0.73030000E+04    0.00000000E+00
+    0.65460000E+04    0.73030000E+04    0.00000000E+00
+    0.65410000E+04    0.73030000E+04    0.00000000E+00
+    0.65410000E+04    0.72990000E+04    0.00000000E+00
+    0.65370000E+04    0.72990000E+04    0.00000000E+00
+    0.65300000E+04    0.72990000E+04    0.00000000E+00
+    0.65300000E+04    0.73050000E+04    0.00000000E+00
+    0.65250000E+04    0.73050000E+04    0.00000000E+00
+    0.65250000E+04    0.73130000E+04    0.00000000E+00
+    0.65250000E+04    0.73210000E+04    0.00000000E+00
+    0.65250000E+04    0.73170000E+04    0.00000000E+00
+    0.65330000E+04    0.73210000E+04    0.00000000E+00
+    0.65430000E+04    0.73210000E+04    0.00000000E+00
+    0.65430000E+04    0.73400000E+04    0.00000000E+00
+    0.65660000E+04    0.73400000E+04    0.00000000E+00
+    0.65660000E+04    0.73255000E+04    0.00000000E+00
+    0.65660000E+04    0.72820000E+04    0.00000000E+00
+    0.65660000E+04    0.72965000E+04    0.00000000E+00
+    0.65540000E+04    0.72820000E+04    0.00000000E+00
+    0.65460000E+04    0.72820000E+04    0.00000000E+00
+    0.65850000E+04    0.73070000E+04    0.00000000E+00
+    0.65930000E+04    0.73070000E+04    0.00000000E+00
+    0.65850000E+04    0.72910000E+04    0.00000000E+00
+    0.66450000E+04    0.73070000E+04    0.00000000E+00
+    0.66370000E+04    0.73070000E+04    0.00000000E+00
+    0.66450000E+04    0.73030000E+04    0.00000000E+00
+    0.66450000E+04    0.72820000E+04    0.00000000E+00
+    0.66450000E+04    0.72910000E+04    0.00000000E+00
+    0.66290000E+04    0.72820000E+04    0.00000000E+00
+    0.65850000E+04    0.72820000E+04    0.00000000E+00
+    0.66000000E+04    0.72820000E+04    0.00000000E+00
+    0.66490000E+04    0.72990000E+04    0.00000000E+00
+    0.66510000E+04    0.72990000E+04    0.00000000E+00
+    0.66490000E+04    0.72950000E+04    0.00000000E+00
+    0.66510000E+04    0.73030000E+04    0.00000000E+00
+    0.66510000E+04    0.73110000E+04    0.00000000E+00
+    0.66428750E+04    0.73110000E+04    0.00000000E+00
+    0.66510000E+04    0.73050000E+04    0.00000000E+00
+    0.65860000E+04    0.73110000E+04    0.00000000E+00
+    0.65860000E+04    0.73200000E+04    0.00000000E+00
+    0.65941250E+04    0.73110000E+04    0.00000000E+00
+    0.65860000E+04    0.73360000E+04    0.00000000E+00
+    0.65860000E+04    0.73320000E+04    0.00000000E+00
+    0.65890000E+04    0.73360000E+04    0.00000000E+00
+    0.65920000E+04    0.73360000E+04    0.00000000E+00
+    0.65900000E+04    0.73360000E+04    0.00000000E+00
+    0.65920000E+04    0.73370000E+04    0.00000000E+00
+    0.65940000E+04    0.73370000E+04    0.00000000E+00
+    0.66750000E+04    0.73370000E+04    0.00000000E+00
+    0.66750000E+04    0.73100000E+04    0.00000000E+00
+    0.66542500E+04    0.73370000E+04    0.00000000E+00
+    0.66750000E+04    0.72830000E+04    0.00000000E+00
+    0.66695000E+04    0.72830000E+04    0.00000000E+00
+    0.66750000E+04    0.72990000E+04    0.00000000E+00
+    0.66640000E+04    0.72830000E+04    0.00000000E+00
+    0.66660000E+04    0.72830000E+04    0.00000000E+00
+    0.66640000E+04    0.72820000E+04    0.00000000E+00
+    0.66620000E+04    0.72820000E+04    0.00000000E+00
+    0.66490000E+04    0.72820000E+04    0.00000000E+00
+    0.66490000E+04    0.72910000E+04    0.00000000E+00
+    0.66560000E+04    0.72820000E+04    0.00000000E+00
+    0.65950000E+04    0.76530000E+04    0.00000000E+00
+    0.66030000E+04    0.76530000E+04    0.00000000E+00
+    0.65950000E+04    0.76600000E+04    0.00000000E+00
+    0.66030000E+04    0.76450000E+04    0.00000000E+00
+    0.66030000E+04    0.76310000E+04    0.00000000E+00
+    0.65780000E+04    0.76310000E+04    0.00000000E+00
+    0.65770000E+04    0.76530000E+04    0.00000000E+00
+    0.65870000E+04    0.76600000E+04    0.00000000E+00
+    0.60410000E+04    0.76670000E+04    0.00000000E+00
+    0.61530000E+04    0.76540000E+04    0.00000000E+00
+    0.63050000E+04    0.76410000E+04    0.00000000E+00
+    0.60610000E+04    0.75710000E+04    0.00000000E+00
+    0.60680000E+04    0.75710000E+04    0.00000000E+00
+    0.62590000E+04    0.75550000E+04    0.00000000E+00
+    0.62555000E+04    0.75550000E+04    0.00000000E+00
+    0.63070000E+04    0.75510000E+04    0.00000000E+00
+    0.63070000E+04    0.75580000E+04    0.00000000E+00
+    0.63070000E+04    0.75400000E+04    0.00000000E+00
+    0.63770000E+04    0.75440000E+04    0.00000000E+00
+    0.63770000E+04    0.75520000E+04    0.00000000E+00
+    0.63900000E+04    0.76045000E+04    0.00000000E+00
+    0.63900000E+04    0.75930000E+04    0.00000000E+00
+    0.64370000E+04    0.76280000E+04    0.00000000E+00
+    0.64370000E+04    0.75880000E+04    0.00000000E+00
+    0.64370000E+04    0.76640000E+04    0.00000000E+00
+    0.62973262E+04    0.74097295E+04    0.00000000E+00
+    0.62967852E+04    0.74088882E+04    0.00000000E+00
+    0.60930000E+04    0.74420000E+04    0.00000000E+00
+    0.60930000E+04    0.74190000E+04    0.00000000E+00
+    0.61090000E+04    0.74265000E+04    0.00000000E+00
+    0.61090000E+04    0.74072500E+04    0.00000000E+00
+    0.60220000E+04    0.74135000E+04    0.00000000E+00
+    0.60220000E+04    0.74061250E+04    0.00000000E+00
+    0.60220000E+04    0.74208750E+04    0.00000000E+00
+    0.64750000E+04    0.74220000E+04    0.00000000E+00
+    0.65370000E+04    0.74210000E+04    0.00000000E+00
+    0.65370000E+04    0.74050000E+04    0.00000000E+00
+    0.66090000E+04    0.74420000E+04    0.00000000E+00
+    0.66090000E+04    0.74472500E+04    0.00000000E+00
+    0.66090000E+04    0.74340000E+04    0.00000000E+00
+    0.65940000E+04    0.73875000E+04    0.00000000E+00
+    0.62500000E+04    0.73290000E+04    0.00000000E+00
+    0.60755000E+04    0.73650000E+04    0.00000000E+00
+    0.60681250E+04    0.73650000E+04    0.00000000E+00
+    0.60800000E+04    0.73165000E+04    0.00000000E+00
+    0.60800000E+04    0.73240000E+04    0.00000000E+00
+    0.63770000E+04    0.73325000E+04    0.00000000E+00
+    0.63770000E+04    0.73312031E+04    0.00000000E+00
+    0.63770000E+04    0.73340938E+04    0.00000000E+00
+    0.62550000E+04    0.73150000E+04    0.00000000E+00
+    0.62570000E+04    0.73150000E+04    0.00000000E+00
+    0.62532500E+04    0.73150000E+04    0.00000000E+00
+    0.65220000E+04    0.73270000E+04    0.00000000E+00
+    0.65090000E+04    0.72830000E+04    0.00000000E+00
+    0.65660000E+04    0.73110000E+04    0.00000000E+00
+    0.66170000E+04    0.73070000E+04    0.00000000E+00
+    0.66230000E+04    0.73070000E+04    0.00000000E+00
+    0.66090000E+04    0.73070000E+04    0.00000000E+00
+    0.66450000E+04    0.72990000E+04    0.00000000E+00
+    0.66185000E+04    0.73110000E+04    0.00000000E+00
+    0.66103750E+04    0.73110000E+04    0.00000000E+00
+    0.66225625E+04    0.73110000E+04    0.00000000E+00
+    0.66335000E+04    0.73370000E+04    0.00000000E+00
+    0.66207500E+04    0.73370000E+04    0.00000000E+00
+    0.63050000E+04    0.76330000E+04    0.00000000E+00
+    0.62520000E+04    0.75550000E+04    0.00000000E+00
+    0.62500000E+04    0.75550000E+04    0.00000000E+00
+    0.62962446E+04    0.74080469E+04    0.00000000E+00
+    0.60930000E+04    0.74075000E+04    0.00000000E+00
+    0.66090000E+04    0.74630000E+04    0.00000000E+00
+    0.66090000E+04    0.74682500E+04    0.00000000E+00
+    0.66090000E+04    0.74577500E+04    0.00000000E+00
+    0.66090000E+04    0.74260000E+04    0.00000000E+00
+    0.65940000E+04    0.73842500E+04    0.00000000E+00
+    0.63770000E+04    0.73117500E+04    0.00000000E+00
+    0.63770000E+04    0.73101563E+04    0.00000000E+00
+    0.63770000E+04    0.73143438E+04    0.00000000E+00
+    0.63770000E+04    0.73452500E+04    0.00000000E+00
+    0.62410000E+04    0.73150000E+04    0.00000000E+00
+    0.62390000E+04    0.73150000E+04    0.00000000E+00
+    0.62427500E+04    0.73150000E+04    0.00000000E+00
+    0.62630000E+04    0.73150000E+04    0.00000000E+00
+    0.62610000E+04    0.73150000E+04    0.00000000E+00
+    0.66347500E+04    0.73110000E+04    0.00000000E+00
+    0.66266250E+04    0.73110000E+04    0.00000000E+00
+    0.66010000E+04    0.73070000E+04    0.00000000E+00
+    0.66022500E+04    0.73110000E+04    0.00000000E+00
+    0.62440000E+04    0.75550000E+04    0.00000000E+00
+    0.62420000E+04    0.75550000E+04    0.00000000E+00
+    0.62460000E+04    0.75550000E+04    0.00000000E+00
+    0.63770000E+04    0.72990000E+04    0.00000000E+00
+    0.63770000E+04    0.72970000E+04    0.00000000E+00
+    0.63770000E+04    0.73005938E+04    0.00000000E+00
+    0.63770000E+04    0.73221250E+04    0.00000000E+00
+    0.63770000E+04    0.73169375E+04    0.00000000E+00
+    0.63770000E+04    0.73273125E+04    0.00000000E+00
+    0.63770000E+04    0.73420625E+04    0.00000000E+00
+    0.62370000E+04    0.73150000E+04    0.00000000E+00
+    0.62590000E+04    0.73150000E+04    0.00000000E+00
+    0.62480000E+04    0.75550000E+04    0.00000000E+00
+    0.63770000E+04    0.73156406E+04    0.00000000E+00
+    0.63770000E+04    0.72950000E+04    0.00000000E+00
+    0.63770000E+04    0.73286094E+04    0.00000000E+00
+    0.63770000E+04    0.73388750E+04    0.00000000E+00
+    0.63770000E+04    0.73372813E+04    0.00000000E+00
+    0.63770000E+04    0.73299063E+04    0.00000000E+00
+    0.63770000E+04    0.73356875E+04    0.00000000E+00
+    0.62500000E+04    0.73160000E+04    0.00000000E+00
+    0.62515000E+04    0.73160000E+04    0.00000000E+00
+    0.62480000E+04    0.73160000E+04    0.00000000E+00
+    0.62470000E+04    0.73220000E+04    0.00000000E+00
+    0.62502500E+04    0.73220000E+04    0.00000000E+00
+    0.62437500E+04    0.73220000E+04    0.00000000E+00
+    0.62560000E+04    0.73160000E+04    0.00000000E+00
+    0.62545000E+04    0.73160000E+04    0.00000000E+00
+    0.62420000E+04    0.73160000E+04    0.00000000E+00
+    0.62400000E+04    0.73160000E+04    0.00000000E+00
+    0.62440000E+04    0.73160000E+04    0.00000000E+00
+    0.63760000E+04    0.73320000E+04    0.00000000E+00
+    0.66150000E+04    0.72820000E+04    0.00000000E+00
+    0.63740000E+04    0.75840000E+04    0.00000000E+00
+    0.62480000E+04    0.73350000E+04    0.00000000E+00
+    0.66290000E+04    0.73070000E+04    0.00000000E+00
+    0.66130000E+04    0.74480000E+04    0.00000000E+00
+    0.66130000E+04    0.74400000E+04    0.00000000E+00
+    0.66130000E+04    0.74527500E+04    0.00000000E+00
+    0.63760000E+04    0.73020000E+04    0.00000000E+00
+    0.63760000E+04    0.73000000E+04    0.00000000E+00
+    0.63760000E+04    0.73040000E+04    0.00000000E+00
+    0.62410000E+04    0.75560000E+04    0.00000000E+00
+    0.62430000E+04    0.75560000E+04    0.00000000E+00
+    0.62395000E+04    0.75560000E+04    0.00000000E+00
+    0.60280000E+04    0.74080000E+04    0.00000000E+00
+    0.62530000E+04    0.73160000E+04    0.00000000E+00
+    0.62380000E+04    0.73160000E+04    0.00000000E+00
+    0.63760000E+04    0.73060000E+04    0.00000000E+00
+    0.63760000E+04    0.73080000E+04    0.00000000E+00
+    0.66130000E+04    0.74320000E+04    0.00000000E+00
+    0.66130000E+04    0.74670000E+04    0.00000000E+00
+    0.66130000E+04    0.74622500E+04    0.00000000E+00
+    0.63760000E+04    0.72980000E+04    0.00000000E+00
+    0.62450000E+04    0.75560000E+04    0.00000000E+00
+    0.63760000E+04    0.73100000E+04    0.00000000E+00
+    0.66130000E+04    0.74575000E+04    0.00000000E+00
+    0.62480000E+04    0.73150000E+04    0.00000000E+00
+    0.62462500E+04    0.73150000E+04    0.00000000E+00
+    0.62497500E+04    0.73150000E+04    0.00000000E+00
+    0.66090000E+04    0.74525000E+04    0.00000000E+00
+    0.62405000E+04    0.73220000E+04    0.00000000E+00
+    0.63710000E+04    0.73040000E+04    0.00000000E+00
+    0.63710000E+04    0.73015000E+04    0.00000000E+00
+    0.63710000E+04    0.73065000E+04    0.00000000E+00
+    0.62535000E+04    0.73220000E+04    0.00000000E+00
+    0.63770000E+04    0.73053750E+04    0.00000000E+00
+    0.63770000E+04    0.73037813E+04    0.00000000E+00
+    0.63770000E+04    0.73069688E+04    0.00000000E+00
+    0.62400000E+04    0.75550000E+04    0.00000000E+00
+    0.62445000E+04    0.73150000E+04    0.00000000E+00
+    0.62515000E+04    0.73150000E+04    0.00000000E+00
+    0.63770000E+04    0.73021875E+04    0.00000000E+00
+    0.63770000E+04    0.73085625E+04    0.00000000E+00
+    0.62460000E+04    0.73160000E+04    0.00000000E+00
+    0.60720000E+04    0.75710000E+04    0.00000000E+00
+    0.60840000E+04    0.75720000E+04    0.00000000E+00
+    0.60800000E+04    0.75720000E+04    0.00000000E+00
+    0.60860000E+04    0.75820000E+04    0.00000000E+00
+    0.61120000E+04    0.76750000E+04    0.00000000E+00
+    0.61280000E+04    0.76760000E+04    0.00000000E+00
+    0.62900000E+04    0.75290000E+04    0.00000000E+00
+    0.63040000E+04    0.76210000E+04    0.00000000E+00
+    0.62660000E+04    0.75300000E+04    0.00000000E+00
+    0.63050000E+04    0.76290000E+04    0.00000000E+00
+    0.61800000E+04    0.76780000E+04    0.00000000E+00
+    0.61560000E+04    0.76900000E+04    0.00000000E+00
+    0.63930000E+04    0.72910000E+04    0.00000000E+00
+    0.66600000E+04    0.72820000E+04    0.00000000E+00
+    0.63750000E+04    0.75680000E+04    0.00000000E+00
+    0.63750000E+04    0.75720000E+04    0.00000000E+00
+    0.64780000E+04    0.76790000E+04    0.00000000E+00
+    0.63740000E+04    0.75800000E+04    0.00000000E+00
+    0.66080000E+04    0.73370000E+04    0.00000000E+00
+    0.66000000E+04    0.73370000E+04    0.00000000E+00
+    0.62360000E+04    0.75470000E+04    0.00000000E+00
+    0.62330000E+04    0.73070000E+04    0.00000000E+00
+    0.61160000E+04    0.76750000E+04    0.00000000E+00
+    0.61240000E+04    0.76760000E+04    0.00000000E+00
+    0.62860000E+04    0.75290000E+04    0.00000000E+00
+    0.62740000E+04    0.75300000E+04    0.00000000E+00
+    0.61760000E+04    0.76780000E+04    0.00000000E+00
+    0.61520000E+04    0.76900000E+04    0.00000000E+00
+    0.63850000E+04    0.72910000E+04    0.00000000E+00
+    0.65960000E+04    0.73370000E+04    0.00000000E+00
+    0.62780000E+04    0.75300000E+04    0.00000000E+00
+    0.60800000E+04    0.73320000E+04    0.00000000E+00
+    0.62740000E+04    0.72840000E+04    0.00000000E+00
+    0.61440000E+04    0.76910000E+04    0.00000000E+00
+    0.61680000E+04    0.76770000E+04    0.00000000E+00
+    0.64760000E+04    0.76950000E+04    0.00000000E+00
+    0.65810000E+04    0.74840000E+04    0.00000000E+00
+    0.65830000E+04    0.75880000E+04    0.00000000E+00
+    0.65860000E+04    0.73280000E+04    0.00000000E+00
+    0.62935000E+04    0.75960000E+04    0.00000000E+00
+    0.62930000E+04    0.75920000E+04    0.00000000E+00
+    0.63710000E+04    0.72990000E+04    0.00000000E+00
+    0.63710000E+04    0.73090000E+04    0.00000000E+00
+    0.56440000E+04    0.70575000E+04   -0.50000000E+01
+    0.70280000E+04    0.70575000E+04   -0.50000000E+01
+    0.70280000E+04    0.79555000E+04   -0.50000000E+01
+    0.56440000E+04    0.79555000E+04   -0.50000000E+01
+    0.63710000E+04    0.76980000E+04   -0.50000000E+01
+    0.63710000E+04    0.77300000E+04   -0.50000000E+01
+    0.64390000E+04    0.77300000E+04   -0.50000000E+01
+    0.64390000E+04    0.77120000E+04   -0.50000000E+01
+    0.64030000E+04    0.77120000E+04   -0.50000000E+01
+    0.64030000E+04    0.77050000E+04   -0.50000000E+01
+    0.63870000E+04    0.77050000E+04   -0.50000000E+01
+    0.63870000E+04    0.76980000E+04   -0.50000000E+01
+    0.62380000E+04    0.77220000E+04   -0.50000000E+01
+    0.62780000E+04    0.77220000E+04   -0.50000000E+01
+    0.62780000E+04    0.76890000E+04   -0.50000000E+01
+    0.62380000E+04    0.76890000E+04   -0.50000000E+01
+    0.61730000E+04    0.76900000E+04   -0.50000000E+01
+    0.61480000E+04    0.76900000E+04   -0.50000000E+01
+    0.61480000E+04    0.76910000E+04   -0.50000000E+01
+    0.61360000E+04    0.76910000E+04   -0.50000000E+01
+    0.61360000E+04    0.77000000E+04   -0.50000000E+01
+    0.61310000E+04    0.77000000E+04   -0.50000000E+01
+    0.61310000E+04    0.77210000E+04   -0.50000000E+01
+    0.61600000E+04    0.77210000E+04   -0.50000000E+01
+    0.61600000E+04    0.77280000E+04   -0.50000000E+01
+    0.61810000E+04    0.77280000E+04   -0.50000000E+01
+    0.61810000E+04    0.77160000E+04   -0.50000000E+01
+    0.61930000E+04    0.77160000E+04   -0.50000000E+01
+    0.61930000E+04    0.76900000E+04   -0.50000000E+01
+    0.62920000E+04    0.77220000E+04   -0.50000000E+01
+    0.63330000E+04    0.77220000E+04   -0.50000000E+01
+    0.63330000E+04    0.76890000E+04   -0.50000000E+01
+    0.62920000E+04    0.76890000E+04   -0.50000000E+01
+    0.60280000E+04    0.76820000E+04   -0.50000000E+01
+    0.60280000E+04    0.76940000E+04   -0.50000000E+01
+    0.59950000E+04    0.76940000E+04   -0.50000000E+01
+    0.59950000E+04    0.77310000E+04   -0.50000000E+01
+    0.60870000E+04    0.77310000E+04   -0.50000000E+01
+    0.60870000E+04    0.77120000E+04   -0.50000000E+01
+    0.60780000E+04    0.77120000E+04   -0.50000000E+01
+    0.60780000E+04    0.76820000E+04   -0.50000000E+01
+    0.66090000E+04    0.76780000E+04   -0.50000000E+01
+    0.66260000E+04    0.76780000E+04   -0.50000000E+01
+    0.66260000E+04    0.76680000E+04   -0.50000000E+01
+    0.66090000E+04    0.76680000E+04   -0.50000000E+01
+    0.65230000E+04    0.76560000E+04   -0.50000000E+01
+    0.65060000E+04    0.76560000E+04   -0.50000000E+01
+    0.65060000E+04    0.76600000E+04   -0.50000000E+01
+    0.64780000E+04    0.76600000E+04   -0.50000000E+01
+    0.64780000E+04    0.76870000E+04   -0.50000000E+01
+    0.64760000E+04    0.76870000E+04   -0.50000000E+01
+    0.64760000E+04    0.77100000E+04   -0.50000000E+01
+    0.64830000E+04    0.77100000E+04   -0.50000000E+01
+    0.64830000E+04    0.77180000E+04   -0.50000000E+01
+    0.64880000E+04    0.77180000E+04   -0.50000000E+01
+    0.64990000E+04    0.77270000E+04   -0.50000000E+01
+    0.64990000E+04    0.77310000E+04   -0.50000000E+01
+    0.65230000E+04    0.77310000E+04   -0.50000000E+01
+    0.65230000E+04    0.77120000E+04   -0.50000000E+01
+    0.65300000E+04    0.77120000E+04   -0.50000000E+01
+    0.65300000E+04    0.76940000E+04   -0.50000000E+01
+    0.65230000E+04    0.76940000E+04   -0.50000000E+01
+    0.59950000E+04    0.76400000E+04   -0.50000000E+01
+    0.59950000E+04    0.76670000E+04   -0.50000000E+01
+    0.60730000E+04    0.76670000E+04   -0.50000000E+01
+    0.60730000E+04    0.76400000E+04   -0.50000000E+01
+    0.61480000E+04    0.76400000E+04   -0.50000000E+01
+    0.60970000E+04    0.76400000E+04   -0.50000000E+01
+    0.60970000E+04    0.76750000E+04   -0.50000000E+01
+    0.61200000E+04    0.76750000E+04   -0.50000000E+01
+    0.61200000E+04    0.76760000E+04   -0.50000000E+01
+    0.61480000E+04    0.76760000E+04   -0.50000000E+01
+    0.61480000E+04    0.76560000E+04   -0.50000000E+01
+    0.61530000E+04    0.76390000E+04   -0.50000000E+01
+    0.61530000E+04    0.76700000E+04   -0.50000000E+01
+    0.61600000E+04    0.76700000E+04   -0.50000000E+01
+    0.61600000E+04    0.76770000E+04   -0.50000000E+01
+    0.61720000E+04    0.76770000E+04   -0.50000000E+01
+    0.61720000E+04    0.76780000E+04   -0.50000000E+01
+    0.61950000E+04    0.76780000E+04   -0.50000000E+01
+    0.61950000E+04    0.76390000E+04   -0.50000000E+01
+    0.63160000E+04    0.76460000E+04   -0.50000000E+01
+    0.63160000E+04    0.76650000E+04   -0.50000000E+01
+    0.63160000E+04    0.76740000E+04   -0.50000000E+01
+    0.63500000E+04    0.76740000E+04   -0.50000000E+01
+    0.63500000E+04    0.76540000E+04   -0.50000000E+01
+    0.63370000E+04    0.76540000E+04   -0.50000000E+01
+    0.63370000E+04    0.76370000E+04   -0.50000000E+01
+    0.63260000E+04    0.76370000E+04   -0.50000000E+01
+    0.63260000E+04    0.76350000E+04   -0.50000000E+01
+    0.63160000E+04    0.76350000E+04   -0.50000000E+01
+    0.66480000E+04    0.77250000E+04   -0.50000000E+01
+    0.66820000E+04    0.77250000E+04   -0.50000000E+01
+    0.66820000E+04    0.76120000E+04   -0.50000000E+01
+    0.66480000E+04    0.76120000E+04   -0.50000000E+01
+    0.62350000E+04    0.76160000E+04   -0.50000000E+01
+    0.62350000E+04    0.76430000E+04   -0.50000000E+01
+    0.62460000E+04    0.76430000E+04   -0.50000000E+01
+    0.62460000E+04    0.76550000E+04   -0.50000000E+01
+    0.62490000E+04    0.76550000E+04   -0.50000000E+01
+    0.62490000E+04    0.76790000E+04   -0.50000000E+01
+    0.62770000E+04    0.76790000E+04   -0.50000000E+01
+    0.62770000E+04    0.76730000E+04   -0.50000000E+01
+    0.62840000E+04    0.76730000E+04   -0.50000000E+01
+    0.62840000E+04    0.76800000E+04   -0.50000000E+01
+    0.63050000E+04    0.76800000E+04   -0.50000000E+01
+    0.63050000E+04    0.76250000E+04   -0.50000000E+01
+    0.63040000E+04    0.76250000E+04   -0.50000000E+01
+    0.63040000E+04    0.76070000E+04   -0.50000000E+01
+    0.62720000E+04    0.76070000E+04   -0.50000000E+01
+    0.62720000E+04    0.75980000E+04   -0.50000000E+01
+    0.62470000E+04    0.75980000E+04   -0.50000000E+01
+    0.62470000E+04    0.76160000E+04   -0.50000000E+01
+    0.62820000E+04    0.75960000E+04   -0.50000000E+01
+    0.63040000E+04    0.75960000E+04   -0.50000000E+01
+    0.63040000E+04    0.75920000E+04   -0.50000000E+01
+    0.62820000E+04    0.75920000E+04   -0.50000000E+01
+    0.60730000E+04    0.75820000E+04   -0.50000000E+01
+    0.60730000E+04    0.76190000E+04   -0.50000000E+01
+    0.60940000E+04    0.76190000E+04   -0.50000000E+01
+    0.60940000E+04    0.75950000E+04   -0.50000000E+01
+    0.61090000E+04    0.75950000E+04   -0.50000000E+01
+    0.61090000E+04    0.75840000E+04   -0.50000000E+01
+    0.60940000E+04    0.75840000E+04   -0.50000000E+01
+    0.60940000E+04    0.75820000E+04   -0.50000000E+01
+    0.60330000E+04    0.75800000E+04   -0.50000000E+01
+    0.60330000E+04    0.76120000E+04   -0.50000000E+01
+    0.60330000E+04    0.76200000E+04   -0.50000000E+01
+    0.60510000E+04    0.76200000E+04   -0.50000000E+01
+    0.60510000E+04    0.76070000E+04   -0.50000000E+01
+    0.60470000E+04    0.76070000E+04   -0.50000000E+01
+    0.60470000E+04    0.76010000E+04   -0.50000000E+01
+    0.60510000E+04    0.76010000E+04   -0.50000000E+01
+    0.60510000E+04    0.75800000E+04   -0.50000000E+01
+    0.62360000E+04    0.75680000E+04   -0.50000000E+01
+    0.62490000E+04    0.75680000E+04   -0.50000000E+01
+    0.62490000E+04    0.75560000E+04   -0.50000000E+01
+    0.62360000E+04    0.75560000E+04   -0.50000000E+01
+    0.59930000E+04    0.75680000E+04   -0.50000000E+01
+    0.60170000E+04    0.75680000E+04   -0.50000000E+01
+    0.60170000E+04    0.75290000E+04   -0.50000000E+01
+    0.59930000E+04    0.75290000E+04   -0.50000000E+01
+    0.60290000E+04    0.75280000E+04   -0.50000000E+01
+    0.60290000E+04    0.75710000E+04   -0.50000000E+01
+    0.60760000E+04    0.75710000E+04   -0.50000000E+01
+    0.60760000E+04    0.75720000E+04   -0.50000000E+01
+    0.60980000E+04    0.75720000E+04   -0.50000000E+01
+    0.60980000E+04    0.75760000E+04   -0.50000000E+01
+    0.61130000E+04    0.75760000E+04   -0.50000000E+01
+    0.61130000E+04    0.75280000E+04   -0.50000000E+01
+    0.62820000E+04    0.75290000E+04   -0.50000000E+01
+    0.62820000E+04    0.75300000E+04   -0.50000000E+01
+    0.62360000E+04    0.75300000E+04   -0.50000000E+01
+    0.62360000E+04    0.75550000E+04   -0.50000000E+01
+    0.62820000E+04    0.75550000E+04   -0.50000000E+01
+    0.62820000E+04    0.75730000E+04   -0.50000000E+01
+    0.63070000E+04    0.75730000E+04   -0.50000000E+01
+    0.63070000E+04    0.75290000E+04   -0.50000000E+01
+    0.61380000E+04    0.75880000E+04   -0.50000000E+01
+    0.61380000E+04    0.76200000E+04   -0.50000000E+01
+    0.61850000E+04    0.76200000E+04   -0.50000000E+01
+    0.61850000E+04    0.75880000E+04   -0.50000000E+01
+    0.63190000E+04    0.75380000E+04   -0.50000000E+01
+    0.63190000E+04    0.75330000E+04   -0.50000000E+01
+    0.63120000E+04    0.75330000E+04   -0.50000000E+01
+    0.63120000E+04    0.75500000E+04   -0.50000000E+01
+    0.63230000E+04    0.75500000E+04   -0.50000000E+01
+    0.63230000E+04    0.75580000E+04   -0.50000000E+01
+    0.63430000E+04    0.75580000E+04   -0.50000000E+01
+    0.63430000E+04    0.75880000E+04   -0.50000000E+01
+    0.63240000E+04    0.75880000E+04   -0.50000000E+01
+    0.63240000E+04    0.76170000E+04   -0.50000000E+01
+    0.63740000E+04    0.76170000E+04   -0.50000000E+01
+    0.63740000E+04    0.75760000E+04   -0.50000000E+01
+    0.63750000E+04    0.75760000E+04   -0.50000000E+01
+    0.63750000E+04    0.75600000E+04   -0.50000000E+01
+    0.63770000E+04    0.75600000E+04   -0.50000000E+01
+    0.63770000E+04    0.75250000E+04   -0.50000000E+01
+    0.63270000E+04    0.75250000E+04   -0.50000000E+01
+    0.63270000E+04    0.75380000E+04   -0.50000000E+01
+    0.63840000E+04    0.75250000E+04   -0.50000000E+01
+    0.63840000E+04    0.75520000E+04   -0.50000000E+01
+    0.63930000E+04    0.75520000E+04   -0.50000000E+01
+    0.63930000E+04    0.75690000E+04   -0.50000000E+01
+    0.63870000E+04    0.75690000E+04   -0.50000000E+01
+    0.63870000E+04    0.75770000E+04   -0.50000000E+01
+    0.63900000E+04    0.75770000E+04   -0.50000000E+01
+    0.63900000E+04    0.76320000E+04   -0.50000000E+01
+    0.63830000E+04    0.76320000E+04   -0.50000000E+01
+    0.63830000E+04    0.76640000E+04   -0.50000000E+01
+    0.63900000E+04    0.76640000E+04   -0.50000000E+01
+    0.63900000E+04    0.76750000E+04   -0.50000000E+01
+    0.63960000E+04    0.76750000E+04   -0.50000000E+01
+    0.63960000E+04    0.76920000E+04   -0.50000000E+01
+    0.64140000E+04    0.76920000E+04   -0.50000000E+01
+    0.64230000E+04    0.77000000E+04   -0.50000000E+01
+    0.64370000E+04    0.77000000E+04   -0.50000000E+01
+    0.64370000E+04    0.75560000E+04   -0.50000000E+01
+    0.64240000E+04    0.75560000E+04   -0.50000000E+01
+    0.64240000E+04    0.75520000E+04   -0.50000000E+01
+    0.64370000E+04    0.75520000E+04   -0.50000000E+01
+    0.64370000E+04    0.75250000E+04   -0.50000000E+01
+    0.65340000E+04    0.75240000E+04   -0.50000000E+01
+    0.65340000E+04    0.75790000E+04   -0.50000000E+01
+    0.65510000E+04    0.75790000E+04   -0.50000000E+01
+    0.65510000E+04    0.75880000E+04   -0.50000000E+01
+    0.66120000E+04    0.75880000E+04   -0.50000000E+01
+    0.66120000E+04    0.75790000E+04   -0.50000000E+01
+    0.66330000E+04    0.75790000E+04   -0.50000000E+01
+    0.66330000E+04    0.75240000E+04   -0.50000000E+01
+    0.66490000E+04    0.75370000E+04   -0.50000000E+01
+    0.66590000E+04    0.75370000E+04   -0.50000000E+01
+    0.66590000E+04    0.75550000E+04   -0.50000000E+01
+    0.66540000E+04    0.75550000E+04   -0.50000000E+01
+    0.66540000E+04    0.75680000E+04   -0.50000000E+01
+    0.66770000E+04    0.75680000E+04   -0.50000000E+01
+    0.66770000E+04    0.75240000E+04   -0.50000000E+01
+    0.66490000E+04    0.75240000E+04   -0.50000000E+01
+    0.62340000E+04    0.74870000E+04   -0.50000000E+01
+    0.62800000E+04    0.74870000E+04   -0.50000000E+01
+    0.62800000E+04    0.74630000E+04   -0.50000000E+01
+    0.62340000E+04    0.74630000E+04   -0.50000000E+01
+    0.60020000E+04    0.74810000E+04   -0.50000000E+01
+    0.60020000E+04    0.74880000E+04   -0.50000000E+01
+    0.60300000E+04    0.74880000E+04   -0.50000000E+01
+    0.60300000E+04    0.74620000E+04   -0.50000000E+01
+    0.59920000E+04    0.74620000E+04   -0.50000000E+01
+    0.59920000E+04    0.74810000E+04   -0.50000000E+01
+    0.63340000E+04    0.74360000E+04   -0.50000000E+01
+    0.63340000E+04    0.74430000E+04   -0.50000000E+01
+    0.63280000E+04    0.74430000E+04   -0.50000000E+01
+    0.63280000E+04    0.74620000E+04   -0.50000000E+01
+    0.63130000E+04    0.74620000E+04   -0.50000000E+01
+    0.63130000E+04    0.74860000E+04   -0.50000000E+01
+    0.63540000E+04    0.74860000E+04   -0.50000000E+01
+    0.63540000E+04    0.74360000E+04   -0.50000000E+01
+    0.64310000E+04    0.74360000E+04   -0.50000000E+01
+    0.63880000E+04    0.74360000E+04   -0.50000000E+01
+    0.63880000E+04    0.74740000E+04   -0.50000000E+01
+    0.63770000E+04    0.74740000E+04   -0.50000000E+01
+    0.63770000E+04    0.74850000E+04   -0.50000000E+01
+    0.63890000E+04    0.74850000E+04   -0.50000000E+01
+    0.63890000E+04    0.74820000E+04   -0.50000000E+01
+    0.64310000E+04    0.74820000E+04   -0.50000000E+01
+    0.61540000E+04    0.74330000E+04   -0.50000000E+01
+    0.61540000E+04    0.74240000E+04   -0.50000000E+01
+    0.61690000E+04    0.74240000E+04   -0.50000000E+01
+    0.61690000E+04    0.74160000E+04   -0.50000000E+01
+    0.61450000E+04    0.74160000E+04   -0.50000000E+01
+    0.61450000E+04    0.74330000E+04   -0.50000000E+01
+    0.62830000E+04    0.74190000E+04   -0.50000000E+01
+    0.62960000E+04    0.74190000E+04   -0.50000000E+01
+    0.62960000E+04    0.74090000E+04   -0.50000000E+01
+    0.62830000E+04    0.74090000E+04   -0.50000000E+01
+    0.62930000E+04    0.74030000E+04   -0.50000000E+01
+    0.63020000E+04    0.74170000E+04   -0.50000000E+01
+    0.63330000E+04    0.74170000E+04   -0.50000000E+01
+    0.63330000E+04    0.73960000E+04   -0.50000000E+01
+    0.63000000E+04    0.73960000E+04   -0.50000000E+01
+    0.63000000E+04    0.74030000E+04   -0.50000000E+01
+    0.63860000E+04    0.74150000E+04   -0.50000000E+01
+    0.64350000E+04    0.74150000E+04   -0.50000000E+01
+    0.64350000E+04    0.73950000E+04   -0.50000000E+01
+    0.63860000E+04    0.73950000E+04   -0.50000000E+01
+    0.60920000E+04    0.73930000E+04   -0.50000000E+01
+    0.60850000E+04    0.73930000E+04   -0.50000000E+01
+    0.60850000E+04    0.74000000E+04   -0.50000000E+01
+    0.60880000E+04    0.74000000E+04   -0.50000000E+01
+    0.60880000E+04    0.73960000E+04   -0.50000000E+01
+    0.60930000E+04    0.73960000E+04   -0.50000000E+01
+    0.60930000E+04    0.74880000E+04   -0.50000000E+01
+    0.61240000E+04    0.74880000E+04   -0.50000000E+01
+    0.61240000E+04    0.74790000E+04   -0.50000000E+01
+    0.61190000E+04    0.74790000E+04   -0.50000000E+01
+    0.61190000E+04    0.74750000E+04   -0.50000000E+01
+    0.61250000E+04    0.74750000E+04   -0.50000000E+01
+    0.61250000E+04    0.74650000E+04   -0.50000000E+01
+    0.61090000E+04    0.74650000E+04   -0.50000000E+01
+    0.61090000E+04    0.73880000E+04   -0.50000000E+01
+    0.60920000E+04    0.73880000E+04   -0.50000000E+01
+    0.60310000E+04    0.74430000E+04   -0.50000000E+01
+    0.60310000E+04    0.74240000E+04   -0.50000000E+01
+    0.60280000E+04    0.74240000E+04   -0.50000000E+01
+    0.60280000E+04    0.73840000E+04   -0.50000000E+01
+    0.60220000E+04    0.73840000E+04   -0.50000000E+01
+    0.60220000E+04    0.74430000E+04   -0.50000000E+01
+    0.65190000E+04    0.74870000E+04   -0.50000000E+01
+    0.65190000E+04    0.74540000E+04   -0.50000000E+01
+    0.65070000E+04    0.74540000E+04   -0.50000000E+01
+    0.65070000E+04    0.74430000E+04   -0.50000000E+01
+    0.65170000E+04    0.74430000E+04   -0.50000000E+01
+    0.65170000E+04    0.74180000E+04   -0.50000000E+01
+    0.65230000E+04    0.74180000E+04   -0.50000000E+01
+    0.65230000E+04    0.74080000E+04   -0.50000000E+01
+    0.65180000E+04    0.74080000E+04   -0.50000000E+01
+    0.65180000E+04    0.73820000E+04   -0.50000000E+01
+    0.65140000E+04    0.73820000E+04   -0.50000000E+01
+    0.65140000E+04    0.73780000E+04   -0.50000000E+01
+    0.65230000E+04    0.73780000E+04   -0.50000000E+01
+    0.65230000E+04    0.73570000E+04   -0.50000000E+01
+    0.64750000E+04    0.73570000E+04   -0.50000000E+01
+    0.64750000E+04    0.74870000E+04   -0.50000000E+01
+    0.65640000E+04    0.73840000E+04   -0.50000000E+01
+    0.65420000E+04    0.73840000E+04   -0.50000000E+01
+    0.65420000E+04    0.73890000E+04   -0.50000000E+01
+    0.65370000E+04    0.73890000E+04   -0.50000000E+01
+    0.65370000E+04    0.74540000E+04   -0.50000000E+01
+    0.65310000E+04    0.74540000E+04   -0.50000000E+01
+    0.65310000E+04    0.74620000E+04   -0.50000000E+01
+    0.65310000E+04    0.74670000E+04   -0.50000000E+01
+    0.65280000E+04    0.74670000E+04   -0.50000000E+01
+    0.65280000E+04    0.74840000E+04   -0.50000000E+01
+    0.65430000E+04    0.74840000E+04   -0.50000000E+01
+    0.65430000E+04    0.74740000E+04   -0.50000000E+01
+    0.65490000E+04    0.74740000E+04   -0.50000000E+01
+    0.65490000E+04    0.74840000E+04   -0.50000000E+01
+    0.66090000E+04    0.74840000E+04   -0.50000000E+01
+    0.66090000E+04    0.74100000E+04   -0.50000000E+01
+    0.65940000E+04    0.74100000E+04   -0.50000000E+01
+    0.65940000E+04    0.73810000E+04   -0.50000000E+01
+    0.65930000E+04    0.73810000E+04   -0.50000000E+01
+    0.65930000E+04    0.73820000E+04   -0.50000000E+01
+    0.65860000E+04    0.73820000E+04   -0.50000000E+01
+    0.65860000E+04    0.73570000E+04   -0.50000000E+01
+    0.65640000E+04    0.73570000E+04   -0.50000000E+01
+    0.66410000E+04    0.74160000E+04   -0.50000000E+01
+    0.66130000E+04    0.74160000E+04   -0.50000000E+01
+    0.66130000E+04    0.74830000E+04   -0.50000000E+01
+    0.66770000E+04    0.74830000E+04   -0.50000000E+01
+    0.66770000E+04    0.73930000E+04   -0.50000000E+01
+    0.66760000E+04    0.73820000E+04   -0.50000000E+01
+    0.66760000E+04    0.73560000E+04   -0.50000000E+01
+    0.66410000E+04    0.73560000E+04   -0.50000000E+01
+    0.62350000E+04    0.73620000E+04   -0.50000000E+01
+    0.62480000E+04    0.73620000E+04   -0.50000000E+01
+    0.62480000E+04    0.73510000E+04   -0.50000000E+01
+    0.62350000E+04    0.73510000E+04   -0.50000000E+01
+    0.62520000E+04    0.73640000E+04   -0.50000000E+01
+    0.62670000E+04    0.73640000E+04   -0.50000000E+01
+    0.62670000E+04    0.73500000E+04   -0.50000000E+01
+    0.62520000E+04    0.73500000E+04   -0.50000000E+01
+    0.63340000E+04    0.73750000E+04   -0.50000000E+01
+    0.63490000E+04    0.73750000E+04   -0.50000000E+01
+    0.63490000E+04    0.73410000E+04   -0.50000000E+01
+    0.63340000E+04    0.73410000E+04   -0.50000000E+01
+    0.60420000E+04    0.73520000E+04   -0.50000000E+01
+    0.60550000E+04    0.73520000E+04   -0.50000000E+01
+    0.60550000E+04    0.73380000E+04   -0.50000000E+01
+    0.60420000E+04    0.73380000E+04   -0.50000000E+01
+    0.60020000E+04    0.73480000E+04   -0.50000000E+01
+    0.60300000E+04    0.73480000E+04   -0.50000000E+01
+    0.60300000E+04    0.73360000E+04   -0.50000000E+01
+    0.60020000E+04    0.73360000E+04   -0.50000000E+01
+    0.62340000E+04    0.73350000E+04   -0.50000000E+01
+    0.62620000E+04    0.73350000E+04   -0.50000000E+01
+    0.62620000E+04    0.73290000E+04   -0.50000000E+01
+    0.62340000E+04    0.73290000E+04   -0.50000000E+01
+    0.63630000E+04    0.73360000E+04   -0.50000000E+01
+    0.63760000E+04    0.73360000E+04   -0.50000000E+01
+    0.63760000E+04    0.73290000E+04   -0.50000000E+01
+    0.63630000E+04    0.73290000E+04   -0.50000000E+01
+    0.62340000E+04    0.73220000E+04   -0.50000000E+01
+    0.62600000E+04    0.73220000E+04   -0.50000000E+01
+    0.62600000E+04    0.73160000E+04   -0.50000000E+01
+    0.62340000E+04    0.73160000E+04   -0.50000000E+01
+    0.61530000E+04    0.73570000E+04   -0.50000000E+01
+    0.61530000E+04    0.74050000E+04   -0.50000000E+01
+    0.62020000E+04    0.74050000E+04   -0.50000000E+01
+    0.62020000E+04    0.73790000E+04   -0.50000000E+01
+    0.62020000E+04    0.73570000E+04   -0.50000000E+01
+    0.63710000E+04    0.73140000E+04   -0.50000000E+01
+    0.63760000E+04    0.73140000E+04   -0.50000000E+01
+    0.63760000E+04    0.72940000E+04   -0.50000000E+01
+    0.63710000E+04    0.72940000E+04   -0.50000000E+01
+    0.61440000E+04    0.73040000E+04   -0.50000000E+01
+    0.61550000E+04    0.73040000E+04   -0.50000000E+01
+    0.61550000E+04    0.72930000E+04   -0.50000000E+01
+    0.61440000E+04    0.72930000E+04   -0.50000000E+01
+    0.60800000E+04    0.73400000E+04   -0.50000000E+01
+    0.60820000E+04    0.73400000E+04   -0.50000000E+01
+    0.60820000E+04    0.73510000E+04   -0.50000000E+01
+    0.60600000E+04    0.73510000E+04   -0.50000000E+01
+    0.60600000E+04    0.73550000E+04   -0.50000000E+01
+    0.60460000E+04    0.73550000E+04   -0.50000000E+01
+    0.60460000E+04    0.73650000E+04   -0.50000000E+01
+    0.61050000E+04    0.73650000E+04   -0.50000000E+01
+    0.61050000E+04    0.73550000E+04   -0.50000000E+01
+    0.61000000E+04    0.73550000E+04   -0.50000000E+01
+    0.61000000E+04    0.73340000E+04   -0.50000000E+01
+    0.61120000E+04    0.73340000E+04   -0.50000000E+01
+    0.61120000E+04    0.73230000E+04   -0.50000000E+01
+    0.60990000E+04    0.73230000E+04   -0.50000000E+01
+    0.60990000E+04    0.73040000E+04   -0.50000000E+01
+    0.61050000E+04    0.73040000E+04   -0.50000000E+01
+    0.61050000E+04    0.72930000E+04   -0.50000000E+01
+    0.60800000E+04    0.72930000E+04   -0.50000000E+01
+    0.63770000E+04    0.73740000E+04   -0.50000000E+01
+    0.64320000E+04    0.73740000E+04   -0.50000000E+01
+    0.64320000E+04    0.72910000E+04   -0.50000000E+01
+    0.63770000E+04    0.72910000E+04   -0.50000000E+01
+    0.59900000E+04    0.73080000E+04   -0.50000000E+01
+    0.60260000E+04    0.73080000E+04   -0.50000000E+01
+    0.60260000E+04    0.72870000E+04   -0.50000000E+01
+    0.59900000E+04    0.72870000E+04   -0.50000000E+01
+    0.60600000E+04    0.72870000E+04   -0.50000000E+01
+    0.60600000E+04    0.73050000E+04   -0.50000000E+01
+    0.60670000E+04    0.73130000E+04   -0.50000000E+01
+    0.60720000E+04    0.73130000E+04   -0.50000000E+01
+    0.60720000E+04    0.72870000E+04   -0.50000000E+01
+    0.62580000E+04    0.72840000E+04   -0.50000000E+01
+    0.62580000E+04    0.72880000E+04   -0.50000000E+01
+    0.62330000E+04    0.72880000E+04   -0.50000000E+01
+    0.62330000E+04    0.73150000E+04   -0.50000000E+01
+    0.62710000E+04    0.73150000E+04   -0.50000000E+01
+    0.62710000E+04    0.73090000E+04   -0.50000000E+01
+    0.62800000E+04    0.73090000E+04   -0.50000000E+01
+    0.62800000E+04    0.73160000E+04   -0.50000000E+01
+    0.62870000E+04    0.73160000E+04   -0.50000000E+01
+    0.62870000E+04    0.73300000E+04   -0.50000000E+01
+    0.63060000E+04    0.73300000E+04   -0.50000000E+01
+    0.63060000E+04    0.73270000E+04   -0.50000000E+01
+    0.63200000E+04    0.73270000E+04   -0.50000000E+01
+    0.63200000E+04    0.73140000E+04   -0.50000000E+01
+    0.63060000E+04    0.73140000E+04   -0.50000000E+01
+    0.63060000E+04    0.72840000E+04   -0.50000000E+01
+    0.64720000E+04    0.72830000E+04   -0.50000000E+01
+    0.64720000E+04    0.73420000E+04   -0.50000000E+01
+    0.65220000E+04    0.73420000E+04   -0.50000000E+01
+    0.65220000E+04    0.73190000E+04   -0.50000000E+01
+    0.65030000E+04    0.73190000E+04   -0.50000000E+01
+    0.65030000E+04    0.73140000E+04   -0.50000000E+01
+    0.65210000E+04    0.73140000E+04   -0.50000000E+01
+    0.65210000E+04    0.72950000E+04   -0.50000000E+01
+    0.65250000E+04    0.72950000E+04   -0.50000000E+01
+    0.65250000E+04    0.72830000E+04   -0.50000000E+01
+    0.65460000E+04    0.72970000E+04   -0.50000000E+01
+    0.65510000E+04    0.72970000E+04   -0.50000000E+01
+    0.65510000E+04    0.73030000E+04   -0.50000000E+01
+    0.65460000E+04    0.73030000E+04   -0.50000000E+01
+    0.65410000E+04    0.73030000E+04   -0.50000000E+01
+    0.65410000E+04    0.72990000E+04   -0.50000000E+01
+    0.65300000E+04    0.72990000E+04   -0.50000000E+01
+    0.65300000E+04    0.73050000E+04   -0.50000000E+01
+    0.65250000E+04    0.73050000E+04   -0.50000000E+01
+    0.65250000E+04    0.73210000E+04   -0.50000000E+01
+    0.65430000E+04    0.73210000E+04   -0.50000000E+01
+    0.65430000E+04    0.73400000E+04   -0.50000000E+01
+    0.65660000E+04    0.73400000E+04   -0.50000000E+01
+    0.65660000E+04    0.72820000E+04   -0.50000000E+01
+    0.65460000E+04    0.72820000E+04   -0.50000000E+01
+    0.65850000E+04    0.73070000E+04   -0.50000000E+01
+    0.66450000E+04    0.73070000E+04   -0.50000000E+01
+    0.66450000E+04    0.72820000E+04   -0.50000000E+01
+    0.65850000E+04    0.72820000E+04   -0.50000000E+01
+    0.66490000E+04    0.72990000E+04   -0.50000000E+01
+    0.66510000E+04    0.72990000E+04   -0.50000000E+01
+    0.66510000E+04    0.73110000E+04   -0.50000000E+01
+    0.65860000E+04    0.73110000E+04   -0.50000000E+01
+    0.65860000E+04    0.73360000E+04   -0.50000000E+01
+    0.65920000E+04    0.73360000E+04   -0.50000000E+01
+    0.65920000E+04    0.73370000E+04   -0.50000000E+01
+    0.66750000E+04    0.73370000E+04   -0.50000000E+01
+    0.66750000E+04    0.72830000E+04   -0.50000000E+01
+    0.66640000E+04    0.72830000E+04   -0.50000000E+01
+    0.66640000E+04    0.72820000E+04   -0.50000000E+01
+    0.66490000E+04    0.72820000E+04   -0.50000000E+01
+    0.65950000E+04    0.76530000E+04   -0.50000000E+01
+    0.66030000E+04    0.76530000E+04   -0.50000000E+01
+    0.66030000E+04    0.76310000E+04   -0.50000000E+01
+    0.65780000E+04    0.76310000E+04   -0.50000000E+01
+    0.65770000E+04    0.76530000E+04   -0.50000000E+01
+    0.65870000E+04    0.76600000E+04   -0.50000000E+01
+    0.65950000E+04    0.76600000E+04   -0.50000000E+01
+    0.63360000E+04    0.70575000E+04   -0.50000000E+01
+    0.70280000E+04    0.75065000E+04   -0.50000000E+01
+    0.63360000E+04    0.79555000E+04   -0.50000000E+01
+    0.56440000E+04    0.75065000E+04   -0.50000000E+01
+    0.64050000E+04    0.77300000E+04   -0.50000000E+01
+    0.64210000E+04    0.77120000E+04   -0.50000000E+01
+    0.62620000E+04    0.76890000E+04   -0.50000000E+01
+    0.63080000E+04    0.76890000E+04   -0.50000000E+01
+    0.60410000E+04    0.77310000E+04   -0.50000000E+01
+    0.60410000E+04    0.76670000E+04   -0.50000000E+01
+    0.60340000E+04    0.76400000E+04   -0.50000000E+01
+    0.61160000E+04    0.76400000E+04   -0.50000000E+01
+    0.61480000E+04    0.76660000E+04   -0.50000000E+01
+    0.61530000E+04    0.76540000E+04   -0.50000000E+01
+    0.63330000E+04    0.76740000E+04   -0.50000000E+01
+    0.66480000E+04    0.76610000E+04   -0.50000000E+01
+    0.62920000E+04    0.76800000E+04   -0.50000000E+01
+    0.63050000E+04    0.76570000E+04   -0.50000000E+01
+    0.62880000E+04    0.76070000E+04   -0.50000000E+01
+    0.60330000E+04    0.75960000E+04   -0.50000000E+01
+    0.60610000E+04    0.75710000E+04   -0.50000000E+01
+    0.62590000E+04    0.75550000E+04   -0.50000000E+01
+    0.63070000E+04    0.75510000E+04   -0.50000000E+01
+    0.61530000E+04    0.76200000E+04   -0.50000000E+01
+    0.63120000E+04    0.75415000E+04   -0.50000000E+01
+    0.63490000E+04    0.76170000E+04   -0.50000000E+01
+    0.63770000E+04    0.75440000E+04   -0.50000000E+01
+    0.63900000E+04    0.76045000E+04   -0.50000000E+01
+    0.64370000E+04    0.76280000E+04   -0.50000000E+01
+    0.66330000E+04    0.75470000E+04   -0.50000000E+01
+    0.65690000E+04    0.75240000E+04   -0.50000000E+01
+    0.66770000E+04    0.75460000E+04   -0.50000000E+01
+    0.66630000E+04    0.75240000E+04   -0.50000000E+01
+    0.61570000E+04    0.74160000E+04   -0.50000000E+01
+    0.62973262E+04    0.74097295E+04   -0.50000000E+01
+    0.60880000E+04    0.73930000E+04   -0.50000000E+01
+    0.60850000E+04    0.73965000E+04   -0.50000000E+01
+    0.60930000E+04    0.74420000E+04   -0.50000000E+01
+    0.61085000E+04    0.74880000E+04   -0.50000000E+01
+    0.61090000E+04    0.74265000E+04   -0.50000000E+01
+    0.60220000E+04    0.74135000E+04   -0.50000000E+01
+    0.65190000E+04    0.74700000E+04   -0.50000000E+01
+    0.65190000E+04    0.73780000E+04   -0.50000000E+01
+    0.64750000E+04    0.74220000E+04   -0.50000000E+01
+    0.65370000E+04    0.74210000E+04   -0.50000000E+01
+    0.66090000E+04    0.74420000E+04   -0.50000000E+01
+    0.65940000E+04    0.73940000E+04   -0.50000000E+01
+    0.66770000E+04    0.74380000E+04   -0.50000000E+01
+    0.62520000E+04    0.73560000E+04   -0.50000000E+01
+    0.60470000E+04    0.73520000E+04   -0.50000000E+01
+    0.62500000E+04    0.73290000E+04   -0.50000000E+01
+    0.61700000E+04    0.74050000E+04   -0.50000000E+01
+    0.60540000E+04    0.73550000E+04   -0.50000000E+01
+    0.60755000E+04    0.73650000E+04   -0.50000000E+01
+    0.60800000E+04    0.73165000E+04   -0.50000000E+01
+    0.64320000E+04    0.73230000E+04   -0.50000000E+01
+    0.63770000E+04    0.73325000E+04   -0.50000000E+01
+    0.60720000E+04    0.73000000E+04   -0.50000000E+01
+    0.62550000E+04    0.73150000E+04   -0.50000000E+01
+    0.64970000E+04    0.73420000E+04   -0.50000000E+01
+    0.65220000E+04    0.73350000E+04   -0.50000000E+01
+    0.65210000E+04    0.73060000E+04   -0.50000000E+01
+    0.64985000E+04    0.72830000E+04   -0.50000000E+01
+    0.65250000E+04    0.73130000E+04   -0.50000000E+01
+    0.65660000E+04    0.73110000E+04   -0.50000000E+01
+    0.66170000E+04    0.73070000E+04   -0.50000000E+01
+    0.66450000E+04    0.72910000E+04   -0.50000000E+01
+    0.66185000E+04    0.73110000E+04   -0.50000000E+01
+    0.66335000E+04    0.73370000E+04   -0.50000000E+01
+    0.66750000E+04    0.73100000E+04   -0.50000000E+01
+    0.66820000E+04    0.70575000E+04   -0.50000000E+01
+    0.59900000E+04    0.70575000E+04   -0.50000000E+01
+    0.66820000E+04    0.79555000E+04   -0.50000000E+01
+    0.59900000E+04    0.79555000E+04   -0.50000000E+01
+    0.62540000E+04    0.76890000E+04   -0.50000000E+01
+    0.60180000E+04    0.76670000E+04   -0.50000000E+01
+    0.61530000E+04    0.76620000E+04   -0.50000000E+01
+    0.66480000E+04    0.76930000E+04   -0.50000000E+01
+    0.63050000E+04    0.76410000E+04   -0.50000000E+01
+    0.60450000E+04    0.75710000E+04   -0.50000000E+01
+    0.62520000E+04    0.75550000E+04   -0.50000000E+01
+    0.63070000E+04    0.75400000E+04   -0.50000000E+01
+    0.63770000E+04    0.75520000E+04   -0.50000000E+01
+    0.62951631E+04    0.74063647E+04   -0.50000000E+01
+    0.60930000E+04    0.74190000E+04   -0.50000000E+01
+    0.60930000E+04    0.74650000E+04   -0.50000000E+01
+    0.61090000E+04    0.74490000E+04   -0.50000000E+01
+    0.60220000E+04    0.74282500E+04   -0.50000000E+01
+    0.66090000E+04    0.74630000E+04   -0.50000000E+01
+    0.64750000E+04    0.74545000E+04   -0.50000000E+01
+    0.65370000E+04    0.74050000E+04   -0.50000000E+01
+    0.66090000E+04    0.74260000E+04   -0.50000000E+01
+    0.65940000E+04    0.73875000E+04   -0.50000000E+01
+    0.60607500E+04    0.73650000E+04   -0.50000000E+01
+    0.60902500E+04    0.73650000E+04   -0.50000000E+01
+    0.60800000E+04    0.73047500E+04   -0.50000000E+01
+    0.63770000E+04    0.73117500E+04   -0.50000000E+01
+    0.63770000E+04    0.73580000E+04   -0.50000000E+01
+    0.62410000E+04    0.73150000E+04   -0.50000000E+01
+    0.62630000E+04    0.73150000E+04   -0.50000000E+01
+    0.65220000E+04    0.73270000E+04   -0.50000000E+01
+    0.65250000E+04    0.73170000E+04   -0.50000000E+01
+    0.66347500E+04    0.73110000E+04   -0.50000000E+01
+    0.66010000E+04    0.73070000E+04   -0.50000000E+01
+    0.66450000E+04    0.72990000E+04   -0.50000000E+01
+    0.66022500E+04    0.73110000E+04   -0.50000000E+01
+    0.62440000E+04    0.75550000E+04   -0.50000000E+01
+    0.63070000E+04    0.75345000E+04   -0.50000000E+01
+    0.62962446E+04    0.74080469E+04   -0.50000000E+01
+    0.60930000E+04    0.74075000E+04   -0.50000000E+01
+    0.60220000E+04    0.74208750E+04   -0.50000000E+01
+    0.66090000E+04    0.74735000E+04   -0.50000000E+01
+    0.66090000E+04    0.74180000E+04   -0.50000000E+01
+    0.65940000E+04    0.73842500E+04   -0.50000000E+01
+    0.63770000E+04    0.72990000E+04   -0.50000000E+01
+    0.63770000E+04    0.73221250E+04   -0.50000000E+01
+    0.63770000E+04    0.73452500E+04   -0.50000000E+01
+    0.62370000E+04    0.73150000E+04   -0.50000000E+01
+    0.62590000E+04    0.73150000E+04   -0.50000000E+01
+    0.65220000E+04    0.73230000E+04   -0.50000000E+01
+    0.66428750E+04    0.73110000E+04   -0.50000000E+01
+    0.66103750E+04    0.73110000E+04   -0.50000000E+01
+    0.65941250E+04    0.73110000E+04   -0.50000000E+01
+    0.62480000E+04    0.75550000E+04   -0.50000000E+01
+    0.62967852E+04    0.74088882E+04   -0.50000000E+01
+    0.60930000E+04    0.74017500E+04   -0.50000000E+01
+    0.63770000E+04    0.73169375E+04   -0.50000000E+01
+    0.65940000E+04    0.73826250E+04   -0.50000000E+01
+    0.63770000E+04    0.72950000E+04   -0.50000000E+01
+    0.63770000E+04    0.73273125E+04   -0.50000000E+01
+    0.63770000E+04    0.73388750E+04   -0.50000000E+01
+    0.62350000E+04    0.73150000E+04   -0.50000000E+01
+    0.62610000E+04    0.73150000E+04   -0.50000000E+01
+    0.62500000E+04    0.75550000E+04   -0.50000000E+01
+    0.63770000E+04    0.73143438E+04   -0.50000000E+01
+    0.63770000E+04    0.72930000E+04   -0.50000000E+01
+    0.63770000E+04    0.73299063E+04   -0.50000000E+01
+    0.63770000E+04    0.73356875E+04   -0.50000000E+01
+    0.63770000E+04    0.73286094E+04   -0.50000000E+01
+    0.62500000E+04    0.73160000E+04   -0.50000000E+01
+    0.61090000E+04    0.74072500E+04   -0.50000000E+01
+    0.62610000E+04    0.76790000E+04   -0.50000000E+01
+    0.62470000E+04    0.73220000E+04   -0.50000000E+01
+    0.62560000E+04    0.73160000E+04   -0.50000000E+01
+    0.62420000E+04    0.73160000E+04   -0.50000000E+01
+    0.63760000E+04    0.73320000E+04   -0.50000000E+01
+    0.62910000E+04    0.74090000E+04   -0.50000000E+01
+    0.65930000E+04    0.73070000E+04   -0.50000000E+01
+    0.66090000E+04    0.73070000E+04   -0.50000000E+01
+    0.60600000E+04    0.76820000E+04   -0.50000000E+01
+    0.66820000E+04    0.76685000E+04   -0.50000000E+01
+    0.66490000E+04    0.72910000E+04   -0.50000000E+01
+    0.66150000E+04    0.72820000E+04   -0.50000000E+01
+    0.61480000E+04    0.76480000E+04   -0.50000000E+01
+    0.62960000E+04    0.74130000E+04   -0.50000000E+01
+    0.63840000E+04    0.75360000E+04   -0.50000000E+01
+    0.63740000E+04    0.75965000E+04   -0.50000000E+01
+    0.62480000E+04    0.73350000E+04   -0.50000000E+01
+    0.62480000E+04    0.73580000E+04   -0.50000000E+01
+    0.66290000E+04    0.73070000E+04   -0.50000000E+01
+    0.66130000E+04    0.74480000E+04   -0.50000000E+01
+    0.63760000E+04    0.73020000E+04   -0.50000000E+01
+    0.64990000E+04    0.73570000E+04   -0.50000000E+01
+    0.62410000E+04    0.75560000E+04   -0.50000000E+01
+    0.60280000E+04    0.74080000E+04   -0.50000000E+01
+    0.63760000E+04    0.73340000E+04   -0.50000000E+01
+    0.62580000E+04    0.73160000E+04   -0.50000000E+01
+    0.62530000E+04    0.73160000E+04   -0.50000000E+01
+    0.62380000E+04    0.73160000E+04   -0.50000000E+01
+    0.63760000E+04    0.73310000E+04   -0.50000000E+01
+    0.60440000E+04    0.76820000E+04   -0.50000000E+01
+    0.62960000E+04    0.74110000E+04   -0.50000000E+01
+    0.63840000E+04    0.75440000E+04   -0.50000000E+01
+    0.63760000E+04    0.73060000E+04   -0.50000000E+01
+    0.66130000E+04    0.74320000E+04   -0.50000000E+01
+    0.66370000E+04    0.73070000E+04   -0.50000000E+01
+    0.66130000E+04    0.74670000E+04   -0.50000000E+01
+    0.63760000E+04    0.72980000E+04   -0.50000000E+01
+    0.62450000E+04    0.75560000E+04   -0.50000000E+01
+    0.60280000E+04    0.74160000E+04   -0.50000000E+01
+    0.62400000E+04    0.73160000E+04   -0.50000000E+01
+    0.62545000E+04    0.73160000E+04   -0.50000000E+01
+    0.62360000E+04    0.73160000E+04   -0.50000000E+01
+    0.62470000E+04    0.75560000E+04   -0.50000000E+01
+    0.63760000E+04    0.73000000E+04   -0.50000000E+01
+    0.66130000E+04    0.74240000E+04   -0.50000000E+01
+    0.63760000E+04    0.73100000E+04   -0.50000000E+01
+    0.66130000E+04    0.74400000E+04   -0.50000000E+01
+    0.66130000E+04    0.74575000E+04   -0.50000000E+01
+    0.66130000E+04    0.74750000E+04   -0.50000000E+01
+    0.63760000E+04    0.72960000E+04   -0.50000000E+01
+    0.62430000E+04    0.75560000E+04   -0.50000000E+01
+    0.63760000E+04    0.73120000E+04   -0.50000000E+01
+    0.66130000E+04    0.74622500E+04   -0.50000000E+01
+    0.66090000E+04    0.74682500E+04   -0.50000000E+01
+    0.66266250E+04    0.73110000E+04   -0.50000000E+01
+    0.62480000E+04    0.73150000E+04   -0.50000000E+01
+    0.62390000E+04    0.73150000E+04   -0.50000000E+01
+    0.63770000E+04    0.73312031E+04   -0.50000000E+01
+    0.66090000E+04    0.74525000E+04   -0.50000000E+01
+    0.62405000E+04    0.73220000E+04   -0.50000000E+01
+    0.63770000E+04    0.73340938E+04   -0.50000000E+01
+    0.62460000E+04    0.75550000E+04   -0.50000000E+01
+    0.63770000E+04    0.75345000E+04   -0.50000000E+01
+    0.61530000E+04    0.76470000E+04   -0.50000000E+01
+    0.62570000E+04    0.73150000E+04   -0.50000000E+01
+    0.60570000E+04    0.76670000E+04   -0.50000000E+01
+    0.63710000E+04    0.73040000E+04   -0.50000000E+01
+    0.62535000E+04    0.73220000E+04   -0.50000000E+01
+    0.60220000E+04    0.73987500E+04   -0.50000000E+01
+    0.62996631E+04    0.74133647E+04   -0.50000000E+01
+    0.63770000E+04    0.72970000E+04   -0.50000000E+01
+    0.63770000E+04    0.73053750E+04   -0.50000000E+01
+    0.66090000E+04    0.74340000E+04   -0.50000000E+01
+    0.62400000E+04    0.75550000E+04   -0.50000000E+01
+    0.62445000E+04    0.73150000E+04   -0.50000000E+01
+    0.62515000E+04    0.73150000E+04   -0.50000000E+01
+    0.66090000E+04    0.74577500E+04   -0.50000000E+01
+    0.66090000E+04    0.74472500E+04   -0.50000000E+01
+    0.60220000E+04    0.74061250E+04   -0.50000000E+01
+    0.63770000E+04    0.73021875E+04   -0.50000000E+01
+    0.63770000E+04    0.73085625E+04   -0.50000000E+01
+    0.62497500E+04    0.73150000E+04   -0.50000000E+01
+    0.62420000E+04    0.75550000E+04   -0.50000000E+01
+    0.62427500E+04    0.73150000E+04   -0.50000000E+01
+    0.62532500E+04    0.73150000E+04   -0.50000000E+01
+    0.63770000E+04    0.73069688E+04   -0.50000000E+01
+    0.63770000E+04    0.73005938E+04   -0.50000000E+01
+    0.63770000E+04    0.73101563E+04   -0.50000000E+01
+    0.62460000E+04    0.73160000E+04   -0.50000000E+01
+    0.62440000E+04    0.73160000E+04   -0.50000000E+01
+    0.66130000E+04    0.74527500E+04   -0.50000000E+01
+    0.62515000E+04    0.73160000E+04   -0.50000000E+01
+    0.62420000E+04    0.73290000E+04   -0.50000000E+01
+    0.62480000E+04    0.73160000E+04   -0.50000000E+01
+    0.62380000E+04    0.75560000E+04   -0.50000000E+01
+    0.63760000E+04    0.73080000E+04   -0.50000000E+01
+    0.60280000E+04    0.73960000E+04   -0.50000000E+01
+    0.63760000E+04    0.73040000E+04   -0.50000000E+01
+    0.66230000E+04    0.73070000E+04   -0.50000000E+01
+    0.62395000E+04    0.75560000E+04   -0.50000000E+01
+    0.62410000E+04    0.73350000E+04   -0.50000000E+01
+    0.62380000E+04    0.75550000E+04   -0.50000000E+01
+    0.63770000E+04    0.73037813E+04   -0.50000000E+01
+    0.62462500E+04    0.73150000E+04   -0.50000000E+01
+    0.66225625E+04    0.73110000E+04   -0.50000000E+01
+    0.56440000E+04    0.72820000E+04   -0.50000000E+01
+    0.61630000E+04    0.70575000E+04   -0.50000000E+01
+    0.58163696E+04    0.74715000E+04   -0.50000000E+01
+    0.60565132E+04    0.73947500E+04   -0.50000000E+01
+    0.62541250E+04    0.73012363E+04   -0.50000000E+01
+    0.61505000E+04    0.74835000E+04   -0.50000000E+01
+    0.60680000E+04    0.75710000E+04   -0.50000000E+01
+    0.60840000E+04    0.75720000E+04   -0.50000000E+01
+    0.60860000E+04    0.75820000E+04   -0.50000000E+01
+    0.56440000E+04    0.77310000E+04   -0.50000000E+01
+    0.61040000E+04    0.76750000E+04   -0.50000000E+01
+    0.61360000E+04    0.76760000E+04   -0.50000000E+01
+    0.62001470E+04    0.75555000E+04   -0.50000000E+01
+    0.62980000E+04    0.75290000E+04   -0.50000000E+01
+    0.63040000E+04    0.76160000E+04   -0.50000000E+01
+    0.62500000E+04    0.75300000E+04   -0.50000000E+01
+    0.63050000E+04    0.76330000E+04   -0.50000000E+01
+    0.61880000E+04    0.76780000E+04   -0.50000000E+01
+    0.61640000E+04    0.76900000E+04   -0.50000000E+01
+    0.61630000E+04    0.79555000E+04   -0.50000000E+01
+    0.62850000E+04    0.78442148E+04   -0.50000000E+01
+    0.64090000E+04    0.72910000E+04   -0.50000000E+01
+    0.63464414E+04    0.72373823E+04   -0.50000000E+01
+    0.64050000E+04    0.74820000E+04   -0.50000000E+01
+    0.65090000E+04    0.70575000E+04   -0.50000000E+01
+    0.66797012E+04    0.71702871E+04   -0.50000000E+01
+    0.66560000E+04    0.72820000E+04   -0.50000000E+01
+    0.65860000E+04    0.73730000E+04   -0.50000000E+01
+    0.66410000E+04    0.73860000E+04   -0.50000000E+01
+    0.70280000E+04    0.72820000E+04   -0.50000000E+01
+    0.66450000E+04    0.74830000E+04   -0.50000000E+01
+    0.65724375E+04    0.74446250E+04   -0.50000000E+01
+    0.63750000E+04    0.75680000E+04   -0.50000000E+01
+    0.64887012E+04    0.75540000E+04   -0.50000000E+01
+    0.68559604E+04    0.75570000E+04   -0.50000000E+01
+    0.64780000E+04    0.76735000E+04   -0.50000000E+01
+    0.65090000E+04    0.79555000E+04   -0.50000000E+01
+    0.63740000E+04    0.75840000E+04   -0.50000000E+01
+    0.59737573E+04    0.74171875E+04   -0.50000000E+01
+    0.66080000E+04    0.73370000E+04   -0.50000000E+01
+    0.62360000E+04    0.75390000E+04   -0.50000000E+01
+    0.62330000E+04    0.72990000E+04   -0.50000000E+01
+    0.63680000E+04    0.73290000E+04   -0.50000000E+01
+    0.63695000E+04    0.73360000E+04   -0.50000000E+01
+    0.58168120E+04    0.72975000E+04   -0.50000000E+01
+    0.60660000E+04    0.71597446E+04   -0.50000000E+01
+    0.58134785E+04    0.76535000E+04   -0.50000000E+01
+    0.61120000E+04    0.76750000E+04   -0.50000000E+01
+    0.61280000E+04    0.76760000E+04   -0.50000000E+01
+    0.62180771E+04    0.75555000E+04   -0.50000000E+01
+    0.62900000E+04    0.75290000E+04   -0.50000000E+01
+    0.62660000E+04    0.75300000E+04   -0.50000000E+01
+    0.61800000E+04    0.76780000E+04   -0.50000000E+01
+    0.61560000E+04    0.76900000E+04   -0.50000000E+01
+    0.64063311E+04    0.73372813E+04   -0.50000000E+01
+    0.64005684E+04    0.73130469E+04   -0.50000000E+01
+    0.63930000E+04    0.72910000E+04   -0.50000000E+01
+    0.66470000E+04    0.72213755E+04   -0.50000000E+01
+    0.65935000E+04    0.73735000E+04   -0.50000000E+01
+    0.66174722E+04    0.73858750E+04   -0.50000000E+01
+    0.68625112E+04    0.73690000E+04   -0.50000000E+01
+    0.66455430E+04    0.74503750E+04   -0.50000000E+01
+    0.64628120E+04    0.75540000E+04   -0.50000000E+01
+    0.66000000E+04    0.73370000E+04   -0.50000000E+01
+    0.61495000E+04    0.72003247E+04   -0.50000000E+01
+    0.62270454E+04    0.75555000E+04   -0.50000000E+01
+    0.62740000E+04    0.75300000E+04   -0.50000000E+01
+    0.63917520E+04    0.73348906E+04   -0.50000000E+01
+    0.63888638E+04    0.73109531E+04   -0.50000000E+01
+    0.63873984E+04    0.72997969E+04   -0.50000000E+01
+    0.66470000E+04    0.72517207E+04   -0.50000000E+01
+    0.66058486E+04    0.73834375E+04   -0.50000000E+01
+    0.67695029E+04    0.73790454E+04   -0.50000000E+01
+    0.63854370E+04    0.73292578E+04   -0.50000000E+01
+    0.60800000E+04    0.73240000E+04   -0.50000000E+01
+    0.62820000E+04    0.72840000E+04   -0.50000000E+01
+    0.62002295E+04    0.73232529E+04   -0.50000000E+01
+    0.61420000E+04    0.76910000E+04   -0.50000000E+01
+    0.61660000E+04    0.76770000E+04   -0.50000000E+01
+    0.64720000E+04    0.73125000E+04   -0.50000000E+01
+    0.64750000E+04    0.73895000E+04   -0.50000000E+01
+    0.66695000E+04    0.72830000E+04   -0.50000000E+01
+    0.63900000E+04    0.75930000E+04   -0.50000000E+01
+    0.66010000E+04    0.75240000E+04   -0.50000000E+01
+    0.64760000E+04    0.77030000E+04   -0.50000000E+01
+    0.62425000E+04    0.75680000E+04   -0.50000000E+01
+    0.62360000E+04    0.75640000E+04   -0.50000000E+01
+    0.62620000E+04    0.73059014E+04   -0.50000000E+01
+    0.62488750E+04    0.73071445E+04   -0.50000000E+01
+    0.60710000E+04    0.75280000E+04   -0.50000000E+01
+    0.63040000E+04    0.76210000E+04   -0.50000000E+01
+    0.61705000E+04    0.78416313E+04   -0.50000000E+01
+    0.63602612E+04    0.72650229E+04   -0.50000000E+01
+    0.65301104E+04    0.71693198E+04   -0.50000000E+01
+    0.65810000E+04    0.74840000E+04   -0.50000000E+01
+    0.65110000E+04    0.78429380E+04   -0.50000000E+01
+    0.59045020E+04    0.74715000E+04   -0.50000000E+01
+    0.62510000E+04    0.75425000E+04   -0.50000000E+01
+    0.60660000E+04    0.72235137E+04   -0.50000000E+01
+    0.62315366E+04    0.75555000E+04   -0.50000000E+01
+    0.64933940E+04    0.73800000E+04   -0.50000000E+01
+    0.66711958E+04    0.72580479E+04   -0.50000000E+01
+    0.66167104E+04    0.75063423E+04   -0.50000000E+01
+    0.68033037E+04    0.72506729E+04   -0.50000000E+01
+    0.59493335E+04    0.73420000E+04   -0.50000000E+01
+    0.62415000E+04    0.73800000E+04   -0.50000000E+01
+    0.61020000E+04    0.75840000E+04   -0.50000000E+01
+    0.62490000E+04    0.76670000E+04   -0.50000000E+01
+    0.64085000E+04    0.75540000E+04   -0.50000000E+01
+    0.63005000E+04    0.74070947E+04   -0.50000000E+01
+    0.60708105E+04    0.73947500E+04   -0.50000000E+01
+    0.60720000E+04    0.75710000E+04   -0.50000000E+01
+    0.60700000E+04    0.75495347E+04   -0.50000000E+01
+    0.60800000E+04    0.75720000E+04   -0.50000000E+01
+    0.62753306E+04    0.76370000E+04   -0.50000000E+01
+    0.63050000E+04    0.76290000E+04   -0.50000000E+01
+    0.62850000E+04    0.77829067E+04   -0.50000000E+01
+    0.66600000E+04    0.72820000E+04   -0.50000000E+01
+    0.63750000E+04    0.75720000E+04   -0.50000000E+01
+    0.67661421E+04    0.75570000E+04   -0.50000000E+01
+    0.63740000E+04    0.75800000E+04   -0.50000000E+01
+    0.66207500E+04    0.73370000E+04   -0.50000000E+01
+    0.62360000E+04    0.75470000E+04   -0.50000000E+01
+    0.62330000E+04    0.73070000E+04   -0.50000000E+01
+    0.63720000E+04    0.73290000E+04   -0.50000000E+01
+    0.61160000E+04    0.76750000E+04   -0.50000000E+01
+    0.61240000E+04    0.76760000E+04   -0.50000000E+01
+    0.62860000E+04    0.75290000E+04   -0.50000000E+01
+    0.62840000E+04    0.75078569E+04   -0.50000000E+01
+    0.61760000E+04    0.76780000E+04   -0.50000000E+01
+    0.61520000E+04    0.76900000E+04   -0.50000000E+01
+    0.63850000E+04    0.72910000E+04   -0.50000000E+01
+    0.65935000E+04    0.73772666E+04   -0.50000000E+01
+    0.66323047E+04    0.74646250E+04   -0.50000000E+01
+    0.65960000E+04    0.73370000E+04   -0.50000000E+01
+    0.61495000E+04    0.72468257E+04   -0.50000000E+01
+    0.62780000E+04    0.75300000E+04   -0.50000000E+01
+    0.63829053E+04    0.73109531E+04   -0.50000000E+01
+    0.63832681E+04    0.73045781E+04   -0.50000000E+01
+    0.66470000E+04    0.72669263E+04   -0.50000000E+01
+    0.65998965E+04    0.73834375E+04   -0.50000000E+01
+    0.67228389E+04    0.73832876E+04   -0.50000000E+01
+    0.63830610E+04    0.73348906E+04   -0.50000000E+01
+    0.60800000E+04    0.73320000E+04   -0.50000000E+01
+    0.64760000E+04    0.76950000E+04   -0.50000000E+01
+    0.62881250E+04    0.76230000E+04   -0.50000000E+01
+    0.65893052E+04    0.74551250E+04   -0.50000000E+01
+    0.63175000E+04    0.74170000E+04   -0.50000000E+01
+    0.63160000E+04    0.73960000E+04   -0.50000000E+01
+    0.63585000E+04    0.75700000E+04   -0.50000000E+01
+    0.62450000E+04    0.75473501E+04   -0.50000000E+01
+    0.62418750E+04    0.73080020E+04   -0.50000000E+01
+    0.61140000E+04    0.76915000E+04   -0.50000000E+01
+    0.60970000E+04    0.76590000E+04   -0.50000000E+01
+    0.61950000E+04    0.76620000E+04   -0.50000000E+01
+    0.61540000E+04    0.77060161E+04   -0.50000000E+01
+    0.61260000E+04    0.76595000E+04   -0.50000000E+01
+    0.61780000E+04    0.76615000E+04   -0.50000000E+01
+    0.62420000E+04    0.72880000E+04   -0.50000000E+01
+    0.62375000E+04    0.72360000E+04   -0.50000000E+01
+    0.62300000E+04    0.73190000E+04   -0.50000000E+01
+    0.62980000E+04    0.73300000E+04   -0.50000000E+01
+    0.63020000E+04    0.73629092E+04   -0.50000000E+01
+    0.63060000E+04    0.74390000E+04   -0.50000000E+01
+    0.60066313E+04    0.76160000E+04   -0.50000000E+01
+    0.65180000E+04    0.73950000E+04   -0.50000000E+01
+    0.65890000E+04    0.73820000E+04   -0.50000000E+01
+    0.64370000E+04    0.75880000E+04   -0.50000000E+01
+    0.65460000E+04    0.75056875E+04   -0.50000000E+01
+    0.65830000E+04    0.75880000E+04   -0.50000000E+01
+    0.64920000E+04    0.76600000E+04   -0.50000000E+01
+    0.64850000E+04    0.76090000E+04   -0.50000000E+01
+    0.66650000E+04    0.78402500E+04   -0.50000000E+01
+    0.65862446E+04    0.77435112E+04   -0.50000000E+01
+    0.61374229E+04    0.74802310E+04   -0.50000000E+01
+    0.64205000E+04    0.72142778E+04   -0.50000000E+01
+    0.64780000E+04    0.76790000E+04   -0.50000000E+01
+    0.64370000E+04    0.76640000E+04   -0.50000000E+01
+    0.64557622E+04    0.76762500E+04   -0.50000000E+01
+    0.59957646E+04    0.74024375E+04   -0.50000000E+01
+    0.59047412E+04    0.76535000E+04   -0.50000000E+01
+    0.64498286E+04    0.75540000E+04   -0.50000000E+01
+    0.63812935E+04    0.73305547E+04   -0.50000000E+01
+    0.64873428E+04    0.73165000E+04   -0.50000000E+01
+    0.62490000E+04    0.75640000E+04   -0.50000000E+01
+    0.62402500E+04    0.75610938E+04   -0.50000000E+01
+    0.62560000E+04    0.73085273E+04   -0.50000000E+01
+    0.65755000E+04    0.72169185E+04   -0.50000000E+01
+    0.62486235E+04    0.74140000E+04   -0.50000000E+01
+    0.60813945E+04    0.75579209E+04   -0.50000000E+01
+    0.66620000E+04    0.72683423E+04   -0.50000000E+01
+    0.66205313E+04    0.73239214E+04   -0.50000000E+01
+    0.62880000E+04    0.75426152E+04   -0.50000000E+01
+    0.63890000E+04    0.72624224E+04   -0.50000000E+01
+    0.65860000E+04    0.73200000E+04   -0.50000000E+01
+    0.65980000E+04    0.73505000E+04   -0.50000000E+01
+    0.65980000E+04    0.73243823E+04   -0.50000000E+01
+    0.60250000E+04    0.73657778E+04   -0.50000000E+01
+    0.61000000E+04    0.73880000E+04   -0.50000000E+01
+    0.65890000E+04    0.73360000E+04   -0.50000000E+01
+    0.65875000E+04    0.73455000E+04   -0.50000000E+01
+    0.65280000E+04    0.74750000E+04   -0.50000000E+01
+    0.63805000E+04    0.75050000E+04   -0.50000000E+01
+    0.65150000E+04    0.77310000E+04   -0.50000000E+01
+    0.65190000E+04    0.77871836E+04   -0.50000000E+01
+    0.65190000E+04    0.77589492E+04   -0.50000000E+01
+    0.62580000E+04    0.77220000E+04   -0.50000000E+01
+    0.60310000E+04    0.74335000E+04   -0.50000000E+01
+    0.60625845E+04    0.74287500E+04   -0.50000000E+01
+    0.63880000E+04    0.78322856E+04   -0.50000000E+01
+    0.62740000E+04    0.72840000E+04   -0.50000000E+01
+    0.62780000E+04    0.72430806E+04   -0.50000000E+01
+    0.62161152E+04    0.73320000E+04   -0.50000000E+01
+    0.61440000E+04    0.76910000E+04   -0.50000000E+01
+    0.61430000E+04    0.76827002E+04   -0.50000000E+01
+    0.61430000E+04    0.76981665E+04   -0.50000000E+01
+    0.61680000E+04    0.76770000E+04   -0.50000000E+01
+    0.61670000E+04    0.76838076E+04   -0.50000000E+01
+    0.61670000E+04    0.76700713E+04   -0.50000000E+01
+    0.66138335E+04    0.74948335E+04   -0.50000000E+01
+    0.62106006E+04    0.73030000E+04   -0.50000000E+01
+    0.66277656E+04    0.74503750E+04   -0.50000000E+01
+    0.62760000E+04    0.75175737E+04   -0.50000000E+01
+    0.63819067E+04    0.72997969E+04   -0.50000000E+01
+    0.65930000E+04    0.74840000E+04   -0.50000000E+01
+    0.63617339E+04    0.75820000E+04   -0.50000000E+01
+    0.62510000E+04    0.75488872E+04   -0.50000000E+01
+    0.61140000E+04    0.76627339E+04   -0.50000000E+01
+    0.62375000E+04    0.72621948E+04   -0.50000000E+01
+    0.64941606E+04    0.76762500E+04   -0.50000000E+01
+    0.59998120E+04    0.74245625E+04   -0.50000000E+01
+    0.62760000E+04    0.75418564E+04   -0.50000000E+01
+    0.60925000E+04    0.72680000E+04   -0.50000000E+01
+    0.60820000E+04    0.73440000E+04   -0.50000000E+01
+    0.60710000E+04    0.73510000E+04   -0.50000000E+01
+    0.61081787E+04    0.74770000E+04   -0.50000000E+01
+    0.60730000E+04    0.76005000E+04   -0.50000000E+01
+    0.60510000E+04    0.75930000E+04   -0.50000000E+01
+    0.62900000E+04    0.75960000E+04   -0.50000000E+01
+    0.62930000E+04    0.75920000E+04   -0.50000000E+01
+    0.62875000E+04    0.75920000E+04   -0.50000000E+01
+    0.63000000E+04    0.75920000E+04   -0.50000000E+01
+    0.62970000E+04    0.75960000E+04   -0.50000000E+01
+    0.62935000E+04    0.75960000E+04   -0.50000000E+01
+    0.63240000E+04    0.76040000E+04   -0.50000000E+01
+    0.63435391E+04    0.72990000E+04   -0.50000000E+01
+    0.65230000E+04    0.73700000E+04   -0.50000000E+01
+    0.66510000E+04    0.73050000E+04   -0.50000000E+01
+    0.65370000E+04    0.74380000E+04   -0.50000000E+01
+    0.63450000E+04    0.75250000E+04   -0.50000000E+01
+    0.63315000E+04    0.76370000E+04   -0.50000000E+01
+    0.64855000E+04    0.77312690E+04   -0.50000000E+01
+    0.65627100E+04    0.76840576E+04   -0.50000000E+01
+    0.65230000E+04    0.76780000E+04   -0.50000000E+01
+    0.65887002E+04    0.74300000E+04   -0.50000000E+01
+    0.65140000E+04    0.73190000E+04   -0.50000000E+01
+    0.65130000E+04    0.73140000E+04   -0.50000000E+01
+    0.63970000E+04    0.74820000E+04   -0.50000000E+01
+    0.66290000E+04    0.74160000E+04   -0.50000000E+01
+    0.66410000E+04    0.74000000E+04   -0.50000000E+01
+    0.66660000E+04    0.72830000E+04   -0.50000000E+01
+    0.66750000E+04    0.72990000E+04   -0.50000000E+01
+    0.67503252E+04    0.73045000E+04   -0.50000000E+01
+    0.66650000E+04    0.72940938E+04   -0.50000000E+01
+    0.67124619E+04    0.73045000E+04   -0.50000000E+01
+    0.63900000E+04    0.75850000E+04   -0.50000000E+01
+    0.64128335E+04    0.75810000E+04   -0.50000000E+01
+    0.64572568E+04    0.77065000E+04   -0.50000000E+01
+    0.62255898E+04    0.75660000E+04   -0.50000000E+01
+    0.61705000E+04    0.77843306E+04   -0.50000000E+01
+    0.65037939E+04    0.73800000E+04   -0.50000000E+01
+    0.60700000E+04    0.75603608E+04   -0.50000000E+01
+    0.62805000E+04    0.76547988E+04   -0.50000000E+01
+    0.63732500E+04    0.73315000E+04   -0.50000000E+01
+    0.61260000E+04    0.76867002E+04   -0.50000000E+01
+    0.62880000E+04    0.75181450E+04   -0.50000000E+01
+    0.62947847E+04    0.76310000E+04   -0.50000000E+01
+    0.61495000E+04    0.74579448E+04   -0.50000000E+01
+    0.62598501E+04    0.75660000E+04   -0.50000000E+01
+    0.65860000E+04    0.73280000E+04   -0.50000000E+01
+    0.61000000E+04    0.73470000E+04   -0.50000000E+01
+    0.63147998E+04    0.75940000E+04   -0.50000000E+01
+    0.64105000E+04    0.75250000E+04   -0.50000000E+01
+    0.66677500E+04    0.72770000E+04   -0.50000000E+01
+    0.66650000E+04    0.72885020E+04   -0.50000000E+01
+    0.64010000E+04    0.75022881E+04   -0.50000000E+01
+    0.61288335E+04    0.73600000E+04   -0.50000000E+01
+    0.61495000E+04    0.73303301E+04   -0.50000000E+01
+    0.62502500E+04    0.73220000E+04   -0.50000000E+01
+    0.61860000E+04    0.74050000E+04   -0.50000000E+01
+    0.63220000E+04    0.76350000E+04   -0.50000000E+01
+    0.65760000E+04    0.73113750E+04   -0.50000000E+01
+    0.60180000E+04    0.78438179E+04   -0.50000000E+01
+    0.65330000E+04    0.73210000E+04   -0.50000000E+01
+    0.66290000E+04    0.72820000E+04   -0.50000000E+01
+    0.63710000E+04    0.72990000E+04   -0.50000000E+01
+    0.63572695E+04    0.73015000E+04   -0.50000000E+01
+    0.63710000E+04    0.73090000E+04   -0.50000000E+01
+    0.60471938E+04    0.74120000E+04   -0.50000000E+01
+    0.70280000E+04    0.77310000E+04   -0.50000000E+01
+    0.62392500E+04    0.75838252E+04   -0.50000000E+01
+    0.63143096E+04    0.76205479E+04   -0.50000000E+01
+    0.63807593E+04    0.73077656E+04   -0.50000000E+01
+    0.65965288E+04    0.74446250E+04   -0.50000000E+01
+    0.63099106E+04    0.74038677E+04   -0.50000000E+01
+    0.62410000E+04    0.75501948E+04   -0.50000000E+01
+    0.62453750E+04    0.73106807E+04   -0.50000000E+01
+    0.61740000E+04    0.76390000E+04   -0.50000000E+01
+    0.64852500E+04    0.72194126E+04   -0.50000000E+01
+    0.62523750E+04    0.73108076E+04   -0.50000000E+01
+    0.62780000E+04    0.72637358E+04   -0.50000000E+01
+    0.62750972E+04    0.71403198E+04   -0.50000000E+01
+    0.61827104E+04    0.72985000E+04   -0.50000000E+01
+    0.65965288E+04    0.74656250E+04   -0.50000000E+01
+    0.62980000E+04    0.75730000E+04   -0.50000000E+01
+    0.60915835E+04    0.73420000E+04   -0.50000000E+01
+    0.68228198E+04    0.76967500E+04   -0.50000000E+01
+    0.63020000E+04    0.75821841E+04   -0.50000000E+01
+    0.63130000E+04    0.73270000E+04   -0.50000000E+01
+    0.63165000E+04    0.73445000E+04   -0.50000000E+01
+    0.62802998E+04    0.73832998E+04   -0.50000000E+01
+    0.64951201E+04    0.74107622E+04   -0.50000000E+01
+    0.65530000E+04    0.73840000E+04   -0.50000000E+01
+    0.63587646E+04    0.75480000E+04   -0.50000000E+01
+    0.63830000E+04    0.76480000E+04   -0.50000000E+01
+    0.65033398E+04    0.77028501E+04   -0.50000000E+01
+    0.65910000E+04    0.76775557E+04   -0.50000000E+01
+    0.63070000E+04    0.75650000E+04   -0.50000000E+01
+    0.62153008E+04    0.75345000E+04   -0.50000000E+01
+    0.62620000E+04    0.73105059E+04   -0.50000000E+01
+    0.63672124E+04    0.72789253E+04   -0.50000000E+01
+    0.59487666E+04    0.74715000E+04   -0.50000000E+01
+    0.62337964E+04    0.75555000E+04   -0.50000000E+01
+    0.62330000E+04    0.73110000E+04   -0.50000000E+01
+    0.62210859E+04    0.73090000E+04   -0.50000000E+01
+    0.63810000E+04    0.72910000E+04   -0.50000000E+01
+    0.63830000E+04    0.72761514E+04   -0.50000000E+01
+    0.63798813E+04    0.73279609E+04   -0.50000000E+01
+    0.62490000E+04    0.75600000E+04   -0.50000000E+01
+    0.60660000E+04    0.72599673E+04   -0.50000000E+01
+    0.62960000E+04    0.76070000E+04   -0.50000000E+01
+    0.63400000E+04    0.76170000E+04   -0.50000000E+01
+    0.63240000E+04    0.76261113E+04   -0.50000000E+01
+    0.62380000E+04    0.73104995E+04   -0.50000000E+01
+    0.59825044E+04    0.75052080E+04   -0.50000000E+01
+    0.59177300E+04    0.75479946E+04   -0.50000000E+01
+    0.60865000E+04    0.74064165E+04   -0.50000000E+01
+    0.62743999E+04    0.73320000E+04   -0.50000000E+01
+    0.61310000E+04    0.77080000E+04   -0.50000000E+01
+    0.61440000E+04    0.77210000E+04   -0.50000000E+01
+    0.61375000E+04    0.77576431E+04   -0.50000000E+01
+    0.62117939E+04    0.77467939E+04   -0.50000000E+01
+    0.65170000E+04    0.74305000E+04   -0.50000000E+01
+    0.65140000E+04    0.76560000E+04   -0.50000000E+01
+    0.65100000E+04    0.76260215E+04   -0.50000000E+01
+    0.62567500E+04    0.73220000E+04   -0.50000000E+01
+    0.59760083E+04    0.73420000E+04   -0.50000000E+01
+    0.59466748E+04    0.72975000E+04   -0.50000000E+01
+    0.58170000E+04    0.70575000E+04   -0.50000000E+01
+    0.59392549E+04    0.71722500E+04   -0.50000000E+01
+    0.62458086E+04    0.73713823E+04   -0.50000000E+01
+    0.62221665E+04    0.76673335E+04   -0.50000000E+01
+    0.62983140E+04    0.74073110E+04   -0.50000000E+01
+    0.60775815E+04    0.73982500E+04   -0.50000000E+01
+    0.60663560E+04    0.74116675E+04   -0.50000000E+01
+    0.62850000E+04    0.77520513E+04   -0.50000000E+01
+    0.67236069E+04    0.75350000E+04   -0.50000000E+01
+    0.66230908E+04    0.74598750E+04   -0.50000000E+01
+    0.61495000E+04    0.72702402E+04   -0.50000000E+01
+    0.63802861E+04    0.73029844E+04   -0.50000000E+01
+    0.66014917E+04    0.73753833E+04   -0.50000000E+01
+    0.66993428E+04    0.73854233E+04   -0.50000000E+01
+    0.65875000E+04    0.73883862E+04   -0.50000000E+01
+    0.65333350E+04    0.72370327E+04   -0.50000000E+01
+    0.64628311E+04    0.77285854E+04   -0.50000000E+01
+    0.64546748E+04    0.77926226E+04   -0.50000000E+01
+    0.66200000E+04    0.72941802E+04   -0.50000000E+01
+    0.63607207E+04    0.73115000E+04   -0.50000000E+01
+    0.62360000E+04    0.75600000E+04   -0.50000000E+01
+    0.62360000E+04    0.75510000E+04   -0.50000000E+01
+    0.62522500E+04    0.73190835E+04   -0.50000000E+01
+    0.60180000E+04    0.74880000E+04   -0.50000000E+01
+    0.62460000E+04    0.76490000E+04   -0.50000000E+01
+    0.62595000E+04    0.76460000E+04   -0.50000000E+01
+    0.66490000E+04    0.72950000E+04   -0.50000000E+01
+    0.65460000E+04    0.74622002E+04   -0.50000000E+01
+    0.63810000E+04    0.74850000E+04   -0.50000000E+01
+    0.63790000E+04    0.74949561E+04   -0.50000000E+01
+    0.61320000E+04    0.76400000E+04   -0.50000000E+01
+    0.61485000E+04    0.76295000E+04   -0.50000000E+01
+    0.63770000E+04    0.75560000E+04   -0.50000000E+01
+    0.63680000E+04    0.75540000E+04   -0.50000000E+01
+    0.66542500E+04    0.73370000E+04   -0.50000000E+01
+    0.60900000E+04    0.75820000E+04   -0.50000000E+01
+    0.63750000E+04    0.75640000E+04   -0.50000000E+01
+    0.63663862E+04    0.75660000E+04   -0.50000000E+01
+    0.60695000E+04    0.73232271E+04   -0.50000000E+01
+    0.63040000E+04    0.76230000E+04   -0.50000000E+01
+    0.62960625E+04    0.76220000E+04   -0.50000000E+01
+    0.63085000E+04    0.76220000E+04   -0.50000000E+01
+    0.62998423E+04    0.76240000E+04   -0.50000000E+01
+    0.60980000E+04    0.75840000E+04   -0.50000000E+01
+    0.62490000E+04    0.76630000E+04   -0.50000000E+01
+    0.62355566E+04    0.76650000E+04   -0.50000000E+01
+    0.62630000E+04    0.76650000E+04   -0.50000000E+01
+    0.60740000E+04    0.75710000E+04   -0.50000000E+01
+    0.60750000E+04    0.75645522E+04   -0.50000000E+01
+    0.60730000E+04    0.75755000E+04   -0.50000000E+01
+    0.60780000E+04    0.75720000E+04   -0.50000000E+01
+    0.60810000E+04    0.75820000E+04   -0.50000000E+01
+    0.60790000E+04    0.75771499E+04   -0.50000000E+01
+    0.60790000E+04    0.75675000E+04   -0.50000000E+01
+    0.60835000E+04    0.75925000E+04   -0.50000000E+01
+    0.63050000E+04    0.76270000E+04   -0.50000000E+01
+    0.63117500E+04    0.76280000E+04   -0.50000000E+01
+    0.66620000E+04    0.72820000E+04   -0.50000000E+01
+    0.66610000E+04    0.72751714E+04   -0.50000000E+01
+    0.66610000E+04    0.72864043E+04   -0.50000000E+01
+    0.63750000E+04    0.75740000E+04   -0.50000000E+01
+    0.63816250E+04    0.75730000E+04   -0.50000000E+01
+    0.63705000E+04    0.75730000E+04   -0.50000000E+01
+    0.63740000E+04    0.75780000E+04   -0.50000000E+01
+    0.63675410E+04    0.75790000E+04   -0.50000000E+01
+    0.63785000E+04    0.75790000E+04   -0.50000000E+01
+    0.61180000E+04    0.76750000E+04   -0.50000000E+01
+    0.61170000E+04    0.76685410E+04   -0.50000000E+01
+    0.61170000E+04    0.76795000E+04   -0.50000000E+01
+    0.61220000E+04    0.76760000E+04   -0.50000000E+01
+    0.61230000E+04    0.76817236E+04   -0.50000000E+01
+    0.61230000E+04    0.76715000E+04   -0.50000000E+01
+    0.62840000E+04    0.75290000E+04   -0.50000000E+01
+    0.62830000E+04    0.75224668E+04   -0.50000000E+01
+    0.62850000E+04    0.75335000E+04   -0.50000000E+01
+    0.61740000E+04    0.76780000E+04   -0.50000000E+01
+    0.61830000E+04    0.76900000E+04   -0.50000000E+01
+    0.61730000E+04    0.76839170E+04   -0.50000000E+01
+    0.61750000E+04    0.76735000E+04   -0.50000000E+01
+    0.61500000E+04    0.76900000E+04   -0.50000000E+01
+    0.61510000E+04    0.76827144E+04   -0.50000000E+01
+    0.61510000E+04    0.76945000E+04   -0.50000000E+01
+    0.65940000E+04    0.73370000E+04   -0.50000000E+01
+    0.65950000E+04    0.73440464E+04   -0.50000000E+01
+    0.65950000E+04    0.73325000E+04   -0.50000000E+01
+    0.62800000E+04    0.75300000E+04   -0.50000000E+01
+    0.62790000E+04    0.75362656E+04   -0.50000000E+01
+    0.62790000E+04    0.75255000E+04   -0.50000000E+01
+    0.67140854E+04    0.73444692E+04   -0.50000000E+01
+    0.60800000E+04    0.73360000E+04   -0.50000000E+01
+    0.60675801E+04    0.73380000E+04   -0.50000000E+01
+    0.60883818E+04    0.73340000E+04   -0.50000000E+01
+    0.64760000E+04    0.76910000E+04   -0.50000000E+01
+    0.64618735E+04    0.76930000E+04   -0.50000000E+01
+    0.64850000E+04    0.76930000E+04   -0.50000000E+01
+    0.62470000E+04    0.75509790E+04   -0.50000000E+01
+    0.62418750E+04    0.73115557E+04   -0.50000000E+01
+    0.62500000E+04    0.72880000E+04   -0.50000000E+01
+    0.59536104E+04    0.76051221E+04   -0.50000000E+01
+    0.65910000E+04    0.73820000E+04   -0.50000000E+01
+    0.64780000E+04    0.76830000E+04   -0.50000000E+01
+    0.64690000E+04    0.76810000E+04   -0.50000000E+01
+    0.64866548E+04    0.76810000E+04   -0.50000000E+01
+    0.65070000E+04    0.77310000E+04   -0.50000000E+01
+    0.65030000E+04    0.77492681E+04   -0.50000000E+01
+    0.62580000E+04    0.77052578E+04   -0.50000000E+01
+    0.62660000E+04    0.72840000E+04   -0.50000000E+01
+    0.61460000E+04    0.76910000E+04   -0.50000000E+01
+    0.61450000E+04    0.76866694E+04   -0.50000000E+01
+    0.61700000E+04    0.76770000E+04   -0.50000000E+01
+    0.66628960E+04    0.73080000E+04   -0.50000000E+01
+    0.62488750E+04    0.73115342E+04   -0.50000000E+01
+    0.62902500E+04    0.75811187E+04   -0.50000000E+01
+    0.63790000E+04    0.72831714E+04   -0.50000000E+01
+    0.62606826E+04    0.73842051E+04   -0.50000000E+01
+    0.62552500E+04    0.73189097E+04   -0.50000000E+01
+    0.63009668E+04    0.76280000E+04   -0.50000000E+01
+    0.62620000E+04    0.72679463E+04   -0.50000000E+01
+    0.61470000E+04    0.76948931E+04   -0.50000000E+01
+    0.61710000E+04    0.76731069E+04   -0.50000000E+01
+    0.62481250E+04    0.73430000E+04   -0.50000000E+01
+    0.61130000E+04    0.75520000E+04   -0.50000000E+01
+    0.61060000E+04    0.75760000E+04   -0.50000000E+01
+    0.65660000E+04    0.72965000E+04   -0.50000000E+01
+    0.65485000E+04    0.73126665E+04   -0.50000000E+01
+    0.66175000E+04    0.77106274E+04   -0.50000000E+01
+    0.66000000E+04    0.72820000E+04   -0.50000000E+01
+    0.65850000E+04    0.72910000E+04   -0.50000000E+01
+    0.66075000E+04    0.72420249E+04   -0.50000000E+01
+    0.62940000E+04    0.74090000E+04   -0.50000000E+01
+    0.64163789E+04    0.75540000E+04   -0.50000000E+01
+    0.66470000E+04    0.72745957E+04   -0.50000000E+01
+    0.65971162E+04    0.73818125E+04   -0.50000000E+01
+    0.63799780E+04    0.73348906E+04   -0.50000000E+01
+    0.65993276E+04    0.74551250E+04   -0.50000000E+01
+    0.61005000E+04    0.76884014E+04   -0.50000000E+01
+    0.64135000E+04    0.76583184E+04   -0.50000000E+01
+    0.60081050E+04    0.74098125E+04   -0.50000000E+01
+    0.60620737E+04    0.76040000E+04   -0.50000000E+01
+    0.63370000E+04    0.76455000E+04   -0.50000000E+01
+    0.63050352E+04    0.75055996E+04   -0.50000000E+01
+    0.61663569E+04    0.76505000E+04   -0.50000000E+01
+    0.65585000E+04    0.74047856E+04   -0.50000000E+01
+    0.63808203E+04    0.72960000E+04   -0.50000000E+01
+    0.62440000E+04    0.75598291E+04   -0.50000000E+01
+    0.65100000E+04    0.76412773E+04   -0.50000000E+01
+    0.66566460E+04    0.72930000E+04   -0.50000000E+01
+    0.61490000E+04    0.76861514E+04   -0.50000000E+01
+    0.65930000E+04    0.73407358E+04   -0.50000000E+01
+    0.64685117E+04    0.76890000E+04   -0.50000000E+01
+    0.64164849E+04    0.75388828E+04   -0.50000000E+01
+    0.61245000E+04    0.72985000E+04   -0.50000000E+01
+    0.63900000E+04    0.76182500E+04   -0.50000000E+01
+    0.64159375E+04    0.76113750E+04   -0.50000000E+01
+    0.66590000E+04    0.75470000E+04   -0.50000000E+01
+    0.60865000E+04    0.73877002E+04   -0.50000000E+01
+    0.60898638E+04    0.73765962E+04   -0.50000000E+01
+    0.65060000E+04    0.73420000E+04   -0.50000000E+01
+    0.62372500E+04    0.73220000E+04   -0.50000000E+01
+    0.65935000E+04    0.73791670E+04   -0.50000000E+01
+    0.65860000E+04    0.73780000E+04   -0.50000000E+01
+    0.65747271E+04    0.73800000E+04   -0.50000000E+01
+    0.65898071E+04    0.73782168E+04   -0.50000000E+01
+    0.66290000E+04    0.74830000E+04   -0.50000000E+01
+    0.63798989E+04    0.73109531E+04   -0.50000000E+01
+    0.63816704E+04    0.73156406E+04   -0.50000000E+01
+    0.65288652E+04    0.75015952E+04   -0.50000000E+01
+    0.64970000E+04    0.75125015E+04   -0.50000000E+01
+    0.65460000E+04    0.74946362E+04   -0.50000000E+01
+    0.65667954E+04    0.75001621E+04   -0.50000000E+01
+    0.65670000E+04    0.75880000E+04   -0.50000000E+01
+    0.65750000E+04    0.75562188E+04   -0.50000000E+01
+    0.59468418E+04    0.76805000E+04   -0.50000000E+01
+    0.58170000E+04    0.79555000E+04   -0.50000000E+01
+    0.58591099E+04    0.77709756E+04   -0.50000000E+01
+    0.63792935E+04    0.73318516E+04   -0.50000000E+01
+    0.62387500E+04    0.75587124E+04   -0.50000000E+01
+    0.60478638E+04    0.74382500E+04   -0.50000000E+01
+    0.61430000E+04    0.76945137E+04   -0.50000000E+01
+    0.61836470E+04    0.74200000E+04   -0.50000000E+01
+    0.61856455E+04    0.74561357E+04   -0.50000000E+01
+    0.63342500E+04    0.76270786E+04   -0.50000000E+01
+    0.62480000E+04    0.77581396E+04   -0.50000000E+01
+    0.67850381E+04    0.74683477E+04   -0.50000000E+01
+    0.63085972E+04    0.76260000E+04   -0.50000000E+01
+    0.66630000E+04    0.72783657E+04   -0.50000000E+01
+    0.63785391E+04    0.75750000E+04   -0.50000000E+01
+    0.65900000E+04    0.73856040E+04   -0.50000000E+01
+    0.61690000E+04    0.76806240E+04   -0.50000000E+01
+    0.61571260E+04    0.75400000E+04   -0.50000000E+01
+    0.64850000E+04    0.76352563E+04   -0.50000000E+01
+    0.65969712E+04    0.73782168E+04   -0.50000000E+01
+    0.63880000E+04    0.74580000E+04   -0.50000000E+01
+    0.65460000E+04    0.72890000E+04   -0.50000000E+01
+    0.64090000E+04    0.73740000E+04   -0.50000000E+01
+    0.64180000E+04    0.73950000E+04   -0.50000000E+01
+    0.64105000E+04    0.74150000E+04   -0.50000000E+01
+    0.64040000E+04    0.74360000E+04   -0.50000000E+01
+    0.62437500E+04    0.73220000E+04   -0.50000000E+01
+    0.60900000E+04    0.75720000E+04   -0.50000000E+01
+    0.63097500E+04    0.74170000E+04   -0.50000000E+01
+    0.62340000E+04    0.73200000E+04   -0.50000000E+01
+    0.63024287E+04    0.74282856E+04   -0.50000000E+01
+    0.62848501E+04    0.74400977E+04   -0.50000000E+01
+    0.64980000E+04    0.76600000E+04   -0.50000000E+01
+    0.64950000E+04    0.76457891E+04   -0.50000000E+01
+    0.64563203E+04    0.75758696E+04   -0.50000000E+01
+    0.62580000E+04    0.73115317E+04   -0.50000000E+01
+    0.62661753E+04    0.74140000E+04   -0.50000000E+01
+    0.66245938E+04    0.73179399E+04   -0.50000000E+01
+    0.61090000E+04    0.73960000E+04   -0.50000000E+01
+    0.61530000E+04    0.73730000E+04   -0.50000000E+01
+    0.61327388E+04    0.73920000E+04   -0.50000000E+01
+    0.65190000E+04    0.77446885E+04   -0.50000000E+01
+    0.65527573E+04    0.77518188E+04   -0.50000000E+01
+    0.65870322E+04    0.78183301E+04   -0.50000000E+01
+    0.61670000E+04    0.76736079E+04   -0.50000000E+01
+    0.66268384E+04    0.74360000E+04   -0.50000000E+01
+    0.63610000E+04    0.75250000E+04   -0.50000000E+01
+    0.64935000E+04    0.77225000E+04   -0.50000000E+01
+    0.64010000E+04    0.74684375E+04   -0.50000000E+01
+    0.63020000E+04    0.73439482E+04   -0.50000000E+01
+    0.62917500E+04    0.76020000E+04   -0.50000000E+01
+    0.62143662E+04    0.76873945E+04   -0.50000000E+01
+    0.63621553E+04    0.75026060E+04   -0.50000000E+01
+    0.66469375E+04    0.73247109E+04   -0.50000000E+01
+    0.61020000E+04    0.75950000E+04   -0.50000000E+01
+    0.60940000E+04    0.76110000E+04   -0.50000000E+01
+    0.61142998E+04    0.76150000E+04   -0.50000000E+01
+    0.62558569E+04    0.76650000E+04   -0.50000000E+01
+    0.60730000E+04    0.75675435E+04   -0.50000000E+01
+    0.63705381E+04    0.75770000E+04   -0.50000000E+01
+    0.61190000E+04    0.76715381E+04   -0.50000000E+01
+    0.62850000E+04    0.75255039E+04   -0.50000000E+01
+    0.62810000E+04    0.75333721E+04   -0.50000000E+01
+    0.62460000E+04    0.72740073E+04   -0.50000000E+01
+    0.61130000E+04    0.75600000E+04   -0.50000000E+01
+    0.61377822E+04    0.75560000E+04   -0.50000000E+01
+    0.60975000E+04    0.75560000E+04   -0.50000000E+01
+    0.62317856E+04    0.73172144E+04   -0.50000000E+01
+    0.62262002E+04    0.73134146E+04   -0.50000000E+01
+    0.65038887E+04    0.77154136E+04   -0.50000000E+01
+    0.62160898E+04    0.73199575E+04   -0.50000000E+01
+    0.60504375E+04    0.73204297E+04   -0.50000000E+01
+    0.60391250E+04    0.73600000E+04   -0.50000000E+01
+    0.63060000E+04    0.72980000E+04   -0.50000000E+01
+    0.60170000E+04    0.75520000E+04   -0.50000000E+01
+    0.60290000E+04    0.75550000E+04   -0.50000000E+01
+    0.60290000E+04    0.75630000E+04   -0.50000000E+01
+    0.60510000E+04    0.76150000E+04   -0.50000000E+01
+    0.60619092E+04    0.76175000E+04   -0.50000000E+01
+    0.60430000E+04    0.76200000E+04   -0.50000000E+01
+    0.60535000E+04    0.76400000E+04   -0.50000000E+01
+    0.60780000E+04    0.76970000E+04   -0.50000000E+01
+    0.64320000E+04    0.73485000E+04   -0.50000000E+01
+    0.64305000E+04    0.75560000E+04   -0.50000000E+01
+    0.64305000E+04    0.75520000E+04   -0.50000000E+01
+    0.64330000E+04    0.75520000E+04   -0.50000000E+01
+    0.64370000E+04    0.75360000E+04   -0.50000000E+01
+    0.64370000E+04    0.75440000E+04   -0.50000000E+01
+    0.64370000E+04    0.75720000E+04   -0.50000000E+01
+    0.64317500E+04    0.75463750E+04   -0.50000000E+01
+    0.64600176E+04    0.75305000E+04   -0.50000000E+01
+    0.65340000E+04    0.75470000E+04   -0.50000000E+01
+    0.62400000E+04    0.73620000E+04   -0.50000000E+01
+    0.63655000E+04    0.73207002E+04   -0.50000000E+01
+    0.63720000E+04    0.73360000E+04   -0.50000000E+01
+    0.63707500E+04    0.73426519E+04   -0.50000000E+01
+    0.65180000E+04    0.73900000E+04   -0.50000000E+01
+    0.65056177E+04    0.73925000E+04   -0.50000000E+01
+    0.65276577E+04    0.73925000E+04   -0.50000000E+01
+    0.66650000E+04    0.77813711E+04   -0.50000000E+01
+    0.68550000E+04    0.79555000E+04   -0.50000000E+01
+    0.67823813E+04    0.78108105E+04   -0.50000000E+01
+    0.60974653E+04    0.73928447E+04   -0.50000000E+01
+    0.61944453E+04    0.72490972E+04   -0.50000000E+01
+    0.66210000E+04    0.74063335E+04   -0.50000000E+01
+    0.66933271E+04    0.73045000E+04   -0.50000000E+01
+    0.61303911E+04    0.73285000E+04   -0.50000000E+01
+    0.65475000E+04    0.73660186E+04   -0.50000000E+01
+    0.61094092E+04    0.77145000E+04   -0.50000000E+01
+    0.67145986E+04    0.74229424E+04   -0.50000000E+01
+    0.65814170E+04    0.74020000E+04   -0.50000000E+01
+    0.62294834E+04    0.75490000E+04   -0.50000000E+01
+    0.60240000E+04    0.75078623E+04   -0.50000000E+01
+    0.62424268E+04    0.76650000E+04   -0.50000000E+01
+    0.60733071E+04    0.73340000E+04   -0.50000000E+01
+    0.61736401E+04    0.76667852E+04   -0.50000000E+01
+    0.65755000E+04    0.72503335E+04   -0.50000000E+01
+    0.64168325E+04    0.75677925E+04   -0.50000000E+01
+    0.60771709E+04    0.73879219E+04   -0.50000000E+01
+    0.65870000E+04    0.75035967E+04   -0.50000000E+01
+    0.61055000E+04    0.76066299E+04   -0.50000000E+01
+    0.64501216E+04    0.75400000E+04   -0.50000000E+01
+    0.60990000E+04    0.73120000E+04   -0.50000000E+01
+    0.61234678E+04    0.75862339E+04   -0.50000000E+01
+    0.63405000E+04    0.73205000E+04   -0.50000000E+01
+    0.63280000E+04    0.74525000E+04   -0.50000000E+01
+    0.63540000E+04    0.74610000E+04   -0.50000000E+01
+    0.65370000E+04    0.73970000E+04   -0.50000000E+01
+    0.60520000E+04    0.77070815E+04   -0.50000000E+01
+    0.62430000E+04    0.75081279E+04   -0.50000000E+01
+    0.66590811E+04    0.73890835E+04   -0.50000000E+01
+    0.65650000E+04    0.74840000E+04   -0.50000000E+01
+    0.60201191E+04    0.76160000E+04   -0.50000000E+01
+    0.65960000E+04    0.75880000E+04   -0.50000000E+01
+    0.65895000E+04    0.76105464E+04   -0.50000000E+01
+    0.61308066E+04    0.74785767E+04   -0.50000000E+01
+    0.61369902E+04    0.74679019E+04   -0.50000000E+01
+    0.64432583E+04    0.75540000E+04   -0.50000000E+01
+    0.64465435E+04    0.75652300E+04   -0.50000000E+01
+    0.60310000E+04    0.74280000E+04   -0.50000000E+01
+    0.60437627E+04    0.74260000E+04   -0.50000000E+01
+    0.64024678E+04    0.75890000E+04   -0.50000000E+01
+    0.60529326E+04    0.75549478E+04   -0.50000000E+01
+    0.63445000E+04    0.76028105E+04   -0.50000000E+01
+    0.61183750E+04    0.77040000E+04   -0.50000000E+01
+    0.62540000E+04    0.73290000E+04   -0.50000000E+01
+    0.62550000E+04    0.73350000E+04   -0.50000000E+01
+    0.61210000E+04    0.76791240E+04   -0.50000000E+01
+    0.61750000E+04    0.76812119E+04   -0.50000000E+01
+    0.61780000E+04    0.76900000E+04   -0.50000000E+01
+    0.61930000E+04    0.77060000E+04   -0.50000000E+01
+    0.61755000E+04    0.77034614E+04   -0.50000000E+01
+    0.62161382E+04    0.77110000E+04   -0.50000000E+01
+    0.61496201E+04    0.77010083E+04   -0.50000000E+01
+    0.66050000E+04    0.72943198E+04   -0.50000000E+01
+    0.66220000E+04    0.72599956E+04   -0.50000000E+01
+    0.66348999E+04    0.72707612E+04   -0.50000000E+01
+    0.65590000E+04    0.76129536E+04   -0.50000000E+01
+    0.65338999E+04    0.72890000E+04   -0.50000000E+01
+    0.64927729E+04    0.77290000E+04   -0.50000000E+01
+    0.64924414E+04    0.77407266E+04   -0.50000000E+01
+    0.64777295E+04    0.77697100E+04   -0.50000000E+01
+    0.64719692E+04    0.77484761E+04   -0.50000000E+01
+    0.62375000E+04    0.73700371E+04   -0.50000000E+01
+    0.62189619E+04    0.73713960E+04   -0.50000000E+01
+    0.65658770E+04    0.74634277E+04   -0.50000000E+01
+    0.60372246E+04    0.74260000E+04   -0.50000000E+01
+    0.63155000E+04    0.75235000E+04   -0.50000000E+01
+    0.61680000E+04    0.77280000E+04   -0.50000000E+01
+    0.61640000E+04    0.77543970E+04   -0.50000000E+01
+    0.61640000E+04    0.77408955E+04   -0.50000000E+01
+    0.65250000E+04    0.72870000E+04   -0.50000000E+01
+    0.65090000E+04    0.72830000E+04   -0.50000000E+01
+    0.65037500E+04    0.72507954E+04   -0.50000000E+01
+    0.65170000E+04    0.72830000E+04   -0.50000000E+01
+    0.65210000E+04    0.72625264E+04   -0.50000000E+01
+    0.62510000E+04    0.75570000E+04   -0.50000000E+01
+    0.62555000E+04    0.75550000E+04   -0.50000000E+01
+    0.62550513E+04    0.75618677E+04   -0.50000000E+01
+    0.62572500E+04    0.75489990E+04   -0.50000000E+01
+    0.62705000E+04    0.75550000E+04   -0.50000000E+01
+    0.62600000E+04    0.73200000E+04   -0.50000000E+01
+    0.62670908E+04    0.73210000E+04   -0.50000000E+01
+    0.62634751E+04    0.73210000E+04   -0.50000000E+01
+    0.63750000E+04    0.72920000E+04   -0.50000000E+01
+    0.63731768E+04    0.72858535E+04   -0.50000000E+01
+    0.66560000E+04    0.75026221E+04   -0.50000000E+01
+    0.60080000E+04    0.72313145E+04   -0.50000000E+01
+    0.64953711E+04    0.73165000E+04   -0.50000000E+01
+    0.64913569E+04    0.72992290E+04   -0.50000000E+01
+    0.64913569E+04    0.73295586E+04   -0.50000000E+01
+    0.65900000E+04    0.73360000E+04   -0.50000000E+01
+    0.65860000E+04    0.73320000E+04   -0.50000000E+01
+    0.65895000E+04    0.73395000E+04   -0.50000000E+01
+    0.65895000E+04    0.73325000E+04   -0.50000000E+01
+    0.65660000E+04    0.73255000E+04   -0.50000000E+01
+    0.65752002E+04    0.73340000E+04   -0.50000000E+01
+    0.65895000E+04    0.73377144E+04   -0.50000000E+01
+    0.65895000E+04    0.73342856E+04   -0.50000000E+01
+    0.62780000E+04    0.72962598E+04   -0.50000000E+01
+    0.66201919E+04    0.74503750E+04   -0.50000000E+01
+    0.62480000E+04    0.74870000E+04   -0.50000000E+01
+    0.60749312E+04    0.73450347E+04   -0.50000000E+01
+    0.66510000E+04    0.73030000E+04   -0.50000000E+01
+    0.66575786E+04    0.73040000E+04   -0.50000000E+01
+    0.66450000E+04    0.73030000E+04   -0.50000000E+01
+    0.66542134E+04    0.73040000E+04   -0.50000000E+01
+    0.65160000E+04    0.73250000E+04   -0.50000000E+01
+    0.67313936E+04    0.72461265E+04   -0.50000000E+01
+    0.62574907E+04    0.75836328E+04   -0.50000000E+01
+    0.62490000E+04    0.73190469E+04   -0.50000000E+01
+    0.65310000E+04    0.73150000E+04   -0.50000000E+01
+    0.66330000E+04    0.72950000E+04   -0.50000000E+01
+    0.63634521E+04    0.72965000E+04   -0.50000000E+01
+    0.63524199E+04    0.72891812E+04   -0.50000000E+01
+    0.63301704E+04    0.72779834E+04   -0.50000000E+01
+    0.63070000E+04    0.75580000E+04   -0.50000000E+01
+    0.62947402E+04    0.75545000E+04   -0.50000000E+01
+    0.63812085E+04    0.75660000E+04   -0.50000000E+01
+    0.60880000E+04    0.75880239E+04   -0.50000000E+01
+    0.62930000E+04    0.74120000E+04   -0.50000000E+01
+    0.62830000E+04    0.74140000E+04   -0.50000000E+01
+    0.62895000E+04    0.74190000E+04   -0.50000000E+01
+    0.62745879E+04    0.74165000E+04   -0.50000000E+01
+    0.62645420E+04    0.74348989E+04   -0.50000000E+01
+    0.62862500E+04    0.74293447E+04   -0.50000000E+01
+    0.65334756E+04    0.76336494E+04   -0.50000000E+01
+    0.62390000E+04    0.73191040E+04   -0.50000000E+01
+    0.62450000E+04    0.73190469E+04   -0.50000000E+01
+    0.61850000E+04    0.73570000E+04   -0.50000000E+01
+    0.61250684E+04    0.75560000E+04   -0.50000000E+01
+    0.64272500E+04    0.75660498E+04   -0.50000000E+01
+    0.60636616E+04    0.73817139E+04   -0.50000000E+01
+    0.61441118E+04    0.77102456E+04   -0.50000000E+01
+    0.63235264E+04    0.75067988E+04   -0.50000000E+01
+    0.62620000E+04    0.73170000E+04   -0.50000000E+01
+    0.62670000E+04    0.73150000E+04   -0.50000000E+01
+    0.62640000E+04    0.74870000E+04   -0.50000000E+01
+    0.66480000E+04    0.73040000E+04   -0.50000000E+01
+    0.66390000E+04    0.73010000E+04   -0.50000000E+01
+    0.61314253E+04    0.75366592E+04   -0.50000000E+01
+    0.60330000E+04    0.76040000E+04   -0.50000000E+01
+    0.60172437E+04    0.76000000E+04   -0.50000000E+01
+    0.64909102E+04    0.74485000E+04   -0.50000000E+01
+    0.65322617E+04    0.73385000E+04   -0.50000000E+01
+    0.63770000E+04    0.73156406E+04   -0.50000000E+01
+    0.63740000E+04    0.73140000E+04   -0.50000000E+01
+    0.63793354E+04    0.73149922E+04   -0.50000000E+01
+    0.63746968E+04    0.73162891E+04   -0.50000000E+01
+    0.63956113E+04    0.75400000E+04   -0.50000000E+01
+    0.63740000E+04    0.73266748E+04   -0.50000000E+01
+    0.63208242E+04    0.74307778E+04   -0.50000000E+01
+    0.60250000E+04    0.73751357E+04   -0.50000000E+01
+    0.60011768E+04    0.73720127E+04   -0.50000000E+01
+    0.63880000E+04    0.77797300E+04   -0.50000000E+01
+    0.63793887E+04    0.72997969E+04   -0.50000000E+01
+    0.62510000E+04    0.75520254E+04   -0.50000000E+01
+    0.60112124E+04    0.74245625E+04   -0.50000000E+01
+    0.65347104E+04    0.73740000E+04   -0.50000000E+01
+    0.66801006E+04    0.72694565E+04   -0.50000000E+01
+    0.66998618E+04    0.72448521E+04   -0.50000000E+01
+    0.58817437E+04    0.73237085E+04   -0.50000000E+01
+    0.62326665E+04    0.75588428E+04   -0.50000000E+01
+    0.62326665E+04    0.75521572E+04   -0.50000000E+01
+    0.62372271E+04    0.76520000E+04   -0.50000000E+01
+    0.62210942E+04    0.76512168E+04   -0.50000000E+01
+    0.65384678E+04    0.74645000E+04   -0.50000000E+01
+    0.61360854E+04    0.76520000E+04   -0.50000000E+01
+    0.62389917E+04    0.76751558E+04   -0.50000000E+01
+    0.60409751E+04    0.75590000E+04   -0.50000000E+01
+    0.61805000E+04    0.76974272E+04   -0.50000000E+01
+    0.65037500E+04    0.72673257E+04   -0.50000000E+01
+    0.65800444E+04    0.73300000E+04   -0.50000000E+01
+    0.65868931E+04    0.73386069E+04   -0.50000000E+01
+    0.65797485E+04    0.73395972E+04   -0.50000000E+01
+    0.66558960E+04    0.73090098E+04   -0.50000000E+01
+    0.66576895E+04    0.73204395E+04   -0.50000000E+01
+    0.63420000E+04    0.74360000E+04   -0.50000000E+01
+    0.63930000E+04    0.75610000E+04   -0.50000000E+01
+    0.63960000E+04    0.76835000E+04   -0.50000000E+01
+    0.64090137E+04    0.76792500E+04   -0.50000000E+01
+    0.64370000E+04    0.76820000E+04   -0.50000000E+01
+    0.63770000E+04    0.73372813E+04   -0.50000000E+01
+    0.63800884E+04    0.73380781E+04   -0.50000000E+01
+    0.63874067E+04    0.73419238E+04   -0.50000000E+01
+    0.63746582E+04    0.73380781E+04   -0.50000000E+01
+    0.63770000E+04    0.73420625E+04   -0.50000000E+01
+    0.63822256E+04    0.73436563E+04   -0.50000000E+01
+    0.63885981E+04    0.73541016E+04   -0.50000000E+01
+    0.62991387E+04    0.75372500E+04   -0.50000000E+01
+    0.66028726E+04    0.73920259E+04   -0.50000000E+01
+    0.62253091E+04    0.73320000E+04   -0.50000000E+01
+    0.62207124E+04    0.73463159E+04   -0.50000000E+01
+    0.65976680E+04    0.74220000E+04   -0.50000000E+01
+    0.63160000E+04    0.76390000E+04   -0.50000000E+01
+    0.63099546E+04    0.76370000E+04   -0.50000000E+01
+    0.63182813E+04    0.75690000E+04   -0.50000000E+01
+    0.59537515E+04    0.75321035E+04   -0.50000000E+01
+    0.66002217E+04    0.73628750E+04   -0.50000000E+01
+    0.63827856E+04    0.75580000E+04   -0.50000000E+01
+    0.60770000E+04    0.75748662E+04   -0.50000000E+01
+    0.63490576E+04    0.76412500E+04   -0.50000000E+01
+    0.60687515E+04    0.74544609E+04   -0.50000000E+01
+    0.65540000E+04    0.72820000E+04   -0.50000000E+01
+    0.65500000E+04    0.72566060E+04   -0.50000000E+01
+    0.65500000E+04    0.72696182E+04   -0.50000000E+01
+    0.61205322E+04    0.73920000E+04   -0.50000000E+01
+    0.65895000E+04    0.75694663E+04   -0.50000000E+01
+    0.61780000E+04    0.73821538E+04   -0.50000000E+01
+    0.67174629E+04    0.72000854E+04   -0.50000000E+01
+    0.68550000E+04    0.70575000E+04   -0.50000000E+01
+    0.67685000E+04    0.70575000E+04   -0.50000000E+01
+    0.67430605E+04    0.71288208E+04   -0.50000000E+01
+    0.64799258E+04    0.72590605E+04   -0.50000000E+01
+    0.63287500E+04    0.76448086E+04   -0.50000000E+01
+    0.60115000E+04    0.76940000E+04   -0.50000000E+01
+    0.60180000E+04    0.77310000E+04   -0.50000000E+01
+    0.60295000E+04    0.77874092E+04   -0.50000000E+01
+    0.62560000E+04    0.75980000E+04   -0.50000000E+01
+    0.62763999E+04    0.75940000E+04   -0.50000000E+01
+    0.62754502E+04    0.75825000E+04   -0.50000000E+01
+    0.62677671E+04    0.75889238E+04   -0.50000000E+01
+    0.65370000E+04    0.72990000E+04   -0.50000000E+01
+    0.65390000E+04    0.72928994E+04   -0.50000000E+01
+    0.66030000E+04    0.76450000E+04   -0.50000000E+01
+    0.66220000E+04    0.76490000E+04   -0.50000000E+01
+    0.60420000E+04    0.73440000E+04   -0.50000000E+01
+    0.67605122E+04    0.76402500E+04   -0.50000000E+01
+    0.63805000E+04    0.75153062E+04   -0.50000000E+01
+    0.60640000E+04    0.73510000E+04   -0.50000000E+01
+    0.60620000E+04    0.73434561E+04   -0.50000000E+01
+    0.63280000E+04    0.76370000E+04   -0.50000000E+01
+    0.63270000E+04    0.76410366E+04   -0.50000000E+01
+    0.63223813E+04    0.76454712E+04   -0.50000000E+01
+    0.63265952E+04    0.76550410E+04   -0.50000000E+01
+    0.63710000E+04    0.72965000E+04   -0.50000000E+01
+    0.63672261E+04    0.72977500E+04   -0.50000000E+01
+    0.63634521E+04    0.73028223E+04   -0.50000000E+01
+    0.63710000E+04    0.73015000E+04   -0.50000000E+01
+    0.63673291E+04    0.73027500E+04   -0.50000000E+01
+    0.63710000E+04    0.73065000E+04   -0.50000000E+01
+    0.63659722E+04    0.73077500E+04   -0.50000000E+01
+    0.63710000E+04    0.73120000E+04   -0.50000000E+01
+    0.63658447E+04    0.73130000E+04   -0.50000000E+01
+    0.63068071E+04    0.72534082E+04   -0.50000000E+01
+    0.63090273E+04    0.72018760E+04   -0.50000000E+01
+    0.63280659E+04    0.77674790E+04   -0.50000000E+01
+    0.63770000E+04    0.74810000E+04   -0.50000000E+01
+    0.63653911E+04    0.74830000E+04   -0.50000000E+01
+    0.63713682E+04    0.74830000E+04   -0.50000000E+01
+    0.63683794E+04    0.74933218E+04   -0.50000000E+01
+    0.61635986E+04    0.76603867E+04   -0.50000000E+01
+    0.63058750E+04    0.74119399E+04   -0.50000000E+01
+    0.66309097E+04    0.73265996E+04   -0.50000000E+01
+    0.61009570E+04    0.74046250E+04   -0.50000000E+01
+    0.60960000E+04    0.75895000E+04   -0.50000000E+01
+    0.59626709E+04    0.73787441E+04   -0.50000000E+01
+    0.59028721E+04    0.73796572E+04   -0.50000000E+01
+    0.60055122E+04    0.74402720E+04   -0.50000000E+01
+    0.66963936E+04    0.72833247E+04   -0.50000000E+01
+    0.64041372E+04    0.75650000E+04   -0.50000000E+01
+    0.66181875E+04    0.73673696E+04   -0.50000000E+01
+    0.59459517E+04    0.77997529E+04   -0.50000000E+01
+    0.60065000E+04    0.77627212E+04   -0.50000000E+01
+    0.60681250E+04    0.73650000E+04   -0.50000000E+01
+    0.63297500E+04    0.76332500E+04   -0.50000000E+01
+        2194         917        1503
+        1059        2292        2291
+         401         404         403
+         758        1999        1051
+        2290        2291        2293
+        1595         742        1594
+        2294        1321        2293
+        2293        2289        2290
+         409         531         405
+         403         402         401
+         818        1059        1437
+        2287        2289        2195
+         353         352         350
+        2197        2195        2289
+         350         352         351
+        2194        1076        2195
+         523         346        1576
+        2197        2289        1321
+        2196        2188        1322
+        2196        2197        2190
+         348         347         523
+        2190        2197        2193
+        2192        2193        1321
+        2188        2258        1322
+        1116        1321        2294
+         545         765        1079
+         406         531         407
+        2296        2292        2274
+         531         406         405
+        1116        2295        2453
+         396         395         393
+        2274        2292         952
+         392         794         528
+         394         393         395
+        1229        2268        2272
+         528         569        1372
+        2290        2288        1437
+        2271        2272        2270
+        2253        1452        2252
+        2453        2454        1116
+        2192        1580        2191
+        2252        1452        2251
+         381         953        1035
+        1580        2253        2256
+         392         391         389
+        2269        2270        2268
+        1000         388        1035
+         390         389         391
+        2267        1356        1006
+         381        1035         388
+        1169         794         392
+        2265        2267        2262
+        2272        2273        1229
+        2294        2295        1116
+        1437        1077        1079
+         381         527         954
+         283         584         653
+        1502        2090        2091
+        2086        2087        2089
+         711         638         683
+        2257        2258        2189
+        2257        2189        2191
+        2089        2541        1018
+         385         384         526
+        2254        2255        2191
+        2259        2090        1502
+        2258        2259        1322
+        2260        1482        2259
+        1547        1848        1176
+         228         227         223
+        1993        1995        1994
+         224         223        1101
+         227         226         223
+        1362        1064        1995
+         561         927         286
+        2440        1215        2441
+        1416        2085        2088
+        2083        1998        2084
+        1083        1084         830
+        2084        1998        1999
+         561        1389         927
+         225        1101         226
+         388         568         381
+        2093        2441        1215
+        2061        2060        2059
+        2451        1482        2452
+         599        1604         583
+         509         265         269
+         388         387         386
+         527         381         568
+        2080        2081        2261
+        1006        2261        2262
+        2080        2261        1006
+        1234        2060        1233
+        1482        2451        1368
+         280        1352         265
+        2066        2067        2065
+         270         269         265
+        1255        2083        2085
+         267         510         268
+         559         511         560
+         269         510         266
+         274         512         955
+         511         558         513
+         275         274         955
+        2073        2074        2075
+         277         275         278
+        1552        1255         928
+        2075        2076        2073
+        1066        2065        2068
+        2438        2031        2026
+        1083        2062        2063
+        2265        2262        2264
+         273         272         274
+        2244        1007        1356
+        1076        1606         824
+         378         377         375
+        1059         952        2292
+         375         377         376
+        1356        2267        2268
+        2301         948        1313
+         948        1353         879
+         699         690        1029
+        2301        2302         940
+        2603        1195        1030
+        2592        1054        2302
+         784         855         818
+        1007        2244        2246
+        2304        1318        2305
+        1285         592         679
+         656        1477        1279
+         880        2199        1541
+        1541        2199        2198
+        2178        1198        2183
+        1198        2175        2200
+        2200        2175        2198
+         357         715         354
+        1054        1320         940
+        2519        2520        2450
+        2224        1317        2304
+        2516        2567        2517
+         932        1541        1542
+        1432        1433        1485
+         415         414        1486
+        2307        2308        2310
+        1485        2491        2490
+         418         416        1323
+         795        1449         930
+        2321        2322        1465
+         416         418         417
+         424         423        1038
+        2310        2311        2307
+        1449        1184         930
+        2311        1067        1432
+         707         715         357
+        2220        1433        2219
+        2201        2182        2183
+        2182        2201        1067
+        2201        2202        1067
+        2216        2217        2199
+         421         420         881
+         424         421         881
+        1299        2313        2314
+         418         881         419
+         882        2184        2051
+        1067        2311        2313
+        2312        2313        2311
+        2182        2313        1299
+        2185        1039        2318
+         617        1193         655
+        1353         940        1032
+         522         340         339
+        2439        2082        1556
+        2438        2439        2031
+        1479        1558        1289
+        2031        2229        2030
+         368        1009         369
+        2173        2174        1413
+        2231        1257        2232
+        1257        2028        2029
+         908        2231         825
+         525        1558        1009
+        1007         796        2228
+         249         507         246
+         894        1385        1386
+         246         250         249
+         277         276         275
+         997        2026        2025
+         250         246         245
+        2078        2079        2077
+         725         997        1258
+        2028        2025        2027
+        1258        1987        1048
+         221        1487         222
+        2029        2232        1257
+        1257        1258        2028
+         507         247         246
+        2076        1385        2073
+        1414        2234        1542
+        2439        1290        2031
+         632         335        1342
+        1542        2173        1414
+        2183        2180        2178
+        2176        2179        1080
+        2179        1192        1080
+        2176        2180        2179
+        2042        2052        2043
+        2052        2042        1040
+        2181        2182         882
+        2233        1414        2231
+         522         339         338
+        1286        1192        2040
+        1286        1474         908
+        1473        2033        2032
+         220        1487         221
+         995        1218        1889
+        1475        1280        1281
+        1080        1192         825
+        2036        2046        2035
+        2044        2041        2042
+        2032        2034        1475
+        2038        2037        2434
+        2047        1501        1280
+        1471         620        1470
+         829         684         508
+        1992        2007        1990
+         867         258         257
+        1080        1413        2174
+         337         336         632
+        2073        1385        2072
+        2050        1501        2047
+        1229        2244        1356
+        2584        1263        2405
+         222        1487        1451
+         141        1324         142
+        1362        1849        1064
+         142        1324         139
+        1666        1667        1613
+         832         991        1392
+         140         139        1324
+        1492        1825        1828
+        1852        1853        1851
+        1859        1860        1861
+        1852        1849        1362
+        1996        1362        1995
+        1823        1850        1856
+         126         134         957
+         493         957         132
+        1491         493         132
+        1825        1492        1823
+        1835        1833        1834
+        1808        1809        1216
+        1329         131        1327
+        1832        1833        1835
+        1132         118        1129
+         132         957         133
+        1856        1857        1823
+         128         127        1329
+        1997        2069        1854
+        1492        1828        1382
+         146         145        1128
+        2421        1808        2420
+        1308         145        1125
+        1808        1824        2420
+        1870        1480        1868
+         833        1128        1131
+        1550        1862        2573
+         148         147        1200
+         149        1200        1314
+        1869        2069        2070
+         271         559         955
+         727         909        1277
+        1469        1132        1129
+        1550        2573        1130
+        1469        1129         728
+        1605         826        1304
+        1819        1820        1821
+        1216        1811        1328
+        1373        1867        1480
+        1818        1821        1864
+        1890        1891        1306
+        1373        1817        1867
+        1480        1867        1868
+         121        1469        1605
+        1818        1866        1817
+        1132        1305         956
+         159         162         497
+        1854        2069        1869
+        1552        1997        1998
+        1815        1816        1370
+        1707         884        1382
+        1708        1707        1382
+        1827        1829        1708
+        1709        1250        1707
+        1328        1714        1830
+         131         130        1327
+         549         484         483
+        1673        1711        1721
+        1719        1713        1718
+          65         680          66
+        1216        1835        1836
+        1711        1673        1674
+          36        1565          37
+        1661        1662        1664
+         476         739         740
+        1065         722         816
+        1665        1709        1664
+        1250        1252         900
+        1565        1566          37
+         644          35          34
+          35         482        1566
+        1673        1213        1672
+        1673        1721        1213
+         644        1378          35
+        2417        1663        1661
+          39          38          40
+        1713        1811        1812
+         547        1251        1612
+        1719        1711        1713
+        1718        1306        1720
+         485         876         947
+        1213        1722        2575
+         876         486         731
+        1109        1893        1731
+         876         731         768
+        1144         845        1310
+        2418        1716        1732
+        1812        1306        1718
+        1814        1815        1370
+        1723        1724        1725
+         994        1394         872
+        1148        2576         994
+         811         989        1260
+        1669        1358        1668
+          21        1068          22
+        2594        1148        1397
+        1186        1642         934
+        2582        2598        1158
+        1640        1641        1643
+          20         797        1256
+         935        1403        1483
+         994        1643        1394
+          70        1147          71
+        1729         934        1640
+        1736        1730        2418
+        1713        1812        1718
+        1305         119         956
+        1420        1648        1649
+         725        1267        1490
+        1707        1250        1176
+        1878        1845        1052
+        1892        1267         732
+        1506         597        1173
+         769         785         988
+        1020        1840        1459
+        2496        2539        2497
+        1020        1892         988
+         905        1254         637
+        1020        1459        1799
+         732         769         988
+        1428        1844        1426
+        1838        1840        1020
+        1733        1894        1746
+        1893        1894        1733
+        1746        1894        1770
+        1514        1515        1771
+         112        1568         113
+        1840         998        1459
+        1770        1771        1515
+        1772        1770        1799
+         111         110        1568
+        1770        1894        1892
+        1892        1020        1770
+         113          98          96
+         771         786         951
+         161         497         162
+         998        1882        1883
+         158         581         733
+        2595        1872        1311
+        1428        1840        1841
+         152        1150        1152
+        1898        1887        1417
+        2611        1190        1037
+         496        1466        1467
+         171         170         964
+        1898        1899        2426
+        2579         942        2596
+        1569        1801        1800
+        1802        2610        1300
+        1806        1037        1804
+        1797        1795        1800
+        1795        1796        1800
+         117         960         114
+        1569        1800        1796
+        1805        1794        1300
+        2611        1037        1806
+         736         996        1194
+        1021        1792        1906
+        1001        1885        1905
+        1118         492        1060
+        1119        1788        1791
+         110         834         113
+        1545        1748        1747
+        1048        1379        1875
+        2591        1361        1876
+         491         992         552
+        1734        1735        1737
+        1734        1728        1736
+        1294         936         798
+        1738         937        1737
+         874         737         877
+         772         849        1156
+        1634        1633        1155
+          79          78        1153
+        1301        1743        1081
+        1739        1740        1741
+        1514        1771        1774
+        1635        2582         937
+         875        1159         773
+         738          17        1401
+        1646        1647        1648
+          25          24        1418
+        1520          17        1399
+          19          18        1157
+        1654        1301        1653
+        1520        1399        1154
+        1402        1071        1652
+        1652        1650        1651
+        1301        1402        1653
+          26        1418          27
+        1398        1740        1742
+        1626        1627        1260
+        1518        1363        1780
+        1727        1734        1737
+        1102          98        1103
+         736         552         996
+        1123        1518        1081
+        1780        1363        1777
+        1782        1783        1781
+        1102        1103         100
+        1781        1630        1631
+         102         615         103
+        1783        1784        1781
+        1307         827        1122
+        1124         992         103
+        1081        1743        1744
+         548        1183          16
+        1628        1778        1632
+        1251           4         729
+        1085        1627        1629
+        1630        1657        1629
+        1652        1653        1402
+        1785        1786        1657
+         490         104         491
+        1656        1629        1657
+         481          30          33
+        1657        1786        1660
+        1657        1630        1784
+        1781        1784        1630
+        1504        1596        1617
+        1307         615         101
+        1774        1771        1773
+          97          96          98
+        1085        1629        1656
+        1888        1887        1898
+         550          76          75
+        1218         995         848
+        1596         836        1085
+        2320        2321        2319
+        2303        1313        2300
+        2319        1374        2318
+        2185        1374        2187
+        2318        1374        2185
+        2315        2316        2317
+         373         664         374
+        1434        2284        2285
+        2502        1500        1343
+        1588         658         635
+        2537        2563        2562
+        1016        1463        1587
+        1465        1464         965
+        2235        2236        1498
+         345         344         342
+         965        1374        2319
+         342         344         343
+        1039        2184         882
+         993         844         360
+        2187        2207        2206
+        1535        2210        2209
+        1345        2187        2206
+        2238        2485        2509
+        2277        2186        2187
+         993         643         619
+        2184        2186        2049
+        2527        2214        2456
+        2184        2049        2051
+        2283        2583         913
+        2284        1435        1191
+        2281        2325        2282
+        1533        1537        1536
+        2339        2340        2355
+        1439         431        1438
+        2338        2333        2337
+         535         431         433
+        2358        2338        2356
+         435        1421        1424
+        2403        1003        2400
+        1439         799         426
+        2279        2117        2118
+        2117        2327        2328
+        2186        2276        2055
+        2277        2276        2186
+        1272        1332         398
+        2325        2281        2324
+        1235        1457         534
+        2332        2333        2338
+        2117        2328        2116
+        2115        2329        1494
+        2357        2334        2332
+         536        1422        1439
+        1440         799         903
+        2056        2118        2443
+        1508        2113        2114
+         717        1089         686
+        1465         742         812
+        2055        2276        2278
+        2048        2010        2002
+        2053        2048        2049
+        2048        1501        2050
+        2000        2003        1501
+        2053        2010        2048
+        2054        2013        2053
+        2014        2015        2010
+        2014        2010        2053
+        2053        2013        2014
+        2053        2049        2055
+        2186        2055        2049
+        1376        1527         236
+         230        1375         231
+        2003        2000        2001
+         234         233         232
+        2006         883        2004
+        1376        1375         230
+        2035        2045        1280
+        2016        2017        2015
+         232        1376         235
+         243        1106        1597
+        1270        1298         239
+         244         743        1298
+        2009        2017        1598
+        1298         743         977
+         243         242        1106
+         264        1273        1274
+         829         260        1024
+        1347        1346         885
+        2055        2278        2058
+        2109        2111        2108
+        1072        1041         292
+        1348        2107        2110
+        2113        2108        2112
+         295         294         293
+        2105        2106        2107
+        2113        2125        1348
+         295        1041        1347
+         966         299         516
+        2057        2279        2118
+        2011        2056        2443
+         289         302        1493
+         289        1493         290
+        2012        2011        2119
+        2100        2101        2099
+        2011        2443        2119
+        2104        2102        2103
+        1493        1041         290
+        2101        2098        2099
+        2128        2098        2101
+        2102        2104        2444
+        1072         290        1041
+         295         293         292
+        2097        2098        2132
+        2445        2444        2105
+         264        1274         261
+         297         296        1346
+        1005        2012        1960
+         434         433        1421
+         422        1038         423
+        2342        1408        2341
+        2352        1408        1573
+         441         440        1572
+        2341        2353        2355
+         437        1271        1553
+        1028        1563         895
+        2351        2345        2349
+         437         436        1271
+        2364        2377        2370
+         449        1201        1553
+        1573        2345        2351
+        2348        2345        2346
+        2332        2358        2357
+        2355        2353        2354
+        1013         575        1461
+         445         575        1013
+        1202         440         439
+        2349        2350        2351
+        1202         446        1461
+        1202         439         438
+        2349        2345        2348
+        1461         575         537
+        1572         443         442
+        1494        2461        2359
+        2368        1011        2365
+        2341        2355        2340
+        1096         713         539
+         907        1366        1554
+        2343        1425        1555
+        2375        2407        2381
+        1003         910        1509
+        2378        1206        1405
+        1137         746         837
+        2404        2403        2402
+        1526        1303         457
+         465         464        1135
+        2344        1425        2343
+         837        1135        1137
+        1201         438         437
+        2465        2531        2493
+        2394        2393        2392
+         916         596         579
+        2369        2386        2368
+        2463        2365        1011
+        1224         983        1454
+         625         746        1224
+         783         854        1162
+        1488        2379        2382
+         980        1004         464
+        2378        1405        2528
+        2406        2375        2374
+         595         541         911
+        1359        2168        1091
+        2365        2364        2370
+        2281         895        1563
+        1522        2389        1524
+        1508        2125        2113
+        2121        1357        2361
+        2120        1357        2121
+        2124        2125        2123
+        1524        2121        2362
+        2362        2121        2361
+        1360         974        1220
+        1239         325         747
+        1524        1446        1522
+        2120        2122        1357
+        1445         447         446
+        1220        1042         303
+        2130        2132        2098
+         309         308         307
+         311         310         921
+        2131        2132        2130
+        1516         310         309
+        2130        2098        2128
+        2129        2127        2128
+        2101        2129        2128
+        2138        2136        2137
+         314         310        1516
+         692         673        1212
+        1516         307        1105
+        1220         564        1377
+         289         288         515
+         747         325         324
+        1220         518         564
+        1239        1238         323
+         779        1611        2172
+         778        2156        2155
+        1239         323        1092
+        2398        2170        2171
+         852        1240         778
+        1380         332         331
+        1354        1540         779
+        1458         982         984
+        1548        1611        1090
+        2398        2171        2471
+         322         321         320
+        1092        1265         566
+         520        1360        1092
+        2160        2144        2143
+         781        1295         326
+        1540        2145        2146
+         319         318         586
+         326         979        1380
+        1003        1509        2399
+        1977        1436        1986
+        1087         853         650
+         662        1087         667
+         860        1540        2449
+         331         330        1380
+         691        1212         673
+        2397        2401        1355
+        1265         323         886
+        1447        1523        2391
+         314         921         310
+        1166         861        1091
+        1494        2329        2330
+        2283         913        2281
+        2446        2532        2447
+         164         163         165
+        1896        1417        1923
+        1896        1898        1417
+         165         163         498
+         969         180         179
+        1417        1484        1923
+         498         167         166
+        1895        1896        1897
+        1296         178         677
+        1897        1896        1923
+         232         235         234
+         167         163         180
+        1904        1546        1903
+         169         168         167
+        1885        1886        1546
+        1901        1902        1900
+        1115        1114         752
+         169         167         180
+        1043         869         169
+         175         174        1138
+        2585        1918        1468
+        1546        1904        1905
+        1043        1296         677
+        1143        2588        1914
+        1600        2008        1598
+        1001        1792        1803
+        1578        1925        1920
+        2023        2024        1005
+        1929        1928        2427
+        1600        1598        1599
+        1002        1499         181
+        1335        1339         201
+        1931        1549        1930
+         182         646         183
+        1208        1228         200
+        2021        2023        1005
+         239        1597         240
+        1110        1111         556
+        2586        1264        1915
+        1919        1549        1917
+        2430        2529        1936
+         187         186         185
+         185         184         187
+        1934        1143        1139
+         986        1338         887
+        1334         200        1339
+        1388        1952        1951
+        1528         828        1610
+        1208        1367         828
+        1931        1932        1933
+         646        1499         183
+         802         985        1391
+        1371         782         901
+        1927        1922        1925
+        2018        2019        1599
+        2429        1910        2430
+        1583        1010        1582
+        1789        1262        2580
+        1760        1761        1062
+        1748        1545        1762
+         172         964        1061
+        1909        1938        1551
+        2419        1545        1747
+        1760        1759        1758
+        1753        1755        1551
+          89        1010          90
+        1393         499        1061
+        1564        1584        1583
+        1750        1786        1749
+        1659        1751        1752
+          30         481          31
+        1658        1659        1616
+        1584         488          83
+        1660        1750        1659
+          87          86          85
+        1753        1754        1755
+        1752        1616        1659
+        1941        1616        1752
+        1941        1752        1753
+          87          85         488
+         970          88        1217
+        1658        1616        1617
+         499        1393         630
+        1787        1749        1786
+        1940        1753        1551
+        1231        1230         501
+        1941        1753        1940
+        1616        1941        1943
+         188        1044         189
+        1530        1214         897
+        1946        1618        1945
+         193         192         191
+         191        1214         193
+        1942        1943        1941
+        1938        1909        1939
+        1618        1616        1943
+        1625        1618        1624
+        1943        1944        1945
+         478          11           9
+           6           5          11
+        1624        1618        1946
+           5          12          11
+        1947        1948        1624
+        2433         898        1950
+          10           9          11
+        1624        1948        1622
+        1622        1623        1624
+        1947        1624        1946
+        1529        1530         194
+          11         478           6
+        1230        1231         188
+        1940        1551        1938
+         945        1142         757
+         730          69         873
+        1953        1954        1955
+        1900        2425        2424
+         515         302         289
+        1960        2012        2096
+        2134        2135        1246
+        2096        2095        1245
+        2138        1246        2135
+        2135        2136        2138
+         205         204        1341
+        1246        1247         888
+        1415         315        1105
+        1246        1244        2134
+         312         921         313
+        1680        1223        1679
+         755         949        1180
+        1387        1951        1957
+        1966        1967        1965
+        1407        1968        1384
+         203         504        1341
+        1967        1968        1407
+         469        1574         470
+        2608        1971        1384
+         471         467         472
+         470        1574         467
+        1574         468         467
+        1223        1476        1679
+        2414        1407        1384
+        1679        1476        2415
+        2095        2134        1244
+        1244        1245        2095
+        1974        1977        1976
+        1436         822        2164
+         211         218         212
+        1973        1974        1976
+         217         212         506
+        1983        1984        1086
+        1981        1979        1980
+        1979        1976        1978
+         505         216         213
+        1986        1436        1985
+         210         503         803
+        1981        1982        1973
+        1970        1972        1969
+        1557        1383         889
+        1969        1768        2413
+        1768        1969        1972
+        1972        1982        1768
+        1248         206         205
+         215         213         216
+        1972        1973        1982
+        1983        1767        1982
+         839        1767        1086
+        1232         505         213
+        1982        1767        1768
+         213         215         214
+        1768        1769        1575
+        2169        1091        2168
+        1557         889        1248
+        2133        2095        2097
+          93         551         624
+        1179        2587        1689
+         191         190        1044
+        1690        1689        1688
+        1531         196         195
+         973        1073          46
+        1680        1682        1223
+        1170        1172         864
+        1282         949         890
+        1180        1178         896
+        1682        1283        1223
+        1223        1283        1074
+        1170          51          50
+         971        1094        1695
+          52         804          53
+         479           7         478
+         987        1094        1621
+        1692        1694        1695
+         987        1693        1692
+        1698        1409        1697
+          55          54          53
+        1045        1319          55
+          56        1181          57
+          55          53        1045
+         971        1695        1696
+        1297          55        1319
+        1293         756         815
+          48        1073         973
+        1621        1948        1949
+         467         473         472
+        2415        2416         972
+        2411        2410        1677
+        1677        1046        2411
+          45          44          43
+        1677        2410        1575
+        1764        1203        1676
+          43          42          45
+        1764        1763        1203
+        1675        1046        1677
+        2412        1575        2410
+        1681         972        1705
+          62          61          59
+         972        1681        1679
+          58         923          59
+        1704        1701        1703
+          59          61          60
+        1181          56        1319
+        1763        1765        1349
+        1704         972         893
+         929        1095         815
+          93          92         551
+        1675        1676        1203
+         972        1704        1705
+        1676        1678        1769
+         476         740         929
+        1577         754        1036
+        2415         972        1679
+        2411        2409        2410
+        1692        1094         987
+        1577        1766        1767
+         753         891        1284
+         822        1436        1974
+        1619        1504        1617
+        1620        1094        1412
+        2007        1992        2006
+         816        1051        1547
+        1359        2167        2168
+         945         630        1393
+         479         478           9
+           7         479           8
+        1948        1621        1622
+         480        1183         548
+        1781        1631        1779
+          31         481          32
+        1750        1660        1786
+        1070        1645        1646
+          40          38         482
+         549          63         484
+        1661        1710        2417
+         483        1330         680
+        1830        1714        1829
+        1517          67         627
+        1109        1717        1891
+         731         486          72
+        1734        1727        1728
+         877         737         772
+        1732        1715        1731
+          83         488          84
+        1659        1750        1751
+          94         489          95
+        1575        1678        1677
+         105         104         490
+        1657        1784        1785
+         491         106         490
+        1749        1787        1747
+        1118        1060         734
+        1300        1800        1802
+        1827        1382        1826
+        1826        1382        1828
+        1277         909        1316
+        1824        1857        2420
+        1173         580        1025
+        1426        2474        2423
+         156        1467        1034
+         157        1034        1047
+         159         497         160
+        1109        1731        1715
+        1900        2424        1899
+         167         498         163
+        1393         964         170
+        1615        1062        1259
+        1115        1043        1111
+        1928        2428        2427
+         187         986        1391
+        1912        1913        1914
+         194        1530         195
+        1179        1687        2587
+         209         208         503
+        1981        1973        1976
+         208        1557         503
+        1369        1247        2607
+        2165        1261        1086
+         212         217         505
+        1977        1974        1436
+         212         218         506
+         247         507         248
+        2230        2030        2229
+         598         582        1082
+        2037        2435        2434
+        1233        2061        2062
+         269         266         509
+        1018        2092         723
+         268         510         269
+         614         513         558
+        1255        2085        1416
+        2072        1869        2070
+         274         272         512
+         559         560         278
+        2079        2026        2077
+        1215         899        2093
+         584         514         653
+         302         515         287
+        2133        2097        2132
+         298         966         516
+        2108        2111        2112
+         298         297         990
+        2118        2056        2057
+        1220         305        1042
+        2105        2444        2104
+         315         314        1105
+        2162        2140        2163
+        2449        2482         860
+         520        1092         566
+        2397        1355        2396
+         326         330         521
+         340         522         341
+        2178        2180        2177
+        1576         349         348
+        2258        2188        2189
+         524        1396         631
+         355        1396         356
+        1558         367        1289
+        2030        2230        2029
+         567         526         383
+        2191        2255        2257
+         526         567         385
+        1233        2060        2061
+        1372         569         393
+        2275        2295        2296
+         397         571        1538
+        2280        2117        2279
+        1057         902        1253
+        2514        2214        2212
+         407         531         408
+        2295        2275        2453
+        1174         689         698
+        2224        2306        2225
+        2331        2115        2116
+        2115        2331        2329
+         533        1440        1235
+        2360        1494        2359
+         432         976         535
+        2356        2339        2355
+         744         813         895
+         433        1439        1422
+         444         443         537
+        2339        2356        2338
+        1202        1445         446
+        1011        2368        2386
+         577         621        1404
+        2495        2494        2466
+        1489         540         578
+        2467        2375        2381
+         594        1303         576
+        2372        2371        2384
+        1160         461         460
+        2148        2151        1240
+         780         792         982
+         981         983        1004
+        2406        2374        1209
+        1078        1079         764
+        1770        1020        1799
+        1670        1613        1667
+          14         926        1183
+        1779        1632        1778
+          63         549          64
+        1710        1661        1664
+        1893        1733        1731
+        1730        1736        1728
+         624         551         489
+        1676        1769        1764
+         104         103         992
+        1747        1787        2419
+        1326        1519         144
+        1823        1857        1824
+        1099        1025         716
+        2475        2474        1426
+         912        1539        1467
+        1899        2424        2426
+         176        1110         177
+        1549        1919        1928
+         255         260         557
+        2042        2041        2040
+         558         583        1604
+        2437        1066        2477
+        1552        2069        1997
+         955         278         275
+        2026        2079        2438
+         511         513         560
+         950        1507        1608
+         286         927         281
+        1369         939         822
+        2479        2478        2547
+        2012        2119        2096
+         302         563        1493
+         305        1377         306
+        1348        2105        2107
+        1543         687         974
+        2446        2533        2532
+        1269        1210        2147
+        1265         886        1177
+        1233        2062        1368
+        1614        1579         954
+        1234        2261        2081
+         388         386         568
+         396         393         569
+        2296        2274        2275
+        1056        2583        2599
+        2241        2240        2510
+         604        1532        1533
+        1345        2206        2208
+         871        1063         843
+        2525        2543        2488
+         573         606        1049
+        1431         363        1075
+         593         975         429
+        2359        2461        2357
+         440        1202        1461
+        2338        2358        2332
+        1525        1526         457
+        2384        2492        2372
+        1205         454        1204
+        2369        2494        2388
+         649        1489        1455
+        2379        2373        2467
+        2471        2171        2472
+        2469        2466        2464
+         716         154        1099
+        1879        2565        2540
+         733         581        1539
+        1898        2426        1888
+         829        1082         260
+        2039        2041        2044
+        1352         270         265
+        2068        2477        1066
+         758         899         950
+         283         561         584
+         316         315        1381
+        2140        2141        2163
+         565         687        1543
+        2161        2144        2160
+        1611        2472        2171
+         322         601         587
+        1221         609        1055
+        2500        2499        2549
+        1497         570        1242
+        2504        2212        1500
+        1533        1532        1211
+        2208        2210        1345
+         761         412         878
+        2306        2506        2225
+        1285         532        1029
+        2459        2223        2522
+         534         428        1235
+        2357        2461        2334
+        2170        2398        2396
+        2371        2383        2384
+         759         783         916
+        2464        2468        2469
+         596         914         458
+        2494        2495        2388
+         697         688        1025
+        2498        1843        2550
+        1082         829         508
+        2037        2476        2435
+         280         918        1352
+        2065        2067        2068
+         570         702        1242
+        1497        1495         608
+        2147        2148        1237
+         322         320         601
+         529         741         399
+        2240        2285        2510
+        1243         600        1497
+        1500        2212        2213
+         672         610        1253
+         611        1211        1532
+         724         807         906
+        2224        2304        2306
+        1285         679         532
+        2222        2507        2491
+        1506         554         607
+        1842        2508        2475
+         775         787         793
+        2238        2483        2485
+         775         788         789
+        1434        2285        2240
+        1211         611         675
+        2212        2511        2514
+         590        1538         571
+        2211        2515        2209
+         600        1495        1497
+        2212        2504        2511
+         641        1100         706
+        2460        2458        2523
+        1556        2082        2080
+        1352         599         270
+        1307         101         827
+        1632        1779        1631
+        1477         656         642
+        2205        2199        2217
+         640        1431        1193
+        2223        2459        2507
+         618        1478        1477
+        2554        2518        2570
+         763         358         762
+        2455        2211        2527
+        1470         645         628
+        2039        2476        2037
+        1404         626        1096
+        2386        2369        2388
+        1404        1205        1204
+        2495        2466        2469
+        1331         623          41
+        1711        1674        1712
+        1767         839        1577
+         489          94         624
+         625         466         746
+        2375        2406        2407
+         907         745         777
+        1404         621        1205
+        1149         768         846
+        2418        1730        1716
+         620        1207        1470
+        2035        2046        2045
+        1228         828        1499
+        1925        1922        1920
+         499         630         173
+        2429        1909        1910
+        1198        2203        2183
+        1396         524        1395
+         337        1342         334
+        2180        2176        2177
+         539         622        1096
+        2465        2468        2464
+         326         521         781
+        2546        2448        2481
+        1591        2613        1593
+        2484        2483        2551
+         636         300         966
+        2331        2116        2328
+        1254         709         714
+        2539        2538        2497
+         830        1368        1083
+         711         285         284
+        2215        1343        1500
+        2515        2211        2457
+         364        1431         640
+        2507        2222        2223
+        2221        2202        2204
+        2523        2542        2460
+         654        1477         642
+        2525        2488        2487
+        2215        2207        1343
+        2527        2456        2455
+         644         623        1378
+        1712        1663        2417
+         645        1470        1207
+        2046        2038        2434
+        1499         646         629
+        2427        1927        1929
+         666        1592         660
+        2564        2569        2545
+        1295         659         978
+        2481        2161        2546
+         633        1462        1489
+        2492        2531        2372
+         650         853         663
+        2478        2548        2547
+        1589        2559        2558
+        2499        2536        2549
+         657        1058        1222
+        1843        2498        2508
+        2541        2092        1018
+         514         638         653
+        2519        2205        2521
+        2487        2524        2525
+         655        1193         641
+        2458        2522        2523
+        2205        2217        2557
+        2506        2543        2225
+        1426        1842        2475
+        2508        1842        1843
+        1585         374         664
+        2535        2501        2568
+         327         978         659
+        2144        2161        2481
+        1590         681         647
+        2483        2239        2551
+         941        1295         781
+        2448        2533        2446
+         650         667        1087
+        2556        2552        2480
+        1450        1087         662
+        2141        2547        2163
+        1463        1464        1050
+        2500        2241        2510
+         904         136         805
+        2496        2550        2539
+         372        1496         666
+        2483        2238        2239
+        2164        2166        1436
+        2480        2548        2478
+        1212        1023         692
+        2547        2141        2479
+         911         541        1287
+        2531        2492        2493
+         808         878         724
+        2526        2524        2489
+         878         871         761
+        2543        2506        2488
+         793         902        1057
+        2214        2514        2456
+        2140         939        2142
+        2552        2556        2534
+        2205        2519        2450
+        1478         618         704
+        1057         612         603
+        2211        2455        2457
+        1025         870        1173
+        2550        2496        2498
+         169         180         969
+        1927        2427        1922
+          74        1219         678
+        1715        1732        1716
+         906         807        1049
+        2522        2458        2459
+        1330         483         484
+        1663        1712        1674
+        1097         965        1016
+         635         681        1588
+        2450        2520        2561
+         641        1193        1100
+        1507        1215        2440
+         638         693         683
+         508         598        1082
+        2038        2046        2036
+         775         776         741
+        2241        2500        2549
+         602        1221         685
+        2563        2535        2568
+         692        1023         519
+        2533        2448        2546
+         735         760         153
+        1878        1846        1845
+         689        1026         718
+        2489        2566        2526
+         411        1184        1449
+        2516        2555        2567
+         562         668        1033
+        2548        2480        2552
+         562        1033        1212
+        2532        2556        2447
+        2094        1507        2442
+         638         514         693
+        1221         943        1505
+        2501        2535        2536
+        1253         530         672
+        2564        2545        2544
+        1026        1189         718
+        2518        2555        2516
+         870         760         817
+        2538        2565        2497
+        1053        1063         605
+        2524        2487        2489
+        1285        1029         906
+        2542        2567        2460
+         858        1022        1089
+        2544        2562        2564
+        1221         851         789
+        2536        2499        2501
+        1089         694        1505
+        2551        2569        2484
+        1460         703         708
+        2518        2554        2553
+        1478         704         703
+        2566        2570        2526
+        1450        1295         941
+        2556        2532        2534
+         708         613        1460
+        2567        2542        2517
+         524         631         707
+        2521        2205        2557
+        1100        1460         613
+        2555        2518        2553
+        1222         665         652
+        2540        1846        1879
+        1496        1592         666
+        2569        2551        2545
+        2259         723        2090
+         285         711         683
+         681         712         647
+        2562        2544        2537
+         713        1096         633
+        2468        2465        2470
+         637        1222         905
+        2565        2538        2540
+        2200        2530        1198
+         707         631         715
+         760         735         817
+        1846        1878        1879
+         776         789         851
+        2535        2563        2537
+         671         591        1063
+        2570        2566        2554
+         911        1287        1603
+        2465        2493        2470
+        1076        1077        2287
+        2273        2274         952
+         477         720         722
+         720           1        1078
+        1066        2064        2065
+        2092        2090         723
+         670        1189         696
+        1029         690        1189
+        2026         997        2077
+        1875        1876        1048
+        2571        1127        2421
+         809         832        1392
+        1392         991         494
+        1865        1863        1864
+         124        1113         125
+        1865        1864        1820
+         766        1252         729
+         766         477         722
+        2575        1146        1213
+         947        1145         767
+        1186        1639        2604
+        1890        1315        1892
+         725        1258        1048
+         770        1539        1152
+         581         555        1539
+        1021        1793        1792
+        1118         734         810
+        1379        1991         942
+        1883        1882        1881
+        1118         996         865
+        1134        2473        2580
+        1197        1156          78
+        1743        1654        1745
+          29        1400        1520
+        1737         937        2582
+        1420        1070        1646
+        1070         811        1567
+         740         739         811
+        1505         701         588
+         774         775         529
+        2322        2323        1030
+         544        1561        1562
+         239        1298         977
+         922        1107        1005
+         895         474         744
+         813         544         745
+         705         634        1450
+        1004         801         463
+        2408        1209        1136
+        1226        2600        1161
+        2159        2160        1354
+        1380         333         332
+        2449        1540        2146
+        1560         749         823
+         475         754         780
+         750         781         329
+         751        1105         968
+         586         565        1543
+        1138        1140         838
+        1917        1918        1916
+        2096        1245        1340
+        1964         753        1245
+         754         475        1019
+        1086        1767        1983
+        2433        1685         898
+          49         890         755
+        1291        1700        1702
+         836        1596         740
+        2529        1143        1936
+        1051        1999        1994
+        1511         764        1079
+         759         916         911
+         541         719        1287
+        1052        1513        1878
+        1506        1429        1427
+        2592        2305        1318
+        1174        1026         689
+         993        1344         763
+         361         762         358
+        2512        2505        1535
+         993         360         643
+        2195        1076        2287
+         722         720         764
+         545         721         765
+        2247        2245        1088
+         900        1176        1250
+         477         766         729
+         873          68         485
+        2575        2593        1146
+        1145        1310         845
+        1640         994        1729
+         819        1512         785
+         732        1048         769
+         155         951         912
+        2577        1311         995
+         942         848         995
+        1164         786         856
+         849        1153        1156
+        1401          17        1520
+         875         773         738
+        1638        1225        2598
+         529        1332         774
+        1332        1272         774
+         529         775         741
+         787         775         774
+        2583        1056         913
+         694        1089         717
+        2528        1405        2376
+        2366        2367        1555
+        2394        1226        1443
+        1090        1611         791
+        2482        2149        1210
+        2158         779        2172
+         475         780         749
+        1261         839        1086
+         648        1295         661
+         329         781         521
+        1371        1959        1961
+        1283        1686        1685
+         854        1160        1162
+         915        2590        2589
+         765         721         784
+        1595         474         895
+        1845        1512        1052
+         842        1025        1099
+        1165        2596         942
+         786        1164         951
+         610        1057        1253
+         612        1057         610
+        1022         695         700
+        1089        1022         686
+         775         789         776
+         858         788         857
+        1406         859        1209
+         821         790         777
+         778        1090        1269
+         860        1090         791
+        2170        2396        1166
+         754        1261         780
+         793        1057        1243
+         775         793         788
+        2249        2248        1364
+        1169        1167         863
+        1195         931        1030
+        1323         416        1449
+        2228         796        2234
+        2246        2247        1032
+        1256         797         933
+        1636        1225        1638
+        1266        1738        2605
+          76        1294          77
+        2327        2282        2325
+        1438         431         430
+         295         292        1041
+         636         820         301
+        1263        2404        2405
+        1355        2401        1609
+        1481        1367         199
+        1934        1935        1936
+         939        2140        2162
+        1963        1247        1369
+         864        1172         804
+        1692        1695        1094
+         904         805        1222
+         805         135         806
+         988        1839        1837
+         714         637        1254
+         411         807         724
+        1049         415        1486
+        1063         871        1174
+        1054         940        2302
+        1854        1853        1362
+        1131         145        1308
+        2578        1119        1791
+         810        1117        1120
+         989        1419        1071
+         739         547        1012
+        1586        1463        2242
+         895         913         742
+         813         744         544
+        1366        1206        2378
+         585         317         944
+         751         974        1023
+        1704         893        1292
+         756         476         929
+        1547        1051        1064
+        1607         764        1511
+         771         817         735
+         597         676        1173
+        1059        2290        1437
+         784         818         765
+        1839         988        1512
+        1513        1052         819
+         301         820         800
+         298         990         636
+         777        1559        1510
+        1458         823         982
+         939        2164         822
+        1974        1975         822
+        1562        1560         823
+         749         780         823
+        1607        1511         824
+        2287        1077        2288
+        2181        1040        1192
+        2040        2033        1473
+         826         122        1304
+        1818        1864        1866
+         103         615        1124
+        1363        1518        1123
+         187        1391         985
+         200         199        1208
+         867         868         258
+        1602        1278         256
+        1083        2063        2064
+        1482        1368         830
+        2571        1861        1127
+        1126        1308         991
+         494         553        1392
+         809         150        1316
+        1125         831        1308
+        1130        2572        2574
+         834        1103         113
+         110         492         865
+        1194        1133         835
+        1262        1789        1788
+        1085        1658        1596
+         740         811        1260
+        1135         464        1137
+        1136         859         910
+        1140        1115         752
+        1139        2585        1468
+        1086        1984        1985
+        1766        1577        1765
+        1143        1914        1913
+         869        1140        1142
+        1603         841         911
+        1448        1441         919
+        1878        1513        1880
+        1173         676         580
+         878         808         871
+         698         572        1174
+         639        1344         993
+         844         993         762
+        2593        1725        1146
+        1517         627          73
+         994        2576        1729
+        1144        1310          70
+         847        1152        1150
+        1311        1165        1151
+        1990        2007        1218
+        1871        1311        1872
+          80         737         874
+        1266         937        1738
+         850        1159        1157
+        1158         934        1727
+        2599        2286        1191
+        2599        1191        1056
+        1240         852        1237
+        1210         860        2482
+         781         750         853
+         663         853        1241
+        1161        2590         915
+        1444        1448        1442
+        1088        2273         952
+         784         879        1353
+        2601        1165        1874
+        1163        1312         856
+        1242         695        1022
+         589         600        1243
+         788         858         789
+        1242        1022         857
+        2374        1406        1209
+         790         821         910
+        1210        2149        2147
+         791        1540         860
+        1091        2170        1166
+         792        1261        1359
+         793         787         862
+        1533         862        1534
+         392         389        1169
+        1364        2602        2249
+        1045        1172         949
+        1171        1693         987
+        1194        1120         108
+         110         865         834
+         944        1033         585
+         814        1381        1415
+        2000        1501        2048
+         259        1024         260
+         882        2051        2052
+         259         868        1024
+        1142        1309         840
+         170         169         869
+        1025         580         697
+         760         870         842
+        1174         671        1063
+         761         871         843
+        1394        1643        1644
+        1722        1213        1721
+        1721        1711        1719
+         947         730         873
+         874         877          81
+          76        1601         938
+          24        1069        1483
+          20        1256          21
+         876         485        1108
+        1517         486         876
+         487        1219        1601
+        1219          74        1027
+        1313        2303        2301
+        1175         724         878
+         784         721        1031
+        2603        1030        2323
+        2199         880        2216
+        1318        1320        1054
+        2315        1039        1299
+         881         418         424
+        2317        1039        2315
+         882        2052        1040
+        2004         883        2003
+        1992         883        2006
+        1176         884        1707
+        1492        1848        1850
+         990        1347         820
+        2108        1348        2110
+        2154        2153        1240
+         323        1265        1092
+         502        1214        1231
+         198        1338        1481
+        2139        1246        2138
+        1963        1962         888
+        1249        1557        1248
+         803         503        1557
+         891        2431        2432
+        1268        2431         891
+        2432        1952        1284
+        1965         891         753
+        1293         546         756
+        1351        1765        1036
+         893        1349        1293
+        1293         924        1292
+        2076        1386        1385
+        2072         894         725
+         742        1595         895
+        1423        1521        1563
+        1171        1227        2606
+         890         949         755
+         898        1685        1687
+        2431        1685        2433
+        1691        2606        1227
+        1950         898        1171
+        1076        1503        1606
+        2091        2093         899
+        1250        1709        1665
+         722        1065         766
+        1387        1959        1371
+         782        1284        1388
+         793         862         902
+         862        1211         902
+        1438         430        1440
+         903        1438        1440
+        1844        1842        1426
+         806        1098         905
+        1222         637         665
+         805         806         905
+        1029         532         699
+         724         906         808
+         745         907         813
+         777         790        1206
+        1474        1286        1473
+        2231         908        1989
+         809         909         832
+        1316         150        1199
+        2408        2406        1209
+         790         910         859
+        1287         719         669
+         911         841         759
+        1539         770         733
+        1539         496        1467
+         742         913         812
+         913         895        2281
+         447        1445         448
+         911         916         595
+        2589        2472        1611
+        2155         915        1548
+         596         916         914
+         916         579         595
+         917        1502        1503
+        2194        2196         917
+        1288         614        1604
+        2081        2060        1234
+         920         915        2155
+         916         999         914
+        2600        1226        2395
+        2155        2121        1524
+        2095        2133        2134
+         921         314         313
+        2019        2020        1107
+        1921        1302        1578
+        1181        1319         923
+        1291        1702        1701
+        1292         925        1291
+        1763        1349         893
+        1701        1292        1291
+        1411         924        1095
+        1183          15          14
+          16        1183          13
+        1018        1416        2089
+        1389         561         283
+        2437        2436         928
+        2436        2071        1552
+        1504        1620        1095
+         929         815         756
+         415         807        1449
+         411         410        1184
+         879        1031        1595
+        1594        1465        2322
+        2198        1542        1541
+        2234         796         932
+        1186        2604        1642
+        1185          19        1196
+        1640         934        1642
+        1729        1727         934
+        1256        1185        1196
+        1394        1645        1358
+         937        1633        1635
+         938        1294          76
+        1266        2605        1741
+        1266        1398        1155
+         550         487        1601
+        1156        1153          78
+        2164         939        2162
+         822        1975        1369
+         796        1007        1032
+        1353        1032        1088
+        1450         661        1295
+         781         853         941
+         222        1451         219
+        1379        1877        1875
+        1505         685        1221
+         789         858         943
+        1033         814         866
+        1212        1033         866
+         630         945         757
+         170         869         945
+         870         817         946
+         946         817        1429
+         730         947         767
+         485         947         873
+        1353        2301         940
+         879         931        1195
+         973         949          48
+         949          62        1045
+        2094        1608        1507
+         758         950        1608
+         951        1430        1429
+        1427        1429         495
+         818         855         952
+         952         855        1088
+        2248        2250        2251
+         380         379        1167
+        1452        1580        1168
+         383         382        1579
+         271         955         512
+         559         278         955
+        1216        1836        1808
+        1832        1835        1216
+        1824        1808        1836
+         957         493         126
+         115         961         116
+         961         962         959
+        1037        1190        1884
+         958         960         959
+        1190        1801        1570
+         114         960         958
+        1037        1001        1804
+         959         963         958
+        1805        1792        1794
+         961         115         962
+         109         734        1060
+         959         962         963
+        1906        1907        1021
+        1804        1001        1803
+        2319        2321        1465
+        1016        1464        1463
+        1508        2115        1357
+         966         298         636
+        2379        2380        2382
+        2383        2371        2385
+         518         751         968
+        2101        2102        2129
+        1111         500         556
+        1484        1924        1923
+        1551        1755        1756
+        1757        1615        1756
+        1699        1700        1182
+        1412         971        1410
+        2411        1046        2416
+         972        1046         893
+        1705        1706        1681
+         949         973          62
+         687         519        1023
+        1220         751         518
+        2337        2335        2336
+        1457         593         574
+         431         535         976
+        2335        2337        2333
+        2021        2022        2023
+         243         239         977
+        2159        2158        2157
+        2143        1354        2160
+        1380         979         748
+        2158        2159        1354
+        1003        2403        2404
+        1188         983         981
+        1004         463         981
+        1456        1525         967
+         780         982         823
+        1166         792         861
+         981         543        1188
+         456        1104        1224
+        2399        1509        1609
+         792        1166         982
+        2529        2430        1910
+         986         187         184
+        1528        1610         184
+         502        1231         887
+        1621        1949         987
+        1950        1171        1949
+        1837        1838        1020
+         732         988        1892
+        1652        1071        1650
+        1567         811        1012
+         297        1346        1347
+         636         990         820
+         494         991         726
+         909         991         832
+         992         834         996
+         491         104         992
+         639         993         619
+         762         993         763
+        1643         994        1640
+         872        1146        1148
+        1990        1218         848
+        1889        2577         995
+         992         996         552
+         834         865         996
+        1258        2025        2028
+         894        1386         725
+        1882         998        2422
+        1569        1570        1801
+        2389        1523        1524
+        1522        2390        2389
+        2267        2265        2266
+        1035         953         380
+        1905        1906        1001
+        1792        1001        1906
+        1005        1960        1926
+        1005        1925        1578
+        1509         910         821
+        2399        2400        1003
+         801        1004         980
+         456         455        1104
+        2012        1005        2024
+        1925        1005        1926
+        2267        1006        2262
+        1290        2229        2031
+        1007        2246        1032
+        1007        2226        1006
+        2221        2204        2561
+        1100         613         706
+        1289         366        1479
+        2029        2230        2232
+        1581         970        1582
+        1762        1134        1062
+        2386        2387        1011
+        2390        1522        2609
+        1567        1012        1612
+         739        1012         811
+        1013        1461         446
+        1494        2360        2361
+         540        1014         453
+         578        1455        1489
+        1015         651         658
+        1015        1585         651
+        1587        1589        1591
+        1463        1586        1587
+         710         660        1017
+        1017        1590         710
+        1084         723         830
+        1390         928        1255
+         892        1349        1351
+        1349        1765        1351
+         988        1837        1020
+        1021        1119        1793
+        1907        1062        1021
+         686        1022         700
+         858         857        1022
+         751        1023         866
+         687        1023         974
+         868         867        1024
+         829        1602         684
+         716        1025         688
+         842         870        1025
+         871         808        1026
+        1029        1189         808
+        1219         487         678
+          81         877        1027
+         895         813        1028
+         813         907        1093
+        1189         690         696
+         808         906        1029
+        1195        2603        2299
+        1030         931        1594
+         784        1031         879
+         721         474        1031
+        1032        2247        1088
+         796        1032         940
+         585        1033         668
+         814        1033         944
+         155        1467         156
+        1190        2611        1807
+         380        1167        1169
+         389        1000        1035
+         754        1019        1036
+        1019        1351        1036
+        1884        1885        1037
+        1001        1037        1885
+         424        1038         421
+        2318        1039        2317
+        2184        1039        2185
+        2315        1299        2314
+        2040        1040        2042
+         882        1040        2181
+         517         800        1041
+         820        1041         800
+         305         304        1042
+        1357        2122        2123
+         169         969        1043
+        1043         969        1296
+         502         897        1214
+        1044         188        1214
+        1172          53         804
+          59        1045          62
+        1046        1675        1203
+         972        2416        1046
+        1886        2425        1546
+        1467        1047        1034
+        1048         732        1267
+        1379        1048        1987
+         606         592        1285
+         415        1049         807
+        2242        2243        1586
+        1056         812         913
+        1064        1994        1995
+         758        1051         816
+        1052        1512         819
+        1513         785        1361
+        1317        2218         880
+         605         413        1053
+        2304        1317        1318
+         880        1320        1318
+        1221         789         943
+         609         400        1055
+        1191        2286        2284
+         812        1056        1050
+         603         589        1057
+        1243        1057         589
+        1222         805         905
+         657         137        1058
+        2290        1059        2291
+         818         952        1059
+        1792        1805        1803
+        1300        1797        1800
+        1759        1615        1757
+        1756        1259        1911
+        1062        1761        1762
+        1259        1907        1908
+         605        1063         591
+         843        1063        1053
+        1064        1849        1547
+        1051        1994        1064
+        1176        1848         884
+        1065         900         766
+         928        1084        2437
+        1084        1083        1066
+        2202        1432        1067
+        2182        1067        2313
+        1483        1403         875
+         935        1483          21
+        1646        1648        1420
+        1483          23        1068
+        1070         989         811
+        1668        1645        1070
+        1260        1627        1085
+         989        1071        1260
+        2102        2444        2129
+         291         290        1072
+          48          47        1073
+        1283        1685        1268
+         891        1965        1074
+        1476        1965        1967
+        1431        1075        1193
+        1193         682        1100
+        1076        2194        1503
+        1076         824        1077
+        1511        1077         824
+        1437         765         818
+         720        1078         764
+        1079        1077        1511
+        1078         545        1079
+        1192        2179        2181
+        1080         825        1413
+        1301        1654        1743
+        1744        1746        1515
+         582         557        1082
+         260        1082         557
+        2064        1066        1083
+        1066        2437        1084
+         928        1018        1084
+         723        1084        1018
+        1658        1085        1656
+        1260        1071        1626
+        1985        2165        1086
+        2167        1359        2165
+        1450         662         705
+         941         853        1087
+        2245        1229        1088
+        1088         855        1353
+        1505         694         701
+         943         858        1089
+        1548         778        2155
+         778        1548        1090
+        2170        1091        2169
+        1091         861        1359
+        1360         520         319
+        1092        1360        1239
+        2462        1521        2344
+         813        1093        1028
+        1182        1410        1699
+        1621        1094        1620
+         815        1095         924
+        1095         929        1504
+         626        1014        1096
+        1014         540        1462
+        1498        1343        2235
+        2207        2187        1374
+        1254         138         709
+        1845        1847        1512
+        1513        2591        1880
+         769        1048        1361
+         682        1008        1100
+        1100        1008        1460
+         226        1101         223
+        1362        1996        1997
+         100          99        1102
+        1514        1774        1775
+         113        1103          98
+         992        1103         834
+        1224        1104         625
+        2467        2381        2379
+         968        1105         307
+        2607        1247        2139
+        1107        2021        1005
+        1106         241        1597
+        2021        1107        2020
+         922        1302        1600
+          73         486        1517
+        1306        1717        1720
+        1717        1109        1715
+        1891        1893        1109
+        1111        1110         176
+        2428        1928        1919
+         176        1114        1115
+         500        1111        1043
+         462        1112        1526
+         594         457        1303
+        1469         121        1132
+        1865        2574        2572
+        1468        1933        1139
+         752         838        1140
+        1043        1115         869
+         176        1115        1111
+        1364        2454        2602
+        1321        1116        2192
+        1788        1790        1791
+        1120        1118         810
+        1118         865         492
+        1117         108        1120
+        1793        1119        2578
+        1062        1134        1021
+         108        1133        1194
+         996        1118        1120
+        1864        1821        1820
+        1812        1813        1370
+        1775        1776        1777
+        1124        1307        1103
+        1515        1514        1123
+        1777        1363        1775
+        1307         100        1103
+         992        1124        1103
+        1127        1861        1860
+        1126        1131        1308
+         991         909        1126
+        1131         727         833
+        1130        2573        2572
+        2421        1127        1808
+        1131        1128         145
+        1113        1469         728
+        1130        2574        1810
+        1127        1130        1808
+        1808        1130        1810
+        1862        1550        1860
+        1126         909        1131
+         909         727        1131
+        1305        1132         121
+         118        1132         956
+         108         107        1133
+        2580        1262        1134
+        1134        1262        1021
+        1134        1762        1545
+        1137         464        1004
+        1003        1136         910
+        2584        2408        1136
+        2584        1136        1263
+        1224        1004         983
+         746        1137        1224
+        1140        1138         174
+        1264        2586        1139
+        2585        1139        2586
+        1933        1934        1139
+         840        1309        1141
+         869        1115        1140
+         840         757        1142
+        1913        1915        1264
+         869        1142         945
+        1141        1309         174
+        1936        1143        1934
+        2529        2588        1143
+        1146        1725        1724
+        1145         845         767
+         947         876        1145
+        1149         846        1147
+        2594        1397        1726
+        1146         872        1213
+        1149        1147          70
+        2594        2576        1148
+         872        1148         994
+        1726        1397        1724
+        1145         876        1149
+         768        1149         876
+         152         151        1150
+        1871        1165        1311
+        1871        1874        1165
+         942         995        1151
+         770        1152         847
+        1164         912         951
+        1365        1156        1197
+        1634        1398        2581
+        1400          27        1401
+        1745        1654        1655
+        1398        1742        2597
+        1633         937        1155
+          78        1187        1197
+         772        1156         877
+        1225        1158        2598
+          19        1157        1159
+        1727        1737        1158
+        2582        1158        1737
+         773        1159         850
+        1159        1403        1196
+        1162        1160         460
+        2600        2590        1161
+         915         920        1161
+        2395        1226        2394
+        1448         460        1441
+         783        1162         916
+        1871        1873        1874
+         856        1312        1164
+        1312        1163         152
+         912        1164        1152
+        2596        1165        2601
+         942        1151        1165
+        1355        1166        2396
+         982        1166         984
+        1169        1035         380
+        2248        1452        1364
+        1452        2248        2251
+        1116        1168        2192
+        1169         863         794
+         389        1035        1169
+        1172        1170          50
+        2606        1693        1171
+        1949        1171         987
+        1179        1689        1690
+          50        1178        1180
+          53        1172        1045
+         870         946        1173
+        1173         946        1506
+        1174         572         671
+        1026        1174         871
+        2297        2298        2300
+         411         724        1175
+         900        1065        1176
+        1547        1176        1065
+        2148        2150        2151
+         322         587        1177
+        1179        1171         898
+        1180         896         755
+        1227        1690        1691
+        1687        1179         898
+         949        1172        1180
+          50        1180        1172
+          56        1297        1319
+        1700        1291        1182
+        1411         925         924
+        1409        1410         971
+        1183         480          15
+          13        1183         926
+         807         411        1449
+        1195        2299        2297
+        1636        1637        1639
+        1196          19        1159
+        1225         934        1158
+        1636        1639        1186
+        1266        1155         937
+        1187        1294        1197
+         967        1453        1456
+         543         462        1526
+         718        1189         670
+         808        1189        1026
+        1801        1190        1807
+        1883        1884        1190
+        1435        2284        1434
+        1050        1056        1191
+        2040        1192        1040
+         908         825        1192
+         640        1193         617
+         682        1193        1075
+         736        1194         835
+         996        1120        1194
+        1313        1195        2297
+        1195         948         879
+        1403        1159         875
+        1196         935        1256
+        1294        1187         936
+        1156        1365         877
+        1198        2178        2175
+        2203        1198        2530
+        1314        1316        1199
+        1490        1315        1480
+        1867        1817        1866
+         147        1314        1200
+        1271         450        1553
+         538         438        1201
+         438         538        1202
+        1445        1202         538
+        1763         893        1203
+        1046        1203         893
+        2377        2364        1366
+         622         577        1404
+        2368        2365        2370
+         621         451        1205
+        1366        2378        2377
+         777        1206         907
+         253         645        1207
+        2476        2039        2044
+        1367        1208         199
+         183        1499         828
+        1406        2374        2376
+        1136        1209         859
+        2147        1237        1269
+         860        1210        1269
+         675         530        1253
+        1211         862        1533
+        1212         691         562
+        1023        1212         866
+        1358        1213         872
+        1213        1669        1672
+        1044        1214         191
+        1214         188        1231
+        1507        2440        2442
+         950         899        1215
+        1809        1811        1216
+        1831        1328        1830
+          82        1544        1583
+          91        1010        1544
+        1218        2007        1484
+        1889        1218        1887
+        1027         877        1219
+         877        1365        1601
+        1239        1360         303
+         751        1220         974
+         609        1221         602
+         851        1221        1055
+         657        1222         652
+         904        1222        1058
+        1682        1683        1684
+        1223        1074        1476
+        1004        1224        1137
+         983        1188        1454
+        1636        1186        1225
+         934        1225        1186
+        1161         920        1226
+        1447        2391        2393
+        1171        1179        1227
+        1179        1690        1227
+         828        1228        1208
+        1228        1002         202
+        2245        2244        1229
+        1088        1229        2273
+        1909        2429        1939
+        1937        1938        1939
+        1391         501         802
+         887        1231         986
+        1976        1979        1981
+         212         505        1232
+        2062        1083        1368
+        1234        2451        2263
+        1234        1233        1368
+        1234        2263        2261
+         975         593        1457
+         430         975        1457
+         654         618        1477
+        1279        1236         362
+        2154        1240        2151
+        1237         852        1269
+        2156         778        1240
+        2154        2152        2153
+         325        1239         303
+         747        1238        1239
+        1237        2148        1240
+        2156        1240        2153
+         853         750        1241
+         328         663        1241
+        1242         702         695
+        1242         857        1243
+         857         788        1243
+         793        1243         788
+         888        1962        1244
+        1962        1964        1245
+        1962        1245        1244
+        1340         753         782
+        1246        2139        1247
+        1244        1246         888
+        2607        2142        1369
+        1963         888        1247
+        1341        1249         205
+        1384        1968        2608
+         205        1249        1248
+         803        1249         504
+        1665        1666        1250
+        1251        1252        1612
+         766         900        1252
+        1612        1250        1666
+         729        1252        1251
+         902        1211        1253
+         675        1253        1211
+         905        1098        1254
+         138        1254        1098
+         928        2436        1552
+        1998        2083        1255
+        1256         933        1185
+        1256         935          21
+        1989        1258        2231
+        1258         997        2025
+        2231        1258        1257
+        1258        1989        1987
+        1907        1259        1062
+        1911        1259        1908
+        1085         836        1260
+         836         740        1260
+         780        1261         792
+         754         839        1261
+        1788        1119        1262
+        1021        1262        1119
+        1136        1003        1263
+        1003        2404        1263
+        1139        1143        1264
+        1143        1913        1264
+        1177         587        1265
+         566        1265         587
+        1741        1740        1266
+        1266        1740        1398
+        1490        2072         725
+        1048        1267         725
+        2431        1268        1685
+        1074        1268         891
+         778        1269         852
+         860        1269        1090
+        2015        2017        2009
+        1275        1270         238
+        2353        2341        1408
+        2347        1408        2367
+         590        1536        1537
+        2058        2279        2057
+         262        1273         263
+        2279        2058        2278
+        2056        2011        2054
+        1273         262        1274
+         237         244        1298
+        2054        2011        2013
+         674        1478        1276
+        1478         674        1477
+        1865        1820        1822
+        1865        1822        2574
+        1024         867        1278
+        1602         256         684
+         880        2218        2216
+         365         656        1279
+        2047        1280        2045
+        1280         883        1281
+         883        1992        1281
+        1992        1989        1474
+          48         949        1282
+        1684        1686        1283
+        1283        1268        1074
+        1682        1684        1283
+         753        1284         782
+         891        2432        1284
+         906        1049        1285
+         606        1285        1049
+        2040        1473        1286
+        1192        1286         908
+         669         576        1287
+         576        1303        1603
+        1290        1006        2227
+         918         279        1288
+         370         369        1479
+        1006        2226        2227
+        1290        1556        1006
+        2227        2229        1290
+        1701        1704        1292
+        1182        1291         925
+        1293        1292         893
+         924         925        1292
+        1293         892         546
+         815         924        1293
+        1294         798          77
+        1197        1294         938
+         659        1295         648
+         326        1295         978
+        1043         677         500
+        1924        1484        1302
+         971        1696        1697
+        1699        1409        1698
+        1270        1275        1298
+         237        1298        1275
+        1039         882        1299
+        1299         882        2182
+        1805        1300        2610
+        1794        1797        1300
+        1518        1301        1081
+        1628        1626        1402
+        1302         922        1578
+        1924        1302        1921
+        1112         542        1303
+         841        1603         542
+         122         826         123
+         121        1605        1304
+         119        1305         120
+        1370        1816        1306
+        1306        1816        1373
+        1306        1891        1717
+         100        1307        1122
+         615        1307        1124
+         831         726        1308
+         991        1308         726
+        1142        1140        1309
+        1140         174        1309
+        1145        1149        1310
+        1149          70        1310
+         995        1311        1151
+        2577        2595        1311
+         152        1152        1312
+        1152        1164        1312
+        1195        1313         948
+        2297        2300        1313
+        1480        1870        1490
+        1314         147        1316
+        1892        1315        1267
+        1315        1890        1373
+        1277        1316         147
+        1316         909         809
+        2218        1317        2224
+        1318        1317         880
+         880        1541        1320
+        1318        1054        2592
+        1045          59        1319
+        1319          59         923
+         932         796        1320
+         940        1320         796
+        2197        1321        2193
+        2289        2293        1321
+        1502        1322        2259
+        2196        1322         917
+        1323         795         425
+         424         418        1323
+        1850        1858        1856
+        1855        1858        1851
+         143         809        1392
+        1851        1853        1855
+        1325         143        1519
+        1851        1858        1850
+        1327         129        1329
+        1216        1328        1832
+        1328        1831        1832
+        1713        1328        1811
+          66         680        1330
+        1329         127         131
+        1714        1328        1713
+        1708        1829        1714
+        1669        1671        1672
+        1378        1331          40
+        2117        2280        2327
+        2282        2327        2280
+        1951        1958        1957
+        1953        1958        1951
+        1960        1340        1371
+        1953        1955        1956
+        1228         202        1336
+        1953        1956        1958
+        1339        1335        1334
+        1961        1960        1371
+        1337         201        1339
+        1337        1339        1336
+        1951        1387        1388
+        1367        1481         986
+         200        1228        1339
+        1336        1339        1228
+        2096        1340        1960
+         753        1340        1245
+        1341         504        1249
+        1965         753        1964
+        2176        1080        2174
+         632        1342         337
+        1374        1343        2207
+        1591        1593        1097
+         639         359        1344
+        1535        2209        2513
+        2486        2277        1345
+        2187        1345        2277
+        1347         990         297
+        1348        2108        2113
+         295        1347         885
+         820        1347        1041
+        2125        2126        1348
+        2105        1348        2445
+        1350        1351        1019
+        1293        1349         892
+        1350        1019           3
+         892        1351         546
+         546        1351        1350
+         918        1288        1352
+        1352        1288        1604
+         948        2301        1353
+         784        1353         855
+        1540        1354        2143
+        2158        1354         779
+        1609        2401        2399
+        1355         984        1166
+        1356        2268        1229
+        1006        1356        1007
+        2123        2125        1508
+        2361        1357        2115
+        1668        1358        1645
+        1358        1669        1213
+         792        1359         861
+        2165        1359        1261
+         974        1360         319
+         303        1360        1220
+         769        1361         785
+        1876        1361        1048
+        1854        1362        1997
+        1852        1362        1853
+        1518        1780        1778
+        1363        1123        1514
+        1168        1116        1364
+        2454        1364        1116
+        1197         938        1365
+        1365         938        1601
+        2366        1555        2364
+         907        1206        1366
+         199        1333        1481
+         986         184        1610
+         830         723        1482
+        1234        1368        2451
+         939        1369        2142
+        1963        1369        1975
+        1812        1370        1306
+        1814        1370        1813
+         782        1371        1340
+        1387        1371         901
+        2268        2270        2272
+         392         528        1372
+        1306        1373        1890
+        1816        1817        1373
+         965        1097        1374
+        1097        1343        1374
+        2005        2006        2004
+         230        1527        1376
+        2015        2009        2010
+        1376         232        1375
+        1220        1377         305
+        2445        1348        2126
+        1331        1378         623
+          40         482        1378
+         942        1991         848
+        1379        1988        1991
+        1380         330         326
+         333        1380         748
+        1415        1105         751
+         866         814        1415
+        1708        1382        1827
+        1382         884        1492
+         208         207        1383
+        2413        1384        1969
+        1969        1384        1971
+        2413        2414        1384
+        1386        2076        2077
+        2072        1385         894
+        2077         997        1386
+         725        1386         997
+        1959        1387        1957
+        1387         901        1388
+         782        1388         901
+        1284        1952        1388
+         283         282        1389
+        1416        2088        2086
+        1018        1390        1416
+         928        1390        1018
+         986        1231        1391
+         501        1391        1231
+        1325        1519        1326
+        1392        1519         143
+         964        1393        1061
+        1393         170         945
+        1645        1394        1644
+        1358         872        1394
+        2202        2221        2219
+        2450        2561        2204
+        2183        2203        2201
+         356        1396        1395
+        1148        1146        1397
+        1146        1724        1397
+        2597        2581        1398
+        1745        1655        2581
+        1634        2581        1655
+        1398        1634        1155
+        1400          28          27
+         875        1401          24
+          27        1418          24
+         738        1401         875
+        1628        1402        1301
+        1071        1402        1626
+         875          24        1483
+         935        1196        1403
+         626        1404        1204
+        1096         622        1404
+        1206         790        1405
+        1406         790         859
+        2376        1405        1406
+         790        1406        1405
+        2414        2415        1476
+        1967        1407        1476
+        2367        1408        2343
+        2352        1573        2351
+        1410        1409        1699
+         971        1697        1409
+        1182        1411        1410
+        1412        1094         971
+        1411        1182         925
+        1095        1620        1412
+        1410        1411        1412
+        1412        1411        1095
+        1414         825        2231
+        1414        2173        1413
+         825        1414        1413
+        2234        1414        2233
+         866        1415         751
+        1381         315        1415
+        1416        2086        2089
+        1416        1390        1255
+        1887        1218        1417
+        1484        1417        1218
+          27          24        1401
+        1419        1650        1071
+        1419        1420        1650
+         989        1070        1419
+        1650        1420        1649
+        1070        1420        1419
+         431        1439         433
+        2343        1408        2342
+        1521        2462        2326
+        1422        1424         433
+        2326        1563        1521
+        1028        1093        1423
+         433        1424        1421
+        2344        1521        1425
+        1423        1093        1425
+        1425        1093        1554
+        1428        2423        2422
+         998        1428        2422
+        1506        1427         554
+        1841        1844        1428
+        2423        1428        1426
+        1428         998        1840
+         771        1429         817
+         771         951        1429
+         951         155        1430
+         495        1429        1430
+        2490        2309        1485
+        2491        1485        2222
+        1432        2307        2311
+        2219        1433        2202
+        1485        2220        2222
+        2202        1433        1432
+        1435        2242        1463
+        2240        2242        1434
+        2242        1435        1434
+        1050        1191        1435
+        2166        2165        1436
+        1985        1436        2165
+        1077        1437        2288
+         765        1437        1079
+         430        1235        1440
+        1438         903        1439
+         799        1439         903
+         426         536        1439
+         533         427        1440
+         799        1440         427
+        1447        2394        1443
+         999         916        1444
+        1444         916        1162
+         459        1442        1448
+        1226         920        1443
+        1523        2389        2391
+         999        1444        1442
+         460        1444        1162
+        1011        2363        2463
+        1011        2387        1522
+        2362        2363        1446
+        1011        1522        2363
+        2394        1447        2393
+        1447        1443        1523
+        1448         919         459
+         460        1448        1444
+        1323        1449         795
+         415        1449         416
+         661        1450         634
+        1087        1450         941
+        1877        1379        2579
+        1379        1987        1988
+        1580        1452        2253
+        1364        1452        1168
+        2371        2373        1488
+        1525         457         967
+         456        1454        1456
+        1224        1454         456
+         452         649        1455
+        2373        2379        1488
+         456        1456        1453
+        1456        1454        1525
+         534        1457         574
+         430        1457        1235
+        1609        1458         984
+        1559        1458        1510
+        1570         998        1883
+        1798        1459        1571
+        1008         616        1460
+        1460         616        1478
+         537         443        1461
+         440        1461         443
+         633        1096        1462
+        1014        1462        1096
+        1464        1016         965
+        1435        1463        1050
+        2319        1465         965
+         812        1050        1464
+        1030        1594        2322
+         812        1464        1465
+        1902        2425        1900
+        2425        1902        1546
+        1467        1466        1047
+         912        1467         155
+        1918        1917        1468
+        1933        1468        1549
+        1113         124        1469
+        1469         124        1605
+         628         252        1470
+        1472        1471        1470
+        1471        1472         251
+         254         620        1471
+        1475        2035        1280
+        1470         252        1472
+        1473        1475        1474
+        2032        1475        1473
+        1992        1474        1281
+        1989         908        1474
+        1475        2034        2035
+        1474        1475        1281
+        1476        1074        1965
+        1476        1407        2414
+         674        1236        1477
+        1477        1236        1279
+        1460        1478         703
+         616        1276        1478
+        1007        2228        2226
+         369        1009        1558
+        1490        1870        1869
+        1480        1315        1373
+         198        1481        1333
+         986        1481        1338
+        2259        1482         723
+        2452        1482        2260
+          23        1483        1069
+          21        1483        1068
+        2007        2008        1484
+        1484        2008        1302
+        1049        1486         573
+        1433        2220        1485
+        1485        2309        1432
+        2307        1432        2309
+         942        2579        1379
+        1990         848        1991
+        2385        2371        1488
+        2382        2385        1488
+         633        1489         649
+         540        1489        1462
+        2072        1490        1869
+        1267        1315        1490
+         131         127        1491
+         132         131        1491
+        1848        1492         884
+        1823        1492        1850
+         563         517        1493
+        1041        1493         517
+        1494        2330        2461
+        2115        1494        2361
+        2238        2509        1498
+        2509        2503        1498
+        1017         660        1592
+        2238        1498        2236
+         570        1497         608
+        1242        1243        1497
+        2503        2502        1498
+        1343        1498        2502
+         181        1499         629
+        1228        1499        1002
+        1500        2213        2215
+        2502        2504        1500
+        2003         883        1501
+        1280        1501         883
+        1502        2091        1503
+        1502         917        1322
+        2091         899        1503
+         899         758        1606
+        1504        1619        1620
+         929         740        1596
+        1505         588         685
+        1089        1505         943
+        1506         607         597
+        1506         946        1429
+        1608        2094        2084
+        1215        1507         950
+        2115        1508        2114
+        1357        2123        1508
+        1510        1509         821
+        1609         984        1355
+         821         777        1510
+        1559         777         745
+        1607         824        1606
+        1607         722         764
+        1839        1512        1847
+         785        1512         988
+         785        1513         819
+        2591        1513        1361
+        1363        1514        1775
+        1515        1123        1081
+        1744        1515        1081
+        1770        1515        1746
+         307        1516         309
+         314        1516        1105
+         876        1108        1517
+          67        1517        1108
+        1778        1628        1518
+        1518        1628        1301
+        1392         553        1519
+         144        1519         553
+          29        1520        1154
+        1400        1401        1520
+        1563        2326        2324
+        1425        1521        1423
+        2363        1522        1446
+        2387        2609        1522
+        1443         920        1523
+        1523         920        1524
+        1524         920        2155
+        2362        1446        1524
+        1454        1188        1525
+        1525        1188        1526
+        1526        1188         543
+        1112        1303        1526
+         230         229        1527
+        2000        2048        2002
+        1549        1931        1933
+         183         828        1528
+        1530        1529         193
+        1943        1945        1618
+         193        1214        1530
+        1530        1531         195
+        1531        1530         897
+         197         196        1531
+        2209        2515        2513
+        1535        2513        2512
+        1534         862         787
+        1533        1534        1537
+         787         774        1534
+        1538         774        1272
+         604        1533        1536
+        1345        2210        1535
+        1535        2505        1345
+        2486        1345        2505
+        1538        1537        1534
+         590        1537        1538
+         774        1538        1534
+         397        1538        1272
+        1539         555         496
+        1539         912        1152
+         779        1540         791
+        2145        1540        2143
+        1542        2198        2175
+        1541         932        1320
+        1542        2175        2173
+        2234         932        1542
+         974         319        1543
+         319         586        1543
+        1564         970        1217
+        1582        1010          89
+        2419        2473        1545
+        1134        1545        2473
+        1903        1546        1902
+        1905        1885        1546
+        1848        1547        1849
+        1547        1065         816
+         915        2589        1611
+        1611         779         791
+        1549        1928        1930
+        1468        1917        1549
+        1130        1127        1550
+        1127        1860        1550
+        1756        1911        1551
+        1551        1911        1909
+        1552        2071        2069
+        1998        1255        1552
+        1553        1201         437
+        1425        1554        1555
+         907        1554        1093
+        1555        1366        2364
+        1555        2367        2343
+        1555        1554        1366
+        1006        1556        2080
+        2439        1556        1290
+         803        1557        1249
+         208        1383        1557
+        1558         525         367
+        1479         369        1558
+        1559         745        1562
+         823        1458        1559
+        1562         745         544
+         749        1560           2
+        1560        1562        1561
+         823        1559        1562
+        1563        2324        2281
+        1028        1423        1563
+          87        1564        1217
+          89        1581        1582
+        1664        1709        1710
+        1378         482          35
+        1613        1670        1567
+          35        1566        1565
+        1670        1668        1567
+        1070        1567        1668
+         113        1568         110
+        1799        1459        1798
+        1570        1569        1571
+        1570        1883        1190
+        1571        1569        1796
+         998        1570        1459
+        1798        1571        1796
+        1459        1570        1571
+         443        1572         440
+        2353        1408        2352
+        1408        2347        1573
+        2345        1573        2347
+         470         467         471
+        1678        1575        1769
+        2412        2413        1575
+        1768        1575        2413
+        2188        2196        2190
+         523        1576         348
+         754        1577         839
+        1765        1577        1036
+        1578        1920        1921
+        1005        1578         922
+         383        1579        1614
+        1580        2256        2254
+        2191        1580        2254
+        2192        1168        1580
+        1615        1759        1760
+        1564        1582         970
+        1583        1582        1564
+        1583        1544        1010
+        1584        1564          87
+          82        1583        1584
+         488        1584          87
+          82        1584          83
+        1586        2243        2612
+         651        1585         664
+        2559        1589        2612
+        1586        2612        1589
+        2560        1591        1589
+        1097        1016        1587
+         681         635         712
+        1015         658        1588
+        2560        1589        2558
+        1586        1589        1587
+        1591        2560        2613
+         710        1590         647
+        1593        2613        2237
+        1097        1587        1591
+        1593        2237        2235
+        1496         371        1592
+        2235        1343        1593
+        1343        1097        1593
+        1595        1594         931
+         742        1465        1594
+         879        1595         931
+        1595        1031         474
+        1617        1596        1658
+         929        1596        1504
+        1599        2019        1600
+        1597         239         243
+        2009        1598        2008
+        2018        1599        2017
+        1600        2019        1107
+        2017        1599        1598
+         922        1600        1107
+        2008        1600        1302
+         550        1601          76
+        1601        1219         877
+         829        1024        1602
+        1024        1278        1602
+         576        1603        1287
+        1303         542        1603
+        1604         599        1352
+         558        1604         614
+         826        1605        1121
+         124        1121        1605
+         899        1606        1503
+        1607         758         816
+         758        1607        1606
+         722        1607         816
+        2084        1999        1608
+         758        1608        1999
+        1509        1510        1609
+        1458        1609        1510
+         828        1367        1610
+         986        1610        1367
+        1611        1548         915
+        2172        1611        2171
+         547        1612        1012
+        1250        1612        1252
+        1567        1612        1613
+        1612        1666        1613
+         954         527        1614
+         567         383        1614
+        1062        1615        1760
+        1756        1615        1259
+           5           6        1617
+        1617        1616           5
+        1618          12           5
+           5        1616        1618
+           6         478        1619
+        1619        1617           6
+        1619         478           7
+           7        1620        1619
+           7           8        1621
+        1621        1620           7
+           8         479        1622
+        1622        1621           8
+           9          10        1624
+        1624        1623           9
+        1622         479           9
+           9        1623        1622
+          10          11        1625
+        1625        1624          10
+          11          12        1618
+        1618        1625          11
+          13         926        1627
+        1627        1626          13
+        1628          16          13
+          13        1626        1628
+        1627         926          14
+          14        1629        1627
+          14          15        1630
+        1630        1629          14
+          15         480        1631
+        1631        1630          15
+        1632         548          16
+          16        1628        1632
+        1634        1399          17
+          17        1633        1634
+          17         738        1635
+        1635        1633          17
+          18          19        1637
+        1637        1636          18
+        1638        1157          18
+          18        1636        1638
+          19        1185        1639
+        1639        1637          19
+          20          21        1641
+        1641        1640          20
+        1642         797          20
+          20        1640        1642
+          21          22        1643
+        1643        1641          21
+          22        1068        1644
+        1644        1643          22
+          23        1069        1646
+        1646        1645          23
+        1644        1068          23
+          23        1645        1644
+        1646        1069          24
+          24        1647        1646
+          24          25        1648
+        1648        1647          24
+          25        1418        1649
+        1649        1648          25
+          26          27        1651
+        1651        1650          26
+        1649        1418          26
+          26        1650        1649
+          27          28        1652
+        1652        1651          27
+          28        1400        1653
+        1653        1652          28
+        1653        1400          29
+          29        1654        1653
+          29        1154        1655
+        1655        1654          29
+        1657          33          30
+          30        1656        1657
+          30          31        1658
+        1658        1656          30
+          31          32        1659
+        1659        1658          31
+          32         481        1660
+        1660        1659          32
+        1660         481          33
+          33        1657        1660
+          34          35        1662
+        1662        1661          34
+        1663         644          34
+          34        1661        1663
+          35        1565        1664
+        1664        1662          35
+        1664        1565          36
+          36        1665        1664
+          36          37        1666
+        1666        1665          36
+          37        1566        1667
+        1667        1666          37
+          38          39        1669
+        1669        1668          38
+        1670         482          38
+          38        1668        1670
+          39          40        1671
+        1671        1669          39
+          40        1331        1672
+        1672        1671          40
+          41         623        1674
+        1674        1673          41
+        1672        1331          41
+          41        1673        1672
+          42          43        1676
+        1676        1675          42
+        1677          45          42
+          42        1675        1677
+          43          44        1678
+        1678        1676          43
+          44          45        1677
+        1677        1678          44
+          46        1073        1680
+        1680        1679          46
+        1681         973          46
+          46        1679        1681
+        1680        1073          47
+          47        1682        1680
+          47          48        1683
+        1683        1682          47
+          48        1282        1684
+        1684        1683          48
+        1686         890          49
+          49        1685        1686
+          49         755        1687
+        1687        1685          49
+        1689        1178          50
+          50        1688        1689
+          50          51        1690
+        1690        1688          50
+          51        1170        1691
+        1691        1690          51
+        1693         804          52
+          52        1692        1693
+          52          53        1694
+        1694        1692          52
+          53          54        1695
+        1695        1694          53
+          54          55        1696
+        1696        1695          54
+          55        1297        1697
+        1697        1696          55
+        1697        1297          56
+          56        1698        1697
+          56          57        1699
+        1699        1698          56
+          57        1181        1700
+        1700        1699          57
+        1702         923          58
+          58        1701        1702
+          58          59        1703
+        1703        1701          58
+          59          60        1704
+        1704        1703          59
+          60          61        1705
+        1705        1704          60
+          61          62        1706
+        1706        1705          61
+          62         973        1681
+        1681        1706          62
+        1708         484          63
+          63        1707        1708
+          63          64        1709
+        1709        1707          63
+          64         549        1710
+        1710        1709          64
+        1712         680          65
+          65        1711        1712
+          65          66        1713
+        1713        1711          65
+          66        1330        1714
+        1714        1713          66
+        1716         627          67
+          67        1715        1716
+          67        1108        1717
+        1717        1715          67
+          68         873        1719
+        1719        1718          68
+        1720         485          68
+          68        1718        1720
+          69         730        1722
+        1722        1721          69
+        1719         873          69
+          69        1721        1719
+          70          71        1724
+        1724        1723          70
+        1725        1144          70
+          70        1723        1725
+          71        1147        1726
+        1726        1724          71
+          72         486        1728
+        1728        1727          72
+        1729         731          72
+          72        1727        1729
+        1728         486          73
+          73        1730        1728
+          73         627        1716
+        1716        1730          73
+          74         678        1732
+        1732        1731          74
+        1733        1027          74
+          74        1731        1733
+          75          76        1735
+        1735        1734          75
+        1736         550          75
+          75        1734        1736
+          76          77        1737
+        1737        1735          76
+          77         798        1738
+        1738        1737          77
+          78          79        1740
+        1740        1739          78
+        1741        1187          78
+          78        1739        1741
+          79        1153        1742
+        1742        1740          79
+          80         874        1744
+        1744        1743          80
+        1745         737          80
+          80        1743        1745
+          81        1027        1733
+        1733        1746          81
+        1744         874          81
+          81        1746        1744
+        1748        1544          82
+          82        1747        1748
+          82          83        1749
+        1749        1747          82
+          83          84        1750
+        1750        1749          83
+          84         488        1751
+        1751        1750          84
+        1751         488          85
+          85        1752        1751
+          85          86        1753
+        1753        1752          85
+          86          87        1754
+        1754        1753          86
+          87        1217        1755
+        1755        1754          87
+          88         970        1757
+        1757        1756          88
+        1755        1217          88
+          88        1756        1755
+        1759        1581          89
+          89        1758        1759
+          89          90        1760
+        1760        1758          89
+          90        1010        1761
+        1761        1760          90
+          91        1544        1748
+        1748        1762          91
+        1761        1010          91
+          91        1762        1761
+        1764         551          92
+          92        1763        1764
+          92          93        1765
+        1765        1763          92
+          93         624        1766
+        1766        1765          93
+          94          95        1768
+        1768        1767          94
+        1766         624          94
+          94        1767        1766
+          95         489        1769
+        1769        1768          95
+          96          97        1771
+        1771        1770          96
+        1772         113          96
+          96        1770        1772
+          97          98        1773
+        1773        1771          97
+          98        1102        1774
+        1774        1773          98
+          99         100        1776
+        1776        1775          99
+        1774        1102          99
+          99        1775        1774
+         100        1122        1777
+        1777        1776         100
+         101         615        1779
+        1779        1778         101
+        1780         827         101
+         101        1778        1780
+         102         103        1782
+        1782        1781         102
+        1779         615         102
+         102        1781        1779
+         103         104        1783
+        1783        1782         103
+         104         105        1784
+        1784        1783         104
+         105         490        1785
+        1785        1784         105
+        1785         490         106
+         106        1786        1785
+         106         491        1787
+        1787        1786         106
+        1789        1133         107
+         107        1788        1789
+         107         108        1790
+        1790        1788         107
+         108        1117        1791
+        1791        1790         108
+        1793         734         109
+         109        1792        1793
+         109        1060        1794
+        1794        1792         109
+         110         111        1796
+        1796        1795         110
+        1797         492         110
+         110        1795        1797
+         111        1568        1798
+        1798        1796         111
+        1798        1568         112
+         112        1799        1798
+         112         113        1772
+        1772        1799         112
+        1801         117         114
+         114        1800        1801
+         114         958        1802
+        1802        1800         114
+         115         116        1804
+        1804        1803         115
+        1805         962         115
+         115        1803        1805
+         116         961        1806
+        1806        1804         116
+        1807         960         117
+         117        1801        1807
+         118         956        1809
+        1809        1808         118
+        1810        1129         118
+         118        1808        1810
+         119         120        1812
+        1812        1811         119
+        1809         956         119
+         119        1811        1809
+         120        1305        1813
+        1813        1812         120
+         121        1304        1815
+        1815        1814         121
+        1813        1305         121
+         121        1814        1813
+        1815        1304         122
+         122        1816        1815
+         122         123        1817
+        1817        1816         122
+         123         826        1818
+        1818        1817         123
+         124         125        1820
+        1820        1819         124
+        1821        1121         124
+         124        1819        1821
+         125        1113        1822
+        1822        1820         125
+        1824         134         126
+         126        1823        1824
+         126         493        1825
+        1825        1823         126
+         127         128        1827
+        1827        1826         127
+        1828        1491         127
+         127        1826        1828
+         128        1329        1829
+        1829        1827         128
+        1829        1329         129
+         129        1830        1829
+         129        1327        1831
+        1831        1830         129
+         130         131        1833
+        1833        1832         130
+        1831        1327         130
+         130        1832        1831
+         131         132        1834
+        1834        1833         131
+         132         133        1835
+        1835        1834         132
+         133         957        1836
+        1836        1835         133
+        1836         957         134
+         134        1824        1836
+         135         805        1838
+        1838        1837         135
+        1839         806         135
+         135        1837        1839
+        1838         805         136
+         136        1840        1838
+         136         904        1841
+        1841        1840         136
+         137         657        1843
+        1843        1842         137
+        1844        1058         137
+         137        1842        1844
+        1846         709         138
+         138        1845        1846
+         138        1098        1847
+        1847        1845         138
+        1849         142         139
+         139        1848        1849
+         139         140        1850
+        1850        1848         139
+         140        1324        1851
+        1851        1850         140
+        1851        1324         141
+         141        1852        1851
+         141         142        1849
+        1849        1852         141
+        1854         809         143
+         143        1853        1854
+         143        1325        1855
+        1855        1853         143
+         144         553        1857
+        1857        1856         144
+        1858        1326         144
+         144        1856        1858
+         145         146        1860
+        1860        1859         145
+        1861        1125         145
+         145        1859        1861
+         146        1128        1862
+        1862        1860         146
+         147         148        1864
+        1864        1863         147
+        1865        1277         147
+         147        1863        1865
+         148        1200        1866
+        1866        1864         148
+        1866        1200         149
+         149        1867        1866
+         149        1314        1868
+        1868        1867         149
+         150         809        1854
+        1854        1869         150
+        1870        1199         150
+         150        1869        1870
+        1872        1150         151
+         151        1871        1872
+         151         152        1873
+        1873        1871         151
+         152        1163        1874
+        1874        1873         152
+         153         760        1876
+        1876        1875         153
+        1877         735         153
+         153        1875        1877
+         154         716        1879
+        1879        1878         154
+        1880        1099         154
+         154        1878        1880
+        1882        1430         155
+         155        1881        1882
+         155         156        1883
+        1883        1881         155
+         156        1034        1884
+        1884        1883         156
+         157        1047        1886
+        1886        1885         157
+        1884        1034         157
+         157        1885        1884
+        1888         581         158
+         158        1887        1888
+         158         733        1889
+        1889        1887         158
+         159         160        1891
+        1891        1890         159
+        1892         162         159
+         159        1890        1892
+         160         497        1893
+        1893        1891         160
+        1893         497         161
+         161        1894        1893
+         161         162        1892
+        1892        1894         161
+         163         164        1896
+        1896        1895         163
+        1897         180         163
+         163        1895        1897
+         164         165        1898
+        1898        1896         164
+         165         498        1899
+        1899        1898         165
+         166         167        1901
+        1901        1900         166
+        1899         498         166
+         166        1900        1899
+         167         168        1902
+        1902        1901         167
+         168         169        1903
+        1903        1902         168
+         169         170        1904
+        1904        1903         169
+         170         171        1905
+        1905        1904         170
+         171         964        1906
+        1906        1905         171
+        1906         964         172
+         172        1907        1906
+         172        1061        1908
+        1908        1907         172
+         173         630        1910
+        1910        1909         173
+        1911         499         173
+         173        1909        1911
+         174         175        1913
+        1913        1912         174
+        1914        1141         174
+         174        1912        1914
+         175        1138        1915
+        1915        1913         175
+         176         177        1917
+        1917        1916         176
+        1918        1114         176
+         176        1916        1918
+         177        1110        1919
+        1919        1917         177
+         178        1296        1921
+        1921        1920         178
+        1922         677         178
+         178        1920        1922
+         179         180        1897
+        1897        1923         179
+        1924         969         179
+         179        1923        1924
+        1926        1002         181
+         181        1925        1926
+         181         629        1927
+        1927        1925         181
+        1929         646         182
+         182        1928        1929
+         182         183        1930
+        1930        1928         182
+         183        1528        1931
+        1931        1930         183
+         184         185        1933
+        1933        1932         184
+        1931        1528         184
+         184        1932        1931
+         185         186        1934
+        1934        1933         185
+         186         187        1935
+        1935        1934         186
+         187         985        1936
+        1936        1935         187
+         188         189        1938
+        1938        1937         188
+        1939        1230         188
+         188        1937        1939
+         189        1044        1940
+        1940        1938         189
+        1940        1044         190
+         190        1941        1940
+         190         191        1942
+        1942        1941         190
+         191         192        1943
+        1943        1942         191
+         192         193        1944
+        1944        1943         192
+         193        1529        1945
+        1945        1944         193
+        1945        1529         194
+         194        1946        1945
+         194         195        1947
+        1947        1946         194
+         195         196        1948
+        1948        1947         195
+         196         197        1949
+        1949        1948         196
+         197        1531        1950
+        1950        1949         197
+        1952        1338         198
+         198        1951        1952
+         198        1333        1953
+        1953        1951         198
+        1953        1333         199
+         199        1954        1953
+         199         200        1955
+        1955        1954         199
+         200        1334        1956
+        1956        1955         200
+        1958        1335         201
+         201        1957        1958
+         201        1337        1959
+        1959        1957         201
+         202        1002        1926
+        1926        1960         202
+        1961        1336         202
+         202        1960        1961
+        1963         504         203
+         203        1962        1963
+         203        1341        1964
+        1964        1962         203
+         204         205        1966
+        1966        1965         204
+        1964        1341         204
+         204        1965        1964
+         205         206        1967
+        1967        1966         205
+         206        1248        1968
+        1968        1967         206
+         207         208        1970
+        1970        1969         207
+        1971        1383         207
+         207        1969        1971
+         208         209        1972
+        1972        1970         208
+         209         503        1973
+        1973        1972         209
+        1973         503         210
+         210        1974        1973
+         210         803        1975
+        1975        1974         210
+        1977         218         211
+         211        1976        1977
+         211         212        1978
+        1978        1976         211
+         212        1232        1979
+        1979        1978         212
+        1979        1232         213
+         213        1980        1979
+         213         214        1981
+        1981        1980         213
+         214         215        1982
+        1982        1981         214
+         215         216        1983
+        1983        1982         215
+         216         505        1984
+        1984        1983         216
+         217         506        1986
+        1986        1985         217
+        1984         505         217
+         217        1985        1984
+        1986         506         218
+         218        1977        1986
+         219        1451        1988
+        1988        1987         219
+        1989         222         219
+         219        1987        1989
+        1991        1487         220
+         220        1990        1991
+         220         221        1992
+        1992        1990         220
+         221         222        1989
+        1989        1992         221
+        1994         228         223
+         223        1993        1994
+         223         224        1995
+        1995        1993         223
+         224        1101        1996
+        1996        1995         224
+        1996        1101         225
+         225        1997        1996
+         225         226        1998
+        1998        1997         225
+         226         227        1999
+        1999        1998         226
+         227         228        1994
+        1994        1999         227
+         229         230        2001
+        2001        2000         229
+        2002        1527         229
+         229        2000        2002
+         230         231        2003
+        2003        2001         230
+         231        1375        2004
+        2004        2003         231
+         232         233        2006
+        2006        2005         232
+        2004        1375         232
+         232        2005        2004
+         233         234        2007
+        2007        2006         233
+         234         235        2008
+        2008        2007         234
+         235        1376        2009
+        2009        2008         235
+         236        1527        2002
+        2002        2010         236
+        2009        1376         236
+         236        2010        2009
+        2012         244         237
+         237        2011        2012
+         237        1275        2013
+        2013        2011         237
+         238        1270        2015
+        2015        2014         238
+        2013        1275         238
+         238        2014        2013
+         239         240        2017
+        2017        2016         239
+        2015        1270         239
+         239        2016        2015
+         240        1597        2018
+        2018        2017         240
+        2018        1597         241
+         241        2019        2018
+         241        1106        2020
+        2020        2019         241
+         242         243        2022
+        2022        2021         242
+        2020        1106         242
+         242        2021        2020
+         243         977        2023
+        2023        2022         243
+        2024         743         244
+         244        2012        2024
+        2026         250         245
+         245        2025        2026
+         245         246        2027
+        2027        2025         245
+         246         247        2028
+        2028        2027         246
+         247         248        2029
+        2029        2028         247
+         248         507        2030
+        2030        2029         248
+         249         250        2026
+        2026        2031         249
+        2030         507         249
+         249        2031        2030
+        2033        1471         251
+         251        2032        2033
+         251        1472        2034
+        2034        2032         251
+         252         628        2036
+        2036        2035         252
+        2034        1472         252
+         252        2035        2034
+        2038         645         253
+         253        2037        2038
+         253        1207        2039
+        2039        2037         253
+        2041         620         254
+         254        2040        2041
+         254        1471        2033
+        2033        2040         254
+        2043         260         255
+         255        2042        2043
+         255         557        2044
+        2044        2042         255
+        2046         684         256
+         256        2045        2046
+         256        1278        2047
+        2047        2045         256
+         257         258        2049
+        2049        2048         257
+        2050         867         257
+         257        2048        2050
+         258         868        2051
+        2051        2049         258
+         259         260        2043
+        2043        2052         259
+        2051         868         259
+         259        2052        2051
+         261        1274        2054
+        2054        2053         261
+        2055         264         261
+         261        2053        2055
+         262         263        2057
+        2057        2056         262
+        2054        1274         262
+         262        2056        2054
+         263        1273        2058
+        2058        2057         263
+        2058        1273         264
+         264        2055        2058
+        2060         280         265
+         265        2059        2060
+         265         509        2061
+        2061        2059         265
+         266         510        2063
+        2063        2062         266
+        2061         509         266
+         266        2062        2061
+        2063         510         267
+         267        2064        2063
+         267         268        2065
+        2065        2064         267
+         268         269        2066
+        2066        2065         268
+         269         270        2067
+        2067        2066         269
+         270         599        2068
+        2068        2067         270
+         271         512        2070
+        2070        2069         271
+        2071         559         271
+         271        2069        2071
+         272         273        2073
+        2073        2072         272
+        2070         512         272
+         272        2072        2070
+         273         274        2074
+        2074        2073         273
+         274         275        2075
+        2075        2074         274
+         275         276        2076
+        2076        2075         275
+         276         277        2077
+        2077        2076         276
+         277         278        2078
+        2078        2077         277
+         278         560        2079
+        2079        2078         278
+         279         918        2081
+        2081        2080         279
+        2082        1288         279
+         279        2080        2082
+        2081         918         280
+         280        2060        2081
+        2084         286         281
+         281        2083        2084
+         281         927        2085
+        2085        2083         281
+         282         283        2087
+        2087        2086         282
+        2088        1389         282
+         282        2086        2088
+         283         653        2089
+        2089        2087         283
+         284         285        2091
+        2091        2090         284
+        2092         711         284
+         284        2090        2092
+         285         683        2093
+        2093        2091         285
+        2094         561         286
+         286        2084        2094
+        2096         302         287
+         287        2095        2096
+         287         515        2097
+        2097        2095         287
+         288         289        2099
+        2099        2098         288
+        2097         515         288
+         288        2098        2097
+         289         290        2100
+        2100        2099         289
+         290         291        2101
+        2101        2100         290
+         291        1072        2102
+        2102        2101         291
+        2102        1072         292
+         292        2103        2102
+         292         293        2104
+        2104        2103         292
+         293         294        2105
+        2105        2104         293
+         294         295        2106
+        2106        2105         294
+         295         885        2107
+        2107        2106         295
+         296         297        2109
+        2109        2108         296
+        2110        1346         296
+         296        2108        2110
+         297         298        2111
+        2111        2109         297
+         298         516        2112
+        2112        2111         298
+         299         966        2114
+        2114        2113         299
+        2112         516         299
+         299        2113        2112
+         300         636        2116
+        2116        2115         300
+        2114         966         300
+         300        2115        2114
+         301         800        2118
+        2118        2117         301
+        2116         636         301
+         301        2117        2116
+        2119         563         302
+         302        2096        2119
+        2121         325         303
+         303        2120        2121
+         303        1042        2122
+        2122        2120         303
+         304         305        2124
+        2124        2123         304
+        2122        1042         304
+         304        2123        2122
+         305         306        2125
+        2125        2124         305
+         306        1377        2126
+        2126        2125         306
+         307         308        2128
+        2128        2127         307
+        2129         968         307
+         307        2127        2129
+         308         309        2130
+        2130        2128         308
+         309         310        2131
+        2131        2130         309
+         310         311        2132
+        2132        2131         310
+         311         921        2133
+        2133        2132         311
+         312         313        2135
+        2135        2134         312
+        2133         921         312
+         312        2134        2133
+         313         314        2136
+        2136        2135         313
+         314         315        2137
+        2137        2136         314
+         315         316        2138
+        2138        2137         315
+         316        1381        2139
+        2139        2138         316
+         317         585        2141
+        2141        2140         317
+        2142         944         317
+         317        2140        2142
+        2144         586         318
+         318        2143        2144
+         318         319        2145
+        2145        2143         318
+         319         520        2146
+        2146        2145         319
+         320         321        2148
+        2148        2147         320
+        2149         601         320
+         320        2147        2149
+         321         322        2150
+        2150        2148         321
+         322        1177        2151
+        2151        2150         322
+         323        1238        2153
+        2153        2152         323
+        2154         886         323
+         323        2152        2154
+         324         325        2121
+        2121        2155         324
+        2156         747         324
+         324        2155        2156
+        2158         979         326
+         326        2157        2158
+         326         978        2159
+        2159        2157         326
+         327         659        2161
+        2161        2160         327
+        2159         978         327
+         327        2160        2159
+        2163         663         328
+         328        2162        2163
+         328        1241        2164
+        2164        2162         328
+        2166         750         329
+         329        2165        2166
+         329         521        2167
+        2167        2165         329
+         330         331        2169
+        2169        2168         330
+        2167         521         330
+         330        2168        2167
+         331         332        2170
+        2170        2169         331
+         332         333        2171
+        2171        2170         332
+         333         748        2172
+        2172        2171         333
+         334        1342        2174
+        2174        2173         334
+        2175         337         334
+         334        2173        2175
+         335         632        2177
+        2177        2176         335
+        2174        1342         335
+         335        2176        2174
+         336         337        2175
+        2175        2178         336
+        2177         632         336
+         336        2178        2177
+        2180         522         338
+         338        2179        2180
+         338         339        2181
+        2181        2179         338
+         339         340        2182
+        2182        2181         339
+         340         341        2183
+        2183        2182         340
+         341         522        2180
+        2180        2183         341
+        2185         345         342
+         342        2184        2185
+         342         343        2186
+        2186        2184         342
+         343         344        2187
+        2187        2186         343
+         344         345        2185
+        2185        2187         344
+         346         523        2189
+        2189        2188         346
+        2190        1576         346
+         346        2188        2190
+         347         348        2192
+        2192        2191         347
+        2189         523         347
+         347        2191        2189
+         348         349        2193
+        2193        2192         348
+         349        1576        2190
+        2190        2193         349
+        2195         353         350
+         350        2194        2195
+         350         351        2196
+        2196        2194         350
+         351         352        2197
+        2197        2196         351
+         352         353        2195
+        2195        2197         352
+        2199         357         354
+         354        2198        2199
+         354         715        2200
+        2200        2198         354
+         355         356        2202
+        2202        2201         355
+        2203        1396         355
+         355        2201        2203
+         356        1395        2204
+        2204        2202         356
+        2205         707         357
+         357        2199        2205
+        2207         361         358
+         358        2206        2207
+         358         763        2208
+        2208        2206         358
+        2210        1344         359
+         359        2209        2210
+         359         639        2211
+        2211        2209         359
+         360         844        2213
+        2213        2212         360
+        2214         643         360
+         360        2212        2214
+        2215         762         361
+         361        2207        2215
+         362        1236        2217
+        2217        2216         362
+        2218        1279         362
+         362        2216        2218
+         363        1431        2220
+        2220        2219         363
+        2221        1075         363
+         363        2219        2221
+        2220        1431         364
+         364        2222        2220
+         364         640        2223
+        2223        2222         364
+        2225         656         365
+         365        2224        2225
+         365        1279        2218
+        2218        2224         365
+         366        1289        2227
+        2227        2226         366
+        2228        1479         366
+         366        2226        2228
+         367         525        2230
+        2230        2229         367
+        2227        1289         367
+         367        2229        2227
+        2232        1009         368
+         368        2231        2232
+         368         369        2233
+        2233        2231         368
+         369         370        2234
+        2234        2233         369
+         370        1479        2228
+        2228        2234         370
+         371        1496        2236
+        2236        2235         371
+        2237        1592         371
+         371        2235        2237
+        2236        1496         372
+         372        2238        2236
+         372         666        2239
+        2239        2238         372
+        2241         664         373
+         373        2240        2241
+         373         374        2242
+        2242        2240         373
+         374        1585        2243
+        2243        2242         374
+        2245         378         375
+         375        2244        2245
+         375         376        2246
+        2246        2244         375
+         376         377        2247
+        2247        2246         376
+         377         378        2245
+        2245        2247         377
+        2249        1167         379
+         379        2248        2249
+         379         380        2250
+        2250        2248         379
+         380         953        2251
+        2251        2250         380
+         381         954        2253
+        2253        2252         381
+        2251         953         381
+         381        2252        2251
+         382         383        2255
+        2255        2254         382
+        2256        1579         382
+         382        2254        2256
+         383         526        2257
+        2257        2255         383
+        2257         526         384
+         384        2258        2257
+         384         385        2259
+        2259        2258         384
+         385         567        2260
+        2260        2259         385
+         386         387        2262
+        2262        2261         386
+        2263         568         386
+         386        2261        2263
+         387         388        2264
+        2264        2262         387
+         388        1000        2265
+        2265        2264         388
+         389         390        2267
+        2267        2266         389
+        2265        1000         389
+         389        2266        2265
+         390         391        2268
+        2268        2267         390
+         391         392        2269
+        2269        2268         391
+         392        1372        2270
+        2270        2269         392
+         393         394        2272
+        2272        2271         393
+        2270        1372         393
+         393        2271        2270
+         394         395        2273
+        2273        2272         394
+         395         396        2274
+        2274        2273         395
+         396         569        2275
+        2275        2274         396
+        2277         571         397
+         397        2276        2277
+         397        1272        2278
+        2278        2276         397
+         398        1332        2280
+        2280        2279         398
+        2278        1272         398
+         398        2279        2278
+        2282         529         399
+         399        2281        2282
+         399         741        2283
+        2283        2281         399
+         400         609        2285
+        2285        2284         400
+        2286        1055         400
+         400        2284        2286
+        2288         404         401
+         401        2287        2288
+         401         402        2289
+        2289        2287         401
+         402         403        2290
+        2290        2289         402
+         403         404        2288
+        2288        2290         403
+        2292         409         405
+         405        2291        2292
+         405         406        2293
+        2293        2291         405
+         406         407        2294
+        2294        2293         406
+         407         408        2295
+        2295        2294         407
+         408         531        2296
+        2296        2295         408
+        2296         531         409
+         409        2292        2296
+         410         411        2298
+        2298        2297         410
+        2299        1184         410
+         410        2297        2299
+         411        1175        2300
+        2300        2298         411
+         412         761        2302
+        2302        2301         412
+        2303         878         412
+         412        2301        2303
+        2305        1053         413
+         413        2304        2305
+         413         605        2306
+        2306        2304         413
+         414         415        2308
+        2308        2307         414
+        2309        1486         414
+         414        2307        2309
+         415         416        2310
+        2310        2308         415
+         416         417        2311
+        2311        2310         416
+         417         418        2312
+        2312        2311         417
+         418         419        2313
+        2313        2312         418
+         419         881        2314
+        2314        2313         419
+         420         421        2316
+        2316        2315         420
+        2314         881         420
+         420        2315        2314
+         421        1038        2317
+        2317        2316         421
+         422         423        2319
+        2319        2318         422
+        2317        1038         422
+         422        2318        2317
+         423         424        2320
+        2320        2319         423
+         424        1323        2321
+        2321        2320         424
+        2321        1323         425
+         425        2322        2321
+         425         795        2323
+        2323        2322         425
+         426         799        2325
+        2325        2324         426
+        2326         536         426
+         426        2324        2326
+         427         533        2328
+        2328        2327         427
+        2325         799         427
+         427        2327        2325
+         428         534        2330
+        2330        2329         428
+        2331        1235         428
+         428        2329        2331
+         429         975        2333
+        2333        2332         429
+        2334         593         429
+         429        2332        2334
+         430         431        2336
+        2336        2335         430
+        2333         975         430
+         430        2335        2333
+         431         976        2337
+        2337        2336         431
+        2337         976         432
+         432        2338        2337
+         432         535        2339
+        2339        2338         432
+        2339         535         433
+         433        2340        2339
+         433         434        2341
+        2341        2340         433
+         434        1421        2342
+        2342        2341         434
+        2342        1421         435
+         435        2343        2342
+         435        1424        2344
+        2344        2343         435
+         436         437        2346
+        2346        2345         436
+        2347        1271         436
+         436        2345        2347
+         437         438        2348
+        2348        2346         437
+         438         439        2349
+        2349        2348         438
+         439         440        2350
+        2350        2349         439
+         440         441        2351
+        2351        2350         440
+         441        1572        2352
+        2352        2351         441
+         442         443        2354
+        2354        2353         442
+        2352        1572         442
+         442        2353        2352
+         443         444        2355
+        2355        2354         443
+         444         537        2356
+        2356        2355         444
+        2358         575         445
+         445        2357        2358
+         445        1013        2359
+        2359        2357         445
+         446         447        2361
+        2361        2360         446
+        2359        1013         446
+         446        2360        2359
+         447         448        2362
+        2362        2361         447
+         448        1445        2363
+        2363        2362         448
+        2365        1201         449
+         449        2364        2365
+         449        1553        2366
+        2366        2364         449
+        2366        1553         450
+         450        2367        2366
+         450        1271        2347
+        2347        2367         450
+         451         621        2369
+        2369        2368         451
+        2370        1205         451
+         451        2368        2370
+        2372         649         452
+         452        2371        2372
+         452        1455        2373
+        2373        2371         452
+        2375         540         453
+         453        2374        2375
+         453        1014        2376
+        2376        2374         453
+         454        1205        2370
+        2370        2377         454
+        2378        1204         454
+         454        2377        2378
+         455         456        2380
+        2380        2379         455
+        2381        1104         455
+         455        2379        2381
+         456        1453        2382
+        2382        2380         456
+         457         594        2384
+        2384        2383         457
+        2385         967         457
+         457        2383        2385
+         458         914        2387
+        2387        2386         458
+        2388         596         458
+         458        2386        2388
+        2390        1442         459
+         459        2389        2390
+         459         919        2391
+        2391        2389         459
+        2393        1441         460
+         460        2392        2393
+         460         461        2394
+        2394        2392         460
+         461        1160        2395
+        2395        2394         461
+         462         543        2397
+        2397        2396         462
+        2398        1112         462
+         462        2396        2398
+         463         801        2400
+        2400        2399         463
+        2401         981         463
+         463        2399        2401
+        2403         980         464
+         464        2402        2403
+         464         465        2404
+        2404        2402         464
+         465        1135        2405
+        2405        2404         465
+         466         625        2407
+        2407        2406         466
+        2408         746         466
+         466        2406        2408
+         467         468        2410
+        2410        2409         467
+        2411         473         467
+         467        2409        2411
+         468        1574        2412
+        2412        2410         468
+        2412        1574         469
+         469        2413        2412
+         469         470        2414
+        2414        2413         469
+         470         471        2415
+        2415        2414         470
+         471         472        2416
+        2416        2415         471
+         472         473        2411
+        2411        2416         472
+         480         548        1632
+        1632        1631         480
+        1667        1566         482
+         482        1670        1667
+        1710         549         483
+         483        2417        1710
+         483         680        1712
+        1712        2417         483
+        1714        1330         484
+         484        1708        1714
+        1717        1108         485
+         485        1720        1717
+        1732         678         487
+         487        2418        1732
+         487         550        1736
+        1736        2418         487
+         489         551        1764
+        1764        1769         489
+         491         552        2419
+        2419        1787         491
+        1794        1060         492
+         492        1797        1794
+         493        1491        1828
+        1828        1825         493
+         494         726        2421
+        2421        2420         494
+        1857         553         494
+         494        2420        1857
+        2423        1427         495
+         495        2422        2423
+         495        1430        1882
+        1882        2422         495
+        2425        1466         496
+         496        2424        2425
+         496         555        2426
+        2426        2424         496
+        1908        1061         499
+         499        1911        1908
+        2428         556         500
+         500        2427        2428
+         500         677        1922
+        1922        2427         500
+        2430         802         501
+         501        2429        2430
+         501        1230        1939
+        1939        2429         501
+         502         887        2432
+        2432        2431         502
+        2433         897         502
+         502        2431        2433
+        1975         803         504
+         504        1963        1975
+         508         684        2046
+        2046        2434         508
+        2435         598         508
+         508        2434        2435
+         511         559        2071
+        2071        2436         511
+        2437         558         511
+         511        2436        2437
+         513         614        2439
+        2439        2438         513
+        2079         560         513
+         513        2438        2079
+        2441         693         514
+         514        2440        2441
+         514         584        2442
+        2442        2440         514
+        2118         800         517
+         517        2443        2118
+         517         563        2119
+        2119        2443         517
+        2445         564         518
+         518        2444        2445
+         518         968        2129
+        2129        2444         518
+        2447         692         519
+         519        2446        2447
+         519         687        2448
+        2448        2446         519
+         520         566        2449
+        2449        2146         520
+        2204        1395         524
+         524        2450        2204
+         524         707        2205
+        2205        2450         524
+         525        1009        2232
+        2232        2230         525
+        2452        1614         527
+         527        2451        2452
+         527         568        2263
+        2263        2451         527
+         528         794        2454
+        2454        2453         528
+        2275         569         528
+         528        2453        2275
+        2280        1332         529
+         529        2282        2280
+        2456         672         530
+         530        2455        2456
+         530         675        2457
+        2457        2455         530
+         532         679        2459
+        2459        2458         532
+        2460         699         532
+         532        2458        2460
+         533        1235        2331
+        2331        2328         533
+         534         574        2461
+        2461        2330         534
+        2462        1422         536
+         536        2326        2462
+         537         575        2358
+        2358        2356         537
+         538        1201        2365
+        2365        2463         538
+        2363        1445         538
+         538        2463        2363
+         539         713        2465
+        2465        2464         539
+        2466         622         539
+         539        2464        2466
+        2467         578         540
+         540        2375        2467
+         541         595        2469
+        2469        2468         541
+        2470         719         541
+         541        2468        2470
+         542        1112        2398
+        2398        2471         542
+        2472         841         542
+         542        2471        2472
+         543         981        2401
+        2401        2397         543
+         552         736        2473
+        2473        2419         552
+         554        1427        2423
+        2423        2474         554
+        2475         607         554
+         554        2474        2475
+         555         581        1888
+        1888        2426         555
+        1919        1110         556
+         556        2428        1919
+         557         582        2476
+        2476        2044         557
+        2477         583         558
+         558        2437        2477
+        2442         584         561
+         561        2094        2442
+        2479         668         562
+         562        2478        2479
+         562         691        2480
+        2480        2478         562
+        2126        1377         564
+         564        2445        2126
+        2448         687         565
+         565        2481        2448
+         565         586        2144
+        2144        2481         565
+         566         587        2482
+        2482        2449         566
+         567        1614        2452
+        2452        2260         567
+        2484         702         570
+         570        2483        2484
+         570         608        2485
+        2485        2483         570
+        2486         590         571
+         571        2277        2486
+        2488         671         572
+         572        2487        2488
+         572         698        2489
+        2489        2487         572
+        2491         606         573
+         573        2490        2491
+         573        1486        2309
+        2309        2490         573
+         574         593        2334
+        2334        2461         574
+        2384         594         576
+         576        2492        2384
+         576         669        2493
+        2493        2492         576
+        2369         621         577
+         577        2494        2369
+         577         622        2466
+        2466        2494         577
+        2373        1455         578
+         578        2467        2373
+         579         596        2388
+        2388        2495         579
+        2469         595         579
+         579        2495        2469
+        2497         697         580
+         580        2496        2497
+         580         676        2498
+        2498        2496         580
+         582         598        2435
+        2435        2476         582
+        2068         599         583
+         583        2477        2068
+         585         668        2479
+        2479        2141         585
+         587         601        2149
+        2149        2482         587
+        2500         685         588
+         588        2499        2500
+         588         701        2501
+        2501        2499         588
+        2503         600         589
+         589        2502        2503
+         589         603        2504
+        2504        2502         589
+        2505        1536         590
+         590        2486        2505
+        2306         605         591
+         591        2506        2306
+         591         671        2488
+        2488        2506         591
+        2459         679         592
+         592        2507        2459
+         592         606        2491
+        2491        2507         592
+         597         607        2475
+        2475        2508         597
+        2498         676         597
+         597        2508        2498
+        2509        1495         600
+         600        2503        2509
+        2285         609         602
+         602        2510        2285
+         602         685        2500
+        2500        2510         602
+         603         612        2511
+        2511        2504         603
+        2513        1532         604
+         604        2512        2513
+         604        1536        2505
+        2505        2512         604
+         608        1495        2509
+        2509        2485         608
+         610         672        2456
+        2456        2514         610
+        2511         612         610
+         610        2514        2511
+         611        1532        2513
+        2513        2515         611
+        2457         675         611
+         611        2515        2457
+        2517         706         613
+         613        2516        2517
+         613         708        2518
+        2518        2516         613
+         614        1288        2082
+        2082        2439         614
+         616        1008        2520
+        2520        2519         616
+        2521        1276         616
+         616        2519        2521
+         617         655        2523
+        2523        2522         617
+        2223         640         617
+         617        2522        2223
+         618         654        2525
+        2525        2524         618
+        2526         704         618
+         618        2524        2526
+         619         643        2214
+        2214        2527         619
+        2211         639         619
+         619        2527        2211
+        2039        1207         620
+         620        2041        2039
+         623         644        1663
+        1663        1674         623
+         625        1104        2381
+        2381        2407         625
+         626        1204        2378
+        2378        2528         626
+        2376        1014         626
+         626        2528        2376
+         628         645        2038
+        2038        2036         628
+         629         646        1929
+        1929        1927         629
+         630         757        2529
+        2529        1910         630
+         631        1396        2203
+        2203        2530         631
+        2200         715         631
+         631        2530        2200
+        2465         713         633
+         633        2531        2465
+         633         649        2372
+        2372        2531         633
+        2533         661         634
+         634        2532        2533
+         634         705        2534
+        2534        2532         634
+         635         658        2536
+        2536        2535         635
+        2537         712         635
+         635        2535        2537
+        2539         665         637
+         637        2538        2539
+         637         714        2540
+        2540        2538         637
+         638         711        2092
+        2092        2541         638
+        2089         653         638
+         638        2541        2089
+         641         706        2517
+        2517        2542         641
+        2523         655         641
+         641        2542        2523
+        2525         654         642
+         642        2543        2525
+         642         656        2225
+        2225        2543         642
+        2545         710         647
+         647        2544        2545
+         647         712        2537
+        2537        2544         647
+        2161         659         648
+         648        2546        2161
+         648         661        2533
+        2533        2546         648
+         650         663        2163
+        2163        2547         650
+        2548         667         650
+         650        2547        2548
+        2536         658         651
+         651        2549        2536
+         651         664        2241
+        2241        2549         651
+        1843         657         652
+         652        2550        1843
+         652         665        2539
+        2539        2550         652
+        2239         666         660
+         660        2551        2239
+         660         710        2545
+        2545        2551         660
+         662         667        2548
+        2548        2552         662
+        2534         705         662
+         662        2552        2534
+         669         719        2470
+        2470        2493         669
+        2554         718         670
+         670        2553        2554
+         670         696        2555
+        2555        2553         670
+         673         692        2447
+        2447        2556         673
+        2480         691         673
+         673        2556        2480
+        2217        1236         674
+         674        2557        2217
+         674        1276        2521
+        2521        2557         674
+        2559        1588         681
+         681        2558        2559
+         681        1590        2560
+        2560        2558         681
+        2520        1008         682
+         682        2561        2520
+         682        1075        2221
+        2221        2561         682
+         683         693        2441
+        2441        2093         683
+        2563         717         686
+         686        2562        2563
+         686         700        2564
+        2564        2562         686
+        1879         716         688
+         688        2565        1879
+         688         697        2497
+        2497        2565         688
+        2489         698         689
+         689        2566        2489
+         689         718        2554
+        2554        2566         689
+         690         699        2460
+        2460        2567         690
+        2555         696         690
+         690        2567        2555
+        2501         701         694
+         694        2568        2501
+         694         717        2563
+        2563        2568         694
+        2564         700         695
+         695        2569        2564
+         695         702        2484
+        2484        2569         695
+        2518         708         703
+         703        2570        2518
+         703         704        2526
+        2526        2570         703
+        2540         714         709
+         709        1846        2540
+         726         831        2571
+        2571        2421         726
+         727        1277        1865
+        1865        2572         727
+        2573         833         727
+         727        2572        2573
+         728        1129        1810
+        1810        2574         728
+        1822        1113         728
+         728        2574        1822
+         730         767        2575
+        2575        1722         730
+        2576         768         731
+         731        1729        2576
+         733         770        2577
+        2577        1889         733
+        2578         810         734
+         734        1793        2578
+        2579         771         735
+         735        1877        2579
+         736         835        2580
+        2580        2473         736
+        2581         772         737
+         737        1745        2581
+         738         773        2582
+        2582        1635         738
+         741         776        2583
+        2583        2283         741
+        2023         977         743
+         743        2024        2023
+        2584         837         746
+         746        2408        2584
+        2153        1238         747
+         747        2156        2153
+         748         979        2158
+        2158        2172         748
+        2164        1241         750
+         750        2166        2164
+         752        1114        1918
+        1918        2585         752
+        2586         838         752
+         752        2585        2586
+         755         896        2587
+        2587        1687         755
+         757         840        2588
+        2588        2529         757
+        2590         783         759
+         759        2589        2590
+         759         841        2472
+        2472        2589         759
+         760         842        2591
+        2591        1876         760
+         761         843        2592
+        2592        2302         761
+        2213         844         762
+         762        2215        2213
+         763        1344        2210
+        2210        2208         763
+         767         845        2593
+        2593        2575         767
+        2594         846         768
+         768        2576        2594
+         770         847        2595
+        2595        2577         770
+        2596         786         771
+         771        2579        2596
+        2597         849         772
+         772        2581        2597
+         773         850        2598
+        2598        2582         773
+         776         851        2599
+        2599        2583         776
+        2600         854         783
+         783        2590        2600
+        2601         856         786
+         786        2596        2601
+         794         863        2602
+        2602        2454         794
+         795         930        2603
+        2603        2323         795
+        2604         933         797
+         797        1642        2604
+         798         936        2605
+        2605        1738         798
+         801         980        2403
+        2403        2400         801
+        1936         985         802
+         802        2430        1936
+        2606         864         804
+         804        1693        2606
+        1847        1098         806
+         806        1839        1847
+        1791        1117         810
+         810        2578        1791
+        2139        1381         814
+         814        2607        2139
+         814         944        2142
+        2142        2607         814
+         826        1121        1821
+        1821        1818         826
+        1777        1122         827
+         827        1780        1777
+         831        1125        1861
+        1861        2571         831
+        1862        1128         833
+         833        2573        1862
+         835        1133        1789
+        1789        2580         835
+        2405        1135         837
+         837        2584        2405
+        1915        1138         838
+         838        2586        1915
+         840        1141        1914
+        1914        2588         840
+         842        1099        1880
+        1880        2591         842
+         843        1053        2305
+        2305        2592         843
+         845        1144        1725
+        1725        2593         845
+        1726        1147         846
+         846        2594        1726
+         847        1150        1872
+        1872        2595         847
+        1742        1153         849
+         849        2597        1742
+         850        1157        1638
+        1638        2598         850
+         851        1055        2286
+        2286        2599         851
+        2395        1160         854
+         854        2600        2395
+        1874        1163         856
+         856        2601        1874
+         863        1167        2249
+        2249        2602         863
+        1691        1170         864
+         864        2606        1691
+        2047        1278         867
+         867        2050        2047
+        2300        1175         878
+         878        2303        2300
+         885        1346        2110
+        2110        2107         885
+        2151        1177         886
+         886        2154        2151
+         887        1338        1952
+        1952        2432         887
+         889        1383        1971
+        1971        2608         889
+        1968        1248         889
+         889        2608        1968
+        1684        1282         890
+         890        1686        1684
+         896        1178        1689
+        1689        2587         896
+        1950        1531         897
+         897        2433        1950
+         904        1058        1844
+        1844        1841         904
+         914         999        2609
+        2609        2387         914
+         919        1441        2393
+        2393        2391         919
+        1700        1181         923
+         923        1702        1700
+         927        1389        2088
+        2088        2085         927
+         930        1184        2299
+        2299        2603         930
+        1639        1185         933
+         933        2604        1639
+         936        1187        1741
+        1741        2605         936
+         954        1579        2256
+        2256        2253         954
+         958         963        2610
+        2610        1802         958
+        1806         961         959
+         959        2611        1806
+         959         960        1807
+        1807        2611         959
+        2610         963         962
+         962        1805        2610
+        2382        1453         967
+         967        2385        2382
+        1921        1296         969
+         969        1924        1921
+         970        1581        1759
+        1759        1757         970
+         999        1442        2390
+        2390        2609         999
+        2243        1585        1015
+        1015        2612        2243
+        1015        1588        2559
+        2559        2612        1015
+        2560        1590        1017
+        1017        2613        2560
+        1017        1592        2237
+        2237        2613        1017
+        1047        1466        2425
+        2425        1886        1047
+        1154        1399        1634
+        1634        1655        1154
+        1868        1314        1199
+        1199        1870        1868
+        1325        1326        1858
+        1858        1855        1325
+        1334        1335        1958
+        1958        1956        1334
+        1959        1337        1336
+        1336        1961        1959
+        2344        1424        1422
+        1422        2462        2344
+        1451        1487        1991
+        1991        1988        1451
+           1         720        3333
+        3333        2614           1
+        3691        1078           1
+           1        2614        3691
+           2        1560        4173
+        4173        2615           2
+        3362         749           2
+           2        2615        3362
+           3        1019        3632
+        3632        2616           3
+        3963        1350           3
+           3        2616        3963
+           4        1251        3864
+        3864        2617           4
+        3342         729           4
+           4        2617        3342
+        3357         744         474
+         474        3087        3357
+         474         721        3334
+        3334        3087         474
+        3632        1019         475
+         475        3088        3632
+         475         749        3362
+        3362        3088         475
+        3352         739         476
+         476        3089        3352
+         476         756        3369
+        3369        3089         476
+        3333         720         477
+         477        3090        3333
+         477         729        3342
+        3342        3090         477
+        4174        1561         544
+         544        3157        4174
+         544         744        3357
+        3357        3157         544
+        3334         721         545
+         545        3158        3334
+         545        1078        3691
+        3691        3158         545
+        3369         756         546
+         546        3159        3369
+         546        1350        3963
+        3963        3159         546
+        3864        1251         547
+         547        3160        3864
+         547         739        3352
+        3352        3160         547
+        1560        1561        4174
+        4174        4173        1560
+        4116        3530        2963
+        3018        3022        3672
+        3016        3017        3014
+        3664        2840        3371
+        3019        3018        3016
+        4207        3355        4208
+        3019        3934        3020
+        3016        3015        3019
+        3018        3144        3022
+        3014        3015        3016
+        4050        3672        3431
+        2966        3015        3014
+        2963        2965        2966
+        3015        2966        2965
+        2964        2965        2963
+        2966        3689        2963
+        4189        2959        3136
+        3934        3015        2965
+        3935        2959        2964
+        4189        2965        2964
+        3136        2960        2961
+        2962        2965        4189
+        3934        2962        2961
+        3935        2997        2959
+        3020        3934        3729
+        3692        3378        3158
+        3020        3144        3019
+        3009        3022        3144
+        3018        3019        3144
+        3141        3021        3729
+        3006        3008        3009
+        3565        3022        3009
+        3141        3407        3005
+        3008        3006        3007
+        3007        3004        3842
+        3985        3182        3141
+        4050        3017        3016
+        3985        3007        3006
+        2994        4065        3567
+        3729        3407        3141
+        2960        4193        2961
+        3566        4065        2994
+        3648        3566        2994
+        4192        3567        4193
+        3002        3004        3005
+        3004        3985        3005
+        3648        3001        3613
+        3004        3002        3003
+        3619        3969        3003
+        3001        3648        2994
+        3005        3407        3782
+        3000        3003        3613
+        3842        3008        3007
+        3729        3021        3020
+        3692        3690        4050
+        3567        3140        2994
+        3266        3197        2896
+        2898        2897        4115
+        3266        2896        2895
+        3296        3251        3324
+        3136        2997        3139
+        2960        3136        3139
+        3631        3251        3266
+        3139        2997        2998
+        2960        2996        2995
+        4115        2897        2998
+        3935        2998        2997
+        2998        4095        3180
+        3789        2752        4160
+        2836        2840        2841
+        2841        2837        2836
+        3714        2836        2837
+        2836        2839        2840
+        2837        3677        3975
+        2899        3540        3174
+        3306        3828        3127
+        4002        3540        4029
+        2899        2839        2894
+        3443        3697        3696
+        2840        2839        2899
+        3540        4002        3174
+        2839        3714        2838
+        2994        3181        3001
+        3828        3306        3296
+        2878        2893        3122
+        4227        4095        3140
+        3196        4217        3212
+        2882        2878        3122
+        2999        3000        3001
+        3181        2994        3140
+        2999        3531        2892
+        3000        2999        3619
+        3619        2999        2892
+        3846        2893        3847
+        3981        3140        4095
+        2878        3965        2893
+        2881        2883        2882
+        2878        2882        2883
+        3540        2894        3868
+        2881        3123        2880
+        3173        3124        3172
+        2879        3123        2882
+        3568        3125        2887
+        3126        3171        3124
+        3568        2887        2888
+        2888        2887        2886
+        2891        2888        2890
+        3541        3868        4165
+        2886        2889        2888
+        3212        2881        3679
+        2863        2862        3126
+        3123        2879        3696
+        3001        3000        3613
+        2887        2885        2886
+        3969        3620        2988
+        3437        4219        3689
+        2988        2990        2991
+        3022        3565        3672
+        2989        2990        2988
+        3004        3003        3969
+        3926        3561        3025
+        3492        3966        3561
+        3642        3303        3312
+        3553        3374        3025
+        3643        3808        3543
+        3374        3667        3456
+        3431        3468        3397
+        2989        2988        3620
+        3666        3931        3026
+        3292        3205        3898
+        3892        4090        3269
+        4154        2970        3493
+        2967        2970        4154
+        2954        3811        2949
+        3328        2950        3811
+        2967        2950        3328
+        2967        3328        2970
+        3553        3933        3667
+        3137        3621        3229
+        3026        3930        2978
+        3319        3303        3226
+        4155        4154        3545
+        4098        4046        4045
+        4099        3027        3028
+        3029        3028        3027
+        3186        3219        4098
+        3936        3029        3031
+        3543        4062        3408
+        4078        3038        3936
+        3030        3031        3029
+        3651        3036        3037
+        3027        3030        3029
+        3543        3797        4062
+        4045        3680        3030
+        2970        3328        3320
+        2976        4046        4044
+        2954        2953        2968
+        3680        2968        2953
+        3680        2969        2968
+        2970        3849        2975
+        3494        3033        3034
+        3494        3034        3037
+        3494        3032        3912
+        3032        3494        3031
+        3481        2955        3495
+        3032        3030        3680
+        3030        3032        3031
+        3912        3032        2953
+        3035        3652        2958
+        3268        3806        3230
+        3645        3553        3966
+        2952        2953        3135
+        4169        3901        3227
+        2862        3227        3126
+        3902        4171        4092
+        3120        2980        2862
+        2982        3622        2981
+        4026        3955        2947
+        3622        3870        2981
+        2861        2860        3870
+        3438        2981        3521
+        3622        4171        3138
+        4092        3409        3620
+        2859        3120        2862
+        3999        3998        3507
+        2862        2863        2859
+        2888        2889        2890
+        2858        2863        3610
+        2858        2859        2863
+        2890        3173        2891
+        3871        3610        3338
+        2859        2858        2860
+        3661        2832        3871
+        2835        4100        2834
+        3870        3622        2861
+        2860        3871        3870
+        2859        2860        3120
+        2886        3998        2889
+        4155        2983        4027
+        2862        3903        3227
+        3955        2948        3245
+        4027        2947        4155
+        2949        3135        2954
+        3693        2951        2948
+        3693        3805        2951
+        2951        3135        2948
+        2873        2872        2868
+        3653        2868        2872
+        3495        2953        2952
+        2981        4027        2982
+        2951        2952        3135
+        2867        3805        3899
+        3521        4087        3899
+        2864        4084        4086
+        2834        4100        2833
+        3346        3831        3608
+        3894        3893        4088
+        3438        3805        3693
+        2865        3297        3241
+        2868        3233        3170
+        4088        4085        2864
+        3121        2866        3258
+        3893        4114        3891
+        4083        3233        4084
+        3121        3297        3442
+        2833        2847        2834
+        2870        2871        3480
+        3955        4026        3693
+        3245        2949        2950
+        2885        3998        2886
+        3891        4114        3480
+        3969        2988        3842
+        3748        3876        3450
+        4064        4100        2835
+        2755        3937        2754
+        3677        2755        3975
+        2752        3937        2755
+        4226        4179        2650
+        4005        3604        3445
+        3937        2752        2753
+        4104        3106        4105
+        3937        2756        2754
+        3738        2759        2758
+        3975        2755        2754
+        2837        3975        3714
+        2757        2753        2739
+        3570        2747        2739
+        2745        3570        3106
+        2745        3106        4104
+        2739        4105        3106
+        2745        2744        2746
+        3829        3569        2731
+        3940        2744        3942
+        2746        2744        2743
+        3742        2731        3745
+        2746        3570        2745
+        2739        3166        2757
+        3942        2740        2741
+        3422        2884        2838
+        3995        4104        4105
+        3741        2758        2759
+        3107        2731        3339
+        3738        2758        3921
+        3107        2747        2731
+        3927        4093        3812
+        3744        3741        3446
+        3446        3741        4163
+        3813        2760        2761
+        3927        3813        2762
+        3125        2884        2763
+        3568        3172        2884
+        3890        3522        3340
+        3742        3745        4082
+        3743        3446        4163
+        3341        3742        4082
+        3917        3439        4218
+        3734        2738        2737
+        3941        2732        3829
+        4093        2762        3986
+        2761        3734        3439
+        3919        2773        2772
+        2762        2736        3986
+        3927        2762        4093
+        4218        4082        2734
+        2736        3813        3439
+        3569        3918        3745
+        3110        2775        2772
+        2763        2884        3422
+        2839        2838        4165
+        3983        2735        3917
+        3995        3497        2676
+        3995        2676        3097
+        3097        3942        2741
+        2676        3863        2677
+        2742        3943        3941
+        3940        2743        2744
+        3096        3097        3162
+        2682        2678        2654
+        2681        2679        3486
+        2679        3293        2678
+        3570        2746        3829
+        3236        2654        2678
+        2650        4178        2649
+        4178        2648        2647
+        3353        3352        3089
+        3429        3335        3678
+        4178        2677        2649
+        3513        3865        3863
+        2650        4179        4178
+        2647        2648        3257
+        4179        3095        2648
+        3944        3826        2654
+        3826        2682        2654
+        2648        3991        3257
+        2647        3257        3096
+        2653        2651        2652
+        2733        2732        2679
+        4225        3864        3160
+        2679        2678        3486
+        3098        3919        2681
+        3560        3489        3098
+        3380        3343        3826
+        3344        3099        3489
+        2687        3110        3722
+        3381        3344        3489
+        3923        3458        3757
+        3291        3240        3100
+        2681        3919        2733
+        3983        3917        2734
+        3757        2684        2683
+        3485        4007        3607
+        3607        3381        3761
+        3873        3602        3424
+        2651        3971        2652
+        2635        3681        2634
+        4010        3761        3459
+        3547        3410        3799
+        3771        3463        3386
+        2635        2634        2633
+        3869        3410        2633
+        4096        4016        3548
+        4007        2635        3607
+        2684        3760        2683
+        2633        3547        3344
+        3100        2686        3163
+        2681        2733        2679
+        3569        2732        3918
+        4031        2638        4033
+        4103        3880        3338
+        3789        3863        2676
+        3665        2751        2767
+        3345        3880        2775
+        3786        3210        4119
+        3601        3398        3382
+        4072        2749        3633
+        3310        3278        3193
+        3601        2775        3633
+        3250        3867        3518
+        2725        4072        3633
+        3601        3382        3345
+        4039        3671        4041
+        3633        2749        3418
+        2694        2774        3640
+        3640        2774        3110
+        2709        2774        2694
+        2710        4128        4127
+        2726        4181        2725
+        4072        3611        2749
+        4128        2710        2709
+        2725        2709        2726
+        4181        2723        2724
+        2775        2774        2709
+        2709        3633        2775
+        2709        2711        2726
+        3564        3399        3384
+        2775        3110        2774
+        2769        4043        3611
+        3346        3194        2771
+        3924        3763        3460
+        3517        2749        4041
+        3765        3763        2765
+        4030        2771        2778
+        3650        3803        3572
+        4080        4079        3109
+        3577        2783        2784
+        3168        3111        2778
+        3399        3555        3384
+        2727        2730        4182
+        3913        3576        3571
+        2729        3650        3574
+        2727        2723        3105
+        2727        2724        2723
+        2727        3573        2730
+        2724        2727        4182
+        3913        3673        3575
+        3574        3650        3572
+        3807        3609        3349
+        3577        2722        3634
+        2784        2770        3614
+        3673        3105        3731
+        3730        2720        3732
+        2726        3447        2723
+        2695        4157        4158
+        2766        3992        3661
+        3373        3974        3455
+        3165        3605        3104
+        2690        2689        2688
+        3163        3099        2688
+        3411        3549        3907
+        2690        3550        3411
+        3490        3350        3487
+        3769        3462        3385
+        3768        2630        4012
+        3766        2691        2692
+        3694        2693        3914
+        3800        2692        2691
+        3715        2710        4127
+        3550        3386        3351
+        3386        3772        3488
+        4014        2630        3351
+        2638        2637        3682
+        4031        2637        2638
+        4012        2630        4133
+        3770        2631        2632
+        4013        3914        2642
+        3767        4012        4133
+        2641        3684        4015
+        2640        2639        2641
+        4013        4015        3914
+        2640        4031        2639
+        3766        2692        4011
+        3873        3539        2626
+        3440        3976        4131
+        2690        2688        2685
+        3716        2711        3715
+        3609        3165        3349
+        3694        4131        3736
+        3735        3976        3440
+        2715        2717        2716
+        2713        3716        3715
+        3093        2628        2715
+        2716        3228        2715
+        2715        2718        2717
+        3735        3440        3920
+        2716        3605        3737
+        3487        2693        3694
+        2629        3796        3161
+        3161        2714        2629
+        3342        2617        3864
+        2627        3539        3698
+        2627        2646        2628
+        4015        4013        2641
+        2646        2719        3103
+        3104        2717        3103
+        2646        2627        2643
+        2646        2643        3094
+        3094        2719        2646
+        2718        2628        2646
+        2628        2718        2715
+        2619        4209        4117
+        2714        3228        3920
+        2711        2710        3715
+        2711        2709        2710
+        2643        2627        3698
+        2778        2771        3194
+        2688        2689        3163
+        3461        3608        3831
+        3698        3449        4209
+        3036        3936        3037
+        3788        3926        3491
+        3035        3987        3036
+        2957        3987        2958
+        2958        3987        3035
+        3651        3034        3033
+        2987        3277        2986
+        3222        3013        4047
+        3956        4113        3202
+        3248        3271        4201
+        3299        3330        3325
+        4200        4076        3629
+        3578        4077        4078
+        4111        4109        2984
+        2955        2957        2958
+        3036        3987        3578
+        2956        2957        2955
+        3495        2955        3652
+        2973        3457        3606
+        2971        2974        2957
+        2972        3957        4148
+        2971        2957        3958
+        4108        3221        2985
+        2957        2956        3184
+        3232        3256        3606
+        2871        2956        2955
+        3285        3256        3232
+        3481        2871        2955
+        3526        3389        3354
+        3804        4048        3013
+        3142        3412        3012
+        4149        4150        4146
+        3057        3046        3148
+        4051        3044        4052
+        3589        3588        3045
+        3046        3044        3148
+        3150        3045        3188
+        4037        4034        3048
+        3414        3616        3593
+        3039        3412        4052
+        3413        2914        3011
+        3146        3040        2914
+        2877        3010        2956
+        2956        3010        3184
+        3011        3945        3885
+        3039        3012        3412
+        3147        4070        3848
+        3045        3588        3042
+        3249        3146        2914
+        4107        3041        2913
+        3042        3206        3058
+        4052        4035        3149
+        3516        3412        4053
+        3130        3413        2875
+        3579        2912        4121
+        3299        3702        3330
+        3425        3355        4078
+        3885        3010        2877
+        4140        2849        2870
+        2871        2870        2874
+        3480        4114        2870
+        4114        2844        2842
+        2870        2849        2874
+        2874        3888        3887
+        2849        3883        2851
+        2874        2849        2851
+        2851        3888        2874
+        2877        2871        2874
+        2871        2877        2956
+        2849        4140        3989
+        2844        3988        2843
+        2843        2842        2844
+        2845        2846        2847
+        3988        3496        2846
+        2843        3988        3989
+        3893        2869        2865
+        3883        2853        2852
+        2848        3989        2845
+        4210        3719        2856
+        2852        3911        3883
+        3911        3356        2857
+        4211        2853        3989
+        3590        3356        3911
+        3719        2855        2856
+        3887        3886        2877
+        3637        2873        3442
+        3498        3959        3960
+        3886        3885        2877
+        2909        2911        2910
+        2905        3654        3685
+        3959        3498        3961
+        3129        2909        2912
+        2906        2907        2908
+        3498        2908        2907
+        3961        2919        2912
+        3960        3654        2908
+        3129        2912        3579
+        3413        3011        2876
+        3130        2875        2850
+        4106        2915        2902
+        2903        4106        2902
+        3176        2850        2857
+        2902        2904        2903
+        3176        3130        2850
+        2905        3685        2906
+        2903        3654        4106
+        2902        2901        2904
+        2904        2901        2921
+        3131        2906        3685
+        3654        2903        3685
+        2905        2906        2908
+        2924        2901        3128
+        2907        3131        3177
+        2874        3887        2877
+        3959        2909        2910
+        2815        2857        3618
+        4034        3046        3047
+        3036        3651        3035
+        3047        4021        4034
+        4186        4021        4185
+        4185        3053        3054
+        3057        3055        3047
+        4166        3884        3050
+        3508        4176        3641
+        3052        3049        3054
+        3884        3049        3050
+        3818        3067        3062
+        4166        3814        3062
+        3054        3049        4186
+        3050        3049        3051
+        3058        3188        3042
+        3056        3055        3057
+        4074        3188        3626
+        3626        3188        3058
+        3052        3053        3815
+        3054        3053        3052
+        4074        3059        3815
+        3051        3052        3815
+        3051        3049        3052
+        3150        3188        4074
+        3055        3056        4185
+        3626        3187        4107
+        3814        3624        3064
+        3046        3057        3047
+        3152        3326        3709
+        4167        3979        3520
+        4168        4038        3048
+        3717        3238        3153
+        4122        3523        3616
+        4018        3819        3817
+        3450        3359        3750
+        3077        3593        3078
+        3070        3916        4139
+        3748        3077        3078
+        3048        4038        4037
+        3750        3748        3450
+        3050        3051        3814
+        3282        3246        3326
+        3073        4054        3074
+        3192        3209        3529
+        3064        3071        3234
+        3624        3814        3151
+        4067        3596        3837
+        3837        3359        3238
+        3775        3467        3396
+        4066        3068        4101
+        3077        3617        3593
+        3239        4018        3817
+        3066        3153        3079
+        3524        3154        3208
+        3704        2943        3972
+        3818        3062        3814
+        4176        3508        3012
+        4137        3072        4135
+        2912        2919        4121
+        3060        3970        2938
+        2938        3970        2916
+        2917        2919        2918
+        3061        2938        4137
+        3060        2938        3061
+        3833        3587        3973
+        3360        2938        3852
+        4135        4059        4137
+        3970        3655        2916
+        3059        3060        4058
+        2916        3655        3833
+        2901        2924        2922
+        2920        2921        2922
+        3534        2923        2924
+        2922        2924        2923
+        2922        2923        4129
+        2921        2901        2922
+        2921        2920        3581
+        2921        3581        2904
+        2928        2927        2929
+        4129        2923        2927
+        3825        3286        3305
+        3718        2920        4129
+        3990        3177        3833
+        3128        2901        2902
+        2937        2938        3360
+        3177        3131        3833
+        2936        3851        3852
+        3361        4224        3392
+        2937        3360        3391
+        3705        2936        3852
+        2946        2945        3725
+        3391        3853        3465
+        2944        2945        3993
+        3392        4153        3967
+        3597        3595        4071
+        3703        4224        4161
+        3155        2946        3725
+        2933        2934        2935
+        3179        3878        3705
+        3705        3973        3133
+        2931        3199        2940
+        2939        3908        3394
+        3133        2932        4153
+        3199        2931        2932
+        3993        3592        2939
+        3076        4122        3616
+        3119        4049        2831
+        3263        3466        3700
+        3280        3700        3275
+        3179        4153        3473
+        3993        2943        2944
+        3286        3825        3304
+        3968        3594        3156
+        3499        2936        3878
+        3532        4136        4060
+        2923        3534        2927
+        3704        3474        3779
+        3147        3041        4107
+        3012        3526        3354
+        3305        3247        3132
+        2778        2776        2777
+        2792        4030        2777
+        4030        2778        2777
+        3111        2776        2778
+        2792        2793        3582
+        2792        4097        4030
+        2779        2780        3111
+        2793        2777        2776
+        3290        2791        3909
+        2792        2777        2793
+        2847        2848        2845
+        2793        2776        2780
+        2782        4159        2783
+        2780        2781        2782
+        4159        3660        2770
+        2779        2781        2780
+        3365        3727        3728
+        2793        2780        2782
+        2782        3482        3656
+        3751        2787        2788
+        4081        3727        3365
+        2784        2783        4159
+        3290        3909        3656
+        3754        3453        3756
+        4211        2848        4213
+        2728        2722        3614
+        2791        2794        4191
+        3618        3356        3590
+        3113        2795        3259
+        4212        4211        4213
+        2794        4112        3615
+        2814        3952        3948
+        2796        4162        4141
+        2796        3259        2795
+        2813        3841        3821
+        3618        3590        2855
+        2853        4210        2852
+        3169        3724        3723
+        3751        3877        3451
+        2790        4162        3723
+        3598        3370        3415
+        2798        2799        2800
+        2800        2797        2798
+        3752        3756        2799
+        3500        3951        3599
+        3952        2813        3947
+        2811        3951        4001
+        4223        3441        4141
+        3441        3980        3821
+        2798        2797        4141
+        2796        4112        3259
+        4004        3598        3415
+        3514        3395        3984
+        2794        3290        3242
+        4212        2854        4210
+        3415        3243        3114
+        4195        3623        4196
+        3448        3875        3746
+        3675        3623        2703
+        2704        4158        4157
+        3674        3577        2785
+        4164        2802        2786
+        2695        4158        3165
+        2702        4194        2703
+        4164        3830        2699
+        2703        3623        2702
+        3674        3112        4006
+        4196        4197        4177
+        2696        2719        2697
+        2698        3101        2645
+        2644        3094        2643
+        2618        2645        2644
+        2696        3101        4197
+        2645        2697        3094
+        2698        2699        2700
+        3830        2700        2699
+        2645        2618        2698
+        2698        2618        2803
+        2699        2698        2803
+        3101        2698        2700
+        3830        2701        3583
+        2619        2618        2644
+        3243        4006        3112
+        2719        2696        3104
+        4164        2699        3657
+        3114        3843        3844
+        3657        2699        2803
+        2805        2803        2618
+        2802        3657        2801
+        3510        3827        4143
+        4142        2625        2807
+        2804        2805        2806
+        2806        3827        2804
+        2803        2805        2804
+        3843        2786        2802
+        2805        2618        2625
+        2623        2625        2624
+        4142        2806        2805
+        2622        2624        3091
+        2624        2618        2619
+        2807        2625        2623
+        2624        2625        2618
+        2623        2809        2808
+        4144        3511        3510
+        2624        2622        2623
+        3092        2809        2623
+        2623        2622        3092
+        2807        2623        2808
+        2807        4143        4142
+        2619        3091        2624
+        2801        3844        3843
+        2802        4164        3657
+        3370        3755        3558
+        3486        2682        3343
+        2813        2812        3946
+        3109        4079        2779
+        2902        2915        3128
+        2915        2857        2815
+        3859        2926        2925
+        3858        2900        2915
+        2926        3859        2929
+        2929        2927        2926
+        3954        2817        2818
+        3501        3860        3859
+        3718        2928        4028
+        2925        3857        3859
+        2926        3534        2925
+        2659        3836        3686
+        3793        3562        3368
+        2814        2811        4000
+        2817        2819        2818
+        3997        3861        4020
+        3954        3117        2816
+        4020        3861        2819
+        3083        4187        3082
+        3997        3996        3502
+        3085        3080        3084
+        3080        4187        3083
+        3080        3081        4187
+        2659        4089        3836
+        3997        4020        3083
+        3084        4089        2659
+        3857        2925        2900
+        2900        3858        3857
+        2824        2831        2823
+        3854        3435        4049
+        2825        2831        2824
+        2824        2823        3116
+        3119        2825        2830
+        3699        3118        2829
+        2826        3845        2827
+        2825        2824        3845
+        2826        2829        3118
+        2830        4049        3119
+        3416        3116        2823
+        3116        2828        2827
+        2820        2822        2821
+        3502        3996        4170
+        3082        2708        2820
+        2822        2820        2708
+        2708        2828        2822
+        2818        2819        3861
+        2829        2826        2828
+        2828        3116        2822
+        2828        2707        2829
+        3699        2707        3452
+        2826        3118        3845
+        2708        2707        2828
+        2827        2828        2826
+        4188        3102        2708
+        2943        3704        2944
+        3861        3502        4170
+        3128        2900        3534
+        3237        3164        2706
+        3791        3509        3792
+        3657        2803        2804
+        2663        3791        2664
+        2808        2809        4144
+        2659        3686        3586
+        3836        2660        3686
+        3477        3785        3783
+        3503        3562        3895
+        3509        3791        3793
+        3836        3896        2660
+        3687        3896        3836
+        2663        2664        3783
+        2667        3707        3584
+        2666        3417        2665
+        3091        2620        3092
+        2621        3707        3600
+        2667        2666        2665
+        2665        3417        3600
+        3910        4022        2669
+        2666        2667        2668
+        2668        3932        3658
+        2670        3794        2669
+        3658        2666        2668
+        2668        2667        3584
+        3932        2668        3910
+        3428        3369        3906
+        3586        3686        2661
+        2810        2809        2621
+        3085        3086        3080
+        3585        3085        3084
+        2658        3081        3086
+        3086        3659        2658
+        2656        2657        2658
+        4188        3081        2658
+        2656        3816        3164
+        2658        2655        2656
+        3816        2705        3164
+        2658        3659        2655
+        3081        4188        4187
+        2674        3585        3586
+        2672        2674        2675
+        2659        3586        3585
+        2672        3536        2671
+        2672        2671        2673
+        2673        2674        2672
+        3932        2669        3794
+        3962        2706        2705
+        3506        3585        2673
+        3428        3708        3542
+        3164        2705        2706
+        3816        2656        2655
+        2674        2673        3585
+        3102        2657        2656
+        3542        3353        3089
+        3649        3367        4190
+        2659        3585        3084
+        3081        3080        3086
+        3600        3707        2665
+        2707        3237        4190
+        3897        3504        3366
+        2823        4049        3435
+        2619        4117        3091
+        4025        3707        2620
+        2846        2834        2847
+        4160        3664        3429
+        2943        3134        3972
+        4006        3243        3558
+        2622        3091        3092
+        2621        3092        2620
+        3092        2621        2809
+        3161        3796        3093
+        3228        3093        2715
+        2645        3094        2644
+        2719        3094        2697
+        3682        2636        3683
+        3095        2651        2653
+        3097        2676        3162
+        3096        3162        2647
+        3293        3943        3096
+        3942        3943        2742
+        3240        2680        4130
+        2773        3721        3722
+        2685        3099        3344
+        3099        2685        2688
+        3385        3350        3490
+        2687        2680        3291
+        2697        3101        2696
+        3101        2697        2645
+        2708        3102        2707
+        2658        2657        4188
+        3103        2717        2718
+        3103        2718        2646
+        3103        2719        3104
+        2695        3104        2696
+        3347        3673        3731
+        3571        2727        3913
+        2740        3995        2741
+        4104        3995        2740
+        3929        3522        3890
+        3107        3166        2747
+        3638        3193        3786
+        4040        3167        4039
+        3647        4080        2769
+        3660        3647        2770
+        2773        3110        2772
+        2680        2687        3722
+        3111        3109        2779
+        2776        3111        2780
+        2783        3577        4006
+        3872        3675        4228
+        3724        3656        3728
+        3113        3169        2795
+        4004        3599        2800
+        3754        2788        2787
+        2808        4143        2807
+        3509        3368        3792
+        3116        2821        2822
+        2824        3116        2827
+        3116        4170        2821
+        3427        3860        3982
+        3699        3874        2942
+        3118        2830        2825
+        4049        2823        2831
+        3119        2831        2825
+        2861        3120        2860
+        2980        3120        3138
+        3695        3195        3211
+        3121        3211        2866
+        2879        3122        3846
+        3122        2879        2882
+        3336        3324        3631
+        2882        3123        2881
+        3171        3126        3227
+        4029        3540        3868
+        3125        2763        2885
+        3125        2885        2887
+        2891        3173        3172
+        2890        2863        3173
+        3296        3512        3828
+        3266        3127        3197
+        2900        3128        2915
+        2924        3128        3534
+        3129        3579        2911
+        3129        2911        2909
+        3603        2910        2911
+        2876        2875        3413
+        3655        2918        3833
+        2906        3131        2907
+        3718        2927        2928
+        3276        2930        2941
+        3473        3200        3179
+        3179        3705        3133
+        3075        3968        3156
+        3134        2943        2939
+        2954        3135        2953
+        3245        3135        2949
+        2961        2962        4189
+        3136        2959        2997
+        3244        4009        3137
+        2969        4009        2968
+        3902        2980        4171
+        2861        3138        3120
+        2996        3139        3180
+        3139        2996        2960
+        2998        3180        3139
+        3122        2893        3846
+        3006        3182        3985
+        3144        3021        3182
+        4151        3184        3010
+        3011        2914        3945
+        3866        3515        3670
+        2973        3256        3223
+        3021        3144        3020
+        3141        3182        3021
+        3311        3302        3787
+        3269        3218        2978
+        3249        2913        3848
+        3041        3848        2913
+        3848        4053        3146
+        3626        4107        3059
+        3148        3589        3045
+        3057        3148        3150
+        3508        3426        3357
+        4035        4052        3046
+        3150        3056        3057
+        3045        3150        3148
+        3059        4058        3815
+        3071        3064        3624
+        4017        3234        3190
+        3235        3190        3192
+        3191        3153        4102
+        3717        3153        3191
+        3189        3916        3207
+        3207        3065        3262
+        3073        3074        3773
+        3853        3790        2934
+        3595        3405        3393
+        3617        3596        3594
+        3822        3066        3079
+        3377        3692        3691
+        2725        3633        2709
+        4179        4226        3095
+        3796        3539        2627
+        2714        3161        3228
+        2677        3162        2676
+        4178        2647        3162
+        2687        3640        3110
+        3099        3163        2686
+        3102        3164        3237
+        3164        3102        2656
+        3605        2716        2717
+        3165        3104        2695
+        2757        4132        3939
+        2747        3166        2739
+        3329        3638        3712
+        4039        3167        3220
+        4080        4152        3525
+        3168        3109        3111
+        2790        3723        2789
+        2795        3723        4162
+        3170        2873        2868
+        2867        3233        2868
+        4217        3196        3171
+        3196        3679        3171
+        2838        2884        4165
+        2888        2891        3568
+        3126        3173        2863
+        3173        3126        3124
+        4221        4120        3563
+        2894        3540        2899
+        3435        3552        3982
+        3263        3175        3281
+        2915        3176        2857
+        4106        3176        2915
+        2919        3990        2918
+        3498        2907        3961
+        3587        3300        4156
+        3247        3274        3132
+        2933        3823        3882
+        3790        3499        3878
+        3981        2879        3846
+        3567        4192        4227
+        3531        2999        3847
+        3181        2999        3001
+        3182        3006        3009
+        3182        3009        3144
+        3464        3389        3669
+        3215        2986        3277
+        4146        4145        3217
+        3376        2971        3958
+        3456        3676        3484
+        3284        3255        3267
+        3662        3219        3186
+        3688        2976        4044
+        3042        3588        3206
+        3058        3187        3626
+        4074        3815        3053
+        3042        3188        3045
+        3070        4139        4138
+        3262        3189        3207
+        3817        3067        3818
+        3209        3190        3234
+        4068        4102        3262
+        3191        4068        3068
+        3454        2946        3155
+        3152        3235        3208
+        3712        2767        3329
+        3327        3301        3329
+        4152        3194        3346
+        3194        3168        2778
+        2873        3695        3442
+        3170        3233        3820
+        2878        2883        3965
+        3679        3196        3212
+        3563        3512        3371
+        3197        3174        2896
+        3994        2928        2929
+        3276        3198        2930
+        4156        3300        3178
+        2940        3199        3272
+        2946        3454        4224
+        3200        3214        2935
+        3668        3222        3834
+        3264        3201        3298
+        3855        3183        4110
+        4113        2973        3216
+        3824        4145        4146
+        3958        3957        3376
+        3491        3025        3374
+        3269        3204        3218
+        3642        3145        3898
+        3230        3253        3292
+        3848        3041        3147
+        3206        3187        3058
+        3075        3725        2945
+        3207        3070        3065
+        3529        3396        3372
+        3208        3154        3152
+        3071        3527        3209
+        3209        3192        3190
+        3638        3301        3310
+        3265        3270        3289
+        3121        3442        3695
+        3211        3195        2866
+        3965        3531        2893
+        3212        2883        2881
+        3855        3315        3183
+        3221        4108        4110
+        3850        2934        2933
+        3214        2933        2935
+        3012        3354        3142
+        3215        3222        2986
+        4110        3213        3856
+        3457        2973        4113
+        3866        3223        3285
+        4145        3824        3224
+        3519        3420        3337
+        3218        3026        2978
+        3145        3292        3898
+        3219        3205        2977
+        3220        3167        4119
+        3220        3210        2750
+        3406        3400        3388
+        3221        3183        2985
+        3402        3401        3388
+        2986        3222        4047
+        3288        3224        3824
+        3223        3225        2973
+        3184        4151        3203
+        2972        3224        3252
+        4110        4108        3213
+        3225        3216        2973
+        3319        3713        3254
+        3268        3145        3312
+        2892        3901        4169
+        2883        3212        3965
+        3440        2714        3920
+        3093        3228        3161
+        3255        3269        4090
+        3849        2970        3320
+        3806        4044        3253
+        3205        3292        3253
+        4090        4091        3231
+        3316        3321        3331
+        3375        2971        3376
+        3232        3252        3143
+        3241        3258        4083
+        2866        3195        3820
+        3709        3239        4017
+        3209        3234        3071
+        3817        3818        4017
+        3208        3235        3192
+        2654        3236        3944
+        3293        3236        2678
+        4190        3452        2707
+        3237        2707        3102
+        3359        3079        3238
+        3238        3079        3153
+        3390        3358        3520
+        3818        3234        4017
+        3459        3381        3762
+        3240        2686        3100
+        4083        3820        3233
+        2869        3297        2865
+        4112        3441        3841
+        2791        3290        2794
+        2786        3243        3112
+        3243        2786        3114
+        2954        4009        3811
+        4008        3137        4009
+        2947        3955        2950
+        3245        2948        3135
+        3709        3235        3152
+        3152        3154        3326
+        3394        3134        2939
+        3178        3300        3261
+        4206        3630        4204
+        3273        3183        3315
+        3579        2913        3249
+        3146        3249        3848
+        3327        3322        3867
+        3310        3250        3278
+        3696        3981        3443
+        2897        2898        3324
+        4113        3956        3375
+        3288        3252        3224
+        3253        4044        2977
+        3253        2977        3205
+        4008        2969        3688
+        3312        3254        3268
+        3255        4090        3267
+        3185        3284        3267
+        3956        2974        3375
+        3143        3285        3232
+        3991        3236        3257
+        3096        3257        3293
+        3820        4083        3258
+        3121        3258        3297
+        3242        3259        4112
+        3259        3242        3113
+        3273        4205        3279
+        3323        3308        3313
+        3591        3272        3908
+        3261        3272        3178
+        4102        4075        3246
+        3262        3246        3189
+        3276        3466        3263
+        3263        3280        3175
+        3294        4201        4202
+        3264        3271        3201
+        3835        3671        3270
+        3210        3289        3270
+        3631        3324        3251
+        3266        3251        3127
+        3889        3320        3229
+        3267        3231        3185
+        3254        3806        3268
+        3268        3230        3145
+        3287        3849        3320
+        3269        3255        3204
+        3220        2750        4039
+        3270        2750        3210
+        3277        2987        4198
+        3307        3314        3248
+        3272        3591        2940
+        3178        3272        3199
+        3260        3294        4203
+        3273        3279        3183
+        3394        3908        3554
+        3132        3274        3300
+        3700        3280        3263
+        3304        3275        3286
+        3275        3700        4063
+        3276        3263        3198
+        3663        4077        4076
+        3215        3277        3298
+        3418        2749        3517
+        3278        3265        3193
+        3279        4109        2985
+        3279        2985        3183
+        4049        3363        3854
+        3175        3280        3304
+        3305        3636        3825
+        3281        3198        3263
+        3900        3154        3524
+        3282        3189        3246
+        3337        3491        3421
+        3311        3231        3317
+        3374        3484        3491
+        3284        3204        3255
+        3670        3515        3406
+        3285        3223        3256
+        3557        3552        2930
+        3318        3286        3275
+        3137        3229        3320
+        3317        3231        4091
+        3216        3225        3670
+        3288        3143        3252
+        3786        3483        3638
+        3289        3193        3265
+        3582        2793        2782
+        3290        3113        3242
+        3291        3832        2687
+        3240        3291        2680
+        3662        3420        3519
+        3292        3145        3230
+        3097        3096        3943
+        3236        3293        3257
+        3629        3578        3710
+        4201        3294        3248
+        3295        3621        3137
+        3713        3806        3254
+        3127        3828        4120
+        3296        3306        3251
+        3695        3211        3121
+        3241        3297        3258
+        3354        3389        3388
+        3264        3298        3277
+        3298        3834        3215
+        3307        3248        3330
+        3132        3636        3305
+        3261        3300        3274
+        2766        3373        3348
+        2751        3322        2767
+        3331        3639        3302
+        3317        3302        3311
+        4062        3797        3024
+        3303        3309        3226
+        3646        3281        3175
+        3275        3304        3280
+        3825        3646        3175
+        3305        3286        3247
+        3197        4120        3174
+        3306        3127        3251
+        4118        3556        3834
+        3271        3248        3314
+        3285        3143        3866
+        3260        3323        3313
+        3331        3802        3639
+        3226        3309        3321
+        3430        3373        3483
+        3310        3301        3250
+        3218        3676        3666
+        3311        3185        3231
+        3519        3642        3898
+        3312        3303        3254
+        3702        3635        3471
+        3313        3299        3260
+        3402        3464        3834
+        3314        3201        3271
+        4118        3307        3702
+        3315        3308        3273
+        3321        3316        4073
+        3283        3331        3321
+        3316        3317        4091
+        3317        3316        3302
+        3554        3908        4063
+        3318        3247        3286
+        4073        3226        3321
+        3319        3254        3303
+        3320        3244        3137
+        3287        3320        3889
+        3226        4073        3713
+        3283        3321        3309
+        3265        3278        3835
+        3329        3322        3327
+        3279        4205        4109
+        3323        3273        3308
+        2897        3336        2998
+        3296        3324        2898
+        3260        3325        3294
+        3325        3260        3299
+        3246        3709        3326
+        3332        3326        3154
+        3518        3835        3250
+        3327        3250        3301
+        3811        3244        3328
+        3328        3244        3320
+        3430        3348        3373
+        3329        2767        3322
+        3464        3402        3389
+        3325        3330        3248
+        3676        3204        3284
+        3331        3302        3316
+        4216        3900        3524
+        3332        3282        3326
+        3014        3690        3689
+        3565        3009        3008
+        3335        3333        3090
+        3691        2614        3333
+        2881        2880        3679
+        3336        2897        3324
+        3309        3802        3283
+        3802        3303        3642
+        2890        3610        2863
+        3661        3373        2766
+        3339        3740        3444
+        4005        3445        3422
+        3107        3604        4005
+        2761        2760        3890
+        2738        3726        2737
+        2738        2761        3890
+        3342        3865        3379
+        3335        3090        3379
+        3826        3759        3380
+        3380        3758        3560
+        3546        3798        3799
+        2775        3928        2772
+        3661        3871        3338
+        3765        4152        3383
+        4152        3168        3194
+        2722        3347        3634
+        3423        3347        3731
+        3555        4100        3992
+        2768        4043        2769
+        3478        3609        3731
+        3448        3349        3747
+        2691        3769        3810
+        3350        2642        2693
+        4133        4013        2642
+        3386        3550        2690
+        3682        3683        4033
+        4180        3424        3683
+        3424        3352        3353
+        3201        3314        4118
+        3142        3388        3387
+        3643        3408        3038
+        4175        4174        3157
+        3590        3911        2852
+        3618        3720        3535
+        3357        3087        3508
+        3358        3157        3426
+        4063        3247        3318
+        3076        3414        3617
+        3749        3822        3359
+        3774        3467        3839
+        3967        2940        3591
+        2945        2946        3993
+        3133        4153        3179
+        3436        3362        4173
+        3393        3367        3088
+        2942        3394        3363
+        3581        3718        3364
+        4156        3178        3199
+        3451        3753        3751
+        2789        3727        2790
+        3953        3858        2915
+        3858        3366        3954
+        3632        3088        3367
+        2829        2707        3699
+        3511        2662        3510
+        3368        3503        2662
+        3536        3794        3904
+        3353        4209        3449
+        3598        3756        3370
+        2841        2840        3664
+        3692        3377        4124
+        3524        3529        3372
+        3900        3332        3154
+        2767        4126        3665
+        4040        4042        4119
+        3931        3666        3456
+        3302        3639        3787
+        3376        3957        3606
+        2971        3375        2974
+        4148        4149        3217
+        3256        2973        3606
+        3014        3689        2966
+        3377        3333        3335
+        3378        3334        3158
+        3701        2991        2990
+        3863        3789        3513
+        3342        3379        3090
+        3098        2681        3486
+        3759        3458        3380
+        3458        3923        3758
+        3344        3607        2633
+        3398        4125        3432
+        3382        3661        3345
+        3525        3564        2768
+        3608        3924        3383
+        3608        3461        3555
+        3469        3399        3777
+        3769        3766        3462
+        4133        2630        4014
+        3351        3386        3488
+        3463        3838        3770
+        3387        3945        3142
+        3387        3885        3945
+        3354        3388        3142
+        3387        3388        3400
+        3526        3669        3389
+        3330        3702        3307
+        3627        4018        3239
+        4168        3063        4166
+        4056        3839        3074
+        3404        4224        3703
+        3823        3214        3200
+        3361        3392        3592
+        3362        3393        3088
+        3699        3452        3874
+        3274        3908        3261
+        3134        3394        2942
+        3949        3950        3984
+        2662        3503        3896
+        3775        3773        3467
+        3372        3396        3528
+        3397        3334        3378
+        3508        3087        4208
+        3665        4125        2751
+        3712        3638        3455
+        3555        3399        3778
+        3564        3777        3399
+        3866        3670        3223
+        3223        3670        3225
+        3313        3308        3635
+        3299        3635        3702
+        3389        3402        3388
+        3470        3401        3471
+        3822        3472        4019
+        3390        3403        3434
+        3882        3703        3391
+        3404        3703        3473
+        3779        3075        2945
+        3393        3874        3367
+        3856        3670        3406
+        3401        3406        3388
+        3977        2992        3780
+        3476        3780        3782
+        3643        3544        3808
+        4062        3029        3936
+        2983        3409        4092
+        3645        2990        2989
+        3546        3410        3869
+        3770        3838        2631
+        3549        3411        3879
+        2690        3907        2689
+        3412        3142        3040
+        3043        3044        4051
+        3654        2905        2908
+        2914        3433        3249
+        3748        3078        3876
+        4222        3594        3968
+        2812        3980        4094
+        3598        2800        2799
+        2941        2930        3552
+        3982        3860        3117
+        3417        3785        3477
+        3707        2667        2665
+        3835        3418        3517
+        3419        2748        3418
+        2748        3419        3601
+        3867        3250        3327
+        3337        3420        3024
+        4099        3028        3662
+        3787        3484        3676
+        3374        3553        3667
+        3975        2756        3422
+        3921        2758        3744
+        3730        3732        3423
+        3733        3730        3423
+        3684        4032        3602
+        3625        3160        3352
+        2987        4076        4199
+        3355        3526        3508
+        3157        3357        3426
+        3817        3819        3979
+        3557        2930        3198
+        3636        3587        3364
+        3905        3506        2673
+        3542        3089        3369
+        3677        3664        4160
+        4124        3377        4220
+        3348        3430        3384
+        3786        3289        3210
+        4050        3016        3672
+        3378        3431        3397
+        4125        3601        3419
+        3432        3665        4126
+        3413        3433        2914
+        3249        3603        2911
+        4123        4172        3390
+        3595        3436        4071
+        3435        3854        3552
+        3435        3416        2823
+        3436        4173        4175
+        3436        3393        3362
+        3437        4124        4220
+        3017        3690        3014
+        3805        3653        2952
+        4086        4084        2867
+        3917        2735        3439
+        3813        2761        3439
+        3737        3228        2716
+        3736        4131        3976
+        3598        4004        2800
+        3821        2812        2813
+        2871        3481        3480
+        2869        3891        4215
+        2880        3123        3696
+        3443        3981        4095
+        3740        3738        3444
+        3604        3921        3739
+        4005        3166        3107
+        3929        2763        3422
+        3921        3444        3738
+        3341        3340        3743
+        2726        3716        3447
+        3478        3105        2723
+        3448        3746        3807
+        2720        3746        3875
+        4209        2644        3698
+        3873        3424        3353
+        3750        3077        3748
+        3523        3472        3749
+        3365        3728        3753
+        4081        3365        3752
+        2830        3118        3699
+        2706        4190        3237
+        2788        3754        3756
+        3755        3753        3482
+        3524        3454        4216
+        3532        4054        4061
+        3712        4126        2767
+        3193        3289        3786
+        3484        3421        3491
+        3787        3185        3311
+        3606        3957        3252
+        3375        3606        3457
+        3759        3757        3458
+        2686        3240        4130
+        3344        3381        3607
+        2683        3923        3757
+        3763        3765        3460
+        3764        3778        3924
+        3831        2847        2833
+        3763        3924        2764
+        3487        3350        2693
+        3411        3550        3879
+        3770        3772        3463
+        2685        3547        3771
+        3804        3668        3464
+        3669        3804        3464
+        3850        3465        3853
+        3200        3473        3823
+        3466        3363        3394
+        3854        3466        3276
+        3528        3396        3774
+        4055        4061        4057
+        3565        3008        3701
+        3966        3492        3397
+        3776        3778        3469
+        3469        3925        3776
+        3635        3308        3855
+        3856        3213        3202
+        3402        3471        3401
+        3470        3635        3855
+        3822        4019        3066
+        3523        3434        3403
+        2933        3214        3823
+        3473        4153        3404
+        3779        2945        3704
+        3972        3874        3405
+        3475        3400        3406
+        4147        3475        4146
+        3782        3002        3005
+        3780        3476        3977
+        3562        3785        3658
+        3600        3417        3784
+        2721        3733        3807
+        3447        3478        2723
+        3198        3646        3557
+        4028        3994        3427
+        2870        4114        2842
+        2873        3637        2872
+        2872        3481        3495
+        3637        3481        2872
+        3453        3922        3755
+        3482        2782        2783
+        3310        3193        3638
+        3455        3483        3373
+        3676        3284        3787
+        3456        3484        3374
+        3681        2635        4007
+        2682        3826        3343
+        3486        2678        2682
+        3486        3343        3560
+        2694        3490        3487
+        3551        4214        2689
+        4096        3682        2637
+        2634        3869        2633
+        3721        3098        3489
+        3489        3099        4130
+        4214        3832        3100
+        3640        2687        3832
+        3025        3491        3926
+        3491        3337        3788
+        3644        3334        3397
+        3408        3643        3543
+        2975        3493        2970
+        3667        3933        3931
+        3912        3652        3033
+        3037        3031        3494
+        3033        3652        3651
+        3653        2872        3495
+        2844        3496        3988
+        2846        3496        2834
+        2676        3497        3789
+        2753        2752        4105
+        3433        3960        3603
+        3959        3961        2909
+        3853        3851        3499
+        3705        3878        2936
+        3844        3827        3115
+        4094        3951        2811
+        2929        3859        3994
+        3501        2816        3117
+        3861        4170        3862
+        4170        3116        3416
+        3500        3115        3504
+        3504        3115        3881
+        3897        3951        3500
+        3366        3504        2817
+        3369        3159        3906
+        3649        2706        3964
+        3906        3962        3506
+        3905        3537        3906
+        3998        3999        2889
+        3338        3507        2885
+        3508        4208        3355
+        4176        4134        4036
+        3477        3840        3784
+        3368        3562        3503
+        3368        2662        3511
+        3510        2662        3115
+        3840        3477        3783
+        3784        3511        4144
+        4219        4116        3689
+        3512        3296        2898
+        2649        2677        3863
+        3379        3678        3335
+        3984        3950        4000
+        4001        3897        3395
+        3515        3475        3406
+        3515        3824        3475
+        4053        3043        4051
+        4053        4051        3516
+        4039        2750        3671
+        3518        3711        3419
+        3278        3250        3835
+        3518        3419        3418
+        3312        3145        3642
+        3421        3519        3337
+        3426        3520        3358
+        3819        3403        3390
+        4086        3899        4087
+        2835        3521        2981
+        3445        3522        3422
+        3812        2763        3929
+        3822        3079        3359
+        3472        3523        3403
+        3282        3332        3900
+        3372        3454        3524
+        3346        3383        4152
+        4080        3109        4152
+        3425        3526        3355
+        3012        3508        3526
+        3061        4058        3060
+        3208        3529        3524
+        4224        3454        3372
+        4161        3528        2937
+        3527        3529        3209
+        3208        3192        3529
+        4116        4115        3530
+        3530        2964        2963
+        4217        3227        3901
+        3847        2893        3531
+        2937        3528        3533
+        3527        3612        3529
+        3773        3839        3467
+        4137        2938        2937
+        2925        3534        2900
+        2926        2927        3534
+        3720        3719        2854
+        4191        3915        3909
+        3536        3932        3794
+        2671        3536        3904
+        3904        3538        3905
+        3506        3962        2705
+        3904        3905        2671
+        3708        3537        4024
+        2627        2628        3796
+        2626        3796        2629
+        3266        4029        3631
+        2896        3174        4002
+        3541        3124        3171
+        4165        3172        3124
+        3708        2620        4117
+        3369        3428        3542
+        4062        3420        3028
+        3797        3023        3024
+        4208        3644        3492
+        3038        4078        4207
+        4154        4155        2967
+        3545        3409        2983
+        3410        3546        3799
+        3809        2632        3798
+        3410        3547        2633
+        3547        2685        3344
+        3809        3798        3869
+        3971        2636        4007
+        3351        2630        3550
+        2689        3907        3551
+        3800        3549        3879
+        3768        4011        3879
+        4214        3100        3163
+        2691        3766        3769
+        2941        3552        3854
+        3982        3416        3435
+        3645        3620        3409
+        3701        3645        3966
+        3908        3274        4063
+        3554        3466        3394
+        2832        4064        2835
+        2766        3348        3992
+        3834        3298        4118
+        3556        3471        3402
+        3479        3427        3646
+        3479        3646        3825
+        3370        3558        3243
+        3558        3482        2783
+        3559        3430        3483
+        4042        3430        3559
+        3380        3560        3343
+        3486        3560        3098
+        3553        3025        3966
+        3808        3544        3492
+        2661        3562        3586
+        3658        2675        3562
+        4120        4221        3174
+        4221        3563        3371
+        4042        4043        3564
+        3108        4042        4040
+        3565        3468        3431
+        3701        3468        3565
+        3566        2993        2992
+        3780        2992        2993
+        3781        4193        4065
+        4192        2995        2996
+        3125        3568        2884
+        3568        2891        3172
+        2731        3570        3829
+        3829        2746        2743
+        3570        2731        2747
+        2739        3106        3570
+        2729        3574        2728
+        3572        3575        3574
+        3647        3803        3650
+        3572        3573        3571
+        4183        2730        3803
+        3571        3573        2727
+        2729        3614        3650
+        3571        3576        3572
+        3673        2722        3575
+        3575        2728        3574
+        3673        3347        2722
+        3576        3575        3572
+        3634        2785        3577
+        2728        3614        2729
+        4078        3936        3036
+        4076        4077        3629
+        3970        2913        4121
+        3249        2911        3579
+        4066        3069        3068
+        3580        3065        3070
+        3581        3364        3131
+        3581        3685        2904
+        3169        3113        3724
+        2792        3582        4097
+        2701        3830        4164
+        2701        4228        3583
+        3795        3794        2670
+        4023        3584        4025
+        3085        3659        3086
+        3506        3659        3585
+        3586        2675        2674
+        2675        3586        3562
+        3636        3132        3300
+        3131        3364        3833
+        3044        3043        3589
+        3187        3206        4070
+        3589        3148        3044
+        3588        3589        3043
+        3590        2856        2855
+        3590        2852        2856
+        2939        3592        3591
+        2940        3967        2931
+        3361        3592        3993
+        3967        3591        3592
+        3078        3593        3616
+        3594        3596        3801
+        3594        3076        3617
+        3580        4138        4069
+        3436        3595        3393
+        3474        3405        3779
+        3801        3156        3594
+        3837        3717        3069
+        4222        4122        3076
+        3595        3779        3405
+        3243        3415        3370
+        2797        2800        3599
+        2797        4223        4141
+        3500        3844        3115
+        3600        2810        2621
+        2810        3784        4144
+        3633        3418        2748
+        2775        3601        3345
+        2639        3684        2641
+        3625        3424        4180
+        3960        3959        2910
+        3433        3603        3249
+        3339        3604        3107
+        3445        3604        3522
+        3609        3447        3605
+        3605        2717        3104
+        3232        3606        3252
+        3376        3606        3375
+        2633        3607        2635
+        3761        3759        3485
+        3461        3831        2833
+        3608        3383        3346
+        3165        3609        3605
+        3609        3478        3447
+        2860        2858        3871
+        3338        3999        3507
+        3108        3611        4043
+        2730        4183        4182
+        4137        4136        3072
+        3072        4055        4135
+        3002        3613        3003
+        2993        3566        3648
+        3614        3577        2784
+        3577        3614        2722
+        3615        2815        3618
+        4191        2794        3618
+        3434        3523        4122
+        3616        3414        3076
+        3593        3617        3414
+        3717        3068        3069
+        3356        3618        2857
+        3615        3618        2794
+        3000        3619        3003
+        2862        2980        3903
+        3645        2989        3620
+        3619        2979        3620
+        3295        4008        3688
+        3319        3226        3713
+        4092        2979        3902
+        3622        3138        2861
+        4195        3583        4194
+        3675        3747        2704
+        3624        3527        3071
+        3612        4135        4055
+        4225        3625        4180
+        3424        3625        3352
+        3059        4074        3626
+        3060        3059        4107
+        3066        3627        3153
+        4102        4068        3191
+        3271        3264        3628
+        3264        4198        3628
+        4204        4202        4200
+        4200        4199        4076
+        3630        3273        3323
+        3323        4203        3630
+        3443        3336        3697
+        3868        3541        4003
+        3964        3962        3505
+        3964        2706        3962
+        3633        2748        3601
+        3347        3732        3634
+        3634        3675        2785
+        3313        3635        3299
+        3635        3470        3471
+        3479        3636        3364
+        3587        3636        3300
+        3637        3480        3481
+        3297        4215        3442
+        3301        3638        3329
+        3638        3483        3455
+        3639        3421        3484
+        3421        3802        3642
+        3291        3100        3832
+        3640        3490        2694
+        3641        3426        3508
+        3706        3520        3426
+        3309        3303        3802
+        3642        3519        3421
+        3797        3543        3808
+        4207        3544        3643
+        3492        3644        3397
+        3644        3087        3334
+        3701        2990        3645
+        3553        3645        3409
+        3281        3646        3198
+        3557        3646        3427
+        2769        4080        2768
+        3573        3572        3803
+        3782        3780        2993
+        3648        3613        3002
+        3649        3632        3367
+        3649        3964        3632
+        3650        2770        3647
+        2770        3650        3614
+        3034        3651        3037
+        3651        3652        3035
+        2958        3652        2955
+        3494        3912        3033
+        2868        3653        2867
+        2952        3653        3495
+        3654        3413        3130
+        3413        3654        3433
+        3655        2917        2918
+        2917        3655        3970
+        3656        3582        2782
+        3909        3582        3656
+        3827        3510        3115
+        3827        2801        3657
+        3417        2666        3785
+        2675        3658        2672
+        3816        2655        3659
+        3659        3085        3585
+        4159        4079        3660
+        3647        3660        4080
+        3880        3345        3661
+        2832        3661        3992
+        3898        3205        3219
+        3420        3662        3028
+        4199        4198        2987
+        3526        3425        3669
+        2837        2841        3677
+        3429        3664        3371
+        3432        4125        3665
+        3974        3398        4126
+        3493        3892        3930
+        3666        3026        3218
+        3931        3930        3026
+        3931        3933        3493
+        3556        3402        3834
+        3668        3013        3222
+        3013        3668        3804
+        3663        3669        3425
+        3670        3202        3216
+        3202        3670        3856
+        3518        3418        3835
+        3671        2750        3270
+        3018        3672        3016
+        3672        3565        3431
+        2728        3575        2722
+        2727        3105        3913
+        3583        4228        4194
+        3112        3872        2701
+        2704        3623        3675
+        3674        2785        3872
+        3204        3676        3218
+        3666        3676        3456
+        4160        2755        3677
+        3677        2841        3664
+        3497        2752        3789
+        3379        3513        3678
+        3171        3697        3541
+        3679        3696        3697
+        3680        4045        2969
+        3032        3680        2953
+        3488        4016        4096
+        2634        4096        3548
+        4033        2638        3682
+        3681        2636        4096
+        3424        3602        3683
+        3683        2636        2651
+        3698        3539        3873
+        3873        3684        3602
+        3581        3131        3685
+        3685        2903        2904
+        3686        2660        2661
+        3881        2662        3896
+        3687        2817        3504
+        2819        2817        4089
+        3806        3688        4044
+        3713        3295        3806
+        4116        2963        3689
+        3690        3437        3689
+        3437        3690        4124
+        3431        3378        4050
+        3377        3691        3333
+        4124        3690        3692
+        3692        3158        3691
+        2952        2951        3805
+        4026        3438        3693
+        2693        2642        3914
+        4128        2694        3487
+        3695        3170        3195
+        3170        3695        2873
+        3696        3679        2880
+        3697        3171        3679
+        3697        3631        3541
+        3631        3697        3336
+        2643        3698        2644
+        2626        3684        3873
+        3699        2942        2830
+        2942        3972        3134
+        3318        3275        4063
+        3700        3466        3554
+        3701        3842        2991
+        3966        3468        3701
+        3314        3307        4118
+        3702        3471        3556
+        2937        3391        4161
+        3703        4161        3391
+        2944        3704        2945
+        3972        3474        3704
+        2932        3133        3973
+        3852        3973        3705
+        4037        4134        4035
+        3641        3706        3426
+        2670        4023        3795
+        2620        3707        2621
+        3537        3708        3428
+        4117        3542        3708
+        3709        3627        3239
+        4075        3153        3627
+        2984        3956        4111
+        3987        2957        2974
+        3322        2751        3867
+        4125        3711        2751
+        3712        3455        4126
+        3974        3661        3382
+        3713        3621        3295
+        4073        3621        3713
+        2836        3714        2839
+        2838        3714        3975
+        3715        2712        2713
+        2712        3715        4127
+        2711        3716        2726
+        3447        3716        3605
+        3238        3717        3837
+        3068        3717        3191
+        2920        3718        3581
+        3994        3860        3427
+        3618        2855        3720
+        4210        2854        3719
+        3719        3720        2855
+        4213        3915        3535
+        4130        3099        2686
+        3098        3721        3919
+        2680        3722        3721
+        3722        3110        2773
+        2789        3723        3724
+        3723        2795        3169
+        3728        3727        2789
+        3656        3724        3113
+        4139        3725        3075
+        3916        3070        3207
+        3745        2734        4082
+        3340        3341        3890
+        3752        2798        4081
+        3753        3451        3365
+        3482        3728        3656
+        3724        3728        2789
+        3476        3407        3977
+        2961        3729        3934
+        3730        2721        2720
+        3423        3731        3733
+        3105        3478        3731
+        3733        2721        3730
+        3423        3732        3347
+        3634        3747        3675
+        3807        3746        2721
+        3733        3731        3609
+        2738        3734        2761
+        3983        3918        2733
+        3735        2713        2712
+        3716        3920        3737
+        3736        4127        4128
+        2712        3976        3735
+        3716        2713        3920
+        3716        3737        3605
+        2759        3738        3740
+        3921        3744        3739
+        3739        3522        3604
+        3446        3340        3744
+        3340        3446        3743
+        2731        3740        3339
+        2758        3741        3744
+        3341        4082        3726
+        3742        3341        3743
+        2731        3743        3740
+        3742        3743        2731
+        2759        4163        3741
+        3744        3522        3739
+        3744        3340        3522
+        2734        3745        3918
+        3569        3745        2731
+        3746        2720        2721
+        3747        3875        3448
+        3634        3875        3747
+        4158        2704        3747
+        3617        3077        3750
+        3523        3749        3616
+        3749        3359        3450
+        3876        3749        3450
+        3596        3617        3837
+        3837        3750        3359
+        2787        3751        3753
+        3752        3451        3877
+        3451        3752        3365
+        3752        2799        2798
+        3754        3922        3453
+        3753        3728        3482
+        3755        3370        3453
+        3877        3751        2788
+        3558        3755        3482
+        2787        3922        3754
+        2799        3756        3598
+        3756        3453        3370
+        2684        3757        3759
+        3380        3458        3758
+        3758        3489        3560
+        3760        3459        3762
+        3760        4010        3459
+        3826        3485        3759
+        2683        3760        3762
+        3761        3381        3459
+        3607        3761        3485
+        2684        4010        3760
+        3762        3489        3758
+        3489        3762        3381
+        3763        2764        2765
+        3924        3778        2764
+        3778        3776        2764
+        3764        3608        3555
+        3460        3765        3383
+        3564        3525        3777
+        3810        3769        3978
+        3385        4011        4012
+        4014        2640        4013
+        3767        2642        3350
+        3462        3766        4011
+        3768        3550        2630
+        3810        3800        2691
+        3490        3769        3385
+        3463        3771        3838
+        3772        3770        2632
+        3771        2690        2685
+        2690        3771        3386
+        3463        3772        3386
+        3809        4016        3772
+        3073        3773        3775
+        3774        3396        3467
+        3774        3533        3528
+        3074        3839        3773
+        4054        3073        4061
+        3529        3775        3396
+        3776        2765        2764
+        3777        3925        3469
+        2765        3776        3925
+        3765        3777        3525
+        3469        3778        3399
+        3778        3764        3555
+        3075        3779        3968
+        3597        3779        3595
+        2993        3648        3782
+        3977        4065        2992
+        3566        2992        4065
+        2961        3781        3729
+        3407        3476        3782
+        3782        3648        3002
+        2663        3783        3785
+        3784        3417        3477
+        3600        3784        2810
+        2664        3791        3792
+        3793        3791        2663
+        3658        3785        2666
+        3786        3559        3483
+        4119        3559        3786
+        3284        3185        3787
+        3484        3787        3639
+        3788        3024        3023
+        3788        3337        3024
+        3789        3678        3513
+        3678        3789        4160
+        3790        2935        2934
+        3790        3200        2935
+        3511        3784        3792
+        3368        3509        3793
+        3783        2664        3840
+        3511        3792        3368
+        3793        3785        3562
+        3785        3793        2663
+        3932        3910        2669
+        3795        3904        3794
+        3537        3538        4024
+        3584        4023        4022
+        2628        3093        3796
+        3539        3796        2626
+        4062        3024        3420
+        3023        3797        3808
+        3798        2632        2631
+        3772        2632        3809
+        3771        3547        3838
+        3799        3798        2631
+        3550        3768        3879
+        3810        3907        3800
+        4069        4066        3580
+        4139        3075        3156
+        3283        3802        3331
+        3639        3802        3421
+        3573        3803        2730
+        3803        3647        2769
+        4047        3013        4048
+        3804        3669        3663
+        3653        3805        2867
+        3805        3438        3521
+        3230        3806        3253
+        3688        3806        3295
+        3448        3807        3349
+        3807        3733        3609
+        3023        3808        3926
+        3492        3561        3808
+        3488        3772        4016
+        3869        3548        3809
+        3549        3800        3907
+        3490        3978        3769
+        2950        2949        3811
+        3244        3811        4009
+        3812        3929        3927
+        4093        3928        4103
+        3813        2736        2762
+        3813        3927        2760
+        4166        3063        3884
+        3814        3051        3151
+        3815        3151        3051
+        3151        3815        4058
+        3816        3506        2705
+        3506        3816        3659
+        3979        3062        3067
+        4017        3190        3235
+        3818        3814        3064
+        3818        3064        3234
+        3067        3817        3979
+        3520        3819        3390
+        3820        3258        2866
+        3170        3820        3195
+        2812        3821        3980
+        3441        4112        2796
+        3627        3066        4019
+        3472        3822        3749
+        3882        3850        2933
+        3882        3823        3473
+        3866        3143        3288
+        4146        3475        3824
+        3175        3304        3825
+        3479        3825        3636
+        3485        3826        3971
+        3944        2652        3826
+        2804        3827        3657
+        3844        2801        3827
+        3197        3127        4120
+        3828        3512        3563
+        3829        2732        3569
+        2742        3941        3940
+        4196        4157        2695
+        4157        3623        2704
+        4097        2847        3831
+        2771        3831        3346
+        3832        3490        3640
+        4214        3978        3490
+        2916        3973        3852
+        3587        3833        3364
+        3215        3834        3222
+        3668        3834        3464
+        3265        3835        3270
+        3671        3835        3517
+        3895        2661        2660
+        4089        3687        3836
+        3750        3837        3617
+        4067        3801        3596
+        3838        3799        2631
+        3799        3838        3547
+        3839        3533        3774
+        4054        3532        4060
+        3840        3792        3784
+        3840        2664        3792
+        3821        3841        3441
+        2815        3615        3841
+        3842        2988        2991
+        3008        3842        3701
+        3843        3114        2786
+        3843        2802        2801
+        3415        3114        4004
+        3599        3844        3500
+        2827        3845        2824
+        3845        3118        2825
+        3981        3696        2879
+        3181        3140        3847
+        3981        3846        3847
+        2999        3181        3847
+        4070        3206        3588
+        4070        3588        3043
+        4090        3231        3267
+        2975        3849        3892
+        3790        3853        3499
+        3882        3465        3850
+        3853        3391        3360
+        3851        2936        3499
+        2916        3852        2938
+        3852        3851        3360
+        3853        2934        3850
+        3851        3853        3360
+        3854        3363        3466
+        3854        3276        2941
+        3308        3315        3855
+        3856        3470        3855
+        3856        3401        3470
+        3401        3856        3406
+        3857        2816        3501
+        3858        3954        2816
+        3857        3858        2816
+        3395        3366        3953
+        3860        3994        3859
+        3501        3859        3857
+        3982        3557        3427
+        3860        3501        3117
+        2818        3862        3954
+        3502        3861        3997
+        3861        3862        2818
+        3117        3862        3416
+        3863        2650        2649
+        4225        3865        3864
+        3865        3513        3379
+        2650        3863        4225
+        3864        3865        3342
+        3866        3824        3515
+        3824        3866        3288
+        3867        3711        3518
+        3711        3867        2751
+        4165        3124        3541
+        3868        2894        2839
+        3798        3546        3869
+        2634        3548        3869
+        2981        3871        2835
+        2858        3610        3871
+        3870        3871        2981
+        2832        2835        3871
+        3675        3872        2785
+        3674        3872        3112
+        3873        3449        3698
+        3873        3353        3449
+        3405        3874        3393
+        3874        3452        3367
+        3875        3732        2720
+        3732        3875        3634
+        3876        3616        3749
+        3876        3078        3616
+        3877        3756        3752
+        3877        2788        3756
+        3878        3200        3790
+        3200        3878        3179
+        3879        2692        3800
+        4011        2692        3879
+        3338        2885        4103
+        3338        3880        3661
+        2662        3881        3115
+        3504        3881        3687
+        3465        3882        3391
+        3703        3882        3473
+        3989        2853        3883
+        2851        3883        3888
+        4021        3047        3055
+        3063        4021        3884
+        4150        4149        3203
+        2876        3011        3886
+        2876        3886        2875
+        3885        3886        3011
+        3887        2850        2875
+        3887        2875        3886
+        3911        2857        2850
+        3888        2850        3887
+        3889        4091        3287
+        4090        3287        4091
+        3726        2738        3890
+        3341        3726        3890
+        3891        3480        3637
+        3297        2869        4215
+        2975        3892        3493
+        3892        3269        2978
+        2869        3893        3891
+        3894        3496        3893
+        3894        2834        3496
+        4087        2835        2834
+        3895        3562        2661
+        3896        3503        3895
+        3687        3881        3896
+        3896        3895        2660
+        3395        3897        3366
+        3897        3500        3504
+        3898        3662        3519
+        3662        3898        3219
+        3899        4086        2867
+        3521        3899        3805
+        3900        3189        3282
+        4216        3916        3189
+        3902        3619        3903
+        3901        2892        3531
+        4092        2982        2983
+        3902        2979        3619
+        3619        4169        3903
+        3903        2980        3902
+        3905        2673        2671
+        3538        3904        3795
+        3506        3905        3906
+        3905        3538        3537
+        3159        3505        3906
+        3906        3537        3428
+        2690        3411        3907
+        3551        3907        3810
+        3261        3908        3272
+        3591        3908        2939
+        3113        3290        3656
+        3915        4097        3582
+        3910        2668        3584
+        2669        4022        2670
+        3911        3888        3883
+        3888        3911        2850
+        3912        3495        3652
+        2953        3495        3912
+        3576        3913        3575
+        3913        3105        3673
+        3694        3914        4131
+        4015        2626        2629
+        4191        3535        3915
+        3909        3915        3582
+        3916        3155        3725
+        3155        4216        3454
+        2736        3439        2735
+        3917        4218        2734
+        2733        3918        2732
+        3919        2735        3983
+        3986        2735        3919
+        3721        2773        3919
+        3735        3920        2713
+        3737        3920        3228
+        3921        3339        3444
+        3339        3921        3604
+        3922        3753        3755
+        3922        2787        3753
+        3923        3762        3758
+        3923        2683        3762
+        3764        3924        3608
+        3924        3460        3383
+        3925        3765        2765
+        3925        3777        3765
+        3561        3926        3808
+        3926        3788        3023
+        4103        3812        4093
+        3929        2760        3927
+        3880        3928        2775
+        3986        2772        3928
+        2760        3929        3890
+        3422        3522        3929
+        2978        3930        3892
+        3493        3930        3931
+        3933        4154        3493
+        3456        3667        3931
+        3932        2672        3658
+        3536        2672        3932
+        3933        3409        3545
+        3409        3933        3553
+        2962        3934        2965
+        3934        3019        3015
+        2998        3935        4115
+        3530        3935        2964
+        3038        3408        3936
+        3936        3031        3037
+        2757        3939        2753
+        3937        3939        3938
+        4005        3422        2756
+        3938        2756        3937
+        4132        2756        3938
+        2753        3939        3937
+        3942        2742        3940
+        2743        3941        3829
+        2743        3940        3941
+        2732        3941        2679
+        3943        3293        2679
+        2744        2740        3942
+        2679        3941        3943
+        3943        3942        3097
+        3944        2653        2652
+        2653        3944        3991
+        3040        3945        2914
+        3945        3040        3142
+        2814        3948        2811
+        2811        3948        3946
+        3984        3953        2815
+        3947        2813        3946
+        3949        2815        3841
+        3948        3947        3946
+        3947        3948        3952
+        3984        2815        3949
+        3952        2814        3950
+        3949        3952        3950
+        4001        4000        2811
+        3599        4094        3980
+        3952        3841        2813
+        3841        3952        3949
+        2815        3953        2915
+        3858        3953        3366
+        3862        3117        3954
+        3954        3366        2817
+        3955        3693        2948
+        2950        3955        3245
+        2974        3956        3987
+        3710        4206        4204
+        3957        2972        3252
+        4145        2972        4148
+        3958        3184        3203
+        3184        3958        2957
+        2910        3603        3960
+        2912        2909        3961
+        3498        3960        2908
+        3654        3960        3433
+        3961        3990        2919
+        3177        3961        2907
+        3632        3964        3963
+        3505        3962        3906
+        2616        3632        3963
+        3159        3964        3505
+        3963        3964        3159
+        3965        3901        3531
+        4217        3901        3965
+        3966        3025        3561
+        3468        3966        3397
+        2931        3967        4153
+        3392        3967        3592
+        3076        3594        4222
+        3779        3597        3968
+        3842        3004        3969
+        3620        3969        3619
+        4121        2919        2917
+        2913        3970        3060
+        2636        3971        2651
+        3826        2652        3971
+        3474        3972        3405
+        3874        3972        2942
+        2932        3973        3587
+        3833        3973        2916
+        3398        3974        3382
+        3661        3974        3373
+        2838        3975        3422
+        2756        3975        2754
+        2714        3440        4131
+        4127        3736        3976
+        3977        3729        3781
+        3729        3977        3407
+        3978        3551        3810
+        4214        3551        3978
+        3062        4168        4166
+        3979        3819        3520
+        4094        3946        2812
+        4223        2797        3599
+        4095        3336        3443
+        3140        3981        3847
+        3557        3982        3552
+        3416        3982        3117
+        3919        3983        2733
+        3918        3983        2734
+        3953        3984        3395
+        3514        3984        4000
+        3007        3985        3004
+        3985        3141        3005
+        2772        3986        3919
+        3986        2736        2735
+        3987        3710        3578
+        3987        3956        3710
+        3988        2846        2845
+        3989        4140        2843
+        2849        3989        3883
+        3988        2845        3989
+        2918        3990        3833
+        3990        3961        3177
+        3236        3991        3944
+        3991        3095        2653
+        3461        4100        3555
+        4100        4064        3992
+        2939        2943        3993
+        3361        3993        2946
+        3364        3718        4028
+        4028        3427        3479
+        2741        3995        3097
+        4105        3497        3995
+        3996        2820        2821
+        2820        3997        3082
+        3996        3997        2820
+        3997        3083        3082
+        2890        2889        3999
+        3507        3998        2885
+        3999        3610        2890
+        3610        3999        3338
+        2814        4000        3950
+        4001        3514        4000
+        3514        4001        3395
+        4001        3951        3897
+        4002        2895        2896
+        2895        4002        4029
+        4029        4003        3631
+        3631        4003        3541
+        4004        3844        3599
+        3844        4004        3114
+        3939        4132        3938
+        2756        4132        4005
+        3674        4006        3577
+        3558        2783        4006
+        3681        4007        2636
+        4007        3485        3971
+        2976        3688        2969
+        4008        3295        3137
+        2968        4009        2954
+        4008        4009        2969
+        4010        3759        3761
+        4010        2684        3759
+        4011        3385        3462
+        3385        3767        3350
+        3767        3385        4012
+        3768        4012        4011
+        2640        2641        4013
+        2637        4014        3488
+        2637        4031        2640
+        3488        4014        3351
+        3914        4015        2629
+        2626        4015        3684
+        4096        2637        3488
+        4016        3809        3548
+        3817        4017        3239
+        4017        3235        3709
+        4018        3403        3819
+        3472        3403        4019
+        4019        4018        3627
+        4018        4019        3403
+        4089        3084        3083
+        4089        4020        2819
+        3048        4021        3063
+        3054        4186        4185
+        2670        4022        4023
+        4022        3910        3584
+        4023        4024        3795
+        3584        3707        4025
+        3538        3795        4024
+        4025        2620        3708
+        4025        4024        4023
+        3708        4024        4025
+        2981        3438        4027
+        4026        2947        4027
+        4026        4027        3438
+        2982        4027        2983
+        3364        4028        3479
+        4028        2928        3994
+        3266        2895        4029
+        3868        4003        4029
+        4030        3831        2771
+        3831        4030        4097
+        4014        2637        2640
+        3684        2639        4032
+        2639        4033        4032
+        4032        3683        3602
+        4031        4033        2639
+        4032        4033        3683
+        3046        4052        3044
+        4034        4021        3048
+        3149        4035        4134
+        3046        4037        4035
+        4134        4176        3149
+        4036        3706        3641
+        4034        4037        3046
+        4038        4134        4037
+        4038        3706        4036
+        4167        3706        4038
+        3108        4040        4041
+        3108        4041        3611
+        3167        4040        4119
+        4041        3671        3517
+        4039        4041        4040
+        2749        3611        4041
+        3430        4042        3384
+        4042        3564        3384
+        4043        2768        3564
+        4043        4042        3108
+        4098        4099        3186
+        2977        4098        3219
+        3030        3027        4045
+        2969        4046        2976
+        2977        4044        4098
+        4045        4046        2969
+        4076        2987        4048
+        4047        2987        2986
+        4047        4048        2987
+        4048        3804        3663
+        4049        2942        3363
+        2942        4049        2830
+        3017        4050        3690
+        3692        4050        3378
+        4053        3848        3043
+        4052        3516        4051
+        3516        4052        3412
+        4052        3149        3039
+        4053        3040        3146
+        3040        4053        3412
+        4056        3074        4060
+        4057        3529        3612
+        3775        3529        4057
+        4061        4055        3072
+        4056        3533        3839
+        3532        3072        4136
+        4055        4057        3612
+        3775        4057        3073
+        3151        4058        3624
+        4135        3527        3624
+        4059        4058        3061
+        4058        4135        3624
+        4054        4060        3074
+        4136        4056        4060
+        3072        3532        4061
+        4057        4061        3073
+        3408        4062        3936
+        3029        4062        3028
+        3247        4063        3274
+        3554        4063        3700
+        3384        3992        3348
+        4064        2832        3992
+        3567        4065        4193
+        3781        4065        3977
+        4101        4068        3065
+        3580        3070        4138
+        4069        4067        3069
+        3069        4067        3837
+        4068        3262        3065
+        4101        3068        4068
+        4066        4069        3069
+        4138        4067        4069
+        3187        4070        3147
+        3848        4070        3043
+        3597        4071        4222
+        4123        4071        4172
+        2769        3611        4183
+        4184        4072        4181
+        4073        3229        3621
+        4091        3229        4073
+        4074        3056        3150
+        3056        4074        3053
+        4075        3709        3246
+        3709        4075        3627
+        3578        3629        4077
+        3663        4076        4048
+        3578        4078        3036
+        4077        3663        3425
+        3038        4207        3643
+        4078        4077        3425
+        2779        4079        2781
+        4159        2781        4079
+        3660        4079        4080
+        2768        4080        3525
+        4081        2790        3727
+        4162        4081        2798
+        4082        2737        3726
+        4218        2737        4082
+        4083        2865        3241
+        4083        4084        4085
+        2864        4085        4084
+        4084        3233        2867
+        3893        2865        4088
+        4085        2865        4083
+        4087        4088        4086
+        4086        4088        2864
+        3894        4087        2834
+        4087        3521        2835
+        2865        4085        4088
+        3894        4088        4087
+        2817        3687        4089
+        3083        4020        4089
+        4090        3849        3287
+        3892        3849        4090
+        3316        4091        4073
+        4091        3889        3229
+        2979        4092        3620
+        4171        3622        2982
+        2763        3812        4103
+        3986        3928        4093
+        3946        4094        2811
+        3951        4094        3599
+        3336        4095        2998
+        3180        4095        4227
+        3682        4096        2636
+        3681        4096        2634
+        4097        2848        2847
+        3915        2848        4097
+        3186        4099        3662
+        4098        4044        4046
+        4045        4099        4098
+        4099        4045        3027
+        3992        3384        3555
+        4100        3461        2833
+        4101        3065        3580
+        4101        3580        4066
+        3262        4102        3246
+        4075        4102        3153
+        2763        4103        2885
+        4103        3928        3880
+        4104        2740        2744
+        4104        2744        2745
+        3497        4105        2752
+        2753        4105        2739
+        4106        3130        3176
+        3130        4106        3654
+        3187        3147        4107
+        3060        4107        2913
+        4111        4108        2985
+        4111        3213        4108
+        4205        3273        3630
+        4109        4111        2985
+        3221        4110        3183
+        4110        3856        3855
+        4111        3202        3213
+        3202        4111        3956
+        3242        4112        2794
+        3615        4112        3841
+        3375        3457        4113
+        4113        3216        3202
+        4114        3496        2844
+        3496        4114        3893
+        4116        2898        4115
+        3935        3530        4115
+        4116        3512        2898
+        4219        3371        3512
+        2620        3091        4117
+        4209        3353        3542
+        3298        3201        4118
+        3556        4118        3702
+        3210        3220        4119
+        4042        3559        4119
+        2899        3174        4221
+        3563        4120        3828
+        3579        4121        2913
+        4121        2917        3970
+        3434        4122        4123
+        3968        3597        4222
+        4123        3390        3434
+        3358        3390        4172
+        4219        3437        4220
+        3377        3335        4220
+        3711        4125        3419
+        3601        4125        3398
+        3432        4126        3398
+        3974        4126        3455
+        2712        4127        3976
+        3694        3736        4128
+        3694        4128        3487
+        2694        4128        2709
+        2922        4129        2920
+        3718        4129        2927
+        4130        3721        3489
+        3721        4130        2680
+        4131        2629        2714
+        3914        2629        4131
+        4132        3166        4005
+        3166        4132        2757
+        3767        4133        2642
+        4133        4014        4013
+        3039        3149        4176
+        4036        4134        4038
+        4059        4135        4058
+        4135        3612        3527
+        4136        3533        4056
+        4137        3533        4136
+        2937        3533        4137
+        4137        4059        3061
+        4138        3801        4067
+        4139        3801        4138
+        3156        3801        4139
+        4139        3916        3725
+        4140        2842        2843
+        4140        2870        2842
+        2798        4141        4162
+        4141        3441        2796
+        2806        4142        4143
+        2625        4142        2805
+        4143        3827        2806
+        2808        4144        4143
+        3510        4143        4144
+        4144        2809        2810
+        4145        3224        2972
+        3217        4145        4148
+        3400        3475        4147
+        4150        4147        4146
+        4147        3387        3400
+        3885        3387        4151
+        4149        4146        3217
+        4148        3957        3958
+        3958        4149        4148
+        4149        3958        3203
+        4147        4150        4151
+        4151        4150        3203
+        4147        4151        3387
+        3885        4151        3010
+        3109        3168        4152
+        3765        3525        4152
+        3404        4153        3392
+        2931        4153        2932
+        2950        2967        4155
+        3933        3545        4154
+        2947        2950        4155
+        4155        3545        2983
+        4156        2932        3587
+        4156        3199        2932
+        3830        3583        4177
+        2702        3623        4195
+        4158        3349        3165
+        3349        4158        3747
+        2781        4159        2782
+        4159        2770        2784
+        2755        4160        2752
+        3429        3678        4160
+        4224        3372        3528
+        3404        3392        4224
+        2796        2795        4162
+        4162        2790        4081
+        4163        3740        3743
+        4163        2759        3740
+        4164        3112        2701
+        2786        3112        4164
+        2884        3172        4165
+        4165        3868        2839
+        3050        3814        4166
+        4168        4167        4038
+        3706        4167        3520
+        3062        3979        4168
+        3048        3063        4168
+        3979        4167        4168
+        2892        4169        3619
+        3903        4169        3227
+        3862        4170        3416
+        4170        3996        2821
+        2980        3138        4171
+        4171        2982        4092
+        4175        3358        4172
+        4172        4071        3436
+        3157        3358        4175
+        2615        4173        3362
+        4174        4175        4173
+        4175        4172        3436
+        3012        3039        4176
+        4176        4036        3641
+        3830        4177        2700
+        4195        4194        2702
+        3162        2677        4178
+        2648        3095        3991
+        4180        3095        4226
+        4178        4179        2648
+        4180        2651        3095
+        2651        4180        3683
+        2723        4181        2726
+        4181        4072        2725
+        4184        4182        4183
+        3803        2769        4183
+        2724        4182        4184
+        4072        4183        3611
+        2724        4184        4181
+        4184        4183        4072
+        3053        4185        3056
+        4185        4021        3055
+        4186        3884        4021
+        3884        4186        3049
+        3084        3080        3083
+        3102        4188        2657
+        4188        3082        4187
+        3082        4188        2708
+        4189        2964        2959
+        2961        4189        3136
+        3452        4190        3367
+        3649        4190        2706
+        3909        2791        4191
+        3535        4191        3618
+        4227        4192        2996
+        2995        4192        4193
+        2995        4193        2960
+        4193        3781        2961
+        2703        4194        4228
+        3583        4195        4177
+        4177        4195        4196
+        3623        4157        4196
+        2700        4177        4197
+        4197        4196        2695
+        2700        4197        3101
+        2696        4197        2695
+        3628        4198        4199
+        3277        4198        3264
+        3628        4202        4201
+        4202        3628        4199
+        4202        4204        4203
+        4200        3629        3710
+        3325        3248        3294
+        4201        3271        3628
+        3294        4202        4203
+        4200        4202        4199
+        3630        4203        4204
+        3260        4203        3323
+        4205        3630        4206
+        4204        4200        3710
+        2984        4205        4206
+        4205        2984        4109
+        4206        3956        2984
+        4206        3710        3956
+        3544        4207        4208
+        4207        4078        3355
+        3544        4208        3492
+        3087        3644        4208
+        2644        4209        2619
+        4117        4209        3542
+        4213        2854        4212
+        2856        2852        4210
+        2848        4211        3989
+        2853        4212        4210
+        3720        2854        4213
+        4211        4212        2853
+        3720        4213        3535
+        3915        4213        2848
+        2689        4214        3163
+        3490        3832        4214
+        4215        3637        3442
+        4215        3891        3637
+        3900        4216        3189
+        4216        3155        3916
+        3965        3212        4217
+        3227        4217        3171
+        3734        4218        3439
+        4218        3734        2737
+        4116        4219        3512
+        3429        3371        4220
+        4219        4220        3371
+        3429        4220        3335
+        4221        2840        2899
+        2840        4221        3371
+        4222        4123        4122
+        4123        4222        4071
+        4223        3980        3441
+        3980        4223        3599
+        3528        4161        4224
+        2946        4224        3361
+        3625        4225        3160
+        3865        4225        3863
+        4226        4225        4180
+        4226        2650        4225
+        4227        3140        3567
+        4227        2996        3180
+        2703        4228        3675
+        3872        4228        2701
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
+       1
diff -r 000000000000 -r 5eda1a3f24e8 source/test/emb_bdry/cubes/three-plugs/cubes-test.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/emb_bdry/cubes/three-plugs/cubes-test.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,103 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file to test SAMRAI-Cubes interface 
+ *
+ ************************************************************************/
+
+Main {
+
+   time       = 0.0
+   dt         = 0.1
+   nsteps     = 1
+
+   tag_buffer = 1
+
+   log_file_name            = "three-plugs.log"
+
+   visit_dump_interval        = 1      
+   visit_dump_dirname         = "viz_three-plugs"
+
+}
+
+SampleApp {
+   tag_growing_sphere   = FALSE
+   tag_cut_cells        = TRUE 
+}
+
+
+EmbeddedBoundaryGeometry {
+
+    CubesPatchInterface {
+       surface_tri_file = "three-plugs.tri"
+       max_levels       = 5
+       verbose          = TRUE
+    }
+
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (14,14,14) ]   // coarse mesh
+   x_lo          = -225.e0 , -500.1 , -500.001 // lower end of computational domain.
+   x_up          =  751.e0 ,  500.01,  500.0001 // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 5 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 , 2
+      level_2               = 2 , 2 , 2
+      level_3               = 2 , 2 , 2
+      level_4               = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+//      level_0 = 199 , 199 , 199
+      level_0 = 19 , 19 , 19
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 , 1
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize{
+   tagging_method = "GRADIENT_DETECTOR"
+//   tagging_method = "REFINE_BOXES"
+//   RefineBoxes {
+//      level_0  = [ (10,10) , (80,80) ]
+//   }
+}
+
+TimerManager {
+   timer_list = "apps::main::*"
+}
+
+
+UniformLoadBalance {  // for SAMRAI v1.3.1
+//   processors         = 1 , 1
+   use_spatial_bin_pack = TRUE
+}
+LoadBalancer {  // for SAMRAI v1.3.2
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/emb_bdry/cubes/three-plugs/input.c3d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/emb_bdry/cubes/three-plugs/input.c3d	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,58 @@
+"  _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
+  /                                                                     \
+  |                                                                     |
+  |           Cartesian Mesh Generation Input Specifications            |
+  |                                                                     |
+  \_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _/ 
+"
+// PARSING NOTES - Comments can be added before each numerical entry in this 
+//              file. This file is parsed by searching for a colen character, 
+//              DO NOT use  a colen in your comments.                   -M.A.
+
+1. Surface Geometry File Name (Cart3d surface triangulation file format):
+   threePlugs.I.tri
+   //   three intersecting teardrops
+
+2. Outer Cartesian Box Specs:
+      Xmin     Xmax            Ymin    Ymax            Zmin     Zmax
+      -225.    751.           -500.1  500.01         -500.001   500.0001
+  // comments here...
+
+3. Starting Mesh Dimensions (# of nodes in each dimension, inclusive): 
+   # verts in X    # verts in Y     # verts in Z  
+      16             16              16  
+  //      dimensions of the background mesh
+
+4. Maximum Hex Cell Aspect Ratio ( Isotropic = 1):
+        1
+
+5. Minimum Number of cell refinements on body surface (auto = -1):
+        0 
+
+6. Maximum Number of cell refinements:
+        0
+
+7. Num of bits of resolution assigned to integer coordinates (maximum = 21):
+        21
+
+8. Bounday conditions (ONLY requried if converting mesh to tiger format):
+       LoX HiX  LoY  HiY  LoZ HiZ
+        0   0   0    0     0   0
+
+------------------------------------------------------------------------
+** NOTES: 
+  o add comments after each entry but before next line. additional lines
+    may be added with out messing up the parsing. 
+
+  #1: Surface tri  with no internal geometry: output from "intersect"
+  #4: max diff in num of refinements of 2 directions. cell AR=2^N
+  #7: Dont touch this unless you're sure you konw what you're doing.
+  #8: boundary conditions on the mesh (applied boundary by boundary
+      (only apply if mesh will be converted to TIGER format). 
+        FAR_FIELD              0          Boundary Condition Types;   
+	SYMMETRY               1        
+        INFLOW                 2      // not implemented in 'cart2tiger'
+        OUTFLOW                3      // not implemented in 'cart2tiger'
+        OTHER_WALL             4      // not implemented in 'cart2tiger'
+        OTHER                  5      // not implemented in 'cart2tiger'
+------------------------------------------------------------------------
diff -r 000000000000 -r 5eda1a3f24e8 source/test/emb_bdry/cubes/three-plugs/three-plugs.tri
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/emb_bdry/cubes/three-plugs/three-plugs.tri	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,7742 @@
+         4005        8006
+    1.519714       27.12891       22.11620       1.813416       28.72681    
+    21.94690       1.812378       28.66360       21.63969       2.236328    
+    30.23901       21.15050       2.238220       30.36670       21.77229    
+    2.729919       31.88770       20.63870       2.732605       32.08301    
+    21.58949       3.479187       33.51251       20.13420       3.482605    
+    33.77441       21.40790       4.704773       35.01389       19.66820    
+    4.709229       35.33591       21.23730       6.241089       36.43680    
+    19.22639       6.245972       36.81641       21.07350       1.813416    
+    28.54169       21.35069       2.237915       29.99289       20.56551    
+    2.732605       31.51071       19.74429       3.482422       33.00760    
+    18.93610       4.709229       34.39182       18.19209       6.245972    
+    35.70480       17.48880       8.011719       36.95801       16.81900    
+    1.815613       28.36600       21.09100       2.243286       29.63699    
+    20.03990       2.740417       30.96680       18.94070       3.492798    
+    32.27911       17.85950       4.722107       33.49438       16.86580    
+    6.261414       34.64819       15.92740       8.029175       35.75021    
+    15.03470       9.992615       36.79980       14.18910       1.819824    
+    28.14310       20.87070       2.251404       29.18549       19.59370    
+    2.753113       30.27661       18.25861       3.509888       31.35449    
+    16.94580       4.743103       32.35519       15.74020       6.285828    
+    33.30759       14.60220       8.057617       34.21881       13.52029    
+    10.02393       35.08691       12.49600       12.10687       35.91849    
+    11.51970       1.825073       27.88159       20.69810       2.262878    
+    28.65601       19.24440       2.770203       29.46710       17.72440    
+    3.532898       30.27029       16.23010       4.771179       31.01901    
+    14.85851       6.318970       31.73441       13.56430       8.095398    
+    32.42068       12.33420       10.06598       33.07709       11.16980    
+    12.15332       33.70679       10.06030       14.40863       34.29831    
+    9.030899       14.35828       36.69650       10.61360       16.87250    
+    34.83820       8.108200       16.81830       37.40329       9.800903    
+    19.50458       35.33331       7.277695       78.49292       38.94339    
+    9.405899       82.18872       36.10599       8.443298       78.54633    
+    36.40140       7.728500       1.831970       27.59131       20.57980    
+    2.276306       28.06860       19.00500       2.791016       28.56879    
+    17.35851       3.560486       29.06711       15.74001       4.805420    
+    29.53690       14.25470       6.359619       29.98981       12.85339    
+    8.141785       30.42679       11.52180       10.11792       30.84741    
+    10.26160       12.20972       31.25339       9.060806       14.47040    
+    31.63770       7.947006       16.93842       31.99240       6.949005    
+    19.57422       32.32199       6.050903       22.35150       32.62790    
+    5.242294       22.27771       35.78830       6.529694       25.26892    
+    32.90750       4.536102       25.19281       36.19659       5.876007    
+    28.32239       33.15720       3.940002       28.24377       36.55441    
+    5.324005       31.49969       33.37570       3.459198       31.41913    
+    36.85910       4.878204       34.79169       33.55981       3.104202    
+    34.70972       37.10550       4.548599       38.18500       33.71191    
+    2.866302       38.10217       37.29709       4.326797       41.66687    
+    33.82861       2.754196       41.58411       37.42969       4.221100    
+    45.22583       33.92239       2.725403       45.14301       37.52289    
+    4.192398       48.85052       34.01291       2.713394       48.76703    
+    37.61041       4.179001       52.52612       34.07571       2.799805    
+    52.44330       37.65109       4.256393       56.24127       34.08719    
+    3.061203       56.15991       37.60770       4.495407       59.98090    
+    34.06299       3.445602       59.90161       37.50461       4.847702    
+    63.72968       34.00931       3.931305       63.65253       37.35330    
+    5.293594       67.47852       33.92941       4.503204       67.40399    
+    37.15939       5.819107       71.21527       33.82959       5.142395    
+    71.14349       36.93329       6.406693       74.92963       33.71240    
+    5.839203       74.86133       36.67819       7.047394       78.61133    
+    33.58109       6.579605       82.25043       33.43820       7.356705    
+    85.83649       33.28589       8.160904       1.839478       27.28369    
+    20.52060       2.291687       27.44580       18.88499       2.814392    
+    27.61719       17.17500       3.592224       27.79150       15.49420    
+    4.844421       27.96561       13.95180       6.405518       28.13940    
+    12.49699       8.194275       28.31271       11.11440       10.17670    
+    28.48389       9.806198       12.27478       28.65259       8.559692    
+    14.54053       28.81741       7.403503       17.01343       28.97589    
+    6.367706       19.65369       29.12961       5.435699       22.43451    
+    29.27780       4.596695       25.35571       29.42020       3.864197    
+    28.41217       29.55591       3.246002       31.59149       29.68311    
+    2.747604       34.88519       29.80151       2.379898       38.27972    
+    29.91089       2.133896       41.76190       30.01151       2.018494    
+    45.32098       30.10550       1.989807       48.94550       30.19919    
+    1.978500       52.62048       30.28519       2.069305       56.33392    
+    30.35529       2.342102       60.07172       30.41431       2.742493    
+    63.81830       30.46390       3.248093       67.56360       30.50510    
+    3.843399       71.29712       30.53979       4.508499       75.00818    
+    30.56812       5.233307       78.68591       30.59180       6.003494    
+    82.32098       30.61060       6.811707       85.90302       30.62549    
+    7.648193       89.42383       30.63669       8.505798       1.847595    
+    26.97070       20.52251       2.308472       26.81180       18.88890    
+    2.840210       26.64700       17.18100       3.626892       26.49271    
+    15.50220       4.886902       26.36551       13.96170       6.455505    
+    26.25610       12.50861       8.251404       26.16040       11.12770    
+    10.24072       26.07739       9.820999       12.34521       26.00421    
+    8.576004       14.61658       25.94510       7.421204       17.09473    
+    25.90430       6.386597       19.73969       25.87891       5.455795    
+    22.52478       25.86691       4.617798       25.44989       25.86990    
+    3.886093       28.50922       25.88840       3.268600       31.69110    
+    25.92310       2.770798       34.98700       25.97409       2.403595    
+    38.38251       26.04129       2.157806       41.86542       26.12399    
+    2.042603       45.42432       26.21829       2.013794       49.04797    
+    26.31570       2.002502       52.72308       26.42551       2.093201    
+    56.43481       26.55521       2.365601       60.17029       26.69901    
+    2.765503       63.91418       26.85400       3.270401       67.65619    
+    27.01831       3.864899       71.38562       27.18951       4.529205    
+    75.09302       27.36691       5.253098       78.76630       27.54761    
+    6.022293       82.39709       27.73099       6.829498       85.97449    
+    27.91629       7.664902       89.49139       28.10211       8.521500    
+    92.93701       28.28690       9.390396       92.87451       30.64529    
+    9.375900       96.30579       28.47070       10.26691       1.856384    
+    26.66360       20.58560       2.325806       26.19070       19.01660    
+    2.866882       25.69751       17.37621       3.662781       25.22070    
+    15.76370       4.931274       24.79831       14.28391       6.507324    
+    24.41110       12.88789       8.310486       24.05179       11.56110    
+    10.30682       23.72021       10.30560       12.41772       23.40991    
+    9.109299       14.69568       23.13211       7.999496       17.17987    
+    22.89551       7.005203       19.82977       22.69479       6.110306    
+    22.61902       22.52539       5.304703       25.54779       22.39209    
+    4.600998       28.60999       22.29669       4.007095       31.79510    
+    22.24020       3.527893       35.09222       22.22580       3.174194    
+    38.48901       22.25049       2.937103       41.97241       22.31671    
+    2.825302       45.53119       22.41061       2.796494       49.15503    
+    22.51199       2.784393       52.82928       22.64499       2.870300    
+    56.53967       22.83301       3.130707       60.27258       23.05981    
+    3.513596       64.01361       23.31812       3.997299       67.75238    
+    23.60330       4.567001       71.47821       23.90869       5.203705    
+    75.18127       24.23071       5.897705       78.85052       24.56589    
+    6.635300       82.47668       24.91061       7.409302       86.04950    
+    25.26251       8.210403       89.56097       25.61911       9.031906    
+    93.00208       25.97681       9.865295       96.36578       26.33499    
+    10.70590       99.64398       26.69119       11.54739       1.865173    
+    26.37521       20.70740       2.343628       25.60641       19.26320    
+    2.893677       24.80420       17.75320       3.698425       24.02390    
+    16.26871       4.975281       23.32419       14.90601       6.559021    
+    22.67551       13.62019       8.369812       22.06839       12.39810    
+    10.37292       21.50269       11.24130       12.49091       20.97000    
+    10.13901       14.77509       20.48581       9.116196       17.26428    
+    20.06519       8.199402       19.91913       19.69971       7.374207    
+    22.71283       19.38229       6.630997       25.64569       19.12039    
+    5.981506       28.71143       18.91721       5.432907       31.89862    
+    18.77560       4.989899       35.19769       18.69949       4.662201    
+    38.59589       18.68481       4.441803       42.07977       18.73511    
+    4.336594       45.63849       18.82980       4.307800       49.26208    
+    18.93411       4.294403       52.93549       19.08859       4.371002    
+    56.64447       19.33179       4.608200       60.37518       19.63669    
+    4.958099       64.11298       19.99219       5.400803       67.84833    
+    20.39011       5.922699       71.57068       20.82150       6.506195    
+    75.26947       21.28131       7.142502       78.93433       21.76099    
+    7.818893       82.55609       22.25781       8.528793       86.12408    
+    22.76660       9.263794       89.63080       23.28339       10.01740    
+    93.06708       23.80420       10.78220       96.42590       24.32639    
+    11.55360       99.69940       24.84619       12.32590       102.8827    
+    25.36230       13.09550       1.873230       26.11600       20.88319    
+    2.360291       25.08151       19.61909       2.919373       24.00171    
+    18.29730       3.732605       22.94870       16.99770       5.017517    
+    21.99930       15.80409       6.609070       21.11649       14.67751    
+    8.426880       20.28659       13.60629       10.43701       19.51050    
+    12.59219       12.56122       18.77759       11.62550       14.85150    
+    18.10818       10.72830       17.34558       17.52219       9.923706    
+    20.00531       17.00851       9.198898       22.80359       16.55829    
+    8.545807       25.73993       16.18121       7.974503       28.80933    
+    15.88181       7.491302       31.99847       15.66281       7.100494    
+    35.29950       15.53149       6.810394       38.69861       15.48120    
+    6.614105       42.18262       15.51730       6.518494       45.74139    
+    15.61179       6.489700       49.36542       15.71899       6.474197    
+    53.03778       15.89359       6.537506       56.74548       16.18600    
+    6.741196       60.47357       16.56131       7.043503       64.20868    
+    17.00391       7.427094       67.94092       17.50391       7.879807    
+    71.65912       18.04831       8.386597       75.35437       18.63089    
+    8.939499       79.01532       19.24100       9.527603       82.63232    
+    19.87430       10.14510       86.19623       20.52350       10.78450    
+    89.69812       21.18481       11.44031       93.12958       21.85211    
+    12.10590       96.48358       22.52151       12.77740       99.75238    
+    23.18869       13.44980       102.9308       23.85110       14.11990    
+    106.0126       24.50510       14.78380       1.880981       25.89581    
+    21.10629       2.375671       24.63599       20.07080       2.943481    
+    23.32059       18.98790       3.764771       22.03641       17.92270    
+    5.056519       20.87549       16.94370       6.655212       19.79300    
+    16.01910       8.479675       18.77441       15.13950       10.49579    
+    17.81961       14.30630       12.62592       16.91699       13.51180    
+    14.92133       16.09061       12.77390       17.42059       15.36450    
+    12.11150       20.08472       14.72491       11.51430       22.88672    
+    14.16211       10.97540       25.82642       13.68701       10.50340    
+    28.89838       13.30539       10.10330       32.09027       13.02151    
+    9.778595       35.39282       12.84329       9.536194       38.79321    
+    12.76251       9.370407       42.27753       12.78659       9.287003    
+    45.83643       12.88110       9.258102       49.46008       12.99100    
+    9.240097       53.13251       13.18240       9.286499       56.83807    
+    13.51639       9.447800       60.56439       13.95090       9.689697    
+    64.29657       14.46799       9.998199       68.02612       15.05420    
+    10.36330       71.74139       15.69510       10.77260       75.43262    
+    16.38159       11.21980       79.08929       17.10251       11.69580    
+    82.70258       17.85159       12.19591       86.26239       18.62061    
+    12.71400       89.75989       19.40451       13.24570       93.18719    
+    20.19559       13.78551       96.53699       20.98999       14.33031    
+    99.80151       21.78250       14.87590       102.9755       22.56931    
+    15.41969       106.0529       23.34671       15.95860       109.0305    
+    24.11081       16.49030       1.887878       25.72339       21.36810    
+    2.389282       24.28711       20.60069       2.963684       22.78741    
+    19.79820       3.792725       21.32199       19.00830       5.090881    
+    19.99539       18.28110       6.695679       18.75711       17.59340    
+    8.525574       17.59009       16.93860       10.54749       16.49579    
+    16.31779       12.68262       15.46039       15.72530       14.98309    
+    14.51050       15.17439       17.48682       13.67459       14.67889    
+    20.15417       12.93649       14.23129       22.96008       12.28540    
+    13.82651       25.90253       11.73389       13.47099       28.97699    
+    11.28781       13.16840       32.17059       10.95291       12.92130    
+    35.47498       10.73801       12.73500       38.87592       10.63330    
+    12.60510       42.36102       10.64841       12.53590       45.91992    
+    10.74271       12.50700       49.54327       10.85501       12.48590    
+    53.21503       11.05881       12.51241       56.91962       11.42599    
+    12.62390       60.64398       11.90701       12.79500       64.37421    
+    12.48221       13.01530       68.10101       13.13651       13.27760    
+    71.81342       13.85229       13.57260       75.50122       14.62061    
+    13.89571       79.15472       15.42749       14.24010       82.76428    
+    16.26730       14.60249       86.32031       17.13010       14.97839    
+    89.81439       18.00980       15.36440       93.23767       18.89819    
+    15.75650       96.58362       19.79050       16.15250       99.84412    
+    20.68069       16.54939       103.0148       21.56519       16.94510    
+    106.0883       22.43900       17.33730       109.0622       23.29910    
+    17.72440       1.893005       25.60550       21.65849       2.400574    
+    24.04831       21.18871       2.980896       22.42209       20.69720    
+    3.815430       20.83301       20.21249       5.119080       19.39279    
+    19.76469       6.728699       18.04761       19.34000       8.563416    
+    16.77951       18.93460       10.58948       15.58960       18.54930    
+    12.72937       14.46289       18.18100       15.03339       13.42899    
+    17.83749       17.54053       12.51779       17.52710       20.21161    
+    11.71219       17.24550       23.02002       11.00070       16.98959    
+    25.96527       10.39651       16.76331       29.04120       9.906708    
+    16.56889       32.23682       9.536896       16.40790       35.54187    
+    9.296112       16.28371       38.94373       9.175995       16.19350    
+    42.42938       9.184601       16.14020       45.98822       9.278809    
+    16.11121       49.61182       9.392090       16.08690       53.28308    
+    9.605194       16.09129       56.98602       9.994904       16.14751    
+    60.70941       10.50760       16.24010       64.43768       11.12231    
+    16.36259       68.16229       11.82300       16.51070       71.87201    
+    12.59061       16.67889       75.55731       13.41479       16.86430    
+    79.20819       14.28149       17.06281       82.81488       15.18311    
+    17.27240       86.36792       16.10989       17.49049       89.85901    
+    17.05521       17.71480       93.27899       18.01001       17.94321    
+    96.62231       18.96921       18.17419       99.87927       19.92700    
+    18.40590       103.0468       20.87790       18.63730       106.1171    
+    21.81760       18.86681       109.0878       22.74271       19.09351    
+    1.897400       25.54660       21.96651       2.409119       23.92871    
+    21.81210       2.993591       22.23929       21.65030       3.832214    
+    20.58759       21.48930       5.139771       19.09109       21.33760    
+    6.753113       17.69241       21.19160       8.591675       16.37329    
+    21.05070       10.62097       15.13550       20.91510       12.76361    
+    13.96310       20.78450       15.07098       12.88721       20.66090    
+    17.58051       11.93820       20.54691       20.25409       11.09891    
+    20.44119       23.06439       10.35721       20.34309       26.01172    
+    9.726593       20.25380       29.08911       9.214813       20.17400    
+    32.28607       8.826904       20.10429       35.59222       8.574188    
+    20.04590       38.99432       8.445801       19.99800       42.48022    
+    8.450897       19.96150       46.03882       8.545410       19.93240    
+    49.66199       8.659210       19.90450       53.33319       8.877197    
+    19.88560       57.03583       9.277588       19.88319       60.75781    
+    9.806885       19.89240       64.48462       10.44171       19.91130    
+    68.20770       11.16501       19.93851       71.91571       11.95850    
+    19.97220       75.59918       12.81079       20.01160       79.24799    
+    13.70709       20.05540       82.85272       14.63959       20.10310    
+    86.40350       15.59891       20.15370       89.89203       16.57669    
+    20.20680       93.31000       17.56491       20.26151       96.65057    
+    18.55789       20.31750       99.90570       19.54910       20.37421    
+    103.0707       20.53369       20.43130       106.1385       21.50659    
+    20.48840       109.1071       22.46411       20.54500       111.9711    
+    23.40161       20.60100       1.900085       25.54831       22.28011    
+    2.414001       23.93289       22.44690       3.001221       22.24561    
+    22.62090       3.842407       20.59641       22.78951       5.152527    
+    19.10110       22.93941       6.768188       17.70459       23.07730    
+    8.608582       16.38751       23.20560       10.64032       15.15140    
+    23.32440       12.78491       13.98050       23.43570       15.09387    
+    12.90579       23.53600       17.60541       11.95831       23.62199    
+    20.28021       11.12009       23.69550       23.09198       10.37939    
+    23.75810       26.03967       9.749786       23.80820       29.11877    
+    9.239288       23.84520       32.31610       8.852112       23.86861    
+    35.62268       8.599091       23.87720       39.02533       8.470886    
+    23.87230       42.51093       8.476288       23.85291       46.07001    
+    8.570587       23.82370       49.69348       8.684601       23.79221    
+    53.36407       8.902313       23.74950       57.06628       9.302795    
+    23.68739       60.78778       9.831299       23.61180       64.51392    
+    10.46509       23.52510       68.23547       11.18799       23.42909    
+    71.94269       11.98050       23.32590       75.62488       12.83151    
+    23.21660       79.27222       13.72711       23.10291       82.87567    
+    14.65839       22.98560       86.42517       15.61649       22.86580    
+    89.91199       16.59351       22.74440       93.32898       17.58029    
+    22.62230       96.66791       18.57230       22.50011       99.92157    
+    19.56201       22.37860       103.0851       20.54568       22.25830    
+    106.1520       21.51761       22.13960       109.1188       22.47369    
+    22.02319       111.9814       23.40991       21.90939       1.901123    
+    25.61179       22.58720       2.415710       24.06049       23.06870    
+    3.003601       22.44089       23.57159       3.846375       20.85791    
+    24.06310       5.157104       19.42380       24.50841       6.773376    
+    18.08420       24.92439       8.614685       16.82129       25.31650    
+    10.64691       15.63620       25.68440       12.79218       14.51440    
+    26.03281       15.10150       13.48459       26.35249       17.61371    
+    12.57739       26.63429       20.28870       11.77509       26.88341    
+    23.10132       11.06689       27.10330       26.04932       10.46509    
+    27.29010       29.12842       9.977997       27.44150       32.32642    
+    9.609406       27.55589       35.63287       9.370605       27.63029    
+    39.03607       9.251007       27.66740       42.52173       9.259796    
+    27.66479       46.08051       9.354004       27.63550       49.70398    
+    9.467499       27.60040       53.37488       9.679901       27.53450    
+    57.07660       10.06839       27.41400       60.79797       10.58011    
+    27.25520       64.52362       11.19260       27.06520       68.24512    
+    11.89059       26.84850       71.95142       12.65549       26.61110    
+    75.63348       13.47681       26.35620       79.28070       14.34030    
+    26.08820       82.88373       15.23849       25.80930       86.43262    
+    16.16260       25.52260       89.91937       17.10400       25.23019    
+    93.33539       18.05569       24.93491       96.67383       19.01169    
+    24.63820       99.92712       19.96561       24.34210       103.0900    
+    20.91360       24.04790       106.1562       21.84991       23.75729    
+    109.1230       22.77121       23.47121       1.900085       25.73340    
+    22.87621       2.414001       24.30688       23.65370       3.001221    
+    22.81790       24.46600       3.842407       21.36301       25.26120    
+    5.152710       20.04568       25.98450       6.768188       18.81641    
+    26.66200       8.608826       17.65799       27.30231       10.64063    
+    16.57181       27.90460       12.78491       15.54370       28.47600    
+    15.09387       14.60110       29.00200       17.60522       13.77121    
+    29.46800       20.28003       13.03909       29.88220       23.09198    
+    12.39279       30.25031       26.03967       11.84549       30.56560    
+    29.11859       11.40359       30.82460       32.31610       11.07101    
+    31.02480       35.62299       10.85818       31.16090       39.02509    
+    10.75562       31.23759       42.51111       10.77081       31.25070    
+    46.07001       10.86520       31.22150       49.69330       10.97681    
+    31.18300       53.36438       11.18039       31.09509       57.06610    
+    11.54568       30.91960       60.78778       12.02420       30.68280    
+    64.51361       12.59570       30.39540       68.23547       13.24609    
+    30.06509       71.94269       13.95801       29.70151       75.62518    
+    14.72119       29.30969       79.27240       15.52371       28.89650    
+    82.87567       16.35840       28.46561       86.42468       17.21561    
+    28.02180       89.91229       18.08960       27.56870       93.32849    
+    18.97269       27.11040       96.66791       19.85910       26.64951    
+    99.92181       20.74411       26.18919       103.0851       21.62280    
+    25.73151       106.1520       22.49069       25.27901       109.1193    
+    23.34521       24.83340       1.897400       25.90921       23.13589    
+    2.408630       24.66260       24.17940       2.993591       23.36179    
+    25.26970       3.832214       22.09161       26.33791       5.140076    
+    20.94312       27.31081       6.753113       19.87299       28.22340    
+    8.591370       18.86551       29.08670       10.62097       17.92160    
+    29.89960       12.76361       17.02951       30.67130       15.07068    
+    16.21240       31.38280       17.58051       15.49438       32.01430    
+    20.25378       14.86249       32.57700       23.06458       14.30661    
+    33.07800       26.01123       13.83759       33.50890       29.08929    
+    13.46091       33.86450       32.28583       13.18069       34.14169    
+    35.59222       13.00540       34.33340       38.99432       12.92651    
+    34.44569       42.47992       12.95169       34.47290       46.03882    
+    13.04590       34.44360       49.66229       13.15579       34.40221    
+    53.33337       13.34570       34.29460       57.03558       13.67749    
+    34.06970       60.75800       14.10840       33.76250       64.48462    
+    14.62109       33.38770       68.20721       15.20239       32.95551    
+    71.91602       15.83719       32.47850       75.59918       16.51730    
+    31.96359       79.24768       17.23151       31.42000       82.85272    
+    17.97339       30.85240       86.40302       18.73541       30.26759    
+    89.89178       19.51169       29.66991       93.30981       20.29568    
+    29.06531       96.65033       21.08200       28.45689       99.90552    
+    21.86691       27.84900       103.0704       22.64670       27.24429    
+    106.1385       23.41650       26.64630       1.893005       26.13211    
+    23.35620       2.400818       25.11401       24.62550       2.980896    
+    24.05151       25.95180       3.814880       23.01590       27.25150    
+    5.118774       22.08200       28.43640       6.728699       21.21341    
+    29.54860       8.563416       20.39749       30.60100       10.58948    
+    19.63449       31.59270       12.72858       18.91431       32.53450    
+    15.03308       18.25629       33.40331       17.54053       17.68121    
+    34.17529       20.21143       17.17630       34.86391       23.01971    
+    16.73459       35.47791       25.96478       16.36450       36.00681    
+    29.04120       16.07101       36.44450       32.23682       15.85690    
+    36.78700       35.54169       15.72949       37.02580       38.94348    
+    15.68091       37.16830       42.42908       15.71799       37.20760    
+    45.98798       15.81250       37.17821       49.61151       15.91971    
+    37.13429       53.28241       16.09299       37.00990       56.98578    
+    16.38211       36.74310       60.70923       16.75269       36.37630    
+    64.43738       17.19040       35.92731       68.16199       17.68381    
+    35.40849       71.87201       18.22141       34.83530       75.55731    
+    18.79590       34.21590       79.20819       19.39819       33.56149    
+    82.81488       20.02271       32.87820       86.36761       20.66360    
+    32.17349       89.85883       21.31619       31.45329       93.27869    
+    21.97391       30.72430       96.62201       22.63400       29.99071    
+    99.87927       23.29221       29.25751       103.0466       23.94531    
+    28.52820       1.890808       26.25851       23.44890       2.395081    
+    25.37061       24.81300       2.972778       24.44360       26.23860    
+    3.804382       23.54050       27.63589       5.105591       22.72879    
+    28.90990       6.713074       21.97491       30.10590       8.545593    
+    21.26761       31.23801       10.56952       20.60739       32.30479    
+    12.70697       19.98459       33.31810       15.00952       19.41699    
+    34.25320       17.51477       18.92239       35.08430       20.18451    
+    18.48969       35.82581       22.99158       18.11301       36.48730    
+    25.93549       17.79959       37.05740       29.01093       17.55301    
+    37.52960       32.20532       17.37671       37.89960       35.51019    
+    17.27560       38.15820       38.91180       17.24490       38.31351    
+    42.39722       17.28879       38.35780       45.95599       17.38309    
+    38.32840       49.57953       17.48901       38.28340       53.25067    
+    17.65280       38.15199       56.95453       17.91800       37.86749    
+    60.67841       18.25439       37.47569       64.40771       18.64890    
+    36.99550       68.13300       19.09280       36.44031       71.84442    
+    19.57541       35.82660       75.53070       20.09009       35.16319    
+    79.18298       20.62839       34.46230       82.79120       21.18631    
+    33.73019       86.34509       21.75851       32.97510       89.83783    
+    22.34030       32.20340       93.25958       22.92679       31.42210    
+    96.60370       23.51511       30.63580       99.86298       24.10129    
+    29.85001       103.0314       24.68311       29.06821       1.887878    
+    26.39359       23.52879       2.389587       25.64359       24.97490    
+    2.963684       24.86130       26.48599       3.792175       24.10031    
+    27.96719       5.090881       23.41821       29.31810       6.695496    
+    22.78659       30.58650       8.525574       22.19531       31.78720    
+    10.54730       21.64450       32.91879       12.68262       21.12601    
+    33.99390       14.98279       20.65500       34.98590       17.48651    
+    20.24631       35.86800       20.15399       19.89111       36.65520    
+    22.95959       19.58301       37.35760       25.90253       19.32980    
+    37.96330       28.97650       19.13379       38.46530       32.17059    
+    18.99710       38.85899       35.47479       18.92529       39.13470    
+    38.87543       18.91281       39.30090       42.36102       18.96439    
+    39.34950       45.91931       19.05859       39.32010       49.54272    
+    19.16260       39.27420       53.21478       19.31589       39.13670    
+    56.91913       19.55569       38.83701       60.64368       19.85571    
+    38.42360       64.37402       20.20480       37.91650       68.10028    
+    20.59570       37.32990       71.81293       21.01880       36.68130    
+    75.50092       21.46970       35.98010       79.15448       21.94040    
+    35.23900       82.76453       22.42749       34.46480       86.32001    
+    22.92599       33.66640       89.81439       23.43259       32.85010    
+    93.23767       23.94339       32.02380       96.58392       24.45459    
+    31.19209       99.84412       24.96411       30.36090       1.884521    
+    26.53589       23.59500       2.382813       25.93161       25.10890    
+    2.953796       25.30151       26.69090       3.778687       24.69019    
+    28.24170       5.074280       24.14481       29.65620       6.676208    
+    23.64182       30.98450       8.503113       23.17261       32.24200    
+    10.52240       22.73709       33.42740       12.65552       22.32861    
+    34.55350       14.95313       21.95871       35.59280       17.45453    
+    21.64090       36.51711       20.12079       21.36691       37.34210    
+    22.92450       21.13211       38.07840       25.86572       20.94171    
+    38.71359       28.93890       20.79861       39.24020       32.13177    
+    20.70432       39.65350       35.43518       20.66260       39.94341    
+    38.83588       20.66971       40.11870       42.32050       20.72900    
+    40.17090       45.87927       20.82300       40.14149       49.50293    
+    20.92581       40.09480       53.17517       21.06839       39.95230    
+    56.88031       21.28101       39.64000       60.60571       21.54221    
+    39.20860       64.33691       21.84351       38.67940       68.06458    
+    22.17871       38.06670       71.77832       22.53979       37.38921    
+    75.46820       22.92310       36.65660       79.12299       23.32251    
+    35.88220       82.73480       23.73489       35.07330       86.29187    
+    24.15601       34.23880       89.78833       24.58350       33.38570    
+    93.21332       25.01370       32.52209       96.56122       25.44461    
+    31.65280       99.82343       25.87329       30.78400       1.881287    
+    26.68381       23.64700       2.375671       26.23099       25.21420    
+    2.943115       25.75949       26.85190       3.764587       25.30350    
+    28.45740       5.056274       24.90039       29.92200       6.655029    
+    24.53149       31.29730       8.479187       24.18951       32.59950    
+    10.49579       23.87411       33.82710       12.62592       23.57959    
+    34.99330       14.92133       23.31540       36.06979       17.42029    
+    23.09180       37.02730       20.08472       22.90231       37.88200    
+    22.88690       22.74341       38.64500       25.82611       22.61871    
+    39.30330       28.89807       22.53049       39.84930       32.09003    
+    22.48050       40.27800       35.39282       22.47049       40.57899    
+    38.79272       22.49780       40.76140       42.27728       22.56519    
+    40.81650       45.83612       22.65970       40.78700       49.45972    
+    22.76031       40.73981       53.13202       22.89160       40.59340    
+    56.83783       23.07599       40.27119       60.56409       23.29739    
+    39.82581       64.29681       23.54910       39.27890       68.02582    
+    23.82571       38.64580       71.74109       24.12231       37.94560    
+    75.43262       24.43549       37.18829       79.08929       24.76050    
+    36.38789       82.70282       25.09470       35.55150       86.26178    
+    25.43579       34.68880       89.75989       25.78101       33.80670    
+    93.18738       26.12769       32.91380       96.53662       26.47461    
+    32.01489       1.877075       26.83621       23.68420       2.368103    
+    26.53961       25.28940       2.931274       26.23120       26.96690    
+    3.749207       25.93530       28.61140       5.037292       25.67871    
+    30.11169       6.632507       25.44751       31.52080       8.453613    
+    25.23611       32.85480       10.46698       25.04471       34.11250    
+    12.59387       24.86740       35.30740       14.88690       24.71240    
+    36.41051       17.38397       24.58621       37.39160       20.04559    
+    24.48389       38.26750       22.84613       24.40280       39.04961    
+    25.78387       24.34619       39.72430       28.85437       24.31470    
+    40.28419       32.04510       24.30981       40.72400       35.34698    
+    24.33231       41.03290       38.74652       24.38062       41.22040    
+    42.23090       24.45609       41.27760       45.78967       24.54999    
+    41.24809       49.41382       24.64941       41.20030       53.08612    
+    24.76901       41.05110       56.79272       24.92459       40.72180    
+    60.51990       25.10480       40.26640       64.25378       25.30469    
+    39.70700       67.98407       25.52200       39.05930       71.70111    
+    25.75220       38.34290       75.39423       25.99271       37.56799    
+    79.05292       26.24121       36.74890       82.66809       26.49539    
+    35.89301       86.22968       26.75339       35.01010       89.72968    
+    27.01419       34.10730       93.15887       27.27490       33.19350    
+    96.51093       27.53519       32.27350       1.873230       26.99121    
+    23.70630       2.360291       26.85379       25.33420       2.919373    
+    26.71149       27.03540       3.732788       26.57889       28.70320    
+    5.017273       26.47189       30.22470       6.608582       26.38129    
+    31.65379       8.426514       26.30319       33.00690       10.43701    
+    26.23749       34.28250       12.56073       26.18021       35.49451    
+    14.85101       26.13599       36.61330       17.34540       26.10840    
+    37.60860       20.00513       26.09500       38.49719       22.80322    
+    26.09351       39.29060       25.73938       26.10599       39.97520    
+    28.80798       26.13211       40.54330       31.99823       26.17331    
+    40.98959       35.29901       26.22900       41.30330       38.69818    
+    26.29861       41.49380       42.18262       26.38281       41.55220    
+    45.74109       26.47659       41.52271       49.36493       26.57419    
+    41.47470       53.03778       26.68210       41.32381       56.74481    
+    26.80789       40.99030       60.47357       26.94611       40.52890    
+    64.20837       27.09399       39.96201       67.94061       27.25021    
+    39.30560       71.65912       27.41260       38.57961       75.35388    
+    27.57959       37.79420       79.01477       27.75000       36.96400    
+    82.63232       27.92261       36.09641       86.19568       28.09641    
+    35.20151       89.69788       28.27051       34.28641       93.12927    
+    28.44339       33.36011       1.869080       27.14789       23.71300    
+    2.351990       27.17090       25.34770       2.906921       27.19650    
+    27.05611       3.715515       27.22879       28.73090       4.996521    
+    27.27219       30.25890       6.584595       27.32321       31.69400    
+    8.398621       27.37991       33.05280       10.40521       27.44119    
+    34.33380       12.52661       27.50491       35.55090       14.81342    
+    27.57251       36.67461       17.30511       27.64499       37.67410    
+    19.96228       27.72070       38.56650       22.75873       27.79980    
+    39.36330       25.69281       27.88181       40.05090       28.76038    
+    27.96661       40.62151       31.94891       28.05371       41.06979    
+    35.24902       28.14310       41.38490       38.64740       28.23441    
+    41.57629       42.13147       28.32669       41.63510       45.69043    
+    28.42090       41.60550       49.31458       28.51639       41.55760    
+    52.98700       28.61279       41.40610       56.69501       28.70831    
+    41.07140       60.42468       28.80441       40.60809       64.16107    
+    28.89969       40.03900       67.89502       28.99411       39.38000    
+    71.61542       29.08789       38.65100       75.31219       29.18091    
+    37.86250       78.97528       29.27271       37.02890       82.59473    
+    29.36279       36.15781       86.16028       29.45139       35.25929    
+    89.66449       29.53839       34.34050       93.09833       29.62299    
+    33.41040       1.865173       27.30441       23.70441       2.343628    
+    27.48801       25.33031       2.893494       27.68121       27.02940    
+    3.698181       27.87790       28.69510       4.974976       28.07181    
+    30.21490       6.559326       28.26489       31.64220       8.369629    
+    28.45581       32.99361       10.37268       28.64401       34.26759    
+    12.49072       28.82889       35.47810       14.77460       29.00830    
+    36.59560       17.26428       29.18021       37.58960       19.91913    
+    29.34549       38.47710       22.71283       29.50491       39.26950    
+    25.64539       29.65649       39.95329       28.71112       29.79929    
+    40.52071       31.89838       29.93329       40.96640       35.19739    
+    30.05591       41.27969       38.59521       30.16849       41.46989    
+    42.07928       30.26981       41.52820       45.63812       30.36380    
+    41.49870       49.26208       30.45749       41.45070       52.93518    
+    30.54199       41.29990       56.64398       30.60791       40.96690    
+    60.37469       30.66119       40.50591       64.11249       30.70389    
+    39.93970       67.84808       30.73709       39.28410       71.57031    
+    30.76251       38.55890       75.26923       30.78131       37.77440    
+    78.93433       30.79419       36.94521       82.55579       30.80200    
+    36.07870       86.12402       30.80539       35.18480       89.63098    
+    30.80539       34.27080       1.860474       27.45950       23.68030    
+    2.334717       27.80151       25.28160       2.880310       28.16061    
+    26.95500       3.680420       28.52029       28.59540       4.952820    
+    28.86331       30.09210       6.533386       29.19650       31.49760    
+    8.340271       29.52081       32.82840       10.34003       29.83469    
+    34.08290       12.45453       30.13889       35.27480       14.73529    
+    30.42871       36.37520       17.22180       30.69971       37.35381    
+    19.87421       30.95361       38.22760       22.66602       31.19241    
+    39.00760       25.59662       31.41309       39.68069       28.66052    
+    31.61349       40.23911       31.84662       31.79321       40.67770    
+    35.14502       31.94949       40.98590       38.54218       32.08301    
+    41.17281       42.02582       32.19260       41.22980       45.58472    
+    32.28671       41.20030       49.20868       32.37839       41.15260    
+    52.88251       32.45090       41.00369       56.59198       32.48749    
+    40.67520       60.32391       32.49899       40.22070       64.06317    
+    32.48969       39.66260       67.79999       32.46191       39.01640    
+    71.52441       32.41940       38.30170       75.22552       32.36499    
+    37.52859       78.89221       32.30029       36.71140       82.51648    
+    32.22659       35.85760       86.08661       32.14581       34.97681    
+    1.856384       27.61130       23.64130       2.326111       28.10910    
+    25.20261       2.866882       28.63110       26.83411       3.662476    
+    29.14990       28.43359       4.930603       29.63919       29.89270    
+    6.507019       30.10989       31.26289       8.310181       30.56451    
+    32.56020       10.30627       31.00119       33.78310       12.41772    
+    31.42291       34.94490       14.69550       31.82129       36.01730    
+    17.17908       32.18900       36.97110       19.82928       32.52979    
+    37.82260       22.61859       32.84601       38.58260       25.54730    
+    33.13409       39.23830       28.61023       33.39182       39.78220    
+    31.79462       33.61621       40.20930       35.09198       33.80469    
+    40.50900       38.48871       33.95901       40.69060       41.97180    
+    34.07709       40.74550       45.53070       34.17111       40.71600    
+    49.15472       34.26120       40.66879       52.82880       34.32251    
+    40.52280       56.53918       34.33011       40.20171       60.27240    
+    34.30051       39.75780       64.01312       34.23999       39.21291    
+    67.75189       34.15210       38.58200       71.47803       34.04370    
+    37.88429       75.18079       33.91699       37.12981       78.84998    
+    33.77591       36.33220       82.47632       33.62231       35.49890    
+    86.04932       33.45920       34.63930       1.852173       27.75879    
+    23.58749       2.317505       28.40720       25.09360       2.853210    
+    29.08670       26.66750       3.644470       29.76050       28.21040    
+    4.908813       30.39139       29.61760       6.481079       30.99539    
+    30.93910       8.280212       31.57639       32.19020       10.27338    
+    32.13281       33.36940       12.38098       32.66800       34.48959    
+    14.65588       33.17160       35.52361       17.13690       33.63309    
+    36.44310       19.78412       34.05829       37.26370       22.57123    
+    34.44971       37.99620       25.49799       34.80350       38.62801    
+    28.55951       35.11600       39.15179       31.74261       35.38400    
+    39.56290       35.03900       35.60400       39.85110       38.43518    
+    35.77881       40.02530       41.91821       35.90479       40.07719    
+    45.47699       35.99881       40.04781       49.10101       36.08740    
+    40.00121       52.77533       36.13699       39.85930       56.48682    
+    36.11649       39.54849       60.22113       36.04739       39.11909    
+    63.96332       35.93729       38.59230       67.70331       35.79169    
+    37.98260       71.43182       35.61890       37.30840       75.13641    
+    35.42239       36.57941       78.80798       35.20731       35.80890    
+    82.43652       34.97629       35.00391       1.847778       27.89990    
+    23.51961       2.308472       28.69339       24.95599       2.840027    
+    29.52420       26.45720       3.626587       30.34671       27.92860    
+    4.886902       31.11301       29.27060       6.455322       31.84549    
+    30.53050       8.250916       32.54761       31.72321       10.24042    
+    33.21881       32.84740       12.34473       33.86301       33.91510    
+    14.61639       34.46780       34.90060       17.09491       35.01901    
+    35.77679       19.73938       35.52490       36.55870       22.52460    
+    35.98901       37.25630       25.44958       36.40601       37.85780    
+    28.50897       36.77051       38.35640       31.69092       37.08081    
+    38.74730       34.98651       37.33060       39.02110       38.38202    
+    37.52509       39.18590       41.86493       37.65869       39.23410    
+    45.42383       37.75241       39.20470       49.04797       37.83960    
+    39.15891       52.72260       37.87839       39.02209       56.43451    
+    37.83160       38.72420       60.16992       37.72369       38.31329    
+    63.91351       37.56619       37.80930       67.65588       37.36499    
+    37.22630       71.38562       37.13040       36.58180       75.09302    
+    36.86700       35.88499       78.76648       36.58060       35.14861    
+    82.39691       36.27539       34.37930       1.843384       28.03391    
+    23.43800       2.299683       28.96439       24.79089       2.827087    
+    29.93900       26.20470       3.609314       30.90189       27.59039    
+    4.865417       31.79761       28.85390       6.429871       32.65091    
+    30.03999       8.221619       33.46829       31.16260       10.20789    
+    34.24799       32.22060       12.30902       34.99509       33.22540    
+    14.57758       35.69559       34.15269       17.05322       36.33279    
+    34.97681       19.69568       36.91510       35.71210       22.47888    
+    37.44751       36.36790       71.34082       38.56271       35.70940    
+    75.04968       38.23590       35.05119       78.72528       37.88260    
+    34.35580       1.839478       28.15939       23.34370       2.291687    
+    29.21829       24.60010       2.814575       30.32669       25.91299    
+    3.592224       31.42160       27.19960       4.844177       32.43799    
+    28.37250       6.405029       33.40451       29.47330       8.193787    
+    34.32932       30.51500       10.17651       35.21121       31.49651    
+    12.27441       36.05521       32.42860       14.53998       36.84521    
+    33.28850       17.01312       37.56229       34.05260       1.835571    
+    28.27469       23.23750       2.283630       29.45209       24.38510    
+    2.802429       30.68430       25.58440       3.575928       31.90060    
+    26.75940       4.824219       33.02780       27.83009       6.381775    
+    34.09891       28.83479       8.166687       35.12299       29.78529    
+    10.14618       36.09821       30.68069       12.24109       37.03131    
+    31.53090       1.831970       28.37939       23.12061       2.276611    
+    29.66379       24.14850       2.790527       31.00760       25.22250    
+    3.560486       32.33420       26.27460       4.805115       33.56180    
+    27.23289       6.359314       34.72781       28.13170       8.141296    
+    35.84180       28.98180       10.11761       36.90189       29.78239    
+    1.825073       28.55179       22.85880       2.262878       30.01251    
+    23.61850       2.769714       31.54099       24.41209       3.532715    
+    33.04861       25.18910       4.770691       34.44241       25.89560    
+    6.319275       35.76389       26.55740       8.095398       37.02560    
+    27.18269       1.819824       28.66971       22.56841       2.251404    
+    30.25150       23.03050       2.752930       31.90649       23.51320    
+    3.509888       33.53760       23.98480       4.742920       35.04471    
+    24.41190       6.285828       36.47339       24.81081       1.815613    
+    28.72879       22.26041       2.242981       30.37109       22.40710    
+    2.740417       32.08939       22.56010       3.492798       33.78271    
+    22.70810       4.721924       35.34641       22.83900       6.261230    
+    36.82889       22.95920       1.519714       47.12891       22.11620    
+    1.813416       48.72681       21.94690       1.812378       48.66360    
+    21.63969       2.236328       50.23901       21.15050       2.238220    
+    50.36670       21.77229       2.729919       51.88770       20.63870    
+    2.732605       52.08301       21.58949       3.479187       53.51251    
+    20.13420       3.482605       53.77441       21.40790       4.704773    
+    55.01389       19.66820       4.709229       55.33591       21.23730    
+    6.241089       56.43680       19.22639       6.245972       56.81641    
+    21.07350       8.006287       57.79501       18.80479       8.012390    
+    58.22879       20.91570       9.966492       59.08539       18.40421    
+    9.973328       59.57031       20.76430       12.04340       60.31839    
+    18.02130       12.05048       60.85251       20.61839       14.28967    
+    61.46881       17.66440       14.29749       62.04739       20.48080    
+    16.74530       62.50711       17.34200       16.75360       63.12619    
+    20.35429       19.37000       63.44919       17.04961       19.37878    
+    64.10449       20.23740       22.13641       64.30441       16.78400    
+    22.14587       64.99191       20.12920       25.04578       65.06131    
+    16.54919       25.05542       65.77661       20.03110       28.09198    
+    65.71021       16.34779       28.10199       66.44901       19.94411    
+    31.26361       66.24689       16.18120       31.27362       67.00439    
+    19.86861       34.55072       66.66019       16.05290       34.56171    
+    67.43140       19.80600       37.94177       66.95929       15.96030    
+    37.95258       67.73901       19.75540       41.42279       67.13431    
+    15.90590       41.43347       67.91769       19.71780       44.98163    
+    67.22751       15.87691       44.99213       68.01099       19.68880    
+    48.60638       67.30569       15.85280       48.61688       68.08841    
+    19.66100       52.28339       67.28741       15.85860       52.29382    
+    68.06491       19.64360       56.00208       67.09470       15.91840    
+    56.01239       67.86041       19.64500       59.74750       66.78049    
+    16.01610       59.75751       67.52911       19.65950       63.50311    
+    66.36551       16.14500       63.51288       67.09299       19.68500    
+    67.25922       65.86450       16.30060       67.26898       66.56711    
+    19.71989       71.00458       65.29660       16.47701       71.01361    
+    65.97171       19.76221       74.72870       64.67111       16.67130    
+    74.73700       65.31641       19.81090       78.42010       64.00131    
+    16.87930       78.42841       64.61469       19.86450       82.06921    
+    63.29471       17.09880       82.07709       63.87479       19.92250    
+    85.66669       62.55911       17.32710       85.67352       63.10519    
+    19.98390       89.20282       61.80301       17.56210       89.20941    
+    62.31369       20.04790       92.66840       61.03320       17.80099    
+    92.67499       61.50861       20.11360       1.813416       48.54169    
+    21.35069       2.237915       49.99289       20.56551       2.732605    
+    51.51071       19.74429       3.482422       53.00760       18.93610    
+    4.709229       54.39182       18.19209       6.245972       55.70480    
+    17.48880       8.011719       56.95801       16.81900       9.973328    
+    58.14990       16.18401       12.05072       59.28931       15.57820    
+    14.29779       60.35229       15.01480       16.75360       61.31299    
+    14.50819       19.37860       62.18530       14.05060       22.14587    
+    62.97849       13.63699       25.05542       63.68069       13.27370    
+    28.10199       64.28448       12.96471       31.27362       64.78519    
+    12.71240       34.56171       65.17209       12.52240       37.95227    
+    65.45459       12.39000       41.43347       65.62329       12.32001    
+    44.99231       65.71661       12.29100       48.61627       65.79639    
+    12.27020       52.29358       65.78690       12.29800       56.01288    
+    65.61771       12.41280       59.75751       65.33621       12.58859    
+    63.51288       64.96240       12.81480       67.26868       64.50931    
+    13.08389       71.01361       63.99420       13.38651       74.73718    
+    63.42679       13.71780       78.42841       62.81790       14.07100    
+    82.07727       62.17511       14.44260       85.67401       61.50610    
+    14.82790       89.20941       60.81769       15.22360       92.67517    
+    60.11670       15.62550       1.815613       48.36600       21.09100    
+    2.243286       49.63699       20.03990       2.740417       50.96680    
+    18.94070       3.492798       52.27911       17.85950       4.722107    
+    53.49438       16.86580       6.261414       54.64819       15.92740    
+    8.029175       55.75021       15.03470       9.992615       56.79980    
+    14.18910       12.07202       57.80331       13.38280       14.32050    
+    58.74051       12.63409       16.77850       59.58981       11.96190    
+    19.40472       60.36179       11.35600       22.17352       61.06470    
+    10.80930       25.08423       61.68881       10.33051       28.13129    
+    62.22711       9.924698       31.30359       62.67560       9.595505    
+    34.59271       63.02539       9.349899       37.98358       63.28339    
+    9.182007       41.46448       63.44260       9.097702       45.02362    
+    63.53589       9.068893       48.64789       63.61740       9.050995    
+    52.32507       63.62161       9.098495       56.04327       63.48560    
+    9.262695       59.78729       63.25201       9.508804       63.54187    
+    62.93729       9.822403       67.29681       62.55331       10.19350    
+    71.04053       62.11499       10.60950       74.76288       61.63040    
+    11.06390       78.45313       61.11011       11.54750       82.10052    
+    60.55960       12.05569       85.69568       59.98611       12.58211    
+    89.22992       59.39551       13.12230       92.69397       58.79349    
+    13.67070       1.819824       48.14310       20.87070       2.251404    
+    49.18549       19.59370       2.753113       50.27661       18.25861    
+    3.509888       51.35449       16.94580       4.743103       52.35519    
+    15.74020       6.285828       53.30759       14.60220       8.057617    
+    54.21881       13.52029       10.02393       55.08691       12.49600    
+    12.10687       55.91849       11.51970       14.35828       56.69650    
+    10.61360       16.81830       57.40329       9.800903       19.44739    
+    58.04840       9.069000       22.21820       58.63721       8.409393    
+    25.13031       59.16159       7.832596       28.17938       59.61700    
+    7.344803       31.35303       59.99951       6.950195       34.64227    
+    60.30130       6.657394       38.03412       60.52881       6.459396    
+    41.51563       60.67599       6.363098       45.07440       60.76929    
+    6.334305       48.69873       60.85349       6.318893       52.37567    
+    60.87430       6.383194       56.09320       60.78079       6.589294    
+    59.83612       60.60770       6.895004       63.58911       60.36789    
+    7.282806       67.34198       60.07129       7.740494       71.08441    
+    59.73071       8.252701       74.80487       59.35181       8.811600    
+    78.49292       58.94339       9.405899       82.13812       58.51050    
+    10.03000       85.73090       58.05811       10.67619       89.26312    
+    57.59161       11.33900       92.72498       57.11520       12.01160    
+    1.825073       47.88159       20.69810       2.262878       48.65601    
+    19.24440       2.770203       49.46710       17.72440       3.532898    
+    50.27029       16.23010       4.771179       51.01901       14.85851    
+    6.318970       51.73441       13.56430       8.095398       52.42068    
+    12.33420       10.06598       53.07709       11.16980       12.15332    
+    53.70679       10.06030       14.40863       54.29831       9.030899    
+    16.87250       54.83820       8.108200       19.50458       55.33331    
+    7.277695       22.27771       55.78830       6.529694       25.19281    
+    56.19659       5.876007       28.24377       56.55441       5.324005    
+    31.41913       56.85910       4.878204       34.70972       57.10550    
+    4.548599       38.10217       57.29709       4.326797       41.58411    
+    57.42969       4.221100       45.14301       57.52289       4.192398    
+    48.76703       57.61041       4.179001       52.44330       57.65109    
+    4.256393       56.15991       57.60770       4.495407       59.90161    
+    57.50461       4.847702       63.65253       57.35330       5.293594    
+    67.40399       57.15939       5.819107       71.14349       56.93329    
+    6.406693       74.86133       56.67819       7.047394       78.54633    
+    56.40140       7.728500       82.18872       56.10599       8.443298    
+    85.77869       55.79568       9.183304       89.30762       55.47440    
+    9.942200       1.831970       47.59131       20.57980       2.276306    
+    48.06860       19.00500       2.791016       48.56879       17.35851    
+    3.560486       49.06711       15.74001       4.805420       49.53690    
+    14.25470       6.359619       49.98981       12.85339       8.141785    
+    50.42679       11.52180       10.11792       50.84741       10.26160    
+    12.20972       51.25339       9.060806       14.47040       51.63770    
+    7.947006       16.93842       51.99240       6.949005       19.57422    
+    52.32199       6.050903       22.35150       52.62790       5.242294    
+    25.26892       52.90750       4.536102       28.32239       53.15720    
+    3.940002       31.49969       53.37570       3.459198       34.79169    
+    53.55981       3.104202       38.18500       53.71191       2.866302    
+    41.66687       53.82861       2.754196       45.22583       53.92239    
+    2.725403       48.85052       54.01291       2.713394       52.52612    
+    54.07571       2.799805       56.24127       54.08719       3.061203    
+    59.98090       54.06299       3.445602       63.72968       54.00931    
+    3.931305       67.47852       53.92941       4.503204       71.21527    
+    53.82959       5.142395       74.92963       53.71240       5.839203    
+    78.61133       53.58109       6.579605       82.25043       53.43820    
+    7.356705       85.83649       53.28589       8.160904       89.36200    
+    53.12619       8.985504       1.839478       47.28369       20.52060    
+    2.291687       47.44580       18.88499       2.814392       47.61719    
+    17.17500       3.592224       47.79150       15.49420       4.844421    
+    47.96561       13.95180       6.405518       48.13940       12.49699    
+    8.194275       48.31271       11.11440       10.17670       48.48389    
+    9.806198       12.27478       48.65259       8.559692       14.54053    
+    48.81741       7.403503       17.01343       48.97589       6.367706    
+    19.65369       49.12961       5.435699       22.43451       49.27780    
+    4.596695       25.35571       49.42020       3.864197       28.41217    
+    49.55591       3.246002       31.59149       49.68311       2.747604    
+    34.88519       49.80151       2.379898       38.27972       49.91089    
+    2.133896       41.76190       50.01151       2.018494       45.32098    
+    50.10550       1.989807       48.94550       50.19919       1.978500    
+    52.62048       50.28519       2.069305       56.33392       50.35529    
+    2.342102       60.07172       50.41431       2.742493       63.81830    
+    50.46390       3.248093       67.56360       50.50510       3.843399    
+    71.29712       50.53979       4.508499       75.00818       50.56812    
+    5.233307       78.68591       50.59180       6.003494       82.32098    
+    50.61060       6.811707       85.90302       50.62549       7.648193    
+    1.847595       46.97070       20.52251       2.308472       46.81180    
+    18.88890       2.840210       46.64700       17.18100       3.626892    
+    46.49271       15.50220       4.886902       46.36551       13.96170    
+    6.455505       46.25610       12.50861       8.251404       46.16040    
+    11.12770       10.24072       46.07739       9.820999       12.34521    
+    46.00421       8.576004       14.61658       45.94510       7.421204    
+    17.09473       45.90430       6.386597       19.73969       45.87891    
+    5.455795       22.52478       45.86691       4.617798       25.44989    
+    45.86990       3.886093       28.50922       45.88840       3.268600    
+    31.69110       45.92310       2.770798       34.98700       45.97409    
+    2.403595       38.38251       46.04129       2.157806       41.86542    
+    46.12399       2.042603       45.42432       46.21829       2.013794    
+    49.04797       46.31570       2.002502       52.72308       46.42551    
+    2.093201       56.43481       46.55521       2.365601       60.17029    
+    46.69901       2.765503       63.91418       46.85400       3.270401    
+    67.65619       47.01831       3.864899       71.38562       47.18951    
+    4.529205       75.09302       47.36691       5.253098       78.76630    
+    47.54761       6.022293       82.39709       47.73099       6.829498    
+    85.97449       47.91629       7.664902       1.856384       46.66360    
+    20.58560       2.325806       46.19070       19.01660       2.866882    
+    45.69751       17.37621       3.662781       45.22070       15.76370    
+    4.931274       44.79831       14.28391       6.507324       44.41110    
+    12.88789       8.310486       44.05179       11.56110       10.30682    
+    43.72021       10.30560       12.41772       43.40991       9.109299    
+    14.69568       43.13211       7.999496       17.17987       42.89551    
+    7.005203       19.82977       42.69479       6.110306       22.61902    
+    42.52539       5.304703       25.54779       42.39209       4.600998    
+    28.60999       42.29669       4.007095       31.79510       42.24020    
+    3.527893       35.09222       42.22580       3.174194       38.48901    
+    42.25049       2.937103       41.97241       42.31671       2.825302    
+    45.53119       42.41061       2.796494       49.15503       42.51199    
+    2.784393       52.82928       42.64499       2.870300       56.53967    
+    42.83301       3.130707       60.27258       43.05981       3.513596    
+    64.01361       43.31812       3.997299       67.75238       43.60330    
+    4.567001       71.47821       43.90869       5.203705       75.18127    
+    44.23071       5.897705       78.85052       44.56589       6.635300    
+    82.47668       44.91061       7.409302       1.865173       46.37521    
+    20.70740       2.343628       45.60641       19.26320       2.893677    
+    44.80420       17.75320       3.698425       44.02390       16.26871    
+    4.975281       43.32419       14.90601       6.559021       42.67551    
+    13.62019       8.369812       42.06839       12.39810       10.37292    
+    41.50269       11.24130       12.49091       40.97000       10.13901    
+    14.77509       40.48581       9.116196       17.26428       40.06519    
+    8.199402       19.91913       39.69971       7.374207       22.71283    
+    39.38229       6.630997       25.64569       39.12039       5.981506    
+    28.71143       38.91721       5.432907       31.89862       38.77560    
+    4.989899       35.19769       38.69949       4.662201       38.59589    
+    38.68481       4.441803       42.07977       38.73511       4.336594    
+    45.63849       38.82980       4.307800       49.26208       38.93411    
+    4.294403       52.93549       39.08859       4.371002       56.64447    
+    39.33179       4.608200       60.37518       39.63669       4.958099    
+    64.11298       39.99219       5.400803       67.84833       40.39011    
+    5.922699       71.57068       40.82150       6.506195       75.26947    
+    41.28131       7.142502       78.93433       41.76099       7.818893    
+    1.873230       46.11600       20.88319       2.360291       45.08151    
+    19.61909       2.919373       44.00171       18.29730       3.732605    
+    42.94870       16.99770       5.017517       41.99930       15.80409    
+    6.609070       41.11649       14.67751       8.426880       40.28659    
+    13.60629       10.43701       39.51050       12.59219       12.56122    
+    38.77759       11.62550       14.85150       38.10818       10.72830    
+    79.01532       39.24100       9.527603       1.880981       45.89581    
+    21.10629       2.375671       44.63599       20.07080       2.943481    
+    43.32059       18.98790       3.764771       42.03641       17.92270    
+    5.056519       40.87549       16.94370       6.655212       39.79300    
+    16.01910       8.479675       38.77441       15.13950       10.49579    
+    37.81961       14.30630       1.887878       45.72339       21.36810    
+    2.389282       44.28711       20.60069       2.963684       42.78741    
+    19.79820       3.792725       41.32199       19.00830       5.090881    
+    39.99539       18.28110       6.695679       38.75711       17.59340    
+    8.525574       37.59009       16.93860       1.893005       45.60550    
+    21.65849       2.400574       44.04831       21.18871       2.980896    
+    42.42209       20.69720       3.815430       40.83301       20.21249    
+    5.119080       39.39279       19.76469       6.728699       38.04761    
+    19.34000       1.897400       45.54660       21.96651       2.409119    
+    43.92871       21.81210       2.993591       42.23929       21.65030    
+    3.832214       40.58759       21.48930       5.139771       39.09109    
+    21.33760       6.753113       37.69241       21.19160       1.900085    
+    45.54831       22.28011       2.414001       43.93289       22.44690    
+    3.001221       42.24561       22.62090       3.842407       40.59641    
+    22.78951       5.152527       39.10110       22.93941       6.768188    
+    37.70459       23.07730       1.901123       45.61179       22.58720    
+    2.415710       44.06049       23.06870       3.003601       42.44089    
+    23.57159       3.846375       40.85791       24.06310       5.157104    
+    39.42380       24.50841       6.773376       38.08420       24.92439    
+    1.900085       45.73340       22.87621       2.414001       44.30688    
+    23.65370       3.001221       42.81790       24.46600       3.842407    
+    41.36301       25.26120       5.152710       40.04568       25.98450    
+    6.768188       38.81641       26.66200       8.608826       37.65799    
+    27.30231       1.897400       45.90921       23.13589       2.408630    
+    44.66260       24.17940       2.993591       43.36179       25.26970    
+    3.832214       42.09161       26.33791       5.140076       40.94312    
+    27.31081       6.753113       39.87299       28.22340       8.591370    
+    38.86551       29.08670       10.62097       37.92160       29.89960    
+    1.893005       46.13211       23.35620       2.400818       45.11401    
+    24.62550       2.980896       44.05151       25.95180       3.814880    
+    43.01590       27.25150       5.118774       42.08200       28.43640    
+    6.728699       41.21341       29.54860       8.563416       40.39749    
+    30.60100       10.58948       39.63449       31.59270       12.72858    
+    38.91431       32.53450       1.890808       46.25851       23.44890    
+    2.395081       45.37061       24.81300       2.972778       44.44360    
+    26.23860       3.804382       43.54050       27.63589       5.105591    
+    42.72879       28.90990       6.713074       41.97491       30.10590    
+    8.545593       41.26761       31.23801       10.56952       40.60739    
+    32.30479       12.70697       39.98459       33.31810       15.00952    
+    39.41699       34.25320       15.03308       38.25629       33.40331    
+    17.51477       38.92239       35.08430       1.887878       46.39359    
+    23.52879       2.389587       45.64359       24.97490       2.963684    
+    44.86130       26.48599       3.792175       44.10031       27.96719    
+    5.090881       43.41821       29.31810       6.695496       42.78659    
+    30.58650       8.525574       42.19531       31.78720       10.54730    
+    41.64450       32.91879       12.68262       41.12601       33.99390    
+    14.98279       40.65500       34.98590       17.48651       40.24631    
+    35.86800       20.15399       39.89111       36.65520       20.18451    
+    38.48969       35.82581       22.95959       39.58301       37.35760    
+    22.99158       38.11301       36.48730       25.90253       39.32980    
+    37.96330       68.13300       39.09280       36.44031       71.81293    
+    41.01880       36.68130       68.10028       40.59570       37.32990    
+    71.84442       39.57541       35.82660       75.50092       41.46970    
+    35.98010       75.53070       40.09009       35.16319       79.15448    
+    41.94040       35.23900       79.18298       40.62839       34.46230    
+    1.884521       46.53589       23.59500       2.382813       45.93161    
+    25.10890       2.953796       45.30151       26.69090       3.778687    
+    44.69019       28.24170       5.074280       44.14481       29.65620    
+    6.676208       43.64182       30.98450       8.503113       43.17261    
+    32.24200       10.52240       42.73709       33.42740       12.65552    
+    42.32861       34.55350       14.95313       41.95871       35.59280    
+    17.45453       41.64090       36.51711       20.12079       41.36691    
+    37.34210       22.92450       41.13211       38.07840       25.86572    
+    40.94171       38.71359       28.93890       40.79861       39.24020    
+    28.97650       39.13379       38.46530       32.13177       40.70432    
+    39.65350       32.17059       38.99710       38.85899       35.43518    
+    40.66260       39.94341       35.47479       38.92529       39.13470    
+    38.83588       40.66971       40.11870       38.87543       38.91281    
+    39.30090       42.32050       40.72900       40.17090       42.36102    
+    38.96439       39.34950       45.87927       40.82300       40.14149    
+    45.91931       39.05859       39.32010       49.50293       40.92581    
+    40.09480       49.54272       39.16260       39.27420       53.17517    
+    41.06839       39.95230       53.21478       39.31589       39.13670    
+    56.88031       41.28101       39.64000       56.91913       39.55569    
+    38.83701       60.60571       41.54221       39.20860       60.64368    
+    39.85571       38.42360       64.33691       41.84351       38.67940    
+    64.37402       40.20480       37.91650       68.06458       42.17871    
+    38.06670       71.77832       42.53979       37.38921       75.46820    
+    42.92310       36.65660       79.12299       43.32251       35.88220    
+    1.881287       46.68381       23.64700       2.375671       46.23099    
+    25.21420       2.943115       45.75949       26.85190       3.764587    
+    45.30350       28.45740       5.056274       44.90039       29.92200    
+    6.655029       44.53149       31.29730       8.479187       44.18951    
+    32.59950       10.49579       43.87411       33.82710       12.62592    
+    43.57959       34.99330       14.92133       43.31540       36.06979    
+    17.42029       43.09180       37.02730       20.08472       42.90231    
+    37.88200       22.88690       42.74341       38.64500       25.82611    
+    42.61871       39.30330       28.89807       42.53049       39.84930    
+    32.09003       42.48050       40.27800       35.39282       42.47049    
+    40.57899       38.79272       42.49780       40.76140       42.27728    
+    42.56519       40.81650       45.83612       42.65970       40.78700    
+    49.45972       42.76031       40.73981       53.13202       42.89160    
+    40.59340       56.83783       43.07599       40.27119       60.56409    
+    43.29739       39.82581       64.29681       43.54910       39.27890    
+    68.02582       43.82571       38.64580       71.74109       44.12231    
+    37.94560       75.43262       44.43549       37.18829       79.08929    
+    44.76050       36.38789       82.70282       45.09470       35.55150    
+    1.877075       46.83621       23.68420       2.368103       46.53961    
+    25.28940       2.931274       46.23120       26.96690       3.749207    
+    45.93530       28.61140       5.037292       45.67871       30.11169    
+    6.632507       45.44751       31.52080       8.453613       45.23611    
+    32.85480       10.46698       45.04471       34.11250       12.59387    
+    44.86740       35.30740       14.88690       44.71240       36.41051    
+    17.38397       44.58621       37.39160       20.04559       44.48389    
+    38.26750       22.84613       44.40280       39.04961       25.78387    
+    44.34619       39.72430       28.85437       44.31470       40.28419    
+    32.04510       44.30981       40.72400       35.34698       44.33231    
+    41.03290       38.74652       44.38062       41.22040       42.23090    
+    44.45609       41.27760       45.78967       44.54999       41.24809    
+    49.41382       44.64941       41.20030       53.08612       44.76901    
+    41.05110       56.79272       44.92459       40.72180       60.51990    
+    45.10480       40.26640       64.25378       45.30469       39.70700    
+    67.98407       45.52200       39.05930       71.70111       45.75220    
+    38.34290       75.39423       45.99271       37.56799       79.05292    
+    46.24121       36.74890       82.66809       46.49539       35.89301    
+    1.873230       46.99121       23.70630       2.360291       46.85379    
+    25.33420       2.919373       46.71149       27.03540       3.732788    
+    46.57889       28.70320       5.017273       46.47189       30.22470    
+    6.608582       46.38129       31.65379       8.426514       46.30319    
+    33.00690       10.43701       46.23749       34.28250       12.56073    
+    46.18021       35.49451       14.85101       46.13599       36.61330    
+    17.34540       46.10840       37.60860       20.00513       46.09500    
+    38.49719       22.80322       46.09351       39.29060       25.73938    
+    46.10599       39.97520       28.80798       46.13211       40.54330    
+    31.99823       46.17331       40.98959       35.29901       46.22900    
+    41.30330       38.69818       46.29861       41.49380       42.18262    
+    46.38281       41.55220       45.74109       46.47659       41.52271    
+    49.36493       46.57419       41.47470       53.03778       46.68210    
+    41.32381       56.74481       46.80789       40.99030       60.47357    
+    46.94611       40.52890       64.20837       47.09399       39.96201    
+    67.94061       47.25021       39.30560       71.65912       47.41260    
+    38.57961       75.35388       47.57959       37.79420       79.01477    
+    47.75000       36.96400       82.63232       47.92261       36.09641    
+    1.869080       47.14789       23.71300       2.351990       47.17090    
+    25.34770       2.906921       47.19650       27.05611       3.715515    
+    47.22879       28.73090       4.996521       47.27219       30.25890    
+    6.584595       47.32321       31.69400       8.398621       47.37991    
+    33.05280       10.40521       47.44119       34.33380       12.52661    
+    47.50491       35.55090       14.81342       47.57251       36.67461    
+    17.30511       47.64499       37.67410       19.96228       47.72070    
+    38.56650       22.75873       47.79980       39.36330       25.69281    
+    47.88181       40.05090       28.76038       47.96661       40.62151    
+    31.94891       48.05371       41.06979       35.24902       48.14310    
+    41.38490       38.64740       48.23441       41.57629       42.13147    
+    48.32669       41.63510       45.69043       48.42090       41.60550    
+    49.31458       48.51639       41.55760       52.98700       48.61279    
+    41.40610       56.69501       48.70831       41.07140       60.42468    
+    48.80441       40.60809       64.16107       48.89969       40.03900    
+    67.89502       48.99411       39.38000       71.61542       49.08789    
+    38.65100       75.31219       49.18091       37.86250       78.97528    
+    49.27271       37.02890       82.59473       49.36279       36.15781    
+    1.865173       47.30441       23.70441       2.343628       47.48801    
+    25.33031       2.893494       47.68121       27.02940       3.698181    
+    47.87790       28.69510       4.974976       48.07181       30.21490    
+    6.559326       48.26489       31.64220       8.369629       48.45581    
+    32.99361       10.37268       48.64401       34.26759       12.49072    
+    48.82889       35.47810       14.77460       49.00830       36.59560    
+    17.26428       49.18021       37.58960       19.91913       49.34549    
+    38.47710       22.71283       49.50491       39.26950       25.64539    
+    49.65649       39.95329       28.71112       49.79929       40.52071    
+    31.89838       49.93329       40.96640       35.19739       50.05591    
+    41.27969       38.59521       50.16849       41.46989       42.07928    
+    50.26981       41.52820       45.63812       50.36380       41.49870    
+    49.26208       50.45749       41.45070       52.93518       50.54199    
+    41.29990       56.64398       50.60791       40.96690       60.37469    
+    50.66119       40.50591       64.11249       50.70389       39.93970    
+    67.84808       50.73709       39.28410       71.57031       50.76251    
+    38.55890       75.26923       50.78131       37.77440       78.93433    
+    50.79419       36.94521       82.55579       50.80200       36.07870    
+    86.12402       50.80539       35.18480       1.860474       47.45950    
+    23.68030       2.334717       47.80151       25.28160       2.880310    
+    48.16061       26.95500       3.680420       48.52029       28.59540    
+    4.952820       48.86331       30.09210       6.533386       49.19650    
+    31.49760       8.340271       49.52081       32.82840       10.34003    
+    49.83469       34.08290       12.45453       50.13889       35.27480    
+    14.73529       50.42871       36.37520       17.22180       50.69971    
+    37.35381       19.87421       50.95361       38.22760       22.66602    
+    51.19241       39.00760       25.59662       51.41309       39.68069    
+    28.66052       51.61349       40.23911       31.84662       51.79321    
+    40.67770       35.14502       51.94949       40.98590       38.54218    
+    52.08301       41.17281       42.02582       52.19260       41.22980    
+    45.58472       52.28671       41.20030       49.20868       52.37839    
+    41.15260       52.88251       52.45090       41.00369       56.59198    
+    52.48749       40.67520       60.32391       52.49899       40.22070    
+    64.06317       52.48969       39.66260       67.79999       52.46191    
+    39.01640       71.52441       52.41940       38.30170       75.22552    
+    52.36499       37.52859       78.89221       52.30029       36.71140    
+    82.51648       52.22659       35.85760       86.08661       52.14581    
+    34.97681       1.856384       47.61130       23.64130       2.326111    
+    48.10910       25.20261       2.866882       48.63110       26.83411    
+    3.662476       49.14990       28.43359       4.930603       49.63919    
+    29.89270       6.507019       50.10989       31.26289       8.310181    
+    50.56451       32.56020       10.30627       51.00119       33.78310    
+    12.41772       51.42291       34.94490       14.69550       51.82129    
+    36.01730       17.17908       52.18900       36.97110       19.82928    
+    52.52979       37.82260       22.61859       52.84601       38.58260    
+    25.54730       53.13409       39.23830       28.61023       53.39182    
+    39.78220       31.79462       53.61621       40.20930       35.09198    
+    53.80469       40.50900       38.48871       53.95901       40.69060    
+    41.97180       54.07709       40.74550       45.53070       54.17111    
+    40.71600       49.15472       54.26120       40.66879       52.82880    
+    54.32251       40.52280       56.53918       54.33011       40.20171    
+    60.27240       54.30051       39.75780       64.01312       54.23999    
+    39.21291       67.75189       54.15210       38.58200       71.47803    
+    54.04370       37.88429       75.18079       53.91699       37.12981    
+    78.84998       53.77591       36.33220       82.47632       53.62231    
+    35.49890       86.04932       53.45920       34.63930       1.852173    
+    47.75879       23.58749       2.317505       48.40720       25.09360    
+    2.853210       49.08670       26.66750       3.644470       49.76050    
+    28.21040       4.908813       50.39139       29.61760       6.481079    
+    50.99539       30.93910       8.280212       51.57639       32.19020    
+    10.27338       52.13281       33.36940       12.38098       52.66800    
+    34.48959       14.65588       53.17160       35.52361       17.13690    
+    53.63309       36.44310       19.78412       54.05829       37.26370    
+    22.57123       54.44971       37.99620       25.49799       54.80350    
+    38.62801       28.55951       55.11600       39.15179       31.74261    
+    55.38400       39.56290       35.03900       55.60400       39.85110    
+    38.43518       55.77881       40.02530       41.91821       55.90479    
+    40.07719       45.47699       55.99881       40.04781       49.10101    
+    56.08740       40.00121       52.77533       56.13699       39.85930    
+    56.48682       56.11649       39.54849       60.22113       56.04739    
+    39.11909       63.96332       55.93729       38.59230       67.70331    
+    55.79169       37.98260       71.43182       55.61890       37.30840    
+    75.13641       55.42239       36.57941       78.80798       55.20731    
+    35.80890       82.43652       54.97629       35.00391       86.01190    
+    54.73291       34.17360       1.847778       47.89990       23.51961    
+    2.308472       48.69339       24.95599       2.840027       49.52420    
+    26.45720       3.626587       50.34671       27.92860       4.886902    
+    51.11301       29.27060       6.455322       51.84549       30.53050    
+    8.250916       52.54761       31.72321       10.24042       53.21881    
+    32.84740       12.34473       53.86301       33.91510       14.61639    
+    54.46780       34.90060       17.09491       55.01901       35.77679    
+    19.73938       55.52490       36.55870       22.52460       55.98901    
+    37.25630       25.44958       56.40601       37.85780       28.50897    
+    56.77051       38.35640       31.69092       57.08081       38.74730    
+    34.98651       57.33060       39.02110       38.38202       57.52509    
+    39.18590       41.86493       57.65869       39.23410       45.42383    
+    57.75241       39.20470       49.04797       57.83960       39.15891    
+    52.72260       57.87839       39.02209       56.43451       57.83160    
+    38.72420       60.16992       57.72369       38.31329       63.91351    
+    57.56619       37.80930       67.65588       57.36499       37.22630    
+    71.38562       57.13040       36.58180       75.09302       56.86700    
+    35.88499       78.76648       56.58060       35.14861       82.39691    
+    56.27539       34.37930       85.97449       55.95529       33.58591    
+    89.49091       55.62381       32.77480       1.843384       48.03391    
+    23.43800       2.299683       48.96439       24.79089       2.827087    
+    49.93900       26.20470       3.609314       50.90189       27.59039    
+    4.865417       51.79761       28.85390       6.429871       52.65091    
+    30.03999       8.221619       53.46829       31.16260       10.20789    
+    54.24799       32.22060       12.30902       54.99509       33.22540    
+    14.57758       55.69559       34.15269       17.05322       56.33279    
+    34.97681       19.69568       56.91510       35.71210       22.47888    
+    57.44751       36.36790       25.40179       57.92410       36.93320    
+    28.45941       58.33859       37.40131       31.64032       58.68851    
+    37.76801       34.93518       58.96729       38.02431       38.32977    
+    59.17990       38.17799       41.81268       59.32059       38.22180    
+    45.37152       59.41479       38.19231       48.99548       59.50000    
+    38.14751       52.67059       59.52881       38.01691       56.38318    
+    59.45630       37.73450       60.12030       59.31250       37.34560    
+    63.86493       59.10959       36.86920       67.60883       58.85620    
+    36.31821       71.34082       58.56271       35.70940       75.04968    
+    58.23590       35.05119       78.72528       57.88260       34.35580    
+    82.35809       57.50690       33.62939       85.93817       57.11380    
+    32.88040       89.45673       56.70779       32.11459       1.839478    
+    48.15939       23.34370       2.291687       49.21829       24.60010    
+    2.814575       50.32669       25.91299       3.592224       51.42160    
+    27.19960       4.844177       52.43799       28.37250       6.405029    
+    53.40451       29.47330       8.193787       54.32932       30.51500    
+    10.17651       55.21121       31.49651       12.27441       56.05521    
+    32.42860       14.53998       56.84521       33.28850       17.01312    
+    57.56229       34.05260       19.65350       58.21609       34.73399    
+    22.43433       58.81299       35.34151       25.35522       59.34500    
+    35.86490       28.41132       59.80621       36.29790       31.59119    
+    60.19339       36.63670       34.88489       60.49899       36.87280    
+    38.27948       60.72879       37.01360       41.76190       60.87671    
+    37.05220       45.32050       60.97021       37.02290       48.94482    
+    61.05420       36.97900       52.62012       61.07379       36.85561    
+    56.33392       60.97729       36.59120       60.07147       60.79929    
+    36.22780       63.81763       60.55441       35.78310       67.56342    
+    60.25119       35.26920       71.29681       59.90381       34.70140    
+    75.00781       59.51709       34.08791       78.68549       59.10080    
+    33.43990       82.32068       58.65921       32.76311       85.90302    
+    58.19800       32.06531       89.42383       57.72220       31.35201    
+    1.835571       48.27469       23.23750       2.283630       49.45209    
+    24.38510       2.802429       50.68430       25.58440       3.575928    
+    51.90060       26.75940       4.824219       53.02780       27.83009    
+    6.381775       54.09891       28.83479       8.166687       55.12299    
+    29.78529       10.14618       56.09821       30.68069       12.24109    
+    57.03131       31.53090       14.50409       57.90359       32.31500    
+    16.97449       58.69431       33.01140       19.61249       59.41431    
+    33.63210       22.39130       60.07080       34.18520       25.31073    
+    60.65381       34.66130       28.36542       61.15799       35.05490    
+    31.54413       61.57959       35.36211       34.83691       61.90939    
+    35.57561       38.23090       62.15530       35.70190       41.71307    
+    62.30930       35.73460       45.27191       62.40311       35.70531    
+    48.89618       62.48541       35.66270       52.57147       62.49661    
+    35.54730       56.28632       62.37769       35.30310       60.02509    
+    62.16891       34.96840       63.77240       61.88501       34.55949    
+    67.51971       61.53659       34.08720       71.25458       61.13870    
+    33.56590       74.96753       60.69730       33.00270       78.64740    
+    60.22269       32.40800       82.28461       59.72049       31.78700    
+    85.86877       59.19681       31.14690       89.39172       58.65671    
+    30.49271       1.831970       48.37939       23.12061       2.276611    
+    49.66379       24.14850       2.790527       51.00760       25.22250    
+    3.560486       52.33420       26.27460       4.805115       53.56180    
+    27.23289       6.359314       54.72781       28.13170       8.141296    
+    55.84180       28.98180       10.11761       56.90189       29.78239    
+    12.20972       57.91580       30.54230       14.46991       58.86230    
+    31.24300       16.93817       59.72000       31.86481       19.57391    
+    60.49979       32.41870       22.35083       61.20969       32.91180    
+    25.26868       61.83939       33.33600       28.32172       62.38229    
+    33.68590       31.49951       62.83499       33.95860       34.79120    
+    63.18750       34.14700       38.18481       63.44730       34.25729    
+    41.66687       63.60739       34.28371       45.22552       63.70041    
+    34.25430       48.84979       63.78229       34.21310       52.52557    
+    63.78491       34.10660       56.24091       63.64651       33.88460    
+    59.98059       63.40939       33.58160       63.72968       63.09009    
+    33.21201       67.47803       62.70090       32.78571       71.21503    
+    62.25711       32.31540       74.92938       61.76611       31.80769    
+    78.61133       61.23901       31.27170       82.25043       60.68188    
+    30.71220       85.83649       60.10089       30.13570       89.36200    
+    59.50290       29.54649       92.81628       58.89359       28.95039    
+    1.825073       48.55179       22.85880       2.262878       50.01251    
+    23.61850       2.769714       51.54099       24.41209       3.532715    
+    53.04861       25.18910       4.770691       54.44241       25.89560    
+    6.319275       55.76389       26.55740       8.095398       57.02560    
+    27.18269       10.06592       58.22580       27.77090       12.15302    
+    59.37231       28.32890       14.40808       60.44220       28.84250    
+    16.87231       61.40970       29.29739       19.50427       62.28790    
+    29.70171       22.27771       63.08591       30.06081       25.19281    
+    63.79251       30.36839       28.24353       64.39990       30.62080    
+    31.41888       64.90359       30.81590       34.70941       65.29300    
+    30.94830       38.10168       65.57639       31.02260       41.58368    
+    65.74579       31.03481       45.14252       65.83890       31.00549    
+    48.76703       65.91821       30.96730       52.44312       65.90820    
+    30.88071       56.15961       65.73709       30.70850       59.90131    
+    65.45340       30.47630       63.65228       65.07620       30.19479    
+    67.40369       64.61890       29.87140       71.14301       64.09991    
+    29.51540       74.86102       63.52731       29.13181       78.54608    
+    62.91379       28.72740       82.18872       62.26569       28.30560    
+    85.77850       61.59131       27.87140       89.30731       60.89749    
+    27.42790       92.76611       60.19070       26.97940       1.819824    
+    48.66971       22.56841       2.251404       50.25150       23.03050    
+    2.752930       51.90649       23.51320       3.509888       53.53760    
+    23.98480       4.742920       55.04471       24.41190       6.285828    
+    56.47339       24.81081       8.057312       57.83670       25.18680    
+    10.02393       59.13211       25.53940       12.10663       60.37009    
+    25.87309       14.35809       61.52441       26.17940       16.81830    
+    62.56641       26.44910       19.44720       63.51221       26.68739    
+    22.21790       64.37061       26.89771       25.13013       65.12991    
+    27.07610       28.17908       65.78101       27.22040       31.35303    
+    66.31961       27.32930       34.64252       66.73410       27.39960    
+    38.03412       67.03421       27.43410       41.51508       67.20969    
+    27.43050       45.07422       67.30301       27.40120       48.69843    
+    67.38110       27.36639       52.37518       67.36179       27.30180    
+    56.09271       67.16849       27.18491       59.83588       66.85251    
+    27.03130       63.58868       66.43549       26.84760       67.34222    
+    65.93240       26.63820       71.08423       65.36160       26.40910    
+    74.80487       64.73361       26.16319       78.49237       64.06030    
+    25.90469       82.13788       63.35010       25.63570       85.73108    
+    62.61160       25.35930       89.26288       61.85229       25.07739    
+    92.72479       61.07941       24.79269       1.815613       48.72879    
+    22.26041       2.242981       50.37109       22.40710       2.740417    
+    52.08939       22.56010       3.492798       53.78271       22.70810    
+    4.721924       55.34641       22.83900       6.261230       56.82889    
+    22.95920       8.029175       58.24271       23.07060       9.992126    
+    59.58621       23.17349       12.07202       60.86960       23.26970    
+    14.32050       62.06619       23.35600       16.77850       63.14621    
+    23.42940       19.40448       64.12531       23.49170       22.17328    
+    65.01419       23.54420       25.08392       65.79980       23.58560    
+    28.13129       66.47311       23.61530       31.30359       67.02930    
+    23.63280       34.59222       67.45609       23.63730       37.98309    
+    67.76440       23.62959       41.46478       67.94312       23.60921    
+    45.02362       68.03610       23.58000       48.64807       68.11380    
+    23.54871       52.32489       68.09009       23.50751       56.04327    
+    67.88550       23.44920       59.78729       67.55350       23.37891    
+    63.54187       67.11670       23.29880       67.29657       66.59009    
+    23.21049       71.04053       65.99371       23.11580       74.76343    
+    65.33719       23.01590       78.45258       64.63449       22.91200    
+    82.10052       63.89359       22.80510       85.69550       63.12299    
+    22.69600       89.22968       62.33029       22.58549       92.69379    
+    61.52420       22.47440       98.10199       61.44901       19.94411    
+    101.2636       61.24689       16.18120       98.09198       60.71021    
+    16.34779       101.2736       62.00439       19.86861       104.5507    
+    61.66019       16.05290       104.5617       62.43140       19.80600    
+    107.9418       61.95929       15.96030       107.9526       62.73901    
+    19.75540       111.4228       62.13431       15.90590       111.4335    
+    62.91769       19.71780       114.9816       62.22751       15.87691    
+    114.9921       63.01099       19.68880       118.6064       62.30569    
+    15.85280       118.6169       63.08841       19.66100       122.2834    
+    62.28741       15.85860       122.2938       63.06491       19.64360    
+    126.0021       62.09470       15.91840       126.0124       62.86041    
+    19.64500       129.7475       61.78049       16.01610       129.7575    
+    62.52911       19.65950       133.5031       61.36551       16.14500    
+    133.5129       62.09299       19.68500       137.2592       60.86450    
+    16.30060       137.2690       61.56711       19.71989       141.0046    
+    60.29660       16.47701       141.0136       60.97171       19.76221    
+    144.7287       59.67111       16.67130       144.7370       60.31641    
+    19.81090       148.4201       59.00131       16.87930       148.4284    
+    59.61469       19.86450       152.0692       58.29471       17.09880    
+    152.0771       58.87479       19.92250       155.6667       57.55911    
+    17.32710       155.6735       58.10519       19.98390       159.2028    
+    56.80301       17.56210       159.2094       57.31369       20.04790    
+    162.6684       56.03320       17.80099       162.6750       56.50861    
+    20.11360       166.0577       55.25510       18.04280       166.0637    
+    55.69461       20.18080       169.3613       54.47461       18.28520    
+    169.3666       54.87820       20.24870       172.5744       53.69479    
+    18.52721       172.5790       54.06271       20.31689       175.6903    
+    52.92191       18.76730       175.6948       53.25421       20.38499    
+    178.7055       52.15799       19.00450       178.7097       52.45560    
+    20.45250       181.6157       51.40869       19.23730       181.6190    
+    51.67191       20.51900       184.4184       50.67459       19.46519    
+    184.4216       50.90430       20.58450       187.1105       49.95950    
+    19.68739       187.1132       50.15671       20.64841       189.6923    
+    49.26440       19.90320       189.6948       49.43021       20.71069    
+    192.1620       48.59250       20.11180       192.1642       48.72830    
+    20.77110       194.5204       47.94360       20.31320       194.5219    
+    48.04999       20.82950       196.7665       47.31790       20.50760    
+    196.7680       47.39551       20.88609       198.9040       46.71680    
+    20.69431       198.9042       46.76730       20.94051       200.8969    
+    46.07349       20.89410       200.8974       46.09549       21.00031    
+    202.8581       45.59720       21.04201       95.04578       60.06131    
+    16.54919       98.10199       59.28448       12.96471       95.05542    
+    58.68069       13.27370       101.2736       59.78519       12.71240    
+    104.5617       60.17209       12.52240       107.9523       60.45459    
+    12.39000       111.4335       60.62329       12.32001       114.9923    
+    60.71661       12.29100       118.6163       60.79639       12.27020    
+    122.2936       60.78690       12.29800       126.0129       60.61771    
+    12.41280       129.7575       60.33621       12.58859       133.5129    
+    59.96240       12.81480       137.2687       59.50931       13.08389    
+    141.0136       58.99420       13.38651       144.7372       58.42679    
+    13.71780       148.4284       57.81790       14.07100       152.0773    
+    57.17511       14.44260       155.6740       56.50610       14.82790    
+    159.2094       55.81769       15.22360       162.6752       55.11670    
+    15.62550       166.0634       54.40750       16.03140       169.3666    
+    53.69601       16.43810       172.5793       52.98541       16.84370    
+    175.6948       52.28079       17.24561       178.7094       51.58401    
+    17.64230       181.6190       50.90060       18.03160       184.4216    
+    50.23099       18.41229       187.1132       49.57809       18.78329    
+    189.6945       48.94431       19.14349       192.1638       48.33130    
+    19.49150       194.5216       47.73901       19.82750       196.7678    
+    47.16751       20.15160       198.9045       46.61938       20.46260    
+    200.8976       46.03131       20.79410       98.13129       57.22711    
+    9.924698       95.08423       56.68881       10.33051       101.3036    
+    57.67560       9.595505       104.5927       58.02539       9.349899    
+    107.9836       58.28339       9.182007       111.4645       58.44260    
+    9.097702       115.0236       58.53589       9.068893       118.6479    
+    58.61740       9.050995       122.3251       58.62161       9.098495    
+    126.0433       58.48560       9.262695       129.7873       58.25201    
+    9.508804       133.5419       57.93729       9.822403       137.2968    
+    57.55331       10.19350       141.0405       57.11499       10.60950    
+    144.7629       56.63040       11.06390       148.4531       56.11011    
+    11.54750       152.1005       55.55960       12.05569       155.6957    
+    54.98611       12.58211       159.2299       54.39551       13.12230    
+    162.6940       53.79349       13.67070       166.0812       53.18430    
+    14.22411       169.3828       52.57300       14.77840       172.5939    
+    51.96140       15.33090       175.7076       51.35519       15.87830    
+    178.7219       50.75562       16.41840       181.6298       50.16751    
+    16.94810       184.4311       49.59061       17.46629       187.1215    
+    49.02829       17.97090       189.7008       48.48221       18.46091    
+    192.1694       47.95410       18.93410       194.5261       47.44360    
+    19.39101       196.7709       46.95120       19.83170       198.9064    
+    46.47830       20.25450       200.8983       45.97049       20.70430    
+    92.17352       56.06470       10.80930       95.13031       54.16159    
+    7.832596       92.21820       53.63721       8.409393       98.17938    
+    54.61700       7.344803       101.3530       54.99951       6.950195    
+    104.6423       55.30130       6.657394       108.0341       55.52881    
+    6.459396       111.5156       55.67599       6.363098       115.0744    
+    55.76929       6.334305       118.6987       55.85349       6.318893    
+    122.3757       55.87430       6.383194       126.0932       55.78079    
+    6.589294       129.8361       55.60770       6.895004       133.5891    
+    55.36789       7.282806       137.3420       55.07129       7.740494    
+    141.0844       54.73071       8.252701       144.8049       54.35181    
+    8.811600       148.4929       53.94339       9.405899       152.1381    
+    53.51050       10.03000       155.7309       53.05811       10.67619    
+    159.2631       52.59161       11.33900       162.7250       52.11520    
+    12.01160       166.1093       51.63281       12.69020       169.4091    
+    51.14771       13.36980       172.6179       50.66281       14.04700    
+    175.7294       50.18140       14.71780       178.7408       49.70480    
+    15.37959       181.6466       49.23709       16.02859       184.4457    
+    48.77811       16.66341       187.1342       48.33109       17.28149    
+    189.7119       47.89630       17.88161       192.1781       47.47559    
+    18.46111       194.5329       47.06909       19.02060       196.7758    
+    46.67651       19.56010       198.9098       46.29929       20.07790    
+    200.8998       45.89331       20.62810       95.19281       51.19659    
+    5.876007       92.27771       50.78830       6.529694       98.24377    
+    51.55441       5.324005       101.4191       51.85910       4.878204    
+    104.7097       52.10550       4.548599       108.1022       52.29709    
+    4.326797       111.5841       52.42969       4.221100       115.1430    
+    52.52289       4.192398       118.7670       52.61041       4.179001    
+    122.4433       52.65109       4.256393       126.1599       52.60770    
+    4.495407       129.9016       52.50461       4.847702       133.6525    
+    52.35330       5.293594       137.4040       52.15939       5.819107    
+    141.1435       51.93329       6.406693       144.8613       51.67819    
+    7.047394       148.5463       51.40140       7.728500       152.1887    
+    51.10599       8.443298       155.7787       50.79568       9.183304    
+    159.3076       50.47440       9.942200       162.7662       50.14600    
+    10.71210       166.1479       49.81201       11.48880       169.4440    
+    49.47559       12.26640       172.6498       49.13870       13.04131    
+    175.7587       48.80371       13.80890       178.7668       48.47171    
+    14.56599       181.6701       48.14551       15.30840       184.4655    
+    47.82520       16.03450       187.1513       47.51251       16.74150    
+    189.7267       47.20850       17.42780       192.1901       46.91431    
+    18.09070       194.5424       46.62921       18.73039       196.7826    
+    46.35419       19.34750       198.9142       46.09009       19.93950    
+    200.9013       45.80301       20.56841       89.50458       50.33331    
+    7.277695       92.35150       47.62790       5.242294       89.57422    
+    47.32199       6.050903       95.26892       47.90750       4.536102    
+    98.32239       48.15720       3.940002       101.4997       48.37570    
+    3.459198       104.7917       48.55981       3.104202       108.1850    
+    48.71191       2.866302       111.6669       48.82861       2.754196    
+    115.2258       48.92239       2.725403       118.8505       49.01291    
+    2.713394       122.5261       49.07571       2.799805       126.2413    
+    49.08719       3.061203       129.9809       49.06299       3.445602    
+    133.7297       49.00931       3.931305       137.4785       48.92941    
+    4.503204       141.2153       48.82959       5.142395       144.9296    
+    48.71240       5.839203       148.6113       48.58109       6.579605    
+    152.2504       48.43820       7.356705       155.8365       48.28589    
+    8.160904       159.3620       48.12619       8.985504       162.8166    
+    47.96121       9.822205       166.1945       47.79199       10.66600    
+    169.4869       47.62109       11.51080       172.6891       47.44821    
+    12.35260       175.7939       47.27560       13.18629       178.7985    
+    47.10379       14.00870       181.6979       46.93481       14.81509    
+    184.4902       46.76779       15.60370       187.1725       46.60471    
+    16.37160       189.7441       46.44559       17.11700       192.2040    
+    46.29150       17.83690       194.5534       46.14160       18.53180    
+    196.7912       45.99661       19.20180       198.9196       45.85739    
+    19.84470       200.9037       45.70291       20.52750       86.93842    
+    46.99240       6.949005       89.65369       44.12961       5.435699    
+    87.01343       43.97589       6.367706       92.43451       44.27780    
+    4.596695       95.35571       44.42020       3.864197       98.41217    
+    44.55591       3.246002       101.5915       44.68311       2.747604    
+    104.8852       44.80151       2.379898       108.2797       44.91089    
+    2.133896       111.7619       45.01151       2.018494       115.3210    
+    45.10550       1.989807       118.9455       45.19919       1.978500    
+    122.6205       45.28519       2.069305       126.3339       45.35529    
+    2.342102       130.0717       45.41431       2.742493       133.8183    
+    45.46390       3.248093       137.5636       45.50510       3.843399    
+    141.2971       45.53979       4.508499       145.0082       45.56812    
+    5.233307       148.6859       45.59180       6.003494       152.3210    
+    45.61060       6.811707       155.9030       45.62549       7.648193    
+    159.4238       45.63669       8.505798       162.8745       45.64529    
+    9.375900       166.2480       45.65109       10.25340       169.5360    
+    45.65451       11.13190       172.7336       45.65601       12.00720    
+    175.8342       45.65549       12.87421       178.8344       45.65381    
+    13.72929       181.7299       45.65109       14.56779       184.5180    
+    45.64719       15.38770       187.1962       45.64230       16.18620    
+    189.7643       45.63699       16.96120       192.2206       45.63110    
+    17.70970       194.5663       45.62451       18.43210       196.8002    
+    45.61771       19.12880       198.9255       45.61060       19.79720    
+    200.9069       45.59619       20.50700       84.54053       43.81741    
+    7.403503       87.09473       40.90430       6.386597       84.61658    
+    40.94510       7.421204       89.73969       40.87891       5.455795    
+    92.52478       40.86691       4.617798       95.44989       40.86990    
+    3.886093       98.50922       40.88840       3.268600       101.6911    
+    40.92310       2.770798       104.9870       40.97409       2.403595    
+    108.3825       41.04129       2.157806       111.8654       41.12399    
+    2.042603       115.4243       41.21829       2.013794       119.0480    
+    41.31570       2.002502       122.7231       41.42551       2.093201    
+    126.4348       41.55521       2.365601       130.1703       41.69901    
+    2.765503       133.9142       41.85400       3.270401       137.6562    
+    42.01831       3.864899       141.3856       42.18951       4.529205    
+    145.0930       42.36691       5.253098       148.7663       42.54761    
+    6.022293       152.3971       42.73099       6.829498       155.9745    
+    42.91629       7.664902       159.4914       43.10211       8.521500    
+    162.9370       43.28690       9.390396       166.3058       43.47070    
+    10.26691       169.5890       43.65231       11.14430       172.7822    
+    43.83109       12.01849       175.8781       44.00610       12.88440    
+    178.8735       44.17719       13.73840       181.7643       44.34399    
+    14.57590       184.5483       44.50562       15.39481       187.2224    
+    44.66241       16.19220       189.7861       44.81381       16.96620    
+    192.2384       44.95871       17.71381       194.5805       45.09811    
+    18.43530       196.8105       45.23169       19.13120       198.9320    
+    45.35941       19.79880       200.9095       45.48779       20.50771    
+    82.34521       41.00421       8.576004       84.69568       38.13211    
+    7.999496       82.41772       38.40991       9.109299       87.17987    
+    37.89551       7.005203       89.82977       37.69479       6.110306    
+    92.61902       37.52539       5.304703       95.54779       37.39209    
+    4.600998       98.60999       37.29669       4.007095       101.7951    
+    37.24020       3.527893       105.0922       37.22580       3.174194    
+    108.4890       37.25049       2.937103       111.9724       37.31671    
+    2.825302       115.5312       37.41061       2.796494       119.1550    
+    37.51199       2.784393       122.8293       37.64499       2.870300    
+    126.5397       37.83301       3.130707       130.2726       38.05981    
+    3.513596       134.0136       38.31812       3.997299       137.7524    
+    38.60330       4.567001       141.4782       38.90869       5.203705    
+    145.1813       39.23071       5.897705       148.8505       39.56589    
+    6.635300       152.4767       39.91061       7.409302       156.0495    
+    40.26251       8.210403       159.5610       40.61911       9.031906    
+    163.0021       40.97681       9.865295       166.3658       41.33499    
+    10.70590       169.6440       41.69119       11.54739       172.8325    
+    42.04370       12.38589       175.9235       42.39059       13.21651    
+    178.9142       42.73099       14.03571       181.8005       43.06369    
+    14.83910       184.5798       43.38770       15.62460       187.2495    
+    43.70239       16.38950       189.8088       44.00681       17.13210    
+    192.2573       44.29999       17.84920       194.5949       44.58231    
+    18.54140       196.8212       44.85379       19.20889       198.9394    
+    45.11349       19.84930       200.9123       45.38181       20.52950    
+    87.26428       35.06519       8.199402       89.91913       34.69971    
+    7.374207       92.71283       34.38229       6.630997       95.64569    
+    34.12039       5.981506       98.71143       33.91721       5.432907    
+    101.8986       33.77560       4.989899       105.1977       33.69949    
+    4.662201       108.5959       33.68481       4.441803       112.0798    
+    33.73511       4.336594       115.6385       33.82980       4.307800    
+    119.2621       33.93411       4.294403       122.9355       34.08859    
+    4.371002       126.6445       34.33179       4.608200       130.3752    
+    34.63669       4.958099       134.1130       34.99219       5.400803    
+    137.8483       35.39011       5.922699       141.5707       35.82150    
+    6.506195       145.2695       36.28131       7.142502       148.9343    
+    36.76099       7.818893       152.5561       37.25781       8.528793    
+    156.1241       37.76660       9.263794       159.6308       38.28339    
+    10.01740       163.0671       38.80420       10.78220       166.4259    
+    39.32639       11.55360       169.6994       39.84619       12.32590    
+    172.8827       40.36230       13.09550       175.9691       40.87039    
+    13.85789       178.9553       41.37061       14.60980       181.8364    
+    41.85941       15.34720       184.6113       42.33621       16.06830    
+    187.2763       42.79929       16.77060       189.8315       43.24799    
+    17.45219       192.2758       43.68069       18.11060       194.6093    
+    44.09689       18.74609       196.8322       44.49780       19.35899    
+    198.9465       44.88229       19.94690       200.9152       45.28201    
+    20.57159       92.80359       31.55829       8.545807       95.73993    
+    31.18121       7.974503       98.80933       30.88181       7.491302    
+    101.9985       30.66281       7.100494       105.2995       30.53149    
+    6.810394       108.6986       30.48120       6.614105       112.1826    
+    30.51730       6.518494       115.7414       30.61179       6.489700    
+    119.3654       30.71899       6.474197       123.0378       30.89359    
+    6.537506       126.7455       31.18600       6.741196       130.4736    
+    31.56131       7.043503       134.2087       32.00391       7.427094    
+    137.9409       32.50391       7.879807       141.6591       33.04831    
+    8.386597       145.3544       33.63089       8.939499       149.0153    
+    34.24100       9.527603       152.6323       34.87430       10.14510    
+    156.1962       35.52350       10.78450       159.6981       36.18481    
+    11.44031       163.1296       36.85211       12.10590       166.4836    
+    37.52151       12.77740       169.7524       38.18869       13.44980    
+    172.9308       38.85110       14.11990       176.0126       39.50510    
+    14.78380       178.9946       40.14789       15.43860       181.8713    
+    40.77759       16.08090       184.6413       41.39160       16.70900    
+    187.3021       41.98831       17.32069       189.8532       42.56619    
+    17.91451       192.2936       43.12399       18.48801       194.6232    
+    43.66110       19.04160       196.8422       44.17899       19.57561    
+    198.9525       44.67459       20.08791       200.9182       45.19211    
+    20.63240       98.89838       28.30539       10.10330       102.0903    
+    28.02151       9.778595       105.3928       27.84329       9.536194    
+    108.7932       27.76251       9.370407       112.2775       27.78659    
+    9.287003       115.8364       27.88110       9.258102       119.4601    
+    27.99100       9.240097       123.1325       28.18240       9.286499    
+    126.8381       28.51639       9.447800       130.5644       28.95090    
+    9.689697       134.2966       29.46799       9.998199       138.0261    
+    30.05420       10.36330       141.7414       30.69510       10.77260    
+    145.4326       31.38159       11.21980       149.0893       32.10251    
+    11.69580       152.7026       32.85159       12.19591       156.2624    
+    33.62061       12.71400       159.7599       34.40451       13.24570    
+    163.1872       35.19559       13.78551       166.5370       35.98999    
+    14.33031       169.8015       36.78250       14.87590       172.9755    
+    37.56931       15.41969       176.0529       38.34671       15.95860    
+    179.0305       39.11081       16.49030       181.9032       39.85959    
+    17.01180       184.6694       40.58960       17.52190       187.3261    
+    41.29980       18.01871       189.8735       41.98779       18.50101    
+    192.3100       42.65161       18.96690       194.6359       43.29129    
+    19.41670       196.8514       43.90720       19.85049       198.9592    
+    44.49799       20.26669       200.9211       45.11621       20.70959    
+    105.4750       25.73801       12.73500       108.8759       25.63330    
+    12.60510       112.3610       25.64841       12.53590       115.9199    
+    25.74271       12.50700       119.5433       25.85501       12.48590    
+    123.2150       26.05881       12.51241       126.9196       26.42599    
+    12.62390       130.6440       26.90701       12.79500       134.3742    
+    27.48221       13.01530       138.1010       28.13651       13.27760    
+    141.8134       28.85229       13.57260       145.5012       29.62061    
+    13.89571       149.1547       30.42749       14.24010       152.7643    
+    31.26730       14.60249       156.3203       32.13010       14.97839    
+    159.8144       33.00980       15.36440       163.2377       33.89819    
+    15.75650       166.5836       34.79050       16.15250       169.8441    
+    35.68069       16.54939       173.0148       36.56519       16.94510    
+    176.0883       37.43900       17.33730       179.0622       38.29910    
+    17.72440       181.9308       39.14041       18.10420       184.6938    
+    39.96191       18.47569       187.3469       40.76071       18.83780    
+    189.8908       41.53491       19.18919       192.3244       42.28171    
+    19.52879       194.6474       43.00201       19.85670       196.8600    
+    43.69531       20.17300       198.9645       44.35989       20.47659    
+    200.9235       45.05661       20.80020       108.9437       24.17599    
+    16.19350       112.4294       24.18460       16.14020       115.9882    
+    24.27881       16.11121       119.6118       24.39209       16.08690    
+    123.2831       24.60519       16.09129       126.9860       24.99490    
+    16.14751       130.7094       25.50760       16.24010       134.4377    
+    26.12231       16.36259       138.1623       26.82300       16.51070    
+    141.8720       27.59061       16.67889       145.5573       28.41479    
+    16.86430       149.2082       29.28149       17.06281       152.8149    
+    30.18311       17.27240       156.3679       31.10989       17.49049    
+    159.8590       32.05521       17.71480       163.2790       33.01001    
+    17.94321       166.6223       33.96921       18.17419       169.8793    
+    34.92700       18.40590       173.0468       35.87790       18.63730    
+    176.1171       36.81760       18.86681       179.0878       37.74271    
+    19.09351       181.9538       38.64819       19.31610       184.7140    
+    39.53180       19.53410       187.3639       40.39160       19.74640    
+    189.9055       41.22461       19.95290       192.3358       42.02881    
+    20.15230       194.6567       42.80350       20.34489       196.8664    
+    43.54980       20.53090       198.9689       44.26559       20.70940    
+    200.9252       45.01559       20.90060       116.0388       23.54541    
+    19.93240       112.4802       23.45090       19.96150       119.6620    
+    23.65921       19.90450       123.3332       23.87720       19.88560    
+    127.0358       24.27759       19.88319       130.7578       24.80688    
+    19.89240       134.4846       25.44171       19.91130       138.2077    
+    26.16501       19.93851       141.9157       26.95850       19.97220    
+    145.5992       27.81079       20.01160       149.2480       28.70709    
+    20.05540       152.8527       29.63959       20.10310       156.4035    
+    30.59891       20.15370       159.8920       31.57669       20.20680    
+    163.3100       32.56491       20.26151       166.6506       33.55789    
+    20.31750       169.9057       34.54910       20.37421       173.0707    
+    35.53369       20.43130       176.1385       36.50659       20.48840    
+    179.1071       37.46411       20.54500       181.9711       38.40161    
+    20.60100       184.7289       39.31671       20.65601       187.3771    
+    40.20651       20.70979       189.9162       41.06940       20.76230    
+    192.3449       41.90161       20.81320       194.6638       42.70441    
+    20.86250       196.8715       43.47711       20.91029       198.9721    
+    44.21780       20.95621       200.9265       44.99539       21.00710    
+    116.0700       23.57059       23.82370       112.5109       23.47629    
+    23.85291       119.6935       23.68460       23.79221       123.3641    
+    23.90231       23.74950       127.0663       24.30280       23.68739    
+    130.7878       24.83130       23.61180       134.5139       25.46509    
+    23.52510       138.2355       26.18799       23.42909       141.9427    
+    26.98050       23.32590       145.6249       27.83151       23.21660    
+    149.2722       28.72711       23.10291       152.8757       29.65839    
+    22.98560       156.4252       30.61649       22.86580       159.9120    
+    31.59351       22.74440       163.3290       32.58029       22.62230    
+    166.6679       33.57230       22.50011       169.9216       34.56201    
+    22.37860       173.0851       35.54568       22.25830       176.1520    
+    36.51761       22.13960       179.1188       37.47369       22.02319    
+    181.9814       38.40991       21.90939       184.7377       39.32419    
+    21.79849       187.3849       40.21310       21.69090       189.9227    
+    41.07471       21.58670       192.3500       41.90601       21.48630    
+    194.6677       42.70749       21.38960       196.8749       43.47971    
+    21.29671       198.9740       44.21951       21.20760       200.9274    
+    44.99609       21.11549       116.0805       24.35400       27.63550    
+    112.5217       24.25980       27.66479       119.7040       24.46750    
+    27.60040       123.3749       24.67990       27.53450       127.0766    
+    25.06839       27.41400       130.7980       25.58011       27.25520    
+    134.5236       26.19260       27.06520       138.2451       26.89059    
+    26.84850       141.9514       27.65549       26.61110       145.6335    
+    28.47681       26.35620       149.2807       29.34030       26.08820    
+    152.8837       30.23849       25.80930       156.4326       31.16260    
+    25.52260       159.9194       32.10400       25.23019       163.3354    
+    33.05569       24.93491       166.6738       34.01169       24.63820    
+    169.9271       34.96561       24.34210       173.0900       35.91360    
+    24.04790       176.1562       36.84991       23.75729       179.1230    
+    37.77121       23.47121       181.9850       38.67361       23.19119    
+    184.7408       39.55399       22.91780       187.3876       40.41040    
+    22.65199       189.9247       41.24100       22.39430       192.3520    
+    42.04150       22.14571       194.6688       42.81400       21.90601    
+    196.8759       43.55710       21.67509       198.9747       44.27029    
+    21.45390       200.9276       45.01779       21.22180       109.0361    
+    24.25101       27.66740       112.5111       25.77081       31.25070    
+    109.0251       25.75562       31.23759       116.0700       25.86520    
+    31.22150       119.6933       25.97681       31.18300       123.3644    
+    26.18039       31.09509       127.0661       26.54568       30.91960    
+    130.7878       27.02420       30.68280       134.5136       27.59570    
+    30.39540       138.2355       28.24609       30.06509       141.9427    
+    28.95801       29.70151       145.6252       29.72119       29.30969    
+    149.2724       30.52371       28.89650       152.8757       31.35840    
+    28.46561       156.4247       32.21561       28.02180       159.9123    
+    33.08960       27.56870       163.3285       33.97269       27.11040    
+    166.6679       34.85910       26.64951       169.9218       35.74411    
+    26.18919       173.0851       36.62280       25.73151       176.1520    
+    37.49069       25.27901       179.1193       38.34521       24.83340    
+    181.9814       39.18161       24.39690       184.7380       39.99759    
+    23.97070       187.3849       40.79150       23.55600       189.9230    
+    41.56061       23.15401       192.3503       42.30301       22.76590    
+    194.6674       43.01831       22.39169       196.8749       43.70731    
+    22.03120       198.9740       44.36789       21.68550       200.9272    
+    45.06009       21.32170       102.3161       26.07101       31.02480    
+    105.5922       28.00540       34.33340       102.2858       28.18069    
+    34.14169       105.6230       25.85818       31.16090       108.9943    
+    27.92651       34.44569       112.4799       27.95169       34.47290    
+    116.0388       28.04590       34.44360       119.6623       28.15579    
+    34.40221       123.3334       28.34570       34.29460       127.0356    
+    28.67749       34.06970       130.7580       29.10840       33.76250    
+    134.4846       29.62109       33.38770       138.2072       30.20239    
+    32.95551       141.9160       30.83719       32.47850       145.5992    
+    31.51730       31.96359       149.2477       32.23151       31.42000    
+    152.8527       32.97339       30.85240       156.4030       33.73541    
+    30.26759       159.8918       34.51169       29.66991       163.3098    
+    35.29568       29.06531       166.6503       36.08200       28.45689    
+    169.9055       36.86691       27.84900       173.0704       37.64670    
+    27.24429       176.1385       38.41650       26.64630       179.1068    
+    39.17380       26.05730       181.9713       39.91479       25.48030    
+    184.7285       40.63791       24.91670       187.3769       41.34161    
+    24.36839       189.9162       42.02289       23.83659       192.3444    
+    42.68021       23.32330       194.6632       43.31369       22.82809    
+    196.8718       43.92410       22.35110       198.9721       44.50879    
+    21.89360       200.9265       45.12079       21.41150       96.01123    
+    28.83759       33.50890       99.04120       31.07101       36.44450    
+    95.96478       31.36450       36.00681       99.08929       28.46091    
+    33.86450       102.2368       30.85690       36.78700       105.5417    
+    30.72949       37.02580       108.9435       30.68091       37.16830    
+    112.4291       30.71799       37.20760       115.9880       30.81250    
+    37.17821       119.6115       30.91971       37.13429       123.2824    
+    31.09299       37.00990       126.9858       31.38211       36.74310    
+    130.7092       31.75269       36.37630       134.4374       32.19040    
+    35.92731       138.1620       32.68381       35.40849       141.8720    
+    33.22141       34.83530       145.5573       33.79590       34.21590    
+    149.2082       34.39819       33.56149       152.8149       35.02271    
+    32.87820       156.3676       35.66360       32.17349       159.8588    
+    36.31619       31.45329       163.2787       36.97391       30.72430    
+    166.6220       37.63400       29.99071       169.8793       38.29221    
+    29.25751       173.0466       38.94531       28.52820       176.1171    
+    39.59061       27.80679       179.0876       40.22440       27.09610    
+    181.9540       40.84549       26.39980       184.7136       41.45020    
+    25.71960       187.3642       42.03860       25.05780       189.9055    
+    42.60889       24.41589       192.3358       43.15869       23.79630    
+    194.6567       43.68851       23.19859       196.8664       44.19821    
+    22.62270       198.9687       44.68750       22.07030       200.9250    
+    45.19781       21.48770       90.21143       32.17630       34.86391    
+    92.99158       33.11301       36.48730       90.18451       33.48969    
+    35.82581       93.01971       31.73459       35.47791       95.93549    
+    32.79959       37.05740       99.01093       32.55301       37.52960    
+    102.2053       32.37671       37.89960       105.5102       32.27560    
+    38.15820       108.9118       32.24490       38.31351       112.3972    
+    32.28879       38.35780       115.9560       32.38309       38.32840    
+    119.5795       32.48901       38.28340       123.2507       32.65280    
+    38.15199       126.9545       32.91800       37.86749       130.6784    
+    33.25439       37.47569       134.4077       33.64890       36.99550    
+    138.1330       34.09280       36.44031       141.8444       34.57541    
+    35.82660       145.5307       35.09009       35.16319       149.1830    
+    35.62839       34.46230       152.7912       36.18631       33.73019    
+    156.3451       36.75851       32.97510       159.8378       37.34030    
+    32.20340       163.2596       37.92679       31.42210       166.6037    
+    38.51511       30.63580       169.8630       39.10129       29.85001    
+    173.0314       39.68311       29.06821       176.1035       40.25711    
+    28.29491       179.0756       40.82101       27.53300       181.9433    
+    41.37329       26.78661       184.7043       41.91141       26.05740    
+    187.3561       42.43481       25.34779       189.8986       42.94171    
+    24.65961       192.3302       43.43069       23.99519       194.6522    
+    43.90109       23.35440       196.8632       44.35449       22.73680    
+    198.9665       44.78909       22.14461       200.9243       45.24170    
+    21.51981       87.51477       33.92239       35.08430       90.15399    
+    34.89111       36.65520       87.48651       35.24631       35.86800    
+    92.95959       34.58301       37.35760       95.90253       34.32980    
+    37.96330       98.97650       34.13379       38.46530       102.1706    
+    33.99710       38.85899       105.4748       33.92529       39.13470    
+    108.8754       33.91281       39.30090       112.3610       33.96439    
+    39.34950       115.9193       34.05859       39.32010       119.5427    
+    34.16260       39.27420       123.2148       34.31589       39.13670    
+    126.9191       34.55569       38.83701       130.6437       34.85571    
+    38.42360       134.3740       35.20480       37.91650       138.1003    
+    35.59570       37.32990       141.8129       36.01880       36.68130    
+    145.5009       36.46970       35.98010       149.1545       36.94040    
+    35.23900       152.7645       37.42749       34.46480       156.3200    
+    37.92599       33.66640       159.8144       38.43259       32.85010    
+    163.2377       38.94339       32.02380       166.5839       39.45459    
+    31.19209       169.8441       39.96411       30.36090       173.0143    
+    40.46921       29.53391       176.0883       40.96780       28.71570    
+    179.0620       41.45749       27.90970       181.9308       41.93649    
+    27.12010       184.6935       42.40329       26.34850       187.3471    
+    42.85721       25.59790       189.8908       43.29660       24.86971    
+    192.3242       43.72000       24.16679       194.6474       44.12820    
+    23.48869       196.8595       44.52100       22.83530       198.9645    
+    44.89719       22.20860       200.9233       45.28830       21.54739    
+    84.98279       35.65500       34.98590       87.45453       36.64090    
+    36.51711       84.95313       36.95871       35.59280       90.12079    
+    36.36691       37.34210       92.92450       36.13211       38.07840    
+    95.86572       35.94171       38.71359       98.93890       35.79861    
+    39.24020       102.1318       35.70432       39.65350       105.4352    
+    35.66260       39.94341       108.8359       35.66971       40.11870    
+    112.3205       35.72900       40.17090       115.8793       35.82300    
+    40.14149       119.5029       35.92581       40.09480       123.1752    
+    36.06839       39.95230       126.8803       36.28101       39.64000    
+    130.6057       36.54221       39.20860       134.3369       36.84351    
+    38.67940       138.0646       37.17871       38.06670       141.7783    
+    37.53979       37.38921       145.4682       37.92310       36.65660    
+    149.1230       38.32251       35.88220       152.7348       38.73489    
+    35.07330       156.2919       39.15601       34.23880       159.7883    
+    39.58350       33.38570       163.2133       40.01370       32.52209    
+    166.5612       40.44461       31.65280       169.8234       40.87329    
+    30.78400       172.9958       41.29810       29.91949       176.0712    
+    41.71661       29.06430       179.0466       42.12790       28.22169    
+    181.9177       42.52979       27.39630       184.6818       42.92139    
+    26.58971       187.3371       43.30200       25.80490       189.8825    
+    43.67041       25.04370       192.3173       44.02539       24.30890    
+    194.6420       44.36719       23.60001       196.8559       44.69629    
+    22.91690       198.9616       45.01120       22.26170       200.9221    
+    45.33759       21.57030       82.65552       37.32861       34.55350    
+    84.92133       38.31540       36.06979       82.62592       38.57959    
+    34.99330       87.42029       38.09180       37.02730       90.08472    
+    37.90231       37.88200       92.88690       37.74341       38.64500    
+    95.82611       37.61871       39.30330       98.89807       37.53049    
+    39.84930       102.0900       37.48050       40.27800       105.3928    
+    37.47049       40.57899       108.7927       37.49780       40.76140    
+    112.2773       37.56519       40.81650       115.8361       37.65970    
+    40.78700       119.4597       37.76031       40.73981       123.1320    
+    37.89160       40.59340       126.8378       38.07599       40.27119    
+    130.5641       38.29739       39.82581       134.2968       38.54910    
+    39.27890       138.0258       38.82571       38.64580       141.7411    
+    39.12231       37.94560       145.4326       39.43549       37.18829    
+    149.0893       39.76050       36.38789       152.7028       40.09470    
+    35.55150       156.2618       40.43579       34.68880       159.7599    
+    40.78101       33.80670       163.1874       41.12769       32.91380    
+    166.5366       41.47461       32.01489       169.8012       41.81909    
+    31.11650       172.9753       42.16019       30.22260       176.0527    
+    42.49591       29.33830       179.0299       42.82541       28.46700    
+    181.9030       43.14719       27.61330       184.6694       43.46069    
+    26.77930       187.3258       43.76489       25.96770       189.8732    
+    44.05930       25.18050       192.3100       44.34329       24.42050    
+    194.6362       44.61600       23.68739       196.8514       44.87820    
+    22.98100       198.9589       45.12991       22.30341       200.9211    
+    45.38889       21.58830       80.49579       38.87411       33.82710    
+    82.59387       39.86740       35.30740       80.46698       40.04471    
+    34.11250       84.88690       39.71240       36.41051       87.38397    
+    39.58621       37.39160       90.04559       39.48389       38.26750    
+    92.84613       39.40280       39.04961       95.78387       39.34619    
+    39.72430       98.85437       39.31470       40.28419       102.0451    
+    39.30981       40.72400       105.3470       39.33231       41.03290    
+    108.7465       39.38062       41.22040       112.2309       39.45609    
+    41.27760       115.7897       39.54999       41.24809       119.4138    
+    39.64941       41.20030       123.0861       39.76901       41.05110    
+    126.7927       39.92459       40.72180       130.5199       40.10480    
+    40.26640       134.2538       40.30469       39.70700       137.9841    
+    40.52200       39.05930       141.7011       40.75220       38.34290    
+    145.3942       40.99271       37.56799       149.0529       41.24121    
+    36.74890       152.6681       41.49539       35.89301       156.2297    
+    41.75339       35.01010       159.7297       42.01419       34.10730    
+    163.1589       42.27490       33.19350       166.5109       42.53519    
+    32.27350       169.7775       42.79300       31.35400       172.9538    
+    43.04791       30.43900       176.0329       43.29810       29.53391    
+    179.0126       43.54370       28.64211       181.8876       43.78320    
+    27.76830       184.6559       44.01590       26.91460       187.3146    
+    44.24170       26.08389       189.8635       44.45999       25.27811    
+    192.3019       44.67020       24.50031       194.6296       44.87210    
+    23.74980       196.8468       45.06641       23.02670       198.9560    
+    45.25201       22.33321       200.9196       45.44141       21.60120    
+    82.56073       41.18021       35.49451       84.85101       41.13599    
+    36.61330       87.34540       41.10840       37.60860       90.00513    
+    41.09500       38.49719       92.80322       41.09351       39.29060    
+    95.73938       41.10599       39.97520       98.80798       41.13211    
+    40.54330       101.9982       41.17331       40.98959       105.2990    
+    41.22900       41.30330       108.6982       41.29861       41.49380    
+    112.1826       41.38281       41.55220       115.7411       41.47659    
+    41.52271       119.3649       41.57419       41.47470       123.0378    
+    41.68210       41.32381       126.7448       41.80789       40.99030    
+    130.4736       41.94611       40.52890       134.2084       42.09399    
+    39.96201       137.9406       42.25021       39.30560       141.6591    
+    42.41260       38.57961       145.3539       42.57959       37.79420    
+    149.0148       42.75000       36.96400       152.6323       42.92261    
+    36.09641       156.1957       43.09641       35.20151       159.6979    
+    43.27051       34.28641       163.1293       43.44339       33.36011    
+    166.4836       43.61551       32.42760       169.7526       43.78561    
+    31.49541       172.9310       43.95239       30.56799       176.0126    
+    44.11600       29.65041       178.9941       44.27560       28.74640    
+    181.8713       44.43091       27.86070       184.6413       44.58151    
+    26.99530       187.3021       44.72751       26.15311       189.8532    
+    44.86819       25.33630       192.2934       45.00369       24.54770    
+    194.6229       45.13309       23.78709       196.8419       45.25760    
+    23.05400       198.9528       45.37601       22.35100       200.9184    
+    45.49509       21.60880       84.81342       42.57251       36.67461    
+    82.52661       42.50491       35.55090       87.30511       42.64499    
+    37.67410       89.96228       42.72070       38.56650       92.75873    
+    42.79980       39.36330       95.69281       42.88181       40.05090    
+    98.76038       42.96661       40.62151       101.9489       43.05371    
+    41.06979       105.2490       43.14310       41.38490       108.6474    
+    43.23441       41.57629       112.1315       43.32669       41.63510    
+    115.6904       43.42090       41.60550       119.3146       43.51639    
+    41.55760       122.9870       43.61279       41.40610       126.6950    
+    43.70831       41.07140       130.4247       43.80441       40.60809    
+    134.1611       43.89969       40.03900       137.8950       43.99411    
+    39.38000       141.6154       44.08789       38.65100       145.3122    
+    44.18091       37.86250       148.9753       44.27271       37.02890    
+    152.5947       44.36279       36.15781       156.1603       44.45139    
+    35.25929       159.6645       44.53839       34.34050       163.0983    
+    44.62299       33.41040       166.4548       44.70630       32.47400    
+    169.7263       44.78690       31.53810       172.9072       44.86520    
+    30.60690       175.9909       44.94089       29.68559       178.9745    
+    45.01389       28.77789       181.8539       45.08469       27.88860    
+    184.6266       45.15259       27.01961       187.2892       45.21780    
+    26.17400       189.8425       45.28030       25.35390       192.2846    
+    45.33960       24.56210       194.6164       45.39651       23.79829    
+    196.8371       45.45041       23.06219       198.9496       45.50201    
+    22.35629       200.9169       45.54959       21.61110       84.77460    
+    44.00830       36.59560       82.49072       43.82889       35.47810    
+    87.26428       44.18021       37.58960       89.91913       44.34549    
+    38.47710       92.71283       44.50491       39.26950       95.64539    
+    44.65649       39.95329       98.71112       44.79929       40.52071    
+    101.8984       44.93329       40.96640       105.1974       45.05591    
+    41.27969       108.5952       45.16849       41.46989       112.0793    
+    45.26981       41.52820       115.6381       45.36380       41.49870    
+    119.2621       45.45749       41.45070       122.9352       45.54199    
+    41.29990       126.6440       45.60791       40.96690       130.3747    
+    45.66119       40.50591       134.1125       45.70389       39.93970    
+    137.8481       45.73709       39.28410       141.5703       45.76251    
+    38.55890       145.2692       45.78131       37.77440       148.9343    
+    45.79419       36.94521       152.5558       45.80200       36.07870    
+    156.1240       45.80539       35.18480       159.6310       45.80539    
+    34.27080       163.0668       45.80200       33.34550       166.4255    
+    45.79590       32.41409       169.6991       45.78790       31.48300    
+    172.8825       45.77740       30.55670       175.9684       45.76541    
+    29.64020       178.9550       45.75220       28.73730       181.8361    
+    45.73801       27.85260       184.6113       45.72269       26.98820    
+    187.2761       45.70749       26.14709       189.8315       45.69171    
+    25.33121       192.2758       45.67581       24.54359       194.6095    
+    45.65939       23.78380       196.8320       45.64310       23.05161    
+    198.9465       45.62741       22.34940       200.9155       45.60349    
+    21.60820       84.73529       45.42871       36.37520       87.22180    
+    45.69971       37.35381       89.87421       45.95361       38.22760    
+    92.66602       46.19241       39.00760       95.59662       46.41309    
+    39.68069       98.66052       46.61349       40.23911       101.8466    
+    46.79321       40.67770       105.1450       46.94949       40.98590    
+    108.5422       47.08301       41.17281       112.0258       47.19260    
+    41.22980       115.5847       47.28671       41.20030       119.2087    
+    47.37839       41.15260       122.8825       47.45090       41.00369    
+    126.5920       47.48749       40.67520       130.3239       47.49899    
+    40.22070       134.0632       47.48969       39.66260       137.8000    
+    47.46191       39.01640       141.5244       47.41940       38.30170    
+    145.2255       47.36499       37.52859       148.8922       47.30029    
+    36.71140       152.5165       47.22659       35.85760       156.0866    
+    47.14581       34.97681       159.5959       47.05911       34.07620    
+    163.0346       46.96851       33.16451       166.3957       46.87430    
+    32.24670       169.6716       46.77811       31.32941       172.8574    
+    46.68021       30.41660       175.9460       46.58151       29.51360    
+    178.9348       46.48221       28.62390       181.8183       46.38449    
+    27.75230       184.5956       46.28741       26.90060       187.2629    
+    46.19220       26.07190       189.8197       46.09891       25.26801    
+    192.2663       46.00830       24.49200       194.6022       45.91989    
+    23.74339       196.8266       45.83420       23.02200       198.9428    
+    45.75150       22.33009       200.9140       45.65720       21.59979    
+    87.17908       47.18900       36.97110       84.69550       46.82129    
+    36.01730       89.82928       47.52979       37.82260       92.61859    
+    47.84601       38.58260       95.54730       48.13409       39.23830    
+    98.61023       48.39182       39.78220       101.7946       48.61621    
+    40.20930       105.0920       48.80469       40.50900       108.4887    
+    48.95901       40.69060       111.9718       49.07709       40.74550    
+    115.5307       49.17111       40.71600       119.1547       49.26120    
+    40.66879       122.8288       49.32251       40.52280       126.5392    
+    49.33011       40.20171       130.2724       49.30051       39.75780    
+    134.0131       49.23999       39.21291       137.7519       49.15210    
+    38.58200       141.4780       49.04370       37.88429       145.1808    
+    48.91699       37.12981       148.8500       48.77591       36.33220    
+    152.4763       48.62231       35.49890       156.0493       48.45920    
+    34.63930       159.5607       48.28830       33.76041       163.0019    
+    48.11209       32.87070       166.3654       47.93140       31.97510    
+    169.6440       47.74881       31.07990       172.8320       47.56470    
+    30.18919       175.9235       47.38110       29.30811       178.9144    
+    47.19821       28.44000       181.8002       47.01831       27.58940    
+    184.5798       46.84109       26.75841       187.2492       46.66751    
+    25.94980       189.8088       46.49799       25.16541       192.2570    
+    46.33420       24.40820       194.5947       46.17499       23.67780    
+    196.8210       46.02151       22.97391       198.9394       45.87329    
+    22.29880       200.9123       45.70950       21.58630       87.13690    
+    48.63309       36.44310       89.78412       49.05829       37.26370    
+    92.57123       49.44971       37.99620       95.49799       49.80350    
+    38.62801       98.55951       50.11600       39.15179       101.7426    
+    50.38400       39.56290       105.0390       50.60400       39.85110    
+    108.4352       50.77881       40.02530       111.9182       50.90479    
+    40.07719       115.4770       50.99881       40.04781       119.1010    
+    51.08740       40.00121       122.7753       51.13699       39.85930    
+    126.4868       51.11649       39.54849       130.2211       51.04739    
+    39.11909       133.9633       50.93729       38.59230       137.7033    
+    50.79169       37.98260       141.4318       50.61890       37.30840    
+    145.1364       50.42239       36.57941       148.8080       50.20731    
+    35.80890       152.4365       49.97629       35.00391       156.0119    
+    49.73291       34.17360       159.5258       49.48001       33.32460    
+    162.9691       49.22049       32.46530       166.3356       48.95651    
+    31.60030       169.6159       48.69019       30.73570       172.8066    
+    48.42310       29.87550       175.9006       48.15649       29.02451    
+    178.8940       47.89230       28.18610       181.7821       47.63309    
+    27.36470       184.5639       47.37741       26.56219       187.2358    
+    47.12790       25.78130       189.7973       46.88550       25.02380    
+    192.2475       46.65039       24.29260       194.5873       46.42261    
+    23.58730       196.8158       46.20291       22.90759       198.9355    
+    45.99149       22.25571       200.9108       45.76071       21.56770    
+    89.73938       50.52490       36.55870       87.09491       50.01901    
+    35.77679       92.52460       50.98901       37.25630       95.44958    
+    51.40601       37.85780       98.50897       51.77051       38.35640    
+    101.6909       52.08081       38.74730       104.9865       52.33060    
+    39.02110       108.3820       52.52509       39.18590       111.8649    
+    52.65869       39.23410       115.4238       52.75241       39.20470    
+    119.0480       52.83960       39.15891       122.7226       52.87839    
+    39.02209       126.4345       52.83160       38.72420       130.1699    
+    52.72369       38.31329       133.9135       52.56619       37.80930    
+    137.6559       52.36499       37.22630       141.3856       52.13040    
+    36.58180       145.0930       51.86700       35.88499       148.7665    
+    51.58060       35.14861       152.3969       51.27539       34.37930    
+    155.9745       50.95529       33.58591       159.4909       50.62381    
+    32.77480       162.9370       50.28439       31.95380       166.3054    
+    49.94040       31.12730       169.5888       49.59381       30.30141    
+    172.7817       49.24661       29.47971       175.8776       48.90091    
+    28.66670       178.8735       48.55859       27.86591       181.7643    
+    48.22269       27.08121       184.5483       47.89261       26.31470    
+    187.2220       47.57031       25.56880       189.7858       47.25681    
+    24.84520       192.2384       46.95389       24.14680       194.5802    
+    46.66040       23.47310       196.8105       46.37671       22.82390    
+    198.9323       46.10471       22.20120       200.9095       45.80960    
+    21.54420       89.69568       51.91510       35.71210       87.05322    
+    51.33279       34.97681       92.47888       52.44751       36.36790    
+    95.40179       52.92410       36.93320       98.45941       53.33859    
+    37.40131       101.6403       53.68851       37.76801       104.9352    
+    53.96729       38.02431       108.3298       54.17990       38.17799    
+    111.8127       54.32059       38.22180       115.3715       54.41479    
+    38.19231       118.9955       54.50000       38.14751       122.6706    
+    54.52881       38.01691       126.3832       54.45630       37.73450    
+    130.1203       54.31250       37.34560       133.8649       54.10959    
+    36.86920       137.6088       53.85620       36.31821       141.3408    
+    53.56271       35.70940       145.0497       53.23590       35.05119    
+    148.7253       52.88260       34.35580       152.3581       52.50690    
+    33.62939       155.9382       52.11380       32.88040       159.4567    
+    51.70779       32.11459       162.9052       51.29300       31.33960    
+    166.2761       50.87259       30.55949       169.5614       50.45001    
+    29.78000       172.7573       50.02689       29.00439       175.8557    
+    49.60620       28.23711       178.8534       49.18991       27.48129    
+    181.7468       48.78149       26.74080       184.5326       48.38040    
+    26.01740       187.2089       47.98950       25.31351       189.7751    
+    47.60910       24.63080       192.2292       47.24149       23.97169    
+    194.5731       46.88531       23.33600       196.8055       46.54199    
+    22.72330       198.9288       46.21219       22.13580       200.9078    
+    45.85571       21.51601       89.65350       53.21609       34.73399    
+    92.43433       53.81299       35.34151       95.35522       54.34500    
+    35.86490       98.41132       54.80621       36.29790       101.5912    
+    55.19339       36.63670       104.8849       55.49899       36.87280    
+    108.2795       55.72879       37.01360       111.7619       55.87671    
+    37.05220       115.3205       55.97021       37.02290       118.9448    
+    56.05420       36.97900       122.6201       56.07379       36.85561    
+    126.3339       55.97729       36.59120       130.0715       55.79929    
+    36.22780       133.8176       55.55441       35.78310       137.5634    
+    55.25119       35.26920       141.2968       54.90381       34.70140    
+    145.0078       54.51709       34.08791       148.6855       54.10080    
+    33.43990       152.3207       53.65921       32.76311       155.9030    
+    53.19800       32.06531       159.4238       52.72220       31.35201    
+    162.8742       52.23709       30.63010       166.2477       51.74509    
+    29.90359       169.5356       51.25101       29.17751       172.7336    
+    50.75729       28.45531       175.8339       50.26639       27.74080    
+    178.8342       49.78101       27.03709       181.7297       49.30469    
+    26.34760       184.5180       48.83719       25.67400       187.1962    
+    48.38129       25.01871       189.7643       47.93869       24.38300    
+    192.2204       47.51050       23.76939       194.5666       47.09619    
+    23.17751       196.8002       46.69650       22.60719       198.9260    
+    46.31250       22.06030       200.9064       45.89920       21.48340    
+    92.39130       55.07080       34.18520       89.61249       54.41431    
+    33.63210       95.31073       55.65381       34.66130       98.36542    
+    56.15799       35.05490       101.5441       56.57959       35.36211    
+    104.8369       56.90939       35.57561       108.2309       57.15530    
+    35.70190       111.7131       57.30930       35.73460       115.2719    
+    57.40311       35.70531       118.8962       57.48541       35.66270    
+    122.5715       57.49661       35.54730       126.2863       57.37769    
+    35.30310       130.0251       57.16891       34.96840       133.7724    
+    56.88501       34.55949       137.5197       56.53659       34.08720    
+    141.2546       56.13870       33.56590       144.9675       55.69730    
+    33.00270       148.6474       55.22269       32.40800       152.2846    
+    54.72049       31.78700       155.8688       54.19681       31.14690    
+    159.3917       53.65671       30.49271       162.8446       53.10620    
+    29.83070       166.2204       52.54880       29.16451       169.5106    
+    51.98929       28.49890       172.7106       51.42990       27.83670    
+    175.8131       50.87451       27.18170       178.8156       50.32520    
+    26.53661       181.7133       49.78641       25.90460       184.5036    
+    49.25781       25.28720       187.1838       48.74240       24.68649    
+    189.7538       48.24191       24.10390       192.2121       47.75809    
+    23.54150       194.5598       47.29050       22.99910       196.7953    
+    46.83890       22.47639       198.9225       46.40500       21.97510    
+    200.9052       45.93900       21.44670       92.35083       56.20969    
+    32.91180       95.26868       56.83939       33.33600       98.32172    
+    57.38229       33.68590       101.4995       57.83499       33.95860    
+    104.7912       58.18750       34.14700       108.1848       58.44730    
+    34.25729       111.6669       58.60739       34.28371       115.2255    
+    58.70041       34.25430       118.8498       58.78229       34.21310    
+    122.5256       58.78491       34.10660       126.2409       58.64651    
+    33.88460       129.9806       58.40939       33.58160       133.7297    
+    58.09009       33.21201       137.4780       57.70090       32.78571    
+    141.2150       57.25711       32.31540       144.9294       56.76611    
+    31.80769       148.6113       56.23901       31.27170       152.2504    
+    55.68188       30.71220       155.8365       55.10089       30.13570    
+    159.3620       54.50290       29.54649       162.8163       53.89359    
+    28.95039       166.1943       53.27661       28.35069       169.4868    
+    52.65771       27.75150       172.6888       52.03879       27.15550    
+    175.7936       51.42529       26.56599       178.7983       50.81812    
+    25.98540       181.6974       50.22241       25.41670       184.4902    
+    49.63889       24.86121       187.1721       49.07010       24.32069    
+    189.7443       48.51709       23.79649       192.2042       47.98270    
+    23.29050       194.5534       47.46631       22.80251       196.7907    
+    46.96750       22.33231       198.9193       46.48880       21.88139    
+    200.9037       45.97510       21.40630       95.19281       58.79251    
+    30.36839       92.27771       58.08591       30.06081       98.24353    
+    59.39990       30.62080       101.4189       59.90359       30.81590    
+    104.7094       60.29300       30.94830       108.1017       60.57639    
+    31.02260       111.5837       60.74579       31.03481       115.1425    
+    60.83890       31.00549       118.7670       60.91821       30.96730    
+    122.4431       60.90820       30.88071       126.1596       60.73709    
+    30.70850       129.9013       60.45340       30.47630       133.6523    
+    60.07620       30.19479       137.4037       59.61890       29.87140    
+    141.1430       59.09991       29.51540       144.8610       58.52731    
+    29.13181       148.5461       57.91379       28.72740       152.1887    
+    57.26569       28.30560       155.7785       56.59131       27.87140    
+    159.3073       55.89749       27.42790       162.7661       55.19070    
+    26.97940       166.1476       54.47610       26.52840       169.4440    
+    53.75900       26.07800       172.6498       53.04269       25.63020    
+    175.7584       52.33249       25.18730       178.7668       51.63062    
+    24.75130       181.6699       50.94189       24.32420       184.4658    
+    50.26660       23.90730       187.1513       49.60910       23.50160    
+    189.7267       48.97000       23.10820       192.1896       48.35251    
+    22.72861       194.5421       47.75540       22.36250       196.7829    
+    47.17990       22.00980       198.9140       46.62720       21.67149    
+    200.9015       46.03470       21.31570       95.13013       60.12991    
+    27.07610       98.17908       60.78101       27.22040       101.3530    
+    61.31961       27.32930       104.6425       61.73410       27.39960    
+    108.0341       62.03421       27.43410       111.5151       62.20969    
+    27.43050       115.0742       62.30301       27.40120       118.6984    
+    62.38110       27.36639       122.3752       62.36179       27.30180    
+    126.0927       62.16849       27.18491       129.8359       61.85251    
+    27.03130       133.5887       61.43549       26.84760       137.3422    
+    60.93240       26.63820       141.0842       60.36160       26.40910    
+    144.8049       59.73361       26.16319       148.4924       59.06030    
+    25.90469       152.1379       58.35010       25.63570       155.7311    
+    57.61160       25.35930       159.2629       56.85229       25.07739    
+    162.7248       56.07941       24.79269       166.1096       55.29739    
+    24.50681       169.4089       54.51321       24.22141       172.6174    
+    53.73029       23.93790       175.7294       52.95389       23.65781    
+    178.7408       52.18649       23.38220       181.6469       51.43381    
+    23.11230       184.4457       50.69681       22.84900       187.1342    
+    49.97800       22.59290       189.7120       49.28030       22.34470    
+    192.1781       48.60571       22.10510       194.5329       47.95389    
+    21.87421       196.7758       47.32520       21.65190       198.9096    
+    46.72171       21.43871       200.8996       46.07541       21.21530    
+    98.13129       61.47311       23.61530       95.08392       60.79980    
+    23.58560       101.3036       62.02930       23.63280       104.5922    
+    62.45609       23.63730       107.9831       62.76440       23.62959    
+    111.4648       62.94312       23.60921       115.0236       63.03610    
+    23.58000       118.6481       63.11380       23.54871       122.3249    
+    63.09009       23.50751       126.0433       62.88550       23.44920    
+    129.7873       62.55350       23.37891       133.5419       62.11670    
+    23.29880       137.2966       61.59009       23.21049       141.0405    
+    60.99371       23.11580       144.7634       60.33719       23.01590    
+    148.4526       59.63449       22.91200       152.1005       58.89359    
+    22.80510       155.6955       58.12299       22.69600       159.2297    
+    57.33029       22.58549       162.6938       56.52420       22.47440    
+    166.0807       55.70850       22.36340       169.3825       54.89111    
+    22.25310       172.5936       54.07449       22.14391       175.7079    
+    53.26520       22.03630       178.7214       52.46509       21.93060    
+    181.6296       51.68051       21.82750       184.4308       50.91211    
+    21.72701       187.1213       50.16309       21.62950       189.7014    
+    49.43549       21.53510       192.1691       48.73239       21.44420    
+    194.5261       48.05319       21.35670       196.7706       47.39819    
+    21.27251       198.9064       46.76901       21.19189       200.8981    
+    46.09589       21.10870       79.20819       39.39819       33.56149    
+    7.451104       37.48637       19.52032       7.540614       37.48644    
+    19.16060       7.640707       37.51372       18.89211       7.353294    
+    37.48627       19.91354       7.083385       37.48598       20.99869    
+    7.867048       37.51684       18.43455       8.008080       37.51875    
+    18.14937       8.967255       37.53860       16.50969       8.697523    
+    37.49703       16.88581       8.622787       37.49586       17.01447    
+    8.530040       37.49443       17.17416       9.590383       37.55047    
+    15.77241       9.981786       37.55782       15.30915       10.74391    
+    37.55193       14.46730       10.50643       37.54726       14.72012    
+    11.70262       37.62504       13.52604       11.11052       37.55912    
+    14.07702       12.02262       37.63181       13.25834       12.07517    
+    37.63292       13.21437       12.45315       37.61880       12.92116    
+    14.34063       37.65141       11.55752       13.56535       37.63439    
+    12.11410       12.60171       37.61325       12.80592       16.33366    
+    37.66275       10.35062       15.29077       37.63906       10.96480    
+    14.86807       37.62943       11.21371       16.81328       37.67901    
+    10.07340       16.71089       37.67131       10.12846       18.22846    
+    37.74931       9.408334       17.34023       37.68941       9.810320    
+    17.20290       37.68670       9.878882       78.32639       39.06335    
+    9.479923       77.87212       39.05048       9.343957       77.52778    
+    39.05027       9.250374       78.49063       39.06802       9.529079    
+    79.41727       39.08954       9.818474       81.09612       38.63425    
+    9.851597       79.02095       39.07824       9.692622       80.43339    
+    39.11852       10.14116       19.31769       37.77532       8.948162    
+    19.45307       37.77855       8.890965       19.79465       37.77111    
+    8.757449       22.23524       37.82137       7.871101       21.65661    
+    37.80744       8.079932       19.98102       37.76703       8.684606    
+    23.21281       37.82115       7.562318       22.76336       37.81011    
+    7.697010       24.16698       37.84457       7.276385       25.15756    
+    37.86887       6.979536       26.65697       37.88318       6.602530    
+    25.68614       37.85897       6.836851       26.84957       37.88799    
+    6.556039       28.21502       37.92199       6.226378       30.13887    
+    37.94894       5.852933       29.70062       37.93784       5.934747    
+    28.74380       37.91368       6.113431       31.39552       37.98083    
+    5.618306       32.71872       37.99331       5.428897       33.65224    
+    38.01722       5.305186       31.92437       37.97293       5.534141    
+    34.68992       38.04374       5.167709       35.89727       38.05639    
+    5.052245       37.18908       38.08992       4.941856       35.21892    
+    38.03879       5.110217       38.08498       38.11315       4.865314    
+    39.23046       38.12440       4.809218       40.74294       38.16403    
+    4.751468       38.61438       38.10827       4.832746       41.56816    
+    38.18570       4.719932       42.70288       38.20360       4.702997    
+    44.31110       38.24603       4.690232       42.09727       38.18764    
+    4.707815       45.12727       38.26759       4.683734       46.27831    
+    38.29575       4.679718       47.91518       38.33912       4.676203    
+    45.65609       38.27928       4.681068       48.75122       38.36125    
+    4.674428       49.95026       38.37993       4.703243       51.54157    
+    38.42226       4.753062       49.28047       38.36206       4.682241    
+    52.42662       38.44580       4.780772       53.76244       38.45858    
+    4.885450       55.13127       38.49563       5.008547       52.95636    
+    38.43680       4.812977       56.14067       38.52291       5.099345    
+    57.72495       38.55003       5.295379       58.65681       38.57544    
+    5.416949       56.67050       38.52124       5.157792       59.87831    
+    38.60885       5.576237       61.81360       38.64880       5.884528    
+    62.12330       38.65733       5.935276       60.40802       38.61012    
+    5.654213       63.62423       38.69857       6.181287       65.52515    
+    38.73959       6.539986       64.15431       38.70174       6.275828    
+    66.01900       38.75322       6.635157       67.36926       38.79047    
+    6.895362       68.85464       38.82264       7.209758       67.89947    
+    38.79602       7.003641       70.33208       38.86380       7.528585    
+    71.10226       38.88525       7.694788       72.10599       38.90507    
+    7.926692       71.63222       38.89182       7.814641       74.81271    
+    38.98083       8.566810       74.75283       38.97916       8.552649    
+    75.26646       38.98782       8.677977       75.34290       38.98899    
+    8.696704       81.13322       38.59873       9.837256       82.15338    
+    37.78551       9.551587       84.72707       35.88658       8.966534    
+    84.06020       36.37257       9.114104       82.44349       37.55078    
+    9.471877       85.33684       35.39089       8.909300       84.76408    
+    35.85255       8.961434       85.79494       35.08976       8.895738    
+    88.87266       33.14836       8.871049       87.29549       34.08902    
+    8.861303       89.19202       32.91545       8.902339       89.37047    
+    32.78532       8.919822       92.50425       30.90681       9.334747    
+    90.60979       31.91125       9.057818       89.99522       32.32368    
+    8.985206       92.87280       30.71376       9.389094       92.83222    
+    30.73291       9.382693       93.01535       30.64553       9.412535    
+    94.89629       29.57051       9.901046       95.81397       29.04603    
+    10.13938       96.29701       28.80184       10.26486       96.92166    
+    28.50477       10.43149       96.74352       28.57308       10.38396    
+    98.92565       27.60534       11.16680       99.62596       27.33388    
+    11.41529       100.9073       26.83086       11.87962       101.0393    
+    26.76625       11.94701       102.1603       26.21732       12.51960    
+    102.8660       25.92289       12.85891       104.1810       25.57603    
+    13.41620       102.9084       25.90492       12.87970       105.5020    
+    25.15589       14.16767       105.9960       25.02677       14.43001    
+    107.0891       24.73714       15.02018       108.9469       24.12961    
+    16.43517       109.0302       24.12095       16.48001       108.5533    
+    24.18978       16.20385       109.0581       24.11800       16.49531    
+    109.1000       24.11152       16.52898       109.7452       24.01166    
+    17.04744       110.8885       23.83473       17.96620       111.6315    
+    23.60928       19.13868       111.7331       23.57846       19.29896    
+    111.4726       23.65750       18.88790       111.7421       23.44982    
+    19.96923       111.9675       23.45255       20.33555       112.1306    
+    23.45455       20.60418       112.1311       23.45498       20.67027    
+    112.1415       23.46302       21.90295       111.3410       23.47057    
+    23.25420       111.4965       23.46912       22.99214       111.5869    
+    23.46828       22.84006       111.9821       23.46455       22.17500    
+    112.1102       23.46333       21.95647       110.1274       23.63980    
+    24.67966       110.5788       23.48954       23.94267       110.6274    
+    23.47337       23.86339       108.3370       23.97741       26.21004    
+    108.6427       23.90943       25.93505       109.0302       23.82325    
+    25.58645       109.1123       23.80971       25.51951       109.7649    
+    23.70053       24.97985       109.9245       23.67378       24.84766    
+    105.7908       24.43507       27.79819       105.6444       24.49128    
+    27.91784       105.8423       24.41527       27.75605       105.9914    
+    24.35801       27.63420       106.1217       24.33710       27.55622    
+    107.3223       24.14221       26.82685       107.9406       24.04179    
+    26.45100       104.3812       24.93531       28.72845       104.9154    
+    24.74728       28.38558       105.6321       24.49488       27.92525    
+    102.7776       25.43150       29.59566       102.8655       25.40461    
+    29.54884       103.0167       25.35829       29.46820       103.7243    
+    25.13894       29.08455       103.9497       25.06904       28.96231    
+    100.9351       26.02215       30.48107       101.5610       25.81209    
+    30.17597       101.7208       25.75846       30.09805       102.3197    
+    25.55756       29.80620       99.07848       26.74283       31.31539    
+    99.11403       26.72382       31.29778       99.33483       26.62124    
+    31.19370       99.42873       26.57761       31.14942       99.81106    
+    26.39990       30.96913       99.99731       26.31219       30.87962    
+    100.5100       26.15361       30.66171       97.29631       27.59717    
+    32.05243       97.38155       27.55630       32.01717       98.21432    
+    27.15709       31.67277       95.32420       28.49756       32.74200    
+    95.21722       28.55053       32.77966       95.71328       28.30490    
+    32.60505       96.02101       28.15252       32.49672       96.50055    
+    27.94528       32.33200       97.00357       27.72522       32.15525    
+    93.32606       29.49214       33.34205       93.11086       29.62330    
+    33.40690       93.83055       29.18469       33.19001       94.39793    
+    28.92518       33.02206       91.16795       30.80387       33.85688    
+    91.41875       30.65099       33.79882       91.88883       30.36451    
+    33.68999       93.05820       29.65201       33.41940       93.09813    
+    29.63031       33.41000       93.10632       29.62580       33.40801    
+    89.01153       32.07355       34.22617       89.24370       31.93193    
+    34.18866       89.54332       31.74918       34.14027       89.60563    
+    31.71120       34.13020       90.22696       31.32774       34.02522    
+    90.58170       31.13028       33.96178       86.91527       33.41706    
+    34.42256       87.87827       32.73501       34.34949       87.82693    
+    32.76878       34.35407       87.53472       32.96094       34.38016    
+    88.12930       32.56991       34.32709       84.90393       34.80833    
+    34.43090       85.30085       34.50956       34.44013       85.29617    
+    34.51296       34.44007       85.00285       34.72606       34.43612    
+    85.58455       34.30346       34.44396       86.03321       34.00740    
+    34.43887       86.54787       33.66287       34.42937       86.60737    
+    33.62306       34.42826       83.32380       35.99472       34.27042    
+    83.05391       36.21661       34.23360       84.07603       35.42996    
+    34.34681       84.11628       35.39974       34.35089       25.04626    
+    37.86613       36.86444       25.27937       37.86945       36.93034    
+    25.32234       37.87066       36.94212       25.40340       37.87296    
+    36.96435       27.79942       37.91481       37.50141       26.08977    
+    37.86728       37.12883       25.93413       37.86295       37.09491    
+    28.47221       37.93352       37.64803       30.45883       37.96483    
+    37.99001       29.87697       37.94883       37.89397       29.00283    
+    37.92481       37.74968       31.66205       37.99797       38.18864    
+    32.19219       37.98927       38.26228       33.30532       38.01955    
+    38.38753       33.57819       38.02697       38.41822       34.96349    
+    38.06453       38.57411       35.49339       38.05872       38.62175    
+    36.34414       38.08157       38.67873       37.21491       38.10496    
+    38.73705       38.36274       38.13583       38.81392       38.89251    
+    38.12971       38.83731       39.57182       38.14779       38.85154    
+    40.78798       38.18020       38.87703       41.84765       38.20838    
+    38.89927       42.37733       38.20951       38.90273       42.99758    
+    38.22592       38.89759       44.33235       38.26117       38.88651    
+    45.40693       38.28955       38.87758       45.93590       38.30096    
+    38.87167       46.57956       38.31790       38.86261       47.91095    
+    38.35302       38.84391       49.03080       38.38261       38.82814    
+    49.55989       38.38215       38.81216       50.25014       38.40017    
+    38.77993       51.45514       38.43159       38.72366       52.70414    
+    38.46421       38.66530       53.23341       38.45282       38.62568    
+    54.10764       38.47542       38.53491       54.87482       38.49528    
+    38.45527       56.41228       38.53501       38.29571       58.25971    
+    38.56494       38.04152       58.18246       38.56297       38.05259    
+    56.94127       38.53121       38.23051       60.14215       38.61298    
+    37.77166       62.67369       38.66279       37.33476       61.39065    
+    38.63029       37.56065       60.67065       38.61205       37.68740    
+    63.87803       38.69333       37.12275       64.49812       38.69657    
+    37.00368       64.89045       38.70642       36.92355       64.40672    
+    38.69427       37.02235       67.43453       38.79535       36.38854    
+    67.56396       38.79987       36.36132       67.61056       38.80150    
+    36.35152       68.13880       38.81099       36.23393       68.16967    
+    38.81210       36.22672       81.29049       37.61731       33.84287    
+    81.33034       37.58237       33.85392       81.65057       37.32442    
+    33.92867       81.93545       37.09495       33.99516       82.38243    
+    36.73474       34.09959       82.67428       36.49612       34.16612    
+    82.83363       36.37878       34.19445       83.01258       36.24702    
+    34.22626       17.59437       37.69767       34.20890       17.55529    
+    37.69654       34.19252       18.99370       37.73822       34.79560    
+    19.66836       37.75784       35.07851       20.19966       37.75044    
+    35.28440       20.93133       37.77140       35.54490       22.07457    
+    37.80404       35.95184       22.46688       37.81524       36.09149    
+    22.99781       37.80782       36.26382       23.02630       37.80864    
+    36.27217       70.47018       38.86949       35.67057       71.33005    
+    38.89090       35.46272       71.85825       38.89635       35.32944    
+    72.70343       38.91735       35.10687       73.26177       38.93123    
+    34.95985       75.02553       38.97497       34.49551       75.94398    
+    38.99133       34.24218       76.88265       39.01454       33.97834    
+    75.55349       38.98172       34.35191       78.66200       39.09521    
+    33.45031       78.68564       39.09628       33.44329       79.95995    
+    38.68547       33.40086       79.59610       38.99018       33.27037    
+    78.71422       39.09731       33.43455       80.46887       38.25922    
+    33.58342       80.51101       38.22392       33.59854       80.92786    
+    37.89948       33.72923       13.99087       37.69292       32.14869    
+    13.95615       37.69239       32.12514       14.25483       37.69696    
+    32.32770       14.51096       37.70091       32.50143       15.04377    
+    37.67492       32.82859       15.64626       37.68547       33.16258    
+    17.00811       37.70924       33.91744       17.21113       37.70337    
+    34.02057       17.47763       37.69564       34.15592       17.54023    
+    37.69577       34.18596       78.83459       39.09996       33.39608    
+    79.21348       39.10831       33.27498       79.55418       39.02138    
+    33.25389       79.43633       39.11534       33.20177       11.55778    
+    37.59985       30.30550       11.86999       37.61656       30.56508    
+    12.21967       37.63528       30.85583       12.75240       37.63247    
+    31.26735       12.98706       37.64413       31.43454       8.908394    
+    37.52078       27.42537       9.513346       37.54134       28.11856    
+    10.09188       37.56083       28.78123       10.62627       37.55791    
+    29.36206       10.65900       37.55898       29.39578       11.43083    
+    37.58441       30.19128       7.779818       37.50576       25.40563    
+    7.625424       37.49980       25.10583       7.620790       37.50076    
+    25.09415       8.072324       37.51700       25.97350       8.536054    
+    37.50692       26.80721       8.609895       37.50536       26.94006    
+    8.875785       37.51528       27.38145       7.234977       37.48129    
+    23.64336       7.281224       37.48362       23.81721       7.077827    
+    37.48192       23.01065       7.090355       37.47403       23.09976    
+    7.069979       37.47541       22.01544       7.066135       37.47227    
+    21.53137       7.063241       37.46990       21.16783       95.33406    
+    60.52325       18.48578       95.33252       60.42158       17.99106    
+    95.40148       60.85369       20.16767       95.33881       60.83916    
+    20.02301       95.33778       60.77044       19.68861       94.73550    
+    59.98059       16.57423       94.78515       60.01960       16.69768    
+    94.73789       59.68495       15.87261       95.04800       60.22587    
+    17.35024       94.83175       60.05619       16.81341       94.10882    
+    58.88296       14.41205       93.87209       58.58160       13.86318    
+    94.33705       59.17383       14.94172       93.08167       57.56775    
+    12.58394       93.49701       58.28545       13.44016       92.81259    
+    57.10271       12.02917       93.50988       58.30769       13.46668    
+    91.64411       55.92935       10.91290       91.36463       55.27908    
+    10.40011       92.16741       56.48774       11.43435       92.72697    
+    57.02020       11.94891       91.88073       56.18209       11.14886    
+    91.64457       55.93042       10.91374       92.78420       57.07536    
+    12.00255       89.63107       53.11334       9.050673       90.71432    
+    54.46690       9.894095       90.76380       54.52871       9.932606    
+    88.35069       51.22246       8.361530       87.95886       50.63203    
+    8.148959       88.44274       51.36121       8.411474       89.37109    
+    52.76030       8.915000       89.53745       53.00227       9.005005    
+    89.52566       52.98590       8.998780       89.45089       52.88217    
+    8.959329       89.59302       53.07935       9.034331       87.09552    
+    49.63049       7.938373       87.16365       49.73900       7.954995    
+    86.88508       49.29524       7.887033       86.11385       47.92365    
+    7.698846       87.27326       49.91359       7.981746       84.49510    
+    45.64437       7.755579       84.76836       46.12837       7.726027    
+    84.21770       45.08209       7.799677       85.10757       46.72927    
+    7.689353       84.83842       46.25249       7.718453       85.97887    
+    47.76135       7.696750       86.02886       47.82147       7.697529    
+    86.06142       47.86061       7.698035       82.47193       42.31023    
+    8.485790       82.43626       42.24137       8.505304       82.55001    
+    42.46090       8.443088       83.59386       44.25391       7.977329    
+    83.19129       43.71926       8.092007       82.83009       43.01056    
+    8.289722       83.82686       44.56328       7.910952       81.05572    
+    40.07877       9.554563       81.29595       40.55610       9.304464    
+    80.79058       39.55183       9.830678       82.31622       42.09407    
+    8.569291       81.89418       41.51996       8.831873       81.53572    
+    41.03236       9.054888       95.40525       60.85671       20.62896    
+    95.08085       60.79730       23.20234       79.69968       39.48329    
+    33.46838       79.84075       39.77529       33.63585       79.99270    
+    40.08979       33.81623       79.80165       39.69436       33.58943    
+    80.42687       40.82073       34.20992       80.74599       41.42490    
+    34.47005       81.23134       42.22062       34.79360       80.73598    
+    41.40850       34.46338       80.44641       40.86343       34.22919    
+    80.62848       41.23233       34.39177       81.82228       43.27753    
+    35.11553       81.92453       43.45215       35.16744       82.04392    
+    43.65601       35.22803       81.34911       42.46954       34.87534    
+    82.47397       44.43533       35.38399       82.70963       44.80508    
+    35.44965       82.10796       43.79548       35.25934       82.90329    
+    45.11391       35.50290       83.29842       45.77243       35.55441    
+    83.79406       46.57696       35.61388       82.95345       45.21257    
+    35.51302       82.94658       45.20142       35.51220       84.14433    
+    47.16539       35.60363       84.66078       48.00458       35.58467    
+    84.67316       48.02215       35.58387       83.84057       46.67176    
+    35.61479       85.43924       49.13894       35.43038       85.65147    
+    49.43875       35.38751       84.86845       48.33260       35.54567    
+    84.76940       48.19271       35.56568       85.82144       49.73580    
+    35.32660       86.14083       50.17781       35.21933       86.58789    
+    50.80539       35.06390       87.04668       51.53334       34.82606    
+    86.86454       51.28423       34.91400       86.76522       51.11237    
+    34.96780       87.51973       52.11040       34.60902       86.71014    
+    51.01704       34.99764       87.95674       52.76081       34.32202    
+    87.98505       52.80296       34.30342       88.44766       53.34247    
+    34.03901       89.20600       54.38610       33.44555       89.30509    
+    54.49590       33.37793       88.79122       53.82917       33.76496    
+    89.10694       54.27633       33.51315       89.51673       54.77777    
+    33.18148       90.14958       55.55894       32.61788       89.59579    
+    54.88435       33.10667       90.34702       55.79160       32.41494    
+    91.08393       56.51207       31.74890       90.21657       55.66408    
+    32.53282       91.51579       57.02670       31.22017       91.81703    
+    57.38573       30.85129       92.22643       58.03681       30.10561    
+    92.22653       58.03696       30.10544       92.39349       58.17812    
+    29.91719       92.27716       58.09778       30.03158       92.25282    
+    58.07875       30.05759       92.82913       58.53609       29.35007    
+    93.17939       58.82727       28.88593       93.29563       58.97741    
+    28.60188       93.94950       59.82209       27.00378       94.11202    
+    59.90627       26.79989       94.54758       60.24755       25.66197    
+    94.95250       60.56473       24.60454       95.14871       60.81151    
+    23.03804       95.41850       60.86798       22.38510       94.94090    
+    60.72848       23.75089       94.93862       60.76058       23.58353    
+            1           2           3           2           4           3
+            2           5           4           5           6           4
+            5           7           6           7           8           6
+            7           9           8           9          10           8
+            9          11          10          11          12          10
+           11          13          12           1           3          14
+            3          15          14           3           4          15
+            4          16          15           4           6          16
+            6          17          16           6           8          17
+            8          18          17           8          10          18
+           10          19          18          10          12          19
+           12          20          19           1          14          21
+           14          22          21          14          15          22
+           15          23          22          15          16          23
+           16          24          23          16          17          24
+           17          25          24          17          18          25
+           18          26          25          18          19          26
+           19          27          26          19          20          27
+           20          28          27           1          21          29
+           21          30          29          21          22          30
+           22          31          30          22          23          31
+           23          32          31          23          24          32
+           24          33          32          24          25          33
+           25          34          33          25          26          34
+           26          35          34          26          27          35
+           27          36          35          27          28          36
+           28          37          36           1          29          38
+           29          39          38          29          30          39
+           30          40          39          30          31          40
+           31          41          40          31          32          41
+           32          42          41          32          33          42
+           33          43          42          33          34          43
+           34          44          43          34          35          44
+           35          45          44          35          36          45
+           36          46          45          36          37          46
+           37          47          46          37          48          47
+           48          49          47          48          50          49
+           50          51          49          52          53          54
+            1          38          55          38          56          55
+           38          39          56          39          57          56
+           39          40          57          40          58          57
+           40          41          58          41          59          58
+           41          42          59          42          60          59
+           42          43          60          43          61          60
+           43          44          61          44          62          61
+           44          45          62          45          63          62
+           45          46          63          46          64          63
+           46          47          64          47          65          64
+           47          49          65          49          66          65
+           49          51          66          51          67          66
+           51          68          67          68          69          67
+           68          70          69          70          71          69
+           70          72          71          72          73          71
+           72          74          73          74          75          73
+           74          76          75          76          77          75
+           76          78          77          78          79          77
+           78          80          79          80          81          79
+           80          82          81          82          83          81
+           82          84          83          84          85          83
+           84          86          85          86          87          85
+           86          88          87          88          89          87
+           88          90          89          90          91          89
+           90          92          91          92          93          91
+           92          94          93          94          95          93
+           94          96          95          96          97          95
+           96          98          97          98          99          97
+           98          54          99          54         100          99
+           54          53         100          53         101         100
+            1          55         102          55         103         102
+           55          56         103          56         104         103
+           56          57         104          57         105         104
+           57          58         105          58         106         105
+           58          59         106          59         107         106
+           59          60         107          60         108         107
+           60          61         108          61         109         108
+           61          62         109          62         110         109
+           62          63         110          63         111         110
+           63          64         111          64         112         111
+           64          65         112          65         113         112
+           65          66         113          66         114         113
+           66          67         114          67         115         114
+           67          69         115          69         116         115
+           69          71         116          71         117         116
+           71          73         117          73         118         117
+           73          75         118          75         119         118
+           75          77         119          77         120         119
+           77          79         120          79         121         120
+           79          81         121          81         122         121
+           81          83         122          83         123         122
+           83          85         123          85         124         123
+           85          87         124          87         125         124
+           87          89         125          89         126         125
+           89          91         126          91         127         126
+           91          93         127          93         128         127
+           93          95         128          95         129         128
+           95          97         129          97         130         129
+           97          99         130          99         131         130
+           99         100         131         100         132         131
+          100         101         132         101         133         132
+            1         102         134         102         135         134
+          102         103         135         103         136         135
+          103         104         136         104         137         136
+          104         105         137         105         138         137
+          105         106         138         106         139         138
+          106         107         139         107         140         139
+          107         108         140         108         141         140
+          108         109         141         109         142         141
+          109         110         142         110         143         142
+          110         111         143         111         144         143
+          111         112         144         112         145         144
+          112         113         145         113         146         145
+          113         114         146         114         147         146
+          114         115         147         115         148         147
+          115         116         148         116         149         148
+          116         117         149         117         150         149
+          117         118         150         118         151         150
+          118         119         151         119         152         151
+          119         120         152         120         153         152
+          120         121         153         121         154         153
+          121         122         154         122         155         154
+          122         123         155         123         156         155
+          123         124         156         124         157         156
+          124         125         157         125         158         157
+          125         126         158         126         159         158
+          126         127         159         127         160         159
+          127         128         160         128         161         160
+          128         129         161         129         162         161
+          129         130         162         130         163         162
+          130         131         163         131         164         163
+          131         132         164         132         165         164
+          132         133         165         133         166         165
+          133         167         166         167         168         166
+            1         134         169         134         170         169
+          134         135         170         135         171         170
+          135         136         171         136         172         171
+          136         137         172         137         173         172
+          137         138         173         138         174         173
+          138         139         174         139         175         174
+          139         140         175         140         176         175
+          140         141         176         141         177         176
+          141         142         177         142         178         177
+          142         143         178         143         179         178
+          143         144         179         144         180         179
+          144         145         180         145         181         180
+          145         146         181         146         182         181
+          146         147         182         147         183         182
+          147         148         183         148         184         183
+          148         149         184         149         185         184
+          149         150         185         150         186         185
+          150         151         186         151         187         186
+          151         152         187         152         188         187
+          152         153         188         153         189         188
+          153         154         189         154         190         189
+          154         155         190         155         191         190
+          155         156         191         156         192         191
+          156         157         192         157         193         192
+          157         158         193         158         194         193
+          158         159         194         159         195         194
+          159         160         195         160         196         195
+          160         161         196         161         197         196
+          161         162         197         162         198         197
+          162         163         198         163         199         198
+          163         164         199         164         200         199
+          164         165         200         165         201         200
+          165         166         201         166         202         201
+          166         168         202         168         203         202
+            1         169         204         169         205         204
+          169         170         205         170         206         205
+          170         171         206         171         207         206
+          171         172         207         172         208         207
+          172         173         208         173         209         208
+          173         174         209         174         210         209
+          174         175         210         175         211         210
+          175         176         211         176         212         211
+          176         177         212         177         213         212
+          177         178         213         178         214         213
+          178         179         214         179         215         214
+          179         180         215         180         216         215
+          180         181         216         181         217         216
+          181         182         217         182         218         217
+          182         183         218         183         219         218
+          183         184         219         184         220         219
+          184         185         220         185         221         220
+          185         186         221         186         222         221
+          186         187         222         187         223         222
+          187         188         223         188         224         223
+          188         189         224         189         225         224
+          189         190         225         190         226         225
+          190         191         226         191         227         226
+          191         192         227         192         228         227
+          192         193         228         193         229         228
+          193         194         229         194         230         229
+          194         195         230         195         231         230
+          195         196         231         196         232         231
+          196         197         232         197         233         232
+          197         198         233         198         234         233
+          198         199         234         199         235         234
+          199         200         235         200         236         235
+          200         201         236         201         237         236
+          201         202         237         202         238         237
+          202         203         238         203         239         238
+            1         204         240         204         241         240
+          204         205         241         205         242         241
+          205         206         242         206         243         242
+          206         207         243         207         244         243
+          207         208         244         208         245         244
+          208         209         245         209         246         245
+          209         210         246         210         247         246
+          210         211         247         211         248         247
+          211         212         248         212         249         248
+          212         213         249         213         250         249
+          213         214         250         214         251         250
+          214         215         251         215         252         251
+          215         216         252         216         253         252
+          216         217         253         217         254         253
+          217         218         254         218         255         254
+          218         219         255         219         256         255
+          219         220         256         220         257         256
+          220         221         257         221         258         257
+          221         222         258         222         259         258
+          222         223         259         223         260         259
+          223         224         260         224         261         260
+          224         225         261         225         262         261
+          225         226         262         226         263         262
+          226         227         263         227         264         263
+          227         228         264         228         265         264
+          228         229         265         229         266         265
+          229         230         266         230         267         266
+          230         231         267         231         268         267
+          231         232         268         232         269         268
+          232         233         269         233         270         269
+          233         234         270         234         271         270
+          234         235         271         235         272         271
+          235         236         272         236         273         272
+          236         237         273         237         274         273
+          237         238         274         238         275         274
+          238         239         275         239         276         275
+            1         240         277         240         278         277
+          240         241         278         241         279         278
+          241         242         279         242         280         279
+          242         243         280         243         281         280
+          243         244         281         244         282         281
+          244         245         282         245         283         282
+          245         246         283         246         284         283
+          246         247         284         247         285         284
+          247         248         285         248         286         285
+          248         249         286         249         287         286
+          249         250         287         250         288         287
+          250         251         288         251         289         288
+          251         252         289         252         290         289
+          252         253         290         253         291         290
+          253         254         291         254         292         291
+          254         255         292         255         293         292
+          255         256         293         256         294         293
+          256         257         294         257         295         294
+          257         258         295         258         296         295
+          258         259         296         259         297         296
+          259         260         297         260         298         297
+          260         261         298         261         299         298
+          261         262         299         262         300         299
+          262         263         300         263         301         300
+          263         264         301         264         302         301
+          264         265         302         265         303         302
+          265         266         303         266         304         303
+          266         267         304         267         305         304
+          267         268         305         268         306         305
+          268         269         306         269         307         306
+          269         270         307         270         308         307
+          270         271         308         271         309         308
+          271         272         309         272         310         309
+          272         273         310         273         311         310
+          273         274         311         274         312         311
+          274         275         312         275         313         312
+          275         276         313         276         314         313
+            1         277         315         277         316         315
+          277         278         316         278         317         316
+          278         279         317         279         318         317
+          279         280         318         280         319         318
+          280         281         319         281         320         319
+          281         282         320         282         321         320
+          282         283         321         283         322         321
+          283         284         322         284         323         322
+          284         285         323         285         324         323
+          285         286         324         286         325         324
+          286         287         325         287         326         325
+          287         288         326         288         327         326
+          288         289         327         289         328         327
+          289         290         328         290         329         328
+          290         291         329         291         330         329
+          291         292         330         292         331         330
+          292         293         331         293         332         331
+          293         294         332         294         333         332
+          294         295         333         295         334         333
+          295         296         334         296         335         334
+          296         297         335         297         336         335
+          297         298         336         298         337         336
+          298         299         337         299         338         337
+          299         300         338         300         339         338
+          300         301         339         301         340         339
+          301         302         340         302         341         340
+          302         303         341         303         342         341
+          303         304         342         304         343         342
+          304         305         343         305         344         343
+          305         306         344         306         345         344
+          306         307         345         307         346         345
+          307         308         346         308         347         346
+          308         309         347         309         348         347
+          309         310         348         310         349         348
+          310         311         349         311         350         349
+          311         312         350         312         351         350
+          312         313         351         313         352         351
+          313         314         352           1         315         353
+          315         354         353         315         316         354
+          316         355         354         316         317         355
+          317         356         355         317         318         356
+          318         357         356         318         319         357
+          319         358         357         319         320         358
+          320         359         358         320         321         359
+          321         360         359         321         322         360
+          322         361         360         322         323         361
+          323         362         361         323         324         362
+          324         363         362         324         325         363
+          325         364         363         325         326         364
+          326         365         364         326         327         365
+          327         366         365         327         328         366
+          328         367         366         328         329         367
+          329         368         367         329         330         368
+          330         369         368         330         331         369
+          331         370         369         331         332         370
+          332         371         370         332         333         371
+          333         372         371         333         334         372
+          334         373         372         334         335         373
+          335         374         373         335         336         374
+          336         375         374         336         337         375
+          337         376         375         337         338         376
+          338         377         376         338         339         377
+          339         378         377         339         340         378
+          340         379         378         340         341         379
+          341         380         379         341         342         380
+          342         381         380         342         343         381
+          343         382         381         343         344         382
+          344         383         382         344         345         383
+          345         384         383         345         346         384
+          346         385         384         346         347         385
+          347         386         385         347         348         386
+          348         387         386         348         349         387
+          349         388         387         349         350         388
+          350         389         388         350         351         389
+          351         390         389         351         352         390
+            1         353         391         353         392         391
+          353         354         392         354         393         392
+          354         355         393         355         394         393
+          355         356         394         356         395         394
+          356         357         395         357         396         395
+          357         358         396         358         397         396
+          358         359         397         359         398         397
+          359         360         398         360         399         398
+          360         361         399         361         400         399
+          361         362         400         362         401         400
+          362         363         401         363         402         401
+          363         364         402         364         403         402
+          364         365         403         365         404         403
+          365         366         404         366         405         404
+          366         367         405         367         406         405
+          367         368         406         368         407         406
+          368         369         407         369         408         407
+          369         370         408         370         409         408
+          370         371         409         371         410         409
+          371         372         410         372         411         410
+          372         373         411         373         412         411
+          373         374         412         374         413         412
+          374         375         413         375         414         413
+          375         376         414         376         415         414
+          376         377         415         377         416         415
+          377         378         416         378         417         416
+          378         379         417         379         418         417
+          379         380         418         380         419         418
+          380         381         419         381         420         419
+          381         382         420         382         421         420
+          382         383         421         383         422         421
+          383         384         422         384         423         422
+          384         385         423         385         424         423
+          385         386         424         386         425         424
+          386         387         425         387         426         425
+          387         388         426         388         427         426
+          388         389         427         389         428         427
+          389         390         428         390         429         428
+            1         391         430         391         431         430
+          391         392         431         392         432         431
+          392         393         432         393         433         432
+          393         394         433         394         434         433
+          394         395         434         395         435         434
+          395         396         435         396         436         435
+          396         397         436         397         437         436
+          397         398         437         398         438         437
+          398         399         438         399         439         438
+          399         400         439         400         440         439
+          400         401         440         401         441         440
+          401         402         441         402         442         441
+          402         403         442         403         443         442
+          403         404         443         404         444         443
+          404         405         444         405         445         444
+          405         406         445         406         446         445
+          406         407         446         407         447         446
+          407         408         447         408         448         447
+          408         409         448         409         449         448
+          409         410         449         410         450         449
+          410         411         450         411         451         450
+          411         412         451         412         452         451
+          412         413         452         413         453         452
+          413         414         453         414         454         453
+          414         415         454         415         455         454
+          415         416         455         416         456         455
+          416         417         456         417         457         456
+          417         418         457         418         458         457
+          418         419         458         419         459         458
+          419         420         459         420         460         459
+          420         421         460         421         461         460
+          421         422         461         422         462         461
+          422         423         462         423         463         462
+          423         424         463         424         464         463
+          424         425         464         425         465         464
+          425         426         465         426         466         465
+          426         427         466         427         467         466
+          427         428         467         428         468         467
+          428         429         468           1         430         469
+          430         470         469         430         431         470
+          431         471         470         431         432         471
+          432         472         471         432         433         472
+          433         473         472         433         434         473
+          434         474         473         434         435         474
+          435         475         474         435         436         475
+          436         476         475         436         437         476
+          437         477         476         437         438         477
+          438         478         477         438         439         478
+          439         479         478         439         440         479
+          440         480         479         440         441         480
+          441         481         480         441         442         481
+          442         482         481         442         443         482
+          443         483         482         443         444         483
+          444         484         483         444         445         484
+          445         485         484         445         446         485
+          446         486         485         446         447         486
+          447         487         486         447         448         487
+          448         488         487         448         449         488
+          449         489         488         449         450         489
+          450         490         489         450         451         490
+          451         491         490         451         452         491
+          452         492         491         452         453         492
+          453         493         492         453         454         493
+          454         494         493         454         455         494
+          455         495         494         455         456         495
+          456         496         495         456         457         496
+          457         497         496         457         458         497
+          458         498         497         458         459         498
+          459         499         498         459         460         499
+          460         500         499         460         461         500
+          461         501         500         461         462         501
+          462         502         501         462         463         502
+          463         503         502         463         464         503
+          464         504         503         464         465         504
+          465         505         504         465         466         505
+          466         506         505         466         467         506
+            1         469         507         469         508         507
+          469         470         508         470         509         508
+          470         471         509         471         510         509
+          471         472         510         472         511         510
+          472         473         511         473         512         511
+          473         474         512         474         513         512
+          474         475         513         475         514         513
+          475         476         514         476         515         514
+          476         477         515         477         516         515
+          477         478         516         478         517         516
+          478         479         517         479         518         517
+          479         480         518         480         519         518
+          480         481         519         481         520         519
+          481         482         520         482         521         520
+          482         483         521         483         522         521
+          483         484         522         484         523         522
+          484         485         523         485         524         523
+          485         486         524         486         525         524
+          486         487         525         487         526         525
+          487         488         526         488         527         526
+          488         489         527         489         528         527
+          489         490         528         490         529         528
+          490         491         529         491         530         529
+          491         492         530         492         531         530
+          492         493         531         493         532         531
+          493         494         532         494         533         532
+          494         495         533         495         534         533
+          495         496         534         496         535         534
+          496         497         535         497         536         535
+          497         498         536         498         537         536
+          498         499         537         499         538         537
+          499         500         538         500         539         538
+          500         501         539         501         540         539
+          501         502         540         502         541         540
+          502         503         541         503         542         541
+          503         504         542         504         543         542
+          504         505         543         505         544         543
+          505         506         544           1         507         545
+          507         546         545         507         508         546
+          508         547         546         508         509         547
+          509         548         547         509         510         548
+          510         549         548         510         511         549
+          511         550         549         511         512         550
+          512         551         550         512         513         551
+          513         552         551         513         514         552
+          514         553         552         514         515         553
+          515         554         553         515         516         554
+          516         555         554         516         517         555
+          517         556         555         517         518         556
+          518         557         556         518         519         557
+          519         558         557         519         520         558
+          520         559         558         520         521         559
+          521         560         559         521         522         560
+          522         561         560         522         523         561
+          523         562         561         523         524         562
+          524         563         562         524         525         563
+          525         564         563         525         526         564
+          526         565         564         526         527         565
+          527         566         565         527         528         566
+          528         567         566         528         529         567
+          529         568         567         529         530         568
+          530         569         568         530         531         569
+          531         570         569         531         532         570
+          532         571         570         532         533         571
+          533         572         571         533         534         572
+          534         573         572         534         535         573
+          535         574         573         535         536         574
+          536         575         574         536         537         575
+          537         576         575         537         538         576
+          538         577         576         538         539         577
+          539         578         577         539         540         578
+          540         579         578         540         541         579
+          541         580         579         541         542         580
+          542         581         580         542         543         581
+            1         545         582         545         583         582
+          545         546         583         546         584         583
+          546         547         584         547         585         584
+          547         548         585         548         586         585
+          548         549         586         549         587         586
+          549         550         587         550         588         587
+          550         551         588         551         589         588
+          551         552         589         552         590         589
+          552         553         590         553         591         590
+          553         554         591         554         592         591
+          554         555         592         555         593         592
+          555         556         593         556         594         593
+          556         557         594         557         595         594
+          557         558         595         558         596         595
+          558         559         596         559         597         596
+          559         560         597         560         598         597
+          560         561         598         561         599         598
+          561         562         599         562         600         599
+          562         563         600         563         601         600
+          563         564         601         564         602         601
+          564         565         602         565         603         602
+          565         566         603         566         604         603
+          566         567         604         567         605         604
+          567         568         605         568         606         605
+          568         569         606         569         607         606
+          569         570         607         570         608         607
+          570         571         608         571         609         608
+          571         572         609         572         610         609
+          572         573         610         573         611         610
+          573         574         611         574         612         611
+          574         575         612         575         613         612
+          575         576         613         576         614         613
+          576         577         614         577         615         614
+          577         578         615         578         616         615
+          578         579         616         579         617         616
+          579         580         617           1         582         618
+          582         619         618         582         583         619
+          583         620         619         583         584         620
+          584         621         620         584         585         621
+          585         622         621         585         586         622
+          586         623         622         586         587         623
+          587         624         623         587         588         624
+          588         625         624         588         589         625
+          589         626         625         589         590         626
+          590         627         626         590         591         627
+          591         628         627         591         592         628
+          592         629         628         592         593         629
+          593         630         629         593         594         630
+          594         631         630         594         595         631
+          595         632         631         595         596         632
+          596         633         632         596         597         633
+          597         634         633         597         598         634
+          598         635         634         598         599         635
+          599         636         635         599         600         636
+          600         637         636         600         601         637
+          601         638         637         601         602         638
+          602         639         638         602         603         639
+          603         640         639         603         604         640
+          604         641         640         604         605         641
+          605         642         641         605         606         642
+          606         643         642         606         607         643
+          607         644         643         607         608         644
+          608         645         644         608         609         645
+          609         646         645         609         610         646
+          610         647         646         610         611         647
+          611         648         647         611         612         648
+          612         649         648         612         613         649
+          613         650         649         613         614         650
+          614         651         650         614         615         651
+          615         652         651         615         616         652
+          616         653         652         616         617         653
+            1         618         654         618         655         654
+          618         619         655         619         656         655
+          619         620         656         620         657         656
+          620         621         657         621         658         657
+          621         622         658         622         659         658
+          622         623         659         623         660         659
+          623         624         660         624         661         660
+          624         625         661         625         662         661
+          625         626         662         626         663         662
+          626         627         663         627         664         663
+          627         628         664         628         665         664
+          628         629         665         629         666         665
+          629         630         666         630         667         666
+          630         631         667         631         668         667
+          631         632         668         632         669         668
+          632         633         669         633         670         669
+          633         634         670         634         671         670
+          634         635         671         635         672         671
+          635         636         672         636         673         672
+          636         637         673         637         674         673
+          637         638         674         638         675         674
+          638         639         675         639         676         675
+          639         640         676         640         677         676
+          640         641         677         641         678         677
+          641         642         678         642         679         678
+          642         643         679         643         680         679
+          643         644         680         644         681         680
+          644         645         681         645         682         681
+          645         646         682         646         683         682
+          646         647         683         647         684         683
+          647         648         684         648         685         684
+          648         649         685         649         686         685
+          649         650         686         650         687         686
+          650         651         687         651         688         687
+          651         652         688           1         654         689
+          654         690         689         654         655         690
+          655         691         690         655         656         691
+          656         692         691         656         657         692
+          657         693         692         657         658         693
+          658         694         693         658         659         694
+          659         695         694         659         660         695
+          660         696         695         660         661         696
+          661         697         696         661         662         697
+          662         698         697         662         663         698
+          663         699         698         663         664         699
+          664         700         699         664         665         700
+          665         701         700         665         666         701
+          666         702         701         666         667         702
+          667         703         702         667         668         703
+          668         704         703         668         669         704
+          669         705         704         669         670         705
+          670         706         705         670         671         706
+          671         707         706         671         672         707
+          672         708         707         672         673         708
+          673         709         708         673         674         709
+          674         710         709         674         675         710
+          675         711         710         675         676         711
+          676         712         711         676         677         712
+          677         713         712         677         678         713
+          678         714         713         678         679         714
+          679         715         714         679         680         715
+          680         716         715         680         681         716
+          681         717         716         681         682         717
+          682         718         717         682         683         718
+          683         719         718         683         684         719
+          684         720         719         684         685         720
+          685         721         720         685         686         721
+          686         722         721         686         687         722
+          687         723         722         687         688         723
+            1         689         724         689         725         724
+          689         690         725         690         726         725
+          690         691         726         691         727         726
+          691         692         727         692         728         727
+          692         693         728         693         729         728
+          693         694         729         694         730         729
+          694         695         730         695         731         730
+          695         696         731         696         732         731
+          696         697         732         697         733         732
+          697         698         733         698         734         733
+          698         699         734         699         735         734
+          699         700         735         700         736         735
+          700         701         736         701         737         736
+          701         702         737         702         738         737
+          702         703         738         703         739         738
+          703         704         739         704         740         739
+          704         705         740         705         741         740
+          705         706         741         706         742         741
+          706         707         742         707         743         742
+          707         708         743         708         744         743
+          708         709         744         709         745         744
+          709         710         745         710         746         745
+          710         711         746         711         747         746
+          711         712         747         712         748         747
+          712         713         748         713         749         748
+          713         714         749         714         750         749
+          714         715         750         715         751         750
+          715         716         751         716         752         751
+          716         717         752         717         753         752
+          717         718         753         718         754         753
+          718         719         754         719         755         754
+          719         720         755         720         756         755
+          720         721         756         721         757         756
+          721         722         757           1         724         758
+          724         759         758         724         725         759
+          725         760         759         725         726         760
+          726         761         760         726         727         761
+          727         762         761         727         728         762
+          728         763         762         728         729         763
+          729         764         763         729         730         764
+          730         765         764         730         731         765
+          731         766         765         731         732         766
+          732         767         766         732         733         767
+          733         768         767         733         734         768
+          734         769         768         734         735         769
+          735         770         769         735         736         770
+          736         771         770         736         737         771
+          737         772         771         737         738         772
+          738         773         772         738         739         773
+          739         774         773         739         740         774
+          740         775         774         740         741         775
+          741         776         775         741         742         776
+          742         777         776         742         743         777
+          743         778         777         743         744         778
+          744         779         778         744         745         779
+          745         780         779         745         746         780
+          746         781         780         746         747         781
+          747         782         781         747         748         782
+          748         783         782         748         749         783
+          749         784         783         749         750         784
+          750         785         784         750         751         785
+          751         786         785         751         752         786
+          752         787         786         752         753         787
+          753         788         787         753         754         788
+          754         789         788         754         755         789
+          755         790         789         755         756         790
+          756         791         790         756         757         791
+            1         758         792         758         793         792
+          758         759         793         759         794         793
+          759         760         794         760         795         794
+          760         761         795         761         796         795
+          761         762         796         762         797         796
+          762         763         797         763         798         797
+          763         764         798         764         799         798
+          764         765         799         765         800         799
+          765         766         800         766         801         800
+          766         767         801         767         802         801
+          767         768         802         768         803         802
+          768         769         803         769         804         803
+          769         770         804         770         805         804
+          770         771         805         771         806         805
+          771         772         806         772         807         806
+          772         773         807         773         808         807
+          773         774         808         774         809         808
+          774         775         809         775         810         809
+          775         776         810         776         811         810
+          776         777         811         777         812         811
+          777         778         812         778         813         812
+          778         779         813         779         814         813
+          779         780         814         780         815         814
+          780         781         815         781         816         815
+          781         782         816         782         817         816
+          782         783         817         783         818         817
+          783         784         818         784         819         818
+          784         785         819         785         820         819
+          785         786         820         786         821         820
+          786         787         821         787         822         821
+          787         788         822         788         823         822
+          788         789         823         789         824         823
+          789         790         824           1         792         825
+          792         826         825         792         793         826
+          793         827         826         793         794         827
+          794         828         827         794         795         828
+          795         829         828         795         796         829
+          796         830         829         796         797         830
+          797         831         830         797         798         831
+          798         832         831         798         799         832
+          799         833         832         799         800         833
+          800         834         833         800         801         834
+          801         835         834         801         802         835
+          802         836         835         802         803         836
+          803         837         836         803         804         837
+          804         838         837         804         805         838
+          805         839         838         805         806         839
+          806         840         839         806         807         840
+          807         841         840         807         808         841
+          808         842         841         808         809         842
+          809         843         842         809         810         843
+          810         844         843         810         811         844
+          811         845         844         811         812         845
+          812         846         845         812         813         846
+          813         847         846         813         814         847
+          814         848         847         814         815         848
+          815         849         848         815         816         849
+          816         850         849         816         817         850
+          817         851         850         817         818         851
+          818         852         851         818         819         852
+          819         853         852         819         820         853
+          820         854         853         820         821         854
+          821         855         854         821         822         855
+          822         856         855         822         823         856
+          823         857         856         823         824         857
+            1         825         858         825         859         858
+          825         826         859         826         860         859
+          826         827         860         827         861         860
+          827         828         861         828         862         861
+          828         829         862         829         863         862
+          829         830         863         830         864         863
+          830         831         864         831         865         864
+          831         832         865         832         866         865
+          832         833         866         833         867         866
+          833         834         867         834         868         867
+          834         835         868         835         869         868
+          835         836         869         836         870         869
+          836         837         870         837         871         870
+          837         838         871         838         872         871
+          838         839         872         839         873         872
+          839         840         873         840         874         873
+          840         841         874         841         875         874
+          841         842         875         842         876         875
+          842         843         876         843         877         876
+          843         844         877         844         878         877
+          844         845         878         845         879         878
+          845         846         879         846         880         879
+          846         847         880         847         881         880
+          847         848         881         848         882         881
+          848         849         882         849         883         882
+          849         850         883         850         884         883
+          850         851         884         851         885         884
+          851         852         885         852         886         885
+          852         853         886         853         887         886
+          853         854         887         854         888         887
+          854         855         888         855         889         888
+          855         856         889           1         858         890
+          858         891         890         858         859         891
+          859         892         891         859         860         892
+          860         893         892         860         861         893
+          861         894         893         861         862         894
+          862         895         894         862         863         895
+          863         896         895         863         864         896
+          864         897         896         864         865         897
+          865         898         897         865         866         898
+          866         899         898         866         867         899
+          867         900         899         867         868         900
+          868         901         900         868         869         901
+          869         902         901         869         870         902
+          870         903         902         870         871         903
+          871         904         903         871         872         904
+          872         905         904         872         873         905
+          873         906         905         873         874         906
+          874         907         906         874         875         907
+          875         908         907         875         876         908
+          876         909         908         876         877         909
+          877         910         909         877         878         910
+          878         911         910         878         879         911
+          879         912         911         879         880         912
+          880         913         912         880         881         913
+          881         914         913         881         882         914
+          882         915         914         882         883         915
+          883         916         915         883         884         916
+          884         917         916         884         885         917
+          885         918         917         885         886         918
+          886         919         918         886         887         919
+          887         920         919         887         888         920
+            1         890         921         890         922         921
+          890         891         922         891         923         922
+          891         892         923         892         924         923
+          892         893         924         893         925         924
+          893         894         925         894         926         925
+          894         895         926         895         927         926
+          895         896         927         896         928         927
+          896         897         928         897         929         928
+          897         898         929         898         930         929
+          898         899         930         899         931         930
+          899         900         931         900         932         931
+          900         901         932         901         933         932
+          901         902         933         902         934         933
+          902         903         934         903         935         934
+          903         904         935         904         936         935
+          904         905         936         905         937         936
+          905         906         937         906         938         937
+          906         907         938         907         939         938
+          907         908         939         908         940         939
+          908         909         940         909         941         940
+          909         910         941         910         942         941
+          910         911         942         911         943         942
+          911         912         943         912         944         943
+          912         913         944         913         945         944
+          913         914         945         914         946         945
+          914         915         946         915         947         946
+          915         916         947         916         948         947
+          916         917         948         917         949         948
+          917         918         949         918         950         949
+          918         919         950         919         951         950
+          919         920         951           1         921         952
+          921         953         952         921         922         953
+          922         954         953         922         923         954
+          923         955         954         923         924         955
+          924         956         955         924         925         956
+          925         957         956         925         926         957
+          926         958         957         926         927         958
+          927         959         958         927         928         959
+          928         960         959         928         929         960
+          929         961         960         929         930         961
+          930         962         961         930         931         962
+          931         963         962         931         932         963
+          932         964         963         932         933         964
+          933         965         964         933         934         965
+          934         966         965         934         935         966
+          935         967         966         935         936         967
+          936         968         967         936         937         968
+          937         969         968         937         938         969
+          938         970         969         938         939         970
+          939         971         970         939         940         971
+          940         972         971         940         941         972
+          941         973         972         941         942         973
+          942         974         973         942         943         974
+          943         975         974         943         944         975
+          944         976         975         944         945         976
+          945         977         976         945         946         977
+          946         978         977         946         947         978
+          947         979         978         947         948         979
+          948         980         979         948         949         980
+          949         981         980         949         950         981
+            1         952         982         952         983         982
+          952         953         983         953         984         983
+          953         954         984         954         985         984
+          954         955         985         955         986         985
+          955         956         986         956         987         986
+          956         957         987         957         988         987
+          957         958         988         958         989         988
+          958         959         989         959         990         989
+          959         960         990         960         991         990
+          960         961         991         961         992         991
+          961         962         992         962         993         992
+          962         963         993         963         994         993
+          963         964         994         964         995         994
+          964         965         995         965         996         995
+          965         966         996         966         997         996
+          966         967         997         967         998         997
+          967         968         998         968         999         998
+          968         969         999         969        1000         999
+          969         970        1000         970        1001        1000
+          970         971        1001         971        1002        1001
+          971         972        1002         972        1003        1002
+          972         973        1003         973        1004        1003
+          973         974        1004         974        1005        1004
+          974         975        1005         975        1006        1005
+          975         976        1006         976        1007        1006
+          976         977        1007         977        1008        1007
+          977         978        1008         978        1009        1008
+          978         979        1009         979        1010        1009
+          979         980        1010         980        1011        1010
+          980         981        1011           1         982        1012
+          982        1013        1012         982         983        1013
+          983        1014        1013         983         984        1014
+          984        1015        1014         984         985        1015
+          985        1016        1015         985         986        1016
+          986        1017        1016         986         987        1017
+          987        1018        1017         987         988        1018
+          988        1019        1018         988         989        1019
+          989        1020        1019         989         990        1020
+          990        1021        1020         990         991        1021
+          991        1022        1021         991         992        1022
+          992        1023        1022         992         993        1023
+          993        1024        1023         993         994        1024
+         1007        1008        1025        1008        1026        1025
+         1008        1009        1026        1009        1027        1026
+         1009        1010        1027           1        1012        1028
+         1012        1029        1028        1012        1013        1029
+         1013        1030        1029        1013        1014        1030
+         1014        1031        1030        1014        1015        1031
+         1015        1032        1031        1015        1016        1032
+         1016        1033        1032        1016        1017        1033
+         1017        1034        1033        1017        1018        1034
+         1018        1035        1034        1018        1019        1035
+         1019        1036        1035        1019        1020        1036
+         1020        1037        1036        1020        1021        1037
+         1021        1038        1037        1021        1022        1038
+            1        1028        1039        1028        1040        1039
+         1028        1029        1040        1029        1041        1040
+         1029        1030        1041        1030        1042        1041
+         1030        1031        1042        1031        1043        1042
+         1031        1032        1043        1032        1044        1043
+         1032        1033        1044        1033        1045        1044
+         1033        1034        1045        1034        1046        1045
+         1034        1035        1046        1035        1047        1046
+         1035        1036        1047           1        1039        1048
+         1039        1049        1048        1039        1040        1049
+         1040        1050        1049        1040        1041        1050
+         1041        1051        1050        1041        1042        1051
+         1042        1052        1051        1042        1043        1052
+         1043        1053        1052        1043        1044        1053
+         1044        1054        1053        1044        1045        1054
+         1045        1055        1054        1045        1046        1055
+            1        1048        1056        1048        1057        1056
+         1048        1049        1057        1049        1058        1057
+         1049        1050        1058        1050        1059        1058
+         1050        1051        1059        1051        1060        1059
+         1051        1052        1060        1052        1061        1060
+         1052        1053        1061        1053        1062        1061
+         1053        1054        1062           1        1056        1063
+         1056        1064        1063        1056        1057        1064
+         1057        1065        1064        1057        1058        1065
+         1058        1066        1065        1058        1059        1066
+         1059        1067        1066        1059        1060        1067
+         1060        1068        1067        1060        1061        1068
+            1        1063        1069        1063        1070        1069
+         1063        1064        1070        1064        1071        1070
+         1064        1065        1071        1065        1072        1071
+         1065        1066        1072        1066        1073        1072
+         1066        1067        1073        1067        1074        1073
+         1067        1068        1074           1        1069           2
+         1069           5           2        1069        1070           5
+         1070           7           5        1070        1071           7
+         1071           9           7        1071        1072           9
+         1072          11           9        1072        1073          11
+         1073          13          11        1073        1074          13
+         1075        1076        1077        1076        1078        1077
+         1076        1079        1078        1079        1080        1078
+         1079        1081        1080        1081        1082        1080
+         1081        1083        1082        1083        1084        1082
+         1083        1085        1084        1085        1086        1084
+         1085        1087        1086        1087        1088        1086
+         1087        1089        1088        1089        1090        1088
+         1089        1091        1090        1091        1092        1090
+         1091        1093        1092        1093        1094        1092
+         1093        1095        1094        1095        1096        1094
+         1095        1097        1096        1097        1098        1096
+         1097        1099        1098        1099        1100        1098
+         1099        1101        1100        1101        1102        1100
+         1101        1103        1102        1103        1104        1102
+         1103        1105        1104        1105        1106        1104
+         1105        1107        1106        1107        1108        1106
+         1107        1109        1108        1109        1110        1108
+         1109        1111        1110        1111        1112        1110
+         1111        1113        1112        1113        1114        1112
+         1113        1115        1114        1115        1116        1114
+         1115        1117        1116        1117        1118        1116
+         1117        1119        1118        1119        1120        1118
+         1119        1121        1120        1121        1122        1120
+         1121        1123        1122        1123        1124        1122
+         1123        1125        1124        1125        1126        1124
+         1125        1127        1126        1127        1128        1126
+         1127        1129        1128        1129        1130        1128
+         1129        1131        1130        1131        1132        1130
+         1131        1133        1132        1133        1134        1132
+         1133        1135        1134        1135        1136        1134
+         1135        1137        1136        1137        1138        1136
+         1137        1139        1138        1139        1140        1138
+         1139        1141        1140        1075        1077        1142
+         1077        1143        1142        1077        1078        1143
+         1078        1144        1143        1078        1080        1144
+         1080        1145        1144        1080        1082        1145
+         1082        1146        1145        1082        1084        1146
+         1084        1147        1146        1084        1086        1147
+         1086        1148        1147        1086        1088        1148
+         1088        1149        1148        1088        1090        1149
+         1090        1150        1149        1090        1092        1150
+         1092        1151        1150        1092        1094        1151
+         1094        1152        1151        1094        1096        1152
+         1096        1153        1152        1096        1098        1153
+         1098        1154        1153        1098        1100        1154
+         1100        1155        1154        1100        1102        1155
+         1102        1156        1155        1102        1104        1156
+         1104        1157        1156        1104        1106        1157
+         1106        1158        1157        1106        1108        1158
+         1108        1159        1158        1108        1110        1159
+         1110        1160        1159        1110        1112        1160
+         1112        1161        1160        1112        1114        1161
+         1114        1162        1161        1114        1116        1162
+         1116        1163        1162        1116        1118        1163
+         1118        1164        1163        1118        1120        1164
+         1120        1165        1164        1120        1122        1165
+         1122        1166        1165        1122        1124        1166
+         1124        1167        1166        1124        1126        1167
+         1126        1168        1167        1126        1128        1168
+         1128        1169        1168        1128        1130        1169
+         1130        1170        1169        1130        1132        1170
+         1132        1171        1170        1132        1134        1171
+         1134        1172        1171        1134        1136        1172
+         1136        1173        1172        1136        1138        1173
+         1138        1174        1173        1138        1140        1174
+         1075        1142        1175        1142        1176        1175
+         1142        1143        1176        1143        1177        1176
+         1143        1144        1177        1144        1178        1177
+         1144        1145        1178        1145        1179        1178
+         1145        1146        1179        1146        1180        1179
+         1146        1147        1180        1147        1181        1180
+         1147        1148        1181        1148        1182        1181
+         1148        1149        1182        1149        1183        1182
+         1149        1150        1183        1150        1184        1183
+         1150        1151        1184        1151        1185        1184
+         1151        1152        1185        1152        1186        1185
+         1152        1153        1186        1153        1187        1186
+         1153        1154        1187        1154        1188        1187
+         1154        1155        1188        1155        1189        1188
+         1155        1156        1189        1156        1190        1189
+         1156        1157        1190        1157        1191        1190
+         1157        1158        1191        1158        1192        1191
+         1158        1159        1192        1159        1193        1192
+         1159        1160        1193        1160        1194        1193
+         1160        1161        1194        1161        1195        1194
+         1161        1162        1195        1162        1196        1195
+         1162        1163        1196        1163        1197        1196
+         1163        1164        1197        1164        1198        1197
+         1164        1165        1198        1165        1199        1198
+         1165        1166        1199        1166        1200        1199
+         1166        1167        1200        1167        1201        1200
+         1167        1168        1201        1168        1202        1201
+         1168        1169        1202        1169        1203        1202
+         1169        1170        1203        1170        1204        1203
+         1170        1171        1204        1171        1205        1204
+         1171        1172        1205        1172        1206        1205
+         1172        1173        1206        1173        1207        1206
+         1173        1174        1207        1075        1175        1208
+         1175        1209        1208        1175        1176        1209
+         1176        1210        1209        1176        1177        1210
+         1177        1211        1210        1177        1178        1211
+         1178        1212        1211        1178        1179        1212
+         1179        1213        1212        1179        1180        1213
+         1180        1214        1213        1180        1181        1214
+         1181        1215        1214        1181        1182        1215
+         1182        1216        1215        1182        1183        1216
+         1183        1217        1216        1183        1184        1217
+         1184        1218        1217        1184        1185        1218
+         1185        1219        1218        1185        1186        1219
+         1186        1220        1219        1186        1187        1220
+         1187        1221        1220        1187        1188        1221
+         1188        1222        1221        1188        1189        1222
+         1189        1223        1222        1189        1190        1223
+         1190        1224        1223        1190        1191        1224
+         1191        1225        1224        1191        1192        1225
+         1192        1226        1225        1192        1193        1226
+         1193        1227        1226        1193        1194        1227
+         1194        1228        1227        1194        1195        1228
+         1195        1229        1228        1195        1196        1229
+         1196        1230        1229        1196        1197        1230
+         1197        1231        1230        1197        1198        1231
+         1198        1232        1231        1198        1199        1232
+         1199        1233        1232        1199        1200        1233
+         1200        1234        1233        1200        1201        1234
+         1201        1235        1234        1201        1202        1235
+         1202        1236        1235        1202        1203        1236
+         1203        1237        1236        1203        1204        1237
+         1204        1238        1237        1204        1205        1238
+         1205        1239        1238        1205        1206        1239
+         1206        1240        1239        1206        1207        1240
+         1075        1208        1241        1208        1242        1241
+         1208        1209        1242        1209        1243        1242
+         1209        1210        1243        1210        1244        1243
+         1210        1211        1244        1211        1245        1244
+         1211        1212        1245        1212        1246        1245
+         1212        1213        1246        1213        1247        1246
+         1213        1214        1247        1214        1248        1247
+         1214        1215        1248        1215        1249        1248
+         1215        1216        1249        1216        1250        1249
+         1216        1217        1250        1217        1251        1250
+         1217        1218        1251        1218        1252        1251
+         1218        1219        1252        1219        1253        1252
+         1219        1220        1253        1220        1254        1253
+         1220        1221        1254        1221        1255        1254
+         1221        1222        1255        1222        1256        1255
+         1222        1223        1256        1223        1257        1256
+         1223        1224        1257        1224        1258        1257
+         1224        1225        1258        1225        1259        1258
+         1225        1226        1259        1226        1260        1259
+         1226        1227        1260        1227        1261        1260
+         1227        1228        1261        1228        1262        1261
+         1228        1229        1262        1229        1263        1262
+         1229        1230        1263        1230        1264        1263
+         1230        1231        1264        1231        1265        1264
+         1231        1232        1265        1232        1266        1265
+         1232        1233        1266        1233        1267        1266
+         1233        1234        1267        1234        1268        1267
+         1234        1235        1268        1235        1269        1268
+         1235        1236        1269        1236        1270        1269
+         1236        1237        1270        1237        1271        1270
+         1237        1238        1271        1238        1272        1271
+         1238        1239        1272        1075        1241        1273
+         1241        1274        1273        1241        1242        1274
+         1242        1275        1274        1242        1243        1275
+         1243        1276        1275        1243        1244        1276
+         1244        1277        1276        1244        1245        1277
+         1245        1278        1277        1245        1246        1278
+         1246        1279        1278        1246        1247        1279
+         1247        1280        1279        1247        1248        1280
+         1248        1281        1280        1248        1249        1281
+         1249        1282        1281        1249        1250        1282
+         1250        1283        1282        1250        1251        1283
+         1251        1284        1283        1251        1252        1284
+         1252        1285        1284        1252        1253        1285
+         1253        1286        1285        1253        1254        1286
+         1254        1287        1286        1254        1255        1287
+         1255        1288        1287        1255        1256        1288
+         1256        1289        1288        1256        1257        1289
+         1257        1290        1289        1257        1258        1290
+         1258        1291        1290        1258        1259        1291
+         1259        1292        1291        1259        1260        1292
+         1260        1293        1292        1260        1261        1293
+         1261        1294        1293        1261        1262        1294
+         1262        1295        1294        1262        1263        1295
+         1263        1296        1295        1263        1264        1296
+         1264        1297        1296        1264        1265        1297
+         1265        1298        1297        1265        1266        1298
+         1266        1299        1298        1266        1267        1299
+         1267        1300        1299        1267        1268        1300
+         1268        1301        1300        1268        1269        1301
+         1269        1302        1301        1269        1270        1302
+         1270        1303        1302        1270        1271        1303
+         1271        1304        1303        1271        1272        1304
+         1075        1273        1305        1273        1306        1305
+         1273        1274        1306        1274        1307        1306
+         1274        1275        1307        1275        1308        1307
+         1275        1276        1308        1276        1309        1308
+         1276        1277        1309        1277        1310        1309
+         1277        1278        1310        1278        1311        1310
+         1278        1279        1311        1279        1312        1311
+         1279        1280        1312        1280        1313        1312
+         1280        1281        1313        1281        1314        1313
+         1281        1282        1314        1282        1315        1314
+         1282        1283        1315        1283        1316        1315
+         1283        1284        1316        1284        1317        1316
+         1284        1285        1317        1285        1318        1317
+         1285        1286        1318        1286        1319        1318
+         1286        1287        1319        1287        1320        1319
+         1287        1288        1320        1288        1321        1320
+         1288        1289        1321        1289        1322        1321
+         1289        1290        1322        1290        1323        1322
+         1290        1291        1323        1291        1324        1323
+         1291        1292        1324        1292        1325        1324
+         1292        1293        1325        1293        1326        1325
+         1293        1294        1326        1294        1327        1326
+         1294        1295        1327        1295        1328        1327
+         1295        1296        1328        1296        1329        1328
+         1296        1297        1329        1297        1330        1329
+         1297        1298        1330        1298        1331        1330
+         1298        1299        1331        1299        1332        1331
+         1299        1300        1332        1300        1333        1332
+         1300        1301        1333        1301        1334        1333
+         1301        1302        1334        1302        1335        1334
+         1302        1303        1335        1075        1305        1336
+         1305        1337        1336        1305        1306        1337
+         1306        1338        1337        1306        1307        1338
+         1307        1339        1338        1307        1308        1339
+         1308        1340        1339        1308        1309        1340
+         1309        1341        1340        1309        1310        1341
+         1310        1342        1341        1310        1311        1342
+         1311        1343        1342        1311        1312        1343
+         1312        1344        1343        1312        1313        1344
+         1313        1345        1344        1313        1314        1345
+         1314        1346        1345        1314        1315        1346
+         1315        1347        1346        1315        1316        1347
+         1316        1348        1347        1316        1317        1348
+         1317        1349        1348        1317        1318        1349
+         1318        1350        1349        1318        1319        1350
+         1319        1351        1350        1319        1320        1351
+         1320        1352        1351        1320        1321        1352
+         1321        1353        1352        1321        1322        1353
+         1322        1354        1353        1322        1323        1354
+         1323        1355        1354        1323        1324        1355
+         1324        1356        1355        1324        1325        1356
+         1325        1357        1356        1325        1326        1357
+         1326        1358        1357        1326        1327        1358
+         1327        1359        1358        1327        1328        1359
+         1328        1360        1359        1328        1329        1360
+         1329        1361        1360        1329        1330        1361
+         1330        1362        1361        1330        1331        1362
+         1331        1363        1362        1331        1332        1363
+         1332        1364        1363        1332        1333        1364
+         1333        1365        1364        1333        1334        1365
+         1334        1366        1365        1334        1335        1366
+         1075        1336        1367        1336        1368        1367
+         1336        1337        1368        1337        1369        1368
+         1337        1338        1369        1338        1370        1369
+         1338        1339        1370        1339        1371        1370
+         1339        1340        1371        1340        1372        1371
+         1340        1341        1372        1341        1373        1372
+         1341        1342        1373        1342        1374        1373
+         1342        1343        1374        1343        1375        1374
+         1343        1344        1375        1344        1376        1375
+         1344        1345        1376        1345        1377        1376
+         1345        1346        1377        1346        1378        1377
+         1346        1347        1378        1347        1379        1378
+         1347        1348        1379        1348        1380        1379
+         1348        1349        1380        1349        1381        1380
+         1349        1350        1381        1350        1382        1381
+         1350        1351        1382        1351        1383        1382
+         1351        1352        1383        1352        1384        1383
+         1352        1353        1384        1353        1385        1384
+         1353        1354        1385        1354        1386        1385
+         1354        1355        1386        1355        1387        1386
+         1355        1356        1387        1356        1388        1387
+         1356        1357        1388        1357        1389        1388
+         1357        1358        1389        1358        1390        1389
+         1358        1359        1390        1359        1391        1390
+         1359        1360        1391        1360        1392        1391
+         1360        1361        1392        1361        1393        1392
+         1361        1362        1393        1362        1394        1393
+         1362        1363        1394        1363        1395        1394
+         1363        1364        1395        1364        1396        1395
+         1364        1365        1396        1075        1367        1397
+         1367        1398        1397        1367        1368        1398
+         1368        1399        1398        1368        1369        1399
+         1369        1400        1399        1369        1370        1400
+         1370        1401        1400        1370        1371        1401
+         1371        1402        1401        1371        1372        1402
+         1372        1403        1402        1372        1373        1403
+         1373        1404        1403        1373        1374        1404
+         1374        1405        1404        1374        1375        1405
+         1375        1406        1405        1375        1376        1406
+         1376        1407        1406        1376        1377        1407
+         1377        1408        1407        1377        1378        1408
+         1378        1409        1408        1378        1379        1409
+         1379        1410        1409        1379        1380        1410
+         1380        1411        1410        1380        1381        1411
+         1381        1412        1411        1381        1382        1412
+         1382        1413        1412        1382        1383        1413
+         1383        1414        1413        1383        1384        1414
+         1384        1415        1414        1384        1385        1415
+         1385        1416        1415        1385        1386        1416
+         1386        1417        1416        1386        1387        1417
+         1387        1418        1417        1387        1388        1418
+         1388        1419        1418        1388        1389        1419
+         1389        1420        1419        1389        1390        1420
+         1390        1421        1420        1390        1391        1421
+         1391        1422        1421        1391        1392        1422
+         1392        1423        1422        1392        1393        1423
+         1393        1424        1423        1393        1394        1424
+         1394        1425        1424        1394        1395        1425
+         1075        1397        1426        1397        1427        1426
+         1397        1398        1427        1398        1428        1427
+         1398        1399        1428        1399        1429        1428
+         1399        1400        1429        1400        1430        1429
+         1400        1401        1430        1401        1431        1430
+         1401        1402        1431        1402        1432        1431
+         1402        1403        1432        1403        1433        1432
+         1403        1404        1433        1404        1434        1433
+         1404        1405        1434        1405        1435        1434
+         1405        1406        1435        1424        1425        1436
+         1075        1426        1437        1426        1438        1437
+         1426        1427        1438        1427        1439        1438
+         1427        1428        1439        1428        1440        1439
+         1428        1429        1440        1429        1441        1440
+         1429        1430        1441        1430        1442        1441
+         1430        1431        1442        1431        1443        1442
+         1431        1432        1443        1432        1444        1443
+         1432        1433        1444        1075        1437        1445
+         1437        1446        1445        1437        1438        1446
+         1438        1447        1446        1438        1439        1447
+         1439        1448        1447        1439        1440        1448
+         1440        1449        1448        1440        1441        1449
+         1441        1450        1449        1441        1442        1450
+         1442        1451        1450        1442        1443        1451
+         1075        1445        1452        1445        1453        1452
+         1445        1446        1453        1446        1454        1453
+         1446        1447        1454        1447        1455        1454
+         1447        1448        1455        1448        1456        1455
+         1448        1449        1456        1449        1457        1456
+         1449        1450        1457        1075        1452        1458
+         1452        1459        1458        1452        1453        1459
+         1453        1460        1459        1453        1454        1460
+         1454        1461        1460        1454        1455        1461
+         1455        1462        1461        1455        1456        1462
+         1456        1463        1462        1456        1457        1463
+         1075        1458        1464        1458        1465        1464
+         1458        1459        1465        1459        1466        1465
+         1459        1460        1466        1460        1467        1466
+         1460        1461        1467        1461        1468        1467
+         1461        1462        1468        1462        1469        1468
+         1462        1463        1469        1075        1464        1470
+         1464        1471        1470        1464        1465        1471
+         1465        1472        1471        1465        1466        1472
+         1466        1473        1472        1466        1467        1473
+         1467        1474        1473        1467        1468        1474
+         1468        1475        1474        1468        1469        1475
+         1075        1470        1476        1470        1477        1476
+         1470        1471        1477        1471        1478        1477
+         1471        1472        1478        1472        1479        1478
+         1472        1473        1479        1473        1480        1479
+         1473        1474        1480        1474        1481        1480
+         1474        1475        1481        1475        1482        1481
+         1075        1476        1483        1476        1484        1483
+         1476        1477        1484        1477        1485        1484
+         1477        1478        1485        1478        1486        1485
+         1478        1479        1486        1479        1487        1486
+         1479        1480        1487        1480        1488        1487
+         1480        1481        1488        1481        1489        1488
+         1481        1482        1489        1482        1490        1489
+         1075        1483        1491        1483        1492        1491
+         1483        1484        1492        1484        1493        1492
+         1484        1485        1493        1485        1494        1493
+         1485        1486        1494        1486        1495        1494
+         1486        1487        1495        1487        1496        1495
+         1487        1488        1496        1488        1497        1496
+         1488        1489        1497        1489        1498        1497
+         1489        1490        1498        1490        1499        1498
+         1075        1491        1500        1491        1501        1500
+         1491        1492        1501        1492        1502        1501
+         1492        1493        1502        1493        1503        1502
+         1493        1494        1503        1494        1504        1503
+         1494        1495        1504        1495        1505        1504
+         1495        1496        1505        1496        1506        1505
+         1496        1497        1506        1497        1507        1506
+         1497        1498        1507        1498        1508        1507
+         1498        1499        1508        1499        1509        1508
+         1499        1510        1509        1510        1511        1509
+         1075        1500        1512        1500        1513        1512
+         1500        1501        1513        1501        1514        1513
+         1501        1502        1514        1502        1515        1514
+         1502        1503        1515        1503        1516        1515
+         1503        1504        1516        1504        1517        1516
+         1504        1505        1517        1505        1518        1517
+         1505        1506        1518        1506        1519        1518
+         1506        1507        1519        1507        1520        1519
+         1507        1508        1520        1508        1521        1520
+         1508        1509        1521        1509        1522        1521
+         1509        1511        1522        1511        1523        1522
+         1511        1524        1523        1524        1525        1523
+         1524        1526        1525        1526        1527        1525
+         1528        1529        1530        1528        1531        1529
+         1531        1532        1529        1531        1533        1532
+         1533        1534        1532        1533        1535        1534
+         1075        1512        1536        1512        1537        1536
+         1512        1513        1537        1513        1538        1537
+         1513        1514        1538        1514        1539        1538
+         1514        1515        1539        1515        1540        1539
+         1515        1516        1540        1516        1541        1540
+         1516        1517        1541        1517        1542        1541
+         1517        1518        1542        1518        1543        1542
+         1518        1519        1543        1519        1544        1543
+         1519        1520        1544        1520        1545        1544
+         1520        1521        1545        1521        1546        1545
+         1521        1522        1546        1522        1547        1546
+         1522        1523        1547        1523        1548        1547
+         1523        1525        1548        1525        1549        1548
+         1525        1527        1549        1527        1550        1549
+         1527        1551        1550        1551        1552        1550
+         1551        1553        1552        1553        1554        1552
+         1553        1555        1554        1555        1556        1554
+         1555        1557        1556        1557        1558        1556
+         1557        1559        1558        1559        1560        1558
+         1559        1561        1560        1561        1562        1560
+         1561        1563        1562        1563        1564        1562
+         1563        1565        1564        1565        1566        1564
+         1565        1567        1566        1567        1568        1566
+         1567        1569        1568        1569        1570        1568
+         1569        1571        1570        1571        1572        1570
+         1571        1530        1572        1530        1573        1572
+         1530        1529        1573        1529        1574        1573
+         1529        1532        1574        1532        1575        1574
+         1532        1534        1575        1075        1536        1576
+         1536        1577        1576        1536        1537        1577
+         1537        1578        1577        1537        1538        1578
+         1538        1579        1578        1538        1539        1579
+         1539        1580        1579        1539        1540        1580
+         1540        1581        1580        1540        1541        1581
+         1541        1582        1581        1541        1542        1582
+         1542        1583        1582        1542        1543        1583
+         1543        1584        1583        1543        1544        1584
+         1544        1585        1584        1544        1545        1585
+         1545        1586        1585        1545        1546        1586
+         1546        1587        1586        1546        1547        1587
+         1547        1588        1587        1547        1548        1588
+         1548        1589        1588        1548        1549        1589
+         1549        1590        1589        1549        1550        1590
+         1550        1591        1590        1550        1552        1591
+         1552        1592        1591        1552        1554        1592
+         1554        1593        1592        1554        1556        1593
+         1556        1594        1593        1556        1558        1594
+         1558        1595        1594        1558        1560        1595
+         1560        1596        1595        1560        1562        1596
+         1562        1597        1596        1562        1564        1597
+         1564        1598        1597        1564        1566        1598
+         1566        1599        1598        1566        1568        1599
+         1568        1600        1599        1568        1570        1600
+         1570        1601        1600        1570        1572        1601
+         1572        1602        1601        1572        1573        1602
+         1573        1603        1602        1573        1574        1603
+         1574        1604        1603        1574        1575        1604
+         1575        1605        1604        1075        1576        1606
+         1576        1607        1606        1576        1577        1607
+         1577        1608        1607        1577        1578        1608
+         1578        1609        1608        1578        1579        1609
+         1579        1610        1609        1579        1580        1610
+         1580        1611        1610        1580        1581        1611
+         1581        1612        1611        1581        1582        1612
+         1582        1613        1612        1582        1583        1613
+         1583        1614        1613        1583        1584        1614
+         1584        1615        1614        1584        1585        1615
+         1585        1616        1615        1585        1586        1616
+         1586        1617        1616        1586        1587        1617
+         1587        1618        1617        1587        1588        1618
+         1588        1619        1618        1588        1589        1619
+         1589        1620        1619        1589        1590        1620
+         1590        1621        1620        1590        1591        1621
+         1591        1622        1621        1591        1592        1622
+         1592        1623        1622        1592        1593        1623
+         1593        1624        1623        1593        1594        1624
+         1594        1625        1624        1594        1595        1625
+         1595        1626        1625        1595        1596        1626
+         1596        1627        1626        1596        1597        1627
+         1597        1628        1627        1597        1598        1628
+         1598        1629        1628        1598        1599        1629
+         1599        1630        1629        1599        1600        1630
+         1600        1631        1630        1600        1601        1631
+         1601        1632        1631        1601        1602        1632
+         1602        1633        1632        1602        1603        1633
+         1603        1634        1633        1603        1604        1634
+         1604        1635        1634        1604        1605        1635
+         1075        1606        1636        1606        1637        1636
+         1606        1607        1637        1607        1638        1637
+         1607        1608        1638        1608        1639        1638
+         1608        1609        1639        1609        1640        1639
+         1609        1610        1640        1610        1641        1640
+         1610        1611        1641        1611        1642        1641
+         1611        1612        1642        1612        1643        1642
+         1612        1613        1643        1613        1644        1643
+         1613        1614        1644        1614        1645        1644
+         1614        1615        1645        1615        1646        1645
+         1615        1616        1646        1616        1647        1646
+         1616        1617        1647        1617        1648        1647
+         1617        1618        1648        1618        1649        1648
+         1618        1619        1649        1619        1650        1649
+         1619        1620        1650        1620        1651        1650
+         1620        1621        1651        1621        1652        1651
+         1621        1622        1652        1622        1653        1652
+         1622        1623        1653        1623        1654        1653
+         1623        1624        1654        1624        1655        1654
+         1624        1625        1655        1625        1656        1655
+         1625        1626        1656        1626        1657        1656
+         1626        1627        1657        1627        1658        1657
+         1627        1628        1658        1628        1659        1658
+         1628        1629        1659        1629        1660        1659
+         1629        1630        1660        1630        1661        1660
+         1630        1631        1661        1631        1662        1661
+         1631        1632        1662        1632        1663        1662
+         1632        1633        1663        1633        1664        1663
+         1633        1634        1664        1634        1665        1664
+         1634        1635        1665        1075        1636        1666
+         1636        1667        1666        1636        1637        1667
+         1637        1668        1667        1637        1638        1668
+         1638        1669        1668        1638        1639        1669
+         1639        1670        1669        1639        1640        1670
+         1640        1671        1670        1640        1641        1671
+         1641        1672        1671        1641        1642        1672
+         1642        1673        1672        1642        1643        1673
+         1643        1674        1673        1643        1644        1674
+         1644        1675        1674        1644        1645        1675
+         1645        1676        1675        1645        1646        1676
+         1646        1677        1676        1646        1647        1677
+         1647        1678        1677        1647        1648        1678
+         1648        1679        1678        1648        1649        1679
+         1649        1680        1679        1649        1650        1680
+         1650        1681        1680        1650        1651        1681
+         1651        1682        1681        1651        1652        1682
+         1652        1683        1682        1652        1653        1683
+         1653        1684        1683        1653        1654        1684
+         1654        1685        1684        1654        1655        1685
+         1655        1686        1685        1655        1656        1686
+         1656        1687        1686        1656        1657        1687
+         1657        1688        1687        1657        1658        1688
+         1658        1689        1688        1658        1659        1689
+         1659        1690        1689        1659        1660        1690
+         1660        1691        1690        1660        1661        1691
+         1661        1692        1691        1661        1662        1692
+         1662        1693        1692        1662        1663        1693
+         1663        1694        1693        1663        1664        1694
+         1664        1695        1694        1664        1665        1695
+         1075        1666        1696        1666        1697        1696
+         1666        1667        1697        1667        1698        1697
+         1667        1668        1698        1668        1699        1698
+         1668        1669        1699        1669        1700        1699
+         1669        1670        1700        1670        1701        1700
+         1670        1671        1701        1671        1702        1701
+         1671        1672        1702        1672        1703        1702
+         1672        1673        1703        1673        1704        1703
+         1673        1674        1704        1674        1705        1704
+         1674        1675        1705        1675        1706        1705
+         1675        1676        1706        1676        1707        1706
+         1676        1677        1707        1677        1708        1707
+         1677        1678        1708        1678        1709        1708
+         1678        1679        1709        1679        1710        1709
+         1679        1680        1710        1680        1711        1710
+         1680        1681        1711        1681        1712        1711
+         1681        1682        1712        1682        1713        1712
+         1682        1683        1713        1683        1714        1713
+         1683        1684        1714        1684        1715        1714
+         1684        1685        1715        1685        1716        1715
+         1685        1686        1716        1686        1717        1716
+         1686        1687        1717        1687        1718        1717
+         1687        1688        1718        1688        1719        1718
+         1688        1689        1719        1689        1720        1719
+         1689        1690        1720        1690        1721        1720
+         1690        1691        1721        1691        1722        1721
+         1691        1692        1722        1692        1723        1722
+         1692        1693        1723        1693        1724        1723
+         1693        1694        1724        1694        1725        1724
+         1694        1695        1725        1695        1726        1725
+         1075        1696        1727        1696        1728        1727
+         1696        1697        1728        1697        1729        1728
+         1697        1698        1729        1698        1730        1729
+         1698        1699        1730        1699        1731        1730
+         1699        1700        1731        1700        1732        1731
+         1700        1701        1732        1701        1733        1732
+         1701        1702        1733        1702        1734        1733
+         1702        1703        1734        1703        1735        1734
+         1703        1704        1735        1704        1736        1735
+         1704        1705        1736        1705        1737        1736
+         1705        1706        1737        1706        1738        1737
+         1706        1707        1738        1707        1739        1738
+         1707        1708        1739        1708        1740        1739
+         1708        1709        1740        1709        1741        1740
+         1709        1710        1741        1710        1742        1741
+         1710        1711        1742        1711        1743        1742
+         1711        1712        1743        1712        1744        1743
+         1712        1713        1744        1713        1745        1744
+         1713        1714        1745        1714        1746        1745
+         1714        1715        1746        1715        1747        1746
+         1715        1716        1747        1716        1748        1747
+         1716        1717        1748        1717        1749        1748
+         1717        1718        1749        1718        1750        1749
+         1718        1719        1750        1719        1751        1750
+         1719        1720        1751        1720        1752        1751
+         1720        1721        1752        1721        1753        1752
+         1721        1722        1753        1722        1754        1753
+         1722        1723        1754        1723        1755        1754
+         1723        1724        1755        1724        1756        1755
+         1724        1725        1756        1725        1757        1756
+         1725        1726        1757        1075        1727        1758
+         1727        1759        1758        1727        1728        1759
+         1728        1760        1759        1728        1729        1760
+         1729        1761        1760        1729        1730        1761
+         1730        1762        1761        1730        1731        1762
+         1731        1763        1762        1731        1732        1763
+         1732        1764        1763        1732        1733        1764
+         1733        1765        1764        1733        1734        1765
+         1734        1766        1765        1734        1735        1766
+         1735        1767        1766        1735        1736        1767
+         1736        1768        1767        1736        1737        1768
+         1737        1769        1768        1737        1738        1769
+         1738        1770        1769        1738        1739        1770
+         1739        1771        1770        1739        1740        1771
+         1740        1772        1771        1740        1741        1772
+         1741        1773        1772        1741        1742        1773
+         1742        1774        1773        1742        1743        1774
+         1743        1775        1774        1743        1744        1775
+         1744        1776        1775        1744        1745        1776
+         1745        1777        1776        1745        1746        1777
+         1746        1778        1777        1746        1747        1778
+         1747        1779        1778        1747        1748        1779
+         1748        1780        1779        1748        1749        1780
+         1749        1781        1780        1749        1750        1781
+         1750        1782        1781        1750        1751        1782
+         1751        1783        1782        1751        1752        1783
+         1752        1784        1783        1752        1753        1784
+         1753        1785        1784        1753        1754        1785
+         1754        1786        1785        1754        1755        1786
+         1755        1787        1786        1755        1756        1787
+         1756        1788        1787        1756        1757        1788
+         1075        1758        1789        1758        1790        1789
+         1758        1759        1790        1759        1791        1790
+         1759        1760        1791        1760        1792        1791
+         1760        1761        1792        1761        1793        1792
+         1761        1762        1793        1762        1794        1793
+         1762        1763        1794        1763        1795        1794
+         1763        1764        1795        1764        1796        1795
+         1764        1765        1796        1765        1797        1796
+         1765        1766        1797        1766        1798        1797
+         1766        1767        1798        1767        1799        1798
+         1767        1768        1799        1768        1800        1799
+         1768        1769        1800        1769        1801        1800
+         1769        1770        1801        1770        1802        1801
+         1770        1771        1802        1771        1803        1802
+         1771        1772        1803        1772        1804        1803
+         1772        1773        1804        1773        1805        1804
+         1773        1774        1805        1774        1806        1805
+         1774        1775        1806        1775        1807        1806
+         1775        1776        1807        1776        1808        1807
+         1776        1777        1808        1777        1809        1808
+         1777        1778        1809        1778        1810        1809
+         1778        1779        1810        1779        1811        1810
+         1779        1780        1811        1780        1812        1811
+         1780        1781        1812        1781        1813        1812
+         1781        1782        1813        1782        1814        1813
+         1782        1783        1814        1783        1815        1814
+         1783        1784        1815        1784        1816        1815
+         1784        1785        1816        1785        1817        1816
+         1785        1786        1817        1786        1818        1817
+         1786        1787        1818        1787        1819        1818
+         1787        1788        1819        1075        1789        1820
+         1789        1821        1820        1789        1790        1821
+         1790        1822        1821        1790        1791        1822
+         1791        1823        1822        1791        1792        1823
+         1792        1824        1823        1792        1793        1824
+         1793        1825        1824        1793        1794        1825
+         1794        1826        1825        1794        1795        1826
+         1795        1827        1826        1795        1796        1827
+         1796        1828        1827        1796        1797        1828
+         1797        1829        1828        1797        1798        1829
+         1798        1830        1829        1798        1799        1830
+         1799        1831        1830        1799        1800        1831
+         1800        1832        1831        1800        1801        1832
+         1801        1833        1832        1801        1802        1833
+         1802        1834        1833        1802        1803        1834
+         1803        1835        1834        1803        1804        1835
+         1804        1836        1835        1804        1805        1836
+         1805        1837        1836        1805        1806        1837
+         1806        1838        1837        1806        1807        1838
+         1807        1839        1838        1807        1808        1839
+         1808        1840        1839        1808        1809        1840
+         1809        1841        1840        1809        1810        1841
+         1810        1842        1841        1810        1811        1842
+         1811        1843        1842        1811        1812        1843
+         1812        1844        1843        1812        1813        1844
+         1813        1845        1844        1813        1814        1845
+         1814        1846        1845        1814        1815        1846
+         1815        1847        1846        1815        1816        1847
+         1816        1848        1847        1816        1817        1848
+         1817        1849        1848        1817        1818        1849
+         1818        1850        1849        1818        1819        1850
+         1819        1851        1850        1075        1820        1852
+         1820        1853        1852        1820        1821        1853
+         1821        1854        1853        1821        1822        1854
+         1822        1855        1854        1822        1823        1855
+         1823        1856        1855        1823        1824        1856
+         1824        1857        1856        1824        1825        1857
+         1825        1858        1857        1825        1826        1858
+         1826        1859        1858        1826        1827        1859
+         1827        1860        1859        1827        1828        1860
+         1828        1861        1860        1828        1829        1861
+         1829        1862        1861        1829        1830        1862
+         1830        1863        1862        1830        1831        1863
+         1831        1864        1863        1831        1832        1864
+         1832        1865        1864        1832        1833        1865
+         1833        1866        1865        1833        1834        1866
+         1834        1867        1866        1834        1835        1867
+         1835        1868        1867        1835        1836        1868
+         1836        1869        1868        1836        1837        1869
+         1837        1870        1869        1837        1838        1870
+         1838        1871        1870        1838        1839        1871
+         1839        1872        1871        1839        1840        1872
+         1840        1873        1872        1840        1841        1873
+         1841        1874        1873        1841        1842        1874
+         1842        1875        1874        1842        1843        1875
+         1843        1876        1875        1843        1844        1876
+         1844        1877        1876        1844        1845        1877
+         1845        1878        1877        1845        1846        1878
+         1846        1879        1878        1846        1847        1879
+         1847        1880        1879        1847        1848        1880
+         1848        1881        1880        1848        1849        1881
+         1849        1882        1881        1849        1850        1882
+         1850        1883        1882        1850        1851        1883
+         1075        1852        1884        1852        1885        1884
+         1852        1853        1885        1853        1886        1885
+         1853        1854        1886        1854        1887        1886
+         1854        1855        1887        1855        1888        1887
+         1855        1856        1888        1856        1889        1888
+         1856        1857        1889        1857        1890        1889
+         1857        1858        1890        1858        1891        1890
+         1858        1859        1891        1859        1892        1891
+         1859        1860        1892        1860        1893        1892
+         1860        1861        1893        1861        1894        1893
+         1861        1862        1894        1862        1895        1894
+         1862        1863        1895        1863        1896        1895
+         1863        1864        1896        1864        1897        1896
+         1864        1865        1897        1865        1898        1897
+         1865        1866        1898        1866        1899        1898
+         1866        1867        1899        1867        1900        1899
+         1867        1868        1900        1868        1901        1900
+         1868        1869        1901        1869        1902        1901
+         1869        1870        1902        1870        1903        1902
+         1870        1871        1903        1871        1904        1903
+         1871        1872        1904        1872        1905        1904
+         1872        1873        1905        1873        1906        1905
+         1873        1874        1906        1874        1907        1906
+         1874        1875        1907        1875        1908        1907
+         1875        1876        1908        1876        1909        1908
+         1876        1877        1909        1877        1910        1909
+         1877        1878        1910        1878        1911        1910
+         1878        1879        1911        1879        1912        1911
+         1879        1880        1912        1880        1913        1912
+         1880        1881        1913        1881        1914        1913
+         1881        1882        1914        1882        1915        1914
+         1882        1883        1915        1075        1884        1916
+         1884        1917        1916        1884        1885        1917
+         1885        1918        1917        1885        1886        1918
+         1886        1919        1918        1886        1887        1919
+         1887        1920        1919        1887        1888        1920
+         1888        1921        1920        1888        1889        1921
+         1889        1922        1921        1889        1890        1922
+         1890        1923        1922        1890        1891        1923
+         1891        1924        1923        1891        1892        1924
+         1892        1925        1924        1892        1893        1925
+         1893        1926        1925        1893        1894        1926
+         1894        1927        1926        1894        1895        1927
+         1895        1928        1927        1895        1896        1928
+         1896        1929        1928        1896        1897        1929
+         1897        1930        1929        1897        1898        1930
+         1898        1931        1930        1898        1899        1931
+         1899        1932        1931        1899        1900        1932
+         1900        1933        1932        1900        1901        1933
+         1901        1934        1933        1901        1902        1934
+         1902        1935        1934        1902        1903        1935
+         1903        1936        1935        1903        1904        1936
+         1904        1937        1936        1904        1905        1937
+         1905        1938        1937        1905        1906        1938
+         1906        1939        1938        1906        1907        1939
+         1907        1940        1939        1907        1908        1940
+         1908        1941        1940        1908        1909        1941
+         1909        1942        1941        1909        1910        1942
+         1910        1943        1942        1910        1911        1943
+         1911        1944        1943        1911        1912        1944
+         1912        1945        1944        1912        1913        1945
+         1913        1946        1945        1913        1914        1946
+         1914        1947        1946        1914        1915        1947
+         1075        1916        1948        1916        1949        1948
+         1916        1917        1949        1917        1950        1949
+         1917        1918        1950        1918        1951        1950
+         1918        1919        1951        1919        1952        1951
+         1919        1920        1952        1920        1953        1952
+         1920        1921        1953        1921        1954        1953
+         1921        1922        1954        1922        1955        1954
+         1922        1923        1955        1923        1956        1955
+         1923        1924        1956        1924        1957        1956
+         1924        1925        1957        1925        1958        1957
+         1925        1926        1958        1926        1959        1958
+         1926        1927        1959        1927        1960        1959
+         1927        1928        1960        1928        1961        1960
+         1928        1929        1961        1929        1962        1961
+         1929        1930        1962        1930        1963        1962
+         1930        1931        1963        1931        1964        1963
+         1931        1932        1964        1932        1965        1964
+         1932        1933        1965        1933        1966        1965
+         1933        1934        1966        1934        1967        1966
+         1934        1935        1967        1935        1968        1967
+         1935        1936        1968        1936        1969        1968
+         1936        1937        1969        1937        1970        1969
+         1937        1938        1970        1938        1971        1970
+         1938        1939        1971        1939        1972        1971
+         1939        1940        1972        1940        1973        1972
+         1940        1941        1973        1941        1974        1973
+         1941        1942        1974        1942        1975        1974
+         1942        1943        1975        1943        1976        1975
+         1943        1944        1976        1944        1977        1976
+         1944        1945        1977        1945        1978        1977
+         1945        1946        1978        1946        1979        1978
+         1946        1947        1979        1947        1980        1979
+         1075        1948        1981        1948        1982        1981
+         1948        1949        1982        1949        1983        1982
+         1949        1950        1983        1950        1984        1983
+         1950        1951        1984        1951        1985        1984
+         1951        1952        1985        1952        1986        1985
+         1952        1953        1986        1953        1987        1986
+         1953        1954        1987        1954        1988        1987
+         1954        1955        1988        1955        1989        1988
+         1955        1956        1989        1956        1990        1989
+         1956        1957        1990        1957        1991        1990
+         1957        1958        1991        1958        1992        1991
+         1958        1959        1992        1959        1993        1992
+         1959        1960        1993        1960        1994        1993
+         1960        1961        1994        1961        1995        1994
+         1961        1962        1995        1962        1996        1995
+         1962        1963        1996        1963        1997        1996
+         1963        1964        1997        1964        1998        1997
+         1964        1965        1998        1965        1999        1998
+         1965        1966        1999        1966        2000        1999
+         1966        1967        2000        1967        2001        2000
+         1967        1968        2001        1968        2002        2001
+         1968        1969        2002        1969        2003        2002
+         1969        1970        2003        1970        2004        2003
+         1970        1971        2004        1971        2005        2004
+         1971        1972        2005        1972        2006        2005
+         1972        1973        2006        1973        2007        2006
+         1973        1974        2007        1974        2008        2007
+         1974        1975        2008        1975        2009        2008
+         1975        1976        2009        1976        2010        2009
+         1976        1977        2010        1977        2011        2010
+         1977        1978        2011        1978        2012        2011
+         1978        1979        2012        1979        2013        2012
+         1979        1980        2013        1075        1981        2014
+         1981        2015        2014        1981        1982        2015
+         1982        2016        2015        1982        1983        2016
+         1983        2017        2016        1983        1984        2017
+         1984        2018        2017        1984        1985        2018
+         1985        2019        2018        1985        1986        2019
+         1986        2020        2019        1986        1987        2020
+         1987        2021        2020        1987        1988        2021
+         1988        2022        2021        1988        1989        2022
+         1989        2023        2022        1989        1990        2023
+         1990        2024        2023        1990        1991        2024
+         1991        2025        2024        1991        1992        2025
+         1992        2026        2025        1992        1993        2026
+         1993        2027        2026        1993        1994        2027
+         1994        2028        2027        1994        1995        2028
+         1995        2029        2028        1995        1996        2029
+         1996        2030        2029        1996        1997        2030
+         1997        2031        2030        1997        1998        2031
+         1998        2032        2031        1998        1999        2032
+         1999        2033        2032        1999        2000        2033
+         2000        2034        2033        2000        2001        2034
+         2001        2035        2034        2001        2002        2035
+         2002        2036        2035        2002        2003        2036
+         2003        2037        2036        2003        2004        2037
+         2004        2038        2037        2004        2005        2038
+         2005        2039        2038        2005        2006        2039
+         2006        2040        2039        2006        2007        2040
+         2007        2041        2040        2007        2008        2041
+         2008        2042        2041        2008        2009        2042
+         2009        2043        2042        2009        2010        2043
+         2010        2044        2043        2010        2011        2044
+         2011        2045        2044        2011        2012        2045
+         2012        2046        2045        2012        2013        2046
+         1075        2014        2047        2014        2048        2047
+         2014        2015        2048        2015        2049        2048
+         2015        2016        2049        2016        2050        2049
+         2016        2017        2050        2017        2051        2050
+         2017        2018        2051        2018        2052        2051
+         2018        2019        2052        2019        2053        2052
+         2019        2020        2053        2020        2054        2053
+         2020        2021        2054        2021        2055        2054
+         2021        2022        2055        2022        2056        2055
+         2022        2023        2056        2023        2057        2056
+         2023        2024        2057        2024        2058        2057
+         2024        2025        2058        2025        2059        2058
+         2025        2026        2059        2026        2060        2059
+         2026        2027        2060        2027        2061        2060
+         2027        2028        2061        2028        2062        2061
+         2028        2029        2062        2029        2063        2062
+         2029        2030        2063        2030        2064        2063
+         2030        2031        2064        2031        2065        2064
+         2031        2032        2065        2032        2066        2065
+         2032        2033        2066        2033        2067        2066
+         2033        2034        2067        2034        2068        2067
+         2034        2035        2068        2035        2069        2068
+         2035        2036        2069        2036        2070        2069
+         2036        2037        2070        2037        2071        2070
+         2037        2038        2071        2038        2072        2071
+         2038        2039        2072        2039        2073        2072
+         2039        2040        2073        2040        2074        2073
+         2040        2041        2074        2041        2075        2074
+         2041        2042        2075        2042        2076        2075
+         2042        2043        2076        2043        2077        2076
+         2043        2044        2077        2044        2078        2077
+         2044        2045        2078        2045        2079        2078
+         2045        2046        2079        1075        2047        1076
+         2047        1079        1076        2047        2048        1079
+         2048        1081        1079        2048        2049        1081
+         2049        1083        1081        2049        2050        1083
+         2050        1085        1083        2050        2051        1085
+         2051        1087        1085        2051        2052        1087
+         2052        1089        1087        2052        2053        1089
+         2053        1091        1089        2053        2054        1091
+         2054        1093        1091        2054        2055        1093
+         2055        1095        1093        2055        2056        1095
+         2056        1097        1095        2056        2057        1097
+         2057        1099        1097        2057        2058        1099
+         2058        1101        1099        2058        2059        1101
+         2059        1103        1101        2059        2060        1103
+         2060        1105        1103        2060        2061        1105
+         2061        1107        1105        2061        2062        1107
+         2062        1109        1107        2062        2063        1109
+         2063        1111        1109        2063        2064        1111
+         2064        1113        1111        2064        2065        1113
+         2065        1115        1113        2065        2066        1115
+         2066        1117        1115        2066        2067        1117
+         2067        1119        1117        2067        2068        1119
+         2068        1121        1119        2068        2069        1121
+         2069        1123        1121        2069        2070        1123
+         2070        1125        1123        2070        2071        1125
+         2071        1127        1125        2071        2072        1127
+         2072        1129        1127        2072        2073        1129
+         2073        1131        1129        2073        2074        1131
+         2074        1133        1131        2074        2075        1133
+         2075        1135        1133        2075        2076        1135
+         2076        1137        1135        2076        2077        1137
+         2077        1139        1137        2077        2078        1139
+         2078        1141        1139        2078        2079        1141
+         2080        2081        2082        2080        2083        2081
+         2083        2084        2081        2083        2085        2084
+         2085        2086        2084        2085        2087        2086
+         2087        2088        2086        2087        2089        2088
+         2089        2090        2088        2089        2091        2090
+         2091        2092        2090        2091        2093        2092
+         2093        2094        2092        2093        2095        2094
+         2095        2096        2094        2095        2097        2096
+         2097        2098        2096        2097        2099        2098
+         2099        2100        2098        2099        2101        2100
+         2101        2102        2100        2101        2103        2102
+         2103        2104        2102        2103        2105        2104
+         2105        2106        2104        2105        2107        2106
+         2107        2108        2106        2107        2109        2108
+         2109        2110        2108        2109        2111        2110
+         2111        2112        2110        2111        2113        2112
+         2113        2114        2112        2113        2115        2114
+         2115        2116        2114        2115        2117        2116
+         2117        2118        2116        2117        2119        2118
+         2119        2120        2118        2119        2121        2120
+         2121        2122        2120        2121        2123        2122
+         2123        2124        2122        2123        2125        2124
+         2125        2126        2124        2125        2127        2126
+         2127        2128        2126        2127        2129        2128
+         2129        2130        2128        2129        2131        2130
+         2131        2132        2130        2131        2133        2132
+         2133        2134        2132        2133        2135        2134
+         2135        2136        2134        2135        2137        2136
+         2137        2138        2136        2137        2139        2138
+         2139        2140        2138        2139        2141        2140
+         2141        2142        2140        2141        2143        2142
+         2143        2144        2142        2143        2145        2144
+         2145        2146        2144        2147        2148        2149
+         2147        2082        2148        2082        2150        2148
+         2082        2081        2150        2081        2151        2150
+         2081        2084        2151        2084        2152        2151
+         2084        2086        2152        2086        2153        2152
+         2086        2088        2153        2088        2154        2153
+         2088        2090        2154        2090        2155        2154
+         2090        2092        2155        2092        2156        2155
+         2092        2094        2156        2094        2157        2156
+         2094        2096        2157        2096        2158        2157
+         2096        2098        2158        2098        2159        2158
+         2098        2100        2159        2100        2160        2159
+         2100        2102        2160        2102        2161        2160
+         2102        2104        2161        2104        2162        2161
+         2104        2106        2162        2106        2163        2162
+         2106        2108        2163        2108        2164        2163
+         2108        2110        2164        2110        2165        2164
+         2110        2112        2165        2112        2166        2165
+         2112        2114        2166        2114        2167        2166
+         2114        2116        2167        2116        2168        2167
+         2116        2118        2168        2118        2169        2168
+         2118        2120        2169        2120        2170        2169
+         2120        2122        2170        2122        2171        2170
+         2122        2124        2171        2124        2172        2171
+         2124        2126        2172        2126        2173        2172
+         2126        2128        2173        2128        2174        2173
+         2128        2130        2174        2130        2175        2174
+         2130        2132        2175        2132        2176        2175
+         2132        2134        2176        2134        2177        2176
+         2134        2136        2177        2136        2178        2177
+         2136        2138        2178        2138        2179        2178
+         2138        2140        2179        2140        2180        2179
+         2140        2142        2180        2142        2181        2180
+         2142        2144        2181        2144        2146        2181
+         2149        2182        2183        2149        2148        2182
+         2148        2184        2182        2148        2150        2184
+         2150        2185        2184        2150        2151        2185
+         2151        2186        2185        2151        2152        2186
+         2152        2187        2186        2152        2153        2187
+         2153        2188        2187        2153        2154        2188
+         2154        2189        2188        2154        2155        2189
+         2155        2190        2189        2155        2156        2190
+         2156        2191        2190        2156        2157        2191
+         2157        2192        2191        2157        2158        2192
+         2158        2193        2192        2158        2159        2193
+         2159        2194        2193        2159        2160        2194
+         2160        2195        2194        2160        2161        2195
+         2161        2196        2195        2161        2162        2196
+         2162        2197        2196        2162        2163        2197
+         2163        2198        2197        2163        2164        2198
+         2164        2199        2198        2164        2165        2199
+         2165        2200        2199        2165        2166        2200
+         2166        2201        2200        2166        2167        2201
+         2167        2202        2201        2167        2168        2202
+         2168        2203        2202        2168        2169        2203
+         2169        2204        2203        2169        2170        2204
+         2170        2205        2204        2170        2171        2205
+         2171        2206        2205        2171        2172        2206
+         2172        2207        2206        2172        2173        2207
+         2173        2208        2207        2173        2174        2208
+         2174        2209        2208        2174        2175        2209
+         2175        2210        2209        2175        2176        2210
+         2176        2211        2210        2176        2177        2211
+         2177        2212        2211        2177        2178        2212
+         2178        2213        2212        2178        2179        2213
+         2179        2214        2213        2179        2180        2214
+         2180        2215        2214        2180        2181        2215
+         2181        2146        2215        2216        2217        2218
+         2216        2183        2217        2183        2219        2217
+         2183        2182        2219        2182        2220        2219
+         2182        2184        2220        2184        2221        2220
+         2184        2185        2221        2185        2222        2221
+         2185        2186        2222        2186        2223        2222
+         2186        2187        2223        2187        2224        2223
+         2187        2188        2224        2188        2225        2224
+         2188        2189        2225        2189        2226        2225
+         2189        2190        2226        2190        2227        2226
+         2190        2191        2227        2191        2228        2227
+         2191        2192        2228        2192        2229        2228
+         2192        2193        2229        2193        2230        2229
+         2193        2194        2230        2194        2231        2230
+         2194        2195        2231        2195        2232        2231
+         2195        2196        2232        2196        2233        2232
+         2196        2197        2233        2197        2234        2233
+         2197        2198        2234        2198        2235        2234
+         2198        2199        2235        2199        2236        2235
+         2199        2200        2236        2200        2237        2236
+         2200        2201        2237        2201        2238        2237
+         2201        2202        2238        2202        2239        2238
+         2202        2203        2239        2203        2240        2239
+         2203        2204        2240        2204        2241        2240
+         2204        2205        2241        2205        2242        2241
+         2205        2206        2242        2206        2243        2242
+         2206        2207        2243        2207        2244        2243
+         2207        2208        2244        2208        2245        2244
+         2208        2209        2245        2209        2246        2245
+         2209        2210        2246        2210        2247        2246
+         2210        2211        2247        2211        2248        2247
+         2211        2212        2248        2212        2249        2248
+         2212        2213        2249        2213        2250        2249
+         2213        2214        2250        2214        2251        2250
+         2214        2215        2251        2215        2146        2251
+         2218        2252        2253        2218        2217        2252
+         2217        2254        2252        2217        2219        2254
+         2219        2255        2254        2219        2220        2255
+         2220        2256        2255        2220        2221        2256
+         2221        2257        2256        2221        2222        2257
+         2222        2258        2257        2222        2223        2258
+         2223        2259        2258        2223        2224        2259
+         2224        2260        2259        2224        2225        2260
+         2225        2261        2260        2225        2226        2261
+         2226        2262        2261        2226        2227        2262
+         2227        2263        2262        2227        2228        2263
+         2228        2264        2263        2228        2229        2264
+         2229        2265        2264        2229        2230        2265
+         2230        2266        2265        2230        2231        2266
+         2231        2267        2266        2231        2232        2267
+         2232        2268        2267        2232        2233        2268
+         2233        2269        2268        2233        2234        2269
+         2234        2270        2269        2234        2235        2270
+         2235        2271        2270        2235        2236        2271
+         2236        2272        2271        2236        2237        2272
+         2237        2273        2272        2237        2238        2273
+         2238        2274        2273        2238        2239        2274
+         2239        2275        2274        2239        2240        2275
+         2240        2276        2275        2240        2241        2276
+         2241        2277        2276        2241        2242        2277
+         2242        2278        2277        2242        2243        2278
+         2243        2279        2278        2243        2244        2279
+         2244        2280        2279        2244        2245        2280
+         2245        2281        2280        2245        2246        2281
+         2246        2282        2281        2246        2247        2282
+         2247        2283        2282        2247        2248        2283
+         2248        2284        2283        2248        2249        2284
+         2249        2285        2284        2249        2250        2285
+         2250        2286        2285        2250        2251        2286
+         2251        2146        2286        2287        2288        2289
+         2287        2253        2288        2253        2290        2288
+         2253        2252        2290        2252        2291        2290
+         2252        2254        2291        2254        2292        2291
+         2254        2255        2292        2255        2293        2292
+         2255        2256        2293        2256        2294        2293
+         2256        2257        2294        2257        2295        2294
+         2257        2258        2295        2258        2296        2295
+         2258        2259        2296        2259        2297        2296
+         2259        2260        2297        2260        2298        2297
+         2260        2261        2298        2261        2299        2298
+         2261        2262        2299        2262        2300        2299
+         2262        2263        2300        2263        2301        2300
+         2263        2264        2301        2264        2302        2301
+         2264        2265        2302        2265        2303        2302
+         2265        2266        2303        2266        2304        2303
+         2266        2267        2304        2267        2305        2304
+         2267        2268        2305        2268        2306        2305
+         2268        2269        2306        2269        2307        2306
+         2269        2270        2307        2270        2308        2307
+         2270        2271        2308        2271        2309        2308
+         2271        2272        2309        2272        2310        2309
+         2272        2273        2310        2273        2311        2310
+         2273        2274        2311        2274        2312        2311
+         2274        2275        2312        2275        2313        2312
+         2275        2276        2313        2276        2314        2313
+         2276        2277        2314        2277        2315        2314
+         2277        2278        2315        2278        2316        2315
+         2278        2279        2316        2279        2317        2316
+         2279        2280        2317        2280        2318        2317
+         2280        2281        2318        2281        2319        2318
+         2281        2282        2319        2282        2320        2319
+         2282        2283        2320        2283        2321        2320
+         2283        2284        2321        2284        2322        2321
+         2284        2285        2322        2285        2323        2322
+         2285        2286        2323        2286        2146        2323
+         2324        2325        2326        2324        2289        2325
+         2289        2327        2325        2289        2288        2327
+         2288        2328        2327        2288        2290        2328
+         2290        2329        2328        2290        2291        2329
+         2291        2330        2329        2291        2292        2330
+         2292        2331        2330        2292        2293        2331
+         2293        2332        2331        2293        2294        2332
+         2294        2333        2332        2294        2295        2333
+         2295        2334        2333        2295        2296        2334
+         2296        2335        2334        2296        2297        2335
+         2297        2336        2335        2297        2298        2336
+         2298        2337        2336        2298        2299        2337
+         2299        2338        2337        2299        2300        2338
+         2300        2339        2338        2300        2301        2339
+         2301        2340        2339        2301        2302        2340
+         2302        2341        2340        2302        2303        2341
+         2303        2342        2341        2303        2304        2342
+         2304        2343        2342        2304        2305        2343
+         2305        2344        2343        2305        2306        2344
+         2306        2345        2344        2306        2307        2345
+         2307        2346        2345        2307        2308        2346
+         2308        2347        2346        2308        2309        2347
+         2309        2348        2347        2309        2310        2348
+         2310        2349        2348        2310        2311        2349
+         2311        2350        2349        2311        2312        2350
+         2312        2351        2350        2312        2313        2351
+         2313        2352        2351        2313        2314        2352
+         2314        2353        2352        2314        2315        2353
+         2315        2354        2353        2315        2316        2354
+         2316        2355        2354        2316        2317        2355
+         2317        2356        2355        2317        2318        2356
+         2318        2357        2356        2318        2319        2357
+         2319        2358        2357        2319        2320        2358
+         2320        2359        2358        2320        2321        2359
+         2321        2360        2359        2321        2322        2360
+         2322        2361        2360        2322        2323        2361
+         2323        2146        2361        2362        2363        2364
+         2362        2326        2363        2326        2365        2363
+         2326        2325        2365        2325        2366        2365
+         2325        2327        2366        2327        2367        2366
+         2327        2328        2367        2328        2368        2367
+         2328        2329        2368        2329        2369        2368
+         2329        2330        2369        2330        2370        2369
+         2330        2331        2370        2331        2371        2370
+         2331        2332        2371        2332        2372        2371
+         2332        2333        2372        2333        2373        2372
+         2333        2334        2373        2334        2374        2373
+         2334        2335        2374        2335        2375        2374
+         2335        2336        2375        2336        2376        2375
+         2336        2337        2376        2337        2377        2376
+         2337        2338        2377        2338        2378        2377
+         2338        2339        2378        2339        2379        2378
+         2339        2340        2379        2340        2380        2379
+         2340        2341        2380        2341        2381        2380
+         2341        2342        2381        2342        2382        2381
+         2342        2343        2382        2343        2383        2382
+         2343        2344        2383        2344        2384        2383
+         2344        2345        2384        2345        2385        2384
+         2345        2346        2385        2346        2386        2385
+         2346        2347        2386        2347        2387        2386
+         2347        2348        2387        2348        2388        2387
+         2348        2349        2388        2349        2389        2388
+         2349        2350        2389        2350        2390        2389
+         2350        2351        2390        2351        2391        2390
+         2351        2352        2391        2352        2392        2391
+         2352        2353        2392        2353        2393        2392
+         2353        2354        2393        2354        2394        2393
+         2354        2355        2394        2355        2395        2394
+         2355        2356        2395        2356        2396        2395
+         2356        2357        2396        2357        2397        2396
+         2357        2358        2397        2358        2398        2397
+         2358        2359        2398        2359        2399        2398
+         2359        2360        2399        2360        2400        2399
+         2360        2361        2400        2361        2146        2400
+         2401        2402        2403        2401        2364        2402
+         2364        2404        2402        2364        2363        2404
+         2363        2405        2404        2363        2365        2405
+         2365        2406        2405        2365        2366        2406
+         2366        2407        2406        2366        2367        2407
+         2367        2408        2407        2367        2368        2408
+         2368        2409        2408        2368        2369        2409
+         2369        2410        2409        2369        2370        2410
+         2370        2411        2410        2370        2371        2411
+         2371        2412        2411        2371        2372        2412
+         2372        2413        2412        2372        2373        2413
+         2373        2414        2413        2373        2374        2414
+         2374        2415        2414        2374        2375        2415
+         2375        2416        2415        2375        2376        2416
+         2376        2417        2416        2376        2377        2417
+         2377        2418        2417        2377        2378        2418
+         2378        2419        2418        2378        2379        2419
+         2379        2420        2419        2379        2380        2420
+         2380        2421        2420        2380        2381        2421
+         2381        2422        2421        2381        2382        2422
+         2382        2423        2422        2382        2383        2423
+         2383        2424        2423        2383        2384        2424
+         2384        2425        2424        2384        2385        2425
+         2385        2426        2425        2385        2386        2426
+         2386        2427        2426        2386        2387        2427
+         2387        2428        2427        2387        2388        2428
+         2388        2429        2428        2388        2389        2429
+         2389        2430        2429        2389        2390        2430
+         2390        2431        2430        2390        2391        2431
+         2391        2432        2431        2391        2392        2432
+         2392        2433        2432        2392        2393        2433
+         2393        2434        2433        2393        2394        2434
+         2394        2435        2434        2394        2395        2435
+         2395        2436        2435        2395        2396        2436
+         2396        2437        2436        2396        2397        2437
+         2397        2438        2437        2397        2398        2438
+         2398        2439        2438        2398        2399        2439
+         2399        2440        2439        2399        2400        2440
+         2400        2146        2440        2402        2404        2441
+         2404        2442        2441        2404        2405        2442
+         2405        2443        2442        2405        2406        2443
+         2406        2444        2443        2406        2407        2444
+         2407        2445        2444        2407        2408        2445
+         2408        2446        2445        2408        2409        2446
+         2409        2447        2446        2409        2410        2447
+         2410        2448        2447        2410        2411        2448
+         2411        2449        2448        2411        2412        2449
+         2412        2450        2449        2412        2413        2450
+         2413        2451        2450        2413        2414        2451
+         2414        2452        2451        2414        2415        2452
+         2415        2453        2452        2415        2416        2453
+         2416        2454        2453        2416        2417        2454
+         2417        2455        2454        2417        2418        2455
+         2418        2456        2455        2418        2419        2456
+         2419        2457        2456        2419        2420        2457
+         2420        2458        2457        2420        2421        2458
+         2421        2459        2458        2421        2422        2459
+         2422        2460        2459        2422        2423        2460
+         2423        2461        2460        2423        2424        2461
+         2424        2462        2461        2424        2425        2462
+         2425        2463        2462        2425        2426        2463
+         2426        2464        2463        2426        2427        2464
+         2427        2465        2464        2427        2428        2465
+         2428        2466        2465        2428        2429        2466
+         2429        2467        2466        2429        2430        2467
+         2430        2468        2467        2430        2431        2468
+         2431        2469        2468        2431        2432        2469
+         2432        2470        2469        2432        2433        2470
+         2433        2471        2470        2433        2434        2471
+         2434        2472        2471        2434        2435        2472
+         2435        2473        2472        2435        2436        2473
+         2436        2474        2473        2436        2437        2474
+         2437        2475        2474        2437        2438        2475
+         2438        2476        2475        2438        2439        2476
+         2439        2477        2476        2439        2440        2477
+         2440        2146        2477        2442        2443        2478
+         2443        2479        2478        2443        2444        2479
+         2444        2480        2479        2444        2445        2480
+         2445        2481        2480        2445        2446        2481
+         2446        2482        2481        2446        2447        2482
+         2447        2483        2482        2447        2448        2483
+         2448        2484        2483        2448        2449        2484
+         2449        2485        2484        2449        2450        2485
+         2450        2486        2485        2450        2451        2486
+         2451        2487        2486        2451        2452        2487
+         2452        2488        2487        2452        2453        2488
+         2453        2489        2488        2453        2454        2489
+         2454        2490        2489        2454        2455        2490
+         2455        2491        2490        2455        2456        2491
+         2456        2492        2491        2456        2457        2492
+         2457        2493        2492        2457        2458        2493
+         2458        2494        2493        2458        2459        2494
+         2459        2495        2494        2459        2460        2495
+         2460        2496        2495        2460        2461        2496
+         2461        2497        2496        2461        2462        2497
+         2462        2498        2497        2462        2463        2498
+         2463        2499        2498        2463        2464        2499
+         2464        2500        2499        2464        2465        2500
+         2465        2501        2500        2465        2466        2501
+         2466        2502        2501        2466        2467        2502
+         2467        2503        2502        2467        2468        2503
+         2468        2504        2503        2468        2469        2504
+         2469        2505        2504        2469        2470        2505
+         2470        2506        2505        2470        2471        2506
+         2471        2507        2506        2471        2472        2507
+         2472        2508        2507        2472        2473        2508
+         2473        2509        2508        2473        2474        2509
+         2474        2510        2509        2474        2475        2510
+         2475        2511        2510        2475        2476        2511
+         2476        2512        2511        2476        2477        2512
+         2477        2146        2512        2479        2480        2513
+         2480        2514        2513        2480        2481        2514
+         2481        2515        2514        2481        2482        2515
+         2482        2516        2515        2482        2483        2516
+         2483        2517        2516        2483        2484        2517
+         2484        2518        2517        2484        2485        2518
+         2485        2519        2518        2485        2486        2519
+         2486        2520        2519        2486        2487        2520
+         2487        2521        2520        2487        2488        2521
+         2488        2522        2521        2488        2489        2522
+         2489        2523        2522        2489        2490        2523
+         2490        2524        2523        2490        2491        2524
+         2491        2525        2524        2491        2492        2525
+         2492        2526        2525        2492        2493        2526
+         2493        2527        2526        2493        2494        2527
+         2494        2528        2527        2494        2495        2528
+         2495        2529        2528        2495        2496        2529
+         2496        2530        2529        2496        2497        2530
+         2497        2531        2530        2497        2498        2531
+         2498        2532        2531        2498        2499        2532
+         2499        2533        2532        2499        2500        2533
+         2500        2534        2533        2500        2501        2534
+         2501        2535        2534        2501        2502        2535
+         2502        2536        2535        2502        2503        2536
+         2503        2537        2536        2503        2504        2537
+         2504        2538        2537        2504        2505        2538
+         2505        2539        2538        2505        2506        2539
+         2506        2540        2539        2506        2507        2540
+         2507        2541        2540        2507        2508        2541
+         2508        2542        2541        2508        2509        2542
+         2509        2543        2542        2509        2510        2543
+         2510        2544        2543        2510        2511        2544
+         2511        2545        2544        2511        2512        2545
+         2512        2146        2545        2514        2515        2546
+         2515        2547        2546        2515        2516        2547
+         2516        2548        2547        2516        2517        2548
+         2517        2549        2548        2517        2518        2549
+         2518        2550        2549        2518        2519        2550
+         2519        2551        2550        2519        2520        2551
+         2520        2552        2551        2520        2521        2552
+         2521        2553        2552        2521        2522        2553
+         2522        2554        2553        2522        2523        2554
+         2523        2555        2554        2523        2524        2555
+         2524        2556        2555        2524        2525        2556
+         2525        2557        2556        2525        2526        2557
+         2526        2558        2557        2526        2527        2558
+         2527        2559        2558        2527        2528        2559
+         2528        2560        2559        2528        2529        2560
+         2529        2561        2560        2529        2530        2561
+         2530        2562        2561        2530        2531        2562
+         2531        2563        2562        2531        2532        2563
+         2532        2564        2563        2532        2533        2564
+         2533        2565        2564        2533        2534        2565
+         2534        2566        2565        2534        2535        2566
+         2535        2567        2566        2535        2536        2567
+         2536        2568        2567        2536        2537        2568
+         2537        2569        2568        2537        2538        2569
+         2538        2570        2569        2538        2539        2570
+         2539        2571        2570        2539        2540        2571
+         2540        2572        2571        2540        2541        2572
+         2541        2573        2572        2541        2542        2573
+         2542        2574        2573        2542        2543        2574
+         2543        2575        2574        2543        2544        2575
+         2544        2576        2575        2544        2545        2576
+         2545        2146        2576        2546        2547        2577
+         2547        2578        2577        2547        2548        2578
+         2548        2579        2578        2548        2549        2579
+         2549        2580        2579        2549        2550        2580
+         2550        2581        2580        2550        2551        2581
+         2551        2582        2581        2551        2552        2582
+         2552        2583        2582        2552        2553        2583
+         2553        2584        2583        2553        2554        2584
+         2554        2585        2584        2554        2555        2585
+         2555        2586        2585        2555        2556        2586
+         2556        2587        2586        2556        2557        2587
+         2557        2588        2587        2557        2558        2588
+         2558        2589        2588        2558        2559        2589
+         2559        2590        2589        2559        2560        2590
+         2560        2591        2590        2560        2561        2591
+         2561        2592        2591        2561        2562        2592
+         2562        2593        2592        2562        2563        2593
+         2563        2594        2593        2563        2564        2594
+         2564        2595        2594        2564        2565        2595
+         2565        2596        2595        2565        2566        2596
+         2566        2597        2596        2566        2567        2597
+         2567        2598        2597        2567        2568        2598
+         2568        2599        2598        2568        2569        2599
+         2569        2600        2599        2569        2570        2600
+         2570        2601        2600        2570        2571        2601
+         2571        2602        2601        2571        2572        2602
+         2572        2603        2602        2572        2573        2603
+         2573        2604        2603        2573        2574        2604
+         2574        2605        2604        2574        2575        2605
+         2575        2606        2605        2575        2576        2606
+         2576        2146        2606        2578        2607        2608
+         2578        2579        2607        2579        2609        2607
+         2579        2580        2609        2580        2610        2609
+         2580        2581        2610        2581        2611        2610
+         2581        2582        2611        2582        2612        2611
+         2582        2583        2612        2583        2613        2612
+         2583        2584        2613        2584        2614        2613
+         2584        2585        2614        2585        2615        2614
+         2585        2586        2615        2586        2616        2615
+         2586        2587        2616        2587        2617        2616
+         2587        2588        2617        2588        2618        2617
+         2588        2589        2618        2589        2619        2618
+         2589        2590        2619        2590        2620        2619
+         2590        2591        2620        2591        2621        2620
+         2591        2592        2621        2592        2622        2621
+         2592        2593        2622        2593        2623        2622
+         2593        2594        2623        2594        2624        2623
+         2594        2595        2624        2595        2625        2624
+         2595        2596        2625        2596        2626        2625
+         2596        2597        2626        2597        2627        2626
+         2597        2598        2627        2598        2628        2627
+         2598        2599        2628        2599        2629        2628
+         2599        2600        2629        2600        2630        2629
+         2600        2601        2630        2601        2631        2630
+         2601        2602        2631        2602        2632        2631
+         2602        2603        2632        2603        2633        2632
+         2603        2604        2633        2604        2634        2633
+         2604        2605        2634        2605        2635        2634
+         2605        2606        2635        2606        2146        2635
+         2608        2636        2637        2608        2607        2636
+         2607        2638        2636        2607        2609        2638
+         2609        2639        2638        2609        2610        2639
+         2610        2640        2639        2610        2611        2640
+         2611        2641        2640        2611        2612        2641
+         2612        2642        2641        2612        2613        2642
+         2613        2643        2642        2613        2614        2643
+         2614        2644        2643        2614        2615        2644
+         2615        2645        2644        2615        2616        2645
+         2616        2646        2645        2616        2617        2646
+         2617        2647        2646        2617        2618        2647
+         2618        2648        2647        2618        2619        2648
+         2619        2649        2648        2619        2620        2649
+         2620        2650        2649        2620        2621        2650
+         2621        2651        2650        2621        2622        2651
+         2622        2652        2651        2622        2623        2652
+         2623        2653        2652        2623        2624        2653
+         2624        2654        2653        2624        2625        2654
+         2625        2655        2654        2625        2626        2655
+         2626        2656        2655        2626        2627        2656
+         2627        2657        2656        2627        2628        2657
+         2628        2658        2657        2628        2629        2658
+         2629        2659        2658        2629        2630        2659
+         2630        2660        2659        2630        2631        2660
+         2631        2661        2660        2631        2632        2661
+         2632        2662        2661        2632        2633        2662
+         2633        2663        2662        2633        2634        2663
+         2634        2664        2663        2634        2635        2664
+         2635        2146        2664        2637        2665        2666
+         2637        2636        2665        2636        2667        2665
+         2636        2638        2667        2638        2668        2667
+         2638        2639        2668        2639        2669        2668
+         2639        2640        2669        2640        2670        2669
+         2640        2641        2670        2641        2671        2670
+         2641        2642        2671        2642        2672        2671
+         2642        2643        2672        2643        2673        2672
+         2643        2644        2673        2644        2674        2673
+         2644        2645        2674        2645        2675        2674
+         2645        2646        2675        2646        2676        2675
+         2646        2647        2676        2647        2677        2676
+         2647        2648        2677        2648        2678        2677
+         2648        2649        2678        2649        2679        2678
+         2649        2650        2679        2650        2680        2679
+         2650        2651        2680        2651        2681        2680
+         2651        2652        2681        2652        2682        2681
+         2652        2653        2682        2653        2683        2682
+         2653        2654        2683        2654        2684        2683
+         2654        2655        2684        2655        2685        2684
+         2655        2656        2685        2656        2686        2685
+         2656        2657        2686        2657        2687        2686
+         2657        2658        2687        2658        2688        2687
+         2658        2659        2688        2659        2689        2688
+         2659        2660        2689        2660        2690        2689
+         2660        2661        2690        2661        2691        2690
+         2661        2662        2691        2662        2692        2691
+         2662        2663        2692        2663        2693        2692
+         2663        2664        2693        2664        2146        2693
+         2694        2695        2696        2694        2666        2695
+         2666        2697        2695        2666        2665        2697
+         2665        2698        2697        2665        2667        2698
+         2667        2699        2698        2667        2668        2699
+         2668        2700        2699        2668        2669        2700
+         2669        2701        2700        2669        2670        2701
+         2670        2702        2701        2670        2671        2702
+         2671        2703        2702        2671        2672        2703
+         2672        2704        2703        2672        2673        2704
+         2673        2705        2704        2673        2674        2705
+         2674        2706        2705        2674        2675        2706
+         2675        2707        2706        2675        2676        2707
+         2676        2708        2707        2676        2677        2708
+         2677        2709        2708        2677        2678        2709
+         2678        2710        2709        2678        2679        2710
+         2679        2711        2710        2679        2680        2711
+         2680        2712        2711        2680        2681        2712
+         2681        2713        2712        2681        2682        2713
+         2682        2714        2713        2682        2683        2714
+         2683        2715        2714        2683        2684        2715
+         2684        2716        2715        2684        2685        2716
+         2685        2717        2716        2685        2686        2717
+         2686        2718        2717        2686        2687        2718
+         2687        2719        2718        2687        2688        2719
+         2688        2720        2719        2688        2689        2720
+         2689        2721        2720        2689        2690        2721
+         2690        2722        2721        2690        2691        2722
+         2691        2723        2722        2691        2692        2723
+         2692        2724        2723        2692        2693        2724
+         2693        2146        2724        2725        2726        2727
+         2725        2728        2726        2728        2729        2726
+         2728        2696        2729        2696        2730        2729
+         2696        2695        2730        2695        2731        2730
+         2695        2697        2731        2697        2732        2731
+         2697        2698        2732        2698        2733        2732
+         2698        2699        2733        2699        2734        2733
+         2699        2700        2734        2700        2735        2734
+         2700        2701        2735        2701        2736        2735
+         2701        2702        2736        2702        2737        2736
+         2702        2703        2737        2703        2738        2737
+         2703        2704        2738        2704        2739        2738
+         2704        2705        2739        2705        2740        2739
+         2705        2706        2740        2706        2741        2740
+         2706        2707        2741        2707        2742        2741
+         2707        2708        2742        2708        2743        2742
+         2708        2709        2743        2709        2744        2743
+         2709        2710        2744        2710        2745        2744
+         2710        2711        2745        2711        2746        2745
+         2711        2712        2746        2712        2747        2746
+         2712        2713        2747        2713        2748        2747
+         2713        2714        2748        2714        2749        2748
+         2714        2715        2749        2715        2750        2749
+         2715        2716        2750        2716        2751        2750
+         2716        2717        2751        2717        2752        2751
+         2717        2718        2752        2718        2753        2752
+         2718        2719        2753        2719        2754        2753
+         2719        2720        2754        2720        2755        2754
+         2720        2721        2755        2721        2756        2755
+         2721        2722        2756        2722        2757        2756
+         2722        2723        2757        2723        2758        2757
+         2723        2724        2758        2724        2146        2758
+         2759        2760        2761        2759        2762        2760
+         2762        2763        2760        2762        2727        2763
+         2727        2764        2763        2727        2726        2764
+         2726        2765        2764        2726        2729        2765
+         2729        2766        2765        2729        2730        2766
+         2730        2767        2766        2730        2731        2767
+         2731        2768        2767        2731        2732        2768
+         2732        2769        2768        2732        2733        2769
+         2733        2770        2769        2733        2734        2770
+         2734        2771        2770        2734        2735        2771
+         2735        2772        2771        2735        2736        2772
+         2736        2773        2772        2736        2737        2773
+         2737        2774        2773        2737        2738        2774
+         2738        2775        2774        2738        2739        2775
+         2739        2776        2775        2739        2740        2776
+         2740        2777        2776        2740        2741        2777
+         2741        2778        2777        2741        2742        2778
+         2742        2779        2778        2742        2743        2779
+         2743        2780        2779        2743        2744        2780
+         2744        2781        2780        2744        2745        2781
+         2745        2782        2781        2745        2746        2782
+         2746        2783        2782        2746        2747        2783
+         2747        2784        2783        2747        2748        2784
+         2748        2785        2784        2748        2749        2785
+         2749        2786        2785        2749        2750        2786
+         2750        2787        2786        2750        2751        2787
+         2751        2788        2787        2751        2752        2788
+         2752        2789        2788        2752        2753        2789
+         2753        2790        2789        2753        2754        2790
+         2754        2791        2790        2754        2755        2791
+         2755        2792        2791        2755        2756        2792
+         2756        2793        2792        2756        2757        2793
+         2757        2794        2793        2757        2758        2794
+         2758        2146        2794        2795        2796        2797
+         2795        2798        2796        2798        2799        2796
+         2798        2761        2799        2761        2800        2799
+         2761        2760        2800        2760        2801        2800
+         2760        2763        2801        2763        2802        2801
+         2763        2764        2802        2764        2803        2802
+         2764        2765        2803        2765        2804        2803
+         2765        2766        2804        2766        2805        2804
+         2766        2767        2805        2767        2806        2805
+         2767        2768        2806        2768        2807        2806
+         2768        2769        2807        2769        2808        2807
+         2769        2770        2808        2770        2809        2808
+         2770        2771        2809        2771        2810        2809
+         2771        2772        2810        2772        2811        2810
+         2772        2773        2811        2773        2812        2811
+         2773        2774        2812        2774        2813        2812
+         2774        2775        2813        2775        2814        2813
+         2775        2776        2814        2776        2815        2814
+         2776        2777        2815        2777        2816        2815
+         2777        2778        2816        2778        2817        2816
+         2778        2779        2817        2779        2818        2817
+         2779        2780        2818        2780        2819        2818
+         2780        2781        2819        2781        2820        2819
+         2781        2782        2820        2782        2821        2820
+         2782        2783        2821        2783        2822        2821
+         2783        2784        2822        2784        2823        2822
+         2784        2785        2823        2785        2824        2823
+         2785        2786        2824        2786        2825        2824
+         2786        2787        2825        2787        2826        2825
+         2787        2788        2826        2788        2827        2826
+         2788        2789        2827        2789        2828        2827
+         2789        2790        2828        2790        2829        2828
+         2790        2791        2829        2791        2830        2829
+         2791        2792        2830        2792        2831        2830
+         2792        2793        2831        2793        2832        2831
+         2793        2794        2832        2794        2146        2832
+         2833        2834        2835        2833        2797        2834
+         2797        2836        2834        2797        2796        2836
+         2796        2837        2836        2796        2799        2837
+         2799        2838        2837        2799        2800        2838
+         2800        2839        2838        2800        2801        2839
+         2801        2840        2839        2801        2802        2840
+         2802        2841        2840        2802        2803        2841
+         2803        2842        2841        2803        2804        2842
+         2804        2843        2842        2804        2805        2843
+         2805        2844        2843        2805        2806        2844
+         2806        2845        2844        2806        2807        2845
+         2807        2846        2845        2807        2808        2846
+         2808        2847        2846        2808        2809        2847
+         2809        2848        2847        2809        2810        2848
+         2810        2849        2848        2810        2811        2849
+         2811        2850        2849        2811        2812        2850
+         2812        2851        2850        2812        2813        2851
+         2813        2852        2851        2813        2814        2852
+         2814        2853        2852        2814        2815        2853
+         2815        2854        2853        2815        2816        2854
+         2816        2855        2854        2816        2817        2855
+         2817        2856        2855        2817        2818        2856
+         2818        2857        2856        2818        2819        2857
+         2819        2858        2857        2819        2820        2858
+         2820        2859        2858        2820        2821        2859
+         2821        2860        2859        2821        2822        2860
+         2822        2861        2860        2822        2823        2861
+         2823        2862        2861        2823        2824        2862
+         2824        2863        2862        2824        2825        2863
+         2825        2864        2863        2825        2826        2864
+         2826        2865        2864        2826        2827        2865
+         2827        2866        2865        2827        2828        2866
+         2828        2867        2866        2828        2829        2867
+         2829        2868        2867        2829        2830        2868
+         2830        2869        2868        2830        2831        2869
+         2831        2870        2869        2831        2832        2870
+         2832        2146        2870        2871        2872        2873
+         2871        2835        2872        2835        2874        2872
+         2835        2834        2874        2834        2875        2874
+         2834        2836        2875        2836        2876        2875
+         2836        2837        2876        2837        2877        2876
+         2837        2838        2877        2838        2878        2877
+         2838        2839        2878        2839        2879        2878
+         2839        2840        2879        2840        2880        2879
+         2840        2841        2880        2841        2881        2880
+         2841        2842        2881        2842        2882        2881
+         2842        2843        2882        2843        2883        2882
+         2843        2844        2883        2844        2884        2883
+         2844        2845        2884        2845        2885        2884
+         2845        2846        2885        2846        2886        2885
+         2846        2847        2886        2847        2887        2886
+         2847        2848        2887        2848        2888        2887
+         2848        2849        2888        2849        2889        2888
+         2849        2850        2889        2850        2890        2889
+         2850        2851        2890        2851        2891        2890
+         2851        2852        2891        2852        2892        2891
+         2852        2853        2892        2853        2893        2892
+         2853        2854        2893        2854        2894        2893
+         2854        2855        2894        2855        2895        2894
+         2855        2856        2895        2856        2896        2895
+         2856        2857        2896        2857        2897        2896
+         2857        2858        2897        2858        2898        2897
+         2858        2859        2898        2859        2899        2898
+         2859        2860        2899        2860        2900        2899
+         2860        2861        2900        2861        2901        2900
+         2861        2862        2901        2862        2902        2901
+         2862        2863        2902        2863        2903        2902
+         2863        2864        2903        2864        2904        2903
+         2864        2865        2904        2865        2905        2904
+         2865        2866        2905        2866        2906        2905
+         2866        2867        2906        2867        2907        2906
+         2867        2868        2907        2868        2908        2907
+         2868        2869        2908        2869        2909        2908
+         2869        2870        2909        2870        2146        2909
+         2910        2911        2912        2910        2873        2911
+         2873        2913        2911        2873        2872        2913
+         2872        2914        2913        2872        2874        2914
+         2874        2915        2914        2874        2875        2915
+         2875        2916        2915        2875        2876        2916
+         2876        2917        2916        2876        2877        2917
+         2877        2918        2917        2877        2878        2918
+         2878        2919        2918        2878        2879        2919
+         2879        2920        2919        2879        2880        2920
+         2880        2921        2920        2880        2881        2921
+         2881        2922        2921        2881        2882        2922
+         2882        2923        2922        2882        2883        2923
+         2883        2924        2923        2883        2884        2924
+         2884        2925        2924        2884        2885        2925
+         2885        2926        2925        2885        2886        2926
+         2886        2927        2926        2886        2887        2927
+         2887        2928        2927        2887        2888        2928
+         2888        2929        2928        2888        2889        2929
+         2889        2930        2929        2889        2890        2930
+         2890        2931        2930        2890        2891        2931
+         2891        2932        2931        2891        2892        2932
+         2892        2933        2932        2892        2893        2933
+         2893        2934        2933        2893        2894        2934
+         2894        2935        2934        2894        2895        2935
+         2895        2936        2935        2895        2896        2936
+         2896        2937        2936        2896        2897        2937
+         2897        2938        2937        2897        2898        2938
+         2898        2939        2938        2898        2899        2939
+         2899        2940        2939        2899        2900        2940
+         2900        2941        2940        2900        2901        2941
+         2901        2942        2941        2901        2902        2942
+         2902        2943        2942        2902        2903        2943
+         2903        2944        2943        2903        2904        2944
+         2904        2945        2944        2904        2905        2945
+         2905        2946        2945        2905        2906        2946
+         2906        2947        2946        2906        2907        2947
+         2907        2948        2947        2907        2908        2948
+         2908        2949        2948        2908        2909        2949
+         2909        2146        2949        2950        2951        2952
+         2950        2912        2951        2912        2953        2951
+         2912        2911        2953        2911        2954        2953
+         2911        2913        2954        2913        2955        2954
+         2913        2914        2955        2914        2956        2955
+         2914        2915        2956        2915        2957        2956
+         2915        2916        2957        2916        2958        2957
+         2916        2917        2958        2917        2959        2958
+         2917        2918        2959        2918        2960        2959
+         2918        2919        2960        2919        2961        2960
+         2919        2920        2961        2920        2962        2961
+         2920        2921        2962        2921        2963        2962
+         2921        2922        2963        2922        2964        2963
+         2922        2923        2964        2923        2965        2964
+         2923        2924        2965        2924        2966        2965
+         2924        2925        2966        2925        2967        2966
+         2925        2926        2967        2926        2968        2967
+         2926        2927        2968        2927        2969        2968
+         2927        2928        2969        2928        2970        2969
+         2928        2929        2970        2929        2971        2970
+         2929        2930        2971        2930        2972        2971
+         2930        2931        2972        2931        2973        2972
+         2931        2932        2973        2932        2974        2973
+         2932        2933        2974        2933        2975        2974
+         2933        2934        2975        2934        2976        2975
+         2934        2935        2976        2935        2977        2976
+         2935        2936        2977        2936        2978        2977
+         2936        2937        2978        2937        2979        2978
+         2937        2938        2979        2938        2980        2979
+         2938        2939        2980        2939        2981        2980
+         2939        2940        2981        2940        2982        2981
+         2940        2941        2982        2941        2983        2982
+         2941        2942        2983        2942        2984        2983
+         2942        2943        2984        2943        2985        2984
+         2943        2944        2985        2944        2986        2985
+         2944        2945        2986        2945        2987        2986
+         2945        2946        2987        2946        2988        2987
+         2946        2947        2988        2947        2989        2988
+         2947        2948        2989        2948        2990        2989
+         2948        2949        2990        2949        2146        2990
+         2952        2951        2991        2951        2992        2991
+         2951        2953        2992        2953        2993        2992
+         2953        2954        2993        2954        2994        2993
+         2954        2955        2994        2955        2995        2994
+         2955        2956        2995        2956        2996        2995
+         2956        2957        2996        2957        2997        2996
+         2957        2958        2997        2958        2998        2997
+         2958        2959        2998        2959        2999        2998
+         2959        2960        2999        2960        3000        2999
+         2960        2961        3000        2961        3001        3000
+         2961        2962        3001        2962        3002        3001
+         2962        2963        3002        2963        3003        3002
+         2963        2964        3003        2964        3004        3003
+         2964        2965        3004        2965        3005        3004
+         2965        2966        3005        2966        3006        3005
+         2966        2967        3006        2967        3007        3006
+         2967        2968        3007        2968        3008        3007
+         2968        2969        3008        2969        3009        3008
+         2969        2970        3009        2970        3010        3009
+         2970        2971        3010        2971        3011        3010
+         2971        2972        3011        2972        3012        3011
+         2972        2973        3012        2973        3013        3012
+         2973        2974        3013        2974        3014        3013
+         2974        2975        3014        2975        3015        3014
+         2975        2976        3015        2976        3016        3015
+         2976        2977        3016        2977        3017        3016
+         2977        2978        3017        2978        3018        3017
+         2978        2979        3018        2979        3019        3018
+         2979        2980        3019        2980        3020        3019
+         2980        2981        3020        2981        3021        3020
+         2981        2982        3021        2982        3022        3021
+         2982        2983        3022        2983        3023        3022
+         2983        2984        3023        2984        3024        3023
+         2984        2985        3024        2985        3025        3024
+         2985        2986        3025        2986        3026        3025
+         2986        2987        3026        2987        3027        3026
+         2987        2988        3027        2988        3028        3027
+         2988        2989        3028        2989        3029        3028
+         2989        2990        3029        2990        2146        3029
+         2991        3030        3031        2991        2992        3030
+         2992        3032        3030        2992        2993        3032
+         2993        3033        3032        2993        2994        3033
+         2994        3034        3033        2994        2995        3034
+         2995        3035        3034        2995        2996        3035
+         2996        3036        3035        2996        2997        3036
+         2997        3037        3036        2997        2998        3037
+         2998        3038        3037        2998        2999        3038
+         2999        3039        3038        2999        3000        3039
+         3000        3040        3039        3000        3001        3040
+         3001        3041        3040        3001        3002        3041
+         3002        3042        3041        3002        3003        3042
+         3003        3043        3042        3003        3004        3043
+         3004        3044        3043        3004        3005        3044
+         3005        3045        3044        3005        3006        3045
+         3006        3046        3045        3006        3007        3046
+         3007        3047        3046        3007        3008        3047
+         3008        3048        3047        3008        3009        3048
+         3009        3049        3048        3009        3010        3049
+         3010        3050        3049        3010        3011        3050
+         3011        3051        3050        3011        3012        3051
+         3012        3052        3051        3012        3013        3052
+         3013        3053        3052        3013        3014        3053
+         3014        3054        3053        3014        3015        3054
+         3015        3055        3054        3015        3016        3055
+         3016        3056        3055        3016        3017        3056
+         3017        3057        3056        3017        3018        3057
+         3018        3058        3057        3018        3019        3058
+         3019        3059        3058        3019        3020        3059
+         3020        3060        3059        3020        3021        3060
+         3021        3061        3060        3021        3022        3061
+         3022        3062        3061        3022        3023        3062
+         3023        3063        3062        3023        3024        3063
+         3024        3064        3063        3024        3025        3064
+         3025        3065        3064        3025        3026        3065
+         3026        3066        3065        3026        3027        3066
+         3027        3067        3066        3027        3028        3067
+         3028        3068        3067        3028        3029        3068
+         3029        2146        3068        3031        3069        3070
+         3031        3030        3069        3030        3071        3069
+         3030        3032        3071        3032        3072        3071
+         3032        3033        3072        3033        3073        3072
+         3033        3034        3073        3034        3074        3073
+         3034        3035        3074        3035        3075        3074
+         3035        3036        3075        3036        3076        3075
+         3036        3037        3076        3037        3077        3076
+         3037        3038        3077        3038        3078        3077
+         3038        3039        3078        3039        3079        3078
+         3039        3040        3079        3040        3080        3079
+         3040        3041        3080        3041        3081        3080
+         3041        3042        3081        3042        3082        3081
+         3042        3043        3082        3043        3083        3082
+         3043        3044        3083        3044        3084        3083
+         3044        3045        3084        3045        3085        3084
+         3045        3046        3085        3046        3086        3085
+         3046        3047        3086        3047        3087        3086
+         3047        3048        3087        3048        3088        3087
+         3048        3049        3088        3049        3089        3088
+         3049        3050        3089        3050        3090        3089
+         3050        3051        3090        3051        3091        3090
+         3051        3052        3091        3052        3092        3091
+         3052        3053        3092        3053        3093        3092
+         3053        3054        3093        3054        3094        3093
+         3054        3055        3094        3055        3095        3094
+         3055        3056        3095        3056        3096        3095
+         3056        3057        3096        3057        3097        3096
+         3057        3058        3097        3058        3098        3097
+         3058        3059        3098        3059        3099        3098
+         3059        3060        3099        3060        3100        3099
+         3060        3061        3100        3061        3101        3100
+         3061        3062        3101        3062        3102        3101
+         3062        3063        3102        3063        3103        3102
+         3063        3064        3103        3064        3104        3103
+         3064        3065        3104        3065        3105        3104
+         3065        3066        3105        3066        3106        3105
+         3066        3067        3106        3067        3107        3106
+         3067        3068        3107        3068        2146        3107
+         3070        3069        3108        3069        3109        3108
+         3069        3071        3109        3071        3110        3109
+         3071        3072        3110        3072        3111        3110
+         3072        3073        3111        3073        3112        3111
+         3073        3074        3112        3074        3113        3112
+         3074        3075        3113        3075        3114        3113
+         3075        3076        3114        3076        3115        3114
+         3076        3077        3115        3077        3116        3115
+         3077        3078        3116        3078        3117        3116
+         3078        3079        3117        3079        3118        3117
+         3079        3080        3118        3080        3119        3118
+         3080        3081        3119        3081        3120        3119
+         3081        3082        3120        3082        3121        3120
+         3082        3083        3121        3083        3122        3121
+         3083        3084        3122        3084        3123        3122
+         3084        3085        3123        3085        3124        3123
+         3085        3086        3124        3086        3125        3124
+         3086        3087        3125        3087        3126        3125
+         3087        3088        3126        3088        3127        3126
+         3088        3089        3127        3089        3128        3127
+         3089        3090        3128        3090        3129        3128
+         3090        3091        3129        3091        3130        3129
+         3091        3092        3130        3092        3131        3130
+         3092        3093        3131        3093        3132        3131
+         3093        3094        3132        3094        3133        3132
+         3094        3095        3133        3095        3134        3133
+         3095        3096        3134        3096        3135        3134
+         3096        3097        3135        3097        3136        3135
+         3097        3098        3136        3098        3137        3136
+         3098        3099        3137        3099        3138        3137
+         3099        3100        3138        3100        3139        3138
+         3100        3101        3139        3101        3140        3139
+         3101        3102        3140        3102        3141        3140
+         3102        3103        3141        3103        3142        3141
+         3103        3104        3142        3104        3143        3142
+         3104        3105        3143        3105        3144        3143
+         3105        3106        3144        3106        3145        3144
+         3106        3107        3145        3107        2146        3145
+         3108        3146        3147        3108        3109        3146
+         3109        3148        3146        3109        3110        3148
+         3110        3149        3148        3110        3111        3149
+         3111        3150        3149        3111        3112        3150
+         3112        3151        3150        3112        3113        3151
+         3113        3152        3151        3113        3114        3152
+         3114        3153        3152        3114        3115        3153
+         3115        3154        3153        3115        3116        3154
+         3116        3155        3154        3116        3117        3155
+         3117        3156        3155        3117        3118        3156
+         3118        3157        3156        3118        3119        3157
+         3119        3158        3157        3119        3120        3158
+         3120        3159        3158        3120        3121        3159
+         3121        3160        3159        3121        3122        3160
+         3122        3161        3160        3122        3123        3161
+         3123        3162        3161        3123        3124        3162
+         3124        3163        3162        3124        3125        3163
+         3125        3164        3163        3125        3126        3164
+         3126        3165        3164        3126        3127        3165
+         3127        3166        3165        3127        3128        3166
+         3128        3167        3166        3128        3129        3167
+         3129        3168        3167        3129        3130        3168
+         3130        3169        3168        3130        3131        3169
+         3131        3170        3169        3131        3132        3170
+         3132        3171        3170        3132        3133        3171
+         3133        3172        3171        3133        3134        3172
+         3134        3173        3172        3134        3135        3173
+         3135        3174        3173        3135        3136        3174
+         3136        3175        3174        3136        3137        3175
+         3137        3176        3175        3137        3138        3176
+         3138        3177        3176        3138        3139        3177
+         3139        3178        3177        3139        3140        3178
+         3140        3179        3178        3140        3141        3179
+         3141        3180        3179        3141        3142        3180
+         3142        3181        3180        3142        3143        3181
+         3143        3182        3181        3143        3144        3182
+         3144        3183        3182        3144        3145        3183
+         3145        2146        3183        3147        3146        3184
+         3146        3185        3184        3146        3148        3185
+         3148        3186        3185        3148        3149        3186
+         3149        3187        3186        3149        3150        3187
+         3150        3188        3187        3150        3151        3188
+         3151        3189        3188        3151        3152        3189
+         3152        3190        3189        3152        3153        3190
+         3153        3191        3190        3153        3154        3191
+         3154        3192        3191        3154        3155        3192
+         3155        3193        3192        3155        3156        3193
+         3156        3194        3193        3156        3157        3194
+         3157        3195        3194        3157        3158        3195
+         3158        3196        3195        3158        3159        3196
+         3159        3197        3196        3159        3160        3197
+         3160        3198        3197        3160        3161        3198
+         3161        3199        3198        3161        3162        3199
+         3162        3200        3199        3162        3163        3200
+         3163        3201        3200        3163        3164        3201
+         3164        3202        3201        3164        3165        3202
+         3165        3203        3202        3165        3166        3203
+         3166        3204        3203        3166        3167        3204
+         3167        3205        3204        3167        3168        3205
+         3168        3206        3205        3168        3169        3206
+         3169        3207        3206        3169        3170        3207
+         3170        3208        3207        3170        3171        3208
+         3171        3209        3208        3171        3172        3209
+         3172        3210        3209        3172        3173        3210
+         3173        3211        3210        3173        3174        3211
+         3174        3212        3211        3174        3175        3212
+         3175        3213        3212        3175        3176        3213
+         3176        3214        3213        3176        3177        3214
+         3177        3215        3214        3177        3178        3215
+         3178        3216        3215        3178        3179        3216
+         3179        3217        3216        3179        3180        3217
+         3180        3218        3217        3180        3181        3218
+         3181        3219        3218        3181        3182        3219
+         3182        3220        3219        3182        3183        3220
+         3183        2146        3220        3184        3221        3222
+         3184        3185        3221        3185        3223        3221
+         3185        3186        3223        3186        3224        3223
+         3186        3187        3224        3187        3225        3224
+         3187        3188        3225        3188        3226        3225
+         3188        3189        3226        3189        3227        3226
+         3189        3190        3227        3190        3228        3227
+         3190        3191        3228        3191        3229        3228
+         3191        3192        3229        3192        3230        3229
+         3192        3193        3230        3193        3231        3230
+         3193        3194        3231        3194        3232        3231
+         3194        3195        3232        3195        3233        3232
+         3195        3196        3233        3196        3234        3233
+         3196        3197        3234        3197        3235        3234
+         3197        3198        3235        3198        3236        3235
+         3198        3199        3236        3199        3237        3236
+         3199        3200        3237        3200        3238        3237
+         3200        3201        3238        3201        3239        3238
+         3201        3202        3239        3202        3240        3239
+         3202        3203        3240        3203        3241        3240
+         3203        3204        3241        3204        3242        3241
+         3204        3205        3242        3205        3243        3242
+         3205        3206        3243        3206        3244        3243
+         3206        3207        3244        3207        3245        3244
+         3207        3208        3245        3208        3246        3245
+         3208        3209        3246        3209        3247        3246
+         3209        3210        3247        3210        3248        3247
+         3210        3211        3248        3211        3249        3248
+         3211        3212        3249        3212        3250        3249
+         3212        3213        3250        3213        3251        3250
+         3213        3214        3251        3214        3252        3251
+         3214        3215        3252        3215        3253        3252
+         3215        3216        3253        3216        3254        3253
+         3216        3217        3254        3217        3255        3254
+         3217        3218        3255        3218        3256        3255
+         3218        3219        3256        3219        3257        3256
+         3219        3220        3257        3220        2146        3257
+         3222        3258        3259        3222        3221        3258
+         3221        3260        3258        3221        3223        3260
+         3223        3261        3260        3223        3224        3261
+         3224        3262        3261        3224        3225        3262
+         3225        3263        3262        3225        3226        3263
+         3226        3264        3263        3226        3227        3264
+         3227        3265        3264        3227        3228        3265
+         3228        3266        3265        3228        3229        3266
+         3229        3267        3266        3229        3230        3267
+         3230        3268        3267        3230        3231        3268
+         3231        3269        3268        3231        3232        3269
+         3232        3270        3269        3232        3233        3270
+         3233        3271        3270        3233        3234        3271
+         3234        3272        3271        3234        3235        3272
+         3235        3273        3272        3235        3236        3273
+         3236        3274        3273        3236        3237        3274
+         3237        3275        3274        3237        3238        3275
+         3238        3276        3275        3238        3239        3276
+         3239        3277        3276        3239        3240        3277
+         3240        3278        3277        3240        3241        3278
+         3241        3279        3278        3241        3242        3279
+         3242        3280        3279        3242        3243        3280
+         3243        3281        3280        3243        3244        3281
+         3244        3282        3281        3244        3245        3282
+         3245        3283        3282        3245        3246        3283
+         3246        3284        3283        3246        3247        3284
+         3247        3285        3284        3247        3248        3285
+         3248        3286        3285        3248        3249        3286
+         3249        3287        3286        3249        3250        3287
+         3250        3288        3287        3250        3251        3288
+         3251        3289        3288        3251        3252        3289
+         3252        3290        3289        3252        3253        3290
+         3253        3291        3290        3253        3254        3291
+         3254        3292        3291        3254        3255        3292
+         3255        3293        3292        3255        3256        3293
+         3256        3294        3293        3256        3257        3294
+         3257        2146        3294        3259        3258        3295
+         3258        3296        3295        3258        3260        3296
+         3260        3297        3296        3260        3261        3297
+         3261        3298        3297        3261        3262        3298
+         3262        3299        3298        3262        3263        3299
+         3263        3300        3299        3263        3264        3300
+         3264        3301        3300        3264        3265        3301
+         3265        3302        3301        3265        3266        3302
+         3266        3303        3302        3266        3267        3303
+         3267        3304        3303        3267        3268        3304
+         3268        3305        3304        3268        3269        3305
+         3269        3306        3305        3269        3270        3306
+         3270        3307        3306        3270        3271        3307
+         3271        3308        3307        3271        3272        3308
+         3272        3309        3308        3272        3273        3309
+         3273        3310        3309        3273        3274        3310
+         3274        3311        3310        3274        3275        3311
+         3275        3312        3311        3275        3276        3312
+         3276        3313        3312        3276        3277        3313
+         3277        3314        3313        3277        3278        3314
+         3278        3315        3314        3278        3279        3315
+         3279        3316        3315        3279        3280        3316
+         3280        3317        3316        3280        3281        3317
+         3281        3318        3317        3281        3282        3318
+         3282        3319        3318        3282        3283        3319
+         3283        3320        3319        3283        3284        3320
+         3284        3321        3320        3284        3285        3321
+         3285        3322        3321        3285        3286        3322
+         3286        3323        3322        3286        3287        3323
+         3287        3324        3323        3287        3288        3324
+         3288        3325        3324        3288        3289        3325
+         3289        3326        3325        3289        3290        3326
+         3290        3327        3326        3290        3291        3327
+         3291        3328        3327        3291        3292        3328
+         3292        3329        3328        3292        3293        3329
+         3293        3330        3329        3293        3294        3330
+         3294        2146        3330        3295        3331        3332
+         3295        3296        3331        3296        3333        3331
+         3296        3297        3333        3297        3334        3333
+         3297        3298        3334        3298        3335        3334
+         3298        3299        3335        3299        3336        3335
+         3299        3300        3336        3300        3337        3336
+         3300        3301        3337        3301        3338        3337
+         3301        3302        3338        3302        3339        3338
+         3302        3303        3339        3303        3340        3339
+         3303        3304        3340        3304        3341        3340
+         3304        3305        3341        3305        3342        3341
+         3305        3306        3342        3306        3343        3342
+         3306        3307        3343        3307        3344        3343
+         3307        3308        3344        3308        3345        3344
+         3308        3309        3345        3309        3346        3345
+         3309        3310        3346        3310        3347        3346
+         3310        3311        3347        3311        3348        3347
+         3311        3312        3348        3312        3349        3348
+         3312        3313        3349        3313        3350        3349
+         3313        3314        3350        3314        3351        3350
+         3314        3315        3351        3315        3352        3351
+         3315        3316        3352        3316        3353        3352
+         3316        3317        3353        3317        3354        3353
+         3317        3318        3354        3318        3355        3354
+         3318        3319        3355        3319        3356        3355
+         3319        3320        3356        3320        3357        3356
+         3320        3321        3357        3321        3358        3357
+         3321        3322        3358        3322        3359        3358
+         3322        3323        3359        3323        3360        3359
+         3323        3324        3360        3324        3361        3360
+         3324        3325        3361        3325        3362        3361
+         3325        3326        3362        3326        3363        3362
+         3326        3327        3363        3327        3364        3363
+         3327        3328        3364        3328        3365        3364
+         3328        3329        3365        3329        3366        3365
+         3329        3330        3366        3330        2146        3366
+         3332        3331        3367        3331        3368        3367
+         3331        3333        3368        3333        3369        3368
+         3333        3334        3369        3334        3370        3369
+         3334        3335        3370        3335        3371        3370
+         3335        3336        3371        3336        3372        3371
+         3336        3337        3372        3337        3373        3372
+         3337        3338        3373        3338        3374        3373
+         3338        3339        3374        3339        3375        3374
+         3339        3340        3375        3340        3376        3375
+         3340        3341        3376        3341        3377        3376
+         3341        3342        3377        3342        3378        3377
+         3342        3343        3378        3343        3379        3378
+         3343        3344        3379        3344        3380        3379
+         3344        3345        3380        3345        3381        3380
+         3345        3346        3381        3346        3382        3381
+         3346        3347        3382        3347        3383        3382
+         3347        3348        3383        3348        3384        3383
+         3348        3349        3384        3349        3385        3384
+         3349        3350        3385        3350        3386        3385
+         3350        3351        3386        3351        3387        3386
+         3351        3352        3387        3352        3388        3387
+         3352        3353        3388        3353        3389        3388
+         3353        3354        3389        3354        3390        3389
+         3354        3355        3390        3355        3391        3390
+         3355        3356        3391        3356        3392        3391
+         3356        3357        3392        3357        3393        3392
+         3357        3358        3393        3358        3394        3393
+         3358        3359        3394        3359        3395        3394
+         3359        3360        3395        3360        3396        3395
+         3360        3361        3396        3361        3397        3396
+         3361        3362        3397        3362        3398        3397
+         3362        3363        3398        3363        3399        3398
+         3363        3364        3399        3364        3400        3399
+         3364        3365        3400        3365        3401        3400
+         3365        3366        3401        3366        2146        3401
+         3367        3402        3403        3367        3368        3402
+         3368        3404        3402        3368        3369        3404
+         3369        3405        3404        3369        3370        3405
+         3370        3406        3405        3370        3371        3406
+         3371        3407        3406        3371        3372        3407
+         3372        3408        3407        3372        3373        3408
+         3373        3409        3408        3373        3374        3409
+         3374        3410        3409        3374        3375        3410
+         3375        3411        3410        3375        3376        3411
+         3376        3412        3411        3376        3377        3412
+         3377        3413        3412        3377        3378        3413
+         3378        3414        3413        3378        3379        3414
+         3379        3415        3414        3379        3380        3415
+         3380        3416        3415        3380        3381        3416
+         3381        3417        3416        3381        3382        3417
+         3382        3418        3417        3382        3383        3418
+         3383        3419        3418        3383        3384        3419
+         3384        3420        3419        3384        3385        3420
+         3385        3421        3420        3385        3386        3421
+         3386        3422        3421        3386        3387        3422
+         3387        3423        3422        3387        3388        3423
+         3388        3424        3423        3388        3389        3424
+         3389        3425        3424        3389        3390        3425
+         3390        3426        3425        3390        3391        3426
+         3391        3427        3426        3391        3392        3427
+         3392        3428        3427        3392        3393        3428
+         3393        3429        3428        3393        3394        3429
+         3394        3430        3429        3394        3395        3430
+         3395        3431        3430        3395        3396        3431
+         3396        3432        3431        3396        3397        3432
+         3397        3433        3432        3397        3398        3433
+         3398        3434        3433        3398        3399        3434
+         3399        3435        3434        3399        3400        3435
+         3400        3436        3435        3400        3401        3436
+         3401        2146        3436        3403        3402        3437
+         3402        3438        3437        3402        3404        3438
+         3404        3439        3438        3404        3405        3439
+         3405        3440        3439        3405        3406        3440
+         3406        3441        3440        3406        3407        3441
+         3407        3442        3441        3407        3408        3442
+         3408        3443        3442        3408        3409        3443
+         3409        3444        3443        3409        3410        3444
+         3410        3445        3444        3410        3411        3445
+         3411        3446        3445        3411        3412        3446
+         3412        3447        3446        3412        3413        3447
+         3413        3448        3447        3413        3414        3448
+         3414        3449        3448        3414        3415        3449
+         3415        3450        3449        3415        3416        3450
+         3416        3451        3450        3416        3417        3451
+         3417        3452        3451        3417        3418        3452
+         3418        3453        3452        3418        3419        3453
+         3419        3454        3453        3419        3420        3454
+         3420        3455        3454        3420        3421        3455
+         3421        3456        3455        3421        3422        3456
+         3422        3457        3456        3422        3423        3457
+         3423        3458        3457        3423        3424        3458
+         3424        3459        3458        3424        3425        3459
+         3425        3460        3459        3425        3426        3460
+         3426        3461        3460        3426        3427        3461
+         3427        3462        3461        3427        3428        3462
+         3428        3463        3462        3428        3429        3463
+         3429        3464        3463        3429        3430        3464
+         3430        3465        3464        3430        3431        3465
+         3431        3466        3465        3431        3432        3466
+         3432        3467        3466        3432        3433        3467
+         3433        3468        3467        3433        3434        3468
+         3434        3469        3468        3434        3435        3469
+         3435        3470        3469        3435        3436        3470
+         3436        2146        3470        3437        3471        3472
+         3437        3438        3471        3438        3473        3471
+         3438        3439        3473        3439        3474        3473
+         3439        3440        3474        3440        3475        3474
+         3440        3441        3475        3441        3476        3475
+         3441        3442        3476        3442        3477        3476
+         3442        3443        3477        3443        3478        3477
+         3443        3444        3478        3444        3479        3478
+         3444        3445        3479        3445        3480        3479
+         3445        3446        3480        3446        3481        3480
+         3446        3447        3481        3447        3482        3481
+         3447        3448        3482        3448        3483        3482
+         3448        3449        3483        3449        3484        3483
+         3449        3450        3484        3450        3485        3484
+         3450        3451        3485        3451        3486        3485
+         3451        3452        3486        3452        3487        3486
+         3452        3453        3487        3453        3488        3487
+         3453        3454        3488        3454        3489        3488
+         3454        3455        3489        3455        3490        3489
+         3455        3456        3490        3456        3491        3490
+         3456        3457        3491        3457        3492        3491
+         3457        3458        3492        3458        3493        3492
+         3458        3459        3493        3459        3494        3493
+         3459        3460        3494        3460        3495        3494
+         3460        3461        3495        3461        3496        3495
+         3461        3462        3496        3462        3497        3496
+         3462        3463        3497        3463        3498        3497
+         3463        3464        3498        3464        3499        3498
+         3464        3465        3499        3465        3500        3499
+         3465        3466        3500        3466        3501        3500
+         3466        3467        3501        3467        3502        3501
+         3467        3468        3502        3468        3503        3502
+         3468        3469        3503        3469        3504        3503
+         3469        3470        3504        3470        2146        3504
+         3472        3471        2080        3471        2083        2080
+         3471        3473        2083        3473        2085        2083
+         3473        3474        2085        3474        2087        2085
+         3474        3475        2087        3475        2089        2087
+         3475        3476        2089        3476        2091        2089
+         3476        3477        2091        3477        2093        2091
+         3477        3478        2093        3478        2095        2093
+         3478        3479        2095        3479        2097        2095
+         3479        3480        2097        3480        2099        2097
+         3480        3481        2099        3481        2101        2099
+         3481        3482        2101        3482        2103        2101
+         3482        3483        2103        3483        2105        2103
+         3483        3484        2105        3484        2107        2105
+         3484        3485        2107        3485        2109        2107
+         3485        3486        2109        3486        2111        2109
+         3486        3487        2111        3487        2113        2111
+         3487        3488        2113        3488        2115        2113
+         3488        3489        2115        3489        2117        2115
+         3489        3490        2117        3490        2119        2117
+         3490        3491        2119        3491        2121        2119
+         3491        3492        2121        3492        2123        2121
+         3492        3493        2123        3493        2125        2123
+         3493        3494        2125        3494        2127        2125
+         3494        3495        2127        3495        2129        2127
+         3495        3496        2129        3496        2131        2129
+         3496        3497        2131        3497        2133        2131
+         3497        3498        2133        3498        2135        2133
+         3498        3499        2135        3499        2137        2135
+         3499        3500        2137        3500        2139        2137
+         3500        3501        2139        3501        2141        2139
+         3501        3502        2141        3502        2143        2141
+         3502        3503        2143        3503        2145        2143
+         3503        3504        2145        3504        2146        2145
+           12        3506        3507          13        3506          12
+         3508          12        3507        3506          13        3509
+           13        3510        3509          12        3511        3512
+           12        3512          20        3511          12        3508
+         3513          20        3514        3514          20        3515
+         3515          20        3516          20        3512        3516
+           28        3517        3518          20        3513          28
+         3517          28        3513        3519          28        3520
+           28        3518        3520        3521          28        3522
+           28        3519        3522          37        3523        3524
+           28        3521          37        3523          37        3521
+         3525          48          37          37        3524        3525
+         3526          48        3527        3527          48        3528
+           48        3525        3528        3529          50          48
+         3529          48        3530        3530          48        3531
+           48        3526        3531        3532          50        3533
+           50        3529        3533        3534          50        3535
+         3535          50        3536          50        3532        3536
+         3537          52        3538          52        3539        3538
+           52        3537        3540          52        3541        3542
+         3541          52        3543          52        3540        3543
+         3541        3544        3542          51        3534        3545
+           50        3534          51        3546          51        3545
+         3547          68          51          51        3546        3547
+         3548          68        3549        3549          68        3550
+           68        3547        3550        3551          70          68
+         3551          68        3552          68        3548        3552
+           70        3553        3554        3553          70        3551
+         3555          72          70        3555          70        3556
+           70        3554        3556          72        3557        3558
+         3557          72        3555        3559          74          72
+         3559          72        3560        3560          72        3561
+           72        3558        3561          74        3559        3562
+         3563          76          74          76        3563        3564
+         3563          74        3565          74        3562        3565
+           76        3564        3566        3567          78          76
+           78        3567        3568        3567          76        3569
+           76        3566        3569          78        3568        3570
+         3571          80          78          80        3571        3572
+         3571          78        3573          78        3570        3573
+           80        3572        3574        3575          82          80
+           82        3575        3576        3575          80        3577
+           80        3574        3577          82        3576        3578
+         3579          84          82          84        3579        3580
+         3579          82        3581          82        3578        3581
+           84        3580        3582        3583          86          84
+           86        3583        3584        3583          84        3585
+           84        3582        3585          86        3584        3586
+         3587          88          86          88        3587        3588
+         3587          86        3589          86        3586        3589
+           88        3588        3590        3591          90          88
+           90        3591        3592        3591          88        3593
+           88        3590        3593          90        3592        3594
+         3595          92          90          92        3595        3596
+         3595          90        3597          90        3594        3597
+           92        3596        3598        3599          94          92
+         3599          92        3600          92        3598        3600
+           94        3601        3602        3601          94        3599
+         3603          96          94        3603          94        3604
+           94        3602        3604          96        3605        3606
+         3605          96        3603        3607          98          96
+         3607          96        3608          96        3606        3608
+         3609          98        3610          98        3607        3610
+         3611          54          98          98        3609        3611
+         3539          52          54        3539          54        3612
+           54        3611        3612        3613          52        3542
+           52        3613          53        3614          53        3613
+         3615          53        3616        3616          53        3617
+           53        3614        3617        3618         101        3619
+           53        3619         101        3620         101        3618
+         3619          53        3615        3621         101        3622
+          101        3620        3622         133        3621        3623
+          101        3621         133        3624         133        3623
+         3625         167         133        3625         133        3626
+         3626         133        3627         133        3624        3627
+         3628         167        3629         167        3625        3629
+          167        3628        3630         168        3631        3632
+         3633         168        3632        3631         168         167
+          167        3630        3631        3634         168        3635
+          168        3633        3635        3636         168        3634
+          168        3636         203        3637         203        3636
+          203        3637        3638         203        3639        3640
+          203        3640         239        3641         239        3640
+         3639         203        3638        3642         239        3643
+          239        3641        3643         276        3642        3644
+          239        3642         276        3645         276        3644
+          276        3645        3646        3647        3648         314
+          314        3649        3647        3649         314         276
+          276        3646        3649         314        3648        3650
+          352        3651        3652         314        3651         352
+         3653         352        3652         314        3650        3651
+         3654        3655         390         352        3654         390
+         3654         352        3656         352        3653        3656
+          429        3657        3658        3657         429         390
+          390        3655        3657         429        3658        3659
+         3660        3661         468         429        3660         468
+          429        3659        3660        3662         467        3663
+          467        3662         506         468        3663         467
+          468        3664        3663        3664         468        3665
+          468        3666        3665         468        3661        3666
+         3667         506        3668         506        3667         544
+         3668         506        3669         506        3662        3669
+         3670         543        3671         543        3670         581
+          544        3671         543        3671         544        3672
+          544        3673        3672         544        3674        3673
+         3674         544        3675         544        3667        3675
+          580        3676        3677         580        3677         617
+         3676         580        3678         581        3678         580
+         3678         581        3679         581        3680        3679
+          581        3681        3680        3681         581        3682
+          581        3670        3682        3683         617        3684
+          617        3683         653        3684         617        3685
+          617        3677        3685        3686         652        3687
+          652        3686         688         653        3687         652
+         3687         653        3688         653        3689        3688
+         3689         653        3690         653        3683        3690
+          688        3691         723        3691         688        3692
+          688        3693        3692        3693         688        3694
+          688        3686        3694         722        3695         757
+         3695         722        3696         722        3697        3696
+          723        3697         722         723        3698        3697
+         3698         723        3699        3699         723        3700
+          723        3701        3700         723        3691        3701
+          757        3702         791        3702         757        3703
+          757        3704        3703         757        3695        3704
+          790        3705        3706         790        3706         824
+         3705         790        3707         791        3707         790
+         3707         791        3708         791        3709        3708
+          791        3710        3709         791        3702        3710
+          857        3711        3712        3711         857         824
+         3711         824        3713         824        3714        3713
+          824        3706        3714         856        3715         889
+         3715         856        3716         856        3717        3716
+          856        3718        3717        3718         856         857
+          857        3719        3718         857        3720        3719
+          857        3712        3720        3721         888        3722
+          888        3721         920         889        3722         888
+         3722         889        3723         889        3724        3723
+         3724         889        3725         889        3726        3725
+          889        3715        3726         920        3727         951
+          920        3728        3729        3727         920        3730
+          920        3729        3730        3728         920        3731
+          920        3721        3731         950        3732         981
+          950        3733        3734        3732         950        3735
+          950        3734        3735         951        3733         950
+         3733         951        3736         951        3737        3736
+         3737         951        3738         951        3739        3738
+          951        3727        3739        1011        3740        3741
+         3740        1011         981         981        3742        3740
+          981        3743        3742        3743         981        3732
+          994        3744        1024        3744         994        3745
+          994        3746        3745         995        3746         994
+         3746         995        3747         995        3748        3749
+         3747         995        3750         995        3749        3750
+          996        3748         995        3748         996        3751
+          996        3752        3753        3751         996        3754
+          996        3753        3754         997        3752         996
+         3752         997        3755        3755         997        3756
+          997        3757        3756         998        3757         997
+          998        3758        3757        3758         998        3759
+         3759         998        3760         998        3761        3760
+          999        3761         998        3761         999        3762
+          999        3763        3762        3763         999        3764
+          999        3765        3764        1000        3765         999
+         1000        3766        3765        3766        1000        3767
+         3767        1000        3768        1000        3769        3768
+         1001        3769        1000        3769        1001        3770
+         1001        3771        3770        3771        1001        3772
+         1001        3773        3772        1002        3773        1001
+         3773        1002        3774        1002        3775        3774
+         3775        1002        3776        1002        3777        3776
+         1003        3777        1002        3777        1003        3778
+         1003        3779        3778        3779        1003        3780
+         1003        3781        3780        1004        3781        1003
+         1004        3782        3781        3782        1004        3783
+         1004        3784        3785        3783        1004        3786
+         1004        3785        3786        1005        3784        1004
+         3784        1005        3787        1005        3788        3789
+         3787        1005        3790        1005        3789        3790
+         1006        3788        1005        3788        1006        3791
+         3792        1006        3793        3791        1006        3794
+         1006        3792        3794        1006        3795        3793
+         1007        3795        1006        1007        3796        3795
+         3796        1007        3797        3797        1007        3798
+         1025        3799        1007        1007        3799        3798
+         1010        3800        1027        3800        1010        3801
+         1010        3802        3801        1011        3802        1010
+         1011        3803        3802        3803        1011        3804
+         3804        1011        3805        1011        3806        3805
+         3806        1011        3807        1011        3741        3807
+         1022        3808        3809        1022        3809        1038
+         3808        1022        3810        1023        3810        1022
+         3810        1023        3811        3811        1023        3812
+         1023        3813        3812        1024        3813        1023
+         1024        3814        3813        3814        1024        3815
+         3815        1024        3816        1024        3817        3816
+         1024        3744        3817        3818        1025        3819
+         1025        3818        3799        3819        1025        3820
+         1025        3821        3820        1026        3821        1025
+         1026        3822        3821        3822        1026        3823
+         3824        1026        3825        3823        1026        3826
+         1026        3824        3826        1026        3827        3825
+         1027        3827        1026        3827        1027        3828
+         1027        3829        3830        1027        3831        3828
+         3830        3831        1027        3829        1027        3832
+         3832        1027        3833        3833        1027        3834
+         1027        3800        3834        1036        3835        3836
+         1036        3836        1047        3835        1036        3837
+         1037        3837        1036        3837        1037        3838
+         3838        1037        3839        1037        3840        3839
+         1038        3840        1037        3840        1038        3841
+         1038        3842        3841        3842        1038        3843
+         3843        1038        3844        1038        3809        3844
+         3845        3830        3846        3846        3830        3847
+         3830        3845        3831        3846        3847        3848
+         3849        1046        3850        1046        3849        1055
+         1047        3850        1046        3850        1047        3851
+         3851        1047        3852        1047        3853        3852
+         1047        3836        3853        3854        1054        3855
+         1054        3854        1062        1055        3855        1054
+         3855        1055        3856        3856        1055        3857
+         1055        3858        3857        3858        1055        3859
+         1055        3849        3859        1068        3860        3861
+         1061        3860        1068        3862        1068        3861
+         1061        3863        3860        1062        3863        1061
+         1062        3864        3863        3864        1062        3865
+         3865        1062        3866        1062        3854        3866
+         3867        1068        3868        1068        3867        1074
+         3869        1074        3870        1074        3867        3870
+         1068        3862        3868          13        3871        3872
+         1074        3871          13        3510          13        3873
+           13        3872        3873        1074        3869        3871
+         3874        3875        1140        1141        3874        1140
+         1141        3876        3877        3874        1141        3878
+         1141        3877        3878        3879        1140        3880
+         1140        3879        1174        3881        1174        3879
+         1140        3875        3882        3880        1140        3883
+         1140        3882        3883        1207        3884        3885
+         1174        3886        1207        3884        1207        3886
+         1174        3881        3886        3887        1207        3888
+         1207        3887        1240        3889        1240        3887
+         3888        1207        3890        1207        3885        3890
+         3891        3892        1272        1239        3891        1272
+         3893        1239        1240        1240        3894        3893
+         1239        3893        3895        3891        1239        3896
+         1239        3895        3896        1240        3897        3894
+         1240        3889        3897        3898        1272        3899
+         1272        3898        1304        3899        1272        3900
+         1272        3892        3900        1335        3901        3902
+         1303        3903        1335        3901        1335        3903
+         1303        3904        3903        1304        3904        1303
+         1304        3905        3906        3904        1304        3907
+         1304        3906        3907        3905        1304        3908
+         1304        3898        3908        3909        1335        3910
+         3911        1335        3909        3912        1366        3911
+         1335        3911        1366        3910        1335        3913
+         1335        3902        3913        3914        1365        3915
+         1365        3914        1396        3916        1396        3914
+         1365        1366        3917        1365        3918        3915
+         3919        3917        1366        3918        1365        3917
+         1366        3920        3919        3920        1366        3921
+         1366        3912        3921        3922        3923        1425
+         1395        3922        1425        1395        3924        3922
+         1396        3924        1395        1396        3925        3926
+         3924        1396        3927        1396        3926        3927
+         3925        1396        3928        1396        3916        3928
+         1406        3533        1435        3533        1406        3532
+         1406        3536        3532        1407        3536        1406
+         3536        1407        3535        3535        1407        3534
+         1407        3545        3534        1408        3545        1407
+         1408        3550        3547        3545        1408        3546
+         1408        3547        3546        1408        3549        3550
+         1409        3549        1408        3549        1409        3548
+         1409        3552        3548        3552        1409        3551
+         1409        3553        3551        1410        3553        1409
+         3553        1410        3554        1410        3556        3554
+         1410        3555        3556        3555        1410        3557
+         1411        3557        1410        3557        1411        3558
+         1411        3561        3558        1411        3560        3561
+         1411        3559        3560        3559        1411        1412
+         3559        1412        3562        1412        3565        3562
+         1412        3563        3565        1412        3564        3563
+         1413        3569        3566        3564        1412        1413
+         1413        3566        3564        1413        3567        3569
+         1413        3568        3567        1414        3573        3570
+         3568        1413        1414        1414        3570        3568
+         1414        3571        3573        1414        3572        3571
+         3572        1414        1415        3572        1415        3574
+         1415        3577        3574        1415        3575        3577
+         1415        3576        3575        3576        1415        1416
+         3576        1416        3578        1416        3581        3578
+         1416        3579        3581        1416        3580        3579
+         1417        3585        3582        3580        1416        1417
+         1417        3582        3580        1417        3583        3585
+         1417        3584        3583        1418        3589        3586
+         3584        1417        1418        1418        3586        3584
+         1418        3587        3589        1418        3588        3587
+         1419        3593        3590        3588        1418        1419
+         1419        3590        3588        1419        3591        3593
+         1419        3592        3591        3592        1419        1420
+         3592        1420        3594        1420        3597        3594
+         1420        3595        3597        1420        3596        3595
+         1421        3600        3598        3596        1420        1421
+         1421        3598        3596        3600        1421        3599
+         1421        3601        3599        1422        3601        1421
+         3601        1422        3602        1422        3604        3602
+         3604        1422        3603        1422        3605        3603
+         1423        3605        1422        3605        1423        3606
+         1423        3608        3606        1423        3607        3608
+         3607        1423        3610        1424        3610        1423
+         1424        3612        3611        3610        1424        3609
+         1424        3611        3609        3612        1424        3539
+         1436        3538        1424        1424        3538        3539
+         3929        1425        3930        1425        3929        1436
+         3931        1436        3929        1425        3923        3932
+         1425        3932        3933        3930        1425        3934
+         1425        3933        3934        1433        3522        1444
+         3522        1433        3521        1433        3523        3521
+         1433        3524        3523        1434        3528        3525
+         3524        1433        1434        1434        3525        3524
+         1434        3527        3528        1434        3526        3527
+         3526        1434        1435        1435        3531        3526
+         1435        3530        3531        3530        1435        3529
+         1435        3533        3529        3537        1436        3540
+         1436        3543        3540        1436        3537        3538
+         1436        3541        3543        1436        3931        3541
+         3541        3931        3544        1451        3513        3514
+         3513        1451        1443        1443        3517        3513
+         1443        3518        3517        3518        1443        1444
+         1444        3520        3518        1444        3519        3520
+         1444        3522        3519        3508        1450        3511
+         1450        3508        1457        3507        1457        3508
+         3511        1450        3512        3512        1451        3516
+         1451        3512        1450        1451        3515        3516
+         1451        3514        3515        1463        3509        3510
+         1457        3509        1463        3873        1463        3510
+         3509        1457        3506        1457        3507        3506
+         3871        1463        3872        1463        3871        1469
+         3870        1469        3869        1469        3871        3869
+         1463        3873        3872        3868        1469        3867
+         1469        3868        1475        3861        1475        3862
+         1475        3868        3862        1469        3870        3867
+         1482        3864        3865        1482        3863        3864
+         3863        1482        1475        3863        1475        3860
+         1475        3861        3860        1482        3865        3866
+         1490        3855        3856        3857        1490        3856
+         1482        3866        3854        3855        1490        1482
+         1482        3854        3855        3858        1490        3857
+         1490        3858        3859        1490        3850        1499
+         1499        3850        3851        3852        1499        3851
+         3850        1490        3849        1490        3859        3849
+         3835        1510        1499        1499        3852        3853
+         3835        1499        3836        1499        3853        3836
+         3839        1510        3838        1510        3837        3838
+         3837        1510        3835        3843        1510        3842
+         3842        1510        3841        3841        1510        3840
+         1510        3839        3840        3845        3505        3831
+         3831        3505        3828        3828        3505        3827
+         3505        3825        3827        3505        3845        3846
+         3848        3505        3846        3505        3848        3937
+         3843        3844        1511        1510        3843        1511
+         3808        1524        1511        3808        1511        3809
+         1511        3844        3809        3812        1524        3811
+         1524        3810        3811        3810        1524        3808
+         3814        1526        1524        3814        1524        3813
+         1524        3812        3813        3816        1526        3815
+         1526        3814        3815        1526        3816        3817
+         3745        1526        3744        1526        3817        3744
+         3796        1528        3795        1528        3793        3795
+         3798        1528        3797        1528        3796        3797
+         3818        1531        1528        3818        1528        3799
+         1528        3798        3799        3820        1531        3819
+         1531        3818        3819        3822        1533        1531
+         3821        1531        3820        1531        3821        3822
+         3826        1533        3823        1533        3822        3823
+         3824        1535        1533        1533        3826        3824
+         3825        3505        1535        1535        3824        3825
+         1535        3938        3939        3505        3940        1535
+         3941        1535        3939        3938        1535        3940
+         3505        3937        3940        3747        1527        3746
+         1526        3745        1527        3750        1527        3747
+         1527        3745        3746        3749        1551        1527
+         1527        3750        3749        3754        1551        3751
+         3751        1551        3748        1551        3749        3748
+         3753        1553        1551        1551        3754        3753
+         3756        1553        3755        1553        3752        3755
+         3752        1553        3753        3758        1555        1553
+         3758        1553        3757        1553        3756        3757
+         3760        1555        3759        1555        3758        3759
+         3762        1557        1555        3761        1555        3760
+         1555        3761        3762        3764        1557        3763
+         1557        3762        3763        3766        1559        1557
+         3765        1557        3764        1557        3765        3766
+         3768        1559        3767        1559        3766        3767
+         3770        1561        1559        3770        1559        3769
+         1559        3768        3769        3772        1561        3771
+         1561        3770        3771        3774        1563        1561
+         3773        1561        3772        1561        3773        3774
+         3776        1563        3775        1563        3774        3775
+         3778        1565        1563        3778        1563        3777
+         1563        3776        3777        3780        1565        3779
+         1565        3778        3779        3782        1567        1565
+         3781        1565        3780        1565        3781        3782
+         3786        1567        3783        1567        3782        3783
+         3785        1569        1567        1567        3786        3785
+         3790        1569        3787        3787        1569        3784
+         1569        3785        3784        3789        1571        1569
+         1569        3790        3789        3794        1571        3791
+         1571        3788        3791        3788        1571        3789
+         3792        1530        1571        1571        3794        3792
+         3793        1528        1530        1530        3792        3793
+         1534        3942        3943        1535        3944        1534
+         3942        1534        3944        1535        3941        3945
+         3944        1535        3946        1535        3945        3946
+         1575        3947        3948        1534        3947        1575
+         3949        1575        3948        3947        1534        3950
+         1534        3943        3950        1575        3951        1605
+         3952        1605        3951        3951        1575        3953
+         1575        3949        3953        1605        3952        3954
+         1635        3955        3956        1605        3957        1635
+         3955        1635        3957        3957        1605        3958
+         1605        3954        3958        1665        3959        3960
+         1635        3959        1665        3961        1665        3960
+         3959        1635        3962        1635        3956        3962
+         3963        3964        1695        1665        3963        1695
+         3963        1665        3965        3965        1665        3966
+         1665        3961        3966        3967        1695        3964
+         1695        3967        1726        3968        1726        3967
+         1726        3968        3969        3970        1757        3971
+         1726        3972        1757        3973        1757        3970
+         3971        1757        3972        3972        1726        3974
+         1726        3969        3974        1788        3975        3976
+         1757        3975        1788        3977        1788        3976
+         1757        3973        3975        3978        3979        1819
+         1788        3978        1819        1788        3977        3980
+         3978        1788        3981        1788        3980        3981
+         3979        3982        1851        1819        3979        1851
+         3983        1851        3984        1851        3982        3984
+         3985        3986        1883        1851        3985        1883
+         3985        1851        3987        1851        3983        3987
+         3988        3989        1915        1883        3988        1915
+         1883        3986        3988        1947        3990        3991
+         1915        3990        1947        3992        1947        3993
+         3993        1947        3994        1947        3991        3994
+         1915        3989        3990        3992        3995        1980
+         1947        3992        1980        1980        3995        3996
+         2013        3997        3998        1980        3997        2013
+         3999        2013        3998        1980        3996        3997
+         4000        4001        2046        2013        4000        2046
+         2013        3999        4000        4002        4003        2079
+         2046        4002        2079        2046        4004        4005
+         4004        2046        4001        4002        2046        3936
+         2046        4005        3936        3935        3876        1141
+         2079        3935        1141        2079        4003        3935
+         3880        2147        3879        2147        3880        3883
+         2147        3883        3882        3882        2082        2147
+         2082        3882        3875        3878        2082        3874
+         2082        3875        3874        3878        2080        2082
+         2080        3878        3877        3884        2149        3885
+         2149        3890        3885        3886        2149        3884
+         3881        2149        3886        3879        2147        3881
+         2149        3881        2147        2216        3896        3895
+         2216        3895        3893        3894        2216        3893
+         2216        3894        2183        2183        3894        3897
+         3887        2183        3889        2183        3897        3889
+         3887        2149        2183        3888        2149        3887
+         2149        3888        3890        3899        2218        3898
+         2218        3908        3898        2218        3899        3900
+         3892        2218        3900        2218        3892        2216
+         3896        2216        3891        2216        3892        3891
+         3901        2287        3902        2287        3913        3902
+         3907        2287        3904        2287        3903        3904
+         3903        2287        3901        3907        2253        2287
+         2253        3907        3906        3906        2218        2253
+         3908        2218        3905        2218        3906        3905
+         3920        2324        3919        2324        3917        3919
+         2324        3920        3921        3911        2324        3912
+         2324        3921        3912        3911        2289        2324
+         2289        3911        3909        3909        2287        2289
+         3913        2287        3910        2287        3909        3910
+         3925        2362        3926        2362        3925        3928
+         3914        2362        3916        2362        3928        3916
+         3914        2326        2362        3918        2326        3915
+         2326        3914        3915        3918        2324        2326
+         2324        3918        3917        2401        3934        3933
+         2401        3933        3932        2364        3922        3924
+         3927        2364        3924        3922        2364        3923
+         3923        2364        2401        2401        3932        3923
+         3927        2362        2364        2362        3927        3926
+         2403        3613        3929        3929        3613        3931
+         3931        3613        3542        3931        3542        3544
+         3930        2403        3929        2403        3930        2401
+         2401        3930        3934        3613        2403        3614
+         2403        3617        3614        2403        3616        3617
+         2402        3616        2403        3616        2402        3615
+         2402        3619        3615        2402        3618        3619
+         2441        3618        2402        3618        2441        3620
+         2441        3622        3620        3622        2441        3621
+         2441        3623        3621        2442        3623        2441
+         3623        2442        3624        2442        3627        3624
+         2442        3626        3627        2478        3626        2442
+         3626        2478        3625        2478        3629        3625
+         2478        3631        3630        3629        2478        3628
+         2478        3630        3628        2479        3631        2478
+         3631        2479        3632        3632        2479        3633
+         2513        3635        2479        2479        3635        3633
+         3635        2513        3634        2513        3636        3634
+         2513        3639        3638        3636        2513        3637
+         2513        3638        3637        2514        3639        2513
+         3639        2514        3640        3640        2514        3641
+         3641        2546        3643        2546        3641        2514
+         3643        2546        3642        2546        3644        3642
+         3646        2577        3649        2577        3646        2546
+         3644        2546        3645        2546        3646        3645
+         2577        3647        3649        3654        2608        3655
+         2608        3657        3655        2608        3654        3656
+         2577        3652        3651        2577        3651        3650
+         3647        2577        3648        2577        3650        3648
+         2577        2578        3652        2608        3656        2578
+         2578        3656        3653        3652        2578        3653
+         3663        2637        3662        2637        3669        3662
+         2637        3663        3664        2637        3664        3665
+         2608        3661        3660        2637        3665        3666
+         2608        2637        3661        2637        3666        3661
+         2608        3660        3659        3657        2608        3658
+         2608        3659        3658        3682        2694        3681
+         3681        2694        3680        2694        3679        3680
+         3671        2694        3670        2694        3682        3670
+         2694        3671        3672        3674        2666        2694
+         2666        3674        3675        3674        2694        3673
+         2694        3672        3673        3667        2666        3675
+         3668        2637        3667        2666        3667        2637
+         2637        3668        3669        2725        3700        3701
+         3692        2725        3691        2725        3701        3691
+         2725        3693        3694        3693        2725        3692
+         3688        2728        2725        2728        3688        3689
+         2725        3694        3686        3688        2725        3687
+         2725        3686        3687        2728        3689        3690
+         2728        3690        3683        3685        2728        3684
+         2728        3683        3684        3677        2696        2728
+         2696        3677        3676        2728        3685        3677
+         3678        2696        3676        2696        3678        2694
+         2694        3678        3679        2759        3713        3714
+         3705        2759        3706        2759        3714        3706
+         3708        2759        3707        2759        3705        3707
+         3710        2759        3709        2759        3708        3709
+         2759        3710        2762        3703        2762        3702
+         2762        3710        3702        2762        3703        3704
+         3696        2762        3695        2762        3704        3695
+         3698        2727        2762        3698        2762        3697
+         2762        3696        3697        3700        2725        2727
+         3700        2727        3699        2727        3698        3699
+         3722        2795        3721        2795        3731        3721
+         2795        3722        3723        3725        2795        3724
+         2795        3723        3724        3715        2795        3726
+         3716        2798        3715        2795        3725        3726
+         2795        3715        2798        2798        3717        3718
+         3717        2798        3716        3711        2761        2798
+         2798        3718        3719        2798        3719        3720
+         3711        2798        3712        2798        3720        3712
+         3713        2759        2761        2761        3711        3713
+         3738        2833        3737        2833        3736        3737
+         2833        3738        3739        3730        2833        3727
+         2833        3739        3727        3729        2797        2833
+         2833        3730        3729        3731        2795        2797
+         3731        2797        3728        2797        3729        3728
+         2871        3742        3743        3742        2871        3740
+         3735        2871        3732        2871        3743        3732
+         3734        2835        2871        2871        3735        3734
+         3736        2833        2835        3733        2835        3734
+         2835        3733        3736        3803        2910        3802
+         2910        3801        3802        3805        2910        3804
+         2910        3803        3804        3807        2873        2910
+         3807        2910        3806        2910        3805        3806
+         3740        2871        2873        3740        2873        3741
+         2873        3807        3741        3829        2950        3830
+         2950        3847        3830        2950        3829        3832
+         3833        2950        3832        3834        2912        2950
+         2950        3833        3834        3801        2910        2912
+         3801        2912        3800        2912        3834        3800
+         2952        3939        3938        3938        2950        2952
+         3940        2950        3938        3937        2950        3940
+         2950        3937        3847        3847        3937        3848
+         3939        2952        3941        2952        3945        3941
+         2952        3946        3945        2991        3946        2952
+         3942        3031        3943        3031        3950        3943
+         3942        2991        3031        3944        2991        3942
+         2991        3944        3946        3948        3070        3949
+         3070        3953        3949        3948        3031        3070
+         3950        3031        3947        3031        3948        3947
+         3070        3951        3953        3954        3108        3958
+         3952        3108        3954        3951        3070        3952
+         3108        3952        3070        3955        3147        3956
+         3147        3962        3956        3955        3108        3147
+         3958        3108        3957        3108        3955        3957
+         3959        3147        3960        3147        3959        3962
+         3960        3147        3961        3184        3966        3147
+         3147        3966        3961        3963        3222        3964
+         3222        3967        3964        3222        3963        3965
+         3965        3184        3222        3184        3965        3966
+         3259        3971        3972        3974        3259        3972
+         3259        3974        3222        3222        3974        3969
+         3967        3222        3968        3222        3969        3968
+         3259        3970        3971        3975        3295        3976
+         3973        3295        3975        3970        3259        3973
+         3295        3973        3259        3332        3981        3980
+         3980        3295        3332        3976        3295        3977
+         3295        3980        3977        3332        3978        3981
+         3332        3984        3982        3978        3332        3979
+         3332        3982        3979        3984        3332        3983
+         3983        3367        3987        3367        3983        3332
+         3403        3994        3991        3990        3403        3991
+         3989        3403        3990        3403        3989        3367
+         3367        3989        3988        3367        3988        3986
+         3987        3367        3985        3367        3986        3985
+         3403        3993        3994        3437        3997        3996
+         3437        3998        3997        3992        3993        3403
+         3437        3996        3995        3403        3437        3992
+         3437        3995        3992        3472        4005        4004
+         4001        3472        4004        3472        4001        3437
+         3437        4001        4000        3998        3437        3999
+         3437        4000        3999        3472        3936        4005
+         4002        3472        4003        3472        4002        3936
+         4003        3472        2080        4003        2080        3935
+         3935        2080        3876        2080        3877        3876
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           1           1           1           1
+            1           1           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           2           2           2           2
+            2           2           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3           3           3           3           3
+            3           3
diff -r 000000000000 -r 5eda1a3f24e8 source/test/emb_bdry/eleven/bn-test-11-2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/emb_bdry/eleven/bn-test-11-2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,103 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI embedded boundary ELEVEN example 
+ *
+ ************************************************************************/
+
+Main {
+
+   log_file_name            = "bn2d-11-test.log"
+
+   visit_dump_interval        = 1      
+   visit_dump_dirname         = "viz_11-2dbntest"
+
+   print_boundarynode_data    = TRUE
+}
+
+EmbeddedBoundaryGeometry {
+   max_subdivides             = 6
+   read_from_file             = FALSE
+   write_to_file              = FALSE
+   dirname                    = "simple"
+   use_recursive_algs         = FALSE
+   compute_areas_and_normal   = FALSE
+   compute_boundary_node_data = FALSE
+
+   ElevenPatchInterface {
+        use_boundary_node     = TRUE
+	//database_file = "freeform.gzxml"
+	database_file = "circle_r.3.gzxml"
+	//geom_tolerance = 0.01 // 1% of bounding box 
+    }
+
+}
+
+SampleApp {
+   tag_cut_cells = TRUE
+   tag_growing_sphere = FALSE
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0) , (39,39) ]   // coarse mesh
+   x_lo          = -1.e0 , -1.e0  // lower end of computational domain.
+   x_up          = 1.e0 , 1.e0  // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 3 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 
+      level_2               = 4 , 4 
+      level_3               = 4 , 4 
+   }
+
+   largest_patch_size {
+      level_0 = 200 , 200
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize{
+   tagging_method = "GRADIENT_DETECTOR"
+//   tagging_method = "REFINE_BOXES"
+//   RefineBoxes {
+//      level_0  = [ (10,10) , (80,80) ]
+//   }
+}
+
+TimerManager {
+   timer_list = "apps::main::*"
+}
+
+
+UniformLoadBalance {  // for SAMRAI v1.3.1
+//   processors         = 1 , 1
+   use_spatial_bin_pack = TRUE
+}
+LoadBalancer {  // for SAMRAI v1.3.2
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/emb_bdry/eleven/circle_r.3.gzxml
Binary file source/test/emb_bdry/eleven/circle_r.3.gzxml has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/emb_bdry/eleven/freeform.gzxml
Binary file source/test/emb_bdry/eleven/freeform.gzxml has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/emb_bdry/eleven/polygon.gzxml
Binary file source/test/emb_bdry/eleven/polygon.gzxml has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/emb_bdry/fortran2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/emb_bdry/fortran2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,69 @@
+define(NDIM,2)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+c***********************************************************************
+c***********************************************************************
+c  subroutine tagcells
+c
+c  inputs:
+c     ifirst0, ilast0 - patch extents in 0 (X)
+c     ifirst1, ilast1 - patch extents in 1 (Y)
+c     fgh0,fgh1       - ghosts for flag array
+c     tgh0,tgh1       - ghosts for tag array
+c     settagval       - value in flag array that sets the tag
+c     tag_value       - tag value assigned in tags array
+c     flag[nx,ny]     - flag array
+c
+c  output:
+c     tags[nx,ny]     - tag array
+c     
+c***********************************************************************
+      subroutine tagCells(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  fgh0,fgh1,
+     &  tgh0,tgh1,
+     &  settagval,
+     &  tagval,
+     &  flag,
+     &  tags) 
+c***********************************************************************
+      implicit none
+c***********************************************************************
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer fgh0,fgh1,tgh0,tgh1
+      integer settagval, tagval
+c input arrays:
+      integer
+     &  flag(CELL2dVECG(ifirst,ilast,fgh))
+
+c output arrays:
+      integer
+     &  tags(CELL2dVECG(ifirst,ilast,tgh))
+
+c
+c***********************************************************************
+c
+      integer i,j,ii,jj
+
+c
+c  Loop over elements
+c
+      do j = ifirst1, ilast1
+        do i = ifirst0, ilast0
+
+           if (flag(i,j).eq.settagval) then
+              do jj = j-1, j+1
+                 do ii = i-1, i+1
+                    if ((ii.ge.ifirst0).and.(ii.le.ilast0)) then
+                      if ((jj.ge.ifirst1).and.(jj.le.ilast1)) then
+                         tags(ii,jj) = tagval
+                      endif
+                    endif
+                 end do
+              end do
+           endif
+        end do
+      end do
+c
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/emb_bdry/fortran3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/emb_bdry/fortran3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,76 @@
+define(NDIM,3)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+c***********************************************************************
+c***********************************************************************
+c  subroutine tagcells
+c
+c  inputs:
+c     ifirst0, ilast0 - patch extents in 0 (X)
+c     ifirst1, ilast1 - patch extents in 1 (Y)
+c     ifirst2, ilast2 - patch extents in 2 (Z)
+c     fgh0,fgh1,fgh2  - ghosts for flag array
+c     tgh0,tgh1,tgh2  - ghosts for tag array
+c     settagval       - value in flag array that sets the tag
+c     tag_value       - tag value assigned in tags array
+c     flag            - flag array
+c
+c  output:
+c     tags            - tag array
+c     
+c***********************************************************************
+      subroutine tagCells(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  fgh0,fgh1,fgh2,
+     &  tgh0,tgh1,tgh2,
+     &  settagval,
+     &  tagval,
+     &  flag,
+     &  tags) 
+c***********************************************************************
+      implicit none
+c***********************************************************************
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer fgh0,fgh1,fgh2,tgh0,tgh1,tgh2
+      integer settagval, tagval
+c input arrays:
+      integer
+     &  flag(CELL3dVECG(ifirst,ilast,fgh))
+
+c output arrays:
+      integer
+     &  tags(CELL3dVECG(ifirst,ilast,tgh))
+
+c
+c***********************************************************************
+c
+      integer i,j,k,ii,jj,kk
+
+c
+c  Loop over elements
+c
+      do k = ifirst2, ilast2
+        do j = ifirst1, ilast1
+          do i = ifirst0, ilast0
+
+            if (flag(i,j,k).eq.settagval) then
+              do kk = k-1, k+1
+                do jj = j-1, j+1
+                  do ii = i-1, i+1
+                    if ((ii.ge.ifirst0).and.(ii.le.ilast0)) then
+                      if ((jj.ge.ifirst1).and.(jj.le.ilast1)) then
+                        if ((kk.ge.ifirst2).and.(kk.le.ilast2)) then
+                         tags(ii,jj,kk) = tagval
+                        endif
+                      endif
+                    endif
+                  end do
+                end do
+              end do
+            endif
+          end do
+        end do
+      end do
+c
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/emb_bdry/main.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/emb_bdry/main.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,499 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program to test index data operations 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+// Application classes
+#include "SAMRAI/appu/EmbeddedBoundaryGeometry.h"
+#include "SampleApp.h"
+
+// SAMRAI classes
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/mesh/BergerRigoutsos.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "SAMRAI/mesh/GriddingAlgorithm.h"
+#include "SAMRAI/pdat/IndexData.h"
+#include "SAMRAI/pdat/IndexVariable.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/mesh/TreeLoadBalancer.h"
+#include "SAMRAI/hier/ProcessorMapping.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/mesh/StandardTagAndInitStrategy.h"
+#include "SAMRAI/mesh/StandardTagAndInitialize.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/appu/VisItDataWriter.h"
+
+//#undef RECORD_STATS
+#define RECORD_STATS
+
+#ifdef RECORD_STATS
+#include "SAMRAI/tbox/Statistician.h"
+#include "SAMRAI/tbox/Statistic.h"
+#endif
+
+using namespace SAMRAI;
+using namespace tbox;
+using namespace geom;
+using namespace appu;
+using namespace mesh;
+
+int main(
+   int argc,
+   char* argv[]) {
+
+   int num_fails = 0;
+
+   /*
+    * Initialize MPI and SAMRAI, enable logging, and process command line.
+    */
+
+   SAMRAI_MPI::init(&argc, &argv);
+   SAMRAIManager::initialize();
+   SAMRAIManager::startup();
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+      const tbox::Dimension dim(NDIM);
+
+      PIO::logAllNodes("ebgeom.log");
+
+      string input_filename;
+      string restart_read_dirname;
+      int restore_num = 0;
+
+      bool is_from_restart = false;
+
+      if ((argc != 2) && (argc != 4)) {
+         pout << "USAGE:  " << argv[0] << " <input filename> "
+                                       <<
+         "<restart dir> <restore number> [options]\n"
+                                       << "  options:\n"
+                                       << "  none at this time"
+                                       << endl;
+         SAMRAI_MPI::abort();
+         return -1;
+      } else {
+         input_filename = argv[1];
+         if (argc == 4) {
+            restart_read_dirname = argv[2];
+            restore_num = atoi(argv[3]);
+
+            is_from_restart = true;
+         }
+      }
+
+      plog << "input_filename = " << input_filename << endl;
+      plog << "restart_read_dirname = " << restart_read_dirname << endl;
+      plog << "restore_num = " << restore_num << endl;
+
+      /****************************************************************
+      *                                                              *
+      *  PROBLEM SETUP                                               *
+      *                                                              *
+      ****************************************************************
+      *                                                              *
+      *  Read data from input file and initialize SAMRAI classes     *
+      *                                                              *
+      ****************************************************************/
+
+      /*
+       * Create input database and parse all data in input file.
+       */
+
+      Pointer<Database> input_db = new InputDatabase("input_db");
+      InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      /*
+       * Retrieve "Main" section of the input database.
+       */
+
+      Pointer<Database> main_db = input_db->getDatabase("Main");
+
+      double time = 0.;
+      if (main_db->keyExists("time")) {
+         time = main_db->getDouble("time");
+      }
+      double dt = 0.;
+      if (main_db->keyExists("dt")) {
+         dt = main_db->getDouble("dt");
+      }
+      int nsteps = 0;
+      if (main_db->keyExists("nsteps")) {
+         nsteps = main_db->getInteger("nsteps");
+      }
+
+      int tag_buffer = 0;
+      if (main_db->keyExists("tag_buffer")) {
+         tag_buffer = main_db->getInteger("tag_buffer");
+      }
+
+      bool print_boundarynode_data = false;
+      if (main_db->keyExists("print_boundarynode_data")) {
+         print_boundarynode_data = main_db->getBool("print_boundarynode_data");
+      }
+
+      int visit_dump_interval = 0;
+      if (main_db->keyExists("visit_dump_interval")) {
+         visit_dump_interval = main_db->getInteger("visit_dump_interval");
+      }
+      string visit_dump_dirname;
+      int visit_number_procs_per_file = 1;
+      if (visit_dump_interval > 0) {
+         if (main_db->keyExists("visit_dump_dirname")) {
+            visit_dump_dirname = main_db->getString("visit_dump_dirname");
+         }
+         if (main_db->keyExists("visit_number_procs_per_file")) {
+            visit_number_procs_per_file =
+               main_db->getInteger("visit_number_procs_per_file");
+         }
+      }
+
+#if (TESTING == 1)
+      bool check_result = false;
+      double correct_volume = 0.;
+      if (main_db->keyExists("AutoTesting")) {
+         check_result = true;
+         Pointer<Database> test_db = main_db->getDatabase("AutoTesting");
+         correct_volume = test_db->getDouble("correct_volume");
+      }
+#endif
+
+      TimerManager::createManager(input_db->getDatabase("TimerManager"));
+
+#ifdef RECORD_STATS
+      tbox::Statistician* statistician = tbox::Statistician::createStatistician();
+#endif
+
+      /*
+       * The grid geometry defines the grid type (e.g. cartesian, spherical,
+       * etc.).  Because SAMRAI operates on block structured indices, it can
+       * support any grid geometry that may be represented as an orthogonal
+       * grid.
+       */
+      Pointer<CartesianGridGeometry> grid_geometry =
+         new CartesianGridGeometry("CartesianGeometry",
+            input_db->getDatabase("CartesianGeometry"));
+
+      /*
+       * The patch hierarchy defines the adaptive grid system.
+       */
+      Pointer<PatchHierarchy> patch_hierarchy =
+         new PatchHierarchy("PatchHierarchy", grid_geometry);
+
+      /*
+       * Set up Visualization writer.
+       */
+      Pointer<VisItDataWriter> visit_data_writer =
+         new VisItDataWriter("EBGeom VisIt Writer",
+            visit_dump_dirname,
+            visit_number_procs_per_file);
+
+      IntVector<NDIM> ghosts(1);
+      Pointer<EmbeddedBoundaryGeometry> eb_geom =
+         new EmbeddedBoundaryGeometry("EmbeddedBoundaryGeometry",
+            input_db->getDatabase("EmbeddedBoundaryGeometry"),
+            grid_geometry,
+            ghosts);
+      /*
+       * Dummy problem class, intended to mimic a real application
+       * that would use an EmbeddedBoundaryGeometry.
+       */
+      SampleApp* app_model = new SampleApp("SampleApp",
+            input_db->getDatabase("SampleApp"),
+            grid_geometry,
+            eb_geom,
+            visit_data_writer);
+
+      /*
+       * The StandardTagAndInitialize class performs a variety of operations
+       * with user-specified parameters related to adptive gridding.  For example,
+       * it manages initialization of a level, cell tagging using a gradient
+       * detector, and methods to reset data after the hierarchy has been
+       * regridded.
+       */
+      Pointer<StandardTagAndInitialize> tag_and_init_ops =
+         new StandardTagAndInitialize(
+            "StandardTagAndInitialize",
+            app_model,
+            input_db->getDatabase("StandardTagAndInitialize"));
+
+      /*
+       * The gridding algorithm manages adaptive gridding.  It expects a
+       * clustering scheme (i.e. how to cluster tagged-cells into patches),
+       * and a load balance scheme to distribute work to processors.  In general
+       * the baseline classes provided in SAMRAI should suffice for most
+       * problems. It also requires a class that defines the particular tag
+       * and initialization ops that correlate with the users problem.  For
+       * this, we use the "tag_and_init_ops" above, which references our
+       * "dummy_app" problem class to define the user-specific operations.
+       */
+      Pointer<BergerRigoutsos> box_generator = new BergerRigoutsos();
+
+      Pointer<TreeLoadBalancer> load_balancer =
+         new TreeLoadBalancer(dim, "LoadBalancer",
+            input_db->getDatabase("LoadBalancer"));
+      load_balancer->setSAMRAI_MPI(tbox::SAMRAI_MPI::getCommunicator());
+
+#ifdef USE_NONUNIFORM_LB
+      // set the workload factor in the load balancer
+      int weight_id = app_model->getWorkloadIndex();
+      load_balancer->setWorkloadPatchDataIndex(weight_id);
+#endif
+
+      Pointer<GriddingAlgorithm> gridding_algorithm =
+         new GriddingAlgorithm(
+            dim,
+            "GriddingAlgorithm",
+            input_db->getDatabase("GriddingAlgorithm"),
+            tag_and_init_ops,
+            box_generator,
+            load_balancer);
+
+/*
+ ************************************************************************
+ *
+ * Build hierarchy, and build embedded boundary on each level.
+ *
+ ************************************************************************
+ */
+
+      /*
+       * Create timers.
+       */
+      Pointer<Timer> t_create_eb = TimerManager::getManager()->
+         getTimer("apps::main::create_eb");
+      Pointer<Timer> t_write_viz = TimerManager::getManager()->
+         getTimer("apps::main::write_viz");
+      Pointer<Timer> t_init_lev = TimerManager::getManager()->
+         getTimer("apps::main::init_lev");
+      Pointer<Timer> t_regrid = TimerManager::getManager()->
+         getTimer("apps::main::regrid");
+
+      /*
+       * Set parameters in the embedded boundary geometry object.
+       */
+      eb_geom->registerVisItDataWriter(visit_data_writer);
+
+      /*
+       * Build embedded boundary on coarsest level
+       */
+      gridding_algorithm->makeCoarsestLevel(patch_hierarchy, time);
+      Pointer<PatchLevel> coarse_level = patch_hierarchy->getPatchLevel(0);
+
+      t_create_eb->start();
+      eb_geom->buildEmbeddedBoundaryOnLevel(coarse_level);
+      //app_model->printBoundaryNodeData(coarse_level, eb_geom);
+      t_create_eb->stop();
+
+#ifdef USE_NONUNIFORM_LB
+      // set weights of cut cells
+      for (PatchLevel::Iterator ip(coarse_level); ip; ip++) {
+         Pointer<Patch> patch = coarse_level->getPatch(ip());
+         app_model->setWeightOnPatch(patch,
+            time,
+            true);
+      }
+#endif
+
+      /*
+       * Build embedded boundary on finer levels
+       */
+      bool done = false;
+      bool initial_time = true;
+      int init_tag_buffer = tag_buffer;
+      int ln;
+      for (ln = 0; gridding_algorithm->levelCanBeRefined(ln) && !done;
+           ln++) {
+         gridding_algorithm->makeFinerLevel(patch_hierarchy,
+            time,
+            initial_time,
+            init_tag_buffer);
+
+         if (patch_hierarchy->finerLevelExists(ln)) {
+            Pointer<PatchLevel> fine_level = patch_hierarchy->getPatchLevel(
+                  ln + 1);
+            t_create_eb->start();
+            eb_geom->buildEmbeddedBoundaryOnLevel(fine_level, patch_hierarchy);
+            t_create_eb->stop();
+
+#ifdef USE_NONUNIFORM_LB
+            // set weights of cut cells
+            for (PatchLevel::Iterator ip(fine_level); ip; ip++) {
+               Pointer<Patch> patch = fine_level->getPatch(ip());
+               app_model->setWeightOnPatch(patch,
+                  time,
+                  initial_time);
+            }
+#endif
+
+            if (print_boundarynode_data) {
+               app_model->printBoundaryNodeData(fine_level, eb_geom);
+            }
+
+         }
+
+         done = !(patch_hierarchy->finerLevelExists(ln));
+      }
+
+      pout.precision(12);
+      for (ln = 0; ln < patch_hierarchy->getNumberOfLevels(); ln++) {
+         Pointer<PatchLevel> level = patch_hierarchy->getPatchLevel(ln);
+         double total_vol = eb_geom->computeTotalVolumeOnLevel(level);
+
+#if (TESTING == 1)
+         if (check_result) {
+            if (!(tbox::MathUtilities<double>::equalEps(total_vol,
+                     correct_volume))) {
+               pout << "emb_bdry: Volume Test FAILED"
+                    << "\n\tcomputed: " << total_vol
+                    << "\n\tcorrect:  " << correct_volume << endl;
+            }
+            ++num_fails;
+         }
+#else
+         pout << "Level: " << ln << "\tTotal Volume: " << total_vol << endl;
+#endif
+
+      }
+
+      if (visit_dump_interval > 0) {
+         t_write_viz->start();
+         visit_data_writer->writePlotData(patch_hierarchy, 0, time);
+         t_write_viz->stop();
+      }
+
+      /*****************************************************************
+       *
+       * Re-generate grids (if desired)
+       *
+       ****************************************************************/
+      int nlevels = patch_hierarchy->getNumberOfLevels();
+      Array<int> regrid_tag_buffer(nlevels);
+      for (ln = 0; ln < nlevels; ln++) {
+         regrid_tag_buffer[ln] = tag_buffer;
+      }
+
+      for (int nstep = 1; nstep < nsteps; nstep++) {
+         time = time + dt;
+
+         /*
+          * Tag data on coarsest level
+          */
+         Pointer<PatchLevel> coarsest_level =
+            patch_hierarchy->getPatchLevel(0);
+         t_init_lev->start();
+         app_model->initializeLevelData(patch_hierarchy,
+            0,
+            time,
+            true,
+            false,
+            coarsest_level,
+            false);
+         t_init_lev->stop();
+
+         /*
+          * Regrid
+          */
+         pout << "\n\n############################################" << endl;
+         pout << "              REGRIDDING STEP: " << nstep << endl;
+         t_regrid->start();
+         gridding_algorithm->regridAllFinerLevels(patch_hierarchy,
+            0,
+            time,
+            regrid_tag_buffer);
+         t_regrid->stop();
+         pout << "############################################\n\n" << endl;
+
+         /*
+          * Reset EB on all levels
+          */
+         for (ln = 0; ln < nlevels; ln++) {
+            Pointer<PatchLevel> level = patch_hierarchy->getPatchLevel(ln);
+            t_create_eb->start();
+            eb_geom->buildEmbeddedBoundaryOnLevel(level);
+            t_create_eb->stop();
+
+#ifdef USE_NONUNIFORM_LB
+            // set weights of cut cells
+            for (PatchLevel::Iterator ip(level); ip; ip++) {
+               Pointer<Patch> patch = level->getPatch(ip());
+               app_model->setWeightOnPatch(patch,
+                  time,
+                  false);
+            }
+#endif
+
+         }
+
+         pout.precision(12);
+         for (ln = 0; ln < patch_hierarchy->getNumberOfLevels(); ln++) {
+            Pointer<PatchLevel> level = patch_hierarchy->getPatchLevel(ln);
+            double total_vol = eb_geom->computeTotalVolumeOnLevel(level);
+            pout << "Level: " << ln << "\tTotal Volume: " << total_vol << endl;
+         }
+
+         t_write_viz->start();
+         visit_data_writer->writePlotData(patch_hierarchy, nstep, time);
+         t_write_viz->stop();
+
+      } // loop over nsteps
+
+      /*
+       * Output timer results.
+       */
+#if (TESTING != 1)
+      TimerManager::getManager()->print(pout);
+#endif
+
+#ifdef RECORD_STATS
+      statistician->finalize();
+      statistician->printAllSummedGlobalStatData("stats.txt");
+//   statistician->finalize();
+      statistician->printSpreadSheetOutput("stats");
+#endif
+
+      grid_geometry.setNull();
+      patch_hierarchy.setNull();
+      eb_geom.setNull();
+
+      if (app_model) delete app_model;
+
+#if (TESTING == 1)
+      if (num_fails == 0) {
+         tbox::pout << "\nPASSED:  Embedded Boundary" << endl;
+      }
+#endif
+
+   }
+
+   SAMRAIManager::shutdown();
+   SAMRAIManager::finalize();
+   SAMRAI_MPI::finalize();
+
+   return num_fails;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/emb_bdry/test_inputs/bn.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/emb_bdry/test_inputs/bn.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,114 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI embedded boundary test 
+ *
+ ************************************************************************/
+
+Main {
+
+   log_file_name            = "bn-test-2d.log"
+
+   visit_dump_interval        = 1      
+   visit_dump_dirname         = "viz_bn-test-2d"
+
+}
+
+SampleApp {
+  tag_cut_cells        = TRUE
+}
+
+EmbeddedBoundaryGeometry {
+
+   verbose = FALSE
+
+// set max_subdivides larger to reduce error in volume and
+// area fractions in cut cells
+   max_subdivides = 6
+
+   read_from_file  = FALSE
+   write_to_file   = FALSE
+   dirname        = "simple"
+
+   use_recursive_algs = FALSE
+   compute_areas_and_normal = TRUE 
+   compute_boundary_node_data = TRUE 
+
+   Shapes {
+      Shape1 {
+         type = "POLYGON"
+         vertices {
+            v1 = 1.0001 , 1.0001
+            v2 = 3.9999 , 1.0001
+            v3 = 3.9999 , 3.9999
+            v4 = 1.0001 , 3.9999
+         }
+      }
+   }
+
+
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0) , (49,49) ]   // coarse mesh
+   x_lo          = 0.e0 , 0.e0  // lower end of computational domain.
+   x_up          = 5.e0 , 5.e0  // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 3 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 
+      level_2               = 2 , 2 
+      level_3               = 2 , 2 
+   }
+
+   largest_patch_size {
+      level_0 = 19 , 19 
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize{
+   tagging_method = "GRADIENT_DETECTOR"
+//   tagging_method = "REFINE_BOXES"
+//   RefineBoxes {
+//      level_0  = [ (10,10) , (80,80) ]
+//   }
+}
+
+TimerManager {
+   timer_list = "apps::main::*"
+}
+
+
+UniformLoadBalance {  // for SAMRAI v1.3.1
+//   processors         = 1 , 1
+   use_spatial_bin_pack = TRUE
+}
+LoadBalancer {  // for SAMRAI v1.3.2
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/emb_bdry/test_inputs/poly.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/emb_bdry/test_inputs/poly.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,152 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI embedded boundary test 
+ *
+ ************************************************************************/
+
+Main {
+
+   log_file_name            = "two-polys-2d.log"
+
+   visit_dump_interval        = 1      
+   visit_dump_dirname         = "viz_two-polys-2d"
+
+}
+
+SampleApp {
+  tag_cut_cells        = TRUE
+}
+
+
+EmbeddedBoundaryGeometry {
+
+      verbose = FALSE
+
+// set max_subdivides larger to reduce error in volume and 
+// area fractions in cut cells 
+      max_subdivides = 2
+
+      read_from_file  = FALSE 
+      write_to_file   = FALSE
+      dirname        = "simple"
+
+      compute_areas_and_normal = TRUE
+      compute_boundary_node_data = FALSE
+      use_recursive_algs       = TRUE
+
+
+// Set the shapes used - note: each sub-database should be named
+// something different because the input_manager is unable to
+// store two databases of the same name.  The name can be arbitrary.
+// Input should be of the form:
+   Shapes {
+      Shape1 {
+         type = "POLYGON"    
+
+            vertices {
+
+               // v1 = 1.5 , 1.2 
+               // v2 = 2.0 , 1.0 
+               // v3 = 2.5 , 2.5 
+               // v4 = 1.0 , 2.0 
+
+               // v1 = 1.0 , 1.0
+               // v2 = 2.0 , 1.0 
+               // v3 = 2.0 , 2.0 
+               // v4 = 1.5 , 2.5
+               // v5 = 1.0 , 2.0 
+
+               v1 = 1.0 , 1.0
+               v2 = 1.5 , .5 
+               v3 = 2.0 , 1.75 
+               v4 = 1.5 , 4.5
+               v5 = .5 , 2.0 
+            } 
+
+      }
+
+      Shape2 {
+         type = "POLYGON"    
+
+            vertices {
+               v1 = 3.0 , 3.0
+               v2 = 3.5 , 2.5 
+               v3 = 4.0 , 3.75 
+               v4 = 3.5 , 4.5
+               v5 = 2.5 , 4.0 
+
+
+            } 
+
+      }
+
+
+
+   }
+
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0) , (99,99) ]   // coarse mesh
+   x_lo          = 0.e0 , 0.e0  // lower end of computational domain.
+   x_up          = 5.e0 , 5.e0  // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 3 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 
+      level_2               = 2 , 2 
+      level_3               = 2 , 2 
+   }
+
+   largest_patch_size {
+      level_0 = 19 , 19 
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize{
+   tagging_method = "GRADIENT_DETECTOR"
+//   tagging_method = "REFINE_BOXES"
+//   RefineBoxes {
+//      level_0  = [ (10,10) , (80,80) ]
+//   }
+}
+
+TimerManager {
+   timer_list = "apps::main::*"
+}
+
+
+UniformLoadBalance {  // for SAMRAI v1.3.1
+//   processors         = 1 , 1
+   use_spatial_bin_pack = TRUE
+}
+LoadBalancer {  // for SAMRAI v1.3.2
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/emb_bdry/test_inputs/two_spheres.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/emb_bdry/test_inputs/two_spheres.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI embedded boundary test 
+ *
+ ************************************************************************/
+
+Main {
+
+   log_file_name            = "two-spheres-2d.log"
+
+   visit_dump_interval        = 1      
+   visit_dump_dirname         = "viz_two-spheres-2d"
+
+}
+
+SampleApp {
+  tag_cut_cells        = TRUE 
+}
+
+EmbeddedBoundaryGeometry {
+
+      verbose = FALSE
+
+// set max_subdivides larger to reduce error in volume and 
+// area fractions in cut cells 
+      max_subdivides = 8
+
+      read_from_file  = FALSE 
+      write_to_file   = FALSE
+      dirname        = "simple"
+
+      compute_areas_and_normal = TRUE
+      compute_boundary_node_data = FALSE
+      use_recursive_algs       = TRUE 
+
+// Set the shapes used - note: each sub-database should be named
+// something different because the input_manager is unable to
+// store two databases of the same name.  The name can be arbitrary.
+// Input should be of the form:
+   Shapes {
+      Shape1 {
+         type = "SPHERE"    
+         center = 35., 50.
+         radius = 20.     
+      }
+      Shape2 {
+         type = "SPHERE"    
+         center = 65., 50.
+         radius = 20.     
+      }
+   }
+
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0) , (99,99) ]   // coarse mesh
+   x_lo          = 0.e0 , 0.e0  // lower end of computational domain.
+   x_up          = 100.e0 , 100.e0  // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 5 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 
+      level_2               = 2 , 2 
+      level_3               = 2 , 2 
+      level_4               = 2 , 2 
+      level_5               = 2 , 2 
+   }
+
+   largest_patch_size {
+      level_0 = 19 , 19 
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 
+      // all finer levels will use same values as level_0...
+   }
+
+}
+                                       // boxes < efficiency * vol of large box
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize{
+   tagging_method = "GRADIENT_DETECTOR"
+//   tagging_method = "REFINE_BOXES"
+//   RefineBoxes {
+//      level_0  = [ (10,10) , (80,80) ]
+//   }
+}
+
+TimerManager {
+   timer_list = "apps::main::*"
+}
+
+
+UniformLoadBalance {  // for SAMRAI v1.3.1
+//   processors         = 1 , 1
+   use_spatial_bin_pack = TRUE
+}
+LoadBalancer {  // for SAMRAI v1.3.2
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/emb_bdry/test_inputs/vol.2d.input.notworking
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/emb_bdry/test_inputs/vol.2d.input.notworking	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,114 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI embedded boundary test program
+ *
+ ************************************************************************/
+
+Main {
+
+   log_file_name            = "vol-test-2d.log"
+
+   visit_dump_interval        = 1      
+   visit_dump_dirname         = "viz_vol-test-2d"
+
+   AutoTesting {
+      correct_volume = 3638.28036499
+   }
+
+}
+
+SampleApp {
+  tag_cut_cells        = TRUE
+}
+
+EmbeddedBoundaryGeometry {
+
+      verbose = FALSE
+
+// set max_subdivides larger to reduce error in volume and 
+// area fractions in cut cells 
+      max_subdivides = 8
+
+      read_from_file  = FALSE 
+      write_to_file   = FALSE
+      dirname        = "simple"
+
+      compute_areas_and_normal = TRUE 
+      compute_boundary_node_data = FALSE
+      use_recursive_algs       = FALSE 
+
+// Set the shapes used - note: each sub-database should be named
+// something different because the input_manager is unable to
+// store two databases of the same name.  The name can be arbitrary.
+// Input should be of the form:
+   Shapes {
+      Shape1 {
+         type = "SPHERE"    
+         center = 50., 50.
+         radius = 45.     
+      }
+   }
+
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0) , (99,99) ]   // coarse mesh
+   x_lo          = 0.e0 , 0.e0  // lower end of computational domain.
+   x_up          = 100.e0 , 100.e0  // upper end of computational domain.
+}
+
+GriddingAlgorithm {
+   max_levels              = 1 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 
+      level_2               = 2 , 2 
+      level_3               = 2 , 2 
+   }
+
+   largest_patch_size {
+      level_0 = 19 , 19 
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 
+      // all finer levels will use same values as level_0...
+   }
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize{
+   tagging_method = "GRADIENT_DETECTOR"
+//   tagging_method = "REFINE_BOXES"
+//   RefineBoxes {
+//      level_0  = [ (10,10) , (80,80) ]
+//   }
+}
+
+TimerManager {
+   timer_list = "apps::main::*"
+}
+
+
+UniformLoadBalance {  // for SAMRAI v1.3.1
+//   processors         = 1 , 1
+   use_spatial_bin_pack = TRUE
+}
+LoadBalancer {  // for SAMRAI v1.3.2
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/emb_bdry/test_inputs/vol.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/emb_bdry/test_inputs/vol.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,114 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI embedded boundary test program 
+ *
+ ************************************************************************/
+
+Main {
+
+   log_file_name            = "vol-test-3d.log"
+
+   visit_dump_interval        = 1      
+   visit_dump_dirname         = "viz_vol-test-3d"
+
+}
+
+SampleApp {
+  tag_cut_cells        = TRUE
+}
+
+
+EmbeddedBoundaryGeometry {
+
+      verbose = FALSE
+
+// set max_subdivides larger to reduce error in volume and 
+// area fractions in cut cells 
+      max_subdivides = 3
+
+      read_from_file  = FALSE 
+      write_to_file   = FALSE
+      dirname        = "simple"
+
+      compute_areas_and_normal = TRUE 
+      compute_boundary_node_data = FALSE
+      use_recursive_algs       = FALSE
+
+// Set the shapes used - note: each sub-database should be named
+// something different because the input_manager is unable to
+// store two databases of the same name.  The name can be arbitrary.
+// Input should be of the form:
+   Shapes {
+      Shape1 {
+         type = "SPHERE"    
+         center = 50. , 50. , 50.
+         radius = 45.     
+      }
+   }
+
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (49,49,49) ]   // coarse mesh
+   x_lo          = 0.e0 , 0.e0 , 0.e0 // lower end of computational domain.
+   x_up          = 100.e0 , 100.e0 , 100.e0 // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 1 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 , 2
+      level_2               = 2 , 2 , 2
+      level_3               = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 19 , 19 , 19
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 , 1
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize{
+   tagging_method = "GRADIENT_DETECTOR"
+//   tagging_method = "REFINE_BOXES"
+//   RefineBoxes {
+//      level_0  = [ (10,10) , (80,80) ]
+//   }
+}
+
+TimerManager {
+   timer_list = "apps::main::*"
+}
+
+
+UniformLoadBalance {  // for SAMRAI v1.3.1
+//   processors         = 1 , 1
+   use_spatial_bin_pack = TRUE
+}
+LoadBalancer {  // for SAMRAI v1.3.2
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/fill_pattern/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/fill_pattern/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,238 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=main-fill-pattern.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/SkeletonGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/OverlapConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FirstLayerCellNoCornersVariableFillPattern.h\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FirstLayerCellVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SecondLayerNodeNoCornersVariableFillPattern.h\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SecondLayerNodeVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	main-fill-pattern.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/fill_pattern/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/fill_pattern/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,56 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for the fill_pattern tests 
+##
+#########################################################################
+
+SAMRAI	      =	@top_srcdir@
+SRCDIR	      =	@srcdir@
+SUBDIR        = source/test/fill_pattern
+VPATH	      =	@srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+CPPFLAGS_EXTRA  = -DDISPLAY -DTESTING=1
+
+default: check
+
+include $(OBJECT)/config/Makefile.config
+
+NUM_TESTS = 1
+
+TEST_NPROCS = @TEST_NPROCS@
+
+CXX_OBJS = main-fill-pattern.o
+
+main:	$(CXX_OBJS) $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) \
+	$(LIBSAMRAI) $(LDLIBS) -o $@
+
+
+check:		main
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main
+
+check2d:
+	$(MAKE) check
+
+check3d:
+	$(MAKE) check
+
+checkcompile: main
+
+checktest:
+		rm -f makecheck.logfile
+		$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+		$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+		rm -f makecheck.logfile
+
+clean: 
+		$(SAMCLEAN)
+		$(RM) main
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/test/fill_pattern/main-fill-pattern.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/fill_pattern/main-fill-pattern.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1555 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   $LastChangedDate 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/geom/SkeletonGridGeometry.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "SAMRAI/pdat/FirstLayerCellVariableFillPattern.h"
+#include "SAMRAI/pdat/FirstLayerCellNoCornersVariableFillPattern.h"
+#include "SAMRAI/pdat/SecondLayerNodeVariableFillPattern.h"
+#include "SAMRAI/pdat/SecondLayerNodeNoCornersVariableFillPattern.h"
+#include "SAMRAI/xfer/RefineAlgorithm.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/OverlapConnectorAlgorithm.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+
+#include <cstring>
+#include <stdlib.h>
+
+using namespace std;
+using namespace SAMRAI;
+
+/*
+ *
+ * Test program to test VariableFillPattern implementations
+ *
+ */
+
+void txt2boxes(
+   const char* txt,
+   hier::BoxArray& boxes)
+{
+   // algorithm:
+   // find width
+   // find height
+   // find x locations in i,j
+   // foreach x1 in x:
+   //   find x' where i>i1, j>j1
+   //     foreach x2 in x':
+   //       if 4 corners && interior cells blank, (x1,x2) is a box
+   // translate coordinates into cell-centered, lower-left origin based
+
+   int width = -1;
+   for (unsigned int idx = 0; idx < strlen(txt) - 1; idx++) {
+      if (('x' == txt[idx] || '.' == txt[idx]) &&
+          ('.' == txt[idx + 1] || '|' == txt[idx + 1])) {
+         width = idx + 1;
+         break;
+      }
+   }
+   if (-1 == width) {
+      cout << "error in box txt" << endl;
+      exit(1);
+   }
+
+   int height = static_cast<int>(strlen(txt)) / width;
+
+   // Find cell height
+   int cell_height = (height - 1) / 2;
+   int cell_max = cell_height - 1;
+
+   // make vector of x locations
+   vector<pair<int, int> > ix;
+   for (unsigned int idx = 0; idx < strlen(txt); idx++) {
+      if ('x' == txt[idx]) {
+         int j = idx / width;
+         int i = idx - j * width;
+         ix.push_back(pair<int, int>(i, j));
+      }
+   }
+
+   // foreach x1 in x
+   vector<pair<int, int> >::iterator it;
+   for (it = ix.begin(); it != ix.end(); it++) {
+
+      vector<pair<int, int> >::iterator it2;
+
+      // We need to gather all potential boxes rooted here, and then
+      // only take the smallest one.
+
+      vector<hier::Box> boxes_here;
+      boxes_here.clear();
+
+      for (it2 = ix.begin(); it2 != ix.end(); it2++) {
+
+         if (it2->first > it->first &&
+             it2->second > it->second) {
+
+            bool isbox = true;
+
+            // If the two other corners exist, and...
+            int i1 = it->first;
+            int j1 = it2->second;
+            int idx1 = j1 * width + i1;
+            if (txt[idx1] != 'x') isbox = false;
+
+            int i2 = it2->first;
+            int j2 = it->second;
+            int idx2 = j2 * width + i2;
+            if (txt[idx2] != 'x') isbox = false;
+
+            // ...interior cells contain no corners
+            for (int i = it->first + 1; i < it2->first; i++) {
+               for (int j = it->second + 1; j < it2->second; j++) {
+                  int idx = j * width + i;
+                  if ('x' == txt[idx]) isbox = false;
+                  if ('-' == txt[idx]) isbox = false;
+                  if ('|' == txt[idx]) isbox = false;
+               }
+            }
+
+            if (isbox) {
+
+               // Translate indices into node centered coords
+               int i0 = it->first / 4;
+               i1 = it2->first / 4;
+               int j0 = it->second / 2;
+               j1 = it2->second / 2;
+
+               i1--;
+               j1--;
+
+               // Flip coordinates vertically.
+               j0 = cell_max - j0;
+               j1 = cell_max - j1;
+
+               // Lower left uses j1, upper right j0
+               int tmp = j1;
+               j1 = j0;
+               j0 = tmp;
+
+               hier::Box abox(hier::Index(i0, j0),
+                              hier::Index(i1, j1));
+               boxes_here.push_back(abox);
+            }
+         }
+      }
+
+      // Find smallest box at this 'x'
+      if (boxes_here.size()) {
+
+         hier::Box smallest_box(boxes_here[0]);
+
+         for (vector<hier::Box>::iterator itb = boxes_here.begin();
+              itb != boxes_here.end(); itb++) {
+            if ((*itb).numberCells() < smallest_box.numberCells()) {
+               smallest_box = *itb;
+            }
+         }
+
+         boxes.resizeBoxArray(boxes.getNumberOfBoxes() + 1);
+         int bidx = boxes.getNumberOfBoxes() - 1;
+         boxes[bidx] = smallest_box;
+      }
+
+   }
+
+   // Shift all boxes into SAMRAI coordinates
+   for (int idx = 0; idx < boxes.getNumberOfBoxes(); idx++) {
+      boxes[idx].shift(-hier::IntVector(tbox::Dimension(2), 2));
+   }
+}
+
+int txt_width(
+   const char* txt)
+{
+   int width = -1;
+   for (unsigned int idx = 0; idx < strlen(txt) - 1; idx++) {
+      if (('x' == txt[idx] || '.' == txt[idx]) &&
+          ('.' == txt[idx + 1] || '|' == txt[idx + 1])) {
+         width = idx + 1;
+         break;
+      }
+   }
+   if (-1 == width) {
+      cout << "error in box txt" << endl;
+      exit(1);
+   }
+   return width;
+}
+
+bool txt_next_val(
+   const char* txt,
+   int& idx,
+   const hier::PatchData& data,
+   int* datapt,
+   bool is_node)
+{
+   // Find text size
+   int txt_w = txt_width(txt);
+   int txt_h = static_cast<int>(strlen(txt)) / txt_w;
+
+   // Find grid size
+   int grid_height = (txt_h - 1) / 2;
+   int grid_width = (txt_w - 1) / 4;
+   int grid_max = grid_height - 1;
+
+   int cnt_max = 10000; // limit infinite loop possibility
+   int cnt = 0;
+   do {
+
+      //
+      // Translate domain local idx into grid idx
+      //
+
+      //const hier::Box& ghost_box = data.getGhostBox();
+      hier::Box ghost_box(data.getGhostBox().getDim());
+      if (is_node) {
+         ghost_box = pdat::NodeGeometry::toNodeBox(data.getGhostBox());
+      } else {
+         ghost_box = data.getGhostBox();
+      }
+      // Translate domain idx to domain coordinates
+      int domain_i = idx % ghost_box.numberCells(0);
+      int domain_j = idx / ghost_box.numberCells(0);
+
+      tbox::Dimension dim(ghost_box.getDim());
+      hier::Box shifted_box(hier::Box::shift(ghost_box,
+                               hier::IntVector(dim, 2)));
+      // Translate domain coordinates into grid zone coordintes
+      int di = shifted_box.lower() (0);
+      int dj = shifted_box.lower() (1);
+
+      int grid_i = domain_i + di;
+      int grid_j = domain_j + dj;
+
+      // If we outside the grid, there cannot be a value here
+      if (grid_i < 0 || grid_j < 0) {
+         idx++;
+         continue;
+      }
+      if (grid_i > grid_width || grid_j > grid_height) {
+         idx++;
+         continue;
+      }
+      // Translate grid coords to text coordinates.  Text coordinates
+      // have j increasing downwards.
+      int txt_zone_i = grid_i * 4 + 2;
+      int txt_zone_j = (grid_max - grid_j) * 2 + 1;
+
+      int txt_node_i = grid_i * 4;
+      int txt_node_j = (grid_max - grid_j) * 2 + 2;
+
+      // Translate text coordinates to txt idx
+      unsigned int txt_zone_idx = txt_zone_i + txt_zone_j * txt_w;
+      int txt_node_idx = txt_node_i + txt_node_j * txt_w;
+
+      // If we're past the end of the txt, return false
+      if (txt_zone_idx > strlen(txt)) {
+         return false;
+      }
+
+      // Check for non-zero zone data
+      if (' ' != txt[txt_zone_idx]) {
+
+         istringstream valstr(&txt[txt_zone_idx]);
+         valstr >> *datapt;
+         return true;
+      }
+
+      // Check for numeric node data
+      if ('0' == txt[txt_node_idx] ||
+          '1' == txt[txt_node_idx] ||
+          '2' == txt[txt_node_idx] ||
+          '3' == txt[txt_node_idx] ||
+          '4' == txt[txt_node_idx] ||
+          '5' == txt[txt_node_idx] ||
+          '6' == txt[txt_node_idx] ||
+          '7' == txt[txt_node_idx] ||
+          '8' == txt[txt_node_idx] ||
+          '9' == txt[txt_node_idx]) {
+
+         istringstream valstr(&txt[txt_node_idx]);
+         valstr >> *datapt;
+         return true;
+      }
+
+      idx++; // advance to next domain idx
+
+   } while (cnt++ < cnt_max);
+
+   cout << "Data reading loop exceeded maximum iterations"
+        << __LINE__ << " in "
+        << __FILE__ << endl;
+
+   exit(1);
+}
+
+void txt2data(
+   const char* txt,
+   const hier::PatchData& data,
+   int* datptr,
+   bool zero_out,
+   bool is_node)
+{
+   if (zero_out) memset(datptr, 0, data.getGhostBox().size() * sizeof(int));
+
+   int idx = 0;
+   int datapt;
+
+   while (txt_next_val(txt, idx, data, &datapt, is_node)) {
+      datptr[idx++] = datapt;
+   }
+}
+
+/*
+ * Acceptance test cases.  First iteration at an executable
+ * specification of the desired change.
+ */
+
+bool SingleLevelTestCase(
+   const char* levelboxes_txt,
+   const char* initialdata_txt[],
+   const char* finaldata_txt[],
+   tbox::Pointer<hier::Variable> variable,
+   tbox::Pointer<xfer::VariableFillPattern> fill_pattern,
+   tbox::Dimension& dim)
+{
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   const std::string& pattern_name = fill_pattern->getPatternName();
+
+   hier::BoxArray level_boxes(dim);
+   txt2boxes(levelboxes_txt, level_boxes);
+
+   hier::Box domain_box(dim);
+   for (int i = 0; i < level_boxes.getNumberOfBoxes(); i++) {
+      domain_box += level_boxes[i];
+   }
+
+   hier::BoxArray physical_domain(domain_box);
+
+   tbox::Pointer<geom::SkeletonGridGeometry> geom(
+      new geom::SkeletonGridGeometry("GridGeometry", level_boxes));
+
+   tbox::Pointer<hier::PatchHierarchy> hierarchy(new
+                                                 hier::PatchHierarchy("hier",
+                                                    geom));
+
+   hier::MappedBoxLevel mblevel(hier::IntVector(dim, 1));
+
+   const int num_nodes = mpi.getSize();
+   const int num_boxes = level_boxes.size();
+   hier::LocalId local_id(0);
+   tbox::Array<int> local_indices(mpi.getSize(), 0);
+   for (int i = 0; i < num_boxes; ++i) {
+
+      int proc;
+      if (i < num_boxes / num_nodes) {
+         proc = 0;
+      } else {
+         proc = 1;
+      }
+
+      if (proc == mpi.getRank()) {
+         mblevel.addMappedBox(hier::MappedBox(level_boxes[i], local_id, proc));
+         local_id++;
+      }
+
+   }
+
+   int level_no = 0;
+   hierarchy->makeNewPatchLevel(level_no, mblevel);
+
+   tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(0);
+
+   // There is one variable-context pair with a gcw of 2
+
+   xfer::RefineAlgorithm refine_alg(dim);
+
+   tbox::Pointer<hier::VariableContext> context =
+      hier::VariableDatabase::getDatabase()->getContext("CONTEXT");
+
+   hier::IntVector ghost_cell_width(dim, 2);
+
+   int data_id =
+      hier::VariableDatabase::getDatabase()->registerVariableAndContext(
+         variable, context, ghost_cell_width);
+
+   refine_alg.registerRefine(data_id, data_id, data_id,
+      SAMRAI::tbox::Pointer<SAMRAI::xfer::RefineOperator>(NULL),
+      fill_pattern);
+
+   level->allocatePatchData(data_id);
+
+   TBOX_ASSERT(mpi.getSize() <= 2);
+
+   if (pattern_name == "FIRST_LAYER_CELL_NO_CORNERS_FILL_PATTERN" ||
+       pattern_name == "FIRST_LAYER_CELL_FILL_PATTERN") {
+      // Loop over each patch and initialize data
+      for (hier::PatchLevel::Iterator p(level); p; p++) {
+         tbox::Pointer<hier::Patch> patch(*p);
+         tbox::Pointer<pdat::CellData<int> > cdata =
+            patch->getPatchData(data_id);
+
+         int data_txt_id = patch->getMappedBox().getLocalId().getValue();
+         if (mpi.getRank() == 1) {
+            data_txt_id += (num_boxes / num_nodes);
+         }
+
+         txt2data(initialdata_txt[data_txt_id], *cdata,
+            cdata->getPointer(), false, false);
+      }
+   } else if (pattern_name == "SECOND_LAYER_NODE_NO_CORNERS_FILL_PATTERN" ||
+              pattern_name == "SECOND_LAYER_NODE_FILL_PATTERN") {
+      // Loop over each patch and initialize data
+      for (hier::PatchLevel::Iterator p(level); p; p++) {
+         tbox::Pointer<hier::Patch> patch(*p);
+         tbox::Pointer<pdat::NodeData<int> > ndata =
+            patch->getPatchData(data_id);
+
+         int data_txt_id = patch->getMappedBox().getLocalId().getValue();
+         if (mpi.getRank() == 1) {
+            data_txt_id += (num_boxes / num_nodes);
+         }
+
+         txt2data(initialdata_txt[data_txt_id], *ndata,
+            ndata->getPointer(), false, true);
+      }
+   }
+
+   // Cache Connector required for the schedule generation.
+   level->getMappedBoxLevel()->getPersistentOverlapConnectors().
+   findOrCreateConnector(
+      *(level->getMappedBoxLevel()),
+      hier::IntVector(dim, 2));
+
+   // Create and run comm schedule
+   refine_alg.createSchedule(level)->fillData(0.0, false);
+
+   // Check for expected data
+   bool failed = false;
+
+   if (pattern_name == "FIRST_LAYER_CELL_NO_CORNERS_FILL_PATTERN" ||
+       pattern_name == "FIRST_LAYER_CELL_FILL_PATTERN") {
+      for (hier::PatchLevel::Iterator p(level); p; p++) {
+         tbox::Pointer<hier::Patch> patch(*p);
+         tbox::Pointer<pdat::CellData<int> > cdata =
+            patch->getPatchData(data_id);
+
+         pdat::CellData<int> expected(cdata->getBox(),
+                                      cdata->getDepth(),
+                                      ghost_cell_width);
+
+         int data_txt_id = patch->getMappedBox().getLocalId().getValue();
+         if (mpi.getRank() == 1) {
+            data_txt_id += (num_boxes / num_nodes);
+         }
+
+         txt2data(finaldata_txt[data_txt_id],
+            expected, expected.getPointer(), false, false);
+
+         for (pdat::CellData<int>::Iterator ci(cdata->getGhostBox());
+              ci; ci++) {
+            if ((*cdata)(ci()) != expected(ci())) {
+               failed = true;
+            }
+         }
+
+      }
+   } else if (pattern_name == "SECOND_LAYER_NODE_NO_CORNERS_FILL_PATTERN" ||
+              pattern_name == "SECOND_LAYER_NODE_FILL_PATTERN") {
+      for (hier::PatchLevel::Iterator p(level); p; p++) {
+         tbox::Pointer<hier::Patch> patch(*p);
+         tbox::Pointer<pdat::NodeData<int> > ndata =
+            patch->getPatchData(data_id);
+
+         pdat::NodeData<int> expected(ndata->getBox(),
+                                      ndata->getDepth(),
+                                      ghost_cell_width);
+
+         int data_txt_id = patch->getMappedBox().getLocalId().getValue();
+         if (mpi.getRank() == 1) {
+            data_txt_id += (num_boxes / num_nodes);
+         }
+
+         txt2data(finaldata_txt[data_txt_id],
+            expected, expected.getPointer(), false, true);
+
+         for (pdat::NodeData<int>::Iterator ni(ndata->getGhostBox());
+              ni; ni++) {
+            if ((*ndata)(ni()) != expected(ni())) {
+               failed = true;
+            }
+         }
+
+      }
+   }
+
+   if (failed) {
+      tbox::perr << "FAILED: - Test of " << pattern_name << endl;
+   }
+
+   return failed;
+}
+
+/*
+ * This tests FirstLayerCellNoCornersVariableFillPattern ..
+ */
+
+bool Test_FirstLayerCellNoCornersVariableFillPattern()
+{
+   const char* levelboxes_txt =
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 7
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 6
+      ". . . . x . . . x . . . x . . . ."
+      ".   .   .   .   .   .   .   .   ." // 5
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 4
+      ". . . . x . . . x . . . x . . . ."
+      ".   .   .   .   .   .   .   .   ." // 3
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 2
+      ". . . . x . . . x . . . x . . . ."
+      ".   .   .   .   .   .   .   .   ." // 1
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7
+   ;
+
+   // patch 2 data before comm
+
+   const char* initial2_txt =
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 7
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 6
+      ". . . . . . . . . . . . . . . . ."
+      ". 0 . 0 . 0 . 0 . 0 . 0 .   .   ." // 5
+      ". . . . . . . . . . . . . . . . ."
+      ". 0 . 0 . 0 . 0 . 0 . 0 .   .   ." // 4
+      ". . . . x . . . x . . . . . . . ."
+      ". 0 . 0 . 0 . 0 . 0 . 0 .   .   ." // 3
+      ". . . . . . . . . . . . . . . . ."
+      ". 0 . 0 . 0 . 0 . 0 . 0 .   .   ." // 2
+      ". . . . x . . . x . . . . . . . ."
+      ". 0 . 0 . 0 . 0 . 0 . 0 .   .   ." // 1
+      ". . . . . . . . . . . . . . . . ."
+      ". 0 . 0 . 0 . 0 . 0 . 0 .   .   ." // 0
+      ". . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7
+   ;
+
+   // patch 3 data before comm
+
+   const char* initial3_txt =
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 7
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 6
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 1 . 1 . 1 . 1 . 1 . 1 ." // 5
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 1 . 1 . 1 . 1 . 1 . 1 ." // 4
+      ". . . . . . . . x . . . x . . . ."
+      ".   .   . 1 . 1 . 1 . 1 . 1 . 1 ." // 3
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 1 . 1 . 1 . 1 . 1 . 1 ." // 2
+      ". . . . . . . . x . . . x . . . ."
+      ".   .   . 1 . 1 . 1 . 1 . 1 . 1 ." // 1
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 1 . 1 . 1 . 1 . 1 . 1 ." // 0
+      ". . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7
+   ;
+
+   // patch 0 data before comm
+
+   const char* initial0_txt =
+      ". . . . . . . . . . . . . . . . ."
+      ". 2 . 2 . 2 . 2 . 2 . 2 .   .   ." // 7
+      ". . . . . . . . . . . . . . . . ."
+      ". 2 . 2 . 2 . 2 . 2 . 2 .   .   ." // 6
+      ". . . . x . . . x . . . . . . . ."
+      ". 2 . 2 . 2 . 2 . 2 . 2 .   .   ." // 5
+      ". . . . . . . . . . . . . . . . ."
+      ". 2 . 2 . 2 . 2 . 2 . 2 .   .   ." // 4
+      ". . . . x . . . x . . . . . . . ."
+      ". 2 . 2 . 2 . 2 . 2 . 2 .   .   ." // 3
+      ". . . . . . . . . . . . . . . . ."
+      ". 2 . 2 . 2 . 2 . 2 . 2 .   .   ." // 2
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 1
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7
+   ;
+
+   // patch 1 data before comm
+
+   const char* initial1_txt =
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 3 . 3 . 3 . 3 . 3 . 3 ." // 7
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 3 . 3 . 3 . 3 . 3 . 3 ." // 6
+      ". . . . . . . . x . . . x . . . ."
+      ".   .   . 3 . 3 . 3 . 3 . 3 . 3 ." // 5
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 3 . 3 . 3 . 3 . 3 . 3 ." // 4
+      ". . . . . . . . x . . . x . . . ."
+      ".   .   . 3 . 3 . 3 . 3 . 3 . 3 ." // 3
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 3 . 3 . 3 . 3 . 3 . 3 ." // 2
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 1
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7
+   ;
+
+   // expected patch 2 data after comm
+
+   const char* final2_txt =
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 7
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 6
+      ". . . . . . . . . . . . . . . . ."
+      ". 0 . 0 . 0 . 0 . 0 . 0 .   .   ." // 5
+      ". . . . . . . . . . . . . . . . ."
+      ". 0 . 0 . 2 . 2 . 0 . 0 .   .   ." // 4
+      ". . . . x . . . x . . . . . . . ."
+      ". 0 . 0 . 0 . 0 . 1 . 0 .   .   ." // 3
+      ". . . . . . . . . . . . . . . . ."
+      ". 0 . 0 . 0 . 0 . 1 . 0 .   .   ." // 2
+      ". . . . x . . . x . . . . . . . ."
+      ". 0 . 0 . 0 . 0 . 0 . 0 .   .   ." // 1
+      ". . . . . . . . . . . . . . . . ."
+      ". 0 . 0 . 0 . 0 . 0 . 0 .   .   ." // 0
+      ". . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7
+   ;
+
+   // expected patch 3 data after comm
+
+   const char* final3_txt =
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 7
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 6
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 1 . 1 . 1 . 1 . 1 . 1 ." // 5
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 1 . 1 . 3 . 3 . 1 . 1 ." // 4
+      ". . . . . . . . x . . . x . . . ."
+      ".   .   . 1 . 0 . 1 . 1 . 1 . 1 ." // 3
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 1 . 0 . 1 . 1 . 1 . 1 ." // 2
+      ". . . . . . . . x . . . x . . . ."
+      ".   .   . 1 . 1 . 1 . 1 . 1 . 1 ." // 1
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 1 . 1 . 1 . 1 . 1 . 1 ." // 0
+      ". . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7
+   ;
+
+   // expected patch 0 data after comm
+
+   const char* final0_txt =
+      ". . . . . . . . . . . . . . . . ."
+      ". 2 . 2 . 2 . 2 . 2 . 2 .   .   ." // 7
+      ". . . . . . . . . . . . . . . . ."
+      ". 2 . 2 . 2 . 2 . 2 . 2 .   .   ." // 6
+      ". . . . x . . . x . . . . . . . ."
+      ". 2 . 2 . 2 . 2 . 3 . 2 .   .   ." // 5
+      ". . . . . . . . . . . . . . . . ."
+      ". 2 . 2 . 2 . 2 . 3 . 2 .   .   ." // 4
+      ". . . . x . . . x . . . . . . . ."
+      ". 2 . 2 . 0 . 0 . 2 . 2 .   .   ." // 3
+      ". . . . . . . . . . . . . . . . ."
+      ". 2 . 2 . 2 . 2 . 2 . 2 .   .   ." // 2
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 1
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7
+   ;
+
+   // expected patch 1 data after comm
+
+   const char* final1_txt =
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 3 . 3 . 3 . 3 . 3 . 3 ." // 7
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 3 . 3 . 3 . 3 . 3 . 3 ." // 6
+      ". . . . . . . . x . . . x . . . ."
+      ".   .   . 3 . 2 . 3 . 3 . 3 . 3 ." // 5
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 3 . 2 . 3 . 3 . 3 . 3 ." // 4
+      ". . . . . . . . x . . . x . . . ."
+      ".   .   . 3 . 3 . 1 . 1 . 3 . 3 ." // 3
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 3 . 3 . 3 . 3 . 3 . 3 ." // 2
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 1
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7
+   ;
+
+   const char* initial_txt[4] = { initial0_txt, initial1_txt,
+                                  initial2_txt, initial3_txt };
+   const char* final_txt[4] = { final0_txt, final1_txt,
+                                final2_txt, final3_txt };
+   tbox::Dimension dim(2);
+
+   tbox::Pointer<pdat::CellVariable<int> > var(
+      new pdat::CellVariable<int>(dim, "1cellnocorners"));
+
+   tbox::Pointer<pdat::FirstLayerCellNoCornersVariableFillPattern> fill_pattern(
+      new pdat::FirstLayerCellNoCornersVariableFillPattern(dim));
+
+   return SingleLevelTestCase(levelboxes_txt,
+      initial_txt,
+      final_txt,
+      var,
+      fill_pattern,
+      dim);
+}
+
+/*
+ * This tests FirstLayerCellVariableFillPattern
+ */
+
+bool Test_FirstLayerCellVariableFillPattern()
+{
+   const char* levelboxes_txt =
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 7
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 6
+      ". . . . x . . . x . . . x . . . ."
+      ".   .   .   .   .   .   .   .   ." // 5
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 4
+      ". . . . x . . . x . . . x . . . ."
+      ".   .   .   .   .   .   .   .   ." // 3
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 2
+      ". . . . x . . . x . . . x . . . ."
+      ".   .   .   .   .   .   .   .   ." // 1
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7
+   ;
+
+   // patch 0 data before comm
+
+   const char* initial0_txt =
+      ". . . . . . . . . . . . . . . . ."
+      ". 0 . 0 . 0 . 0 . 0 . 0 .   .   ." // 7
+      ". . . . . . . . . . . . . . . . ."
+      ". 0 . 0 . 0 . 0 . 0 . 0 .   .   ." // 6
+      ". . . . x . . . x . . . . . . . ."
+      ". 0 . 0 . 0 . 0 . 0 . 0 .   .   ." // 5
+      ". . . . . . . . . . . . . . . . ."
+      ". 0 . 0 . 0 . 0 . 0 . 0 .   .   ." // 4
+      ". . . . x . . . x . . . . . . . ."
+      ". 0 . 0 . 0 . 0 . 0 . 0 .   .   ." // 3
+      ". . . . . . . . . . . . . . . . ."
+      ". 0 . 0 . 0 . 0 . 0 . 0 .   .   ." // 2
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 1
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7
+   ;
+
+   // patch 1 data before comm
+
+   const char* initial1_txt =
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 1 . 1 . 1 . 1 . 1 . 1 ." // 7
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 1 . 1 . 1 . 1 . 1 . 1 ." // 6
+      ". . . . . . . . x . . . x . . . ."
+      ".   .   . 1 . 1 . 1 . 1 . 1 . 1 ." // 5
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 1 . 1 . 1 . 1 . 1 . 1 ." // 4
+      ". . . . . . . . x . . . x . . . ."
+      ".   .   . 1 . 1 . 1 . 1 . 1 . 1 ." // 3
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 1 . 1 . 1 . 1 . 1 . 1 ." // 2
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 1
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7
+   ;
+
+   // patch 2 data before comm
+
+   const char* initial2_txt =
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 7
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 6
+      ". . . . . . . . . . . . . . . . ."
+      ". 2 . 2 . 2 . 2 . 2 . 2 .   .   ." // 5
+      ". . . . . . . . . . . . . . . . ."
+      ". 2 . 2 . 2 . 2 . 2 . 2 .   .   ." // 4
+      ". . . . x . . . x . . . . . . . ."
+      ". 2 . 2 . 2 . 2 . 2 . 2 .   .   ." // 3
+      ". . . . . . . . . . . . . . . . ."
+      ". 2 . 2 . 2 . 2 . 2 . 2 .   .   ." // 2
+      ". . . . x . . . x . . . . . . . ."
+      ". 2 . 2 . 2 . 2 . 2 . 2 .   .   ." // 1
+      ". . . . . . . . . . . . . . . . ."
+      ". 2 . 2 . 2 . 2 . 2 . 2 .   .   ." // 0
+      ". . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7
+   ;
+
+   // patch 3 data before comm
+
+   const char* initial3_txt =
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 7
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 6
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 3 . 3 . 3 . 3 . 3 . 3 ." // 5
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 3 . 3 . 3 . 3 . 3 . 3 ." // 4
+      ". . . . . . . . x . . . x . . . ."
+      ".   .   . 3 . 3 . 3 . 3 . 3 . 3 ." // 3
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 3 . 3 . 3 . 3 . 3 . 3 ." // 2
+      ". . . . . . . . x . . . x . . . ."
+      ".   .   . 3 . 3 . 3 . 3 . 3 . 3 ." // 1
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 3 . 3 . 3 . 3 . 3 . 3 ." // 0
+      ". . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7
+   ;
+
+   const char* final0_txt =
+      ". . . . . . . . . . . . . . . . ."
+      ". 0 . 0 . 0 . 0 . 0 . 0 .   .   ." // 7
+      ". . . . . . . . . . . . . . . . ."
+      ". 0 . 0 . 0 . 0 . 0 . 0 .   .   ." // 6
+      ". . . . x . . . x . . . . . . . ."
+      ". 0 . 0 . 0 . 0 . 1 . 0 .   .   ." // 5
+      ". . . . . . . . . . . . . . . . ."
+      ". 0 . 0 . 0 . 0 . 1 . 0 .   .   ." // 4
+      ". . . . x . . . x . . . . . . . ."
+      ". 0 . 0 . 2 . 2 . 3 . 0 .   .   ." // 3
+      ". . . . . . . . . . . . . . . . ."
+      ". 0 . 0 . 0 . 0 . 0 . 0 .   .   ." // 2
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 1
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7
+   ;
+
+   // expected patch 1 data after comm
+
+   const char* final1_txt =
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 1 . 1 . 1 . 1 . 1 . 1 ." // 7
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 1 . 1 . 1 . 1 . 1 . 1 ." // 6
+      ". . . . . . . . x . . . x . . . ."
+      ".   .   . 1 . 0 . 1 . 1 . 1 . 1 ." // 5
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 1 . 0 . 1 . 1 . 1 . 1 ." // 4
+      ". . . . . . . . x . . . x . . . ."
+      ".   .   . 1 . 2 . 3 . 3 . 1 . 1 ." // 3
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 1 . 1 . 1 . 1 . 1 . 1 ." // 2
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 1
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7
+   ;
+
+   // expected patch 2 data after comm
+
+   const char* final2_txt =
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 7
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 6
+      ". . . . . . . . . . . . . . . . ."
+      ". 2 . 2 . 2 . 2 . 2 . 2 .   .   ." // 5
+      ". . . . . . . . . . . . . . . . ."
+      ". 2 . 2 . 0 . 0 . 1 . 2 .   .   ." // 4
+      ". . . . x . . . x . . . . . . . ."
+      ". 2 . 2 . 2 . 2 . 3 . 2 .   .   ." // 3
+      ". . . . . . . . . . . . . . . . ."
+      ". 2 . 2 . 2 . 2 . 3 . 2 .   .   ." // 2
+      ". . . . x . . . x . . . . . . . ."
+      ". 2 . 2 . 2 . 2 . 2 . 2 .   .   ." // 1
+      ". . . . . . . . . . . . . . . . ."
+      ". 2 . 2 . 2 . 2 . 2 . 2 .   .   ." // 0
+      ". . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7
+   ;
+
+   // expected patch 3 data after comm
+
+   const char* final3_txt =
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 7
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   ." // 6
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 3 . 3 . 3 . 3 . 3 . 3 ." // 5
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 3 . 0 . 1 . 1 . 3 . 3 ." // 4
+      ". . . . . . . . x . . . x . . . ."
+      ".   .   . 3 . 2 . 3 . 3 . 3 . 3 ." // 3
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 3 . 2 . 3 . 3 . 3 . 3 ." // 2
+      ". . . . . . . . x . . . x . . . ."
+      ".   .   . 3 . 3 . 3 . 3 . 3 . 3 ." // 1
+      ". . . . . . . . . . . . . . . . ."
+      ".   .   . 3 . 3 . 3 . 3 . 3 . 3 ." // 0
+      ". . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7
+   ;
+
+   const char* initial_txt[4] = { initial0_txt, initial1_txt,
+                                  initial2_txt, initial3_txt };
+   const char* final_txt[4] = { final0_txt, final1_txt,
+                                final2_txt, final3_txt };
+
+   tbox::Dimension dim(2);
+
+   tbox::Pointer<pdat::CellVariable<int> > var(
+      new pdat::CellVariable<int>(dim, "1cell"));
+
+   tbox::Pointer<pdat::FirstLayerCellVariableFillPattern> fill_pattern(
+      new pdat::FirstLayerCellVariableFillPattern(dim));
+
+   return SingleLevelTestCase(levelboxes_txt,
+      initial_txt,
+      final_txt,
+      var,
+      fill_pattern,
+      dim);
+}
+
+bool Test_SecondLayerNodeNoCornersVariableFillPattern()
+{
+   const char* levelboxes_txt =
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 9
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 8
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 7
+      ". . . . . . x . . . x . . . x . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 6
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 5
+      ". . . . . . x . . . x . . . x . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 4
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 3
+      ". . . . . . x . . . x . . . x . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 2
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 1
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7   8   9
+   ;
+
+   // patch 0 data before comm
+
+   const char* initial0_txt =
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 9
+      ". . 0 . 0 . 0 . 0 . 0 . 0 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 8
+      ". . 0 . 0 . 0 . 0 . 0 . 0 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 7
+      ". . 0 . 0 . 0 . 0 . 0 . 0 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 6
+      ". . 0 . 0 . 0 . 0 . 0 . 0 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 5
+      ". . 0 . 0 . 0 . 0 . 0 . 0 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 4
+      ". . 0 . 0 . 0 . 0 . 0 . 0 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 3
+      ". . 0 . 0 . 0 . 0 . 0 . 0 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 2
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 1
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7   8   9
+   ;
+
+   // patch 1 data before comm
+
+   const char* initial1_txt =
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 9
+      ". . . . . . 1 . 1 . 1 . 1 . 1 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 8
+      ". . . . . . 1 . 1 . 1 . 1 . 1 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 7
+      ". . . . . . 1 . 1 . 1 . 1 . 1 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 6
+      ". . . . . . 1 . 1 . 1 . 1 . 1 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 5
+      ". . . . . . 1 . 1 . 1 . 1 . 1 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 4
+      ". . . . . . 1 . 1 . 1 . 1 . 1 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 3
+      ". . . . . . 1 . 1 . 1 . 1 . 1 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 2
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 1
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7   8   9
+   ;
+
+   // patch 2 data before comm
+
+   const char* initial2_txt =
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 9
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 8
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 7
+      ". . 2 . 2 . 2 . 2 . 2 . 2 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 6
+      ". . 2 . 2 . 2 . 2 . 2 . 2 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 5
+      ". . 2 . 2 . 2 . 2 . 2 . 2 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 4
+      ". . 2 . 2 . 2 . 2 . 2 . 2 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 3
+      ". . 2 . 2 . 2 . 2 . 2 . 2 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 2
+      ". . 2 . 2 . 2 . 2 . 2 . 2 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 1
+      ". . 2 . 2 . 2 . 2 . 2 . 2 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7   8   9
+   ;
+
+   // patch 3 data before comm
+
+   const char* initial3_txt =
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 9
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 8
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 7
+      ". . . . . . 3 . 3 . 3 . 3 . 3 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 6
+      ". . . . . . 3 . 3 . 3 . 3 . 3 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 5
+      ". . . . . . 3 . 3 . 3 . 3 . 3 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 4
+      ". . . . . . 3 . 3 . 3 . 3 . 3 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 3
+      ". . . . . . 3 . 3 . 3 . 3 . 3 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 2
+      ". . . . . . 3 . 3 . 3 . 3 . 3 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 1
+      ". . . . . . 3 . 3 . 3 . 3 . 3 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7   8   9
+   ;
+
+   const char* final0_txt =
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 9
+      ". . 0 . 0 . 0 . 0 . 0 . 0 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 8
+      ". . 0 . 0 . 0 . 0 . 0 . 0 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 7
+      ". . 0 . 0 . 0 . 0 . 0 . 1 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 6
+      ". . 0 . 0 . 0 . 0 . 0 . 1 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 5
+      ". . 0 . 0 . 0 . 0 . 0 . 1 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 4
+      ". . 0 . 0 . 2 . 2 . 2 . 0 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 3
+      ". . 0 . 0 . 0 . 0 . 0 . 0 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 2
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 1
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7   8   9
+   ;
+
+   // expected patch 1 data after comm
+
+   const char* final1_txt =
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 9
+      ". . . . . . 1 . 1 . 1 . 1 . 1 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 8
+      ". . . . . . 1 . 1 . 1 . 1 . 1 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 7
+      ". . . . . . 1 . 0 . 1 . 1 . 1 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 6
+      ". . . . . . 1 . 0 . 1 . 1 . 1 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 5
+      ". . . . . . 1 . 0 . 1 . 1 . 1 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 4
+      ". . . . . . 1 . 1 . 3 . 3 . 3 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 3
+      ". . . . . . 1 . 1 . 1 . 1 . 1 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 2
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 1
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7   8   9
+   ;
+
+   // expected patch 2 data after comm
+
+   const char* final2_txt =
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 9
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 8
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 7
+      ". . 2 . 2 . 2 . 2 . 2 . 2 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 6
+      ". . 2 . 2 . 0 . 0 . 0 . 2 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 5
+      ". . 2 . 2 . 2 . 2 . 2 . 3 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 4
+      ". . 2 . 2 . 2 . 2 . 2 . 3 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 3
+      ". . 2 . 2 . 2 . 2 . 2 . 3 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 2
+      ". . 2 . 2 . 2 . 2 . 2 . 2 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 1
+      ". . 2 . 2 . 2 . 2 . 2 . 2 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7   8   9
+   ;
+
+   // expected patch 3 data after comm
+
+   const char* final3_txt =
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 9
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 8
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 7
+      ". . . . . . 3 . 3 . 3 . 3 . 3 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 6
+      ". . . . . . 3 . 3 . 1 . 1 . 1 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 5
+      ". . . . . . 3 . 2 . 3 . 3 . 3 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 4
+      ". . . . . . 3 . 2 . 3 . 3 . 3 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 3
+      ". . . . . . 3 . 2 . 3 . 3 . 3 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 2
+      ". . . . . . 3 . 3 . 3 . 3 . 3 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 1
+      ". . . . . . 3 . 3 . 3 . 3 . 3 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7   8   9
+   ;
+
+   const char* initial_txt[4] = { initial0_txt, initial1_txt,
+                                  initial2_txt, initial3_txt };
+   const char* final_txt[4] = { final0_txt, final1_txt,
+                                final2_txt, final3_txt };
+
+   tbox::Dimension dim(2);
+
+   tbox::Pointer<pdat::NodeVariable<int> > var(
+      new pdat::NodeVariable<int>(dim, "secondnodenocorners"));
+
+   tbox::Pointer<pdat::SecondLayerNodeNoCornersVariableFillPattern>
+   fill_pattern(
+      new pdat::SecondLayerNodeNoCornersVariableFillPattern(dim));
+
+   return SingleLevelTestCase(levelboxes_txt,
+      initial_txt,
+      final_txt,
+      var,
+      fill_pattern,
+      dim);
+}
+
+bool Test_SecondLayerNodeVariableFillPattern()
+{
+   const char* levelboxes_txt =
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 9
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 8
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 7
+      ". . . . . . x . . . x . . . x . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 6
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 5
+      ". . . . . . x . . . x . . . x . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 4
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 3
+      ". . . . . . x . . . x . . . x . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 2
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 1
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7   8   9
+   ;
+
+   // patch 0 data before comm
+
+   const char* initial0_txt =
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 9
+      ". . 0 . 0 . 0 . 0 . 0 . 0 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 8
+      ". . 0 . 0 . 0 . 0 . 0 . 0 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 7
+      ". . 0 . 0 . 0 . 0 . 0 . 0 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 6
+      ". . 0 . 0 . 0 . 0 . 0 . 0 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 5
+      ". . 0 . 0 . 0 . 0 . 0 . 0 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 4
+      ". . 0 . 0 . 0 . 0 . 0 . 0 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 3
+      ". . 0 . 0 . 0 . 0 . 0 . 0 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 2
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 1
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7   8   9
+   ;
+
+   // patch 1 data before comm
+
+   const char* initial1_txt =
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 9
+      ". . . . . . 1 . 1 . 1 . 1 . 1 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 8
+      ". . . . . . 1 . 1 . 1 . 1 . 1 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 7
+      ". . . . . . 1 . 1 . 1 . 1 . 1 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 6
+      ". . . . . . 1 . 1 . 1 . 1 . 1 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 5
+      ". . . . . . 1 . 1 . 1 . 1 . 1 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 4
+      ". . . . . . 1 . 1 . 1 . 1 . 1 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 3
+      ". . . . . . 1 . 1 . 1 . 1 . 1 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 2
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 1
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7   8   9
+   ;
+
+   // patch 2 data before comm
+
+   const char* initial2_txt =
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 9
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 8
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 7
+      ". . 2 . 2 . 2 . 2 . 2 . 2 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 6
+      ". . 2 . 2 . 2 . 2 . 2 . 2 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 5
+      ". . 2 . 2 . 2 . 2 . 2 . 2 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 4
+      ". . 2 . 2 . 2 . 2 . 2 . 2 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 3
+      ". . 2 . 2 . 2 . 2 . 2 . 2 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 2
+      ". . 2 . 2 . 2 . 2 . 2 . 2 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 1
+      ". . 2 . 2 . 2 . 2 . 2 . 2 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7   8   9
+   ;
+
+   // patch 3 data before comm
+
+   const char* initial3_txt =
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 9
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 8
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 7
+      ". . . . . . 3 . 3 . 3 . 3 . 3 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 6
+      ". . . . . . 3 . 3 . 3 . 3 . 3 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 5
+      ". . . . . . 3 . 3 . 3 . 3 . 3 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 4
+      ". . . . . . 3 . 3 . 3 . 3 . 3 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 3
+      ". . . . . . 3 . 3 . 3 . 3 . 3 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 2
+      ". . . . . . 3 . 3 . 3 . 3 . 3 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 1
+      ". . . . . . 3 . 3 . 3 . 3 . 3 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7   8   9
+   ;
+
+   const char* final0_txt =
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 9
+      ". . 0 . 0 . 0 . 0 . 0 . 0 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 8
+      ". . 0 . 0 . 0 . 0 . 0 . 0 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 7
+      ". . 0 . 0 . 0 . 0 . 0 . 1 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 6
+      ". . 0 . 0 . 0 . 0 . 0 . 1 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 5
+      ". . 0 . 0 . 0 . 0 . 0 . 1 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 4
+      ". . 0 . 0 . 2 . 2 . 2 . 3 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 3
+      ". . 0 . 0 . 0 . 0 . 0 . 0 . 0 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 2
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 1
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7   8   9
+   ;
+
+   // expected patch 1 data after comm
+
+   const char* final1_txt =
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 9
+      ". . . . . . 1 . 1 . 1 . 1 . 1 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 8
+      ". . . . . . 1 . 1 . 1 . 1 . 1 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 7
+      ". . . . . . 1 . 0 . 1 . 1 . 1 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 6
+      ". . . . . . 1 . 0 . 1 . 1 . 1 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 5
+      ". . . . . . 1 . 0 . 1 . 1 . 1 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 4
+      ". . . . . . 1 . 2 . 3 . 3 . 3 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 3
+      ". . . . . . 1 . 1 . 1 . 1 . 1 . 1 . 1 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 2
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 1
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7   8   9
+   ;
+
+   // expected patch 2 data after comm
+
+   const char* final2_txt =
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 9
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 8
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 7
+      ". . 2 . 2 . 2 . 2 . 2 . 2 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 6
+      ". . 2 . 2 . 0 . 0 . 0 . 1 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 5
+      ". . 2 . 2 . 2 . 2 . 2 . 3 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 4
+      ". . 2 . 2 . 2 . 2 . 2 . 3 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 3
+      ". . 2 . 2 . 2 . 2 . 2 . 3 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 2
+      ". . 2 . 2 . 2 . 2 . 2 . 2 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 1
+      ". . 2 . 2 . 2 . 2 . 2 . 2 . 2 . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7   8   9
+   ;
+
+   // expected patch 3 data after comm
+
+   const char* final3_txt =
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 9
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 8
+      ". . . . . . . . . . . . . . . . . . . . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 7
+      ". . . . . . 3 . 3 . 3 . 3 . 3 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 6
+      ". . . . . . 3 . 0 . 1 . 1 . 1 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 5
+      ". . . . . . 3 . 2 . 3 . 3 . 3 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 4
+      ". . . . . . 3 . 2 . 3 . 3 . 3 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 3
+      ". . . . . . 3 . 2 . 3 . 3 . 3 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 2
+      ". . . . . . 3 . 3 . 3 . 3 . 3 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 1
+      ". . . . . . 3 . 3 . 3 . 3 . 3 . 3 . 3 . ."
+      ".   .   .   .   .   .   .   .   .   .   ." // 0
+      ". . . . . . . . . . . . . . . . . . . . ."
+
+      // 0   1   2   3   4   5   6   7   8   9
+   ;
+
+   const char* initial_txt[4] = { initial0_txt, initial1_txt,
+                                  initial2_txt, initial3_txt };
+   const char* final_txt[4] = { final0_txt, final1_txt,
+                                final2_txt, final3_txt };
+
+   tbox::Dimension dim(2);
+
+   tbox::Pointer<pdat::NodeVariable<int> > var(
+      new pdat::NodeVariable<int>(dim, "secondnode"));
+
+   tbox::Pointer<pdat::SecondLayerNodeVariableFillPattern>
+   fill_pattern(
+      new pdat::SecondLayerNodeVariableFillPattern(dim));
+
+   return SingleLevelTestCase(levelboxes_txt,
+      initial_txt,
+      final_txt,
+      var,
+      fill_pattern,
+      dim);
+}
+
+int main(
+   int argc,
+   char* argv[])
+{
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   int failures = 0;
+
+   failures += Test_FirstLayerCellNoCornersVariableFillPattern();
+   failures += Test_FirstLayerCellVariableFillPattern();
+   failures += Test_SecondLayerNodeNoCornersVariableFillPattern();
+   failures += Test_SecondLayerNodeVariableFillPattern();
+
+   if (failures == 0) {
+      tbox::pout << "\nPASSED:  fill_pattern" << endl;
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return failures;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/hierarchy/HierarchyTester.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/hierarchy/HierarchyTester.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,583 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Manager class for patch hierarchy refine/coarsen tests. 
+ *
+ ************************************************************************/
+
+#include "HierarchyTester.h"
+
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/mesh/BergerRigoutsos.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/mesh/GriddingAlgorithm.h"
+#include "SAMRAI/hier/GridGeometry.h"
+#include "SAMRAI/mesh/TreeLoadBalancer.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchGeometry.h"
+#include "SAMRAI/mesh/StandardTagAndInitialize.h"
+
+using namespace geom;
+
+namespace SAMRAI {
+
+/*
+ *************************************************************************
+ *									*
+ * The constructor initializes object state.                             *
+ * The destructor deallocates object storage.                            *
+ *									*
+ *************************************************************************
+ */
+
+HierarchyTester::HierarchyTester(
+   const std::string& object_name,
+   const tbox::Dimension& dim,
+   Pointer<Database> hier_test_db):
+   d_dim(dim),
+   d_ratio(dim, 0)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!hier_test_db.isNull());
+#endif
+
+   d_object_name = object_name;
+
+   d_do_refine_test = false;
+   d_do_coarsen_test = false;
+
+   d_initial_patch_hierarchy.setNull();
+   d_test_patch_hierarchy.setNull();
+
+   if (hier_test_db->keyExists("do_refine_test")) {
+      d_do_refine_test = hier_test_db->getBool("do_refine_test");
+      if (d_do_refine_test) {
+         tbox::plog << "\nPerforming hierarchy refine test..." << std::endl;
+         if (hier_test_db->keyExists("ratio")) {
+            int* tmp_ratio = &d_ratio[0];
+            hier_test_db->getIntegerArray("ratio", tmp_ratio, d_dim.getValue());
+            tbox::plog << "with ratio = " << d_ratio << std::endl;
+         } else {
+            TBOX_ERROR(
+               "HierarchyTester input error: no 'ratio' found in input"
+               << std::endl);
+         }
+      }
+   }
+
+   if (!d_do_refine_test) {
+      if (hier_test_db->keyExists("do_coarsen_test")) {
+         d_do_coarsen_test = hier_test_db->getBool("do_coarsen_test");
+      }
+      if (d_do_coarsen_test) {
+         tbox::plog << "\nPerforming hierarchy coarsen test..." << std::endl;
+         if (hier_test_db->keyExists("ratio")) {
+            int* tmp_ratio = &d_ratio[0];
+            hier_test_db->getIntegerArray("ratio", tmp_ratio, d_dim.getValue());
+            tbox::plog << "with ratio = " << d_ratio << std::endl;
+         } else {
+            TBOX_ERROR(
+               "HierarchyTester input error: no 'ratio' found in input"
+               << std::endl);
+         }
+      }
+   }
+
+   if (!d_do_refine_test && !d_do_coarsen_test) {
+      TBOX_ERROR(
+         "HierarchyTester input error: no test specified in input" << std::endl);
+   }
+
+}
+
+HierarchyTester::~HierarchyTester()
+{
+   d_initial_patch_hierarchy.setNull();
+   d_test_patch_hierarchy.setNull();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create and configure gridding objects used to build the hierarchy.    *
+ * Then, create hierarchy and set up dummy data for patch descriptor.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void HierarchyTester::setupInitialHierarchy(
+   Pointer<Database> main_input_db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!main_input_db.isNull());
+#endif
+   Pointer<CartesianGridGeometry> grid_geometry(
+      new CartesianGridGeometry(
+         d_dim,
+         "CartesianGridGeometry",
+         main_input_db->getDatabase("CartesianGridGeometry")));
+
+   d_initial_patch_hierarchy =
+      new PatchHierarchy("InitialPatchHierarchy",
+                         grid_geometry,
+                         main_input_db->getDatabase("PatchHierarchy"));
+
+   Pointer<BergerRigoutsos> box_generator(new BergerRigoutsos(d_dim));
+
+   Pointer<TreeLoadBalancer> load_balancer(
+      new TreeLoadBalancer(d_dim,
+         "TreeLoadBalancer",
+         main_input_db->getDatabase("TreeLoadBalancer")));
+   load_balancer->setSAMRAI_MPI(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   Pointer<StandardTagAndInitialize> dummy_error_detector(
+      new StandardTagAndInitialize(d_dim,
+         "StandardTagAndInitialize",
+         this,
+         main_input_db->getDatabase("StandardTagAndInitialize")));
+
+   d_gridding_algorithm =
+      new GriddingAlgorithm(d_initial_patch_hierarchy,
+         "GriddingAlgorithm",
+         main_input_db->getDatabase("GriddingAlgorithm"),
+         dummy_error_detector,
+         box_generator,
+         load_balancer);
+
+   d_gridding_algorithm->makeCoarsestLevel(
+      0.0);                                       // dummy time
+
+   for (int ln = 0; d_initial_patch_hierarchy->levelCanBeRefined(ln); ln++) {
+      d_gridding_algorithm->makeFinerLevel(
+         0.0,                                      // dummy time
+         true,                                     // indicates initial time
+         0);                                       // dummy tag buffer
+
+   }
+
+   tbox::plog << "Initial hierarchy:\n";
+   d_initial_patch_hierarchy->recursivePrint(
+      tbox::plog, "   ", 3);
+
+}
+
+int HierarchyTester::runHierarchyTestAndVerify()
+{
+   int fail_count = 0;
+
+   if (d_do_refine_test) {
+      d_test_patch_hierarchy =
+         d_initial_patch_hierarchy->makeRefinedPatchHierarchy(
+            "FinePatchHierarchy",
+            d_ratio,
+            false);
+   }
+
+   if (d_do_coarsen_test) {
+      d_test_patch_hierarchy =
+         d_initial_patch_hierarchy->makeCoarsenedPatchHierarchy(
+            "CoarsePatchHierarchy",
+            d_ratio,
+            false);
+   }
+
+   /*
+    **************************************************************
+    * Tests 0a-0c check global data in grid geometry.            *
+    **************************************************************
+    */
+
+   Pointer<GridGeometry> init_geometry =
+      d_initial_patch_hierarchy->getGridGeometry();
+   Pointer<GridGeometry> test_geometry =
+      d_test_patch_hierarchy->getGridGeometry();
+
+   hier::IntVector one_vector(d_dim, 1);
+
+   // Test #0a:
+   if (init_geometry->getPeriodicShift(one_vector) !=
+       test_geometry->getPeriodicShift(one_vector)) {
+      fail_count++;
+      tbox::perr << "FAILED: - Test #0a: initial hierarchy has periodic shift "
+                 << init_geometry->getPeriodicShift(one_vector) << " and \n"
+                 << "test hierarchy has periodic shift "
+                 << test_geometry->getPeriodicShift(one_vector) << std::endl;
+   }
+
+   const BoxArray& init_phys_domain = init_geometry->getPhysicalDomain();
+   const BoxArray& test_phys_domain = test_geometry->getPhysicalDomain();
+
+   const int npdboxes = init_phys_domain.getNumberOfBoxes();
+
+   // Test #0b:
+   if (d_do_refine_test) {
+      for (int ib = 0; ib < npdboxes; ib++) {
+         if (Box::refine(init_phys_domain[ib], d_ratio) !=
+             test_phys_domain[ib]) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #0b: test hierarchy physical domain"
+                       << " box with array index " << ib
+                       << " is not a proper refinement of initial hierarchy"
+                       << " physical domain box with same index" << std::endl;
+         }
+      }
+   }
+   if (d_do_coarsen_test) {
+      for (int ib = 0; ib < npdboxes; ib++) {
+         if (Box::coarsen(init_phys_domain[ib], d_ratio) !=
+             test_phys_domain[ib]) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #0b: test hierarchy physical domain"
+                       << " box with array index " << ib
+                       << " is not a proper coarsening of initial hierarchy"
+                       << " physical domain box with same index" << std::endl;
+         }
+      }
+   }
+
+   // Test #0c:
+   if (init_geometry->getDomainIsSingleBox() !=
+       test_geometry->getDomainIsSingleBox()) {
+      fail_count++;
+      tbox::perr
+      << "FAILED: - Test #0c: initial and test hierarchy do not match"
+      << " for geom->getDomainIsSingleBox()" << std::endl;
+   }
+
+   /*
+    **************************************************************
+    * Tests 1-8 check global data for levels in hierarchy.       *
+    **************************************************************
+    */
+
+   const int nlevels = d_initial_patch_hierarchy->getNumberOfLevels();
+
+   // Test #1:
+   if (d_test_patch_hierarchy->getNumberOfLevels() != nlevels) {
+      fail_count++;
+      tbox::perr << "FAILED: - Test #1: initial hierarchy has "
+                 << nlevels << " levels and \n"
+                 << "test hierarchy has "
+                 << d_test_patch_hierarchy->getNumberOfLevels() << "levels"
+                 << std::endl;
+   }
+
+   for (int ln = 0; ln < nlevels; ln++) {
+      Pointer<PatchLevel> init_level =
+         d_initial_patch_hierarchy->getPatchLevel(ln);
+      Pointer<PatchLevel> test_level =
+         d_test_patch_hierarchy->getPatchLevel(ln);
+
+      // Test #2:
+      if (init_level->getLevelNumber() !=
+          test_level->getLevelNumber()) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #2: for level number " << ln
+                    << " initial hierarchy level number is "
+                    << init_level->getLevelNumber()
+                    << "\n and test hierarchy level number is "
+                    << test_level->getLevelNumber() << std::endl;
+      }
+
+      // Test #4:
+      if (init_level->inHierarchy() !=
+          test_level->inHierarchy()) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #4: for level number " << ln
+                    << " initial hierarchy level in hierarchy is "
+                    << init_level->inHierarchy()
+                    << "\n and test hierarchy level in hierarchy is "
+                    << test_level->inHierarchy() << std::endl;
+      }
+
+      // Test #5:
+      if (init_level->getGlobalNumberOfPatches() !=
+          test_level->getGlobalNumberOfPatches()) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #5: for level number " << ln
+                    << " initial hierarchy number of patches is "
+                    << init_level->getGlobalNumberOfPatches()
+                    << "\n and test hierarchy number of patches is "
+                    << test_level->getGlobalNumberOfPatches() << std::endl;
+      }
+
+      // Test #6:
+      if (init_level->getRatioToLevelZero() !=
+          test_level->getRatioToLevelZero()) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #6: for level number " << ln
+                    << " initial hierarchy ratio to level zero is "
+                    << init_level->getRatioToLevelZero()
+                    << "\n and test hierarchy ratio to level zero is "
+                    << test_level->getRatioToLevelZero() << std::endl;
+      }
+
+      // Test #7:
+      if (init_level->getRatioToCoarserLevel() !=
+          test_level->getRatioToCoarserLevel()) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #7: for level number " << ln
+                    << " initial hierarchy ratio to coarser level is "
+                    << init_level->getRatioToCoarserLevel()
+                    << "\n and test hierarchy ratio to coarser level is "
+                    << test_level->getRatioToCoarserLevel() << std::endl;
+      }
+
+      const BoxArray& init_domain = init_level->getPhysicalDomain();
+      const BoxArray& test_domain = test_level->getPhysicalDomain();
+
+      const int nboxes = init_domain.getNumberOfBoxes();
+
+      // Test #8:
+      if (d_do_refine_test) {
+         for (int ib = 0; ib < nboxes; ib++) {
+            if (Box::refine(init_domain[ib], d_ratio) !=
+                test_domain[ib]) {
+               fail_count++;
+               tbox::perr << "FAILED: - Test #8: for level number " << ln
+                          << " refined domain box with array index " << ib
+                          << " is not a proper refinement of initial domain "
+                          << "box with same index" << std::endl;
+            }
+         }
+      }
+      if (d_do_coarsen_test) {
+         for (int ib = 0; ib < nboxes; ib++) {
+            if (Box::coarsen(init_domain[ib], d_ratio) !=
+                test_domain[ib]) {
+               fail_count++;
+               tbox::perr << "FAILED: - Test #8: for level number " << ln
+                          << " coarsened domain box with array index " << ib
+                          << " is not a proper coarsening of initial domain "
+                          << "box with same index" << std::endl;
+            }
+         }
+      }
+
+      /*
+       **************************************************************
+       *  Tests 9-13 check global data for patches on each level.   *
+       **************************************************************
+       */
+
+      IntVector init_connector_width =
+         d_initial_patch_hierarchy->getRequiredConnectorWidth(ln,ln);
+      IntVector test_connector_width =
+         d_test_patch_hierarchy->getRequiredConnectorWidth(ln,ln);
+      if (d_do_refine_test) {
+         test_connector_width = init_connector_width*d_ratio;
+      }
+      else {
+         init_connector_width = test_connector_width*d_ratio;
+      }
+      const Connector &init_connector =
+         init_level->getMappedBoxLevel()->getPersistentOverlapConnectors().findOrCreateConnector(
+            d_initial_patch_hierarchy->getDomainMappedBoxLevel(),
+            init_connector_width,
+            true /* exact width only */ );
+      const Connector &test_connector =
+         test_level->getMappedBoxLevel()->getPersistentOverlapConnectors().findConnector(
+            d_test_patch_hierarchy->getDomainMappedBoxLevel(),
+            test_connector_width,
+            true /* exact width only */ );
+
+      for (hier::PatchLevel::Iterator ip(test_level); ip; ip++) {
+
+         // Test #9:
+         if (d_do_refine_test) {
+            if (Box::refine(init_level->getBoxForPatch(ip->getLocalId()), d_ratio) !=
+                test_level->getBoxForPatch(ip->getLocalId())) {
+               fail_count++;
+               tbox::perr << "FAILED: - Test #9: for level number " << ln
+                          << " refined patch box with array index " << ip->getLocalId()
+                          << " is not a proper refinement of initial domain "
+                          << "box with same index" << std::endl;
+            }
+         }
+
+         if (d_do_coarsen_test) {
+            if (Box::coarsen(init_level->getBoxForPatch(ip->getLocalId()), d_ratio) !=
+                test_level->getBoxForPatch(ip->getLocalId())) {
+               fail_count++;
+               tbox::perr << "FAILED: - Test #9: for level number " << ln
+                          << " coarsened patch box with array index " << ip->getLocalId()
+                          << " is not a proper coarsening of initial domain "
+                          << "box with same index" << std::endl;
+            }
+         }
+
+         // Test #10:
+         if (init_connector.getNeighborSet(ip->getGlobalId()) != test_connector.getNeighborSet(ip->getGlobalId())) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #10: for level number " << ln
+                       << " initial and test level have different number of "
+                       << "domain neighbors for patch number " << ip->getLocalId() << std::endl;
+         }
+
+         // Test #11:
+         if (init_level->getMappingForPatch(ip->getLocalId()) !=
+             test_level->getMappingForPatch(ip->getLocalId())) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #11: for level number " << ln
+                       << " initial and test level have different processor "
+                       << "mapping for patch number " << ip->getLocalId() << std::endl;
+         }
+
+         // Test #12:
+         if (init_level->patchTouchesRegularBoundary(ip->getLocalId()) !=
+             test_level->patchTouchesRegularBoundary(ip->getLocalId())) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #12: for level number " << ln
+                       << " initial and test level do not match for "
+                       << "patchTouchesRegularBoundary() "
+                       << "for patch number " << ip->getLocalId() << std::endl;
+         }
+
+         // Test #13:
+         if (init_level->patchTouchesPeriodicBoundary(ip->getLocalId()) !=
+             test_level->patchTouchesPeriodicBoundary(ip->getLocalId())) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #12: for level number " << ln
+                       << " initial and test level do not match for "
+                       << "patchTouchesPeriodicBoundary() "
+                       << "for patch number " << ip->getLocalId() << std::endl;
+         }
+      }
+
+      /*
+       **************************************************************
+       *  Tests 14-20 check local data for patches on each level.   *
+       **************************************************************
+       */
+      for (PatchLevel::Iterator tip(test_level); tip; tip++) {
+         Pointer<Patch> test_patch = test_level->getPatch(tip->getLocalId());
+         Pointer<Patch> init_patch = init_level->getPatch(tip->getLocalId());
+
+         // Test #14:
+         if (d_do_refine_test) {
+            if (Box::refine(init_patch->getBox(), d_ratio) !=
+                test_patch->getBox()) {
+               fail_count++;
+               tbox::perr << "FAILED: - Test #14: for level number " << ln
+                          << " box for test level patch " << tip->getLocalId()
+                          << " is not a proper refinement of box "
+                          << "for initial level patch with same number"
+                          << std::endl;
+            }
+         }
+         if (d_do_coarsen_test) {
+            if (Box::coarsen(init_patch->getBox(), d_ratio) !=
+                test_patch->getBox()) {
+               fail_count++;
+               tbox::perr << "FAILED: - Test #14: for level number " << ln
+                          << " box for test level patch " << tip->getLocalId()
+                          << " is not a proper coarsening of box "
+                          << "for initial level patch with same number"
+                          << std::endl;
+            }
+         }
+
+         // Test #15:
+         if (init_patch->getLocalId() !=
+             test_patch->getLocalId()) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #15: for level number " << ln
+                       <<
+            " initial and test level patches have different patch "
+                       << "numbers for patch with index " << tip->getLocalId() << std::endl;
+         }
+
+         // Test #16:
+         if (init_patch->getPatchLevelNumber() !=
+             test_patch->getPatchLevelNumber()) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #16: for level number " << ln
+                       <<
+            " initial and test level patches have different patch "
+                       << "level numbers for patch number " << tip->getLocalId()
+                       << std::endl;
+         }
+
+         // Test #17:
+         if (init_patch->inHierarchy() !=
+             test_patch->inHierarchy()) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #17: for level number " << ln
+                       << " initial and test level do not match for "
+                       << "inHierarchy() "
+                       << "for patch number " << tip->getLocalId() << std::endl;
+         }
+
+         // Test #18:
+         if (init_patch->getPatchGeometry()->getTouchesRegularBoundary() !=
+             test_patch->getPatchGeometry()->getTouchesRegularBoundary()) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #18: for level number " << ln
+                       << " initial and test level do not match for "
+                       << "getTouchesRegularBoundary() "
+                       << "for patch number " << tip->getLocalId() << std::endl;
+         }
+
+         // Test #19:
+         if (init_patch->getPatchGeometry()->getTouchesPeriodicBoundary() !=
+             test_patch->getPatchGeometry()->getTouchesPeriodicBoundary()) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #19: for level number " << ln
+                       << " initial and test level do not match for "
+                       << "getTouchesPeriodicBoundary() "
+                       << "for patch number " << tip->getLocalId() << std::endl;
+         }
+
+         /*
+          **************************************************************
+          * Tests 20a-20c check patch geometry data.                   *
+          **************************************************************
+          */
+
+         Pointer<PatchGeometry> init_patch_geom =
+            init_patch->getPatchGeometry();
+         Pointer<PatchGeometry> test_patch_geom =
+            test_patch->getPatchGeometry();
+
+         // Test #20a:
+         if (init_patch_geom->getRatio() !=
+             test_patch_geom->getRatio()) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #20a: for level number " << ln
+                       << " patch geometry ratio data does not match "
+                       << "for patch number " << tip->getLocalId() << std::endl;
+         }
+
+         // Test #20b:
+         if (init_patch_geom->intersectsPhysicalBoundary() !=
+             test_patch_geom->intersectsPhysicalBoundary()) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #20b: for level number " << ln
+                       << " intersectsPhysicalBoundary() does not match "
+                       << "for patch number " << tip->getLocalId() << std::endl;
+         }
+
+         // Test #20c:
+         for (int id = 1; id <= d_dim.getValue(); id++) {
+            if ((init_patch_geom->getCodimensionBoundaries(id)).getSize() !=
+                (test_patch_geom->getCodimensionBoundaries(id)).getSize()) {
+               fail_count++;
+               tbox::perr << "FAILED: - Test #20c: for level number " << ln
+                          << " number of codimension " << id
+                          << " boundary boxes does not match "
+                          << "for patch number " << tip->getLocalId() << std::endl;
+            }
+         }
+      }
+   }
+
+   return fail_count;
+}
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/hierarchy/HierarchyTester.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/hierarchy/HierarchyTester.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,158 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Manager class for patch hierarchy refine/coarsen tests. 
+ *
+ ************************************************************************/
+
+#ifndef included_HierarchyTester
+#define included_HierarchyTester
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/mesh/GriddingAlgorithm.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Dimension.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/mesh/StandardTagAndInitStrategy.h"
+#ifndef included_tbox_String
+#include <string>
+
+#define included_String
+#endif
+
+using namespace SAMRAI;
+using namespace tbox;
+using namespace hier;
+using namespace mesh;
+
+namespace SAMRAI {
+/**
+ * Class HierarchyTester tests patch hierarchy coarsen/refine operations.
+ * It sets up an initial patch hierarchy based on input file specifications.
+ * Then, depending on how the test is specified in the input file, a
+ * new patch hierarchy will be created which is either a coarsened version
+ * or a refined version of the initial hierarchy.  Then, all aspects of
+ * of the new hierarchy are compared against the initial hierarchy to
+ * check whether the hierarchy coarsenin or refining were performed
+ * correctly.
+ *
+ * The functions in this class called from main() are:
+ * \begin{enumerate}
+ *    - [setupInitialHierarchy(...)]
+ *
+ *    - [runHierarchyTestAndVerify(...)]
+ * \end{enumerate}
+ */
+
+class HierarchyTester:public StandardTagAndInitStrategy
+{
+public:
+   /**
+    * Constructor initailizes test operations based on input database.
+    */
+   HierarchyTester(
+      const std::string& object_name,
+      const tbox::Dimension& dim,
+      Pointer<Database> hier_test_db);
+
+   /**
+    * Destructor deallocates internal storage.
+    */
+   ~HierarchyTester();
+
+   /**
+    * Set up initial hierarchy used to test coarsen/refine operations.
+    */
+   void
+   setupInitialHierarchy(
+      Pointer<Database> main_input_db);
+
+   /**
+    * After hierarchy refine/coarsen operations are performed, check results
+    * and return integer number of test failures.
+    */
+   int
+   runHierarchyTestAndVerify();
+
+   /**
+    * The following two functions are declared pure virtual in the
+    * StandardTagAndInitStrategy base class.  Although they do nothing,
+    * they must be defined here for proper operation of the
+    * GriddingAlgorithm class which creates the initial patch hierarchy.
+    */
+
+   virtual void initializeLevelData(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double init_data_time,
+      const bool can_be_refined,
+      const bool initial_time,
+      const tbox::Pointer<hier::BasePatchLevel> old_level,
+      const bool allocate_data)
+   {
+      NULL_USE(hierarchy);
+      NULL_USE(level_number);
+      NULL_USE(init_data_time);
+      NULL_USE(can_be_refined);
+      NULL_USE(initial_time);
+      NULL_USE(old_level);
+      NULL_USE(allocate_data);
+   }
+
+   void resetHierarchyConfiguration(
+      const Pointer<BasePatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level)
+   {
+      NULL_USE(hierarchy);
+      NULL_USE(coarsest_level);
+      NULL_USE(finest_level);
+   }
+
+private:
+   /*
+    * Object name for error reporting.
+    */
+   std::string d_object_name;
+
+   const tbox::Dimension d_dim;
+
+   /*
+    * Booleans to indicate whether refine or coarsen is operation to test.
+    * They are initialized to false and set via input values.
+    */
+   bool d_do_refine_test;
+   bool d_do_coarsen_test;
+
+   /*
+    * Ratio to coarsen/refine hierarchy during test.
+    */
+   IntVector d_ratio;
+
+   /*
+    * Initial patch hierarchy set up based on input data and second hierarchy
+    * generated during coarsen/refine operations.
+    */
+   Pointer<PatchHierarchy> d_initial_patch_hierarchy;
+   Pointer<PatchHierarchy> d_test_patch_hierarchy;
+
+   /*
+    * Pointers to gridding algorithm object is cached in test object
+    * so that test operates properly.  If this object goes out
+    * of scope (i.e., is deleted) before test runs, boundary box
+    * calculations will be incorrect since the test assumes
+    * internal variables in gridding algorithm exist.
+    */
+   Pointer<GriddingAlgorithm> d_gridding_algorithm;
+
+};
+
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/hierarchy/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/hierarchy/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,636 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=HierarchyTester.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BergerRigoutsos.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	HierarchyTester.C HierarchyTester.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=main.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	HierarchyTester.h main.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=tbox_Pointer-HierarchyTester.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	HierarchyTester.h tbox_Pointer-HierarchyTester.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/hierarchy/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/hierarchy/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,66 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for SAMRAI patch hierarchy refine/coarsen tests 
+##
+#########################################################################
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/test/hierarchy
+VPATH         = @srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+default: check	
+
+include $(OBJECT)/config/Makefile.config
+
+CPPFLAGS_EXTRA= -DNDIM=$(PDIM)  -DTESTING=1
+
+NUM_TESTS = 4
+
+TEST_NPROCS = @TEST_NPROCS@
+
+CXX_OBJS      = HierarchyTester.o \
+		tbox_Pointer-HierarchyTester.o \
+		main.o
+
+main:	$(CXX_OBJS) $(LIBSAMRAIDEPEND) 
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) \
+	$(LIBSAMRAI3D) $(LIBSAMRAI) $(LDLIBS) -o $@
+
+check2d:	main
+	@for i in test_inputs/*2d*.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+check3d:	main
+	@for i in test_inputs/*3d*.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+check:
+	$(MAKE) check2d
+	$(MAKE) check3d
+
+checkcompile: main
+
+checktest:
+	rm -f makecheck.logfile
+	$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+	$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+	rm -f makecheck.logfile
+
+clean-check:
+	$(SAMCLEAN)
+
+clean:		clean-check
+	$(RM) main
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/test/hierarchy/main.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/hierarchy/main.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,132 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program for hierachy coarsen/refine tests. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+
+#include "SAMRAI/tbox/InputDatabase.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/PIO.h"
+#include <string>
+// using namespace std;
+#include "SAMRAI/hier/VariableDatabase.h"
+
+#include "HierarchyTester.h"
+
+using namespace SAMRAI;
+
+/*
+ ************************************************************************
+ *                                                                      *
+ *                                                                      *
+ ************************************************************************
+ */
+
+int main(
+   int argc,
+   char* argv[])
+{
+
+   int fail_count;
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   SAMRAIManager::initialize();
+   SAMRAIManager::startup();
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+
+      std::string input_filename;
+
+      if (argc != 2) {
+         TBOX_ERROR("USAGE:  " << argv[0] << " <input file> \n"
+                                          << "  options:\n"
+                                          << "  none at this time" << std::endl);
+      } else {
+         input_filename = std::string(argv[1]);
+      }
+
+      tbox::plog << "\n Starting hierarchy refine/coarsen test..." << std::endl;
+      tbox::plog << "Specified input file is: " << input_filename << std::endl;
+
+      Pointer<Database> input_db(new InputDatabase("input_db"));
+      InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      /*
+       * Retrieve "GlobalInputs" section of the input database and set
+       * values accordingly.
+       */
+
+      if (input_db->keyExists("GlobalInputs")) {
+         tbox::Pointer<tbox::Database> global_db =
+            input_db->getDatabase("GlobalInputs");
+         if (global_db->keyExists("call_abort_in_serial_instead_of_exit")) {
+            bool flag = global_db->
+               getBool("call_abort_in_serial_instead_of_exit");
+            tbox::SAMRAI_MPI::setCallAbortInSerialInsteadOfExit(flag);
+         }
+      }
+
+      Pointer<Database> main_db = input_db->getDatabase("Main");
+
+      const tbox::Dimension dim(static_cast<unsigned short>(main_db->getInteger("dim")));
+
+      std::string log_file_name = "hierarchy_test.log";
+      if (main_db->keyExists("log_file_name")) {
+         log_file_name = main_db->getString("log_file_name");
+      }
+      bool log_all_nodes = false;
+      if (main_db->keyExists("log_all_nodes")) {
+         log_all_nodes = main_db->getBool("log_all_nodes");
+      }
+      if (log_all_nodes) {
+         PIO::logAllNodes(log_file_name);
+      } else {
+         PIO::logOnlyNodeZero(log_file_name);
+      }
+
+      Pointer<HierarchyTester> hierarchy_tester(
+         new HierarchyTester("HierarchyTester",
+            dim,
+            input_db->getDatabase("HierarchyTest")));
+
+      tbox::plog << "\nCreating initial patch hierarchy..." << std::endl;
+      hierarchy_tester->setupInitialHierarchy(input_db);
+      tbox::plog << "\nInitial patch hierarchy created..." << std::endl;
+
+      tbox::plog << "\nInput file data is ...." << std::endl;
+      input_db->printClassData(plog);
+
+      tbox::plog << "\nVariable database..." << std::endl;
+      hier::VariableDatabase::getDatabase()->printClassData(tbox::plog, false);
+
+      tbox::plog << "\nPerforming refine/coarsen patch hierarchy test..."
+                 << std::endl;
+      fail_count = hierarchy_tester->runHierarchyTestAndVerify();
+      tbox::plog << "\n Ending hierarchy refine/coarsen test..." << std::endl;
+
+      if (fail_count == 0) {
+         tbox::pout << "\nPASSED:  hierarchy tester" << std::endl;
+      }
+   }
+
+   SAMRAIManager::shutdown();
+   SAMRAIManager::finalize();
+
+   tbox::SAMRAI_MPI::finalize();
+
+   return fail_count;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/hierarchy/tbox_Pointer-HierarchyTester.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/hierarchy/tbox_Pointer-HierarchyTester.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,19 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright
+ * information, see COPYRIGHT and COPYING.LESSER.
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Pointer.C"
+#include "HierarchyTester.h"
+
+namespace SAMRAI {
+
+template class tbox::Pointer<HierarchyTester>;
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/hierarchy/test_inputs/hierarchy_coarsen.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/hierarchy/test_inputs/hierarchy_coarsen.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,98 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing patch hierarchy coarsening 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+    dim = 3
+//
+// Log file information
+//
+    log_file_name  = "hierarchy-coarsen3d-test.log"
+    log_all_nodes  = TRUE
+}
+
+HierarchyTest {
+
+  do_refine_test  = FALSE
+  do_coarsen_test = TRUE
+
+  ratio = 2,2,2
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (31,23,19) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 40, 40, 40
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 2, 2, 2
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE
+  barrier_before = FALSE
+  barrier_after = FALSE
+  n_root_cycles = 1
+  interlace_groups = FALSE
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'n'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+StandardTagAndInitialize {
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+       level_0 = [ (0,16,12) , (11,23,19) ],
+                 [ (0,16,0) , (15,23,11) ],
+                 [ (16,0,0) , (31,7,7) ],
+                 [ (24,8,0) , (31,15,7) ],
+                 [ (20,0,8) , (31,11,19) ]
+   }
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/hierarchy/test_inputs/hierarchy_coarsen2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/hierarchy/test_inputs/hierarchy_coarsen2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,100 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing patch hierarchy coarsening 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+    dim = 2
+//
+// Log file information
+//
+    log_file_name  = "hierarchy-coarsen2d-test.log"
+    log_all_nodes  = TRUE
+}
+
+HierarchyTest {
+
+  do_refine_test  = FALSE
+  do_coarsen_test = TRUE
+
+  ratio = 2,2
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (31,23) ]
+   x_lo         = 0.e0 , 0.e0    // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0    // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               =  2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 2, 2
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+
+   sequentialize_patch_indices = TRUE
+}
+
+StandardTagAndInitialize {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (0,16) , (11,23) ],
+                [ (16,0) , (31,7) ],
+                [ (24,8) , (31,15) ]
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE
+  barrier_before = FALSE
+  barrier_after = FALSE
+  n_root_cycles = 1
+  interlace_groups = FALSE
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'n'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/hierarchy/test_inputs/hierarchy_refine.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/hierarchy/test_inputs/hierarchy_refine.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing patch hierarchy refining 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+    dim = 2
+//
+// Log file information
+//
+    log_file_name  = "hierarchy-refine2d-test.log"
+    log_all_nodes  = TRUE
+}
+
+HierarchyTest {
+
+  do_refine_test  = TRUE
+  do_coarsen_test = FALSE
+
+  ratio = 2,2
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0) , (41,29) ],
+                  [ (42,0) , (53,29) ],
+                  [ (0,30) , (31,45) ],
+                  [ (6,46) , (42,61) ]
+   x_lo         = 0.e0 , 0.e0    // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0    // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 3 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               =  2 , 2
+      level_2               =  2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 40, 40
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 2, 2
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+
+   sequentialize_patch_indices = TRUE
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE
+  barrier_before = FALSE
+  barrier_after = FALSE
+  n_root_cycles = 1
+  interlace_groups = FALSE
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'n'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+StandardTagAndInitialize {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (0,16) , (11,19) ],
+                     [ (12,0) , (31,19) ],
+                     [ (32,4) , (43,5) ],
+                     [ (16,20) , (21,27) ],
+                     [ (8,28) , (27,41) ],
+                     [ (20,42) , (27,55) ]
+      level_1 = [ (36,16) , (51,27) ],
+                     [ (24,64) , (31,75) ],
+                     [ (32,64) , (43,71) ]
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/hierarchy/test_inputs/hierarchy_refine.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/hierarchy/test_inputs/hierarchy_refine.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,105 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing patch hierarchy refining 
+ *
+ ************************************************************************/
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Main {
+    dim = 3
+//
+// Log file information
+//
+    log_file_name  = "hierarchy-refine3d-test.log"
+    log_all_nodes  = TRUE
+}
+
+HierarchyTest {
+
+  do_refine_test  = TRUE
+  do_coarsen_test = FALSE
+
+  ratio = 2,2,2
+
+}
+
+CartesianGridGeometry {
+   domain_boxes = [ (0,0,0) , (41,29,36) ],
+                  [ (42,0,4) , (53,29,32) ],
+                  [ (0,30,0) , (31,45,36) ],
+                  [ (6,46,19) , (42,61,36) ]
+   x_lo         = 0.e0 , 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 1.e0 , 1.e0 , 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 3 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               =  2 , 2 , 2
+      level_2               =  2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 40, 40 , 40 
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 2, 2 , 2
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE
+  barrier_before = FALSE
+  barrier_after = FALSE
+  n_root_cycles = 1
+  interlace_groups = FALSE
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'n'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+StandardTagAndInitialize {
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+       level_0 = [ (0,16,16) , (11,19,21) ],
+                      [ (12,0,0) , (31,19,21) ],
+                      [ (32,4,14) , (43,5,17) ],
+                      [ (16,20,4) , (21,27,11) ],
+                      [ (8,28,4) , (27,41,17) ]
+       level_1 = [ (36,16,14) , (51,27,17) ],
+                      [ (24,64,20) , (31,75,29) ],
+                      [ (32,64,20) , (43,71,25) ]
+   }
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/hypre/HyprePoisson.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/hypre/HyprePoisson.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,396 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Numerical routines for example Hypre Poisson solver 
+ *
+ ************************************************************************/
+#include "HyprePoisson.h"
+
+#if defined(HAVE_HYPRE)
+
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/math/HierarchyCellDataOpsReal.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/solv/PoissonSpecifications.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+extern "C" {
+void F77_FUNC(setexactandrhs2d, SETEXACTANDRHS2D) (const int & ifirst0,
+   const int & ilast0,
+   const int & ifirst1,
+   const int & ilast1,
+   double* exact,
+   double* rhs,
+   const double* dx,
+   const double* xlower);
+void F77_FUNC(setexactandrhs3d, SETEXACTANDRHS3D) (const int & ifirst0,
+   const int & ilast0,
+   const int & ifirst1,
+   const int & ilast1,
+   const int & ifirst2,
+   const int & ilast2,
+   double* exact,
+   double* rhs,
+   const double* dx,
+   const double* xlower);
+}
+
+namespace SAMRAI {
+
+/*
+ *************************************************************************
+ * Constructor creates a unique context for the object and register      *
+ * all its internal variables with the variable database.                *
+ *************************************************************************
+ */
+HyprePoisson::HyprePoisson(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> database):
+   d_object_name(object_name),
+   d_dim(dim),
+   d_hierarchy(NULL),
+   d_poisson_hypre(dim,
+                   object_name + "::poisson_hypre",
+                   (!database.isNull() &&
+                    database->isDatabase("CellPoissonHypreSolver")) ?
+                   database->getDatabase("CellPoissonHypreSolver"):
+                      tbox::Pointer<tbox::Database>(NULL)),
+   d_bc_coefs(dim,
+              object_name + "::bc_coefs",
+              (!database.isNull() &&
+               database->isDatabase("bc_coefs")) ?
+              database->getDatabase("bc_coefs"):
+                 tbox::Pointer<tbox::Database>(NULL)),
+   d_context()
+{
+
+   hier::VariableDatabase* vdb = hier::VariableDatabase::getDatabase();
+
+   /*
+    * Get a unique context for this object.
+    */
+   d_context = vdb->getContext(d_object_name + ":Context");
+
+   /*
+    * Register variables with hier::VariableDatabase
+    * and get the descriptor indices for those variables.
+    */
+   tbox::Pointer<pdat::CellVariable<double> > comp_soln(
+      new pdat::CellVariable<double>(d_dim,
+                                     object_name + ":computed solution",
+                                     1));
+   d_comp_soln_id =
+      vdb->registerVariableAndContext(
+         comp_soln,
+         d_context,
+         hier::IntVector(d_dim, 1) /* ghost cell width is 1 for stencil widths */);
+   tbox::Pointer<pdat::CellVariable<double> > exact_solution(
+      new pdat::CellVariable<double>(d_dim, object_name + ":exact solution"));
+   d_exact_id =
+      vdb->registerVariableAndContext(
+         exact_solution,
+         d_context,
+         hier::IntVector(d_dim, 1) /* ghost cell width is 1 in case needed */);
+   tbox::Pointer<pdat::CellVariable<double> > rhs_variable(
+      new pdat::CellVariable<double>(
+         d_dim,
+         object_name
+         + ":linear system right hand side"));
+   d_rhs_id =
+      vdb->registerVariableAndContext(
+         rhs_variable,
+         d_context,
+         hier::IntVector(d_dim, 0) /* ghost cell width is 0 */);
+}
+
+/*
+ *************************************************************************
+ * Destructor does nothing interesting                                   *
+ *************************************************************************
+ */
+HyprePoisson::~HyprePoisson()
+{
+}
+
+/*
+ *************************************************************************
+ * Initialize data on a level.                                           *
+ *                                                                       *
+ * Allocate the solution, exact solution and rhs memory.                 *
+ * Fill the rhs and exact solution.                                      *
+ *************************************************************************
+ */
+void HyprePoisson::initializeLevelData(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const double init_data_time,
+   const bool can_be_refined,
+   const bool initial_time,
+   const tbox::Pointer<hier::BasePatchLevel> old_level,
+   const bool allocate_data)
+{
+   (void)init_data_time;
+   (void)can_be_refined;
+   (void)initial_time;
+   (void)old_level;
+
+   tbox::Pointer<hier::PatchHierarchy> patch_hierarchy = hierarchy;
+   tbox::Pointer<geom::CartesianGridGeometry> grid_geom =
+      patch_hierarchy->getGridGeometry();
+
+   tbox::Pointer<hier::PatchLevel> level =
+      hierarchy->getPatchLevel(level_number);
+
+   /*
+    * If required, allocate all patch data on the level.
+    */
+   if (allocate_data) {
+      level->allocatePatchData(d_comp_soln_id);
+      level->allocatePatchData(d_rhs_id);
+      level->allocatePatchData(d_exact_id);
+   }
+
+   /*
+    * Initialize data in all patches in the level.
+    */
+   hier::PatchLevel::Iterator pi(*level);
+   for (pi.initialize(*level); pi; pi++) {
+
+      tbox::Pointer<hier::Patch> patch = *pi;
+      if (patch.isNull()) {
+         TBOX_ERROR(d_object_name
+            << ": Cannot find patch.  Null patch pointer.");
+      }
+      hier::Box pbox = patch->getBox();
+      tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+         patch->getPatchGeometry();
+
+      tbox::Pointer<pdat::CellData<double> > exact_data =
+         patch->getPatchData(d_exact_id);
+      tbox::Pointer<pdat::CellData<double> > rhs_data =
+         patch->getPatchData(d_rhs_id);
+
+      /*
+       * Set source function and exact solution.
+       */
+      if (d_dim == tbox::Dimension(2)) {
+         F77_FUNC(setexactandrhs2d, SETEXACTANDRHS2D) (
+            pbox.lower()[0],
+            pbox.upper()[0],
+            pbox.lower()[1],
+            pbox.upper()[1],
+            exact_data->getPointer(),
+            rhs_data->getPointer(),
+            grid_geom->getDx(),
+            patch_geom->getXLower());
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         F77_FUNC(setexactandrhs3d, SETEXACTANDRHS3D) (
+            pbox.lower()[0],
+            pbox.upper()[0],
+            pbox.lower()[1],
+            pbox.upper()[1],
+            pbox.lower()[2],
+            pbox.upper()[2],
+            exact_data->getPointer(),
+            rhs_data->getPointer(),
+            grid_geom->getDx(),
+            patch_geom->getXLower());
+      }
+
+   }    // End patch loop.
+}
+
+/*
+ *************************************************************************
+ * Reset the hierarchy-dependent internal information.                   *
+ *************************************************************************
+ */
+void HyprePoisson::resetHierarchyConfiguration(
+   tbox::Pointer<hier::BasePatchHierarchy> new_hierarchy,
+   int coarsest_level,
+   int finest_level)
+{
+   (void)coarsest_level;
+   (void)finest_level;
+
+   d_hierarchy = new_hierarchy;
+}
+
+/*
+ *************************************************************************
+ * Solve the Poisson problem.                                            *
+ *************************************************************************
+ */
+bool HyprePoisson::solvePoisson()
+{
+
+   if (d_hierarchy.isNull()) {
+      TBOX_ERROR("Cannot solve using an uninitialized object.\n");
+   }
+
+   const int level_number = 0;
+
+   /*
+    * Fill in the initial guess and Dirichlet boundary condition data.
+    * For this example, we want u=0 on all boundaries.
+    * The easiest way to do this is to just write 0 everywhere,
+    * simultaneous setting the boundary values and initial guess.
+    */
+   tbox::Pointer<hier::PatchLevel> level = d_hierarchy->getPatchLevel(
+         level_number);
+   hier::PatchLevel::Iterator ip(level);
+   for ( ; ip; ip++) {
+      tbox::Pointer<hier::Patch> patch = *ip;
+      tbox::Pointer<pdat::CellData<double> > data = patch->getPatchData(
+            d_comp_soln_id);
+      data->fill(0.0);
+   }
+   // d_poisson_hypre.setBoundaries( "Dirichlet" );
+   d_poisson_hypre.setPhysicalBcCoefObject(&d_bc_coefs);
+
+   /*
+    * Set up HYPRE solver object.
+    * The problem specification is set using the
+    * CellPoissonSpecifications object then passed to the solver
+    * for setting the coefficients.
+    */
+   d_poisson_hypre.initializeSolverState(d_hierarchy,
+      level_number);
+   solv::PoissonSpecifications sps("Hypre Poisson solver");
+   sps.setCZero();
+   sps.setDConstant(1.0);
+   d_poisson_hypre.setMatrixCoefficients(sps);
+
+   /*
+    * Solve the system.
+    */
+   tbox::plog << "solving..." << std::endl;
+   int solver_ret;
+   solver_ret = d_poisson_hypre.solveSystem(d_comp_soln_id,
+         d_rhs_id);
+   /*
+    * Present data on the solve.
+    */
+   tbox::plog << "\t" << (solver_ret ? "" : "NOT ") << "converged " << "\n"
+              << "	iterations: "<< d_poisson_hypre.getNumberOfIterations()
+              << "\n"
+              << "	residual: "<< d_poisson_hypre.getRelativeResidualNorm()
+              << "\n"
+              << std::flush;
+
+   /*
+    * Deallocate state.
+    */
+   d_poisson_hypre.deallocateSolverState();
+
+   /*
+    * Return whether solver converged.
+    */
+   return solver_ret ? true : false;
+}
+
+#ifdef HAVE_HDF5
+/*
+ *************************************************************************
+ * Set up VisIt to plot internal data from this class.                   *
+ * Tell the plotter about the refinement ratios.  Register variables     *
+ * appropriate for plotting.                                             *
+ *************************************************************************
+ */
+int HyprePoisson::registerVariablesWithPlotter(
+   appu::VisItDataWriter& visit_writer) const {
+
+   /*
+    * This must be done once.
+    */
+   if (d_hierarchy.isNull()) {
+      TBOX_ERROR(
+         d_object_name << ": No hierarchy in\n"
+         <<
+         " HyprePoisson::registerVariablesWithPlotter\n"
+         <<
+         "The hierarchy must be built before calling\n"
+         << "this function.\n");
+   }
+   /*
+    * Register variables with plotter.
+    */
+   visit_writer.registerPlotQuantity("Computed solution",
+      "SCALAR",
+      d_comp_soln_id);
+   visit_writer.registerDerivedPlotQuantity("Error",
+      "SCALAR",
+      (appu::VisDerivedDataStrategy *)this);
+   visit_writer.registerPlotQuantity("Exact solution",
+      "SCALAR",
+      d_exact_id);
+   visit_writer.registerPlotQuantity("Poisson source",
+      "SCALAR",
+      d_rhs_id);
+   visit_writer.registerDerivedPlotQuantity("Patch level number",
+      "SCALAR",
+      (appu::VisDerivedDataStrategy *)this);
+
+   return 0;
+}
+#endif
+
+/*
+ *************************************************************************
+ * Write derived data to the given stream.                               *
+ *************************************************************************
+ */
+bool HyprePoisson::packDerivedDataIntoDoubleBuffer(
+   double* buffer,
+   const hier::Patch& patch,
+   const hier::Box& region,
+   const std::string& variable_name,
+   int depth_id) const
+{
+   (void)region;
+   (void)depth_id;
+
+   pdat::CellData<double>::Iterator icell(patch.getBox());
+
+   if (variable_name == "Error") {
+      tbox::Pointer<pdat::CellData<double> > current_solution_ =
+         patch.getPatchData(d_comp_soln_id);
+      tbox::Pointer<pdat::CellData<double> > exact_solution_ =
+         patch.getPatchData(d_exact_id);
+      pdat::CellData<double>& current_solution = *current_solution_;
+      pdat::CellData<double>& exact_solution = *exact_solution_;
+      for ( ; icell; icell++) {
+         double diff = (current_solution(*icell) - exact_solution(*icell));
+         *buffer = diff;
+         buffer += 1;
+      }
+   } else if (variable_name == "Patch level number") {
+      double pln = patch.getPatchLevelNumber();
+      for ( ; icell; icell++) {
+         *buffer = pln;
+         buffer += 1;
+      }
+   } else {
+      // Did not register this name.
+      TBOX_ERROR(
+         "Unregistered variable name '" << variable_name << "' in\n"
+         <<
+         "HyprePoissonX::writeDerivedDataToStream");
+
+   }
+   return true;
+}
+
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/hypre/HyprePoisson.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/hypre/HyprePoisson.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,227 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Example user class for solving Poisson using Hypre. 
+ *
+ ************************************************************************/
+#ifndef included_HyprePoisson
+#define included_HyprePoisson
+
+#include "SAMRAI/SAMRAI_config.h"
+
+using namespace std;
+
+#if !defined(HAVE_HYPRE)
+
+/*
+ *************************************************************************
+ * If the library is not compiled with hypre, print an error.
+ * If we're running autotests, skip the error and compile an empty
+ * class.
+ *************************************************************************
+ */
+#if (TESTING != 1)
+#error "This example requires SAMRAI be compiled with hypre."
+#endif
+
+#else
+
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/solv/LocationIndexRobinBcCoefs.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/solv/CellPoissonHypreSolver.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/mesh/StandardTagAndInitStrategy.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/appu/VisDerivedDataStrategy.h"
+#include "SAMRAI/appu/VisItDataWriter.h"
+
+namespace SAMRAI {
+
+/*!
+ * @brief Class to solve a sample Poisson equation on a SAMR grid.
+ *
+ * This class demonstrates how use the HYPRE Poisson solver
+ * class to solve Poisson's equation on a single level
+ * within a hierarchy.
+ *
+ * We set up and solve the following problem:
+ *
+ *   2d: div(grad(u)) = -2 (pi^2) sin(pi x) sin(pi y)
+ *
+ *   3d: div(grad(u)) = -3 (pi^2) sin(pi x) sin(pi y) sin(pi z)
+ *
+ * which has the exact solution
+ *
+ *   2d: u = sin(pi x) sin(pi y)
+ *
+ *   3d: u = sin(pi x) sin(pi y) sin(pi z)
+ *
+ * This class inherits and implements virtual functions from
+ * - mesh::StandardTagAndInitStrategy to initialize data
+ *   on the SAMR grid.
+ * - appu::VisDerivedDataStrategy to write out certain data
+ *   in a vis file, such as the error of the solution.
+ */
+class HyprePoisson:
+   public mesh::StandardTagAndInitStrategy,
+   public appu::VisDerivedDataStrategy
+{
+
+public:
+   /*!
+    * @brief Constructor.
+    *
+    * If you want standard output and logging,
+    * pass in valid pointers for those streams.
+    *
+    * @param object_name Ojbect name
+    */
+   HyprePoisson(
+      const string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> database =
+         tbox::Pointer<tbox::Database>(NULL));
+
+   virtual ~HyprePoisson();
+
+   //@{ @name mesh::StandardTagAndInitStrategy virtuals
+
+   /*!
+    * @brief Allocate and initialize data for a new level
+    * in the patch hierarchy.
+    *
+    * This is where you implement the code for initialize data on
+    * the grid.  All the information needed to initialize the grid
+    * are in the arguments.
+    *
+    * @see mesh::StandardTagAndInitStrategy::initializeLevelData()
+    */
+   virtual void
+   initializeLevelData(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double init_data_time,
+      const bool can_be_refined,
+      const bool initial_time,
+      const tbox::Pointer<hier::BasePatchLevel> old_level =
+         tbox::Pointer<hier::BasePatchLevel>((0)),
+      const bool allocate_data = true);
+
+   /*!
+    * @brief Reset any internal hierarchy-dependent information.
+    */
+   virtual void
+   resetHierarchyConfiguration(
+      tbox::Pointer<hier::BasePatchHierarchy> new_hierarchy,
+      int coarsest_level,
+      int finest_level);
+
+   //@}
+
+   //@{ @name appu::VisDerivedDataStrategy virtuals
+
+   virtual bool
+   packDerivedDataIntoDoubleBuffer(
+      double* buffer,
+      const hier::Patch& patch,
+      const hier::Box& region,
+      const std::string& variable_name,
+      int depth_id) const;
+
+   //@}
+
+   /*!
+    * @brief Solve using HYPRE Poisson solver
+    *
+    * Set up the linear algebra problem and use a
+    * solv::CellPoissonHypreSolver object to solve it.
+    * -# Set initial guess
+    * -# Set boundary conditions
+    * -# Specify Poisson equation parameters
+    * -# Call solver
+    *
+    * @return whether solver converged
+    */
+   bool
+   solvePoisson();
+
+   /*!
+    * @brief Set up external plotter to plot internal
+    * data from this class.
+    *
+    * After calling this function, the external
+    * data writer may be used to write the
+    * visit file for this object.
+    *
+    * The internal hierarchy is used and must be
+    * established before calling this function.
+    * (This is commonly done by building a hierarchy
+    * with the mesh::StandardTagAndInitStrategy virtual
+    * functions implemented by this class.)
+    *
+    * @param visit_writer VisIt data writer
+    */
+   int
+   registerVariablesWithPlotter(
+      appu::VisItDataWriter& visit_writer) const;
+
+private:
+   std::string d_object_name;
+
+   const tbox::Dimension d_dim;
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+
+   //@{
+   /*!
+    * @name Major algorithm objects.
+    */
+
+   /*!
+    * @brief HYPRE poisson solver.
+    */
+   solv::CellPoissonHypreSolver d_poisson_hypre;
+
+   /*!
+    * @brief Boundary condition coefficient implementation.
+    */
+   solv::LocationIndexRobinBcCoefs d_bc_coefs;
+
+   //@}
+
+   //@{
+private:
+   /*!
+    * @name Private state variables for solution.
+    */
+
+   /*!
+    * @brief Context owned by this object.
+    */
+   tbox::Pointer<hier::VariableContext> d_context;
+
+   /*!
+    * @brief Descriptor indices of internal data.
+    *
+    * These are initialized in the constructor and never change.
+    */
+   int d_comp_soln_id, d_exact_id, d_rhs_id;
+
+   //@}
+
+};
+
+}
+
+#endif
+#endif  // included_HyprePoisson
diff -r 000000000000 -r 5eda1a3f24e8 source/test/hypre/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/hypre/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,511 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=HyprePoisson.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/CoarseFineBoundary.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/GhostCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/LocationIndexRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SimpleCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	HyprePoisson.C HyprePoisson.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=main.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/CoarseFineBoundary.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BergerRigoutsos.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/GhostCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/LocationIndexRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SimpleCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h HyprePoisson.h	\
+	main.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/hypre/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/hypre/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,77 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for SAMRAI HYPRE interface test 
+##
+#########################################################################
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/test/hypre
+VPATH         = @srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+default: check
+
+include $(OBJECT)/config/Makefile.config
+
+CPPFLAGS_EXTRA= -DNDIM=$(PDIM) -DTESTING=1
+
+NUM_TESTS = 2
+
+TEST_NPROCS = @TEST_NPROCS@
+
+CXX_OBJS      = main.o HyprePoisson.o
+F_OBJS      = hyprepoisson2d.o hyprepoisson3d.o
+
+main:	$(CXX_OBJS) $(F_OBJS) $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) $(F_OBJS) \
+	$(LIBSAMRAI3D) $(LIBSAMRAI3D) $(LIBSAMRAI) $(LDLIBS) -o $@
+
+include $(SRCDIR)/Makefile.depend
+
+FORTRAN         = $(SRCDIR)/fortran
+M4DIRS          = -DFORTDIR=$(FORTRAN) $(SAMRAI_M4_FLAGS)
+
+hyprepoisson2d.o:	$(FORTRAN)/hyprepoisson2d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/hyprepoisson2d.m4 > hyprepoisson2d.f
+	$(F77) $(FFLAGS) -c hyprepoisson2d.f -o $@
+
+hyprepoisson3d.o:	$(FORTRAN)/hyprepoisson3d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/hyprepoisson3d.m4 > hyprepoisson3d.f
+	$(F77) $(FFLAGS) -c hyprepoisson3d.f -o $@
+
+check:
+	$(MAKE) check2d
+	$(MAKE) check3d
+
+check2d:	main
+	@for i in test_inputs/*2d*.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+check3d:	main
+	@for i in test_inputs/*3d*.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+checkcompile: main
+
+checktest:
+	rm -f makecheck.logfile
+	$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+	$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+	rm -f makecheck.logfile
+
+clean-check:
+	$(SAMCLEAN)
+
+clean:		clean-check
+	$(RM) main
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/hypre/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/hypre/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,68 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   Hypre Poisson solver example
+##
+#########################################################################
+****************************************************************************
+*                                                                          *
+*  We set up the simple problem                                            *
+*           u + div(grad(u)) = sin(x)*sin(y)                               *
+*  in the domain [0:1]x[0:1], with u=0 on the                              *
+*  boundary.                                                               *
+*                                                                          *
+****************************************************************************
+
+This example demonstrates use of the PoissonHypreSolver class in a SAMRAI
+application. 
+The files/classes included in this directory are as follows:
+ 
+          main          -  example main program
+	  HyprePoisson  -  Class to set up and solve the scalar
+                           Poisson equation on a single level.
+                           Also supplies required implementations
+                           to interfaces for building grid and
+                           plotting.
+
+COMPILE and RUN
+---------------
+Compile:  make main2d main3d
+Run:      main2d 2d.default.input
+          main3d 3d.default.input
+ 
+
+INPUTS
+------
+
+Main {                                                          
+   base_name = <string> [All names used are derived from this one.]
+   log_all_nodes = <bool> [log all nodes or node 0 only?]
+   residual_tol = <double> [Tolerance for solve]
+}
+
+CartesianGeometry {
+   // Define the domain.
+   // See SAMRAI documentation for inputs.
+}
+
+StandardTagAndInitialize {
+   // Use default settings for this example.
+   // See SAMRAI documentation for inputs.
+}
+
+LoadBalancer{
+   // Use default settings for this example.
+   // See SAMRAI documentation for inputs.
+}
+
+GriddingAlgorithm {
+   max_levels = 1
+   largest_patch_size {
+      level_0 = 32, 32
+      // all finer levels will use same values as level_0...
+   }
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/hypre/fortran/hyprepoisson2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/hypre/fortran/hyprepoisson2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,43 @@
+define(NDIM,2)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+      subroutine setexactandrhs2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  exact,rhs,dx,xlower)
+c***********************************************************************
+      implicit none
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:NDIM-1),
+     &     xlower(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     exact(CELL2d(ifirst,ilast,1)),
+     &     rhs(CELL2d(ifirst,ilast,0))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1
+      REAL x, y, sinsin, pi
+
+      pi=3.141592654
+
+      do ic1=ifirst1,ilast1
+        y = xlower(1) + dx(1)*(ic1-ifirst1+0.5)
+        do ic0=ifirst0,ilast0
+	  x = xlower(0) + dx(0)*(ic0-ifirst0+0.5)
+          sinsin = sin(pi*x) * sin(pi*y)
+          exact(ic0,ic1) = sinsin
+          rhs(ic0,ic1) = -NDIM*pi*pi*sinsin
+        enddo
+      enddo
+
+      return
+      end   
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/test/hypre/fortran/hyprepoisson3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/hypre/fortran/hyprepoisson3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,48 @@
+define(NDIM,3)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine setexactandrhs3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  exact,rhs,dx,xlower)
+c***********************************************************************
+      implicit none
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:NDIM-1),
+     &     xlower(0:NDIM-1)
+c variables in 3d cell indexed         
+      REAL
+     &     exact(CELL3d(ifirst,ilast,1)),
+     &     rhs(CELL3d(ifirst,ilast,0))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2
+      REAL x, y, z, sinsin, pi
+
+      pi=3.141592654
+
+c     write(6,*) "In fluxcorrec()"
+c     ******************************************************************
+      do ic2=ifirst2,ilast2
+         z = xlower(2) + dx(2)*(ic2-ifirst2+0.5)
+         do ic1=ifirst1,ilast1
+            y = xlower(1) + dx(1)*(ic1-ifirst1+0.5)
+            do ic0=ifirst0,ilast0
+               x = xlower(0) + dx(0)*(ic0-ifirst0+0.5)
+               sinsin = sin(pi*x) * sin(pi*y) * sin(pi*z)
+               exact(ic0,ic1,ic2) = sinsin
+               rhs(ic0,ic1,ic2) = -NDIM*pi*pi*sinsin
+            enddo
+         enddo
+      enddo
+
+      return
+      end   
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/test/hypre/main.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/hypre/main.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,287 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program for Hypre Poisson example 
+ *
+ ************************************************************************/
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <string>
+using namespace std;
+
+#include "SAMRAI/mesh/BergerRigoutsos.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/mesh/GriddingAlgorithm.h"
+#include "SAMRAI/tbox/InputDatabase.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/mesh/TreeLoadBalancer.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/mesh/StandardTagAndInitialize.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/appu/VisItDataWriter.h"
+
+#include "HyprePoisson.h"
+
+using namespace SAMRAI;
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * This is the driver program to demonstrate                            *
+ * how to use the Hypre Poisson solver.                                 *
+ *                                                                      *
+ * We set up the simple problem                                         *
+ *          u + div(grad(u)) = sin(x)*sin(y)                            *
+ * in the domain [0:1]x[0:1], with u=0 on the                           *
+ * boundary.                                                            *
+ *                                                                      *
+ * HyprePoisson is the primary object used to                           *
+ * set up and solve the system.  It maintains                           *
+ * the data for the computed solution u, the                            *
+ * exact solution, and the right hand side.                             *
+ *                                                                      *
+ * The hierarchy created to solve this problem                          *
+ * has only one level.  (The Hypre Poisson solver                       *
+ * is a single-level solver.)                                           *
+ *                                                                      *
+ *************************************************************************
+ */
+
+int main(
+   int argc,
+   char* argv[])
+{
+   /*
+    * Initialize MPI, SAMRAI, and enable logging.
+    */
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+      bool converged = true;
+
+#if !defined(HAVE_HYPRE)
+      tbox::pout << "This example requires the package HYPRE"
+                 << "\nto work properly.  SAMRAI was not configured"
+                 << "\nwith this package."
+                 << endl;
+#else
+
+      /*
+       * Process command line arguments.  For each run, the input
+       * filename must be specified.  Usage is:
+       *
+       *    executable <input file name>
+       *
+       */
+      string input_filename;
+
+      if (argc != 2) {
+         TBOX_ERROR("USAGE:  " << argv[0] << " <input file> \n"
+                                          << "  options:\n"
+                                          << "  none at this time" << endl);
+      } else {
+         input_filename = argv[1];
+      }
+
+      /*
+       * Create input database and parse all data in input file.
+       */
+
+      tbox::Pointer<tbox::Database> input_db(new tbox::InputDatabase("input_db"));
+      tbox::InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      /*
+       * Retrieve "Main" section from input database.
+       * The main database is used only in main().
+       * The base_name variable is a base name for
+       * all name strings in this program.
+       */
+
+      tbox::Pointer<tbox::Database> main_db = input_db->getDatabase("Main");
+
+      const tbox::Dimension dim(static_cast<unsigned short>(main_db->getInteger("dim")));
+
+      string base_name = "unnamed";
+      base_name = main_db->getStringWithDefault("base_name", base_name);
+
+      /*
+       * Start logging.
+       */
+      const string log_file_name = base_name + ".log";
+      bool log_all_nodes = false;
+      log_all_nodes = main_db->getBoolWithDefault("log_all_nodes",
+            log_all_nodes);
+      if (log_all_nodes) {
+         tbox::PIO::logAllNodes(log_file_name);
+      } else {
+         tbox::PIO::logOnlyNodeZero(log_file_name);
+      }
+
+      /*
+       * Create major algorithm and data objects which comprise application.
+       * Each object will be initialized either from input data or restart
+       * files, or a combination of both.  Refer to each class constructor
+       * for details.  For more information on the composition of objects
+       * for this application, see comments at top of file.
+       */
+
+      tbox::Pointer<geom::CartesianGridGeometry> grid_geometry(
+         new geom::CartesianGridGeometry(dim,
+            base_name + "CartesianGeometry",
+            input_db->getDatabase("CartesianGeometry")));
+      tbox::plog << "Cartesian Geometry:" << endl;
+      grid_geometry->printClassData(tbox::plog);
+
+      tbox::Pointer<hier::PatchHierarchy> patch_hierarchy(
+         new hier::PatchHierarchy(base_name + "::PatchHierarchy",
+            grid_geometry,
+            input_db->getDatabase("PatchHierarchy")));
+
+      /*
+       * The HyprePoisson object is the main user object specific to the
+       * problem being solved.  It provides the implementations for setting
+       * up the grid and plotting data.  It also wraps up the solve
+       * process that includes making the initial guess, specifying the
+       * boundary conditions and call the solver.
+       */
+      HyprePoisson hypre_poisson(
+         base_name + "::HyprePoisson",
+         dim,
+         input_db->isDatabase("HyprePoisson") ?
+         input_db->getDatabase("HyprePoisson") :
+         tbox::Pointer<tbox::Database>(NULL));
+
+      /*
+       * Create the tag-and-initializer, box-generator and load-balancer
+       * object references required by the gridding_algorithm object.
+       */
+      tbox::Pointer<mesh::StandardTagAndInitialize> tag_and_initializer(
+         new mesh::StandardTagAndInitialize(
+            dim,
+            "CellTaggingMethod",
+            tbox::Pointer<mesh::StandardTagAndInitStrategy>(&hypre_poisson,
+               false),
+            input_db->getDatabase("StandardTagAndInitialize")
+            ));
+      tbox::Pointer<mesh::BergerRigoutsos> box_generator(
+         new mesh::BergerRigoutsos(
+            dim,
+            input_db->getDatabase("BergerRigoutsos")));
+      tbox::Pointer<mesh::TreeLoadBalancer> load_balancer(
+         new mesh::TreeLoadBalancer(
+            dim,
+            "load balancer",
+            input_db->getDatabase("TreeLoadBalancer")));
+      load_balancer->setSAMRAI_MPI(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+      /*
+       * Create the gridding algorithm used to generate the SAMR grid
+       * and create the grid.
+       */
+      tbox::Pointer<mesh::GriddingAlgorithm> gridding_algorithm;
+      gridding_algorithm =
+         new mesh::GriddingAlgorithm(
+            patch_hierarchy,
+            "DistributedGridding Algorithm",
+            input_db->getDatabase("GriddingAlgorithm"),
+            tag_and_initializer,
+            box_generator,
+            load_balancer);
+      tbox::plog << "Gridding algorithm:" << endl;
+      gridding_algorithm->printClassData(tbox::plog);
+
+      /*
+       * Make the coarsest patch level where we will be solving.
+       */
+      gridding_algorithm->makeCoarsestLevel(0.0);
+
+      /*
+       * Set up the plotter for the hierarchy just created.
+       * The FACPoisson object handles the data and has the
+       * function setupExternalPlotter to register its data
+       * with the plotter.
+       */
+      tbox::Array<string> vis_writer(1);
+      vis_writer[0] = "Visit";
+      if (main_db->keyExists("vis_writer")) {
+         vis_writer = main_db->getStringArray("vis_writer");
+      }
+      bool use_visit = false;
+      for (int i = 0; i < vis_writer.getSize(); i++) {
+         if (vis_writer[i] == "VisIt") use_visit = true;
+      }
+      string vis_filename =
+         main_db->getStringWithDefault("vis_filename", base_name);
+#ifdef HAVE_HDF5
+      tbox::Pointer<appu::VisItDataWriter> visit_writer;
+      if (use_visit) {
+         visit_writer = new appu::VisItDataWriter(dim,
+               "Visit Writer",
+               vis_filename + ".visit");
+         hypre_poisson.registerVariablesWithPlotter(*visit_writer);
+      }
+#endif
+
+      /*
+       * After creating all objects and initializing their state,
+       * we print the input database and variable database contents
+       * to the log file.
+       */
+      tbox::plog << "\nCheck input data and variables before simulation:"
+                 << endl;
+      tbox::plog << "Input database..." << endl;
+      input_db->printClassData(tbox::plog);
+
+      /*
+       * Solve.
+       */
+      converged = hypre_poisson.solvePoisson();
+
+      /*
+       * Plot.
+       */
+#ifdef HAVE_HDF5
+      if (use_visit) {
+         visit_writer->writePlotData(patch_hierarchy, 0);
+      }
+#endif
+
+      /*
+       * Deallocate objects when done.
+       */
+
+      tbox::TimerManager::getManager()->print(tbox::plog);
+
+#endif
+
+#ifdef TESTING
+      if (converged) {
+         tbox::pout << "\nPASSED:  hypre" << endl;
+      } else {
+         TBOX_WARNING("Hypre test did not converge.");
+      }
+#endif
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return 0;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/hypre/test_inputs/default.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/hypre/test_inputs/default.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,136 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright
+ * information, see COPYRIGHT and COPYING.LESSER.
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for hypre test.
+ *
+ ************************************************************************/
+
+Main {
+  dim = 2
+  base_name = "default2"
+  log_all_nodes = FALSE
+  // Visualization writers to write files for.
+  vis_writer = "VisIt"
+}
+
+HyprePoisson {
+  CellPoissonHypreSolver {
+    use_smg = TRUE	// Whether to use HYPRE's SMG instead of PFMG.
+    print_solver_info = TRUE
+    max_iterations = 20             // Max iterations used by Hypre
+    relative_residual_tol = 1.0e-8  // Residual tolerance used by Hypre
+    num_pre_relax_steps = 1         // # of presmoothing steps used by Hypre
+    num_post_relax_steps = 1        // # of postsmoothing steps used by Hypre
+  }
+  bc_coefs {
+    // These are the boundary condition specifications.  The number
+    // after "boundary_" is the location index of the boundary.
+    // The inputs are arrays of strings where the first string
+    // indicates the type of values you want to set.  "slope" means
+    // boundary slope, "value" means boundary value, and "coefficients"
+    // mean the raw Robin boundary condition coefficients.
+    // The remaining strings are converted into numbers as
+    // appropriate for what boundary condition you specified with
+    // the first string.  Other boundary conditions are possible.
+    // see the solv_RobinBcCoefStrategy class.
+    // Examples:
+    boundary_0 = "value", "0"
+    boundary_1 = "coefficients", "1", "0"
+    boundary_2 = "value", "0"
+    boundary_3 = "value", "0"
+  }
+
+}
+
+CartesianGeometry {
+  domain_boxes = [(0,0), (31,31)]
+  x_lo         = 0, 0
+  x_up         = 1, 1
+}
+
+StandardTagAndInitialize {
+  // Use default settings for this example.
+}
+
+BergerRigoutsos {
+  log_node_history = FALSE
+  log_cluster_summary = TRUE
+  log_cluster = FALSE
+    // algo_advance_mode: "SYNCHRONOUS", "ADVANCE_SOME", "ROUND_ROBIN" or "ADVANCE_ANY"
+  algo_advance_mode = "ADVANCE_SOME"
+  // algo_advance_mode = "SYNCHRONOUS"
+  // owner_mode: "SINGLE_OWNER", "MOST_OVERLAP" (default), "FEWEST_OWNED", "LEAST_ACTIVE"
+  // owner_mode = "FEWEST_OWNED"
+  owner_mode = "MOST_OVERLAP"
+  // owner_mode = "SINGLE_OWNER"
+  use_level_boxes = FALSE
+  use_private_communicator = TRUE
+  sequentialize_output_indices = TRUE
+  max_box_size = 40, 40
+  barrier_before_cluster = FALSE
+}
+
+LoadBalancer{
+  // Use default settings for this example.
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE
+  barrier_before = FALSE
+  barrier_after = FALSE
+  n_root_cycles = 2
+  interlace_groups = FALSE
+}
+
+PatchHierarchy {
+   max_levels = 1
+   proper_nesting_buffer = 2, 2, 2, 2, 2, 2
+   // load_balance = FALSE
+   largest_patch_size {
+      // level_0 = 8, 8
+      level_0 = -1, -1
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 2,2
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+      level_3            = 2, 2
+      level_4            = 2, 2
+      level_5            = 2, 2
+      level_6            = 2, 2
+      level_7            = 2, 2
+      level_8            = 2, 2
+      level_9            = 2, 2
+      //  etc.
+   }
+   allow_patches_smaller_than_ghostwidth = TRUE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = FALSE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.70
+   combine_efficiency = 0.95
+   // write_regrid_boxes = TRUE
+   // read_regrid_boxes = TRUE
+   // regrid_boxes_filename = "grid"
+   check_nonrefined_tags = "IGNORE"
+   extend_tags_to_bdry = TRUE
+   sequentialize_patch_indices = TRUE
+   barrier_before_regrid = TRUE
+   barrier_before_find_refinement = TRUE
+   barrier_before_cluster = TRUE
+   barrier_before_nest = TRUE
+   barrier_before_limit = TRUE
+   barrier_before_extend = TRUE
+   barrier_before_balance = TRUE
+   barrier_after_find_refinement = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/hypre/test_inputs/default.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/hypre/test_inputs/default.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright
+ * information, see COPYRIGHT and COPYING.LESSER.
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for hypre test.
+ *
+ ************************************************************************/
+
+Main {
+  dim = 3
+  base_name = "default3"
+  log_all_nodes = FALSE
+  // Visualization writers to write files for.
+  vis_writer = "VisIt"
+}
+
+HyprePoisson {
+  CellPoissonHypreSolver {
+    use_smg = TRUE	// Whether to use HYPRE's SMG instead of PFMG.
+    print_solver_info = TRUE
+    max_iterations = 20             // Max iterations used by Hypre
+    relative_residual_tol = 1.0e-8  // Residual tolerance used by Hypre
+    num_pre_relax_steps = 1         // # of presmoothing steps used by Hypre
+    num_post_relax_steps = 1        // # of postsmoothing steps used by Hypre
+  }
+  bc_coefs {
+    // These are the boundary condition specifications.  The number
+    // after "boundary_" is the location index of the boundary.
+    // The inputs are arrays of strings where the first string
+    // indicates the type of values you want to set.  "slope" means
+    // boundary slope, "value" means boundary value, and "coefficients"
+    // mean the raw Robin boundary condition coefficients.
+    // The remaining strings are converted into numbers as
+    // appropriate for what boundary condition you specified with
+    // the first string.  Other boundary conditions are possible.
+    // see the solv_RobinBcCoefStrategy class.
+    // Examples:
+    boundary_0 = "value", "0"
+    boundary_1 = "coefficients", "1", "0"
+    boundary_2 = "value", "0"
+    boundary_3 = "value", "0"
+    boundary_4 = "value", "0"
+    boundary_5 = "value", "0"
+  }
+
+}
+
+CartesianGeometry {
+  domain_boxes = [(0,0,0), (16,16,16)]
+  x_lo         = 0, 0, 0
+  x_up         = 1, 1, 1
+}
+
+StandardTagAndInitialize {
+  // Use default settings for this example.
+}
+
+BergerRigoutsos {
+  log_node_history = FALSE
+  log_cluster_summary = TRUE
+  log_cluster = FALSE
+    // algo_advance_mode: "SYNCHRONOUS", "ADVANCE_SOME", "ROUND_ROBIN" or "ADVANCE_ANY"
+  algo_advance_mode = "ADVANCE_SOME"
+  // algo_advance_mode = "SYNCHRONOUS"
+  // owner_mode: "SINGLE_OWNER", "MOST_OVERLAP" (default), "FEWEST_OWNED", "LEAST_ACTIVE"
+  owner_mode = "MOST_OVERLAP"
+  // owner_mode = "SINGLE_OWNER"
+  use_level_boxes = FALSE
+  use_private_communicator = TRUE
+  sequentialize_output_indices = TRUE
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE
+  barrier_before = FALSE
+  barrier_after = FALSE
+  n_root_cycles = 3
+}
+
+PatchHierarchy {
+   max_levels = 5
+   largest_patch_size {
+      level_0 = 16,16,16
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 4,4,4
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+      level_3            = 2, 2, 2
+      level_4            = 2, 2, 2
+      level_5            = 2, 2, 2
+      level_6            = 2, 2, 2
+      level_7            = 2, 2, 2
+      level_8            = 2, 2, 2
+      level_9            = 2, 2, 2
+      //  etc.
+   }
+   allow_patches_smaller_than_ghostwidth = TRUE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   // load_balance = FALSE
+   combine_efficiency = 0.88
+   efficiency_tolerance = 0.88
+   // write_regrid_boxes = TRUE
+   // read_regrid_boxes = TRUE
+   // regrid_boxes_filename = "grid"
+   check_nonrefined_tags = "IGNORE"
+   extend_tags_to_bdry = TRUE
+   sequentialize_patch_indices = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/ieee/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/ieee/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,58 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=ieee_test.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IEEE.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IEEE.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h ieee_test.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/ieee/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/ieee/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,54 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for ieee test case 
+##
+#########################################################################
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/test/ieee
+VPATH         = @srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+default: check	
+
+include $(OBJECT)/config/Makefile.config
+
+CPPFLAGS_EXTRA= -DDISPLAY -DNDIM=2  -DTESTING=1
+
+NUM_TESTS = 1
+
+TEST_NPROCS   = @TEST_NPROCS@
+
+CXX_OBJS      = ieee_test.o
+
+main:		$(CXX_OBJS) $(LIBSAMRAIDEPEND) 
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) $(LIBSAMRAI) $(LDLIBS) -o $@
+
+check:		main
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main
+
+check2d:
+	$(MAKE) check
+
+check3d:
+	$(MAKE) check
+
+checkcompile: main
+
+checktest:
+	rm -f makecheck.logfile
+	$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+	$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+	rm -f makecheck.logfile
+
+clean:
+	$(SAMCLEAN)
+	$(RM) main
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/test/ieee/ieee_test.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/ieee/ieee_test.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,236 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   simple test code for the IEEE exception handlers 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <fstream>
+// using namespace std;
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/IEEE.h"
+
+using namespace SAMRAI;
+
+//  A successful signaling operation will stop the program, making it
+//  difficult to test a variety of operations in a single executable.
+//  Uncomment the particular case you want to test and recompile:
+
+//#define SIGOPS_SUN_F0
+//#define SIGOPS_SUN_D0
+//#define SIGOPS_SUN_F1
+//#define SIGOPS_SUN_D1
+//#define SIGOPS_F2
+//#define SIGOPS_D2
+//#define SIGOPS_F3
+//#define SIGOPS_D3
+
+int main(
+   int argc,
+   char** argv)
+{
+   /*
+    * Initialize MPI, SAMRAI, and enable logging.
+    */
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   tbox::IEEE::setupFloatingPointExceptionHandlers();
+
+   /*
+    * Try using variables set to NaN and see if the signal handler catches
+    * and stops the program.  Note that the TESTSIGNAL flag is not defined
+    * by default as it will stop this executable, signaling to the script
+    * there was an error, even though this is the desired behavior.
+    */
+
+   int fail_count = 0;
+
+#ifdef SIGOPS_SUN_F0
+   float f0 = tbox::MathUtilities<float>::getSignalingNaN();
+   tbox::pout
+   << "\nThis operation should stop the executable if signal handling "
+   << "\nis working (under solaris)..." << std::endl;
+   tbox::pout << "f0 = " << f0 << std::endl;
+   tbox::pout << "f0 * 1.0 = " << std::endl;
+   tbox::pout << f0 * 1.0 << std::endl;
+   tbox::pout << "The operation worked so SIGNAL HANDLING IS NOT ENABLED"
+              << std::endl;
+#endif
+
+#ifdef SIGOPS_SUN_D0
+   double d0 = tbox::MathUtilities<double>::getSignalingNaN();
+   tbox::pout
+   << "\nThis operation should stop the executable if signal handling "
+   << "\nis working (under solaris)..." << std::endl;
+   tbox::pout << "d0 = " << d0 << std::endl;
+   tbox::pout << "d0 * 1.0 = " << std::endl;
+   tbox::pout << d0 * 1.0 << std::endl;
+   tbox::pout << "The operation worked so SIGNAL HANDLING IS NOT ENABLED"
+              << std::endl;
+#endif
+
+#ifdef SIGOPS_SUN_F1
+   float f1 = tbox::MathUtilities<float>::getSignalingNaN();
+   tbox::pout
+   << "\nThis operation should stop the executable if signal handling "
+   << "\nis working (under solaris)..." << std::endl;
+   tbox::pout << "f1 = " << f1 << std::endl;
+   tbox::pout << "f1 * 1.0 = " << std::endl;
+   tbox::pout << f1 * 1.0 << std::endl;
+   tbox::pout << "The operation worked so SIGNAL HANDLING IS NOT ENABLED"
+              << std::endl;
+#endif
+
+#ifdef SIGOPS_SUN_D1
+   double d1 = tbox::MathUtilities<double>::getSignalingNaN();
+   tbox::pout
+   << "\nThis operation should stop the executable if signal handling "
+   << "\nis working (under solaris)..." << std::endl;
+   tbox::pout << "d1 = " << d1 << std::endl;
+   tbox::pout << "d1 * 1.0 = " << std::endl;
+   tbox::pout << d1 * 1.0 << std::endl;
+   tbox::pout << "The operation worked so SIGNAL HANDLING IS NOT ENABLED"
+              << std::endl;
+#endif
+
+#ifdef SIGOPS_F2
+   float f2 = 1.0;
+   tbox::pout
+   << "\nThis operation should stop the executable if signal handling "
+   << "is working..." << std::endl;
+   tbox::pout << "f2 = " << f2 << std::endl;
+   tbox::pout << "f2/0.0 = " << std::endl;
+   tbox::pout << f2 / 0.0 << std::endl;
+   tbox::pout << "The operation worked so SIGNAL HANDLING IS NOT ENABLED"
+              << std::endl;
+#endif
+
+#ifdef SIGOPS_D2
+   double d2 = 1.0;
+   tbox::pout
+   << "\nThis operation should stop the executable if signal handling "
+   << "is working..." << std::endl;
+   tbox::pout << "d2 = " << d2 << std::endl;
+   tbox::pout << "d2/0.0 = " << std::endl;
+   tbox::pout << d2 / 0.0 << std::endl;
+   tbox::pout << "The operation worked so SIGNAL HANDLING IS NOT ENABLED"
+              << std::endl;
+#endif
+
+   /*
+    * Check if the isNaN() method is working correctly
+    */
+#ifdef SIGOPS_F0
+   bool is_f0_nan = tbox::MathUtilities<float>::isNaN(f0);
+   if (!is_f0_nan) {
+      fail_count++;
+      tbox::perr << "Test f0 FAILED" << std::endl;
+   } else {
+      tbox::plog << "Test f0 passed" << std::endl;
+   }
+#endif
+
+#ifdef SIGOPS_D0
+   bool is_d0_nan = tbox::MathUtilities<float>::isNaN(d0);
+   if (!is_d0_nan) {
+      fail_count++;
+      tbox::perr << "Test d0 FAILED" << std::endl;
+   } else {
+      tbox::plog << "Test d0 passed" << std::endl;
+   }
+#endif
+
+#ifdef SIGOPS_F1
+   bool is_f1_nan = tbox::IEEE::isNaN(f1);
+   if (!is_f1_nan) {
+      fail_count++;
+      tbox::perr << "Test f1 FAILED" << std::endl;
+   } else {
+      tbox::plog << "Test f1 passed" << std::endl;
+   }
+#endif
+
+#ifdef SIGOPS_D1
+   bool is_d1_nan = tbox::IEEE::isNaN(d1);
+   if (!is_d1_nan) {
+      fail_count++;
+      tbox::perr << "Test d1 FAILED" << endl;
+   } else {
+      tbox::plog << "Test d1 passed" << std::endl;
+   }
+#endif
+
+#ifdef SIGOPS_F2
+   bool is_f2_nan = tbox::IEEE::isNaN(f2);
+   if (is_f2_nan) {
+      fail_count++;
+      tbox::perr << "Test f2 FAILED" << endl;
+   } else {
+      tbox::plog << "Test f2 passed" << std::endl;
+   }
+#endif
+
+#ifdef SIGOPS_D2
+   bool is_d2_nan = tbox::IEEE::isNaN(d2);
+   if (is_d2_nan) {
+      fail_count++;
+      tbox::perr << "Test d2 FAILED" << endl;
+   } else {
+      tbox::plog << "Test d2 passed" << std::endl;
+   }
+#endif
+
+#ifdef SIGOPS_F3
+   //  Try some arrays
+   tbox::Array<float> f3(5);
+   tbox::IEEE::initializeArrayToSignalingNaN(f3);
+   for (int i = 0; i < f3.getSize(); i++) {
+      bool is_f3_nan = tbox::IEEE::isNaN(f3[i]);
+      if (!is_f3_nan) {
+         fail_count++;
+         tbox::perr << "Test f3 FAILED; i = " << i << endl;
+      } else {
+         tbox::plog << "Test f3 passed" << std::endl;
+      }
+   }
+#endif
+
+#ifdef SIGOPS_D3
+   tbox::Array<double> d3(5);
+   tbox::IEEE::initializeArrayToSignalingNaN(d3);
+   for (int i = 0; i < d3.getSize(); i++) {
+      bool is_d3_nan = tbox::IEEE::isNaN(d3[i]);
+      if (!is_d3_nan) {
+         fail_count++;
+         tbox::perr << "Test d3 FAILED; i = " << i << std::endl;
+      } else {
+         tbox::plog << "Test d3 passed" << std::endl;
+      }
+   }
+#endif
+
+   if (fail_count == 0) {
+      tbox::pout << "\nPASSED:  ieee" << std::endl;
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return fail_count;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/indexdata/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/indexdata/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,164 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=main.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/IndexVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h main.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/indexdata/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/indexdata/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,56 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for test of index data 
+##
+#########################################################################
+
+SAMRAI	      =	@top_srcdir@
+SRCDIR	      =	@srcdir@
+SUBDIR        = source/test/indexdata
+VPATH	      =	@srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+#
+# For these classes don't turn off implicit template instantiation.
+#
+ALLOW_IMPLICIT_TEMPLATES = yes
+
+default: check
+
+include $(OBJECT)/config/Makefile.config
+
+CPPFLAGS_EXTRA= -DTESTING=1
+
+main:		main.o $(LIBSAMRAIDEPEND)
+		$(CXX) $(CXXFLAGS) $(LDFLAGS) main.o $(COBJS) \
+		$(LIBSAMRAI) $(LDLIBS) -o $@
+NUM_TESTS = 1
+
+TEST_NPROCS = @TEST_NPROCS@
+
+checkcompile: main
+
+check:
+		$(MAKE) check2d
+
+check2d:	main
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main
+
+check3d:
+
+checktest:
+		rm -f makecheck.logfile
+		$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+		$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+		rm -f makecheck.logfile
+
+clean: 
+	$(SAMCLEAN)
+	@$(RM) *.f main*
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/test/indexdata/main.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/indexdata/main.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,787 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   $Description 
+ *
+ ************************************************************************/
+
+
+#include <cassert>
+#include <cstdlib>
+
+#include "SAMRAI/pdat/IndexVariable.h"
+#include "SAMRAI/pdat/IndexVariable.C"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Array.C"
+#include "SAMRAI/tbox/List.h"
+#include "SAMRAI/tbox/List.C"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Pointer.C"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/pdat/CellData.C"
+#include "SAMRAI/pdat/CellGeometry.C"
+#include "SAMRAI/pdat/IndexData.h"
+#include "SAMRAI/pdat/IndexData.C"
+#include "SAMRAI/pdat/IndexDataFactory.h"
+#include "SAMRAI/pdat/IndexDataFactory.C"
+
+using namespace SAMRAI;
+using namespace hier;
+using namespace pdat;
+using namespace tbox;
+
+using namespace std;
+
+#define NN 10
+
+class Item
+{
+
+public:
+   Item()
+   {
+   }
+
+   ~Item()
+   {
+   }
+
+   void copySourceItem(
+      const hier::Index& idx,
+      const hier::IntVector& src_offset,
+      const Item& src_item)
+   {
+      NULL_USE(idx);
+      NULL_USE(src_offset);
+      for (int n = 0; n < NN; n++) {
+         x[n] = src_item.x[n];
+      }
+   }
+
+   size_t getDataStreamSize()
+   {
+      return 0;
+   }
+
+   void packStream(
+      MessageStream& stream)
+   {
+      NULL_USE(stream);
+   }
+
+   void unpackStream(
+      MessageStream& stream,
+      const hier::IntVector offset)
+   {
+      NULL_USE(stream);
+      NULL_USE(offset);
+   }
+
+   void putToDatabase(
+      tbox::Pointer<tbox::Database> dbase)
+   {
+      NULL_USE(dbase);
+   }
+   void getFromDatabase(
+      tbox::Pointer<tbox::Database> dbase)
+   {
+      NULL_USE(dbase);
+   }
+
+   double x[NN];
+};
+
+/* 
+ * SGH: BG{L,P} et. al. do not like to have explicit template instantiations
+ * outside of the namespace in which the template is defined.  This causes
+ * a compile-time error, so we'll just avoid this on BG{L,P} platforms.
+ * 
+ * Reference:  XL C/C++ V9.0 for Linux documentation, i
+ * section: Templates
+ * subsection: Explicit instantiation
+ * URL:
+ * http://publib.boulder.ibm.com/infocenter/lnxpcomp/v9v111/index.jsp?topic=/com.ibm.xlcpp9.linux.doc/language_ref/templates.htm
+ *
+ */
+#ifndef __BGL_FAMILY__
+template class pdat::IndexData<Item, pdat::CellGeometry>;
+template class pdat::IndexDataFactory<Item, pdat::CellGeometry>;
+template class pdat::IndexDataNode<Item, pdat::CellGeometry>;
+template class pdat::IndexIterator<Item, pdat::CellGeometry>;
+template class pdat::IndexVariable<Item, pdat::CellGeometry>;
+
+template class tbox::Array<pdat::IndexDataNode<Item, pdat::CellGeometry> >;
+template class tbox::List<pdat::IndexDataNode<Item, pdat::CellGeometry> >;
+template class tbox::ListIterator<pdat::IndexDataNode<Item, pdat::CellGeometry> >;
+template class tbox::ListNode<pdat::IndexDataNode<Item, pdat::CellGeometry> >;
+template class tbox::Pointer<pdat::IndexData<Item, pdat::CellGeometry> >;
+template class tbox::Pointer<pdat::IndexVariable<Item, pdat::CellGeometry> >;
+template class tbox::Pointer<pdat::IndexDataFactory<Item, pdat::CellGeometry> >;
+#endif
+
+int main(
+   int argc,
+   char* argv[])
+{
+   SAMRAI_MPI::init(&argc, &argv);
+   SAMRAIManager::initialize();
+   SAMRAIManager::startup();
+
+   {
+      tbox::Dimension dim(2);
+
+      Index box_lo = Index(dim, 0);
+      Index box_hi = Index(dim, 100);
+      Box box(box_lo, box_hi);
+
+      srand(1);
+
+      hier::IntVector v(dim, 0);
+      hier::IntVector ghosts(dim, 0);
+
+      /******************************************************************************
+      * InedxData interface tests.
+      ******************************************************************************/
+      {
+         IndexData<Item, pdat::CellGeometry> idx_data(box, ghosts);
+
+         Item* item = new Item;
+
+         v[0] = 0;
+         v[1] = 0;
+         Index idx(v);
+         idx_data.addItemPointer(idx, item);
+
+         // isElement()
+         assert(idx_data.isElement(idx));
+         v[0] = 1;
+         v[1] = 0;
+         Index idx2(v);
+         assert(!idx_data.isElement(idx2));
+         v[0] = 0;
+         v[1] = 1;
+         Index idx3(v);
+         assert(!idx_data.isElement(idx3));
+
+         // addItem()/getItem()
+         assert(idx_data.getItem(idx) == item);
+
+         assert(idx_data.getNumberOfItems() == 1);
+
+         // removeItem()
+         idx_data.removeItem(idx);
+         assert(!idx_data.isElement(idx));
+
+         assert(idx_data.getNumberOfItems() == 0);
+      }
+
+      {
+         IndexData<Item, pdat::CellGeometry> idx_data(box, ghosts);
+
+         Item* item = new Item;
+
+         v[0] = 0;
+         v[1] = 0;
+         Index idx(v);
+         idx_data.addItem(idx, *item);
+         delete item;
+
+         // isElement()
+         assert(idx_data.isElement(idx));
+         v[0] = 1;
+         v[1] = 0;
+         Index idx2(v);
+         assert(!idx_data.isElement(idx2));
+         v[0] = 0;
+         v[1] = 1;
+         Index idx3(v);
+         assert(!idx_data.isElement(idx3));
+
+         // addItem()/getItem()
+         assert(idx_data.getNumberOfItems() == 1);
+
+         // removeItem()
+         idx_data.removeItem(idx);
+         assert(!idx_data.isElement(idx));
+
+         assert(idx_data.getNumberOfItems() == 0);
+      }
+
+      {
+         IndexData<Item, pdat::CellGeometry> idx_data(box, ghosts);
+
+         Item* item = new Item;
+         v[0] = 0;
+         v[1] = 0;
+         Index idx(v);
+         idx_data.replaceAddItem(idx, *item);
+         delete item;
+
+         // isElement()
+         assert(idx_data.isElement(idx));
+         v[0] = 1;
+         v[1] = 0;
+         Index idx2(v);
+         assert(!idx_data.isElement(idx2));
+         v[0] = 0;
+         v[1] = 1;
+         Index idx3(v);
+         assert(!idx_data.isElement(idx3));
+
+         // addItem()/getItem()
+         assert(idx_data.getNumberOfItems() == 1);
+
+         item = new Item;
+         idx_data.replaceAddItem(idx, *item);
+         delete item;
+
+         assert(idx_data.getNumberOfItems() == 1);
+
+         // removeItem()
+         idx_data.removeItem(idx);
+         assert(!idx_data.isElement(idx));
+      }
+
+      {
+         IndexData<Item, pdat::CellGeometry> idx_data(box, ghosts);
+
+         // getNumberItems()
+
+         v[0] = 0;
+         v[1] = 0;
+         Index idx1(v);
+         idx_data.addItemPointer(idx1, new Item);
+
+         v[0] = 1;
+         v[1] = 0;
+         Index idx2(v);
+         idx_data.addItemPointer(idx2, new Item);
+
+         assert(idx_data.getNumberOfItems() == 2);
+
+         // remove 1
+         idx_data.removeItem(idx1);
+         assert(idx_data.getNumberOfItems() == 1);
+
+         // replace 1 at same index, no change
+         idx_data.addItemPointer(idx2, new Item);
+         assert(idx_data.getNumberOfItems() == 1);
+      }
+
+      {
+         IndexData<Item, pdat::CellGeometry> idx_data(box, ghosts);
+
+         // removeInsideBox()
+         v[0] = 2;
+         v[1] = 2;
+         Index lo(v);
+
+         v[0] = 3;
+         v[1] = 5;
+         Index hi(v);
+
+         Box box1(lo, hi);
+         for (Box::Iterator bi(box1); bi; bi++) {
+
+            Index idx = bi();
+
+            idx_data.addItemPointer(idx, new Item);
+
+         }
+
+         assert(idx_data.getNumberOfItems() == box1.size());
+
+         idx_data.removeInsideBox(box1);
+
+         assert(idx_data.getNumberOfItems() == 0);
+      }
+      {
+         IndexData<Item, pdat::CellGeometry> idx_data(box, ghosts);
+
+         // removeAllItems()
+         v[0] = 0;
+         v[1] = 0;
+         Index lo(v);
+
+         v[0] = 1;
+         v[1] = 1;
+         Index hi(v);
+
+         Box box1(lo, hi);
+         for (Box::Iterator bi(box1); bi; bi++) {
+
+            Index idx = bi();
+
+            idx_data.addItemPointer(idx, new Item);
+
+         }
+
+         assert(idx_data.getNumberOfItems() == box1.size());
+
+         idx_data.removeAllItems();
+
+         assert(idx_data.getNumberOfItems() == 0);
+      }
+
+      {
+         // copy() where src and dst are same box
+
+         IndexData<Item, pdat::CellGeometry> src(box, ghosts);
+         IndexData<Item, pdat::CellGeometry> dst(box, ghosts);
+
+         v[0] = 0;
+         v[1] = 0;
+         Index lo(v);
+
+         v[0] = 1;
+         v[1] = 1;
+         Index hi(v);
+
+         Box box1(lo, hi);
+         for (Box::Iterator bi(box1); bi; bi++) {
+            src.addItemPointer(bi(), new Item);
+         }
+
+         assert(src.getNumberOfItems() == box1.size());
+         assert(dst.getNumberOfItems() == 0);
+
+         dst.copy(src);
+
+         assert(dst.getNumberOfItems() == src.getNumberOfItems());
+      }
+
+      {
+
+         // copy() where src and dst partially overlap, and only
+         // some of src's items are contained in overlap.
+
+         v[0] = 0;
+         v[1] = 0;
+         Index lo_src(v);
+
+         v[0] = 2;
+         v[1] = 2;
+         Index hi_src(v);
+
+         Box box_src(lo_src, hi_src);
+         IndexData<Item, pdat::CellGeometry> src(box_src, ghosts);
+
+         // Two of these three items should end up in dst
+         v[0] = 0;
+         v[1] = 0;
+         Index idx_item1(v);
+         src.addItemPointer(idx_item1, new Item);
+
+         v[0] = 1;
+         v[1] = 1;
+         Index idx_item2(v);
+         src.addItemPointer(idx_item2, new Item);
+
+         v[0] = 2;
+         v[1] = 2;
+         Index idx_item3(v);
+         src.addItemPointer(idx_item3, new Item);
+
+         v[0] = 1;
+         v[1] = 1;
+         Index lo_dst(v);
+         v[0] = 3;
+         v[1] = 3;
+         Index hi_dst(v);
+         Box box_dst(lo_dst, hi_dst);
+
+         IndexData<Item, pdat::CellGeometry> dst(box_dst, ghosts);
+
+         assert(src.getNumberOfItems() == 3);
+         assert(dst.getNumberOfItems() == 0);
+
+         dst.copy(src);
+
+         assert(dst.getNumberOfItems() == 2);
+      }
+
+      {
+         // copy() with overlap argument
+
+         // src
+         // x . . . . . x "
+         // .   .   . 3 . " // 2
+         // . . . . . . . "
+         // .   . 2 .   . " // 1
+         // . . . . . . . "
+         // . 1 .   .   . " // 0
+         // x . . . . . x "
+
+         // dst orig
+         // . . x . . . x "
+         // .   . 4 .   . " // 2
+         // . . . . . . . "
+         // .   .   .   . " // 1
+         // . . x . . . x "
+         // .   .   .   . " // 0
+         // . . . . . . . "
+
+         // dst expected
+         // . . x . . . x "
+         // .   .   . 3 . "
+         // . . . . . . . "
+         // .   . 2 .   . "
+         // . . x . . . x "
+         // .   .   .   . "
+         // . . . . . . . "
+
+         v[0] = 0;
+         v[1] = 0;
+         Index lo_src(v);
+         v[0] = 2;
+         v[1] = 2;
+         Index hi_src(v);
+         Box box_src(lo_src, hi_src);
+         IndexData<Item, pdat::CellGeometry> src(box_src, ghosts);
+
+         // Two of these three items should end up in dst
+         v[0] = 0;
+         v[1] = 0;
+         Index idx_item1(v);
+         src.addItemPointer(idx_item1, new Item);
+
+         v[0] = 1;
+         v[1] = 1;
+         Index idx_item2(v);
+         src.addItemPointer(idx_item2, new Item);
+
+         v[0] = 2;
+         v[1] = 2;
+         Index idx_item3(v);
+         src.addItemPointer(idx_item3, new Item);
+
+         v[0] = 1;
+         v[1] = 1;
+         Index lo_dst(v);
+
+         v[0] = 2;
+         v[1] = 2;
+         Index hi_dst(v);
+         Box box_dst(lo_dst, hi_dst);
+
+         IndexData<Item, pdat::CellGeometry> dst(box_dst, ghosts);
+
+         // This item should be removed
+         v[0] = 1;
+         v[1] = 2;
+         Index idx_item4(v);
+         dst.addItemPointer(idx_item4, new Item);
+
+         assert(src.getNumberOfItems() == 3);
+         assert(dst.getNumberOfItems() == 1);
+
+         IntVector src_offset(dim, 0);
+         BoxList boxes(box_src);
+         boxes.addItem(box_dst);
+         BoxList intersection(box_src * box_dst);
+         CellOverlap overlap(intersection, src_offset);
+
+         BoxList dst_boxlist(overlap.getDestinationBoxList());
+
+         dst.copy(src, overlap);
+
+         assert(dst.getNumberOfItems() == 2);
+      }
+
+      {
+         // copy(): Same as test7 using copy2 which reverses src and dst
+
+         v[0] = 0;
+         v[1] = 0;
+         Index lo_src(v);
+
+         v[0] = 2;
+         v[1] = 2;
+         Index hi_src(v);
+         Box box_src(lo_src, hi_src);
+         IndexData<Item, pdat::CellGeometry> src(box_src, ghosts);
+
+         // Two of these three items should end up in dst
+         v[0] = 0;
+         v[1] = 0;
+         Index idx_item1(v);
+         src.addItemPointer(idx_item1, new Item);
+
+         v[0] = 1;
+         v[1] = 1;
+         Index idx_item2(v);
+         src.addItemPointer(idx_item2, new Item);
+
+         v[0] = 2;
+         v[1] = 2;
+         Index idx_item3(v);
+         src.addItemPointer(idx_item3, new Item);
+
+         v[0] = 1;
+         v[1] = 1;
+         Index lo_dst(v);
+
+         v[0] = 3;
+         v[1] = 3;
+         Index hi_dst(v);
+         Box box_dst(lo_dst, hi_dst);
+
+         IndexData<Item, pdat::CellGeometry> dst(box_dst, ghosts);
+
+         assert(src.getNumberOfItems() == 3);
+         assert(dst.getNumberOfItems() == 0);
+
+         src.copy2(dst);
+
+         assert(dst.getNumberOfItems() == 2);
+      }
+
+      {
+         v[0] = 0;
+         v[1] = 0;
+         Index lo(v);
+
+         v[0] = 2;
+         v[1] = 2;
+         Index hi(v);
+         Box data_box(lo, hi);
+         IndexData<Item, pdat::CellGeometry> data(data_box, ghosts);
+
+         // Add three items
+         v[0] = 0;
+         v[1] = 0;
+         Index idx_item1(v);
+         data.addItemPointer(idx_item1, new Item);
+
+         v[0] = 0;
+         v[1] = 1;
+         Index idx_item2(v);
+         data.addItemPointer(idx_item2, new Item);
+
+         v[0] = 2;
+         v[1] = 1;
+         Index idx_item3(v);
+         data.addItemPointer(idx_item3, new Item);
+
+         int count = 0;
+         for (IndexIterator<Item, pdat::CellGeometry> it(data); it; it++) {
+            count++;
+         }
+         assert(3 == count);
+      }
+
+      int size = 100;
+      {
+         tbox::Pointer<tbox::Timer> timer;
+
+         timer = tbox::TimerManager::getManager()->
+            getTimer("IndexDataAppendItemSequential", true);
+
+         tbox::plog << "Begin Timing" << endl;
+
+         Index lo = Index(dim, 0);
+         Index hi = Index(dim, size);
+         Box data_box(lo, hi);
+
+         IndexData<Item, pdat::CellGeometry> idx_data(data_box, ghosts);
+
+         timer->start();
+
+         for (int i = 0; i < size; ++i) {
+            for (int j = 0; j < size; ++j) {
+               v[0] = i;
+               v[1] = j;
+               Index idx(v);
+
+               Item new_item;
+               idx_data.appendItem(idx, new_item);
+            }
+         }
+
+         int numberOfItems = idx_data.getNumberOfItems();
+         timer->stop();
+
+         tbox::plog << numberOfItems << endl;
+
+         tbox::plog.precision(16);
+
+         tbox::plog << "IndexData appendItem Sequential insert time : "
+                    << timer->getTotalWallclockTime() << endl;
+
+         tbox::plog << "End Timing" << endl;
+      }
+
+      {
+         tbox::Pointer<tbox::Timer> timer;
+
+         timer = tbox::TimerManager::getManager()->
+            getTimer("IndexDataAppendItemPointerSequential", true);
+
+         tbox::plog << "Begin Timing" << endl;
+
+         Index lo = Index(dim, 0);
+         Index hi = Index(dim, size);
+         Box data_box(lo, hi);
+
+         IndexData<Item, pdat::CellGeometry> idx_data(data_box, ghosts);
+
+         timer->start();
+
+         for (int i = 0; i < size; ++i) {
+            for (int j = 0; j < size; ++j) {
+               v[0] = i;
+               v[1] = j;
+               Index idx(v);
+
+               Item* new_item = new Item();
+               idx_data.appendItemPointer(idx, new_item);
+            }
+         }
+
+         timer->stop();
+
+         tbox::plog.precision(16);
+
+         tbox::plog << "IndexData appendItemPointer sequential insert time : "
+                    << timer->getTotalWallclockTime() << endl;
+
+         tbox::plog << "End Timing" << endl;
+      }
+
+      size = 100;
+      int num_inserts = 100000;
+
+      {
+         tbox::Pointer<tbox::Timer> timer;
+
+         timer = tbox::TimerManager::getManager()->
+            getTimer("IndexDataAppendItemRandom", true);
+
+         tbox::plog << "Begin Timing" << endl;
+
+         Index lo = Index(dim, 0);
+         Index hi = Index(dim, size);
+         Box data_box(lo, hi);
+
+         IndexData<Item, pdat::CellGeometry> idx_data(data_box, ghosts);
+
+         timer->start();
+
+         for (int n = 0; n < num_inserts; n++) {
+            int i = rand() % size;
+            int j = rand() % size;
+
+            v[0] = i;
+            v[1] = j;
+            Index idx(v);
+
+            Item new_item;
+            idx_data.appendItem(idx, new_item);
+         }
+
+         int numberOfItems = idx_data.getNumberOfItems();
+         timer->stop();
+
+         tbox::plog << numberOfItems << endl;
+
+         tbox::plog.precision(16);
+
+         tbox::plog << "IndexData appendItem random insert time : "
+                    << timer->getTotalWallclockTime() << endl;
+
+         tbox::plog << "End Timing" << endl;
+      }
+
+      {
+         tbox::Pointer<tbox::Timer> timer;
+
+         timer = tbox::TimerManager::getManager()->
+            getTimer("IndexDataAppendItemPointerRandom", true);
+
+         tbox::plog << "Begin Timing" << endl;
+
+         Index lo = Index(dim, 0);
+         Index hi = Index(dim, size);
+         Box data_box(lo, hi);
+
+         IndexData<Item, pdat::CellGeometry> idx_data(data_box, ghosts);
+
+         timer->start();
+
+         for (int n = 0; n < num_inserts; n++) {
+            int i = rand() % size;
+            int j = rand() % size;
+
+            v[0] = i;
+            v[1] = j;
+            Index idx(v);
+
+            Item* new_item = new Item();
+            idx_data.appendItemPointer(idx, new_item);
+         }
+
+         timer->stop();
+
+         tbox::plog.precision(16);
+
+         tbox::plog << "IndexData appendItemPointer random insert time : "
+                    << timer->getTotalWallclockTime() << endl;
+
+         tbox::plog << "End Timing" << endl;
+      }
+
+      size = 100;
+
+      {
+         tbox::Pointer<tbox::Timer> timer;
+
+         timer = tbox::TimerManager::getManager()->
+            getTimer("IndexDataReplace", true);
+
+         tbox::plog << "Begin Timing" << endl;
+
+         Index lo = Index(dim, 0);
+         Index hi = Index(dim, size);
+         Box data_box(lo, hi);
+
+         IndexData<Item, pdat::CellGeometry> idx_data(data_box, ghosts);
+
+         timer->start();
+
+         for (int n = 0; n < num_inserts; n++) {
+            int i = rand() % size;
+            int j = rand() % size;
+
+            v[0] = i;
+            v[1] = j;
+            Index idx(v);
+
+            Item* new_item = new Item();
+            idx_data.replaceAddItemPointer(idx, new_item);
+         }
+
+         timer->stop();
+
+         tbox::plog.precision(16);
+
+         tbox::plog << "IndexData replaceAddItemPointer random insert time : "
+                    << timer->getTotalWallclockTime() << endl;
+
+         tbox::plog << "End Timing" << endl;
+      }
+   }
+
+   tbox::pout << "PASSED" << endl;
+
+   SAMRAIManager::shutdown();
+   SAMRAIManager::finalize();
+   SAMRAI_MPI::finalize();
+
+   exit(0);
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/inputdb/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/inputdb/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,71 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=inputdb.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h inputdb.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/inputdb/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/inputdb/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,53 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for testing the input database driver 
+##
+#########################################################################
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/test/inputdb
+VPATH         = @srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+default: check	
+
+include $(OBJECT)/config/Makefile.config
+
+CPPFLAGS_EXTRA= -DNDIM=2  -DTESTING=1
+
+main:	inputdb.o $(LIBSAMRAIDEPEND)
+		$(CXX) $(CXXFLAGS) $(LDFLAGS) inputdb.o $(LIBSAMRAI) $(LDLIBS) -o $@
+
+NUM_TESTS = 1
+
+TEST_NPROCS = @TEST_NPROCS@ 
+
+checkcompile: main
+
+check:		checkcompile
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+			./main inputdb.input
+
+check2d:
+		$(MAKE) check
+
+check3d:
+		$(MAKE) check
+
+checktest:
+		rm -f makecheck.logfile
+		$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+		$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+		rm -f makecheck.logfile
+
+clean:
+		$(SAMCLEAN)
+		$(RM) main
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/test/inputdb/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/inputdb/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,91 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   README file for input database tests.
+##
+#########################################################################
+
+The inputdb program tests the reading of input files into the input database.
+Several sample input files are available within this directory.  
+
+Compilation:
+             make
+
+Execution:
+             ./inputdb <list of input files separated by spaces>
+
+Output:
+             Input Database is dumped to stdout.
+
+
+==============================================================================
+General InputManager and InputDatabase Usage
+==============================================================================
+
+Required headers:
+   InputDatabase.h
+   InputManager.h
+
+Input File:
+   Supported Features -
+   *support types: 
+       bool: TRUE,FALSE
+       box: [(lower coord),(upper coord)]
+       char: '<character>'
+       complex: ( real , imag )
+       double, float:  standard representation for double/float.  A period
+                       may not start the double/float( use 0.8 instead of .8 ).
+       integer: standard integer representation
+       string: "<string>"
+       vectors, arrays, lists: other types separated by commas
+   *nesting of databases 
+   *simple expression grammar for keyword assignment
+   *inclusion of other input files using the standard C/C++ #include grammar
+   *use of standard C/C++ comments 
+
+   An example input file might look like the following -
+
+#include "another_input_file"
+
+Database_name {
+
+   keyword1 = value1
+   keyword2 = value2
+   sub_database1 {
+      keyword3 = value3
+      keyword4 = value4
+   }
+}
+
+Reading from an input database:
+   1) Create an InputDatabase object (the name for this database is not 
+      important).
+   2) Parse the input file using the parseInputFile() in the InputManager
+      class.  Since the InputManager is a singleton object, a pointer
+      to it can be obtained by using the static function 
+      InputManager::getManager().
+   3) Retrive data from the InputDatabase using the accessor methods
+      provided by the Database.h interface.
+
+   A code snippet demonstrating InputDatabase use might look like -
+
+// Create input database object
+Pointer<InputDatabase> input_db = new InputDatabase("input_db");
+
+// Parse input file
+InputManager::getManager()->parseInputFile("input_file",input_db);
+
+// Access database
+int int_value = input_db->getInteger("integer_key");
+double double_value = input_db->getDouble("double_key");
+Pointer<Database> sub_database = input_db->getDatabase("sub_database_name");
+char char_value  = sub_database->getChar("char_key");
+float float_value = input_db->getFloat("float_key");
+
+
+   More examples of input database usage can be found in main.C for 
+   the sample applications.  These applications can be found in the
+   SAMRAI/source/applications/ directory.
diff -r 000000000000 -r 5eda1a3f24e8 source/test/inputdb/errors.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/inputdb/errors.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,33 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI input database test driver. 
+ *
+ ************************************************************************/
+
+/*
+ * This sample input file tests checks some input conditions that would
+ * cause an error or a warning.  You should NOT copy this file as a template
+ * for valid input files.
+ */
+
+SAMRAIManager {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+Errors {
+   a   = "a string", 'a', 1.0
+   box = [("oops",1),(10,10)]
+
+   array = 1, 2, 3, 4
+   a     = array[-1]
+   b     = array[5]
+   c     = array[4.1]
+   d     = array
+   e     = "a string" + 1.0
+   f     = func(array[1])
+   g     = len("a string")
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/inputdb/inputdb.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/inputdb/inputdb.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,348 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Test driver for the SAMRAI input database 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+//#include <stdlib.h>
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/DatabaseBox.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/InputDatabase.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+
+using namespace SAMRAI;
+using namespace std;
+
+int main(
+   int argc,
+   char** argv)
+{
+   /*
+    * Initialize tbox::MPI and SAMRAI.  Enable logging.
+    */
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+   tbox::PIO::logOnlyNodeZero("inputdb.log");
+
+   int fail_count = 0;
+
+   {
+      std::string input_filename = argv[1];
+
+      tbox::Pointer<tbox::InputDatabase> input_db(new tbox::InputDatabase(
+                                                     "input_db"));
+      tbox::InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      /*
+       * Retrieve "GlobalInputs" section of the input database and set
+       * values accordingly.
+       */
+
+      if (input_db->keyExists("GlobalInputs")) {
+         tbox::Pointer<tbox::Database> global_db =
+            input_db->getDatabase("GlobalInputs");
+         if (global_db->keyExists("call_abort_in_serial_instead_of_exit")) {
+            bool flag = global_db->
+               getBool("call_abort_in_serial_instead_of_exit");
+            tbox::SAMRAI_MPI::setCallAbortInSerialInsteadOfExit(flag);
+         }
+      }
+
+      /*******************************************************************
+      * Test primitive types - int, float, double, bool, dcomplex,
+      *                        std::string, box
+      *******************************************************************/
+      tbox::Pointer<tbox::Database> prim_type_db = input_db->getDatabase(
+            "PrimitiveTypes");
+
+      int i0_correct = 1;
+      float f0_correct = 1.0;
+      double d0_correct = 1.0;
+      bool b0_correct = true;
+      dcomplex c0_correct(1.0, 1.0);
+      std::string s0_correct = "a string";
+
+      int lower[NDIM];
+      int upper[NDIM];
+      for (int i = 0; i < NDIM; i++) {
+         lower[i] = 0;
+         upper[i] = 9;
+      }
+      tbox::DatabaseBox box0_correct(tbox::Dimension(NDIM), lower, upper);
+
+      int i0 = prim_type_db->getInteger("i0");
+      float f0 = prim_type_db->getFloat("f0");
+      double d0 = prim_type_db->getDouble("d0");
+      bool b0 = prim_type_db->getBool("b0");
+      dcomplex c0 = prim_type_db->getComplex("c0");
+      std::string s0 = prim_type_db->getString("s0");
+      tbox::DatabaseBox box0 = prim_type_db->getDatabaseBox("box0");
+
+      if (i0 != i0_correct) {
+         fail_count++;
+         tbox::perr << "Integer test #0 FAILED" << std::endl;
+      }
+      if (!tbox::MathUtilities<float>::equalEps(f0, f0_correct)) {
+         fail_count++;
+         tbox::perr << "Float test #0 FAILED" << endl;
+      }
+      if (!tbox::MathUtilities<double>::equalEps(d0, d0_correct)) {
+         fail_count++;
+         tbox::perr << "Double test #0 FAILED" << endl;
+      }
+      if (b0 != b0_correct) {
+         fail_count++;
+         tbox::perr << "Bool test #0 FAILED" << std::endl;
+      }
+      if (!tbox::MathUtilities<dcomplex>::equalEps(c0, c0_correct)) {
+         fail_count++;
+         tbox::perr << "Complex test #0 FAILED" << std::endl;
+      }
+      if (s0 != s0_correct) {
+         fail_count++;
+         tbox::perr << "String test #0 FAILED" << std::endl;
+      }
+      if (!(box0 == box0_correct)) {
+         fail_count++;
+         tbox::perr << "Box test #0 FAILED" << std::endl;
+      }
+
+      /*******************************************************************
+       * Test Arrays of primitive types
+       ******************************************************************/
+      const int nsize = 5; // size of arrays
+
+      /*
+       * "Smart" arrays
+       */
+      tbox::Pointer<tbox::Database> smart_array_db =
+         input_db->getDatabase("SmartArrays");
+
+      tbox::Array<int> i1_correct(5);
+      tbox::Array<float> f1_correct(5);
+      tbox::Array<double> d1_correct(5);
+      tbox::Array<bool> b1_correct(5);
+      tbox::Array<dcomplex> c1_correct(5);
+      tbox::Array<std::string> s1_correct(5);
+      tbox::Array<tbox::DatabaseBox> box1_correct(5);
+
+      for (int i = 0; i < nsize; i++) {
+         i1_correct[i] = i0_correct;
+         f1_correct[i] = f0_correct;
+         d1_correct[i] = d0_correct;
+         b1_correct[i] = b0_correct;
+         c1_correct[i] = c0_correct;
+         s1_correct[i] = s0_correct;
+         box1_correct[i] = box0_correct;
+      }
+
+      tbox::Array<int> i1 = smart_array_db->getIntegerArray("i1");
+      tbox::Array<float> f1 = smart_array_db->getFloatArray("f1");
+      tbox::Array<double> d1 = smart_array_db->getDoubleArray("d1");
+      tbox::Array<bool> b1 = smart_array_db->getBoolArray("b1");
+      tbox::Array<dcomplex> c1 = smart_array_db->getComplexArray("c1");
+      tbox::Array<std::string> s1 = smart_array_db->getStringArray("s1");
+      tbox::Array<tbox::DatabaseBox> box1 = smart_array_db->getDatabaseBoxArray(
+            "box1");
+
+      for (int i = 0; i < nsize; i++) {
+         if (i1[i] != i1_correct[i]) {
+            fail_count++;
+            tbox::perr << "Integer test #1 FAILED" << std::endl;
+         }
+         if (!tbox::MathUtilities<float>::equalEps(f1[i], f1_correct[i])) {
+            fail_count++;
+            tbox::perr << "Float test #1 FAILED" << endl;
+         }
+         if (!tbox::MathUtilities<double>::equalEps(d1[i], d1_correct[i])) {
+            fail_count++;
+            tbox::perr << "Double test #1 FAILED" << endl;
+         }
+         if (b1[i] != b1_correct[i]) {
+            fail_count++;
+            tbox::perr << "Bool test #1 FAILED" << std::endl;
+         }
+         if (!tbox::MathUtilities<dcomplex>::equalEps(c1[i], c1_correct[i])) {
+            fail_count++;
+            tbox::perr << "Complex test #1 FAILED" << std::endl;
+         }
+         if (s1[i] != s1_correct[i]) {
+            fail_count++;
+            tbox::perr << "String test #1 FAILED" << std::endl;
+         }
+         if (!(box1[i] == box1_correct[i])) {
+            fail_count++;
+            tbox::perr << "Box test #1 FAILED" << std::endl;
+         }
+      }
+
+      /*
+       * Basic arrays (i.e. do not use the "smart" array construct)
+       */
+      tbox::Pointer<tbox::Database> basic_array_db =
+         input_db->getDatabase("BasicArrays");
+
+      int i2_correct[nsize];
+      float f2_correct[nsize];
+      double d2_correct[nsize];
+      bool b2_correct[nsize];
+      dcomplex c2_correct[nsize];
+      std::string s2_correct[nsize];
+      tbox::DatabaseBox box2_correct[nsize];
+      for (int i = 0; i < nsize; i++) {
+         i2_correct[i] = i0_correct;
+         f2_correct[i] = f0_correct;
+         d2_correct[i] = d0_correct;
+         b2_correct[i] = b0_correct;
+         c2_correct[i] = c0_correct;
+         s2_correct[i] = s0_correct;
+         box2_correct[i] = box0_correct;
+      }
+
+      int i2[nsize];
+      float f2[nsize];
+      double d2[nsize];
+      bool b2[nsize];
+      dcomplex c2[nsize];
+      std::string s2[nsize];
+      tbox::DatabaseBox box2[nsize];
+      basic_array_db->getIntegerArray("i2", i2, nsize);
+      basic_array_db->getFloatArray("f2", f2, nsize);
+      basic_array_db->getDoubleArray("d2", d2, nsize);
+      basic_array_db->getBoolArray("b2", b2, nsize);
+      basic_array_db->getComplexArray("c2", c2, nsize);
+      basic_array_db->getStringArray("s2", s2, nsize);
+      basic_array_db->getDatabaseBoxArray("box2", box2, nsize);
+
+      for (int i = 0; i < nsize; i++) {
+         if (i2[i] != i2_correct[i]) {
+            fail_count++;
+            tbox::perr << "Integer test #2 FAILED" << std::endl;
+         }
+         if (!tbox::MathUtilities<float>::equalEps(f2[i], f2_correct[i])) {
+            fail_count++;
+            tbox::perr << "Float test #2 FAILED" << endl;
+         }
+         if (!tbox::MathUtilities<double>::equalEps(d2[i], d2_correct[i])) {
+            fail_count++;
+            tbox::perr << "Double test #2 FAILED" << endl;
+         }
+         if (b2[i] != b2_correct[i]) {
+            fail_count++;
+            tbox::perr << "Bool test #2 FAILED" << std::endl;
+         }
+         if (!tbox::MathUtilities<dcomplex>::equalEps(c2[i], c2_correct[i])) {
+            fail_count++;
+            tbox::perr << "Complex test #2 FAILED" << std::endl;
+         }
+         if (s2[i] != s2_correct[i]) {
+            fail_count++;
+            tbox::perr << "String test #2 FAILED" << std::endl;
+         }
+         if (!(box2[i] == box2_correct[i])) {
+            fail_count++;
+            tbox::perr << "Box test #2 FAILED" << std::endl;
+         }
+      }
+
+      /*******************************************************************
+       * Test "getWithDefault()" methods
+       ******************************************************************/
+      tbox::Pointer<tbox::Database> with_default_db =
+         input_db->getDatabase("WithDefaultTypes");
+
+      int i3 = with_default_db->getIntegerWithDefault("i3", i0_correct);
+      float f3 = with_default_db->getFloatWithDefault("f3", f0_correct);
+      double d3 = with_default_db->getDoubleWithDefault("d3", d0_correct);
+      bool b3 = with_default_db->getBoolWithDefault("b3", b0_correct);
+      dcomplex c3 = with_default_db->getComplexWithDefault("c3", c0_correct);
+      std::string s3 = with_default_db->getStringWithDefault("s3", s0_correct);
+      tbox::DatabaseBox box3 = with_default_db->getDatabaseBoxWithDefault(
+            "box3",
+            box0_correct);
+
+      if (i3 != i0_correct) {
+         fail_count++;
+         tbox::perr << "Integer test #3 FAILED" << std::endl;
+      }
+      if (!tbox::MathUtilities<float>::equalEps(f3, f0_correct)) {
+         fail_count++;
+         tbox::perr << "Float test #3 FAILED" << endl;
+      }
+      if (!tbox::MathUtilities<double>::equalEps(d3, d0_correct)) {
+         fail_count++;
+         tbox::perr << "Double test #3 FAILED" << endl;
+      }
+      if (b3 != b0_correct) {
+         fail_count++;
+         tbox::perr << "Bool test #3 FAILED" << std::endl;
+      }
+      if (!tbox::MathUtilities<dcomplex>::equalEps(c3, c0_correct)) {
+         fail_count++;
+         tbox::perr << "Complex test #3 FAILED" << std::endl;
+      }
+      if (s3 != s0_correct) {
+         fail_count++;
+         tbox::perr << "String test #3 FAILED" << std::endl;
+      }
+      if (!(box3 == box0_correct)) {
+         fail_count++;
+         tbox::perr << "Box test #3 FAILED" << std::endl;
+      }
+
+      /*******************************************************************
+       * Test replacing values in the database
+       ******************************************************************/
+      tbox::Pointer<tbox::Database> prim_type_db_new =
+         input_db->getDatabase("PrimitiveTypes");
+
+      prim_type_db_new->putInteger("i0", i0_correct);
+      prim_type_db_new->putFloat("f0", f0_correct);
+      prim_type_db_new->putDouble("d0", d0_correct);
+      prim_type_db_new->putBool("b0", b0_correct);
+      prim_type_db_new->putComplex("c0", c0_correct);
+      prim_type_db_new->putString("s0", s0_correct);
+      prim_type_db_new->putDatabaseBox("box0", box0_correct);
+
+      /*******************************************************************
+       * Output contents of the input database
+       ******************************************************************/
+      tbox::plog << "Overall contents of input database..." << std::endl;
+      input_db->printClassData(tbox::plog);
+
+      tbox::plog << "\n\nUnused keys in the input database..." << std::endl;
+      input_db->printUnusedKeys(tbox::plog);
+
+      tbox::plog << "\n\nDefault keys in the input database..." << std::endl;
+      input_db->printDefaultKeys(tbox::plog);
+
+      input_db = NULL;
+   }
+
+   if (fail_count == 0) {
+      tbox::pout << "\nPASSED:  inputdb" << endl;
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return fail_count;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/inputdb/inputdb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/inputdb/inputdb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,148 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI input database test driver. 
+ *
+ ************************************************************************/
+
+/*
+ * This sample input file checks input conditions.  All entries should
+ * be valid.
+ */
+
+GlobalInputs {
+   call_abort_in_serial_instead_of_exit = FALSE
+}
+
+PrimitiveTypes {
+   i0  = 1              // integer
+   f0  = 1.0            // float
+   d0  = 1.0            // double
+   b0  = TRUE           // bool
+   c0  = (1.0,1.0)      // complex
+   s0  = "a string"     // string
+   box0 = [(0,0),(9,9)] // box
+}
+
+SmartArrays {
+   i1  = 1, 1, 1, 1, 1  
+   f1  = 1.0, 1.0, 1.0, 1.0, 1.0  
+   d1  = 1.0, 1.0, 1.0, 1.0, 1.0  
+   b1  = TRUE, TRUE, TRUE, TRUE, TRUE         
+   c1  = (1.0,1.0), (1.0,1.0), (1.0,1.0), (1.0,1.0), (1.0,1.0)
+   s1  = "a string", "a string", "a string", "a string", "a string"
+   box1 = [(0,0),(9,9)], 
+          [(0,0),(9,9)],  
+          [(0,0),(9,9)],  
+          [(0,0),(9,9)], 
+          [(0,0),(9,9)] 
+}
+
+BasicArrays {
+   i2  = 1, 1, 1, 1, 1  
+   f2  = 1.0, 1.0, 1.0, 1.0, 1.0  
+   d2  = 1.0, 1.0, 1.0, 1.0, 1.0  
+   b2  = TRUE, TRUE, TRUE, TRUE, TRUE         
+   c2  = (1.0,1.0), (1.0,1.0), (1.0,1.0), (1.0,1.0), (1.0,1.0)
+   s2  = "a string", "a string", "a string", "a string", "a string"
+   box2 = [(0,0),(9,9)], 
+          [(0,0),(9,9)],  
+          [(0,0),(9,9)],  
+          [(0,0),(9,9)], 
+          [(0,0),(9,9)] 
+}
+
+WithDefaultTypes {
+
+}
+
+/*
+ * The following are not used by the test application but demonstrate 
+ * other capabilities of the SAMRAI input database parser.  The parser 
+ * supports a simple expression grammar.  All arithmetic operations work 
+ * on integer, double, and complex numbers.  Numbers will be promoted if 
+ * necessary.
+ */
+
+ExpressionGrammar {
+   bool  = TRUE
+   arg1  = 1.1
+   arg2  = 2.2
+   array = arg1, arg2
+
+   a = arg1			// lookup variable
+   b = array[1]			// array access
+   c = (arg1)			// grouping of expressions
+   d = (bool ? arg1 : arg2)	// C-style ?: if-then-else expressions
+   e = !bool			// logical not for booleans
+   f = e || bool		// logical or for booleans
+   g = e && bool		// logical and for booleans
+   h = e == bool		// equality comparison for all types
+   i = "hello" != "world"	// equality comparison for all types
+   j = 1 <  arg1		// less than comparison for numbers
+   k = 1 >  arg1		// greater than comparison for numbers
+   l = 1 <= arg1		// less equal comparison for numbers
+   m = 1 >= arg1		// greater equal comparison for numbers
+   n = arg1 + arg2		// addition for ints, doubles, complex
+   o = arg1 - arg2		// subtraction for ints, doubles, complex
+   p = arg1 * arg2		// multiplication for ints, doubles, complex
+   q = arg1 / arg2		// division for ints, doubles, complex
+   r = arg1 ^ arg2		// exponentiation for ints, doubles, complex
+   s = -arg1			// negation for ints, doubles, complex
+}
+
+/*
+ * The standard posix functions for doubles are supported, as well as the
+ * standard ANSI/ISO functions for complex numbers.  Doubles may also be
+ * cast to integers via int().
+ */
+
+Functions {
+   double  = 0.7
+   complex = (double, 1.0)
+
+   ii = int(double)
+
+   a = abs(double)
+   b = abs(complex)
+   c = acos(double)
+   d = asin(double)
+   e = atan(double)
+   f = ceil(double)
+   g = conj(complex)
+   h = cos(double)
+   i = cos(complex)
+   j = cosh(double)
+   k = cosh(complex)
+   l = exp(double)
+   m = exp(complex)
+   n = fabs(double)
+   o = floor(double)
+   p = imag(complex)
+   q = log10(double)
+   r = log(double)
+   s = log(complex)
+   t = real(complex)
+   u = sin(double)
+   v = sin(complex)
+   w = sinh(double)
+   x = sinh(complex)
+   y = sqrt(double)
+   z = sqrt(complex)
+
+   aa = tan(double)
+}
+
+/*
+ * Just for fun, let's try some complex expressions.
+ */
+
+ComplexExpressions {
+   PI    = 4*atan(1.0)
+   PROCS = 10000
+   box   = [(0,0),(PROCS*20,PROCS*20)]
+   asci  = (PROCS >= 5000 ? "happy" : "sad")
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/logger/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/logger/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,92 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=defaultloggertest.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h defaultloggertest.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=userloggertest.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h userloggertest.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/logger/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/logger/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,74 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for timer and statistician test programs 
+##
+#########################################################################
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/test/logger
+VPATH         = @srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+default: check
+
+include $(OBJECT)/config/Makefile.config
+
+CPPFLAGS_EXTRA= -DTESTING=1
+
+defaultloggertest:  defaultloggertest.o $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) defaultloggertest.o \
+	   $(LIBSAMRAI) $(LDLIBS) -o $@
+
+userloggertest:  userloggertest.o $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) userloggertest.o \
+	   $(LIBSAMRAI) $(LDLIBS) -o $@
+
+NUM_TESTS = 2
+
+TEST_NPROCS = @TEST_NPROCS@
+
+check:  defaultloggertest userloggertest
+	@for p in `echo "$(TEST_NPROCS)" | tr "," " "`; do \
+                passed=1; \
+		$(OBJECT)/config/serpa-run $$p ./defaultloggertest; \
+		if ! grep "Test warning" defaultloggertest.log.0000000 >& /dev/null ; then passed=0; fi; \
+		if grep "Test debug1" defaultloggertest.log.0000000 >& /dev/null ; then passed=0; fi; \
+		if ! grep "Test debug2" defaultloggertest.log.0000000 >& /dev/null ; then passed=0; fi; \
+		if [ $$passed == 1 ] ; then echo "PASSED defaultloggertest"; else echo "FAILED defaultloggertest"; fi; \
+	done; \
+	for p in `echo "$(TEST_NPROCS)" | tr "," " "`; do \
+                passed=1; \
+		$(OBJECT)/config/serpa-run $$p ./userloggertest; \
+		if ! grep "Test warning" user.log >& /dev/null ; then passed=0; fi; \
+		if grep "Test debug1" user.log >& /dev/null ; then passed=0; fi; \
+		if ! grep "Test debug2" user.log >& /dev/null ; then passed=0; fi; \
+		passed=1; \
+		if [ $$passed == 1 ] ; then echo "PASSED userloggertest"; else echo "FAILED userloggertest"; fi; \
+	done;
+
+check2d:
+	$(MAKE) check
+
+check3d:
+	$(MAKE) check
+
+checkcompile: userloggertest defaultloggertest
+
+checktest:
+	rm -f makecheck.logfile
+	$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+	$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+	rm -f makecheck.logfile
+
+clean: 
+	$(SAMCLEAN)
+	$(RM) -rf defaultloggertest userloggertest
+	$(RM) -rf *.log.* stats
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/test/logger/defaultloggertest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/logger/defaultloggertest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,66 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Test program to demonstrate/test logging useing default appenders. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+// Headers for basic SAMRAI objects used in this code.
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/Logger.h"
+
+#include <string>
+using namespace std;
+
+using namespace SAMRAI;
+
+int main(
+   int argc,
+   char* argv[])
+{
+   int fail_count = 0;
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+
+      tbox::PIO::logAllNodes("defaultloggertest.log");
+
+      /*
+       * Write a test warning message.
+       */
+      TBOX_WARNING("Test warning");
+
+      /*
+       * Write a test debug message. Shouldn't see this since
+       * Debug messages are off by default.
+       */
+      TBOX_DEBUG("Test debug1 : should not show up");
+
+      tbox::Logger::getInstance()->setDebug(true);
+
+      /*
+       * Write a test debug message. Should see this
+       * one since we have turned on debug messages.
+       */
+      TBOX_DEBUG("Test debug2 : should show up");
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+   return fail_count;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/logger/userloggertest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/logger/userloggertest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,98 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Test program to demonstrate/test a user defined logger appender 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <string>
+#include <iostream>
+using namespace std;
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/Logger.h"
+
+using namespace SAMRAI;
+
+/*
+ * Simple appender that sends log messages to a file
+ */
+class StreamAppender:public tbox::Logger::Appender
+{
+
+public:
+   StreamAppender(
+      ostream* stream) {
+      d_stream = stream;
+   }
+
+   void logMessage(
+      const std::string& message,
+      const std::string& filename,
+      const int line)
+   {
+      (*d_stream) << "At :" << filename << " line :" << line
+                  << " message: " << message << std::endl;
+   }
+
+private:
+   ostream* d_stream;
+};
+
+int main(
+   int argc,
+   char* argv[])
+{
+   int fail_count = 0;
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+
+      fstream file("user.log", fstream::out);
+
+      tbox::Pointer<tbox::Logger::Appender> appender(
+         new StreamAppender(&file));
+
+      tbox::Logger::getInstance()->setWarningAppender(appender);
+      tbox::Logger::getInstance()->setAbortAppender(appender);
+      tbox::Logger::getInstance()->setDebugAppender(appender);
+
+      /*
+       * Write a test warning message.
+       */
+      TBOX_WARNING("Test warning");
+
+      /*
+       * Write a test debug message. Shouldn't see this since
+       * Debug messages are off by default.
+       */
+      TBOX_DEBUG("Test debug1 : should not show up");
+
+      tbox::Logger::getInstance()->setDebug(true);
+
+      /*
+       * Write a test debug message. Should see this
+       * one since we have turned on debug messages.
+       */
+      TBOX_DEBUG("Test debug2 : should show up");
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+   return fail_count;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/CellMultiblockTest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/CellMultiblockTest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,521 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR communication tests for cell-centered patch data 
+ *
+ ************************************************************************/
+
+#include "CellMultiblockTest.h"
+
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/BlockPatchGeometry.h"
+#include "SAMRAI/pdat/CellDoubleConstantRefine.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "MultiblockTester.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/tbox/Database.h"
+
+using namespace SAMRAI;
+
+CellMultiblockTest::CellMultiblockTest(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> main_input_db,
+   bool do_refine,
+   bool do_coarsen,
+   const string& refine_option):
+   PatchMultiblockTestStrategy(dim),
+   d_dim(dim)
+{
+   NULL_USE(do_refine);
+   NULL_USE(do_coarsen);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!main_input_db.isNull());
+   TBOX_ASSERT(!refine_option.empty());
+#endif
+
+   d_object_name = object_name;
+
+   d_refine_option = refine_option;
+
+   d_finest_level_number = main_input_db->
+      getDatabase("MultiblockPatchHierarchy")->
+      getDatabase("PatchHierarchy")->
+      getInteger("max_levels") - 1;
+
+   int num_blocks = main_input_db->getDatabase("MultiblockPatchHierarchy")->
+      getInteger("num_blocks");
+
+   d_skel_grid_geometry.resizeArray(num_blocks);
+
+   char geom_name[32];
+
+   for (int g = 0; g < num_blocks; g++) {
+
+      sprintf(geom_name, "BlockGridGeometry%d", g);
+
+      if (main_input_db->keyExists(geom_name)) {
+         d_skel_grid_geometry[g] = new geom::BlockGridGeometry(
+               dim,
+               geom_name,
+               main_input_db->getDatabase(geom_name),
+               g);
+
+      } else {
+         break;
+      }
+   }
+
+   tbox::Pointer<hier::MultiblockGridGeometry> mblk_geometry(
+      new hier::MultiblockGridGeometry(d_skel_grid_geometry));
+
+   setGridGeometry(mblk_geometry);
+
+   readTestInput(main_input_db->getDatabase("CellMultiblockTest"));
+}
+
+CellMultiblockTest::~CellMultiblockTest()
+{
+
+}
+
+void CellMultiblockTest::readTestInput(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   /*
+    * Base class reads variable parameters and boxes to refine.
+    */
+
+   readVariableInput(db->getDatabase("VariableData"));
+   readRefinementInput(db->getDatabase("RefinementData"));
+}
+
+void CellMultiblockTest::registerVariables(
+   MultiblockTester* commtest)
+{
+   TBOX_ASSERT(commtest != (MultiblockTester *)NULL);
+
+   int nvars = d_variable_src_name.getSize();
+
+   d_variables.resizeArray(nvars);
+
+   for (int i = 0; i < nvars; i++) {
+      d_variables[i] =
+         new pdat::CellVariable<double>(d_dim,
+                                        d_variable_src_name[i],
+                                        d_variable_depth[i]);
+
+      commtest->registerVariable(d_variables[i],
+         d_variables[i],
+         d_variable_src_ghosts[i],
+         d_variable_dst_ghosts[i],
+         d_skel_grid_geometry[0],
+         d_variable_refine_op[i]);
+
+   }
+
+}
+
+void CellMultiblockTest::initializeDataOnPatch(
+   hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number,
+   int block_number,
+   char src_or_dst)
+{
+   NULL_USE(hierarchy);
+   NULL_USE(src_or_dst);
+
+   if ((d_refine_option == "INTERIOR_FROM_SAME_LEVEL")
+       || ((d_refine_option == "INTERIOR_FROM_COARSER_LEVEL")
+           && (level_number < d_finest_level_number))) {
+
+      for (int i = 0; i < d_variables.getSize(); i++) {
+
+         tbox::Pointer<pdat::CellData<double> > cell_data =
+            patch.getPatchData(d_variables[i], getDataContext());
+
+         hier::Box dbox = cell_data->getGhostBox();
+
+         cell_data->fillAll((double)block_number);
+
+      }
+   }
+}
+
+void CellMultiblockTest::tagCellsToRefine(
+   hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number,
+   int tag_index)
+{
+   (void)hierarchy;
+
+   /*
+    * Base class sets tags in box array for each level.
+    */
+   tagCellsInInputBoxes(patch, level_number, tag_index);
+
+}
+
+void CellMultiblockTest::setPhysicalBoundaryConditions(
+   hier::Patch& patch,
+   const double time,
+   const hier::IntVector& gcw_to_fill) const
+{
+   (void)time;
+
+   tbox::Pointer<hier::BlockPatchGeometry>
+   pgeom = patch.getPatchGeometry();
+
+   const tbox::Array<hier::BoundaryBox> node_bdry =
+      pgeom->getCodimensionBoundaries(d_dim.getValue());
+   const int num_node_bdry_boxes = node_bdry.getSize();
+
+   tbox::Array<hier::BoundaryBox> edge_bdry;
+   int num_edge_bdry_boxes = 0;
+   if (d_dim > tbox::Dimension(1)) {
+      edge_bdry = pgeom->getCodimensionBoundaries(d_dim.getValue() - 1);
+      num_edge_bdry_boxes = edge_bdry.getSize();
+   }
+
+   tbox::Array<hier::BoundaryBox> face_bdry;
+   int num_face_bdry_boxes = 0;
+   if (d_dim == tbox::Dimension(3)) {
+      face_bdry = pgeom->getCodimensionBoundaries(d_dim.getValue() - 2);
+      num_face_bdry_boxes = face_bdry.getSize();
+   }
+
+   for (int i = 0; i < d_variables.getSize(); i++) {
+
+      tbox::Pointer<pdat::CellData<double> > cell_data =
+         patch.getPatchData(d_variables[i], getDataContext());
+
+      /*
+       * Set node boundary data.
+       */
+      for (int ni = 0; ni < num_node_bdry_boxes; ni++) {
+
+         hier::Box fill_box = pgeom->getBoundaryFillBox(node_bdry[ni],
+               patch.getBox(),
+               gcw_to_fill);
+
+         if (!node_bdry[ni].getIsMultiblockSingularity()) {
+            cell_data->fillAll((double)(node_bdry[ni].getLocationIndex() + 100),
+               fill_box);
+         }
+      }
+
+      if (d_dim > tbox::Dimension(1)) {
+         /*
+          * Set edge boundary data.
+          */
+         for (int ei = 0; ei < num_edge_bdry_boxes; ei++) {
+
+            hier::Box fill_box = pgeom->getBoundaryFillBox(edge_bdry[ei],
+                  patch.getBox(),
+                  gcw_to_fill);
+
+            if (!edge_bdry[ei].getIsMultiblockSingularity()) {
+               cell_data->fillAll((double)(edge_bdry[ei].getLocationIndex()
+                                           + 100),
+                  fill_box);
+            }
+         }
+      }
+
+      if (d_dim == tbox::Dimension(3)) {
+         /*
+          * Set face boundary data.
+          */
+         for (int fi = 0; fi < num_face_bdry_boxes; fi++) {
+
+            hier::Box fill_box = pgeom->getBoundaryFillBox(face_bdry[fi],
+                  patch.getBox(),
+                  gcw_to_fill);
+
+            if (!face_bdry[fi].getIsMultiblockSingularity()) {
+               cell_data->fillAll((double)(face_bdry[fi].getLocationIndex()
+                                           + 100),
+                  fill_box);
+            }
+         }
+      }
+
+   }
+
+}
+
+void CellMultiblockTest::fillSingularityBoundaryConditions(
+   hier::Patch& patch,
+   tbox::List<tbox::Pointer<hier::Patch> >& sing_patches,
+   const hier::Box& fill_box,
+   const hier::BoundaryBox& bbox)
+{
+   for (int i = 0; i < d_variables.getSize(); i++) {
+
+      tbox::Pointer<pdat::CellData<double> > cell_data =
+         patch.getPatchData(d_variables[i], getDataContext());
+
+      hier::Box sing_fill_box(cell_data->getGhostBox() * fill_box);
+      cell_data->fillAll(0.0, sing_fill_box);
+
+      int depth = cell_data->getDepth();
+
+      /*
+       * If sing_patches is not empty, that means there is enhanced
+       * connectivity, and we get data from other blocks
+       */
+
+      if (sing_patches.size()) {
+
+         for (tbox::List<tbox::Pointer<hier::Patch> >::
+              Iterator sp(sing_patches); sp; sp++) {
+            tbox::Pointer<pdat::CellData<double> > sing_data =
+               sp()->getPatchData(d_variables[i], getDataContext());
+            tbox::Pointer<hier::BlockPatchGeometry> patch_geom =
+               sp()->getPatchGeometry();
+            int sing_neighbor_id = patch_geom->getBlockNumber();
+            for (pdat::CellIterator ci(sing_fill_box); ci; ci++) {
+               for (int d = 0; d < depth; d++) {
+                  (*cell_data)(ci(), d) += sing_neighbor_id;
+               }
+            }
+         }
+
+         for (pdat::CellIterator ci(sing_fill_box); ci; ci++) {
+            for (int d = 0; d < depth; d++) {
+               (*cell_data)(ci(), d) /= sing_patches.size();
+            }
+         }
+
+         /*
+          * In cases of reduced connectivity, there are no other blocks
+          * from which to acquire data.
+          */
+
+      } else {
+
+         cell_data->fillAll(
+            (double)bbox.getLocationIndex() + 200.0, fill_box);
+
+      }
+   }
+}
+
+void CellMultiblockTest::postprocessRefine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const tbox::Pointer<hier::VariableContext>& context,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(fine.getDim());
+
+   pdat::CellDoubleConstantRefine ref_op(dim);
+
+   for (int i = 0; i < d_variables.getSize(); i++) {
+
+      int id = hier::VariableDatabase::getDatabase()->
+         mapVariableAndContextToIndex(d_variables[i], context);
+
+      ref_op.refine(fine, coarse, id, id, fine_box, ratio);
+   }
+}
+/*
+ *************************************************************************
+ *                                                                       *
+ * Verify results of communication operations.  This test must be        *
+ * consistent with data initialization and boundary operations above.    *
+ *                                                                       *
+ *************************************************************************
+ */
+bool CellMultiblockTest::verifyResults(
+   const hier::Patch& patch,
+   const tbox::Pointer<hier::MultiblockPatchHierarchy> hierarchy,
+   int level_number,
+   int block_number)
+{
+
+   tbox::plog << "\nEntering CellMultiblockTest::verifyResults..." << endl;
+   tbox::plog << "level_number = " << level_number << endl;
+   tbox::plog << "Patch box = " << patch.getBox() << endl;
+
+   hier::IntVector tgcw(d_dim, 0);
+   for (int i = 0; i < d_variables.getSize(); i++) {
+      tgcw.max(patch.getPatchData(d_variables[i], getDataContext())->
+         getGhostCellWidth());
+   }
+   hier::Box pbox = patch.getBox();
+
+   tbox::Pointer<pdat::CellData<double> > solution(
+      new pdat::CellData<double>(pbox, 1, tgcw));
+
+   hier::Box tbox(pbox);
+   tbox.grow(tgcw);
+
+   tbox::List<hier::MultiblockPatchHierarchy::Neighbor>& neighbors =
+      hierarchy->getNeighbors(block_number);
+   hier::BoxList singularity(
+      hierarchy->getSingularityBoxList(block_number));
+
+   hier::IntVector ratio =
+      hierarchy->getPatchLevel(level_number)->getRatioToLevelZero();
+
+   singularity.refine(ratio);
+
+   bool test_failed = false;
+
+   for (int i = 0; i < d_variables.getSize(); i++) {
+
+      double correct = (double)block_number;
+
+      tbox::Pointer<pdat::CellData<double> > cell_data =
+         patch.getPatchData(d_variables[i], getDataContext());
+      int depth = cell_data->getDepth();
+
+      for (pdat::CellIterator ci(pbox); ci; ci++) {
+         for (int d = 0; d < depth; d++) {
+            double result = (*cell_data)(ci(), d);
+
+            if (!tbox::MathUtilities<double>::equalEps(correct, result)) {
+               tbox::perr << "Test FAILED: ...."
+                          << " : cell index = " << ci() << endl;
+               tbox::perr << "    Variable = " << d_variable_src_name[i]
+               << " : depth index = " << d << endl;
+               tbox::perr << "    result = " << result
+                          << " : correct = " << correct << endl;
+               test_failed = true;
+            }
+         }
+      }
+
+      hier::Box gbox = cell_data->getGhostBox();
+
+      for (tbox::List<hier::MultiblockPatchHierarchy::Neighbor>::
+           Iterator ne(neighbors); ne; ne++) {
+
+         correct = ne().getBlockNumber();
+
+         if (ne().isSingularity()) continue;
+
+         hier::BoxList neighbor_ghost(ne().getTranslatedDomain());
+         neighbor_ghost.refine(ratio);
+         neighbor_ghost.intersectBoxes(gbox);
+
+         for (hier::BoxList::Iterator ng(neighbor_ghost); ng; ng++) {
+
+            for (pdat::CellIterator ci(ng()); ci; ci++) {
+               for (int d = 0; d < depth; d++) {
+                  double result = (*cell_data)(ci(), d);
+
+                  if (!tbox::MathUtilities<double>::equalEps(correct,
+                         result)) {
+                     tbox::perr << "Test FAILED: ...."
+                                << " : cell index = " << ci() << endl;
+                     tbox::perr << "    Variable = " << d_variable_src_name[i]
+                     << " : depth index = " << d << endl;
+                     tbox::perr << "    result = " << result
+                                << " : correct = " << correct << endl;
+                     test_failed = true;
+                  }
+               }
+            }
+         }
+      }
+
+      tbox::Pointer<hier::BlockPatchGeometry> pgeom =
+         patch.getPatchGeometry();
+
+      for (int b = 0; b < d_dim.getValue(); b++) {
+         tbox::Array<hier::BoundaryBox> bdry =
+            pgeom->getCodimensionBoundaries(b + 1);
+
+         for (int k = 0; k < bdry.size(); k++) {
+            hier::Box fill_box = pgeom->getBoundaryFillBox(bdry[k],
+                  patch.getBox(),
+                  tgcw);
+            fill_box = fill_box * gbox;
+
+            if (bdry[k].getIsMultiblockSingularity()) {
+               correct = 0.0;
+
+               int num_sing_neighbors = 0;
+               for (tbox::List
+                    <hier::MultiblockPatchHierarchy::Neighbor>::
+                    Iterator ns(neighbors); ns; ns++) {
+                  if (ns().isSingularity()) {
+                     hier::BoxList neighbor_ghost(
+                        ns().getTranslatedDomain());
+                     neighbor_ghost.refine(ratio);
+                     neighbor_ghost.intersectBoxes(fill_box);
+                     if (neighbor_ghost.size()) {
+                        num_sing_neighbors++;
+                        correct += (double)ns().getBlockNumber();
+                     }
+                  }
+               }
+
+               if (num_sing_neighbors == 0) {
+
+                  correct = (double)bdry[k].getLocationIndex() + 200.0;
+
+               } else {
+
+                  correct /= (double)num_sing_neighbors;
+
+               }
+
+            } else {
+               correct = (double)(bdry[k].getLocationIndex() + 100);
+            }
+
+            for (pdat::CellIterator ci(fill_box); ci; ci++) {
+               for (int d = 0; d < depth; d++) {
+                  double result = (*cell_data)(ci(), d);
+
+                  if (!tbox::MathUtilities<double>::equalEps(correct,
+                         result)) {
+                     tbox::perr << "Test FAILED: ...."
+                                << " : cell index = " << ci() << endl;
+                     tbox::perr << "    Variable = " << d_variable_src_name[i]
+                     << " : depth index = " << d << endl;
+                     tbox::perr << "    result = " << result
+                                << " : correct = " << correct << endl;
+                     test_failed = true;
+                  }
+               }
+            }
+
+         }
+      }
+
+   }
+
+   if (!test_failed) {
+      tbox::plog << "CellMultiblockTest Successful!" << endl;
+   } else {
+      tbox::perr << "Multiblock CellMultiblockTest FAILED: \n" << endl;
+   }
+
+   solution.setNull();   // just to be anal...
+
+   tbox::plog << "\nExiting CellMultiblockTest::verifyResults..." << endl;
+   tbox::plog << "level_number = " << level_number << endl;
+   tbox::plog << "Patch box = " << patch.getBox() << endl << endl;
+
+   return !test_failed;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/CellMultiblockTest.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/CellMultiblockTest.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,156 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR communication tests for cell-centered patch data 
+ *
+ ************************************************************************/
+
+#ifndef included_CellMultiblockTest
+#define included_CellMultiblockTest
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/geom/BlockGridGeometry.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "PatchMultiblockTestStrategy.h"
+
+#include "SAMRAI/hier/BlockPatchGeometry.h"
+#include "SAMRAI/hier/Variable.h"
+
+using namespace SAMRAI;
+
+/**
+ * Class CellMultiblockTest provides routines to test communication operations
+ * for cell-centered patch data on an AMR patch hierarchy.
+ *
+ * See PatchMultiblockTestStrategy header file comments for variable and
+ * refinement input data description.
+ */
+
+class CellMultiblockTest:public PatchMultiblockTestStrategy
+{
+public:
+   /**
+    * The constructor initializes variable data arrays to zero length.
+    */
+   CellMultiblockTest(
+      const string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> main_input_db,
+      bool do_refine,
+      bool do_coarsen,
+      const string& refine_option);
+
+   /**
+    * Virtual destructor for CellMultiblockTest.
+    */
+   virtual ~CellMultiblockTest();
+
+   /**
+    * User-supplied boundary conditions.  Note that we do not implement
+    * user-defined coarsen and refine operations.
+    */
+   void
+   setPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const double time,
+      const hier::IntVector& gcw_to_fill) const;
+
+   void
+   fillSingularityBoundaryConditions(
+      hier::Patch& patch,
+      tbox::List<tbox::Pointer<hier::Patch> >& sing_patches,
+      const hier::Box& fill_box,
+      const hier::BoundaryBox& boundary_box);
+
+   /**
+    * This function is called from the MultiblockTester constructor.  Its
+    * purpose is to register variables used in the patch data test
+    * and appropriate communication parameters (ghost cell widths,
+    * coarsen/refine operations) with the MultiblockTester object, which
+    * manages the variable storage.
+    */
+   void
+   registerVariables(
+      MultiblockTester* commtest);
+
+   /**
+    * Function for setting data on new patch in hierarchy.
+    *
+    * @param src_or_dst Flag set to 's' for source or 'd' for destination
+    *        to indicate variables to set data for.
+    */
+   virtual void
+   initializeDataOnPatch(
+      hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number,
+      int block_number,
+      char src_or_dst);
+
+   /**
+    * Function for tagging cells on each patch to refine.
+    */
+   void
+   tagCellsToRefine(
+      hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number,
+      int tag_index);
+
+   /**
+    * Function for checking results of communication operations.
+    */
+   bool
+   verifyResults(
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::MultiblockPatchHierarchy> hierarchy,
+      int level_number,
+      int block_number);
+
+   ///
+   void
+   postprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const tbox::Pointer<hier::VariableContext>& context,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   /**
+    * Function for reading test data from input file.
+    */
+   void
+   readTestInput(
+      tbox::Pointer<tbox::Database> db);
+
+   /*
+    * Object string identifier for error reporting
+    */
+   string d_object_name;
+
+   const tbox::Dimension d_dim;
+
+   /*
+    * Data members specific to this cell data test.
+    */
+   tbox::Array<tbox::Pointer<hier::GridGeometry> > d_skel_grid_geometry;
+
+   string d_refine_option;
+   int d_finest_level_number;
+
+   tbox::Array<tbox::Pointer<hier::Variable> > d_variables;
+
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/EdgeMultiblockTest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/EdgeMultiblockTest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,737 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR communication tests for edge-centered patch data 
+ *
+ ************************************************************************/
+
+#include "EdgeMultiblockTest.h"
+
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/BlockPatchGeometry.h"
+#include "SAMRAI/pdat/EdgeDoubleConstantRefine.h"
+#include "SAMRAI/pdat/EdgeIndex.h"
+#include "SAMRAI/pdat/EdgeIterator.h"
+#include "SAMRAI/pdat/EdgeVariable.h"
+#include "MultiblockTester.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/tbox/Database.h"
+
+using namespace SAMRAI;
+
+EdgeMultiblockTest::EdgeMultiblockTest(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> main_input_db,
+   bool do_refine,
+   bool do_coarsen,
+   const string& refine_option):
+   PatchMultiblockTestStrategy(dim),
+   d_dim(dim)
+{
+   NULL_USE(do_refine);
+   NULL_USE(do_coarsen);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!main_input_db.isNull());
+   TBOX_ASSERT(!refine_option.empty());
+#endif
+
+   d_object_name = object_name;
+
+   d_refine_option = refine_option;
+
+   d_finest_level_number = main_input_db->
+      getDatabase("MultiblockPatchHierarchy")->
+      getDatabase("PatchHierarchy")->
+      getInteger("max_levels") - 1;
+
+   int num_blocks = main_input_db->getDatabase("MultiblockPatchHierarchy")->
+      getInteger("num_blocks");
+
+   d_skel_grid_geometry.resizeArray(num_blocks);
+
+   char geom_name[32];
+
+   for (int g = 0; g < num_blocks; g++) {
+
+      sprintf(geom_name, "BlockGridGeometry%d", g);
+
+      if (main_input_db->keyExists(geom_name)) {
+         d_skel_grid_geometry[g] = new geom::BlockGridGeometry(
+               dim,
+               geom_name,
+               main_input_db->getDatabase(geom_name),
+               g);
+
+      } else {
+         break;
+      }
+   }
+
+   tbox::Pointer<hier::MultiblockGridGeometry> mblk_geometry(
+      new hier::MultiblockGridGeometry(d_skel_grid_geometry));
+
+   setGridGeometry(mblk_geometry);
+
+   readTestInput(main_input_db->getDatabase("EdgeMultiblockTest"));
+}
+
+EdgeMultiblockTest::~EdgeMultiblockTest()
+{
+}
+
+void EdgeMultiblockTest::readTestInput(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   /*
+    * Base class reads variable parameters and boxes to refine.
+    */
+
+   readVariableInput(db->getDatabase("VariableData"));
+   readRefinementInput(db->getDatabase("RefinementData"));
+}
+
+void EdgeMultiblockTest::registerVariables(
+   MultiblockTester* commtest)
+{
+   TBOX_ASSERT(commtest != (MultiblockTester *)NULL);
+
+   int nvars = d_variable_src_name.getSize();
+
+   d_variables.resizeArray(nvars);
+
+   for (int i = 0; i < nvars; i++) {
+      d_variables[i] =
+         new pdat::EdgeVariable<double>(d_dim,
+                                        d_variable_src_name[i],
+                                        d_variable_depth[i]);
+
+      commtest->registerVariable(d_variables[i],
+         d_variables[i],
+         d_variable_src_ghosts[i],
+         d_variable_dst_ghosts[i],
+         d_skel_grid_geometry[0],
+         d_variable_refine_op[i]);
+
+   }
+
+}
+
+void EdgeMultiblockTest::initializeDataOnPatch(
+   hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number,
+   int block_number,
+   char src_or_dst)
+{
+   NULL_USE(hierarchy);
+   NULL_USE(src_or_dst);
+
+   if ((d_refine_option == "INTERIOR_FROM_SAME_LEVEL")
+       || ((d_refine_option == "INTERIOR_FROM_COARSER_LEVEL")
+           && (level_number < d_finest_level_number))) {
+
+      for (int i = 0; i < d_variables.getSize(); i++) {
+
+         tbox::Pointer<pdat::EdgeData<double> > edge_data =
+            patch.getPatchData(d_variables[i], getDataContext());
+
+         hier::Box dbox = edge_data->getGhostBox();
+
+         edge_data->fillAll((double)block_number);
+
+      }
+   }
+}
+
+void EdgeMultiblockTest::tagCellsToRefine(
+   hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number,
+   int tag_index)
+{
+   (void)hierarchy;
+
+   /*
+    * Base class sets tags in box array for each level.
+    */
+   tagCellsInInputBoxes(patch, level_number, tag_index);
+
+}
+
+void EdgeMultiblockTest::setPhysicalBoundaryConditions(
+   hier::Patch& patch,
+   const double time,
+   const hier::IntVector& gcw_to_fill) const
+{
+   (void)time;
+
+   tbox::Pointer<hier::BlockPatchGeometry>
+   pgeom = patch.getPatchGeometry();
+
+   const tbox::Array<hier::BoundaryBox> node_bdry =
+      pgeom->getCodimensionBoundaries(d_dim.getValue());
+   const int num_node_bdry_boxes = node_bdry.getSize();
+
+   tbox::Array<hier::BoundaryBox> edge_bdry;
+   int num_edge_bdry_boxes = 0;
+   if (d_dim > tbox::Dimension(1)) {
+      edge_bdry = pgeom->getCodimensionBoundaries(d_dim.getValue() - 1);
+      num_edge_bdry_boxes = edge_bdry.getSize();
+   }
+
+   tbox::Array<hier::BoundaryBox> face_bdry;
+   int num_face_bdry_boxes = 0;
+   if (d_dim == tbox::Dimension(3)) {
+      face_bdry = pgeom->getCodimensionBoundaries(d_dim.getValue() - 2);
+      num_face_bdry_boxes = face_bdry.getSize();
+   }
+
+   for (int i = 0; i < d_variables.getSize(); i++) {
+
+      tbox::Pointer<pdat::EdgeData<double> > edge_data =
+         patch.getPatchData(d_variables[i], getDataContext());
+
+      /*
+       * Set node boundary data.
+       */
+      for (int nb = 0; nb < num_node_bdry_boxes; nb++) {
+
+         hier::Box fill_box = pgeom->getBoundaryFillBox(node_bdry[nb],
+               patch.getBox(),
+               gcw_to_fill);
+
+         for (int axis = 0; axis < d_dim.getValue(); axis++) {
+            hier::Box patch_edge_box =
+               pdat::EdgeGeometry::toEdgeBox(patch.getBox(), axis);
+            if (!node_bdry[nb].getIsMultiblockSingularity()) {
+               for (pdat::EdgeIterator ni(fill_box, axis); ni; ni++) {
+                  if (!patch_edge_box.contains(ni())) {
+                     for (int d = 0; d < edge_data->getDepth(); d++) {
+                        (*edge_data)(ni(), d) =
+                           (double)(node_bdry[nb].getLocationIndex() + 100);
+                     }
+                  }
+               }
+            }
+         }
+      }
+
+      if (d_dim > tbox::Dimension(1)) {
+         /*
+          * Set edge boundary data.
+          */
+         for (int eb = 0; eb < num_edge_bdry_boxes; eb++) {
+
+            hier::Box fill_box = pgeom->getBoundaryFillBox(edge_bdry[eb],
+                  patch.getBox(),
+                  gcw_to_fill);
+
+            for (int axis = 0; axis < d_dim.getValue(); axis++) {
+               hier::Box patch_edge_box =
+                  pdat::EdgeGeometry::toEdgeBox(patch.getBox(), axis);
+               hier::Index plower(patch_edge_box.lower());
+               hier::Index pupper(patch_edge_box.upper());
+
+               if (!edge_bdry[eb].getIsMultiblockSingularity()) {
+                  for (pdat::EdgeIterator ni(fill_box, axis); ni; ni++) {
+                     if (!patch_edge_box.contains(ni())) {
+                        bool use_index = true;
+                        for (int n = 0; n < d_dim.getValue(); n++) {
+                           if (axis != n &&
+                               edge_bdry[eb].getBox().numberCells(n) == 1) {
+                              if (ni() (n) == plower(n) || ni() (n) ==
+                                  pupper(n)) {
+                                 use_index = false;
+                                 break;
+                              }
+                           }
+                        }
+
+                        if (use_index) {
+                           for (int d = 0; d < edge_data->getDepth(); d++) {
+                              (*edge_data)(ni(), d) =
+                                 (double)(edge_bdry[eb].getLocationIndex()
+                                          + 100);
+                           }
+                        }
+                     }
+                  }
+               }
+            }
+         }
+      }
+
+      if (d_dim == tbox::Dimension(3)) {
+         /*
+          * Set face boundary data.
+          */
+         for (int fb = 0; fb < num_face_bdry_boxes; fb++) {
+
+            hier::Box fill_box = pgeom->getBoundaryFillBox(face_bdry[fb],
+                  patch.getBox(),
+                  gcw_to_fill);
+
+            for (int axis = 0; axis < d_dim.getValue(); axis++) {
+               hier::Box patch_edge_box =
+                  pdat::EdgeGeometry::toEdgeBox(patch.getBox(), axis);
+
+               hier::Index plower(patch_edge_box.lower());
+               hier::Index pupper(patch_edge_box.upper());
+
+               if (!face_bdry[fb].getIsMultiblockSingularity()) {
+                  for (pdat::EdgeIterator ni(fill_box, axis); ni; ni++) {
+                     if (!patch_edge_box.contains(ni())) {
+                        bool use_index = true;
+                        for (int n = 0; n < d_dim.getValue(); n++) {
+                           if (axis != n &&
+                               face_bdry[fb].getBox().numberCells(n) == 1) {
+                              if (ni() (n) == plower(n) || ni() (n) ==
+                                  pupper(n)) {
+                                 use_index = false;
+                                 break;
+                              }
+                           }
+                        }
+
+                        if (use_index) {
+                           (*edge_data)(ni()) =
+                              (double)(face_bdry[fb].getLocationIndex() + 100);
+                        }
+                     }
+                  }
+               }
+            }
+         }
+      }
+
+   }
+
+}
+
+void EdgeMultiblockTest::fillSingularityBoundaryConditions(
+   hier::Patch& patch,
+   tbox::List<tbox::Pointer<hier::Patch> >& sing_patches,
+   const hier::Box& fill_box,
+   const hier::BoundaryBox& bbox)
+{
+   for (int i = 0; i < d_variables.getSize(); i++) {
+
+      tbox::Pointer<pdat::EdgeData<double> > edge_data =
+         patch.getPatchData(d_variables[i], getDataContext());
+
+      hier::Box sing_fill_box(edge_data->getGhostBox() * fill_box);
+
+      int depth = edge_data->getDepth();
+
+      for (int axis = 0; axis < d_dim.getValue(); axis++) {
+         hier::Box pbox =
+            pdat::EdgeGeometry::toEdgeBox(patch.getBox(), axis);
+
+         hier::Index plower(pbox.lower());
+         hier::Index pupper(pbox.upper());
+
+         for (pdat::EdgeIterator ni(sing_fill_box, axis); ni; ni++) {
+            bool use_index = true;
+            for (int n = 0; n < d_dim.getValue(); n++) {
+               if (axis != n && bbox.getBox().numberCells(n) == 1) {
+                  if (ni() (n) == plower(n) || ni() (n) == pupper(n)) {
+                     use_index = false;
+                     break;
+                  }
+               }
+            }
+            if (use_index) {
+               for (int d = 0; d < depth; d++) {
+                  (*edge_data)(ni(), d) = 0.0;
+               }
+            }
+         }
+      }
+
+      /*
+       * If sing_patches is not empty, that means there is enhanced
+       * connectivity, and we get data from other blocks
+       */
+
+      if (sing_patches.size()) {
+
+         for (tbox::List<tbox::Pointer<hier::Patch> >::Iterator
+              sp(sing_patches); sp; sp++) {
+            tbox::Pointer<pdat::EdgeData<double> > sing_data =
+               sp()->getPatchData(d_variables[i], getDataContext());
+            tbox::Pointer<hier::BlockPatchGeometry> patch_geom =
+               sp()->getPatchGeometry();
+            int sing_neighbor_id = patch_geom->getBlockNumber();
+            for (int axis = 0; axis < d_dim.getValue(); axis++) {
+
+               hier::Box pbox =
+                  pdat::EdgeGeometry::toEdgeBox(patch.getBox(), axis);
+
+               hier::Index plower(pbox.lower());
+               hier::Index pupper(pbox.upper());
+
+               for (pdat::EdgeIterator ci(sing_fill_box, axis); ci; ci++) {
+                  bool use_index = true;
+                  for (int n = 0; n < d_dim.getValue(); n++) {
+                     if (axis != n && bbox.getBox().numberCells(n) == 1) {
+                        if (ci() (n) == plower(n) || ci() (n) == pupper(n)) {
+                           use_index = false;
+                           break;
+                        }
+                     }
+                  }
+                  if (use_index) {
+                     for (int d = 0; d < depth; d++) {
+                        (*edge_data)(ci(), d) += sing_neighbor_id;
+                     }
+                  }
+               }
+            }
+         }
+
+         for (int axis = 0; axis < d_dim.getValue(); axis++) {
+
+            hier::Box pbox =
+               pdat::EdgeGeometry::toEdgeBox(patch.getBox(), axis);
+
+            hier::Index plower(pbox.lower());
+            hier::Index pupper(pbox.upper());
+
+            for (pdat::EdgeIterator ci(sing_fill_box, axis); ci; ci++) {
+               bool use_index = true;
+               for (int n = 0; n < d_dim.getValue(); n++) {
+                  if (axis != n && bbox.getBox().numberCells(n) == 1) {
+                     if (ci() (n) == plower(n) || ci() (n) == pupper(n)) {
+                        use_index = false;
+                        break;
+                     }
+                  }
+               }
+               if (use_index) {
+                  for (int d = 0; d < depth; d++) {
+                     (*edge_data)(ci(), d) /= sing_patches.size();
+                  }
+               }
+            }
+         }
+
+         /*
+          * In cases of reduced connectivity, there are no other blocks
+          * from which to acquire data.
+          */
+
+      } else {
+
+         for (int axis = 0; axis < d_dim.getValue(); axis++) {
+
+            hier::Box pbox =
+               pdat::EdgeGeometry::toEdgeBox(patch.getBox(), axis);
+
+            hier::Index plower(pbox.lower());
+            hier::Index pupper(pbox.upper());
+
+            for (pdat::EdgeIterator ci(sing_fill_box, axis); ci; ci++) {
+               bool use_index = true;
+               for (int n = 0; n < d_dim.getValue(); n++) {
+                  if (axis != n && bbox.getBox().numberCells(n) == 1) {
+                     if (ci() (n) == plower(n) || ci() (n) == pupper(n)) {
+                        use_index = false;
+                        break;
+                     }
+                  }
+               }
+               if (use_index) {
+                  for (int d = 0; d < depth; d++) {
+                     (*edge_data)(ci(), d) =
+                        (double)bbox.getLocationIndex() + 200.0;
+                  }
+               }
+            }
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Verify results of communication operations.  This test must be        *
+ * consistent with data initialization and boundary operations above.    *
+ *                                                                       *
+ *************************************************************************
+ */
+bool EdgeMultiblockTest::verifyResults(
+   const hier::Patch& patch,
+   const tbox::Pointer<hier::MultiblockPatchHierarchy> hierarchy,
+   int level_number,
+   int block_number)
+{
+
+   tbox::plog << "\nEntering EdgeMultiblockTest::verifyResults..." << endl;
+   tbox::plog << "level_number = " << level_number << endl;
+   tbox::plog << "Patch box = " << patch.getBox() << endl;
+
+   hier::IntVector tgcw(d_dim, 0);
+   for (int i = 0; i < d_variables.getSize(); i++) {
+      tgcw.max(patch.getPatchData(d_variables[i], getDataContext())->
+         getGhostCellWidth());
+   }
+   hier::Box pbox = patch.getBox();
+
+   tbox::Pointer<pdat::EdgeData<double> > solution(
+      new pdat::EdgeData<double>(pbox, 1, tgcw));
+
+   hier::Box tbox(pbox);
+   tbox.grow(tgcw);
+
+   tbox::List<hier::MultiblockPatchHierarchy::Neighbor>& neighbors =
+      hierarchy->getNeighbors(block_number);
+   hier::BoxList singularity(
+      hierarchy->getSingularityBoxList(block_number));
+
+   hier::IntVector ratio =
+      hierarchy->getPatchLevel(level_number)->getRatioToLevelZero();
+
+   singularity.refine(ratio);
+
+   bool test_failed = false;
+
+   for (int i = 0; i < d_variables.getSize(); i++) {
+
+      double correct = (double)block_number;
+
+      tbox::Pointer<pdat::EdgeData<double> > edge_data =
+         patch.getPatchData(d_variables[i], getDataContext());
+      int depth = edge_data->getDepth();
+
+      hier::Box interior_box(pbox);
+      interior_box.grow(hier::IntVector(d_dim, -1));
+
+      for (int axis = 0; axis < d_dim.getValue(); axis++) {
+         for (pdat::EdgeIterator ci(interior_box, axis); ci; ci++) {
+            for (int d = 0; d < depth; d++) {
+               double result = (*edge_data)(ci(), d);
+
+               if (!tbox::MathUtilities<double>::equalEps(correct, result)) {
+                  tbox::perr << "Test FAILED: ...."
+                             << " : edge index = " << ci() << endl;
+                  tbox::perr << "    Variable = " << d_variable_src_name[i]
+                  << " : depth index = " << d << endl;
+                  tbox::perr << "    result = " << result
+                             << " : correct = " << correct << endl;
+                  test_failed = true;
+               }
+            }
+         }
+      }
+
+      hier::Box gbox = edge_data->getGhostBox();
+
+      for (int axis = 0; axis < d_dim.getValue(); axis++) {
+         hier::Box patch_edge_box =
+            pdat::EdgeGeometry::toEdgeBox(pbox, axis);
+
+         hier::BoxList sing_edge_boxlist;
+         for (hier::BoxList::Iterator si(singularity); si; si++) {
+            sing_edge_boxlist.addItem(
+               pdat::EdgeGeometry::toEdgeBox(si(), axis));
+         }
+
+         for (tbox::List<hier::MultiblockPatchHierarchy::Neighbor>::
+              Iterator ne(neighbors); ne; ne++) {
+
+            correct = ne().getBlockNumber();
+
+            hier::BoxList neighbor_ghost(ne().getTranslatedDomain());
+
+            hier::BoxList neighbor_edge_ghost;
+            for (hier::BoxList::Iterator nn(neighbor_ghost); nn; nn++) {
+               neighbor_edge_ghost.addItem(
+                  pdat::EdgeGeometry::toEdgeBox(nn(), axis));
+            }
+
+            neighbor_edge_ghost.refine(ratio);
+
+            neighbor_edge_ghost.intersectBoxes(
+               pdat::EdgeGeometry::toEdgeBox(gbox, axis));
+
+            neighbor_edge_ghost.removeIntersections(sing_edge_boxlist);
+
+            for (hier::BoxList::Iterator ng(neighbor_edge_ghost);
+                 ng; ng++) {
+
+               for (hier::BoxIterator ci(ng()); ci; ci++) {
+                  if (!patch_edge_box.contains(ci())) {
+                     pdat::EdgeIndex ei(ci(), axis, 0);
+
+                     for (int d = 0; d < depth; d++) {
+                        double result = (*edge_data)(ei, d);
+
+                        if (!tbox::MathUtilities<double>::equalEps(correct,
+                               result)) {
+                           tbox::perr << "Test FAILED: ...."
+                                      << " : edge index = " << ei << endl;
+                           tbox::perr << "  Variable = "
+                           << d_variable_src_name[i]
+                           << " : depth index = " << d << endl;
+                           tbox::perr << "    result = " << result
+                                      << " : correct = " << correct << endl;
+                           test_failed = true;
+                        }
+                     }
+                  }
+               }
+            }
+         }
+      }
+
+      tbox::Pointer<hier::BlockPatchGeometry> pgeom =
+         patch.getPatchGeometry();
+
+      for (int b = 0; b < d_dim.getValue(); b++) {
+         tbox::Array<hier::BoundaryBox> bdry =
+            pgeom->getCodimensionBoundaries(b + 1);
+
+         for (int k = 0; k < bdry.size(); k++) {
+            hier::Box fill_box = pgeom->getBoundaryFillBox(bdry[k],
+                  patch.getBox(),
+                  tgcw);
+            fill_box = fill_box * gbox;
+
+            if (bdry[k].getIsMultiblockSingularity()) {
+               correct = 0.0;
+
+               int num_sing_neighbors = 0;
+               for (tbox::List
+                    <hier::MultiblockPatchHierarchy::Neighbor>::
+                    Iterator ns(neighbors); ns; ns++) {
+                  if (ns().isSingularity()) {
+                     hier::BoxList neighbor_ghost(
+                        ns().getTranslatedDomain());
+                     neighbor_ghost.refine(ratio);
+                     neighbor_ghost.intersectBoxes(fill_box);
+                     if (neighbor_ghost.size()) {
+                        num_sing_neighbors++;
+                        correct += (double)ns().getBlockNumber();
+                     }
+                  }
+               }
+
+               if (num_sing_neighbors == 0) {
+
+                  correct = (double)bdry[k].getLocationIndex() + 200.0;
+
+               } else {
+
+                  correct /= (double)num_sing_neighbors;
+
+               }
+
+            } else {
+               correct = (double)(bdry[k].getLocationIndex() + 100);
+            }
+
+            for (int axis = 0; axis < d_dim.getValue(); axis++) {
+               hier::Box patch_edge_box =
+                  pdat::EdgeGeometry::toEdgeBox(pbox, axis);
+
+               for (pdat::EdgeIterator ci(fill_box, axis); ci; ci++) {
+
+                  if (!patch_edge_box.contains(ci())) {
+
+                     bool use_index = true;
+                     for (int n = 0; n < d_dim.getValue(); n++) {
+                        if (axis != n && bdry[k].getBox().numberCells(n) ==
+                            1) {
+                           if (ci() (n) == patch_edge_box.lower() (n) ||
+                               ci() (n) == patch_edge_box.upper() (n)) {
+                              use_index = false;
+                              break;
+                           }
+                        }
+                     }
+
+                     if (use_index) {
+                        for (int d = 0; d < depth; d++) {
+                           double result = (*edge_data)(ci(), d);
+
+                           if (!tbox::MathUtilities<double>::equalEps(correct,
+                                  result)) {
+                              tbox::perr << "Test FAILED: ...."
+                                         << " : edge index = " << ci() << endl;
+                              tbox::perr << "  Variable = "
+                              << d_variable_src_name[i]
+                              << " : depth index = " << d << endl;
+                              tbox::perr << "    result = " << result
+                                         << " : correct = " << correct << endl;
+                              test_failed = true;
+                           }
+                        }
+                     }
+                  }
+               }
+            }
+         }
+      }
+   }
+
+   if (!test_failed) {
+      tbox::plog << "EdgeMultiblockTest Successful!" << endl;
+   } else {
+      tbox::perr << "Multiblock EdgeMultiblockTest FAILED: \n" << endl;
+   }
+
+   solution.setNull();   // just to be anal...
+
+   tbox::plog << "\nExiting EdgeMultiblockTest::verifyResults..." << endl;
+   tbox::plog << "level_number = " << level_number << endl;
+   tbox::plog << "Patch box = " << patch.getBox() << endl << endl;
+
+   return !test_failed;
+}
+
+void EdgeMultiblockTest::postprocessRefine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const tbox::Pointer<hier::VariableContext>& context,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(fine.getDim());
+
+   pdat::EdgeDoubleConstantRefine ref_op(dim);
+
+   hier::BoxList fine_box_list(fine_box);
+
+   xfer::BoxGeometryVariableFillPattern fill_pattern;
+
+   for (int i = 0; i < d_variables.getSize(); i++) {
+
+      int id = hier::VariableDatabase::getDatabase()->
+         mapVariableAndContextToIndex(d_variables[i], context);
+
+      tbox::Pointer<hier::PatchDataFactory> fine_pdf =
+         fine.getPatchDescriptor()->getPatchDataFactory(id);
+
+      tbox::Pointer<hier::BoxOverlap> fine_overlap =
+         fill_pattern.computeFillBoxesOverlap(
+            fine_box_list,
+            fine.getBox(),
+            fine.getPatchData(id)->getGhostBox(),
+            *fine_pdf);
+
+      ref_op.refine(fine, coarse, id, id, *fine_overlap, ratio);
+   }
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/EdgeMultiblockTest.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/EdgeMultiblockTest.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,155 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR communication tests for edge-centered patch data 
+ *
+ ************************************************************************/
+
+#ifndef included_EdgeMultiblockTest
+#define included_EdgeMultiblockTest
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/geom/BlockGridGeometry.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "PatchMultiblockTestStrategy.h"
+#include "SAMRAI/hier/BlockPatchGeometry.h"
+#include "SAMRAI/hier/Variable.h"
+
+using namespace SAMRAI;
+
+/**
+ * Class EdgeMultiblockTest provides routines to test communication operations
+ * for edge-centered patch data on an AMR patch hierarchy.
+ *
+ * See PatchMultiblockTestStrategy header file comments for variable and
+ * refinement input data description.
+ */
+
+class EdgeMultiblockTest:public PatchMultiblockTestStrategy
+{
+public:
+   /**
+    * The constructor initializes variable data arrays to zero length.
+    */
+   EdgeMultiblockTest(
+      const string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> main_input_db,
+      bool do_refine,
+      bool do_coarsen,
+      const string& refine_option);
+
+   /**
+    * Virtual destructor for EdgeMultiblockTest.
+    */
+   virtual ~EdgeMultiblockTest();
+
+   /**
+    * User-supplied boundary conditions.  Note that we do not implement
+    * user-defined coarsen and refine operations.
+    */
+   void
+   setPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const double time,
+      const hier::IntVector& gcw_to_fill) const;
+
+   void
+   fillSingularityBoundaryConditions(
+      hier::Patch& patch,
+      tbox::List<tbox::Pointer<hier::Patch> >& sing_patches,
+      const hier::Box& fill_box,
+      const hier::BoundaryBox& boundary_box);
+
+   /**
+    * This function is called from the MultiblockTester constructor.  Its
+    * purpose is to register variables used in the patch data test
+    * and appropriate communication parameters (ghost cell widths,
+    * coarsen/refine operations) with the MultiblockTester object, which
+    * manages the variable storage.
+    */
+   void
+   registerVariables(
+      MultiblockTester* commtest);
+
+   /**
+    * Function for setting data on new patch in hierarchy.
+    *
+    * @param src_or_dst Flag set to 's' for source or 'd' for destination
+    *        to indicate variables to set data for.
+    */
+   virtual void
+   initializeDataOnPatch(
+      hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number,
+      int block_number,
+      char src_or_dst);
+
+   /**
+    * Function for tagging cells on each patch to refine.
+    */
+   void
+   tagCellsToRefine(
+      hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number,
+      int tag_index);
+
+   /**
+    * Function for checking results of communication operations.
+    */
+   bool
+   verifyResults(
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::MultiblockPatchHierarchy> hierarchy,
+      int level_number,
+      int block_number);
+
+   ///
+   void
+   postprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const tbox::Pointer<hier::VariableContext>& context,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   /**
+    * Function for reading test data from input file.
+    */
+   void
+   readTestInput(
+      tbox::Pointer<tbox::Database> db);
+
+   /*
+    * Object string identifier for error reporting
+    */
+   string d_object_name;
+
+   const tbox::Dimension d_dim;
+
+   /*
+    * Data members specific to this edge data test.
+    */
+   tbox::Array<tbox::Pointer<hier::GridGeometry> > d_skel_grid_geometry;
+
+   string d_refine_option;
+   int d_finest_level_number;
+
+   tbox::Array<tbox::Pointer<hier::Variable> > d_variables;
+
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/FaceMultiblockTest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/FaceMultiblockTest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,720 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR communication tests for face-centered patch data 
+ *
+ ************************************************************************/
+
+#include "FaceMultiblockTest.h"
+
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/BlockPatchGeometry.h"
+#include "SAMRAI/pdat/FaceIndex.h"
+#include "SAMRAI/pdat/FaceIterator.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "MultiblockTester.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/tbox/Database.h"
+
+using namespace SAMRAI;
+
+FaceMultiblockTest::FaceMultiblockTest(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> main_input_db,
+   bool do_refine,
+   bool do_coarsen,
+   const string& refine_option):
+   PatchMultiblockTestStrategy(dim),
+   d_dim(dim)
+{
+   NULL_USE(do_refine);
+   NULL_USE(do_coarsen);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!main_input_db.isNull());
+   TBOX_ASSERT(!refine_option.empty());
+#endif
+
+   d_object_name = object_name;
+
+   d_refine_option = refine_option;
+
+   d_finest_level_number = main_input_db->
+      getDatabase("MultiblockPatchHierarchy")->
+      getDatabase("PatchHierarchy")->
+      getInteger("max_levels") - 1;
+
+   int num_blocks = main_input_db->getDatabase("MultiblockPatchHierarchy")->
+      getInteger("num_blocks");
+
+   d_skel_grid_geometry.resizeArray(num_blocks);
+
+   char geom_name[32];
+
+   for (int g = 0; g < num_blocks; g++) {
+
+      sprintf(geom_name, "BlockGridGeometry%d", g);
+
+      if (main_input_db->keyExists(geom_name)) {
+         d_skel_grid_geometry[g] = new geom::BlockGridGeometry(
+               dim,
+               geom_name,
+               main_input_db->getDatabase(geom_name),
+               g);
+
+      } else {
+         break;
+      }
+   }
+
+   tbox::Pointer<hier::MultiblockGridGeometry> mblk_geometry(
+      new hier::MultiblockGridGeometry(d_skel_grid_geometry));
+
+   setGridGeometry(mblk_geometry);
+
+   readTestInput(main_input_db->getDatabase("FaceMultiblockTest"));
+}
+
+FaceMultiblockTest::~FaceMultiblockTest()
+{
+}
+
+void FaceMultiblockTest::readTestInput(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   /*
+    * Base class reads variable parameters and boxes to refine.
+    */
+
+   readVariableInput(db->getDatabase("VariableData"));
+   readRefinementInput(db->getDatabase("RefinementData"));
+}
+
+void FaceMultiblockTest::registerVariables(
+   MultiblockTester* commtest)
+{
+   TBOX_ASSERT(commtest != (MultiblockTester *)NULL);
+
+   int nvars = d_variable_src_name.getSize();
+
+   d_variables.resizeArray(nvars);
+
+   for (int i = 0; i < nvars; i++) {
+      d_variables[i] =
+         new pdat::FaceVariable<double>(d_dim,
+                                        d_variable_src_name[i],
+                                        d_variable_depth[i]);
+
+      commtest->registerVariable(d_variables[i],
+         d_variables[i],
+         d_variable_src_ghosts[i],
+         d_variable_dst_ghosts[i],
+         d_skel_grid_geometry[0],
+         d_variable_refine_op[i]);
+
+   }
+
+}
+
+void FaceMultiblockTest::initializeDataOnPatch(
+   hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number,
+   int block_number,
+   char src_or_dst)
+{
+   NULL_USE(hierarchy);
+   NULL_USE(src_or_dst);
+
+   if ((d_refine_option == "INTERIOR_FROM_SAME_LEVEL")
+       || ((d_refine_option == "INTERIOR_FROM_COARSER_LEVEL")
+           && (level_number < d_finest_level_number))) {
+
+      for (int i = 0; i < d_variables.getSize(); i++) {
+
+         tbox::Pointer<pdat::FaceData<double> > face_data =
+            patch.getPatchData(d_variables[i], getDataContext());
+
+         hier::Box dbox = face_data->getGhostBox();
+
+         face_data->fillAll((double)block_number);
+
+      }
+   }
+}
+
+void FaceMultiblockTest::tagCellsToRefine(
+   hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number,
+   int tag_index)
+{
+   (void)hierarchy;
+
+   /*
+    * Base class sets tags in box array for each level.
+    */
+   tagCellsInInputBoxes(patch, level_number, tag_index);
+
+}
+
+void FaceMultiblockTest::setPhysicalBoundaryConditions(
+   hier::Patch& patch,
+   const double time,
+   const hier::IntVector& gcw_to_fill) const
+{
+   (void)time;
+
+   tbox::Pointer<hier::BlockPatchGeometry>
+   pgeom = patch.getPatchGeometry();
+
+   const tbox::Array<hier::BoundaryBox> node_bdry =
+      pgeom->getCodimensionBoundaries(d_dim.getValue());
+   const int num_node_bdry_boxes = node_bdry.getSize();
+
+   tbox::Array<hier::BoundaryBox> edge_bdry;
+   int num_edge_bdry_boxes = 0;
+   if (d_dim > tbox::Dimension(1)) {
+      edge_bdry = pgeom->getCodimensionBoundaries(d_dim.getValue() - 1);
+      num_edge_bdry_boxes = edge_bdry.getSize();
+   }
+
+   tbox::Array<hier::BoundaryBox> face_bdry;
+   int num_face_bdry_boxes = 0;
+   if (d_dim == tbox::Dimension(3)) {
+      face_bdry = pgeom->getCodimensionBoundaries(d_dim.getValue() - 2);
+      num_face_bdry_boxes = face_bdry.getSize();
+   }
+
+   for (int i = 0; i < d_variables.getSize(); i++) {
+
+      tbox::Pointer<pdat::FaceData<double> > face_data =
+         patch.getPatchData(d_variables[i], getDataContext());
+
+      /*
+       * Set node boundary data.
+       */
+      for (int nb = 0; nb < num_node_bdry_boxes; nb++) {
+
+         hier::Box fill_box = pgeom->getBoundaryFillBox(node_bdry[nb],
+               patch.getBox(),
+               gcw_to_fill);
+
+         for (int axis = 0; axis < d_dim.getValue(); axis++) {
+            hier::Box patch_face_box =
+               pdat::FaceGeometry::toFaceBox(patch.getBox(), axis);
+            if (!node_bdry[nb].getIsMultiblockSingularity()) {
+               for (pdat::FaceIterator ni(fill_box, axis); ni; ni++) {
+                  if (!patch_face_box.contains(ni())) {
+                     for (int d = 0; d < face_data->getDepth(); d++) {
+                        (*face_data)(ni(), d) =
+                           (double)(node_bdry[nb].getLocationIndex() + 100);
+                     }
+                  }
+               }
+            }
+         }
+      }
+
+      if (d_dim > tbox::Dimension(1)) {
+         /*
+          * Set edge boundary data.
+          */
+         for (int eb = 0; eb < num_edge_bdry_boxes; eb++) {
+
+            hier::Box fill_box = pgeom->getBoundaryFillBox(edge_bdry[eb],
+                  patch.getBox(),
+                  gcw_to_fill);
+
+            for (int axis = 0; axis < d_dim.getValue(); axis++) {
+               hier::Box patch_face_box =
+                  pdat::FaceGeometry::toFaceBox(patch.getBox(), axis);
+               hier::Index plower(patch_face_box.lower());
+               hier::Index pupper(patch_face_box.upper());
+
+               if (!edge_bdry[eb].getIsMultiblockSingularity()) {
+                  for (pdat::FaceIterator ni(fill_box, axis); ni; ni++) {
+                     if (!patch_face_box.contains(ni())) {
+                        bool use_index = true;
+                        for (int n = 0; n < d_dim.getValue(); n++) {
+                           if (axis == n &&
+                               edge_bdry[eb].getBox().numberCells(n) == 1) {
+                              if (ni() (0) == plower(0) || ni() (0) ==
+                                  pupper(0)) {
+                                 use_index = false;
+                                 break;
+                              }
+                           }
+                        }
+
+                        if (use_index) {
+                           for (int d = 0; d < face_data->getDepth(); d++) {
+                              (*face_data)(ni(), d) =
+                                 (double)(edge_bdry[eb].getLocationIndex()
+                                          + 100);
+                           }
+                        }
+                     }
+                  }
+               }
+            }
+         }
+      }
+
+      if (d_dim == tbox::Dimension(3)) {
+         /*
+          * Set face boundary data.
+          */
+         for (int fb = 0; fb < num_face_bdry_boxes; fb++) {
+
+            hier::Box fill_box = pgeom->getBoundaryFillBox(face_bdry[fb],
+                  patch.getBox(),
+                  gcw_to_fill);
+
+            for (int axis = 0; axis < d_dim.getValue(); axis++) {
+               hier::Box patch_face_box =
+                  pdat::FaceGeometry::toFaceBox(patch.getBox(), axis);
+               hier::Index plower(patch_face_box.lower());
+               hier::Index pupper(patch_face_box.upper());
+
+               if (!face_bdry[fb].getIsMultiblockSingularity()) {
+                  for (pdat::FaceIterator ni(fill_box, axis); ni; ni++) {
+                     if (!patch_face_box.contains(ni())) {
+                        bool use_index = true;
+                        for (int n = 0; n < d_dim.getValue(); n++) {
+                           if (axis == n &&
+                               face_bdry[fb].getBox().numberCells(n) == 1) {
+                              if (ni() (0) == plower(0) || ni() (0) ==
+                                  pupper(0)) {
+                                 use_index = false;
+                                 break;
+                              }
+                           }
+                        }
+
+                        if (use_index) {
+                           for (int d = 0; d < face_data->getDepth(); d++) {
+                              (*face_data)(ni(), d) =
+                                 (double)(face_bdry[fb].getLocationIndex()
+                                          + 100);
+                           }
+                        }
+                     }
+                  }
+               }
+            }
+         }
+      }
+
+   }
+
+}
+
+void FaceMultiblockTest::fillSingularityBoundaryConditions(
+   hier::Patch& patch,
+   tbox::List<tbox::Pointer<hier::Patch> >& sing_patches,
+   const hier::Box& fill_box,
+   const hier::BoundaryBox& bbox)
+{
+   for (int i = 0; i < d_variables.getSize(); i++) {
+
+      tbox::Pointer<pdat::FaceData<double> > face_data =
+         patch.getPatchData(d_variables[i], getDataContext());
+
+      hier::Box sing_fill_box(face_data->getGhostBox() * fill_box);
+
+      int depth = face_data->getDepth();
+
+      for (int axis = 0; axis < d_dim.getValue(); axis++) {
+         hier::Box pbox =
+            pdat::FaceGeometry::toFaceBox(patch.getBox(), axis);
+
+         hier::Index plower(pbox.lower());
+         hier::Index pupper(pbox.upper());
+
+         for (pdat::FaceIterator ni(sing_fill_box, axis); ni; ni++) {
+            bool use_index = true;
+            for (int n = 0; n < d_dim.getValue(); n++) {
+               if (axis == n && bbox.getBox().numberCells(n) == 1) {
+                  if (ni() (0) == plower(0) || ni() (0) == pupper(0)) {
+                     use_index = false;
+                     break;
+                  }
+               }
+            }
+            if (use_index) {
+               for (int d = 0; d < depth; d++) {
+                  (*face_data)(ni(), d) = 0.0;
+               }
+            }
+         }
+      }
+
+      /*
+       * If sing_patches is not empty, that means there is enhanced
+       * connectivity, and we get data from other blocks
+       */
+
+      if (sing_patches.size()) {
+
+         for (tbox::List<tbox::Pointer<hier::Patch> >::Iterator
+              sp(sing_patches); sp; sp++) {
+            tbox::Pointer<pdat::FaceData<double> > sing_data =
+               sp()->getPatchData(d_variables[i], getDataContext());
+            tbox::Pointer<hier::BlockPatchGeometry> patch_geom =
+               sp()->getPatchGeometry();
+            int sing_neighbor_id = patch_geom->getBlockNumber();
+            for (int axis = 0; axis < d_dim.getValue(); axis++) {
+
+               hier::Box pbox =
+                  pdat::FaceGeometry::toFaceBox(patch.getBox(), axis);
+
+               hier::Index plower(pbox.lower());
+               hier::Index pupper(pbox.upper());
+
+               for (pdat::FaceIterator ci(sing_fill_box, axis); ci; ci++) {
+                  bool use_index = true;
+                  for (int n = 0; n < d_dim.getValue(); n++) {
+                     if (axis == n && bbox.getBox().numberCells(n) == 1) {
+                        if (ci() (0) == plower(0) || ci() (0) == pupper(0)) {
+                           use_index = false;
+                           break;
+                        }
+                     }
+                  }
+                  if (use_index) {
+                     for (int d = 0; d < depth; d++) {
+                        (*face_data)(ci(), d) += sing_neighbor_id;
+                     }
+                  }
+               }
+            }
+         }
+
+         for (int axis = 0; axis < d_dim.getValue(); axis++) {
+
+            hier::Box pbox =
+               pdat::FaceGeometry::toFaceBox(patch.getBox(), axis);
+
+            hier::Index plower(pbox.lower());
+            hier::Index pupper(pbox.upper());
+
+            for (pdat::FaceIterator ci(sing_fill_box, axis); ci; ci++) {
+               bool use_index = true;
+               for (int n = 0; n < d_dim.getValue(); n++) {
+                  if (axis == n && bbox.getBox().numberCells(n) == 1) {
+                     if (ci() (0) == plower(0) || ci() (0) == pupper(0)) {
+                        use_index = false;
+                        break;
+                     }
+                  }
+               }
+               if (use_index) {
+                  for (int d = 0; d < depth; d++) {
+                     (*face_data)(ci(), d) /= sing_patches.size();
+                  }
+               }
+            }
+         }
+
+         /*
+          * In cases of reduced connectivity, there are no other blocks
+          * from which to acquire data.
+          */
+
+      } else {
+
+         for (int axis = 0; axis < d_dim.getValue(); axis++) {
+
+            hier::Box pbox =
+               pdat::FaceGeometry::toFaceBox(patch.getBox(), axis);
+
+            hier::Index plower(pbox.lower());
+            hier::Index pupper(pbox.upper());
+
+            for (pdat::FaceIterator ci(sing_fill_box, axis); ci; ci++) {
+               bool use_index = true;
+               for (int n = 0; n < d_dim.getValue(); n++) {
+                  if (axis == n && bbox.getBox().numberCells(n) == 1) {
+                     if (ci() (0) == plower(0) || ci() (0) == pupper(0)) {
+                        use_index = false;
+                        break;
+                     }
+                  }
+               }
+               if (use_index) {
+                  for (int d = 0; d < depth; d++) {
+                     (*face_data)(ci(), d) =
+                        (double)bbox.getLocationIndex() + 200.0;
+                  }
+               }
+            }
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Verify results of communication operations.  This test must be        *
+ * consistent with data initialization and boundary operations above.    *
+ *                                                                       *
+ *************************************************************************
+ */
+bool FaceMultiblockTest::verifyResults(
+   const hier::Patch& patch,
+   const tbox::Pointer<hier::MultiblockPatchHierarchy> hierarchy,
+   int level_number,
+   int block_number)
+{
+
+   tbox::plog << "\nEntering FaceMultiblockTest::verifyResults..." << endl;
+   tbox::plog << "level_number = " << level_number << endl;
+   tbox::plog << "Patch box = " << patch.getBox() << endl;
+
+   hier::IntVector tgcw(d_dim, 0);
+   for (int i = 0; i < d_variables.getSize(); i++) {
+      tgcw.max(patch.getPatchData(d_variables[i], getDataContext())->
+         getGhostCellWidth());
+   }
+   hier::Box pbox = patch.getBox();
+
+   tbox::Pointer<pdat::FaceData<double> > solution(
+      new pdat::FaceData<double>(pbox, 1, tgcw));
+
+   hier::Box tbox(pbox);
+   tbox.grow(tgcw);
+
+   tbox::List<hier::MultiblockPatchHierarchy::Neighbor>& neighbors =
+      hierarchy->getNeighbors(block_number);
+   hier::BoxList singularity(
+      hierarchy->getSingularityBoxList(block_number));
+
+   hier::IntVector ratio =
+      hierarchy->getPatchLevel(level_number)->getRatioToLevelZero();
+
+   singularity.refine(ratio);
+
+   bool test_failed = false;
+
+   for (int i = 0; i < d_variables.getSize(); i++) {
+
+      double correct = (double)block_number;
+
+      tbox::Pointer<pdat::FaceData<double> > face_data =
+         patch.getPatchData(d_variables[i], getDataContext());
+      int depth = face_data->getDepth();
+
+      hier::Box interior_box(pbox);
+      interior_box.grow(hier::IntVector(d_dim, -1));
+
+      for (int axis = 0; axis < d_dim.getValue(); axis++) {
+         for (pdat::FaceIterator ci(interior_box, axis); ci; ci++) {
+            for (int d = 0; d < depth; d++) {
+               double result = (*face_data)(ci(), d);
+
+               if (!tbox::MathUtilities<double>::equalEps(correct, result)) {
+                  tbox::perr << "Test FAILED: ...."
+                             << " : face index = " << ci() << endl;
+                  tbox::perr << "    Variable = " << d_variable_src_name[i]
+                  << " : depth index = " << d << endl;
+                  tbox::perr << "    result = " << result
+                             << " : correct = " << correct << endl;
+                  test_failed = true;
+               }
+            }
+         }
+      }
+
+      hier::Box gbox = face_data->getGhostBox();
+
+      for (int axis = 0; axis < d_dim.getValue(); axis++) {
+         hier::Box patch_face_box =
+            pdat::FaceGeometry::toFaceBox(pbox, axis);
+
+         for (tbox::List<hier::MultiblockPatchHierarchy::Neighbor>::
+              Iterator ne(neighbors); ne; ne++) {
+
+            if (ne().isSingularity()) continue;
+
+            correct = ne().getBlockNumber();
+
+            hier::BoxList neighbor_ghost(ne().getTranslatedDomain());
+            neighbor_ghost.refine(ratio);
+            neighbor_ghost.intersectBoxes(gbox);
+
+            for (hier::BoxList::Iterator ng(neighbor_ghost); ng; ng++) {
+
+               for (pdat::FaceIterator ci(ng(), axis); ci; ci++) {
+                  if (!patch_face_box.contains(ci())) {
+                     for (int d = 0; d < depth; d++) {
+                        double result = (*face_data)(ci(), d);
+
+                        if (!tbox::MathUtilities<double>::equalEps(correct,
+                               result)) {
+                           tbox::perr << "Test FAILED: ...."
+                                      << " : face index = " << ci() << endl;
+                           tbox::perr << "  Variable = "
+                           << d_variable_src_name[i]
+                           << " : depth index = " << d << endl;
+                           tbox::perr << "    result = " << result
+                                      << " : correct = " << correct << endl;
+                           test_failed = true;
+                        }
+                     }
+                  }
+               }
+            }
+         }
+      }
+
+      tbox::Pointer<hier::BlockPatchGeometry> pgeom =
+         patch.getPatchGeometry();
+
+      for (int b = 0; b < d_dim.getValue(); b++) {
+         tbox::Array<hier::BoundaryBox> bdry =
+            pgeom->getCodimensionBoundaries(b + 1);
+
+         for (int k = 0; k < bdry.size(); k++) {
+            hier::Box fill_box = pgeom->getBoundaryFillBox(bdry[k],
+                  patch.getBox(),
+                  tgcw);
+            fill_box = fill_box * gbox;
+
+            if (bdry[k].getIsMultiblockSingularity()) {
+               correct = 0.0;
+
+               int num_sing_neighbors = 0;
+               for (tbox::List
+                    <hier::MultiblockPatchHierarchy::Neighbor>::
+                    Iterator ns(neighbors); ns; ns++) {
+                  if (ns().isSingularity()) {
+                     hier::BoxList neighbor_ghost(
+                        ns().getTranslatedDomain());
+                     neighbor_ghost.refine(ratio);
+                     neighbor_ghost.intersectBoxes(fill_box);
+                     if (neighbor_ghost.size()) {
+                        num_sing_neighbors++;
+                        correct += (double)ns().getBlockNumber();
+                     }
+                  }
+               }
+
+               if (num_sing_neighbors == 0) {
+
+                  correct = (double)bdry[k].getLocationIndex() + 200.0;
+
+               } else {
+
+                  correct /= (double)num_sing_neighbors;
+
+               }
+
+            } else {
+               correct = (double)(bdry[k].getLocationIndex() + 100);
+            }
+
+            for (int axis = 0; axis < d_dim.getValue(); axis++) {
+               hier::Box patch_face_box =
+                  pdat::FaceGeometry::toFaceBox(pbox, axis);
+
+               for (pdat::FaceIterator ci(fill_box, axis); ci; ci++) {
+
+                  if (!patch_face_box.contains(ci())) {
+
+                     bool use_index = true;
+                     for (int n = 0; n < d_dim.getValue(); n++) {
+                        if (axis == n && bdry[k].getBox().numberCells(n) ==
+                            1) {
+                           if (ci() (0) == patch_face_box.lower() (0) ||
+                               ci() (0) == patch_face_box.upper() (0)) {
+                              use_index = false;
+                              break;
+                           }
+                        }
+                     }
+
+                     if (use_index) {
+                        for (int d = 0; d < depth; d++) {
+                           double result = (*face_data)(ci(), d);
+
+                           if (!tbox::MathUtilities<double>::equalEps(correct,
+                                  result)) {
+                              tbox::perr << "Test FAILED: ...."
+                                         << " : face index = " << ci() << endl;
+                              tbox::perr << "  Variable = "
+                              << d_variable_src_name[i]
+                              << " : depth index = " << d << endl;
+                              tbox::perr << "    result = " << result
+                                         << " : correct = " << correct << endl;
+                              test_failed = true;
+                           }
+                        }
+                     }
+                  }
+               }
+            }
+         }
+      }
+   }
+
+   if (!test_failed) {
+      tbox::plog << "FaceMultiblockTest Successful!" << endl;
+   } else {
+      tbox::perr << "Multiblock FaceMultiblockTest FAILED: .\n" << endl;
+   }
+
+   solution.setNull();   // just to be anal...
+
+   tbox::plog << "\nExiting FaceMultiblockTest::verifyResults..." << endl;
+   tbox::plog << "level_number = " << level_number << endl;
+   tbox::plog << "Patch box = " << patch.getBox() << endl << endl;
+
+   return !test_failed;
+}
+
+void FaceMultiblockTest::postprocessRefine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const tbox::Pointer<hier::VariableContext>& context,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(fine.getDim());
+
+   pdat::FaceDoubleConstantRefine ref_op(dim);
+
+   hier::BoxList fine_box_list(fine_box);
+
+   xfer::BoxGeometryVariableFillPattern fill_pattern;
+
+   for (int i = 0; i < d_variables.getSize(); i++) {
+
+      int id = hier::VariableDatabase::getDatabase()->
+         mapVariableAndContextToIndex(d_variables[i], context);
+
+      tbox::Pointer<hier::PatchDataFactory> fine_pdf =
+         fine.getPatchDescriptor()->getPatchDataFactory(id);
+
+      tbox::Pointer<hier::BoxOverlap> fine_overlap =
+         fill_pattern.computeFillBoxesOverlap(
+            fine_box_list,
+            fine.getBox(),
+            fine.getPatchData(id)->getGhostBox(),
+            *fine_pdf);
+
+      ref_op.refine(fine, coarse, id, id, *fine_overlap, ratio);
+   }
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/FaceMultiblockTest.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/FaceMultiblockTest.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,156 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR communication tests for edge-centered patch data 
+ *
+ ************************************************************************/
+
+#ifndef included_FaceMultiblockTest
+#define included_FaceMultiblockTest
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceDoubleConstantRefine.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "PatchMultiblockTestStrategy.h"
+#include "SAMRAI/geom/BlockGridGeometry.h"
+#include "SAMRAI/hier/Variable.h"
+
+using namespace SAMRAI;
+
+/**
+ * Class FaceMultiblockTest provides routines to test communication operations
+ * for edge-centered patch data on an AMR patch hierarchy.
+ *
+ * See PatchMultiblockTestStrategy header file comments for variable and
+ * refinement input data description.
+ */
+
+class FaceMultiblockTest:public PatchMultiblockTestStrategy
+{
+public:
+   /**
+    * The constructor initializes variable data arrays to zero length.
+    */
+   FaceMultiblockTest(
+      const string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> main_input_db,
+      bool do_refine,
+      bool do_coarsen,
+      const string& refine_option);
+
+   /**
+    * Virtual destructor for FaceMultiblockTest.
+    */
+   virtual ~FaceMultiblockTest();
+
+   /**
+    * User-supplied boundary conditions.  Note that we do not implement
+    * user-defined coarsen and refine operations.
+    */
+   void
+   setPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const double time,
+      const hier::IntVector& gcw_to_fill) const;
+
+   void
+   fillSingularityBoundaryConditions(
+      hier::Patch& patch,
+      tbox::List<tbox::Pointer<hier::Patch> >& sing_patches,
+      const hier::Box& fill_box,
+      const hier::BoundaryBox& boundary_box);
+
+   /**
+    * This function is called from the MultiblockTester constructor.  Its
+    * purpose is to register variables used in the patch data test
+    * and appropriate communication parameters (ghost cell widths,
+    * coarsen/refine operations) with the MultiblockTester object, which
+    * manages the variable storage.
+    */
+   void
+   registerVariables(
+      MultiblockTester* commtest);
+
+   /**
+    * Function for setting data on new patch in hierarchy.
+    *
+    * @param src_or_dst Flag set to 's' for source or 'd' for destination
+    *        to indicate variables to set data for.
+    */
+   virtual void
+   initializeDataOnPatch(
+      hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number,
+      int block_number,
+      char src_or_dst);
+
+   /**
+    * Function for tagging cells on each patch to refine.
+    */
+   void
+   tagCellsToRefine(
+      hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number,
+      int tag_index);
+
+   /**
+    * Function for checking results of communication operations.
+    */
+   bool
+   verifyResults(
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::MultiblockPatchHierarchy> hierarchy,
+      int level_number,
+      int block_number);
+
+   ///
+   void
+   postprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const tbox::Pointer<hier::VariableContext>& context,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   /**
+    * Function for reading test data from input file.
+    */
+   void
+   readTestInput(
+      tbox::Pointer<tbox::Database> db);
+
+   /*
+    * Object string identifier for error reporting
+    */
+   string d_object_name;
+
+   const tbox::Dimension d_dim;
+
+   /*
+    * Data members specific to this edge data test.
+    */
+   tbox::Array<tbox::Pointer<hier::GridGeometry> >
+   d_skel_grid_geometry;
+
+   string d_refine_option;
+   int d_finest_level_number;
+
+   tbox::Array<tbox::Pointer<hier::Variable> > d_variables;
+
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1984 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=CellMultiblockTest.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/BlockGridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/geom/BlockGridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	CellMultiblockTest.C CellMultiblockTest.h MultiblockTester.h	\
+	PatchMultiblockTestStrategy.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=EdgeMultiblockTest.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/BlockGridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/geom/BlockGridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	EdgeMultiblockTest.C EdgeMultiblockTest.h MultiblockTester.h	\
+	PatchMultiblockTestStrategy.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=FaceMultiblockTest.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/BlockGridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/geom/BlockGridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	FaceMultiblockTest.C FaceMultiblockTest.h MultiblockTester.h	\
+	PatchMultiblockTestStrategy.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=MultiblockTester.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevelIterator.I	\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevelIterator.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BergerRigoutsos.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingAlgorithm.I	\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingAlgorithm.h	\
+	$(INCLUDE_SAM)/SAMRAI/mesh/MultiblockGriddingTagger.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	MultiblockTester.C MultiblockTester.h				\
+	PatchMultiblockTestStrategy.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
+FILE_4=NodeMultiblockTest.o
+DEPENDS_4:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/BlockGridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/geom/BlockGridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	MultiblockTester.h NodeMultiblockTest.C NodeMultiblockTest.h	\
+	PatchMultiblockTestStrategy.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_4 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_4:X.o=${NDIM}.o}: ${DEPENDS_4}
+
+FILE_5=PatchMultiblockTestStrategy.o
+DEPENDS_5:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	MultiblockTester.h PatchMultiblockTestStrategy.C		\
+	PatchMultiblockTestStrategy.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_5 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_5:X.o=${NDIM}.o}: ${DEPENDS_5}
+
+FILE_6=Pointer-MultiblockTester.o
+DEPENDS_6:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	MultiblockTester.h Pointer-MultiblockTester.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_6 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C
+endif
+
+${FILE_6:X.o=${NDIM}.o}: ${DEPENDS_6}
+
+FILE_7=SideMultiblockTest.o
+DEPENDS_7:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/BlockGridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/geom/BlockGridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	MultiblockTester.h PatchMultiblockTestStrategy.h		\
+	SideMultiblockTest.C SideMultiblockTest.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_7 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_7:X.o=${NDIM}.o}: ${DEPENDS_7}
+
+FILE_8=main.o
+DEPENDS_8:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/BlockGridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/geom/BlockGridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BlockPatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenPatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockCoarsenSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefinePatchStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/MultiblockRefineSchedule.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	CellMultiblockTest.h EdgeMultiblockTest.h FaceMultiblockTest.h	\
+	MultiblockTester.h NodeMultiblockTest.h				\
+	PatchMultiblockTestStrategy.h SideMultiblockTest.h main.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_8 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_8:X.o=${NDIM}.o}: ${DEPENDS_8}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,73 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for SAMRAI multiblock tests 
+##
+#########################################################################
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/test/mblkcomm
+VPATH         = @srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+default: check	
+
+include $(OBJECT)/config/Makefile.config
+
+CPPFLAGS_EXTRA= -DNDIM=$(PDIM)  -DTESTING=1
+
+NUM_TESTS = 25
+
+TEST_NPROCS = @TEST_NPROCS@
+
+CXX_OBJS      = MultiblockTester.o \
+	PatchMultiblockTestStrategy.o \
+	main.o \
+	CellMultiblockTest.o \
+	EdgeMultiblockTest.o \
+	FaceMultiblockTest.o \
+	NodeMultiblockTest.o \
+	Pointer-MultiblockTester.o \
+	SideMultiblockTest.o
+
+
+main:	$(CXX_OBJS) $(LIBSAMRAIDEPEND) 
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) \
+	$(LIBSAMRAI) $(LDLIBS) -o $@
+
+check:
+	$(MAKE) check2d
+	$(MAKE) check3d
+
+check2d:	main
+	@for i in test_inputs/*2d*.input ; do	\
+	   $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+	       ./main $${i};	\
+	done
+
+check3d:	main
+	@for i in test_inputs/*3d*.input ; do	\
+	   $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+	       ./main $${i};	\
+	done
+
+checkcompile: main
+
+checktest:
+	rm -f makecheck.logfile
+	$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+	$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+	rm -f makecheck.logfile
+
+clean-check:
+	$(SAMCLEAN)
+
+clean:		clean-check
+	$(RM) main
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/MultiblockTester.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/MultiblockTester.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,749 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Manager class for patch data communication tests. 
+ *
+ ************************************************************************/
+
+#include "MultiblockTester.h"
+
+#include "SAMRAI/mesh/BergerRigoutsos.h"
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "PatchMultiblockTestStrategy.h"
+#include "SAMRAI/mesh/TreeLoadBalancer.h"
+#include "SAMRAI/mesh/MultiblockGriddingAlgorithm.h"
+#include "SAMRAI/mesh/StandardTagAndInitialize.h"
+#include "SAMRAI/mesh/MultiblockGriddingTagger.h"
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/hier/MultiblockPatchLevelIterator.h"
+
+using namespace SAMRAI;
+
+/*
+ *************************************************************************
+ *									*
+ * The constructor initializes object state.  The destructor is empty.   *
+ *									*
+ *************************************************************************
+ */
+
+MultiblockTester::MultiblockTester(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> main_input_db,
+   PatchMultiblockTestStrategy* data_test,
+   bool do_refine,
+   bool do_coarsen,
+   const string& refine_option):
+   xfer::CoarsenPatchStrategy(dim),
+   xfer::MultiblockRefinePatchStrategy(dim),
+   d_dim(dim),
+   d_reset_refine_algorithm(dim),
+   d_reset_coarsen_algorithm(dim)
+{
+   NULL_USE(main_input_db);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(data_test != (PatchMultiblockTestStrategy *)NULL);
+#endif
+
+   d_object_name = object_name;
+   d_data_test_strategy = data_test;
+   d_patch_hierarchy = NULL;
+
+   d_fake_time = 0.0;
+
+   d_is_reset = false;
+
+   d_do_refine = do_refine;
+   d_do_coarsen = false;
+   if (!do_refine) {
+      d_do_coarsen = do_coarsen;
+   }
+
+   d_refine_option = refine_option;
+   if (!((d_refine_option == "INTERIOR_FROM_SAME_LEVEL")
+         || (d_refine_option == "INTERIOR_FROM_COARSER_LEVEL"))) {
+      TBOX_ERROR(object_name << " input error: illegal refine_option = "
+                             << d_refine_option << endl);
+   }
+
+   d_patch_data_components.clrAllFlags();
+   d_refine_schedule.resizeArray(0);
+   d_coarsen_schedule.resizeArray(0);
+
+   d_source =
+      hier::VariableDatabase::getDatabase()->getContext("SOURCE");
+   d_destination =
+      hier::VariableDatabase::getDatabase()->getContext("DESTINATION");
+   d_refine_scratch =
+      hier::VariableDatabase::getDatabase()->getContext("REFINE_SCRATCH");
+
+   d_reset_source =
+      hier::VariableDatabase::getDatabase()->getContext("SOURCE");
+   d_reset_destination =
+      hier::VariableDatabase::getDatabase()->getContext("DESTINATION");
+   d_reset_refine_scratch =
+      hier::VariableDatabase::getDatabase()->getContext("REFINE_SCRATCH");
+
+   d_data_test_strategy->registerVariables(this);
+}
+
+MultiblockTester::~MultiblockTester()
+{
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Add variable with associated attributes to set of test variables.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MultiblockTester::registerVariable(
+   const tbox::Pointer<hier::Variable> src_variable,
+   const tbox::Pointer<hier::Variable> dst_variable,
+   const hier::IntVector& src_ghosts,
+   const hier::IntVector& dst_ghosts,
+   const tbox::Pointer<xfer::Geometry> xfer_geom,
+   const string& operator_name)
+{
+   TBOX_ASSERT(!src_variable.isNull());
+   TBOX_ASSERT(!dst_variable.isNull());
+   TBOX_ASSERT(!xfer_geom.isNull());
+   TBOX_ASSERT(!operator_name.empty());
+
+   hier::VariableDatabase* variable_db =
+      hier::VariableDatabase::getDatabase();
+
+   int src_id = variable_db->registerVariableAndContext(src_variable,
+         d_source,
+         src_ghosts);
+
+   int dst_id = variable_db->registerVariableAndContext(dst_variable,
+         d_destination,
+         dst_ghosts);
+
+   TBOX_ASSERT(src_id != -1);
+   TBOX_ASSERT(dst_id != -1);
+
+   d_patch_data_components.setFlag(src_id);
+   d_patch_data_components.setFlag(dst_id);
+
+   tbox::Pointer<xfer::RefineOperator> refine_operator(NULL);
+   tbox::Pointer<xfer::CoarsenOperator> coarsen_operator(NULL);
+
+   if (d_do_refine) {
+      refine_operator = xfer_geom->lookupRefineOperator(src_variable,
+            operator_name);
+
+      d_mblk_refine_alg =
+         new xfer::MultiblockRefineAlgorithm(d_patch_hierarchy, d_dim);
+
+      hier::IntVector scratch_ghosts =
+         hier::IntVector::max(src_ghosts, dst_ghosts);
+      scratch_ghosts.max(hier::IntVector(d_dim, 1));
+      if (!refine_operator.isNull()) {
+         scratch_ghosts.max(refine_operator->getStencilWidth());
+      }
+      int scratch_id =
+         variable_db->registerVariableAndContext(src_variable,
+            d_refine_scratch,
+            scratch_ghosts);
+      TBOX_ASSERT(scratch_id != -1);
+
+      d_patch_data_components.setFlag(scratch_id);
+
+      d_mblk_refine_alg->registerRefine(dst_id,
+         src_id,
+         scratch_id,
+         refine_operator);
+
+   } else if (d_do_coarsen) {
+      coarsen_operator = xfer_geom->lookupCoarsenOperator(src_variable,
+            operator_name);
+      d_coarsen_algorithm->registerCoarsen(dst_id,
+         src_id,
+         coarsen_operator);
+
+   }
+
+   registerVariableForReset(src_variable, dst_variable,
+      src_ghosts, dst_ghosts, xfer_geom,
+      operator_name);
+
+}
+
+void MultiblockTester::registerVariableForReset(
+   const tbox::Pointer<hier::Variable> src_variable,
+   const tbox::Pointer<hier::Variable> dst_variable,
+   const hier::IntVector& src_ghosts,
+   const hier::IntVector& dst_ghosts,
+   const tbox::Pointer<xfer::Geometry> xfer_geom,
+   const string& operator_name)
+{
+   TBOX_ASSERT(!src_variable.isNull());
+   TBOX_ASSERT(!dst_variable.isNull());
+   TBOX_ASSERT(!xfer_geom.isNull());
+   TBOX_ASSERT(!operator_name.empty());
+
+   hier::VariableDatabase* variable_db =
+      hier::VariableDatabase::getDatabase();
+
+   int src_id = variable_db->registerVariableAndContext(src_variable,
+         d_reset_source,
+         src_ghosts);
+
+   int dst_id = variable_db->registerVariableAndContext(dst_variable,
+         d_reset_destination,
+         dst_ghosts);
+
+   d_patch_data_components.setFlag(src_id);
+   d_patch_data_components.setFlag(dst_id);
+
+   tbox::Pointer<xfer::RefineOperator> refine_operator(NULL);
+   tbox::Pointer<xfer::CoarsenOperator> coarsen_operator(NULL);
+
+   if (d_do_refine) {
+      refine_operator = xfer_geom->lookupRefineOperator(src_variable,
+            operator_name);
+
+      hier::IntVector scratch_ghosts =
+         hier::IntVector::max(src_ghosts, dst_ghosts);
+
+      scratch_ghosts.max(hier::IntVector(d_dim, 1));
+      if (!refine_operator.isNull()) {
+         scratch_ghosts.max(refine_operator->getStencilWidth());
+      }
+      int scratch_id =
+         variable_db->registerVariableAndContext(src_variable,
+            d_reset_refine_scratch,
+            scratch_ghosts);
+
+      d_patch_data_components.setFlag(scratch_id);
+
+      d_reset_refine_algorithm.registerRefine(dst_id,
+         src_id,
+         scratch_id,
+         refine_operator);
+
+   } else if (d_do_coarsen) {
+      coarsen_operator = xfer_geom->lookupCoarsenOperator(src_variable,
+            operator_name);
+      d_reset_coarsen_algorithm.registerCoarsen(dst_id,
+         src_id,
+         coarsen_operator);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create refine and coarsen communication schedules for hierarchy.      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MultiblockTester::createRefineSchedule(
+   const int level_number)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= d_patch_hierarchy->getFinestLevelNumber()));
+#endif
+
+   tbox::Pointer<hier::MultiblockPatchLevel> level =
+      d_patch_hierarchy->getPatchLevel(level_number);
+
+   if (d_do_refine) {
+
+      d_refine_schedule.resizeArray(
+         d_patch_hierarchy->getFinestLevelNumber() + 1);
+      d_refine_schedule[level_number].setNull();
+
+      if ((level_number == 0)
+          || (d_refine_option == "INTERIOR_FROM_SAME_LEVEL")) {
+         d_refine_schedule[level_number] =
+            d_mblk_refine_alg->createSchedule(level,
+               level_number - 1,
+               d_patch_hierarchy,
+               this);
+      } else if (d_refine_option == "INTERIOR_FROM_COARSER_LEVEL") {
+         d_refine_schedule[level_number] =
+            d_mblk_refine_alg->createSchedule(level,
+               tbox::Pointer<SAMRAI::hier::MultiblockPatchLevel>(NULL),
+               level_number - 1,
+               d_patch_hierarchy,
+               this);
+      }
+
+   }
+
+}
+
+void MultiblockTester::resetRefineSchedule(
+   const int level_number)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= d_patch_hierarchy->getFinestLevelNumber()));
+#endif
+
+   if (d_do_refine) {
+
+      d_reset_refine_algorithm.resetSchedule(d_refine_schedule[level_number]);
+
+   }
+
+   d_is_reset = true;
+}
+
+void MultiblockTester::createCoarsenSchedule(
+   const int level_number)
+{
+   NULL_USE(level_number);
+/*
+ * if (d_do_coarsen && (level_number > 0)) {
+ *
+ *    d_coarsen_schedule.resizeArray(
+ *       d_patch_hierarchy->getFinestLevelNumber()+1);
+ *    d_coarsen_schedule[level_number].setNull();
+ *
+ *
+ *
+ *    tbox::Pointer<hier::PatchLevel > level =
+ *       d_patch_hierarchy->getPatchLevel(level_number);
+ *    tbox::Pointer<hier::PatchLevel > coarser_level =
+ *       d_patch_hierarchy->getPatchLevel(level_number-1);
+ *
+ *    tbox::Array< tbox::Pointer< hier::Connector > > fine_to_coarse;
+ *    tbox::Array< tbox::Pointer< hier::Connector > > coarse_to_fine;
+ *
+ *    const hier::Connector *fine_to_coarse =
+ *       &lh.getConnector(level_number, level_number-1);
+ *    const hier::Connector *coarse_to_fine =
+ *       &lh.getConnector(level_number-1, level_number);
+ *    const hier::Connector::TransposePair
+ *       coarse_fine_pair( coarse_to_fine, fine_to_coarse );
+ *
+ *    if ( dlbg_schedule ) {
+ *       d_coarsen_schedule[level_number] =
+ *          d_coarsen_algorithm.createSchedule(coarser_level,
+ *                                             level,
+ *                                             coarse_fine_pair,
+ *                                             this);
+ *    } else {
+ *       TBOX_ERROR("The following must be replaced with the DLBG version.");
+ #if 0
+ *    d_coarsen_schedule[level_number] =
+ *       d_coarsen_algorithm->createSchedule(coarser_level, level, this);
+ #endif
+ *    }
+ *
+ * }
+ */
+}
+
+void MultiblockTester::resetCoarsenSchedule(
+   const int level_number)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= d_patch_hierarchy->getFinestLevelNumber()));
+#endif
+
+   if (d_do_coarsen && (level_number > 0)) {
+
+      d_reset_coarsen_algorithm.resetSchedule(
+         d_coarsen_schedule[level_number]);
+
+   }
+
+   d_is_reset = true;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Perform data refine and coarsen operations.                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MultiblockTester::performRefineOperations(
+   const int level_number)
+{
+   if (d_do_refine) {
+      if (d_is_reset) {
+         d_data_test_strategy->setDataContext(d_reset_refine_scratch);
+      } else {
+         d_data_test_strategy->setDataContext(d_destination);
+      }
+      if (!d_refine_schedule[level_number].isNull()) {
+         d_refine_schedule[level_number]->fillData(d_fake_time);
+      }
+      d_data_test_strategy->clearDataContext();
+   }
+}
+
+void MultiblockTester::performCoarsenOperations(
+   const int level_number)
+{
+   if (d_do_coarsen) {
+      if (d_is_reset) {
+         d_data_test_strategy->setDataContext(d_reset_source);
+      } else {
+         d_data_test_strategy->setDataContext(d_source);
+      }
+      if (!d_coarsen_schedule[level_number].isNull()) {
+         d_coarsen_schedule[level_number]->coarsenData();
+      }
+      d_data_test_strategy->clearDataContext();
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Verify results of communication operations.                           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool MultiblockTester::verifyCommunicationResults() const
+{
+   bool success = true;
+   if (d_is_reset) {
+      d_data_test_strategy->setDataContext(d_reset_destination);
+   } else {
+      d_data_test_strategy->setDataContext(d_destination);
+   }
+   for (int ln = 0;
+        ln <= d_patch_hierarchy->getFinestLevelNumber(); ln++) {
+      tbox::Pointer<hier::MultiblockPatchLevel> level =
+         d_patch_hierarchy->getPatchLevel(ln);
+
+      for (hier::MultiblockPatchLevel::Iterator mi(level); mi; mi++) {
+
+         success = d_data_test_strategy->verifyResults(
+               **mi, d_patch_hierarchy, ln,
+               mi.getBlockNumber());
+      }
+
+   }
+   d_data_test_strategy->clearDataContext();
+
+   return success;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Cell tagging and patch level data initialization routines declared    *
+ * in the GradientDetectorStrategy interface.  They are used to          *
+ * construct the hierarchy initially.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+void MultiblockTester::initializeLevelData(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const double time,
+   const bool can_be_refined,
+   const bool initial_time,
+   const tbox::Pointer<hier::BasePatchLevel> old_level,
+   const bool allocate_data)
+{
+   (void)can_be_refined;
+   (void)initial_time;
+   (void)old_level;
+   (void)allocate_data;
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(hierarchy.isNull()));
+   TBOX_ASSERT(!(hierarchy->getPatchLevel(level_number).isNull()));
+   TBOX_ASSERT(level_number >= 0);
+#endif
+
+   tbox::Pointer<hier::MultiblockPatchHierarchy> mblk_hierarchy =
+      hierarchy;
+
+   tbox::Pointer<hier::MultiblockPatchLevel> level =
+      hierarchy->getPatchLevel(level_number);
+
+   level->allocatePatchData(d_patch_data_components, time);
+
+   for (int nb = 0; nb < level->getNumberOfBlocks(); nb++) {
+      tbox::Pointer<hier::PatchHierarchy> patch_hierarchy =
+         mblk_hierarchy->getHierarchy(nb);
+      tbox::Pointer<hier::PatchLevel> patch_level =
+         level->getPatchLevelForBlock(nb);
+
+      if (!patch_level.isNull()) {
+         for (hier::PatchLevel::Iterator p(patch_level); p; p++) {
+            tbox::Pointer<hier::Patch> patch = *p;
+
+            int level_num = patch_level->getLevelNumber();
+
+            d_data_test_strategy->setDataContext(d_source);
+            d_data_test_strategy->initializeDataOnPatch(*patch,
+               patch_hierarchy,
+               level_num, nb,
+               's');
+            d_data_test_strategy->clearDataContext();
+
+            d_data_test_strategy->setDataContext(d_reset_source);
+            d_data_test_strategy->initializeDataOnPatch(*patch,
+               patch_hierarchy,
+               level_num, nb,
+               's');
+            d_data_test_strategy->clearDataContext();
+
+            if (d_do_coarsen) {
+
+               d_data_test_strategy->setDataContext(d_destination);
+               d_data_test_strategy->initializeDataOnPatch(*patch,
+                  patch_hierarchy,
+                  level_num, nb,
+                  'd');
+               d_data_test_strategy->clearDataContext();
+
+               d_data_test_strategy->setDataContext(d_reset_destination);
+               d_data_test_strategy->initializeDataOnPatch(*patch,
+                  patch_hierarchy,
+                  level_num, nb,
+                  'd');
+               d_data_test_strategy->clearDataContext();
+
+            }
+
+         }
+      }
+   }
+
+}
+
+void MultiblockTester::resetHierarchyConfiguration(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level)
+{
+   (void)hierarchy;
+   (void)coarsest_level;
+   (void)finest_level;
+}
+
+void MultiblockTester::applyGradientDetector(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const double dt_time,
+   const int tag_index,
+   const bool initial_time,
+   const bool uses_richardson_extrapolation_too)
+{
+   (void)dt_time;
+   (void)initial_time;
+   (void)uses_richardson_extrapolation_too;
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(hierarchy.isNull()));
+   TBOX_ASSERT(!(hierarchy->getPatchLevel(level_number).isNull()));
+#endif
+
+   tbox::Pointer<hier::PatchLevel> level =
+      hierarchy->getPatchLevel(level_number);
+
+   d_data_test_strategy->setDataContext(d_source);
+
+   for (hier::PatchLevel::Iterator p(level); p; p++) {
+      tbox::Pointer<hier::Patch> patch = *p;
+
+      d_data_test_strategy->tagCellsToRefine(*patch,
+         hierarchy,
+         level_number,
+         tag_index);
+   }
+
+   d_data_test_strategy->clearDataContext();
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Physical boundary condition and user-defined coarsen and refine       *
+ * operations declared in RefinePatchStrategy and CoarsenPatchStrategy.  *
+ * They are passed off to patch data test object.                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MultiblockTester::setPhysicalBoundaryConditions(
+   hier::Patch& patch,
+   const double time,
+   const hier::IntVector& gcw)
+{
+   (void)time;
+   tbox::Pointer<hier::VariableContext> save_context =
+      d_data_test_strategy->getDataContext();
+
+   if (d_filling_coarse_scratch) {
+      d_data_test_strategy->setDataContext(d_refine_scratch);
+   } else {
+      d_data_test_strategy->setDataContext(d_destination);
+   }
+
+   d_data_test_strategy->setPhysicalBoundaryConditions(patch,
+      d_fake_time,
+      gcw);
+
+   d_data_test_strategy->setDataContext(save_context);
+
+}
+
+void MultiblockTester::fillSingularityBoundaryConditions(
+   hier::Patch& patch,
+   tbox::List<tbox::Pointer<hier::Patch> >&
+   singularity_patches,
+   const double time,
+   const hier::Box& fill_box,
+   const hier::BoundaryBox& boundary_box)
+{
+
+   (void)time;
+   tbox::Pointer<hier::VariableContext> save_context =
+      d_data_test_strategy->getDataContext();
+
+   if (d_filling_coarse_scratch) {
+      d_data_test_strategy->setDataContext(d_refine_scratch);
+   } else {
+      d_data_test_strategy->setDataContext(d_destination);
+   }
+
+   d_data_test_strategy->fillSingularityBoundaryConditions(
+      patch,
+      singularity_patches,
+      fill_box,
+      boundary_box);
+
+   d_data_test_strategy->setDataContext(save_context);
+}
+
+hier::IntVector MultiblockTester::getRefineOpStencilWidth() const
+{
+   return hier::IntVector(d_dim, 0);
+}
+
+void MultiblockTester::preprocessRefine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio)
+{
+   d_data_test_strategy->preprocessRefine(fine, coarse, d_refine_scratch,
+      fine_box, ratio);
+}
+
+void MultiblockTester::postprocessRefine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio)
+{
+   d_data_test_strategy->postprocessRefine(fine, coarse, d_refine_scratch,
+      fine_box, ratio);
+}
+
+hier::IntVector MultiblockTester::getCoarsenOpStencilWidth() const
+{
+   return hier::IntVector(d_dim, 0);
+}
+
+void MultiblockTester::preprocessCoarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio)
+{
+   d_data_test_strategy->preprocessCoarsen(coarse, fine,
+      tbox::Pointer<SAMRAI::hier::VariableContext>(NULL),
+      coarse_box, ratio);
+}
+
+void MultiblockTester::postprocessCoarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio)
+{
+   d_data_test_strategy->postprocessCoarsen(coarse, fine,
+      tbox::Pointer<SAMRAI::hier::VariableContext>(NULL),
+      coarse_box, ratio);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Create and configure gridding objects used to build the hierarchy.    *
+ * Then, create hierarchy and initialize data.  Note this routine        *
+ * must be called after variables are registered with this tester object.*
+ *                                                                       *
+ *************************************************************************
+ */
+
+void MultiblockTester::setupHierarchy(
+   tbox::Pointer<tbox::Database> main_input_db,
+   tbox::Pointer<mesh::StandardTagAndInitialize> cell_tagger)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!main_input_db.isNull());
+#endif
+   tbox::Pointer<tbox::Database> mult_db =
+      main_input_db->getDatabase("MultiblockPatchHierarchy");
+
+   d_patch_hierarchy =
+      new hier::MultiblockPatchHierarchy(
+         "MultiblockPatchHierarchy",
+         mult_db,
+         d_data_test_strategy->getGridGeometry(),
+         true);
+
+   tbox::Pointer<mesh::BergerRigoutsos> box_generator(
+      new mesh::BergerRigoutsos(d_dim));
+
+   tbox::Pointer<mesh::TreeLoadBalancer> load_balancer(
+      new mesh::TreeLoadBalancer(d_dim,
+         "TreeLoadBalancer",
+         main_input_db->getDatabase("TreeLoadBalancer")));
+   load_balancer->setSAMRAI_MPI(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   tbox::Pointer<mesh::MultiblockGriddingAlgorithm> gridding_alg(
+      new mesh::MultiblockGriddingAlgorithm(
+         d_patch_hierarchy,
+         "MultiblockGriddingAlgorithm",
+         main_input_db->getDatabase("GriddingAlgorithm"),
+         cell_tagger,
+         box_generator,
+         load_balancer,
+         load_balancer,
+         (mesh::MultiblockGriddingTagger *)NULL,
+         true));
+
+   int fake_tag_buffer = 0;
+
+   gridding_alg->makeCoarsestLevel(d_fake_time);
+
+   bool initial_time = true;
+   for (int ln = 0; d_patch_hierarchy->levelCanBeRefined(ln); ln++) {
+      gridding_alg->makeFinerLevel(d_fake_time,
+         initial_time, fake_tag_buffer,
+         d_fake_time);
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/MultiblockTester.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/MultiblockTester.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,372 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Manager class for patch data communication tests. 
+ *
+ ************************************************************************/
+
+#ifndef included_MultiblockTester
+#define included_MultiblockTester
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/hier/BasePatchHierarchy.h"
+#include "SAMRAI/hier/BasePatchLevel.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/ComponentSelector.h"
+#include "SAMRAI/xfer/CoarsenAlgorithm.h"
+#include "SAMRAI/xfer/CoarsenPatchStrategy.h"
+#include "SAMRAI/xfer/CoarsenSchedule.h"
+#include "SAMRAI/xfer/Geometry.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/xfer/MultiblockCoarsenAlgorithm.h"
+#include "SAMRAI/hier/MultiblockPatchHierarchy.h"
+#include "SAMRAI/xfer/MultiblockRefinePatchStrategy.h"
+#include "SAMRAI/xfer/MultiblockRefineAlgorithm.h"
+#include "SAMRAI/xfer/MultiblockRefineSchedule.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/xfer/RefineAlgorithm.h"
+#include "SAMRAI/xfer/RefinePatchStrategy.h"
+#include "SAMRAI/xfer/RefineSchedule.h"
+#include "SAMRAI/mesh/StandardTagAndInitialize.h"
+#include "SAMRAI/mesh/StandardTagAndInitStrategy.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/hier/VariableContext.h"
+
+using namespace std;
+using namespace SAMRAI;
+
+class PatchMultiblockTestStrategy;
+
+/**
+ * Class MultiblockTester serves as a tool to test data communication operations
+ * in SAMRAI, such as coarsening, refining, and filling ghost cells.
+ *
+ * The functions in this class called from main() are:
+ * \begin{enumerate}
+ *    - [MultiblockTester(...)] constructor which initializes object state and
+ *                            creates patch hierarchy and sets initial data.
+ *    - [createRefineSchedule(...)] creates communication schedule for
+ *                                      refining data to given level.
+ *    - [createCoarsenSchedule(...)] creates communication schedule for
+ *                                       coarsening data to given level.
+ *    - [performRefineOperations(...)] refines data to given level.
+ *    - [performCoarsenOperations(...)] coarsens data to given level.
+ * \end{enumerate}
+ */
+
+class MultiblockTester:
+   public mesh::StandardTagAndInitStrategy,
+   public xfer::CoarsenPatchStrategy,
+   public xfer::MultiblockRefinePatchStrategy
+{
+public:
+   /**
+    * Constructor performs basic setup operations.
+    */
+   MultiblockTester(
+      const string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> main_input_db,
+      PatchMultiblockTestStrategy* strategy,
+      bool do_refine = true,
+      bool do_coarsen = false,
+      const string& refine_option = "INTERIOR_FROM_SAME_LEVEL");
+
+   /**
+    * Destructor is empty.
+    */
+   ~MultiblockTester();
+
+   /**
+    * Return pointer to patch hierarchy on which communication is tested.
+    */
+   tbox::Pointer<hier::MultiblockPatchHierarchy> getPatchHierarchy()
+   const
+   {
+      return d_patch_hierarchy;
+   }
+
+   /**
+    * Register variable for communication testing.
+    *
+    * The transfer operator look-up will use the src_variable.
+    */
+   void
+   registerVariable(
+      const tbox::Pointer<hier::Variable> src_variable,
+      const tbox::Pointer<hier::Variable> dst_variable,
+      const hier::IntVector& src_ghosts,
+      const hier::IntVector& dst_ghosts,
+      const tbox::Pointer<xfer::Geometry> xfer_geom,
+      const string& operator_name);
+
+   /**
+    * Register variable for communication testing.
+    *
+    * The transfer operator look-up will use the src_variable.
+    */
+   void
+   registerVariableForReset(
+      const tbox::Pointer<hier::Variable> src_variable,
+      const tbox::Pointer<hier::Variable> dst_variable,
+      const hier::IntVector& src_ghosts,
+      const hier::IntVector& dst_ghosts,
+      const tbox::Pointer<xfer::Geometry> xfer_geom,
+      const string& operator_name);
+
+   /**
+    * Create communication schedules for refining data to given level.
+    */
+   void
+   createRefineSchedule(
+      const int level_number);
+   void
+   resetRefineSchedule(
+      const int level_number);
+
+   /**
+    * Create communication schedule for coarsening data to given level.
+    */
+   void
+   createCoarsenSchedule(
+      const int level_number);
+   void
+   resetCoarsenSchedule(
+      const int level_number);
+
+   /**
+    * Refine data to specified level (or perform interpatch communication
+    * on that level).
+    */
+   void
+   performRefineOperations(
+      const int level_number);
+
+   /**
+    * Coarsen data to specified level.
+    */
+   void
+   performCoarsenOperations(
+      const int level_number);
+
+   /**
+    * After communication operations are performed, check results.
+    */
+   bool
+   verifyCommunicationResults() const;
+
+   /**
+    * Operations needed by GriddingAlgorithm to construct and
+    * initialize levels in patch hierarchy.  These operations are
+    * pure virtual in GradientDetectorStrategy.
+    */
+/*
+ * void
+ * initializeLevelData(
+ *    const tbox::Pointer< hier::BasePatchHierarchy > hierarchy,
+ *    const int level_number,
+ *    const double init_data_time,
+ *    const bool can_be_refined,
+ *    const bool initial_time,
+ *    const tbox::Pointer< hier::BasePatchLevel > old_level =
+ *          tbox::Pointer< hier::BasePatchLevel >(NULL),
+ #ifdef USING_SAMRAI_DLBG
+ *    const tbox::Array< tbox::Pointer<hier::Connector > > &to_old_mapped_box_level =
+ *          tbox::Array< tbox::Pointer<hier::Connector > >(NULL),
+ *    const tbox::Array< tbox::Pointer<hier::Connector > > &from_old_mapped_box_level =
+ *          tbox::Array< tbox::Pointer<hier::Connector > >(NULL),
+ #endif
+ *    const bool allocate_data = true);
+ */
+   void
+   initializeLevelData(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double init_data_time,
+      const bool can_be_refined,
+      const bool initial_time,
+      const tbox::Pointer<hier::BasePatchLevel> old_level =
+         tbox::Pointer<hier::BasePatchLevel>(NULL),
+      const bool allocate_data = true);
+
+   void
+   resetHierarchyConfiguration(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level);
+
+   void
+   applyGradientDetector(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double time,
+      const int tag_index,
+      const bool initial_time,
+      const bool uses_richardson_extrapolation_too);
+
+   /**
+    * These routines pass off physicial boundary and pre/postprocess
+    * coarsen/refine operations to patch data test object.  They are
+    * pure virtual in RefinePatchStrategy and CoarsenPatchStrategy.
+    */
+   void
+   setPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const double time,
+      const hier::IntVector& gcw);
+
+   /*!
+    * Set the ghost data at a multiblock singularity.
+    */
+   void
+   fillSingularityBoundaryConditions(
+      hier::Patch& patch,
+      tbox::List<tbox::Pointer<hier::Patch> >&
+      singularity_patches,
+      const double fill_time,
+      const hier::Box& fill_box,
+      const hier::BoundaryBox& boundary_box);
+
+   hier::IntVector
+   getRefineOpStencilWidth() const;
+
+   void
+   preprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio);
+
+   void
+   postprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio);
+
+   hier::IntVector
+   getCoarsenOpStencilWidth() const;
+
+   void
+   preprocessCoarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio);
+
+   void
+   postprocessCoarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio);
+
+   double getLevelDt(
+      const tbox::Pointer<hier::BasePatchLevel> level,
+      const double dt_time,
+      const bool initial_time)
+   {
+      (void)level;
+      (void)dt_time;
+      (void)initial_time;
+      return 0.0;
+   }
+
+   /*
+    * Construct patch hierarchy and initialize data prior to tests.
+    */
+   void
+   setupHierarchy(
+      tbox::Pointer<tbox::Database> main_input_db,
+      tbox::Pointer<mesh::StandardTagAndInitialize> cell_tagger);
+
+private:
+   /*
+    * Object name for error reporting.
+    */
+   string d_object_name;
+
+   const tbox::Dimension d_dim;
+
+   /*
+    * Object supplying operatins for particular patch data test.
+    */
+   PatchMultiblockTestStrategy* d_data_test_strategy;
+
+   /*
+    * Booleans to indicate whether refine or coarsen is operation to test.
+    */
+   bool d_do_refine;
+   bool d_do_coarsen;
+
+   /*
+    * String name for refine option; ; i.e., source of interior patch
+    * data on refined patches.  Options are "INTERIOR_FROM_SAME_LEVEL"
+    * and "INTERIOR_FROM_COARSER_LEVEL".
+    */
+   string d_refine_option;
+
+   /*
+    * Patch hierarchy on which tests occur.
+    */
+   tbox::Pointer<hier::MultiblockPatchHierarchy> d_patch_hierarchy;
+
+   /*
+    * Dummy time stamp for all data operations.
+    */
+   double d_fake_time;
+
+   /*
+    * The MultiblockTester uses two variable contexts for each variable.
+    * The "source", and "destination" contexts indicate the source
+    * and destination patch data for the transfer operation.
+    *
+    * The "refine_scratch" context is used for managing scratch
+    * space during refine operations.
+    */
+   tbox::Pointer<hier::VariableContext> d_source;
+   tbox::Pointer<hier::VariableContext> d_destination;
+   tbox::Pointer<hier::VariableContext> d_refine_scratch;
+
+   tbox::Pointer<hier::VariableContext> d_reset_source;
+   tbox::Pointer<hier::VariableContext> d_reset_destination;
+   tbox::Pointer<hier::VariableContext> d_reset_refine_scratch;
+
+   /*
+    * Component selector for allocation/deallocation of variable data.
+    */
+   hier::ComponentSelector d_patch_data_components;
+
+   /*
+    * Refine/Coarsen algorithm and schedules for testing communication
+    * among levels in the patch hierarchy.
+    */
+
+   tbox::Pointer<xfer::RefineAlgorithm> d_refine_algorithm;
+   tbox::Pointer<xfer::MultiblockCoarsenAlgorithm> d_coarsen_algorithm;
+
+   xfer::RefineAlgorithm d_reset_refine_algorithm;
+   xfer::CoarsenAlgorithm d_reset_coarsen_algorithm;
+
+   tbox::Pointer<xfer::MultiblockRefineAlgorithm> d_mblk_refine_alg;
+
+   bool d_is_reset;
+
+   tbox::Array<tbox::Pointer<xfer::MultiblockRefineSchedule> >
+   d_refine_schedule;
+   tbox::Array<tbox::Pointer<xfer::CoarsenSchedule> >
+   d_coarsen_schedule;
+
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/NodeMultiblockTest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/NodeMultiblockTest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,650 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR communication tests for node-centered patch data 
+ *
+ ************************************************************************/
+
+#include "NodeMultiblockTest.h"
+
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/BlockPatchGeometry.h"
+#include "SAMRAI/pdat/NodeIndex.h"
+#include "SAMRAI/pdat/NodeIterator.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "MultiblockTester.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/tbox/Database.h"
+
+using namespace SAMRAI;
+
+NodeMultiblockTest::NodeMultiblockTest(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> main_input_db,
+   bool do_refine,
+   bool do_coarsen,
+   const string& refine_option):
+   PatchMultiblockTestStrategy(dim),
+   d_dim(dim)
+{
+   NULL_USE(do_refine);
+   NULL_USE(do_coarsen);
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!main_input_db.isNull());
+   TBOX_ASSERT(!refine_option.empty());
+#endif
+
+   d_object_name = object_name;
+
+   d_refine_option = refine_option;
+
+   d_finest_level_number = main_input_db->
+      getDatabase("MultiblockPatchHierarchy")->
+      getDatabase("PatchHierarchy")->
+      getInteger("max_levels") - 1;
+
+   int num_blocks = main_input_db->getDatabase("MultiblockPatchHierarchy")->
+      getInteger("num_blocks");
+
+   d_skel_grid_geometry.resizeArray(num_blocks);
+
+   char geom_name[32];
+
+   for (int g = 0; g < num_blocks; g++) {
+
+      sprintf(geom_name, "BlockGridGeometry%d", g);
+
+      if (main_input_db->keyExists(geom_name)) {
+         d_skel_grid_geometry[g] = new geom::BlockGridGeometry(
+               dim,
+               geom_name,
+               main_input_db->getDatabase(geom_name),
+               g);
+
+      } else {
+         break;
+      }
+   }
+
+   tbox::Pointer<hier::MultiblockGridGeometry> mblk_geometry(
+      new hier::MultiblockGridGeometry(d_skel_grid_geometry));
+
+   setGridGeometry(mblk_geometry);
+
+   readTestInput(main_input_db->getDatabase("NodeMultiblockTest"));
+}
+
+NodeMultiblockTest::~NodeMultiblockTest()
+{
+}
+
+void NodeMultiblockTest::readTestInput(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   /*
+    * Base class reads variable parameters and boxes to refine.
+    */
+
+   readVariableInput(db->getDatabase("VariableData"));
+   readRefinementInput(db->getDatabase("RefinementData"));
+}
+
+void NodeMultiblockTest::registerVariables(
+   MultiblockTester* commtest)
+{
+   TBOX_ASSERT(commtest != (MultiblockTester *)NULL);
+
+   int nvars = d_variable_src_name.getSize();
+
+   d_variables.resizeArray(nvars);
+
+   for (int i = 0; i < nvars; i++) {
+      d_variables[i] =
+         new pdat::NodeVariable<double>(d_dim,
+                                        d_variable_src_name[i],
+                                        d_variable_depth[i]);
+
+      commtest->registerVariable(d_variables[i],
+         d_variables[i],
+         d_variable_src_ghosts[i],
+         d_variable_dst_ghosts[i],
+         d_skel_grid_geometry[0],
+         d_variable_refine_op[i]);
+
+   }
+
+}
+
+void NodeMultiblockTest::initializeDataOnPatch(
+   hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number,
+   int block_number,
+   char src_or_dst)
+{
+   NULL_USE(hierarchy);
+   NULL_USE(src_or_dst);
+
+   if ((d_refine_option == "INTERIOR_FROM_SAME_LEVEL")
+       || ((d_refine_option == "INTERIOR_FROM_COARSER_LEVEL")
+           && (level_number < d_finest_level_number))) {
+
+      for (int i = 0; i < d_variables.getSize(); i++) {
+
+         tbox::Pointer<pdat::NodeData<double> > node_data =
+            patch.getPatchData(d_variables[i], getDataContext());
+
+         hier::Box dbox = node_data->getGhostBox();
+
+         node_data->fillAll((double)block_number);
+
+      }
+   }
+}
+
+void NodeMultiblockTest::tagCellsToRefine(
+   hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number,
+   int tag_index)
+{
+   (void)hierarchy;
+
+   /*
+    * Base class sets tags in box array for each level.
+    */
+   tagCellsInInputBoxes(patch, level_number, tag_index);
+
+}
+
+void NodeMultiblockTest::setPhysicalBoundaryConditions(
+   hier::Patch& patch,
+   const double time,
+   const hier::IntVector& gcw_to_fill) const
+{
+   (void)time;
+
+   tbox::Pointer<hier::BlockPatchGeometry>
+   pgeom = patch.getPatchGeometry();
+
+   const tbox::Array<hier::BoundaryBox> node_bdry =
+      pgeom->getCodimensionBoundaries(d_dim.getValue());
+   const int num_node_bdry_boxes = node_bdry.getSize();
+
+   tbox::Array<hier::BoundaryBox> edge_bdry;
+   int num_edge_bdry_boxes = 0;
+   if (d_dim > tbox::Dimension(1)) {
+      edge_bdry = pgeom->getCodimensionBoundaries(d_dim.getValue() - 1);
+      num_edge_bdry_boxes = edge_bdry.getSize();
+   }
+
+   tbox::Array<hier::BoundaryBox> face_bdry;
+   int num_face_bdry_boxes = 0;
+   if (d_dim == tbox::Dimension(3)) {
+      face_bdry = pgeom->getCodimensionBoundaries(d_dim.getValue() - 2);
+      num_face_bdry_boxes = face_bdry.getSize();
+   }
+
+   for (int i = 0; i < d_variables.getSize(); i++) {
+
+      tbox::Pointer<pdat::NodeData<double> > node_data =
+         patch.getPatchData(d_variables[i], getDataContext());
+
+      /*
+       * Set node boundary data.
+       */
+      for (int nb = 0; nb < num_node_bdry_boxes; nb++) {
+
+         hier::Box fill_box = pgeom->getBoundaryFillBox(node_bdry[nb],
+               patch.getBox(),
+               gcw_to_fill);
+
+         hier::Box patch_node_box =
+            pdat::NodeGeometry::toNodeBox(patch.getBox());
+         if (!node_bdry[nb].getIsMultiblockSingularity()) {
+            for (pdat::NodeIterator ni(fill_box); ni; ni++) {
+               if (!patch_node_box.contains(ni())) {
+                  for (int d = 0; d < node_data->getDepth(); d++) {
+                     (*node_data)(ni(), d) =
+                        (double)(node_bdry[nb].getLocationIndex() + 100);
+                  }
+               }
+            }
+         }
+      }
+
+      if (d_dim > tbox::Dimension(1)) {
+         /*
+          * Set edge boundary data.
+          */
+         for (int eb = 0; eb < num_edge_bdry_boxes; eb++) {
+
+            hier::Box fill_box = pgeom->getBoundaryFillBox(edge_bdry[eb],
+                  patch.getBox(),
+                  gcw_to_fill);
+
+            hier::Box patch_node_box =
+               pdat::NodeGeometry::toNodeBox(patch.getBox());
+            hier::Index plower(patch_node_box.lower());
+            hier::Index pupper(patch_node_box.upper());
+
+            if (!edge_bdry[eb].getIsMultiblockSingularity()) {
+               for (pdat::NodeIterator ni(fill_box); ni; ni++) {
+                  if (!patch_node_box.contains(ni())) {
+                     bool use_index = true;
+                     for (int n = 0; n < d_dim.getValue(); n++) {
+                        if (edge_bdry[eb].getBox().numberCells(n) == 1) {
+                           if (ni() (n) == plower(n) || ni() (n) ==
+                               pupper(n)) {
+                              use_index = false;
+                              break;
+                           }
+                        }
+                     }
+
+                     if (use_index) {
+                        for (int d = 0; d < node_data->getDepth(); d++) {
+                           (*node_data)(ni(), d) =
+                              (double)(edge_bdry[eb].getLocationIndex() + 100);
+                        }
+                     }
+                  }
+               }
+            }
+         }
+      }
+
+      if (d_dim == tbox::Dimension(3)) {
+         /*
+          * Set face boundary data.
+          */
+         for (int fb = 0; fb < num_face_bdry_boxes; fb++) {
+
+            hier::Box fill_box = pgeom->getBoundaryFillBox(face_bdry[fb],
+                  patch.getBox(),
+                  gcw_to_fill);
+
+            hier::Box patch_node_box =
+               pdat::NodeGeometry::toNodeBox(patch.getBox());
+            hier::Index plower(patch_node_box.lower());
+            hier::Index pupper(patch_node_box.upper());
+
+            if (!face_bdry[fb].getIsMultiblockSingularity()) {
+               for (pdat::NodeIterator ni(fill_box); ni; ni++) {
+                  if (!patch_node_box.contains(ni())) {
+                     bool use_index = true;
+                     for (int n = 0; n < d_dim.getValue(); n++) {
+                        if (face_bdry[fb].getBox().numberCells(n) == 1) {
+                           if (ni() (n) == plower(n) || ni() (n) ==
+                               pupper(n)) {
+                              use_index = false;
+                              break;
+                           }
+                        }
+                     }
+
+                     if (use_index) {
+                        for (int d = 0; d < node_data->getDepth(); d++) {
+                           (*node_data)(ni(), d) =
+                              (double)(face_bdry[fb].getLocationIndex() + 100);
+                        }
+                     }
+                  }
+               }
+            }
+         }
+      }
+
+   }
+
+}
+
+void NodeMultiblockTest::fillSingularityBoundaryConditions(
+   hier::Patch& patch,
+   tbox::List<tbox::Pointer<hier::Patch> >& sing_patches,
+   const hier::Box& fill_box,
+   const hier::BoundaryBox& bbox)
+{
+   for (int i = 0; i < d_variables.getSize(); i++) {
+
+      tbox::Pointer<pdat::NodeData<double> > node_data =
+         patch.getPatchData(d_variables[i], getDataContext());
+
+      hier::Box pbox(pdat::NodeGeometry::toNodeBox(patch.getBox()));
+
+      hier::Index plower(pbox.lower());
+      hier::Index pupper(pbox.upper());
+
+      hier::Box sing_fill_box(node_data->getGhostBox() * fill_box);
+
+      int depth = node_data->getDepth();
+
+      for (pdat::NodeIterator ni(sing_fill_box); ni; ni++) {
+         bool use_index = true;
+         for (int n = 0; n < d_dim.getValue(); n++) {
+            if (bbox.getBox().numberCells(n) == 1) {
+               if (ni() (n) == plower(n) || ni() (n) == pupper(n)) {
+                  use_index = false;
+                  break;
+               }
+            }
+         }
+         if (use_index) {
+            for (int d = 0; d < depth; d++) {
+               (*node_data)(ni(), d) = 0.0;
+            }
+         }
+      }
+
+      /*
+       * If sing_patches is not empty, that means there is enhanced
+       * connectivity, and we get data from other blocks
+       */
+
+      if (sing_patches.size()) {
+
+         for (tbox::List<tbox::Pointer<hier::Patch> >::Iterator
+              sp(sing_patches); sp; sp++) {
+            tbox::Pointer<pdat::NodeData<double> > sing_data =
+               sp()->getPatchData(d_variables[i], getDataContext());
+            tbox::Pointer<hier::BlockPatchGeometry> patch_geom =
+               sp()->getPatchGeometry();
+            int sing_neighbor_id = patch_geom->getBlockNumber();
+            for (pdat::NodeIterator ci(sing_fill_box); ci; ci++) {
+               bool use_index = true;
+               for (int n = 0; n < d_dim.getValue(); n++) {
+                  if (bbox.getBox().numberCells(n) == 1) {
+                     if (ci() (n) == plower(n) || ci() (n) == pupper(n)) {
+                        use_index = false;
+                        break;
+                     }
+                  }
+               }
+               if (use_index) {
+                  for (int d = 0; d < depth; d++) {
+                     (*node_data)(ci(), d) += sing_neighbor_id;
+                  }
+               }
+            }
+         }
+
+         for (pdat::NodeIterator ci(sing_fill_box); ci; ci++) {
+            bool use_index = true;
+            for (int n = 0; n < d_dim.getValue(); n++) {
+               if (bbox.getBox().numberCells(n) == 1) {
+                  if (ci() (n) == plower(n) || ci() (n) == pupper(n)) {
+                     use_index = false;
+                     break;
+                  }
+               }
+            }
+            if (use_index) {
+               for (int d = 0; d < depth; d++) {
+                  (*node_data)(ci(), d) /= sing_patches.size();
+               }
+            }
+         }
+
+         /*
+          * In cases of reduced connectivity, there are no other blocks
+          * from which to acquire data.
+          */
+
+      } else {
+
+         for (pdat::NodeIterator ci(sing_fill_box); ci; ci++) {
+            bool use_index = true;
+            for (int n = 0; n < d_dim.getValue(); n++) {
+               if (bbox.getBox().numberCells(n) == 1) {
+                  if (ci() (n) == plower(n) || ci() (n) == pupper(n)) {
+                     use_index = false;
+                     break;
+                  }
+               }
+            }
+            if (use_index) {
+               for (int d = 0; d < depth; d++) {
+                  (*node_data)(ci(),
+                               d) = (double)bbox.getLocationIndex() + 200.0;
+               }
+            }
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Verify results of communication operations.  This test must be        *
+ * consistent with data initialization and boundary operations above.    *
+ *                                                                       *
+ *************************************************************************
+ */
+bool NodeMultiblockTest::verifyResults(
+   const hier::Patch& patch,
+   const tbox::Pointer<hier::MultiblockPatchHierarchy> hierarchy,
+   int level_number,
+   int block_number)
+{
+
+   tbox::plog << "\nEntering NodeMultiblockTest::verifyResults..." << endl;
+   tbox::plog << "level_number = " << level_number << endl;
+   tbox::plog << "Patch box = " << patch.getBox() << endl;
+
+   hier::IntVector tgcw(d_dim, 0);
+   for (int i = 0; i < d_variables.getSize(); i++) {
+      tgcw.max(patch.getPatchData(d_variables[i], getDataContext())->
+         getGhostCellWidth());
+   }
+   hier::Box pbox = patch.getBox();
+
+   tbox::Pointer<pdat::NodeData<double> > solution(
+      new pdat::NodeData<double>(pbox, 1, tgcw));
+
+   hier::Box tbox(pbox);
+   tbox.grow(tgcw);
+
+   tbox::List<hier::MultiblockPatchHierarchy::Neighbor>& neighbors =
+      hierarchy->getNeighbors(block_number);
+   hier::BoxList singularity(
+      hierarchy->getSingularityBoxList(block_number));
+
+   hier::IntVector ratio =
+      hierarchy->getPatchLevel(level_number)->getRatioToLevelZero();
+
+   singularity.refine(ratio);
+
+   bool test_failed = false;
+
+   for (int i = 0; i < d_variables.getSize(); i++) {
+
+      double correct = (double)block_number;
+
+      tbox::Pointer<pdat::NodeData<double> > node_data =
+         patch.getPatchData(d_variables[i], getDataContext());
+      int depth = node_data->getDepth();
+
+      hier::Box interior_box(pbox);
+      interior_box.grow(hier::IntVector(d_dim, -1));
+
+      for (pdat::NodeIterator ci(interior_box); ci; ci++) {
+         for (int d = 0; d < depth; d++) {
+            double result = (*node_data)(ci(), d);
+
+            if (!tbox::MathUtilities<double>::equalEps(correct, result)) {
+               tbox::perr << "Test FAILED: ...."
+                          << " : node index = " << ci() << endl;
+               tbox::perr << "    Variable = " << d_variable_src_name[i]
+               << " : depth index = " << d << endl;
+               tbox::perr << "    result = " << result
+                          << " : correct = " << correct << endl;
+               test_failed = true;
+            }
+         }
+      }
+
+      tbox::Pointer<hier::BlockPatchGeometry> pgeom =
+         patch.getPatchGeometry();
+
+      hier::Box gbox = node_data->getGhostBox();
+
+      hier::Box patch_node_box =
+         pdat::NodeGeometry::toNodeBox(pbox);
+
+      hier::BoxList sing_node_boxlist;
+      for (hier::BoxList::Iterator si(singularity); si; si++) {
+         sing_node_boxlist.addItem(pdat::NodeGeometry::toNodeBox(si()));
+      }
+
+      for (tbox::List<hier::MultiblockPatchHierarchy::Neighbor>::
+           Iterator ne(neighbors); ne; ne++) {
+
+         correct = ne().getBlockNumber();
+
+         hier::BoxList neighbor_ghost(ne().getTranslatedDomain());
+
+         hier::BoxList neighbor_node_ghost;
+         for (hier::BoxList::Iterator nn(neighbor_ghost); nn; nn++) {
+            neighbor_node_ghost.addItem(
+               pdat::NodeGeometry::toNodeBox(nn()));
+         }
+
+         neighbor_node_ghost.refine(ratio);
+
+         neighbor_node_ghost.intersectBoxes(
+            pdat::NodeGeometry::toNodeBox(gbox));
+
+         neighbor_node_ghost.removeIntersections(sing_node_boxlist);
+
+         for (hier::BoxList::Iterator ng(neighbor_node_ghost); ng; ng++) {
+
+            for (hier::BoxIterator ci(ng()); ci; ci++) {
+               if (!patch_node_box.contains(ci())) {
+                  pdat::NodeIndex ni(ci(), hier::IntVector(d_dim, 0));
+                  for (int d = 0; d < depth; d++) {
+                     double result = (*node_data)(ni, d);
+
+                     if (!tbox::MathUtilities<double>::equalEps(correct,
+                            result)) {
+                        tbox::perr << "Test FAILED: ...."
+                                   << " : node index = " << ni << endl;
+                        tbox::perr << "  Variable = " << d_variable_src_name[i]
+                        << " : depth index = " << d << endl;
+                        tbox::perr << "    result = " << result
+                                   << " : correct = " << correct << endl;
+                        test_failed = true;
+                     }
+                  }
+               }
+            }
+         }
+      }
+
+      for (int b = 0; b < d_dim.getValue(); b++) {
+         tbox::Array<hier::BoundaryBox> bdry =
+            pgeom->getCodimensionBoundaries(b + 1);
+
+         for (int k = 0; k < bdry.size(); k++) {
+            hier::Box fill_box = pgeom->getBoundaryFillBox(bdry[k],
+                  patch.getBox(),
+                  tgcw);
+            fill_box = fill_box * gbox;
+
+            if (bdry[k].getIsMultiblockSingularity()) {
+               correct = 0.0;
+
+               int num_sing_neighbors = 0;
+               for (tbox::List
+                    <hier::MultiblockPatchHierarchy::Neighbor>::
+                    Iterator ns(neighbors); ns; ns++) {
+                  if (ns().isSingularity()) {
+                     hier::BoxList neighbor_ghost(
+                        ns().getTranslatedDomain());
+                     neighbor_ghost.refine(ratio);
+                     neighbor_ghost.intersectBoxes(fill_box);
+                     if (neighbor_ghost.size()) {
+                        num_sing_neighbors++;
+                        correct += (double)ns().getBlockNumber();
+                     }
+                  }
+               }
+
+               if (num_sing_neighbors == 0) {
+
+                  correct = (double)bdry[k].getLocationIndex() + 200.0;
+
+               } else {
+
+                  correct /= (double)num_sing_neighbors;
+
+               }
+
+            } else {
+               correct = (double)(bdry[k].getLocationIndex() + 100);
+            }
+
+            for (pdat::NodeIterator ci(fill_box); ci; ci++) {
+
+               if (!patch_node_box.contains(ci())) {
+
+                  bool use_index = true;
+                  for (int n = 0; n < d_dim.getValue(); n++) {
+                     if (bdry[k].getBox().numberCells(n) == 1) {
+                        if (ci() (n) == patch_node_box.lower() (n) ||
+                            ci() (n) == patch_node_box.upper() (n)) {
+                           use_index = false;
+                           break;
+                        }
+                     }
+                  }
+
+                  if (use_index) {
+                     for (int d = 0; d < depth; d++) {
+                        double result = (*node_data)(ci(), d);
+
+                        if (!tbox::MathUtilities<double>::equalEps(correct,
+                               result)) {
+                           tbox::perr << "Test FAILED: ...."
+                                      << " : node index = " << ci() << endl;
+                           tbox::perr << "  Variable = "
+                           << d_variable_src_name[i]
+                           << " : depth index = " << d << endl;
+                           tbox::perr << "    result = " << result
+                                      << " : correct = " << correct << endl;
+                           test_failed = true;
+                        }
+                     }
+                  }
+               }
+            }
+         }
+      }
+   }
+
+   if (!test_failed) {
+      tbox::plog << "NodeMultiblockTest Successful!" << endl;
+   } else {
+      tbox::perr << "Multiblock NodeMultiblockTest FAILED: .\n" << endl;
+   }
+
+   solution.setNull();   // just to be anal...
+
+   tbox::plog << "\nExiting NodeMultiblockTest::verifyResults..." << endl;
+   tbox::plog << "level_number = " << level_number << endl;
+   tbox::plog << "Patch box = " << patch.getBox() << endl << endl;
+
+   return !test_failed;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/NodeMultiblockTest.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/NodeMultiblockTest.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,146 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR communication tests for node-centered patch data 
+ *
+ ************************************************************************/
+
+#ifndef included_NodeMultiblockTest
+#define included_NodeMultiblockTest
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "PatchMultiblockTestStrategy.h"
+#include "SAMRAI/geom/BlockGridGeometry.h"
+#include "SAMRAI/hier/Variable.h"
+
+using namespace SAMRAI;
+
+/**
+ * Class NodeMultiblockTest provides routines to test communication operations
+ * for node-centered patch data on an AMR patch hierarchy.
+ *
+ * See PatchMultiblockTestStrategy header file comments for variable and
+ * refinement input data description.
+ */
+
+class NodeMultiblockTest:public PatchMultiblockTestStrategy
+{
+public:
+   /**
+    * The constructor initializes variable data arrays to zero length.
+    */
+   NodeMultiblockTest(
+      const string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> main_input_db,
+      bool do_refine,
+      bool do_coarsen,
+      const string& refine_option);
+
+   /**
+    * Virtual destructor for NodeMultiblockTest.
+    */
+   virtual ~NodeMultiblockTest();
+
+   /**
+    * User-supplied boundary conditions.  Note that we do not implement
+    * user-defined coarsen and refine operations.
+    */
+   void
+   setPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const double time,
+      const hier::IntVector& gcw_to_fill) const;
+
+   void
+   fillSingularityBoundaryConditions(
+      hier::Patch& patch,
+      tbox::List<tbox::Pointer<hier::Patch> >& sing_patches,
+      const hier::Box& fill_box,
+      const hier::BoundaryBox& boundary_box);
+
+   /**
+    * This function is called from the MultiblockTester constructor.  Its
+    * purpose is to register variables used in the patch data test
+    * and appropriate communication parameters (ghost cell widths,
+    * coarsen/refine operations) with the MultiblockTester object, which
+    * manages the variable storage.
+    */
+   void
+   registerVariables(
+      MultiblockTester* commtest);
+
+   /**
+    * Function for setting data on new patch in hierarchy.
+    *
+    * @param src_or_dst Flag set to 's' for source or 'd' for destination
+    *        to indicate variables to set data for.
+    */
+   virtual void
+   initializeDataOnPatch(
+      hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number,
+      int block_number,
+      char src_or_dst);
+
+   /**
+    * Function for tagging cells on each patch to refine.
+    */
+   void
+   tagCellsToRefine(
+      hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number,
+      int tag_index);
+
+   /**
+    * Function for checking results of communication operations.
+    */
+   bool
+   verifyResults(
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::MultiblockPatchHierarchy> hierarchy,
+      int level_number,
+      int block_number);
+
+private:
+   /**
+    * Function for reading test data from input file.
+    */
+   void
+   readTestInput(
+      tbox::Pointer<tbox::Database> db);
+
+   /*
+    * Object string identifier for error reporting
+    */
+   string d_object_name;
+
+   const tbox::Dimension d_dim;
+
+   /*
+    * Data members specific to this node data test.
+    */
+   tbox::Array<tbox::Pointer<hier::GridGeometry> >
+   d_skel_grid_geometry;
+
+   string d_refine_option;
+   int d_finest_level_number;
+
+   tbox::Array<tbox::Pointer<hier::Variable> > d_variables;
+
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/PatchMultiblockTestStrategy.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/PatchMultiblockTestStrategy.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,254 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Base class for patch data test operations. 
+ *
+ ************************************************************************/
+
+#include "PatchMultiblockTestStrategy.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+using namespace SAMRAI;
+
+// These are used in the cell tagging routine.
+#ifndef TRUE
+#define TRUE (1)
+#endif
+#ifndef FALSE
+#define FALSE (0)
+#endif
+
+/*
+ *************************************************************************
+ *									*
+ * The constructor and destructor.                                       *
+ *									*
+ *************************************************************************
+ */
+
+PatchMultiblockTestStrategy::PatchMultiblockTestStrategy(
+   const tbox::Dimension& dim):
+   d_dim(dim)
+{
+   d_variable_src_name.resizeArray(0);
+   d_variable_dst_name.resizeArray(0);
+   d_variable_depth.resizeArray(0);
+   d_variable_src_ghosts.resizeArray(0, hier::IntVector(d_dim));
+   d_variable_dst_ghosts.resizeArray(0, hier::IntVector(d_dim));
+   d_variable_coarsen_op.resizeArray(0);
+   d_variable_refine_op.resizeArray(0);
+}
+
+PatchMultiblockTestStrategy::~PatchMultiblockTestStrategy()
+{
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines for reading variable and refinement data from input.         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchMultiblockTestStrategy::readVariableInput(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   tbox::Array<string> var_keys = db->getAllKeys();
+   int nkeys = var_keys.getSize();
+
+   d_variable_src_name.resizeArray(nkeys);
+   d_variable_dst_name.resizeArray(nkeys);
+   d_variable_depth.resizeArray(nkeys);
+   d_variable_src_ghosts.resizeArray(nkeys, hier::IntVector(d_dim, 0));
+   d_variable_dst_ghosts.resizeArray(nkeys, hier::IntVector(d_dim, 0));
+   d_variable_coarsen_op.resizeArray(nkeys);
+   d_variable_refine_op.resizeArray(nkeys);
+
+   for (int i = 0; i < nkeys; i++) {
+
+      tbox::Pointer<tbox::Database> var_db = db->getDatabase(var_keys[i]);
+
+      if (var_db->keyExists("src_name")) {
+         d_variable_src_name[i] = var_db->getString("src_name");
+      } else {
+         TBOX_ERROR("Variable input error: No `src_name' string found for "
+            << "key = " << var_keys[i] << endl);
+      }
+
+      if (var_db->keyExists("dst_name")) {
+         d_variable_dst_name[i] = var_db->getString("dst_name");
+      } else {
+         TBOX_ERROR("Variable input error: No `dst_name' string found for "
+            << "key = " << var_keys[i] << endl);
+      }
+
+      if (var_db->keyExists("depth")) {
+         d_variable_depth[i] = var_db->getInteger("depth");
+      } else {
+         d_variable_depth[i] = 1;
+      }
+
+      if (var_db->keyExists("src_ghosts")) {
+         int* tmp_ghosts = &d_variable_src_ghosts[i][0];
+         var_db->getIntegerArray("src_ghosts", tmp_ghosts, d_dim.getValue());
+      }
+
+      if (var_db->keyExists("dst_ghosts")) {
+         int* tmp_ghosts = &d_variable_dst_ghosts[i][0];
+         var_db->getIntegerArray("dst_ghosts", tmp_ghosts, d_dim.getValue());
+      }
+
+      if (var_db->keyExists("coarsen_operator")) {
+         d_variable_coarsen_op[i] = var_db->getString("coarsen_operator");
+      } else {
+         d_variable_coarsen_op[i] = "NO_COARSEN";
+      }
+
+      if (var_db->keyExists("refine_operator")) {
+         d_variable_refine_op[i] = var_db->getString("refine_operator");
+      } else {
+         d_variable_refine_op[i] = "NO_REFINE";
+      }
+
+   }
+
+}
+
+void PatchMultiblockTestStrategy::readRefinementInput(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   tbox::Array<string> box_keys = db->getAllKeys();
+   int nkeys = box_keys.getSize();
+
+   d_refine_level_boxes.resizeArray(nkeys, hier::BoxArray(d_dim));
+   for (int i = 0; i < nkeys; i++) {
+      d_refine_level_boxes[i] = db->getDatabaseBoxArray(box_keys[i]);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Tag cells on level specified in input box array for refinement.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchMultiblockTestStrategy::tagCellsInInputBoxes(
+   hier::Patch& patch,
+   int level_number,
+   int tag_index)
+{
+
+   if (level_number < d_refine_level_boxes.getSize()) {
+
+      tbox::Pointer<pdat::CellData<int> > tags =
+         patch.getPatchData(tag_index);
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!tags.isNull());
+#endif
+      tags->fillAll(0);
+
+      const hier::Box pbox = patch.getBox();
+
+      hier::BoxArray boxes = d_refine_level_boxes[level_number];
+      int nboxes = boxes.getNumberOfBoxes();
+      for (int k = 0; k < nboxes; k++) {
+         tags->fill(1, boxes[k] * pbox, 0);
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Blank physical boundary and pre/postprocess coarsen/refine operations *
+ * so tester isn't required to implement them when not needed.           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void PatchMultiblockTestStrategy::setPhysicalBoundaryConditions(
+   hier::Patch& patch,
+   const double time,
+   const hier::IntVector& gcw) const
+{
+   (void)patch;
+   (void)time;
+   (void)gcw;
+}
+
+void PatchMultiblockTestStrategy::preprocessRefine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const tbox::Pointer<hier::VariableContext>& context,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio) const
+{
+   (void)fine;
+   (void)coarse;
+   (void)context;
+   (void)fine_box;
+   (void)ratio;
+}
+
+void PatchMultiblockTestStrategy::postprocessRefine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const tbox::Pointer<hier::VariableContext>& context,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio) const
+{
+   (void)fine;
+   (void)coarse;
+   (void)context;
+   (void)fine_box;
+   (void)ratio;
+}
+
+void PatchMultiblockTestStrategy::preprocessCoarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const tbox::Pointer<hier::VariableContext>& context,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   (void)coarse;
+   (void)fine;
+   (void)context;
+   (void)coarse_box;
+   (void)ratio;
+}
+
+void PatchMultiblockTestStrategy::postprocessCoarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const tbox::Pointer<hier::VariableContext>& context,
+   const hier::Box& coarse_box,
+   const hier::IntVector& ratio) const
+{
+   (void)coarse;
+   (void)fine;
+   (void)context;
+   (void)coarse_box;
+   (void)ratio;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/PatchMultiblockTestStrategy.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/PatchMultiblockTestStrategy.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,353 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Base class for patch data test operations. 
+ *
+ ************************************************************************/
+
+#ifndef included_hier_PatchMultiblockTestStrategy
+#define included_hier_PatchMultiblockTestStrategy
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "MultiblockTester.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/xfer/MultiblockRefinePatchStrategy.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/VariableContext.h"
+
+using namespace SAMRAI;
+
+//class MultiblockTester;
+
+/**
+ * Class PatchMultiblockTestStrategy defines an interface for testing specific
+ * patch data transfer operations on individual patches when using
+ * the MultiblockTester class.  This base class provides two member functions
+ * for reading test input information.  These are:
+ *
+ * readVariableInput(): This function reads in a collection of databases,
+ * each of which contains parameters for a single variable.  The names of
+ * the sub-databases are arbitrary, but must be distinct.  Each variable
+ * sub-database has the following input keys:
+ *
+ *
+ *
+ *
+ *
+ *    - \b  name         variable name string (required)
+ *    - \b  depth        optional variable depth (default = 1)
+ *    - \b  src_ghosts   optional comm source ghost width (default = 0,0,0)
+ *    - \b  dst_ghosts   optional comm dest ghost width (default = 0,0,0)
+ *    - \b  coarsen_operator   opt. coarsen op name (default = "NO_COARSEN")
+ *    - \b  refine_operator    opt. refine op name (default = "NO_REFINE")
+ *
+ *
+ *
+ *
+ *
+ * readRefinementInput(): This function reads in a collection of box
+ * arrays, each of which describes the region to refine on each level.
+ * The key names of the box arrays are arbitrary, but must be distinct.
+ * For example,
+ *
+ *
+ *
+ *
+ *
+ *    - \b  level0_boxes   boxes to refine on level zero.
+ *    - \b  level1_boxes   boxes to refine on level one.
+ *    - \b  ...            etc...
+ *
+ *
+ *
+ *
+ *
+ *
+ * The pure virtual functions in this class that must be provided by
+ * concrete test subclass:
+ * \begin{enumerate}
+ *    - [registerVariables(...)] register variables with MultiblockTester.
+ *    - [initializeDataOnPatch(...)] set patch data on new patch.
+ *    - [tagCellsToRefine(...)] tag cells on patch to refine.
+ *    - [verifyResults(...)] check results of communication operations.
+ * \end{enumerate}
+ *
+ * The following virtual functions are given default non-operations in this
+ * class so that concrete test subclass can either implement them to test
+ * specific functionality or simply ignore.  They are pure virtual in the
+ * coarsen and refine patch strategy classes:
+ * \begin{enumerate}
+ *    - [setPhysicalBoundaryConditions(...)]
+ *    - [preprocessRefine(...)]
+ *    - [postprocessRefine(...)]
+ *    - [preprocessCoarsen(...)]
+ *    - [postprocessCoarsen(...)]
+ * \end{enumerate}
+ */
+
+class PatchMultiblockTestStrategy
+{
+public:
+   /**
+    * The constructor initializes variable data arrays to zero length.
+    */
+   PatchMultiblockTestStrategy(
+      const tbox::Dimension& dim);
+
+   /**
+    * Virtual destructor for PatchMultiblockTestStrategy.
+    */
+   virtual ~PatchMultiblockTestStrategy();
+
+   /**
+    * Grid geometry access operations.
+    */
+   void setGridGeometrySize(
+      const int num_blocks)
+   {
+      d_grid_geometry->getBlockGeometryArray().resizeArray(num_blocks);
+   }
+
+   void setGridGeometry(
+      tbox::Pointer<hier::MultiblockGridGeometry>& grid_geom)
+   {
+      d_grid_geometry = grid_geom;
+   }
+
+   tbox::Pointer<hier::MultiblockGridGeometry>&
+   getGridGeometry()
+   {
+      return d_grid_geometry;
+   }
+
+   /**
+    * Utility functions for managing patch data context.
+    */
+   void setDataContext(
+      tbox::Pointer<hier::VariableContext> context)
+   {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!context.isNull());
+#endif
+      d_data_context = context;
+   }
+
+   void setDestinationContext(
+      tbox::Pointer<hier::VariableContext> context)
+   {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!context.isNull());
+#endif
+      d_dst_context = context;
+   }
+
+   void setScratchContext(
+      tbox::Pointer<hier::VariableContext> context)
+   {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!context.isNull());
+#endif
+      d_scr_context = context;
+   }
+
+   ///
+   tbox::Pointer<hier::VariableContext> getDataContext() const
+   {
+      return d_data_context;
+   }
+
+   ///
+   tbox::Pointer<hier::VariableContext> getDestinationContext() const
+   {
+      return d_dst_context;
+   }
+
+   ///
+   tbox::Pointer<hier::VariableContext> getScratchContext() const
+   {
+      return d_scr_context;
+   }
+
+   void clearDataContext()
+   {
+      d_data_context.setNull();
+   }
+
+   void clearDestinationContext()
+   {
+      d_dst_context.setNull();
+   }
+
+   void clearScratchContext()
+   {
+      d_scr_context.setNull();
+   }
+
+   /**
+    * Read variable parameters from input database.
+    */
+   void
+   readVariableInput(
+      tbox::Pointer<tbox::Database> db);
+
+   /**
+    * Read arrays of refinement boxes from input database.
+    */
+   void
+   readRefinementInput(
+      tbox::Pointer<tbox::Database> db);
+
+   /**
+    * Set tags in cells to refine based on boxes provided in input.
+    */
+   void
+   tagCellsInInputBoxes(
+      hier::Patch& patch,
+      int level_number,
+      int tag_index);
+
+   /**
+    * Virtual functions in interface to user-supplied boundary conditions,
+    * coarsen and refine operations.
+    */
+   virtual void
+   setPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const double time,
+      const hier::IntVector& gcw) const;
+
+   virtual void fillSingularityBoundaryConditions(
+      hier::Patch& patch,
+      tbox::List<tbox::Pointer<hier::Patch> >&
+      singularity_patches,
+      const hier::Box& fill_box,
+      const hier::BoundaryBox& boundary_box)
+   {
+      NULL_USE(patch);
+      NULL_USE(singularity_patches);
+      NULL_USE(fill_box);
+      NULL_USE(boundary_box);
+   }
+
+   ///
+   virtual void
+   preprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const tbox::Pointer<hier::VariableContext>& context,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio) const;
+
+   ///
+   virtual void
+   postprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const tbox::Pointer<hier::VariableContext>& context,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio) const;
+
+   ///
+   virtual void
+   preprocessCoarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const tbox::Pointer<hier::VariableContext>& context,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+   ///
+   virtual void
+   postprocessCoarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const tbox::Pointer<hier::VariableContext>& context,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio) const;
+
+   /**
+    * This function is called from the MultiblockTester constructor.  Its
+    * purpose is to register variables used in the patch data test
+    * and appropriate communication parameters (ghost cell widths,
+    * coarsen/refine operations) with the MultiblockTester object, which
+    * manages the variable storage.
+    */
+   virtual void
+   registerVariables(
+      MultiblockTester* commtest) = 0;
+
+   /**
+    * Virtual function for setting data on new patch in hierarchy.
+    *
+    * @param src_or_dst Flag set to 's' for source or 'd' for destination
+    *        to indicate variables to set data for.
+    */
+   virtual void
+   initializeDataOnPatch(
+      hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number,
+      int block_number,
+      char src_or_dst) = 0;
+
+   /**
+    * Virtual function for tagging cells to refine on the patch.
+    */
+   virtual void
+   tagCellsToRefine(
+      hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number,
+      int tag_index) = 0;
+
+   /**
+    * Virtual function for checking results of communication operations.
+    */
+   virtual bool
+   verifyResults(
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::MultiblockPatchHierarchy> hierarchy,
+      int level_number,
+      int block_number) = 0;
+
+protected:
+   const tbox::Dimension d_dim;
+
+   /*
+    * Arrays of information read from input file describing test variables
+    */
+   tbox::Array<string> d_variable_src_name;
+   tbox::Array<string> d_variable_dst_name;
+   tbox::Array<int> d_variable_depth;
+   tbox::Array<hier::IntVector> d_variable_src_ghosts;
+   tbox::Array<hier::IntVector> d_variable_dst_ghosts;
+   tbox::Array<string> d_variable_coarsen_op;
+   tbox::Array<string> d_variable_refine_op;
+
+   /*
+    * Arrays of information read from input file describing test variables
+    */
+   tbox::Array<hier::BoxArray> d_refine_level_boxes;
+
+private:
+   tbox::Pointer<hier::MultiblockGridGeometry> d_grid_geometry;
+   //tbox::Array< tbox::Pointer< hier::GridGeometry > > d_grid_geometry;
+
+   tbox::Pointer<hier::VariableContext> d_data_context;
+   tbox::Pointer<hier::VariableContext> d_dst_context;
+   tbox::Pointer<hier::VariableContext> d_scr_context;
+
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/Pointer-MultiblockTester.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/Pointer-MultiblockTester.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,19 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright
+ * information, see COPYRIGHT and COPYING.LESSER.
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Pointer.C"
+#include "MultiblockTester.h"
+
+using namespace SAMRAI;
+
+#ifndef LACKS_EXPLICIT_TEMPLATE_INSTANTIATION
+template class tbox::Pointer<MultiblockTester>;
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/SideMultiblockTest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/SideMultiblockTest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,720 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR communication tests for side-centered patch data 
+ *
+ ************************************************************************/
+
+#include "SideMultiblockTest.h"
+
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/BlockPatchGeometry.h"
+#include "SAMRAI/pdat/SideDoubleConstantRefine.h"
+#include "SAMRAI/pdat/SideIndex.h"
+#include "SAMRAI/pdat/SideIterator.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "MultiblockTester.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/tbox/Database.h"
+
+using namespace SAMRAI;
+
+SideMultiblockTest::SideMultiblockTest(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> main_input_db,
+   bool do_refine,
+   bool do_coarsen,
+   const string& refine_option):
+   PatchMultiblockTestStrategy(dim),
+   d_dim(dim)
+{
+   NULL_USE(do_refine);
+   NULL_USE(do_coarsen);
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!main_input_db.isNull());
+   TBOX_ASSERT(!refine_option.empty());
+
+   d_object_name = object_name;
+
+   d_refine_option = refine_option;
+
+   d_finest_level_number = main_input_db->
+      getDatabase("MultiblockPatchHierarchy")->
+      getDatabase("PatchHierarchy")->
+      getInteger("max_levels") - 1;
+
+   int num_blocks = main_input_db->getDatabase("MultiblockPatchHierarchy")->
+      getInteger("num_blocks");
+
+   d_skel_grid_geometry.resizeArray(num_blocks);
+
+   char geom_name[32];
+
+   for (int g = 0; g < num_blocks; g++) {
+
+      sprintf(geom_name, "BlockGridGeometry%d", g);
+
+      if (main_input_db->keyExists(geom_name)) {
+         d_skel_grid_geometry[g] = new geom::BlockGridGeometry(
+               dim,
+               geom_name,
+               main_input_db->getDatabase(geom_name),
+               g);
+
+      } else {
+         break;
+      }
+   }
+
+   tbox::Pointer<hier::MultiblockGridGeometry> mblk_geometry(
+      new hier::MultiblockGridGeometry(d_skel_grid_geometry));
+
+   setGridGeometry(mblk_geometry);
+
+   readTestInput(main_input_db->getDatabase("SideMultiblockTest"));
+}
+
+SideMultiblockTest::~SideMultiblockTest()
+{
+}
+
+void SideMultiblockTest::readTestInput(
+   tbox::Pointer<tbox::Database> db)
+{
+   TBOX_ASSERT(!db.isNull());
+
+   /*
+    * Base class reads variable parameters and boxes to refine.
+    */
+
+   readVariableInput(db->getDatabase("VariableData"));
+   readRefinementInput(db->getDatabase("RefinementData"));
+}
+
+void SideMultiblockTest::registerVariables(
+   MultiblockTester* commtest)
+{
+   TBOX_ASSERT(commtest != (MultiblockTester *)NULL);
+
+   int nvars = d_variable_src_name.getSize();
+
+   d_variables.resizeArray(nvars);
+
+   for (int i = 0; i < nvars; i++) {
+      d_variables[i] =
+         new pdat::SideVariable<double>(
+            d_dim,
+            d_variable_src_name[i],
+            d_variable_depth[i]);
+
+      commtest->registerVariable(d_variables[i],
+         d_variables[i],
+         d_variable_src_ghosts[i],
+         d_variable_dst_ghosts[i],
+         d_skel_grid_geometry[0],
+         d_variable_refine_op[i]);
+
+   }
+
+}
+
+void SideMultiblockTest::initializeDataOnPatch(
+   hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number,
+   int block_number,
+   char src_or_dst)
+{
+   NULL_USE(hierarchy);
+   NULL_USE(src_or_dst);
+
+   if ((d_refine_option == "INTERIOR_FROM_SAME_LEVEL")
+       || ((d_refine_option == "INTERIOR_FROM_COARSER_LEVEL")
+           && (level_number < d_finest_level_number))) {
+
+      for (int i = 0; i < d_variables.getSize(); i++) {
+
+         tbox::Pointer<pdat::SideData<double> > side_data =
+            patch.getPatchData(d_variables[i], getDataContext());
+
+         hier::Box dbox = side_data->getGhostBox();
+
+         side_data->fillAll((double)block_number);
+
+      }
+   }
+}
+
+void SideMultiblockTest::tagCellsToRefine(
+   hier::Patch& patch,
+   const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+   int level_number,
+   int tag_index)
+{
+   (void)hierarchy;
+
+   /*
+    * Base class sets tags in box array for each level.
+    */
+   tagCellsInInputBoxes(patch, level_number, tag_index);
+
+}
+
+void SideMultiblockTest::setPhysicalBoundaryConditions(
+   hier::Patch& patch,
+   const double time,
+   const hier::IntVector& gcw_to_fill) const
+{
+   (void)time;
+
+   tbox::Pointer<hier::BlockPatchGeometry>
+   pgeom = patch.getPatchGeometry();
+
+   const tbox::Array<hier::BoundaryBox> node_bdry =
+      pgeom->getCodimensionBoundaries(d_dim.getValue());
+   const int num_node_bdry_boxes = node_bdry.getSize();
+
+   tbox::Array<hier::BoundaryBox> edge_bdry;
+   int num_edge_bdry_boxes = 0;
+   if (d_dim > tbox::Dimension(1)) {
+      edge_bdry = pgeom->getCodimensionBoundaries(d_dim.getValue() - 1);
+      num_edge_bdry_boxes = edge_bdry.getSize();
+   }
+
+   tbox::Array<hier::BoundaryBox> face_bdry;
+   int num_face_bdry_boxes = 0;
+   if (d_dim == tbox::Dimension(3)) {
+      face_bdry = pgeom->getCodimensionBoundaries(d_dim.getValue() - 2);
+      num_face_bdry_boxes = face_bdry.getSize();
+   }
+
+   for (int i = 0; i < d_variables.getSize(); i++) {
+
+      tbox::Pointer<pdat::SideData<double> > side_data =
+         patch.getPatchData(d_variables[i], getDataContext());
+
+      /*
+       * Set node boundary data.
+       */
+      for (int nb = 0; nb < num_node_bdry_boxes; nb++) {
+
+         hier::Box fill_box = pgeom->getBoundaryFillBox(node_bdry[nb],
+               patch.getBox(),
+               gcw_to_fill);
+
+         for (int axis = 0; axis < d_dim.getValue(); axis++) {
+            hier::Box patch_side_box =
+               pdat::SideGeometry::toSideBox(patch.getBox(), axis);
+            if (!node_bdry[nb].getIsMultiblockSingularity()) {
+               for (pdat::SideIterator ni(fill_box, axis); ni; ni++) {
+                  if (!patch_side_box.contains(ni())) {
+                     for (int d = 0; d < side_data->getDepth(); d++) {
+                        (*side_data)(ni(), d) =
+                           (double)(node_bdry[nb].getLocationIndex() + 100);
+                     }
+                  }
+               }
+            }
+         }
+      }
+
+      if (d_dim > tbox::Dimension(1)) {
+         /*
+          * Set edge boundary data.
+          */
+         for (int eb = 0; eb < num_edge_bdry_boxes; eb++) {
+
+            hier::Box fill_box = pgeom->getBoundaryFillBox(edge_bdry[eb],
+                  patch.getBox(),
+                  gcw_to_fill);
+
+            for (int axis = 0; axis < d_dim.getValue(); axis++) {
+               hier::Box patch_side_box =
+                  pdat::SideGeometry::toSideBox(patch.getBox(), axis);
+               hier::Index plower(patch_side_box.lower());
+               hier::Index pupper(patch_side_box.upper());
+
+               if (!edge_bdry[eb].getIsMultiblockSingularity()) {
+                  for (pdat::SideIterator ni(fill_box, axis); ni; ni++) {
+                     if (!patch_side_box.contains(ni())) {
+                        bool use_index = true;
+                        for (int n = 0; n < d_dim.getValue(); n++) {
+                           if (axis == n &&
+                               edge_bdry[eb].getBox().numberCells(n) == 1) {
+                              if (ni() (n) == plower(n) || ni() (n) ==
+                                  pupper(n)) {
+                                 use_index = false;
+                                 break;
+                              }
+                           }
+                        }
+
+                        if (use_index) {
+                           for (int d = 0; d < side_data->getDepth(); d++) {
+                              (*side_data)(ni(), d) =
+                                 (double)(edge_bdry[eb].getLocationIndex()
+                                          + 100);
+                           }
+                        }
+                     }
+                  }
+               }
+            }
+         }
+      }
+
+      if (d_dim == tbox::Dimension(3)) {
+         /*
+          * Set face boundary data.
+          */
+         for (int fb = 0; fb < num_face_bdry_boxes; fb++) {
+
+            hier::Box fill_box = pgeom->getBoundaryFillBox(face_bdry[fb],
+                  patch.getBox(),
+                  gcw_to_fill);
+
+            for (int axis = 0; axis < d_dim.getValue(); axis++) {
+               hier::Box patch_side_box =
+                  pdat::SideGeometry::toSideBox(patch.getBox(), axis);
+               hier::Index plower(patch_side_box.lower());
+               hier::Index pupper(patch_side_box.upper());
+
+               if (!face_bdry[fb].getIsMultiblockSingularity()) {
+                  for (pdat::SideIterator ni(fill_box, axis); ni; ni++) {
+                     if (!patch_side_box.contains(ni())) {
+                        bool use_index = true;
+                        for (int n = 0; n < d_dim.getValue(); n++) {
+                           if (axis == n &&
+                               face_bdry[fb].getBox().numberCells(n) == 1) {
+                              if (ni() (n) == plower(n) || ni() (n) ==
+                                  pupper(n)) {
+                                 use_index = false;
+                                 break;
+                              }
+                           }
+                        }
+
+                        if (use_index) {
+                           for (int d = 0; d < side_data->getDepth(); d++) {
+                              (*side_data)(ni(), d) =
+                                 (double)(face_bdry[fb].getLocationIndex()
+                                          + 100);
+                           }
+                        }
+                     }
+                  }
+               }
+            }
+         }
+      }
+
+   }
+
+}
+
+void SideMultiblockTest::fillSingularityBoundaryConditions(
+   hier::Patch& patch,
+   tbox::List<tbox::Pointer<hier::Patch> >&
+   sing_patches,
+   const hier::Box& fill_box,
+   const hier::BoundaryBox& bbox)
+{
+   for (int i = 0; i < d_variables.getSize(); i++) {
+
+      tbox::Pointer<pdat::SideData<double> > side_data =
+         patch.getPatchData(d_variables[i], getDataContext());
+
+      hier::Box sing_fill_box(side_data->getGhostBox() * fill_box);
+
+      int depth = side_data->getDepth();
+
+      for (int axis = 0; axis < d_dim.getValue(); axis++) {
+         hier::Box pbox =
+            pdat::SideGeometry::toSideBox(patch.getBox(), axis);
+
+         hier::Index plower(pbox.lower());
+         hier::Index pupper(pbox.upper());
+
+         for (pdat::SideIterator ni(sing_fill_box, axis); ni; ni++) {
+            bool use_index = true;
+            for (int n = 0; n < d_dim.getValue(); n++) {
+               if (axis == n && bbox.getBox().numberCells(n) == 1) {
+                  if (ni() (n) == plower(n) || ni() (n) == pupper(n)) {
+                     use_index = false;
+                     break;
+                  }
+               }
+            }
+            if (use_index) {
+               for (int d = 0; d < depth; d++) {
+                  (*side_data)(ni(), d) = 0.0;
+               }
+            }
+         }
+      }
+
+      /*
+       * If sing_patches is not empty, that means there is enhanced
+       * connectivity, and we get data from other blocks
+       */
+
+      if (sing_patches.size()) {
+
+         for (tbox::List
+              <tbox::Pointer<hier::Patch> >::
+              Iterator sp(sing_patches); sp; sp++) {
+            tbox::Pointer<pdat::SideData<double> > sing_data =
+               sp()->getPatchData(d_variables[i], getDataContext());
+            tbox::Pointer<hier::BlockPatchGeometry> patch_geom =
+               sp()->getPatchGeometry();
+            int sing_neighbor_id = patch_geom->getBlockNumber();
+            for (int axis = 0; axis < d_dim.getValue(); axis++) {
+
+               hier::Box pbox =
+                  pdat::SideGeometry::toSideBox(patch.getBox(), axis);
+
+               hier::Index plower(pbox.lower());
+               hier::Index pupper(pbox.upper());
+
+               for (pdat::SideIterator ci(sing_fill_box, axis); ci; ci++) {
+                  bool use_index = true;
+                  for (int n = 0; n < d_dim.getValue(); n++) {
+                     if (axis == n && bbox.getBox().numberCells(n) == 1) {
+                        if (ci() (n) == plower(n) || ci() (n) == pupper(n)) {
+                           use_index = false;
+                           break;
+                        }
+                     }
+                  }
+                  if (use_index) {
+                     for (int d = 0; d < depth; d++) {
+                        (*side_data)(ci(), d) += sing_neighbor_id;
+                     }
+                  }
+               }
+            }
+         }
+
+         for (int axis = 0; axis < d_dim.getValue(); axis++) {
+
+            hier::Box pbox =
+               pdat::SideGeometry::toSideBox(patch.getBox(), axis);
+
+            hier::Index plower(pbox.lower());
+            hier::Index pupper(pbox.upper());
+
+            for (pdat::SideIterator ci(sing_fill_box, axis); ci; ci++) {
+               bool use_index = true;
+               for (int n = 0; n < d_dim.getValue(); n++) {
+                  if (axis == n && bbox.getBox().numberCells(n) == 1) {
+                     if (ci() (n) == plower(n) || ci() (n) == pupper(n)) {
+                        use_index = false;
+                        break;
+                     }
+                  }
+               }
+               if (use_index) {
+                  for (int d = 0; d < depth; d++) {
+                     (*side_data)(ci(), d) /= sing_patches.size();
+                  }
+               }
+            }
+         }
+
+         /*
+          * In cases of reduced connectivity, there are no other blocks
+          * from which to acquire data.
+          */
+
+      } else {
+
+         for (int axis = 0; axis < d_dim.getValue(); axis++) {
+
+            hier::Box pbox =
+               pdat::SideGeometry::toSideBox(patch.getBox(), axis);
+
+            hier::Index plower(pbox.lower());
+            hier::Index pupper(pbox.upper());
+
+            for (pdat::SideIterator ci(sing_fill_box, axis); ci; ci++) {
+               bool use_index = true;
+               for (int n = 0; n < d_dim.getValue(); n++) {
+                  if (axis == n && bbox.getBox().numberCells(n) == 1) {
+                     if (ci() (n) == plower(n) || ci() (n) == pupper(n)) {
+                        use_index = false;
+                        break;
+                     }
+                  }
+               }
+               if (use_index) {
+                  for (int d = 0; d < depth; d++) {
+                     (*side_data)(ci(), d) =
+                        (double)bbox.getLocationIndex() + 200.0;
+                  }
+               }
+            }
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Verify results of communication operations.  This test must be        *
+ * consistent with data initialization and boundary operations above.    *
+ *                                                                       *
+ *************************************************************************
+ */
+bool SideMultiblockTest::verifyResults(
+   const hier::Patch& patch,
+   const tbox::Pointer<hier::MultiblockPatchHierarchy> hierarchy,
+   int level_number,
+   int block_number)
+{
+
+   tbox::plog << "\nEntering SideMultiblockTest::verifyResults..." << endl;
+   tbox::plog << "level_number = " << level_number << endl;
+   tbox::plog << "Patch box = " << patch.getBox() << endl;
+
+   hier::IntVector tgcw(d_dim, 0);
+   for (int i = 0; i < d_variables.getSize(); i++) {
+      tgcw.max(patch.getPatchData(d_variables[i], getDataContext())->
+         getGhostCellWidth());
+   }
+   hier::Box pbox = patch.getBox();
+
+   tbox::Pointer<pdat::SideData<double> > solution(
+      new pdat::SideData<double>(pbox, 1, tgcw));
+
+   hier::Box tbox(pbox);
+   tbox.grow(tgcw);
+
+   tbox::List<hier::MultiblockPatchHierarchy::Neighbor>& neighbors =
+      hierarchy->getNeighbors(block_number);
+   hier::BoxList singularity(
+      hierarchy->getSingularityBoxList(block_number));
+
+   hier::IntVector ratio =
+      hierarchy->getPatchLevel(level_number)->getRatioToLevelZero();
+
+   singularity.refine(ratio);
+
+   bool test_failed = false;
+
+   for (int i = 0; i < d_variables.getSize(); i++) {
+
+      double correct = (double)block_number;
+
+      tbox::Pointer<pdat::SideData<double> > side_data =
+         patch.getPatchData(d_variables[i], getDataContext());
+      int depth = side_data->getDepth();
+
+      hier::Box interior_box(pbox);
+      interior_box.grow(hier::IntVector(d_dim, -1));
+
+      for (int axis = 0; axis < d_dim.getValue(); axis++) {
+         for (pdat::SideIterator ci(interior_box, axis); ci; ci++) {
+            for (int d = 0; d < depth; d++) {
+               double result = (*side_data)(ci(), d);
+
+               if (!tbox::MathUtilities<double>::equalEps(correct, result)) {
+                  tbox::perr << "Test FAILED: ...."
+                             << " : side index = " << ci() << endl;
+                  tbox::perr << "    Variable = " << d_variable_src_name[i]
+                  << " : depth index = " << d << endl;
+                  tbox::perr << "    result = " << result
+                             << " : correct = " << correct << endl;
+                  test_failed = true;
+               }
+            }
+         }
+      }
+
+      hier::Box gbox = side_data->getGhostBox();
+
+      for (int axis = 0; axis < d_dim.getValue(); axis++) {
+         hier::Box patch_side_box =
+            pdat::SideGeometry::toSideBox(pbox, axis);
+
+         for (tbox::List<hier::MultiblockPatchHierarchy::Neighbor>::
+              Iterator ne(neighbors); ne; ne++) {
+
+            if (ne().isSingularity()) continue;
+
+            correct = ne().getBlockNumber();
+
+            hier::BoxList neighbor_ghost(ne().getTranslatedDomain());
+            neighbor_ghost.refine(ratio);
+            neighbor_ghost.intersectBoxes(gbox);
+
+            for (hier::BoxList::Iterator ng(neighbor_ghost); ng; ng++) {
+
+               for (pdat::SideIterator ci(ng(), axis); ci; ci++) {
+                  if (!patch_side_box.contains(ci())) {
+                     for (int d = 0; d < depth; d++) {
+                        double result = (*side_data)(ci(), d);
+
+                        if (!tbox::MathUtilities<double>::equalEps(correct,
+                               result)) {
+                           tbox::perr << "Test FAILED: ...."
+                                      << " : side index = " << ci() << endl;
+                           tbox::perr << "  Variable = "
+                           << d_variable_src_name[i]
+                           << " : depth index = " << d << endl;
+                           tbox::perr << "    result = " << result
+                                      << " : correct = " << correct << endl;
+                           test_failed = true;
+                        }
+                     }
+                  }
+               }
+            }
+         }
+      }
+
+      tbox::Pointer<hier::BlockPatchGeometry> pgeom =
+         patch.getPatchGeometry();
+
+      for (int b = 0; b < d_dim.getValue(); b++) {
+         tbox::Array<hier::BoundaryBox> bdry =
+            pgeom->getCodimensionBoundaries(b + 1);
+
+         for (int k = 0; k < bdry.size(); k++) {
+            hier::Box fill_box = pgeom->getBoundaryFillBox(bdry[k],
+                  patch.getBox(),
+                  tgcw);
+            fill_box = fill_box * gbox;
+
+            if (bdry[k].getIsMultiblockSingularity()) {
+               correct = 0.0;
+
+               int num_sing_neighbors = 0;
+               for (tbox::List
+                    <hier::MultiblockPatchHierarchy::Neighbor>::
+                    Iterator ns(neighbors); ns; ns++) {
+                  if (ns().isSingularity()) {
+                     hier::BoxList neighbor_ghost(
+                        ns().getTranslatedDomain());
+                     neighbor_ghost.refine(ratio);
+                     neighbor_ghost.intersectBoxes(fill_box);
+                     if (neighbor_ghost.size()) {
+                        num_sing_neighbors++;
+                        correct += (double)ns().getBlockNumber();
+                     }
+                  }
+               }
+
+               if (num_sing_neighbors == 0) {
+
+                  correct = (double)bdry[k].getLocationIndex() + 200.0;
+
+               } else {
+
+                  correct /= (double)num_sing_neighbors;
+
+               }
+
+            } else {
+               correct = (double)(bdry[k].getLocationIndex() + 100);
+            }
+
+            for (int axis = 0; axis < d_dim.getValue(); axis++) {
+               hier::Box patch_side_box =
+                  pdat::SideGeometry::toSideBox(pbox, axis);
+
+               for (pdat::SideIterator ci(fill_box, axis); ci; ci++) {
+
+                  if (!patch_side_box.contains(ci())) {
+
+                     bool use_index = true;
+                     for (int n = 0; n < d_dim.getValue(); n++) {
+                        if (axis == n && bdry[k].getBox().numberCells(n) ==
+                            1) {
+                           if (ci() (n) == patch_side_box.lower() (n) ||
+                               ci() (n) == patch_side_box.upper() (n)) {
+                              use_index = false;
+                              break;
+                           }
+                        }
+                     }
+
+                     if (use_index) {
+                        for (int d = 0; d < depth; d++) {
+                           double result = (*side_data)(ci(), d);
+
+                           if (!tbox::MathUtilities<double>::equalEps(correct,
+                                  result)) {
+                              tbox::perr << "Test FAILED: ...."
+                                         << " : side index = " << ci() << endl;
+                              tbox::perr << "  Variable = "
+                              << d_variable_src_name[i]
+                              << " : depth index = " << d << endl;
+                              tbox::perr << "    result = " << result
+                                         << " : correct = " << correct << endl;
+                              test_failed = true;
+                           }
+                        }
+                     }
+                  }
+               }
+            }
+         }
+      }
+   }
+
+   if (!test_failed) {
+      tbox::plog << "SideMultiblockTest Successful!" << endl;
+   } else {
+      tbox::perr << "Multiblock SideMultiblockTest FAILED: .\n" << endl;
+   }
+
+   solution.setNull();   // just to be anal...
+
+   tbox::plog << "\nExiting SideMultiblockTest::verifyResults..." << endl;
+   tbox::plog << "level_number = " << level_number << endl;
+   tbox::plog << "Patch box = " << patch.getBox() << endl << endl;
+
+   return !test_failed;
+}
+
+void SideMultiblockTest::postprocessRefine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const tbox::Pointer<hier::VariableContext>& context,
+   const hier::Box& fine_box,
+   const hier::IntVector& ratio) const
+{
+   const tbox::Dimension& dim(fine.getDim());
+
+   pdat::SideDoubleConstantRefine ref_op(dim);
+
+   hier::BoxList fine_box_list(fine_box);
+
+   xfer::BoxGeometryVariableFillPattern fill_pattern;
+
+   for (int i = 0; i < d_variables.getSize(); i++) {
+
+      int id = hier::VariableDatabase::getDatabase()->
+         mapVariableAndContextToIndex(d_variables[i], context);
+
+      tbox::Pointer<hier::PatchDataFactory> fine_pdf =
+         fine.getPatchDescriptor()->getPatchDataFactory(id);
+
+      tbox::Pointer<hier::BoxOverlap> fine_overlap =
+         fill_pattern.computeFillBoxesOverlap(
+            fine_box_list,
+            fine.getBox(),
+            fine.getPatchData(id)->getGhostBox(),
+            *fine_pdf);
+
+      ref_op.refine(fine, coarse, id, id, *fine_overlap, ratio);
+   }
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/SideMultiblockTest.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/SideMultiblockTest.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,156 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   AMR communication tests for edge-centered patch data 
+ *
+ ************************************************************************/
+
+#ifndef included_SideMultiblockTest
+#define included_SideMultiblockTest
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "PatchMultiblockTestStrategy.h"
+#include "SAMRAI/geom/BlockGridGeometry.h"
+#include "SAMRAI/hier/Variable.h"
+
+using namespace SAMRAI;
+
+/**
+ * Class SideMultiblockTest provides routines to test communication operations
+ * for edge-centered patch data on an AMR patch hierarchy.
+ *
+ * See PatchMultiblockTestStrategy header file comments for variable and
+ * refinement input data description.
+ */
+
+class SideMultiblockTest:public PatchMultiblockTestStrategy
+{
+public:
+   /**
+    * The constructor initializes variable data arrays to zero length.
+    */
+   SideMultiblockTest(
+      const string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> main_input_db,
+      bool do_refine,
+      bool do_coarsen,
+      const string& refine_option);
+
+   /**
+    * Virtual destructor for SideMultiblockTest.
+    */
+   virtual ~SideMultiblockTest();
+
+   /**
+    * User-supplied boundary conditions.  Note that we do not implement
+    * user-defined coarsen and refine operations.
+    */
+   void
+   setPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const double time,
+      const hier::IntVector& gcw_to_fill) const;
+
+   void
+   fillSingularityBoundaryConditions(
+      hier::Patch& patch,
+      tbox::List<tbox::Pointer<hier::Patch> >&
+      sing_patches,
+      const hier::Box& fill_box,
+      const hier::BoundaryBox& boundary_box);
+
+   /**
+    * This function is called from the MultiblockTester constructor.  Its
+    * purpose is to register variables used in the patch data test
+    * and appropriate communication parameters (ghost cell widths,
+    * coarsen/refine operations) with the MultiblockTester object, which
+    * manages the variable storage.
+    */
+   void
+   registerVariables(
+      MultiblockTester* commtest);
+
+   /**
+    * Function for setting data on new patch in hierarchy.
+    *
+    * @param src_or_dst Flag set to 's' for source or 'd' for destination
+    *        to indicate variables to set data for.
+    */
+   virtual void
+   initializeDataOnPatch(
+      hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number,
+      int block_number,
+      char src_or_dst);
+
+   /**
+    * Function for tagging cells on each patch to refine.
+    */
+   void
+   tagCellsToRefine(
+      hier::Patch& patch,
+      const tbox::Pointer<hier::PatchHierarchy> hierarchy,
+      int level_number,
+      int tag_index);
+
+   /**
+    * Function for checking results of communication operations.
+    */
+   bool
+   verifyResults(
+      const hier::Patch& patch,
+      const tbox::Pointer<hier::MultiblockPatchHierarchy> hierarchy,
+      int level_number,
+      int block_number);
+
+   ///
+   void
+   postprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const tbox::Pointer<hier::VariableContext>& context,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio) const;
+
+private:
+   /**
+    * Function for reading test data from input file.
+    */
+   void
+   readTestInput(
+      tbox::Pointer<tbox::Database> db);
+
+   /*
+    * Object string identifier for error reporting
+    */
+   string d_object_name;
+
+   const tbox::Dimension d_dim;
+
+   /*
+    * Data members specific to this edge data test.
+    */
+   tbox::Array<tbox::Pointer<hier::GridGeometry> >
+   d_skel_grid_geometry;
+
+   string d_refine_option;
+   int d_finest_level_number;
+
+   tbox::Array<tbox::Pointer<hier::Variable> > d_variables;
+
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/main.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/main.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,425 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program for patch data communication tests. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+
+#include "MultiblockTester.h"
+#include "SAMRAI/tbox/InputDatabase.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/mesh/GriddingAlgorithm.h"
+#include "SAMRAI/mesh/StandardTagAndInitialize.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+// Different component tests available
+#include "CellMultiblockTest.h"
+#include "EdgeMultiblockTest.h"
+#include "FaceMultiblockTest.h"
+#include "NodeMultiblockTest.h"
+#include "SideMultiblockTest.h"
+
+using namespace SAMRAI;
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * This is the driver program to test and time patch data               *
+ * communication operations on an SAMR patch hierarchy using            *
+ * SAMRAI.  MultiblockTester is the primary object used in these              *
+ * processes.  It constructs the patch hierarchy based on               *
+ * input file information and invokes the communcation operations       *
+ * specified in the input file.  The implementation of data type        *
+ * specific operations (defining variables, initializing data,          *
+ * defining coarsen/refine operations, and verifying the results)       *
+ * are provided in a class implemented for the test to be performed.    *
+ * This test-specific class is derived from the PatchMultiblockTestStrategy   *
+ * base class which declares the interface between the MultiblockTester       *
+ * and the test.                                                        *
+ *                                                                      *
+ * Input data file sections and keys are defined as follows:            *
+ *                                                                      *
+ *    o Main program...                                                 *
+ *                                                                      *
+ *      Main {                                                          *
+ *         log_file_name  = <string> [name of log file]                 *
+ *                          (optional - "component_test.log" is default)*
+ *         log_all_nodes  = <bool> [log all nodes or node 0 only?]      *
+ *                          (optional - FALSE is default)               *
+ *         ntimes_run     = <int> [how many times to perform test]      *
+ *                          (optional - 1 is default)                   *
+ *         test_to_run    = <string> [name of test] (required)          *
+ *            Available tests are:                                      *
+ *               "CellMultiblockTest"                                         *
+ *               "EdgeMultiblockTest"                                         *
+ *               "FaceMultiblockTest"                                         *
+ *               "NodeMultiblockTest"                                         *
+ *               "OuterodeMultiblockTest"                                     *
+ *               "SideMultiblockTest"                                         *
+ *               "MultiVariableMultiblockTest"                                *
+ *         do_refine      = <bool> [test refine operation?]             *
+ *                          (optional - FALSE is default)               *
+ *         do_coarsen     = <bool> [test coarsen operation?]            *
+ *                          (optional - FALSE is default)               *
+ *         NOTE: Only refine or coarsen test can be run, but not both.  *
+ *               If both are TRUE, only refine operations will execute. *
+ *         refine_option  = <string> [how interior of destination       *
+ *                                    level is filled during refine]    *
+ *            Options are:                                              *
+ *               "INTERIOR_FROM_SAME_LEVEL"                             *
+ *               "INTERIOR_FROM_COARSER_LEVEL"                          *
+ *               (default is "INTERIOR_FROM_SAME_LEVEL")                *
+ *      }                                                               *
+ *                                                                      *
+ *    o Timers...                                                       *
+ *                                                                      *
+ *      TimerManager {                                                  *
+ *         timer_list = <string array> [names of timers to run]         *
+ *            Available timers are:                                     *
+ *               "test::main::createRefineSchedule"                     *
+ *               "test::main::performRefineOperations"                  *
+ *               "test::main::createCoarsenSchedule"                    *
+ *               "test::main::performCoarsenOperations"                 *
+ *      }                                                               *
+ *                                                                      *
+ *    o Patch data tests...                                             *
+ *                                                                      *
+ *      Each test defines the input parameters it needs.  Consult the   *
+ *      documentation in each class for details.  Default operations    *
+ *      for reading variable data and mesh refinement information       *
+ *      for data tests are provided in the PatchMultiblockTestStrategy        *
+ *      base class.  These input are typically read from the input      *
+ *      file section for each test.  In this case, the input data       *
+ *      keys are similar to the following example:                      *
+ *                                                                      *
+ *      VariableData {  // The variable sub-database                    *
+ *                      // (key name VariableData not optional)         *
+ *                                                                      *
+ *         variable_1 { // sub-database for first variable              *
+ *                      // (Key name for each variable can be anything. *
+ *                      //  Key names for variable parameters are       *
+ *                      //  not optional. However, only name data is    *
+ *                      //  required)                                   *
+ *            name = "var1"    // <string> variable name (required)     *
+ *            depth = 1        // <int> variable depth (opt. - def is 1)*
+ *            src_ghosts = 0,0,0 // <int array> for ghost width of      *
+ *                                  source data (opt. - def is 0,0,0)   *
+ *            dst_ghosts = 1,1,1 // <int array> for ghost width of      *
+ *                                  dest data (opt. - def is 0,0,0)     *
+ *            coarsen_operator = "CONSERVATIVE_COARSEN"                 *
+ *            refine_operator = "LINEAR_REFINE"                         *
+ *            // Interlevel transfer operator name strings are optional *
+ *            // Default are "NO_COARSEN", and "NO_REFINE", resp.       *
+ *         }                                                            *
+ *                                                                      *
+ *         // data for other variables as needed...                     *
+ *                                                                      *
+ *      }                                                               *
+ *                                                                      *
+ *      RefinementData {  // The variable sub-database                  *
+ *                        // (key name RefinementData not optional)     *
+ *                                                                      *
+ *         // Lists of boxes to refine on each level.  Names of box     *
+ *         // arrays may be anything.  For example,                     *
+ *                                                                      *
+ *           level0_boxes = [ (1,2,3) , (3,3,5) ]                       *
+ *           level1_boxes = [ (8,10,6) , (10,10,12) ]                   *
+ *           // other level box information as needed...                *
+ *      }                                                               *
+ *                                                                      *
+ *  NOTES:                                                              *
+ *                                                                      *
+ *     o The MultiblockTester uses the GriddingAlgorithm, and                 *
+ *       LoadBalancer class to construct the patch hierarchy.           *
+ *       Appropriate input sections must be provided for these objects  *
+ *       as needed.                                                     *
+ *                                                                      *
+ *     o Each test must register a GridGeometry object with the         *
+ *       PatchMultiblockTestStrategy base class so the hierarchy can be       *
+ *       constructed.  Consult the constructor of each test class       *
+ *       for inforamation about which geomteyr object is constructed,   *
+ *       and thus which input data is required to initialize the geom.  *
+ *                                                                      *
+ ************************************************************************
+ */
+
+int main(
+   int argc,
+   char* argv[])
+{
+
+   int return_val = 1;
+
+   /*
+    * Initialize MPI, SAMRAI, and enable logging.
+    */
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+      /*
+       * Process command line arguments.  For each run, the input
+       * filename must be specified.  Usage is:
+       *
+       *    executable <input file name>
+       *
+       */
+      string input_filename;
+
+      if (argc != 2) {
+         TBOX_ERROR("USAGE:  " << argv[0] << " <input file> \n"
+                                          << "  options:\n"
+                                          << "  none at this time" << endl);
+      } else {
+         input_filename = argv[1];
+      }
+
+      /*
+       * Create input database and parse all data in input file.
+       */
+
+      tbox::Pointer<tbox::Database> input_db(
+         new tbox::InputDatabase("input_db"));
+      tbox::InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      /*
+       * Retrieve "Main" section from input database.  Set log file
+       * parameters, number of times to run tests (for performance
+       * analysis), and read in test information.
+       */
+
+      tbox::Pointer<tbox::Database> main_db = input_db->getDatabase("Main");
+
+      const tbox::Dimension dim(static_cast<unsigned short>(main_db->getInteger("dim")));
+
+      string log_file_name = "component_test.log";
+      if (main_db->keyExists("log_file_name")) {
+         log_file_name = main_db->getString("log_file_name");
+      }
+      bool log_all_nodes = false;
+      if (main_db->keyExists("log_all_nodes")) {
+         log_all_nodes = main_db->getBool("log_all_nodes");
+      }
+      if (log_all_nodes) {
+         tbox::PIO::logAllNodes(log_file_name);
+      } else {
+         tbox::PIO::logOnlyNodeZero(log_file_name);
+      }
+
+      int ntimes_run = 1;
+      if (main_db->keyExists("ntimes_run")) {
+         ntimes_run = main_db->getInteger("ntimes_run");
+      }
+
+      string test_to_run;
+      if (main_db->keyExists("test_to_run")) {
+         test_to_run = main_db->getString("test_to_run");
+      } else {
+         TBOX_ERROR("Error in Main input: no test specified." << endl);
+      }
+
+      bool do_refine = true;
+      bool do_coarsen = false;
+
+      string refine_option = "INTERIOR_FROM_SAME_LEVEL";
+
+      tbox::plog << "\nPerforming refine data test..." << endl;
+      if (main_db->keyExists("refine_option")) {
+         refine_option = main_db->getString("refine_option");
+      }
+
+#if 1
+      if(0) {
+         /*
+          * For some reason, static members of GriddingAlgorithm* classes
+          * don't get created without this no-op block.  BTNG.
+          */
+         tbox::Pointer<mesh::GriddingAlgorithm> ga(
+            new mesh::GriddingAlgorithm(
+               tbox::Pointer<hier::PatchHierarchy>(),
+               std::string(),
+               tbox::Pointer<tbox::Database>(),
+               tbox::Pointer<mesh::TagAndInitializeStrategy>(),
+               tbox::Pointer<mesh::BoxGeneratorStrategy>(),
+               tbox::Pointer<mesh::LoadBalanceStrategy>() ));
+      }
+#endif
+      /*
+       * Create communication tester and patch data test object
+       */
+
+      PatchMultiblockTestStrategy* patch_data_test = NULL;
+
+      if (test_to_run == "CellMultiblockTest") {
+         patch_data_test = new CellMultiblockTest("CellMultiblockTest",
+               dim,
+               input_db,
+               do_refine,
+               do_coarsen,
+               refine_option);
+
+      } else if (test_to_run == "EdgeMultiblockTest") {
+         patch_data_test = new EdgeMultiblockTest("EdgeMultiblockTest",
+               dim,
+               input_db,
+               do_refine,
+               do_coarsen,
+               refine_option);
+      } else if (test_to_run == "FaceMultiblockTest") {
+         patch_data_test = new FaceMultiblockTest("FaceMultiblockTest",
+               dim,
+               input_db,
+               do_refine,
+               do_coarsen,
+               refine_option);
+      } else if (test_to_run == "NodeMultiblockTest") {
+         patch_data_test = new NodeMultiblockTest("NodeMultiblockTest",
+               dim,
+               input_db,
+               do_refine,
+               do_coarsen,
+               refine_option);
+      } else if (test_to_run == "SideMultiblockTest") {
+         patch_data_test = new SideMultiblockTest("SideMultiblockTest",
+               dim,
+               input_db,
+               do_refine,
+               do_coarsen,
+               refine_option);
+      } else if (test_to_run == "MultiVariableMultiblockTest") {
+         TBOX_ERROR("Error in Main input: no multi-variable test yet." << endl);
+      } else {
+         TBOX_ERROR("Error in Main input: illegal test = "
+            << test_to_run << endl);
+      }
+
+      tbox::Pointer<MultiblockTester> comm_tester(new MultiblockTester(
+                                                     "MultiblockTester",
+                                                     dim,
+                                                     input_db,
+                                                     patch_data_test,
+                                                     do_refine,
+                                                     do_coarsen,
+                                                     refine_option));
+
+      tbox::Pointer<mesh::StandardTagAndInitialize> cell_tagger(
+         new mesh::StandardTagAndInitialize(
+            dim,
+            "StandardTagggingAndInitializer",
+            comm_tester,
+            input_db->getDatabase("StandardTaggingAndInitializer")));
+
+      comm_tester->setupHierarchy(input_db, cell_tagger);
+
+      tbox::plog << "Specified input file is: " << input_filename << endl;
+
+      tbox::plog << "\nInput file data is ...." << endl;
+      input_db->printClassData(tbox::plog);
+
+      tbox::plog << "\nCheck Variable database..." << endl;
+      hier::VariableDatabase::getDatabase()->printClassData(tbox::plog);
+
+      /*
+       * Create timers from input data to check performance of comm. operations.
+       */
+
+      tbox::TimerManager::createManager(input_db->getDatabase("TimerManager"));
+
+      tbox::TimerManager* time_man = tbox::TimerManager::getManager();
+
+      tbox::Pointer<tbox::Timer> refine_create_time =
+         time_man->getTimer("test::main::createRefineSchedule");
+      tbox::Pointer<tbox::Timer> refine_comm_time =
+         time_man->getTimer("test::main::performRefineOperations");
+
+      tbox::Pointer<tbox::Timer> coarsen_create_time =
+         time_man->getTimer("test::main::createCoarsenSchedule");
+      tbox::Pointer<tbox::Timer> coarsen_comm_time =
+         time_man->getTimer("test::main::performCoarsenOperations");
+
+      tbox::TimerManager::getManager()->resetAllTimers();
+
+      /*
+       * Create communication schedules and perform communication operations.
+       */
+
+      tbox::Pointer<hier::MultiblockPatchHierarchy> patch_hierarchy =
+         comm_tester->getPatchHierarchy();
+
+      int nlevels = 0;
+
+      for (int nb = 0; nb < patch_hierarchy->getNumberOfBlocks(); nb++) {
+         int block_levels =
+            patch_hierarchy->getHierarchy(nb)->getNumberOfLevels();
+         if (block_levels > nlevels) {
+            nlevels = block_levels;
+         }
+      }
+
+      for (int n = 0; n < ntimes_run; n++) {
+
+         /*
+          * Create communication schedules for data refine tests.
+          */
+         refine_create_time->start();
+         for (int i = 0; i < nlevels; i++) {
+            comm_tester->createRefineSchedule(i);
+         }
+         refine_create_time->stop();
+
+         /*
+          * Perform refine data communication operations.
+          */
+         refine_comm_time->start();
+         for (int j = 0; j < nlevels; j++) {
+            comm_tester->performRefineOperations(j);
+         }
+         refine_comm_time->stop();
+
+      }
+
+      bool test_passed = comm_tester->verifyCommunicationResults();
+
+      /*
+       * Deallocate objects when done.
+       */
+
+      if (patch_data_test) delete patch_data_test;
+
+      comm_tester.setNull();
+
+      tbox::TimerManager::getManager()->print(tbox::plog);
+
+      if (test_passed) {
+         tbox::pout << "\nPASSED:  mblkcomm" << endl;
+         return_val = 0;
+      }
+
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return return_val;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/test_inputs/cell-2d-4blk.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/test_inputs/cell-2d-4blk.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,240 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+Main {
+    dim = 2
+//
+// Log file information
+//
+    log_file_name  = "cell-test.log"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//    
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+// 
+    test_to_run = "CellMultiblockTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//  
+// Either refine test or coarsen test can be run, but not both.  This 
+// ensures proper validation of communicated data.  Default test is 
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors 
+// from coarser levels.  Coarsen test has no options as coarse patch 
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+ 
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+    
+}
+
+CellMultiblockTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each 
+   //                 array value at initialization and 
+   //                 against which interpolation is tested) 
+   //   
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.  
+   // 
+   //    Required input:  name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "NO_COARSEN"
+         refine_operator = "NO_REFINE"
+      }
+   }
+
+   RefinementData {
+   }
+
+}
+
+BlockGridGeometry0 {
+   domain_boxes = [ (0,0) , (14,19) ]
+}
+BlockGridGeometry1 {
+   domain_boxes = [ (0,0) , (19,17) ]
+}
+BlockGridGeometry2 {
+   domain_boxes = [ (0,0) , (14,17) ]
+}
+BlockGridGeometry3 {
+   domain_boxes = [ (0,0) , (19,17) ]
+}
+
+MultiblockPatchHierarchy {
+   num_blocks = 4
+
+   Singularity0 {
+      blocks = 0,1,2
+
+      sing_box_0 = [(-1,20),(-1,20)]
+      sing_box_1 = [(20,-1),(20,-1)]
+      sing_box_2 = [(-1,-1),(-1,-1)]
+   }
+
+   Singularity1 {
+      blocks = 0,2,3
+
+      sing_box_0 = [(15,20),(15,20)]
+      sing_box_2 = [(15,-1),(15,-1)]
+      sing_box_3 = [(-1,-1),(-1,-1)]
+   }
+ 
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "J_DOWN", "I_UP"
+      point_in_a_space = 0,0
+      point_in_b_space = 0,-1
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      rotation_b_to_a = "I_UP", "J_UP"
+      point_in_a_space = 0,19
+      point_in_b_space = 0,-1
+   }
+
+   BlockNeighbors2 {
+      block_a = 0
+      block_b = 3
+
+      rotation_b_to_a = "J_UP", "I_DOWN"
+      point_in_a_space = 14,19
+      point_in_b_space = 0,-1
+   }
+
+   BlockNeighbors3 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "I_UP", "J_UP"
+      point_in_a_space = 19,0
+      point_in_b_space = -1,0
+   }
+
+   BlockNeighbors4 {
+      block_a = 2
+      block_b = 3
+
+      rotation_b_to_a = "I_UP", "J_UP"
+      point_in_a_space = 15,0
+      point_in_b_space = -1,0
+   }
+
+   // The PatchHierarchy DB initializes all hierarchies in the MB hierarchy.
+   PatchHierarchy {
+      max_levels              = 2 // Maximum number of levels in hierarchy.
+      ratio_to_coarser {         // vector ratio to next coarser level
+         level_1               =  2 , 2
+         level_2               =  2 , 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2, 2
+         // all finer levels will use same values as level_0...
+      }
+   }
+
+}
+
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE
+  barrier_before = FALSE
+  barrier_after = FALSE
+  n_root_cycles = 1
+  interlace_groups = FALSE
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'y'
+  print_steps = 'n'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (3,3) , (4,4) ]
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/test_inputs/cell-2d-5blk.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/test_inputs/cell-2d-5blk.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,278 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+Main {
+    dim = 2
+//
+// Log file information
+//
+    log_file_name  = "cell-test.log"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//    
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+// 
+    test_to_run = "CellMultiblockTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//  
+// Either refine test or coarsen test can be run, but not both.  This 
+// ensures proper validation of communicated data.  Default test is 
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors 
+// from coarser levels.  Coarsen test has no options as coarse patch 
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+ 
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+    
+}
+
+CellMultiblockTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each 
+   //                 array value at initialization and 
+   //                 against which interpolation is tested) 
+   //   
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.  
+   // 
+   //    Required input:  name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "NO_COARSEN"
+         refine_operator = "NO_REFINE"
+      }
+   }
+
+   RefinementData {
+   }
+
+}
+
+BlockGridGeometry0 {
+   domain_boxes = [ (0,0) , (19,19) ]
+}
+BlockGridGeometry1 {
+   domain_boxes = [ (0,0) , (19,19) ]
+}
+BlockGridGeometry2 {
+   domain_boxes = [ (0,0) , (19,19) ]
+}
+BlockGridGeometry3 {
+   domain_boxes = [ (0,0) , (19,19) ]
+}
+BlockGridGeometry4 {
+   domain_boxes = [ (0,0) , (19,19) ]
+}
+
+MultiblockPatchHierarchy {
+   num_blocks = 5
+
+   Singularity0 {
+      blocks = 0,1,2,3,4
+
+      sing_box_0 = [(20,20),(20,20)]
+      sing_box_1 = [(20,20),(20,20)]
+      sing_box_2 = [(20,-1),(20,-1)]
+      sing_box_3 = [(-1,-1),(-1,-1)]
+      sing_box_4 = [(-1,20),(-1,20)]
+   }
+ 
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "J_DOWN", "I_UP"
+      point_in_a_space = 20,0
+      point_in_b_space = 0,19
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      rotation_b_to_a = "J_UP", "I_DOWN"
+      point_in_a_space = 19,19
+      point_in_b_space = 20,-1
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors2 {
+      block_a = 0
+      block_b = 3
+
+      rotation_b_to_a = "I_UP", "J_UP"
+      point_in_a_space = 19,19
+      point_in_b_space = -1,-1
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors3 {
+      block_a = 0
+      block_b = 4
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN"
+      point_in_a_space = 0,19
+      point_in_b_space = 19,20
+
+   }
+
+   BlockNeighbors4 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN"
+      point_in_a_space = 19,0
+      point_in_b_space = 20,19
+
+   }
+
+   BlockNeighbors5 {
+      block_a = 1
+      block_b = 3
+
+      rotation_b_to_a = "I_UP", "J_UP"
+      point_in_a_space = 19,19
+      point_in_b_space = -1,-1
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors6 {
+      block_a = 1
+      block_b = 4
+
+      rotation_b_to_a = "J_DOWN", "I_UP"
+      point_in_a_space = 19,19
+      point_in_b_space = -1,20
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors7 {
+      block_a = 2
+      block_b = 3
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN"
+      point_in_a_space = 0,0
+      point_in_b_space = 19,-1
+
+   }
+
+   BlockNeighbors8 {
+      block_a = 2
+      block_b = 4
+
+      rotation_b_to_a = "I_UP", "J_UP"
+      point_in_a_space = 19,0
+      point_in_b_space = -1,20
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors9 {
+      block_a = 3
+      block_b = 4
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN"
+      point_in_a_space = 0,19
+      point_in_b_space = -1,0
+
+   }
+
+   PatchHierarchy {
+      max_levels              = 2 // Maximum number of levels in hierarchy.
+      ratio_to_coarser {         // vector ratio to next coarser level
+         level_1               =  2 , 2
+         level_2               =  2 , 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2, 2
+         // all finer levels will use same values as level_0...
+      }
+   }
+}
+
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+
+   sequentialize_patch_indices = TRUE
+}
+
+TreeLoadBalancer {
+// processors      = 1 , 1 
+   use_spatial_bin_pack = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (9,9) , (10,10) ]
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/test_inputs/cell-3d-5blk.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/test_inputs/cell-3d-5blk.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,277 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+Main {
+    dim = 3
+//
+// Log file information
+//
+    log_file_name  = "cell-test.log"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//    
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+// 
+    test_to_run = "CellMultiblockTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//  
+// Either refine test or coarsen test can be run, but not both.  This 
+// ensures proper validation of communicated data.  Default test is 
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors 
+// from coarser levels.  Coarsen test has no options as coarse patch 
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+ 
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+    
+}
+
+CellMultiblockTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each 
+   //                 array value at initialization and 
+   //                 against which interpolation is tested) 
+   //   
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.  
+   // 
+   //    Required input:  name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,0
+         coarsen_operator = "NO_COARSEN"
+         refine_operator = "NO_REFINE"
+      }
+   }
+
+   RefinementData {
+   }
+
+}
+
+BlockGridGeometry0 {
+   domain_boxes = [ (0,0,0) , (19,19,14) ]
+}
+BlockGridGeometry1 {
+   domain_boxes = [ (0,0,0) , (19,14,19) ]
+}
+BlockGridGeometry2 {
+   domain_boxes = [ (0,0,0) , (19,19,14) ]
+}
+BlockGridGeometry3 {
+   domain_boxes = [ (0,0,0) , (19,19,14) ]
+}
+BlockGridGeometry4 {
+   domain_boxes = [ (0,0,0) , (19,19,14) ]
+}
+
+MultiblockPatchHierarchy {
+   num_blocks = 5
+
+   Singularity0 {
+      blocks = 0,1,2,3,4
+
+      sing_box_0 = [(20,20,0),(20,20,14)]
+      sing_box_1 = [(20,0,20),(20,14,20)]
+      sing_box_2 = [(20,-1,0),(20,-1,14)]
+      sing_box_3 = [(-1,-1,0),(-1,-1,14)]
+      sing_box_4 = [(-1,20,0),(-1,20,14)]
+   }
+ 
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "I_DOWN", "K_UP", "J_UP"
+      point_in_a_space = 20,0,0
+      point_in_b_space = 19,0,0
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      rotation_b_to_a = "J_UP", "I_DOWN", "K_UP"
+      point_in_a_space = 19,19,0
+      point_in_b_space = 20,-1,0
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors2 {
+      block_a = 0
+      block_b = 3
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 19,19,0
+      point_in_b_space = -1,-1,0
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors3 {
+      block_a = 0
+      block_b = 4
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN", "K_UP"
+      point_in_a_space = 0,19,0
+      point_in_b_space = 19,20,0
+
+   }
+
+   BlockNeighbors4 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "J_DOWN", "K_UP", "I_DOWN"
+      point_in_a_space = 19,0,0
+      point_in_b_space = 0,0,19
+
+   }
+
+   BlockNeighbors5 {
+      block_a = 1
+      block_b = 3
+
+      rotation_b_to_a = "J_UP", "K_UP", "I_UP"
+      point_in_a_space = 19,0,19
+      point_in_b_space = -1,-1,0
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors6 {
+      block_a = 1
+      block_b = 4
+
+      rotation_b_to_a = "I_UP", "K_UP", "J_DOWN"
+      point_in_a_space = 19,0,19
+      point_in_b_space = -1,20,0
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors7 {
+      block_a = 2
+      block_b = 3
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN", "K_UP"
+      point_in_a_space = 0,0,0
+      point_in_b_space = 19,-1,0
+
+   }
+
+   BlockNeighbors8 {
+      block_a = 2
+      block_b = 4
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 19,0,0
+      point_in_b_space = -1,20,0
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors9 {
+      block_a = 3
+      block_b = 4
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN", "K_UP"
+      point_in_a_space = 0,19,0
+      point_in_b_space = -1,0,0
+
+   }
+
+   PatchHierarchy {
+      max_levels              = 2 // Maximum number of levels in hierarchy.
+      ratio_to_coarser {         // vector ratio to next coarser level
+         level_1               =  2 , 2, 2
+         level_2               =  2 , 2, 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2, 2, 2
+         // all finer levels will use same values as level_0...
+      }
+   }
+
+}
+
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+TreeLoadBalancer {
+// processors      = 1 , 1 
+   use_spatial_bin_pack = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (9,9,9) , (10,10,10) ]
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/test_inputs/cell-3d-full.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/test_inputs/cell-3d-full.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,516 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+Main {
+    dim = 3
+//
+// Log file information
+//
+    log_file_name  = "cell-test.log"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//    
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+// 
+    test_to_run = "CellMultiblockTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//  
+// Either refine test or coarsen test can be run, but not both.  This 
+// ensures proper validation of communicated data.  Default test is 
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors 
+// from coarser levels.  Coarsen test has no options as coarse patch 
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+ 
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+    
+}
+
+CellMultiblockTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each 
+   //                 array value at initialization and 
+   //                 against which interpolation is tested) 
+   //   
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.  
+   // 
+   //    Required input:  name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "NO_COARSEN"
+         refine_operator = "NO_REFINE"
+      }
+   }
+
+   RefinementData {
+   }
+
+}
+
+BlockGridGeometry0 {
+   domain_boxes = [ (0,0,0) , (14,14,14) ]
+}
+BlockGridGeometry1 {
+   domain_boxes = [ (0,0,0) , (14,14,14) ]
+}
+BlockGridGeometry2 {
+   domain_boxes = [ (0,0,0) , (14,14,14) ]
+}
+BlockGridGeometry3 {
+   domain_boxes = [ (0,0,0) , (14,14,14) ]
+}
+BlockGridGeometry4 {
+   domain_boxes = [ (0,0,0) , (14,14,14) ]
+}
+BlockGridGeometry5 {
+   domain_boxes = [ (0,0,0) , (14,14,14) ]
+}
+BlockGridGeometry6 {
+   domain_boxes = [ (0,0,0) , (14,14,14) ]
+}
+
+MultiblockPatchHierarchy {
+   num_blocks = 7
+
+   Singularity0 {
+      blocks = 0,1,2
+
+      sing_box_0 = [(15,15,0),(15,15,14)]
+      sing_box_1 = [(15,-1,0),(15,-1,14)]
+      sing_box_2 = [(-1,-1,0),(-1,-1,14)]
+   }
+
+   Singularity1 {
+      blocks = 0,1,3
+
+      sing_box_0 = [(0,15,15),(14,15,15)]
+      sing_box_1 = [(0,-1,15),(14,-1,15)]
+      sing_box_3 = [(0,-1,-1),(14,-1,-1)]
+   }
+ 
+   Singularity2 {
+      blocks = 0,1,4
+
+      sing_box_0 = [(0,15,-1),(14,15,-1)]
+      sing_box_1 = [(0,-1,-1),(14,-1,-1)]
+      sing_box_4 = [(0,-1,15),(14,-1,15)]
+   }
+ 
+   Singularity3 {
+      blocks = 0,1,6
+
+      sing_box_0 = [(-1,15,0),(-1,15,14)]
+      sing_box_1 = [(-1,-1,0),(-1,-1,14)]
+      sing_box_6 = [(15,-1,0),(15,-1,14)]
+   }
+ 
+   Singularity4 {
+      blocks = 0,2,3
+
+      sing_box_0 = [(15,0,15),(15,14,15)]
+      sing_box_2 = [(0,-1,15),(14,-1,15)]
+      sing_box_3 = [(15,-1,0),(15,-1,14)]
+   }
+ 
+   Singularity5 {
+      blocks = 0,2,4
+
+      sing_box_0 = [(15,0,-1),(15,14,-1)]
+      sing_box_2 = [(0,-1,-1),(14,-1,-1)]
+      sing_box_4 = [(15,-1,0),(15,-1,14)]
+   }
+ 
+   Singularity6 {
+      blocks = 0,2,5
+
+      sing_box_0 = [(15,-1,0),(15,-1,14)]
+      sing_box_2 = [(15,-1,0),(15,-1,14)]
+      sing_box_5 = [(15,-1,0),(15,-1,14)]
+   }
+ 
+   Singularity7 {
+      blocks = 0,3,5
+
+      sing_box_0 = [(0,-1,15),(14,-1,15)]
+      sing_box_3 = [(0,-1,15),(14,-1,15)]
+      sing_box_5 = [(0,-1,-1),(14,-1,-1)]
+   }
+ 
+   Singularity8 {
+      blocks = 0,3,6
+
+      sing_box_0 = [(-1,0,15),(-1,14,15)]
+      sing_box_3 = [(-1,-1,0),(-1,-1,14)]
+      sing_box_6 = [(0,-1,15),(14,-1,15)]
+   }
+ 
+   Singularity9 {
+      blocks = 0,4,5
+
+      sing_box_0 = [(0,-1,-1),(14,-1,-1)]
+      sing_box_4 = [(0,-1,-1),(14,-1,-1)]
+      sing_box_5 = [(0,-1,15),(14,-1,15)]
+   }
+ 
+   Singularity10 {
+      blocks = 0,4,6
+
+      sing_box_0 = [(-1,0,-1),(-1,14,-1)]
+      sing_box_4 = [(-1,-1,0),(-1,-1,14)]
+      sing_box_6 = [(0,-1,-1),(14,-1,-1)]
+   }
+ 
+   Singularity11 {
+      blocks = 0,5,6
+
+      sing_box_0 = [(-1,-1,0),(-1,-1,14)]
+      sing_box_5 = [(-1,-1,0),(-1,-1,14)]
+      sing_box_6 = [(-1,-1,0),(-1,-1,14)]
+   }
+ 
+   Singularity12 {
+      blocks = 1,2,3
+
+      sing_box_1 = [(15,0,15),(15,14,15)]
+      sing_box_2 = [(-1,0,15),(-1,14,15)]
+      sing_box_3 = [(15,0,-1),(15,14,-1)]
+   }
+ 
+   Singularity13 {
+      blocks = 1,2,4
+
+      sing_box_1 = [(15,0,-1),(15,14,-1)]
+      sing_box_2 = [(-1,0,-1),(-1,14,-1)]
+      sing_box_4 = [(15,0,15),(15,14,15)]
+   }
+ 
+   Singularity14 {
+      blocks = 1,3,6
+
+      sing_box_1 = [(-1,0,15),(-1,14,15)]
+      sing_box_3 = [(-1,0,-1),(-1,14,-1)]
+      sing_box_6 = [(15,0,15),(15,14,15)]
+   }
+ 
+   Singularity15 {
+      blocks = 1,4,6
+
+      sing_box_1 = [(-1,0,-1),(-1,14,-1)]
+      sing_box_4 = [(-1,0,15),(-1,14,15)]
+      sing_box_6 = [(15,0,-1),(15,14,-1)]
+   }
+ 
+   Singularity16 {
+      blocks = 2,3,5
+
+      sing_box_2 = [(15,0,15),(15,14,15)]
+      sing_box_3 = [(15,0,15),(15,14,15)]
+      sing_box_5 = [(15,0,-1),(15,14,-1)]
+   }
+ 
+   Singularity17 {
+      blocks = 2,4,5
+
+      sing_box_2 = [(15,0,-1),(15,14,-1)]
+      sing_box_4 = [(15,0,-1),(15,14,-1)]
+      sing_box_5 = [(15,0,15),(15,14,15)]
+   }
+ 
+   Singularity18 {
+      blocks = 3,5,6
+
+      sing_box_3 = [(-1,0,15),(-1,14,15)]
+      sing_box_5 = [(-1,0,-1),(-1,14,-1)]
+      sing_box_6 = [(-1,0,15),(-1,14,15)]
+   }
+ 
+   Singularity19 {
+      blocks = 4,5,6
+
+      sing_box_4 = [(-1,0,-1),(-1,14,-1)]
+      sing_box_5 = [(-1,0,15),(-1,14,15)]
+      sing_box_6 = [(-1,0,-1),(-1,14,-1)]
+   }
+ 
+   Singularity20 {
+      blocks = 0,1,2,3
+
+      sing_box_0 = [(15,15,15),(15,15,15)]
+      sing_box_1 = [(15,-1,15),(15,-1,15)]
+      sing_box_2 = [(-1,-1,15),(-1,-1,15)]
+      sing_box_3 = [(15,-1,-1),(15,-1,-1)]
+   }
+ 
+   Singularity21 {
+      blocks = 0,1,2,4
+
+      sing_box_0 = [(15,15,-1),(15,15,-1)]
+      sing_box_1 = [(15,-1,-1),(15,-1,-1)]
+      sing_box_2 = [(-1,-1,-1),(-1,-1,-1)]
+      sing_box_4 = [(15,-1,15),(15,-1,15)]
+   }
+
+   Singularity22 {
+      blocks = 0,1,3,6
+
+      sing_box_0 = [(-1,15,15),(-1,15,15)]
+      sing_box_1 = [(-1,-1,15),(-1,-1,15)]
+      sing_box_3 = [(-1,-1,-1),(-1,-1,-1)]
+      sing_box_6 = [(15,-1,15),(15,-1,15)]
+   }
+
+   Singularity23 {
+      blocks = 0,1,4,6
+
+      sing_box_0 = [(-1,15,-1),(-1,15,-1)]
+      sing_box_1 = [(-1,-1,-1),(-1,-1,-1)]
+      sing_box_4 = [(-1,-1,15),(-1,-1,15)]
+      sing_box_6 = [(15,-1,-1),(15,-1,-1)]
+   }
+
+   Singularity24 {
+      blocks = 0,2,3,5
+
+      sing_box_0 = [(15,-1,15),(15,-1,15)]
+      sing_box_2 = [(15,-1,15),(15,-1,15)]
+      sing_box_3 = [(15,-1,15),(15,-1,15)]
+      sing_box_5 = [(15,-1,-1),(15,-1,-1)]
+   }
+
+   Singularity25 {
+      blocks = 0,2,4,5
+
+      sing_box_0 = [(15,-1,-1),(15,-1,-1)]
+      sing_box_2 = [(15,-1,-1),(15,-1,-1)]
+      sing_box_4 = [(15,-1,-1),(15,-1,-1)]
+      sing_box_5 = [(15,-1,15),(15,-1,15)]
+   }
+
+   Singularity26 {
+      blocks = 0,3,5,6
+
+      sing_box_0 = [(-1,-1,15),(-1,-1,15)]
+      sing_box_3 = [(-1,-1,15),(-1,-1,15)]
+      sing_box_5 = [(-1,-1,-1),(-1,-1,-1)]
+      sing_box_6 = [(-1,-1,15),(-1,-1,15)]
+   }
+
+   Singularity27 {
+      blocks = 0,4,5,6
+
+      sing_box_0 = [(-1,-1,-1),(-1,-1,-1)]
+      sing_box_4 = [(-1,-1,-1),(-1,-1,-1)]
+      sing_box_5 = [(-1,-1,15),(-1,-1,15)]
+      sing_box_6 = [(-1,-1,-1),(-1,-1,-1)]
+   }
+
+
+ 
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 0,14,0
+      point_in_b_space = 0,-1,0
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      rotation_b_to_a = "J_UP", "I_DOWN", "K_UP"
+      point_in_a_space = 14,0,0
+      point_in_b_space = 14,-1,0
+
+   }
+
+   BlockNeighbors2 {
+      block_a = 0
+      block_b = 3
+
+      rotation_b_to_a = "I_UP", "K_DOWN", "J_UP"
+      point_in_a_space = 14,14,14
+      point_in_b_space = 14,-1,0
+   }
+
+   BlockNeighbors3 {
+      block_a = 0
+      block_b = 4
+
+      rotation_b_to_a = "I_UP", "K_UP", "J_DOWN"
+      point_in_a_space = 0,0,0
+      point_in_b_space = 0,-1,0
+   }
+
+   BlockNeighbors4 {
+      block_a = 0
+      block_b = 5
+
+      rotation_b_to_a = "I_UP", "J_DOWN", "K_DOWN"
+      point_in_a_space = 0,0,0
+      point_in_b_space = 0,-1,14
+   }
+
+   BlockNeighbors5 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 14,14,14
+      point_in_b_space = -1,14,14
+   }
+
+   BlockNeighbors6 {
+      block_a = 1
+      block_b = 3
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 14,14,14
+      point_in_b_space = 14,14,-1
+   }
+
+   BlockNeighbors7 {
+      block_a = 1
+      block_b = 4
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 0,0,0
+      point_in_b_space = 0,0,15
+   }
+
+   BlockNeighbors8 {
+      block_a = 2
+      block_b = 3
+
+      rotation_b_to_a = "J_UP", "K_DOWN", "I_DOWN"
+      point_in_a_space = 0,0,14
+      point_in_b_space = 15,0,14
+   }
+
+   BlockNeighbors9 {
+      block_a = 2
+      block_b = 4
+
+      rotation_b_to_a = "K_DOWN", "J_UP", "I_UP"
+      point_in_a_space = 0,0,0
+      point_in_b_space = 15,0,14
+   }
+
+   BlockNeighbors10 {
+      block_a = 2
+      block_b = 5
+
+      rotation_b_to_a = "I_DOWN", "J_UP", "K_DOWN"
+      point_in_a_space = 14,0,14
+      point_in_b_space = 15,0,0
+   }
+
+   BlockNeighbors11 {
+      block_a = 3
+      block_b = 5
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 14,0,14
+      point_in_b_space = 14,0,-1
+   }
+
+   PatchHierarchy {
+      max_levels              = 2 // Maximum number of levels in hierarchy.
+      ratio_to_coarser {         // vector ratio to next coarser level
+         level_1               =  2 , 2 , 2
+         level_2               =  2 , 2 , 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2, 2, 2
+         // all finer levels will use same values as level_0...
+      }
+   }
+}
+
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+TreeLoadBalancer {
+// processors      = 1 , 1 
+   use_spatial_bin_pack = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (5,5,5) , (6,7,7) ]
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/test_inputs/cell-3d-half.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/test_inputs/cell-3d-half.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,413 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+Main {
+    dim = 3
+//
+// Log file information
+//
+    log_file_name  = "cell-test.log"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//    
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+// 
+    test_to_run = "CellMultiblockTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//  
+// Either refine test or coarsen test can be run, but not both.  This 
+// ensures proper validation of communicated data.  Default test is 
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors 
+// from coarser levels.  Coarsen test has no options as coarse patch 
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+ 
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+    
+}
+
+CellMultiblockTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each 
+   //                 array value at initialization and 
+   //                 against which interpolation is tested) 
+   //   
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.  
+   // 
+   //    Required input:  name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "NO_COARSEN"
+         refine_operator = "NO_REFINE"
+      }
+   }
+
+   RefinementData {
+   }
+
+}
+
+BlockGridGeometry0 {
+   domain_boxes = [ (0,0,0) , (14,14,14) ]
+}
+BlockGridGeometry1 {
+   domain_boxes = [ (0,0,0) , (14,14,14) ]
+}
+BlockGridGeometry2 {
+   domain_boxes = [ (0,0,0) , (14,14,14) ]
+}
+BlockGridGeometry3 {
+   domain_boxes = [ (0,0,0) , (14,14,14) ]
+}
+BlockGridGeometry4 {
+   domain_boxes = [ (0,0,0) , (14,14,14) ]
+}
+BlockGridGeometry5 {
+   domain_boxes = [ (0,0,0) , (14,14,14) ]
+}
+
+MultiblockPatchHierarchy {
+   num_blocks = 6
+
+   Singularity0 {
+      blocks = 0,1,2
+
+      sing_box_0 = [(15,15,0),(15,15,14)]
+      sing_box_1 = [(15,-1,0),(15,-1,14)]
+      sing_box_2 = [(-1,-1,0),(-1,-1,14)]
+   }
+
+   Singularity1 {
+      blocks = 0,1,3
+
+      sing_box_0 = [(0,15,15),(14,15,15)]
+      sing_box_1 = [(0,-1,15),(14,-1,15)]
+      sing_box_3 = [(0,-1,-1),(14,-1,-1)]
+   }
+ 
+   Singularity2 {
+      blocks = 0,1,4
+
+      sing_box_0 = [(0,15,-1),(14,15,-1)]
+      sing_box_1 = [(0,-1,-1),(14,-1,-1)]
+      sing_box_4 = [(0,-1,15),(14,-1,15)]
+   }
+ 
+   Singularity3 {
+      blocks = 0,2,3
+
+      sing_box_0 = [(15,0,15),(15,14,15)]
+      sing_box_2 = [(0,-1,15),(14,-1,15)]
+      sing_box_3 = [(15,-1,0),(15,-1,14)]
+   }
+ 
+   Singularity4 {
+      blocks = 0,2,4
+
+      sing_box_0 = [(15,0,-1),(15,14,-1)]
+      sing_box_2 = [(0,-1,-1),(14,-1,-1)]
+      sing_box_4 = [(15,-1,0),(15,-1,14)]
+   }
+ 
+   Singularity5 {
+      blocks = 0,2,5
+
+      sing_box_0 = [(15,-1,0),(15,-1,14)]
+      sing_box_2 = [(15,-1,0),(15,-1,14)]
+      sing_box_5 = [(15,-1,0),(15,-1,14)]
+   }
+ 
+   Singularity6 {
+      blocks = 0,3,5
+
+      sing_box_0 = [(0,-1,15),(14,-1,15)]
+      sing_box_3 = [(0,-1,15),(14,-1,15)]
+      sing_box_5 = [(0,-1,-1),(14,-1,-1)]
+   }
+ 
+   Singularity7 {
+      blocks = 0,4,5
+
+      sing_box_0 = [(0,-1,-1),(14,-1,-1)]
+      sing_box_4 = [(0,-1,-1),(14,-1,-1)]
+      sing_box_5 = [(0,-1,15),(14,-1,15)]
+   }
+ 
+   Singularity8 {
+      blocks = 1,2,3
+
+      sing_box_1 = [(15,0,15),(15,14,15)]
+      sing_box_2 = [(-1,0,15),(-1,14,15)]
+      sing_box_3 = [(15,0,-1),(15,14,-1)]
+   }
+ 
+   Singularity9 {
+      blocks = 1,2,4
+
+      sing_box_1 = [(15,0,-1),(15,14,-1)]
+      sing_box_2 = [(-1,0,-1),(-1,14,-1)]
+      sing_box_4 = [(15,0,15),(15,14,15)]
+   }
+ 
+   Singularity10 {
+      blocks = 2,3,5
+
+      sing_box_2 = [(15,0,15),(15,14,15)]
+      sing_box_3 = [(15,0,15),(15,14,15)]
+      sing_box_5 = [(15,0,-1),(15,14,-1)]
+   }
+ 
+   Singularity11 {
+      blocks = 2,4,5
+
+      sing_box_2 = [(15,0,-1),(15,14,-1)]
+      sing_box_4 = [(15,0,-1),(15,14,-1)]
+      sing_box_5 = [(15,0,15),(15,14,15)]
+   }
+ 
+   Singularity12 {
+      blocks = 0,1,2,3
+
+      sing_box_0 = [(15,15,15),(15,15,15)]
+      sing_box_1 = [(15,-1,15),(15,-1,15)]
+      sing_box_2 = [(-1,-1,15),(-1,-1,15)]
+      sing_box_3 = [(15,-1,-1),(15,-1,-1)]
+   }
+ 
+   Singularity13 {
+      blocks = 0,1,2,4
+
+      sing_box_0 = [(15,15,-1),(15,15,-1)]
+      sing_box_1 = [(15,-1,-1),(15,-1,-1)]
+      sing_box_2 = [(-1,-1,-1),(-1,-1,-1)]
+      sing_box_4 = [(15,-1,15),(15,-1,15)]
+   }
+
+   Singularity14 {
+      blocks = 0,2,3,5
+
+      sing_box_0 = [(15,-1,15),(15,-1,15)]
+      sing_box_2 = [(15,-1,15),(15,-1,15)]
+      sing_box_3 = [(15,-1,15),(15,-1,15)]
+      sing_box_5 = [(15,-1,-1),(15,-1,-1)]
+   }
+
+   Singularity15 {
+      blocks = 0,2,4,5
+
+      sing_box_0 = [(15,-1,-1),(15,-1,-1)]
+      sing_box_2 = [(15,-1,-1),(15,-1,-1)]
+      sing_box_4 = [(15,-1,-1),(15,-1,-1)]
+      sing_box_5 = [(15,-1,15),(15,-1,15)]
+   }
+
+
+ 
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 0,14,0
+      point_in_b_space = 0,-1,0
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      rotation_b_to_a = "J_UP", "I_DOWN", "K_UP"
+      point_in_a_space = 14,0,0
+      point_in_b_space = 14,-1,0
+
+   }
+
+   BlockNeighbors2 {
+      block_a = 0
+      block_b = 3
+
+      rotation_b_to_a = "I_UP", "K_DOWN", "J_UP"
+      point_in_a_space = 14,14,14
+      point_in_b_space = 14,-1,0
+   }
+
+   BlockNeighbors3 {
+      block_a = 0
+      block_b = 4
+
+      rotation_b_to_a = "I_UP", "K_UP", "J_DOWN"
+      point_in_a_space = 0,0,0
+      point_in_b_space = 0,-1,0
+   }
+
+   BlockNeighbors4 {
+      block_a = 0
+      block_b = 5
+
+      rotation_b_to_a = "I_UP", "J_DOWN", "K_DOWN"
+      point_in_a_space = 0,0,0
+      point_in_b_space = 0,-1,14
+   }
+
+   BlockNeighbors5 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 14,14,14
+      point_in_b_space = -1,14,14
+   }
+
+   BlockNeighbors6 {
+      block_a = 1
+      block_b = 3
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 14,14,14
+      point_in_b_space = 14,14,-1
+   }
+
+   BlockNeighbors7 {
+      block_a = 1
+      block_b = 4
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 0,0,0
+      point_in_b_space = 0,0,15
+   }
+
+   BlockNeighbors8 {
+      block_a = 2
+      block_b = 3
+
+      rotation_b_to_a = "J_UP", "K_DOWN", "I_DOWN"
+      point_in_a_space = 0,0,14
+      point_in_b_space = 15,0,14
+   }
+
+   BlockNeighbors9 {
+      block_a = 2
+      block_b = 4
+
+      rotation_b_to_a = "K_DOWN", "J_UP", "I_UP"
+      point_in_a_space = 0,0,0
+      point_in_b_space = 15,0,14
+   }
+
+   BlockNeighbors10 {
+      block_a = 2
+      block_b = 5
+
+      rotation_b_to_a = "I_DOWN", "J_UP", "K_DOWN"
+      point_in_a_space = 14,0,14
+      point_in_b_space = 15,0,0
+   }
+
+   BlockNeighbors11 {
+      block_a = 3
+      block_b = 5
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 14,0,14
+      point_in_b_space = 14,0,-1
+   }
+
+   PatchHierarchy {
+      max_levels              = 2 // Maximum number of levels in hierarchy.
+      ratio_to_coarser {         // vector ratio to next coarser level
+         level_1               =  2 , 2 , 2
+         level_2               =  2 , 2 , 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2, 2, 2
+         // all finer levels will use same values as level_0...
+      }
+   }
+}
+
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+TreeLoadBalancer {
+// processors      = 1 , 1 
+   use_spatial_bin_pack = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (5,5,5) , (6,7,7) ]
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/test_inputs/cell-3d-oct.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/test_inputs/cell-3d-oct.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,260 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+Main {
+    dim = 3
+//
+// Log file information
+//
+    log_file_name  = "cell-test.log"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//    
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+// 
+    test_to_run = "CellMultiblockTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//  
+// Either refine test or coarsen test can be run, but not both.  This 
+// ensures proper validation of communicated data.  Default test is 
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors 
+// from coarser levels.  Coarsen test has no options as coarse patch 
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+ 
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+    
+}
+
+CellMultiblockTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each 
+   //                 array value at initialization and 
+   //                 against which interpolation is tested) 
+   //   
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.  
+   // 
+   //    Required input:  name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "NO_COARSEN"
+         refine_operator = "NO_REFINE"
+      }
+   }
+
+   RefinementData {
+   }
+
+}
+
+BlockGridGeometry0 {
+   domain_boxes = [ (0,0,0) , (14,14,14) ]
+}
+BlockGridGeometry1 {
+   domain_boxes = [ (0,0,0) , (14,14,14) ]
+}
+BlockGridGeometry2 {
+   domain_boxes = [ (0,0,0) , (14,14,14) ]
+}
+BlockGridGeometry3 {
+   domain_boxes = [ (0,0,0) , (14,14,14) ]
+}
+
+MultiblockPatchHierarchy {
+   num_blocks = 4
+
+   Singularity0 {
+      blocks = 0,1,2
+
+      sing_box_0 = [(15,15,0),(15,15,14)]
+      sing_box_1 = [(15,-1,0),(15,-1,14)]
+      sing_box_2 = [(-1,-1,0),(-1,-1,14)]
+   }
+
+   Singularity1 {
+      blocks = 0,1,3
+
+      sing_box_0 = [(0,15,15),(14,15,15)]
+      sing_box_1 = [(0,-1,15),(14,-1,15)]
+      sing_box_3 = [(0,-1,-1),(14,-1,-1)]
+   }
+ 
+   Singularity2 {
+      blocks = 0,2,3
+
+      sing_box_0 = [(15,0,15),(15,14,15)]
+      sing_box_2 = [(0,-1,15),(14,-1,15)]
+      sing_box_3 = [(15,-1,0),(15,-1,14)]
+   }
+ 
+   Singularity3 {
+      blocks = 1,2,3
+
+      sing_box_1 = [(15,0,15),(15,14,15)]
+      sing_box_2 = [(-1,0,15),(-1,14,15)]
+      sing_box_3 = [(15,0,-1),(15,14,-1)]
+   }
+ 
+   Singularity4 {
+      blocks = 0,1,2,3
+
+      sing_box_0 = [(15,15,15),(15,15,15)]
+      sing_box_1 = [(15,-1,15),(15,-1,15)]
+      sing_box_2 = [(-1,-1,15),(-1,-1,15)]
+      sing_box_3 = [(15,-1,-1),(15,-1,-1)]
+   }
+ 
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 0,14,0
+      point_in_b_space = 0,-1,0
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      rotation_b_to_a = "J_UP", "I_DOWN", "K_UP"
+      point_in_a_space = 14,0,0
+      point_in_b_space = 14,-1,0
+
+   }
+
+   BlockNeighbors2 {
+      block_a = 0
+      block_b = 3
+
+      rotation_b_to_a = "I_UP", "K_DOWN", "J_UP"
+      point_in_a_space = 14,14,14
+      point_in_b_space = 14,-1,0
+   }
+
+   BlockNeighbors3 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 14,14,14
+      point_in_b_space = -1,14,14
+   }
+
+   BlockNeighbors4 {
+      block_a = 1
+      block_b = 3
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 14,14,14
+      point_in_b_space = 14,14,-1
+   }
+
+   BlockNeighbors5 {
+      block_a = 2
+      block_b = 3
+
+      rotation_b_to_a = "J_UP", "K_DOWN", "I_DOWN"
+      point_in_a_space = 0,0,14
+      point_in_b_space = 15,0,14
+   }
+
+   PatchHierarchy {
+      max_levels              = 2 // Maximum number of levels in hierarchy.
+      ratio_to_coarser {         // vector ratio to next coarser level
+         level_1               =  2 , 2 , 2
+         level_2               =  2 , 2 , 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2, 2, 2
+         // all finer levels will use same values as level_0...
+      }
+   }
+}
+
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+TreeLoadBalancer {
+// processors      = 1 , 1 
+   use_spatial_bin_pack = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (5,5,5) , (6,7,7) ]
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/test_inputs/cell-3d-quad.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/test_inputs/cell-3d-quad.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,325 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+Main {
+    dim = 3
+//
+// Log file information
+//
+    log_file_name  = "cell-test.log"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//    
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+// 
+    test_to_run = "CellMultiblockTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//  
+// Either refine test or coarsen test can be run, but not both.  This 
+// ensures proper validation of communicated data.  Default test is 
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors 
+// from coarser levels.  Coarsen test has no options as coarse patch 
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+ 
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+    
+}
+
+CellMultiblockTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each 
+   //                 array value at initialization and 
+   //                 against which interpolation is tested) 
+   //   
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.  
+   // 
+   //    Required input:  name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "NO_COARSEN"
+         refine_operator = "NO_REFINE"
+      }
+   }
+
+   RefinementData {
+   }
+
+}
+
+BlockGridGeometry0 {
+   domain_boxes = [ (0,0,0) , (14,14,14) ]
+}
+BlockGridGeometry1 {
+   domain_boxes = [ (0,0,0) , (14,14,14) ]
+}
+BlockGridGeometry2 {
+   domain_boxes = [ (0,0,0) , (14,14,14) ]
+}
+BlockGridGeometry3 {
+   domain_boxes = [ (0,0,0) , (14,14,14) ]
+}
+BlockGridGeometry4 {
+   domain_boxes = [ (0,0,0) , (14,14,14) ]
+}
+
+MultiblockPatchHierarchy {
+   num_blocks = 5
+
+   Singularity0 {
+      blocks = 0,1,2
+
+      sing_box_0 = [(15,15,0),(15,15,14)]
+      sing_box_1 = [(15,-1,0),(15,-1,14)]
+      sing_box_2 = [(-1,-1,0),(-1,-1,14)]
+   }
+
+   Singularity1 {
+      blocks = 0,1,3
+
+      sing_box_0 = [(0,15,15),(14,15,15)]
+      sing_box_1 = [(0,-1,15),(14,-1,15)]
+      sing_box_3 = [(0,-1,-1),(14,-1,-1)]
+   }
+ 
+   Singularity2 {
+      blocks = 0,1,4
+
+      sing_box_0 = [(0,15,-1),(14,15,-1)]
+      sing_box_1 = [(0,-1,-1),(14,-1,-1)]
+      sing_box_4 = [(0,-1,15),(14,-1,15)]
+   }
+ 
+   Singularity3 {
+      blocks = 0,2,3
+
+      sing_box_0 = [(15,0,15),(15,14,15)]
+      sing_box_2 = [(0,-1,15),(14,-1,15)]
+      sing_box_3 = [(15,-1,0),(15,-1,14)]
+   }
+ 
+   Singularity4 {
+      blocks = 0,2,4
+
+      sing_box_0 = [(15,0,-1),(15,14,-1)]
+      sing_box_2 = [(0,-1,-1),(14,-1,-1)]
+      sing_box_4 = [(15,-1,0),(15,-1,14)]
+   }
+ 
+   Singularity5 {
+      blocks = 1,2,3
+
+      sing_box_1 = [(15,0,15),(15,14,15)]
+      sing_box_2 = [(-1,0,15),(-1,14,15)]
+      sing_box_3 = [(15,0,-1),(15,14,-1)]
+   }
+ 
+   Singularity6 {
+      blocks = 1,2,4
+
+      sing_box_1 = [(15,0,-1),(15,14,-1)]
+      sing_box_2 = [(-1,0,-1),(-1,14,-1)]
+      sing_box_4 = [(15,0,15),(15,14,15)]
+   }
+ 
+   Singularity7 {
+      blocks = 0,1,2,3
+
+      sing_box_0 = [(15,15,15),(15,15,15)]
+      sing_box_1 = [(15,-1,15),(15,-1,15)]
+      sing_box_2 = [(-1,-1,15),(-1,-1,15)]
+      sing_box_3 = [(15,-1,-1),(15,-1,-1)]
+   }
+ 
+   Singularity8 {
+      blocks = 0,1,2,4
+
+      sing_box_0 = [(15,15,-1),(15,15,-1)]
+      sing_box_1 = [(15,-1,-1),(15,-1,-1)]
+      sing_box_2 = [(-1,-1,-1),(-1,-1,-1)]
+      sing_box_4 = [(15,-1,15),(15,-1,15)]
+   }
+
+ 
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 0,14,0
+      point_in_b_space = 0,-1,0
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      rotation_b_to_a = "J_UP", "I_DOWN", "K_UP"
+      point_in_a_space = 14,0,0
+      point_in_b_space = 14,-1,0
+
+   }
+
+   BlockNeighbors2 {
+      block_a = 0
+      block_b = 3
+
+      rotation_b_to_a = "I_UP", "K_DOWN", "J_UP"
+      point_in_a_space = 14,14,14
+      point_in_b_space = 14,-1,0
+   }
+
+   BlockNeighbors3 {
+      block_a = 0
+      block_b = 4
+
+      rotation_b_to_a = "I_UP", "K_UP", "J_DOWN"
+      point_in_a_space = 0,0,0
+      point_in_b_space = 0,-1,0
+   }
+
+   BlockNeighbors4 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 14,14,14
+      point_in_b_space = -1,14,14
+   }
+
+   BlockNeighbors5 {
+      block_a = 1
+      block_b = 3
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 14,14,14
+      point_in_b_space = 14,14,-1
+   }
+
+   BlockNeighbors6 {
+      block_a = 1
+      block_b = 4
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 0,0,0
+      point_in_b_space = 0,0,15
+   }
+
+   BlockNeighbors7 {
+      block_a = 2
+      block_b = 3
+
+      rotation_b_to_a = "J_UP", "K_DOWN", "I_DOWN"
+      point_in_a_space = 0,0,14
+      point_in_b_space = 15,0,14
+   }
+
+   BlockNeighbors8 {
+      block_a = 2
+      block_b = 4
+
+      rotation_b_to_a = "K_DOWN", "J_UP", "I_UP"
+      point_in_a_space = 0,0,0
+      point_in_b_space = 15,0,14
+   }
+
+   PatchHierarchy {
+      max_levels              = 2 // Maximum number of levels in hierarchy.
+      ratio_to_coarser {         // vector ratio to next coarser level
+         level_1               =  2 , 2 , 2
+         level_2               =  2 , 2 , 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2, 2, 2
+         // all finer levels will use same values as level_0...
+      }
+   }
+
+}
+
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+TreeLoadBalancer {
+// processors      = 1 , 1 
+   use_spatial_bin_pack = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (5,5,5) , (6,7,7) ]
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/test_inputs/cell.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/test_inputs/cell.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,200 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+Main {
+    dim = 2
+//
+// Log file information
+//
+    log_file_name  = "cell-test.log"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//    
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+// 
+    test_to_run = "CellMultiblockTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//  
+// Either refine test or coarsen test can be run, but not both.  This 
+// ensures proper validation of communicated data.  Default test is 
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors 
+// from coarser levels.  Coarsen test has no options as coarse patch 
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+ 
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+    
+}
+
+CellMultiblockTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each 
+   //                 array value at initialization and 
+   //                 against which interpolation is tested) 
+   //   
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.  
+   // 
+   //    Required input:  name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "NO_COARSEN"
+         refine_operator = "NO_REFINE"
+      }
+   }
+
+   RefinementData {
+   }
+
+}
+
+BlockGridGeometry0 {
+   domain_boxes = [ (0,0) , (20,13) ]
+}
+BlockGridGeometry1 {
+   domain_boxes = [ (0,0) , (25,13) ]
+}
+BlockGridGeometry2 {
+   domain_boxes = [ (0,0) , (20,25) ]
+}
+
+MultiblockPatchHierarchy {
+   num_blocks = 3
+
+   Singularity0 {
+      blocks = 0,1,2
+
+      sing_box_0 = [(21,14),(21,14)]
+      sing_box_1 = [(-1,14),(-1,14)]
+      sing_box_2 = [(21,-1),(21,-1)]
+   }
+ 
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "I_UP", "J_UP"
+      point_in_a_space = 21,0
+      point_in_b_space = 0,0
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      rotation_b_to_a = "I_UP", "J_UP"
+      point_in_a_space = 0,14
+      point_in_b_space = 0,0
+
+   }
+
+   BlockNeighbors2 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "J_UP", "I_DOWN"
+      point_in_a_space = 0,14
+      point_in_b_space = 20,0
+
+   }
+
+   PatchHierarchy {
+      max_levels              = 2 // Maximum number of levels in hierarchy.
+      ratio_to_coarser {         // vector ratio to next coarser level
+         level_1               =  2 , 2
+         level_2               =  2 , 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2, 2
+         // all finer levels will use same values as level_0...
+      }
+   }
+}
+
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+
+   sequentialize_patch_indices = TRUE
+}
+
+TreeLoadBalancer {
+// processors      = 1 , 1 
+   use_spatial_bin_pack = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (3,3) , (4,4) ]
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/test_inputs/cell.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/test_inputs/cell.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,198 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+Main {
+    dim = 3
+//
+// Log file information
+//
+    log_file_name  = "cell-test.log"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//    
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+// 
+    test_to_run = "CellMultiblockTest"
+//  test_to_run = "EdgeDataTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//  
+// Either refine test or coarsen test can be run, but not both.  This 
+// ensures proper validation of communicated data.  Default test is 
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors 
+// from coarser levels.  Coarsen test has no options as coarse patch 
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+ 
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+    
+}
+
+CellMultiblockTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each 
+   //                 array value at initialization and 
+   //                 against which interpolation is tested) 
+   //   
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.  
+   // 
+   //    Required input:  name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "NO_COARSEN"
+         refine_operator = "NO_REFINE"
+      }
+   }
+
+   RefinementData {
+   }
+
+}
+
+BlockGridGeometry0 {
+   domain_boxes = [ (0,0,0) , (20,13,15) ]
+}
+BlockGridGeometry1 {
+   domain_boxes = [ (0,0,0) , (25,13,15) ]
+}
+BlockGridGeometry2 {
+   domain_boxes = [ (0,0,0) , (20,25,15) ]
+}
+
+MultiblockPatchHierarchy {
+   num_blocks = 3
+
+   Singularity0 {
+      blocks = 0,1,2
+
+      sing_box_0 = [(21,14,0),(21,14,15)]
+      sing_box_1 = [(-1,14,0),(-1,14,15)]
+      sing_box_2 = [(21,-1,0),(21,-1,15)]
+   }
+ 
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 21,0,0
+      point_in_b_space = 0,0,0
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 0,14,0
+      point_in_b_space = 0,0,0
+
+   }
+
+   BlockNeighbors2 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "J_UP", "I_DOWN", "K_UP"
+      point_in_a_space = 0,14,0
+      point_in_b_space = 20,0,0
+
+   }
+
+   PatchHierarchy {
+      max_levels              = 2 // Maximum number of levels in hierarchy.
+      ratio_to_coarser {         // vector ratio to next coarser level
+         level_1               =  2 , 2 , 2
+         level_2               =  2 , 2 , 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2, 2, 2
+         // all finer levels will use same values as level_0...
+      }
+   }
+}
+
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+TreeLoadBalancer {
+// processors      = 1 , 1 
+   use_spatial_bin_pack = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (5,5,5) , (6,7,7) ]
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/test_inputs/edge-2d-5blk.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/test_inputs/edge-2d-5blk.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,277 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+Main {
+    dim = 2
+//
+// Log file information
+//
+    log_file_name  = "cell-test.log"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//    
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+// 
+//  test_to_run = "CellMultiblockTest"
+    test_to_run = "EdgeMultiblockTest"
+//  test_to_run = "FaceMultiblockTest"
+//  test_to_run = "NodeMultiblockTest"
+//  test_to_run = "SideMultiblockTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//  
+// Either refine test or coarsen test can be run, but not both.  This 
+// ensures proper validation of communicated data.  Default test is 
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors 
+// from coarser levels.  Coarsen test has no options as coarse patch 
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+ 
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+    
+}
+
+EdgeMultiblockTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each 
+   //                 array value at initialization and 
+   //                 against which interpolation is tested) 
+   //   
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.  
+   // 
+   //    Required input:  name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "NO_COARSEN"
+         refine_operator = "NO_REFINE"
+      }
+   }
+
+   RefinementData {
+   }
+
+}
+
+BlockGridGeometry0 {
+   domain_boxes = [ (0,0) , (19,19) ]
+}
+BlockGridGeometry1 {
+   domain_boxes = [ (0,0) , (19,19) ]
+}
+BlockGridGeometry2 {
+   domain_boxes = [ (0,0) , (19,19) ]
+}
+BlockGridGeometry3 {
+   domain_boxes = [ (0,0) , (19,19) ]
+}
+BlockGridGeometry4 {
+   domain_boxes = [ (0,0) , (19,19) ]
+}
+
+MultiblockPatchHierarchy {
+   num_blocks = 5
+
+   Singularity0 {
+      blocks = 0,1,2,3,4
+
+      sing_box_0 = [(20,20),(20,20)]
+      sing_box_1 = [(20,20),(20,20)]
+      sing_box_2 = [(20,-1),(20,-1)]
+      sing_box_3 = [(-1,-1),(-1,-1)]
+      sing_box_4 = [(-1,20),(-1,20)]
+   }
+ 
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "J_DOWN", "I_UP"
+      point_in_a_space = 20,0
+      point_in_b_space = 0,19
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      rotation_b_to_a = "J_UP", "I_DOWN"
+      point_in_a_space = 19,19
+      point_in_b_space = 20,-1
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors2 {
+      block_a = 0
+      block_b = 3
+
+      rotation_b_to_a = "I_UP", "J_UP"
+      point_in_a_space = 19,19
+      point_in_b_space = -1,-1
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors3 {
+      block_a = 0
+      block_b = 4
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN"
+      point_in_a_space = 0,19
+      point_in_b_space = 19,20
+
+   }
+
+   BlockNeighbors4 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN"
+      point_in_a_space = 19,0
+      point_in_b_space = 20,19
+
+   }
+
+   BlockNeighbors5 {
+      block_a = 1
+      block_b = 3
+
+      rotation_b_to_a = "I_UP", "J_UP"
+      point_in_a_space = 19,19
+      point_in_b_space = -1,-1
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors6 {
+      block_a = 1
+      block_b = 4
+
+      rotation_b_to_a = "J_DOWN", "I_UP"
+      point_in_a_space = 19,19
+      point_in_b_space = -1,20
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors7 {
+      block_a = 2
+      block_b = 3
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN"
+      point_in_a_space = 0,0
+      point_in_b_space = 19,-1
+
+   }
+
+   BlockNeighbors8 {
+      block_a = 2
+      block_b = 4
+
+      rotation_b_to_a = "I_UP", "J_UP"
+      point_in_a_space = 19,0
+      point_in_b_space = -1,20
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors9 {
+      block_a = 3
+      block_b = 4
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN"
+      point_in_a_space = 0,19
+      point_in_b_space = -1,0
+
+   }
+
+   PatchHierarchy {
+      max_levels              = 2 // Maximum number of levels in hierarchy.
+      ratio_to_coarser {         // vector ratio to next coarser level
+         level_1               =  2 , 2
+         level_2               =  2 , 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2, 2
+         // all finer levels will use same values as level_0...
+      }
+   }
+
+}
+
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+TreeLoadBalancer {
+// processors      = 1 , 1 
+   use_spatial_bin_pack = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (9,9) , (10,10) ]
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/test_inputs/edge-3d-5blk.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/test_inputs/edge-3d-5blk.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,277 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+Main {
+    dim = 3
+//
+// Log file information
+//
+    log_file_name  = "cell-test.log"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//    
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+// 
+//  test_to_run = "CellMultiblockTest"
+    test_to_run = "EdgeMultiblockTest"
+//  test_to_run = "FaceMultiblockTest"
+//  test_to_run = "NodeMultiblockTest"
+//  test_to_run = "SideMultiblockTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//  
+// Either refine test or coarsen test can be run, but not both.  This 
+// ensures proper validation of communicated data.  Default test is 
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors 
+// from coarser levels.  Coarsen test has no options as coarse patch 
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+ 
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+    
+}
+
+EdgeMultiblockTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each 
+   //                 array value at initialization and 
+   //                 against which interpolation is tested) 
+   //   
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.  
+   // 
+   //    Required input:  name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,0
+         coarsen_operator = "NO_COARSEN"
+         refine_operator = "NO_REFINE"
+      }
+   }
+
+   RefinementData {
+   }
+
+}
+
+BlockGridGeometry0 {
+   domain_boxes = [ (0,0,0) , (19,19,14) ]
+}
+BlockGridGeometry1 {
+   domain_boxes = [ (0,0,0) , (19,19,14) ]
+}
+BlockGridGeometry2 {
+   domain_boxes = [ (0,0,0) , (19,19,14) ]
+}
+BlockGridGeometry3 {
+   domain_boxes = [ (0,0,0) , (19,19,14) ]
+}
+BlockGridGeometry4 {
+   domain_boxes = [ (0,0,0) , (19,19,14) ]
+}
+
+MultiblockPatchHierarchy {
+   num_blocks = 5
+
+   Singularity0 {
+      blocks = 0,1,2,3,4
+
+      sing_box_0 = [(20,20,0),(20,20,14)]
+      sing_box_1 = [(-1,20,0),(-1,20,14)]
+      sing_box_2 = [(20,-1,0),(20,-1,14)]
+      sing_box_3 = [(-1,-1,0),(-1,-1,14)]
+      sing_box_4 = [(-1,20,0),(-1,20,14)]
+   }
+ 
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "J_DOWN", "I_DOWN", "K_DOWN"
+      point_in_a_space = 20,0,0
+      point_in_b_space = 19,19,14
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      rotation_b_to_a = "J_UP", "I_DOWN", "K_UP"
+      point_in_a_space = 19,19,0
+      point_in_b_space = 20,-1,0
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors2 {
+      block_a = 0
+      block_b = 3
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 19,19,0
+      point_in_b_space = -1,-1,0
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors3 {
+      block_a = 0
+      block_b = 4
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN", "K_UP"
+      point_in_a_space = 0,19,0
+      point_in_b_space = 19,20,0
+
+   }
+
+   BlockNeighbors4 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "I_UP", "J_DOWN", "K_DOWN"
+      point_in_a_space = 0,0,14
+      point_in_b_space = 20,19,0
+
+   }
+
+   BlockNeighbors5 {
+      block_a = 1
+      block_b = 3
+
+      rotation_b_to_a = "I_DOWN", "J_UP", "K_DOWN"
+      point_in_a_space = 0,19,14
+      point_in_b_space = -1,-1,0
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors6 {
+      block_a = 1
+      block_b = 4
+
+      rotation_b_to_a = "J_UP", "I_UP", "K_DOWN"
+      point_in_a_space = 0,19,14
+      point_in_b_space = -1,20,0
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors7 {
+      block_a = 2
+      block_b = 3
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN", "K_UP"
+      point_in_a_space = 0,0,0
+      point_in_b_space = 19,-1,0
+
+   }
+
+   BlockNeighbors8 {
+      block_a = 2
+      block_b = 4
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 19,0,0
+      point_in_b_space = -1,20,0
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors9 {
+      block_a = 3
+      block_b = 4
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN", "K_UP"
+      point_in_a_space = 0,19,0
+      point_in_b_space = -1,0,0
+
+   }
+
+   PatchHierarchy {
+      max_levels              = 2 // Maximum number of levels in hierarchy.
+      ratio_to_coarser {         // vector ratio to next coarser level
+         level_1               =  2 , 2, 2
+         level_2               =  2 , 2, 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2, 2, 2
+         // all finer levels will use same values as level_0...
+      }
+   }
+
+}
+
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+TreeLoadBalancer {
+// processors      = 1 , 1 
+   use_spatial_bin_pack = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (9,9,9) , (10,10,10) ]
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/test_inputs/edge.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/test_inputs/edge.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,198 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+Main {
+    dim = 2
+//
+// Log file information
+//
+    log_file_name  = "cell-test.log"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//    
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+// 
+//    test_to_run = "CellMultiblockTest"
+  test_to_run = "EdgeMultiblockTest"
+//  test_to_run = "FaceDataTest"
+//  test_to_run = "NodeDataTest"
+//  test_to_run = "SideDataTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//  
+// Either refine test or coarsen test can be run, but not both.  This 
+// ensures proper validation of communicated data.  Default test is 
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors 
+// from coarser levels.  Coarsen test has no options as coarse patch 
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+ 
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+    
+}
+
+EdgeMultiblockTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each 
+   //                 array value at initialization and 
+   //                 against which interpolation is tested) 
+   //   
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.  
+   // 
+   //    Required input:  name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "NO_COARSEN"
+         refine_operator = "NO_REFINE"
+      }
+   }
+
+   RefinementData {
+   }
+
+}
+
+BlockGridGeometry0 {
+   domain_boxes = [ (0,0) , (20,13) ]
+}
+BlockGridGeometry1 {
+   domain_boxes = [ (0,0) , (25,13) ]
+}
+BlockGridGeometry2 {
+   domain_boxes = [ (0,0) , (25,20) ]
+}
+
+MultiblockPatchHierarchy {
+   num_blocks = 3
+
+   Singularity0 {
+      blocks = 0,1,2
+
+      sing_box_0 = [(21,14),(21,14)]
+      sing_box_1 = [(-1,14),(-1,14)]
+      sing_box_2 = [(-1,-1),(-1,-1)]
+   }
+ 
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "I_UP", "J_UP"
+      point_in_a_space = 21,0
+      point_in_b_space = 0,0
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      rotation_b_to_a = "J_DOWN", "I_UP"
+      point_in_a_space = 0,14
+      point_in_b_space = 0,20
+
+   }
+
+   BlockNeighbors2 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "I_UP", "J_UP"
+      point_in_a_space = 0,14
+      point_in_b_space = 0,0
+
+   }
+
+   PatchHierarchy {
+      max_levels              = 2 // Maximum number of levels in hierarchy.
+      ratio_to_coarser {         // vector ratio to next coarser level
+         level_1               =  2 , 2
+         level_2               =  2 , 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2, 2
+         // all finer levels will use same values as level_0...
+      }
+   }
+}
+
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+TreeLoadBalancer {
+// processors      = 1 , 1 
+   use_spatial_bin_pack = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (3,3) , (4,4) ]
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/test_inputs/edge.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/test_inputs/edge.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,198 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI edge data. 
+ *
+ ************************************************************************/
+
+Main {
+    dim = 3
+//
+// Log file information
+//
+    log_file_name  = "edge-test.log"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//    
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+// 
+//    test_to_run = "CellMultiblockTest"
+    test_to_run = "EdgeMultiblockTest"
+//  test_to_run = "FaceMultiblockTest"
+//  test_to_run = "NodeMultiblockTest"
+//  test_to_run = "SideMultiblockTest"
+//  test_to_run = "MultiVariableMultiblockTest"
+
+//  
+// Either refine test or coarsen test can be run, but not both.  This 
+// ensures proper validation of communicated data.  Default test is 
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors 
+// from coarser levels.  Coarsen test has no options as coarse patch 
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+ 
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+    
+}
+
+EdgeMultiblockTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each 
+   //                 array value at initialization and 
+   //                 against which interpolation is tested) 
+   //   
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchMultiblockTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.  
+   // 
+   //    Required input:  name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "NO_COARSEN"
+         refine_operator = "NO_REFINE"
+      }
+   }
+
+   RefinementData {
+   }
+
+}
+
+BlockGridGeometry0 {
+   domain_boxes = [ (0,0,0) , (20,13,15) ]
+}
+BlockGridGeometry1 {
+   domain_boxes = [ (0,0,0) , (25,13,15) ]
+}
+BlockGridGeometry2 {
+   domain_boxes = [ (0,0,0) , (15,25,20) ]
+}
+
+MultiblockPatchHierarchy {
+   num_blocks = 3
+
+   Singularity0 {
+      blocks = 0,1,2
+
+      sing_box_0 = [(21,14,0),(21,14,15)]
+      sing_box_1 = [(-1,14,0),(-1,14,15)]
+      sing_box_2 = [(0,-1,21),(15,-1,21)]
+   }
+ 
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 21,0,0
+      point_in_b_space = 0,0,0
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      rotation_b_to_a = "K_UP", "J_UP", "I_DOWN"
+      point_in_a_space = 0,14,0
+      point_in_b_space = 15,0,0
+
+   }
+
+   BlockNeighbors2 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "J_UP", "K_DOWN", "I_DOWN"
+      point_in_a_space = 0,14,0
+      point_in_b_space = 15,0,20
+
+   }
+
+   PatchHierarchy {
+      max_levels              = 2 // Maximum number of levels in hierarchy.
+      ratio_to_coarser {         // vector ratio to next coarser level
+         level_1               =  2 , 2 , 2
+         level_2               =  2 , 2 , 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2, 2, 2
+         // all finer levels will use same values as level_0...
+      }
+   }
+}
+
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+TreeLoadBalancer {
+// processors      = 1 , 1 
+   use_spatial_bin_pack = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (5,5,5) , (6,7,7) ]
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/test_inputs/face-2d-5blk.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/test_inputs/face-2d-5blk.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,277 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+Main {
+    dim = 2
+//
+// Log file information
+//
+    log_file_name  = "cell-test.log"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//    
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+// 
+//  test_to_run = "CellMultiblockTest"
+//  test_to_run = "EdgeMultiblockTest"
+    test_to_run = "FaceMultiblockTest"
+//  test_to_run = "NodeMultiblockTest"
+//  test_to_run = "SideMultiblockTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//  
+// Either refine test or coarsen test can be run, but not both.  This 
+// ensures proper validation of communicated data.  Default test is 
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors 
+// from coarser levels.  Coarsen test has no options as coarse patch 
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+ 
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+    
+}
+
+FaceMultiblockTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each 
+   //                 array value at initialization and 
+   //                 against which interpolation is tested) 
+   //   
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.  
+   // 
+   //    Required input:  name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "NO_COARSEN"
+         refine_operator = "NO_REFINE"
+      }
+   }
+
+   RefinementData {
+   }
+
+}
+
+BlockGridGeometry0 {
+   domain_boxes = [ (0,0) , (19,19) ]
+}
+BlockGridGeometry1 {
+   domain_boxes = [ (0,0) , (19,19) ]
+}
+BlockGridGeometry2 {
+   domain_boxes = [ (0,0) , (19,19) ]
+}
+BlockGridGeometry3 {
+   domain_boxes = [ (0,0) , (19,19) ]
+}
+BlockGridGeometry4 {
+   domain_boxes = [ (0,0) , (19,19) ]
+}
+
+MultiblockPatchHierarchy {
+   num_blocks = 5
+
+   Singularity0 {
+      blocks = 0,1,2,3,4
+
+      sing_box_0 = [(20,20),(20,20)]
+      sing_box_1 = [(20,20),(20,20)]
+      sing_box_2 = [(20,-1),(20,-1)]
+      sing_box_3 = [(-1,-1),(-1,-1)]
+      sing_box_4 = [(-1,20),(-1,20)]
+   }
+ 
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "J_DOWN", "I_UP"
+      point_in_a_space = 20,0
+      point_in_b_space = 0,19
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      rotation_b_to_a = "J_UP", "I_DOWN"
+      point_in_a_space = 19,19
+      point_in_b_space = 20,-1
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors2 {
+      block_a = 0
+      block_b = 3
+
+      rotation_b_to_a = "I_UP", "J_UP"
+      point_in_a_space = 19,19
+      point_in_b_space = -1,-1
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors3 {
+      block_a = 0
+      block_b = 4
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN"
+      point_in_a_space = 0,19
+      point_in_b_space = 19,20
+
+   }
+
+   BlockNeighbors4 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN"
+      point_in_a_space = 19,0
+      point_in_b_space = 20,19
+
+   }
+
+   BlockNeighbors5 {
+      block_a = 1
+      block_b = 3
+
+      rotation_b_to_a = "I_UP", "J_UP"
+      point_in_a_space = 19,19
+      point_in_b_space = -1,-1
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors6 {
+      block_a = 1
+      block_b = 4
+
+      rotation_b_to_a = "J_DOWN", "I_UP"
+      point_in_a_space = 19,19
+      point_in_b_space = -1,20
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors7 {
+      block_a = 2
+      block_b = 3
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN"
+      point_in_a_space = 0,0
+      point_in_b_space = 19,-1
+
+   }
+
+   BlockNeighbors8 {
+      block_a = 2
+      block_b = 4
+
+      rotation_b_to_a = "I_UP", "J_UP"
+      point_in_a_space = 19,0
+      point_in_b_space = -1,20
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors9 {
+      block_a = 3
+      block_b = 4
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN"
+      point_in_a_space = 0,19
+      point_in_b_space = -1,0
+
+   }
+
+   PatchHierarchy {
+      max_levels              = 2 // Maximum number of levels in hierarchy.
+      ratio_to_coarser {         // vector ratio to next coarser level
+         level_1               =  2 , 2
+         level_2               =  2 , 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2, 2
+         // all finer levels will use same values as level_0...
+      }
+   }
+
+}
+
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+TreeLoadBalancer {
+// processors      = 1 , 1 
+   use_spatial_bin_pack = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (9,9) , (10,10) ]
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/test_inputs/face-3d-5blk.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/test_inputs/face-3d-5blk.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,277 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+Main {
+    dim = 3
+//
+// Log file information
+//
+    log_file_name  = "cell-test.log"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//    
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+// 
+//  test_to_run = "CellMultiblockTest"
+//  test_to_run = "EdgeMultiblockTest"
+    test_to_run = "FaceMultiblockTest"
+//  test_to_run = "NodeMultiblockTest"
+//  test_to_run = "SideMultiblockTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//  
+// Either refine test or coarsen test can be run, but not both.  This 
+// ensures proper validation of communicated data.  Default test is 
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors 
+// from coarser levels.  Coarsen test has no options as coarse patch 
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+ 
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+    
+}
+
+FaceMultiblockTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each 
+   //                 array value at initialization and 
+   //                 against which interpolation is tested) 
+   //   
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.  
+   // 
+   //    Required input:  name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,0
+         coarsen_operator = "NO_COARSEN"
+         refine_operator = "NO_REFINE"
+      }
+   }
+
+   RefinementData {
+   }
+
+}
+
+BlockGridGeometry0 {
+   domain_boxes = [ (0,0,0) , (19,19,14) ]
+}
+BlockGridGeometry1 {
+   domain_boxes = [ (0,0,0) , (14,19,19) ]
+}
+BlockGridGeometry2 {
+   domain_boxes = [ (0,0,0) , (19,19,14) ]
+}
+BlockGridGeometry3 {
+   domain_boxes = [ (0,0,0) , (19,19,14) ]
+}
+BlockGridGeometry4 {
+   domain_boxes = [ (0,0,0) , (19,19,14) ]
+}
+
+MultiblockPatchHierarchy {
+   num_blocks = 5
+
+   Singularity0 {
+      blocks = 0,1,2,3,4
+
+      sing_box_0 = [(20,20,0),(20,20,14)]
+      sing_box_1 = [(0,20,20),(14,20,20)]
+      sing_box_2 = [(20,-1,0),(20,-1,14)]
+      sing_box_3 = [(-1,-1,0),(-1,-1,14)]
+      sing_box_4 = [(-1,20,0),(-1,20,14)]
+   }
+ 
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "J_DOWN", "K_UP", "I_DOWN"
+      point_in_a_space = 20,0,0
+      point_in_b_space = 14,19,0
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      rotation_b_to_a = "J_UP", "I_DOWN", "K_UP"
+      point_in_a_space = 19,19,0
+      point_in_b_space = 20,-1,0
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors2 {
+      block_a = 0
+      block_b = 3
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 19,19,0
+      point_in_b_space = -1,-1,0
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors3 {
+      block_a = 0
+      block_b = 4
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN", "K_UP"
+      point_in_a_space = 0,19,0
+      point_in_b_space = 19,20,0
+
+   }
+
+   BlockNeighbors4 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "K_DOWN", "J_DOWN", "I_DOWN"
+      point_in_a_space = 14,19,19
+      point_in_b_space = 20,0,0
+
+   }
+
+   BlockNeighbors5 {
+      block_a = 1
+      block_b = 3
+
+      rotation_b_to_a = "K_DOWN", "J_UP", "I_UP"
+      point_in_a_space = 14,19,19
+      point_in_b_space = -1,-1,0
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors6 {
+      block_a = 1
+      block_b = 4
+
+      rotation_b_to_a = "K_DOWN", "I_UP", "J_DOWN"
+      point_in_a_space = 14,19,19
+      point_in_b_space = -1,20,0
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors7 {
+      block_a = 2
+      block_b = 3
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN", "K_UP"
+      point_in_a_space = 0,0,0
+      point_in_b_space = 19,-1,0
+
+   }
+
+   BlockNeighbors8 {
+      block_a = 2
+      block_b = 4
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 19,0,0
+      point_in_b_space = -1,20,0
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors9 {
+      block_a = 3
+      block_b = 4
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN", "K_UP"
+      point_in_a_space = 0,19,0
+      point_in_b_space = -1,0,0
+
+   }
+
+   PatchHierarchy {
+      max_levels              = 2 // Maximum number of levels in hierarchy.
+      ratio_to_coarser {         // vector ratio to next coarser level
+         level_1               =  2 , 2, 2
+         level_2               =  2 , 2, 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2, 2, 2
+         // all finer levels will use same values as level_0...
+      }
+   }
+
+}
+
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+TreeLoadBalancer {
+// processors      = 1 , 1 
+   use_spatial_bin_pack = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (9,9,9) , (10,10,10) ]
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/test_inputs/face.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/test_inputs/face.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,198 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI face data. 
+ *
+ ************************************************************************/
+
+Main {
+    dim = 2
+//
+// Log file information
+//
+    log_file_name  = "face-test.log"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//    
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+// 
+//  test_to_run = "CellMultiblockTest"
+//  test_to_run = "EdgeMultiblockTest"
+  test_to_run = "FaceMultiblockTest"
+//  test_to_run = "NodeMultiblockTest"
+//  test_to_run = "SideMultiblockTest"
+//  test_to_run = "MultiVariableMultiblockTest"
+
+//  
+// Either refine test or coarsen test can be run, but not both.  This 
+// ensures proper validation of communicated data.  Default test is 
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors 
+// from coarser levels.  Coarsen test has no options as coarse patch 
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+ 
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+    
+}
+
+FaceMultiblockTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each 
+   //                 array value at initialization and 
+   //                 against which interpolation is tested) 
+   //   
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchMultiblockTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.  
+   // 
+   //    Required input:  name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "NO_COARSEN"
+         refine_operator = "NO_REFINE"
+      }
+   }
+
+   RefinementData {
+   }
+
+}
+
+BlockGridGeometry0 {
+   domain_boxes = [ (0,0) , (20,13) ]
+}
+BlockGridGeometry1 {
+   domain_boxes = [ (0,0) , (13,25) ]
+}
+BlockGridGeometry2 {
+   domain_boxes = [ (0,0) , (25,20) ]
+}
+
+MultiblockPatchHierarchy {
+   num_blocks = 3
+
+   Singularity0 {
+      blocks = 0,1,2
+
+      sing_box_0 = [(21,14),(21,14)]
+      sing_box_1 = [(14,26),(14,26)]
+      sing_box_2 = [(-1,-1),(-1,-1)]
+   }
+ 
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "J_DOWN", "I_UP"
+      point_in_a_space = 21,0
+      point_in_b_space = 0,25
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      rotation_b_to_a = "J_DOWN", "I_UP"
+      point_in_a_space = 0,14
+      point_in_b_space = 0,20
+
+   }
+
+   BlockNeighbors2 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "J_UP", "I_DOWN"
+      point_in_a_space = 14,0
+      point_in_b_space = 25,0
+
+   }
+
+   PatchHierarchy {
+      max_levels              = 2 // Maximum number of levels in hierarchy.
+      ratio_to_coarser {         // vector ratio to next coarser level
+         level_1               =  2 , 2
+         level_2               =  2 , 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2, 2
+         // all finer levels will use same values as level_0...
+      }
+   }
+}
+
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+TreeLoadBalancer {
+// processors      = 1 , 1 
+   use_spatial_bin_pack = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (3,3) , (4,4) ]
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/test_inputs/face.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/test_inputs/face.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,198 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI face data. 
+ *
+ ************************************************************************/
+
+Main {
+    dim = 3
+//
+// Log file information
+//
+    log_file_name  = "face-test.log"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//    
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+// 
+//  test_to_run = "CellMultiblockTest"
+//    test_to_run = "EdgeMultiblockTest"
+    test_to_run = "FaceMultiblockTest"
+//  test_to_run = "NodeMultiblockTest"
+//  test_to_run = "SideMultiblockTest"
+//  test_to_run = "MultiVariableMultiblockTest"
+
+//  
+// Either refine test or coarsen test can be run, but not both.  This 
+// ensures proper validation of communicated data.  Default test is 
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors 
+// from coarser levels.  Coarsen test has no options as coarse patch 
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+ 
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+    
+}
+
+FaceMultiblockTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each 
+   //                 array value at initialization and 
+   //                 against which interpolation is tested) 
+   //   
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchMultiblockTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.  
+   // 
+   //    Required input:  name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "NO_COARSEN"
+         refine_operator = "NO_REFINE"
+      }
+   }
+
+   RefinementData {
+   }
+
+}
+
+BlockGridGeometry0 {
+   domain_boxes = [ (0,0,0) , (20,13,15) ]
+}
+BlockGridGeometry1 {
+   domain_boxes = [ (0,0,0) , (25,13,15) ]
+}
+BlockGridGeometry2 {
+   domain_boxes = [ (0,0,0) , (15,20,25) ]
+}
+
+MultiblockPatchHierarchy {
+   num_blocks = 3
+
+   Singularity0 {
+      blocks = 0,1,2
+
+      sing_box_0 = [(21,14,0),(21,14,15)]
+      sing_box_1 = [(-1,14,0),(-1,14,15)]
+      sing_box_2 = [(0,-1,-1),(15,-1,-1)]
+   }
+ 
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 21,0,0
+      point_in_b_space = 0,0,0
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      rotation_b_to_a = "J_DOWN", "K_UP", "I_DOWN"
+      point_in_a_space = 0,14,0
+      point_in_b_space = 15,20,0
+
+   }
+
+   BlockNeighbors2 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "K_UP", "J_UP", "I_DOWN"
+      point_in_a_space = 0,14,0
+      point_in_b_space = 15,0,0
+
+   }
+
+   PatchHierarchy {
+      max_levels              = 2 // Maximum number of levels in hierarchy.
+      ratio_to_coarser {         // vector ratio to next coarser level
+         level_1               =  2 , 2 , 2
+         level_2               =  2 , 2 , 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2, 2, 2
+         // all finer levels will use same values as level_0...
+      }
+   }
+}
+
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+TreeLoadBalancer {
+// processors      = 1 , 1 
+   use_spatial_bin_pack = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (5,5,5) , (6,7,7) ]
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/test_inputs/node-2d-5blk.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/test_inputs/node-2d-5blk.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,278 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+Main {
+    dim = 2
+//
+// Log file information
+//
+    log_file_name  = "cell-test.log"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//    
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+// 
+//  test_to_run = "CellMultiblockTest"
+//  test_to_run = "EdgeMultiblockTest"
+//  test_to_run = "FaceMultiblockTest"
+    test_to_run = "NodeMultiblockTest"
+//  test_to_run = "SideMultiblockTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//  
+// Either refine test or coarsen test can be run, but not both.  This 
+// ensures proper validation of communicated data.  Default test is 
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors 
+// from coarser levels.  Coarsen test has no options as coarse patch 
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+ 
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+    
+}
+
+NodeMultiblockTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each 
+   //                 array value at initialization and 
+   //                 against which interpolation is tested) 
+   //   
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.  
+   // 
+   //    Required input:  name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "NO_COARSEN"
+         refine_operator = "NO_REFINE"
+      }
+   }
+
+   RefinementData {
+   }
+
+}
+
+BlockGridGeometry0 {
+   domain_boxes = [ (0,0) , (19,19) ]
+}
+BlockGridGeometry1 {
+   domain_boxes = [ (0,0) , (19,19) ]
+}
+BlockGridGeometry2 {
+   domain_boxes = [ (0,0) , (19,19) ]
+}
+BlockGridGeometry3 {
+   domain_boxes = [ (0,0) , (19,19) ]
+}
+BlockGridGeometry4 {
+   domain_boxes = [ (0,0) , (19,19) ]
+}
+
+MultiblockPatchHierarchy {
+   num_blocks = 5
+
+   Singularity0 {
+      blocks = 0,1,2,3,4
+
+      sing_box_0 = [(20,20),(20,20)]
+      sing_box_1 = [(20,20),(20,20)]
+      sing_box_2 = [(20,-1),(20,-1)]
+      sing_box_3 = [(-1,-1),(-1,-1)]
+      sing_box_4 = [(-1,20),(-1,20)]
+   }
+ 
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "J_DOWN", "I_UP"
+      point_in_a_space = 20,0
+      point_in_b_space = 0,19
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      rotation_b_to_a = "J_UP", "I_DOWN"
+      point_in_a_space = 19,19
+      point_in_b_space = 20,-1
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors2 {
+      block_a = 0
+      block_b = 3
+
+      rotation_b_to_a = "I_UP", "J_UP"
+      point_in_a_space = 19,19
+      point_in_b_space = -1,-1
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors3 {
+      block_a = 0
+      block_b = 4
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN"
+      point_in_a_space = 0,19
+      point_in_b_space = 19,20
+
+   }
+
+   BlockNeighbors4 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN"
+      point_in_a_space = 19,0
+      point_in_b_space = 20,19
+
+   }
+
+   BlockNeighbors5 {
+      block_a = 1
+      block_b = 3
+
+      rotation_b_to_a = "I_UP", "J_UP"
+      point_in_a_space = 19,19
+      point_in_b_space = -1,-1
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors6 {
+      block_a = 1
+      block_b = 4
+
+      rotation_b_to_a = "J_DOWN", "I_UP"
+      point_in_a_space = 19,19
+      point_in_b_space = -1,20
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors7 {
+      block_a = 2
+      block_b = 3
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN"
+      point_in_a_space = 0,0
+      point_in_b_space = 19,-1
+
+   }
+
+   BlockNeighbors8 {
+      block_a = 2
+      block_b = 4
+
+      rotation_b_to_a = "I_UP", "J_UP"
+      point_in_a_space = 19,0
+      point_in_b_space = -1,20
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors9 {
+      block_a = 3
+      block_b = 4
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN"
+      point_in_a_space = 0,19
+      point_in_b_space = -1,0
+
+   }
+
+   PatchHierarchy {
+      max_levels              = 2 // Maximum number of levels in hierarchy.
+      ratio_to_coarser {         // vector ratio to next coarser level
+         level_1               =  2 , 2
+         level_2               =  2 , 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2, 2
+         // all finer levels will use same values as level_0...
+      }
+   }
+
+
+}
+
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+TreeLoadBalancer {
+// processors      = 1 , 1 
+   use_spatial_bin_pack = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (9,9) , (10,10) ]
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/test_inputs/node-3d-5blk.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/test_inputs/node-3d-5blk.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,277 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+Main {
+    dim = 3
+//
+// Log file information
+//
+    log_file_name  = "cell-test.log"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//    
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+// 
+//  test_to_run = "CellMultiblockTest"
+//  test_to_run = "EdgeMultiblockTest"
+//  test_to_run = "FaceMultiblockTest"
+    test_to_run = "NodeMultiblockTest"
+//  test_to_run = "SideMultiblockTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//  
+// Either refine test or coarsen test can be run, but not both.  This 
+// ensures proper validation of communicated data.  Default test is 
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors 
+// from coarser levels.  Coarsen test has no options as coarse patch 
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+ 
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+    
+}
+
+NodeMultiblockTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each 
+   //                 array value at initialization and 
+   //                 against which interpolation is tested) 
+   //   
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.  
+   // 
+   //    Required input:  name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,0
+         coarsen_operator = "NO_COARSEN"
+         refine_operator = "NO_REFINE"
+      }
+   }
+
+   RefinementData {
+   }
+
+}
+
+BlockGridGeometry0 {
+   domain_boxes = [ (0,0,0) , (19,19,14) ]
+}
+BlockGridGeometry1 {
+   domain_boxes = [ (0,0,0) , (19,14,19) ]
+}
+BlockGridGeometry2 {
+   domain_boxes = [ (0,0,0) , (19,19,14) ]
+}
+BlockGridGeometry3 {
+   domain_boxes = [ (0,0,0) , (19,19,14) ]
+}
+BlockGridGeometry4 {
+   domain_boxes = [ (0,0,0) , (19,19,14) ]
+}
+
+MultiblockPatchHierarchy {
+   num_blocks = 5
+
+   Singularity0 {
+      blocks = 0,1,2,3,4
+
+      sing_box_0 = [(20,20,0),(20,20,14)]
+      sing_box_1 = [(20,0,-1),(20,14,-1)]
+      sing_box_2 = [(20,-1,0),(20,-1,14)]
+      sing_box_3 = [(-1,-1,0),(-1,-1,14)]
+      sing_box_4 = [(-1,20,0),(-1,20,14)]
+   }
+ 
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "I_DOWN", "K_DOWN", "J_DOWN"
+      point_in_a_space = 20,0,0
+      point_in_b_space = 19,14,19
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      rotation_b_to_a = "J_UP", "I_DOWN", "K_UP"
+      point_in_a_space = 19,19,0
+      point_in_b_space = 20,-1,0
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors2 {
+      block_a = 0
+      block_b = 3
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 19,19,0
+      point_in_b_space = -1,-1,0
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors3 {
+      block_a = 0
+      block_b = 4
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN", "K_UP"
+      point_in_a_space = 0,19,0
+      point_in_b_space = 19,20,0
+
+   }
+
+   BlockNeighbors4 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "J_DOWN", "K_DOWN", "I_UP"
+      point_in_a_space = 19,14,0
+      point_in_b_space = 20,0,0
+
+   }
+
+   BlockNeighbors5 {
+      block_a = 1
+      block_b = 3
+
+      rotation_b_to_a = "J_UP", "K_DOWN", "I_DOWN"
+      point_in_a_space = 19,14,0
+      point_in_b_space = -1,-1,0
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors6 {
+      block_a = 1
+      block_b = 4
+
+      rotation_b_to_a = "I_UP", "K_DOWN", "J_UP"
+      point_in_a_space = 19,14,0
+      point_in_b_space = -1,20,0
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors7 {
+      block_a = 2
+      block_b = 3
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN", "K_UP"
+      point_in_a_space = 0,0,0
+      point_in_b_space = 19,-1,0
+
+   }
+
+   BlockNeighbors8 {
+      block_a = 2
+      block_b = 4
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 19,0,0
+      point_in_b_space = -1,20,0
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors9 {
+      block_a = 3
+      block_b = 4
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN", "K_UP"
+      point_in_a_space = 0,19,0
+      point_in_b_space = -1,0,0
+
+   }
+
+   PatchHierarchy {
+      max_levels              = 2 // Maximum number of levels in hierarchy.
+      ratio_to_coarser {         // vector ratio to next coarser level
+         level_1               =  2 , 2, 2
+         level_2               =  2 , 2, 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2, 2, 2
+         // all finer levels will use same values as level_0...
+      }
+   }
+
+}
+
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+TreeLoadBalancer {
+// processors      = 1 , 1 
+   use_spatial_bin_pack = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (9,9,9) , (10,10,10) ]
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/test_inputs/node.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/test_inputs/node.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,198 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI node data. 
+ *
+ ************************************************************************/
+
+Main {
+    dim = 2
+//
+// Log file information
+//
+    log_file_name  = "node-test.log"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//    
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+// 
+//  test_to_run = "CellMultiblockTest"
+//  test_to_run = "EdgeMultiblockTest"
+//  test_to_run = "FaceMultiblockTest"
+  test_to_run = "NodeMultiblockTest"
+//  test_to_run = "SideMultiblockTest"
+//  test_to_run = "MultiVariableMultiblockTest"
+
+//  
+// Either refine test or coarsen test can be run, but not both.  This 
+// ensures proper validation of communicated data.  Default test is 
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors 
+// from coarser levels.  Coarsen test has no options as coarse patch 
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+ 
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+    
+}
+
+NodeMultiblockTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each 
+   //                 array value at initialization and 
+   //                 against which interpolation is tested) 
+   //   
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchMultiblockTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.  
+   // 
+   //    Required input:  name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "NO_COARSEN"
+         refine_operator = "NO_REFINE"
+      }
+   }
+
+   RefinementData {
+   }
+
+}
+
+BlockGridGeometry0 {
+   domain_boxes = [ (0,0) , (20,13) ]
+}
+BlockGridGeometry1 {
+   domain_boxes = [ (0,0) , (13,25) ]
+}
+BlockGridGeometry2 {
+   domain_boxes = [ (0,0) , (20,25) ]
+}
+
+MultiblockPatchHierarchy {
+   num_blocks = 3
+
+   Singularity0 {
+      blocks = 0,1,2
+
+      sing_box_0 = [(21,14),(21,14)]
+      sing_box_1 = [(14,26),(14,26)]
+      sing_box_2 = [(-1,26),(-1,26)]
+   }
+ 
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "J_DOWN", "I_UP"
+      point_in_a_space = 21,0
+      point_in_b_space = 0,25
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN"
+      point_in_a_space = 0,14
+      point_in_b_space = 20,25
+
+   }
+
+   BlockNeighbors2 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "I_UP", "J_UP"
+      point_in_a_space = 14,25
+      point_in_b_space = 0,25
+
+   }
+
+   PatchHierarchy {
+      max_levels              = 2 // Maximum number of levels in hierarchy.
+      ratio_to_coarser {         // vector ratio to next coarser level
+         level_1               =  2 , 2
+         level_2               =  2 , 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2, 2
+         // all finer levels will use same values as level_0...
+      }
+   }
+}
+
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+TreeLoadBalancer {
+// processors      = 1 , 1 
+   use_spatial_bin_pack = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (3,3) , (4,4) ]
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/test_inputs/node.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/test_inputs/node.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,198 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI node data. 
+ *
+ ************************************************************************/
+
+Main {
+    dim = 3
+//
+// Log file information
+//
+    log_file_name  = "node-test.log"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//    
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+// 
+//  test_to_run = "CellMultiblockTest"
+//    test_to_run = "EdgeMultiblockTest"
+//    test_to_run = "FaceMultiblockTest"
+    test_to_run = "NodeMultiblockTest"
+//  test_to_run = "SideMultiblockTest"
+//  test_to_run = "MultiVariableMultiblockTest"
+
+//  
+// Either refine test or coarsen test can be run, but not both.  This 
+// ensures proper validation of communicated data.  Default test is 
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors 
+// from coarser levels.  Coarsen test has no options as coarse patch 
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+ 
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+    
+}
+
+NodeMultiblockTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each 
+   //                 array value at initialization and 
+   //                 against which interpolation is tested) 
+   //   
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchMultiblockTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.  
+   // 
+   //    Required input:  name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "NO_COARSEN"
+         refine_operator = "NO_REFINE"
+      }
+   }
+
+   RefinementData {
+   }
+
+}
+
+BlockGridGeometry0 {
+   domain_boxes = [ (0,0,0) , (20,13,15) ]
+}
+BlockGridGeometry1 {
+   domain_boxes = [ (0,0,0) , (25,13,15) ]
+}
+BlockGridGeometry2 {
+   domain_boxes = [ (0,0,0) , (15,25,20) ]
+}
+
+MultiblockPatchHierarchy {
+   num_blocks = 3
+
+   Singularity0 {
+      blocks = 0,1,2
+
+      sing_box_0 = [(21,14,0),(21,14,15)]
+      sing_box_1 = [(-1,14,0),(-1,14,15)]
+      sing_box_2 = [(0,-1,-1),(15,-1,-1)]
+   }
+ 
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 21,0,0
+      point_in_b_space = 0,0,0
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      rotation_b_to_a = "K_DOWN", "J_UP", "I_UP"
+      point_in_a_space = 0,14,0
+      point_in_b_space = 0,0,20
+
+   }
+
+   BlockNeighbors2 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "J_UP", "K_UP", "I_UP"
+      point_in_a_space = 0,14,0
+      point_in_b_space = 0,0,0
+
+   }
+
+   PatchHierarchy {
+      max_levels              = 2 // Maximum number of levels in hierarchy.
+      ratio_to_coarser {         // vector ratio to next coarser level
+         level_1               =  2 , 2 , 2
+         level_2               =  2 , 2 , 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2, 2, 2
+         // all finer levels will use same values as level_0...
+      }
+   }
+}
+
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+TreeLoadBalancer {
+// processors      = 1 , 1 
+   use_spatial_bin_pack = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (5,5,5) , (6,7,7) ]
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/test_inputs/side-2d-5blk.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/test_inputs/side-2d-5blk.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,277 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+Main {
+    dim = 2
+//
+// Log file information
+//
+    log_file_name  = "cell-test.log"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//    
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+// 
+//  test_to_run = "CellMultiblockTest"
+//  test_to_run = "EdgeMultiblockTest"
+//  test_to_run = "FaceMultiblockTest"
+//  test_to_run = "NodeMultiblockTest"
+    test_to_run = "SideMultiblockTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//  
+// Either refine test or coarsen test can be run, but not both.  This 
+// ensures proper validation of communicated data.  Default test is 
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors 
+// from coarser levels.  Coarsen test has no options as coarse patch 
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+ 
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+    
+}
+
+SideMultiblockTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each 
+   //                 array value at initialization and 
+   //                 against which interpolation is tested) 
+   //   
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.  
+   // 
+   //    Required input:  name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "NO_COARSEN"
+         refine_operator = "NO_REFINE"
+      }
+   }
+
+   RefinementData {
+   }
+
+}
+
+BlockGridGeometry0 {
+   domain_boxes = [ (0,0) , (19,19) ]
+}
+BlockGridGeometry1 {
+   domain_boxes = [ (0,0) , (19,19) ]
+}
+BlockGridGeometry2 {
+   domain_boxes = [ (0,0) , (19,19) ]
+}
+BlockGridGeometry3 {
+   domain_boxes = [ (0,0) , (19,19) ]
+}
+BlockGridGeometry4 {
+   domain_boxes = [ (0,0) , (19,19) ]
+}
+
+MultiblockPatchHierarchy {
+   num_blocks = 5
+
+   Singularity0 {
+      blocks = 0,1,2,3,4
+
+      sing_box_0 = [(20,20),(20,20)]
+      sing_box_1 = [(20,20),(20,20)]
+      sing_box_2 = [(20,-1),(20,-1)]
+      sing_box_3 = [(-1,-1),(-1,-1)]
+      sing_box_4 = [(-1,20),(-1,20)]
+   }
+ 
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "J_DOWN", "I_UP"
+      point_in_a_space = 20,0
+      point_in_b_space = 0,19
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      rotation_b_to_a = "J_UP", "I_DOWN"
+      point_in_a_space = 19,19
+      point_in_b_space = 20,-1
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors2 {
+      block_a = 0
+      block_b = 3
+
+      rotation_b_to_a = "I_UP", "J_UP"
+      point_in_a_space = 19,19
+      point_in_b_space = -1,-1
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors3 {
+      block_a = 0
+      block_b = 4
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN"
+      point_in_a_space = 0,19
+      point_in_b_space = 19,20
+
+   }
+
+   BlockNeighbors4 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN"
+      point_in_a_space = 19,0
+      point_in_b_space = 20,19
+
+   }
+
+   BlockNeighbors5 {
+      block_a = 1
+      block_b = 3
+
+      rotation_b_to_a = "I_UP", "J_UP"
+      point_in_a_space = 19,19
+      point_in_b_space = -1,-1
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors6 {
+      block_a = 1
+      block_b = 4
+
+      rotation_b_to_a = "J_DOWN", "I_UP"
+      point_in_a_space = 19,19
+      point_in_b_space = -1,20
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors7 {
+      block_a = 2
+      block_b = 3
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN"
+      point_in_a_space = 0,0
+      point_in_b_space = 19,-1
+
+   }
+
+   BlockNeighbors8 {
+      block_a = 2
+      block_b = 4
+
+      rotation_b_to_a = "I_UP", "J_UP"
+      point_in_a_space = 19,0
+      point_in_b_space = -1,20
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors9 {
+      block_a = 3
+      block_b = 4
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN"
+      point_in_a_space = 0,19
+      point_in_b_space = -1,0
+
+   }
+
+   PatchHierarchy {
+      max_levels              = 2 // Maximum number of levels in hierarchy.
+      ratio_to_coarser {         // vector ratio to next coarser level
+         level_1               =  2 , 2
+         level_2               =  2 , 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2, 2
+         // all finer levels will use same values as level_0...
+      }
+   }
+
+}
+
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+TreeLoadBalancer {
+// processors      = 1 , 1 
+   use_spatial_bin_pack = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (9,9) , (10,10) ]
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/test_inputs/side-3d-5blk.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/test_inputs/side-3d-5blk.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,277 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI cell data. 
+ *
+ ************************************************************************/
+
+Main {
+    dim = 3
+//
+// Log file information
+//
+    log_file_name  = "cell-test.log"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//    
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+// 
+//  test_to_run = "CellMultiblockTest"
+//  test_to_run = "EdgeMultiblockTest"
+//  test_to_run = "FaceMultiblockTest"
+//  test_to_run = "NodeMultiblockTest"
+    test_to_run = "SideMultiblockTest"
+//  test_to_run = "MultiVariableDataTest"
+
+//  
+// Either refine test or coarsen test can be run, but not both.  This 
+// ensures proper validation of communicated data.  Default test is 
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors 
+// from coarser levels.  Coarsen test has no options as coarse patch 
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+ 
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+    
+}
+
+SideMultiblockTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each 
+   //                 array value at initialization and 
+   //                 against which interpolation is tested) 
+   //   
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchDataTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.  
+   // 
+   //    Required input:  name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,0
+         coarsen_operator = "NO_COARSEN"
+         refine_operator = "NO_REFINE"
+      }
+   }
+
+   RefinementData {
+   }
+
+}
+
+BlockGridGeometry0 {
+   domain_boxes = [ (0,0,0) , (19,19,14) ]
+}
+BlockGridGeometry1 {
+   domain_boxes = [ (0,0,0) , (14,19,19) ]
+}
+BlockGridGeometry2 {
+   domain_boxes = [ (0,0,0) , (19,19,14) ]
+}
+BlockGridGeometry3 {
+   domain_boxes = [ (0,0,0) , (19,19,14) ]
+}
+BlockGridGeometry4 {
+   domain_boxes = [ (0,0,0) , (19,19,14) ]
+}
+
+MultiblockPatchHierarchy {
+   num_blocks = 5
+
+   Singularity0 {
+      blocks = 0,1,2,3,4
+
+      sing_box_0 = [(20,20,0),(20,20,14)]
+      sing_box_1 = [(0,20,20),(14,20,20)]
+      sing_box_2 = [(20,-1,0),(20,-1,14)]
+      sing_box_3 = [(-1,-1,0),(-1,-1,14)]
+      sing_box_4 = [(-1,20,0),(-1,20,14)]
+   }
+ 
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "K_DOWN", "J_UP", "I_UP"
+      point_in_a_space = 20,0,0
+      point_in_b_space = 0,0,19
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      rotation_b_to_a = "J_UP", "I_DOWN", "K_UP"
+      point_in_a_space = 19,19,0
+      point_in_b_space = 20,-1,0
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors2 {
+      block_a = 0
+      block_b = 3
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 19,19,0
+      point_in_b_space = -1,-1,0
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors3 {
+      block_a = 0
+      block_b = 4
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN", "K_UP"
+      point_in_a_space = 0,19,0
+      point_in_b_space = 19,20,0
+
+   }
+
+   BlockNeighbors4 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "K_UP", "I_DOWN", "J_DOWN"
+      point_in_a_space = 0,19,19
+      point_in_b_space = 20,0,0
+
+   }
+
+   BlockNeighbors5 {
+      block_a = 1
+      block_b = 3
+
+      rotation_b_to_a = "K_UP", "I_UP", "J_UP"
+      point_in_a_space = 0,19,19
+      point_in_b_space = -1,-1,0
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors6 {
+      block_a = 1
+      block_b = 4
+
+      rotation_b_to_a = "K_UP", "J_DOWN", "I_UP"
+      point_in_a_space = 0,19,19
+      point_in_b_space = -1,20,0
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors7 {
+      block_a = 2
+      block_b = 3
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN", "K_UP"
+      point_in_a_space = 0,0,0
+      point_in_b_space = 19,-1,0
+
+   }
+
+   BlockNeighbors8 {
+      block_a = 2
+      block_b = 4
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 19,0,0
+      point_in_b_space = -1,20,0
+      is_singularity = TRUE
+   }
+
+   BlockNeighbors9 {
+      block_a = 3
+      block_b = 4
+
+      rotation_b_to_a = "I_DOWN", "J_DOWN", "K_UP"
+      point_in_a_space = 0,19,0
+      point_in_b_space = -1,0,0
+
+   }
+
+   PatchHierarchy {
+      max_levels              = 2 // Maximum number of levels in hierarchy.
+      ratio_to_coarser {         // vector ratio to next coarser level
+         level_1               =  2 , 2, 2
+         level_2               =  2 , 2, 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2, 2, 2
+         // all finer levels will use same values as level_0...
+      }
+   }
+
+}
+
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+TreeLoadBalancer {
+// processors      = 1 , 1 
+   use_spatial_bin_pack = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (9,9,9) , (10,10,10) ]
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/test_inputs/side.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/test_inputs/side.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,198 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI side data. 
+ *
+ ************************************************************************/
+
+Main {
+    dim = 2
+//
+// Log file information
+//
+    log_file_name  = "side-test.log"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//    
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+// 
+//  test_to_run = "CellMultiblockTest"
+//  test_to_run = "EdgeMultiblockTest"
+//  test_to_run = "FaceMultiblockTest"
+//  test_to_run = "NodeMultiblockTest"
+  test_to_run = "SideMultiblockTest"
+//  test_to_run = "MultiVariableMultiblockTest"
+
+//  
+// Either refine test or coarsen test can be run, but not both.  This 
+// ensures proper validation of communicated data.  Default test is 
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors 
+// from coarser levels.  Coarsen test has no options as coarse patch 
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+ 
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+    
+}
+
+SideMultiblockTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each 
+   //                 array value at initialization and 
+   //                 against which interpolation is tested) 
+   //   
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchMultiblockTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.  
+   // 
+   //    Required input:  name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0
+         dst_ghosts = 1,1
+         coarsen_operator = "NO_COARSEN"
+         refine_operator = "NO_REFINE"
+      }
+   }
+
+   RefinementData {
+   }
+
+}
+
+BlockGridGeometry0 {
+   domain_boxes = [ (0,0) , (20,13) ]
+}
+BlockGridGeometry1 {
+   domain_boxes = [ (0,0) , (13,25) ]
+}
+BlockGridGeometry2 {
+   domain_boxes = [ (0,0) , (25,20) ]
+}
+
+MultiblockPatchHierarchy {
+   num_blocks = 3
+
+   Singularity0 {
+      blocks = 0,1,2
+
+      sing_box_0 = [(21,14),(21,14)]
+      sing_box_1 = [(14,26),(14,26)]
+      sing_box_2 = [(26,21),(26,21)]
+   }
+ 
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "J_DOWN", "I_UP"
+      point_in_a_space = 21,0
+      point_in_b_space = 0,25
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      rotation_b_to_a = "J_UP", "I_DOWN"
+      point_in_a_space = 0,14
+      point_in_b_space = 25,0
+
+   }
+
+   BlockNeighbors2 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "J_DOWN", "I_UP"
+      point_in_a_space = 14,0
+      point_in_b_space = 0,20
+
+   }
+
+   PatchHierarchy {
+      max_levels              = 2 // Maximum number of levels in hierarchy.
+      ratio_to_coarser {         // vector ratio to next coarser level
+         level_1               =  2 , 2
+         level_2               =  2 , 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2, 2
+         // all finer levels will use same values as level_0...
+      }
+   }
+}
+
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+TreeLoadBalancer {
+// processors      = 1 , 1 
+   use_spatial_bin_pack = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (3,3) , (4,4) ]
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/mblkcomm/test_inputs/side.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/mblkcomm/test_inputs/side.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,198 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   input file for testing communication of SAMRAI side data. 
+ *
+ ************************************************************************/
+
+Main {
+    dim = 3
+//
+// Log file information
+//
+    log_file_name  = "side-test.log"
+    log_all_nodes  = TRUE
+
+//
+// Testing information, including number of times to perform schedule
+// creation and communication processes, name of particular patch data
+// test, and refine and coarsen test information
+//    
+    ntimes_run = 1  // default is 1
+
+//
+// Available tests are:
+// 
+//  test_to_run = "CellMultiblockTest"
+//    test_to_run = "EdgeMultiblockTest"
+//    test_to_run = "FaceMultiblockTest"
+//    test_to_run = "NodeMultiblockTest"
+    test_to_run = "SideMultiblockTest"
+//  test_to_run = "MultiVariableMultiblockTest"
+
+//  
+// Either refine test or coarsen test can be run, but not both.  This 
+// ensures proper validation of communicated data.  Default test is 
+// to refine refine data with interior patch data filled from same level.
+// If `do_refine' is true, then refine test will occur and coarsen test
+// will not.  Refine test also allows option of filling patch interiors 
+// from coarser levels.  Coarsen test has no options as coarse patch 
+// interiors will always be filled with coarsened data from finer level.
+//
+    do_refine = TRUE
+    refine_option = "INTERIOR_FROM_SAME_LEVEL"
+ 
+    do_coarsen = FALSE
+}
+
+TimerManager {
+    timer_list = "test::main::*"
+
+// Available timers are:
+//
+//   "test::main::createRefineSchedule"
+//   "test::main::performRefineOperations"
+//   "test::main::createCoarsenSchedule"
+//   "test::main::performCoarsenOperations"
+//
+    
+}
+
+SideMultiblockTest {
+
+   //
+   // Anything specific to the test goes here...
+   //
+   // e.g., coefficients for linear function to interpolate
+   //          Ax + By + Cz + D = f(x,y,z)
+   //          (NOTE: f(x,y,z) is the value assigned to each 
+   //                 array value at initialization and 
+   //                 against which interpolation is tested) 
+   //   
+   Acoef = 2.1
+   Bcoef = 3.2
+   Ccoef = 4.3
+   Dcoef = 5.4
+
+   //
+   // The VariableData database is read in by the PatchMultiblockTestStrategy
+   // base class.  Each sub-database must contain variable parameter data.
+   // The name of the sub-databases for each variable is arbitrary.  But
+   // the names must be distinct.  
+   // 
+   //    Required input:  name
+   //    Optional input:  depth              (default = 1)
+   //                     src_ghosts         (default = 0,0,0)
+   //                     dst_ghosts         (default = 0,0,0)
+   //                     coarsen_operator   (default = "NO_COARSEN")
+   //                     refine_operator    (default = "NO_REFINE")
+   //
+   VariableData {
+
+      variable_1 {
+         src_name = "src_var1"
+         dst_name = "dst_var1"
+         depth = 1
+         src_ghosts = 0,0,0
+         dst_ghosts = 1,1,1
+         coarsen_operator = "NO_COARSEN"
+         refine_operator = "NO_REFINE"
+      }
+   }
+
+   RefinementData {
+   }
+
+}
+
+BlockGridGeometry0 {
+   domain_boxes = [ (0,0,0) , (20,13,15) ]
+}
+BlockGridGeometry1 {
+   domain_boxes = [ (0,0,0) , (25,13,15) ]
+}
+BlockGridGeometry2 {
+   domain_boxes = [ (0,0,0) , (20,15,25) ]
+}
+
+MultiblockPatchHierarchy {
+   num_blocks = 3
+
+   Singularity0 {
+      blocks = 0,1,2
+
+      sing_box_0 = [(21,14,0),(21,14,15)]
+      sing_box_1 = [(-1,14,0),(-1,14,15)]
+      sing_box_2 = [(21,0,26),(21,15,26)]
+   }
+ 
+   BlockNeighbors0 {
+      block_a = 0
+      block_b = 1
+
+      rotation_b_to_a = "I_UP", "J_UP", "K_UP"
+      point_in_a_space = 21,0,0
+      point_in_b_space = 0,0,0
+   }
+
+   BlockNeighbors1 {
+      block_a = 0
+      block_b = 2
+
+      rotation_b_to_a = "I_UP", "K_DOWN", "J_UP"
+      point_in_a_space = 0,14,0
+      point_in_b_space = 0,0,25
+
+   }
+
+   BlockNeighbors2 {
+      block_a = 1
+      block_b = 2
+
+      rotation_b_to_a = "K_DOWN", "I_DOWN", "J_UP"
+      point_in_a_space = 0,14,0
+      point_in_b_space = 20,0,25
+
+   }
+
+   PatchHierarchy {
+      max_levels              = 2 // Maximum number of levels in hierarchy.
+      ratio_to_coarser {         // vector ratio to next coarser level
+         level_1               =  2 , 2 , 2
+         level_2               =  2 , 2 , 2
+      }
+      largest_patch_size {
+         level_0 = 40, 40, 40
+         // all finer levels will use same values as level_0...
+      }
+      smallest_patch_size {
+         level_0 = 2, 2, 2
+         // all finer levels will use same values as level_0...
+      }
+   }
+}
+
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+TreeLoadBalancer {
+// processors      = 1 , 1 
+   use_spatial_bin_pack = TRUE
+}
+
+StandardTaggingAndInitializer {
+   tagging_method = "REFINE_BOXES"
+
+   RefineBoxes {
+      level_0 = [ (5,5,5) , (6,7,7) ]
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1625 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=ModifiedBratuProblem.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/ImplicitEquationStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/CoarseFineBoundary.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CartesianRobinBcHelper.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACOps.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACSolver.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACSolver.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACOperatorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/GhostCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/KINSOLAbstractFunctions.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PETScAbstractVectorReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PETSc_SAMRAIVectorReal.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PETSc_SAMRAIVectorReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SNESAbstractFunctions.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SimpleCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SundialsAbstractVector.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/Sundials_SAMRAIVector.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/Sundials_SAMRAIVector.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	ModifiedBratuFort.h ModifiedBratuProblem.C			\
+	ModifiedBratuProblem.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/PETScAbstractVectorReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PETSc_SAMRAIVectorReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=main.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/ImplicitEquationStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/ImplicitIntegrator.I			\
+	$(INCLUDE_SAM)/SAMRAI/algs/ImplicitIntegrator.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/CoarseFineBoundary.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BergerRigoutsos.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CartesianRobinBcHelper.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACOps.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACSolver.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACSolver.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACOperatorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/GhostCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/KINSOLAbstractFunctions.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/KINSOLSolver.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/KINSOL_SAMRAIContext.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/NonlinearSolverStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PETScAbstractVectorReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SNESAbstractFunctions.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SNES_SAMRAIContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SimpleCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SundialsAbstractVector.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	ModifiedBratuProblem.h main.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/PETScAbstractVectorReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=tbox_Pointer-CellPoissonFACSolver-NDIM.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/CoarseFineBoundary.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CartesianRobinBcHelper.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACOps.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACSolver.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACSolver.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACOperatorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/GhostCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SimpleCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	tbox_Pointer-CellPoissonFACSolver-NDIM.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=tbox_Pointer-ModifiedBratuProblem.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/ImplicitEquationStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/CoarseFineBoundary.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CartesianRobinBcHelper.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACOps.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACSolver.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACSolver.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACOperatorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/GhostCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/KINSOLAbstractFunctions.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PETScAbstractVectorReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SNESAbstractFunctions.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SimpleCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SundialsAbstractVector.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h		\
+	ModifiedBratuProblem.h tbox_Pointer-ModifiedBratuProblem.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/PETScAbstractVectorReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,256 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for nonlinear solver test 
+##
+#########################################################################
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/test/nonlinear
+VPATH         = @srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+default: check	
+
+include $(OBJECT)/config/Makefile.config
+
+CPPFLAGS_EXTRA= -DDISPLAY -DNDIM=$(PDIM)  -DTESTING=1
+
+CXX_OBJS      = main.o ModifiedBratuProblem.o  \
+	tbox_Pointer-CellPoissonFACSolver-NDIM.o tbox_Pointer-ModifiedBratuProblem.o
+F_OBJS      =	\
+	FACjacobian1d.o bcFluxCopy1d.o bcFluxFix1d.o bratufunc1d.o \
+	err1d.o evalBratu1d.o evalDiffusionCoef1d.o evalExponential1d.o evalF1d.o \
+	evalFaceFluxes1d.o evalJv1d.o evalSource1d.o setbc1d.o adjcrsfineoffdiag1d.o \
+	\
+	FACjacobian3d.o bcFluxCopy3d.o bcFluxFix3d.o bratufunc3d.o \
+	err3d.o evalBratu3d.o evalDiffusionCoef3d.o evalExponential3d.o evalF3d.o \
+	evalFaceFluxes3d.o evalJv3d.o evalSource3d.o setbc3d.o \
+	\
+	FACjacobian2d.o bcFluxCopy2d.o bcFluxFix2d.o bratufunc2d.o \
+	err2d.o evalBratu2d.o evalDiffusionCoef2d.o evalExponential2d.o evalF2d.o \
+	evalFaceFluxes2d.o evalJv2d.o evalSource2d.o setbc2d.o
+
+NUM_TESTS = 2
+
+TEST_NPROCS = @TEST_NPROCS@
+
+main:	$(CXX_OBJS) $(F_OBJS) $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) $(F_OBJS)	\
+	$(LIBSAMRAI) $(LDLIBS) -o main
+
+check:
+	$(MAKE) check2d
+	echo Skipping for now: $(MAKE) check3d
+
+check2d:	main
+	@for i in test_inputs/*2d*.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+check3dx:	main
+	@for i in test_inputs/*3d*.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+# Disable check3d from test, because it takes too long.
+# It can be run using check3dx
+check3d:	main
+
+checkcompile: main
+
+checktest:
+	rm -f makecheck.logfile
+	$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+	$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+	rm -f makecheck.logfile
+
+clean-check:
+	$(SAMCLEAN)
+
+clean:		clean-check
+	$(RM) *.o *.f main
+
+include $(SRCDIR)/Makefile.depend
+
+FORTRAN       = $(SRCDIR)/fortran
+M4DIRS        = -DFORTDIR=$(FORTRAN) $(SAMRAI_M4_FLAGS)
+
+FACjacobian1d.o:	$(FORTRAN)/FACjacobian1d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/FACjacobian1d.m4 > FACjacobian1d.f
+	$(F77) $(FFLAGS) -c FACjacobian1d.f -o $@
+
+adjcrsfineoffdiag1d.o:	$(FORTRAN)/adjcrsfineoffdiag1d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/adjcrsfineoffdiag1d.m4 > adjcrsfineoffdiag1d.f
+	$(F77) $(FFLAGS) -c adjcrsfineoffdiag1d.f -o $@
+
+bcFluxCopy1d.o:	$(FORTRAN)/bcFluxCopy1d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/bcFluxCopy1d.m4 > bcFluxCopy1d.f
+	$(F77) $(FFLAGS) -c bcFluxCopy1d.f -o $@
+
+bcFluxFix1d.o:	$(FORTRAN)/bcFluxFix1d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/bcFluxFix1d.m4 > bcFluxFix1d.f
+	$(F77) $(FFLAGS) -c bcFluxFix1d.f -o $@
+
+bratufunc1d.o:	$(FORTRAN)/bratufunc1d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/bratufunc1d.m4 > bratufunc1d.f
+	$(F77) $(FFLAGS) -c bratufunc1d.f -o $@
+
+err1d.o:	$(FORTRAN)/err1d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/err1d.m4 > err1d.f
+	$(F77) $(FFLAGS) -c err1d.f -o $@
+
+evalBratu1d.o:	$(FORTRAN)/evalBratu1d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/evalBratu1d.m4 > evalBratu1d.f
+	$(F77) $(FFLAGS) -c evalBratu1d.f -o $@
+
+evalDiffusionCoef1d.o:	$(FORTRAN)/evalDiffusionCoef1d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/evalDiffusionCoef1d.m4 > evalDiffusionCoef1d.f
+	$(F77) $(FFLAGS) -c evalDiffusionCoef1d.f -o $@
+
+evalExponential1d.o:	$(FORTRAN)/evalExponential1d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/evalExponential1d.m4 > evalExponential1d.f
+	$(F77) $(FFLAGS) -c evalExponential1d.f -o $@
+
+evalF1d.o:	$(FORTRAN)/evalF1d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/evalF1d.m4 > evalF1d.f
+	$(F77) $(FFLAGS) -c evalF1d.f -o $@
+
+evalFaceFluxes1d.o:	$(FORTRAN)/evalFaceFluxes1d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/evalFaceFluxes1d.m4 > evalFaceFluxes1d.f
+	$(F77) $(FFLAGS) -c evalFaceFluxes1d.f -o $@
+
+evalJv1d.o:	$(FORTRAN)/evalJv1d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/evalJv1d.m4 > evalJv1d.f
+	$(F77) $(FFLAGS) -c evalJv1d.f -o $@
+
+evalSource1d.o:	$(FORTRAN)/evalSource1d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/evalSource1d.m4 > evalSource1d.f
+	$(F77) $(FFLAGS) -c evalSource1d.f -o $@
+
+setbc1d.o:	$(FORTRAN)/setbc1d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/setbc1d.m4 > setbc1d.f
+	$(F77) $(FFLAGS) -c setbc1d.f -o $@
+
+
+FACjacobian2d.o:	$(FORTRAN)/FACjacobian2d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/FACjacobian2d.m4 > FACjacobian2d.f
+	$(F77) $(FFLAGS) -c FACjacobian2d.f -o $@
+
+adjcrsfineoffdiag2d.o:	$(FORTRAN)/adjcrsfineoffdiag2d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/adjcrsfineoffdiag2d.m4 > adjcrsfineoffdiag2d.f
+	$(F77) $(FFLAGS) -c adjcrsfineoffdiag2d.f -o $@
+
+bcFluxCopy2d.o:	$(FORTRAN)/bcFluxCopy2d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/bcFluxCopy2d.m4 > bcFluxCopy2d.f
+	$(F77) $(FFLAGS) -c bcFluxCopy2d.f -o $@
+
+bcFluxFix2d.o:	$(FORTRAN)/bcFluxFix2d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/bcFluxFix2d.m4 > bcFluxFix2d.f
+	$(F77) $(FFLAGS) -c bcFluxFix2d.f -o $@
+
+bratufunc2d.o:	$(FORTRAN)/bratufunc2d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/bratufunc2d.m4 > bratufunc2d.f
+	$(F77) $(FFLAGS) -c bratufunc2d.f -o $@
+
+err2d.o:	$(FORTRAN)/err2d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/err2d.m4 > err2d.f
+	$(F77) $(FFLAGS) -c err2d.f -o $@
+
+evalBratu2d.o:	$(FORTRAN)/evalBratu2d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/evalBratu2d.m4 > evalBratu2d.f
+	$(F77) $(FFLAGS) -c evalBratu2d.f -o $@
+
+evalDiffusionCoef2d.o:	$(FORTRAN)/evalDiffusionCoef2d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/evalDiffusionCoef2d.m4 > evalDiffusionCoef2d.f
+	$(F77) $(FFLAGS) -c evalDiffusionCoef2d.f -o $@
+
+evalExponential2d.o:	$(FORTRAN)/evalExponential2d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/evalExponential2d.m4 > evalExponential2d.f
+	$(F77) $(FFLAGS) -c evalExponential2d.f -o $@
+
+evalF2d.o:	$(FORTRAN)/evalF2d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/evalF2d.m4 > evalF2d.f
+	$(F77) $(FFLAGS) -c evalF2d.f -o $@
+
+evalFaceFluxes2d.o:	$(FORTRAN)/evalFaceFluxes2d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/evalFaceFluxes2d.m4 > evalFaceFluxes2d.f
+	$(F77) $(FFLAGS) -c evalFaceFluxes2d.f -o $@
+
+evalJv2d.o:	$(FORTRAN)/evalJv2d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/evalJv2d.m4 > evalJv2d.f
+	$(F77) $(FFLAGS) -c evalJv2d.f -o $@
+
+evalSource2d.o:	$(FORTRAN)/evalSource2d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/evalSource2d.m4 > evalSource2d.f
+	$(F77) $(FFLAGS) -c evalSource2d.f -o $@
+
+setbc2d.o:	$(FORTRAN)/setbc2d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/setbc2d.m4 > setbc2d.f
+	$(F77) $(FFLAGS) -c setbc2d.f -o $@
+
+
+FACjacobian3d.o:	$(FORTRAN)/FACjacobian3d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/FACjacobian3d.m4 > FACjacobian3d.f
+	$(F77) $(FFLAGS) -c FACjacobian3d.f -o $@
+
+adjcrsfineoffdiag3d.o:	$(FORTRAN)/adjcrsfineoffdiag3d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/adjcrsfineoffdiag3d.m4 > adjcrsfineoffdiag3d.f
+	$(F77) $(FFLAGS) -c adjcrsfineoffdiag3d.f -o $@
+
+bcFluxCopy3d.o:	$(FORTRAN)/bcFluxCopy3d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/bcFluxCopy3d.m4 > bcFluxCopy3d.f
+	$(F77) $(FFLAGS) -c bcFluxCopy3d.f -o $@
+
+bcFluxFix3d.o:	$(FORTRAN)/bcFluxFix3d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/bcFluxFix3d.m4 > bcFluxFix3d.f
+	$(F77) $(FFLAGS) -c bcFluxFix3d.f -o $@
+
+bratufunc3d.o:	$(FORTRAN)/bratufunc3d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/bratufunc3d.m4 > bratufunc3d.f
+	$(F77) $(FFLAGS) -c bratufunc3d.f -o $@
+
+err3d.o:	$(FORTRAN)/err3d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/err3d.m4 > err3d.f
+	$(F77) $(FFLAGS) -c err3d.f -o $@
+
+evalBratu3d.o:	$(FORTRAN)/evalBratu3d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/evalBratu3d.m4 > evalBratu3d.f
+	$(F77) $(FFLAGS) -c evalBratu3d.f -o $@
+
+evalDiffusionCoef3d.o:	$(FORTRAN)/evalDiffusionCoef3d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/evalDiffusionCoef3d.m4 > evalDiffusionCoef3d.f
+	$(F77) $(FFLAGS) -c evalDiffusionCoef3d.f -o $@
+
+evalExponential3d.o:	$(FORTRAN)/evalExponential3d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/evalExponential3d.m4 > evalExponential3d.f
+	$(F77) $(FFLAGS) -c evalExponential3d.f -o $@
+
+evalF3d.o:	$(FORTRAN)/evalF3d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/evalF3d.m4 > evalF3d.f
+	$(F77) $(FFLAGS) -c evalF3d.f -o $@
+
+evalFaceFluxes3d.o:	$(FORTRAN)/evalFaceFluxes3d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/evalFaceFluxes3d.m4 > evalFaceFluxes3d.f
+	$(F77) $(FFLAGS) -c evalFaceFluxes3d.f -o $@
+
+evalJv3d.o:	$(FORTRAN)/evalJv3d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/evalJv3d.m4 > evalJv3d.f
+	$(F77) $(FFLAGS) -c evalJv3d.f -o $@
+
+evalSource3d.o:	$(FORTRAN)/evalSource3d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/evalSource3d.m4 > evalSource3d.f
+	$(F77) $(FFLAGS) -c evalSource3d.f -o $@
+
+setbc3d.o:	$(FORTRAN)/setbc3d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/setbc3d.m4 > setbc3d.f
+	$(F77) $(FFLAGS) -c setbc3d.f -o $@
+
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/ModifiedBratuFort.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/ModifiedBratuFort.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,941 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Fortran function declarations for modified-Bratu problem 
+ *
+ ************************************************************************/
+
+// Header file to define interfaces between Fortran and C++ code for
+// the ModifiedBratuProblem class.
+
+#ifndef included_modifiedBratuFort
+#define included_modifiedBratuFort
+
+extern "C"
+{
+
+// 1D
+
+#define FORT_FILL1D fill1d_
+#define FORT_EVALBRATU1D evalbratu1d_
+#define FORT_EVALDIFFUSION1D evaldiffusioncoef1d_
+#define FORT_EVALEXPONENTIAL1D evalexponential1d_
+#define FORT_EVALFACEFLUXES1D evalfacefluxes1d_
+#define FORT_EVALSOURCE1D evalsource1d_
+#define FORT_EWBCFLUXFIX1D ewbcfluxfix1d_
+#define FORT_NSBCFLUXFIX1D nsbcfluxfix1d_
+#define FORT_TBBCFLUXFIX1D tbbcfluxfix1d_
+#define FORT_EWFLUXCOPY1D ewfluxcopy1d_
+#define FORT_NSFLUXCOPY1D nsfluxcopy1d_
+#define FORT_TBFLUXCOPY1D tbfluxcopy1d_
+#define FORT_BRATUJV1D bratujv1d_
+#define FORT_SETBC1D setbc1d_
+#define FORT_ERROR1D error1d_
+#define FORT_EVALF1D evalf1d_
+#define FORT_PROLONG1D prolong1d_
+
+void
+FORT_FILL1D(
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const int&);
+
+void
+FORT_EVALBRATU1D(
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double&,
+   const double *);
+
+void
+FORT_EVALDIFFUSION1D(
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *,
+   const double *);
+
+void
+FORT_EVALEXPONENTIAL1D(
+   const int&,
+   const int&,
+   const double *,
+   const double&,
+   const double *);
+
+void
+FORT_EVALFACEFLUXES1D(
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *,
+   const double *);
+
+void
+FORT_EVALSOURCE1D(
+   const int&,
+   const int&,
+   const double&,
+   const double *,
+   const double *,
+   const double *,
+   const double&,
+   const double *);
+
+void
+FORT_EWBCFLUXFIX1D(
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *,
+   const int *,
+   const int *,
+   const int&);
+
+void
+FORT_EWFLUXCOPY1D(
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const int&);
+
+void
+FORT_BRATUJV1D(
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double&,
+   const double *);
+
+void
+FORT_SETBC1D(
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const int *,
+   const int *,
+   const int&);
+
+void
+FORT_ERROR1D(
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double&,
+   const double *,
+   const double *,
+   const double *,
+   const double&,
+   const double&,
+   const double&);
+
+void
+FORT_EVALF1D(
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *,
+   const double *);
+
+void
+FORT_VAXPY1D(
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *);
+
+void F77_FUNC(compfacdiag1d, COMPFACDIAG1D) (const int &, const int &,
+   const double &, const double &,
+   const double *, const double *,
+   double *);
+
+void F77_FUNC(compfacoffdiag1d, COMPFACOFFDIAG1D) (const int &, const int &,
+   const double &, const double &,
+   const double *,
+   double *);
+
+void F77_FUNC(compdiffcoef1d, COMPDIFFCOEF1D) (const int &, const int &,
+   const double *, const double *,
+   const double &,
+   double *);
+
+void F77_FUNC(compexpu1d, COMPEXPU1D) (const int &, const int &,
+   const int &,
+   const double &,
+   const double *,
+   double *);
+
+void F77_FUNC(compsrc1d, COMPSRC1D) (const int &, const int &,
+   const int &,
+   const double *, const double *, const double &,
+   const double &,
+   const double *,
+   double *);
+
+void F77_FUNC(compsrcderv1d, COMPSRCDERV1D) (const int &, const int &,
+   const int &,
+   const double *, const double *, const double &,
+   const double &,
+   const double *,
+   double *);
+
+void F77_FUNC(compsideflux1d, COMPSIDEFLUX1D) (const int &, const int &,
+   const int &,
+   const double *,
+   const double *,
+   const double *,
+   double *);
+
+void F77_FUNC(fluxbdryfix1d, FLUXBDRYFIX1D) (const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   const double &,
+   double *);
+
+void F77_FUNC(fluxcopy01d, FLUXCOPY01D) (const int &, const int &,
+   const int &,
+   const double *,
+   double *);
+
+void F77_FUNC(compresidual1d, COMPRESIDUAL1D) (const int &, const int &,
+   const int &,
+   const double *, const double &,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   double *);
+
+// Bonus function
+
+void F77_FUNC(adjcrsfineoffdiag1d, ADJCRSFINEOFFDIAG1D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   double *);
+
+// 2D
+
+#define FORT_FILL2D fill2d_
+#define FORT_EVALBRATU2D evalbratu2d_
+#define FORT_EVALDIFFUSION2D evaldiffusioncoef2d_
+#define FORT_EVALEXPONENTIAL2D evalexponential2d_
+#define FORT_EVALFACEFLUXES2D evalfacefluxes2d_
+#define FORT_EVALSOURCE2D evalsource2d_
+#define FORT_EWBCFLUXFIX2D ewbcfluxfix2d_
+#define FORT_NSBCFLUXFIX2D nsbcfluxfix2d_
+#define FORT_TBBCFLUXFIX2D tbbcfluxfix2d_
+#define FORT_EWFLUXCOPY2D ewfluxcopy2d_
+#define FORT_NSFLUXCOPY2D nsfluxcopy2d_
+#define FORT_TBFLUXCOPY2D tbfluxcopy2d_
+#define FORT_BRATUJV2D bratujv2d_
+#define FORT_SETBC2D setbc2d_
+#define FORT_ERROR2D error2d_
+#define FORT_EVALF2D evalf2d_
+#define FORT_PROLONG2D prolong2d_
+
+void
+FORT_FILL2D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const int&);
+
+void
+FORT_EVALBRATU2D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double&,
+   const double *);
+
+void
+FORT_EVALDIFFUSION2D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double *);
+
+void
+FORT_EVALEXPONENTIAL2D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double&,
+   const double *);
+
+void
+FORT_EVALFACEFLUXES2D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double *);
+
+void
+FORT_EVALSOURCE2D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double&,
+   const double *,
+   const double *,
+   const double *,
+   const double&,
+   const double *);
+
+void
+FORT_EWBCFLUXFIX2D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *,
+   const int *,
+   const int *,
+   const int&);
+
+void
+FORT_NSBCFLUXFIX2D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *,
+   const int *,
+   const int *,
+   const int&);
+
+void
+FORT_EWFLUXCOPY2D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const int&);
+
+void
+FORT_NSFLUXCOPY2D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const int&);
+
+void
+FORT_BRATUJV2D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double&,
+   const double *);
+
+void
+FORT_SETBC2D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const int *,
+   const int *,
+   const int&);
+
+void
+FORT_ERROR2D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double&,
+   const double *,
+   const double *,
+   const double *,
+   const double&,
+   const double&,
+   const double&);
+
+void
+FORT_EVALF2D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *,
+   const double *);
+
+void
+FORT_VAXPY2D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *);
+
+/* These functions are in FACjacobian.m4 */
+
+void F77_FUNC(compjv2d, COMPJV2D) (
+   const int & ifirst0, const int & ilast0,
+   const int & ifirst1, const int & ilast1,
+   const int & gwc,
+   const double* diag,
+   const double* flux0, const double* flux1,
+   const double* v,
+   const double* dx,
+   const double & dt,
+   double* jv);
+
+void F77_FUNC(compfacdiag2d, COMPFACDIAG2D) (const int &, const int &,
+   const int &, const int &,
+   const double &, const double &,
+   const double *, const double *,
+   double *);
+
+void F77_FUNC(compfacoffdiag2d, COMPFACOFFDIAG2D) (const int &, const int &,
+   const int &, const int &,
+   const double &, const double &,
+   const double *, const double *,
+   double *, double *);
+
+void F77_FUNC(compdiffcoef2d, COMPDIFFCOEF2D) (const int &, const int &,
+   const int &, const int &,
+   const double *, const double *,
+   const double &,
+   double *, double *);
+
+void F77_FUNC(compexpu2d, COMPEXPU2D) (const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double &,
+   const double *,
+   double *);
+
+void F77_FUNC(compsrc2d, COMPSRC2D) (const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double *, const double *, const double &,
+   const double &,
+   const double *,
+   double *);
+
+void F77_FUNC(compsrcderv2d, COMPSRCDERV2D) (const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double *, const double *, const double &,
+   const double &,
+   const double *,
+   double *);
+
+void F77_FUNC(compsideflux2d, COMPSIDEFLUX2D) (const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double *,
+   const double *, const double *,
+   const double *,
+   double *, double *);
+
+void F77_FUNC(fluxbdryfix2d, FLUXBDRYFIX2D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   const double &,
+   double *, double *);
+
+void F77_FUNC(fluxcopy02d, FLUXCOPY02D) (const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double *,
+   double *);
+
+void F77_FUNC(fluxcopy12d, FLUXCOPY12D) (const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double *,
+   double *);
+
+void F77_FUNC(compresidual2d, COMPRESIDUAL2D) (const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double *, const double &,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double *, const double *,
+   double *);
+
+// 3D
+
+#define FORT_FILL3D fill3d_
+#define FORT_EVALBRATU3D evalbratu3d_
+#define FORT_EVALDIFFUSION3D evaldiffusioncoef3d_
+#define FORT_EVALEXPONENTIAL3D evalexponential3d_
+#define FORT_EVALFACEFLUXES3D evalfacefluxes3d_
+#define FORT_EVALSOURCE3D evalsource3d_
+#define FORT_EWBCFLUXFIX3D ewbcfluxfix3d_
+#define FORT_NSBCFLUXFIX3D nsbcfluxfix3d_
+#define FORT_TBBCFLUXFIX3D tbbcfluxfix3d_
+#define FORT_EWFLUXCOPY3D ewfluxcopy3d_
+#define FORT_NSFLUXCOPY3D nsfluxcopy3d_
+#define FORT_TBFLUXCOPY3D tbfluxcopy3d_
+#define FORT_BRATUJV3D bratujv3d_
+#define FORT_SETBC3D setbc3d_
+#define FORT_ERROR3D error3d_
+#define FORT_EVALF3D evalf3d_
+#define FORT_PROLONG3D prolong3d_
+
+void
+FORT_FILL3D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const int&);
+
+void
+FORT_EVALBRATU3D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double&,
+   const double *);
+
+void
+FORT_EVALDIFFUSION3D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double *);
+
+void
+FORT_EVALEXPONENTIAL3D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double&,
+   const double *);
+
+void
+FORT_EVALFACEFLUXES3D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double *);
+
+void
+FORT_EVALSOURCE3D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double&,
+   const double *,
+   const double *,
+   const double *,
+   const double&,
+   const double *);
+
+void
+FORT_EWBCFLUXFIX3D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *,
+   const int *,
+   const int *,
+   const int&);
+
+void
+FORT_NSBCFLUXFIX3D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *,
+   const int *,
+   const int *,
+   const int&);
+
+void
+FORT_TBBCFLUXFIX3D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *,
+   const int *,
+   const int *,
+   const int&);
+
+void
+FORT_EWFLUXCOPY3D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const int&);
+
+void
+FORT_NSFLUXCOPY3D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const int&);
+
+void
+FORT_TBFLUXCOPY3D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const int&);
+
+void
+FORT_BRATUJV3D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double&,
+   const double *);
+
+void
+FORT_SETBC3D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const int *,
+   const int *,
+   const int&);
+
+void
+FORT_ERROR3D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double&,
+   const double *,
+   const double *,
+   const double *,
+   const double&,
+   const double&,
+   const double&);
+
+void
+FORT_EVALF3D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *,
+   const double *);
+
+void
+FORT_VAXPY3D(
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const int&,
+   const double *,
+   const double *,
+   const double *);
+
+/* These functions are in FACjacobian.m4 */
+
+void F77_FUNC(compjv3d, COMPJV3D) (
+   const int & ifirst0, const int & ilast0,
+   const int & ifirst1, const int & ilast1,
+   const int & ifirst2, const int & ilast2,
+   const int & gwc,
+   const double* diag,
+   const double* flux0, const double* flux1, const double* flux2,
+   const double* v,
+   const double* dx,
+   const double & dt,
+   double* jv);
+
+void F77_FUNC(compfacdiag3d, COMPFACDIAG3D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &, const double &,
+   const double *, const double *,
+   double *);
+void F77_FUNC(compfacoffdiag3d, COMPFACOFFDIAG3D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &, const double &,
+   const double *, const double *, const double *,
+   double *, double *, double *);
+
+void F77_FUNC(compdiffcoef3d, COMPDIFFCOEF3D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double *, const double *,
+   const double &,
+   double *, double *, double *);
+
+void F77_FUNC(compexpu3d, COMPEXPU3D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double &,
+   const double *,
+   double *);
+
+void F77_FUNC(compsrc3d, COMPSRC3D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double *, const double *, const double &,
+   const double &,
+   const double *,
+   double *);
+
+void F77_FUNC(compsrcderv3d, COMPSRCDERV3D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double *, const double *, const double &,
+   const double &,
+   const double *,
+   double *);
+
+void F77_FUNC(compsideflux3d, COMPSIDEFLUX3D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double *,
+   const double *, const double *, const double *,
+   const double *,
+   double *, double *, double *);
+
+void F77_FUNC(fluxbdryfix3d, FLUXBDRYFIX3D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   const double &,
+   double *, double *, double *);
+
+void F77_FUNC(fluxcopy03d, FLUXCOPY03D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double *,
+   double *);
+void F77_FUNC(fluxcopy13d, FLUXCOPY13D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double *,
+   double *);
+
+void F77_FUNC(compresidual3d, COMPRESIDUAL3D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const double *, const double &,
+   const double *,
+   const double *,
+   const double *,
+   const double *,
+   const double *, const double *, const double *,
+   double *);
+
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/ModifiedBratuProblem.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/ModifiedBratuProblem.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,2897 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Class containing numerical routines for modified Bratu problem 
+ *
+ ************************************************************************/
+
+#include "ModifiedBratuProblem.h"
+#include "ModifiedBratuFort.h"
+
+#if defined(HAVE_PETSC) && defined(HAVE_SUNDIALS) && defined(HAVE_HYPRE)
+
+#include <iostream>
+#include <iomanip>
+#include <fstream>
+
+#ifndef LACKS_SSTREAM
+#ifndef included_sstream
+#define included_sstream
+#include <sstream>
+#endif
+#else
+#ifndef included_strstream
+#define included_strstream
+#include <strstream>
+#endif
+#endif
+
+using namespace SAMRAI;
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+
+#include <float.h>
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/math/HierarchyCellDataOpsReal.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/OutersideData.h"
+#include "SAMRAI/math/PatchCellDataOpsReal.h"
+#include "SAMRAI/xfer/RefineSchedule.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/pdat/SideIndex.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+#include "SAMRAI/solv/Sundials_SAMRAIVector.h"
+#include "SAMRAI/solv/PETSc_SAMRAIVectorReal.h"
+
+#define MODIFIED_BRATU_PROBLEM (1)
+
+// Define for number of ghost cells on solution quantity
+#define NUM_GHOSTS_U (1)
+
+tbox::Pointer<tbox::Timer> ModifiedBratuProblem::s_copy_timer;
+tbox::Pointer<tbox::Timer> ModifiedBratuProblem::s_pc_timer;
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Constructor and destructor for Modified Bratu Problem class.          *
+ *                                                                       *
+ * The problem we solve is:                                              *
+ *                                                                       *
+ *     du/dt = div( D(x,t)*grad(u) ) + lambda * exp(u) + f(u,x,t).       *
+ *                                                                       *
+ * The unknown u is a cell-centered variable.  The time discretization   *
+ * uses the backward Euler strategy.  We use a standard 7-point stencil  *
+ * (based on the finite volume meethod) for the div(D*grad(u)) term.     *
+ *                                                                       *
+ * The variables used here to manage data for the discrete problem are:  *
+ *                                                                       *
+ *    solution ........... unknown quantity "u"                          *
+ *    source_term ........ source term "f"                               *
+ *    exponential_term ... product "lambda * exp(u)"                     *
+ *    diffusion_coef ..... diffusion coefficient "D"                     *
+ *                                                                       *
+ * Other quantities used in the solution process:                        *
+ *                                                                       *
+ *    weight.............. weights for solution vector entries on grid   *
+ *    flux................ side-centered fluxes "D * grad(u)"            *
+ *    coarse_fine_flux.... fluxes at coarse-fine interfaces              *
+ *    jacobian_a.......... Jacobian entries for FAC solver               *
+ *    jacobian_b.......... Jacobian entries for FAC solver               *
+ *                                                                       *
+ * The constructor creates these variables to represent the solution     *
+ * and other quantities on the patch hierarchy.  The solution quantity   *
+ * is managed using three variable contexts, "CURRENT", "NEW", and       *
+ * "SCRATCH".  CURRENT and NEW represent the current and new values of   *
+ * the solution, respectively.  They have no ghost cells.  The SCRATCH   *
+ * context is where most of the computations involving the spatial       *
+ * discretization stencil occur.  This storage has a ghost cell width    *
+ * of one.  All other quantities are managed using only the SCRATCH      *
+ * context.  However, they all have zero ghost cell widths.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+ModifiedBratuProblem::ModifiedBratuProblem(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> input_db,
+   tbox::Pointer<geom::CartesianGridGeometry> grid_geometry,
+   tbox::Pointer<appu::VisItDataWriter> visit_writer):
+   RefinePatchStrategy(dim),
+   CoarsenPatchStrategy(dim),
+   d_dim(dim),
+   d_jacobian_a_id(-1),
+   d_jacobian_b_id(-1),
+   d_precond_a_id(-1),
+   d_precond_b_id(-1),
+   d_nghosts(d_dim),
+   d_fill_new_level(d_dim),
+   d_soln_fill(d_dim),
+   d_flux_coarsen(d_dim),
+   d_soln_coarsen(d_dim),
+   d_scratch_soln_coarsen(d_dim)
+{
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!input_db.isNull());
+   TBOX_ASSERT(!grid_geometry.isNull());
+
+   d_object_name = object_name;
+   tbox::RestartManager::getManager()->registerRestartItem(d_object_name, this);
+
+   d_grid_geometry = grid_geometry;
+
+   /*
+    * Set default values for data members.
+    */
+   d_current_time =
+      d_current_dt =
+         d_new_time =
+            d_lambda =
+               d_input_dt = tbox::MathUtilities<double>::getSignalingNaN();
+
+   d_max_precond_its = tbox::MathUtilities<int>::getMax();
+   d_precond_tol = tbox::MathUtilities<double>::getSignalingNaN();
+
+   getFromInput(input_db,
+      false);
+
+   d_FAC_solver = (solv::CellPoissonFACSolver *)NULL;
+
+   hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+
+   d_current = variable_db->getContext("CURRENT");
+   d_new = variable_db->getContext("NEW");
+   d_scratch = variable_db->getContext("SCRATCH");
+
+   /*
+    * Create variables used in the discrete problem.  Register variables
+    * and contexts with variable database to retrieve their descriptor
+    * indices for data management.
+    */
+
+   d_nghosts = hier::IntVector(d_dim, NUM_GHOSTS_U);
+
+   d_solution = new pdat::CellVariable<double>(d_dim,
+                                               d_object_name + "solution",
+                                               1);
+
+   int soln_id = variable_db->registerVariableAndContext(d_solution,
+         d_current,
+         hier::IntVector(d_dim, 0));
+   if (!visit_writer.isNull()) {
+      visit_writer->registerPlotQuantity("U", "SCALAR", soln_id);
+   }
+   int soln_new_id = variable_db->registerVariableAndContext(d_solution,
+         d_new,
+         hier::IntVector(d_dim, 0));
+   d_soln_scratch_id = variable_db->registerVariableAndContext(d_solution,
+         d_scratch,
+         d_nghosts);
+
+   /*
+    *hier::Variable to weight solution vector entries on a composite grid.
+    */
+
+   d_weight = new pdat::CellVariable<double>(d_dim, d_object_name + "weight", 1);
+
+   d_weight_id = variable_db->registerVariableAndContext(d_weight,
+         d_scratch,
+         hier::IntVector(d_dim, 0));
+
+   /*
+    * Other variables used in discrete problem.
+    */
+
+   d_source_term = new pdat::CellVariable<double>(d_dim,
+                                                  d_object_name + "source_term",
+                                                  1);
+
+   int source_id = variable_db->registerVariableAndContext(d_source_term,
+         d_scratch,
+         hier::IntVector(d_dim, 0));
+
+   d_exponential_term =
+      new pdat::CellVariable<double>(d_dim,
+                                     d_object_name + "exponential_term",
+                                     1);
+
+   int exp_id = variable_db->registerVariableAndContext(d_exponential_term,
+         d_scratch,
+         hier::IntVector(d_dim, 0));
+
+   d_diffusion_coef =
+      new pdat::SideVariable<double>(d_dim, d_object_name + "diffusion_coef", 1);
+
+   int diffcoef_id = variable_db->registerVariableAndContext(d_diffusion_coef,
+         d_scratch,
+         hier::IntVector(d_dim, 0));
+
+   d_flux = new pdat::SideVariable<double>(d_dim, d_object_name + "flux", 1);
+
+   d_flux_id = variable_db->registerVariableAndContext(d_flux,
+         d_scratch,
+         hier::IntVector(d_dim, 0));
+
+   d_coarse_fine_flux =
+      new pdat::OutersideVariable<double>(d_dim,
+                                          d_object_name + "coarse_fine_flux",
+                                          1);
+
+   d_coarse_fine_flux_id =
+      variable_db->registerVariableAndContext(d_coarse_fine_flux,
+         d_scratch,
+         hier::IntVector(d_dim, 0));
+
+   /*
+    * Variables for A(x)z=r preconditioning.
+    */
+   d_precond_a = new pdat::CellVariable<double>(d_dim,
+                                                d_object_name + "precond_a",
+                                                1);
+   d_precond_a_id = variable_db->registerVariableAndContext(d_precond_a,
+         d_scratch,
+         hier::IntVector(d_dim, 0));
+   d_precond_b = new pdat::FaceVariable<double>(d_dim,
+                                                d_object_name + "precond_b",
+                                                1);
+   d_precond_b_id = variable_db->registerVariableAndContext(d_precond_b,
+         d_scratch,
+         hier::IntVector(d_dim, 0));
+
+   /*
+    * Variables for A(x)*v operations.
+    */
+   d_jacobian_a =
+      new pdat::CellVariable<double>(d_dim, d_object_name + ":jacobian_a", 1);
+   d_jacobian_a_id = variable_db->registerVariableAndContext(d_jacobian_a,
+         d_scratch,
+         hier::IntVector(d_dim, 0));
+   d_jacobian_b =
+      new pdat::FaceVariable<double>(d_dim, d_object_name + ":jacobian_b", 1);
+   d_jacobian_b_id = variable_db->registerVariableAndContext(d_jacobian_b,
+         d_scratch,
+         hier::IntVector(d_dim, 0));
+
+   /*
+    * ComponentSelectors are used to allocate and deallocate storage for
+    * variables on the patch hierarchy in groups.  This reduces the
+    * complexity of tracking each individual data index.   Storage
+    * for the time evolving solution is managed collectively and
+    * auxiliary quantities used in nonlinear function evaluation.  These
+    * latter quantities could be placed in a separate hier::ComponentSelector
+    * and allocated only when needed, but we chose not to add that
+    * for this simple problem.  Data needed to correctly compute
+    * fluxes at coarse/fine interfaces is also managed collectively
+    * and is only allocated when needed.  Finally data to form the
+    * Jacobian is also grouped together.
+    */
+
+   d_new_patch_problem_data.setFlag(soln_id);
+
+   d_problem_data.setFlag(soln_new_id);
+   d_problem_data.setFlag(d_soln_scratch_id);
+
+   d_problem_data.setFlag(d_weight_id);
+
+   d_problem_data.setFlag(source_id);
+   d_problem_data.setFlag(exp_id);
+   d_problem_data.setFlag(diffcoef_id);
+
+   d_jacobian_data.setFlag(d_jacobian_a_id);
+   d_jacobian_data.setFlag(d_jacobian_b_id);
+
+   d_precond_data.setFlag(d_precond_a_id);
+   d_precond_data.setFlag(d_precond_b_id);
+
+   /*
+    * Refine and coarsen algorithms used to solve the problem.
+    *
+    *    d_fill_new_level :
+    *
+    *       When new levels are created in the hierarchy (e.g., after
+    *       regridding), the "CURRENT" solution state is initialized in
+    *       new fine regions by using linear interpolation from coarser
+    *       levels.
+    *
+    *    d_flux_coarsen:
+    *
+    *       Used to coarsen fluxes at coarse-fine interfaces during
+    *       nonlinear function evaluation.
+    */
+
+   d_soln_refine_op =
+      grid_geometry->lookupRefineOperator(d_solution,
+         "LINEAR_REFINE");
+
+   d_fill_new_level.registerRefine(soln_id,
+      soln_id,
+      d_soln_scratch_id,
+      d_soln_refine_op);
+
+   d_soln_coarsen_op =
+      grid_geometry->lookupCoarsenOperator(d_solution,
+         "CONSERVATIVE_COARSEN");
+
+   tbox::Pointer<CoarsenOperator> flux_coarsen_op =
+      grid_geometry->lookupCoarsenOperator(d_coarse_fine_flux,
+         "CONSERVATIVE_COARSEN");
+
+   /*
+    * Register the transfer algorithms so we can create
+    * schedules when we have info on the hierarchy (in
+    * resetHierarchyConfiguration).
+    */
+
+   d_scratch_soln_coarsen.registerCoarsen(d_soln_scratch_id,
+      d_soln_scratch_id,
+      d_soln_coarsen_op);
+
+   d_soln_coarsen.registerCoarsen(soln_id,
+      soln_id,
+      d_soln_coarsen_op);
+
+   d_flux_coarsen.registerCoarsen(d_flux_id,
+      d_coarse_fine_flux_id,
+      flux_coarsen_op);
+
+   d_soln_fill.registerRefine(d_soln_scratch_id,
+      soln_new_id,
+      d_soln_scratch_id,
+      d_soln_refine_op);
+
+   s_copy_timer = tbox::TimerManager::getManager()->
+      getTimer("apps::usrFcns::evaluateBratuFunction");
+   s_pc_timer = tbox::TimerManager::getManager()
+      ->getTimer("apps::usrFcns::applyBratuPreconditioner");
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The destructor does nothing interesting.                              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+ModifiedBratuProblem::~ModifiedBratuProblem()
+{
+   d_FAC_solver.setNull();
+   s_copy_timer.setNull();
+   s_pc_timer.setNull();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The vector used in the nonlinear iteration to advance the data        *
+ * includes only the "NEW" solution values.  In other words, we          *
+ * know the "CURRENT" solution and we advance to the "NEW" solution.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ModifiedBratuProblem::setupSolutionVector(
+   tbox::Pointer<solv::SAMRAIVectorReal<double> > solution)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!solution.isNull());
+#endif
+
+   d_solution_vector = solution;
+
+   solution->addComponent(d_solution,
+      hier::VariableDatabase::getDatabase()->
+      mapVariableAndContextToIndex(d_solution, d_new),
+      d_weight_id);
+}
+
+/*
+ * Vector weights are used to calculate inner products and norms.
+ * In cells not covered by finer cells, the weights are set to the
+ * the cell volume.  In those covered by finer cells, the weights
+ * are set to 0.  This latter assignment ensures that data in
+ * covered cells contribute to these sums only once.
+ */
+
+void ModifiedBratuProblem::setVectorWeights(
+   tbox::Pointer<hier::PatchHierarchy> hierarchy)
+{
+   for (int amr_level = hierarchy->getFinestLevelNumber();
+        amr_level >= 0;
+        amr_level--) {
+
+      /*
+       * On every level, first assign cell volume to vector weight.
+       */
+
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(
+            amr_level);
+      for (hier::PatchLevel::Iterator p(level); p; p++) {
+         tbox::Pointer<hier::Patch> patch = *p;
+         tbox::Pointer<geom::CartesianPatchGeometry> patch_geometry =
+            patch->getPatchGeometry();
+         const double* dx = patch_geometry->getDx();
+         double cell_vol = dx[0];
+         if (d_dim > tbox::Dimension(1)) {
+            cell_vol *= dx[1];
+         }
+         if (d_dim > tbox::Dimension(2)) {
+            cell_vol *= dx[2];
+         }
+         tbox::Pointer<pdat::CellData<double> > w =
+            patch->getPatchData(d_weight_id);
+         w->fillAll(cell_vol);
+      }
+
+      /*
+       * On all but the finest level, assign 0 to vector
+       * weight to cells covered by finer cells.
+       */
+
+      if (amr_level < hierarchy->getFinestLevelNumber()) {
+
+         /*
+          * First get the boxes that describe index space of the next finer
+          * level and coarsen them to describe corresponding index space
+          * at this level.
+          */
+
+         tbox::Pointer<hier::PatchLevel> next_finer_level =
+            hierarchy->getPatchLevel(amr_level + 1);
+         hier::BoxArray coarsened_boxes = next_finer_level->getBoxes();
+         hier::IntVector coarsen_ratio = next_finer_level->getRatioToLevelZero();
+         coarsen_ratio /= level->getRatioToLevelZero();
+         coarsened_boxes.coarsen(coarsen_ratio);
+
+         /*
+          * Then set vector weight to 0 wherever there is
+          * a nonempty intersection with the next finer level.
+          * Note that all assignments are local.
+          */
+
+         for (hier::PatchLevel::Iterator p(level); p; p++) {
+
+            tbox::Pointer<hier::Patch> patch = *p;
+            for (int i = 0; i < coarsened_boxes.getNumberOfBoxes(); i++) {
+
+               hier::Box coarse_box = coarsened_boxes[i];
+               hier::Box intersection = coarse_box * patch->getBox();
+               if (!intersection.empty()) {
+                  tbox::Pointer<pdat::CellData<double> > w =
+                     patch->getPatchData(d_weight_id);
+                  w->fillAll(0.0, intersection);
+
+               }  // assignment only in non-empty intersection
+            }  // loop over coarsened boxes from finer level
+         }  // loop over patches in level
+      }  // all levels except finest
+   }  // loop over levels
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set the initial guess for the nonlinear iteration.  If we are at the  *
+ * first step on the current hierarchy configuration, we initialize the  *
+ * the new solution with the current soltuion values.  Note that we do   *
+ * the same if we are not at the first step on the current hierarchy     *
+ * configuration.  In the future, we may employ a more sophisticated     *
+ * strategy involving some sort of extrapolation.                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ModifiedBratuProblem::setInitialGuess(
+   const bool first_step,
+   const double current_time,
+   const double current_dt,
+   const double old_dt)
+{
+   NULL_USE(old_dt);
+
+   d_current_time = current_time;
+   d_current_dt = current_dt;
+   d_new_time = d_current_time + d_current_dt;
+
+   tbox::Pointer<hier::PatchHierarchy> hierarchy =
+      d_solution_vector->getPatchHierarchy();
+
+   if (first_step) {
+
+      if (!d_FAC_solver.isNull()) {
+         d_FAC_solver.setNull();
+      }
+
+      d_FAC_solver =
+         new solv::CellPoissonFACSolver(d_dim, d_object_name + ":FAC_solver");
+
+   }
+
+   for (int ln = hierarchy->getFinestLevelNumber(); ln >= 0; ln--) {
+      hierarchy->getPatchLevel(ln)->
+      allocatePatchData(d_jacobian_data);
+      hierarchy->getPatchLevel(ln)->
+      allocatePatchData(d_precond_data);
+   }
+
+   if (first_step) {
+
+      for (int amr_level = 0;
+           amr_level < hierarchy->getNumberOfLevels();
+           amr_level++) {
+
+         tbox::Pointer<hier::PatchLevel> patch_level = hierarchy->getPatchLevel(
+               amr_level);
+         for (hier::PatchLevel::Iterator p(patch_level); p; p++) {
+            tbox::Pointer<hier::Patch> patch = *p;
+
+            tbox::Pointer<pdat::CellData<double> > y_cur =
+               patch->getPatchData(d_solution, d_current);
+            tbox::Pointer<pdat::CellData<double> > y_new =
+               patch->getPatchData(d_solution, d_new);
+            y_new->copy(*y_cur);
+
+            y_new->setTime(d_new_time);
+
+            patch->getPatchData(d_solution, d_scratch)->setTime(d_new_time);
+
+            tbox::Pointer<geom::CartesianPatchGeometry> patch_geometry =
+               patch->getPatchGeometry();
+            const double* dx = patch_geometry->getDx();
+            const double* xlo = patch_geometry->getXLower();
+            const double* xhi = patch_geometry->getXUpper();
+            const hier::Index ifirst = patch->getBox().lower();
+            const hier::Index ilast = patch->getBox().upper();
+
+            tbox::Pointer<pdat::SideData<double> > diffusion =
+               patch->getPatchData(d_diffusion_coef, d_scratch);
+
+            if (d_dim == tbox::Dimension(1)) {
+               FORT_EVALDIFFUSION1D(ifirst(0), ilast(0),
+                  dx, xlo, xhi,
+                  diffusion->getPointer(0));
+            }
+            if (d_dim == tbox::Dimension(2)) {
+               FORT_EVALDIFFUSION2D(ifirst(0), ilast(0),
+                  ifirst(1), ilast(1),
+                  dx, xlo, xhi,
+                  diffusion->getPointer(0),
+                  diffusion->getPointer(1));
+            }
+            if (d_dim == tbox::Dimension(3)) {
+               FORT_EVALDIFFUSION3D(ifirst(0), ilast(0),
+                  ifirst(1), ilast(1),
+                  ifirst(2), ilast(2),
+                  dx, xlo, xhi,
+                  diffusion->getPointer(0),
+                  diffusion->getPointer(1),
+                  diffusion->getPointer(2));
+            }
+         }
+      }
+   } else {
+
+      for (int amr_level = 0;
+           amr_level < hierarchy->getNumberOfLevels();
+           amr_level++) {
+
+         tbox::Pointer<hier::PatchLevel> patch_level = hierarchy->getPatchLevel(
+               amr_level);
+         for (hier::PatchLevel::Iterator p(patch_level); p; p++) {
+            tbox::Pointer<hier::Patch> patch = *p;
+
+            tbox::Pointer<pdat::CellData<double> > y_cur =
+               patch->getPatchData(d_solution, d_current);
+            tbox::Pointer<pdat::CellData<double> > y_new =
+               patch->getPatchData(d_solution, d_new);
+            y_new->copy(*y_cur);
+
+            y_new->setTime(d_new_time);
+
+            patch->getPatchData(d_solution, d_scratch)->setTime(d_new_time);
+
+            tbox::Pointer<geom::CartesianPatchGeometry> patch_geometry =
+               patch->getPatchGeometry();
+            const double* dx = patch_geometry->getDx();
+            const double* xlo = patch_geometry->getXLower();
+            const double* xhi = patch_geometry->getXUpper();
+            const hier::Index ifirst = patch->getBox().lower();
+            const hier::Index ilast = patch->getBox().upper();
+
+            tbox::Pointer<pdat::SideData<double> > diffusion =
+               patch->getPatchData(d_diffusion_coef, d_scratch);
+            if (d_dim == tbox::Dimension(1)) {
+               FORT_EVALDIFFUSION1D(ifirst(0), ilast(0),
+                  dx, xlo, xhi,
+                  diffusion->getPointer(0));
+            }
+            if (d_dim == tbox::Dimension(2)) {
+               FORT_EVALDIFFUSION2D(ifirst(0), ilast(0),
+                  ifirst(1), ilast(1),
+                  dx, xlo, xhi,
+                  diffusion->getPointer(0),
+                  diffusion->getPointer(1));
+            }
+            if (d_dim == tbox::Dimension(3)) {
+               FORT_EVALDIFFUSION3D(ifirst(0), ilast(0),
+                  ifirst(1), ilast(1),
+                  ifirst(2), ilast(2),
+                  dx, xlo, xhi,
+                  diffusion->getPointer(0),
+                  diffusion->getPointer(1),
+                  diffusion->getPointer(2));
+            }
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return the time increment used for the first solution advance step.   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double ModifiedBratuProblem::getInitialDt()
+{
+   return d_input_dt;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute and return the next time increment through which to advance   *
+ * the solution.  Note that good_solution is the value returned by the   *
+ * preceeding call to checkNewSolution().  The integer solver_retcode    *
+ * is the return code generated by the nonlinear solver.                 *
+ *                                                                       *
+ * In the future, we will have a more intelligent strategy.  When        *
+ * good_solution is true, we would like to take the largest timestep     *
+ * possible.   When good_solution is false, we will cut the timestep     *
+ * depending on the solver return code.  In this case, if the code       *
+ * indicates that that nonlinear iteration converged, we will cut the    *
+ * timestep by some amount since the temporal error is probably too      *
+ * large.  For a first order method like BE, determining a suitable      *
+ * timestep can be based on an estimate of the second time derivative    *
+ * of the solution.  See somments before checkNewSolution() below.       *
+ * If the nonlinear iteration did not converge, we will have to try      *
+ * another approach.                                                     *
+ *                                                                       *
+ * At this time, we always return a constant time step read from input.  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double ModifiedBratuProblem::getNextDt(
+   const bool good_solution,
+   const int solver_retcode)
+{
+   (void)good_solution;
+   (void)solver_retcode;
+
+   return d_input_dt;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Check the computed solution and return a boolean value of true if it  *
+ * is acceptable; otherwise return false.  The integer solver_retcode    *
+ * is the return code generated by the nonlinear solver.  This value     *
+ * must be interpreted in a manner consistant with the solver in use.    *
+ *                                                                       *
+ * Ordinarily we would estimate the temporal error in the solution       *
+ * before accepting it.  For backward Euler, this is straightforward.    *
+ * For example, if we had both (d_solution, d_current) and (d_solution,  *
+ * d_old), we could evaluate dy/dt at these two timesteps by evaluating  *
+ * the rhs at these values.  Then the second derivative in the solution  *
+ * can be estimated by using finite differences and compared to some     *
+ * prescribed tolerance.  Other heuristics may be possible.              *
+ *                                                                       *
+ * For now, we accept every solution we compute.                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool ModifiedBratuProblem::checkNewSolution(
+   const int solver_retcode)
+{
+   NULL_USE(solver_retcode);
+
+   double new_time = d_current_time + d_current_dt;
+   double maxerror = 0.0;
+   tbox::Pointer<hier::PatchHierarchy> hierarchy =
+      d_solution_vector->getPatchHierarchy();
+   for (int amr_level = 0;
+        amr_level < hierarchy->getNumberOfLevels();
+        amr_level++) {
+      tbox::Pointer<hier::PatchLevel> patch_level = hierarchy->getPatchLevel(
+            amr_level);
+      double levelerror = 0.0;
+      double levell2error = 0.0;
+      for (hier::PatchLevel::Iterator p(patch_level); p; p++) {
+         tbox::Pointer<hier::Patch> patch = *p;
+         const hier::Index ifirst = patch->getBox().lower();
+         const hier::Index ilast = patch->getBox().upper();
+         tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+            patch->getPatchGeometry();
+         const double* dx = patch_geom->getDx();
+         const double* xlo = patch_geom->getXLower();
+         const double* xhi = patch_geom->getXUpper();
+         tbox::Pointer<pdat::CellData<double> > u = patch->getPatchData(
+               d_solution,
+               d_new);
+         tbox::Pointer<pdat::CellData<double> > w = patch->getPatchData(
+               d_weight_id);
+
+         if (d_dim == tbox::Dimension(1)) {
+            FORT_ERROR1D(ifirst(0), ilast(0),
+               u->getPointer(), w->getPointer(),
+               d_lambda,
+               xlo, xhi, dx,
+               new_time,
+               levelerror, levell2error);
+         }
+         if (d_dim == tbox::Dimension(2)) {
+            FORT_ERROR2D(ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               u->getPointer(), w->getPointer(),
+               d_lambda,
+               xlo, xhi, dx,
+               new_time,
+               levelerror, levell2error);
+         }
+         if (d_dim == tbox::Dimension(3)) {
+            FORT_ERROR3D(ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ifirst(2), ilast(2),
+               u->getPointer(), w->getPointer(),
+               d_lambda,
+               xlo, xhi, dx,
+               new_time,
+               levelerror, levell2error);
+         }
+      }
+      maxerror = (levelerror > maxerror) ? levelerror : maxerror;
+      tbox::plog << " At " << new_time
+                 << " on level " << amr_level
+                 << " max err is " << levelerror
+                 << " wtd l2 err is " << levell2error
+                 << endl;
+   }
+
+   tbox::plog << " At " << new_time << " err is " << maxerror << endl;
+
+   return true;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Update soltution quantities after computing an acceptable time        *
+ * advanced solution.   The new_time value is the new solution time.     *
+ *                                                                       *
+ * Since we have no dependent variables in this problem and our memory   *
+ * management is extremely simple, we just copy new into current.        *
+ * Then, we synchronize the times for each set of solution vlaues.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ModifiedBratuProblem::updateSolution(
+   const double new_time)
+{
+   tbox::Pointer<hier::PatchHierarchy> hierarchy =
+      d_solution_vector->getPatchHierarchy();
+
+   d_new_time = d_current_time = new_time;
+
+   for (int amr_level = 0;
+        amr_level < hierarchy->getNumberOfLevels();
+        amr_level++) {
+
+      tbox::Pointer<hier::PatchLevel> patch_level = hierarchy->getPatchLevel(
+            amr_level);
+      for (hier::PatchLevel::Iterator p(patch_level); p; p++) {
+         tbox::Pointer<hier::Patch> patch = *p;
+
+         tbox::Pointer<pdat::CellData<double> > y_cur =
+            patch->getPatchData(d_solution, d_current);
+         tbox::Pointer<pdat::CellData<double> > y_new =
+            patch->getPatchData(d_solution, d_new);
+         y_cur->copy(*y_new);
+
+         y_cur->setTime(new_time);
+
+         patch->getPatchData(d_solution, d_scratch)->setTime(new_time);
+
+      }
+
+      hierarchy->getPatchLevel(amr_level)->
+      deallocatePatchData(d_jacobian_data);
+      hierarchy->getPatchLevel(amr_level)->
+      deallocatePatchData(d_precond_data);
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Allocate and initialize data for a new level in the patch hierarchy.  *
+ *                                                                       *
+ * At initial time only, we initialize the solution to zero.  At all     *
+ * other times the solution is either copied from an old level or        *
+ * interpolated from coarser levels.  The cell weights and diffusion     *
+ * coefficients are always set here since they live as long as a         *
+ * patch and are not time dependent.                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+void ModifiedBratuProblem::initializeLevelData(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const double time,
+   const bool can_be_refined,
+   const bool initial_time,
+   const tbox::Pointer<hier::BasePatchLevel> old_level,
+   const bool allocate_data)
+{
+   NULL_USE(can_be_refined);
+   NULL_USE(allocate_data);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((level_number >= 0)
+      && (level_number <= hierarchy->getFinestLevelNumber()));
+   if (!(old_level.isNull())) {
+      TBOX_ASSERT(level_number == old_level->getLevelNumber());
+   }
+   TBOX_ASSERT(!(hierarchy->getPatchLevel(level_number)).isNull());
+#endif
+
+   tbox::Pointer<hier::PatchHierarchy> patch_hierarchy = hierarchy;
+
+   tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(
+         level_number);
+
+   level->allocatePatchData(d_new_patch_problem_data, time);
+
+   if ((level_number > 0) || !old_level.isNull()) {
+
+      tbox::Pointer<RefineSchedule> sched = d_fill_new_level.createSchedule(
+            level,
+            old_level,
+            level_number - 1,
+            hierarchy,
+            NULL);
+      sched->fillData(time);
+
+      if (!old_level.isNull()) {
+         old_level->deallocatePatchData(d_new_patch_problem_data);
+         old_level->deallocatePatchData(d_problem_data);
+      }
+   }
+
+   level->allocatePatchData(d_problem_data);
+
+   /*
+    * Initialize data on patch interiors.  At initial time only, we
+    * initialize solution to zero.  At all other times the solution
+    * is either copied from an old level, or interpolated from some
+    * coarser level using the "d_fill_new_level" algorithm above.
+    */
+
+   for (hier::PatchLevel::Iterator p(level); p; p++) {
+      tbox::Pointer<hier::Patch> patch = *p;
+
+      if (initial_time) {
+
+         tbox::Pointer<pdat::CellData<double> > u =
+            patch->getPatchData(d_solution, d_current);
+         u->fillAll(0.0);
+
+      }
+
+      tbox::Pointer<geom::CartesianPatchGeometry> patch_geometry =
+         patch->getPatchGeometry();
+      const double* dx = patch_geometry->getDx();
+      const double* xlo = patch_geometry->getXLower();
+      const double* xhi = patch_geometry->getXUpper();
+      const hier::Index ifirst = patch->getBox().lower();
+      const hier::Index ilast = patch->getBox().upper();
+
+      tbox::Pointer<pdat::SideData<double> > diffusion =
+         patch->getPatchData(d_diffusion_coef, d_scratch);
+      if (d_dim == tbox::Dimension(1)) {
+         FORT_EVALDIFFUSION1D(ifirst(0), ilast(0),
+            dx, xlo, xhi,
+            diffusion->getPointer(0));
+      }
+      if (d_dim == tbox::Dimension(2)) {
+         FORT_EVALDIFFUSION2D(ifirst(0), ilast(0),
+            ifirst(1), ilast(1),
+            dx, xlo, xhi,
+            diffusion->getPointer(0),
+            diffusion->getPointer(1));
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         FORT_EVALDIFFUSION3D(ifirst(0), ilast(0),
+            ifirst(1), ilast(1),
+            ifirst(2), ilast(2),
+            dx, xlo, xhi,
+            diffusion->getPointer(0),
+            diffusion->getPointer(1),
+            diffusion->getPointer(2));
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * After hierarchy levels whose numbers lie in the given range have      *
+ * been either added or changed in the hierarchy, this routine is        *
+ * called.  Typically, it is used to reset any data members that         *
+ * remain constant until the levels change again via adaptive gridding   *
+ * (e.g., communication schedules), thus allowing some efficiencies to   *
+ * be achieved.  Here, we do nothing, since the function evalutation     *
+ * and Jacobian-vector product routines have indeterminate data ids.     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ModifiedBratuProblem::resetHierarchyConfiguration(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!hierarchy.isNull());
+   TBOX_ASSERT((coarsest_level >= 0)
+      && (coarsest_level <= finest_level)
+      && (finest_level <= hierarchy->getFinestLevelNumber()));
+   for (int ln0 = 0; ln0 <= finest_level; ln0++) {
+      TBOX_ASSERT(!(hierarchy->getPatchLevel(ln0)).isNull());
+   }
+#endif
+   tbox::Pointer<hier::PatchHierarchy> patch_hierarchy = hierarchy;
+   (void)coarsest_level;
+   (void)finest_level;
+
+   d_flux_coarsen_schedule.resizeArray(patch_hierarchy->getNumberOfLevels());
+   d_soln_fill_schedule.resizeArray(patch_hierarchy->getNumberOfLevels());
+   d_soln_coarsen_schedule.resizeArray(patch_hierarchy->getNumberOfLevels());
+   d_scratch_soln_coarsen_schedule.resizeArray(
+      patch_hierarchy->getNumberOfLevels());
+
+   int ln;
+   /*
+    * Rebuild schedules affected by the hierarchy change.
+    * In the following loops, ln is the level number of
+    * the destination level affected by the change.
+    */
+   {
+      const int ln_beg = coarsest_level - (coarsest_level > 0);
+      const int ln_end = finest_level;
+      for (ln = ln_beg; ln < ln_end; ++ln) {
+         tbox::Pointer<hier::PatchLevel> level =
+            patch_hierarchy->getPatchLevel(ln);
+         tbox::Pointer<hier::PatchLevel> finer_level =
+            patch_hierarchy->getPatchLevel(ln + 1);
+
+         d_flux_coarsen_schedule[ln] =
+            d_flux_coarsen.createSchedule(level,
+               finer_level);
+      }
+   }
+   {
+      const int ln_beg = coarsest_level;
+      const int ln_end = finest_level;
+      for (ln = ln_beg; ln <= ln_end; ++ln) {
+         tbox::Pointer<hier::PatchLevel> level =
+            patch_hierarchy->getPatchLevel(ln);
+         d_soln_fill_schedule[ln] = d_soln_fill.createSchedule(level,
+               ln - 1,
+               patch_hierarchy,
+               this);
+      }
+   }
+   {
+      const int ln_beg = coarsest_level - (coarsest_level > 0);
+      const int ln_end = finest_level;
+      for (ln = ln_beg; ln < ln_end; ++ln) {
+         tbox::Pointer<hier::PatchLevel> level =
+            patch_hierarchy->getPatchLevel(ln);
+         tbox::Pointer<hier::PatchLevel> finer_level =
+            patch_hierarchy->getPatchLevel(ln + 1);
+
+         d_soln_coarsen_schedule[ln] =
+            d_soln_coarsen.createSchedule(level,
+               finer_level);
+         d_scratch_soln_coarsen_schedule[ln] =
+            d_scratch_soln_coarsen.createSchedule(level,
+               finer_level);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * KINSOL interface for user-supplied routines.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ModifiedBratuProblem::evaluateNonlinearFunction(
+   solv::SundialsAbstractVector* soln,
+   solv::SundialsAbstractVector* fval)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(soln == (solv::SundialsAbstractVector *)NULL));
+   TBOX_ASSERT(!(fval == (solv::SundialsAbstractVector *)NULL));
+#endif
+
+   tbox::Pointer<solv::SAMRAIVectorReal<double> > x =
+      solv::Sundials_SAMRAIVector::getSAMRAIVector(soln);
+   tbox::Pointer<solv::SAMRAIVectorReal<double> > f =
+      solv::Sundials_SAMRAIVector::getSAMRAIVector(fval);
+
+   evaluateBratuFunction(x, f);
+}
+
+int ModifiedBratuProblem::precondSetup(
+   solv::SundialsAbstractVector* soln,
+   solv::SundialsAbstractVector* soln_scale,
+   solv::SundialsAbstractVector* fval,
+   solv::SundialsAbstractVector* fval_scale,
+   solv::SundialsAbstractVector* vtemp1,
+   solv::SundialsAbstractVector* vtemp2,
+   int& num_feval)
+{
+   (void)soln_scale;
+   (void)fval;
+   (void)fval_scale;
+   (void)vtemp1;
+   (void)vtemp2;
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(soln == (solv::SundialsAbstractVector *)NULL));
+#endif
+
+   num_feval += 0;
+
+   tbox::Pointer<solv::SAMRAIVectorReal<double> > x =
+      solv::Sundials_SAMRAIVector::getSAMRAIVector(soln);
+
+   setupBratuPreconditioner(x);
+
+   return 0;
+}
+
+int ModifiedBratuProblem::precondSolve(
+   solv::SundialsAbstractVector* soln,
+   solv::SundialsAbstractVector* soln_scale,
+   solv::SundialsAbstractVector* fval,
+   solv::SundialsAbstractVector* fval_scale,
+   solv::SundialsAbstractVector* rhs,
+   solv::SundialsAbstractVector* vtemp,
+   int& num_feval)
+{
+   (void)soln;
+   (void)soln_scale;
+   (void)fval;
+   (void)fval_scale;
+   (void)vtemp;
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(rhs == (solv::SundialsAbstractVector *)NULL));
+#endif
+
+   num_feval += 0;
+
+   tbox::Pointer<solv::SAMRAIVectorReal<double> > r =
+      solv::Sundials_SAMRAIVector::getSAMRAIVector(rhs);
+
+   return applyBratuPreconditioner(r, r);
+}
+
+int
+ModifiedBratuProblem::jacobianTimesVector(
+   solv::SundialsAbstractVector* vector,
+   solv::SundialsAbstractVector* product,
+   const bool soln_changed,
+   solv::SundialsAbstractVector* soln)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(vector == (solv::SundialsAbstractVector *)NULL));
+   TBOX_ASSERT(!(product == (solv::SundialsAbstractVector *)NULL));
+   TBOX_ASSERT(!(soln == (solv::SundialsAbstractVector *)NULL));
+#endif
+
+   tbox::Pointer<solv::SAMRAIVectorReal<double> > v =
+      solv::Sundials_SAMRAIVector::getSAMRAIVector(vector);
+   tbox::Pointer<solv::SAMRAIVectorReal<double> > Jv =
+      solv::Sundials_SAMRAIVector::getSAMRAIVector(product);
+
+   if (soln_changed) {
+      tbox::Pointer<solv::SAMRAIVectorReal<double> > ucur =
+         solv::Sundials_SAMRAIVector::getSAMRAIVector(soln);
+      evaluateBratuJacobian(ucur);
+   }
+   return jacobianTimesVector(v, Jv);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * PETSc/SNES interface for user-supplied routines.                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int ModifiedBratuProblem::evaluateNonlinearFunction(
+   Vec xcur,
+   Vec fcur)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(xcur == NULL));
+   TBOX_ASSERT(!(fcur == NULL));
+#endif
+
+   tbox::Pointer<solv::SAMRAIVectorReal<double> > x =
+      solv::PETSc_SAMRAIVectorReal<double>::getSAMRAIVector(xcur);
+   tbox::Pointer<solv::SAMRAIVectorReal<double> > f =
+      solv::PETSc_SAMRAIVectorReal<double>::getSAMRAIVector(fcur);
+
+   evaluateBratuFunction(x, f);
+
+   return 0;
+}
+
+int ModifiedBratuProblem::evaluateJacobian(
+   Vec x)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(x == NULL));
+#endif
+
+   tbox::Pointer<solv::SAMRAIVectorReal<double> > xvec =
+      solv::PETSc_SAMRAIVectorReal<double>::getSAMRAIVector(x);
+
+   evaluateBratuJacobian(xvec);
+
+   return 0;
+}
+
+int ModifiedBratuProblem::jacobianTimesVector(
+   Vec xin,
+   Vec xout)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(xin != NULL);
+   TBOX_ASSERT(xout != NULL);
+#endif
+
+   tbox::Pointer<solv::SAMRAIVectorReal<double> > xinvec =
+      solv::PETSc_SAMRAIVectorReal<double>::getSAMRAIVector(xin);
+   tbox::Pointer<solv::SAMRAIVectorReal<double> > xoutvec =
+      solv::PETSc_SAMRAIVectorReal<double>::getSAMRAIVector(xout);
+
+   jacobianTimesVector(xinvec, xoutvec);
+
+   return 0;
+}
+
+int ModifiedBratuProblem::setupPreconditioner(
+   Vec x)
+{
+   tbox::Pointer<solv::SAMRAIVectorReal<double> > uvec =
+      solv::PETSc_SAMRAIVectorReal<double>::getSAMRAIVector(x);
+   setupBratuPreconditioner(uvec);
+
+   return 0;
+}
+
+int ModifiedBratuProblem::applyPreconditioner(
+   Vec r,
+   Vec z)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(r != NULL);
+   TBOX_ASSERT(z != NULL);
+#endif
+
+   tbox::Pointer<solv::SAMRAIVectorReal<double> > rhs =
+      solv::PETSc_SAMRAIVectorReal<double>::getSAMRAIVector(r);
+   tbox::Pointer<solv::SAMRAIVectorReal<double> > soln =
+      solv::PETSc_SAMRAIVectorReal<double>::getSAMRAIVector(z);
+
+   return applyBratuPreconditioner(rhs, soln);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Generic user-supplied functions.  Here the interfaces are expressed   *
+ * in terms of generic SAMRAIVectors.  These methods are invoked from    *
+ * within a nonlinear solver package (through an appropriate interface). *
+ * Since we have no control over the vectors that appear as actual       *
+ * arguments, each of these methods must create communication algorithms *
+ * and schedules to fill ghost cells before stencil operations can be    *
+ * applied.                                                              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Evaluate nonlinear residual at the vector "x" and place the result in *
+ * the vector "f".                                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ModifiedBratuProblem::evaluateBratuFunction(
+   tbox::Pointer<solv::SAMRAIVectorReal<double> > x,
+   tbox::Pointer<solv::SAMRAIVectorReal<double> > f)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!x.isNull());
+   TBOX_ASSERT(!f.isNull());
+#endif
+
+   tbox::Pointer<hier::PatchHierarchy> hierarchy =
+      d_solution_vector->getPatchHierarchy();
+
+   /*
+    * Create a coarsen algorithm to coarsen data on fine patch interiors.
+    * Then, cycle through the levels and coarsen the data.
+    */
+   CoarsenAlgorithm eval_average(d_dim);
+   eval_average.registerCoarsen(x->getComponentDescriptorIndex(0),
+      x->getComponentDescriptorIndex(0),
+      d_soln_coarsen_op);
+   int amr_level = 0;
+   for (amr_level = hierarchy->getFinestLevelNumber() - 1;
+        amr_level >= 0;
+        amr_level--) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(
+            amr_level);
+      tbox::Pointer<hier::PatchLevel> finer_level = hierarchy->getPatchLevel(
+            amr_level + 1);
+      eval_average.resetSchedule(d_soln_coarsen_schedule[amr_level]);
+      d_soln_coarsen_schedule[amr_level]->coarsenData();
+      d_soln_coarsen.resetSchedule(d_soln_coarsen_schedule[amr_level]);
+   }
+
+   /*
+    * Create a refine algorithm to fill ghost cells of solution variable.
+    */
+
+   s_copy_timer->start();
+   RefineAlgorithm eval_fill(d_dim);
+   eval_fill.registerRefine(d_soln_scratch_id,
+      x->getComponentDescriptorIndex(0),
+      d_soln_scratch_id,
+      d_soln_refine_op);
+   s_copy_timer->stop();
+
+   for (amr_level = hierarchy->getFinestLevelNumber();
+        amr_level >= 0;
+        amr_level--) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(
+            amr_level);
+
+      s_copy_timer->start();
+      eval_fill.resetSchedule(d_soln_fill_schedule[amr_level]);
+      d_soln_fill_schedule[amr_level]->fillData(d_new_time);
+      d_soln_fill.resetSchedule(d_soln_fill_schedule[amr_level]);
+      s_copy_timer->stop();
+
+      level->allocatePatchData(d_flux_id);
+      if (amr_level > 0) {
+         level->allocatePatchData(d_coarse_fine_flux_id);
+      }
+
+      for (hier::PatchLevel::Iterator p(level); p; p++) {
+         tbox::Pointer<hier::Patch> patch = *p;
+
+         const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+            patch->getPatchGeometry();
+         const double* dx = patch_geom->getDx();
+         const hier::Index ifirst = patch->getBox().lower();
+         const hier::Index ilast = patch->getBox().upper();
+
+         tbox::Pointer<pdat::CellData<double> > u =
+            patch->getPatchData(d_solution, d_scratch);
+         tbox::Pointer<pdat::SideData<double> > diffusion =
+            patch->getPatchData(d_diffusion_coef, d_scratch);
+         tbox::Pointer<pdat::SideData<double> > flux =
+            patch->getPatchData(d_flux_id);
+         tbox::Pointer<pdat::OutersideData<double> > coarse_fine_flux =
+            patch->getPatchData(d_coarse_fine_flux_id);
+         if (d_dim == tbox::Dimension(1)) {
+            FORT_EVALFACEFLUXES1D(ifirst(0), ilast(0),
+               NUM_GHOSTS_U,
+               diffusion->getPointer(0),
+               u->getPointer(),
+               dx,
+               flux->getPointer(0));
+         }
+         if (d_dim == tbox::Dimension(2)) {
+            FORT_EVALFACEFLUXES2D(ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               NUM_GHOSTS_U,
+               diffusion->getPointer(0),
+               diffusion->getPointer(1),
+               u->getPointer(),
+               dx,
+               flux->getPointer(0),
+               flux->getPointer(1));
+         }
+         if (d_dim == tbox::Dimension(3)) {
+            FORT_EVALFACEFLUXES3D(ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ifirst(2), ilast(2),
+               NUM_GHOSTS_U,
+               diffusion->getPointer(0),
+               diffusion->getPointer(1),
+               diffusion->getPointer(2),
+               u->getPointer(),
+               dx,
+               flux->getPointer(0),
+               flux->getPointer(1),
+               flux->getPointer(2));
+         }
+         const tbox::Array<hier::BoundaryBox> bdry_faces =
+            patch_geom->getCodimensionBoundaries(1);
+#if 0
+         if (d_dim == tbox::Dimension(1)) {
+            const tbox::Array<hier::BoundaryBox> bdry_faces =
+               patch_geom->getNodeBoundaries();
+         }
+         if (d_dim == tbox::Dimension(2)) {
+            const tbox::Array<hier::BoundaryBox> bdry_faces =
+               patch_geom->getEdgeBoundaries();
+         }
+         if (d_dim == tbox::Dimension(3)) {
+            const tbox::Array<hier::BoundaryBox> bdry_faces =
+               patch_geom->getFaceBoundaries();
+         }
+#endif
+         for (int i = 0; i < bdry_faces.getSize(); i++) {
+
+            hier::Box bbox = bdry_faces[i].getBox();
+            const hier::Index ibeg = bbox.lower();
+            const hier::Index iend = bbox.upper();
+            int face = bdry_faces[i].getLocationIndex();
+
+            if (d_dim == tbox::Dimension(1)) {
+               FORT_EWBCFLUXFIX1D(ifirst(0), ilast(0),
+                  NUM_GHOSTS_U,
+                  dx,
+                  u->getPointer(),
+                  flux->getPointer(0),
+                  &bbox.lower()[0], &bbox.upper()[0],
+                  face);
+            }
+            if (d_dim == tbox::Dimension(2)) {
+               FORT_EWBCFLUXFIX2D(ifirst(0), ilast(0),
+                  ifirst(1), ilast(1),
+                  NUM_GHOSTS_U,
+                  dx,
+                  u->getPointer(),
+                  flux->getPointer(0),
+                  &bbox.lower()[0], &bbox.upper()[0],
+                  face);
+               FORT_NSBCFLUXFIX2D(ifirst(0), ilast(0),
+                  ifirst(1), ilast(1),
+                  NUM_GHOSTS_U,
+                  dx,
+                  u->getPointer(),
+                  flux->getPointer(1),
+                  &bbox.lower()[0], &bbox.upper()[0],
+                  face);
+            }
+            if (d_dim == tbox::Dimension(3)) {
+               FORT_EWBCFLUXFIX3D(ifirst(0), ilast(0),
+                  ifirst(1), ilast(1),
+                  ifirst(2), ilast(2),
+                  NUM_GHOSTS_U,
+                  dx,
+                  u->getPointer(),
+                  flux->getPointer(0),
+                  &bbox.lower()[0], &bbox.upper()[0],
+                  face);
+               FORT_NSBCFLUXFIX3D(ifirst(0), ilast(0),
+                  ifirst(1), ilast(1),
+                  ifirst(2), ilast(2),
+                  NUM_GHOSTS_U,
+                  dx,
+                  u->getPointer(),
+                  flux->getPointer(1),
+                  &bbox.lower()[0], &bbox.upper()[0],
+                  face);
+               FORT_TBBCFLUXFIX3D(ifirst(0), ilast(0),
+                  ifirst(1), ilast(1),
+                  ifirst(2), ilast(2),
+                  NUM_GHOSTS_U,
+                  dx,
+                  u->getPointer(),
+                  flux->getPointer(2),
+                  &bbox.lower()[0], &bbox.upper()[0],
+                  face);
+            }
+
+         } // end loop over boundary faces
+
+         // correctPatchFlux( level, patch, u );
+
+         if (amr_level > 0) {
+
+            for (int side = 0; side < 2; side++) {
+               if (d_dim == tbox::Dimension(1)) {
+                  FORT_EWFLUXCOPY1D(ifirst(0), ilast(0),
+                     flux->getPointer(0),
+                     coarse_fine_flux->getPointer(0, side),
+                     side);
+               }
+               if (d_dim == tbox::Dimension(2)) {
+                  FORT_EWFLUXCOPY2D(ifirst(0), ilast(0),
+                     ifirst(1), ilast(1),
+                     flux->getPointer(0),
+                     coarse_fine_flux->getPointer(0, side),
+                     side);
+                  FORT_NSFLUXCOPY2D(ifirst(0), ilast(0),
+                     ifirst(1), ilast(1),
+                     flux->getPointer(1),
+                     coarse_fine_flux->getPointer(1, side),
+                     side);
+               }
+               if (d_dim == tbox::Dimension(3)) {
+                  FORT_EWFLUXCOPY3D(ifirst(0), ilast(0),
+                     ifirst(1), ilast(1),
+                     ifirst(2), ilast(2),
+                     flux->getPointer(0),
+                     coarse_fine_flux->getPointer(0, side),
+                     side);
+                  FORT_NSFLUXCOPY3D(ifirst(0), ilast(0),
+                     ifirst(1), ilast(1),
+                     ifirst(2), ilast(2),
+                     flux->getPointer(1),
+                     coarse_fine_flux->getPointer(1, side),
+                     side);
+                  FORT_TBFLUXCOPY3D(ifirst(0), ilast(0),
+                     ifirst(1), ilast(1),
+                     ifirst(2), ilast(2),
+                     flux->getPointer(2),
+                     coarse_fine_flux->getPointer(2, side),
+                     side);
+               }
+
+            }
+         }
+      } // end first pass over patches in level
+
+      /*
+       * Now that fluxes have been computed in each patch on the level,
+       *  those that lie at coarse/fine interfaces must be replaced by
+       *  the sum of fluxes on coincident faces from the next finer level.
+       */
+
+      if (amr_level < hierarchy->getFinestLevelNumber()) {
+
+         tbox::Pointer<hier::PatchLevel> finer_level =
+            hierarchy->getPatchLevel(amr_level + 1);
+
+         d_flux_coarsen_schedule[amr_level]->coarsenData();
+
+         finer_level->deallocatePatchData(d_coarse_fine_flux_id);
+
+      } // end face flux fixup
+
+      /*
+       * Now that the right fluxes reside at coarse/fine interfaces,
+       *  complete function evaluation by differencing.
+       */
+
+      for (hier::PatchLevel::Iterator p(level); p; p++) {
+         tbox::Pointer<hier::Patch> patch = *p;
+
+         const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+            patch->getPatchGeometry();
+
+         const double* dx = patch_geom->getDx();
+         const double* xlo = patch_geom->getXLower();
+         const double* xhi = patch_geom->getXUpper();
+         const hier::Index ifirst = patch->getBox().lower();
+         const hier::Index ilast = patch->getBox().upper();
+
+         tbox::Pointer<pdat::CellData<double> > u =
+            patch->getPatchData(d_solution, d_scratch);
+         tbox::Pointer<pdat::CellData<double> > u_cur =
+            patch->getPatchData(d_solution, d_current);
+         tbox::Pointer<pdat::CellData<double> > source =
+            patch->getPatchData(d_source_term, d_scratch);
+         tbox::Pointer<pdat::CellData<double> > exponential =
+            patch->getPatchData(d_exponential_term, d_scratch);
+         tbox::Pointer<pdat::SideData<double> > flux =
+            patch->getPatchData(d_flux_id);
+         tbox::Pointer<pdat::CellData<double> > fcur =
+            f->getComponentPatchData(0, *patch);
+         tbox::Pointer<pdat::CellData<double> > xdat =
+            x->getComponentPatchData(0, *patch);
+         if (d_dim == tbox::Dimension(1)) {
+            FORT_EVALEXPONENTIAL1D(ifirst(0), ilast(0),
+               xdat->getPointer(),
+               d_lambda,
+               exponential->getPointer());
+         }
+         if (d_dim == tbox::Dimension(2)) {
+            FORT_EVALEXPONENTIAL2D(ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               xdat->getPointer(),
+               d_lambda,
+               exponential->getPointer());
+         }
+         if (d_dim == tbox::Dimension(3)) {
+            FORT_EVALEXPONENTIAL3D(ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ifirst(2), ilast(2),
+               xdat->getPointer(),
+               d_lambda,
+               exponential->getPointer());
+         }
+         if (d_dim == tbox::Dimension(1)) {
+            FORT_EVALSOURCE1D(ifirst(0), ilast(0),
+               d_lambda,
+               xlo, xhi, dx, d_new_time,
+               source->getPointer());
+         }
+         if (d_dim == tbox::Dimension(2)) {
+            FORT_EVALSOURCE2D(ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               d_lambda,
+               xlo, xhi, dx, d_new_time,
+               source->getPointer());
+         }
+         if (d_dim == tbox::Dimension(3)) {
+            FORT_EVALSOURCE3D(ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ifirst(2), ilast(2),
+               d_lambda,
+               xlo, xhi, dx, d_new_time,
+               source->getPointer());
+         }
+         if (d_dim == tbox::Dimension(1)) {
+            FORT_EVALBRATU1D(ifirst(0), ilast(0),
+               NUM_GHOSTS_U,
+               flux->getPointer(0),
+               source->getPointer(),
+               exponential->getPointer(),
+               u_cur->getPointer(),
+               u->getPointer(),
+               dx, d_current_dt,
+               fcur->getPointer());
+         }
+         if (d_dim == tbox::Dimension(2)) {
+            FORT_EVALBRATU2D(ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               NUM_GHOSTS_U,
+               flux->getPointer(0),
+               flux->getPointer(1),
+               source->getPointer(),
+               exponential->getPointer(),
+               u_cur->getPointer(),
+               u->getPointer(),
+               dx, d_current_dt,
+               fcur->getPointer());
+         }
+         if (d_dim == tbox::Dimension(3)) {
+            FORT_EVALBRATU3D(ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ifirst(2), ilast(2),
+               NUM_GHOSTS_U,
+               flux->getPointer(0),
+               flux->getPointer(1),
+               flux->getPointer(2),
+               source->getPointer(),
+               exponential->getPointer(),
+               u_cur->getPointer(),
+               u->getPointer(),
+               dx, d_current_dt,
+               fcur->getPointer());
+         }
+      } // end second pass over patches in level
+
+      level->deallocatePatchData(d_flux_id);
+
+   } // end loop over levels
+
+   /*
+    * Create a coarsen algorithm to coarsen data on fine patch interiors.
+    * Then, cycle through the levels and coarsen the data.
+    */
+
+   CoarsenAlgorithm f_average(d_dim);
+   f_average.registerCoarsen(f->getComponentDescriptorIndex(0),
+      f->getComponentDescriptorIndex(0),
+      d_soln_coarsen_op);
+   for (amr_level = hierarchy->getFinestLevelNumber() - 1;
+        amr_level >= 0;
+        amr_level--) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(
+            amr_level);
+      tbox::Pointer<hier::PatchLevel> finer_level = hierarchy->getPatchLevel(
+            amr_level + 1);
+      /*
+       * We take advantage of the knowlege that f has the same
+       * structure as the solution and reset the solution coarsening
+       * schedule instead of creating a new schedule for f.
+       */
+      f_average.resetSchedule(d_soln_coarsen_schedule[amr_level]);
+      d_soln_coarsen_schedule[amr_level]->coarsenData();
+      d_soln_coarsen.resetSchedule(d_soln_coarsen_schedule[amr_level]);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Evaluate Jacobian-vector product on input vector "v" and place the    *
+ * result in the vector "Jv".                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int
+ModifiedBratuProblem::jacobianTimesVector(
+   tbox::Pointer<solv::SAMRAIVectorReal<double> > v,
+   tbox::Pointer<solv::SAMRAIVectorReal<double> > Jv)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(v == (tbox::Pointer<solv::SAMRAIVectorReal<double> >)NULL));
+   TBOX_ASSERT(!(Jv == (tbox::Pointer<solv::SAMRAIVectorReal<double> >)NULL));
+#endif
+
+   /*
+    * Create a coarsen algorithm to average down fine-to-coarse.
+    */
+
+   CoarsenAlgorithm jacv_average(d_dim);
+   jacv_average.registerCoarsen(v->getComponentDescriptorIndex(0),
+      v->getComponentDescriptorIndex(0),
+      d_soln_coarsen_op);
+
+   /*
+    * Now cycle through the levels, finest to coarsest, and average
+    * down the data.
+    */
+
+   tbox::Pointer<hier::PatchHierarchy> hierarchy = Jv->getPatchHierarchy();
+
+   for (int amr_level = hierarchy->getFinestLevelNumber() - 1;
+        amr_level >= 0;
+        amr_level--) {
+
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(
+            amr_level);
+      tbox::Pointer<hier::PatchLevel> finer_level = hierarchy->getPatchLevel(
+            amr_level + 1);
+      jacv_average.resetSchedule(d_soln_coarsen_schedule[amr_level]);
+      d_soln_coarsen_schedule[amr_level]->coarsenData();
+      d_soln_coarsen.resetSchedule(d_soln_coarsen_schedule[amr_level]);
+
+   }
+
+   /*
+    * Create a refine algorithm needed to fill ghost cells of vector being
+    * multiplied.
+    */
+   s_copy_timer->start();
+   RefineAlgorithm jacv_fill(d_dim);
+   jacv_fill.registerRefine(d_soln_scratch_id,
+      v->getComponentDescriptorIndex(0),
+      d_soln_scratch_id,
+      d_soln_refine_op);
+   s_copy_timer->stop();
+
+   /*
+    * Perform Jacobian-vector product by looping over levels in the hierarchy.
+    * The RefineSchedule created by the above RefineAlgorithm will copy
+    * the data in the input vector into the interior of the specified scratch
+    * space as well as filling the scratch space ghost cells.  Within each
+    * level storage locations for each patch are extracted and passed to
+    * computation routines.
+    *
+    * The product is implemented in two passes.  In the first pass, fluxes
+    * are computed.  On all levels except the finest, the fluxes that
+    * reside at coarse-fine interfaces are replaced by an average of the
+    * fluxes from the next finer level.  This ensures proper flux matching
+    * at the interfaces.
+    *
+    * In the second pass, the fluxes that reside at the interfaces are
+    * differenced to complete the Jacobian-vector product.  The exponential
+    * term, which is a cell-centered quantity, is also added in.
+    */
+
+   for (int amr_level = hierarchy->getFinestLevelNumber();
+        amr_level >= 0;
+        amr_level--) {
+
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(
+            amr_level);
+
+      /*
+       * Allocate scratch space on this level used to store the fluxes.  Also,
+       * on all but the coarsest level, allocate space for copies of these
+       * fluxes to be averaged down to the next coarser level.
+       */
+
+      level->allocatePatchData(d_flux_id);
+
+      if (amr_level > 0) {
+         level->allocatePatchData(d_coarse_fine_flux_id);
+      }
+
+      /*
+       * Fill ghost cell locations on this level.
+       */
+
+      s_copy_timer->start();
+      jacv_fill.resetSchedule(d_soln_fill_schedule[amr_level]);
+      d_soln_fill_schedule[amr_level]->fillData(d_new_time);
+      d_soln_fill.resetSchedule(d_soln_fill_schedule[amr_level]);
+      s_copy_timer->stop();
+
+      /*
+       * Now sweep through patches on a level, evaluating fluxes on faces
+       * of cells.
+       */
+
+      for (hier::PatchLevel::Iterator p(level); p; p++) {
+         tbox::Pointer<hier::Patch> patch = *p;
+
+         const hier::Index ifirst = patch->getBox().lower();
+         const hier::Index ilast = patch->getBox().upper();
+
+         tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+            patch->getPatchGeometry();
+         const double* dx = patch_geom->getDx();
+         tbox::Pointer<pdat::CellData<double> > vdat =
+            patch->getPatchData(d_soln_scratch_id);
+         tbox::Pointer<pdat::SideData<double> > diffusion =
+            patch->getPatchData(d_diffusion_coef, d_scratch);
+         tbox::Pointer<pdat::SideData<double> > flux =
+            patch->getPatchData(d_flux_id);
+         tbox::Pointer<pdat::OutersideData<double> > coarse_fine_flux =
+            patch->getPatchData(d_coarse_fine_flux_id);
+
+         if (d_dim == tbox::Dimension(1)) {
+            FORT_EVALFACEFLUXES1D(ifirst(0), ilast(0),
+               NUM_GHOSTS_U,
+               diffusion->getPointer(0),
+               vdat->getPointer(),
+               dx,
+               flux->getPointer(0));
+         }
+         if (d_dim == tbox::Dimension(2)) {
+            FORT_EVALFACEFLUXES2D(ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               NUM_GHOSTS_U,
+               diffusion->getPointer(0),
+               diffusion->getPointer(1),
+               vdat->getPointer(),
+               dx,
+               flux->getPointer(0),
+               flux->getPointer(1));
+         }
+         if (d_dim == tbox::Dimension(3)) {
+            FORT_EVALFACEFLUXES3D(ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ifirst(2), ilast(2),
+               NUM_GHOSTS_U,
+               diffusion->getPointer(0),
+               diffusion->getPointer(1),
+               diffusion->getPointer(2),
+               vdat->getPointer(),
+               dx,
+               flux->getPointer(0),
+               flux->getPointer(1),
+               flux->getPointer(2));
+         }
+
+         /*
+          * We employ a convention in which boundary conditions are located on
+          * the physical boundaries, but are stored at the centers of ghost
+          * cells.  As a result the grid spacing is smaller along the physical
+          * boundaries, and the fluxes at these locations have to be modified.
+          */
+
+         const tbox::Array<hier::BoundaryBox> bdry_faces =
+            patch_geom->getCodimensionBoundaries(1);
+#if 0
+         if (d_dim == tbox::Dimension(1)) {
+            const tbox::Array<hier::BoundaryBox> bdry_faces =
+               patch_geom->getNodeBoundaries();
+         }
+         if (d_dim == tbox::Dimension(2)) {
+            const tbox::Array<hier::BoundaryBox> bdry_faces =
+               patch_geom->getEdgeBoundaries();
+         }
+         if (d_dim == tbox::Dimension(3)) {
+            const tbox::Array<hier::BoundaryBox> bdry_faces =
+               patch_geom->getFaceBoundaries();
+         }
+#endif
+         for (int i = 0; i < bdry_faces.getSize(); i++) {
+
+            hier::Box bbox = bdry_faces[i].getBox();
+            const hier::Index ibeg = bbox.lower();
+            const hier::Index iend = bbox.upper();
+            int face = bdry_faces[i].getLocationIndex();
+
+            if (d_dim == tbox::Dimension(1)) {
+               FORT_EWBCFLUXFIX1D(ifirst(0), ilast(0),
+                  NUM_GHOSTS_U,
+                  dx,
+                  vdat->getPointer(),
+                  flux->getPointer(0),
+                  &bbox.lower()[0], &bbox.upper()[0],
+                  face);
+            }
+            if (d_dim == tbox::Dimension(2)) {
+               FORT_EWBCFLUXFIX2D(ifirst(0), ilast(0),
+                  ifirst(1), ilast(1),
+                  NUM_GHOSTS_U,
+                  dx,
+                  vdat->getPointer(),
+                  flux->getPointer(0),
+                  &bbox.lower()[0], &bbox.upper()[0],
+                  face);
+               FORT_NSBCFLUXFIX2D(ifirst(0), ilast(0),
+                  ifirst(1), ilast(1),
+                  NUM_GHOSTS_U,
+                  dx,
+                  vdat->getPointer(),
+                  flux->getPointer(1),
+                  &bbox.lower()[0], &bbox.upper()[0],
+                  face);
+            }
+            if (d_dim == tbox::Dimension(3)) {
+               FORT_EWBCFLUXFIX3D(ifirst(0), ilast(0),
+                  ifirst(1), ilast(1),
+                  ifirst(2), ilast(2),
+                  NUM_GHOSTS_U,
+                  dx,
+                  vdat->getPointer(),
+                  flux->getPointer(0),
+                  &bbox.lower()[0], &bbox.upper()[0],
+                  face);
+               FORT_NSBCFLUXFIX3D(ifirst(0), ilast(0),
+                  ifirst(1), ilast(1),
+                  ifirst(2), ilast(2),
+                  NUM_GHOSTS_U,
+                  dx,
+                  vdat->getPointer(),
+                  flux->getPointer(1),
+                  &bbox.lower()[0], &bbox.upper()[0],
+                  face);
+               FORT_TBBCFLUXFIX3D(ifirst(0), ilast(0),
+                  ifirst(1), ilast(1),
+                  ifirst(2), ilast(2),
+                  NUM_GHOSTS_U,
+                  dx,
+                  vdat->getPointer(),
+                  flux->getPointer(2),
+                  &bbox.lower()[0], &bbox.upper()[0],
+                  face);
+            }
+         } // end loop over boundary faces
+
+         //         correctPatchFlux( level, patch, vdat );
+
+         /*
+          * On all but the coarsest level, we save the face fluxes on the outer edge
+          * of the grid level so that they can be averaged down to the next
+          * coarser level.
+          */
+
+         if (amr_level > 0) {
+            for (int side = 0; side < 2; side++) {
+               if (d_dim == tbox::Dimension(1)) {
+                  FORT_EWFLUXCOPY1D(ifirst(0), ilast(0),
+                     flux->getPointer(0),
+                     coarse_fine_flux->getPointer(0, side),
+                     side);
+               }
+               if (d_dim == tbox::Dimension(2)) {
+                  FORT_EWFLUXCOPY2D(ifirst(0), ilast(0),
+                     ifirst(1), ilast(1),
+                     flux->getPointer(0),
+                     coarse_fine_flux->getPointer(0, side),
+                     side);
+                  FORT_NSFLUXCOPY2D(ifirst(0), ilast(0),
+                     ifirst(1), ilast(1),
+                     flux->getPointer(1),
+                     coarse_fine_flux->getPointer(1, side),
+                     side);
+               }
+               if (d_dim == tbox::Dimension(3)) {
+                  FORT_EWFLUXCOPY3D(ifirst(0), ilast(0),
+                     ifirst(1), ilast(1),
+                     ifirst(2), ilast(2),
+                     flux->getPointer(0),
+                     coarse_fine_flux->getPointer(0, side),
+                     side);
+                  FORT_NSFLUXCOPY3D(ifirst(0), ilast(0),
+                     ifirst(1), ilast(1),
+                     ifirst(2), ilast(2),
+                     flux->getPointer(1),
+                     coarse_fine_flux->getPointer(1, side),
+                     side);
+                  FORT_TBFLUXCOPY3D(ifirst(0), ilast(0),
+                     ifirst(1), ilast(1),
+                     ifirst(2), ilast(2),
+                     flux->getPointer(2),
+                     coarse_fine_flux->getPointer(2, side),
+                     side);
+               }
+            }
+         }
+
+      } // end first pass over patches in level
+
+      /*
+       * Now that fluxes have been computed in each patch on the level,
+       *  those that lie at coarse/fine interfaces must be replaced by
+       *  the sum of fluxes on coincident faces from the next finer level.
+       */
+
+      if (amr_level < hierarchy->getFinestLevelNumber()) {
+
+         tbox::Pointer<hier::PatchLevel> finer_level =
+            hierarchy->getPatchLevel(amr_level + 1);
+
+         d_flux_coarsen_schedule[amr_level]->coarsenData();
+
+         finer_level->deallocatePatchData(d_coarse_fine_flux_id);
+
+      } // end face flux fixup
+
+      /*
+       * Now that the right fluxes reside at coarse/fine interfaces,
+       *  complete function evaluation by differencing.
+       */
+
+      for (hier::PatchLevel::Iterator p(level); p; p++) {
+         tbox::Pointer<hier::Patch> patch = *p;
+
+         const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+            patch->getPatchGeometry();
+
+         const hier::Index ifirst = patch->getBox().lower();
+         const hier::Index ilast = patch->getBox().upper();
+
+         const double* dx = patch_geom->getDx();
+
+         tbox::Pointer<pdat::CellData<double> > jac_a =
+            patch->getPatchData(d_jacobian_a_id);
+         tbox::Pointer<pdat::CellData<double> > Jvdat =
+            Jv->getComponentPatchData(0, *patch);
+         tbox::Pointer<pdat::CellData<double> > vdat =
+            patch->getPatchData(d_soln_scratch_id);
+         tbox::Pointer<pdat::SideData<double> > flux =
+            patch->getPatchData(d_flux_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(vdat->getGhostCellWidth() ==
+            hier::IntVector(d_dim, NUM_GHOSTS_U));
+         TBOX_ASSERT(Jvdat->getGhostCellWidth() == hier::IntVector(d_dim, 0));
+         TBOX_ASSERT(jac_a->getGhostCellWidth() == hier::IntVector(d_dim, 0));
+#endif
+
+         if (d_dim == tbox::Dimension(2)) {
+            F77_FUNC(compjv2d, COMPJV2D) (ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               NUM_GHOSTS_U,
+               jac_a->getPointer(),
+               flux->getPointer(0),
+               flux->getPointer(1),
+               vdat->getPointer(),
+               dx, d_current_dt,
+               Jvdat->getPointer());
+#if 0
+            FORT_BRATUJV2D(ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               NUM_GHOSTS_U,
+               flux->getPointer(0),
+               flux->getPointer(1),
+               exponential->getPointer(),
+               vdat->getPointer(),
+               dx, d_current_dt,
+               Jvdat->getPointer());
+#endif
+         }
+         if (d_dim == tbox::Dimension(3)) {
+            F77_FUNC(compjv3d, COMPJV3D) (ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ifirst(2), ilast(2),
+               NUM_GHOSTS_U,
+               jac_a->getPointer(),
+               flux->getPointer(0),
+               flux->getPointer(1),
+               flux->getPointer(2),
+               vdat->getPointer(),
+               dx, d_current_dt,
+               Jvdat->getPointer());
+#if 0
+            FORT_BRATUJV3D(ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ifirst(2), ilast(2),
+               NUM_GHOSTS_U,
+               flux->getPointer(0),
+               flux->getPointer(1),
+               flux->getPointer(2),
+               exponential->getPointer(),
+               vdat->getPointer(),
+               dx, d_current_dt,
+               Jvdat->getPointer());
+#endif
+         }
+
+      }   // end second pass over patches
+
+      level->deallocatePatchData(d_flux_id);
+
+   } // end pass over levels
+
+   return 0;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set up FAC hierarchy preconditioner for Jacobian system.  Here we     *
+ * use the FAC hierarchy solver in SAMRAI which automatically sets       *
+ * up the composite grid system and uses hypre as a solver on each       *
+ * level.  Fortunately, the FAC hierarchy solver suits the problem       *
+ * we are solving, as the Jacobian matrix arises by discretizing:        *
+ *                                                                       *
+ *    div( D(x,t)*grad(u) ) + 1/dt - lambda * exp(u) - df/du             *
+ *                                                                       *
+ * evaluated at some iterate of the solution u.                          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ModifiedBratuProblem::setupBratuPreconditioner(
+   tbox::Pointer<solv::SAMRAIVectorReal<double> > x)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!x.isNull());
+#endif
+
+   tbox::Pointer<hier::PatchHierarchy> hierarchy =
+      d_solution_vector->getPatchHierarchy();
+
+   RefineAlgorithm eval_fill(d_dim);
+   eval_fill.registerRefine(d_soln_scratch_id,
+      x->getComponentDescriptorIndex(0),
+      d_soln_scratch_id,
+      d_soln_refine_op);
+
+   for (int amr_level = hierarchy->getFinestLevelNumber();
+        amr_level >= 0;
+        amr_level--) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(
+            amr_level);
+
+      eval_fill.resetSchedule(d_soln_fill_schedule[amr_level]);
+      d_soln_fill_schedule[amr_level]->fillData(d_new_time);
+      d_soln_fill.resetSchedule(d_soln_fill_schedule[amr_level]);
+
+      for (hier::PatchLevel::Iterator p(level); p; p++) {
+         tbox::Pointer<hier::Patch> patch = *p;
+
+         const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+            patch->getPatchGeometry();
+
+         const hier::Index ifirst = patch->getBox().lower();
+         const hier::Index ilast = patch->getBox().upper();
+
+         const double* dx = patch_geom->getDx();
+         const double* xlo = patch_geom->getXLower();
+
+         double cell_vol = dx[0];
+         if (d_dim > tbox::Dimension(1)) {
+            cell_vol *= dx[1];
+         }
+         if (d_dim > tbox::Dimension(2)) {
+            cell_vol *= dx[2];
+         }
+         tbox::Pointer<pdat::CellData<double> > u =
+            patch->getPatchData(d_solution, d_scratch);
+         tbox::Pointer<pdat::CellData<double> > exponential =
+            patch->getPatchData(d_exponential_term, d_scratch);
+         tbox::Pointer<pdat::CellData<double> > source =
+            patch->getPatchData(d_source_term, d_scratch);
+         tbox::Pointer<pdat::SideData<double> > diffusion =
+            patch->getPatchData(d_diffusion_coef, d_scratch);
+
+         tbox::Pointer<pdat::CellData<double> > a = patch->getPatchData(
+               d_precond_a_id);
+         tbox::Pointer<pdat::FaceData<double> > b = patch->getPatchData(
+               d_precond_b_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!exponential.isNull());
+         TBOX_ASSERT(!source.isNull());
+         TBOX_ASSERT(!u.isNull());
+         TBOX_ASSERT(!diffusion.isNull());
+         TBOX_ASSERT(!a.isNull());
+         TBOX_ASSERT(!b.isNull());
+#endif
+
+         /*
+          * Compute exponential = lambda * exp(u)
+          */
+         if (d_dim == tbox::Dimension(1)) {
+            F77_FUNC(compexpu1d, COMPEXPU1D) (ifirst(0), ilast(0),
+               NUM_GHOSTS_U,
+               d_lambda,
+               u->getPointer(),
+               exponential->getPointer());
+
+            /*
+             * Compute source = df/du
+             */
+            F77_FUNC(compsrcderv1d, COMPSRCDERV1D) (ifirst(0), ilast(0),
+               NUM_GHOSTS_U,
+               xlo, dx,
+               d_new_time,
+               d_lambda,
+               u->getPointer(),
+               source->getPointer());
+         }
+         if (d_dim == tbox::Dimension(2)) {
+            F77_FUNC(compexpu2d, COMPEXPU2D) (ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               NUM_GHOSTS_U,
+               d_lambda,
+               u->getPointer(),
+               exponential->getPointer());
+
+            /*
+             * Compute source = df/du
+             */
+            F77_FUNC(compsrcderv2d, COMPSRCDERV2D) (ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               NUM_GHOSTS_U,
+               xlo, dx,
+               d_new_time,
+               d_lambda,
+               u->getPointer(),
+               source->getPointer());
+         }
+         if (d_dim == tbox::Dimension(3)) {
+            F77_FUNC(compexpu3d, COMPEXPU3D) (ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ifirst(2), ilast(2),
+               NUM_GHOSTS_U,
+               d_lambda,
+               u->getPointer(),
+               exponential->getPointer());
+
+            /*
+             * Compute source = df/du
+             */
+            F77_FUNC(compsrcderv3d, COMPSRCDERV3D) (ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ifirst(2), ilast(2),
+               NUM_GHOSTS_U,
+               xlo, dx,
+               d_new_time,
+               d_lambda,
+               u->getPointer(),
+               source->getPointer());
+         }
+         /*
+          * Compute a = cell_vol * ( 1 - d_current_dt*(exponential + source))
+          */
+         if (d_dim == tbox::Dimension(1)) {
+            F77_FUNC(compfacdiag1d, COMPFACDIAG1D) (ifirst(0), ilast(0),
+               d_current_dt,
+               cell_vol,
+               exponential->getPointer(),
+               source->getPointer(),
+               a->getPointer());
+         }
+         if (d_dim == tbox::Dimension(2)) {
+            F77_FUNC(compfacdiag2d, COMPFACDIAG2D) (ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               d_current_dt,
+               cell_vol,
+               exponential->getPointer(),
+               source->getPointer(),
+               a->getPointer());
+         }
+         if (d_dim == tbox::Dimension(3)) {
+            F77_FUNC(compfacdiag3d, COMPFACDIAG3D) (ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ifirst(2), ilast(2),
+               d_current_dt,
+               cell_vol,
+               exponential->getPointer(),
+               source->getPointer(),
+               a->getPointer());
+         }
+
+         /*
+          * Copy side-centered diffusion coefficients to face-centered
+          * and multiply by cell_vol*d_current_dt.
+          */
+         if (d_dim == tbox::Dimension(1)) {
+            F77_FUNC(compfacoffdiag1d, COMPFACOFFDIAG1D) (ifirst(0), ilast(0),
+               d_current_dt,
+               cell_vol,
+               diffusion->getPointer(0),
+               b->getPointer(0));
+         }
+         if (d_dim == tbox::Dimension(2)) {
+            F77_FUNC(compfacoffdiag2d, COMPFACOFFDIAG2D) (ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               d_current_dt,
+               cell_vol,
+               diffusion->getPointer(0),
+               diffusion->getPointer(1),
+               b->getPointer(0),
+               b->getPointer(1));
+         }
+         if (d_dim == tbox::Dimension(3)) {
+            F77_FUNC(compfacoffdiag3d, COMPFACOFFDIAG3D) (ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ifirst(2), ilast(2),
+               d_current_dt,
+               cell_vol,
+               diffusion->getPointer(0),
+               diffusion->getPointer(1),
+               diffusion->getPointer(2),
+               b->getPointer(0),
+               b->getPointer(1),
+               b->getPointer(2));
+         }
+
+      }
+
+   }
+
+   // This will have to generalized if we add in other boundary conditions
+
+   d_FAC_solver->setBoundaries("Dirichlet");
+
+   if (d_precond_b_id == -1) {
+      d_FAC_solver->setDConstant(1.0);
+   } else {
+      d_FAC_solver->setDConstant(1.0);
+   }
+   if (d_precond_a_id == -1) {
+      d_FAC_solver->setCConstant(0.0);
+   } else {
+      d_FAC_solver->setCPatchDataId(d_precond_a_id);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Apply preconditioner where right-hand-side is "r" and "z" is the      *
+ * solution.   This routine assumes that the preconditioner setup call   *
+ * has already been invoked.  Return 0 if preconditioner fails;          *
+ * return 1 otherwise.                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int ModifiedBratuProblem::applyBratuPreconditioner(
+   tbox::Pointer<solv::SAMRAIVectorReal<double> > r,
+   tbox::Pointer<solv::SAMRAIVectorReal<double> > z)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!r.isNull());
+   TBOX_ASSERT(!z.isNull());
+#endif
+
+   int ret_val = 0;
+
+   tbox::Pointer<hier::PatchHierarchy> hierarchy =
+      d_solution_vector->getPatchHierarchy();
+
+   int r_indx = r->getComponentDescriptorIndex(0);
+   int z_indx = z->getComponentDescriptorIndex(0);
+
+   /*
+    * Create a coarsen algorithm to coarsen rhs data on fine patch interiors.
+    * Then, cycle through the levels and coarsen the data.
+    */
+   CoarsenAlgorithm pc_rhs_average(d_dim);
+   pc_rhs_average.registerCoarsen(r_indx, r_indx, d_soln_coarsen_op);
+
+   for (int amr_level = hierarchy->getFinestLevelNumber() - 1;
+        amr_level >= 0;
+        amr_level--) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(
+            amr_level);
+      tbox::Pointer<hier::PatchLevel> finer_level = hierarchy->getPatchLevel(
+            amr_level + 1);
+      pc_rhs_average.resetSchedule(d_soln_coarsen_schedule[amr_level]);
+      d_soln_coarsen_schedule[amr_level]->coarsenData();
+      d_soln_coarsen.resetSchedule(d_soln_coarsen_schedule[amr_level]);
+   }
+
+   math::HierarchyCellDataOpsReal<double>
+   math_ops(hierarchy,
+            0,
+            hierarchy->getFinestLevelNumber());
+   math_ops.setToScalar(d_soln_scratch_id,
+      0.0);
+
+   s_pc_timer->start();
+
+   d_FAC_solver->solveSystem(d_soln_scratch_id,
+      r_indx,
+      hierarchy,
+      0,
+      hierarchy->getFinestLevelNumber());
+
+   s_pc_timer->stop();
+
+   /*
+    * Create a coarsen algorithm to coarsen soln data on fine patch interiors.
+    * Then, cycle through the levels and coarsen the data.
+    */
+   CoarsenAlgorithm pc_sol_average(d_dim);
+   pc_sol_average.registerCoarsen(d_soln_scratch_id,
+      d_soln_scratch_id,
+      d_soln_coarsen_op);
+
+   for (int amr_level = hierarchy->getFinestLevelNumber() - 1;
+        amr_level >= 0;
+        amr_level--) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(
+            amr_level);
+      tbox::Pointer<hier::PatchLevel> finer_level = hierarchy->getPatchLevel(
+            amr_level + 1);
+      pc_sol_average.resetSchedule(d_scratch_soln_coarsen_schedule[amr_level]);
+      d_scratch_soln_coarsen_schedule[amr_level]->coarsenData();
+      d_scratch_soln_coarsen.resetSchedule(d_scratch_soln_coarsen_schedule[
+            amr_level]);
+   }
+
+   for (int amr_level = hierarchy->getFinestLevelNumber();
+        amr_level >= 0;
+        amr_level--) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(
+            amr_level);
+
+      for (hier::PatchLevel::Iterator p(level); p; p++) {
+         tbox::Pointer<hier::Patch> patch = *p;
+
+         tbox::Pointer<pdat::CellData<double> > src_data =
+            patch->getPatchData(d_soln_scratch_id);
+         tbox::Pointer<pdat::CellData<double> > dst_data = patch->getPatchData(
+               z_indx);
+
+         dst_data->copy(*src_data);
+      }
+   }
+
+   return ret_val;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Evaluate the Jacobian matrix A(x) for a given solution x.             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ModifiedBratuProblem::evaluateBratuJacobian(
+   tbox::Pointer<solv::SAMRAIVectorReal<double> > x)
+{
+   tbox::Pointer<hier::PatchHierarchy> hierarchy =
+      d_solution_vector->getPatchHierarchy();
+
+   RefineAlgorithm eval_fill(d_dim);
+   eval_fill.registerRefine(d_soln_scratch_id,
+      x->getComponentDescriptorIndex(0),
+      d_soln_scratch_id,
+      d_soln_refine_op);
+
+   for (int amr_level = hierarchy->getFinestLevelNumber();
+        amr_level >= 0;
+        amr_level--) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(
+            amr_level);
+
+      eval_fill.resetSchedule(d_soln_fill_schedule[amr_level]);
+      d_soln_fill_schedule[amr_level]->fillData(d_new_time);
+      d_soln_fill.resetSchedule(d_soln_fill_schedule[amr_level]);
+
+      for (hier::PatchLevel::Iterator p(level); p; p++) {
+         tbox::Pointer<hier::Patch> patch = *p;
+
+         const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+            patch->getPatchGeometry();
+
+         const hier::Index ifirst = patch->getBox().lower();
+         const hier::Index ilast = patch->getBox().upper();
+
+         const double* dx = patch_geom->getDx();
+         const double* xlo = patch_geom->getXLower();
+
+         double cell_vol = dx[0];
+         if (d_dim > tbox::Dimension(1)) {
+            cell_vol *= dx[1];
+         }
+         if (d_dim > tbox::Dimension(2)) {
+            cell_vol *= dx[2];
+         }
+
+         tbox::Pointer<pdat::CellData<double> > u =
+            patch->getPatchData(d_solution, d_scratch);
+         tbox::Pointer<pdat::CellData<double> > exponential =
+            patch->getPatchData(d_exponential_term, d_scratch);
+         tbox::Pointer<pdat::CellData<double> > source =
+            patch->getPatchData(d_source_term, d_scratch);
+         tbox::Pointer<pdat::SideData<double> > diffusion =
+            patch->getPatchData(d_diffusion_coef, d_scratch);
+
+         tbox::Pointer<pdat::CellData<double> > a = patch->getPatchData(
+               d_jacobian_a_id);
+         tbox::Pointer<pdat::FaceData<double> > b = patch->getPatchData(
+               d_jacobian_b_id);
+
+         if (d_dim == tbox::Dimension(1)) {
+            /*
+             * Compute exponential = lambda * exp(u)
+             */
+            F77_FUNC(compexpu1d, COMPEXPU1D) (ifirst(0), ilast(0),
+               NUM_GHOSTS_U,
+               d_lambda,
+               u->getPointer(),
+               exponential->getPointer());
+
+            /*
+             * Compute source = df/du
+             */
+            F77_FUNC(compsrcderv1d, COMPSRCDERV1D) (ifirst(0), ilast(0),
+               NUM_GHOSTS_U,
+               xlo, dx,
+               d_new_time,
+               d_lambda,
+               u->getPointer(),
+               source->getPointer());
+         }
+         if (d_dim == tbox::Dimension(2)) {
+            /*
+             * Compute exponential = lambda * exp(u)
+             */
+            F77_FUNC(compexpu2d, COMPEXPU2D) (ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               NUM_GHOSTS_U,
+               d_lambda,
+               u->getPointer(),
+               exponential->getPointer());
+
+            /*
+             * Compute source = df/du
+             */
+            F77_FUNC(compsrcderv2d, COMPSRCDERV2D) (ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               NUM_GHOSTS_U,
+               xlo, dx,
+               d_new_time,
+               d_lambda,
+               u->getPointer(),
+               source->getPointer());
+         }
+         if (d_dim == tbox::Dimension(3)) {
+            /*
+             * Compute exponential = lambda * exp(u)
+             */
+            F77_FUNC(compexpu3d, COMPEXPU3D) (ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ifirst(2), ilast(2),
+               NUM_GHOSTS_U,
+               d_lambda,
+               u->getPointer(),
+               exponential->getPointer());
+
+            /*
+             * Compute source = df/du
+             */
+            F77_FUNC(compsrcderv3d, COMPSRCDERV3D) (ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ifirst(2), ilast(2),
+               NUM_GHOSTS_U,
+               xlo, dx,
+               d_new_time,
+               d_lambda,
+               u->getPointer(),
+               source->getPointer());
+         }
+         /*
+          * Compute a = lambda*exp(u) + df/du
+          */
+         math::PatchCellDataOpsReal<double> cell_basic_ops;
+         cell_basic_ops.add(a,
+            exponential,
+            source,
+            a->getBox());
+
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set physical boundary conditions for patch at a given time.           *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ModifiedBratuProblem::setPhysicalBoundaryConditions(
+   hier::Patch& patch,
+   const double time,
+   const hier::IntVector& ghost_width_to_fill)
+{
+   NULL_USE(time);
+   NULL_USE(ghost_width_to_fill);
+
+   /*
+    * Grab data to operate on.
+    */
+
+   tbox::Pointer<pdat::CellData<double> > u = patch.getPatchData(
+         d_soln_scratch_id);
+
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+
+   /*
+    * Determine boxes that touch the physical boundary.
+    */
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const tbox::Array<hier::BoundaryBox> boundary =
+      patch_geom->getCodimensionBoundaries(1);
+#if 0
+   if (d_dim == tbox::Dimension(1)) {
+      const tbox::Array<hier::BoundaryBox> boundary =
+         patch_geom->getNodeBoundaries();
+   }
+   if (d_dim == tbox::Dimension(2)) {
+      const tbox::Array<hier::BoundaryBox> boundary =
+         patch_geom->getEdgeBoundaries();
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      const tbox::Array<hier::BoundaryBox> boundary =
+         patch_geom->getFaceBoundaries();
+   }
+#endif
+
+   /*
+    * Walk the list of boxes that describe the boundary, and apply
+    * boundary conditions to each segment.
+    */
+
+   int face;
+   for (int i = 0; i < boundary.getSize(); i++) {
+      hier::Box bbox = hier::Box(boundary[i].getBox());
+      face = boundary[i].getLocationIndex();
+      if (d_dim == tbox::Dimension(1)) {
+         FORT_SETBC1D(ifirst(0), ilast(0),
+            NUM_GHOSTS_U,
+            u->getPointer(),
+            &bbox.lower()[0], &bbox.upper()[0],
+            face);
+      }
+      if (d_dim == tbox::Dimension(2)) {
+         FORT_SETBC2D(ifirst(0), ilast(0),
+            ifirst(1), ilast(1),
+            NUM_GHOSTS_U,
+            u->getPointer(),
+            &bbox.lower()[0], &bbox.upper()[0],
+            face);
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         FORT_SETBC3D(ifirst(0), ilast(0),
+            ifirst(1), ilast(1),
+            ifirst(2), ilast(2),
+            NUM_GHOSTS_U,
+            u->getPointer(),
+            &bbox.lower()[0], &bbox.upper()[0],
+            face);
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Read data from input database.                                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ModifiedBratuProblem::getFromInput(
+   tbox::Pointer<tbox::Database> db,
+   bool is_from_restart)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   if (db->keyExists("lambda")) {
+      d_lambda = db->getDouble("lambda");
+   } else {
+      TBOX_ERROR(d_object_name << " -- Key data `lambda'"
+                               << " missing in input.");
+   }
+
+   if (db->keyExists("timestep")) {
+      d_input_dt = db->getDouble("timestep");
+      if (d_input_dt < 0.0) {
+         TBOX_ERROR(d_object_name << " Input error: timestep < 0.0");
+      }
+   } else {
+      if (!is_from_restart) {
+         TBOX_ERROR(d_object_name << " -- Key data `timestep'"
+                                  << " missing in input.");
+      }
+   }
+
+   if (db->keyExists("max_precond_its")) {
+      d_max_precond_its = db->getInteger("max_precond_its");
+      if (d_max_precond_its < 0) {
+         TBOX_ERROR(d_object_name << " Input error: max_precond_its < 0");
+      }
+   } else {
+      if (!is_from_restart) {
+         TBOX_ERROR(d_object_name << " -- Key data `max_precond_its'"
+                                  << " missing in input.");
+      }
+   }
+
+   if (db->keyExists("precond_tol")) {
+      d_precond_tol = db->getDouble("precond_tol");
+      if (d_precond_tol <= 0.0) {
+         TBOX_ERROR(d_object_name << " Input error: precond_tol <= 0.0");
+      }
+   } else {
+      if (!is_from_restart) {
+         TBOX_ERROR(d_object_name << " -- Key data `precond_tol'"
+                                  << " missing in input.");
+      }
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Put class version number and data members in database.                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ModifiedBratuProblem::putToDatabase(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   db->putInteger("MODIFIED_BRATU_PROBLEM", MODIFIED_BRATU_PROBLEM);
+
+   db->putDouble("d_lambda", d_lambda);
+   db->putDouble("d_input_dt", d_input_dt);
+   db->putInteger("d_max_precond_its", d_max_precond_its);
+   db->putDouble("d_precond_tol", d_precond_tol);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Print all class data members to given output stream.                  *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void ModifiedBratuProblem::printClassData(
+   ostream& os) const
+{
+   os << "\nModifiedBratuProblem::printClassData..." << endl;
+   os << "ModifiedBratuProblem: this = " << (ModifiedBratuProblem *)this
+      << endl;
+   os << "d_object_name = " << d_object_name << endl;
+   os << "d_grid_geometry = "
+      << (geom::CartesianGridGeometry *)d_grid_geometry << endl;
+   os << "d_grid_geometry = "
+      << (geom::CartesianGridGeometry *)d_grid_geometry << endl;
+
+   os << "d_soln_scratch_id =   " << d_soln_scratch_id << endl;
+   os << "d_flux_id =   " << d_flux_id << endl;
+   os << "d_coarse_fine_flux_id =   " << d_coarse_fine_flux_id << endl;
+   os << "d_jacobian_a_id =   " << d_jacobian_a_id << endl;
+   os << "d_jacobian_b_id =   " << d_jacobian_b_id << endl;
+   os << "d_weight_id =   " << d_weight_id << endl;
+   os << "d_nghosts =   " << d_nghosts << endl;
+
+   os << "d_lambda =   " << d_lambda << endl;
+   os << "d_input_dt = " << d_input_dt << endl;
+
+   os << "d_current_time =   " << d_current_time << endl;
+   os << "d_new_time = " << d_new_time << endl;
+   os << "d_current_dt =   " << d_current_dt << endl;
+
+   os << "d_max_precond_its =   " << d_max_precond_its << endl;
+   os << "d_precond_tol = " << d_precond_tol << endl;
+
+}
+
+void ModifiedBratuProblem::getLevelEdges(
+   hier::BoxList& boxes,
+   tbox::Pointer<hier::Patch> patch,
+   tbox::Pointer<hier::PatchLevel> level,
+   const int dim,
+   const int face)
+{
+
+   /*
+    * Shift the box associated with the patch on the side indicated by
+    * (dim,face).
+    */
+
+   boxes.clearItems();
+   hier::Box box = patch->getBox();
+   hier::Box boundary = box;
+   if (face == 0) {
+      boundary.lower(dim) = box.lower(dim) - 1;
+      boundary.upper(dim) = box.lower(dim) - 1;
+   } else {
+      boundary.lower(dim) = box.upper(dim) + 1;
+      boundary.upper(dim) = box.upper(dim) + 1;
+   }
+
+   /*
+    * Initialize the list of boxes that constitute the edge of the
+    * level, and delete the portion of the box that lies interior to
+    * the level.
+    */
+
+   boxes.unionBoxes(boundary);
+   boxes.removeIntersections(hier::BoxList(level->getBoxes()));
+
+   /*
+    * Finally delete the part of the level edge that meets the
+    * physical boundary.
+    */
+
+   tbox::Pointer<geom::CartesianPatchGeometry> geometry =
+      patch->getPatchGeometry();
+   tbox::Array<hier::BoundaryBox> boundary_boxes =
+      geometry->getCodimensionBoundaries(1);
+   for (int i = 0; i < boundary_boxes.getSize(); i++) {
+      boxes.removeIntersections(boundary_boxes[i].getBox());
+   }
+
+   /*
+    * Put the result into canonical order.
+    */
+
+   boxes.simplifyBoxes();
+}
+
+void ModifiedBratuProblem::correctLevelFlux(
+   tbox::Pointer<hier::PatchLevel> level)
+{
+   for (hier::PatchLevel::Iterator p(level); p; p++) {
+      tbox::Pointer<hier::Patch> patch = *p;
+      const hier::Box box = patch->getBox();
+      tbox::Pointer<pdat::SideData<double> > flux_data = patch->getPatchData(
+            d_flux_id);
+
+      /*
+       * For each dimension, for each side:  compute the index space that
+       * describes the part of the patch that lies on the outer edge of
+       * the refinement level.  Then, scale the fluxes along that edge
+       * to account for the different grid spacing when CONSTANT_REFINE
+       * is used to fill the ghost cells.
+       */
+
+      for (int d = 0; d < d_dim.getValue(); d++) {
+         for (int s = 0; s <= 1; s++) {
+            hier::Index delta(d_dim, 0);
+            delta(d) = ((s == 0) ? 1 : -1);
+            hier::Index twodelta(d_dim, 0);
+            twodelta(d) = ((s == 0) ? 2 : -2);
+            hier::BoxList level_edges;
+            getLevelEdges(level_edges, patch, level, d, s);
+            for (hier::BoxList::Iterator l(level_edges); l; l++) {
+               for (pdat::CellIterator ic(l()); ic; ic++) {
+                  pdat::SideIndex iside(ic() + delta, d, s);
+                  (*flux_data)(iside) = 2.0 * (*flux_data)(iside) / 3.0;
+               }   // cell loop
+            }   // box loop
+         }   // side loop
+      }   // dimension loop
+   }   // patch loop
+}
+
+void ModifiedBratuProblem::correctPatchFlux(
+   tbox::Pointer<hier::PatchLevel> level,
+   tbox::Pointer<hier::Patch> patch,
+   tbox::Pointer<pdat::CellData<double> > u)
+{
+   const hier::Box box = patch->getBox();
+   tbox::Pointer<pdat::SideData<double> > flux_data = patch->getPatchData(
+         d_flux_id);
+   const tbox::Pointer<geom::CartesianPatchGeometry> geometry =
+      patch->getPatchGeometry();
+   const double* dx = geometry->getDx();
+
+   for (int d = 0; d < d_dim.getValue(); d++) {
+      for (int s = 0; s <= 1; s++) {
+         hier::Index delta1(d_dim, 0);
+         delta1(d) = ((s == 0) ? 1 : -1);
+         hier::Index delta2(d_dim, 0);
+         delta2(d) = ((s == 0) ? 2 : -2);
+         double factor = ((s == 0) ? 1.0 / dx[d] : -1.0 / dx[d]);
+         hier::BoxList level_edges;
+         getLevelEdges(level_edges, patch, level, d, s);
+         for (hier::BoxList::Iterator l(level_edges); l; l++) {
+            for (pdat::CellIterator ic(l()); ic; ic++) {
+               pdat::SideIndex iside(ic() + delta1, d, s);
+               (*flux_data)(iside) = factor * (-8.0 * (*u)(ic()) / 15.0
+                                               + (*u)(ic() + delta1) / 3.0
+                                               + (*u)(ic() + delta2) / 5.0);
+            } // cell loop
+         } // box loop
+      } // side loop
+   } // dimension loop
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/ModifiedBratuProblem.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/ModifiedBratuProblem.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,626 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Class containing numerical routines for modified Bratu problem 
+ *
+ ************************************************************************/
+
+#ifndef included_ModifiedBratuProblem
+#define included_ModifiedBratuProblem
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#if !defined(HAVE_PETSC) || !defined(HAVE_SUNDIALS) || !defined(HAVE_HYPRE)
+
+/*
+ *************************************************************************
+ * If the library is not compiled with PETSC -and- KINSOL, print an error.
+ * If we're running autotests, skip the error and compile an empty
+ * class.
+ *************************************************************************
+ */
+#if (TESTING != 1)
+#error \
+   "This example requires SAMRAI be compiled with KINSOL, PETSC, and HYPRE."
+#endif
+
+#else
+
+#include "SAMRAI/appu/VisItDataWriter.h"
+#include "SAMRAI/solv/CellPoissonFACSolver.h"
+#include "SAMRAI/solv/KINSOLAbstractFunctions.h"
+#include "SAMRAI/solv/SundialsAbstractVector.h"
+#include "SAMRAI/solv/PETScAbstractVectorReal.h"
+#include "SAMRAI/solv/SNESAbstractFunctions.h"
+#include "SAMRAI/solv/SAMRAIVectorReal.h"
+#include "SAMRAI/algs/ImplicitEquationStrategy.h"
+#include "SAMRAI/mesh/StandardTagAndInitStrategy.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/pdat/OutersideVariable.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/xfer/CoarsenAlgorithm.h"
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/xfer/CoarsenPatchStrategy.h"
+#include "SAMRAI/xfer/CoarsenSchedule.h"
+#include "SAMRAI/xfer/RefineAlgorithm.h"
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/xfer/RefinePatchStrategy.h"
+#include "SAMRAI/xfer/RefineSchedule.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/ComponentSelector.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/tbox/Serializable.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/MessageStream.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/Database.h"
+
+#include <string>
+
+using namespace SAMRAI;
+using namespace xfer;
+using namespace std;
+
+/**
+ * Class ModifiedBratuProblem class provides operations needed to solve
+ *
+ *     du/dt = div( D(x,t)*grad(u) ) + lambda * exp(u) + f(u,x,t)
+ *
+ * using implicit time integration and either KINSOL or PETSc to solve the
+ * nonlinear system at each step.  Specifically, it provides operations
+ * needed by the algs::ImplicitIntegrator class as well as those defined by the
+ * interfaces to KINSOL and PETSc; i.e., KINSOLAbstractFunctions and
+ * SNESAbstractFunctions respectively.
+ *
+ * This example is implemented only for 2D, 2:1 refinement ratios only.
+ */
+
+class ModifiedBratuProblem:
+   public algs::ImplicitEquationStrategy,
+   public mesh::StandardTagAndInitStrategy,
+   public solv::SNESAbstractFunctions,
+   public solv::KINSOLAbstractFunctions,
+   public RefinePatchStrategy,
+   public CoarsenPatchStrategy,
+   public tbox::Serializable
+{
+public:
+   /**
+    * Constructor for ModifiedBratuProblem class creates problem variables
+    * to represent the solution and other quantities on the patch hierarchy.
+    * It initializes data members to default values and sets others based
+    * on input and/or restart values.  The constructor also sets up algorithms
+    * for communicating data between patches on the hierarchy.
+    */
+   ModifiedBratuProblem(
+      const string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> input_db,
+      tbox::Pointer<geom::CartesianGridGeometry> grid_geometry,
+      tbox::Pointer<appu::VisItDataWriter> visit_data_writer =
+         tbox::Pointer<appu::VisItDataWriter>(NULL));
+
+   /**
+    * Destructor for ModifiedBratuProblem class does nothing.
+    */
+   ~ModifiedBratuProblem();
+
+   //@{
+   /*!
+    * @name Implicit integrator interfaces
+    */
+
+   /**
+    * Set vector weights on the hierarchy.
+    */
+   void
+   setVectorWeights(
+      tbox::Pointer<hier::PatchHierarchy> hierarchy);
+
+   /**
+    * Set the nonlinear solution vector so that the new solution data is
+    * solved for when the nonlinear solver advances the solution.
+    *
+    * Function overloaded from algs::ImplicitEquationStrategy.
+    */
+   void
+   setupSolutionVector(
+      tbox::Pointer<solv::SAMRAIVectorReal<double> > solution);
+
+   /**
+    * Return time increment for advancing the solution at the first timestep.
+    *
+    * Function overloaded from algs::ImplicitEquationStrategy.
+    */
+   double
+   getInitialDt();
+
+   /**
+    * Return the next time increment through which to advance the solution.
+    * The good_solution is the value returned by a call to checkNewSolution(),
+    * which determines whether the computed solution is acceptable or not.
+    * The integer solver_retcode is the return code generated by the
+    * nonlinear solver.   This value must be interpreted in a manner
+    * consistant with the solver in use.
+    *
+    * Function overloaded from algs::ImplicitEquationStrategy.
+    */
+   double
+   getNextDt(
+      const bool good_solution,
+      const int solver_retcode);
+
+   /**
+    * Set the initial guess for the time advanced solution at the start
+    * of the nonlinear iteration.  The boolean argument first_step
+    * indicates whether we are at the first step on the current hierarchy
+    * configuration.  This is true when the hierarchy is constructed
+    * initially and after regridding.  In these cases, setting the initial
+    * iterate using extrapolation, for example, may not be possible.
+    *
+    * Function overloaded from algs::ImplicitEquationStrategy.
+    */
+   void
+   setInitialGuess(
+      const bool first_step,
+      const double current_time,
+      const double current_dt,
+      const double old_dt);
+
+   /**
+    * Check the computed solution and return true if it is acceptable;
+    * otherwise return false.  The integer solver_retcode is the return
+    * code generated by the nonlinear solver.  This value must be
+    * interpreted in a manner consistent with the solver in use.
+    *
+    * Function overloaded from algs::ImplicitEquationStrategy.
+    */
+   bool
+   checkNewSolution(
+      const int solver_retcode);
+
+   /**
+    * Update solution storage and dependent quantities after computing an
+    * acceptable time advanced solution.   The new_time value is the new
+    * solution time.
+    *
+    * Function overloaded from algs::ImplicitEquationStrategy.
+    */
+   void
+   updateSolution(
+      const double new_time);
+
+   //@}
+
+   //@{
+   /*!
+    * @name Functions overloaded from mesh::StandardTagAndInitStrategy.
+    */
+
+   virtual void
+   initializeLevelData(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double init_data_time,
+      const bool can_be_refined,
+      const bool initial_time,
+      const tbox::Pointer<hier::BasePatchLevel> old_level =
+         tbox::Pointer<hier::BasePatchLevel>(NULL),
+      const bool allocate_data = true);
+
+   void
+   resetHierarchyConfiguration(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level);
+   //@}
+
+   //@{
+   /*!
+    * @name Interface functions overloaded from KINSOLAbstractFunctions.
+    */
+
+   void
+   evaluateNonlinearFunction(
+      solv::SundialsAbstractVector* soln,
+      solv::SundialsAbstractVector* fval);
+
+   int
+   precondSetup(
+      solv::SundialsAbstractVector* soln,
+      solv::SundialsAbstractVector* soln_scale,
+      solv::SundialsAbstractVector* fval,
+      solv::SundialsAbstractVector* fval_scale,
+      solv::SundialsAbstractVector* vtemp1,
+      solv::SundialsAbstractVector* vtemp2,
+      int& num_feval);
+
+   int
+   precondSolve(
+      solv::SundialsAbstractVector* soln,
+      solv::SundialsAbstractVector* soln_scale,
+      solv::SundialsAbstractVector* fval,
+      solv::SundialsAbstractVector* fval_scale,
+      solv::SundialsAbstractVector* rhs,
+      solv::SundialsAbstractVector* vtemp,
+      int& num_feval);
+
+   int
+   jacobianTimesVector(
+      solv::SundialsAbstractVector* vector,
+      solv::SundialsAbstractVector* product,
+      const bool soln_changed,
+      solv::SundialsAbstractVector* soln);
+
+   //@}
+
+   //@{
+   /*!
+    * @name Interface functions overloaded from SNESAbstractFunctions.
+    */
+
+   int
+   evaluateNonlinearFunction(
+      Vec xcur,
+      Vec fcur);
+
+   int
+   evaluateJacobian(
+      Vec x);
+
+   int
+   jacobianTimesVector(
+      Vec xin,
+      Vec xout);
+
+   int
+   setupPreconditioner(
+      Vec x);
+
+   int
+   applyPreconditioner(
+      Vec r,
+      Vec z);
+   //@}
+
+   /*!
+    * @brief Set solution ghost cell values along physical boundaries.
+    *
+    * Function is overloaded from RefinePatchStrategy.
+    */
+
+   void
+   setPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const double time,
+      const hier::IntVector& ghost_width_to_fill);
+
+   //@{
+   /*!
+    * @name Empty functions for applying user-defined data refine operations
+    */
+
+   /*
+    * These are overloaded from RefinePatchStrategy.
+    * There are no such user-defined operations here.
+    */
+
+   void preprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio)
+   {
+      (void)fine;
+      (void)coarse;
+      (void)fine_box;
+      (void)ratio;
+   }
+
+   void postprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector& ratio)
+   {
+      (void)fine;
+      (void)coarse;
+      (void)fine_box;
+      (void)ratio;
+   }
+
+   hier::IntVector getRefineOpStencilWidth() const
+   {
+      return hier::IntVector(d_dim, 0);
+   }
+
+   //@}
+
+   //@{
+   /*!
+    * @name Empty functions for applying user-defined data coarsen operations
+    */
+   /*
+    * These are overloaded from CoarsenPatchStrategy.
+    * There are no such user-defined operations here.
+    */
+
+   void preprocessCoarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio)
+   {
+      (void)coarse;
+      (void)fine;
+      (void)coarse_box;
+      (void)ratio;
+   }
+
+   void postprocessCoarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const hier::Box& coarse_box,
+      const hier::IntVector& ratio)
+   {
+      (void)coarse;
+      (void)fine;
+      (void)coarse_box;
+      (void)ratio;
+   }
+
+   hier::IntVector getCoarsenOpStencilWidth() const
+   {
+      return hier::IntVector(d_dim, 0);
+   }
+
+   //@}
+
+   /**
+    * Write data members to given data base for restart.
+    *
+    * Overloaded from tbox::Serializable.
+    */
+   void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> db);
+
+   /**
+    * Write class data to given output stream.
+    */
+   void
+   printClassData(
+      ostream& os) const;
+
+private:
+   /*
+    * Functions to read data from input and restart databases. If the boolean
+    * flag is true, all data members are read from restart.  They can
+    * later be overwritten from values in the input file.  When the flag
+    * is false, all data values are set from thos given in input.
+    *
+    * An assertion results if the database pointer is null.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db,
+      bool is_from_restart);
+
+   /*
+    * Functions for fixing up flux computations along coarse/fine interfaces
+    * when ghost cells are filled with CONSTANT_REFINE refinement operators.
+    */
+
+   void
+   getLevelEdges(
+      hier::BoxList& boxes,
+      tbox::Pointer<hier::Patch> patch,
+      tbox::Pointer<hier::PatchLevel> level,
+      const int dim,
+      const int face);
+
+   void
+   correctLevelFlux(
+      tbox::Pointer<hier::PatchLevel> level);
+
+   void
+   correctPatchFlux(
+      tbox::Pointer<hier::PatchLevel> level,
+      tbox::Pointer<hier::Patch> patch,
+      tbox::Pointer<pdat::CellData<double> > u);
+
+   //@{
+   /*!
+    * @name Numerical routines specific to modified Bratu problem
+    */
+   /*
+    * These are needed by the nonlinear solvers.
+    * They are called by the interface
+    * routines after the vectors and other data has been appropriately
+    * unwrapped so that these routines are solver-independent.
+    */
+
+   void
+   evaluateBratuFunction(
+      tbox::Pointer<solv::SAMRAIVectorReal<double> > x,
+      tbox::Pointer<solv::SAMRAIVectorReal<double> > f);
+
+   /*!
+    * @brief Compute A(x)*x.
+    *
+    * The A(x) used is the one computed in evaluateBratuJacobian()
+    * and stored at d_jacobian_a_id and d_jacobian_b_id.
+    */
+   int
+   jacobianTimesVector(
+      tbox::Pointer<solv::SAMRAIVectorReal<double> > vector,
+      tbox::Pointer<solv::SAMRAIVectorReal<double> > product);
+
+   void
+   setupBratuPreconditioner(
+      tbox::Pointer<solv::SAMRAIVectorReal<double> > x);
+
+   int
+   applyBratuPreconditioner(
+      tbox::Pointer<solv::SAMRAIVectorReal<double> > r,
+      tbox::Pointer<solv::SAMRAIVectorReal<double> > z);
+
+   /*!
+    * @brief Recompute the jacobian A(x).
+    *
+    * The diagonal of A(x) is placed at d_jacobian_a_id.
+    * The off-diagonals are not computed here, because they are
+    * independent of x, and it is easier to not explicitly compute them.
+    */
+   void
+   evaluateBratuJacobian(
+      tbox::Pointer<solv::SAMRAIVectorReal<double> > x);
+
+   //@}
+
+   /*
+    * The object name is used as a handle to databases stored in
+    * restart files and for error reporting purposes.
+    */
+   string d_object_name;
+
+   /*
+    * Dimension of the problem.
+    */
+   const tbox::Dimension d_dim;
+
+   /*
+    * We cache a pointer to the grid geometry object to set up initial
+    * data and set physical boundary conditions.
+    */
+   tbox::Pointer<geom::CartesianGridGeometry> d_grid_geometry;
+
+   /*
+    * Parameters read from input.
+    */
+
+   double d_lambda;      // factor multiplying exponential term
+   double d_input_dt;    // time increment
+
+   /*
+    *hier::Variable data management.
+    *
+    * Contexts are labels to describe the way variables are used.
+    */
+   tbox::Pointer<hier::VariableContext> d_current;
+   tbox::Pointer<hier::VariableContext> d_new;
+   tbox::Pointer<hier::VariableContext> d_scratch;
+
+   /*
+    * Variables for the discrete problem; see comments above class constructor.
+    */
+   tbox::Pointer<pdat::CellVariable<double> > d_solution;
+   tbox::Pointer<pdat::CellVariable<double> > d_source_term;
+   tbox::Pointer<pdat::CellVariable<double> > d_exponential_term;
+   tbox::Pointer<pdat::SideVariable<double> > d_diffusion_coef;
+   tbox::Pointer<pdat::SideVariable<double> > d_flux;
+   tbox::Pointer<pdat::OutersideVariable<double> > d_coarse_fine_flux;
+
+   /*
+    * For storing Jacobian A(x) stuff and computing Jacobian-vector
+    * multiply A(x)*v.
+    */
+   tbox::Pointer<pdat::CellVariable<double> > d_jacobian_a;
+   tbox::Pointer<pdat::FaceVariable<double> > d_jacobian_b;
+   int d_jacobian_a_id;
+   int d_jacobian_b_id;
+   hier::ComponentSelector d_jacobian_data;
+
+   /*
+    * For storing Jacobian A(x) stuff in setting up and applying
+    * the preconditioner A(x)*z=r.
+    */
+   tbox::Pointer<pdat::CellVariable<double> > d_precond_a;
+   tbox::Pointer<pdat::FaceVariable<double> > d_precond_b;
+   int d_precond_a_id;
+   int d_precond_b_id;
+   hier::ComponentSelector d_precond_data;
+
+   int d_soln_scratch_id;
+   int d_flux_id;
+   int d_coarse_fine_flux_id;
+   int d_function_id;
+
+   hier::ComponentSelector d_problem_data;
+   hier::ComponentSelector d_new_patch_problem_data;
+
+   hier::IntVector d_nghosts;
+
+   /*
+    * The nonlinear solution process requires a solution vector; we cache
+    * a pointer to it here.  A variable is used to define weights for the
+    * solution vector entries on a composite grid.
+    */
+   tbox::Pointer<solv::SAMRAIVectorReal<double> > d_solution_vector;
+   tbox::Pointer<solv::SAMRAIVectorReal<double> > d_current_soln_vector;
+
+   tbox::Pointer<pdat::CellVariable<double> > d_weight;
+
+   int d_weight_id;
+
+   /*
+    * Communication algorithms and schedules used for filling ghost cells
+    * and moving data between levels.
+    * Schedules stored in arrays are indexed by the destination
+    * level number in the transfer.  They are cached to save the cost
+    * of generating them multiple times for the same hierarchy
+    * configuration.
+    */
+   RefineAlgorithm d_fill_new_level;
+   RefineAlgorithm d_soln_fill;
+   tbox::Array<tbox::Pointer<RefineSchedule> > d_soln_fill_schedule;
+   CoarsenAlgorithm d_flux_coarsen;
+   tbox::Array<tbox::Pointer<CoarsenSchedule> > d_flux_coarsen_schedule;
+   CoarsenAlgorithm d_soln_coarsen;
+   tbox::Array<tbox::Pointer<CoarsenSchedule> > d_soln_coarsen_schedule;
+   CoarsenAlgorithm d_scratch_soln_coarsen;
+   tbox::Array<tbox::Pointer<CoarsenSchedule> > d_scratch_soln_coarsen_schedule;
+
+   tbox::Pointer<RefineOperator> d_soln_refine_op;
+   tbox::Pointer<CoarsenOperator> d_soln_coarsen_op;
+
+   /*
+    * Current solution time and time increment used in the solution process.
+    * New time is current time + current dt.
+    */
+   double d_current_time;
+   double d_new_time;
+   double d_current_dt;
+
+   /*
+    * Preconditioner and parameters used for Jacobian system.
+    *
+    * The FAC solver manages the composite grid solution procedure.
+    * The Poisson level strategy solves the problem on each level
+    * in the hierarchy.
+    */
+   bool d_use_old_solver;
+   tbox::Pointer<solv::CellPoissonFACSolver> d_FAC_solver;
+
+   int d_max_precond_its;
+   double d_precond_tol;
+
+   static tbox::Pointer<tbox::Timer> s_copy_timer;
+   static tbox::Pointer<tbox::Timer> s_pc_timer;
+
+};
+
+#endif
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,252 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   Nonlinear solver example
+##
+#########################################################################
+
+This example demonstrates use of the the nonlinear solver classes in a
+SAMRAI application.  This example is for 2D and 3D only.
+
+The files included in this directory are as follows:
+ 
+	  ModifiedBratuProblem.h, ModifiedBratuProblem.C
+                        -  Class to set up and solve the modified Bratu
+                           problem..
+	  ModifiedBratuFort.h
+			-  Declarations of FORTRAN functions for
+			   the modified Bratu problem.
+          main.C        -  example main program.
+ 
+COMPILE and RUN
+---------------
+
+Compile:  make main2d
+Run:      main2d 2d.kinsol.input
+          main2d 2d.petsc.input
+ 
+Compile:  make main3d
+Run:      main3d 3d.kinsol.input
+          main3d 3d.petsc.input
+ 
+
+INPUTS
+------
+
+   Main {
+      // General specifications.
+      base_name = "default"	// The base file name for output files.
+      nonlinear_solver_package = "KINSOL" // Name of the nonlinear
+         // solver package.  Can be "KINSOL" or "PETSc-SNES"
+   }
+
+   ModifiedBratuProblem {
+     // The ModifiedBratuProblem class is the "user class" in this example.
+     // It owns the solver and contains the code to set up the solver.
+     // The inputs for ModifiedBratuProblem is simply the inputs for the
+     // individual parts owned by the FACPoisson class.
+     timestep = 0.0625      // time increment used for all steps
+     lambda   = 6.0         // factor multiplying exponential term
+     max_precond_its = 35    // maximum iterations for preconditioner 
+     precond_tol = 1.0e-2    // preconditioner convergence tolerance
+     preconditioner_print_flag = FALSE // whether preconditioner reports residuals
+   }
+
+   KINSOLSolver{
+      // Specify the parameters for the Newton-Krylov solve using KINSOL
+      max_nonlinear_iterations = 20      // Max number of nonlinear iterations.
+      residual_stop_tolerance  = 1.0e-10 // Stopping tolerance on the norm
+                                         // of scaled residual.
+      nonlinear_step_tolerance = 1.0e-10 // Stopping tolerance on maximum
+                                         // entry in scaled Newton step.
+      max_krylov_dimension      = 20     // Max dim of Krylov space.
+      max_linear_solve_restarts = 4      // Max number of linear solver
+                                         // restarts allowed.
+      // Specify whether the user provides certain components
+      // needed by the solver.
+      uses_preconditioner      = TRUE    // Whether a preconditioner is
+                                         // supplied.
+      uses_jac_times_vector    = TRUE    // Whether an analytic Jacobian-vector
+                                         // product is supplied.
+      // Debugging printouts
+      KINSOL_log_filename      = "kinsol.log" // Name of KINSOL log file.
+      KINSOL_print_flag        = 3       // Flag for KINSOL log file print
+                                         // option.
+   }
+
+   SNESSolver{
+      // Specify the parameters for the nonlinear solve using SNES
+      absolute_tolerance             = 1.0e-10 // Absolute nonlinear
+                                               // convergence tolerance.
+      relative_tolerance             = 1.0e-4  // Relative nonlinear
+                                               // convergence tolerance.
+      step_tolerance                 = 1.0e-6  // Minimum tolerance on change
+                                               // in solution norm between
+                                               // nonlinear iterates.
+      linear_solver_type             = "gmres" // Name of linear solver type
+                                               // (KSPType).
+      maximum_gmres_krylov_dimension = 20      // Max dimension of Krylov
+                                               // subspace before restarting.
+                                               // Valid only when using GMRES
+                                               // linear solver.
+      maximum_linear_iterations      = 50      // Max number of linear solver
+                                               // iterations.
+      // Specify whether the user provides certain components
+      // needed by the solver.
+      uses_preconditioner            = TRUE    // Whether a preconditioner is
+                                               // supplied.
+      uses_explicit_jacobian         = TRUE    // Whether user provides
+                                               // Jacobian-vector product
+                                               // function.
+      forcing_term_strategy          = "EWCHOICE1" // Choice of forcing term
+                                               // in linear solver within the
+                                               // inexact Newton method.
+   }
+
+   ImplicitIntegrator{
+      initial_time = 0.0
+      final_time = 1.0
+      max_integrator_steps = 5
+   }
+
+   "CartesianGeometry" input section
+   ---------------------------------
+   CartesianGeometry {
+      //  Specify lower/upper corners of the computational domain and a
+      //  set of non-overlapping boxes defining domain interior.  If union 
+      //  of boxes is not a parallelpiped, lower/upper corner data corresponds 
+      //  to min/max corner indices over all boxes given.
+      //  x_lo  -- (double array) lower corner of computational domain [REQD]
+      //  x_up  -- (double array) upper corner of computational domain [REQD]
+      //  domain_boxes  -- (box array) set of boxes that define interior of 
+      //                   hysical domain. [REQD]
+      //  periodic_dimension -- (int array) coordinate directions in which 
+      //                        domain is periodic.  Zero indicates not
+      //                        periodic, non-zero value indicates periodicity.
+      //                        [0]
+      x_lo = 0.e0 , 0.e0           
+      x_up = 65.e0 , 55.e0       
+      domain_boxes      = [(0,9),(14,20)],
+                          [(0,21),(19,35)],
+                          [(0,36),(14,49)],
+                          [(20,0),(49,54)],
+                          [(50,0),(64,35)],
+                          [(50,46),(64,54)],
+                          [(57,36),(64,45)]
+      periodic_dimension = 0, 1  // periodic in y only
+   }
+
+
+   "GriddingAlgorithm" input section
+   ---------------------------------
+   GriddingAlgorithm {
+      // Information used to create patches in AMR hierarchy.
+      // max_levels -- (int) max number of mesh levels in hierarchy [REQD]
+      // 
+      // For most of the following parameters, the number of precribed data
+      // values need not match the number of levels in the hierarchy 
+      // (determined by max_levels).  If more values are given than number 
+      // of levels, extraneous values will be ignored.  If less are give, then
+      // values that correspond to individual levels will apply to those 
+      // levels.  Missing values will be taken from those for the finest
+      // level specified.
+      //
+      // ratio_to_coarser {
+      //   level_1 -- (int array) ratio between index spaces on 
+      //              level 1 to level 0 [REQD]
+      //   level_2 -- (int array)  ratio between index spaces on 
+      //              level 2 to level 1 [REQD]
+      //   etc....
+      // }
+      // largest_patch_size {
+      //   level_0 -- (int array) largest patch allowed on level 0. 
+      //              [REQD]    
+      //   level_1 -- (int array)    "       "      "   "  level 1 
+      //              [level 0 entry]
+      //   etc....                       
+      // }
+      // smallest_patch_size {
+      //   level_0 -- (int array) smallest patch allowed on level 0. 
+      //              [max ghost width for all variables]    
+      //   level_1 -- (int array)    "       "      "   "  level 1 
+      //              [level 0 entry]
+      //   etc....                       
+      // }
+      max_levels = 3
+      ratio_to_coarser {
+         level_1 = 4 , 4
+         level_2 = 4 , 4
+         level_3 = 4 , 4
+      }
+      largest_patch_size {
+         level_0 = 48 , 48
+      }
+      smallest_patch_size {
+         level_0 = 8 , 8
+      }
+
+      // Tolerances for gridding efficiency and box chopping operations.
+      // efficiency_tolerance -- (double array) minimum percentage of tagged 
+      //                         cells allowed in a box [0.8 for each level]
+      // combine_efficiency   -- (double array) threshold specifying when a  
+      //                         box may be chopped into two smaller boxes.
+      //                         If sum of the volumes of smaller boxes is > 
+      //                         combine efficiency * volume of larger box, 
+      //                         then larger box will not be chopped.
+      //                         [0.8 for each level]
+      // proper_nesting_buffer -- (int array) number of coarse cells by which
+      //                          the next finer level is nested within its
+      //                          interior. [1 for each level]
+      efficiency_tolerance    = 0.85e0
+      combine_efficiency      = 0.95e0
+      proper_nesting_buffer   = 1
+
+      // Option to read or write gridding information
+      // write_regrid_boxes    -- (bool) Output sequence of refine boxes to file
+      // read_regrid_boxes     -- (bool) Read sequence of refine boxes from file
+      // regrid_boxes_filename -- (string) file name used for reading or writing
+      //                          boxes.
+      //
+      // Reading and writing options require some user intervention to assure
+      // they work properly.  Please consult Andy Wissink (awissink at llnl.gov)
+      // if you are interested in using these options.
+      write_regrid_boxes    = TRUE
+      regrid_boxes_filename = TRUE
+   }
+
+   "StandardTagAndInitialize" input section
+   ---------------------------------------------
+   StandardTagAndInitialize {
+      // Specification of the type of tagging to be performed
+      // tagging_method -- (string array) one or more entries specifying
+      //                 the tagging algorithm used.  Options include:
+      //                 "GRADIENT_DETECTOR"
+      //                 "RICHARDSON_EXTRAPOLATION"
+      //                 "REFINE_BOXES"
+      //
+      // REFINE_BOXES allows you to prescribe where refinement should occur.
+      // If this option is used, you must also supply a RefineBoxes database
+      // entry with the refine boxes on different levels specified.  i.e.
+      //    RefineBoxes{
+      //        level_0 -- (BoxArray) Boxes to be refined on level 0
+      //        level_1 -- (BoxArray) Boxes to be refined on level 1
+      //        etc.
+      //
+      // Gradient detection option.
+      tagging_method = "GRADIENT_DETECTOR"
+      //
+      // Richarson extrapolation option.
+      tagging_method = "RICHARDSON_EXTRAPOLATION"
+      //
+      // Static refine boxes option.
+      tagging_method = "REFINE_BOXES"
+      RefineBoxes {
+        level0_boxes = [(15,0),(29,14)]
+        level1_boxes = [(65,10),(114,40)]
+      }
+      // Combination.
+      tagging_method = "RICHARDSON_EXTRAPOLATION", "GRADIENT_DETECTOR"
+   }
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/bratu-example.pdf
Binary file source/test/nonlinear/bratu-example.pdf has changed
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/FACjacobian1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/FACjacobian1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,67 @@
+define(NDIM,1)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim1d.i)dnl
+
+      subroutine compfacdiag1d(
+     &  ifirst0,ilast0,
+     &  dt,cellvol,
+     &  expu,dsrcdu,
+     &  diag)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter(one=1.d0)
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0
+      double precision dt, cellvol
+      double precision 
+     &  expu(CELL1d(ifirst,ilast,0)),
+     &  dsrcdu(CELL1d(ifirst,ilast,0))
+c ouput arrays:
+      double precision 
+     &  diag(CELL1d(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer ic0
+
+      do ic0=ifirst0,ilast0
+         diag(ic0) = cellvol
+     &       *(one - dt*(expu(ic0) + dsrcdu(ic0)))
+      enddo
+
+      return
+      end
+c
+c
+c
+      subroutine compfacoffdiag1d(
+     &  ifirst0,ilast0,
+     &  dt, cellvol,
+     &  sidediff0,
+     &  offdiag0)
+c***********************************************************************
+      implicit none
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0
+      double precision dt, cellvol
+      double precision
+     &  sidediff0(SIDE1d(ifirst,ilast,0))
+c ouput arrays:
+      double precision
+     &  offdiag0(FACE1d(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer ie0
+      double precision factor
+
+      factor = cellvol*dt
+c
+      do ie0=ifirst0,ilast0+1
+         offdiag0(ie0) = factor*sidediff0(ie0)
+      enddo
+c
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/FACjacobian2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/FACjacobian2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,116 @@
+define(NDIM,2)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+      subroutine compfacdiag2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  dt,cellvol,
+     &  expu,dsrcdu,
+     &  diag)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter(one=1.d0)
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      double precision dt, cellvol
+      double precision 
+     &  expu(CELL2d(ifirst,ilast,0)),
+     &  dsrcdu(CELL2d(ifirst,ilast,0))
+c ouput arrays:
+      double precision 
+     &  diag(CELL2d(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer ic0,ic1
+
+      do ic1=ifirst1,ilast1
+         do ic0=ifirst0,ilast0
+            diag(ic0,ic1) = one - dt*(expu(ic0,ic1) + dsrcdu(ic0,ic1))
+         enddo
+      enddo
+
+      return
+      end
+c
+c
+c
+      subroutine compfacoffdiag2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  dt, cellvol,
+     &  sidediff0,sidediff1,
+     &  offdiag0,offdiag1)
+c***********************************************************************
+      implicit none
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      double precision dt, cellvol
+      double precision
+     &  sidediff0(SIDE2d0(ifirst,ilast,0)),
+     &  sidediff1(SIDE2d1(ifirst,ilast,0))
+c ouput arrays:
+      double precision
+     &  offdiag0(FACE2d0(ifirst,ilast,0)),
+     &  offdiag1(FACE2d1(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer ic0,ic1,ie0,ie1
+      double precision factor
+
+      factor =  dt
+c
+      do ic1=ifirst1,ilast1
+         do ie0=ifirst0,ilast0+1
+            offdiag0(ie0,ic1) = factor*sidediff0(ie0,ic1)
+         enddo
+      enddo
+c
+      do ic0=ifirst0,ilast0
+         do ie1=ifirst1,ilast1+1
+            offdiag1(ie1,ic0) = factor*sidediff1(ic0,ie1)
+         enddo
+      enddo
+c
+      return
+      end
+
+
+      subroutine compjv2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  gcw,
+     &  diag,
+     &  flux0,flux1,
+     &  v,
+     &  dx, dt,
+     &  jv
+     &  )
+c
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer gcw
+      double precision 
+     &  v(CELL2d(ifirst,ilast,gcw))
+      double precision 
+     &  diag(CELL2d(ifirst,ilast,0))
+      double precision
+     &  flux0(SIDE2d0(ifirst,ilast,0)),
+     &  flux1(SIDE2d1(ifirst,ilast,0))
+      double precision
+     &  jv(CELL2d(ifirst,ilast,0))
+      double precision dx(0:NDIM), dt
+      integer ic0,ic1
+c
+      do ic1=ifirst1,ilast1
+         do ic0=ifirst0,ilast0
+            jv(ic0,ic1) = v(ic0,ic1) - 
+     &           dt*( diag(ic0,ic1)*v(ic0,ic1)
+     &           + ( flux0(ic0+1,ic1) - flux0(ic0,ic1) )/dx(0)
+     &           + ( flux1(ic0,ic1+1) - flux1(ic0,ic1) )/dx(1)
+     &           )
+         enddo
+      enddo
+c
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/FACjacobian3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/FACjacobian3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,138 @@
+define(NDIM,3)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine compfacdiag3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  dt,cellvol,
+     &  expu,dsrcdu,
+     &  diag)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter(one=1.d0)
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      double precision dt, cellvol
+      double precision 
+     &  expu(CELL3d(ifirst,ilast,0)),
+     &  dsrcdu(CELL3d(ifirst,ilast,0))
+c ouput arrays:
+      double precision 
+     &  diag(CELL3d(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer ic0,ic1,ic2
+      double precision dtfrac
+
+      do ic2=ifirst2,ilast2
+         do ic1=ifirst1,ilast1
+            do ic0=ifirst0,ilast0
+               diag(ic0,ic1,ic2) = one - 
+     &                      dt*(expu(ic0,ic1,ic2) + dsrcdu(ic0,ic1,ic2))
+            enddo
+         enddo
+      enddo
+
+      return
+      end
+c
+c
+c
+      subroutine compfacoffdiag3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  dt, cellvol,
+     &  sidediff0,sidediff1,sidediff2,
+     &  offdiag0,offdiag1,offdiag2)
+c***********************************************************************
+      implicit none
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      double precision dt, cellvol
+      double precision
+     &  sidediff0(SIDE3d0(ifirst,ilast,0)),
+     &  sidediff1(SIDE3d1(ifirst,ilast,0)),
+     &  sidediff2(SIDE3d2(ifirst,ilast,0))
+c ouput arrays:
+      double precision
+     &  offdiag0(FACE3d0(ifirst,ilast,0)),
+     &  offdiag1(FACE3d1(ifirst,ilast,0)),
+     &  offdiag2(FACE3d2(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer ic0,ic1,ic2,ie0,ie1,ie2
+      double precision factor
+
+      factor = dt
+c
+      do ic2=ifirst2,ilast2
+         do ic1=ifirst1,ilast1
+            do ie0=ifirst0,ilast0+1
+               offdiag0(ie0,ic1,ic2) = factor*sidediff0(ie0,ic1,ic2)
+            enddo
+         enddo
+      enddo
+c
+      do ic0=ifirst0,ilast0
+         do ic2=ifirst2,ilast2
+            do ie1=ifirst1,ilast1+1
+               offdiag1(ie1,ic2,ic0) = factor*sidediff1(ic0,ie1,ic2)
+            enddo
+         enddo
+      enddo
+c
+      do ic1=ifirst1,ilast1
+         do ic0=ifirst0,ilast0
+            do ie2=ifirst2,ilast2+1
+               offdiag2(ie2,ic0,ic1) = factor*sidediff2(ic0,ic1,ie2)
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+
+
+      subroutine compjv3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  gcw,
+     &  diag,
+     &  flux0,flux1,flux2,
+     &  v,
+     &  dx, dt,
+     &  jv
+     &  )
+c
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer gcw
+      double precision 
+     &  v(CELL3d(ifirst,ilast,gcw))
+      double precision 
+     &  diag(CELL3d(ifirst,ilast,0))
+      double precision
+     &  flux0(SIDE3d0(ifirst,ilast,0)),
+     &  flux1(SIDE3d1(ifirst,ilast,0)),
+     &  flux2(SIDE3d2(ifirst,ilast,0))
+      double precision
+     &  jv(CELL3d(ifirst,ilast,0))
+      double precision dx(0:NDIM), dt
+      integer ic0,ic1,ic2
+c
+      do ic2=ifirst2,ilast2
+         do ic1=ifirst1,ilast1
+            do ic0=ifirst0,ilast0
+               jv(ic0,ic1,ic2) = v(ic0,ic1,ic2) - 
+     &              dt*( diag(ic0,ic1,ic2)*v(ic0,ic1,ic2)
+     &              + (flux0(ic0+1,ic1,ic2)-flux0(ic0,ic1,ic2))/dx(0)
+     &              + (flux1(ic0,ic1+1,ic2)-flux1(ic0,ic1,ic2))/dx(1)
+     &              + (flux2(ic0,ic1,ic2+1)-flux2(ic0,ic1,ic2))/dx(2)
+     &              )
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/adjcrsfineoffdiag1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/adjcrsfineoffdiag1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,36 @@
+define(NDIM,1)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim1d.i)dnl
+
+      subroutine adjcrsfineoffdiag1d(
+     & flo0, fhi0,
+     & clo0, chi0,
+     & direction, side, 
+     & offdiag0 )
+
+      implicit none
+
+      integer clo0
+
+      integer chi0
+
+      integer flo0
+
+      integer fhi0
+
+      integer direction
+      integer side
+
+      double precision offdiag0(FACE1d(flo,fhi,0))
+
+      integer i
+
+      double precision factor
+      parameter      ( factor=2.0d0/3.0d0)
+
+      if ( direction .eq. 0 ) then
+         i = clo0-side+1
+         offdiag0(i) = offdiag0(i)*factor
+      endif
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/bcFluxCopy1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/bcFluxCopy1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,35 @@
+define(NDIM,1)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim1d.i)dnl
+
+      subroutine ewfluxcopy1d(
+     & lo0, hi0, 
+     & ewflux,
+     & sideflux,
+     & side )
+
+c  Copy face fluxes in the x-direction.
+
+      implicit none
+
+      integer lo0
+
+      integer hi0
+
+      integer side
+
+      double precision ewflux(SIDE1d(lo,hi,0))
+      double precision sideflux(OUTERSIDE1d(lo,hi,0))
+
+      integer ihi
+      integer ilo
+
+      if (side .eq. 0) then
+         ilo = lo0
+         sideflux(1) = ewflux(ilo)
+      else if (side .eq. 1) then
+         ihi = hi0+1
+         sideflux(1) = ewflux(ihi)
+      end if
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/bcFluxCopy2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/bcFluxCopy2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,82 @@
+define(NDIM,2)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+      subroutine ewfluxcopy2d(
+     & lo0, hi0, lo1, hi1,
+     & ewflux,
+     & sideflux,
+     & side )
+
+c  Copy face fluxes in the x-direction.
+
+      implicit none
+
+      integer lo0
+      integer lo1
+
+      integer hi0
+      integer hi1
+
+      integer side
+
+      double precision ewflux(SIDE2d0(lo,hi,0))
+      double precision sideflux(OUTERSIDE2d0(lo,hi,0))
+
+      integer ihi
+      integer ilo
+      integer j
+
+      if (side .eq. 0) then
+         ilo = lo0
+         do j = lo1, hi1
+            sideflux(j) = ewflux(ilo,j)
+         end do
+      else if (side .eq. 1) then
+         ihi = hi0+1
+         do j = lo1, hi1
+            sideflux(j) = ewflux(ihi,j)
+         end do
+      end if
+
+      return
+      end
+
+      subroutine nsfluxcopy2d(
+     & lo0, hi0, lo1, hi1,
+     & nsflux,
+     & sideflux,
+     & side )
+
+c  Copy face fluxes in the y-direction.
+
+      implicit none
+
+      integer lo0
+      integer lo1
+
+      integer hi0
+      integer hi1
+
+      integer side
+
+      double precision nsflux(SIDE2d1(lo,hi,0))
+      double precision sideflux(OUTERSIDE2d1(lo,hi,0))
+
+      integer i
+      integer jhi
+      integer jlo
+
+      if (side .eq. 0) then
+         jlo = lo1
+         do i = lo0, hi0
+            sideflux(i) = nsflux(i,jlo)
+         end do
+      else if (side .eq. 1) then
+         jhi = hi1+1
+         do i = lo0, hi0
+            sideflux(i) = nsflux(i,jhi)
+         end do
+      end if
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/bcFluxCopy3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/bcFluxCopy3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,144 @@
+define(NDIM,3)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine ewfluxcopy3d(
+     & lo0, hi0, lo1, hi1, lo2, hi2,
+     & ewflux,
+     & sideflux,
+     & side )
+
+c  Copy face fluxes in the x-direction.
+
+      implicit none
+
+      integer lo0
+      integer lo1
+      integer lo2
+
+      integer hi0
+      integer hi1
+      integer hi2
+
+      integer side
+
+      double precision ewflux(SIDE3d0(lo,hi,0))
+      double precision sideflux(OUTERSIDE3d0(lo,hi,0))
+
+      integer ihi
+      integer ilo
+      integer j
+      integer k
+
+      if (side .eq. 0) then
+         ilo = lo0
+         do k = lo2, hi2
+            do j = lo1, hi1
+               sideflux(j,k) = ewflux(ilo,j,k)
+            end do
+         end do
+      else if (side .eq. 1) then
+         ihi = hi0+1
+         do k = lo2, hi2
+            do j = lo1, hi1
+               sideflux(j,k) = ewflux(ihi,j,k)
+            end do
+         end do
+      end if
+
+      return
+      end
+
+      subroutine nsfluxcopy3d(
+     & lo0, hi0, lo1, hi1, lo2, hi2,
+     & nsflux,
+     & sideflux,
+     & side )
+
+c  Copy face fluxes in the y-direction.
+
+      implicit none
+
+      integer lo0
+      integer lo1
+      integer lo2
+
+      integer hi0
+      integer hi1
+      integer hi2
+
+      integer side
+
+      double precision nsflux(SIDE3d1(lo,hi,0))
+      double precision sideflux(OUTERSIDE3d1(lo,hi,0))
+
+      integer i
+      integer jhi
+      integer jlo
+      integer k
+
+      if (side .eq. 0) then
+         jlo = lo1
+         do k = lo2, hi2
+            do i = lo0, hi0
+               sideflux(i,k) = nsflux(i,jlo,k)
+            end do
+         end do
+      else if (side .eq. 1) then
+         jhi = hi1+1
+         do k = lo2, hi2
+            do i = lo0, hi0
+               sideflux(i,k) = nsflux(i,jhi,k)
+            end do
+         end do
+      end if
+
+      return
+      end
+
+      subroutine tbfluxcopy3d(
+     & lo0, hi0, lo1, hi1, lo2, hi2,
+     & tbflux,
+     & sideflux,
+     & side )
+
+c  Copy face fluxes in the z-direction.
+
+      implicit none
+
+      integer lo0
+      integer lo1
+      integer lo2
+
+      integer hi0
+      integer hi1
+      integer hi2
+
+      integer side
+
+      double precision tbflux(SIDE3d2(lo,hi,0))
+      double precision sideflux(OUTERSIDE3d2(lo,hi,0))
+
+      integer i
+      integer j
+      integer khi
+      integer klo
+
+      if (side .eq. 0) then
+         klo = lo2
+         do j = lo1, hi1
+            do i = lo0, hi0
+               sideflux(i,j) = tbflux(i,j,klo)
+            end do
+         end do
+      else if (side .eq. 1) then
+         khi = hi2+1
+         do j = lo1, hi1
+            do i = lo0, hi0
+               sideflux(i,j) = tbflux(i,j,khi)
+            end do
+         end do
+      end if 
+
+      return
+      end
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/bcFluxFix1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/bcFluxFix1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,59 @@
+define(NDIM,1)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim1d.i)dnl
+
+      subroutine ewbcfluxfix1d(
+     & lo0, hi0, 
+     & ghostcells,
+     & dx,
+     & u,
+     & ewflux,
+     & seglo, seghi, 
+     & face )
+
+c  Fixup routine for boundary fluxes in the x-direction.
+
+      implicit none
+
+      integer lo0
+
+      integer hi0
+
+      integer ghostcells
+
+      integer segHi(0:NDIM-1)
+      integer segLo(0:NDIM-1)
+
+      integer face
+
+      double precision dx(0:NDIM-1)
+      double precision u(CELL1d(lo,hi,ghostcells))
+      double precision ewflux(SIDE1d(lo,hi,0))
+
+      integer ihi
+      integer ilo
+
+      double precision two,       three
+      parameter      ( two=2.0d0, three=3.0d0 )
+      double precision eight,       nine
+      parameter      ( eight=8.0d0, nine=9.0d0 )
+
+      if (face .eq. 0) then
+         ilo = lo0
+c  This is for first-order approximations to the flux.
+c         ewflux(ilo) = two*ewflux(ilo)
+c  This is for second-order approximations to the flux.
+          ewflux(ilo) = (-eight*u(lo0-1) + 
+     &                    nine*u(lo0)    - 
+     &                    u(lo0+1))/(three*dx(0))
+      else if (face .eq. 1) then
+         ihi = hi0+1
+c  This is for first-order approximations to the flux.
+c         ewflux(ihi) = two*ewflux(ihi)
+c  This is for second-order approximations to the flux.
+          ewflux(ihi) = -(-eight*u(hi0+1) +
+     &                    nine*u(hi0)    -
+     &                    u(hi0-1))/(three*dx(0))
+      end if
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/bcFluxFix2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/bcFluxFix2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,140 @@
+define(NDIM,2)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+      subroutine ewbcfluxfix2d(
+     & lo0, hi0, lo1, hi1,
+     & ghostcells,
+     & dx,
+     & u,
+     & ewflux,
+     & seglo, seghi, 
+     & face )
+
+c  Fixup routine for boundary fluxes in the x-direction.
+
+      implicit none
+
+      integer lo0
+      integer lo1
+
+      integer hi0
+      integer hi1
+
+      integer ghostcells
+
+      integer segHi(0:NDIM-1)
+      integer segLo(0:NDIM-1)
+
+      integer face
+
+      double precision dx(0:NDIM-1)
+      double precision u(CELL2d(lo,hi,ghostcells))
+      double precision ewflux(SIDE2d0(lo,hi,0))
+
+      integer ihi
+      integer ilo
+      integer j
+      integer jhi
+      integer jlo
+
+      double precision two,       three
+      parameter      ( two=2.0d0, three=3.0d0 )
+      double precision eight,       nine
+      parameter      ( eight=8.0d0, nine=9.0d0 )
+
+      jlo = max(lo1, segLo(1))
+      jhi = min(hi1, segHi(1))
+
+      if (face .eq. 0) then
+         ilo = lo0
+         do j = jlo, jhi
+c  This is for first-order approximations to the flux.
+c            ewflux(ilo,j) = two*ewflux(ilo,j)
+c  This is for second-order approximations to the flux.
+            ewflux(ilo,j) = (-eight*u(lo0-1,j) + 
+     &                       nine*u(lo0,j)    - 
+     &                       u(lo0+1,j))/(three*dx(0))
+         end do
+      else if (face .eq. 1) then
+         ihi = hi0+1
+         do j = jlo, jhi
+c  This is for first-order approximations to the flux.
+c            ewflux(ihi,j) = two*ewflux(ihi,j)
+c  This is for second-order approximations to the flux.
+            ewflux(ihi,j) = -(-eight*u(hi0+1,j) +
+     &                         nine*u(hi0,j)    -
+     &                         u(hi0-1,j))/(three*dx(0))
+         end do
+      end if
+
+      return
+      end
+
+      subroutine nsbcfluxfix2d(
+     & lo0, hi0, lo1, hi1,
+     & ghostcells,
+     & dx,
+     & u,
+     & nsflux,
+     & seglo, seghi, 
+     & face )
+
+c  Fixup routine for boundary fluxes in the y-direction.
+
+      implicit none
+
+      integer lo0
+      integer lo1
+
+      integer hi0
+      integer hi1
+
+      integer ghostcells
+
+      integer segHi(0:NDIM-1)
+      integer segLo(0:NDIM-1)
+
+      integer face
+
+      double precision dx(0:NDIM-1)
+      double precision u(CELL2d(lo,hi,ghostcells))
+      double precision nsflux(SIDE2d1(lo,hi,0))
+
+      integer i
+      integer ihi
+      integer ilo
+      integer jhi
+      integer jlo
+
+      double precision two,        three      
+      parameter      ( two= 2.0d0, three=3.0d0 )
+      double precision eight,       nine
+      parameter      ( eight=8.0d0, nine=9.0d0 )
+
+      ilo = max(lo0, segLo(0))
+      ihi = min(hi0, segHi(0))
+
+      if (face .eq. 2) then
+         jlo = lo1
+         do i = ilo, ihi
+c  This is for first-order approximations to the flux.
+c            nsflux(i,jlo) = two*nsflux(i,jlo)
+c  This is for second-order approximations to the flux.
+            nsflux(i,jlo) = (-eight*u(i,lo1-1) +
+     &                        nine*u(i,lo1)    -
+     &                        u(i,lo1+1))/(three*dx(1))
+         end do
+      else if (face .eq. 3) then
+         jhi = hi1+1
+         do i = ilo, ihi
+c  This is for first-order approximations to the flux.
+c            nsflux(i,jhi) = two*nsflux(i,jhi)
+c  This is for second-order approximations to the flux.
+            nsflux(i,jhi) = - (-eight*u(i,hi1+1) +
+     &                          nine*u(i,hi1)    -
+     &                          u(i,hi1-1))/(three*dx(1))
+         end do
+      end if
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/bcFluxFix3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/bcFluxFix3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,242 @@
+define(NDIM,3)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine ewbcfluxfix3d(
+     & lo0, hi0, lo1, hi1, lo2, hi2,
+     & ghostcells,
+     & dx,
+     & u,
+     & ewflux,
+     & seglo, seghi, 
+     & face )
+
+c  Fixup routine for boundary fluxes in the x-direction.
+
+      implicit none
+
+      integer lo0
+      integer lo1
+      integer lo2
+
+      integer hi0
+      integer hi1
+      integer hi2
+
+      integer ghostcells
+
+      integer segHi(0:NDIM-1)
+      integer segLo(0:NDIM-1)
+
+      integer face
+
+      double precision dx(0:NDIM-1)
+      double precision u(CELL3d(lo,hi,ghostcells))
+      double precision ewflux(SIDE3d0(lo,hi,0))
+
+      integer ihi
+      integer ilo
+      integer j
+      integer jhi
+      integer jlo
+      integer k
+      integer khi
+      integer klo
+
+      double precision two,        three      
+      parameter      ( two= 2.0d0, three=3.0d0 )
+      double precision eight,       nine
+      parameter      ( eight=8.0d0, nine=9.0d0 )
+
+      jlo = max(lo1, segLo(1))
+      jhi = min(hi1, segHi(1))
+      klo = max(lo2, segLo(2))
+      khi = min(hi2, segHi(2))
+
+      if (face .eq. 0) then
+         ilo = lo0
+         do k = klo, khi
+            do j = jlo, jhi
+c  This is for first-order approximations to the flux.
+c               ewflux(ilo,j,k) = two*ewflux(ilo,j,k)
+c  This is for second-order approximations to the flux.
+               ewflux(ilo,j,k) = (-eight*u(lo0-1,j,k) + 
+     &                             nine*u(lo0,j,k)    - 
+     &                             u(lo0+1,j,k))/(three*dx(0))
+            end do
+         end do
+      else if (face .eq. 1) then
+         ihi = hi0+1
+         do k = klo, khi
+            do j = jlo, jhi
+c  This is for first-order approximations to the flux.
+c               ewflux(ihi,j,k) = two*ewflux(ihi,j,k)
+c  This is for second-order approximations to the flux.
+               ewflux(ihi,j,k) = -(-eight*u(hi0+1,j,k) +
+     &                              nine*u(hi0,j,k)    -
+     &                              u(hi0-1,j,k))/(three*dx(0))
+            end do
+         end do
+      end if
+
+      return
+      end
+
+      subroutine nsbcfluxfix3d(
+     & lo0, hi0, lo1, hi1, lo2, hi2,
+     & ghostcells,
+     & dx,
+     & u,
+     & nsflux,
+     & seglo, seghi, 
+     & face )
+
+c  Fixup routine for boundary fluxes in the y-direction.
+
+      implicit none
+
+      integer lo0
+      integer lo1
+      integer lo2
+
+      integer hi0
+      integer hi1
+      integer hi2
+
+      integer ghostcells
+
+      integer segHi(0:NDIM-1)
+      integer segLo(0:NDIM-1)
+
+      integer face
+
+      double precision dx(0:NDIM-1)
+      double precision u(CELL3d(lo,hi,ghostcells))
+      double precision nsflux(SIDE3d1(lo,hi,0))
+
+      integer i
+      integer ihi
+      integer ilo
+      integer jhi
+      integer jlo
+      integer k
+      integer khi
+      integer klo
+
+      double precision two,        three      
+      parameter      ( two= 2.0d0, three=3.0d0 )
+      double precision eight,       nine
+      parameter      ( eight=8.0d0, nine=9.0d0 )
+
+      ilo = max(lo0, segLo(0))
+      ihi = min(hi0, segHi(0))
+      klo = max(lo2, segLo(2))
+      khi = min(hi2, segHi(2))
+
+      if (face .eq. 2) then
+         jlo = lo1
+         do k = klo, khi
+            do i = ilo, ihi
+c  This is for first-order approximations to the flux.
+c               nsflux(i,jlo,k) = two*nsflux(i,jlo,k)
+c  This is for second-order approximations to the flux.
+               nsflux(i,jlo,k) = (-eight*u(i,lo1-1,k) +
+     &                             nine*u(i,lo1,k)    -
+     &                             u(i,lo1+1,k))/(three*dx(1))
+            end do
+         end do
+      else if (face .eq. 3) then
+         jhi = hi1+1
+         do k = klo, khi
+            do i = ilo, ihi
+c  This is for first-order approximations to the flux.
+c               nsflux(i,jhi,k) = two*nsflux(i,jhi,k)
+c  This is for second-order approximations to the flux.
+               nsflux(i,jhi,k) = - (-eight*u(i,hi1+1,k) +
+     &                               nine*u(i,hi1,k)    -
+     &                               u(i,hi1-1,k))/(three*dx(1))
+            end do
+         end do
+      end if
+
+      return
+      end
+
+      subroutine tbbcfluxfix3d(
+     & lo0, hi0, lo1, hi1, lo2, hi2,
+     & ghostcells,
+     & dx,
+     & u,
+     & tbflux,
+     & seglo, seghi, 
+     & face )
+
+c  Fixup routine for boundary fluxes in the z-direction.
+
+      implicit none
+
+      integer lo0
+      integer lo1
+      integer lo2
+
+      integer hi0
+      integer hi1
+      integer hi2
+
+      integer segHi(0:NDIM-1)
+      integer segLo(0:NDIM-1)
+
+      integer ghostcells
+
+      integer face
+
+      double precision dx(0:NDIM-1)
+      double precision u(CELL3d(lo,hi,ghostcells))
+      double precision tbflux(SIDE3d2(lo,hi,0))
+
+      integer i
+      integer ihi
+      integer ilo
+      integer j
+      integer jhi
+      integer jlo
+      integer khi
+      integer klo
+
+      double precision two,        three      
+      parameter      ( two= 2.0d0, three=3.0d0 )
+      double precision eight,       nine
+      parameter      ( eight=8.0d0, nine=9.0d0 )
+
+      ilo = max(lo0, segLo(0))
+      ihi = min(hi0, segHi(0))
+      jlo = max(lo1, segLo(1))
+      jhi = min(hi1, segHi(1))
+
+      if (face .eq. 4) then
+         klo = lo2
+         do j = jlo, jhi
+            do i = ilo, ihi
+c  This is for first-order approximations to the flux.
+c               tbflux(i,j,klo) = two*tbflux(i,j,klo)
+c  This is for second-order approximations to the flux.
+               tbflux(i,j,klo) = (-eight*u(i,j,lo2-1) +
+     &                             nine*u(i,j,lo2)    -
+     &                             u(i,j,lo2+1))/(three*dx(2))
+            end do
+         end do
+      else if (face .eq. 5) then
+         khi = hi2+1
+         do j = jlo, jhi
+            do i = ilo, ihi
+c  This is for first-order approximations to the flux.
+c               tbflux(i,j,khi) = two*tbflux(i,j,khi)
+c  This is for second-order approximations to the flux.
+               tbflux(i,j,khi) = -(-eight*u(i,j,hi2+1) + 
+     &                              nine*u(i,j,hi2)    -
+     &                              u(i,j,hi2-1))/(three*dx(2))
+            end do
+         end do
+      end if
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/bratufunc1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/bratufunc1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,351 @@
+define(NDIM,1)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim1d.i)dnl
+
+c
+c The following macro definitions are used in the routines below to
+c define certain expressions used in the solution of the problem:
+c
+c    du/dt = div( D(x,t)*div(u) ) + lambda * exp(u) + source(x,t,u)
+c 
+c IMPORTANT NOTE: source term definition and source term derivative 
+c                 definition must be consistent
+c
+
+c
+c DIFFUSION COEFFICIENT DEFINITION:
+c
+c source_term is written as diffcoef(i0) = some function
+c of x = (x(0)), t = time
+c
+define(diffusion_coefficient,`
+            sidediff$1(i0) = 1.0d0
+')dnl
+
+c
+c SOURCE TERM DEFINITION:
+c
+c source term is written as src(i0) = some function
+c of x = (x(0)), t = time, and u = u(i0)
+c
+define(source_term,`
+            xterm = x(0)*(1.d0 - x(0))
+            src(i0) = (xterm
+     &        + time*(2.0d0*xterm)
+     &        - lambda*exp(time*xterm))
+')dnl
+
+c
+c SOURCE TERM DERIVATIVE DEFINITION:
+c
+c derivative of source term w.r.t. solution is written as 
+c dsrcdu(ic0) = some function of x = (xc(0)), 
+c t = time, and u = u(ic0)
+c
+define(source_term_derivative,`
+            dsrcdu(i0) = 0.0d0
+')dnl
+
+
+
+      subroutine compdiffcoef1d(
+     &  ifirst0,ilast0,
+     &  xlo, dx, time,
+     &  sidediff0)
+c***********************************************************************
+      implicit none
+      double precision half
+      parameter(half=0.5d0)
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0
+      double precision xlo(0:NDIM-1), dx(0:NDIM-1), time
+      double precision
+     &  sidediff0(SIDE1d(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0
+      double precision x(0:NDIM-1)
+c
+      do i0=ifirst0,ilast0+1
+         x(0) = xlo(0)+dx(0)*dble(i0-ifirst0)
+diffusion_coefficient(0)dnl
+      enddo
+
+c
+      return
+      end
+c
+c
+c
+      subroutine compexpu1d(
+     &  ifirst0,ilast0,
+     &  ngcu,
+     &  lambda,
+     &  u,
+     &  expu)
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ngcu
+      double precision lambda
+      double precision u(CELL1d(ifirst,ilast,ngcu))
+c ouput arrays:
+      double precision expu(CELL1d(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0
+
+      do i0=ifirst0,ilast0
+         expu(i0) = lambda*exp(u(i0))
+      enddo
+
+      return
+      end
+c
+c
+c
+      subroutine compsrc1d(
+     &  ifirst0,ilast0,
+     &  ngcu,
+     &  xlo, dx, time,
+     &  lambda,
+     &  u,
+     &  src)
+c***********************************************************************
+      implicit none
+      double precision half
+      parameter(half=0.5d0)
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ngcu
+      double precision xlo(0:NDIM-1), dx(0:NDIM-1), time, lambda
+      double precision u(CELL1d(ifirst,ilast,ngcu))
+c ouput arrays:
+      double precision src(CELL1d(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0
+      double precision x(0:NDIM-1)
+      double precision xterm
+
+      do i0=ifirst0,ilast0
+         x(0) = xlo(0)+dx(0)*(dble(i0-ifirst0)+half)
+source_term()dnl
+      enddo
+
+      return
+      end
+c
+c
+c
+      subroutine compsideflux1d(
+     &  ifirst0,ilast0,
+     &  ngcu,
+     &  dx,
+     &  sidediff0,
+     &  u,
+     &  flux0)
+c***********************************************************************
+      implicit none
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ngcu
+      double precision dx(0:NDIM-1)
+      double precision 
+     &  sidediff0(SIDE1d(ifirst,ilast,0))
+      double precision u(CELL1d(ifirst,ilast,ngcu))
+c ouput arrays:
+      double precision
+     &  flux0(SIDE1d(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0
+c
+      do i0=ifirst0,ilast0+1
+         flux0(i0) = sidediff0(i0)
+     &         * (u(i0)-u(i0-1))/dx(0)
+      enddo
+c
+      return
+      end
+c
+c
+c
+      subroutine fluxbdryfix1d(
+     &   ifirst0,ilast0,
+     &   ibeg0,iend0,
+     &   iside,
+     &   btype,
+     &   bstate,
+     &   flux0)
+c***********************************************************************
+      implicit none
+      double precision two
+      parameter(two=2.0d0)
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0
+      integer ibeg0,iend0
+      integer iside
+      integer btype
+      double precision bstate
+c inout arrays:
+      double precision
+     &  flux0(SIDE1d(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0
+c
+      if (iside.eq.0) then
+c***********************************************************************
+c x lower boundary
+c***********************************************************************
+         i0 = ifirst0
+         if (btype.eq.0) then
+c
+c           dirichlet boundary
+c
+            flux0(i0) = two*flux0(i0)
+         else
+c
+c           neumann boundary
+c
+            flux0(i0) = bstate
+         endif
+c
+      else if (iside.eq.1) then
+c***********************************************************************
+c x upper boundary
+c***********************************************************************
+         i0 = ilast0 + 1
+         if (btype.eq.0) then
+c
+c           dirichlet boundary
+c
+            flux0(i0) = two*flux0(i0)
+         else
+c
+c           neumann boundary
+c
+            flux0(i0) = bstate
+         endif
+c
+      endif
+c
+      return
+      end
+c
+c
+c
+c
+      subroutine fluxcopy01d(
+     &   ifirst0,ilast0,
+     &   iside,
+     &   flux, outerflux)
+c***********************************************************************
+      implicit none
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,iside 
+      double precision
+     &  flux(SIDE1d(ifirst,ilast,0))
+c ouput arrays:
+      double precision
+     &  outerflux(OUTERSIDE1d(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0
+
+      if (iside.eq.0) then
+        i0 = ifirst0
+      else
+        i0 = ilast0+1
+      endif
+
+      outerflux(1) = flux(i0)
+c
+      return
+      end
+c
+c
+c
+      subroutine compresidual1d(
+     &  ifirst0,ilast0,
+     &  ngcu,
+     &  dx, dt,
+     &  u_cur,
+     &  u,
+     &  expu,
+     &  src,
+     &  flux0, 
+     &  resid)
+c***********************************************************************
+      implicit none
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ngcu
+      double precision dx(0:NDIM-1), dt
+      double precision
+     &  u_cur(CELL1d(ifirst,ilast,0)),
+     &  u(CELL1d(ifirst,ilast,ngcu)),
+     &  expu(CELL1d(ifirst,ilast,0)),
+     &  src(CELL1d(ifirst,ilast,0)),
+     &  flux0(SIDE1d(ifirst,ilast,0))
+c ouput arrays:
+      double precision
+     &  resid(CELL1d(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0
+      double precision cellvol
+
+      cellvol = dx(0)
+      do i0=ifirst0,ilast0
+         resid(i0) = (u(i0) - u_cur(i0)
+     &      - dt*(  (flux0(i0+1) - flux0(i0))/dx(0) 
+     &            + expu(i0) + src(i0)))*cellvol
+      enddo
+c
+      return
+      end
+c
+c
+c
+      subroutine compsrcderv1d(
+     &  ifirst0,ilast0,
+     &  ngcu,
+     &  xlo, dx, time,
+     &  lambda,
+     &  u,
+     &  dsrcdu)
+c***********************************************************************
+      implicit none
+      double precision half
+      parameter(half=0.5d0)
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ngcu
+      double precision xlo(0:NDIM-1), dx(0:NDIM-1), time, lambda
+      double precision u(CELL1d(ifirst,ilast,ngcu))
+c ouput arrays:
+      double precision dsrcdu(CELL1d(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0
+      double precision x(0:NDIM-1)
+
+      do i0=ifirst0,ilast0
+         x(0) = xlo(0)+dx(0)*(dble(i0-ifirst0)+half)
+source_term_derivative()dnl
+      enddo
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/bratufunc2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/bratufunc2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,473 @@
+define(NDIM,2)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+c
+c The following macro definitions are used in the routines below to
+c define certain expressions used in the solution of the problem:
+c
+c    du/dt = div( D(x,t)*div(u) ) + lambda * exp(u) + source(x,t,u)
+c 
+c IMPORTANT NOTE: source term definition and source term derivative 
+c                 definition must be consistent
+c
+
+c
+c DIFFUSION COEFFICIENT DEFINITION:
+c
+c source_term is written as diffcoef(i0,i1) = some function
+c of x = (x(0), x(1)), t = time
+c
+define(diffusion_coefficient,`
+            sidediff$1(i0,i1) = 1.0d0
+')dnl
+
+c
+c SOURCE TERM DEFINITION:
+c
+c source term is written as src(i0,i1) = some function
+c of x = (x(0), x(1)), t = time, and u = u(i0,i1)
+c
+define(source_term,`
+            xterm = x(0)*(1.d0 - x(0))
+            yterm = x(1)*(1.d0 - x(1))
+            src(i0,i1) = (xterm*yterm
+     &        + time*(2.0d0*(xterm + yterm))
+     &        - lambda*exp(time*xterm*yterm))
+')dnl
+
+c
+c SOURCE TERM DERIVATIVE DEFINITION:
+c
+c derivative of source term w.r.t. solution is written as 
+c dsrcdu(ic0,ic1) = some function of x = (xc(0), xc(1)), 
+c t = time, and u = u(ic0,ic1)
+c
+define(source_term_derivative,`
+            dsrcdu(i0,i1) = 0.0d0
+')dnl
+
+
+
+      subroutine compdiffcoef2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  xlo, dx, time,
+     &  sidediff0,sidediff1)
+c***********************************************************************
+      implicit none
+      double precision half
+      parameter(half=0.5d0)
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      double precision xlo(0:NDIM-1), dx(0:NDIM-1), time
+      double precision
+     &  sidediff0(SIDE2d0(ifirst,ilast,0)),
+     &  sidediff1(SIDE2d1(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0,i1
+      double precision x(0:NDIM-1)
+c
+      do i1=ifirst1,ilast1
+         x(1) = xlo(1)+dx(1)*(dble(i1-ifirst1)+half)
+         do i0=ifirst0,ilast0+1
+            x(0) = xlo(0)+dx(0)*dble(i0-ifirst0)
+diffusion_coefficient(0)dnl
+         enddo
+      enddo
+c
+      do i1=ifirst1,ilast1+1
+         x(1) = xlo(1)+dx(1)*dble(i1-ifirst1)
+         do i0=ifirst0,ilast0
+            x(0) = xlo(0)+dx(0)*(dble(i0-ifirst0)+half)
+diffusion_coefficient(1)dnl
+         enddo
+      enddo
+c
+      return
+      end
+c
+c
+c
+      subroutine compexpu2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  ngcu,
+     &  lambda,
+     &  u,
+     &  expu)
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ngcu
+      double precision lambda
+      double precision u(CELL2d(ifirst,ilast,ngcu))
+c ouput arrays:
+      double precision expu(CELL2d(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0,i1
+
+      do i1=ifirst1,ilast1
+         do i0=ifirst0,ilast0
+            expu(i0,i1) = lambda*exp(u(i0,i1))
+         enddo
+      enddo
+
+      return
+      end
+c
+c
+c
+      subroutine compsrc2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  ngcu,
+     &  xlo, dx, time,
+     &  lambda,
+     &  u,
+     &  src)
+c***********************************************************************
+      implicit none
+      double precision half
+      parameter(half=0.5d0)
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ngcu
+      double precision xlo(0:NDIM-1), dx(0:NDIM-1), time, lambda
+      double precision u(CELL2d(ifirst,ilast,ngcu))
+c ouput arrays:
+      double precision src(CELL2d(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0,i1
+      double precision x(0:NDIM-1)
+      double precision xterm,yterm
+
+      do i1=ifirst1,ilast1
+         x(1) = xlo(1)+dx(1)*(dble(i1-ifirst1)+half)
+         do i0=ifirst0,ilast0
+            x(0) = xlo(0)+dx(0)*(dble(i0-ifirst0)+half)
+source_term()dnl
+         enddo
+      enddo
+
+      return
+      end
+c
+c
+c
+      subroutine compsideflux2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  ngcu,
+     &  dx,
+     &  sidediff0,sidediff1,
+     &  u,
+     &  flux0,flux1)
+c***********************************************************************
+      implicit none
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ngcu
+      double precision dx(0:NDIM-1)
+      double precision 
+     &  sidediff0(SIDE2d0(ifirst,ilast,0)),
+     &  sidediff1(SIDE2d1(ifirst,ilast,0))
+      double precision u(CELL2d(ifirst,ilast,ngcu))
+c ouput arrays:
+      double precision
+     &  flux0(SIDE2d0(ifirst,ilast,0)),
+     &  flux1(SIDE2d1(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0,i1
+c
+      do i1=ifirst1,ilast1
+         do i0=ifirst0,ilast0+1
+            flux0(i0,i1) = sidediff0(i0,i1)
+     &            * (u(i0,i1)-u(i0-1,i1))/dx(0)
+         enddo
+      enddo
+c
+      do i1=ifirst1,ilast1+1
+         do i0=ifirst0,ilast0
+            flux1(i0,i1) = sidediff1(i0,i1)
+     &            * (u(i0,i1)-u(i0,i1-1))/dx(1)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c
+c
+      subroutine fluxbdryfix2d(
+     &   ifirst0,ilast0,ifirst1,ilast1,
+     &   ibeg0,iend0,ibeg1,iend1,
+     &   iside,
+     &   btype,
+     &   bstate,
+     &   flux0,flux1)
+c***********************************************************************
+      implicit none
+      double precision two
+      parameter(two=2.0d0)
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer ibeg0,iend0,ibeg1,iend1
+      integer iside
+      integer btype
+      double precision bstate
+c inout arrays:
+      double precision
+     &  flux0(SIDE2d0(ifirst,ilast,0)),
+     &  flux1(SIDE2d1(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0,i1
+c
+      if (iside.eq.0) then
+c***********************************************************************
+c x lower boundary
+c***********************************************************************
+         i0 = ifirst0
+         if (btype.eq.0) then
+c
+c           dirichlet boundary
+c
+            do i1=max(ifirst1,ibeg1),min(ilast1,iend1)
+               flux0(i0,i1) = two*flux0(i0,i1)
+            enddo
+         else
+c
+c           neumann boundary
+c
+            do i1=max(ifirst1,ibeg1),min(ilast1,iend1)
+               flux0(i0,i1) = bstate
+            enddo
+         endif
+c
+      else if (iside.eq.1) then
+c***********************************************************************
+c x upper boundary
+c***********************************************************************
+         i0 = ilast0 + 1
+         if (btype.eq.0) then
+c
+c           dirichlet boundary
+c
+            do i1=max(ifirst1,ibeg1),min(ilast1,iend1)
+               flux0(i0,i1) = two*flux0(i0,i1)
+            enddo
+         else
+c
+c           neumann boundary
+c
+            do i1=max(ifirst1,ibeg1),min(ilast1,iend1)
+               flux0(i0,i1) = bstate
+            enddo
+         endif
+c
+      else if (iside.eq.2) then
+c***********************************************************************
+c y lower boundary
+c***********************************************************************
+         i1 = ifirst1
+         if (btype.eq.0) then
+c
+c           dirichlet boundary
+c
+            do i0=max(ifirst0,ibeg0),min(ilast0,iend0)
+               flux1(i0,i1) = two*flux1(i0,i1)
+            enddo
+         else
+c
+c           neumann boundary
+c
+            do i0=max(ifirst0,ibeg0),min(ilast0,iend0)
+               flux1(i0,i1) = bstate
+            enddo
+         endif
+c
+      else if (iside.eq.3) then
+c***********************************************************************
+c y upper boundary
+c***********************************************************************
+         i1 = ilast1 + 1
+         if (btype.eq.0) then
+c
+c           dirichlet boundary
+c
+            do i0=max(ifirst0,ibeg0),min(ilast0,iend0)
+               flux1(i0,i1) = two*flux1(i0,i1)
+            enddo
+         else
+c
+c           neumann boundary
+c
+            do i0=max(ifirst0,ibeg0),min(ilast0,iend0)
+               flux1(i0,i1) = bstate
+            enddo
+         endif
+c
+      endif
+c
+      return
+      end
+c
+c
+c
+c
+      subroutine fluxcopy02d(
+     &   ifirst0,ilast0,ifirst1,ilast1,
+     &   iside,
+     &   flux, outerflux)
+c***********************************************************************
+      implicit none
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,iside 
+      double precision
+     &  flux(SIDE2d0(ifirst,ilast,0))
+c ouput arrays:
+      double precision
+     &  outerflux(OUTERSIDE2d0(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0,i1
+
+      if (iside.eq.0) then
+        i0 = ifirst0
+      else
+        i0 = ilast0+1
+      endif
+
+      do i1=ifirst1,ilast1
+         outerflux(i1) = flux(i0,i1)
+      enddo
+c
+      return
+      end
+c
+c
+c
+      subroutine fluxcopy12d(
+     &   ifirst0,ilast0,ifirst1,ilast1,
+     &   iside,
+     &   flux, outerflux)
+c***********************************************************************
+      implicit none
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,iside 
+      double precision
+     &  flux(SIDE2d1(ifirst,ilast,0))
+c ouput arrays:
+      double precision
+     &  outerflux(OUTERSIDE2d1(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0,i1
+
+      if (iside.eq.0) then
+        i1 = ifirst1
+      else
+        i1 = ilast1+1
+      endif
+
+      do i0=ifirst0,ilast0
+         outerflux(i0) = flux(i0,i1)
+      enddo
+c
+      return
+      end
+c
+c
+c
+      subroutine compresidual2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  ngcu,
+     &  dx, dt,
+     &  u_cur,
+     &  u,
+     &  expu,
+     &  src,
+     &  flux0, flux1,
+     &  resid)
+c***********************************************************************
+      implicit none
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ngcu
+      double precision dx(0:NDIM-1), dt
+      double precision
+     &  u_cur(CELL2d(ifirst,ilast,0)),
+     &  u(CELL2d(ifirst,ilast,ngcu)),
+     &  expu(CELL2d(ifirst,ilast,0)),
+     &  src(CELL2d(ifirst,ilast,0)),
+     &  flux0(SIDE2d0(ifirst,ilast,0)),
+     &  flux1(SIDE2d1(ifirst,ilast,0))
+c ouput arrays:
+      double precision
+     &  resid(CELL2d(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0,i1
+      double precision cellvol
+
+      cellvol = dx(0)*dx(1)
+      do i1=ifirst1,ilast1
+         do i0=ifirst0,ilast0
+            resid(i0,i1) = (u(i0,i1) - u_cur(i0,i1)
+     &         - dt*(  (flux0(i0+1,i1) - flux0(i0,i1))/dx(0)
+     &               + (flux1(i0,i1+1) - flux1(i0,i1))/dx(1) 
+     &               + expu(i0,i1) + src(i0,i1)))*cellvol
+         enddo
+      enddo
+c
+      return
+      end
+c
+c
+c
+      subroutine compsrcderv2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  ngcu,
+     &  xlo, dx, time,
+     &  lambda,
+     &  u,
+     &  dsrcdu)
+c***********************************************************************
+      implicit none
+      double precision half
+      parameter(half=0.5d0)
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ngcu
+      double precision xlo(0:NDIM-1), dx(0:NDIM-1), time, lambda
+      double precision u(CELL2d(ifirst,ilast,ngcu))
+c ouput arrays:
+      double precision dsrcdu(CELL2d(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0,i1
+      double precision x(0:NDIM-1)
+
+      do i1=ifirst1,ilast1
+         x(1) = xlo(1)+dx(1)*(dble(i1-ifirst1)+half)
+         do i0=ifirst0,ilast0
+            x(0) = xlo(0)+dx(0)*(dble(i0-ifirst0)+half)
+source_term_derivative()dnl
+         enddo
+      enddo
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/bratufunc3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/bratufunc3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,626 @@
+define(NDIM,3)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+c
+c The following macro definitions are used in the routines below to
+c define certain expressions used in the solution of the problem:
+c
+c    du/dt = div( D(x,t)*div(u) ) + lambda * exp(u) + source(x,t,u)
+c 
+c IMPORTANT NOTE: source term definition and source term derivative 
+c                 definition must be consistent
+c
+
+c
+c DIFFUSION COEFFICIENT DEFINITION:
+c
+c source_term is written as diffcoef(i0,i1,i2) = some function
+c of x = (x(0), x(1), x(2)), t = time
+c
+define(diffusion_coefficient,`
+            sidediff$1(i0,i1,i2) = 1.0d0
+')dnl
+
+c
+c SOURCE TERM DEFINITION:
+c
+c source term is written as src(i0,i1,i2) = some function
+c of x = (x(0), x(1), x(2)), t = time, and u = u(i0,i1,i2)
+c
+define(source_term,`
+            xterm = x(0)*(1.d0 - x(0))
+            yterm = x(1)*(1.d0 - x(1))
+            zterm = x(2)*(1.d0 - x(2))
+            src(i0,i1,i2) = (xterm*yterm*zterm
+     &        + time*(2.0d0*(xterm*zterm + xterm*yterm + yterm*zterm))
+     &        - lambda*exp(time*xterm*yterm*zterm))
+')dnl
+
+c
+c SOURCE TERM DERIVATIVE DEFINITION:
+c
+c derivative of source term w.r.t. solution is written as 
+c dsrcdu(ic0,ic1,ic2) = some function of x = (xc(0), xc(1), xc(2)), 
+c t = time, and u = u(ic0,ic1,ic2)
+c
+define(source_term_derivative,`
+            dsrcdu(i0,i1,i2) = 0.0d0
+')dnl
+
+
+
+      subroutine compdiffcoef3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  xlo, dx, time,
+     &  sidediff0,sidediff1,sidediff2)
+c***********************************************************************
+      implicit none
+      double precision half
+      parameter(half=0.5d0)
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      double precision xlo(0:NDIM-1), dx(0:NDIM-1), time
+      double precision
+     &  sidediff0(SIDE3d0(ifirst,ilast,0)),
+     &  sidediff1(SIDE3d1(ifirst,ilast,0)),
+     &  sidediff2(SIDE3d2(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0,i1,i2
+      double precision x(0:NDIM-1)
+c
+      do i2=ifirst2,ilast2
+         x(2) = xlo(2)+dx(2)*(dble(i2-ifirst2)+half) 
+         do i1=ifirst1,ilast1
+            x(1) = xlo(1)+dx(1)*(dble(i1-ifirst1)+half)
+            do i0=ifirst0,ilast0+1
+               x(0) = xlo(0)+dx(0)*dble(i0-ifirst0)
+diffusion_coefficient(0)dnl
+            enddo
+         enddo
+      enddo
+c
+      do i2=ifirst2,ilast2
+         x(2) = xlo(2)+dx(2)*(dble(i2-ifirst2)+half) 
+         do i1=ifirst1,ilast1+1
+            x(1) = xlo(1)+dx(1)*dble(i1-ifirst1)
+            do i0=ifirst0,ilast0
+               x(0) = xlo(0)+dx(0)*(dble(i0-ifirst0)+half)
+diffusion_coefficient(1)dnl
+            enddo
+         enddo
+      enddo
+c
+      do i2=ifirst2,ilast2+1
+         x(2) = xlo(2)+dx(2)*dble(i2-ifirst2)
+         do i1=ifirst1,ilast1
+            x(1) = xlo(1)+dx(1)*(dble(i1-ifirst1)+half)
+            do i0=ifirst0,ilast0
+               x(0) = xlo(0)+dx(0)*(dble(i0-ifirst0)+half)
+diffusion_coefficient(2)dnl
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c
+c
+      subroutine compexpu3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  ngcu,
+     &  lambda,
+     &  u,
+     &  expu)
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,ngcu
+      double precision lambda
+      double precision u(CELL3d(ifirst,ilast,ngcu))
+c ouput arrays:
+      double precision expu(CELL3d(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0,i1,i2
+
+      do i2=ifirst2,ilast2
+         do i1=ifirst1,ilast1
+            do i0=ifirst0,ilast0
+               expu(i0,i1,i2) = lambda*exp(u(i0,i1,i2))
+            enddo
+         enddo
+      enddo
+
+      return
+      end
+c
+c
+c
+      subroutine compsrc3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  ngcu,
+     &  xlo, dx, time,
+     &  lambda,
+     &  u,
+     &  src)
+c***********************************************************************
+      implicit none
+      double precision half
+      parameter(half=0.5d0)
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,ngcu
+      double precision xlo(0:NDIM-1), dx(0:NDIM-1), time, lambda
+      double precision u(CELL3d(ifirst,ilast,ngcu))
+c ouput arrays:
+      double precision src(CELL3d(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0,i1,i2
+      double precision x(0:NDIM-1)
+      double precision xterm,yterm,zterm
+
+      do i2=ifirst2,ilast2
+         x(2) = xlo(2)+dx(2)*(dble(i2-ifirst2)+half)
+         do i1=ifirst1,ilast1
+            x(1) = xlo(1)+dx(1)*(dble(i1-ifirst1)+half)
+            do i0=ifirst0,ilast0
+               x(0) = xlo(0)+dx(0)*(dble(i0-ifirst0)+half)
+source_term()dnl
+            enddo
+         enddo
+      enddo
+
+      return
+      end
+c
+c
+c
+      subroutine compsideflux3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  ngcu,
+     &  dx,
+     &  sidediff0,sidediff1,sidediff2,
+     &  u,
+     &  flux0,flux1,flux2)
+c***********************************************************************
+      implicit none
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,ngcu
+      double precision dx(0:NDIM-1)
+      double precision 
+     &  sidediff0(SIDE3d0(ifirst,ilast,0)),
+     &  sidediff1(SIDE3d1(ifirst,ilast,0)),
+     &  sidediff2(SIDE3d2(ifirst,ilast,0))
+      double precision u(CELL3d(ifirst,ilast,ngcu))
+c ouput arrays:
+      double precision
+     &  flux0(SIDE3d0(ifirst,ilast,0)),
+     &  flux1(SIDE3d1(ifirst,ilast,0)),
+     &  flux2(SIDE3d2(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0,i1,i2
+c
+      do i2=ifirst2,ilast2
+         do i1=ifirst1,ilast1
+            do i0=ifirst0,ilast0+1
+               flux0(i0,i1,i2) = sidediff0(i0,i1,i2)
+     &               * (u(i0,i1,i2)-u(i0-1,i1,i2))/dx(0)
+            enddo
+         enddo
+      enddo
+c
+      do i2=ifirst2,ilast2
+         do i1=ifirst1,ilast1+1
+            do i0=ifirst0,ilast0
+               flux1(i0,i1,i2) = sidediff1(i0,i1,i2)
+     &               * (u(i0,i1,i2)-u(i0,i1-1,i2))/dx(1)
+            enddo
+         enddo
+      enddo
+c
+      do i2=ifirst2,ilast2+1
+         do i1=ifirst1,ilast1
+            do i0=ifirst0,ilast0
+               flux2(i0,i1,i2) = sidediff2(i0,i1,i2)
+     &               * (u(i0,i1,i2)-u(i0,i1,i2-1))/dx(2)
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c
+c
+      subroutine fluxbdryfix3d(
+     &   ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &   ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,
+     &   iside,
+     &   btype,
+     &   bstate,
+     &   flux0,flux1,flux2)
+c***********************************************************************
+      implicit none
+      double precision two
+      parameter(two=2.0d0)
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      integer iside
+      integer btype
+      double precision bstate
+c inout arrays:
+      double precision
+     &  flux0(SIDE3d0(ifirst,ilast,0)),
+     &  flux1(SIDE3d1(ifirst,ilast,0)),
+     &  flux2(SIDE3d2(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0,i1,i2
+c
+      if (iside.eq.0) then
+c***********************************************************************
+c x lower boundary
+c***********************************************************************
+         i0 = ifirst0
+         if (btype.eq.0) then
+c
+c           dirichlet boundary
+c
+            do i2=max(ifirst2,ibeg2),min(ilast2,iend2)
+               do i1=max(ifirst1,ibeg1),min(ilast1,iend1)
+                  flux0(i0,i1,i2) = two*flux0(i0,i1,i2)
+               enddo
+            enddo
+         else
+c
+c           neumann boundary
+c
+            do i2=max(ifirst2,ibeg2),min(ilast2,iend2)
+               do i1=max(ifirst1,ibeg1),min(ilast1,iend1)
+                  flux0(i0,i1,i2) = bstate
+               enddo
+            enddo
+         endif
+c
+      else if (iside.eq.1) then
+c***********************************************************************
+c x upper boundary
+c***********************************************************************
+         i0 = ilast0 + 1
+         if (btype.eq.0) then
+c
+c           dirichlet boundary
+c
+            do i2=max(ifirst2,ibeg2),min(ilast2,iend2)
+               do i1=max(ifirst1,ibeg1),min(ilast1,iend1)
+                  flux0(i0,i1,i2) = two*flux0(i0,i1,i2)
+               enddo
+            enddo
+         else
+c
+c           neumann boundary
+c
+            do i2=max(ifirst2,ibeg2),min(ilast2,iend2)
+               do i1=max(ifirst1,ibeg1),min(ilast1,iend1)
+                  flux0(i0,i1,i2) = bstate
+               enddo
+            enddo
+         endif
+c
+      else if (iside.eq.2) then
+c***********************************************************************
+c y lower boundary
+c***********************************************************************
+         i1 = ifirst1
+         if (btype.eq.0) then
+c
+c           dirichlet boundary
+c
+            do i2=max(ifirst2,ibeg2),min(ilast2,iend2)
+               do i0=max(ifirst0,ibeg0),min(ilast0,iend0)
+                  flux1(i0,i1,i2) = two*flux1(i0,i1,i2)
+               enddo
+            enddo
+         else
+c
+c           neumann boundary
+c
+            do i2=max(ifirst2,ibeg2),min(ilast2,iend2)
+               do i0=max(ifirst0,ibeg0),min(ilast0,iend0)
+                  flux1(i0,i1,i2) = bstate
+               enddo
+            enddo
+         endif
+c
+      else if (iside.eq.3) then
+c***********************************************************************
+c y upper boundary
+c***********************************************************************
+         i1 = ilast1 + 1
+         if (btype.eq.0) then
+c
+c           dirichlet boundary
+c
+            do i2=max(ifirst2,ibeg2),min(ilast2,iend2)
+               do i0=max(ifirst0,ibeg0),min(ilast0,iend0)
+                  flux1(i0,i1,i2) = two*flux1(i0,i1,i2)
+               enddo
+            enddo
+         else
+c
+c           neumann boundary
+c
+            do i2=max(ifirst2,ibeg2),min(ilast2,iend2)
+               do i0=max(ifirst0,ibeg0),min(ilast0,iend0)
+                  flux1(i0,i1,i2) = bstate
+               enddo
+            enddo
+         endif
+c
+      else if (iside.eq.4) then
+c***********************************************************************
+c z lower boundary
+c***********************************************************************
+         i2 = ifirst2
+         if (btype.eq.0) then
+c
+c           dirichlet boundary
+c
+            do i1=max(ifirst1,ibeg1),min(ilast1,iend1)
+               do i0=max(ifirst0,ibeg0),min(ilast0,iend0)
+                  flux2(i0,i1,i2) = two*flux2(i0,i1,i2)
+               enddo
+            enddo
+         else
+c
+c           neumann boundary
+c
+            do i1=max(ifirst1,ibeg1),min(ilast1,iend1)
+               do i0=max(ifirst0,ibeg0),min(ilast0,iend0)
+                  flux2(i0,i1,i2) = bstate
+               enddo
+            enddo
+         endif
+c
+      else if (iside.eq.5) then
+c***********************************************************************
+c z upper boundary
+c***********************************************************************
+         i2 = ilast2 + 1
+         if (btype.eq.0) then
+c
+c           dirichlet boundary
+c
+            do i1=max(ifirst1,ibeg1),min(ilast1,iend1)
+               do i0=max(ifirst0,ibeg0),min(ilast0,iend0)
+                  flux2(i0,i1,i2) = two*flux2(i0,i1,i2)
+               enddo
+            enddo
+         else
+c
+c           neumann boundary
+c
+            do i1=max(ifirst1,ibeg1),min(ilast1,iend1)
+               do i0=max(ifirst0,ibeg0),min(ilast0,iend0)
+                  flux2(i0,i1,i2) = bstate
+               enddo
+            enddo
+         endif
+c
+      endif
+c
+      return
+      end
+c
+c
+c
+c
+      subroutine fluxcopy03d(
+     &   ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &   iside,
+     &   flux, outerflux)
+c***********************************************************************
+      implicit none
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,iside 
+      double precision
+     &  flux(SIDE3d0(ifirst,ilast,0))
+c ouput arrays:
+      double precision
+     &  outerflux(OUTERSIDE3d0(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0,i1,i2
+
+      if (iside.eq.0) then
+        i0 = ifirst0
+      else
+        i0 = ilast0+1
+      endif
+
+      do i2=ifirst2,ilast2
+         do i1=ifirst1,ilast1
+            outerflux(i1,i2) = flux(i0,i1,i2)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c
+c
+      subroutine fluxcopy13d(
+     &   ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &   iside,
+     &   flux, outerflux)
+c***********************************************************************
+      implicit none
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,iside 
+      double precision
+     &  flux(SIDE3d1(ifirst,ilast,0))
+c ouput arrays:
+      double precision
+     &  outerflux(OUTERSIDE3d1(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0,i1,i2
+
+      if (iside.eq.0) then
+        i1 = ifirst1
+      else
+        i1 = ilast1+1
+      endif
+
+      do i2=ifirst2,ilast2
+         do i0=ifirst0,ilast0
+            outerflux(i0,i2) = flux(i0,i1,i2)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c
+c
+      subroutine fluxcopy23d(
+     &   ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &   iside,
+     &   flux, outerflux)
+c***********************************************************************
+      implicit none
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,iside
+      double precision
+     &  flux(SIDE3d2(ifirst,ilast,0))
+c ouput arrays:
+      double precision
+     &  outerflux(OUTERSIDE3d2(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0,i1,i2
+
+      if (iside.eq.0) then
+        i2 = ifirst2
+      else
+        i2 = ilast2+1
+      endif
+
+      do i1=ifirst1,ilast1
+         do i0=ifirst0,ilast0
+            outerflux(i0,i1) = flux(i0,i1,i2)
+         enddo
+      enddo
+c
+      return
+      end
+c
+c
+c
+      subroutine compresidual3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  ngcu,
+     &  dx, dt,
+     &  u_cur,
+     &  u,
+     &  expu,
+     &  src,
+     &  flux0, flux1, flux2,
+     &  resid)
+c***********************************************************************
+      implicit none
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,ngcu
+      double precision dx(0:NDIM-1), dt
+      double precision
+     &  u_cur(CELL3d(ifirst,ilast,0)),
+     &  u(CELL3d(ifirst,ilast,ngcu)),
+     &  expu(CELL3d(ifirst,ilast,0)),
+     &  src(CELL3d(ifirst,ilast,0)),
+     &  flux0(SIDE3d0(ifirst,ilast,0)),
+     &  flux1(SIDE3d1(ifirst,ilast,0)),
+     &  flux2(SIDE3d2(ifirst,ilast,0))
+c ouput arrays:
+      double precision
+     &  resid(CELL3d(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0,i1,i2
+      double precision cellvol
+
+      cellvol = dx(0)*dx(1)*dx(2)
+      do i2=ifirst2,ilast2
+         do i1=ifirst1,ilast1
+            do i0=ifirst0,ilast0
+               resid(i0,i1,i2) = (u(i0,i1,i2) - u_cur(i0,i1,i2)
+     &            - dt*(  (flux0(i0+1,i1,i2) - flux0(i0,i1,i2))/dx(0)
+     &                  + (flux1(i0,i1+1,i2) - flux1(i0,i1,i2))/dx(1) 
+     &                  + (flux2(i0,i1,i2+1) - flux2(i0,i1,i2))/dx(2) 
+     &                  + expu(i0,i1,i2) + src(i0,i1,i2)))*cellvol
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c
+c
+      subroutine compsrcderv3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  ngcu,
+     &  xlo, dx, time,
+     &  lambda,
+     &  u,
+     &  dsrcdu)
+c***********************************************************************
+      implicit none
+      double precision half
+      parameter(half=0.5d0)
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,ngcu
+      double precision xlo(0:NDIM-1), dx(0:NDIM-1), time, lambda
+      double precision u(CELL3d(ifirst,ilast,ngcu))
+c ouput arrays:
+      double precision dsrcdu(CELL3d(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer i0,i1,i2
+      double precision x(0:NDIM-1)
+
+      do i2=ifirst2,ilast2
+         x(2) = xlo(2)+dx(2)*(dble(i2-ifirst2)+half)
+         do i1=ifirst1,ilast1
+            x(1) = xlo(1)+dx(1)*(dble(i1-ifirst1)+half)
+            do i0=ifirst0,ilast0
+               x(0) = xlo(0)+dx(0)*(dble(i0-ifirst0)+half)
+source_term_derivative()dnl
+            enddo
+         enddo
+      enddo
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/err1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/err1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,68 @@
+define(NDIM,1)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim1d.i)dnl
+
+      subroutine error1d(
+     & lo0, hi0, 
+     & u, w,
+     & lambda,
+     & xlo, xhi, dx,
+     & t,
+     & maxerror,
+     & l2error )
+
+c  Compute error in solution at time t.
+
+      implicit none
+
+      integer lo0
+
+      integer hi0
+
+      double precision lambda
+      double precision t
+      double precision l2error
+      double precision maxerror
+
+      double precision u(CELL1d(lo,hi,0))
+      double precision w(CELL1d(lo,hi,0))
+
+      double precision xlo(0:NDIM-1)
+      double precision xhi(0:NDIM-1)
+      double precision dx(0:NDIM-1)
+
+      integer i
+
+      double precision diff
+      double precision error_i
+      double precision localerror
+
+      double precision xi, xterm
+
+      double precision zero,       half,       one
+      parameter      ( zero=0.0d0, half=0.5d0, one=1.0d0 )
+
+      intrinsic DABS, MAX
+      double precision DABS, MAX
+
+      localerror = zero
+      l2error = zero
+      xi = xlo(0) + dx(0)*half
+      do i = lo0, hi0
+         xterm = xi*(one - xi)
+         error_i = DABS(u(i) - t*xterm)
+         l2error = l2error + w(i)*error_i**2
+         diff = w(i)*error_i
+         localerror = MAX(localerror, diff)
+         xi = xi + dx(0)
+      end do
+
+c  Since the weight was used to mask coarse cells that have been refined,
+c  the error in those that aren't covered are scaled by the cell volume.
+
+      localerror = localerror/dx(0)
+      l2error = sqrt(l2error)
+
+      maxerror = MAX(localerror, maxerror)
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/err2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/err2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,81 @@
+define(NDIM,2)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+      subroutine error2d(
+     & lo0, hi0, lo1, hi1,
+     & u, w,
+     & lambda,
+     & xlo, xhi, dx,
+     & t,
+     & maxerror,
+     & l2error )
+
+c  Compute error in solution at time t.
+
+      implicit none
+
+      integer lo0
+      integer lo1
+
+      integer hi0
+      integer hi1
+
+      double precision lambda
+      double precision t
+      double precision l2error
+      double precision maxerror
+
+      double precision u(CELL2d(lo,hi,0))
+      double precision w(CELL2d(lo,hi,0))
+
+      double precision xlo(0:NDIM-1)
+      double precision xhi(0:NDIM-1)
+      double precision dx(0:NDIM-1)
+
+      integer i
+      integer j
+
+      double precision diff
+      double precision error_ij
+      double precision localerror
+      double precision solmax
+
+      double precision xi, xterm
+      double precision yj, yterm
+
+      double precision zero,       half,       one
+      parameter      ( zero=0.0d0, half=0.5d0, one=1.0d0 )
+
+      intrinsic DABS, MAX
+      double precision DABS, MAX
+
+      localerror = zero
+      l2error = zero
+      solmax = zero
+      yj = xlo(1) + dx(1)*half
+      do j = lo1, hi1
+         yterm = yj*(one - yj)
+         xi = xlo(0) + dx(0)*half
+         do i = lo0, hi0
+            xterm = xi*(one - xi)
+            solmax = MAX(solmax,t*xterm*yterm)
+            error_ij = ABS(u(i,j) - t*xterm*yterm)
+            l2error = l2error + w(i,j)*error_ij**2
+            diff = w(i,j)*error_ij
+            localerror = MAX(localerror, diff)
+            xi = xi + dx(0)
+         end do
+         yj = yj + dx(1)
+      end do
+
+c  Since the weight was used to mask coarse cells that have been refined,
+c  the error in those that aren't covered are scaled by the cell volume.
+c  The max error is scaled by the max of the exact solution.
+
+      localerror = localerror/(dx(0)*dx(1)*solmax)
+      l2error = sqrt(l2error)
+
+      maxerror = MAX(localerror, maxerror)
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/err3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/err3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,86 @@
+define(NDIM,3)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine error3d(
+     & lo0, hi0, lo1, hi1, lo2, hi2,
+     & u, w,
+     & lambda,
+     & xlo, xhi, dx,
+     & t,
+     & maxerror,
+     & l2error )
+
+c  Compute error in solution at time t.
+
+      implicit none
+
+      integer lo0
+      integer lo1
+      integer lo2
+
+      integer hi0
+      integer hi1
+      integer hi2
+
+      double precision lambda
+      double precision t
+      double precision l2error
+      double precision maxerror
+
+      double precision u(CELL3d(lo,hi,0))
+      double precision w(CELL3d(lo,hi,0))
+
+      double precision xlo(0:NDIM-1)
+      double precision xhi(0:NDIM-1)
+      double precision dx(0:NDIM-1)
+
+      integer i
+      integer j
+      integer k
+
+      double precision diff
+      double precision error_ijk
+      double precision localerror
+
+      double precision xi, xterm
+      double precision yj, yterm
+      double precision zk, zterm
+
+      double precision zero,       half,       one
+      parameter      ( zero=0.0d0, half=0.5d0, one=1.0d0 )
+
+      intrinsic DABS, MAX
+      double precision DABS, MAX
+
+      localerror = zero
+      l2error = zero
+      zk = xlo(2) + dx(2)*half
+      do k = lo2, hi2
+         zterm = zk*(one - zk)
+         yj = xlo(1) + dx(1)*half
+         do j = lo1, hi1
+            yterm = yj*(one - yj)
+            xi = xlo(0) + dx(0)*half
+            do i = lo0, hi0
+               xterm = xi*(one - xi)
+               error_ijk = ABS(u(i,j,k) - t*xterm*yterm*zterm)
+               l2error = l2error + w(i,j,k)*error_ijk**2
+               diff = w(i,j,k)*error_ijk
+               localerror = MAX(localerror, diff)
+               xi = xi + dx(0)
+            end do
+            yj = yj + dx(1)
+         end do
+         zk = zk + dx(2)
+      end do
+
+c  Since the weight was used to mask coarse cells that have been refined,
+c  the error in those that aren't covered are scaled by the cell volume.
+
+      localerror = localerror/(dx(0)*dx(1)*dx(2))
+      l2error = sqrt(l2error)
+
+      maxerror = MAX(localerror, maxerror)
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/evalBratu1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/evalBratu1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,45 @@
+define(NDIM,1)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim1d.i)dnl
+
+      subroutine evalbratu1d(
+     & lo0, hi0, ghostcells,
+     & gew, 
+     & f, lexpu,
+     & v,
+     & u,
+     & dx, dt,
+     & r )
+
+c  Evaluate modified bratu problem at u by assembling fluxes
+c  (in gew), sources (in f and lexpu), and previous
+c  time step (in v).
+
+      implicit none
+
+      integer lo0
+
+      integer hi0
+
+      integer ghostcells
+
+      double precision dt
+
+      double precision dx(0:NDIM-1)
+
+      double precision gew(SIDE1d(lo,hi,0))
+      double precision f(CELL1d(lo,hi,0))
+      double precision lexpu(CELL1d(lo,hi,0))
+      double precision v(CELL1d(lo,hi,0))
+      double precision u(CELL1d(lo,hi,ghostcells))
+      double precision r(CELL1d(lo,hi,0))
+     
+      integer i
+
+      do i = lo0, hi0
+         r(i) = u(i) - v(i)
+     &            - dt*((gew(i+1) - gew(i))/dx(0) +
+     &                  lexpu(i) + f(i))
+      end do
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/evalBratu2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/evalBratu2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,52 @@
+define(NDIM,2)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+      subroutine evalbratu2d(
+     & lo0, hi0, lo1, hi1, ghostcells,
+     & gew, gns,
+     & f, lexpu,
+     & v,
+     & u,
+     & dx, dt,
+     & r )
+
+c  Evaluate modified bratu problem at u by assembling fluxes
+c  (in gew, gns), sources (in f and lexpu), and previous
+c  time step (in v).
+
+      implicit none
+
+      integer lo0
+      integer lo1
+
+      integer hi0
+      integer hi1
+
+      integer ghostcells
+
+      double precision dt
+
+      double precision dx(0:NDIM-1)
+
+      double precision gew(SIDE2d0(lo,hi,0))
+      double precision gns(SIDE2d1(lo,hi,0))
+      double precision f(CELL2d(lo,hi,0))
+      double precision lexpu(CELL2d(lo,hi,0))
+      double precision v(CELL2d(lo,hi,0))
+      double precision u(CELL2d(lo,hi,ghostcells))
+      double precision r(CELL2d(lo,hi,0))
+     
+      integer i
+      integer j
+
+      do j = lo1, hi1
+         do i = lo0, hi0
+            r(i,j) = u(i,j) - v(i,j)
+     &               - dt*((gew(i+1,j) - gew(i,j))/dx(0) +
+     &                     (gns(i,j+1) - gns(i,j))/dx(1) +
+     &                     lexpu(i,j) + f(i,j))
+         end do
+      end do
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/evalBratu3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/evalBratu3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,59 @@
+define(NDIM,3)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine evalbratu3d(
+     & lo0, hi0, lo1, hi1, lo2, hi2, ghostcells,
+     & gew, gns, gtb,
+     & f, lexpu,
+     & v,
+     & u,
+     & dx, dt,
+     & r )
+
+c  Evaluate modified bratu problem at u by assembling fluxes
+c  (in gew, gns, gtb), sources (in f and lexpu), and previous
+c  time step (in v).
+
+      implicit none
+
+      integer lo0
+      integer lo1
+      integer lo2
+
+      integer hi0
+      integer hi1
+      integer hi2
+
+      integer ghostcells
+
+      double precision dt
+
+      double precision dx(0:NDIM-1)
+
+      double precision gew(SIDE3d0(lo,hi,0))
+      double precision gns(SIDE3d1(lo,hi,0))
+      double precision gtb(SIDE3d2(lo,hi,0))
+      double precision f(CELL3d(lo,hi,0))
+      double precision lexpu(CELL3d(lo,hi,0))
+      double precision v(CELL3d(lo,hi,0))
+      double precision u(CELL3d(lo,hi,ghostcells))
+      double precision r(CELL3d(lo,hi,0))
+     
+      integer i
+      integer j
+      integer k
+
+      do k = lo2, hi2
+         do j = lo1, hi1
+            do i = lo0, hi0
+               r(i,j,k) = u(i,j,k) - v(i,j,k)
+     &                  - dt*((gew(i+1,j,k) - gew(i,j,k))/dx(0) +
+     &                        (gns(i,j+1,k) - gns(i,j,k))/dx(1) +
+     &                        (gtb(i,j,k+1) - gtb(i,j,k))/dx(2) +
+     &                        lexpu(i,j,k) + f(i,j,k))
+            end do
+         end do
+      end do
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/evalDiffusionCoef1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/evalDiffusionCoef1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,38 @@
+define(NDIM,1)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim1d.i)dnl
+
+      subroutine evalDiffusionCoef1d(
+     & lo0, hi0, 
+     & dx, xlo, xhi,
+     & dew )
+
+c  Evaluate face-centered diffusion coefficients for modified 
+c  Bratu problem.
+
+      implicit none
+
+      integer lo0
+
+      integer hi0
+
+      double precision dx(0:NDIM-1)
+      double precision xlo(0:NDIM-1)
+      double precision xhi(0:NDIM-1)
+
+      double precision dew(SIDE1d(lo,hi,0))
+
+      integer i
+
+      double precision xi
+
+      double precision half,       one
+      parameter      ( half=0.5d0, one=1.0d0 )
+
+      xi = xlo(0)
+      do i = lo0, hi0+1
+         dew(i) = one
+         xi = xi + dx(0)
+      end do
+      
+      return 
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/evalDiffusionCoef2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/evalDiffusionCoef2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,57 @@
+define(NDIM,2)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+      subroutine evalDiffusionCoef2d(
+     & lo0, hi0, lo1, hi1,
+     & dx, xlo, xhi,
+     & dew, dns )
+
+c  Evaluate face-centered diffusion coefficients for modified 
+c  Bratu problem.
+
+      implicit none
+
+      integer lo0
+      integer lo1
+
+      integer hi0
+      integer hi1
+
+      double precision dx(0:NDIM-1)
+      double precision xlo(0:NDIM-1)
+      double precision xhi(0:NDIM-1)
+
+      double precision dew(SIDE2d0(lo,hi,0))
+      double precision dns(SIDE2d1(lo,hi,0))
+
+      integer i
+      integer j
+
+      double precision xi
+      double precision yj
+
+      double precision half,       one
+      parameter      ( half=0.5d0, one=1.0d0 )
+
+      yj = xlo(1) + dx(1)*half
+      do j = lo1, hi1
+         xi = xlo(0)
+         do i = lo0, hi0+1
+            dew(i,j) = one
+            xi = xi + dx(0)
+         end do
+         yj = yj + dx(1)
+      end do
+      
+      yj = xlo(1)
+      do j = lo1, hi1+1
+         xi = xlo(0) + dx(0)*half
+         do i = lo0, hi0
+            dns(i,j) = one
+            xi = xi + dx(0)
+         end do
+         yj = yj + dx(1)
+      end do
+      
+      return 
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/evalDiffusionCoef3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/evalDiffusionCoef3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,84 @@
+define(NDIM,3)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine evalDiffusionCoef3d(
+     & lo0, hi0, lo1, hi1, lo2, hi2,
+     & dx, xlo, xhi,
+     & dew, dns, dtb )
+
+c  Evaluate face-centered diffusion coefficients for modified 
+c  Bratu problem.
+
+      implicit none
+
+      integer lo0
+      integer lo1
+      integer lo2
+
+      integer hi0
+      integer hi1
+      integer hi2
+
+      double precision dx(0:NDIM-1)
+      double precision xlo(0:NDIM-1)
+      double precision xhi(0:NDIM-1)
+
+      double precision dew(SIDE3d0(lo,hi,0))
+      double precision dns(SIDE3d1(lo,hi,0))
+      double precision dtb(SIDE3d2(lo,hi,0))
+
+      integer i
+      integer j
+      integer k
+
+      double precision xi
+      double precision yj
+      double precision zk
+
+      double precision half,       one
+      parameter      ( half=0.5d0, one=1.0d0 )
+
+      zk = xlo(2) + dx(2)*half
+      do k = lo2, hi2
+         yj = xlo(1) + dx(1)*half
+         do j = lo1, hi1
+            xi = xlo(0)
+            do i = lo0, hi0+1
+               dew(i,j,k) = one
+               xi = xi + dx(0)
+            end do
+            yj = yj + dx(1)
+         end do
+         zk = zk + dx(2)
+      end do
+
+      zk = xlo(2) + dx(2)*half
+      do k = lo2, hi2
+         yj = xlo(1)
+         do j = lo1, hi1+1
+            xi = xlo(0) + dx(0)*half
+            do i = lo0, hi0
+               dns(i,j,k) = one
+               xi = xi + dx(0)
+            end do
+            yj = yj + dx(1)
+         end do
+         zk = zk + dx(2)
+      end do
+
+      zk = xlo(2)
+      do k = lo2, hi2+1
+         yj = xlo(1) + dx(1)*half
+         do j = lo1, hi1
+            xi = xlo(0) + dx(0)*half
+            do i = lo0, hi0
+               dtb(i,j,k) = one
+               xi = xi + dx(0)
+            end do
+            yj = yj + dx(1)
+         end do
+         zk = zk + dx(2)
+      end do
+      
+      return 
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/evalExponential1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/evalExponential1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,30 @@
+define(NDIM,1)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim1d.i)dnl
+
+      subroutine evalExponential1d(
+     & lo0, hi0, 
+     & u,
+     & lambda,
+     & lexpu )
+
+c  Evaluate exponential term in modified Bratu problem.
+
+      implicit none
+
+      integer lo0
+
+      integer hi0
+
+      double precision lambda
+
+      double precision u(CELL1d(lo,hi,0))
+      double precision lexpu(CELL1d(lo,hi,0))
+
+      integer i
+
+      do i = lo0, hi0
+         lexpu(i) = lambda*exp(u(i))
+      end do
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/evalExponential2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/evalExponential2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,35 @@
+define(NDIM,2)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+      subroutine evalExponential2d(
+     & lo0, hi0, lo1, hi1, 
+     & u,
+     & lambda,
+     & lexpu )
+
+c  Evaluate exponential term in modified Bratu problem.
+
+      implicit none
+
+      integer lo0
+      integer lo1
+
+      integer hi0
+      integer hi1
+
+      double precision lambda
+
+      double precision u(CELL2d(lo,hi,0))
+      double precision lexpu(CELL2d(lo,hi,0))
+
+      integer i
+      integer j
+
+      do j = lo1, hi1
+         do i = lo0, hi0
+            lexpu(i,j) = lambda*exp(u(i,j))
+         end do
+      end do
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/evalExponential3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/evalExponential3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,40 @@
+define(NDIM,3)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine evalExponential3d(
+     & lo0, hi0, lo1, hi1, lo2, hi2,
+     & u,
+     & lambda,
+     & lexpu )
+
+c  Evaluate exponential term in modified Bratu problem.
+
+      implicit none
+
+      integer lo0
+      integer lo1
+      integer lo2
+
+      integer hi0
+      integer hi1
+      integer hi2
+
+      double precision lambda
+
+      double precision u(CELL3d(lo,hi,0))
+      double precision lexpu(CELL3d(lo,hi,0))
+
+      integer i
+      integer j
+      integer k
+
+      do k = lo2, hi2
+         do j = lo1, hi1
+            do i = lo0, hi0
+               lexpu(i,j,k) = lambda*exp(u(i,j,k))
+            end do
+         end do
+      end do
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/evalF1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/evalF1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,34 @@
+define(NDIM,1)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim1d.i)dnl
+
+      subroutine evalF1d(
+     & lo0, hi0,
+     & dx,
+     & unew, ucur, 
+     & f )
+
+c Evaluate rhs of modified bratu problem at u by subtracting off the
+c terms that are due to BE time discretization.
+
+      implicit none
+
+      integer lo0
+      integer hi0
+
+      double precision dx(0:NDIM-1)
+
+      double precision f(CELL1d(lo,hi,0))
+      double precision unew(CELL1d(lo,hi,0))
+      double precision ucur(CELL1d(lo,hi,0))
+     
+      integer i
+
+      double precision vol
+
+      vol = dx(0)
+      do i = lo0, hi0
+         f(i) = f(i) - vol*(unew(i) - ucur(i))
+      end do
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/evalF2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/evalF2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,41 @@
+define(NDIM,2)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+      subroutine evalF2d(
+     & lo0, hi0, lo1, hi1,
+     & dx,
+     & unew, ucur, 
+     & f )
+
+c Evaluate rhs of modified bratu problem at u by subtracting off the
+c terms that are due to BE time discretization.
+
+      implicit none
+
+      integer lo0
+      integer lo1
+
+      integer hi0
+      integer hi1
+
+      double precision dx(0:NDIM-1)
+
+      double precision f(CELL2d(lo,hi,0))
+      double precision unew(CELL2d(lo,hi,0))
+      double precision ucur(CELL2d(lo,hi,0))
+     
+      integer i
+      integer j
+
+      double precision vol
+
+      vol = dx(0)*dx(1)
+
+      do j = lo1, hi1
+         do i = lo0, hi0
+            f(i,j) = f(i,j) - vol*(unew(i,j) - ucur(i,j))
+         end do
+      end do
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/evalF3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/evalF3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,46 @@
+define(NDIM,3)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine evalF3d(
+     & lo0, hi0, lo1, hi1, lo2, hi2,
+     & dx,
+     & unew, ucur, 
+     & f )
+
+c Evaluate rhs of modified bratu problem at u by subtracting off the
+c terms that are due to BE time discretization.
+
+      implicit none
+
+      integer lo0
+      integer lo1
+      integer lo2
+
+      integer hi0
+      integer hi1
+      integer hi2
+
+      double precision dx(0:NDIM-1)
+
+      double precision f(CELL3d(lo,hi,0))
+      double precision unew(CELL3d(lo,hi,0))
+      double precision ucur(CELL3d(lo,hi,0))
+     
+      integer i
+      integer j
+      integer k
+
+      double precision vol
+
+      vol = dx(0)*dx(1)*dx(2)
+
+      do k = lo2, hi2
+         do j = lo1, hi1
+            do i = lo0, hi0
+               f(i,j,k) = f(i,j,k) - vol*(unew(i,j,k) - ucur(i,j,k))
+            end do
+         end do
+      end do
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/evalFaceFluxes1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/evalFaceFluxes1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,34 @@
+define(NDIM,1)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim1d.i)dnl
+
+      subroutine evalFaceFluxes1d(
+     & lo0, hi0, ghostcells,
+     & dew,
+     & u,
+     & dx,
+     & gew )
+
+c  Evaluate face-centered fluxes in div-grad operator.
+
+      implicit none
+
+      integer lo0
+
+      integer hi0
+
+      integer ghostcells
+
+      double precision dx(0:NDIM-1)
+
+      double precision dew(SIDE1d(lo,hi,0))
+      double precision u(CELL1d(lo,hi,ghostcells))
+      double precision gew(SIDE1d(lo,hi,0))
+
+      integer i
+
+      do i = lo0, hi0+1
+         gew(i) = dew(i)*(u(i) - u(i-1))/dx(0)
+      end do      
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/evalFaceFluxes2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/evalFaceFluxes2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,47 @@
+define(NDIM,2)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+      subroutine evalFaceFluxes2d(
+     & lo0, hi0, lo1, hi1, ghostcells,
+     & dew, dns,
+     & u,
+     & dx,
+     & gew, gns )
+
+c  Evaluate face-centered fluxes in div-grad operator.
+
+      implicit none
+
+      integer lo0
+      integer lo1
+
+      integer hi0
+      integer hi1
+
+      integer ghostcells
+
+      double precision dx(0:NDIM-1)
+
+      double precision dew(SIDE2d0(lo,hi,0))
+      double precision dns(SIDE2d1(lo,hi,0))
+      double precision u(CELL2d(lo,hi,ghostcells))
+      double precision gew(SIDE2d0(lo,hi,0))
+      double precision gns(SIDE2d1(lo,hi,0))
+
+      integer i
+      integer j
+
+      do j = lo1, hi1
+         do i = lo0, hi0+1
+            gew(i,j) = dew(i,j)*(u(i,j) - u(i-1,j))/dx(0)
+         end do
+      end do
+      
+      do j = lo1, hi1+1
+         do i = lo0, hi0
+            gns(i,j) = dns(i,j)*(u(i,j) - u(i,j-1))/dx(1)
+         end do
+      end do
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/evalFaceFluxes3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/evalFaceFluxes3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,64 @@
+define(NDIM,3)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine evalFaceFluxes3d(
+     & lo0, hi0, lo1, hi1, lo2, hi2, ghostcells,
+     & dew, dns, dtb,
+     & u,
+     & dx,
+     & gew, gns, gtb )
+
+c  Evaluate face-centered fluxes in div-grad operator.
+
+      implicit none
+
+      integer lo0
+      integer lo1
+      integer lo2
+
+      integer hi0
+      integer hi1
+      integer hi2
+
+      integer ghostcells
+
+      double precision dx(0:NDIM-1)
+
+      double precision dew(SIDE3d0(lo,hi,0))
+      double precision dns(SIDE3d1(lo,hi,0))
+      double precision dtb(SIDE3d2(lo,hi,0))
+      double precision u(CELL3d(lo,hi,ghostcells))
+      double precision gew(SIDE3d0(lo,hi,0))
+      double precision gns(SIDE3d1(lo,hi,0))
+      double precision gtb(SIDE3d2(lo,hi,0))
+
+      integer i
+      integer j
+      integer k
+
+      do k = lo2, hi2
+         do j = lo1, hi1
+            do i = lo0, hi0+1
+               gew(i,j,k) = dew(i,j,k)*(u(i,j,k) - u(i-1,j,k))/dx(0)
+            end do
+         end do
+      end do
+
+      do k = lo2, hi2
+         do j = lo1, hi1+1
+            do i = lo0, hi0
+               gns(i,j,k) = dns(i,j,k)*(u(i,j,k) - u(i,j-1,k))/dx(1)
+            end do
+         end do
+      end do
+
+      do k = lo2, hi2+1
+         do j = lo1, hi1
+            do i = lo0, hi0
+               gtb(i,j,k) = dtb(i,j,k)*(u(i,j,k) - u(i,j,k-1))/dx(2)
+            end do
+         end do
+      end do
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/evalJv1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/evalJv1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,48 @@
+define(NDIM,1)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim1d.i)dnl
+
+      subroutine bratujv1d(
+     & lo0, hi0, ghostcells,
+     & flux0,
+     & lexpu,
+     & v,
+     & dx,
+     & dt, 
+     & z )
+
+c  Analytic evaluation of Jacobian-vector products for the modified
+c  Bratu problem.
+
+      implicit none
+
+      integer lo0
+
+      integer hi0
+
+      integer ghostcells
+
+      double precision dt
+
+      double precision dx(0:NDIM-1)
+
+      double precision flux0(SIDE1d(lo,hi,0))
+      double precision lexpu(CELL1d(lo,hi,0))
+      double precision v(CELL1d(lo,hi,ghostcells))
+      double precision z(CELL1d(lo,hi,0))
+
+      integer i
+
+      double precision vol
+
+      double precision one
+      parameter      ( one=1.0d0 )
+
+      vol  = dx(0)
+
+      do i = lo0, hi0
+         z(i) = ((one - dt*lexpu(i))*v(i)
+     &       - dt*( (flux0(i+1) - flux0(i))/dx(0) ))*vol
+      end do
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/evalJv2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/evalJv2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,51 @@
+define(NDIM,2)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+      subroutine bratujv2d(
+     & lo0, hi0, lo1, hi1, ghostcells,
+     & flux0, flux1,
+     & lexpu,
+     & v,
+     & dx,
+     & dt, 
+     & z )
+
+c  Analytic evaluation of Jacobian-vector products for the modified
+c  Bratu problem.
+
+      implicit none
+
+      integer lo0
+      integer lo1
+
+      integer hi0
+      integer hi1
+
+      integer ghostcells
+
+      double precision dt
+
+      double precision dx(0:NDIM-1)
+
+      double precision flux0(SIDE2d0(lo,hi,0))
+      double precision flux1(SIDE2d1(lo,hi,0))
+      double precision lexpu(CELL2d(lo,hi,0))
+      double precision v(CELL2d(lo,hi,ghostcells))
+      double precision z(CELL2d(lo,hi,0))
+
+      integer i
+      integer j
+
+      double precision one
+      parameter      ( one=1.0d0 )
+
+      do j = lo1, hi1
+         do i = lo0, hi0
+            z(i,j) = (one - dt*lexpu(i,j))*v(i,j)
+     &          - dt*( (flux0(i+1,j) - flux0(i,j))/dx(0) +
+     &                 (flux1(i,j+1) - flux1(i,j))/dx(1) )
+         end do
+      end do
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/evalJv3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/evalJv3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,62 @@
+define(NDIM,3)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine bratujv3d(
+     & lo0, hi0, lo1, hi1, lo2, hi2, ghostcells,
+     & flux0, flux1, flux2,
+     & lexpu,
+     & v,
+     & dx,
+     & dt, 
+     & z )
+
+c  Analytic evaluation of Jacobian-vector products for the modified
+c  Bratu problem.
+
+      implicit none
+
+      integer lo0
+      integer lo1
+      integer lo2
+
+      integer hi0
+      integer hi1
+      integer hi2
+
+      integer ghostcells
+
+      double precision dt
+
+      double precision dx(0:NDIM-1)
+
+      double precision flux0(SIDE3d0(lo,hi,0))
+      double precision flux1(SIDE3d1(lo,hi,0))
+      double precision flux2(SIDE3d2(lo,hi,0))
+      double precision lexpu(CELL3d(lo,hi,0))
+      double precision v(CELL3d(lo,hi,ghostcells))
+      double precision z(CELL3d(lo,hi,0))
+
+      integer i
+      integer j
+      integer k
+
+      double precision vol
+
+      double precision one
+      parameter      ( one=1.0d0 )
+
+      vol  = dx(0)*dx(1)*dx(2)
+
+      do k = lo2, hi2
+         do j = lo1, hi1
+            do i = lo0, hi0
+               z(i,j,k) = ((one - dt*lexpu(i,j,k))*v(i,j,k)
+     &             - dt*( (flux0(i+1,j,k) - flux0(i,j,k))/dx(0) +
+     &                    (flux1(i,j+1,k) - flux1(i,j,k))/dx(1) +
+     &                    (flux2(i,j,k+1) - flux2(i,j,k))/dx(2) ))
+            end do
+         end do
+      end do
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/evalSource1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/evalSource1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,45 @@
+define(NDIM,1)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim1d.i)dnl
+
+      subroutine evalSource1d(
+     & lo0, hi0, 
+     & lambda,
+     & xlo, xhi, dx,
+     & t,
+     & f )
+
+c  Evaluate source term in modified bratu problem.
+
+      implicit none
+
+      integer lo0
+
+      integer hi0
+
+      double precision lambda
+      double precision t
+
+      double precision xlo(0:NDIM-1)
+      double precision xhi(0:NDIM-1)
+      double precision dx(0:NDIM-1)
+
+      double precision f(CELL1d(lo,hi,0))
+
+      integer i
+
+      double precision vol
+      double precision xi, xterm
+
+      double precision half,       one,       two
+      parameter      ( half=0.5d0, one=1.0d0, two=2.0d0 )
+
+      vol = dx(0)
+      xi = xlo(0) + dx(0)*half
+      do i = lo0, hi0
+         xterm = xi*(one - xi)
+         f(i) = xterm + t*two - lambda*exp(t*xterm)
+         xi = xi + dx(0)
+      end do
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/evalSource2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/evalSource2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,56 @@
+define(NDIM,2)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+      subroutine evalSource2d(
+     & lo0, hi0, lo1, hi1,
+     & lambda,
+     & xlo, xhi, dx,
+     & t,
+     & f )
+
+c  Evaluate source term in modified bratu problem.
+
+      implicit none
+
+      integer lo0
+      integer lo1
+
+      integer hi0
+      integer hi1
+
+      double precision lambda
+      double precision t
+
+      double precision xlo(0:NDIM-1)
+      double precision xhi(0:NDIM-1)
+      double precision dx(0:NDIM-1)
+
+      double precision f(CELL2d(lo,hi,0))
+
+      integer i
+      integer j
+
+      double precision vol
+      double precision xi, xterm
+      double precision yj, yterm
+
+      double precision half,       one,       two
+      parameter      ( half=0.5d0, one=1.0d0, two=2.0d0 )
+
+      vol = dx(0)*dx(1)
+      yj = xlo(1) + dx(1)*half
+      do j = lo1, hi1
+         yterm = yj*(one - yj)
+         xi = xlo(0) + dx(0)*half
+         do i = lo0, hi0
+            xterm = xi*(one - xi)
+            f(i,j) = xterm*yterm
+     &               + t*(two*(xterm + yterm))
+     &               - lambda*exp(t*xterm*yterm)
+            xi = xi + dx(0)
+         end do
+         yj = yj + dx(1)
+      end do
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/evalSource3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/evalSource3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,65 @@
+define(NDIM,3)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine evalSource3d(
+     & lo0, hi0, lo1, hi1, lo2, hi2,
+     & lambda,
+     & xlo, xhi, dx,
+     & t,
+     & f )
+
+c  Evaluate source term in modified bratu problem.
+
+      implicit none
+
+      integer lo0
+      integer lo1
+      integer lo2
+
+      integer hi0
+      integer hi1
+      integer hi2
+
+      double precision lambda
+      double precision t
+
+      double precision xlo(0:NDIM-1)
+      double precision xhi(0:NDIM-1)
+      double precision dx(0:NDIM-1)
+
+      double precision f(CELL3d(lo,hi,0))
+
+      integer i
+      integer j
+      integer k
+
+      double precision vol
+      double precision xi, xterm
+      double precision yj, yterm
+      double precision zk, zterm
+
+      double precision half,       one,       two
+      parameter      ( half=0.5d0, one=1.0d0, two=2.0d0 )
+
+      vol = dx(0)*dx(1)*dx(2)
+      zk = xlo(2) + dx(2)*half
+      do k = lo2, hi2
+         zterm = zk*(one - zk)
+         yj = xlo(1) + dx(1)*half
+         do j = lo1, hi1
+            yterm = yj*(one - yj)
+            xi = xlo(0) + dx(0)*half
+            do i = lo0, hi0
+               xterm = xi*(one - xi)
+               f(i,j,k) = xterm*yterm*zterm
+     &                  + t*(two*(xterm*zterm+xterm*yterm+yterm*zterm))
+     &                  - lambda*exp(t*xterm*yterm*zterm)
+               xi = xi + dx(0)
+            end do
+            yj = yj + dx(1)
+         end do
+         zk = zk + dx(2)
+      end do
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/setbc1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/setbc1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,46 @@
+define(NDIM,1)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim1d.i)dnl
+
+      subroutine setbc1d(
+     & lo0, hi0, ghostcells,
+     & u,
+     & bdrySegLo, bdrySegHi,
+     & bdrySide )
+
+c  Set boundary conditions in modified Bratu problem.
+
+      implicit none
+
+      integer lo0
+
+      integer hi0
+
+      integer ghostcells
+
+      integer bdrySide
+
+      integer bdrySegHi(0:NDIM-1)
+      integer bdrySegLo(0:NDIM-1)
+
+      double precision u(CELL1d(lo,hi,ghostcells))
+
+      integer ihi
+      integer ilo
+
+      double precision zero
+      parameter      ( zero=0.0d0 )
+
+      if (bdrySide .eq. 0) then
+
+         ilo = bdrySegLo(0)+1
+         u(ilo-1) = zero
+
+      else if (bdrySide .eq. 1) then
+
+         ihi = bdrySegHi(0)-1
+         u(ihi+1) = zero
+
+      end if
+
+      return 
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/setbc2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/setbc2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,70 @@
+define(NDIM,2)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+      subroutine setbc2d(
+     & lo0, hi0, lo1, hi1, ghostcells,
+     & u,
+     & bdrySegLo, bdrySegHi,
+     & bdrySide )
+
+c  Set boundary conditions in modified Bratu problem.
+
+      implicit none
+
+      integer lo0
+      integer lo1
+
+      integer hi0
+      integer hi1
+
+      integer ghostcells
+
+      integer bdrySide
+
+      integer bdrySegHi(0:NDIM-1)
+      integer bdrySegLo(0:NDIM-1)
+
+      double precision u(CELL2d(lo,hi,ghostcells))
+
+      integer i
+      integer ihi
+      integer ilo
+      integer j
+      integer jhi
+      integer jlo
+
+      double precision zero
+      parameter      ( zero=0.0d0 )
+
+      if (bdrySide .eq. 0) then
+
+         ilo = bdrySegLo(0)+1
+         do j = bdrySegLo(1), bdrySegHi(1)
+            u(ilo-1,j) = zero
+         end do
+
+      else if (bdrySide .eq. 1) then
+
+         ihi = bdrySegHi(0)-1
+         do j = bdrySegLo(1), bdrySegHi(1)
+            u(ihi+1,j) = zero
+         end do
+
+      else if (bdrySide .eq. 2) then
+
+         jlo = bdrySegLo(1)+1
+         do i = bdrySegLo(0), bdrySegHi(0)
+             u(i,jlo-1) = zero
+         end do
+
+      else if (bdrySide .eq. 3) then
+
+         jhi = bdrySegHi(1)-1
+         do i = bdrySegLo(0), bdrySegHi(0)
+            u(i,jhi+1) = zero
+         end do
+
+      end if
+
+      return 
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/fortran/setbc3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/fortran/setbc3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,102 @@
+define(NDIM,3)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine setbc3d(
+     & lo0, hi0, lo1, hi1, lo2, hi2, ghostcells,
+     & u,
+     & bdrySegLo, bdrySegHi,
+     & bdrySide )
+
+c  Set boundary conditions in modified Bratu problem.
+
+      implicit none
+
+
+      integer lo0
+      integer lo1
+      integer lo2
+
+      integer hi0
+      integer hi1
+      integer hi2
+
+      integer ghostcells
+
+      integer bdrySide
+
+      integer bdrySegHi(0:NDIM-1)
+      integer bdrySegLo(0:NDIM-1)
+
+      double precision u(CELL3d(lo,hi,ghostcells))
+
+      integer i
+      integer ihi
+      integer ilo
+      integer j
+      integer jhi
+      integer jlo
+      integer k
+      integer khi
+      integer klo
+
+      double precision zero
+      parameter      ( zero=0.0d0 )
+
+      if (bdrySide .eq. 0) then
+
+         ilo = bdrySegLo(0)+1
+         do k = bdrySegLo(2), bdrySegHi(2)
+            do j = bdrySegLo(1), bdrySegHi(1)
+               u(ilo-1,j,k) = zero
+            end do
+         end do
+
+      else if (bdrySide .eq. 1) then
+
+         ihi = bdrySegHi(0)-1
+         do k = bdrySegLo(2), bdrySegHi(2)
+            do j = bdrySegLo(1), bdrySegHi(1)
+               u(ihi+1,j,k) = zero
+            end do
+         end do
+
+      else if (bdrySide .eq. 2) then
+
+         jlo = bdrySegLo(1)+1
+         do k = bdrySegLo(2), bdrySegHi(2)
+            do i = bdrySegLo(0), bdrySegHi(0)
+               u(i,jlo-1,k) = zero
+           end do
+         end do
+
+      else if (bdrySide .eq. 3) then
+
+         jhi = bdrySegHi(1)-1
+         do k = bdrySegLo(2), bdrySegHi(2)
+            do i = bdrySegLo(0), bdrySegHi(0)
+               u(i,jhi+1,k) = zero
+           end do
+         end do
+
+      else if (bdrySide .eq. 4) then
+
+         klo = bdrySegLo(2)+1
+         do j = bdrySegLo(1), bdrySegHi(1)
+            do i = bdrySegLo(0), bdrySegHi(0)
+               u(i,j,klo-1) = zero
+            end do
+         end do
+
+      else if (bdrySide .eq. 5) then
+
+         khi = bdrySegHi(2)-1
+         do j = bdrySegLo(1), bdrySegHi(1)
+            do i = bdrySegLo(0), bdrySegHi(0)
+               u(i,j,khi+1) = zero
+            end do
+         end do
+
+      end if
+
+      return 
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/main.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/main.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,593 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program for modified-Bratu problem 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <string>
+#include <sys/stat.h>
+#include <string>
+using namespace std;
+
+/*
+ * Headers for basic SAMRAI objects used in this sample code.
+ */
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/xfer/Geometry.h"
+#include "SAMRAI/hier/GridGeometry.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+/*
+ * Headers for major algorithm/data structure objects from SAMRAI
+ */
+#include "SAMRAI/mesh/BergerRigoutsos.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/mesh/GriddingAlgorithm.h"
+#include "SAMRAI/mesh/TreeLoadBalancer.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/mesh/StandardTagAndInitialize.h"
+#include "SAMRAI/appu/VisItDataWriter.h"
+
+/*
+ * Headers for major application-specific and solver testing objects
+ */
+#include "SAMRAI/algs/ImplicitIntegrator.h"
+#ifdef HAVE_PETSC
+#include "SAMRAI/solv/SNES_SAMRAIContext.h"
+#endif
+#ifdef HAVE_SUNDIALS
+#include "SAMRAI/solv/KINSOL_SAMRAIContext.h"
+#endif
+#include "ModifiedBratuProblem.h"
+#include "SAMRAI/solv/NonlinearSolverStrategy.h"
+
+using namespace SAMRAI;
+
+/*!
+ * @brief Main program for nonlinear example.
+ *
+ * This is the main program for a sample application that employs
+ * implicit time integration on an AMR patch hierarchy and requires
+ * a nonlinear solver to advance the solution at each time step.
+ * The problem to be solved is:
+ *
+ *        du/dt = div(D(x)*grad(u)) + lambda*exp(u) + f(x,u)
+ *
+ * The application program is constructed by composing a variety of
+ * algorithm objects found in SAMRAI plus numerical operations that
+ * are specific to this application.  The following discussion
+ * summarizes these objects.
+ *
+ *    hier::PatchHierarchy - A container for the AMR patch
+ *        hierarchy and the data on the grid.
+ *
+ *    geom::CartesianGridGeometry - Defines and maintains the
+ *       Cartesian coordinate system on the grid.  The
+ *       hier::PatchHierarchy maintains a reference to this
+ *       object.
+ *
+ * The implicit integrator algorithm uses these two components to
+ * integrate data one timestep.  Time-stepping is done in the main
+ * routine. This integrator uses the same timestep across all patches,
+ * regardless of the refinement.
+ *
+ *    algs::ImplicitIntegrator - advances solution on patches.
+ *             Controls integration of quantities over entire patch
+ *             hierarchy. Takes the user-defined class that defines
+ *             patch operations (ModifiedBratuProblem in this case)
+ *           as an argument.
+ *
+ * The user-supplied object defines characteristics and operations to
+ * be carried out on each patch.  We pass this object to the integrator
+ * which will orchestrate the integration on all patches.
+ *
+ *    ModifiedBratuProblem - Defines variables and numerical routines
+ *            on the hierarchy.  This includes routines needed by the
+ *          implicit integrator as well as nonlinear solvers used
+ *          by the integrator.
+ *
+ *    mesh::GriddingAlgorithm - Drives the AMR patch hierarchy
+ *       generation and regridding procedures.  This object maintains
+ *       references to three other algorithmic objects with
+ *       which it is configured when they are passed into its
+ *       constructor.   They are:
+ *
+ *       mesh::BergerRigoutsos - Clusters cells tagged for
+ *          refinement on a patch level into a collection of
+ *          logically-rectangular box domains.
+ *
+ *       mesh::LoadBalancer - Processes the boxes generated by
+ *          the mesh::BergerRigoutsos algorithm into a
+ *          configuration from
+ *          which patches are contructed.  The routines in this
+ *          class assume a spatially-uniform workload distribution;
+ *          thus, they attempt to produce a collection of boxes
+ *          each of which contains the same number of cells.  The
+ *          load balancer also assigns patches to processors.
+ *
+ *       mesh::StandardTagAndInitialize -
+ *          Couples the gridding algorithm to
+ *          the ModifiedBratuProblem class which selects cells for
+ *          refinement based on criteria defined specifically for
+ *          the problem.  This object maintains a pointer to the
+ *          ModifiedBratuProblem object, which is passed into its
+ *          constructor, for this purpose.
+ *
+ */
+
+int main(
+   int argc,
+   char* argv[])
+{
+
+   /*
+    * Initialize MPI, SAMRAI.
+    */
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+#ifdef HAVE_PETSC
+   PetscInitialize(&argc, &argv, PETSC_NULL, PETSC_NULL);
+#endif
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+
+#if !defined(HAVE_PETSC) || !defined(HAVE_SUNDIALS) || !defined(HAVE_HYPRE)
+      tbox::pout << "This example requires the packages PETSC, SUNDIALS, "
+                 << "\nand HYPRE to work properly.  SAMRAI was not configured"
+                 << "\nwith one or more of these packages."
+                 << endl;
+#else
+
+      /*
+       * Process command line arguments.  For each run, the input
+       * filename must be specified.  Usage is:
+       *
+       *     executable <input file name>
+       */
+      string input_filename;
+
+      if (argc != 2) {
+         TBOX_ERROR("USAGE:  " << argv[0] << " <input file> \n"
+                                          << "  options:\n"
+                                          << "  none at this time" << endl);
+      } else {
+         input_filename = argv[1];
+      }
+
+      /*
+       * Create input database and parse all data in input file.
+       */
+
+      tbox::Pointer<tbox::Database> input_db(new tbox::InputDatabase("input_db"));
+      tbox::InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      /*
+       * Retrieve "Main" section of the input database.  Read
+       * dump information, which is used for writing plot files.
+       */
+
+      tbox::Pointer<tbox::Database> main_db = input_db->getDatabase("Main");
+
+      const tbox::Dimension dim(static_cast<unsigned short>(main_db->getInteger("dim")));
+
+      string base_name = "default";
+      base_name = main_db->getStringWithDefault("base_name", base_name);
+
+      string log_file_name = base_name + ".log";
+      tbox::PIO::logOnlyNodeZero(log_file_name);
+      tbox::plog << "input_filename = " << input_filename << endl;
+
+      int viz_dump_interval = 0;
+      if (main_db->keyExists("viz_dump_interval")) {
+         viz_dump_interval = main_db->getInteger("viz_dump_interval");
+      }
+
+      tbox::Array<string> viz_writer(1);
+      viz_writer[0] = "Visit";
+      string viz_dump_filename;
+      string visit_dump_dirname;
+      bool uses_visit = false;
+      int visit_number_procs_per_file = 1;
+      if (viz_dump_interval > 0) {
+         if (main_db->keyExists("viz_writer")) {
+            viz_writer = main_db->getStringArray("viz_writer");
+         }
+         if (main_db->keyExists("viz_dump_filename")) {
+            viz_dump_filename = main_db->getString("viz_dump_filename");
+         }
+         string viz_dump_dirname;
+         if (main_db->keyExists("viz_dump_dirname")) {
+            viz_dump_dirname = main_db->getString("viz_dump_dirname");
+         }
+         for (int i = 0; i < viz_writer.getSize(); i++) {
+            if (viz_writer[i] == "VisIt") uses_visit = true;
+         }
+         visit_dump_dirname = viz_dump_dirname;
+         if (uses_visit) {
+            if (viz_dump_dirname.empty()) {
+               TBOX_ERROR("main(): "
+                  << "\nviz_dump_dirname is null ... "
+                  << "\nThis must be specified for use with VisIt"
+                  << endl);
+            }
+            if (main_db->keyExists("visit_number_procs_per_file")) {
+               visit_number_procs_per_file =
+                  main_db->getInteger("visit_number_procs_per_file");
+            }
+         }
+      }
+
+      int regrid_interval = 0;
+      if (main_db->keyExists("regrid_interval")) {
+         regrid_interval = main_db->getInteger("regrid_interval");
+      }
+
+      string nonlinear_solver_package = "KINSOL";
+      if (main_db->keyExists("nonlinear_solver_package")) {
+         nonlinear_solver_package =
+            main_db->getString("nonlinear_solver_package");
+      }
+
+      /*
+       * Setup the timer manager to trace timing statistics during execution
+       * of the code.  The list of timers is given in the tbox::TimerManager
+       * section of the input file.
+       */
+      tbox::TimerManager::createManager(input_db->getDatabase("TimerManager"));
+
+      /*
+       * Create major algorithm and data objects which comprise application.
+       * Each object is initialized from input data.
+       * Refer to each class constructor
+       * for details.  For more information on the composition of objects
+       * and the roles they play in this application, see comments at top
+       * of file.
+       */
+
+      tbox::Pointer<appu::VisItDataWriter> visit_data_writer;
+      if (uses_visit) {
+         visit_data_writer =
+            new appu::VisItDataWriter(dim,
+               "Bratu VisIt Writer",
+               visit_dump_dirname,
+               visit_number_procs_per_file);
+      }
+
+      tbox::Pointer<geom::CartesianGridGeometry> grid_geometry(
+         new geom::CartesianGridGeometry(dim,
+            "CartesianGeometry",
+            input_db->getDatabase("CartesianGeometry")));
+
+      tbox::Pointer<hier::PatchHierarchy> patch_hierarchy(
+         new hier::PatchHierarchy("PatchHierarchy", grid_geometry,
+            input_db->getDatabase("PatchHierarchy")));
+
+      ModifiedBratuProblem* bratu_model = new ModifiedBratuProblem(
+            "ModifiedBratuProblem",
+            dim,
+            input_db->getDatabase("ModifiedBratuProblem"),
+            grid_geometry, visit_data_writer);
+
+      solv::NonlinearSolverStrategy* nonlinear_solver = NULL;
+
+      if (nonlinear_solver_package == "PETSc-SNES") {
+
+#ifdef HAVE_PETSC
+         nonlinear_solver =
+            new solv::SNES_SAMRAIContext("SNESSolver",
+               input_db->getDatabase("SNESSolver"),
+               bratu_model);
+#else
+         TBOX_ERROR("Cannot use PETSc-SNES option because SAMRAI was\n"
+            << "not configured to use it.");
+#endif
+
+      } else if (nonlinear_solver_package == "KINSOL") {
+
+#ifdef HAVE_SUNDIALS
+         nonlinear_solver =
+            new solv::KINSOL_SAMRAIContext("KINSOLSolver",
+               input_db->getDatabase("KINSOLSolver"),
+               bratu_model);
+#else
+         TBOX_ERROR("Cannot use KINSOL option because SAMRAI was\n"
+            << "not configured to use it.");
+#endif
+
+      } else {
+
+         TBOX_ERROR("Input key `nonlinear_solver_package' == "
+            << nonlinear_solver_package
+            << " found in input file is not recognized.");
+      }
+
+      algs::ImplicitIntegrator* imp_integrator = new algs::ImplicitIntegrator(
+            "ImplicitIntegrator",
+            input_db->getDatabase("ImplicitIntegrator"),
+            bratu_model,
+            nonlinear_solver,
+            patch_hierarchy);
+
+      tbox::Pointer<mesh::StandardTagAndInitialize> error_detector(
+         new mesh::StandardTagAndInitialize(dim,
+            "CellTaggingMethod",
+            bratu_model,
+            input_db->
+            getDatabase("StandardTagAndInitialize")));
+
+      tbox::Pointer<mesh::BergerRigoutsos> box_generator(
+         new mesh::BergerRigoutsos(dim));
+
+      tbox::Pointer<mesh::TreeLoadBalancer> load_balancer(
+         new mesh::TreeLoadBalancer(dim, "LoadBalancer",
+            input_db->getDatabase("LoadBalancer")));
+      load_balancer->setSAMRAI_MPI(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+      tbox::Pointer<mesh::GriddingAlgorithm> gridding_algorithm(
+         new mesh::GriddingAlgorithm(
+            patch_hierarchy,
+            "GriddingAlgorithm",
+            input_db->getDatabase("GriddingAlgorithm"),
+            error_detector,
+            box_generator,
+            load_balancer));
+
+      /*
+       * Tag buffers are passed to the gridding algorithm for buffering
+       * tagged cells before new levels are created.
+       */
+      tbox::Array<int> tag_buffer(patch_hierarchy->getMaxNumberOfLevels());
+      for (int ln = 0; ln < patch_hierarchy->getMaxNumberOfLevels(); ln++) {
+         tag_buffer[ln] = 0;
+      }
+      if (main_db->keyExists("tag_buffer")) {
+         tbox::Array<int> input_tags = main_db->getIntegerArray("tag_buffer");
+         if (input_tags.getSize() > 0) {
+            for (int ln0 = 0; ln0 < patch_hierarchy->getMaxNumberOfLevels();
+                 ln0++) {
+               if (input_tags.getSize() > ln0) {
+                  tag_buffer[ln0] = ((input_tags[ln0] > 0) ?
+                                     input_tags[ln0] : 0);
+               } else {
+                  tag_buffer[ln0] = ((input_tags[input_tags.getSize() - 1] > 0)
+                                     ? input_tags[input_tags.getSize() - 1] : 0);
+               }
+            }
+         }
+      }
+
+      /*
+       * After creating all objects and initializing their state, we
+       * print the input database and variable database contents to
+       * the log file.
+       */
+
+      tbox::plog << "\nCheck input data and variables before simulation:"
+                 << endl;
+      tbox::plog << "Input database..." << endl;
+      input_db->printClassData(tbox::plog);
+      tbox::plog << "\nVariable database..." << endl;
+      hier::VariableDatabase::getDatabase()->printClassData(tbox::plog);
+
+      /*
+       * Initialize AMR hierarchy configuration and data on all patches
+       * at initial time.
+       * Also, write initial state for
+       * vizualization.  Note that we also start a timer for the
+       * simulation part of the main program.
+       */
+
+      tbox::Pointer<tbox::Timer> main_timer =
+         tbox::TimerManager::getManager()->
+         getTimer("apps::main::main");
+      tbox::Pointer<tbox::Timer> solve_timer =
+         tbox::TimerManager::getManager()->
+         getTimer("apps::main::solve");
+
+      main_timer->start();
+
+      double sim_time = imp_integrator->getInitialTime();
+
+      if (tbox::RestartManager::getManager()->isFromRestart()) {
+
+         patch_hierarchy->getFromRestart();
+
+         gridding_algorithm->getTagAndInitializeStrategy()->
+         resetHierarchyConfiguration(patch_hierarchy,
+            0,
+            patch_hierarchy->getFinestLevelNumber());
+
+      } else {
+
+         gridding_algorithm->makeCoarsestLevel(sim_time);
+
+         bool done = false;
+         bool initial_time = true;
+         for (int lnum = 0;
+              patch_hierarchy->levelCanBeRefined(lnum) && !done; lnum++) {
+            gridding_algorithm->makeFinerLevel(
+               sim_time,
+               initial_time,
+               tag_buffer[lnum]);
+            done = !(patch_hierarchy->finerLevelExists(lnum));
+         }
+
+      }
+
+      /*
+       * Now that hierarchy is constructed, initialize vector weights.
+       */
+
+      bratu_model->setVectorWeights(patch_hierarchy);
+
+      tbox::RestartManager::getManager()->closeRestartFile();
+
+      if (uses_visit) {
+         visit_data_writer->writePlotData(patch_hierarchy,
+            imp_integrator->getIntegratorStep(),
+            sim_time);
+      }
+
+      /*
+       * Initialize implicit integrator.  Then, loop over a sequence of time
+       * steps until the final simulation time is reached, or the maximum
+       * number of steps is exceeded.
+       */
+
+      imp_integrator->initialize();
+
+      double dt = imp_integrator->getCurrentDt();
+      double end_time = imp_integrator->getFinalTime();
+
+      bool first_step = true;
+
+      while ((sim_time < end_time) &&
+             imp_integrator->stepsRemaining()) {
+
+         int iteration_num = imp_integrator->getIntegratorStep() + 1;
+         tbox::pout << "++++++++++++++++++++++++++++++++++++++++++++" << endl;
+         tbox::pout << "At begining of timestep # " << iteration_num - 1
+                    << endl;
+         tbox::pout << "Simulation time is " << sim_time << endl;
+         tbox::pout << "Time increment is " << dt << endl;
+
+         solve_timer->start();
+         int solver_retcode = imp_integrator->advanceSolution(dt, first_step);
+         solve_timer->stop();
+
+         solv::SNES_SAMRAIContext* snes_solver =
+            dynamic_cast<solv::SNES_SAMRAIContext *>(nonlinear_solver);
+         if (snes_solver) {
+            int nonlinear_itns = snes_solver->getNumberOfNonlinearIterations();
+            int linear_itns = snes_solver->getTotalNumberOfLinearIterations();
+            tbox::plog << " Nonlinear iterations:  " << nonlinear_itns
+                       << " Linear iterations:     " << linear_itns << endl;
+         }
+
+         bool good_solution = imp_integrator->checkNewSolution(solver_retcode);
+
+         if (good_solution) {
+            sim_time = imp_integrator->updateSolution();
+
+            tbox::pout << "At end of timestep # " << iteration_num - 1 << endl;
+            tbox::pout << "Simulation time is " << sim_time << endl;
+            tbox::pout << "++++++++++++++++++++++++++++++++++++++++++++"
+                       << endl;
+
+            /*
+             * If desired, write plot file.
+             */
+
+            if ((viz_dump_interval > 0) &&
+                ((iteration_num % viz_dump_interval) == 0)) {
+               if (uses_visit) {
+                  visit_data_writer->writePlotData(patch_hierarchy,
+                     iteration_num,
+                     sim_time);
+               }
+            }
+
+            /*
+             * If desired, regrid patch hierarchy and reset vector weights.
+             */
+
+            if ((regrid_interval > 0)
+                && ((iteration_num % regrid_interval) == 0)) {
+               gridding_algorithm->regridAllFinerLevels(0,
+                  sim_time,
+                  tag_buffer);
+#if defined(HAVE_PETSC) || defined(HAVE_SUNDIALS)
+               bratu_model->setVectorWeights(patch_hierarchy);
+#endif
+               first_step = true;
+            } else {
+               first_step = false;
+            }
+         } else {
+
+            tbox::pout << "At end of timestep # " << iteration_num - 1 << endl;
+            tbox::pout << "Failed to advance solution to " << sim_time << endl;
+            tbox::pout << "++++++++++++++++++++++++++++++++++++++++++++"
+                       << endl;
+            break;
+
+         }
+
+         dt = imp_integrator->getNextDt(good_solution, solver_retcode);
+
+      }
+
+      /*
+       * At conclusion of simulation, stop timer and deallocate objects.
+       */
+      main_timer->stop();
+
+      tbox::TimerManager::getManager()->print(tbox::plog);
+
+      input_db.setNull();
+      patch_hierarchy.setNull();
+      grid_geometry.setNull();
+
+      box_generator.setNull();
+      error_detector.setNull();
+      load_balancer.setNull();
+      gridding_algorithm.setNull();
+
+      if (imp_integrator)
+         delete imp_integrator;
+      if (nonlinear_solver)
+         delete nonlinear_solver;
+      if (bratu_model)
+         delete bratu_model;
+
+      if (uses_visit) {
+         visit_data_writer.setNull();
+      }
+
+#endif
+
+#ifdef TESTING
+      /*
+       * Currently not checking on solution accuracy, so if a run
+       * makes it here, it passes.  We need to find a way to check
+       * the solution accuracy.
+       */
+      tbox::pout << "\nPASSED:  nonlinear" << endl;
+#endif
+
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+
+#ifdef HAVE_PETSC
+   PetscFinalize();
+#endif
+   tbox::SAMRAI_MPI::finalize();
+
+   return 0;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/tbox_Pointer-CellPoissonFACSolver-NDIM.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/tbox_Pointer-CellPoissonFACSolver-NDIM.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,19 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright
+ * information, see COPYRIGHT and COPYING.LESSER.
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Pointer.C"
+#include "SAMRAI/solv/CellPoissonFACSolver.h"
+
+namespace SAMRAI {
+
+template class tbox::Pointer<solv::CellPoissonFACSolver>;
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/tbox_Pointer-ModifiedBratuProblem.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/tbox_Pointer-ModifiedBratuProblem.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,32 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   $Description 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Pointer.C"
+#include "ModifiedBratuProblem.h"
+
+#if !defined(HAVE_PETSC) || !defined(HAVE_SUNDIALS) || !defined(HAVE_HYPRE)
+
+/*
+ *************************************************************************
+ * If the library is not compiled with PETSC -and- KINSOL, print an error.
+ * If we're running autotests, skip the error
+ *************************************************************************
+ */
+#if (TESTING != 1)
+#error \
+   "This example requires SAMRAI be compiled with KINSOL, PETSC, and HYPRE."
+#endif
+
+#else
+
+template class SAMRAI::tbox::Pointer<ModifiedBratuProblem>;
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/test_inputs/kinsol.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/test_inputs/kinsol.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,147 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for 2D nonlinear solver example using KINSOL. 
+ *
+ ************************************************************************/
+// This is the input file for the 2D nonlinear solver example using KINSOL.
+
+Main{
+   dim = 2
+
+   base_name = "2d.kinsol"
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "2d.kinsol.visit"
+   viz_dump_filename     = "2d.kinsol"    // not used by VisIt
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+
+// regrid parameters
+   regrid_interval       = 1         // zero to turn off
+
+// Options for nonlinear solver package are:
+//     "KINSOL" (default), or "PETSc-SNES"
+   nonlinear_solver_package = "KINSOL"
+   // nonlinear_solver_package = "PETSc-SNES"
+
+}
+
+TimerManager{
+   maintain_exclusive_time = TRUE
+   maintain_concurrent_time = TRUE
+   timer_list               = "apps::main::*", "apps::usrFcns::*"
+}
+
+CartesianGeometry{
+   domain_boxes = [(0,0), (31,31)]
+   x_lo         = 0.0e0, 0.0e0   
+   x_up         = 1.0e0, 1.0e0
+}
+
+PatchHierarchy {
+   max_levels = 8
+   largest_patch_size {
+      level_0 = 32, 32
+      // all finer levels will use same values as level_0...
+   }
+
+ smallest_patch_size {
+      level_0 = 4,4
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+      level_3            = 2, 2
+      level_4            = 2, 2
+      level_5            = 2, 2
+      level_6            = 2, 2
+      level_7            = 2, 2
+      level_8            = 2, 2
+      level_9            = 2, 2
+      level_10           = 2, 2
+      //  etc.
+   }
+
+   // TODO this should be removed when visit writer is updated
+   sequentialize_patch_indices = TRUE
+}
+GriddingAlgorithm{
+
+   combine_efficiency = 0.75
+   efficiency_tolerance = 0.75
+}
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes{
+     level_0 = [(8,8), (23,23)]
+     level_1 = [(24,24), (39,39)]
+     level_2 = [(56,56), (71,71)]
+     level_3 = [(120,120), (135,135)]
+     level_4 = [(248,248), (263,263)]
+     level_5 = [(504,504), (519,519)]
+     level_6 = [(1016,1016), (1031,1031)]
+     level_7 = [(2040,2040), (2055,2055)]
+     level_8 = [(4088,4088), (4103,4103)]
+     level_9 = [(8184,8184), (8199,8199)]
+            //etc.
+   }
+}
+
+LoadBalancer{
+    processors = 1, 1
+    use_spatial_bin_pack = TRUE
+}
+
+ModifiedBratuProblem{
+   timestep = 0.0625      // time increment used for all steps
+   lambda   = 6.0         // factor multiplying exponential term
+
+   max_precond_its = 35    // maximum iterations for preconditioner 
+   precond_tol = 1.0e-2    // preconditioner convergence tolerance
+
+   preconditioner_print_flag = FALSE // should the preconditioner report residuals
+}
+
+KINSOLSolver{
+    max_nonlinear_iterations = 20
+    KINSOL_log_filename      = "nkLog.32x32.8"
+    KINSOL_print_flag        = 3
+
+    uses_preconditioner      = TRUE
+    uses_jac_times_vector    = TRUE
+
+    residual_stop_tolerance  = 1.0e-10
+    nonlinear_step_tolerance = 1.0e-10
+
+    max_krylov_dimension      = 20
+    max_linear_solve_restarts = 6
+}
+
+SNESSolver{
+    uses_preconditioner            = TRUE
+    uses_explicit_jacobian         = TRUE
+    absolute_tolerance             = 1.0e-10
+    relative_tolerance             = 1.0e-4
+    step_tolerance                 = 1.0e-6
+    linear_solver_type             = "gmres"
+    maximum_gmres_krylov_dimension = 20
+    maximum_linear_iterations      = 50
+    forcing_term_strategy          = "EWCHOICE1"
+    collect_convergence_histories  = TRUE
+    print_nonlinear_residuals      = TRUE
+    print_linear_residuals         = TRUE
+}
+
+ImplicitIntegrator{
+    initial_time = 0.0
+    final_time = 1.0
+    max_integrator_steps = 5
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/test_inputs/kinsol.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/test_inputs/kinsol.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,143 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for 3D nonlinear solver example using KINSOL. 
+ *
+ ************************************************************************/
+// This is the input file for the 3D nonlinear solver example using KINSOL.
+
+Main{
+   dim = 3
+
+   base_name = "3d.kinsol"
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "3d.kinsol.visit"
+   viz_dump_filename     = "3d.kinsol"    // not used by VisIt
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// regrid parameters
+   regrid_interval       = 1         // zero to turn off
+
+// Options for nonlinear solver package are:
+//     "KINSOL" (default), or "PETSc-SNES"
+   nonlinear_solver_package = "KINSOL"
+   // nonlinear_solver_package = "PETSc-SNES"
+
+}
+
+TimerManager{
+   maintain_exclusive_time = TRUE
+   maintain_concurrent_time = TRUE
+   timer_list               = "apps::main::*", "apps::usrFcns::*"
+}
+
+CartesianGeometry{
+   domain_boxes = [(0,0,0), (31,31,31)]
+   x_lo         = 0.0e0, 0.0e0, 0.0e0
+   x_up         = 1.0e0, 1.0e0, 1.0e0
+}
+
+PatchHierarchy {
+   max_levels = 2
+   largest_patch_size {
+      level_0 = 32, 32, 32
+      // all finer levels will use same values as level_0...
+   }
+
+ smallest_patch_size {
+      level_0 = 4,4,4
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+      level_3            = 2, 2, 2
+      level_4            = 2, 2, 2
+      level_5            = 2, 2, 2
+      level_6            = 2, 2, 2
+      level_7            = 2, 2, 2
+      level_8            = 2, 2, 2
+      level_9            = 2, 2, 2
+      level_10           = 2, 2, 2
+      //  etc.
+   }
+}
+
+GriddingAlgorithm{
+   combine_efficiency = 0.75
+   efficiency_tolerance = 0.75
+}
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes{
+     level_0 = [(8,8,8), (23,23,23)]
+     level_1 = [(24,24,24), (39,39,39)]
+     level_2 = [(56,56,56), (71,71,71)]
+     level_3 = [(120,120,120), (135,135,135)]
+     level_4 = [(248,248,248), (263,263,263)]
+     level_5 = [(504,504,504), (519,519,519)]
+     level_6 = [(1016,1016,1016), (1031,1031,1031)]
+     level_7 = [(2040,2040,2040), (2055,2055,2055)]
+     level_8 = [(4088,4088,4088), (4103,4103,4103)]
+     level_9 = [(8184,8184,8184), (8199,8199,8199)]
+            //etc.
+   }
+}
+
+LoadBalancer{
+    processors = 1, 1
+    use_spatial_bin_pack = TRUE
+}
+
+ModifiedBratuProblem{
+   timestep = 0.0625      // time increment used for all steps
+   lambda   = 6.0         // factor multiplying exponential term
+
+   max_precond_its = 35    // maximum iterations for preconditioner 
+   precond_tol = 1.0e-2    // preconditioner convergence tolerance
+
+   preconditioner_print_flag = FALSE // should the preconditioner report residuals
+}
+
+KINSOLSolver{
+    max_nonlinear_iterations = 20
+    KINSOL_log_filename      = "nkLog.32x32.8"
+    KINSOL_print_flag        = 3
+
+    uses_preconditioner      = TRUE
+    uses_jac_times_vector    = TRUE
+
+    residual_stop_tolerance  = 1.0e-10
+    nonlinear_step_tolerance = 1.0e-10
+
+    max_krylov_dimension      = 20
+    max_linear_solve_restarts = 6
+}
+
+SNESSolver{
+    uses_preconditioner            = TRUE
+    uses_explicit_jacobian         = TRUE
+    absolute_tolerance             = 1.0e-10
+    relative_tolerance             = 1.0e-4
+    step_tolerance                 = 1.0e-6
+    linear_solver_type             = "gmres"
+    maximum_gmres_krylov_dimension = 20
+    maximum_linear_iterations      = 50
+    forcing_term_strategy          = "EWCHOICE1"
+    collect_convergence_histories  = TRUE
+    print_nonlinear_residuals      = TRUE
+    print_linear_residuals         = TRUE
+}
+
+ImplicitIntegrator{
+    initial_time = 0.0
+    final_time = 1.0
+    max_integrator_steps = 5
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/test_inputs/petsc.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/test_inputs/petsc.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,146 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for 2D nonlinear solver example using PETSc. 
+ *
+ ************************************************************************/
+// This is the input file for the 2D nonlinear solver example using PETSc.
+
+Main{
+   dim = 2
+
+   base_name = "2d.petsc"
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "2d.petsc.visit"
+   viz_dump_filename     = "2d.petsc"    // not used by VisIt
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// regrid parameters
+   regrid_interval       = 0         // zero to turn off
+
+// Options for nonlinear solver package are:
+//     "KINSOL" (default), or "PETSc-SNES"
+   // nonlinear_solver_package = "KINSOL"
+   nonlinear_solver_package = "PETSc-SNES"
+
+}
+
+TimerManager{
+   maintain_exclusive_time = TRUE
+   maintain_concurrent_time = TRUE
+   timer_list               = "apps::main::*", "apps::usrFcns::*"
+}
+
+CartesianGeometry{
+   domain_boxes = [(0,0), (31,31)]
+   x_lo         = 0.0e0, 0.0e0   
+   x_up         = 1.0e0, 1.0e0
+}
+
+PatchHierarchy {
+   max_levels = 8
+   largest_patch_size {
+      level_0 = 32, 32
+      // all finer levels will use same values as level_0...
+   }
+
+ smallest_patch_size {
+      level_0 = 4,4
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2
+      level_2            = 2, 2
+      level_3            = 2, 2
+      level_4            = 2, 2
+      level_5            = 2, 2
+      level_6            = 2, 2
+      level_7            = 2, 2
+      level_8            = 2, 2
+      level_9            = 2, 2
+      level_10           = 2, 2
+      //  etc.
+   }
+}
+
+GriddingAlgorithm{
+   combine_efficiency = 0.75
+   efficiency_tolerance = 0.75
+
+   // TODO this should be removed when visit writer is updated
+   sequentialize_patch_indices = TRUE
+}
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes{
+     level_0 = [(8,8), (23,23)]
+     level_1 = [(24,24), (39,39)]
+     level_2 = [(56,56), (71,71)]
+     level_3 = [(120,120), (135,135)]
+     level_4 = [(248,248), (263,263)]
+     level_5 = [(504,504), (519,519)]
+     level_6 = [(1016,1016), (1031,1031)]
+     level_7 = [(2040,2040), (2055,2055)]
+     level_8 = [(4088,4088), (4103,4103)]
+     level_9 = [(8184,8184), (8199,8199)]
+            //etc.
+   }
+}
+
+LoadBalancer{
+    processors = 1, 1
+    use_spatial_bin_pack = TRUE
+}
+
+ModifiedBratuProblem{
+   timestep = 0.0625      // time increment used for all steps
+   lambda   = 6.0         // factor multiplying exponential term
+
+   max_precond_its = 35    // maximum iterations for preconditioner 
+   precond_tol = 1.0e-2    // preconditioner convergence tolerance
+
+   preconditioner_print_flag = FALSE // should the preconditioner report residuals
+}
+
+KINSOLSolver{
+    max_nonlinear_iterations = 20
+    KINSOL_log_filename      = "nkLog.32x32.8"
+    KINSOL_print_flag        = 3
+
+    uses_preconditioner      = TRUE
+    uses_jac_times_vector    = TRUE
+
+    residual_stop_tolerance  = 1.0e-10
+    nonlinear_step_tolerance = 1.0e-10
+
+    max_krylov_dimension      = 20
+    max_linear_solve_restarts = 4
+}
+
+SNESSolver{
+    uses_preconditioner            = TRUE
+    uses_explicit_jacobian         = TRUE
+    absolute_tolerance             = 1.0e-10
+    relative_tolerance             = 1.0e-4
+    step_tolerance                 = 1.0e-6
+    linear_solver_type             = "gmres"
+    maximum_gmres_krylov_dimension = 20
+    maximum_linear_iterations      = 50
+    forcing_term_strategy          = "EWCHOICE1"
+    collect_convergence_histories  = TRUE
+    print_nonlinear_residuals      = TRUE
+    print_linear_residuals         = TRUE
+}
+
+ImplicitIntegrator{
+    initial_time = 0.0
+    final_time = 1.0
+    max_integrator_steps = 5
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/nonlinear/test_inputs/petsc.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/nonlinear/test_inputs/petsc.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,143 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for 3D nonlinear solver example using PETSc. 
+ *
+ ************************************************************************/
+// This is the input file for the 3D nonlinear solver example using PETSc.
+
+Main{
+   dim = 3
+
+   base_name = "3d.petsc"
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "3d.petsc.visit"
+   viz_dump_filename     = "3d.petsc"    // not used by VisIt
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// regrid parameters
+   regrid_interval       = 0         // zero to turn off
+
+// Options for nonlinear solver package are:
+//     "KINSOL" (default), or "PETSc-SNES"
+   // nonlinear_solver_package = "KINSOL"
+   nonlinear_solver_package = "PETSc-SNES"
+
+}
+
+TimerManager{
+   maintain_exclusive_time = TRUE
+   maintain_concurrent_time = TRUE
+   timer_list               = "apps::main::*", "apps::usrFcns::*"
+}
+
+CartesianGeometry{
+   domain_boxes = [(0,0,0), (31,31,31)]
+   x_lo         = 0.0e0, 0.0e0, 0.0e0
+   x_up         = 1.0e0, 1.0e0, 1.0e0
+}
+
+PatchHierarchy {
+   max_levels = 2
+   largest_patch_size {
+      level_0 = 32, 32, 32
+      // all finer levels will use same values as level_0...
+   }
+
+ smallest_patch_size {
+      level_0 = 4,4,4
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+      level_3            = 2, 2, 2
+      level_4            = 2, 2, 2
+      level_5            = 2, 2, 2
+      level_6            = 2, 2, 2
+      level_7            = 2, 2, 2
+      level_8            = 2, 2, 2
+      level_9            = 2, 2, 2
+      level_10           = 2, 2, 2
+      //  etc.
+   }
+}
+
+GriddingAlgorithm {
+   combine_efficiency = 0.75
+   efficiency_tolerance = 0.75
+}
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes{
+     level_0 = [(8,8,8), (23,23,23)]
+     level_1 = [(24,24,24), (39,39,39)]
+     level_2 = [(56,56,56), (71,71,71)]
+     level_3 = [(120,120,120), (135,135,135)]
+     level_4 = [(248,248,248), (263,263,263)]
+     level_5 = [(504,504,504), (519,519,519)]
+     level_6 = [(1016,1016,1016), (1031,1031,1031)]
+     level_7 = [(2040,2040,2040), (2055,2055,2055)]
+     level_8 = [(4088,4088,4088), (4103,4103,4103)]
+     level_9 = [(8184,8184,8184), (8199,8199,8199)]
+            //etc.
+   }
+}
+
+LoadBalancer{
+    processors = 1, 1
+    use_spatial_bin_pack = TRUE
+}
+
+ModifiedBratuProblem{
+   timestep = 0.0625      // time increment used for all steps
+   lambda   = 6.0         // factor multiplying exponential term
+
+   max_precond_its = 35    // maximum iterations for preconditioner 
+   precond_tol = 1.0e-2    // preconditioner convergence tolerance
+
+   preconditioner_print_flag = FALSE // should the preconditioner report residuals
+}
+
+KINSOLSolver{
+    max_nonlinear_iterations = 20
+    KINSOL_log_filename      = "nkLog.32x32.8"
+    KINSOL_print_flag        = 3
+
+    uses_preconditioner      = TRUE
+    uses_jac_times_vector    = TRUE
+
+    residual_stop_tolerance  = 1.0e-10
+    nonlinear_step_tolerance = 1.0e-10
+
+    max_krylov_dimension      = 20
+    max_linear_solve_restarts = 4
+}
+
+SNESSolver{
+    uses_preconditioner            = TRUE
+    uses_explicit_jacobian         = TRUE
+    absolute_tolerance             = 1.0e-10
+    relative_tolerance             = 1.0e-4
+    step_tolerance                 = 1.0e-6
+    linear_solver_type             = "gmres"
+    maximum_gmres_krylov_dimension = 20
+    maximum_linear_iterations      = 50
+    forcing_term_strategy          = "EWCHOICE1"
+    collect_convergence_histories  = TRUE
+    print_nonlinear_residuals      = TRUE
+    print_linear_residuals         = TRUE
+}
+
+ImplicitIntegrator{
+    initial_time = 0.0
+    final_time = 1.0
+    max_integrator_steps = 5
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/HierSumTest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/HierSumTest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1384 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   SAMRAI interface class for hierarchy node and edge sum test 
+ *
+ ************************************************************************/
+
+#include "HierSumTest.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "SAMRAI/pdat/EdgeData.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeIndex.h"
+#include "SAMRAI/pdat/NodeIterator.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/algs/PatchBoundaryNodeSum.h"
+#include "SAMRAI/algs/PatchBoundaryEdgeSum.h"
+#include "SAMRAI/hier/CoarseFineBoundary.h"
+
+extern "C" {
+void F77_FUNC(setedges2d, SETEDGES2D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double *,
+   double *,
+   double *);
+
+void F77_FUNC(checkedges2d, CHECKEDGES2D) (const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double &,
+   int &,
+   const double *,
+   const double *);
+void F77_FUNC(setedges3d, SETEDGES3D) (const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double *,
+   double *,
+   double *,
+   double *);
+
+void F77_FUNC(checkedges3d, CHECKEDGES3D) (const int &, const int &,
+   const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double &,
+   int &,
+   const double *,
+   const double *,
+   const double *);
+}
+
+using namespace SAMRAI;
+using namespace tbox;
+using namespace hier;
+using namespace pdat;
+using namespace geom;
+using namespace algs;
+
+/*************************************************************************
+ *
+ * Constructor and Destructor.
+ *
+ ************************************************************************/
+
+HierSumTest::HierSumTest(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   Pointer<Database> input_db
+#ifdef HAVE_HDF5
+   , Pointer<appu::VisItDataWriter> viz_writer
+#endif
+      ):
+   d_dim(dim),
+   d_node_ghosts(dim),
+   d_edge_ghosts(dim)
+{
+
+   d_object_name = object_name;
+
+   d_depth = 1;
+
+   /*
+    * Initialize object with data read from given input databases.
+    */
+   getFromInput(input_db);
+
+   /*
+    * Set up variables and contexts.
+    *
+    * Vars:
+    *    ucell - cell-centered variable U
+    *    unode - node-centered variable U
+    *    uedge - edge-centered variable U
+    *
+    * Contexts:
+    *
+    *    NOGHOST  - zero ghosts (unode)
+    *    ONEGHOST - one ghost (ucell)
+    *
+    * What the test case does:
+    *   1. Set ucell = 1.0 on cells of all levels
+    *   2. Set ucell = 0.0 on cells of L < LN that are
+    *      covered by refined cells.
+    *   3. Set node weight on patch interiors = sum(cell weights)
+    *   3. Do a hier sum transaction
+    *   4. Correct result - all nodes on all levels = 2^d_dim
+    *
+    *
+    * Below we construct u variable and its contexts.
+    */
+   VariableDatabase* variable_db = VariableDatabase::getDatabase();
+
+   d_ucell_var = new CellVariable<double>(dim, "ucell", d_depth);
+   d_unode_var = new NodeVariable<double>(dim, "unode", d_depth);
+   d_uedge_var = new EdgeVariable<double>(dim, "uedge", d_depth);
+
+   Pointer<VariableContext> cxt1 = variable_db->getContext("CONTEXT1");
+   Pointer<VariableContext> cxt2 = variable_db->getContext("CONTEXT2");
+
+   IntVector one_ghost(dim, 1);
+
+   d_ucell_node_id =
+      variable_db->registerVariableAndContext(d_ucell_var,
+         cxt1,
+         one_ghost);
+
+   d_unode_id = variable_db->registerVariableAndContext(d_unode_var,
+         cxt1,
+         d_node_ghosts);
+   d_ucell_edge_id =
+      variable_db->registerVariableAndContext(d_ucell_var,
+         cxt2,
+         one_ghost);
+
+   d_uedge_id = variable_db->registerVariableAndContext(d_uedge_var,
+         cxt1,
+         d_edge_ghosts);
+
+#ifdef HAVE_HDF5
+   /*
+    * Register u values to be written by the viz writer.
+    */
+   if (!viz_writer.isNull()) {
+      viz_writer->registerPlotQuantity("ucell::node", "SCALAR",
+         d_ucell_node_id, 0);
+      viz_writer->registerPlotQuantity("ucell::edge", "SCALAR",
+         d_ucell_edge_id, 0);
+      viz_writer->registerPlotQuantity("unode", "SCALAR", d_unode_id);
+   }
+#endif
+
+}
+
+HierSumTest::~HierSumTest()
+{
+}
+
+/*************************************************************************
+ *
+ * Set initial node values based on sum of surrounding cell weights
+ *
+ ************************************************************************/
+int
+HierSumTest::setInitialNodeValues(
+   const Pointer<PatchHierarchy> hierarchy)
+{
+   int fail_count = 0;
+
+   /*
+    * Set node weight on patch interiors = sum(cell weights)
+    */
+   // loop over hierarchy levels
+   for (int ln = 0; ln <= hierarchy->getFinestLevelNumber(); ln++) {
+      Pointer<PatchLevel> level = hierarchy->getPatchLevel(ln);
+
+      // loop over patches on level
+      for (PatchLevel::Iterator ip(level); ip; ip++) {
+         Pointer<Patch> patch = *ip;
+
+         Pointer<NodeData<double> > unode = patch->getPatchData(d_unode_id);
+         Pointer<CellData<double> > ucell =
+            patch->getPatchData(d_ucell_node_id);
+
+         // output initial cell values
+         int level_number = level->getLevelNumber();
+         tbox::plog << "INITIAL Cell values for NODE - Level: " << level_number
+                    << "\tPatch: " << patch->getMappedBox() << endl;
+         ucell->print(ucell->getGhostBox(), plog);
+
+         // loop over nodes of patch
+         Box pbox = patch->getBox();
+         double cell_val;
+         int d;
+         for (NodeIterator ni(pbox); ni; ni++) {
+            NodeIndex node = ni();
+            for (d = 0; d < ucell->getDepth(); d++) {
+
+               (*unode)(node, d) = 0.;
+
+               /*
+                * Sum contributions from surrounding cells for each node
+                * value.
+                */
+               if (d_dim == tbox::Dimension(2)) {
+                  for (int j = 0; j <= 1; j++) {
+                     for (int i = 0; i <= 1; i++) {
+                        CellIndex cell(ni());
+                        cell(0) -= i;
+                        cell(1) -= j;
+                        cell_val = (*ucell)(cell, d);
+                        (*unode)(node, d) += cell_val;
+                     }
+                  }
+               }
+               if (d_dim == tbox::Dimension(3)) {
+                  for (int k = 0; k <= 1; k++) {
+                     for (int j = 0; j <= 1; j++) {
+                        for (int i = 0; i <= 1; i++) {
+                           CellIndex cell(ni());
+                           cell(0) -= i;
+                           cell(1) -= j;
+                           cell(2) -= k;
+                           cell_val = (*ucell)(cell, d);
+                           (*unode)(node, d) += cell_val;
+                        }
+                     }
+                  }
+               }
+            } // loop over depth
+         } // loop over nodes
+      } // loop over patches
+
+      /*
+       * Any nodes that are *inside* the complement region (inside
+       * meaning at least one cell away from the coarse-fine boundary)
+       * should not contribute to the nodal sum on finer levels.  Here
+       * we verify this is the case by resetting all nodes inside this
+       * region to -999.
+       *
+       * The so-called fine_overlap_shrunk is computed by finding the
+       * region of the level that is not overlapped by fine
+       * patches (complement), growing it, and removing intersection
+       * with the level boxes.  This is effectively a shrunken coarse-fine
+       * overlap region, on which the nodes shouldn't participate in any
+       * communication.
+       */
+      BoxArray level_boxes = level->getBoxes();
+      BoxList fine_overlap_shrunk(level_boxes);
+      BoxList complement(level_boxes);
+      if (level->getLevelNumber() != hierarchy->getFinestLevelNumber()) {
+         Pointer<PatchLevel> fine_level = hierarchy->getPatchLevel(ln + 1);
+         BoxArray fine_level_boxes = fine_level->getBoxes();
+         fine_level_boxes.coarsen(fine_level->getRatioToCoarserLevel());
+         BoxList fine_level_bl(fine_level_boxes);
+         complement.removeIntersections(fine_level_bl);
+         complement.grow(IntVector(d_dim, 1));
+         fine_overlap_shrunk.removeIntersections(complement);
+
+         for (PatchLevel::Iterator ip(level); ip; ip++) {
+            Pointer<Patch> patch = *ip;
+
+            Pointer<NodeData<double> > unode =
+               patch->getPatchData(d_unode_id);
+
+            for (BoxList::Iterator b(fine_overlap_shrunk); b; b++) {
+               Box fine_overlap = b();
+               Box patch_interior = patch->getBox();
+               Box data_box = fine_overlap * patch_interior;
+               for (NodeIterator ni(data_box); ni; ni++) {
+                  NodeIndex node = ni();
+                  for (int d = 0; d < unode->getDepth(); d++) {
+                     double node_val = (*unode)(node, d);
+                     if (tbox::MathUtilities<double>::equalEps(node_val,
+                            0.0)) {
+                        (*unode)(node, d) = -999.;
+                     }
+                  }
+               }
+            } // loop over complement boxes
+         } // loop over patches
+      } // if a finer level exists
+
+      for (PatchLevel::Iterator ip(level); ip; ip++) {
+         Pointer<Patch> patch = *ip;
+
+         Pointer<NodeData<double> > unode =
+            patch->getPatchData(d_unode_id);
+
+         // output initial node values
+         tbox::plog << "INITIAL Node values - Level: " << level->getLevelNumber()
+                    << "\tPatch: " << patch->getMappedBox() << endl;
+         unode->print(unode->getGhostBox(), plog);
+
+      } // loop over patches
+   } // loop over levels
+
+   return fail_count;
+}
+
+/*************************************************************************
+ *
+ * Set initial edge values based on sum of surrounding cell weights
+ *
+ ************************************************************************/
+int
+HierSumTest::setInitialEdgeValues(
+   const Pointer<PatchLevel> level)
+{
+   int fail_count = 0;
+
+   double correct_val = 1.;
+   for (int i = 0; i < d_dim.getValue() - 1; i++) {
+      correct_val *= 2.;
+   }
+
+   /*
+    * Set edge weight on patch interiors = sum(cell weights)
+    */
+   for (PatchLevel::Iterator ip(level); ip; ip++) {
+      Pointer<Patch> patch = *ip;
+
+      Pointer<EdgeData<double> > uedge = patch->getPatchData(d_uedge_id);
+      Pointer<CellData<double> > ucell =
+         patch->getPatchData(d_ucell_edge_id);
+
+      // output initial cell values
+      int level_number = level->getLevelNumber();
+      tbox::plog << "INITIAL Cell values for EDGE - Level: " << level_number
+                 << "\tPatch: " << patch->getMappedBox() << endl;
+      ucell->print(ucell->getGhostBox(), plog);
+
+      const Index ifirst(patch->getBox().lower());
+      const Index ilast(patch->getBox().upper());
+
+      IntVector cellg(ucell->getGhostCellWidth());
+      IntVector edgeg(uedge->getGhostCellWidth());
+
+      for (int d = 0; d < uedge->getDepth(); d++) {
+
+         if (d_dim == tbox::Dimension(2)) {
+            F77_FUNC(setedges2d, SETEDGES2D) (ifirst(0), ifirst(1),
+               ilast(0), ilast(1),
+               cellg(0), cellg(1),
+               edgeg(0), edgeg(1),
+               ucell->getPointer(d),
+               uedge->getPointer(0, d),
+               uedge->getPointer(1, d));
+         }
+         if (d_dim == tbox::Dimension(3)) {
+            F77_FUNC(setedges3d, SETEDGES3D) (ifirst(0), ifirst(1), ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               cellg(0), cellg(1), cellg(2),
+               edgeg(0), edgeg(1), edgeg(2),
+               ucell->getPointer(d),
+               uedge->getPointer(0, d),
+               uedge->getPointer(1, d),
+               uedge->getPointer(2, d));
+         }
+
+         /*
+          * If you want to check edges BEFORE communication (to make sure
+          * the communication is actually doing something) then do the
+          * check here.  Be forwarned that it dumps a lot of data because,
+          * if things are working right, the data before communication will
+          * have many errors, that the communication will fix.
+          */
+
+         if (d_check_data_before_communication) {
+
+            int fort_all_correct = 1;
+
+            if (d_dim == tbox::Dimension(2)) {
+               F77_FUNC(checkedges2d, CHECKEDGES2D) (ifirst(0), ifirst(1),
+                  ilast(0), ilast(1),
+                  edgeg(0), edgeg(1),
+                  correct_val,
+                  fort_all_correct,
+                  uedge->getPointer(0, d),
+                  uedge->getPointer(1, d));
+            }
+            if (d_dim == tbox::Dimension(3)) {
+               F77_FUNC(checkedges3d, CHECKEDGES3D) (ifirst(0), ifirst(1),
+                  ifirst(2),
+                  ilast(0), ilast(1), ilast(2),
+                  edgeg(0), edgeg(1), edgeg(2),
+                  correct_val,
+                  fort_all_correct,
+                  uedge->getPointer(0, d),
+                  uedge->getPointer(1, d),
+                  uedge->getPointer(2, d));
+            }
+
+            if (fort_all_correct == 0) {
+               fail_count++;
+               tbox::perr
+               << "PatchBdrySum Edge test FAILED:  Errors on Level: "
+               << level->getLevelNumber()
+               << "\t Patch: " << patch->getMappedBox()
+               << "\nAll edges are not correct value." << endl;
+            } else {
+#if (TESTING == 1)
+               tbox::plog
+#else
+               tbox::pout
+#endif
+               << "All edges on Level: " << level->getLevelNumber()
+               << "\t Patch: " << patch->getMappedBox()
+               << "\tare correct." << endl;
+            }
+         }
+
+      } // loop over depth
+
+#if (TESTING == 1)
+      tbox::plog << "INITIAL Edge values - Level: " << level->getLevelNumber()
+                 << "\tPatch: " << patch->getMappedBox() << endl;
+      uedge->print(uedge->getGhostBox(), plog);
+#endif
+
+   } // loop over patches
+
+   tbox::SAMRAI_MPI::getSAMRAIWorld().Barrier();
+
+   return fail_count;
+
+}
+
+/*************************************************************************
+ *
+ * Setup outer node sum.
+ *
+ ************************************************************************/
+void
+HierSumTest::setupOuternodeSum(
+   const Pointer<PatchHierarchy> hierarchy)
+{
+   d_node_sum_util = new PatchBoundaryNodeSum("Node Sum Util");
+
+   d_node_sum_util->registerSum(d_unode_id);
+
+   int num_levels = hierarchy->getNumberOfLevels();
+   if (num_levels > 1) {
+
+      int coarsest_level_number = 0;
+      d_node_sum_util->setupSum(hierarchy,
+         coarsest_level_number,
+         hierarchy->getFinestLevelNumber());
+   } else {
+      d_node_sum_util->setupSum(hierarchy->getPatchLevel(0));
+   }
+
+}
+
+/*************************************************************************
+ *
+ * Perform outer node sum.
+ *
+ ************************************************************************/
+void
+HierSumTest::doOuternodeSum()
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!d_node_sum_util.isNull());
+#endif
+
+   bool fill_hanging_nodes = true;
+   d_node_sum_util->computeSum(fill_hanging_nodes);
+
+}
+
+/*************************************************************************
+ *
+ * Setup Outeredge sum.
+ *
+ ************************************************************************/
+void
+HierSumTest::setupOuteredgeSum(
+   const Pointer<PatchHierarchy> hierarchy,
+   const int level_num)
+{
+   if (level_num >= d_edge_sum_util.getSize()) {
+      d_edge_sum_util.resizeArray(level_num + 1);
+   }
+
+   d_edge_sum_util[level_num] =
+      new PatchBoundaryEdgeSum("Level Edge Sum Util");
+
+   d_edge_sum_util[level_num]->registerSum(d_uedge_id);
+
+   d_edge_sum_util[level_num]->setupSum(hierarchy->getPatchLevel(level_num));
+}
+
+/*************************************************************************
+ *
+ * Setup and perform Outeredge sum.
+ *
+ ************************************************************************/
+void
+HierSumTest::doOuteredgeSum(
+   const int level_num)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(level_num < d_edge_sum_util.getSize());
+   TBOX_ASSERT(!d_edge_sum_util[level_num].isNull());
+#endif
+
+   d_edge_sum_util[level_num]->computeSum();
+
+}
+
+/*************************************************************************
+ *
+ * Check correctness of hierarchy node sum operation
+ *
+ ************************************************************************/
+
+int HierSumTest::checkNodeResult(
+   const Pointer<PatchHierarchy> hierarchy)
+{
+
+   int fail_count = 0;
+
+   /*
+    * After the communication the sum on every node of every level should be
+    * 2^d_dim.  Check this here...
+    */
+
+   double correct_val = 1.;
+   for (int i = 0; i < d_dim.getValue(); i++) {
+      correct_val *= 2.;
+   }
+
+   // loop over hierarchy levels
+   for (int ln = 0; ln <= hierarchy->getFinestLevelNumber(); ln++) {
+      Pointer<PatchLevel> level = hierarchy->getPatchLevel(ln);
+
+      BoxArray level_boxes = level->getBoxes();
+      BoxList level_boxes_complement(level_boxes);
+
+      // If a finer level exists, remove overlap boxes by computing complement
+      if (level->getLevelNumber() != hierarchy->getFinestLevelNumber()) {
+         Pointer<PatchLevel> fine_level = hierarchy->getPatchLevel(ln + 1);
+         BoxArray fine_level_boxes = fine_level->getBoxes();
+         fine_level_boxes.coarsen(fine_level->getRatioToCoarserLevel());
+         BoxList fine_level_bl(fine_level_boxes);
+         level_boxes_complement.removeIntersections(fine_level_bl);
+      }
+
+      // loop over patches on level
+      bool all_correct = true;
+      for (PatchLevel::Iterator ip(level); ip; ip++) {
+         Pointer<Patch> patch = *ip;
+
+         Pointer<NodeData<double> > unode =
+            patch->getPatchData(d_unode_id);
+
+         // loop over Level complement boxlist
+         for (BoxList::Iterator b(level_boxes_complement); b; b++) {
+            Box complement = b();
+
+            // intersect patch box with level box complement
+            Box patch_interior = patch->getBox();
+            Box data_box = complement * patch_interior;
+
+            /*
+             * Iterate over nodes and check correctness of result.
+             */
+            for (NodeIterator i(data_box); i; i++) {
+               NodeIndex node = i();  // i,j
+               for (int d = 0; d < unode->getDepth(); d++) {
+
+                  bool node_correct = false;
+                  double node_val = (*unode)(node, d);
+
+                  if (tbox::MathUtilities<double>::equalEps(node_val,
+                         correct_val)) {
+                     node_correct = true;
+                  }
+
+                  if (!node_correct) {
+                     tbox::pout << "BAD NODE = " << node_val << " at index "
+                                << i()
+                                << " in L" << ln << " " << patch->getMappedBox()
+                                << " depth = " << d << " should be "
+                                << correct_val << endl;
+                     all_correct = false;
+                     break;
+                  }
+               }
+            }
+         } // loop over complement boxes
+
+         if (!all_correct) {
+            fail_count++;
+            tbox::perr << "PatchBdrySum Node test FAILED:  Errors on Level: "
+                       << level->getLevelNumber()
+                       << "\t Patch: " << patch->getMappedBox()
+                       << "\nAll nodes are not correct value." << endl;
+         } else {
+#if (TESTING == 1)
+            tbox::plog
+#else
+            tbox::pout
+#endif
+            << "All nodes on Level: " << level->getLevelNumber()
+            << "\t Patch: " << patch->getMappedBox()
+            << "\tare correct." << endl;
+         }
+
+         Pointer<CellData<double> > ucell_node =
+            patch->getPatchData(d_ucell_node_id);
+
+#if (TESTING == 1)
+         tbox::plog << "FINAL Cell values for NODE - Level: "
+                    << level->getLevelNumber()
+                    << "\tPatch: " << patch->getMappedBox() << endl;
+         ucell_node->print(ucell_node->getGhostBox(), plog);
+
+         tbox::plog << "FINAL Node values - Level: " << level->getLevelNumber()
+                    << "\tPatch " << patch->getMappedBox()
+                    << endl;
+         unode->print(unode->getBox(), plog);
+#endif
+
+      } // loop over patches
+
+   } // loop over levels
+
+   return fail_count;
+
+}
+
+/*************************************************************************
+ *
+ * Check correctness of level edge sum operation
+ *
+ ************************************************************************/
+
+int HierSumTest::checkEdgeResult(
+   const Pointer<PatchLevel> level)
+{
+
+   int fail_count = 0;
+
+   /*
+    * After the communication the sum on every edge of every level should be
+    * 2^(d_dim-1).  Check this here...
+    */
+
+   double correct_val = 1.;
+   for (int i = 0; i < d_dim.getValue() - 1; i++) {
+      correct_val *= 2.;
+   }
+
+   // loop over patches on level
+   for (PatchLevel::Iterator ip(level); ip; ip++) {
+      Pointer<Patch> patch = *ip;
+
+      Pointer<EdgeData<double> > uedge =
+         patch->getPatchData(d_uedge_id);
+
+      const Index ifirst(patch->getBox().lower());
+      const Index ilast(patch->getBox().upper());
+
+      IntVector edgeg(uedge->getGhostCellWidth());
+
+      for (int d = 0; d < uedge->getDepth(); d++) {
+
+         /*
+          * In the fortran, set "fort_all_correct" to 0 if we
+          * detect differences between uedge data and "correct_val".
+          */
+         int fort_all_correct = 1;
+
+         if (d_dim == tbox::Dimension(2)) {
+            F77_FUNC(checkedges2d, CHECKEDGES2D) (ifirst(0), ifirst(1),
+               ilast(0), ilast(1),
+               edgeg(0), edgeg(1),
+               correct_val,
+               fort_all_correct,
+               uedge->getPointer(0, d),
+               uedge->getPointer(1, d));
+         }
+         if (d_dim == tbox::Dimension(3)) {
+            F77_FUNC(checkedges3d, CHECKEDGES3D) (ifirst(0), ifirst(1),
+               ifirst(2),
+               ilast(0), ilast(1), ilast(2),
+               edgeg(0), edgeg(1), edgeg(2),
+               correct_val,
+               fort_all_correct,
+               uedge->getPointer(0, d),
+               uedge->getPointer(1, d),
+               uedge->getPointer(2, d));
+         }
+
+         if (fort_all_correct == 0) {
+            fail_count++;
+            tbox::perr << "PatchBdrySum Edge test FAILED:  Errors on Level: "
+                       << level->getLevelNumber()
+                       << "\t Patch: " << patch->getMappedBox()
+                       << "\nAll edges are not correct value." << endl;
+         } else {
+#if (TESTING == 1)
+            tbox::plog
+#else
+            tbox::pout
+#endif
+            << "All edges on Level: " << level->getLevelNumber()
+            << "\t Patch: " << patch->getMappedBox()
+            << "\tare correct." << endl;
+         }
+
+      } // loop over depth
+
+      Pointer<CellData<double> > ucell_edge =
+         patch->getPatchData(d_ucell_edge_id);
+
+#if (TESTING == 1)
+      tbox::plog << "FINAL Cell values for EDGE - Level: "
+                 << level->getLevelNumber()
+                 << "\tPatch: " << patch->getMappedBox() << endl;
+      ucell_edge->print(ucell_edge->getGhostBox(), plog);
+
+      tbox::plog << "FINAL Edge values - Level: "
+                 << level->getLevelNumber()
+                 << "\tPatch: " << patch->getMappedBox() << endl;
+      uedge->print(uedge->getGhostBox(), plog);
+#endif
+
+   } // loop over patches
+
+   return fail_count;
+
+}
+
+/*************************************************************************
+ *
+ * Methods inherited from StandardTagAndInitStrategy.
+ *
+ ************************************************************************/
+
+/*
+ * Allocate storage and initialize data on the level.
+ */
+
+void HierSumTest::initializeLevelData(
+   const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const double time,
+   const bool can_be_refined,
+   const bool initial_time,
+   const tbox::Pointer<hier::BasePatchLevel> old_level,
+   const bool allocate_data)
+{
+   NULL_USE(can_be_refined);
+   NULL_USE(initial_time);
+   NULL_USE(old_level);
+
+   Pointer<PatchHierarchy> local_hierarchy = hierarchy;
+
+   /*
+    * Set initial data on hierarchy level.
+    *   1. Set ucell = 1.0 on cells of all levels
+    *   2. For NODE data only, set ucell = 0.0 on cells of L < LN that are
+    *      covered by refined cells.
+    */
+   Pointer<PatchLevel> level =
+      hierarchy->getPatchLevel(level_number);
+
+   /*
+    * Allocate storage for cell and node data.
+    */
+   if (allocate_data) {
+      level->allocatePatchData(d_ucell_node_id, time);
+      level->allocatePatchData(d_ucell_edge_id, time);
+      level->allocatePatchData(d_unode_id, time);
+      level->allocatePatchData(d_uedge_id, time);
+   }
+
+   /*
+    * Set edge/node values to zero initially.
+    */
+   for (PatchLevel::Iterator p0(level); p0; p0++) {
+      Pointer<Patch> patch = *p0;
+
+      Pointer<NodeData<double> > unode =
+         patch->getPatchData(d_unode_id);
+      Pointer<EdgeData<double> > uedge =
+         patch->getPatchData(d_uedge_id);
+      unode->fillAll(0.0);
+      uedge->fillAll(0.0);
+   }
+
+   /*
+    * Set cell weights.  We want interior cells set to 1.0 and
+    * ghost cells set to 0.0.  (Eventually, we will reset the ghosts
+    * based on overlap with neighboring patches but this will be
+    * in the next step).
+    */
+   for (PatchLevel::Iterator p0(level); p0; p0++) {
+      Pointer<Patch> patch = *p0;
+
+      Pointer<CellData<double> > ucell_node =
+         patch->getPatchData(d_ucell_node_id);
+      Pointer<CellData<double> > ucell_edge =
+         patch->getPatchData(d_ucell_edge_id);
+
+      ucell_node->fillAll(0.0, ucell_node->getGhostBox()); // ghost box
+      ucell_node->fillAll(1.0, patch->getBox());          // interior patch box
+
+      ucell_edge->fillAll(0.0, ucell_edge->getGhostBox()); // ghost box
+      ucell_edge->fillAll(1.0, patch->getBox());          // interior patch box
+
+      // set cell values at physical boundary
+      const Pointer<CartesianPatchGeometry> patch_geom =
+         patch->getPatchGeometry();
+      const tbox::Array<BoundaryBox> node_bdry =
+         patch_geom->getCodimensionBoundaries(d_dim.getValue());
+      const tbox::Array<BoundaryBox> edge_bdry =
+         patch_geom->getCodimensionBoundaries(d_dim.getValue() - 1);
+      tbox::Array<BoundaryBox> face_bdry;
+      if (d_dim == tbox::Dimension(3)) {
+         face_bdry = patch_geom->getCodimensionBoundaries(1);
+      }
+      // node cell values
+      setBoundaryConditions(*patch,
+         node_bdry,
+         edge_bdry,
+         face_bdry,
+         d_ucell_node_id);
+
+      // edge cell values
+      setBoundaryConditions(*patch,
+         node_bdry,
+         edge_bdry,
+         face_bdry,
+         d_ucell_edge_id);
+
+   }
+
+   if (level_number > 0) {
+
+      /*
+       * For node data, set the cell weights to zero on coarser level
+       * where there is overlap with fine level patches.
+       */
+      Pointer<PatchLevel> coarser_level =
+         hierarchy->getPatchLevel(level_number - 1);
+      BoxArray fine_level_boxes = level->getBoxes();
+
+      IntVector ratio(level->getRatioToCoarserLevel());
+      fine_level_boxes.coarsen(ratio);
+
+      for (PatchLevel::Iterator p1(coarser_level); p1; p1++) {
+         Pointer<Patch> cpatch = *p1;
+
+         Pointer<CellData<double> > ucell_node =
+            cpatch->getPatchData(d_ucell_node_id);
+
+         Box cpbox = cpatch->getBox();
+         for (int n = 0; n < fine_level_boxes.getNumberOfBoxes(); n++) {
+            Box setbox = cpbox * fine_level_boxes[n];
+            if (!setbox.empty()) {
+               ucell_node->fillAll(0.0, setbox);
+            }
+         }
+
+         // zero out cells on the boundary that lie at coarse-fine
+         // interface.
+         zeroOutPhysicalBoundaryCellsAtCoarseFineBoundary(*cpatch,
+            d_ucell_node_id);
+
+      } // loop over coarser level patches
+
+      /*
+       * For edge data, set the ghosts of the cell data equal to 1.0 at the
+       * coarse-fine boundaries.
+       */
+      IntVector max_ghosts(d_dim, 1);
+      CoarseFineBoundary cfbdry(*(Pointer<PatchHierarchy>)hierarchy,
+                                level_number,
+                                max_ghosts);
+
+      level = hierarchy->getPatchLevel(level_number);
+      for (PatchLevel::Iterator p(level); p; p++) {
+         Pointer<Patch> patch = *p;
+         Box pbox = patch->getBox();
+         const GlobalId global_id = patch->getGlobalId();
+
+         const tbox::Array<BoundaryBox> node_bdry =
+            cfbdry.getNodeBoundaries(global_id);
+         const tbox::Array<BoundaryBox> edge_bdry =
+            cfbdry.getEdgeBoundaries(global_id);
+         tbox::Array<BoundaryBox> face_bdry;
+         if (d_dim == tbox::Dimension(3)) {
+            face_bdry = cfbdry.getFaceBoundaries(global_id);
+         }
+
+         setBoundaryConditions(*patch,
+            node_bdry,
+            edge_bdry,
+            face_bdry,
+            d_ucell_edge_id);
+
+      } // loop over level patches
+
+   } // if level_number > 0
+
+}
+
+/*
+ * Perform operations necessary when grid changes for dynamic grid
+ * calculations (to be added later...)
+ */
+void
+HierSumTest::resetHierarchyConfiguration(
+   const Pointer<BasePatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level)
+{
+   (void)hierarchy;
+   (void)coarsest_level;
+   (void)finest_level;
+}
+
+/*
+ * Routine to do cell tagging.  Add later...
+ */
+void
+HierSumTest::applyGradientDetector(
+   const Pointer<BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const double time,
+   const int tag_index,
+   const bool initial_time,
+   const bool uses_richardson_extrapolation_too)
+{
+   (void)hierarchy;
+   (void)level_number;
+   (void)time;
+   (void)tag_index;
+   (void)initial_time;
+   (void)uses_richardson_extrapolation_too;
+}
+
+/*
+ * Set boundary conditions by shifting patch appropriately and
+ * finding intersection with boundary fill box.
+ */
+void
+HierSumTest::setBoundaryConditions(
+   Patch& patch,
+   const tbox::Array<BoundaryBox>& node_bdry,
+   const tbox::Array<BoundaryBox>& edge_bdry,
+   const tbox::Array<BoundaryBox>& face_bdry,
+   const int cell_data_id)
+{
+   const int num_node_bdry_boxes = node_bdry.getSize();
+   const int num_edge_bdry_boxes = edge_bdry.getSize();
+   const int num_face_bdry_boxes = face_bdry.getSize();
+
+   const Pointer<CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+
+   /*
+    * Pointer to data in ghost regions.
+    */
+   Pointer<CellData<double> > ucell = patch.getPatchData(cell_data_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!ucell.isNull());
+#endif
+   IntVector ghost_cells(ucell->getGhostCellWidth());
+   const Box pbox(patch.getBox());
+
+   int i, d;
+   IntVector shift(d_dim, 0);
+   Box shifted_pbox = pbox;
+
+   if (d_dim == tbox::Dimension(3)) {
+      /*
+       * Set cell weights to 1.0 on FACES of patch.
+       */
+      for (i = 0; i < num_face_bdry_boxes; i++) {
+         Box fill_box = patch_geom->getBoundaryFillBox(face_bdry[i],
+               pbox,
+               ghost_cells);
+         /*
+          * location index:
+          *    0,1 - X lower,upper
+          *    2,3 - Y lower,upper
+          *    4,5 - Z lower,upper
+          */
+         int loc_indx = face_bdry[i].getLocationIndex();
+         shift = IntVector(d_dim, 0);
+         shifted_pbox = pbox;
+         if (loc_indx == 0) {
+            shift(0) = -1;
+         } else if (loc_indx == 1) {
+            shift(0) = 1;
+         } else if (loc_indx == 2) {
+            shift(1) = -1;
+         } else if (loc_indx == 3) {
+            shift(1) = 1;
+         } else if (loc_indx == 4) {
+            shift(2) = -1;
+         } else if (loc_indx == 5) {
+            shift(2) = 1;
+         }
+         shifted_pbox.shift(shift);
+         fill_box = fill_box * shifted_pbox;
+
+         for (CellIterator ci(fill_box); ci; ci++) {
+            CellIndex cell = ci();
+            for (d = 0; d < ucell->getDepth(); d++) {
+               (*ucell)(cell, d) = 1.0;
+            }
+         }
+      }
+   }
+
+   /*
+    * Set cell weights to 1.0 on EDGES of patch.
+    */
+   for (i = 0; i < num_edge_bdry_boxes; i++) {
+      Box fill_box = patch_geom->getBoundaryFillBox(edge_bdry[i],
+            pbox,
+            ghost_cells);
+
+      int loc_indx = edge_bdry[i].getLocationIndex();
+      shift = IntVector(d_dim, 0);
+      shifted_pbox = pbox;
+
+      if (d_dim == tbox::Dimension(3)) {
+         /*
+          * location index:
+          * 3D:
+          *    0,1,2,3 - XloYlo, XhiYLO, XloYhi, XhiYhi
+          *    4,5,6,7 - XloZlo, XhiZlo, XloZhi, XhiZhi
+          *    8,9,10,11 - YloZlo, YhiZlo, YloZhi, YhiZhi
+          */
+         if (loc_indx == 0) {
+            shift(0) = -1;
+            shift(1) = -1;
+         } else if (loc_indx == 1) {
+            shift(0) = 1;
+            shift(1) = -1;
+         } else if (loc_indx == 2) {
+            shift(0) = -1;
+            shift(1) = 1;
+         } else if (loc_indx == 3) {
+            shift(0) = 1;
+            shift(1) = 1;
+         } else if (loc_indx == 4) {
+            shift(0) = -1;
+            shift(2) = -1;
+         } else if (loc_indx == 5) {
+            shift(0) = 1;
+            shift(2) = -1;
+         } else if (loc_indx == 6) {
+            shift(0) = -1;
+            shift(2) = 1;
+         } else if (loc_indx == 7) {
+            shift(0) = 1;
+            shift(2) = 1;
+         } else if (loc_indx == 8) {
+            shift(1) = -1;
+            shift(2) = -1;
+         } else if (loc_indx == 9) {
+            shift(1) = 1;
+            shift(2) = -1;
+         } else if (loc_indx == 10) {
+            shift(1) = -1;
+            shift(2) = 1;
+         } else if (loc_indx == 11) {
+            shift(1) = 1;
+            shift(2) = 1;
+         }
+      }
+      if (d_dim == tbox::Dimension(2)) {
+         // to avoid warnings of unused vars
+         (void)num_face_bdry_boxes;
+
+         /*
+          * location index:
+          * 2D:
+          *    0,1 - Xlo, Xhi
+          *    2,3 - Ylo, Yhi
+          */
+         if (loc_indx == 0) {
+            shift(0) = -1;
+         } else if (loc_indx == 1) {
+            shift(0) = 1;
+         } else if (loc_indx == 2) {
+            shift(1) = -1;
+         } else if (loc_indx == 3) {
+            shift(1) = 1;
+         }
+      }
+      shifted_pbox.shift(shift);
+      fill_box = fill_box * shifted_pbox;
+
+      for (CellIterator ci(fill_box); ci; ci++) {
+         CellIndex cell = ci();
+         for (d = 0; d < ucell->getDepth(); d++) {
+            (*ucell)(cell, d) = 1.0;
+         }
+      }
+   }
+
+   /*
+    * Set cell weights to 1.0 on NODES of patch.
+    */
+
+   for (i = 0; i < num_node_bdry_boxes; i++) {
+      Box fill_box = patch_geom->getBoundaryFillBox(node_bdry[i],
+            pbox,
+            ghost_cells);
+      for (CellIterator ci(fill_box); ci; ci++) {
+         CellIndex cell = ci();  //i,j
+
+         for (d = 0; d < ucell->getDepth(); d++) {
+            (*ucell)(cell, d) = 1.0;
+         }
+      }
+   }
+
+}
+
+/*
+ * Zero out the cells on the physical boundary that lie at the
+ * coarse-fine boundary.  This is needed for cases in which the
+ * fine patch intersects the physical boundary.
+ */
+void HierSumTest::zeroOutPhysicalBoundaryCellsAtCoarseFineBoundary(
+   Patch& cpatch,
+   const int cell_data_id)
+{
+
+   const Pointer<CartesianPatchGeometry> patch_geom = cpatch.getPatchGeometry();
+
+   /*
+    * Get node and edge boundary boxes.
+    */
+
+   const tbox::Array<BoundaryBox> edge_bdry =
+      patch_geom->getCodimensionBoundaries(d_dim.getValue() - 1);
+   const int num_edge_bdry_boxes = edge_bdry.getSize();
+
+   tbox::Array<BoundaryBox> face_bdry;
+   int num_face_bdry_boxes = 0;
+   if (d_dim == tbox::Dimension(3)) {
+      face_bdry = patch_geom->getCodimensionBoundaries(1);
+      num_face_bdry_boxes = face_bdry.getSize();
+   }
+
+   /*
+    * Pointer to data in ghost regions.
+    */
+   Pointer<CellData<double> > ucell = cpatch.getPatchData(cell_data_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!ucell.isNull());
+#endif
+   IntVector ghost_cells(ucell->getGhostCellWidth());
+
+   int d;
+   Box cpbox = cpatch.getBox();
+   double interior_value;
+
+   if (d_dim == tbox::Dimension(3)) {
+      /*
+       * Zero out values on the FACE boundary when they border a value of
+       * zero on the interior.
+       */
+      for (int i_box = 0; i_box < num_face_bdry_boxes; i_box++) {
+         Box fill_box = patch_geom->getBoundaryFillBox(face_bdry[i_box],
+               cpbox,
+               ghost_cells);
+         /*
+          * location index:
+          *    0,1 - X lower,upper
+          *    2,3 - Y lower,upper
+          *    4,5 - Z lower,upper
+          */
+         int loc_indx = face_bdry[i_box].getLocationIndex();
+         for (CellIterator ci(fill_box); ci; ci++) {
+            CellIndex boundary_cell = ci();
+            CellIndex interior = boundary_cell;
+            if (loc_indx == 0) {
+               interior(0) += 1;
+            } else if (loc_indx == 1) {
+               interior(0) -= 1;
+            } else if (loc_indx == 2) {
+               interior(1) += 1;
+            } else if (loc_indx == 3) {
+               interior(1) -= 1;
+            } else if (loc_indx == 4) {
+               interior(2) += 1;
+            } else if (loc_indx == 5) {
+               interior(2) -= 1;
+            }
+
+            for (d = 0; d < ucell->getDepth(); d++) {
+               interior_value = (*ucell)(interior, d);
+
+               if (tbox::MathUtilities<double>::equalEps(interior_value,
+                      0.0)) {
+                  (*ucell)(boundary_cell, d) = 0.0;
+               }
+            }
+         }
+      }
+   }
+   /*
+    * Zero out values on the EDGE boundary when they border a value of
+    * zero on the interior.
+    */
+   for (int i = 0; i < num_edge_bdry_boxes; i++) {
+      Box fill_box = patch_geom->getBoundaryFillBox(edge_bdry[i],
+            cpbox,
+            ghost_cells);
+
+      /*
+       * location index:
+       *    0,1,2,3 - XloYlo, XhiYLo, XloYhi, XhiYhi
+       *    4,5,6,7 - XloZlo, XhiZlo, XloZhi, XhiZhi
+       *    8,9,10,11 - YloZlo, YhiZlo, YloZhi, YhiZhi
+       * 2D:
+       *    0,1 - Xlo, Xhi
+       *    2,3 - Ylo, Yhi
+       */
+      int loc_indx = edge_bdry[i].getLocationIndex();
+      for (CellIterator ci(fill_box); ci; ci++) {
+         CellIndex boundary_cell = ci();
+         CellIndex interior = boundary_cell;
+         if (d_dim == tbox::Dimension(3)) {
+            if (loc_indx == 0) {
+               interior(0) += 1;
+               interior(1) += 1;
+            } else if (loc_indx == 1) {
+               interior(0) -= 1;
+               interior(1) += 1;
+            } else if (loc_indx == 2) {
+               interior(0) += 1;
+               interior(1) -= 1;
+            } else if (loc_indx == 3) {
+               interior(0) -= 1;
+               interior(1) -= 1;
+            } else if (loc_indx == 4) {
+               interior(0) += 1;
+               interior(2) += 1;
+            } else if (loc_indx == 5) {
+               interior(0) -= 1;
+               interior(2) += 1;
+            } else if (loc_indx == 6) {
+               interior(0) += 1;
+               interior(2) -= 1;
+            } else if (loc_indx == 7) {
+               interior(0) -= 1;
+               interior(2) -= 1;
+            } else if (loc_indx == 8) {
+               interior(1) += 1;
+               interior(2) += 1;
+            } else if (loc_indx == 9) {
+               interior(1) -= 1;
+               interior(2) += 1;
+            } else if (loc_indx == 10) {
+               interior(1) += 1;
+               interior(2) -= 1;
+            } else if (loc_indx == 11) {
+               interior(1) -= 1;
+               interior(2) -= 1;
+            }
+         }
+         if (d_dim == tbox::Dimension(2)) {
+            if (loc_indx == 0) {
+               interior(0) += 1;
+            } else if (loc_indx == 1) {
+               interior(0) -= 1;
+            } else if (loc_indx == 2) {
+               interior(1) += 1;
+            } else if (loc_indx == 3) {
+               interior(1) -= 1;
+            }
+         }
+         for (d = 0; d < ucell->getDepth(); d++) {
+            interior_value = (*ucell)(interior, d);
+
+            if (tbox::MathUtilities<double>::equalEps(interior_value, 0.0)) {
+               (*ucell)(boundary_cell, d) = 0.0;
+            }
+         }
+      }
+   }
+
+   /*
+    * Since we never use cell values at corners (nodes), no need to set
+    * them to anything.
+    */
+}
+
+/*
+ *************************************************************************
+ *
+ * Get data from input database.                                         *
+ *                                                                       *
+ *************************************************************************
+ */
+void
+HierSumTest::getFromInput(
+   Pointer<Database> input_db)
+{
+   /*
+    * Set number of ghosts for node and edge data.
+    */
+   tbox::Array<int> tmp_array;
+   if (input_db->keyExists("node_ghosts")) {
+      tmp_array = input_db->getIntegerArray("node_ghosts");
+      if (tmp_array.getSize() != d_dim.getValue()) {
+         TBOX_ERROR("HierSumTest::getFromInput()"
+            << "invalid 'node_ghosts' entry - must be integer"
+            << "array of size d_dim" << endl);
+      }
+   } else {
+      tmp_array.resizeArray(d_dim.getValue());
+      for (int i = 0; i < d_dim.getValue(); i++) {
+         tmp_array[i] = 0;
+      }
+   }
+
+   for (int i = 0; i < d_dim.getValue(); i++) {
+      d_node_ghosts(i) = tmp_array[i];
+   }
+
+   if (input_db->keyExists("edge_ghosts")) {
+      tmp_array = input_db->getIntegerArray("edge_ghosts");
+      if (tmp_array.getSize() != d_dim.getValue()) {
+         TBOX_ERROR("HierSumTest::getFromInput()"
+            << "invalid 'edge_ghosts' entry - must be integer"
+            << "array of size d_dim" << endl);
+      }
+   } else {
+      tmp_array.resizeArray(d_dim.getValue());
+      for (int i = 0; i < d_dim.getValue(); i++) {
+         tmp_array[i] = 0;
+      }
+   }
+
+   for (int i = 0; i < d_dim.getValue(); i++) {
+      d_edge_ghosts(i) = tmp_array[i];
+   }
+
+   if (input_db->keyExists("var_depth")) {
+      d_depth = input_db->getInteger("var_depth");
+   }
+
+   /*
+    * See if we want to check data before communication
+    */
+   d_check_data_before_communication = false;
+   if (input_db->keyExists("check_data_before_communication")) {
+      d_check_data_before_communication =
+         input_db->getBool("check_data_before_communication");
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/HierSumTest.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/HierSumTest.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,332 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   SAMRAI interface class for hierarchy node and edge sum test 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+/*
+ * Header file for base classes.
+ */
+#include "SAMRAI/mesh/StandardTagAndInitStrategy.h"
+
+/*
+ * Header file for SAMRAI classes referenced in this class.
+ */
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/pdat/EdgeVariable.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/algs/PatchBoundaryNodeSum.h"
+#include "SAMRAI/algs/PatchBoundaryEdgeSum.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/appu/VisItDataWriter.h"
+
+using namespace std;
+using namespace SAMRAI;
+using namespace tbox;
+using namespace hier;
+using namespace mesh;
+using namespace pdat;
+using namespace algs;
+
+/*!
+ * This code tests the hierarchy sum operations in SAMRAI.  Here's a brief
+ * summary of what it does:
+ *
+ *   1. Create a cell-centered variable (ucell) which has ghost cell width
+ *      equal 1.  Crate a node-centered variable (unode) which has zero
+ *      ghosts.
+ *        - Set ucell = 1.0 on cells of patch INTERIORS
+ *        - Set ucell = 0.0 on cells of patch GHOSTS
+ *   2. Set ucell = 0.0 on cells of L < LN that are
+ *      covered by refined cells.
+ *   3. Set node values unode = sum(surrounding cells)
+ *   3. Do a hier sum transaction
+ *   4. Correct result - all nodes on all levels = 2^dim
+ *
+ * The class provides interfaces to problem dependent operations that
+ * are expected by gridding operations performed in SAMRAI.  For example,
+ * initializing data on a level and resetting hierarchy after regrid.
+ *
+ * Other methods may be added as needed.
+ *
+ * Input Parameters:
+ *
+ *
+ * A sample input entry might look like:
+ *
+ *    HierSumTest {
+ *
+ *    }
+ */
+
+class HierSumTest:
+   public StandardTagAndInitStrategy
+{
+public:
+   /*!
+    * Default constructor for HierSumTest.
+    */
+   HierSumTest(
+      const string& object_name,
+      const tbox::Dimension& dim,
+      Pointer<Database> input_db
+#ifdef HAVE_HDF5
+      , Pointer<appu::VisItDataWriter> viz_writer
+#endif
+      );
+
+   /*!
+    * Empty destructor for HierSumTest.
+    */
+   virtual ~HierSumTest();
+
+/*************************************************************************
+ *
+ * Methods particular to HierSumTest class.
+ *
+ ************************************************************************/
+
+   /*!
+    * Set node values before the hierarchy sum operation and return integer
+    * number of failures.
+    */
+   int
+   setInitialNodeValues(
+      const Pointer<PatchHierarchy> hierarchy);
+
+   /*!
+    * Set edge values before the level sum operation and return integer
+    * number of failures.
+    */
+   int
+   setInitialEdgeValues(
+      const Pointer<PatchLevel> level);
+
+   /*!
+    * Setup the node hierarchy sum.
+    */
+   void
+   setupOuternodeSum(
+      const Pointer<PatchHierarchy> hierarchy);
+
+   /*!
+    * Invoke the node hierarchy sum communication.
+    */
+   void
+   doOuternodeSum();
+
+   /*!
+    * Setup the edge level sum.
+    */
+   void
+   setupOuteredgeSum(
+      const Pointer<PatchHierarchy> hierarchy,
+      const int level_num);
+
+   /*!
+    * Invoke the edge level sum communication.
+    */
+   void
+   doOuteredgeSum(
+      const int level_num);
+
+   /*!
+    * Check node result after hierarchy sum operation and return integer number of
+    * test failures.
+    */
+   int
+   checkNodeResult(
+      const Pointer<PatchHierarchy> hierarchy);
+
+   /*!
+    * Check edge result after level sum operation and return integer number of
+    * test failures.
+    */
+   int
+   checkEdgeResult(
+      const Pointer<PatchLevel> level);
+
+/***************************************************************************
+ *
+ * Methods inherited from StandardTagAndInitStrategy.
+ *
+ ************************************************************************/
+
+   /*!
+    * Initialize data on a new level after it is inserted into an AMR patch
+    * hierarchy by the gridding algorithm.  The level number indicates
+    * that of the new level.
+    *
+    * Generally, when data is set, it is interpolated from coarser levels
+    * in the hierarchy.  If the old level pointer in the argument list is
+    * non-null, then data is copied from the old level to the new level
+    * on regions of intersection between those levels before interpolation
+    * occurs.   In this case, the level number must match that of the old
+    * level.  The specific operations that occur when initializing level
+    * data are determined by the particular solution methods in use; i.e.,
+    * in the subclass of this abstract base class.
+    *
+    * The boolean argument initial_time indicates whether the level is
+    * being introduced for the first time (i.e., at initialization time),
+    * or after some regrid process during the calculation beyond the initial
+    * hierarchy construction.  This information is provided since the
+    * initialization of the data may be different in each of those
+    * circumstances.  The can_be_refined boolean argument indicates whether
+    * the level is the finest allowable level in the hierarchy.
+    */
+
+   virtual void
+   initializeLevelData(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double init_data_time,
+      const bool can_be_refined,
+      const bool initial_time,
+      const tbox::Pointer<hier::BasePatchLevel> old_level =
+         tbox::Pointer<hier::BasePatchLevel>(NULL),
+      const bool allocate_data = true);
+
+   /*!
+    * After hierarchy levels have changed and data has been initialized on
+    * the new levels, this routine can be used to reset any information
+    * needed by the solution method that is particular to the hierarchy
+    * configuration.  For example, the solution procedure may cache
+    * communication schedules to amortize the cost of data movement on the
+    * AMR patch hierarchy.  This function will be called by the gridding
+    * algorithm after the initialization occurs so that the algorithm-specific
+    * subclass can reset such things.  Also, if the solution method must
+    * make the solution consistent across multiple levels after the hierarchy
+    * is changed, this process may be invoked by this routine.  Of course the
+    * details of these processes are determined by the particular solution
+    * methods in use.
+    *
+    * The level number arguments indicate the coarsest and finest levels
+    * in the current hierarchy configuration that have changed.  It should
+    * be assumed that all intermediate levels have changed as well.
+    */
+   virtual void
+   resetHierarchyConfiguration(
+      const Pointer<BasePatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level);
+
+   /*!
+    * Set tags to the specified tag value where refinement of the given
+    * level should occur using the user-supplied gradient detector.  The
+    * value "tag_index" is the index of the cell-centered integer tag
+    * array on each patch in the hierarchy.  The boolean argument indicates
+    * whether cells are being tagged on the level for the first time;
+    * i.e., when the hierarchy is initially constructed.  If it is false,
+    * it should be assumed that cells are being tagged at some later time
+    * after the patch hierarchy was initially constructed.  This information
+    * is provided since the application of the error estimator may be
+    * different in each of those circumstances.
+    */
+   virtual void
+   applyGradientDetector(
+      const Pointer<BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double time,
+      const int tag_index,
+      const bool initial_time,
+      const bool uses_richardson_extrapolation_too);
+
+private:
+   /*
+    * These private member functions read data from input and restart.
+    * When beginning a run from a restart file, all data members are read
+    * from the restart file.  If the boolean flag is true when reading
+    * from input, some restart values may be overridden by those in the
+    * input file.
+    *
+    * An assertion results if the database pointer is null.
+    */
+   virtual void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db);
+
+   /*
+    * Set boundary conditions at physical boundaries and coarse-fine
+    * boundaries.  Note that this is not called by the refine
+    * schedule because we do not use a refine schedule in this test.
+    * It is called during initializeLevel().
+    */
+   void
+   setBoundaryConditions(
+      Patch& patch,
+      const tbox::Array<BoundaryBox>& node_bdry,
+      const tbox::Array<BoundaryBox>& edge_bdry,
+      const tbox::Array<BoundaryBox>& face_bdry,
+      const int cell_data_id);
+
+   /*
+    * Zero out the coarse cell boundary values where fine patch intersects
+    * the physical boundary.
+    */
+   void
+   zeroOutPhysicalBoundaryCellsAtCoarseFineBoundary(
+      Patch& cpatch,
+      const int cell_data_id);
+
+   /*
+    * Object name used for error/warning reporting and as a label
+    * for restart database entries.
+    */
+   string d_object_name;
+
+   const tbox::Dimension d_dim;
+
+   /*
+    * Variable - u
+    */
+   Pointer<CellVariable<double> > d_ucell_var;
+   Pointer<NodeVariable<double> > d_unode_var;
+   Pointer<EdgeVariable<double> > d_uedge_var;
+
+   /*
+    * Ghost vectors
+    */
+   IntVector d_node_ghosts;
+   IntVector d_edge_ghosts;
+
+   /*
+    * Patch Data ids - used to access data off patch
+    */
+   int d_ucell_node_id;
+   int d_ucell_edge_id;
+   int d_unode_id;
+   int d_uedge_id;
+
+   /*
+    * Node, edge, and cell variable depths - all are equal.
+    */
+   int d_depth;
+
+   /*
+    * Node and edge sum utilities.
+    */
+   Pointer<PatchBoundaryNodeSum> d_node_sum_util;
+   Array<Pointer<PatchBoundaryEdgeSum> > d_edge_sum_util;
+
+   /*
+    * Flag to tell whether to check data before communication.  Usually,
+    * this will be false, but sometimes you may want to see if there are
+    * actually errors in the data before the communication.
+    */
+   bool d_check_data_before_communication;
+
+};
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,560 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=HierSumTest.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/PatchBoundaryEdgeSum.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/PatchBoundaryNodeSum.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/CoarseFineBoundary.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h HierSumTest.C	\
+	HierSumTest.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=main.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/PatchBoundaryEdgeSum.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/PatchBoundaryNodeSum.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/CoarseFineBoundary.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BergerRigoutsos.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h HierSumTest.h	\
+	main.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,81 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for SAMRAI patch boundary hierarchy sum test 
+##
+#########################################################################
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/test/patchbdrysum
+VPATH         = @srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+default:      check
+
+include $(OBJECT)/config/Makefile.config
+
+CPPFLAGS_EXTRA= -DDISPLAY -DNDIM=$(PDIM) -DTESTING=1
+
+CXX_OBJS      = main.o HierSumTest.o
+F_OBJS       = edgeops2d.o edgeops3d.o
+
+NUM_TESTS = 17
+
+TEST_NPROCS = @TEST_NPROCS@
+
+main:	$(CXX_OBJS) $(F_OBJS) $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) $(F_OBJS) \
+	$(LIBSAMRAI) $(LDLIBS) -o $@
+
+check:
+	$(MAKE) check2d
+	$(MAKE) check3d
+
+
+check2d:	main
+	@for i in test_inputs/*2d*.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+check3d:	main
+	@for i in test_inputs/*3d*.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+checkcompile: main
+
+checktest: checkcompile
+	rm -f makecheck.logfile
+	$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+	$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+		rm -f makecheck.logfile
+
+clean-check:
+	$(SAMCLEAN)
+
+clean:
+	$(SAMCLEAN)
+	$(RM) *.f *main* 
+	$(RM) -rf restart-*d*
+	$(RM) -r viz*
+
+
+include $(SRCDIR)/Makefile.depend
+
+FORTRAN       = $(SRCDIR)
+M4DIRS        = -DFORTDIR=$(FORTRAN) $(SAMRAI_M4_FLAGS)
+
+edgeops2d.o:	$(FORTRAN)/edgeops2d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/edgeops2d.m4 > edgeops2d.f
+	$(F77) $(FFLAGS) -c edgeops2d.f -o $@
+
+edgeops3d.o:	$(FORTRAN)/edgeops3d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/edgeops3d.m4 > edgeops3d.f
+	$(F77) $(FFLAGS) -c edgeops3d.f -o $@
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,33 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   README file for patch boundary sum tests.
+##
+#########################################################################
+
+The HierSumTest tests patch boundary node sum operations performed in the
+PatchBoundaryNodeSum and PatchBoundaryEdgeSum class.
+
+The test works as follows:
+
+  1) Initially, set all CELL values to 1.0, except on coarser
+     regions that are covered by finer regions where the cell
+     values are set to 0.0.
+
+  2) Set node values equal to the sum of the cell values it aligns
+     At this point, nodes on patch interiors will equal 2^NDIM because
+     thats how many cells border each node.  Nodes on patch boundaries
+     be less than this because they are not getting all cell contributions.
+
+  3) Do the nodal sum operation
+
+  4) Check that all node values that do not have a finer level overlaying
+     them are equal to 2^NDIM.  Those that do have a finer level overlapping
+     will be 0.0 on the interior of the patch.  So the final value should
+     be either 2^NDIM or 0.0 - there should be no cases where the node
+     will have an alternative value.
+
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/edgeops2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/edgeops2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,121 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/test/patchbdrysum/edgeops2d.m4 $
+c  Package:     SAMRAI test
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Release:     
+c  Revision:    
+c  Modified:    
+c  Description:    F77 routines for edge operations
+c
+define(NDIM,2)dnl
+define(SAMRAI_FORTDIR,../../patchdata/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+c
+c***********************************************************************
+c Set edge values from cell-centered values
+c***********************************************************************
+c
+      subroutine setedges2d(
+     &  ifirst0,ifirst1,
+     &  ilast0,ilast1,
+     &  ngcell0,ngcell1,
+     &  ngedge0,ngedge1,
+     &  cell,
+     &  edge0,
+     &  edge1)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  ngcell0,ngcell1,
+     &  ngedge0,ngedge1
+      double precision
+     &  cell(CELL2dVECG(ifirst,ilast,ngcell)),
+     &  edge0(EDGE2d0VECG(ifirst,ilast,ngedge)),
+     &  edge1(EDGE2d1VECG(ifirst,ilast,ngedge))
+      integer ic0,ic1
+c
+c***********************************************************************
+c
+c  edge0(ifirst0:ilast0,ifirst1:ilast1+1)
+c  --x---x--
+c  |   |   |
+c  --x---x--
+c  |   |   |
+c  --x---x--
+
+      do ic1=ifirst1,ilast1+1
+         do ic0=ifirst0,ilast0
+            edge0(ic0,ic1) = cell(ic0,ic1-1) + cell(ic0,ic1)
+         enddo
+      enddo
+
+c  edge1(ifirst0:ilast0+1,ifirst1:ilast1)
+c  ---------
+c  x   x   x
+c  ---------
+c  x   x   x
+c  ---------
+c
+      do ic1=ifirst1,ilast1
+         do ic0=ifirst0,ilast0+1
+            edge1(ic0,ic1) = cell(ic0-1,ic1) + cell(ic0,ic1)
+         enddo
+      enddo
+
+      return
+      end
+c
+
+c
+c***********************************************************************
+c Check edge values
+c***********************************************************************
+c
+      subroutine checkedges2d(
+     &  ifirst0,ifirst1,
+     &  ilast0,ilast1,
+     &  ngedge0,ngedge1,
+     &  correct_val,
+     &  all_correct,
+     &  edge0,
+     &  edge1)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  ngedge0,ngedge1
+      double precision correct_val
+      integer all_correct 
+      double precision
+     &  edge0(EDGE2d0VECG(ifirst,ilast,ngedge)),
+     &  edge1(EDGE2d1VECG(ifirst,ilast,ngedge))
+      integer ic0,ic1
+c
+c***********************************************************************
+c
+      do ic1=ifirst1,ilast1+1
+         do ic0=ifirst0,ilast0
+           if (edge0(ic0,ic1).ne.correct_val) then
+              print*, "(i,j): ",ic0,ic1,"   incorrect:",edge0(ic0,ic1),
+     &                "     correct:",correct_val
+              all_correct = 0
+           endif
+         enddo
+      enddo
+c
+      do ic1=ifirst1,ilast1
+         do ic0=ifirst0,ilast0+1
+           if (edge1(ic0,ic1).ne.correct_val) then
+              print*, "(i,j): ",ic0,ic1,"   incorrect:",edge1(ic0,ic1),
+     &                "     correct:",correct_val
+              all_correct = 0
+           endif
+         enddo
+      enddo
+c
+      return
+      end
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/edgeops3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/edgeops3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,153 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/test/patchbdrysum/edgeops3d.m4 $
+c  Package:     SAMRAI test
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Release:     
+c  Revision:    
+c  Modified:    
+c  Description:    F77 routines for edge operations
+c
+define(NDIM,3)dnl
+define(SAMRAI_FORTDIR,../../patchdata/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+c
+c***********************************************************************
+c Set edge values from cell-centered values
+c***********************************************************************
+c
+      subroutine setedges3d(
+     &  ifirst0,ifirst1,ifirst2,
+     &  ilast0,ilast1,ilast2,
+     &  ngcell0,ngcell1,ngcell2,
+     &  ngedge0,ngedge1,ngedge2,
+     &  cell,
+     &  edge0,
+     &  edge1,
+     &  edge2)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ifirst0,ifirst1,ifirst2,ilast0,ilast1,ilast2,
+     &  ngcell0,ngcell1,ngcell2,
+     &  ngedge0,ngedge1,ngedge2
+      double precision
+     &  cell(CELL3dVECG(ifirst,ilast,ngcell)),
+     &  edge0(EDGE3d0VECG(ifirst,ilast,ngedge)),
+     &  edge1(EDGE3d1VECG(ifirst,ilast,ngedge)),
+     &  edge2(EDGE3d2VECG(ifirst,ilast,ngedge))
+      integer ic0,ic1,ic2
+c
+c***********************************************************************
+c
+c  edge0(ifirst0:ilast0,ifirst1:ilast1+1,ifirst2:ilast2+1)
+
+
+      do ic2=ifirst2,ilast2+1
+         do ic1=ifirst1,ilast1+1
+            do ic0=ifirst0,ilast0
+               edge0(ic0,ic1,ic2) = 
+     &                 cell(ic0,ic1-1,ic2-1) + cell(ic0,ic1,ic2-1) +
+     &                 cell(ic0,ic1-1,ic2) + cell(ic0,ic1,ic2) 
+            enddo
+         enddo
+      enddo
+
+c  edge1(ifirst0:ilast0+1,ifirst1:ilast1,ifirst2:ilast2+1)
+c
+      do ic2=ifirst2,ilast2+1
+         do ic1=ifirst1,ilast1
+            do ic0=ifirst0,ilast0+1
+               edge1(ic0,ic1,ic2) = 
+     &                 cell(ic0-1,ic1,ic2-1) + cell(ic0,ic1,ic2-1) +
+     &                 cell(ic0-1,ic1,ic2) + cell(ic0,ic1,ic2) 
+            enddo
+         enddo
+      enddo
+
+c  edge2(ifirst0:ilast0+1,ifirst1:ilast1+1,ifirst2:ilast2)
+c
+      do ic2=ifirst2,ilast2
+         do ic1=ifirst1,ilast1+1
+            do ic0=ifirst0,ilast0+1
+               edge2(ic0,ic1,ic2) = 
+     &                 cell(ic0-1,ic1-1,ic2) + cell(ic0,ic1-1,ic2) +
+     &                 cell(ic0-1,ic1,ic2) + cell(ic0,ic1,ic2) 
+            enddo
+         enddo
+      enddo
+
+
+      return
+      end
+c
+
+c
+c***********************************************************************
+c Check edge values
+c***********************************************************************
+c
+      subroutine checkedges3d(
+     &  ifirst0,ifirst1,ifirst2,
+     &  ilast0,ilast1,ilast2,
+     &  ngedge0,ngedge1,ngedge2,
+     &  correct_val,
+     &  all_correct,
+     &  edge0,
+     &  edge1,
+     &  edge2)
+c***********************************************************************
+      implicit none
+c
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,ifirst2,ilast2,
+     &  ngedge0,ngedge1,ngedge2
+      double precision correct_val
+      integer all_correct 
+      double precision
+     &  edge0(EDGE3d0VECG(ifirst,ilast,ngedge)),
+     &  edge1(EDGE3d1VECG(ifirst,ilast,ngedge)),
+     &  edge2(EDGE3d2VECG(ifirst,ilast,ngedge))
+      integer ic0,ic1,ic2
+c
+c***********************************************************************
+c
+      do ic2=ifirst2,ilast2+1
+         do ic1=ifirst1,ilast1+1
+            do ic0=ifirst0,ilast0
+              if (edge0(ic0,ic1,ic2).ne.correct_val) then  
+                 print*, "(i,j,k): ",ic0,ic1,ic2,"   incorrect:",
+     &               edge0(ic0,ic1,ic2),"     correct:",correct_val
+                 all_correct = 0
+              endif    
+            enddo
+         enddo
+      enddo
+
+      do ic2=ifirst2,ilast2+1
+         do ic1=ifirst1,ilast1
+            do ic0=ifirst0,ilast0+1
+              if (edge1(ic0,ic1,ic2).ne.correct_val) then  
+                 print*, "(i,j,k): ",ic0,ic1,ic2,"   incorrect:",
+     &               edge1(ic0,ic1,ic2),"     correct:",correct_val
+                 all_correct = 0
+              endif    
+            enddo
+         enddo
+      enddo
+
+      do ic2=ifirst2,ilast2
+         do ic1=ifirst1,ilast1+1
+            do ic0=ifirst0,ilast0+1
+              if (edge2(ic0,ic1,ic2).ne.correct_val) then  
+                 print*, "(i,j,k): ",ic0,ic1,ic2,"   incorrect:",
+     &               edge2(ic0,ic1,ic2),"     correct:",correct_val
+                 all_correct = 0
+              endif    
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/example_inputs/1lev_edge.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/example_inputs/1lev_edge.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI patch boundary sum test 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 2
+
+   do_node_sum              = FALSE
+   do_edge_sum              = TRUE 
+
+   nsteps                   = 1
+
+   log_file_name            = "1lev-2d-edge.log"
+   visit_dump_dirname       = "viz_1lev-2d-edge"
+
+}
+
+HierSumTest {
+
+   node_ghosts              = 0 , 0
+   edge_ghosts              = 0 , 0
+
+   check_data_before_communication = FALSE
+
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0) , (2,2) ]   
+   x_lo          = 0.0e0 , 0.0e0  // lower end of computational domain.
+   x_up          = 1.0e0 , 1.0e0  // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 1 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 
+      level_2               = 2 , 2 
+      level_3               = 2 , 2 
+   }
+
+   largest_patch_size {
+      level_0 = 3 , 3 
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (2,2) , (4,4) ] 
+   }
+}
+
+LoadBalancer {  // for SAMRAI v1.3.2
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/example_inputs/1lev_edge.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/example_inputs/1lev_edge.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI patch boundary sum test 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 3
+
+   do_node_sum              = FALSE
+   do_edge_sum              = TRUE 
+
+   nsteps                   = 1
+
+   log_file_name            = "1lev-3d-edge.log"
+   visit_dump_dirname       = "viz_1lev-3d-edge"
+}
+
+HierSumTest {
+
+   node_ghosts              = 0 , 0 , 0
+   edge_ghosts              = 0 , 0 , 0
+
+   check_data_before_communication = FALSE
+
+}
+
+CartesianGeometry {
+//   domain_boxes  = [ (0,0,0) , (9,9,9) ]   
+   domain_boxes  = [ (0,0,0) , (4,4,4) ]   
+   x_lo          = 0.0e0 , 0.0e0 , 0.0e0 // lower end of computational domain.
+   x_up          = 1.0e0 , 1.0e0 , 1.0e0 // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 1 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 , 2
+      level_2               = 2 , 2 , 2
+      level_3               = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 3 , 3 , 3
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 , 1
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (1,1,1) , (3,3,3) ]
+//      level_0  = [ (1,2,2) , (4,4,4) ],
+//                 [ (5,3,5) , (7,6,7) ]
+   }
+}
+
+LoadBalancer {  // for SAMRAI v1.3.2
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/example_inputs/2lev_edge.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/example_inputs/2lev_edge.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI patch boundary sum test 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 3
+
+   do_node_sum              = FALSE
+   do_edge_sum              = TRUE 
+
+   nsteps                   = 1
+
+   log_file_name            = "2lev-3d-edge.log"
+   visit_dump_dirname       = "viz_2lev-3d-edge"
+}
+
+HierSumTest {
+
+   node_ghosts              = 0 , 0 , 0
+   edge_ghosts              = 0 , 0 , 0
+
+   check_data_before_communication = FALSE
+
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (9,8,7) ]
+   x_lo          = 0.0e0 , 0.0e0 , 0.0e0 // lower end of computational domain.
+   x_up          = 1.0e0 , 1.0e0 , 1.0e0 // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 , 2
+      level_2               = 2 , 2 , 2
+      level_3               = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 5, 4, 4
+      level_1 = 4, 6, 8
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 , 1
+      // all finer levels will use same values as level_0...
+   }
+} 
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+} 
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (2,2,2) , (7,6,5) ]
+   }
+}
+
+LoadBalancer {  // for SAMRAI v1.3.2 and later
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/example_inputs/2lev_node.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/example_inputs/2lev_node.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI patch boundary sum test 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 3
+
+   do_node_sum              = TRUE 
+   do_edge_sum              = FALSE
+
+   nsteps                   = 1
+
+   log_file_name            = "2lev-3d-node.log"
+   visit_dump_dirname       = "viz_2lev-3d-node"
+}
+
+HierSumTest {
+
+   node_ghosts              = 0 , 0 , 0
+   edge_ghosts              = 0 , 0 , 0
+
+   check_data_before_communication = FALSE
+
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (11,10,9) ]
+   x_lo          = 0.0e0 , 0.0e0 , 0.0e0 // lower end of computational domain.
+   x_up          = 1.0e0 , 1.0e0 , 1.0e0 // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 , 2
+      level_2               = 2 , 2 , 2
+      level_3               = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 5, 4, 4
+      level_1 = 4, 6, 8
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 , 1
+      // all finer levels will use same values as level_0...
+   }
+} 
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+} 
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (1,1,1) , (4,5,4) ],
+                 [ (5,4,3) , (8,8,7) ]
+   }
+}
+
+LoadBalancer {  // for SAMRAI v1.3.2 and later
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/example_inputs/2lev_node_aligned_bdry.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/example_inputs/2lev_node_aligned_bdry.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI patch boundary sum test 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 2
+
+   do_node_sum              = TRUE
+   do_edge_sum              = TRUE 
+
+   nsteps                   = 1
+
+   log_file_name            = "2lev-2d-node-aligned-bdry.log"
+   visit_dump_dirname       = "viz_2lev-2d-node-aligned-bdry"
+}
+
+HierSumTest {
+
+   node_ghosts              = 0 , 0
+   edge_ghosts              = 0 , 0
+
+   check_data_before_communication = FALSE
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0) , (19,19) ]   
+//   domain_boxes  = [ (0,0) , (4,4) ]   
+   x_lo          = 0.0e0 , 0.0e0  // lower end of computational domain.
+   x_up          = 1.0e0 , 1.0e0  // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 
+      level_2               = 2 , 2 
+      level_3               = 2 , 2 
+   }
+
+   largest_patch_size {
+      level_0 = 8 , 8 
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+//      level_0  = [ (0,0) , (2,2) ]
+      level_0  = [ (0,0) , (7,7) ],
+                 [ (8,4) , (15,13) ]
+   }
+}
+
+LoadBalancer {  // for SAMRAI v1.3.2
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/example_inputs/2lev_node_aligned_bdry.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/example_inputs/2lev_node_aligned_bdry.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI patch boundary sum test 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 3
+
+   do_node_sum              = TRUE 
+   do_edge_sum              = FALSE
+
+   nsteps                   = 1
+
+   log_file_name            = "2lev-3d-node-aligned-bdry.log"
+   visit_dump_dirname       = "viz_2lev-3d-node-aligned-bdry"
+}
+
+HierSumTest {
+
+   node_ghosts              = 0 , 0 , 0
+   edge_ghosts              = 0 , 0 , 0
+
+   check_data_before_communication = FALSE
+
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (9,7,7) ]
+   x_lo          = 0.0e0 , 0.0e0 , 0.0e0 // lower end of computational domain.
+   x_up          = 1.0e0 , 1.0e0 , 1.0e0 // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 , 2
+      level_2               = 2 , 2 , 2
+      level_3               = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 5, 4, 4
+      level_1 = 4, 6, 8
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 , 1
+      // all finer levels will use same values as level_0...
+   }
+} 
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+} 
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (0,0,0) , (4,5,4) ],
+                 [ (5,4,2) , (8,6,5) ]
+   }
+}
+
+LoadBalancer {  // for SAMRAI v1.3.2 and later
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/example_inputs/2lev_node_edge.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/example_inputs/2lev_node_edge.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI patch boundary sum test 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 2
+
+   do_node_sum              = TRUE
+   do_edge_sum              = TRUE
+
+   nsteps                   = 1
+
+   log_file_name            = "2lev-2d-node-edge.log"
+   visit_dump_dirname       = "viz_2lev-2d-node-edge"
+}
+
+HierSumTest {
+
+   node_ghosts              = 0 , 0
+   edge_ghosts              = 0 , 0
+
+   check_data_before_communication = FALSE
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0) , (9,7) ]   
+   x_lo          = 0.0e0 , 0.0e0  // lower end of computational domain.
+   x_up          = 1.0e0 , 1.0e0  // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 
+      level_2               = 2 , 2 
+      level_3               = 2 , 2 
+   }
+
+   largest_patch_size {
+      level_0 = 5 , 4
+      level_1 = 4 , 6
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (1,1) , (4,5) ],
+                 [ (5,4) , (8,6) ]
+   }
+}
+
+LoadBalancer {  // for SAMRAI v1.3.2
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/main.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/main.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,442 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program for test of hierarchy sum 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+// Headers for basic SAMRAI objects
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/InputDatabase.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/appu/VisItDataWriter.h"
+
+// Headers for major algorithm/data structure objects
+#include "SAMRAI/mesh/BergerRigoutsos.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/mesh/GriddingAlgorithm.h"
+#include "SAMRAI/mesh/StandardTagAndInitialize.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/mesh/TreeLoadBalancer.h"
+
+// Header for application-specific algorithm/data structure object
+#include "HierSumTest.h"
+
+using namespace SAMRAI;
+using namespace tbox;
+using namespace hier;
+using namespace geom;
+using namespace mesh;
+
+/**
+ * This is the main program for an example case that tests SAMRAI
+ * hierarchy sum classes for FE-type operations with node data,
+ * and level edge sum operations with edge data.
+ *
+ * The main program constructs the various SAMRAI gridding objects
+ * and performs the time-stepping loop.  The program should be
+ * executed as:
+ *
+ *    executable <input file name>
+ */
+
+int main(
+   int argc,
+   char* argv[])
+{
+
+   int fail_count = 0;
+
+   /*
+    * Initialize MPI, SAMRAI, and enable logging.
+    */
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   SAMRAIManager::initialize();
+   SAMRAIManager::startup();
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+
+      string input_filename;
+
+      if (argc != 2) {
+         tbox::pout << "USAGE:  " << argv[0] << " <input filename> "
+                                             << "[options]\n" << endl;
+         tbox::SAMRAI_MPI::abort();
+         return -1;
+      } else {
+         input_filename = argv[1];
+      }
+
+      tbox::plog << "input_filename = " << input_filename << endl;
+
+      /****************************************************************
+      *                                                              *
+      *  PROBLEM SETUP                                               *
+      *                                                              *
+      ****************************************************************
+      *                                                              *
+      *  Read data from input file and initialize SAMRAI classes     *
+      *                                                              *
+      ****************************************************************/
+
+      /*
+       * Create input database and parse all data in input file.
+       */
+
+      Pointer<Database> input_db(new tbox::InputDatabase("input_db"));
+      InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      /*
+       * Retrieve "Main" section of the input database.
+       */
+
+      Pointer<Database> main_db = input_db->getDatabase("Main");
+
+      const tbox::Dimension dim(static_cast<unsigned short>(main_db->getInteger("dim")));
+
+      /*
+       * Determine if we are doing node sum tests, edge sum tests,
+       * or both.
+       */
+      bool do_node_sum = false;
+      if (main_db->keyExists("do_node_sum")) {
+         do_node_sum = main_db->getBool("do_node_sum");
+      }
+      bool do_edge_sum = false;
+      if (main_db->keyExists("do_edge_sum")) {
+         do_edge_sum = main_db->getBool("do_edge_sum");
+      }
+
+      int nsteps = 1;
+      if (main_db->keyExists("nsteps")) {
+         nsteps = main_db->getInteger("nsteps");
+      }
+
+      string log_file_name = "hiersumtest.log";
+      if (main_db->keyExists("log_file_name")) {
+         log_file_name = main_db->getString("log_file_name");
+      }
+      bool log_all_nodes = false;
+      if (main_db->keyExists("log_all_nodes")) {
+         log_all_nodes = main_db->getBool("log_all_nodes");
+      }
+      if (log_all_nodes) {
+         PIO::logAllNodes(log_file_name);
+      } else {
+         PIO::logOnlyNodeZero(log_file_name);
+      }
+
+      string visit_dump_dirname = "visit_data";
+      int visit_number_procs_per_file = 1;
+
+      int visit_dump_interval =
+         main_db->getIntegerWithDefault("visit_dump_interval", 0);
+
+      if (visit_dump_interval > 0) {
+         if (main_db->keyExists("visit_dump_dirname")) {
+            visit_dump_dirname = main_db->getString("visit_dump_dirname");
+         }
+         if (main_db->keyExists("visit_number_procs_per_file")) {
+            visit_number_procs_per_file =
+               main_db->getInteger("visit_number_procs_per_file");
+         }
+      }
+
+      /*
+       * The grid geometry defines the grid type (e.g. cartesian, spherical,
+       * etc.).  Because SAMRAI operates on block structured indices, it can
+       * support any grid geometry that may be represented as an orthogonal
+       * grid.
+       */
+      Pointer<CartesianGridGeometry> grid_geometry(
+         new CartesianGridGeometry(dim,
+            "CartesianGeometry",
+            input_db->getDatabase("CartesianGeometry")));
+
+      /*
+       * The patch hierarchy defines the adaptive grid system.
+       */
+      Pointer<PatchHierarchy> patch_hierarchy(
+         new PatchHierarchy("PatchHierarchy", grid_geometry,
+            input_db->getDatabase("PatchHierarchy")));
+
+#ifdef HAVE_HDF5
+      /*
+       * Set up Visualization writer.
+       */
+      Pointer<appu::VisItDataWriter> visit_data_writer;
+      if (visit_dump_interval > 0) {
+         visit_data_writer = new appu::VisItDataWriter(
+               dim,
+               "HierSumTest VisIt Writer",
+               visit_dump_dirname,
+               visit_number_procs_per_file);
+      }
+#endif
+
+      /*
+       * This is our problem class.  See the class header for comments on it.
+       */
+      HierSumTest* hier_sum_test = new HierSumTest(
+            "HierSumTest",
+            dim,
+            input_db->getDatabase("HierSumTest")
+#ifdef HAVE_HDF5
+            , visit_data_writer
+#endif
+            );
+
+      /*
+       * The StandardTagAndInitialize class performs a variety of operations
+       * with user-specified parameters related to adptive gridding.  For example,
+       * it manages initialization of a level, cell tagging using a gradient
+       * detector, and methods to reset data after the hierarchy has been
+       * regridded.
+       */
+      Pointer<StandardTagAndInitialize> tag_and_init_ops(
+         new StandardTagAndInitialize(
+            dim,
+            "StandardTagAndInitialize",
+            hier_sum_test,
+            input_db->getDatabase("StandardTagAndInitialize")));
+
+      /*
+       * The gridding algorithm manages adaptive gridding.  It expects a
+       * clustering scheme (i.e. how to cluster tagged-cells into patches),
+       * and a load balance scheme to distribute work to processors.  In general
+       * the baseline classes provided in SAMRAI should suffice for most
+       * problems. It also requires a class that defines the particular tag
+       * and initialization ops that correlate with the users problem.  For
+       * this, we use the "tag_and_init_ops" above, which references our
+       * "wave_eqn_model" problem class to define the user-specific operations.
+       */
+      Pointer<BergerRigoutsos> box_generator(
+         new BergerRigoutsos(dim));
+
+      Pointer<TreeLoadBalancer> load_balancer(
+         new TreeLoadBalancer(dim,
+            "LoadBalancer",
+            input_db->getDatabase("LoadBalancer")));
+      load_balancer->setSAMRAI_MPI(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+      Pointer<GriddingAlgorithm> gridding_algorithm(
+         new GriddingAlgorithm(
+            patch_hierarchy,
+            "GriddingAlgorithm",
+            input_db->getDatabase("GriddingAlgorithm"),
+            tag_and_init_ops,
+            box_generator,
+            load_balancer));
+
+      /*
+       * After creating all objects and initializing their state, we
+       * print the input database and variable database contents to
+       * the log file.
+       */
+
+      tbox::plog << "\nCheck input data and variables before simulation:"
+                 << endl;
+      tbox::plog << "Input database..." << endl;
+      input_db->printClassData(plog);
+      tbox::plog << "\nVariable database..." << endl;
+      VariableDatabase::getDatabase()->printClassData(plog);
+
+      /****************************************************************
+      *                                                              *
+      *  INITIALIZE DATA ON PATCHES                                  *
+      *                                                              *
+      ****************************************************************
+      *                                                              *
+      *  Build patch hierarchy and initialize the data on the patches*
+      *  in the hierarchy.
+      *  1) Create a "tag_buffer" for each level in the Hierarchy.   *
+      *  2) Create the coarse (i.e. level 0) grid.                   *
+      *  3) Cycle through levels 1-max_levels, initializing data     *
+      *     on each.  The makeFinerLevel method calls the error      *
+      *     estimator (remember, it was registered with the          *
+      *     gridding algorithm object) and tags cells for refinement *
+      *     as it generates patches on the finer levels.             *
+      *                                                              *
+      ****************************************************************/
+
+      double loop_time = 0.;
+      tbox::Array<int> tag_buffer_array(patch_hierarchy->getMaxNumberOfLevels());
+      for (int il = 0; il < patch_hierarchy->getMaxNumberOfLevels(); il++) {
+         tag_buffer_array[il] = 1;
+      }
+      gridding_algorithm->makeCoarsestLevel(loop_time);
+
+      bool done = false;
+      bool initial_time = true;
+      for (int ln = 0;
+           patch_hierarchy->levelCanBeRefined(ln) && !done;
+           ln++) {
+         gridding_algorithm->makeFinerLevel(
+            loop_time,
+            initial_time,
+            tag_buffer_array[ln]);
+         done = !(patch_hierarchy->finerLevelExists(ln));
+      }
+
+      tbox::plog
+      << "************************************************************\n";
+      tbox::plog
+      << "************************* Hierarchy ************************\n";
+      tbox::plog
+      << "************************************************************\n";
+      patch_hierarchy->recursivePrint(tbox::plog, "", 3);
+      tbox::plog << "\n\n";
+
+      int nlevels = patch_hierarchy->getNumberOfLevels();
+
+      for (int pln = 0; pln <= patch_hierarchy->getFinestLevelNumber();
+           pln++) {
+         Pointer<PatchLevel> level = patch_hierarchy->getPatchLevel(pln);
+
+         tbox::plog << "\n PRINTING PATCHES ON LEVEL " << pln << endl;
+
+         for (PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::plog << "patch # " << ip->getLocalId() << " : "
+                       << level->getPatch(ip->getLocalId())->getBox() << endl;
+         }
+      }
+      tbox::plog << endl;
+
+      /*******************************************************************
+       *                                                                 *
+       * Test hier sum operation                                         *
+       *                                                                 *
+       *******************************************************************
+       *                                                                 *
+       *  1) Set node values (initial)                                   *
+       *  2) Do hierarchy sum operation                                  *
+       *  3) Check result                                                *
+       *                                                                 *
+       ******************************************************************/
+
+      /*
+       * Setup the sum operation(s)
+       */
+      if (do_node_sum) {
+         hier_sum_test->setupOuternodeSum(patch_hierarchy);
+      }
+      if (do_edge_sum) {
+         for (int ln = 0; ln < nlevels; ln++) {
+            hier_sum_test->setupOuteredgeSum(patch_hierarchy,
+               ln);
+         }
+      }
+
+      for (int i = 0; i < nsteps; i++) {
+
+         /*
+          * In the process of constructing the hierarchy, we set cell values
+          * to their proper weights.  Now go in and set the node/edge values.
+          * (write data to VisIt once it is set).
+          */
+         if (do_node_sum) {
+            fail_count += hier_sum_test->setInitialNodeValues(patch_hierarchy);
+         }
+         if (do_edge_sum) {
+            for (int ln = 0; ln < nlevels; ln++) {
+               Pointer<PatchLevel> level = patch_hierarchy->getPatchLevel(ln);
+               fail_count += hier_sum_test->setInitialEdgeValues(level);
+            }
+         }
+
+#ifdef HAVE_HDF5
+         /*
+          * Write the pre-summed cell/node data to VisIt
+          */
+         if ((visit_dump_interval > 0) &&
+             ((i % visit_dump_interval) == 0)) {
+            visit_data_writer->writePlotData(patch_hierarchy, i, loop_time);
+         }
+#endif
+
+         /*
+          * Perform the sum operation(s)
+          */
+         if (do_node_sum) {
+            hier_sum_test->doOuternodeSum();
+         }
+         if (do_edge_sum) {
+            for (int ln = 0; ln < nlevels; ln++) {
+               hier_sum_test->doOuteredgeSum(ln);
+            }
+         }
+      }
+
+      /*
+       * Check result
+       */
+      if (do_node_sum) {
+         fail_count += hier_sum_test->checkNodeResult(patch_hierarchy);
+      }
+
+      tbox::pout << "\n" << endl;
+
+      if (do_edge_sum) {
+         for (int ln = 0; ln < nlevels; ln++) {
+            Pointer<PatchLevel> level = patch_hierarchy->getPatchLevel(ln);
+            fail_count += hier_sum_test->checkEdgeResult(level);
+         }
+      }
+
+#ifdef HAVE_HDF5
+      /*
+       * Write the post-summed cell/node data to VisIt
+       */
+      if (visit_dump_interval > 0) {
+         visit_data_writer->writePlotData(patch_hierarchy,
+            nsteps + 1,
+            loop_time);
+      }
+#endif
+
+      /*
+       * At conclusion of simulation, deallocate objects.
+       */
+#ifdef HAVE_HDF5
+      visit_data_writer.setNull();
+#endif
+      gridding_algorithm.setNull();
+      load_balancer.setNull();
+      box_generator.setNull();
+      tag_and_init_ops.setNull();
+
+      if (hier_sum_test) delete hier_sum_test;
+
+      patch_hierarchy.setNull();
+      grid_geometry.setNull();
+
+      input_db.setNull();
+      main_db.setNull();
+
+      if (fail_count == 0) {
+         tbox::pout << "\nPASSED:  patchbdrysum" << endl;
+      }
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return fail_count;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/test_inputs/1lev_edge.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/test_inputs/1lev_edge.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI patch boundary sum test 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 2
+
+   do_node_sum              = FALSE
+   do_edge_sum              = TRUE 
+
+   nsteps                   = 1
+
+   log_file_name            = "1lev-2d-edge.log"
+   visit_dump_dirname       = "viz_1lev-2d-edge"
+
+   
+}
+
+HierSumTest {
+
+   node_ghosts              = 0 , 0
+   edge_ghosts              = 0 , 0
+
+   check_data_before_communication = FALSE
+
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0) , (2,2) ]   
+   x_lo          = 0.0e0 , 0.0e0  // lower end of computational domain.
+   x_up          = 1.0e0 , 1.0e0  // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 1 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 
+      level_2               = 2 , 2 
+      level_3               = 2 , 2 
+   }
+
+   largest_patch_size {
+      level_0 = 3 , 3 
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (2,2) , (4,4) ] 
+   }
+}
+
+LoadBalancer {  // for SAMRAI v1.3.2
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/test_inputs/1lev_edge.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/test_inputs/1lev_edge.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,85 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI patch boundary sum test 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 3
+
+   do_node_sum              = FALSE
+   do_edge_sum              = TRUE 
+
+   nsteps                   = 1
+
+   log_file_name            = "1lev-3d-edge.log"
+   visit_dump_dirname       = "viz_1lev-3d-edge"
+}
+
+HierSumTest {
+
+   node_ghosts              = 0 , 0 , 0
+   edge_ghosts              = 0 , 0 , 0
+
+   check_data_before_communication = FALSE
+
+}
+
+CartesianGeometry {
+//   domain_boxes  = [ (0,0,0) , (9,9,9) ]   
+   domain_boxes  = [ (0,0,0) , (4,4,4) ]   
+   x_lo          = 0.0e0 , 0.0e0 , 0.0e0 // lower end of computational domain.
+   x_up          = 1.0e0 , 1.0e0 , 1.0e0 // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 1 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 , 2
+      level_2               = 2 , 2 , 2
+      level_3               = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 3 , 3 , 3
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 , 1
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (1,1,1) , (3,3,3) ]
+//      level_0  = [ (1,2,2) , (4,4,4) ],
+//                 [ (5,3,5) , (7,6,7) ]
+   }
+}
+
+LoadBalancer {  // for SAMRAI v1.3.2
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/test_inputs/2lev_edge.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/test_inputs/2lev_edge.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI patch boundary sum test 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 3
+
+   do_node_sum              = FALSE
+   do_edge_sum              = TRUE 
+
+   nsteps                   = 1
+
+   log_file_name            = "2lev-3d-edge.log"
+   visit_dump_dirname       = "viz_2lev-3d-edge"
+}
+
+HierSumTest {
+
+   node_ghosts              = 0 , 0 , 0
+   edge_ghosts              = 0 , 0 , 0
+
+   check_data_before_communication = FALSE
+
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (9,8,7) ]
+   x_lo          = 0.0e0 , 0.0e0 , 0.0e0 // lower end of computational domain.
+   x_up          = 1.0e0 , 1.0e0 , 1.0e0 // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 , 2
+      level_2               = 2 , 2 , 2
+      level_3               = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 5, 4, 4
+      level_1 = 4, 6, 8
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 , 1
+      // all finer levels will use same values as level_0...
+   }
+} 
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+} 
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (2,2,2) , (7,6,5) ]
+   }
+}
+
+LoadBalancer {  // for SAMRAI v1.3.2 and later
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/test_inputs/2lev_node.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/test_inputs/2lev_node.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI patch boundary sum test 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 3
+
+   do_node_sum              = TRUE 
+   do_edge_sum              = FALSE
+
+   nsteps                   = 1
+
+   log_file_name            = "2lev-3d-node.log"
+   visit_dump_dirname       = "viz_2lev-3d-node"
+}
+
+HierSumTest {
+
+   node_ghosts              = 0 , 0 , 0
+   edge_ghosts              = 0 , 0 , 0
+
+   check_data_before_communication = FALSE
+
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (11,10,9) ]
+   x_lo          = 0.0e0 , 0.0e0 , 0.0e0 // lower end of computational domain.
+   x_up          = 1.0e0 , 1.0e0 , 1.0e0 // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 , 2
+      level_2               = 2 , 2 , 2
+      level_3               = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 5, 4, 4
+      level_1 = 4, 6, 8
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 , 1
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+} 
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (1,1,1) , (4,5,4) ],
+                 [ (5,4,3) , (8,8,7) ]
+   }
+}
+
+LoadBalancer {  // for SAMRAI v1.3.2 and later
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/test_inputs/2lev_node_aligned_bdry.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/test_inputs/2lev_node_aligned_bdry.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI patch boundary sum test 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 2
+
+   do_node_sum              = TRUE
+   do_edge_sum              = TRUE 
+
+   nsteps                   = 1
+
+   log_file_name            = "2lev-2d-node-aligned-bdry.log"
+   visit_dump_dirname       = "viz_2lev-2d-node-aligned-bdry"
+}
+
+HierSumTest {
+
+   node_ghosts              = 0 , 0
+   edge_ghosts              = 0 , 0
+
+   check_data_before_communication = FALSE
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0) , (19,19) ]   
+//   domain_boxes  = [ (0,0) , (4,4) ]   
+   x_lo          = 0.0e0 , 0.0e0  // lower end of computational domain.
+   x_up          = 1.0e0 , 1.0e0  // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 
+      level_2               = 2 , 2 
+      level_3               = 2 , 2 
+   }
+
+   largest_patch_size {
+      level_0 = 8 , 8 
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+//      level_0  = [ (0,0) , (2,2) ]
+      level_0  = [ (0,0) , (7,7) ],
+                 [ (8,4) , (15,13) ]
+   }
+}
+
+LoadBalancer {  // for SAMRAI v1.3.2
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/test_inputs/2lev_node_aligned_bdry.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/test_inputs/2lev_node_aligned_bdry.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI patch boundary sum test 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 3
+
+   do_node_sum              = TRUE 
+   do_edge_sum              = FALSE
+
+   nsteps                   = 1
+
+   log_file_name            = "2lev-3d-node-aligned-bdry.log"
+   visit_dump_dirname       = "viz_2lev-3d-node-aligned-bdry"
+}
+
+HierSumTest {
+
+   node_ghosts              = 0 , 0 , 0
+   edge_ghosts              = 0 , 0 , 0
+
+   check_data_before_communication = FALSE
+
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (9,7,7) ]
+   x_lo          = 0.0e0 , 0.0e0 , 0.0e0 // lower end of computational domain.
+   x_up          = 1.0e0 , 1.0e0 , 1.0e0 // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 , 2
+      level_2               = 2 , 2 , 2
+      level_3               = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 5, 4, 4
+      level_1 = 4, 6, 8
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 , 1
+      // all finer levels will use same values as level_0...
+   }
+} 
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+} 
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (0,0,0) , (4,5,4) ],
+                 [ (5,4,2) , (8,6,5) ]
+   }
+}
+
+LoadBalancer {  // for SAMRAI v1.3.2 and later
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/test_inputs/2lev_node_edge.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/test_inputs/2lev_node_edge.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI patch boundary sum test 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 2
+
+   do_node_sum              = TRUE
+   do_edge_sum              = TRUE
+
+   nsteps                   = 1
+
+   log_file_name            = "2lev-2d-node-edge.log"
+   visit_dump_dirname       = "viz_2lev-2d-node-edge"
+}
+
+HierSumTest {
+
+   node_ghosts              = 0 , 0
+   edge_ghosts              = 0 , 0
+
+   check_data_before_communication = FALSE
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0) , (9,7) ]   
+   x_lo          = 0.0e0 , 0.0e0  // lower end of computational domain.
+   x_up          = 1.0e0 , 1.0e0  // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 
+      level_2               = 2 , 2 
+      level_3               = 2 , 2 
+   }
+
+   largest_patch_size {
+      level_0 = 5 , 4
+      level_1 = 4 , 6
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (1,1) , (4,5) ],
+                 [ (5,4) , (8,6) ]
+   }
+}
+
+LoadBalancer {  // for SAMRAI v1.3.2
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/test_inputs/2lev_node_edge_perx.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/test_inputs/2lev_node_edge_perx.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI patch boundary sum test 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 2
+
+   do_node_sum              = TRUE
+   do_edge_sum              = TRUE
+
+   nsteps                   = 1
+
+   log_file_name            = "2lev-2d-node-edge-perx.log"
+   visit_dump_dirname       = "viz_2lev-2d-node-edge-perx"
+}
+
+HierSumTest {
+
+   node_ghosts              = 0 , 0
+   edge_ghosts              = 0 , 0
+
+   check_data_before_communication = FALSE
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0) , (39,49) ]   
+   x_lo          = 0.0e0 , 0.0e0  // lower end of computational domain.
+   x_up          = 1.0e0 , 1.0e0  // upper end of computational domain.
+
+   periodic_dimension = 1, 0
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 
+      level_2               = 2 , 2 
+      level_3               = 2 , 2 
+   }
+
+   largest_patch_size {
+      level_0 = 5 , 4
+      level_1 = 4 , 6
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (1,1) , (4,5) ],
+                 [ (5,4) , (8,6) ]
+   }
+}
+
+LoadBalancer {  // for SAMRAI v1.3.2
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/test_inputs/2lev_node_edge_perx.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/test_inputs/2lev_node_edge_perx.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI patch boundary sum test 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 3
+
+   do_node_sum              = TRUE 
+   do_edge_sum              = TRUE 
+
+   nsteps                   = 1
+
+   log_file_name            = "2lev-3d-node-edge-perx.log"
+   visit_dump_dirname       = "viz_2lev-3d-node-edge-perx"
+}
+
+HierSumTest {
+
+   node_ghosts              = 0 , 0 , 0
+   edge_ghosts              = 0 , 0 , 0
+
+   check_data_before_communication = FALSE
+
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (9,8,7) ]
+   x_lo          = 0.0e0 , 0.0e0 , 0.0e0 // lower end of computational domain.
+   x_up          = 1.0e0 , 1.0e0 , 1.0e0 // upper end of computational domain.
+
+   periodic_dimension = 1 , 0 , 0
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 , 2
+      level_2               = 2 , 2 , 2
+      level_3               = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 5, 4, 4
+      level_1 = 4, 6, 8
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 , 1
+      // all finer levels will use same values as level_0...
+   }
+} 
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+} 
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (0,0,0) , (9,8,7) ]
+   }
+}
+
+LoadBalancer {  // for SAMRAI v1.3.2 and later
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/test_inputs/2lev_node_edge_perxy.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/test_inputs/2lev_node_edge_perxy.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI patch boundary sum test 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 2
+
+   do_node_sum              = TRUE
+   do_edge_sum              = TRUE
+
+   nsteps                   = 1
+
+   log_file_name            = "2lev-2d-node-edge-perxy.log"
+   visit_dump_dirname       = "viz_2lev-2d-node-edge-perxy"
+}
+
+HierSumTest {
+
+   node_ghosts              = 0 , 0
+   edge_ghosts              = 0 , 0
+
+   check_data_before_communication = FALSE
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0) , (39,49) ]   
+   x_lo          = 0.0e0 , 0.0e0  // lower end of computational domain.
+   x_up          = 1.0e0 , 1.0e0  // upper end of computational domain.
+
+   periodic_dimension = 1, 1
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 
+      level_2               = 2 , 2 
+      level_3               = 2 , 2 
+   }
+
+   largest_patch_size {
+      level_0 = 5 , 4
+      level_1 = 4 , 6
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (1,1) , (4,5) ],
+                 [ (5,4) , (8,6) ]
+   }
+}
+
+LoadBalancer {  // for SAMRAI v1.3.2
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/test_inputs/2lev_node_edge_perxy.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/test_inputs/2lev_node_edge_perxy.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI patch boundary sum test 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 3
+
+   do_node_sum              = TRUE 
+   do_edge_sum              = TRUE 
+
+   nsteps                   = 1
+
+   log_file_name            = "2lev-3d-node-edge-perxy.log"
+   visit_dump_dirname       = "viz_2lev-3d-node-edge-perxy"
+}
+
+HierSumTest {
+
+   node_ghosts              = 0 , 0 , 0
+   edge_ghosts              = 0 , 0 , 0
+
+   check_data_before_communication = FALSE
+
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (9,8,7) ]
+   x_lo          = 0.0e0 , 0.0e0 , 0.0e0 // lower end of computational domain.
+   x_up          = 1.0e0 , 1.0e0 , 1.0e0 // upper end of computational domain.
+
+   periodic_dimension = 1 , 1 , 0
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 , 2
+      level_2               = 2 , 2 , 2
+      level_3               = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 5, 4, 4
+      level_1 = 4, 6, 8
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 , 1
+      // all finer levels will use same values as level_0...
+   }
+} 
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+} 
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (0,0,0) , (9,8,7) ]
+   }
+}
+
+LoadBalancer {  // for SAMRAI v1.3.2 and later
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/test_inputs/2lev_node_edge_perxyz.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/test_inputs/2lev_node_edge_perxyz.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI patch boundary sum test 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 3
+
+   do_node_sum              = TRUE 
+   do_edge_sum              = TRUE 
+
+   nsteps                   = 1
+
+   log_file_name            = "2lev-3d-node-edge-perxyz.log"
+   visit_dump_dirname       = "viz_2lev-3d-node-edge-perxyz"
+}
+
+HierSumTest {
+
+   node_ghosts              = 0 , 0 , 0
+   edge_ghosts              = 0 , 0 , 0
+
+   check_data_before_communication = FALSE
+
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (9,8,7) ]
+   x_lo          = 0.0e0 , 0.0e0 , 0.0e0 // lower end of computational domain.
+   x_up          = 1.0e0 , 1.0e0 , 1.0e0 // upper end of computational domain.
+
+   periodic_dimension = 1 , 1 , 1
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 , 2
+      level_2               = 2 , 2 , 2
+      level_3               = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 5, 4, 4
+      level_1 = 4, 6, 8
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 , 1
+      // all finer levels will use same values as level_0...
+   }
+} 
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+} 
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (0,0,0) , (9,8,7) ]
+   }
+}
+
+LoadBalancer {  // for SAMRAI v1.3.2 and later
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/test_inputs/2lev_node_edge_perxz.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/test_inputs/2lev_node_edge_perxz.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,85 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI patch boundary sum test 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 3
+
+   do_node_sum              = TRUE 
+   do_edge_sum              = TRUE 
+
+   nsteps                   = 1
+
+   log_file_name            = "2lev-3d-node-edge-perxz.log"
+   visit_dump_dirname       = "viz_2lev-3d-node-edge-perxz"
+}
+
+HierSumTest {
+
+   node_ghosts              = 0 , 0 , 0
+   edge_ghosts              = 0 , 0 , 0
+
+   check_data_before_communication = FALSE
+
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (9,8,7) ]
+   x_lo          = 0.0e0 , 0.0e0 , 0.0e0 // lower end of computational domain.
+   x_up          = 1.0e0 , 1.0e0 , 1.0e0 // upper end of computational domain.
+
+   periodic_dimension = 1 , 0 , 1
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 , 2
+      level_2               = 2 , 2 , 2
+      level_3               = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 5, 4, 4
+      level_1 = 4, 6, 8
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 , 1
+      // all finer levels will use same values as level_0...
+   }
+
+} 
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+} 
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (0,0,0) , (9,8,7) ]
+   }
+}
+
+LoadBalancer {  // for SAMRAI v1.3.2 and later
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/test_inputs/2lev_node_edge_pery.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/test_inputs/2lev_node_edge_pery.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI patch boundary sum test 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 2
+
+   do_node_sum              = TRUE
+   do_edge_sum              = TRUE
+
+   nsteps                   = 1
+
+   log_file_name            = "2lev-2d-node-edge-pery.log"
+   visit_dump_dirname       = "viz_2lev-2d-node-edge-pery"
+}
+
+HierSumTest {
+
+   node_ghosts              = 0 , 0
+   edge_ghosts              = 0 , 0
+
+   check_data_before_communication = FALSE
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0) , (39,49) ]   
+   x_lo          = 0.0e0 , 0.0e0  // lower end of computational domain.
+   x_up          = 1.0e0 , 1.0e0  // upper end of computational domain.
+
+   periodic_dimension = 0, 1
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 
+      level_2               = 2 , 2 
+      level_3               = 2 , 2 
+   }
+
+   largest_patch_size {
+      level_0 = 5 , 4
+      level_1 = 4 , 6
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (1,1) , (4,5) ],
+                 [ (5,4) , (8,6) ]
+   }
+}
+
+LoadBalancer {  // for SAMRAI v1.3.2
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/test_inputs/2lev_node_edge_pery.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/test_inputs/2lev_node_edge_pery.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI patch boundary sum test 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 3
+
+   do_node_sum              = TRUE 
+   do_edge_sum              = TRUE 
+
+   nsteps                   = 1
+
+   log_file_name            = "2lev-3d-node-edge-pery.log"
+   visit_dump_dirname       = "viz_2lev-3d-node-edge-pery"
+}
+
+HierSumTest {
+
+   node_ghosts              = 0 , 0 , 0
+   edge_ghosts              = 0 , 0 , 0
+
+   check_data_before_communication = FALSE
+
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (9,8,7) ]
+   x_lo          = 0.0e0 , 0.0e0 , 0.0e0 // lower end of computational domain.
+   x_up          = 1.0e0 , 1.0e0 , 1.0e0 // upper end of computational domain.
+
+   periodic_dimension = 0 , 1 , 0
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 , 2
+      level_2               = 2 , 2 , 2
+      level_3               = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 5, 4, 4
+      level_1 = 4, 6, 8
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 , 1
+      // all finer levels will use same values as level_0...
+   }
+} 
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+} 
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (0,0,0) , (9,8,7) ]
+   }
+}
+
+LoadBalancer {  // for SAMRAI v1.3.2 and later
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/test_inputs/2lev_node_edge_peryz.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/test_inputs/2lev_node_edge_peryz.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI patch boundary sum test 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 3
+
+   do_node_sum              = TRUE 
+   do_edge_sum              = TRUE 
+
+   nsteps                   = 1
+
+   log_file_name            = "2lev-3d-node-edge-peryz.log"
+   visit_dump_dirname       = "viz_2lev-3d-node-edge-peryz"
+}
+
+HierSumTest {
+
+   node_ghosts              = 0 , 0 , 0
+   edge_ghosts              = 0 , 0 , 0
+
+   check_data_before_communication = FALSE
+
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (9,8,7) ]
+   x_lo          = 0.0e0 , 0.0e0 , 0.0e0 // lower end of computational domain.
+   x_up          = 1.0e0 , 1.0e0 , 1.0e0 // upper end of computational domain.
+
+   periodic_dimension = 0 , 1 , 1
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 , 2
+      level_2               = 2 , 2 , 2
+      level_3               = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 5, 4, 4
+      level_1 = 4, 6, 8
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 , 1
+      // all finer levels will use same values as level_0...
+   }
+} 
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+} 
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (0,0,0) , (9,8,7) ]
+   }
+}
+
+LoadBalancer {  // for SAMRAI v1.3.2 and later
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/patchbdrysum/test_inputs/2lev_node_edge_perz.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/patchbdrysum/test_inputs/2lev_node_edge_perz.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,85 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI patch boundary sum test 
+ *
+ ************************************************************************/
+
+Main {
+   dim = 3
+
+   do_node_sum              = TRUE 
+   do_edge_sum              = TRUE 
+
+   nsteps                   = 1
+
+   log_file_name            = "2lev-3d-node-edge-perz.log"
+   visit_dump_dirname       = "viz_2lev-3d-node-edge-perz"
+}
+
+HierSumTest {
+
+   node_ghosts              = 0 , 0 , 0
+   edge_ghosts              = 0 , 0 , 0
+
+   check_data_before_communication = FALSE
+
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (9,8,7) ]
+   x_lo          = 0.0e0 , 0.0e0 , 0.0e0 // lower end of computational domain.
+   x_up          = 1.0e0 , 1.0e0 , 1.0e0 // upper end of computational domain.
+
+   periodic_dimension = 0 , 0 , 1
+}
+
+PatchHierarchy {
+
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 , 2
+      level_2               = 2 , 2 , 2
+      level_3               = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 5, 4, 4
+      level_1 = 4, 6, 8
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 , 1
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+} 
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (0,0,0) , (9,8,7) ]
+   }
+}
+
+LoadBalancer {  // for SAMRAI v1.3.2 and later
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/Euler.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/Euler.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,4640 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Numerical routines for Euler equations SAMRAI example 
+ *
+ ************************************************************************/
+
+#include "Euler.h"
+
+#include <iostream>
+#include <iomanip>
+#include <fstream>
+
+#ifndef LACKS_SSTREAM
+#ifndef included_sstream
+#define included_sstream
+#include <sstream>
+#endif
+#else
+#ifndef included_strstream
+#define included_strstream
+#include <strstream>
+#endif
+#endif
+
+using namespace std;
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+#include <float.h>
+
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceIndex.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/mesh/DistributedLoadBalancer.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+//integer constants for boundary conditions
+#define CHECK_BDRY_DATA (0)
+#include "SAMRAI/appu/CartesianBoundaryDefines.h"
+
+//integer constant for debugging improperly set boundary dat
+#define BOGUS_BDRY_DATA (-9999)
+
+// routines for managing boundary data
+#if (NDIM == 2)
+#include "SAMRAI/appu/CartesianBoundaryUtilities2.h"
+#endif
+#if (NDIM == 3)
+#include "SAMRAI/appu/CartesianBoundaryUtilities3.h"
+#endif
+
+// External definitions for Fortran numerical routines
+#include "EulerFort.h"
+
+// Number of entries in state vector (NDIM velocity comps + pressure + density)
+#define NEQU (NDIM + 2)
+
+// Number of ghosts cells used for each variable quantity.
+#define CELLG (4)
+#define FACEG (4)
+#define FLUXG (1)
+
+// defines for initialization
+#define PIECEWISE_CONSTANT_X (10)
+#define PIECEWISE_CONSTANT_Y (11)
+#define PIECEWISE_CONSTANT_Z (12)
+#define SPHERE (40)
+#define STEP (80)
+
+// defines for Riemann solver used in Godunov flux calculation
+#define APPROX_RIEM_SOLVE (20)   // Colella-Glaz approx Riemann solver
+#define EXACT_RIEM_SOLVE (21)    // Exact Riemann solver
+#define HLLC_RIEM_SOLVE (22)     // Harten, Lax, van Leer approx Riemann solver
+
+// defines for cell tagging routines
+#define RICHARDSON_NEWLY_TAGGED (-10)
+#define RICHARDSON_ALREADY_TAGGED (-11)
+#ifndef TRUE
+#define TRUE (1)
+#endif
+#ifndef FALSE
+#define FALSE (0)
+#endif
+
+// Version of Euler restart file data
+#define EULER_VERSION (3)
+
+tbox::Pointer<tbox::Timer> Euler::t_init;
+tbox::Pointer<tbox::Timer> Euler::t_compute_dt;
+tbox::Pointer<tbox::Timer> Euler::t_compute_fluxes;
+tbox::Pointer<tbox::Timer> Euler::t_conservdiff;
+tbox::Pointer<tbox::Timer> Euler::t_setphysbcs;
+tbox::Pointer<tbox::Timer> Euler::t_taggradient;
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The constructor for Euler class sets data members to defualt values,  *
+ * creates variables that define the solution state for the Euler        *
+ * equations.                                                            *
+ *                                                                       *
+ * After default values are set, this routine calls getFromRestart()     *
+ * if execution from a restart file is specified.  Finally,              *
+ * getFromInput() is called to read values from the given input          *
+ * database (potentially overriding those found in the restart file).    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+Euler::Euler(
+   const string& object_name,
+   tbox::Pointer<tbox::Database> input_db,
+   tbox::Pointer<geom::CartesianGridGeometry> grid_geom)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!input_db.isNull());
+   TBOX_ASSERT(!grid_geom.isNull());
+#endif
+
+   d_object_name = object_name;
+   tbox::RestartManager::getManager()->registerRestartItem(d_object_name, this);
+
+   if (t_init.isNull()) {
+      t_init = tbox::TimerManager::getManager()->
+         getTimer("apps::Euler::initializeDataOnPatch()");
+      t_compute_dt = tbox::TimerManager::getManager()->
+         getTimer("apps::Euler::computeStableDtOnPatch()");
+      t_compute_fluxes = tbox::TimerManager::getManager()->
+         getTimer("apps::Euler::computeFluxesOnPatch()");
+      t_conservdiff = tbox::TimerManager::getManager()->
+         getTimer("apps::Euler::conservativeDifferenceOnPatch()");
+      t_setphysbcs = tbox::TimerManager::getManager()->
+         getTimer("apps::Euler::setPhysicalBoundaryConditions()");
+      t_taggradient = tbox::TimerManager::getManager()->
+         getTimer("apps::Euler::tagGradientDetectorCells()");
+   }
+
+   d_grid_geometry = grid_geom;
+
+   d_use_nonuniform_workload = false;
+
+   /*
+    *hier::Variable quantities that define state of Euler problem.
+    */
+   d_density = new pdat::CellVariable<double>("density", 1);
+   d_velocity = new pdat::CellVariable<double>("velocity", NDIM);
+   d_pressure = new pdat::CellVariable<double>("pressure", 1);
+   d_flux = new pdat::FaceVariable<double>("flux", NEQU);
+
+   /*
+    * Default parameters for physical constants
+    */
+
+   d_gamma = 1.4;  // specific heat ratio for ideal diatomic gas (e.g., air)
+
+   /*
+    * Default parameters for numerical methods
+    */
+
+   d_riemann_solve = "APPROX_RIEM_SOLVE";
+   d_godunov_order = 1;
+   d_corner_transport = "CORNER_TRANSPORT_1";
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(CELLG == FACEG);
+#endif
+   d_nghosts = hier::IntVector<NDIM>(CELLG);
+   d_fluxghosts = hier::IntVector<NDIM>(FLUXG);
+
+   /*
+    * Defaults for problem type and initial data
+    */
+
+   d_radius = tbox::MathUtilities<double>::getSignalingNaN();
+   tbox::MathUtilities<double>::setArrayToSignalingNaN(d_center, NDIM);
+   d_density_inside = tbox::MathUtilities<double>::getSignalingNaN();
+   tbox::MathUtilities<double>::setArrayToSignalingNaN(d_velocity_inside, NDIM);
+   d_pressure_inside = tbox::MathUtilities<double>::getSignalingNaN();
+   d_density_outside = tbox::MathUtilities<double>::getSignalingNaN();
+   tbox::MathUtilities<double>::setArrayToSignalingNaN(d_velocity_outside, NDIM);
+   d_pressure_outside = tbox::MathUtilities<double>::getSignalingNaN();
+
+   d_number_of_intervals = 0;
+   d_front_position.resizeArray(0);
+   d_interval_density.resizeArray(0);
+   d_interval_velocity.resizeArray(0);
+   d_interval_pressure.resizeArray(0);
+
+   /*
+    * Defaults for boundary conditions. Set to bogus values
+    * for error checking.
+    */
+
+#if (NDIM == 2)
+   d_master_bdry_edge_conds.resizeArray(NUM_2D_EDGES);
+   d_scalar_bdry_edge_conds.resizeArray(NUM_2D_EDGES);
+   d_vector_bdry_edge_conds.resizeArray(NUM_2D_EDGES);
+   for (int ei = 0; ei < NUM_2D_EDGES; ei++) {
+      d_master_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+      d_scalar_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+      d_vector_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+   }
+
+   d_master_bdry_node_conds.resizeArray(NUM_2D_NODES);
+   d_scalar_bdry_node_conds.resizeArray(NUM_2D_NODES);
+   d_vector_bdry_node_conds.resizeArray(NUM_2D_NODES);
+   d_node_bdry_edge.resizeArray(NUM_2D_NODES);
+
+   for (int ni = 0; ni < NUM_2D_NODES; ni++) {
+      d_master_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+      d_scalar_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+      d_vector_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+      d_node_bdry_edge[ni] = BOGUS_BDRY_DATA;
+   }
+
+   d_bdry_edge_density.resizeArray(NUM_2D_EDGES);
+   d_bdry_edge_velocity.resizeArray(NUM_2D_EDGES * NDIM);
+   d_bdry_edge_pressure.resizeArray(NUM_2D_EDGES);
+   tbox::MathUtilities<double>::setArrayToSignalingNaN(d_bdry_edge_density);
+   tbox::MathUtilities<double>::setArrayToSignalingNaN(d_bdry_edge_velocity);
+   tbox::MathUtilities<double>::setArrayToSignalingNaN(d_bdry_edge_pressure);
+#endif
+#if (NDIM == 3)
+   d_master_bdry_face_conds.resizeArray(NUM_3D_FACES);
+   d_scalar_bdry_face_conds.resizeArray(NUM_3D_FACES);
+   d_vector_bdry_face_conds.resizeArray(NUM_3D_FACES);
+   for (int fi = 0; fi < NUM_3D_FACES; fi++) {
+      d_master_bdry_face_conds[fi] = BOGUS_BDRY_DATA;
+      d_scalar_bdry_face_conds[fi] = BOGUS_BDRY_DATA;
+      d_vector_bdry_face_conds[fi] = BOGUS_BDRY_DATA;
+   }
+
+   d_master_bdry_edge_conds.resizeArray(NUM_3D_EDGES);
+   d_scalar_bdry_edge_conds.resizeArray(NUM_3D_EDGES);
+   d_vector_bdry_edge_conds.resizeArray(NUM_3D_EDGES);
+   d_edge_bdry_face.resizeArray(NUM_3D_EDGES);
+   for (int ei = 0; ei < NUM_3D_EDGES; ei++) {
+      d_master_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+      d_scalar_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+      d_vector_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+      d_edge_bdry_face[ei] = BOGUS_BDRY_DATA;
+   }
+
+   d_master_bdry_node_conds.resizeArray(NUM_3D_NODES);
+   d_scalar_bdry_node_conds.resizeArray(NUM_3D_NODES);
+   d_vector_bdry_node_conds.resizeArray(NUM_3D_NODES);
+   d_node_bdry_face.resizeArray(NUM_3D_NODES);
+
+   for (int ni = 0; ni < NUM_3D_NODES; ni++) {
+      d_master_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+      d_scalar_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+      d_vector_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+      d_node_bdry_face[ni] = BOGUS_BDRY_DATA;
+   }
+
+   d_bdry_face_density.resizeArray(NUM_3D_FACES);
+   d_bdry_face_velocity.resizeArray(NUM_3D_FACES * NDIM);
+   d_bdry_face_pressure.resizeArray(NUM_3D_FACES);
+   tbox::MathUtilities<double>::setArrayToSignalingNaN(d_bdry_face_density);
+   tbox::MathUtilities<double>::setArrayToSignalingNaN(d_bdry_face_velocity);
+   tbox::MathUtilities<double>::setArrayToSignalingNaN(d_bdry_face_pressure);
+#endif
+
+   /*
+    * Initialize object with data read from given input/restart databases.
+    */
+   bool is_from_restart = tbox::RestartManager::getManager()->isFromRestart();
+   if (is_from_restart) {
+      getFromRestart();
+   }
+   getFromInput(input_db, is_from_restart);
+
+   /*
+    * Set problem data to values read from input/restart.
+    */
+
+   if (d_riemann_solve == "APPROX_RIEM_SOLVE") {
+      d_riemann_solve_int = APPROX_RIEM_SOLVE;
+   } else if (d_riemann_solve == "EXACT_RIEM_SOLVE") {
+      d_riemann_solve_int = EXACT_RIEM_SOLVE;
+   } else if (d_riemann_solve == "HLLC_RIEM_SOLVE") {
+      d_riemann_solve_int = HLLC_RIEM_SOLVE;
+   } else {
+      TBOX_ERROR(
+         d_object_name << ": "
+         << "Unknown d_riemann_solve string = "
+         << d_riemann_solve
+         << " encountered in constructor" << endl);
+   }
+
+   if (d_data_problem == "PIECEWISE_CONSTANT_X") {
+      d_data_problem_int = PIECEWISE_CONSTANT_X;
+   } else if (d_data_problem == "PIECEWISE_CONSTANT_Y") {
+      d_data_problem_int = PIECEWISE_CONSTANT_Y;
+   } else if (d_data_problem == "PIECEWISE_CONSTANT_Z") {
+      d_data_problem_int = PIECEWISE_CONSTANT_Z;
+   } else if (d_data_problem == "SPHERE") {
+      d_data_problem_int = SPHERE;
+   } else if (d_data_problem == "STEP") {
+      d_data_problem_int = STEP;
+   } else {
+      TBOX_ERROR(
+         d_object_name << ": "
+         << "Unknown d_data_problem string = "
+         << d_data_problem
+         << " encountered in constructor" << endl);
+   }
+
+   /*
+    * Postprocess boundary data from input/restart values.
+    */
+#if (NDIM == 2)
+   for (int i = 0; i < NUM_2D_EDGES; i++) {
+      d_scalar_bdry_edge_conds[i] = d_master_bdry_edge_conds[i];
+      d_vector_bdry_edge_conds[i] = d_master_bdry_edge_conds[i];
+
+      if (d_master_bdry_edge_conds[i] == REFLECT_BC) {
+         d_scalar_bdry_edge_conds[i] = FLOW_BC;
+      }
+   }
+
+   for (int i = 0; i < NUM_2D_NODES; i++) {
+      d_scalar_bdry_node_conds[i] = d_master_bdry_node_conds[i];
+      d_vector_bdry_node_conds[i] = d_master_bdry_node_conds[i];
+
+      if (d_master_bdry_node_conds[i] == XREFLECT_BC) {
+         d_scalar_bdry_node_conds[i] = XFLOW_BC;
+      }
+      if (d_master_bdry_node_conds[i] == YREFLECT_BC) {
+         d_scalar_bdry_node_conds[i] = YFLOW_BC;
+      }
+
+      if (d_master_bdry_node_conds[i] != BOGUS_BDRY_DATA) {
+         d_node_bdry_edge[i] =
+            appu::CartesianBoundaryUtilities2::getEdgeLocationForNodeBdry(
+               i, d_master_bdry_node_conds[i]);
+      }
+   }
+#endif
+#if (NDIM == 3)
+   for (int i = 0; i < NUM_3D_FACES; i++) {
+      d_scalar_bdry_face_conds[i] = d_master_bdry_face_conds[i];
+      d_vector_bdry_face_conds[i] = d_master_bdry_face_conds[i];
+
+      if (d_master_bdry_face_conds[i] == REFLECT_BC) {
+         d_scalar_bdry_face_conds[i] = FLOW_BC;
+      }
+   }
+
+   for (int i = 0; i < NUM_3D_EDGES; i++) {
+      d_scalar_bdry_edge_conds[i] = d_master_bdry_edge_conds[i];
+      d_vector_bdry_edge_conds[i] = d_master_bdry_edge_conds[i];
+
+      if (d_master_bdry_edge_conds[i] == XREFLECT_BC) {
+         d_scalar_bdry_edge_conds[i] = XFLOW_BC;
+      }
+      if (d_master_bdry_edge_conds[i] == YREFLECT_BC) {
+         d_scalar_bdry_edge_conds[i] = YFLOW_BC;
+      }
+      if (d_master_bdry_edge_conds[i] == ZREFLECT_BC) {
+         d_scalar_bdry_edge_conds[i] = ZFLOW_BC;
+      }
+
+      if (d_master_bdry_edge_conds[i] != BOGUS_BDRY_DATA) {
+         d_edge_bdry_face[i] =
+            appu::CartesianBoundaryUtilities3::getFaceLocationForEdgeBdry(
+               i, d_master_bdry_edge_conds[i]);
+      }
+   }
+
+   for (int i = 0; i < NUM_3D_NODES; i++) {
+      d_scalar_bdry_node_conds[i] = d_master_bdry_node_conds[i];
+      d_vector_bdry_node_conds[i] = d_master_bdry_node_conds[i];
+
+      if (d_master_bdry_node_conds[i] == XREFLECT_BC) {
+         d_scalar_bdry_node_conds[i] = XFLOW_BC;
+      }
+      if (d_master_bdry_node_conds[i] == YREFLECT_BC) {
+         d_scalar_bdry_node_conds[i] = YFLOW_BC;
+      }
+      if (d_master_bdry_node_conds[i] == ZREFLECT_BC) {
+         d_scalar_bdry_node_conds[i] = ZFLOW_BC;
+      }
+
+      if (d_master_bdry_node_conds[i] != BOGUS_BDRY_DATA) {
+         d_node_bdry_face[i] =
+            appu::CartesianBoundaryUtilities3::getFaceLocationForNodeBdry(
+               i, d_master_bdry_node_conds[i]);
+      }
+   }
+
+#endif
+
+   F77_FUNC(stufprobc, STUFPROBC) (APPROX_RIEM_SOLVE, EXACT_RIEM_SOLVE,
+      HLLC_RIEM_SOLVE,
+      PIECEWISE_CONSTANT_X, PIECEWISE_CONSTANT_Y, PIECEWISE_CONSTANT_Z,
+      SPHERE, STEP,
+      CELLG, FACEG, FLUXG);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Empty destructor for Euler class.                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+Euler::~Euler()
+{
+   t_init = NULL;
+   t_compute_dt = NULL;
+   t_compute_fluxes = NULL;
+   t_conservdiff = NULL;
+   t_setphysbcs = NULL;
+   t_taggradient = NULL;
+}
+
+/*
+ *************************************************************************
+ *
+ * Register density, velocity, pressure (i.e., solution state variables),
+ * and flux variables with hyperbolic integrator that manages storage
+ * for those quantities.  Also, register plot data with the vis tool
+ * or Visit).           *                                                                       *
+ * Note that density coarsening/refining uses standard conservative
+ * operations provided in SAMRAI library.   Velocity and pressure
+ * are not conserved.  The Euler code provides operations to coarsen/
+ * refine momentum and total energy conservatively.  Velocity and
+ * pressure are calculated from the conserved quantities.
+ *
+ *************************************************************************
+ */
+
+void Euler::registerModelVariables(
+   algs::HyperbolicLevelIntegrator* integrator)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(integrator != (algs::HyperbolicLevelIntegrator *)NULL);
+   TBOX_ASSERT(CELLG == FACEG);
+#endif
+
+   integrator->registerVariable(d_density, d_nghosts,
+      algs::HyperbolicLevelIntegrator::TIME_DEP,
+      d_grid_geometry,
+      "CONSERVATIVE_COARSEN",
+      "CONSERVATIVE_LINEAR_REFINE");
+
+   integrator->registerVariable(d_velocity, d_nghosts,
+      algs::HyperbolicLevelIntegrator::TIME_DEP,
+      d_grid_geometry,
+      "USER_DEFINED_COARSEN",
+      "USER_DEFINED_REFINE");
+
+   integrator->registerVariable(d_pressure, d_nghosts,
+      algs::HyperbolicLevelIntegrator::TIME_DEP,
+      d_grid_geometry,
+      "USER_DEFINED_COARSEN",
+      "USER_DEFINED_REFINE");
+
+   integrator->registerVariable(d_flux, d_fluxghosts,
+      algs::HyperbolicLevelIntegrator::FLUX,
+      d_grid_geometry,
+      "CONSERVATIVE_COARSEN",
+      "NO_REFINE");
+
+   hier::VariableDatabase* vardb = hier::VariableDatabase::getDatabase();
+
+   d_plot_context = integrator->getPlotContext();
+
+#ifdef HAVE_HDF5
+   if (!(d_visit_writer.isNull())) {
+      d_visit_writer->registerPlotQuantity("Density",
+         "SCALAR",
+         vardb->mapVariableAndContextToIndex(
+            d_density, d_plot_context));
+
+      d_visit_writer->registerPlotQuantity("Velocity",
+         "VECTOR",
+         vardb->mapVariableAndContextToIndex(
+            d_velocity, d_plot_context));
+
+      d_visit_writer->registerPlotQuantity("Pressure",
+         "SCALAR",
+         vardb->mapVariableAndContextToIndex(
+            d_pressure, d_plot_context));
+
+      d_visit_writer->registerDerivedPlotQuantity("Total Energy",
+         "SCALAR",
+         this);
+      d_visit_writer->registerDerivedPlotQuantity("Momentum",
+         "VECTOR",
+         this);
+   }
+
+   if (d_visit_writer.isNull()) {
+      TBOX_WARNING(d_object_name << ": registerModelVariables()\n"
+                                 << "Visit data writer was not registerd\n"
+                                 << "Consequently, no plot data will\n"
+                                 << "be written." << endl);
+   }
+#endif
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set up parameters for nonuniform load balancing, if used.             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::setupLoadBalancer(
+   algs::HyperbolicLevelIntegrator* integrator,
+   mesh::GriddingAlgorithm* gridding_algorithm)
+{
+   (void)integrator;
+
+   hier::VariableDatabase* vardb = hier::VariableDatabase::getDatabase();
+
+   if (d_use_nonuniform_workload && gridding_algorithm) {
+      tbox::Pointer<mesh::DistributedLoadBalancer> load_balancer =
+         gridding_algorithm->getLoadBalanceStrategy();
+
+      if (!load_balancer.isNull()) {
+         d_workload_variable = new pdat::CellVariable<double>(
+               "workload_variable",
+               1);
+         d_workload_data_id =
+            vardb->registerVariableAndContext(d_workload_variable,
+               vardb->getContext("WORKLOAD"));
+         load_balancer->setWorkloadPatchDataIndex(d_workload_data_id);
+         vardb->registerPatchDataForRestart(d_workload_data_id);
+      } else {
+         TBOX_WARNING(
+            d_object_name << ": "
+            <<
+            "  Unknown load balancer used in gridding algorithm."
+            <<
+            "  Ignoring request for nonuniform load balancing." << endl);
+         d_use_nonuniform_workload = false;
+      }
+   } else {
+      d_use_nonuniform_workload = false;
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set initial data for solution variables on patch interior.            *
+ * This routine is called whenever a new patch is introduced to the      *
+ * AMR patch hierarchy.  Note that the routine does nothing unless       *
+ * we are at the initial time.  In all other cases, conservative         *
+ * interpolation from coarser levels and copies from patches at the      *
+ * same mesh resolution are sufficient to set data.                      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::initializeDataOnPatch(
+   hier::Patch& patch,
+   const double data_time,
+   const bool initial_time)
+{
+   (void)data_time;
+
+   t_init->start();
+
+   if (initial_time) {
+
+      const tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+         patch.getPatchGeometry();
+      const double* dx = pgeom->getDx();
+      const double* xlo = pgeom->getXLower();
+      const double* xhi = pgeom->getXUpper();
+
+      tbox::Pointer<pdat::CellData<double> > density =
+         patch.getPatchData(d_density, getDataContext());
+      tbox::Pointer<pdat::CellData<double> > velocity =
+         patch.getPatchData(d_velocity, getDataContext());
+      tbox::Pointer<pdat::CellData<double> > pressure =
+         patch.getPatchData(d_pressure, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!density.isNull());
+      TBOX_ASSERT(!velocity.isNull());
+      TBOX_ASSERT(!pressure.isNull());
+#endif
+      hier::IntVector<NDIM> ghost_cells = density->getGhostCellWidth();
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(velocity->getGhostCellWidth() == ghost_cells);
+      TBOX_ASSERT(pressure->getGhostCellWidth() == ghost_cells);
+#endif
+
+      const hier::Index ifirst = patch.getBox().lower();
+      const hier::Index ilast = patch.getBox().upper();
+
+      if (d_data_problem == "SPHERE") {
+
+         F77_FUNC(eulerinitsphere, EULERINITSPHERE) (d_data_problem_int,
+            dx, xlo, xhi,
+            ifirst(0), ilast(0),
+            ifirst(1), ilast(1),
+#if (NDIM > 2)
+            ifirst(2), ilast(2),
+#endif
+            ghost_cells(0),
+            ghost_cells(1),
+#if (NDIM > 2)
+            ghost_cells(2),
+#endif
+            d_gamma,
+            density->getPointer(),
+            velocity->getPointer(),
+            pressure->getPointer(),
+            d_density_inside,
+            d_velocity_inside,
+            d_pressure_inside,
+            d_density_outside,
+            d_velocity_outside,
+            d_pressure_outside,
+            d_center, d_radius);
+
+      } else {
+
+         F77_FUNC(eulerinit, EULERINIT) (d_data_problem_int,
+            dx, xlo, xhi,
+            ifirst(0), ilast(0),
+            ifirst(1), ilast(1),
+#if (NDIM > 2)
+            ifirst(2), ilast(2),
+#endif
+            ghost_cells(0),
+            ghost_cells(1),
+#if (NDIM > 2)
+            ghost_cells(2),
+#endif
+            d_gamma,
+            density->getPointer(),
+            velocity->getPointer(),
+            pressure->getPointer(),
+            d_number_of_intervals,
+            d_front_position.getPointer(),
+            d_interval_density.getPointer(),
+            d_interval_velocity.getPointer(),
+            d_interval_pressure.getPointer());
+
+      }
+
+   }
+
+   if (d_use_nonuniform_workload) {
+      if (!patch.checkAllocated(d_workload_data_id)) {
+         patch.allocatePatchData(d_workload_data_id);
+      }
+      tbox::Pointer<pdat::CellData<double> > workload_data =
+         patch.getPatchData(d_workload_data_id);
+      workload_data->fillAll(1.0);
+   }
+
+   t_init->stop();
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute stable time increment for patch.  Return this value.          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double Euler::computeStableDtOnPatch(
+   hier::Patch& patch,
+   const bool initial_time,
+   const double dt_time)
+{
+   (void)initial_time;
+   (void)dt_time;
+
+   t_compute_dt->start();
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+
+   const tbox::Pointer<pdat::CellData<double> > density =
+      patch.getPatchData(d_density, getDataContext());
+   const tbox::Pointer<pdat::CellData<double> > velocity =
+      patch.getPatchData(d_velocity, getDataContext());
+   const tbox::Pointer<pdat::CellData<double> > pressure =
+      patch.getPatchData(d_pressure, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!density.isNull());
+   TBOX_ASSERT(!velocity.isNull());
+   TBOX_ASSERT(!pressure.isNull());
+#endif
+   hier::IntVector<NDIM> ghost_cells = density->getGhostCellWidth();
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(velocity->getGhostCellWidth() == ghost_cells);
+   TBOX_ASSERT(pressure->getGhostCellWidth() == ghost_cells);
+#endif
+
+   double stabdt = 0.;
+   F77_FUNC(stabledt, STABLEDT) (dx,
+      ifirst(0), ilast(0),
+      ifirst(1), ilast(1),
+#if (NDIM > 2)
+      ifirst(2), ilast(2),
+#endif
+      ghost_cells(0),
+      ghost_cells(1),
+#if (NDIM > 2)
+      ghost_cells(2),
+#endif
+      d_gamma,
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      stabdt);
+
+   t_compute_dt->stop();
+   return stabdt;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute time integral of numerical fluxes for finite difference       *
+ * at each cell face on patch.  When NDIM == 3, there are two options    *
+ * for the transverse flux correction.  Otherwise, there is only one.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::computeFluxesOnPatch(
+   hier::Patch& patch,
+   const double time,
+   const double dt)
+{
+   (void)time;
+
+   t_compute_fluxes->start();
+
+#if (NDIM == 3)
+   if (d_corner_transport == "CORNER_TRANSPORT_2") {
+      compute3DFluxesWithCornerTransport2(patch, dt);
+   } else {
+      compute3DFluxesWithCornerTransport1(patch, dt);
+   }
+#endif
+
+#if (NDIM == 2)
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(CELLG == FACEG);
+#endif
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+
+   hier::Box pbox = patch.getBox();
+   const hier::Index ifirst = pbox.lower();
+   const hier::Index ilast = pbox.upper();
+
+   tbox::Pointer<pdat::CellData<double> > density =
+      patch.getPatchData(d_density, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > velocity =
+      patch.getPatchData(d_velocity, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > pressure =
+      patch.getPatchData(d_pressure, getDataContext());
+   tbox::Pointer<pdat::FaceData<double> > flux =
+      patch.getPatchData(d_flux, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!density.isNull());
+   TBOX_ASSERT(!velocity.isNull());
+   TBOX_ASSERT(!pressure.isNull());
+   TBOX_ASSERT(!flux.isNull());
+   TBOX_ASSERT(density->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(velocity->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(pressure->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(flux->getGhostCellWidth() == d_fluxghosts);
+#endif
+
+   /*
+    * Allocate patch data for temporaries local to this routine.
+    */
+   pdat::FaceData<double> traced_left(pbox, NEQU, d_nghosts);
+   pdat::FaceData<double> traced_right(pbox, NEQU, d_nghosts);
+   pdat::CellData<double> sound_speed(pbox, 1, d_nghosts);
+
+   /*
+    *  Initialize traced states (w^R and w^L) with proper cell-centered values.
+    */
+   F77_FUNC(inittraceflux, INITTRACEFLUX) (ifirst(0), ilast(0),
+      ifirst(1), ilast(1),
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      flux->getPointer(0),
+      flux->getPointer(1));
+
+   /*
+    * If Godunov method requires slopes with order greater than one, perform
+    * characteristic tracing to compute higher-order slopes.
+    */
+   if (d_godunov_order > 1) {
+
+      /*
+       * Prepare temporary data for characteristic tracing.
+       */
+      int Mcells = 0;
+      for (int k = 0; k < NDIM; k++) {
+         Mcells = tbox::MathUtilities<int>::Max(Mcells, pbox.numberCells(k));
+      }
+
+      // Face-centered temporary arrays
+      tbox::Array<double> ttedgslp((2 * FACEG + 1 + Mcells) * NEQU);
+      tbox::Array<double> ttraclft((2 * FACEG + 1 + Mcells) * NEQU);
+      tbox::Array<double> ttracrgt((2 * FACEG + 1 + Mcells) * NEQU);
+
+      // Cell-centered temporary arrays
+      tbox::Array<double> ttsound((2 * CELLG + Mcells));
+      tbox::Array<double> ttcelslp((2 * CELLG + Mcells) * NEQU);
+
+      /*
+       * Compute local sound speed in each computational cell.
+       */
+      F77_FUNC(computesound, COMPUTESOUND) (ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         d_gamma,
+         density->getPointer(),
+         velocity->getPointer(),
+         pressure->getPointer(),
+         sound_speed.getPointer());
+
+      /*
+       *  Apply characteristic tracing to compute initial estimate of
+       *  traces w^L and w^R at faces.
+       *  Inputs: sound_speed, w^L, w^R (traced_left/right)
+       *  Output: w^L, w^R
+       */
+      F77_FUNC(chartracing0, CHARTRACING0) (dt,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         Mcells, dx[0], d_gamma, d_godunov_order,
+         sound_speed.getPointer(),
+         traced_left.getPointer(0),
+         traced_right.getPointer(0),
+         ttcelslp.getPointer(),
+         ttedgslp.getPointer(),
+         ttsound.getPointer(),
+         ttraclft.getPointer(),
+         ttracrgt.getPointer());
+
+      F77_FUNC(chartracing1, CHARTRACING1) (dt,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         Mcells, dx[1], d_gamma, d_godunov_order,
+         sound_speed.getPointer(),
+         traced_left.getPointer(1),
+         traced_right.getPointer(1),
+         ttcelslp.getPointer(),
+         ttedgslp.getPointer(),
+         ttsound.getPointer(),
+         ttraclft.getPointer(),
+         ttracrgt.getPointer());
+
+   }  // if (d_godunov_order > 1) ...
+
+// F77_FUNC(fluxcalculation,FLUXCALCULATION)(dt,*,1,dx, to get artificial viscosity
+// F77_FUNC(fluxcalculation,FLUXCALCULATION)(dt,*,0,dx, to get NO artificial viscosity
+
+   /*
+    *  Compute preliminary fluxes at faces by solving approximate
+    *  Riemann problem using the trace states computed so far.
+    *  Inputs: P, rho, v, w^L, w^R (traced_left/right)
+    *  Output: F (flux)
+    */
+   F77_FUNC(fluxcalculation, FLUXCALCULATION) (dt, 1, 0, dx,
+      ifirst(0), ilast(0), ifirst(1), ilast(1),
+      d_gamma,
+      d_riemann_solve_int,
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1));
+
+   /*
+    *  Update trace states at cell faces with transverse correction applied.
+    *  Inputs: F (flux)
+    *  Output: w^L, w^R (traced_left/right)
+    */
+   F77_FUNC(fluxcorrec, FLUXCORREC) (dt,
+      ifirst(0), ilast(0), ifirst(1), ilast(1),
+      dx, d_gamma,
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1));
+
+   boundaryReset(patch, traced_left, traced_right);
+
+   /*
+    *  Re-compute fluxes with updated trace states.
+    *  Inputs: w^L, w^R (traced_left/right)
+    *  Output: F (flux)
+    */
+   F77_FUNC(fluxcalculation, FLUXCALCULATION) (dt, 0, 0, dx,
+      ifirst(0), ilast(0), ifirst(1), ilast(1),
+      d_gamma,
+      d_riemann_solve_int,
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1));
+
+#endif
+
+   t_compute_fluxes->stop();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute numerical approximations to flux terms using an extension     *
+ * to three dimensions of Collella's corner transport upwind approach.   *
+ * I.E. input value corner_transport = "CORNER_TRANSPORT_1"              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+#if (NDIM == 3)
+void Euler::compute3DFluxesWithCornerTransport1(
+   hier::Patch& patch,
+   const double dt)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(CELLG == FACEG);
+#endif
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+
+   hier::Box pbox = patch.getBox();
+   const hier::Index ifirst = pbox.lower();
+   const hier::Index ilast = pbox.upper();
+
+   tbox::Pointer<pdat::CellData<double> > density =
+      patch.getPatchData(d_density, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > velocity =
+      patch.getPatchData(d_velocity, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > pressure =
+      patch.getPatchData(d_pressure, getDataContext());
+   tbox::Pointer<pdat::FaceData<double> > flux =
+      patch.getPatchData(d_flux, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!density.isNull());
+   TBOX_ASSERT(!velocity.isNull());
+   TBOX_ASSERT(!pressure.isNull());
+   TBOX_ASSERT(!flux.isNull());
+   TBOX_ASSERT(density->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(velocity->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(pressure->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(flux->getGhostCellWidth() == d_fluxghosts);
+#endif
+
+   /*
+    * Allocate patch data for temporaries local to this routine.
+    */
+   pdat::FaceData<double> traced_left(pbox, NEQU, d_nghosts);
+   pdat::FaceData<double> traced_right(pbox, NEQU, d_nghosts);
+   pdat::CellData<double> sound_speed(pbox, 1, d_nghosts);
+   pdat::FaceData<double> temp_flux(pbox, NEQU, d_fluxghosts);
+   pdat::FaceData<double> temp_traced_left(pbox, NEQU, d_nghosts);
+   pdat::FaceData<double> temp_traced_right(pbox, NEQU, d_nghosts);
+
+   /*
+    *  Initialize traced states (w^R and w^L) with proper cell-centered values.
+    */
+   F77_FUNC(inittraceflux, INITTRACEFLUX) (ifirst(0), ilast(0),
+      ifirst(1), ilast(1),
+      ifirst(2), ilast(2),
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2));
+
+   /*
+    * If Godunov method requires slopes with order greater than one, perform
+    * characteristic tracing to compute higher-order slopes.
+    */
+   if (d_godunov_order > 1) {
+
+      /*
+       * Prepare temporary data for characteristic tracing.
+       */
+      int Mcells = 0;
+      for (int k = 0; k < NDIM; k++) {
+         Mcells = tbox::MathUtilities<int>::Max(Mcells, pbox.numberCells(k));
+      }
+
+      // Face-centered temporary arrays
+      tbox::Array<double> ttedgslp((2 * FACEG + 1 + Mcells) * NEQU);
+      tbox::Array<double> ttraclft((2 * FACEG + 1 + Mcells) * NEQU);
+      tbox::Array<double> ttracrgt((2 * FACEG + 1 + Mcells) * NEQU);
+
+      // Cell-centered temporary arrays
+      tbox::Array<double> ttsound((2 * CELLG + Mcells));
+      tbox::Array<double> ttcelslp((2 * CELLG + Mcells) * NEQU);
+
+      /*
+       * Compute local sound speed in each computational cell.
+       */
+      F77_FUNC(computesound, COMPUTESOUND) (ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         d_gamma,
+         density->getPointer(),
+         velocity->getPointer(),
+         pressure->getPointer(),
+         sound_speed.getPointer());
+
+      /*
+       *  Apply characteristic tracing to compute initial estimate of
+       *  traces w^L and w^R at faces.
+       *  Inputs: sound_speed, w^L, w^R (traced_left/right)
+       *  Output: w^L, w^R
+       */
+      F77_FUNC(chartracing0, CHARTRACING0) (dt,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         Mcells, dx[0], d_gamma, d_godunov_order,
+         sound_speed.getPointer(),
+         traced_left.getPointer(0),
+         traced_right.getPointer(0),
+         ttcelslp.getPointer(),
+         ttedgslp.getPointer(),
+         ttsound.getPointer(),
+         ttraclft.getPointer(),
+         ttracrgt.getPointer());
+
+      F77_FUNC(chartracing1, CHARTRACING1) (dt,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         Mcells, dx[1], d_gamma, d_godunov_order,
+         sound_speed.getPointer(),
+         traced_left.getPointer(1),
+         traced_right.getPointer(1),
+         ttcelslp.getPointer(),
+         ttedgslp.getPointer(),
+         ttsound.getPointer(),
+         ttraclft.getPointer(),
+         ttracrgt.getPointer());
+
+      F77_FUNC(chartracing2, CHARTRACING2) (dt,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         Mcells, dx[2], d_gamma, d_godunov_order,
+         sound_speed.getPointer(),
+         traced_left.getPointer(2),
+         traced_right.getPointer(2),
+         ttcelslp.getPointer(),
+         ttedgslp.getPointer(),
+         ttsound.getPointer(),
+         ttraclft.getPointer(),
+         ttracrgt.getPointer());
+
+   }  // if (d_godunov_order > 1) ...
+
+   /*
+    *  Compute preliminary fluxes at faces by solving approximate
+    *  Riemann problem using the trace states computed so far.
+    *  Inputs: P, rho, v, w^L, w^R (traced_left/right)
+    *  Output: F (flux)
+    */
+//  F77_FUNC(fluxcalculation,FLUXCALCULATION)(dt,*,*,1,dx,  to do artificial viscosity
+//  F77_FUNC(fluxcalculation,FLUXCALCULATION)(dt,*,*,0,dx,  to do NO artificial viscosity
+   F77_FUNC(fluxcalculation, FLUXCALCULATION) (dt, 1, 0, 0, dx,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      d_gamma,
+      d_riemann_solve_int,
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2));
+
+   /*
+    *  Re-compute face traces to include one set of correction terms with
+    *  transverse flux differences.  Store result in temporary vectors
+    *  (i.e. temp_traced_left/right).
+    *  Inputs: F (flux), P, rho, v, w^L, w^R (traced_left/right)
+    *  Output: temp_traced_left/right
+    */
+   F77_FUNC(fluxcorrec2d, FLUXCORREC2D) (dt,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      dx, d_gamma, 1,
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2),
+      temp_traced_left.getPointer(0),
+      temp_traced_left.getPointer(1),
+      temp_traced_left.getPointer(2),
+      temp_traced_right.getPointer(0),
+      temp_traced_right.getPointer(1),
+      temp_traced_right.getPointer(2));
+
+   boundaryReset(patch, traced_left, traced_right);
+
+   /*
+    *  Compute fluxes with partially-corrected trace states.  Store
+    *  result in temporary flux vector.
+    *  Inputs: P, rho, v, temp_traced_left/right
+    *  Output: temp_flux
+    */
+   F77_FUNC(fluxcalculation, FLUXCALCULATION) (dt, 0, 1, 0, dx,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      d_gamma,
+      d_riemann_solve_int,
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      temp_flux.getPointer(0),
+      temp_flux.getPointer(1),
+      temp_flux.getPointer(2),
+      temp_traced_left.getPointer(0),
+      temp_traced_left.getPointer(1),
+      temp_traced_left.getPointer(2),
+      temp_traced_right.getPointer(0),
+      temp_traced_right.getPointer(1),
+      temp_traced_right.getPointer(2));
+   /*
+    *  Compute face traces with other transverse correction flux
+    *  difference terms included.  Store result in temporary vectors
+    *  (i.e. temp_traced_left/right).
+    *  Inputs: F (flux), P, rho, v, w^L, w^R (traced_left/right)
+    *  Output: temp_traced_left/right
+    */
+   F77_FUNC(fluxcorrec2d, FLUXCORREC2D) (dt,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      dx, d_gamma, -1,
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2),
+      temp_traced_left.getPointer(0),
+      temp_traced_left.getPointer(1),
+      temp_traced_left.getPointer(2),
+      temp_traced_right.getPointer(0),
+      temp_traced_right.getPointer(1),
+      temp_traced_right.getPointer(2));
+
+   boundaryReset(patch, traced_left, traced_right);
+
+   /*
+    *  Compute final predicted fluxes with both sets of transverse flux
+    *  differences included.  Store the result in regular flux vector.
+    *  NOTE:  the fact that we store  these fluxes in the regular (i.e.
+    *  not temporary) flux vector does NOT indicate this is the final result.
+    *  Rather, the flux vector is used as a convenient storage location.
+    *  Inputs: P, rho, v, temp_traced_left/right
+    *  Output: flux
+    */
+   F77_FUNC(fluxcalculation, FLUXCALCULATION) (dt, 1, 0, 0, dx,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      d_gamma,
+      d_riemann_solve_int,
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      temp_traced_left.getPointer(0),
+      temp_traced_left.getPointer(1),
+      temp_traced_left.getPointer(2),
+      temp_traced_right.getPointer(0),
+      temp_traced_right.getPointer(1),
+      temp_traced_right.getPointer(2));
+   /*
+    *  Compute the final trace state vectors at cell faces using transverse
+    *  differences of final predicted fluxes.  Store the result in w^L
+    *  (traced_left) and w^R (traced_right) vectors.
+    *  Inputs: temp_flux, flux
+    *  Output: w^L, w^R (traced_left/right)
+    */
+   F77_FUNC(fluxcorrec3d, FLUXCORREC3D) (dt,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      dx, d_gamma,
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      temp_flux.getPointer(0),
+      temp_flux.getPointer(1),
+      temp_flux.getPointer(2),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2));
+
+   /*
+    *  Final flux calculation using corrected trace states.
+    *  Inputs:  w^L, w^R (traced_left/right)
+    *  Output:  F (flux)
+    */
+   F77_FUNC(fluxcalculation, FLUXCALCULATION) (dt, 0, 0, 0, dx,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      d_gamma,
+      d_riemann_solve_int,
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2));
+}
+#endif
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute numerical approximations to flux terms using John             *
+ * Trangenstein's interpretation of the three-dimensional version of     *
+ * Collella's corner transport upwind approach.                          *
+ * I.E. input value corner_transport = "CORNER_TRANSPORT_2"              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+#if (NDIM == 3)
+void Euler::compute3DFluxesWithCornerTransport2(
+   hier::Patch& patch,
+   const double dt)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(CELLG == FACEG);
+#endif
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+
+   hier::Box pbox = patch.getBox();
+   const hier::Index ifirst = pbox.lower();
+   const hier::Index ilast = pbox.upper();
+
+   tbox::Pointer<pdat::CellData<double> > density =
+      patch.getPatchData(d_density, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > velocity =
+      patch.getPatchData(d_velocity, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > pressure =
+      patch.getPatchData(d_pressure, getDataContext());
+   tbox::Pointer<pdat::FaceData<double> > flux =
+      patch.getPatchData(d_flux, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!density.isNull());
+   TBOX_ASSERT(!velocity.isNull());
+   TBOX_ASSERT(!pressure.isNull());
+   TBOX_ASSERT(!flux.isNull());
+   TBOX_ASSERT(density->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(velocity->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(pressure->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(flux->getGhostCellWidth() == d_fluxghosts);
+#endif
+
+   /*
+    * Allocate patch data for temporaries local to this routine.
+    */
+   pdat::FaceData<double> traced_left(pbox, NEQU, d_nghosts);
+   pdat::FaceData<double> traced_right(pbox, NEQU, d_nghosts);
+   pdat::CellData<double> sound_speed(pbox, 1, d_nghosts);
+   pdat::FaceData<double> temp_flux(pbox, NEQU, d_fluxghosts);
+   pdat::CellData<double> third_state(pbox, NEQU, d_nghosts);
+
+   /*
+    *  Initialize traced states (w^R and w^L) with proper cell-centered values.
+    */
+   F77_FUNC(inittraceflux, INITTRACEFLUX) (ifirst(0), ilast(0),
+      ifirst(1), ilast(1),
+      ifirst(2), ilast(2),
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2));
+
+   /*
+    *  Compute fluxes at faces by solving approximate Riemann problem
+    *  using initial trace states.
+    *  Inputs: P, rho, v, w^L, w^R (traced_left/right)
+    *  Output: F (flux)
+    */
+//  F77_FUNC(fluxcalculation,FLUXCALCULATION)(dt,*,*,1,dx,  to do artificial viscosity
+//  F77_FUNC(fluxcalculation,FLUXCALCULATION)(dt,*,*,0,dx,  to do NO artificial viscosity
+   F77_FUNC(fluxcalculation, FLUXCALCULATION) (dt, 1, 1, 0, dx,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      d_gamma,
+      d_riemann_solve_int,
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2));
+
+   /*
+    * If Godunov method requires slopes with order greater than one, perform
+    * characteristic tracing to compute higher-order slopes.
+    */
+   if (d_godunov_order > 1) {
+
+      /*
+       * Prepare temporary data for characteristic tracing.
+       */
+      int Mcells = 0;
+      for (int k = 0; k < NDIM; k++) {
+         Mcells = tbox::MathUtilities<int>::Max(Mcells, pbox.numberCells(k));
+      }
+
+      // Face-centered temporary arrays
+      tbox::Array<double> ttedgslp((2 * FACEG + 1 + Mcells) * NEQU);
+      tbox::Array<double> ttraclft((2 * FACEG + 1 + Mcells) * NEQU);
+      tbox::Array<double> ttracrgt((2 * FACEG + 1 + Mcells) * NEQU);
+
+      // Cell-centered temporary arrays
+      tbox::Array<double> ttsound((2 * CELLG + Mcells));
+      tbox::Array<double> ttcelslp((2 * CELLG + Mcells) * NEQU);
+
+      /*
+       * Compute local sound speed in each computational cell.
+       */
+      F77_FUNC(computesound, COMPUTESOUND) (ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         d_gamma,
+         density->getPointer(),
+         velocity->getPointer(),
+         pressure->getPointer(),
+         sound_speed.getPointer());
+
+      /*
+       *  Apply characteristic tracing to update traces w^L and w^R at faces.
+       *  Inputs: sound_speed, w^L, w^R (traced_left/right)
+       *  Output: w^L, w^R
+       */
+      F77_FUNC(chartracing0, CHARTRACING0) (dt,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         Mcells, dx[0], d_gamma, d_godunov_order,
+         sound_speed.getPointer(),
+         traced_left.getPointer(0),
+         traced_right.getPointer(0),
+         ttcelslp.getPointer(),
+         ttedgslp.getPointer(),
+         ttsound.getPointer(),
+         ttraclft.getPointer(),
+         ttracrgt.getPointer());
+
+      F77_FUNC(chartracing1, CHARTRACING1) (dt,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         Mcells, dx[1], d_gamma, d_godunov_order,
+         sound_speed.getPointer(),
+         traced_left.getPointer(1),
+         traced_right.getPointer(1),
+         ttcelslp.getPointer(),
+         ttedgslp.getPointer(),
+         ttsound.getPointer(),
+         ttraclft.getPointer(),
+         ttracrgt.getPointer());
+
+      F77_FUNC(chartracing2, CHARTRACING2) (dt,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         Mcells, dx[2], d_gamma, d_godunov_order,
+         sound_speed.getPointer(),
+         traced_left.getPointer(2),
+         traced_right.getPointer(2),
+         ttcelslp.getPointer(),
+         ttedgslp.getPointer(),
+         ttsound.getPointer(),
+         ttraclft.getPointer(),
+         ttracrgt.getPointer());
+
+   } // if (d_godunov_order > 1) ...
+
+   for (int idir = 0; idir < NDIM; idir++) {
+
+      /*
+       *    Approximate traces at cell centers (in idir direction);
+       * i.e.,  "1/3 state".
+       *    Inputs:  F (flux), rho, v, P
+       *    Output:  third_state
+       */
+      F77_FUNC(onethirdstate, ONETHIRDSTATE) (dt, dx, idir,
+         ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+         d_gamma,
+         density->getPointer(),
+         velocity->getPointer(),
+         pressure->getPointer(),
+         flux->getPointer(0),
+         flux->getPointer(1),
+         flux->getPointer(2),
+         third_state.getPointer());
+
+      /*
+       *    Compute fluxes using 1/3 state traces, in the two directions OTHER
+       *    than idir.
+       *    Inputs:  third_state, rho, v, P
+       *    Output:  temp_flux (only directions other than idir are modified)
+       */
+      F77_FUNC(fluxthird, FLUXTHIRD) (dt, dx, idir,
+         ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+         d_gamma,
+         d_riemann_solve_int,
+         density->getPointer(),
+         velocity->getPointer(),
+         pressure->getPointer(),
+         third_state.getPointer(),
+         temp_flux.getPointer(0),
+         temp_flux.getPointer(1),
+         temp_flux.getPointer(2));
+      /*
+       *    Compute transverse corrections for the traces in the two
+       *    directions (OTHER than idir) using the flux differences
+       *    computed in those directions.
+       *    Inputs:  temp_flux, rho, v, P
+       *    Output:  w^L, w^R (traced_left/right)
+       */
+      F77_FUNC(fluxcorrecjt, FLUXCORRECJT) (dt, dx, idir,
+         ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+         d_gamma,
+         density->getPointer(),
+         velocity->getPointer(),
+         pressure->getPointer(),
+         temp_flux.getPointer(0),
+         temp_flux.getPointer(1),
+         temp_flux.getPointer(2),
+         traced_left.getPointer(0),
+         traced_left.getPointer(1),
+         traced_left.getPointer(2),
+         traced_right.getPointer(0),
+         traced_right.getPointer(1),
+         traced_right.getPointer(2));
+
+   }  // loop over directions...
+
+   boundaryReset(patch, traced_left, traced_right);
+
+   /*
+    *  Final flux calculation using corrected trace states.
+    *  Inputs:  w^L, w^R (traced_left/right)
+    *  Output:  F (flux)
+    */
+   F77_FUNC(fluxcalculation, FLUXCALCULATION) (dt, 0, 0, 0, dx,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      d_gamma,
+      d_riemann_solve_int,
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2));
+
+}
+#endif
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Update Euler solution variables by performing a conservative          *
+ * difference with the fluxes calculated in computeFluxesOnPatch().      *
+ * Although, "primitive" variables are maintained (i.e., density,        *
+ * velocity, pressure), "conserved" variables (i.e., density,            *
+ * momentum, total energy) are conserved.                                *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::conservativeDifferenceOnPatch(
+   hier::Patch& patch,
+   const double time,
+   const double dt,
+   bool at_syncronization)
+{
+   (void)time;
+   (void)dt;
+   (void)at_syncronization;
+
+   t_conservdiff->start();
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+
+   hier::Box pbox = patch.getBox();
+   const hier::Index ifirst = pbox.lower();
+   const hier::Index ilast = pbox.upper();
+
+   tbox::Pointer<pdat::FaceData<double> > flux =
+      patch.getPatchData(d_flux, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > density =
+      patch.getPatchData(d_density, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > velocity =
+      patch.getPatchData(d_velocity, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > pressure =
+      patch.getPatchData(d_pressure, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!density.isNull());
+   TBOX_ASSERT(!velocity.isNull());
+   TBOX_ASSERT(!pressure.isNull());
+   TBOX_ASSERT(!flux.isNull());
+   TBOX_ASSERT(density->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(velocity->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(pressure->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(flux->getGhostCellWidth() == d_fluxghosts);
+#endif
+
+#if (NDIM == 2)
+   F77_FUNC(consdiff, CONSDIFF) (ifirst(0), ilast(0), ifirst(1), ilast(1), dx,
+      flux->getPointer(0),
+      flux->getPointer(1),
+      d_gamma,
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer());
+#endif
+#if (NDIM == 3)
+   F77_FUNC(consdiff, CONSDIFF) (ifirst(0), ilast(0), ifirst(1), ilast(1),
+      ifirst(2), ilast(2), dx,
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      d_gamma,
+      density->getPointer(),
+      velocity->getPointer(),
+      pressure->getPointer());
+#endif
+
+   t_conservdiff->stop();
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Reset physical boundary values for special cases, such as those       *
+ * involving reflective boundary conditions and when the "STEP"          *
+ * problem is run.                                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::boundaryReset(
+   hier::Patch& patch,
+   pdat::FaceData<double>& traced_left,
+   pdat::FaceData<double>& traced_right) const
+{
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+   int i, idir;
+   bool bdry_cell = true;
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   hier::BoxArray domain_boxes;
+   d_grid_geometry->computePhysicalDomain(domain_boxes, patch_geom->getRatio());
+   int num_domain_boxes = domain_boxes.getNumberOfBoxes();
+   const double* dx = patch_geom->getDx();
+   const double* xpatchhi = patch_geom->getXUpper();
+   const double* xdomainhi = d_grid_geometry->getXUpper();
+
+   pdat::CellIndex icell = ifirst;
+   hier::BoxArray bdrybox(2 * NDIM);
+   hier::Index ibfirst = ifirst;
+   hier::Index iblast = ilast;
+   int bdry_case;
+
+   for (idir = 0; idir < NDIM; idir++) {
+      ibfirst(idir) = ifirst(idir) - 1;
+      iblast(idir) = ifirst(idir) - 1;
+      bdrybox[2 * idir] = hier::Box(ibfirst, iblast);
+
+      ibfirst(idir) = ilast(idir) + 1;
+      iblast(idir) = ilast(idir) + 1;
+      bdrybox[2 * idir + 1] = hier::Box(ibfirst, iblast);
+   }
+
+   for (idir = 0; idir < NDIM; idir++) {
+      int bside = 2 * idir;
+#if (NDIM == 2)
+      bdry_case = d_master_bdry_edge_conds[bside];
+#endif
+#if (NDIM == 3)
+      bdry_case = d_master_bdry_face_conds[bside];
+#endif
+      if (bdry_case == REFLECT_BC) {
+         for (pdat::CellIterator ic(bdrybox[bside]); ic; ic++) {
+            for (i = 0; i < num_domain_boxes; i++) {
+               if (domain_boxes[i].contains(ic()))
+                  bdry_cell = false;
+            }
+            if (bdry_cell) {
+               pdat::FaceIndex sidein = pdat::FaceIndex(ic(), idir, 1);
+               (traced_left)(sidein, 0) = (traced_right)(sidein, 0);
+            }
+         }
+      }
+
+      int bnode = 2 * idir + 1;
+#if (NDIM == 2)
+      bdry_case = d_master_bdry_edge_conds[bnode];
+#endif
+#if (NDIM == 3)
+      bdry_case = d_master_bdry_face_conds[bnode];
+#endif
+// BEGIN SIMPLE-MINDED FIX FOR STEP PROBLEM
+      if ((d_data_problem == "STEP") && (bnode == 1) &&
+          (tbox::MathUtilities<double>::Abs(xpatchhi[0] - xdomainhi[0]) < dx[0])) {
+         bdry_case = FLOW_BC;
+      }
+// END SIMPLE-MINDED FIX FOR STEP PROBLEM
+      if (bdry_case == REFLECT_BC) {
+         for (pdat::CellIterator ic(bdrybox[bnode]); ic; ic++) {
+            for (i = 0; i < num_domain_boxes; i++) {
+               if (domain_boxes[i].contains(ic()))
+                  bdry_cell = false;
+            }
+            if (bdry_cell) {
+               pdat::FaceIndex sidein = pdat::FaceIndex(ic(), idir, 0);
+               (traced_right)(sidein, 0) = (traced_left)(sidein, 0);
+            }
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Refine velocity and pressure by conservatively refining               *
+ * momentum and total energy.                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+hier::IntVector<NDIM> Euler::getRefineOpStencilWidth() const
+{
+   return hier::IntVector<NDIM>(1);
+}
+
+void Euler::postprocessRefine(
+   hier::Patch& fine,
+   const hier::Patch& coarse,
+   const hier::Box& fine_box,
+   const hier::IntVector<NDIM>& ratio)
+{
+
+   tbox::Pointer<pdat::CellData<double> > cdensity =
+      coarse.getPatchData(d_density, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > cvelocity =
+      coarse.getPatchData(d_velocity, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > cpressure =
+      coarse.getPatchData(d_pressure, getDataContext());
+
+   tbox::Pointer<pdat::CellData<double> > fdensity =
+      fine.getPatchData(d_density, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > fvelocity =
+      fine.getPatchData(d_velocity, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > fpressure =
+      fine.getPatchData(d_pressure, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!cdensity.isNull());
+   TBOX_ASSERT(!cvelocity.isNull());
+   TBOX_ASSERT(!cpressure.isNull());
+   TBOX_ASSERT(!fdensity.isNull());
+   TBOX_ASSERT(!fvelocity.isNull());
+   TBOX_ASSERT(!fpressure.isNull());
+
+   hier::IntVector<NDIM> gccheck = cdensity->getGhostCellWidth();
+   TBOX_ASSERT(cvelocity->getGhostCellWidth() == gccheck);
+   TBOX_ASSERT(cpressure->getGhostCellWidth() == gccheck);
+
+   gccheck = fdensity->getGhostCellWidth();
+   TBOX_ASSERT(fvelocity->getGhostCellWidth() == gccheck);
+   TBOX_ASSERT(fpressure->getGhostCellWidth() == gccheck);
+#endif
+
+   const hier::Box cgbox(cdensity->getGhostBox());
+
+   const hier::Index cilo = cgbox.lower();
+   const hier::Index cihi = cgbox.upper();
+   const hier::Index filo = fdensity->getGhostBox().lower();
+   const hier::Index fihi = fdensity->getGhostBox().upper();
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+   const tbox::Pointer<geom::CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+
+   const hier::Box coarse_box = hier::Box::coarsen(fine_box, ratio);
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+   const hier::Index ifirstf = fine_box.lower();
+   const hier::Index ilastf = fine_box.upper();
+
+   const hier::IntVector<NDIM> cons_ghosts(1);
+   pdat::CellData<double> conserved(coarse_box, 1, cons_ghosts);
+
+   const hier::IntVector<NDIM> tmp_ghosts(0);
+
+   double* diff0 = new double[coarse_box.numberCells(0) + 1];
+   pdat::CellData<double> slope0(coarse_box, 1, tmp_ghosts);
+
+   double* diff1 = new double[coarse_box.numberCells(1) + 1];
+   pdat::CellData<double> slope1(coarse_box, 1, tmp_ghosts);
+
+#if (NDIM == 3)
+   double* diff2 = new double[coarse_box.numberCells(2) + 1];
+   pdat::CellData<double> slope2(coarse_box, 1, tmp_ghosts);
+#endif
+
+#if (NDIM == 2)
+   pdat::CellData<double> flat0(coarse_box, 1, tmp_ghosts);
+   pdat::CellData<double> flat1(coarse_box, 1, tmp_ghosts);
+   int mc = cihi(0) - cilo(0) + 1;
+   mc = tbox::MathUtilities<int>::Max(mc, cihi(1) - cilo(1) + 1);
+   double* tflat = new double[mc];
+   double* tflat2 = new double[mc];
+   double* tsound = new double[mc];
+   double* tdensc = new double[mc];
+   double* tpresc = new double[mc];
+   double* tvelc = new double[mc];
+   F77_FUNC(conservlinint2d, CONSERVLININT2D) (ifirstc(0), ifirstc(1), ilastc(0),
+      ilastc(1),                                                                         /* input */
+      ifirstf(0), ifirstf(1), ilastf(0), ilastf(1),
+      cilo(0), cilo(1), cihi(0), cihi(1),
+      filo(0), filo(1), fihi(0), fihi(1),
+      ratio,
+      cgeom->getDx(),
+      fgeom->getDx(),
+      d_gamma,
+      cdensity->getPointer(),
+      fdensity->getPointer(),
+      cvelocity->getPointer(),
+      cpressure->getPointer(),
+      fvelocity->getPointer(),                                 /* output */
+      fpressure->getPointer(),
+      conserved.getPointer(),                                 /* temporaries */
+      tflat, tflat2, tsound, mc,
+      tdensc, tpresc, tvelc,
+      flat0.getPointer(),
+      flat1.getPointer(),
+      diff0, slope0.getPointer(),
+      diff1, slope1.getPointer());
+#endif
+#if (NDIM == 3)
+   pdat::CellData<double> flat0(coarse_box, 1, tmp_ghosts);
+   pdat::CellData<double> flat1(coarse_box, 1, tmp_ghosts);
+   pdat::CellData<double> flat2(coarse_box, 1, tmp_ghosts);
+   int mc = cihi(0) - cilo(0) + 1;
+   mc = tbox::MathUtilities<int>::Max(mc, cihi(1) - cilo(1) + 1);
+   mc = tbox::MathUtilities<int>::Max(mc, cihi(2) - cilo(2) + 1);
+   double* tflat = new double[mc];
+   double* tflat2 = new double[mc];
+   double* tsound = new double[mc];
+   double* tdensc = new double[mc];
+   double* tpresc = new double[mc];
+   double* tvelc = new double[mc];
+   F77_FUNC(conservlinint3d, CONSERVLININT3D) (ifirstc(0), ifirstc(1),
+      ifirstc(2),                                                                      /* input */
+      ilastc(0), ilastc(1), ilastc(2),
+      ifirstf(0), ifirstf(1), ifirstf(2),
+      ilastf(0), ilastf(1), ilastf(2),
+      cilo(0), cilo(1), cilo(2), cihi(0), cihi(1), cihi(2),
+      filo(0), filo(1), filo(2), fihi(0), fihi(1), fihi(2),
+      ratio,
+      cgeom->getDx(),
+      fgeom->getDx(),
+      d_gamma,
+      cdensity->getPointer(),
+      fdensity->getPointer(),
+      cvelocity->getPointer(),
+      cpressure->getPointer(),
+      fvelocity->getPointer(),                                 /* output */
+      fpressure->getPointer(),
+      conserved.getPointer(),                                 /* temporaries */
+      tflat, tflat2, tsound, mc,
+      tdensc, tpresc, tvelc,
+      flat0.getPointer(),
+      flat1.getPointer(),
+      flat2.getPointer(),
+      diff0, slope0.getPointer(),
+      diff1, slope1.getPointer(),
+      diff2, slope2.getPointer());
+#endif
+   delete[] tflat;
+   delete[] tflat2;
+   delete[] tsound;
+   delete[] tdensc;
+   delete[] tpresc;
+   delete[] tvelc;
+
+   delete[] diff0;
+   delete[] diff1;
+#if (NDIM == 3)
+   delete[] diff2;
+#endif
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Coarsen velocity and pressure by conservatively coarsening            *
+ * momentum and total energy.                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+hier::IntVector<NDIM> Euler::getCoarsenOpStencilWidth() const
+{
+   return hier::IntVector<NDIM>(0);
+}
+
+void Euler::postprocessCoarsen(
+   hier::Patch& coarse,
+   const hier::Patch& fine,
+   const hier::Box& coarse_box,
+   const hier::IntVector<NDIM>& ratio)
+{
+
+   tbox::Pointer<pdat::CellData<double> > fdensity = fine.getPatchData(
+         d_density, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > fvelocity = fine.getPatchData(
+         d_velocity, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > fpressure = fine.getPatchData(
+         d_pressure, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > cdensity = coarse.getPatchData(
+         d_density, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > cvelocity = coarse.getPatchData(
+         d_velocity, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > cpressure = coarse.getPatchData(
+         d_pressure, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!cdensity.isNull());
+   TBOX_ASSERT(!cvelocity.isNull());
+   TBOX_ASSERT(!cpressure.isNull());
+   TBOX_ASSERT(!fdensity.isNull());
+   TBOX_ASSERT(!fvelocity.isNull());
+   TBOX_ASSERT(!fpressure.isNull());
+
+   hier::IntVector<NDIM> gccheck = cdensity->getGhostCellWidth();
+   TBOX_ASSERT(cvelocity->getGhostCellWidth() == gccheck);
+   TBOX_ASSERT(cpressure->getGhostCellWidth() == gccheck);
+
+   gccheck = fdensity->getGhostCellWidth();
+   TBOX_ASSERT(fvelocity->getGhostCellWidth() == gccheck);
+   TBOX_ASSERT(fpressure->getGhostCellWidth() == gccheck);
+#endif
+
+   const hier::Index filo = fdensity->getGhostBox().lower();
+   const hier::Index fihi = fdensity->getGhostBox().upper();
+   const hier::Index cilo = cdensity->getGhostBox().lower();
+   const hier::Index cihi = cdensity->getGhostBox().upper();
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> fgeom =
+      fine.getPatchGeometry();
+   const tbox::Pointer<geom::CartesianPatchGeometry> cgeom =
+      coarse.getPatchGeometry();
+
+   const hier::Box fine_box = hier::Box::refine(coarse_box, ratio);
+   const hier::Index ifirstc = coarse_box.lower();
+   const hier::Index ilastc = coarse_box.upper();
+   const hier::Index ifirstf = fine_box.lower();
+   const hier::Index ilastf = fine_box.upper();
+
+   const hier::IntVector<NDIM> cons_ghosts(0);
+   pdat::CellData<double> conserved(fine_box, 1, cons_ghosts);
+
+#if (NDIM == 2)
+   F77_FUNC(conservavg2d, CONSERVAVG2D) (ifirstf(0), ifirstf(1), ilastf(0),
+      ilastf(1),                                                                   /* input */
+      ifirstc(0), ifirstc(1), ilastc(0), ilastc(1),
+      filo(0), filo(1), fihi(0), fihi(1),
+      cilo(0), cilo(1), cihi(0), cihi(1),
+      ratio,
+      fgeom->getDx(),
+      cgeom->getDx(),
+      d_gamma,
+      fdensity->getPointer(),
+      cdensity->getPointer(),
+      fvelocity->getPointer(),
+      fpressure->getPointer(),
+      cvelocity->getPointer(),                               /* output */
+      cpressure->getPointer(),
+      conserved.getPointer());                              /* temporary */
+#endif
+#if (NDIM == 3)
+   F77_FUNC(conservavg3d, CONSERVAVG3D) (ifirstf(0), ifirstf(1), ifirstf(2),       /* input */
+      ilastf(0), ilastf(1), ilastf(2),
+      ifirstc(0), ifirstc(1), ifirstc(2),
+      ilastc(0), ilastc(1), ilastc(2),
+      filo(0), filo(1), filo(2), fihi(0), fihi(1), fihi(2),
+      cilo(0), cilo(1), cilo(2), cihi(0), cihi(1), cihi(2),
+      ratio,
+      fgeom->getDx(),
+      cgeom->getDx(),
+      d_gamma,
+      fdensity->getPointer(),
+      cdensity->getPointer(),
+      fvelocity->getPointer(),
+      fpressure->getPointer(),
+      cvelocity->getPointer(),                               /* output */
+      cpressure->getPointer(),
+      conserved.getPointer());
+#endif
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set the data in ghost cells corresponding to physical boundary        *
+ * conditions.  Note that boundary geometry configuration information    *
+ * (i.e., faces, edges, and nodes) is obtained from the patch geometry   *
+ * object owned by the patch.                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::setPhysicalBoundaryConditions(
+   hier::Patch& patch,
+   const double fill_time,
+   const hier::IntVector<NDIM>& ghost_width_to_fill)
+{
+   (void)fill_time;
+   t_setphysbcs->start();
+
+   tbox::Pointer<pdat::CellData<double> > density =
+      patch.getPatchData(d_density, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > velocity =
+      patch.getPatchData(d_velocity, getDataContext());
+   tbox::Pointer<pdat::CellData<double> > pressure =
+      patch.getPatchData(d_pressure, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!density.isNull());
+   TBOX_ASSERT(!velocity.isNull());
+   TBOX_ASSERT(!pressure.isNull());
+#endif
+   hier::IntVector<NDIM> ghost_cells = density->getGhostCellWidth();
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(velocity->getGhostCellWidth() == ghost_cells);
+   TBOX_ASSERT(pressure->getGhostCellWidth() == ghost_cells);
+#endif
+
+#if (NDIM == 2)
+
+   /*
+    * Set boundary conditions for cells corresponding to patch edges.
+    *
+    * Note: We apply a simple-minded adjustment for the "STEP" problem
+    *       so that the right edge of the domain gets (out)FLOW conditions
+    *       whereas the right edge at the step gets REFLECT condtions (from input),
+    */
+   tbox::Array<int> tmp_edge_scalar_bcond(NUM_2D_EDGES);
+   tbox::Array<int> tmp_edge_vector_bcond(NUM_2D_EDGES);
+   for (int i = 0; i < NUM_2D_EDGES; i++) {
+      tmp_edge_scalar_bcond[i] = d_scalar_bdry_edge_conds[i];
+      tmp_edge_vector_bcond[i] = d_vector_bdry_edge_conds[i];
+   }
+
+   if (d_data_problem == "STEP") {
+
+      const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+         patch.getPatchGeometry();
+      const double* dx = patch_geom->getDx();
+      const double* xpatchhi = patch_geom->getXUpper();
+      const double* xdomainhi = d_grid_geometry->getXUpper();
+
+      if (tbox::MathUtilities<double>::Abs(xpatchhi[0] - xdomainhi[0]) <
+          dx[0]) {
+         tmp_edge_scalar_bcond[XHI] = FLOW_BC;
+         tmp_edge_vector_bcond[XHI] = FLOW_BC;
+      }
+
+   }
+
+   appu::CartesianBoundaryUtilities2::
+   fillEdgeBoundaryData("density", density,
+      patch,
+      ghost_width_to_fill,
+      tmp_edge_scalar_bcond,
+      d_bdry_edge_density);
+   appu::CartesianBoundaryUtilities2::
+   fillEdgeBoundaryData("velocity", velocity,
+      patch,
+      ghost_width_to_fill,
+      tmp_edge_vector_bcond,
+      d_bdry_edge_velocity);
+   appu::CartesianBoundaryUtilities2::
+   fillEdgeBoundaryData("pressure", pressure,
+      patch,
+      ghost_width_to_fill,
+      tmp_edge_scalar_bcond,
+      d_bdry_edge_pressure);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+#if CHECK_BDRY_DATA
+   checkBoundaryData(EDGE2D_BDRY_TYPE, patch, ghost_width_to_fill,
+      tmp_edge_scalar_bcond, tmp_edge_vector_bcond);
+#endif
+#endif
+
+   /*
+    *  Set boundary conditions for cells corresponding to patch nodes.
+    */
+
+   appu::CartesianBoundaryUtilities2::
+   fillNodeBoundaryData("density", density,
+      patch,
+      ghost_width_to_fill,
+      d_scalar_bdry_node_conds,
+      d_bdry_edge_density);
+   appu::CartesianBoundaryUtilities2::
+   fillNodeBoundaryData("velocity", velocity,
+      patch,
+      ghost_width_to_fill,
+      d_vector_bdry_node_conds,
+      d_bdry_edge_velocity);
+   appu::CartesianBoundaryUtilities2::
+   fillNodeBoundaryData("pressure", pressure,
+      patch,
+      ghost_width_to_fill,
+      d_scalar_bdry_node_conds,
+      d_bdry_edge_pressure);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+#if CHECK_BDRY_DATA
+   checkBoundaryData(NODE2D_BDRY_TYPE, patch, ghost_width_to_fill,
+      d_scalar_bdry_node_conds, d_vector_bdry_node_conds);
+#endif
+#endif
+
+#endif // NDIM == 2
+
+#if (NDIM == 3)
+
+   /*
+    *  Set boundary conditions for cells corresponding to patch faces.
+    */
+
+   appu::CartesianBoundaryUtilities3::
+   fillFaceBoundaryData("density", density,
+      patch,
+      ghost_width_to_fill,
+      d_scalar_bdry_face_conds,
+      d_bdry_face_density);
+   appu::CartesianBoundaryUtilities3::
+   fillFaceBoundaryData("velocity", velocity,
+      patch,
+      ghost_width_to_fill,
+      d_vector_bdry_face_conds,
+      d_bdry_face_velocity);
+   appu::CartesianBoundaryUtilities3::
+   fillFaceBoundaryData("pressure", pressure,
+      patch,
+      ghost_width_to_fill,
+      d_scalar_bdry_face_conds,
+      d_bdry_face_pressure);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+#if CHECK_BDRY_DATA
+   checkBoundaryData(FACE3D_BDRY_TYPE, patch, ghost_width_to_fill,
+      d_scalar_bdry_face_conds, d_vector_bdry_face_conds);
+#endif
+#endif
+
+   /*
+    *  Set boundary conditions for cells corresponding to patch edges.
+    */
+
+   appu::CartesianBoundaryUtilities3::
+   fillEdgeBoundaryData("density", density,
+      patch,
+      ghost_width_to_fill,
+      d_scalar_bdry_edge_conds,
+      d_bdry_face_density);
+   appu::CartesianBoundaryUtilities3::
+   fillEdgeBoundaryData("velocity", velocity,
+      patch,
+      ghost_width_to_fill,
+      d_vector_bdry_edge_conds,
+      d_bdry_face_velocity);
+   appu::CartesianBoundaryUtilities3::
+   fillEdgeBoundaryData("pressure", pressure,
+      patch,
+      ghost_width_to_fill,
+      d_scalar_bdry_edge_conds,
+      d_bdry_face_pressure);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+#if CHECK_BDRY_DATA
+   checkBoundaryData(EDGE3D_BDRY_TYPE, patch, ghost_width_to_fill,
+      d_scalar_bdry_edge_conds, d_vector_bdry_edge_conds);
+#endif
+#endif
+
+   /*
+    *  Set boundary conditions for cells corresponding to patch nodes.
+    */
+
+   appu::CartesianBoundaryUtilities3::
+   fillNodeBoundaryData("density", density,
+      patch,
+      ghost_width_to_fill,
+      d_scalar_bdry_node_conds,
+      d_bdry_face_density);
+   appu::CartesianBoundaryUtilities3::
+   fillNodeBoundaryData("velocity", velocity,
+      patch,
+      ghost_width_to_fill,
+      d_vector_bdry_node_conds,
+      d_bdry_face_velocity);
+   appu::CartesianBoundaryUtilities3::
+   fillNodeBoundaryData("pressure", pressure,
+      patch,
+      ghost_width_to_fill,
+      d_scalar_bdry_node_conds,
+      d_bdry_face_pressure);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+#if CHECK_BDRY_DATA
+   checkBoundaryData(NODE3D_BDRY_TYPE, patch, ghost_width_to_fill,
+      d_scalar_bdry_node_conds, d_scalar_bdry_node_conds);
+#endif
+#endif
+
+#endif // NDIM == 3
+
+   t_setphysbcs->stop();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Tag cells for refinement using gradient detector.  Tagging criteria   *
+ * defined in input.                                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::tagGradientDetectorCells(
+   hier::Patch& patch,
+   const double regrid_time,
+   const bool initial_error,
+   const int tag_indx,
+   const bool uses_richardson_extrapolation_too)
+{
+   (void)initial_error;
+
+   t_taggradient->start();
+
+   const int error_level_number = patch.getPatchLevelNumber();
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+
+   tbox::Pointer<pdat::CellData<int> > tags = patch.getPatchData(tag_indx);
+
+   hier::Box pbox = patch.getBox();
+   hier::Box pboxm1 = pbox.grow(pbox, -1);
+   hier::BoxArray domain_boxes;
+   d_grid_geometry->computePhysicalDomain(domain_boxes, patch_geom->getRatio());
+   /*
+    * Construct domain bounding box
+    */
+   hier::Box domain;
+   for (int i = 0; i < domain_boxes.getNumberOfBoxes(); i++) {
+      domain += domain_boxes[i];
+   }
+
+   const hier::Index domfirst = domain.lower();
+   const hier::Index domlast = domain.upper();
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+
+   /*
+    * Create a set of temporary tags and set to untagged value.
+    */
+
+   tbox::Pointer<pdat::CellData<int> > temp_tags = new pdat::CellData<int>(
+         pbox,
+         1,
+         d_nghosts);
+   temp_tags->fillAll(FALSE);
+
+#if (NDIM == 2)
+   /*
+    * Problem specific criteria for step case.
+    */
+   if (initial_error && d_data_problem == "STEP") {
+      if (error_level_number < 2) {
+         hier::Box tagbox(hier::Index(9, 0), hier::Index(9, 3));
+         if (error_level_number == 1) {
+            tagbox.refine(hier::IntVector<NDIM>(2));
+         }
+         hier::Box ibox = pbox * tagbox;
+
+         for (pdat::CellIterator itc(ibox); itc; itc++) {
+            (*temp_tags)(itc(), 0) = TRUE;
+         }
+      }
+   }
+#endif
+
+   /*
+    * Possible tagging criteria includes
+    *    DENSITY_DEVIATION, DENSITY_GRADIENT, DENSITY_SHOCK
+    *    PRESSURE_DEVIATION, PRESSURE_GRADIENT, PRESSURE_SHOCK
+    * The criteria is specified over a time interval.
+    *
+    * Loop over criteria provided and check to make sure we are in the
+    * specified time interval.  If so, apply appropriate tagging for
+    * the level.
+    */
+   for (int ncrit = 0; ncrit < d_refinement_criteria.getSize(); ncrit++) {
+
+      string ref = d_refinement_criteria[ncrit];
+      tbox::Pointer<pdat::CellData<double> > var;
+      int size = 0;
+      double tol = 0.;
+      double onset = 0.;
+      double dev = 0.;
+      bool time_allowed = false;
+
+      if (ref == "DENSITY_DEVIATION") {
+         var = patch.getPatchData(d_density, getDataContext());
+         size = d_density_dev_tol.getSize();
+         tol = ((error_level_number < size)
+                ? d_density_dev_tol[error_level_number]
+                : d_density_dev_tol[size - 1]);
+         size = d_density_dev.getSize();
+         dev = ((error_level_number < size)
+                ? d_density_dev[error_level_number]
+                : d_density_dev[size - 1]);
+         size = d_density_dev_time_min.getSize();
+         double time_min = ((error_level_number < size)
+                            ? d_density_dev_time_min[error_level_number]
+                            : d_density_dev_time_min[size - 1]);
+         size = d_density_dev_time_max.getSize();
+         double time_max = ((error_level_number < size)
+                            ? d_density_dev_time_max[error_level_number]
+                            : d_density_dev_time_max[size - 1]);
+         time_allowed = (time_min <= regrid_time) && (time_max > regrid_time);
+      }
+
+      if (ref == "DENSITY_GRADIENT") {
+         var = patch.getPatchData(d_density, getDataContext());
+         size = d_density_grad_tol.getSize();
+         tol = ((error_level_number < size)
+                ? d_density_grad_tol[error_level_number]
+                : d_density_grad_tol[size - 1]);
+         size = d_density_grad_time_min.getSize();
+         double time_min = ((error_level_number < size)
+                            ? d_density_grad_time_min[error_level_number]
+                            : d_density_grad_time_min[size - 1]);
+         size = d_density_grad_time_max.getSize();
+         double time_max = ((error_level_number < size)
+                            ? d_density_grad_time_max[error_level_number]
+                            : d_density_grad_time_max[size - 1]);
+         time_allowed = (time_min <= regrid_time) && (time_max > regrid_time);
+      }
+
+      if (ref == "DENSITY_SHOCK") {
+         var = patch.getPatchData(d_density, getDataContext());
+         size = d_density_shock_tol.getSize();
+         tol = ((error_level_number < size)
+                ? d_density_shock_tol[error_level_number]
+                : d_density_shock_tol[size - 1]);
+         size = d_density_shock_onset.getSize();
+         onset = ((error_level_number < size)
+                  ? d_density_shock_onset[error_level_number]
+                  : d_density_shock_onset[size - 1]);
+         size = d_density_shock_time_min.getSize();
+         double time_min = ((error_level_number < size)
+                            ? d_density_shock_time_min[error_level_number]
+                            : d_density_shock_time_min[size - 1]);
+         size = d_density_shock_time_max.getSize();
+         double time_max = ((error_level_number < size)
+                            ? d_density_shock_time_max[error_level_number]
+                            : d_density_shock_time_max[size - 1]);
+         time_allowed = (time_min <= regrid_time) && (time_max > regrid_time);
+      }
+
+      if (ref == "PRESSURE_DEVIATION") {
+         var = patch.getPatchData(d_pressure, getDataContext());
+         size = d_pressure_dev_tol.getSize();
+         tol = ((error_level_number < size)
+                ? d_pressure_dev_tol[error_level_number]
+                : d_pressure_dev_tol[size - 1]);
+         size = d_pressure_dev.getSize();
+         dev = ((error_level_number < size)
+                ? d_pressure_dev[error_level_number]
+                : d_pressure_dev[size - 1]);
+         size = d_pressure_dev_time_min.getSize();
+         double time_min = ((error_level_number < size)
+                            ? d_pressure_dev_time_min[error_level_number]
+                            : d_pressure_dev_time_min[size - 1]);
+         size = d_pressure_dev_time_max.getSize();
+         double time_max = ((error_level_number < size)
+                            ? d_pressure_dev_time_max[error_level_number]
+                            : d_pressure_dev_time_max[size - 1]);
+         time_allowed = (time_min <= regrid_time) && (time_max > regrid_time);
+      }
+
+      if (ref == "PRESSURE_GRADIENT") {
+         var = patch.getPatchData(d_pressure, getDataContext());
+         size = d_pressure_grad_tol.getSize();
+         tol = ((error_level_number < size)
+                ? d_pressure_grad_tol[error_level_number]
+                : d_pressure_grad_tol[size - 1]);
+         size = d_pressure_grad_time_min.getSize();
+         double time_min = ((error_level_number < size)
+                            ? d_pressure_grad_time_min[error_level_number]
+                            : d_pressure_grad_time_min[size - 1]);
+         size = d_pressure_grad_time_max.getSize();
+         double time_max = ((error_level_number < size)
+                            ? d_pressure_grad_time_max[error_level_number]
+                            : d_pressure_grad_time_max[size - 1]);
+         time_allowed = (time_min <= regrid_time) && (time_max > regrid_time);
+      }
+
+      if (ref == "PRESSURE_SHOCK") {
+         var = patch.getPatchData(d_pressure, getDataContext());
+         size = d_pressure_shock_tol.getSize();
+         tol = ((error_level_number < size)
+                ? d_pressure_shock_tol[error_level_number]
+                : d_pressure_shock_tol[size - 1]);
+         size = d_pressure_shock_onset.getSize();
+         onset = ((error_level_number < size)
+                  ? d_pressure_shock_onset[error_level_number]
+                  : d_pressure_shock_onset[size - 1]);
+         size = d_pressure_shock_time_min.getSize();
+         double time_min = ((error_level_number < size)
+                            ? d_pressure_shock_time_min[error_level_number]
+                            : d_pressure_shock_time_min[size - 1]);
+         size = d_pressure_shock_time_max.getSize();
+         double time_max = ((error_level_number < size)
+                            ? d_pressure_shock_time_max[error_level_number]
+                            : d_pressure_shock_time_max[size - 1]);
+         time_allowed = (time_min <= regrid_time) && (time_max > regrid_time);
+      }
+
+      if (time_allowed) {
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!var.isNull());
+#endif
+
+         hier::IntVector<NDIM> vghost = var->getGhostCellWidth();
+         hier::IntVector<NDIM> tagghost = tags->getGhostCellWidth();
+
+         if (ref == "DENSITY_DEVIATION" || ref == "PRESSURE_DEVIATION") {
+
+            /*
+             * Check for tags that have already been set in a previous
+             * step.  Do NOT consider values tagged with value
+             * RICHARDSON_NEWLY_TAGGED since these were set most recently
+             * by Richardson extrapolation.
+             */
+            for (pdat::CellIterator ic(pbox); ic; ic++) {
+               double locden = tol;
+               int tag_val = (*tags)(ic(), 0);
+               if (tag_val) {
+                  if (tag_val != RICHARDSON_NEWLY_TAGGED) {
+                     locden *= 0.75;
+                  }
+               }
+               if (tbox::MathUtilities<double>::Abs((*var)(ic()) - dev) >
+                   locden) {
+                  (*temp_tags)(ic(), 0) = TRUE;
+               }
+            }
+         }
+
+         if (ref == "DENSITY_GRADIENT" || ref == "PRESSURE_GRADIENT") {
+            F77_FUNC(detectgrad, DETECTGRAD) (ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+#if (NDIM > 2)
+               ifirst(2), ilast(2),
+#endif
+               vghost(0), tagghost(0), d_nghosts(0),
+               vghost(1), tagghost(1), d_nghosts(1),
+#if (NDIM > 2)
+               vghost(2), tagghost(2), d_nghosts(2),
+#endif
+               dx,
+               tol,
+               TRUE, FALSE,
+               var->getPointer(),
+               tags->getPointer(), temp_tags->getPointer());
+         }
+
+         if (ref == "DENSITY_SHOCK" || ref == "PRESSURE_SHOCK") {
+            F77_FUNC(detectshock, DETECTSHOCK) (ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+#if (NDIM > 2)
+               ifirst(2), ilast(2),
+#endif
+               vghost(0), tagghost(0), d_nghosts(0),
+               vghost(1), tagghost(1), d_nghosts(1),
+#if (NDIM > 2)
+               vghost(2), tagghost(2), d_nghosts(2),
+#endif
+               dx,
+               tol,
+               onset,
+               TRUE, FALSE,
+               var->getPointer(),
+               tags->getPointer(), temp_tags->getPointer());
+         }
+
+      }  // if time_allowed
+
+   }  // loop over criteria
+
+   /*
+    * Adjust temp_tags from those tags set in Richardson extrapolation.
+    */
+   if (uses_richardson_extrapolation_too) {
+      for (pdat::CellIterator ic(pbox); ic; ic++) {
+         if ((*tags)(ic(), 0) == RICHARDSON_ALREADY_TAGGED ||
+             (*tags)(ic(), 0) == RICHARDSON_NEWLY_TAGGED) {
+            (*temp_tags)(ic(), 0) = TRUE;
+         }
+      }
+   }
+
+   /*
+    * Update tags
+    */
+   for (pdat::CellIterator ic(pbox); ic; ic++) {
+      (*tags)(ic(), 0) = (*temp_tags)(ic(), 0);
+   }
+
+   t_taggradient->stop();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Tag cells for refinement using Richardson extrapolation.  Criteria    *
+ * defined in input.                                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::tagRichardsonExtrapolationCells(
+   hier::Patch& patch,
+   const int error_level_number,
+   const tbox::Pointer<hier::VariableContext> coarsened_fine,
+   const tbox::Pointer<hier::VariableContext> advanced_coarse,
+   const double regrid_time,
+   const double deltat,
+   const int error_coarsen_ratio,
+   const bool initial_error,
+   const int tag_index,
+   const bool uses_gradient_detector_too)
+{
+   (void)initial_error;
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* xdomainlo = d_grid_geometry->getXLower();
+   const double* xdomainhi = d_grid_geometry->getXUpper();
+
+   hier::Box pbox = patch.getBox();
+
+   tbox::Pointer<pdat::CellData<int> > tags = patch.getPatchData(tag_index);
+
+   /*
+    * Possible tagging criteria includes
+    *    DENSITY_RICHARDSON, PRESSURE_RICHARDSON
+    * The criteria is specified over a time interval.
+    *
+    * Loop over criteria provided and check to make sure we are in the
+    * specified time interval.  If so, apply appropriate tagging for
+    * the level.
+    */
+   for (int ncrit = 0; ncrit < d_refinement_criteria.getSize(); ncrit++) {
+
+      string ref = d_refinement_criteria[ncrit];
+      tbox::Pointer<pdat::CellData<double> > coarsened_fine_var;
+      tbox::Pointer<pdat::CellData<double> > advanced_coarse_var;
+      int size = 0;
+      double tol = 0.;
+      bool time_allowed = false;
+
+      if (ref == "DENSITY_RICHARDSON") {
+         coarsened_fine_var = patch.getPatchData(d_density, coarsened_fine);
+         advanced_coarse_var = patch.getPatchData(d_density, advanced_coarse);
+         size = d_density_rich_tol.getSize();
+         tol = ((error_level_number < size)
+                ? d_density_rich_tol[error_level_number]
+                : d_density_rich_tol[size - 1]);
+         size = d_density_rich_time_min.getSize();
+         double time_min = ((error_level_number < size)
+                            ? d_density_rich_time_min[error_level_number]
+                            : d_density_rich_time_min[size - 1]);
+         size = d_density_rich_time_max.getSize();
+         double time_max = ((error_level_number < size)
+                            ? d_density_rich_time_max[error_level_number]
+                            : d_density_rich_time_max[size - 1]);
+         time_allowed = (time_min <= regrid_time) && (time_max > regrid_time);
+      }
+
+      if (ref == "PRESSURE_RICHARDSON") {
+         coarsened_fine_var = patch.getPatchData(d_pressure, coarsened_fine);
+         advanced_coarse_var = patch.getPatchData(d_pressure, advanced_coarse);
+         size = d_pressure_rich_tol.getSize();
+         tol = ((error_level_number < size)
+                ? d_pressure_rich_tol[error_level_number]
+                : d_pressure_rich_tol[size - 1]);
+         size = d_pressure_rich_time_min.getSize();
+         double time_min = ((error_level_number < size)
+                            ? d_pressure_rich_time_min[error_level_number]
+                            : d_pressure_rich_time_min[size - 1]);
+         size = d_pressure_rich_time_max.getSize();
+         double time_max = ((error_level_number < size)
+                            ? d_pressure_rich_time_max[error_level_number]
+                            : d_pressure_rich_time_max[size - 1]);
+         time_allowed = (time_min <= regrid_time) && (time_max > regrid_time);
+      }
+
+      if (time_allowed) {
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(!coarsened_fine_var.isNull());
+         TBOX_ASSERT(!advanced_coarse_var.isNull());
+#endif
+
+         if (ref == "DENSITY_RICHARDSON" || ref == "PRESSURE_RICHARDSON") {
+
+            /*
+             * We tag wherever the global error > specified tolerance.
+             * The estimated global error is the
+             * local truncation error * the approximate number of steps
+             * used in the simulation.  Approximate the number of steps as:
+             *
+             *       steps = L / (s*deltat)
+             * where
+             *       L = length of problem domain
+             *       s = wave speed
+             *       delta t = timestep on current level
+             *
+             * Compute max wave speed from delta t.  This presumes that
+             * deltat was computed as deltat = dx/s_max.  We have deltat
+             * and dx, so back out s_max from this.
+             */
+
+            const double* dx = patch_geom->getDx();
+            double max_dx = 0.;
+            double max_length = 0.;
+            for (int idir = 0; idir < NDIM; idir++) {
+               max_dx = tbox::MathUtilities<double>::Max(max_dx, dx[idir]);
+               double length = xdomainhi[idir] - xdomainlo[idir];
+               max_length =
+                  tbox::MathUtilities<double>::Max(max_length, length);
+            }
+            double max_wave_speed = max_dx / deltat;
+            double steps = max_length / (max_wave_speed * deltat);
+
+            /*
+             * Tag cells where |w_c - w_f| * (r^n -1) * steps
+             *
+             * where
+             *       w_c = soln on coarse level (pressure_crse)
+             *       w_f = soln on fine level (pressure_fine)
+             *       r   = error coarsen ratio
+             *       n   = spatial order of scheme (1st or 2nd depending
+             *             on whether Godunov order is 1st or 2nd/4th)
+             */
+            int order = 1;
+            if (d_godunov_order > 1) order = 2;
+            double r = error_coarsen_ratio;
+            double rnminus1 = pow(r, order) - 1;
+
+            double diff = 0.;
+            double error = 0.;
+
+            for (pdat::CellIterator ic(pbox); ic; ic++) {
+
+               /*
+                * Compute error norm
+                */
+               diff = (*advanced_coarse_var)(ic(), 0)
+                  - (*coarsened_fine_var)(ic(), 0);
+               error =
+                  tbox::MathUtilities<double>::Abs(diff) * rnminus1 * steps;
+
+               /*
+                * Tag cell if error > prescribed threshold. Since we are
+                * operating on the actual tag values (not temporary ones)
+                * distinguish here tags that were previously set before
+                * coming into this routine and those that are set here.
+                *     RICHARDSON_ALREADY_TAGGED - tagged before coming
+                *                                 into this method.
+                *     RICHARDSON_NEWLY_TAGGED - newly tagged in this method
+                */
+               if (error > tol) {
+                  if ((*tags)(ic(), 0)) {
+                     (*tags)(ic(), 0) = RICHARDSON_ALREADY_TAGGED;
+                  } else {
+                     (*tags)(ic(), 0) = RICHARDSON_NEWLY_TAGGED;
+                  }
+               }
+            }
+
+         }
+
+      } // time_allowed
+
+   } // loop over refinement criteria
+
+   /*
+    * If we are NOT performing gradient detector (i.e. only
+    * doing Richardson extrapolation) set tags marked in this method
+    * to TRUE and all others false.  Otherwise, leave tags set to the
+    * RICHARDSON_ALREADY_TAGGED and RICHARDSON_NEWLY_TAGGED as we may
+    * use this information in the gradient detector.
+    */
+   if (!uses_gradient_detector_too) {
+      for (pdat::CellIterator ic(pbox); ic; ic++) {
+         if ((*tags)(ic(), 0) == RICHARDSON_ALREADY_TAGGED ||
+             (*tags)(ic(), 0) == RICHARDSON_NEWLY_TAGGED) {
+            (*tags)(ic(), 0) = TRUE;
+         } else {
+            (*tags)(ic(), 0) = FALSE;
+         }
+      }
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register VisIt data writer to write data to plot files that may       *
+ * be postprocessed by the VisIt tool.                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+#ifdef HAVE_HDF5
+void Euler::registerVisItDataWriter(
+   tbox::Pointer<appu::VisItDataWriter> viz_writer)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(viz_writer.isNull()));
+#endif
+   d_visit_writer = viz_writer;
+}
+#endif
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Pack "total energy" and "momentum" (derived Vis plot quantities)      *
+ * for the patch into a double precision buffer.                         *
+ *                                                                       *
+ *************************************************************************
+ */
+
+bool Euler::packDerivedDataIntoDoubleBuffer(
+   double* dbuffer,
+   const hier::Patch& patch,
+   const hier::Box& region,
+   const string& variable_name,
+   int depth_id) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT((region * patch.getBox()) == region);
+#endif
+
+   bool data_on_patch = FALSE;
+
+   tbox::Pointer<pdat::CellData<double> > density =
+      patch.getPatchData(d_density, d_plot_context);
+   tbox::Pointer<pdat::CellData<double> > velocity =
+      patch.getPatchData(d_velocity, d_plot_context);
+   tbox::Pointer<pdat::CellData<double> > pressure =
+      patch.getPatchData(d_pressure, d_plot_context);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!density.isNull());
+   TBOX_ASSERT(!velocity.isNull());
+   TBOX_ASSERT(!pressure.isNull());
+   TBOX_ASSERT(density->getGhostBox() == patch.getBox());
+   TBOX_ASSERT(velocity->getGhostBox() == patch.getBox());
+   TBOX_ASSERT(pressure->getGhostBox() == patch.getBox());
+#endif
+
+   const hier::Box& data_box = density->getGhostBox();
+   const int box_w0 = region.numberCells(0);
+   const int dat_w0 = data_box.numberCells(0);
+   const int box_w1 = region.numberCells(1);
+#if (NDIM > 2)
+   const int dat_w1 = data_box.numberCells(1);
+   const int box_w2 = region.numberCells(2);
+#endif
+
+   if (variable_name == "Total Energy") {
+      const double * const dens = density->getPointer();
+      const double * const xvel = velocity->getPointer(0);
+      const double * const yvel = velocity->getPointer(1);
+#if (NDIM > 2)
+      const double * const zvel = velocity->getPointer(2);
+#endif
+      const double * const pres = pressure->getPointer();
+
+      double valinv = 1.0 / (d_gamma - 1.0);
+      int buf_b1 = 0;
+      int dat_b2 = data_box.offset(region.lower());
+
+#if (NDIM > 2)
+      for (int i2 = 0; i2 < box_w2; i2++) {
+#endif
+      int dat_b1 = dat_b2;
+      for (int i1 = 0; i1 < box_w1; i1++) {
+         for (int i0 = 0; i0 < box_w0; i0++) {
+            int dat_indx = dat_b1 + i0;
+            double v2norm = pow(xvel[dat_indx], 2.0)
+               + pow(yvel[dat_indx], 2.0)
+#if (NDIM > 2)
+               + pow(zvel[dat_indx], 2.0)
+#endif
+            ;
+            double rho = dens[dat_indx];
+            double int_energy = 0.0;
+            if (rho > 0.0) {
+               int_energy = valinv * pres[dat_indx] / dens[dat_indx];
+            }
+            dbuffer[buf_b1 + i0] =
+               dens[dat_indx] * (0.5 * v2norm + int_energy);
+         }
+         dat_b1 += dat_w0;
+         buf_b1 += box_w0;
+      }
+#if (NDIM > 2)
+      dat_b2 += dat_w1 * dat_w0;
+   }
+#endif
+
+      data_on_patch = TRUE;
+
+   } else if (variable_name == "Momentum") {
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(depth_id < NDIM);
+#endif
+
+      const double * const dens = density->getPointer();
+      const double * const vel = velocity->getPointer(depth_id);
+      int buf_b1 = 0;
+      int dat_b2 = data_box.offset(region.lower());
+
+#if (NDIM > 2)
+      for (int i2 = 0; i2 < box_w2; i2++) {
+#endif
+      int dat_b1 = dat_b2;
+      for (int i1 = 0; i1 < box_w1; i1++) {
+         for (int i0 = 0; i0 < box_w0; i0++) {
+            int dat_indx = dat_b1 + i0;
+            dbuffer[buf_b1 + i0] = dens[dat_indx] * vel[dat_indx];
+         }
+         dat_b1 += dat_w0;
+         buf_b1 += box_w0;
+      }
+#if (NDIM > 2)
+      dat_b2 += dat_w1 * dat_w0;
+   }
+#endif
+
+      data_on_patch = TRUE;
+
+   } else {
+      TBOX_ERROR("Euler::packDerivedDataIntoDoubleBuffer()"
+         << "\n    unknown variable_name " << variable_name << "\n");
+   }
+
+   return data_on_patch;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Write 1d data intersection of patch and pencil box to file            *
+ * with given name for plotting with Matlab.                             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::writeData1dPencil(
+   const tbox::Pointer<hier::Patch> patch,
+   const hier::Box& pencil_box,
+   const int idir,
+   ostream& file)
+{
+
+   const hier::Box& patchbox = patch->getBox();
+   const hier::Box box = pencil_box * patchbox;
+
+   if (!box.empty()) {
+
+      tbox::Pointer<pdat::CellData<double> > density =
+         patch->getPatchData(d_density, getDataContext());
+      tbox::Pointer<pdat::CellData<double> > velocity =
+         patch->getPatchData(d_velocity, getDataContext());
+      tbox::Pointer<pdat::CellData<double> > pressure =
+         patch->getPatchData(d_pressure, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!density.isNull());
+      TBOX_ASSERT(!velocity.isNull());
+      TBOX_ASSERT(!pressure.isNull());
+#endif
+
+      const tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+         patch->getPatchGeometry();
+      const double* dx = pgeom->getDx();
+      const double* xlo = pgeom->getXLower();
+
+      const double cell_center = xlo[idir]
+         + (double(box.lower(idir)
+                   - patchbox.lower(idir))
+            + 0.5) * dx[idir];
+
+      double valinv = 1.0 / (d_gamma - 1.0);
+
+      int ccount = 0;
+      for (pdat::CellIterator ic(box); ic; ic++) {
+         file << cell_center + ccount * dx[idir] << " ";
+         ccount++;
+
+         double rho = (*density)(ic(), 0);
+         double vel = (*velocity)(ic(), idir);
+         double p = (*pressure)(ic(), 0);
+
+         double mom = rho * vel;
+         double eint = 0.0;
+         if (rho > 0.0) {
+            eint = valinv * (p / rho);
+         }
+         double etot = rho * (0.5 * vel * vel + eint);
+
+         /*
+          * Write out conserved quantities.
+          */
+         file << rho << " ";
+         file << mom << " ";
+         file << etot << " ";
+
+         /*
+          * Write out "primitive" quantities and internal energy.
+          */
+         file << p << " ";
+         file << vel << " ";
+         file << eint << " ";
+
+         file << endl;
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Write all class data members to specified output stream.              *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::printClassData(
+   ostream& os) const
+{
+   int j, k;
+
+   os << "\nEuler::printClassData..." << endl;
+   os << "Euler: this = " << (Euler *)this << endl;
+   os << "d_object_name = " << d_object_name << endl;
+   os << "d_grid_geometry = "
+      << (geom::CartesianGridGeometry *)d_grid_geometry << endl;
+
+   os << "Parameters for physical problem ..." << endl;
+   os << "   d_gamma = " << d_gamma << endl;
+
+   os << "Numerical method description and ghost sizes..." << endl;
+   os << "   d_riemann_solve = " << d_riemann_solve << endl;
+   os << "   d_riemann_solve_int = " << d_riemann_solve_int << endl;
+   os << "   d_godunov_order = " << d_godunov_order << endl;
+   os << "   d_corner_transport = " << d_corner_transport << endl;
+   os << "   d_nghosts = " << d_nghosts << endl;
+   os << "   d_fluxghosts = " << d_fluxghosts << endl;
+
+   os << "Problem description and initial data..." << endl;
+   os << "   d_data_problem = " << d_data_problem << endl;
+   os << "   d_data_problem_int = " << d_data_problem_int << endl;
+
+   os << "       d_radius = " << d_radius << endl;
+   os << "       d_center = ";
+   for (j = 0; j < NDIM; j++) os << d_center[j] << " ";
+   os << endl;
+   os << "       d_density_inside = " << d_density_inside << endl;
+   os << "       d_velocity_inside = ";
+   for (j = 0; j < NDIM; j++) os << d_velocity_inside[j] << " ";
+   os << endl;
+   os << "       d_pressure_inside = " << d_pressure_inside << endl;
+   os << "       d_density_outside = " << d_density_outside << endl;
+   os << "       d_velocity_outside = ";
+   for (j = 0; j < NDIM; j++) os << d_velocity_outside[j] << " ";
+   os << endl;
+   os << "       d_pressure_outside = " << d_pressure_outside << endl;
+
+   os << "       d_number_of_intervals = " << d_number_of_intervals << endl;
+   os << "       d_front_position = ";
+   for (k = 0; k < d_number_of_intervals - 1; k++) {
+      os << d_front_position[k] << "  ";
+   }
+   os << endl;
+   os << "       d_interval_density = " << endl;
+   for (k = 0; k < d_number_of_intervals; k++) {
+      os << "            " << d_interval_density[k] << endl;
+   }
+   os << "       d_interval_velocity = " << endl;
+   for (k = 0; k < d_number_of_intervals; k++) {
+      os << "            ";
+      for (j = 0; j < NDIM; j++) {
+         os << d_interval_velocity[k * NDIM + j] << "  ";
+      }
+      os << endl;
+   }
+   os << "       d_interval_pressure = " << endl;
+   for (k = 0; k < d_number_of_intervals; k++) {
+      os << "            " << d_interval_pressure[k] << endl;
+   }
+
+   os << "   Boundary condition data " << endl;
+
+#if (NDIM == 2)
+   for (j = 0; j < d_master_bdry_edge_conds.getSize(); j++) {
+      os << "\n       d_master_bdry_edge_conds[" << j << "] = "
+      << d_master_bdry_edge_conds[j] << endl;
+      os << "       d_scalar_bdry_edge_conds[" << j << "] = "
+      << d_scalar_bdry_edge_conds[j] << endl;
+      os << "       d_vector_bdry_edge_conds[" << j << "] = "
+      << d_vector_bdry_edge_conds[j] << endl;
+      if (d_master_bdry_edge_conds[j] == DIRICHLET_BC) {
+         os << "         d_bdry_edge_density[" << j << "] = "
+         << d_bdry_edge_density[j] << endl;
+         os << "         d_bdry_edge_velocity[" << j << "] = "
+         << d_bdry_edge_velocity[j * NDIM + 0] << " , "
+         << d_bdry_edge_velocity[j * NDIM + 1] << endl;
+         os << "         d_bdry_edge_pressure[" << j << "] = "
+         << d_bdry_edge_pressure[j] << endl;
+      }
+   }
+   os << endl;
+   for (j = 0; j < d_master_bdry_node_conds.getSize(); j++) {
+      os << "\n       d_master_bdry_node_conds[" << j << "] = "
+      << d_master_bdry_node_conds[j] << endl;
+      os << "       d_scalar_bdry_node_conds[" << j << "] = "
+      << d_scalar_bdry_node_conds[j] << endl;
+      os << "       d_vector_bdry_node_conds[" << j << "] = "
+      << d_vector_bdry_node_conds[j] << endl;
+      os << "       d_node_bdry_edge[" << j << "] = "
+      << d_node_bdry_edge[j] << endl;
+   }
+#endif
+#if (NDIM == 3)
+   for (j = 0; j < d_master_bdry_face_conds.getSize(); j++) {
+      os << "\n       d_master_bdry_face_conds[" << j << "] = "
+      << d_master_bdry_face_conds[j] << endl;
+      os << "       d_scalar_bdry_face_conds[" << j << "] = "
+      << d_scalar_bdry_face_conds[j] << endl;
+      os << "       d_vector_bdry_face_conds[" << j << "] = "
+      << d_vector_bdry_face_conds[j] << endl;
+      if (d_master_bdry_face_conds[j] == DIRICHLET_BC) {
+         os << "         d_bdry_face_density[" << j << "] = "
+         << d_bdry_face_density[j] << endl;
+         os << "         d_bdry_face_velocity[" << j << "] = "
+         << d_bdry_face_velocity[j * NDIM + 0] << " , "
+         << d_bdry_face_velocity[j * NDIM + 1] << " , "
+         << d_bdry_face_velocity[j * NDIM + 2] << endl;
+         os << "         d_bdry_face_pressure[" << j << "] = "
+         << d_bdry_face_pressure[j] << endl;
+      }
+   }
+   os << endl;
+   for (j = 0; j < d_master_bdry_edge_conds.getSize(); j++) {
+      os << "\n       d_master_bdry_edge_conds[" << j << "] = "
+      << d_master_bdry_edge_conds[j] << endl;
+      os << "       d_scalar_bdry_edge_conds[" << j << "] = "
+      << d_scalar_bdry_edge_conds[j] << endl;
+      os << "       d_vector_bdry_edge_conds[" << j << "] = "
+      << d_vector_bdry_edge_conds[j] << endl;
+      os << "       d_edge_bdry_face[" << j << "] = "
+      << d_edge_bdry_face[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_master_bdry_node_conds.getSize(); j++) {
+      os << "\n       d_master_bdry_node_conds[" << j << "] = "
+      << d_master_bdry_node_conds[j] << endl;
+      os << "       d_scalar_bdry_node_conds[" << j << "] = "
+      << d_scalar_bdry_node_conds[j] << endl;
+      os << "       d_vector_bdry_node_conds[" << j << "] = "
+      << d_vector_bdry_node_conds[j] << endl;
+      os << "       d_node_bdry_face[" << j << "] = "
+      << d_node_bdry_face[j] << endl;
+   }
+#endif
+
+   os << "   Refinement criteria parameters " << endl;
+
+   for (j = 0; j < d_refinement_criteria.getSize(); j++) {
+      os << "       d_refinement_criteria[" << j << "] = "
+      << d_refinement_criteria[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_dev_tol.getSize(); j++) {
+      os << "       d_density_dev_tol[" << j << "] = "
+      << d_density_dev_tol[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_dev.getSize(); j++) {
+      os << "       d_density_dev[" << j << "] = "
+      << d_density_dev[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_dev_time_max.getSize(); j++) {
+      os << "       d_density_dev_time_max[" << j << "] = "
+      << d_density_dev_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_dev_time_min.getSize(); j++) {
+      os << "       d_density_dev_time_min[" << j << "] = "
+      << d_density_dev_time_min[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_grad_tol.getSize(); j++) {
+      os << "       d_density_grad_tol[" << j << "] = "
+      << d_density_grad_tol[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_grad_time_max.getSize(); j++) {
+      os << "       d_density_grad_time_max[" << j << "] = "
+      << d_density_grad_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_grad_time_min.getSize(); j++) {
+      os << "       d_density_grad_time_min[" << j << "] = "
+      << d_density_grad_time_min[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_shock_onset.getSize(); j++) {
+      os << "       d_density_shock_onset[" << j << "] = "
+      << d_density_shock_onset[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_shock_tol.getSize(); j++) {
+      os << "       d_density_shock_tol[" << j << "] = "
+      << d_density_shock_tol[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_shock_time_max.getSize(); j++) {
+      os << "       d_density_shock_time_max[" << j << "] = "
+      << d_density_shock_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_shock_time_min.getSize(); j++) {
+      os << "       d_density_shock_time_min[" << j << "] = "
+      << d_density_shock_time_min[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_rich_tol.getSize(); j++) {
+      os << "       d_density_rich_tol[" << j << "] = "
+      << d_density_rich_tol[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_rich_time_max.getSize(); j++) {
+      os << "       d_density_rich_time_max[" << j << "] = "
+      << d_density_rich_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_density_rich_time_min.getSize(); j++) {
+      os << "       d_density_rich_time_min[" << j << "] = "
+      << d_density_rich_time_min[j] << endl;
+   }
+   os << endl;
+
+   for (j = 0; j < d_pressure_dev_tol.getSize(); j++) {
+      os << "       d_pressure_dev_tol[" << j << "] = "
+      << d_pressure_dev_tol[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_pressure_dev.getSize(); j++) {
+      os << "       d_pressure_dev[" << j << "] = "
+      << d_pressure_dev[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_pressure_dev_time_max.getSize(); j++) {
+      os << "       d_pressure_dev_time_max[" << j << "] = "
+      << d_pressure_dev_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_pressure_dev_time_min.getSize(); j++) {
+      os << "       d_pressure_dev_time_min[" << j << "] = "
+      << d_pressure_dev_time_min[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_pressure_grad_tol.getSize(); j++) {
+      os << "       d_pressure_grad_tol[" << j << "] = "
+      << d_pressure_grad_tol[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_pressure_grad_time_max.getSize(); j++) {
+      os << "       d_pressure_grad_time_max[" << j << "] = "
+      << d_pressure_grad_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_pressure_grad_time_min.getSize(); j++) {
+      os << "       d_pressure_grad_time_min[" << j << "] = "
+      << d_pressure_grad_time_min[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_pressure_shock_onset.getSize(); j++) {
+      os << "       d_pressure_shock_onset[" << j << "] = "
+      << d_pressure_shock_onset[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_pressure_shock_tol.getSize(); j++) {
+      os << "       d_pressure_shock_tol[" << j << "] = "
+      << d_pressure_shock_tol[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_pressure_shock_time_max.getSize(); j++) {
+      os << "       d_pressure_shock_time_max[" << j << "] = "
+      << d_pressure_shock_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_pressure_shock_time_min.getSize(); j++) {
+      os << "       d_pressure_shock_time_min[" << j << "] = "
+      << d_pressure_shock_time_min[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_pressure_rich_tol.getSize(); j++) {
+      os << "       d_pressure_rich_tol[" << j << "] = "
+      << d_pressure_rich_tol[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_pressure_rich_time_max.getSize(); j++) {
+      os << "       d_pressure_rich_time_max[" << j << "] = "
+      << d_pressure_rich_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_pressure_rich_time_min.getSize(); j++) {
+      os << "       d_pressure_rich_time_min[" << j << "] = "
+      << d_pressure_rich_time_min[j] << endl;
+   }
+   os << endl;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Read data members from input.  Note all values set from restart       *
+ * can be overridden by values in the input database.                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::getFromInput(
+   tbox::Pointer<tbox::Database> db,
+   bool is_from_restart)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   /*
+    * Note: if we are restarting, then we only allow nonuniform
+    * workload to be used if nonuniform workload was used originally.
+    */
+   if (!is_from_restart) {
+      d_use_nonuniform_workload =
+         db->getBoolWithDefault("use_nonuniform_workload",
+            d_use_nonuniform_workload);
+   } else {
+      if (d_use_nonuniform_workload) {
+         d_use_nonuniform_workload =
+            db->getBool("use_nonuniform_workload");
+      }
+   }
+
+   if (!is_from_restart) {
+      d_gamma = db->getDoubleWithDefault("gamma", d_gamma);
+   }
+
+   if (db->keyExists("riemann_solve")) {
+      d_riemann_solve = db->getString("riemann_solve");
+      if ((d_riemann_solve != "APPROX_RIEM_SOLVE") &&
+          (d_riemann_solve != "EXACT_RIEM_SOLVE") &&
+          (d_riemann_solve != "HLLC_RIEM_SOLVE")) {
+         TBOX_ERROR(
+            d_object_name << ": "
+            <<
+            "`riemann_solve' in input must be either string "
+            <<
+            "'APPROX_RIEM_SOLVE', 'EXACT_RIEM_SOLVE', "
+            << "'HLLC_RIEM_SOLVE'." << endl);
+
+      }
+   } else {
+      d_riemann_solve = db->getStringWithDefault("d_riemann_solve",
+            d_riemann_solve);
+   }
+
+   if (db->keyExists("godunov_order")) {
+      d_godunov_order = db->getInteger("godunov_order");
+      if ((d_godunov_order != 1) &&
+          (d_godunov_order != 2) &&
+          (d_godunov_order != 4)) {
+         TBOX_ERROR(
+            d_object_name << ": "
+            <<
+            "`godunov_order' in input must be 1, 2, or 4." << endl);
+
+      }
+   } else {
+      d_godunov_order = db->getIntegerWithDefault("d_godunov_order",
+            d_godunov_order);
+   }
+
+   if (db->keyExists("corner_transport")) {
+      d_corner_transport = db->getString("corner_transport");
+      if ((d_corner_transport != "CORNER_TRANSPORT_1") &&
+          (d_corner_transport != "CORNER_TRANSPORT_2")) {
+         TBOX_ERROR(
+            d_object_name << ": "
+            <<
+            "`corner_transport' in input must be either string"
+            <<
+            " 'CORNER_TRANSPORT_1' or 'CORNER_TRANSPORT_2'." << endl);
+      }
+   } else {
+      d_corner_transport = db->getStringWithDefault("corner_transport",
+            d_corner_transport);
+   }
+
+   if (db->keyExists("Refinement_data")) {
+      tbox::Pointer<tbox::Database> refine_db = db->getDatabase(
+            "Refinement_data");
+      tbox::Array<string> refinement_keys = refine_db->getAllKeys();
+      int num_keys = refinement_keys.getSize();
+
+      if (refine_db->keyExists("refine_criteria")) {
+         d_refinement_criteria =
+            refine_db->getStringArray("refine_criteria");
+      } else {
+         TBOX_WARNING(
+            d_object_name << ": "
+            <<
+            "No key `refine_criteria' found in data for"
+            <<
+            " RefinementData. No refinement will occur." << endl);
+      }
+
+      tbox::Array<string> ref_keys_defined(num_keys);
+      int def_key_cnt = 0;
+      tbox::Pointer<tbox::Database> error_db;
+      for (int i = 0; i < refinement_keys.getSize(); i++) {
+
+         string error_key = refinement_keys[i];
+         error_db.setNull();
+
+         if (!(error_key == "refine_criteria")) {
+
+            if (!(error_key == "DENSITY_DEVIATION" ||
+                  error_key == "DENSITY_GRADIENT" ||
+                  error_key == "DENSITY_SHOCK" ||
+                  error_key == "DENSITY_RICHARDSON" ||
+                  error_key == "PRESSURE_DEVIATION" ||
+                  error_key == "PRESSURE_GRADIENT" ||
+                  error_key == "PRESSURE_SHOCK" ||
+                  error_key == "PRESSURE_RICHARDSON")) {
+               TBOX_ERROR(
+                  d_object_name << ": "
+                  << "Unknown refinement criteria: "
+                  << error_key
+                  << "\nin input." << endl);
+            } else {
+               error_db = refine_db->getDatabase(error_key);
+               ref_keys_defined[def_key_cnt] = error_key;
+               def_key_cnt++;
+            }
+
+            if (!error_db.isNull() && error_key == "DENSITY_DEVIATION") {
+
+               if (error_db->keyExists("dev_tol")) {
+                  d_density_dev_tol =
+                     error_db->getDoubleArray("dev_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `dev_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("density_dev")) {
+                  d_density_dev =
+                     error_db->getDoubleArray("density_dev");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `density_dev' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_density_dev_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_density_dev_time_max.resizeArray(1);
+                  d_density_dev_time_max[0] =
+                     tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_density_dev_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_density_dev_time_min.resizeArray(1);
+                  d_density_dev_time_min[0] = 0.;
+               }
+
+            }
+
+            if (!error_db.isNull() && error_key == "DENSITY_GRADIENT") {
+
+               if (error_db->keyExists("grad_tol")) {
+                  d_density_grad_tol =
+                     error_db->getDoubleArray("grad_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `grad_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_density_grad_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_density_grad_time_max.resizeArray(1);
+                  d_density_grad_time_max[0] =
+                     tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_density_grad_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_density_grad_time_min.resizeArray(1);
+                  d_density_grad_time_min[0] = 0.;
+               }
+
+            }
+
+            if (!error_db.isNull() && error_key == "DENSITY_SHOCK") {
+
+               if (error_db->keyExists("shock_onset")) {
+                  d_density_shock_onset =
+                     error_db->getDoubleArray("shock_onset");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `shock_onset' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("shock_tol")) {
+                  d_density_shock_tol =
+                     error_db->getDoubleArray("shock_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `shock_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_density_shock_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_density_shock_time_max.resizeArray(1);
+                  d_density_shock_time_max[0] =
+                     tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_density_shock_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_density_shock_time_min.resizeArray(1);
+                  d_density_shock_time_min[0] = 0.;
+               }
+
+            }
+
+            if (!error_db.isNull() && error_key == "DENSITY_RICHARDSON") {
+
+               if (error_db->keyExists("rich_tol")) {
+                  d_density_rich_tol =
+                     error_db->getDoubleArray("rich_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `rich_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_density_rich_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_density_rich_time_max.resizeArray(1);
+                  d_density_rich_time_max[0] =
+                     tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_density_rich_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_density_rich_time_min.resizeArray(1);
+                  d_density_rich_time_min[0] = 0.;
+               }
+
+            }
+
+            if (!error_db.isNull() && error_key == "PRESSURE_DEVIATION") {
+
+               if (error_db->keyExists("dev_tol")) {
+                  d_pressure_dev_tol =
+                     error_db->getDoubleArray("dev_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `dev_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("pressure_dev")) {
+                  d_pressure_dev =
+                     error_db->getDoubleArray("pressure_dev");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `pressure_dev' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_pressure_dev_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_pressure_dev_time_max.resizeArray(1);
+                  d_pressure_dev_time_max[0] =
+                     tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_pressure_dev_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_pressure_dev_time_min.resizeArray(1);
+                  d_pressure_dev_time_min[0] = 0.;
+               }
+
+            }
+
+            if (!error_db.isNull() && error_key == "PRESSURE_GRADIENT") {
+
+               if (error_db->keyExists("grad_tol")) {
+                  d_pressure_grad_tol =
+                     error_db->getDoubleArray("grad_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `grad_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_pressure_grad_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_pressure_grad_time_max.resizeArray(1);
+                  d_pressure_grad_time_max[0] =
+                     tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_pressure_grad_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_pressure_grad_time_min.resizeArray(1);
+                  d_pressure_grad_time_min[0] = 0.;
+               }
+
+            }
+
+            if (!error_db.isNull() && error_key == "PRESSURE_SHOCK") {
+
+               if (error_db->keyExists("shock_onset")) {
+                  d_pressure_shock_onset =
+                     error_db->getDoubleArray("shock_onset");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `shock_onset' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("shock_tol")) {
+                  d_pressure_shock_tol =
+                     error_db->getDoubleArray("shock_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `shock_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_pressure_shock_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_pressure_shock_time_max.resizeArray(1);
+                  d_pressure_shock_time_max[0] =
+                     tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_pressure_shock_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_pressure_shock_time_min.resizeArray(1);
+                  d_pressure_shock_time_min[0] = 0.;
+               }
+
+            }
+
+            if (!error_db.isNull() && error_key == "PRESSURE_RICHARDSON") {
+
+               if (error_db->keyExists("rich_tol")) {
+                  d_pressure_rich_tol =
+                     error_db->getDoubleArray("rich_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `rich_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_pressure_rich_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_pressure_rich_time_max.resizeArray(1);
+                  d_pressure_rich_time_max[0] =
+                     tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_pressure_rich_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_pressure_rich_time_min.resizeArray(1);
+                  d_pressure_rich_time_min[0] = 0.;
+               }
+
+            }
+
+         }
+
+      } // loop over refine criteria
+
+      /*
+       * Check that input is found for each string identifier in key list.
+       */
+      for (int k0 = 0; k0 < d_refinement_criteria.getSize(); k0++) {
+         string use_key = d_refinement_criteria[k0];
+         bool key_found = false;
+         for (int k1 = 0; k1 < def_key_cnt; k1++) {
+            string def_key = ref_keys_defined[k1];
+            if (def_key == use_key) key_found = true;
+         }
+
+         if (!key_found) {
+            TBOX_ERROR(d_object_name << ": "
+               << "No input found for specified refine criteria: "
+               << d_refinement_criteria[k0] << endl);
+         }
+      }
+
+   } // if "Refinement_data" db entry exists
+
+   if (!is_from_restart) {
+
+      if (db->keyExists("data_problem")) {
+         d_data_problem = db->getString("data_problem");
+      } else {
+         TBOX_ERROR(
+            d_object_name << ": "
+            << "`data_problem' value not found in input."
+            << endl);
+      }
+
+      tbox::Pointer<tbox::Database> init_data_db;
+      if (db->keyExists("Initial_data")) {
+         init_data_db = db->getDatabase("Initial_data");
+      } else {
+         TBOX_ERROR(
+            d_object_name << ": "
+            <<
+            "No `Initial_data' database found in input." << endl);
+      }
+
+      bool found_problem_data = false;
+
+      if (d_data_problem == "SPHERE") {
+
+         if (init_data_db->keyExists("radius")) {
+            d_radius = init_data_db->getDouble("radius");
+         } else {
+            TBOX_ERROR(
+               d_object_name << ": "
+               <<
+               "`radius' input required for SPHERE problem." << endl);
+         }
+         if (init_data_db->keyExists("center")) {
+            init_data_db->getDoubleArray("center", d_center, NDIM);
+         } else {
+            TBOX_ERROR(
+               d_object_name << ": "
+               <<
+               "`center' input required for SPHERE problem." << endl);
+         }
+         if (init_data_db->keyExists("density_inside")) {
+            d_density_inside = init_data_db->getDouble("density_inside");
+         } else {
+            TBOX_ERROR(d_object_name << ": "
+                                     << "`density_inside' input required for "
+                                     << "SPHERE problem." << endl);
+         }
+         if (init_data_db->keyExists("velocity_inside")) {
+            init_data_db->getDoubleArray("velocity_inside",
+               d_velocity_inside, NDIM);
+         } else {
+            TBOX_ERROR(d_object_name << ": "
+                                     << "`velocity_inside' input required for "
+                                     << "SPHERE problem." << endl);
+         }
+         if (init_data_db->keyExists("pressure_inside")) {
+            d_pressure_inside = init_data_db->getDouble("pressure_inside");
+         } else {
+            TBOX_ERROR(d_object_name << ": "
+                                     << "`pressure_inside' input required for "
+                                     << "SPHERE problem." << endl);
+         }
+         if (init_data_db->keyExists("density_outside")) {
+            d_density_outside = init_data_db->getDouble("density_outside");
+         } else {
+            TBOX_ERROR(d_object_name << ": "
+                                     << "`density_outside' input required for "
+                                     << "SPHERE problem." << endl);
+         }
+         if (init_data_db->keyExists("velocity_outside")) {
+            init_data_db->getDoubleArray("velocity_outside",
+               d_velocity_outside, NDIM);
+         } else {
+            TBOX_ERROR(
+               d_object_name << ": "
+               <<
+               "`velocity_outside' input required for "
+               << "SPHERE problem." << endl);
+         }
+         if (init_data_db->keyExists("pressure_outside")) {
+            d_pressure_outside = init_data_db->getDouble("pressure_outside");
+         } else {
+            TBOX_ERROR(
+               d_object_name << ": "
+               <<
+               "`pressure_outside' input required for "
+               << "SPHERE problem." << endl);
+         }
+
+         found_problem_data = true;
+
+      }
+
+      if (!found_problem_data &&
+          ((d_data_problem == "PIECEWISE_CONSTANT_X") ||
+           (d_data_problem == "PIECEWISE_CONSTANT_Y") ||
+           (d_data_problem == "PIECEWISE_CONSTANT_Z") ||
+           (d_data_problem == "STEP"))) {
+
+         int idir = 0;
+         if (d_data_problem == "PIECEWISE_CONSTANT_Y") {
+            idir = 1;
+         }
+
+         if (d_data_problem == "PIECEWISE_CONSTANT_Z") {
+            if (NDIM < 3) {
+               TBOX_ERROR(
+                  d_object_name << ": `PIECEWISE_CONSTANT_Z' "
+                  << "problem invalid in 2 dimensions."
+                  << endl);
+            }
+            idir = 2;
+         }
+
+         tbox::Array<string> init_data_keys = init_data_db->getAllKeys();
+
+         if (init_data_db->keyExists("front_position")) {
+            d_front_position = init_data_db->getDoubleArray("front_position");
+         } else {
+            TBOX_ERROR(d_object_name << ": "
+                                     << "`front_position' input required for "
+                                     << "PIECEWISE_CONSTANT_* problem." << endl);
+         }
+
+         d_number_of_intervals =
+            tbox::MathUtilities<int>::Min(d_front_position.getSize() + 1,
+               init_data_keys.getSize() - 1);
+
+         d_front_position.resizeArray(d_front_position.getSize() + 1);
+         d_front_position[d_front_position.getSize() - 1] =
+            d_grid_geometry->getXUpper()[idir];
+
+         d_interval_density.resizeArray(d_number_of_intervals);
+         d_interval_velocity.resizeArray(d_number_of_intervals * NDIM);
+         d_interval_pressure.resizeArray(d_number_of_intervals);
+
+         int i = 0;
+         int nkey = 0;
+         bool found_interval_data = false;
+
+         while (!found_interval_data
+                && (i < d_number_of_intervals)
+                && (nkey < init_data_keys.getSize())) {
+
+            if (!(init_data_keys[nkey] == "front_position")) {
+
+               tbox::Pointer<tbox::Database> interval_db =
+                  init_data_db->getDatabase(init_data_keys[nkey]);
+
+               readStateDataEntry(interval_db,
+                  init_data_keys[nkey],
+                  i,
+                  d_interval_density,
+                  d_interval_velocity,
+                  d_interval_pressure);
+
+               i++;
+
+               found_interval_data = (i == d_number_of_intervals);
+
+            }
+
+            nkey++;
+
+         }
+
+         if (!found_interval_data) {
+            TBOX_ERROR(
+               d_object_name << ": "
+               <<
+               "Insufficient interval data given in input"
+               <<
+               " for PIECEWISE_CONSTANT_* or STEP problem." << endl);
+         }
+
+         found_problem_data = true;
+
+      }
+
+      if (!found_problem_data) {
+         TBOX_ERROR(d_object_name << ": "
+                                  << "`Initial_data' database found in input."
+                                  << " But bad data supplied." << endl);
+      }
+
+   } // if !is_from_restart read in problem data
+
+   hier::IntVector<NDIM> periodic = d_grid_geometry->getPeriodicShift();
+   int num_per_dirs = 0;
+   for (int id = 0; id < NDIM; id++) {
+      if (periodic(id)) num_per_dirs++;
+   }
+
+   if (num_per_dirs < NDIM) {
+
+      if (db->keyExists("Boundary_data")) {
+
+         tbox::Pointer<tbox::Database> bdry_db = db->getDatabase(
+               "Boundary_data");
+
+#if (NDIM == 2)
+         appu::CartesianBoundaryUtilities2::readBoundaryInput(this,
+            bdry_db,
+            d_master_bdry_edge_conds,
+            d_master_bdry_node_conds,
+            periodic);
+#endif
+#if (NDIM == 3)
+         appu::CartesianBoundaryUtilities3::readBoundaryInput(this,
+            bdry_db,
+            d_master_bdry_face_conds,
+            d_master_bdry_edge_conds,
+            d_master_bdry_node_conds,
+            periodic);
+#endif
+
+      } else {
+         TBOX_ERROR(
+            d_object_name << ": "
+            <<
+            "Key data `Boundary_data' not found in input. " << endl);
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to put/get data members to/from from restart database.       *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::putToDatabase(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   db->putInteger("EULER_VERSION", EULER_VERSION);
+
+   db->putDouble("d_gamma", d_gamma);
+
+   db->putString("d_riemann_solve", d_riemann_solve);
+   db->putInteger("d_godunov_order", d_godunov_order);
+   db->putString("d_corner_transport", d_corner_transport);
+   db->putIntegerArray("d_nghosts", d_nghosts, NDIM);
+   db->putIntegerArray("d_fluxghosts", d_fluxghosts, NDIM);
+
+   db->putString("d_data_problem", d_data_problem);
+
+   if (d_data_problem == "SPHERE") {
+      db->putDouble("d_radius", d_radius);
+      db->putDoubleArray("d_center", d_center, NDIM);
+      db->putDouble("d_density_inside", d_density_inside);
+      db->putDoubleArray("d_velocity_inside", d_velocity_inside, NDIM);
+      db->putDouble("d_pressure_inside", d_pressure_inside);
+      db->putDouble("d_density_outside", d_density_outside);
+      db->putDoubleArray("d_velocity_outside", d_velocity_outside, NDIM);
+      db->putDouble("d_pressure_outside", d_pressure_outside);
+   }
+
+   if ((d_data_problem == "PIECEWISE_CONSTANT_X") ||
+       (d_data_problem == "PIECEWISE_CONSTANT_Y") ||
+       (d_data_problem == "PIECEWISE_CONSTANT_Z") ||
+       (d_data_problem == "STEP")) {
+      db->putInteger("d_number_of_intervals", d_number_of_intervals);
+      if (d_number_of_intervals > 0) {
+         db->putDoubleArray("d_front_position", d_front_position);
+         db->putDoubleArray("d_interval_density", d_interval_density);
+         db->putDoubleArray("d_interval_velocity", d_interval_velocity);
+         db->putDoubleArray("d_interval_pressure", d_interval_pressure);
+      }
+   }
+
+   db->putIntegerArray("d_master_bdry_edge_conds", d_master_bdry_edge_conds);
+   db->putIntegerArray("d_master_bdry_node_conds", d_master_bdry_node_conds);
+
+#if (NDIM == 2)
+   db->putDoubleArray("d_bdry_edge_density", d_bdry_edge_density);
+   db->putDoubleArray("d_bdry_edge_velocity", d_bdry_edge_velocity);
+   db->putDoubleArray("d_bdry_edge_pressure", d_bdry_edge_pressure);
+#endif
+#if (NDIM == 3)
+   db->putIntegerArray("d_master_bdry_face_conds", d_master_bdry_face_conds);
+
+   db->putDoubleArray("d_bdry_face_density", d_bdry_face_density);
+   db->putDoubleArray("d_bdry_face_velocity", d_bdry_face_velocity);
+   db->putDoubleArray("d_bdry_face_pressure", d_bdry_face_pressure);
+#endif
+
+   if (d_refinement_criteria.getSize() > 0) {
+      db->putStringArray("d_refinement_criteria", d_refinement_criteria);
+   }
+   for (int i = 0; i < d_refinement_criteria.getSize(); i++) {
+
+      if (d_refinement_criteria[i] == "DENSITY_DEVIATION") {
+
+         db->putDoubleArray("d_density_dev_tol",
+            d_density_dev_tol);
+         db->putDoubleArray("d_density_dev",
+            d_density_dev);
+         db->putDoubleArray("d_density_dev_time_max",
+            d_density_dev_time_max);
+         db->putDoubleArray("d_density_dev_time_min",
+            d_density_dev_time_min);
+
+      } else if (d_refinement_criteria[i] == "DENSITY_GRADIENT") {
+
+         db->putDoubleArray("d_density_grad_tol",
+            d_density_grad_tol);
+         db->putDoubleArray("d_density_grad_time_max",
+            d_density_grad_time_max);
+         db->putDoubleArray("d_density_grad_time_min",
+            d_density_grad_time_min);
+
+      } else if (d_refinement_criteria[i] == "DENSITY_SHOCK") {
+
+         db->putDoubleArray("d_density_shock_onset",
+            d_density_shock_onset);
+         db->putDoubleArray("d_density_shock_tol",
+            d_density_shock_tol);
+         db->putDoubleArray("d_density_shock_time_max",
+            d_density_shock_time_max);
+         db->putDoubleArray("d_density_shock_time_min",
+            d_density_shock_time_min);
+
+      } else if (d_refinement_criteria[i] == "DENSITY_RICHARDSON") {
+
+         db->putDoubleArray("d_density_rich_tol",
+            d_density_rich_tol);
+         db->putDoubleArray("d_density_rich_time_max",
+            d_density_rich_time_max);
+         db->putDoubleArray("d_density_rich_time_min",
+            d_density_rich_time_min);
+
+      } else if (d_refinement_criteria[i] == "PRESSURE_DEVIATION") {
+
+         db->putDoubleArray("d_pressure_dev_tol",
+            d_pressure_dev_tol);
+         db->putDoubleArray("d_pressure_dev",
+            d_pressure_dev);
+         db->putDoubleArray("d_pressure_dev_time_max",
+            d_pressure_dev_time_max);
+         db->putDoubleArray("d_pressure_dev_time_min",
+            d_pressure_dev_time_min);
+
+      } else if (d_refinement_criteria[i] == "PRESSURE_GRADIENT") {
+
+         db->putDoubleArray("d_pressure_grad_tol",
+            d_pressure_grad_tol);
+         db->putDoubleArray("d_pressure_grad_time_max",
+            d_pressure_grad_time_max);
+         db->putDoubleArray("d_pressure_grad_time_min",
+            d_pressure_grad_time_min);
+
+      } else if (d_refinement_criteria[i] == "PRESSURE_SHOCK") {
+
+         db->putDoubleArray("d_pressure_shock_onset",
+            d_pressure_shock_onset);
+         db->putDoubleArray("d_pressure_shock_tol",
+            d_pressure_shock_tol);
+         db->putDoubleArray("d_pressure_shock_time_max",
+            d_pressure_shock_time_max);
+         db->putDoubleArray("d_pressure_shock_time_min",
+            d_pressure_shock_time_min);
+
+      } else if (d_refinement_criteria[i] == "PRESSURE_RICHARDSON") {
+
+         db->putDoubleArray("d_pressure_rich_tol",
+            d_pressure_rich_tol);
+         db->putDoubleArray("d_pressure_rich_time_max",
+            d_pressure_rich_time_max);
+         db->putDoubleArray("d_pressure_rich_time_min",
+            d_pressure_rich_time_min);
+      }
+
+   }
+
+}
+
+void Euler::getFromRestart()
+{
+
+   tbox::Pointer<tbox::Database> root_db =
+      tbox::RestartManager::getManager()->getRootDatabase();
+
+   tbox::Pointer<tbox::Database> db;
+   if (root_db->isDatabase(d_object_name)) {
+      db = root_db->getDatabase(d_object_name);
+   } else {
+      TBOX_ERROR("Restart database corresponding to "
+         << d_object_name << " not found in restart file." << endl);
+   }
+
+   int ver = db->getInteger("EULER_VERSION");
+   if (ver != EULER_VERSION) {
+      TBOX_ERROR(
+         d_object_name << ": "
+         <<
+         "Restart file version different than class version." << endl);
+   }
+
+   d_gamma = db->getDouble("d_gamma");
+
+   d_riemann_solve = db->getString("d_riemann_solve");
+   d_godunov_order = db->getInteger("d_godunov_order");
+   d_corner_transport = db->getString("d_corner_transport");
+
+   int* tmp_nghosts = d_nghosts;
+   db->getIntegerArray("d_nghosts", tmp_nghosts, NDIM);
+   for (int i = 0; i < NDIM; i++) {
+      if (d_nghosts(i) != CELLG) {
+         TBOX_ERROR(
+            d_object_name << ": "
+            <<
+            "Key data `d_nghosts' in restart file != CELLG." << endl);
+      }
+   }
+   int* tmp_fluxghosts = d_fluxghosts;
+   db->getIntegerArray("d_fluxghosts", tmp_fluxghosts, NDIM);
+   for (int i = 0; i < NDIM; i++) {
+      if (d_fluxghosts(i) != FLUXG) {
+         TBOX_ERROR(
+            d_object_name << ": "
+            <<
+            "Key data `d_fluxghosts' in restart file != FLUXG." << endl);
+      }
+   }
+
+   d_data_problem = db->getString("d_data_problem");
+
+   if (d_data_problem == "SPHERE") {
+      d_radius = db->getDouble("d_radius");
+      db->getDoubleArray("d_center", d_center, NDIM);
+      d_density_inside = db->getDouble("d_density_inside");
+      db->getDoubleArray("d_velocity_inside", d_velocity_inside, NDIM);
+      d_pressure_inside = db->getDouble("d_pressure_inside");
+      d_density_outside = db->getDouble("d_density_outside");
+      db->getDoubleArray("d_velocity_outside", d_velocity_outside, NDIM);
+      d_pressure_outside = db->getDouble("d_pressure_outside");
+   }
+
+   if ((d_data_problem == "PIECEWISE_CONSTANT_X") ||
+       (d_data_problem == "PIECEWISE_CONSTANT_Y") ||
+       (d_data_problem == "PIECEWISE_CONSTANT_Z") ||
+       (d_data_problem == "STEP")) {
+      d_number_of_intervals = db->getInteger("d_number_of_intervals");
+      if (d_number_of_intervals > 0) {
+         d_front_position = db->getDoubleArray("d_front_position");
+         d_interval_density = db->getDoubleArray("d_interval_density");
+         d_interval_velocity = db->getDoubleArray("d_interval_velocity");
+         d_interval_pressure = db->getDoubleArray("d_interval_pressure");
+      }
+   }
+
+   d_master_bdry_edge_conds = db->getIntegerArray("d_master_bdry_edge_conds");
+   d_master_bdry_node_conds = db->getIntegerArray("d_master_bdry_node_conds");
+
+#if (NDIM == 2)
+   d_bdry_edge_density = db->getDoubleArray("d_bdry_edge_density");
+   d_bdry_edge_velocity = db->getDoubleArray("d_bdry_edge_velocity");
+   d_bdry_edge_pressure = db->getDoubleArray("d_bdry_edge_pressure");
+#endif
+#if (NDIM == 3)
+   d_master_bdry_face_conds = db->getIntegerArray("d_master_bdry_face_conds");
+
+   d_bdry_face_density = db->getDoubleArray("d_bdry_face_density");
+   d_bdry_face_velocity = db->getDoubleArray("d_bdry_face_velocity");
+   d_bdry_face_pressure = db->getDoubleArray("d_bdry_face_pressure");
+#endif
+
+   if (db->keyExists("d_refinement_criteria")) {
+      d_refinement_criteria = db->getStringArray("d_refinement_criteria");
+   }
+
+   for (int i = 0; i < d_refinement_criteria.getSize(); i++) {
+
+      if (d_refinement_criteria[i] == "DENSITY_DEVIATION") {
+
+         d_density_dev_tol =
+            db->getDoubleArray("d_density_dev_tol");
+         d_density_dev =
+            db->getDoubleArray("d_density_dev");
+         d_density_dev_time_max =
+            db->getDoubleArray("d_density_dev_time_max");
+         d_density_dev_time_min =
+            db->getDoubleArray("d_density_dev_time_min");
+
+      } else if (d_refinement_criteria[i] == "DENSITY_GRADIENT") {
+
+         d_density_grad_tol =
+            db->getDoubleArray("d_density_grad_tol");
+         d_density_grad_time_max =
+            db->getDoubleArray("d_density_grad_time_max");
+         d_density_grad_time_min =
+            db->getDoubleArray("d_density_grad_time_min");
+
+      } else if (d_refinement_criteria[i] == "DENSITY_SHOCK") {
+
+         d_density_shock_onset =
+            db->getDoubleArray("d_density_shock_onset");
+         d_density_shock_tol =
+            db->getDoubleArray("d_density_shock_tol");
+         d_density_shock_time_max =
+            db->getDoubleArray("d_density_shock_time_max");
+         d_density_shock_time_min =
+            db->getDoubleArray("d_density_shock_time_min");
+
+      } else if (d_refinement_criteria[i] == "DENSITY_RICHARDSON") {
+
+         d_density_rich_tol =
+            db->getDoubleArray("d_density_rich_tol");
+         d_density_rich_time_max =
+            db->getDoubleArray("d_density_rich_time_max");
+         d_density_rich_time_min =
+            db->getDoubleArray("d_density_rich_time_min");
+
+      } else if (d_refinement_criteria[i] == "PRESSURE_DEVIATION") {
+
+         d_pressure_dev_tol =
+            db->getDoubleArray("d_pressure_dev_tol");
+         d_pressure_dev =
+            db->getDoubleArray("d_pressure_dev");
+         d_pressure_dev_time_max =
+            db->getDoubleArray("d_pressure_dev_time_max");
+         d_pressure_dev_time_min =
+            db->getDoubleArray("d_pressure_dev_time_min");
+
+      } else if (d_refinement_criteria[i] == "PRESSURE_GRADIENT") {
+
+         d_pressure_grad_tol =
+            db->getDoubleArray("d_pressure_grad_tol");
+         d_pressure_grad_time_max =
+            db->getDoubleArray("d_pressure_grad_time_max");
+         d_pressure_grad_time_min =
+            db->getDoubleArray("d_pressure_grad_time_min");
+
+      } else if (d_refinement_criteria[i] == "PRESSURE_SHOCK") {
+
+         d_pressure_shock_onset =
+            db->getDoubleArray("d_pressure_shock_onset");
+         d_pressure_shock_tol =
+            db->getDoubleArray("d_pressure_shock_tol");
+         d_pressure_shock_time_max =
+            db->getDoubleArray("d_pressure_shock_time_max");
+         d_pressure_shock_time_min =
+            db->getDoubleArray("d_pressure_shock_time_min");
+
+      } else if (d_refinement_criteria[i] == "PRESSURE_RICHARDSON") {
+
+         d_pressure_rich_tol =
+            db->getDoubleArray("d_pressure_rich_tol");
+         d_pressure_rich_time_max =
+            db->getDoubleArray("d_pressure_rich_time_max");
+         d_pressure_rich_time_min =
+            db->getDoubleArray("d_pressure_rich_time_min");
+
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to read boundary data from input database.                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::readDirichletBoundaryDataEntry(
+   tbox::Pointer<tbox::Database> db,
+   string& db_name,
+   int bdry_location_index)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+   TBOX_ASSERT(!db_name.empty());
+#endif
+#if (NDIM == 2)
+   readStateDataEntry(db,
+      db_name,
+      bdry_location_index,
+      d_bdry_edge_density,
+      d_bdry_edge_velocity,
+      d_bdry_edge_pressure);
+#endif
+#if (NDIM == 3)
+   readStateDataEntry(db,
+      db_name,
+      bdry_location_index,
+      d_bdry_face_density,
+      d_bdry_face_velocity,
+      d_bdry_face_pressure);
+#endif
+}
+
+void Euler::readStateDataEntry(
+   tbox::Pointer<tbox::Database> db,
+   const string& db_name,
+   int array_indx,
+   tbox::Array<double>& density,
+   tbox::Array<double>& velocity,
+   tbox::Array<double>& pressure)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+   TBOX_ASSERT(!db_name.empty());
+   TBOX_ASSERT(array_indx >= 0);
+   TBOX_ASSERT(density.getSize() > array_indx);
+   TBOX_ASSERT(velocity.getSize() > array_indx * NDIM);
+   TBOX_ASSERT(pressure.getSize() > array_indx);
+#endif
+
+   if (db->keyExists("density")) {
+      density[array_indx] = db->getDouble("density");
+   } else {
+      TBOX_ERROR(d_object_name << ": "
+                               << "`density' entry missing from " << db_name
+                               << " input database. " << endl);
+   }
+   if (db->keyExists("velocity")) {
+      tbox::Array<double> tmp_vel(0);
+      tmp_vel = db->getDoubleArray("velocity");
+      if (tmp_vel.getSize() < NDIM) {
+         TBOX_ERROR(d_object_name << ": "
+                                  << "Insufficient number `velocity' values"
+                                  << " given in " << db_name
+                                  << " input database." << endl);
+      }
+      for (int iv = 0; iv < NDIM; iv++) {
+         velocity[array_indx * NDIM + iv] = tmp_vel[iv];
+      }
+   } else {
+      TBOX_ERROR(d_object_name << ": "
+                               << "`velocity' entry missing from " << db_name
+                               << " input database. " << endl);
+   }
+   if (db->keyExists("pressure")) {
+      pressure[array_indx] = db->getDouble("pressure");
+   } else {
+      TBOX_ERROR(d_object_name << ": "
+                               << "`pressure' entry missing from " << db_name
+                               << " input database. " << endl);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routine to check boundary data when debugging.                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void Euler::checkBoundaryData(
+   int btype,
+   const hier::Patch& patch,
+   const hier::IntVector<NDIM>& ghost_width_to_check,
+   const tbox::Array<int>& scalar_bconds,
+   const tbox::Array<int>& vector_bconds) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+#if (NDIM == 2)
+   TBOX_ASSERT(btype == EDGE2D_BDRY_TYPE ||
+      btype == NODE2D_BDRY_TYPE);
+#endif
+#if (NDIM == 3)
+   TBOX_ASSERT(btype == FACE3D_BDRY_TYPE ||
+      btype == EDGE3D_BDRY_TYPE ||
+      btype == NODE3D_BDRY_TYPE);
+#endif
+#endif
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+      patch.getPatchGeometry();
+   const tbox::Array<hier::BoundaryBox> bdry_boxes =
+      pgeom->getCodimensionBoundaries(btype);
+
+   hier::VariableDatabase* vdb = hier::VariableDatabase::getDatabase();
+
+   for (int i = 0; i < bdry_boxes.getSize(); i++) {
+      hier::BoundaryBox bbox = bdry_boxes[i];
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(bbox.getBoundaryType() == btype);
+#endif
+      int bloc = bbox.getLocationIndex();
+
+      int bscalarcase, bvelocitycase, refbdryloc;
+#if (NDIM == 2)
+      if (btype == EDGE2D_BDRY_TYPE) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(scalar_bconds.getSize() == NUM_2D_EDGES);
+         TBOX_ASSERT(vector_bconds.getSize() == NUM_2D_EDGES);
+#endif
+         bscalarcase = scalar_bconds[bloc];
+         bvelocitycase = vector_bconds[bloc];
+         refbdryloc = bloc;
+      } else { // btype == NODE2D_BDRY_TYPE
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(scalar_bconds.getSize() == NUM_2D_NODES);
+         TBOX_ASSERT(vector_bconds.getSize() == NUM_2D_NODES);
+#endif
+         bscalarcase = scalar_bconds[bloc];
+         bvelocitycase = vector_bconds[bloc];
+         refbdryloc = d_node_bdry_edge[bloc];
+      }
+#endif
+#if (NDIM == 3)
+      if (btype == FACE3D_BDRY_TYPE) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(scalar_bconds.getSize() == NUM_3D_FACES);
+         TBOX_ASSERT(vector_bconds.getSize() == NUM_3D_FACES);
+#endif
+         bscalarcase = scalar_bconds[bloc];
+         bvelocitycase = vector_bconds[bloc];
+         refbdryloc = bloc;
+      } else if (btype == EDGE3D_BDRY_TYPE) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(scalar_bconds.getSize() == NUM_3D_EDGES);
+         TBOX_ASSERT(vector_bconds.getSize() == NUM_3D_EDGES);
+#endif
+         bscalarcase = scalar_bconds[bloc];
+         bvelocitycase = vector_bconds[bloc];
+         refbdryloc = d_edge_bdry_face[bloc];
+      } else { // btype == NODE3D_BDRY_TYPE
+#ifdef DEBUG_CHECK_ASSERTIONS
+         TBOX_ASSERT(scalar_bconds.getSize() == NUM_3D_NODES);
+         TBOX_ASSERT(vector_bconds.getSize() == NUM_3D_NODES);
+#endif
+         bscalarcase = scalar_bconds[bloc];
+         bvelocitycase = vector_bconds[bloc];
+         refbdryloc = d_node_bdry_face[bloc];
+      }
+#endif
+
+      int num_bad_values = 0;
+      NULL_USE(num_bad_values);
+
+#if (NDIM == 2)
+      num_bad_values =
+         appu::CartesianBoundaryUtilities2::checkBdryData(
+            d_density->getName(),
+            patch,
+            vdb->mapVariableAndContextToIndex(d_density, getDataContext()), 0,
+            ghost_width_to_check,
+            bbox,
+            bscalarcase,
+            d_bdry_edge_density[refbdryloc]);
+#endif
+#if (NDIM == 3)
+      num_bad_values =
+         appu::CartesianBoundaryUtilities3::checkBdryData(
+            d_density->getName(),
+            patch,
+            vdb->mapVariableAndContextToIndex(d_density, getDataContext()), 0,
+            ghost_width_to_check,
+            bbox,
+            bscalarcase,
+            d_bdry_face_density[refbdryloc]);
+#endif
+#if (TESTING == 1)
+      if (num_bad_values > 0) {
+         tbox::perr << "\nEuler Boundary Test FAILED: \n"
+                    << "     " << num_bad_values
+                    << " bad DENSITY values found for\n"
+                    << "     boundary type " << btype << " at location "
+                    << bloc << endl;
+      }
+#endif
+
+#if (NDIM == 2)
+      num_bad_values =
+         appu::CartesianBoundaryUtilities2::checkBdryData(
+            d_pressure->getName(),
+            patch,
+            vdb->mapVariableAndContextToIndex(d_pressure, getDataContext()),
+            0,
+            ghost_width_to_check,
+            bbox,
+            bscalarcase,
+            d_bdry_edge_density[refbdryloc]);
+#endif
+#if (NDIM == 3)
+      num_bad_values =
+         appu::CartesianBoundaryUtilities3::checkBdryData(
+            d_pressure->getName(),
+            patch,
+            vdb->mapVariableAndContextToIndex(d_pressure, getDataContext()),
+            0,
+            ghost_width_to_check,
+            bbox,
+            bscalarcase,
+            d_bdry_face_density[refbdryloc]);
+#endif
+#if (TESTING == 1)
+      if (num_bad_values > 0) {
+         tbox::perr << "\nEuler Boundary Test FAILED: \n"
+                    << "     " << num_bad_values
+                    << " bad PRESSURE values found for\n"
+                    << "     boundary type " << btype << " at location "
+                    << bloc << endl;
+      }
+#endif
+
+      for (int idir = 0; idir < NDIM; idir++) {
+
+         int vbcase = bscalarcase;
+#if (NDIM == 2)
+         if (btype == EDGE2D_BDRY_TYPE) {
+            if ((idir == 0 && (bloc == XLO || bloc == XHI)) ||
+                (idir == 1 && (bloc == YLO || bloc == YHI))) {
+               vbcase = bvelocitycase;
+            }
+         } else if (btype == NODE2D_BDRY_TYPE) {
+            if ((idir == 0 && bvelocitycase == XREFLECT_BC) ||
+                (idir == 1 && bvelocitycase == YREFLECT_BC)) {
+               vbcase = bvelocitycase;
+            }
+         }
+#endif
+#if (NDIM == 3)
+         if (btype == FACE3D_BDRY_TYPE) {
+            if ((idir == 0 && (bloc == XLO || bloc == XHI)) ||
+                (idir == 1 && (bloc == YLO || bloc == YHI)) ||
+                (idir == 2 && (bloc == ZLO || bloc == ZHI))) {
+               vbcase = bvelocitycase;
+            }
+         } else if (btype == EDGE3D_BDRY_TYPE || btype == NODE3D_BDRY_TYPE) {
+            if ((idir == 0 && bvelocitycase == XREFLECT_BC) ||
+                (idir == 1 && bvelocitycase == YREFLECT_BC) ||
+                (idir == 2 && bvelocitycase == ZREFLECT_BC)) {
+               vbcase = bvelocitycase;
+            }
+         }
+#endif
+
+#if (NDIM == 2)
+         num_bad_values =
+            appu::CartesianBoundaryUtilities2::checkBdryData(
+               d_velocity->getName(),
+               patch,
+               vdb->mapVariableAndContextToIndex(d_velocity, getDataContext()),
+               idir,
+               ghost_width_to_check,
+               bbox,
+               vbcase,
+               d_bdry_edge_velocity[refbdryloc * NDIM + idir]);
+#endif
+#if (NDIM == 3)
+         num_bad_values =
+            appu::CartesianBoundaryUtilities3::checkBdryData(
+               d_velocity->getName(),
+               patch,
+               vdb->mapVariableAndContextToIndex(d_velocity, getDataContext()),
+               idir,
+               ghost_width_to_check,
+               bbox,
+               vbcase,
+               d_bdry_face_velocity[refbdryloc * NDIM + idir]);
+#endif
+#if (TESTING == 1)
+         if (num_bad_values > 0) {
+            tbox::perr << "\nEuler Boundary Test FAILED: \n"
+                       << "     " << num_bad_values
+                       << " bad VELOCITY values found in direction " << idir
+                       << " for\n"
+                       << "     boundary type " << btype << " at location "
+                       << bloc << endl;
+         }
+#endif
+      }
+
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/Euler.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/Euler.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,606 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Numerical routines for single patch in Euler equation ex. 
+ *
+ ************************************************************************/
+
+#ifndef included_EulerXD
+#define included_EulerXD
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/MessageStream.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/appu/BoundaryUtilityStrategy.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/mesh/GriddingAlgorithm.h"
+#include "SAMRAI/algs/HyperbolicLevelIntegrator.h"
+#include "SAMRAI/algs/HyperbolicPatchStrategy.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Serializable.h"
+#include <string>
+using namespace std;
+#define included_String
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/appu/VisDerivedDataStrategy.h"
+#include "SAMRAI/appu/VisItDataWriter.h"
+
+/**
+ * The Euler class provides routines for a sample application code that
+ * solves the Euler equations of gas dynamics.  This code illustrates the
+ * manner in which a code employing the standard Berger/Oliger AMR algorithm
+ * for explicit hydrodynamics can be used in the SAMRAI framework.
+ * This class is derived from the algs::HyperbolicPatchStrategy abstract base
+ * class which defines the bulk of the interface between the hyperbolic
+ * intergration algorithm provided by SAMRAI and the numerical routines
+ * specific to Euler.  In particular, this class provides routines which
+ * maybe applied to any patch in an AMR patch hierarchy.
+ *
+ * The numerical routines model the Euler equations of gas dynamics with
+ * explicit timestepping and a second-order unsplit Godunov method.
+ * The primary numerical quantities are density, velocity, and pressure.
+ */
+
+using namespace SAMRAI;
+
+class Euler:
+   public tbox::Serializable,
+   public algs::HyperbolicPatchStrategy,
+   public appu::BoundaryUtilityStrategy,
+   public appu::VisDerivedDataStrategy
+{
+public:
+   /**
+    * The constructor for Euler sets default parameters for the
+    * Euler model.  Specifically, it allocates the variables that represent
+    * the state of the solution.  The constructor also registers this
+    * object for restart with the restart manager using the object name.
+    *
+    * After default values are set, this routine calls getFromRestart()
+    * if execution from a restart file is specified.  Finally,
+    * getFromInput() is called to read values from the given input
+    * database (potentially overriding those found in the restart file).
+    */
+   Euler(
+      const string& object_name,
+      tbox::Pointer<tbox::Database> input_db,
+      tbox::Pointer<geom::CartesianGridGeometry> grid_geom);
+
+   /**
+    * The destructor for Euler does nothing.
+    */
+   ~Euler();
+
+   ///
+   ///  The following routines:
+   ///
+   ///      registerModelVariables(),
+   ///      initializeDataOnPatch(),
+   ///      computeStableDtOnPatch(),
+   ///      computeFluxesOnPatch(),
+   ///      conservativeDifferenceOnPatch(),
+   ///      tagGradientDetectorCells(),
+   ///      tagRichardsonExtrapolationCells()
+   ///
+   ///  are concrete implementations of functions declared in the
+   ///  algs::HyperbolicPatchStrategy abstract base class.
+   ///
+
+   /**
+    * Register Euler model variables with algs::HyperbolicLevelIntegrator
+    * according to variable registration function provided by the integrator.
+    * In other words, variables are registered according to their role
+    * in the integration process (e.g., time-dependent, flux, etc.).
+    * This routine also registers variables for plotting with the
+    * Vis writer.
+    */
+   void
+   registerModelVariables(
+      algs::HyperbolicLevelIntegrator* integrator);
+
+   /**
+    * Set up parameters in the load balancer object (owned by the gridding
+    * algorithm) if needed.  The Euler model allows non-uniform load balancing
+    * to be used based on the input file parameter called
+    * "use_nonuniform_workload".  The default case is to use uniform
+    * load balancing (i.e., use_nonuniform_workload == false).  For
+    * illustrative and testing purposes, when non-uniform load balancing is
+    * turned on, a weight of one will be applied to every grid cell.  This
+    * should produce an identical patch configuration to the uniform load
+    * balance case.
+    */
+   void
+   setupLoadBalancer(
+      algs::HyperbolicLevelIntegrator* integrator,
+      mesh::GriddingAlgorithm* gridding_algorithm);
+
+   /**
+    * Set the data on the patch interior to some initial values,
+    * depending on the input parameters and numerical routines.
+    * If the "initial_time" flag is false, indicating that the
+    * routine is called after a regridding step, the routine does nothing.
+    */
+   void
+   initializeDataOnPatch(
+      hier::Patch& patch,
+      const double data_time,
+      const bool initial_time);
+
+   /**
+    * Compute the stable time increment for patch using a CFL
+    * condition and return the computed dt.
+    */
+   double
+   computeStableDtOnPatch(
+      hier::Patch& patch,
+      const bool initial_time,
+      const double dt_time);
+
+   /**
+    * Compute time integral of fluxes to be used in conservative difference
+    * for patch integration.  When NDIM == 3, this function calls either
+    * compute3DFluxesWithCornerTransport1(), or
+    * compute3DFluxesWithCornerTransport2() depending on which
+    * transverse flux correction option that is specified in input.
+    * The conservative difference used to update the integrated quantities
+    * is implemented in the conservativeDifferenceOnPatch() routine.
+    */
+   void
+   computeFluxesOnPatch(
+      hier::Patch& patch,
+      const double time,
+      const double dt);
+
+   /**
+    * Update Euler solution variables by performing a conservative
+    * difference with the fluxes calculated in computeFluxesOnPatch().
+    */
+   void
+   conservativeDifferenceOnPatch(
+      hier::Patch& patch,
+      const double time,
+      const double dt,
+      bool at_syncronization);
+
+   /**
+    * Tag cells for refinement using gradient detector.
+    */
+   void
+   tagGradientDetectorCells(
+      hier::Patch& patch,
+      const double regrid_time,
+      const bool initial_error,
+      const int tag_indx,
+      const bool uses_richardson_extrapolation_too);
+
+   /**
+    * Tag cells for refinement using Richardson extrapolation.
+    */
+   void
+   tagRichardsonExtrapolationCells(
+      hier::Patch& patch,
+      const int error_level_number,
+      const tbox::Pointer<hier::VariableContext> coarsened_fine,
+      const tbox::Pointer<hier::VariableContext> advanced_coarse,
+      const double regrid_time,
+      const double deltat,
+      const int error_coarsen_ratio,
+      const bool initial_error,
+      const int tag_index,
+      const bool uses_gradient_detector_too);
+
+   ///
+   ///  The following routines:
+   ///
+   ///      setPhysicalBoundaryConditions(),
+   ///      getRefineOpStencilWidth(),
+   ///      postprocessRefine()
+   ///
+   ///  are concrete implementations of functions declared in the
+   ///  RefinePatchStrategy abstract base class.
+   ///
+
+   /**
+    * Set the data in ghost cells corresponding to physical boundary
+    * conditions.  Specific boundary conditions are determined by
+    * information specified in input file and numerical routines.
+    */
+   void
+   setPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const double fill_time,
+      const hier::IntVector<NDIM>&
+      ghost_width_to_fill);
+
+   /**
+    * Return stencil width of conservative linear interpolation operations.
+    */
+   hier::IntVector<NDIM>
+   getRefineOpStencilWidth() const;
+
+   /**
+    * Refine velocity and pressure from coarse patch to fine patch
+    * so that momentum and total energy are conserved.
+    */
+   void
+   postprocessRefine(
+      hier::Patch& fine,
+      const hier::Patch& coarse,
+      const hier::Box& fine_box,
+      const hier::IntVector<NDIM>& ratio);
+
+   ///
+   ///  The following routines:
+   ///
+   ///      getCoarsenOpStencilWidth(),
+   ///      postprocessCoarsen()
+   ///
+   ///  are concrete implementations of functions declared in the
+   ///  CoarsenPatchStrategy abstract base class.
+   ///
+
+   /**
+    * Return stencil width of conservative averaging operations.
+    */
+   hier::IntVector<NDIM>
+   getCoarsenOpStencilWidth() const;
+
+   /**
+    * Coarsen velocity and pressure from coarse patch to fine patch
+    * so that momentum and total energy are conserved.
+    */
+   void
+   postprocessCoarsen(
+      hier::Patch& coarse,
+      const hier::Patch& fine,
+      const hier::Box& coarse_box,
+      const hier::IntVector<NDIM>& ratio);
+
+   /**
+    * Write state of Euler object to the given database for restart.
+    *
+    * This routine is a concrete implementation of the function
+    * declared in the tbox::Serializable abstract base class.
+    */
+   void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> db);
+
+   /**
+    * This routine is a concrete implementation of the virtual function
+    * in the base class BoundaryUtilityStrategy.  It reads DIRICHLET
+    * boundary state values from the given database with the
+    * given name string idenifier.  The integer location index
+    * indicates the face (in 3D) or edge (in 2D) to which the boundary
+    * condition applies.
+    */
+   void
+   readDirichletBoundaryDataEntry(
+      tbox::Pointer<tbox::Database> db,
+      string& db_name,
+      int bdry_location_index);
+
+   /**
+    * Register a VisIt data writer so this class will write
+    * plot files that may be postprocessed with the VisIt
+    * visualization tool.
+    */
+#ifdef HAVE_HDF5
+   void
+   registerVisItDataWriter(
+      tbox::Pointer<appu::VisItDataWriter> viz_writer);
+#endif
+
+   /**
+    * This routine is a concrete implementation of the virtual
+    * function in the base class appu::VisDerivedDataStrategy.
+    * It computes derived plot quantities registered with the VisIt
+    * data writer from data that is maintained on each patch in the
+    * hierarchy.  In particular, it writes the plot quantity
+    * identified by the string variable name to the specified double
+    * buffer on the patch in the given region.  The depth_id integer
+    * argument indicates which entry in the "depth" of the vector is
+    * being written; for a scalar quantity, this may be ignored.  For
+    * a vector quantity, it may be used to compute the quantity at the
+    * particular depth (e.g. mom[depth_id] = rho * vel[depth_id]).
+    * The boolean return value specifies whether or not derived data
+    * exists on the patch.  Generally, this will be TRUE.  If the
+    * derived data does NOT exist on the patch, return FALSE.
+    */
+   bool
+   packDerivedDataIntoDoubleBuffer(
+      double* buffer,
+      const hier::Patch& patch,
+      const hier::Box& region,
+      const string& variable_name,
+      int depth_id) const;
+
+   ///
+   ///  The following routines are specific to the Euler class and
+   ///  are not declared in any base class.
+   ///
+
+   /**
+    * Reset physical boundary values in special cases, such as when
+    * using symmetric (i.e., reflective) boundary conditions.
+    */
+   void
+   boundaryReset(
+      hier::Patch& patch,
+      pdat::FaceData<double>& traced_left,
+      pdat::FaceData<double>& traced_right) const;
+
+   /**
+    * Print all data members for Euler class.
+    */
+   void
+   printClassData(
+      ostream& os) const;
+
+   /*
+    * Dump data in intersection of 1-dimensional "pencil box" to file
+    * with given name.  The direction corresponds to the axis of the
+    * pencil box in the domain.  Data dumped by this routine is
+    * readable by Matlab.
+    */
+   void
+   writeData1dPencil(
+      const tbox::Pointer<hier::Patch> patch,
+      const hier::Box& pencil_box,
+      const int idir,
+      ostream& file);
+
+private:
+   /*
+    * These private member functions read data from input and restart.
+    * When beginning a run from a restart file, all data members are read
+    * from the restart file.   If the boolean flag "is_from_restart"
+    * is true when reading from input, some restart values may be
+    * overridden by those in the input file.
+    *
+    * An assertion results if the database pointer is null.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db,
+      bool is_from_restart);
+   void
+   getFromRestart();
+
+   void
+   readStateDataEntry(
+      tbox::Pointer<tbox::Database> db,
+      const string& db_name,
+      int array_indx,
+      tbox::Array<double>& density,
+      tbox::Array<double>& velocity,
+      tbox::Array<double>& pressure);
+
+   /*
+    * Private member function to check correctness of boundary data.
+    */
+   void
+   checkBoundaryData(
+      int btype,
+      const hier::Patch& patch,
+      const hier::IntVector<NDIM>& ghost_width_to_fill,
+      const tbox::Array<int>& scalar_bconds,
+      const tbox::Array<int>& vector_bconds) const;
+
+   /*
+    * Three-dimensional flux computation routines corresponding to
+    * either of the two transverse flux correction options.  These
+    * routines are called from the computeFluxesOnPatch() function.
+    */
+   void
+   compute3DFluxesWithCornerTransport1(
+      hier::Patch& patch,
+      const double dt);
+   void
+   compute3DFluxesWithCornerTransport2(
+      hier::Patch& patch,
+      const double dt);
+
+   /*
+    * The object name is used for error/warning reporting and also as a
+    * string label for restart database entries.
+    */
+   string d_object_name;
+
+   /*
+    * We cache pointers to the grid geometry and Vis data writers
+    * to set up initial data, set physical boundary conditions,
+    * and register plot variables.  We also cache a pointer to the
+    * plot context passed to the variable registration routine.
+    */
+   tbox::Pointer<geom::CartesianGridGeometry> d_grid_geometry;
+#ifdef HAVE_HDF5
+   tbox::Pointer<appu::VisItDataWriter> d_visit_writer;
+#endif
+   tbox::Pointer<hier::VariableContext> d_plot_context;
+
+   /*
+    * Data items used for nonuniform load balance, if used.
+    */
+   tbox::Pointer<pdat::CellVariable<double> > d_workload_variable;
+   int d_workload_data_id;
+   bool d_use_nonuniform_workload;
+
+   /*
+    * Euler solution state is represented by "primitive" variables,
+    * density, velocity, and pressure.
+    */
+   tbox::Pointer<pdat::CellVariable<double> > d_density;
+   tbox::Pointer<pdat::CellVariable<double> > d_velocity;
+   tbox::Pointer<pdat::CellVariable<double> > d_pressure;
+
+   /*
+    * tbox::Pointer to flux variable vector  - [frho, fu, fp]
+    */
+   tbox::Pointer<pdat::FaceVariable<double> > d_flux;
+
+   /*
+    * Ratio of specific heats for ideal gas.
+    */
+   double d_gamma;
+
+   /*
+    *  Parameters for numerical method:
+    *
+    *    d_riemann_solve ....... Riemann solver used in flux calculation
+    *
+    *    d_godunov_order ....... order of Godunov slopes (1, 2, or 4)
+    *
+    *    d_corner_transport .... type of finite difference approximation
+    *                            for 3d transverse flux correction
+    *
+    *    d_nghosts ............. number of ghost cells for cell-centered
+    *                            and face/side-centered variables
+    *
+    *    d_fluxghosts .......... number of ghost cells for fluxes
+    *
+    */
+   string d_riemann_solve;
+   int d_riemann_solve_int;
+   int d_godunov_order;
+   string d_corner_transport;
+   hier::IntVector<NDIM> d_nghosts;
+   hier::IntVector<NDIM> d_fluxghosts;
+
+   /*
+    * Indicator for problem type and initial conditions
+    */
+   string d_data_problem;
+   int d_data_problem_int;
+
+   /*
+    * Input for SPHERE problem
+    */
+   double d_radius;
+   double d_center[NDIM];
+   double d_density_inside;
+   double d_velocity_inside[NDIM];
+   double d_pressure_inside;
+   double d_density_outside;
+   double d_velocity_outside[NDIM];
+   double d_pressure_outside;
+
+   /*
+    * Input for PIECEWISE_CONSTANT_*  and STEP problems
+    */
+   int d_number_of_intervals;
+   tbox::Array<double> d_front_position;
+   tbox::Array<double> d_interval_density;
+   tbox::Array<double> d_interval_velocity;
+   tbox::Array<double> d_interval_pressure;
+
+   /*
+    * Boundary condition cases and boundary values.
+    * Options are: FLOW, REFLECT, DIRICHLET
+    * and variants for nodes and edges.
+    *
+    * Input file values are read into these arrays.
+    */
+   tbox::Array<int> d_master_bdry_edge_conds;
+   tbox::Array<int> d_master_bdry_node_conds;
+#if (NDIM == 3)
+   tbox::Array<int> d_master_bdry_face_conds;
+#endif
+
+   /*
+    * Boundary condition cases for scalar and vector (i.e., depth > 1)
+    * variables.  These are post-processed input values and are passed
+    * to the boundary routines.
+    */
+   tbox::Array<int> d_scalar_bdry_edge_conds;
+   tbox::Array<int> d_vector_bdry_edge_conds;
+
+   tbox::Array<int> d_scalar_bdry_node_conds;
+   tbox::Array<int> d_vector_bdry_node_conds;
+
+#if (NDIM == 3)
+   tbox::Array<int> d_scalar_bdry_face_conds;
+   tbox::Array<int> d_vector_bdry_face_conds;
+#endif
+
+#if (NDIM == 2)
+   tbox::Array<int> d_node_bdry_edge;
+#endif
+#if (NDIM == 3)
+   tbox::Array<int> d_edge_bdry_face;
+   tbox::Array<int> d_node_bdry_face;
+#endif
+
+   /*
+    * Arrays of face (3d) or edge (2d) boundary values for DIRICHLET case.
+    */
+#if (NDIM == 2)
+   tbox::Array<double> d_bdry_edge_density;
+   tbox::Array<double> d_bdry_edge_velocity;
+   tbox::Array<double> d_bdry_edge_pressure;
+#endif
+#if (NDIM == 3)
+   tbox::Array<double> d_bdry_face_density;
+   tbox::Array<double> d_bdry_face_velocity;
+   tbox::Array<double> d_bdry_face_pressure;
+#endif
+
+   /*
+    * Refinement criteria parameters for gradient detector and
+    * Richardson extrapolation.
+    */
+   tbox::Array<string> d_refinement_criteria;
+   tbox::Array<double> d_density_dev_tol;
+   tbox::Array<double> d_density_dev;
+   tbox::Array<double> d_density_dev_time_max;
+   tbox::Array<double> d_density_dev_time_min;
+   tbox::Array<double> d_density_grad_tol;
+   tbox::Array<double> d_density_grad_time_max;
+   tbox::Array<double> d_density_grad_time_min;
+   tbox::Array<double> d_density_shock_onset;
+   tbox::Array<double> d_density_shock_tol;
+   tbox::Array<double> d_density_shock_time_max;
+   tbox::Array<double> d_density_shock_time_min;
+   tbox::Array<double> d_density_rich_tol;
+   tbox::Array<double> d_density_rich_time_max;
+   tbox::Array<double> d_density_rich_time_min;
+   tbox::Array<double> d_pressure_dev_tol;
+   tbox::Array<double> d_pressure_dev;
+   tbox::Array<double> d_pressure_dev_time_max;
+   tbox::Array<double> d_pressure_dev_time_min;
+   tbox::Array<double> d_pressure_grad_tol;
+   tbox::Array<double> d_pressure_grad_time_max;
+   tbox::Array<double> d_pressure_grad_time_min;
+   tbox::Array<double> d_pressure_shock_onset;
+   tbox::Array<double> d_pressure_shock_tol;
+   tbox::Array<double> d_pressure_shock_time_max;
+   tbox::Array<double> d_pressure_shock_time_min;
+   tbox::Array<double> d_pressure_rich_tol;
+   tbox::Array<double> d_pressure_rich_time_max;
+   tbox::Array<double> d_pressure_rich_time_min;
+
+   /*
+    * Timers.
+    */
+   static tbox::Pointer<tbox::Timer> t_init;
+   static tbox::Pointer<tbox::Timer> t_compute_dt;
+   static tbox::Pointer<tbox::Timer> t_compute_fluxes;
+   static tbox::Pointer<tbox::Timer> t_conservdiff;
+   static tbox::Pointer<tbox::Timer> t_setphysbcs;
+   static tbox::Pointer<tbox::Timer> t_taggradient;
+
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/EulerFort.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/EulerFort.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,330 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   F77 external declarations for SAMRAI Euler gas dynamics ex. 
+ *
+ ************************************************************************/
+
+extern "C" {
+
+void F77_FUNC(eulerinit, EULERINIT) (
+   const int &, const double *, const double *, const double *,
+   const int &, const int &,
+   const int &, const int &,
+#if (NDIM > 2)
+   const int &, const int &,
+#endif
+   const int &,
+   const int &,
+#if (NDIM > 2)
+   const int &,
+#endif
+   const double &,
+   double *, double *, double *,
+   const int &,
+   const double *,
+   const double *, const double *, const double *);
+
+void F77_FUNC(eulerinitsphere, EULERINITSPHERE) (
+   const int &, const double *, const double *, const double *,
+   const int &, const int &,
+   const int &, const int &,
+#if (NDIM > 2)
+   const int &, const int &,
+#endif
+   const int &,
+   const int &,
+#if (NDIM > 2)
+   const int &,
+#endif
+   const double &,
+   double *, double *, double *,
+   const double &, const double *, const double &,
+   const double &, const double *, const double &,
+   const double *, const double &);
+
+void F77_FUNC(stabledt, STABLEDT) (
+   const double *,
+   const int &, const int &,
+   const int &, const int &,
+#if (NDIM > 2)
+   const int &, const int &,
+#endif
+   const int &,
+   const int &,
+#if (NDIM > 2)
+   const int &,
+#endif
+   const double &,
+   const double *, const double *, const double *, double &);
+
+void F77_FUNC(inittraceflux, INITTRACEFLUX) (
+   const int &, const int &,
+   const int &, const int &,
+#if (NDIM > 2)
+   const int &, const int &,
+#endif
+   const double *, const double *, const double *,
+   double *, double *, double *,
+#if (NDIM > 2)
+   double *, double *, double *,
+#endif
+   double *, double *, double *);
+
+void F77_FUNC(computesound, COMPUTESOUND) (
+   const int &, const int &,
+   const int &, const int &,
+#if (NDIM > 2)
+   const int &, const int &,
+#endif
+   const double &,
+   const double *, const double *, const double *,
+   double *);
+
+void F77_FUNC(chartracing0, CHARTRACING0) (
+   const double &,
+   const int &, const int &,
+   const int &, const int &,
+#if (NDIM > 2)
+   const int &, const int &,
+#endif
+   const int &, const double &, const double &, const int &,
+   const double *,
+   double *, double *,
+   double *, double *,
+   double *,
+   double *, double *);
+
+void F77_FUNC(chartracing1, CHARTRACING1) (
+   const double &,
+   const int &, const int &,
+   const int &, const int &,
+#if (NDIM > 2)
+   const int &, const int &,
+#endif
+   const int &, const double &, const double &, const int &,
+   const double *,
+   double *, double *,
+   double *, double *,
+   double *,
+   double *, double *);
+
+#if (NDIM == 3)
+void F77_FUNC(chartracing2, CHARTRACING2) (
+   const double &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const double &, const double &, const int &,
+   const double *,
+   double *, double *,
+   double *, double *,
+   double *,
+   double *, double *);
+#endif
+
+void F77_FUNC(fluxcalculation, FLUXCALCULATION) (
+   const double &, const int &,
+#if (NDIM > 2)
+   const int &,
+#endif
+   const int &,
+   const double *,
+   const int &, const int &,
+   const int &, const int &,
+#if (NDIM > 2)
+   const int &, const int &,
+#endif
+   const double &,
+   const int &,
+   const double *, const double *, const double *,
+#if (NDIM > 2)
+   double *, double *, double *,
+#endif
+   double *, double *, double *,
+   double *, double *, double *);
+
+#if (NDIM == 3)
+void F77_FUNC(fluxcorrec2d, FLUXCORREC2D) (
+   const double &,
+   const int &, const int &, const int &, const int &, const int &, const int &,
+   const double *, const double &, const int &,
+   const double *,
+   const double *,
+   const double *,
+   const double *, const double *, const double *,
+   const double *, const double *, const double *,
+   const double *, const double *, const double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(fluxcorrec3d, FLUXCORREC3D) (
+   const double &,
+   const int &, const int &, const int &, const int &, const int &, const int &,
+   const double *, const double &,
+   const double *, const double *, const double *,
+   const double *, const double *, const double *,
+   const double *, const double *, const double *,
+   double *, double *, double *,
+   double *, double *, double *);
+#endif
+
+#if (NDIM == 2)
+void F77_FUNC(fluxcorrec, FLUXCORREC) (
+   const double &,
+   const int &, const int &, const int &, const int &,
+   const double *, const double &,
+   const double *, const double *, const double *,
+   double *, double *,
+   double *, double *,
+   double *, double *);
+#endif
+
+void F77_FUNC(consdiff, CONSDIFF) (
+   const int &, const int &,
+   const int &, const int &,
+#if (NDIM > 2)
+   const int &, const int &,
+#endif
+   const double *,
+   const double *,
+   const double *,
+#if (NDIM > 2)
+   const double *,
+#endif
+   const double &,
+   double *, double *, double *);
+
+#if (NDIM > 2)
+void F77_FUNC(onethirdstate, ONETHIRDSTATE) (
+   const double &, const double *, const int &,
+   const int &, const int &, const int &, const int &, const int &, const int &,
+   const double &,
+   const double *, const double *, const double *,
+   const double *, const double *, const double *,
+   double *);
+
+void F77_FUNC(fluxthird, FLUXTHIRD) (
+   const double &, const double *, const int &,
+   const int &, const int &, const int &, const int &, const int &, const int &,
+   const double &,
+   const int &,
+   const double *, const double *, const double *, const double *,
+   double *, double *, double *);
+
+void F77_FUNC(fluxcorrecjt, FLUXCORRECJT) (
+   const double &, const double *, const int &,
+   const int &, const int &, const int &, const int &, const int &, const int &,
+   const double &,
+   const double *, const double *, const double *,
+   const double *, const double *, const double *,
+   double *, double *, double *,
+   double *, double *, double *);
+#endif
+
+#if (NDIM == 2)
+void F77_FUNC(conservlinint2d, CONSERVLININT2D) (
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *, const double &,
+   const double *, const double *,
+   const double *, const double *,
+   double *, double *,
+   double *,
+   double *, double *, double *, const int &,
+   double *, double *, double *,
+   double *, double *,
+   double *, double *, double *, double *);
+
+void F77_FUNC(conservavg2d, CONSERVAVG2D) (
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int *, const double *, const double *, const double &,
+   const double *, const double *,
+   const double *, const double *,
+   double *, double *,
+   double *);
+#endif
+#if (NDIM == 3)
+void F77_FUNC(conservlinint3d, CONSERVLININT3D) (
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *, const double &,
+   const double *, const double *,
+   const double *, const double *,
+   double *, double *,
+   double *,
+   double *, double *, double *, const int &,
+   double *, double *, double *,
+   double *, double *, double *,
+   double *, double *, double *, double *, double *, double *);
+
+void F77_FUNC(conservavg3d, CONSERVAVG3D) (
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int *, const double *, const double *, const double &,
+   const double *, const double *,
+   const double *, const double *,
+   double *, double *,
+   double *);
+#endif
+
+void F77_FUNC(detectgrad, DETECTGRAD) (
+   const int &, const int &,
+   const int &, const int &,
+#if (NDIM > 2)
+   const int &, const int &,
+#endif
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+#if (NDIM > 2)
+   const int &, const int &, const int &,
+#endif
+   const double *,
+   const double &,
+   const int &, const int &,
+   const double *,
+   int *, int *);
+
+void F77_FUNC(detectshock, DETECTSHOCK) (
+   const int &, const int &,
+   const int &, const int &,
+#if (NDIM > 2)
+   const int &, const int &,
+#endif
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+#if (NDIM > 2)
+   const int &, const int &, const int &,
+#endif
+   const double *,
+   const double &, const double &,
+   const int &, const int &,
+   const double *,
+   int *, int *);
+
+void F77_FUNC(stufprobc, STUFPROBC) (
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &);
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,541 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=Euler.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/HyperbolicLevelIntegrator.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/HyperbolicPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementLevelStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryUtilityStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryDefines.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryUtilities2.h	\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryUtilities3.h	\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h Euler.C Euler.h\
+	EulerFort.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=intToString.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h intToString.C		\
+	intToString.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=main.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/HyperbolicLevelIntegrator.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/HyperbolicPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementIntegrator.I		\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementIntegrator.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementLevelStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryUtilityStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BergerRigoutsos.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h Euler.h main.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,107 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for Euler gas dynamics sample application 
+##
+#########################################################################
+
+# TODO sample_input should be renamed to example input or removed?
+
+SAMRAI	      = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/test/performance/Euler
+VPATH         = @top_srcdir@/$(SUBDIR)
+OBJECT        = ../../../..
+
+default:        main3d
+
+include $(OBJECT)/config/Makefile.config
+
+CPPFLAGS_EXTRA= -DDISPLAY -DNDIM=$(PDIM)  -DTESTING=0
+
+CXX_OBJS      = main.o Euler.o 
+F2D_OBJS      = avgint.o flaten1d.o flux.o grad.o init.o stable.o \
+		stufprobc.o trace.o trace1d.o
+F3D_OBJS      = $(F2D_OBJS) fluxcorner.o 
+
+NUM_TESTS = 1
+TEST_NPROCS = @TEST_NPROCS@
+
+main2d:
+		if test -f stamp-3d; then $(MAKE) clean; fi
+		touch stamp-2d
+		$(MAKE) PDIM=2 main-2d
+
+main-2d:	$(CXX_OBJS) $(F2D_OBJS) $(LIBSAMRAIDEPEND)
+		$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) $(F2D_OBJS)	\
+		$(LIBSAMRAI2D) $(LIBSAMRAI) $(LDLIBS) -o main2d
+
+main3d:
+		if test -f stamp-2d; then $(MAKE) clean; fi
+		touch stamp-3d
+		$(MAKE) PDIM=3 main-3d
+
+main-3d:	$(CXX_OBJS) $(F3D_OBJS) $(LIBSAMRAIDEPEND)
+		$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) $(F3D_OBJS)	\
+		$(LIBSAMRAI3D) $(LIBSAMRAI) $(LDLIBS) -o main3d
+
+clean:
+		$(SAMCLEAN)
+		$(RM) *.f main2d main3d
+
+redo:
+		$(RM) main2d main3d core *.ii *.int.c
+		$(RM) -r ti_files ii_files
+
+include $(SRCDIR)/Makefile.depend
+
+FORTRAN       = fortran/$(PDIM)d
+M4DIRS        = -DFORTDIR=$(FORTRAN) $(SAMRAI_M4_FLAGS)
+
+avgint.o:	$(FORTRAN)/avgint.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/avgint.m4 > avgint.f
+		$(F77) $(FFLAGS) -c avgint.f -o $@
+
+flaten1d.o:	$(FORTRAN)/flaten1d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/flaten1d.m4 > flaten1d.f
+		$(F77) $(FFLAGS) -c flaten1d.f -o $@
+
+flux.o:		$(FORTRAN)/flux.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/flux.m4 > flux.f
+		$(F77) $(FFLAGS) -c flux.f -o $@
+
+fluxcorner.o:	$(FORTRAN)/fluxcorner.m4
+		$(M4) -B8096 $(M4DIRS) $(FORTRAN)/fluxcorner.m4 > fluxcorner.f
+		$(F77) $(FFLAGS) -c fluxcorner.f -o $@
+
+grad.o:		$(FORTRAN)/grad.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/grad.m4 > grad.f
+		$(F77) $(FFLAGS) -c grad.f -o $@
+
+init.o:		$(FORTRAN)/init.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/init.m4 > init.f
+		$(F77) $(FFLAGS) -c init.f -o $@
+
+stable.o:	$(FORTRAN)/stable.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/stable.m4 > stable.f
+		$(F77) $(FFLAGS) -c stable.f -o $@
+
+stufprobc.o:	$(FORTRAN)/../stufprobc.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/../stufprobc.m4 > stufprobc.f
+		$(F77) $(FFLAGS) -c stufprobc.f -o $@
+
+trace.o:	$(FORTRAN)/trace.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/trace.m4 > trace.f
+		$(F77) $(FFLAGS) -c trace.f -o $@
+
+trace1d.o:	$(FORTRAN)/trace1d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/trace1d.m4 > trace1d.f
+		$(F77) $(FFLAGS) -c trace1d.f -o $@
+
+m2d:
+	rm -f *.o main2d && $(MAKE) main2d
+m3d:
+	rm -f *.o main3d && $(MAKE) main3d
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,736 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   Euler Equation Example
+##
+#########################################################################
+
+This README explains how to use the AMR Euler sample application
+code in the SAMRAI library.  The files included in this directory
+are as follows:  
+
+          main.C      -  application driver program
+          Euler.[C,h] -  C++ class containing routines specific to the 
+                         Euler example and which are called 
+                         from SAMRAI AMR library routines
+          EulerFort.h -  header file defining external fortran routines
+          fortran/2d,3d - Fortran numerical routines for 2d,3d problems, resp.
+
+To understand the construction of this application code from pieces 
+specific to the Euler model and more generic pieces in the SAMRAI
+library consider the object construction pattern in the main.C file.
+For more details on these files and the Euler class consult the comments
+in those files and the Euler.h class header file.
+
+COMPILE and RUN
+---------------
+Compile:  make <prog name>   where <prog name> = "main2d" for 2D case
+                                               = "main3d" for 3D case  
+
+Run: 
+
+   main2d <input file>                     ... Serial run   (w/o  MPI)
+   mpirun -np <nprocs> main2d <input file> ... Parallel run (with MPI)
+
+      NOTE: <input file> is the FULL-PATH of the input file
+
+   There are sample input files in the subdirectory sample_input.
+
+   example:
+      main2d sample_input/room-2d.input
+      mpirun -np 2 main2d sample_input/room-2d.input
+
+Restarted Run:
+
+      same format as regular run but add <restart dir> <restore num>
+      to end of command.
+         <restart dir> is directory where restart files are stored
+                       (set in input file).
+         <restore num> is the identifier of which restart file to use
+                       (generally the timestep).
+     
+      example:  (to start from timestep #5)
+        
+        main2d sample_input/room-2d.input restart_room-2d 5
+        mpirun -np 2 main2d sample_input/room-2d.input restart_room-2d 5
+
+      NOTE:  The ordinary use of our restart functionality requires that
+             a problem can only be restarted on on the same number of
+             processors on which the problem was originally run.  To restart
+             on a different number of processors, use the
+             restart-redistribute tool in SAMRAI/tools/restart.
+
+
+INPUT FILES:
+------------
+
+      sphere-2d-re.input  - exploding 2D sphere, uses Richardson extrapolation.
+      step-2d.input - supersonic flow over a step
+      step-2d-5levels.input - supersonic flow over a step
+
+
+   Three example input files are included with the Euler application:
+
+      sample_input/box-3d.input  ... exploding 3D sphere with large initial
+                                     pressure differences inside a cube. 
+      sample_input/room-2d.input ... exploding 2D sphere with large pressure
+                                     differences at time zero, in a room with 
+                                     fixed boundaries. Room denoted with set of    
+                                     boxes to define the computational region.
+      sample_input/room-3d.input ... 3d version of above.
+      sample_input/
+              sphere-2d-re.input ... exploding 2D sphere, using Richardson 
+                                     extrapolation.
+      sample_input/step-2d.input ... 2d supersonic flow over a step.
+      sample_input/
+           step-2d-5levels.input ... as above but with 5 levels.
+
+   The Euler application code is composed of various classes that implement
+   the algorithmic and numerical routines in the AMR solution process (see 
+   comments in the main.C code for more discussion of the various objects 
+   used to build the application).  User-specified inputs control the 
+   behavior of the objects.  Those objects expecting input are:
+
+   Main program .... creates objects used in the simulation - controls output
+                     of viz and restart information.
+
+   Euler ........... defines variables and provides numerical kernels for
+                     Euler problem, including data initialization, time
+                     integration, boundary routines, etc.
+
+   CartesianGeometry ..... manages Cartesian grid coordinate system 
+                           on AMR patch hierarchy.
+
+   GriddingAlgorithm ..... constructs AMR patch hierarchy and
+                           regrids levels during simulation.
+
+ 
+   StandardTagAndInitialize .... manages tagging and initialization during
+                                 regridding operation.
+
+   HyperbolicLevelIntegrator ... manages time integration and data management
+                                 on levels in AMR patch hierarchy.
+
+   TimeRefinementIntegrator .... orchestrates time integration and 
+                                 regridding on levels in AMR patch hierarchy.
+
+   LoadBalancer .... manages mapping of patches to processors.
+
+   DataWriter .... specifies variables to write for visualization.
+
+   TimerManager ..... controls timers used that measure performance of 
+                      sections of code.
+
+   The input options for these objects are discussed below.  The TYPE is 
+   shown in (parenthesis) and the DEFAULT setting (value set if no input
+   is given) for the option is shown in [brackets].  Required inputs are 
+   designated by [REQD].
+
+   "Main" input section
+   --------------------
+   Main {
+      // Log file where output is directed  
+      // log_file_name -- (char string) name of log file ["euler.log"]
+      // log_all_nodes -- (bool) option to specify whether output on different
+      //                  processors should be directed to multiple log files
+      //                  (named "log_file_name.<processor id>") or to the 
+      //                  single file. [FALSE]
+      log_file_name    = "room-2d.log"
+      log_all_nodes    = TRUE
+
+      // Visualization dump parameters.
+      // viz_writer        -- (char string [, char string]) which visualization
+      //                      data writer to use.  Use "VisIt" for the VisIt Data
+      //                      Writer, or "Vizamrai" for the Vizamrai Data Writer,
+      /                       or "VisIt", "Vizamrai" for both.
+      // viz_dump_interval -- (int) the interval in timesteps over coarsest 
+      //                      level between writing of consecutive 
+      //                      visualization dumps.  Setting it to zero turns off 
+      //                      writing of visualization files.
+      // viz_dump_dirname  -- (char string) directory where viz files are 
+      //                      writen (may include a path).  VisIt requires a
+      //                      non-empty string.  Vizamrai permits an empty string,
+      //                      in which case dumps go to directory where main2d/3d
+      //                      exists. If both data writers are used, directory name
+      //                      must be nonempty, and main.C will append _VisIt,
+      //                       _Vizamrai to dirname.
+      // viz_dump_filename -- (char string) Nonempty file prefix required for 
+      //                      vizamrai filenames.  Not used by VisIt.
+      // visit_number_procs_per_file
+      //                   -- (int >= 1) for parallel runs, number of processors 
+      //                      that share a single common dump file. If this parameter
+      //                      > number processors being used, all processors share 
+      //                      single dump file.  Not used by Vizamrai.
+      //
+      //                      For example, the following inputs:
+      viz_writer            = "Vizamrai", "VisIt"
+      viz_dump_interval     = 1
+      viz_dump_dirname      = "viz_room-2d"
+      viz_dump_filename     = "room-2d"
+      //                       would result in the following dump structure:
+      //                         main2d
+      //                         viz_room-2d_VisIt/
+      //                           visit_dump.00000/
+      //                           visit_dump.00001/
+      //                           ...
+      //                           dumps.visit
+      //                         viz_room-2d_Vizamrai/
+      //                           room-2d.00000.vis
+      //                           room-2d.00001.vis
+      //                           ...
+      //                       If only one data writer is selected, the
+      //                       _VisIt, _Vizamrai extension will be omitted.
+
+      // Restart dump parameters.
+      // restart_interval -- (int) the interval in timesteps over coarsest
+      //                      level between writing of consecutive restart
+      //                      files. Setting it to zero turns off writing
+      //                      of restart files.  [0]
+      // restart_write_dirname  -- (char string) directory where restart files 
+      //                           are written [empty string] 
+      //                           (assertion thrown if not specified 
+      //                           and restart_interval > 0)     
+      //
+      restart_interval      = 1
+      restart_write_dirname = "restart_room-2d"
+
+      // Run-time plotting arguments (only apply in 2d):
+      //
+      // X-windows plotting specification for each primitive variable.
+      // Options:  NO_PLOTTING, BOXES_ONLY, CONTOURS_ONLY, SHADE_ONLY, 
+      //           CONTOUR_WITH_SHADE, BOTH_CONTOUR_AND_SHADE
+      // (see "euler_const.input" below for discussion of these options).
+      // plotting_interval  -- (int) interval for which values are plotted
+      //                       in X window during run [1]
+      // plot2d_density  -- (above options) specification of plotting for 
+      //                    density [NO_PLOTTING]
+      // plot2d_pressure -- (above options) specification of plotting for 
+      //                    pressure [NO_PLOTTING]
+      // plot2d_velocity -- (above options) specification of plotting for 
+      //                    velocity [NO_PLOTTING]
+      plotting_interval = 5   
+      plot2d_density  = NO_PLOTTING
+      plot2d_pressure = SHADE_ONLY
+      plot2d_velocity = NO_PLOTTING, NO_PLOTTING
+   }
+
+
+   "Euler" input section
+   ---------------------
+   Euler {
+      //  Problem specification parameters
+      //  gamma         -- (double) ratio of specific heats [1.4]
+      //  godunov_order -- (int) order of Godunov slopes (1, 2, or 4) [1]
+      //  flux_method   -- (one of APPROX_RIEM_SOLVE, EXACT_RIEM_SOLVE, 
+      //                   see "euler_const.input" for more on these 
+      //                   options) solver to be used in flux calculation 
+      //                   across cell face [APPROX_RIEM_SOLVE]
+      //  corner transport scheme -- (CORNER_TRANSPORT_1 -or- 
+      //                   CORNER_TRANSPORT_2 - see "euler_const.input" 
+      //                   for more on these options) [CORNER_TRANSPORT_1]
+      //  data_problem  -- (SPHERE -or- PIECEWISE_CONSTANT_[X,Y,Z]) 
+      //                   specification of the problem to be solved [REQD] 
+      //
+      gamma            = 1.4
+      godunov_order    = 2
+      flux_method = APPROX_RIEM_SOLVE
+      corner_transport = CORNER_TRANSPORT_1
+      data_problem      = SPHERE
+
+      //  Initial data  for SPHERE problem:
+      //     radius -- (double) radius of sphere [REQD] 
+      //     center -- (double array) location of sphere center [REQD] 
+      //     density_inside   -- (double) fluid density inside sphere [REQD] 
+      //     velocity_inside  -- (double array) fluid velocity inside sphere 
+      //                         [REQD]  
+      //     pressure_inside  -- (double) pressure outside sphere [REQD]  
+      //     density_outside  -- (double) fluid density outside sphere [REQD]
+      //     velocity_outside -- (double array) fluid velocity outside sphere
+      //                         [REQD]  
+      //     pressure_outside -- (double) pressure outside sphere [REQD]  
+         data_problem      = SPHERE
+         Initial_data {
+            radius            = 2.9
+            center            = 5.5 , 5.5
+ 
+            density_inside    = 8.0
+            velocity_inside   = 0.0 , 0.0
+            pressure_inside   = 40.0
+
+            density_outside    = 1.0
+            velocity_outside   = 0.0 , 0.0
+            pressure_outside   = 1.0
+         }
+
+      //  Initial data for PIECEWISE_CONSTANT_[X,Y,Z]:
+      //     front_position -- (double array) points between intervals [REQD]
+      //     interval_n {
+      //        density     -- (double) density on interval n [REQD]
+      //        velocity    -- (double array) velocity in interval n [REQD]
+      //        pressure    -- (double) pressure in interval n [REQD]
+      //     }
+      //
+      //    interval 0      interval 1                         interval n
+      //  |------------|------------------|--------...-------|------------|
+      //        front_position[0]  front_position[1]  front_position[n-1]
+      //
+         data_problem      = PIECEWISE_CONSTANT_X
+         Initial_data {
+           front_position = 0.0
+           interval_0 {
+              density      = 1.0
+              velocity     = 0.0 , 0.0
+              pressure     = 1.0
+           }
+           interval_1 {
+              density      = 0.125
+              velocity     = 0.0 , 0.0 
+              pressure     = 0.1
+           }
+         }
+
+
+      //  Refinement criteria
+      //  Data for tagging cells to refine for gradient detection and
+      //  Richardson extrapolation.  Options: 
+      //     DENSITY_DEVIATION,  PRESSURE_DEVIATION
+      //     DENSITY_GRADIENT,   PRESSURE_GRADIENT
+      //     DENSITY_SHOCK,      PRESSURE_SHOCK
+      //     DENSITY_RICHARDSON, PRESSURE_RICHARDSON
+      //     and combinations thereof...
+      //
+      //     DENSITY_DEVIATION   -- tag regions whose density exceeds a specified
+      //                            tolerance, preserving tags from earlier step.
+      //     DENSITY_GRADIENT    -- tag around gradients in density.
+      //     DENSITY_SHOCK       -- tag around discontinuous regions of density.
+      //     DENSITY_RICHARDSON  -- use Richardson extrapolation to tag 
+      //                            around errors in density.
+      //     PRESSURE_GRADIENT   -- tag around gradients in pressure.
+      //     PRESSURE_SHOCK      -- tag around discontinuous regions of pressure.
+      //     PRESSURE_RICHARDSON -- use Richardson extrapolation to tag 
+      //                            around errors in pressure.
+      //
+      // Refinement_data {
+      //   refine_criteria    -- (string array) contains one or more of the 
+      //                         tagging options, specified above [REQD]
+      //   DENSITY_DEVIATION {                                              
+      //      density_dev -- (double array) freestream density, i.e. tag cells
+      //                     where |density - density_dev| > dev_tol [REQD]
+      //      dev_tol -- (double array) deviation tolerance in density [REQD]
+      //      time_min -- (double array) time on each level at which 
+      //                  tagging using this criteria is started [0.]
+      //      time_max -- (double array) time on each level at which 
+      //                  tagging is stopped [DBL_MAX]
+      //      NOTE:  For each of the above entries, if a level is NOT specified,
+      //             the value from the next coarser level is used.  The time_min
+      //             and time_max options may be used to control whether tagging
+      //             on a level is active (i.e. setting time_max=0 makes it 
+      //   }
+      //
+      //   DENSITY_GRADIENT {                                              
+      //      grad_tol -- (double array) gradient tolerance for each level [REQD]
+      //      time_min -- (double array) time on each level at which 
+      //                  tagging using this criteria is started [0.]
+      //      time_max -- (double array) time on each level at which 
+      //                  tagging is stopped [DBL_MAX]
+      //      (see NOTE under DENSITY_DEVIATION above)
+      //   }
+      //
+      //   DENSITY_SHOCK {                                              
+      //      shock_onset -- (double array) onset tolerance for each level [REQD]
+      //      shock_tol -- (double array) gradient tolerance for each level [REQD]
+      //      time_min -- (double array) time on each level at which 
+      //                  tagging using this criteria is started [0.]
+      //      time_max -- (double array) time on each level at which 
+      //                  tagging is stopped [DBL_MAX]
+      //      (see NOTE under DENSITY_DEVIATION above)
+      //   }
+      //
+      //   DENSITY_RICHARDSON {                                              
+      //      rich_tol -- (double array) Richardson extrapolation tolerance for 
+      //                  each level [REQD]
+      //      time_min -- (double array) time on each level at which 
+      //                  tagging using this criteria is started [0.]
+      //      time_max -- (double array) time on each level at which 
+      //                  tagging is stopped [DBL_MAX]
+      //      (see NOTE under DENSITY_DEVIATION above)
+      //   }
+      //
+      //   PRESSURE_DEVIATION, PRESSURE_GRADIENT, PRESSURE_SHOCK, PRESSURE_RICHARDSON 
+      //   input entries are identical to the DENSITY cases shown above.
+      //
+      Refinement_data {
+         refine_criteria = "PRESSURE_GRADIENT", "PRESSURE_SHOCK"
+ 
+         PRESSURE_GRADIENT {
+            grad_tol = 10.0, 9.0, 9.5
+            time_min = 0., 0.5, 0.8
+            time_max = 10.0, 10.0, 8.0
+         }
+ 
+         PRESSURE_SHOCK {
+            shock_tol = 5.0, 8.0, 12.0 
+            shock_onset = 0.85, 0.80
+            time_min = 0., 0.5, 0.8
+            time_max = 10.0, 10.0, 8.0
+         }
+      }
+
+      //  Boundary conditions  
+      //  Options:  FLOW, LINEAR, SYMMETRIC, FIXED
+      //  (see "euler_const.input" for discussion of these options)
+      // Boundary_data {
+      //   boundary_node_x0y0 -- (above options) lower left corner [FLOW]
+      //   boundary_node_x1y0 -- (above options) lower right corner [FLOW]
+      //   boundary_node_x0y1 -- (above options) upper left corner [FLOW]
+      //   boundary_node_x1y1 -- (above options) upper right corner [FLOW]
+      //   boundary_edge_x0 { -- left edge
+      //   boundary_edge_x1 { -- right edge
+      //   boundary_edge_y0 { -- bottom edge
+      //   boundary_edge_y1 { -- top edge
+      //      boundary_type   -- (above options) type at prescribed edge [FLOW]
+      //      density         -- (double) density at prescribed edge [0]
+      //      velocity        -- (double array) velocity at prescribed edge [0]
+      //      pressure        -- (double) pressure at prescribed edge [0]
+      //   }
+      //
+      //                       edge_y1
+      //         node_x0y1 o--------------o node_x1y1
+      //                   |              |
+      //                   |              |
+      //          edge_x0  |              | edge_x1
+      //                   |              |
+      //                   |              |
+      //         node_x0y0 o--------------o node_x1y0
+      //                       edge_y0
+      //
+      //  NOTE: 3D case specifies data at faces as well.  See
+      //        /SAMRAI/docs/userdocs/boundaries.ps for further discussion.
+      Boundary_data {
+         boundary_node_x0y0 = FLOW
+         boundary_node_x1y0 = FLOW
+         boundary_node_x0y1 = FLOW
+         boundary_node_x1y1 = FLOW
+         boundary_edge_x0 {
+           boundary_type      = SYMMETRIC
+         }
+         boundary_edge_x1 {
+            boundary_type      = SYMMETRIC
+         }
+         boundary_edge_y0 {
+            boundary_type      = SYMMETRIC
+         }
+         boundary_edge_y1 {
+            boundary_type      = SYMMETRIC
+         }
+      }
+
+   }
+
+   "CartesianGeometry" input section
+   ---------------------------------
+   CartesianGeometry {
+      //  Specify lower/upper corners of the computational domain and a
+      //  set of non-overlapping boxes defining domain interior.  If union 
+      //  of boxes is not a parallelpiped, lower/upper corner data corresponds 
+      //  to min/max corner indices over all boxes given.
+      //  x_lo  -- (double array) lower corner of computational domain [REQD]
+      //  x_up  -- (double array) upper corner of computational domain [REQD]
+      //  domain_boxes  -- (box array) set of boxes that define interior of 
+      //                   hysical domain. [REQD]
+      //  periodic_dimension -- (int array) coordinate directions in which 
+      //                        domain is periodic.  Zero indicates not
+      //                        periodic, non-zero value indicates periodicity.
+      //                        [0]
+      x_lo = 0.e0 , 0.e0           
+      x_up = 65.e0 , 55.e0       
+      domain_boxes      = [(0,9),(14,20)],
+                          [(0,21),(19,35)],
+                          [(0,36),(14,49)],
+                          [(20,0),(49,54)],
+                          [(50,0),(64,35)],
+                          [(50,46),(64,54)],
+                          [(57,36),(64,45)]
+      periodic_dimension = 0, 1  // periodic in y only
+   }
+
+
+   "GriddingAlgorithm" input section
+   ---------------------------------
+   GriddingAlgorithm {
+      // Information used to create patches in AMR hierarchy.
+      // max_levels -- (int) max number of mesh levels in hierarchy [REQD]
+      // 
+      // For most of the following parameters, the number of precribed data
+      // values need not match the number of levels in the hierarchy 
+      // (determined by max_levels).  If more values are given than number 
+      // of levels, extraneous values will be ignored.  If less are give, then
+      // values that correspond to individual levels will apply to those 
+      // levels.  Missing values will be taken from those for the finest
+      // level specified.
+      //
+      // ratio_to_coarser {
+      //   level_1 -- (int array) ratio between index spaces on 
+      //              level 1 to level 0 [REQD]
+      //   level_2 -- (int array)  ratio between index spaces on 
+      //              level 2 to level 1 [REQD]
+      //   etc....
+      // }
+      // largest_patch_size {
+      //   level_0 -- (int array) largest patch allowed on level 0. 
+      //              [REQD]    
+      //   level_1 -- (int array)    "       "      "   "  level 1 
+      //              [level 0 entry]
+      //   etc....                       
+      // }
+      // smallest_patch_size {
+      //   level_0 -- (int array) smallest patch allowed on level 0. 
+      //              [max ghost width for all variables]    
+      //   level_1 -- (int array)    "       "      "   "  level 1 
+      //              [level 0 entry]
+      //   etc....                       
+      // }
+      max_levels = 3
+      ratio_to_coarser {
+         level_1 = 4 , 4
+         level_2 = 4 , 4
+         level_3 = 4 , 4
+      }
+      largest_patch_size {
+         level_0 = 48 , 48
+      }
+      smallest_patch_size {
+         level_0 = 8 , 8
+      }
+
+      // Tolerances for gridding efficiency and box chopping operations.
+      // efficiency_tolerance -- (double array) minimum percentage of tagged 
+      //                         cells allowed in a box [0.8 for each level]
+      // combine_efficiency   -- (double array) threshold specifying when a  
+      //                         box may be chopped into two smaller boxes.
+      //                         If sum of the volumes of smaller boxes is > 
+      //                         combine efficiency * volume of larger box, 
+      //                         then larger box will not be chopped.
+      //                         [0.8 for each level]
+      // proper_nesting_buffer -- (int array) number of coarse cells by which
+      //                          the next finer level is nested within its
+      //                          interior. [1 for each level]
+      efficiency_tolerance    = 0.85e0
+      combine_efficiency      = 0.95e0
+      proper_nesting_buffer   = 1
+
+      // Option to read or write gridding information
+      // write_regrid_boxes    -- (bool) Output sequence of refine boxes to file
+      // read_regrid_boxes     -- (bool) Read sequence of refine boxes from file
+      // regrid_boxes_filename -- (string) file name used for reading or writing
+      //                          boxes.
+      //
+      // Reading and writing options require some user intervention to assure
+      // they work properly.  Please consult Andy Wissink (awissink at llnl.gov)
+      // if you are interested in using these options.
+      write_regrid_boxes    = TRUE
+      regrid_boxes_filename = TRUE
+   }
+
+   "StandardTagAndInitialize" input section
+   ---------------------------------------------
+   StandardTagAndInitialize {
+      // Specification of the type of tagging to be performed
+      // tagging_method -- (string array) one or more entries specifying
+      //                 the tagging algorithm used.  Options include:
+      //                 "GRADIENT_DETECTOR"
+      //                 "RICHARDSON_EXTRAPOLATION"
+      //                 "REFINE_BOXES"
+      //
+      // REFINE_BOXES allows you to prescribe where refinement should occur.
+      // If this option is used, you must also supply a RefineBoxes database
+      // entry with the refine boxes on different levels specified.  i.e.
+      //    RefineBoxes{
+      //        level_0 -- (BoxArray) Boxes to be refined on level 0
+      //        level_1 -- (BoxArray) Boxes to be refined on level 1
+      //        etc.
+      //
+      // Gradient detection option.
+      tagging_method = "GRADIENT_DETECTOR"
+      //
+      // Richarson extrapolation option.
+      tagging_method = "RICHARDSON_EXTRAPOLATION"
+      //
+      // Static refine boxes option.
+      tagging_method = "REFINE_BOXES"
+      RefineBoxes {
+        level0_boxes = [(15,0),(29,14)]
+        level1_boxes = [(65,10),(114,40)]
+      }
+      // Combination.
+      tagging_method = "RICHARDSON_EXTRAPOLATION", "GRADIENT_DETECTOR"
+   }
+
+   "HyperbolicLevelIntegrator" input section
+   -----------------------------------------
+   HyperbolicLevelIntegrator{
+      //  CFL used to determine timestep on each level.  
+      //  cfl      -- (double) timestep at each level is given by 
+      //              dt = cfl*dx/a, where a is max wave speed.  [REQD]
+      //  cfl_init -- (double) cfl factor used for initial step [REQD]
+      cfl                       = 0.9e0
+      cfl_init                  = 0.1e0
+
+      //  Options for timestep computation.
+      //  lag_dt_computation -- (bool) if true, characteristic data on the 
+      //                        patch is not recomputed before computing the 
+      //                        timestep;  otherwise it uses data from 
+      //                        preceding flux calculation [TRUE].
+      //  use_ghosts_to_compute_dt -- (bool) if true, fill ghost data before 
+      //                              computing timestep on each patch [TRUE].
+      lag_dt_computation        = TRUE
+      use_ghosts_to_compute_dt  = TRUE
+   }
+
+
+   "TimeRefinementIntegrator" input section
+   -----------------------------------------
+   TimeRefinementIntegrator{
+      // Time stepping specifications. 
+      // start_time -- (double) initial integration time [REQD] 
+      // end_time   -- (double) final integration time [REQD] 
+      // grow_dt    -- (double) limit factor on maximum growth of timestep 
+      //               from one step to the next; useful for ramping up 
+      //               timestep size or to prevent rapid growth in timestep
+      //               [REQD]
+      // max_integrator_steps -- max number timesteps on coarsest level [REQD]
+      // tag_buffer -- (int array) amount by which cells tagged for error are
+      //               buffered before new fine patches are created to cover
+      //               tagged regions.  By default, it is the interval of
+      //               timesteps between successive regids on level. 
+      //               [regrid_interval] 
+      start_time           = 0.e0
+      end_time             = 100.e0
+      grow_dt              = 1.1e0
+      max_integrator_steps = 301
+      tag_buffer           = 1,1,1,1 // max of 4 finer levels in hierarchy
+   }
+
+   "LoadBalancer" input section
+   ----------------------------------
+   LoadBalancer {
+      // using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+   }
+
+   "DataWriter" input section
+   ----------------------------------
+   DataWriter {
+      // Specify which variables to write to visualization file(s).
+      // Variable_Names -- (string array) list of variable names to 
+      //                    write to the viz file.
+      // Variable_Types -- (string array) list of the corresponding
+      //                    variable type to write to the viz file.
+      //                    Must be either "primitive" or "derived".
+      //                    Note that until vizamrai is updated to use
+      //                    HDF5, "derived" must always be used.
+      // Variable_Depths -- (int array) depth, or number of components, of
+      //                    each variable.
+      // Variable_Scales -- (double array) list of scaling factors for each
+      //                    variable to be written to the viz file.
+      Variable_Names  =  "density", "velocity", "pressure"
+      Variable_Types  =  "Derived", "Derived", "Derived"
+      Variable_Depths =  1, 3, 1
+      Variable_Scales =  1.0, 1.0, 1.0
+   }
+
+
+   "TimerManager" input section
+   ----------------------------
+   TimerManager{
+      // Specify which timers to invoke
+      // timer_list -- (string array) list of timers to be turned on - for 
+      //               complete list of available timers, see 
+      //               SAMRAI/docs/userdocs/timing.pdf  [null]
+      timer_list  = "apps::main::*",
+                    "apps::Euler::computeFluxesOnPatch()",
+                    "algs::GriddingAlgorithm::*",
+                    "xfer::*::*"
+      // Various output options.
+      // print_total      -- (bool) print total time [TRUE]
+      // print_exclusive  -- (bool) output exclusive time - i.e. time spent 
+      //                     exclusively in each routine.  A nice way to 
+      //                     identify routines with bottlenecks, but is more 
+      //                     expensive than recording total time [FALSE].
+      // print_wall       -- (bool) output wallclock time [TRUE]
+      // print_user       -- (bool) output user time [FALSE]
+      // print_sys        -- (bool) output system time [FALSE]
+      // print_summed     -- (bool) output sum of times measured across all 
+      //                     processors during a parallel run [FALSE].
+      // print_max        -- (bool) output maximum time spent on any one 
+      //                     processor, along with the processor ID [FALSE]
+      // print_percentage -- (bool) output percentage of total time for each 
+      //                     printed timer [TRUE]
+      // print_concurrent -- (bool) in the process of performing exclusive 
+      //                     time, a nested call tree is created; print the 
+      //                     tree [FALSE]
+      // print_timer_overhead -- (bool) each timer start/stop invocation 
+      //                     incurs about one-half a millionth of a second 
+      //                     overhead.  This option will output the number of 
+      //                     invocations and the total predicted overhead for 
+      //                     all the timers [FALSE]
+      // print_threshold  -- (double) do not print any timers that constitute 
+      //                     < (print_threshold)% of overall run time.  Useful 
+      //                     to prevent gobs of output if many timers are 
+      //                     turned on. [0.25] 
+      print_exclusive = TRUE
+      print_max = TRUE
+      print_timer_overhead = TRUE
+      print_threshold = 0.0
+   }
+  
+
+"euler_const.input"
+-------------------
+   // This file specifies some constants used within the Euler code.  These
+   // names and values map to those specified via "#define" statements in 
+   // Euler.C
+
+   // 2D X Window plotting options
+   // Plotting will execute while the program is running for 2D cases. 
+   // Note that since it pipes data to an X-window, it slows the 
+   // performance of the code somewhat, but it sure is PRETTY!
+   NO_PLOTTING            = 0  // no plotting
+   BOXES_ONLY             = 1  // plot bounding boxes only
+   CONTOURS_ONLY          = 2  // plot contours only
+   SHADE_ONLY             = 3  // plot color shade only
+   CONTOUR_WITH_SHADE     = 4  // plot contours and color shade in same window
+   BOTH_CONTOUR_AND_SHADE = 5  // plot contours and color shade in separate 
+                               // window
+
+   // Riemann solver used in flux calculation across cell face
+   APPROX_RIEM_SOLVE   =    0   //  Colella-Glaz approx Riemann solver
+   EXACT_RIEM_SOLVE    =    1   //  Exact Riemann solver
+
+   // Flux corner transport options
+   // CORNER_TRANSPORT_1 is based on an extension of Colella's formulation. 
+   // CORNER_TRANSPORT_2 is a formulation constructed by Trangenstein
+   // A writeup on these two methods is available from R. Hornung or A. Wissink.
+   CORNER_TRANSPORT_1   = 1
+   CORNER_TRANSPORT_2   = 2
+
+   //
+   // Two Different problems can be specified via input
+   // PIECEWISE_CONSTANT_* : piecewise constant data in *-coordinate direction
+   // SPHERE : sphere problem
+   PIECEWISE_CONSTANT_X   = 10
+   PIECEWISE_CONSTANT_Y   = 11
+   PIECEWISE_CONSTANT_Z   = 12
+   SPHERE         = 40
+
+   // Boundary conditions
+   // FLOW indicates flow-thru conditions
+   // LINEAR indicates a linear profile at the boundary
+   // SYMMETRIC will apply a plane of symmetry
+   // FIXED designates a solid boundary.
+   FLOW           = 0
+   LINEAR         = 1
+   SYMMETRIC      = 4
+   FIXED          = 5
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/2d/avgint.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/2d/avgint.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,449 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/test/performance/Euler/fortran/2d/avgint.m4 $
+c  Package:     SAMRAI applications
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 3894 $
+c  Modified:    $LastChangedDate: 2010-05-10 15:24:14 -0700 (Mon, 10 May 2010) $
+c  Description: F77 routines for interlevel transfer of velocity and 
+c               pressure for 2d euler equations.
+c
+define(NDIM,2)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+include(FORTDIR/../amrflaten.i)dnl
+c
+define(coarsen_index,`dnl
+      if ($1.lt.0) then
+         $2=($1+1)/$3-1
+      else
+         $2=$1/$3
+      endif
+')dnl
+define(coarse_fine_cell_deltas,`dnl
+      do ir$1=0,ratio($1)-1
+         deltax(ir$1,$1)=(dble(ir$1)+half)*dxf($1)-dxc($1)*half
+      enddo
+')dnl
+define(muscl_limited_conserved_slopes,`dnl
+      do ie$1=ifirstc$1,ilastc$1+1
+         diff$1(ie$1)=conservc($2)
+     &               -conservc($3)
+      enddo
+      do ic$1=ifirstc$1,ilastc$1
+         coef2=half*(diff$1(ic$1+1)+diff$1(ic$1))
+         bound=two*min(abs(diff$1(ic$1+1)),abs(diff$1(ic$1)))
+         if (diff$1(ic$1)*diff$1(ic$1+1).gt.zero) then
+            slope$1($4)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc($1)
+         else
+            slope$1($4)=zero
+         endif
+         slope$1($4)=slope$1($4)*flat$1($4)
+      enddo
+')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 2d flux variables.
+c***********************************************************************
+c
+      subroutine conservlinint2d(
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  ratio,dxc,dxf,
+     &  gamma,
+     &  densc,densf,
+     &  velc,presc,
+     &  velf,presf,
+     &  conservc,
+     &  tflat,tflat2,sound,mc,
+     &  tdensc,tpresc,tvelc,
+     &  flat0,flat1,
+     &  diff0,slope0,diff1,slope1)
+c***********************************************************************
+      implicit none
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+      integer
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:NDIM-1)
+      REAL
+     &  dxc(0:NDIM-1),
+     &  dxf(0:NDIM-1),
+     &  gamma
+      REAL
+     &  densc(CELL2d(cilo,cihi,0)),
+     &  densf(CELL2d(filo,fihi,0)),
+     &  velc(CELL2d(cilo,cihi,0),0:NDIM-1),
+     &  presc(CELL2d(cilo,cihi,0))
+      REAL 
+     &  velf(CELL2d(filo,fihi,0),0:NDIM-1),
+     &  presf(CELL2d(filo,fihi,0))
+      REAL
+     &  conservc(CELL2d(ifirstc,ilastc,1)),
+     &  flat0(CELL2d(ifirstc,ilastc,0)),
+     &  flat1(CELL2d(ifirstc,ilastc,0)),
+     &  diff0(ifirstc0:ilastc0+1),
+     &  slope0(CELL2d(ifirstc,ilastc,0)),
+     &  diff1(ifirstc1:ilastc1+1),
+     &  slope1(CELL2d(ifirstc,ilastc,0))
+      REAL
+     &  deltax(0:15,0:NDIM-1)
+      integer mc
+      REAL
+     &  tdensc(0:mc-1),tpresc(0:mc-1),tvelc(0:mc-1)
+      REAL
+     &  tflat(0:mc-1),tflat2(0:mc-1),sound(0:mc-1)
+
+      integer id,ic0,ic1,ie0,ie1,if0,if1,ir0,ir1,it
+      REAL coef2,bound,val,valinv,deltax1,v2norm
+      logical presneg
+c
+c***********************************************************************
+c
+
+      presneg = .false.
+
+coarse_fine_cell_deltas(0)dnl
+
+coarse_fine_cell_deltas(1)dnl
+
+c
+c     compute the flatten coefficients to further limit the slopes
+c
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0-1,ilastc0+1
+            it = ic0-cilo0
+            tdensc(it) = densc(ic0,ic1)
+            tpresc(it) = presc(ic0,ic1)
+            tvelc(it)  = velc(ic0,ic1,0)
+c           write(6,*) "presc(",ic0,ic1,") ",presc(ic0,ic1)
+c           write(6,*) "tpresc(",it,") ",tpresc(it)
+         enddo
+         call amrflaten(ifirstc0,ilastc0,cilo0,cihi0,mc,gamma,
+     &                  tdensc,tpresc,tvelc,tflat,tflat2,sound)
+         do ic0=ifirstc0,ilastc0
+              flat0(ic0,ic1) = tflat(ic0-ifirstc0)
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         do ic1=ifirstc1-1,ilastc1+1
+            it = ic1-cilo1
+            tdensc(it) = densc(ic0,ic1)
+            tpresc(it) = presc(ic0,ic1)
+            tvelc(it)  = velc(ic0,ic1,1)
+         enddo
+         call amrflaten(ifirstc1,ilastc1,cilo1,cihi1,mc,gamma,
+     &                  tdensc,tpresc,tvelc,tflat,tflat2,sound)
+         do ic1=ifirstc1,ilastc1
+              flat1(ic0,ic1) = tflat(ic1-ifirstc1)
+         enddo
+      enddo
+
+c
+c
+
+c
+c construct fine velocity values using conservative linear 
+c interpolation on momentum
+c
+      do id=0,NDIM-1
+
+         do ic1=ifirstc1-1,ilastc1+1
+            do ic0=ifirstc0-1,ilastc0+1
+               conservc(ic0,ic1) = densc(ic0,ic1)*velc(ic0,ic1,id) 
+            enddo
+         enddo
+
+         do ic1=ifirstc1,ilastc1
+muscl_limited_conserved_slopes(0,`ie0,ic1',`ie0-1,ic1',`ic0,ic1')dnl
+         enddo
+
+         do ic0=ifirstc0,ilastc0
+muscl_limited_conserved_slopes(1,`ic0,ie1',`ic0,ie1-1',`ic0,ic1')dnl
+         enddo
+
+         do if1=ifirstf1,ilastf1
+coarsen_index(if1,ic1,ratio(1))dnl
+            ir1=if1-ic1*ratio(1)
+            deltax1=deltax(ir1,1)
+            do if0=ifirstf0,ilastf0
+coarsen_index(if0,ic0,ratio(0))dnl
+               ir0=if0-ic0*ratio(0)
+               velf(if0,if1,id) = (conservc(ic0,ic1)
+     &                          + slope0(ic0,ic1)*deltax(ir0,0)
+     &                          + slope1(ic0,ic1)*deltax1)
+     &                          / densf(if0,if1)
+           enddo
+         enddo
+
+      enddo
+
+c
+c construct fine pressure values using conservative linear 
+c interpolation on energy
+c
+      val = (gamma-one) 
+      valinv = one/(gamma-one) 
+
+      do ic1=ifirstc1-1,ilastc1+1
+         do ic0=ifirstc0-1,ilastc0+1
+            v2norm = velc(ic0,ic1,0)**2+velc(ic0,ic1,1)**2 
+            conservc(ic0,ic1) = presc(ic0,ic1)*valinv
+     &                        + half*densc(ic0,ic1)*v2norm
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+muscl_limited_conserved_slopes(0,`ie0,ic1',`ie0-1,ic1',`ic0,ic1')dnl
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+muscl_limited_conserved_slopes(1,`ic0,ie1',`ic0,ie1-1',`ic0,ic1')dnl
+      enddo
+
+      do if1=ifirstf1,ilastf1
+coarsen_index(if1,ic1,ratio(1))dnl
+         ir1=if1-ic1*ratio(1)
+         deltax1=deltax(ir1,1)
+         do if0=ifirstf0,ilastf0
+coarsen_index(if0,ic0,ratio(0))dnl
+            ir0=if0-ic0*ratio(0)
+            v2norm = velf(if0,if1,0)**2+velf(if0,if1,1)**2
+            presf(if0,if1) = ((conservc(ic0,ic1)
+     &                     +  slope0(ic0,ic1)*deltax(ir0,0)
+     &                     +  slope1(ic0,ic1)*deltax1)
+     &                     - half*densf(if0,if1)*v2norm) * val
+            presf(if0,if1) = max(presf(if0,if1),smallr)
+            if (presf(if0,if1).lt.zero) then
+c               write(6,*) "IN conservlinint2d"
+c               write(6,*) "gamma,val,valinv = ",
+c    &                      gamma,val,valinv
+c               write(6,*) "ifirstf0,ilastf0 ",ifirstf0,ilastf0,
+c    &                     ", ifirstf1,ilastf1 ",ifirstf1,ilastf1
+c               write(6,*) "if0,if1 ",if0,if1
+c               write(6,*) "ic0,ic1 ",ic0,ic1
+c               write(6,*) "fine energy = ",
+c    &   conservc(ic0,ic1) + slope0(ic0,ic1)*deltax(ir0,0)
+c    &                     +  slope1(ic0,ic1)*deltax1
+c               write(6,*) "densf(if0,if1) ",densf(if0,if1)
+c               write(6,*) "vel() ",velf(if0,if1,0),velf(if0,if1,1)
+c               write(6,*) "presf(if0,if1) ",presf(if0,if1)
+c               write(6,*) "conservc(",ic0,ic1,") ",conservc(ic0,ic1)
+c               write(6,*) "slope0(",ic0,ic1,") ",slope0(ic0,ic1)
+c               write(6,*) "deltax(",ir0,0,") ",deltax(ir0,0)
+c               write(6,*) "slope1(",ic0,ic1,") ",slope1(ic0,ic1)
+c               write(6,*) "deltax1(",ir1,1,") ",deltax1
+c               write(6,*) "val ",val,", v2norm ",v2norm
+c               write(6,*) "presc(",ic0,ic1,") ",presc(ic0,ic1)
+c               write(6,*) "densc(",ic0,ic1,") ",densc(ic0,ic1)
+c               write(6,*) "velc() ",velc(ic0,ic1,0),velc(ic0,ic1,1)
+                presneg = .true.
+            endif
+        enddo
+      enddo
+
+      if (presneg) then
+        write(6,*) "negative pressure reported in conservlinint2d"
+c       write(6,*) "coarse conserved values"
+c       do ic1=ifirstc1-1,ilastc1+1
+c          do ic0=ifirstc0-1,ilastc0+1
+c             write(6,*) "ic0,ic1,conservc = ",
+c    &        ic0,ic1,conservc(ic0,ic1)
+c          enddo
+c       enddo
+c       write(6,*) "coarse density values"
+c       do ic1=ifirstc1-1,ilastc1+1
+c          do ic0=ifirstc0-1,ilastc0+1
+c             write(6,*) "ic0,ic1,densc = ",
+c    &        ic0,ic1,densc(ic0,ic1)
+c          enddo
+c       enddo
+c       write(6,*) "coarse velocity0 values"
+c       do ic1=ifirstc1-1,ilastc1+1
+c          do ic0=ifirstc0-1,ilastc0+1
+c             write(6,*) "ic0,ic1,velc0 = ",
+c    &        ic0,ic1,velc(ic0,ic1,0)
+c          enddo
+c       enddo
+c       write(6,*) "coarse velocity1 values"
+c       do ic1=ifirstc1-1,ilastc1+1
+c          do ic0=ifirstc0-1,ilastc0+1
+c             write(6,*) "ic0,ic1,velc1 = ",
+c    &        ic0,ic1,velc(ic0,ic1,1)
+c          enddo
+c       enddo
+c       write(6,*) "coarse pressure values"
+c       do ic1=ifirstc1-1,ilastc1+1
+c          do ic0=ifirstc0-1,ilastc0+1
+c             write(6,*) "ic0,ic1,presc = ",
+c    &        ic0,ic1,presc(ic0,ic1)
+c          enddo
+c       enddo
+c       write(6,*) "fine density values"
+c       do if1=ifirstf1,ilastf1
+c          do if0=ifirstf0,ilastf0
+c              write(6,*) "if0,if1,densf = ",
+c    &         if0,if1,densf(if0,if1)
+c          enddo
+c        enddo
+c       write(6,*) "fine velocity0 values"
+c       do if1=ifirstf1,ilastf1
+c          do if0=ifirstf0,ilastf0
+c              write(6,*) "if0,if1,velf0 = ",
+c    &         if0,if1,velf(if0,if1,0)
+c          enddo
+c       enddo
+c       write(6,*) "fine velocity1 values"
+c       do if1=ifirstf1,ilastf1
+c          do if0=ifirstf0,ilastf0
+c              write(6,*) "if0,if1,velf1 = ",
+c    &         if0,if1,velf(if0,if1,1)
+c          enddo
+c       enddo
+c        call flush(6)
+	stop
+      endif
+c
+      return
+      end
+c
+c
+c***********************************************************************
+c Volume weighted averaging for 2d flux variables.
+c***********************************************************************
+c
+      subroutine conservavg2d(
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  filo0,filo1,fihi0,fihi1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  ratio,dxf,dxc,
+     &  gamma,
+     &  densf,densc,
+     &  velf,presf,
+     &  velc,presc,
+     &  conservf)
+c***********************************************************************
+      implicit none
+      REAL zero,half,one
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstf0,ifirstf1,ilastf0,ilastf1,
+     &  ifirstc0,ifirstc1,ilastc0,ilastc1,
+     &  cilo0,cilo1,cihi0,cihi1,
+     &  filo0,filo1,fihi0,fihi1
+      integer ratio(0:NDIM-1)
+      REAL
+     &  dxf(0:NDIM-1),
+     &  dxc(0:NDIM-1),
+     &  gamma
+      REAL
+     &  densf(CELL2d(filo,fihi,0)),
+     &  densc(CELL2d(cilo,cihi,0)),
+     &  velf(CELL2d(filo,fihi,0),0:NDIM-1),
+     &  presf(CELL2d(filo,fihi,0))
+      REAL
+     &  velc(CELL2d(cilo,cihi,0),0:NDIM-1),
+     &  presc(CELL2d(cilo,cihi,0))
+      REAL
+     &  conservf(CELL2d(ifirstf,ilastf,0)) 
+      integer ic0,ic1,if0,if1,ir0,ir1,id
+      REAL dVf,dVc,val,valinv,v2norm
+c
+c***********************************************************************
+c
+      dVf = dxf(0)*dxf(1)
+      dVc = dxc(0)*dxc(1)
+c
+c construct coarse velocity values using conservative average
+c of momentum
+c
+      do id=0,NDIM-1 
+
+         do if1=ifirstf1,ilastf1
+            do if0=ifirstf0,ilastf0
+               conservf(if0,if1) = densf(if0,if1)*velf(if0,if1,id)
+            enddo
+         enddo
+
+         do ic1=ifirstc1,ilastc1
+            do ic0=ifirstc0,ilastc0
+	       velc(ic0,ic1,id) = zero
+            enddo
+         enddo
+
+         do ir1=0,ratio(1)-1
+            do ir0=0,ratio(0)-1
+               do ic1=ifirstc1,ilastc1
+                  if1=ic1*ratio(1)+ir1
+                  do ic0=ifirstc0,ilastc0
+                     if0=ic0*ratio(0)+ir0
+                     velc(ic0,ic1,id) = velc(ic0,ic1,id)
+     &                                + conservf(if0,if1)*dVf
+                  enddo
+               enddo
+            enddo
+         enddo
+
+         do ic1=ifirstc1,ilastc1
+            do ic0=ifirstc0,ilastc0
+               velc(ic0,ic1,id) = velc(ic0,ic1,id)
+     &                          / (densc(ic0,ic1)*dVc)
+           enddo
+         enddo
+
+      enddo
+
+c
+c construct coarse velocity values using conservative average
+c of energy
+c
+      val = (gamma-one)
+      valinv = one/(gamma-one)
+
+      do if1=ifirstf1,ilastf1
+         do if0=ifirstf0,ilastf0
+            v2norm = velf(if0,if1,0)**2 + velf(if0,if1,1)**2
+            conservf(if0,if1) = presf(if0,if1)*valinv
+     &                        + half*densf(if0,if1)*v2norm
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            presc(ic0,ic1) = zero
+         enddo
+      enddo
+
+      do ir1=0,ratio(1)-1
+         do ir0=0,ratio(0)-1
+            do ic1=ifirstc1,ilastc1
+               if1=ic1*ratio(1)+ir1
+               do ic0=ifirstc0,ilastc0
+                  if0=ic0*ratio(0)+ir0
+                  presc(ic0,ic1) = presc(ic0,ic1)
+     &                           + conservf(if0,if1)*dVf
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            v2norm = velc(ic0,ic1,0)**2 + velc(ic0,ic1,1)**2
+            presc(ic0,ic1) = ((presc(ic0,ic1)/dVc)
+     &                     - half*densc(ic0,ic1)*v2norm) * val
+        enddo
+      enddo
+c
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/2d/flaten1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/2d/flaten1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,3 @@
+define(NEQU,4)dnl
+define(REAL,`double precision')dnl
+include(FORTDIR/../flaten.i)dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/2d/flux.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/2d/flux.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,277 @@
+define(NDIM,2)dnl
+define(NEQU,4)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+include(FORTDIR/m4flux.i)dnl
+
+      subroutine fluxcorrec(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  dx,
+     &  gamma,density,velocity,pressure,
+     &  flux0,flux1,
+     &  trlft0,trlft1,
+     &  trrgt0,trrgt1)
+c***********************************************************************
+      implicit none 
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      REAL dt 
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     density(CELL2d(ifirst,ilast,CELLG)),
+     &     velocity(CELL2d(ifirst,ilast,CELLG),0:NDIM-1),
+     &     pressure(CELL2d(ifirst,ilast,CELLG)),
+     &     flux0(FACE2d0(ifirst,ilast,FLUXG),NEQU),
+     &     flux1(FACE2d1(ifirst,ilast,FLUXG),NEQU),
+     &     trlft0(FACE2d0(ifirst,ilast,FACEG),NEQU),
+     &     trrgt0(FACE2d0(ifirst,ilast,FACEG),NEQU),
+     &     trlft1(FACE2d1(ifirst,ilast,FACEG),NEQU),
+     &     trrgt1(FACE2d1(ifirst,ilast,FACEG),NEQU)
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,k
+      REAL trnsvers(NEQU)
+c     REAL ttvlft(NEQU),ttvrgt(NEQU)     
+      REAL ttv(NEQU)
+      REAL v2norm,rho,vel1,vel0,gamma,
+     &     gam_min_one
+     
+c     write(6,*) "In fluxcorrec()"
+      if (FLUXG.lt.1) then
+         write(6,*) "flux ghosts < 1!"
+c         call flush(6)
+	stop
+      endif
+c     ******************************************************************
+c     * complete tracing at cell edges
+c     ******************************************************************
+      gam_min_one = gamma-one
+c   correct the 1-direction with 0-fluxes
+c     write(6,*) " correct the 1-direction with 0-fluxes"
+      do ic1=ifirst1-(FLUXG),ilast1+(FLUXG)
+        do ic0=ifirst0-(FLUXG-1),ilast0+(FLUXG-1)
+          rho  = density(ic0,ic1)
+          vel0 = velocity(ic0,ic1,0)
+          vel1 = velocity(ic0,ic1,1)
+          v2norm= vel1**2 +vel0**2
+          do k=1,NEQU
+            trnsvers(k)=
+     &        (flux0(ic0+1,ic1,k)-flux0(ic0,ic1,k))*half/dx(0)
+          enddo
+
+          ttv(1)= trnsvers(1) 
+          ttv(2)= (trnsvers(2) - vel0*trnsvers(1))/rho
+          ttv(3)= (trnsvers(3) - vel1*trnsvers(1))/rho
+          ttv(NEQU)= (v2norm*half*trnsvers(1) -
+     &             vel0*trnsvers(2) - vel1*trnsvers(3) +
+     &             trnsvers(NEQU))*gam_min_one
+          do k=1,NEQU
+            trrgt1(ic1  ,ic0,k)= trrgt1(ic1  ,ic0,k) - ttv(k)
+            trlft1(ic1+1,ic0,k)= trlft1(ic1+1,ic0,k) - ttv(k)
+          enddo
+          trrgt1(ic1  ,ic0,NEQU) = max(smallr,trrgt1(ic1  ,ic0,NEQU))
+          trlft1(ic1+1,ic0,NEQU) = max(smallr,trlft1(ic1+1,ic0,NEQU))
+        enddo
+      enddo
+c     call flush(6)     
+
+c   correct the 0-direction with 1-fluxes
+c     write(6,*) " correct the 0-direction with 1-fluxes"
+      do ic0=ifirst0-(FLUXG),ilast0+(FLUXG)
+        do ic1=ifirst1-(FLUXG-1),ilast1+(FLUXG-1)
+          rho  = density(ic0,ic1)
+          vel0 = velocity(ic0,ic1,0)
+          vel1 = velocity(ic0,ic1,1)
+          v2norm= vel1**2 +vel0**2
+          do k=1,NEQU
+            trnsvers(k)=
+     &        (flux1(ic1+1,ic0,k)-flux1(ic1,ic0,k))*half/dx(1)
+          enddo
+c         write(6,*) "   flux1(",ic1+1,ic0,")= ",flux1(ic1+1,ic0,1),
+c    &      flux1(ic1+1,ic0,2),flux1(ic1+1,ic0,3),flux1(ic1+1,ic0,4)
+c         write(6,*) "   flux1(",ic1,ic0,")= ",flux1(ic1,ic0,1),
+c    &      flux1(ic1,ic0,2),flux1(ic1,ic0,3),flux1(ic1,ic0,4)
+c      
+          ttv(1)= trnsvers(1)
+          ttv(2)= (trnsvers(2) - vel0*trnsvers(1))/rho
+          ttv(3)= (trnsvers(3) - vel1*trnsvers(1))/rho
+          ttv(NEQU)= (v2norm*half*trnsvers(1) -
+     &             vel0*trnsvers(2) - vel1*trnsvers(3) +
+     &             trnsvers(NEQU))*gam_min_one
+c         write(6,*) " old trrgt0(",ic0,ic1,"=",trrgt0(ic0,ic1,1),
+c    &               trrgt0(ic0,ic1,2),trrgt0(ic0,ic1,3),
+c    &               trrgt0(ic0,ic1,4) 
+c         write(6,*) " old trlft0(",ic0+1,ic1,"=",trlft0(ic0+1,ic1,1),
+c    &               trlft0(ic0+1,ic1,2),trlft0(ic0+1,ic1,3),
+c    &               trlft0(ic0+1,ic1,4) 
+          do k=1,NEQU
+            trrgt0(ic0  ,ic1,k)= trrgt0(ic0  ,ic1,k) - ttv(k)
+            trlft0(ic0+1,ic1,k)= trlft0(ic0+1,ic1,k) - ttv(k)
+          enddo
+          trrgt0(ic0  ,ic1,NEQU) = max(smallr,trrgt0(ic0  ,ic1,NEQU))
+          trlft0(ic0+1,ic1,NEQU) = max(smallr,trlft0(ic0+1,ic1,NEQU))
+c         write(6,*) " new trrgt0(",ic0,ic1,"=",trrgt0(ic0,ic1,1),
+c    &               trrgt0(ic0,ic1,2),trrgt0(ic0,ic1,3),
+c    &               trrgt0(ic0,ic1,4) 
+c         write(6,*) " new trlft0(",ic0+1,ic1,"=",trlft0(ic0+1,ic1,1),
+c    &               trlft0(ic0+1,ic1,2),trlft0(ic0+1,ic1,3),
+c    &               trlft0(ic0+1,ic1,4) 
+        enddo
+      enddo
+c      call flush(6)     
+      return
+      end   
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine fluxcalculation(dt,extra_cell,visco,dx,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  gamma,rpchoice,
+     &  density,velocity,pressure,
+     &  flux0,flux1,
+     &  trlft0,trlft1,trrgt0,trrgt1)
+     
+c***********************************************************************
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer extra_cell,visco,rpchoice
+      REAL dt,dx(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     density(CELL2d(ifirst,ilast,CELLG)),
+     &     velocity(CELL2d(ifirst,ilast,CELLG),NDIM),
+     &     pressure(CELL2d(ifirst,ilast,CELLG))
+c variables in 2d side indexed         
+      REAL
+     &     flux0(FACE2d0(ifirst,ilast,FLUXG),NEQU),
+     &     flux1(FACE2d1(ifirst,ilast,FLUXG),NEQU), 
+     &     trlft0(FACE2d0(ifirst,ilast,FACEG),NEQU),
+     &     trrgt0(FACE2d0(ifirst,ilast,FACEG),NEQU),
+     &     trlft1(FACE2d1(ifirst,ilast,FACEG),NEQU),
+     &     trrgt1(FACE2d1(ifirst,ilast,FACEG),NEQU)
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ie0,ie1,j
+      REAL   stateL(NEQU),stateR(NEQU),
+     &       riemst(NEQU),gamma
+      REAL mom0,mom1,Hent,v2norm,vel_tan
+      REAL mom0L,mom1L,enerL,mom0R,mom1R,enerR
+      REAL maxeig, vcoef,vcorr(NEQU),gam_min_one
+c
+c variables for hllc scheme
+      REAL aLsq,aRsq,keL,keR,flux(NEQU),diff(NEQU)
+      REAL mfL,mfR,star(NEQU),sL,sM,sR
+      REAL w,omw,hat(NEQU+1),denom
+c
+      if (FLUXG.lt.1) then
+         write(6,*) "flux ghosts < 1!" 
+c         call flush(6)
+	stop
+      endif
+c
+c***********************************************************************
+c solve riemann problems for conservative flux
+c  arguments: ( axis for RP, other axis, extra cells-direction)
+c***********************************************************************
+c      
+c     write(6,*) "In fluxcalculation(",extra_cell,")"
+c     write(6,*) "ifirst0,ilast0,ifirst1,ilast1,extra_cell",
+c    &       ifirst0,ilast0,ifirst1,ilast1,extra_cell
+      gam_min_one = gamma-one
+riemann_solve(0,1,(extra_cell+(FLUXG-1)))dnl
+c
+riemann_solve(1,0,(extra_cell+(FLUXG-1)))dnl
+
+      if (visco.eq.1) then
+      write(6,*) "doing artificial viscosity"
+c
+artificial_viscosity1(0,1)dnl
+c
+artificial_viscosity1(1,0)dnl
+c
+      endif
+c      call flush(6)     
+      return
+      end 
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+  
+      subroutine consdiff(ifirst0,ilast0,ifirst1,ilast1,dx,
+     &  flux0,flux1,
+     &  gamma,density,velocity,pressure)
+c***********************************************************************
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+      integer ifirst0, ilast0,ifirst1, ilast1
+      REAL dx(0:NDIM-1)
+      REAL
+     &     flux0(FACE2d0(ifirst,ilast,FLUXG),NEQU),
+     &     flux1(FACE2d1(ifirst,ilast,FLUXG),NEQU),
+     &     gamma,
+     &     density(CELL2d(ifirst,ilast,CELLG)),
+     &     velocity(CELL2d(ifirst,ilast,CELLG),NDIM),
+     &     pressure(CELL2d(ifirst,ilast,CELLG))
+c
+      integer ic0,ic1,k
+      REAL temp,v2norm,mom(NDIM),energy,
+     &     gam_min_one
+      
+c***********************************************************************
+c update conserved variables to full time
+c note the permutation of indices in 2nd coordinate direction
+c***********************************************************************
+      gam_min_one = gamma-one 
+
+      do ic1=ifirst1,ilast1
+        do ic0=ifirst0,ilast0
+          mom(1) = density(ic0,ic1)*velocity(ic0,ic1,1)
+          mom(2) = density(ic0,ic1)*velocity(ic0,ic1,2)
+          v2norm = (velocity(ic0,ic1,1)**2+velocity(ic0,ic1,2)**2)
+          energy = pressure(ic0,ic1)/gam_min_one +
+     &                        half*density(ic0,ic1)*v2norm
+ 
+          density(ic0,ic1) = density(ic0,ic1)
+     &          -(flux0(ic0+1,ic1,1)-flux0(ic0,ic1,1))/dx(0)
+     &          -(flux1(ic1+1,ic0,1)-flux1(ic1,ic0,1))/dx(1)
+          density(ic0,ic1) = max(smallr,density(ic0,ic1))
+          do k=1,NDIM
+            mom(k) = mom(k)
+     &        -(flux0(ic0+1,ic1,k+1)-flux0(ic0,ic1,k+1))/dx(0)
+     &        -(flux1(ic1+1,ic0,k+1)-flux1(ic1,ic0,k+1))/dx(1)
+            velocity(ic0,ic1,k) = mom(k)/density(ic0,ic1)
+          enddo
+          energy = energy
+     &       -(flux0(ic0+1,ic1,NEQU)-flux0(ic0,ic1,NEQU))/dx(0)
+     &       -(flux1(ic1+1,ic0,NEQU)-flux1(ic1,ic0,NEQU))/dx(1)
+c      
+          v2norm = (velocity(ic0,ic1,1)**2+velocity(ic0,ic1,2)**2)
+          temp = energy - half*density(ic0,ic1)*v2norm
+          pressure(ic0,ic1) = gam_min_one*temp
+          pressure(ic0,ic1) = max(smallr,pressure(ic0,ic1))
+        enddo
+      enddo
+c
+      return
+      end
+c***********************************************************************
+include(FORTDIR/../gas1d_approxrp.i)dnl
+include(FORTDIR/../gas1d_exactrp.i)dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/2d/grad.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/2d/grad.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,213 @@
+define(NDIM,2)dnl
+define(NEQU,4)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+
+      subroutine detectgrad(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  vghost0,tagghost0,ttagghost0,
+     &  vghost1,tagghost1,ttagghost1,
+     &  dx,
+     &  gradtol,
+     &  dotag,donttag,
+     &  var,
+     &  tags,temptags)
+c***********************************************************************
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+c input arrays:
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  dotag,donttag,
+     &  vghost0,vghost1,
+     &  tagghost0,tagghost1,
+     &  ttagghost0,ttagghost1
+      REAL
+     &  dx(0:NDIM-1),
+     &  gradtol
+c variables indexed as 2dimensional
+      REAL
+     &  var(CELL2dVECG(ifirst,ilast,vghost))
+      integer
+     &  tags(CELL2dVECG(ifirst,ilast,tagghost)),
+     &  temptags(CELL2dVECG(ifirst,ilast,ttagghost))
+c
+      REAL tol
+      REAL facejump, loctol
+      REAL presm1,presp1,diag01
+      logical tagcell
+      integer ic0,ic1
+c
+c***********************************************************************
+c
+      tol = gradtol
+      diag01 = sqrt(dx(0)**2+dx(1)**2)
+
+      do ic1=ifirst1,ilast1
+        do ic0=ifirst0,ilast0
+
+          if (tags(ic0,ic1) .ne. 0) then
+            loctol = 0.125*tol
+          else 
+            loctol = tol
+          endif
+   
+          tagcell = .false.
+
+          presm1 = var(ic0-1,ic1)
+          presp1 = var(ic0+1,ic1)
+          facejump = abs(var(ic0,ic1)-presm1)
+          facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+          tagcell = ((facejump).gt.(loctol*dx(0)))
+          if (.not.tagcell) then
+            presm1 = var(ic0,ic1-1)
+            presp1 = var(ic0,ic1+1)
+            facejump = abs(var(ic0,ic1)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+            tagcell = ((facejump).gt.(loctol*dx(1)))
+          endif
+
+          if (.not.tagcell) then
+            presm1 = var(ic0-1,ic1-1)
+            presp1 = var(ic0+1,ic1+1)
+            facejump = abs(var(ic0,ic1)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+            tagcell = ((facejump).gt.(loctol*diag01))
+          endif
+          if (.not.tagcell) then
+            presm1 = var(ic0-1,ic1+1)
+            presp1 = var(ic0+1,ic1-1)
+            facejump = abs(var(ic0,ic1)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+            tagcell = ((facejump).gt.(loctol*diag01))
+          endif
+
+          if ( tagcell ) then
+            temptags(ic0,ic1) = dotag
+          endif
+        enddo
+      enddo
+      return
+      end
+
+      subroutine detectshock(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  vghost0,tagghost0,ttagghost0,
+     &  vghost1,tagghost1,ttagghost1,
+     &  dx,
+     &  gradtol,gradonset,
+     &  dotag,donttag,
+     &  var,
+     &  tags,temptags)
+c***********************************************************************
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+c input arrays:
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  dotag,donttag,
+     &  vghost0,vghost1,
+     &  tagghost0,tagghost1,
+     &  ttagghost0,ttagghost1
+      REAL
+     &  dx(0:NDIM-1),
+     &  gradtol,gradonset
+c variables indexed as 2dimensional
+      REAL
+     &  var(CELL2dVECG(ifirst,ilast,vghost))
+      integer
+     &  tags(CELL2dVECG(ifirst,ilast,tagghost)),
+     &  temptags(CELL2dVECG(ifirst,ilast,ttagghost))
+c
+      REAL tol,onset
+      REAL jump1, jump2, facejump, loctol,locon
+      REAL presm1,presm2,presp1,presp2
+      REAL diag01 
+      logical tagcell
+      integer ic0,ic1
+c
+c***********************************************************************
+c
+      tol = gradtol
+      onset = gradonset
+      diag01 = sqrt(dx(0)**2+dx(1)**2)
+
+      do ic1=ifirst1,ilast1
+        do ic0=ifirst0,ilast0
+
+          if (tags(ic0,ic1) .ne. 0) then
+            loctol = 0.125*tol
+            locon = 0.66*onset
+          else 
+            loctol = tol
+            locon = onset
+          endif
+   
+          tagcell = .false.
+
+          presm1 = var(ic0-1,ic1)
+          presm2 = var(ic0-2,ic1)
+          presp1 = var(ic0+1,ic1)
+          presp2 = var(ic0+2,ic1)
+          jump2 = presp2-presm2
+          jump1 = presp1-presm1
+          facejump = abs(var(ic0,ic1)-presm1)
+          facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+          tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                ((jump1*jump2).lt.zero)).and.
+     &               ((facejump).gt.(loctol*dx(0))))
+          if (.not.tagcell) then
+            presm1 = var(ic0,ic1-1)
+            presm2 = var(ic0,ic1-2)
+            presp1 = var(ic0,ic1+1)
+            presp2 = var(ic0,ic1+2)
+            jump2 = presp2-presm2
+            jump1 = presp1-presm1
+            facejump = abs(var(ic0,ic1)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+            tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                ((jump1*jump2).lt.zero)).and.
+     &               ((facejump).gt.(loctol*dx(1)))) 
+          endif
+
+          if (.not.tagcell) then
+            presm1 = var(ic0-1,ic1-1)
+            presp1 = var(ic0+1,ic1+1)
+            presm2 = var(ic0-2,ic1-2)
+            presp2 = var(ic0+2,ic1+2)
+            jump1 = presp1-presm1
+            jump2 = presp2-presm2
+            facejump = abs(var(ic0,ic1)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+            tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag01)))
+          endif
+          if (.not.tagcell) then
+            presm1 = var(ic0-1,ic1+1)
+            presp1 = var(ic0+1,ic1-1)
+            presm2 = var(ic0-2,ic1+2)
+            presp2 = var(ic0+2,ic1-2)
+            jump1 = presp1-presm1
+            jump2 = presp2-presm2
+            facejump = abs(var(ic0,ic1)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+            tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag01)))
+          endif
+
+          if ( tagcell ) then
+            temptags(ic0,ic1) = dotag
+          endif
+        enddo
+      enddo
+      return
+      end
+
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/2d/init.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/2d/init.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,176 @@
+define(NDIM,2)dnl
+define(NEQU,4)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+      subroutine eulerinit(data_problem,dx,xlo,xhi,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  gcw0,gcw1,
+     &  gamma,
+     &  density,velocity,pressure,
+     &  nintervals,front,
+     &  i_dens,i_vel,i_pres)
+c***********************************************************************
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer gcw0,gcw1
+      integer data_problem
+      integer nintervals
+      REAL front(1:nintervals)
+      REAL 
+     &     dx(0:NDIM-1),xlo(0:NDIM-1),xhi(0:NDIM-1)
+      REAL i_dens(1:nintervals),
+     &     i_vel(0:NDIM-1,1:nintervals),
+     &     i_pres(1:nintervals) 
+c variables in 2d cell indexed         
+      REAL
+     &     density(CELL2dVECG(ifirst,ilast,gcw)),
+     &     velocity(CELL2dVECG(ifirst,ilast,gcw),0:NDIM-1),
+     &     pressure(CELL2dVECG(ifirst,ilast,gcw))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,dir,ifr
+      REAL xc(0:NDIM-1)
+      REAL gamma
+c
+c   dir 0 two linear states (L,R) indp of y,z
+c   dir 1 two linear states (L,R) indp of x,z
+    
+c     write(6,*) "Inside eulerinit"
+c     write(6,*) "data_problem= ",data_problem
+c     write(6,*) "PIECEWISE_CONSTANT_X= ",PIECEWISE_CONSTANT_X
+c     write(6,*) "STEP = ",STEP 
+c     write(6,*) "PIECEWISE_CONSTANT_Y= ",PIECEWISE_CONSTANT_Y
+c     write(6,*) "dx= ",dx(0), dx(1)
+c     write(6,*) "xlo= ",xlo(0), xlo(1),", xhi = ",xhi(0), xhi(1)
+c     write(6,*) "ifirst, ilast= ",ifirst0,ilast0,"and ",ifirst1,ilast1
+c     write(6,*) "gamma= ",gamma
+c     call flush(6)
+
+      dir = 0
+      if (data_problem.eq.PIECEWISE_CONSTANT_X) then
+         dir = 0
+      else if (data_problem.eq.STEP) then
+         dir = 0
+      else if (data_problem.eq.PIECEWISE_CONSTANT_Y) then
+         dir = 1
+      endif
+
+      if (dir.eq.0) then
+         ifr = 1
+         do ic0=ifirst0,ilast0
+            xc(0) = xlo(0) + dx(0)*(dble(ic0-ifirst0)+half)
+            if (xc(dir).gt.front(ifr)) then
+              ifr = ifr+1
+            endif
+            do ic1=ifirst1,ilast1
+               density(ic0,ic1) = i_dens(ifr)
+               velocity(ic0,ic1,0) = i_vel(0,ifr)
+               velocity(ic0,ic1,1) = i_vel(1,ifr)
+               pressure(ic0,ic1) = i_pres(ifr)
+           enddo
+         enddo
+      else if (dir.eq.1) then
+         ifr = 1
+         do ic1=ifirst1,ilast1
+            xc(1) =xlo(1)+ dx(1)*(dble(ic1-ifirst1)+half)
+            if (xc(dir).gt.front(ifr)) then
+               ifr = ifr+1
+            endif
+            do ic0=ifirst0,ilast0
+               density(ic0,ic1) = i_dens(ifr)
+               velocity(ic0,ic1,0) = i_vel(0,ifr)
+               velocity(ic0,ic1,1) = i_vel(1,ifr)
+               pressure(ic0,ic1) = i_pres(ifr)
+           enddo
+         enddo
+      endif
+c
+      return
+      end   
+c***********************************************************************
+c
+c    Initialization routine where we use a spherical profile 
+c
+c***********************************************************************
+      subroutine eulerinitsphere(data_problem,dx,xlo,xhi,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  gcw0,gcw1,
+     &  gamma,
+     &  density,velocity,pressure,
+     &  i_dens,i_vel,i_pres,
+     &  o_dens,o_vel,o_pres,
+     &  center,radius)
+c***********************************************************************
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer gcw0,gcw1
+      integer data_problem
+      REAL i_dens,i_vel(0:NDIM-1),i_pres,
+     &     o_dens,o_vel(0:NDIM-1),o_pres
+      REAL center(0:NDIM-1),radius
+      REAL 
+     &     dx(0:NDIM-1),xlo(0:NDIM-1),xhi(0:NDIM-1),gamma
+c variables in 2d cell indexed         
+      REAL
+     &     density(CELL2dVECG(ifirst,ilast,gcw)),
+     &     velocity(CELL2dVECG(ifirst,ilast,gcw),0:NDIM-1),
+     &     pressure(CELL2dVECG(ifirst,ilast,gcw))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1
+      REAL xc(0:NDIM-1),x0,x1
+      REAL angle
+c
+c     write(6,*) "Inside eulerinitsphere"
+c     write(6,*) "data_problem= ",data_problem
+c     write(6,*) "dx= ",dx(0), dx(1)
+c     write(6,*) "xlo= ",xlo(0), xlo(1),", xhi = ",xhi(0), xhi(1)
+c     write(6,*) "ifirst, ilast= ",ifirst0,ilast0,ifirst1,ilast1
+c     write(6,*) "gamma= ",gamma
+c     write(6,*) "radius= ",radius
+c     write(6,*) "center= ",center(0),center(1)
+c     call flush(6)
+
+      do ic1=ifirst1,ilast1
+        xc(1) = xlo(1)+dx(1)*(dble(ic1-ifirst1)+half)
+        x1 = xc(1)-center(1)
+        do ic0=ifirst0,ilast0
+           xc(0) = xlo(0)+dx(0)*(dble(ic0-ifirst0)+half)
+           x0 = xc(0)-center(0)
+           if (x1.eq.zero .and. x0.eq.zero) then
+              angle = zero
+           else
+              angle = atan2(x1,x0)
+           endif
+           if ((x0**2+x1**2).lt.radius**2) then
+              density(ic0,ic1) = i_dens
+              velocity(ic0,ic1,0) = i_vel(0)*cos(angle)
+              velocity(ic0,ic1,1) = i_vel(1)*sin(angle)
+              pressure(ic0,ic1) = i_pres
+           else
+              density(ic0,ic1) = o_dens
+              velocity(ic0,ic1,0) = o_vel(0)*cos(angle)
+              velocity(ic0,ic1,1) = o_vel(1)*sin(angle)
+              pressure(ic0,ic1) = o_pres
+           endif
+c          write(6,*) "cell, state = ",ic0,ic1, density(ic0,ic1),
+c    &     pressure(ic0,ic1),velocity(ic0,ic1,0),velocity(ic0,ic1,1)
+c          call flush(6)
+         enddo
+      enddo
+c
+      return
+      end   
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/2d/m4flux.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/2d/m4flux.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,267 @@
+define(riemann_solve,`dnl
+c     write(6,*) "checking onedr sol in riemann solve  "
+c     write(6,*) "         dt= ",dt
+c     write(6,*) "  calculating flux$1, 1+extra_cell= ",$3
+c     write(6,*) "  ic$2=",ifirst$2-1-$3,ilast$2+1+$3
+c     write(6,*) "  ie$1=",ifirst$1-1-$3,ilast$1+1+1+$3
+
+      if (rpchoice.eq.APPROX_RIEM_SOLVE
+     &    .or. rpchoice.eq.EXACT_RIEM_SOLVE ) then
+
+      do ic$2=ifirst$2-$3,    
+     &        ilast$2+$3
+         do ie$1=ifirst$1-$3,
+     &           ilast$1+1+$3
+ 
+c           ************************************************************
+c           *  Assign left and right states.  Note only normal vel used.
+c           ************************************************************
+            stateL(1) = trlft$1(ie$1,ic$2,1)
+            stateL(2) = trlft$1(ie$1,ic$2,2+$1)
+            stateL(3) = trlft$1(ie$1,ic$2,NEQU)
+  
+            stateR(1) = trrgt$1(ie$1,ic$2,1)
+            stateR(2) = trrgt$1(ie$1,ic$2,2+$1)
+            stateR(3) = trrgt$1(ie$1,ic$2,NEQU)
+
+            if (rpchoice.eq.APPROX_RIEM_SOLVE) then
+               call gas1dapproxrp(gamma,stateL,stateR,riemst)
+            else 
+               call gas1dexactrp(gamma,smallr,stateL,stateR,riemst)
+            endif
+
+            if (riemst(2).le.zero) then
+               vel_tan=trrgt$1(ie$1,ic$2,2+$2)
+            else
+               vel_tan=trlft$1(ie$1,ic$2,2+$2)
+            endif
+
+            mom$1=riemst(1)*riemst(2)
+            v2norm = riemst(2)**2+vel_tan**2
+            Hent = riemst(3)/gam_min_one + v2norm*riemst(1)/two
+
+            flux$1(ie$1,ic$2,1)= dt*mom$1
+            flux$1(ie$1,ic$2,2+$1)= dt*(riemst(3)+mom$1*riemst(2))
+            flux$1(ie$1,ic$2,2+$2)= dt*mom$1*vel_tan 
+            flux$1(ie$1,ic$2,NEQU)= dt*riemst(2)*(Hent+riemst(3))
+
+         enddo
+      enddo
+
+      elseif (rpchoice.eq.HLLC_RIEM_SOLVE) then
+
+      do ic$2=ifirst$2-$3,
+     &        ilast$2+$3
+         do ie$1=ifirst$1-$3,
+     &           ilast$1+1+$3
+ 
+c        ************************************************************
+c        *  Assign left and right states.
+c        *  Note all vel comps used for Roe average.
+c        ************************************************************
+         do j=1,NEQU
+            stateL(j) = trlft$1(ie$1,ic$2,j)
+            stateR(j) = trrgt$1(ie$1,ic$2,j)
+         enddo
+
+c        ************************************************************
+c        *  Calculate bounding signal speeds. To do this, need the
+c        *  Roe-average of the velocity and sound speed.
+c        ************************************************************
+         w    = one / ( one + sqrt( stateR(1)/stateL(1) ) )
+         omw  = one - w
+         hat(2+$1) = w*stateL(2+$1) + omw*stateR(2+$1)
+         aLsq = gamma * stateL(NEQU) / stateL(1)
+         aRsq = gamma * stateR(NEQU) / stateR(1)
+         hat(NEQU+1) = sqrt( w*aLsq + omw*aRsq
+     &               + half*gam_min_one*w*omw*(
+     &                  (stateR(2)-stateL(2))**2
+     &                + (stateR(3)-stateL(3))**2 ) )
+
+         sL = min(stateL(2+$1) - sqrt(aLsq), hat(2+$1) - hat(NEQU+1))
+         sR = max(stateR(2+$1) + sqrt(aRsq), hat(2+$1) + hat(NEQU+1))
+         mfL = stateL(1) * ( sL - stateL(2+$1) )
+         mfR = stateR(1) * ( sR - stateR(2+$1) )
+         sM  = ( stateR(NEQU) - stateL(NEQU)
+     &     + mfL*stateL(2+$1) - mfR*stateR(2+$1) ) / ( mfL - mfR )
+
+c        ************************************************************
+c        *  Calculate flux starting at upwind state.
+c        ************************************************************
+         if ( sM.gt.zero ) then
+
+c           *********************************************************
+c           * Flow is to the right; start from left state.
+c           *********************************************************
+            flux(1)   = stateL(1) * stateL(2+$1)
+            flux(2+$1) = flux(1) * stateL(2+$1) + stateL(NEQU)
+            flux(3-$1) = flux(1) * stateL(3-$1)
+            keL = half * (stateL(2)**2 + stateL(3)**2)
+            flux(NEQU) = flux(1) * (aLsq / gam_min_one + keL)
+
+c           *********************************************************
+c           * Check if flow is subsonic.
+c           *********************************************************
+            if ( sL.lt.zero ) then
+
+c              ******************************************************
+c              * Add contribution from left acoustic wave.
+c              ******************************************************
+               denom = one / (sL-sM)
+               star(1)    = stateL(1) * (sL-stateL(2+$1)) * denom
+               star(2+$1) = sM
+               star(3-$1) = stateL(3-$1)
+               star(NEQU) = stateL(NEQU)*( one + gamma * denom
+     &                                   * ( sM-stateL(2+$1) ) )
+     &                    + half * gam_min_one
+     &                        * star(1) * ( sM-stateL(2+$1) )**2
+
+               diff(1) = star(1) - stateL(1)
+               diff(2) = star(1)*star(2) - stateL(1)*stateL(2)
+               diff(3) = star(1)*star(3) - stateL(1)*stateL(3)
+               diff(NEQU) = ( star(NEQU)-stateL(NEQU) )
+     &                 / gam_min_one
+     &                 + half * star(1) * (star(2)**2 + star(3)**2)
+     &                         - stateL(1) * keL
+
+               do j=1,NEQU
+                  flux(j) = flux(j) + sL*diff(j)
+               enddo
+
+            endif
+
+         else
+
+c           *********************************************************
+c           *  Flow is to the left; start from right state.
+c           *********************************************************
+            flux(1)   = stateR(1) * stateR(2+$1)
+            flux(2+$1) = flux(1) * stateR(2+$1) + stateR(NEQU)
+            flux(3-$1) = flux(1) * stateR(3-$1)
+            keR = half * (stateR(2)**2 + stateR(3)**2)
+            flux(NEQU)   = flux(1) * (aRsq / gam_min_one + keR)
+
+c           *********************************************************
+c           * Check if flow is subsonic.
+c           *********************************************************
+            if ( sR.gt.zero ) then
+
+c              ******************************************************
+c              * Add contribution from right acoustic wave.
+c              ******************************************************
+               denom = one / (sR-sM)
+               star(1)    = stateR(1) * (sR-stateR(2+$1)) * denom
+               star(2+$1) = sM
+               star(3-$1) = stateR(3-$1)
+               star(NEQU) = stateR(NEQU) * (1 + gamma * denom
+     &                                   * ( sM-stateR(2+$1) ) )
+     &                    + half * gam_min_one
+     &                           * star(1) * ( sM-stateR(2+$1) )**2
+
+               diff(1) = star(1) - stateR(1)
+               diff(2) = star(1)*star(2) - stateR(1)*stateR(2)
+               diff(3) = star(1)*star(3) - stateR(1)*stateR(3)
+               diff(NEQU) = ( star(NEQU)-stateR(NEQU) )
+     &                 / gam_min_one
+     &                 + half * star(1) * (star(2)**2 + star(3)**2)
+     &                      - stateR(1) * keR
+
+               do j=1,NEQU
+                 flux(j) = flux(j) + sR*diff(j)
+               enddo
+
+            endif
+
+         endif
+
+c        ************************************************************
+c        *  Assign average interface fluxes.
+c        ************************************************************
+         do j=1,NEQU
+            flux$1(ie$1,ic$2,j) = dt * flux(j)
+         enddo
+
+         enddo
+      enddo
+
+      endif
+')dnl
+define(artificial_viscosity1,`dnl
+           do ic$2=ifirst$2-(FLUXG-1),ilast$2+(FLUXG-1)
+             do ie$1=ifirst$1-(FLUXG-1),ilast$1+(FLUXG)
+               maxeig =trrgt$1(ie$1,ic$2,4)-trlft$1(ie$1,ic$2,4)
+               vcoef = tenth*abs(maxeig)
+     
+               mom0L=trlft$1(ie$1,ic$2,1)*trlft$1(ie$1,ic$2,2)
+               mom1L=trlft$1(ie$1,ic$2,1)*trlft$1(ie$1,ic$2,3)
+               v2norm = mom1L**2+mom0L**2
+               enerL=trlft$1(ie$1,ic$2,NEQU)/gam_min_one+
+     &                v2norm/(trlft$1(ie$1,ic$2,1)*two)
+               mom0R=trrgt$1(ie$1,ic$2,1)*trrgt$1(ie$1,ic$2,2)
+               mom1R=trrgt$1(ie$1,ic$2,1)*trrgt$1(ie$1,ic$2,3)
+               v2norm = mom1R**2+mom0R**2
+               enerR=trrgt$1(ie$1,ic$2,NEQU)/gam_min_one+
+     &                  v2norm/(trrgt$1(ie$1,ic$2,1)*two)
+  
+               vcorr(1) = dt*vcoef*
+     &           (trrgt$1(ie$1,ic$2,1)-trlft$1(ie$1,ic$2,1))
+               vcorr(2) = dt*vcoef*(mom0R-mom0L)
+               vcorr(3) = dt*vcoef*(mom1R-mom1L)
+               vcorr(NEQU) = dt*vcoef*(enerR-enerL)
+               do j=1,NEQU
+                 flux$1(ie$1,ic$2,j)= flux$1(ie$1,ic$2,j) 
+     &                                     -vcorr(j)
+               enddo
+             enddo
+           enddo
+')dnl
+define(artificial_viscosity2,`dnl
+        do ic1=ifirst1-(FLUXG-1),ilast1+(FLUXG-1)
+          do ie0=ifirst0-(FLUXG-1),ilast0+(FLUXG)
+            maxeig =pressure(ie0,ic1)-pressure(ie0-1,ic1)
+            vcoef = tenth*abs(maxeig)
+            mom0L=density(ie0-1,ic1,1)*velocity(ie0-1,ic1,0)
+            mom1L=density(ie0-1,ic1,1)*velocity(ie0-1,ic1,1)
+            mom0R=density(ie0  ,ic1,1)*velocity(ie0  ,ic1,0)
+                mom1R=density(ie0  ,ic1,1)*velocity(ie0  ,ic1,1)
+            v2norm = mom1L**2+mom0L**2
+            enerL=pressure(ie0-1,ic1)/gam_min_one+
+     &               v2norm/(density(ie0-1,ic1)*two)
+            v2norm = mom1R**2+mom0R**2
+            enerR=pressure(ie0,ic1)/gam_min_one+
+     &             v2norm/(density(ie0,ic1)*two)
+            vcorr1= dt*vcoef*(density(ie0,ic1)-density(ie0-1,ic1))
+            vcorr2= dt*vcoef*(mom0R-mom0L)
+            vcorr3= dt*vcoef*(mom1R-mom1L)
+            vcorr4= dt*vcoef*(enerR-enerL)
+            flux0(ie0,ic1,1)= flux0(ie0,ic1,1) - vcorr1
+            flux0(ie0,ic1,2)= flux0(ie0,ic1,2) - vcorr2
+            flux0(ie0,ic1,3)= flux0(ie0,ic1,3) - vcorr3
+            flux0(ie0,ic1,4)= flux0(ie0,ic1,4) - vcorr4
+          enddo
+        enddo
+        do ic0=ifirst0,ilast0
+          do ie1=ifirst1,ilast1+1
+            maxeig =pressure(ic0,ie1)-pressure(ic0-1,ie1)
+            vcoef = tenth*abs(maxeig)
+            mom0L=density(ic0,ie1-1,1)*velocity(ic0,ie1-1,0)
+            mom1L=density(ic0,ie1-1,1)*velocity(ic0,ie1-1,1)
+            mom0R=density(ic0,ie1  ,1)*velocity(ic0,ie1  ,0)
+            mom1R=density(ic0,ie1  ,1)*velocity(ic0,ie1  ,1)
+            v2norm = mom1L**2+mom0L**2
+            enerL=pressure(ic0,ie1-1)/gam_min_one+
+     &             v2norm/(density(ic0,ie1-1)*two)
+            v2norm = mom1R**2+mom0R**2
+            enerR=pressure(ic0,ie1)/gam_min_one+
+     &             v2norm/(density(ic0,ie1)*two)
+            vcorr1= dt*vcoef*(density(ic0,ie1)-density(ic0,ie1-1))
+            vcorr2= dt*vcoef*(mom0R-mom0L)
+            vcorr3= dt*vcoef*(mom1R-mom1L)
+            vcorr4= dt*vcoef*(enerR-enerL)
+            flux1(ie1,ic0,1)= flux1(ie1,ic0,1) - vcorr1
+            flux1(ie1,ic0,2)= flux1(ie1,ic0,2) - vcorr2
+            flux1(ie1,ic0,3)= flux1(ie1,ic0,3) - vcorr3
+            flux1(ie1,ic0,4)= flux1(ie1,ic0,4) - vcorr4
+          enddo
+        enddo
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/2d/m4trace.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/2d/m4trace.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,61 @@
+define(trace_init,`dnl
+         do  ic$2=ifirst$2-FACEG,ilast$2+FACEG
+           ie$1=ifirst$1-FACEG
+           tracelft$1(ie$1,ic$2,1)=zero
+           tracelft$1(ie$1,ic$2,2)=zero
+           tracelft$1(ie$1,ic$2,3)=zero
+           tracelft$1(ie$1,ic$2,NEQU)=zero
+           tracergt$1(ie$1,ic$2,1)=density($5)
+           tracergt$1(ie$1,ic$2,2)=velocity($5,1)
+           tracergt$1(ie$1,ic$2,3)=velocity($5,2)
+           tracergt$1(ie$1,ic$2,NEQU)=pressure($5)
+
+           do  ie$1=ifirst$1+1-FACEG,ilast$1+FACEG
+             tracelft$1(ie$1,ic$2,1)=density($4)
+             tracelft$1(ie$1,ic$2,2)=velocity($4,1)
+             tracelft$1(ie$1,ic$2,3)=velocity($4,2)
+             tracelft$1(ie$1,ic$2,NEQU)=pressure($4)
+
+             tracergt$1(ie$1,ic$2,1)=density($5)
+             tracergt$1(ie$1,ic$2,2)=velocity($5,1)
+             tracergt$1(ie$1,ic$2,3)=velocity($5,2)
+             tracergt$1(ie$1,ic$2,NEQU)=pressure($5)
+
+           enddo
+
+           ie$1=ilast$1+FACEG+1
+           tracelft$1(ie$1,ic$2,1)=density($4)
+           tracelft$1(ie$1,ic$2,2)=velocity($4,1)
+           tracelft$1(ie$1,ic$2,3)=velocity($4,2)
+           tracelft$1(ie$1,ic$2,NEQU)=pressure($4)
+           tracergt$1(ie$1,ic$2,1)=zero
+           tracergt$1(ie$1,ic$2,2)=zero
+           tracergt$1(ie$1,ic$2,3)=zero
+           tracergt$1(ie$1,ic$2,NEQU)=zero
+         enddo
+ 
+')dnl
+define(trace_call,`dnl
+          do ic$2=ifirst$2-2,ilast$2+2
+            do ic$1=ifirst$1-CELLG,ilast$1+CELLG
+              ttsound(ic$1)= sound(ic0,ic1)
+            enddo
+            do ic$1=ifirst$1-FACEG,ilast$1+FACEG+1
+              do k=1,NEQU
+                ttraclft(ic$1,k) = tracelft(ic$1,ic$2,k)
+                ttracrgt(ic$1,k) = tracergt(ic$1,ic$2,k)
+              enddo
+            enddo
+
+            call trace(dt,ifirst$1,ilast$1,mc,
+     &        dx,idir,igdnv,ttsound,
+     &        ttraclft,ttracrgt,
+     &        ttcelslp,ttedgslp)
+            do ic$1=ifirst$1-FACEG,ilast$1+FACEG+1
+              do k=1,NEQU
+                tracelft(ic$1,ic$2,k) = ttraclft(ic$1,k)
+                tracergt(ic$1,ic$2,k) = ttracrgt(ic$1,k)
+              enddo
+            enddo
+          enddo
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/2d/stable.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/2d/stable.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,47 @@
+define(NDIM,2)dnl
+define(NEQU,4)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+      subroutine stabledt(dx,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  ngc0,ngc1,
+     &  gamma,density,velocity,pressure,stabdt)
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+include(FORTDIR/../const.i)dnl
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      REAL stabdt,dx(0:NDIM-1)
+      integer ifirst0,ilast0,ifirst1,ilast1,ngc0,ngc1
+c
+      REAL  
+     &  gamma,
+     &  density(CELL2dVECG(ifirst,ilast,ngc)),
+     &  velocity(CELL2dVECG(ifirst,ilast,ngc),0:NDIM-1),
+     &  pressure(CELL2dVECG(ifirst,ilast,ngc))
+c    
+      integer ic0,ic1
+      integer ighoslft(0:NDIM-1),ighosrgt(0:NDIM-1)
+
+      REAL maxspeed(0:NDIM-1),lambda
+c
+      ighoslft(0) = ifirst0 - ngc0
+      ighoslft(1) = ifirst1 - ngc1
+      ighosrgt(0) = ilast0 + ngc0
+      ighosrgt(1) = ilast1 + ngc1
+
+      maxspeed(0)=zero
+      maxspeed(1)=zero
+
+      do  ic1=ighoslft(1),ighosrgt(1)
+         do  ic0=ighoslft(0),ighosrgt(0)
+            lambda = 
+     &       sqrt(max(zero,gamma*pressure(ic0,ic1)/density(ic0,ic1)))
+            maxspeed(0) = max(maxspeed(0),
+     &           abs(velocity(ic0,ic1,0))+lambda)
+            maxspeed(1) = max(maxspeed(1),
+     &           abs(velocity(ic0,ic1,1))+lambda)
+         enddo
+      enddo
+      stabdt = min((dx(1)/maxspeed(1)),(dx(0)/maxspeed(0)))
+      return
+      end 
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/2d/trace.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/2d/trace.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,258 @@
+define(NDIM,2)dnl
+define(NEQU,4)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+include(FORTDIR/m4trace.i)dnl
+
+      subroutine computesound(ifirst0,ilast0,ifirst1,ilast1,
+     &  gamma,density, velocity,pressure,sound)
+c***********************************************************************
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+c variables indexed as 2dimensional
+      REAL
+     &     gamma,
+     &     density(CELL2d(ifirst,ilast,CELLG)),
+     &     velocity(CELL2d(ifirst,ilast,CELLG),0:NDIM-1),
+     &     pressure(CELL2d(ifirst,ilast,CELLG)),
+     &     sound(CELL2d(ifirst,ilast,CELLG))
+c
+      integer ic0,ic1
+c
+c***********************************************************************
+c
+c     write(6,*) "in computesound"
+c     do  ic1=ifirst1-4,ilast1+4
+c       do  ic0=ifirst0-4,ilast0+4
+c         write(6,*) "ic01,d_p_v=",ic0,ic1,
+c    &         density(ic0,ic1),pressure(ic0,ic1),
+c    &         velocity(ic0,ic1,0),velocity(ic0,ic1,1) 
+c         call flush(6)
+c       enddo
+c     enddo
+c     write(6,*)
+
+      do  ic0=ifirst0-CELLG,ilast0+CELLG
+        do  ic1=ifirst1-CELLG,ilast1+CELLG
+c         write(6,*) "        density,pressure = ",ic0,ic1,
+c    &                        density(ic0,ic1),pressure(ic0,ic1)
+c         write(6,*) "        velocity,        = ",ic0,ic1,
+c    &                        velocity(ic0,ic1,0),velocity(ic0,ic1,1)
+c         call flush(6)
+            sound(ic0,ic1) = 
+     &        sqrt(max(smallr,gamma*pressure(ic0,ic1)/density(ic0,ic1)))
+c           call flush(6)
+c
+        enddo
+      enddo
+
+c     write(6,*) "leaving computesound"
+c      call flush(6)
+      return
+      end 
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+c
+      subroutine inittraceflux(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  density,velocity,pressure,
+     &  tracelft0,tracelft1,
+     &  tracergt0,tracergt1,
+     &  fluxriem0,fluxriem1)
+c***********************************************************************
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      REAL
+     &       density(CELL2d(ifirst,ilast,CELLG)),
+     &      velocity(CELL2d(ifirst,ilast,CELLG),NDIM),
+     &      pressure(CELL2d(ifirst,ilast,CELLG)),
+     &     fluxriem0(FACE2d0(ifirst,ilast,FLUXG),NEQU),
+     &     tracelft0(FACE2d0(ifirst,ilast,FACEG),NEQU),
+     &     tracergt0(FACE2d0(ifirst,ilast,FACEG),NEQU),
+     &     fluxriem1(FACE2d1(ifirst,ilast,FLUXG),NEQU),
+     &     tracelft1(FACE2d1(ifirst,ilast,FACEG),NEQU),
+     &     tracergt1(FACE2d1(ifirst,ilast,FACEG),NEQU)
+      integer ic0,ic1,k,ie0,ie1
+c***********************************************************************
+c initialize left and right states at cell edges
+c (first-order upwind)
+c***********************************************************************
+      if (FLUXG.lt.1) then
+         write(6,*) "flux ghosts < 1!" 
+	stop
+      endif
+c*********************************************************************** 
+c     write(6,*) "in init_trace_flux"
+c     call flush(6)
+c     write(6,*) "ifirst0,ilast0,ifirst1,ilast1",
+c    &     ifirst0,ilast0,ifirst1,ilast1
+c     write(6,*) "cell ghosts ", CELLG
+c     write(6,*) "face ghosts ", FACEG
+c     call flush(6)
+
+c     write(6,*) " "
+c     write(6,*) " In trace_init0"
+trace_init(0,1,2,`ie0-1,ic1',`ie0,ic1')dnl
+ 
+c     write(6,*) " "
+c     write(6,*) " In trace_init1"
+trace_init(1,0,2,`ic0,ie1-1',`ic0,ie1')dnl
+c     write(6,*) " "
+ 
+c
+c     we initialize the flux to be 0
+
+      do ic1=ifirst1-FLUXG,ilast1+FLUXG
+        do ie0=ifirst0-FLUXG,ilast0+FLUXG+1
+          do k=1,NEQU  
+            fluxriem0(ie0,ic1,k) = zero
+          enddo  
+        enddo
+      enddo
+c
+      do ic0=ifirst0-FLUXG,ilast0+FLUXG
+        do ie1=ifirst1-FLUXG,ilast1+FLUXG+1
+          do k=1,NEQU  
+            fluxriem1(ie1,ic0,k) = zero
+          enddo  
+        enddo
+      enddo
+c
+c      call flush(6)
+      return
+      end 
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine chartracing0(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  mc, dx,
+     &  gamma,igdnv,
+     &  sound,
+     &  tracelft,tracergt,
+     &  ttcelslp, ttedgslp, 
+     &  ttsound,
+     &  ttraclft, ttracrgt)
+c***********************************************************************
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer mc,igdnv 
+      REAL dt 
+c variables in 1d axis indexed
+      REAL 
+     &     dx, gamma
+      REAL 
+     &     sound(CELL2d(ifirst,ilast,CELLG))
+      REAL 
+     &     tracelft(FACE2d0(ifirst,ilast,FACEG),NEQU),
+     &     tracergt(FACE2d0(ifirst,ilast,FACEG),NEQU)
+c  side variables ifirst0 to ifirst0+mc plus ghost cells
+      REAL
+     &  ttedgslp(ifirst0-FACEG:ifirst0+mc+FACEG,NEQU),
+     &  ttraclft(ifirst0-FACEG:ifirst0+mc+FACEG,NEQU),
+     &  ttracrgt(ifirst0-FACEG:ifirst0+mc+FACEG,NEQU)
+c  cell variables ifirst0 to ifirst0+mc-1 plus ghost cells
+      REAL 
+     &  ttcelslp(ifirst0-CELLG:ifirst0+mc-1+CELLG,NEQU),
+     &  ttsound(ifirst0-CELLG:ifirst0+mc-1+CELLG)
+c***********************************************************************
+c
+      integer ic0,ic1,k,idir
+c*********************************************************************** 
+c***********************************************************************
+c trace higher order states at cell edges
+c***********************************************************************
+c     write(6,*) "traced right chartracing0"
+c     do  ic1=ifirst1-FACEG,ilast1+FACEG
+c       do  ic0=ifirst0-FACEG,ilast0+FACEG+1
+c         write(6,*) "ic,state=",ic0,ic1,
+c    &         tracergt(ic0,ic1,1),tracergt(ic0,ic1,2),
+c    &         tracergt(ic0,ic1,3),tracergt(ic0,ic1,4) 
+c         call flush(6)
+c       enddo
+c     enddo
+c     write(6,*)
+c
+c     call flush(6)
+c
+      idir = 0
+trace_call(0,1)dnl
+c
+c***********************************************************************
+c     write(6,*) "leaving chartracing"
+c      call flush(6)
+      return
+      end
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine chartracing1(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  mc, dx,
+     &  gamma,igdnv,
+     &  sound,
+     &  tracelft,tracergt,
+     &  ttcelslp, ttedgslp,  
+     &  ttsound,
+     &  ttraclft, ttracrgt)
+c***********************************************************************
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer mc,igdnv
+      REAL dt 
+c variables in 1d axis indexed
+      REAL 
+     &     dx, gamma
+      REAL 
+     &     sound(CELL2d(ifirst,ilast,CELLG))
+      REAL 
+     &     tracelft(FACE2d1(ifirst,ilast,FACEG),NEQU),
+     &     tracergt(FACE2d1(ifirst,ilast,FACEG),NEQU)
+c  side variables ifirst1 to ifirst1+mc plus ghost cells
+      REAL
+     &  ttedgslp(ifirst1-FACEG:ifirst1+mc+FACEG,NEQU),
+     &  ttraclft(ifirst1-FACEG:ifirst1+mc+FACEG,NEQU),
+     &  ttracrgt(ifirst1-FACEG:ifirst1+mc+FACEG,NEQU)
+c  cell variables ifirst1 to ifirst1+mc-1 plus ghost cells
+      REAL 
+     &  ttcelslp(ifirst1-CELLG:ifirst1+mc-1+CELLG,NEQU),
+     &  ttsound(ifirst1-CELLG:ifirst1+mc-1+CELLG)
+c***********************************************************************
+c
+      integer ic0,ic1,k,idir
+c*********************************************************************** 
+c***********************************************************************
+c trace higher order states at cell edges
+c***********************************************************************
+c     write(6,*) "Entering chartracing1"
+c     call flush(6)
+c
+      idir = 1
+trace_call(1,0)dnl
+c
+c***********************************************************************
+c     write(6,*) "leaving chartracing"
+c      call flush(6)
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/2d/trace1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/2d/trace1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,193 @@
+define(NEQU,4)dnl
+define(REAL,`double precision')dnl
+
+      subroutine trace(dt,ifirst,ilast,mc,
+     &  dx,dir,igdnv,sound,
+     &  tracelft,tracergt, 
+     &  celslope,edgslope)
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      REAL dt
+      integer ifirst,ilast,mc,dir,igdnv
+c     REAL dx, flattn
+      REAL dx
+c
+      REAL  
+     &  celslope(ifirst-CELLG:ifirst+mc-1+CELLG,NEQU),
+     &  flattn(ifirst-CELLG:ifirst+mc-1+CELLG),
+     &  sound  (ifirst-CELLG:ifirst+mc-1+CELLG),
+c       side variables
+     &  tracelft(ifirst-FACEG:ifirst+mc+FACEG,NEQU),
+     &  tracergt(ifirst-FACEG:ifirst+mc+FACEG,NEQU),
+     &  edgslope(ifirst-FACEG:ifirst+mc+FACEG,NEQU)
+c
+      integer ie,ic,i,k
+      REAL bound,coef4,slope2,dtdx,slope4
+      REAL csq, rho, u, v, p
+      REAL drho, du, dv, dp
+      REAL spminus, spplus, spzero, smminus, smplus, smzero
+      REAL alpham, alphap, alpha0r
+      REAL alpha0v
+      REAL apright, amright, azrright
+      REAL azv1rght
+      REAL apleft, amleft, azrleft
+      REAL azv1left,ceigv
+      integer dir1,dir2
+
+      if (dir.eq.0) then
+        dir1 = 2
+        dir2 = 3
+      else 
+        dir1 = 3
+        dir2 = 2
+      endif
+c
+c     write(6,*) "in trace"
+c
+c     do  ic=ifirst-4,ilast+4
+c       write(6,*) "ic,state, flat =",ic,
+c    &         tracergt(ic,1),tracergt(ic,2),
+c    &         tracergt(ic,3),tracergt(ic,4),
+c         call flush(6)
+c     enddo
+
+c***********************************************************************
+c     ******************************************************************
+c     * check for inflection points in characteristic speeds
+c     * compute slopes at cell edges
+c     * zero slopes if neighboring cells have different loading
+c     ******************************************************************
+      do ie=ifirst+1-FACEG,ilast+FACEG
+        do k=1,NEQU
+          edgslope(ie,k)=tracergt(ie,k)-tracelft(ie,k)
+        enddo
+      enddo
+c     ******************************************************************
+c     * limit slopes
+c     ******************************************************************
+      do i=1,NEQU
+        do ic=ifirst-CELLG,ilast+CELLG
+          celslope(ic,i)=zero
+        enddo
+      enddo
+      if (igdnv.eq.2) then
+c       write(6,*) "second-order slopes"
+c       ****************************************************************
+c       * second-order slopes
+c       ****************************************************************
+        do ic=ifirst+1-CELLG,ilast+CELLG-1
+           call flaten(ifirst,ilast,ic,mc,dir,tracergt,sound,flattn(ic))
+        enddo
+        do ic=ifirst+1-CELLG,ilast+CELLG-1
+c         call flaten(ifirst,ilast,ic,mc,dir,tracergt,sound,flattn)
+c         flattn=one
+          do i=1,NEQU
+            slope2=half*(edgslope(ic,i)+edgslope(ic+1,i))
+            celslope(ic,i)=half*(edgslope(ic,i)+edgslope(ic+1,i))
+            if (edgslope(ic,i)*edgslope(ic+1,i).le.zero) then
+              celslope(ic,i)=zero
+            else
+              bound=min(abs(edgslope(ic,i)),abs(edgslope(ic+1,i)))
+              celslope(ic,i)=sign(min(two*bound,abs(slope2)),slope2)
+c             celslope(ic,i)=flattn*celslope(ic,i)
+              celslope(ic,i)=flattn(ic)*celslope(ic,i)
+            endif
+c            write(6,*) "i,ic,celslope= ", i,ic,celslope(ic,i)
+c            call flush(6)
+          enddo
+        enddo
+      else if (igdnv.eq.4) then
+c       write(6,*) "fourth-order slopes"
+c       ****************************************************************
+c       * fourth-order slopes
+c       ****************************************************************
+        do ic=ifirst+1-CELLG,ilast+CELLG-1
+           call flaten(ifirst,ilast,ic,mc,dir,tracergt,sound,flattn(ic))
+        enddo
+        do ic=ifirst+2-CELLG,ilast+CELLG-2
+c         call flaten(ifirst,ilast,ic,mc,dir,tracergt,sound,flattn)
+c         flattn=one
+          do i=1,NEQU
+            slope4=fourth*(tracergt(ic+2,i)-tracergt(ic-2,i))
+            celslope(ic,i)=half*(edgslope(ic,i)+edgslope(ic+1,i))
+            coef4=third*(four*celslope(ic,i)-slope4)
+            if (edgslope(ic,i)*edgslope(ic+1,i).le.zero .or.
+     &      coef4*celslope(ic,i).lt.zero) then
+              celslope(ic,i)=zero
+            else
+              bound=min(abs(edgslope(ic,i)),abs(edgslope(ic+1,i)))
+              celslope(ic,i)=sign(min(two*bound,abs(coef4)),coef4)
+c             celslope(ic,i)=flattn(ic)*celslope(ic,i)
+            endif
+          enddo
+        enddo
+      endif
+c     ******************************************************************
+c     * characteristic projection
+c     ******************************************************************
+      do ic=ifirst-FACEG+1,ilast+FACEG
+        dtdx=dt/dx
+        rho = max(smallr,tracergt(ic,1))
+        u = tracergt(ic,dir1)
+        v = tracergt(ic,dir2)
+        p = tracergt(ic,NEQU)
+        drho = celslope(ic,1)
+        du = celslope(ic,dir1)
+        dv = celslope(ic,dir2)
+        dp = celslope(ic,NEQU)
+ 
+        ceigv = sound(ic)
+        csq = ceigv**2
+ 
+        alpham  = half*(dp/(rho*ceigv) - du)*rho/ceigv
+        alphap  = half*(dp/(rho*ceigv) + du)*rho/ceigv
+        alpha0r = drho - dp/csq
+        alpha0v = dv
+ 
+        if ((u-ceigv).gt.0) then
+           spminus = -one
+           smminus = (u-ceigv)*dtdx
+        else
+           spminus = (u-ceigv)*dtdx
+           smminus = one
+        endif
+        if ((u+ceigv).gt.0) then
+           spplus = -one
+           smplus = (u+ceigv)*dtdx
+        else
+           spplus = (u+ceigv)*dtdx
+           smplus = one
+        endif
+        if ((u).gt.0) then
+           spzero = -one
+           smzero = u*dtdx
+        else
+           spzero = u*dtdx
+           smzero = one
+        endif
+        apright  = half*(-one - spplus )*alphap
+        amright  = half*(-one - spminus)*alpham
+        azrright = half*(-one - spzero )*alpha0r
+        azv1rght = half*(-one - spzero )*alpha0v
+        tracergt(ic,1) = rho + apright + amright + azrright
+        tracergt(ic,1) = max(smallr,tracergt(ic,1))
+        tracergt(ic,dir1) = u + (apright - amright)*ceigv/rho
+        tracergt(ic,dir2) = v + azv1rght
+        tracergt(ic,NEQU) = p + (apright + amright)*csq
+ 
+        apleft  = half*(one - smplus )*alphap
+        amleft  = half*(one - smminus)*alpham
+        azrleft = half*(one - smzero )*alpha0r
+        azv1left = half*(one - smzero )*alpha0v
+        tracelft(ic+1,1) = rho + apleft + amleft + azrleft
+        tracelft(ic+1,1) = max(smallr,tracelft(ic+1,1))
+        tracelft(ic+1,dir1) = u + (apleft - amleft)*ceigv/rho
+        tracelft(ic+1,dir2) = v + azv1left
+        tracelft(ic+1,NEQU) = p + (apleft + amleft)*csq
+      enddo
+c      call flush(6)
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/3d/avgint.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/3d/avgint.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,591 @@
+c
+c  File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/test/performance/Euler/fortran/3d/avgint.m4 $
+c  Package:     SAMRAI applications
+c  Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+c  Revision:    $LastChangedRevision: 3894 $
+c  Modified:    $LastChangedDate: 2010-05-10 15:24:14 -0700 (Mon, 10 May 2010) $
+c  Description: F77 routines for conservative interlevel transfer of velocity 
+c               and pressure for 3d euler equations.
+c
+define(NDIM,3)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+include(FORTDIR/../amrflaten.i)dnl
+c
+define(coarsen_index,`dnl
+      if ($1.lt.0) then
+         $2=($1+1)/$3-1
+      else
+         $2=$1/$3
+      endif
+')dnl
+define(coarse_fine_cell_deltas,`dnl
+      do ir$1=0,ratio($1)-1
+         deltax(ir$1,$1)=(dble(ir$1)+half)*dxf($1)-dxc($1)*half
+      enddo
+')dnl
+define(muscl_limited_conserved_slopes,`dnl
+      do ie$1=ifirstc$1,ilastc$1+1
+         diff$1(ie$1)=conservc($2)
+     &               -conservc($3)
+      enddo
+      do ic$1=ifirstc$1,ilastc$1
+         coef2=half*(diff$1(ic$1+1)+diff$1(ic$1))
+         bound=two*min(abs(diff$1(ic$1+1)),abs(diff$1(ic$1)))
+         if (diff$1(ic$1)*diff$1(ic$1+1).gt.zero) then
+            slope$1($4)=sign(min(abs(coef2),bound),coef2)
+     &                  /dxc($1)
+         else
+            slope$1($4)=zero
+         endif
+         slope$1($4)=slope$1($4)*flat$1($4)
+      enddo
+')dnl
+c
+c***********************************************************************
+c Conservative linear interpolation for 3d flux variables.
+c***********************************************************************
+c
+      subroutine conservlinint3d(
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  ratio,dxc,dxf,
+     &  gamma,
+     &  densc,densf,
+     &  velc,presc,
+     &  velf,presf,
+     &  conservc,
+     &  tflat,tflat2,sound,mc,
+     &  tdensc,tpresc,tvelc,
+     &  flat0,flat1,flat2,
+     &  diff0,slope0,diff1,slope1,diff2,slope2)
+c***********************************************************************
+      implicit none
+      REAL zero,half,one,two
+      parameter (zero=0.0d0)
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+      parameter (two=2.d0)
+c
+      integer
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2
+      integer ratio(0:NDIM-1)
+      REAL
+     &  dxc(0:NDIM-1),
+     &  dxf(0:NDIM-1),
+     &  gamma
+      REAL
+     &  densc(CELL3d(cilo,cihi,0)),
+     &  densf(CELL3d(filo,fihi,0)),
+     &  velc(CELL3d(cilo,cihi,0),0:NDIM-1),
+     &  presc(CELL3d(cilo,cihi,0))
+      REAL 
+     &  velf(CELL3d(filo,fihi,0),0:NDIM-1),
+     &  presf(CELL3d(filo,fihi,0))
+      REAL
+     &  conservc(CELL3d(ifirstc,ilastc,1)),
+     &  flat0(CELL3d(ifirstc,ilastc,0)),
+     &  flat1(CELL3d(ifirstc,ilastc,0)),
+     &  flat2(CELL3d(ifirstc,ilastc,0)),
+     &  diff0(ifirstc0:ilastc0+1),
+     &  slope0(CELL3d(ifirstc,ilastc,0)),
+     &  diff1(ifirstc1:ilastc1+1),
+     &  slope1(CELL3d(ifirstc,ilastc,0)),
+     &  diff2(ifirstc2:ilastc2+1),
+     &  slope2(CELL3d(ifirstc,ilastc,0))
+      REAL
+     &  deltax(0:15,0:NDIM-1)
+      integer mc
+      REAL
+     &  tdensc(0:mc-1),tpresc(0:mc-1),tvelc(0:mc-1)
+      REAL
+     &  tflat(0:mc-1),tflat2(0:mc-1),sound(0:mc-1)
+
+      integer id,ic0,ic1,ic2,ie0,ie1,ie2,if0,if1,if2,ir0,ir1,ir2,it
+      REAL coef2,bound,val,valinv,
+     &  deltax1,deltax2,v2norm
+      logical presneg
+c
+c***********************************************************************
+c
+
+      presneg = .false.
+
+coarse_fine_cell_deltas(0)dnl
+
+coarse_fine_cell_deltas(1)dnl
+
+coarse_fine_cell_deltas(2)dnl
+
+c
+c     compute the flatten coefficients to further limit the slopes
+c
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            do ic0=ifirstc0-1,ilastc0+1
+               it = ic0-cilo0
+               tdensc(it) = densc(ic0,ic1,ic2)
+               tpresc(it) = presc(ic0,ic1,ic2)
+               tvelc(it)  = velc(ic0,ic1,ic2,0)
+            enddo
+            call amrflaten(ifirstc0,ilastc0,cilo0,cihi0,mc,gamma,
+     &                     tdensc,tpresc,tvelc,tflat,tflat2,sound)
+            do ic0=ifirstc0,ilastc0
+                 flat0(ic0,ic1,ic2) = tflat(ic0-ifirstc0)
+            enddo
+         enddo
+      enddo
+
+      do ic0=ifirstc0,ilastc0
+         do ic2=ifirstc2,ilastc2
+            do ic1=ifirstc1-1,ilastc1+1
+               it = ic1-cilo1
+               tdensc(it) = densc(ic0,ic1,ic2)
+               tpresc(it) = presc(ic0,ic1,ic2)
+               tvelc(it)  = velc(ic0,ic1,ic2,1)
+            enddo
+            call amrflaten(ifirstc1,ilastc1,cilo1,cihi1,mc,gamma,
+     &                     tdensc,tpresc,tvelc,tflat,tflat2,sound)
+            do ic1=ifirstc1,ilastc1
+                 flat1(ic0,ic1,ic2) = tflat(ic1-ifirstc1)
+            enddo
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+            do ic2=ifirstc2-1,ilastc2+1
+               it = ic2-cilo2
+               tdensc(it) = densc(ic0,ic1,ic2)
+               tpresc(it) = presc(ic0,ic1,ic2)
+               tvelc(it)  = velc(ic0,ic1,ic2,2)
+            enddo
+            call amrflaten(ifirstc2,ilastc2,cilo2,cihi2,mc,gamma,
+     &                  tdensc,tpresc,tvelc,tflat,tflat2,sound)
+            do ic2=ifirstc2,ilastc2
+                 flat2(ic0,ic1,ic2) = tflat(ic2-ifirstc2)
+            enddo
+         enddo
+      enddo
+
+c
+c
+
+c
+c construct fine velocity values using conservative linear 
+c interpolation on momentum
+c
+      do id=0,NDIM-1
+
+         do ic2=ifirstc2-1,ilastc2+1
+            do ic1=ifirstc1-1,ilastc1+1
+               do ic0=ifirstc0-1,ilastc0+1
+                  conservc(ic0,ic1,ic2) = 
+     &            densc(ic0,ic1,ic2)*velc(ic0,ic1,ic2,id) 
+               enddo
+            enddo
+         enddo
+
+         do ic2=ifirstc2,ilastc2
+            do ic1=ifirstc1,ilastc1
+muscl_limited_conserved_slopes(0,`ie0,ic1,ic2',`ie0-1,ic1,ic2',`ic0,ic1,ic2')dnl
+            enddo
+         enddo
+
+         do ic2=ifirstc2,ilastc2
+            do ic0=ifirstc0,ilastc0
+muscl_limited_conserved_slopes(1,`ic0,ie1,ic2',`ic0,ie1-1,ic2',`ic0,ic1,ic2')dnl
+            enddo
+         enddo
+
+         do ic1=ifirstc1,ilastc1
+            do ic0=ifirstc0,ilastc0
+muscl_limited_conserved_slopes(2,`ic0,ic1,ie2',`ic0,ic1,ie2-1',`ic0,ic1,ic2')dnl
+            enddo
+         enddo
+
+         do if2=ifirstf2,ilastf2
+coarsen_index(if2,ic2,ratio(2))dnl
+            ir2=if2-ic2*ratio(2)
+            deltax2=deltax(ir2,2)
+            do if1=ifirstf1,ilastf1
+coarsen_index(if1,ic1,ratio(1))dnl
+               ir1=if1-ic1*ratio(1)
+               deltax1=deltax(ir1,1)
+               do if0=ifirstf0,ilastf0
+coarsen_index(if0,ic0,ratio(0))dnl
+                  ir0=if0-ic0*ratio(0)
+                  velf(if0,if1,if2,id)=(conservc(ic0,ic1,ic2)
+     &                        + slope0(ic0,ic1,ic2)*deltax(ir0,0)
+     &                        + slope1(ic0,ic1,ic2)*deltax1
+     &                        + slope2(ic0,ic1,ic2)*deltax2)
+     &                        / densf(if0,if1,if2)
+             enddo
+           enddo
+         enddo
+
+      enddo
+
+c
+c construct fine pressure values using conservative linear 
+c interpolation on energy
+c
+      val = (gamma-one) 
+      valinv = one/(gamma-one) 
+
+      do ic2=ifirstc2-1,ilastc2+1
+         do ic1=ifirstc1-1,ilastc1+1
+            do ic0=ifirstc0-1,ilastc0+1
+               v2norm = velc(ic0,ic1,ic2,0)**2
+     &                + velc(ic0,ic1,ic2,1)**2
+     &                + velc(ic0,ic1,ic2,2)**2
+               conservc(ic0,ic1,ic2) = presc(ic0,ic1,ic2)*valinv
+     &                               + half*densc(ic0,ic1,ic2)*v2norm
+            enddo
+         enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+muscl_limited_conserved_slopes(0,`ie0,ic1,ic2',`ie0-1,ic1,ic2',`ic0,ic1,ic2')dnl
+         enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic0=ifirstc0,ilastc0
+muscl_limited_conserved_slopes(1,`ic0,ie1,ic2',`ic0,ie1-1,ic2',`ic0,ic1,ic2')dnl
+         enddo
+      enddo
+
+      do ic1=ifirstc1,ilastc1
+         do ic0=ifirstc0,ilastc0
+muscl_limited_conserved_slopes(2,`ic0,ic1,ie2',`ic0,ic1,ie2-1',`ic0,ic1,ic2')dnl
+         enddo
+      enddo
+
+      do if2=ifirstf2,ilastf2
+coarsen_index(if2,ic2,ratio(2))dnl
+         ir2=if2-ic2*ratio(2)
+         deltax2=deltax(ir2,2)
+         do if1=ifirstf1,ilastf1
+coarsen_index(if1,ic1,ratio(1))dnl
+            ir1=if1-ic1*ratio(1)
+            deltax1=deltax(ir1,1)
+            do if0=ifirstf0,ilastf0
+coarsen_index(if0,ic0,ratio(0))dnl
+               ir0=if0-ic0*ratio(0)
+               v2norm = velf(if0,if1,if2,0)**2
+     &                + velf(if0,if1,if2,1)**2
+     &                + velf(if0,if1,if2,2)**2
+               presf(if0,if1,if2) = ((conservc(ic0,ic1,ic2)
+     &                            + slope0(ic0,ic1,ic2)*deltax(ir0,0)
+     &                            + slope1(ic0,ic1,ic2)*deltax1
+     &                            + slope2(ic0,ic1,ic2)*deltax2)
+     &                     - half*densf(if0,if1,if2)*v2norm) * val
+            if (presf(if0,if1,if2).lt.zero) then
+c             write(6,*) "IN conservlinint3d"
+c             write(6,*) "gamma,val,valinv = ",
+c    &                      gamma,val,valinv
+c               write(6,*) "ifirstf0,ilastf0 ",ifirstf0,ilastf0,
+c    &                     ", ifirstf1,ilastf1 ",ifirstf1,ilastf1
+c    &                     ", ifirstf2,ilastf2 ",ifirstf2,ilastf2
+c               write(6,*) "if0,if1,if2 ",if0,if,if21
+c               write(6,*) "ic0,ic1,if2 ",ic0,ic,if21
+c               write(6,*) "fine energy = ",
+c    &   conservc(ic0,ic1,ic2) + slope0(ic0,ic1,ic2)*deltax(ir0,0)
+c    &                     +  slope1(ic0,ic1,ic2)*deltax1
+c    &                     +  slope2(ic0,ic1,ic2)*deltax2
+c               write(6,*) "densf(if0,if1,if2) ",densf(if0,if1,if2)
+c               write(6,*) "vel() ",velf(if0,if1,if2,0),
+c    &                              velf(if0,if1,if2,1),
+c    &                              velf(if0,if1,if2,2)
+c               write(6,*) "presf(if0,if1,if2) ",presf(if0,if1,if2)
+c               write(6,*) "conservc(",ic0,ic1,ic2,") ",
+c    &                      conservc(ic0,ic1,ic2)
+c               write(6,*) "slope0(",ic0,ic1,ic2,") ",
+c    &                      slope0(ic0,ic1,ic2)
+c               write(6,*) "deltax(",ir0,0,") ",deltax(ir0,0)
+c               write(6,*) "slope1(",ic0,ic1,ic2,") ",
+c    &                      slope1(ic0,ic1,ic2)
+c               write(6,*) "deltax1(",ir1,1,") ",deltax1
+c               write(6,*) "slope2(",ic0,ic1,ic2,") ",
+c    &                      slope2(ic0,ic1,ic2)
+c               write(6,*) "deltax2(",ir2,2,") ",deltax2
+c               write(6,*) "val ",val,", v2norm ",v2norm
+c               write(6,*) "presc(",ic0,ic1,ic2,") ",presc(ic0,ic1,ic2)
+c               write(6,*) "densc(",ic0,ic1,ic2,") ",densc(ic0,ic1,ic2)
+c               write(6,*) "velc() ",velc(ic0,ic1,ic2,0),
+c    &                               velc(ic0,ic1,ic2,1),
+c    &                               velc(ic0,ic1,ic2,2)
+                presneg = .true.
+            endif
+          enddo
+        enddo
+      enddo
+
+      if (presneg) then
+        write(6,*) "negative pressure reported in conservlinint3d"
+c       write(6,*) "coarse conserved values"
+c       do ic2=ifirstc2-1,ilastc2+1
+c          do ic1=ifirstc1-1,ilastc1+1
+c             do ic0=ifirstc0-1,ilastc0+1
+c                write(6,*) "ic0,ic1,ic2,conservc = ",
+c    &                       ic0,ic1,ic2,conservc(ic0,ic1,ic2)
+c             enddo
+c          enddo
+c       enddo
+c       write(6,*) "coarse density values"
+c       do ic2=ifirstc2-1,ilastc2+1
+c          do ic1=ifirstc1-1,ilastc1+1
+c             do ic0=ifirstc0-1,ilastc0+1
+c                write(6,*) "ic0,ic1,ic2,densc = ",
+c    &                       ic0,ic1,ic2,densc(ic0,ic1,ic2)
+c             enddo
+c          enddo
+c       enddo
+c       write(6,*) "coarse velocity0 values"
+c       do ic2=ifirstc2-1,ilastc2+1
+c          do ic1=ifirstc1-1,ilastc1+1
+c             do ic0=ifirstc0-1,ilastc0+1
+c                write(6,*) "ic0,ic1,ic2,velc = ",
+c    &                       ic0,ic1,ic2,velc(ic0,ic1,ic2,0)
+c             enddo
+c          enddo
+c       enddo
+c       write(6,*) "coarse velocity1 values"
+c       do ic2=ifirstc2-1,ilastc2+1
+c          do ic1=ifirstc1-1,ilastc1+1
+c             do ic0=ifirstc0-1,ilastc0+1
+c                write(6,*) "ic0,ic1,ic2,velc = ",
+c    &                       ic0,ic1,ic2,velc(ic0,ic1,ic2,1)
+c             enddo
+c          enddo
+c       enddo
+c       write(6,*) "coarse velocity2 values"
+c       do ic2=ifirstc2-1,ilastc2+1
+c          do ic1=ifirstc1-1,ilastc1+1
+c             do ic0=ifirstc0-1,ilastc0+1
+c                write(6,*) "ic0,ic1,ic2,velc = ",
+c    &                       ic0,ic1,ic2,velc(ic0,ic1,ic2,2)
+c             enddo
+c          enddo
+c       enddo
+c       write(6,*) "coarse pressure values"
+c       do ic2=ifirstc2-1,ilastc2+1
+c          do ic1=ifirstc1-1,ilastc1+1
+c             do ic0=ifirstc0-1,ilastc0+1
+c                write(6,*) "ic0,ic1,ic2,presc = ",
+c    &                       ic0,ic1,ic2,presc(ic0,ic1,ic2)
+c             enddo
+c          enddo
+c       enddo
+c       write(6,*) "fine density values"
+c       do if2=ifirstf2,ilastf2
+c          do if1=ifirstf1,ilastf1
+c             do if0=ifirstf0,ilastf0
+c                write(6,*) "if0,if1,if2,densf = ",
+c    &           if0,if1,if2,densf(if0,if1,if2)
+c             enddo
+c          enddo
+c       enddo
+c       write(6,*) "fine velocity0 values"
+c       do if2=ifirstf2,ilastf2
+c          do if1=ifirstf1,ilastf1
+c             do if0=ifirstf0,ilastf0
+c                write(6,*) "if0,if1,if2,velf = ",
+c    &           if0,if1,if2,velf(if0,if1,if2,0)
+c             enddo
+c          enddo
+c       enddo
+c       write(6,*) "fine velocity1 values"
+c       do if2=ifirstf2,ilastf2
+c          do if1=ifirstf1,ilastf1
+c             do if0=ifirstf0,ilastf0
+c                write(6,*) "if0,if1,if2,velf = ",
+c    &           if0,if1,if2,velf(if0,if1,if2,1)
+c             enddo
+c          enddo
+c       enddo
+c       write(6,*) "fine velocity2 values"
+c       do if2=ifirstf2,ilastf2
+c          do if1=ifirstf1,ilastf1
+c             do if0=ifirstf0,ilastf0
+c                write(6,*) "if0,if1,if2,velf = ",
+c    &           if0,if1,if2,velf(if0,if1,if2,2)
+c             enddo
+c          enddo
+c       enddo
+	stop
+      endif
+c
+      return
+      end
+c
+c
+c***********************************************************************
+c Volume weighted averaging for 3d flux variables.
+c***********************************************************************
+c
+      subroutine conservavg3d(
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2,
+     &  ratio,dxf,dxc,
+     &  gamma,
+     &  densf,densc,
+     &  velf,presf,
+     &  velc,presc,
+     &  conservf)
+c***********************************************************************
+      implicit none
+      REAL zero,half,one 
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.d0)
+c
+      integer
+     &  ifirstf0,ifirstf1,ifirstf2,ilastf0,ilastf1,ilastf2,
+     &  ifirstc0,ifirstc1,ifirstc2,ilastc0,ilastc1,ilastc2,
+     &  filo0,filo1,filo2,fihi0,fihi1,fihi2,
+     &  cilo0,cilo1,cilo2,cihi0,cihi1,cihi2
+      integer ratio(0:NDIM-1)
+      REAL
+     &  dxf(0:NDIM-1),
+     &  dxc(0:NDIM-1),
+     &  gamma
+      REAL
+     &  densf(CELL3d(filo,fihi,0)),
+     &  densc(CELL3d(cilo,cihi,0)),
+     &  velf(CELL3d(filo,fihi,0),0:NDIM-1),
+     &  presf(CELL3d(filo,fihi,0))
+      REAL
+     &  velc(CELL3d(cilo,cihi,0),0:NDIM-1),
+     &  presc(CELL3d(cilo,cihi,0))
+      REAL
+     &  conservf(CELL3d(ifirstf,ilastf,0))
+      integer ic0,ic1,ic2,if0,if1,if2,ir0,ir1,ir2,id
+      REAL dVf,dVc,val,valinv,v2norm
+c
+c***********************************************************************
+c
+      dVf = dxf(0)*dxf(1)*dxf(2)
+      dVc = dxc(0)*dxc(1)*dxc(2)
+c
+c construct coarse velocity values using conservative average
+c of momentum
+c
+      do id=0,NDIM-1
+
+         do if2=ifirstf2,ilastf2
+            do if1=ifirstf1,ilastf1
+               do if0=ifirstf0,ilastf0
+                  conservf(if0,if1,if2) = 
+     &            densf(if0,if1,if2)*velf(if0,if1,if2,id)
+               enddo
+            enddo
+         enddo
+
+         do ic2=ifirstc2,ilastc2
+            do ic1=ifirstc1,ilastc1
+               do ic0=ifirstc0,ilastc0
+                  velc(ic0,ic1,ic2,id) = zero
+               enddo
+            enddo
+         enddo
+
+         do ir2=0,ratio(2)-1
+            do ir1=0,ratio(1)-1
+               do ir0=0,ratio(0)-1
+                  do ic2=ifirstc2,ilastc2
+                     if2=ic2*ratio(2)+ir2
+                     do ic1=ifirstc1,ilastc1
+                        if1=ic1*ratio(1)+ir1
+                        do ic0=ifirstc0,ilastc0
+                           if0=ic0*ratio(0)+ir0
+                           velc(ic0,ic1,ic2,id) = velc(ic0,ic1,ic2,id)
+     &                     + conservf(if0,if1,if2)*dVf
+                        enddo
+                     enddo
+                  enddo
+               enddo
+            enddo
+         enddo
+
+         do ic2=ifirstc2,ilastc2
+            do ic1=ifirstc1,ilastc1
+               do ic0=ifirstc0,ilastc0
+                  velc(ic0,ic1,ic2,id) = velc(ic0,ic1,ic2,id)
+     &                                 / (densc(ic0,ic1,ic2)*dVc)
+               enddo
+            enddo
+         enddo
+
+      enddo
+
+c
+c construct coarse velocity values using conservative average
+c of energy
+c
+      val = (gamma-one)
+      valinv = one/(gamma-one)
+
+      do if2=ifirstf2,ilastf2
+         do if1=ifirstf1,ilastf1
+            do if0=ifirstf0,ilastf0
+               v2norm = velf(if0,if1,if2,0)**2
+     &                + velf(if0,if1,if2,1)**2
+     &                + velf(if0,if1,if2,2)**2
+               conservf(if0,if1,if2) = presf(if0,if1,if2)*valinv
+     &                               + half*densf(if0,if1,if2)*v2norm
+            enddo
+         enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            do ic0=ifirstc0,ilastc0
+               presc(ic0,ic1,ic2) = zero
+            enddo
+         enddo
+      enddo
+
+      do ir2=0,ratio(2)-1
+         do ir1=0,ratio(1)-1
+            do ir0=0,ratio(0)-1
+               do ic2=ifirstc2,ilastc2
+                  if2=ic2*ratio(2)+ir2
+                  do ic1=ifirstc1,ilastc1
+                     if1=ic1*ratio(1)+ir1
+                     do ic0=ifirstc0,ilastc0
+                        if0=ic0*ratio(0)+ir0
+                        presc(ic0,ic1,ic2) = presc(ic0,ic1,ic2)
+     &                  + conservf(if0,if1,if2)*dVf
+                     enddo
+                  enddo
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do ic2=ifirstc2,ilastc2
+         do ic1=ifirstc1,ilastc1
+            do ic0=ifirstc0,ilastc0
+               v2norm = velc(ic0,ic1,ic2,0)**2
+     &                + velc(ic0,ic1,ic2,1)**2
+     &                + velc(ic0,ic1,ic2,2)**2
+               presc(ic0,ic1,ic2) = ((presc(ic0,ic1,ic2)/dVc)
+     &         - half*densc(ic0,ic1,ic2)*v2norm) * val 
+            enddo
+         enddo
+      enddo
+
+
+c
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/3d/flaten1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/3d/flaten1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,3 @@
+define(NEQU,5)dnl
+define(REAL,`double precision')dnl
+include(FORTDIR/../flaten.i)dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/3d/flux.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/3d/flux.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,335 @@
+define(NDIM,3)dnl
+define(NEQU,5)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+include(FORTDIR/m4flux.i)dnl
+
+      subroutine fluxcorrec2d(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  dx,gamma,idir,
+     &  density,velocity,pressure,
+     &  flux0,flux1,flux2,
+     &  tracelft0,tracelft1,tracelft2,
+     &  tracergt0,tracergt1,tracergt2,
+     &  ttracelft0,ttracelft1,ttracelft2,
+     &  ttracergt0,ttracergt1,ttracergt2)
+c***********************************************************************
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL dt 
+      integer idir
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     gamma,
+     &     density(CELL3d(ifirst,ilast,CELLG)),
+     &     velocity(CELL3d(ifirst,ilast,CELLG),0:NDIM-1),
+     &     pressure(CELL3d(ifirst,ilast,CELLG)),
+c
+     &     flux0(FACE3d0(ifirst,ilast,FLUXG),NEQU), 
+     &     flux1(FACE3d1(ifirst,ilast,FLUXG),NEQU), 
+     &     flux2(FACE3d2(ifirst,ilast,FLUXG),NEQU), 
+c
+     &     tracelft0(FACE3d0(ifirst,ilast,FACEG),NEQU),
+     &     tracelft1(FACE3d1(ifirst,ilast,FACEG),NEQU),
+     &     tracelft2(FACE3d2(ifirst,ilast,FACEG),NEQU),
+     &     tracergt0(FACE3d0(ifirst,ilast,FACEG),NEQU),
+     &     tracergt1(FACE3d1(ifirst,ilast,FACEG),NEQU),
+     &     tracergt2(FACE3d2(ifirst,ilast,FACEG),NEQU),
+c
+     &     ttracelft0(FACE3d0(ifirst,ilast,FACEG),NEQU),
+     &     ttracelft1(FACE3d1(ifirst,ilast,FACEG),NEQU),
+     &     ttracelft2(FACE3d2(ifirst,ilast,FACEG),NEQU),
+     &     ttracergt0(FACE3d0(ifirst,ilast,FACEG),NEQU),
+     &     ttracergt1(FACE3d1(ifirst,ilast,FACEG),NEQU),
+     &     ttracergt2(FACE3d2(ifirst,ilast,FACEG),NEQU)
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2,k
+      REAL trnsvers(NEQU)
+c     REAL ttvlft(NEQU),ttvrgt(NEQU)     
+      REAL ttv(NEQU)
+      REAL v2norm,rho,vel1,vel2,vel0,gam_min_one
+c     write(6,*) "In fluxcorrec2d()"
+      if (FLUXG.lt.1) then
+         write(6,*) "flux ghosts < 1!"
+	 stop
+      endif
+c    
+      gam_min_one = gamma - one
+c
+c  "Forward" computation of transverse flux terms
+c
+      if (idir.eq.1) then
+c
+correc_flux2d(0,`ic1,ic2',1,`ic2,ic0',2)dnl
+c
+correc_flux2d(1,`ic2,ic0',0,`ic1,ic2',2)dnl
+c
+correc_flux2d(2,`ic0,ic1',0,`ic1,ic2',1)dnl
+c
+c  "Backward" computation of transverse flux terms
+c
+      elseif (idir.eq.-1) then
+c
+correc_flux2d(0,`ic1,ic2',2,`ic0,ic1',1)dnl
+c
+correc_flux2d(1,`ic2,ic0',2,`ic0,ic1',0)dnl
+c
+correc_flux2d(2,`ic0,ic1',1,`ic2,ic0',0)dnl
+c
+      endif
+c
+      return
+      end   
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine fluxcorrec3d(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  dx,
+     &  gamma,density,velocity,pressure,
+     &  fluxa0,fluxa1,fluxa2,
+     &  fluxb0,fluxb1,fluxb2,
+     &  tracelft0,tracelft1,tracelft2,
+     &  tracergt0,tracergt1,tracergt2)
+c***********************************************************************
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL dt 
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     gamma,
+     &     density(CELL3d(ifirst,ilast,CELLG)),
+     &     velocity(CELL3d(ifirst,ilast,CELLG),0:NDIM-1),
+     &     pressure(CELL3d(ifirst,ilast,CELLG)),
+     &     fluxa0(FACE3d0(ifirst,ilast,FLUXG),NEQU),
+     &     fluxa1(FACE3d1(ifirst,ilast,FLUXG),NEQU), 
+     &     fluxa2(FACE3d2(ifirst,ilast,FLUXG),NEQU), 
+     &     fluxb0(FACE3d0(ifirst,ilast,FLUXG),NEQU),
+     &     fluxb1(FACE3d1(ifirst,ilast,FLUXG),NEQU), 
+     &     fluxb2(FACE3d2(ifirst,ilast,FLUXG),NEQU), 
+     &     tracelft0(FACE3d0(ifirst,ilast,FACEG),NEQU),
+     &     tracergt0(FACE3d0(ifirst,ilast,FACEG),NEQU),
+     &     tracelft1(FACE3d1(ifirst,ilast,FACEG),NEQU),
+     &     tracergt1(FACE3d1(ifirst,ilast,FACEG),NEQU),
+     &     tracelft2(FACE3d2(ifirst,ilast,FACEG),NEQU),
+     &     tracergt2(FACE3d2(ifirst,ilast,FACEG),NEQU)
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2,k
+      REAL trnsvers(NEQU)
+c     REAL ttvlft(NEQU),ttvrgt(NEQU)     
+      REAL ttv(NEQU)
+      REAL v2norm,rho,vel1,vel2,vel0,gam_min_one 
+c
+      if (FLUXG.lt.1) then
+         write(6,*) "flux ghosts < 1!"
+	 stop
+      endif
+     
+c     ******************************************************************
+c     * complete tracing at cell edges
+c     ******************************************************************
+      gam_min_one = gamma - one
+c         
+correc_flux3d(2,0,1,a0,a1,`ic1,ic2',`ic2,ic0')dnl
+c         
+correc_flux3d(1,2,0,a2,b0,`ic0,ic1',`ic1,ic2')dnl
+c         
+correc_flux3d(0,1,2,b1,b2,`ic2,ic0',`ic0,ic1')dnl
+c   
+      return
+      end   
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine fluxcalculation(dt,xcell0,xcell1,visco,dx,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  gamma,rpchoice,
+     &  density,velocity,pressure,
+     &  flux0,flux1,flux2,
+     &  trlft0,trlft1,trlft2,
+     &  trrgt0,trrgt1,trrgt2)
+     
+c***********************************************************************
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer xcell0,xcell1,visco,rpchoice
+      REAL dt,dx(0:NDIM-1),gamma 
+c variables in 2d cell indexed         
+      REAL
+     &     density(CELL3d(ifirst,ilast,CELLG)),
+     &     velocity(CELL3d(ifirst,ilast,CELLG),NDIM),
+     &     pressure(CELL3d(ifirst,ilast,CELLG))
+c variables in 2d side indexed         
+      REAL
+     &     flux0(FACE3d0(ifirst,ilast,FLUXG),NEQU),
+     &     flux1(FACE3d1(ifirst,ilast,FLUXG),NEQU), 
+     &     flux2(FACE3d2(ifirst,ilast,FLUXG),NEQU), 
+     &     trlft0(FACE3d0(ifirst,ilast,FACEG),NEQU),
+     &     trrgt0(FACE3d0(ifirst,ilast,FACEG),NEQU),
+     &     trlft1(FACE3d1(ifirst,ilast,FACEG),NEQU),
+     &     trrgt1(FACE3d1(ifirst,ilast,FACEG),NEQU),
+     &     trlft2(FACE3d2(ifirst,ilast,FACEG),NEQU),
+     &     trrgt2(FACE3d2(ifirst,ilast,FACEG),NEQU)
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2,ie0,ie1,ie2,j
+      REAL   stateL(NEQU),stateR(NEQU),
+     &       riemst(NEQU)
+      REAL mom0,mom1,mom2,Hent,v2norm,vel(0:NDIM-1)
+      REAL mom0L,mom1L,mom2L,enerL,mom0R,mom1R,mom2R,enerR
+      REAL maxeig, vcoef,vcorr(NEQU),gam_min_one
+c
+c variables for hllc scheme
+      REAL aLsq,aRsq,keL,keR,flux(NEQU),diff(NEQU)
+      REAL mfL,mfR,star(NEQU),sL,sM,sR
+      REAL w,omw,hat(NEQU+1),denom
+c
+      if (FLUXG.lt.1) then
+         write(6,*) "flux ghosts < 1!"
+	stop
+      endif
+c
+c***********************************************************************
+c solve riemann problems for conservative flux
+c  arguments: ( axis for RP, other axis, extra cells-direction)
+c***********************************************************************
+c      
+      gam_min_one = gamma-one
+
+c     write(6,*) "in fluxcalculation..."
+c     write(6,*) "ifirst = ",ifirst0,ifirst1,ifirst2
+c     write(6,*) "ilast = ",ilast0,ilast1,ilast2
+c     write(6,*) "xcell0,xcell1 = ",xcell0,xcell1
+c     write(6,*) "visco = ",visco
+c     write(6,*) "gamma = ",gamma
+c     write(6,*) "rpchoice = ",rpchoice
+c     write(6,*) "gam_min_one = ",gam_min_one
+c     call flush(6)
+riemann_solve(0,1,2,`ic1,ic2',(xcell0+FLUXG-1),(xcell1+FLUXG-1))dnl
+
+c
+riemann_solve(1,0,2,`ic2,ic0',(xcell0+FLUXG-1),(xcell1+FLUXG-1))dnl
+
+c
+riemann_solve(2,0,1,`ic0,ic1',(xcell0+FLUXG-1),(xcell1+FLUXG-1))dnl
+
+      if (visco.eq.1) then
+c     write(6,*) "doing artificial viscosity"
+c
+artificial_viscosity1(0,1,2)dnl
+c
+artificial_viscosity1(1,2,0)dnl
+c
+artificial_viscosity1(2,0,1)dnl
+c
+      endif
+      return
+      end 
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+  
+      subroutine consdiff(ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  dx,
+     &  flux0,flux1,flux2,
+     &  gamma,density,velocity,pressure)
+c***********************************************************************
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+      integer ifirst0, ilast0,ifirst1, ilast1,ifirst2,ilast2
+      REAL dx(0:NDIM-1)
+      REAL
+     &     flux0(FACE3d0(ifirst,ilast,FLUXG),NEQU),
+     &     flux1(FACE3d1(ifirst,ilast,FLUXG),NEQU),
+     &     flux2(FACE3d2(ifirst,ilast,FLUXG),NEQU),
+     &     gamma,
+     &     density(CELL3d(ifirst,ilast,CELLG)),
+     &     velocity(CELL3d(ifirst,ilast,CELLG),NDIM),
+     &     pressure(CELL3d(ifirst,ilast,CELLG))
+c
+      integer ic0,ic1,ic2,k
+      REAL temp,v2norm,mom(NDIM),energy,
+     &     gam_min_one
+      
+c***********************************************************************
+c update conserved to full time
+c note the permutation of indices in 2nd, 3rd coordinate directions
+c***********************************************************************
+      gam_min_one = gamma - one
+
+      do ic2=ifirst2,ilast2
+         do ic1=ifirst1,ilast1
+           do ic0=ifirst0,ilast0
+             mom(1) = density(ic0,ic1,ic2)*velocity(ic0,ic1,ic2,1)
+             mom(2) = density(ic0,ic1,ic2)*velocity(ic0,ic1,ic2,2)
+             mom(3) = density(ic0,ic1,ic2)*velocity(ic0,ic1,ic2,3)
+             v2norm = (velocity(ic0,ic1,ic2,1)**2+
+     &                 velocity(ic0,ic1,ic2,2)**2+
+     &                 velocity(ic0,ic1,ic2,3)**2)
+             energy = pressure(ic0,ic1,ic2)/gam_min_one +
+     &                        half*density(ic0,ic1,ic2)*v2norm
+ 
+             density(ic0,ic1,ic2) = density(ic0,ic1,ic2)
+     &          -(flux0(ic0+1,ic1,ic2,1)-flux0(ic0,ic1,ic2,1))/dx(0)
+     &          -(flux1(ic1+1,ic2,ic0,1)-flux1(ic1,ic2,ic0,1))/dx(1)
+     &          -(flux2(ic2+1,ic0,ic1,1)-flux2(ic2,ic0,ic1,1))/dx(2)
+             density(ic0,ic1,ic2) = max(smallr,density(ic0,ic1,ic2))
+
+             do k=1,3
+               mom(k) = mom(k)
+     &          -(flux0(ic0+1,ic1,ic2,k+1)-flux0(ic0,ic1,ic2,k+1))/dx(0)
+     &          -(flux1(ic1+1,ic2,ic0,k+1)-flux1(ic1,ic2,ic0,k+1))/dx(1)
+     &          -(flux2(ic2+1,ic0,ic1,k+1)-flux2(ic2,ic0,ic1,k+1))/dx(2)
+               velocity(ic0,ic1,ic2,k) = mom(k)/density(ic0,ic1,ic2)
+             enddo
+             energy = energy
+     &        -(flux0(ic0+1,ic1,ic2,NEQU)-flux0(ic0,ic1,ic2,NEQU))/dx(0)
+     &        -(flux1(ic1+1,ic2,ic0,NEQU)-flux1(ic1,ic2,ic0,NEQU))/dx(1)
+     &        -(flux2(ic2+1,ic0,ic1,NEQU)-flux2(ic2,ic0,ic1,NEQU))/dx(2)
+c      
+             v2norm = (velocity(ic0,ic1,ic2,1)**2+
+     &            velocity(ic0,ic1,ic2,2)**2+velocity(ic0,ic1,ic2,3)**2)
+             temp = energy - half*density(ic0,ic1,ic2)*v2norm
+             pressure(ic0,ic1,ic2) = gam_min_one*temp
+             pressure(ic0,ic1,ic2) = max(smallr,pressure(ic0,ic1,ic2))
+           enddo
+         enddo
+      enddo
+c
+      return
+      end
+c***********************************************************************
+include(FORTDIR/../gas1d_approxrp.i)dnl
+include(FORTDIR/../gas1d_exactrp.i)dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/3d/fluxcorner.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/3d/fluxcorner.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,215 @@
+define(NDIM,3)dnl
+define(NEQU,5)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+include(FORTDIR/m4fluxcorner.i)dnl
+
+      subroutine onethirdstate(dt,dx,idir,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  gamma,density,velocity,pressure,
+     &  flux0,flux1,flux2,
+     &  st3)
+c***********************************************************************
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************     
+c input arrays:
+      integer idir,ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL dt 
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:NDIM-1), gamma
+c variables in 3d cell indexed         
+      REAL
+     &     density(CELL3d(ifirst,ilast,CELLG)),
+     &     velocity(CELL3d(ifirst,ilast,CELLG),0:NDIM-1),
+     &     pressure(CELL3d(ifirst,ilast,CELLG)),
+     &     flux0(FACE3d0(ifirst,ilast,FLUXG),NEQU),
+     &     flux1(FACE3d1(ifirst,ilast,FLUXG),NEQU),
+     &     flux2(FACE3d2(ifirst,ilast,FLUXG),NEQU),
+     &     st3(CELL3d(ifirst,ilast,CELLG),NEQU)
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2,k
+      REAL trnsvers(NEQU)
+c     REAL ttvlft(NEQU),ttvrgt(NEQU)     
+      REAL ttv(NEQU)
+      REAL v2norm,rho,vel1,vel2,vel0,pres,
+     &     gam_min_one
+c
+      if (FLUXG.lt.1) then
+         write(6,*) "flux ghosts < 1!"
+	stop
+      endif
+     
+c     ******************************************************************
+c     * complete tracing at cell edges
+c     ******************************************************************
+      gam_min_one = gamma - one
+c
+      if (idir.eq.0) then
+c         
+st_third(0,1,2,`ic1,ic2')dnl
+c
+      elseif (idir.eq.1) then
+c         
+st_third(1,2,0,`ic2,ic0')dnl
+c
+      elseif (idir.eq.2) then
+c         
+st_third(2,0,1,`ic0,ic1')dnl
+c
+      endif
+      return
+      end   
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine fluxthird(dt,dx,idir,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  gamma,rpchoice,
+     &  density,velocity,pressure,
+     &  st3,
+     &  flux0,flux1,flux2 )
+     
+c***********************************************************************
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer idir,ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL dt,dx(0:NDIM-1),gamma 
+      integer rpchoice
+      REAL
+     &     density(CELL3d(ifirst,ilast,CELLG)),
+     &     velocity(CELL3d(ifirst,ilast,CELLG),0:NDIM-1),
+     &     pressure(CELL3d(ifirst,ilast,CELLG))
+c variables in 2d side indexed         
+      REAL
+     &     flux0(FACE3d0(ifirst,ilast,FLUXG),NEQU),
+     &     flux1(FACE3d1(ifirst,ilast,FLUXG),NEQU),
+     &     flux2(FACE3d2(ifirst,ilast,FLUXG),NEQU),
+     &     st3(CELL3d(ifirst,ilast,CELLG),NEQU)
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2
+      REAL   stateL(4),stateR(4),
+     &       riemst(4)
+      REAL mom2,mom1,mom0,Hent,v2norm,vel(0:3-1),
+     &     gam_min_one
+c
+      if (FLUXG.lt.1) then
+         write(6,*) "flux ghosts < 1!"
+	stop
+      endif
+c
+c***********************************************************************
+c solve riemann problems for conservative flux
+c  arguments: ( axis for RP, other axis, extra cells-direction)
+c***********************************************************************
+c      
+      gam_min_one = gamma - one
+c
+      if (idir.eq.0) then
+c
+f_third(1,0,2,`ic2,ic0',`ic0,ic1-1,ic2')dnl
+c
+f_third(2,0,1,`ic0,ic1',`ic0,ic1,ic2-1')dnl
+c
+      elseif (idir.eq.1) then
+c
+f_third(0,1,2,`ic1,ic2',`ic0-1,ic1,ic2')dnl
+c
+f_third(2,1,0,`ic0,ic1',`ic0,ic1,ic2-1')dnl
+c
+      elseif (idir.eq.2) then
+c
+f_third(1,2,0,`ic2,ic0',`ic0,ic1-1,ic2')dnl
+c
+f_third(0,2,1,`ic1,ic2',`ic0-1,ic1,ic2')dnl
+c
+      endif
+c
+      return
+      end 
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine fluxcorrecjt(dt,dx,idir,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  gamma,density,velocity,pressure,
+     &  flux0,flux1,flux2,
+     &  tracelft0,tracelft1,tracelft2,
+     &  tracergt0,tracergt1,tracergt2)
+c***********************************************************************
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer idir,ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL dt 
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:3-1)
+c variables in 2d cell indexed         
+      REAL
+     &     density(CELL3d(ifirst,ilast,CELLG)),
+     &     velocity(CELL3d(ifirst,ilast,CELLG),0:NDIM-1),
+     &     pressure(CELL3d(ifirst,ilast,CELLG)),
+     &     flux0(FACE3d0(ifirst,ilast,FLUXG),NEQU),
+     &     flux1(FACE3d1(ifirst,ilast,FLUXG),NEQU),
+     &     flux2(FACE3d2(ifirst,ilast,FLUXG),NEQU),
+     &     tracelft0(FACE3d0(ifirst,ilast,FACEG),NEQU),
+     &     tracergt0(FACE3d0(ifirst,ilast,FACEG),NEQU),
+     &     tracelft1(FACE3d1(ifirst,ilast,FACEG),NEQU),
+     &     tracergt1(FACE3d1(ifirst,ilast,FACEG),NEQU),
+     &     tracelft2(FACE3d2(ifirst,ilast,FACEG),NEQU),
+     &     tracergt2(FACE3d2(ifirst,ilast,FACEG),NEQU)
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2,k
+      REAL trnsvers(NEQU)
+c     REAL ttvlft(NEQU),ttvrgt(NEQU)     
+      REAL ttv(NEQU)
+      REAL v2norm,rho,vel1,vel2,vel0,gamma,
+     &     gam_min_one
+c
+      if (FLUXG.lt.1) then
+         write(6,*) "flux ghosts < 1!"
+	stop
+      endif
+     
+c     ******************************************************************
+c     * complete tracing at cell edges
+c     ******************************************************************
+      gam_min_one = gamma - one
+c
+      if (idir.eq.0) then
+c
+correc_fluxjt(0,2,1,`ic2,ic0',`ic0,ic1')dnl
+c
+      elseif (idir.eq.1) then
+c
+correc_fluxjt(1,0,2,`ic0,ic1',`ic1,ic2')dnl
+c
+      elseif (idir.eq.2) then
+c
+correc_fluxjt(2,1,0,`ic1,ic2',`ic2,ic0')dnl
+c
+      endif
+c
+      return
+      end   
+c
+c***********************************************************************
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/3d/grad.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/3d/grad.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,424 @@
+define(NDIM,3)dnl
+define(NEQU,5)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine detectgrad(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  vghost0,tagghost0,ttagghost0,
+     &  vghost1,tagghost1,ttagghost1,
+     &  vghost2,tagghost2,ttagghost2,
+     &  dx,
+     &  gradtol,
+     &  dotag,donttag,
+     &  var,
+     &  tags,temptags)
+c***********************************************************************
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+c input arrays:
+      integer
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  dotag,donttag,
+     &  vghost0,vghost1,vghost2,
+     &  tagghost0,tagghost1,tagghost2,
+     &  ttagghost0,ttagghost1,ttagghost2
+      REAL
+     &  dx(0:NDIM-1),
+     &  gradtol
+c variables indexed as 3dimensional
+      REAL
+     &  var(CELL3dVECG(ifirst,ilast,vghost))
+      integer
+     &  tags(CELL3dVECG(ifirst,ilast,tagghost)),
+     &  temptags(CELL3dVECG(ifirst,ilast,ttagghost))
+c
+      REAL tol
+      REAL facejump, loctol
+      REAL presm1,presp1
+      REAL diag(0:NDIM-1),diag012 
+      logical tagcell
+      integer ic0,ic1,ic2
+c
+c***********************************************************************
+c
+      tol = gradtol
+      diag(0) = sqrt(dx(2)**2+dx(1)**2)
+      diag(1) = sqrt(dx(0)**2+dx(2)**2)
+      diag(2) = sqrt(dx(0)**2+dx(1)**2)
+      diag012= sqrt(dx(0)**2+dx(1)**2+dx(2)**2)
+
+      do ic2=ifirst2,ilast2
+        do ic1=ifirst1,ilast1
+          do ic0=ifirst0,ilast0
+
+            if (tags(ic0,ic1,ic2) .ne. 0) then
+              loctol = 0.125*tol
+            else 
+              loctol = tol
+            endif
+     
+            tagcell = .false.
+  
+            presm1 = var(ic0-1,ic1,ic2)
+            presp1 = var(ic0+1,ic1,ic2)
+            facejump = abs(var(ic0,ic1,ic2)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+            tagcell = ((facejump).gt.(loctol*dx(0)))
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1-1,ic2)
+              presp1 = var(ic0,ic1+1,ic2)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*dx(1)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1,ic2-1)
+              presp1 = var(ic0,ic1,ic2+1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*dx(2)))
+            endif
+
+
+c   2Dimensional diagonals
+
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1-1,ic2-1)
+              presp1 = var(ic0,ic1+1,ic2+1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag(0)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1+1,ic2-1)
+              presp1 = var(ic0,ic1-1,ic2+1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag(0)))
+            endif
+  
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1,ic2-1)
+              presp1 = var(ic0+1,ic1,ic2+1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag(1)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1,ic2+1)
+              presp1 = var(ic0+1,ic1,ic2-1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag(1)))
+            endif
+
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1-1,ic2)
+              presp1 = var(ic0+1,ic1+1,ic2)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag(2)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1+1,ic2)
+              presp1 = var(ic0+1,ic1-1,ic2)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag(2)))
+            endif
+
+c   End 2Dimensional diagonals
+c   3Dimensional diagonals
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1-1,ic2-1)
+              presp1 = var(ic0+1,ic1+1,ic2+1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag012))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1-1,ic2+1)
+              presp1 = var(ic0+1,ic1+1,ic2-1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag012))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1+1,ic2-1)
+              presp1 = var(ic0+1,ic1-1,ic2+1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag012))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1+1,ic2+1)
+              presp1 = var(ic0+1,ic1-1,ic2-1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag012))
+            endif
+
+c   End 3Dimensional diagonals
+
+            if ( tagcell ) then
+              temptags(ic0,ic1,ic2) = dotag
+            endif
+          enddo
+        enddo
+      enddo
+      return
+      end
+
+      subroutine detectshock(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  vghost0,tagghost0,ttagghost0,
+     &  vghost1,tagghost1,ttagghost1,
+     &  vghost2,tagghost2,ttagghost2,
+     &  dx,
+     &  gradtol,gradonset,
+     &  dotag,donttag,
+     &  var,
+     &  tags,temptags)
+c***********************************************************************
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+c input arrays:
+      integer
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  dotag,donttag,
+     &  vghost0,vghost1,vghost2,
+     &  tagghost0,tagghost1,tagghost2,
+     &  ttagghost0,ttagghost1,ttagghost2
+      REAL
+     &  dx(0:NDIM-1),
+     &  gradtol,gradonset
+c variables indexed as 3dimensional
+      REAL
+     &  var(CELL3dVECG(ifirst,ilast,vghost))
+      integer
+     &  tags(CELL3dVECG(ifirst,ilast,tagghost)),
+     &  temptags(CELL3dVECG(ifirst,ilast,ttagghost))
+c
+      REAL tol,onset
+      REAL jump1, jump2, facejump, loctol,locon
+      REAL presm1,presm2,presp1,presp2
+      REAL diag(0:NDIM-1),diag012 
+      logical tagcell
+      integer ic0,ic1,ic2
+c
+c***********************************************************************
+c
+      tol = gradtol
+      onset = gradonset
+      diag(0) = sqrt(dx(2)**2+dx(1)**2)
+      diag(1) = sqrt(dx(0)**2+dx(2)**2)
+      diag(2) = sqrt(dx(0)**2+dx(1)**2)
+      diag012= sqrt(dx(0)**2+dx(1)**2+dx(2)**2)
+
+      do ic2=ifirst2,ilast2
+        do ic1=ifirst1,ilast1
+          do ic0=ifirst0,ilast0
+
+            if (tags(ic0,ic1,ic2) .ne. 0) then
+              loctol = 0.125*tol
+              locon = 0.66*onset
+            else 
+              loctol = tol
+              locon = onset
+            endif
+     
+            tagcell = .false.
+  
+            presm1 = var(ic0-1,ic1,ic2)
+            presm2 = var(ic0-2,ic1,ic2)
+            presp1 = var(ic0+1,ic1,ic2)
+            presp2 = var(ic0+2,ic1,ic2)
+            jump2 = presp2-presm2
+            jump1 = presp1-presm1
+            facejump = abs(var(ic0,ic1,ic2)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+            tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                ((jump1*jump2).lt.zero)).and.
+     &               ((facejump).gt.(loctol*dx(0))))
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1-1,ic2)
+              presm2 = var(ic0,ic1-2,ic2)
+              presp1 = var(ic0,ic1+1,ic2)
+              presp2 = var(ic0,ic1+2,ic2)
+              jump2 = presp2-presm2
+              jump1 = presp1-presm1
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                    ((jump1*jump2).lt.zero)).and.
+     &                   ((facejump).gt.(loctol*dx(1)))) 
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1,ic2-1)
+              presm2 = var(ic0,ic1,ic2-2)
+              presp1 = var(ic0,ic1,ic2+1)
+              presp2 = var(ic0,ic1,ic2+2)
+              jump2 = presp2-presm2
+              jump1 = presp1-presm1
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*dx(2)))) 
+            endif
+
+
+c   2Dimensional diagonals
+
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1-1,ic2-1)
+              presp1 = var(ic0,ic1+1,ic2+1)
+              presm2 = var(ic0,ic1-2,ic2-2)
+              presp2 = var(ic0,ic1+2,ic2+2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                    ((jump1*jump2).lt.zero)).and.
+     &                   ((facejump).gt.(loctol*diag(0))))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1+1,ic2-1)
+              presp1 = var(ic0,ic1-1,ic2+1)
+              presm2 = var(ic0,ic1+2,ic2-2)
+              presp2 = var(ic0,ic1-2,ic2+2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                    ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag(0))))
+            endif
+  
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1,ic2-1)
+              presp1 = var(ic0+1,ic1,ic2+1)
+              presm2 = var(ic0-2,ic1,ic2-2)
+              presp2 = var(ic0+2,ic1,ic2+2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag(1))))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1,ic2+1)
+              presp1 = var(ic0+1,ic1,ic2-1)
+              presm2 = var(ic0-2,ic1,ic2+2)
+              presp2 = var(ic0+2,ic1,ic2-2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                    ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag(1))))
+            endif
+
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1-1,ic2)
+              presp1 = var(ic0+1,ic1+1,ic2)
+              presm2 = var(ic0-2,ic1-2,ic2)
+              presp2 = var(ic0+2,ic1+2,ic2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                    ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag(2))))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1+1,ic2)
+              presp1 = var(ic0+1,ic1-1,ic2)
+              presm2 = var(ic0-2,ic1+2,ic2)
+              presp2 = var(ic0+2,ic1-2,ic2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag(2))))
+            endif
+
+c   End 2Dimensional diagonals
+c   3Dimensional diagonals
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1-1,ic2-1)
+              presp1 = var(ic0+1,ic1+1,ic2+1)
+              presm2 = var(ic0-2,ic1-2,ic2-2)
+              presp2 = var(ic0+2,ic1+2,ic2+2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                   ((facejump).gt.(loctol*diag012)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1-1,ic2+1)
+              presp1 = var(ic0+1,ic1+1,ic2-1)
+              presm2 = var(ic0-2,ic1-2,ic2+2)
+              presp2 = var(ic0+2,ic1+2,ic2-2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag012)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1+1,ic2-1)
+              presp1 = var(ic0+1,ic1-1,ic2+1)
+              presm2 = var(ic0-2,ic1+2,ic2-2)
+              presp2 = var(ic0+2,ic1-2,ic2+2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                   ((facejump).gt.(loctol*diag012)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1+1,ic2+1)
+              presp1 = var(ic0+1,ic1-1,ic2-1)
+              presm2 = var(ic0-2,ic1+2,ic2+2)
+              presp2 = var(ic0+2,ic1-2,ic2-2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag012)))
+            endif
+
+c   End 3Dimensional diagonals
+
+            if ( tagcell ) then
+              temptags(ic0,ic1,ic2) = dotag
+            endif
+          enddo
+        enddo
+      enddo
+      return
+      end
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/3d/init.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/3d/init.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,212 @@
+define(NDIM,3)dnl
+define(NEQU,5)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine eulerinit(data_problem,dx,xlo,xhi,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  gcw0,gcw1,gcw2,
+     &  gamma,
+     &  density,velocity,pressure,
+     &  nintervals,front,
+     &  i_dens,i_vel,i_pres)
+c***********************************************************************
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer gcw0,gcw1,gcw2
+      integer data_problem 
+      integer nintervals
+      REAL front(1:nintervals)
+      REAL
+     &     dx(0:NDIM-1),xlo(0:NDIM-1),xhi(0:NDIM-1),gamma
+      REAL i_dens(1:nintervals),
+     &     i_vel(0:NDIM-1,1:nintervals),
+     &     i_pres(1:nintervals)
+c variables in 3d cell indexed         
+      REAL
+     &     density(CELL3dVECG(ifirst,ilast,gcw)),
+     &     velocity(CELL3dVECG(ifirst,ilast,gcw),0:NDIM-1),
+     &     pressure(CELL3dVECG(ifirst,ilast,gcw))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2,dir,ifr
+      REAL xc(0:NDIM-1)
+c
+c   dir 0 two linear states (L,R) indp of y,z
+c   dir 1 two linear states (L,R) indp of x,z
+c   dir 2 two linear states (L,R) indp of x,y
+
+c     write(6,*) "Inside eulerinit"
+c     write(6,*) "data_problem= ",data_problem
+c     write(6,*) "dx= ",dx(0), dx(1), dx(2)
+c     write(6,*) "xlo= ",xlo(0), xlo(1),xhi(2)
+c     write(6,*) "xhi= ",xhi(0), xhi(1),xhi(2)
+c     write(6,*) "ifirst= ",ifirst0,ifirst1,ifirst2
+c     write(6,*) "ilast= ",ilast0,ilast1,ilast2
+c     write(6,*) "gamma= ",gamma
+c     call flush(6)
+
+      dir = 0
+      if (data_problem.eq.PIECEWISE_CONSTANT_X) then
+         dir = 0
+      else if (data_problem.eq.PIECEWISE_CONSTANT_Y) then
+         dir = 1
+      else if (data_problem.eq.PIECEWISE_CONSTANT_Z) then
+         dir = 2
+      endif
+
+      if (dir.eq.0) then
+         ifr = 1
+         do ic0=ifirst0,ilast0
+            xc(0) = xlo(0)+ dx(0)*(dble(ic0-ifirst0)+half)
+            if (xc(dir).gt.front(ifr)) then
+               ifr = ifr+1
+            endif
+            do ic1=ifirst1,ilast1
+               do ic2=ifirst2,ilast2
+                  density(ic0,ic1,ic2) = i_dens(ifr)
+                  velocity(ic0,ic1,ic2,0) = i_vel(0,ifr)
+                  velocity(ic0,ic1,ic2,1) = i_vel(1,ifr)
+                  velocity(ic0,ic1,ic2,2) = i_vel(2,ifr)
+                  pressure(ic0,ic1,ic2) = i_pres(ifr)
+               enddo
+            enddo
+         enddo
+      else if (dir.eq.1) then
+         ifr = 1
+         do ic1=ifirst1,ilast1
+            xc(1) = xlo(1)+ dx(1)*(dble(ic1-ifirst1)+half)
+            if (xc(dir).gt.front(ifr)) then
+               ifr = ifr+1
+            endif
+            do ic2=ifirst2,ilast2
+               do ic0=ifirst0,ilast0
+                  density(ic0,ic1,ic2) = i_dens(ifr)
+                  velocity(ic0,ic1,ic2,0) = i_vel(0,ifr)
+                  velocity(ic0,ic1,ic2,1) = i_vel(1,ifr)
+                  velocity(ic0,ic1,ic2,2) = i_vel(2,ifr)
+                  pressure(ic0,ic1,ic2) = i_pres(ifr)
+              enddo
+           enddo
+         enddo
+      else if (dir.eq.2) then
+         ifr = 1
+         do ic2=ifirst2,ilast2
+            xc(2) = xlo(2)+ dx(2)*(dble(ic2-ifirst2)+half)
+            if (xc(dir).gt.front(ifr)) then
+               ifr = ifr+1
+            endif
+            do ic1=ifirst1,ilast1
+               do ic0=ifirst0,ilast0
+                  density(ic0,ic1,ic2) = i_dens(ifr)
+                  velocity(ic0,ic1,ic2,0) = i_vel(0,ifr)
+                  velocity(ic0,ic1,ic2,1) = i_vel(1,ifr)
+                  velocity(ic0,ic1,ic2,2) = i_vel(2,ifr)
+                  pressure(ic0,ic1,ic2) = i_pres(ifr)
+              enddo
+           enddo
+         enddo
+      endif
+c
+      return
+      end   
+c
+c***********************************************************************
+c
+c    Initialization routine where we use a spherical profile 
+c
+c***********************************************************************
+      subroutine eulerinitsphere(data_problem,dx,xlo,xhi,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  gcw0,gcw1,gcw2,
+     &  gamma,
+     &  density,velocity,pressure,
+     &  i_dens,i_vel,i_pres,
+     &  o_dens,o_vel,o_pres,
+     &  center,radius)
+c***********************************************************************
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer gcw0,gcw1,gcw2
+      integer data_problem
+      REAL i_dens,i_vel(0:NDIM-1),i_pres,
+     &     o_dens,o_vel(0:NDIM-1),o_pres
+      REAL center(0:NDIM-1),radius
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:NDIM-1),xlo(0:NDIM-1),xhi(0:NDIM-1),gamma
+c variables in 2d cell indexed         
+      REAL
+     &     density(CELL3dVECG(ifirst,ilast,gcw)),
+     &     velocity(CELL3dVECG(ifirst,ilast,gcw),0:NDIM-1),
+     &     pressure(CELL3dVECG(ifirst,ilast,gcw))
+c
+c**********************************************************************     
+c
+      integer ic0,ic1,ic2
+      REAL xc(0:NDIM-1)
+      REAL angle,phi,rad2,rad3,x0,x1,x2
+c
+c     write(6,*) "Inside eulerinitsphere"
+c     write(6,*) "data_problem= ",data_problem
+c     write(6,*) "dx= ",dx(0), dx(1), dx(2)
+c     write(6,*) "xlo= ",xlo(0), xlo(1),xhi(2)
+c     write(6,*) "xhi= ",xhi(0), xhi(1),xhi(2)
+c     write(6,*) "ifirst= ",ifirst0,ifirst1,ifirst2
+c     write(6,*) "ilast= ",ilast0,ilast1,ilast2
+c     write(6,*) "gamma= ",gamma
+c     write(6,*) "front= ",front(0),front(1),front(2),front(3)
+c     write(6,*) "     = ",front(4),front(5)
+c     call flush(6)
+
+      do ic2=ifirst2,ilast2
+        xc(2) = xlo(2)+dx(2)*(dble(ic2-ifirst2)+half)
+        x2 = xc(2)-center(2)
+        do ic1=ifirst1,ilast1
+           xc(1) = xlo(1)+dx(1)*(dble(ic1-ifirst1)+half)
+           x1 = xc(1)-center(1)
+           do ic0=ifirst0,ilast0
+              xc(0) = xlo(0)+dx(0)*(dble(ic0-ifirst0)+half)
+              x0 = xc(0)-center(0)
+              if (x1.eq.zero .and. x0.eq.zero) then
+                angle = zero
+              else
+                angle = atan2(x1,x0)
+              endif
+              rad2 = sqrt(x0**2+x1**2)
+              if (rad2.eq.zero .and. x2.eq.zero) then
+                phi = zero
+              else
+                phi  = atan2(rad2,x2)
+              endif
+              rad3 = sqrt(rad2**2+x2**2)
+              if (rad3.lt.radius) then
+                 density(ic0,ic1,ic2)   = i_dens
+                 velocity(ic0,ic1,ic2,0)= i_vel(0)*sin(phi)*cos(angle)
+                 velocity(ic0,ic1,ic2,1)= i_vel(1)*sin(phi)*sin(angle)
+                 velocity(ic0,ic1,ic2,2)= i_vel(2)*cos(phi)
+                 pressure(ic0,ic1,ic2)  = i_pres
+              else
+                 density(ic0,ic1,ic2)   = o_dens
+                 velocity(ic0,ic1,ic2,0)= o_vel(0)*sin(phi)*cos(angle)
+                 velocity(ic0,ic1,ic2,1)= o_vel(1)*sin(phi)*sin(angle)
+                 velocity(ic0,ic1,ic2,2)= o_vel(2)*cos(phi)
+                 pressure(ic0,ic1,ic2)  = o_pres
+              endif
+           enddo
+        enddo
+      enddo
+      return
+      end   
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/3d/m4flux.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/3d/m4flux.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,364 @@
+define(riemann_solve,`dnl
+c     write(6,*) "checking onedr sol in riemann solve  "
+c     write(6,*) "         dt= ",dt
+
+      if (rpchoice.eq.APPROX_RIEM_SOLVE
+     &    .or. rpchoice.eq.EXACT_RIEM_SOLVE ) then
+c     ************************************************************
+c     *  Approximate Riemann solver and exact Riemann solver have
+c     *  identical setup and post-process phases.
+c     ************************************************************
+
+      do ic$3=ifirst$3-$6,ilast$3+$6
+         do ic$2=ifirst$2-$5,ilast$2+$5
+           do ie$1=ifirst$1-(FLUXG-1),ilast$1+1+(FLUXG-1)
+
+c          ************************************************************
+c          *  Assign left and right states.  Note only normal vel used.
+c          ************************************************************
+              stateL(1) = trlft$1(ie$1,$4,1)
+              stateL(2) = trlft$1(ie$1,$4,2+$1)
+              stateL(3) = trlft$1(ie$1,$4,NEQU)
+
+              stateR(1) = trrgt$1(ie$1,$4,1)
+              stateR(2) = trrgt$1(ie$1,$4,2+$1)
+              stateR(3) = trrgt$1(ie$1,$4,NEQU)
+
+              if (rpchoice.eq.APPROX_RIEM_SOLVE) then
+                 call gas1dapproxrp(gamma,stateL,stateR,riemst)
+              else if (rpchoice.eq.EXACT_RIEM_SOLVE) then
+                 call gas1dexactrp(gamma,smallr,stateL,stateR,riemst)
+              endif
+
+              if (riemst(2).le.zero) then
+                 vel($2)=trrgt$1(ie$1,$4,2+$2)
+                 vel($3)=trrgt$1(ie$1,$4,2+$3)
+              else
+                 vel($2)=trlft$1(ie$1,$4,2+$2)
+                 vel($3)=trlft$1(ie$1,$4,2+$3)
+              endif
+              vel($1)=riemst(2)
+
+              mom$1 =riemst(1)*vel($1)
+              v2norm = vel(0)**2+vel(1)**2+vel(2)**2
+              Hent =riemst(3)/gam_min_one+v2norm*riemst(1)/two
+
+              flux$1(ie$1,$4,1)= dt*mom$1
+              flux$1(ie$1,$4,2+$1)= dt*(mom$1*vel($1)+riemst(3))
+              flux$1(ie$1,$4,2+$2)= dt*mom$1*vel($2)
+              flux$1(ie$1,$4,2+$3)= dt*mom$1*vel($3)
+              flux$1(ie$1,$4,5)= dt*riemst(2)*(Hent+riemst(3))
+
+           enddo
+         enddo
+      enddo
+
+      elseif (rpchoice.eq.HLLC_RIEM_SOLVE) then
+c     ******************************************************************
+c     *  HLLC Riemann Solver
+c     ******************************************************************
+
+      do ic$3=ifirst$3-$6,ilast$3+$6
+         do ic$2=ifirst$2-$5,ilast$2+$5
+            do ie$1=ifirst$1-(FLUXG-1),ilast$1+1+(FLUXG-1)
+
+c           ************************************************************
+c           *  Assign left and right states.
+c           ************************************************************
+            do j=1,NEQU
+               stateL(j) = trlft$1(ie$1,$4,j)
+               stateR(j) = trrgt$1(ie$1,$4,j)
+            enddo
+
+c           ************************************************************
+c           *  Calculate bounding signal speeds. To do this, need the
+c           *  Roe-average of the velocity and sound speed.
+c           ************************************************************
+            w    = one / ( one + sqrt( stateR(1)/stateL(1) ) )
+            omw  = one - w
+            hat(2+$1) = w*stateL(2+$1) + omw*stateR(2+$1)
+            aLsq = gamma * stateL(NEQU) / stateL(1)
+            aRsq = gamma * stateR(NEQU) / stateR(1)
+            hat(NEQU+1) = sqrt( w*aLsq + omw*aRsq
+     &                 + half*gam_min_one*w*omw*(
+     &                     (stateR(2)-stateL(2))**2
+     &                   + (stateR(3)-stateL(3))**2
+     &                   + (stateR(4)-stateL(4))**2 ) )
+
+            sL  = min( stateL(2+$1) - sqrt(aLsq),
+     &                    hat(2+$1) - hat(NEQU+1) )
+            sR  = max( stateR(2+$1) + sqrt(aRsq),
+     &                    hat(2+$1) + hat(NEQU+1) )
+            mfL = stateL(1) * ( sL - stateL(2+$1) )
+            mfR = stateR(1) * ( sR - stateR(2+$1) )
+            sM  = ( stateR(NEQU) - stateL(NEQU)
+     &             + mfL*stateL(2+$1) - mfR*stateR(2+$1) )/(mfL-mfR)
+
+c           ************************************************************
+c           *  Calculate flux starting at upwind state.
+c           ************************************************************
+            if ( sM.gt.zero ) then
+
+c              *********************************************************
+c              * Flow is to the right; start from left state.
+c              *********************************************************
+               flux(1)   = stateL(1) * stateL(2+$1)
+               flux(2+$1) = flux(1) * stateL(2+$1) + stateL(NEQU)
+               flux(2+$2) = flux(1) * stateL(2+$2)
+               flux(2+$3) = flux(1) * stateL(2+$3)
+               keL = half * (stateL(2)**2 + stateL(3)**2 +
+     &                               stateL(4)**2)
+               flux(NEQU) = flux(1)
+     &                    * (aLsq / gam_min_one + keL)
+
+c              *********************************************************
+c              * Check if flow is subsonic.
+c              *********************************************************
+               if ( sL.lt.zero ) then
+
+c                 ******************************************************
+c                 * Add contribution from left acoustic wave.
+c                 ******************************************************
+                  denom = one / (sL-sM)
+                  star(1)    = stateL(1) * (sL-stateL(2+$1)) * denom
+                  star(2+$1) = sM
+                  star(2+$2) = stateL(2+$2)
+                  star(2+$3) = stateL(2+$3)
+                  star(NEQU) = stateL(NEQU)*( one + gamma * denom
+     &                                        * ( sM-stateL(2+$1) ) )
+     &                       + half * gam_min_one
+     &                              * star(1) * ( sM-stateL(2+$1) )**2
+
+                  diff(1) = star(1) - stateL(1)
+                  diff(2) = star(1)*star(2) - stateL(1)*stateL(2)
+                  diff(3) = star(1)*star(3) - stateL(1)*stateL(3)
+                  diff(4) = star(1)*star(4) - stateL(1)*stateL(4)
+                  diff(NEQU) = ( star(NEQU)-stateL(NEQU) )
+     &               / gam_min_one
+     &               + half * star(1) *
+     &                   (star(2)**2 + star(3)**2+ star(4)**2)
+     &               - stateL(1) * keL
+
+                  do j=1,NEQU
+                    flux(j) = flux(j) + sL*diff(j)
+                  enddo
+
+               endif
+
+            else
+
+c              *********************************************************
+c              *  Flow is to the left; start from right state.
+c              *********************************************************
+               flux(1)   = stateR(1) * stateR(2+$1)
+               flux(2+$1) = flux(1) * stateR(2+$1) + stateR(NEQU)
+               flux(2+$2) = flux(1) * stateR(2+$2)
+               flux(2+$3) = flux(1) * stateR(2+$3)
+               keR = half * (stateR(2)**2 + stateR(3)**2 +
+     &                               stateR(4)**2)
+               flux(NEQU) = flux(1)
+     &                    * (aRsq / gam_min_one + keR)
+
+c              *********************************************************
+c              * Check if flow is subsonic.
+c              *********************************************************
+               if ( sR.gt.zero ) then
+
+c                 ******************************************************
+c                 * Add contribution from right acoustic wave.
+c                 ******************************************************
+                  denom = one / (sR-sM)
+                  star(1)    = stateR(1) * (sR-stateR(2+$1)) * denom
+                  star(2+$1) = sM
+                  star(2+$2) = stateR(2+$2)
+                  star(2+$3) = stateR(2+$3)
+                  star(NEQU) = stateR(NEQU)*(1 + gamma * denom
+     &                                      * ( sM-stateR(2+$1) ) )
+     &                       + half * gam_min_one
+     &                              * star(1) * ( sM-stateR(2+$1) )**2
+
+                  diff(1) = star(1) - stateR(1)
+                  diff(2) = star(1)*star(2) - stateR(1)*stateR(2)
+                  diff(3) = star(1)*star(3) - stateR(1)*stateR(3)
+                  diff(4) = star(1)*star(4) - stateR(1)*stateR(4)
+                  diff(NEQU) = ( star(NEQU)-stateR(NEQU) )
+     &                       / gam_min_one
+     &                       + half * star(1) *
+     &                         (star(2)**2 + star(3)**2+ star(4)**2)
+     &                       - stateR(1) * keR
+
+                  do j=1,NEQU
+                     flux(j) = flux(j) + sR*diff(j)
+                  enddo
+
+               endif
+
+            endif
+
+c        ************************************************************
+c        *  Assign average interface fluxes.
+c        ************************************************************
+            do j=1,NEQU
+               flux$1(ie$1,$4,j) = dt * flux(j)
+            enddo
+
+            enddo
+         enddo
+      enddo
+
+      endif
+')dnl
+define(correc_flux2d,`dnl
+c   correct the $1-direction with $3-fluxes
+      do ic$5=ifirst$5-(FLUXG),ilast$5+(FLUXG)
+         do ic$3=ifirst$3-(FLUXG-1),ilast$3+(FLUXG-1)
+           do ic$1=ifirst$1-(FLUXG),ilast$1+(FLUXG)
+             rho  = density(ic0,ic1,ic2)
+             vel0 = velocity(ic0,ic1,ic2,0)
+             vel1 = velocity(ic0,ic1,ic2,1)
+             vel2 = velocity(ic0,ic1,ic2,2)
+             v2norm= vel0**2+vel1**2 +vel2**2
+             do k=1,NEQU
+               trnsvers(k)=
+     &           (flux$3(ic$3+1,$4,k)-flux$3(ic$3,$4,k))*0.5/dx($3)
+             enddo
+c
+             ttv(1)= trnsvers(1)
+             ttv(2)= (trnsvers(2) - vel0*trnsvers(1))/rho
+             ttv(3)= (trnsvers(3) - vel1*trnsvers(1))/rho
+             ttv(4)= (trnsvers(4) - vel2*trnsvers(1))/rho
+             ttv(NEQU)= (v2norm*half*trnsvers(1) -
+     &                vel0*trnsvers(2) - vel1*trnsvers(3) -
+     &                vel2*trnsvers(4) +
+     &                trnsvers(NEQU))*gam_min_one
+             do k=1,NEQU
+               ttracelft$1(ic$1+1,$2,k)=tracelft$1(ic$1+1,$2,k)
+     &                                    - ttv(k)
+               ttracergt$1(ic$1  ,$2,k)=tracergt$1(ic$1  ,$2,k)
+     &                                    - ttv(k)
+             enddo
+           enddo
+         enddo
+      enddo
+')dnl
+define(correc_flux3d,`dnl
+c   correct the $1-direction with $2$3-fluxes
+      do ic$1=ifirst$1-FLUXG,ilast$1+FLUXG
+         do ic$3=ifirst$3-(FLUXG-1),ilast$3+(FLUXG-1)
+           do ic$2=ifirst$2-(FLUXG-1),ilast$2+(FLUXG-1)
+             rho  = density(ic0,ic1,ic2)
+             vel0 = velocity(ic0,ic1,ic2,0)
+             vel1 = velocity(ic0,ic1,ic2,1)
+             vel2 = velocity(ic0,ic1,ic2,2)
+             v2norm= vel0**2+vel1**2 +vel2**2
+             do k=1,NEQU
+               trnsvers(k)=0.5*(
+     &          (flux$4(ic$2+1,$6,k)-flux$4(ic$2,$6,k))/dx($2)+
+     &          (flux$5(ic$3+1,$7,k)-flux$5(ic$3,$7,k))/dx($3))
+             enddo
+  
+             ttv(1)= trnsvers(1)
+             ttv(2)= (trnsvers(2) - vel0*trnsvers(1))/rho
+             ttv(3)= (trnsvers(3) - vel1*trnsvers(1))/rho
+             ttv(4)= (trnsvers(4) - vel2*trnsvers(1))/rho
+             ttv(NEQU)= (v2norm*half*trnsvers(1) -
+     &                vel0*trnsvers(2) - vel1*trnsvers(3) -
+     &                vel2*trnsvers(4) +
+     &                trnsvers(NEQU))*gam_min_one
+             do k=1,NEQU
+               tracelft$1(ic$1+1,ic$2,ic$3,k)=tracelft$1(ic$1+1,ic$2,ic$3,k)
+     &                                           - ttv(k)
+               tracergt$1(ic$1  ,ic$2,ic$3,k)=tracergt$1(ic$1  ,ic$2,ic$3,k)
+     &                                           - ttv(k)
+             enddo
+           enddo
+         enddo
+      enddo
+')dnl
+define(artificial_viscosity1,`dnl
+      do ic$3=ifirst$3-(FLUXG-1),ilast$3+(FLUXG-1)
+         do ic$2=ifirst$2-(FLUXG-1),ilast$2+(FLUXG-1)
+           do ie$1=ifirst$1-(FLUXG-1),ilast$1+(FLUXG)
+             maxeig =trrgt$1(ie$1,ic$2,ic$3,NEQU)-trlft$1(ie$1,ic$2,ic$3,NEQU)
+             vcoef = tenth*abs(maxeig)
+   
+             mom0L=trlft$1(ie$1,ic$2,ic$3,1)*trlft$1(ie$1,ic$2,ic$3,2)
+             mom1L=trlft$1(ie$1,ic$2,ic$3,1)*trlft$1(ie$1,ic$2,ic$3,3)
+             mom2L=trlft$1(ie$1,ic$2,ic$3,1)*trlft$1(ie$1,ic$2,ic$3,4)
+             v2norm = mom1L**2+mom0L**2+mom2L**2
+             enerL=trlft$1(ie$1,ic$2,ic$3,NEQU)/gam_min_one+
+     &                v2norm/(trlft$1(ie$1,ic$2,ic$3,1)*two)
+             mom0R=trrgt$1(ie$1,ic$2,ic$3,1)*trrgt$1(ie$1,ic$2,ic$3,2)
+             mom1R=trrgt$1(ie$1,ic$2,ic$3,1)*trrgt$1(ie$1,ic$2,ic$3,3)
+             mom2R=trrgt$1(ie$1,ic$2,ic$3,1)*trrgt$1(ie$1,ic$2,ic$3,4)
+             v2norm = mom1R**2+mom0R**2+mom2R**2
+             enerR=trrgt$1(ie$1,ic$2,ic$3,NEQU)/gam_min_one+
+     &             v2norm/(trrgt$1(ie$1,ic$2,ic$3,1)*two)
+
+             vcorr(1) = dt*vcoef*
+     &         (trrgt$1(ie$1,ic$2,ic$3,1)-trlft$1(ie$1,ic$2,ic$3,1))
+             vcorr(2) = dt*vcoef*(mom0R-mom0L)
+             vcorr(3) = dt*vcoef*(mom1R-mom1L)
+             vcorr(4) = dt*vcoef*(mom2R-mom2L)
+             vcorr(NEQU) = dt*vcoef*(enerR-enerL)
+             do j=1,NEQU
+                flux$1(ie$1,ic$2,ic$3,j)=flux$1(ie$1,ic$2,ic$3,j)
+     &                                   -vcorr(j)
+             enddo
+           enddo
+         enddo
+      enddo
+')dnl
+c
+define(artificial_viscosity2,`dnl
+      do ic1=ifirst1,ilast1
+        do ie0=ifirst0,ilast0+1
+          maxeig =pressure(ie0,ic1)-pressure(ie0-1,ic1)
+          vcoef = tenth*abs(maxeig)
+          mom0L=density(ie0-1,ic1,1)*velocity(ie0-1,ic1,0)
+          mom1L=density(ie0-1,ic1,1)*velocity(ie0-1,ic1,1)
+          mom0R=density(ie0  ,ic1,1)*velocity(ie0  ,ic1,0)
+          mom1R=density(ie0  ,ic1,1)*velocity(ie0  ,ic1,1)
+          v2norm = mom1L**2+mom0L**2
+          enerL=pressure(ie0-1,ic1)/gam_min_one+
+     &             v2norm/(density(ie0-1,ic1)*two)
+          v2norm = mom1R**2+mom0R**2
+          enerR=pressure(ie0,ic1)/gam_min_one+
+     &             v2norm/(density(ie0,ic1)*two)
+          vcorr(1)= dt*vcoef*(density(ie0,ic1)-density(ie0-1,ic1))
+          vcorr(2)= dt*vcoef*(mom0R-mom0L)
+          vcorr(3)= dt*vcoef*(mom1R-mom1L)
+          vcorr(4)= dt*vcoef*(mom2R-mom2L)
+          vcorr(NEQU)= dt*vcoef*(enerR-enerL)
+             do j=1,NEQU
+                flux0(ie0,ic1,ic2,j)=flux0(ie0,ic1,ic2,j)
+     &                                   -vcorr(j)
+             enddo
+        enddo
+      enddo
+      do ic0=ifirst0,ilast0
+        do ie1=ifirst1,ilast1+1
+          maxeig =pressure(ic0,ie1)-pressure(ic0-1,ie1)
+          vcoef = 0.1*abs(maxeig)
+          mom0L=density(ic0,ie1-1,1)*velocity(ic0,ie1-1,0)
+          mom1L=density(ic0,ie1-1,1)*velocity(ic0,ie1-1,1)
+          mom0R=density(ic0,ie1  ,1)*velocity(ic0,ie1  ,0)
+          mom1R=density(ic0,ie1  ,1)*velocity(ic0,ie1  ,1)
+          v2norm = mom1L**2+mom0L**2
+          enerL=pressure(ic0,ie1-1)/gam_min_one+
+     &             v2norm/(density(ic0,ie1-1)*two)
+          v2norm = mom1R**2+mom0R**2
+          enerR=pressure(ic0,ie1)/gam_min_one+
+     &             v2norm/(density(ic0,ie1)*two)
+          vcorr1= dt*vcoef*(density(ic0,ie1)-density(ic0,ie1-1))
+          vcorr2= dt*vcoef*(mom0R-mom0L)
+          vcorr3= dt*vcoef*(mom1R-mom1L)
+          vcorr4= dt*vcoef*(enerR-enerL)
+          flux1(ie1,ic0,1)= flux1(ie1,ic0,1) - vcorr1
+          flux1(ie1,ic0,2)= flux1(ie1,ic0,2) - vcorr2
+          flux1(ie1,ic0,3)= flux1(ie1,ic0,3) - vcorr3
+          flux1(ie1,ic0,4)= flux1(ie1,ic0,4) - vcorr4
+        enddo
+      enddo
+')dnl
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/3d/m4fluxcorner.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/3d/m4fluxcorner.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,236 @@
+define(st_third,`dnl
+      do ic$3=ifirst$3-FLUXG,ilast$3+FLUXG
+         do ic$2=ifirst$2-FLUXG,ilast$2+FLUXG
+           do ic$1=ifirst$1-(FLUXG-1),ilast$1+(FLUXG-1)
+             rho  = density(ic0,ic1,ic2)
+             vel0 = velocity(ic0,ic1,ic2,0)
+             vel1 = velocity(ic0,ic1,ic2,1)
+             vel2 = velocity(ic0,ic1,ic2,2)
+             pres = pressure(ic0,ic1,ic2)
+             v2norm= vel0**2+vel1**2 +vel2**2
+             do k=1,NEQU
+               trnsvers(k)=
+     &           (flux$1(ic$1+1,$4,k)-flux$1(ic$1,$4,k))/(3*dx($1))
+             enddo
+c
+             ttv(1)= trnsvers(1)
+             ttv(2)= (trnsvers(2) - vel0*trnsvers(1))/rho
+             ttv(3)= (trnsvers(3) - vel1*trnsvers(1))/rho
+             ttv(4)= (trnsvers(4) - vel2*trnsvers(1))/rho
+             ttv(NEQU)= (v2norm*half*trnsvers(1) -
+     &                vel0*trnsvers(2) - vel1*trnsvers(3) -
+     &                vel2*trnsvers(4) +
+     &                trnsvers(NEQU))*gam_min_one
+             st3(ic0,ic1,ic2,1)=rho -ttv(1)
+             st3(ic0,ic1,ic2,2)=vel0 -ttv(2)
+             st3(ic0,ic1,ic2,3)=vel1 -ttv(3)
+             st3(ic0,ic1,ic2,4)=vel2 -ttv(4)
+             st3(ic0,ic1,ic2,5)=pres -ttv(5)
+           enddo
+         enddo
+      enddo
+')dnl
+define(f_third,`dnl
+c     write(6,*) "checking onedr sol in riemann solve  "
+c     write(6,*) "         dt= ",dt
+      do ic$3=ifirst$3-FLUXG,ilast$3+FLUXG
+         do ic$2=ifirst$2-(FLUXG-1),ilast$2+(FLUXG-1)
+           do ic$1=ifirst$1-(FLUXG-1),ilast$1+FLUXG
+ 
+             stateL(1) = st3($5,1)
+             stateL(2) = st3($5,2+$1)
+             stateL(3) = st3($5,NEQU)
+             stateL(4) = stateL(3)/gam_min_one
+
+             stateR(1) = st3(ic0,ic1,ic2,1)
+             stateR(2) = st3(ic0,ic1,ic2,2+$1)
+             stateR(3) = st3(ic0,ic1,ic2,NEQU)
+             stateR(4) = stateR(3)/gam_min_one
+
+             if (rpchoice.eq.APPROX_RIEM_SOLVE) then
+                call gas1dapproxrp(gamma,stateL,stateR,riemst)
+             else if (rpchoice.eq.EXACT_RIEM_SOLVE) then
+                call gas1dexactrp(gamma,smallr,stateL,stateR,riemst)
+c            else if (rpchoice.eq.ROE_RIEM_SOLVE) then
+c            else if (rpchoice.eq.HLLC_RIEM_SOLVE) then
+             endif
+ 
+             if (riemst(2).le.zero) then
+               vel($2)=st3(ic0,ic1,ic2,2+$2)
+               vel($3)=st3(ic0,ic1,ic2,2+$3)
+             else
+               vel($2)=st3($5,2+$2)
+               vel($3)=st3($5,2+$3)
+             endif
+             vel($1)=riemst(2)
+
+             mom$1 =riemst(1)*vel($1)
+             v2norm = vel(0)**2+vel(1)**2+vel(2)**2
+             Hent =riemst(3)/gam_min_one+v2norm*riemst(1)/two
+             flux$1(ic$1,$4,1)= dt*mom$1
+             flux$1(ic$1,$4,2+$1)= dt*(mom$1*vel($1)+riemst(3))
+             flux$1(ic$1,$4,2+$2)= dt*mom$1*vel($2)
+             flux$1(ic$1,$4,2+$3)= dt*mom$1*vel($3)
+             flux$1(ic$1,$4,5)= dt*riemst(2)*(Hent+riemst(3))
+
+           enddo
+         enddo
+      enddo
+')dnl
+define(correc_fluxjt,`dnl
+c   correct the $2-direction with $3-fluxes
+      do ic$3=ifirst$3-(FLUXG-1),ilast$3+(FLUXG-1)
+        do ic$1=ifirst$1-(FLUXG-1),ilast$1+(FLUXG-1)
+           ic$2=ifirst$2-FLUXG
+           rho  = density(ic0,ic1,ic2)
+           vel0 = velocity(ic0,ic1,ic2,0)
+           vel1 = velocity(ic0,ic1,ic2,1)
+           vel2 = velocity(ic0,ic1,ic2,2)
+           v2norm= vel0**2+vel1**2 +vel2**2
+           do k=1,NEQU
+             trnsvers(k)=half*
+     &        (flux$3(ic$3+1,$4,k)-flux$3(ic$3,$4,k))/dx($3)
+           enddo
+  
+           ttv(1)= trnsvers(1)
+           ttv(2)= (trnsvers(2) - vel0*trnsvers(1))/rho
+           ttv(3)= (trnsvers(3) - vel1*trnsvers(1))/rho
+           ttv(4)= (trnsvers(4) - vel2*trnsvers(1))/rho
+           ttv(NEQU)= (v2norm*half*trnsvers(1) -
+     &              vel0*trnsvers(2) - vel1*trnsvers(3) -
+     &              vel2*trnsvers(4) +
+     &              trnsvers(NEQU))*gam_min_one
+           do k=1,NEQU
+             tracelft$2(ic$2+1,ic$1,ic$3,k)=tracelft$2(ic$2+1,ic$1,ic$3,k)
+     &                                         - ttv(k)
+           enddo
+           do ic$2=ifirst$2-(FLUXG-1),ilast$2+(FLUXG-1)
+             rho  = density(ic0,ic1,ic2)
+             vel0 = velocity(ic0,ic1,ic2,0)
+             vel1 = velocity(ic0,ic1,ic2,1)
+             vel2 = velocity(ic0,ic1,ic2,2)
+             v2norm= vel0**2+vel1**2 +vel2**2
+             do k=1,NEQU
+               trnsvers(k)=half*
+     &          (flux$3(ic$3+1,$4,k)-flux$3(ic$3,$4,k))/dx($3)
+             enddo
+  
+             ttv(1)= trnsvers(1)
+             ttv(2)= (trnsvers(2) - vel0*trnsvers(1))/rho
+             ttv(3)= (trnsvers(3) - vel1*trnsvers(1))/rho
+             ttv(4)= (trnsvers(4) - vel2*trnsvers(1))/rho
+             ttv(NEQU)= (v2norm*half*trnsvers(1) -
+     &                vel0*trnsvers(2) - vel1*trnsvers(3) -
+     &                vel2*trnsvers(4) +
+     &                trnsvers(NEQU))*gam_min_one
+             do k=1,NEQU
+               tracelft$2(ic$2+1,ic$1,ic$3,k)=tracelft$2(ic$2+1,ic$1,ic$3,k)
+     &                                           - ttv(k)
+               tracergt$2(ic$2  ,ic$1,ic$3,k)=tracergt$2(ic$2  ,ic$1,ic$3,k)
+     &                                           - ttv(k)
+             enddo
+           enddo
+           ic$2=ilast$2+FLUXG
+           rho  = density(ic0,ic1,ic2)
+           vel0 = velocity(ic0,ic1,ic2,0)
+           vel1 = velocity(ic0,ic1,ic2,1)
+           vel2 = velocity(ic0,ic1,ic2,2)
+           v2norm= vel0**2+vel1**2 +vel2**2
+           do k=1,NEQU
+             trnsvers(k)=half*
+     &        (flux$3(ic$3+1,$4,k)-flux$3(ic$3,$4,k))/dx($3)
+           enddo
+  
+           ttv(1)= trnsvers(1)
+           ttv(2)= (trnsvers(2) - vel0*trnsvers(1))/rho
+           ttv(3)= (trnsvers(3) - vel1*trnsvers(1))/rho
+           ttv(4)= (trnsvers(4) - vel2*trnsvers(1))/rho
+           ttv(NEQU)= (v2norm*half*trnsvers(1) -
+     &              vel0*trnsvers(2) - vel1*trnsvers(3) -
+     &              vel2*trnsvers(4) +
+     &              trnsvers(NEQU))*gam_min_one
+           do k=1,NEQU
+             tracergt$2(ic$2  ,ic$1,ic$3,k)=tracergt$2(ic$2  ,ic$1,ic$3,k)
+     &                                        - ttv(k)
+           enddo
+         enddo
+      enddo
+c
+c   correct the $3-direction with $2-fluxes
+      do ic$1=ifirst$1-(FLUXG-1),ilast$1+(FLUXG-1)
+        do ic$2=ifirst$2-(FLUXG-1),ilast$2+(FLUXG-1)
+           ic$3=ifirst$3-FLUXG
+           rho  = density(ic0,ic1,ic2)
+           vel0 = velocity(ic0,ic1,ic2,0)
+           vel1 = velocity(ic0,ic1,ic2,1)
+           vel2 = velocity(ic0,ic1,ic2,2)
+           v2norm= vel0**2+vel1**2 +vel2**2
+           do k=1,NEQU
+             trnsvers(k)=half*
+     &        (flux$2(ic$2+1,$5,k)-flux$2(ic$2,$5,k))/dx($2)
+           enddo
+  
+           ttv(1)= trnsvers(1)
+           ttv(2)= (trnsvers(2) - vel0*trnsvers(1))/rho
+           ttv(3)= (trnsvers(3) - vel1*trnsvers(1))/rho
+           ttv(4)= (trnsvers(4) - vel2*trnsvers(1))/rho
+           ttv(NEQU)= (v2norm*half*trnsvers(1) -
+     &              vel0*trnsvers(2) - vel1*trnsvers(3) -
+     &              vel2*trnsvers(4) +
+     &              trnsvers(NEQU))*gam_min_one
+           do k=1,NEQU
+             tracelft$3(ic$3+1,ic$2,ic$1,k)=tracelft$3(ic$3+1,ic$2,ic$1,k)
+     &                                         - ttv(k)
+           enddo
+           do ic$3=ifirst$3-(FLUXG-1),ilast$3+(FLUXG-1)
+             rho  = density(ic0,ic1,ic2)
+             vel0 = velocity(ic0,ic1,ic2,0)
+             vel1 = velocity(ic0,ic1,ic2,1)
+             vel2 = velocity(ic0,ic1,ic2,2)
+             v2norm= vel0**2+vel1**2 +vel2**2
+             do k=1,NEQU
+               trnsvers(k)=half*
+     &          (flux$2(ic$2+1,$5,k)-flux$2(ic$2,$5,k))/dx($2)
+             enddo
+  
+             ttv(1)= trnsvers(1)
+             ttv(2)= (trnsvers(2) - vel0*trnsvers(1))/rho
+             ttv(3)= (trnsvers(3) - vel1*trnsvers(1))/rho
+             ttv(4)= (trnsvers(4) - vel2*trnsvers(1))/rho
+             ttv(NEQU)= (v2norm*half*trnsvers(1) -
+     &                vel0*trnsvers(2) - vel1*trnsvers(3) -
+     &                vel2*trnsvers(4) +
+     &                trnsvers(NEQU))*gam_min_one
+             do k=1,NEQU
+               tracelft$3(ic$3+1,ic$2,ic$1,k)=tracelft$3(ic$3+1,ic$2,ic$1,k)
+     &                                           - ttv(k)
+               tracergt$3(ic$3  ,ic$2,ic$1,k)=tracergt$3(ic$3  ,ic$2,ic$1,k)
+     &                                           - ttv(k)
+             enddo
+           enddo
+           ic$3=ilast$3+FLUXG
+           rho  = density(ic0,ic1,ic2)
+           vel0 = velocity(ic0,ic1,ic2,0)
+           vel1 = velocity(ic0,ic1,ic2,1)
+           vel2 = velocity(ic0,ic1,ic2,2)
+           v2norm= vel0**2+vel1**2 +vel2**2
+           do k=1,NEQU
+             trnsvers(k)=half*
+     &        (flux$2(ic$2+1,$5,k)-flux$2(ic$2,$5,k))/dx($2)
+           enddo
+  
+           ttv(1)= trnsvers(1)
+           ttv(2)= (trnsvers(2) - vel0*trnsvers(1))/rho
+           ttv(3)= (trnsvers(3) - vel1*trnsvers(1))/rho
+           ttv(4)= (trnsvers(4) - vel2*trnsvers(1))/rho
+           ttv(NEQU)= (v2norm*half*trnsvers(1) -
+     &              vel0*trnsvers(2) - vel1*trnsvers(3) -
+     &              vel2*trnsvers(4) +
+     &              trnsvers(NEQU))*gam_min_one
+           do k=1,NEQU
+             tracergt$3(ic$3  ,ic$2,ic$1,k)=tracergt$3(ic$3  ,ic$2,ic$1,k)
+     &                                        - ttv(k)
+           enddo
+         enddo
+      enddo
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/3d/m4trace.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/3d/m4trace.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,71 @@
+define(trace_init,`dnl
+      do  ic$3=ifirst$3-FACEG,ilast$3+FACEG
+         do  ic$2=ifirst$2-FACEG,ilast$2+FACEG
+           ie$1=ifirst$1-FACEG
+             tracelft$1(ie$1,ic$2,ic$3,1)=zero
+             tracelft$1(ie$1,ic$2,ic$3,2)=zero
+             tracelft$1(ie$1,ic$2,ic$3,3)=zero
+             tracelft$1(ie$1,ic$2,ic$3,4)=zero
+             tracelft$1(ie$1,ic$2,ic$3,5)=zero
+             tracergt$1(ie$1,ic$2,ic$3,1)=density($5)
+             tracergt$1(ie$1,ic$2,ic$3,2)=velocity($5,1)
+             tracergt$1(ie$1,ic$2,ic$3,3)=velocity($5,2)
+             tracergt$1(ie$1,ic$2,ic$3,4)=velocity($5,3)
+             tracergt$1(ie$1,ic$2,ic$3,5)=pressure($5)
+
+           do  ie$1=ifirst$1+1-FACEG,ilast$1+FACEG
+             tracelft$1(ie$1,ic$2,ic$3,1)=density($4)
+             tracelft$1(ie$1,ic$2,ic$3,2)=velocity($4,1)
+             tracelft$1(ie$1,ic$2,ic$3,3)=velocity($4,2)
+             tracelft$1(ie$1,ic$2,ic$3,4)=velocity($4,3)
+             tracelft$1(ie$1,ic$2,ic$3,5)=pressure($4)
+ 
+             tracergt$1(ie$1,ic$2,ic$3,1)=density($5)
+             tracergt$1(ie$1,ic$2,ic$3,2)=velocity($5,1)
+             tracergt$1(ie$1,ic$2,ic$3,3)=velocity($5,2)
+             tracergt$1(ie$1,ic$2,ic$3,4)=velocity($5,3)
+             tracergt$1(ie$1,ic$2,ic$3,5)=pressure($5)
+    
+           enddo
+
+           ie$1=ilast$1+FACEG+1
+             tracelft$1(ie$1,ic$2,ic$3,1)=density($4)
+             tracelft$1(ie$1,ic$2,ic$3,2)=velocity($4,1)
+             tracelft$1(ie$1,ic$2,ic$3,3)=velocity($4,2)
+             tracelft$1(ie$1,ic$2,ic$3,4)=velocity($4,3)
+             tracelft$1(ie$1,ic$2,ic$3,5)=pressure($4)
+             tracergt$1(ie$1,ic$2,ic$3,1)=zero
+             tracergt$1(ie$1,ic$2,ic$3,2)=zero
+             tracergt$1(ie$1,ic$2,ic$3,3)=zero
+             tracergt$1(ie$1,ic$2,ic$3,4)=zero
+             tracergt$1(ie$1,ic$2,ic$3,5)=zero
+         enddo
+      enddo
+
+')dnl
+define(trace_call,`dnl
+        do ic$3=ifirst$3-2,ilast$3+2
+          do ic$2=ifirst$2-2,ilast$2+2
+            do ic$1=ifirst$1-CELLG,ilast$1+CELLG
+              ttsound(ic$1)= sound(ic0,ic1,ic2)
+            enddo
+            do k=1,NEQU
+              do ic$1=ifirst$1-FACEG,ilast$1+FACEG+1
+                ttraclft(ic$1,k) = tracelft(ic$1,ic$2,ic$3,k)
+                ttracrgt(ic$1,k) = tracergt(ic$1,ic$2,ic$3,k)
+              enddo
+            enddo
+   
+            call trace(dt,ifirst$1,ilast$1,mc,
+     &        dx,idir,igdnv,ttsound,
+     &        ttraclft,ttracrgt,
+     &        ttcelslp,ttedgslp)
+            do k=1,NEQU
+              do ic$1=ifirst$1-FACEG,ilast$1+FACEG+1
+                tracelft(ic$1,ic$2,ic$3,k) = ttraclft(ic$1,k)
+                tracergt(ic$1,ic$2,ic$3,k) = ttracrgt(ic$1,k)
+              enddo
+            enddo
+          enddo
+        enddo
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/3d/stable.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/3d/stable.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,59 @@
+define(NDIM,3)dnl
+define(NEQU,5)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+      subroutine stabledt(dx,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  ngc0,ngc1,ngc2,
+     &  gamma,density,velocity,pressure,stabdt)
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+include(FORTDIR/../const.i)dnl
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      REAL stabdt,dx(0:NDIM-1)
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  ngc0,ngc1,ngc2
+c
+      REAL  
+     &  density(CELL3dVECG(ifirst,ilast,ngc)),
+     &  velocity(CELL3dVECG(ifirst,ilast,ngc),0:NDIM-1),
+     &  pressure(CELL3dVECG(ifirst,ilast,ngc))
+c    
+      integer ic0,ic1,ic2
+      integer ighoslft(0:NDIM-1),ighosrgt(0:NDIM-1)
+
+      REAL maxspeed(0:NDIM-1),gamma,lambda
+c
+      ighoslft(0) = ifirst0 - ngc0
+      ighoslft(1) = ifirst1 - ngc1
+      ighoslft(2) = ifirst2 - ngc2
+      ighosrgt(0) = ilast0 + ngc0
+      ighosrgt(1) = ilast1 + ngc1
+      ighosrgt(2) = ilast2 + ngc2
+
+      maxspeed(0)=zero
+      maxspeed(1)=zero
+      maxspeed(2)=zero
+
+      do  ic2=ighoslft(2),ighosrgt(2)
+         do  ic1=ighoslft(1),ighosrgt(1)
+            do  ic0=ighoslft(0),ighosrgt(0)
+               lambda = sqrt(max(zero,
+     &              gamma*pressure(ic0,ic1,ic2)/density(ic0,ic1,ic2)))
+               maxspeed(0) = max(maxspeed(0),
+     &              abs(velocity(ic0,ic1,ic2,0))+lambda)
+               maxspeed(1) = max(maxspeed(1),
+     &              abs(velocity(ic0,ic1,ic2,1))+lambda)
+               maxspeed(2) = max(maxspeed(2),
+     &              abs(velocity(ic0,ic1,ic2,2))+lambda)
+            enddo
+         enddo
+      enddo
+      stabdt = min((dx(1)/maxspeed(1)),(dx(0)/maxspeed(0)))
+      stabdt = min((dx(2)/maxspeed(2)),stabdt)
+c     write(6,*) " dx(0),maxspeed(0)= ",dx(0),maxspeed(0)
+c      write(6,*) " dx(1),maxspeed(1)= ",dx(1),maxspeed(1)
+c      write(6,*) " dx(2),maxspeed(2)= ",dx(2),maxspeed(2)
+c      write(6,*) "        stabdt= ",stabdt
+      return
+      end 
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/3d/trace.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/3d/trace.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,271 @@
+define(NDIM,3)dnl
+define(NEQU,5)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+include(FORTDIR/m4trace.i)dnl
+
+      subroutine computesound(ifirst0,ilast0,ifirst1,ilast1,
+     &  ifirst2,ilast2,gamma,density,velocity,pressure,sound)
+c***********************************************************************
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+c variables indexed as 2dimensional
+      REAL
+     &      gamma,
+     &      density(CELL3d(ifirst,ilast,CELLG)),
+     &      velocity(CELL3d(ifirst,ilast,CELLG),0:NDIM-1),
+     &      pressure(CELL3d(ifirst,ilast,CELLG)),
+     &      sound(CELL3d(ifirst,ilast,CELLG))
+c
+      integer ic0,ic1,ic2
+c
+c***********************************************************************
+c
+      do  ic0=ifirst0-CELLG,ilast0+CELLG
+        do  ic1=ifirst1-CELLG,ilast1+CELLG
+          do  ic2=ifirst2-CELLG,ilast2+CELLG
+            sound(ic0,ic1,ic2) = sqrt(max(smallr,
+     &                                    gamma*pressure(ic0,ic1,ic2)
+     &                                    /density(ic0,ic1,ic2)))
+          enddo
+        enddo
+      enddo
+
+      return
+      end 
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+c
+      subroutine inittraceflux(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  density,velocity,pressure,
+     &  tracelft0,tracelft1,tracelft2,
+     &  tracergt0,tracergt1,tracergt2,
+     &  fluxriem0,fluxriem1,fluxriem2)
+c***********************************************************************
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL
+     &       density(CELL3d(ifirst,ilast,CELLG)),
+     &      velocity(CELL3d(ifirst,ilast,CELLG),NDIM),
+     &      pressure(CELL3d(ifirst,ilast,CELLG)),
+     &     fluxriem0(FACE3d0(ifirst,ilast,FLUXG),NEQU),
+     &     tracelft0(FACE3d0(ifirst,ilast,FACEG),NEQU),
+     &     tracergt0(FACE3d0(ifirst,ilast,FACEG),NEQU),
+     &     fluxriem1(FACE3d1(ifirst,ilast,FLUXG),NEQU),
+     &     tracelft1(FACE3d1(ifirst,ilast,FACEG),NEQU),
+     &     tracergt1(FACE3d1(ifirst,ilast,FACEG),NEQU),
+     &     fluxriem2(FACE3d2(ifirst,ilast,FLUXG),NEQU),
+     &     tracelft2(FACE3d2(ifirst,ilast,FACEG),NEQU),
+     &     tracergt2(FACE3d2(ifirst,ilast,FACEG),NEQU)
+      integer ic0,ic1,k,ie0,ie1,ic2,ie2
+c***********************************************************************
+c initialize left and right states at cell edges
+c (first-order upwind)
+c***********************************************************************
+      if (FLUXG.lt.1) then
+         write(6,*) "flux ghosts < 1!"
+	stop
+      endif
+c
+c***********************************************************************
+
+trace_init(0,1,2,`ie0-1,ic1,ic2',`ie0,ic1,ic2')dnl
+
+trace_init(1,2,0,`ic0,ie1-1,ic2',`ic0,ie1,ic2')dnl
+
+trace_init(2,0,1,`ic0,ic1,ie2-1',`ic0,ic1,ie2')dnl
+
+c
+c     we initialize the flux to be 0
+
+      do ic2=ifirst2-FLUXG,ilast2+FLUXG
+         do ic1=ifirst1-FLUXG,ilast1+FLUXG
+           do ie0=ifirst0-FLUXG,ilast0+FLUXG+1
+             do k=1,NEQU  
+               fluxriem0(ie0,ic1,ic2,k) = zero
+             enddo  
+           enddo
+         enddo
+      enddo
+c
+      do ic2=ifirst2-FLUXG,ilast2+FLUXG
+         do ic0=ifirst0-FLUXG,ilast0+FLUXG
+            do ie1=ifirst1-FLUXG,ilast1+FLUXG+1
+               do k=1,NEQU  
+                 fluxriem1(ie1,ic2,ic0,k) = zero
+               enddo  
+            enddo
+         enddo
+      enddo
+c
+      do ic1=ifirst1-FLUXG,ilast1+FLUXG
+         do ic0=ifirst0-FLUXG,ilast0+FLUXG
+            do ie2=ifirst2-FLUXG,ilast2+FLUXG+1
+               do k=1,NEQU  
+                 fluxriem2(ie2,ic0,ic1,k) = zero
+               enddo  
+            enddo
+         enddo
+      enddo
+c
+      return
+      end 
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+c
+      subroutine chartracing0(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  mc,dx,
+     &  gamma,igdnv,
+     &  sound,
+     &  tracelft,tracergt,
+     &  ttcelslp, ttedgslp,
+     &  ttsound,
+     &  ttraclft, ttracrgt)
+c***********************************************************************
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer mc,igdnv
+      REAL dt 
+c variables in 1d axis indexed
+      REAL 
+     &     dx, gamma
+      REAL 
+     &     sound(CELL3d(ifirst,ilast,CELLG))
+      REAL 
+     &     tracelft(FACE3d0(ifirst,ilast,FACEG),NEQU),
+     &     tracergt(FACE3d0(ifirst,ilast,FACEG),NEQU)
+c  side variables ifirst0 to ifirst0+mc plus ghost cells
+      REAL
+     & ttedgslp(ifirst0-FACEG:ifirst0+mc+FACEG,NEQU),
+     & ttraclft(ifirst0-FACEG:ifirst0+mc+FACEG,NEQU),
+     & ttracrgt(ifirst0-FACEG:ifirst0+mc+FACEG,NEQU)
+c  cell variables ifirst0 to ifirst0+mc-1 plus ghost cells
+      REAL 
+     &  ttcelslp(ifirst0-CELLG:ifirst0+mc-1+CELLG,NEQU),
+     &  ttsound(ifirst0-CELLG:ifirst0+mc-1+CELLG)
+c***********************************************************************
+      integer ic0,ic1,ic2,k,idir
+c***********************************************************************
+c trace higher order states at cell edges
+c***********************************************************************
+      idir = 0
+trace_call(0,1,2)dnl
+c***********************************************************************
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine chartracing1(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  mc,dx,
+     &  gamma,igdnv,
+     &  sound,
+     &  tracelft,tracergt,
+     &  ttcelslp, ttedgslp,
+     &  ttsound,
+     &  ttraclft, ttracrgt)
+c***********************************************************************
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer mc,igdnv
+      REAL dt 
+c variables in 1d axis indexed
+      REAL 
+     &     dx, gamma
+      REAL 
+     &     sound(CELL3d(ifirst,ilast,CELLG))
+      REAL 
+     &     tracelft(FACE3d1(ifirst,ilast,FACEG),NEQU),
+     &     tracergt(FACE3d1(ifirst,ilast,FACEG),NEQU)
+      REAL
+     & ttedgslp(ifirst1-FACEG:ifirst1+mc+FACEG,NEQU),
+     & ttraclft(ifirst1-FACEG:ifirst1+mc+FACEG,NEQU),
+     & ttracrgt(ifirst1-FACEG:ifirst1+mc+FACEG,NEQU)
+c  cell variables ifirst1 to ifirst1+mc-1 plus ghost cells
+      REAL 
+     &  ttcelslp(ifirst1-CELLG:ifirst1+mc-1+CELLG,NEQU),
+     &  ttsound(ifirst1-CELLG:ifirst1+mc-1+CELLG)
+c***********************************************************************
+      integer ic0,ic1,ic2,k,idir
+c***********************************************************************
+c trace higher order states at cell edges
+c***********************************************************************
+      idir = 1
+trace_call(1,2,0)dnl
+c
+c***********************************************************************
+      return
+      end
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine chartracing2(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  mc,dx,
+     &  gamma,igdnv,
+     &  sound,
+     &  tracelft,tracergt,
+     &  ttcelslp, ttedgslp,
+     &  ttsound,
+     &  ttraclft, ttracrgt)
+c***********************************************************************
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer mc,igdnv
+      REAL dt 
+c variables in 1d axis indexed
+      REAL 
+     &     dx, gamma
+      REAL 
+     &     sound(CELL3d(ifirst,ilast,CELLG))
+      REAL 
+     &     tracelft(FACE3d2(ifirst,ilast,FACEG),NEQU),
+     &     tracergt(FACE3d2(ifirst,ilast,FACEG),NEQU)
+      REAL
+     & ttedgslp(ifirst2-FACEG:ifirst2+mc+FACEG,NEQU),
+     & ttraclft(ifirst2-FACEG:ifirst2+mc+FACEG,NEQU),
+     & ttracrgt(ifirst2-FACEG:ifirst2+mc+FACEG,NEQU)
+c  cell variables ifirst2 to ifirst2+mc-1 plus ghost cells
+      REAL 
+     &  ttcelslp(ifirst2-CELLG:ifirst2+mc-1+CELLG,NEQU),
+     &  ttsound(ifirst2-CELLG:ifirst2+mc-1+CELLG)
+c***********************************************************************
+      integer ic0,ic1,ic2,k,idir
+c***********************************************************************
+c trace higher order states at cell edges
+c***********************************************************************
+      idir = 2
+trace_call(2,0,1)dnl
+c
+c***********************************************************************
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/3d/trace1d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/3d/trace1d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,183 @@
+define(NEQU,5)dnl
+define(REAL,`double precision')dnl
+
+      subroutine trace(dt,ifirst,ilast,mc,
+     &  dx,dir,igdnv,sound,
+     &  tracelft,tracergt, 
+     &  celslope,edgslope)
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      REAL dt
+      integer ifirst,ilast,mc,dir,igdnv
+      REAL dx, flattn
+c
+      REAL  
+     &  celslope(ifirst-CELLG:ifirst+mc-1+CELLG,NEQU),
+     &  sound  (ifirst-CELLG:ifirst+mc-1+CELLG),
+c       side variables
+     &  tracelft(ifirst-FACEG:ifirst+mc+FACEG,NEQU),
+     &  tracergt(ifirst-FACEG:ifirst+mc+FACEG,NEQU),
+     &  edgslope(ifirst-FACEG:ifirst+mc+FACEG,NEQU)
+c
+      integer ie,ic,i,k
+      REAL bound,coef4,slope2,dtdx,slope4
+      REAL csq, rho, u, v, w, p
+      REAL drho, du, dv, dw, dp
+      REAL spminus, spplus, spzero, smminus, smplus, smzero
+      REAL alpham, alphap, alpha0r
+      REAL alpha0v,alpha0w
+      REAL apright, amright, azrright
+      REAL azv1rght,azw1rght
+      REAL apleft, amleft, azrleft
+      REAL azv1left,azw1left,ceigv
+      integer dir1,dir2,dir3
+
+      if (dir.eq.0) then
+        dir1 = 2
+        dir2 = 3
+        dir3 = 4
+      else if (dir.eq.1) then
+        dir1 = 3
+        dir2 = 4
+        dir3 = 2
+      else if (dir.eq.2) then
+        dir1 = 4
+        dir2 = 2
+        dir3 = 3
+      endif
+c
+c***********************************************************************
+c     ******************************************************************
+c     * check for inflection points in characteristic speeds
+c     * compute slopes at cell edges
+c     * zero slopes if neighboring cells have different loading
+c     ******************************************************************
+      do ie=ifirst+1-FACEG,ilast+FACEG
+        do k=1,NEQU
+          edgslope(ie,k)=tracergt(ie,k)-tracelft(ie,k)
+        enddo
+      enddo
+c     ******************************************************************
+c     * limit slopes
+c     ******************************************************************
+      do i=1,NEQU
+        do ic=ifirst-CELLG,ilast+CELLG
+          celslope(ic,i)=zero
+        enddo
+      enddo
+      if (igdnv.eq.2) then
+c       ****************************************************************
+c       * second-order slopes
+c       ****************************************************************
+        do ic=ifirst+1-CELLG,ilast+CELLG-1
+c         call flaten(ifirst,ilast,ic,mc,dir,tracergt,sound,flattn)
+          flattn=one
+          do i=1,NEQU
+            slope2=half*(edgslope(ic,i)+edgslope(ic+1,i))
+            celslope(ic,i)=half*(edgslope(ic,i)+edgslope(ic+1,i))
+            if (edgslope(ic,i)*edgslope(ic+1,i).le.zero) then
+              celslope(ic,i)=zero
+            else
+              bound=min(abs(edgslope(ic,i)),abs(edgslope(ic+1,i)))
+              celslope(ic,i)=sign(min(two*bound,abs(slope2)),slope2)
+              celslope(ic,i)=flattn*celslope(ic,i)
+            endif
+          enddo
+        enddo
+      else if (igdnv.eq.4) then
+c       ****************************************************************
+c       * fourth-order slopes
+c       ****************************************************************
+        do ic=ifirst+2-CELLG,ilast+CELLG-2
+c         call flaten(ifirst,ilast,ic,mc,dir,tracergt,sound,flattn)
+          flattn=one
+          do i=1,NEQU
+            slope4=fourth*(tracergt(ic+2,i)-tracergt(ic-2,i))
+            celslope(ic,i)=half*(edgslope(ic,i)+edgslope(ic+1,i))
+            coef4=third*(four*celslope(ic,i)-slope4)
+            if (edgslope(ic,i)*edgslope(ic+1,i).le.zero .or.
+     &      coef4*celslope(ic,i).lt.zero) then
+              celslope(ic,i)=zero
+            else
+              bound=min(abs(edgslope(ic,i)),abs(edgslope(ic+1,i)))
+              celslope(ic,i)=sign(min(two*bound,abs(coef4)),coef4)
+              celslope(ic,i)=flattn*celslope(ic,i)
+            endif
+          enddo
+        enddo
+      endif
+c     ******************************************************************
+c     * characteristic projection
+c     ******************************************************************
+      do ic=ifirst-FACEG+1,ilast+FACEG
+        dtdx=dt/dx
+        rho = max(smallr,tracergt(ic,1))
+        u = tracergt(ic,dir1)
+        v = tracergt(ic,dir2)
+        p = tracergt(ic,NEQU)
+        drho = celslope(ic,1)
+        du = celslope(ic,dir1)
+        dv = celslope(ic,dir2)
+        dp = celslope(ic,NEQU)
+        w = tracergt(ic,dir3)
+        dw = celslope(ic,dir3)
+        alpha0w = dw
+ 
+        ceigv = sound(ic)
+        csq = ceigv**2
+ 
+        alpham  = half*(dp/(rho*ceigv) - du)*rho/ceigv
+        alphap  = half*(dp/(rho*ceigv) + du)*rho/ceigv
+        alpha0r = drho - dp/csq
+        alpha0v = dv
+ 
+        if ((u-ceigv).gt.0) then
+           spminus = -one
+           smminus = (u-ceigv)*dtdx
+        else
+           spminus = (u-ceigv)*dtdx
+           smminus = one
+        endif
+        if ((u+ceigv).gt.0) then
+           spplus = -one
+           smplus = (u+ceigv)*dtdx
+        else
+           spplus = (u+ceigv)*dtdx
+           smplus = one
+        endif
+        if ((u).gt.0) then
+           spzero = -one
+           smzero = u*dtdx
+        else
+           spzero = u*dtdx
+           smzero = one
+        endif
+        apright  = half*(-one - spplus )*alphap
+        amright  = half*(-one - spminus)*alpham
+        azrright = half*(-one - spzero )*alpha0r
+        azv1rght = half*(-one - spzero )*alpha0v
+        azw1rght = half*(-one - spzero )*alpha0w
+        tracergt(ic,1) = rho + apright + amright + azrright
+        tracergt(ic,1) = max(smallr,tracergt(ic,1))
+        tracergt(ic,dir1) = u + (apright - amright)*ceigv/rho
+        tracergt(ic,dir2) = v + azv1rght
+        tracergt(ic,dir3) = w + azw1rght
+        tracergt(ic,NEQU) = p + (apright + amright)*csq
+ 
+        apleft  = half*(one - smplus )*alphap
+        amleft  = half*(one - smminus)*alpham
+        azrleft = half*(one - smzero )*alpha0r
+        azv1left = half*(one - smzero )*alpha0v
+        azw1left = half*(one - smzero )*alpha0w
+        tracelft(ic+1,1) = rho + apleft + amleft + azrleft
+        tracelft(ic+1,1) = max(smallr,tracelft(ic+1,1))
+        tracelft(ic+1,dir1) = u + (apleft - amleft)*ceigv/rho
+        tracelft(ic+1,dir2) = v + azv1left
+        tracelft(ic+1,dir3) = w + azw1left
+        tracelft(ic+1,NEQU) = p + (apleft + amleft)*csq
+      enddo
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/amrflaten.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/amrflaten.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,89 @@
+c
+c***********************************************************************
+c flatten routine
+c***********************************************************************
+c
+      subroutine amrflaten(ifirst,ilast,
+     &                  cilo,cihi,
+     &                  mc,gamma,
+     &                  densc,presc,velc,flattn,flat2,sound)
+c***********************************************************************
+c description of arguments:
+c   input:
+c     p        ==> pressure            tracest(NEQU)
+c     vn       ==> normal velocity     tracest(2+idir)
+c   output:
+c     flattn   ==> flattening coefficient
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+cnclude(FORTDIR/../const.i)dnl
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      integer ifirst,ilast,
+     &  cilo,cihi,
+     &  mc
+      REAL gamma
+      REAL
+     &  densc(cilo:cilo+mc),
+     &  velc(cilo:cilo+mc),
+     &  presc(cilo:cilo+mc)
+      REAL  flattn(ifirst:ifirst+mc)
+      REAL  flat2(cilo:cilo+mc),sound(cilo:cilo+mc)
+
+      REAL zero,half,one,two
+      parameter (zero=0.d0)
+      parameter (half=0.5d0)
+      parameter (one=1.0d0)
+      parameter (two=2.d0)
+
+c
+c***********************************************************************
+c
+
+
+      REAL shktst, zcut1, zcut2, dzcut, smallp
+      REAL denom, zeta, tst, tmp, dp,zi
+      REAL rhoc1,rhoc2,chi
+      integer ic
+
+c
+c***********************************************************************
+c
+      shktst =0.33d0
+      zcut1 =0.75d0
+      zcut2 =0.85d0
+      smallp =1.0d-6
+      dzcut = one/(zcut2-zcut1)
+
+      do ic=ifirst,ilast    
+         flattn(ic) = one
+      enddo
+      do ic=ifirst-1,ilast+1   
+         sound(ic) = sqrt(gamma*presc(ic)/densc(ic))
+      enddo
+
+      do ic=ifirst+1,ilast-1
+         dp = presc(ic+1) - presc(ic-1)
+         denom = max(smallp,abs(presc(ic+2)-presc(ic-2)))
+         zeta = abs(dp)/denom
+         zi = min( one, max( zero, dzcut*(zeta - zcut1) ) )
+         if ((velc(ic-1) - velc(ic+1)).gt.zero) then
+            tst = one
+         else
+            tst = zero
+         endif
+         rhoc1 = densc(ic+1)*sound(ic+1)**2
+         rhoc2 = densc(ic-1)*sound(ic-1)**2
+         tmp = min(rhoc1,rhoc2)
+         if ((abs(dp)/tmp).gt.shktst) then
+            chi = tst
+         else
+            chi = zero
+         endif
+         flat2(ic) = chi*zi
+      enddo
+      do ic=ifirst+2,ilast-2
+         flattn(ic) = one - max(flat2(ic-1),flat2(ic),flat2(ic+1))
+      enddo
+      
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/const.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/const.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,18 @@
+      REAL zero,tenth,sixth,fourth,third,half,twothird,
+     &  rt75,one,onept5,two,three,pi,four,seven,smallr
+      parameter (zero=0.d0)
+      parameter (tenth=0.1d0)
+      parameter (sixth=0.16666666666667d0)
+      parameter (fourth=.25d0)
+      parameter (third=.333333333333333d0)
+      parameter (half=.5d0)
+      parameter (twothird=.66666666666667d0)
+      parameter (rt75=.8660254037844d0)
+      parameter (one=1.d0)
+      parameter (onept5=1.5d0)
+      parameter (two=2.d0)
+      parameter (three=3.d0)
+      parameter(pi=3.14159265358979323846d0)
+      parameter (four=4.d0)
+      parameter (seven=7.d0)
+      parameter (smallr=1.0d-32)
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/flaten.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/flaten.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,75 @@
+c***********************************************************************
+      subroutine flaten(ifirst,ilast,i,mc,idir,
+     &                  tracest,sound,flattn)
+c***********************************************************************
+c Compute "flattn" (flattening coefficient) for cell i
+c description of arguments:
+c   input:
+c     ifirst,ilast,mc  ==> array dimensions 
+c     i                ==> cell index flattn is being computed on
+c     idir             ==> coordinate direction
+c     tracest          ==> array of traced states
+c     sound            ==> array of sound speeds
+c   output:
+c     flattn   ==> flattening coefficient
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+include(FORTDIR/../probparams.i)dnl
+include(FORTDIR/../const.i)dnl
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      integer ifirst,ilast,i,mc,idir
+      REAL tracest(ifirst-FACEG:ifirst+mc+FACEG,NEQU)
+      REAL  sound(ifirst-CELLG:ifirst+mc-1+CELLG)
+      REAL flat2(3)
+      REAL flattn
+
+      REAL shktst, zcut1, zcut2, dzcut, smallp
+      REAL denom, zeta, tst, tmp, dp,zi
+      REAL rhoc1,rhoc2,chi
+      integer j,ii
+c
+c***********************************************************************
+c
+      shktst =0.33d0
+      zcut1 =0.75d0
+      zcut2 =0.85d0
+      smallp =1.0d-6
+      dzcut = one/(zcut2-zcut1)
+      
+      flattn = one 
+
+c
+c  Leave flattn = 1. at bounds.
+c
+       if ((i.lt.ifirst-1) .or. (i.gt.ilast+1)) return
+c
+c  Compute "flat2" at i-1,i,i+1
+c
+      do j=1,3
+         ii = (i-2) + j  
+         dp = tracest(ii+1,NEQU) - tracest(ii-1,NEQU)
+         denom = max(smallp,abs(tracest(ii+2,NEQU)-tracest(ii-2,NEQU)))
+         zeta = abs(dp)/denom
+         zi = min( one, max( zero, dzcut*(zeta - zcut1) ) )
+         if ((tracest(ii-1,idir+2) - tracest(ii+1,idir+2)).gt.zero) then
+            tst = one
+         else 
+            tst = zero
+         endif
+         rhoc1 = tracest(ii+1,1)*sound(ii+1)**2
+         rhoc2 = tracest(ii-1,1)*sound(ii-1)**2
+         tmp = min(rhoc1,rhoc2)
+         if ((abs(dp)/tmp).gt.shktst) then
+            chi = tst
+         else 
+            chi = zero
+         endif
+         flat2(j) = chi*zi
+      enddo
+c
+c  Compute "flattn" at cell i, using flat2 at i-1,i,i+1
+c
+      flattn = one - max(flat2(1),flat2(2),flat2(3))
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/gas1d_approxrp.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/gas1d_approxrp.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,114 @@
+      subroutine gas1dapproxrp(eosgam,wleft,wright, striem)
+c***********************************************************************
+c description of arguments:
+c   input:
+c     eosgam ==> ratio of specific heats
+c     wleft  ==> left state
+c     wright ==> right state
+c                components ordered: density, vn, pressure
+c   output:
+c     striem (density,velocity,pressure) 
+c             <== solution to riemann problem
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+include(FORTDIR/../const.i)
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      REAL wleft(3),wright(3),eosgam,striem(3)
+c
+      REAL clsqp,clsqm,pstar,zp,zm,ustarm,ustarp,zsum
+      REAL wsqm,wsqp,wm,wp,ustar,sein,ro,uo,po,co,wo
+      REAL dummy, rstar,cstar,wso,wsi,ushok,t4,t3,t5
+      REAL gp1g2i, gp1o2gm1
+      integer it
+      REAL separ
+c
+c     ******************************************************************
+c     * the entries of wleft, wright, and wriem are (in order):
+c     *   density, tangential velocity, normal velocity, pressure
+c     ******************************************************************
+
+      separ = zero
+      do it=1,3
+         separ = separ+abs(wleft(it) - wright(it))
+      enddo
+      if (separ.lt.smallr) then
+         do it=1,3
+            striem(it) = half*(wleft(it)+wright(it))
+         enddo
+         return
+      endif
+ 
+	
+      gp1g2i=half*(eosgam+one)/eosgam
+      gp1o2gm1=half*(eosgam+one)/(eosgam-one)
+      clsqp=eosgam*wleft(1)*max(smallr,wleft(3))
+      wp=sqrt(clsqp)
+      clsqm=eosgam*wright(1)*max(smallr,wright(3))
+      wm=sqrt(clsqm)
+      pstar=(wp*wright(3)+wm*wleft(3)-wm*wp*(wright(2)-wleft(2)))
+     &          /(wp+wm)
+      pstar=max(pstar,smallr  )
+c
+      do it=1,5
+          wsqp=clsqp*( one +gp1g2i*(pstar/wleft(3)- one ))
+          wp=sqrt(wsqp)
+          wsqm=clsqm*( one +gp1g2i*(pstar/wright(3)- one ))
+          wm=sqrt(wsqm)
+          zp= two *wp*wsqp/(wsqp+clsqp)
+          zm= two *wm*wsqm/(wsqm+clsqm)
+          ustarm=wright(2)-(wright(3)-pstar)/wm
+          ustarp=wleft(2)+(wleft(3)-pstar)/wp
+          zsum=zp+zm
+          pstar=pstar-zp*zm*(ustarm-ustarp)/zsum
+          pstar=max(pstar,smallr)
+      enddo
+c
+  
+        ustar=(zp*ustarm+zm*ustarp)/zsum
+        sein=-dsign( one ,ustar)
+        if (sein.ge.zero) then
+          ro=wright(1)
+          uo=wright(2)
+          po=wright(3)
+        else
+          ro=wleft(1)
+          uo=wleft(2)
+          po=wleft(3)
+        endif
+        po=max(smallr,po)
+        co=sqrt(po*eosgam/ro)
+        dummy=pstar-po
+        wo=eosgam*ro*po*( one +gp1g2i*dummy/po)
+        rstar=ro/( one -ro*dummy/wo)
+        wo=sqrt(wo)
+        cstar=sqrt(eosgam*pstar/rstar)
+        wso=sein*uo+co
+        wsi=sein*ustar+cstar
+        ushok=sein*ustar+wo/rstar
+        if (dummy.ge.zero) then
+          wsi=ushok
+          wso=ushok
+        else
+          wsi=wsi
+          wso=wso
+        endif
+        if (wsi.ge.zero) then
+          striem(1)=rstar
+          striem(2)=ustar
+          striem(3)=pstar
+        else if (wso.lt.zero) then
+          striem(1)=ro
+          striem(2)=uo
+          striem(3)=po
+        else 
+          t4=(wso+wsi)/max(wso-wsi,wso+wsi,smallr)
+          t4= half *(t4+ one )
+          t5= one -t4
+          t3=t4*cstar+t5*co
+          striem(1)=t4*rstar+t5*ro
+          striem(2) =t4*ustar+t5*uo
+          striem(3)=t3*t3*striem(1)/eosgam
+        endif
+  
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/gas1d_exactrp.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/gas1d_exactrp.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,346 @@
+define(rarefvel,`dnl
+      $3= ($1*two/(gamma-one))*(one- exp(log($2)*tau))
+')dnl
+
+define(shockvel,`dnl
+      $3= $1*alpha*(one-$2)/sqrt(1+ $2*beta)
+')dnl
+
+define(derrvel,`dnl
+      $3= (two*tau*$1/(one-gamma))*exp(log($2)*(tau-one))
+')dnl
+
+define(dersvel,`dnl
+      $3=  (-1)*$1*half*alpha*(two+beta*(one+$2))
+     &           /(sqrt(one+ $2*beta)*(one+ $2*beta))
+')dnl
+
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine gas1dexactrp(gamma,minpres,wleft,wright,striem)
+c***********************************************************************
+c description of arguments:
+c   input:
+c     wleft  ==> left state
+c     wright ==> right state
+c                components ordered: density, vn, pressure
+c   output:
+c     striem (density,velocity,pressure)
+c             <== solution to riemann problem)
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+include(FORTDIR/../const.i)
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      REAL wleft(3),wright(3),striem(3)
+      REAL gamma,minpres
+c
+      REAL pstar,ustarl,ustarr,rstarl,rstarr
+      REAL px,pxl,pxr,pstarl,pstarr
+      REAL ustar,sein,ro,uo,po,co,wo
+      REAL feval,dfeval
+      REAL cxl,cxr
+      REAL dummy, rstar,cstar,wso,wsi,ushok,t4,t3,t5
+      REAL gp1g2i,tau,beta,alpha
+      REAL lpres,lvel,lrho,rpres,rvel,rrho
+      REAL fleft,fright,dfleft,dfright,temp
+      integer it,leftwave,rightwave
+c
+      tau=half*(gamma-one)/gamma
+      gp1g2i=half*(gamma+one)/gamma
+      alpha=sqrt(two/(gamma*(gamma-one)))
+      beta=(gamma+one)/(gamma-one)
+      lrho  = wleft(1)
+      lvel  = wleft(2)
+      lpres = wleft(3)
+      rrho  = wright(1)
+      rvel  = wright(2)
+      rpres = wright(3)
+
+      temp = abs(lvel-rvel)
+      temp = max(abs(lpres-rpres),temp)
+      if (temp.lt.smallr) then
+         striem(2)=half*(lvel+rvel)
+         striem(3)=half*(lpres+rpres)
+         if (striem(2).gt.zero) then
+            striem(1)=lrho
+         else
+            striem(1)=rrho
+         endif
+         goto 666
+      endif
+
+      cxl = sqrt(gamma*lpres/lrho)
+      cxr = sqrt(gamma*rpres/rrho)
+
+c  TERMINAL VELOCITIES
+
+      ustarl = lvel + two*cxl/(gamma-1)
+      ustarr = rvel - two*cxr/(gamma-1)
+
+      if (ustarl.lt.ustarr) then
+         write(6,*)" VACUUM in RS: "
+         write(6,*)"     left state  ",lrho,lvel,lpres
+         write(6,*)"     right state ",rrho,rvel,rpres
+         write(6,*)"     vacuum vels ",ustarl,ustarr
+         if (ustarl.gt.zero) then
+            ustar = ustarl
+            ro=lrho
+            uo=lvel
+            po=lpres
+         else if (ustarr.lt.zero) then
+            ustar = ustarr
+            ro=rrho
+            uo=rvel
+            po=rpres
+         else
+            ustar = 0
+            striem(1)=0
+            striem(2)=half*(ustarl+ustarr)
+            striem(3)=0
+            goto 666
+         endif
+         pstar = 0
+         rstar  = 0
+         rstarl = 0
+         rstarr = 0
+         cstar  = 0
+         sein=-dsign( one ,ustar)
+         co=sqrt(po*gamma/ro)
+         wso=sein*uo+co
+         wsi=sein*ustar
+         if (wso.lt.zero) then
+            striem(1)=ro
+            striem(2)=uo
+            striem(3)=po
+         else
+            t4=(wso+wsi)/max(wso-wsi,wso+wsi,smallr)
+            t4= half *(t4+ one )
+            t5= one -t4
+            t3=t5*co
+            striem(1)=t5*ro
+            striem(2)=t4*ustar+t5*uo
+            striem(3)=t3*t3*striem(1)/gamma
+         endif
+         return
+      endif
+      
+c-----------------------------------------------------------------
+c        CLASSIFY the problem by 1 and  3 waves
+c     shock= 1, rarefaction=2
+
+      px = lpres/rpres
+      if (px .lt. one ) then
+rarefvel(cxr,px,temp)dnl
+      else
+shockvel(cxr,px,temp)dnl
+      endif
+      if (lvel .gt. (rvel - temp)) then
+         leftwave = 1
+      else
+         leftwave = 2
+      endif
+
+
+      px = rpres/lpres
+      if (px .lt. one ) then
+rarefvel(cxl,px,temp)
+      else
+shockvel(cxl,px,temp)
+      endif
+      if ((lvel + temp) .gt. rvel ) then
+         rightwave = 1
+      else
+         rightwave = 2
+      endif
+
+c-----------------------------------------------------------------
+c     SOLVE RIEMANN PROBLEM
+
+      if ((leftwave.eq.2).and.(rightwave.eq.1)) then
+c 	LEFT RAREF , RIGHT SHOCK
+         pstar = rpres
+         pxl = pstar/lpres
+         pxr = pstar/rpres
+rarefvel(cxl,pxl,fleft)dnl
+shockvel(cxr,pxr,fright)dnl
+derrvel(cxl,pxl,dfleft)dnl
+dersvel(cxr,pxr,dfright)dnl
+         do it=1,9
+            feval = lvel + fleft - rvel + fright
+            dfeval = dfleft/lpres + dfright/rpres
+            pstar = pstar -feval/dfeval
+            pxl = pstar/lpres
+            pxr = pstar/rpres
+            if (pstar.lt.minpres) then
+               write(6,*)" pressure is too small or negative in
+     &                 exactsolver"
+               write(6,*)"   left state  ",lrho,lvel,lpres
+               write(6,*)"   right state ",rrho,rvel,rpres
+               write(6,*)"   lwave rwave = ",leftwave,rightwave
+            endif
+rarefvel(cxl,pxl,fleft)dnl
+shockvel(cxr,pxr,fright)dnl
+derrvel(cxl,pxl,dfleft)dnl
+dersvel(cxr,pxr,dfright)dnl
+         enddo
+         pstar=max(pstar,minpres  )
+         ustarl = lvel + fleft
+         ustarr = rvel - fright
+         rstarl = lrho*exp(log(pxl)/gamma)
+         rstarr = rrho*(1+beta*pxr)/(beta+pxr)
+      elseif ((leftwave.eq.1).and.(rightwave.eq.2)) then
+c 	LEFT SHOCK ,RIGHT RAREF
+         pstar = lpres
+         pxl = pstar/lpres
+         pxr = pstar/rpres
+shockvel(cxl,pxl,fleft)dnl
+rarefvel(cxr,pxr,fright)dnl
+dersvel(cxl,pxl,dfleft)dnl
+derrvel(cxr,pxr,dfright)dnl
+         do it=1,5
+            feval = lvel + fleft - rvel + fright
+            dfeval = dfleft/lpres + dfright/rpres
+            pstar = pstar -feval/dfeval
+            pxl = pstar/lpres
+            pxr = pstar/rpres
+            if (pstar.lt.minpres) then
+               write(6,*)" pressure is too small or negative in
+     &                 exactsolver"
+               write(6,*)"   left state  ",lrho,lvel,lpres
+               write(6,*)"   right state ",rrho,rvel,rpres
+               write(6,*)"   lwave rwave = ",leftwave,rightwave
+            endif
+shockvel(cxl,pxl,fleft)dnl
+rarefvel(cxr,pxr,fright)dnl
+dersvel(cxl,pxl,dfleft)dnl
+derrvel(cxr,pxr,dfright)dnl
+         enddo
+         pstar=max(pstar,minpres  )
+         ustarl = lvel + fleft
+         ustarr = rvel - fright
+         rstarl = lrho*(1+beta*pxl)/(beta+pxl)
+         rstarr = rrho*exp(log(pxr)/gamma)
+      elseif ((leftwave.eq.1).and.(rightwave.eq.1)) then
+c 	RIGHT SHOCK, LEFT SHOCK
+         pstar = max(rpres,lpres)
+         pxl = pstar/lpres
+         pxr = pstar/rpres
+shockvel(cxl,pxl,fleft)dnl
+shockvel(cxr,pxr,fright)dnl
+dersvel(cxl,pxl,dfleft)dnl
+dersvel(cxr,pxr,dfright)dnl
+         do it=1,5
+            feval = lvel + fleft - rvel + fright
+            dfeval = dfleft/lpres + dfright/rpres
+            pstar = pstar -feval/dfeval
+            pxl = pstar/lpres
+            pxr = pstar/rpres
+            if (pstar.lt.minpres) then
+               write(6,*)" pressure is too small or negative in
+     &                 exactsolver"
+               write(6,*)"   left state  ",lrho,lvel,lpres
+               write(6,*)"   right state ",rrho,rvel,rpres
+               write(6,*)"   lwave rwave = ",leftwave,rightwave
+            endif
+shockvel(cxl,pxl,fleft)dnl
+shockvel(cxr,pxr,fright)dnl
+dersvel(cxl,pxl,dfleft)dnl
+dersvel(cxr,pxr,dfright)dnl
+         enddo
+         pstar=max(pstar,minpres  )
+         ustarl = lvel + fleft
+         ustarr = rvel - fright
+         rstarl = lrho*(1+beta*pxl)/(beta+pxl)
+         rstarr = rrho*(1+beta*pxr)/(beta+pxr)
+      else
+c 	RIGHT RAREF, LEFT RAREF
+         pstarl =  exp(tau*log(lpres))
+         pstarr =  exp(tau*log(rpres))
+         pstar = (half*(gamma-1)*(lvel-rvel)+cxl+cxr)/
+     &           (cxr/pstarr +cxl/pstarl)
+         pstar = exp(log(pstar)/tau)
+         if (pstar.lt.minpres) then
+            write(6,*)" pressure is too small or negative in
+     &              exactsolver"
+            write(6,*)"   left state  ",lrho,lvel,lpres
+            write(6,*)"   right state ",rrho,rvel,rpres
+            write(6,*)"   lwave rwave = ",leftwave,rightwave
+         endif
+         pstar=max(pstar,minpres  )
+         pxl = pstar/lpres
+         pxr = pstar/rpres
+rarefvel(cxl,pxl,fleft)dnl
+rarefvel(cxr,pxr,fright)dnl
+         ustarl = lvel + fleft
+         ustarr = rvel - fright
+         rstarl = lrho*exp(log(pxl)/gamma)
+         rstarr = rrho*exp(log(pxr)/gamma)
+      endif
+      pstarl = pstar
+      pstarr = pstar
+ 
+      ustar=half*(ustarl+ustarr)
+
+c-----------------------------------------------------------------
+c     PICK STATE FOR FLUXES
+
+      sein=-dsign( one ,ustar)
+      if (sein.ge.zero) then
+          ro=rrho
+          uo=rvel
+          po=rpres
+          rstar =rstarr
+      else
+          ro=lrho
+          uo=lvel
+          po=lpres
+          rstar =rstarl
+      endif
+      cstar=sqrt(gamma*pstar/rstar)
+      dummy=pstar-po
+      if (dummy.ge.zero) then
+c		shock
+         wo=sqrt(gamma*ro*po*( one +gp1g2i*dummy/po))
+         ushok=sein*ustar+wo/rstar
+         if (ushok.ge.zero) then
+            striem(1)=rstar
+            striem(2)=ustar
+            striem(3)=pstar
+         else 
+            striem(1)=ro
+            striem(2)=uo
+            striem(3)=po
+         endif
+      else
+c		rarefaction
+         co=sqrt(po*gamma/ro)
+         wso=sein*uo+co
+         wsi=sein*ustar+cstar
+         if (wsi.ge.zero) then
+            striem(1)=rstar
+            striem(2)=ustar
+            striem(3)=pstar
+         else if (wso.lt.zero) then
+            striem(1)=ro
+            striem(2)=uo
+            striem(3)=po
+         else
+            t4=(wso+wsi)/max(wso-wsi,wso+wsi,smallr)
+            t4= half *(t4+ one )
+            t5= one -t4
+            t3=t4*cstar+t5*co
+            striem(1)=t4*rstar+t5*ro
+            striem(2)=t4*ustar+t5*uo
+            striem(3)=t3*t3*striem(1)/gamma
+         endif
+      endif
+c     ------------------------------------------------------------------
+c     write(6,*) "leaving riemnv"
+c     ------------------------------------------------------------------
+ 666  return
+      end
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/probparams.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/probparams.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,11 @@
+      common/probparams/APPROX_RIEM_SOLVE,EXACT_RIEM_SOLVE,
+     &  HLLC_RIEM_SOLVE,
+     &  PIECEWISE_CONSTANT_X,PIECEWISE_CONSTANT_Y,PIECEWISE_CONSTANT_Z,
+     &  SPHERE,STEP,
+     &  CELLG,FACEG,FLUXG
+      integer 
+     &  APPROX_RIEM_SOLVE,EXACT_RIEM_SOLVE,HLLC_RIEM_SOLVE,
+     &  PIECEWISE_CONSTANT_X,PIECEWISE_CONSTANT_Y,PIECEWISE_CONSTANT_Z,
+     &  SPHERE,STEP,
+     &  CELLG,FACEG,FLUXG
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/fortran/stufprobc.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/fortran/stufprobc.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,29 @@
+      subroutine stufprobc(
+     &  APPROX_RIEM_SOLVEin,EXACT_RIEM_SOLVEin,HLLC_RIEM_SOLVEin,
+     &  PIECEWISE_CONSTANT_Xin,PIECEWISE_CONSTANT_Yin,
+     &  PIECEWISE_CONSTANT_Zin,
+     &  SPHEREin,STEPin,
+     &  CELLGin,FACEGin,FLUXGin)
+      implicit none
+      integer 
+     &  APPROX_RIEM_SOLVEin,EXACT_RIEM_SOLVEin,HLLC_RIEM_SOLVEin,
+     &  PIECEWISE_CONSTANT_Xin,PIECEWISE_CONSTANT_Yin,
+     &  PIECEWISE_CONSTANT_Zin,
+     &  SPHEREin,STEPin,
+     &  CELLGin,FACEGin,FLUXGin
+include(FORTDIR/../probparams.i)dnl
+
+      APPROX_RIEM_SOLVE=APPROX_RIEM_SOLVEin
+      EXACT_RIEM_SOLVE=EXACT_RIEM_SOLVEin
+      HLLC_RIEM_SOLVE=HLLC_RIEM_SOLVEin
+      PIECEWISE_CONSTANT_X=PIECEWISE_CONSTANT_Xin
+      PIECEWISE_CONSTANT_Y=PIECEWISE_CONSTANT_Yin
+      PIECEWISE_CONSTANT_Z=PIECEWISE_CONSTANT_Zin
+      SPHERE=SPHEREin
+      STEP=STEPin
+      CELLG=CELLGin
+      FACEG=FACEGin
+      FLUXG=FLUXGin
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/intToString.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/intToString.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,41 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   $Description 
+ *
+ ************************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "intToString.h"
+
+#include <string>
+
+#include <sstream>
+#include <iomanip>
+
+using namespace std;
+
+string intToString(
+   int i,
+   int min_length)
+{
+#if 1
+   ostringstream co;
+   co << setw(min_length) << setfill('0') << i;
+   return string(co.str());
+
+#else
+   char f[50];
+   sprintf(f, "%%%dd", min_length);
+   char s[50];
+   sprintf(s, f, i);
+   return string(s);
+
+#endif
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/intToString.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/intToString.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,21 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   $Description 
+ *
+ ************************************************************************/
+
+#ifndef __INCLUDED_intToString_h__
+#define __INCLUDED_intToString_h__
+
+#include <string>
+
+std::string
+intToString(
+   int i,
+   int min_length = 1);
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/main.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/main.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,721 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program for SAMRAI Euler gas dynamics sample application 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string>
+#include <fstream>
+using namespace std;
+
+#ifndef _MSC_VER
+#include <unistd.h>
+#endif
+
+#include <sys/stat.h>
+
+// Headers for basic SAMRAI objects
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/tbox/InputDatabase.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+// Headers for major algorithm/data structure objects from SAMRAI
+
+#include "SAMRAI/mesh/BergerRigoutsos.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/mesh/GriddingAlgorithm.h"
+#include "SAMRAI/mesh/TreeLoadBalancer.h"
+#include "SAMRAI/algs/HyperbolicLevelIntegrator.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/mesh/StandardTagAndInitialize.h"
+#include "SAMRAI/algs/TimeRefinementIntegrator.h"
+#include "SAMRAI/algs/TimeRefinementLevelStrategy.h"
+#include "SAMRAI/appu/VisItDataWriter.h"
+
+#define RECORD_STATS
+//#undef RECORD_STATS
+#ifdef RECORD_STATS
+#include "SAMRAI/tbox/Statistic.h"
+#include "SAMRAI/tbox/Statistician.h"
+#endif
+
+// Header for application-specific algorithm/data structure object
+
+#include "Euler.h"
+
+// Classes for autotesting.
+
+#if (TESTING == 1)
+#include "AutoTester.h"
+#endif
+
+void
+outputStats(
+   mesh::GriddingAlgorithm& gridding_algorithm,
+   algs::HyperbolicLevelIntegrator& hyp_level_integrator);
+
+using namespace SAMRAI;
+
+using namespace SAMRAI::tbox;
+
+/*
+ ************************************************************************
+ *                                                                      *
+ * This is the main program for an AMR Euler gas dynamics application   *
+ * built using SAMRAI.   The application program is constructed by      *
+ * composing a variety of algorithm objects found in SAMRAI plus some   *
+ * others that are specific to this application.   The following brief  *
+ * discussion summarizes these objects.                                 *
+ *                                                                      *
+ *    hier::PatchHierarchy - A container for the AMR patch hierarchy and *
+ *       the data on the grid.                                          *
+ *                                                                      *
+ *    geom::CartesianGridGeometry - Defines and maintains the Cartesian *
+ *       coordinate system on the grid.  The hier::PatchHierarchy *
+ *       maintains a reference to this object.                          *
+ *                                                                      *
+ * A single overarching algorithm object drives the time integration    *
+ * and adaptive gridding processes:                                     *
+ *                                                                      *
+ *    algs::TimeRefinementIntegrator - Coordinates time integration and *
+ *       adaptive gridding procedures for the various levels            *
+ *       in the AMR patch hierarchy.  Local time refinement is          *
+ *       employed during hierarchy integration; i.e., finer             *
+ *       levels are advanced using smaller time increments than         *
+ *       coarser level.  Thus, this object also invokes data            *
+ *       synchronization procedures which couple the solution on        *
+ *       different patch hierarchy levels.                              *
+ *                                                                      *
+ * The time refinement integrator is not specific to the numerical      *
+ * methods used and the problem being solved.   It maintains references *
+ * to two other finer grain algorithmic objects, more specific to       *
+ * the problem at hand, with which it is configured when they are       *
+ * passed into its constructor.   They are:                             *
+ *                                                                      *
+ *    algs::HyperbolicLevelIntegrator - Defines data management procedures *
+ *       for level integration, data synchronization between levels,    *
+ *       and tagging cells for refinement.  These operations are        *
+ *       tailored to explicit time integration algorithms used for      *
+ *       hyperbolic systems of conservation laws, such as the Euler     *
+ *       equations.  This integrator manages data for numerical         *
+ *       routines that treat individual patches in the AMR patch        *
+ *       hierarchy.  In this particular application, it maintains a     *
+ *       pointer to the Euler object that defines variables and         *
+ *       provides numerical routines for the Euler model.               *
+ *                                                                      *
+ *       Euler - Defines variables and numerical routines for the       *
+ *          discrete Euler equations on each patch in the AMR           *
+ *          hierarchy.                                                  *
+ *                                                                      *
+ *    mesh::GriddingAlgorithm - Drives the AMR patch hierarchy generation *
+ *       and regridding procedures.  This object maintains              *
+ *       references to three other algorithmic objects with             *
+ *       which it is configured when they are passed into its           *
+ *       constructor.   They are:                                       *
+ *                                                                      *
+ *       mesh::BergerRigoutsos - Clusters cells tagged for refinement on a *
+ *          patch level into a collection of logically-rectangular      *
+ *          box domains.                                                *
+ *                                                                      *
+ *       mesh::TreeLoadBalancer - Processes the boxes generated by the *
+ *          mesh::BergerRigoutsos algorithm into a configuration from *
+ *          which patches are contructed.  The algorithm we use in this *
+ *          class assumes a spatially-uniform workload distribution;    *
+ *          thus, it attempts to produce a collection of boxes          *
+ *          each of which contains the same number of cells.  The       *
+ *          load balancer also assigns patches to processors.           *
+ *                                                                      *
+ *       mesh::StandardTagAndInitialize - Couples the gridding algorithm *
+ *          to the HyperbolicIntegrator. Selects cells for              *
+ *          refinement based on either Gradient detection, Richardson   *
+ *          extrapolation, or pre-defined Refine box region.  The       *
+ *          object maintains a pointer to the algs::HyperbolicLevelIntegrator, *
+ *          which is passed into its constructor, for this purpose.     *
+ *                                                                      *
+ ************************************************************************
+ */
+
+/*
+ *******************************************************************
+ *                                                                 *
+ * For each run, the input filename and restart information        *
+ * (if needed) must be given on the command line.                  *
+ *                                                                 *
+ *      For non-restarted case, command line is:                   *
+ *                                                                 *
+ *          executable <input file name>                           *
+ *                                                                 *
+ *      For restarted run, command line is:                        *
+ *                                                                 *
+ *          executable <input file name> <restart directory> \     *
+ *                     <restart number>                            *
+ *                                                                 *
+ * Accessory routines used within the main program:                *
+ *                                                                 *
+ *   dumpVizData1dPencil - Writes 1d pencil of Euler solution data *
+ *      to plot files so that it may be viewed in MatLab.  This    *
+ *      routine assumes a single patch level in 2d and 3d.  In     *
+ *      other words, it only plots data on level zero.  It can     *
+ *      handle AMR in 1d.                                          *
+ *                                                                 *
+ *******************************************************************
+ */
+
+int main(
+   int argc,
+   char* argv[])
+{
+
+   /*
+    * Initialize MPI and SAMRAI, enable logging, and process command line.
+    */
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   int num_failures = 0;
+
+   {
+      const tbox::Dimension dim(NDIM);
+
+      string input_filename;
+      string restart_read_dirname;
+      int restore_num = 0;
+      string case_name;
+
+      bool is_from_restart = false;
+
+      if ((argc != 2) && (argc != 3) && (argc != 4)) {
+         pout << "USAGE:\n"
+         << argv[0] << " <input filename> "
+         << "or\n"
+         << argv[0] << " <input filename> <case name>"
+         << "or\n"
+         << argv[0] << " <input filename> "
+                    << "  <restart dir> <restore number> [options]\n"
+                    << "  options:\n"
+                    << "  none at this time"
+                    << endl;
+         tbox::SAMRAI_MPI::abort();
+         return -1;
+      } else {
+         input_filename = argv[1];
+
+         if (argc == 3) {
+            case_name = argv[2];
+         }
+         if (argc == 4) {
+            restart_read_dirname = argv[2];
+            restore_num = atoi(argv[3]);
+
+            is_from_restart = true;
+         }
+      }
+
+      plog << "input_filename = " << input_filename << endl;
+      plog << "restart_read_dirname = " << restart_read_dirname << endl;
+      plog << "restore_num = " << restore_num << endl;
+
+      /*
+       * Create input database and parse all data in input file.
+       */
+
+      Pointer<Database> input_db = new InputDatabase("input_db");
+      InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      /*
+       * Retrieve "Main" section of the input database.  First, read dump
+       * information, which is used for writing plot files.  Second, if
+       * proper restart information was given on command line, and the
+       * restart interval is non-zero, create a restart database.
+       */
+
+      Pointer<Database> main_db = input_db->getDatabase("Main");
+
+      string base_name = main_db->getStringWithDefault("base_name", "unnamed");
+
+      /*
+       * Modify basename for this particular run.
+       * Add the number of processes and the case name.
+       */
+      if (!case_name.empty()) {
+         base_name = base_name + '-' + case_name;
+      }
+      base_name = base_name + '-' + tbox::Utilities::intToString(
+            SAMRAI_MPI::getNodes(),
+            5);
+      pout << "Added case name (" << case_name << ") and nprocs ("
+           << SAMRAI_MPI::getNodes() << ") to base name -> '"
+           << base_name << "'\n";
+
+      /*
+       * Logging.
+       */
+      string log_filename = base_name + ".log";
+      log_filename =
+         main_db->getStringWithDefault("log_filename", base_name + ".log");
+
+      bool log_all_nodes = false;
+      log_all_nodes =
+         main_db->getBoolWithDefault("log_all_nodes", log_all_nodes);
+      if (log_all_nodes) {
+         PIO::logAllNodes(log_filename);
+      } else {
+         PIO::logOnlyNodeZero(log_filename);
+      }
+
+      int viz_dump_interval = 0;
+      if (main_db->keyExists("viz_dump_interval")) {
+         viz_dump_interval = main_db->getInteger("viz_dump_interval");
+      }
+
+      Array<string> viz_writer(1);
+      viz_writer[0] = "VisIt";
+      string viz_dump_filename;
+      string visit_dump_dirname = base_name + ".visit";
+      bool uses_visit = false;
+      int visit_number_procs_per_file = 1;
+      if (viz_dump_interval > 0) {
+         if (main_db->keyExists("viz_writer")) {
+            viz_writer = main_db->getStringArray("viz_writer");
+         }
+         if (main_db->keyExists("viz_dump_filename")) {
+            viz_dump_filename = main_db->getString("viz_dump_filename");
+         }
+         string viz_dump_dirname = base_name;
+         if (main_db->keyExists("viz_dump_dirname")) {
+            viz_dump_dirname = main_db->getString("viz_dump_dirname");
+         }
+         for (int i = 0; i < viz_writer.getSize(); i++) {
+            if (viz_writer[i] == "VisIt") uses_visit = true;
+         }
+         visit_dump_dirname = viz_dump_dirname + ".visit";
+         if (uses_visit) {
+            if (viz_dump_dirname.empty()) {
+               TBOX_ERROR("main(): "
+                  << "\nviz_dump_dirname is null ... "
+                  << "\nThis must be specified for use with VisIt"
+                  << endl);
+            }
+            if (main_db->keyExists("visit_number_procs_per_file")) {
+               visit_number_procs_per_file =
+                  main_db->getInteger("visit_number_procs_per_file");
+            }
+         }
+      }
+
+      int restart_interval = 0;
+      if (main_db->keyExists("restart_interval")) {
+         restart_interval = main_db->getInteger("restart_interval");
+      }
+
+      string restart_write_dirname;
+      if (restart_interval > 0) {
+         if (main_db->keyExists("restart_write_dirname")) {
+            restart_write_dirname = main_db->getString("restart_write_dirname");
+         } else {
+            TBOX_ERROR(
+               "`restart_interval' > 0, but key `restart_write_dirname'"
+               << "not found in input file.");
+         }
+      }
+
+      bool use_refined_timestepping = true;
+      if (main_db->keyExists("timestepping")) {
+         string timestepping_method = main_db->getString("timestepping");
+         if (timestepping_method == "SYNCHRONIZED") {
+            use_refined_timestepping = false;
+         }
+      }
+
+#if (TESTING == 1) && !(HAVE_HDF5)
+      /*
+       * If we are autotesting on a system w/o HDF5, the read from
+       * restart will result in an error.  We want this to happen
+       * for users, so they know there is a problem with the restart,
+       * but we don't want it to happen when autotesting.
+       */
+      is_from_restart = false;
+      restart_interval = 0;
+#endif
+
+      const bool write_restart = (restart_interval > 0)
+         && !(restart_write_dirname.empty());
+
+      /*
+       * Get restart manager and root restart database.  If run is from
+       * restart, open the restart file.
+       */
+
+      RestartManager* restart_manager = RestartManager::getManager();
+
+      if (is_from_restart) {
+         restart_manager->
+         openRestartFile(restart_read_dirname, restore_num,
+            tbox::SAMRAI_MPI::getNodes());
+      }
+
+      /*
+       * Setup the timer manager to trace timing statistics during execution
+       * of the code.  The list of timers is given in the TimerManager
+       * section of the input file.  Timing information is stored in the
+       * restart file.  Timers will automatically be initialized to their
+       * previous state if the run is restarted, unless they are explicitly
+       * reset using the TimerManager::resetAllTimers() routine.
+       */
+
+      TimerManager::createManager(input_db->getDatabase("TimerManager"));
+
+      /*
+       * Create major algorithm and data objects which comprise application.
+       * Each object is initialized either from input data or restart
+       * files, or a combination of both.  Refer to each class constructor
+       * for details.  For more information on the composition of objects
+       * and the roles they play in this application, see comments at top of file.
+       */
+
+      Pointer<geom::CartesianGridGeometry> grid_geometry =
+         new geom::CartesianGridGeometry("CartesianGeometry",
+            input_db->getDatabase("CartesianGeometry"));
+
+      Pointer<hier::PatchHierarchy> patch_hierarchy =
+         new hier::PatchHierarchy("PatchHierarchy", grid_geometry,
+            input_db->getDatabase("PatchHierarchy"));
+
+      Euler* euler_model = new Euler("Euler",
+            input_db->getDatabase("Euler"),
+            grid_geometry);
+
+      Pointer<algs::HyperbolicLevelIntegrator> hyp_level_integrator =
+         new algs::HyperbolicLevelIntegrator("HyperbolicLevelIntegrator",
+            input_db->getDatabase(
+               "HyperbolicLevelIntegrator"),
+            euler_model, true,
+            use_refined_timestepping);
+
+      Pointer<mesh::StandardTagAndInitialize> error_detector =
+         new mesh::StandardTagAndInitialize("StandardTagAndInitialize",
+            hyp_level_integrator,
+            input_db->getDatabase("StandardTagAndInitialize"));
+
+      Pointer<Database> abr_db =
+         input_db->getDatabase("BergerRigoutsos");
+      Pointer<mesh::BergerRigoutsos>
+      new_box_generator = new mesh::BergerRigoutsos(abr_db);
+#if 0
+      Pointer<mesh::BergerRigoutsos<NDIM> >
+      old_box_generator = new mesh::BergerRigoutsos<NDIM>();
+      const char which_br = main_db->getCharWithDefault("which_br", 'o');
+      Pointer<mesh::BoxGeneratorStrategy> box_generator =
+         which_br == 'o'
+         ? Pointer<mesh::BoxGeneratorStrategy>(old_box_generator)
+         : Pointer<mesh::BoxGeneratorStrategy>(new_box_generator);
+#endif
+
+      Pointer<mesh::TreeLoadBalancer> load_balancer =
+         new mesh::TreeLoadBalancer(
+            dim,
+            "TreeLoadBalancer",
+            input_db->getDatabase("TreeLoadBalancer"));
+      load_balancer->setSAMRAI_MPI(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+      Pointer<mesh::GriddingAlgorithm> gridding_algorithm =
+         new mesh::GriddingAlgorithm(
+            dim,
+            "GriddingAlgorithm",
+            input_db->getDatabase("GriddingAlgorithm"),
+            error_detector,
+            new_box_generator,
+            load_balancer);
+
+      Pointer<algs::TimeRefinementIntegrator> time_integrator =
+         new algs::TimeRefinementIntegrator("TimeRefinementIntegrator",
+            input_db->getDatabase(
+               "TimeRefinementIntegrator"),
+            patch_hierarchy,
+            hyp_level_integrator,
+            gridding_algorithm);
+
+      /*
+       * Set up Visualization writer.  Note that the Euler application
+       * creates some derived data quantities so we register the Euler model
+       * as a derived data writer.  If no derived data is written, this step
+       * is not necessary.
+       */
+#ifdef HAVE_HDF5
+      Pointer<appu::VisItDataWriter> visit_data_writer =
+         new appu::VisItDataWriter("Euler VisIt Writer",
+            visit_dump_dirname,
+            visit_number_procs_per_file);
+      if (uses_visit) {
+         euler_model->registerVisItDataWriter(visit_data_writer);
+      }
+#endif
+
+      /*
+       * Initialize hierarchy configuration and data on all patches.
+       * Then, close restart file and write initial state for visualization.
+       */
+
+      hier::Connector dummy; // Cause communicator set-up before performance timings.
+      tbox::SAMRAI_MPI::getSAMRAIWorld().Barrier(); // Synchronize for the sake of accurate timings.
+      double dt_now = time_integrator->initializeHierarchy();
+
+      RestartManager::getManager()->closeRestartFile();
+
+#if (TESTING == 1)
+      /*
+       * Create the autotesting component which will verify correctness
+       * of the problem. If no automated testing is done, the object does
+       * not get used.
+       */
+      AutoTester autotester("AutoTester", input_db);
+#endif
+
+      /*
+       * After creating all objects and initializing their state, we
+       * print the input database and variable database contents
+       * to the log file.
+       */
+
+#if 1
+      plog << "\nCheck input data and variables before simulation:" << endl;
+      plog << "Input database..." << endl;
+      input_db->printClassData(plog);
+      plog << "\nVariable database..." << endl;
+      hier::VariableDatabase::getDatabase()->printClassData(plog);
+
+#endif
+      plog << "\nCheck Euler data... " << endl;
+      euler_model->printClassData(plog);
+
+      /*
+       * Create timers for measuring I/O.
+       */
+      Pointer<Timer> t_write_viz = TimerManager::getManager()->
+         getTimer("apps::main::write_viz");
+      Pointer<Timer> t_write_restart = TimerManager::getManager()->
+         getTimer("apps::main::write_restart");
+
+      t_write_viz->start();
+      if (viz_dump_interval > 0) {
+#ifdef HAVE_HDF5
+         if (uses_visit) {
+            visit_data_writer->writePlotData(
+               patch_hierarchy,
+               time_integrator->getIntegratorStep(),
+               time_integrator->getIntegratorTime());
+         }
+#endif
+      }
+      t_write_viz->stop();
+
+      /*
+       * Time step loop.  Note that the step count and integration
+       * time are maintained by algs::TimeRefinementIntegrator.
+       */
+
+      double loop_time = time_integrator->getIntegratorTime();
+      double loop_time_end = time_integrator->getEndTime();
+
+#if (TESTING == 1)
+      /*
+       * If we are doing autotests, check result...
+       */
+      num_failures += autotester.evalTestData(
+            time_integrator->getIntegratorStep(),
+            patch_hierarchy,
+            time_integrator,
+            hyp_level_integrator,
+            gridding_algorithm);
+#endif
+
+      while ((loop_time < loop_time_end) &&
+             time_integrator->stepsRemaining()) {
+
+         int iteration_num = time_integrator->getIntegratorStep() + 1;
+
+         plog << endl << endl;
+         pout << "++++++++++++++++++++++++++++++++++++++++++++" << endl;
+         pout << "At begining of timestep # " << iteration_num - 1 << endl;
+         pout << "Simulation time is " << loop_time << endl;
+         pout << "Current dt is " << dt_now << endl;
+         pout << "++++++++++++++++++++++++++++++++++++++++++++\n\n" << endl;
+         plog << endl << endl;
+
+         double dt_new = time_integrator->advanceHierarchy(dt_now);
+
+         loop_time += dt_now;
+         dt_now = dt_new;
+
+#if 0
+         int hierarchy_cell_count = 0;
+         for (int ln = 0; ln < patch_hierarchy->getNumberLevels(); ++ln) {
+            int level_cell_count = 0;
+            Pointer<hier::PatchLevel> patch_level =
+               patch_hierarchy->getPatchLevel(ln);
+            for (hier::PatchLevel::Iterator pi(patch_level); pi; pi++) {
+               tbox::Pointer<hier::Patch> patch = patch_level->getPatch(*pi);
+               level_cell_count += patch->getBox().size();
+            }
+            cell_count_stat[ln]->recordProcStat(level_cell_count);
+            hierarchy_cell_count += level_cell_count;
+         }
+         for (int ln = patch_hierarchy->getNumberLevels();
+              ln < patch_hierarchy->getMaxNumberOfLevels(); ++ln) {
+            cell_count_stat[ln]->recordProcStat(0);
+         }
+         cell_count_stat[patch_hierarchy->getMaxNumberOfLevels()]->
+         recordProcStat(hierarchy_cell_count);
+         patch_hierarchy->recursivePrint(plog, "", 2);
+         sim_time_stat->recordProcStat(dt_now);
+#endif
+
+         plog << "Hierarchy summary:\n";
+         patch_hierarchy->recursivePrint(plog, "H-> ", 1);
+         plog << "PatchHierarchy summary:\n";
+         patch_hierarchy->recursivePrint(plog,
+            "H-> ",
+            1);
+
+         plog << endl << endl;
+         pout << "\n\n++++++++++++++++++++++++++++++++++++++++++++" << endl;
+         pout << "At end of timestep # " << iteration_num - 1 << endl;
+         pout << "Simulation time is " << loop_time << endl;
+         pout << "++++++++++++++++++++++++++++++++++++++++++++\n\n" << endl;
+         plog << endl << endl;
+
+         /*
+          * At specified intervals, write restart files.
+          */
+         if (write_restart) {
+
+            if ((iteration_num % restart_interval) == 0) {
+               t_write_restart->start();
+               RestartManager::getManager()->
+               writeRestartFile(restart_write_dirname,
+                  iteration_num);
+               t_write_restart->stop();
+            }
+         }
+
+         /*
+          * At specified intervals, write out data files for plotting.
+          */
+         t_write_viz->start();
+         if ((viz_dump_interval > 0)
+             && (iteration_num % viz_dump_interval) == 0) {
+#ifdef HAVE_HDF5
+            if (uses_visit) {
+               visit_data_writer->writePlotData(patch_hierarchy,
+                  iteration_num,
+                  loop_time);
+            }
+#endif
+
+         }
+         t_write_viz->stop();
+
+#if (TESTING == 1)
+         /*
+          * If we are doing autotests, check result...
+          */
+         num_failures += autotester.evalTestData(iteration_num,
+               patch_hierarchy,
+               time_integrator,
+               hyp_level_integrator,
+               gridding_algorithm);
+#endif
+
+         /*
+          * Write byte transfer information to log file.
+          */
+#if 0
+         char num_buf[8];
+         sprintf(num_buf, "%02d", iteration_num);
+         tbox::plog << "Step " << num_buf
+                    << " P" << tbox::SAMRAI_MPI::getRank()
+                    << ": " << tbox::SAMRAI_MPI::getIncomingBytes()
+                    << " bytes in" << endl;
+#endif
+
+      }
+
+      /*
+       * Output timer results.
+       */
+      TimerManager::getManager()->print(plog);
+
+#ifdef RECORD_STATS
+      outputStats(*gridding_algorithm, *hyp_level_integrator);
+#endif
+
+      /*
+       * At conclusion of simulation, deallocate objects.
+       */
+      patch_hierarchy.setNull();
+      grid_geometry.setNull();
+
+      new_box_generator.setNull();
+      load_balancer.setNull();
+      hyp_level_integrator.setNull();
+      error_detector.setNull();
+      gridding_algorithm.setNull();
+      time_integrator.setNull();
+
+#ifdef HAVE_HDF5
+      visit_data_writer.setNull();
+#endif
+
+      if (euler_model) delete euler_model;
+
+   }
+
+   if (num_failures == 0) {
+      tbox::pout << "\nPASSED:  Euler" << endl;
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return num_failures;
+}
+
+#ifdef RECORD_STATS
+void outputStats(
+   mesh::GriddingAlgorithm& gridding_algorithm,
+   algs::HyperbolicLevelIntegrator& hyp_level_integrator)
+{
+   /*
+    * Output statistics.
+    */
+   tbox::plog << "HyperbolicLevelIntegrator statistics:" << endl;
+   hyp_level_integrator.printStatistics(tbox::plog);
+   tbox::plog << "\nGriddingAlgorithm statistics:" << endl;
+   gridding_algorithm.printStatistics(tbox::plog);
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/performance_inputs/mEuler/sphere-2l1x.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/performance_inputs/mEuler/sphere-2l1x.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,297 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (3d sphere) 
+ *
+ ************************************************************************/
+
+// 2-level Euler strong scaling performance test.
+log_actions = 'n'
+check_input_connectors = 'n'
+check_output_connectors = 'n'
+check_connectors = 'n'
+print_layer_hierarchy = 'n'
+DistributedLoadBalancer_print_steps = 'n'
+DistributedLoadBalancer_check_connectivity = 'n'
+check_map = 'n'
+check_connectivity = 'n'
+print_steps = 'n'
+print_swap_steps = 'n'
+print_break_steps = 'n'
+print_edge_steps = 'n'
+
+
+GlobalInputs {
+   //use_new_comm_sched = FALSE  // uncomment to turn on OLD
+   use_newest_comm_sched = TRUE // uncomment to turn on NEW
+   //use_old_method_for_clustering = TRUE // uncomment to turn on OLD
+}
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4
+
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   corner_transport     = "CORNER_TRANSPORT_2"
+
+   data_problem         = "SPHERE"
+
+   Initial_data {
+      radius            = 0.3
+      center            = 0.0, 0.0, 0.0
+
+      density_inside    = 1.0
+      velocity_inside   = 0.0 , 0.0, 0.0
+      pressure_inside   = 1140.35
+
+      density_outside    = 1.0
+      velocity_outside   = 0.0 , 0.0, 0.0 
+      pressure_outside   = 0.00001
+
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT"
+ 
+      PRESSURE_GRADIENT {
+         grad_tol = 100.0
+      }
+ 
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+
+      PRESSURE_DEVIATION {
+         dev_tol = 0.01
+        pressure_dev = 0.01
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+
+   }
+
+}
+
+
+BergerRigoutsos {
+   algo_advance_mode = "ADVANCE_SOME"
+   owner_mode = "MOST_OVERLAP"
+   log_node_history = FALSE
+   use_level_boxes = FALSE
+   use_private_communicator = TRUE
+   sort_output_nodes = TRUE
+   log_cluster_summary = TRUE
+}
+
+// BaselineMain is used only by the baseline code.
+BaselineMain {
+   base_name = "spbsl-2l1x"
+   log_all_nodes = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt"
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+   restart_write_dirname   = "restart_sphere3d"
+
+   // which_br: 'o' = old, 'n' = new
+   which_br = 'o'
+}
+
+// Main is used only by the new code.
+Main {
+   base_name = "spnew-2l1x"
+   log_all_nodes = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt"
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+   restart_write_dirname   = "restart_sphere3d"
+}
+
+
+TimerManager{
+  // timer_list = "*::*::*"
+  timer_list = "hier::*::*", "mesh::*::*", "xfer::*::*", "algs::*::*", "apps::*::*"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+  print_threshold = 0
+  print_summed = TRUE
+  print_max = TRUE
+}
+
+CartesianGeometry {
+   // domain_boxes  = [ (0, 0, 0) , (49, 49, 49) ]
+   domain_boxes  = [ (0, 0, 0) , (63, 63, 63) ]
+   // domain_boxes  = [ (0, 0, 0) , (7, 7, 7) ]
+   x_lo          = 0.e0, 0.e0, 0.e0     // lower end of computational domain.
+   x_up          = 4.e0, 4.e0, 4.e0  // upper end of computational domain.
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+   max_levels             = 2        // Maximum number of levels in hierarchy.
+   ratio_to_coarser {            // vector ratio to next coarser level
+      level_1             = 4 , 4 , 4 
+      level_2             = 4 , 4 , 4 
+      level_3             = 4 , 4 , 4 
+   }
+
+   largest_patch_size {
+      // level_0 =  32, 32, 32  // largest patch allowed in hierarchy
+      level_0 =  -1, -1, -1  // No limit on largest patch.
+           // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 =  8, 8, 8 
+      level_1 =  8, 8, 8 
+      // all finer levels will use same values as level_0...
+   }
+
+   allow_patches_smaller_than_ghostwidth = TRUE
+}
+
+GriddingAlgorithm {
+   efficiency_tolerance   = 0.90e0    // min % of tag cells in new patch level
+   combine_efficiency     = 0.90e0    // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+   barrier_before_clustering = FALSE
+   sequentialize_patch_indices = FALSE
+   check_nonrefined_tags = "IGNORE"
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 0.1000   // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   max_integrator_steps  = 100     // max number of simulation timesteps
+   // max_integrator_steps  = 1     // max number of simulation timesteps
+}
+
+// DistributedLoadBalancer is used by the new code.
+DistributedLoadBalancer {
+  report_load_balance = FALSE
+}
+
+TreeLoadBalancer {
+  report_load_balance = FALSE
+  barrier_before = TRUE
+  barrier_after = TRUE
+  n_root_cycles = 2
+}
+
+// LoadBalancer is used by the new code.
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/performance_inputs/mEuler/sphere-2l2x.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/performance_inputs/mEuler/sphere-2l2x.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,295 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (3d sphere) 
+ *
+ ************************************************************************/
+
+// 2-level Euler strong scaling performance test.
+log_actions = 'n'
+check_input_connectors = 'n'
+check_output_connectors = 'n'
+check_connectors = 'n'
+print_layer_hierarchy = 'n'
+DistributedLoadBalancer_print_steps = 'n'
+DistributedLoadBalancer_check_connectivity = 'n'
+check_map = 'n'
+check_connectivity = 'n'
+print_steps = 'n'
+print_swap_steps = 'n'
+print_break_steps = 'n'
+print_edge_steps = 'n'
+
+
+GlobalInputs {
+   //use_new_comm_sched = FALSE  // uncomment to turn on OLD
+   use_newest_comm_sched = TRUE // uncomment to turn on NEW
+   //use_old_method_for_clustering = TRUE // uncomment to turn on OLD
+}
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4
+
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   corner_transport     = "CORNER_TRANSPORT_2"
+
+   data_problem         = "SPHERE"
+
+   Initial_data {
+      radius            = 0.3
+      center            = 2.0, 0.0, 0.0
+
+      density_inside    = 1.0
+      velocity_inside   = 0.0 , 0.0, 0.0
+      pressure_inside   = 1140.35
+
+      density_outside    = 1.0
+      velocity_outside   = 0.0 , 0.0, 0.0 
+      pressure_outside   = 0.00001
+
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT"
+ 
+      PRESSURE_GRADIENT {
+         grad_tol = 100.0
+      }
+ 
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+
+      PRESSURE_DEVIATION {
+         dev_tol = 0.01
+        pressure_dev = 0.01
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+
+   }
+
+}
+
+
+BergerRigoutsos {
+   algo_advance_mode = "ADVANCE_SOME"
+   owner_mode = "MOST_OVERLAP"
+   log_node_history = FALSE
+   use_level_boxes = FALSE
+   use_private_communicator = TRUE
+   sort_output_nodes = TRUE
+   log_cluster_summary = TRUE
+}
+
+// BaselineMain is used only by the baseline code.
+BaselineMain {
+   base_name = "spbsl-2l2x"
+   log_all_nodes = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt"
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+   restart_write_dirname   = "restart_sphere3d"
+
+   // which_br: 'o' = old, 'n' = new
+   which_br = 'o'
+}
+
+// Main is used only by the new code.
+Main {
+   base_name = "spnew-2l2x"
+   log_all_nodes = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt"
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+   restart_write_dirname   = "restart_sphere3d"
+}
+
+
+TimerManager{
+  // timer_list = "*::*::*"
+  timer_list = "hier::*::*", "mesh::*::*", "xfer::*::*", "algs::*::*", "apps::*::*"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+  print_threshold = 0
+  print_summed = TRUE
+  print_max = TRUE
+}
+
+CartesianGeometry {
+   // domain_boxes  = [ (0, 0, 0) , (49, 49, 49) ]
+   domain_boxes  = [ (0, 0, 0) , (63, 63, 63) ]
+   // domain_boxes  = [ (0, 0, 0) , (7, 7, 7) ]
+   x_lo          = 0.e0, 0.e0, 0.e0     // lower end of computational domain.
+   x_up          = 4.e0, 4.e0, 4.e0  // upper end of computational domain.
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+   max_levels             = 2        // Maximum number of levels in hierarchy.
+   ratio_to_coarser {            // vector ratio to next coarser level
+      level_1             = 4 , 4 , 4 
+      level_2             = 4 , 4 , 4 
+      level_3             = 4 , 4 , 4 
+   }
+
+   largest_patch_size {
+      level_0 =  19, 19, 19  // largest patch allowed in hierarchy
+           // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 =  8, 8, 8 
+      level_1 =  8, 8, 8 
+      // all finer levels will use same values as level_0...
+   }
+   allow_patches_smaller_than_ghostwidth = TRUE
+}
+
+GriddingAlgorithm {
+   efficiency_tolerance   = 0.90e0    // min % of tag cells in new patch level
+   combine_efficiency     = 0.90e0    // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+   barrier_before_clustering = FALSE
+   sequentialize_patch_indices = FALSE
+   check_nonrefined_tags = "IGNORE"
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 0.1000   // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   max_integrator_steps  = 100     // max number of simulation timesteps
+   // max_integrator_steps  = 1     // max number of simulation timesteps
+}
+
+// DistributedLoadBalancer is used by the new code.
+DistributedLoadBalancer {
+  report_load_balance = FALSE
+}
+
+TreeLoadBalancer {
+  report_load_balance = FALSE
+  barrier_before = TRUE
+  barrier_after = TRUE
+  n_root_cycles = 2
+}
+
+// LoadBalancer is used by the new code.
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/performance_inputs/mEuler/sphere-2l4x.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/performance_inputs/mEuler/sphere-2l4x.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,296 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (3d sphere) 
+ *
+ ************************************************************************/
+
+// 2-level Euler strong scaling performance test.
+log_actions = 'n'
+check_input_connectors = 'n'
+check_output_connectors = 'n'
+check_connectors = 'n'
+print_layer_hierarchy = 'n'
+DistributedLoadBalancer_print_steps = 'n'
+DistributedLoadBalancer_check_connectivity = 'n'
+check_map = 'n'
+check_connectivity = 'n'
+print_steps = 'n'
+print_swap_steps = 'n'
+print_break_steps = 'n'
+print_edge_steps = 'n'
+
+
+GlobalInputs {
+   //use_new_comm_sched = FALSE  // uncomment to turn on OLD
+   use_newest_comm_sched = TRUE // uncomment to turn on NEW
+   //use_old_method_for_clustering = TRUE // uncomment to turn on OLD
+}
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4
+
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   corner_transport     = "CORNER_TRANSPORT_2"
+
+   data_problem         = "SPHERE"
+
+   Initial_data {
+      radius            = 0.3
+      center            = 2.0, 2.0, 0.0
+
+      density_inside    = 1.0
+      velocity_inside   = 0.0 , 0.0, 0.0
+      pressure_inside   = 1140.35
+
+      density_outside    = 1.0
+      velocity_outside   = 0.0 , 0.0, 0.0 
+      pressure_outside   = 0.00001
+
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT"
+ 
+      PRESSURE_GRADIENT {
+         grad_tol = 100.0
+      }
+ 
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+
+      PRESSURE_DEVIATION {
+         dev_tol = 0.01
+        pressure_dev = 0.01
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+
+   }
+
+}
+
+
+BergerRigoutsos {
+   algo_advance_mode = "ADVANCE_SOME"
+   owner_mode = "MOST_OVERLAP"
+   log_node_history = FALSE
+   use_level_boxes = FALSE
+   use_private_communicator = TRUE
+   sort_output_nodes = TRUE
+   log_cluster_summary = TRUE
+}
+
+// BaselineMain is used only by the baseline code.
+BaselineMain {
+   base_name = "spbsl-2l4x"
+   log_all_nodes = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt"
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+   restart_write_dirname   = "restart_sphere3d"
+
+   // which_br: 'o' = old, 'n' = new
+   which_br = 'o'
+}
+
+// Main is used only by the new code.
+Main {
+   base_name = "spnew-2l4x"
+   log_all_nodes = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt"
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+   restart_write_dirname   = "restart_sphere3d"
+}
+
+
+TimerManager{
+  // timer_list = "*::*::*"
+  timer_list = "hier::*::*", "mesh::*::*", "xfer::*::*", "algs::*::*", "apps::*::*"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+  print_threshold = 0
+  print_summed = TRUE
+  print_max = TRUE
+}
+
+CartesianGeometry {
+   // domain_boxes  = [ (0, 0, 0) , (49, 49, 49) ]
+   domain_boxes  = [ (0, 0, 0) , (63, 63, 63) ]
+   // domain_boxes  = [ (0, 0, 0) , (7, 7, 7) ]
+   x_lo          = 0.e0, 0.e0, 0.e0     // lower end of computational domain.
+   x_up          = 4.e0, 4.e0, 4.e0  // upper end of computational domain.
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+   max_levels             = 2        // Maximum number of levels in hierarchy.
+   ratio_to_coarser {            // vector ratio to next coarser level
+      level_1             = 4 , 4 , 4 
+      level_2             = 4 , 4 , 4 
+      level_3             = 4 , 4 , 4 
+   }
+
+   largest_patch_size {
+      level_0 =  19, 19, 19  // largest patch allowed in hierarchy
+           // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 =  8, 8, 8 
+      level_1 =  8, 8, 8 
+      // all finer levels will use same values as level_0...
+   }
+
+   allow_patches_smaller_than_ghostwidth = TRUE
+}
+
+GriddingAlgorithm {
+   efficiency_tolerance   = 0.90e0    // min % of tag cells in new patch level
+   combine_efficiency     = 0.90e0    // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+   barrier_before_clustering = FALSE
+   sequentialize_patch_indices = FALSE
+   check_nonrefined_tags = "IGNORE"
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 0.1000   // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   max_integrator_steps  = 100     // max number of simulation timesteps
+   // max_integrator_steps  = 1     // max number of simulation timesteps
+}
+
+// DistributedLoadBalancer is used by the new code.
+DistributedLoadBalancer {
+  report_load_balance = FALSE
+}
+
+TreeLoadBalancer {
+  report_load_balance = FALSE
+  barrier_before = TRUE
+  barrier_after = TRUE
+  n_root_cycles = 2
+}
+
+// LoadBalancer is used by the new code.
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/performance_inputs/mEuler/sphere-2l8x.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/performance_inputs/mEuler/sphere-2l8x.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,296 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (3d sphere) 
+ *
+ ************************************************************************/
+
+// 2-level Euler strong scaling performance test.
+log_actions = 'n'
+check_input_connectors = 'n'
+check_output_connectors = 'n'
+check_connectors = 'n'
+print_layer_hierarchy = 'n'
+DistributedLoadBalancer_print_steps = 'n'
+DistributedLoadBalancer_check_connectivity = 'n'
+check_map = 'n'
+check_connectivity = 'n'
+print_steps = 'n'
+print_swap_steps = 'n'
+print_break_steps = 'n'
+print_edge_steps = 'n'
+
+
+GlobalInputs {
+   //use_new_comm_sched = FALSE  // uncomment to turn on OLD
+   use_newest_comm_sched = TRUE // uncomment to turn on NEW
+   //use_old_method_for_clustering = TRUE // uncomment to turn on OLD
+}
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4
+
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   corner_transport     = "CORNER_TRANSPORT_2"
+
+   data_problem         = "SPHERE"
+
+   Initial_data {
+      radius            = 0.3
+      center            = 2.0, 2.0, 2.0
+
+      density_inside    = 1.0
+      velocity_inside   = 0.0 , 0.0, 0.0
+      pressure_inside   = 1140.35
+
+      density_outside    = 1.0
+      velocity_outside   = 0.0 , 0.0, 0.0 
+      pressure_outside   = 0.00001
+
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT"
+ 
+      PRESSURE_GRADIENT {
+         grad_tol = 100.0
+      }
+ 
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+
+      PRESSURE_DEVIATION {
+         dev_tol = 0.01
+        pressure_dev = 0.01
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+
+   }
+
+}
+
+
+BergerRigoutsos {
+   algo_advance_mode = "ADVANCE_SOME"
+   owner_mode = "MOST_OVERLAP"
+   log_node_history = FALSE
+   use_level_boxes = FALSE
+   use_private_communicator = TRUE
+   sort_output_nodes = TRUE
+   log_cluster_summary = TRUE
+}
+
+// BaselineMain is used only by the baseline code.
+BaselineMain {
+   base_name = "spbsl-2l8x"
+   log_all_nodes = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt"
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+   restart_write_dirname   = "restart_sphere3d"
+
+   // which_br: 'o' = old, 'n' = new
+   which_br = 'o'
+}
+
+// Main is used only by the new code.
+Main {
+   base_name = "spnew-2l8x"
+   log_all_nodes = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt"
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+   restart_write_dirname   = "restart_sphere3d"
+}
+
+
+TimerManager{
+  // timer_list = "*::*::*"
+  timer_list = "hier::*::*", "mesh::*::*", "xfer::*::*", "algs::*::*", "apps::*::*"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+  print_threshold = 0
+  print_summed = TRUE
+  print_max = TRUE
+}
+
+CartesianGeometry {
+   // domain_boxes  = [ (0, 0, 0) , (49, 49, 49) ]
+   domain_boxes  = [ (0, 0, 0) , (63, 63, 63) ]
+   // domain_boxes  = [ (0, 0, 0) , (7, 7, 7) ]
+   x_lo          = 0.e0, 0.e0, 0.e0     // lower end of computational domain.
+   x_up          = 4.e0, 4.e0, 4.e0  // upper end of computational domain.
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+   max_levels             = 2        // Maximum number of levels in hierarchy.
+   ratio_to_coarser {            // vector ratio to next coarser level
+      level_1             = 4 , 4 , 4 
+      level_2             = 4 , 4 , 4 
+      level_3             = 4 , 4 , 4 
+   }
+
+   largest_patch_size {
+      level_0 =  19, 19, 19  // largest patch allowed in hierarchy
+           // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 =  8, 8, 8 
+      level_1 =  8, 8, 8 
+      // all finer levels will use same values as level_0...
+   }
+
+   allow_patches_smaller_than_ghostwidth = TRUE
+}
+
+GriddingAlgorithm {
+   efficiency_tolerance   = 0.90e0    // min % of tag cells in new patch level
+   combine_efficiency     = 0.90e0    // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+   barrier_before_clustering = FALSE
+   sequentialize_patch_indices = FALSE
+   check_nonrefined_tags = "IGNORE"
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 0.1000   // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   max_integrator_steps  = 100     // max number of simulation timesteps
+   // max_integrator_steps  = 1     // max number of simulation timesteps
+}
+
+// DistributedLoadBalancer is used by the new code.
+DistributedLoadBalancer {
+  report_load_balance = FALSE
+}
+
+TreeLoadBalancer {
+  report_load_balance = FALSE
+  barrier_before = TRUE
+  barrier_after = TRUE
+  n_root_cycles = 2
+}
+
+// LoadBalancer is used by the new code.
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/performance_inputs/mEuler/sphere-3l1x.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/performance_inputs/mEuler/sphere-3l1x.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,299 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (3d sphere) 
+ *
+ ************************************************************************/
+
+// 2-level Euler strong scaling performance test.
+log_actions = 'n'
+check_input_connectors = 'n'
+check_output_connectors = 'n'
+check_connectors = 'n'
+print_layer_hierarchy = 'n'
+DistributedLoadBalancer_print_steps = 'n'
+DistributedLoadBalancer_check_connectivity = 'n'
+check_map = 'n'
+check_connectivity = 'n'
+print_steps = 'n'
+print_swap_steps = 'n'
+print_break_steps = 'n'
+print_edge_steps = 'n'
+
+
+GlobalInputs {
+   //use_new_comm_sched = FALSE  // uncomment to turn on OLD
+   use_newest_comm_sched = TRUE // uncomment to turn on NEW
+   //use_old_method_for_clustering = TRUE // uncomment to turn on OLD
+}
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4
+
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   corner_transport     = "CORNER_TRANSPORT_2"
+
+   data_problem         = "SPHERE"
+
+   Initial_data {
+      radius            = 0.3
+      center            = 0.0, 0.0, 0.0
+
+      density_inside    = 1.0
+      velocity_inside   = 0.0 , 0.0, 0.0
+      pressure_inside   = 1140.35
+
+      density_outside    = 1.0
+      velocity_outside   = 0.0 , 0.0, 0.0 
+      pressure_outside   = 0.00001
+
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT"
+ 
+      PRESSURE_GRADIENT {
+         grad_tol = 100.0
+      }
+ 
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+
+      PRESSURE_DEVIATION {
+         dev_tol = 0.01
+        pressure_dev = 0.01
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+
+   }
+
+}
+
+
+BergerRigoutsos {
+   algo_advance_mode = "ADVANCE_SOME"
+   owner_mode = "MOST_OVERLAP"
+   log_node_history = FALSE
+   use_level_boxes = FALSE
+   use_private_communicator = TRUE
+   sort_output_nodes = TRUE
+   log_cluster_summary = TRUE
+}
+
+// BaselineMain is used only by the baseline code.
+BaselineMain {
+   base_name = "spbsl-3l1x"
+   log_all_nodes = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt"
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+   restart_write_dirname   = "restart_sphere3d"
+
+   // which_br: 'o' = old, 'n' = new
+   which_br = 'o'
+}
+
+// Main is used only by the new code.
+Main {
+   base_name = "spnew-3l1x"
+   log_all_nodes = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt"
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+   restart_write_dirname   = "restart_sphere3d"
+}
+
+
+TimerManager{
+  // timer_list = "*::*::*"
+  timer_list = "hier::*::*", "mesh::*::*", "xfer::*::*", "algs::*::*", "apps::*::*"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+  print_threshold = 0
+  print_summed = TRUE
+  print_max = TRUE
+}
+
+CartesianGeometry {
+   // domain_boxes  = [ (0, 0, 0) , (49, 49, 49) ]
+   domain_boxes  = [ (0, 0, 0) , (63, 63, 63) ]
+   // domain_boxes  = [ (0, 0, 0) , (7, 7, 7) ]
+   x_lo          = 0.e0, 0.e0, 0.e0     // lower end of computational domain.
+   x_up          = 4.e0, 4.e0, 4.e0  // upper end of computational domain.
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+   max_levels             = 3        // Maximum number of levels in hierarchy.
+   ratio_to_coarser {            // vector ratio to next coarser level
+      level_1             = 4 , 4 , 4 
+      level_2             = 4 , 4 , 4 
+      level_3             = 4 , 4 , 4 
+   }
+
+   largest_patch_size {
+      // level_0 =  32, 32, 32  // largest patch allowed in hierarchy
+      level_0 =  -1, -1, -1  // No limit on largest patch.
+           // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 =  8, 8, 8 
+      level_1 =  8, 8, 8 
+      level_2 =  8, 8, 8 
+      // all finer levels will use same values as level_0...
+   }
+
+   allow_patches_smaller_than_ghostwidth = TRUE
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance   = 0.90e0    // min % of tag cells in new patch level
+   combine_efficiency     = 0.90e0    // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+   barrier_before_clustering = FALSE
+   sequentialize_patch_indices = FALSE
+   check_nonrefined_tags = "IGNORE"
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 0.0500   // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   max_integrator_steps  = 37     // max number of simulation timesteps
+   // max_integrator_steps  = 1     // max number of simulation timesteps
+}
+
+// DistributedLoadBalancer is used by the new code.
+DistributedLoadBalancer {
+  report_load_balance = FALSE
+}
+
+TreeLoadBalancer {
+  report_load_balance = FALSE
+  barrier_before = TRUE
+  barrier_after = TRUE
+  n_root_cycles = 2
+}
+
+// LoadBalancer is used by the new code.
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/performance_inputs/mEuler/sphere-3l2x.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/performance_inputs/mEuler/sphere-3l2x.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,297 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (3d sphere) 
+ *
+ ************************************************************************/
+
+// 2-level Euler strong scaling performance test.
+log_actions = 'n'
+check_input_connectors = 'n'
+check_output_connectors = 'n'
+check_connectors = 'n'
+print_layer_hierarchy = 'n'
+DistributedLoadBalancer_print_steps = 'n'
+DistributedLoadBalancer_check_connectivity = 'n'
+check_map = 'n'
+check_connectivity = 'n'
+print_steps = 'n'
+print_swap_steps = 'n'
+print_break_steps = 'n'
+print_edge_steps = 'n'
+
+
+GlobalInputs {
+   //use_new_comm_sched = FALSE  // uncomment to turn on OLD
+   use_newest_comm_sched = TRUE // uncomment to turn on NEW
+   //use_old_method_for_clustering = TRUE // uncomment to turn on OLD
+}
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4
+
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   corner_transport     = "CORNER_TRANSPORT_2"
+
+   data_problem         = "SPHERE"
+
+   Initial_data {
+      radius            = 0.3
+      center            = 2.0, 0.0, 0.0
+
+      density_inside    = 1.0
+      velocity_inside   = 0.0 , 0.0, 0.0
+      pressure_inside   = 1140.35
+
+      density_outside    = 1.0
+      velocity_outside   = 0.0 , 0.0, 0.0 
+      pressure_outside   = 0.00001
+
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT"
+ 
+      PRESSURE_GRADIENT {
+         grad_tol = 100.0
+      }
+ 
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+
+      PRESSURE_DEVIATION {
+         dev_tol = 0.01
+        pressure_dev = 0.01
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+
+   }
+
+}
+
+
+BergerRigoutsos {
+   algo_advance_mode = "ADVANCE_SOME"
+   owner_mode = "MOST_OVERLAP"
+   log_node_history = FALSE
+   use_level_boxes = FALSE
+   use_private_communicator = TRUE
+   sort_output_nodes = TRUE
+   log_cluster_summary = TRUE
+}
+
+// BaselineMain is used only by the baseline code.
+BaselineMain {
+   base_name = "spbsl-3l2x"
+   log_all_nodes = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt"
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+   restart_write_dirname   = "restart_sphere3d"
+
+   // which_br: 'o' = old, 'n' = new
+   which_br = 'o'
+}
+
+// Main is used only by the new code.
+Main {
+   base_name = "spnew-3l2x"
+   log_all_nodes = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt"
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+   restart_write_dirname   = "restart_sphere3d"
+}
+
+
+TimerManager{
+  // timer_list = "*::*::*"
+  timer_list = "hier::*::*", "mesh::*::*", "xfer::*::*", "algs::*::*", "apps::*::*"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+  print_threshold = 0
+  print_summed = TRUE
+  print_max = TRUE
+}
+
+CartesianGeometry {
+   // domain_boxes  = [ (0, 0, 0) , (49, 49, 49) ]
+   domain_boxes  = [ (0, 0, 0) , (63, 63, 63) ]
+   // domain_boxes  = [ (0, 0, 0) , (7, 7, 7) ]
+   x_lo          = 0.e0, 0.e0, 0.e0     // lower end of computational domain.
+   x_up          = 4.e0, 4.e0, 4.e0  // upper end of computational domain.
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+   max_levels             = 3        // Maximum number of levels in hierarchy.
+   ratio_to_coarser {            // vector ratio to next coarser level
+      level_1             = 4 , 4 , 4 
+      level_2             = 4 , 4 , 4 
+      level_3             = 4 , 4 , 4 
+   }
+
+   largest_patch_size {
+      level_0 =  19, 19, 19  // largest patch allowed in hierarchy
+           // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 =  8, 8, 8 
+      level_1 =  8, 8, 8 
+      level_2 =  8, 8, 8 
+      // all finer levels will use same values as level_0...
+   }
+
+   allow_patches_smaller_than_ghostwidth = TRUE
+}
+
+GriddingAlgorithm {
+   efficiency_tolerance   = 0.90e0    // min % of tag cells in new patch level
+   combine_efficiency     = 0.90e0    // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+   barrier_before_clustering = FALSE
+   sequentialize_patch_indices = FALSE
+   check_nonrefined_tags = "IGNORE"
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 0.0500   // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   max_integrator_steps  = 37     // max number of simulation timesteps
+   // max_integrator_steps  = 1     // max number of simulation timesteps
+}
+
+// DistributedLoadBalancer is used by the new code.
+DistributedLoadBalancer {
+  report_load_balance = FALSE
+}
+
+TreeLoadBalancer {
+  report_load_balance = FALSE
+  barrier_before = TRUE
+  barrier_after = TRUE
+  n_root_cycles = 2
+}
+
+// LoadBalancer is used by the new code.
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/performance_inputs/mEuler/sphere-3l4x.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/performance_inputs/mEuler/sphere-3l4x.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,297 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (3d sphere) 
+ *
+ ************************************************************************/
+
+// 2-level Euler strong scaling performance test.
+log_actions = 'n'
+check_input_connectors = 'n'
+check_output_connectors = 'n'
+check_connectors = 'n'
+print_layer_hierarchy = 'n'
+DistributedLoadBalancer_print_steps = 'n'
+DistributedLoadBalancer_check_connectivity = 'n'
+check_map = 'n'
+check_connectivity = 'n'
+print_steps = 'n'
+print_swap_steps = 'n'
+print_break_steps = 'n'
+print_edge_steps = 'n'
+
+
+GlobalInputs {
+   //use_new_comm_sched = FALSE  // uncomment to turn on OLD
+   use_newest_comm_sched = TRUE // uncomment to turn on NEW
+   //use_old_method_for_clustering = TRUE // uncomment to turn on OLD
+}
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4
+
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   corner_transport     = "CORNER_TRANSPORT_2"
+
+   data_problem         = "SPHERE"
+
+   Initial_data {
+      radius            = 0.3
+      center            = 2.0, 2.0, 0.0
+
+      density_inside    = 1.0
+      velocity_inside   = 0.0 , 0.0, 0.0
+      pressure_inside   = 1140.35
+
+      density_outside    = 1.0
+      velocity_outside   = 0.0 , 0.0, 0.0 
+      pressure_outside   = 0.00001
+
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT"
+ 
+      PRESSURE_GRADIENT {
+         grad_tol = 100.0
+      }
+ 
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+
+      PRESSURE_DEVIATION {
+         dev_tol = 0.01
+        pressure_dev = 0.01
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+
+   }
+
+}
+
+
+BergerRigoutsos {
+   algo_advance_mode = "ADVANCE_SOME"
+   owner_mode = "MOST_OVERLAP"
+   log_node_history = FALSE
+   use_level_boxes = FALSE
+   use_private_communicator = TRUE
+   sort_output_nodes = TRUE
+   log_cluster_summary = TRUE
+}
+
+// BaselineMain is used only by the baseline code.
+BaselineMain {
+   base_name = "spbsl-3l4x"
+   log_all_nodes = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt"
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+   restart_write_dirname   = "restart_sphere3d"
+
+   // which_br: 'o' = old, 'n' = new
+   which_br = 'o'
+}
+
+// Main is used only by the new code.
+Main {
+   base_name = "spnew-3l4x"
+   log_all_nodes = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt"
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+   restart_write_dirname   = "restart_sphere3d"
+}
+
+
+TimerManager{
+  // timer_list = "*::*::*"
+  timer_list = "hier::*::*", "mesh::*::*", "xfer::*::*", "algs::*::*", "apps::*::*"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+  print_threshold = 0
+  print_summed = TRUE
+  print_max = TRUE
+}
+
+CartesianGeometry {
+   // domain_boxes  = [ (0, 0, 0) , (49, 49, 49) ]
+   domain_boxes  = [ (0, 0, 0) , (63, 63, 63) ]
+   // domain_boxes  = [ (0, 0, 0) , (7, 7, 7) ]
+   x_lo          = 0.e0, 0.e0, 0.e0     // lower end of computational domain.
+   x_up          = 4.e0, 4.e0, 4.e0  // upper end of computational domain.
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+   max_levels             = 3        // Maximum number of levels in hierarchy.
+   ratio_to_coarser {            // vector ratio to next coarser level
+      level_1             = 4 , 4 , 4 
+      level_2             = 4 , 4 , 4 
+      level_3             = 4 , 4 , 4 
+   }
+
+   largest_patch_size {
+      level_0 =  19, 19, 19  // largest patch allowed in hierarchy
+           // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 =  8, 8, 8 
+      level_1 =  8, 8, 8 
+      level_2 =  8, 8, 8 
+      // all finer levels will use same values as level_0...
+   }
+
+   allow_patches_smaller_than_ghostwidth = TRUE
+}
+
+GriddingAlgorithm {
+   efficiency_tolerance   = 0.90e0    // min % of tag cells in new patch level
+   combine_efficiency     = 0.90e0    // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+   barrier_before_clustering = FALSE
+   sequentialize_patch_indices = FALSE
+   check_nonrefined_tags = "IGNORE"
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 0.0500   // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   max_integrator_steps  = 37     // max number of simulation timesteps
+   // max_integrator_steps  = 1     // max number of simulation timesteps
+}
+
+// DistributedLoadBalancer is used by the new code.
+DistributedLoadBalancer {
+  report_load_balance = FALSE
+}
+
+TreeLoadBalancer {
+  report_load_balance = FALSE
+  barrier_before = TRUE
+  barrier_after = TRUE
+  n_root_cycles = 2
+}
+
+// LoadBalancer is used by the new code.
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/performance_inputs/mEuler/sphere-3l8x.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/performance_inputs/mEuler/sphere-3l8x.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,297 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (3d sphere) 
+ *
+ ************************************************************************/
+
+// 2-level Euler strong scaling performance test.
+log_actions = 'n'
+check_input_connectors = 'n'
+check_output_connectors = 'n'
+check_connectors = 'n'
+print_layer_hierarchy = 'n'
+DistributedLoadBalancer_print_steps = 'n'
+DistributedLoadBalancer_check_connectivity = 'n'
+check_map = 'n'
+check_connectivity = 'n'
+print_steps = 'n'
+print_swap_steps = 'n'
+print_break_steps = 'n'
+print_edge_steps = 'n'
+
+
+GlobalInputs {
+   //use_new_comm_sched = FALSE  // uncomment to turn on OLD
+   use_newest_comm_sched = TRUE // uncomment to turn on NEW
+   //use_old_method_for_clustering = TRUE // uncomment to turn on OLD
+}
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4
+
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   corner_transport     = "CORNER_TRANSPORT_2"
+
+   data_problem         = "SPHERE"
+
+   Initial_data {
+      radius            = 0.3
+      center            = 2.0, 2.0, 2.0
+
+      density_inside    = 1.0
+      velocity_inside   = 0.0 , 0.0, 0.0
+      pressure_inside   = 1140.35
+
+      density_outside    = 1.0
+      velocity_outside   = 0.0 , 0.0, 0.0 
+      pressure_outside   = 0.00001
+
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT"
+ 
+      PRESSURE_GRADIENT {
+         grad_tol = 100.0
+      }
+ 
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+
+      PRESSURE_DEVIATION {
+         dev_tol = 0.01
+        pressure_dev = 0.01
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+
+   }
+
+}
+
+
+BergerRigoutsos {
+   algo_advance_mode = "ADVANCE_SOME"
+   owner_mode = "MOST_OVERLAP"
+   log_node_history = FALSE
+   use_level_boxes = FALSE
+   use_private_communicator = TRUE
+   sort_output_nodes = TRUE
+   log_cluster_summary = TRUE
+}
+
+// BaselineMain is used only by the baseline code.
+BaselineMain {
+   base_name = "spbsl-3l8x"
+   log_all_nodes = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt"
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+   restart_write_dirname   = "restart_sphere3d"
+
+   // which_br: 'o' = old, 'n' = new
+   which_br = 'o'
+}
+
+// Main is used only by the new code.
+Main {
+   base_name = "spnew-3l8x"
+   log_all_nodes = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt"
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+   restart_write_dirname   = "restart_sphere3d"
+}
+
+
+TimerManager{
+  // timer_list = "*::*::*"
+  timer_list = "hier::*::*", "mesh::*::*", "xfer::*::*", "algs::*::*", "apps::*::*"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+  print_threshold = 0
+  print_summed = TRUE
+  print_max = TRUE
+}
+
+CartesianGeometry {
+   // domain_boxes  = [ (0, 0, 0) , (49, 49, 49) ]
+   domain_boxes  = [ (0, 0, 0) , (63, 63, 63) ]
+   // domain_boxes  = [ (0, 0, 0) , (7, 7, 7) ]
+   x_lo          = 0.e0, 0.e0, 0.e0     // lower end of computational domain.
+   x_up          = 4.e0, 4.e0, 4.e0  // upper end of computational domain.
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+   max_levels             = 3        // Maximum number of levels in hierarchy.
+   ratio_to_coarser {            // vector ratio to next coarser level
+      level_1             = 4 , 4 , 4 
+      level_2             = 4 , 4 , 4 
+      level_3             = 4 , 4 , 4 
+   }
+
+   largest_patch_size {
+      level_0 =  19, 19, 19  // largest patch allowed in hierarchy
+           // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 =  8, 8, 8 
+      level_1 =  8, 8, 8 
+      level_2 =  8, 8, 8 
+      // all finer levels will use same values as level_0...
+   }
+
+   allow_patches_smaller_than_ghostwidth = TRUE
+}
+
+GriddingAlgorithm {
+   efficiency_tolerance   = 0.90e0    // min % of tag cells in new patch level
+   combine_efficiency     = 0.90e0    // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+   barrier_before_clustering = FALSE
+   sequentialize_patch_indices = FALSE
+   check_nonrefined_tags = "IGNORE"
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 0.0500   // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   max_integrator_steps  = 37     // max number of simulation timesteps
+   // max_integrator_steps  = 1     // max number of simulation timesteps
+}
+
+// DistributedLoadBalancer is used by the new code.
+DistributedLoadBalancer {
+  report_load_balance = FALSE
+}
+
+TreeLoadBalancer {
+  report_load_balance = FALSE
+  barrier_before = TRUE
+  barrier_after = TRUE
+  n_root_cycles = 2
+}
+
+// LoadBalancer is used by the new code.
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/performance_inputs/mEuler/sphere-4l1x.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/performance_inputs/mEuler/sphere-4l1x.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,300 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (3d sphere) 
+ *
+ ************************************************************************/
+
+// 4-level Euler strong scaling performance test.
+// The 1x version is set up to do about 28.4 cell updates.
+
+log_actions = 'n'
+check_input_connectors = 'n'
+check_output_connectors = 'n'
+check_connectors = 'n'
+print_layer_hierarchy = 'n'
+DistributedLoadBalancer_print_steps = 'n'
+DistributedLoadBalancer_check_connectivity = 'n'
+check_map = 'n'
+check_connectivity = 'n'
+print_steps = 'n'
+print_swap_steps = 'n'
+print_break_steps = 'n'
+print_edge_steps = 'n'
+
+
+GlobalInputs {
+   //use_new_comm_sched = FALSE  // uncomment to turn on OLD
+   use_newest_comm_sched = TRUE // uncomment to turn on NEW
+   //use_old_method_for_clustering = TRUE // uncomment to turn on OLD
+}
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4
+
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   corner_transport     = "CORNER_TRANSPORT_2"
+
+   data_problem         = "SPHERE"
+
+   Initial_data {
+      radius            = 0.3
+      center            = 0.0, 0.0, 0.0
+
+      density_inside    = 1.0
+      velocity_inside   = 0.0 , 0.0, 0.0
+      pressure_inside   = 1140.35
+
+      density_outside    = 1.0
+      velocity_outside   = 0.0 , 0.0, 0.0 
+      pressure_outside   = 0.00001
+
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT"
+ 
+      PRESSURE_GRADIENT {
+         grad_tol = 100.0
+      }
+ 
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+
+      PRESSURE_DEVIATION {
+         dev_tol = 0.01
+        pressure_dev = 0.01
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+
+   }
+
+}
+
+
+BergerRigoutsos {
+   algo_advance_mode = "ADVANCE_SOME"
+   owner_mode = "MOST_OVERLAP"
+   log_node_history = FALSE
+   use_level_boxes = FALSE
+   use_private_communicator = TRUE
+   sort_output_nodes = TRUE
+   log_cluster_summary = TRUE
+}
+
+// BaselineMain is used only by the baseline code.
+BaselineMain {
+   base_name = "spbsl-4l1x"
+   log_all_nodes = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt"
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+   restart_write_dirname   = "restart_sphere3d"
+
+   // which_br: 'o' = old, 'n' = new
+   which_br = 'o'
+}
+
+// Main is used only by the new code.
+Main {
+   base_name = "spnew-4l1x"
+   log_all_nodes = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt"
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+   restart_write_dirname   = "restart_sphere3d"
+}
+
+
+TimerManager{
+  // timer_list = "*::*::*"
+  timer_list = "hier::*::*", "mesh::*::*", "xfer::*::*", "algs::*::*", "apps::*::*"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+  print_threshold = 0
+  print_summed = TRUE
+  print_max = TRUE
+}
+
+CartesianGeometry {
+   // domain_boxes  = [ (0, 0, 0) , (49, 49, 49) ]
+   domain_boxes  = [ (0, 0, 0) , (63, 63, 63) ]
+   // domain_boxes  = [ (0, 0, 0) , (7, 7, 7) ]
+   x_lo          = 0.e0, 0.e0, 0.e0     // lower end of computational domain.
+   x_up          = 4.e0, 4.e0, 4.e0  // upper end of computational domain.
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+   max_levels             = 4        // Maximum number of levels in hierarchy.
+   ratio_to_coarser {            // vector ratio to next coarser level
+      level_1             = 4 , 4 , 4 
+      level_2             = 4 , 4 , 4 
+      level_3             = 4 , 4 , 4 
+   }
+
+   largest_patch_size {
+      // level_0 =  32, 32, 32  // largest patch allowed in hierarchy
+      level_0 =  -1, -1, -1  // No limit on largest patch.
+           // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 =  8, 8, 8 
+      level_1 =  8, 8, 8 
+      level_2 =  8, 8, 8 
+      // all finer levels will use same values as level_0...
+   }
+
+   allow_patches_smaller_than_ghostwidth = TRUE
+}
+
+GriddingAlgorithm {
+   efficiency_tolerance   = 0.90e0    // min % of tag cells in new patch level
+   combine_efficiency     = 0.90e0    // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+   barrier_before_clustering = FALSE
+   sequentialize_patch_indices = FALSE
+   check_nonrefined_tags = "IGNORE"
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 0.0081   // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   max_integrator_steps  = 19    // max number of simulation timesteps
+   // max_integrator_steps  = 1     // max number of simulation timesteps
+}
+
+// DistributedLoadBalancer is used by the new code.
+DistributedLoadBalancer {
+  report_load_balance = FALSE
+}
+
+TreeLoadBalancer {
+  report_load_balance = FALSE
+  barrier_before = TRUE
+  barrier_after = TRUE
+  n_root_cycles = 2
+}
+
+// LoadBalancer is used by the new code.
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/performance_inputs/mEuler/sphere-4l2x.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/performance_inputs/mEuler/sphere-4l2x.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,299 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (3d sphere) 
+ *
+ ************************************************************************/
+
+// 4-level Euler strong scaling performance test.
+// The 1x version is set up to do about 28.4 cell updates.
+
+log_actions = 'n'
+check_input_connectors = 'n'
+check_output_connectors = 'n'
+check_connectors = 'n'
+print_layer_hierarchy = 'n'
+DistributedLoadBalancer_print_steps = 'n'
+DistributedLoadBalancer_check_connectivity = 'n'
+check_map = 'n'
+check_connectivity = 'n'
+print_steps = 'n'
+print_swap_steps = 'n'
+print_break_steps = 'n'
+print_edge_steps = 'n'
+
+
+GlobalInputs {
+   //use_new_comm_sched = FALSE  // uncomment to turn on OLD
+   use_newest_comm_sched = TRUE // uncomment to turn on NEW
+   //use_old_method_for_clustering = TRUE // uncomment to turn on OLD
+}
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4
+
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   corner_transport     = "CORNER_TRANSPORT_2"
+
+   data_problem         = "SPHERE"
+
+   Initial_data {
+      radius            = 0.3
+      center            = 2.0, 0.0, 0.0
+
+      density_inside    = 1.0
+      velocity_inside   = 0.0 , 0.0, 0.0
+      pressure_inside   = 1140.35
+
+      density_outside    = 1.0
+      velocity_outside   = 0.0 , 0.0, 0.0 
+      pressure_outside   = 0.00001
+
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT"
+ 
+      PRESSURE_GRADIENT {
+         grad_tol = 100.0
+      }
+ 
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+
+      PRESSURE_DEVIATION {
+         dev_tol = 0.01
+        pressure_dev = 0.01
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+
+   }
+
+}
+
+
+BergerRigoutsos {
+   algo_advance_mode = "ADVANCE_SOME"
+   owner_mode = "MOST_OVERLAP"
+   log_node_history = FALSE
+   use_level_boxes = FALSE
+   use_private_communicator = TRUE
+   sort_output_nodes = TRUE
+   log_cluster_summary = TRUE
+}
+
+// BaselineMain is used only by the baseline code.
+BaselineMain {
+   base_name = "spbsl-4l2x"
+   log_all_nodes = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt"
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+   restart_write_dirname   = "restart_sphere3d"
+
+   // which_br: 'o' = old, 'n' = new
+   which_br = 'o'
+}
+
+// Main is used only by the new code.
+Main {
+   base_name = "spnew-4l2x"
+   log_all_nodes = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt"
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+   restart_write_dirname   = "restart_sphere3d"
+}
+
+
+TimerManager{
+  // timer_list = "*::*::*"
+  timer_list = "hier::*::*", "mesh::*::*", "xfer::*::*", "algs::*::*", "apps::*::*"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+  print_threshold = 0
+  print_summed = TRUE
+  print_max = TRUE
+}
+
+CartesianGeometry {
+   // domain_boxes  = [ (0, 0, 0) , (49, 49, 49) ]
+   domain_boxes  = [ (0, 0, 0) , (63, 63, 63) ]
+   // domain_boxes  = [ (0, 0, 0) , (7, 7, 7) ]
+   x_lo          = 0.e0, 0.e0, 0.e0     // lower end of computational domain.
+   x_up          = 4.e0, 4.e0, 4.e0  // upper end of computational domain.
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+   max_levels             = 4        // Maximum number of levels in hierarchy.
+   ratio_to_coarser {            // vector ratio to next coarser level
+      level_1             = 4 , 4 , 4 
+      level_2             = 4 , 4 , 4 
+      level_3             = 4 , 4 , 4 
+   }
+
+   largest_patch_size {
+      level_0 =  19, 19, 19  // largest patch allowed in hierarchy
+           // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 =  8, 8, 8 
+      level_1 =  8, 8, 8 
+      level_2 =  8, 8, 8 
+      // all finer levels will use same values as level_0...
+   }
+
+   allow_patches_smaller_than_ghostwidth = TRUE
+}
+
+GriddingAlgorithm {
+   efficiency_tolerance   = 0.90e0    // min % of tag cells in new patch level
+   combine_efficiency     = 0.90e0    // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+   barrier_before_clustering = FALSE
+   sequentialize_patch_indices = FALSE
+   check_nonrefined_tags = "IGNORE"
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 0.0081   // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   max_integrator_steps  = 19    // max number of simulation timesteps
+   // max_integrator_steps  = 1     // max number of simulation timesteps
+}
+
+// DistributedLoadBalancer is used by the new code.
+DistributedLoadBalancer {
+  report_load_balance = FALSE
+}
+
+TreeLoadBalancer {
+  report_load_balance = FALSE
+  barrier_before = TRUE
+  barrier_after = TRUE
+  n_root_cycles = 2
+}
+
+// LoadBalancer is used by the new code.
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/performance_inputs/mEuler/sphere-4l4x.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/performance_inputs/mEuler/sphere-4l4x.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,299 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (3d sphere) 
+ *
+ ************************************************************************/
+
+// 4-level Euler strong scaling performance test.
+// The 1x version is set up to do about 28.4 cell updates.
+
+log_actions = 'n'
+check_input_connectors = 'n'
+check_output_connectors = 'n'
+check_connectors = 'n'
+print_layer_hierarchy = 'n'
+DistributedLoadBalancer_print_steps = 'n'
+DistributedLoadBalancer_check_connectivity = 'n'
+check_map = 'n'
+check_connectivity = 'n'
+print_steps = 'n'
+print_swap_steps = 'n'
+print_break_steps = 'n'
+print_edge_steps = 'n'
+
+
+GlobalInputs {
+   //use_new_comm_sched = FALSE  // uncomment to turn on OLD
+   use_newest_comm_sched = TRUE // uncomment to turn on NEW
+   //use_old_method_for_clustering = TRUE // uncomment to turn on OLD
+}
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4
+
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   corner_transport     = "CORNER_TRANSPORT_2"
+
+   data_problem         = "SPHERE"
+
+   Initial_data {
+      radius            = 0.3
+      center            = 2.0, 2.0, 0.0
+
+      density_inside    = 1.0
+      velocity_inside   = 0.0 , 0.0, 0.0
+      pressure_inside   = 1140.35
+
+      density_outside    = 1.0
+      velocity_outside   = 0.0 , 0.0, 0.0 
+      pressure_outside   = 0.00001
+
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT"
+ 
+      PRESSURE_GRADIENT {
+         grad_tol = 100.0
+      }
+ 
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+
+      PRESSURE_DEVIATION {
+         dev_tol = 0.01
+        pressure_dev = 0.01
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+
+   }
+
+}
+
+
+BergerRigoutsos {
+   algo_advance_mode = "ADVANCE_SOME"
+   owner_mode = "MOST_OVERLAP"
+   log_node_history = FALSE
+   use_level_boxes = FALSE
+   use_private_communicator = TRUE
+   sort_output_nodes = TRUE
+   log_cluster_summary = TRUE
+}
+
+// BaselineMain is used only by the baseline code.
+BaselineMain {
+   base_name = "spbsl-4l4x"
+   log_all_nodes = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt"
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+   restart_write_dirname   = "restart_sphere3d"
+
+   // which_br: 'o' = old, 'n' = new
+   which_br = 'o'
+}
+
+// Main is used only by the new code.
+Main {
+   base_name = "spnew-4l4x"
+   log_all_nodes = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt"
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+   restart_write_dirname   = "restart_sphere3d"
+}
+
+
+TimerManager{
+  // timer_list = "*::*::*"
+  timer_list = "hier::*::*", "mesh::*::*", "xfer::*::*", "algs::*::*", "apps::*::*"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+  print_threshold = 0
+  print_summed = TRUE
+  print_max = TRUE
+}
+
+CartesianGeometry {
+   // domain_boxes  = [ (0, 0, 0) , (49, 49, 49) ]
+   domain_boxes  = [ (0, 0, 0) , (63, 63, 63) ]
+   // domain_boxes  = [ (0, 0, 0) , (7, 7, 7) ]
+   x_lo          = 0.e0, 0.e0, 0.e0     // lower end of computational domain.
+   x_up          = 4.e0, 4.e0, 4.e0  // upper end of computational domain.
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+   max_levels             = 4        // Maximum number of levels in hierarchy.
+   ratio_to_coarser {            // vector ratio to next coarser level
+      level_1             = 4 , 4 , 4 
+      level_2             = 4 , 4 , 4 
+      level_3             = 4 , 4 , 4 
+   }
+
+   largest_patch_size {
+      level_0 =  19, 19, 19  // largest patch allowed in hierarchy
+           // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 =  8, 8, 8 
+      level_1 =  8, 8, 8 
+      level_2 =  8, 8, 8 
+      // all finer levels will use same values as level_0...
+   }
+
+   allow_patches_smaller_than_ghostwidth = TRUE
+}
+
+GriddingAlgorithm {
+   efficiency_tolerance   = 0.90e0    // min % of tag cells in new patch level
+   combine_efficiency     = 0.90e0    // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+   barrier_before_clustering = FALSE
+   sequentialize_patch_indices = FALSE
+   check_nonrefined_tags = "IGNORE"
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 0.0081   // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   max_integrator_steps  = 19    // max number of simulation timesteps
+   // max_integrator_steps  = 1     // max number of simulation timesteps
+}
+
+// DistributedLoadBalancer is used by the new code.
+DistributedLoadBalancer {
+  report_load_balance = FALSE
+}
+
+TreeLoadBalancer {
+  report_load_balance = FALSE
+  barrier_before = TRUE
+  barrier_after = TRUE
+  n_root_cycles = 2
+}
+
+// LoadBalancer is used by the new code.
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/performance_inputs/mEuler/sphere-4l8x.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/performance_inputs/mEuler/sphere-4l8x.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,299 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (3d sphere) 
+ *
+ ************************************************************************/
+
+// 4-level Euler strong scaling performance test.
+// The 1x version is set up to do about 28.4 cell updates.
+
+log_actions = 'n'
+check_input_connectors = 'n'
+check_output_connectors = 'n'
+check_connectors = 'n'
+print_layer_hierarchy = 'n'
+DistributedLoadBalancer_print_steps = 'n'
+DistributedLoadBalancer_check_connectivity = 'n'
+check_map = 'n'
+check_connectivity = 'n'
+print_steps = 'n'
+print_swap_steps = 'n'
+print_break_steps = 'n'
+print_edge_steps = 'n'
+
+
+GlobalInputs {
+   //use_new_comm_sched = FALSE  // uncomment to turn on OLD
+   use_newest_comm_sched = TRUE // uncomment to turn on NEW
+   //use_old_method_for_clustering = TRUE // uncomment to turn on OLD
+}
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4
+
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   corner_transport     = "CORNER_TRANSPORT_2"
+
+   data_problem         = "SPHERE"
+
+   Initial_data {
+      radius            = 0.3
+      center            = 2.0, 2.0, 2.0
+
+      density_inside    = 1.0
+      velocity_inside   = 0.0 , 0.0, 0.0
+      pressure_inside   = 1140.35
+
+      density_outside    = 1.0
+      velocity_outside   = 0.0 , 0.0, 0.0 
+      pressure_outside   = 0.00001
+
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT"
+ 
+      PRESSURE_GRADIENT {
+         grad_tol = 100.0
+      }
+ 
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+
+      PRESSURE_DEVIATION {
+         dev_tol = 0.01
+        pressure_dev = 0.01
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+
+   }
+
+}
+
+
+BergerRigoutsos {
+   algo_advance_mode = "ADVANCE_SOME"
+   owner_mode = "MOST_OVERLAP"
+   log_node_history = FALSE
+   use_level_boxes = FALSE
+   use_private_communicator = TRUE
+   sort_output_nodes = TRUE
+   log_cluster_summary = TRUE
+}
+
+// BaselineMain is used only by the baseline code.
+BaselineMain {
+   base_name = "spbsl-4l8x"
+   log_all_nodes = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt"
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+   restart_write_dirname   = "restart_sphere3d"
+
+   // which_br: 'o' = old, 'n' = new
+   which_br = 'o'
+}
+
+// Main is used only by the new code.
+Main {
+   base_name = "spnew-4l8x"
+   log_all_nodes = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt"
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+   restart_write_dirname   = "restart_sphere3d"
+}
+
+
+TimerManager{
+  // timer_list = "*::*::*"
+  timer_list = "hier::*::*", "mesh::*::*", "xfer::*::*", "algs::*::*", "apps::*::*"
+  print_user = TRUE
+  // print_timer_overhead = TRUE
+  print_threshold = 0
+  print_summed = TRUE
+  print_max = TRUE
+}
+
+CartesianGeometry {
+   // domain_boxes  = [ (0, 0, 0) , (49, 49, 49) ]
+   domain_boxes  = [ (0, 0, 0) , (63, 63, 63) ]
+   // domain_boxes  = [ (0, 0, 0) , (7, 7, 7) ]
+   x_lo          = 0.e0, 0.e0, 0.e0     // lower end of computational domain.
+   x_up          = 4.e0, 4.e0, 4.e0  // upper end of computational domain.
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+   max_levels             = 4        // Maximum number of levels in hierarchy.
+   ratio_to_coarser {            // vector ratio to next coarser level
+      level_1             = 4 , 4 , 4 
+      level_2             = 4 , 4 , 4 
+      level_3             = 4 , 4 , 4 
+   }
+
+   largest_patch_size {
+      level_0 =  19, 19, 19  // largest patch allowed in hierarchy
+           // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 =  8, 8, 8 
+      level_1 =  8, 8, 8 
+      level_2 =  8, 8, 8 
+      // all finer levels will use same values as level_0...
+   }
+
+   allow_patches_smaller_than_ghostwidth = TRUE
+}
+
+GriddingAlgorithm {
+   efficiency_tolerance   = 0.90e0    // min % of tag cells in new patch level
+   combine_efficiency     = 0.90e0    // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+   barrier_before_clustering = FALSE
+   sequentialize_patch_indices = FALSE
+   check_nonrefined_tags = "IGNORE"
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 0.0081   // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   max_integrator_steps  = 19    // max number of simulation timesteps
+   // max_integrator_steps  = 1     // max number of simulation timesteps
+}
+
+// DistributedLoadBalancer is used by the new code.
+DistributedLoadBalancer {
+  report_load_balance = FALSE
+}
+
+TreeLoadBalancer {
+  report_load_balance = FALSE
+  barrier_before = TRUE
+  barrier_after = TRUE
+  n_root_cycles = 2
+}
+
+// LoadBalancer is used by the new code.
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/sample_inputs/box-3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/sample_inputs/box-3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,234 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (3d box) 
+ *
+ ************************************************************************/
+
+Euler {
+   use_nonuniform_workload = TRUE
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4
+
+   riemann_solve      = "APPROX_RIEM_SOLVE" 
+//   riemann_solve      = "EXACT_RIEM_SOLVE" 
+//   riemann_solve      = "HLLC_RIEM_SOLVE"
+
+   corner_transport = "CORNER_TRANSPORT_2"
+
+   data_problem      = "SPHERE"
+
+   Initial_data {
+      radius            = 0.125
+      center            = 0.5 , 0.5 , 0.5
+
+      density_inside    = 8.0
+      velocity_inside   = 0.0 , 0.0 , 0.0
+      pressure_inside   = 40.0
+
+      density_outside    = 1.0
+      velocity_outside   = 0.0 , 0.0 , 0.0
+      pressure_outside   = 1.0
+
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT", "PRESSURE_SHOCK"
+ 
+      PRESSURE_GRADIENT {
+         grad_tol = 10.0
+      }
+ 
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "FLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for an edge, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent face has either a FLOW
+      //            or REFLECT condition, the resulting edge boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent faces have either FLOW
+      //            or REFLECT conditions, the resulting node boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_node_xlo_ylo_zlo { 
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zlo { 
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zlo { 
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zlo { 
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_ylo_zhi { 
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zhi { 
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zhi { 
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zhi { 
+         boundary_condition      = "XFLOW"
+      }
+
+   }
+
+}
+
+Main {
+// log file parameters 
+   log_file_name    = "box-3d.log"
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_box3d"
+   viz_dump_filename     = "box3d"    // not used by VisIt
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 1        // zero to turn off
+   restart_write_dirname   = "restart_box3d"
+}
+
+TimerManager {
+   print_exclusive      = TRUE   // output exclusive time
+   timer_list               = "apps::main::*",
+                              "apps::Euler::*",
+                              "algs::GriddingAlgorithm::*",
+                              "algs::HyperbolicLevelIntegrator::*"
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (9,9,9) ]
+   x_lo          = 0.e0,0.e0,0.e0     // lower end of computational domain.
+   x_up          = 1.e0,1.e0,1.e0  // upper end of computational domain.
+}
+
+StandardTagAndInitialize{
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+   max_levels             = 3        // Maximum number of levels in hierarchy.
+   ratio_to_coarser {            // vector ratio to next coarser level
+      level_1             = 2,2,2
+      level_2             = 2,2,2
+   }
+
+   largest_patch_size {
+      level_0 =  10, 10, 10  // largest patch allowed in hierarchy
+           // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 =  8, 8, 8 
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance   = 0.70e0    // min % of tag cells in new patch level
+   combine_efficiency     = 0.85e0    // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 100.e0   // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   max_integrator_steps  = 25     // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
+
+BergerRigoutsos {
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/sample_inputs/room-2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/sample_inputs/room-2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,203 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (2d room) 
+ *
+ ************************************************************************/
+check_input_connectors = 'y'
+check_output_connectors = 'y'
+DistributedLoadBalancer_print_steps = 'y'
+DistributedLoadBalancer_check_connectivity = 'y'
+check_connectivity = 'y'
+print_steps = 'y'
+print_break_steps = 'y'
+print_edge_steps = 'y'
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4        // order of Goduov slopes (1, 2, or 4)
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   data_problem         = "SPHERE"
+
+   Initial_data {
+      radius            = 6.0
+      center            = 34.0 , 28.0
+
+      density_inside    = 8.0
+      velocity_inside   = 0.0 , 0.0  
+      pressure_inside   = 40.0
+
+      density_outside    = 1.0
+      velocity_outside   = 0.0 , 0.0 
+      pressure_outside   = 1.0
+
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT", "PRESSURE_SHOCK"
+ 
+      PRESSURE_GRADIENT {
+         grad_tol = 10.0
+      }
+
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85 
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "XREFLECT"
+      }
+   }
+}
+
+Main {
+   base_name = "room-2d"
+// log file parameters 
+   log_file_name    = "room-2d.log"
+   log_all_nodes    = TRUE
+
+// visualization dump parameters
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   // viz_dump_dirname      = "viz_room2d"
+   // viz_dump_filename     = "room2d"   // not used by VisIt
+   visit_file_cluster_size = 1        // not used by Vizamrai
+
+// restart dump parameters
+   restart_interval       = 0         // zero to turn off
+   restart_write_dirname  = "restart_room2d"
+}
+
+TimerManager{
+   // print_exclusive      = TRUE   // output exclusive time
+   // timer_list               = "*::*::*"
+   timer_list = "hier::*::*", "mesh::*::*", "xfer::*::*", "algs::*::*", "apps::*::*"
+   print_user = TRUE
+   // print_timer_overhead = TRUE
+   print_threshold = 0
+   print_summed = TRUE
+   print_max = TRUE
+}
+
+CartesianGeometry{
+   domain_boxes	= [(0,9),(14,20)],
+                  [(0,21),(19,35)],
+                  [(0,36),(14,49)],
+                  [(20,0),(49,54)],
+                  [(50,0),(64,35)],
+                  [(50,46),(64,54)],
+                  [(57,36),(64,45)]
+
+   x_lo = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up = 65.e0 , 55.e0 // upper end of computational domain.
+}
+
+StandardTagAndInitialize{
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+   max_levels = 3         // Maximum number of levels in hierarchy.
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 4 , 4
+      level_2 = 4 , 4
+      level_3 = 4 , 4
+   }
+
+   largest_patch_size {
+      level_0 = 48 , 48
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 4 , 4 
+      level_1 = 8 , 8 
+      // all finer levels will use same values as level_1...
+   }
+
+   allow_patches_smaller_than_ghostwidth = TRUE
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance    = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.85e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.9e0    // max cfl factor used in problem
+   cfl_init                  = 0.1e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+TimeRefinementIntegrator{
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 21     // max number of simulation timesteps
+   // max_integrator_steps = 100      // max number of simulation timesteps
+}
+
+DistributedLoadBalancer {
+  algorithm_index = 1
+  report_load_balance = TRUE
+  num_cycles = 2
+}
+
+BergerRigoutsos {
+  log_node_history = TRUE
+  log_cluster_summary = TRUE
+  sequentialize_output_indices = TRUE
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE
+  barrier_before = FALSE
+  barrier_after = FALSE
+  n_root_cycles = 2
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/sample_inputs/room-3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/sample_inputs/room-3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,237 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (3d room) 
+ *
+ ************************************************************************/
+
+Euler {
+   gamma           = 1.4     // gamma = Ratio of specific heats
+
+   godunov_order   = 4       // order of Godunov slopes 
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   corner_transport     = "CORNER_TRANSPORT_2"
+
+   data_problem         = "SPHERE"
+
+   Initial_data {
+      radius            = 6.0
+      center            = 34.0 , 28.0 , 10.0
+
+      density_inside    = 8.0
+      velocity_inside   = 0.0 , 0.0 , 0.0
+      pressure_inside   = 40.0
+
+      density_outside    = 1.0
+      velocity_outside   = 0.0 , 0.0 , 0.0
+      pressure_outside   = 1.0
+
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT", "PRESSURE_SHOCK"
+ 
+      PRESSURE_GRADIENT {
+         grad_tol = 10.0
+      }
+ 
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for an edge, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent face has either a FLOW
+      //            or REFLECT condition, the resulting edge boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZREFLECT"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YREFLECT"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent faces have either FLOW
+      //            or REFLECT conditions, the resulting node boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XREFLECT"
+      }
+
+   }
+
+}
+
+
+Main {
+// log file parameters
+   log_file_name    = "room-3d.log"
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_room3d"
+   viz_dump_filename     = "room3d"    // not used by VisIt
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters
+   restart_interval       = 1         // zero to turn off
+   restart_write_dirname     = "restart_room3d"
+}
+
+TimerManager{
+   print_exclusive      = TRUE   // output exclusive time
+   timer_list               = "apps::main::*",
+                              "apps::Euler::*",
+                              "algs::GriddingAlgorithmX::*"
+}
+
+CartesianGeometry {
+   domain_boxes   = [ (0,9,0) , (14,20,20) ],
+                    [ (0,21,0) , (19,35,20) ],
+                    [ (0,36,0) , (14,49,20) ],
+                    [ (20,0,0) , (49,54,20) ],
+                    [ (50,0,0) , (64,35,20) ],
+                    [ (50,46,0) , (64,54,20) ],
+                    [ (57,36,0) , (64,45,20) ]
+   x_lo           = 0.e0 , 0.e0 , 0.e0    // lower end of computational domain.
+   x_up           = 65.e0 , 55.e0 , 20.e0 // upper end of computational domain.
+}
+
+StandardTagAndInitialize{
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+   max_levels              = 1         // Maximum number of levels in hierarchy.
+   ratio_to_coarser {            // vector ratio to next coarser level
+      level_1               = 4 , 4 , 4
+      level_2               = 4 , 4 , 4
+      level_3               = 4 , 4 , 4
+   }
+
+   largest_patch_size {
+      level_0 =  48, 48, 48  // largest patch allowed in hierarchy
+           // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 =  8, 8, 8
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance    = 0.70e0    // min % of tag cells in new patch level
+   combine_efficiency      = 0.85e0    // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0      // initial simulation time
+   end_time              = 100.e0    // final simulation time
+   grow_dt               = 1.1e0     // growth factor for timesteps
+   max_integrator_steps  = 25        // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/sample_inputs/sphere-2d-re.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/sample_inputs/sphere-2d-re.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,182 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (2d sphere) 
+ *
+ ************************************************************************/
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4        // order of Goduov slopes (1, 2, or 4)
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   data_problem         = "SPHERE"
+
+   Initial_data {
+      radius            = 6.0
+      center            = 30.0 , 30.0
+
+      density_inside    = 8.0
+      velocity_inside   = 0.0 , 0.0  
+      pressure_inside   = 40.0
+
+      density_outside    = 1.0
+      velocity_outside   = 0.0 , 0.0 
+      pressure_outside   = 1.0
+
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT", 
+                        "PRESSURE_SHOCK", 
+                        "PRESSURE_RICHARDSON"
+ 
+      PRESSURE_RICHARDSON {
+         rich_tol = 0.001
+      }
+
+      // PRESSURE_GRADIENT and PRESSURE_SHOCK criteria are applied only if 
+      // the gradient detector is turned on in StandardTagAndInitialize 
+      // input below...
+      PRESSURE_GRADIENT {
+         grad_tol = 10.0
+      }
+ 
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+ 
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "XREFLECT"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "XREFLECT"
+      }
+   }
+}
+
+Main {
+// log file parameters 
+   log_file_name    = "sphere-2d.log"
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_sphere2d"
+   viz_dump_filename     = "sphere2d"    // not used by VisIt
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters
+   restart_interval       = 0        // zero to turn off
+   restart_write_dirname  = "restart_sphere2d"
+}
+
+TimerManager{
+   print_exclusive      = TRUE   // output exclusive time
+   timer_list               = "apps::main::*",
+                              "apps::Euler::*",
+                              "algs::GriddingAlgorithm::*",
+                              "algs::HyperbolicLevelIntegrator::*"
+}
+
+CartesianGeometry{
+   domain_boxes	= [(0,0),(59,59)]
+
+   x_lo = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up = 60.e0 , 60.e0 // upper end of computational domain.
+}
+
+StandardTagAndInitialize {
+//   tagging_method = "GRADIENT_DETECTOR"
+   tagging_method = "RICHARDSON_EXTRAPOLATION"
+//   tagging_method = "RICHARDSON_EXTRAPOLATION", "GRADIENT_DETECTOR"
+//   tagging_method = "REFINE_BOXES"
+//   RefineBoxes {
+//      level_0 = [(20,20),(40,40)]
+//      level_1 = [(90,90),(150,150)]
+//   }
+}
+
+PatchHierarchy {
+   max_levels = 3         // Maximum number of levels in hierarchy.
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 4 , 4
+      level_2 = 4 , 4
+      level_3 = 4 , 4
+   }
+
+   largest_patch_size {
+      level_0 = 48 , 48
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 8 , 8 
+      level_1 = 16 , 16 
+      // all finer levels will use same values as level_1...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance    = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.85e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.9e0    // max cfl factor used in problem
+   cfl_init                  = 0.1e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+TimeRefinementIntegrator{
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 301      // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/sample_inputs/step-2d-5levels.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/sample_inputs/step-2d-5levels.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,169 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (2d step) 
+ *
+ ************************************************************************/
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4        // order of Goduov slopes (1, 2, or 4)
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   data_problem         = "STEP"
+
+   Initial_data {
+      front_position = 0.0
+      interval_0 {
+         density         = 1.4
+         velocity        = 3.0 , 0.0
+         pressure        = 1.0
+      }
+      interval_1 {
+         density         = 1.4
+         velocity        = 3.0 , 0.0
+         pressure        = 1.0
+      }
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT", "PRESSURE_SHOCK"
+ 
+      PRESSURE_GRADIENT {
+         grad_tol = 20.0
+      }
+ 
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.90
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "YREFLECT"
+      }
+   }
+}
+
+Main {
+// log file parameters 
+   log_file_name    = "step-2d.log"
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_step2d"
+   viz_dump_filename     = "step2d"    // not used by VisIt
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters
+   restart_interval       = 1         // zero to turn off
+   restart_write_dirname  = "restart_step2d"
+}
+
+TimerManager{
+   print_exclusive      = TRUE   // output exclusive time 
+   timer_list               = "apps::main::*",
+                              "apps::Euler::*",
+                              "algs::GriddingAlgorithm::*",
+                              "algs::HyperbolicLevelIntegrator::*"
+}
+
+CartesianGeometry {
+   domain_boxes = [ (0,0) , (9,19) ],
+                  [ (10,4) , (49,19) ]
+   x_lo         = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 2.5e0 , 1.e0  // upper end of computational domain.
+}
+
+StandardTagAndInitialize{
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+   max_levels          = 5         // Maximum number of levels in hierarchy.
+
+   ratio_to_coarser {              // vector ratio to next coarser level
+      level_1            = 2 , 2
+      level_2            = 2 , 2
+      level_3            = 2 , 2
+      level_4            = 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 32 , 32
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 8 , 8
+      level_1 = 8 , 8
+      level_2 = 8 , 8
+      level_3 = 12 , 12
+      // all finer levels will use same values as level_3...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance = 0.75e0   // min % of tag cells in new patch level
+   combine_efficiency   = 0.85e0   // chop box if sum of volumes of smaller
+                                   // boxes < efficiency * vol of large box
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 20.e0    // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   max_integrator_steps  = 401      // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Euler/sample_inputs/step-2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Euler/sample_inputs/step-2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,184 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Euler example problem (2d step) 
+ *
+ ************************************************************************/
+check_connectivity = 'y'
+print_steps = 'n'
+print_break_steps = 'n'
+print_edge_steps = 'n'
+
+Euler {
+   gamma            = 1.4      // gamma = Ratio of specific heats
+
+   godunov_order    = 4        // order of Goduov slopes (1, 2, or 4)
+
+   riemann_solve        = "APPROX_RIEM_SOLVE"
+//   riemann_solve        = "EXACT_RIEM_SOLVE"
+//   riemann_solve        = "HLLC_RIEM_SOLVE"
+
+   data_problem         = "STEP"
+
+   Initial_data {
+      front_position = 0.0
+      interval_0 {
+         density         = 1.4
+         velocity        = 3.0 , 0.0
+         pressure        = 1.0
+      }
+      interval_1 {
+         density         = 1.4
+         velocity        = 3.0 , 0.0
+         pressure        = 1.0
+      }
+   }
+
+   Refinement_data {
+      refine_criteria = "PRESSURE_GRADIENT", "PRESSURE_SHOCK"
+ 
+      PRESSURE_GRADIENT {
+         grad_tol = 20.0
+      }
+ 
+      PRESSURE_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.90 
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "REFLECT"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "REFLECT"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "YREFLECT"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "YREFLECT"
+      }
+   }
+}
+
+Main {
+// log file parameters 
+   log_file_name    = "step-2d.log"
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_step2d"
+   viz_dump_filename     = "step2d"    // not used by VisIt
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters
+   restart_interval       = 1         // zero to turn off
+   restart_write_dirname  = "restart_step2d"
+}
+
+TimerManager{
+   print_exclusive      = TRUE   // output exclusive time 
+   timer_list               = "apps::main::*",
+                              "apps::Euler::*",
+                              "algs::GriddingAlgorithm::*",
+                              "algs::HyperbolicLevelIntegrator::*"
+}
+
+CartesianGeometry {
+   domain_boxes = [ (0,0) , (9,19) ],
+                  [ (10,4) , (49,19) ]
+   x_lo         = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up         = 2.5e0 , 1.e0  // upper end of computational domain.
+}
+
+StandardTagAndInitialize{
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+PatchHierarchy {
+   max_levels = 3
+   proper_nesting_buffer = 2, 2, 2, 2, 2, 2
+   largest_patch_size {
+      level_0 = 32, 32
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 8,8
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 4, 4
+      level_2            = 4, 4
+      //  etc.
+   }
+   allow_patches_smaller_than_ghostwidth = TRUE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = FALSE
+   // load_balance = FALSE
+   efficiency_tolerance = 0.75
+   combine_efficiency = 0.80
+   sort_boxes_after_globalizing = FALSE
+   extend_tags_to_bdry = TRUE
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 20.e0    // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   max_integrator_steps  = 401      // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
+
+TreeLoadBalancer {
+  report_load_balance = FALSE
+  barrier_before = TRUE
+  barrier_after = TRUE
+  n_root_cycles = 2
+}
+
+BergerRigoutsos {
+  log_node_history = TRUE
+  log_cluster_summary = TRUE
+  sequentialize_output_indices = TRUE
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/LinAdv.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/LinAdv.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,3198 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Numerical routines for single patch in linear advection ex. 
+ *
+ ************************************************************************/
+#include "LinAdv.h"
+
+#include <iostream>
+#include <iomanip>
+#include <fstream>
+
+#ifndef LACKS_SSTREAM
+#ifndef included_sstream
+#define included_sstream
+#include <sstream>
+#endif
+#else
+#ifndef included_strstream
+#define included_strstream
+#include <strstream.h>
+#endif
+#endif
+
+using namespace std;
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+#include <float.h>
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceIndex.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/mesh/TreeLoadBalancer.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+//integer constants for boundary conditions
+#define CHECK_BDRY_DATA (0)
+#include "SAMRAI/appu/CartesianBoundaryDefines.h"
+
+//integer constant for debugging improperly set boundary dat
+#define BOGUS_BDRY_DATA (-9999)
+
+// routines for managing boundary data
+#include "SAMRAI/appu/CartesianBoundaryUtilities2.h"
+#include "SAMRAI/appu/CartesianBoundaryUtilities3.h"
+
+// External definitions for Fortran numerical routines
+#include "LinAdvFort.h"
+
+// Number of ghosts cells used for each variable quantity
+#define CELLG (4)
+#define FACEG (4)
+#define FLUXG (1)
+
+// defines for initialization
+#define PIECEWISE_CONSTANT_X (10)
+#define PIECEWISE_CONSTANT_Y (11)
+#define PIECEWISE_CONSTANT_Z (12)
+#define SINE_CONSTANT_X (20)
+#define SINE_CONSTANT_Y (21)
+#define SINE_CONSTANT_Z (22)
+#define SPHERE (40)
+
+// defines for Riemann solver used in Godunov flux calculation
+#define APPROX_RIEM_SOLVE (20)   // Colella-Glaz approx Riemann solver
+#define EXACT_RIEM_SOLVE (21)    // Exact Riemann solver
+#define HLLC_RIEM_SOLVE (22)     // Harten, Lax, van Leer approx Riemann solver
+
+// defines for cell tagging routines
+#define RICHARDSON_NEWLY_TAGGED (-10)
+#define RICHARDSON_ALREADY_TAGGED (-11)
+#ifndef TRUE
+#define TRUE (1)
+#endif
+#ifndef FALSE
+#define FALSE (0)
+#endif
+
+// Version of LinAdv restart file data
+#define LINADV_VERSION (3)
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * The constructor for LinAdv class sets data members to defualt values, *
+ * creates variables that define the solution state for the linear       *
+ * advection equation.
+ *                                                                       *
+ * After default values are set, this routine calls getFromRestart()     *
+ * if execution from a restart file is specified.  Finally,              *
+ * getFromInput() is called to read values from the given input          *
+ * database (potentially overriding those found in the restart file).    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+LinAdv::LinAdv(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Pointer<tbox::Database> input_db,
+   tbox::Pointer<geom::CartesianGridGeometry> grid_geom,
+   SinusoidalFrontTagger* analytical_tagger):
+   algs::HyperbolicPatchStrategy(dim),
+   d_dim(dim),
+   d_analytical_tagger(analytical_tagger),
+   d_nghosts(hier::IntVector(dim, CELLG)),
+   d_fluxghosts(hier::IntVector(dim, FLUXG))
+{
+   TBOX_ASSERT(!object_name.empty());
+   TBOX_ASSERT(!input_db.isNull());
+   TBOX_ASSERT(!grid_geom.isNull());
+
+   d_object_name = object_name;
+   tbox::RestartManager::getManager()->registerRestartItem(d_object_name, this);
+
+   if (t_init.isNull()) {
+      t_init = tbox::TimerManager::getManager()->
+         getTimer("apps::LinAdv::initializeDataOnPatch()");
+      t_init_first_time = tbox::TimerManager::getManager()->
+         getTimer("apps::LinAdv::initializeDataOnPatch()_initial_time");
+      t_analytical_tag = tbox::TimerManager::getManager()->
+         getTimer("apps::LinAdv::analytical_tag");
+   }
+
+   d_grid_geometry = grid_geom;
+
+   d_use_nonuniform_workload = false;
+
+   /*
+    * hier::Variable quantities that define state of linear advection problem.
+    */
+   d_uval = new pdat::CellVariable<double>(dim, "uval", 1);
+   d_flux = new pdat::FaceVariable<double>(dim, "flux", 1);
+
+   /*
+    * Default parameters for the numerical method.
+    */
+   d_godunov_order = 1;
+   d_corner_transport = "CORNER_TRANSPORT_1";
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(CELLG == FACEG);
+#endif
+
+   /*
+    * Defaults for problem type and initial data.
+    */
+   d_data_problem_int = tbox::MathUtilities<int>::getMax();
+
+   int k;
+
+   // SPHERE problem...
+   d_radius = tbox::MathUtilities<double>::getSignalingNaN();
+   tbox::MathUtilities<double>::setArrayToSignalingNaN(d_center, d_dim.getValue());
+   d_uval_inside = tbox::MathUtilities<double>::getSignalingNaN();
+   d_uval_outside = tbox::MathUtilities<double>::getSignalingNaN();
+
+   d_number_of_intervals = 0;
+   d_front_position.resizeArray(0);
+   d_interval_uval.resizeArray(0);
+
+   // SINE problem
+   d_amplitude = 0.;
+   for (k = 0; k < d_dim.getValue(); k++) d_period[k] = 0.;
+
+   /*
+    * Defaults for boundary conditions. Set to bogus values
+    * for error checking.
+    */
+
+   if (d_dim == tbox::Dimension(2)) {
+      d_scalar_bdry_edge_conds.resizeArray(NUM_2D_EDGES);
+      for (int ei = 0; ei < NUM_2D_EDGES; ei++) {
+         d_scalar_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+      }
+
+      d_scalar_bdry_node_conds.resizeArray(NUM_2D_NODES);
+      d_node_bdry_edge.resizeArray(NUM_2D_NODES);
+
+      for (int ni = 0; ni < NUM_2D_NODES; ni++) {
+         d_scalar_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+         d_node_bdry_edge[ni] = BOGUS_BDRY_DATA;
+      }
+
+      d_bdry_edge_uval.resizeArray(NUM_2D_EDGES);
+      tbox::MathUtilities<double>::setArrayToSignalingNaN(d_bdry_edge_uval);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      d_scalar_bdry_face_conds.resizeArray(NUM_3D_FACES);
+      for (int fi = 0; fi < NUM_3D_FACES; fi++) {
+         d_scalar_bdry_face_conds[fi] = BOGUS_BDRY_DATA;
+      }
+
+      d_scalar_bdry_edge_conds.resizeArray(NUM_3D_EDGES);
+      d_edge_bdry_face.resizeArray(NUM_3D_EDGES);
+      for (int ei = 0; ei < NUM_3D_EDGES; ei++) {
+         d_scalar_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+         d_edge_bdry_face[ei] = BOGUS_BDRY_DATA;
+      }
+
+      d_scalar_bdry_node_conds.resizeArray(NUM_3D_NODES);
+      d_node_bdry_face.resizeArray(NUM_3D_NODES);
+
+      for (int ni = 0; ni < NUM_3D_NODES; ni++) {
+         d_scalar_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+         d_node_bdry_face[ni] = BOGUS_BDRY_DATA;
+      }
+
+      d_bdry_face_uval.resizeArray(NUM_3D_FACES);
+      tbox::MathUtilities<double>::setArrayToSignalingNaN(d_bdry_face_uval);
+   }
+
+   /*
+    * Initialize object with data read from given input/restart databases.
+    */
+   bool is_from_restart = tbox::RestartManager::getManager()->isFromRestart();
+   if (is_from_restart) {
+      getFromRestart();
+   }
+   getFromInput(input_db, is_from_restart);
+
+   /*
+    * Set problem data to values read from input/restart.
+    */
+
+   if (d_data_problem == "PIECEWISE_CONSTANT_X") {
+      d_data_problem_int = PIECEWISE_CONSTANT_X;
+   } else if (d_data_problem == "PIECEWISE_CONSTANT_Y") {
+      d_data_problem_int = PIECEWISE_CONSTANT_Y;
+   } else if (d_data_problem == "PIECEWISE_CONSTANT_Z") {
+      d_data_problem_int = PIECEWISE_CONSTANT_Z;
+   } else if (d_data_problem == "SINE_CONSTANT_X") {
+      d_data_problem_int = SINE_CONSTANT_X;
+   } else if (d_data_problem == "SINE_CONSTANT_Y") {
+      d_data_problem_int = SINE_CONSTANT_Y;
+   } else if (d_data_problem == "SINE_CONSTANT_Z") {
+      d_data_problem_int = SINE_CONSTANT_Z;
+   } else if (d_data_problem == "SPHERE") {
+      d_data_problem_int = SPHERE;
+   } else {
+      TBOX_ERROR(
+         d_object_name << ": "
+         << "Unknown d_data_problem string = "
+         << d_data_problem
+         << " encountered in constructor" << endl);
+   }
+
+   /*
+    * Postprocess boundary data from input/restart values.  Note: scalar
+    * quantity in this problem cannot have reflective boundary conditions
+    * so we reset them to FLOW.
+    */
+   if (d_dim == tbox::Dimension(2)) {
+      for (int i = 0; i < NUM_2D_EDGES; i++) {
+         if (d_scalar_bdry_edge_conds[i] == REFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = FLOW_BC;
+         }
+      }
+
+      for (int i = 0; i < NUM_2D_NODES; i++) {
+         if (d_scalar_bdry_node_conds[i] == XREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = XFLOW_BC;
+         }
+         if (d_scalar_bdry_node_conds[i] == YREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = YFLOW_BC;
+         }
+
+         if (d_scalar_bdry_node_conds[i] != BOGUS_BDRY_DATA) {
+            d_node_bdry_edge[i] =
+               appu::CartesianBoundaryUtilities2::getEdgeLocationForNodeBdry(
+                  i, d_scalar_bdry_node_conds[i]);
+         }
+      }
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      for (int i = 0; i < NUM_3D_FACES; i++) {
+         if (d_scalar_bdry_face_conds[i] == REFLECT_BC) {
+            d_scalar_bdry_face_conds[i] = FLOW_BC;
+         }
+      }
+
+      for (int i = 0; i < NUM_3D_EDGES; i++) {
+         if (d_scalar_bdry_edge_conds[i] == XREFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = XFLOW_BC;
+         }
+         if (d_scalar_bdry_edge_conds[i] == YREFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = YFLOW_BC;
+         }
+         if (d_scalar_bdry_edge_conds[i] == ZREFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = ZFLOW_BC;
+         }
+
+         if (d_scalar_bdry_edge_conds[i] != BOGUS_BDRY_DATA) {
+            d_edge_bdry_face[i] =
+               appu::CartesianBoundaryUtilities3::getFaceLocationForEdgeBdry(
+                  i, d_scalar_bdry_edge_conds[i]);
+         }
+      }
+
+      for (int i = 0; i < NUM_3D_NODES; i++) {
+         if (d_scalar_bdry_node_conds[i] == XREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = XFLOW_BC;
+         }
+         if (d_scalar_bdry_node_conds[i] == YREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = YFLOW_BC;
+         }
+         if (d_scalar_bdry_node_conds[i] == ZREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = ZFLOW_BC;
+         }
+
+         if (d_scalar_bdry_node_conds[i] != BOGUS_BDRY_DATA) {
+            d_node_bdry_face[i] =
+               appu::CartesianBoundaryUtilities3::getFaceLocationForNodeBdry(
+                  i, d_scalar_bdry_node_conds[i]);
+         }
+      }
+
+   }
+
+   if (d_dim == tbox::Dimension(2)) {
+      F77_FUNC(stufprobc2d, STUFPROBC2D) (PIECEWISE_CONSTANT_X,
+         PIECEWISE_CONSTANT_Y, PIECEWISE_CONSTANT_Z,
+         SINE_CONSTANT_X, SINE_CONSTANT_Y, SINE_CONSTANT_Z, SPHERE,
+         CELLG, FACEG, FLUXG);
+   } else if (d_dim == tbox::Dimension(3)) {
+      F77_FUNC(stufprobc3d, STUFPROBC3D) (PIECEWISE_CONSTANT_X,
+         PIECEWISE_CONSTANT_Y, PIECEWISE_CONSTANT_Z,
+         SINE_CONSTANT_X, SINE_CONSTANT_Y, SINE_CONSTANT_Z, SPHERE,
+         CELLG, FACEG, FLUXG);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Empty destructor for LinAdv class.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+LinAdv::~LinAdv() {
+}
+
+/*
+ *************************************************************************
+ *
+ * Register conserved variable (u) (i.e., solution state variable) and
+ * flux variable with hyperbolic integrator that manages storage for
+ * those quantities.  Also, register plot data with VisIt
+ *
+ *************************************************************************
+ */
+
+void LinAdv::registerModelVariables(
+   algs::HyperbolicLevelIntegrator* integrator)
+{
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(integrator != (algs::HyperbolicLevelIntegrator *)NULL);
+   TBOX_ASSERT(CELLG == FACEG);
+#endif
+
+   integrator->registerVariable(d_uval, d_nghosts,
+      algs::HyperbolicLevelIntegrator::TIME_DEP,
+      d_grid_geometry,
+      "CONSERVATIVE_COARSEN",
+      "CONSERVATIVE_LINEAR_REFINE");
+
+   integrator->registerVariable(d_flux, d_fluxghosts,
+      algs::HyperbolicLevelIntegrator::FLUX,
+      d_grid_geometry,
+      "CONSERVATIVE_COARSEN",
+      "NO_REFINE");
+
+   hier::VariableDatabase* vardb = hier::VariableDatabase::getDatabase();
+
+#ifdef HAVE_HDF5
+   if (!(d_visit_writer.isNull())) {
+      d_visit_writer->
+      registerPlotQuantity("U",
+         "SCALAR",
+         vardb->mapVariableAndContextToIndex(
+            d_uval, integrator->getPlotContext()));
+      if (d_analytical_tagger) {
+         d_analytical_tagger->registerVariablesWithPlotter(*d_visit_writer);
+      }
+   }
+#endif
+
+#ifdef HAVE_HDF5
+   if (d_visit_writer.isNull()) {
+      TBOX_WARNING(d_object_name << ": registerModelVariables()"
+                                 << "\nVisit data writer was not registered.\n"
+                                 << "Consequently, no plot data will"
+                                 << "\nbe written." << endl);
+   }
+#endif
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set up parameters for nonuniform load balancing, if used.             *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void LinAdv::setupLoadBalancer(
+   algs::HyperbolicLevelIntegrator* integrator,
+   mesh::GriddingAlgorithm* gridding_algorithm)
+{
+   (void)integrator;
+
+   hier::VariableDatabase* vardb = hier::VariableDatabase::getDatabase();
+
+   if (d_use_nonuniform_workload && gridding_algorithm) {
+      tbox::Pointer<mesh::TreeLoadBalancer> load_balancer =
+         gridding_algorithm->getLoadBalanceStrategy();
+
+      if (!load_balancer.isNull()) {
+         d_workload_variable = new pdat::CellVariable<double>(
+               d_dim,
+               "workload_variable",
+               1);
+         d_workload_data_id =
+            vardb->registerVariableAndContext(d_workload_variable,
+               vardb->getContext("WORKLOAD"),
+               hier::IntVector(d_dim, 0));
+         load_balancer->setWorkloadPatchDataIndex(d_workload_data_id);
+         vardb->registerPatchDataForRestart(d_workload_data_id);
+      } else {
+         TBOX_WARNING(
+            d_object_name << ": "
+            <<
+            "  Unknown load balancer used in gridding algorithm."
+            <<
+            "  Ignoring request for nonuniform load balancing." << endl);
+         d_use_nonuniform_workload = false;
+      }
+   } else {
+      d_use_nonuniform_workload = false;
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set initial data for solution variables on patch interior.            *
+ * This routine is called whenever a new patch is introduced to the      *
+ * AMR patch hierarchy.  Note that the routine does nothing unless       *
+ * we are at the initial time.  In all other cases, conservative         *
+ * interpolation from coarser levels and copies from patches at the      *
+ * same mesh resolution are sufficient to set data.                      *
+ *                                                                       *
+ *************************************************************************
+ */
+void LinAdv::initializeDataOnPatch(
+   hier::Patch& patch,
+   const double data_time,
+   const bool initial_time)
+{
+   t_init->start();
+
+   (void)data_time;
+
+   if (initial_time) {
+
+      t_init_first_time->start();
+      const tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+         patch.getPatchGeometry();
+      const double* dx = pgeom->getDx();
+      const double* xlo = pgeom->getXLower();
+      const double* xhi = pgeom->getXUpper();
+
+      tbox::Pointer<pdat::CellData<double> > uval =
+         patch.getPatchData(d_uval, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!uval.isNull());
+#endif
+      hier::IntVector ghost_cells(uval->getGhostCellWidth());
+
+      const hier::Index ifirst = patch.getBox().lower();
+      const hier::Index ilast = patch.getBox().upper();
+
+      if ((d_data_problem_int == SPHERE)) {
+
+         if (d_dim == tbox::Dimension(2)) {
+            F77_FUNC(initsphere2d, INITSPHERE2D) (d_data_problem_int, dx, xlo,
+               xhi,
+               ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ghost_cells(0),
+               ghost_cells(1),
+
+               uval->getPointer(),
+               d_uval_inside,
+               d_uval_outside,
+               d_center, d_radius);
+         } else if (d_dim == tbox::Dimension(3)) {
+            F77_FUNC(initsphere3d, INITSPHERE3D) (d_data_problem_int, dx, xlo,
+               xhi,
+               ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ifirst(2), ilast(2),
+               ghost_cells(0),
+               ghost_cells(1),
+               ghost_cells(2),
+
+               uval->getPointer(),
+               d_uval_inside,
+               d_uval_outside,
+               d_center, d_radius);
+         }
+
+      } else if (d_data_problem_int == SINE_CONSTANT_X ||
+                 d_data_problem_int == SINE_CONSTANT_Y ||
+                 d_data_problem_int == SINE_CONSTANT_Z) {
+
+         const double* domain_xlo = d_grid_geometry->getXLower();
+
+         if (d_dim == tbox::Dimension(2)) {
+            F77_FUNC(linadvinitsine2d, LINADVINITSINE2D) (d_data_problem_int,
+               dx, xlo,
+               domain_xlo,
+               ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ghost_cells(0),
+               ghost_cells(1),
+               uval->getPointer(),
+               d_number_of_intervals,
+               d_front_position.getPointer(),
+               d_interval_uval.getPointer(),
+               d_amplitude,
+               d_period);
+         } else if (d_dim == tbox::Dimension(3)) {
+            F77_FUNC(linadvinitsine3d, LINADVINITSINE3D) (d_data_problem_int,
+               dx, xlo,
+               domain_xlo,
+               ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ifirst(2), ilast(2),
+               ghost_cells(0),
+               ghost_cells(1),
+               ghost_cells(2),
+               uval->getPointer(),
+               d_number_of_intervals,
+               d_front_position.getPointer(),
+               d_interval_uval.getPointer(),
+               d_amplitude,
+               d_period);
+         }
+
+      } else {
+
+         if (d_dim == tbox::Dimension(2)) {
+            F77_FUNC(linadvinit2d, LINADVINIT2D) (d_data_problem_int, dx, xlo,
+               xhi,
+               ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ghost_cells(0),
+               ghost_cells(1),
+               uval->getPointer(),
+               d_number_of_intervals,
+               d_front_position.getPointer(),
+               d_interval_uval.getPointer());
+         } else if (d_dim == tbox::Dimension(3)) {
+            F77_FUNC(linadvinit3d, LINADVINIT3D) (d_data_problem_int, dx, xlo,
+               xhi,
+               ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ifirst(2), ilast(2),
+               ghost_cells(0),
+               ghost_cells(1),
+               ghost_cells(2),
+               uval->getPointer(),
+               d_number_of_intervals,
+               d_front_position.getPointer(),
+               d_interval_uval.getPointer());
+         }
+      }
+
+      t_init_first_time->stop();
+   }
+
+   if (d_use_nonuniform_workload) {
+      if (!patch.checkAllocated(d_workload_data_id)) {
+         patch.allocatePatchData(d_workload_data_id);
+      }
+      tbox::Pointer<pdat::CellData<double> > workload_data =
+         patch.getPatchData(d_workload_data_id);
+      workload_data->fillAll(1.0);
+   }
+
+   if (d_analytical_tagger) {
+      d_analytical_tagger->initializePatchData(patch,
+         data_time,
+         initial_time,
+         true);
+   }
+
+   t_init->stop();
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute stable time increment for patch.  Return this value.          *
+ *                                                                       *
+ *************************************************************************
+ */
+
+double LinAdv::computeStableDtOnPatch(
+   hier::Patch& patch,
+   const bool initial_time,
+   const double dt_time)
+{
+   (void)initial_time;
+   (void)dt_time;
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+
+   tbox::Pointer<pdat::CellData<double> > uval =
+      patch.getPatchData(d_uval, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!uval.isNull());
+#endif
+   hier::IntVector ghost_cells = uval->getGhostCellWidth();
+
+   double stabdt;
+   if (d_dim == tbox::Dimension(2)) {
+      F77_FUNC(stabledt2d, STABLEDT2D) (dx,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ghost_cells(0),
+         ghost_cells(1),
+         d_advection_velocity,
+         uval->getPointer(),
+         stabdt);
+   } else if (d_dim == tbox::Dimension(3)) {
+      F77_FUNC(stabledt3d, STABLEDT3D) (dx,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         ghost_cells(0),
+         ghost_cells(1),
+         ghost_cells(2),
+         d_advection_velocity,
+         uval->getPointer(),
+         stabdt);
+   }
+
+   return stabdt;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute time integral of numerical fluxes for finite difference       *
+ * at each cell face on patch.  When d_dim == tbox::Dimension(3)), there are two options    *
+ * for the transverse flux correction.  Otherwise, there is only one.    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void LinAdv::computeFluxesOnPatch(
+   hier::Patch& patch,
+   const double time,
+   const double dt)
+{
+   (void)time;
+
+   if (d_dim == tbox::Dimension(3)) {
+
+      if (d_corner_transport == "CORNER_TRANSPORT_2") {
+         compute3DFluxesWithCornerTransport2(patch, dt);
+      } else {
+         compute3DFluxesWithCornerTransport1(patch, dt);
+      }
+
+   }
+
+   if (d_dim < tbox::Dimension(3)) {
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(CELLG == FACEG);
+#endif
+
+      const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+         patch.getPatchGeometry();
+      const double* dx = patch_geom->getDx();
+
+      hier::Box pbox = patch.getBox();
+      const hier::Index ifirst = patch.getBox().lower();
+      const hier::Index ilast = patch.getBox().upper();
+
+      tbox::Pointer<pdat::CellData<double> > uval =
+         patch.getPatchData(d_uval, getDataContext());
+      tbox::Pointer<pdat::FaceData<double> > flux =
+         patch.getPatchData(d_flux, getDataContext());
+
+      /*
+       * Verify that the integrator providing the context correctly
+       * created it, and that the ghost cell width associated with the
+       * context matches the ghosts defined in this class...
+       */
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!uval.isNull());
+      TBOX_ASSERT(!flux.isNull());
+      TBOX_ASSERT(uval->getGhostCellWidth() == d_nghosts);
+      TBOX_ASSERT(flux->getGhostCellWidth() == d_fluxghosts);
+#endif
+
+      /*
+       * Allocate patch data for temporaries local to this routine.
+       */
+      pdat::FaceData<double> traced_left(pbox, 1, d_nghosts);
+      pdat::FaceData<double> traced_right(pbox, 1, d_nghosts);
+
+      if (d_dim == tbox::Dimension(2)) {
+         F77_FUNC(inittraceflux2d, INITTRACEFLUX2D) (ifirst(0), ilast(0),
+            ifirst(1), ilast(1),
+            uval->getPointer(),
+            traced_left.getPointer(0),
+            traced_left.getPointer(1),
+            traced_right.getPointer(0),
+            traced_right.getPointer(1),
+            flux->getPointer(0),
+            flux->getPointer(1)
+            );
+      }
+
+      if (d_godunov_order > 1) {
+
+         /*
+          * Prepare temporary data for characteristic tracing.
+          */
+         int Mcells = 0;
+         for (int k = 0; k < d_dim.getValue(); k++) {
+            Mcells = tbox::MathUtilities<int>::Max(Mcells, pbox.numberCells(k));
+         }
+
+// Face-centered temporary arrays
+         tbox::Array<double> ttedgslp(2 * FACEG + 1 + Mcells);
+         tbox::Array<double> ttraclft(2 * FACEG + 1 + Mcells);
+         tbox::Array<double> ttracrgt(2 * FACEG + 1 + Mcells);
+
+// Cell-centered temporary arrays
+         tbox::Array<double> ttcelslp(2 * CELLG + Mcells);
+
+/*
+ *  Apply characteristic tracing to compute initial estimate of
+ *  traces w^L and w^R at faces.
+ *  Inputs: w^L, w^R (traced_left/right)
+ *  Output: w^L, w^R
+ */
+         if (d_dim == tbox::Dimension(2)) {
+            F77_FUNC(chartracing2d0, CHARTRACING2D0) (dt,
+               ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               Mcells, dx[0], d_advection_velocity[0], d_godunov_order,
+               uval->getPointer(),
+               traced_left.getPointer(0),
+               traced_right.getPointer(0),
+               ttcelslp.getPointer(),
+               ttedgslp.getPointer(),
+               ttraclft.getPointer(),
+               ttracrgt.getPointer());
+         }
+
+         if (d_dim == tbox::Dimension(2)) {
+            F77_FUNC(chartracing2d1, CHARTRACING2D1) (dt,
+               ifirst(0), ilast(0), ifirst(1), ilast(1),
+               Mcells, dx[1], d_advection_velocity[1], d_godunov_order,
+               uval->getPointer(),
+               traced_left.getPointer(1),
+               traced_right.getPointer(1),
+               ttcelslp.getPointer(),
+               ttedgslp.getPointer(),
+               ttraclft.getPointer(),
+               ttracrgt.getPointer());
+         }
+
+      }  // if (d_godunov_order > 1) ...
+
+      if (d_dim == tbox::Dimension(2)) {
+/*
+ *  Compute fluxes at faces using the face states computed so far.
+ *  Inputs: w^L, w^R (traced_left/right)
+ *  Output: F (flux)
+ */
+// F77_FUNC(fluxcalculation,FLUXCALCULATION)(dt,*,1,dx, to get artificial viscosity
+// F77_FUNC(fluxcalculation,FLUXCALCULATION)(dt,*,0,dx, to get NO artificial viscosity
+
+         F77_FUNC(fluxcalculation2d, FLUXCALCULATION2D) (dt, 1, 0, dx,
+            ifirst(0), ilast(0), ifirst(1), ilast(1),
+            d_advection_velocity,
+            uval->getPointer(),
+            flux->getPointer(0),
+            flux->getPointer(1),
+            traced_left.getPointer(0),
+            traced_left.getPointer(1),
+            traced_right.getPointer(0),
+            traced_right.getPointer(1));
+
+/*
+ *  Re-compute traces at cell faces with transverse correction applied.
+ *  Inputs: F (flux)
+ *  Output: w^L, w^R (traced_left/right)
+ */
+         F77_FUNC(fluxcorrec2d, FLUXCORREC2D) (dt, ifirst(0), ilast(0),
+            ifirst(1), ilast(1),
+            dx, d_advection_velocity,
+            uval->getPointer(),
+            flux->getPointer(0),
+            flux->getPointer(1),
+            traced_left.getPointer(0),
+            traced_left.getPointer(1),
+            traced_right.getPointer(0),
+            traced_right.getPointer(1));
+
+         boundaryReset(patch, traced_left, traced_right);
+
+/*
+ *  Re-compute fluxes with updated traces.
+ *  Inputs: w^L, w^R (traced_left/right)
+ *  Output: F (flux)
+ */
+         F77_FUNC(fluxcalculation2d, FLUXCALCULATION2D) (dt, 0, 0, dx,
+            ifirst(0), ilast(0), ifirst(1), ilast(1),
+            d_advection_velocity,
+            uval->getPointer(),
+            flux->getPointer(0),
+            flux->getPointer(1),
+            traced_left.getPointer(0),
+            traced_left.getPointer(1),
+            traced_right.getPointer(0),
+            traced_right.getPointer(1));
+
+      }
+
+//     tbox::plog << "flux values: option1...." << endl;
+//     flux->print(pbox, tbox::plog);
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute numerical approximations to flux terms using an extension     *
+ * to three dimensions of Collella's corner transport upwind approach.   *
+ * I.E. input value corner_transport = CORNER_TRANSPORT_1                *
+ *                                                                       *
+ *************************************************************************
+ */
+void LinAdv::compute3DFluxesWithCornerTransport1(
+   hier::Patch& patch,
+   const double dt)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(CELLG == FACEG);
+#endif
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+
+   hier::Box pbox = patch.getBox();
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+
+   tbox::Pointer<pdat::CellData<double> > uval =
+      patch.getPatchData(d_uval, getDataContext());
+   tbox::Pointer<pdat::FaceData<double> > flux =
+      patch.getPatchData(d_flux, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!uval.isNull());
+   TBOX_ASSERT(!flux.isNull());
+   TBOX_ASSERT(uval->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(flux->getGhostCellWidth() == d_fluxghosts);
+#endif
+
+   /*
+    * Allocate patch data for temporaries local to this routine.
+    */
+   pdat::FaceData<double> traced_left(pbox, 1, d_nghosts);
+   pdat::FaceData<double> traced_right(pbox, 1, d_nghosts);
+   pdat::FaceData<double> temp_flux(pbox, 1, d_fluxghosts);
+   pdat::FaceData<double> temp_traced_left(pbox, 1, d_nghosts);
+   pdat::FaceData<double> temp_traced_right(pbox, 1, d_nghosts);
+
+   F77_FUNC(inittraceflux3d, INITTRACEFLUX3D) (
+      ifirst(0), ilast(0),
+      ifirst(1), ilast(1),
+      ifirst(2), ilast(2),
+      uval->getPointer(),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2));
+
+   /*
+    * If Godunov method requires slopes with order greater than one, perform
+    * characteristic tracing to compute higher-order slopes.
+    */
+   if (d_godunov_order > 1) {
+
+      /*
+       * Prepare temporary data for characteristic tracing.
+       */
+      int Mcells = 0;
+      for (int k = 0; k < d_dim.getValue(); k++) {
+         Mcells = tbox::MathUtilities<int>::Max(Mcells, pbox.numberCells(k));
+      }
+
+      // Face-centered temporary arrays
+      tbox::Array<double> ttedgslp(2 * FACEG + 1 + Mcells);
+      tbox::Array<double> ttraclft(2 * FACEG + 1 + Mcells);
+      tbox::Array<double> ttracrgt(2 * FACEG + 1 + Mcells);
+
+      // Cell-centered temporary arrays
+      tbox::Array<double> ttcelslp(2 * CELLG + Mcells);
+
+      /*
+       *  Apply characteristic tracing to compute initial estimate of
+       *  traces w^L and w^R at faces.
+       *  Inputs: w^L, w^R (traced_left/right)
+       *  Output: w^L, w^R
+       */
+      F77_FUNC(chartracing3d0, CHARTRACING3D0) (dt,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         Mcells, dx[0], d_advection_velocity[0], d_godunov_order,
+         uval->getPointer(),
+         traced_left.getPointer(0),
+         traced_right.getPointer(0),
+         ttcelslp.getPointer(),
+         ttedgslp.getPointer(),
+         ttraclft.getPointer(),
+         ttracrgt.getPointer());
+
+      F77_FUNC(chartracing3d1, CHARTRACING3D1) (dt,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         Mcells, dx[1], d_advection_velocity[1], d_godunov_order,
+         uval->getPointer(),
+         traced_left.getPointer(1),
+         traced_right.getPointer(1),
+         ttcelslp.getPointer(),
+         ttedgslp.getPointer(),
+         ttraclft.getPointer(),
+         ttracrgt.getPointer());
+
+      F77_FUNC(chartracing3d2, CHARTRACING3D2) (dt,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         Mcells, dx[2], d_advection_velocity[2], d_godunov_order,
+         uval->getPointer(),
+         traced_left.getPointer(2),
+         traced_right.getPointer(2),
+         ttcelslp.getPointer(),
+         ttedgslp.getPointer(),
+         ttraclft.getPointer(),
+         ttracrgt.getPointer());
+   }
+
+   /*
+    *  Compute preliminary fluxes at faces using the face states computed
+    *  so far.
+    *  Inputs: w^L, w^R (traced_left/right)
+    *  Output: F (flux)
+    */
+
+//  F77_FUNC(fluxcalculation,FLUXCALCULATION)(dt,*,*,1,dx,  to do artificial viscosity
+//  F77_FUNC(fluxcalculation,FLUXCALCULATION)(dt,*,*,0,dx,  to do NO artificial viscosity
+   F77_FUNC(fluxcalculation3d, FLUXCALCULATION3D) (dt, 1, 0, 0, dx,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      d_advection_velocity,
+      uval->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2));
+   /*
+    *  Re-compute face traces to include one set of correction terms with
+    *  transverse flux differences.  Store result in temporary vectors
+    *  (i.e. temp_traced_left/right).
+    *  Inputs: F (flux), w^L, w^R (traced_left/right)
+    *  Output: temp_traced_left/right
+    */
+   F77_FUNC(fluxcorrec3d2d, FLUXCORREC3D2D) (
+      dt, ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      dx, d_advection_velocity, 1,
+      uval->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2),
+      temp_traced_left.getPointer(0),
+      temp_traced_left.getPointer(1),
+      temp_traced_left.getPointer(2),
+      temp_traced_right.getPointer(0),
+      temp_traced_right.getPointer(1),
+      temp_traced_right.getPointer(2));
+
+   boundaryReset(patch, traced_left, traced_right);
+
+   /*
+    *  Compute fluxes with partially-corrected trace states.  Store result in
+    *  temporary flux vector.
+    *  Inputs: temp_traced_left/right
+    *  Output: temp_flux
+    */
+   F77_FUNC(fluxcalculation3d, FLUXCALCULATION3D) (dt, 0, 1, 0, dx,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      d_advection_velocity,
+      uval->getPointer(),
+      temp_flux.getPointer(0),
+      temp_flux.getPointer(1),
+      temp_flux.getPointer(2),
+      temp_traced_left.getPointer(0),
+      temp_traced_left.getPointer(1),
+      temp_traced_left.getPointer(2),
+      temp_traced_right.getPointer(0),
+      temp_traced_right.getPointer(1),
+      temp_traced_right.getPointer(2));
+   /*
+    *  Compute face traces with other transverse correction flux
+    *  difference terms included.  Store result in temporary vectors
+    *  (i.e. temp_traced_left/right).
+    *  Inputs: F (flux), w^L, w^R (traced_left/right)
+    *  Output: temp_traced_left/right
+    */
+   F77_FUNC(fluxcorrec3d2d, FLUXCORREC3D2D) (dt, ifirst(0), ilast(0), ifirst(1),
+      ilast(1), ifirst(2), ilast(2),
+      dx, d_advection_velocity, -1,
+      uval->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2),
+      temp_traced_left.getPointer(0),
+      temp_traced_left.getPointer(1),
+      temp_traced_left.getPointer(2),
+      temp_traced_right.getPointer(0),
+      temp_traced_right.getPointer(1),
+      temp_traced_right.getPointer(2));
+
+   boundaryReset(patch, traced_left, traced_right);
+
+   /*
+    *  Compute final predicted fluxes with both sets of transverse flux
+    *  differences included.  Store the result in regular flux vector.
+    *  NOTE:  the fact that we store  these fluxes in the regular (i.e.
+    *  not temporary) flux vector does NOT indicate this is the final result.
+    *  Rather, the flux vector is used as a convenient storage location.
+    *  Inputs: temp_traced_left/right
+    *  Output: flux
+    */
+   F77_FUNC(fluxcalculation3d, FLUXCALCULATION3D) (dt, 1, 0, 0, dx,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      d_advection_velocity,
+      uval->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      temp_traced_left.getPointer(0),
+      temp_traced_left.getPointer(1),
+      temp_traced_left.getPointer(2),
+      temp_traced_right.getPointer(0),
+      temp_traced_right.getPointer(1),
+      temp_traced_right.getPointer(2));
+
+   /*
+    *  Compute the final trace state vectors at cell faces, using transverse
+    *  differences of final predicted fluxes.  Store result w^L
+    *  (traced_left) and w^R (traced_right) vectors.
+    *  Inputs: temp_flux, flux
+    *  Output: w^L, w^R (traced_left/right)
+    */
+   F77_FUNC(fluxcorrec3d3d, FLUXCORREC3D3D) (dt, ifirst(0), ilast(0), ifirst(1),
+      ilast(1), ifirst(2), ilast(2),
+      dx, d_advection_velocity,
+      uval->getPointer(),
+      temp_flux.getPointer(0),
+      temp_flux.getPointer(1),
+      temp_flux.getPointer(2),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2));
+   /*
+    *  Final flux calculation using corrected trace states.
+    *  Inputs:  w^L, w^R (traced_left/right)
+    *  Output:  F (flux)
+    */
+   F77_FUNC(fluxcalculation3d, FLUXCALCULATION3D) (dt, 0, 0, 0, dx,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      d_advection_velocity,
+      uval->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2));
+
+//     tbox::plog << "flux values: option1...." << endl;
+//     flux->print(pbox, tbox::plog);
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Compute numerical approximations to flux terms using John             *
+ * Trangenstein's interpretation of the three-dimensional version of     *
+ * Collella's corner transport upwind approach.                          *
+ * I.E. input value corner_transport = CORNER_TRANSPORT_2                *
+ *                                                                       *
+ *************************************************************************
+ */
+void LinAdv::compute3DFluxesWithCornerTransport2(
+   hier::Patch& patch,
+   const double dt)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(CELLG == FACEG);
+#endif
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+
+   hier::Box pbox = patch.getBox();
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+
+   tbox::Pointer<pdat::CellData<double> > uval =
+      patch.getPatchData(d_uval, getDataContext());
+   tbox::Pointer<pdat::FaceData<double> > flux =
+      patch.getPatchData(d_flux, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!uval.isNull());
+   TBOX_ASSERT(!flux.isNull());
+   TBOX_ASSERT(uval->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(flux->getGhostCellWidth() == d_fluxghosts);
+#endif
+
+   /*
+    * Allocate patch data for temporaries local to this routine.
+    */
+   pdat::FaceData<double> traced_left(pbox, 1, d_nghosts);
+   pdat::FaceData<double> traced_right(pbox, 1, d_nghosts);
+   pdat::FaceData<double> temp_flux(pbox, 1, d_fluxghosts);
+   pdat::CellData<double> third_state(pbox, 1, d_nghosts);
+
+   /*
+    *  Initialize trace fluxes (w^R and w^L) with cell-centered values.
+    */
+   F77_FUNC(inittraceflux3d, INITTRACEFLUX3D) (ifirst(0), ilast(0),
+      ifirst(1), ilast(1),
+      ifirst(2), ilast(2),
+      uval->getPointer(),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2));
+
+   /*
+    *  Compute preliminary fluxes at faces using the face states computed
+    *  so far.
+    *  Inputs: w^L, w^R (traced_left/right)
+    *  Output: F (flux)
+    */
+   F77_FUNC(fluxcalculation3d, FLUXCALCULATION3D) (dt, 1, 1, 0, dx,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      d_advection_velocity,
+      uval->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2));
+
+   /*
+    * If Godunov method requires slopes with order greater than one, perform
+    * characteristic tracing to compute higher-order slopes.
+    */
+   if (d_godunov_order > 1) {
+
+      /*
+       * Prepare temporary data for characteristic tracing.
+       */
+      int Mcells = 0;
+      for (int k = 0; k < d_dim.getValue(); k++) {
+         Mcells = tbox::MathUtilities<int>::Max(Mcells, pbox.numberCells(k));
+      }
+
+      // Face-centered temporary arrays
+      tbox::Array<double> ttedgslp(2 * FACEG + 1 + Mcells);
+      tbox::Array<double> ttraclft(2 * FACEG + 1 + Mcells);
+      tbox::Array<double> ttracrgt(2 * FACEG + 1 + Mcells);
+
+      // Cell-centered temporary arrays
+      tbox::Array<double> ttcelslp(2 * CELLG + Mcells);
+
+      /*
+       *  Apply characteristic tracing to update traces w^L and
+       *  w^R at faces.
+       *  Inputs: w^L, w^R (traced_left/right)
+       *  Output: w^L, w^R
+       */
+      F77_FUNC(chartracing3d0, CHARTRACING3D0) (dt,
+         ifirst(0), ilast(0),
+         ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         Mcells, dx[0], d_advection_velocity[0], d_godunov_order,
+         uval->getPointer(),
+         traced_left.getPointer(0),
+         traced_right.getPointer(0),
+         ttcelslp.getPointer(),
+         ttedgslp.getPointer(),
+         ttraclft.getPointer(),
+         ttracrgt.getPointer());
+
+      F77_FUNC(chartracing3d1, CHARTRACING3D1) (dt,
+         ifirst(0), ilast(0), ifirst(1), ilast(1),
+         ifirst(2), ilast(2),
+         Mcells, dx[1], d_advection_velocity[1], d_godunov_order,
+         uval->getPointer(),
+         traced_left.getPointer(1),
+         traced_right.getPointer(1),
+         ttcelslp.getPointer(),
+         ttedgslp.getPointer(),
+         ttraclft.getPointer(),
+         ttracrgt.getPointer());
+
+      F77_FUNC(chartracing3d2, CHARTRACING3D2) (dt,
+         ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+         Mcells, dx[2], d_advection_velocity[2], d_godunov_order,
+         uval->getPointer(),
+         traced_left.getPointer(2),
+         traced_right.getPointer(2),
+         ttcelslp.getPointer(),
+         ttedgslp.getPointer(),
+         ttraclft.getPointer(),
+         ttracrgt.getPointer());
+
+   } //  if (d_godunov_order > 1) ...
+
+   for (int idir = 0; idir < d_dim.getValue(); idir++) {
+
+      /*
+       *    Approximate traces at cell centers (in idir direction) - denoted
+       *    1/3 state.
+       *    Inputs:  F (flux)
+       *    Output:  third_state
+       */
+      F77_FUNC(onethirdstate3d, ONETHIRDSTATE3D) (dt, dx, idir,
+         ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+         d_advection_velocity,
+         uval->getPointer(),
+         flux->getPointer(0),
+         flux->getPointer(1),
+         flux->getPointer(2),
+         third_state.getPointer());
+      /*
+       *    Compute fluxes using 1/3 state traces, in the two directions OTHER
+       *    than idir.
+       *    Inputs:  third_state
+       *    Output:  temp_flux (only two directions (i.e. those other than idir)
+       *             are modified)
+       */
+      F77_FUNC(fluxthird3d, FLUXTHIRD3D) (dt, dx, idir,
+         ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+         d_advection_velocity,
+         uval->getPointer(),
+         third_state.getPointer(),
+         temp_flux.getPointer(0),
+         temp_flux.getPointer(1),
+         temp_flux.getPointer(2));
+
+      /*
+       *    Compute transverse corrections for the traces in the two directions
+       *    (OTHER than idir) using the differenced fluxes computed in those
+       *    directions.
+       *    Inputs:  temp_flux
+       *    Output:  w^L, w^R (traced_left/right)
+       */
+      F77_FUNC(fluxcorrecjt3d, FLUXCORRECJT3D) (dt, dx, idir,
+         ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+         d_advection_velocity,
+         uval->getPointer(),
+         temp_flux.getPointer(0),
+         temp_flux.getPointer(1),
+         temp_flux.getPointer(2),
+         traced_left.getPointer(0),
+         traced_left.getPointer(1),
+         traced_left.getPointer(2),
+         traced_right.getPointer(0),
+         traced_right.getPointer(1),
+         traced_right.getPointer(2));
+
+   } // loop over directions...
+
+   boundaryReset(patch, traced_left, traced_right);
+
+   /*
+    *  Final flux calculation using corrected trace states.
+    *  Inputs:  w^L, w^R (traced_left/right)
+    *  Output:  F (flux)
+    */
+   F77_FUNC(fluxcalculation3d, FLUXCALCULATION3D) (dt, 0, 0, 0, dx,
+      ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2), ilast(2),
+      d_advection_velocity,
+      uval->getPointer(),
+      flux->getPointer(0),
+      flux->getPointer(1),
+      flux->getPointer(2),
+      traced_left.getPointer(0),
+      traced_left.getPointer(1),
+      traced_left.getPointer(2),
+      traced_right.getPointer(0),
+      traced_right.getPointer(1),
+      traced_right.getPointer(2));
+
+//     tbox::plog << "flux values: option2...." << endl;
+//     flux->print(pbox, tbox::plog);
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Update solution variables by performing a conservative                *
+ * difference with the fluxes calculated in computeFluxesOnPatch().      *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void LinAdv::conservativeDifferenceOnPatch(
+   hier::Patch& patch,
+   const double time,
+   const double dt,
+   bool at_syncronization)
+{
+   (void)time;
+   (void)dt;
+   (void)at_syncronization;
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+
+   tbox::Pointer<pdat::CellData<double> > uval =
+      patch.getPatchData(d_uval, getDataContext());
+   tbox::Pointer<pdat::FaceData<double> > flux =
+      patch.getPatchData(d_flux, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!uval.isNull());
+   TBOX_ASSERT(!flux.isNull());
+   TBOX_ASSERT(uval->getGhostCellWidth() == d_nghosts);
+   TBOX_ASSERT(flux->getGhostCellWidth() == d_fluxghosts);
+#endif
+
+   if (d_dim == tbox::Dimension(2)) {
+      F77_FUNC(consdiff2d, CONSDIFF2D) (ifirst(0), ilast(0), ifirst(1), ilast(1),
+         dx,
+         flux->getPointer(0),
+         flux->getPointer(1),
+         d_advection_velocity,
+         uval->getPointer());
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      F77_FUNC(consdiff3d, CONSDIFF3D) (ifirst(0), ilast(0), ifirst(1), ilast(1),
+         ifirst(2), ilast(2), dx,
+         flux->getPointer(0),
+         flux->getPointer(1),
+         flux->getPointer(2),
+         d_advection_velocity,
+         uval->getPointer());
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Reset physical boundary values for special cases, such as those       *
+ * involving symmetric (i.e., reflective) boundary conditions and        *
+ * when the "STEP" problem is run.                                       *
+ *                                                                       *
+ *************************************************************************
+ */
+void LinAdv::boundaryReset(
+   hier::Patch& patch,
+   pdat::FaceData<double>& traced_left,
+   pdat::FaceData<double>& traced_right) const
+{
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+   int i, idir;
+   bool bdry_cell = true;
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   hier::BoxArray domain_boxes(d_dim);
+   d_grid_geometry->computePhysicalDomain(domain_boxes, patch_geom->getRatio());
+   int num_domain_boxes = domain_boxes.getNumberOfBoxes();
+
+   pdat::CellIndex icell(ifirst);
+   hier::BoxArray bdrybox(d_dim, 2 * d_dim.getValue());
+   hier::Index ibfirst = ifirst;
+   hier::Index iblast = ilast;
+   int bdry_case, bside;
+
+   for (idir = 0; idir < d_dim.getValue(); idir++) {
+      ibfirst(idir) = ifirst(idir) - 1;
+      iblast(idir) = ifirst(idir) - 1;
+      bdrybox[2 * idir] = hier::Box(ibfirst, iblast);
+
+      ibfirst(idir) = ilast(idir) + 1;
+      iblast(idir) = ilast(idir) + 1;
+      bdrybox[2 * idir + 1] = hier::Box(ibfirst, iblast);
+   }
+
+   if (d_dim == tbox::Dimension(2)) {
+      for (idir = 0; idir < d_dim.getValue(); idir++) {
+         bside = 2 * idir;
+         bdry_case = d_scalar_bdry_edge_conds[bside];
+         if (bdry_case == REFLECT_BC) {
+            for (pdat::CellIterator ic(bdrybox[bside]); ic; ic++) {
+               for (i = 0; i < num_domain_boxes; i++) {
+                  if (domain_boxes[i].contains(ic()))
+                     bdry_cell = false;
+               }
+               if (bdry_cell) {
+                  pdat::FaceIndex sidein = pdat::FaceIndex(ic(), idir, 1);
+                  (traced_left)(sidein, 0) = (traced_right)(sidein, 0);
+               }
+            }
+         }
+
+         int bnode = 2 * idir + 1;
+         bdry_case = d_scalar_bdry_edge_conds[bnode];
+         if (bdry_case == REFLECT_BC) {
+            for (pdat::CellIterator ic(bdrybox[bside]); ic; ic++) {
+               for (i = 0; i < num_domain_boxes; i++) {
+                  if (domain_boxes[i].contains(ic()))
+                     bdry_cell = false;
+               }
+               if (bdry_cell) {
+                  pdat::FaceIndex sidein = pdat::FaceIndex(ic(), idir, 0);
+                  (traced_right)(sidein, 0) = (traced_left)(sidein, 0);
+               }
+            }
+         }
+      }
+   } else if (d_dim == tbox::Dimension(3)) {
+      for (idir = 0; idir < d_dim.getValue(); idir++) {
+         bside = 2 * idir;
+         bdry_case = d_scalar_bdry_face_conds[bside];
+         if (bdry_case == REFLECT_BC) {
+            for (pdat::CellIterator ic(bdrybox[bside]); ic; ic++) {
+               for (i = 0; i < num_domain_boxes; i++) {
+                  if (domain_boxes[i].contains(ic()))
+                     bdry_cell = false;
+               }
+               if (bdry_cell) {
+                  pdat::FaceIndex sidein = pdat::FaceIndex(ic(), idir, 1);
+                  (traced_left)(sidein, 0) = (traced_right)(sidein, 0);
+               }
+            }
+         }
+
+         int bnode = 2 * idir + 1;
+         bdry_case = d_scalar_bdry_face_conds[bnode];
+         if (bdry_case == REFLECT_BC) {
+            for (pdat::CellIterator ic(bdrybox[bside]); ic; ic++) {
+               for (i = 0; i < num_domain_boxes; i++) {
+                  if (domain_boxes[i].contains(ic()))
+                     bdry_cell = false;
+               }
+               if (bdry_cell) {
+                  pdat::FaceIndex sidein = pdat::FaceIndex(ic(), idir, 0);
+                  (traced_right)(sidein, 0) = (traced_left)(sidein, 0);
+               }
+            }
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Set the data in ghost cells corresponding to physical boundary        *
+ * conditions.  Note that boundary geometry configuration information    *
+ * (i.e., faces, edges, and nodes) is obtained from the patch geometry   *
+ * object owned by the patch.                                            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void LinAdv::setPhysicalBoundaryConditions(
+   hier::Patch& patch,
+   const double fill_time,
+   const hier::IntVector& ghost_width_to_fill)
+{
+   (void)fill_time;
+   (void)ghost_width_to_fill;
+
+   tbox::Pointer<pdat::CellData<double> > uval =
+      patch.getPatchData(d_uval, getDataContext());
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!uval.isNull());
+#endif
+   hier::IntVector ghost_cells(uval->getGhostCellWidth());
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(uval->getGhostCellWidth() == d_nghosts);
+#endif
+
+   if (d_dim == tbox::Dimension(2)) {
+
+      /*
+       * Set boundary conditions for cells corresponding to patch edges.
+       */
+      appu::CartesianBoundaryUtilities2::
+      fillEdgeBoundaryData("uval", uval,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_edge_conds,
+         d_bdry_edge_uval);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+#if CHECK_BDRY_DATA
+      checkBoundaryData(EDGE2D_BDRY_TYPE, patch, ghost_width_to_fill,
+         d_scalar_bdry_edge_conds);
+#endif
+#endif
+
+      /*
+       *  Set boundary conditions for cells corresponding to patch nodes.
+       */
+
+      appu::CartesianBoundaryUtilities2::
+      fillNodeBoundaryData("uval", uval,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_node_conds,
+         d_bdry_edge_uval);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+#if CHECK_BDRY_DATA
+      checkBoundaryData(NODE2D_BDRY_TYPE, patch, ghost_width_to_fill,
+         d_scalar_bdry_node_conds);
+#endif
+#endif
+
+   } // NDIM == 2
+
+   if (d_dim == tbox::Dimension(3)) {
+
+      /*
+       *  Set boundary conditions for cells corresponding to patch faces.
+       */
+
+      appu::CartesianBoundaryUtilities3::
+      fillFaceBoundaryData("uval", uval,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_face_conds,
+         d_bdry_face_uval);
+#ifdef DEBUG_CHECK_ASSERTIONS
+#if CHECK_BDRY_DATA
+      checkBoundaryData(FACE3D_BDRY_TYPE, patch, ghost_width_to_fill,
+         d_scalar_bdry_face_conds);
+#endif
+#endif
+
+      /*
+       *  Set boundary conditions for cells corresponding to patch edges.
+       */
+
+      appu::CartesianBoundaryUtilities3::
+      fillEdgeBoundaryData("uval", uval,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_edge_conds,
+         d_bdry_face_uval);
+#ifdef DEBUG_CHECK_ASSERTIONS
+#if CHECK_BDRY_DATA
+      checkBoundaryData(EDGE3D_BDRY_TYPE, patch, ghost_width_to_fill,
+         d_scalar_bdry_edge_conds);
+#endif
+#endif
+
+      /*
+       *  Set boundary conditions for cells corresponding to patch nodes.
+       */
+
+      appu::CartesianBoundaryUtilities3::
+      fillNodeBoundaryData("uval", uval,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_node_conds,
+         d_bdry_face_uval);
+#ifdef DEBUG_CHECK_ASSERTIONS
+#if CHECK_BDRY_DATA
+      checkBoundaryData(NODE3D_BDRY_TYPE, patch, ghost_width_to_fill,
+         d_scalar_bdry_node_conds);
+#endif
+#endif
+
+   } // NDIM == 3
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Tag cells for refinement using Richardson extrapolation.  Criteria    *
+ * defined in input.                                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+void LinAdv::tagRichardsonExtrapolationCells(
+   hier::Patch& patch,
+   const int error_level_number,
+   const tbox::Pointer<hier::VariableContext> coarsened_fine,
+   const tbox::Pointer<hier::VariableContext> advanced_coarse,
+   const double regrid_time,
+   const double deltat,
+   const int error_coarsen_ratio,
+   const bool initial_error,
+   const int tag_index,
+   const bool uses_gradient_detector_too)
+{
+   (void)initial_error;
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   hier::Box pbox = patch.getBox();
+
+   tbox::Pointer<pdat::CellData<int> > tags = patch.getPatchData(tag_index);
+
+   /*
+    * Possible tagging criteria includes
+    *    UVAL_RICHARDSON
+    * The criteria is specified over a time interval.
+    *
+    * Loop over criteria provided and check to make sure we are in the
+    * specified time interval.  If so, apply appropriate tagging for
+    * the level.
+    */
+   for (int ncrit = 0; ncrit < d_refinement_criteria.getSize(); ncrit++) {
+
+      string ref = d_refinement_criteria[ncrit];
+      tbox::Pointer<pdat::CellData<double> > coarsened_fine_var;
+      tbox::Pointer<pdat::CellData<double> > advanced_coarse_var;
+      int size;
+      double tol;
+      bool time_allowed;
+
+      if (ref == "UVAL_RICHARDSON") {
+         coarsened_fine_var = patch.getPatchData(d_uval, coarsened_fine);
+         advanced_coarse_var = patch.getPatchData(d_uval, advanced_coarse);
+         size = d_rich_tol.getSize();
+         tol = ((error_level_number < size)
+                ? d_rich_tol[error_level_number]
+                : d_rich_tol[size - 1]);
+         size = d_rich_time_min.getSize();
+         double time_min = ((error_level_number < size)
+                            ? d_rich_time_min[error_level_number]
+                            : d_rich_time_min[size - 1]);
+         size = d_rich_time_max.getSize();
+         double time_max = ((error_level_number < size)
+                            ? d_rich_time_max[error_level_number]
+                            : d_rich_time_max[size - 1]);
+         time_allowed = (time_min <= regrid_time) && (time_max > regrid_time);
+
+         if (time_allowed) {
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(!coarsened_fine_var.isNull());
+            TBOX_ASSERT(!advanced_coarse_var.isNull());
+#endif
+            /*
+             * We tag wherever the global error > specified tolerance
+             * (i.e. d_rich_tol).  The estimated global error is the
+             * local truncation error * the approximate number of steps
+             * used in the simulation.  Approximate the number of steps as:
+             *
+             *       steps = L / (s*deltat)
+             * where
+             *       L = length of problem domain
+             *       s = wave speed
+             *       delta t = timestep on current level
+             *
+             */
+            const double* xdomainlo = d_grid_geometry->getXLower();
+            const double* xdomainhi = d_grid_geometry->getXUpper();
+            double max_length = 0.;
+            double max_wave_speed = 0.;
+            for (int idir = 0; idir < d_dim.getValue(); idir++) {
+               double length = xdomainhi[idir] - xdomainlo[idir];
+               if (length > max_length) max_length = length;
+
+               double wave_speed = d_advection_velocity[idir];
+               if (wave_speed > max_wave_speed) max_wave_speed = wave_speed;
+            }
+
+            double steps = max_length / (max_wave_speed * deltat);
+
+            /*
+             * Tag cells where |w_c - w_f| * (r^n -1) * steps
+             *
+             * where
+             *       w_c = soln on coarse level (pressure_crse)
+             *       w_f = soln on fine level (pressure_fine)
+             *       r   = error coarsen ratio
+             *       n   = spatial order of scheme (1st or 2nd depending
+             *             on whether Godunov order is 1st or 2nd/4th)
+             */
+            int order = 1;
+            if (d_godunov_order > 1) order = 2;
+            double r = error_coarsen_ratio;
+            double rnminus1 = pow(r, order) - 1;
+
+            double diff = 0.;
+            double error = 0.;
+
+            for (pdat::CellIterator ic(pbox); ic; ic++) {
+
+               /*
+                * Compute error norm
+                */
+               diff = (*advanced_coarse_var)(ic(), 0)
+                  - (*coarsened_fine_var)(ic(), 0);
+               error =
+                  tbox::MathUtilities<double>::Abs(diff) * rnminus1 * steps;
+
+               /*
+                * Tag cell if error > prescribed threshold. Since we are
+                * operating on the actual tag values (not temporary ones)
+                * distinguish here tags that were previously set before
+                * coming into this routine and those that are set here.
+                *     RICHARDSON_ALREADY_TAGGED - tagged before coming
+                *                                 into this method.
+                *     RICHARDSON_NEWLY_TAGGED - newly tagged in this method
+                *
+                */
+               if (error > tol) {
+                  if ((*tags)(ic(), 0)) {
+                     (*tags)(ic(), 0) = RICHARDSON_ALREADY_TAGGED;
+                  } else {
+                     (*tags)(ic(), 0) = RICHARDSON_NEWLY_TAGGED;
+                  }
+               }
+
+            }
+
+         } // time_allowed
+
+      } // if UVAL_RICHARDSON
+
+   } // loop over refinement criteria
+
+   /*
+    * If we are NOT performing gradient detector (i.e. only
+    * doing Richardson extrapolation) set tags marked in this method
+    * to TRUE and all others false.  Otherwise, leave tags set to the
+    * RICHARDSON_ALREADY_TAGGED and RICHARDSON_NEWLY_TAGGED as we may
+    * use this information in the gradient detector.
+    */
+   if (!uses_gradient_detector_too) {
+      for (pdat::CellIterator ic(pbox); ic; ic++) {
+         if ((*tags)(ic(), 0) == RICHARDSON_ALREADY_TAGGED ||
+             (*tags)(ic(), 0) == RICHARDSON_NEWLY_TAGGED) {
+            (*tags)(ic(), 0) = TRUE;
+         } else {
+            (*tags)(ic(), 0) = FALSE;
+         }
+      }
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Tag cells for refinement using gradient detector.  Tagging criteria   *
+ * defined in input.                                                     *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void LinAdv::tagGradientDetectorCells(
+   hier::Patch& patch,
+   const double regrid_time,
+   const bool initial_error,
+   const int tag_indx,
+   const bool uses_richardson_extrapolation_too)
+{
+   (void)initial_error;
+
+   const int error_level_number = patch.getPatchLevelNumber();
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+   const double* dx = patch_geom->getDx();
+
+   tbox::Pointer<pdat::CellData<int> > tags = patch.getPatchData(tag_indx);
+
+   hier::Box pbox = patch.getBox();
+
+   const hier::Index ifirst = patch.getBox().lower();
+   const hier::Index ilast = patch.getBox().upper();
+
+   hier::Index ict(d_dim);
+
+   int not_refine_tag_val = FALSE;
+   int refine_tag_val = TRUE;
+
+   /*
+    * Create a set of temporary tags and set to untagged value.
+    */
+   tbox::Pointer<pdat::CellData<int> > temp_tags(
+      new pdat::CellData<int>(pbox, 1, d_nghosts));
+   temp_tags->fillAll(not_refine_tag_val);
+
+   if (d_analytical_tagger) {
+      t_analytical_tag->start();
+      d_analytical_tagger->computePatchData(patch,
+         regrid_time,
+         (pdat::NodeData<double> *)NULL,
+         tags.getPointer());
+      t_analytical_tag->stop();
+   } else {
+      /*
+       * Possible tagging criteria includes
+       *    UVAL_DEVIATION, UVAL_GRADIENT, UVAL_SHOCK
+       * The criteria is specified over a time interval.
+       *
+       * Loop over criteria provided and check to make sure we are in the
+       * specified time interval.  If so, apply appropriate tagging for
+       * the level.
+       */
+      for (int ncrit = 0; ncrit < d_refinement_criteria.getSize(); ncrit++) {
+
+         string ref = d_refinement_criteria[ncrit];
+         tbox::Pointer<pdat::CellData<double> > var =
+            patch.getPatchData(d_uval, getDataContext());
+
+         TBOX_ASSERT(!var.isNull());
+
+         hier::IntVector vghost(var->getGhostCellWidth());
+         hier::IntVector tagghost(tags->getGhostCellWidth());
+
+         int size = 0;
+         double tol = 0.;
+         double onset = 0.;
+         bool time_allowed = false;
+
+         if (ref == "UVAL_DEVIATION") {
+            size = d_dev_tol.getSize();
+            tol = ((error_level_number < size)
+                   ? d_dev_tol[error_level_number]
+                   : d_dev_tol[size - 1]);
+            size = d_dev.getSize();
+            double dev = ((error_level_number < size)
+                          ? d_dev[error_level_number]
+                          : d_dev[size - 1]);
+            size = d_dev_time_min.getSize();
+            double time_min = ((error_level_number < size)
+                               ? d_dev_time_min[error_level_number]
+                               : d_dev_time_min[size - 1]);
+            size = d_dev_time_max.getSize();
+            double time_max = ((error_level_number < size)
+                               ? d_dev_time_max[error_level_number]
+                               : d_dev_time_max[size - 1]);
+            time_allowed = (time_min <= regrid_time) && (time_max > regrid_time);
+
+            if (time_allowed) {
+
+               /*
+                * Check for tags that have already been set in a previous
+                * step.  Do NOT consider values tagged with value
+                * RICHARDSON_NEWLY_TAGGED since these were set most recently
+                * by Richardson extrapolation.
+                */
+               for (pdat::CellIterator ic(pbox); ic; ic++) {
+                  double locden = tol;
+                  int tag_val = (*tags)(ic(), 0);
+                  if (tag_val) {
+                     if (tag_val != RICHARDSON_NEWLY_TAGGED) {
+                        locden *= 0.75;
+                     }
+                  }
+                  if (tbox::MathUtilities<double>::Abs((*var)(ic()) - dev) >
+                      locden) {
+                     (*temp_tags)(ic(), 0) = refine_tag_val;
+                  }
+               }
+            }
+         }
+
+         if (ref == "UVAL_GRADIENT") {
+            size = d_grad_tol.getSize();
+            tol = ((error_level_number < size)
+                   ? d_grad_tol[error_level_number]
+                   : d_grad_tol[size - 1]);
+            size = d_grad_time_min.getSize();
+            double time_min = ((error_level_number < size)
+                               ? d_grad_time_min[error_level_number]
+                               : d_grad_time_min[size - 1]);
+            size = d_grad_time_max.getSize();
+            double time_max = ((error_level_number < size)
+                               ? d_grad_time_max[error_level_number]
+                               : d_grad_time_max[size - 1]);
+            time_allowed = (time_min <= regrid_time) && (time_max > regrid_time);
+
+            if (time_allowed) {
+
+               if (d_dim == tbox::Dimension(2)) {
+                  F77_FUNC(detectgrad2d, DETECTGRAD2D) (
+                     ifirst(0), ilast(0), ifirst(1), ilast(1),
+                     vghost(0), tagghost(0), d_nghosts(0),
+                     vghost(1), tagghost(1), d_nghosts(1),
+                     dx,
+                     tol,
+                     refine_tag_val, not_refine_tag_val,
+                     var->getPointer(),
+                     tags->getPointer(), temp_tags->getPointer());
+               } else if (d_dim == tbox::Dimension(3)) {
+                  F77_FUNC(detectgrad3d, DETECTGRAD3D) (
+                     ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2),
+                     ilast(2),
+                     vghost(0), tagghost(0), d_nghosts(0),
+                     vghost(1), tagghost(1), d_nghosts(1),
+                     vghost(2), tagghost(2), d_nghosts(2),
+                     dx,
+                     tol,
+                     refine_tag_val, not_refine_tag_val,
+                     var->getPointer(),
+                     tags->getPointer(), temp_tags->getPointer());
+               }
+            }
+
+         }
+
+         if (ref == "UVAL_SHOCK") {
+            size = d_shock_tol.getSize();
+            tol = ((error_level_number < size)
+                   ? d_shock_tol[error_level_number]
+                   : d_shock_tol[size - 1]);
+            size = d_shock_onset.getSize();
+            onset = ((error_level_number < size)
+                     ? d_shock_onset[error_level_number]
+                     : d_shock_onset[size - 1]);
+            size = d_shock_time_min.getSize();
+            double time_min = ((error_level_number < size)
+                               ? d_shock_time_min[error_level_number]
+                               : d_shock_time_min[size - 1]);
+            size = d_shock_time_max.getSize();
+            double time_max = ((error_level_number < size)
+                               ? d_shock_time_max[error_level_number]
+                               : d_shock_time_max[size - 1]);
+            time_allowed = (time_min <= regrid_time) && (time_max > regrid_time);
+
+            if (time_allowed) {
+
+               if (d_dim == tbox::Dimension(2)) {
+                  F77_FUNC(detectshock2d, DETECTSHOCK2D) (
+                     ifirst(0), ilast(0), ifirst(1), ilast(1),
+                     vghost(0), tagghost(0), d_nghosts(0),
+                     vghost(1), tagghost(1), d_nghosts(1),
+                     dx,
+                     tol,
+                     onset,
+                     refine_tag_val, not_refine_tag_val,
+                     var->getPointer(),
+                     tags->getPointer(), temp_tags->getPointer());
+               } else if (d_dim == tbox::Dimension(3)) {
+                  F77_FUNC(detectshock3d, DETECTSHOCK3D) (
+                     ifirst(0), ilast(0), ifirst(1), ilast(1), ifirst(2),
+                     ilast(2),
+                     vghost(0), tagghost(0), d_nghosts(0),
+                     vghost(1), tagghost(1), d_nghosts(1),
+                     vghost(2), tagghost(2), d_nghosts(2),
+                     dx,
+                     tol,
+                     onset,
+                     refine_tag_val, not_refine_tag_val,
+                     var->getPointer(),
+                     tags->getPointer(), temp_tags->getPointer());
+               }
+            }
+
+         }
+
+      }  // loop over criteria
+
+      /*
+       * Adjust temp_tags from those tags set in Richardson extrapolation.
+       * Here, we just reset any tags that were set in Richardson extrapolation
+       * to be the designated "refine_tag_val".
+       */
+      if (uses_richardson_extrapolation_too) {
+         for (pdat::CellIterator ic(pbox); ic; ic++) {
+            if ((*tags)(ic(), 0) == RICHARDSON_ALREADY_TAGGED ||
+                (*tags)(ic(), 0) == RICHARDSON_NEWLY_TAGGED) {
+               (*temp_tags)(ic(), 0) = refine_tag_val;
+            }
+         }
+      }
+
+      /*
+       * Update tags.
+       */
+      for (pdat::CellIterator ic(pbox); ic; ic++) {
+         (*tags)(ic(), 0) = (*temp_tags)(ic(), 0);
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Register VisIt data writer to write data to plot files that may       *
+ * be postprocessed by the VisIt tool.                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+#ifdef HAVE_HDF5
+void LinAdv::registerVisItDataWriter(
+   tbox::Pointer<appu::VisItDataWriter> viz_writer)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!(viz_writer.isNull()));
+#endif
+   d_visit_writer = viz_writer;
+
+   d_visit_writer->registerDerivedPlotQuantity("Owner",
+      "SCALAR",
+      this);
+}
+#endif
+
+bool LinAdv::packDerivedDataIntoDoubleBuffer(
+   double* buffer,
+   const hier::Patch& patch,
+   const hier::Box& region,
+   const string& variable_name,
+   int depth_id) const
+{
+   NULL_USE(patch);
+   NULL_USE(depth_id);
+   if (variable_name == "Owner") {
+      const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+      double owner = mpi.getRank();
+      int i, size = region.size();
+      for (i = 0; i < size; ++i) buffer[i] = owner;
+   } else {
+      // Did not register this name.
+      TBOX_ERROR(
+         "Unregistered variable name '" << variable_name << "' in\n"
+         <<
+         "DLBGTest<DIM>::packDerivedPatchDataIntoDoubleBuffer");
+   }
+
+   return true;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Write LinAdv object state to specified stream.                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void LinAdv::printClassData(
+   ostream& os) const
+{
+   int j, k;
+
+   os << "\nLinAdv::printClassData..." << endl;
+   os << "LinAdv: this = " << (LinAdv *)this << endl;
+   os << "d_object_name = " << d_object_name << endl;
+   os << "d_grid_geometry = "
+      << (geom::CartesianGridGeometry *)d_grid_geometry << endl;
+
+   os << "Parameters for numerical method ..." << endl;
+   os << "   d_advection_velocity = ";
+   for (j = 0; j < d_dim.getValue(); j++) os << d_advection_velocity[j] << " ";
+   os << endl;
+   os << "   d_godunov_order = " << d_godunov_order << endl;
+   os << "   d_corner_transport = " << d_corner_transport << endl;
+   os << "   d_nghosts = " << d_nghosts << endl;
+   os << "   d_fluxghosts = " << d_fluxghosts << endl;
+
+   os << "Problem description and initial data..." << endl;
+   os << "   d_data_problem = " << d_data_problem << endl;
+   os << "   d_data_problem_int = " << d_data_problem << endl;
+
+   os << "       d_radius = " << d_radius << endl;
+   os << "       d_center = ";
+   for (j = 0; j < d_dim.getValue(); j++) os << d_center[j] << " ";
+   os << endl;
+   os << "       d_uval_inside = " << d_uval_inside << endl;
+   os << "       d_uval_outside = " << d_uval_outside << endl;
+
+   os << "       d_number_of_intervals = " << d_number_of_intervals << endl;
+   os << "       d_front_position = ";
+   for (k = 0; k < d_number_of_intervals - 1; k++) {
+      os << d_front_position[k] << "  ";
+   }
+   os << endl;
+   os << "       d_interval_uval = " << endl;
+   for (k = 0; k < d_number_of_intervals; k++) {
+      os << "            " << d_interval_uval[k] << endl;
+   }
+   os << "   Boundary condition data " << endl;
+
+   if (d_dim == tbox::Dimension(2)) {
+      for (j = 0; j < d_scalar_bdry_edge_conds.getSize(); j++) {
+         os << "       d_scalar_bdry_edge_conds[" << j << "] = "
+         << d_scalar_bdry_edge_conds[j] << endl;
+         if (d_scalar_bdry_edge_conds[j] == DIRICHLET_BC) {
+            os << "         d_bdry_edge_uval[" << j << "] = "
+            << d_bdry_edge_uval[j] << endl;
+         }
+      }
+      os << endl;
+      for (j = 0; j < d_scalar_bdry_node_conds.getSize(); j++) {
+         os << "       d_scalar_bdry_node_conds[" << j << "] = "
+         << d_scalar_bdry_node_conds[j] << endl;
+         os << "       d_node_bdry_edge[" << j << "] = "
+         << d_node_bdry_edge[j] << endl;
+      }
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      for (j = 0; j < d_scalar_bdry_face_conds.getSize(); j++) {
+         os << "       d_scalar_bdry_face_conds[" << j << "] = "
+         << d_scalar_bdry_face_conds[j] << endl;
+         if (d_scalar_bdry_face_conds[j] == DIRICHLET_BC) {
+            os << "         d_bdry_face_uval[" << j << "] = "
+            << d_bdry_face_uval[j] << endl;
+         }
+      }
+      os << endl;
+      for (j = 0; j < d_scalar_bdry_edge_conds.getSize(); j++) {
+         os << "       d_scalar_bdry_edge_conds[" << j << "] = "
+         << d_scalar_bdry_edge_conds[j] << endl;
+         os << "       d_edge_bdry_face[" << j << "] = "
+         << d_edge_bdry_face[j] << endl;
+      }
+      os << endl;
+      for (j = 0; j < d_scalar_bdry_node_conds.getSize(); j++) {
+         os << "       d_scalar_bdry_node_conds[" << j << "] = "
+         << d_scalar_bdry_node_conds[j] << endl;
+         os << "       d_node_bdry_face[" << j << "] = "
+         << d_node_bdry_face[j] << endl;
+      }
+   }
+
+   os << "   Refinement criteria parameters " << endl;
+
+   for (j = 0; j < d_refinement_criteria.getSize(); j++) {
+      os << "       d_refinement_criteria[" << j << "] = "
+      << d_refinement_criteria[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_dev_tol.getSize(); j++) {
+      os << "       d_dev_tol[" << j << "] = "
+      << d_dev_tol[j] << endl;
+   }
+   for (j = 0; j < d_dev.getSize(); j++) {
+      os << "       d_dev[" << j << "] = "
+      << d_dev[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_dev_time_max.getSize(); j++) {
+      os << "       d_dev_time_max[" << j << "] = "
+      << d_dev_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_dev_time_min.getSize(); j++) {
+      os << "       d_dev_time_min[" << j << "] = "
+      << d_dev_time_min[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_grad_tol.getSize(); j++) {
+      os << "       d_grad_tol[" << j << "] = "
+      << d_grad_tol[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_grad_time_max.getSize(); j++) {
+      os << "       d_grad_time_max[" << j << "] = "
+      << d_grad_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_grad_time_min.getSize(); j++) {
+      os << "       d_grad_time_min[" << j << "] = "
+      << d_grad_time_min[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_shock_onset.getSize(); j++) {
+      os << "       d_shock_onset[" << j << "] = "
+      << d_shock_onset[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_shock_tol.getSize(); j++) {
+      os << "       d_shock_tol[" << j << "] = "
+      << d_shock_tol[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_shock_time_max.getSize(); j++) {
+      os << "       d_shock_time_max[" << j << "] = "
+      << d_shock_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_shock_time_min.getSize(); j++) {
+      os << "       d_shock_time_min[" << j << "] = "
+      << d_shock_time_min[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_rich_tol.getSize(); j++) {
+      os << "       d_rich_tol[" << j << "] = "
+      << d_rich_tol[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_rich_time_max.getSize(); j++) {
+      os << "       d_rich_time_max[" << j << "] = "
+      << d_rich_time_max[j] << endl;
+   }
+   os << endl;
+   for (j = 0; j < d_rich_time_min.getSize(); j++) {
+      os << "       d_rich_time_min[" << j << "] = "
+      << d_rich_time_min[j] << endl;
+   }
+   os << endl;
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Read data members from input.  All values set from restart can be	*
+ * overridden by values in the input database.
+ *                                                                       *
+ *************************************************************************
+ */
+void LinAdv::getFromInput(
+   tbox::Pointer<tbox::Database> db,
+   bool is_from_restart)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   /*
+    * Note: if we are restarting, then we only allow nonuniform
+    * workload to be used if nonuniform workload was used originally.
+    */
+   if (!is_from_restart) {
+      d_use_nonuniform_workload =
+         db->getBoolWithDefault("use_nonuniform_workload",
+            d_use_nonuniform_workload);
+   } else {
+      if (d_use_nonuniform_workload) {
+         d_use_nonuniform_workload =
+            db->getBool("use_nonuniform_workload");
+      }
+   }
+
+   if (db->keyExists("advection_velocity")) {
+      db->getDoubleArray("advection_velocity",
+         d_advection_velocity, d_dim.getValue());
+   } else {
+      TBOX_ERROR(
+         d_object_name << ":  "
+         <<
+         "Key data `advection_velocity' not found in input.");
+   }
+
+   if (db->keyExists("godunov_order")) {
+      d_godunov_order = db->getInteger("godunov_order");
+      if ((d_godunov_order != 1) &&
+          (d_godunov_order != 2) &&
+          (d_godunov_order != 4)) {
+         TBOX_ERROR(
+            d_object_name << ": "
+            <<
+            "`godunov_order' in input must be 1, 2, or 4." << endl);
+      }
+   } else {
+      d_godunov_order = db->getIntegerWithDefault("d_godunov_order",
+            d_godunov_order);
+   }
+
+   if (db->keyExists("corner_transport")) {
+      d_corner_transport = db->getString("corner_transport");
+      if ((d_corner_transport != "CORNER_TRANSPORT_1") &&
+          (d_corner_transport != "CORNER_TRANSPORT_2")) {
+         TBOX_ERROR(
+            d_object_name << ": "
+            <<
+            "`corner_transport' in input must be either string"
+            <<
+            " 'CORNER_TRANSPORT_1' or 'CORNER_TRANSPORT_2'." << endl);
+      }
+   } else {
+      d_corner_transport = db->getStringWithDefault("corner_transport",
+            d_corner_transport);
+   }
+
+   if (db->keyExists("Refinement_data")) {
+      tbox::Pointer<tbox::Database> refine_db = db->getDatabase(
+            "Refinement_data");
+      tbox::Array<string> refinement_keys = refine_db->getAllKeys();
+      int num_keys = refinement_keys.getSize();
+
+      if (refine_db->keyExists("refine_criteria")) {
+         d_refinement_criteria =
+            refine_db->getStringArray("refine_criteria");
+      } else {
+         TBOX_WARNING(
+            d_object_name << ": "
+            <<
+            "No key `refine_criteria' found in data for"
+            <<
+            " RefinementData. No refinement will occur." << endl);
+      }
+
+      tbox::Array<string> ref_keys_defined(num_keys);
+      int def_key_cnt = 0;
+      tbox::Pointer<tbox::Database> error_db;
+      for (int i = 0; i < refinement_keys.getSize(); i++) {
+
+         string error_key = refinement_keys[i];
+         error_db.setNull();
+
+         if (!(error_key == "refine_criteria")) {
+
+            if (!(error_key == "UVAL_DEVIATION" ||
+                  error_key == "UVAL_GRADIENT" ||
+                  error_key == "UVAL_SHOCK" ||
+                  error_key == "UVAL_RICHARDSON")) {
+               TBOX_ERROR(
+                  d_object_name << ": "
+                  << "Unknown refinement criteria: "
+                  << error_key
+                  << "\nin input." << endl);
+            } else {
+               error_db = refine_db->getDatabase(error_key);
+               ref_keys_defined[def_key_cnt] = error_key;
+               def_key_cnt++;
+            }
+
+            if (!error_db.isNull() && error_key == "UVAL_DEVIATION") {
+
+               if (error_db->keyExists("dev_tol")) {
+                  d_dev_tol =
+                     error_db->getDoubleArray("dev_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `dev_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("uval_dev")) {
+                  d_dev =
+                     error_db->getDoubleArray("uval_dev");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `uval_dev' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_dev_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_dev_time_max.resizeArray(1);
+                  d_dev_time_max[0] = tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_dev_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_dev_time_min.resizeArray(1);
+                  d_dev_time_min[0] = 0.;
+               }
+
+            }
+
+            if (!error_db.isNull() && error_key == "UVAL_GRADIENT") {
+
+               if (error_db->keyExists("grad_tol")) {
+                  d_grad_tol =
+                     error_db->getDoubleArray("grad_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `grad_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_grad_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_grad_time_max.resizeArray(1);
+                  d_grad_time_max[0] = tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_grad_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_grad_time_min.resizeArray(1);
+                  d_grad_time_min[0] = 0.;
+               }
+
+            }
+
+            if (!error_db.isNull() && error_key == "UVAL_SHOCK") {
+
+               if (error_db->keyExists("shock_onset")) {
+                  d_shock_onset =
+                     error_db->getDoubleArray("shock_onset");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `shock_onset' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("shock_tol")) {
+                  d_shock_tol =
+                     error_db->getDoubleArray("shock_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `shock_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_shock_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_shock_time_max.resizeArray(1);
+                  d_shock_time_max[0] = tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_shock_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_shock_time_min.resizeArray(1);
+                  d_shock_time_min[0] = 0.;
+               }
+
+            }
+
+            if (!error_db.isNull() && error_key == "UVAL_RICHARDSON") {
+
+               if (error_db->keyExists("rich_tol")) {
+                  d_rich_tol =
+                     error_db->getDoubleArray("rich_tol");
+               } else {
+                  TBOX_ERROR(
+                     d_object_name << ": "
+                     <<
+                     "No key `rich_tol' found in data for "
+                     << error_key << endl);
+               }
+
+               if (error_db->keyExists("time_max")) {
+                  d_rich_time_max =
+                     error_db->getDoubleArray("time_max");
+               } else {
+                  d_rich_time_max.resizeArray(1);
+                  d_rich_time_max[0] = tbox::MathUtilities<double>::getMax();
+               }
+
+               if (error_db->keyExists("time_min")) {
+                  d_rich_time_min =
+                     error_db->getDoubleArray("time_min");
+               } else {
+                  d_rich_time_min.resizeArray(1);
+                  d_rich_time_min[0] = 0.;
+               }
+
+            }
+
+         }
+
+      } // loop over refine criteria
+
+      /*
+       * Check that input is found for each string identifier in key list.
+       */
+      for (int k0 = 0; k0 < d_refinement_criteria.getSize(); k0++) {
+         string use_key = d_refinement_criteria[k0];
+         bool key_found = false;
+         for (int k1 = 0; k1 < def_key_cnt; k1++) {
+            string def_key = ref_keys_defined[k1];
+            if (def_key == use_key) key_found = true;
+         }
+
+         if (!key_found) {
+            TBOX_ERROR(d_object_name << ": "
+               << "No input found for specified refine criteria: "
+               << d_refinement_criteria[k0] << endl);
+         }
+      }
+
+   } // refine db entry exists
+
+   if (!is_from_restart) {
+
+      if (db->keyExists("data_problem")) {
+         d_data_problem = db->getString("data_problem");
+      } else {
+         TBOX_ERROR(
+            d_object_name << ": "
+            << "`data_problem' value not found in input."
+            << endl);
+      }
+
+      tbox::Pointer<tbox::Database> init_data_db;
+      if (db->keyExists("Initial_data")) {
+         init_data_db = db->getDatabase("Initial_data");
+      } else {
+         TBOX_ERROR(
+            d_object_name << ": "
+            <<
+            "No `Initial_data' database found in input." << endl);
+      }
+
+      bool found_problem_data = false;
+
+      if (d_data_problem == "SPHERE") {
+
+         if (init_data_db->keyExists("radius")) {
+            d_radius = init_data_db->getDouble("radius");
+         } else {
+            TBOX_ERROR(
+               d_object_name << ": "
+               <<
+               "`radius' input required for SPHERE problem." << endl);
+         }
+         if (init_data_db->keyExists("center")) {
+            init_data_db->getDoubleArray("center", d_center, d_dim.getValue());
+         } else {
+            TBOX_ERROR(
+               d_object_name << ": "
+               <<
+               "`center' input required for SPHERE problem." << endl);
+         }
+         if (init_data_db->keyExists("uval_inside")) {
+            d_uval_inside = init_data_db->getDouble("uval_inside");
+         } else {
+            TBOX_ERROR(d_object_name << ": "
+                                     << "`uval_inside' input required for "
+                                     << "SPHERE problem." << endl);
+         }
+         if (init_data_db->keyExists("uval_outside")) {
+            d_uval_outside = init_data_db->getDouble("uval_outside");
+         } else {
+            TBOX_ERROR(d_object_name << ": "
+                                     << "`uval_outside' input required for "
+                                     << "SPHERE problem." << endl);
+         }
+
+         found_problem_data = true;
+
+      }
+
+      if (!found_problem_data &&
+          ((d_data_problem == "PIECEWISE_CONSTANT_X") ||
+           (d_data_problem == "PIECEWISE_CONSTANT_Y") ||
+           (d_data_problem == "PIECEWISE_CONSTANT_Z") ||
+           (d_data_problem == "SINE_CONSTANT_X") ||
+           (d_data_problem == "SINE_CONSTANT_Y") ||
+           (d_data_problem == "SINE_CONSTANT_Z"))) {
+
+         int idir = 0;
+         if (d_data_problem == "PIECEWISE_CONSTANT_Y") {
+            if (d_dim < tbox::Dimension(2)) {
+               TBOX_ERROR(
+                  d_object_name << ": `PIECEWISE_CONSTANT_Y' "
+                  << "problem invalid in 1 dimension."
+                  << endl);
+            }
+            idir = 1;
+         }
+
+         if (d_data_problem == "PIECEWISE_CONSTANT_Z") {
+            if (d_dim < tbox::Dimension(3)) {
+               TBOX_ERROR(
+                  d_object_name << ": `PIECEWISE_CONSTANT_Z' "
+                  <<
+                  "problem invalid in 1 or 2 dimensions." << endl);
+            }
+            idir = 2;
+         }
+
+         tbox::Array<string> init_data_keys = init_data_db->getAllKeys();
+
+         if (init_data_db->keyExists("front_position")) {
+            d_front_position = init_data_db->getDoubleArray("front_position");
+         } else {
+            TBOX_ERROR(d_object_name << ": "
+                                     << "`front_position' input required for "
+                                     << d_data_problem << " problem." << endl);
+         }
+
+         d_number_of_intervals =
+            tbox::MathUtilities<int>::Min(d_front_position.getSize() + 1,
+               init_data_keys.getSize() - 1);
+
+         d_front_position.resizeArray(d_front_position.getSize() + 1);
+         d_front_position[d_front_position.getSize() - 1] =
+            d_grid_geometry->getXUpper()[idir];
+
+         d_interval_uval.resizeArray(d_number_of_intervals);
+
+         int i = 0;
+         int nkey = 0;
+         bool found_interval_data = false;
+
+         while (!found_interval_data
+                && (i < d_number_of_intervals)
+                && (nkey < init_data_keys.getSize())) {
+
+            if (!(init_data_keys[nkey] == "front_position")) {
+
+               tbox::Pointer<tbox::Database> interval_db =
+                  init_data_db->getDatabase(init_data_keys[nkey]);
+
+               if (interval_db->keyExists("uval")) {
+                  d_interval_uval[i] = interval_db->getDouble("uval");
+               } else {
+                  TBOX_ERROR(d_object_name << ": "
+                     << "`uval' data missing in input for key = "
+                     << init_data_keys[nkey] << endl);
+               }
+               i++;
+
+               found_interval_data = (i == d_number_of_intervals);
+
+            }
+
+            nkey++;
+
+         }
+
+         if ((d_data_problem == "SINE_CONSTANT_X") ||
+             (d_data_problem == "SINE_CONSTANT_Y") ||
+             (d_data_problem == "SINE_CONSTANT_Z")) {
+            if (init_data_db->keyExists("amplitude")) {
+               d_amplitude = init_data_db->getDouble("amplitude");
+            }
+            if (init_data_db->keyExists("period")) {
+               init_data_db->getDoubleArray("period", d_period, d_dim.getValue());
+            } else {
+               TBOX_ERROR(
+                  d_object_name << ": "
+                  <<
+                  "`period' input required for SINE problem." << endl);
+            }
+         }
+
+         if (!found_interval_data) {
+            TBOX_ERROR(
+               d_object_name << ": "
+               <<
+               "Insufficient interval data given in input"
+               << " for PIECEWISE_CONSTANT_*problem."
+               << endl);
+         }
+
+         found_problem_data = true;
+      }
+
+      if (!found_problem_data) {
+         TBOX_ERROR(d_object_name << ": "
+                                  << "`Initial_data' database found in input."
+                                  << " But bad data supplied." << endl);
+      }
+
+   } // if !is_from_restart read in problem data
+
+   hier::IntVector periodic(d_grid_geometry->getPeriodicShift(hier::IntVector(
+                                  d_dim,
+                                  1)));
+   int num_per_dirs = 0;
+   for (int id = 0; id < d_dim.getValue(); id++) {
+      if (periodic(id)) num_per_dirs++;
+   }
+
+   if (db->keyExists("Boundary_data")) {
+
+      tbox::Pointer<tbox::Database> bdry_db = db->getDatabase("Boundary_data");
+
+      if (d_dim == tbox::Dimension(2)) {
+         appu::CartesianBoundaryUtilities2::readBoundaryInput(this,
+            bdry_db,
+            d_scalar_bdry_edge_conds,
+            d_scalar_bdry_node_conds,
+            periodic);
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         appu::CartesianBoundaryUtilities3::readBoundaryInput(this,
+            bdry_db,
+            d_scalar_bdry_face_conds,
+            d_scalar_bdry_edge_conds,
+            d_scalar_bdry_node_conds,
+            periodic);
+      }
+
+   } else {
+      TBOX_ERROR(
+         d_object_name << ": "
+         <<
+         "Key data `Boundary_data' not found in input. " << endl);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to put/get data members to/from restart database.            *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void LinAdv::putToDatabase(
+   tbox::Pointer<tbox::Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   db->putInteger("LINADV_VERSION", LINADV_VERSION);
+
+   db->putDoubleArray("d_advection_velocity", d_advection_velocity, d_dim.getValue());
+
+   db->putInteger("d_godunov_order", d_godunov_order);
+   db->putString("d_corner_transport", d_corner_transport);
+   db->putIntegerArray("d_nghosts", &d_nghosts[0], d_dim.getValue());
+   db->putIntegerArray("d_fluxghosts", &d_fluxghosts[0], d_dim.getValue());
+
+   db->putString("d_data_problem", d_data_problem);
+
+   if (d_data_problem == "SPHERE") {
+      db->putDouble("d_radius", d_radius);
+      db->putDoubleArray("d_center", d_center, d_dim.getValue());
+      db->putDouble("d_uval_inside", d_uval_inside);
+      db->putDouble("d_uval_outside", d_uval_outside);
+   }
+
+   if ((d_data_problem == "PIECEWISE_CONSTANT_X") ||
+       (d_data_problem == "PIECEWISE_CONSTANT_Y") ||
+       (d_data_problem == "PIECEWISE_CONSTANT_Z") ||
+       (d_data_problem == "SINE_CONSTANT_X") ||
+       (d_data_problem == "SINE_CONSTANT_Y") ||
+       (d_data_problem == "SINE_CONSTANT_Z")) {
+      db->putInteger("d_number_of_intervals", d_number_of_intervals);
+      if (d_number_of_intervals > 0) {
+         db->putDoubleArray("d_front_position", d_front_position);
+         db->putDoubleArray("d_interval_uval", d_interval_uval);
+      }
+   }
+
+   db->putIntegerArray("d_scalar_bdry_edge_conds", d_scalar_bdry_edge_conds);
+   db->putIntegerArray("d_scalar_bdry_node_conds", d_scalar_bdry_node_conds);
+
+   if (d_dim == tbox::Dimension(2)) {
+      db->putDoubleArray("d_bdry_edge_uval", d_bdry_edge_uval);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      db->putIntegerArray("d_scalar_bdry_face_conds", d_scalar_bdry_face_conds);
+      db->putDoubleArray("d_bdry_face_uval", d_bdry_face_uval);
+   }
+
+   if (d_refinement_criteria.getSize() > 0) {
+      db->putStringArray("d_refinement_criteria", d_refinement_criteria);
+   }
+   for (int i = 0; i < d_refinement_criteria.getSize(); i++) {
+
+      if (d_refinement_criteria[i] == "UVAL_DEVIATION") {
+         db->putDoubleArray("d_dev_tol", d_dev_tol);
+         db->putDoubleArray("d_dev", d_dev);
+         db->putDoubleArray("d_dev_time_max", d_dev_time_max);
+         db->putDoubleArray("d_dev_time_min", d_dev_time_min);
+      } else if (d_refinement_criteria[i] == "UVAL_GRADIENT") {
+         db->putDoubleArray("d_grad_tol", d_grad_tol);
+         db->putDoubleArray("d_grad_time_max", d_grad_time_max);
+         db->putDoubleArray("d_grad_time_min", d_grad_time_min);
+      } else if (d_refinement_criteria[i] == "UVAL_SHOCK") {
+         db->putDoubleArray("d_shock_onset", d_shock_onset);
+         db->putDoubleArray("d_shock_tol", d_shock_tol);
+         db->putDoubleArray("d_shock_time_max", d_shock_time_max);
+         db->putDoubleArray("d_shock_time_min", d_shock_time_min);
+      } else if (d_refinement_criteria[i] == "UVAL_RICHARDSON") {
+         db->putDoubleArray("d_rich_tol", d_rich_tol);
+         db->putDoubleArray("d_rich_time_max", d_rich_time_max);
+         db->putDoubleArray("d_rich_time_min", d_rich_time_min);
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ *    Access class information from restart database.                    *
+ *                                                                       *
+ *************************************************************************
+ */
+void LinAdv::getFromRestart()
+{
+   tbox::Pointer<tbox::Database> root_db =
+      tbox::RestartManager::getManager()->getRootDatabase();
+
+   tbox::Pointer<tbox::Database> db;
+   if (root_db->isDatabase(d_object_name)) {
+      db = root_db->getDatabase(d_object_name);
+   } else {
+      TBOX_ERROR("Restart database corresponding to "
+         << d_object_name << " not found in restart file.");
+   }
+
+   int ver = db->getInteger("LINADV_VERSION");
+   if (ver != LINADV_VERSION) {
+      TBOX_ERROR(
+         d_object_name << ":  "
+         <<
+         "Restart file version different than class version.");
+   }
+
+   db->getDoubleArray("d_advection_velocity", d_advection_velocity, d_dim.getValue());
+
+   d_godunov_order = db->getInteger("d_godunov_order");
+   d_corner_transport = db->getString("d_corner_transport");
+
+   int* tmp_nghosts = &d_nghosts[0];
+   db->getIntegerArray("d_nghosts", tmp_nghosts, d_dim.getValue());
+   if (!(d_nghosts == CELLG)) {
+      TBOX_ERROR(
+         d_object_name << ": "
+         <<
+         "Key data `d_nghosts' in restart file != CELLG." << endl);
+   }
+   int* tmp_fluxghosts = &d_fluxghosts[0];
+   db->getIntegerArray("d_fluxghosts", tmp_fluxghosts, d_dim.getValue());
+   if (!(d_fluxghosts == FLUXG)) {
+      TBOX_ERROR(
+         d_object_name << ": "
+         <<
+         "Key data `d_fluxghosts' in restart file != FLUXG." << endl);
+   }
+
+   d_data_problem = db->getString("d_data_problem");
+
+   if (d_data_problem == "SPHERE") {
+      d_data_problem_int = SPHERE;
+      d_radius = db->getDouble("d_radius");
+      db->getDoubleArray("d_center", d_center, d_dim.getValue());
+      d_uval_inside = db->getDouble("d_uval_inside");
+      d_uval_outside = db->getDouble("d_uval_outside");
+   }
+
+   if ((d_data_problem == "PIECEWISE_CONSTANT_X") ||
+       (d_data_problem == "PIECEWISE_CONSTANT_Y") ||
+       (d_data_problem == "PIECEWISE_CONSTANT_Z") ||
+       (d_data_problem == "SINE_CONSTANT_X") ||
+       (d_data_problem == "SINE_CONSTANT_Y") ||
+       (d_data_problem == "SINE_CONSTANT_Z")) {
+      d_number_of_intervals = db->getInteger("d_number_of_intervals");
+      if (d_number_of_intervals > 0) {
+         d_front_position = db->getDoubleArray("d_front_position");
+         d_interval_uval = db->getDoubleArray("d_interval_uval");
+      }
+   }
+
+   d_scalar_bdry_edge_conds = db->getIntegerArray("d_scalar_bdry_edge_conds");
+   d_scalar_bdry_node_conds = db->getIntegerArray("d_scalar_bdry_node_conds");
+
+   if (d_dim == tbox::Dimension(2)) {
+      d_bdry_edge_uval = db->getDoubleArray("d_bdry_edge_uval");
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      d_scalar_bdry_face_conds = db->getIntegerArray("d_scalar_bdry_face_conds");
+
+      d_bdry_face_uval = db->getDoubleArray("d_bdry_face_uval");
+   }
+
+   if (db->keyExists("d_refinement_criteria")) {
+      d_refinement_criteria = db->getStringArray("d_refinement_criteria");
+   }
+   for (int i = 0; i < d_refinement_criteria.getSize(); i++) {
+
+      if (d_refinement_criteria[i] == "UVAL_DEVIATION") {
+         d_dev_tol = db->getDoubleArray("d_dev_tol");
+         d_dev_time_max = db->getDoubleArray("d_dev_time_max");
+         d_dev_time_min = db->getDoubleArray("d_dev_time_min");
+      } else if (d_refinement_criteria[i] == "UVAL_GRADIENT") {
+         d_grad_tol = db->getDoubleArray("d_grad_tol");
+         d_grad_time_max = db->getDoubleArray("d_grad_time_max");
+         d_grad_time_min = db->getDoubleArray("d_grad_time_min");
+      } else if (d_refinement_criteria[i] == "UVAL_SHOCK") {
+         d_shock_onset = db->getDoubleArray("d_shock_onset");
+         d_shock_tol = db->getDoubleArray("d_shock_tol");
+         d_shock_time_max = db->getDoubleArray("d_shock_time_max");
+         d_shock_time_min = db->getDoubleArray("d_shock_time_min");
+      } else if (d_refinement_criteria[i] == "UVAL_RICHARDSON") {
+         d_rich_tol = db->getDoubleArray("d_rich_tol");
+         d_rich_time_max = db->getDoubleArray("d_rich_time_max");
+         d_rich_time_min = db->getDoubleArray("d_rich_time_min");
+      }
+
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to read boundary data from input database.                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void LinAdv::readDirichletBoundaryDataEntry(
+   tbox::Pointer<tbox::Database> db,
+   string& db_name,
+   int bdry_location_index)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+   TBOX_ASSERT(!db_name.empty());
+#endif
+   if (d_dim == tbox::Dimension(2)) {
+      readStateDataEntry(db,
+         db_name,
+         bdry_location_index,
+         d_bdry_edge_uval);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      readStateDataEntry(db,
+         db_name,
+         bdry_location_index,
+         d_bdry_face_uval);
+   }
+}
+
+void LinAdv::readStateDataEntry(
+   tbox::Pointer<tbox::Database> db,
+   const string& db_name,
+   int array_indx,
+   tbox::Array<double>& uval)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+   TBOX_ASSERT(!db_name.empty());
+   TBOX_ASSERT(array_indx >= 0);
+   TBOX_ASSERT(uval.getSize() > array_indx);
+#endif
+
+   if (db->keyExists("uval")) {
+      uval[array_indx] = db->getDouble("uval");
+   } else {
+      TBOX_ERROR(d_object_name << ": "
+                               << "`uval' entry missing from " << db_name
+                               << " input database. " << endl);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routine to check boundary data when debugging.                        *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void LinAdv::checkBoundaryData(
+   int btype,
+   const hier::Patch& patch,
+   const hier::IntVector& ghost_width_to_check,
+   const tbox::Array<int>& scalar_bconds) const
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   if (d_dim == tbox::Dimension(2)) {
+      TBOX_ASSERT(btype == EDGE2D_BDRY_TYPE ||
+         btype == NODE2D_BDRY_TYPE);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      TBOX_ASSERT(btype == FACE3D_BDRY_TYPE ||
+         btype == EDGE3D_BDRY_TYPE ||
+         btype == NODE3D_BDRY_TYPE);
+   }
+#endif
+
+   const tbox::Pointer<geom::CartesianPatchGeometry> pgeom =
+      patch.getPatchGeometry();
+   const tbox::Array<hier::BoundaryBox> bdry_boxes =
+      pgeom->getCodimensionBoundaries(btype);
+
+   hier::VariableDatabase* vdb = hier::VariableDatabase::getDatabase();
+
+   for (int i = 0; i < bdry_boxes.getSize(); i++) {
+      hier::BoundaryBox bbox = bdry_boxes[i];
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(bbox.getBoundaryType() == btype);
+#endif
+      int bloc = bbox.getLocationIndex();
+
+      int bscalarcase, refbdryloc;
+      if (d_dim == tbox::Dimension(2)) {
+         if (btype == EDGE2D_BDRY_TYPE) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(scalar_bconds.getSize() == NUM_2D_EDGES);
+#endif
+            bscalarcase = scalar_bconds[bloc];
+            refbdryloc = bloc;
+         } else { // btype == NODE2D_BDRY_TYPE
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(scalar_bconds.getSize() == NUM_2D_NODES);
+#endif
+            bscalarcase = scalar_bconds[bloc];
+            refbdryloc = d_node_bdry_edge[bloc];
+         }
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         if (btype == FACE3D_BDRY_TYPE) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(scalar_bconds.getSize() == NUM_3D_FACES);
+#endif
+            bscalarcase = scalar_bconds[bloc];
+            refbdryloc = bloc;
+         } else if (btype == EDGE3D_BDRY_TYPE) {
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(scalar_bconds.getSize() == NUM_3D_EDGES);
+#endif
+            bscalarcase = scalar_bconds[bloc];
+            refbdryloc = d_edge_bdry_face[bloc];
+         } else { // btype == NODE3D_BDRY_TYPE
+#ifdef DEBUG_CHECK_ASSERTIONS
+            TBOX_ASSERT(scalar_bconds.getSize() == NUM_3D_NODES);
+#endif
+            bscalarcase = scalar_bconds[bloc];
+            refbdryloc = d_node_bdry_face[bloc];
+         }
+      }
+
+      int num_bad_values = 0;
+      NULL_USE(num_bad_values);
+
+      if (d_dim == tbox::Dimension(2)) {
+         num_bad_values =
+            appu::CartesianBoundaryUtilities2::checkBdryData(
+               d_uval->getName(),
+               patch,
+               vdb->mapVariableAndContextToIndex(d_uval, getDataContext()), 0,
+               ghost_width_to_check,
+               bbox,
+               bscalarcase,
+               d_bdry_edge_uval[refbdryloc]);
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         num_bad_values =
+            appu::CartesianBoundaryUtilities3::checkBdryData(
+               d_uval->getName(),
+               patch,
+               vdb->mapVariableAndContextToIndex(d_uval, getDataContext()), 0,
+               ghost_width_to_check,
+               bbox,
+               bscalarcase,
+               d_bdry_face_uval[refbdryloc]);
+      }
+#if (TESTING == 1)
+      if (num_bad_values > 0) {
+         tbox::perr << "\nLinAdv Boundary Test FAILED: \n"
+                    << "     " << num_bad_values
+                    << " bad UVAL values found for\n"
+                    << "     boundary type " << btype << " at location "
+                    << bloc << endl;
+      }
+#endif
+
+   }
+
+}
+
+void LinAdv::setAnalyticalTaggerTime(
+   double time) {
+   if (d_analytical_tagger) {
+      d_analytical_tagger->setTime(time);
+   }
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/LinAdv.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/LinAdv.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,486 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Numerical routines for single patch in linear advection ex. 
+ *
+ ************************************************************************/
+
+#ifndef included_LinAdvXD
+#define included_LinAdvXD
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/appu/BoundaryUtilityStrategy.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/mesh/GriddingAlgorithm.h"
+#include "SAMRAI/algs/HyperbolicLevelIntegrator.h"
+#include "SAMRAI/algs/HyperbolicPatchStrategy.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Serializable.h"
+#include <string>
+using namespace std;
+#define included_String
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/appu/VisItDataWriter.h"
+#include "SAMRAI/appu/VisDerivedDataStrategy.h"
+
+#include "SinusoidalFrontTagger.h"
+
+/**
+ * The LinAdv class provides routines for a sample application code that
+ * solves linear advection.  This code illustrates the manner in which
+ * a code employing the standard Berger/Oliger AMR algorithm for
+ * explicit hydrodynamics can be used in the SAMRAI framework.
+ * This class is derived from the algs::HyperbolicPatchStrategy abstract base
+ * class which defines the bulk of the interface between the hyperbolic
+ * intergration algorithm provided by SAMRAI and the numerical routines
+ * specific to linear advection.  In particular, this class provides routines
+ * which maybe applied to any patch in an AMR patch hierarchy.
+ *
+ * The linear advection problem is simply du/dt + div(a*u) = 0, where
+ * "u" is a scalar-valued function and "a" is a constant vector.  The
+ * primary numerical quantities are "uval" and "flux", which represent
+ * "u" and "a*u", respectively.  All other variables are temporary
+ * quantities used in the numerical routines.  The numerical routines
+ * use explicit timestepping and a second-order unsplit Godunov method.
+ */
+
+using namespace SAMRAI;
+
+class LinAdv:
+   public tbox::Serializable,
+   public algs::HyperbolicPatchStrategy,
+   public appu::BoundaryUtilityStrategy,
+   public appu::VisDerivedDataStrategy
+{
+public:
+   /**
+    * The constructor for LinAdv sets default parameters for the linear
+    * advection model.  Specifically, it creates variables that represent
+    * the state of the solution.  The constructor also registers this
+    * object for restart with the restart manager using the object name.
+    *
+    * After default values are set, this routine calls getFromRestart()
+    * if execution from a restart file is specified.  Finally,
+    * getFromInput() is called to read values from the given input
+    * database (potentially overriding those found in the restart file).
+    */
+   LinAdv(
+      const string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> input_db,
+      tbox::Pointer<geom::CartesianGridGeometry> grid_geom,
+      SinusoidalFrontTagger* analytical_tagger = NULL);
+
+   /**
+    * The destructor for LinAdv does nothing.
+    */
+   ~LinAdv();
+
+   ///
+   ///  The following routines:
+   ///
+   ///      registerModelVariables(),
+   ///      initializeDataOnPatch(),
+   ///      computeStableDtOnPatch(),
+   ///      computeFluxesOnPatch(),
+   ///      conservativeDifferenceOnPatch(),
+   ///      tagGradientDetectorCells(),
+   ///      tagRichardsonExtrapolationCells()
+   ///
+   ///  are concrete implementations of functions declared in the
+   ///  algs::HyperbolicPatchStrategy abstract base class.
+   ///
+
+   /**
+    * Register LinAdv model variables with algs::HyperbolicLevelIntegrator
+    * according to variable registration function provided by the integrator.
+    * In other words, variables are registered according to their role
+    * in the integration process (e.g., time-dependent, flux, etc.).
+    * This routine also registers variables for plotting with the
+    * Vis writer.
+    */
+   void
+   registerModelVariables(
+      algs::HyperbolicLevelIntegrator* integrator);
+
+   /**
+    * Set up parameters in the load balancer object (owned by the gridding
+    * algorithm) if needed.  The Euler model allows non-uniform load balancing
+    * to be used based on the input file parameter called
+    * "use_nonuniform_workload".  The default case is to use uniform
+    * load balancing (i.e., use_nonuniform_workload == false).  For
+    * illustrative and testing purposes, when non-uniform load balancing is
+    * turned on, a weight of one will be applied to every grid cell.  This
+    * should produce an identical patch configuration to the uniform load
+    * balance case.
+    */
+   void
+   setupLoadBalancer(
+      algs::HyperbolicLevelIntegrator* integrator,
+      mesh::GriddingAlgorithm* gridding_algorithm);
+
+   /**
+    * Set the data on the patch interior to some initial values,
+    * depending on the input parameters and numerical routines.
+    * If the "initial_time" flag is false, indicating that the
+    * routine is called after a regridding step, the routine does nothing.
+    */
+   void
+   initializeDataOnPatch(
+      hier::Patch& patch,
+      const double data_time,
+      const bool initial_time);
+
+   /**
+    * Compute the stable time increment for patch using a CFL
+    * condition and return the computed dt.
+    */
+   double
+   computeStableDtOnPatch(
+      hier::Patch& patch,
+      const bool initial_time,
+      const double dt_time);
+
+   /**
+    * Compute time integral of fluxes to be used in conservative difference
+    * for patch integration.  When d_dim == tbox::Dimension(3)), this function calls either
+    * compute3DFluxesWithCornerTransport1(), or
+    * compute3DFluxesWithCornerTransport2() depending on which
+    * transverse flux correction option that is specified in input.
+    * The conservative difference used to update the integrated quantities
+    * is implemented in the conservativeDifferenceOnPatch() routine.
+    */
+   void
+   computeFluxesOnPatch(
+      hier::Patch& patch,
+      const double time,
+      const double dt);
+
+   /**
+    * Update linear advection solution variables by performing a conservative
+    * difference with the fluxes calculated in computeFluxesOnPatch().
+    */
+   void
+   conservativeDifferenceOnPatch(
+      hier::Patch& patch,
+      const double time,
+      const double dt,
+      bool at_syncronization);
+
+   /**
+    * Tag cells for refinement using gradient detector.
+    */
+   void
+   tagGradientDetectorCells(
+      hier::Patch& patch,
+      const double regrid_time,
+      const bool initial_error,
+      const int tag_indexindx,
+      const bool uses_richardson_extrapolation_too);
+
+   /**
+    * Tag cells for refinement using Richardson extrapolation.
+    */
+   void
+   tagRichardsonExtrapolationCells(
+      hier::Patch& patch,
+      const int error_level_number,
+      const tbox::Pointer<hier::VariableContext> coarsened_fine,
+      const tbox::Pointer<hier::VariableContext> advanced_coarse,
+      const double regrid_time,
+      const double deltat,
+      const int error_coarsen_ratio,
+      const bool initial_error,
+      const int tag_index,
+      const bool uses_gradient_detector_too);
+
+   ///
+   ///  The following routines:
+   ///
+   ///      setPhysicalBoundaryConditions()
+   ///
+   ///  are concrete implementations of functions declared in the
+   ///  RefinePatchStrategy abstract base class.
+   ///
+
+   /**
+    * Set the data in ghost cells corresponding to physical boundary
+    * conditions.  Specific boundary conditions are determined by
+    * information specified in input file and numerical routines.
+    */
+   void
+   setPhysicalBoundaryConditions(
+      hier::Patch& patch,
+      const double fill_time,
+      const hier::IntVector&
+      ghost_width_to_fill);
+
+   /**
+    * Write state of LinAdv object to the given database for restart.
+    *
+    * This routine is a concrete implementation of the function
+    * declared in the tbox::Serializable abstract base class.
+    */
+   void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> db);
+
+   /**
+    * This routine is a concrete implementation of the virtual function
+    * in the base class BoundaryUtilityStrategy.  It reads DIRICHLET
+    * boundary state values from the given database with the
+    * given name string idenifier.  The integer location index
+    * indicates the face (in 3D) or edge (in 2D) to which the boundary
+    * condition applies.
+    */
+   void
+   readDirichletBoundaryDataEntry(
+      tbox::Pointer<tbox::Database> db,
+      string& db_name,
+      int bdry_location_index);
+
+#ifdef HAVE_HDF5
+   /**
+    * Register a VisIt data writer so this class will write
+    * plot files that may be postprocessed with the VisIt
+    * visualization tool.
+    */
+   void
+   registerVisItDataWriter(
+      tbox::Pointer<appu::VisItDataWriter> viz_writer);
+#endif
+
+   /**
+    * Reset physical boundary values in special cases, such as when
+    * using symmetric (i.e., reflective) boundary conditions.
+    */
+   void
+   boundaryReset(
+      hier::Patch& patch,
+      pdat::FaceData<double>& traced_left,
+      pdat::FaceData<double>& traced_right) const;
+
+   /**
+    * Print all data members for LinAdv class.
+    */
+   void
+   printClassData(
+      ostream& os) const;
+
+   void
+   setAnalyticalTaggerTime(
+      double time);
+
+   //@{ @name SAMRAI::appu::VisDerivedDataStrategy virtuals
+
+   virtual bool
+   packDerivedDataIntoDoubleBuffer(
+      double* buffer,
+      const hier::Patch& patch,
+      const hier::Box& region,
+      const string& variable_name,
+      int depth_id) const;
+
+private:
+   /*
+    * These private member functions read data from input and restart.
+    * When beginning a run from a restart file, all data members are read
+    * from the restart file.  If the boolean flag is true when reading
+    * from input, some restart values may be overridden by those in the
+    * input file.
+    *
+    * An assertion results if the database pointer is null.
+    */
+   void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db,
+      bool is_from_restart);
+
+   void
+   getFromRestart();
+
+   void
+   readStateDataEntry(
+      tbox::Pointer<tbox::Database> db,
+      const string& db_name,
+      int array_indx,
+      tbox::Array<double>& uval);
+
+   /*
+    * Private member function to check correctness of boundary data.
+    */
+   void
+   checkBoundaryData(
+      int btype,
+      const hier::Patch& patch,
+      const hier::IntVector& ghost_width_to_fill,
+      const tbox::Array<int>& scalar_bconds) const;
+
+   /*
+    * Three-dimensional flux computation routines corresponding to
+    * either of the two transverse flux correction options.  These
+    * routines are called from the computeFluxesOnPatch() function.
+    */
+   void
+   compute3DFluxesWithCornerTransport1(
+      hier::Patch& patch,
+      const double dt);
+   void
+   compute3DFluxesWithCornerTransport2(
+      hier::Patch& patch,
+      const double dt);
+
+   /*
+    * The object name is used for error/warning reporting and also as a
+    * string label for restart database entries.
+    */
+   string d_object_name;
+
+   const tbox::Dimension d_dim;
+
+   SinusoidalFrontTagger* d_analytical_tagger;
+
+   /*
+    * We cache pointers to the grid geometry
+    * object to set up initial data, set physical boundary conditions,
+    * and register plot variables.
+    */
+   tbox::Pointer<geom::CartesianGridGeometry> d_grid_geometry;
+
+#ifdef HAVE_HDF5
+   tbox::Pointer<appu::VisItDataWriter> d_visit_writer;
+#endif
+
+   /*
+    * Data items used for nonuniform load balance, if used.
+    */
+   tbox::Pointer<pdat::CellVariable<double> > d_workload_variable;
+   int d_workload_data_id;
+   bool d_use_nonuniform_workload;
+
+   /**
+    * tbox::Pointer to state variable vector - [u]
+    */
+   tbox::Pointer<pdat::CellVariable<double> > d_uval;
+
+   /**
+    * tbox::Pointer to flux variable vector  - [F]
+    */
+   tbox::Pointer<pdat::FaceVariable<double> > d_flux;
+
+   /**
+    * linear advection velocity vector
+    */
+   double d_advection_velocity[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   /*
+    *  Parameters for numerical method:
+    *
+    *    d_godunov_order ....... order of Godunov slopes (1, 2, or 4)
+    *
+    *    d_corner_transport .... type of finite difference approximation
+    *                            for 3d transverse flux correction
+    *
+    *    d_nghosts ............. number of ghost cells for cell-centered
+    *                            and face/side-centered variables
+    *
+    *    d_fluxghosts .......... number of ghost cells for fluxes
+    *
+    */
+   int d_godunov_order;
+   string d_corner_transport;
+   hier::IntVector d_nghosts;
+   hier::IntVector d_fluxghosts;
+
+   /*
+    * Indicator for problem type and initial conditions
+    */
+   string d_data_problem;
+   int d_data_problem_int;
+
+   /*
+    * Input for SPHERE problem
+    */
+   double d_radius;
+   double d_center[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   double d_uval_inside;
+   double d_uval_outside;
+
+   /*
+    * Input for FRONT problem
+    */
+   int d_number_of_intervals;
+   tbox::Array<double> d_front_position;
+   tbox::Array<double> d_interval_uval;
+
+   /*
+    * Boundary condition cases and boundary values.
+    * Options are: FLOW, REFLECT, DIRICHLET
+    * and variants for nodes and edges.
+    *
+    * Input file values are read into these arrays.
+    */
+   tbox::Array<int> d_scalar_bdry_edge_conds;
+   tbox::Array<int> d_scalar_bdry_node_conds;
+   tbox::Array<int> d_scalar_bdry_face_conds; // 3D only.
+
+   /*
+    * Boundary condition cases for scalar and vector (i.e., depth > 1)
+    * variables.  These are post-processed input values and are passed
+    * to the boundary routines.
+    */
+   tbox::Array<int> d_node_bdry_edge; // 2D only.
+   tbox::Array<int> d_edge_bdry_face; // 3D only.
+   tbox::Array<int> d_node_bdry_face; // 3D only.
+
+   /*
+    * Arrays of face (3d) or edge (2d) boundary values for DIRICHLET case.
+    */
+   tbox::Array<double> d_bdry_edge_uval; // 2D only.
+   tbox::Array<double> d_bdry_face_uval; // 3D only.
+
+   /*
+    * Input for Sine problem initialization
+    */
+   double d_amplitude;
+   double d_period[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   /*
+    * Refinement criteria parameters for gradient detector and
+    * Richardson extrapolation.
+    */
+   tbox::Array<string> d_refinement_criteria;
+   tbox::Array<double> d_dev_tol;
+   tbox::Array<double> d_dev;
+   tbox::Array<double> d_dev_time_max;
+   tbox::Array<double> d_dev_time_min;
+   tbox::Array<double> d_grad_tol;
+   tbox::Array<double> d_grad_time_max;
+   tbox::Array<double> d_grad_time_min;
+   tbox::Array<double> d_shock_onset;
+   tbox::Array<double> d_shock_tol;
+   tbox::Array<double> d_shock_time_max;
+   tbox::Array<double> d_shock_time_min;
+   tbox::Array<double> d_rich_tol;
+   tbox::Array<double> d_rich_time_max;
+   tbox::Array<double> d_rich_time_min;
+
+   tbox::Pointer<tbox::Timer> t_analytical_tag;
+   tbox::Pointer<tbox::Timer> t_init;
+   tbox::Pointer<tbox::Timer> t_init_first_time;
+
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/LinAdvFort.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/LinAdvFort.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,354 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   F77 external declarations for SAMRAI linear advection example. 
+ *
+ ************************************************************************/
+
+#include <math.h>
+#include <signal.h>
+
+extern "C" {
+
+/////////////////////////// 2D //////////////////////////
+
+void F77_FUNC(linadvinit2d, LINADVINIT2D) (
+   const int &, const double *, const double *, const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   double *,
+   const int &,
+   const double *, const double *);
+
+void F77_FUNC(linadvinitsine2d, LINADVINITSINE2D) (
+   const int &, const double *, const double *,
+   const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   double *,
+   const int &,
+   const double *, const double *,
+   const double &, const double *);
+
+void F77_FUNC(initsphere2d, INITSPHERE2D) (
+   const int &, const double *, const double *, const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   double *,
+   const double &, const double &,
+   const double *, const double &);
+
+void F77_FUNC(stabledt2d, STABLEDT2D) (
+   const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   const double *,
+   const double *,
+   double &);
+
+void F77_FUNC(inittraceflux2d, INITTRACEFLUX2D) (
+   const int &, const int &,
+   const int &, const int &,
+   const double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(chartracing2d0, CHARTRACING2D0) (
+   const double &, const int &, const int &,
+   const int &, const int &,
+   const int &, const double &, const double &, const int &,
+   const double *,
+   double *, double *,
+   double *, double *,
+   double *, double *);
+
+void F77_FUNC(chartracing2d1, CHARTRACING2D1) (
+   const double &, const int &, const int &, const int &, const int &,
+   const int &, const double &, const double &, const int &,
+   const double *,
+   double *, double *,
+   double *, double *,
+   double *, double *);
+
+void F77_FUNC(chartracing2d2, CHARTRACING2D2) (
+   const double &, const int &, const int &, const int &, const int &,
+   const int &, const int &,
+   const int &, const double &, const double &, const int &,
+   const double *,
+   double *, double *,
+   double *, double *,
+   double *, double *);
+
+void F77_FUNC(fluxcalculation2d, FLUXCALCULATION2D) (
+   const double &, const int &, const int &,
+   const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const double *,
+   const double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(fluxcorrec2d, FLUXCORREC2D) (
+   const double &, const int &, const int &, const int &, const int &,
+   const double *,
+   const double *, const double *,
+   double *, double *,
+   double *, double *,
+   double *, double *);
+
+void F77_FUNC(consdiff2d, CONSDIFF2D) (
+   const int &, const int &,
+   const int &, const int &,
+   const double *,
+   const double *, const double *,
+   const double *,
+   double *);
+
+void F77_FUNC(getbdry2d, GETBDRY2D) (const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &,
+   const int &,
+   const int &,
+   const double *, const double &,
+   double *,
+   const double *, const double *, const int &);
+
+void F77_FUNC(detectgrad2d, DETECTGRAD2D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double *,
+   const double &,
+   const int &, const int &,
+   const double *,
+   int *, int *);
+
+void F77_FUNC(detectshock2d, DETECTSHOCK2D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double *,
+   const double &, const double &,
+   const int &, const int &,
+   const double *,
+   int *, int *);
+
+void F77_FUNC(stufprobc2d, STUFPROBC2D) (
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &);
+
+/////////////////////////// 3D //////////////////////////
+
+void F77_FUNC(linadvinit3d, LINADVINIT3D) (
+   const int &, const double *, const double *, const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   const int &,
+   double *,
+   const int &,
+   const double *, const double *);
+
+void F77_FUNC(linadvinitsine3d, LINADVINITSINE3D) (
+   const int &, const double *, const double *,
+   const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   const int &,
+   double *,
+   const int &,
+   const double *, const double *,
+   const double &, const double *);
+
+void F77_FUNC(initsphere3d, INITSPHERE3D) (
+   const int &, const double *, const double *, const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   const int &,
+   double *,
+   const double &, const double &,
+   const double *, const double &);
+
+void F77_FUNC(stabledt3d, STABLEDT3D) (
+   const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &,
+   const int &,
+   const int &,
+   const double *,
+   const double *,
+   double &);
+
+void F77_FUNC(inittraceflux3d, INITTRACEFLUX3D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double *,
+   double *, double *, double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(chartracing3d0, CHARTRACING3D0) (
+   const double &, const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const double &, const double &, const int &,
+   const double *,
+   double *, double *,
+   double *, double *,
+   double *, double *);
+
+void F77_FUNC(chartracing3d1, CHARTRACING3D1) (
+   const double &, const int &, const int &, const int &, const int &,
+   const int &, const int &,
+   const int &, const double &, const double &, const int &,
+   const double *,
+   double *, double *,
+   double *, double *,
+   double *, double *);
+
+void F77_FUNC(chartracing3d2, CHARTRACING3D2) (
+   const double &, const int &, const int &, const int &, const int &,
+   const int &, const int &,
+   const int &, const double &, const double &, const int &,
+   const double *,
+   double *, double *,
+   double *, double *,
+   double *, double *);
+
+void F77_FUNC(fluxcalculation3d, FLUXCALCULATION3D) (
+   const double &, const int &, const int &,
+   const int &,
+   const double *,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double *,
+   const double *,
+   double *, double *, double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(fluxcorrec3d2d, FLUXCORREC3D2D) (
+   const double &, const int &, const int &, const int &, const int &,
+   const int &, const int &,
+   const double *, const double *, const int &,
+   const double *,
+   const double *, const double *, const double *,
+   const double *, const double *, const double *,
+   const double *, const double *, const double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(fluxcorrec3d3d, FLUXCORREC3D3D) (
+   const double &, const int &, const int &, const int &, const int &,
+   const int &, const int &,
+   const double *, const double *,
+   const double *,
+   const double *, const double *, const double *,
+   const double *, const double *, const double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(consdiff3d, CONSDIFF3D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double *,
+   const double *, const double *,
+   const double *,
+   const double *,
+   double *);
+
+void F77_FUNC(getbdry3d, GETBDRY3D) (const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &,
+   const int &,
+   const int &,
+   const int &,
+   const double *, const double &,
+   double *,
+   const double *, const double *, const int &);
+
+void F77_FUNC(onethirdstate3d, ONETHIRDSTATE3D) (
+   const double &, const double *, const int &,
+   const int &, const int &, const int &, const int &, const int &, const int &,
+   const double *, const double *,
+   const double *, const double *, const double *,
+   double *);
+
+void F77_FUNC(fluxthird3d, FLUXTHIRD3D) (
+   const double &, const double *, const int &,
+   const int &, const int &, const int &, const int &, const int &, const int &,
+   const double *, const double *,
+   const double *,
+   double *, double *, double *);
+
+void F77_FUNC(fluxcorrecjt3d, FLUXCORRECJT3D) (
+   const double &, const double *, const int &,
+   const int &, const int &, const int &, const int &, const int &, const int &,
+   const double *, const double *,
+   const double *, const double *, const double *,
+   double *, double *, double *,
+   double *, double *, double *);
+
+void F77_FUNC(detectgrad3d, DETECTGRAD3D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double *,
+   const double &,
+   const int &, const int &,
+   const double *,
+   int *, int *);
+
+void F77_FUNC(detectshock3d, DETECTSHOCK3D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const int &, const int &, const int &,
+   const double *,
+   const double &, const double &,
+   const int &, const int &,
+   const double *,
+   int *, int *);
+
+void F77_FUNC(stufprobc3d, STUFPROBC3D) (
+   const int &, const int &, const int &,
+   const int &, const int &, const int &, const int &,
+   const int &, const int &, const int &);
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/MDA_Access_instances.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/MDA_Access_instances.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,22 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   $Description 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+#include "SAMRAI/pdat/MDA_Access.h"
+
+#ifndef LACKS_EXPLICIT_TEMPLATE_INSTANTIATION
+
+template class MDA_Access<double, 2, MDA_OrderColMajor<2> >;
+template class MDA_Access<int, 2, MDA_OrderColMajor<2> >;
+
+template class MDA_Access<double, 3, MDA_OrderColMajor<3> >;
+template class MDA_Access<int, 3, MDA_OrderColMajor<3> >;
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,795 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=LinAdv.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/HyperbolicLevelIntegrator.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/HyperbolicPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementLevelStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryUtilityStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryDefines.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryUtilities2.h	\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryUtilities3.h	\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h LinAdv.C	\
+	LinAdv.h LinAdvFort.h SinusoidalFrontTagger.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=MDA_Access_instances.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MDA_Access.h MDA_Access_instances.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=SinusoidalFrontTagger.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MDA_Access.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	SinusoidalFrontTagger.C SinusoidalFrontTagger.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=main.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/algs/HyperbolicLevelIntegrator.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/HyperbolicPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementIntegrator.I		\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementIntegrator.h		\
+	$(INCLUDE_SAM)/SAMRAI/algs/TimeRefinementLevelStrategy.h	\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryUtilityStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BergerRigoutsos.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h LinAdv.h	\
+	SinusoidalFrontTagger.h main.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,124 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for linear advection performance test 
+##
+#########################################################################
+
+SAMRAI	      =	@top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/test/performance/LinAdv
+VPATH         = @top_srcdir@/$(SUBDIR)
+OBJECT        = ../../../..
+
+default:      main
+
+include $(OBJECT)/config/Makefile.config
+
+CPPFLAGS_EXTRA= -DNDIM=$(PDIM)  -DTESTING=0
+
+NUM_TESTS = 2
+TEST_NPROCS = @TEST_NPROCS@
+
+CXX_OBJS      = main.o LinAdv.o SinusoidalFrontTagger.o
+F_OBJS      = \
+	    flux3d.o grad3d.o init3d.o stable3d.o stufprobc3d.o trace3d.o trace1d3d.o fluxcorner3d.o \
+	    flux2d.o grad2d.o init2d.o stable2d.o stufprobc2d.o trace2d.o trace1d2d.o
+
+main:		$(CXX_OBJS) $(F_OBJS) $(LIBSAMRAIDEPEND)
+		$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) $(F_OBJS)	\
+		$(LIBSAMRAI) $(LDLIBS) -o $@
+
+clean:
+		$(SAMCLEAN)
+		$(RM) *.f main
+
+check:
+#               $(MAKE) check2d
+		$(MAKE) check3d
+
+check2d:	main
+
+check3d:	main
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+			./main performance_inputs/domainexpansion.input;
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+			./main performance_inputs/domainexpansionb.input;
+
+checkcompile: main
+
+checktest:
+		rm -f makecheck.logfile
+		$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+		$(OBJECT)/source/test/testtools/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+		rm -f makecheck.logfile
+
+include $(SRCDIR)/Makefile.depend
+
+FORTRAN       = @srcdir@/fortran
+M4DIRS        = -DFORTDIR=$(FORTRAN) $(SAMRAI_M4_FLAGS)
+
+flux2d.o:		$(FORTRAN)/2d/flux2d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/2d/flux2d.m4 > flux2d.f
+		$(F77) $(FFLAGS) -c flux2d.f -o $@
+
+grad2d.o:		$(FORTRAN)/2d/grad2d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/2d/grad2d.m4 > grad2d.f
+		$(F77) $(FFLAGS) -c grad2d.f -o $@
+
+init2d.o:		$(FORTRAN)/2d/init2d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/2d/init2d.m4 > init2d.f
+		$(F77) $(FFLAGS) -c init2d.f -o $@
+
+stable2d.o:	$(FORTRAN)/2d/stable2d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/2d/stable2d.m4 > stable2d.f
+		$(F77) $(FFLAGS) -c stable2d.f -o $@
+
+stufprobc2d.o:	$(FORTRAN)/2d/stufprobc2d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/2d/stufprobc2d.m4 > stufprobc2d.f
+		$(F77) $(FFLAGS) -c stufprobc2d.f -o $@
+
+trace2d.o:	$(FORTRAN)/2d/trace2d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/2d/trace2d.m4 > trace2d.f
+		$(F77) $(FFLAGS) -c trace2d.f -o $@
+
+trace1d2d.o:	$(FORTRAN)/2d/trace1d2d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/2d/trace1d2d.m4 > trace1d2d.f
+		$(F77) $(FFLAGS) -c trace1d2d.f -o $@
+
+
+
+flux3d.o:		$(FORTRAN)/3d/flux3d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/3d/flux3d.m4 > flux3d.f
+		$(F77) $(FFLAGS) -c flux3d.f -o $@
+
+fluxcorner3d.o:	$(FORTRAN)/3d/fluxcorner3d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/3d/fluxcorner3d.m4 > fluxcorner3d.f
+		$(F77) $(FFLAGS) -c fluxcorner3d.f -o $@
+
+grad3d.o:		$(FORTRAN)/3d/grad3d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/3d/grad3d.m4 > grad3d.f
+		$(F77) $(FFLAGS) -c grad3d.f -o $@
+
+init3d.o:		$(FORTRAN)/3d/init3d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/3d/init3d.m4 > init3d.f
+		$(F77) $(FFLAGS) -c init3d.f -o $@
+
+stable3d.o:	$(FORTRAN)/3d/stable3d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/3d/stable3d.m4 > stable3d.f
+		$(F77) $(FFLAGS) -c stable3d.f -o $@
+
+stufprobc3d.o:	$(FORTRAN)/3d/stufprobc3d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/3d/stufprobc3d.m4 > stufprobc3d.f
+		$(F77) $(FFLAGS) -c stufprobc3d.f -o $@
+
+trace3d.o:	$(FORTRAN)/3d/trace3d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/3d/trace3d.m4 > trace3d.f
+		$(F77) $(FFLAGS) -c trace3d.f -o $@
+
+trace1d3d.o:	$(FORTRAN)/3d/trace1d3d.m4
+		$(M4) $(M4DIRS) $(FORTRAN)/3d/trace1d3d.m4 > trace1d3d.f
+		$(F77) $(FFLAGS) -c trace1d3d.f -o $@
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,661 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   Linear Advection Equation Example
+##
+#########################################################################
+
+This README explains how to use the AMR LinAdv sample application
+code in the SAMRAI library.  The files included in this directory
+are as follows:  
+
+          main.C       -  application driver program
+          LinAdv.[C,h] -  C++ class containing routines specific to the 
+                          LinAdv example and which are called 
+                          from SAMRAI AMR library routines
+          LinAdvFort.h -  header file defining external fortran routines
+          fortran/2d,3d - Fortran numerical routines for 2d,3d problems, resp.
+
+To understand the construction of this application code from pieces 
+specific to the LinAdv model and more generic pieces in the SAMRAI
+library consider the object construction pattern in the main.C file.
+For more details on these files and the LinAdv class consult the comments
+in those files and the LinAdv.h class header file.
+
+COMPILE and RUN
+---------------
+Compile:  make <prog name>   where <prog name> = "main2d" for 2D case
+                                               = "main3d" for 3D case  
+
+Run: 
+
+   main2d <input file>                     ... Serial run   (w/o  MPI)
+   mpirun -np <nprocs> main2d <input file> ... Parallel run (with MPI)
+
+      NOTE: <input file> is the FULL-PATH of the input file
+
+   There are sample input files in the subdirectory sample_input.
+      sphere-2d.input - advecting sphere with periodic boundaries
+      sphere-2d-per-4levels.input - same as above but with 4 levels
+      sphere-2d-re.input - advecting sphere using Richardson extrapolation
+      sine-front-2d.input - advecting sphere with sinusoidal front
+      sphere-3d.input - advecting sphere with periodic boundaries
+
+   example:
+      main2d sample_input/sphere-2d.input
+      mpirun -np 2 main2d sample_input/sphere-2d.input
+
+Restarted Run:
+
+      same format as regular run but add <restart dir> <restore num>
+      to end of command.
+         <restart dir> is directory where restart files are stored
+                       (set in input file).
+         <restore num> is the identifier of which restart file to use
+                       (generally the timestep).
+     
+      example:  (to start from timestep #5)
+        
+        main2d sample_input/sphere-2d.input restart_sphere2d 5
+        mpirun -np 2 main2d sample_input/sphere-2d.input restart_sphere2d 5
+
+      NOTE:  The ordinary use of our restart functionality requires that
+             a problem can only be restarted on on the same number of
+             processors on which the problem was originally run.  To restart
+             on a different number of processors, used the
+             restart-redistribute tool in SAMRAI/tools/restart.
+
+INPUT FILES:
+------------
+
+   Two example input files are included with the LinAdv application:
+
+      sample_input/sphere-2d.input ... 2d sphere with large uval
+				       differences at time zero - simulates
+                                       advection of "blob" of fluid in 2D.  
+      sample_input/sphere-2d-re.input ... same as above case but with
+				       Richardson extrapolation applied to 
+                                       resolve solution errors.     
+      sample_input/sphere-3d.input ... 3d sphere with large uval 
+				       differences at time zero - simulates
+                                       advection of "blob" of fluid in 3D.  
+
+
+   The LinAdv application code is composed of various classes that implement
+   the algorithmic and numerical routines in the AMR solution process (see 
+   comments in the main.C code for more discussion of the various objects 
+   used to build the application).  User-specified inputs control the 
+   behavior of the objects.  Those objects expecting input are:
+
+   Main program .... creates objects used in the simulation - controls output
+                     of viz and restart information.
+
+   LinAdv .......... defines variables and provides numerical kernels for
+                     linear advection problem, including data initialization, 
+                     time integration, boundary routines, etc.
+
+   CartesianGeometry ..... manages Cartesian grid coordinate system
+                           on AMR patch hierarchy.
+
+   GriddingAlgorithm ..... constructs AMR patch hierarchy and
+                           regrids levels during simulation.
+
+   StandardTagAndInitialize .... manages tagging and initialization during
+                                 regridding operation. 
+
+   HyperbolicLevelIntegrator ... manages time integration and data management
+                                 on levels in AMR patch hierarchy.
+
+   TimeRefinementIntegrator .... orchestrates time integration and
+                                 regridding on levels in AMR patch hierarchy.
+
+   LoadBalancer .... manages mapping of patches to processors.
+
+   DataWriter .... specifies variables to write for visualization.
+
+   TimerManager ..... controls timers used that measure performance of
+                      sections of code.
+
+   The input options for these objects are discussed below.  The TYPE is 
+   shown in (parenthesis) and the DEFAULT setting (value set if no input
+   is given) for the option is shown in [brackets].  Required inputs are 
+   designated by [REQD].
+
+   "Main" input section
+   --------------------
+   Main {
+      // Log file where output is directed  
+      // log_file_name -- (char string) name of log file ["linadv.log"]
+      // log_all_nodes -- (bool) option to specify whether output from different
+      //                  processors should be directed to multiple log files
+      //                  (named "log_file_name.<processor id>") or to the 
+      //                  single file. [FALSE]
+      log_file_name    = "sphere-2d.log"
+      log_all_nodes    = TRUE
+
+      // Visualization dump parameters.
+      // viz_dump_interval -- (int) the interval in timesteps over coarsest 
+      //                      level between writing of consecutive 
+      //                      visualization dumps.  Setting it to zero turns off 
+      //                      writing of visualization files.
+      // viz_dump_dirname  -- (char string) directory where viz files are 
+      //                      writen (may include a path).  VisIt requires a
+      //                      non-empty string.  Vizamrai permits an empty string,
+      //                      in which case dumps go to directory where main2d/3d
+      //                      exists. If both data writers are used, directory name
+      //                      must be nonempty, and main.C will append _VisIt,
+      //                       _Vizamrai to dirname.
+      // viz_dump_filename -- (char string) Nonempty file prefix required for 
+      //                      vizamrai filenames.  Not used by VisIt.
+      // visit_number_procs_per_file
+      //                   -- (int >= 1) for parallel runs, number of processors 
+      //                      that share a single common dump file. If this parameter
+      //                      > number processors being used, all processors share 
+      //                      single dump file.  Not used by Vizamrai.
+      //
+      //                      For example, the following inputs:
+      viz_dump_interval     = 1
+      viz_dump_dirname      = "viz_sphere-2d"
+      viz_dump_filename     = "sphere-2d"
+      //                       would result in the following dump structure:
+      //                         main2d
+      //                         viz_sphere-2d_VisIt/
+      //                           visit_dump.00000/
+      //                           visit_dump.00001/
+      //                           ...
+      //                           dumps.visit
+      //                         viz_sphere-2d_Vizamrai/
+      //                           sphere-2d.00000.vis
+      //                           sphere-2d.00001.vis
+      //                           ...
+      //                       If only one data writer is selected, the
+      //                       _VisIt, _Vizamrai extension will be omitted.
+
+      // Restart dump parameters.
+      // restart_interval -- (int) the interval in timesteps over coarsest
+      //                      level between writing of consecutive restart
+      //                      files. Setting it to zero turns off writing
+      //                      of restart files.  [0]
+      // restart_write_dirname  -- (char string) directory where restart files
+      //                           are written [empty string]
+      //                           (assertion thrown if not specified
+      //                           and restart_interval > 0)
+      //
+      restart_interval      = 1
+      restart_write_dirname = "restart_sphere2d"
+
+      // Run-time plotting arguments (only apply in 2d):
+      //
+      // X-windows plotting specification for each primitive variable.
+      // Options:  NO_PLOTTING, BOXES_ONLY, CONTOURS_ONLY, SHADE_ONLY, 
+      //           CONTOUR_WITH_SHADE, BOTH_CONTOUR_AND_SHADE
+      // (see "linadv_const.input" below for discussion of these options).
+      // plotting_interval  -- (int) interval for which values are 
+      //                       plotted in X window during run [1]
+      // plot2d_uval  -- (above options) specification of plotting for 
+      //                 uval [NO_PLOTTING]
+      plotting_interval = 5   
+      plot2d_uval = SHADE_ONLY
+   }
+
+
+   "LinAdv" input section
+   ---------------------
+   LinAdv {
+      //  Problem specification parameters
+      //  advection_velocity -- (double array) velocity by which 
+      //                        initial profile of uval is 
+      //                        advected through the domain [0.0]
+      //  godunov_order -- (int) order of Godunov slopes (1, 2, or 4) [1]
+      //  corner transport scheme -- ("CORNER_TRANS_1" -or- "CORNER_TRANS_2"
+      //                   ["CORNER_TRANS_1"]
+      //  Flux corner transport options
+      //  CORNER_TRANS_1 is based on an extension of Colella's formulation.
+      //  CORNER_TRANS_2 is a formulation constructed by Trangenstein
+      //  A writeup on these two methods is available from R. Hornung or
+      //  A. Wissink.
+      //  data_problem  -- ("SPHERE_PROB", "PIECEWISE_CONST_[X,Y,Z]", or
+      //                   "SINE_CONST_[X,Y,Z]") specification of the
+      //                   problem to be solved [REQD] 
+      //
+      advection_velocity = 2.0e0 , 1.0e0
+      godunov_order    = 2
+      corner_transport = "CORNER_TRANS_1"
+      grad_onset        = 0.85
+      grad_tol          = 0.1
+      data_problem      = "SPHERE_PROB"
+
+      //  Initial data  for "SPHERE_PROB" problem
+      //     radius -- (double) radius of sphere [REQD] 
+      //     center -- (double array) location of sphere center [REQD] 
+      //     uval_inside   -- (double) uval inside sphere [REQD]  
+      //     uval_outside  -- (double) uval outside sphere [REQD]  
+         data_problem      = "SPHERE_PROB"
+         Initial_data {
+            radius            = 2.9
+            center            = 5.5 , 5.5
+ 
+            uval_inside       = 80.0
+            uval_outside      = 5.0
+         }
+
+      //  Initial data for PIECEWISE_CONST_[X,Y,Z]
+      //     front_position -- (double array) points between intervals [REQD]
+      //     interval_n {
+      //        uval        -- (double) uval on interval n [REQD]
+      //     }
+      //
+      //    interval 0      interval 1                         interval n
+      //  |------------|------------------|--------...-------|------------|
+      //        front_position[0]  front_position[1]  front_position[n-1]
+      //
+         data_problem      = "PIECEWISE_CONST_X"
+         Initial_data {
+           front_position = 0.0
+           interval_0 {
+              uval        = 0.0
+           }
+           interval_1 {
+              uval        = 1.0
+           }
+         }
+
+      //  Initial data for SINE_CONST_[X,Y,Z]
+      //     front_position -- (double array) points between intervals [REQD]
+      //     interval_n {
+      //        uval        -- (double) uval on interval n [REQD]
+      //     }
+      //     amplitude -- (double) amplitude of sine wave
+      //     frequency -- (double array) frequency of sine wave
+      //
+         data_problem      = "SINE_CONST_X"
+         Initial_data {
+            front_position    = 0.0
+            interval_0 {
+               uval      = 40.0
+            }
+            interval_1 {
+               uval      = 1.0
+            }
+            amplitude = 0.25
+            frequency = 2.0, 2.0
+         }
+
+      //  Refinement criteria
+      //  Data for tagging cells to refine for gradient detection and
+      //  Richardson extrapolation.  Options:
+      //     UVAL_DEVIATION, UVAL_GRADIENT, UVAL_SHOCK, UVAL_RICHARDSON
+      //     and combinations thereof...
+      //
+      //     UVAL_DEVIATION   -- tag around deviations in a specified uval
+      //     UVAL_GRADIENT    -- tag around gradients 
+      //     UVAL_SHOCK       -- tag around discontinuous regions 
+      //     UVAL_RICHARDSON  -- use Richardson extrapolation to tag
+      //                         around solution errors
+      //
+      // Refinement_data {
+      //   refine_criteria    -- (string array) contains one or more of the
+      //                         tagging options, specified above [REQD]
+      //   UVAL_DEVIATION {
+      //      uval_dev -- (double array) freestream uval, i.e. tag cells where   
+      //                  |uval - uval_dev] > dev_tol [REQD]
+      //      dev_tol  -- (double array) deviation tolerance [REQD]
+      //      time_min -- (double array) time on each level at which
+      //                  tagging using this criteria is started [0.]
+      //      time_max -- (double array) time on each level at which
+      //                  tagging is stopped [DBL_MAX]
+      //      NOTE:  For each of the above entries, if a level is NOT specified,
+      //             the value from the next coarser level is used.  The time_min
+      //             and time_max options may be used to control whether tagging
+      //             on a level is active (i.e. setting time_max=0 makes it
+      //             inactive).
+      //   }
+      //   UVAL_GRADIENT {
+      //      grad_tol -- (double array) gradient tolerance for each level [REQD]
+      //      time_min -- (double array) time on each level at which
+      //                  tagging using this criteria is started [0.]
+      //      time_max -- (double array) time on each level at which
+      //                  tagging is stopped [DBL_MAX]
+      //      (see NOTE under UVAL_DEVIATION above)
+      //   }
+      //   UVAL_SHOCK {
+      //      shock_onset -- (double array) onset tolerance for each level [REQD]
+      //      shock_tol -- (double array) gradient tolerance for each level [REQD]
+      //      time_min -- (double array) time on each level at which
+      //                  tagging using this criteria is started [0.]
+      //      time_max -- (double array) time on each level at which
+      //                  tagging is stopped [DBL_MAX]
+      //      (see NOTE under UVAL_DEVIATION above)
+      //   }
+      //   UVAL_RICHARDSON {
+      //      rich_tol -- (double array) Richardson extrapolation tolerance 
+      //                  for each level [REQD]
+      //      time_min -- (double array) time on each level at which
+      //                  tagging using this criteria is started [0.]
+      //      time_max -- (double array) time on each level at which
+      //                  tagging is stopped [DBL_MAX]
+      //      (see NOTE under UVAL_DEVIATION above)
+      //   }
+      //
+      Refinement_data {
+         refine_criteria = "UVAL_GRADIENT", "UVAL_SHOCK"
+ 
+         UVAL_GRADIENT {
+            grad_tol = 10.0, 9.0, 9.5
+            time_min = 0., 0.5, 0.8
+            time_max = 10.0, 10.0, 8.0
+         }
+ 
+         UVAL_SHOCK {
+            shock_tol = 5.0, 8.0, 12.0
+            shock_onset = 0.85, 0.80
+            time_min = 0., 0.5, 0.8
+            time_max = 10.0, 10.0, 8.0
+         }
+      }
+
+      //  Boundary conditions  
+      //  Options:  BDRY_FLOW, BDRY_LINEAR, BDRY_SYMMETRIC, BDRY_FIXED
+      //  "BDRY_FLOW" indicates flow-thru conditions
+      //  "BDRY_LINEAR" indicates a linear profile at the boundary
+      //  "BDRY_SYMMETRIC" will apply a plane of symmetry
+      //  "BDRY_FIXED" designates a solid boundary.
+      // Boundary_data {
+      //   boundary_node_x0y0 -- (above options) lower left corner [FLOW]
+      //   boundary_node_x1y0 -- (above options) lower right corner [FLOW]
+      //   boundary_node_x0y1 -- (above options) upper left corner [FLOW]
+      //   boundary_node_x1y1 -- (above options) upper right corner [FLOW]
+      //   boundary_edge_x0 { -- left edge
+      //   boundary_edge_x1 { -- right edge
+      //   boundary_edge_y0 { -- bottom edge
+      //   boundary_edge_y1 { -- top edge
+      //      boundary_type   -- (above options) type at prescribed edge [FLOW]
+      //      uval            -- (double) uval at prescribed edge [0]
+      //   }
+      //
+      //                       edge_y1
+      //         node_x0y1 o--------------o node_x1y1
+      //                   |              |
+      //                   |              |
+      //          edge_x0  |              | edge_x1
+      //                   |              |
+      //                   |              |
+      //         node_x0y0 o--------------o node_x1y0
+      //                       edge_y0
+      //
+      //  NOTE: 3D case specifies data at faces as well.  See
+      //        /SAMRAI/docs/userdocs/boundaries.ps for further discussion.
+      Boundary_data {
+         boundary_node_x0y0 = "BDRY_FLOW"
+         boundary_node_x1y0 = "BDRY_FLOW"
+         boundary_node_x0y1 = "BDRY_FLOW"
+         boundary_node_x1y1 = "BDRY_FLOW"
+         boundary_edge_x0 {
+           boundary_type    = "BDRY_FLOW"
+         }
+         boundary_edge_x1 {
+            boundary_type   = "BDRY_FLOW"
+         }
+         boundary_edge_y0 {
+            boundary_type   = "BDRY_FLOW"
+         }
+         boundary_edge_y1 {
+            boundary_type   = "BDRY_FLOW"
+         }
+      }
+
+   }
+
+   "CartesianGeometry" input section
+   ---------------------------------
+   CartesianGeometry {
+      //  Specify lower/upper corners of the computational domain and a
+      //  set of non-overlapping boxes defining domain interior.  If union
+      //  of boxes is not a parallelpiped, lower/upper corner data corresponds
+      //  to min/max corner indices over all boxes given.
+      //  x_lo  -- (double array) lower corner of computational domain [REQD]
+      //  x_up  -- (double array) upper corner of computational domain [REQD]
+      //  domain_boxes  -- (box array) set of boxes that define interior of
+      //                   hysical domain. [REQD]
+      //  periodic_dimension -- (int array) coordinate directions in which
+      //                        domain is periodic.  Zero indicates not
+      //                        periodic, non-zero value indicates periodicity.
+      //                        [0]
+      x_lo = 0.e0 , 0.e0           
+      x_up = 30.e0 , 20.e0       
+      domain_boxes = [(0,0),(59,39)]
+   }
+
+
+   "GriddingAlgorithm" input section
+   ---------------------------------
+   GriddingAlgorithm {
+      // Information used to create patches in AMR hierarchy.
+      // max_levels -- (int) max number of mesh levels in hierarchy [REQD]
+      //
+      // For most of the following parameters, the number of precribed data
+      // values need not match the number of levels in the hierarchy
+      // (determined by max_levels).  If more values are given than number
+      // of levels, extraneous values will be ignored.  If less are give, then
+      // values that correspond to individual levels will apply to those
+      // levels.  Missing values will be taken from those for the finest
+      // level specified.
+      //
+      // ratio_to_coarser {
+      //   level_1 -- (int array) ratio between index spaces on
+      //              level 1 to level 0 [REQD]
+      //   level_2 -- (int array)  ratio between index spaces on
+      //              level 2 to level 1 [REQD]
+      //   etc....
+      // }
+      // largest_patch_size {
+      //   level_0 -- (int array) largest patch allowed on level 0.
+      //              [REQD]
+      //   level_1 -- (int array)    "       "      "   "  level 1
+      //              [level 0 entry]
+      //   etc....
+      // }
+      // smallest_patch_size {
+      //   level_0 -- (int array) smallest patch allowed on level 0.
+      //              [max ghost width for all variables]
+      //   level_1 -- (int array)    "       "      "   "  level 1
+      //              [level 0 entry]
+      //   etc....
+      // }
+      max_levels = 3
+      ratio_to_coarser {
+         level_1 = 4 , 4
+         level_2 = 4 , 4
+         level_3 = 4 , 4
+      }
+      largest_patch_size {
+         level_0 = 40 , 40
+      }
+      smallest_patch_size {
+         level_0 = 16 , 16
+      }
+
+      // Tolerances for gridding efficiency and box chopping operations.
+      // efficiency_tolerance -- (double array) minimum percentage of tagged
+      //                         cells allowed in a box [0.8 for each level]
+      // combine_efficiency   -- (double array) threshold specifying when a
+      //                         box may be chopped into two smaller boxes.
+      //                         If sum of the volumes of smaller boxes is >
+      //                         combine efficiency * volume of larger box,
+      //                         then larger box will not be chopped.
+      //                         [0.8 for each level]
+      // proper_nesting_buffer -- (int array) number of coarse cells by which
+      //                          the next finer level is nested within its
+      //                          interior. [1 for each level]
+      efficiency_tolerance    = 0.85e0
+      combine_efficiency      = 0.95e0
+      proper_nesting_buffer   = 1
+
+      // Option to read or write gridding information
+      // write_regrid_boxes    -- (bool) Output sequence of refine boxes to file
+      // read_regrid_boxes     -- (bool) Read sequence of refine boxes from file
+      // regrid_boxes_filename -- (string) file name used for reading or writing 
+      //                         boxes. 
+      //
+      // Reading and writing options require some user intervention to assure
+      // they work properly.  Please consult Andy Wissink (awissink at llnl.gov)
+      // if you are interested in using these options. 
+      write_regrid_boxes    = TRUE
+      regrid_boxes_filename = TRUE
+       
+   }
+
+   "StandardTagAndInitialize" input section
+   ---------------------------------------------
+   StandardTagAndInitialize {
+      // Specification of the type of tagging to be performed
+      // tagging_method -- (string array) one or more entries specifying
+      //                 the tagging algorithm used.  Options include:
+      //                 "GRADIENT_DETECTOR" 
+      //                 "RICHARDSON_EXTRAPOLATION"
+      //                 "REFINE_BOXES"
+      //
+      // REFINE_BOXES allows you to prescribe where refinement should occur.
+      // If this option is used, you must also supply a RefineBoxes database
+      // entry with the refine boxes on different levels specified.  i.e.
+      //    RefineBoxes{ 
+      //        level_0 -- (BoxArray) Boxes to be refined on level 0
+      //        level_1 -- (BoxArray) Boxes to be refined on level 1
+      //        etc. 
+      //
+      // Gradient detection option.
+      tagging_method = "GRADIENT_DETECTOR"
+      //
+      // Richarson extrapolation option.
+      tagging_method = "RICHARDSON_EXTRAPOLATION"
+      //
+      // Static refine boxes option.
+      tagging_method = "REFINE_BOXES"
+      RefineBoxes {
+        level0_boxes = [(15,0),(29,14)]
+        level1_boxes = [(65,10),(114,40)]
+      }
+      // Combination.
+      tagging_method = "RICHARDSON_EXTRAPOLATION", "GRADIENT_DETECTOR"
+   }
+
+
+   "HyperbolicLevelIntegrator" input section
+   -----------------------------------------
+   HyperbolicLevelIntegrator{
+      //  CFL used to determine timestep on each level.  
+     //  cfl      -- (double) timestep at each level is given by
+      //              dt = cfl*dx/a, where a is max wave speed.  [REQD]
+      //  cfl_init -- (double) cfl factor used for initial step [REQD]
+      cfl                       = 0.9e0
+      cfl_init                  = 0.9e0
+
+      //  Options for timestep computation.
+      //  lag_dt_computation -- (bool) if true, characteristic data on the
+      //                        patch is not recomputed before computing the
+      //                        timestep;  otherwise it uses data from
+      //                        preceding flux calculation [TRUE].
+      //  use_ghosts_to_compute_dt -- (bool) if true, fill ghost data before
+      //                              computing timestep on each patch [TRUE].
+      lag_dt_computation        = TRUE
+      use_ghosts_to_compute_dt  = TRUE
+   }
+
+
+   "TimeRefinementIntegrator" input section
+   -----------------------------------------
+   TimeRefinementIntegrator{
+      // Time stepping specifications. 
+      // start_time -- (double) initial integration time [REQD]
+      // end_time   -- (double) final integration time [REQD]
+      // grow_dt    -- (double) limit factor on maximum growth of timestep
+      //               from one step to the next; useful for ramping up
+      //               timestep size or to prevent rapid growth in timestep
+      //               [REQD]
+      // max_integrator_steps -- max number timesteps on coarsest level [REQD]
+      // tag_buffer -- (int array) amount by which cells tagged for error are
+      //               buffered before new fine patches are created to cover
+      //               tagged regions.  By default, it is the interval of
+      //               timesteps between successive regids on level.
+      //               [regrid_interval]
+      start_time           = 0.e0
+      end_time             = 100.e0
+      grow_dt              = 1.1e0
+      max_integrator_steps = 10
+      tag_buffer           = 1,1,1,1 // max of 4 finer levels in hierarchy
+   }
+
+   "LoadBalancer" input section
+   ----------------------------------
+   LoadBalancer {
+      // using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+   }
+
+   "DataWriter" input section
+   ----------------------------------
+   DataWriter {
+      // Specify which variables to write to visualization file(s).
+      // Variable_Names -- (string array) list of variable names to
+      //                    write to the viz file.
+      // Variable_Types -- (string array) list of the corresponding
+      //                    variable type to write to the viz file.
+      //                    Must be either "primitive" or "derived".
+      //                    Note that until vizamrai is updated to use
+      //                    HDF5, "derived" must always be used.
+      // Variable_Depths -- (int array) depth, or number of components, of
+      //                    each variable.
+      // Variable_Scales -- (double array) list of scaling factors for each
+      //                    variable to be written to the viz file.
+      Variable_Names  =  "uval"
+      Variable_Types  =  "Derived"
+      Variable_Depths =  1
+      Variable_Scales =  1.0
+   }
+
+   "TimerManager" input section
+   ----------------------------
+   TimerManager{
+      // Specify which timers to invoke
+      // timer_list -- (string array) list of timers to be turned on - for
+      //               complete list of available timers, see
+      //               SAMRAI/docs/userdocs/timing.pdf  [null]
+      timer_list  = "apps::main::*",
+                    "apps::Euler::computeFluxesOnPatch()",
+                    "algs::GriddingAlgorithm::*",
+                    "xfer::*::*"
+
+      // Various output options.
+      // print_total      -- (bool) print total time [TRUE]
+      // print_exclusive  -- (bool) output exclusive time - i.e. time spent
+      //                     exclusively in each routine.  A nice way to
+      //                     identify routines with bottlenecks, but is more
+      //                     expensive than recording total time [FALSE].
+      // print_wall       -- (bool) output wallclock time [TRUE]
+      // print_user       -- (bool) output user time [FALSE]
+      // print_sys        -- (bool) output system time [FALSE]
+      // print_summed     -- (bool) output sum of times measured across all
+      //                     processors during a parallel run [FALSE].
+      // print_max        -- (bool) output maximum time spent on any one
+      //                     processor, along with the processor ID [FALSE]
+      // print_percentage -- (bool) output percentage of total time for each
+      //                     printed timer [TRUE]
+      // print_concurrent -- (bool) in the process of performing exclusive
+      //                     time, a nested call tree is created; print the
+      //                     tree [FALSE]
+      // print_timer_overhead -- (bool) each timer start/stop invocation
+      //                     incurs about one-half a millionth of a second
+      //                     overhead.  This option will output the number of
+      //                     invocations and the total predicted overhead for
+      //                     all the timers [FALSE]
+      // print_threshold  -- (double) do not print any timers that constitute
+      //                     < (print_threshold)% of overall run time.  Useful
+      //                     to prevent gobs of output if many timers are
+      //                     turned on. [0.25]
+      print_exclusive = TRUE
+      print_max = TRUE
+      print_timer_overhead = TRUE
+      print_threshold = 0.0
+   }
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/SinusoidalFrontTagger.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/SinusoidalFrontTagger.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,609 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   SinusoidalFrontTagger class implementation 
+ *
+ ************************************************************************/
+#include "SinusoidalFrontTagger.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/math/HierarchyCellDataOpsReal.h"
+#include "SAMRAI/pdat/MDA_Access.h"
+#include "SAMRAI/pdat/ArrayData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <iomanip>
+
+using namespace SAMRAI;
+
+SinusoidalFrontTagger::SinusoidalFrontTagger(
+   const std::string& object_name,
+   const tbox::Dimension& dim,
+   tbox::Database* database):
+   d_name(object_name),
+   d_dim(dim),
+   d_hierarchy(),
+   d_amplitude(0.2),
+   d_ghost_cell_width(dim, 0),
+   d_buffer_cells(dim, 1),
+   d_allocate_data(true),
+   d_time(0.5)
+{
+   hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(variable_db != NULL);
+#endif
+
+   tbox::Array<double> init_disp;
+   tbox::Array<double> velocity;
+   tbox::Array<double> period;
+
+   if (database != NULL) {
+      d_allocate_data =
+         database->getBoolWithDefault("allocate_data",
+            d_allocate_data);
+      if (database->isInteger("buffer_cells")) {
+         database->getIntegerArray("buffer_cells",
+            &d_buffer_cells[0], d_dim.getValue());
+      }
+      for (int ln = 0; true; ++ln) {
+         std::string name("buffer_space_");
+         name = name + tbox::Utilities::intToString(ln);
+         if (database->isDouble(name)) {
+            d_buffer_space.resizeArray(d_dim.getValue() * (ln + 1));
+            database->getDoubleArray(name, &d_buffer_space[d_dim.getValue() * ln], d_dim.getValue());
+         } else {
+            break;
+         }
+      }
+      if (database->isDouble("period")) {
+         period =
+            database->getDoubleArray("period");
+      }
+      if (database->isDouble("init_disp")) {
+         init_disp =
+            database->getDoubleArray("init_disp");
+      }
+      if (database->isDouble("velocity")) {
+         velocity =
+            database->getDoubleArray("velocity");
+      }
+      d_amplitude =
+         database->getDoubleWithDefault("amplitude",
+            d_amplitude);
+      d_time =
+         database->getDoubleWithDefault("time",
+            d_time);
+
+      if (database->isInteger("ghost_cell_width")) {
+         database->getIntegerArray("ghost_cell_width",
+            &d_ghost_cell_width[0], d_dim.getValue());
+      }
+   }
+
+   for (int idim = 0; idim < d_dim.getValue(); ++idim) {
+      d_init_disp[idim] = idim < init_disp.size() ? init_disp[idim] : 0.0;
+      d_velocity[idim] = idim < velocity.size() ? velocity[idim] : 0.0;
+      d_period[idim] = idim < period.size() ? period[idim] : 1.0e20;
+   }
+
+   const std::string context_name = d_name + std::string(":context");
+   d_context = variable_db->getContext(context_name);
+
+   tbox::Pointer<hier::Variable> dist_var(
+      new pdat::NodeVariable<double>(dim, d_name + ":dist"));
+   d_dist_id = variable_db->registerVariableAndContext(dist_var,
+         d_context,
+         d_ghost_cell_width);
+
+   tbox::Pointer<hier::Variable> tag_var(
+      new pdat::CellVariable<int>(dim, d_name + ":tag"));
+   d_tag_id = variable_db->registerVariableAndContext(tag_var,
+         d_context,
+         d_ghost_cell_width);
+
+   t_setup = tbox::TimerManager::getManager()->
+      getTimer("apps::SinusoidalFrontTagger::setup");
+   t_node_pos = tbox::TimerManager::getManager()->
+      getTimer("apps::SinusoidalFrontTagger::node_pos");
+   t_distance = tbox::TimerManager::getManager()->
+      getTimer("apps::SinusoidalFrontTagger::distance");
+   t_tag_cells = tbox::TimerManager::getManager()->
+      getTimer("apps::SinusoidalFrontTagger::tag_cells");
+   t_copy = tbox::TimerManager::getManager()->
+      getTimer("apps::SinusoidalFrontTagger::copy");
+}
+
+SinusoidalFrontTagger::~SinusoidalFrontTagger()
+{
+}
+
+void SinusoidalFrontTagger::initializeLevelData(
+   /*! Hierarchy to initialize */
+   const tbox::Pointer<hier::BasePatchHierarchy> base_hierarchy,
+   /*! Level to initialize */
+   const int ln,
+   const double init_data_time,
+   const bool can_be_refined,
+   /*! Whether level is being introduced for the first time */
+   const bool initial_time,
+   /*! Level to copy data from */
+   const tbox::Pointer<hier::BasePatchLevel> old_base_level,
+   const bool allocate_data)
+{
+   NULL_USE(can_be_refined);
+
+   tbox::Pointer<hier::PatchHierarchy> hierarchy = base_hierarchy;
+   tbox::Pointer<hier::PatchLevel> old_level = old_base_level;
+   if (!old_base_level.isNull()) {
+      TBOX_ASSERT(!old_level.isNull());
+   }
+   TBOX_ASSERT(!hierarchy.isNull());
+
+   /*
+    * Reference the level object with the given index from the hierarchy.
+    */
+   tbox::Pointer<hier::PatchLevel> level =
+      hierarchy->getPatchLevel(ln);
+
+   for (hier::PatchLevel::Iterator pi(level); pi; pi++) {
+      hier::Patch& patch = **pi;
+      initializePatchData(patch,
+         init_data_time,
+         initial_time,
+         allocate_data);
+   }
+
+#if 0
+   if (d_allocate_data) {
+      /*
+       * If instructed, allocate all patch data on the level.
+       * Allocate only persistent data.  Scratch data will
+       * generally be allocated and deallocated as needed.
+       */
+      if (allocate_data) {
+         level->allocatePatchData(d_dist_id);
+         level->allocatePatchData(d_tag_id);
+      }
+      computeLevelData(hierarchy, ln, d_time /*init_data_time*/,
+         d_dist_id, d_tag_id, old_level);
+   }
+#endif
+}
+
+void SinusoidalFrontTagger::initializePatchData(
+   hier::Patch& patch,
+   const double init_data_time,
+   const bool initial_time,
+   const bool allocate_data)
+{
+   NULL_USE(initial_time);
+
+   if (d_allocate_data) {
+      /*
+       * If instructed, allocate all patch data on the level.
+       * Allocate only persistent data.  Scratch data will
+       * generally be allocated and deallocated as needed.
+       */
+      if (allocate_data) {
+         if (!patch.checkAllocated(d_dist_id)) {
+            patch.allocatePatchData(d_dist_id);
+         }
+         if (!patch.checkAllocated(d_tag_id)) {
+            patch.allocatePatchData(d_tag_id);
+         }
+         tbox::Pointer<pdat::NodeData<double> > dist_data =
+            patch.getPatchData(d_dist_id);
+         tbox::Pointer<pdat::CellData<int> > tag_data =
+            patch.getPatchData(d_tag_id);
+         TBOX_ASSERT(!dist_data.isNull());
+         TBOX_ASSERT(!tag_data.isNull());
+         computePatchData(patch, init_data_time,
+            dist_data.getPointer(), tag_data.getPointer());
+      }
+   }
+}
+
+void SinusoidalFrontTagger::resetHierarchyConfiguration(
+   /*! New hierarchy */ tbox::Pointer<hier::BasePatchHierarchy> new_hierarchy,
+   /*! Coarsest level */ int coarsest_level,
+   /*! Finest level */ int finest_level)
+{
+   NULL_USE(coarsest_level);
+   NULL_USE(finest_level);
+   d_hierarchy = new_hierarchy;
+   TBOX_ASSERT(!d_hierarchy.isNull());
+}
+
+void SinusoidalFrontTagger::applyGradientDetector(
+   const tbox::Pointer<hier::BasePatchHierarchy> base_hierarchy_,
+   const int ln,
+   const double error_data_time,
+   const int tag_index,
+   const bool initial_time,
+   const bool uses_richardson_extrapolation)
+{
+   NULL_USE(initial_time);
+   NULL_USE(uses_richardson_extrapolation);
+   tbox::Pointer<hier::PatchHierarchy> hierarchy_ = base_hierarchy_;
+   TBOX_ASSERT(!hierarchy_.isNull());
+   tbox::Pointer<hier::PatchLevel> level_ = hierarchy_->getPatchLevel(ln);
+   TBOX_ASSERT(!level_.isNull());
+
+   hier::PatchLevel& level = *level_;
+
+   for (hier::PatchLevel::Iterator pi(level); pi; pi++) {
+      hier::Patch& patch = **pi;
+
+      tbox::Pointer<hier::PatchData>
+      tag_data = patch.getPatchData(tag_index);
+      if (tag_data.isNull()) {
+         TBOX_ERROR("Data index " << tag_index
+                                  << " does not exist for patch.\n");
+      }
+      tbox::Pointer<pdat::CellData<int> > tag_cell_data_ = tag_data;
+      if (tag_cell_data_.isNull()) {
+         TBOX_ERROR("Data index " << tag_index
+                                  << " is not cell int data.\n");
+      }
+
+      if (d_allocate_data) {
+         // Use internally stored data.
+         tbox::Pointer<hier::PatchData>
+         saved_tag_data = patch.getPatchData(d_tag_id);
+         tag_cell_data_->copy(*saved_tag_data);
+      } else {
+         // Compute tag data for patch.
+         computePatchData(patch,
+            error_data_time,
+            NULL,
+            tag_cell_data_.getPointer());
+      }
+
+   }
+}
+
+/*
+ * Deallocate patch data allocated by this class.
+ */
+
+void SinusoidalFrontTagger::deallocatePatchData(
+   hier::PatchHierarchy& hierarchy)
+{
+   int ln;
+   for (ln = 0; ln < hierarchy.getNumberOfLevels(); ++ln) {
+      tbox::Pointer<hier::PatchLevel> level = hierarchy.getPatchLevel(ln);
+      deallocatePatchData(*level);
+   }
+}
+
+/*
+ * Deallocate patch data allocated by this class.
+ */
+
+void SinusoidalFrontTagger::deallocatePatchData(
+   hier::PatchLevel& level)
+{
+   level.deallocatePatchData(d_dist_id);
+   level.deallocatePatchData(d_tag_id);
+}
+
+/*
+ * Deallocate patch data allocated by this class.
+ */
+void SinusoidalFrontTagger::computeHierarchyData(
+   hier::PatchHierarchy& hierarchy,
+   double time)
+{
+   d_time = time;
+   if (!d_allocate_data) return;
+
+   for (int ln = 0; ln < hierarchy.getNumberOfLevels(); ++ln) {
+      computeLevelData(hierarchy, ln, time, d_dist_id, d_tag_id);
+   }
+}
+
+/*
+ * Compute the solution data for a level.
+ * Can copy data from old level (if any) to support
+ * initializeLevelData().
+ */
+
+void SinusoidalFrontTagger::computeLevelData(
+   const hier::PatchHierarchy& hierarchy,
+   const int ln,
+   const double time,
+   const int dist_id,
+   const int tag_id,
+   const tbox::Pointer<hier::PatchLevel>& old_level) const
+{
+   NULL_USE(old_level);
+
+   const tbox::Pointer<hier::PatchLevel> level =
+      hierarchy.getPatchLevel(ln);
+
+   /*
+    * Initialize data in all patches in the level.
+    */
+   for (hier::PatchLevel::Iterator pi(level); pi; pi++) {
+      hier::Patch& patch = **pi;
+      tbox::Pointer<pdat::NodeData<double> > dist_data = (dist_id >= 0) ?
+         patch.getPatchData(dist_id) : tbox::Pointer<hier::PatchData>(NULL);
+      tbox::Pointer<pdat::CellData<int> > tag_data = (tag_id >= 0) ?
+         patch.getPatchData(tag_id) : tbox::Pointer<hier::PatchData>(NULL);
+      computePatchData(patch, time,
+         dist_data.getPointer(),
+         tag_data.getPointer());
+   }
+}
+
+/*
+ * Compute the solution data for a patch.
+ */
+
+void SinusoidalFrontTagger::computePatchData(
+   const hier::Patch& patch,
+   const double time,
+   pdat::NodeData<double>* dist_data,
+   pdat::CellData<int>* tag_data) const
+{
+
+   t_setup->start();
+
+   TBOX_ASSERT(!d_hierarchy.isNull());
+   TBOX_ASSERT(patch.inHierarchy());
+
+   const int ln = patch.getPatchLevelNumber();
+   const tbox::Pointer<hier::PatchLevel> level =
+      d_hierarchy->getPatchLevel(ln);
+   const hier::IntVector& ratio(level->getRatioToLevelZero());
+
+   const hier::Box& pbox = patch.getBox();
+   tbox::Pointer<geom::CartesianPatchGeometry> patch_geom =
+      patch.getPatchGeometry();
+
+   const double* xlo = patch_geom->getXLower();
+
+   const double* dx = patch_geom->getDx();
+
+   // Compute the size of buffer to tag around cells crossing front.
+   hier::IntVector buffer(d_buffer_cells);
+   for (int i = 0; i < d_dim.getValue(); ++i) {
+      if (d_buffer_space.size() > ln * d_dim.getValue() + i) {
+         int space_based_buffer =
+            int(d_buffer_space[ln * d_dim.getValue() + i] / dx[i] + 0.5);
+         if (space_based_buffer > buffer(i)) buffer(i) = space_based_buffer;
+      }
+   }
+   // std::cout << "buffer for ln of " << ln << " is " << buffer << std::endl;
+
+   /*
+    * We need at least buffer ghost cells to compute
+    * the tags, but the data does not have as many ghost cells.
+    * So we create temporary patch data with the required "ghost"
+    * buffer for computing tag values.  (We could give the real
+    * data the required ghost cells, but that may affect the
+    * regridding algorithm I'm testing.)
+    */
+   hier::IntVector required_tmp_buffer(buffer);
+   required_tmp_buffer *= ratio;
+   pdat::NodeData<double> tmp_dist(pbox, 1, required_tmp_buffer);
+   pdat::CellData<int> tmp_tag(pbox, 1, required_tmp_buffer);
+
+   /*
+    * Determine what x-cell-index contains the sinusoidal front.
+    */
+
+   double wave_number[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+   for (int idim = 0; idim < d_dim.getValue(); ++idim) {
+      wave_number[idim] = 2 * 3.141592654 / d_period[idim];
+   }
+   const int iperiod = int(d_period[0] / dx[0] + 0.5);
+
+   t_setup->stop();
+
+   t_node_pos->start();
+
+   hier::Box front_box = pbox;
+   front_box.grow(required_tmp_buffer);
+   front_box.growUpper(hier::IntVector(d_dim, 1));
+   // Squash front_box to a single plane.
+   front_box.upper(0) = front_box.lower(0);
+   const int ifront = front_box.lower(0);
+
+   pdat::ArrayData<int> front_i_(front_box, 1);
+
+   MDA_Access<int, 2, MDA_OrderColMajor<2> > front_i2;
+   MDA_Access<int, 3, MDA_OrderColMajor<3> > front_i3;
+   if (d_dim == tbox::Dimension(2)) {
+      front_i2 = MDA_Access<int, 2, MDA_OrderColMajor<2> >(
+            front_i_.getPointer(0),
+            &front_i_.getBox().lower()[0],
+            &front_i_.getBox().upper()[0]);
+      for (int j = front_i2.beg(1); j < front_i2.end(1); ++j) {
+         double y = xlo[1] + dx[1] * (j - pbox.lower(1));
+         double siny =
+            sin(wave_number[1] * (y + d_init_disp[1] - d_velocity[1] * time));
+         double fx = d_amplitude * siny + d_init_disp[0] + d_velocity[0] * time;
+         front_i2(ifront, j) = int((fx - xlo[0]) / dx[0]) + pbox.lower(0);
+         // std::cout << i << '\t' << j << '\t' << y << '\t' << front_i(i,j) << std::endl;
+      }
+   } else if (d_dim == tbox::Dimension(3)) {
+      front_i3 = MDA_Access<int, 3, MDA_OrderColMajor<3> >(
+            front_i_.getPointer(0),
+            &front_i_.getBox().lower()[0],
+            &front_i_.getBox().upper()[0]);
+      for (int k = front_i3.beg(2); k < front_i3.end(2); ++k) {
+         double z = xlo[2] + dx[2] * (k - pbox.lower(2));
+         double sinz =
+            sin(wave_number[2] * (z + d_init_disp[2] - d_velocity[2] * time));
+         for (int j = front_i3.beg(1); j < front_i3.end(1); ++j) {
+            double y = xlo[1] + dx[1] * (j - pbox.lower(1));
+            double siny =
+               sin(wave_number[1] * (y + d_init_disp[1] + d_velocity[1] * time));
+            double fx = d_amplitude * siny * sinz + d_init_disp[0]
+               + d_velocity[0] * time;
+            front_i3(ifront, j, k) = int((fx - xlo[0]) / dx[0]) + pbox.lower(0);
+#if 0
+            std::cout << ifront
+                      << '\t' << j
+                      << '\t' << k
+                      << '\t' << y
+                      << '\t' << siny
+                      << '\t' << z
+                      << '\t' << sinz
+                      << '\t' << fx
+                      << std::endl;
+#endif
+         }
+      }
+   }
+
+   t_node_pos->stop();
+
+   if (dist_data != NULL) {
+      t_distance->start();
+
+      pdat::NodeData<double>::Iterator ni(tmp_dist.getGhostBox());
+      for ( ; ni; ni++) {
+         const pdat::NodeIndex& index = *ni;
+         if (d_dim == tbox::Dimension(2)) {
+            tmp_dist(index) = xlo[0] + (index(0) - pbox.lower(0)) * dx[0]
+               - front_i2(ifront, index(1)) * dx[0];
+         } else if (d_dim == tbox::Dimension(3)) {
+            tmp_dist(index) = xlo[0] + (index(0) - pbox.lower(0)) * dx[0]
+               - front_i3(ifront, index(1), index(2)) * dx[0];
+         }
+      }
+      // tmp_dist.print(tmp_dist.getBox(),0,plog);
+
+      t_distance->stop();
+   }
+
+   if (tag_data != NULL) {
+
+      t_tag_cells->start();
+
+      tag_data->fill(0);
+      const hier::IntVector& glower = tag_data->getGhostBox().lower();
+      const hier::IntVector& gupper = tag_data->getGhostBox().upper();
+
+      if (d_dim == tbox::Dimension(2)) {
+         MDA_Access<int, 2, MDA_OrderColMajor<2> > tag_aa(
+            tag_data->getPointer(0),
+            &tag_data->getGhostBox().lower()[0],
+            &tag_data->getGhostBox().upper()[0]);
+         for (int j = pbox.lower(1); j <= pbox.upper(1); ++j) {
+            int if3 = front_i3(ifront, j);
+            while (if3 >= glower(0)) {
+               if3 -= iperiod;
+            }
+            while (if3 + iperiod < glower(0)) {
+               if3 += iperiod;
+            }
+            for (if3 += iperiod; if3 <= gupper(0); if3 += iperiod) {
+               tag_aa(if3, j) = 1;
+            }
+         }
+      } else if (d_dim == tbox::Dimension(3)) {
+         MDA_Access<int, 3, MDA_OrderColMajor<3> > tag_aa(
+            tag_data->getPointer(0),
+            &tag_data->getGhostBox().lower()[0],
+            &tag_data->getGhostBox().upper()[0]);
+         for (int k = pbox.lower(2); k <= pbox.upper(2); ++k) {
+            for (int j = pbox.lower(1); j <= pbox.upper(1); ++j) {
+               int if3 = front_i3(ifront, j, k);
+               while (if3 >= glower(0)) {
+                  if3 -= iperiod;
+               }
+               while (if3 + iperiod < glower(0)) {
+                  if3 += iperiod;
+               }
+               for (if3 += iperiod; if3 <= gupper(0); if3 += iperiod) {
+                  tag_aa(if3, j, k) = 1;
+               }
+            }
+         }
+      }
+
+      t_tag_cells->stop();
+
+   }
+
+   t_copy->start();
+
+   /*
+    * Copy computed data to output.  Recall that the convention is
+    * to send in a NULL pointer to indicate that data is not wanted.
+    */
+   if (dist_data != NULL) {
+      dist_data->copy(tmp_dist);
+   }
+
+   t_copy->stop();
+}
+
+#ifdef HAVE_HDF5
+int SinusoidalFrontTagger::registerVariablesWithPlotter(
+   appu::VisItDataWriter& writer)
+{
+   /*
+    * Register variables with plotter.
+    */
+   if (d_allocate_data) {
+      writer.registerPlotQuantity("Distance to front", "SCALAR", d_dist_id);
+      writer.registerPlotQuantity("Tag value", "SCALAR", d_tag_id);
+   } else {
+      writer.registerDerivedPlotQuantity("Distance to front", "SCALAR", this,
+         // hier::IntVector(0),
+         1.0,
+         "NODE");
+      writer.registerDerivedPlotQuantity("Tag value", "SCALAR", this);
+   }
+   return 0;
+}
+#endif
+
+bool SinusoidalFrontTagger::packDerivedDataIntoDoubleBuffer(
+   double* buffer,
+   const hier::Patch& patch,
+   const hier::Box& region,
+   const std::string& variable_name,
+   int depth_index) const
+{
+   (void)region;
+   (void)depth_index;
+
+   TBOX_ASSERT(d_allocate_data == false);
+   if (variable_name == "Distance to front") {
+      pdat::NodeData<double> dist_data(patch.getBox(), 1, hier::IntVector(d_dim,
+                                          0));
+      computePatchData(patch, d_time, &dist_data, NULL);
+      for (pdat::NodeData<double>::Iterator ci(patch.getBox()); ci; ci++) {
+         *(buffer++) = dist_data(*ci);
+      }
+   } else if (variable_name == "Tag value") {
+      pdat::CellData<int> tag_data(patch.getBox(), 1, hier::IntVector(d_dim, 0));
+      computePatchData(patch, d_time, NULL, &tag_data);
+      for (pdat::CellData<double>::Iterator ci(patch.getBox()); ci; ci++) {
+         *(buffer++) = tag_data(*ci);
+      }
+   } else {
+      TBOX_ERROR("Unrecognized name " << variable_name);
+   }
+   return true;
+}
+
+void SinusoidalFrontTagger::setTime(
+   double time)
+{
+   d_time = time;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/SinusoidalFrontTagger.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/SinusoidalFrontTagger.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,245 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   SinusoidalFrontTagger class declaration 
+ *
+ ************************************************************************/
+#ifndef included_SinusoidalFrontTagger
+#define included_SinusoidalFrontTagger
+
+#include <string>
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Database.h"
+
+/*
+ * SAMRAI classes
+ */
+#include "SAMRAI/appu/VisItDataWriter.h"
+#include "SAMRAI/appu/VisDerivedDataStrategy.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/mesh/StandardTagAndInitStrategy.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/tbox/Timer.h"
+
+using namespace SAMRAI;
+
+/*!
+ * @brief Class to tag a sinusoidal "front" in given domain.
+ */
+class SinusoidalFrontTagger:
+   public mesh::StandardTagAndInitStrategy,
+   public appu::VisDerivedDataStrategy
+{
+
+public:
+   /*!
+    * @brief Constructor.
+    */
+   SinusoidalFrontTagger(
+      /*! Ojbect name */
+      const std::string& object_name,
+      const tbox::Dimension& dim,
+      /*! Input database */
+      SAMRAI::tbox::Database* database = NULL);
+
+   ~SinusoidalFrontTagger();
+
+   //@{ @name SAMRAI::mesh::StandardTagAndInitStrategy virtuals
+
+public:
+   /*!
+    * @brief Allocate and initialize data for a new level
+    * in the patch hierarchy.
+    *
+    * This is where you implement the code for initialize data on the
+    * grid.  Nevermind when it is called or where in the program that
+    * happens.  All the information you need to initialize the grid
+    * are in the arguments.
+    *
+    * @see SAMRAI::mesh::StandardTagAndInitStrategy::initializeLevelData()
+    */
+   virtual void
+   initializeLevelData(
+      /*! Hierarchy to initialize */
+      const tbox::Pointer<SAMRAI::hier::BasePatchHierarchy> hierarchy,
+      /*! Level to initialize */
+      const int level_number,
+      const double init_data_time,
+      const bool can_be_refined,
+      /*! Whether level is being introduced for the first time */
+      const bool initial_time,
+      /*! Level to copy data from */
+      const tbox::Pointer<SAMRAI::hier::BasePatchLevel> old_level =
+         tbox::Pointer<SAMRAI::hier::PatchLevel>((0)),
+      /*! Whether data on new patch needs to be allocated */
+      const bool allocate_data = true);
+
+   virtual void
+   resetHierarchyConfiguration(
+      /*! New hierarchy */
+      tbox::Pointer<SAMRAI::hier::BasePatchHierarchy> new_hierarchy,
+      /*! Coarsest level */ int coarsest_level,
+      /*! Finest level */ int finest_level);
+
+   virtual void
+   applyGradientDetector(
+      const tbox::Pointer<hier::BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double error_data_time,
+      const int tag_index,
+      const bool initial_time,
+      const bool uses_richardson_extrapolation);
+
+   //@}
+
+   void
+   initializePatchData(
+      hier::Patch& patch,
+      const double init_data_time,
+      const bool initial_time,
+      const bool allocate_data);
+
+   bool
+   packDerivedDataIntoDoubleBuffer(
+      double* buffer,
+      const hier::Patch& patch,
+      const hier::Box& region,
+      const std::string& variable_name,
+      int depth_index) const;
+
+   void
+   setTime(
+      double time);
+
+public:
+   /*!
+    * @brief Deallocate internally managed patch data on level.
+    */
+   void
+   deallocatePatchData(
+      hier::PatchLevel& level);
+
+   /*!
+    * @brief Deallocate internally managed patch data on hierarchy.
+    */
+   void
+   deallocatePatchData(
+      hier::PatchHierarchy& hierarchy);
+
+#ifdef HAVE_HDF5
+   /*!
+    * @brief Tell a VisIt plotter which data to write for this class.
+    */
+   int
+   registerVariablesWithPlotter(
+      appu::VisItDataWriter& writer);
+#endif
+
+   /*
+    * Compute patch data allocated by this class, on a hierarchy.
+    */
+   void
+   computeHierarchyData(
+      hier::PatchHierarchy& hierarchy,
+      double time);
+
+   /*!
+    * @brief Compute distance and tag data for a level.
+    */
+   void
+   computeLevelData(
+      const hier::PatchHierarchy& hierarchy,
+      const int ln,
+      const double time,
+      const int dist_id,
+      const int tag_id,
+      const tbox::Pointer<hier::PatchLevel>& old_level =
+         tbox::Pointer<hier::PatchLevel>()) const;
+
+   /*!
+    * @brief Compute distance and tag data for a patch.
+    */
+   void
+   computePatchData(
+      const hier::Patch& patch,
+      const double time,
+      pdat::NodeData<double>* dist_data,
+      pdat::CellData<int>* tag_data) const;
+
+private:
+   std::string d_name;
+
+   const tbox::Dimension d_dim;
+
+   tbox::Pointer<hier::PatchHierarchy> d_hierarchy;
+
+   /*!
+    * @brief Period of sinusoid.
+    */
+   double d_period[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   /*!
+    * @brief Initial displacement.
+    */
+   double d_init_disp[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   /*!
+    * @brief Front velocity.
+    */
+   double d_velocity[tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   /*!
+    * @brief Amplitude of sinusoid.
+    */
+   double d_amplitude;
+
+   /*!
+    * @brief ghost cell width of internal data.
+    *
+    * Optional.  Meant to influence gridding parameters.  Defaults to zero.
+    */
+   hier::IntVector d_ghost_cell_width;
+
+   /*!
+    * @brief Number of cells to tag around cells intersecting the front.
+    */
+   hier::IntVector d_buffer_cells;
+
+   tbox::Array<double> d_buffer_space;
+
+   tbox::Pointer<hier::VariableContext> d_context;
+
+   /*!
+    * @brief Distance from the front in the x direction.
+    */
+   int d_dist_id;
+   /*!
+    * @brief Value of tag based on distance from front.
+    */
+   int d_tag_id;
+
+   /*!
+    * @brief Whether to allocate data on the mesh.
+    */
+   bool d_allocate_data;
+
+   /*!
+    * @brief Front time.
+    */
+   double d_time;
+
+   tbox::Pointer<tbox::Timer> t_setup;
+   tbox::Pointer<tbox::Timer> t_node_pos;
+   tbox::Pointer<tbox::Timer> t_distance;
+   tbox::Pointer<tbox::Timer> t_tag_cells;
+   tbox::Pointer<tbox::Timer> t_copy;
+
+};
+
+#endif  // included_ssup_SinusoidalFrontTagger
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/fortran/2d/flux2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/fortran/2d/flux2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,229 @@
+define(NDIM,2)dnl
+define(NEQU,1)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+include(FORTDIR/2d/m4flux2d.i)dnl
+
+      subroutine fluxcorrec2d(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  dx,
+     &  advecspeed,uval,
+     &  flux0,flux1,
+     &  trlft0,trlft1,
+     &  trrgt0,trrgt1)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      REAL dt 
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     advecspeed(0:NDIM-1),
+     &     uval(CELL2d(ifirst,ilast,CELLG)),
+     &     flux0(FACE2d0(ifirst,ilast,FLUXG)),
+     &     flux1(FACE2d1(ifirst,ilast,FLUXG)), 
+     &     trlft0(FACE2d0(ifirst,ilast,FACEG)),
+     &     trrgt0(FACE2d0(ifirst,ilast,FACEG)),
+     &     trlft1(FACE2d1(ifirst,ilast,FACEG)),
+     &     trrgt1(FACE2d1(ifirst,ilast,FACEG))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1
+      REAL trnsvers
+     
+c     write(6,*) "In fluxcorrec()"
+c     ******************************************************************
+c     * complete tracing at cell edges
+c     ******************************************************************
+c   correct the 1-direction with 0-fluxes
+c     write(6,*) " correct the 1-direction with 0-fluxes"
+      do ic1=ifirst1-1,ilast1+1
+        do ic0=ifirst0-1,ilast0+1
+          trnsvers= (flux0(ic0+1,ic1)-flux0(ic0,ic1))*0.5/dx(0)
+
+          trrgt1(ic1  ,ic0)= trrgt1(ic1  ,ic0) - trnsvers
+          trlft1(ic1+1,ic0)= trlft1(ic1+1,ic0) - trnsvers
+        enddo
+      enddo
+c     call flush(6)     
+
+c   correct the 0-direction with 1-fluxes
+c     write(6,*) " correct the 0-direction with 1-fluxes"
+      do ic0=ifirst0-1,ilast0+1
+        do ic1=ifirst1-1,ilast1+1
+          trnsvers= (flux1(ic1+1,ic0)-flux1(ic1,ic0))*0.5/dx(1)
+          trrgt0(ic0  ,ic1)= trrgt0(ic0  ,ic1) - trnsvers
+          trlft0(ic0+1,ic1)= trlft0(ic0+1,ic1) - trnsvers
+        enddo
+      enddo
+c     call flush(6)     
+      return
+      end   
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine fluxcalculation2d(dt,extra_cell,visco,dx,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  advecspeed,
+     &  uval,
+     &  flux0,flux1,
+     &  trlft0,trlft1,trrgt0,trrgt1)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,extra_cell,visco
+      REAL dt 
+      REAL 
+     &     dx(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     advecspeed(0:NDIM-1),
+     &     uval(CELL2d(ifirst,ilast,CELLG)),
+c variables in 2d side indexed         
+     &     flux0(FACE2d0(ifirst,ilast,FLUXG)),
+     &     flux1(FACE2d1(ifirst,ilast,FLUXG)), 
+     &     trlft0(FACE2d0(ifirst,ilast,FACEG)),
+     &     trrgt0(FACE2d0(ifirst,ilast,FACEG)),
+     &     trlft1(FACE2d1(ifirst,ilast,FACEG)),
+     &     trrgt1(FACE2d1(ifirst,ilast,FACEG))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ie0,ie1
+      REAL   riemst
+c
+c***********************************************************************
+c solve riemann problems for conservative flux
+c  arguments: ( axis for RP, other axis, extra cells-direction)
+c***********************************************************************
+c      
+c     write(6,*) "In fluxcalculation(",extra_cell,")"
+c     write(6,*) "ifirst0,ilast0,ifirst1,ilast1,extra_cell",
+c    &       ifirst0,ilast0,ifirst1,ilast1,extra_cell
+
+riemann_solve(0,1,extra_cell)dnl
+c
+riemann_solve(1,0,extra_cell)dnl
+
+      if (visco.eq.1) then
+      write(6,*) "doing artificial viscosity"
+c
+crtificial_viscosity1(0,1)dnl
+c
+crtificial_viscosity1(1,0)dnl
+c
+      endif
+c     call flush(6)     
+      return
+      end 
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+  
+      subroutine consdiff2d(ifirst0,ilast0,ifirst1,ilast1,
+     &  dx,
+     &  flux0,flux1,
+     &  advecspeed,uval)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+      integer ifirst0, ilast0,ifirst1, ilast1
+      REAL dx(0:NDIM-1)
+      REAL
+     &     flux0(FACE2d0(ifirst,ilast,FLUXG)),
+     &     flux1(FACE2d1(ifirst,ilast,FLUXG)),
+     &     advecspeed(0:NDIM-1),
+     &     uval(CELL2d(ifirst,ilast,CELLG))
+c
+      integer ic0,ic1
+      
+c***********************************************************************
+c update velocity to full time
+c note the reversal of indices in 2nd coordinate direction
+c***********************************************************************
+c***********************************************************************
+c     write(6,*) "at top of consdiff"
+c         call flush(6)
+c     write(6,*) "flux0"
+c     do  ic1=ifirst1,ilast1
+c       do  ic0=ifirst0,ilast0+1
+c         write(6,*) "ic0,flux0= ",ic0,ic1,
+c    &			flux0(ic0,ic1,1),flux0(ic0,ic1,2),
+c    &                  flux0(ic0,ic1,3),flux0(ic0,ic1,4)
+c         call flush(6)
+c       enddo
+c     enddo
+c     write(6,*) "flux1"
+c     do  ic1=ifirst1,ilast1
+c       do  ic0=ifirst0,ilast0+1
+c         write(6,*) "ic0,flux1= ",ic0,ic1,
+c    &			flux1(ic0,ic1,1),flux1(ic0,ic1,2),
+c    &                  flux1(ic0,ic1,3),flux1(ic0,ic1,4)
+c         call flush(6)
+c       enddo
+c     enddo
+c     do  ic1=ifirst1,ilast1
+c       do  ic0=ifirst0,ilast0
+c         write(6,*) "ic0,ic1,all = ",ic0,ic1,
+c    &                        density(ic0,ic1),
+c    &                        velocity(ic0,ic1,1),velocity(ic0,ic1,2),
+c    &                        pressure(ic0,ic1)
+c         call flush(6)
+c       enddo
+c     enddo
+c***********************************************************************
+      do ic1=ifirst1,ilast1
+        do ic0=ifirst0,ilast0
+          uval(ic0,ic1) = uval(ic0,ic1)
+     &          -(flux0(ic0+1,ic1)-flux0(ic0,ic1))/dx(0)
+     &          -(flux1(ic1+1,ic0)-flux1(ic1,ic0))/dx(1)
+        enddo
+      enddo
+c***********************************************************************
+c     write(6,*) "in consdiff"
+c     do  ic1=ifirst1,ilast1+1
+c       do  ic0=ifirst0,ilast0+1
+c         write(6,*) "ic0,ic1,flux0= ",ic0,ic1,
+c    &                        flux0(ic0,ic1,1),flux0(ic0,ic1,2),
+c    &                        flux0(ic0,ic1,3),flux0(ic0,ic1,4) 
+c         call flush(6)
+c       enddo
+c     enddo
+c     do  ic1=ifirst1,ilast1+1
+c       do  ic0=ifirst0,ilast0+1
+c         write(6,*) "ic0,ic1,flux1= ",ic0,ic1,
+c    &                        flux1(ic0,ic1,1),flux1(ic0,ic1,2),
+c    &                        flux1(ic0,ic1,3),flux1(ic0,ic1,4) 
+c         call flush(6)
+c       enddo
+c     enddo
+c***********************************************************************
+c***********************************************************************
+c     do  ic1=ifirst1,ilast1
+c       do  ic0=ifirst0,ilast0
+c         write(6,*) "ic0,ic1,all = ",ic0,ic1,
+c    &                        density(ic0,ic1),
+c    &                        velocity(ic0,ic1,1),velocity(ic0,ic1,2),
+c    &                        momentum(ic0,ic1,1),momentum(ic0,ic1,2),
+c    &                        pressure(ic0,ic1),
+c    &                        energy(ic0,ic1)
+c         call flush(6)
+c       enddo
+c     enddo
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/fortran/2d/grad2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/fortran/2d/grad2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,212 @@
+define(NDIM,2)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+
+      subroutine detectgrad2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  vghost0,tagghost0,ttagghost0,
+     &  vghost1,tagghost1,ttagghost1,
+     &  dx,
+     &  gradtol,
+     &  dotag,donttag,
+     &  var,
+     &  tags,temptags)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c input arrays:
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  dotag,donttag,
+     &  vghost0,vghost1,
+     &  tagghost0,tagghost1,
+     &  ttagghost0,ttagghost1
+      REAL
+     &  dx(0:NDIM-1),
+     &  gradtol
+c variables indexed as 2dimensional
+      REAL
+     &  var(CELL2dVECG(ifirst,ilast,vghost))
+      integer
+     &  tags(CELL2dVECG(ifirst,ilast,tagghost)),
+     &  temptags(CELL2dVECG(ifirst,ilast,ttagghost))
+c
+      REAL tol
+      REAL facejump, loctol
+      REAL presm1,presp1,diag01
+      logical tagcell
+      integer ic0,ic1
+c
+c***********************************************************************
+c
+      tol = gradtol
+      diag01 = sqrt(dx(0)**2+dx(1)**2)
+
+      do ic1=ifirst1,ilast1
+        do ic0=ifirst0,ilast0
+
+          if (tags(ic0,ic1) .ne. 0) then
+            loctol = 0.125*tol
+          else 
+            loctol = tol
+          endif
+   
+          tagcell = .false.
+
+          presm1 = var(ic0-1,ic1)
+          presp1 = var(ic0+1,ic1)
+          facejump = abs(var(ic0,ic1)-presm1)
+          facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+          tagcell = ((facejump).gt.(loctol*dx(0)))
+          if (.not.tagcell) then
+            presm1 = var(ic0,ic1-1)
+            presp1 = var(ic0,ic1+1)
+            facejump = abs(var(ic0,ic1)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+            tagcell = ((facejump).gt.(loctol*dx(1)))
+          endif
+
+          if (.not.tagcell) then
+            presm1 = var(ic0-1,ic1-1)
+            presp1 = var(ic0+1,ic1+1)
+            facejump = abs(var(ic0,ic1)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+            tagcell = ((facejump).gt.(loctol*diag01))
+          endif
+          if (.not.tagcell) then
+            presm1 = var(ic0-1,ic1+1)
+            presp1 = var(ic0+1,ic1-1)
+            facejump = abs(var(ic0,ic1)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+            tagcell = ((facejump).gt.(loctol*diag01))
+          endif
+
+          if ( tagcell ) then
+            temptags(ic0,ic1) = dotag
+          endif
+        enddo
+      enddo
+      return
+      end
+
+      subroutine detectshock2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  vghost0,tagghost0,ttagghost0,
+     &  vghost1,tagghost1,ttagghost1,
+     &  dx,
+     &  gradtol,gradonset,
+     &  dotag,donttag,
+     &  var,
+     &  tags,temptags)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c input arrays:
+      integer
+     &  ifirst0,ifirst1,ilast0,ilast1,
+     &  dotag,donttag,
+     &  vghost0,vghost1,
+     &  tagghost0,tagghost1,
+     &  ttagghost0,ttagghost1
+      REAL
+     &  dx(0:NDIM-1),
+     &  gradtol,gradonset
+c variables indexed as 2dimensional
+      REAL
+     &  var(CELL2dVECG(ifirst,ilast,vghost))
+      integer
+     &  tags(CELL2dVECG(ifirst,ilast,tagghost)),
+     &  temptags(CELL2dVECG(ifirst,ilast,ttagghost))
+c
+      REAL tol,onset
+      REAL jump1, jump2, facejump, loctol,locon
+      REAL presm1,presm2,presp1,presp2
+      REAL diag01 
+      logical tagcell
+      integer ic0,ic1
+c
+c***********************************************************************
+c
+      tol = gradtol
+      onset = gradonset
+      diag01 = sqrt(dx(0)**2+dx(1)**2)
+
+      do ic1=ifirst1,ilast1
+        do ic0=ifirst0,ilast0
+
+          if (tags(ic0,ic1) .ne. 0) then
+            loctol = 0.125*tol
+            locon = 0.66*onset
+          else 
+            loctol = tol
+            locon = onset
+          endif
+   
+          tagcell = .false.
+
+          presm1 = var(ic0-1,ic1)
+          presm2 = var(ic0-2,ic1)
+          presp1 = var(ic0+1,ic1)
+          presp2 = var(ic0+2,ic1)
+          jump2 = presp2-presm2
+          jump1 = presp1-presm1
+          facejump = abs(var(ic0,ic1)-presm1)
+          facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+          tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                ((jump1*jump2).lt.zero)).and.
+     &               ((facejump).gt.(loctol*dx(0))))
+          if (.not.tagcell) then
+            presm1 = var(ic0,ic1-1)
+            presm2 = var(ic0,ic1-2)
+            presp1 = var(ic0,ic1+1)
+            presp2 = var(ic0,ic1+2)
+            jump2 = presp2-presm2
+            jump1 = presp1-presm1
+            facejump = abs(var(ic0,ic1)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+            tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                ((jump1*jump2).lt.zero)).and.
+     &               ((facejump).gt.(loctol*dx(1)))) 
+          endif
+
+          if (.not.tagcell) then
+            presm1 = var(ic0-1,ic1-1)
+            presp1 = var(ic0+1,ic1+1)
+            presm2 = var(ic0-2,ic1-2)
+            presp2 = var(ic0+2,ic1+2)
+            jump1 = presp1-presm1
+            jump2 = presp2-presm2
+            facejump = abs(var(ic0,ic1)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+            tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag01)))
+          endif
+          if (.not.tagcell) then
+            presm1 = var(ic0-1,ic1+1)
+            presp1 = var(ic0+1,ic1-1)
+            presm2 = var(ic0-2,ic1+2)
+            presp2 = var(ic0+2,ic1-2)
+            jump1 = presp1-presm1
+            jump2 = presp2-presm2
+            facejump = abs(var(ic0,ic1)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1)-presp1))
+            tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag01)))
+          endif
+
+          if ( tagcell ) then
+            temptags(ic0,ic1) = dotag
+          endif
+        enddo
+      enddo
+      return
+      end
+
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/fortran/2d/init2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/fortran/2d/init2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,224 @@
+define(NDIM,2)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+      subroutine linadvinit2d(data_problem,dx,xlo,xhi,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  gcw0,gcw1,
+     &  uval,
+     &  nintervals,front,
+     &  i_uval)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer gcw0,gcw1
+      integer data_problem
+      integer nintervals
+      REAL front(1:nintervals)
+      REAL 
+     &     dx(0:NDIM-1),xlo(0:NDIM-1),xhi(0:NDIM-1)
+      REAL
+     &     i_uval(1:nintervals)
+      REAL
+     &     uval(CELL2dVECG(ifirst,ilast,gcw))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,dir,ifr
+      REAL xc(0:NDIM-1)
+c
+c   dir 0 two linear states (L,R) indp of y,z
+c   dir 1 two linear states (L,R) indp of x,z
+
+c     write(6,*) "Inside initplane"
+c     write(6,*) "data_problem= ",data_problem
+c     write(6,*) "dx= ",dx(0), dx(1)
+c     write(6,*) "xlo= ",xlo(0), xlo(1),", xhi = ",xhi(0), xhi(1)
+c     write(6,*) "ifirst, ilast= ",ifirst0,ilast0,"and ",ifirst1,ilast1
+c     call flush(6)
+
+      dir = 0
+      if (data_problem.eq.PIECEWISE_CONSTANT_X) then
+         dir = 0
+      else if (data_problem.eq.PIECEWISE_CONSTANT_Y) then
+         dir = 1
+      endif
+
+      if (dir.eq.0) then
+         ifr = 1
+         do ic0=ifirst0,ilast0
+            xc(0) = xlo(0) + dx(0)*(dble(ic0-ifirst0)+half)
+            if (xc(dir).gt.front(ifr)) then
+              ifr = ifr+1
+            endif
+            do ic1=ifirst1,ilast1
+               uval(ic0,ic1) = i_uval(ifr)
+           enddo
+         enddo
+      else if (dir.eq.1) then
+         ifr = 1
+         do ic1=ifirst1,ilast1
+            xc(1) =xlo(1)+ dx(1)*(dble(ic1-ifirst1)+half)
+            if (xc(dir).gt.front(ifr)) then
+               ifr = ifr+1
+            endif
+            do ic0=ifirst0,ilast0
+               uval(ic0,ic1) = i_uval(ifr)
+           enddo
+         enddo
+      endif
+c
+      return
+      end
+
+c***********************************************************************
+c
+c    Initialization routine where we use a spherical profile 
+c
+c***********************************************************************
+      subroutine initsphere2d(data_problem,dx,xlo,xhi,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  gcw0,gcw1,
+     &  uval,
+     &  i_uval,o_uval,
+     &  center,radius)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer gcw0,gcw1
+      integer data_problem
+      REAL i_uval,o_uval
+      REAL radius,center(0:NDIM-1)
+      REAL 
+     &     dx(0:NDIM-1),xlo(0:NDIM-1),xhi(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     uval(CELL2dVECG(ifirst,ilast,gcw))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1
+      REAL xc(0:NDIM-1),x0,x1
+      REAL angle
+
+c     write(6,*) "in initsphere"
+c     write(6,*) "data_problem= ",data_problem
+c     write(6,*) "dx = ",(dx(i),i=0,NDIM-1)
+c     write(6,*) "xlo = ",(xlo(i),i=0,NDIM-1)
+c     write(6,*) "xhi = ",(xhi(i),i=0,NDIM-1)
+c     write(6,*) "ce = ",(ce(i),i=0,NDIM-1)
+c     write(6,*) "radius = ",radius
+c     write(6,*) "ifirst0,ilast0 = ",ifirst0,ilast0
+c     write(6,*) "ifirst1,ilast1 = ",ifirst1,ilast1
+c
+
+      do ic1=ifirst1,ilast1
+        xc(1) = xlo(1)+dx(1)*(dble(ic1-ifirst1)+half)
+        x1 = xc(1)-center(1)
+        do ic0=ifirst0,ilast0
+           xc(0) = xlo(0)+dx(0)*(dble(ic0-ifirst0)+half)
+           x0 = xc(0)-center(0)
+           if (x1.eq.zero .and. x0.eq.zero) then
+              angle = zero
+           else
+              angle = atan2(x1,x0)
+           endif
+           if ((x0**2+x1**2).lt.radius**2) then
+              uval(ic0,ic1) = i_uval
+           else
+              uval(ic0,ic1) = o_uval
+           endif
+         enddo
+      enddo
+c
+      return
+      end
+
+c***********************************************************************
+c
+c   Sine profile
+c
+c***********************************************************************
+ 
+      subroutine linadvinitsine2d(data_problem,dx,xlo,
+     &  domain_xlo,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  gcw0,gcw1,
+     &  uval,
+     &  nintervals,front,
+     &  i_uval,
+     &  amplitude)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer gcw0,gcw1
+      integer data_problem
+      integer nintervals
+      REAL
+     &     dx(0:NDIM-1),xlo(0:NDIM-1),
+     &     domain_xlo(0:NDIM-1)
+      REAL front(1:nintervals)
+      REAL i_uval(1:nintervals)
+      REAL amplitude,period(0:NDIM-1)
+c variables in 2d cell indexed
+      REAL
+     &     uval(CELL2dVECG(ifirst,ilast,gcw))
+c
+c***********************************************************************
+c
+      integer ic0,ic1,j,ifr
+      REAL xc(0:NDIM-1),xmid(1:10)
+      REAL coef(0:NDIM-1),coscoef(1:2)
+c
+c     write(6,*) "Inside eulerinitsine"
+c     write(6,*) "data_problem= ",data_problem
+c     write(6,*) "dx= ",dx(0), dx(1)
+c     write(6,*) "mc= ",mc(0), mc(1)
+c     write(6,*) "xlo= ",xlo(0), xlo(1),", xhi = ",xhi(0), xhi(1)
+c     write(6,*) "ifirst, ilast= ",ifirst0,ilast0,ifirst1,ilast1
+c     write(6,*) "gamma= ",gamma
+c     call flush(6)
+ 
+      if (data_problem.eq.SINE_CONSTANT_Y) then
+         write(6,*) "Sorry, Y direction not implemented :-("
+         return
+      endif
+ 
+      coef(0) = zero
+      do j=1,NDIM-1
+        coef(j) = two*pi/period(j)
+      enddo
+ 
+      do ic1=ifirst1,ilast1
+        xc(1) = xlo(1)+dx(1)*(dble(ic1-ifirst1)+half)
+        coscoef(1) = amplitude*
+     &         cos((xc(1)-domain_xlo(1))*coef(1))
+        do j=1,(nintervals-1)
+           xmid(j) = front(j) + coscoef(1)
+        enddo
+        do ic0=ifirst0,ilast0
+           xc(0) = xlo(0)+dx(0)*(dble(ic0-ifirst0)+half)
+           ifr = 1
+           do j=1,(nintervals-1)
+              if( xc(0) .gt. xmid(j) ) ifr = j+1
+           enddo
+           uval(ic0,ic1) = i_uval(ifr)
+        enddo
+      enddo
+ 
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/fortran/2d/m4flux2d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/fortran/2d/m4flux2d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,22 @@
+define(riemann_solve,`dnl
+c     write(6,*) "checking onedr sol in riemann solve  "
+c     write(6,*) "         dt= ",dt
+c     write(6,*) "  calculating flux$1, 1+extra_cell= ",$3
+c     write(6,*) "  ic$2=",ifirst$2-1-$3,ilast$2+1+$3
+c     write(6,*) "  ie$1=",ifirst$1-1-$3,ilast$1+1+1+$3
+        do ic$2=ifirst$2-$3,ilast$2+$3
+          do ie$1=ifirst$1-$3,ilast$1+1+$3
+ 
+            if (advecspeed($1).ge.zero) then
+               riemst= trlft$1(ie$1,ic$2)
+             else
+               riemst= trrgt$1(ie$1,ic$2)
+             endif
+ 
+            flux$1(ie$1,ic$2)= dt*riemst*advecspeed($1)
+c           write(6,*) "   flux$1(",ie$1,ic$2,")= ",flux$1(ie$1,ic$2,1),
+c    &                   flux$1(ie$1,ic$2,2),
+c    &          flux$1(ie$1,ic$2,3),flux$1(ie$1,ic$2,4)
+          enddo
+        enddo
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/fortran/2d/m4trace2d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/fortran/2d/m4trace2d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,33 @@
+define(trace_init,`dnl
+         do  ic$2=ifirst$2-FACEG,ilast$2+FACEG
+           ie$1=ifirst$1-FACEG
+           tracergt$1(ie$1,ic$2)=uval($5)
+           tracelft$1(ie$1,ic$2)=uval($5)
+
+           do  ie$1=ifirst$1+1-FACEG,ilast$1+FACEG
+             tracelft$1(ie$1,ic$2)=uval($4)
+             tracergt$1(ie$1,ic$2)=uval($5)
+           enddo
+
+           ie$1=ilast$1+FACEG+1
+           tracelft$1(ie$1,ic$2)=uval($4)
+           tracergt$1(ie$1,ic$2)=uval($4)
+         enddo
+')dnl
+define(trace_call,`dnl
+          do ic$2=ifirst$2-2,ilast$2+2
+            do ic$1=ifirst$1-FACEG,ilast$1+FACEG
+                ttraclft(ic$1) = tracelft(ic$1,ic$2)
+                ttracrgt(ic$1) = tracergt(ic$1,ic$2)
+            enddo
+
+            call trace(dt,ifirst$1,ilast$1,mc,
+     &        dx,idir,advecspeed,igdnv,
+     &        ttraclft,ttracrgt,
+     &        ttcelslp,ttedgslp)
+            do ic$1=ifirst$1-FACEG,ilast$1+FACEG
+                tracelft(ic$1,ic$2) = ttraclft(ic$1)
+                tracergt(ic$1,ic$2) = ttracrgt(ic$1)
+            enddo
+          enddo
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/fortran/2d/stable2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/fortran/2d/stable2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,44 @@
+define(NDIM,2)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+      subroutine stabledt2d(dx,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  ngc0,ngc1,
+     &  advecspeed,uval,stabdt)
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+include(FORTDIR/const.i)dnl
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      REAL stabdt,dx(0:NDIM-1)
+      integer ifirst0,ilast0,ifirst1,ilast1,ngc0,ngc1
+c
+      REAL  
+     &  advecspeed(0:NDIM-1),
+     &  uval(CELL2dVECG(ifirst,ilast,ngc))
+c    
+      REAL maxspeed(0:NDIM-1)
+c
+      maxspeed(0)=zero
+      maxspeed(1)=zero
+
+      maxspeed(0) = max(maxspeed(0), abs(advecspeed(0)))
+      maxspeed(1) = max(maxspeed(1), abs(advecspeed(1)))
+
+c     Do the following with checks for zero
+c      stabdt = min((dx(1)/maxspeed(1)),(dx(0)/maxspeed(0)))      
+
+      if ( maxspeed(0) .EQ. 0.0 ) then
+         if( maxspeed(1) .EQ. 0.0 ) then
+            stabdt = 1.0E9
+         else 
+            stabdt = dx(1)/maxspeed(1)
+         endif
+      elseif ( maxspeed(1) .EQ. 0.0 ) then
+            stabdt = dx(0)/maxspeed(0) 
+      else
+         stabdt = min((dx(1)/maxspeed(1)),(dx(0)/maxspeed(0)))
+      endif
+      
+      return
+      end 
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/fortran/2d/stufprobc2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/fortran/2d/stufprobc2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,28 @@
+      subroutine stufprobc2d(
+     &  PIECEWISE_CONSTANT_Xin,PIECEWISE_CONSTANT_Yin,
+     &  PIECEWISE_CONSTANT_Zin,
+     &  SINE_CONSTANT_Xin,SINE_CONSTANT_Yin,SINE_CONSTANT_Zin,
+     &  SPHEREin,
+     &  CELLGin,FACEGin,FLUXGin)
+      implicit none
+      integer 
+     &  PIECEWISE_CONSTANT_Xin,PIECEWISE_CONSTANT_Yin,
+     &  PIECEWISE_CONSTANT_Zin,
+     &  SINE_CONSTANT_Xin,SINE_CONSTANT_Yin,SINE_CONSTANT_Zin,
+     &  SPHEREin,
+     &  CELLGin,FACEGin,FLUXGin
+include(FORTDIR/probparams.i)dnl
+
+      PIECEWISE_CONSTANT_X=PIECEWISE_CONSTANT_Xin
+      PIECEWISE_CONSTANT_Y=PIECEWISE_CONSTANT_Yin
+      PIECEWISE_CONSTANT_Z=PIECEWISE_CONSTANT_Zin
+      SINE_CONSTANT_X=SINE_CONSTANT_Xin
+      SINE_CONSTANT_Y=SINE_CONSTANT_Yin  
+      SINE_CONSTANT_Z=SINE_CONSTANT_Zin
+      SPHERE=SPHEREin
+      CELLG=CELLGin
+      FACEG=FACEGin
+      FLUXG=FLUXGin
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/fortran/2d/trace1d2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/fortran/2d/trace1d2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,94 @@
+define(NEQU,1)dnl
+define(REAL,`double precision')dnl
+
+      subroutine trace(dt,ifirst,ilast,mc,
+     &  dx,dir,advecspeed,igdnv,
+     &  tracelft,tracergt,
+     &  celslope,edgslope)
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+include(FORTDIR/probparams.i)dnl
+include(FORTDIR/const.i)dnl
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      REAL dt
+      integer ifirst,ilast,mc,dir,igdnv
+      REAL dx,advecspeed
+c
+      REAL
+     &  celslope(ifirst-CELLG:ifirst+mc-1+CELLG),
+c       side variables
+     &  tracelft(ifirst-FACEG:ifirst+mc+FACEG),
+     &  tracergt(ifirst-FACEG:ifirst+mc+FACEG),
+     &  edgslope(ifirst-FACEG:ifirst+mc+FACEG)
+c
+      integer ie,ic
+      REAL bound,coef4,slope2,dtdx,slope4
+      REAL du,nu
+c
+c***********************************************************************
+c     ******************************************************************
+c     * check for inflection points in characteristic speeds
+c     * compute slopes at cell edges
+c     * zero slopes if neighboring cells have different loading
+c     ******************************************************************
+      do ie=ifirst+1-FACEG,ilast+FACEG
+          edgslope(ie)=tracergt(ie)-tracelft(ie)
+      enddo
+c     ******************************************************************
+c     * limit slopes
+c     ******************************************************************
+        do ic=ifirst+1-CELLG,ilast+CELLG-1
+          celslope(ic)=zero
+        enddo
+      if (igdnv.eq.2) then
+c       write(6,*) "second-order slopes"
+c       ****************************************************************
+c       * second-order slopes
+c       ****************************************************************
+          do ic=ifirst+1-CELLG,ilast+CELLG-1
+            slope2=half*(edgslope(ic)+edgslope(ic+1))
+            celslope(ic)=half*(edgslope(ic)+edgslope(ic+1))
+            if (edgslope(ic)*edgslope(ic+1).le.zero) then
+              celslope(ic)=zero
+            else
+              bound=min(abs(edgslope(ic)),abs(edgslope(ic+1)))
+              celslope(ic)=sign(min(two*bound,abs(slope2)),slope2)
+            endif
+c            write(6,*) "ic,celslope= ", ic,celslope(ic)
+c            call flush(6)
+          enddo
+      else if (igdnv.eq.4) then
+c       write(6,*) "fourth-order slopes"
+c       ****************************************************************
+c       * fourth-order slopes
+c       ****************************************************************
+          do ic=ifirst+2-CELLG,ilast+CELLG-2
+            slope4=fourth*(tracergt(ic+2)-tracergt(ic-2))
+            celslope(ic)=half*(edgslope(ic)+edgslope(ic+1))
+            coef4=third*(four*celslope(ic)-slope4)
+            if (edgslope(ic)*edgslope(ic+1).le.zero .or.
+     &      coef4*celslope(ic).lt.zero) then
+              celslope(ic)=zero
+            else
+              bound=min(abs(edgslope(ic)),abs(edgslope(ic+1)))
+              celslope(ic)=sign(min(two*bound,abs(coef4)),coef4)
+            endif
+          enddo
+      endif
+c     ******************************************************************
+c     * characteristic projection
+c     ******************************************************************
+      dtdx=dt/dx
+      nu = advecspeed*dtdx
+      do ic=ifirst-1,ilast+1
+        du = celslope(ic)
+        if (nu.gt.0) then
+          tracelft(ic+1) = tracelft(ic+1) + half*(one -nu)*du
+          tracergt(ic) = tracergt(ic)
+        else
+          tracelft(ic+1) = tracelft(ic+1)
+          tracergt(ic) = tracergt(ic) -half*(one + nu)*du
+        endif
+      enddo
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/fortran/2d/trace2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/fortran/2d/trace2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,158 @@
+define(NDIM,2)dnl
+define(NEQU,4)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+include(FORTDIR/2d/m4trace2d.i)dnl
+
+      subroutine inittraceflux2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  uval,
+     &  tracelft0,tracelft1,
+     &  tracergt0,tracergt1,
+     &  fluxriem0,fluxriem1)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      REAL
+     &     uval(CELL2d(ifirst,ilast,CELLG)),
+     &     fluxriem0(FACE2d0(ifirst,ilast,FLUXG)),
+     &     tracelft0(FACE2d0(ifirst,ilast,FACEG)),
+     &     tracergt0(FACE2d0(ifirst,ilast,FACEG)),
+     &     fluxriem1(FACE2d1(ifirst,ilast,FLUXG)),
+     &     tracelft1(FACE2d1(ifirst,ilast,FACEG)),
+     &     tracergt1(FACE2d1(ifirst,ilast,FACEG))
+c***********************************************************************
+c initialize left and right states at cell edges
+c (first-order upwind)
+c***********************************************************************
+c
+      integer ic0,ic1,ie0,ie1
+c*********************************************************************** 
+
+trace_init(0,1,2,`ie0-1,ic1',`ie0,ic1')dnl
+ 
+trace_init(1,0,2,`ic0,ie1-1',`ic0,ie1')dnl
+ 
+c
+c     we initialize the flux to be zero
+
+      do ic1=ifirst1-FLUXG,ilast1+FLUXG
+        do ie0=ifirst0-FLUXG,ilast0+FLUXG+1
+            fluxriem0(ie0,ic1) = zero
+        enddo
+      enddo
+c
+      do ic0=ifirst0-FLUXG,ilast0+FLUXG
+        do ie1=ifirst1-FLUXG,ilast1+FLUXG+1
+            fluxriem1(ie1,ic0) = zero
+        enddo
+      enddo
+c
+c     call flush(6)
+      return
+      end 
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine chartracing2d0(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  mc,
+     &  dx,
+     &  advecspeed,igdnv,
+     &  uval,
+     &  tracelft,tracergt,
+     &  ttcelslp,ttedgslp, 
+     &  ttraclft,ttracrgt)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer mc,igdnv
+      REAL dt 
+c variables in 1d axis indexed
+      REAL 
+     &     dx,advecspeed
+c variables in 2d axis indexed         
+      REAL
+     &     uval(CELL2d(ifirst,ilast,CELLG)),
+     &     tracelft(FACE2d0(ifirst,ilast,FACEG)),
+     &     tracergt(FACE2d0(ifirst,ilast,FACEG))
+c  side variables ifirst0 to ifirst0+mc plus ghost cells
+      REAL
+     &  ttedgslp(ifirst0-FACEG:ifirst0+mc+FACEG),
+     &  ttraclft(ifirst0-FACEG:ifirst0+mc+FACEG),
+     &  ttracrgt(ifirst0-FACEG:ifirst0+mc+FACEG)
+c  cell variables ifirst0 to ifirst0+mc-1 plus ghost cells
+      REAL 
+     &  ttcelslp(ifirst0-CELLG:ifirst0+mc-1+CELLG)
+c***********************************************************************
+c
+      integer ic0,ic1,idir
+c*********************************************************************** 
+c***********************************************************************
+c trace higher order states at cell edges
+c***********************************************************************
+      idir = 0
+trace_call(0,1)dnl
+c***********************************************************************
+      return
+      end
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine chartracing2d1(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  mc,
+     &  dx,
+     &  advecspeed,igdnv,
+     &  uval,
+     &  tracelft,tracergt,
+     &  ttcelslp,ttedgslp,  
+     &  ttraclft,ttracrgt)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer mc,igdnv
+      REAL dt
+c variables in 1d axis indexed
+      REAL 
+     &     dx,advecspeed
+c variables in 2d axis indexed         
+      REAL
+     &     uval(CELL2d(ifirst,ilast,CELLG)),
+     &     tracelft(FACE2d1(ifirst,ilast,FACEG)),
+     &     tracergt(FACE2d1(ifirst,ilast,FACEG))
+c  side variables ifirst1 to ifirst1+mc plus ghost cells
+      REAL
+     &  ttedgslp(ifirst1-FACEG:ifirst1+mc+FACEG),
+     &  ttraclft(ifirst1-FACEG:ifirst1+mc+FACEG),
+     &  ttracrgt(ifirst1-FACEG:ifirst1+mc+FACEG)
+c  cell variables ifirst1 to ifirst1+mc-1 plus ghost cells
+      REAL 
+     &  ttcelslp(ifirst1-CELLG:ifirst1+mc-1+CELLG)
+c***********************************************************************
+c
+      integer ic0,ic1,idir
+c*********************************************************************** 
+c***********************************************************************
+c trace higher order states at cell edges
+c***********************************************************************
+      idir = 1
+trace_call(1,0)dnl
+c***********************************************************************
+      return
+      end
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/fortran/3d/bdry3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/fortran/3d/bdry3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,285 @@
+define(NDIM,3)dnl
+define(REAL,`double precision')dnl
+define(PARAMDIR,SAMRAI_FORTDIR/../examples/LinAdv/fortran)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+include(FORTDIR/m4bdry.i)dnl
+c~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+c bcceglobal is called before riemnv to set boundary values for left and
+c   right states in riemann problem.
+c
+c~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+c******************************************************************
+      subroutine getbdry3d(bdry_type,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  ibeg0,iend0,ibeg1,iend1,ibeg2,iend2,
+     &  ngc0,ngc1,ngc2,
+     &  bside,
+     &  dx,time,
+     &  uval,
+     &  bdry_states,bdry_data,bdry_case)
+c***********************************************************************
+      implicit none
+include(PARAMDIR/probparams.i)dnl
+
+      integer ngc0,ngc1,ngc2,bside,bdry_type
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer ibeg0,iend0,ibeg1,iend1,ibeg2,iend2
+      integer bdry_case
+      REAL bdry_states(2*NDIM)
+      REAL bdry_data(2*NDIM)
+      REAL time
+c
+      REAL dx(0:NDIM-1)
+c
+      REAL
+     &  uval(CELL3dVECG(ifirst,ilast,ngc))
+
+      REAL slope,uval0
+      integer ic1,ic0,ic2,ict1,ict0,ict2
+      integer sn
+      integer ibdebug(0:NDIM-1),iedebug(0:NDIM-1)
+
+c      write(6,*) "IN getbdry"
+c      write(6,*) "bdry_type ",bdry_type,", bside ",bside
+c      write(6,*) "ibeg ",ibeg0,ibeg1,ibeg2
+c      write(6,*) "iend ",iend0,iend1,iend2
+c      write(6,*) "ifirst ",ifirst0,ifirst1,ifirst2
+c      write(6,*) "ilast ",ilast0,ilast1,ilast2
+c      write(6,*) "bdry_case ",bdry_case
+
+      ibdebug(0) = ibeg0
+      ibdebug(1) = ibeg1
+      ibdebug(2) = ibeg2
+      iedebug(0) = iend0
+      iedebug(1) = iend1
+      iedebug(2) = iend2
+
+      if (bdry_type.eq.1) then
+c
+c     bside      index     bside      index      bside      index
+c       0     (-1, 0, 0)     2     ( 0,-1, 0)      4     ( 0, 0,-1)
+c       1     ( 1, 0, 0)     3     ( 0, 1, 0)      5     ( 0, 0, 1)
+c***********************************************************************
+        sn = 1+bside
+        if (bside.eq.0) then
+c***********************************************************************
+c x0 boundary
+c***********************************************************************
+c           ibdebug(0) =ifirst0-ngc0
+c           iedebug(0) =ifirst0-1
+do_bdry_face(0,1,2,`ifirst0-ngc0,ifirst0-1',`ifirst0',`ifirst0+1')dnl
+        else if (bside.eq.1) then
+c
+c***********************************************************************
+c x1 boundary
+c***********************************************************************
+c           ibdebug(0) =ilast0+1
+c           iedebug(0) =ilast0+ngc0
+do_bdry_face(0,1,2,`ilast0+1,ilast0+ngc0',`ilast0',`ilast0-1')dnl
+        else if (bside.eq.2) then
+c
+c***********************************************************************
+c y0 boundary
+c***********************************************************************
+c           ibdebug(1) =ifirst1-ngc1
+c           iedebug(1) =ifirst1-1
+do_bdry_face(1,0,2,`ifirst1-ngc1,ifirst1-1',`ifirst1',`ifirst1+1')dnl
+        else if (bside.eq.3) then
+c
+c***********************************************************************
+c y1 boundary
+c***********************************************************************
+c           ibdebug(1) =ilast1+1
+c           iedebug(1) =ilast1+ngc1
+do_bdry_face(1,0,2,`ilast1+1,ilast1+ngc1',`ilast1',`ilast1-1')dnl
+        else if (bside.eq.4) then
+c
+c***********************************************************************
+c z0 boundary
+c***********************************************************************
+c           ibdebug(2) =ifirst2-ngc2
+c           iedebug(2) =ifirst2-1
+do_bdry_face(2,0,1,`ifirst2-ngc2,ifirst2-1',`ifirst2',`ifirst2+1')dnl
+        else if (bside.eq.5) then
+c
+c***********************************************************************
+c z1 boundary
+c***********************************************************************
+c           ibdebug(2) =ilast2+1
+c           iedebug(2) =ilast2+ngc2
+do_bdry_face(2,0,1,`ilast2+1,ilast2+ngc2',`ilast2',`ilast2-1')dnl
+        endif
+c***********************************************************************
+
+      else if (bdry_type.eq.2) then
+c***********************************************************************
+c        write(6,*) "doing edges"
+c***********************************************************************
+c
+c     bside     index      bside     index      bside     index
+c       0     (0,-1,-1)      4     (-1,0,-1)      8     (-1,-1,0)
+c       1     (0, 1,-1)      5     (-1,0, 1)      9     ( 1,-1,0)
+c       2     (0,-1, 1)      6     ( 1,0,-1)     10     (-1, 1,0)
+c       3     (0, 1, 1)      7     ( 1,0, 1)     11     ( 1, 1,0)
+c***********************************************************************
+        sn = 1+bside
+        if (bside.eq.0) then
+c           ibdebug(1) =ifirst1-ngc1
+c           iedebug(1) =ifirst1-1
+c           ibdebug(2) =ifirst2-ngc1
+c           iedebug(2) =ifirst2-1
+do_bdry_edge(0,1,2,`ifirst1-ngc1,ifirst1-1',`ifirst2-ngc2,ifirst2-1',`ifirst1',`ifirst1+1')dnl
+        else if (bside.eq.1) then
+c           ibdebug(1) =ilast1+1
+c           iedebug(1) =ilast1+ngc1
+c           ibdebug(2) =ifirst2-ngc2
+c           iedebug(2) =ifirst2-1
+do_bdry_edge(0,1,2,`ilast1+1,ilast1+ngc1',`ifirst2-ngc2,ifirst2-1',`ilast1',`ilast1-1')dnl
+        else if (bside.eq.2) then
+c           ibdebug(1) =ifirst1-ngc1
+c           iedebug(1) =ifirst1-1
+c           ibdebug(2) =ilast2+1
+c           iedebug(2) =ilast2+ngc2
+do_bdry_edge(0,1,2,`ifirst1-ngc1,ifirst1-1',`ilast2+1,ilast2+ngc2',`ifirst1',`ifirst1+1')dnl
+        else if (bside.eq.3) then
+c           ibdebug(1) =ilast1+1
+c           iedebug(1) =ilast1+ngc1
+c           ibdebug(2) =ilast2+1
+c           iedebug(2) =ilast2+ngc2
+do_bdry_edge(0,1,2,`ilast1+1,ilast1+ngc1',`ilast2+1,ilast2+ngc2',`ilast1',`ilast1-1')dnl
+
+        else if (bside.eq.4) then
+c           ibdebug(0) =ifirst0-ngc0
+c           iedebug(0) =ifirst0-1
+c           ibdebug(2) =ifirst2-ngc2
+c           iedebug(2) =ifirst2-1
+do_bdry_edge(1,2,0,`ifirst2-ngc2,ifirst2-1',`ifirst0-ngc0,ifirst0-1',`ifirst2',`ifirst2+1')dnl
+        else if (bside.eq.5) then
+c           ibdebug(0) =ifirst0-ngc0
+c           iedebug(0) =ifirst0-1
+c           ibdebug(2) =ilast2+1
+c           iedebug(2) =ilast2+ngc2
+do_bdry_edge(1,2,0,`ilast2+1,ilast2+ngc2',`ifirst0-ngc0,ifirst0-1',`ilast2',`ilast2-1')dnl
+        else if (bside.eq.6) then
+c           ibdebug(0) =ilast0+1
+c           iedebug(0) =ilast0+ngc0
+c           ibdebug(2) =ifirst2-ngc2
+c           iedebug(2) =ifirst2-1
+do_bdry_edge(1,2,0,`ifirst2-ngc2,ifirst2-1',`ilast0+1,ilast0+ngc0',`ifirst2',`ifirst2+1')dnl
+        else if (bside.eq.7) then
+c           ibdebug(0) =ilast0+1
+c           iedebug(0) =ilast0+ngc0
+c           ibdebug(2) =ilast2+1
+c           iedebug(2) =ilast2+ngc2
+do_bdry_edge(1,2,0,`ilast2+1,ilast2+ngc2',`ilast0+1,ilast0+ngc0',`ilast2',`ilast2-1')dnl
+
+        else if (bside.eq.8) then
+c           ibdebug(0) =ifirst0-ngc0
+c           iedebug(0) =ifirst0-1
+c           ibdebug(1) =ifirst1-ngc1
+c           iedebug(1) =ifirst1-1
+do_bdry_edge(2,0,1,`ifirst0-ngc0,ifirst0-1',`ifirst1-ngc1,ifirst1-1',`ifirst0',`ifirst0+1')dnl
+        else if (bside.eq.9) then
+c           ibdebug(0) =ilast0+1
+c           iedebug(0) =ilast0+ngc0
+c           ibdebug(1) =ifirst1-ngc1
+c           iedebug(1) =ifirst1-1
+do_bdry_edge(2,0,1,`ilast0+1,ilast0+ngc0',`ifirst1-ngc1,ifirst1-1',`ilast0',`ilast0-1')dnl
+        else if (bside.eq.10) then
+c           ibdebug(0) =ifirst0-ngc0
+c           iedebug(0) =ifirst0-1
+c           ibdebug(1) =ilast1+1
+c           iedebug(1) =ilast1+ngc1
+do_bdry_edge(2,0,1,`ifirst0-ngc0,ifirst0-1',`ilast1+1,ilast1+ngc1',`ifirst0',`ifirst0+1')dnl
+        else if (bside.eq.11) then
+c           ibdebug(0) =ilast0+1
+c           iedebug(0) =ilast0+ngc0
+c           ibdebug(1) =ilast1+1
+c           iedebug(1) =ilast1+ngc1
+do_bdry_edge(2,0,1,`ilast0+1,ilast0+ngc0',`ilast1+1,ilast1+ngc1',`ilast0',`ilast0-1')dnl
+        endif
+c
+c***********************************************************************
+
+      else if (bdry_type.eq.NDIM) then
+c***********************************************************************
+c        write(6,*) "IN getbdrynode"
+c***********************************************************************
+c     bside     index       bside     index
+c       0     (-1,-1,-1)      4     (-1,-1, 1)
+c       1     ( 1,-1,-1)      5     ( 1,-1, 1)
+c       2     (-1, 1,-1)      6     (-1, 1, 1)
+c       3     ( 1, 1,-1)      7     ( 1, 1, 1)
+c***********************************************************************
+        sn = 1+bside
+
+        if (bside.eq.0) then
+c           ibdebug(0) =ifirst0-ngc0
+c           iedebug(0) =ifirst0-1
+c           ibdebug(1) =ifirst1-ngc1
+c           iedebug(1) =ifirst1-1
+c           ibdebug(2) =ifirst2-ngc2
+c           iedebug(2) =ifirst2-1
+do_bdry_node(`ifirst0-ngc0,ifirst0-1',`ifirst1-ngc1,ifirst1-1',`ifirst2-ngc2,ifirst2-1',`ifirst0',`ifirst0+1')dnl
+        else if (bside.eq.1) then
+c           ibdebug(0) =ilast0+1
+c           iedebug(0) =ilast0+ngc0
+c           ibdebug(1) =ifirst1-ngc1
+c           iedebug(1) =ifirst1-1
+c           ibdebug(2) =ifirst2-ngc2
+c           iedebug(2) =ifirst2-1
+do_bdry_node(`ilast0+1,ilast0+ngc0',`ifirst1-ngc1,ifirst1-1',`ifirst2-ngc2,ifirst2-1',`ilast0',`ilast0-1')dnl
+        else if (bside.eq.2) then
+c           ibdebug(0) =ifirst0-ngc0
+c           iedebug(0) =ifirst0-1
+c           ibdebug(1) =ilast1+1
+c           iedebug(1) =ilast1+ngc1
+c           ibdebug(2) =ifirst2-ngc2
+c           iedebug(2) =ifirst2-1
+do_bdry_node(`ifirst0-ngc0,ifirst0-1',`ilast1+1,ilast1+ngc1',`ifirst2-ngc2,ifirst2-1',`ifirst0',`ifirst0+1')dnl
+        else if (bside.eq.3) then
+c           ibdebug(0) =ilast0+1
+c           iedebug(0) =ilast0+ngc0
+c           ibdebug(1) =ilast1+1
+c           iedebug(1) =ilast1+ngc1
+c           ibdebug(2) =ifirst2-ngc2
+c           iedebug(2) =ifirst2-1
+do_bdry_node(`ilast0+1,ilast0+ngc0',`ilast1+1,ilast1+ngc1',`ifirst2-ngc2,ifirst2-1',`ilast0',`ilast0-1')dnl
+        else if (bside.eq.4) then
+c           ibdebug(0) =ifirst0-ngc0
+c           iedebug(0) =ifirst0-1
+c           ibdebug(1) =ifirst1-ngc1
+c           iedebug(1) =ifirst1-1
+c           ibdebug(2) =ilast2+1
+c           iedebug(2) =ilast2+ngc2
+do_bdry_node(`ifirst0-ngc0,ifirst0-1',`ifirst1-ngc1,ifirst1-1',`ilast2+1,ilast2+ngc2',`ifirst0',`ifirst0+1')dnl
+        else if (bside.eq.5) then
+c           ibdebug(0) =ilast0+1
+c           iedebug(0) =ilast0+ngc0
+c           ibdebug(1) =ifirst1-ngc1
+c           iedebug(1) =ifirst1-1
+c           ibdebug(2) =ilast2+1
+c           iedebug(2) =ilast2+ngc2
+do_bdry_node(`ilast0+1,ilast0+ngc0',`ifirst1-ngc1,ifirst1-1',`ilast2+1,ilast2+ngc2',`ilast0',`ilast0-1')dnl
+        else if (bside.eq.6) then
+c           ibdebug(0) =ifirst0-ngc0
+c           iedebug(0) =ifirst0-1
+c           ibdebug(1) =ilast1+1
+c           iedebug(1) =ilast1+ngc1
+c           ibdebug(2) =ilast2+1
+c           iedebug(2) =ilast2+ngc2
+do_bdry_node(`ifirst0-ngc0,ifirst0-1',`ilast1+1,ilast1+ngc1',`ilast2+1,ilast2+ngc2',`ifirst0',`ifirst0+1')dnl
+        else if (bside.eq.7) then
+c           ibdebug(0) =ilast0+1
+c           iedebug(0) =ilast0+ngc0
+c           ibdebug(1) =ilast1+1
+c           iedebug(1) =ilast1+ngc1
+c           ibdebug(2) =ilast2+1
+c           iedebug(2) =ilast2+ngc2
+do_bdry_node(`ilast0+1,ilast0+ngc0',`ilast1+1,ilast1+ngc1',`ilast2+1,ilast2+ngc2',`ilast0',`ilast0-1')dnl
+        endif
+      endif
+c
+c***********************************************************************
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/fortran/3d/flux3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/fortran/3d/flux3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,261 @@
+define(NDIM,3)dnl
+define(NEQU,1)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+include(FORTDIR/3d/m4flux3d.i)dnl
+
+      subroutine fluxcorrec3d2d(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  dx,advecspeed,idir,
+     &  uval,
+     &  flux0,flux1,flux2,
+     &  tracelft0,tracelft1,tracelft2,
+     &  tracergt0,tracergt1,tracergt2,
+     &  ttracelft0,ttracelft1,ttracelft2,
+     &  ttracergt0,ttracergt1,ttracergt2)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL dt 
+      integer idir
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     advecspeed(0:NDIM-1),
+     &     uval(CELL3d(ifirst,ilast,CELLG)),
+c
+     &     flux0(FACE3d0(ifirst,ilast,FLUXG)),
+     &     flux1(FACE3d1(ifirst,ilast,FLUXG)), 
+     &     flux2(FACE3d2(ifirst,ilast,FLUXG)), 
+c
+     &     tracelft0(FACE3d0(ifirst,ilast,FACEG)),
+     &     tracelft1(FACE3d1(ifirst,ilast,FACEG)),
+     &     tracelft2(FACE3d2(ifirst,ilast,FACEG)),
+     &     tracergt0(FACE3d0(ifirst,ilast,FACEG)),
+     &     tracergt1(FACE3d1(ifirst,ilast,FACEG)),
+     &     tracergt2(FACE3d2(ifirst,ilast,FACEG)),
+c
+     &     ttracelft0(FACE3d0(ifirst,ilast,FACEG)),
+     &     ttracelft1(FACE3d1(ifirst,ilast,FACEG)),
+     &     ttracelft2(FACE3d2(ifirst,ilast,FACEG)),
+     &     ttracergt0(FACE3d0(ifirst,ilast,FACEG)),
+     &     ttracergt1(FACE3d1(ifirst,ilast,FACEG)),
+     &     ttracergt2(FACE3d2(ifirst,ilast,FACEG)) 
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2
+      REAL trnsvers
+     
+c     ******************************************************************
+c     * complete tracing at cell edges
+c     ******************************************************************
+c         
+c
+c  "Forward" computation of transverse flux terms
+c
+      if (idir.eq.1) then
+c
+correc_flux2d(0,`ic1,ic2',1,`ic2,ic0',2)dnl
+c
+correc_flux2d(1,`ic2,ic0',0,`ic1,ic2',2)dnl
+c
+correc_flux2d(2,`ic0,ic1',0,`ic1,ic2',1)dnl
+c
+c  "Backward" computation of transverse flux terms
+c
+      elseif (idir.eq.-1) then
+c
+correc_flux2d(0,`ic1,ic2',2,`ic0,ic1',1)dnl
+c
+correc_flux2d(1,`ic2,ic0',2,`ic0,ic1',0)dnl
+c
+correc_flux2d(2,`ic0,ic1',1,`ic2,ic0',0)dnl
+c
+      endif
+c
+      return
+      end   
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine fluxcorrec3d3d(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  dx,
+     &  advecspeed,uval,
+     &  fluxa0,fluxa1,fluxa2,
+     &  fluxb0,fluxb1,fluxb2,
+     &  tracelft0,tracelft1,tracelft2,
+     &  tracergt0,tracergt1,tracergt2)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL dt 
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     advecspeed(0:NDIM-1),
+     &     uval(CELL3d(ifirst,ilast,CELLG)),
+     &     fluxa0(FACE3d0(ifirst,ilast,FLUXG)),
+     &     fluxa1(FACE3d1(ifirst,ilast,FLUXG)), 
+     &     fluxa2(FACE3d2(ifirst,ilast,FLUXG)), 
+     &     fluxb0(FACE3d0(ifirst,ilast,FLUXG)),
+     &     fluxb1(FACE3d1(ifirst,ilast,FLUXG)), 
+     &     fluxb2(FACE3d2(ifirst,ilast,FLUXG)), 
+     &     tracelft0(FACE3d0(ifirst,ilast,FACEG)),
+     &     tracergt0(FACE3d0(ifirst,ilast,FACEG)),
+     &     tracelft1(FACE3d1(ifirst,ilast,FACEG)),
+     &     tracergt1(FACE3d1(ifirst,ilast,FACEG)),
+     &     tracelft2(FACE3d2(ifirst,ilast,FACEG)),
+     &     tracergt2(FACE3d2(ifirst,ilast,FACEG))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2
+      REAL trnsvers
+     
+c     ******************************************************************
+c     * complete tracing at cell edges
+c     ******************************************************************
+c         
+correc_flux3d(2,0,1,a0,a1,`ic1,ic2',`ic2,ic0')dnl
+c         
+correc_flux3d(1,2,0,a2,b0,`ic0,ic1',`ic1,ic2')dnl
+c         
+correc_flux3d(0,1,2,b1,b2,`ic2,ic0',`ic0,ic1')dnl
+c   
+c      call flush(6)     
+      return
+      end   
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine fluxcalculation3d(dt,xcell0,xcell1,visco,dx,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  advecspeed,
+     &  uval,
+     &  flux0,flux1,flux2,
+     &  trlft0,trlft1,trlft2,
+     &  trrgt0,trrgt1,trrgt2)
+     
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer xcell0,xcell1,visco
+      REAL dt 
+      REAL 
+     &     dx(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     advecspeed(0:NDIM-1),
+     &     uval(CELL3d(ifirst,ilast,CELLG))
+c variables in 2d side indexed         
+      REAL
+     &     flux0(FACE3d0(ifirst,ilast,FLUXG)),
+     &     flux1(FACE3d1(ifirst,ilast,FLUXG)), 
+     &     flux2(FACE3d2(ifirst,ilast,FLUXG)), 
+     &     trlft0(FACE3d0(ifirst,ilast,FACEG)),
+     &     trrgt0(FACE3d0(ifirst,ilast,FACEG)),
+     &     trlft1(FACE3d1(ifirst,ilast,FACEG)),
+     &     trrgt1(FACE3d1(ifirst,ilast,FACEG)),
+     &     trlft2(FACE3d2(ifirst,ilast,FACEG)),
+     &     trrgt2(FACE3d2(ifirst,ilast,FACEG))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2,ie0,ie1,ie2
+      REAL   riemst
+c
+c***********************************************************************
+c solve riemann problems for conservative flux
+c  arguments: ( axis for RP, other axis, extra cells-direction)
+c***********************************************************************
+c      
+
+riemann_solve(0,1,2,`ic1,ic2',xcell0,xcell1)dnl
+
+c
+riemann_solve(1,0,2,`ic2,ic0',xcell0,xcell1)dnl
+
+c
+riemann_solve(2,0,1,`ic0,ic1',xcell0,xcell1)dnl
+
+      if (visco.eq.1) then
+      write(6,*) "doing artificial viscosity"
+c
+crtificial_viscosity1(0,1,2)dnl
+c
+crtificial_viscosity1(1,2,0)dnl
+c
+crtificial_viscosity1(2,0,1)dnl
+c
+      endif
+c      call flush(6)     
+      return
+      end 
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+  
+      subroutine consdiff3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  dx,
+     &  flux0,flux1,flux2,
+     &  advecspeed,uval)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+      integer ifirst0, ilast0,ifirst1, ilast1,ifirst2,ilast2
+      REAL dx(0:NDIM-1)
+      REAL
+     &     flux0(FACE3d0(ifirst,ilast,FLUXG)),
+     &     flux1(FACE3d1(ifirst,ilast,FLUXG)),
+     &     flux2(FACE3d2(ifirst,ilast,FLUXG)),
+     &     advecspeed(0:NDIM-1),
+     &     uval(CELL3d(ifirst,ilast,CELLG))
+c
+      integer ic0,ic1,ic2
+      
+c***********************************************************************
+c update velocity to full time
+c note the reversal of indices in 2nd coordinate direction
+c***********************************************************************
+c***********************************************************************
+      do ic2=ifirst2,ilast2
+         do ic1=ifirst1,ilast1
+           do ic0=ifirst0,ilast0
+             uval(ic0,ic1,ic2) = uval(ic0,ic1,ic2)
+     &          -(flux0(ic0+1,ic1,ic2)-flux0(ic0,ic1,ic2))/dx(0)
+     &          -(flux1(ic1+1,ic2,ic0)-flux1(ic1,ic2,ic0))/dx(1)
+     &          -(flux2(ic2+1,ic0,ic1)-flux2(ic2,ic0,ic1))/dx(2)
+           enddo
+         enddo
+      enddo
+      return
+      end
+c***********************************************************************
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/fortran/3d/fluxcorner3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/fortran/3d/fluxcorner3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,168 @@
+include(FORTDIR/m4fluxjt.i)dnl
+
+      subroutine onethirdstates3d(dt,dx,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  advecspeed,uval,
+     &  flux0,flux1,flux2,
+     &  st3_0,st3_1,st3_2)
+c***********************************************************************
+include(FORTDIR/const.i)dnl
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL dt 
+c variables in 1d axis indexed
+c
+      REAL dx(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     advecspeed(0:NDIM-1),
+     &     uval(CELL3d(ifirst,ilast,CELLG)),
+     &     flux0(FACE3d0(ifirst,ilast,FLUXG)),
+     &     flux1(FACE3d1(ifirst,ilast,FLUXG)),
+     &     flux2(FACE3d2(ifirst,ilast,FLUXG)),
+     &     st3_0(CELL3d(ifirst,ilast,CELLG)),
+     &     st3_1(CELL3d(ifirst,ilast,CELLG)),
+     &     st3_2(CELL3d(ifirst,ilast,CELLG))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2
+      REAL trnsvers
+     
+c     ******************************************************************
+c     * complete tracing at cell edges
+c     ******************************************************************
+c         
+st_third(0,1,2,`ic1,ic2')dnl
+c
+st_third(1,2,0,`ic2,ic0')dnl
+c
+st_third(2,0,1,`ic0,ic1')dnl
+c
+      return
+      end   
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine fluxthird3d(dt,dx,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  advecspeed,
+     &  uval,
+     &  st3_0,st3_1,st3_2,
+     &  flux01,flux12,flux20,
+     &  flux02,flux10,flux21)
+     
+c***********************************************************************
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL dt 
+      REAL 
+     &     dx(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     advecspeed(0:NDIM-1),
+     &     uval(CELL3d(ifirst,ilast,CELLG))
+c variables in 2d side indexed         
+      REAL
+     &     flux01(FACE3d0(ifirst,ilast,FLUXG)),
+     &     flux10(FACE3d1(ifirst,ilast,FLUXG)),
+     &     flux20(FACE3d2(ifirst,ilast,FLUXG)),
+     &     flux02(FACE3d0(ifirst,ilast,FLUXG)),
+     &     flux12(FACE3d1(ifirst,ilast,FLUXG)),
+     &     flux21(FACE3d2(ifirst,ilast,FLUXG)),
+     &       st3_0(CELL3d(ifirst,ilast,CELLG)),
+     &       st3_1(CELL3d(ifirst,ilast,CELLG)),
+     &       st3_2(CELL3d(ifirst,ilast,CELLG))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2
+      REAL   riemst
+c
+c***********************************************************************
+c solve riemann problems for conservative flux
+c  arguments: ( axis for RP, other axis, extra cells-direction)
+c***********************************************************************
+c      
+
+f_third(0,1,2,`ic1,ic2',`ic0-1,ic1,ic2')dnl
+c
+f_third(0,2,1,`ic1,ic2',`ic0-1,ic1,ic2')dnl
+c
+f_third(1,0,2,`ic2,ic0',`ic0,ic1-1,ic2')dnl
+c
+f_third(1,2,0,`ic2,ic0',`ic0,ic1-1,ic2')dnl
+c
+f_third(2,0,1,`ic0,ic1',`ic0,ic1,ic2-1')dnl
+c
+f_third(2,1,0,`ic0,ic1',`ic0,ic1,ic2-1')dnl
+c
+c      call flush(6)     
+      return
+      end 
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine fluxcorrecjt3d(dt,dx,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  advecspeed,uval,
+     &  flux01,flux12,flux20,
+     &  flux02,flux10,flux21,
+     &  tracelft0,tracelft1,tracelft2,
+     &  tracergt0,tracergt1,tracergt2)
+c***********************************************************************
+include(FORTDIR/const.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL dt 
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:3-1)
+c variables in 2d cell indexed         
+      REAL
+     &     advecspeed(0:NDIM-1),
+     &     uval(CELL3d(ifirst,ilast,CELLG)),
+     &     flux01(FACE3d0(ifirst,ilast,FLUXG)),
+     &     flux10(FACE3d1(ifirst,ilast,FLUXG)),
+     &     flux20(FACE3d2(ifirst,ilast,FLUXG)),
+     &     flux02(FACE3d0(ifirst,ilast,FLUXG)),
+     &     flux12(FACE3d1(ifirst,ilast,FLUXG)),
+     &     flux21(FACE3d2(ifirst,ilast,FLUXG)),
+     &     tracelft0(FACE3d0(ifirst,ilast,FACEG)),
+     &     tracergt0(FACE3d0(ifirst,ilast,FACEG)),
+     &     tracelft1(FACE3d1(ifirst,ilast,FACEG)),
+     &     tracergt1(FACE3d1(ifirst,ilast,FACEG)),
+     &     tracelft2(FACE3d2(ifirst,ilast,FACEG)),
+     &     tracergt2(FACE3d2(ifirst,ilast,FACEG))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2
+      REAL trnsvers
+c     REAL ttvlft,ttvrgt     
+     
+c     ******************************************************************
+c     * complete tracing at cell edges
+c     ******************************************************************
+c         
+correc_fluxjt(2,0,1,`ic1,ic2',`ic2,ic0')dnl
+c
+correc_fluxjt(1,2,0,`ic0,ic1',`ic1,ic2')dnl
+c
+correc_fluxjt(0,1,2,`ic2,ic0',`ic0,ic1')dnl
+c
+c      call flush(6)     
+      return
+      end   
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/fortran/3d/fluxcorner3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/fortran/3d/fluxcorner3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,187 @@
+define(NDIM,3)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+include(FORTDIR/3d/m4fluxcorner3d.i)dnl
+
+      subroutine onethirdstate3d(dt,dx,idir,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  advecspeed,uval,
+     &  flux0,flux1,flux2,
+     &  st3)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************     
+c input arrays:
+      integer idir,ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL dt 
+c variables in 1d axis indexed
+c
+      REAL dx(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     advecspeed(0:NDIM-1),
+     &     uval(CELL3d(ifirst,ilast,CELLG)),
+     &     flux0(FACE3d0(ifirst,ilast,FLUXG)),
+     &     flux1(FACE3d1(ifirst,ilast,FLUXG)),
+     &     flux2(FACE3d2(ifirst,ilast,FLUXG)),
+     &     st3(CELL3d(ifirst,ilast,CELLG))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2
+      REAL trnsvers
+     
+c     ******************************************************************
+c     * complete tracing at cell edges
+c     ******************************************************************
+c         
+      if (idir.eq.0) then
+c
+st_third(0,1,2,`ic1,ic2')dnl
+c
+      elseif (idir.eq.1) then
+c
+st_third(1,2,0,`ic2,ic0')dnl
+c
+      elseif (idir.eq.2) then
+c
+st_third(2,0,1,`ic0,ic1')dnl
+c
+      endif
+      return
+      end   
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine fluxthird3d(dt,dx,idir,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  advecspeed,
+     &  uval,
+     &  st3,
+     &  flux0,flux1,flux2)
+     
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer idir,ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL dt 
+      REAL 
+     &     dx(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     advecspeed(0:NDIM-1),
+     &     uval(CELL3d(ifirst,ilast,CELLG))
+c variables in 2d side indexed         
+      REAL
+     &     flux0(FACE3d0(ifirst,ilast,FLUXG)),
+     &     flux1(FACE3d1(ifirst,ilast,FLUXG)),
+     &     flux2(FACE3d2(ifirst,ilast,FLUXG)),
+     &     st3(CELL3d(ifirst,ilast,CELLG)) 
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2
+      REAL   riemst
+c
+c***********************************************************************
+c solve riemann problems for conservative flux
+c  arguments: ( axis for RP, other axis, extra cells-direction)
+c***********************************************************************
+c      
+      if (idir.eq.0) then
+c
+f_third(1,0,2,`ic2,ic0',`ic0,ic1-1,ic2')dnl
+c
+f_third(2,0,1,`ic0,ic1',`ic0,ic1,ic2-1')dnl
+c
+      elseif (idir.eq.1) then
+c
+f_third(0,1,2,`ic1,ic2',`ic0-1,ic1,ic2')dnl
+c
+f_third(2,1,0,`ic0,ic1',`ic0,ic1,ic2-1')dnl
+c
+      elseif (idir.eq.2) then
+c
+f_third(1,2,0,`ic2,ic0',`ic0,ic1-1,ic2')dnl
+c
+f_third(0,2,1,`ic1,ic2',`ic0-1,ic1,ic2')dnl
+c
+      endif
+c
+c      call flush(6)     
+      return
+      end 
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine fluxcorrecjt3d(dt,dx,idir,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  advecspeed,uval,
+     &  flux0,flux1,flux2,
+     &  tracelft0,tracelft1,tracelft2,
+     &  tracergt0,tracergt1,tracergt2)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer idir,ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL dt 
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:3-1)
+c variables in 2d cell indexed         
+      REAL
+     &     advecspeed(0:NDIM-1),
+     &     uval(CELL3d(ifirst,ilast,CELLG)),
+     &     flux0(FACE3d0(ifirst,ilast,FLUXG)),
+     &     flux1(FACE3d1(ifirst,ilast,FLUXG)),
+     &     flux2(FACE3d2(ifirst,ilast,FLUXG)),
+     &     tracelft0(FACE3d0(ifirst,ilast,FACEG)),
+     &     tracergt0(FACE3d0(ifirst,ilast,FACEG)),
+     &     tracelft1(FACE3d1(ifirst,ilast,FACEG)),
+     &     tracergt1(FACE3d1(ifirst,ilast,FACEG)),
+     &     tracelft2(FACE3d2(ifirst,ilast,FACEG)),
+     &     tracergt2(FACE3d2(ifirst,ilast,FACEG))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2
+      REAL trnsvers
+c     REAL ttvlft,ttvrgt     
+     
+c     ******************************************************************
+c     * complete tracing at cell edges
+c     ******************************************************************
+c         
+      if (idir.eq.0) then
+c
+correc_fluxjt(0,2,1,`ic2,ic0',`ic0,ic1')dnl
+c
+      elseif (idir.eq.1) then
+c
+correc_fluxjt(1,0,2,`ic0,ic1',`ic1,ic2')dnl
+c
+      elseif (idir.eq.2) then
+c
+correc_fluxjt(2,1,0,`ic1,ic2',`ic2,ic0')dnl
+c
+      endif
+c
+c      call flush(6)     
+      return
+      end   
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/fortran/3d/grad3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/fortran/3d/grad3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,423 @@
+define(NDIM,3)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine detectgrad3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  vghost0,tagghost0,ttagghost0,
+     &  vghost1,tagghost1,ttagghost1,
+     &  vghost2,tagghost2,ttagghost2,
+     &  dx,
+     &  gradtol,
+     &  dotag,donttag,
+     &  var,
+     &  tags,temptags)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c input arrays:
+      integer
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  dotag,donttag,
+     &  vghost0,vghost1,vghost2,
+     &  tagghost0,tagghost1,tagghost2,
+     &  ttagghost0,ttagghost1,ttagghost2
+      REAL
+     &  dx(0:NDIM-1),
+     &  gradtol
+c variables indexed as 3dimensional
+      REAL
+     &  var(CELL3dVECG(ifirst,ilast,vghost))
+      integer
+     &  tags(CELL3dVECG(ifirst,ilast,tagghost)),
+     &  temptags(CELL3dVECG(ifirst,ilast,ttagghost))
+c
+      REAL tol
+      REAL facejump, loctol
+      REAL presm1,presp1
+      REAL diag(0:NDIM-1),diag012 
+      logical tagcell
+      integer ic0,ic1,ic2
+c
+c***********************************************************************
+c
+      tol = gradtol
+      diag(0) = sqrt(dx(2)**2+dx(1)**2)
+      diag(1) = sqrt(dx(0)**2+dx(2)**2)
+      diag(2) = sqrt(dx(0)**2+dx(1)**2)
+      diag012= sqrt(dx(0)**2+dx(1)**2+dx(2)**2)
+
+      do ic2=ifirst2,ilast2
+        do ic1=ifirst1,ilast1
+          do ic0=ifirst0,ilast0
+
+            if (tags(ic0,ic1,ic2) .ne. 0) then
+              loctol = 0.125*tol
+            else 
+              loctol = tol
+            endif
+     
+            tagcell = .false.
+  
+            presm1 = var(ic0-1,ic1,ic2)
+            presp1 = var(ic0+1,ic1,ic2)
+            facejump = abs(var(ic0,ic1,ic2)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+            tagcell = ((facejump).gt.(loctol*dx(0)))
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1-1,ic2)
+              presp1 = var(ic0,ic1+1,ic2)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*dx(1)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1,ic2-1)
+              presp1 = var(ic0,ic1,ic2+1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*dx(2)))
+            endif
+
+
+c   2Dimensional diagonals
+
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1-1,ic2-1)
+              presp1 = var(ic0,ic1+1,ic2+1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag(0)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1+1,ic2-1)
+              presp1 = var(ic0,ic1-1,ic2+1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag(0)))
+            endif
+  
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1,ic2-1)
+              presp1 = var(ic0+1,ic1,ic2+1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag(1)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1,ic2+1)
+              presp1 = var(ic0+1,ic1,ic2-1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag(1)))
+            endif
+
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1-1,ic2)
+              presp1 = var(ic0+1,ic1+1,ic2)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag(2)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1+1,ic2)
+              presp1 = var(ic0+1,ic1-1,ic2)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag(2)))
+            endif
+
+c   End 2Dimensional diagonals
+c   3Dimensional diagonals
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1-1,ic2-1)
+              presp1 = var(ic0+1,ic1+1,ic2+1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag012))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1-1,ic2+1)
+              presp1 = var(ic0+1,ic1+1,ic2-1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag012))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1+1,ic2-1)
+              presp1 = var(ic0+1,ic1-1,ic2+1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag012))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1+1,ic2+1)
+              presp1 = var(ic0+1,ic1-1,ic2-1)
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((facejump).gt.(loctol*diag012))
+            endif
+
+c   End 3Dimensional diagonals
+
+            if ( tagcell ) then
+              temptags(ic0,ic1,ic2) = dotag
+            endif
+          enddo
+        enddo
+      enddo
+      return
+      end
+
+      subroutine detectshock3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  vghost0,tagghost0,ttagghost0,
+     &  vghost1,tagghost1,ttagghost1,
+     &  vghost2,tagghost2,ttagghost2,
+     &  dx,
+     &  gradtol,gradonset,
+     &  dotag,donttag,
+     &  var,
+     &  tags,temptags)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c input arrays:
+      integer
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  dotag,donttag,
+     &  vghost0,vghost1,vghost2,
+     &  tagghost0,tagghost1,tagghost2,
+     &  ttagghost0,ttagghost1,ttagghost2
+      REAL
+     &  dx(0:NDIM-1),
+     &  gradtol,gradonset
+c variables indexed as 3dimensional
+      REAL
+     &  var(CELL3dVECG(ifirst,ilast,vghost))
+      integer
+     &  tags(CELL3dVECG(ifirst,ilast,tagghost)),
+     &  temptags(CELL3dVECG(ifirst,ilast,ttagghost))
+c
+      REAL tol,onset
+      REAL jump1, jump2, facejump, loctol,locon
+      REAL presm1,presm2,presp1,presp2
+      REAL diag(0:NDIM-1),diag012 
+      logical tagcell
+      integer ic0,ic1,ic2
+c
+c***********************************************************************
+c
+      tol = gradtol
+      onset = gradonset
+      diag(0) = sqrt(dx(2)**2+dx(1)**2)
+      diag(1) = sqrt(dx(0)**2+dx(2)**2)
+      diag(2) = sqrt(dx(0)**2+dx(1)**2)
+      diag012= sqrt(dx(0)**2+dx(1)**2+dx(2)**2)
+
+      do ic2=ifirst2,ilast2
+        do ic1=ifirst1,ilast1
+          do ic0=ifirst0,ilast0
+
+            if (tags(ic0,ic1,ic2) .ne. 0) then
+              loctol = 0.125*tol
+              locon = 0.66*onset
+            else 
+              loctol = tol
+              locon = onset
+            endif
+     
+            tagcell = .false.
+  
+            presm1 = var(ic0-1,ic1,ic2)
+            presm2 = var(ic0-2,ic1,ic2)
+            presp1 = var(ic0+1,ic1,ic2)
+            presp2 = var(ic0+2,ic1,ic2)
+            jump2 = presp2-presm2
+            jump1 = presp1-presm1
+            facejump = abs(var(ic0,ic1,ic2)-presm1)
+            facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+            tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                ((jump1*jump2).lt.zero)).and.
+     &               ((facejump).gt.(loctol*dx(0))))
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1-1,ic2)
+              presm2 = var(ic0,ic1-2,ic2)
+              presp1 = var(ic0,ic1+1,ic2)
+              presp2 = var(ic0,ic1+2,ic2)
+              jump2 = presp2-presm2
+              jump1 = presp1-presm1
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                    ((jump1*jump2).lt.zero)).and.
+     &                   ((facejump).gt.(loctol*dx(1)))) 
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1,ic2-1)
+              presm2 = var(ic0,ic1,ic2-2)
+              presp1 = var(ic0,ic1,ic2+1)
+              presp2 = var(ic0,ic1,ic2+2)
+              jump2 = presp2-presm2
+              jump1 = presp1-presm1
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*dx(2)))) 
+            endif
+
+
+c   2Dimensional diagonals
+
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1-1,ic2-1)
+              presp1 = var(ic0,ic1+1,ic2+1)
+              presm2 = var(ic0,ic1-2,ic2-2)
+              presp2 = var(ic0,ic1+2,ic2+2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                    ((jump1*jump2).lt.zero)).and.
+     &                   ((facejump).gt.(loctol*diag(0))))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0,ic1+1,ic2-1)
+              presp1 = var(ic0,ic1-1,ic2+1)
+              presm2 = var(ic0,ic1+2,ic2-2)
+              presp2 = var(ic0,ic1-2,ic2+2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                    ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag(0))))
+            endif
+  
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1,ic2-1)
+              presp1 = var(ic0+1,ic1,ic2+1)
+              presm2 = var(ic0-2,ic1,ic2-2)
+              presp2 = var(ic0+2,ic1,ic2+2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag(1))))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1,ic2+1)
+              presp1 = var(ic0+1,ic1,ic2-1)
+              presm2 = var(ic0-2,ic1,ic2+2)
+              presp2 = var(ic0+2,ic1,ic2-2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                    ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag(1))))
+            endif
+
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1-1,ic2)
+              presp1 = var(ic0+1,ic1+1,ic2)
+              presm2 = var(ic0-2,ic1-2,ic2)
+              presp2 = var(ic0+2,ic1+2,ic2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                    ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag(2))))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1+1,ic2)
+              presp1 = var(ic0+1,ic1-1,ic2)
+              presm2 = var(ic0-2,ic1+2,ic2)
+              presp2 = var(ic0+2,ic1-2,ic2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag(2))))
+            endif
+
+c   End 2Dimensional diagonals
+c   3Dimensional diagonals
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1-1,ic2-1)
+              presp1 = var(ic0+1,ic1+1,ic2+1)
+              presm2 = var(ic0-2,ic1-2,ic2-2)
+              presp2 = var(ic0+2,ic1+2,ic2+2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                   ((facejump).gt.(loctol*diag012)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1-1,ic2+1)
+              presp1 = var(ic0+1,ic1+1,ic2-1)
+              presm2 = var(ic0-2,ic1-2,ic2+2)
+              presp2 = var(ic0+2,ic1+2,ic2-2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag012)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1+1,ic2-1)
+              presp1 = var(ic0+1,ic1-1,ic2+1)
+              presm2 = var(ic0-2,ic1+2,ic2-2)
+              presp2 = var(ic0+2,ic1-2,ic2+2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                   ((facejump).gt.(loctol*diag012)))
+            endif
+            if (.not.tagcell) then
+              presm1 = var(ic0-1,ic1+1,ic2+1)
+              presp1 = var(ic0+1,ic1-1,ic2-1)
+              presm2 = var(ic0-2,ic1+2,ic2+2)
+              presp2 = var(ic0+2,ic1-2,ic2-2)
+              jump1 = presp1-presm1
+              jump2 = presp2-presm2
+              facejump = abs(var(ic0,ic1,ic2)-presm1)
+              facejump = max(facejump,abs(var(ic0,ic1,ic2)-presp1))
+              tagcell = ((((abs(jump2)*locon).le.abs(jump1)).or.
+     &                  ((jump1*jump2).lt.zero)).and.
+     &                 ((facejump).gt.(loctol*diag012)))
+            endif
+
+c   End 3Dimensional diagonals
+
+            if ( tagcell ) then
+              temptags(ic0,ic1,ic2) = dotag
+            endif
+          enddo
+        enddo
+      enddo
+      return
+      end
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/fortran/3d/init3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/fortran/3d/init3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,269 @@
+define(NDIM,3)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine linadvinit3d(data_problem,dx,xlo,xhi,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  gcw0,gcw1,gcw2,
+     &  uval,
+     &  nintervals,front,
+     &  i_uval)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer gcw0,gcw1,gcw2
+      integer data_problem
+      integer nintervals
+      REAL front(1:nintervals)
+      REAL 
+     &     dx(0:NDIM-1),xlo(0:NDIM-1),xhi(0:NDIM-1)
+      REAL 
+     &     i_uval(1:nintervals)
+c variables in 2d cell indexed         
+      REAL
+     &     uval(CELL3dVECG(ifirst,ilast,gcw))
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2,dir,ifr
+      REAL xc(0:NDIM-1)
+c
+c   dir 0 two linear states (L,R) indp of y,z
+c   dir 1 two linear states (L,R) indp of x,z
+c   dir 2 two linear states (L,R) indp of x,y
+
+c     write(6,*) "Inside eulerinit"
+c     write(6,*) "data_problem= ",data_problem
+c     write(6,*) "dx= ",dx(0), dx(1), dx(2)
+c     write(6,*) "xlo= ",xlo(0), xlo(1),xhi(2)
+c     write(6,*) "xhi= ",xhi(0), xhi(1),xhi(2)
+c     write(6,*) "ifirst= ",ifirst0,ifirst1,ifirst2
+c     write(6,*) "ilast= ",ilast0,ilast1,ilast2
+c     write(6,*) "gamma= ",gamma
+c     call flush(6)
+
+      dir = 0
+      if (data_problem.eq.PIECEWISE_CONSTANT_X) then
+         dir = 0
+      else if (data_problem.eq.PIECEWISE_CONSTANT_Y) then
+         dir = 1
+      else if (data_problem.eq.PIECEWISE_CONSTANT_Z) then
+         dir = 2
+      endif
+
+      if (dir.eq.0) then
+         ifr = 1
+         do ic0=ifirst0,ilast0
+            xc(0) = xlo(0)+ dx(0)*(dble(ic0-ifirst0)+half)
+            if (xc(dir).gt.front(ifr)) then
+               ifr = ifr+1
+            endif
+            do ic1=ifirst1,ilast1
+               do ic2=ifirst2,ilast2
+                  uval(ic0,ic1,ic2) = i_uval(ifr)
+               enddo
+            enddo
+         enddo
+      else if (dir.eq.1) then
+         ifr = 1
+         do ic1=ifirst1,ilast1
+            xc(1) = xlo(1)+ dx(1)*(dble(ic1-ifirst1)+half)
+            if (xc(dir).gt.front(ifr)) then
+               ifr = ifr+1
+            endif
+            do ic2=ifirst2,ilast2
+               do ic0=ifirst0,ilast0
+                  uval(ic0,ic1,ic2) = i_uval(ifr)
+              enddo
+           enddo
+         enddo
+      else if (dir.eq.2) then
+         ifr = 1
+         do ic2=ifirst2,ilast2
+            xc(2) = xlo(2)+ dx(2)*(dble(ic2-ifirst2)+half)
+            if (xc(dir).gt.front(ifr)) then
+               ifr = ifr+1
+            endif
+            do ic1=ifirst1,ilast1
+               do ic0=ifirst0,ilast0
+                  uval(ic0,ic1,ic2) = i_uval(ifr)
+              enddo
+           enddo
+         enddo
+      endif
+c
+      return
+      end
+
+c***********************************************************************
+c
+c    Initialization routine where we use a spherical profile 
+c
+c***********************************************************************
+      subroutine initsphere3d(data_problem,dx,xlo,xhi,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  gcw0,gcw1,gcw2,
+     &  uval,
+     &  l_uval,r_uval,
+     &  ce,rad)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c***********************************************************************     
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer gcw0,gcw1,gcw2
+      integer data_problem
+      REAL rad,ce(0:NDIM-1)
+c variables in 1d axis indexed
+c
+      REAL 
+     &     dx(0:NDIM-1),xlo(0:NDIM-1),xhi(0:NDIM-1)
+c variables in 2d cell indexed         
+      REAL
+     &     uval(CELL3dVECG(ifirst,ilast,gcw))
+      REAL 
+     &     l_uval(0:4),
+     &     r_uval(0:4)
+c
+c***********************************************************************     
+c
+      integer ic0,ic1,ic2,side
+      REAL xc(0:NDIM-1),x0,x1,x2
+      REAL theta,phi,rad2,rad3
+c
+
+c     write(6,*) "    dx = ",dx(0),dx(1),dx(2)
+c     write(6,*) "    xlo= ",xlo(0),xlo(1),xlo(2)
+c     write(6,*) "    ce = ",ce(0),ce(1),ce(2)," rad ",rad
+      do ic2=ifirst2,ilast2
+        xc(2) = xlo(2)+dx(2)*(dble(ic2-ifirst2)+half)
+        x2 = xc(2) - ce(2)
+        do ic1=ifirst1,ilast1
+           xc(1) = xlo(1)+dx(1)*(dble(ic1-ifirst1)+half)
+           x1 = xc(1) - ce(1)
+           do ic0=ifirst0,ilast0
+              xc(0) = xlo(0)+dx(0)*(dble(ic0-ifirst0)+half)
+              x0 = xc(0)-ce(0)
+              if (x1.eq.zero .and. x0.eq.zero) then
+                theta = zero
+              else
+                theta = atan2(x1,x0)
+              endif
+              rad2 = sqrt(x0**2+x1**2)
+              if (rad2.eq.zero .and. x2.eq.zero) then
+                phi = zero
+              else
+                phi  = atan2(rad2,x2)
+              endif
+              rad3 = sqrt(rad2**2 + x2**2)
+              if (rad3.lt.rad) then
+                side = 0
+              else
+                side = 1
+              endif
+              uval(ic0,ic1,ic2)   = l_uval(side)
+           enddo
+        enddo
+      enddo
+      return
+      end   
+
+c
+c***********************************************************************
+c
+c    Sine-wave interface
+c
+c***********************************************************************
+ 
+      subroutine linadvinitsine3d(data_problem,dx,xlo,
+     &  domain_xlo,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  gcw0,gcw1,gcw2,
+     &  uval,
+     &  nintervals,front,
+     &  i_uval,
+     &  amplitude,period)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+ 
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer gcw0,gcw1,gcw2
+      integer data_problem
+      integer nintervals
+      REAL front(1:nintervals)
+      REAL
+     &     dx(0:NDIM-1),xlo(0:NDIM-1),
+     &     domain_xlo(0:NDIM-1)
+      REAL i_uval(1:nintervals)
+      REAL amplitude,period(0:NDIM-1)
+c variables in 3d cell indexed
+      REAL
+     &     uval(CELL3dVECG(ifirst,ilast,gcw))
+c
+c***********************************************************************
+c
+      integer ic0,ic1,ic2,j,ifr
+      REAL xc(0:NDIM-1),xmid(1:10)
+      REAL coef(0:NDIM-1),coscoef(1:2)
+c
+c     write(6,*) "Inside eulerinitrm"
+c     write(6,*) "data_problem= ",data_problem
+c     write(6,*) "dx= ",dx(0), dx(1), dx(2)
+c     write(6,*) "xlo= ",xlo(0), xlo(1), xlo(2)
+c     write(6,*) "domain_xlo= ",
+c    &   domain_xlo(0), domain_xlo(1), domain_xlo(2)
+c     write(6,*) "ifirst = ",ifirst0,ifirst1,ifirst2
+c     write(6,*) "ilast = ",ilast0,ilast1,ilast2
+c     write(6,*) "front= ",front(1)
+c     write(6,*) "amplitude= ",amplitude
+c     write(6,*) "period= ",period(0),
+c    &  period(1),period(2)
+c     call flush(6)
+ 
+      if (data_problem.eq.SINE_CONSTANT_Y .or.
+     &    data_problem.eq.SINE_CONSTANT_Z) then
+         write(6,*) "Sorry, Y and Z directions not implemented :-("
+         return
+      endif
+ 
+      coef(0) = zero
+      do j=1,NDIM-1
+        coef(j) = two*pi/period(j)
+      enddo
+c
+      do ic2=ifirst2,ilast2
+         xc(2) = xlo(2)+dx(2)*(dble(ic2-ifirst2)+half)
+         coscoef(2) = amplitude*cos((xc(2)-domain_xlo(2))*coef(2))
+         do ic1=ifirst1,ilast1
+            xc(1) = xlo(1)+dx(1)*(dble(ic1-ifirst1)+half)
+            coscoef(1) =
+     &         cos((xc(1)-domain_xlo(1))*coef(1))*coscoef(2)
+            do j=1,(nintervals-1)
+              xmid(j) = front(j) + coscoef(1)
+            enddo
+            do ic0=ifirst0,ilast0
+               xc(0) = xlo(0)+dx(0)*(dble(ic0-ifirst0)+half)
+               ifr = 1
+               do j=1,(nintervals-1)
+                 if( xc(0) .gt. xmid(j) ) ifr = j+1
+               enddo
+               uval(ic0,ic1,ic2) = i_uval(ifr)
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/fortran/3d/m4bdry3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/fortran/3d/m4bdry3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,167 @@
+define(cell_even,`dnl
+                  uval(ic0,ic1,ic2)=uval($1)
+')dnl
+define(lin_boundary,`dnl
+                  ict$1 = $2
+                  uval0 = uval(ict0,ict1,ict2)
+                  ict$1 = $3
+                  slope=(uval0-uval(ict0,ict1,ict2))/($2-$3)
+                  uval(ic0,ic1,ic2)=uval0 + (ic$1-$2)*slope
+')dnl
+define(fixed_state,`dnl
+                  uval(ic0,ic1,ic2)=bdry_states(1+(sn-1))
+')dnl
+define(symmetry,`dnl
+                  ict$1 = 3*$2-$3-ic$1
+                  uval(ic0,ic1,ic2)=uval(ict0,ict1,ict2)
+')dnl
+define(do_bdry_face,`dnl
+c          write(6,*) "ibdebug ",ibdebug
+c          write(6,*) "iedebug ",iedebug
+           if ((bdry_case.eq.FLOW)) then
+             do ic$2=ibeg$2,iend$2
+               ict$2 = ic$2
+               do ic$3=ibeg$3,iend$3
+                 ict$3 = ic$3
+                 do ic$1=$4
+                   ict$1 = $5
+cell_even(`ict0,ict1,ict2')dnl
+                 enddo
+               enddo
+             enddo
+           else if (bdry_case.eq.LINEAR) then
+             do ic$2=ibeg$2,iend$2
+                ict$2 = ic$2
+                do ic$3=ibeg$3,iend$3
+                   ict$3 = ic$3
+                   do ic$1=$4
+lin_boundary(`$1',`$5',`$6')dnl
+                   enddo
+                enddo
+             enddo
+           else if (bdry_case.eq.FIXED) then
+             do ic$2=ibeg$2,iend$2
+                ict$2 = ic$2
+                do ic$3=ibeg$3,iend$3
+                   ict$3 = ic$3
+                   do ic$1=$4
+                      ict$1 = $5
+fixed_state(`ict0,ict1,ict2')dnl
+                   enddo
+                enddo
+             enddo
+           else if (bdry_case.eq.SYMMETRIC) then
+             do ic$2=ibeg$2,iend$2
+                ict$2 = ic$2
+                do ic$3=ibeg$3,iend$3
+                   ict$3 = ic$3
+                   do ic$1=$4
+symmetry(`$1',`$5',`$6')dnl
+                   enddo
+                enddo
+             enddo
+          endif
+')dnl
+c
+define(do_bdry_node,`dnl
+c          write(6,*) "ibdebug ",ibdebug
+c          write(6,*) "iedebug ",iedebug
+           if ((bdry_case.eq.FLOW)) then
+             do ic0=$1
+                ict0 = $4
+                do ic1=$2
+                   ict1 = ic1
+                   do ic2=$3
+                      ict2 = ic2
+cell_even(`ict0,ict1,ict2')dnl
+                   enddo
+                enddo
+             enddo
+           else if (bdry_case.eq.LINEAR) then
+             do ic0=$1
+                ict0 = $4
+                do ic1=$2
+                   ict1 = ic1
+                   do ic2=$3
+                      ict2 = ic2
+lin_boundary(`0',`$4',`$5')dnl
+                   enddo
+                enddo
+             enddo
+           else if (bdry_case.eq.FIXED) then
+             do ic0=$1
+                ict0 = $4
+                do ic1=$2
+                   ict1 = ic1
+                   do ic2=$3
+                      ict2 = ic2
+fixed_state(`ict0,ict1,ict2')dnl
+                   enddo
+                enddo
+             enddo
+           else if (bdry_case.eq.SYMMETRIC) then
+             do ic0=$1
+                ict0 = $4
+                do ic1=$2
+                   ict1 = ic1
+                   do ic2=$3
+                      ict2 = ic2
+symmetry(`0',`$4',`$5')dnl
+                   enddo
+                enddo
+             enddo
+           endif
+')dnl
+c
+define(do_bdry_edge,`dnl
+c          write(6,*) "ibdebug ",ibdebug
+c          write(6,*) "iedebug ",iedebug
+          if ((bdry_case.eq.FLOW)) then
+            do ic$2=$4
+              ict$2 = ic$2
+              do ic$3=$5
+                ict$3 = ic$3
+                do ic$1=ibeg$1,iend$1
+                   ict$1 = ic$1
+                   ict$2 = $6
+cell_even(`ict0,ict1,ict2')dnl
+                enddo
+              enddo
+            enddo
+          else if (bdry_case.eq.LINEAR) then
+            do ic$2=$4
+              ict$2 = ic$2
+              do ic$3=$5
+                ict$3 = ic$3
+                do ic$1=ibeg$1,iend$1
+                   ict$1 = ic$1
+lin_boundary($2,`$6',`$7')dnl
+                enddo
+              enddo
+            enddo
+          else if (bdry_case.eq.FIXED) then
+            do ic$2=$4
+              ict$2 = ic$2
+              do ic$3=$5
+                ict$3 = ic$3
+                do ic$1=ibeg$1,iend$1
+                   ict$1 = ic$1
+                   ict$2 = $6
+fixed_state(`ict0,ict1,ict2')dnl
+                enddo
+              enddo
+            enddo
+          else if (bdry_case.eq.SYMMETRIC) then
+            do ic$2=$4
+              ict$2 = ic$2
+              do ic$3=$5
+                ict$3 = ic$3
+                do ic$1=ibeg$1,iend$1
+                   ict$1 = ic$1
+symmetry($2,`$6',`$7')dnl
+                enddo
+              enddo
+            enddo
+          endif
+')dnl
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/fortran/3d/m4flux3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/fortran/3d/m4flux3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,51 @@
+define(riemann_solve,`dnl
+c     write(6,*) "checking onedr sol in riemann solve  "
+c     write(6,*) "         dt= ",dt
+      do ic$3=ifirst$3-$6,ilast$3+$6
+         do ic$2=ifirst$2-$5,ilast$2+$5
+           do ie$1=ifirst$1,ilast$1+1
+ 
+             if (advecspeed($1).ge.zero) then
+               riemst= trlft$1(ie$1,$4)
+             else
+               riemst= trrgt$1(ie$1,$4)
+             endif
+             flux$1(ie$1,$4)= dt*riemst*advecspeed($1)
+
+           enddo
+         enddo
+      enddo
+')dnl
+define(correc_flux2d,`dnl
+c   correct the $1-direction with $3-fluxes
+      do ic$5=ifirst$5-1,ilast$5+1
+         do ic$3=ifirst$3,ilast$3
+           do ic$1=ifirst$1-1,ilast$1+1
+             trnsvers=
+     &           (flux$3(ic$3+1,$4)-flux$3(ic$3,$4))*half/dx($3)
+c
+             ttracelft$1(ic$1+1,$2)=tracelft$1(ic$1+1,$2)
+     &                                    - trnsvers
+             ttracergt$1(ic$1  ,$2)=tracergt$1(ic$1  ,$2)
+     &                                    - trnsvers
+           enddo
+         enddo
+      enddo
+')dnl
+define(correc_flux3d,`dnl
+c   correct the $1-direction with $2$3-fluxes
+      do ic$1=ifirst$1-1,ilast$1+1
+         do ic$3=ifirst$3,ilast$3
+           do ic$2=ifirst$2,ilast$2
+             trnsvers=half*(
+     &          (flux$4(ic$2+1,$6)-flux$4(ic$2,$6))/dx($2)+
+     &          (flux$5(ic$3+1,$7)-flux$5(ic$3,$7))/dx($3))
+  
+             tracelft$1(ic$1+1,ic$2,ic$3)=tracelft$1(ic$1+1,ic$2,ic$3)
+     &                                           - trnsvers
+             tracergt$1(ic$1  ,ic$2,ic$3)=tracergt$1(ic$1  ,ic$2,ic$3)
+     &                                           - trnsvers
+           enddo
+         enddo
+      enddo
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/fortran/3d/m4fluxcorner3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/fortran/3d/m4fluxcorner3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,84 @@
+define(st_third,`dnl
+      do ic$3=ifirst$3-1,ilast$3+1
+         do ic$2=ifirst$2-1,ilast$2+1
+           do ic$1=ifirst$1,ilast$1
+             trnsvers=
+     &           (flux$1(ic$1+1,$4)-flux$1(ic$1,$4))/(3*dx($1))
+c
+             st3(ic0,ic1,ic2)=uval(ic0,ic1,ic2) -trnsvers
+           enddo
+         enddo
+      enddo
+')dnl
+define(f_third,`dnl
+c     write(6,*) "checking onedr sol in riemann solve  "
+c     write(6,*) "         dt= ",dt
+      do ic$3=ifirst$3-1,ilast$3+1
+         do ic$2=ifirst$2,ilast$2
+           do ic$1=ifirst$1,ilast$1+1
+ 
+             if (advecspeed($1).ge.zero) then
+               riemst = st3($5)
+             else
+               riemst = st3(ic0,ic1,ic2)
+             endif
+             flux$1(ic$1,$4)= dt*riemst*advecspeed($1)
+           enddo
+         enddo
+      enddo
+')dnl
+define(correc_fluxjt,`dnl
+c   correct the $2-direction with $3-fluxes
+      do ic$3=ifirst$3,ilast$3
+        do ic$1=ifirst$1,ilast$1
+           ic$2=ifirst$2-1
+           trnsvers=half*
+     &        (flux$3(ic$3+1,$4)-flux$3(ic$3,$4))/dx($3)
+  
+           tracelft$2(ic$2+1,ic$1,ic$3)=tracelft$2(ic$2+1,ic$1,ic$3)
+     &                                         - trnsvers
+           do ic$2=ifirst$2,ilast$2
+             trnsvers=half*
+     &          (flux$3(ic$3+1,$4)-flux$3(ic$3,$4))/dx($3)
+  
+             tracelft$2(ic$2+1,ic$1,ic$3)=tracelft$2(ic$2+1,ic$1,ic$3)
+     &                                           - trnsvers
+             tracergt$2(ic$2  ,ic$1,ic$3)=tracergt$2(ic$2  ,ic$1,ic$3)
+     &                                           - trnsvers
+           enddo
+           ic$2=ilast$2+1
+           trnsvers=half*
+     &        (flux$3(ic$3+1,$4)-flux$3(ic$3,$4))/dx($3)
+  
+           tracergt$2(ic$2  ,ic$1,ic$3)=tracergt$2(ic$2  ,ic$1,ic$3)
+     &                                        - trnsvers
+         enddo
+      enddo
+c
+c   correct the $3-direction with $2-fluxes
+      do ic$1=ifirst$1,ilast$1
+        do ic$2=ifirst$2,ilast$2
+           ic$3=ifirst$3-1
+           trnsvers=half*
+     &        (flux$2(ic$2+1,$5)-flux$2(ic$2,$5))/dx($2)
+  
+           tracelft$3(ic$3+1,ic$2,ic$1)=tracelft$3(ic$3+1,ic$2,ic$1)
+     &                                         - trnsvers
+           do ic$3=ifirst$3,ilast$3
+             trnsvers=half*
+     &          (flux$2(ic$2+1,$5)-flux$2(ic$2,$5))/dx($2)
+  
+             tracelft$3(ic$3+1,ic$2,ic$1)=tracelft$3(ic$3+1,ic$2,ic$1)
+     &                                           - trnsvers
+             tracergt$3(ic$3  ,ic$2,ic$1)=tracergt$3(ic$3  ,ic$2,ic$1)
+     &                                           - trnsvers
+           enddo
+           ic$3=ilast$3+1
+           trnsvers=half*
+     &        (flux$2(ic$2+1,$5)-flux$2(ic$2,$5))/dx($2)
+  
+           tracergt$3(ic$3  ,ic$2,ic$1)=tracergt$3(ic$3  ,ic$2,ic$1)
+     &                                        - trnsvers
+         enddo
+      enddo
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/fortran/3d/m4fluxjt3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/fortran/3d/m4fluxjt3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,60 @@
+define(st_third,`dnl
+      do ic$3=ifirst$3-1,ilast$3+1
+         do ic$2=ifirst$2-1,ilast$2+1
+           do ic$1=ifirst$1,ilast$1
+             trnsvers=
+     &           (flux$1(ic$1+1,$4)-flux$1(ic$1,$4))/(3*dx($1))
+c
+             st3_$1(ic0,ic1,ic2)=uval(ic0,ic1,ic2) -trnsvers
+           enddo
+         enddo
+      enddo
+')dnl
+define(f_third,`dnl
+c     write(6,*) "checking onedr sol in riemann solve  "
+c     write(6,*) "         dt= ",dt
+      do ic$3=ifirst$3-1,ilast$3+1
+         do ic$2=ifirst$2,ilast$2
+           do ic$1=ifirst$1,ilast$1+1
+ 
+             if (advecspeed($1).ge.zero) then
+               riemst = st3_$2($5)
+             else
+               riemst = st3_$2(ic0,ic1,ic2)
+             endif
+             flux$1$2(ic$1,$4)= dt*riemst*advecspeed($1)
+           enddo
+         enddo
+      enddo
+')dnl
+define(correc_fluxjt,`dnl
+c   correct the $1-direction with $2$3-fluxes
+      do ic$3=ifirst$3,ilast$3
+        do ic$2=ifirst$2,ilast$2
+           ic$1=ifirst$1-1
+           trnsvers=0.5*(
+     &        (flux$2$3(ic$2+1,$4)-flux$2$3(ic$2,$4))/dx($2)+
+     &        (flux$3$2(ic$3+1,$5)-flux$3$2(ic$3,$5))/dx($3))
+  
+           tracelft$1(ic$1+1,ic$2,ic$3)=tracelft$1(ic$1+1,ic$2,ic$3)
+     &                                         - trnsvers
+           do ic$1=ifirst$1,ilast$1
+             trnsvers=0.5*(
+     &          (flux$2$3(ic$2+1,$4)-flux$2$3(ic$2,$4))/dx($2)+
+     &          (flux$3$2(ic$3+1,$5)-flux$3$2(ic$3,$5))/dx($3))
+  
+             tracelft$1(ic$1+1,ic$2,ic$3)=tracelft$1(ic$1+1,ic$2,ic$3)
+     &                                           - trnsvers
+               tracergt$1(ic$1  ,ic$2,ic$3)=tracergt$1(ic$1  ,ic$2,ic$3)
+     &                                           - trnsvers
+           enddo
+           ic$1=ilast$1+1
+           trnsvers=0.5*(
+     &        (flux$2$3(ic$2+1,$4)-flux$2$3(ic$2,$4))/dx($2)+
+     &        (flux$3$2(ic$3+1,$5)-flux$3$2(ic$3,$5))/dx($3))
+  
+           tracergt$1(ic$1  ,ic$2,ic$3)=tracergt$1(ic$1  ,ic$2,ic$3)
+     &                                        - trnsvers
+         enddo
+      enddo
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/fortran/3d/m4trace3d.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/fortran/3d/m4trace3d.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,39 @@
+define(trace_init,`dnl
+      do  ic$3=ifirst$3-FACEG,ilast$3+FACEG
+         do  ic$2=ifirst$2-FACEG,ilast$2+FACEG
+           ie$1=ifirst$1-FACEG
+           tracergt$1(ie$1,ic$2,ic$3)=uval($5)
+           tracelft$1(ie$1,ic$2,ic$3)=uval($5)
+
+           do  ie$1=ifirst$1+1-FACEG,ilast$1+FACEG
+             tracelft$1(ie$1,ic$2,ic$3)=uval($4)
+             tracergt$1(ie$1,ic$2,ic$3)=uval($5)
+           enddo
+
+           ie$1=ilast$1+FACEG+1
+           tracelft$1(ie$1,ic$2,ic$3)=uval($4)
+           tracergt$1(ie$1,ic$2,ic$3)=uval($4)
+         enddo
+      enddo
+
+ 
+')dnl
+define(trace_call,`dnl
+        do ic$3=ifirst$3-2,ilast$3+2
+          do ic$2=ifirst$2-2,ilast$2+2
+              do ic$1=ifirst$1-FACEG,ilast$1+FACEG
+                ttraclft(ic$1) = tracelft(ic$1,ic$2,ic$3)
+                ttracrgt(ic$1) = tracergt(ic$1,ic$2,ic$3)
+              enddo
+   
+            call trace(dt,ifirst$1,ilast$1,mc,
+     &        dx,idir,advecspeed,igdnv,
+     &        ttraclft,ttracrgt,
+     &        ttcelslp,ttedgslp)
+            do ic$1=ifirst$1-FACEG,ilast$1+FACEG
+                tracelft(ic$1,ic$2,ic$3) = ttraclft(ic$1)
+                tracergt(ic$1,ic$2,ic$3) = ttracrgt(ic$1)
+            enddo
+          enddo
+        enddo
+')dnl
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/fortran/3d/stable3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/fortran/3d/stable3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,52 @@
+define(NDIM,3)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine stabledt3d(dx,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  ngc0,ngc1,ngc2,
+     &  advecspeed,uval,stabdt)
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+include(FORTDIR/const.i)dnl
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      REAL stabdt,dx(0:NDIM-1)
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     & ngc0,ngc1,ngc2
+c
+      REAL
+     &  advecspeed(0:NDIM-1),
+     &  uval(CELL3dVECG(ifirst,ilast,ngc))
+c
+      REAL maxspeed(0:NDIM-1)
+c
+      maxspeed(0)=zero
+      maxspeed(1)=zero
+      maxspeed(2)=zero
+
+      maxspeed(0) = max(maxspeed(0), abs(advecspeed(0)))
+      maxspeed(1) = max(maxspeed(1), abs(advecspeed(1)))
+      maxspeed(2) = max(maxspeed(2), abs(advecspeed(2)))
+
+c     Do the following with checks for zero
+c      stabdt = min((dx(1)/maxspeed(1)),(dx(0)/maxspeed(0)))
+c      stabdt = min((dx(2)/maxspeed(2)),stabdt)
+
+      if ( maxspeed(0) .EQ. 0.0 ) then
+         if( maxspeed(1) .EQ. 0.0 ) then
+            stabdt = 1.0E9
+         else 
+            stabdt = dx(1)/maxspeed(1)
+         endif
+      elseif ( maxspeed(1) .EQ. 0.0 ) then
+            stabdt = dx(0)/maxspeed(0) 
+      else
+         stabdt = min((dx(1)/maxspeed(1)),(dx(0)/maxspeed(0)))
+      endif
+
+      if (maxspeed(2) .NE. 0.0 ) then
+         stabdt = min((dx(2)/maxspeed(2)),stabdt)
+      endif
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/fortran/3d/stufprobc3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/fortran/3d/stufprobc3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,28 @@
+      subroutine stufprobc3d(
+     &  PIECEWISE_CONSTANT_Xin,PIECEWISE_CONSTANT_Yin,
+     &  PIECEWISE_CONSTANT_Zin,
+     &  SINE_CONSTANT_Xin,SINE_CONSTANT_Yin,SINE_CONSTANT_Zin,
+     &  SPHEREin,
+     &  CELLGin,FACEGin,FLUXGin)
+      implicit none
+      integer 
+     &  PIECEWISE_CONSTANT_Xin,PIECEWISE_CONSTANT_Yin,
+     &  PIECEWISE_CONSTANT_Zin,
+     &  SINE_CONSTANT_Xin,SINE_CONSTANT_Yin,SINE_CONSTANT_Zin,
+     &  SPHEREin,
+     &  CELLGin,FACEGin,FLUXGin
+include(FORTDIR/probparams.i)dnl
+
+      PIECEWISE_CONSTANT_X=PIECEWISE_CONSTANT_Xin
+      PIECEWISE_CONSTANT_Y=PIECEWISE_CONSTANT_Yin
+      PIECEWISE_CONSTANT_Z=PIECEWISE_CONSTANT_Zin
+      SINE_CONSTANT_X=SINE_CONSTANT_Xin
+      SINE_CONSTANT_Y=SINE_CONSTANT_Yin  
+      SINE_CONSTANT_Z=SINE_CONSTANT_Zin
+      SPHERE=SPHEREin
+      CELLG=CELLGin
+      FACEG=FACEGin
+      FLUXG=FLUXGin
+
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/fortran/3d/trace1d3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/fortran/3d/trace1d3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,94 @@
+define(NEQU,1)dnl
+define(REAL,`double precision')dnl
+
+      subroutine trace3d(dt,ifirst,ilast,mc,
+     &  dx,dir,advecspeed,igdnv,
+     &  tracelft,tracergt,
+     &  celslope,edgslope)
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      REAL dt
+      integer ifirst,ilast,mc,dir,igdnv
+      REAL dx,advecspeed
+c
+      REAL
+     &  celslope(ifirst-CELLG:ifirst+mc-1+CELLG),
+c       side variables
+     &  tracelft(ifirst-FACEG:ifirst+mc+FACEG),
+     &  tracergt(ifirst-FACEG:ifirst+mc+FACEG),
+     &  edgslope(ifirst-FACEG:ifirst+mc+FACEG)
+c
+      integer ie,ic
+      REAL bound,coef4,slope2,dtdx,slope4
+      REAL du,nu
+c
+c***********************************************************************
+c     ******************************************************************
+c     * check for inflection points in characteristic speeds
+c     * compute slopes at cell edges
+c     * zero slopes if neighboring cells have different loading
+c     ******************************************************************
+      do ie=ifirst+1-FACEG,ilast+FACEG
+          edgslope(ie)=tracergt(ie)-tracelft(ie)
+      enddo
+c     ******************************************************************
+c     * limit slopes
+c     ******************************************************************
+        do ic=ifirst+1-CELLG,ilast+CELLG-1
+          celslope(ic)=zero
+        enddo
+      if (igdnv.eq.2) then
+c       write(6,*) "second-order slopes"
+c       ****************************************************************
+c       * second-order slopes
+c       ****************************************************************
+          do ic=ifirst+1-CELLG,ilast+CELLG-1
+            slope2=half*(edgslope(ic)+edgslope(ic+1))
+            celslope(ic)=half*(edgslope(ic)+edgslope(ic+1))
+            if (edgslope(ic)*edgslope(ic+1).le.zero) then
+              celslope(ic)=zero
+            else
+              bound=min(abs(edgslope(ic)),abs(edgslope(ic+1)))
+              celslope(ic)=sign(min(two*bound,abs(slope2)),slope2)
+            endif
+c            write(6,*) "ic,celslope= ", ic,celslope(ic)
+c            call flush(6)
+          enddo
+      else if (igdnv.eq.4) then
+c       write(6,*) "fourth-order slopes"
+c       ****************************************************************
+c       * fourth-order slopes
+c       ****************************************************************
+          do ic=ifirst+2-CELLG,ilast+CELLG-2
+            slope4=fourth*(tracergt(ic+2)-tracergt(ic-2))
+            celslope(ic)=half*(edgslope(ic)+edgslope(ic+1))
+            coef4=third*(four*celslope(ic)-slope4)
+            if (edgslope(ic)*edgslope(ic+1).le.zero .or.
+     &      coef4*celslope(ic).lt.zero) then
+              celslope(ic)=zero
+            else
+              bound=min(abs(edgslope(ic)),abs(edgslope(ic+1)))
+              celslope(ic)=sign(min(two*bound,abs(coef4)),coef4)
+            endif
+          enddo
+      endif
+c     ******************************************************************
+c     * characteristic projection
+c     ******************************************************************
+      dtdx=dt/dx
+      nu = advecspeed*dtdx
+      do ic=ifirst-1,ilast+1
+        du = celslope(ic)
+        if (nu.gt.0) then
+          tracelft(ic+1) = tracelft(ic+1) + half*(one -nu)*du
+          tracergt(ic) = tracergt(ic)
+        else
+          tracelft(ic+1) = tracelft(ic+1)
+          tracergt(ic) = tracergt(ic) -half*(one + nu)*du
+        endif
+      enddo
+      return
+      end
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/fortran/3d/trace3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/fortran/3d/trace3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,218 @@
+define(NDIM,3)dnl
+define(REAL,`double precision')dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+include(FORTDIR/3d/m4trace3d.i)dnl
+
+      subroutine inittraceflux3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  uval,
+     &  tracelft0,tracelft1,tracelft2,
+     &  tracergt0,tracergt1,tracergt2,
+     &  fluxriem0,fluxriem1,fluxriem2)
+c***********************************************************************
+      implicit none
+include(FORTDIR/const.i)dnl
+include(FORTDIR/probparams.i)dnl
+c***********************************************************************
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      REAL
+     &     uval(CELL3d(ifirst,ilast,CELLG)),
+     &     fluxriem0(FACE3d0(ifirst,ilast,FLUXG)),
+     &     tracelft0(FACE3d0(ifirst,ilast,FACEG)),
+     &     tracergt0(FACE3d0(ifirst,ilast,FACEG)),
+     &     fluxriem1(FACE3d1(ifirst,ilast,FLUXG)),
+     &     tracelft1(FACE3d1(ifirst,ilast,FACEG)),
+     &     tracergt1(FACE3d1(ifirst,ilast,FACEG)),
+     &     fluxriem2(FACE3d2(ifirst,ilast,FLUXG)),
+     &     tracelft2(FACE3d2(ifirst,ilast,FACEG)),
+     &     tracergt2(FACE3d2(ifirst,ilast,FACEG))
+c***********************************************************************
+c initialize left and right states at cell edges
+c (first-order upwind)
+c***********************************************************************
+c
+      integer ic0,ic1,ie0,ie1,ic2,ie2
+c***********************************************************************
+
+trace_init(0,1,2,`ie0-1,ic1,ic2',`ie0,ic1,ic2')dnl
+
+trace_init(1,2,0,`ic0,ie1-1,ic2',`ic0,ie1,ic2')dnl
+
+trace_init(2,0,1,`ic0,ic1,ie2-1',`ic0,ic1,ie2')dnl
+
+c
+c     we initialize the flux to be zero
+
+      do ic2=ifirst2-FLUXG,ilast2+FLUXG
+         do ic1=ifirst1-FLUXG,ilast1+FLUXG
+           do ie0=ifirst0-FLUXG,ilast0+FLUXG+1
+               fluxriem0(ie0,ic1,ic2) = zero
+           enddo
+         enddo
+      enddo
+c
+      do ic2=ifirst2-FLUXG,ilast2+FLUXG
+         do ic0=ifirst0-FLUXG,ilast0+FLUXG
+            do ie1=ifirst1-FLUXG,ilast1+FLUXG+1
+                 fluxriem1(ie1,ic2,ic0) = zero
+            enddo
+         enddo
+      enddo
+c
+      do ic1=ifirst1-FLUXG,ilast1+FLUXG
+         do ic0=ifirst0-FLUXG,ilast0+FLUXG
+            do ie2=ifirst2-FLUXG,ilast2+FLUXG+1
+                 fluxriem2(ie2,ic0,ic1) = zero
+            enddo
+         enddo
+      enddo
+c
+c      call flush(6)
+      return
+      end 
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+c
+      subroutine chartracing3d0(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  mc,
+     &  dx,
+     &  advecspeed,igdnv,
+     &  uval,
+     &  tracelft,tracergt,
+     &  ttcelslp,ttedgslp,
+     &  ttraclft,ttracrgt)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer mc,igdnv
+      REAL dt 
+c variables in 1d axis indexed
+      REAL 
+     &     dx,advecspeed
+c variables in 2d axis indexed         
+      REAL
+     &     uval(CELL3d(ifirst,ilast,CELLG)),
+     &     tracelft(FACE3d0(ifirst,ilast,FACEG)),
+     &     tracergt(FACE3d0(ifirst,ilast,FACEG))
+c  side variables ifirst0 to ifirst0+mc plus ghost cells
+      REAL
+     & ttedgslp(ifirst0-FACEG:ifirst0+mc+FACEG),
+     & ttraclft(ifirst0-FACEG:ifirst0+mc+FACEG),
+     & ttracrgt(ifirst0-FACEG:ifirst0+mc+FACEG)
+c  cell variables ifirst0 to ifirst0+mc-1 plus ghost cells
+      REAL 
+     &  ttcelslp(ifirst0-CELLG:ifirst0+mc-1+CELLG)
+c***********************************************************************
+      integer ic0,ic1,ic2,idir
+c***********************************************************************
+c trace higher order states at cell edges
+c***********************************************************************
+      idir = 0
+trace_call(0,1,2)dnl
+c***********************************************************************
+      return
+      end
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine chartracing3d1(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  mc,
+     &  dx,
+     &  advecspeed,igdnv,
+     &  uval,
+     &  tracelft,tracergt,
+     &  ttcelslp,ttedgslp,
+     &  ttraclft,ttracrgt)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer mc,igdnv
+      REAL dt 
+c variables in 1d axis indexed
+      REAL 
+     &     dx,advecspeed
+c variables in 2d axis indexed         
+      REAL
+     &     uval(CELL3d(ifirst,ilast,CELLG)),
+     &     tracelft(FACE3d1(ifirst,ilast,FACEG)),
+     &     tracergt(FACE3d1(ifirst,ilast,FACEG))
+      REAL
+     & ttedgslp(ifirst1-FACEG:ifirst1+mc+FACEG),
+     & ttraclft(ifirst1-FACEG:ifirst1+mc+FACEG),
+     & ttracrgt(ifirst1-FACEG:ifirst1+mc+FACEG)
+c  cell variables ifirst1 to ifirst1+mc-1 plus ghost cells
+      REAL 
+     &  ttcelslp(ifirst1-CELLG:ifirst1+mc-1+CELLG)
+c***********************************************************************
+      integer ic0,ic1,ic2,idir
+c***********************************************************************
+c trace higher order states at cell edges
+c***********************************************************************
+      idir = 1
+trace_call(1,2,0)dnl
+c***********************************************************************
+      return
+      end
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+      subroutine chartracing3d2(dt,
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  mc,
+     &  dx,
+     &  advecspeed,igdnv,
+     &  uval,
+     &  tracelft,tracergt,
+     &  ttcelslp,ttedgslp,
+     &  ttraclft,ttracrgt)
+c***********************************************************************
+      implicit none
+include(FORTDIR/probparams.i)dnl
+
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer mc,igdnv
+      REAL dt 
+c variables in 1d axis indexed
+      REAL 
+     &     dx,advecspeed
+c variables in 2d axis indexed         
+      REAL
+     &     uval(CELL3d(ifirst,ilast,CELLG)),
+     &     tracelft(FACE3d2(ifirst,ilast,FACEG)),
+     &     tracergt(FACE3d2(ifirst,ilast,FACEG))
+      REAL
+     & ttedgslp(ifirst2-FACEG:ifirst2+mc+FACEG),
+     & ttraclft(ifirst2-FACEG:ifirst2+mc+FACEG),
+     & ttracrgt(ifirst2-FACEG:ifirst2+mc+FACEG)
+c  cell variables ifirst2 to ifirst2+mc-1 plus ghost cells
+      REAL 
+     &  ttcelslp(ifirst2-CELLG:ifirst2+mc-1+CELLG)
+c***********************************************************************
+      integer ic0,ic1,ic2,idir
+c***********************************************************************
+c trace higher order states at cell edges
+c***********************************************************************
+      idir = 2
+trace_call(2,0,1)dnl
+c***********************************************************************
+      return
+      end
+c
+c***********************************************************************
+c***********************************************************************
+c***********************************************************************
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/fortran/const.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/fortran/const.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,17 @@
+      REAL zero,sixth,fourth,third,half,twothird,rt75,one,
+     &  onept5,two,three,pi,four,seven,smallr
+      parameter (zero=0.d0)
+      parameter (sixth=0.16666666666667d0)
+      parameter (fourth=.25d0)
+      parameter (third=.333333333333333d0)
+      parameter (half=.5d0)
+      parameter (twothird=.66666666666667d0)
+      parameter (rt75=.8660254037844d0)
+      parameter (one=1.d0)
+      parameter (onept5=1.5d0)
+      parameter (two=2.d0)
+      parameter (three=3.d0)
+      parameter(pi=3.14159265358979323846d0)
+      parameter (four=4.d0)
+      parameter (seven=7.d0)
+      parameter (smallr=1.0d-32)
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/fortran/probparams.i
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/fortran/probparams.i	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,8 @@
+      common/probparams/
+     &  PIECEWISE_CONSTANT_X,PIECEWISE_CONSTANT_Y,PIECEWISE_CONSTANT_Z,
+     &  SINE_CONSTANT_X,SINE_CONSTANT_Y,SINE_CONSTANT_Z,SPHERE,
+     &  CELLG,FACEG,FLUXG
+      integer 
+     &  PIECEWISE_CONSTANT_X,PIECEWISE_CONSTANT_Y,PIECEWISE_CONSTANT_Z,
+     &  SINE_CONSTANT_X,SINE_CONSTANT_Y,SINE_CONSTANT_Z,SPHERE,
+     &  CELLG,FACEG,FLUXG
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/main.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/main.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,650 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program for SAMRAI Linear Advection example problem. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string>
+#include <fstream>
+using namespace std;
+
+#ifndef _MSC_VER
+#include <unistd.h>
+#endif
+
+#include <sys/stat.h>
+
+// Headers for basic SAMRAI objects
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/InputDatabase.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+// Headers for major algorithm/data structure objects
+
+#include "SAMRAI/mesh/BergerRigoutsos.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/mesh/GriddingAlgorithm.h"
+#include "SAMRAI/algs/HyperbolicLevelIntegrator.h"
+#include "SAMRAI/mesh/TreeLoadBalancer.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/mesh/StandardTagAndInitialize.h"
+#include "SAMRAI/algs/TimeRefinementIntegrator.h"
+#include "SAMRAI/algs/TimeRefinementLevelStrategy.h"
+#include "SAMRAI/appu/VisItDataWriter.h"
+
+#define RECORD_STATS
+//#undef RECORD_STATS
+
+// Header for application-specific algorithm/data structure object
+
+#include "LinAdv.h"
+#include "SinusoidalFrontTagger.h"
+
+// Classes for run-time plotting and autotesting.
+
+#if (TESTING == 1)
+#include "AutoTester.h"
+#endif
+
+using namespace SAMRAI;
+
+/*
+ ************************************************************************
+ *
+ * This is the main program for an AMR solution of the linear advection
+ * equation: du/dt + div(a*u) = 0, where  "u" is a scalar-valued
+ * function and "a" is a constant vector.  This application program is
+ * constructed by composing several algorithm objects found in the
+ * SAMRAI library with a few that are specific to this application.
+ * A brief description of these object follows.
+ *
+ * There are two main data containment objects.  These are:
+ *
+ * hier::PatchHierarchy - A container for the AMR patch hierarchy and
+ *    the data on the grid.
+ *
+ * geom::CartesianGridGeometry - Defines and maintains the Cartesian
+ *    coordinate system on the grid.  The hier::PatchHierarchy
+ *    maintains a reference to this object.
+ *
+ * A single overarching algorithm object drives the time integration
+ * and adaptive gridding processes:
+ *
+ * algs::TimeRefinementIntegrator - Coordinates time integration and
+ *    adaptive gridding procedures for the various levels
+ *    in the AMR patch hierarchy.  Local time refinement is
+ *    employed during hierarchy integration; i.e., finer
+ *    levels are advanced using smaller time increments than
+ *    coarser level.  Thus, this object also invokes data
+ *    synchronization procedures which couple the solution on
+ *    different patch hierarchy levels.
+ *
+ * The time refinement integrator is not specific to the numerical
+ * methods used and the problem being solved.   It maintains references
+ * to two other finer grain algorithmic objects that are more specific
+ * to the problem at hand and with which it is configured when they are
+ * passed into its constructor.   These finer grain algorithm objects
+ * are:
+ *
+ * algs::HyperbolicLevelIntegrator - Defines data management procedures
+ *    for level integration, data synchronization between levels,
+ *    and tagging cells for refinement.  These operations are
+ *    tailored to explicit time integration algorithms used for
+ *    hyperbolic systems of conservation laws, such as the Euler
+ *    equations.  This integrator manages data for numerical
+ *    routines that treat individual patches in the AMR patch
+ *    hierarchy.  In this particular application, it maintains a
+ *    pointer to the LinAdv object that defines variables and
+ *    provides numerical routines for the linear advection problem.
+ *
+ *    LinAdv - Defines variables and numerical routines for the
+ *       discrete linear advection equation on each patch in the
+ *       AMR hierarchy.
+ *
+ * mesh::GriddingAlgorithm - Drives the AMR patch hierarchy generation
+ *    and regridding procedures.  This object maintains
+ *    references to three other algorithmic objects with
+ *    which it is configured when they are passed into its
+ *    constructor.   They are:
+ *
+ *    mesh::BergerRigoutsos - Clusters cells tagged for refinement on a
+ *       patch level into a collection of logically-rectangular
+ *       box domains.
+ *
+ *    mesh::LoadBalancer - Processes the boxes generated by the
+ *       mesh::BergerRigoutsos algorithm into a configuration from
+ *       which patches are contructed.  The algorithm used in this
+ *       class assumes a spatially-uniform workload distribution;
+ *       thus, it attempts to produce a collection of boxes
+ *       each of which contains the same number of cells.  The
+ *       load balancer also assigns patches to processors.
+ *
+ *    mesh::StandardTagAndInitialize - Couples the gridding algorithm
+ *       to the HyperbolicIntegrator. Selects cells for
+ *       refinement based on either Gradient detection, Richardson
+ *       extrapolation, or pre-defined Refine box region.  The
+ *       object maintains a pointer to the algs::HyperbolicLevelIntegrator,
+ *       which is passed into its constructor, for this purpose.
+ *
+ ************************************************************************
+ */
+
+/*
+ *******************************************************************
+ *
+ * For each run, the input filename and restart information
+ * (if needed) must be given on the command line.
+ *
+ *   For non-restarted case, command line is:
+ *
+ *       executable <input file name>
+ *
+ *   For restarted run, command line is:
+ *
+ *       executable <input file name> <restart directory> \
+ *                  <restart number>
+ *
+ *******************************************************************
+ */
+
+int main(
+   int argc,
+   char* argv[])
+{
+
+   using namespace SAMRAI::tbox;
+
+   /*
+    * Initialize MPI and SAMRAI, enable logging, and process command line.
+    */
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+   tbox::SAMRAI_MPI mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   int num_failures = 0;
+
+   {
+      string input_filename;
+      string restart_read_dirname;
+      int restore_num = 0;
+      string case_name;
+
+      bool is_from_restart = false;
+
+      if ((argc != 2) && (argc != 3) && (argc != 4)) {
+         tbox::pout << "USAGE:\n"
+         << argv[0] << " <input filename> "
+         << "or\n"
+         << argv[0] << " <input filename> <case name>"
+         << "or\n"
+         << argv[0] << " <input filename> "
+                    << "  <restart dir> <restore number> [options]\n"
+                    << "  options:\n"
+                    << "  none at this time"
+                    << endl;
+         tbox::SAMRAI_MPI::abort();
+         return -1;
+      } else {
+         input_filename = argv[1];
+
+         if (argc == 3) {
+            case_name = argv[2];
+         }
+         if (argc == 4) {
+            restart_read_dirname = argv[2];
+            restore_num = atoi(argv[3]);
+
+            is_from_restart = true;
+         }
+      }
+
+      pout << "input_filename = " << input_filename << endl;
+      pout << "restart_read_dirname = " << restart_read_dirname << endl;
+      pout << "restore_num = " << restore_num << endl;
+
+      /*
+       * Create input database and parse all data in input file.
+       */
+
+      Pointer<Database> input_db(new InputDatabase("input_db"));
+      InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      if (input_db->isDatabase("TimerManager")) {
+         tbox::TimerManager::createManager(input_db->getDatabase("TimerManager"));
+      }
+
+      tbox::Pointer<tbox::Timer> t_vis_writing =
+         tbox::TimerManager::getManager()->
+         getTimer("apps::Main::vis_writing");
+
+      /*
+       * Retrieve "Main" section of the input database.  First, read
+       * dump information, which is used for writing plot files.
+       * Second, if proper restart information was given on command
+       * line, and the restart interval is non-zero, create a restart
+       * database.
+       */
+
+      Pointer<Database> main_db = input_db->getDatabase("Main");
+
+      const tbox::Dimension dim(static_cast<unsigned short>(main_db->getInteger("dim")));
+
+      bool use_scaled_input = main_db->getBoolWithDefault("use_scaled_input",
+            true);
+
+      string scaled_input_str =
+         string("ScaledInput")
+         + (use_scaled_input ? tbox::Utilities::intToString(mpi.getSize())
+            : string());
+      Pointer<Database> scaled_input_db = input_db->getDatabase(
+            scaled_input_str);
+
+      string base_name = main_db->getStringWithDefault("base_name", "unnamed");
+
+      /*
+       * Modify basename for this particular run.
+       * Add the number of processes and the case name.
+       */
+      if (!case_name.empty()) {
+         base_name = base_name + '-' + case_name;
+      }
+      base_name = base_name + '-' + tbox::Utilities::intToString(
+            mpi.getSize(),
+            5);
+
+      /*
+       * Logging.
+       */
+      string log_filename = base_name + ".log";
+      log_filename =
+         main_db->getStringWithDefault("log_filename", base_name + ".log");
+
+      bool log_all_nodes = false;
+      log_all_nodes =
+         main_db->getBoolWithDefault("log_all_nodes", log_all_nodes);
+      if (log_all_nodes) {
+         PIO::logAllNodes(log_filename);
+      } else {
+         PIO::logOnlyNodeZero(log_filename);
+      }
+
+      int viz_dump_interval = 0;
+      if (main_db->keyExists("viz_dump_interval")) {
+         viz_dump_interval = main_db->getInteger("viz_dump_interval");
+      }
+
+      Array<string> viz_writer(1);
+      const string viz_dump_dirname = main_db->getStringWithDefault(
+            "viz_dump_dirname", base_name + ".visit");
+      int visit_number_procs_per_file = 1;
+
+      const bool viz_dump_data = (viz_dump_interval > 0);
+
+      int restart_interval = 0;
+      if (main_db->keyExists("restart_interval")) {
+         restart_interval = main_db->getInteger("restart_interval");
+      }
+
+      string restart_write_dirname;
+      if (restart_interval > 0) {
+         if (main_db->keyExists("restart_write_dirname")) {
+            restart_write_dirname = main_db->getString("restart_write_dirname");
+         } else {
+            TBOX_ERROR("restart_interval > 0, but key `restart_write_dirname'"
+               << " not specifed in input file");
+         }
+      }
+
+      bool use_refined_timestepping = true;
+      if (main_db->keyExists("timestepping")) {
+         string timestepping_method = main_db->getString("timestepping");
+         if (timestepping_method == "SYNCHRONIZED") {
+            use_refined_timestepping = false;
+         }
+      }
+
+#if (TESTING == 1) && !(HAVE_HDF5)
+      /*
+       * If we are autotesting on a system w/o HDF5, the read from
+       * restart will result in an error.  We want this to happen
+       * for users, so they know there is a problem with the restart,
+       * but we don't want it to happen when autotesting.
+       */
+      is_from_restart = false;
+      restart_interval = 0;
+#endif
+
+      const bool write_restart = (restart_interval > 0)
+         && !(restart_write_dirname.empty());
+
+      /*
+       * Get the restart manager and root restart database.  If run is from
+       * restart, open the restart file.
+       */
+
+      RestartManager* restart_manager = RestartManager::getManager();
+
+      if (is_from_restart) {
+         restart_manager->
+         openRestartFile(restart_read_dirname, restore_num,
+            mpi.getSize());
+      }
+
+      /*
+       * Create major algorithm and data objects which comprise application.
+       * Each object will be initialized either from input data or restart
+       * files, or a combination of both.  Refer to each class constructor
+       * for details.  For more information on the composition of objects
+       * for this application, see comments at top of file.
+       */
+
+      Pointer<geom::CartesianGridGeometry> grid_geometry(
+         new geom::CartesianGridGeometry(dim,
+            "CartesianGeometry",
+            scaled_input_db->getDatabase("CartesianGeometry")));
+
+      Pointer<hier::PatchHierarchy> patch_hierarchy(
+         new hier::PatchHierarchy("PatchHierarchy", grid_geometry,
+            input_db->getDatabase("PatchHierarchy")));
+
+      const bool use_analytical_tagger =
+         input_db->isDatabase("SinusoidalFrontTagger");
+
+      SinusoidalFrontTagger
+      analytical_tagger(
+         "SinusoidalFrontTagger",
+         dim,
+         input_db->getDatabaseWithDefault("SinusoidalFrontTagger",
+            tbox::Pointer<SAMRAI::tbox::Database>(NULL)).getPointer());
+      analytical_tagger.resetHierarchyConfiguration(patch_hierarchy, 0, 3);
+
+      LinAdv* linear_advection_model = new LinAdv(
+            "LinAdv",
+            dim,
+            input_db->getDatabase("LinAdv"),
+            grid_geometry,
+            use_analytical_tagger ? &analytical_tagger : NULL
+            );
+
+      tbox::Pointer<tbox::Database> hli_db =
+         scaled_input_db->isDatabase("HyperbolicLevelIntegrator") ?
+         scaled_input_db->getDatabase("HyperbolicLevelIntegrator") :
+         input_db->getDatabase("HyperbolicLevelIntegrator");
+      Pointer<algs::HyperbolicLevelIntegrator> hyp_level_integrator(
+         new algs::HyperbolicLevelIntegrator(
+            "HyperbolicLevelIntegrator",
+            hli_db,
+            linear_advection_model, true, use_refined_timestepping));
+
+      Pointer<mesh::StandardTagAndInitialize> error_detector(
+         new mesh::StandardTagAndInitialize(dim,
+            "StandardTagAndInitialize",
+            hyp_level_integrator,
+            input_db->getDatabase("StandardTagAndInitialize")));
+
+      Pointer<Database> abr_db =
+         input_db->getDatabase("BergerRigoutsos");
+      Pointer<mesh::BergerRigoutsos>
+      new_box_generator(new mesh::BergerRigoutsos(dim, abr_db));
+      Pointer<mesh::BoxGeneratorStrategy> box_generator =
+         Pointer<mesh::BoxGeneratorStrategy>(new_box_generator);
+
+      Pointer<mesh::TreeLoadBalancer> load_balancer(
+         new mesh::TreeLoadBalancer(dim,
+            "mesh::TreeLoadBalancer",
+            input_db->getDatabase("TreeLoadBalancer")));
+      load_balancer->setSAMRAI_MPI(tbox::SAMRAI_MPI::getSAMRAIWorld());
+      Pointer<mesh::TreeLoadBalancer> load_balancer0(
+         new mesh::TreeLoadBalancer(dim,
+            "mesh::TreeLoadBalancer0",
+            input_db->getDatabase("TreeLoadBalancer")));
+      load_balancer0->setSAMRAI_MPI(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+      Pointer<mesh::GriddingAlgorithm> gridding_algorithm(
+         new mesh::GriddingAlgorithm(
+            patch_hierarchy,
+            "GriddingAlgorithm",
+            input_db->getDatabase("GriddingAlgorithm"),
+            error_detector,
+            box_generator,
+            load_balancer,
+            load_balancer0));
+
+      Pointer<algs::TimeRefinementIntegrator> time_integrator(
+         new algs::TimeRefinementIntegrator("TimeRefinementIntegrator",
+            input_db->getDatabase(
+               "TimeRefinementIntegrator"),
+            patch_hierarchy,
+            hyp_level_integrator,
+            gridding_algorithm));
+
+      // VisitDataWriter is only present if HDF is available
+#ifdef HAVE_HDF5
+      Pointer<appu::VisItDataWriter> visit_data_writer(
+         new appu::VisItDataWriter(dim,
+            "LinAdv VisIt Writer",
+            viz_dump_dirname,
+            visit_number_procs_per_file));
+      linear_advection_model->
+      registerVisItDataWriter(visit_data_writer);
+#endif
+
+      /*
+       * Initialize hierarchy configuration and data on all patches.
+       * Then, close restart file and write initial state for visualization.
+       */
+
+      tbox::SAMRAI_MPI::getSAMRAIWorld().Barrier(); // For timing.
+      double dt_now = time_integrator->initializeHierarchy();
+
+      RestartManager::getManager()->closeRestartFile();
+
+#if (TESTING == 1)
+      /*
+       * Create the autotesting object which will verify correctness
+       * of the problem. If no automated testing is done, the object does
+       * not get used.
+       */
+      AutoTester autotester("AutoTester", input_db);
+#endif
+
+      /*
+       * After creating all objects and initializing their state, we
+       * print the input database and variable database contents
+       * to the log file.
+       */
+
+      if (mpi.getRank() == 0) {
+         plog << "\nCheck input data and variables before simulation:" << endl;
+         plog << "Input database..." << endl;
+         input_db->printClassData(plog);
+         plog << "\nVariable database..." << endl;
+         hier::VariableDatabase::getDatabase()->printClassData(plog);
+
+         plog << "\nCheck Linear Advection data... " << endl;
+         linear_advection_model->printClassData(plog);
+      }
+
+      if (viz_dump_data) {
+#ifdef HAVE_HDF5
+         t_vis_writing->start();
+         visit_data_writer->writePlotData(
+            patch_hierarchy,
+            time_integrator->getIntegratorStep(),
+            time_integrator->getIntegratorTime());
+         t_vis_writing->stop();
+#endif
+      }
+
+      /*
+       * Time step loop.  Note that the step count and integration
+       * time are maintained by algs::TimeRefinementIntegrator.
+       */
+
+      double loop_time = time_integrator->getIntegratorTime();
+      double loop_time_end = time_integrator->getEndTime();
+
+      int iteration_num = time_integrator->getIntegratorStep();
+
+#if (TESTING == 1)
+      /*
+       * If we are doing autotests, check result...
+       */
+      num_failures += autotester.evalTestData(iteration_num,
+            patch_hierarchy,
+            time_integrator,
+            hyp_level_integrator,
+            gridding_algorithm);
+#endif
+
+      while ((loop_time < loop_time_end) &&
+             time_integrator->stepsRemaining()) {
+
+         iteration_num = time_integrator->getIntegratorStep() + 1;
+
+         pout << "++++++++++++++++++++++++++++++++++++++++++++" << endl;
+         pout << "At begining of timestep # " << iteration_num - 1 << endl;
+         pout << "Simulation time is " << loop_time << endl;
+
+         double dt_new = time_integrator->advanceHierarchy(dt_now);
+
+         loop_time += dt_now;
+         dt_now = dt_new;
+
+         if (0) {
+            /*
+             * Logging can be very slow on I/O limited machines (such as
+             * BlueGene).
+             */
+            plog << "Hierarchy summary:\n";
+            patch_hierarchy->recursivePrint(plog, "H-> ", 1);
+            plog << "PatchHierarchy summary:\n";
+            patch_hierarchy->recursivePrint(plog, "L->", 1);
+         }
+
+         pout << "At end of timestep # " << iteration_num - 1 << endl;
+         pout << "Simulation time is " << loop_time << endl;
+         pout << "++++++++++++++++++++++++++++++++++++++++++++" << endl;
+
+         /*
+          * At specified intervals, write restart and visualization files.
+          */
+         if (write_restart) {
+
+            if ((iteration_num % restart_interval) == 0) {
+               RestartManager::getManager()->
+               writeRestartFile(restart_write_dirname,
+                  iteration_num);
+            }
+         }
+
+         /*
+          * At specified intervals, write out data files for plotting.
+          */
+
+         if (viz_dump_data) {
+            if ((iteration_num % viz_dump_interval) == 0) {
+#ifdef HAVE_HDF5
+               t_vis_writing->start();
+               visit_data_writer->writePlotData(patch_hierarchy,
+                  iteration_num,
+                  loop_time);
+               t_vis_writing->stop();
+#endif
+            }
+         }
+
+#if (TESTING == 1)
+         /*
+          * If we are doing autotests, check result...
+          */
+         num_failures += autotester.evalTestData(iteration_num,
+               patch_hierarchy,
+               time_integrator,
+               hyp_level_integrator,
+               gridding_algorithm);
+#endif
+
+      }
+
+      /*
+       * Output timer results.
+       */
+      tbox::TimerManager::getManager()->print(tbox::plog);
+
+#ifdef RECORD_STATS
+      /*
+       * Output statistics.
+       */
+      tbox::plog << "HyperbolicLevelIntegrator statistics:" << endl;
+      hyp_level_integrator->printStatistics(tbox::plog);
+      tbox::plog << "\nGriddingAlgorithm statistics:" << endl;
+      gridding_algorithm->printStatistics(tbox::plog);
+#endif
+
+      /*
+       * Output load balancing results.
+       */
+      tbox::plog << "\n\nLoad balancing results:\n";
+      load_balancer->printStatistics(tbox::plog);
+
+      /*
+       * Output box search results.
+       */
+      tbox::plog << "\n\nBox searching results:\n";
+      hier::MappedBoxTree::printStatistics(dim);
+
+      /*
+       * At conclusion of simulation, deallocate objects.
+       */
+
+#ifdef HAVE_HDF5
+      visit_data_writer.setNull();
+#endif
+
+      gridding_algorithm.setNull();
+      load_balancer.setNull();
+      new_box_generator.setNull();
+      error_detector.setNull();
+      hyp_level_integrator.setNull();
+
+      if (linear_advection_model) delete linear_advection_model;
+
+      patch_hierarchy.setNull();
+      grid_geometry.setNull();
+
+      input_db.setNull();
+      main_db.setNull();
+
+   }
+
+   if (num_failures == 0) {
+      tbox::pout << "\nPASSED:  LinAdv" << endl;
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return num_failures;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/performance_inputs/domainexpansion.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/performance_inputs/domainexpansion.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,497 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Linadv example problem
+ *                (3d sinusoidal fronusoidal frontt) 
+ *
+ ************************************************************************/
+
+
+LinAdv {
+   advection_velocity = 2.0e0 , 0.01e0, 0.01e0
+
+   godunov_order    = 4
+   corner_transport = "CORNER_TRANSPORT_1"
+
+   data_problem      = "SINE_CONSTANT_X"
+
+   Initial_data {
+      front_position    = 1.0
+      interval_0 {
+         uval      = 40.0
+      }
+      interval_1 {
+         uval      = 1.0
+      }
+      amplitude = 0.5
+      period = 8.0, 4.0, 4.0
+
+   }
+
+   Refinement_data {
+      // refine_criteria = "UVAL_GRADIENT", "UVAL_SHOCK"
+      refine_criteria = "UVAL_GRADIENT"
+
+      UVAL_GRADIENT {
+         grad_tol = 20.0
+      }
+
+      UVAL_SHOCK {
+         shock_tol = 20.0
+         shock_onset = 0.85
+      }
+   }
+
+  // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "FLOW"
+      }
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+
+   }
+
+}
+
+BergerRigoutsos {
+   algo_advance_mode = "ADVANCE_SOME"
+   owner_mode = "MOST_OVERLAP"
+   log_node_history = FALSE
+   use_level_boxes = TRUE // Used by SAMRAI-2, but not DLBG.
+   use_private_communicator = TRUE
+   sort_output_nodes = TRUE // Used by DLBG, but not SAMRAI-2.
+   max_box_size = 100, 100, 100
+   log_cluster_summary = TRUE
+   log_cluster = FALSE
+   barrier_before = TRUE
+   barrier_after = TRUE
+}
+
+Main {
+   dim = 3
+   base_name    = "domex"
+   log_all_nodes    = FALSE
+
+// visualization dump parameters
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters
+   restart_interval        = 0        // zero to turn off
+
+   run_time_plotting = FALSE
+
+   use_scaled_input = TRUE
+   // timestepping = "SYNCHRONIZED"
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*",
+                            "apps::*::*",
+                            "algs::*::*",
+                            "mesh::*::*",
+                            "tbox::AsyncCommGroup::*",
+                            "tbox::AsyncCommStage::*",
+                            "tbox::JobRelauncher::*",
+                            "tbox::Schedule::*",
+                            "xfer::*::*"
+}
+
+PatchHierarchy {
+   max_levels = 3
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   check_nonrefined_tags = "IGNORE"
+   // load_balance = FALSE
+   largest_patch_size {
+      level_0 = -1,-1,-1
+      // level_0 = 20,20,20
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 5,5,5
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+      level_3            = 2, 2, 2
+      level_4            = 2, 2, 2
+      level_5            = 2, 2, 2
+      level_6            = 2, 2, 2
+      level_7            = 2, 2, 2
+      level_8            = 2, 2, 2
+      level_9            = 2, 2, 2
+      //  etc.
+   }
+
+   allow_patches_smaller_than_ghostwidth = FALSE
+   allow_patches_smaller_than_minimum_size_to_prevent_overlaps = TRUE
+   proper_nesting_buffer = 1, 1, 1
+}
+
+GriddingAlgorithm {
+
+   combine_efficiency = 0.80
+   efficiency_tolerance = 0.80
+   // write_regrid_boxes = TRUE
+   // read_regrid_boxes = TRUE
+   // regrid_boxes_filename = "grid"
+   sequentialize_patch_indices = FALSE
+   barrier_and_time = TRUE
+}
+
+V2GriddingAlgorithm {
+   max_levels             = 3        // Maximum number of levels in hierarchy.
+   ratio_to_coarser {            // vector ratio to next coarser level
+      level_1             = 2 , 2 , 2
+      level_2             = 2 , 2 , 2
+      level_3             = 2 , 2 , 2
+      level_4             = 2 , 2 , 2
+      level_5             = 2 , 2 , 2
+      level_6             = 2 , 2 , 2
+      level_7             = 2 , 2 , 2
+      level_8             = 2 , 2 , 2
+      level_9             = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 =  30, 30, 30  // largest patch allowed in hierarchy
+           // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 =  5, 5, 5
+      // all finer levels will use same values as level_0...
+   }
+
+   efficiency_tolerance   = 0.80e0    // min % of tag cells in new patch level
+   combine_efficiency     = 0.80e0    // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+//   write_regrid_boxes    = TRUE
+   // regrid_boxes_filename  = "regrid_boxes"
+   barrier_before_clustering = FALSE
+   sort_boxes_after_clustering = FALSE
+   extend_tags_to_bdry = TRUE
+   use_new_alg = TRUE
+}
+
+SinusoidalFrontTagger {
+  init_disp = 1.0, 1.0, 1.0
+  period = 8.0, 4.0, 4.0
+  velocity = 2.0e0 , 0.01e0, 0.01e0
+  amplitude = 0.5
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 2.0      // final simulation time
+   grow_dt               = 1.0e0    // growth factor for timesteps
+   // max_integrator_steps  = 1     // max number of simulation timesteps
+   max_integrator_steps  = 25     // max number of simulation timesteps
+   // tag_buffer            = 3, 3, 3, 3, 3, 3
+   barrier_and_time        = TRUE
+}
+
+LoadBalancer{
+  processors = 1, 1
+  bin_pack_method = "GREEDY"
+  // bin_pack_method = "SPATIAL"
+  ignore_level_box_union_is_single_box = TRUE
+}
+
+TreeLoadBalancer {
+  report_load_balance = FALSE
+  barrier_before = TRUE
+  barrier_after = TRUE
+  n_root_cycles = 1
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'n'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.5
+   cfl_init                 = 0.5
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+
+MappedBoxHierarchy {
+  log_actions = 'n'
+  check_input_connectors = 'n'
+  check_output_connectors = 'n'
+  check_connectors = 'n'
+}
+
+RefineSchedule {
+  barrier_and_time = TRUE
+}
+
+////////////////////////////////////////////////////////////////////////
+// Specific databases for scaling tests.
+////////////////////////////////////////////////////////////////////////
+
+ScaledInput1 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , ( 31, 7, 7) ]   //    1proc
+   x_lo          = 0.e0, 0.e0, 0.e0  // lower end of computational domain.
+   x_up          = 8.e0, 2.e0, 2.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput2 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , ( 31, 15, 7) ]   //    2proc
+   x_lo          = 0.e0, 0.e0, 0.e0  // lower end of computational domain.
+   x_up          = 8.e0, 4.e0, 2.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput4 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (31, 15, 15) ]   //    4proc
+   x_lo          = 0.e0, 0.e0, 0.e0  // lower end of computational domain.
+   x_up          = 8.e0, 4.e0, 4.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput8 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (63, 15, 15) ]   //    8proc
+   x_lo          =  0.e0, 0.e0, 0.e0  // lower end of computational domain.
+   x_up          = 16.e0, 4.e0, 4.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput16 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (63, 31, 15) ]   //   16proc
+   x_lo          =  0.e0, 0.e0, 0.e0  // lower end of computational domain.
+   x_up          = 16.e0, 8.e0, 4.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput32 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (63, 31, 31) ]   //   32proc
+   x_lo          =  0.e0, 0.e0, 0.e0  // lower end of computational domain.
+   x_up          = 16.e0, 8.e0, 8.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput64 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (127, 31, 31) ]   //   64proc
+   x_lo          =  0.e0, 0.e0, 0.e0  // lower end of computational domain.
+   x_up          = 32.e0, 8.e0, 8.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput128 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (127, 63, 31) ]   //   128proc
+   x_lo          =  0.e0,  0.e0, 0.e0  // lower end of computational domain.
+   x_up          = 32.e0, 16.e0, 8.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput256 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (127, 63, 63) ]   //  256proc
+   x_lo          =  0.e0,  0.e0,  0.e0  // lower end of computational domain.
+   x_up          = 32.e0, 16.e0, 16.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput512 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (255, 63, 63) ]   //  512proc
+   x_lo          =  0.e0,  0.e0,  0.e0  // lower end of computational domain.
+   x_up          = 64.e0, 16.e0, 16.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput1024 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (255, 127, 63) ]   // 1024proc
+   x_lo          =  0.e0,  0.e0,  0.e0  // lower end of computational domain.
+   x_up          = 64.e0, 32.e0, 16.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput2048 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (255, 127, 127) ]   // 2048proc
+   x_lo          =  0.e0,  0.e0,  0.e0  // lower end of computational domain.
+   x_up          = 64.e0, 32.e0, 32.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput4096 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (511, 127, 127) ]   // 4096proc
+   x_lo          =   0.e0,  0.e0,  0.e0  // lower end of computational domain.
+   x_up          = 128.e0, 32.e0, 32.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput8192 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (511, 255, 127) ]   // 8192proc
+   x_lo          =   0.e0,  0.e0,  0.e0  // lower end of computational domain.
+   x_up          = 128.e0, 64.e0, 32.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput16384 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (511, 255, 255) ]   // 16384proc
+   x_lo          =   0.e0,  0.e0,  0.e0  // lower end of computational domain.
+   x_up          = 128.e0, 64.e0, 64.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput32768 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (1023, 255, 255) ]   // 32768proc
+   x_lo          =   0.e0,  0.e0,  0.e0  // lower end of computational domain.
+   x_up          = 256.e0, 64.e0, 64.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput36864 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (1023, 287, 255) ]   // 36864proc
+   x_lo          =   0.e0,  0.e0,  0.e0  // lower end of computational domain.
+   x_up          = 256.e0, 72.e0, 64.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput65536 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (1023, 511, 255) ]   // 65536proc
+   x_lo          =   0.e0,   0.e0,  0.e0  // lower end of computational domain.
+   x_up          = 256.e0, 128.e0, 64.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput131072 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (1023, 511, 511) ]   // 131072proc
+   x_lo          =   0.e0,   0.e0,   0.e0  // lower end of computational domain.
+   x_up          = 256.e0, 128.e0, 128.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/performance_inputs/domainexpansionb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/performance_inputs/domainexpansionb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,504 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Linadv example problem
+ *                (3d sinusoidal fronusoidal frontt) 
+ *
+ ************************************************************************/
+
+/*
+  domainexpansionb is similar to domainexpansiona, but it is aimed at
+  cutting the number of cells/proc by 1/3, to about 19K cells/proc
+  on the level 2 (finest level).  Cutting down the size makes the problem
+  fit on ubgl better when running in coprocessor mode.  I did this by
+  tuning the clustering parameters and changing the base resolution.
+*/
+
+LinAdv {
+   advection_velocity = 2.0e0 , 0.01e0, 0.01e0
+
+   godunov_order    = 4
+   corner_transport = "CORNER_TRANSPORT_1"
+
+   data_problem      = "SINE_CONSTANT_X"
+
+   Initial_data {
+      front_position    = 1.0
+      interval_0 {
+         uval      = 40.0
+      }
+      interval_1 {
+         uval      = 1.0
+      }
+      amplitude = 0.5
+      period = 8.0, 4.0, 4.0
+
+   }
+
+   Refinement_data {
+      // refine_criteria = "UVAL_GRADIENT", "UVAL_SHOCK"
+      refine_criteria = "UVAL_GRADIENT"
+
+      UVAL_GRADIENT {
+         grad_tol = 20.0
+      }
+
+      UVAL_SHOCK {
+         shock_tol = 20.0
+         shock_onset = 0.85
+      }
+   }
+
+  // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "FLOW"
+      }
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+
+   }
+
+}
+
+BergerRigoutsos {
+   algo_advance_mode = "ADVANCE_SOME"
+   owner_mode = "MOST_OVERLAP"
+   log_node_history = FALSE
+   use_level_boxes = TRUE // Used by SAMRAI-2, but not DLBG.
+   use_private_communicator = TRUE
+   sort_output_nodes = TRUE // Used by DLBG, but not SAMRAI-2.
+   max_box_size = 100, 100, 100
+   log_cluster_summary = TRUE
+   log_cluster = FALSE
+   barrier_before = TRUE
+   barrier_after = TRUE
+}
+
+Main {
+   dim = 3
+   base_name    = "domexb"
+   log_all_nodes    = FALSE
+
+// visualization dump parameters
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters
+   restart_interval        = 0        // zero to turn off
+
+   run_time_plotting = FALSE
+
+   use_scaled_input = TRUE
+   // timestepping = "SYNCHRONIZED"
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*",
+                            "apps::*::*",
+                            "algs::*::*",
+                            "mesh::*::*",
+                            "tbox::AsyncCommGroup::*",
+                            "tbox::AsyncCommStage::*",
+                            "tbox::JobRelauncher::*",
+                            "tbox::Schedule::*",
+                            "xfer::*::*"
+}
+
+PatchHierarchy {
+   max_levels = 3
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   check_nonrefined_tags = "IGNORE"
+   // load_balance = FALSE
+   largest_patch_size {
+      level_0 = -1,-1,-1
+      // level_0 = 20,20,20
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 6,6,6
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 2, 2, 2
+      level_2            = 2, 2, 2
+      level_3            = 2, 2, 2
+      level_4            = 2, 2, 2
+      level_5            = 2, 2, 2
+      level_6            = 2, 2, 2
+      level_7            = 2, 2, 2
+      level_8            = 2, 2, 2
+      level_9            = 2, 2, 2
+      //  etc.
+   }
+
+   allow_patches_smaller_than_ghostwidth = FALSE
+   allow_patches_smaller_than_minimum_size_to_prevent_overlaps = TRUE
+   proper_nesting_buffer = 1, 1, 1
+}
+
+GriddingAlgorithm {
+
+   combine_efficiency = 0.90
+   efficiency_tolerance = 0.90
+   // write_regrid_boxes = TRUE
+   // read_regrid_boxes = TRUE
+   // regrid_boxes_filename = "grid"
+   sequentialize_patch_indices = FALSE
+   barrier_and_time = TRUE
+}
+
+V2GriddingAlgorithm {
+   max_levels             = 3        // Maximum number of levels in hierarchy.
+   ratio_to_coarser {            // vector ratio to next coarser level
+      level_1             = 2 , 2 , 2
+      level_2             = 2 , 2 , 2
+      level_3             = 2 , 2 , 2
+      level_4             = 2 , 2 , 2
+      level_5             = 2 , 2 , 2
+      level_6             = 2 , 2 , 2
+      level_7             = 2 , 2 , 2
+      level_8             = 2 , 2 , 2
+      level_9             = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 =  30, 30, 30  // largest patch allowed in hierarchy
+           // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 =  5, 5, 5
+      // all finer levels will use same values as level_0...
+   }
+
+   efficiency_tolerance   = 0.80e0    // min % of tag cells in new patch level
+   combine_efficiency     = 0.80e0    // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+//   write_regrid_boxes    = TRUE
+   // regrid_boxes_filename  = "regrid_boxes"
+   barrier_before_clustering = FALSE
+   sort_boxes_after_clustering = FALSE
+   extend_tags_to_bdry = TRUE
+   use_new_alg = TRUE
+}
+
+SinusoidalFrontTagger {
+  init_disp = 1.0, 1.0, 1.0
+  period = 8.0, 4.0, 4.0
+  velocity = 2.0e0 , 0.01e0, 0.01e0
+  amplitude = 0.5
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 2.0      // final simulation time
+   grow_dt               = 1.0e0    // growth factor for timesteps
+   // max_integrator_steps  = 1     // max number of simulation timesteps
+   max_integrator_steps  = 25     // max number of simulation timesteps
+   // tag_buffer            = 3, 3, 3, 3, 3, 3
+   barrier_and_time        = TRUE
+}
+
+LoadBalancer{
+  processors = 1, 1
+  bin_pack_method = "GREEDY"
+  // bin_pack_method = "SPATIAL"
+  ignore_level_box_union_is_single_box = TRUE
+}
+
+TreeLoadBalancer {
+  report_load_balance = FALSE
+  barrier_before = TRUE
+  barrier_after = TRUE
+  n_root_cycles = 1
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'n'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.5
+   cfl_init                 = 0.5
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+
+MappedBoxHierarchy {
+  log_actions = 'n'
+  check_input_connectors = 'n'
+  check_output_connectors = 'n'
+  check_connectors = 'n'
+}
+
+RefineSchedule {
+  barrier_and_time = TRUE
+}
+
+////////////////////////////////////////////////////////////////////////
+// Specific databases for scaling tests.
+////////////////////////////////////////////////////////////////////////
+
+ScaledInput1 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , ( 31, 7, 7) ]   //    1proc
+   x_lo          = 0.e0, 0.e0, 0.e0  // lower end of computational domain.
+   x_up          = 8.e0, 2.e0, 2.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput2 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , ( 31, 15, 7) ]   //    2proc
+   x_lo          = 0.e0, 0.e0, 0.e0  // lower end of computational domain.
+   x_up          = 8.e0, 4.e0, 2.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput4 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (31, 15, 15) ]   //    4proc
+   x_lo          = 0.e0, 0.e0, 0.e0  // lower end of computational domain.
+   x_up          = 8.e0, 4.e0, 4.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput8 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (63, 15, 15) ]   //    8proc
+   x_lo          =  0.e0, 0.e0, 0.e0  // lower end of computational domain.
+   x_up          = 16.e0, 4.e0, 4.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput16 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (63, 31, 15) ]   //   16proc
+   x_lo          =  0.e0, 0.e0, 0.e0  // lower end of computational domain.
+   x_up          = 16.e0, 8.e0, 4.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput32 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (63, 31, 31) ]   //   32proc
+   x_lo          =  0.e0, 0.e0, 0.e0  // lower end of computational domain.
+   x_up          = 16.e0, 8.e0, 8.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput64 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (127, 31, 31) ]   //   64proc
+   x_lo          =  0.e0, 0.e0, 0.e0  // lower end of computational domain.
+   x_up          = 32.e0, 8.e0, 8.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput128 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (127, 63, 31) ]   //   128proc
+   x_lo          =  0.e0,  0.e0, 0.e0  // lower end of computational domain.
+   x_up          = 32.e0, 16.e0, 8.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput256 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (127, 63, 63) ]   //  256proc
+   x_lo          =  0.e0,  0.e0,  0.e0  // lower end of computational domain.
+   x_up          = 32.e0, 16.e0, 16.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput512 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (255, 63, 63) ]   //  512proc
+   x_lo          =  0.e0,  0.e0,  0.e0  // lower end of computational domain.
+   x_up          = 64.e0, 16.e0, 16.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput1024 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (255, 127, 63) ]   // 1024proc
+   x_lo          =  0.e0,  0.e0,  0.e0  // lower end of computational domain.
+   x_up          = 64.e0, 32.e0, 16.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput2048 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (255, 127, 127) ]   // 2048proc
+   x_lo          =  0.e0,  0.e0,  0.e0  // lower end of computational domain.
+   x_up          = 64.e0, 32.e0, 32.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput4096 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (511, 127, 127) ]   // 4096proc
+   x_lo          =   0.e0,  0.e0,  0.e0  // lower end of computational domain.
+   x_up          = 128.e0, 32.e0, 32.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput8192 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (511, 255, 127) ]   // 8192proc
+   x_lo          =   0.e0,  0.e0,  0.e0  // lower end of computational domain.
+   x_up          = 128.e0, 64.e0, 32.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput16384 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (511, 255, 255) ]   // 16384proc
+   x_lo          =   0.e0,  0.e0,  0.e0  // lower end of computational domain.
+   x_up          = 128.e0, 64.e0, 64.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput32768 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (1023, 255, 255) ]   // 32768proc
+   x_lo          =   0.e0,  0.e0,  0.e0  // lower end of computational domain.
+   x_up          = 256.e0, 64.e0, 64.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput36864 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (1023, 287, 255) ]   // 36864proc
+   x_lo          =   0.e0,  0.e0,  0.e0  // lower end of computational domain.
+   x_up          = 256.e0, 72.e0, 64.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput65536 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (1023, 511, 255) ]   // 65536proc
+   x_lo          =   0.e0,   0.e0,  0.e0  // lower end of computational domain.
+   x_up          = 256.e0, 128.e0, 64.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
+
+ScaledInput131072 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (1023, 511, 511) ]   // 131072proc
+   x_lo          =   0.e0,   0.e0,   0.e0  // lower end of computational domain.
+   x_up          = 256.e0, 128.e0, 128.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/performance_inputs/front.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/performance_inputs/front.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,656 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Linadv example problem
+ *                (3d sinusoidal fronusoidal frontt) 
+ *
+ ************************************************************************/
+log_actions = 'n'
+check_input_connectors = 'n'
+check_output_connectors = 'n'
+check_connectors = 'n'
+print_layer_hierarchy = 'n'
+DistributedLoadBalancer_print_steps = 'n'
+DistributedLoadBalancer_check_connectivity = 'n'
+check_map = 'n'
+check_connectivity = 'n'
+print_steps = 'n'
+print_swap_steps = 'n'
+print_break_steps = 'n'
+print_edge_steps = 'n'
+
+
+LinAdv {
+   advection_velocity = 2.0e0 , 0.01e0, 0.01e0
+
+   godunov_order    = 4
+   corner_transport = "CORNER_TRANSPORT_1"
+
+   data_problem      = "SINE_CONSTANT_X"
+
+   Initial_data {
+      front_position    = 0.0
+      interval_0 {
+         uval      = 40.0
+      }
+      interval_1 {
+         uval      = 1.0
+      }
+      amplitude = 0.3
+      frequency = 2.0, 2.0, 2.0
+
+   }
+
+   Refinement_data {
+      refine_criteria = "UVAL_GRADIENT", "UVAL_SHOCK"
+
+      UVAL_GRADIENT {
+         grad_tol = 10.0
+      }
+
+      UVAL_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+   }
+
+  // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "FLOW"
+      }
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+
+   }
+
+   use_analytical_tagger = TRUE
+}
+
+BergerRigoutsos {
+   algo_advance_mode = "ADVANCE_SOME"
+   owner_mode = "MOST_OVERLAP"
+   log_node_history = FALSE
+   use_level_boxes = FALSE
+   use_private_communicator = TRUE
+   sort_output_nodes = TRUE
+   log_cluster_summary = TRUE
+   barrier_before = TRUE
+   barrier_after = TRUE
+}
+
+Main {
+   dim = 3
+   base_name    = "newf3d"
+   log_all_nodes    = TRUE
+
+// visualization dump parameters
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters
+   restart_interval        = 0        // zero to turn off
+
+   run_time_plotting = FALSE
+
+   // which_br: 'o' = old, 'n' = new
+   which_br = 'n'
+   use_scaled_input = TRUE
+}
+
+BaselineMain {
+   base_name    = "bslf3d"
+   log_all_nodes    = TRUE
+
+// visualization dump parameters
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters
+   restart_interval        = 0        // zero to turn off
+
+   run_time_plotting = FALSE
+
+   // which_br: 'o' = old, 'n' = new
+   which_br = 'o'
+   use_scaled_input = TRUE
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list               = "hier::*::*",
+                              "apps::*::*",
+                              "algs::*::*",
+                              "mesh::*::*",
+                              "tbox::AsyncCommGroup::*",
+                              "tbox::AsyncCommStage::*",
+                              "tbox::JobRelauncher::*",
+                              "xfer::*::*"
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , ( 9, 9, 4) ]   //    1proc
+   //domain_boxes  = [ (0,0,0) , ( 9, 9, 9) ]   //    2proc
+   //domain_boxes  = [ (0,0,0) , (19, 9, 9) ]   //    4proc
+   //domain_boxes  = [ (0,0,0) , (19,19, 9) ]   //    8proc
+   //domain_boxes  = [ (0,0,0) , (19,19,19) ]   //   16proc
+   //domain_boxes  = [ (0,0,0) , (39,19,19) ]   //   32proc
+   //domain_boxes  = [ (0,0,0) , (39,39,19) ]   //   64proc
+   //domain_boxes  = [ (0,0,0) , (39,39,39) ]   //  128proc
+   //domain_boxes  = [ (0,0,0) , (79,39,39) ]   //  256proc
+   //domain_boxes  = [ (0,0,0) , (79,79,39) ]   //  512proc
+   //domain_boxes  = [ (0,0,0) , (79,79,79) ]   // 1024proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+
+PatchHierarchy {
+   max_levels = 3
+   largest_patch_size {
+      // level_0 = -1,-1,-1
+      level_0 = 20,20,20
+      // all finer levels will use same values as level_0...
+   }
+   smallest_patch_size {
+      level_0 = 5,5,5
+      // all finer levels will use same values as level_0...
+   }
+   ratio_to_coarser {
+      level_1            = 4, 4, 4
+      level_2            = 4, 4, 4
+      level_3            = 4, 4, 4
+      level_4            = 4, 4, 4
+      level_5            = 4, 4, 4
+      level_6            = 4, 4, 4
+      level_7            = 4, 4, 4
+      level_8            = 4, 4, 4
+      level_9            = 4, 4, 4
+      //  etc.
+   }
+   allow_patches_smaller_than_ghostwidth = TRUE
+}
+
+GriddingAlgorithm {
+   enforce_proper_nesting = TRUE
+   extend_to_domain_boundary = TRUE
+   check_nonrefined_tags = "IGNORE"
+   // load_balance = FALSE
+   combine_efficiency = 0.7
+   efficiency_tolerance = 0.85
+   barrier_before_regrid = TRUE
+   barrier_before_find_refinement = TRUE
+   barrier_before_cluster = TRUE
+   barrier_before_nest = TRUE
+   barrier_before_limit = TRUE
+   barrier_before_extend = TRUE
+   barrier_before_balance = TRUE
+   barrier_after_find_refinement = TRUE
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+
+HyperbolicLevelIntegrator {
+   //cfl                      = 0.9e0    // procs 256, 512, 1024
+   //cfl_init                 = 0.9e0    // procs 256, 512, 1024
+   //cfl                      = 0.45e0   // procs 32, 64, 128
+   //cfl_init                 = 0.45e0   // procs 32, 64, 128
+   //cfl                      = 0.225e0  // procs 4, 8, 16
+   //cfl_init                 = 0.225e0  // procs 4, 8, 16
+   cfl                      = 0.1125e0 // procs 1, 2
+   cfl_init                 = 0.1125e0 // procs 1, 2
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 0.6      // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   // max_integrator_steps  = 5     // max number of simulation timesteps
+   max_integrator_steps  = 25     // max number of simulation timesteps
+   // tag_buffer            = 0, 0, 0, 0, 0, 0
+}
+
+LoadBalancer{
+  processors = 1, 1
+  bin_pack_method = "GREEDY"
+  // bin_pack_method = "SPATIAL"
+  ignore_level_box_union_is_single_box = TRUE
+}
+
+DistributedLoadBalancer{
+  algorithm_index = 1
+  report_load_balance = FALSE
+  dummy = FALSE
+  OldLoadBalancer{
+    processors = 1, 1
+    bin_pack_method = "GREEDY"
+    // bin_pack_method = "SPATIAL"
+    ignore_level_box_union_is_single_box = TRUE
+  }
+  barrier_before_balance = FALSE
+}
+
+TreeLoadBalancer {
+  report_load_balance = FALSE
+  barrier_before = TRUE
+  barrier_after = TRUE
+  n_root_cycles = 2
+}
+
+
+ScaledInput {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , ( 9, 9, 9) ]
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.1125e0 // procs 1, 2
+   cfl_init                 = 0.1125e0 // procs 1, 2
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .08, .08, .08
+      buffer_space_1 = .04, .04, .04
+      buffer_space_2 = .02, .02, .02
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0, 0.01e0, 0.01e0
+      init_disp = 0.0, 0.25, 0.25
+   }
+}
+
+////////////////////////////////////////////////////////////////////////
+// Specific databases for scaling tests.
+////////////////////////////////////////////////////////////////////////
+
+ScaledInput1 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , ( 9, 9, 4) ]   //    1proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.1125e0 // procs 1, 2
+   cfl_init                 = 0.1125e0 // procs 1, 2
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0, 0.01e0, 0.01e0
+      init_disp = 0.0, 0.25, 0.25
+   }
+}
+
+ScaledInput2 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , ( 9, 9, 9) ]   //    2proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.1125e0 // procs 1, 2
+   cfl_init                 = 0.1125e0 // procs 1, 2
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0, 0.01e0, 0.01e0
+      init_disp = 0.0, 0.25, 0.25
+   }
+}
+
+ScaledInput4 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (19, 9, 9) ]   //    4proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.225e0  // procs 4, 8, 16
+   cfl_init                 = 0.225e0  // procs 4, 8, 16
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0, 0.01e0, 0.01e0
+      init_disp = 0.0, 0.25, 0.25
+   }
+}
+
+ScaledInput8 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (19,19, 9) ]   //    8proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.225e0  // procs 4, 8, 16
+   cfl_init                 = 0.225e0  // procs 4, 8, 16
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0, 0.01e0, 0.01e0
+      init_disp = 0.0, 0.25, 0.25
+   }
+}
+
+ScaledInput16 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (19,19,19) ]   //   16proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.225e0  // procs 4, 8, 16
+   cfl_init                 = 0.225e0  // procs 4, 8, 16
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0, 0.01e0, 0.01e0
+      init_disp = 0.0, 0.25, 0.25
+   }
+}
+
+ScaledInput32 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (39,19,19) ]   //   32proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.45e0   // procs 32, 64, 128
+   cfl_init                 = 0.45e0   // procs 32, 64, 128
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0, 0.01e0, 0.01e0
+      init_disp = 0.0, 0.25, 0.25
+   }
+}
+
+ScaledInput64 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (39,39,19) ]   //   64proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.45e0   // procs 32, 64, 128
+   cfl_init                 = 0.45e0   // procs 32, 64, 128
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0, 0.01e0, 0.01e0
+      init_disp = 0.0, 0.25, 0.25
+   }
+}
+
+ScaledInput128 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (39,39,39) ]   //  128proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.45e0   // procs 32, 64, 128
+   cfl_init                 = 0.45e0   // procs 32, 64, 128
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0, 0.01e0, 0.01e0
+      init_disp = 0.0, 0.25, 0.25
+   }
+}
+
+ScaledInput256 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (79,39,39) ]   //  256proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // procs 256, 512, 1024
+   cfl_init                 = 0.9e0    // procs 256, 512, 1024
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0, 0.01e0, 0.01e0
+      init_disp = 0.0, 0.25, 0.25
+   }
+}
+
+ScaledInput512 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (79,79,39) ]   //  512proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // procs 256, 512, 1024
+   cfl_init                 = 0.9e0    // procs 256, 512, 1024
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0, 0.01e0, 0.01e0
+      init_disp = 0.0, 0.25, 0.25
+   }
+}
+
+ScaledInput1024 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (79,79,79) ]   // 1024proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,0,0
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // procs 256, 512, 1024
+   cfl_init                 = 0.9e0    // procs 256, 512, 1024
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0, 0.01e0, 0.01e0
+      init_disp = 0.0, 0.25, 0.25
+   }
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/performance_inputs/sine_front_bsyn.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/performance_inputs/sine_front_bsyn.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,555 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Linadv example problem
+ *                (3d sinusoidal fronusoidal frontt) 
+ *
+ ************************************************************************/
+
+
+LinAdv {
+   advection_velocity = 2.0e0 , 0.1e0, 0.1e0
+
+   godunov_order    = 4
+   corner_transport = "CORNER_TRANSPORT_1"
+
+   data_problem      = "SINE_CONSTANT_X"
+
+   Initial_data {
+      front_position    = 0.0
+      interval_0 {
+         uval      = 40.0
+      }
+      interval_1 {
+         uval      = 1.0
+      }
+      amplitude = 0.25 
+      frequency = 2.0, 2.0, 2.0
+
+   }
+
+   Refinement_data {
+      refine_criteria = "UVAL_GRADIENT", "UVAL_SHOCK"
+ 
+      UVAL_GRADIENT {
+         grad_tol = 10.0
+      }
+ 
+      UVAL_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+   }
+
+  // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "FLOW"
+      }
+
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+
+   }
+
+   use_analytical_tagger = TRUE
+}
+
+BergerRigoutsos {
+   use_level_boxes = TRUE
+   // algo_advance_mode = "SYNCHRONOUS"
+   algo_advance_mode = "ADVANCE_SOME"
+   single_owner = TRUE
+   use_private_communicator = TRUE
+
+   log_cluster_summary = TRUE
+   log_node_history = FALSE
+}
+
+Main {
+   dim = 3
+   base_name    = "sine-front-3d-bsyn"
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+
+   run_time_plotting = FALSE
+
+   // which_br: 'o' = old, 'n' = new
+   which_br = 'n'
+   use_scaled_input = TRUE
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.   
+   timer_list               = "hier::*::*",
+                              "apps::*::*",
+                              "algs::*::*",
+                              "mesh::*::*",
+                              "tbox::AsyncCommGroup::*",
+                              "tbox::AsyncCommStage::*",
+                              "tbox::JobRelauncher::*",
+                              "xfer::*::*"
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , ( 9, 9, 4) ]   //    1proc
+   //domain_boxes  = [ (0,0,0) , ( 9, 9, 9) ]   //    2proc
+   //domain_boxes  = [ (0,0,0) , (19, 9, 9) ]   //    4proc
+   //domain_boxes  = [ (0,0,0) , (19,19, 9) ]   //    8proc
+   //domain_boxes  = [ (0,0,0) , (19,19,19) ]   //   16proc
+   //domain_boxes  = [ (0,0,0) , (39,19,19) ]   //   32proc
+   //domain_boxes  = [ (0,0,0) , (39,39,19) ]   //   64proc 
+   //domain_boxes  = [ (0,0,0) , (39,39,39) ]   //  128proc
+   //domain_boxes  = [ (0,0,0) , (79,39,39) ]   //  256proc
+   //domain_boxes  = [ (0,0,0) , (79,79,39) ]   //  512proc
+   //domain_boxes  = [ (0,0,0) , (79,79,79) ]   // 1024proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,1,1
+}
+
+PatchHierarchy {
+   max_levels             = 3        // Maximum number of levels in hierarchy.
+   ratio_to_coarser {            // vector ratio to next coarser level
+      level_1             = 4 , 4 , 4
+      level_2             = 4 , 4 , 4
+      level_3             = 4 , 4 , 4
+   }
+
+   largest_patch_size {
+      level_0 =  30, 30, 30  // largest patch allowed in hierarchy
+           // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 =  5, 5, 5
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance   = 0.70e0    // min % of tag cells in new patch level
+   combine_efficiency     = 0.85e0    // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+//   write_regrid_boxes    = TRUE
+   // regrid_boxes_filename  = "regrid_boxes"
+   barrier_before_clustering = TRUE
+   sort_boxes_after_clustering = TRUE
+   extend_tags_to_bdry = TRUE
+   use_new_alg = TRUE
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+
+HyperbolicLevelIntegrator {
+   //cfl                      = 0.9e0    // procs 256, 512, 1024
+   //cfl_init                 = 0.9e0    // procs 256, 512, 1024
+   //cfl                      = 0.45e0   // procs 32, 64, 128
+   //cfl_init                 = 0.45e0   // procs 32, 64, 128
+   //cfl                      = 0.225e0  // procs 4, 8, 16
+   //cfl_init                 = 0.225e0  // procs 4, 8, 16
+   cfl                      = 0.1125e0 // procs 1, 2
+   cfl_init                 = 0.1125e0 // procs 1, 2
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 0.6      // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   // max_integrator_steps  = 2     // max number of simulation timesteps
+   max_integrator_steps  = 25     // max number of simulation timesteps
+   tag_buffer            = 0, 0, 0, 0, 0, 0
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+   use_spatialBinPack = TRUE
+   ignore_level_box_union_is_single_box = TRUE
+}
+
+
+ScaledInput {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , ( 9, 9, 9) ]
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,1,1
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.1125e0 // procs 1, 2
+   cfl_init                 = 0.1125e0 // procs 1, 2
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .08, .08, .08
+      buffer_space_1 = .04, .04, .04
+      buffer_space_2 = .02, .02, .02
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0 , 0.1e0, 0.1e0
+      init_disp = 0.0, 0.0, 0.0
+   }
+}
+
+////////////////////////////////////////////////////////////////////////
+// Specific databases for scaling tests.
+////////////////////////////////////////////////////////////////////////
+
+ScaledInput1 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , ( 9, 9, 4) ]   //    1proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,1,1
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.1125e0 // procs 1, 2
+   cfl_init                 = 0.1125e0 // procs 1, 2
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0 , 0.1e0, 0.1e0
+      init_disp = 0.0, 0.0, 0.0
+   }
+}
+
+ScaledInput2 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , ( 9, 9, 9) ]   //    2proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,1,1
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.1125e0 // procs 1, 2
+   cfl_init                 = 0.1125e0 // procs 1, 2
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0 , 0.1e0, 0.1e0
+      init_disp = 0.0, 0.0, 0.0
+   }
+}
+
+ScaledInput4 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (19, 9, 9) ]   //    4proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,1,1
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.225e0  // procs 4, 8, 16
+   cfl_init                 = 0.225e0  // procs 4, 8, 16
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0 , 0.1e0, 0.1e0
+      init_disp = 0.0, 0.0, 0.0
+   }
+}
+
+ScaledInput8 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (19,19, 9) ]   //    8proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,1,1
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.225e0  // procs 4, 8, 16
+   cfl_init                 = 0.225e0  // procs 4, 8, 16
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0 , 0.1e0, 0.1e0
+      init_disp = 0.0, 0.0, 0.0
+   }
+}
+
+ScaledInput16 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (19,19,19) ]   //   16proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,1,1
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.225e0  // procs 4, 8, 16
+   cfl_init                 = 0.225e0  // procs 4, 8, 16
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0 , 0.1e0, 0.1e0
+      init_disp = 0.0, 0.0, 0.0
+   }
+}
+
+ScaledInput32 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (39,19,19) ]   //   32proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,1,1
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.45e0   // procs 32, 64, 128
+   cfl_init                 = 0.45e0   // procs 32, 64, 128
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0 , 0.1e0, 0.1e0
+      init_disp = 0.0, 0.0, 0.0
+   }
+}
+
+ScaledInput64 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (39,39,19) ]   //   64proc 
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,1,1
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.45e0   // procs 32, 64, 128
+   cfl_init                 = 0.45e0   // procs 32, 64, 128
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0 , 0.1e0, 0.1e0
+      init_disp = 0.0, 0.0, 0.0
+   }
+}
+
+ScaledInput128 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (39,39,39) ]   //  128proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,1,1
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.45e0   // procs 32, 64, 128
+   cfl_init                 = 0.45e0   // procs 32, 64, 128
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0 , 0.1e0, 0.1e0
+      init_disp = 0.0, 0.0, 0.0
+   }
+}
+
+ScaledInput256 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (79,39,39) ]   //  256proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,1,1
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // procs 256, 512, 1024
+   cfl_init                 = 0.9e0    // procs 256, 512, 1024
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0 , 0.1e0, 0.1e0
+      init_disp = 0.0, 0.0, 0.0
+   }
+}
+
+ScaledInput512 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (79,79,39) ]   //  512proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,1,1
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // procs 256, 512, 1024
+   cfl_init                 = 0.9e0    // procs 256, 512, 1024
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0 , 0.1e0, 0.1e0
+      init_disp = 0.0, 0.0, 0.0
+   }
+}
+
+ScaledInput1024 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (79,79,79) ]   // 1024proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,1,1
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // procs 256, 512, 1024
+   cfl_init                 = 0.9e0    // procs 256, 512, 1024
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0 , 0.1e0, 0.1e0
+      init_disp = 0.0, 0.0, 0.0
+   }
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/performance_inputs/sine_front_orig.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/performance_inputs/sine_front_orig.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,555 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Linadv example problem
+ *                (3d sinusoidal fronusoidal frontt) 
+ *
+ ************************************************************************/
+
+
+LinAdv {
+   advection_velocity = 2.0e0 , 0.1e0, 0.1e0
+
+   godunov_order    = 4
+   corner_transport = "CORNER_TRANSPORT_1"
+
+   data_problem      = "SINE_CONSTANT_X"
+
+   Initial_data {
+      front_position    = 0.0
+      interval_0 {
+         uval      = 40.0
+      }
+      interval_1 {
+         uval      = 1.0
+      }
+      amplitude = 0.25 
+      frequency = 2.0, 2.0, 2.0
+
+   }
+
+   Refinement_data {
+      refine_criteria = "UVAL_GRADIENT", "UVAL_SHOCK"
+ 
+      UVAL_GRADIENT {
+         grad_tol = 10.0
+      }
+ 
+      UVAL_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+   }
+
+  // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "FLOW"
+      }
+
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+
+   }
+
+   use_analytical_tagger = TRUE
+}
+
+BergerRigoutsos {
+   use_level_boxes = TRUE
+   // algo_advance_mode = "SYNCHRONOUS"
+   algo_advance_mode = "ADVANCE_SOME"
+   single_owner = TRUE
+   use_private_communicator = TRUE
+
+   log_cluster_summary = TRUE
+   log_node_history = FALSE
+}
+
+Main {
+   dim = 3
+   base_name    = "sine-front-3d-orig"
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 0          // zero to turn off
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+
+   run_time_plotting = FALSE
+
+   // which_br: 'o' = old, 'n' = new
+   which_br = 'o'
+   use_scaled_input = TRUE
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.   
+   timer_list               = "hier::*::*",
+                              "apps::*::*",
+                              "algs::*::*",
+                              "mesh::*::*",
+                              "tbox::AsyncCommGroup::*",
+                              "tbox::AsyncCommStage::*",
+                              "tbox::JobRelauncher::*",
+                              "xfer::*::*"
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , ( 9, 9, 4) ]   //    1proc
+   //domain_boxes  = [ (0,0,0) , ( 9, 9, 9) ]   //    2proc
+   //domain_boxes  = [ (0,0,0) , (19, 9, 9) ]   //    4proc
+   //domain_boxes  = [ (0,0,0) , (19,19, 9) ]   //    8proc
+   //domain_boxes  = [ (0,0,0) , (19,19,19) ]   //   16proc
+   //domain_boxes  = [ (0,0,0) , (39,19,19) ]   //   32proc
+   //domain_boxes  = [ (0,0,0) , (39,39,19) ]   //   64proc 
+   //domain_boxes  = [ (0,0,0) , (39,39,39) ]   //  128proc
+   //domain_boxes  = [ (0,0,0) , (79,39,39) ]   //  256proc
+   //domain_boxes  = [ (0,0,0) , (79,79,39) ]   //  512proc
+   //domain_boxes  = [ (0,0,0) , (79,79,79) ]   // 1024proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,1,1
+}
+
+PatchHierarchy {
+   max_levels             = 3        // Maximum number of levels in hierarchy.
+   ratio_to_coarser {            // vector ratio to next coarser level
+      level_1             = 4 , 4 , 4
+      level_2             = 4 , 4 , 4
+      level_3             = 4 , 4 , 4
+   }
+
+   largest_patch_size {
+      level_0 =  30, 30, 30  // largest patch allowed in hierarchy
+           // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 =  5, 5, 5
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance   = 0.70e0    // min % of tag cells in new patch level
+   combine_efficiency     = 0.85e0    // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+//   write_regrid_boxes    = TRUE
+   // regrid_boxes_filename  = "regrid_boxes"
+   barrier_before_clustering = TRUE
+   sort_boxes_after_clustering = TRUE
+   extend_tags_to_bdry = TRUE
+   use_new_alg = TRUE
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+
+HyperbolicLevelIntegrator {
+   //cfl                      = 0.9e0    // procs 256, 512, 1024
+   //cfl_init                 = 0.9e0    // procs 256, 512, 1024
+   //cfl                      = 0.45e0   // procs 32, 64, 128
+   //cfl_init                 = 0.45e0   // procs 32, 64, 128
+   //cfl                      = 0.225e0  // procs 4, 8, 16
+   //cfl_init                 = 0.225e0  // procs 4, 8, 16
+   cfl                      = 0.1125e0 // procs 1, 2
+   cfl_init                 = 0.1125e0 // procs 1, 2
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+   distinguish_mpi_reduction_costs = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 0.6      // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   // max_integrator_steps  = 2     // max number of simulation timesteps
+   max_integrator_steps  = 25     // max number of simulation timesteps
+   tag_buffer            = 0, 0, 0, 0, 0, 0
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+   use_spatialBinPack = TRUE
+   ignore_level_box_union_is_single_box = TRUE
+}
+
+
+ScaledInput {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , ( 9, 9, 9) ]
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,1,1
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.1125e0 // procs 1, 2
+   cfl_init                 = 0.1125e0 // procs 1, 2
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .08, .08, .08
+      buffer_space_1 = .04, .04, .04
+      buffer_space_2 = .02, .02, .02
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0 , 0.1e0, 0.1e0
+      init_disp = 0.0, 0.0, 0.0
+   }
+}
+
+////////////////////////////////////////////////////////////////////////
+// Specific databases for scaling tests.
+////////////////////////////////////////////////////////////////////////
+
+ScaledInput1 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , ( 9, 9, 4) ]   //    1proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,1,1
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.1125e0 // procs 1, 2
+   cfl_init                 = 0.1125e0 // procs 1, 2
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0 , 0.1e0, 0.1e0
+      init_disp = 0.0, 0.0, 0.0
+   }
+}
+
+ScaledInput2 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , ( 9, 9, 9) ]   //    2proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,1,1
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.1125e0 // procs 1, 2
+   cfl_init                 = 0.1125e0 // procs 1, 2
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0 , 0.1e0, 0.1e0
+      init_disp = 0.0, 0.0, 0.0
+   }
+}
+
+ScaledInput4 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (19, 9, 9) ]   //    4proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,1,1
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.225e0  // procs 4, 8, 16
+   cfl_init                 = 0.225e0  // procs 4, 8, 16
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0 , 0.1e0, 0.1e0
+      init_disp = 0.0, 0.0, 0.0
+   }
+}
+
+ScaledInput8 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (19,19, 9) ]   //    8proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,1,1
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.225e0  // procs 4, 8, 16
+   cfl_init                 = 0.225e0  // procs 4, 8, 16
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0 , 0.1e0, 0.1e0
+      init_disp = 0.0, 0.0, 0.0
+   }
+}
+
+ScaledInput16 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (19,19,19) ]   //   16proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,1,1
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.225e0  // procs 4, 8, 16
+   cfl_init                 = 0.225e0  // procs 4, 8, 16
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0 , 0.1e0, 0.1e0
+      init_disp = 0.0, 0.0, 0.0
+   }
+}
+
+ScaledInput32 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (39,19,19) ]   //   32proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,1,1
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.45e0   // procs 32, 64, 128
+   cfl_init                 = 0.45e0   // procs 32, 64, 128
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0 , 0.1e0, 0.1e0
+      init_disp = 0.0, 0.0, 0.0
+   }
+}
+
+ScaledInput64 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (39,39,19) ]   //   64proc 
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,1,1
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.45e0   // procs 32, 64, 128
+   cfl_init                 = 0.45e0   // procs 32, 64, 128
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0 , 0.1e0, 0.1e0
+      init_disp = 0.0, 0.0, 0.0
+   }
+}
+
+ScaledInput128 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (39,39,39) ]   //  128proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,1,1
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.45e0   // procs 32, 64, 128
+   cfl_init                 = 0.45e0   // procs 32, 64, 128
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0 , 0.1e0, 0.1e0
+      init_disp = 0.0, 0.0, 0.0
+   }
+}
+
+ScaledInput256 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (79,39,39) ]   //  256proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,1,1
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // procs 256, 512, 1024
+   cfl_init                 = 0.9e0    // procs 256, 512, 1024
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0 , 0.1e0, 0.1e0
+      init_disp = 0.0, 0.0, 0.0
+   }
+}
+
+ScaledInput512 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (79,79,39) ]   //  512proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,1,1
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // procs 256, 512, 1024
+   cfl_init                 = 0.9e0    // procs 256, 512, 1024
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0 , 0.1e0, 0.1e0
+      init_disp = 0.0, 0.0, 0.0
+   }
+}
+
+ScaledInput1024 {
+CartesianGeometry {
+   domain_boxes  = [ (0,0,0) , (79,79,79) ]   // 1024proc
+   x_lo          = -2.e0, -1.e0,-1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0, 1.e0  // upper end of computational domain.
+   periodic_dimension = 0,1,1
+}
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // procs 256, 512, 1024
+   cfl_init                 = 0.9e0    // procs 256, 512, 1024
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+   SinusoidalFrontTagger {
+      allocate_data = FALSE
+      buffer_cells = 0,0,0
+      buffer_space_0 = .25, .25, .25
+      buffer_space_1 = .05, .05, .05
+      buffer_space_2 = .01, .01, .01
+      period = 1
+      amplitude = .3
+      velocity = 2.0e0 , 0.1e0, 0.1e0
+      init_disp = 0.0, 0.0, 0.0
+   }
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/sample_inputs/sine-front-2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/sample_inputs/sine-front-2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,164 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI Linadv example problem
+ *                (2d sinusoidal fronusoidal frontt) 
+ *
+ ************************************************************************/
+
+
+LinAdv {
+   advection_velocity = 2.0e0 , 0.1e0
+
+   godunov_order    = 4
+   corner_transport = "CORNER_TRANSPORT_1"
+
+   data_problem      = "SINE_CONSTANT_X"
+
+   Initial_data {
+      front_position    = 0.0
+      interval_0 {
+         uval      = 40.0
+      }
+      interval_1 {
+         uval      = 1.0
+      }
+      amplitude = 0.25 
+      frequency = 2.0, 2.0
+
+   }
+
+   Refinement_data {
+      refine_criteria = "UVAL_GRADIENT", "UVAL_SHOCK"
+ 
+      UVAL_GRADIENT {
+         grad_tol = 10.0
+      }
+ 
+      UVAL_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+   }
+
+  // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "FLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "XFLOW"
+      }
+   }
+}
+
+Main {
+// log file parameters 
+   log_file_name    = "sine-2d.log"
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_sine2d"
+   viz_dump_filename     = "sine2d"    // not used by VisIt
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters 
+   restart_interval        = 0        // zero to turn off
+   restart_write_dirname   = "restart_sine2d"
+
+   run_time_plotting = FALSE
+}
+
+TimerManager {
+   print_exclusive      = TRUE   
+   timer_list               = "apps::*::*",
+                              "algs::*::*",
+                              "mesh::*::*"
+}
+
+CartesianGeometry {
+   domain_boxes  = [ (0,0) , (39,19) ]
+   x_lo          = -2.e0, -1.e0     // lower end of computational domain.
+   x_up          = 2.e0, 1.e0   // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels             = 3        // Maximum number of levels in hierarchy.
+   ratio_to_coarser {            // vector ratio to next coarser level
+      level_1             = 4 , 4 
+      level_2             = 4 , 4 
+   }
+
+   largest_patch_size {
+      level_0 =  19, 19  // largest patch allowed in hierarchy
+           // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 =  8, 8
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance   = 0.70e0    // min % of tag cells in new patch level
+   combine_efficiency     = 0.85e0    // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+//   write_regrid_boxes    = TRUE
+   regrid_boxes_filename  = "regrid_boxes"
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+
+HyperbolicLevelIntegrator {
+   cfl                      = 0.9e0    // max cfl factor used in problem
+   cfl_init                 = 0.1e0    // initial cfl factor
+   lag_dt_computation       = TRUE
+   use_ghosts_to_compute_dt = TRUE
+}
+
+TimeRefinementIntegrator {
+   start_time            = 0.e0     // initial simulation time
+   end_time              = 100.e0   // final simulation time
+   grow_dt               = 1.1e0    // growth factor for timesteps
+   max_integrator_steps  = 25     // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/sample_inputs/sphere-2d-per-4levels.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/sample_inputs/sphere-2d-per-4levels.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,162 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI LinAdv example problem 
+ *
+ ************************************************************************/
+
+LinAdv {
+
+   advection_velocity = 2.0e0 , 1.0e0 
+   godunov_order    = 4                // order of Goduov slopes (1, 2, or 4)
+   corner_transport = "CORNER_TRANSPORT_1"
+
+   data_problem      = "SPHERE" 
+
+   Initial_data {
+      radius            = 2.9   
+      center            = 22.5 , 5.5 
+
+      uval_inside       = 80.0
+      uval_outside      = 5.0
+ 
+   }
+
+   Refinement_data {
+      refine_criteria = "UVAL_GRADIENT", "UVAL_SHOCK"
+ 
+      UVAL_GRADIENT {
+         grad_tol = 10.0
+      }
+ 
+      UVAL_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+   }
+
+  // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "FLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "XFLOW"
+      }
+   }
+
+}
+
+Main {
+// log file parameters 
+   log_file_name    = "sphere-2d.log"
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_sphere2d"
+   viz_dump_filename     = "sphere2d"    // not used by VisIt
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters
+   restart_interval       = 0         // zero to turn off
+   restart_write_dirname  = "restart_sphere2d"
+}
+
+CartesianGeometry{
+   domain_boxes	= [(0,0),(29,19)]
+
+   x_lo = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up = 30.e0 , 20.e0 // upper end of computational domain.
+
+   periodic_dimension = 1,0
+}
+
+PatchHierarchy {
+   max_levels = 4      // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 2 , 2
+      level_2 = 2 , 2
+      level_3 = 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 40 , 40
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 16 , 16 
+      level_1 = 12 , 12 
+      // all finer levels will use same values as level_1...
+   }
+}
+
+GriddingAlgorithm{
+
+   efficiency_tolerance    = 0.85e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.95e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.9e0    // max cfl factor used in problem
+   cfl_init                  = 0.9e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+TimeRefinementIntegrator{
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 25       // max number of simulation timesteps
+
+   tag_buffer = 3,3,3
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/sample_inputs/sphere-2d-re.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/sample_inputs/sphere-2d-re.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,173 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI LinAdv example problem 
+ *
+ ************************************************************************/
+LinAdv {
+
+   advection_velocity = 2.0e0 , 1.0e0 
+   godunov_order    = 4                // order of Goduov slopes (1, 2, or 4)
+   corner_transport = "CORNER_TRANSPORT_1"
+
+   data_problem      = "SPHERE" 
+
+   Initial_data {
+      radius            = 2.9   
+      center            = 22.5 , 5.5 
+
+      uval_inside       = 80.0
+      uval_outside      = 5.0
+ 
+   }
+
+   Refinement_data {
+      refine_criteria = "UVAL_RICHARDSON", "UVAL_GRADIENT", "UVAL_SHOCK"
+ 
+      UVAL_RICHARDSON {
+         rich_tol = 0.1, 0.1, 0.001
+      }
+
+      // UVAL_GRADIENT AND UVAL_SHOCK criteria are applied only if the gradient 
+      // detector is turned on in the StandardTagAndInitialize input below...
+      UVAL_GRADIENT {
+         grad_tol = 10.0
+      }
+ 
+      UVAL_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+   }
+
+  // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "FLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "XFLOW"
+      }
+   }
+
+}
+
+Main {
+// log file parameters 
+   log_file_name    = "sphere-2d.log"
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_sphere2d"
+   viz_dump_filename     = "sphere2d"    // not used by VisIt
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters
+   restart_interval       = 0         // zero to turn off
+   restart_write_dirname  = "restart_sphere2d"
+}
+
+CartesianGeometry{
+   domain_boxes	= [(0,0),(29,19)]
+
+   x_lo = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up = 30.e0 , 20.e0 // upper end of computational domain.
+
+   periodic_dimension = 1,0
+}
+
+PatchHierarchy {
+   max_levels = 4         // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 4 , 4
+      level_2 = 2 , 2
+      level_3 = 2 , 2
+      level_4 = 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 40 , 40
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 16 , 16 
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm{
+
+   efficiency_tolerance    = 0.85e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.95e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize {
+//   tagging_method = "GRADIENT_DETECTOR"
+   tagging_method = "RICHARDSON_EXTRAPOLATION"
+//   tagging_method = "RICHARDSON_EXTRAPOLATION", "GRADIENT_DETECTOR"
+//   tagging_method = "REFINE_BOXES"
+//   RefineBoxes {
+//      level_0 = [(15,0),(29,14)]
+//      level_1 = [(65,10),(114,40)]
+//   }
+}
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.9e0    // max cfl factor used in problem
+   cfl_init                  = 0.9e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+TimeRefinementIntegrator{
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 25       // max number of simulation timesteps
+
+   tag_buffer = 2,2,2
+}
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/sample_inputs/sphere-2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/sample_inputs/sphere-2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,163 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI LinAdv example problem 
+ *
+ ************************************************************************/
+
+LinAdv {
+
+   advection_velocity = 2.0e0 , 1.0e0 
+   godunov_order    = 4                // order of Goduov slopes (1, 2, or 4)
+   corner_transport = "CORNER_TRANSPORT_1"
+
+   data_problem      = "SPHERE"
+
+   Initial_data {
+      radius            = 2.9   
+      center            = 22.5 , 5.5 
+
+      uval_inside       = 80.0
+      uval_outside      = 5.0
+ 
+   }
+
+   Refinement_data {
+      refine_criteria = "UVAL_GRADIENT", "UVAL_SHOCK"
+ 
+      UVAL_GRADIENT {
+         grad_tol = 10.0
+      }
+ 
+      UVAL_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+   }
+
+  // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "FLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "XFLOW"
+      }
+   }
+
+}
+
+Main {
+// log file parameters 
+   log_file_name    = "sphere-2d.log"
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_sphere2d"
+   viz_dump_filename     = "sphere2d"    // not used by VisIt
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+// restart dump parameters
+   restart_interval       = 0         // zero to turn off
+   restart_write_dirname  = "restart_sphere2d"
+
+}
+
+CartesianGeometry{
+   domain_boxes	= [(0,0),(29,19)]
+
+   x_lo = 0.e0 , 0.e0   // lower end of computational domain.
+   x_up = 30.e0 , 20.e0 // upper end of computational domain.
+
+   periodic_dimension = 1,0
+}
+
+PatchHierarchy {
+   max_levels = 3         // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 4 , 4
+      level_2 = 4 , 4
+      level_3 = 4 , 4
+      level_4 = 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 40 , 40
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 16 , 16 
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm{
+
+   efficiency_tolerance    = 0.85e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.95e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.9e0    // max cfl factor used in problem
+   cfl_init                  = 0.9e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+TimeRefinementIntegrator{
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 25       // max number of simulation timesteps
+
+   tag_buffer = 2,2,2
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LinAdv/sample_inputs/sphere-3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LinAdv/sample_inputs/sphere-3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,224 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI LinAdv example problem 
+ *
+ ************************************************************************/
+
+LinAdv {
+
+   advection_velocity = 2.0e0 , 1.0e0 , 1.0e0
+   godunov_order    = 2                // order of Goduov slopes (1, 2, or 4)
+   corner_transport = "CORNER_TRANSPORT_1"  
+
+   data_problem      = "SPHERE" 
+
+   Initial_data {
+      radius            = 2.9   
+      center            = 5.5 , 5.5 , 5.5
+
+      uval_inside       = 80.0
+      uval_outside      = 5.0
+ 
+   }
+
+   Refinement_data {
+      refine_criteria = "UVAL_GRADIENT", "UVAL_SHOCK"
+ 
+      UVAL_GRADIENT {
+         grad_tol = 10.0
+      }
+ 
+      UVAL_SHOCK {
+         shock_tol = 10.0
+         shock_onset = 0.85
+      }
+   }
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_xhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_ylo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_yhi {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zlo {
+         boundary_condition      = "FLOW"
+      }
+      boundary_face_zhi {
+         boundary_condition      = "FLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for an edge, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent face has either a FLOW
+      //            or REFLECT condition, the resulting edge boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZFLOW"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XFLOW"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YFLOW"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent faces have either FLOW
+      //            or REFLECT conditions, the resulting node boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XFLOW"
+      }
+
+   }
+
+}
+
+Main {
+// log file parameters 
+   log_file_name    = "sphere-3d.log"
+   log_all_nodes    = TRUE
+
+// visualization dump parameters 
+   viz_writer            = "VisIt" // use: "Vizamrai", "VisIt" for both
+   viz_dump_interval     = 1          // zero to turn off
+   viz_dump_dirname      = "viz_sphere3d"
+   viz_dump_filename     = "sphere3d"    // not used by VisIt
+   visit_number_procs_per_file = 1    // not used by Vizamrai
+
+
+// restart dump parameters
+   restart_interval       = 0         // zero to turn off
+   restart_write_dirname  = "restart_sphere3d"
+
+}
+
+CartesianGeometry{
+   domain_boxes	= [ (0,0,0) , (29,19,19) ]
+
+   x_lo = 0.e0 , 0.e0 , 0.e0    // lower end of computational domain.
+   x_up = 30.e0 , 20.e0 , 20.e0 // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels = 3         // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+
+   ratio_to_coarser {      // vector ratio to next coarser level
+      level_1 = 2 , 2 , 2
+      level_2 = 2 , 2 , 2
+      level_3 = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 40 , 40 , 40
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 9 , 9 , 9 
+      // all finer levels will use same values as level_0...
+   }
+}
+
+GriddingAlgorithm{
+
+   efficiency_tolerance    = 0.85e0   // min % of tag cells in new patch level
+   combine_efficiency      = 0.95e0   // chop box if sum of volumes of smaller
+                                      // boxes < efficiency * vol of large box
+}
+
+StandardTagAndInitialize {
+   tagging_method = "GRADIENT_DETECTOR"
+}
+
+HyperbolicLevelIntegrator{
+   cfl                       = 0.9e0    // max cfl factor used in problem
+   cfl_init                  = 0.9e0    // initial cfl factor
+   lag_dt_computation        = TRUE
+   use_ghosts_to_compute_dt  = TRUE
+}
+
+TimeRefinementIntegrator{
+   start_time           = 0.e0     // initial simulation time
+   end_time             = 100.e0   // final simulation time
+   grow_dt              = 1.1e0    // growth factor for timesteps
+   max_integrator_steps = 25      // max number of simulation timesteps
+}
+
+LoadBalancer {
+// using default uniform load balance configuration (see mesh_LoadBalancerX.h.sed)
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/DerivedVisOwnerData.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/DerivedVisOwnerData.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,49 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   TreeLoadBalancer test. 
+ *
+ ************************************************************************/
+#include "DerivedVisOwnerData.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+
+using namespace SAMRAI;
+
+DerivedVisOwnerData::DerivedVisOwnerData()
+{
+}
+
+DerivedVisOwnerData::~DerivedVisOwnerData()
+{
+}
+
+bool DerivedVisOwnerData::packDerivedDataIntoDoubleBuffer(
+   double* buffer,
+   const hier::Patch& patch,
+   const hier::Box& region,
+   const std::string& variable_name,
+   int depth_id) const
+{
+   (void)patch;
+   (void)region;
+   (void)variable_name;
+   (void)depth_id;
+   if (variable_name == "Owner") {
+      const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+      double owner = mpi.getRank();
+      int i, size = region.size();
+      for (i = 0; i < size; ++i) buffer[i] = owner;
+   } else {
+      // Did not register this name.
+      TBOX_ERROR(
+         "Unregistered variable name '" << variable_name << "' in\n"
+         <<
+         "DerivedVisOwnerData::packDerivedPatchDataIntoDoubleBuffer");
+   }
+
+   return true;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/DerivedVisOwnerData.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/DerivedVisOwnerData.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   TreeLoadBalancer test. 
+ *
+ ************************************************************************/
+#ifndef included_DerivedVisOwnerData
+#define included_DerivedVisOwnerData
+
+#include <string>
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/Patch.h"
+
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Database.h"
+
+/*
+ * SAMRAI classes
+ */
+#include "SAMRAI/appu/VisDerivedDataStrategy.h"
+
+using namespace SAMRAI;
+
+/*!
+ * @brief Write owner rank using VisDerivedDataStrategy.
+ */
+class DerivedVisOwnerData:
+   public appu::VisDerivedDataStrategy
+{
+
+public:
+   /*!
+    * @brief Constructor.
+    */
+   DerivedVisOwnerData();
+
+   ~DerivedVisOwnerData();
+
+   //@{ @name SAMRAI::appu::VisDerivedDataStrategy virtuals
+
+   virtual bool
+   packDerivedDataIntoDoubleBuffer(
+      double* buffer,
+      const hier::Patch& patch,
+      const hier::Box& region,
+      const std::string& variable_name,
+      int depth_id) const;
+
+   //@}
+
+private:
+};
+
+#endif  // included_DerivedVisOwnerData
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,316 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=DerivedVisOwnerData.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h DerivedVisOwnerData.C	\
+	DerivedVisOwnerData.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=lb.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelConnectorUtils.I	\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelConnectorUtils.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappingConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/OverlapConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BergerRigoutsos.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/ChopAndPackLoadBalancer.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	DerivedVisOwnerData.h lb.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,71 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   Test program for performance of load balancers. 
+##
+#########################################################################
+
+SAMRAI	      =	@top_srcdir@
+SRCDIR	      =	@srcdir@
+SUBDIR        = source/test/performance/LoadBalancers
+VPATH	      =	@srcdir@
+OBJECT        = ../../../..
+
+CPPFLAGS_EXTRA= -DNDIM=$(PDIM)  -DTESTING=1
+
+default: check
+
+include $(OBJECT)/config/Makefile.config
+
+NUM_TESTS = 8
+
+TEST_NPROCS = @TEST_NPROCS@
+
+CXX_OBJS      = lb.o DerivedVisOwnerData.o
+
+INPUTS1D = rod.1d.input
+INPUTS2D = rect.2d.treelb.input rod.2d.treelb.input small_cube.2d.caplb.input small_cube.2d.treelb.input small_sphere.2d.caplb.input small_sphere.2d.treelb.input
+INPUTS3D = plank.3d.treelb.input small_cube.3d.treelb.input
+
+main: $(CXX_OBJS) $(LIBSAMRAI)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) \
+	$(LIBSAMRAI) $(LDLIBS) -o $@
+
+check:
+		$(MAKE) check2d
+		$(MAKE) check3d
+
+check1d:	main
+		for f in $(INPUTS1D); do	\
+			$(OBJECT)/config/serpa-run $(TEST_NPROCS) \ ./main "test_inputs/$$f";	\
+		done
+
+check2d:	main
+		for f in $(INPUTS2D); do	\
+			$(OBJECT)/config/serpa-run $(TEST_NPROCS) \ ./main "test_inputs/$$f";	\
+		done
+
+check3d:	main
+		for f in $(INPUTS3D); do	\
+			$(OBJECT)/config/serpa-run $(TEST_NPROCS) \ ./main "test_inputs/$$f";	\
+		done
+
+checkcompile: main
+
+checktest:
+		rm -f makecheck.logfile
+		$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+		$(OBJECT)/source/test/testtools/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+		rm -f makecheck.logfile
+
+clean-check:
+		$(SAMCLEAN)
+
+clean:
+		$(SAMCLEAN)
+		$(RM) *.f main
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/cube_inputs/big_cube.2d.treelb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/cube_inputs/big_cube.2d.treelb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 2
+
+   base_name = "big_cube.2d.treelb"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "TreeLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0),(499,499)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0),(499,499)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10),(489,489)]
+      initial_owners = 0
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/cube_inputs/big_cube.3d.caplb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/cube_inputs/big_cube.3d.caplb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,88 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 3
+
+   base_name = "big_cube.3d.caplb"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "ChopAndPackLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0,0),(99,99,99)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0,0),(99,99,99)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4, 4
+   max_size = 10, 10, 10
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10,10),(89,89,89)]
+      initial_owners = 0
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'n'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/cube_inputs/big_cube.3d.treelb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/cube_inputs/big_cube.3d.treelb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,88 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 3
+
+   base_name = "big_cube.3d.treelb"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "TreeLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0,0),(99,99,99)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0,0),(99,99,99)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4, 4
+   max_size = -1, -1, -1
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10,10),(89,89,89)]
+      initial_owners = 0
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'n'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/cube_inputs/huge_cube.2d.treelb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/cube_inputs/huge_cube.2d.treelb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 2
+
+   base_name = "huge_cube.2d.treelb"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "TreeLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0),(999,999)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0),(999,999)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10),(989,989)]
+      initial_owners = 0
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'y'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/cube_inputs/huge_cube.3d.treelb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/cube_inputs/huge_cube.3d.treelb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 3
+
+   base_name = "huge_cube.3d.treelb"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "TreeLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0,0),(299,299,299)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0,0),(299,299,299)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4, 4
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10,10),(289,289,289)]
+      initial_owners = 0
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'y'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/cube_inputs/med_cube.2d.caplb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/cube_inputs/med_cube.2d.caplb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,91 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 2
+
+   base_name = "med_cube.caplb.2d"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "ChopAndPackLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0),(299,299)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0),(299,299)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10),(289,289)]
+      initial_owners = 0
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+ChopAndPackLoadBalancer {
+  max_workload_factor = 1.0
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/cube_inputs/med_cube.2d.treelb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/cube_inputs/med_cube.2d.treelb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 2
+
+   base_name = "med_cube.treelb.2d"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "TreeLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0),(299,299)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0),(299,299)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10),(289,289)]
+      initial_owners = 0
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/cube_inputs/med_cube.3d.caplb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/cube_inputs/med_cube.3d.caplb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,88 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 3
+
+   base_name = "med_cube.3d.caplb"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "ChopAndPackLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0,0),(49,49,49)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0,0),(49,49,49)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 2, 2, 2
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 2, 2, 2
+   max_size = 10, 10, 10
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(5,5,5),(44,44,44)]
+      initial_owners = 0
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'y'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/cube_inputs/med_cube.3d.treelb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/cube_inputs/med_cube.3d.treelb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,88 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 3
+
+   base_name = "med_cube.3d.treelb"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "TreeLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0,0),(49,49,49)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0,0),(49,49,49)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 2, 2, 2
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 2, 2, 2
+   max_size = -1, -1, -1
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(5,5,5),(44,44,44)]
+      initial_owners = 0
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'y'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/cube_inputs/small_cube.3d.caplb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/cube_inputs/small_cube.3d.caplb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,88 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 3
+
+   base_name = "small_cube.3d.caplb"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "ChopAndPackLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0,0),(19,19,19)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0,0),(19,19,19)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 2, 2, 2
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 2, 2, 2
+   max_size = 10, 10, 10
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(5,5,5),(14,14,14)]
+      initial_owners = 0
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'y'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/cube_inputs/small_cube.3d.treelb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/cube_inputs/small_cube.3d.treelb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,88 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 3
+
+   base_name = "small_cube.3d.treelb"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "TreeLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0,0),(19,19,19)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0,0),(19,19,19)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 2, 2, 2
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 2, 2, 2
+   max_size = -1, -1, -1
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(5,5,5),(14,14,14)]
+      initial_owners = 0
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'y'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/lb.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/lb.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,779 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Test program for performance and quality of TreeLoadBalancer. 
+ *
+ ************************************************************************/
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <iomanip>
+
+#include "SAMRAI/mesh/BergerRigoutsos.h"
+#include "SAMRAI/hier/MappedBoxLevel.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/hier/Connector.h"
+#include "SAMRAI/hier/MappedBoxLevelConnectorUtils.h"
+#include "SAMRAI/hier/OverlapConnectorAlgorithm.h"
+#include "SAMRAI/hier/MappingConnectorAlgorithm.h"
+#include "SAMRAI/mesh/TreeLoadBalancer.h"
+#include "SAMRAI/mesh/ChopAndPackLoadBalancer.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/appu/VisItDataWriter.h"
+
+#include "SAMRAI/tbox/InputDatabase.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include <vector>
+
+#include "DerivedVisOwnerData.h"
+
+#ifndef LACKS_NAMESPACE
+using namespace SAMRAI;
+using namespace tbox;
+#endif
+
+/*
+ ************************************************************************
+ *
+ *
+ *************************************************************************
+ */
+
+typedef std::vector<hier::MappedBox> NodeVec;
+typedef std::vector<hier::Box> BoxVec;
+
+void
+generatePrebalanceByUserBoxes(
+   tbox::Pointer<tbox::Database> database,
+   const tbox::Pointer<hier::PatchHierarchy>& hierarchy,
+   const hier::IntVector& min_size,
+   const hier::IntVector& max_gcw,
+   hier::MappedBoxLevel& balance_mapped_box_level,
+   const hier::MappedBoxLevel& anchor_mapped_box_level,
+   hier::Connector& anchor_to_balance,
+   hier::Connector& balacne_to_anchor);
+
+void
+generatePrebalanceByUserShells(
+   const tbox::Pointer<tbox::Database>& database,
+   const tbox::Pointer<hier::PatchHierarchy>& hierarchy,
+   const hier::IntVector& min_size,
+   const hier::IntVector& max_gcw,
+   hier::MappedBoxLevel& balance_mapped_box_level,
+   const hier::MappedBoxLevel& anchor_mapped_box_level,
+   hier::Connector& anchor_to_balance,
+   hier::Connector& balance_to_anchor);
+
+void
+sortNodes(
+   hier::MappedBoxLevel& new_mapped_box_level,
+   hier::Connector& tag_to_new,
+   hier::Connector& new_to_tag,
+   bool sort_by_corners,
+   bool sequentialize_global_indices);
+
+int main(
+   int argc,
+   char* argv[])
+{
+   /*
+    * Initialize MPI, SAMRAI.
+    */
+
+   SAMRAI_MPI::init(&argc, &argv);
+   SAMRAIManager::initialize();
+   SAMRAIManager::startup();
+   tbox::SAMRAI_MPI mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   const int rank = mpi.getRank();
+   int fail_count = 0;
+
+   /*
+    * Process command line arguments.  For each run, the input
+    * filename must be specified.  Usage is:
+    *
+    * executable <input file name>
+    */
+   std::string input_filename;
+
+   if (argc < 2) {
+      TBOX_ERROR("USAGE:  " << argv[0] << " <input file> [case name]\n"
+                                       << "  options:\n"
+                                       << "  none at this time" << std::endl);
+   } else {
+      input_filename = argv[1];
+   }
+
+   std::string case_name;
+   if (argc > 2) {
+      case_name = argv[2];
+   }
+
+   {
+      /*
+       * Scope to force destruction of objects that would otherwise
+       * leave allocated memory reported by the memory test.
+       */
+
+      /*
+       * Create input database and parse all data in input file.
+       */
+
+      Pointer<Database> input_db(new InputDatabase("input_db"));
+      tbox::InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      /*
+       * Set up the timer manager.
+       */
+      if (input_db->isDatabase("TimerManager")) {
+         TimerManager::createManager(input_db->getDatabase("TimerManager"));
+      }
+
+      /*
+       * Retrieve "Main" section from input database.
+       * The main database is used only in main().
+       * The base_name variable is a base name for
+       * all name strings in this program.
+       */
+
+      Pointer<Database> main_db = input_db->getDatabase("Main");
+
+      const tbox::Dimension dim(static_cast<unsigned short>(main_db->getInteger("dim")));
+
+      std::string base_name = "unnamed";
+      base_name = main_db->getStringWithDefault("base_name", base_name);
+
+      /*
+       * Modify basename for this particular run.
+       * Add the number of processes and the case name.
+       */
+      if (!case_name.empty()) {
+         base_name = base_name + '-' + case_name;
+      }
+      base_name = base_name + '-' + tbox::Utilities::intToString(
+            mpi.getSize(),
+            5);
+      tbox::plog << "Added case name (" << case_name << ") and nprocs ("
+                 << mpi.getSize() << ") to base name -> '"
+                 << base_name << "'\n";
+
+      if (!case_name.empty()) {
+         tbox::plog << "Added case name (" << case_name << ") and nprocs ("
+                    << mpi.getSize() << ") to base name -> '"
+                    << base_name << "'\n";
+      }
+
+      /*
+       * Start logging.
+       */
+      const std::string log_file_name = base_name + ".log";
+      bool log_all_nodes = false;
+      log_all_nodes = main_db->getBoolWithDefault("log_all_nodes",
+            log_all_nodes);
+      if (log_all_nodes) {
+         PIO::logAllNodes(log_file_name);
+      } else {
+         PIO::logOnlyNodeZero(log_file_name);
+      }
+
+      plog << "Input database after initialization..." << std::endl;
+      input_db->printClassData(plog);
+
+      // tbox::TimerManager *tm = tbox::TimerManager::getManager();
+      // tbox::Pointer<tbox::Timer> t_search_tree_for_set =
+      // tm->getTimer("apps::main::search_tree_for_set");
+
+      /*
+       * Parameters.  Some of these should be specified by input deck.
+       */
+      hier::IntVector ghost_cell_width(dim, 2);
+      if (main_db->isInteger("ghost_cell_width")) {
+         main_db->getIntegerArray("ghost_cell_width", &ghost_cell_width[0], dim.getValue());
+      }
+
+      hier::IntVector min_size(dim, 8);
+      if (main_db->isInteger("min_size")) {
+         main_db->getIntegerArray("min_size", &min_size[0], dim.getValue());
+      }
+      hier::IntVector max_size(dim, -1);
+      if (main_db->isInteger("max_size")) {
+         main_db->getIntegerArray("max_size", &max_size[0], dim.getValue());
+      }
+      hier::IntVector bad_interval(dim, 2);
+      hier::IntVector cut_factor(dim, 1);
+
+      hier::OverlapConnectorAlgorithm oca;
+
+      /*
+       * Set up the domain from input.
+       */
+      hier::BoxArray domain_boxes(dim);
+      hier::MappedBoxLevel domain_mapped_box_level(
+         hier::IntVector(dim, 1),
+         tbox::SAMRAI_MPI::getSAMRAIWorld(),
+         hier::MappedBoxLevel::GLOBALIZED);
+
+      domain_boxes = main_db->getDatabaseBoxArray("domain_boxes");
+      for (int i = 0; i < domain_boxes.size(); ++i) {
+         domain_mapped_box_level.addMappedBox(hier::MappedBox(domain_boxes[i],
+                                                              hier::LocalId(i), 0));
+      }
+
+      /*
+       * Create hierarchy we can satisfy the load balancing
+       * interface and dump visit output.
+       *
+       * anchor_mapped_box_level is used for level 0.
+       * balance_mapped_box_level is used for level 1.
+       */
+      const hier::IntVector ilo(
+         domain_mapped_box_level.getGlobalBoundingBox().lower());
+      const hier::IntVector ihi(
+         domain_mapped_box_level.getGlobalBoundingBox().upper());
+      std::vector<double> xlo(dim.getValue());
+      std::vector<double> xhi(dim.getValue());
+      for (int i = 0; i < dim.getValue(); ++i) {
+         xlo[i] = 0.0;
+         xhi[i] = 1.0;
+      }
+      tbox::Pointer<geom::CartesianGridGeometry> grid_geometry(
+         new geom::CartesianGridGeometry(
+            "GridGeometry",
+            &xlo[0],
+            &xhi[0],
+            domain_boxes));
+
+      tbox::Pointer<hier::PatchHierarchy> hierarchy(
+         new hier::PatchHierarchy(
+            "Hierarchy",
+            grid_geometry));
+
+      hierarchy->setMaxNumberOfLevels(2);
+
+      /*
+       * Set up the load balancers.
+       */
+
+      mesh::ChopAndPackLoadBalancer cut_and_pack_lb(
+         dim,
+         "ChopAndPackLoadBalancer",
+         input_db->getDatabaseWithDefault("ChopAndPackLoadBalancer",
+            tbox::Pointer<SAMRAI::tbox::Database>(NULL)));
+
+      mesh::TreeLoadBalancer tree_lb(
+         dim,
+         "TreeLoadBalancer",
+         input_db->getDatabaseWithDefault("TreeLoadBalancer",
+            tbox::Pointer<SAMRAI::tbox::Database>(NULL)));
+      tree_lb.setSAMRAI_MPI(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+      mesh::LoadBalanceStrategy* lb = NULL;
+
+      std::string load_balancer_type;
+      if (main_db->isString("load_balancer_type")) {
+         load_balancer_type = main_db->getString("load_balancer_type");
+         if (load_balancer_type == "TreeLoadBalancer") {
+            lb = &tree_lb;
+         } else if (load_balancer_type == "ChopAndPackLoadBalancer") {
+            lb = &cut_and_pack_lb;
+         }
+      }
+      if (lb == NULL) {
+         TBOX_ERROR(
+            "Missing or bad load_balancer specification in Main database.\n"
+            << "Specify load_balancer_type = STRING, where STRING can be\n"
+            << "\"ChopAndPackLoadBalancer\" or \"TreeLoadBalancer\".");
+      }
+
+      /*
+       * Set up data used by TreeLoadBalancer.
+       */
+      hier::MappedBoxLevel anchor_mapped_box_level(hier::IntVector(dim, 1));
+      hier::MappedBoxLevel balance_mapped_box_level(dim);
+      hier::Connector balance_to_anchor;
+      hier::Connector anchor_to_balance;
+      hier::Connector balance_to_balance;
+
+      {
+         hier::BoxArray anchor_boxes(dim);
+         anchor_boxes = main_db->getDatabaseBoxArray("anchor_boxes");
+         const int boxes_per_proc =
+            (anchor_boxes.size() + anchor_mapped_box_level.getNproc()
+             - 1) / anchor_mapped_box_level.getNproc();
+         const int my_boxes_start = anchor_mapped_box_level.getRank()
+            * boxes_per_proc;
+         const int my_boxes_stop =
+            tbox::MathUtilities<int>::Min(my_boxes_start + boxes_per_proc,
+               anchor_boxes.size());
+         for (int i = my_boxes_start; i < my_boxes_stop; ++i) {
+            anchor_mapped_box_level.addBox(anchor_boxes[i]);
+         }
+      }
+
+      {
+         /*
+          * Load balance the anchor mapped_box_level, using the domain as its anchor.
+          *
+          * This is not a part of the performance test because does not
+          * reflect the load balancer use in real apps.  We just neeed a
+          * distributed anchor for the real loac balancing performance test.
+          */
+         hier::Connector anchor_to_domain(
+            anchor_mapped_box_level,
+            domain_mapped_box_level,
+            hier::IntVector(dim, 2));
+         hier::Connector domain_to_anchor(
+            domain_mapped_box_level,
+            anchor_mapped_box_level,
+            hier::IntVector(dim, 2));
+         oca.findOverlaps(anchor_to_domain);
+         oca.findOverlaps(domain_to_anchor);
+
+         tbox::plog << "\n\n\ninitial anchor loads:\n";
+         lb->gatherAndReportLoadBalance(
+            (double)anchor_mapped_box_level.getLocalNumberOfCells(),
+            anchor_mapped_box_level.getMPI());
+
+         lb->loadBalanceMappedBoxLevel(
+            anchor_mapped_box_level,
+            anchor_to_domain,
+            domain_to_anchor,
+            hierarchy,
+            0,
+            hier::Connector(),
+            hier::Connector(),
+            min_size,
+            max_size,
+            domain_mapped_box_level,
+            bad_interval,
+            cut_factor);
+
+         sortNodes(anchor_mapped_box_level,
+            domain_to_anchor,
+            anchor_to_domain,
+            false,
+            true);
+
+         oca.assertOverlapCorrectness(anchor_to_domain);
+         oca.assertOverlapCorrectness(domain_to_anchor);
+
+         anchor_mapped_box_level.cacheGlobalReducedData();
+
+         tbox::plog << "\n\n\nfinal anchor loads:\n";
+         lb->gatherAndReportLoadBalance(
+            (double)anchor_mapped_box_level.getLocalNumberOfCells(),
+            anchor_mapped_box_level.getMPI());
+      }
+
+      {
+         std::string box_gen_method("PrebalanceByUserBoxes");
+         box_gen_method = main_db->getStringWithDefault("box_gen_method",
+               box_gen_method);
+         if (box_gen_method == "PrebalanceByUserBoxes") {
+            generatePrebalanceByUserBoxes(
+               main_db->getDatabase("PrebalanceByUserBoxes"),
+               hierarchy,
+               min_size,
+               ghost_cell_width,
+               balance_mapped_box_level,
+               anchor_mapped_box_level,
+               anchor_to_balance,
+               balance_to_anchor);
+         } else if (box_gen_method == "PrebalanceByUserShells") {
+            generatePrebalanceByUserShells(
+               main_db->getDatabase("PrebalanceByUserShells"),
+               hierarchy,
+               min_size,
+               ghost_cell_width,
+               balance_mapped_box_level,
+               anchor_mapped_box_level,
+               anchor_to_balance,
+               balance_to_anchor);
+         } else {
+            TBOX_ERROR("Bad box_gen_method: '" << box_gen_method << "'");
+         }
+      }
+
+      {
+         /*
+          * Output "before" data.
+          */
+         balance_mapped_box_level.cacheGlobalReducedData();
+         tbox::plog << "\n\n\nBefore:\n";
+         lb->gatherAndReportLoadBalance(
+            (double)balance_mapped_box_level.getLocalNumberOfCells(),
+            balance_mapped_box_level.getMPI());
+
+         tbox::plog << "Anchor mapped_box_level node stats:\n";
+         anchor_mapped_box_level.printMappedBoxStats(tbox::plog, "AL-> ");
+         tbox::plog << "Anchor mapped_box_level:\n";
+         anchor_mapped_box_level.recursivePrint(tbox::plog, "AL-> ", 2);
+
+         tbox::plog << "Balance mapped_box_level node stats:\n";
+         balance_mapped_box_level.printMappedBoxStats(tbox::plog, "BL-> ");
+         tbox::plog << "Balance mapped_box_level:\n";
+         balance_mapped_box_level.recursivePrint(tbox::plog, "BL-> ", 2);
+
+         tbox::plog << "balance_to_anchor edge stats:\n";
+         balance_to_anchor.printNeighborStats(tbox::plog, "BA-> ");
+         tbox::plog << "balance_to_anchor:\n";
+         balance_to_anchor.recursivePrint(tbox::plog, "BA-> ");
+
+         tbox::plog << "anchor_to_balance edge stats:\n";
+         anchor_to_balance.printNeighborStats(tbox::plog, "AB-> ");
+         tbox::plog << "anchor_to_balance:\n";
+         anchor_to_balance.recursivePrint(tbox::plog, "AB-> ");
+      }
+
+      {
+         /*
+          * Load balance the unbalanced mapped_box_level.
+          */
+         lb->loadBalanceMappedBoxLevel(
+            balance_mapped_box_level,
+            balance_to_anchor,
+            anchor_to_balance,
+            hierarchy,
+            1,
+            hier::Connector(),
+            hier::Connector(),
+            min_size,
+            max_size,
+            domain_mapped_box_level,
+            bad_interval,
+            cut_factor);
+
+         oca.assertOverlapCorrectness(balance_to_anchor);
+         oca.assertOverlapCorrectness(anchor_to_balance);
+
+         sortNodes(balance_mapped_box_level,
+            anchor_to_balance,
+            balance_to_anchor,
+            false,
+            true);
+      }
+
+      /*
+       * Get the balance_to_balance for edge statistics.
+       */
+      oca.bridge(
+         balance_to_balance,
+         balance_to_anchor,
+         anchor_to_balance,
+         balance_to_anchor,
+         anchor_to_balance);
+
+      {
+         /*
+          * Output "after" data.
+          */
+         balance_mapped_box_level.cacheGlobalReducedData();
+         tbox::plog << "\n\n\nAfter:\n";
+         lb->gatherAndReportLoadBalance(
+            (double)balance_mapped_box_level.getLocalNumberOfCells(),
+            balance_mapped_box_level.getMPI());
+
+         tbox::plog << "Balance mapped_box_level node stats:\n";
+         balance_mapped_box_level.printMappedBoxStats(tbox::plog, "BL-> ");
+         tbox::plog << "Balance mapped_box_level:\n";
+         balance_mapped_box_level.recursivePrint(tbox::plog, "BL-> ", 2);
+
+         tbox::plog << "balance_to_balance edge stats:\n";
+         balance_to_balance.printNeighborStats(tbox::plog, "BB-> ");
+         tbox::plog << "balance_to_balance:\n";
+         balance_to_balance.recursivePrint(tbox::plog, "BB-> ");
+
+         tbox::plog << "balance_to_anchor edge stats:\n";
+         balance_to_anchor.printNeighborStats(tbox::plog, "BA-> ");
+         tbox::plog << "balance_to_anchor:\n";
+         balance_to_anchor.recursivePrint(tbox::plog, "BA-> ");
+
+         tbox::plog << "anchor_to_balance edge stats:\n";
+         anchor_to_balance.printNeighborStats(tbox::plog, "AB-> ");
+         tbox::plog << "anchor_to_balance:\n";
+         anchor_to_balance.recursivePrint(tbox::plog, "AB-> ");
+
+         // Dump summary statistics to output.
+         lb->gatherAndReportLoadBalance(
+            (double)balance_mapped_box_level.getLocalNumberOfCells(),
+            balance_mapped_box_level.getMPI(),
+            tbox::plog);
+         tbox::plog << "Balance mapped_box_level node stats:\n";
+         balance_mapped_box_level.printMappedBoxStats(tbox::plog, "BL-> ");
+         tbox::plog << "balance_to_balance edge stats:\n";
+         balance_to_balance.printNeighborStats(tbox::plog, "BB-> ");
+      }
+
+      const hier::MappedBoxLevel& layer0 = anchor_mapped_box_level;
+      hierarchy->makeNewPatchLevel(
+         0,
+         layer0);
+
+      const hier::MappedBoxLevel& layer1 = balance_mapped_box_level;
+      hierarchy->makeNewPatchLevel(
+         1,
+         layer1);
+
+#ifdef HAVE_HDF5
+      if ((dim == tbox::Dimension(2)) || (dim == tbox::Dimension(3))) {
+         /*
+          * Create the VisIt data writer.
+          * Write the plot file.
+          */
+         DerivedVisOwnerData owner_writer;
+         const std::string visit_filename = base_name + ".visit";
+         appu::VisItDataWriter visit_data_writer(dim,
+                                                 "VisIt Writer",
+                                                 visit_filename);
+         visit_data_writer.registerDerivedPlotQuantity("Owner",
+            "SCALAR",
+            &owner_writer);
+         visit_data_writer.writePlotData(hierarchy, 0);
+      }
+#endif
+
+   }
+
+   /*
+    * Print input database again to fully show usage.
+    */
+   plog << "Input database after running..." << std::endl;
+   tbox::InputManager::getManager()->getInputDatabase()->printClassData(plog);
+
+   tbox::pout << "\nPASSED:  treelb" << std::endl;
+
+   /*
+    * Exit properly by shutting down services in correct order.
+    */
+   tbox::plog << "\nShutting down..." << std::endl;
+
+   /*
+    * Shut down.
+    */
+   SAMRAIManager::shutdown();
+   SAMRAIManager::finalize();
+
+   if (fail_count == 0) {
+      SAMRAI_MPI::finalize();
+   } else {
+      std::cout << "Process " << std::setw(5) << rank << " aborting."
+                << std::endl;
+      SAMRAI::tbox::Utilities::abort("Aborting due to nonzero fail count",
+         __FILE__, __LINE__);
+   }
+
+   return fail_count;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void generatePrebalanceByUserShells(
+   const tbox::Pointer<tbox::Database>& database,
+   const tbox::Pointer<hier::PatchHierarchy>& hierarchy,
+   const hier::IntVector& min_size,
+   const hier::IntVector& max_gcw,
+   hier::MappedBoxLevel& balance_mapped_box_level,
+   const hier::MappedBoxLevel& anchor_mapped_box_level,
+   hier::Connector& anchor_to_balance,
+   hier::Connector& balance_to_anchor)
+{
+
+   const tbox::Dimension dim(hierarchy->getDim());
+
+   /*
+    * Starting at shell origin, tag cells with centroids
+    * at radii[0]<r<radii[1], radii[2]<r<radii[3], and so on.
+    */
+   tbox::Array<double> radii;
+   double efficiency_tol = 0.75;
+   double combine_tol = 0.75;
+
+   std::vector<double> r0(dim.getValue());
+   for (int d = 0; d < dim.getValue(); ++d) r0[d] = 0;
+
+   tbox::Pointer<tbox::Database> abr_db;
+   if (database) {
+      efficiency_tol = database->getDoubleWithDefault("efficiency_tol",
+            efficiency_tol);
+      combine_tol = database->getDoubleWithDefault("combine_tol", combine_tol);
+      if (database->isDouble("r0")) {
+         database->getDoubleArray("r0", &r0[0], dim.getValue());
+      }
+      if (database->isDouble("radii")) {
+         radii = database->getDoubleArray("radii");
+      }
+      abr_db = database->getDatabaseWithDefault("BergerRigoutsos", abr_db);
+      TBOX_ASSERT(radii.size() % 2 == 0);
+   }
+
+   const int tag_val = 1;
+
+   hier::VariableDatabase* vdb =
+      hier::VariableDatabase::getDatabase();
+   tbox::Pointer<geom::CartesianGridGeometry> grid_geometry =
+      hierarchy->getGridGeometry();
+
+   const tbox::ConstPointer<hier::MappedBoxLevel>
+   anchor_mapped_box_level_ptr(&anchor_mapped_box_level, false);
+
+   tbox::Pointer<hier::PatchLevel> tag_level(
+      new hier::PatchLevel(anchor_mapped_box_level,
+                           grid_geometry,
+                           vdb->getPatchDescriptor()) );
+
+   tbox::Pointer<pdat::CellVariable<int> > tag_variable(
+      new pdat::CellVariable<int>(dim, "TagVariable"));
+
+   tbox::Pointer<hier::VariableContext> default_context =
+      vdb->getContext("TagVariable");
+
+   const int tag_id = vdb->registerVariableAndContext(
+         tag_variable,
+         default_context,
+         hier::IntVector(dim, 0));
+
+   tag_level->allocatePatchData(tag_id);
+
+   const double* xlo = grid_geometry->getXLower();
+   const double* h = grid_geometry->getDx();
+   for (hier::PatchLevel::Iterator pi(tag_level); pi; pi++) {
+      tbox::Pointer<hier::Patch> patch = *pi;
+      tbox::Pointer<pdat::CellData<int> > tag_data = patch->getPatchData(tag_id);
+
+      tag_data->getArrayData().undefineData();
+
+      for (pdat::CellData<int>::Iterator ci(tag_data->getGhostBox());
+           ci; ci++) {
+         const pdat::CellIndex& idx = *ci;
+         double rr = 0;
+         std::vector<double> r(dim.getValue());
+         for (int d = 0; d < dim.getValue(); ++d) {
+            r[d] = xlo[d] + h[d] * (idx(d) + 0.5) - r0[d];
+            rr += r[d] * r[d];
+         }
+         rr = sqrt(rr);
+         for (int i = 0; i < radii.size(); i += 2) {
+            if (radii[i] < rr && rr < radii[i + 1]) {
+               (*tag_data)(idx) = tag_val;
+               break;
+            }
+         }
+      }
+   }
+
+   mesh::BergerRigoutsos abr(dim, abr_db);
+   abr.setMPI(anchor_mapped_box_level.getMPI());
+   abr.findBoxesContainingTags(
+      balance_mapped_box_level,
+      anchor_to_balance,
+      balance_to_anchor,
+      tag_level,
+      tag_id,
+      tag_val,
+      anchor_mapped_box_level.getGlobalBoundingBox(),
+      min_size,
+      efficiency_tol,
+      combine_tol,
+      max_gcw);
+
+   /*
+    * The clustering step generated Connectors to/from the temporary
+    * tag_level->getMappedBoxLevel(), which is not the same as the
+    * anchor MappedBoxLevel.  We need to reset the Connectors to use
+    * the anchor_mapped_box_level instead.
+    */
+   anchor_to_balance.initialize(anchor_mapped_box_level,
+                                balance_mapped_box_level,
+                                anchor_to_balance.getConnectorWidth(),
+                                anchor_to_balance.getNeighborhoodSets());
+   balance_to_anchor.initialize(balance_mapped_box_level,
+                                anchor_mapped_box_level,
+                                balance_to_anchor.getConnectorWidth(),
+                                balance_to_anchor.getNeighborhoodSets());
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void generatePrebalanceByUserBoxes(
+   tbox::Pointer<tbox::Database> database,
+   const tbox::Pointer<hier::PatchHierarchy>& hierarchy,
+   const hier::IntVector& min_size,
+   const hier::IntVector& max_gcw,
+   hier::MappedBoxLevel& balance_mapped_box_level,
+   const hier::MappedBoxLevel& anchor_mapped_box_level,
+   hier::Connector& anchor_to_balance,
+   hier::Connector& balance_to_anchor)
+{
+   NULL_USE(hierarchy);
+   NULL_USE(min_size);
+
+   const tbox::Dimension& dim(hierarchy->getDim());
+
+   hier::BoxArray balance_boxes(dim);
+   balance_boxes = database->getDatabaseBoxArray("balance_boxes");
+   tbox::Array<int> initial_owners(1);
+   initial_owners[0] = 0;
+   initial_owners = database->getIntegerArray("initial_owners");
+
+   balance_mapped_box_level.initialize(hier::IntVector(dim, 1),
+      anchor_mapped_box_level.getMPI());
+   for (int i = 0; i < balance_boxes.size(); ++i) {
+      const int owner = i % initial_owners.size();
+      if (owner == balance_mapped_box_level.getRank()) {
+         balance_mapped_box_level.addMappedBox(hier::MappedBox(balance_boxes[i],
+                                                                             hier::LocalId(i), owner));
+      }
+   }
+   balance_to_anchor.initialize(
+      balance_mapped_box_level,
+      anchor_mapped_box_level,
+      max_gcw);
+   anchor_to_balance.initialize(
+      anchor_mapped_box_level,
+      balance_mapped_box_level,
+      max_gcw);
+   hier::OverlapConnectorAlgorithm oca;
+   oca.findOverlaps(balance_to_anchor);
+   oca.findOverlaps(anchor_to_balance);
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void sortNodes(
+   hier::MappedBoxLevel& new_mapped_box_level,
+   hier::Connector& tag_to_new,
+   hier::Connector& new_to_tag,
+   bool sort_by_corners,
+   bool sequentialize_global_indices)
+{
+   const hier::MappingConnectorAlgorithm mca;
+
+   hier::Connector sorting_map;
+   hier::MappedBoxLevel seq_mapped_box_level(new_mapped_box_level.getDim());
+   hier::MappedBoxLevelConnectorUtils dlbg_edge_utils;
+   dlbg_edge_utils.makeSortingMap(
+      seq_mapped_box_level,
+      sorting_map,
+      new_mapped_box_level,
+      sort_by_corners,
+      sequentialize_global_indices);
+
+   mca.modify(tag_to_new,
+      new_to_tag,
+      sorting_map,
+      &new_mapped_box_level);
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/sphere_inputs/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/sphere_inputs/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,13 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   Inputs to test load balancers.
+##
+#########################################################################
+
+These are inputs for testing the load balancers on concentric sphere 
+configurations.  Each grade (small, med, big, etc.) the initial mesh 
+resolution by about 4 times in each coordinate direction.
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/sphere_inputs/big_sphere.2d.caplb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/sphere_inputs/big_sphere.2d.caplb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 2
+
+   base_name = "big_sphere.2d.caplb"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "ChopAndPackLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0),(799,799)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0),(799,799)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4
+
+   box_gen_method = "PrebalanceByUserShells"
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10),(189,189)]
+      initial_owners = 0
+      max_box_size = -1, -1, -1
+   }
+
+   PrebalanceByUserShells {
+      /*
+        Specify unbalanced layer by tagging a set of concentric shells.
+      */
+      r0 = 0, 0 // 0.5, 0.5
+      radii = 0.0, 0.6, 0.75, 0.85, 0.99, 1.0
+      efficiency_tol = 0.80
+      combine_tol = 0.90
+      max_lap_cut_from_center = 1.0
+      BergerRigoutsos {
+         log_node_history = TRUE
+         log_cluster_summary = TRUE
+         log_cluster = FALSE
+         sequentialize_output_indices = FALSE
+         barrier_before_cluster = FALSE
+      }
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/sphere_inputs/big_sphere.2d.treelb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/sphere_inputs/big_sphere.2d.treelb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 2
+
+   base_name = "big_sphere.2d.treelb"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "TreeLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0),(799,799)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0),(799,799)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4
+
+   box_gen_method = "PrebalanceByUserShells"
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10),(189,189)]
+      initial_owners = 0
+      max_box_size = -1, -1, -1
+   }
+
+   PrebalanceByUserShells {
+      /*
+        Specify unbalanced layer by tagging a set of concentric shells.
+      */
+      r0 = 0, 0 // 0.5, 0.5
+      radii = 0.0, 0.6, 0.75, 0.85, 0.99, 1.0
+      efficiency_tol = 0.80
+      combine_tol = 0.90
+      max_lap_cut_from_center = 1.0
+      BergerRigoutsos {
+         log_node_history = TRUE
+         log_cluster_summary = TRUE
+         log_cluster = FALSE
+         sequentialize_output_indices = FALSE
+         barrier_before_cluster = FALSE
+      }
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/sphere_inputs/huge_sphere.2d.caplb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/sphere_inputs/huge_sphere.2d.caplb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 2
+
+   base_name = "huge_sphere.2d.caplb"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "ChopAndPackLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0),(3199,3199)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0),(3199,3199)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4
+
+   box_gen_method = "PrebalanceByUserShells"
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10),(189,189)]
+      initial_owners = 0
+      max_box_size = -1, -1, -1
+   }
+
+   PrebalanceByUserShells {
+      /*
+        Specify unbalanced layer by tagging a set of concentric shells.
+      */
+      r0 = 0, 0 // 0.5, 0.5
+      radii = 0.0, 0.6, 0.75, 0.85, 0.99, 1.0
+      efficiency_tol = 0.80
+      combine_tol = 0.90
+      max_lap_cut_from_center = 1.0
+      BergerRigoutsos {
+         log_node_history = TRUE
+         log_cluster_summary = TRUE
+         log_cluster = FALSE
+         sequentialize_output_indices = FALSE
+         barrier_before_cluster = FALSE
+      }
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/sphere_inputs/med_sphere.2d.caplb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/sphere_inputs/med_sphere.2d.caplb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 2
+
+   base_name = "med_sphere.2d.caplb"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "ChopAndPackLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0),(199,199)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0),(199,199)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4
+
+   box_gen_method = "PrebalanceByUserShells"
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10),(189,189)]
+      initial_owners = 0
+      max_box_size = -1, -1, -1
+   }
+
+   PrebalanceByUserShells {
+      /*
+        Specify unbalanced layer by tagging a set of concentric shells.
+      */
+      r0 = 0, 0 // 0.5, 0.5
+      radii = 0.0, 0.6, 0.75, 0.85, 0.99, 1.0
+      efficiency_tol = 0.80
+      combine_tol = 0.90
+      max_lap_cut_from_center = 1.0
+      BergerRigoutsos {
+         log_node_history = TRUE
+         log_cluster_summary = TRUE
+         log_cluster = FALSE
+         sequentialize_output_indices = FALSE
+         barrier_before_cluster = FALSE
+      }
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/sphere_inputs/med_sphere.2d.treelb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/sphere_inputs/med_sphere.2d.treelb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 2
+
+   base_name = "med_sphere.2d.treelb"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "TreeLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0),(199,199)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0),(199,199)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4
+
+   box_gen_method = "PrebalanceByUserShells"
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10),(189,189)]
+      initial_owners = 0
+      max_box_size = -1, -1, -1
+   }
+
+   PrebalanceByUserShells {
+      /*
+        Specify unbalanced layer by tagging a set of concentric shells.
+      */
+      r0 = 0, 0 // 0.5, 0.5
+      radii = 0.0, 0.6, 0.75, 0.85, 0.99, 1.0
+      efficiency_tol = 0.80
+      combine_tol = 0.90
+      max_lap_cut_from_center = 1.0
+      BergerRigoutsos {
+         log_node_history = TRUE
+         log_cluster_summary = TRUE
+         log_cluster = FALSE
+         sequentialize_output_indices = FALSE
+         barrier_before_cluster = FALSE
+      }
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/sphere_inputs/small_sphere.3d.caplb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/sphere_inputs/small_sphere.3d.caplb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,100 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 3
+
+   base_name = "small_sphere.3d.caplb"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "ChopAndPackLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0,0),(99,99,99)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0,0),(99,99,99)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4, 4
+
+   box_gen_method = "PrebalanceByUserShells"
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10,10),(89,89,89)]
+      initial_owners = 0
+      max_box_size = 10, 10, 10
+   }
+
+   PrebalanceByUserShells {
+      /*
+        Specify unbalanced layer by tagging a set of concentric shells.
+      */
+      r0 = 0.0, 0.0, 0.0
+      radii = 0.0, 0.5, 0.7, 0.8, 1.4, 1.41
+      efficiency_tol = 0.85
+      combine_tol = 0.85
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/sphere_inputs/small_sphere.3d.treelb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/sphere_inputs/small_sphere.3d.treelb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,100 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 3
+
+   base_name = "small_sphere.3d.treelb"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "TreeLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0,0),(99,99,99)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0,0),(99,99,99)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4, 4
+
+   box_gen_method = "PrebalanceByUserShells"
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10,10),(89,89,89)]
+      initial_owners = 0
+      max_box_size = -1, -1, -1
+   }
+
+   PrebalanceByUserShells {
+      /*
+        Specify unbalanced layer by tagging a set of concentric shells.
+      */
+      r0 = 0.0, 0.0, 0.0
+      radii = 0.0, 0.5, 0.7, 0.8, 1.4, 1.41
+      efficiency_tol = 0.85
+      combine_tol = 0.85
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/sphere_inputs/tiny_sphere.2d.caplb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/sphere_inputs/tiny_sphere.2d.caplb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 2
+
+   base_name = "tiny_sphere.2d.caplb"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "ChopAndPackLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0),(11,11)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0),(11,11)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4
+
+   box_gen_method = "PrebalanceByUserShells"
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10),(89,89)]
+      initial_owners = 0
+      max_box_size = -1, -1, -1
+   }
+
+   PrebalanceByUserShells {
+      /*
+        Specify unbalanced layer by tagging a set of concentric shells.
+      */
+      r0 = 0, 0 // 0.5, 0.5
+      radii = 0.0, 0.6, 0.75, 0.85, 0.99, 1.0
+      efficiency_tol = 0.80
+      combine_tol = 0.90
+      max_lap_cut_from_center = 1.0
+      BergerRigoutsos {
+         log_node_history = TRUE
+         log_cluster_summary = TRUE
+         log_cluster = FALSE
+         sequentialize_output_indices = FALSE
+         barrier_before_cluster = FALSE
+      }
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/sphere_inputs/tiny_sphere.2d.treelb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/sphere_inputs/tiny_sphere.2d.treelb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 2
+
+   base_name = "tiny_sphere.2d.treelb"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "TreeLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0),(11,11)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0),(11,11)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4
+
+   box_gen_method = "PrebalanceByUserShells"
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10),(89,89)]
+      initial_owners = 0
+      max_box_size = -1, -1, -1
+   }
+
+   PrebalanceByUserShells {
+      /*
+        Specify unbalanced layer by tagging a set of concentric shells.
+      */
+      r0 = 0, 0 // 0.5, 0.5
+      radii = 0.0, 0.6, 0.75, 0.85, 0.99, 1.0
+      efficiency_tol = 0.80
+      combine_tol = 0.90
+      max_lap_cut_from_center = 1.0
+      BergerRigoutsos {
+         log_node_history = TRUE
+         log_cluster_summary = TRUE
+         log_cluster = FALSE
+         sequentialize_output_indices = FALSE
+         barrier_before_cluster = FALSE
+      }
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/test_inputs/plank.3d.treelb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/test_inputs/plank.3d.treelb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 3
+
+   base_name = "plank.treelb.3d"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "TreeLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0,0),(49,99,299)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0,0),(49,99,299)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4, 4
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10,10),(39,89,289)]
+      initial_owners = 0
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'y'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/test_inputs/rect.2d.treelb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/test_inputs/rect.2d.treelb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 2
+
+   base_name = "rect.treelb.2d"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "TreeLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0),(999,199)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0),(999,199)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10),(989,189)]
+      initial_owners = 0
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/test_inputs/rod.1d.treelb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/test_inputs/rod.1d.treelb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,85 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   base_name = "rod.treelb.1d"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "TreeLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0),(299)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0),(299)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 1
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(1),(298)]
+      initial_owners = 0
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/test_inputs/rod.2d.treelb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/test_inputs/rod.2d.treelb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 2
+
+   base_name = "rod.treelb.2d"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "TreeLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0),(299,2)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0),(299,2)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 1, 1
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(1,1),(298,1)]
+      initial_owners = 0
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/test_inputs/small_cube.2d.caplb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/test_inputs/small_cube.2d.caplb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 2
+
+   base_name = "small_cube.2d.caplb"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "ChopAndPackLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0),(199,199)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0),(199,199)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4
+
+   /*
+     Specify the min/max patch size.
+   */
+   min_size = 4, 4
+   // max_size = 8, 8
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10),(189,189)]
+      initial_owners = 0
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+ChopAndPackLoadBalancer {
+  max_workload_factor = 0.1, 0.1
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/test_inputs/small_cube.2d.treelb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/test_inputs/small_cube.2d.treelb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 2
+
+   base_name = "small_cube.2d.treelb"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "TreeLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0),(199,199)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0),(199,199)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10),(189,189)]
+      initial_owners = 0
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/test_inputs/small_cube.3d.treelb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/test_inputs/small_cube.3d.treelb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 3
+
+   base_name = "small_cube.3d.treelb"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "TreeLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0,0),(99,99,99)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0,0),(99,99,99)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4, 4
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10,10),(89,89,89)]
+      initial_owners = 0
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'y'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/test_inputs/small_sphere.2d.caplb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/test_inputs/small_sphere.2d.caplb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 2
+
+   base_name = "small_sphere.2d.caplb"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "ChopAndPackLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0),(49,49)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0),(49,49)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4
+
+   box_gen_method = "PrebalanceByUserShells"
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10),(89,89)]
+      initial_owners = 0
+      max_box_size = -1, -1, -1
+   }
+
+   PrebalanceByUserShells {
+      /*
+        Specify unbalanced layer by tagging a set of concentric shells.
+      */
+      r0 = 0, 0 // 0.5, 0.5
+      radii = 0.0, 0.6, 0.75, 0.85, 0.99, 1.0
+      efficiency_tol = 0.80
+      combine_tol = 0.90
+      max_lap_cut_from_center = 1.0
+      BergerRigoutsos {
+         log_node_history = FALSE
+         log_cluster_summary = TRUE
+         log_cluster = FALSE
+         sequentialize_output_indices = FALSE
+         barrier_before_cluster = FALSE
+         // owner_mode = "SINGLE_OWNER"
+         // algo_advance_mode = "SYNCHRONOUS"
+      }
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/LoadBalancers/test_inputs/small_sphere.2d.treelb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/LoadBalancers/test_inputs/small_sphere.2d.treelb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 2
+
+   base_name = "small_sphere.2d.treelb"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "TreeLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0),(49,49)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0),(49,49)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4
+
+   box_gen_method = "PrebalanceByUserShells"
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10),(89,89)]
+      initial_owners = 0
+      max_box_size = -1, -1, -1
+   }
+
+   PrebalanceByUserShells {
+      /*
+        Specify unbalanced layer by tagging a set of concentric shells.
+      */
+      r0 = 0, 0 // 0.5, 0.5
+      radii = 0.0, 0.6, 0.75, 0.85, 0.99, 1.0
+      efficiency_tol = 0.80
+      combine_tol = 0.90
+      max_lap_cut_from_center = 1.0
+      BergerRigoutsos {
+         log_node_history = FALSE
+         log_cluster_summary = TRUE
+         log_cluster = FALSE
+         sequentialize_output_indices = FALSE
+         barrier_before_cluster = FALSE
+         // owner_mode = "SINGLE_OWNER"
+         // algo_advance_mode = "SYNCHRONOUS"
+      }
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,43 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for the performance test directory 
+##
+#########################################################################
+
+SAMRAI	      =	@top_srcdir@
+SRCDIR	      =	@srcdir@
+SUBDIR        = source/test/performance
+OBJECT        = ../../..
+
+default: library
+
+include $(OBJECT)/config/Makefile.config
+
+SUBDIRS = treesearch LoadBalancers LinAdv
+
+library:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+lib1d:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+lib2d:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+lib3d:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+libXd:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+check:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+check2d:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+check3d:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+checkcompile:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+checktest:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
+clean:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@); done
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/treesearch/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/treesearch/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,87 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=main.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h main.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/treesearch/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/treesearch/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,64 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   Test program for performance of tree search algorithm. 
+##
+#########################################################################
+
+SAMRAI	      =	@top_srcdir@
+SRCDIR	      =	@srcdir@
+SUBDIR        = source/test/performance/treesearch
+VPATH	      =	@srcdir@
+OBJECT        = ../../../..
+
+CPPFLAGS_EXTRA= -DNDIM=$(PDIM)  -DTESTING=1
+
+default: check
+
+include $(OBJECT)/config/Makefile.config
+
+NUM_TESTS = 2
+
+TEST_NPROCS = @TEST_NPROCS@
+
+CXX_OBJS      = main.o
+
+main: $(CXX_OBJS) $(LIBSAMRAI)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) \
+	$(LIBSAMRAI) $(LDLIBS) -o $@
+
+check:
+	$(MAKE) check2d
+	$(MAKE) check3d
+
+check2d:	main
+	@for i in test_inputs/*2d*.input ; do	\
+	 $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+check3d:	main
+	@for i in test_inputs/*3d*.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+checkcompile: main
+
+checktest:
+	rm -f makecheck.logfile
+	$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+	$(OBJECT)/source/test/testtools/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+	rm -f makecheck.logfile
+
+clean-check:
+	$(SAMCLEAN)
+
+clean:
+	$(SAMCLEAN)
+	$(RM) *.f main
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/treesearch/main.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/treesearch/main.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,382 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Test program for performance of tree search algorithm. 
+ *
+ ************************************************************************/
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/MappedBox.h"
+#include "SAMRAI/hier/MappedBoxTree.h"
+#include "SAMRAI/tbox/InputDatabase.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/TimerManager.h"
+
+#include <algorithm>
+#include <vector>
+#include <iomanip>
+
+using namespace SAMRAI;
+using namespace tbox;
+
+/*
+ ************************************************************************
+ *
+ * This is a performance test for the tree search algorithm
+ * in MappedBoxTree:
+ *
+ * 1. Generate a set of MappedBoxes.
+ *
+ * 2. Sort the MappedBoxes into trees using layerNodeTree.
+ *
+ * 3. Search for overlaps.
+ *
+ *************************************************************************
+ */
+
+typedef std::vector<hier::MappedBox> NodeVec;
+typedef std::vector<hier::Box> BoxVec;
+
+/*
+ * Generate uniform boxes as specified in the database.
+ */
+void
+generateBoxesUniform(
+   const tbox::Dimension& dim,
+   std::vector<hier::Box>& output,
+   const Pointer<Database>& db);
+
+int main(
+   int argc,
+   char* argv[])
+{
+   /*
+    * Initialize MPI, SAMRAI.
+    */
+
+   SAMRAI_MPI::init(&argc, &argv);
+   SAMRAIManager::initialize();
+   SAMRAIManager::startup();
+   tbox::SAMRAI_MPI mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   const int rank = mpi.getRank();
+   int fail_count = 0;
+
+   {
+
+      /*
+       * Process command line arguments.  For each run, the input
+       * filename must be specified.  Usage is:
+       *
+       * executable <input file name>
+       */
+      std::string input_filename;
+
+      if (argc != 2) {
+         TBOX_ERROR("USAGE:  " << argv[0] << " <input file> \n"
+                                          << "  options:\n"
+                                          << "  none at this time" << std::endl);
+      } else {
+         input_filename = argv[1];
+      }
+
+      /*
+       * Create input database and parse all data in input file.
+       */
+
+      Pointer<Database> input_db(new InputDatabase("input_db"));
+      tbox::InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      /*
+       * Set up the timer manager.
+       */
+      if (input_db->isDatabase("TimerManager")) {
+         TimerManager::createManager(input_db->getDatabase("TimerManager"));
+      }
+
+      /*
+       * Retrieve "Main" section from input database.
+       * The main database is used only in main().
+       * The base_name variable is a base name for
+       * all name strings in this program.
+       */
+
+      Pointer<Database> main_db = input_db->getDatabase("Main");
+
+      const tbox::Dimension dim(static_cast<unsigned short>(main_db->getInteger("dim")));
+
+      std::string base_name = "unnamed";
+      base_name = main_db->getStringWithDefault("base_name", base_name);
+
+      /*
+       * Start logging.
+       */
+      const std::string log_file_name = base_name + ".log";
+      bool log_all_nodes = false;
+      log_all_nodes = main_db->getBoolWithDefault("log_all_nodes",
+            log_all_nodes);
+      if (log_all_nodes) {
+         PIO::logAllNodes(log_file_name);
+      } else {
+         PIO::logOnlyNodeZero(log_file_name);
+      }
+
+      plog << "Input database after initialization..." << std::endl;
+      input_db->printClassData(plog);
+
+      const std::string box_gen_method =
+         main_db->getStringWithDefault("box_gen_method", "UNIFORM");
+
+      tbox::TimerManager * tm(tbox::TimerManager::getManager());
+      tbox::Pointer<tbox::Timer> t_build_tree =
+         tm->getTimer("apps::main::build_tree");
+      tbox::Pointer<tbox::Timer> t_search_tree_for_set =
+         tm->getTimer("apps::main::search_tree_for_set");
+      tbox::Pointer<tbox::Timer> t_search_tree_for_vec =
+         tm->getTimer("apps::main::search_tree_for_vec");
+
+      /*
+       * Generate the boxes.
+       */
+      BoxVec boxes;
+      if (box_gen_method == "UNIFORM") {
+         generateBoxesUniform(dim,
+            boxes,
+            main_db->getDatabase("UniformBoxGen"));
+      } else {
+         TBOX_ERROR("Unsupported box_gen_method: " << box_gen_method);
+      }
+      tbox::plog << "\n\n\nGenerated boxes (" << boxes.size() << "):\n";
+      for (size_t i = 0; i < boxes.size(); ++i) {
+         tbox::plog << '\t' << i << '\t' << boxes[i] << '\n';
+         if (i > 20) {
+            tbox::plog << "\t...\n";
+            break;
+         }
+      }
+      tbox::plog << "\n\n\n";
+
+      /*
+       * Compute bounding box.
+       */
+      hier::Box bounding_box(dim);
+      for (BoxVec::iterator bi = boxes.begin(); bi != boxes.end(); ++bi) {
+         bounding_box += *bi;
+      }
+
+      /*
+       * Randomize the boxes.
+       */
+      bool randomize_order = main_db->getBoolWithDefault("randomize_order",
+            false);
+      if (randomize_order) {
+         std::random_shuffle(boxes.begin(), boxes.end());
+      }
+
+      /*
+       * Scale up the number of boxes and time the sort and search for the
+       * growing set of boxes.
+       */
+      size_t num_scale = (size_t)main_db->getIntegerWithDefault("num_scale", 1);
+      for (unsigned int iscale = 0; iscale < num_scale; ++iscale) {
+
+         if (iscale != 0) {
+            /*
+             * Scale up the box array.
+             */
+            int shift_dir = (iscale - 1) % dim.getValue();
+            int shift_distance = bounding_box.numberCells(shift_dir);
+
+            const size_t old_size = boxes.size();
+            boxes.insert(boxes.end(), boxes.begin(), boxes.end());
+            for (size_t i = 0; i < old_size; ++i) {
+               boxes[i].shift(shift_dir, shift_distance);
+            }
+            bounding_box.upper() (shift_dir) += shift_distance;
+         }
+
+         tbox::plog << "Repetition " << iscale << " has "
+                    << boxes.size() << " boxes bounded by "
+                    << bounding_box << std::endl;
+
+         /*
+          * Generate the nodes from the boxes.
+          */
+         NodeVec nodes;
+         nodes.reserve(boxes.size());
+         for (hier::LocalId i(0); i < static_cast<int>(boxes.size()); ++i) {
+            nodes.push_back(hier::MappedBox(boxes[i.getValue()], i, 0));
+         }
+         const size_t node_count = nodes.size();
+
+         /*
+          * Grow the boxes for overlap search.
+          */
+         hier::IntVector growth(dim, 1);
+         if (main_db->isInteger("growth")) {
+            main_db->getIntegerArray("growth", &growth[0], dim.getValue());
+         }
+         BoxVec grown_boxes = boxes;
+         if (growth != 1) {
+            for (BoxVec::iterator bi = grown_boxes.begin();
+                 bi != grown_boxes.end();
+                 ++bi) {
+               bi->grow(growth);
+            }
+         }
+
+         /*
+          * Reset timers and statistics.
+          */
+         tm->resetAllTimers();
+         hier::MappedBoxTree::resetStatistics(dim);
+
+         /*
+          * Build search tree.
+          */
+         hier::MappedBoxTree search_tree(dim);
+         t_build_tree->start();
+         search_tree.generateTree(nodes);
+         t_build_tree->stop();
+
+         /*
+          * Search the tree.
+          *
+          * We test outputing in a set and a vector.  Results show that outputing
+          * in a vector is almost twice as fast, probably due to the set having to
+          * sort the output.
+          */
+         hier::MappedBoxSet overlap_set;
+         t_search_tree_for_set->start();
+         for (BoxVec::iterator bi = grown_boxes.begin();
+              bi != grown_boxes.end();
+              ++bi) {
+            overlap_set.clear();
+            search_tree.findOverlapMappedBoxes(overlap_set, *bi);
+         }
+         t_search_tree_for_set->stop();
+
+         NodeVec overlap_vec;
+         t_search_tree_for_vec->start();
+         for (BoxVec::iterator bi = grown_boxes.begin();
+              bi != grown_boxes.end();
+              ++bi) {
+            overlap_vec.clear();
+            search_tree.findOverlapMappedBoxes(overlap_vec, *bi);
+         }
+         t_search_tree_for_vec->stop();
+
+         /*
+          * Output normalized timer to plog.
+          */
+         tbox::plog << t_build_tree->getName() << " = "
+                    << t_build_tree->getTotalWallclockTime() /
+                       static_cast<double>(node_count)
+                    << std::endl;
+         tbox::plog << t_search_tree_for_set->getName() << " = "
+                    << t_search_tree_for_set->getTotalWallclockTime()
+         / static_cast<double>(node_count)
+                    << std::endl;
+         tbox::plog << t_search_tree_for_vec->getName() << " = "
+                    << t_search_tree_for_vec->getTotalWallclockTime()
+         / static_cast<double>(node_count)
+                    << std::endl;
+
+         /*
+          * Log timer results and search tree statistics.
+          */
+         tbox::TimerManager::getManager()->print(tbox::plog);
+         hier::MappedBoxTree::printStatistics(dim);
+
+         tbox::plog << "\n\n\n";
+
+      }
+
+      /*
+       * Print input database again to fully show usage.
+       */
+      plog << "Input database after running..." << std::endl;
+      input_db->printClassData(plog);
+
+      tbox::pout << "\nPASSED:  Tree search" << std::endl;
+
+      input_db.setNull();
+      main_db.setNull();
+      t_search_tree_for_set.setNull();
+      t_search_tree_for_vec.setNull();
+
+      /*
+       * Exit properly by shutting down services in correct order.
+       */
+      tbox::plog << "\nShutting down..." << std::endl;
+
+   }
+
+   /*
+    * Shut down.
+    */
+   SAMRAIManager::shutdown();
+   SAMRAIManager::finalize();
+
+   if (fail_count == 0) {
+      SAMRAI_MPI::finalize();
+   } else {
+      tbox::pout << "Process " << std::setw(5) << rank << " aborting."
+                 << std::endl;
+      SAMRAI::tbox::Utilities::abort("Aborting due to nonzero fail count",
+         __FILE__, __LINE__);
+   }
+
+   tbox::plog << "Process " << std::setw(5) << rank << " exiting." << std::endl;
+   return fail_count;
+}
+
+/*
+ * Function to generate a uniform set of boxes.
+ */
+void generateBoxesUniform(
+   const tbox::Dimension& dim,
+   std::vector<hier::Box>& output,
+   const Pointer<Database>& db)
+{
+   output.clear();
+
+   hier::IntVector boxsize(dim, 1);
+   if (db->isInteger("boxsize")) {
+      db->getIntegerArray("boxsize", &boxsize[0], dim.getValue());
+   } else {
+      TBOX_ERROR("CartesianGridGeometry::getFromInput() error...\n"
+         << "    box size is absent.");
+   }
+
+   hier::IntVector boxrepeat(dim, 1);
+   if (db->isInteger("boxrepeat")) {
+      db->getIntegerArray("boxrepeat", &boxrepeat[0], dim.getValue());
+   }
+
+   /*
+    * Create an array of boxes by repeating the given box.
+    */
+   hier::IntVector index(dim, 0);
+   do {
+      hier::IntVector lower(index * boxsize);
+      hier::IntVector upper(lower + boxsize - 1);
+      int& e = index(0);
+      for (e = 0; e < boxrepeat(0); ++e) {
+         lower(0) = e * boxsize(0);
+         upper(0) = lower(0) + boxsize(0) - 1;
+         output.insert(output.end(), hier::Box(lower, upper));
+      }
+      for (int d = 0; d < dim.getValue(); ++d) {
+         if (index(d) == boxrepeat(d) && d < dim.getValue() - 1) {
+            index(d) = 0;
+            ++index(d + 1);
+         }
+      }
+   } while (index(dim.getValue() - 1) < boxrepeat(dim.getValue() - 1));
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/treesearch/test_inputs/default.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/treesearch/test_inputs/default.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,59 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for tree search test. 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 2
+
+   base_name = "default2d"
+   log_all_nodes = FALSE
+
+   /*
+     Number of times to scale up the number of boxes.
+     Each time, the number of boxes doubles.
+   */
+   num_scale = 7
+
+   /*
+     Amount to grow each box before searching for overlaps.
+   */
+   growth = 2, 2
+
+   /*
+     Whether to randomize the box ordering.
+   */
+   randomize_order = TRUE
+
+   /*
+     Box generator parameters.
+   */
+   UniformBoxGen {
+      /*
+        Size of each box
+      */
+      boxsize = 10, 10
+
+      /*
+        Repetition of the box in each index direction.
+        Will generate an NDIM-dimensional array of boxes.
+      */
+      boxrepeat = 33, 17
+   }
+
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/performance/treesearch/test_inputs/default.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/performance/treesearch/test_inputs/default.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for tree search test. 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 3
+   base_name = "default3d"
+   log_all_nodes = FALSE
+
+   /*
+     Number of times to scale up the number of boxes.
+     Each time, the number of boxes doubles.
+   */
+   num_scale = 7
+
+   /*
+     Amount to grow each box before searching for overlaps.
+   */
+   growth = 2, 2, 2
+
+   /*
+     Whether to randomize the box ordering.
+   */
+   randomize_order = TRUE
+
+   /*
+     Box generator parameters.
+   */
+   UniformBoxGen {
+      /*
+        Size of each box
+      */
+      boxsize = 10, 10, 10
+
+      /*
+        Repetition of the box in each index direction.
+        Will generate an NDIM-dimensional array of boxes.
+      */
+      boxrepeat = 15, 9, 7
+   }
+
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/pointer/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/pointer/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,56 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=main-pointer.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h main-pointer.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/pointer/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/pointer/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,53 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for the pointer tests 
+##
+#########################################################################
+
+SAMRAI	      =	@top_srcdir@
+SRCDIR	      =	@srcdir@
+SUBDIR        = source/test/pointer
+VPATH	      =	@srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+CPPFLAGS_EXTRA =  -DTESTING=1
+
+default: check
+
+include $(OBJECT)/config/Makefile.config
+
+NUM_TESTS = 1
+
+TEST_NPROCS = @TEST_NPROCS@
+
+main:	main-pointer.o $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) main-pointer.o $(LIBSAMRAI) $(LDLIBS) -o $@
+
+
+check:		main
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main
+
+check2d:
+	$(MAKE) check
+
+check3d:
+	$(MAKE) check
+
+checkcompile: main
+
+checktest:
+		rm -f makecheck.logfile
+		$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+		$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+		rm -f makecheck.logfile
+
+clean: 
+		$(SAMCLEAN)
+		$(RM) main
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/test/pointer/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/pointer/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,26 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   README file for pointer tests.
+##
+#########################################################################
+
+This program tests the smart pointer casting operations, including
+virtual base class notions.
+
+Compilation:
+              make
+  or  
+              make testpointer
+
+Execution:
+              ./testpointer
+
+Output:
+              pointertest.log
+
+-OR- make check
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/pointer/main-pointer.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/pointer/main-pointer.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,477 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program for testing SAMRAI smart pointers 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+using namespace std;
+using namespace SAMRAI;
+
+class A:public virtual tbox::DescribedClass
+{
+public:
+   A() {
+   }
+   virtual ~A() {
+   }
+   virtual void
+   foo(
+      std::string& trace) = 0;
+   virtual void
+   foo1(
+      std::string& trace) = 0;
+};
+
+class B:public virtual tbox::DescribedClass
+{
+public:
+   B() {
+   }
+   virtual ~B() {
+   }
+   virtual void
+   foo(
+      std::string& trace) = 0;
+   virtual void foo1(
+      std::string& trace) {
+      trace = "B::foo1()";
+   }
+};
+
+class C:public A,
+   public B
+{
+public:
+   C() {
+   }
+   virtual ~C() {
+   }
+   void foo(
+      std::string& trace) {
+      trace = "C::foo()";
+   }
+   void foo1(
+      std::string& trace) {
+      trace = "C::foo1()";
+   }
+};
+
+class HaveA
+{
+public:
+   HaveA(
+      int& fail_count,
+      A* a_ptr,
+      const A* a_constptr,
+      tbox::Pointer<A> a_smartptr,
+      const tbox::Pointer<A> a_constsmartptr)
+   {
+      if (a_ptr != a_constptr) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #4a: a_ptr != a_constptr" << endl;
+      }
+      if (a_ptr != (A *)a_smartptr) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #4b: a_ptr != (A*)a_smartptr" << endl;
+      }
+      if (a_ptr != (A *)a_constsmartptr) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #4c: a_ptr != (A*)a_constsmartptr"
+                    << endl;
+      }
+      d_a_ptr = a_ptr;
+      d_a_smartptr = a_smartptr;
+   }
+   virtual ~HaveA() {
+   }
+   int callFoo()
+   {
+      int fail_count = 0;
+      std::string trace1 = "test-d_a_ptr";
+      d_a_ptr->foo(trace1);
+      if (trace1 != "C::foo()") {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #6a: calling d_a_ptr->foo()" << endl;
+         tbox::perr << "   Expected C::foo(), Received " << trace1 << endl;
+      }
+      std::string trace2 = "test-d_a_smartptr";
+      d_a_smartptr->foo(trace2);
+      if (trace2 != "C::foo()") {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #6b: calling d_a_smartptr->foo()"
+                    << endl;
+         tbox::perr << "   Expected C::foo(), Received " << trace2 << endl;
+      }
+      return fail_count;
+   }
+   int callFoo1()
+   {
+      int fail_count = 0;
+      string trace = "test-d_a_smartptr";
+      d_a_smartptr->foo1(trace);
+      if (trace != "C::foo1()") {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #8a: calling d_a_smartptr->foo1()"
+                    << endl;
+         tbox::perr << "   Expected C::foo1(), Received " << trace << endl;
+      }
+      return fail_count;
+   }
+private:
+   A* d_a_ptr;
+   tbox::Pointer<A> d_a_smartptr;
+};
+
+class HaveB
+{
+public:
+   HaveB(
+      int& fail_count,
+      B* b_ptr,
+      const B* b_constptr,
+      tbox::Pointer<B> b_smartptr,
+      const tbox::Pointer<B> b_constsmartptr)
+   {
+      if (b_ptr != b_constptr) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #5b: b_ptr != b_constptr" << endl;
+      }
+      if (b_ptr != (B *)b_smartptr) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #5b: b_ptr != (A*)b_smartptr" << endl;
+      }
+      if (b_ptr != (B *)b_constsmartptr) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #5c: b_ptr != (A*)b_constsmartptr"
+                    << endl;
+      }
+      d_b_ptr = b_ptr;
+      d_b_smartptr = b_smartptr;
+   }
+   virtual ~HaveB() {
+   }
+   int callFoo()
+   {
+      int fail_count = 0;
+      string trace1 = "test-d_b_ptr";
+      d_b_ptr->foo(trace1);
+      if (trace1 != "C::foo()") {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #7a: calling d_b_ptr->foo()" << endl;
+         tbox::perr << "   Expected C::foo(), Received " << trace1 << endl;
+      }
+      std::string trace2 = "test-d_b_smartptr";
+      d_b_smartptr->foo(trace2);
+      if (trace2 != "C::foo()") {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #7b: calling d_b_smartptr->foo()"
+                    << endl;
+         tbox::perr << "   Expected C::foo(), Received " << trace2 << endl;
+      }
+      return fail_count;
+   }
+   int callFoo1()
+   {
+      int fail_count = 0;
+      string trace = "test-d_b_smartptr";
+      d_b_smartptr->foo1(trace);
+      if (trace != "C::foo1()") {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #9a: calling d_b_smartptr->foo1()"
+                    << endl;
+         tbox::perr << "   Expected C::foo1(), Received " << trace << endl;
+      }
+      return fail_count;
+   }
+private:
+   B* d_b_ptr;
+   tbox::Pointer<B> d_b_smartptr;
+};
+
+class Derived:public tbox::DescribedClass
+{
+public:
+   Derived() {
+   }
+   virtual ~Derived() {
+   }
+};
+
+class ReallyDerived:public Derived
+{
+public:
+   ReallyDerived() {
+   }
+   virtual ~ReallyDerived() {
+   }
+};
+
+class ReallyReallyDerived:public ReallyDerived
+{
+public:
+   ReallyReallyDerived() {
+   }
+   virtual ~ReallyReallyDerived() {
+   }
+};
+
+#include "SAMRAI/tbox/ConstPointer.C"
+#include "SAMRAI/tbox/Pointer.C"
+template class tbox::Pointer<A>;
+template class tbox::Pointer<B>;
+template class tbox::Pointer<C>;
+template class tbox::Pointer<Derived>;
+template class tbox::Pointer<ReallyDerived>;
+template class tbox::Pointer<ReallyReallyDerived>;
+
+/*
+ * Function to test casting in function call.
+ */
+
+int test(
+   tbox::Pointer<ReallyDerived> a,
+   tbox::Pointer<ReallyDerived> b,
+   tbox::Pointer<ReallyDerived> c)
+{
+   int fail_count = 0;
+   if (!a.isNull()) {
+      fail_count++;
+      tbox::perr << "FAILED: - Test #2a: in test(), a is non-null" << endl;
+   }
+   if (b.isNull()) {
+      fail_count++;
+      tbox::perr << "FAILED: - Test #2b: in test(), b is null" << endl;
+   }
+   if (c.isNull()) {
+      fail_count++;
+      tbox::perr << "FAILED: - Test #2c: in test(), c is null" << endl;
+   }
+
+   tbox::Pointer<ReallyReallyDerived> d = b;
+   if (!d.isNull()) {
+      fail_count++;
+      tbox::perr << "FAILED: - Test #2d: in test(), d is non-null" << endl;
+   }
+   tbox::Pointer<ReallyReallyDerived> e = c;
+   if (e.isNull()) {
+      fail_count++;
+      tbox::perr << "FAILED: - Test #2e: in test(), e is null" << endl;
+   }
+   return fail_count;
+}
+
+int main(
+   int argc,
+   char* argv[])
+{
+   int fail_count = 0;
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+
+      /*
+       * Regular pointer tests.
+       */
+
+      tbox::Pointer<Derived> derived(new Derived);
+      tbox::Pointer<ReallyDerived> really_derived(new ReallyDerived);
+      tbox::Pointer<ReallyReallyDerived> really_really_derived(
+         new ReallyReallyDerived);
+
+      /*
+       * Test casting to base class Derived.
+       */
+      tbox::Pointer<Derived> a = derived;
+      if (a.isNull()) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #1a: a is null" << endl;
+      }
+      tbox::Pointer<Derived> b = really_derived;
+      if (b.isNull()) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #1b: b is null" << endl;
+      }
+      tbox::Pointer<Derived> c = really_really_derived;
+      if (c.isNull()) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #1c: c is null" << endl;
+      }
+
+      /*
+       * Test casting to intermediate class ReallyDerived.
+       */
+      tbox::Pointer<ReallyDerived> d = derived;
+      if (!d.isNull()) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #1d: d is non-null" << endl;
+      }
+      tbox::Pointer<ReallyDerived> e = really_derived;
+      if (e.isNull()) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #1e: e is null" << endl;
+      }
+      tbox::Pointer<ReallyDerived> f = really_really_derived;
+      if (f.isNull()) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #1f: f is null" << endl;
+      }
+
+      /*
+       * Test casting to most derived class ReallyReallyDerived.
+       */
+      tbox::Pointer<ReallyReallyDerived> g = derived;
+      if (!g.isNull()) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #1g: g is non-null" << endl;
+      }
+      tbox::Pointer<ReallyReallyDerived> h = really_derived;
+      if (!h.isNull()) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #1h: h is non-null" << endl;
+      }
+      tbox::Pointer<ReallyReallyDerived> i = really_really_derived;
+      if (i.isNull()) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #1i: i is null" << endl;
+      }
+
+      /*
+       * Test casting in function call (#2 tests).
+       */
+      fail_count += test(derived, really_derived, really_really_derived);
+
+      /*
+       * Const pointer tests.
+       */
+
+      /*
+       * Test casting to base class Derived.
+       */
+      const tbox::Pointer<Derived> j = derived;
+      if (j.isNull()) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #3j: j is null" << endl;
+      }
+      const tbox::Pointer<Derived> k = really_derived;
+      if (k.isNull()) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #3k: k is null" << endl;
+      }
+      const tbox::Pointer<Derived> l = really_really_derived;
+      if (l.isNull()) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #3l: l is null" << endl;
+      }
+
+      /*
+       * Test casting to intermediate class ReallyDerived.
+       */
+      const tbox::Pointer<ReallyDerived> m = derived;
+      if (!m.isNull()) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #3m: m is non-null" << endl;
+      }
+      const tbox::Pointer<ReallyDerived> n = really_derived;
+      if (n.isNull()) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #3n: n is null" << endl;
+      }
+      const tbox::Pointer<ReallyDerived> o = really_really_derived;
+      if (o.isNull()) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #3o: o is null" << endl;
+      }
+
+      /*
+       * Test casting to most derived class ReallyDerived.
+       */
+      const tbox::Pointer<ReallyReallyDerived> p = derived;
+      if (!p.isNull()) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #3p: p is non-null" << endl;
+      }
+      const tbox::Pointer<ReallyReallyDerived> q = really_derived;
+      if (!q.isNull()) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #3q: q is non-null" << endl;
+      }
+      const tbox::Pointer<ReallyReallyDerived> r = really_really_derived;
+      if (r.isNull()) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #3r: r is null" << endl;
+      }
+
+      /*
+       * Test casting const pointer to regular pointers.
+       */
+#if 0
+      const tbox::Pointer<ReallyReallyDerived> s = derived;
+      if (!s.isNull()) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #3s: s is non-null" << endl;
+      }
+      const tbox::Pointer<ReallyReallyDerived> t = really_derived;
+      if (!t.isNull()) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #3t: t is non-null" << endl;
+      }
+      const tbox::Pointer<ReallyReallyDerived> u = really_really_derived;
+      if (!u.isNull()) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #3u: u is non-null" << endl;
+      }
+#endif
+
+      /*
+       * Virtual base class pointer tests.
+       */
+
+      tbox::Pointer<C> my_C(new C());
+
+      // #4 tests
+      HaveA my_HaveA(fail_count, my_C, my_C, my_C, my_C);
+
+      // #5 tests
+      HaveB my_HaveB(fail_count, my_C, my_C, my_C, my_C);
+
+      // #6 tests
+      fail_count += my_HaveA.callFoo();
+
+      // #7 tests
+      fail_count += my_HaveB.callFoo();
+
+      // #8 tests
+      fail_count += my_HaveA.callFoo1();
+
+      // #9 tests
+      fail_count += my_HaveB.callFoo1();
+
+      if (fail_count == 0) {
+         tbox::pout << "\nPASSED:  testpointer" << endl;
+      }
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return fail_count;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/rank_group/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/rank_group/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,219 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=main.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisDerivedDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisItDataWriter.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/VisMaterialsDataStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelConnectorUtils.I	\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelConnectorUtils.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappingConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/OverlapConnectorAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BergerRigoutsos.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/ChopAndPackLoadBalancer.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h main.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/rank_group/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/rank_group/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,71 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   Test program for performance of load balancers. 
+##
+#########################################################################
+
+SAMRAI	      =	@top_srcdir@
+SRCDIR	      =	@srcdir@
+SUBDIR        = source/test/rank_group
+VPATH	      =	@srcdir@
+OBJECT        = ../../..
+
+CPPFLAGS_EXTRA= -DNDIM=$(PDIM)  -DTESTING=1
+
+default: check
+
+include $(OBJECT)/config/Makefile.config
+
+NUM_TESTS = 6
+
+TEST_NPROCS = @TEST_NPROCS@
+
+CXX_OBJS      = main.o
+
+INPUTS1D = rod.1d.input
+INPUTS2D = rect.2d.treelb.input rod.2d.treelb.input small_cube.2d.treelb.input  small_sphere.2d.treelb.input
+INPUTS3D = plank.3d.treelb.input small_cube.3d.treelb.input
+
+main: $(CXX_OBJS) $(LIBSAMRAI)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) \
+	$(LIBSAMRAI) $(LDLIBS) -o $@
+
+check:
+		$(MAKE) check2d
+		$(MAKE) check3d
+
+check1d:	main
+		for f in $(INPUTS1D); do	\
+			$(OBJECT)/config/serpa-run $(TEST_NPROCS) \ ./main "test_inputs/$$f";	\
+		done
+
+check2d:	main
+		for f in $(INPUTS2D); do	\
+			$(OBJECT)/config/serpa-run $(TEST_NPROCS) \ ./main "test_inputs/$$f";	\
+		done
+
+check3d:	main
+		for f in $(INPUTS3D); do	\
+			$(OBJECT)/config/serpa-run $(TEST_NPROCS) \ ./main "test_inputs/$$f";	\
+		done
+
+checkcompile: main
+
+checktest:
+		rm -f makecheck.logfile
+		$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+		$(OBJECT)/source/test/testtools/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+		rm -f makecheck.logfile
+
+clean-check:
+		$(SAMCLEAN)
+
+clean:
+		$(SAMCLEAN)
+		$(RM) *.f main *visit
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/test/rank_group/main.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/rank_group/main.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,805 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Test program for RankGroup with TreeLoadBalancer. 
+ *
+ ************************************************************************/
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <iomanip>
+
+#include "SAMRAI/mesh/BergerRigoutsos.h"
+#include "SAMRAI/hier/MappedBoxLevel.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/hier/Connector.h"
+#include "SAMRAI/hier/MappedBoxLevelConnectorUtils.h"
+#include "SAMRAI/hier/OverlapConnectorAlgorithm.h"
+#include "SAMRAI/hier/MappingConnectorAlgorithm.h"
+#include "SAMRAI/mesh/TreeLoadBalancer.h"
+#include "SAMRAI/mesh/ChopAndPackLoadBalancer.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include "SAMRAI/appu/VisItDataWriter.h"
+
+#include "SAMRAI/tbox/InputDatabase.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include <vector>
+
+#ifndef LACKS_NAMESPACE
+using namespace SAMRAI;
+using namespace tbox;
+#endif
+
+/*
+ ************************************************************************
+ *
+ *
+ *************************************************************************
+ */
+
+typedef std::vector<hier::MappedBox> NodeVec;
+typedef std::vector<hier::Box> BoxVec;
+
+void
+generatePrebalanceByUserBoxes(
+   tbox::Pointer<tbox::Database> database,
+   const tbox::Pointer<hier::PatchHierarchy>& hierarchy,
+   const hier::IntVector& min_size,
+   const hier::IntVector& max_gcw,
+   hier::MappedBoxLevel& balance_mapped_box_level,
+   const hier::MappedBoxLevel& anchor_mapped_box_level,
+   hier::Connector& anchor_to_balance,
+   hier::Connector& balacne_to_anchor);
+
+void
+generatePrebalanceByUserShells(
+   const tbox::Pointer<tbox::Database>& database,
+   const tbox::Pointer<hier::PatchHierarchy>& hierarchy,
+   const hier::IntVector& min_size,
+   const hier::IntVector& max_gcw,
+   hier::MappedBoxLevel& balance_mapped_box_level,
+   const hier::MappedBoxLevel& anchor_mapped_box_level,
+   hier::Connector& anchor_to_balance,
+   hier::Connector& balance_to_anchor);
+
+void
+sortNodes(
+   hier::MappedBoxLevel& new_mapped_box_level,
+   hier::Connector& tag_to_new,
+   hier::Connector& new_to_tag,
+   bool sort_by_corners,
+   bool sequentialize_global_indices);
+
+int main(
+   int argc,
+   char* argv[])
+{
+   /*
+    * Initialize MPI, SAMRAI.
+    */
+
+   SAMRAI_MPI::init(&argc, &argv);
+   SAMRAIManager::initialize();
+   SAMRAIManager::startup();
+   tbox::SAMRAI_MPI mpi(SAMRAI_MPI::getSAMRAIWorld());
+
+   const int rank = mpi.getRank();
+   int fail_count = 0;
+
+   /*
+    * Process command line arguments.  For each run, the input
+    * filename must be specified.  Usage is:
+    *
+    * executable <input file name>
+    */
+   std::string input_filename;
+
+   if (argc < 2) {
+      TBOX_ERROR("USAGE:  " << argv[0] << " <input file> [case name]\n"
+                                       << "  options:\n"
+                                       << "  none at this time" << std::endl);
+   } else {
+      input_filename = argv[1];
+   }
+
+   std::string case_name;
+   if (argc > 2) {
+      case_name = argv[2];
+   }
+
+   {
+      /*
+       * Scope to force destruction of objects that would otherwise
+       * leave allocated memory reported by the memory test.
+       */
+
+      /*
+       * Create input database and parse all data in input file.
+       */
+
+      Pointer<Database> input_db(new InputDatabase("input_db"));
+      tbox::InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      /*
+       * Set up the timer manager.
+       */
+      if (input_db->isDatabase("TimerManager")) {
+         TimerManager::createManager(input_db->getDatabase("TimerManager"));
+      }
+
+      /*
+       * Retrieve "Main" section from input database.
+       * The main database is used only in main().
+       * The base_name variable is a base name for
+       * all name strings in this program.
+       */
+
+      Pointer<Database> main_db = input_db->getDatabase("Main");
+
+      const tbox::Dimension dim(static_cast<unsigned short>(main_db->getInteger("dim")));
+      const int dimval = dim.getValue();
+
+      std::string base_name = "unnamed";
+      base_name = main_db->getStringWithDefault("base_name", base_name);
+
+      /*
+       * Modify basename for this particular run.
+       * Add the number of processes and the case name.
+       */
+      if (!case_name.empty()) {
+         base_name = base_name + '-' + case_name;
+      }
+      base_name = base_name + '-' + tbox::Utilities::intToString(
+            mpi.getSize(),
+            5);
+      tbox::plog << "Added case name (" << case_name << ") and nprocs ("
+                 << mpi.getSize() << ") to base name -> '"
+                 << base_name << "'\n";
+
+      if (!case_name.empty()) {
+         tbox::plog << "Added case name (" << case_name << ") and nprocs ("
+                    << mpi.getSize() << ") to base name -> '"
+                    << base_name << "'\n";
+      }
+
+      /*
+       * Start logging.
+       */
+      const std::string log_file_name = base_name + ".log";
+      bool log_all_nodes = false;
+      log_all_nodes = main_db->getBoolWithDefault("log_all_nodes",
+            log_all_nodes);
+      if (log_all_nodes) {
+         PIO::logAllNodes(log_file_name);
+      } else {
+         PIO::logOnlyNodeZero(log_file_name);
+      }
+
+      plog << "Input database after initialization..." << std::endl;
+      input_db->printClassData(plog);
+
+      // tbox::TimerManager *tm = tbox::TimerManager::getManager();
+      // tbox::Pointer<tbox::Timer> t_search_tree_for_set =
+      // tm->getTimer("apps::main::search_tree_for_set");
+
+      /*
+       * Parameters.  Some of these should be specified by input deck.
+       */
+      hier::IntVector ghost_cell_width(dim, 2);
+      if (main_db->isInteger("ghost_cell_width")) {
+         main_db->getIntegerArray("ghost_cell_width", &ghost_cell_width[0], dimval);
+      }
+
+      hier::IntVector min_size(dim, 8);
+      if (main_db->isInteger("min_size")) {
+         main_db->getIntegerArray("min_size", &min_size[0], dimval);
+      }
+      hier::IntVector max_size(dim, -1);
+      if (main_db->isInteger("max_size")) {
+         main_db->getIntegerArray("max_size", &max_size[0], dimval);
+      }
+      hier::IntVector bad_interval(dim, 2);
+      hier::IntVector cut_factor(dim, 1);
+
+      hier::OverlapConnectorAlgorithm oca;
+
+      /*
+       * Set up the domain from input.
+       */
+      hier::BoxArray domain_boxes(dim);
+      hier::MappedBoxLevel domain_mapped_box_level(
+         hier::IntVector(dim, 1),
+         mpi,
+         hier::MappedBoxLevel::GLOBALIZED);
+
+      domain_boxes = main_db->getDatabaseBoxArray("domain_boxes");
+      for (int i = 0; i < domain_boxes.size(); ++i) {
+         domain_mapped_box_level.addMappedBox(hier::MappedBox(domain_boxes[i],
+                                                              hier::LocalId(i), 0));
+      }
+
+      /*
+       * Create hierarchy we can satisfy the load balancing
+       * interface and dump visit output.
+       *
+       * anchor_mapped_box_level is used for level 0.
+       * balance_mapped_box_level is used for level 1.
+       */
+      const hier::IntVector ilo(
+         domain_mapped_box_level.getGlobalBoundingBox().lower());
+      const hier::IntVector ihi(
+         domain_mapped_box_level.getGlobalBoundingBox().upper());
+      std::vector<double> xlo(dimval);
+      std::vector<double> xhi(dimval);
+      for (int i = 0; i < dimval; ++i) {
+         xlo[i] = 0.0;
+         xhi[i] = 1.0;
+      }
+      tbox::Pointer<geom::CartesianGridGeometry> grid_geometry(
+         new geom::CartesianGridGeometry(
+            "GridGeometry",
+            &xlo[0],
+            &xhi[0],
+            domain_boxes));
+
+      tbox::Pointer<hier::PatchHierarchy> hierarchy(
+         new hier::PatchHierarchy(
+            "Hierarchy",
+            grid_geometry));
+
+      hierarchy->setMaxNumberOfLevels(2);
+
+      /*
+       * Set up the load balancers.
+       */
+
+      mesh::ChopAndPackLoadBalancer cut_and_pack_lb(
+         dim,
+         "ChopAndPackLoadBalancer",
+         input_db->getDatabaseWithDefault("ChopAndPackLoadBalancer",
+            tbox::Pointer<SAMRAI::tbox::Database>(NULL)));
+
+      mesh::TreeLoadBalancer tree_lb(
+         dim,
+         "TreeLoadBalancer",
+         input_db->getDatabaseWithDefault("TreeLoadBalancer",
+            tbox::Pointer<SAMRAI::tbox::Database>(NULL)));
+      tree_lb.setSAMRAI_MPI(mpi);
+
+      mesh::LoadBalanceStrategy* lb = NULL;
+
+      std::string load_balancer_type;
+      if (main_db->isString("load_balancer_type")) {
+         load_balancer_type = main_db->getString("load_balancer_type");
+         if (load_balancer_type == "TreeLoadBalancer") {
+            lb = &tree_lb;
+         } else if (load_balancer_type == "ChopAndPackLoadBalancer") {
+            lb = &cut_and_pack_lb;
+         }
+      }
+      if (lb == NULL) {
+         TBOX_ERROR(
+            "Missing or bad load_balancer specification in Main database.\n"
+            << "Specify load_balancer_type = STRING, where STRING can be\n"
+            << "\"ChopAndPackLoadBalancer\" or \"TreeLoadBalancer\".");
+      }
+
+      /*
+       * Set up data used by TreeLoadBalancer.
+       */
+      hier::MappedBoxLevel anchor_mapped_box_level(hier::IntVector(dim, 1));
+      hier::MappedBoxLevel balance_mapped_box_level(dim);
+      hier::Connector balance_to_anchor;
+      hier::Connector anchor_to_balance;
+      hier::Connector balance_to_balance;
+
+      {
+         hier::BoxArray anchor_boxes(dim);
+         anchor_boxes = main_db->getDatabaseBoxArray("anchor_boxes");
+         const int boxes_per_proc =
+            (anchor_boxes.size() + anchor_mapped_box_level.getNproc()
+             - 1) / anchor_mapped_box_level.getNproc();
+         const int my_boxes_start = anchor_mapped_box_level.getRank()
+            * boxes_per_proc;
+         const int my_boxes_stop =
+            tbox::MathUtilities<int>::Min(my_boxes_start + boxes_per_proc,
+               anchor_boxes.size());
+         for (int i = my_boxes_start; i < my_boxes_stop; ++i) {
+            anchor_mapped_box_level.addBox(anchor_boxes[i]);
+         }
+      }
+
+      {
+         /*
+          * Load balance the anchor mapped_box_level, using the domain as its anchor.
+          *
+          * This is not a part of the performance test because does not
+          * reflect the load balancer use in real apps.  We just neeed a
+          * distributed anchor for the real loac balancing performance test.
+          */
+         hier::Connector anchor_to_domain(
+            anchor_mapped_box_level,
+            domain_mapped_box_level,
+            hier::IntVector(dim, 2));
+         hier::Connector domain_to_anchor(
+            domain_mapped_box_level,
+            anchor_mapped_box_level,
+            hier::IntVector(dim, 2));
+         oca.findOverlaps(anchor_to_domain);
+         oca.findOverlaps(domain_to_anchor);
+
+         tbox::plog << "\n\n\ninitial anchor loads:\n";
+         lb->gatherAndReportLoadBalance(
+            (double)anchor_mapped_box_level.getLocalNumberOfCells(),
+            anchor_mapped_box_level.getMPI());
+
+         const int nnodes = mpi.getSize();
+         tbox::Array<int> active_ranks;
+         if (nnodes == 1) {
+            active_ranks.resizeArray(1);
+            active_ranks[0] = 0;
+         } else {
+            active_ranks.resizeArray(nnodes / 2);
+            for (int i = 0; i < nnodes / 2; i++) {
+               active_ranks[i] = (i + 1) % (nnodes / 2);
+            }
+         }
+         tbox::RankGroup rank_group_0(active_ranks, mpi);
+
+         lb->loadBalanceMappedBoxLevel(
+            anchor_mapped_box_level,
+            anchor_to_domain,
+            domain_to_anchor,
+            hierarchy,
+            0,
+            hier::Connector(),
+            hier::Connector(),
+            min_size,
+            max_size,
+            domain_mapped_box_level,
+            bad_interval,
+            cut_factor,
+            rank_group_0);
+
+         sortNodes(anchor_mapped_box_level,
+            domain_to_anchor,
+            anchor_to_domain,
+            false,
+            true);
+
+         oca.assertOverlapCorrectness(anchor_to_domain);
+         oca.assertOverlapCorrectness(domain_to_anchor);
+
+         anchor_mapped_box_level.cacheGlobalReducedData();
+
+         tbox::plog << "\n\n\nfinal anchor loads:\n";
+         lb->gatherAndReportLoadBalance(
+            (double)anchor_mapped_box_level.getLocalNumberOfCells(),
+            anchor_mapped_box_level.getMPI());
+      }
+
+      {
+         std::string box_gen_method("PrebalanceByUserBoxes");
+         box_gen_method = main_db->getStringWithDefault("box_gen_method",
+               box_gen_method);
+         if (box_gen_method == "PrebalanceByUserBoxes") {
+            generatePrebalanceByUserBoxes(
+               main_db->getDatabase("PrebalanceByUserBoxes"),
+               hierarchy,
+               min_size,
+               ghost_cell_width,
+               balance_mapped_box_level,
+               anchor_mapped_box_level,
+               anchor_to_balance,
+               balance_to_anchor);
+         } else if (box_gen_method == "PrebalanceByUserShells") {
+            generatePrebalanceByUserShells(
+               main_db->getDatabase("PrebalanceByUserShells"),
+               hierarchy,
+               min_size,
+               ghost_cell_width,
+               balance_mapped_box_level,
+               anchor_mapped_box_level,
+               anchor_to_balance,
+               balance_to_anchor);
+         } else {
+            TBOX_ERROR("Bad box_gen_method: '" << box_gen_method << "'");
+         }
+      }
+
+      {
+         /*
+          * Output "before" data.
+          */
+         balance_mapped_box_level.cacheGlobalReducedData();
+         tbox::plog << "\n\n\nBefore:\n";
+         lb->gatherAndReportLoadBalance(
+            (double)balance_mapped_box_level.getLocalNumberOfCells(),
+            balance_mapped_box_level.getMPI());
+
+         tbox::plog << "Anchor mapped_box_level node stats:\n";
+         anchor_mapped_box_level.printMappedBoxStats(tbox::plog, "AL-> ");
+         tbox::plog << "Anchor mapped_box_level:\n";
+         anchor_mapped_box_level.recursivePrint(tbox::plog, "AL-> ", 2);
+
+         tbox::plog << "Balance mapped_box_level node stats:\n";
+         balance_mapped_box_level.printMappedBoxStats(tbox::plog, "BL-> ");
+         tbox::plog << "Balance mapped_box_level:\n";
+         balance_mapped_box_level.recursivePrint(tbox::plog, "BL-> ", 2);
+
+         tbox::plog << "balance_to_anchor edge stats:\n";
+         balance_to_anchor.printNeighborStats(tbox::plog, "BA-> ");
+         tbox::plog << "balance_to_anchor:\n";
+         balance_to_anchor.recursivePrint(tbox::plog, "BA-> ");
+
+         tbox::plog << "anchor_to_balance edge stats:\n";
+         anchor_to_balance.printNeighborStats(tbox::plog, "AB-> ");
+         tbox::plog << "anchor_to_balance:\n";
+         anchor_to_balance.recursivePrint(tbox::plog, "AB-> ");
+      }
+
+      {
+
+         const int nnodes = mpi.getSize();
+         tbox::RankGroup rank_group_1(mpi);
+         if (nnodes == 1) {
+            rank_group_1.setMinMax(0, 0);
+         } else {
+            rank_group_1.setMinMax(0, (nnodes / 2) - 1);
+         }
+
+         /*
+          * Load balance the unbalanced mapped_box_level.
+          */
+         lb->loadBalanceMappedBoxLevel(
+            balance_mapped_box_level,
+            balance_to_anchor,
+            anchor_to_balance,
+            hierarchy,
+            1,
+            hier::Connector(),
+            hier::Connector(),
+            min_size,
+            max_size,
+            domain_mapped_box_level,
+            bad_interval,
+            cut_factor,
+            rank_group_1);
+
+         oca.assertOverlapCorrectness(balance_to_anchor);
+         oca.assertOverlapCorrectness(anchor_to_balance);
+
+         sortNodes(balance_mapped_box_level,
+            anchor_to_balance,
+            balance_to_anchor,
+            false,
+            true);
+      }
+
+      /*
+       * Get the balance_to_balance for edge statistics.
+       */
+      oca.bridge(
+         balance_to_balance,
+         balance_to_anchor,
+         anchor_to_balance,
+         balance_to_anchor,
+         anchor_to_balance);
+
+      {
+         /*
+          * Output "after" data.
+          */
+         balance_mapped_box_level.cacheGlobalReducedData();
+         tbox::plog << "\n\n\nAfter:\n";
+         lb->gatherAndReportLoadBalance(
+            (double)balance_mapped_box_level.getLocalNumberOfCells(),
+            balance_mapped_box_level.getMPI());
+
+         tbox::plog << "Balance mapped_box_level node stats:\n";
+         balance_mapped_box_level.printMappedBoxStats(tbox::plog, "BL-> ");
+         tbox::plog << "Balance mapped_box_level:\n";
+         balance_mapped_box_level.recursivePrint(tbox::plog, "BL-> ", 2);
+
+         tbox::plog << "balance_to_balance edge stats:\n";
+         balance_to_balance.printNeighborStats(tbox::plog, "BB-> ");
+         tbox::plog << "balance_to_balance:\n";
+         balance_to_balance.recursivePrint(tbox::plog, "BB-> ");
+
+         tbox::plog << "balance_to_anchor edge stats:\n";
+         balance_to_anchor.printNeighborStats(tbox::plog, "BA-> ");
+         tbox::plog << "balance_to_anchor:\n";
+         balance_to_anchor.recursivePrint(tbox::plog, "BA-> ");
+
+         tbox::plog << "anchor_to_balance edge stats:\n";
+         anchor_to_balance.printNeighborStats(tbox::plog, "AB-> ");
+         tbox::plog << "anchor_to_balance:\n";
+         anchor_to_balance.recursivePrint(tbox::plog, "AB-> ");
+
+         // Dump summary statistics to output.
+         lb->gatherAndReportLoadBalance(
+            (double)balance_mapped_box_level.getLocalNumberOfCells(),
+            balance_mapped_box_level.getMPI(),
+            tbox::plog);
+         tbox::plog << "Balance mapped_box_level node stats:\n";
+         balance_mapped_box_level.printMappedBoxStats(tbox::plog, "BL-> ");
+         tbox::plog << "balance_to_balance edge stats:\n";
+         balance_to_balance.printNeighborStats(tbox::plog, "BB-> ");
+      }
+
+      const hier::MappedBoxLevel& layer0 = anchor_mapped_box_level;
+      hierarchy->makeNewPatchLevel(
+         0,
+         layer0);
+
+      const hier::MappedBoxLevel& layer1 = balance_mapped_box_level;
+      hierarchy->makeNewPatchLevel(
+         1,
+         layer1);
+
+#ifdef HAVE_HDF5
+#if 0
+      if (dimval == 2 || dimval == 3) {
+         /*
+          * Create the VisIt data writer.
+          * Write the plot file.
+          */
+         DerivedVisOwnerData owner_writer;
+         const std::string visit_filename = base_name + ".visit";
+         appu::VisItDataWriter visit_data_writer(dim,
+                                                 "VisIt Writer",
+                                                 visit_filename);
+         visit_data_writer.registerDerivedPlotQuantity("Owner",
+            "SCALAR",
+            &owner_writer);
+         visit_data_writer.writePlotData(hierarchy, 0);
+      }
+#endif
+#endif
+
+   }
+
+   /*
+    * Print input database again to fully show usage.
+    */
+   plog << "Input database after running..." << std::endl;
+   tbox::InputManager::getManager()->getInputDatabase()->printClassData(plog);
+
+   tbox::pout << "\nPASSED:  rank_group" << std::endl;
+
+   /*
+    * Exit properly by shutting down services in correct order.
+    */
+   tbox::plog << "\nShutting down..." << std::endl;
+
+   /*
+    * Shut down.
+    */
+   SAMRAIManager::shutdown();
+   SAMRAIManager::finalize();
+
+   if (fail_count == 0) {
+      SAMRAI_MPI::finalize();
+   } else {
+      std::cout << "Process " << std::setw(5) << rank << " aborting."
+                << std::endl;
+      SAMRAI::tbox::Utilities::abort("Aborting due to nonzero fail count",
+         __FILE__, __LINE__);
+   }
+
+   return fail_count;
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void generatePrebalanceByUserShells(
+   const tbox::Pointer<tbox::Database>& database,
+   const tbox::Pointer<hier::PatchHierarchy>& hierarchy,
+   const hier::IntVector& min_size,
+   const hier::IntVector& max_gcw,
+   hier::MappedBoxLevel& balance_mapped_box_level,
+   const hier::MappedBoxLevel& anchor_mapped_box_level,
+   hier::Connector& anchor_to_balance,
+   hier::Connector& balance_to_anchor)
+{
+
+   const tbox::Dimension dim(hierarchy->getDim());
+   const int dimval = dim.getValue();
+
+   /*
+    * Starting at shell origin, tag cells with centroids
+    * at radii[0]<r<radii[1], radii[2]<r<radii[3], and so on.
+    */
+   tbox::Array<double> radii;
+   double efficiency_tol = 0.75;
+   double combine_tol = 0.75;
+
+   std::vector<double> r0(dimval);
+   for (int d = 0; d < dimval; ++d) r0[d] = 0;
+
+   tbox::Pointer<tbox::Database> abr_db;
+   if (database) {
+      efficiency_tol = database->getDoubleWithDefault("efficiency_tol",
+            efficiency_tol);
+      combine_tol = database->getDoubleWithDefault("combine_tol", combine_tol);
+      if (database->isDouble("r0")) {
+         database->getDoubleArray("r0", &r0[0], dimval);
+      }
+      if (database->isDouble("radii")) {
+         radii = database->getDoubleArray("radii");
+      }
+      abr_db = database->getDatabaseWithDefault("BergerRigoutsos", abr_db);
+      TBOX_ASSERT(radii.size() % 2 == 0);
+   }
+
+   const int tag_val = 1;
+
+   hier::VariableDatabase* vdb =
+      hier::VariableDatabase::getDatabase();
+   tbox::Pointer<geom::CartesianGridGeometry> grid_geometry =
+      hierarchy->getGridGeometry();
+
+   const tbox::ConstPointer<hier::MappedBoxLevel>
+   anchor_mapped_box_level_ptr(&anchor_mapped_box_level, false);
+
+   tbox::Pointer<hier::PatchLevel> tag_level(
+      new hier::PatchLevel(anchor_mapped_box_level,
+                           grid_geometry,
+                           vdb->getPatchDescriptor()));
+
+   tbox::Pointer<pdat::CellVariable<int> > tag_variable(
+      new pdat::CellVariable<int>(dim, "TagVariable"));
+
+   tbox::Pointer<hier::VariableContext> default_context =
+      vdb->getContext("TagVariable");
+
+   const int tag_id = vdb->registerVariableAndContext(
+         tag_variable,
+         default_context,
+         hier::IntVector(dim, 0));
+
+   tag_level->allocatePatchData(tag_id);
+
+   const double* xlo = grid_geometry->getXLower();
+   const double* h = grid_geometry->getDx();
+   for (hier::PatchLevel::Iterator pi(tag_level); pi; pi++) {
+      tbox::Pointer<hier::Patch> patch = *pi;
+      tbox::Pointer<pdat::CellData<int> > tag_data = patch->getPatchData(tag_id);
+
+      tag_data->getArrayData().undefineData();
+
+      for (pdat::CellData<int>::Iterator ci(tag_data->getGhostBox());
+           ci; ci++) {
+         const pdat::CellIndex& idx = *ci;
+         double rr = 0;
+         std::vector<double> r(dimval);
+         for (int d = 0; d < dimval; ++d) {
+            r[d] = xlo[d] + h[d] * (idx(d) + 0.5) - r0[d];
+            rr += r[d] * r[d];
+         }
+         rr = sqrt(rr);
+         for (int i = 0; i < radii.size(); i += 2) {
+            if (radii[i] < rr && rr < radii[i + 1]) {
+               (*tag_data)(idx) = tag_val;
+               break;
+            }
+         }
+      }
+   }
+
+   mesh::BergerRigoutsos abr(dim, abr_db);
+   abr.setMPI(anchor_mapped_box_level.getMPI());
+   abr.findBoxesContainingTags(
+      balance_mapped_box_level,
+      anchor_to_balance,
+      balance_to_anchor,
+      tag_level,
+      tag_id,
+      tag_val,
+      anchor_mapped_box_level.getGlobalBoundingBox(),
+      min_size,
+      efficiency_tol,
+      combine_tol,
+      max_gcw);
+
+   /*
+    * The clustering step generated Connectors to/from the temporary
+    * tag_level->getMappedBoxLevel(), which is not the same as the
+    * anchor MappedBoxLevel.  We need to reset the Connectors to use
+    * the anchor_mapped_box_level instead.
+    */
+   anchor_to_balance.initialize(anchor_mapped_box_level,
+                                balance_mapped_box_level,
+                                anchor_to_balance.getConnectorWidth(),
+                                anchor_to_balance.getNeighborhoodSets());
+   balance_to_anchor.initialize(balance_mapped_box_level,
+                                anchor_mapped_box_level,
+                                balance_to_anchor.getConnectorWidth(),
+                                balance_to_anchor.getNeighborhoodSets());
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void generatePrebalanceByUserBoxes(
+   tbox::Pointer<tbox::Database> database,
+   const tbox::Pointer<hier::PatchHierarchy>& hierarchy,
+   const hier::IntVector& min_size,
+   const hier::IntVector& max_gcw,
+   hier::MappedBoxLevel& balance_mapped_box_level,
+   const hier::MappedBoxLevel& anchor_mapped_box_level,
+   hier::Connector& anchor_to_balance,
+   hier::Connector& balance_to_anchor)
+{
+   NULL_USE(hierarchy);
+   NULL_USE(min_size);
+
+   const tbox::Dimension& dim(hierarchy->getDim());
+
+   hier::BoxArray balance_boxes(dim);
+   balance_boxes = database->getDatabaseBoxArray("balance_boxes");
+   tbox::Array<int> initial_owners(1);
+   initial_owners[0] = 0;
+   initial_owners = database->getIntegerArray("initial_owners");
+
+   balance_mapped_box_level.initialize(hier::IntVector(dim, 1),
+      anchor_mapped_box_level.getMPI());
+   for (int i = 0; i < balance_boxes.size(); ++i) {
+      const int owner = i % initial_owners.size();
+      if (owner == balance_mapped_box_level.getRank()) {
+         balance_mapped_box_level.addMappedBox(hier::MappedBox(balance_boxes[i],
+                                                                             hier::LocalId(i), owner));
+      }
+   }
+   balance_to_anchor.initialize(
+      balance_mapped_box_level,
+      anchor_mapped_box_level,
+      max_gcw);
+   anchor_to_balance.initialize(
+      anchor_mapped_box_level,
+      balance_mapped_box_level,
+      max_gcw);
+   hier::OverlapConnectorAlgorithm oca;
+   oca.findOverlaps(balance_to_anchor);
+   oca.findOverlaps(anchor_to_balance);
+}
+
+/*
+ ***********************************************************************
+ ***********************************************************************
+ */
+void sortNodes(
+   hier::MappedBoxLevel& new_mapped_box_level,
+   hier::Connector& tag_to_new,
+   hier::Connector& new_to_tag,
+   bool sort_by_corners,
+   bool sequentialize_global_indices)
+{
+   const hier::MappingConnectorAlgorithm mca;
+
+   hier::Connector sorting_map;
+   hier::MappedBoxLevel seq_mapped_box_level(new_mapped_box_level.getDim());
+   hier::MappedBoxLevelConnectorUtils dlbg_edge_utils;
+   dlbg_edge_utils.makeSortingMap(
+      seq_mapped_box_level,
+      sorting_map,
+      new_mapped_box_level,
+      sort_by_corners,
+      sequentialize_global_indices);
+
+   mca.modify(tag_to_new,
+      new_to_tag,
+      sorting_map,
+      &new_mapped_box_level);
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/rank_group/test_inputs/plank.3d.treelb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/rank_group/test_inputs/plank.3d.treelb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 3
+
+   base_name = "plank.treelb.3d"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "TreeLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0,0),(49,99,299)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0,0),(49,99,299)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4, 4
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10,10),(39,89,289)]
+      initial_owners = 0
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'y'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/rank_group/test_inputs/rect.2d.treelb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/rank_group/test_inputs/rect.2d.treelb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 2
+
+   base_name = "rect.treelb.2d"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "TreeLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0),(999,199)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0),(999,199)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10),(989,189)]
+      initial_owners = 0
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/rank_group/test_inputs/rod.1d.treelb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/rank_group/test_inputs/rod.1d.treelb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,85 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   base_name = "rod.treelb.1d"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "TreeLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0),(299)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0),(299)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 1
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(1),(298)]
+      initial_owners = 0
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/rank_group/test_inputs/rod.2d.treelb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/rank_group/test_inputs/rod.2d.treelb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 2
+
+   base_name = "rod.treelb.2d"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "TreeLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0),(299,2)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0),(299,2)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 1, 1
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(1,1),(298,1)]
+      initial_owners = 0
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/rank_group/test_inputs/small_cube.2d.treelb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/rank_group/test_inputs/small_cube.2d.treelb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 2
+
+   base_name = "small_cube.2d.treelb"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "TreeLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0),(199,199)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0),(199,199)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10),(189,189)]
+      initial_owners = 0
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/rank_group/test_inputs/small_cube.3d.treelb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/rank_group/test_inputs/small_cube.3d.treelb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 3
+
+   base_name = "small_cube.3d.treelb"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "TreeLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0,0),(99,99,99)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0,0),(99,99,99)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4, 4
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10,10),(89,89,89)]
+      initial_owners = 0
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'y'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/rank_group/test_inputs/small_sphere.2d.treelb.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/rank_group/test_inputs/small_sphere.2d.treelb.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Performance input file for TreeLoadBalancer 
+ *
+ ************************************************************************/
+
+
+
+Main {
+   dim = 2
+
+   base_name = "small_sphere.2d.treelb"
+   log_all_nodes = FALSE
+
+   // Balancer types: TreeLoadBalancer, ChopAndPackLoadBalancer
+   load_balancer_type = "TreeLoadBalancer"
+
+   /*
+     Specify domain as a box array in the reference index space.
+   */
+   domain_boxes = [(0,0),(49,49)]
+
+   /*
+     Specify anchor layer as a box array in the reference index space.
+     The anchor layer will be partitioned but its partitioning is not
+     used in the performance test.
+
+     If omitted, the anchor layer is the same as the domain.
+   */
+   anchor_boxes = [(0,0),(49,49)]
+   /*
+     If anchor is not contained in domain, you can use this flag
+     to remove the parts that are outside the domain.
+   */
+   autonest_anchor = TRUE
+
+   /*
+     Specify ghost-cell-width between anchor and unbalanced.
+   */
+   ghost_cell_width = 4, 4
+
+   /*
+     Specify the min patch size.
+   */
+   min_size = 4, 4
+
+   box_gen_method = "PrebalanceByUserShells"
+
+   PrebalanceByUserBoxes {
+      /*
+        Specify unbalanced layer as a box array in the reference index space.
+
+        initial_owners are the ranks of the owner sof all the initial balance boxes.
+        By default, processor 0 owns all the initial balance boxes.
+      */
+      balance_boxes = [(10,10),(89,89)]
+      initial_owners = 0
+      max_box_size = -1, -1, -1
+   }
+
+   PrebalanceByUserShells {
+      /*
+        Specify unbalanced layer by tagging a set of concentric shells.
+      */
+      r0 = 0, 0 // 0.5, 0.5
+      radii = 0.0, 0.6, 0.75, 0.85, 0.99, 1.0
+      efficiency_tol = 0.80
+      combine_tol = 0.90
+      max_lap_cut_from_center = 1.0
+      BergerRigoutsos {
+         log_node_history = FALSE
+         log_cluster_summary = TRUE
+         log_cluster = FALSE
+         sequentialize_output_indices = FALSE
+         barrier_before_cluster = FALSE
+         // owner_mode = "SINGLE_OWNER"
+         // algo_advance_mode = "SYNCHRONOUS"
+      }
+   }
+
+}
+
+TreeLoadBalancer {
+  report_load_balance = TRUE // Reported in main
+  n_root_cycles = -1
+  balance_penalty_wt = 1.0
+  surface_penalty_wt = 1.0
+  slender_penalty_wt = 1.0
+  precut_penalty_wt = 1.0
+
+  // Debugging options
+  check_map = 'n'
+  check_connectivity = 'n'
+  print_steps = 'y'
+  print_swap_steps = 'n'
+  print_break_steps = 'n'
+  print_edge_steps = 'n'
+}
+
+TimerManager {
+//   print_exclusive      = TRUE
+   print_summed           = TRUE
+   print_max              = TRUE
+   print_threshold        = 0.
+   timer_list             = "hier::*::*", "mesh::*::*", "apps::*::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/restartdb/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/restartdb/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,307 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=database_tests.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h database_tests.C		\
+	database_tests.h database_values.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=mainHDF5.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h database_tests.h		\
+	mainHDF5.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=mainHDF5AppFileOpen.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/HDFDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h database_tests.h		\
+	mainHDF5AppFileOpen.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=mainMemory.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h database_tests.h		\
+	mainMemory.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
+FILE_4=mainSilo.o
+DEPENDS_4:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SiloDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h database_tests.h		\
+	mainSilo.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_4 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_4:X.o=${NDIM}.o}: ${DEPENDS_4}
+
+FILE_5=mainSiloAppFileOpen.o
+DEPENDS_5:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SiloDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h database_tests.h		\
+	mainSiloAppFileOpen.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_5 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_5:X.o=${NDIM}.o}: ${DEPENDS_5}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/restartdb/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/restartdb/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,75 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for the restart database and HDF5 tests 
+##
+#########################################################################
+
+SAMRAI	      =	@top_srcdir@
+SRCDIR	      =	@srcdir@
+SUBDIR        = source/test/restartdb
+VPATH	      =	@srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+CPPFLAGS_EXTRA =  -DTESTING=1
+
+default: check	
+
+include $(OBJECT)/config/Makefile.config
+
+NUM_TESTS = 5
+
+TEST_NPROCS = @TEST_NPROCS@
+
+testHDF5: mainHDF5.o database_tests.o $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) mainHDF5.o database_tests.o \
+	$(LIBSAMRAI) $(LDLIBS) -o testHDF5
+
+testHDF5AppFileOpen: mainHDF5AppFileOpen.o database_tests.o $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) mainHDF5AppFileOpen.o database_tests.o \
+	$(LIBSAMRAI) $(LDLIBS) -o testHDF5AppFileOpen
+
+testSilo: mainSilo.o database_tests.o $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) mainSilo.o database_tests.o \
+	$(LIBSAMRAI) $(LDLIBS) -o testSilo
+
+testSiloAppFileOpen: mainSiloAppFileOpen.o database_tests.o $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) mainSiloAppFileOpen.o database_tests.o \
+	$(LIBSAMRAI) $(LDLIBS) -o testSiloAppFileOpen
+
+testMemory: mainMemory.o database_tests.o $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) mainMemory.o database_tests.o \
+	$(LIBSAMRAI) $(LDLIBS) -o testMemory
+
+check:	testHDF5 testHDF5AppFileOpen testSilo testSiloAppFileOpen testMemory
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./testHDF5
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./testHDF5AppFileOpen
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./testSilo
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./testSiloAppFileOpen
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./testMemory
+
+check2d:
+	$(MAKE) check
+
+check3d:
+	$(MAKE) check
+
+checkcompile: testHDF5 testHDF5AppFileOpen testSilo testSiloAppFileOpen \
+	testMemory
+
+checktest:
+	rm -f makecheck.logfile
+	$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+	$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+	rm -f makecheck.logfile
+
+clean:
+	$(SAMCLEAN)
+	$(RM) testHDF5 testSilo
+	$(RM) -r test_dir *.silo *.hdf5
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/test/restartdb/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/restartdb/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,26 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   README file for hdf5 test.
+##
+#########################################################################
+
+This program tests the methods provided by the HDF5Database and
+RestartManager classes.
+
+Compilation:
+              make
+  or  
+              make testHDF5
+
+Execution:
+              ./testHDF5
+
+Output:
+              HDF5test.log
+
+-OR- make check
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/restartdb/database_tests.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/restartdb/database_tests.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1190 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Some simple generic database test functions 
+ *
+ ************************************************************************/
+
+#include "database_tests.h"
+#include "database_values.h"
+
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#include <vector>
+
+/*
+ * Write database and test contents.
+ */
+void setupTestData(
+   void) {
+   arraydb_boxArray0.setDim(tbox::Dimension(3));
+   arraydb_boxArray1.setDim(tbox::Dimension(2));
+   arraydb_boxArray2.setDim(tbox::Dimension(1));
+}
+
+/*
+ * Write database and test contents.
+ */
+void writeTestData(
+   tbox::Pointer<tbox::Database> db)
+{
+   if (db.isNull()) {
+      tbox::perr << "FAILED: - Test #0-write: database to write to is null"
+                 << endl;
+      tbox::SAMRAI_MPI::abort();
+   }
+
+   /*
+    * Build database hierarchy and test.
+    */
+
+   tbox::Pointer<tbox::Database> arraydb = db->putDatabase("Array Entries");
+
+   tbox::Pointer<tbox::Database> scalardb = db->putDatabase("Scalar Entries");
+   tbox::Pointer<tbox::Database> scalardb_empty =
+      scalardb->putDatabase("Empty");
+   tbox::Pointer<tbox::Database> scalardb_full = scalardb->putDatabase("Full");
+   tbox::Pointer<tbox::Database> defaultdb = db->putDatabase("Default");
+   tbox::Pointer<tbox::Database> namesdb = db->putDatabase("Name Entries");
+   tbox::Pointer<tbox::Database> vectordb = db->putDatabase("stl_vector");
+
+   NULL_USE(defaultdb);
+
+   if (arraydb.isNull()) {
+      tbox::perr << "FAILED: - Test #1a-write: `arraydb' is null" << endl;
+      tbox::SAMRAI_MPI::abort();
+   }
+   if (scalardb.isNull()) {
+      tbox::perr << "FAILED: - Test #1b-write: `scalardb' is null" << endl;
+      tbox::SAMRAI_MPI::abort();
+   }
+   if (scalardb_empty.isNull()) {
+      tbox::perr << "FAILED: - Test #1c-write: `scalardb_empty' is null"
+                 << endl;
+      tbox::SAMRAI_MPI::abort();
+   }
+   if (scalardb_full.isNull()) {
+      tbox::perr << "FAILED: - Test #1d-write: `scalardb_full' is null"
+                 << endl;
+      tbox::SAMRAI_MPI::abort();
+   }
+   if (vectordb.isNull()) {
+      tbox::perr << "FAILED: - Test #1e-write: `vectordb' is null"
+                 << endl;
+      tbox::SAMRAI_MPI::abort();
+   }
+
+   /*
+    * Set array values and write to database hierarchy.
+    */
+
+   tbox::Array<dcomplex> arraydb_dcomplexArray(3);
+   arraydb_dcomplexArray[0] = arraydb_dcomplexArray0;
+   arraydb_dcomplexArray[1] = arraydb_dcomplexArray1;
+   arraydb_dcomplexArray[2] = arraydb_dcomplexArray2;
+
+   tbox::Array<bool> arraydb_boolArray(3);
+   arraydb_boolArray[0] = arraydb_boolArray0;
+   arraydb_boolArray[1] = arraydb_boolArray1;
+   arraydb_boolArray[2] = arraydb_boolArray2;
+
+   tbox::Array<int> arraydb_intArray(5);
+   arraydb_intArray[0] = arraydb_intArray0;
+   arraydb_intArray[1] = arraydb_intArray1;
+   arraydb_intArray[2] = arraydb_intArray2;
+   arraydb_intArray[3] = arraydb_intArray3;
+   arraydb_intArray[4] = arraydb_intArray4;
+
+   tbox::Array<string> arraydb_stringArray(3);
+   arraydb_stringArray[0] = arraydb_stringArray0;
+   arraydb_stringArray[1] = arraydb_stringArray1;
+   arraydb_stringArray[2] = arraydb_stringArray2;
+
+   tbox::Array<float> arraydb_floatArray(5);
+   arraydb_floatArray[0] = arraydb_floatArray0;
+   arraydb_floatArray[1] = arraydb_floatArray1;
+   arraydb_floatArray[2] = arraydb_floatArray2;
+   arraydb_floatArray[3] = arraydb_floatArray3;
+   arraydb_floatArray[4] = arraydb_floatArray4;
+
+   tbox::Array<double> arraydb_doubleArray(6);
+   arraydb_doubleArray[0] = arraydb_doubleArray0;
+   arraydb_doubleArray[1] = arraydb_doubleArray1;
+   arraydb_doubleArray[2] = arraydb_doubleArray2;
+   arraydb_doubleArray[3] = arraydb_doubleArray3;
+   arraydb_doubleArray[4] = arraydb_doubleArray4;
+   arraydb_doubleArray[5] = arraydb_doubleArray5;
+
+   tbox::Array<char> arraydb_charArray(2);
+   arraydb_charArray[0] = arraydb_charArray0;
+   arraydb_charArray[1] = arraydb_charArray1;
+
+   tbox::Array<tbox::DatabaseBox> arraydb_boxArray(3);
+   arraydb_boxArray[0] = arraydb_boxArray0;
+   arraydb_boxArray[1] = arraydb_boxArray1;
+   arraydb_boxArray[2] = arraydb_boxArray2;
+
+   db->putFloat("float_val", db_float_val);
+   db->putInteger("int_val", db_int_val);
+
+   arraydb->putComplexArray("ComplexArray", arraydb_dcomplexArray);
+   arraydb->putDatabaseBoxArray("BoxArray", arraydb_boxArray);
+   arraydb->putBoolArray("BoolArray", arraydb_boolArray);
+   arraydb->putIntegerArray("IntArray", arraydb_intArray);
+   arraydb->putStringArray("StringArray", arraydb_stringArray);
+   arraydb->putFloatArray("FloatArray", arraydb_floatArray);
+   arraydb->putDoubleArray("DoubleArray", arraydb_doubleArray);
+   arraydb->putCharArray("CharArray", arraydb_charArray);
+
+   scalardb->putFloat("float1", scalardb_float1);
+   scalardb->putFloat("float2", scalardb_float2);
+   scalardb->putFloat("float3", scalardb_float3);
+
+   scalardb_full->putDouble("thisDouble", scalardb_full_thisDouble);
+   scalardb_full->putComplex("thisComplex", scalardb_full_thisComplex);
+   scalardb_full->putInteger("thisInt", scalardb_full_thisInt);
+   scalardb_full->putFloat("thisFloat", scalardb_full_thisFloat);
+   scalardb_full->putBool("thisBool", scalardb_full_thisBool);
+   scalardb_full->putString("thisString", scalardb_full_thisString);
+   scalardb_full->putChar("thisChar", scalardb_full_thisChar);
+   scalardb_full->putDatabaseBox("thisBox", scalardb_full_thisBox);
+
+   namesdb->putDouble("Name with spaces", scalardb_full_thisDouble);
+   namesdb->putDouble("Name-with-dashes", scalardb_full_thisDouble);
+   namesdb->putDouble("Name-with-!@#$%^&*()_+-=", scalardb_full_thisDouble);
+
+   std::vector<SAMRAI::hier::IntVector> vector_IntVector(2);
+   vector_IntVector[0] = intVector1;
+   vector_IntVector[1] = intVector2;
+
+   vectordb->putVector("vector_IntVector", vector_IntVector);
+
+   testDatabaseContents(db, "write");
+}
+
+/*
+ * Read database and test contents.
+ */
+void readTestData(
+   tbox::Pointer<tbox::Database> db)
+{
+   testDatabaseContents(db, "read");
+}
+
+/*
+ * Test contents of database.
+ */
+void testDatabaseContents(
+   tbox::Pointer<tbox::Database> db,
+   const string& tag)
+{
+
+   if (db.isNull()) {
+      tbox::perr << "FAILED: - Test #0-" << tag
+                 << ": database to read from is null" << endl;
+      ++number_of_failures;
+   }
+
+   tbox::Pointer<tbox::Database> arraydb = db->getDatabase("Array Entries");
+
+   tbox::Pointer<tbox::Database> scalardb = db->getDatabase("Scalar Entries");
+   tbox::Pointer<tbox::Database> scalardb_empty =
+      scalardb->getDatabase("Empty");
+   tbox::Pointer<tbox::Database> scalardb_full = scalardb->getDatabase("Full");
+   tbox::Pointer<tbox::Database> defaultdb = db->getDatabase("Default");
+
+   tbox::Pointer<tbox::Database> namesdb = db->getDatabase("Name Entries");
+
+   tbox::Pointer<tbox::Database> vectordb = db->getDatabase("stl_vector");
+
+   if (arraydb.isNull()) {
+      tbox::perr << "FAILED: - Test #1a-" << tag
+                 << ": `arraydb' is null" << endl;
+      ++number_of_failures;
+   }
+   if (scalardb.isNull()) {
+      tbox::perr << "FAILED: - Test #1b-" << tag
+                 << ": `scalardb' is null" << endl;
+      ++number_of_failures;
+   }
+   if (scalardb_empty.isNull()) {
+      tbox::perr << "FAILED: - Test #1c-" << tag
+                 << ": `scalardb_empty' is null" << endl;
+      ++number_of_failures;
+   }
+   if (scalardb_full.isNull()) {
+      tbox::perr << "FAILED: - Test #1d-" << tag
+                 << ": `scalardb_full' is null" << endl;
+      ++number_of_failures;
+   }
+
+   if (vectordb.isNull()) {
+      tbox::perr << "FAILED: - Test #1e-" << tag
+                 << ": `vectordb' is null" << endl;
+      ++number_of_failures;
+   }
+
+   tbox::Array<string> dbkeys = db->getAllKeys();
+   tbox::Array<string> arraydbkeys = arraydb->getAllKeys();
+   tbox::Array<string> scalardbkeys = scalardb->getAllKeys();
+   tbox::Array<string> scalardb_emptykeys = scalardb_empty->getAllKeys();
+   tbox::Array<string> scalardb_fullkeys = scalardb_full->getAllKeys();
+
+   int i, nkeys;
+
+   if (dbkeys.getSize() != 7) {
+      tbox::perr << "FAILED: - Test #2a-" << tag
+                 << ": # `db' keys wrong" << endl;
+      ++number_of_failures;
+   }
+   nkeys = arraydbkeys.getSize();
+   if (arraydbkeys.getSize() != 8) {
+      tbox::perr << "FAILED: - Test #2b-" << tag
+                 << ": # `arraydb' keys wrong"
+                 << "\n\tFound " << nkeys << " keys:"
+      ;
+      ++number_of_failures;
+      for (i = 0; i < nkeys; ++i) {
+         tbox::pout << "\n\t\t" << i << ": '" << arraydbkeys[i] << "'";
+      }
+      tbox::pout << endl;
+   }
+   if (scalardbkeys.getSize() != 5) {
+      tbox::perr << "FAILED: - Test #2c-" << tag
+                 << ": # `scalardb' keys wrong" << endl;
+      ++number_of_failures;
+   }
+   if (scalardb_emptykeys.getSize() != 0) {
+      tbox::perr << "FAILED: - Test #2d-" << tag
+                 << ": # `scalardb_empty' keys wrong" << endl;
+      ++number_of_failures;
+   }
+   if (scalardb_fullkeys.getSize() != 8) {
+      tbox::perr << "FAILED: - Test #2e-" << tag
+                 << ": `scalardb_full' size is wrong" << endl
+                 << " returned : " << scalardb_fullkeys.getSize() << endl
+                 << " expected : " << 8 << endl;
+      ++number_of_failures;
+   }
+
+   if (!db->isDatabase("Array Entries")) {
+      tbox::perr << "FAILED: - #3a-" << tag
+                 << ": `Array Entries' not a database" << endl;
+      ++number_of_failures;
+   }
+   if (!db->isDatabase("Scalar Entries")) {
+      tbox::perr << "FAILED: - #3b-" << tag
+                 << ": `Scalar Entries' not a database" << endl;
+      ++number_of_failures;
+   }
+   float tdb_float_val = db->getFloat("float_val");
+   if (!tbox::MathUtilities<float>::equalEps(db_float_val, db_float_val)) {
+      tbox::perr << "FAILED: - Test #3c-" << tag
+                 << ": `RestartTester' database"
+                 << "\n   Returned `float_val' = " << tdb_float_val
+                 << "  , Expected = " << db_float_val << endl;
+      ++number_of_failures;
+   }
+   int tdb_int_val = db->getInteger("int_val");
+   if (tdb_int_val != db_int_val) {
+      tbox::perr << "FAILED: - Test #3d-" << tag
+                 << ": `RestartTester' database"
+                 << "\n   Returned `int_val' = " << tdb_int_val
+                 << "  , Expected = " << db_int_val << endl;
+      ++number_of_failures;
+   }
+
+   /*
+    * Set array values to test database.
+    */
+
+   tbox::Array<dcomplex> arraydb_dcomplexArray(3);
+   arraydb_dcomplexArray[0] = arraydb_dcomplexArray0;
+   arraydb_dcomplexArray[1] = arraydb_dcomplexArray1;
+   arraydb_dcomplexArray[2] = arraydb_dcomplexArray2;
+
+   tbox::Array<bool> arraydb_boolArray(3);
+   arraydb_boolArray[0] = arraydb_boolArray0;
+   arraydb_boolArray[1] = arraydb_boolArray1;
+   arraydb_boolArray[2] = arraydb_boolArray2;
+
+   tbox::Array<int> arraydb_intArray(5);
+   arraydb_intArray[0] = arraydb_intArray0;
+   arraydb_intArray[1] = arraydb_intArray1;
+   arraydb_intArray[2] = arraydb_intArray2;
+   arraydb_intArray[3] = arraydb_intArray3;
+   arraydb_intArray[4] = arraydb_intArray4;
+
+   tbox::Array<string> arraydb_stringArray(3);
+   arraydb_stringArray[0] = arraydb_stringArray0;
+   arraydb_stringArray[1] = arraydb_stringArray1;
+   arraydb_stringArray[2] = arraydb_stringArray2;
+
+   tbox::Array<float> arraydb_floatArray(5);
+   arraydb_floatArray[0] = arraydb_floatArray0;
+   arraydb_floatArray[1] = arraydb_floatArray1;
+   arraydb_floatArray[2] = arraydb_floatArray2;
+   arraydb_floatArray[3] = arraydb_floatArray3;
+   arraydb_floatArray[4] = arraydb_floatArray4;
+
+   tbox::Array<double> arraydb_doubleArray(6);
+   arraydb_doubleArray[0] = arraydb_doubleArray0;
+   arraydb_doubleArray[1] = arraydb_doubleArray1;
+   arraydb_doubleArray[2] = arraydb_doubleArray2;
+   arraydb_doubleArray[3] = arraydb_doubleArray3;
+   arraydb_doubleArray[4] = arraydb_doubleArray4;
+   arraydb_doubleArray[5] = arraydb_doubleArray5;
+
+   tbox::Array<char> arraydb_charArray(2);
+   arraydb_charArray[0] = arraydb_charArray0;
+   arraydb_charArray[1] = arraydb_charArray1;
+
+   tbox::Array<tbox::DatabaseBox> arraydb_boxArray(3);
+   arraydb_boxArray[0] = arraydb_boxArray0;
+   arraydb_boxArray[1] = arraydb_boxArray1;
+   arraydb_boxArray[2] = arraydb_boxArray2;
+
+   int tsize = 0;
+
+   tbox::Array<dcomplex> tarraydb_dcomplexArray =
+      arraydb->getComplexArray("ComplexArray");
+   tsize = tarraydb_dcomplexArray.getSize();
+   if (tsize != arraydb_dcomplexArray.getSize()) {
+      tbox::perr << "FAILED: - Test #4a-" << tag
+                 << ": `Array Entries' database"
+                 << "\n   Returned `ComplexArray' size = " << tsize
+                 << "  , Expected = " << arraydb_dcomplexArray.getSize()
+                 << endl;
+      ++number_of_failures;
+   }
+   for (i = 0; i < tsize; i++) {
+      if (tarraydb_dcomplexArray[i] != arraydb_dcomplexArray[i]) {
+         tbox::perr << "FAILED: - Test #4b-" << tag
+                    << ": `Array Entries' database"
+                    << "\n   `ComplexArray' entry " << i << " incorrect"
+                    << endl;
+         ++number_of_failures;
+      }
+   }
+   tbox::Array<bool> tarraydb_boolArray =
+      arraydb->getBoolArray("BoolArray");
+   tsize = tarraydb_boolArray.getSize();
+   if (tsize != arraydb_boolArray.getSize()) {
+      tbox::perr << "FAILED: - Test #4c-" << tag
+                 << ": `Array Entries' database"
+                 << "\n   Returned `BoolArray' size = " << tsize
+                 << "  , Expected = " << arraydb_boolArray.getSize() << endl;
+      ++number_of_failures;
+   }
+   for (i = 0; i < tsize; i++) {
+      if (tarraydb_boolArray[i] != arraydb_boolArray[i]) {
+         tbox::perr << "FAILED: - Test #4d-" << tag
+         << ": `Array Entries' database"
+         << "\n   `BoolArray' entry " << i << " incorrect"
+         << "\n   " << tarraydb_boolArray[i] << " should be "
+         << arraydb_boolArray[i] << endl;
+         ++number_of_failures;
+      }
+   }
+   tbox::Array<int> tarraydb_intArray =
+      arraydb->getIntegerArray("IntArray");
+   tsize = tarraydb_intArray.getSize();
+   if (tsize != arraydb_intArray.getSize()) {
+      tbox::perr << "FAILED: - Test #4e-" << tag
+                 << ": `Array Entries' database"
+                 << "\n   Returned `IntArray' size = " << tsize
+                 << "  , Expected = " << arraydb_intArray.getSize() << endl;
+      ++number_of_failures;
+   }
+   for (i = 0; i < tsize; i++) {
+      if (tarraydb_intArray[i] != arraydb_intArray[i]) {
+         tbox::perr << "FAILED: - Test #4f-" << tag
+                    << ": `Array Entries' database"
+                    << "\n   `IntArray' entry " << i << " incorrect" << endl;
+         ++number_of_failures;
+      }
+   }
+   tbox::Array<string> tarraydb_stringArray =
+      arraydb->getStringArray("StringArray");
+   tsize = tarraydb_stringArray.getSize();
+   if (tsize != arraydb_stringArray.getSize()) {
+      tbox::perr << "FAILED: - Test #4g-" << tag
+      << ": `Array Entries' database"
+      << "\n   Returned `StringArray' size = " << tsize
+      << "  , Expected = " << arraydb_stringArray[i] << endl;
+      ++number_of_failures;
+   }
+   for (i = 0; i < tsize; i++) {
+      if (tarraydb_stringArray[i] != arraydb_stringArray[i]) {
+         tbox::perr << "FAILED: - Test #4h-" << tag
+                    << ": `Array Entries' database"
+                    << "\n   `StringArray' entry " << i << " incorrect" << endl;
+         ++number_of_failures;
+      }
+   }
+   tbox::Array<float> tarraydb_floatArray =
+      arraydb->getFloatArray("FloatArray");
+   tsize = tarraydb_floatArray.getSize();
+   if (tsize != arraydb_floatArray.getSize()) {
+      tbox::perr << "FAILED: - Test #4i-" << tag
+                 << ": `Array Entries' database"
+                 << "\n   Returned `FloatArray' size = " << tsize
+                 << "  , Expected = " << arraydb_floatArray.getSize() << endl;
+      ++number_of_failures;
+   }
+   for (i = 0; i < tsize; i++) {
+      if (!tbox::MathUtilities<float>::equalEps(tarraydb_floatArray[i],
+             arraydb_floatArray[i])) {
+         tbox::perr << "FAILED: - Test #4j-" << tag
+                    << ": `Array Entries' database"
+                    << "\n   `FloatArray' entry " << i << " incorrect" << endl;
+         ++number_of_failures;
+      }
+   }
+
+   tbox::Array<double> tarraydb_doubleArray =
+      arraydb->getDoubleArray("DoubleArray");
+   tsize = tarraydb_doubleArray.getSize();
+   if (tsize != arraydb_doubleArray.getSize()) {
+      tbox::perr << "FAILED: - Test #4k.b-" << tag
+                 << ": `Array Entries' database"
+                 << "\n   Returned `DoubleArray' size = " << tsize
+                 << "  , Expected = " << arraydb_doubleArray.getSize() << endl;
+      ++number_of_failures;
+   }
+   for (i = 0; i < tsize; i++) {
+      if (!tbox::MathUtilities<double>::equalEps(tarraydb_doubleArray[i],
+             arraydb_doubleArray[i])) {
+         tbox::perr << "FAILED: - Test #4l-" << tag
+                    << ": `Array Entries' database"
+                    << "\n   `DoubleArray' entry " << i << " incorrect" << endl;
+         ++number_of_failures;
+      }
+   }
+   tbox::Array<char> tarraydb_charArray =
+      arraydb->getCharArray("CharArray");
+   tsize = tarraydb_charArray.getSize();
+   if (tsize != arraydb_charArray.getSize()) {
+      tbox::perr << "FAILED: - Test #4m-" << tag
+                 << ": `Array Entries' database"
+                 << "\n   Returned `CharArray' size = " << tsize
+                 << "  , Expected = " << arraydb_charArray.getSize() << endl;
+      ++number_of_failures;
+   }
+   for (i = 0; i < tsize; i++) {
+      if (tarraydb_charArray[i] != arraydb_charArray[i]) {
+         tbox::perr << "FAILED: - Test #4l-" << tag
+                    << ": `Array Entries' database"
+                    << "\n   `CharArray' entry " << i << " incorrect" << endl;
+         ++number_of_failures;
+      }
+   }
+   tbox::Array<tbox::DatabaseBox> tarraydb_boxArray =
+      arraydb->getDatabaseBoxArray("BoxArray");
+   tsize = tarraydb_boxArray.getSize();
+   if (tsize != arraydb_boxArray.getSize()) {
+      tbox::perr << "FAILED: - Test #4o-" << tag
+                 << ": `Array Entries' database"
+                 << "\n   Returned `BoxArray' size = " << tsize
+                 << "  , Expected = " << arraydb_boxArray.getSize() << endl;
+      ++number_of_failures;
+   }
+   for (i = 0; i < tsize; i++) {
+      if (!(tarraydb_boxArray[i] == arraydb_boxArray[i])) {
+         tbox::perr << "FAILED: - Test #4p-" << tag
+                    << ": `Array Entries' database"
+                    << "\n   `BoxArray' entry " << i << " incorrect" << endl;
+         ++number_of_failures;
+      }
+   }
+
+   if (!scalardb->isDatabase("Empty")) {
+      tbox::perr << "FAILED: - #5a-" << tag
+                 << ": `Empty' not a database" << endl;
+      ++number_of_failures;
+   }
+   if (!scalardb->isDatabase("Full")) {
+      tbox::perr << "FAILED: - #5b-" << tag
+                 << ": `Full' not a database" << endl;
+      ++number_of_failures;
+   }
+   float tscalardb_float1 = scalardb->getFloat("float1");
+   if (!tbox::MathUtilities<float>::equalEps(tscalardb_float1,
+          scalardb_float1)) {
+      tbox::perr << "FAILED: - Test #5c-" << tag
+                 << ": `Scalar Entries' database"
+                 << "\n   Returned `float1' = " << tscalardb_float1
+                 << "  , Expected = " << scalardb_float1 << endl;
+      ++number_of_failures;
+   }
+   float tscalardb_float2 = scalardb->getFloat("float2");
+   if (!tbox::MathUtilities<float>::equalEps(tscalardb_float2,
+          scalardb_float2)) {
+      tbox::perr << "FAILED: - Test #5d-" << tag
+                 << ": `Scalar Entries' database"
+                 << "\n   Returned `float2' = " << tscalardb_float2
+                 << "  , Expected = " << scalardb_float2 << endl;
+      ++number_of_failures;
+   }
+   float tscalardb_float3 = scalardb->getFloat("float3");
+   if (!tbox::MathUtilities<float>::equalEps(tscalardb_float3,
+          scalardb_float3)) {
+      tbox::perr << "FAILED: - Test #5e-" << tag
+                 << ": `Scalar Entries' database"
+                 << "\n   Returned `float3' = " << tscalardb_float3
+                 << "  , Expected = " << scalardb_float3 << endl;
+      ++number_of_failures;
+   }
+
+   /*
+    * Tests reading scalar
+    */
+   double tscalardb_full_thisDouble = scalardb_full->getDouble("thisDouble");
+   if (tscalardb_full_thisDouble != scalardb_full_thisDouble) {
+      tbox::perr << "FAILED: - Test #6a-" << tag
+                 << ": `Full' database"
+                 << "\n   Returned `thisDouble' = "
+                 << tscalardb_full_thisDouble
+                 << "  , Expected = " << scalardb_full_thisDouble << endl;
+      ++number_of_failures;
+   }
+   dcomplex tscalardb_full_thisComplex =
+      scalardb_full->getComplex("thisComplex");
+   if (tscalardb_full_thisComplex != scalardb_full_thisComplex) {
+      tbox::perr << "FAILED: - Test #6b-" << tag
+                 << ": `Full' database"
+                 << "\n   Returned `thisComplex' = "
+                 << tscalardb_full_thisComplex
+                 << "  , Expected = " << scalardb_full_thisComplex << endl;
+      ++number_of_failures;
+   }
+   int tscalardb_full_thisInt = scalardb_full->getInteger("thisInt");
+   if (tscalardb_full_thisInt != scalardb_full_thisInt) {
+      tbox::perr << "FAILED: - Test #6c-" << tag
+                 << ": `Full' database"
+                 << "\n   Returned `thisInt' = " << tscalardb_full_thisInt
+                 << "  , Expected = " << scalardb_full_thisInt << endl;
+      ++number_of_failures;
+   }
+   float tscalardb_full_thisFloat = scalardb_full->getFloat("thisFloat");
+   if (!tbox::MathUtilities<float>::equalEps(tscalardb_full_thisFloat,
+          scalardb_full_thisFloat)) {
+      tbox::perr << "FAILED: - Test #6d-" << tag
+                 << ": `Full' database"
+                 << "\n   Returned `thisFloat' = " << tscalardb_full_thisFloat
+                 << "  , Expected = " << scalardb_full_thisFloat << endl;
+      ++number_of_failures;
+   }
+   bool tscalardb_full_thisBool = scalardb_full->getBool("thisBool");
+   if (tscalardb_full_thisBool != scalardb_full_thisBool) {
+      tbox::perr << "FAILED: - Test #6e-" << tag
+                 << ": `Full' database"
+                 << "\n   Returned `thisBool' = " << tscalardb_full_thisBool
+                 << "  , Expected = " << scalardb_full_thisBool << endl;
+      ++number_of_failures;
+   }
+   string tscalardb_full_thisString = scalardb_full->getString("thisString");
+   if (tscalardb_full_thisString != scalardb_full_thisString) {
+      tbox::perr << "FAILED: - Test #6f-" << tag
+                 << ": `Full' database"
+                 << "\n   Returned `thisString' = "
+                 << tscalardb_full_thisString
+                 << "  , Expected = " << scalardb_full_thisString << endl;
+      ++number_of_failures;
+   }
+   char tscalardb_full_thisChar = scalardb_full->getChar("thisChar");
+   if (tscalardb_full_thisChar != scalardb_full_thisChar) {
+      tbox::perr << "FAILED: - Test #6g-" << tag
+                 << ": `Full' database"
+                 << "\n   Returned `thisChar' = " << tscalardb_full_thisChar
+                 << "  , Expected = " << scalardb_full_thisChar << endl;
+      ++number_of_failures;
+   }
+   tbox::DatabaseBox tscalardb_full_thisBox =
+      scalardb_full->getDatabaseBox("thisBox");
+   if (!(tscalardb_full_thisBox == scalardb_full_thisBox)) {
+      tbox::perr << "FAILED: - Test #6h-" << tag
+                 << ": `Full' database"
+                 << "\n   Returned `thisBox' does not match Expected value"
+                 << endl;
+      ++number_of_failures;
+   }
+
+   /*
+    * Tests for special characters in names
+    */
+   tscalardb_full_thisDouble = namesdb->getDouble("Name with spaces");
+   if (!tbox::MathUtilities<double>::equalEps(tscalardb_full_thisDouble,
+          scalardb_full_thisDouble)) {
+      tbox::perr << "FAILED: - Test #6i-" << tag
+                 << ": `Full' database"
+                 << "\n   Returned `Name with spaces' = "
+                 << tscalardb_full_thisDouble
+                 << "  , Expected = " << scalardb_full_thisDouble << endl;
+      ++number_of_failures;
+   }
+
+   tscalardb_full_thisDouble = namesdb->getDouble("Name-with-dashes");
+   if (!tbox::MathUtilities<double>::equalEps(tscalardb_full_thisDouble,
+          scalardb_full_thisDouble)) {
+      tbox::perr << "FAILED: - Test #6j-" << tag
+                 << ": `Full' database"
+                 << "\n   Returned `Name-with-dashes' = "
+                 << tscalardb_full_thisDouble
+                 << "  , Expected = " << scalardb_full_thisDouble << endl;
+      ++number_of_failures;
+   }
+
+   tscalardb_full_thisDouble = namesdb->getDouble("Name-with-!@#$%^&*()_+-=");
+   if (tscalardb_full_thisDouble != scalardb_full_thisDouble) {
+      tbox::perr << "FAILED: - Test #6k-" << tag
+                 << ": `Full' database"
+                 << "\n   Returned `Name-with-!@#$%^&*()_+-=' = "
+                 << tscalardb_full_thisDouble
+                 << "  , Expected = " << scalardb_full_thisDouble << endl;
+      ++number_of_failures;
+   }
+
+   /*
+    * Tests for array size
+    */
+   int actual_size;
+
+   tsize = arraydb->getArraySize("ComplexArray");
+   actual_size = arraydb_dcomplexArray.getSize();
+   if (tsize != actual_size) {
+      tbox::perr << "FAILED: - Test #7a-" << tag
+                 << ": `getArraySize'"
+                 << "\n   Returned size = " << tsize
+                 << "  , Expected = " << actual_size << endl;
+      ++number_of_failures;
+   }
+
+   tsize = arraydb->getArraySize("BoolArray");
+   actual_size = arraydb_boolArray.getSize();
+   if (tsize != actual_size) {
+      tbox::perr << "FAILED: - Test #7b-" << tag
+                 << ": `getArraySize'"
+                 << "\n   Returned size = " << tsize
+                 << "  , Expected = " << actual_size << endl;
+      ++number_of_failures;
+   }
+
+   tsize = arraydb->getArraySize("IntArray");
+   actual_size = arraydb_intArray.getSize();
+   if (tsize != actual_size) {
+      tbox::perr << "FAILED: - Test #7c-" << tag
+                 << ": `getArraySize'"
+                 << "\n   Returned size = " << tsize
+                 << "  , Expected = " << actual_size << endl;
+      ++number_of_failures;
+   }
+
+   tsize = arraydb->getArraySize("StringArray");
+   actual_size = arraydb_stringArray.getSize();
+   if (tsize != actual_size) {
+      tbox::perr << "FAILED: - Test #7d-" << tag
+                 << ": `getArraySize'"
+                 << "\n   Returned size = " << tsize
+                 << "  , Expected = " << actual_size << endl;
+      ++number_of_failures;
+   }
+
+   tsize = arraydb->getArraySize("FloatArray");
+   actual_size = arraydb_floatArray.getSize();
+   if (tsize != actual_size) {
+      tbox::perr << "FAILED: - Test #7e-" << tag
+                 << ": `getArraySize'"
+                 << "\n   Returned size = " << tsize
+                 << "  , Expected = " << actual_size << endl;
+      ++number_of_failures;
+   }
+
+   tsize = arraydb->getArraySize("DoubleArray");
+   actual_size = arraydb_doubleArray.getSize();
+   if (tsize != actual_size) {
+      tbox::perr << "FAILED: - Test #7f-" << tag
+                 << ": `getArraySize'"
+                 << "\n   Returned size = " << tsize
+                 << "  , Expected = " << actual_size << endl;
+      ++number_of_failures;
+   }
+
+   tsize = arraydb->getArraySize("CharArray");
+   actual_size = arraydb_charArray.getSize();
+   if (tsize != actual_size) {
+      tbox::perr << "FAILED: - Test #7g-" << tag
+                 << ": `getArraySize'"
+                 << "\n   Returned size = " << tsize
+                 << "  , Expected = " << actual_size << endl;
+      ++number_of_failures;
+   }
+
+   tsize = arraydb->getArraySize("BoxArray");
+   actual_size = arraydb_boxArray.getSize();
+   if (tsize != actual_size) {
+      tbox::perr << "FAILED: - Test #7h-" << tag
+                 << ": `getArraySize'"
+                 << "\n   Returned size = " << tsize
+                 << "  , Expected = " << actual_size << endl;
+      ++number_of_failures;
+   }
+
+   tsize = db->getArraySize("Array Entries");
+   actual_size = 0;
+   if (tsize != actual_size) {
+      tbox::perr << "FAILED: - Test #7i-" << tag
+                 << ": `getArraySize'"
+                 << "\n   Returned size = " << tsize
+                 << "  , Expected = " << actual_size << endl;
+      ++number_of_failures;
+   }
+
+   /*
+    * Tests for existance of each type
+    */
+   if (!arraydb->keyExists("ComplexArray")) {
+      tbox::perr << "FAILED: - Test #8a-" << tag
+                 << ": `keyExists'"
+                 << "\n   Returned false "
+                 << "  , Expected = true " << endl;
+      ++number_of_failures;
+   }
+
+   if (!arraydb->keyExists("BoolArray")) {
+      tbox::perr << "FAILED: - Test #8b-" << tag
+                 << ": `keyExists'"
+                 << "\n   Returned false "
+                 << "  , Expected = true " << endl;
+      ++number_of_failures;
+   }
+   if (!arraydb->keyExists("IntArray")) {
+      tbox::perr << "FAILED: - Test #8c-" << tag
+                 << ": `keyExists'"
+                 << "\n   Returned false "
+                 << "  , Expected = true " << endl;
+      ++number_of_failures;
+   }
+   if (!arraydb->keyExists("StringArray")) {
+      tbox::perr << "FAILED: - Test #8d-" << tag
+                 << ": `keyExists'"
+                 << "\n   Returned false "
+                 << "  , Expected = true " << endl;
+      ++number_of_failures;
+   }
+   if (!arraydb->keyExists("FloatArray")) {
+      tbox::perr << "FAILED: - Test #8d-" << tag
+                 << ": `keyExists'"
+                 << "\n   Returned false "
+                 << "  , Expected = true " << endl;
+      ++number_of_failures;
+   }
+   if (!arraydb->keyExists("DoubleArray")) {
+      tbox::perr << "FAILED: - Test #8f-" << tag
+                 << ": `keyExists'"
+                 << "\n   Returned false "
+                 << "  , Expected = true " << endl;
+      ++number_of_failures;
+   }
+   if (!arraydb->keyExists("CharArray")) {
+      tbox::perr << "FAILED: - Test #8g-" << tag
+                 << ": `keyExists'"
+                 << "\n   Returned false "
+                 << "  , Expected = true " << endl;
+      ++number_of_failures;
+   }
+   if (!arraydb->keyExists("BoxArray")) {
+      tbox::perr << "FAILED: - Test #8h-" << tag
+                 << ": `keyExists'"
+                 << "\n   Returned false "
+                 << "  , Expected = true " << endl;
+      ++number_of_failures;
+   }
+   if (!db->keyExists("Array Entries")) {
+      tbox::perr << "FAILED: - Test #8i-" << tag
+                 << ": `keyExists'"
+                 << "\n   Returned false "
+                 << "  , Expected = true " << endl;
+      ++number_of_failures;
+   }
+
+   /*
+    * Tests for non-existant key
+    */
+   if (arraydb->keyExists("NonExistantKey")) {
+      tbox::perr << "FAILED: - Test #10-" << tag
+                 << ": `keyExists'"
+                 << "\n   Returned true "
+                 << "  , Expected false " << endl;
+      ++number_of_failures;
+   }
+
+   /*
+    * Tests for is methods
+    */
+   if (!arraydb->isComplex("ComplexArray")) {
+      tbox::perr << "FAILED: - Test #11a-" << tag
+                 << ": `isComplex'"
+                 << "\n   Returned false "
+                 << "  , Expected = true " << endl;
+      ++number_of_failures;
+   }
+
+   if (!arraydb->isBool("BoolArray")) {
+      tbox::perr << "FAILED: - Test #11b-" << tag
+                 << ": `isBool'"
+                 << "\n   Returned false "
+                 << "  , Expected = true " << endl;
+      ++number_of_failures;
+   }
+   if (!arraydb->isInteger("IntArray")) {
+      tbox::perr << "FAILED: - Test #11c-" << tag
+                 << ": `isInteger'"
+                 << "\n   Returned false "
+                 << "  , Expected = true " << endl;
+      ++number_of_failures;
+   }
+   if (!arraydb->isString("StringArray")) {
+      tbox::perr << "FAILED: - Test #11d-" << tag
+                 << ": `isString'"
+                 << "\n   Returned false "
+                 << "  , Expected = true " << endl;
+      ++number_of_failures;
+   }
+   if (!arraydb->isFloat("FloatArray")) {
+      tbox::perr << "FAILED: - Test #11d-" << tag
+                 << ": `isFloat'"
+                 << "\n   Returned false "
+                 << "  , Expected = true " << endl;
+      ++number_of_failures;
+   }
+   if (!arraydb->isDouble("DoubleArray")) {
+      tbox::perr << "FAILED: - Test #11f-" << tag
+                 << ": `isDouble'"
+                 << "\n   Returned false "
+                 << "  , Expected = true " << endl;
+      ++number_of_failures;
+   }
+   if (!arraydb->isChar("CharArray")) {
+      tbox::perr << "FAILED: - Test #11g-" << tag
+                 << ": `isChar'"
+                 << "\n   Returned false "
+                 << "  , Expected = true " << endl;
+      ++number_of_failures;
+   }
+   if (!arraydb->isDatabaseBox("BoxArray")) {
+      tbox::perr << "FAILED: - Test #11h-" << tag
+                 << ": `isBox'"
+                 << "\n   Returned false "
+                 << "  , Expected = true " << endl;
+      ++number_of_failures;
+   }
+   if (!db->isDatabase("Array Entries")) {
+      tbox::perr << "FAILED: - Test #11i-" << tag
+                 << ": `isDatabase'"
+                 << "\n   Returned false "
+                 << "  , Expected = true " << endl;
+      ++number_of_failures;
+   }
+
+   /*
+    * Tests for is methods on things that are not
+    */
+   if (arraydb->isComplex("nonComplexArray")) {
+      tbox::perr << "FAILED: - Test #12a-" << tag
+                 << ": `isComplex'"
+                 << "\n   Returned true "
+                 << "  , Expected false " << endl;
+      ++number_of_failures;
+   }
+
+   if (arraydb->isBool("nonBoolArray")) {
+      tbox::perr << "FAILED: - Test #12b-" << tag
+                 << ": `isBool'"
+                 << "\n   Returned true "
+                 << "  , Expected false " << endl;
+      ++number_of_failures;
+   }
+   if (arraydb->isInteger("nonIntArray")) {
+      tbox::perr << "FAILED: - Test #12c-" << tag
+                 << ": `isInteger'"
+                 << "\n   Returned true "
+                 << "  , Expected false " << endl;
+      ++number_of_failures;
+   }
+   if (arraydb->isString("nonStringArray")) {
+      tbox::perr << "FAILED: - Test #12d-" << tag
+                 << ": `isString'"
+                 << "\n   Returned true "
+                 << "  , Expected false " << endl;
+      ++number_of_failures;
+   }
+   if (arraydb->isFloat("nonFloatArray")) {
+      tbox::perr << "FAILED: - Test #12e-" << tag
+                 << ": `isFloat'"
+                 << "\n   Returned true "
+                 << "  , Expected false " << endl;
+      ++number_of_failures;
+   }
+   if (arraydb->isDouble("nonDoubleArray")) {
+      tbox::perr << "FAILED: - Test #12f-" << tag
+                 << ": `isDouble'"
+                 << "\n   Returned true "
+                 << "  , Expected false " << endl;
+      ++number_of_failures;
+   }
+   if (arraydb->isChar("nonCharArray")) {
+      tbox::perr << "FAILED: - Test #12g-" << tag
+                 << ": `isChar'"
+                 << "\n   Returned true "
+                 << "  , Expected false " << endl;
+      ++number_of_failures;
+   }
+   if (arraydb->isDatabaseBox("nonBoxArray")) {
+      tbox::perr << "FAILED: - Test #12h-" << tag
+                 << ": `isBox'"
+                 << "\n   Returned true "
+                 << "  , Expected false " << endl;
+      ++number_of_failures;
+   }
+   if (db->isDatabase("nonArray Entries")) {
+      tbox::perr << "FAILED: - Test #12i-" << tag
+                 << ": `isDatabase'"
+                 << "\n   Returned true "
+                 << "  , Expected false " << endl;
+      ++number_of_failures;
+   }
+
+#if 0
+
+   /*
+    * Tests for getArrayType
+    */
+   if (arraydb->getArrayType("ComplexArray") != tbox::Database::COMPLEX) {
+      tbox::perr << "FAILED: - Test #13a-" << tag
+                 << ": `getArrayType returned the wrong type" << endl;
+      ++number_of_failures;
+   }
+   if (arraydb->getArrayType("BoolArray") != tbox::Database::BOOL) {
+      tbox::perr << "FAILED: - Test #13b-" << tag
+                 << ": `getArrayType returned the wrong type" << endl;
+      ++number_of_failures;
+   }
+   if (arraydb->getArrayType("IntArray") != tbox::Database::INT) {
+      tbox::perr << "FAILED: - Test #13c-" << tag
+                 << ": `getArrayType returned the wrong type" << endl;
+      ++number_of_failures;
+   }
+   if (arraydb->getArrayType("StringArray") != tbox::Database::STRING) {
+      tbox::perr << "FAILED: - Test #13d-" << tag
+                 << ": `getArrayType returned the wrong type" << endl;
+      ++number_of_failures;
+   }
+   if (arraydb->getArrayType("FloatArray") != tbox::Database::FLOAT) {
+      tbox::perr << "FAILED: - Test #13e-" << tag
+                 << ": `getArrayType returned the wrong type" << endl;
+      ++number_of_failures;
+   }
+   if (arraydb->getArrayType("DoubleArray") != tbox::Database::DOUBLE) {
+      tbox::perr << "FAILED: - Test #13f-" << tag
+                 << ": `getArrayType returned the wrong type" << endl;
+      ++number_of_failures;
+   }
+   if (arraydb->getArrayType("CharArray") != tbox::Database::CHAR) {
+      tbox::perr << "FAILED: - Test #13g-" << tag
+                 << ": `getArrayType returned the wrong type" << endl;
+      ++number_of_failures;
+   }
+   if (arraydb->getArrayType("BoxArray") != tbox::Database::BOX) {
+      tbox::perr << "FAILED: - Test #13h-" << tag
+                 << ": `getArrayType returned the wrong type" << endl;
+      ++number_of_failures;
+   }
+   if (db->getArrayType("Array Entries") != tbox::Database::DATABASE) {
+      tbox::perr << "FAILED: - Test #13i-" << tag
+                 << ": `getArrayType returned the wrong type" << endl;
+      ++number_of_failures;
+   }
+   if (db->getArrayType("NonEntries") != tbox::Database::INVALID) {
+      tbox::perr << "FAILED: - Test #13j-" << tag
+                 << ": `getArrayType returned the wrong type" << endl;
+      ++number_of_failures;
+   }
+
+#endif
+
+   /*
+    * Tests reading scalar with default
+    */
+   dcomplex test_scalar_complex(-9.0, -9.0);
+   tscalardb_full_thisComplex = scalardb_full->getComplexWithDefault(
+         "thisComplex",
+         test_scalar_complex);
+   if (tscalardb_full_thisComplex != scalardb_full_thisComplex) {
+      tbox::perr << "FAILED: - Test #14a-" << tag
+                 << ": `Full' database" << endl
+                 << "   Returned `thisComplex' = "
+                 << tscalardb_full_thisComplex
+                 << "  , Expected = " << scalardb_full_thisComplex << endl;
+      ++number_of_failures;
+   }
+   bool test_scalar_bool(false);
+   tscalardb_full_thisBool = scalardb_full->getBoolWithDefault("thisBool",
+         test_scalar_bool);
+   if (tscalardb_full_thisBool != scalardb_full_thisBool) {
+      tbox::perr << "FAILED: - Test #14b-" << tag
+                 << ": `Full' database" << endl
+                 << "   Returned `thisBool' = " << tscalardb_full_thisBool
+                 << "  , Expected = " << scalardb_full_thisBool << endl;
+      ++number_of_failures;
+   }
+   int test_scalar_int(-9);
+   tscalardb_full_thisInt = scalardb_full->getIntegerWithDefault("thisInt",
+         test_scalar_int);
+   if (tscalardb_full_thisInt != scalardb_full_thisInt) {
+      tbox::perr << "FAILED: - Test #14c-" << tag
+                 << ": `Full' database" << endl
+                 << "   Returned `thisInt' = " << tscalardb_full_thisInt
+                 << "  , Expected = " << scalardb_full_thisInt << endl;
+      ++number_of_failures;
+   }
+   string test_scalar_string("A fake string");
+   tscalardb_full_thisString = scalardb_full->getStringWithDefault("thisString",
+         test_scalar_string);
+   if (tscalardb_full_thisString != scalardb_full_thisString) {
+      tbox::perr << "FAILED: - Test #14d-" << tag
+                 << ": `Full' database" << endl
+                 << "   Returned `thisString' = " << tscalardb_full_thisString
+                 << "  , Expected = " << scalardb_full_thisString << endl;
+      ++number_of_failures;
+   }
+   float test_scalar_float(-9.0);
+   tscalardb_full_thisFloat = scalardb_full->getFloatWithDefault("thisFloat",
+         test_scalar_float);
+   if (!tbox::MathUtilities<float>::equalEps(tscalardb_full_thisFloat,
+          scalardb_full_thisFloat)) {
+      tbox::perr << "FAILED: - Test #14e-" << tag
+                 << ": `Full' database" << endl
+                 << "   Returned `thisFloat' = " << tscalardb_full_thisFloat
+                 << "  , Expected = " << scalardb_full_thisFloat << endl;
+      ++number_of_failures;
+   }
+   double test_scalar_double(-9.0);
+   tscalardb_full_thisDouble = scalardb_full->getDoubleWithDefault("thisDouble",
+         test_scalar_double);
+   if (!tbox::MathUtilities<double>::equalEps(tscalardb_full_thisDouble,
+          scalardb_full_thisDouble)) {
+      tbox::perr << "FAILED: - Test #14f-" << tag
+                 << ": `Full' database" << endl
+                 << "   Returned `thisDouble' = " << tscalardb_full_thisDouble
+                 << "  , Expected = " << scalardb_full_thisDouble << endl;
+      ++number_of_failures;
+   }
+   char test_scalar_char('h');
+   tscalardb_full_thisChar = scalardb_full->getCharWithDefault("thisChar",
+         test_scalar_char);
+   if (tscalardb_full_thisChar != scalardb_full_thisChar) {
+      tbox::perr << "FAILED: - Test #14h-" << tag
+                 << ": `Full' database" << endl
+                 << "   Returned `thisChar' = " << tscalardb_full_thisChar
+                 << "  , Expected = " << scalardb_full_thisChar << endl;
+      ++number_of_failures;
+   }
+
+   tscalardb_full_thisComplex = defaultdb->getComplexWithDefault("bogusComplex",
+         test_scalar_complex);
+   if (tscalardb_full_thisComplex != test_scalar_complex) {
+      tbox::perr << "FAILED: - Test #15a-" << tag
+                 << ": `Full' database" << endl
+                 << "   Returned `thisComplex' = "
+                 << tscalardb_full_thisComplex
+                 << "  , Expected = " << test_scalar_complex << endl;
+      ++number_of_failures;
+   }
+   tscalardb_full_thisBool = defaultdb->getBoolWithDefault("bogusBool",
+         test_scalar_bool);
+   if (tscalardb_full_thisBool != test_scalar_bool) {
+      tbox::perr << "FAILED: - Test #15b-" << tag
+                 << ": `Full' database" << endl
+                 << "   Returned `thisBool' = " << tscalardb_full_thisBool
+                 << "  , Expected = " << test_scalar_bool << endl;
+      ++number_of_failures;
+   }
+
+   tscalardb_full_thisInt = defaultdb->getIntegerWithDefault("bogusInt",
+         test_scalar_int);
+   if (tscalardb_full_thisInt != test_scalar_int) {
+      tbox::perr << "FAILED: - Test #15c-" << tag
+                 << ": `Full' database" << endl
+                 << "   Returned `thisInt' = " << tscalardb_full_thisInt
+                 << "  , Expected = " << test_scalar_int << endl;
+      ++number_of_failures;
+   }
+   tscalardb_full_thisString = defaultdb->getStringWithDefault("bogusString",
+         test_scalar_string);
+   if (tscalardb_full_thisString != test_scalar_string) {
+      tbox::perr << "FAILED: - Test #15d-" << tag
+                 << ": `Full' database" << endl
+                 << "   Returned `thisString' = " << tscalardb_full_thisString
+                 << "  , Expected = " << test_scalar_string << endl;
+      ++number_of_failures;
+   }
+   tscalardb_full_thisFloat = defaultdb->getFloatWithDefault("bogusFloat",
+         test_scalar_float);
+   if (!tbox::MathUtilities<float>::equalEps(tscalardb_full_thisFloat,
+          test_scalar_float)) {
+      tbox::perr << "FAILED: - Test #15e-" << tag
+                 << ": `Full' database" << endl
+                 << "   Returned `thisFloat' = " << tscalardb_full_thisFloat
+                 << "  , Expected = " << test_scalar_float << endl;
+      ++number_of_failures;
+   }
+   tscalardb_full_thisDouble = defaultdb->getDoubleWithDefault("bogusDouble",
+         test_scalar_double);
+   if (!tbox::MathUtilities<double>::equalEps(tscalardb_full_thisDouble,
+          test_scalar_double)) {
+      tbox::perr << "FAILED: - Test #15f-" << tag
+                 << ": `Full' database" << endl
+                 << "   Returned `thisDouble' = " << tscalardb_full_thisDouble
+                 << "  , Expected = " << test_scalar_double << endl;
+      ++number_of_failures;
+   }
+   tscalardb_full_thisChar = defaultdb->getCharWithDefault("bogusChar",
+         test_scalar_char);
+   if (tscalardb_full_thisChar != test_scalar_char) {
+      tbox::perr << "FAILED: - Test #15h-" << tag
+                 << ": `Full' database" << endl
+                 << "   Returned `thisChar' = " << tscalardb_full_thisChar
+                 << "  , Expected = " << test_scalar_char << endl;
+      ++number_of_failures;
+   }
+
+   /*
+    * Tests for reading stl::vector
+    */
+   std::vector<SAMRAI::hier::IntVector> vector_IntVector(2);
+
+   vectordb->getVector("vector_IntVector", vector_IntVector);
+
+   if (vector_IntVector[0] != intVector1) {
+      tbox::perr << "FAILED: - Test #16a-" << tag
+      << ": stl::vector<IntVector> did not restore correctly" << endl
+      << "   Returned `IntVector' = " << vector_IntVector[0]
+      << "  , Expected = " << intVector1 << endl;
+      ++number_of_failures;
+
+   }
+
+   if (vector_IntVector[1] != intVector2) {
+      tbox::perr << "FAILED: - Test #16b-" << tag
+      << ": stl::vector<IntVector> did not restore correctly" << endl
+      << "   Returned `IntVector' = " << vector_IntVector[1]
+      << "  , Expected = " << intVector2 << endl;
+      ++number_of_failures;
+   }
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/restartdb/database_tests.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/restartdb/database_tests.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,56 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Some simple generic database test functions 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/DatabaseBox.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include <string>
+
+using namespace std;
+using namespace SAMRAI;
+
+// Number of (non-abortive) failures.
+extern int number_of_failures;
+
+/**
+ * Write database and test contents.
+ */
+void
+setupTestData(
+   void);
+
+/**
+ * Write database and test contents.
+ */
+void
+writeTestData(
+   tbox::Pointer<tbox::Database> db);
+
+/**
+ * Read database and test contents.
+ */
+void
+readTestData(
+   tbox::Pointer<tbox::Database> db);
+
+/**
+ * Test contents of database.
+ */
+void
+testDatabaseContents(
+   tbox::Pointer<tbox::Database> db,
+   const string& tag);
diff -r 000000000000 -r 5eda1a3f24e8 source/test/restartdb/database_values.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/restartdb/database_values.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Global values for the restart tests 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/hier/IntVector.h"
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/DatabaseBox.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/RestartManager.h"
+
+#include <string>
+
+using namespace std;
+using namespace SAMRAI;
+
+// Number of (non-abortive) failures.
+int number_of_failures = 0;
+
+float db_float_val = (float)3.14159;
+int db_int_val = 4;
+
+dcomplex arraydb_dcomplexArray0 = dcomplex(1, 2);
+dcomplex arraydb_dcomplexArray1 = dcomplex(2, 3);
+dcomplex arraydb_dcomplexArray2 = dcomplex(3, 4);
+bool arraydb_boolArray0 = true;
+bool arraydb_boolArray1 = false;
+bool arraydb_boolArray2 = false;
+int arraydb_intArray0 = 0;
+int arraydb_intArray1 = 1;
+int arraydb_intArray2 = 2;
+int arraydb_intArray3 = 3;
+int arraydb_intArray4 = 4;
+string arraydb_stringArray0 = "This is 1 test.";
+string arraydb_stringArray1 = "This is 2nd test.";
+string arraydb_stringArray2 = "This is a long 3rd test.";
+float arraydb_floatArray0 = 0 * 1.2;
+float arraydb_floatArray1 = (float)(1 * 1.2);
+float arraydb_floatArray2 = (float)(2 * 1.2);
+float arraydb_floatArray3 = (float)(3 * 1.2);
+float arraydb_floatArray4 = (float)(4 * 1.2);
+double arraydb_doubleArray0 = 0 * 1.111111;
+double arraydb_doubleArray1 = 1 * 1.111111;
+double arraydb_doubleArray2 = 2 * 1.111111;
+double arraydb_doubleArray3 = 3 * 1.111111;
+double arraydb_doubleArray4 = 4 * 1.111111;
+double arraydb_doubleArray5 = 5 * 1.111111;
+char arraydb_charArray0 = 'a';
+char arraydb_charArray1 = 'b';
+tbox::DatabaseBox arraydb_boxArray0;
+tbox::DatabaseBox arraydb_boxArray1;
+tbox::DatabaseBox arraydb_boxArray2;
+
+float scalardb_float1 = (float)1.111;
+float scalardb_float2 = (float)2.222;
+float scalardb_float3 = (float)3.333;
+double scalardb_full_thisDouble = 123.456;
+dcomplex scalardb_full_thisComplex = dcomplex(2.3, 4.5);
+int scalardb_full_thisInt = 89;
+float scalardb_full_thisFloat = (float)9.9;
+bool scalardb_full_thisBool = true;
+string scalardb_full_thisString = "This is a test.";
+char scalardb_full_thisChar = 'q';
+int ilo[3] = { 0, 0, 0 };
+int ihi[3] = { 1, 1, 1 };
+tbox::DatabaseBox scalardb_full_thisBox(tbox::Dimension(3), ilo, ihi);
+
+SAMRAI::hier::IntVector intVector1(tbox::Dimension(2), 1);
+SAMRAI::hier::IntVector intVector2(tbox::Dimension(2), 1);
diff -r 000000000000 -r 5eda1a3f24e8 source/test/restartdb/mainHDF5.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/restartdb/mainHDF5.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Tests HDF database in SAMRAI 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/DatabaseBox.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/HDFDatabase.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include <string>
+
+using namespace std;
+using namespace SAMRAI;
+
+#include "database_tests.h"
+
+class RestartTester:public tbox::Serializable
+{
+public:
+   RestartTester()
+   {
+      tbox::RestartManager::getManager()->registerRestartItem("RestartTester",
+         this);
+   }
+
+   virtual ~RestartTester() {
+   }
+
+   void putToDatabase(
+      tbox::Pointer<tbox::Database> db)
+   {
+      writeTestData(db);
+   }
+
+   void getFromDatabase()
+   {
+      tbox::Pointer<tbox::Database> root_db =
+         tbox::RestartManager::getManager()->getRootDatabase();
+
+      tbox::Pointer<tbox::Database> db;
+      if (root_db->isDatabase("RestartTester")) {
+         db = root_db->getDatabase("RestartTester");
+      }
+
+      readTestData(db);
+   }
+
+};
+
+int main(
+   int argc,
+   char* argv[])
+{
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+
+      tbox::PIO::logAllNodes("HDF5test.log");
+
+#ifdef HAVE_HDF5
+
+      tbox::plog << "\n--- HDF5 database tests BEGIN ---" << endl;
+
+      tbox::RestartManager* restart_manager = tbox::RestartManager::getManager();
+
+      RestartTester hdf_tester;
+
+      tbox::plog << "\n--- HDF5 write database tests BEGIN ---" << endl;
+
+      setupTestData();
+
+      restart_manager->writeRestartFile("test_dir", 0);
+
+      tbox::plog << "\n--- HDF5 write database tests END ---" << endl;
+
+      tbox::plog << "\n--- HDF5 read database tests BEGIN ---" << endl;
+
+      restart_manager->closeRestartFile();
+
+      restart_manager->openRestartFile("test_dir",
+         0,
+         mpi.getSize());
+
+      hdf_tester.getFromDatabase();
+
+      restart_manager->closeRestartFile();
+
+      tbox::plog << "\n--- HDF5 read database tests END ---" << endl;
+
+      tbox::plog << "\n--- HDF5 database tests END ---" << endl;
+
+#endif
+
+      if (number_of_failures == 0) {
+         tbox::pout << "\nPASSED:  HDF5" << endl;
+      }
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return number_of_failures;
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/restartdb/mainHDF5AppFileOpen.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/restartdb/mainHDF5AppFileOpen.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,160 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Tests HDF database in SAMRAI 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/DatabaseBox.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/HDFDatabase.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include <string>
+
+using namespace std;
+using namespace SAMRAI;
+
+#include "database_tests.h"
+
+class RestartTester:public tbox::Serializable
+{
+public:
+   RestartTester()
+   {
+      tbox::RestartManager::getManager()->registerRestartItem("RestartTester",
+         this);
+   }
+
+   virtual ~RestartTester() {
+   }
+
+   void putToDatabase(
+      tbox::Pointer<tbox::Database> db)
+   {
+      writeTestData(db);
+   }
+
+   void getFromDatabase()
+   {
+      tbox::Pointer<tbox::Database> root_db =
+         tbox::RestartManager::getManager()->getRootDatabase();
+
+      tbox::Pointer<tbox::Database> db;
+      if (root_db->isDatabase("RestartTester")) {
+         db = root_db->getDatabase("RestartTester");
+      }
+
+      readTestData(db);
+   }
+
+};
+
+int main(
+   int argc,
+   char* argv[])
+{
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+
+      tbox::PIO::logAllNodes("HDF5test.log");
+
+#ifdef HAVE_HDF5
+
+      tbox::plog << "\n--- HDF5 database tests BEGIN ---" << endl;
+
+      tbox::RestartManager* restart_manager = tbox::RestartManager::getManager();
+
+      RestartTester hdf_tester;
+
+      tbox::plog << "\n--- HDF5 write database tests BEGIN ---" << endl;
+
+      setupTestData();
+
+      tbox::Pointer<tbox::HDFDatabase> database(new tbox::HDFDatabase(
+                                                   "SAMRAI Restart"));
+      std::string name = "./restart." + tbox::Utilities::processorToString(
+            mpi.getRank()) + ".hdf5";
+      hid_t file_id = H5Fcreate(name.c_str(), H5F_ACC_TRUNC,
+            H5P_DEFAULT, H5P_DEFAULT);
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      hid_t hdf_group = H5Gcreate(file_id,
+            "SAMRAIGroup",
+            0,
+            H5P_DEFAULT,
+            H5P_DEFAULT);
+#else
+      hid_t hdf_group = H5Gcreate(file_id, "SAMRAIGroup", 0);
+#endif
+      database->attachToFile(hdf_group);
+
+      restart_manager->setRootDatabase(database);
+
+      restart_manager->writeRestartToDatabase();
+
+      tbox::plog << "\n--- HDF5 write database tests END ---" << endl;
+
+      tbox::plog << "\n--- HDF5 read database tests BEGIN ---" << endl;
+
+      database->close();
+
+      restart_manager->setRootDatabase(tbox::Pointer<SAMRAI::tbox::Database>(
+            NULL));
+
+      H5Fclose(file_id);
+
+      database = new tbox::HDFDatabase("SAMRAI Restart");
+      file_id = H5Fopen(name.c_str(), H5F_ACC_RDWR, H5P_DEFAULT);
+#if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR > 6))
+      hdf_group = H5Gopen(file_id, "SAMRAIGroup", H5P_DEFAULT);
+#else
+      hdf_group = H5Gopen(file_id, "SAMRAIGroup");
+#endif
+      database->attachToFile(hdf_group);
+
+      restart_manager->setRootDatabase(database);
+
+      hdf_tester.getFromDatabase();
+
+      database->close();
+
+      restart_manager->setRootDatabase(tbox::Pointer<SAMRAI::tbox::Database>(
+            NULL));
+
+      H5Fclose(file_id);
+
+      tbox::plog << "\n--- HDF5 read database tests END ---" << endl;
+
+      tbox::plog << "\n--- HDF5 database tests END ---" << endl;
+
+#endif
+
+      if (number_of_failures == 0) {
+         tbox::pout << "\nPASSED:  HDF5" << endl;
+      }
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return number_of_failures;
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/restartdb/mainMemory.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/restartdb/mainMemory.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Tests Memory database in SAMRAI 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/DatabaseBox.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/MemoryDatabase.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include <string>
+
+using namespace std;
+using namespace SAMRAI;
+
+#include "database_tests.h"
+
+class RestartTester:public tbox::Serializable
+{
+public:
+   RestartTester()
+   {
+      tbox::RestartManager::getManager()->registerRestartItem("RestartTester",
+         this);
+   }
+
+   virtual ~RestartTester() {
+   }
+
+   void putToDatabase(
+      tbox::Pointer<tbox::Database> db)
+   {
+      writeTestData(db);
+   }
+
+   void getFromDatabase()
+   {
+      tbox::Pointer<tbox::Database> root_db =
+         tbox::RestartManager::getManager()->getRootDatabase();
+
+      tbox::Pointer<tbox::Database> db;
+      if (root_db->isDatabase("RestartTester")) {
+         db = root_db->getDatabase("RestartTester");
+      }
+
+      readTestData(db);
+   }
+
+};
+
+int main(
+   int argc,
+   char* argv[])
+{
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+
+      tbox::PIO::logAllNodes("Memorytest.log");
+
+      tbox::plog << "\n--- Memory database tests BEGIN ---" << endl;
+
+      tbox::RestartManager* restart_manager = tbox::RestartManager::getManager();
+
+      RestartTester memory_tester;
+
+      tbox::plog << "\n--- Memory write database tests BEGIN ---" << endl;
+
+      setupTestData();
+
+      tbox::Pointer<tbox::MemoryDatabase> database(new tbox::MemoryDatabase(
+                                                      "SAMRAI Restart"));
+
+      restart_manager->setRootDatabase(database);
+
+      restart_manager->writeRestartToDatabase();
+
+      tbox::plog << "\n--- Memory write database tests END ---" << endl;
+
+      tbox::plog << "\n--- Memory read database tests BEGIN ---" << endl;
+
+      // In this test just read the database stored in memory that
+      // was just created.
+      memory_tester.getFromDatabase();
+
+      database->close();
+
+      tbox::plog << "\n--- Memory read database tests END ---" << endl;
+
+      tbox::plog << "\n--- Memory database tests END ---" << endl;
+
+      if (number_of_failures == 0) {
+         tbox::pout << "\nPASSED:  Memory" << endl;
+      }
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return number_of_failures;
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/restartdb/mainSilo.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/restartdb/mainSilo.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,137 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Tests Silo database in SAMRAI 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/DatabaseBox.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/SiloDatabase.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include <string>
+
+using namespace std;
+using namespace SAMRAI;
+
+#include "database_tests.h"
+
+class RestartTester:public tbox::Serializable
+{
+public:
+   RestartTester()
+   {
+      tbox::RestartManager::getManager()->registerRestartItem("RestartTester",
+         this);
+   }
+
+   virtual ~RestartTester() {
+   }
+
+   void putToDatabase(
+      tbox::Pointer<tbox::Database> db)
+   {
+      writeTestData(db);
+   }
+
+   void getFromDatabase()
+   {
+      tbox::Pointer<tbox::Database> root_db =
+         tbox::RestartManager::getManager()->getRootDatabase();
+
+      tbox::Pointer<tbox::Database> db;
+      if (root_db->isDatabase("RestartTester")) {
+         db = root_db->getDatabase("RestartTester");
+      }
+
+      readTestData(db);
+   }
+
+};
+
+int main(
+   int argc,
+   char* argv[])
+{
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+      const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+      tbox::PIO::logAllNodes("Silotest.log");
+
+#ifdef HAVE_SILO
+
+      tbox::plog << "\n--- Silo database tests BEGIN ---" << endl;
+
+      tbox::RestartManager* restart_manager = tbox::RestartManager::getManager();
+
+      RestartTester silo_tester;
+
+      tbox::plog << "\n--- Silo write database tests BEGIN ---" << endl;
+
+      setupTestData();
+
+      tbox::Pointer<tbox::SiloDatabase> database(new tbox::SiloDatabase(
+                                                    "SAMRAI Restart"));
+
+      database->create("./restart."
+         + tbox::Utilities::processorToString(
+            mpi.getRank()) + ".silo");
+
+      restart_manager->setRootDatabase(database);
+
+      restart_manager->writeRestartToDatabase();
+
+      database->close();
+
+      tbox::plog << "\n--- Silo write database tests END ---" << endl;
+
+      tbox::plog << "\n--- Silo read database tests BEGIN ---" << endl;
+
+      database = new tbox::SiloDatabase("SAMRAI Restart");
+
+      database->open("./restart."
+         + tbox::Utilities::processorToString(
+            mpi.getRank()) + ".silo");
+
+      restart_manager->setRootDatabase(database);
+
+      silo_tester.getFromDatabase();
+
+      database->close();
+
+      tbox::plog << "\n--- Silo read database tests END ---" << endl;
+
+      tbox::plog << "\n--- Silo database tests END ---" << endl;
+
+#endif
+
+      if (number_of_failures == 0) {
+         tbox::pout << "\nPASSED:  Silo" << endl;
+      }
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return number_of_failures;
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/restartdb/mainSiloAppFileOpen.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/restartdb/mainSiloAppFileOpen.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,144 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Tests Silo database in SAMRAI 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/DatabaseBox.h"
+#include "SAMRAI/tbox/Complex.h"
+#include "SAMRAI/tbox/SiloDatabase.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include <string>
+
+using namespace std;
+using namespace SAMRAI;
+
+#include "database_tests.h"
+
+class RestartTester:public tbox::Serializable
+{
+public:
+   RestartTester()
+   {
+      tbox::RestartManager::getManager()->registerRestartItem("RestartTester",
+         this);
+   }
+
+   virtual ~RestartTester() {
+   }
+
+   void putToDatabase(
+      tbox::Pointer<tbox::Database> db)
+   {
+      writeTestData(db);
+   }
+
+   void getFromDatabase()
+   {
+      tbox::Pointer<tbox::Database> root_db =
+         tbox::RestartManager::getManager()->getRootDatabase();
+
+      tbox::Pointer<tbox::Database> db;
+      if (root_db->isDatabase("RestartTester")) {
+         db = root_db->getDatabase("RestartTester");
+      }
+
+      readTestData(db);
+   }
+
+};
+
+int main(
+   int argc,
+   char* argv[])
+{
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+      const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+      tbox::PIO::logAllNodes("Silotest.log");
+
+#ifdef HAVE_SILO
+
+      tbox::plog << "\n--- Silo database tests BEGIN ---" << endl;
+
+      tbox::RestartManager* restart_manager = tbox::RestartManager::getManager();
+
+      RestartTester silo_tester;
+
+      tbox::plog << "\n--- Silo write database tests BEGIN ---" << endl;
+
+      setupTestData();
+
+      tbox::Pointer<tbox::SiloDatabase> database(new tbox::SiloDatabase(
+                                                    "SAMRAI Restart"));
+      std::string name = "./restart." + tbox::Utilities::processorToString(
+            mpi.getRank()) + ".silo";
+      DBfile* silo_file = DBCreate(
+            name.c_str(), DB_CLOBBER, DB_LOCAL, NULL, DB_PDB);
+      database->attachToFile(silo_file, "/");
+
+      restart_manager->setRootDatabase(database);
+
+      restart_manager->writeRestartToDatabase();
+
+      database->close();
+      restart_manager->setRootDatabase(tbox::Pointer<SAMRAI::tbox::Database>(
+            NULL));
+
+      DBClose(silo_file);
+
+      tbox::plog << "\n--- Silo write database tests END ---" << endl;
+
+      tbox::plog << "\n--- Silo read database tests BEGIN ---" << endl;
+
+      database = new tbox::SiloDatabase("SAMRAI Restart");
+      silo_file = DBOpen(name.c_str(), DB_UNKNOWN, DB_READ);
+      database->attachToFile(silo_file, "/");
+
+      restart_manager->setRootDatabase(database);
+
+      silo_tester.getFromDatabase();
+
+      database->close();
+      restart_manager->setRootDatabase(tbox::Pointer<SAMRAI::tbox::Database>(
+            NULL));
+
+      DBClose(silo_file);
+
+      tbox::plog << "\n--- Silo read database tests END ---" << endl;
+
+      tbox::plog << "\n--- Silo database tests END ---" << endl;
+
+#endif
+
+      if (number_of_failures == 0) {
+         tbox::pout << "\nPASSED:  Silo" << endl;
+      }
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return number_of_failures;
+
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/samrai_mpi/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/samrai_mpi/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,141 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=main-runtime-disabled.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h main-runtime-disabled.C	\
+	mpi-interface-tests.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=main-runtime-off.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h main-runtime-off.C	\
+	mpi-interface-tests.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=main-runtime-on.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h main-runtime-on.C	\
+	mpi-interface-tests.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=mpi-interface-tests.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h mpi-interface-tests.C	\
+	mpi-interface-tests.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/samrai_mpi/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/samrai_mpi/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,70 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for the SAMRAI_MPI communication class tests 
+##
+#########################################################################
+
+SAMRAI	      =	@top_srcdir@
+SRCDIR	      =	@srcdir@
+SUBDIR        = source/test/samrai_mpi
+VPATH	      =	@srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+CPPFLAGS_EXTRA =  -DTESTING=1
+
+default: check
+
+include $(OBJECT)/config/Makefile.config
+
+NUM_TESTS = 3
+
+#TEST_NPROCS = @TEST_NPROCS@
+ifeq (${CONFIGURED_WITH_MPI},yes)
+TEST_NPROCS = 0,1
+else
+TEST_NPROCS = 0
+endif
+
+CXX_OBJS = mpi-interface-tests.o
+
+main-runtime-on:	main-runtime-on.o $(CXX_OBJS) $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) main-runtime-on.o $(CXX_OBJS)	\
+	$(LIBSAMRAI) $(LDLIBS) -o $@
+
+main-runtime-off:	main-runtime-off.o $(CXX_OBJS) $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) main-runtime-off.o $(CXX_OBJS)	\
+	$(LIBSAMRAI) $(LDLIBS) -o $@
+
+main-runtime-disabled:	main-runtime-disabled.o $(CXX_OBJS) $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) main-runtime-off.o $(CXX_OBJS)	\
+	$(LIBSAMRAI) $(LDLIBS) -o $@
+
+check:		checkcompile
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main-runtime-on
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main-runtime-off
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main-runtime-disabled
+
+check2d:
+	$(MAKE) check
+
+check3d:
+	$(MAKE) check
+
+checkcompile: main-runtime-on main-runtime-off main-runtime-disabled
+
+checktest:      checkcompile
+	rm -f makecheck.logfile
+	$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+	$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+	rm -f makecheck.logfile
+
+clean:
+	$(SAMCLEAN)
+	$(RM) main-runtime-on main-runtime-off main-runtime-disabled
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/test/samrai_mpi/main-runtime-disabled.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/samrai_mpi/main-runtime-disabled.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,40 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Test program for SAMRAI_MPI with run-time MPI disabled. 
+ *
+ ************************************************************************/
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "mpi-interface-tests.h"
+
+using namespace SAMRAI;
+using namespace tbox;
+
+/*
+ ************************************************************************
+ * Test run-time MPI mode off.
+ ************************************************************************
+ */
+
+int main(
+   int argc,
+   char* argv[])
+{
+   int fail_count = 0;
+
+   bool runtime_mpi = true;
+   bool disable_mpi = true;
+   mpiInterfaceTests(argc, argv, fail_count, runtime_mpi, disable_mpi);
+
+   if (fail_count == 0) {
+      tbox::pout << "\nPASSED:  " << argv[0] << std::endl;
+   }
+
+   return fail_count;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/samrai_mpi/main-runtime-off.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/samrai_mpi/main-runtime-off.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,40 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Test program for SAMRAI_MPI with run-time MPI off. 
+ *
+ ************************************************************************/
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "mpi-interface-tests.h"
+
+using namespace SAMRAI;
+using namespace tbox;
+
+/*
+ ************************************************************************
+ * Test run-time MPI mode off.
+ ************************************************************************
+ */
+
+int main(
+   int argc,
+   char* argv[])
+{
+   int fail_count = 0;
+
+   bool runtime_mpi = false;
+   bool disable_mpi = false;
+   mpiInterfaceTests(argc, argv, fail_count, runtime_mpi, disable_mpi);
+
+   if (fail_count == 0) {
+      tbox::pout << "\nPASSED:  " << argv[0] << std::endl;
+   }
+
+   return fail_count;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/samrai_mpi/main-runtime-on.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/samrai_mpi/main-runtime-on.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Test program for SAMRAI_MPI with run-time MPI on. 
+ *
+ ************************************************************************/
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "mpi-interface-tests.h"
+
+using namespace SAMRAI;
+using namespace tbox;
+
+/*
+ ************************************************************************
+ * Test run-time MPI mode on.
+ ************************************************************************
+ */
+
+int main(
+   int argc,
+   char* argv[])
+{
+   int fail_count = 0;
+
+   bool runtime_mpi = true;
+   bool disable_mpi = false;
+   mpiInterfaceTests(argc, argv, fail_count, runtime_mpi, disable_mpi);
+
+   if (fail_count == 0) {
+      if (tbox::SAMRAI_MPI::usingMPI()) {
+         tbox::pout << "\nPASSED:  " << argv[0] << std::endl;
+      } else {
+         std::cout << "\nPASSED:  " << argv[0] << std::endl;
+      }
+   }
+
+   return fail_count;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/samrai_mpi/mpi-interface-tests.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/samrai_mpi/mpi-interface-tests.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,97 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   $Description 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "mpi-interface-tests.h"
+
+using namespace SAMRAI;
+using namespace SAMRAI::tbox;
+
+/*
+ * Start up MPI, SAMRAI and run various test of the SAMRAI_MPI interfaces.
+ */
+void mpiInterfaceTests(
+   int& argc,
+   char **& argv,
+   int& fail_count,
+   bool runtime_mpi,
+   bool mpi_disabled)
+{
+   (void)runtime_mpi;
+
+#ifndef HAVE_MPI
+   if (runtime_mpi) {
+      // Run-time MPI test is only for configuring with MPI.
+      return;
+   }
+#endif
+   if (mpi_disabled) {
+      tbox::SAMRAI_MPI::initMPIDisabled();
+   } else {
+      tbox::SAMRAI_MPI::init(&argc, &argv);
+   }
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   mpiInterfaceTestBcast(fail_count);
+
+   mpiInterfaceTestAllreduce(fail_count);
+
+   SAMRAIManager::shutdown();
+   SAMRAIManager::finalize();
+   SAMRAI_MPI::finalize();
+}
+
+/*
+ * Broadcast test: broadcast the rank from bcast_root.
+ */
+int mpiInterfaceTestBcast(
+   int& fail_count)
+{
+   SAMRAI_MPI mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   int rank = mpi.getRank();
+   int nproc = mpi.getSize();
+
+   if (nproc != 1) {
+      int bcast_root = 0;
+      int bcast_data = rank;
+      mpi.Bcast(&bcast_data, 1, MPI_INT, bcast_root);
+      if (bcast_data != bcast_root) {
+         perr << "Broadcast test failed." << std::endl;
+         ++fail_count;
+         return 1;
+      }
+   }
+   return 0;
+}
+
+/*
+ * Sum all-reduce test: sum number of processes.
+ */
+int mpiInterfaceTestAllreduce(
+   int& fail_count)
+{
+   SAMRAI_MPI mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+   int nproc = mpi.getSize();
+
+   if (nproc != 1) {
+      int one = 1;
+      int sum = -1;
+      mpi.Allreduce(&one, &sum, 1, MPI_INT, MPI_SUM);
+      if (sum != nproc) {
+         perr << "Allreduce test failed." << std::endl;
+         ++fail_count;
+         return 1;
+      }
+   }
+   return 0;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/samrai_mpi/mpi-interface-tests.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/samrai_mpi/mpi-interface-tests.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,45 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright
+ * information, see COPYRIGHT and COPYING.LESSER.
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Test multiple SAMRAI interfaces.
+ *
+ ************************************************************************/
+
+/*!
+ * @brief Test multiple SAMRAI_MPI interfaces for a given runtime_mpi mode.
+ *
+ * @param fail_count Increment this count by number of failures.
+ * @param runtime_mpi Whether to use run-time MPI.
+ */
+void
+mpiInterfaceTests(
+   int& argc,
+   char **& argv,
+   int& fail_count,
+   bool runtime_mpi,
+   bool mpi_disabled);
+
+/*!
+ * @brief Test SAMRAI_MPI::Bcast.
+ *
+ * @param fail_count Increment this count by number of failures.
+ *
+ * @return number of failures found.
+ */
+int
+mpiInterfaceTestBcast(
+   int& fail_count);
+
+/*!
+ * @brief Test SAMRAI_MPI::Allreduce.
+ *
+ * @param fail_count Increment this count by number of failures.
+ *
+ * @return number of failures found.
+ */
+int
+mpiInterfaceTestAllreduce(
+   int& fail_count);
diff -r 000000000000 -r 5eda1a3f24e8 source/test/sundials/CVODEModel.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/sundials/CVODEModel.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1585 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:    
+ *
+ ************************************************************************/
+
+#include "CVODEModel.h"
+
+#if defined(HAVE_SUNDIALS) && defined(HAVE_HYPRE)
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/BoundaryBox.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/CellIterator.h"
+#include "SAMRAI/xfer/CoarsenAlgorithm.h"
+#include "SAMRAI/xfer/CoarsenOperator.h"
+#include "SAMRAI/xfer/CoarsenSchedule.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/math/HierarchyDataOpsReal.h"
+#include "SAMRAI/math/HierarchyCellDataOpsReal.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/math/PatchCellDataOpsReal.h"
+#include "SAMRAI/pdat/OuterfaceData.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/xfer/RefineOperator.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/solv/SAMRAIVectorReal.h"
+#include "SAMRAI/pdat/SideData.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+//integer constants for boundary conditions
+#include "SAMRAI/appu/CartesianBoundaryDefines.h"
+
+//integer constant for debugging improperly set boundary dat
+#define BOGUS_BDRY_DATA (-9999)
+
+// routines for managing boundary data
+#include "SAMRAI/appu/CartesianBoundaryUtilities2.h"
+
+#include "SAMRAI/appu/CartesianBoundaryUtilities3.h"
+
+// Define class version number
+#define CVODE_MODEL_VERSION (1)
+
+// This is used in the cell tagging routine.
+#ifndef TRUE
+#define TRUE (1)
+#endif
+#ifndef FALSE
+#define FALSE (0)
+#endif
+
+extern "C" {
+void F77_FUNC(comprhs2d, COMPRHS2D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const double *,
+   const double *,
+   const double *, const double *,
+   double *);
+#ifdef USE_FAC_PRECONDITIONER
+void F77_FUNC(setneufluxvalues2d, SETNEUFLUXVALUES2D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *,
+   int *, int *, int *, int *,
+   double *, double *, double *, double *);
+#endif
+void F77_FUNC(comprhs3d, COMPRHS3D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &, const int &,
+   const double *,
+   const double *,
+   const double *, const double *, const double *,
+   double *);
+#ifdef USE_FAC_PRECONDITIONER
+void F77_FUNC(setneufluxvalues3d, SETNEUFLUXVALUES3D) (
+   const int &, const int &,
+   const int &, const int &,
+   const int &, const int &,
+   const int *, const double *,
+   int *, int *, int *, int *, int *, int *,
+   double *, double *, double *, double *, double *, double *);
+#endif
+}
+
+/*************************************************************************
+ *
+ * Constructor and Destructor for CVODEModel class.
+ *
+ ************************************************************************/
+
+CVODEModel::CVODEModel(
+   const string& object_name,
+   const tbox::Dimension& dim,
+   Pointer<Database> input_db,
+   Pointer<CartesianGridGeometry> grid_geom):
+   RefinePatchStrategy(dim),
+   CoarsenPatchStrategy(dim),
+   d_dim(dim),
+   d_FAC_solver(dim, object_name + ":FAC solver")
+{
+
+   d_object_name = object_name;
+
+   d_grid_geometry = grid_geom;
+
+   /*
+    * set up variables and contexts
+    */
+   VariableDatabase* variable_db = VariableDatabase::getDatabase();
+
+   d_soln_var = new CellVariable<double>(d_dim, "soln", 1);
+
+   d_cur_cxt = variable_db->getContext("CURRENT");
+   d_scr_cxt = variable_db->getContext("SCRATCH");
+
+   d_soln_cur_id = variable_db->registerVariableAndContext(d_soln_var,
+         d_cur_cxt,
+         IntVector(d_dim, 0));
+   d_soln_scr_id = variable_db->registerVariableAndContext(d_soln_var,
+         d_scr_cxt,
+         IntVector(d_dim, 1));
+#ifdef USE_FAC_PRECONDITIONER
+   d_diff_var = new SideVariable<double>(d_dim, "diffusion", 1);
+
+   d_diff_id = variable_db->registerVariableAndContext(d_diff_var,
+         d_cur_cxt,
+         IntVector(d_dim, 0));
+
+   /*
+    * Set default values for preconditioner.
+    */
+   d_max_fac_its = 1;
+   d_fac_tol = 1.0e-40;
+   d_max_hypre_its = 1;
+   d_hypre_tol = 1.0e-40;
+   d_use_neumann_bcs = false;
+
+   d_current_soln_time = 0.;
+
+#endif
+
+   /*
+    * Print solver data.
+    */
+   d_print_solver_info = false;
+
+   /*
+    * Counters.
+    */
+   d_number_rhs_eval = 0;
+   d_number_precond_setup = 0;
+   d_number_precond_solve = 0;
+
+   /*
+    * Boundary condition initialization.
+    */
+   if (d_dim == tbox::Dimension(2)) {
+      d_scalar_bdry_edge_conds.resizeArray(NUM_2D_EDGES);
+      for (int ei = 0; ei < NUM_2D_EDGES; ei++) {
+         d_scalar_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+      }
+
+      d_scalar_bdry_node_conds.resizeArray(NUM_2D_NODES);
+      d_node_bdry_edge.resizeArray(NUM_2D_NODES);
+
+      for (int ni = 0; ni < NUM_2D_NODES; ni++) {
+         d_scalar_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+         d_node_bdry_edge[ni] = BOGUS_BDRY_DATA;
+      }
+
+      d_bdry_edge_val.resizeArray(NUM_2D_EDGES);
+      tbox::MathUtilities<double>::setArrayToSignalingNaN(d_bdry_edge_val);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      d_scalar_bdry_face_conds.resizeArray(NUM_3D_FACES);
+      for (int fi = 0; fi < NUM_3D_FACES; fi++) {
+         d_scalar_bdry_face_conds[fi] = BOGUS_BDRY_DATA;
+      }
+
+      d_scalar_bdry_edge_conds.resizeArray(NUM_3D_EDGES);
+      d_edge_bdry_face.resizeArray(NUM_3D_EDGES);
+      for (int ei = 0; ei < NUM_3D_EDGES; ei++) {
+         d_scalar_bdry_edge_conds[ei] = BOGUS_BDRY_DATA;
+         d_edge_bdry_face[ei] = BOGUS_BDRY_DATA;
+      }
+
+      d_scalar_bdry_node_conds.resizeArray(NUM_3D_NODES);
+      d_node_bdry_face.resizeArray(NUM_3D_NODES);
+
+      for (int ni = 0; ni < NUM_3D_NODES; ni++) {
+         d_scalar_bdry_node_conds[ni] = BOGUS_BDRY_DATA;
+         d_node_bdry_face[ni] = BOGUS_BDRY_DATA;
+      }
+
+      d_bdry_face_val.resizeArray(NUM_3D_FACES);
+      tbox::MathUtilities<double>::setArrayToSignalingNaN(d_bdry_face_val);
+   }
+
+   /*
+    * Initialize object with data read from given input/restart databases.
+    */
+   bool is_from_restart = RestartManager::getManager()->isFromRestart();
+   if (is_from_restart) {
+      getFromRestart();
+   }
+   getFromInput(input_db, is_from_restart);
+
+#ifdef USE_FAC_PRECONDITIONER
+   /*
+    * Construct outerface variable to hold boundary flags and Neumann fluxes.
+    */
+   if (d_use_neumann_bcs) {
+      d_flag_var = new OuterfaceVariable<int>(d_dim, "bdryflag", 1);
+      d_flag_id = variable_db->registerVariableAndContext(d_flag_var,
+            d_cur_cxt,
+            IntVector(d_dim, 0));
+      d_neuf_var = new OuterfaceVariable<double>(d_dim, "neuflux", 1);
+      d_neuf_id = variable_db->registerVariableAndContext(d_neuf_var,
+            d_cur_cxt,
+            IntVector(d_dim, 0));
+   } else {
+      d_flag_id = -1;
+      d_neuf_id = -1;
+   }
+
+   /*
+    * Set boundary types for FAC preconditioner.
+    *  bdry_types holds a flag where 0 = dirichlet, 1 = neumann
+    */
+   if (d_dim == tbox::Dimension(2)) {
+      for (int i = 0; i < NUM_2D_EDGES; i++) {
+         d_bdry_types[i] = 0;
+         if (d_scalar_bdry_edge_conds[i] == DIRICHLET_BC) d_bdry_types[i] = 0;
+         if (d_scalar_bdry_edge_conds[i] == NEUMANN_BC) d_bdry_types[i] = 1;
+      }
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      for (int i = 0; i < NUM_3D_FACES; i++) {
+         d_bdry_types[i] = 0;
+         if (d_scalar_bdry_face_conds[i] == DIRICHLET_BC) d_bdry_types[i] = 0;
+         if (d_scalar_bdry_face_conds[i] == NEUMANN_BC) d_bdry_types[i] = 1;
+      }
+   }
+#endif
+
+   /*
+    * Postprocess boundary data from input/restart values.  Note: scalar
+    * quantity in this problem cannot have reflective boundary conditions
+    * so we reset them to FLOW.
+    */
+   if (d_dim == tbox::Dimension(2)) {
+      for (int i = 0; i < NUM_2D_EDGES; i++) {
+         if (d_scalar_bdry_edge_conds[i] == REFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = FLOW_BC;
+         }
+      }
+
+      for (int i = 0; i < NUM_2D_NODES; i++) {
+         if (d_scalar_bdry_node_conds[i] == XREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = XFLOW_BC;
+         }
+         if (d_scalar_bdry_node_conds[i] == YREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = YFLOW_BC;
+         }
+
+         if (d_scalar_bdry_node_conds[i] != BOGUS_BDRY_DATA) {
+            d_node_bdry_edge[i] =
+               CartesianBoundaryUtilities2::getEdgeLocationForNodeBdry(
+                  i, d_scalar_bdry_node_conds[i]);
+         }
+      }
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      for (int i = 0; i < NUM_3D_FACES; i++) {
+         if (d_scalar_bdry_face_conds[i] == REFLECT_BC) {
+            d_scalar_bdry_face_conds[i] = FLOW_BC;
+         }
+      }
+
+      for (int i = 0; i < NUM_3D_EDGES; i++) {
+         if (d_scalar_bdry_edge_conds[i] == XREFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = XFLOW_BC;
+         }
+         if (d_scalar_bdry_edge_conds[i] == YREFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = YFLOW_BC;
+         }
+         if (d_scalar_bdry_edge_conds[i] == ZREFLECT_BC) {
+            d_scalar_bdry_edge_conds[i] = ZFLOW_BC;
+         }
+
+         if (d_scalar_bdry_edge_conds[i] != BOGUS_BDRY_DATA) {
+            d_edge_bdry_face[i] =
+               CartesianBoundaryUtilities3::getFaceLocationForEdgeBdry(
+                  i, d_scalar_bdry_edge_conds[i]);
+         }
+      }
+
+      for (int i = 0; i < NUM_3D_NODES; i++) {
+         if (d_scalar_bdry_node_conds[i] == XREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = XFLOW_BC;
+         }
+         if (d_scalar_bdry_node_conds[i] == YREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = YFLOW_BC;
+         }
+         if (d_scalar_bdry_node_conds[i] == ZREFLECT_BC) {
+            d_scalar_bdry_node_conds[i] = ZFLOW_BC;
+         }
+
+         if (d_scalar_bdry_node_conds[i] != BOGUS_BDRY_DATA) {
+            d_node_bdry_face[i] =
+               CartesianBoundaryUtilities3::getFaceLocationForNodeBdry(
+                  i, d_scalar_bdry_node_conds[i]);
+         }
+      }
+
+   }
+
+}
+
+CVODEModel::~CVODEModel()
+{
+   Pointer<SAMRAIVectorReal<double> > soln_samvect =
+      Sundials_SAMRAIVector::getSAMRAIVector(d_solution_vector);
+   Sundials_SAMRAIVector::destroySundialsVector(d_solution_vector);
+
+   soln_samvect->freeVectorComponents();
+   soln_samvect.setNull();
+
+   // if (d_level_solver_allocated) delete d_level_solver;
+   // d_level_solver_allocated = false;
+   // if (d_FAC_solver_allocated) delete d_FAC_solver;
+   // d_FAC_solver_allocated = false;
+
+}
+
+/*************************************************************************
+ *
+ * Methods inherited from mesh::StandardTagAndInitStrategy.
+ *
+ ************************************************************************/
+
+void
+CVODEModel::initializeLevelData(
+   const Pointer<BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const double time,
+   const bool can_be_refined,
+   const bool initial_time,
+   const Pointer<BasePatchLevel> old_level,
+   const bool allocate_data)
+{
+   (void)hierarchy;
+   (void)level_number;
+   (void)time;
+   (void)can_be_refined;
+   (void)initial_time;
+   (void)time;
+   (void)old_level;
+   (void)allocate_data;
+
+   // This method is empty because initialization is taken care of
+   // by the setInitialConditions() method below.  If there is any
+   // data that is not managed inside the SAMRAI CVODESolver class
+   // but that must be set on the level, do it here.
+
+}
+
+void
+CVODEModel::resetHierarchyConfiguration(
+   const Pointer<BasePatchHierarchy> hierarchy,
+   const int coarsest_level,
+   const int finest_level)
+{
+   (void)hierarchy;
+   (void)coarsest_level;
+   (void)finest_level;
+
+   // This method is empty because this example does not exercise the
+   // situation when the grid changes, so it effectively is never called.
+   // This is a subject for future work...
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Cell tagging and patch level data initialization routines declared    *
+ * in the GradientDetectorStrategy interface.  They are used to          *
+ * construct the hierarchy initially.                                    *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void
+CVODEModel::applyGradientDetector(
+   const Pointer<BasePatchHierarchy> hierarchy,
+   const int level_number,
+   const double time,
+   const int tag_index,
+   const bool initial_time,
+   const bool uses_richardson_extrapolation_too)
+{
+   (void)time;
+   (void)initial_time;
+   (void)uses_richardson_extrapolation_too;
+
+   Pointer<PatchHierarchy> thierarchy = hierarchy;
+   Pointer<PatchLevel> level = thierarchy->getPatchLevel(level_number);
+
+   for (PatchLevel::Iterator p(level); p; p++) {
+      Pointer<Patch> patch = *p;
+
+      Pointer<CellData<int> > tag_data =
+         patch->getPatchData(tag_index);
+
+      // dumb implementation that tags all cells.
+      tag_data->fillAll(TRUE);
+   }
+}
+
+/*
+ *************************************************************************
+ *
+ * Methods inherited from RefinePatchStrategy.
+ *
+ ***********************************************************************
+ */
+
+void
+CVODEModel::setPhysicalBoundaryConditions(
+   Patch& patch,
+   const double time,
+   const IntVector& ghost_width_to_fill)
+{
+
+   (void)time;
+
+   Pointer<CellData<double> > soln_data =
+      patch.getPatchData(d_soln_scr_id);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!soln_data.isNull());
+#endif
+   IntVector ghost_cells(soln_data->getGhostCellWidth());
+
+   if (d_dim == tbox::Dimension(2)) {
+
+      /*
+       * Set boundary conditions for cells corresponding to patch edges.
+       */
+      CartesianBoundaryUtilities2::
+      fillEdgeBoundaryData("soln_data", soln_data,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_edge_conds,
+         d_bdry_edge_val);
+
+      /*
+       *  Set boundary conditions for cells corresponding to patch nodes.
+       */
+
+      CartesianBoundaryUtilities2::
+      fillNodeBoundaryData("soln_data", soln_data,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_node_conds,
+         d_bdry_edge_val);
+
+   }
+
+   if (d_dim == tbox::Dimension(3)) {
+
+      /*
+       *  Set boundary conditions for cells corresponding to patch faces.
+       */
+      CartesianBoundaryUtilities3::
+      fillFaceBoundaryData("soln_data", soln_data,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_face_conds,
+         d_bdry_face_val);
+
+      /*
+       *  Set boundary conditions for cells corresponding to patch edges.
+       */
+      CartesianBoundaryUtilities3::
+      fillEdgeBoundaryData("soln_data", soln_data,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_edge_conds,
+         d_bdry_face_val);
+
+      /*
+       *  Set boundary conditions for cells corresponding to patch nodes.
+       */
+      CartesianBoundaryUtilities3::
+      fillNodeBoundaryData("soln_data", soln_data,
+         patch,
+         ghost_width_to_fill,
+         d_scalar_bdry_node_conds,
+         d_bdry_face_val);
+
+   }
+
+//    plog << "----Boundary Conditions "  << endl;
+//    soln_data->print(soln_data->getGhostBox());
+
+}
+
+void
+CVODEModel::preprocessRefine(
+   Patch& fine,
+   const Patch& coarse,
+   const Box& fine_box,
+   const IntVector& ratio)
+{
+   (void)fine;
+   (void)coarse;
+   (void)fine_box;
+   (void)ratio;
+}
+
+void
+CVODEModel::postprocessRefine(
+   Patch& fine,
+   const Patch& coarse,
+   const Box& fine_box,
+   const IntVector& ratio)
+{
+   (void)fine;
+   (void)coarse;
+   (void)fine_box;
+   (void)ratio;
+}
+
+/*************************************************************************
+ *
+ * Methods inherited from CoarsenPatchStrategy.
+ *
+ ************************************************************************/
+
+void
+CVODEModel::preprocessCoarsen(
+   Patch& coarse,
+   const Patch& fine,
+   const Box& coarse_box,
+   const IntVector& ratio)
+{
+   (void)coarse;
+   (void)fine;
+   (void)coarse_box;
+   (void)ratio;
+}
+
+void
+CVODEModel::postprocessCoarsen(
+   Patch& coarse,
+   const Patch& fine,
+   const Box& coarse_box,
+   const IntVector& ratio)
+{
+   (void)coarse;
+   (void)fine;
+   (void)coarse_box;
+   (void)ratio;
+}
+
+/*************************************************************************
+ *
+ * Methods inherited from CVODEAbstractFunction
+ *
+ ************************************************************************/
+
+int
+CVODEModel::evaluateRHSFunction(
+   double time,
+   SundialsAbstractVector* y,
+   SundialsAbstractVector* y_dot)
+{
+   /*
+    * Convert Sundials vectors to SAMRAI vectors
+    */
+   Pointer<SAMRAIVectorReal<double> > y_samvect =
+      Sundials_SAMRAIVector::getSAMRAIVector(y);
+   Pointer<SAMRAIVectorReal<double> > y_dot_samvect =
+      Sundials_SAMRAIVector::getSAMRAIVector(y_dot);
+
+   Pointer<PatchHierarchy> hierarchy = y_samvect->getPatchHierarchy();
+
+   /*
+    * Compute max norm of solution vector.
+    */
+   Pointer<HierarchyDataOpsReal<double> > hierops(
+      new HierarchyCellDataOpsReal<double>(hierarchy));
+   //double max_norm = hierops->maxNorm(y_samvect->
+   //                                   getComponentDescriptorIndex(0));
+
+   if (d_print_solver_info) {
+      pout << "\t\tEval RHS: "
+           << "\n   \t\t\ttime = " << time
+           << "\n   \t\t\ty_maxnorm = " << y_samvect->maxNorm()
+           << endl;
+   }
+
+   /*
+    * Allocate scratch space and fill ghost cells in the solution vector
+    * 1) Create a refine algorithm
+    * 2) Register with the algorithm the current & scratch space, along
+    *    with a refine operator.
+    * 3) Use the refine algorithm to construct a refine schedule
+    * 4) Use the refine schedule to fill data on fine level.
+    */
+   Pointer<RefineAlgorithm> bdry_fill_alg(new RefineAlgorithm(d_dim));
+   Pointer<RefineOperator> refine_op = d_grid_geometry->
+      lookupRefineOperator(d_soln_var, "CONSERVATIVE_LINEAR_REFINE");
+   bdry_fill_alg->registerRefine(d_soln_scr_id,  // dest
+      y_samvect->
+      getComponentDescriptorIndex(0),                            // src
+      d_soln_scr_id,                            // scratch
+      refine_op);
+
+   for (int ln = hierarchy->getFinestLevelNumber(); ln >= 0; ln--) {
+      Pointer<PatchLevel> level = hierarchy->getPatchLevel(ln);
+      if (!level->checkAllocated(d_soln_scr_id)) {
+         level->allocatePatchData(d_soln_scr_id);
+      }
+
+      // Note:  a pointer to "this" tells the refine schedule to invoke
+      // the setPhysicalBCs defined in this class.
+      Pointer<RefineSchedule> bdry_fill_alg_schedule =
+         bdry_fill_alg->createSchedule(level,
+            ln - 1,
+            hierarchy,
+            this);
+
+      bdry_fill_alg_schedule->fillData(time);
+   }
+
+   /*
+    * Step through the levels and compute rhs
+    */
+   for (int ln = hierarchy->getFinestLevelNumber(); ln >= 0; ln--) {
+      Pointer<PatchLevel> level = hierarchy->getPatchLevel(ln);
+
+      for (PatchLevel::Iterator ip(level); ip; ip++) {
+         Pointer<Patch> patch = *ip;
+         Pointer<CartesianPatchGeometry> p_geom = patch->getPatchGeometry();
+
+         Pointer<CellData<double> > y =
+            patch->getPatchData(d_soln_scr_id);
+         Pointer<SideData<double> > diff =
+            patch->getPatchData(d_diff_id);
+         Pointer<CellData<double> > rhs =
+            patch->getPatchData(y_dot_samvect->getComponentDescriptorIndex(0));
+
+         const Index ifirst(patch->getBox().lower());
+         const Index ilast(patch->getBox().upper());
+
+         const Pointer<CartesianPatchGeometry> patch_geom =
+            patch->getPatchGeometry();
+         const double* dx = patch_geom->getDx();
+
+         IntVector ghost_cells(y->getGhostCellWidth());
+
+         /*
+          * 1 eqn radiation diffusion
+          */
+         if (d_dim == tbox::Dimension(2)) {
+            F77_FUNC(comprhs2d, COMPRHS2D) (
+               ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ghost_cells(0), ghost_cells(1),
+               dx,
+               y->getPointer(),
+               diff->getPointer(0),
+               diff->getPointer(1),
+               rhs->getPointer());
+         } else if (d_dim == tbox::Dimension(3)) {
+            F77_FUNC(comprhs3d, COMPRHS3D) (
+               ifirst(0), ilast(0),
+               ifirst(1), ilast(1),
+               ifirst(2), ilast(2),
+               ghost_cells(0), ghost_cells(1),
+               ghost_cells(2),
+               dx,
+               y->getPointer(),
+               diff->getPointer(0),
+               diff->getPointer(1),
+               diff->getPointer(2),
+               rhs->getPointer());
+         }
+
+      } // loop over patches
+   } // loop over levels
+
+   /*
+    * Deallocate scratch space.
+    */
+   for (int ln = hierarchy->getFinestLevelNumber(); ln >= 0; ln--) {
+      Pointer<PatchLevel> level = hierarchy->getPatchLevel(ln);
+      level->deallocatePatchData(d_soln_scr_id);
+   }
+
+   /*
+    * record current time and increment counter for number of RHS
+    * evaluations.
+    */
+   d_current_soln_time = time;
+   d_number_rhs_eval++;
+
+   return 0;
+}
+
+/*
+ *****************************************************************
+ *
+ * Set up FAC preconditioner for Jacobian system.  Here we
+ * use the FAC hierarchy solver in SAMRAI which automatically sets
+ * up the composite grid system and uses hypre as a solver on each
+ * level.
+ *
+ *****************************************************************
+ */
+
+int CVODEModel::CVSpgmrPrecondSet(
+   double t,
+   SundialsAbstractVector* y,
+   SundialsAbstractVector* fy,
+   int jok,
+   int* jcurPtr,
+   double gamma,
+   SundialsAbstractVector* vtemp1,
+   SundialsAbstractVector* vtemp2,
+   SundialsAbstractVector* vtemp3)
+{
+   (void)jok;
+   (void)jcurPtr;
+   (void)vtemp1;
+   (void)vtemp2;
+   (void)vtemp3;
+
+#ifdef USE_FAC_PRECONDITIONER
+
+   /*
+    * Convert passed-in CVODE vectors into SAMRAI vectors
+    */
+   Pointer<SAMRAIVectorReal<double> > y_samvect =
+      Sundials_SAMRAIVector::getSAMRAIVector(y);
+   Pointer<SAMRAIVectorReal<double> > fy_samvect =
+      Sundials_SAMRAIVector::getSAMRAIVector(fy);
+
+   Pointer<PatchHierarchy> hierarchy = y_samvect->getPatchHierarchy();
+
+   int y_indx = y_samvect->getComponentDescriptorIndex(0);
+
+   /*
+    * Construct refine algorithm to fill boundaries of solution vector
+    */
+   RefineAlgorithm fill_soln_vector_bounds(d_dim);
+   Pointer<RefineOperator> refine_op = d_grid_geometry->
+      lookupRefineOperator(d_soln_var, "CONSERVATIVE_LINEAR_REFINE");
+   fill_soln_vector_bounds.registerRefine(d_soln_scr_id,
+      y_samvect->getComponentDescriptorIndex(0),
+      d_soln_scr_id,
+      refine_op);
+
+   /*
+    * Construct coarsen algorithm to fill interiors on coarser levels
+    * with solution on finer level.
+    */
+   CoarsenAlgorithm fill_soln_interior_on_coarser(d_dim);
+   Pointer<CoarsenOperator> coarsen_op = d_grid_geometry->
+      lookupCoarsenOperator(d_soln_var, "CONSERVATIVE_COARSEN");
+
+   fill_soln_interior_on_coarser.registerCoarsen(y_indx,
+      y_indx,
+      coarsen_op);
+
+   /*
+    * Step through levels - largest to smallest
+    */
+   for (int amr_level = hierarchy->getFinestLevelNumber();
+        amr_level >= 0;
+        amr_level--) {
+      Pointer<PatchLevel> level = hierarchy->getPatchLevel(amr_level);
+
+      Pointer<RefineSchedule> fill_soln_vector_bounds_sched =
+         fill_soln_vector_bounds.createSchedule(level,
+            amr_level - 1,
+            hierarchy,
+            this);
+
+      if (!level->checkAllocated(d_soln_scr_id)) {
+         level->allocatePatchData(d_soln_scr_id);
+      }
+      fill_soln_vector_bounds_sched->fillData(t);
+
+      /*
+       * Construct a coarsen schedule for all levels larger than coarsest,
+       * and fill interiors of solution vector on coarser levels using fine
+       * data.
+       */
+      if (amr_level > 0) {
+         Pointer<PatchLevel> coarser_level =
+            hierarchy->getPatchLevel(amr_level - 1);
+
+         Pointer<CoarsenSchedule> fill_soln_interior_on_coarser_sched =
+            fill_soln_interior_on_coarser.createSchedule(coarser_level,
+               level);
+
+         fill_soln_interior_on_coarser_sched->coarsenData();
+      }
+
+      for (PatchLevel::Iterator p(level); p; p++) {
+         Pointer<Patch> patch = *p;
+
+         const Pointer<CartesianPatchGeometry> patch_geom =
+            patch->getPatchGeometry();
+
+         const Index ifirst(patch->getBox().lower());
+         const Index ilast(patch->getBox().upper());
+
+         Pointer<CellData<double> > u = patch->getPatchData(y_indx);
+         Pointer<SideData<double> > diffusion =
+            patch->getPatchData(d_diff_id);
+
+         diffusion->fillAll(1.0);
+
+#ifdef DEBUG_CHECK_ASSERTIONS
+         double current_dt = t - d_current_soln_time;
+         TBOX_ASSERT(current_dt >= 0.);
+#endif
+
+         /*
+          * Set Neumann fluxes and flag array (if desired)
+          */
+         if (d_use_neumann_bcs) {
+
+            Pointer<OuterfaceData<int> > flag_data =
+               patch->getPatchData(d_flag_id);
+            Pointer<OuterfaceData<double> > neuf_data =
+               patch->getPatchData(d_neuf_id);
+
+            /*
+             * Outerface data access:
+             *    neuf_data->getPointer(axis,face);
+             * where axis specifies X, Y, or Z (0,1,2 respectively)
+             * and face specifies lower or upper (0,1 respectively)
+             */
+
+            if (d_dim == tbox::Dimension(2)) {
+               F77_FUNC(setneufluxvalues2d, SETNEUFLUXVALUES2D) (
+                  ifirst(0), ilast(0),
+                  ifirst(1), ilast(1),
+                  d_bdry_types,
+                  d_bdry_edge_val.getPointer(),
+                  flag_data->getPointer(0, 0), // x lower
+                  flag_data->getPointer(0, 1), // x upper
+                  flag_data->getPointer(1, 0), // y lower
+                  flag_data->getPointer(1, 1), // y upper
+                  neuf_data->getPointer(0, 0), // x lower
+                  neuf_data->getPointer(0, 1), // x upper
+                  neuf_data->getPointer(1, 0), // y lower
+                  neuf_data->getPointer(1, 1)); // y upper
+            }
+            if (d_dim == tbox::Dimension(3)) {
+               F77_FUNC(setneufluxvalues3d, SETNEUFLUXVALUES3D) (
+                  ifirst(0), ilast(0),
+                  ifirst(1), ilast(1),
+                  ifirst(2), ilast(2),
+                  d_bdry_types,
+                  d_bdry_face_val.getPointer(),
+                  flag_data->getPointer(0, 0), // x lower
+                  flag_data->getPointer(0, 1), // x upper
+                  flag_data->getPointer(1, 0), // y lower
+                  flag_data->getPointer(1, 1), // y upper
+                  flag_data->getPointer(2, 0), // z lower
+                  flag_data->getPointer(2, 1), // z lower
+                  neuf_data->getPointer(0, 0), // x lower
+                  neuf_data->getPointer(0, 1), // x upper
+                  neuf_data->getPointer(1, 0), // y lower
+                  neuf_data->getPointer(1, 1), // y upper
+                  neuf_data->getPointer(2, 0), // z lower
+                  neuf_data->getPointer(2, 1)); // z upper
+            }
+         }
+
+      } // patch loop
+
+      level->deallocatePatchData(d_soln_scr_id);
+
+   } // level loop
+
+   /*
+    * Setup FAC preconditioner
+    */
+
+   /* Construct a Poisson solver for a level.  The use_smg flag
+    * is used to select which of HYPRE's linear solver algorithms to use
+    * if true, the semicoarsening multigrid algorithm is used, and if
+    * false, the ``PF'' multigrid algorithm is used.
+    */
+   bool use_smg = false;
+
+   d_FAC_solver.setUseSMG(use_smg);
+
+   /*
+    * Set boundaries.  The "bdry_types" array holds a set of integers
+    * where 0 = dirichlet and 1 = neumann boundary conditions.
+    */
+   if (d_use_neumann_bcs) {
+      d_FAC_solver.setBoundaries("Mixed", d_neuf_id, d_flag_id, d_bdry_types);
+   } else {
+      d_FAC_solver.setBoundaries("Dirichlet");
+   }
+
+   d_FAC_solver.setCConstant(1.0 / gamma);
+   d_FAC_solver.setDPatchDataId(d_diff_id);
+
+   /*
+    * increment counter for number of precond setup calls
+    */
+   d_number_precond_setup++;
+
+#endif
+   /*
+    * We return 0 or 1 here - 0 if it passes, 1 if it fails.  For now,
+    * just be optimistic and return 0. Eventually we should add some
+    * assertion handling above to set what this value should be.
+    */
+   return 0;
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Apply preconditioner where right-hand-side is "r" and "z" is the      *
+ * solution.   This routine assumes that the preconditioner setup call   *
+ * has already been invoked.  Return 0 if preconditioner fails;          *
+ * return 1 otherwise.                                                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+int CVODEModel::CVSpgmrPrecondSolve(
+   double t,
+   SundialsAbstractVector* y,
+   SundialsAbstractVector* fy,
+   SundialsAbstractVector* r,
+   SundialsAbstractVector* z,
+   double gamma,
+   double delta,
+   int lr,
+   SundialsAbstractVector* vtemp)
+{
+   (void)y;
+   (void)fy;
+   (void)vtemp;
+   (void)gamma;
+   (void)delta;
+   (void)lr;
+
+#ifdef USE_FAC_PRECONDITIONER
+
+   /*
+    * Convert passed-in CVODE vectors into SAMRAI vectors
+    */
+   Pointer<SAMRAIVectorReal<double> > r_samvect =
+      Sundials_SAMRAIVector::getSAMRAIVector(r);
+   Pointer<SAMRAIVectorReal<double> > z_samvect =
+      Sundials_SAMRAIVector::getSAMRAIVector(z);
+
+   int ret_val = 0;
+
+   Pointer<PatchHierarchy> hierarchy = r_samvect->getPatchHierarchy();
+
+   int r_indx = r_samvect->getComponentDescriptorIndex(0);
+   int z_indx = z_samvect->getComponentDescriptorIndex(0);
+   /******************************************************************
+    *
+    * We need to supply to the FAC solver a "version" of the z vector
+    * that contains ghost cells.  The operations below allocate
+    * on the patches a scratch context of the solution vector z and
+    * fill it with z vector data
+    *
+    *****************************************************************/
+
+   /*
+    * Construct a communication schedule which will fill ghosts of
+    * soln_scratch with z vector data (z -> soln_scratch).
+    */
+   RefineAlgorithm fill_z_vector_bounds(d_dim);
+   Pointer<RefineOperator> refine_op = d_grid_geometry->
+      lookupRefineOperator(d_soln_var, "CONSERVATIVE_LINEAR_REFINE");
+   fill_z_vector_bounds.registerRefine(d_soln_scr_id,
+      z_indx,
+      d_soln_scr_id,
+      refine_op);
+
+   /*
+    * Set initial guess for z (if applicable) and copy z data into the
+    * solution scratch context.
+    */
+   int ln;
+   for (ln = hierarchy->getFinestLevelNumber(); ln >= 0; ln--) {
+      Pointer<PatchLevel> level = hierarchy->getPatchLevel(ln);
+
+      if (!level->checkAllocated(d_soln_scr_id)) {
+         level->allocatePatchData(d_soln_scr_id);
+      }
+
+      for (PatchLevel::Iterator p(level); p; p++) {
+
+         Pointer<Patch> patch = *p;
+
+         const Pointer<CartesianPatchGeometry> patch_geom =
+            patch->getPatchGeometry();
+
+         Pointer<CellData<double> > z_data =
+            patch->getPatchData(z_indx);
+
+         /*
+          * Set initial guess for z here.
+          */
+         z_data->fillAll(0.);
+
+         /*
+          * Scale RHS by 1/gamma
+          */
+         PatchCellDataOpsReal<double> math_ops;
+         Pointer<CellData<double> > r_data = patch->getPatchData(r_indx);
+         math_ops.scale(r_data, 1.0 / gamma, r_data, r_data->getBox());
+
+         /*
+          * Copy interior data from z vector to soln_scratch
+          */
+         Pointer<CellData<double> > z_scr_data =
+            patch->getPatchData(d_soln_scr_id);
+         z_scr_data->copy(*z_data);
+      }
+
+      /*
+       * Fill ghost boundaries of soln_scratch.
+       * Construct a schedule for each level, from the algorithm
+       * constructed above.
+       */
+
+      Pointer<RefineSchedule> fill_z_vector_bounds_sched =
+         fill_z_vector_bounds.createSchedule(level,
+            ln - 1,
+            hierarchy,
+            this);
+
+      fill_z_vector_bounds_sched->fillData(t);
+
+   }
+
+   /******************************************************************
+   *
+   * Apply the FAC solver.  It solves the system Az=r with the
+   * format "solveSystem(z, r)". A was constructed in the precondSetup()
+   * method.
+   *
+   ******************************************************************/
+
+   if (d_print_solver_info) {
+      pout << "\t\tBefore FAC Solve (Az=r): "
+           << "\n   \t\t\tz_l2norm = " << z_samvect->L2Norm()
+           << "\n   \t\t\tz_maxnorm = " << z_samvect->maxNorm()
+           << "\n   \t\t\tr_l2norm = " << r_samvect->L2Norm()
+           << "\n   \t\t\tr_maxnorm = " << r_samvect->maxNorm()
+           << endl;
+   }
+   /*
+    * Set paramemters in the FAC solver.  It solves the system Az=r.
+    * Here we supply the max norm of r in order to scale the
+    * residual (i.e. residual = Az - r) to properly scale the convergence
+    * error.
+    */
+
+   d_FAC_solver.setMaxCycles(d_max_fac_its);
+   d_FAC_solver.setResidualTolerance(d_fac_tol);
+   const int coarsest_solve_ln = 0;
+   const int finest_solve_ln = 0;
+   /*
+    * Note: I don't know why we are only solving on level 0 here.
+    * When upgrading to the new FAC solver from the old, I noticed
+    * that the old solver only solved on level 0.  BTNG.
+    */
+   bool converge = d_FAC_solver.solveSystem(d_soln_scr_id,
+         r_indx,
+         hierarchy,
+         coarsest_solve_ln,
+         finest_solve_ln);
+
+   if (d_print_solver_info) {
+      double avg_convergence, final_convergence;
+      d_FAC_solver.getConvergenceFactors(avg_convergence, final_convergence);
+      pout << "   \t\t\tFinal Residual Norm: "
+           << d_FAC_solver.getResidualNorm() << endl;
+      pout << "   \t\t\tFinal Convergence Error: "
+           << final_convergence << endl;
+      pout << "   \t\t\tFinal Convergence Rate: "
+           << avg_convergence << endl;
+   }
+
+   /******************************************************************
+   *
+   * The FAC solver has computed a solution to z but it is stored
+   * in the soln_scratch data space.  Copy it from soln_scratch back
+   * into the z vector.
+   *
+   ******************************************************************/
+   for (ln = hierarchy->getFinestLevelNumber(); ln >= 0; ln--) {
+      Pointer<PatchLevel> level = hierarchy->getPatchLevel(ln);
+
+      for (PatchLevel::Iterator p(level); p; p++) {
+         Pointer<Patch> patch = *p;
+
+         Pointer<CellData<double> > soln_scratch =
+            patch->getPatchData(d_soln_scr_id);
+         Pointer<CellData<double> > z =
+            patch->getPatchData(z_indx);
+
+         z->copy(*soln_scratch);
+      }
+
+   }
+
+   if (d_print_solver_info) {
+      double avg_convergence, final_convergence;
+      d_FAC_solver.getConvergenceFactors(avg_convergence, final_convergence);
+      pout << "\t\tAfter FAC Solve (Az=r): "
+           << "\n   \t\t\tz_l2norm = " << z_samvect->L2Norm()
+           << "\n   \t\t\tz_maxnorm = " << z_samvect->maxNorm()
+           << "\n   \t\t\tResidual Norm: " << d_FAC_solver.getResidualNorm()
+           << "\n   \t\t\tConvergence Error: " << final_convergence
+           << endl;
+   }
+
+   if (converge != true) {
+      ret_val = 1;
+   }
+
+   /*
+    * Increment counter for number of precond solves
+    */
+   d_number_precond_solve++;
+
+   return ret_val;
+
+#else
+
+   return 0;
+
+#endif
+
+}
+
+/*************************************************************************
+ *
+ * Methods specific to CVODEModel class.
+ *
+ ************************************************************************/
+
+void
+CVODEModel::setupSolutionVector(
+   Pointer<PatchHierarchy> hierarchy)
+{
+   /* create SAMRAIVector */
+   Pointer<SAMRAIVectorReal<double> > soln_samvect(
+      new SAMRAIVectorReal<double>("solution", hierarchy,
+                                   0, hierarchy->getFinestLevelNumber()));
+   soln_samvect->addComponent(d_soln_var, d_soln_cur_id);
+
+   /* allocate memory for vectors. */
+   soln_samvect->allocateVectorData();
+
+   /* create SundialsAbstractVector */
+   d_solution_vector =
+      Sundials_SAMRAIVector::createSundialsVector(soln_samvect);
+
+#ifdef USE_FAC_PRECONDITIONER
+   /*
+    * Allocate memory for preconditioner variables.
+    */
+
+   const int nlevels = hierarchy->getNumberOfLevels();
+
+   for (int ln = 0; ln < nlevels; ln++) {
+      Pointer<PatchLevel> level = hierarchy->getPatchLevel(ln);
+#ifdef DEBUG_CHECK_ASSERTIONS
+      TBOX_ASSERT(!(level.isNull()));
+#endif
+      level->allocatePatchData(d_diff_id);
+      if (d_use_neumann_bcs) {
+         level->allocatePatchData(d_flag_id);
+         level->allocatePatchData(d_neuf_id);
+      }
+
+   }
+#endif
+
+}
+
+SundialsAbstractVector *
+CVODEModel::getSolutionVector(
+   void)
+{
+   return d_solution_vector;
+}
+
+/*
+ *************************************************************************
+ *
+ * Set initial conditions for CVODE solver                               *
+ *                                                                       *
+ *************************************************************************
+ */
+void
+CVODEModel::setInitialConditions(
+   SundialsAbstractVector* soln_init)
+{
+   Pointer<SAMRAIVectorReal<double> > soln_init_samvect =
+      Sundials_SAMRAIVector::getSAMRAIVector(soln_init);
+
+   Pointer<PatchHierarchy> hierarchy = soln_init_samvect->getPatchHierarchy();
+
+   for (int ln = 0; ln < hierarchy->getNumberOfLevels(); ln++) {
+      Pointer<PatchLevel> level = hierarchy->getPatchLevel(ln);
+
+      for (int cn = 0; cn < soln_init_samvect->getNumberOfComponents(); cn++) {
+         for (PatchLevel::Iterator p(level); p; p++) {
+            Pointer<Patch> patch = *p;
+            Pointer<CartesianPatchGeometry> p_geom = patch->getPatchGeometry();
+
+            /*
+             * Set initial conditions for y
+             */
+            Pointer<CellData<double> > y_init =
+               soln_init_samvect->getComponentPatchData(cn, *patch);
+            y_init->fillAll(d_initial_value);
+
+            /*
+             * Set initial diffusion coeff values.
+             * NOTE: in a "real" application, the diffusion coefficient is
+             * some function of y.  Here, we just do a simple minded
+             * approach and set it to 1.
+             */
+            Pointer<SideData<double> > diffusion =
+               patch->getPatchData(d_diff_id);
+
+            diffusion->fillAll(1.0);
+         }
+      }
+   }
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Return array of program counters.  Currently, the array holds the     *
+ * following entries:                                                    *
+ *    1) number of RHS evaluations                                       *
+ *    2) number of precond setup calls                                   *
+ *    3) number of precond solve calls                                   *
+ * More counters may be added, as desired.                               *
+ *                                                                       *
+ *************************************************************************
+ */
+void
+CVODEModel::getCounters(
+   Array<int>& counters)
+{
+   counters.resizeArray(3);
+   counters[0] = d_number_rhs_eval;
+   counters[1] = d_number_precond_setup;
+   counters[2] = d_number_precond_solve;
+}
+
+/*
+ *************************************************************************
+ *
+ * Get data from input database.                                         *
+ *                                                                       *
+ *************************************************************************
+ */
+void
+CVODEModel::getFromInput(
+   Pointer<Database> input_db,
+   bool is_from_restart)
+{
+   (void)is_from_restart;
+
+   d_initial_value = input_db->getDoubleWithDefault("initial_value", 0.0);
+
+   IntVector periodic(d_grid_geometry->getPeriodicShift(hier::IntVector(d_dim,
+                            1)));
+   int num_per_dirs = 0;
+   for (int id = 0; id < d_dim.getValue(); id++) {
+      if (periodic(id)) num_per_dirs++;
+   }
+
+   if (input_db->keyExists("Boundary_data")) {
+      Pointer<Database> boundary_db = input_db->getDatabase("Boundary_data");
+
+      if (d_dim == tbox::Dimension(2)) {
+         CartesianBoundaryUtilities2::readBoundaryInput(this,
+            boundary_db,
+            d_scalar_bdry_edge_conds,
+            d_scalar_bdry_node_conds,
+            periodic);
+      }
+      if (d_dim == tbox::Dimension(3)) {
+         CartesianBoundaryUtilities3::readBoundaryInput(this,
+            boundary_db,
+            d_scalar_bdry_face_conds,
+            d_scalar_bdry_edge_conds,
+            d_scalar_bdry_node_conds,
+            periodic);
+      }
+
+   } else {
+      TBOX_WARNING(
+         d_object_name << ": "
+         <<
+         "Key data `Boundary_data' not found in input. " << endl);
+   }
+
+#ifdef USE_FAC_PRECONDITIONER
+   d_max_fac_its =
+      input_db->getIntegerWithDefault("max_fac_its", d_max_fac_its);
+   d_fac_tol =
+      input_db->getDoubleWithDefault("fac_tol", d_fac_tol);
+   d_max_hypre_its =
+      input_db->getIntegerWithDefault("max_hypre_its", d_max_hypre_its);
+   d_hypre_tol =
+      input_db->getDoubleWithDefault("hypre_tol", d_hypre_tol);
+   d_use_neumann_bcs =
+      input_db->getBoolWithDefault("use_neumann_bcs", d_use_neumann_bcs);
+   d_print_solver_info =
+      input_db->getBoolWithDefault("print_solver_info", d_print_solver_info);
+#endif
+
+}
+
+/*
+ *************************************************************************
+ *
+ * Write data to  restart database.                                      *
+ *                                                                       *
+ *************************************************************************
+ */
+void CVODEModel::putToDatabase(
+   Pointer<Database> db)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+#endif
+
+   db->putInteger("CVODE_MODEL_VERSION", CVODE_MODEL_VERSION);
+
+   db->putDouble("d_initial_value", d_initial_value);
+
+   db->putIntegerArray("d_scalar_bdry_edge_conds", d_scalar_bdry_edge_conds);
+   db->putIntegerArray("d_scalar_bdry_node_conds", d_scalar_bdry_node_conds);
+
+   if (d_dim == tbox::Dimension(2)) {
+      db->putDoubleArray("d_bdry_edge_val", d_bdry_edge_val);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      db->putIntegerArray("d_scalar_bdry_face_conds", d_scalar_bdry_face_conds);
+      db->putDoubleArray("d_bdry_face_val", d_bdry_face_val);
+   }
+
+}
+
+/*
+ *************************************************************************
+ *
+ * Read data from restart database.                                      *
+ *                                                                       *
+ *************************************************************************
+ */
+void CVODEModel::getFromRestart()
+{
+
+   Pointer<Database> root_db =
+      RestartManager::getManager()->getRootDatabase();
+
+   Pointer<Database> db;
+   if (root_db->isDatabase(d_object_name)) {
+      db = root_db->getDatabase(d_object_name);
+   } else {
+      TBOX_ERROR("Restart database corresponding to "
+         << d_object_name << " not found in the restart file.");
+   }
+
+   int ver = db->getInteger("CVODE_MODEL_VERSION");
+   if (ver != CVODE_MODEL_VERSION) {
+      TBOX_ERROR(
+         d_object_name << ":  "
+         <<
+         "Restart file version different than class version.");
+   }
+
+   d_initial_value = db->getDouble("d_initial_value");
+
+   d_scalar_bdry_edge_conds = db->getIntegerArray("d_scalar_bdry_edge_conds");
+   d_scalar_bdry_node_conds = db->getIntegerArray("d_scalar_bdry_node_conds");
+
+   if (d_dim == tbox::Dimension(2)) {
+      d_bdry_edge_val = db->getDoubleArray("d_bdry_edge_val");
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      d_scalar_bdry_face_conds = db->getIntegerArray("d_scalar_bdry_face_conds");
+
+      d_bdry_face_val = db->getDoubleArray("d_bdry_face_val");
+   }
+
+}
+
+/*
+ *************************************************************************
+ *                                                                       *
+ * Routines to read boundary data from input database.                   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CVODEModel::readDirichletBoundaryDataEntry(
+   Pointer<Database> db,
+   string& db_name,
+   int bdry_location_index)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+   TBOX_ASSERT(!db_name.empty());
+#endif
+   if (d_dim == tbox::Dimension(2)) {
+      readStateDataEntry(db,
+         db_name,
+         bdry_location_index,
+         d_bdry_edge_val);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      readStateDataEntry(db,
+         db_name,
+         bdry_location_index,
+         d_bdry_face_val);
+   }
+}
+
+void CVODEModel::readNeumannBoundaryDataEntry(
+   Pointer<Database> db,
+   string& db_name,
+   int bdry_location_index)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+   TBOX_ASSERT(!db_name.empty());
+#endif
+   if (d_dim == tbox::Dimension(2)) {
+      readStateDataEntry(db,
+         db_name,
+         bdry_location_index,
+         d_bdry_edge_val);
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      readStateDataEntry(db,
+         db_name,
+         bdry_location_index,
+         d_bdry_face_val);
+   }
+}
+
+void CVODEModel::readStateDataEntry(
+   Pointer<Database> db,
+   const string& db_name,
+   int array_indx,
+   Array<double>& val)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   TBOX_ASSERT(!db.isNull());
+   TBOX_ASSERT(!db_name.empty());
+   TBOX_ASSERT(array_indx >= 0);
+   TBOX_ASSERT(val.getSize() > array_indx);
+#endif
+
+   if (db->keyExists("val")) {
+      val[array_indx] = db->getDouble("val");
+   } else {
+      TBOX_ERROR(d_object_name << ": "
+                               << "`val' entry missing from " << db_name
+                               << " input database. " << endl);
+   }
+
+}
+/*
+ *************************************************************************
+ *                                                                       *
+ * Prints class data - writes out info in class if assertion is thrown   *
+ *                                                                       *
+ *************************************************************************
+ */
+
+void CVODEModel::printClassData(
+   ostream& os) const
+{
+   fflush(stdout);
+   int j;
+
+   os << "ptr CVODEModel = " << (CVODEModel *)this << endl;
+
+   os << "d_object_name = " << d_object_name << endl;
+
+   os << "d_soln_cur_id = " << d_soln_cur_id << endl;
+   os << "d_soln_scr_id = " << d_soln_scr_id << endl;
+
+   os << "d_initial_value = " << d_initial_value << endl;
+
+   os << "Boundary Condition data..." << endl;
+   if (d_dim == tbox::Dimension(2)) {
+      for (j = 0; j < d_scalar_bdry_edge_conds.getSize(); j++) {
+         os << "       d_scalar_bdry_edge_conds[" << j << "] = "
+         << d_scalar_bdry_edge_conds[j] << endl;
+         if (d_scalar_bdry_edge_conds[j] == DIRICHLET_BC) {
+            os << "         d_bdry_edge_val[" << j << "] = "
+            << d_bdry_edge_val[j] << endl;
+         }
+      }
+      os << endl;
+      for (j = 0; j < d_scalar_bdry_node_conds.getSize(); j++) {
+         os << "       d_scalar_bdry_node_conds[" << j << "] = "
+         << d_scalar_bdry_node_conds[j] << endl;
+         os << "       d_node_bdry_edge[" << j << "] = "
+         << d_node_bdry_edge[j] << endl;
+      }
+   }
+   if (d_dim == tbox::Dimension(3)) {
+      for (j = 0; j < d_scalar_bdry_face_conds.getSize(); j++) {
+         os << "       d_scalar_bdry_face_conds[" << j << "] = "
+         << d_scalar_bdry_face_conds[j] << endl;
+         if (d_scalar_bdry_face_conds[j] == DIRICHLET_BC) {
+            os << "         d_bdry_face_val[" << j << "] = "
+            << d_bdry_face_val[j] << endl;
+         }
+      }
+      os << endl;
+      for (j = 0; j < d_scalar_bdry_edge_conds.getSize(); j++) {
+         os << "       d_scalar_bdry_edge_conds[" << j << "] = "
+         << d_scalar_bdry_edge_conds[j] << endl;
+         os << "       d_edge_bdry_face[" << j << "] = "
+         << d_edge_bdry_face[j] << endl;
+      }
+      os << endl;
+      for (j = 0; j < d_scalar_bdry_node_conds.getSize(); j++) {
+         os << "       d_scalar_bdry_node_conds[" << j << "] = "
+         << d_scalar_bdry_node_conds[j] << endl;
+         os << "       d_node_bdry_face[" << j << "] = "
+         << d_node_bdry_face[j] << endl;
+      }
+   }
+
+}
+
+void CVODEModel::setPrintSolverInfo(
+   const bool info)
+{
+   d_print_solver_info = info;
+}
+#endif // HAVE_SUNDIALS
diff -r 000000000000 -r 5eda1a3f24e8 source/test/sundials/CVODEModel.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/sundials/CVODEModel.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,591 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Example demonstrating use of CVODE vectors. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#ifndef included_iostream
+#define included_iostream
+#include <iostream>
+using namespace std;
+#endif
+
+#if !defined(HAVE_SUNDIALS) || !defined(HAVE_HYPRE)
+
+/*
+ *************************************************************************
+ * If the library is not compiled with CVODE, print an error.
+ * If we're running autotests, skip the error and compile an empty
+ * class.
+ *************************************************************************
+ */
+#if (TESTING != 1)
+#error "This example requires SAMRAI be compiled with CVODE -and- HYPRE."
+#endif
+
+#else
+
+/*
+ * Header file for base classes.
+ */
+#include "SAMRAI/appu/BoundaryUtilityStrategy.h"
+#include "SAMRAI/mesh/StandardTagAndInitStrategy.h"
+#include "SAMRAI/xfer/RefinePatchStrategy.h"
+#include "SAMRAI/xfer/CoarsenPatchStrategy.h"
+#include "SAMRAI/solv/CVODEAbstractFunctions.h"
+
+/*
+ * Header file for SAMRAI classes referenced in this class.
+ */
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/xfer/Geometry.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/pdat/OuterfaceVariable.h"
+#include "SAMRAI/pdat/SideVariable.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/xfer/RefineAlgorithm.h"
+#include "SAMRAI/xfer/RefineSchedule.h"
+
+#define USE_FAC_PRECONDITIONER
+// comment out line below to invoke preconditioning
+// #undef USE_FAC_PRECONDITIONER
+
+#ifdef USE_FAC_PRECONDITIONER
+#include "SAMRAI/solv/CellPoissonFACSolver.h"
+#endif
+/*
+ * Header files for CVODE wrapper classes
+ */
+#include "SAMRAI/solv/SundialsAbstractVector.h"
+#include "SAMRAI/solv/Sundials_SAMRAIVector.h"
+
+using namespace SAMRAI;
+using namespace tbox;
+using namespace hier;
+using namespace xfer;
+using namespace pdat;
+using namespace math;
+using namespace mesh;
+using namespace geom;
+using namespace solv;
+using namespace appu;
+
+/**
+ * The cvode_Model class tests the CVODE-SAMRAI interface using
+ * two problems: (1) y' = k * d/dx (dy/dx) and (2) y' = y.
+ *
+ * The choice of which problem to solve and other input parameters
+ * are specified through the input database.
+ *
+ * Input Parameters:
+ *
+ *
+ *
+ *
+ *    - \b Problem_type
+ *       1 for diffusion equation, 2 for y' = y.  By default, the heat
+ *       equation is solved.
+ *
+ *    - \b Diffusion_coefficient
+ *       specifies the diffusion coefficient to use when the
+ *       has been specified that the diffusion equation will be
+ *       solved.
+ *
+ *    - \b Initial_condition_type
+ *       0 for constant initial conditions, 1 for sinusoidal initial
+ *       conditions
+ *
+ *    - \b Initial_value
+ *       specifies the initial value to be used for all grid points
+ *       when constant initial conditions is specified
+ *
+ *    - \b Boundary_value
+ *       specifies what value should be used for the dirichlet
+ *       boundary conditions applied to this problem.
+ *
+ */
+
+class CVODEModel:
+   public StandardTagAndInitStrategy,
+   public RefinePatchStrategy,
+   public CoarsenPatchStrategy,
+   public BoundaryUtilityStrategy,
+   public CVODEAbstractFunctions
+{
+public:
+   /**
+    * Default constructor for CVODEModel.
+    */
+   CVODEModel(
+      const string& object_name,
+      const tbox::Dimension& dim,
+      tbox::Pointer<tbox::Database> input_db,
+      tbox::Pointer<geom::CartesianGridGeometry> grid_geom);
+
+   /**
+    * Empty destructor for CVODEModel.
+    */
+   virtual ~CVODEModel();
+
+/*************************************************************************
+ *
+ * Methods inherited from StandardTagAndInitStrategy.
+ *
+ ************************************************************************/
+
+   /**
+    * Initialize data on a new level after it is inserted into an AMR patch
+    * hierarchy by the gridding algorithm.  The level number indicates
+    * that of the new level.
+    *
+    * Generally, when data is set, it is interpolated from coarser levels
+    * in the hierarchy.  If the old level pointer in the argument list is
+    * non-null, then data is copied from the old level to the new level
+    * on regions of intersection between those levels before interpolation
+    * occurs.   In this case, the level number must match that of the old
+    * level.  The specific operations that occur when initializing level
+    * data are determined by the particular solution methods in use; i.e.,
+    * in the subclass of this abstract base class.
+    *
+    * The boolean argument initial_time indicates whether the level is
+    * being introduced for the first time (i.e., at initialization time),
+    * or after some regrid process during the calculation beyond the initial
+    * hierarchy construction.  This information is provided since the
+    * initialization of the data may be different in each of those
+    * circumstances.  The can_be_refined boolean argument indicates whether
+    * the level is the finest allowable level in the hierarchy.
+    */
+   virtual void
+   initializeLevelData(
+      const tbox::Pointer<BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double time,
+      const bool can_be_refined,
+      const bool initial_time,
+      const tbox::Pointer<BasePatchLevel> old_level =
+         tbox::Pointer<BasePatchLevel>(NULL),
+      const bool allocate_data = true);
+
+   /**
+    * After hierarchy levels have changed and data has been initialized on
+    * the new levels, this routine can be used to reset any information
+    * needed by the solution method that is particular to the hierarchy
+    * configuration.  For example, the solution procedure may cache
+    * communication schedules to amortize the cost of data movement on the
+    * AMR patch hierarchy.  This function will be called by the gridding
+    * algorithm after the initialization occurs so that the algorithm-specific
+    * subclass can reset such things.  Also, if the solution method must
+    * make the solution consistent across multiple levels after the hierarchy
+    * is changed, this process may be invoked by this routine.  Of course the
+    * details of these processes are determined by the particular solution
+    * methods in use.
+    *
+    * The level number arguments indicate the coarsest and finest levels
+    * in the current hierarchy configuration that have changed.  It should
+    * be assumed that all intermediate levels have changed as well.
+    */
+   virtual void
+   resetHierarchyConfiguration(
+      const tbox::Pointer<BasePatchHierarchy> hierarchy,
+      const int coarsest_level,
+      const int finest_level);
+
+   /**
+    * Set tags to the specified tag value where refinement of the given
+    * level should occur using the user-supplied gradient detector.  The
+    * value "tag_index" is the index of the cell-centered integer tag
+    * array on each patch in the hierarchy.  The boolean argument indicates
+    * whether cells are being tagged on the level for the first time;
+    * i.e., when the hierarchy is initially constructed.  If it is false,
+    * it should be assumed that cells are being tagged at some later time
+    * after the patch hierarchy was initially constructed.  This information
+    * is provided since the application of the error estimator may be
+    * different in each of those circumstances.
+    */
+   virtual void
+   applyGradientDetector(
+      const tbox::Pointer<BasePatchHierarchy> hierarchy,
+      const int level_number,
+      const double time,
+      const int tag_index,
+      const bool initial_time,
+      const bool uses_richardson_extrapolation_too);
+
+   /**
+    * Option to output solver info.  Set to true to turn on, false to
+    * turn off.
+    */
+   void
+   setPrintSolverInfo(
+      const bool info);
+
+/*************************************************************************
+ *
+ * Methods inherited from RefinePatchStrategy.
+ *
+ ************************************************************************/
+
+   /**
+    * Set the data at patch boundaries corresponding to the physical domain
+    * boundary.  The specific boundary conditions are determined by the user.
+    */
+   virtual void
+   setPhysicalBoundaryConditions(
+      Patch& patch,
+      const double time,
+      const IntVector& ghost_width_to_fill);
+
+   /**
+    * Perform user-defined refining operations.  This member function
+    * is called before the other refining operators.  The preprocess
+    * function should refine data from the scratch components of the
+    * coarse patch into the scratch components of the fine patch on the
+    * specified fine box region.  This version of the preprocess function
+    * operates on a a single box at a time.  The user must define this
+    * routine in the subclass.
+    */
+   virtual void
+   preprocessRefine(
+      Patch& fine,
+      const Patch& coarse,
+      const Box& fine_box,
+      const IntVector& ratio);
+
+   /**
+    * Perform user-defined refining operations.  This member function
+    * is called after the other refining operators.  The postprocess
+    * function should refine data from the scratch components of the
+    * coarse patch into the scratch components of the fine patch on the
+    * specified fine box region.  This version of the postprocess function
+    * operates on a a single box at a time.  The user must define this
+    * routine in the subclass.
+    */
+   virtual void
+   postprocessRefine(
+      Patch& fine,
+      const Patch& coarse,
+      const Box& fine_box,
+      const IntVector& ratio);
+
+   /**
+    * Return maximum stencil width needed for user-defined
+    * data interpolation operations.  Default is to return
+    * zero, assuming no user-defined operations provided.
+    */
+   virtual IntVector getRefineOpStencilWidth() const
+   {
+      return IntVector(d_dim, 0);
+   }
+
+/*************************************************************************
+ *
+ * Methods inherited from CoarsenPatchStrategy.
+ *
+ ************************************************************************/
+
+   /**
+    * Perform user-defined coarsening operations.  This member function
+    * is called before the other coarsening operators.  The preprocess
+    * function should copy data from the source components of the fine
+    * patch into the source components of the destination patch on the
+    * specified coarse box region.
+    */
+   virtual void
+   preprocessCoarsen(
+      Patch& coarse,
+      const Patch& fine,
+      const Box& coarse_box,
+      const IntVector& ratio);
+
+   /**
+    * Perform user-defined coarsening operations.  This member function
+    * is called after the other coarsening operators.  The postprocess
+    * function should copy data from the source components of the fine
+    * patch into the source components of the destination patch on the
+    * specified coarse box region.
+    */
+   virtual void
+   postprocessCoarsen(
+      Patch& coarse,
+      const Patch& fine,
+      const Box& coarse_box,
+      const IntVector& ratio);
+
+   /**
+    * Return maximum stencil width needed for user-defined
+    * data interpolation operations.  Default is to return
+    * zero, assuming no user-defined operations provided.
+    */
+   virtual IntVector getCoarsenOpStencilWidth() const
+   {
+      return IntVector(d_dim, 0);
+   }
+
+/*************************************************************************
+ *
+ * Methods inherited from CVODEAbstractFunctions
+ *
+ ************************************************************************/
+
+   /**
+    * User-supplied right-hand side function evaluation.
+    *
+    * The function arguments are:
+    *
+    *
+    *
+    * - \b t        (INPUT) {current value of the independent variable}
+    * - \b y        (INPUT) {current value of dependent variable vector}
+    * - \b y_dot   (OUTPUT){current value of the derivative of y}
+    *
+    *
+    *
+    *
+    * IMPORTANT: This function must not modify the vector y. (KTC??)
+    */
+   virtual int
+   evaluateRHSFunction(
+      double time,
+      SundialsAbstractVector* y,
+      SundialsAbstractVector* y_dot);
+
+   virtual int
+   CVSpgmrPrecondSet(
+      double t,
+      SundialsAbstractVector* y,
+      SundialsAbstractVector* fy,
+      int jok,
+      int* jcurPtr,
+      double gamma,
+      SundialsAbstractVector* vtemp1,
+      SundialsAbstractVector* vtemp2,
+      SundialsAbstractVector* vtemp3);
+
+   virtual int
+   CVSpgmrPrecondSolve(
+      double t,
+      SundialsAbstractVector* y,
+      SundialsAbstractVector* fy,
+      SundialsAbstractVector* r,
+      SundialsAbstractVector* z,
+      double gamma,
+      double delta,
+      int lr,
+      SundialsAbstractVector* vtemp);
+
+/*************************************************************************
+ *
+ * Methods particular to CVODEModel class.
+ *
+ ************************************************************************/
+
+   /**
+    * Set up solution vector.
+    */
+   void
+   setupSolutionVector(
+      tbox::Pointer<PatchHierarchy> hierarchy);
+
+   /**
+    * Get pointer to the solution vector.
+    */
+   SundialsAbstractVector *
+   getSolutionVector(
+      void);
+
+   /**
+    * Set initial conditions for problem.
+    */
+   void
+   setInitialConditions(
+      SundialsAbstractVector* y_init);
+
+   /**
+    * Return array of program counters.
+    */
+   void
+   getCounters(
+      tbox::Array<int>& counters);
+
+   /**
+    * Writes state of CVODEModel object to the specified database.
+    *
+    * This routine is a concrete implementation of the function
+    * declared in the tbox::Serializable abstract base class.
+    */
+   void
+   putToDatabase(
+      tbox::Pointer<tbox::Database> db);
+
+   /**
+    * This routine is a concrete implementation of the virtual function
+    * in the base class BoundaryUtilityStrategy.  It reads DIRICHLET
+    * and NEUMANN boundary state values from the given database with the
+    * given name string idenifier.  The integer location index
+    * indicates the face (in 3D) or edge (in 2D) to which the boundary
+    * condition applies.
+    */
+   void
+   readDirichletBoundaryDataEntry(
+      tbox::Pointer<tbox::Database> db,
+      string& db_name,
+      int bdry_location_index);
+
+   void
+   readNeumannBoundaryDataEntry(
+      tbox::Pointer<tbox::Database> db,
+      string& db_name,
+      int bdry_location_index);
+
+   /**
+    * Prints all class data members, if assertion is thrown.
+    */
+   void
+   printClassData(
+      ostream& os) const;
+
+private:
+   /*
+    * These private member functions read data from input and restart.
+    * When beginning a run from a restart file, all data members are read
+    * from the restart file.  If the boolean flag is true when reading
+    * from input, some restart values may be overridden by those in the
+    * input file.
+    *
+    * An assertion results if the database pointer is null.
+    */
+   virtual void
+   getFromInput(
+      tbox::Pointer<tbox::Database> db,
+      bool is_from_restart);
+
+   virtual void
+   getFromRestart();
+
+   void
+   readStateDataEntry(
+      tbox::Pointer<tbox::Database> db,
+      const string& db_name,
+      int array_indx,
+      tbox::Array<double>& uval);
+
+   /*
+    * Object name used for error/warning reporting and as a label
+    * for restart database entries.
+    */
+   string d_object_name;
+
+   const tbox::Dimension d_dim;
+
+   /*
+    * tbox::Pointer to solution vector
+    */
+   SundialsAbstractVector* d_solution_vector;
+
+   /*
+    * Variables
+    */
+   tbox::Pointer<CellVariable<double> > d_soln_var;
+
+   /*
+    * Variable Contexts
+    */
+   tbox::Pointer<VariableContext> d_cur_cxt;
+   tbox::Pointer<VariableContext> d_scr_cxt;
+
+   /*
+    * Patch Data ids
+    */
+   int d_soln_cur_id;
+   int d_soln_scr_id;
+
+#ifdef USE_FAC_PRECONDITIONER
+   tbox::Pointer<SideVariable<double> > d_diff_var;
+   tbox::Pointer<OuterfaceVariable<int> > d_flag_var;
+   tbox::Pointer<OuterfaceVariable<double> > d_neuf_var;
+
+   int d_diff_id;
+   int d_flag_id;
+   int d_neuf_id;
+   int d_bdry_types[2 * tbox::Dimension::MAXIMUM_DIMENSION_VALUE];
+
+   solv::CellPoissonFACSolver d_FAC_solver;
+   bool d_FAC_solver_allocated;
+   bool d_level_solver_allocated;
+   bool d_use_neumann_bcs;
+
+   int d_max_fac_its;
+   double d_fac_tol;
+   int d_max_hypre_its;
+   double d_hypre_tol;
+   double d_current_soln_time;
+#endif
+
+   /*
+    * Print CVODE solver information
+    */
+   bool d_print_solver_info;
+
+   /*
+    * Grid geometry
+    */
+   tbox::Pointer<geom::CartesianGridGeometry> d_grid_geometry;
+
+   /*
+    * Initial value
+    */
+   double d_initial_value;
+
+   /*
+    * Program counters
+    *   1 - number of RHS evaluations
+    *   2 - number of precond setups
+    *   3 - number of precond solves
+    */
+   int d_number_rhs_eval;
+   int d_number_precond_setup;
+   int d_number_precond_solve;
+
+   /*
+    * Boundary condition cases and boundary values.
+    * Options are: FLOW, REFLECT, DIRICHLET, NEUMANN
+    * and variants for nodes and edges.
+    *
+    * Input file values are read into these arrays.
+    */
+   tbox::Array<int> d_scalar_bdry_edge_conds;
+   tbox::Array<int> d_scalar_bdry_node_conds;
+   tbox::Array<int> d_scalar_bdry_face_conds; // Only used for 3D.
+
+   /*
+    * Boundary condition cases for scalar and vector (i.e., depth > 1)
+    * variables.  These are post-processed input values and are passed
+    * to the boundary routines.
+    */
+   tbox::Array<int> d_node_bdry_edge; // Only used for 2D.
+   tbox::Array<int> d_edge_bdry_face; // Only used for 3D.
+   tbox::Array<int> d_node_bdry_face; // Only used for 3D.
+
+   /*
+    * Arrays of face (3d) or edge (2d) boundary values for DIRICHLET case.
+    */
+   tbox::Array<double> d_bdry_edge_val; // Only used for 2D
+   tbox::Array<double> d_bdry_face_val; // Only used for 3D
+
+};
+#endif // HAVE_SUNDIALS
diff -r 000000000000 -r 5eda1a3f24e8 source/test/sundials/FACjacobian2d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/sundials/FACjacobian2d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,125 @@
+define(NDIM,2)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim2d.i)dnl
+
+      subroutine comprhs2d(
+     &  ifirst0,ilast0,ifirst1,ilast1,
+     &  ngc0,ngc1,
+     &  dx,
+     &  y, 
+     &  diff0, 
+     &  diff1,
+     &  rhs)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter(one=1.d0)
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1
+      integer ngc0,ngc1
+      double precision dx(0:NDIM-1)
+      double precision 
+     &  y(CELL2dVECG(ifirst,ilast,ngc)),
+     &  diff0(SIDE2d0(ifirst,ilast,0)),
+     &  diff1(SIDE2d1(ifirst,ilast,0))
+c output arrays:
+      double precision 
+     &  rhs(CELL2d(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer ic0,ic1
+      double precision dgrade0p, dgrade0m, dgrade1p, dgrade1m
+
+c
+c  Computes RHS for 1 eqn radiation diffusion application
+c 
+c      dE/dt = grad dot ( D(E)grad(E) ) = RHS
+c
+      do ic1=ifirst1,ilast1
+         do ic0=ifirst0,ilast0
+
+c        compute  D(E)grad(E) in X and Y 
+            
+            dgrade0p = diff0(ic0+1,ic1)/dx(0) *
+     &                 (y(ic0+1,ic1) - y(ic0,ic1))
+            dgrade0m = diff0(ic0,ic1)/dx(0) *
+     &                 (y(ic0,ic1) - y(ic0-1,ic1))
+            dgrade1p = diff1(ic0,ic1+1)/dx(1) *
+     &                 (y(ic0,ic1+1) - y(ic0,ic1))
+            dgrade1m = diff1(ic0,ic1)/dx(1) *
+     &                 (y(ic0,ic1) - y(ic0,ic1-1))
+
+c        compute  RHS 
+
+            rhs(ic0,ic1) = (dgrade0p - dgrade0m)/dx(0) +
+     &                     (dgrade1p - dgrade1m)/dx(1) 
+
+         enddo
+      enddo
+c
+      return
+      end
+c
+c
+
+c
+c************************************************************************
+c  Subroutine setneufluxvalues sets the outerface flag and neumann flux
+c  arrays.  The flag simply holds the boundary type (0-dirichlet, 
+c  1-neumann) and the neumann flux array holds the value of the 
+c  neumann flux.
+c************************************************************************
+        subroutine setneufluxvalues2d(
+     &    ifirst0,ilast0,ifirst1,ilast1,
+     &    bdry_type,
+     &    bdry_val,      
+     &    flagx0,flagx1,
+     &    flagy0,flagy1,
+     &    neufluxx0,neufluxx1,
+     &    neufluxy0,neufluxy1)
+ 
+c************************************************************************
+        implicit none
+c input arrays:
+      integer
+     &    ifirst0,ilast0,ifirst1,ilast1
+      integer bdry_type(0:2*NDIM-1)
+      double precision bdry_val(0:2*NDIM-1)
+c output arrays:
+      integer
+     &    flagx0(OUTERFACE2d0(ifirst,ilast,0)),
+     &    flagx1(OUTERFACE2d0(ifirst,ilast,0)),
+     &    flagy0(OUTERFACE2d1(ifirst,ilast,0)),
+     &    flagy1(OUTERFACE2d1(ifirst,ilast,0))
+      double precision
+     &    neufluxx0(OUTERFACE2d0(ifirst,ilast,0)),
+     &    neufluxx1(OUTERFACE2d0(ifirst,ilast,0)),
+     &    neufluxy0(OUTERFACE2d1(ifirst,ilast,0)),
+     &    neufluxy1(OUTERFACE2d1(ifirst,ilast,0))
+
+c
+c************************************************************************
+c
+      integer ic0,ic1 
+
+c  X lower & upper
+      do ic1 = ifirst1, ilast1
+         flagx0(ic1)    = bdry_type(0)
+         flagx1(ic1)    = bdry_type(1)
+         neufluxx0(ic1) = bdry_val(0)
+         neufluxx1(ic1) = bdry_val(1)
+      enddo
+
+c  Y lower & upper
+      do ic0 = ifirst0, ilast0
+         flagy0(ic0)    = bdry_type(2)
+         flagy1(ic0)    = bdry_type(3)
+         neufluxy0(ic0) = bdry_val(2)
+         neufluxy1(ic0) = bdry_val(3)
+      enddo
+
+
+      return
+      end
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/test/sundials/FACjacobian3d.m4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/sundials/FACjacobian3d.m4	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,155 @@
+define(NDIM,3)dnl
+include(SAMRAI_FORTDIR/pdat_m4arrdim3d.i)dnl
+
+      subroutine comprhs3d(
+     &  ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &  ngc0,ngc1,ngc2,
+     &  dx,
+     &  y,
+     &  diff0,
+     &  diff1,
+     &  diff2,
+     &  rhs)
+c***********************************************************************
+      implicit none
+      double precision one
+      parameter(one=1.d0)
+c***********************************************************************
+c input arrays:
+      integer ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer ngc0,ngc1,ngc2
+      double precision dt, dx(0:NDIM-1)
+      double precision
+     &  y(CELL3dVECG(ifirst,ilast,ngc)),
+     &  diff0(SIDE3d0(ifirst,ilast,0)),
+     &  diff1(SIDE3d1(ifirst,ilast,0)),
+     &  diff2(SIDE3d2(ifirst,ilast,0))
+c output arrays:
+      double precision
+     &  rhs(CELL3d(ifirst,ilast,0))
+c
+c***********************************************************************
+c
+      integer ic0,ic1,ic2
+      double precision dgrade0p, dgrade0m, 
+     &                 dgrade1p, dgrade1m,
+     &                 dgrade2p, dgrade2m
+
+c
+c  Computes RHS for 1 eqn radiation diffusion application
+c
+c      dE/dt = grad dot ( D(E)grad(E) ) = RHS
+c
+      do ic2=ifirst2,ilast2
+         do ic1=ifirst1,ilast1
+            do ic0=ifirst0,ilast0
+
+c        compute  D(E)grad(E) in X, Y, and Z
+
+            dgrade0p = diff0(ic0+1,ic1,ic2)/dx(0) *
+     &                 (y(ic0+1,ic1,ic2) - y(ic0,ic1,ic2))
+            dgrade0m = diff0(ic0,ic1,ic2)/dx(0) *
+     &                 (y(ic0,ic1,ic2) - y(ic0-1,ic1,ic2))
+            dgrade1p = diff1(ic0,ic1+1,ic2)/dx(1) *
+     &                 (y(ic0,ic1+1,ic2) - y(ic0,ic1,ic2))
+            dgrade1m = diff1(ic0,ic1,ic2)/dx(1) *
+     &                 (y(ic0,ic1,ic2) - y(ic0,ic1-1,ic2))
+            dgrade2p = diff2(ic0,ic1,ic2+1)/dx(2) *
+     &                 (y(ic0,ic1,ic2+1) - y(ic0,ic1,ic2))
+            dgrade2m = diff1(ic0,ic1,ic2)/dx(1) *
+     &                 (y(ic0,ic1,ic2) - y(ic0,ic1,ic2-1))
+
+c        compute  RHS
+
+            rhs(ic0,ic1,ic2) = (dgrade0p - dgrade0m)/dx(0) +
+     &                         (dgrade1p - dgrade1m)/dx(1) +
+     &                         (dgrade2p - dgrade2m)/dx(2)
+
+            enddo
+         enddo
+      enddo
+c
+      return
+      end
+c
+c
+
+c
+c************************************************************************
+c  Subroutine setneufluxvalues sets the outerface flag and neumann flux
+c  arrays.  The flag simply holds the boundary type (0-dirichlet, 
+c  1-neumann) and the neumann flux array holds the value of the 
+c  neumann flux.
+c************************************************************************
+        subroutine setneufluxvalues3d(
+     &    ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2,
+     &    bdry_type,
+     &    bdry_val,      
+     &    flagx0,flagx1,
+     &    flagy0,flagy1,
+     &    flagz0,flagz1,
+     &    neufluxx0,neufluxx1,
+     &    neufluxy0,neufluxy1,
+     &    neufluxz0,neufluxz1)
+ 
+c************************************************************************
+        implicit none
+c input arrays:
+      integer
+     &    ifirst0,ilast0,ifirst1,ilast1,ifirst2,ilast2
+      integer bdry_type(0:2*NDIM-1)
+      double precision bdry_val(0:2*NDIM-1)
+c output arrays:
+      integer
+     &    flagx0(OUTERFACE3d0(ifirst,ilast,0)),
+     &    flagx1(OUTERFACE3d0(ifirst,ilast,0)),
+     &    flagy0(OUTERFACE3d1(ifirst,ilast,0)),
+     &    flagy1(OUTERFACE3d1(ifirst,ilast,0)),
+     &    flagz0(OUTERFACE3d2(ifirst,ilast,0)),
+     &    flagz1(OUTERFACE3d2(ifirst,ilast,0))
+      double precision
+     &    neufluxx0(OUTERFACE3d0(ifirst,ilast,0)),
+     &    neufluxx1(OUTERFACE3d0(ifirst,ilast,0)),
+     &    neufluxy0(OUTERFACE3d1(ifirst,ilast,0)),
+     &    neufluxy1(OUTERFACE3d1(ifirst,ilast,0)),
+     &    neufluxz0(OUTERFACE3d2(ifirst,ilast,0)),
+     &    neufluxz1(OUTERFACE3d2(ifirst,ilast,0))
+
+c
+c************************************************************************
+c
+      integer ic0,ic1,ic2
+
+c  X lower & upper faces
+      do ic1 = ifirst1, ilast1
+         do ic2 = ifirst2, ilast2
+            flagx0(ic1,ic2) = bdry_type(0)
+            flagx1(ic1,ic2) = bdry_type(1)
+            neufluxx0(ic1,ic2) = bdry_val(0)
+            neufluxx1(ic1,ic2) = bdry_val(1)
+         enddo
+      enddo
+
+c  Y lower & upper faces
+      do ic2 = ifirst2, ilast2
+         do ic0 = ifirst0, ilast0
+            flagy0(ic2,ic0) = bdry_type(2)
+            flagy1(ic2,ic0) = bdry_type(3)
+            neufluxy0(ic2,ic0) = bdry_val(2)
+            neufluxy1(ic2,ic0) = bdry_val(3)
+         enddo
+      enddo
+
+c  Z lower & upper faces
+      do ic0 = ifirst0, ilast0
+         do ic1 = ifirst1, ilast1
+            flagz0(ic0,ic1) = bdry_type(4)
+            flagz1(ic0,ic1) = bdry_type(5)
+            neufluxz0(ic0,ic1) = bdry_val(4)
+            neufluxz1(ic0,ic1) = bdry_val(5)
+         enddo
+      enddo
+c
+      return
+      end
+c
diff -r 000000000000 -r 5eda1a3f24e8 source/test/sundials/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/sundials/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1223 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=CVODEModel.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryUtilityStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryDefines.h		\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryUtilities2.h	\
+	$(INCLUDE_SAM)/SAMRAI/appu/CartesianBoundaryUtilities3.h	\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/CoarseFineBoundary.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CVODEAbstractFunctions.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CartesianRobinBcHelper.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACOps.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACSolver.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACSolver.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACOperatorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/GhostCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SimpleCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SundialsAbstractVector.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/Sundials_SAMRAIVector.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/Sundials_SAMRAIVector.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h CVODEModel.C	\
+	CVODEModel.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=main.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryUtilityStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/CoarseFineBoundary.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BaseGriddingAlgorithm.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BergerRigoutsos.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/BoxGeneratorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/GriddingAlgorithmConnectorWidthRequestor.h\
+	$(INCLUDE_SAM)/SAMRAI/mesh/LoadBalanceStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.I		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitialize.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TagAndInitializeStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.I			\
+	$(INCLUDE_SAM)/SAMRAI/mesh/TreeLoadBalancer.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CVODEAbstractFunctions.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CVODESolver.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CartesianRobinBcHelper.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACOps.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACSolver.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACSolver.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACOperatorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/GhostCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SimpleCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SundialsAbstractVector.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/Sundials_SAMRAIVector.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/Sundials_SAMRAIVector.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RankGroup.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h CVODEModel.h	\
+	main.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=tbox_Pointer-CVODEModel.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/appu/BoundaryUtilityStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/CoarseFineBoundary.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Connector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/mesh/StandardTagAndInitStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDoubleConstantRefine.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CVODEAbstractFunctions.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CartesianRobinBcHelper.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACOps.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACSolver.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonFACSolver.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/CellPoissonHypreSolver.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACOperatorStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/FACPreconditioner.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/GhostCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PoissonSpecifications.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/RobinBcCoefStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SimpleCellRobinBcCoefs.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SundialsAbstractVector.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/Sundials_SAMRAIVector.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/Sundials_SAMRAIVector.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommStage.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Schedule.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Transaction.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/BoxGeometryVariableFillPattern.h	\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenPatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/PatchLevelFillPattern.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineAlgorithm.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.I			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineClasses.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefinePatchStrategy.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineSchedule.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineTransactionFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h		\
+	$(INCLUDE_SAM)/SAMRAI/xfer/VariableFillPattern.h CVODEModel.h	\
+	tbox_Pointer-CVODEModel.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/AsyncCommPeer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/sundials/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/sundials/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,79 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for cvode sample application 
+##
+#########################################################################
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/test/sundials
+VPATH         = @srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+default: check
+
+include $(OBJECT)/config/Makefile.config
+
+CPPFLAGS_EXTRA= -DDISPLAY -DNDIM=$(PDIM) -DTESTING=1
+
+CXX_OBJS      = main.o CVODEModel.o tbox_Pointer-CVODEModel.o
+F_OBJS        = FACjacobian2d.o FACjacobian3d.o 
+
+NUM_TESTS = 4
+
+TEST_NPROCS = @TEST_NPROCS@
+
+main:	$(CXX_OBJS) $(F_OBJS) $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) $(F_OBJS) \
+	$(LIBSAMRAI3D) $(LIBSAMRAI) $(LDLIBS) -o main
+
+checkcompile:   main
+
+check:
+	$(MAKE) check2d
+	$(MAKE) check3d
+
+check2d:	main
+	@for i in test_inputs/*2d*.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+check3d:	main
+	@for i in test_inputs/*3d*.input ; do	\
+	  $(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+		./main $${i};	\
+	done
+
+checktest:
+	rm -f makecheck.logfile
+	$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+	$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+	rm -f makecheck.logfile
+
+
+clean-check:
+	$(SAMCLEAN)
+
+clean:
+	$(RM) *.o main
+
+include $(SRCDIR)/Makefile.depend
+
+FORTRAN       = $(SRCDIR)
+M4DIRS        = -DFORTDIR=$(FORTRAN) $(SAMRAI_M4_FLAGS)
+
+FACjacobian2d.o:	$(FORTRAN)/FACjacobian2d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/FACjacobian2d.m4 > FACjacobian2d.f
+	$(F77) $(FFLAGS) -c FACjacobian2d.f -o $@
+
+FACjacobian3d.o:	$(FORTRAN)/FACjacobian3d.m4
+	$(M4) $(M4DIRS) $(FORTRAN)/FACjacobian3d.m4 > FACjacobian3d.f
+	$(F77) $(FFLAGS) -c FACjacobian3d.f -o $@
+
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/sundials/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/sundials/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,95 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   CVODE example
+##
+#########################################################################
+
+This example demonstrates use of CVODE vectors to solve the heat eqn. in
+SAMRAI.  The files included in this directory are as follows:
+ 
+          main.C               -  example main program
+          CVODEModel.[Ch]      -  example user routines that supply interface
+                                  methods to CVODE operations in the library 
+          cvode-[2d,3d].input  -  2d and 3d input files
+ 
+COMPILE and RUN
+---------------
+Compile:  make     
+Run:      main2d sundials-2d-[dir,neu].input                        
+
+"dir" indicates dirichlet BCs, while "neu" indicates neumann BCs.
+ 
+
+INPUTS:
+------------
+
+Each input file contains 4 sections to initialize the various objects 
+involved inthe test.
+
+The "Main" section includes the number of steps, the initial and final
+time, relative and absolute tolerance, the stepping method type, and
+specification of whether or not the case uses newton sub-iterations.
+An example input might look like:
+
+Main {
+   max_internal_steps = 500
+   init_time = 0.0
+   final_time = 1
+   relative_tolerance = 1e-15
+   absolute_tolerance = 1e-15
+   stepping_method = 0
+   uses_newton = TRUE
+}
+
+The "CVODEModel" section sets up the problem to be solved. It specifies 
+the problem type, the initial value and its type, the diffusion
+coefficient, and values of dirichlet boundary conditions.
+An example input might look like:
+
+CVODEModel {
+   Problem_type= 2
+   Initial_value_type = 0
+   Initial_value = 1.0
+   Diffusion_Coefficient = .1
+   Boundary_value = 0.0
+}
+
+The "Geometry" section describes the spatial layout of the problem.
+It specifies the domain boxes, which specify the index space, and
+the low and high spatial dimensions of the domain.  
+An example input might look like:
+
+Geometry {
+   domain_boxes  = [ (0,0) , (9,9) ]
+   x_lo          = 0.e0 , 0.e0  // lower end of computational domain.
+   x_up          = 1.e1 , 1.e1  // upper end of computational domain.
+}
+
+The "GriddingAlgorithm" section describes parameters used for 
+adaptive gridding.  It specifies the number of levels, the ratios
+between coarse and fine levels, and the largest and smallest allowed
+patch size.  An example input might look like:
+
+GriddingAlgorithm {
+   max_levels              = 1 // Maximum number of levels in hierarchy.
+
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2
+      level_2               = 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 10,10
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1,1
+      // all finer levels will use same values as level_0...
+   }
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller                                       // boxes < efficiency * vol of large box}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/sundials/example_inputs/cvode_dir.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/sundials/example_inputs/cvode_dir.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,140 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI CVODE test program 
+ *
+ ************************************************************************/
+
+Main {
+
+   init_time                = 0.0
+   print_interval           = 1.0e-2
+   num_print_intervals      = 25 
+   solution_logging         = TRUE 
+
+   max_internal_steps       = 100000
+   relative_tolerance       = 1e-4
+   absolute_tolerance       = 1e-4
+   max_order                = 0    
+// stepping_method          = timestepping mode for CVODE
+    NORMAL                  = 1
+    ONESTEP                 = 2
+   stepping_method          = NORMAL
+   uses_newton              = TRUE
+   uses_preconditioning     = TRUE 
+
+   viz_dump_filename        = "rad2d"
+   viz_dump_dirname         = "viz_rad2d"
+   viz_dump_interval        = 1        
+}
+
+CVODEModel {
+
+   initial_value         = 0.0
+
+   max_fac_its           = 1
+   fac_tol               = 1.e-40
+   max_hypre_its         = 1
+   hypre_tol             = 1.e-40
+
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "DIRICHLET"
+         val                     = 1.0
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "YDIRICHLET"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "YDIRICHLET"
+      }
+   }
+
+}
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (0,0) , (9,4) ]
+      level_1  = [ (0,0) , (19,4) ]
+      level_2  = [ (0,0) , (39,4) ]
+   }
+}
+
+TimerManager {
+   timer_list = "apps::main::*" 
+}
+
+Geometry {
+   domain_boxes  = [ (0,0) , (9,9) ]
+   x_lo          = 0.e0 , 0.e0  // lower end of computational domain.
+   x_up          = 5.e0 , 5.e0  // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 
+      level_2               = 2 , 2
+      level_3               = 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 8,8 
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1,1
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+LoadBalancer {
+//   processors         = 1 , 1
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/sundials/example_inputs/cvode_dir.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/sundials/example_inputs/cvode_dir.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,212 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI CVODE test program 
+ *
+ ************************************************************************/
+
+Main {
+
+   init_time                = 0.0
+   print_interval           = 1.0e-2
+   num_print_intervals      = 25 
+   solution_logging         = TRUE
+
+   max_internal_steps       = 100000
+   relative_tolerance       = 1e-4
+   absolute_tolerance       = 1e-4
+// 0=use default
+   max_order                = 0
+// stepping_method          = timestepping mode for CVODE
+    NORMAL                  = 1
+    ONESTEP                 = 2
+   stepping_method          = NORMAL
+   uses_newton              = TRUE
+   uses_preconditioning     = TRUE
+
+   viz_dump_filename        = "rad3d"
+   viz_dump_dirname         = "viz_rad3d"
+   viz_dump_interval        = 1
+
+}
+
+CVODEModel {
+   initial_value         = 0.0
+
+   max_fac_its           = 1
+   fac_tol               = 1.e-40
+   max_hypre_its         = 1
+   hypre_tol             = 1.e-40
+   use_neumann_bcs      = FALSE
+   print_solver_info    = FALSE
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   // and "NEUMANN"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      boundary_face_xhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      boundary_face_ylo {
+         boundary_condition      = "DIRICHLET"
+         val                     = 1.
+      }
+      boundary_face_yhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      boundary_face_zlo {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      boundary_face_zhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for an edge, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent face has either a FLOW
+      //            or REFLECT condition, the resulting edge boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YDIRICHLET"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YDIRICHLET"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YDIRICHLET"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YDIRICHLET"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent faces have either FLOW
+      //            or REFLECT conditions, the resulting node boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XDIRICHLET"
+      }
+
+   }
+}
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (0,0,0) , (9,4,9) ]
+      level_1  = [ (0,0,0) , (19,4,19) ]
+      level_2  = [ (0,0,0) , (39,4,39) ]
+   }
+}
+
+TimerManager {
+   timer_list = "apps::main::*"
+}
+
+Geometry {
+   domain_boxes  = [ (0,0,0) , (9,9,9) ]
+   x_lo          = 0.e0 , 0.e0 , 0.e0 // lower end of computational domain.
+   x_up          = 10. , 10. , 10. // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 , 2
+      level_2               = 2 , 2 , 2
+      level_3               = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 8 , 8 , 8
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 , 1
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+LoadBalancer {
+//   processors         = 1 , 1 , 1
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/sundials/example_inputs/cvode_neu.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/sundials/example_inputs/cvode_neu.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,143 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI CVODE test program 
+ *
+ ************************************************************************/
+
+Main {
+
+   init_time                = 0.0
+   print_interval           = 1.0e-2
+   num_print_intervals      = 25 
+   solution_logging         = TRUE
+
+   max_internal_steps       = 100000
+   relative_tolerance       = 1e-4
+   absolute_tolerance       = 1e-4
+// 0=use default
+   max_order                = 0    
+// stepping_method          = timestepping mode for CVODE
+    NORMAL                  = 1
+    ONESTEP                 = 2
+   stepping_method          = NORMAL
+   uses_newton              = TRUE
+   uses_preconditioning     = TRUE 
+
+   viz_dump_filename        = "rad2d"
+   viz_dump_dirname         = "viz_rad2d"
+   viz_dump_interval        = 1        
+}
+
+CVODEModel {
+
+   initial_value         = 0.0
+
+   max_fac_its           = 1
+   fac_tol               = 1.e-40
+   max_hypre_its         = 1
+   hypre_tol             = 1.e-40
+   use_neumann_bcs      = TRUE 
+   print_solver_info    = FALSE
+
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "NEUMANN"
+         val                     = 1.  
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "YDIRICHLET"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "YDIRICHLET"
+      }
+   }
+
+}
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (0,0) , (9,4) ]
+      level_1  = [ (0,0) , (19,4) ]
+      level_2  = [ (0,0) , (39,4) ]
+   }
+}
+
+TimerManager {
+   timer_list = "apps::main::*" 
+}
+
+Geometry {
+   domain_boxes  = [ (0,0) , (9,9) ]
+   x_lo          = 0.e0 , 0.e0  // lower end of computational domain.
+   x_up          = 5.e0 , 5.e0  // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 
+      level_2               = 2 , 2
+      level_3               = 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 20,20
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1,1
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+LoadBalancer {
+//   processors         = 1 , 1
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/sundials/example_inputs/cvode_neu.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/sundials/example_inputs/cvode_neu.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,212 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI CVODE test program 
+ *
+ ************************************************************************/
+
+Main {
+
+   init_time                = 0.0
+   print_interval           = 1.0e-2
+   num_print_intervals      = 25 
+   solution_logging         = TRUE
+
+   max_internal_steps       = 100000
+   relative_tolerance       = 1e-6
+   absolute_tolerance       = 1e-6
+// 0=use default
+   max_order                = 0
+// stepping_method          = timestepping mode for CVODE
+    NORMAL                  = 1
+    ONESTEP                 = 2
+   stepping_method          = NORMAL
+   uses_newton              = TRUE
+   uses_preconditioning     = TRUE
+
+   viz_dump_filename        = "rad3d"
+   viz_dump_dirname         = "viz_rad3d"
+   viz_dump_interval        = 1
+
+}
+
+CVODEModel {
+   initial_value         = 0.0
+
+   max_fac_its           = 1
+   fac_tol               = 1.e-40
+   max_hypre_its         = 1
+   hypre_tol             = 1.e-40
+   use_neumann_bcs      = TRUE
+   print_solver_info    = FALSE
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   // and "NEUMANN"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      boundary_face_xhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      boundary_face_ylo {
+         boundary_condition      = "NEUMANN"
+         val                     = 1.
+      }
+      boundary_face_yhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      boundary_face_zlo {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      boundary_face_zhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for an edge, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent face has either a FLOW
+      //            or REFLECT condition, the resulting edge boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YNEUMANN"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YNEUMANN"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YDIRICHLET"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YDIRICHLET"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent faces have either FLOW
+      //            or REFLECT conditions, the resulting node boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XDIRICHLET"
+      }
+
+   }
+}
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (0,0,0) , (9,4,9) ]
+      level_1  = [ (0,0,0) , (19,4,19) ]
+      level_2  = [ (0,0,0) , (39,4,39) ]
+   }
+}
+
+TimerManager {
+   timer_list = "apps::main::*"
+}
+
+Geometry {
+   domain_boxes  = [ (0,0,0) , (9,9,9) ]
+   x_lo          = 0.e0 , 0.e0 , 0.e0 // lower end of computational domain.
+   x_up          = 10. , 10. , 10. // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 , 2
+      level_2               = 2 , 2 , 2
+      level_3               = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 8 , 8 , 8
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 , 1
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+}
+
+LoadBalancer {
+//   processors         = 1 , 1 , 1
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/sundials/main.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/sundials/main.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,513 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program for testing Sundials/SAMRAI interface. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string>
+#include <fstream>
+
+using namespace std;
+
+using namespace std;
+
+#ifndef _MSC_VER
+#include <unistd.h>
+#endif
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/mesh/BergerRigoutsos.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/mesh/StandardTagAndInitialize.h"
+#include "SAMRAI/mesh/GriddingAlgorithm.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/tbox/InputDatabase.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchData.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/solv/SAMRAIVectorReal.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/mesh/TreeLoadBalancer.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+#include "SAMRAI/solv/SundialsAbstractVector.h"
+#include "SAMRAI/solv/CVODESolver.h"
+#include "SAMRAI/solv/Sundials_SAMRAIVector.h"
+#include "CVODEModel.h"
+
+// CVODE includes
+#ifdef HAVE_SUNDIALS
+#ifndef included_cvspgmr_h
+#define included_cvspgmr_h
+#include "cvode/cvode_spgmr.h"
+#endif
+#endif
+
+using namespace SAMRAI;
+
+/*
+ * The cvode_test program is a general skeleton for using the
+ * CVODESolver interface.  The main stages of this program are:
+ *
+ * (1)  Retrieving integration parameters from the input database.
+ * (2)  Creating hierarchy, geometry, gridding, and CVODEModel
+ *      objects.
+ * (3)  Setting up the hierarchy configuration (grid configuration).
+ * (4)  Setting the initial condition vector.
+ * (5)  Creating a CVODESolver object.
+ * (6)  Setting the integration parameters for CVODESolver.
+ * (7)  Printing out to the log file the initial condition vector
+ *      and computing some norm for checking purposes.
+ * (8)  Solving the ODE system.
+ * (9)  Printing out to the log file the solution vector produced
+ *      by CVODE and computing some norms.
+ * (10) Printing out the CVODE statistics.
+ * (11) Cleaning up the memory allocated for the program.
+ */
+
+int main(
+   int argc,
+   char* argv[])
+{
+
+   /*
+    * Initialize tbox::MPI and SAMRAI.  Enable logging.
+    */
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+      tbox::PIO::logAllNodes("cvode_test.log");
+
+#if !defined(HAVE_SUNDIALS) || !defined(HAVE_HYPRE)
+      tbox::pout << "Library compiled WITHOUT CVODE -and- HYPRE...\n"
+                 << "SAMRAI was not configured with one, or both, of "
+                 << "these packages.  Cannot run this example." << endl;
+#else
+
+      /*
+       * Process command line arguments.
+       */
+      string input_filename;
+
+      if (argc != 2) {
+         tbox::pout << "USAGE:  " << argv[0] << " <input filename> " << endl;
+         exit(-1);
+      } else {
+         input_filename = argv[1];
+      }
+
+      /*
+       * Create input database and parse all data in input file.
+       */
+      tbox::Pointer<tbox::Database> input_db(new tbox::InputDatabase("input_db"));
+      tbox::InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      /**************************************************************************
+      * Read input data and setup objects.
+      **************************************************************************/
+
+      /*
+       * Retreive "Main" section of input db.
+       */
+      tbox::Pointer<tbox::Database> main_db = input_db->getDatabase("Main");
+
+      const tbox::Dimension dim(static_cast<unsigned short>(main_db->getInteger("dim")));
+
+      int max_order = main_db->getInteger("max_order");
+      int max_internal_steps = main_db->getInteger("max_internal_steps");
+      double init_time = main_db->getDouble("init_time");
+      double print_interval = main_db->getDouble("print_interval");
+      int num_print_intervals = main_db->getInteger("num_print_intervals");
+
+      double relative_tolerance = main_db->getDouble("relative_tolerance");
+      double absolute_tolerance = main_db->getDouble("absolute_tolerance");
+      bool uses_newton = main_db->getBool("uses_newton");
+      int stepping_method = main_db->getInteger("stepping_method");
+      bool uses_preconditioning =
+         main_db->getBoolWithDefault("uses_preconditioning", false);
+      int viz_dump_interval =
+         main_db->getIntegerWithDefault("viz_dump_interval", 0);
+      bool solution_logging =
+         main_db->getBoolWithDefault("solution_logging", false);
+
+      string viz_dump_filename;
+      string viz_dump_dirname;
+      if (viz_dump_interval > 0) {
+         if (main_db->keyExists("viz_dump_filename")) {
+            viz_dump_filename = main_db->getString("viz_dump_filename");
+         }
+         if (main_db->keyExists("viz_dump_dirname")) {
+            viz_dump_dirname = main_db->getString("viz_dump_dirname");
+         }
+      }
+
+      /*
+       * Create geometry and hierarchy objects.
+       */
+      tbox::Pointer<geom::CartesianGridGeometry> geometry(
+         new geom::CartesianGridGeometry(
+            dim,
+            "Geometry",
+            input_db->
+            getDatabase("Geometry")));
+
+      tbox::Pointer<hier::PatchHierarchy> hierarchy(new hier::PatchHierarchy(
+                                                       "Hierarchy",
+                                                       geometry,
+                                                       input_db->getDatabase("PatchHierarchy")
+                                                       ));
+
+      /*
+       * Create gridding algorithm objects that will handle construction of
+       * of the patch levels in the hierarchy.
+       */
+      tbox::Pointer<CVODEModel> cvode_model(
+         new CVODEModel("CVODEModel",
+            dim,
+            input_db->getDatabase("CVODEModel"),
+            geometry));
+
+      tbox::Pointer<mesh::StandardTagAndInitialize> error_est(
+         new mesh::StandardTagAndInitialize(
+            dim,
+            "StandardTagAndInitialize",
+            cvode_model,
+            input_db->getDatabase("StandardTagAndInitialize")));
+
+      tbox::Pointer<mesh::BergerRigoutsos> box_generator(
+         new mesh::BergerRigoutsos(dim));
+
+      tbox::Pointer<mesh::TreeLoadBalancer> load_balancer(
+         new mesh::TreeLoadBalancer(
+            dim,
+            "LoadBalancer",
+            input_db->
+            getDatabase("LoadBalancer")));
+      load_balancer->setSAMRAI_MPI(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+      tbox::Pointer<mesh::GriddingAlgorithm> gridding_algorithm(
+         new mesh::GriddingAlgorithm(
+            hierarchy,
+            "GriddingAlgorithm",
+            input_db->getDatabase("GriddingAlgorithm"),
+            error_est,
+            box_generator,
+            load_balancer));
+
+      /*
+       * Setup hierarchy.
+       */
+      gridding_algorithm->makeCoarsestLevel(init_time);
+
+      tbox::Array<int> tag_buffer_array(hierarchy->getMaxNumberOfLevels());
+      for (int il = 0; il < hierarchy->getMaxNumberOfLevels(); il++) {
+         tag_buffer_array[il] = 1;
+      }
+
+      bool done = false;
+      bool initial_time = true;
+      for (int ln = 0; hierarchy->levelCanBeRefined(ln) && !done;
+           ln++) {
+         gridding_algorithm->makeFinerLevel(
+            init_time,
+            initial_time,
+            tag_buffer_array[ln]);
+         done = !(hierarchy->finerLevelExists(ln));
+      }
+
+      /*
+       * Setup timer manager for profiling code.
+       */
+      tbox::TimerManager::createManager(input_db->getDatabase("TimerManager"));
+      tbox::Pointer<tbox::Timer> t_cvode_solve =
+         tbox::TimerManager::getManager()->
+         getTimer("apps::main::cvode_solver");
+      tbox::Pointer<tbox::Timer> t_log_dump =
+         tbox::TimerManager::getManager()->
+         getTimer("apps::main::Solution log dump");
+      /*
+       * Setup solution vector.
+       */
+      cvode_model->setupSolutionVector(hierarchy);
+      SundialsAbstractVector* solution_vector =
+         cvode_model->getSolutionVector();
+
+      /*
+       * Set initial conditions vector.
+       */
+      cvode_model->setInitialConditions(solution_vector);
+
+      /**************************************************************************
+      * Setup CVODESolver object.
+      **************************************************************************/
+      solv::CVODESolver* cvode_solver =
+         new solv::CVODESolver("cvode_solver",
+            cvode_model,
+            uses_preconditioning);
+
+      int neq = 0;
+      tbox::Pointer<hier::PatchLevel> level_zero =
+         hierarchy->getPatchLevel(0);
+      hier::BoxArray level_0_boxes = level_zero->getBoxes();
+      for (int i = 0; i < level_0_boxes.getNumberOfBoxes(); i++) {
+         neq += level_0_boxes[i].size();
+      }
+      cvode_solver->setIterationType(uses_newton ? CV_NEWTON : CV_FUNCTIONAL);
+      //cvode_solver->setToleranceType(SV); // this is in craig's code, but
+      // causes mine to bomb.  Why??
+      cvode_solver->setRelativeTolerance(relative_tolerance);
+      cvode_solver->setAbsoluteTolerance(absolute_tolerance);
+      cvode_solver->setMaximumNumberOfInternalSteps(max_internal_steps);
+      cvode_solver->setSteppingMethod(stepping_method);
+      cvode_solver->setMaximumLinearMultistepMethodOrder(max_order);
+      if (uses_preconditioning) {
+         cvode_solver->setPreconditioningType(PREC_LEFT);
+      }
+
+      cvode_solver->setInitialValueOfIndependentVariable(init_time);
+      cvode_solver->setInitialConditionVector(solution_vector);
+      cvode_solver->initialize(solution_vector);
+
+      /*
+       * Print initial vector (if solution logging is enabled)
+       */
+      tbox::Pointer<solv::SAMRAIVectorReal<double> > y_init =
+         solv::Sundials_SAMRAIVector::getSAMRAIVector(solution_vector);
+
+      if (solution_logging) {
+
+         tbox::Pointer<hier::PatchHierarchy> init_hierarchy =
+            y_init->getPatchHierarchy();
+
+         tbox::pout << "Initial solution vector y() at initial time: " << endl;
+         int ln;
+         tbox::pout << "y(" << init_time << "): " << endl;
+         for (ln = 0; ln < init_hierarchy->getNumberOfLevels(); ln++) {
+            tbox::Pointer<hier::PatchLevel> level;
+
+            level = init_hierarchy->getPatchLevel(ln);
+            tbox::plog << "level = " << ln << endl;
+
+            for (hier::PatchLevel::Iterator p(level); p; p++) {
+               tbox::Pointer<hier::Patch> patch = *p;
+
+               tbox::Pointer<CellData<double> > y_data =
+                  y_init->getComponentPatchData(0, *patch);
+            }
+         }
+      }
+
+      /*
+       * Compute maxNorm and L1Norm of initial vector
+       */
+      if (solution_logging) {
+         tbox::pout << "\n\nBefore solve..." << endl;
+         tbox::pout << "Max Norm of y()= " << y_init->maxNorm() << endl;
+         tbox::pout << "L1 Norm of y()= " << y_init->L1Norm() << endl;
+         tbox::pout << "L2 Norm of y()= " << y_init->L2Norm() << endl;
+      }
+
+      /**************************************************************************
+      * Start time-stepping.
+      **************************************************************************/
+
+      tbox::Array<double> time(num_print_intervals);
+      tbox::Array<double> maxnorm(num_print_intervals);
+      tbox::Array<double> l1norm(num_print_intervals);
+      tbox::Array<double> l2norm(num_print_intervals);
+
+      double final_time = init_time;
+      int interval;
+      for (interval = 1; interval <= num_print_intervals; interval++) {
+
+         /*
+          * Set time interval
+          */
+         final_time += print_interval;
+         cvode_solver->setFinalValueOfIndependentVariable(final_time, false);
+
+         /*
+          * Perform CVODE solve to the requested interval time.
+          */
+         t_cvode_solve->start();
+         tbox::plog << "return code = " << cvode_solver->solve() << endl;
+         t_cvode_solve->stop();
+         double actual_time =
+            cvode_solver->getActualFinalValueOfIndependentVariable();
+
+         /*
+          * Print statistics
+          * Format:  time  max norm   l1 norm   l2 norm
+          */
+         tbox::Pointer<solv::SAMRAIVectorReal<double> > y_result =
+            solv::Sundials_SAMRAIVector::getSAMRAIVector(solution_vector);
+         tbox::Pointer<hier::PatchHierarchy> result_hierarchy =
+            y_result->getPatchHierarchy();
+
+         time[interval - 1] = actual_time;
+         maxnorm[interval - 1] = y_result->maxNorm();
+         l1norm[interval - 1] = y_result->L1Norm();
+         l2norm[interval - 1] = y_result->L2Norm();
+
+         if (solution_logging) {
+            cvode_solver->printStatistics(tbox::pout);
+         }
+
+         /*
+          * Write solution (if desired).
+          */
+         if (solution_logging) {
+            tbox::plog << "y(" << final_time << "): " << endl << endl;
+            t_log_dump->start();
+            for (int ln = 0; ln < result_hierarchy->getNumberOfLevels();
+                 ln++) {
+               tbox::Pointer<hier::PatchLevel> level;
+
+               level = result_hierarchy->getPatchLevel(ln);
+               tbox::plog << "level = " << ln << endl;
+
+               for (hier::PatchLevel::Iterator p(level); p; p++) {
+                  tbox::Pointer<hier::Patch> patch = *p;
+
+                  tbox::Pointer<CellData<double> > y_data =
+                     y_result->getComponentPatchData(0, *patch);
+                  y_data->print(y_data->getBox());
+               }
+            }
+            t_log_dump->stop();
+         }
+      } // end of timestep loop
+
+      /*************************************************************************
+       * Write summary information
+       ************************************************************************/
+      /*
+       * Write CVODEModel stats
+       */
+      tbox::Array<int> counters;
+      cvode_model->getCounters(counters);
+
+#if (TESTING == 1)
+      int correct_rhs_evals = main_db->getInteger("correct_rhs_evals");
+      int correct_precond_setups = main_db->getInteger("correct_precond_setups");
+      int correct_precond_solves = main_db->getInteger("correct_precond_solves");
+
+      if (counters[0] == correct_rhs_evals) {
+         tbox::plog << "Test 0: Number RHS evals CORRECT" << endl;
+      } else {
+         tbox::perr << "Test 0 FAILED: Number RHS evals INCORRECT" << endl;
+         tbox::perr << "Correct Number RHS evals:  " << correct_rhs_evals
+                    << endl;
+         tbox::perr << "Number RHS evals computed: " << counters[0] << endl;
+      }
+
+      if (counters[1] == correct_precond_setups) {
+         tbox::plog << "Test 1: Number precond setups CORRECT" << endl;
+      } else {
+         tbox::perr << "Test 1 FAILED: Number precond setups INCORRECT" << endl;
+         tbox::perr << "Correct number precond setups:  "
+                    << correct_precond_setups << endl;
+         tbox::perr << "Number precond setups computed: " << counters[1]
+         << endl;
+      }
+
+      if (counters[2] == correct_precond_solves) {
+         tbox::plog << "Test 2: Number precond solves CORRECT" << endl;
+      } else {
+         tbox::perr << "Test 2 FAILED: Number precond solves INCORRECT" << endl;
+         tbox::perr << "Correct number precond solves:  "
+                    << correct_precond_solves << endl;
+         tbox::perr << "Number precond solves computed: " << counters[2]
+         << endl;
+      }
+#endif
+
+      if (solution_logging) {
+         tbox::plog << "\n\nEnd Timesteps - final time = " << final_time
+         << "\n\tTotal number of RHS evaluations = " << counters[0]
+         << "\n\tTotal number of precond setups = " << counters[1]
+         << "\n\tTotal number of precond solves = " << counters[2]
+         << endl;
+
+         /*
+          * Write out timestep sequence information
+          */
+         tbox::pout << "\n\nTimestep Summary of solution vector y()\n"
+                    << "  time                   \t"
+                    << "  Max Norm  \t"
+                    << "  L1 Norm  \t"
+                    << "  L2 Norm  " << endl;
+
+         for (interval = 0; interval < num_print_intervals; interval++) {
+            tbox::pout.precision(18);
+            tbox::pout << "  " << time[interval] << "  \t";
+            tbox::pout.precision(6);
+            tbox::pout << "  " << maxnorm[interval] << "  \t"
+            << "  " << l1norm[interval] << "  \t"
+            << "  " << l2norm[interval] << endl;
+         }
+      }
+
+      /*
+       * Write out timings
+       */
+#if (TESTING != 1)
+      tbox::TimerManager::getManager()->print(tbox::pout);
+#endif
+
+      /*
+       * Memory cleanup.
+       */
+      if (cvode_solver) delete cvode_solver;
+
+      cvode_model.setNull();
+      gridding_algorithm.setNull();
+      error_est.setNull();
+      load_balancer.setNull();
+      box_generator.setNull();
+      hierarchy.setNull();
+      geometry.setNull();
+
+#endif // HAVE_SUNDIALS
+
+      tbox::pout << "\nPASSED:  cvode" << endl;
+
+   }
+
+   /*
+    * Shutdown SAMRAI and tbox::MPI.
+    */
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return 0;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/sundials/tbox_Pointer-CVODEModel.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/sundials/tbox_Pointer-CVODEModel.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,21 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright
+ * information, see COPYRIGHT and COPYING.LESSER.
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   
+ *
+ ************************************************************************/
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Pointer.C"
+#include "CVODEModel.h"
+
+#if defined(HAVE_SUNDIALS) && defined(HAVE_HYPRE)
+
+namespace SAMRAI {
+
+template class tbox::Pointer<CVODEModel>;
+
+}
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 source/test/sundials/test_inputs/cvode_dir.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/sundials/test_inputs/cvode_dir.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,149 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI CVODE test program 
+ *
+ ************************************************************************/
+
+Main {
+
+   dim                      = 2
+
+   init_time                = 0.0
+   print_interval           = 1.0e-2
+   num_print_intervals      = 10
+   solution_logging         = FALSE
+
+   max_internal_steps       = 100000
+   relative_tolerance       = 1e-4
+   absolute_tolerance       = 1e-4
+// // 0=use default
+   max_order                = 0
+// stepping_method          = timestepping mode for CVODE
+    NORMAL                  = 1
+    ONESTEP                 = 2
+   stepping_method          = NORMAL
+   uses_newton              = TRUE
+   uses_preconditioning     = TRUE 
+
+   viz_dump_filename        = "rad2d"
+   viz_dump_dirname         = "viz_rad2d"
+   viz_dump_interval        = 0        
+
+// Used for testing only
+   correct_rhs_evals        = 678
+   correct_precond_setups   = 507
+   correct_precond_solves   = 337
+}
+
+CVODEModel {
+
+   initial_value         = 0.0
+
+   max_fac_its           = 1
+   fac_tol               = 1.e-40
+   max_hypre_its         = 1
+   hypre_tol             = 1.e-40
+
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "DIRICHLET"
+         val                     = 1.0
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "YDIRICHLET"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "YDIRICHLET"
+      }
+   }
+
+}
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (0,0) , (9,4) ]
+      level_1  = [ (0,0) , (19,4) ]
+      level_2  = [ (0,0) , (39,4) ]
+   }
+}
+
+TimerManager {
+   timer_list = "apps::main::*" 
+}
+
+Geometry {
+   domain_boxes  = [ (0,0) , (9,9) ]
+   x_lo          = 0.e0 , 0.e0  // lower end of computational domain.
+   x_up          = 5.e0 , 5.e0  // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 
+      level_2               = 2 , 2
+      level_3               = 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 8,8 
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1,1
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+
+}
+
+LoadBalancer {
+//   processors         = 1 , 1
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/sundials/test_inputs/cvode_dir.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/sundials/test_inputs/cvode_dir.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,220 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI CVODE test program 
+ *
+ ************************************************************************/
+
+Main {
+
+   dim                      = 3
+
+   init_time                = 0.0
+   print_interval           = 1.0e-2
+   num_print_intervals      = 10
+   solution_logging         = FALSE
+
+   max_internal_steps       = 100000
+   relative_tolerance       = 1e-4
+   absolute_tolerance       = 1e-4
+// 0=use default
+   max_order                = 0
+// stepping_method          = timestepping mode for CVODE
+    NORMAL                  = 1
+    ONESTEP                 = 2
+   stepping_method          = NORMAL
+   uses_newton              = TRUE
+   uses_preconditioning     = TRUE
+
+   viz_dump_filename        = "rad3d"
+   viz_dump_dirname         = "viz_rad3d"
+   viz_dump_interval        = 0
+
+// Used for testing only
+   correct_rhs_evals        = 211
+   correct_precond_setups   = 156
+   correct_precond_solves   = 103
+
+}
+
+CVODEModel {
+   initial_value         = 0.0
+
+   max_fac_its           = 1
+   fac_tol               = 1.e-40
+   max_hypre_its         = 1
+   hypre_tol             = 1.e-40
+   use_neumann_bcs      = FALSE
+   print_solver_info    = FALSE
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   // and "NEUMANN"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      boundary_face_xhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      boundary_face_ylo {
+         boundary_condition      = "DIRICHLET"
+         val                     = 1.
+      }
+      boundary_face_yhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      boundary_face_zlo {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      boundary_face_zhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for an edge, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent face has either a FLOW
+      //            or REFLECT condition, the resulting edge boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YDIRICHLET"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YDIRICHLET"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YDIRICHLET"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YDIRICHLET"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent faces have either FLOW
+      //            or REFLECT conditions, the resulting node boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XDIRICHLET"
+      }
+
+   }
+}
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (0,0,0) , (9,4,9) ]
+      level_1  = [ (0,0,0) , (19,4,19) ]
+      level_2  = [ (0,0,0) , (39,4,39) ]
+   }
+}
+
+TimerManager {
+   timer_list = "apps::main::*"
+}
+
+Geometry {
+   domain_boxes  = [ (0,0,0) , (9,9,9) ]
+   x_lo          = 0.e0 , 0.e0 , 0.e0 // lower end of computational domain.
+   x_up          = 10. , 10. , 10. // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 , 2
+      level_2               = 2 , 2 , 2
+      level_3               = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 8 , 8 , 8
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 , 1
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+
+}
+
+LoadBalancer {
+//   processors         = 1 , 1 , 1
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/sundials/test_inputs/cvode_neu.2d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/sundials/test_inputs/cvode_neu.2d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,151 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI CVODE test program 
+ *
+ ************************************************************************/
+
+Main {
+
+   dim                      = 2
+
+   init_time                = 0.0
+   print_interval           = 1.0e-2
+   num_print_intervals      = 10
+   solution_logging         = FALSE
+
+   max_internal_steps       = 100000
+   relative_tolerance       = 1e-4
+   absolute_tolerance       = 1e-4
+// 0=use default
+   max_order                = 0    
+// stepping_method          = timestepping mode for CVODE
+    NORMAL                  = 1
+    ONESTEP                 = 2
+   stepping_method          = NORMAL
+   uses_newton              = TRUE
+   uses_preconditioning     = TRUE 
+
+   viz_dump_filename        = "rad2d"
+   viz_dump_dirname         = "viz_rad2d"
+   viz_dump_interval        = 0        
+
+// Used for testing only
+   correct_rhs_evals        = 927
+   correct_precond_setups   = 718
+   correct_precond_solves   = 512
+}
+
+CVODEModel {
+
+   initial_value         = 0.0
+
+   max_fac_its           = 1
+   fac_tol               = 1.e-40
+   max_hypre_its         = 1
+   hypre_tol             = 1.e-40
+   use_neumann_bcs      = TRUE 
+   print_solver_info    = FALSE
+
+   Boundary_data {
+      boundary_edge_xlo {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      boundary_edge_xhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      boundary_edge_ylo {
+         boundary_condition      = "NEUMANN"
+         val                     = 1.  
+      }
+      boundary_edge_yhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent edge above.  This is enforced for
+      //            consistency.  However, note when a REFLECT edge condition
+      //            is given and the other adjacent edge has either a FLOW
+      //            or REFLECT condition, the resulting node boundary values
+      //            will be the same regardless of which edge is used.
+      boundary_node_xlo_ylo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_ylo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xlo_yhi {
+         boundary_condition      = "YDIRICHLET"
+      }
+      boundary_node_xhi_yhi {
+         boundary_condition      = "YDIRICHLET"
+      }
+   }
+
+}
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (0,0) , (9,4) ]
+      level_1  = [ (0,0) , (19,4) ]
+      level_2  = [ (0,0) , (39,4) ]
+   }
+}
+
+TimerManager {
+   timer_list = "apps::main::*" 
+}
+
+Geometry {
+   domain_boxes  = [ (0,0) , (9,9) ]
+   x_lo          = 0.e0 , 0.e0  // lower end of computational domain.
+   x_up          = 5.e0 , 5.e0  // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 
+      level_2               = 2 , 2
+      level_3               = 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 20,20
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1,1
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+
+}
+
+LoadBalancer {
+//   processors         = 1 , 1
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/sundials/test_inputs/cvode_neu.3d.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/sundials/test_inputs/cvode_neu.3d.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,220 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for SAMRAI CVODE test program 
+ *
+ ************************************************************************/
+
+Main {
+
+   dim                      = 3
+
+   init_time                = 0.0
+   print_interval           = 1.0e-2
+   num_print_intervals      = 10
+   solution_logging         = FALSE
+
+   max_internal_steps       = 1500
+   relative_tolerance       = 1e-6
+   absolute_tolerance       = 1e-6
+// 0=use default
+   max_order                = 0
+// stepping_method          = timestepping mode for CVODE
+    NORMAL                  = 1
+    ONESTEP                 = 2
+   stepping_method          = NORMAL
+   uses_newton              = TRUE
+   uses_preconditioning     = TRUE
+
+   viz_dump_filename        = "rad3d"
+   viz_dump_dirname         = "viz_rad3d"
+   viz_dump_interval        = 0
+
+// Used for testing only
+   correct_rhs_evals        = 498
+   correct_precond_setups   = 372
+   correct_precond_solves   = 246
+
+}
+
+CVODEModel {
+   initial_value         = 0.0
+
+   max_fac_its           = 1
+   fac_tol               = 1.e-40
+   max_hypre_its         = 1
+   hypre_tol             = 1.e-40
+   use_neumann_bcs      = TRUE
+   print_solver_info    = FALSE
+
+   // valid boundary_condition values are "FLOW", "REFLECT", "DIRICHLET"
+   // and "NEUMANN"
+   Boundary_data {
+      boundary_face_xlo {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      boundary_face_xhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      boundary_face_ylo {
+         boundary_condition      = "NEUMANN"
+         val                     = 1.
+      }
+      boundary_face_yhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      boundary_face_zlo {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+      boundary_face_zhi {
+         boundary_condition      = "DIRICHLET"
+         val                     = 0.
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for an edge, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent face has either a FLOW
+      //            or REFLECT condition, the resulting edge boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_edge_ylo_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_yhi_zlo { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_ylo_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_yhi_zhi { // XFLOW, XREFLECT, XDIRICHLET not allowed
+         boundary_condition      = "ZDIRICHLET"
+      }
+      boundary_edge_xlo_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_edge_xlo_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_edge_xhi_zlo { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_edge_xhi_zhi { // YFLOW, YREFLECT, YDIRICHLET not allowed
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_edge_xlo_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YNEUMANN"
+      }
+      boundary_edge_xhi_ylo { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YNEUMANN"
+      }
+      boundary_edge_xlo_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YDIRICHLET"
+      }
+      boundary_edge_xhi_yhi { // ZFLOW, ZREFLECT, ZDIRICHLET not allowed
+         boundary_condition      = "YDIRICHLET"
+      }
+
+      // IMPORTANT: If a *REFLECT, *DIRICHLET, or *FLOW condition is given
+      //            for a node, the condition must match that of the
+      //            appropriate adjacent face above.  This is enforced for
+      //            consistency.  However, note when a REFLECT face condition
+      //            is given and the other adjacent faces have either FLOW
+      //            or REFLECT conditions, the resulting node boundary values
+      //            will be the same regardless of which face is used.
+
+      boundary_node_xlo_ylo_zlo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_ylo_zlo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xlo_yhi_zlo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_yhi_zlo {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xlo_ylo_zhi {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_ylo_zhi {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xlo_yhi_zhi {
+         boundary_condition      = "XDIRICHLET"
+      }
+      boundary_node_xhi_yhi_zhi {
+         boundary_condition      = "XDIRICHLET"
+      }
+
+   }
+}
+
+StandardTagAndInitialize{
+   tagging_method = "REFINE_BOXES"
+   RefineBoxes {
+      level_0  = [ (0,0,0) , (9,4,9) ]
+      level_1  = [ (0,0,0) , (19,4,19) ]
+      level_2  = [ (0,0,0) , (39,4,39) ]
+   }
+}
+
+TimerManager {
+   timer_list = "apps::main::*"
+}
+
+Geometry {
+   domain_boxes  = [ (0,0,0) , (9,9,9) ]
+   x_lo          = 0.e0 , 0.e0 , 0.e0 // lower end of computational domain.
+   x_up          = 10. , 10. , 10. // upper end of computational domain.
+}
+
+PatchHierarchy {
+   max_levels              = 2 // Maximum number of levels in hierarchy.
+
+// Note: For the following regridding information, data is required for each
+//       potential in the patch hierarchy; i.e., levels 0 thru max_levels-1.
+//       If more data values than needed are given, only the number required
+//       will be read in.  If fewer values are given, an error will result.
+//
+// Specify coarsening ratios for each level 1 through max_levels-1
+   ratio_to_coarser {         // vector ratio to next coarser level
+      level_1               = 2 , 2 , 2
+      level_2               = 2 , 2 , 2
+      level_3               = 2 , 2 , 2
+   }
+
+   largest_patch_size {
+      level_0 = 8 , 8 , 8
+      // all finer levels will use same values as level_0...
+   }
+
+   smallest_patch_size {
+      level_0 = 1 , 1 , 1
+      // all finer levels will use same values as level_0...
+   }
+
+}
+
+GriddingAlgorithm {
+
+   efficiency_tolerance     = 0.70e0   // min % of tag cells in new patch level
+   combine_efficiency       = 0.85e0   // chop box if sum of volumes of smaller
+                                       // boxes < efficiency * vol of large box
+
+}
+
+LoadBalancer {
+//   processors         = 1 , 1 , 1
+   use_spatial_bin_pack = TRUE
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/testtools/testcount.sh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/testtools/testcount.sh	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,17 @@
+#!/bin/sh
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   script for testing the number of tests passed 
+##
+#########################################################################
+
+num_tests=`echo $1 |  sed -e 's/,/ /g' | wc -w`
+num_tests=`expr $num_tests \* $2`
+num_passed=`grep PASSED $3 | wc -l`
+if test $num_tests -ne $num_passed; 
+   then echo "FAILED:  Count of passed tests in directory " `pwd` " passed was $num_passed expected $num_tests"
+fi
diff -r 000000000000 -r 5eda1a3f24e8 source/test/timers/Foo.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/timers/Foo.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,196 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Routine to time some routines in the dummy class Foo. 
+ *
+ ************************************************************************/
+#include "Foo.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#define LOOP_MAX (10000000)
+
+Foo::Foo()
+{
+   d_depth = 0;
+   d_max_depth = 0;
+}
+
+Foo::~Foo()
+{
+}
+
+void Foo::timerOff()
+{
+   tbox::Pointer<tbox::Timer> timer = tbox::TimerManager::getManager()->
+      getTimer("dummy::SomeClassName::shouldBeTurnedOff");
+   timer->start();
+
+   timer->stop();
+}
+
+void Foo::timerOn()
+{
+   tbox::Pointer<tbox::Timer> timer =
+      tbox::TimerManager::getManager()->
+      getTimer("apps::Foo::timerOn()");
+   timer->start();
+
+   timer->stop();
+}
+
+void Foo::zero(
+   int depth)
+{
+   tbox::Pointer<tbox::Timer> timer =
+      tbox::TimerManager::getManager()->
+      getTimer("apps::Foo::zero()");
+   if (depth > 0) {
+      timer->start();
+      one(depth);
+      timer->stop();
+   }
+}
+
+void Foo::one(
+   int depth)
+{
+   tbox::Pointer<tbox::Timer> timer =
+      tbox::TimerManager::getManager()->
+      getTimer("apps::Foo::one()");
+   if (depth > 1) {
+      timer->start();
+      two(depth);
+      timer->stop();
+   }
+}
+
+void Foo::two(
+   int depth)
+{
+   tbox::Pointer<tbox::Timer> timer =
+      tbox::TimerManager::getManager()->
+      getTimer("apps::Foo::two()");
+   if (depth > 2) {
+      timer->start();
+      three(depth);
+      timer->stop();
+   }
+}
+
+void Foo::three(
+   int depth)
+{
+   tbox::Pointer<tbox::Timer> timer =
+      tbox::TimerManager::getManager()->
+      getTimer("apps::Foo::three()");
+   if (depth > 3) {
+      timer->start();
+      four(depth);
+      timer->stop();
+   }
+}
+
+void Foo::four(
+   int depth)
+{
+   tbox::Pointer<tbox::Timer> timer =
+      tbox::TimerManager::getManager()->
+      getTimer("apps::Foo::four()");
+   if (depth > 4) {
+      timer->start();
+      five(depth);
+      timer->stop();
+   }
+}
+
+void Foo::five(
+   int depth)
+{
+   tbox::Pointer<tbox::Timer> timer =
+      tbox::TimerManager::getManager()->
+      getTimer("apps::Foo::five()");
+   if (depth > 5) {
+      timer->start();
+      six(depth);
+      timer->stop();
+   }
+}
+
+void Foo::six(
+   int depth)
+{
+   tbox::Pointer<tbox::Timer> timer =
+      tbox::TimerManager::getManager()->
+      getTimer("apps::Foo::six()");
+   if (depth > 6) {
+      timer->start();
+      seven(depth);
+      timer->stop();
+   }
+}
+
+void Foo::seven(
+   int depth)
+{
+   tbox::Pointer<tbox::Timer> timer =
+      tbox::TimerManager::getManager()->
+      getTimer("apps::Foo::seven()");
+
+   NULL_USE(timer);
+
+   if (depth > 7) {
+      TBOX_ERROR("Seven levels is maximum implemented in Foo."
+         << "\n please reset exclusive_time_level to something <= 7.");
+   }
+}
+
+void Foo::startAndStop(
+   std::string& name)
+{
+   tbox::Pointer<tbox::Timer> timer =
+      tbox::TimerManager::getManager()->getTimer(name);
+   timer->start();
+
+   timer->stop();
+}
+
+void Foo::setMaxDepth(
+   int max_depth)
+{
+   d_max_depth = max_depth;
+}
+
+void Foo::start(
+   std::string& name)
+{
+   d_depth++;
+
+   tbox::Pointer<tbox::Timer> timer =
+      tbox::TimerManager::getManager()->getTimer(name);
+   timer->start();
+
+#ifndef LACKS_SSTREAM
+   std::ostringstream osst;
+   osst << d_depth;
+   std::string out = osst.str();
+   if (d_depth < d_max_depth) {
+      start(out);
+   }
+
+   stop(out);
+#endif
+}
+
+void Foo::stop(
+   std::string& name)
+{
+   tbox::Pointer<tbox::Timer> timer =
+      tbox::TimerManager::getManager()->getTimer(name);
+   timer->stop();
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/timers/Foo.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/timers/Foo.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,71 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Simple example to demonstrate input/restart of patch data. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <string>
+
+#define included_String
+#include "SAMRAI/tbox/Serializable.h"
+
+using namespace SAMRAI;
+
+class Foo
+{
+public:
+   Foo();
+   ~Foo();
+
+   void
+   timerOff();
+   void
+   timerOn();
+   void
+   zero(
+      int depth);
+   void
+   one(
+      int depth);
+   void
+   two(
+      int depth);
+   void
+   three(
+      int depth);
+   void
+   four(
+      int depth);
+   void
+   five(
+      int depth);
+   void
+   six(
+      int depth);
+   void
+   seven(
+      int depth);
+   void
+   startAndStop(
+      std::string& name);
+   void
+   setMaxDepth(
+      int max_depth);
+   void
+   start(
+      std::string& name);
+   void
+   stop(
+      std::string& name);
+
+private:
+   int d_depth;
+   int d_max_depth;
+
+};
diff -r 000000000000 -r 5eda1a3f24e8 source/test/timers/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/timers/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,218 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=Foo.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h Foo.C Foo.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=main_example.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h main_example.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
+FILE_2=main_stats.o
+DEPENDS_2:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistic.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Statistician.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h main_stats.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_2 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_2:X.o=${NDIM}.o}: ${DEPENDS_2}
+
+FILE_3=main_timer.o
+DEPENDS_3:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/InputManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/RestartManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/TimerManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h Foo.h main_timer.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_3 +=\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_3:X.o=${NDIM}.o}: ${DEPENDS_3}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/timers/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/timers/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,68 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for timer and statistician test programs 
+##
+#########################################################################
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = source/test/timers
+VPATH         = @srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+default: check
+
+include $(OBJECT)/config/Makefile.config
+
+CPPFLAGS_EXTRA= -DTESTING=1
+
+timertest:  main_timer.o Foo.o $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) main_timer.o Foo.o \
+	$(LIBSAMRAI) $(LDLIBS) -o timertest
+
+statstest:  main_stats.o $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) main_stats.o \
+	$(LIBSAMRAI) $(LDLIBS) -o statstest
+
+example: main_example.o $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) main_example.o \
+	$(LIBSAMRAI) $(LDLIBS) -o example
+
+NUM_TESTS = 3
+
+TEST_NPROCS = @TEST_NPROCS@
+
+checkcompile: timertest statstest example
+
+check:  checkcompile
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+                ./timertest test_inputs/test.input; \
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+                ./timertest test_inputs/test.input restart 0; \
+	$(OBJECT)/config/serpa-run $(TEST_NPROCS) \
+                ./statstest 
+
+check2d:
+	$(MAKE) check
+
+check3d:
+	$(MAKE) check
+
+checktest:
+	rm -f makecheck.logfile
+	$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+	$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+	rm -f makecheck.logfile
+
+
+clean:
+	$(SAMCLEAN)
+	$(RM) timertest statstest timermaxtest
+	$(RM) -rf *.log.* stats
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/test/timers/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/timers/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,80 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   README file for timer tests.
+##
+#########################################################################
+
+This test case tests the functionality of the timer and statistician
+classes in SAMRAI.
+
+Compilation: 
+             make                     
+             make timertest (generates timer_test)
+             make statstest (generates stats_test)
+
+Execution:   
+             serial               - ./timer_test input.file
+             serial (restarted)   - ./timer_test input.file restart 0 1
+             parallel             - mpirun -np <procs> [necessary options] [above serial cmd]
+
+             The necessary options are those required by MPI to run the
+             executable.  For example, on the CASC Sun Cluster, one needs
+             to specify the machines that will run the MPI processes in
+             a file and use the -machinefile <filename> option.
+
+timer_test: (What it does)
+
+             This test will measure the time per call to invoke timers in your code.
+             To run, set the following two variables in the input file:
+                	ntimes - number of times timer is called
+                        exclusive_tree_depth - depth of exclusive timers
+
+             Run #1:                           Run #2:
+		print_exclusive  = FALSE           = TRUE
+                print_concurrent = FALSE           = TRUE
+             Output to log file will show wallclock time for the calls.  Time per call
+             is computed as follows:
+        
+             unregistered timer = wall time for apps::main::timer_off/ntimes
+             registered timer =  Run #1: wall time for apps:main:timer_on/ntimes
+             exclusive timer =   Run #2: wall time for apps::main:exclusive_timer/
+                                              (ntimes*exclusive_tree_depth)
+
+             The following are results measured on some systems we support,
+             with ntimes = 1000, exclusive_timer_depth = 5.
+
+             ------------------------------------------------------------------
+             Sun Ultra 10 Workstation 
+             (debug, KCC)
+                                       EXCLUSIVE OFF            EXCLUSIVE ON 
+                unregistered timer    4.30e-7 sec/call         3.80e-7 sec/call
+                registered timer      1.09e-5 sec/call         1.58e-5 sec/call
+                exclusive timer       1.10e-5 sec/call         3.54e-5 sec/call
+
+             ------------------------------------------------------------------
+             DEC Alpha (Compass cluster)
+             (optimized, KCC)
+                                       EXCLUSIVE OFF            EXCLUSIVE ON 
+                unregistered timer    0       sec/call         0       sec/call
+                registered timer      2.34e-5 sec/call         4.10e-5 sec/call
+                exclusive timer       2.38e-5 sec/call         7.01e-5 sec/call
+
+             ------------------------------------------------------------------
+             IBM SP (ASCI Blue Pacific)
+             (optimized, mpKCC)
+                                       EXCLUSIVE OFF            EXCLUSIVE ON 
+                unregistered timer    5.00e-7 sec/call         3.70e-7 sec/call
+                registered timer      1.40e-5 sec/call         3.90e-5 sec/call
+                exclusive timer       4.00e-5 sec/call         4.02e-5 sec/call
+
+stats_test:
+            Mimics an actual time dependent integration loop by building a  
+            statistician object that records current simulation time and some
+            dummy integer value (e.g. could be gridpoints).  Outputs this to
+            log file at the end.
+
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/timers/README.example
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/timers/README.example	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,74 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   Timer example
+##
+#########################################################################
+
+This example demonstrates use of timers in a SAMRAI application. 
+The files included in this directory are as follows:
+ 
+          main.C         -  example main program
+          default.input  -  input file
+ 
+COMPILE and RUN
+---------------
+Compile:  make     
+Run:      timers default.input                         
+ 
+
+INPUTS:
+------------
+  
+   The only component requiring input is the TimerManager.  The input 
+   options for the TimerManager are discussed below.  The TYPE is
+   shown in (parenthesis) and the DEFAULT setting (value set if no input
+   is given) for the option is shown in [brackets].  Required inputs are
+   designated by [REQD].
+
+   TimerManager{
+      // Specify which timers to invoke
+      // timer_list -- (string array) list of timers to be turned on - for
+      //               complete list of available timers, see
+      //               SAMRAI/docs/userdocs/timing.pdf  [null]
+      timer_list  = "apps::main::*",
+                    "apps::Foo::someMethodName()",
+                    "algs::*::*"
+
+      // Various output options.
+      // print_total      -- (bool) print total time [TRUE]
+      // print_exclusive  -- (bool) output exclusive time - i.e. time spent
+      //                     exclusively in each routine.  A nice way to
+      //                     identify routines with bottlenecks, but is more
+      //                     expensive than recording total time [FALSE].
+      // print_wall       -- (bool) output wallclock time [TRUE]
+      // print_user       -- (bool) output user time [FALSE]
+      // print_sys        -- (bool) output system time [FALSE]
+      // print_summed     -- (bool) output sum of times measured across all
+      //                     processors during a parallel run [FALSE].
+      // print_max        -- (bool) output maximum time spent on any one
+      //                     processor, along with the processor ID [FALSE]
+      // print_percentage -- (bool) output percentage of total time for each
+      //                     printed timer [TRUE]
+      // print_concurrent -- (bool) in the process of performing exclusive
+      //                     time, a nested call tree is created; print the
+      //                     tree [FALSE]
+      // print_timer_overhead -- (bool) each timer start/stop invocation
+      //                     incurs about one-half a millionth of a second
+      //                     overhead.  This option will output the number of
+      //                     invocations and the total predicted overhead for
+      //                     all the timers [FALSE]
+      // print_threshold  -- (double) do not print any timers that constitute
+      //                     < (print_threshold)% of overall run time. Useful 
+      //                     to prevent gobs of output if many timers are
+      //                     turned on. [0.25]
+      print_exclusive = TRUE
+      print_max = TRUE
+      print_timer_overhead = TRUE
+      print_threshold = 0.0
+   }
+
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/timers/example_inputs/example.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/timers/example_inputs/example.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,26 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   $Description 
+ *
+ ************************************************************************/
+
+TimerManager{
+
+   timer_list               = "apps::main::*"
+
+   print_exclusive          = TRUE
+   print_user               = TRUE
+   print_sys                = TRUE
+   print_summed             = TRUE
+   print_max                = TRUE
+   print_concurrent         = TRUE
+   print_timer_overhead     = TRUE
+   print_threshold          = 0.0
+
+   track_memory_use         = TRUE
+                              
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/timers/main_example.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/timers/main_example.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,105 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Example program to demonstrate timers. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <string>
+using namespace std;
+
+// Headers for basic SAMRAI objects used in this code.
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/TimerManager.h"
+
+using namespace SAMRAI;
+
+int main(
+   int argc,
+   char* argv[])
+{
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   {
+      tbox::PIO::logAllNodes("Timer.log");
+
+      string input_filename;
+
+      if ((argc != 2)) {
+         tbox::pout << "USAGE:  " << argv[0] << " <input filename> "
+                                             << "  options:\n"
+                                             << "  none at this time"
+                                             << endl;
+         tbox::SAMRAI_MPI::abort();
+         return -1;
+      }
+
+      input_filename = argv[1];
+
+      /*
+       * Create an input database "input_db" and parse input file (specified
+       * on the command line.
+       */
+      tbox::Pointer<tbox::Database> input_db(new tbox::InputDatabase("input_db"));
+      tbox::InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      /*
+       * Create timer manager, reading timer list from input.
+       */
+      tbox::TimerManager::createManager(input_db->getDatabase("TimerManager"));
+
+      /*
+       * Add a timer.  All timers are maintained by the tbox::TimerManager
+       * and each timer is accessed by its name.  A static pointer is used
+       * to avoid the name lookup cost each time it is called (its only
+       * looked up the first time).
+       */
+      string name = "main::test";
+      tbox::Pointer<tbox::Timer> timer = tbox::TimerManager::getManager()->
+         getTimer(name);
+
+      /*
+       * Start timer.  If the timer name was not specified in the input
+       * file, the timer start() and stop() functions will simply drop through
+       * without recording the time.
+       */
+      timer->start();
+
+      /*
+       * Sleep for 10 sec.
+       */
+      sleep(10);
+
+      /*
+       * Stop the timer
+       */
+      timer->stop();
+
+      /*
+       * Print results to log file.
+       */
+      tbox::TimerManager::getManager()->print(tbox::plog);
+
+   }
+
+   /*
+    * We're done.  Shut down application ...
+    */
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+   return 0;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/timers/main_stats.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/timers/main_stats.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,936 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program to test statistics operations 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <stdlib.h>
+
+// Headers for basic SAMRAI objects used in this code.
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Database.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Statistic.h"
+#include "SAMRAI/tbox/Statistician.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include <string>
+using namespace std;
+
+using namespace SAMRAI;
+
+int main(
+   int argc,
+   char* argv[])
+{
+   int fail_count = 0;
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+
+      tbox::PIO::logAllNodes("stat.log");
+
+      string input_filename;
+      string restart_dirname;
+      int restore_num = 0;
+
+      bool is_from_restart = false;
+
+      if ((argc != 1) && (argc != 3)) {
+         tbox::pout << "USAGE:  " << argv[0]
+         << "<restart dir> <restore number> [options]\n"
+         << "  options:\n"
+         << "  none at this time"
+         << endl;
+         tbox::SAMRAI_MPI::abort();
+         return -1;
+      } else {
+         if (argc == 3) {
+            restart_dirname = argv[1];
+            restore_num = atoi(argv[2]);
+
+            is_from_restart = true;
+         }
+      }
+
+#ifndef HAVE_HDF5
+      is_from_restart = false;
+#endif
+
+      /*
+       * Open the restart file and read information from file into the
+       * restart database.
+       */
+      if (is_from_restart) {
+         tbox::RestartManager::getManager()->
+         openRestartFile(restart_dirname,
+            restore_num,
+            mpi.getSize());
+      }
+
+      tbox::Pointer<tbox::Database> restart_db =
+         tbox::RestartManager::getManager()->getRootDatabase();
+      NULL_USE(restart_db);
+
+      /*
+       * Create tbox::Statistician.
+       */
+
+      tbox::Statistician* statistician = tbox::Statistician::createStatistician();
+
+      /*
+       * We no longer need the restart file so lets close it.
+       */
+      tbox::RestartManager::getManager()->closeRestartFile();
+
+      /*
+       * Create statistics.
+       */
+
+      tbox::Pointer<tbox::Statistic> procstat1 =
+         statistician->getStatistic("procstat1", "PROC_STAT");
+      tbox::Pointer<tbox::Statistic> procstat2 =
+         statistician->getStatistic("procstat2", "PROC_STAT");
+      tbox::Pointer<tbox::Statistic> procstat3 =
+         statistician->getStatistic("procstat3", "PROC_STAT");
+      NULL_USE(procstat3);
+
+      tbox::Pointer<tbox::Statistic> patchstat1 =
+         statistician->getStatistic("patchstat1", "PATCH_STAT");
+      tbox::Pointer<tbox::Statistic> patchstat2 =
+         statistician->getStatistic("patchstat2", "PATCH_STAT");
+      tbox::Pointer<tbox::Statistic> patchstat3 =
+         statistician->getStatistic("patchstat3", "PATCH_STAT");
+      NULL_USE(patchstat3);
+
+      int myrank = mpi.getRank();
+      int i, j, ips;
+
+      /*
+       * procstat1 has a sequence length of three on each processor.
+       * The value of sequence item i is i*(myrank + 1), where myrank
+       * is the tbox::MPI process rank.
+       */
+      double factor = myrank + 1;
+      for (ips = 0; ips < 3; ips++) {
+         procstat1->recordProcStat(factor * ips);
+      }
+
+      /*
+       * procstat2 has a sequence length of one on each processor.
+       * The value of sequence item i is (i+1)*(myrank + 2), where myrank
+       * is the tbox::MPI process rank.
+       */
+      factor = myrank + 2;
+      for (ips = 0; ips < 1; ips++) {
+         procstat2->recordProcStat(factor * (ips + 1));
+      }
+
+      /*
+       * patchstat1 has a sequence length of two on each processor.
+       * Each processor has exactly two patches. The value of each sequence
+       * item of the patches will be (patch id*2 + seq #), where the patch
+       * id's on each processor are myrank*2 and myrank*2+1.
+       */
+      for (ips = 0; ips < 2; ips++) {
+         for (i = myrank * 2; i <= myrank * 2 + 1; i++) {
+            patchstat1->recordPatchStat(i,                // patch number
+               i * 2 + ips,                               // data value
+               ips);                                      // seq number
+         }
+      }
+
+      /*
+       * patchstat2 has a sequence length of two on each processor.
+       * Each processor will have a variable number of patches equal to
+       * the tbox::MPI process number + 2 (i.e., processor zero
+       * will have two patch values, processor one will have three patch
+       * value, etc.).  The value for each patch will be twice the patch
+       * number plus the sequence number.
+       */
+      for (ips = 0; ips < 2; ips++) {
+         int patch_start_num = 0;
+         for (i = 0; i < myrank; i++) {
+            patch_start_num += i + 2;
+         }
+         int num_patches = myrank + 2;
+         for (i = patch_start_num; i < patch_start_num + num_patches; i++) {
+            patchstat2->recordPatchStat(i,              // patch number
+               2.0 * i + ips,                           // data value
+               ips);                                    // sequence number
+         }
+      }
+
+      // Test #1:
+      int tval = statistician->getNumberProcessorStats();
+      if (tval != 3) {
+         fail_count++;
+         tbox::perr
+         <<
+         "FAILED: - Test #1a: tbox::Statistician::getNumberProcessorStats()\n"
+         << "incorrect number of processor statistics found" << endl;
+      } else {
+         tbox::plog << "Test #1a successful" << endl;
+      }
+      tval = statistician->getNumberPatchStats();
+      if (tval != 3) {
+         fail_count++;
+         tbox::perr
+         << "FAILED: - Test #1b: tbox::Statistician::getNumberPatchStats()\n"
+         << "incorrect number of patch statistics found" << endl;
+      } else {
+         tbox::plog << "Test #1b successful" << endl;
+      }
+
+      // Test #2:
+      tbox::Pointer<tbox::Statistic> tstat;
+      if (!statistician->checkStatisticExists(tstat, "procstat2")) {
+         fail_count++;
+         tbox::perr
+         << "FAILED: - Test #2a: tbox::Statistician::checkStatisticExists()\n"
+         << "procstat2 added to statistician, but not found" << endl;
+      } else {
+         tbox::plog << "Test #2a successful" << endl;
+         if (tstat->getName() != "procstat2") {
+            fail_count++;
+            tbox::perr
+            <<
+            "FAILED: - Test #2b: tbox::Statistician::checkStatisticExists()\n"
+            << "name of procstat2 does not match statistician entry"
+            << endl;
+         } else {
+            tbox::plog << "Test #2b successful" << endl;
+         }
+      }
+
+      if (!statistician->checkStatisticExists(tstat, "patchstat1")) {
+         fail_count++;
+         tbox::perr
+         << "FAILED: - Test #2c: tbox::Statistician::checkStatisticExists()\n"
+         << "patchstat1 added to statistician, but not found"
+         << endl;
+      } else {
+         tbox::plog << "Test #2c successful" << endl;
+         if (tstat->getName() != "patchstat1") {
+            fail_count++;
+            tbox::perr
+            <<
+            "FAILED: - Test #2d: tbox::Statistician::checkStatisticExists()\n"
+            <<
+            "name of patchstat1 does not match statistician entry" << endl;
+         } else {
+            tbox::plog << "Test #2c successful" << endl;
+         }
+      }
+
+      if (statistician->checkStatisticExists(tstat, "dummy")) {
+         fail_count++;
+         tbox::perr
+         << "FAILED: - Test #2e: tbox::Statistician::checkStatisticExists()\n"
+         << "wrongly found statistic named dummy in statistician"
+         << endl;
+      } else {
+         tbox::plog << "Test #2e successful" << endl;
+      }
+      tstat.setNull();
+
+      // Test #3:
+      if (statistician->getProcStatId(procstat1->getName())
+          != procstat1->getInstanceId()) {
+         fail_count++;
+         tbox::perr
+         << "FAILED: - Test #3a: tbox::Statistician::getProcStatId()\n"
+         << "procstat1 has wrong instance id in statistician"
+         << endl;
+      } else {
+         tbox::plog << "Test #3a successful" << endl;
+      }
+      if (statistician->getPatchStatId(patchstat2->getName())
+          != patchstat2->getInstanceId()) {
+         fail_count++;
+         tbox::perr
+         << "FAILED: - Test #3b: tbox::Statistician::getPatchStatId()\n"
+         << "patchstat2 has wrong instance id in statistician"
+         << endl;
+      } else {
+         tbox::plog << "Test #3b successful" << endl;
+      }
+      if (statistician->getProcStatId(patchstat1->getName()) != -1) {
+         fail_count++;
+         tbox::perr
+         << "FAILED: - Test #3c: tbox::Statistician::getProcStatId()\n"
+         << "patchstat1 is not a processor statistic" << endl;
+      } else {
+         tbox::plog << "Test #3c successful" << endl;
+      }
+      if (statistician->getPatchStatId(procstat2->getName()) != -1) {
+         fail_count++;
+         tbox::perr
+         << "FAILED: - Test #3d: tbox::Statistician::getPatchStatId()\n"
+         << "procstat2 is not a patch statistic" << endl;
+      } else {
+         tbox::plog << "Test #3d successful" << endl;
+      }
+
+      // Test #4:
+      if (procstat1->getType() != "PROC_STAT") {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #4a: tbox::Statistic::getType()\n"
+                    << "procstat1 returns incorrect type" << endl;
+      } else {
+         tbox::plog << "Test #4a successful" << endl;
+      }
+      if (patchstat1->getType() != "PATCH_STAT") {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #4b: tbox::Statistic::getType()\n"
+                    << "patchstat1 returns incorrect type" << endl;
+      } else {
+         tbox::plog << "Test #4b successful" << endl;
+      }
+
+      // Test #5:
+      int procstat1_seqlen;
+      int procstat2_seqlen;
+      if (is_from_restart) {
+         procstat1_seqlen = 6;
+         procstat2_seqlen = 2;
+      } else {
+         procstat1_seqlen = 3;
+         procstat2_seqlen = 1;
+      }
+      if (procstat1->getStatSequenceLength() != procstat1_seqlen) {
+         fail_count++;
+         tbox::perr
+         << "FAILED: - Test #5a: tbox::Statistic::getStatSequenceLength()\n"
+         << "procstat1 returns incorrect sequence length" << endl;
+      } else {
+         tbox::plog << "Test #5a successful" << endl;
+      }
+      if (procstat2->getStatSequenceLength() != procstat2_seqlen) {
+         fail_count++;
+         tbox::perr
+         << "FAILED: - Test #5b: tbox::Statistic::getStatSequenceLength()\n"
+         << "procstat2 returns incorrect sequence length" << endl;
+      } else {
+         tbox::plog << "Test #5b successful" << endl;
+      }
+      if (patchstat1->getStatSequenceLength() != 2) {
+         fail_count++;
+         tbox::perr
+         << "FAILED: - Test #5c: tbox::Statistic::getStatSequenceLength()\n"
+         << "patchstat1 returns incorrect sequence length" << endl;
+      } else {
+         tbox::plog << "Test #5c successful" << endl;
+      }
+      if (patchstat2->getStatSequenceLength() != 2) {
+         fail_count++;
+         tbox::perr
+         << "FAILED: - Test #5d: tbox::Statistic::getStatSequenceLength()\n"
+         << "patchstat2 returns incorrect sequence length" << endl;
+      } else {
+         tbox::plog << "Test #5d successful" << endl;
+      }
+
+      statistician->printLocalStatData(tbox::plog);
+
+      statistician->finalize();
+
+      statistician->printAllGlobalStatData(tbox::plog);
+
+      statistician->finalize();
+
+      statistician->printSpreadSheetOutput();
+
+      statistician->finalize();
+
+      if (mpi.getRank() == 0) {
+
+         // Test #6:
+         if (statistician->
+             getGlobalProcStatSequenceLength(procstat1->getInstanceId()) !=
+             procstat1_seqlen) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #6a: "
+                       << "Statistician::getGlobalProcStatSequenceLength()\n"
+                       << "incorrect sequence length returned for procstat1"
+                       << endl;
+         } else {
+            tbox::plog << "Test #6a successful" << endl;
+         }
+
+         if (statistician->
+             getGlobalProcStatSequenceLength(procstat2->getInstanceId()) !=
+             procstat2_seqlen) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #6b: "
+                       << "Statistician::getGlobalProcStatSequenceLength()\n"
+                       << "incorrect sequence length returned for procstat2"
+                       << endl;
+         } else {
+            tbox::plog << "Test #6b successful" << endl;
+         }
+
+         for (i = 0; i < mpi.getSize(); i++) {
+            if (!tbox::MathUtilities<double>::equalEps(statistician->
+                   getGlobalProcStatValue(procstat1->getInstanceId(),
+                      2, i), (i + 1) * 2)) {
+               fail_count++;
+               tbox::perr << "FAILED: - Test #6c: "
+                          << "Statistician::getGlobalProcStatValue()\n"
+                          << "incorrect global data returned for procstat1"
+                          << endl;
+            } else {
+               tbox::plog << "Test #6c successful" << endl;
+            }
+         }
+         for (i = 0; i < mpi.getSize(); i++) {
+            if (!tbox::MathUtilities<double>::equalEps(statistician->
+                   getGlobalProcStatValue(procstat2->getInstanceId(),
+                      0, i), i + 2)) {
+               fail_count++;
+               tbox::perr << "FAILED: - Test #6d: "
+                          << "Statistician::getGlobalProcStatValue()\n"
+                          << "incorrect global data returned for procstat2"
+                          << endl;
+            } else {
+               tbox::plog << "Test #6d successful" << endl;
+            }
+         }
+
+         // Test #7:
+         if (statistician->
+             getGlobalPatchStatSequenceLength(patchstat1->getInstanceId()) != 2) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #7a: "
+                       << "Statistician::getGlobalPatchStatSequenceLength()\n"
+                       << "incorrect sequence length returned for patchstat1"
+                       << endl;
+         } else {
+            tbox::plog << "Test #7a successful" << endl;
+         }
+
+         int num_patches = mpi.getSize() * 2;
+         if (statistician->getGlobalPatchStatNumberPatches(
+                patchstat1->getInstanceId(), 0) != num_patches) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #7b: "
+                       << "Statistician::getGlobalPatchStatNumberPatches()\n"
+                       << "incorrect num patches returned for patchstat1"
+                       << endl;
+         } else {
+            tbox::plog << "Test #7b successful" << endl;
+         }
+
+         for (i = 0; i < mpi.getSize(); i++) {
+
+            int pnum = 0;
+            for (j = 0; j < 1; j++) {
+               pnum = i * 2 + j;
+            }
+            if (!tbox::MathUtilities<double>::equalEps(statistician->
+                   getGlobalPatchStatValue(
+                      patchstat1->getInstanceId(), 1, pnum), pnum * 2 + 1)) {
+               fail_count++;
+               tbox::perr << "FAILED: - Test #7e: "
+                          << "Statistician::getGlobalPatchStatValue()\n"
+                          << "incorrect global data returned for patch "
+                          << pnum
+                          << "in patchstat1." << endl;
+            } else {
+               tbox::plog << "Test #7e successful" << endl;
+            }
+
+         }
+
+         num_patches = 0;
+         for (i = 0; i < mpi.getSize(); i++) {
+            num_patches += i + 2;
+         }
+         if (statistician->getGlobalPatchStatNumberPatches(
+                patchstat2->getInstanceId(), 0) != num_patches) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #7c: "
+                       << "Statistician::getGlobalPatchStatNumberPatches()\n"
+                       << "incorrect num patches returned for patchstat2"
+                       << endl;
+         } else {
+            tbox::plog << "Test #7c successful" << endl;
+         }
+
+         for (i = 0; i < mpi.getSize(); i++) {
+            int pnum = 0;
+            for (j = 0; j < i; j++) {
+               pnum += j + 2;
+            }
+            if (statistician->getGlobalPatchStatPatchMapping(
+                   patchstat2->getInstanceId(), 1, pnum) != i) {
+               fail_count++;
+               tbox::perr << "FAILED: - Test #7d: "
+                          << "Statistician::getGlobalPatchStatPatchMapping()\n"
+                          << "incorrect mapping for patch " << pnum << "in "
+                          << "patchstat2." << endl;
+            } else {
+               tbox::plog << "Test #7d successful" << endl;
+            }
+
+         }
+
+         for (i = 0; i < mpi.getSize(); i++) {
+            int pnum = 0;
+            for (j = 0; j < i; j++) {
+               pnum += j + 2;
+            }
+            if (!tbox::MathUtilities<double>::equalEps(statistician->
+                   getGlobalPatchStatValue(
+                      patchstat2->getInstanceId(), 1, pnum), pnum * 2 + 1)) {
+               fail_count++;
+               tbox::perr << "FAILED: - Test #7f: "
+                          << "Statistician::getGlobalPatchStatValue()\n"
+                          << "incorrect global data returned for patch "
+                          << pnum
+                          << "in patchstat2." << endl;
+            } else {
+               tbox::plog << "Test #7f successful" << endl;
+            }
+
+         }
+
+         // Test #8:
+         double sum0 = 0.;
+         double sum1 = 0.;
+         double sum2 = 0.;
+
+         for (i = 0; i < mpi.getSize(); i++) {
+            sum1 += (double)i + 1;
+            sum2 += (double)2 * (i + 1);
+         }
+         if (!tbox::MathUtilities<double>::equalEps(statistician->
+                getGlobalProcStatSum(
+                   procstat1->getInstanceId(), 0), sum0)) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #8a: "
+                       << "Statistician::getGlobalProcStatSum()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #8a successful" << endl;
+         }
+         if (!tbox::MathUtilities<double>::equalEps(statistician->
+                getGlobalProcStatSum(
+                   procstat1->getInstanceId(), 1), sum1)) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #8b: "
+                       << "Statistician::getGlobalProcStatSum()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #8b successful" << endl;
+         }
+         if (!tbox::MathUtilities<double>::equalEps(statistician->
+                getGlobalProcStatSum(
+                   procstat1->getInstanceId(), 2), sum2)) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #8c: "
+                       << "Statistician::getGlobalProcStatSum()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #8c successful" << endl;
+         }
+
+         double max0 = 0.;
+         double max1 = mpi.getSize();
+         double max2 = 2 * (mpi.getSize());
+         if (!tbox::MathUtilities<double>::equalEps(statistician->
+                getGlobalProcStatMax(
+                   procstat1->getInstanceId(), 0), max0)) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #8d: "
+                       << "Statistician::getGlobalProcStatMax()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #8d successful" << endl;
+         }
+         if (!tbox::MathUtilities<double>::equalEps(statistician->
+                getGlobalProcStatMax(
+                   procstat1->getInstanceId(), 1), max1)) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #8e: "
+                       << "Statistician::getGlobalProcStatMax()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #8e successful" << endl;
+         }
+         if (!tbox::MathUtilities<double>::equalEps(statistician->
+                getGlobalProcStatMax(
+                   procstat1->getInstanceId(), 2), max2)) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #8f: "
+                       << "Statistician::getGlobalProcStatMax()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #8f successful" << endl;
+         }
+         if (statistician->getGlobalProcStatMaxProcessorId(
+                procstat1->getInstanceId(),
+                1) != mpi.getSize() - 1) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #8g: "
+                       << "Statistician::getGlobalProcStatMaxId()\n"
+                       << "returned incorrect ID." << endl;
+         } else {
+            tbox::plog << "Test #8g successful" << endl;
+         }
+         if (statistician->getGlobalProcStatMaxProcessorId(
+                procstat1->getInstanceId(),
+                2) != mpi.getSize() - 1) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #8h: "
+                       << "Statistician::getGlobalProcStatMaxId()\n"
+                       << "returned incorrect ID." << endl;
+         } else {
+            tbox::plog << "Test #8h successful" << endl;
+         }
+
+         double min0 = 0.;
+         double min1 = 1.;
+         double min2 = 2.;
+         if (!tbox::MathUtilities<double>::equalEps(statistician->
+                getGlobalProcStatMin(
+                   procstat1->getInstanceId(), 0), min0)) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #8i: "
+                       << "Statistician::getGlobalProcStatMin()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #8i successful" << endl;
+         }
+         if (!tbox::MathUtilities<double>::equalEps(statistician->
+                getGlobalProcStatMin(
+                   procstat1->getInstanceId(), 1), min1)) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #8j: "
+                       << "Statistician::getGlobalProcStatMin()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #8j successful" << endl;
+         }
+         if (!tbox::MathUtilities<double>::equalEps(statistician->
+                getGlobalProcStatMin(
+                   procstat1->getInstanceId(), 2), min2)) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #8k: "
+                       << "Statistician::getGlobalProcStatMin()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #8k successful" << endl;
+         }
+
+         if (statistician->getGlobalProcStatMinProcessorId(
+                procstat1->getInstanceId(), 1) != 0) {
+            tbox::pout << statistician->getGlobalProcStatMinProcessorId(
+               procstat1->getInstanceId(), 1) << endl;
+            fail_count++;
+            tbox::perr << "FAILED: - Test #8l: "
+                       << "Statistician::getGlobalProcStatMinProcessorId()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #8l successful" << endl;
+         }
+         if (statistician->getGlobalProcStatMinProcessorId(
+                procstat1->getInstanceId(), 2) != 0) {
+            tbox::pout << statistician->getGlobalProcStatMinProcessorId(
+               procstat1->getInstanceId(), 2) << endl;
+            fail_count++;
+            tbox::perr << "FAILED: - Test #8m: "
+                       << "Statistician::getGlobalProcStatMinProcessorId()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #8m successful" << endl;
+         }
+
+         // Test #9:
+         int pnum = 0;
+         sum0 = 0.;
+         sum1 = 0.;
+         for (i = 0; i < mpi.getSize(); i++) {
+            for (j = 0; j < i + 2; j++) {
+               sum0 += (double)pnum * 2;
+               sum1 += (double)(pnum * 2 + 1);
+               pnum += 1;
+            }
+         }
+
+         if (!tbox::MathUtilities<double>::equalEps(statistician->
+                getGlobalPatchStatSum(
+                   patchstat2->getInstanceId(), 0), sum0)) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #9a: "
+                       << "Statistician::getGlobalPatchStatSum()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #9a successful" << endl;
+         }
+
+         if (!tbox::MathUtilities<double>::equalEps(statistician->
+                getGlobalPatchStatSum(
+                   patchstat2->getInstanceId(), 1), sum1)) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #9b: "
+                       << "Statistician::getGlobalPatchStatSum()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #9b successful" << endl;
+         }
+
+         max0 = 0.;
+         max1 = 0.;
+         pnum = -1;
+         for (i = 0; i < mpi.getSize(); i++) {
+            for (j = 0; j < i + 2; j++) {
+               pnum += 1;
+            }
+         }
+
+         max0 = (double)pnum * 2;
+         max1 = (double)(pnum * 2 + 1);
+         if (!tbox::MathUtilities<double>::equalEps(statistician->
+                getGlobalPatchStatMax(
+                   patchstat2->getInstanceId(), 0), max0)) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #9c: "
+                       << "Statistician::getGlobalPatchStatMax()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #9c successful" << endl;
+         }
+
+         if (!tbox::MathUtilities<double>::equalEps(statistician->
+                getGlobalPatchStatMax(
+                   patchstat2->getInstanceId(), 1), max1)) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #9d: "
+                       << "Statistician::getGlobalPatchStatMax()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #9d successful" << endl;
+         }
+
+         if (statistician->getGlobalPatchStatMaxPatchId(
+                patchstat2->getInstanceId(), 0) != pnum) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #9e: "
+                       << "Statistician::getGlobalPatchStatMaxPatchId()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #9e successful" << endl;
+         }
+
+         if (statistician->getGlobalPatchStatMaxPatchId(
+                patchstat2->getInstanceId(), 1) != pnum) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #9f: "
+                       << "Statistician::getGlobalPatchStatMaxPatchId()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #9f successful" << endl;
+         }
+
+         min0 = 0.;
+         min1 = 1.;
+         if (!tbox::MathUtilities<double>::equalEps(statistician->
+                getGlobalPatchStatMin(
+                   patchstat2->getInstanceId(), 0), min0)) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #9g: "
+                       << "Statistician::getGlobalPatchStatMin()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #9g successful" << endl;
+         }
+         if (!tbox::MathUtilities<double>::equalEps(statistician->
+                getGlobalPatchStatMin(
+                   patchstat2->getInstanceId(), 1), min1)) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #9h: "
+                       << "Statistician::getGlobalPatchStatMin()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #9h successful" << endl;
+         }
+
+         if (statistician->getGlobalPatchStatMinPatchId(
+                patchstat2->getInstanceId(), 0) != 0) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #9i: "
+                       << "Statistician::getGlobalPatchStatMinPatchId()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #9i successful" << endl;
+         }
+         if (statistician->getGlobalPatchStatMinPatchId(
+                patchstat2->getInstanceId(), 1) != 0) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #9j: "
+                       << "Statistician::getGlobalPatchStatMinPatchId()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #9j successful" << endl;
+         }
+
+         // Test #10:
+         pnum = 0;
+         for (i = 0; i < mpi.getSize(); i++) {
+            max0 = 0.;
+            max1 = 0.;
+            for (j = 0; j < i + 2; j++) {
+               max0 += (double)pnum * 2;
+               max1 += (double)(pnum * 2 + 1);
+               pnum += 1;
+            }
+            if (!tbox::MathUtilities<double>::equalEps(statistician->
+                   getGlobalPatchStatProcessorSum(
+                      patchstat2->getInstanceId(), i, 0), max0)) {
+               fail_count++;
+               tbox::perr << "FAILED: - Test #10a: "
+                          << "Statistician::getGlobalPatchStatProcessorSum()\n"
+                          << "incorrect value returned." << endl;
+            } else {
+               tbox::plog << "Test #10a successful" << endl;
+            }
+            if (!tbox::MathUtilities<double>::equalEps(statistician->
+                   getGlobalPatchStatProcessorSum(
+                      patchstat2->getInstanceId(), i, 1), max1)) {
+               fail_count++;
+               tbox::perr << "FAILED: - Test #10b: "
+                          << "Statistician::getGlobalPatchStatProcessorSum()\n"
+                          << "incorrect value returned." << endl;
+            } else {
+               tbox::plog << "Test #10b successful" << endl;
+            }
+         }
+
+         if (!tbox::MathUtilities<double>::equalEps(statistician->
+                getGlobalPatchStatProcessorSumMax(
+                   patchstat2->getInstanceId(), 0), max0)) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #10c: "
+                       << "Statistician::getGlobalPatchStatProcessorSumMax()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #10c successful" << endl;
+         }
+         if (!tbox::MathUtilities<double>::equalEps(statistician->
+                getGlobalPatchStatProcessorSumMax(
+                   patchstat2->getInstanceId(), 1), max1)) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #10d: "
+                       << "Statistician::getGlobalPatchStatProcessorSumMax()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #10d successful" << endl;
+         }
+
+         int nnodes = mpi.getSize();
+         if (statistician->getGlobalPatchStatProcessorSumMaxId(
+                patchstat2->getInstanceId(), 0) != nnodes - 1) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #10e: "
+                       <<
+            "Statistician::getGlobalPatchStatProcessorSumMaxId()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #10e successful" << endl;
+         }
+         if (statistician->getGlobalPatchStatProcessorSumMaxId(
+                patchstat2->getInstanceId(), 1) != nnodes - 1) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #10f: "
+                       <<
+            "Statistician::getGlobalPatchStatProcessorSumMaxId()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #10f successful" << endl;
+         }
+
+         min0 = 2.;
+         min1 = 4.;
+         if (!tbox::MathUtilities<double>::equalEps(statistician->
+                getGlobalPatchStatProcessorSumMin(
+                   patchstat2->getInstanceId(), 0), min0)) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #10g: "
+                       << "Statistician::getGlobalPatchStatProcessorSumMin()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #10g successful" << endl;
+         }
+         if (!tbox::MathUtilities<double>::equalEps(statistician->
+                getGlobalPatchStatProcessorSumMin(
+                   patchstat2->getInstanceId(), 1), min1)) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #10h: "
+                       << "Statistician::getGlobalPatchStatProcessorSumMin()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #10h successful" << endl;
+         }
+
+         if (statistician->getGlobalPatchStatProcessorSumMinId(
+                patchstat2->getInstanceId(), 0) != 0) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #10i: "
+                       <<
+            "Statistician::getGlobalPatchStatProcessorSumMinId()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #10i successful" << endl;
+         }
+         if (statistician->getGlobalPatchStatProcessorSumMinId(
+                patchstat2->getInstanceId(), 1) != 0) {
+            fail_count++;
+            tbox::perr << "FAILED: - Test #10j: "
+                       <<
+            "Statistician::getGlobalPatchStatProcessorSumMinId()\n"
+                       << "incorrect value returned." << endl;
+         } else {
+            tbox::plog << "Test #10j successful" << endl;
+         }
+
+      }
+
+      /*
+       * We're done.  Write the restart file.
+       */
+      string restart_write_dirname = "restart";
+#ifdef HAVE_HDF5
+      int timestep = 0;
+      tbox::RestartManager::getManager()->writeRestartFile(
+         restart_write_dirname,
+         timestep);
+#endif
+
+      if (fail_count == 0) {
+         tbox::pout << "\nPASSED:  statstest" << endl;
+      }
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+   return fail_count;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/timers/main_timer.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/timers/main_timer.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,432 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Test program to demonstrate/test timers. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <stdlib.h>
+
+// Headers for basic SAMRAI objects used in this code.
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Database.h"
+#include "Foo.h"
+#include "SAMRAI/tbox/InputManager.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/Timer.h"
+#include "SAMRAI/tbox/TimerManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <string>
+using namespace std;
+
+// Simple code to check timer overhead
+// Not part of test, but kept here in
+// case it is useful for something
+#undef CHECK_PTIMER
+//#define CHECK_PTIMER
+
+#ifdef CHECK_PTIMER
+#include <sys/types.h>
+#include <sys/time.h>
+
+class PTimer
+{
+public:
+   PTimer():
+      d_accesses(0),
+      d_total_time(0.0),
+      d_last_start_time(0.0) {
+   }
+
+   ~PTimer() {
+   }
+
+   void start()
+   {
+      d_accesses++;
+
+      static struct timeval _tp;
+      gettimeofday(&_tp, (struct timezone *)0);
+      d_last_start_time = static_cast<double>(_tp.tv_sec)
+         + (1.0e-6) * (_tp.tv_usec);
+   }
+
+   void stop()
+   {
+      static struct timeval _tp;
+      gettimeofday(&_tp, (struct timezone *)0);
+      d_total_time += static_cast<double>(_tp.tv_sec)
+         + (1.0e-6) * (_tp.tv_usec) - d_last_start_time;
+   }
+
+   int getNumAccesses() const {
+      return d_accesses;
+   }
+   double getTotalTime() const {
+      return d_total_time;
+   }
+
+private:
+   PTimer(
+      const PTimer&);
+   PTimer&
+   operator = (
+      const PTimer&);
+
+   int d_accesses;
+   double d_total_time;
+   double d_last_start_time;
+};
+#endif
+
+#ifndef NULL
+#define NULL (0)
+#endif
+
+using namespace SAMRAI;
+
+int main(
+   int argc,
+   char* argv[])
+{
+   int fail_count = 0;
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+   const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+
+      tbox::PIO::logAllNodes("Timer.log");
+
+      string input_filename;
+      string restart_dirname;
+      int restore_num = 0;
+
+      bool is_from_restart = false;
+
+      if ((argc != 2) && (argc != 4)) {
+         tbox::pout << "USAGE:  " << argv[0] << " <input filename> "
+                                             <<
+         "<restart dir> <restore number> [options]\n"
+                                             << "  options:\n"
+                                             << "  none at this time"
+                                             << endl;
+         tbox::SAMRAI_MPI::abort();
+         return -1;
+      } else {
+         input_filename = argv[1];
+         if (argc == 4) {
+            restart_dirname = argv[2];
+            restore_num = atoi(argv[3]);
+
+            is_from_restart = true;
+         }
+      }
+
+#ifndef HAVE_HDF5
+      is_from_restart = false;
+#endif
+
+      int i;
+
+      /*
+       * Create an input database "input_db" and parse input file (specified
+       * on the command line.
+       */
+      tbox::Pointer<tbox::Database> input_db(new tbox::InputDatabase("input_db"));
+      tbox::InputManager::getManager()->parseInputFile(input_filename, input_db);
+
+      /*
+       * Retrieve "Main" section of the input database.  Read ntimes,
+       * which is the number of times the functions are called, and
+       * depth, which is the depth of the exclusive timer tree.
+       */
+      tbox::Pointer<tbox::Database> main_db = input_db->getDatabase("Main");
+
+      int ntimes = 1;
+      if (main_db->keyExists("ntimes")) {
+         ntimes = main_db->getInteger("ntimes");
+      }
+
+      int exclusive_tree_depth = 1;
+      if (main_db->keyExists("exclusive_tree_depth")) {
+         exclusive_tree_depth = main_db->getInteger("exclusive_tree_depth");
+      }
+
+      /*
+       * Open the restart file and read information from file into the
+       * restart database.
+       */
+      if (is_from_restart) {
+         tbox::RestartManager::getManager()->
+         openRestartFile(restart_dirname,
+            restore_num,
+            mpi.getSize());
+      }
+
+      tbox::Pointer<tbox::Database> restart_db =
+         tbox::RestartManager::getManager()->getRootDatabase();
+      NULL_USE(restart_db);
+
+      /*
+       * Create timer manager, reading timer list from input.
+       */
+      tbox::TimerManager::createManager(input_db->getDatabase("TimerManager"));
+
+      /*
+       * Add a timer "manually" (that is, not thru the input file).
+       */
+      tbox::Pointer<tbox::Timer> timer = tbox::TimerManager::getManager()->
+         getTimer("apps::main::main");
+      timer->start();
+
+      /*
+       * We no longer need the restart file so lets close it.
+       */
+      tbox::RestartManager::getManager()->closeRestartFile();
+
+      /*
+       * Class Foo contains the functions we want to call.
+       */
+      Foo* foo = new Foo();
+
+      /*
+       * Check time to call function with timer name that is NOT
+       * registered.  That is, time a NULL timer call.
+       */
+      tbox::Pointer<tbox::Timer> timer_off = tbox::TimerManager::getManager()->
+         getTimer("apps::main::timer_off");
+      timer_off->start();
+      for (i = 0; i < ntimes; i++) {
+         foo->timerOff();
+      }
+      timer_off->stop();
+
+      /*
+       * Check time to call function with timer name that IS
+       * registered.
+       */
+      tbox::Pointer<tbox::Timer> timer_on = tbox::TimerManager::getManager()->
+         getTimer("apps::main::timer_on");
+      tbox::Pointer<tbox::Timer> dummy_timer =
+         tbox::TimerManager::getManager()->
+         getTimer("apps::Foo::timerOn()");
+      NULL_USE(dummy_timer);
+      timer_on->start();
+      for (i = 0; i < ntimes; i++) {
+         foo->timerOn();
+      }
+      timer_on->stop();
+
+      /*
+       * Time to call tree-based set of exclusive timers. i.e.
+       * Foo->zero() calls Foo->one(), which calls Foo->two(), ...
+       * and so forth until we reach specified "exclusive_tree_depth.
+       */
+      tbox::Pointer<tbox::Timer> timer_excl =
+         tbox::TimerManager::getManager()->
+         getTimer("apps::main::exclusive_timer");
+      timer_excl->start();
+      for (i = 0; i < ntimes; i++) {
+         foo->zero(exclusive_tree_depth);
+      }
+      timer_excl->stop();
+      timer->stop();
+
+      double eff = timer->computeLoadBalanceEfficiency();
+      tbox::pout << "Load Balance eff: " << eff << "%" << std::endl;
+
+//   tbox::TimerManager::getManager()->print(tbox::plog);
+
+      tbox::TimerManager::getManager()->resetAllTimers();
+
+      timer->start();
+
+      /*
+       * Check time to call function with timer name that is NOT
+       * registered.  That is, time a NULL timer call.
+       */
+      timer_off->start();
+      for (i = 0; i < ntimes; i++) {
+         foo->timerOff();
+      }
+      timer_off->stop();
+
+      /*
+       * Check time to call function with timer name that IS
+       * registered.
+       */
+      timer_on->start();
+      for (i = 0; i < ntimes; i++) {
+         foo->timerOn();
+      }
+      timer_on->stop();
+
+      /*
+       * Time to call tree-based set of exclusive timers. i.e.
+       * Foo->zero() calls Foo->one(), which calls Foo->two(), ...
+       * and so forth until we reach specified "exclusive_tree_depth.
+       */
+      timer_excl->start();
+      for (i = 0; i < ntimes; i++) {
+         foo->zero(exclusive_tree_depth);
+      }
+      timer_excl->stop();
+      timer->stop();
+
+      /*
+       * Check if we can allocate a large number of timers
+       */
+      const int max_timers = 575;
+
+      tbox::Pointer<tbox::Timer> timers[max_timers];
+      for (int timer_number = 0; timer_number < max_timers; timer_number++) {
+
+         std::string timer_name = "testcount-" + tbox::Utilities::intToString(
+               timer_number,
+               4);
+
+         timers[timer_number] = tbox::TimerManager::getManager()->
+            getTimer(timer_name);
+
+         if (timers[timer_number].isNull()) {
+            TBOX_ERROR("Failed to allocate timer, max was " + timer_number);
+         }
+      }
+
+      for (int timer_number = 0; timer_number < max_timers; timer_number++) {
+         timers[timer_number].setNull();
+      }
+
+#ifdef CHECK_PTIMER
+
+      const int nsleepsec = 1;
+      const int testit = 3;
+
+      tbox::Pointer<tbox::Timer> tarray1[testit];
+      tbox::Pointer<tbox::Timer> tarray2[testit];
+
+      for (int tcnt = 0; tcnt < testit; tcnt++) {
+
+         int mfactor = 1;
+         for (int i = 0; i < tcnt; ++i) {
+            mfactor *= 10;
+         }
+         string suffix(tbox::Utilities::intToString(mfactor, testit));
+
+         string t1name("ttest1-" + suffix);
+         tarray1[tcnt] = tbox::TimerManager::getManager()->getTimer(t1name,
+               true);
+
+         string t2name("ttest2-" + suffix);
+         tarray2[tcnt] = tbox::TimerManager::getManager()->getTimer(t2name,
+               true);
+      }
+
+      tbox::pout << "\n\nEstimate SAMRAI Timer overhead..." << endl;
+
+      for (int tcnt = 0; tcnt < testit; tcnt++) {
+
+         int ntest = 1;
+         for (int i = 0; i < tcnt; ++i) {
+            ntest *= 10;
+         }
+
+         for (int i = 0; i < ntest; i++) {
+            tarray1[tcnt]->start();
+            tarray2[tcnt]->start();
+            sleep(nsleepsec);
+            tarray2[tcnt]->stop();
+            tarray1[tcnt]->stop();
+         }
+
+         double access_time1 = tarray1[tcnt]->getTotalWallclockTime();
+         double access_time2 = tarray2[tcnt]->getTotalWallclockTime();
+         tbox::pout.precision(16);
+         tbox::pout << "\ntcnt, ntest, accesses = "
+         << tcnt << " , " << ntest << " , "
+         << tarray1[tcnt]->getNumberAccesses() << endl;
+         tbox::pout << "access_time1 = " << access_time1 << endl;
+         tbox::pout << "access_time2 = " << access_time2 << endl;
+         double access_time12 = access_time1 - access_time2;
+         double cost12 = access_time12 / static_cast<double>(ntest);
+         tbox::pout << "Access time 12 overhead for each Timer: " << cost12
+                    << " sec" << endl;
+      }
+
+      tbox::pout << "\n\nEstimate PTimer overhead..." << endl;
+
+      PTimer Ptarray1[testit];
+      PTimer Ptarray2[testit];
+
+      for (int tcnt = 0; tcnt < testit; tcnt++) {
+
+         int ntest = 1;
+         for (int i = 0; i < tcnt; ++i) {
+            ntest *= 10;
+         }
+
+         for (int i = 0; i < ntest; i++) {
+            Ptarray1[tcnt].start();
+            Ptarray2[tcnt].start();
+            sleep(nsleepsec);
+            Ptarray2[tcnt].stop();
+            Ptarray1[tcnt].stop();
+         }
+
+         double access_time1 = Ptarray1[tcnt].getTotalTime();
+         double access_time2 = Ptarray2[tcnt].getTotalTime();
+         tbox::pout.precision(16);
+         tbox::pout << "\ntcnt, ntest, accesses = "
+         << tcnt << " , " << ntest << " , "
+         << Ptarray1[tcnt].getNumAccesses() << endl;
+         tbox::pout << "access_time1 = " << access_time1 << endl;
+         tbox::pout << "access_time2 = " << access_time2 << endl;
+         double access_time12 = access_time1 - access_time2;
+         double cost12 = access_time12 / static_cast<double>(ntest);
+         tbox::pout << "Access time 12 overhead for each Timer: " << cost12
+                    << " sec" << endl;
+      }
+
+#endif
+
+      tbox::TimerManager::getManager()->print(tbox::plog);
+
+      /*
+       * We're done.  Write the restart file.
+       */
+      std::string restart_write_dirname = "restart";
+#ifdef HAVE_HDF5
+      int timestep = 0;
+      tbox::RestartManager::getManager()->writeRestartFile(
+         restart_write_dirname,
+         timestep);
+#endif
+
+      delete foo;
+
+      if (fail_count == 0) {
+         tbox::pout << "\nPASSED:  timertest" << endl;
+      }
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+   return fail_count;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/timers/test_inputs/test.input
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/timers/test_inputs/test.input	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,29 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Input file for timer tests. 
+ *
+ ************************************************************************/
+
+Main {
+   ntimes = 10000
+   exclusive_tree_depth = 5
+}
+
+TimerManager{
+   print_exclusive          = TRUE
+   print_user               = TRUE
+   print_sys                = TRUE
+//   print_percentage         = FALSE
+   print_max                = TRUE
+   print_summed             = TRUE
+   print_concurrent         = TRUE
+   print_timer_overhead     = TRUE
+   print_threshold          = 0.0
+   init_from_restart        = TRUE
+   timer_list               = "apps::main::*",
+                              "apps::Foo::*"
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/variables/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/variables/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,211 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=main-var_db.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h main-var_db.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/variables/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/variables/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,57 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for testing variable database operations 
+##
+#########################################################################
+
+SAMRAI	      =	@top_srcdir@
+SRCDIR	      =	@srcdir@
+SUBDIR        = source/test/variables
+VPATH	      =	@srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+default: check
+
+include $(OBJECT)/config/Makefile.config
+
+CPPFLAGS_EXTRA	= -DNDIM=$(PDIM) -DTESTING=1
+
+CXX_OBJS	= main-var_db.o
+
+main:	$(CXX_OBJS) $(LIBSAMRAIDEPEND)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) \
+	$(LIBSAMRAI2D) $(LIBSAMRAI) $(LDLIBS) -o $@
+
+NUM_TESTS  = 1
+
+TEST_NPROCS = @TEST_NPROCS@
+
+checkcompile: main
+
+check:
+		$(MAKE) check2d
+		$(MAKE) check3d
+
+check2d:	checkcompile
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./main
+
+check3d:
+
+checktest:
+		rm -f makecheck.logfile
+		$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+		$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+		rm -f makecheck.logfile
+
+clean-check:
+		$(SAMCLEAN)
+
+clean:		clean-check
+		$(RM) *.f main*
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/test/variables/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/variables/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,31 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   README file for variables tests.
+##
+#########################################################################
+
+This program tests the methods provided by the VariableDatabase class.
+In particular, several Variables are created and registered with the 
+VariableDatabase.  Then access of Variable, Context, and Descriptor indices
+are tested using the getVariable(), getContext(), and 
+mapVariableAndContextToIndex() methods.  There are also a section of 
+code near the end of main-var_db.C that are errors in the usage of 
+the VariableDatabase.  These are removed by the preprocessor in the
+distribution version of the code.
+
+
+Compilation:
+              make
+  or  
+              make vdbtest
+
+Execution:
+              ./vdbtest
+
+Output:
+              main-var_db.log
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/variables/main-var_db.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/variables/main-var_db.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,720 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program to test variable database operations 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/pdat/OuterfaceVariable.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/hier/Variable.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+#include <string>
+using namespace std;
+
+using namespace SAMRAI;
+
+int main(
+   int argc,
+   char* argv[]) {
+
+   tbox::Dimension dim(2);
+
+   int fail_count = 0;
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+
+// tbox::PIO::logOnlyNodeZero("main-var_db.log");
+      tbox::PIO::logAllNodes("vdbtest.log");
+
+      hier::VariableDatabase* var_db = hier::VariableDatabase::getDatabase();
+
+      tbox::Pointer<hier::VariableContext> current_context = var_db->getContext(
+            "CURRENT");
+
+      hier::IntVector nghosts(dim, 4);
+      hier::IntVector fluxghosts(dim, 1);
+      hier::IntVector zero_ghosts(dim, 0);
+
+      /* State variable */
+      tbox::Pointer<pdat::CellVariable<double> > uval(
+         new pdat::CellVariable<double>(dim, "uval", 1));
+
+      /* Flux variable */
+      tbox::Pointer<pdat::FaceVariable<double> > flux(
+         new pdat::FaceVariable<double>(dim, "flux", 1));
+
+      /* Register uval using ready made context
+       * and by creating a new one on the fly
+       */
+      const int uval_current_id =
+         var_db->registerVariableAndContext(uval,
+            current_context,
+            zero_ghosts);
+
+      /* Register flux using pre-existing context ("CURRENT"), and by using
+       * context that does not yet exist in the Database ("SCRATCH").
+       */
+// use of void eliminates compiler warning
+// const int flux_current_id =
+      (void)
+      var_db->registerVariableAndContext(flux,
+         current_context,
+         zero_ghosts);
+
+      const int flux_scratch_id =
+         var_db->registerVariableAndContext(flux,
+            var_db->getContext("SCRATCH"),
+            nghosts);
+
+      tbox::Pointer<pdat::OuterfaceVariable<double> > fluxsum(
+         new pdat::OuterfaceVariable<double>(dim, "fluxsum", 1));
+
+// use of void eliminates compiler warning
+// const int fluxsum_current_id =
+      (void)
+      var_db->registerVariableAndContext(fluxsum,
+         current_context,
+         zero_ghosts);
+
+      /*
+       * Now, run the variable database through the ringer...
+       */
+
+      tbox::plog
+      <<
+      "\n\nPrintout #1 of hier::Variable tbox::Database (after initial registration)..."
+      << endl;
+      var_db->printClassData(tbox::plog);
+
+      // Test #1: Check Context functions...
+
+      // Test #1a: hier::VariableDatabase::checkContextExists()
+      tbox::plog
+      << "Test #1a: hier::VariableDatabase::checkContextExists()..." << endl;
+      if (!var_db->checkContextExists("SCRATCH")) {
+         fail_count++;
+         tbox::perr
+         <<
+         "FAILED: - Test #1a: hier::VariableDatabase::checkContextExists()\n"
+         << "SCRATCH context added to var_db, but not found" << endl;
+      }
+
+      // Test #1b: hier::VariableDatabase::checkContextExists()
+      tbox::plog
+      << "Test #1b: hier::VariableDatabase::checkContextExists()..." << endl;
+      if (!var_db->checkContextExists("CURRENT")) {
+         fail_count++;
+         tbox::perr
+         <<
+         "FAILED: - Test #1b: hier::VariableDatabase::checkContextExists()\n"
+         << "CURRENT context added to var_db, but not found" << endl;
+      }
+
+      // Test #1c: hier::VariableDatabase::checkContextExists()
+      tbox::plog
+      << "Test #1c: hier::VariableDatabase::checkContextExists()..." << endl;
+      if (var_db->checkContextExists("dummy")) {
+         fail_count++;
+         tbox::perr
+         <<
+         "FAILED: - Test #1c: hier::VariableDatabase::checkContextExists()\n"
+         << "dummy context not added to var_db, but found" << endl;
+      }
+
+      // Adding dummy context to variable databse...
+      /*
+       * Although the dummy_ctxt is unused, we are checking for it in
+       * the test.  So leave it in despite possible compiler warnings.
+       */
+      tbox::Pointer<hier::VariableContext> dummy_ctxt = var_db->getContext(
+            "dummy");
+      NULL_USE(dummy_ctxt);
+
+      // Test #1d: hier::VariableDatabase::checkContextExists()
+      tbox::plog
+      << "Test #1d: hier::VariableDatabase::checkContextExists()..." << endl;
+      if (!var_db->checkContextExists("dummy")) {
+         fail_count++;
+         tbox::perr
+         <<
+         "FAILED: - Test #1d: hier::VariableDatabase::checkContextExists()\n"
+         << "dummy context added to var_db, but not found" << endl;
+      }
+
+      // Test #2,3: Check hier::Variable functions...
+
+      // Test #2a: hier::VariableDatabase::checkVariableExists()
+      tbox::plog
+      << "Test #2a: hier::VariableDatabase::checkVariableExists()..." << endl;
+      if (!var_db->checkVariableExists("uval")) {
+         fail_count++;
+         tbox::perr
+         <<
+         "FAILED: - Test #2a: hier::VariableDatabase::checkVariableExists()\n"
+         << "uval variable added to var_db, but not found" << endl;
+      }
+
+      // Test #2b: hier::VariableDatabase::checkVariableExists()
+      tbox::plog
+      << "Test #2b: hier::VariableDatabase::checkVariableExists()..." << endl;
+      if (!var_db->checkVariableExists("flux")) {
+         fail_count++;
+         tbox::perr
+         <<
+         "FAILED: - Test #2b: hier::VariableDatabase::checkVariableExists()\n"
+         << "flux variable added to var_db, but not found" << endl;
+      }
+
+      // Test #2c: hier::VariableDatabase::checkVariableExists()
+      tbox::plog
+      << "Test #2c: hier::VariableDatabase::checkVariableExists()..." << endl;
+      if (!var_db->checkVariableExists("fluxsum")) {
+         fail_count++;
+         tbox::perr
+         <<
+         "FAILED: - Test #2c: hier::VariableDatabase::checkVariableExists()\n"
+         << "fluxsum variable added to var_db, but not found"
+         << endl;
+      }
+
+      // Test #2d: hier::VariableDatabase::checkVariableExists()
+      tbox::plog
+      << "Test #2d: hier::VariableDatabase::checkVariableExists()..." << endl;
+      if (var_db->checkVariableExists("dummy")) {
+         fail_count++;
+         tbox::perr
+         <<
+         "FAILED: - Test #2d: hier::VariableDatabase::checkVariableExists()\n"
+         << "dummy variable not added to var_db, but found" << endl;
+      }
+
+      // Test #3a: hier::VariableDatabase::getVariable()
+      tbox::plog << "Test #3a: hier::VariableDatabase::getVariable()..."
+                 << endl;
+      tbox::Pointer<hier::Variable> tvar_uval = var_db->getVariable("uval");
+      if (tvar_uval.isNull()) {
+         fail_count++;
+         tbox::perr
+         << "FAILED: - Test #3a: hier::VariableDatabase::getVariable()\n"
+         << "uval variable added to var_db, but returning NULL"
+         << endl;
+      }
+
+      // Test #3b: hier::VariableDatabase::getVariable()
+      tbox::plog << "Test #3b: hier::VariableDatabase::getVariable()..."
+                 << endl;
+      tbox::Pointer<hier::Variable> tvar_flux = var_db->getVariable("flux");
+      if (tvar_flux.isNull()) {
+         fail_count++;
+         tbox::perr
+         << "FAILED: - Test #3b: hier::VariableDatabase::getVariable()\n"
+         << "flux variable added to var_db, but returning NULL"
+         << endl;
+      }
+
+      // Test #3c: hier::VariableDatabase::getVariable()
+      tbox::plog << "Test #3c: hier::VariableDatabase::getVariable()..."
+                 << endl;
+      tbox::Pointer<hier::Variable> tvar_fluxsum = var_db->getVariable(
+            "fluxsum");
+      if (tvar_fluxsum.isNull()) {
+         fail_count++;
+         tbox::perr
+         << "FAILED: - Test #3c: hier::VariableDatabase::getVariable()\n"
+         << "fluxsum variable added to var_db, but returning NULL"
+         << endl;
+      }
+
+      // Test #3d: hier::VariableDatabase::getVariable()
+      tbox::plog << "Test #3d: hier::VariableDatabase::getVariable()..."
+                 << endl;
+      //   tbox::perr << "Attempt to get variable named dummy..." << endl;
+      tbox::Pointer<hier::Variable> tvar_dummy = var_db->getVariable("dummy");
+      if (!tvar_dummy.isNull()) {
+         fail_count++;
+         tbox::perr
+         << "FAILED: - Test #3d: hier::VariableDatabase::getVariable()\n"
+         <<
+         "dummy variable not added to var_db, but not returning NULL"
+         << endl;
+      }
+
+      // Test #4: Check instance identifier assignments
+
+      // Test #4a: hier::Variable::getInstanceIdentifier()
+      tbox::plog << "Test #4a: hier::Variable::getInstanceIdentifier()..."
+                 << endl;
+      int uval_id = tvar_uval->getInstanceIdentifier();
+      if (uval_id != 0) {
+         fail_count++;
+         tbox::perr
+         << "FAILED: - Test #4a: hier::Variable::getInstanceIdentifier()\n"
+         << "uval should have id = 0, but has id = " << uval_id
+         << endl;
+      }
+
+      // Test #4b: hier::Variable::getInstanceIdentifier()
+      tbox::plog << "Test #4b: hier::Variable::getInstanceIdentifier()..."
+                 << endl;
+      int flux_id = tvar_flux->getInstanceIdentifier();
+      if (flux_id != 1) {
+         fail_count++;
+         tbox::perr
+         << "FAILED: - Test #4b: hier::Variable::getInstanceIdentifier()\n"
+         << "flux should have id = 1, but has id = " << flux_id
+         << endl;
+      }
+
+      // Test #4c: hier::Variable::getInstanceIdentifier()
+      tbox::plog << "Test #4c: hier::Variable::getInstanceIdentifier()..."
+                 << endl;
+      int fluxsum_id = tvar_fluxsum->getInstanceIdentifier();
+      if (fluxsum_id != 2) {
+         fail_count++;
+         tbox::perr
+         << "FAILED: - Test #4c: hier::Variable::getInstanceIdentifier()\n"
+         << "fluxsum should have id = 2, but has id = "
+         << fluxsum_id << endl;
+      }
+
+      // Test #5: Attempt to register (uval,CURRENT) again
+      tbox::plog << "Test #5: Attempt to register (uval,CURRENT) again..."
+                 << endl;
+      tbox::Pointer<hier::VariableContext> tctxt_current = var_db->getContext(
+            "CURRENT");
+      hier::IntVector tzero_ghosts(dim, 0);
+      int ti = var_db->registerVariableAndContext(
+            tvar_uval, tctxt_current, tzero_ghosts);
+      if (ti != 0) {
+         fail_count++;
+         tbox::perr
+         << "FAILED: - Test #5: Re-registering a variable and context\n"
+         << "Original id = 0 should be returned, but "
+         << ti << "returned" << endl;
+      }
+
+      // Test #6a: hier::VariableDatabase::mapVariableAndContextToIndex()
+      tbox::plog
+      << "Test #6a: hier::VariableDatabase::mapVariableAndContextToIndex()..."
+      << endl;
+      ti = var_db->mapVariableAndContextToIndex(tvar_uval, tctxt_current);
+      if (ti != 0) {
+         fail_count++;
+         tbox::perr
+         <<
+         "FAILED: - Test #6a: hier::VariableDatabase::mapVariableAndContextToIndex()\n"
+         <<
+         "(uval,CURRENT) should be mapped to 0, but is mapped to "
+         << ti << endl;
+      }
+
+      // Test #6b: hier::VariableDatabase::mapVariableAndContextToIndex()
+      tbox::plog
+      << "Test #6b: hier::VariableDatabase::mapVariableAndContextToIndex()..."
+      << endl;
+      tvar_uval = var_db->getVariable("uval");
+      tbox::Pointer<hier::VariableContext> tctxt_scratch = var_db->getContext(
+            "SCRATCH");
+      ti = var_db->mapVariableAndContextToIndex(tvar_uval, tctxt_scratch);
+      if (ti != -1) {
+         fail_count++;
+         tbox::perr
+         <<
+         "FAILED: - Test #6b: hier::VariableDatabase::mapVariableAndContextToIndex()\n"
+         <<
+         "(uval,SCRATCH) should be mapped to -1, but is mapped to "
+         << ti << endl;
+      }
+
+      // Test #6c: hier::VariableDatabase::mapVariableAndContextToIndex()
+      tbox::plog
+      << "Test #6c: hier::VariableDatabase::mapVariableAndContextToIndex()..."
+      << endl;
+      tbox::Pointer<pdat::CellVariable<double> > dummy_var(
+         new pdat::CellVariable<double>(dim, "dummy", 3));
+      tctxt_scratch = var_db->getContext("SCRATCH");
+      ti = var_db->mapVariableAndContextToIndex(dummy_var, tctxt_scratch);
+      if (ti != -1) {
+         fail_count++;
+         tbox::perr
+         <<
+         "FAILED: - Test #6c: hier::VariableDatabase::mapVariableAndContextToIndex()\n"
+         <<
+         "(dummy,SCRATCH) should be mapped to -1, but is mapped to "
+         << ti << endl;
+      }
+
+      // Test #6d: hier::VariableDatabase::mapVariableAndContextToIndex()
+      tbox::plog
+      << "Test #6d: hier::VariableDatabase::mapVariableAndContextToIndex()..."
+      << endl;
+      tvar_uval = var_db->getVariable("uval");
+      tbox::Pointer<hier::VariableContext> tctxt_random(
+         new hier::VariableContext("RANDOM"));
+      ti = var_db->mapVariableAndContextToIndex(tvar_uval, tctxt_random);
+      if (ti != -1) {
+         fail_count++;
+         tbox::perr
+         <<
+         "FAILED: - Test #6d: hier::VariableDatabase::mapVariableAndContextToIndex()\n"
+         <<
+         "(uval,RANDOM) should be mapped to -1, but is mapped to "
+         << ti << endl;
+      }
+
+      // Test #7a: hier::VariableDatabase::mapIndexToVariableAndContext()
+      tbox::plog
+      << "Test #7a: hier::VariableDatabase::mapIndexToVariableAndContext()..."
+      << endl;
+      int search_id = 2;
+      tbox::Pointer<hier::Variable> search_var;
+      tbox::Pointer<hier::VariableContext> search_ctxt;
+      string flux_variable("flux");
+      string scratch_variable("SCRATCH");
+
+      // searching for index = 2
+      if (!var_db->mapIndexToVariableAndContext(
+             search_id, search_var, search_ctxt)) {
+         fail_count++;
+         tbox::perr
+         <<
+         "FAILED: - Test #7a.1: hier::VariableDatabase::mapIndexToVariableAndContext()\n"
+         <<
+         "Problem finding a (variable,context) pair for index = 2"
+         << endl;
+         if (search_var->getName() != flux_variable) {
+            fail_count++;
+            tbox::perr
+            <<
+            "FAILED: - Test #7a.2: hier::VariableDatabase::mapIndexToVariableAndContext()\n"
+            << "Returned var name should be \"flux\" but is "
+            << search_var->getName() << endl;
+         }
+         if (search_ctxt->getName() != scratch_variable) {
+            fail_count++;
+            tbox::perr
+            <<
+            "FAILED: - Test #7a.3: hier::VariableDatabase::mapIndexToVariableAndContext()\n"
+            << "Returned context name should be \"SCRATCH\" but is "
+            << search_ctxt->getName() << endl;
+         }
+/*      tbox::plog << "Var name = " << tvar->getName() << " = flux?, "
+ *      << "Context name = " << tctxt->getName() << " = CURRENT?" << endl;
+ */
+/*   } else {
+ *   tbox::plog << "Houston, we have a problem looking for index "
+ *   << search_id << endl;
+ */
+      }
+
+      // Test #7b: hier::VariableDatabase::mapIndexToVariableAndContext()
+      tbox::plog
+      << "Test #7b: hier::VariableDatabase::mapIndexToVariableAndContext()"
+      << endl;
+      search_id = 20;
+
+      // searching for index = 20
+      if (var_db->mapIndexToVariableAndContext(
+             search_id, search_var, search_ctxt)) {
+         fail_count++;
+         tbox::perr
+         <<
+         "FAILED: - Test #7b.1: hier::VariableDatabase::mapIndexToVariableAndContext()\n"
+         << "Something maps to index = 20 when nothing should.\n"
+         << "Variable name: " << search_var->getName() << "\n"
+         << "Context name: " << search_ctxt->getName()
+         << endl;
+      } else {
+
+         if (!search_var.isNull()) {
+            fail_count++;
+            tbox::perr
+            <<
+            "FAILED: - Test #7b.2: hier::VariableDatabase::mapIndexToVariableAndContext()\n"
+            << "search_var should be NULL" << endl;
+         }
+         if (!search_ctxt.isNull()) {
+            fail_count++;
+            tbox::perr
+            <<
+            "FAILED: - Test #7b.3: hier::VariableDatabase::mapIndexToVariableAndContext()\n"
+            << "search_ctxt should be NULL" << endl;
+         }
+
+      }
+
+      // Test #7c: hier::VariableDatabase::mapIndexToVariable()
+      tbox::plog
+      << "Test #7c: hier::VariableDatabase::mapIndexToVariable()..." << endl;
+      search_id = 2;
+
+      // searching for index = 2
+      if (!var_db->mapIndexToVariable(search_id, search_var)) {
+         fail_count++;
+         tbox::perr
+         <<
+         "FAILED: - Test #7c.1: hier::VariableDatabase::mapIndexToVariable()\n"
+         << "Problem finding a (variable) for index = 2"
+         << endl;
+         if (search_var->getName() != flux_variable) {
+            fail_count++;
+            tbox::perr
+            <<
+            "FAILED: - Test #7c.2: hier::VariableDatabase::mapIndexToVariable()\n"
+            << "Returned var name should be \"flux\" but is "
+            << search_var->getName() << endl;
+         }
+      }
+
+      // Test #7d: hier::VariableDatabase::mapIndexToVariable()
+      tbox::plog
+      << "Test #7d: hier::VariableDatabase::mapIndexToVariable()..." << endl;
+      search_id = 20;
+
+      // searching for index = 20
+      if (var_db->mapIndexToVariable(search_id, search_var)) {
+         fail_count++;
+         tbox::perr
+         <<
+         "FAILED: - Test #7d.1: hier::VariableDatabase::mapIndexToVariable()\n"
+         << "Something maps to index = 20 when nothing should.\n"
+         << "Variable name: " << search_var->getName() << "\n"
+         << endl;
+      } else {
+
+         if (!search_var.isNull()) {
+            fail_count++;
+            tbox::perr
+            <<
+            "FAILED: - Test #7d.2: hier::VariableDatabase::mapIndexToVariable()\n"
+            << "search_var should be NULL" << endl;
+         }
+
+      }
+
+      // Testing new registration functions and ability of variable
+      // database to add and delete descriptor indices...
+
+      tbox::plog
+      << "\nPrintout #2 of hier::Variable tbox::Database (after tests 1-7."
+      <<
+      "\n Only difference with previous printout should be addition"
+      << "\n of \"dummy\" context).....\n";
+      var_db->printClassData(tbox::plog);
+
+      // Test #8a: Checking mapping in variable database
+      tbox::plog << "Test #8a: Checking mapping in variable database..."
+                 << endl;
+      if (!var_db->checkVariablePatchDataIndex(uval, uval_current_id)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #8a: "
+                    << "VariableDatabase:checkVariablePatchDataIndex()\n"
+                    << "uval should be map to current id in patch descriptor"
+                    << endl;
+      }
+      // Test #8b: Checking mapping in variable database
+      tbox::plog << "Test #8b: Checking mapping in variable database..."
+                 << endl;
+      if (!var_db->checkVariablePatchDataIndexType(uval, uval_current_id)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #8b: "
+                    << "VariableDatabase:checkVariablePatchDataIndexType()\n"
+                    << "uval should be map to current id in patch descriptor"
+                    << endl;
+      }
+
+      // Test #8c: Checking restration of existing patch data index...
+      tbox::plog
+      << "Test #8c: Checking restration of existing patch data index..."
+      << endl;
+      int test_id = var_db->registerPatchDataIndex(uval, uval_current_id);
+
+      if (test_id != uval_current_id) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #8c: "
+                    << "VariableDatabase:registerPatchDataIndex()\n"
+                    << "re-registering current uval id should return same id"
+                    << endl;
+      }
+
+      // Test #8d: Testing registration of new cloned factory to variable...
+      tbox::plog
+      << "Test #8d: Testing registration of new cloned factory to variable..."
+      << endl;
+      int new_id =
+         var_db->registerClonedPatchDataIndex(uval, uval_current_id);
+
+      if ((new_id < 0) || (new_id == uval_current_id)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #8d: "
+                    << "VariableDatabase:registerClonedPatchDataIndex()\n"
+                    << "cloning current uval id return invalid id" << endl;
+      }
+
+      // Test #8e: Testing registration of new cloned factory to variable...
+      tbox::plog
+      << "Test #8e: Testing registration of new cloned factory to variable..."
+      << endl;
+      tbox::Pointer<hier::Variable> tvar;
+      if (!var_db->mapIndexToVariable(new_id, tvar)
+          || (tvar->getName() != "uval")) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #8e: "
+                    << "VariableDatabase:mapIndexToVariable()\n"
+                    << "descriptor id = " << new_id
+                    << " should now map to uval" << endl;
+      }
+
+      tbox::plog
+      << "\nPrintout #3 of hier::Variable tbox::Database. (after tests 8a-8e"
+      << "\n Descriptor index " << new_id
+      << " should map to newly-created uval descriptor index)"
+      << endl;
+      var_db->printClassData(tbox::plog);
+
+      // Test #8f: Testing removal of new variable-descriptor id mapping
+      var_db->removePatchDataIndex(new_id);
+
+      tbox::plog
+      << "\nPrintout #4 of hier::Variable tbox::Database. (after test 8d"
+      << "\n Descriptor index " << new_id
+      << " should no longer be mapped to a variable)..." << endl;
+      var_db->printClassData(tbox::plog);
+
+      tvar.setNull();
+      if (var_db->mapIndexToVariable(new_id, tvar)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #8f: "
+                    << "VariableDatabase:removePatchDataIndex()\n"
+                    << "descriptor id = " << new_id
+                    << " should no longer map to uval variable" << endl;
+      }
+
+      // Test #8g-h: Testing whether inconsistent mapping is allowed...
+      tbox::plog
+      << "Test #8g-h: Testing whether inconsistent mapping is allowed..."
+      << endl;
+      if (!var_db->checkVariablePatchDataIndex(flux, flux_scratch_id)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #8g: "
+                    << "VariableDatabase:checkVariablePatchDataIndex()\n"
+                    << "flux should be mapped to scratch flux id" << endl;
+      }
+      if (var_db->checkVariablePatchDataIndex(uval, flux_scratch_id)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #8h: "
+                    << "VariableDatabase:checkVariablePatchDataIndex()\n"
+                    << "uval should not map to scratch flux id" << endl;
+      }
+
+      // Test #8i-j: Testing removal of existing descriptor id...
+      tbox::plog
+      << "Test #8i-j: Testing removal of existing descriptor id..." << endl;
+      var_db->removePatchDataIndex(flux_scratch_id);
+
+      int tindex =
+         var_db->mapVariableAndContextToIndex(flux,
+            var_db->getContext("SCRATCH"));
+      if (tindex > -1) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #8i: "
+                    << "VariableDatabase:removePatchDataIndex()\n"
+                    << "flux-SCRATCH mapping should no longer be in database"
+                    << endl;
+      }
+
+      tvar.setNull();
+      if (var_db->mapIndexToVariable(flux_scratch_id, tvar)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #8j: "
+                    << "VariableDatabase:mapIndexToVariable()\n"
+                    << "descriptor id = " << flux_scratch_id
+                    << " should no longer map to flux variable" << endl;
+      }
+
+      tbox::plog
+      << "\nPrintout #5 of hier::Variable tbox::Database. (after tests 8e-j\n"
+      << "Should be identical to first printout except for the "
+      << "\naddition of \n\"dummy\" context and removal of "
+      << "flux scratch variable-context mapping" << endl;
+      var_db->printClassData(tbox::plog);
+
+
+      tbox::plog
+      << "\nPrintout #6 of hier::Variable tbox::Database after removal of \"flux\" "
+      << "variable.";
+      var_db->removeVariable("flux");
+      var_db->printClassData(tbox::plog);
+
+      /*
+       * Tests that end in program abort...
+       */
+#if 0
+      // Abort Test #1
+      tbox::Pointer<pdat::CellVariable<double> > dummy =
+         new pdat::CellVariable<double>("uval", 2);
+
+      tbox::plog << "Attempt to add a different variable named uval."
+                 << "This should bomb!!" << endl;
+      var_db->addVariable(dummy);
+
+      // Abort Test #2
+      tbox::plog << "Attempt to register uval, CURRENT again w/ wrong ghosts."
+                 << "This should bomb!!" << endl;
+      tctxt = var_db->getContext("CURRENT");
+      tvar = var_db->getVariable("uval");
+      g = hier::IntVector<NDIM>(2);
+      ti = var_db->registerVariableAndContext(tvar, tctxt, g);
+      tbox::plog << "uval, CURRENT at index = " << ti << endl;
+
+      // Abort Test #3
+      tbox::plog << "Attempt to register uval with fake CURRENT context."
+                 << "This should bomb!!" << endl;
+      tctxt = new hier::VariableContext("CURRENT");
+      tvar = var_db->getVariable("uval");
+      g = hier::IntVector<NDIM>(0);
+      ti = var_db->registerVariableAndContext(tvar, tctxt, g);
+      tbox::plog << "uval, fake CURRENT at index = " << ti << endl;
+
+      // Abort Test #4
+      tbox::plog << "Attempt to map uval to descriptor id for flux."
+                 << "This should bomb!!" << endl;
+      var_db->addVariablePatchDataIndex(uval, flux_scratch_id);
+#endif
+
+      if (fail_count == 0) {
+         tbox::pout << "\nPASSED:  vdbtest" << endl;
+      }
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return fail_count;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/vector/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/vector/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,715 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=kvtest.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SundialsAbstractVector.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/Sundials_SAMRAIVector.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/Sundials_SAMRAIVector.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/solv_NVector.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h kvtest.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=pvtest.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/geom/CartesianPatchGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BasePatchLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoundaryLookupTable.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Box.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxArray.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxList.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxOverlap.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/BoxUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ComponentSelector.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GlobalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/GridGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Index.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/IntVector.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/LocalId.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MBUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBox.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxId.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevel.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxLevelHandle.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MappedBoxTree.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockDataTranslator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockGridGeometry.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchHierarchy.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/MultiblockPatchLevel.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/NeighborhoodSet.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Patch.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchBoundaries.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchData.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchDescriptor.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchHierarchy.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevel.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PatchLevelFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.I		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PeriodicShiftCatalog.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/PersistentOverlapConnectors.h	\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/ProcessorMapping.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/RealMappedBoxConstIterator.h		\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.I				\
+	$(INCLUDE_SAM)/SAMRAI/hier/Variable.h				\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableContext.h			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.I			\
+	$(INCLUDE_SAM)/SAMRAI/hier/VariableDatabase.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.h			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsComplex.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsInteger.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.h	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.h	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.I		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.h		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideGeometry.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.I				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIndex.h				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideIterator.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideOverlap.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.h			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.I			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.h			\
+	$(INCLUDE_SAM)/SAMRAI/solv/PETScAbstractVectorReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PETSc_SAMRAIVectorReal.I		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PETSc_SAMRAIVectorReal.h		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.I			\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Clock.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Complex.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DatabaseBox.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/DescribedClass.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Dimension.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/IOStream.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Logger.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MemoryUtilities.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PIO.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/PointerBase.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.I			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ReferenceCounter.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAIManager.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/SAMRAI_MPI.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Serializable.h			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/StartupShutdownManager.h		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.I				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Timer.h				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Utilities.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/CoarsenOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/Geometry.h				\
+	$(INCLUDE_SAM)/SAMRAI/xfer/RefineOperator.h			\
+	$(INCLUDE_SAM)/SAMRAI/xfer/TimeInterpolateOperator.h pvtest.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataBasicOps.C			\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/ArrayDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchyNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/HierarchySideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchCellDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchEdgeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchFaceDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchNodeDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataBasicOps.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataMiscellaneousOpsReal.C	\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataNormOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/math/PatchSideDataOpsReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/ArrayDataOperationUtilities.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CellVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/CopyOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/EdgeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/FaceVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockCellDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockEdgeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockFaceDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockNodeDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/MultiblockSideDataTranslator.C	\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/NodeVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuteredgeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuterfaceDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OuternodeDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideData.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/OutersideDataFactory.C		\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideData.C				\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideDataFactory.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SideVariable.C			\
+	$(INCLUDE_SAM)/SAMRAI/pdat/SumOperation.C			\
+	$(INCLUDE_SAM)/SAMRAI/solv/PETScAbstractVectorReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/solv/PETSc_SAMRAIVectorReal.C		\
+	$(INCLUDE_SAM)/SAMRAI/solv/SAMRAIVectorReal.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Array.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/ConstPointer.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Database_template_methods.C		\
+	$(INCLUDE_SAM)/SAMRAI/tbox/List.C				\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MathUtilities.C			\
+	$(INCLUDE_SAM)/SAMRAI/tbox/MessageStream_template_methods.C	\
+	$(INCLUDE_SAM)/SAMRAI/tbox/Pointer.C
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
diff -r 000000000000 -r 5eda1a3f24e8 source/test/vector/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/vector/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,58 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for test of patch data and vector operations 
+##
+#########################################################################
+
+SAMRAI	      =	@top_srcdir@
+SRCDIR	      =	@srcdir@
+SUBDIR        = source/test/vector
+VPATH	      =	@srcdir@
+TESTTOOLS     = ../testtools
+OBJECT        = ../../..
+
+default: check
+
+include $(OBJECT)/config/Makefile.config
+
+CPPFLAGS_EXTRA= -DTESTING=1
+
+pvtest:		pvtest.o $(FOBJS) $(LIBSAMRAIDEPEND)
+		$(CXX) $(CXXFLAGS) $(LDFLAGS) pvtest.o $(COBJS) \
+			$(LIBSAMRAI3D) $(LIBSAMRAI) $(LDLIBS) -o $@
+kvtest:		kvtest.o $(FOBJS) $(LIBSAMRAIDEPEND)
+		$(CXX) $(CXXFLAGS) $(LDFLAGS) kvtest.o \
+			$(LIBSAMRAI3D) $(LIBSAMRAI) $(LDLIBS) -o $@
+
+NUM_TESTS = 2
+
+TEST_NPROCS = @TEST_NPROCS@
+
+check:
+		$(MAKE) check2d
+		$(MAKE) check3d
+
+check2d:
+
+check3d:	kvtest pvtest
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./kvtest
+		$(OBJECT)/config/serpa-run $(TEST_NPROCS) ./pvtest
+
+checkcompile: kvtest pvtest
+
+checktest:
+		rm -f makecheck.logfile
+		$(MAKE) check 2>&1 | $(TEE) makecheck.logfile
+		$(TESTTOOLS)/testcount.sh $(TEST_NPROCS) $(NUM_TESTS) makecheck.logfile
+		rm -f makecheck.logfile
+
+
+clean: 
+	$(SAMCLEAN)
+	$(RM) *.f *vtest*
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 source/test/vector/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/vector/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,33 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   README file for vector test.
+##
+#########################################################################
+
+The SAMRAI/source/test/vector directory contains source code 
+to test the SAMRAI vector classes, the SAMRAI-PETSc vector
+interface and the SAMRAI-Kinsol vector interface.  Each of these test programs
+creates a 2 level patch hierarchy with 2 patches on each level and may only 
+be run on 1 or 2 processors.
+
+
+Compilation:
+              pvtest - make pvtest
+              kvtest - make kvtest
+
+Execution:
+   serial -
+              pvtest - ./pvtest
+              kvtest - ./kvtest
+
+   parallel -
+              pvtest - mpirun -np <procs> pvtest
+              kvtest - mpirun -np <procs> kvtest
+
+Output:
+              pvtest - pvtest.log.*
+              kvtest - kvtest.log.*
diff -r 000000000000 -r 5eda1a3f24e8 source/test/vector/kvtest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/vector/kvtest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1295 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program to test SAMRAI-KINSOL vector interface. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <cstdio>
+#include <cstdlib>
+#include <string>
+
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/tbox/Pointer.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceIndex.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/math/HierarchyCellDataOpsReal.h"
+#include "SAMRAI/math/HierarchyDataOpsManager.h"
+#include "SAMRAI/math/HierarchyFaceDataOpsReal.h"
+#include "SAMRAI/math/HierarchyNodeDataOpsReal.h"
+#include "SAMRAI/hier/MappedBox.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeIndex.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+
+#include "SAMRAI/hier/ProcessorMapping.h"
+#include "SAMRAI/solv/SAMRAIVectorReal.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+#ifdef HAVE_SUNDIALS
+
+#include "SAMRAI/solv/Sundials_SAMRAIVector.h"
+#include "SAMRAI/solv/SundialsAbstractVector.h"
+#include "sundials/sundials_nvector.h"
+#include "SAMRAI/solv/solv_NVector.h"
+
+#endif
+
+#ifndef NULL
+#define NULL (0)
+#endif
+
+#define NCELL_VARS 2
+#define NFACE_VARS 2
+#define NNODE_VARS 4
+
+using namespace SAMRAI;
+
+int main(
+   int argc,
+   char* argv[]) {
+
+   int fail_count = 0;
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+
+      tbox::Dimension dim3d(3);
+
+      tbox::PIO::logOnlyNodeZero("kvtest.log");
+
+#ifdef HAVE_SUNDIALS
+
+      int ln, iv;
+
+      // Make a dummy hierarchy domain
+      double lo[3] = { 0.0, 0.0, 0.0 };
+      double hi[3] = { 1.0, 0.5, 0.5 };
+
+      hier::Box coarseSGS(hier::Index(0, 0, 0), hier::Index(4, 2, 2));
+
+      hier::Box coarse0(hier::Index(0, 0, 0), hier::Index(4, 2, 2));
+      hier::Box coarse1(hier::Index(5, 0, 0), hier::Index(9, 2, 2));
+      hier::Box coarse2(hier::Index(0, 0, 3), hier::Index(4, 2, 4));
+      hier::Box coarse3(hier::Index(5, 0, 3), hier::Index(9, 2, 4));
+      hier::Box coarse4(hier::Index(0, 3, 0), hier::Index(4, 4, 2));
+      hier::Box coarse5(hier::Index(5, 3, 0), hier::Index(9, 4, 2));
+      hier::Box coarse6(hier::Index(0, 3, 3), hier::Index(4, 4, 4));
+      hier::Box coarse7(hier::Index(5, 3, 3), hier::Index(9, 4, 4));
+      hier::Box fine0(hier::Index(4, 4, 4), hier::Index(7, 5, 5));
+      hier::Box fine1(hier::Index(4, 4, 6), hier::Index(7, 5, 7));
+      hier::Box fine2(hier::Index(4, 6, 4), hier::Index(7, 7, 5));
+      hier::Box fine3(hier::Index(4, 6, 6), hier::Index(7, 7, 7));
+      hier::Box fine4(hier::Index(8, 4, 4), hier::Index(13, 5, 5));
+      hier::Box fine5(hier::Index(8, 4, 6), hier::Index(13, 5, 7));
+      hier::Box fine6(hier::Index(8, 6, 4), hier::Index(13, 7, 5));
+      hier::Box fine7(hier::Index(8, 6, 6), hier::Index(13, 7, 7));
+      hier::IntVector ratio(dim3d, 2);
+
+      hier::BoxArray coarse_domain(dim3d, 8);
+      hier::BoxArray fine_boxes(dim3d, 8);
+      coarse_domain[0] = coarse0;
+      coarse_domain[1] = coarse1;
+      coarse_domain[2] = coarse2;
+      coarse_domain[3] = coarse3;
+      coarse_domain[4] = coarse4;
+      coarse_domain[5] = coarse5;
+      coarse_domain[6] = coarse6;
+      coarse_domain[7] = coarse7;
+      fine_boxes[0] = fine0;
+      fine_boxes[1] = fine1;
+      fine_boxes[2] = fine2;
+      fine_boxes[3] = fine3;
+      fine_boxes[4] = fine4;
+      fine_boxes[5] = fine5;
+      fine_boxes[6] = fine6;
+      fine_boxes[7] = fine7;
+
+      hier::BoxList coarse_domain_list(coarse_domain);
+      hier::BoxList fine_level_list(fine_boxes);
+      coarse_domain_list.coalesceBoxes();
+      fine_level_list.coalesceBoxes();
+
+      TBOX_ASSERT(coarse_domain_list.getNumberOfItems() == 1);
+      TBOX_ASSERT(fine_level_list.getNumberOfItems() == 1);
+
+      hier::Box coarse_domain_box(coarse_domain_list.getFirstItem());
+      hier::Box fine_level_box(fine_level_list.getFirstItem());
+
+      tbox::Pointer<geom::CartesianGridGeometry> geometry(
+         new geom::CartesianGridGeometry("CartesianGeometry",
+            lo,
+            hi,
+            coarse_domain));
+
+      tbox::Pointer<hier::PatchHierarchy> hierarchy(new hier::PatchHierarchy(
+                                                       "PatchHierarchy",
+                                                       geometry));
+
+      hierarchy->setMaxNumberOfLevels(2);
+      hierarchy->setRatioToCoarserLevel(ratio, 1);
+
+      // Note: For these simple tests we allow at most 2 processors.
+      const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+      const int nproc = mpi.getSize();
+      TBOX_ASSERT(nproc < 3);
+
+      const int n_coarse_boxes = coarse_domain.getNumberOfBoxes();
+      const int n_fine_boxes = fine_boxes.getNumberOfBoxes();
+
+      hier::MappedBoxLevel layer0(hier::IntVector(dim3d, 1));
+      hier::MappedBoxLevel layer1(ratio);
+
+      int ib;
+      for (ib = 0; ib < n_coarse_boxes; ib++) {
+         if (ib % nproc == layer0.getRank()) {
+            layer0.addMappedBox(hier::MappedBox(coarse_domain[ib], hier::LocalId(ib),
+                  layer0.getRank()));
+         }
+      }
+
+      for (ib = 0; ib < n_fine_boxes; ib++) {
+         if (ib % nproc == layer1.getRank()) {
+            layer1.addMappedBox(hier::MappedBox(fine_boxes[ib], hier::LocalId(ib),
+                  layer1.getRank()));
+         }
+      }
+
+      hierarchy->makeNewPatchLevel(0, layer0);
+      hierarchy->makeNewPatchLevel(1, layer1);
+
+      // Create instance of hier::Variable database
+      hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+      tbox::Pointer<hier::VariableContext> dummy = variable_db->getContext(
+            "dummy");
+      const hier::IntVector no_ghosts(dim3d, 0);
+
+      // Make some dummy variables and data on the hierarchy
+      tbox::Pointer<pdat::CellVariable<double> > cvar[NCELL_VARS];
+      int cvindx[NCELL_VARS];
+      cvar[0] = new pdat::CellVariable<double>(dim3d, "cvar0", 2);
+      cvindx[0] = variable_db->registerVariableAndContext(
+            cvar[0], dummy, no_ghosts);
+      cvar[1] = new pdat::CellVariable<double>(dim3d, "cvar1", 2);
+      cvindx[1] = variable_db->registerVariableAndContext(
+            cvar[1], dummy, no_ghosts);
+
+      tbox::Pointer<pdat::CellVariable<double> >
+      cwgt(new pdat::CellVariable<double>(dim3d, "cwgt", 1));
+      int cwgt_id = variable_db->registerVariableAndContext(
+            cwgt, dummy, no_ghosts);
+
+      tbox::Pointer<pdat::FaceVariable<double> > fvar[NFACE_VARS];
+      int fvindx[NFACE_VARS];
+      fvar[0] = new pdat::FaceVariable<double>(dim3d, "fvar0", 1);
+      fvindx[0] = variable_db->registerVariableAndContext(
+            fvar[0], dummy, no_ghosts);
+      fvar[1] = new pdat::FaceVariable<double>(dim3d, "fvar1", 1);
+      fvindx[1] = variable_db->registerVariableAndContext(
+            fvar[1], dummy, no_ghosts);
+
+      tbox::Pointer<pdat::FaceVariable<double> >
+      fwgt(new pdat::FaceVariable<double>(dim3d, "fwgt", 1));
+      int fwgt_id = variable_db->registerVariableAndContext(
+            fwgt, dummy, no_ghosts);
+
+      tbox::Pointer<pdat::NodeVariable<double> > nvar[NNODE_VARS];
+      int nvindx[NNODE_VARS];
+      nvar[0] = new pdat::NodeVariable<double>(dim3d, "nvar0", 1);
+      nvindx[0] = variable_db->registerVariableAndContext(
+            nvar[0], dummy, no_ghosts);
+      nvar[1] = new pdat::NodeVariable<double>(dim3d, "nvar1", 1);
+      nvindx[1] = variable_db->registerVariableAndContext(
+            nvar[1], dummy, no_ghosts);
+      nvar[2] = new pdat::NodeVariable<double>(dim3d, "nvar2", 1);
+      nvindx[2] = variable_db->registerVariableAndContext(
+            nvar[2], dummy, no_ghosts);
+      nvar[3] = new pdat::NodeVariable<double>(dim3d, "nvar3", 1);
+      nvindx[3] = variable_db->registerVariableAndContext(
+            nvar[3], dummy, no_ghosts);
+
+      tbox::Pointer<pdat::NodeVariable<double> >
+      nwgt(new pdat::NodeVariable<double>(dim3d, "nwgt", 1));
+      int nwgt_id = variable_db->registerVariableAndContext(
+            nwgt, dummy, no_ghosts);
+
+      for (ln = 0; ln < 2; ln++) {
+         hierarchy->getPatchLevel(ln)->allocatePatchData(cwgt_id);
+         hierarchy->getPatchLevel(ln)->allocatePatchData(fwgt_id);
+         hierarchy->getPatchLevel(ln)->allocatePatchData(nwgt_id);
+      }
+
+      tbox::Pointer<math::HierarchyCellDataOpsReal<double> > cell_ops =
+         math::HierarchyDataOpsManager::getManager()->getOperationsDouble(cwgt,
+            hierarchy);
+      tbox::Pointer<math::HierarchyFaceDataOpsReal<double> > face_ops =
+         math::HierarchyDataOpsManager::getManager()->getOperationsDouble(fwgt,
+            hierarchy);
+      tbox::Pointer<math::HierarchyNodeDataOpsReal<double> > node_ops =
+         math::HierarchyDataOpsManager::getManager()->getOperationsDouble(nwgt,
+            hierarchy);
+
+      cell_ops->resetLevels(0, 1);
+      face_ops->resetLevels(0, 1);
+      node_ops->resetLevels(0, 1);
+
+      tbox::Pointer<hier::Patch> patch;
+      tbox::Pointer<geom::CartesianPatchGeometry> pgeom;
+      tbox::Pointer<pdat::CellData<double> > cdata;
+      tbox::Pointer<pdat::FaceData<double> > fdata;
+      tbox::Pointer<pdat::NodeData<double> > ndata;
+
+      // Set control volume data for vector components
+      hier::Box coarse_fine(fine_level_box);
+      coarse_fine.coarsen(ratio);
+
+      // Initialize control volume data for cell-centered components
+
+      for (ln = 0; ln < 2; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            patch = *ip;
+            pgeom = patch->getPatchGeometry();
+            const double* dx = pgeom->getDx();
+            const double cell_vol = dx[0] * dx[1] * dx[2];
+            tbox::Pointer<pdat::CellData<double> > cvdata = patch->getPatchData(
+                  cwgt_id);
+            cvdata->fillAll(cell_vol);
+            if (ln == 0) cvdata->fillAll(0.0, (coarse_fine * patch->getBox()));
+         }
+      }
+
+      // Initialize control volume data for face-centered components
+      for (ln = 0; ln < 2; ln++) {
+
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::Pointer<pdat::FaceData<double> > data;
+            patch = *ip;
+            pgeom = patch->getPatchGeometry();
+            const double* dx = pgeom->getDx();
+            const double face_vol = dx[0] * dx[1] * dx[2];
+            data = patch->getPatchData(fwgt_id);
+            data->fillAll(face_vol);
+            pdat::FaceIndex fi(dim3d);
+            int plo0 = patch->getBox().lower(0);
+            int phi0 = patch->getBox().upper(0);
+            int plo1 = patch->getBox().lower(1);
+            int phi1 = patch->getBox().upper(1);
+            int plo2 = patch->getBox().lower(2);
+            int phi2 = patch->getBox().upper(2);
+            int ic, jc, kc;
+            double bdry_face_factor;
+            hier::Box level_box(dim3d);
+
+            if (ln == 0) {
+               data->fillAll(0.0, (coarse_fine * patch->getBox()));
+               bdry_face_factor = 0.5;
+               level_box = coarse_domain_box;
+            } else {
+               bdry_face_factor = 1.5;
+               level_box = fine_level_box;
+            }
+            //X face boundaries
+            if (plo0 == level_box.lower(0)) {
+               for (kc = plo2; kc <= phi2; kc++) {
+                  for (jc = plo1; jc <= phi1; jc++) {
+                     fi = pdat::FaceIndex(hier::Index(plo0, jc, kc),
+                           pdat::FaceIndex::X,
+                           pdat::FaceIndex::Lower);
+                     (*data)(fi) *= bdry_face_factor;
+                  }
+               }
+            } else {
+               for (kc = plo2; kc <= phi2; kc++) {
+                  for (jc = plo1; jc <= phi1; jc++) {
+                     fi = pdat::FaceIndex(hier::Index(plo0, jc, kc),
+                           pdat::FaceIndex::X,
+                           pdat::FaceIndex::Lower);
+                     (*data)(fi) = 0.0;
+                  }
+               }
+            }
+            if (phi0 == level_box.upper(0)) {
+               for (kc = plo2; kc <= phi2; kc++) {
+                  for (jc = plo1; jc <= phi1; jc++) {
+                     fi = pdat::FaceIndex(hier::Index(phi0, jc, kc),
+                           pdat::FaceIndex::X,
+                           pdat::FaceIndex::Upper);
+                     (*data)(fi) *= bdry_face_factor;
+                  }
+               }
+            }
+
+            //Y face boundaries
+            if (plo1 == level_box.lower(1)) {
+               for (kc = plo2; kc <= phi2; kc++) {
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::FaceIndex(hier::Index(ic, plo1, kc),
+                           pdat::FaceIndex::Y,
+                           pdat::FaceIndex::Lower);
+                     (*data)(fi) *= bdry_face_factor;
+                  }
+               }
+            } else {
+               for (kc = plo2; kc <= phi2; kc++) {
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::FaceIndex(hier::Index(ic, plo1, kc),
+                           pdat::FaceIndex::Y,
+                           pdat::FaceIndex::Lower);
+                     (*data)(fi) = 0.0;
+                  }
+               }
+            }
+            if (phi1 == level_box.upper(1)) {
+               for (kc = plo2; kc <= phi2; kc++) {
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::FaceIndex(hier::Index(ic, phi1, kc),
+                           pdat::FaceIndex::Y,
+                           pdat::FaceIndex::Upper);
+                     (*data)(fi) *= bdry_face_factor;
+                  }
+               }
+            }
+
+            //Z face boundaries
+            if (plo2 == level_box.lower(2)) {
+               for (jc = plo1; jc <= phi1; jc++) {
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::FaceIndex(hier::Index(ic, jc, plo2),
+                           pdat::FaceIndex::Z,
+                           pdat::FaceIndex::Lower);
+                     (*data)(fi) *= bdry_face_factor;
+                  }
+               }
+            } else {
+               for (jc = plo1; jc <= phi1; jc++) {
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::FaceIndex(hier::Index(ic, jc, plo2),
+                           pdat::FaceIndex::Z,
+                           pdat::FaceIndex::Lower);
+                     (*data)(fi) = 0.0;
+                  }
+               }
+            }
+            if (phi2 == level_box.upper(2)) {
+               for (jc = plo1; jc <= phi1; jc++) {
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::FaceIndex(hier::Index(ic, jc, phi2),
+                           pdat::FaceIndex::Z,
+                           pdat::FaceIndex::Upper);
+                     (*data)(fi) *= bdry_face_factor;
+                  }
+               }
+            }
+         }
+      }
+
+      for (ln = 0; ln < 2; ln++) {
+
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::Pointer<pdat::NodeData<double> > data;
+            patch = *ip;
+            pgeom = patch->getPatchGeometry();
+            const double* dx = pgeom->getDx();
+            const double node_vol = dx[0] * dx[1] * dx[2];
+            data = patch->getPatchData(nwgt_id);
+            data->fillAll(node_vol);
+            pdat::NodeIndex ni(dim3d);
+            hier::Index plo = patch->getBox().lower();
+            hier::Index phi = patch->getBox().upper();
+            int ic, jc, kc;
+            double bdry_face_factor;
+            double bdry_edge_factor;
+            double bdry_node_factor;
+            hier::Box level_box(dim3d);
+
+            if (ln == 0) {
+               data->fillAll(0.0, (coarse_fine * patch->getBox()));
+               bdry_face_factor = 0.5;
+               bdry_edge_factor = 0.25;
+               bdry_node_factor = 0.125;
+               level_box = coarse_domain_box;
+            } else {
+               bdry_face_factor = 1.5;
+               bdry_edge_factor = 2.25;
+               bdry_node_factor = 3.375;
+               level_box = fine_level_box;
+            }
+
+            //X faces
+            if (plo(0) == level_box.lower(0)) {
+               for (kc = plo(2); kc < phi(2); kc++) {
+                  for (jc = plo(1); jc < phi(1); jc++) {
+                     ni = pdat::NodeIndex(hier::Index(plo(
+                                 0), jc, kc), pdat::NodeIndex::LUU);
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               }
+            } else {
+               for (kc = plo(2); kc < phi(2); kc++) {
+                  for (jc = plo(1); jc < phi(1); jc++) {
+                     ni = pdat::NodeIndex(hier::Index(plo(
+                                 0), jc, kc), pdat::NodeIndex::LUU);
+                     (*data)(ni) = 0.0;
+                  }
+               }
+            }
+            if (phi(0) == level_box.upper(0)) {
+               for (kc = plo(2); kc < phi(2); kc++) {
+                  for (jc = plo(1); jc < phi(1); jc++) {
+                     ni = pdat::NodeIndex(hier::Index(phi(
+                                 0), jc, kc), pdat::NodeIndex::UUU);
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               }
+            }
+
+            //Y faces
+            if (plo(1) == level_box.lower(1)) {
+               for (kc = plo(2); kc < phi(2); kc++) {
+                  for (ic = plo(0); ic < phi(0); ic++) {
+                     ni = pdat::NodeIndex(hier::Index(ic, plo(
+                                 1), kc), pdat::NodeIndex::ULU);
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               }
+            } else {
+               for (kc = plo(2); kc < phi(2); kc++) {
+                  for (ic = plo(0); ic < phi(0); ic++) {
+                     ni = pdat::NodeIndex(hier::Index(ic, plo(
+                                 1), kc), pdat::NodeIndex::ULU);
+                     (*data)(ni) = 0.0;
+                  }
+               }
+            }
+            if (phi(1) == level_box.upper(1)) {
+               for (kc = plo(2); kc < phi(2); kc++) {
+                  for (ic = plo(0); ic < phi(0); ic++) {
+                     ni = pdat::NodeIndex(hier::Index(ic, phi(
+                                 1), kc), pdat::NodeIndex::UUU);
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               }
+            }
+
+            //Z faces
+            if (plo(2) == level_box.lower(2)) {
+               for (jc = plo(1); jc < phi(1); jc++) {
+                  for (ic = plo(0); ic < phi(0); ic++) {
+                     ni = pdat::NodeIndex(hier::Index(ic, jc, plo(
+                                 2)), pdat::NodeIndex::UUL);
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               }
+            } else {
+               for (jc = plo(1); jc < phi(1); jc++) {
+                  for (ic = plo(0); ic < phi(0); ic++) {
+                     ni = pdat::NodeIndex(hier::Index(ic, jc, plo(
+                                 2)), pdat::NodeIndex::UUL);
+                     (*data)(ni) = 0.0;
+                  }
+               }
+            }
+            if (phi(2) == level_box.upper(2)) {
+               for (jc = plo(1); jc < phi(1); jc++) {
+                  for (ic = plo(0); ic < phi(0); ic++) {
+                     ni = pdat::NodeIndex(hier::Index(ic, jc, phi(
+                                 2)), pdat::NodeIndex::UUU);
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               }
+            }
+
+            // edge boundaries
+            for (ic = plo(0); ic < phi(0); ic++) {
+               ni = pdat::NodeIndex(hier::Index(ic, plo(1), plo(
+                           2)), pdat::NodeIndex::ULL);
+               if (plo(1) == level_box.lower(1)) {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               } else {
+                  (*data)(ni) = 0.0;
+               }
+               ni = pdat::NodeIndex(hier::Index(ic, phi(1), plo(
+                           2)), pdat::NodeIndex::UUL);
+               if (phi(1) == level_box.upper(1)) {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               } else {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_face_factor;
+                  } else {
+                     (*data)(ni) *= 0.0;
+                  }
+               }
+               ni = pdat::NodeIndex(hier::Index(ic, plo(1), phi(
+                           2)), pdat::NodeIndex::ULU);
+               if (plo(1) == level_box.lower(1)) {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               } else {
+                  (*data)(ni) = 0.0;
+               }
+               ni = pdat::NodeIndex(hier::Index(ic, phi(1), phi(
+                           2)), pdat::NodeIndex::UUU);
+               if (phi(1) == level_box.upper(1)) {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               } else {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               }
+            }
+
+            for (jc = plo(1); jc < phi(1); jc++) {
+               ni = pdat::NodeIndex(hier::Index(plo(0), jc, plo(
+                           2)), pdat::NodeIndex::LUL);
+               if (plo(0) == level_box.lower(0)) {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               } else {
+                  (*data)(ni) = 0.0;
+               }
+               ni = pdat::NodeIndex(hier::Index(phi(0), jc, plo(
+                           2)), pdat::NodeIndex::UUL);
+               if (phi(0) == level_box.upper(0)) {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               } else {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_face_factor;
+                  } else {
+                     (*data)(ni) *= 0.0;
+                  }
+               }
+               ni = pdat::NodeIndex(hier::Index(plo(0), jc, phi(
+                           2)), pdat::NodeIndex::LUU);
+               if (plo(0) == level_box.lower(0)) {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               } else {
+                  (*data)(ni) = 0.0;
+               }
+               ni = pdat::NodeIndex(hier::Index(phi(0), jc, phi(
+                           2)), pdat::NodeIndex::UUU);
+               if (phi(0) == level_box.upper(0)) {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               } else {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               }
+            }
+
+            for (kc = plo(2); kc < phi(2); kc++) {
+               ni = pdat::NodeIndex(hier::Index(plo(0), plo(
+                           1), kc), pdat::NodeIndex::LLU);
+               if (plo(0) == level_box.lower(0)) {
+                  if (plo(1) == level_box.lower(1)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               } else {
+                  (*data)(ni) = 0.0;
+               }
+               ni = pdat::NodeIndex(hier::Index(phi(0), plo(
+                           1), kc), pdat::NodeIndex::ULU);
+               if (phi(0) == level_box.upper(0)) {
+                  if (plo(1) == level_box.lower(1)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               } else {
+                  if (plo(1) == level_box.lower(1)) {
+                     (*data)(ni) *= bdry_face_factor;
+                  } else {
+                     (*data)(ni) *= 0.0;
+                  }
+               }
+               ni = pdat::NodeIndex(hier::Index(plo(0), phi(
+                           1), kc), pdat::NodeIndex::LUU);
+               if (plo(0) == level_box.lower(0)) {
+                  if (phi(1) == level_box.upper(1)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               } else {
+                  (*data)(ni) = 0.0;
+               }
+               ni = pdat::NodeIndex(hier::Index(phi(0), phi(
+                           1), kc), pdat::NodeIndex::UUU);
+               if (phi(0) == level_box.upper(0)) {
+                  if (phi(1) == level_box.upper(1)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               } else {
+                  if (phi(1) == level_box.upper(1)) {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               }
+            }
+
+            //corner boundaries
+            ni = pdat::NodeIndex(hier::Index(plo(0), plo(1), plo(
+                        2)), pdat::NodeIndex::LLL);
+            if (plo(0) == level_box.lower(0)) {
+               if (plo(1) == level_box.lower(1)) {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_node_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               } else {
+                  (*data)(ni) = 0.0;
+               }
+            } else {
+               (*data)(ni) = 0.0;
+            }
+
+            ni = pdat::NodeIndex(hier::Index(plo(0), plo(1), phi(
+                        2)), pdat::NodeIndex::LLU);
+            if (plo(0) == level_box.lower(0)) {
+               if (plo(1) == level_box.lower(1)) {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_node_factor;
+                  } else {
+                     (*data)(ni) *= bdry_edge_factor;
+                  }
+               } else {
+                  (*data)(ni) = 0.0;
+               }
+            } else {
+               (*data)(ni) = 0.0;
+            }
+
+            ni = pdat::NodeIndex(hier::Index(plo(0), phi(1), plo(
+                        2)), pdat::NodeIndex::LUL);
+            if (plo(0) == level_box.lower(0)) {
+               if (phi(1) == level_box.upper(1)) {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_node_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               } else {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               }
+            } else {
+               (*data)(ni) = 0.0;
+            }
+
+            ni = pdat::NodeIndex(hier::Index(plo(0), phi(1), phi(
+                        2)), pdat::NodeIndex::LUU);
+            if (plo(0) == level_box.lower(0)) {
+               if (phi(1) == level_box.upper(1)) {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_node_factor;
+                  } else {
+                     (*data)(ni) *= bdry_edge_factor;
+                  }
+               } else {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               }
+            } else {
+               (*data)(ni) = 0.0;
+            }
+
+            ni = pdat::NodeIndex(hier::Index(phi(0), plo(1), plo(
+                        2)), pdat::NodeIndex::ULL);
+            if (phi(0) == level_box.upper(0)) {
+               if (plo(1) == level_box.lower(1)) {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_node_factor;
+                  } else {
+                     (*data)(ni) *= 0.0;
+                  }
+               } else {
+                  (*data)(ni) = 0.0;
+               }
+            } else {
+               if (plo(1) == level_box.lower(1)) {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               } else {
+                  (*data)(ni) = 0.0;
+               }
+            }
+
+            ni = pdat::NodeIndex(hier::Index(phi(0), plo(1), phi(
+                        2)), pdat::NodeIndex::ULU);
+            if (phi(0) == level_box.upper(0)) {
+               if (plo(1) == level_box.lower(1)) {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_node_factor;
+                  } else {
+                     (*data)(ni) *= bdry_edge_factor;
+                  }
+               } else {
+                  (*data)(ni) = 0.0;
+               }
+            } else {
+               if (plo(1) == level_box.lower(1)) {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               } else {
+                  (*data)(ni) = 0.0;
+               }
+            }
+
+            ni = pdat::NodeIndex(hier::Index(phi(0), phi(1), plo(
+                        2)), pdat::NodeIndex::UUL);
+            if (phi(0) == level_box.upper(0)) {
+               if (phi(1) == level_box.upper(1)) {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_node_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               } else {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               }
+            } else {
+               if (phi(1) == level_box.upper(1)) {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               } else {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_face_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               }
+            }
+
+            ni = pdat::NodeIndex(hier::Index(phi(0), phi(1), phi(
+                        2)), pdat::NodeIndex::UUU);
+            if (phi(0) == level_box.upper(0)) {
+               if (phi(1) == level_box.upper(1)) {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_node_factor;
+                  } else {
+                     (*data)(ni) *= bdry_edge_factor;
+                  }
+               } else {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               }
+            } else {
+               if (phi(1) == level_box.upper(1)) {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               } else {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               }
+            }
+         }
+      }
+
+      // Create SAMRAI vectors:
+      // Each vector has four components (1 cell component with depth = 2,
+      // 1 face component with depth = 1, and 2 node components with depth = 1).
+      tbox::Pointer<solv::SAMRAIVectorReal<double> > my_vec0(
+         new solv::SAMRAIVectorReal<double>("my_vec0", hierarchy, 0, 1));
+      my_vec0->addComponent(cvar[0], cvindx[0], cwgt_id);
+      my_vec0->addComponent(fvar[0], fvindx[0], fwgt_id);
+      my_vec0->addComponent(nvar[0], nvindx[0], nwgt_id);
+      my_vec0->addComponent(nvar[1], nvindx[1], nwgt_id);
+
+      tbox::Pointer<solv::SAMRAIVectorReal<double> > my_vec1(
+         new solv::SAMRAIVectorReal<double>("my_vec1", hierarchy, 0, 1));
+      my_vec1->addComponent(cvar[1], cvindx[1], cwgt_id);
+      my_vec1->addComponent(fvar[1], fvindx[1], fwgt_id);
+      my_vec1->addComponent(nvar[2], nvindx[2], nwgt_id);
+      my_vec1->addComponent(nvar[3], nvindx[3], nwgt_id);
+
+      my_vec0->allocateVectorData();
+      my_vec1->allocateVectorData();
+
+      // Print out control volume data and compute integrals...
+
+      tbox::plog << "cell control volume data" << std::endl;
+      cell_ops->printData(cwgt_id, tbox::plog);
+      tbox::plog << "face control volume data" << std::endl;
+      face_ops->printData(fwgt_id, tbox::plog);
+      tbox::plog << "node control volume data" << std::endl;
+      node_ops->printData(nwgt_id, tbox::plog);
+
+      double norm;
+      //pout << "sum of each control volume is " << std::endl;
+
+      norm = cell_ops->sumControlVolumes(cvindx[0], cwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(norm, (double)0.5)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #1, norm != 0.5\n";
+      }
+      //pout << "Component 0 : " << norm << " = 0.5?" << std::endl;
+
+      norm = face_ops->sumControlVolumes(fvindx[0], fwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(norm, (double)0.75)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #2, norm != 0.75\n";
+      }
+      //pout << "Component 1 : " << norm << " = 0.75?" << std::endl;
+
+      norm = node_ops->sumControlVolumes(nvindx[0], nwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(norm, (double)0.25)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #3, norm != 0.25\n";
+      }
+      //pout << "Component 2 : " << norm << " = 0.25?" << std::endl;
+
+      norm = node_ops->sumControlVolumes(nvindx[1], nwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(norm, (double)0.25)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #4, norm != 0.25\n";
+      }
+      //pout << "Component 3 : " << norm << " = 0.25?\n" << std::endl;
+
+      // Simple tests of SAMRAI vector operations
+
+      // Construct SAMRAI vector wrappers to test operations via Sundials calls
+      N_Vector kvec0 = solv::Sundials_SAMRAIVector::createSundialsVector(
+            my_vec0)->getNVector();
+      N_Vector kvec1 = solv::Sundials_SAMRAIVector::createSundialsVector(
+            my_vec1)->getNVector();
+
+      double zero = 0.0;
+      double half = 0.5;
+      double one = 1.0;
+      double two = 2.0;
+      double three = 3.0;
+      double four = 4.0;
+      double twelve = 12.0;
+
+      // my_vec0 = 2.0
+      my_vec0->setToScalar(2.0);
+      N_VPrint_SAMRAI(kvec0);
+
+      double my_norm;
+      double p_norm;
+      my_norm = my_vec0->L1Norm();
+      //pout << "L1-norm of my_vec0 is " << norm << " = 6.0?\n" << std::endl;
+      p_norm = N_VL1Norm(kvec0);
+      //pout << "L1-norm of kvec0 is " << norm << " = 6.0?\n" << std::endl;
+      if (!tbox::MathUtilities<double>::equalEps(my_norm, p_norm)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #5, L1-norm calculation\n";
+      }
+
+      // Set fine data in my_vec0 = 3.0
+      cell_ops->resetLevels(1, 1);
+      face_ops->resetLevels(1, 1);
+      node_ops->resetLevels(1, 1);
+      cell_ops->setToScalar(cvindx[0], 3.0);
+      face_ops->setToScalar(fvindx[0], 3.0);
+      node_ops->setToScalar(nvindx[0], 3.0);
+      node_ops->setToScalar(nvindx[1], 3.0);
+
+      tbox::plog << "CHECK my_vec0" << std::endl;
+      my_vec0->print(tbox::plog);
+
+      double my_min_val = my_vec0->min();
+
+      double p_min_val;
+      p_min_val = N_VMin(kvec0);
+      tbox::plog << "min of kvec0 is " << p_min_val << " = 2.0?\n" << std::endl;
+      if (!tbox::MathUtilities<double>::equalEps(my_min_val, p_min_val)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #9, min val calculation\n";
+      }
+
+      // my_vec1 = 1/my_vec0
+      my_vec1->reciprocal(my_vec0);
+
+      double my_max_val = my_vec1->max();
+
+      double p_max_val;
+      p_max_val = N_VMaxNorm(kvec1);
+      if (!tbox::MathUtilities<double>::equalEps(my_max_val, p_max_val)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #10, reciprocal max val calculation\n";
+      }
+
+      // Manipulate patch data on vector and test norms
+
+      // Set some bogus values on Level in my_vec1 that should be masked out
+      // in ensuing vector norm calculations
+
+      tbox::Pointer<hier::PatchLevel> level_zero =
+         hierarchy->getPatchLevel(0);
+      for (hier::PatchLevel::Iterator ip(level_zero); ip; ip++) {
+         patch = *ip;
+
+         cdata = patch->getPatchData(cvindx[1]);
+         hier::Index cindex0(2, 2, 2);
+         hier::Index cindex1(5, 3, 2);
+         hier::Index cindex2(4, 2, 2);
+         hier::Index cindex3(6, 3, 2);
+         if (patch->getBox().contains(cindex0)) {
+            (*cdata)(pdat::CellIndex(cindex0), 0) = 100.0;
+         }
+         if (patch->getBox().contains(cindex1)) {
+            (*cdata)(pdat::CellIndex(cindex1), 0) = -1000.0;
+         }
+         if (patch->getBox().contains(cindex2)) {
+            (*cdata)(pdat::CellIndex(cindex2), 1) = 1100.0;
+         }
+         if (patch->getBox().contains(cindex3)) {
+            (*cdata)(pdat::CellIndex(cindex3), 1) = -10.0;
+         }
+
+         fdata = patch->getPatchData(fvindx[1]);
+         hier::Index findex0(2, 2, 2);
+         hier::Index findex1(5, 3, 2);
+         if (patch->getBox().contains(findex0)) {
+            (*fdata)
+            (pdat::FaceIndex(findex0, pdat::FaceIndex::X,
+                pdat::FaceIndex::Lower)) = 200.0;
+         }
+         if (patch->getBox().contains(findex1)) {
+            (*fdata)
+            (pdat::FaceIndex(findex1, pdat::FaceIndex::Y,
+                pdat::FaceIndex::Upper)) = -2000.0;
+         }
+
+         hier::Index nindex0(2, 2, 2);
+         hier::Index nindex1(5, 3, 2);
+         if (patch->getBox().contains(nindex0)) {
+            ndata = patch->getPatchData(nvindx[2]);
+            (*ndata)(pdat::NodeIndex(nindex0, pdat::NodeIndex::LLL)) = 300.0;
+            ndata = patch->getPatchData(nvindx[3]);
+            (*ndata)(pdat::NodeIndex(nindex0, pdat::NodeIndex::LUL)) = 30.0;
+         }
+         if (patch->getBox().contains(nindex1)) {
+            ndata = patch->getPatchData(nvindx[2]);
+            (*ndata)(pdat::NodeIndex(nindex1, pdat::NodeIndex::UUL)) = -300.0;
+            ndata = patch->getPatchData(nvindx[3]);
+            (*ndata)(pdat::NodeIndex(nindex1, pdat::NodeIndex::ULL)) = -3300.0;
+         }
+      }
+
+      tbox::plog << "my_vec1 = 0.5 (& bogus values) on L0, = 0.3333 on L1?"
+                 << std::endl;
+      my_vec1->print(tbox::plog);
+
+      double max_val = my_vec1->max();
+      if (!tbox::MathUtilities<double>::equalEps(max_val, (double)1100.0)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #11, max bogus value\n";
+      }
+
+      double min_val = my_vec1->min();
+      if (!tbox::MathUtilities<double>::equalEps(min_val, (double)-3300.0)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #12, min bogus value\n";
+      }
+
+      double my_dot = my_vec1->dot(my_vec1);
+
+      double p_dot;
+      p_dot = N_VDotProd(kvec1, kvec1);
+      if (!tbox::MathUtilities<double>::equalEps(my_dot, p_dot)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #14, dot product calculation\n";
+         std::cout << "SGS " << my_dot << "," << p_dot << std::endl;
+      }
+
+      my_norm = my_vec1->maxNorm();
+      p_norm = N_VMaxNorm(kvec1);
+      if (!tbox::MathUtilities<double>::equalEps(my_norm, p_norm)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #16, max norm calculation\n";
+      }
+
+      N_VConst(twelve, kvec0);
+      norm = my_vec1->weightedL2Norm(my_vec0);
+      if (!tbox::MathUtilities<double>::equalEps(norm, (double)7.6393717)) {
+         fail_count++;
+      }
+      norm = N_VWL2Norm(kvec1, kvec0);
+      if (!tbox::MathUtilities<double>::equalEps(norm, (double)7.6393717)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #17, weighted L2 norm calculation\n";
+      }
+
+      norm = my_vec0->RMSNorm();
+      if (!tbox::MathUtilities<double>::equalEps(norm, (double)12.0)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #18, RMS norm calculation\n";
+      }
+
+      norm = my_vec0->weightedRMSNorm(my_vec1);
+      if (!tbox::MathUtilities<double>::equalEps(norm,
+             (double)5.77482219887084)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #19, weighted RMS norm calculation\n";
+      }
+      norm = N_VWrmsNorm(kvec0, kvec1);
+      if (!tbox::MathUtilities<double>::equalEps(norm,
+             (double)5.77482219887084)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #19, weighted RMS norm calculation\n";
+      }
+
+      // Vector test routines
+      int test = my_vec0->testReciprocal(my_vec1);
+      if (test != 1) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #20, reciprocal\n";
+      }
+
+      // NOTE: -1's on face and node components on level 1 are due to fact
+      //       that these entries are redundant and are ignored in the
+      //       test calculation.  Thus, they should be ignored in the
+      //       operations that follow.
+
+      // Duplicate vectors
+      tbox::Pointer<solv::SAMRAIVectorReal<double> > my_vec2 =
+         my_vec0->cloneVector("my_vec2");
+      my_vec2->allocateVectorData();
+
+      my_vec2->setRandomValues(1.0, 0.0);
+
+      N_Vector kvec2 = solv::Sundials_SAMRAIVector::createSundialsVector(
+            my_vec2)->getNVector();
+
+      tbox::plog
+      << "\n\nPRINTING VARIABLE DATABASE before adding new vector" << std::endl;
+      variable_db->printClassData(tbox::plog);
+
+      N_Vector kvec3 = N_VClone(kvec2);
+
+      tbox::Pointer<solv::SAMRAIVectorReal<double> > sam_vec3 =
+         solv::Sundials_SAMRAIVector::getSAMRAIVector(kvec3);
+
+      tbox::plog << "\nVariables and data components in new vector...";
+      int ncomp = sam_vec3->getNumberOfComponents();
+      for (int ic = 0; ic < ncomp; ic++) {
+         tbox::plog << "\n   Comp id, variable, data id = "
+                    << ic << ", "
+                    << sam_vec3->getComponentVariable(ic)->getName() << ", "
+                    << sam_vec3->getComponentDescriptorIndex(ic);
+      }
+
+      tbox::plog << "\n\nPRINTING VARIABLE DATABASE after adding new vector"
+                 << std::endl;
+      variable_db->printClassData(tbox::plog);
+
+      N_VScale(one, kvec2, kvec3);
+
+      tbox::plog << "kvec3 = Random....?" << std::endl;
+//      N_VPrint(kvec3);
+
+      N_VScale(one, kvec0, kvec3);
+      N_VScale(one, kvec2, kvec0);
+
+      N_VLinearSum(one, kvec0, four, kvec3, kvec0);
+
+      N_VScale(half, kvec3, kvec3);
+
+      N_VConst(one, kvec0);
+      N_VConst(two, kvec1);
+      N_VConst(three, kvec2);
+
+      N_VLinearSum(three, kvec1, half, kvec0, kvec0);
+      tbox::plog << "kvec0 = 3 * 2 + 0.5 * 1 = 6.5?" << std::endl;
+//      N_VPrint(kvec0);
+
+      N_VLinearSum(one, kvec0, twelve, kvec1, kvec1);
+      tbox::plog << "kvec1 = 6.5 + 12 * 2 = 30.5?" << std::endl;
+//      N_VPrint(kvec1);
+
+      N_VLinearSum(zero, kvec0, one, kvec0, kvec0);
+      tbox::plog << "kvec0 = 0 * 6.5 + 6.5 = 6.5?" << std::endl;
+//      N_VPrint(kvec0);
+
+      N_VProd(kvec2, kvec1, kvec0);
+      tbox::plog << "kvec0 = 3.0 * 30.5 = 91.5?" << std::endl;
+//      N_VPrint(kvec0);
+
+      N_VDiv(kvec2, kvec1, kvec0);
+      tbox::plog << "kvec0 = 3.0 / 30.5 = 0.098360656?" << std::endl;
+//      N_VPrint(kvec0);
+
+      my_vec0->setRandomValues(7.0, -5.0);
+      tbox::plog << "kvec0 has random values between -5.0 and 2.0" << std::endl;
+//      N_VPrint(kvec0);
+
+      N_VAbs(kvec0, kvec0);
+      tbox::plog << "all negative values from kvec0 have been made positive"
+                 << std::endl;
+//      N_VPrint(kvec0);
+
+      N_VInv(kvec1, kvec0);
+      tbox::plog << "kvec0 = 1.0 / 30.5 = 0.032786885?" << std::endl;
+//      N_VPrint(kvec0);
+
+      N_VAddConst(kvec0, twelve, kvec0);
+      tbox::plog << "kvec0 = .032786885 + 12.0 = 12.032786885?" << std::endl;
+      N_VPrint_SAMRAI(kvec0);
+
+      my_vec0->setRandomValues(5.0, 0.0);
+      N_VCompare(2.5, kvec0, kvec1);
+      tbox::plog << "entries of kvec1 are all either 1.0 or 0.0 " << std::endl
+                 << "at points with non-zero control volume" << std::endl;
+      N_VPrint_SAMRAI(kvec1);
+
+      test = N_VInvTest(kvec2, kvec0);
+      tbox::plog << "is kvec0 pointwise inverted kvec2 (1.0/3.0)" << std::endl
+                 << "at points with non-zero control volume?" << std::endl;
+      if (test == 0) tbox::plog << "kvec1 has at least one zero element"
+                                << std::endl;
+      N_VPrint_SAMRAI(kvec0);
+
+      my_vec0->setRandomValues(2.0, -1.0);
+      N_VConst(two, kvec1);
+
+      // No more tests....Destroy vectors and data...
+
+      N_VDestroy(kvec3);
+
+      tbox::plog
+      << "\n\nPRINTING VARIABLE DATABASE after freeing new vector" << std::endl;
+      variable_db->printClassData(tbox::plog);
+
+      N_VDestroy(kvec0);
+      N_VDestroy(kvec1);
+      N_VDestroy(kvec2);
+
+      // Deallocate vector data and control volumes
+      my_vec0->freeVectorComponents();
+      my_vec1->freeVectorComponents();
+      my_vec2->freeVectorComponents();
+
+      for (ln = 0; ln < 2; ln++) {
+         hierarchy->getPatchLevel(ln)->deallocatePatchData(cwgt_id);
+         hierarchy->getPatchLevel(ln)->deallocatePatchData(fwgt_id);
+         hierarchy->getPatchLevel(ln)->deallocatePatchData(nwgt_id);
+      }
+
+      for (iv = 0; iv < NCELL_VARS; iv++) {
+         cvar[iv].setNull();
+      }
+      for (iv = 0; iv < NFACE_VARS; iv++) {
+         fvar[iv].setNull();
+      }
+      for (iv = 0; iv < NNODE_VARS; iv++) {
+         nvar[iv].setNull();
+      }
+      cwgt.setNull();
+      fwgt.setNull();
+      nwgt.setNull();
+      cell_ops.setNull();
+      face_ops.setNull();
+      node_ops.setNull();
+
+      geometry.setNull();
+      hierarchy.setNull();
+
+#endif
+
+      if (fail_count == 0) {
+         tbox::pout << "\nPASSED:  kvtest" << std::endl;
+      }
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return fail_count;
+}
diff -r 000000000000 -r 5eda1a3f24e8 source/test/vector/pvtest.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/test/vector/pvtest.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,1365 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program to test SAMRAI-PETSc vector interface. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string>
+using namespace std;
+#define included_String
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/PIO.h"
+
+#include "SAMRAI/tbox/SAMRAIManager.h"
+
+#include "SAMRAI/hier/Box.h"
+#include "SAMRAI/hier/BoxArray.h"
+#include "SAMRAI/hier/BoxList.h"
+#include "SAMRAI/geom/CartesianGridGeometry.h"
+#include "SAMRAI/geom/CartesianPatchGeometry.h"
+#include "SAMRAI/pdat/CellIndex.h"
+#include "SAMRAI/pdat/CellData.h"
+#include "SAMRAI/pdat/CellVariable.h"
+#include "SAMRAI/pdat/FaceData.h"
+#include "SAMRAI/pdat/FaceIndex.h"
+#include "SAMRAI/pdat/FaceVariable.h"
+#include "SAMRAI/math/HierarchyCellDataOpsReal.h"
+#include "SAMRAI/math/HierarchyDataOpsManager.h"
+#include "SAMRAI/math/HierarchyFaceDataOpsReal.h"
+#include "SAMRAI/math/HierarchyNodeDataOpsReal.h"
+#include "SAMRAI/hier/Index.h"
+#include "SAMRAI/hier/IntVector.h"
+#include "SAMRAI/pdat/NodeData.h"
+#include "SAMRAI/pdat/NodeIndex.h"
+#include "SAMRAI/pdat/NodeVariable.h"
+#include "SAMRAI/hier/Patch.h"
+#include "SAMRAI/hier/PatchHierarchy.h"
+#include "SAMRAI/hier/PatchLevel.h"
+#include "SAMRAI/solv/PETSc_SAMRAIVectorReal.h"
+#include "SAMRAI/tbox/Pointer.h"
+#include "SAMRAI/hier/ProcessorMapping.h"
+#include "SAMRAI/solv/SAMRAIVectorReal.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+#include "SAMRAI/hier/VariableContext.h"
+#include "SAMRAI/hier/VariableDatabase.h"
+
+#ifndef NULL
+#define NULL (0)
+#endif
+
+#define NCELL_VARS 2
+#define NFACE_VARS 2
+#define NNODE_VARS 4
+
+using namespace SAMRAI;
+
+int main(
+   int argc,
+   char* argv[]) {
+   int fail_count = 0;
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   /*
+    * Create block to force pointer deallocation.  If this is not done
+    * then there will be memory leaks reported.
+    */
+   {
+
+      tbox::PIO::logOnlyNodeZero("pvtest.log");
+
+      tbox::Dimension dim3d(3);
+
+#ifdef HAVE_PETSC
+//   This causes some error related to PetscTrFreeDefault when a vector
+//   is deleted.  So I commented it out for now.  RDH 2/17/2000.
+//   This problem fixed, DAH 9/19/2001.  Problem arose from the PETSc
+//   libs not having world readable and executable permisions.
+//   Also added a matching PetscFinalize, to prevent memory leaks, etc.
+      PetscInitialize(&argc, &argv, (char *)NULL, NULL);
+
+      int ln, iv;
+
+      // Make a dummy hierarchy domain
+      double lo[3] = { 0.0, 0.0, 0.0 };
+      double hi[3] = { 1.0, 0.5, 0.5 };
+
+      hier::Box coarse0(hier::Index(0, 0, 0), hier::Index(4, 2, 2));
+      hier::Box coarse1(hier::Index(5, 0, 0), hier::Index(9, 2, 2));
+      hier::Box coarse2(hier::Index(0, 0, 3), hier::Index(4, 2, 4));
+      hier::Box coarse3(hier::Index(5, 0, 3), hier::Index(9, 2, 4));
+      hier::Box coarse4(hier::Index(0, 3, 0), hier::Index(4, 4, 2));
+      hier::Box coarse5(hier::Index(5, 3, 0), hier::Index(9, 4, 2));
+      hier::Box coarse6(hier::Index(0, 3, 3), hier::Index(4, 4, 4));
+      hier::Box coarse7(hier::Index(5, 3, 3), hier::Index(9, 4, 4));
+      hier::Box fine0(hier::Index(4, 4, 4), hier::Index(7, 5, 5));
+      hier::Box fine1(hier::Index(4, 4, 6), hier::Index(7, 5, 7));
+      hier::Box fine2(hier::Index(4, 6, 4), hier::Index(7, 7, 5));
+      hier::Box fine3(hier::Index(4, 6, 6), hier::Index(7, 7, 7));
+      hier::Box fine4(hier::Index(8, 4, 4), hier::Index(13, 5, 5));
+      hier::Box fine5(hier::Index(8, 4, 6), hier::Index(13, 5, 7));
+      hier::Box fine6(hier::Index(8, 6, 4), hier::Index(13, 7, 5));
+      hier::Box fine7(hier::Index(8, 6, 6), hier::Index(13, 7, 7));
+      hier::IntVector ratio(dim3d, 2);
+
+      hier::BoxArray coarse_domain(dim3d, 8);
+      hier::BoxArray fine_boxes(dim3d, 8);
+      coarse_domain[0] = coarse0;
+      coarse_domain[1] = coarse1;
+      coarse_domain[2] = coarse2;
+      coarse_domain[3] = coarse3;
+      coarse_domain[4] = coarse4;
+      coarse_domain[5] = coarse5;
+      coarse_domain[6] = coarse6;
+      coarse_domain[7] = coarse7;
+      fine_boxes[0] = fine0;
+      fine_boxes[1] = fine1;
+      fine_boxes[2] = fine2;
+      fine_boxes[3] = fine3;
+      fine_boxes[4] = fine4;
+      fine_boxes[5] = fine5;
+      fine_boxes[6] = fine6;
+      fine_boxes[7] = fine7;
+
+      hier::BoxList coarse_domain_list(coarse_domain);
+      hier::BoxList fine_level_list(fine_boxes);
+      coarse_domain_list.coalesceBoxes();
+      fine_level_list.coalesceBoxes();
+
+      TBOX_ASSERT(coarse_domain_list.getNumberOfItems() == 1);
+      TBOX_ASSERT(fine_level_list.getNumberOfItems() == 1);
+
+      hier::Box coarse_domain_box(coarse_domain_list.getFirstItem());
+      hier::Box fine_level_box(fine_level_list.getFirstItem());
+
+      tbox::Pointer<geom::CartesianGridGeometry> geometry(
+         new geom::CartesianGridGeometry("CartesianGeometry",
+            lo,
+            hi,
+            coarse_domain));
+
+      tbox::Pointer<hier::PatchHierarchy> hierarchy(new hier::PatchHierarchy(
+                                                       "PatchHierarchy",
+                                                       geometry));
+
+      hierarchy->setMaxNumberOfLevels(2);
+      hierarchy->setRatioToCoarserLevel(ratio, 1);
+
+      // Note: For these simple tests we allow at most 2 processors.
+      const tbox::SAMRAI_MPI& mpi(tbox::SAMRAI_MPI::getSAMRAIWorld());
+      const int nproc = mpi.getSize();
+      TBOX_ASSERT(nproc < 3);
+
+      const int n_coarse_boxes = coarse_domain.getNumberOfBoxes();
+      const int n_fine_boxes = fine_boxes.getNumberOfBoxes();
+
+#if 0
+      hier::ProcessorMapping mapping0(n_coarse_boxes);
+      hier::ProcessorMapping mapping1(n_fine_boxes);
+
+      int ib;
+      for (ib = 0; ib < n_coarse_boxes; ib++) {
+         if (nproc > 1) {
+            if (ib < n_coarse_boxes / 2) {
+               mapping0.setProcessorAssignment(ib, 0);
+            } else {
+               mapping0.setProcessorAssignment(ib, 1);
+            }
+         } else {
+            mapping0.setProcessorAssignment(ib, 0);
+         }
+      }
+
+      for (ib = 0; ib < n_fine_boxes; ib++) {
+         if (nproc > 1) {
+            if (ib < n_fine_boxes / 2) {
+               mapping1.setProcessorAssignment(ib, 0);
+            } else {
+               mapping1.setProcessorAssignment(ib, 1);
+            }
+         } else {
+            mapping1.setProcessorAssignment(ib, 0);
+         }
+      }
+
+      hierarchy->makeNewPatchLevel(0, hier::IntVector(dim3d,
+            1), coarse_domain, mapping0);
+      hierarchy->makeNewPatchLevel(1, ratio, fine_boxes, mapping1);
+#else
+
+      hier::MappedBoxLevel layer0(hier::IntVector(dim3d, 1));
+      hier::MappedBoxLevel layer1(ratio);
+
+      if (nproc > 1) {
+         if (layer0.getRank() == 0) {
+            for (int ib = 0; ib < n_coarse_boxes / 2; ib++) {
+               layer0.addMappedBox(hier::MappedBox(coarse_domain[ib], hier::LocalId(ib),
+                     layer0.getRank()));
+            }
+         } else {
+            for (int ib = n_coarse_boxes / 2; ib < n_coarse_boxes; ib++) {
+               layer0.addMappedBox(hier::MappedBox(coarse_domain[ib], hier::LocalId(ib),
+                     layer0.getRank()));
+            }
+         }
+
+      } else {
+
+         for (int ib = 0; ib < n_coarse_boxes; ib++) {
+            layer0.addMappedBox(hier::MappedBox(coarse_domain[ib], hier::LocalId(ib),
+                  layer0.getRank()));
+         }
+
+      }
+
+      if (nproc > 1) {
+
+         if (layer1.getRank() == 0) {
+            for (int ib = 0; ib < n_fine_boxes / 2; ib++) {
+               layer1.addMappedBox(hier::MappedBox(fine_boxes[ib], hier::LocalId(ib),
+                     layer1.getRank()));
+            }
+         } else {
+            for (int ib = n_fine_boxes / 2; ib < n_fine_boxes; ib++) {
+               layer1.addMappedBox(hier::MappedBox(fine_boxes[ib], hier::LocalId(ib),
+                     layer1.getRank()));
+            }
+         }
+
+      } else {
+
+         for (int ib = 0; ib < n_fine_boxes; ib++) {
+            layer1.addMappedBox(hier::MappedBox(fine_boxes[ib], hier::LocalId(ib),
+                  layer1.getRank()));
+         }
+
+      }
+
+      hierarchy->makeNewPatchLevel(0, layer0);
+      hierarchy->makeNewPatchLevel(1, layer1);
+
+#endif
+
+      // Create instance of hier::Variable database
+      hier::VariableDatabase* variable_db = hier::VariableDatabase::getDatabase();
+      tbox::Pointer<hier::VariableContext> dummy = variable_db->getContext(
+            "dummy");
+      const hier::IntVector no_ghosts(dim3d, 0);
+
+      // Make some dummy variables and data on the hierarchy
+      tbox::Pointer<pdat::CellVariable<double> > cvar[NCELL_VARS];
+      int cvindx[NCELL_VARS];
+      cvar[0] = new pdat::CellVariable<double>(dim3d, "cvar0", 2);
+      cvindx[0] = variable_db->registerVariableAndContext(
+            cvar[0], dummy, no_ghosts);
+      cvar[1] = new pdat::CellVariable<double>(dim3d, "cvar1", 2);
+      cvindx[1] = variable_db->registerVariableAndContext(
+            cvar[1], dummy, no_ghosts);
+
+      tbox::Pointer<pdat::CellVariable<double> >
+      cwgt(new pdat::CellVariable<double>(dim3d, "cwgt", 1));
+      int cwgt_id = variable_db->registerVariableAndContext(
+            cwgt, dummy, no_ghosts);
+
+      tbox::Pointer<pdat::FaceVariable<double> > fvar[NFACE_VARS];
+      int fvindx[NFACE_VARS];
+      fvar[0] = new pdat::FaceVariable<double>(dim3d, "fvar0", 1);
+      fvindx[0] = variable_db->registerVariableAndContext(
+            fvar[0], dummy, no_ghosts);
+      fvar[1] = new pdat::FaceVariable<double>(dim3d, "fvar1", 1);
+      fvindx[1] = variable_db->registerVariableAndContext(
+            fvar[1], dummy, no_ghosts);
+
+      tbox::Pointer<pdat::FaceVariable<double> >
+      fwgt(new pdat::FaceVariable<double>(dim3d, "fwgt", 1));
+      int fwgt_id = variable_db->registerVariableAndContext(
+            fwgt, dummy, no_ghosts);
+
+      tbox::Pointer<pdat::NodeVariable<double> > nvar[NNODE_VARS];
+      int nvindx[NNODE_VARS];
+      nvar[0] = new pdat::NodeVariable<double>(dim3d, "nvar0", 1);
+      nvindx[0] = variable_db->registerVariableAndContext(
+            nvar[0], dummy, no_ghosts);
+      nvar[1] = new pdat::NodeVariable<double>(dim3d, "nvar1", 1);
+      nvindx[1] = variable_db->registerVariableAndContext(
+            nvar[1], dummy, no_ghosts);
+      nvar[2] = new pdat::NodeVariable<double>(dim3d, "nvar2", 1);
+      nvindx[2] = variable_db->registerVariableAndContext(
+            nvar[2], dummy, no_ghosts);
+      nvar[3] = new pdat::NodeVariable<double>(dim3d, "nvar3", 1);
+      nvindx[3] = variable_db->registerVariableAndContext(
+            nvar[3], dummy, no_ghosts);
+
+      tbox::Pointer<pdat::NodeVariable<double> >
+      nwgt(new pdat::NodeVariable<double>(dim3d, "nwgt", 1));
+      int nwgt_id = variable_db->registerVariableAndContext(
+            nwgt, dummy, no_ghosts);
+
+      for (ln = 0; ln < 2; ln++) {
+         hierarchy->getPatchLevel(ln)->allocatePatchData(cwgt_id);
+         hierarchy->getPatchLevel(ln)->allocatePatchData(fwgt_id);
+         hierarchy->getPatchLevel(ln)->allocatePatchData(nwgt_id);
+      }
+
+      tbox::Pointer<math::HierarchyCellDataOpsReal<double> > cell_ops =
+         math::HierarchyDataOpsManager::getManager()->getOperationsDouble(cwgt,
+            hierarchy);
+      tbox::Pointer<math::HierarchyFaceDataOpsReal<double> > face_ops =
+         math::HierarchyDataOpsManager::getManager()->getOperationsDouble(fwgt,
+            hierarchy);
+      tbox::Pointer<math::HierarchyNodeDataOpsReal<double> > node_ops =
+         math::HierarchyDataOpsManager::getManager()->getOperationsDouble(nwgt,
+            hierarchy);
+
+      cell_ops->resetLevels(0, 1);
+      face_ops->resetLevels(0, 1);
+      node_ops->resetLevels(0, 1);
+
+      tbox::Pointer<hier::Patch> patch;
+      tbox::Pointer<geom::CartesianPatchGeometry> pgeom;
+      tbox::Pointer<pdat::CellData<double> > cdata;
+      tbox::Pointer<pdat::FaceData<double> > fdata;
+      tbox::Pointer<pdat::NodeData<double> > ndata;
+
+      // Set control volume data for vector components
+      hier::Box coarse_fine(fine_level_box);
+      coarse_fine.coarsen(ratio);
+
+      // Initialize control volume data for cell-centered components
+
+      for (ln = 0; ln < 2; ln++) {
+
+         tbox::Pointer<hier::PatchLevel> level =
+            hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            patch = *ip;
+            pgeom = patch->getPatchGeometry();
+            const double* dx = pgeom->getDx();
+            const double cell_vol = dx[0] * dx[1] * dx[2];
+            tbox::Pointer<pdat::CellData<double> > cvdata = patch->getPatchData(
+                  cwgt_id);
+            cvdata->fillAll(cell_vol);
+            if (ln == 0) cvdata->fillAll(0.0, (coarse_fine * patch->getBox()));
+         }
+      }
+
+      // Initialize control volume data for face-centered components
+      for (ln = 0; ln < 2; ln++) {
+
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::Pointer<pdat::FaceData<double> > data;
+            patch = *ip;
+            pgeom = patch->getPatchGeometry();
+            const double* dx = pgeom->getDx();
+            const double face_vol = dx[0] * dx[1] * dx[2];
+            data = patch->getPatchData(fwgt_id);
+            data->fillAll(face_vol);
+            pdat::FaceIndex fi(dim3d);
+            int plo0 = patch->getBox().lower(0);
+            int phi0 = patch->getBox().upper(0);
+            int plo1 = patch->getBox().lower(1);
+            int phi1 = patch->getBox().upper(1);
+            int plo2 = patch->getBox().lower(2);
+            int phi2 = patch->getBox().upper(2);
+            int ic, jc, kc;
+            double bdry_face_factor;
+            hier::Box level_box(dim3d);
+
+            if (ln == 0) {
+               data->fillAll(0.0, (coarse_fine * patch->getBox()));
+               bdry_face_factor = 0.5;
+               level_box = coarse_domain_box;
+            } else {
+               bdry_face_factor = 1.5;
+               level_box = fine_level_box;
+            }
+            //X face boundaries
+            if (plo0 == level_box.lower(0)) {
+               for (kc = plo2; kc <= phi2; kc++) {
+                  for (jc = plo1; jc <= phi1; jc++) {
+                     fi = pdat::FaceIndex(hier::Index(plo0, jc, kc),
+                           pdat::FaceIndex::X,
+                           pdat::FaceIndex::Lower);
+                     (*data)(fi) *= bdry_face_factor;
+                  }
+               }
+            } else {
+               for (kc = plo2; kc <= phi2; kc++) {
+                  for (jc = plo1; jc <= phi1; jc++) {
+                     fi = pdat::FaceIndex(hier::Index(plo0, jc, kc),
+                           pdat::FaceIndex::X,
+                           pdat::FaceIndex::Lower);
+                     (*data)(fi) = 0.0;
+                  }
+               }
+            }
+            if (phi0 == level_box.upper(0)) {
+               for (kc = plo2; kc <= phi2; kc++) {
+                  for (jc = plo1; jc <= phi1; jc++) {
+                     fi = pdat::FaceIndex(hier::Index(phi0, jc, kc),
+                           pdat::FaceIndex::X,
+                           pdat::FaceIndex::Upper);
+                     (*data)(fi) *= bdry_face_factor;
+                  }
+               }
+            }
+
+            //Y face boundaries
+            if (plo1 == level_box.lower(1)) {
+               for (kc = plo2; kc <= phi2; kc++) {
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::FaceIndex(hier::Index(ic, plo1, kc),
+                           pdat::FaceIndex::Y,
+                           pdat::FaceIndex::Lower);
+                     (*data)(fi) *= bdry_face_factor;
+                  }
+               }
+            } else {
+               for (kc = plo2; kc <= phi2; kc++) {
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::FaceIndex(hier::Index(ic, plo1, kc),
+                           pdat::FaceIndex::Y,
+                           pdat::FaceIndex::Lower);
+                     (*data)(fi) = 0.0;
+                  }
+               }
+            }
+            if (phi1 == level_box.upper(1)) {
+               for (kc = plo2; kc <= phi2; kc++) {
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::FaceIndex(hier::Index(ic, phi1, kc),
+                           pdat::FaceIndex::Y,
+                           pdat::FaceIndex::Upper);
+                     (*data)(fi) *= bdry_face_factor;
+                  }
+               }
+            }
+
+            //Z face boundaries
+            if (plo2 == level_box.lower(2)) {
+               for (jc = plo1; jc <= phi1; jc++) {
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::FaceIndex(hier::Index(ic, jc, plo2),
+                           pdat::FaceIndex::Z,
+                           pdat::FaceIndex::Lower);
+                     (*data)(fi) *= bdry_face_factor;
+                  }
+               }
+            } else {
+               for (jc = plo1; jc <= phi1; jc++) {
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::FaceIndex(hier::Index(ic, jc, plo2),
+                           pdat::FaceIndex::Z,
+                           pdat::FaceIndex::Lower);
+                     (*data)(fi) = 0.0;
+                  }
+               }
+            }
+            if (phi2 == level_box.upper(2)) {
+               for (jc = plo1; jc <= phi1; jc++) {
+                  for (ic = plo0; ic <= phi0; ic++) {
+                     fi = pdat::FaceIndex(hier::Index(ic, jc, phi2),
+                           pdat::FaceIndex::Z,
+                           pdat::FaceIndex::Upper);
+                     (*data)(fi) *= bdry_face_factor;
+                  }
+               }
+            }
+         }
+      }
+
+      for (ln = 0; ln < 2; ln++) {
+         tbox::Pointer<hier::PatchLevel> level = hierarchy->getPatchLevel(ln);
+         for (hier::PatchLevel::Iterator ip(level); ip; ip++) {
+            tbox::Pointer<pdat::NodeData<double> > data;
+            patch = *ip;
+            pgeom = patch->getPatchGeometry();
+            const double* dx = pgeom->getDx();
+            const double node_vol = dx[0] * dx[1] * dx[2];
+            data = patch->getPatchData(nwgt_id);
+            data->fillAll(node_vol);
+            pdat::NodeIndex ni(dim3d);
+            hier::Index plo = patch->getBox().lower();
+            hier::Index phi = patch->getBox().upper();
+            int ic, jc, kc;
+            double bdry_face_factor;
+            double bdry_edge_factor;
+            double bdry_node_factor;
+            hier::Box level_box(dim3d);
+
+            if (ln == 0) {
+               data->fillAll(0.0, (coarse_fine * patch->getBox()));
+               bdry_face_factor = 0.5;
+               bdry_edge_factor = 0.25;
+               bdry_node_factor = 0.125;
+               level_box = coarse_domain_box;
+            } else {
+               bdry_face_factor = 1.5;
+               bdry_edge_factor = 2.25;
+               bdry_node_factor = 3.375;
+               level_box = fine_level_box;
+            }
+
+            //X faces
+            if (plo(0) == level_box.lower(0)) {
+               for (kc = plo(2); kc < phi(2); kc++) {
+                  for (jc = plo(1); jc < phi(1); jc++) {
+                     ni = pdat::NodeIndex(hier::Index(plo(
+                                 0), jc, kc), pdat::NodeIndex::LUU);
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               }
+            } else {
+               for (kc = plo(2); kc < phi(2); kc++) {
+                  for (jc = plo(1); jc < phi(1); jc++) {
+                     ni = pdat::NodeIndex(hier::Index(plo(
+                                 0), jc, kc), pdat::NodeIndex::LUU);
+                     (*data)(ni) = 0.0;
+                  }
+               }
+            }
+            if (phi(0) == level_box.upper(0)) {
+               for (kc = plo(2); kc < phi(2); kc++) {
+                  for (jc = plo(1); jc < phi(1); jc++) {
+                     ni = pdat::NodeIndex(hier::Index(phi(
+                                 0), jc, kc), pdat::NodeIndex::UUU);
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               }
+            }
+
+            //Y faces
+            if (plo(1) == level_box.lower(1)) {
+               for (kc = plo(2); kc < phi(2); kc++) {
+                  for (ic = plo(0); ic < phi(0); ic++) {
+                     ni = pdat::NodeIndex(hier::Index(ic, plo(
+                                 1), kc), pdat::NodeIndex::ULU);
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               }
+            } else {
+               for (kc = plo(2); kc < phi(2); kc++) {
+                  for (ic = plo(0); ic < phi(0); ic++) {
+                     ni = pdat::NodeIndex(hier::Index(ic, plo(
+                                 1), kc), pdat::NodeIndex::ULU);
+                     (*data)(ni) = 0.0;
+                  }
+               }
+            }
+            if (phi(1) == level_box.upper(1)) {
+               for (kc = plo(2); kc < phi(2); kc++) {
+                  for (ic = plo(0); ic < phi(0); ic++) {
+                     ni = pdat::NodeIndex(hier::Index(ic, phi(
+                                 1), kc), pdat::NodeIndex::UUU);
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               }
+            }
+
+            //Z faces
+            if (plo(2) == level_box.lower(2)) {
+               for (jc = plo(1); jc < phi(1); jc++) {
+                  for (ic = plo(0); ic < phi(0); ic++) {
+                     ni = pdat::NodeIndex(hier::Index(ic, jc, plo(
+                                 2)), pdat::NodeIndex::UUL);
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               }
+            } else {
+               for (jc = plo(1); jc < phi(1); jc++) {
+                  for (ic = plo(0); ic < phi(0); ic++) {
+                     ni = pdat::NodeIndex(hier::Index(ic, jc, plo(
+                                 2)), pdat::NodeIndex::UUL);
+                     (*data)(ni) = 0.0;
+                  }
+               }
+            }
+            if (phi(2) == level_box.upper(2)) {
+               for (jc = plo(1); jc < phi(1); jc++) {
+                  for (ic = plo(0); ic < phi(0); ic++) {
+                     ni = pdat::NodeIndex(hier::Index(ic, jc, phi(
+                                 2)), pdat::NodeIndex::UUU);
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               }
+            }
+
+            // edge boundaries
+            for (ic = plo(0); ic < phi(0); ic++) {
+               ni = pdat::NodeIndex(hier::Index(ic, plo(1), plo(
+                           2)), pdat::NodeIndex::ULL);
+               if (plo(1) == level_box.lower(1)) {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               } else {
+                  (*data)(ni) = 0.0;
+               }
+               ni = pdat::NodeIndex(hier::Index(ic, phi(1), plo(
+                           2)), pdat::NodeIndex::UUL);
+               if (phi(1) == level_box.upper(1)) {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               } else {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_face_factor;
+                  } else {
+                     (*data)(ni) *= 0.0;
+                  }
+               }
+               ni = pdat::NodeIndex(hier::Index(ic, plo(1), phi(
+                           2)), pdat::NodeIndex::ULU);
+               if (plo(1) == level_box.lower(1)) {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               } else {
+                  (*data)(ni) = 0.0;
+               }
+               ni = pdat::NodeIndex(hier::Index(ic, phi(1), phi(
+                           2)), pdat::NodeIndex::UUU);
+               if (phi(1) == level_box.upper(1)) {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               } else {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               }
+            }
+
+            for (jc = plo(1); jc < phi(1); jc++) {
+               ni = pdat::NodeIndex(hier::Index(plo(0), jc, plo(
+                           2)), pdat::NodeIndex::LUL);
+               if (plo(0) == level_box.lower(0)) {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               } else {
+                  (*data)(ni) = 0.0;
+               }
+               ni = pdat::NodeIndex(hier::Index(phi(0), jc, plo(
+                           2)), pdat::NodeIndex::UUL);
+               if (phi(0) == level_box.upper(0)) {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               } else {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_face_factor;
+                  } else {
+                     (*data)(ni) *= 0.0;
+                  }
+               }
+               ni = pdat::NodeIndex(hier::Index(plo(0), jc, phi(
+                           2)), pdat::NodeIndex::LUU);
+               if (plo(0) == level_box.lower(0)) {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               } else {
+                  (*data)(ni) = 0.0;
+               }
+               ni = pdat::NodeIndex(hier::Index(phi(0), jc, phi(
+                           2)), pdat::NodeIndex::UUU);
+               if (phi(0) == level_box.upper(0)) {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               } else {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               }
+            }
+
+            for (kc = plo(2); kc < phi(2); kc++) {
+               ni = pdat::NodeIndex(hier::Index(plo(0), plo(
+                           1), kc), pdat::NodeIndex::LLU);
+               if (plo(0) == level_box.lower(0)) {
+                  if (plo(1) == level_box.lower(1)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               } else {
+                  (*data)(ni) = 0.0;
+               }
+               ni = pdat::NodeIndex(hier::Index(phi(0), plo(
+                           1), kc), pdat::NodeIndex::ULU);
+               if (phi(0) == level_box.upper(0)) {
+                  if (plo(1) == level_box.lower(1)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               } else {
+                  if (plo(1) == level_box.lower(1)) {
+                     (*data)(ni) *= bdry_face_factor;
+                  } else {
+                     (*data)(ni) *= 0.0;
+                  }
+               }
+               ni = pdat::NodeIndex(hier::Index(plo(0), phi(
+                           1), kc), pdat::NodeIndex::LUU);
+               if (plo(0) == level_box.lower(0)) {
+                  if (phi(1) == level_box.upper(1)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               } else {
+                  (*data)(ni) = 0.0;
+               }
+               ni = pdat::NodeIndex(hier::Index(phi(0), phi(
+                           1), kc), pdat::NodeIndex::UUU);
+               if (phi(0) == level_box.upper(0)) {
+                  if (phi(1) == level_box.upper(1)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               } else {
+                  if (phi(1) == level_box.upper(1)) {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               }
+            }
+
+            //corner boundaries
+            ni = pdat::NodeIndex(hier::Index(plo(0), plo(1), plo(
+                        2)), pdat::NodeIndex::LLL);
+            if (plo(0) == level_box.lower(0)) {
+               if (plo(1) == level_box.lower(1)) {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_node_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               } else {
+                  (*data)(ni) = 0.0;
+               }
+            } else {
+               (*data)(ni) = 0.0;
+            }
+
+            ni = pdat::NodeIndex(hier::Index(plo(0), plo(1), phi(
+                        2)), pdat::NodeIndex::LLU);
+            if (plo(0) == level_box.lower(0)) {
+               if (plo(1) == level_box.lower(1)) {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_node_factor;
+                  } else {
+                     (*data)(ni) *= bdry_edge_factor;
+                  }
+               } else {
+                  (*data)(ni) = 0.0;
+               }
+            } else {
+               (*data)(ni) = 0.0;
+            }
+
+            ni = pdat::NodeIndex(hier::Index(plo(0), phi(1), plo(
+                        2)), pdat::NodeIndex::LUL);
+            if (plo(0) == level_box.lower(0)) {
+               if (phi(1) == level_box.upper(1)) {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_node_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               } else {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               }
+            } else {
+               (*data)(ni) = 0.0;
+            }
+
+            ni = pdat::NodeIndex(hier::Index(plo(0), phi(1), phi(
+                        2)), pdat::NodeIndex::LUU);
+            if (plo(0) == level_box.lower(0)) {
+               if (phi(1) == level_box.upper(1)) {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_node_factor;
+                  } else {
+                     (*data)(ni) *= bdry_edge_factor;
+                  }
+               } else {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               }
+            } else {
+               (*data)(ni) = 0.0;
+            }
+
+            ni = pdat::NodeIndex(hier::Index(phi(0), plo(1), plo(
+                        2)), pdat::NodeIndex::ULL);
+            if (phi(0) == level_box.upper(0)) {
+               if (plo(1) == level_box.lower(1)) {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_node_factor;
+                  } else {
+                     (*data)(ni) *= 0.0;
+                  }
+               } else {
+                  (*data)(ni) = 0.0;
+               }
+            } else {
+               if (plo(1) == level_box.lower(1)) {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               } else {
+                  (*data)(ni) = 0.0;
+               }
+            }
+
+            ni = pdat::NodeIndex(hier::Index(phi(0), plo(1), phi(
+                        2)), pdat::NodeIndex::ULU);
+            if (phi(0) == level_box.upper(0)) {
+               if (plo(1) == level_box.lower(1)) {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_node_factor;
+                  } else {
+                     (*data)(ni) *= bdry_edge_factor;
+                  }
+               } else {
+                  (*data)(ni) = 0.0;
+               }
+            } else {
+               if (plo(1) == level_box.lower(1)) {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               } else {
+                  (*data)(ni) = 0.0;
+               }
+            }
+
+            ni = pdat::NodeIndex(hier::Index(phi(0), phi(1), plo(
+                        2)), pdat::NodeIndex::UUL);
+            if (phi(0) == level_box.upper(0)) {
+               if (phi(1) == level_box.upper(1)) {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_node_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               } else {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               }
+            } else {
+               if (phi(1) == level_box.upper(1)) {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               } else {
+                  if (plo(2) == level_box.lower(2)) {
+                     (*data)(ni) *= bdry_face_factor;
+                  } else {
+                     (*data)(ni) = 0.0;
+                  }
+               }
+            }
+
+            ni = pdat::NodeIndex(hier::Index(phi(0), phi(1), phi(
+                        2)), pdat::NodeIndex::UUU);
+            if (phi(0) == level_box.upper(0)) {
+               if (phi(1) == level_box.upper(1)) {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_node_factor;
+                  } else {
+                     (*data)(ni) *= bdry_edge_factor;
+                  }
+               } else {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               }
+            } else {
+               if (phi(1) == level_box.upper(1)) {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_edge_factor;
+                  } else {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               } else {
+                  if (phi(2) == level_box.upper(2)) {
+                     (*data)(ni) *= bdry_face_factor;
+                  }
+               }
+            }
+         }
+      }
+
+      // Create SAMRAI vectors:
+      // Each vector has four components (1 cell component with depth = 2,
+      // 1 face component with depth = 1, and 2 node components with depth = 1).
+      tbox::Pointer<solv::SAMRAIVectorReal<double> > my_vec0(
+         new solv::SAMRAIVectorReal<double>("my_vec0", hierarchy, 0, 1));
+      my_vec0->addComponent(cvar[0], cvindx[0], cwgt_id);
+      my_vec0->addComponent(fvar[0], fvindx[0], fwgt_id);
+      my_vec0->addComponent(nvar[0], nvindx[0], nwgt_id);
+      my_vec0->addComponent(nvar[1], nvindx[1], nwgt_id);
+
+      tbox::Pointer<solv::SAMRAIVectorReal<double> > my_vec1(
+         new solv::SAMRAIVectorReal<double>("my_vec1", hierarchy, 0, 1));
+      my_vec1->addComponent(cvar[1], cvindx[1], cwgt_id);
+      my_vec1->addComponent(fvar[1], fvindx[1], fwgt_id);
+      my_vec1->addComponent(nvar[2], nvindx[2], nwgt_id);
+      my_vec1->addComponent(nvar[3], nvindx[3], nwgt_id);
+
+      my_vec0->allocateVectorData();
+      my_vec1->allocateVectorData();
+
+      // Print out control volume data and compute integrals...
+
+      tbox::plog << "cell control volume data" << endl;
+      cell_ops->printData(cwgt_id, tbox::plog);
+      tbox::plog << "face control volume data" << endl;
+      face_ops->printData(fwgt_id, tbox::plog);
+      tbox::plog << "node control volume data" << endl;
+      node_ops->printData(nwgt_id, tbox::plog);
+
+      double norm;
+      //pout << "sum of each control volume is " << endl;
+
+      norm = cell_ops->sumControlVolumes(cvindx[0], cwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(norm, (double)0.5)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #1, norm != 0.5\n";
+      }
+      //pout << "Component 0 : " << norm << " = 0.5?" << endl;
+
+      norm = face_ops->sumControlVolumes(fvindx[0], fwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(norm, (double)0.75)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #2, norm != 0.75\n";
+      }
+      //pout << "Component 1 : " << norm << " = 0.75?" << endl;
+
+      norm = node_ops->sumControlVolumes(nvindx[0], nwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(norm, (double)0.25)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #3, norm != 0.25\n";
+      }
+      //pout << "Component 2 : " << norm << " = 0.25?" << endl;
+
+      norm = node_ops->sumControlVolumes(nvindx[1], nwgt_id);
+      if (!tbox::MathUtilities<double>::equalEps(norm, (double)0.25)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #4, norm != 0.25\n";
+      }
+      //pout << "Component 3 : " << norm << " = 0.25?\n" << endl;
+
+      // Simple tests of SAMRAI vector operations
+
+      // Construct SAMRAI vector wrappers to test operations via PETSc calls
+      Vec pvec0 = solv::PETSc_SAMRAIVectorReal<double>::createPETScVector(
+            my_vec0);
+      Vec pvec1 = solv::PETSc_SAMRAIVectorReal<double>::createPETScVector(
+            my_vec1);
+
+      double zero = 0.0;
+      double half = 0.5;
+      double one = 1.0;
+      double two = 2.0;
+      double three = 3.0;
+      double four = 4.0;
+      double twelve = 12.0;
+
+      // my_vec0 = 2.0
+      my_vec0->setToScalar(2.0);
+      VecView(pvec0, ((PetscViewer)NULL));
+
+      double my_norm;
+      double p_norm;
+      double l1_norm;
+      my_norm = my_vec0->L1Norm();
+      //pout << "L1-norm of my_vec0 is " << norm << " = 6.0?\n" << endl;
+      VecNorm(pvec0, NORM_1, &p_norm);
+      //pout << "L1-norm of pvec0 is " << norm << " = 6.0?\n" << endl;
+      if (!tbox::MathUtilities<double>::equalEps(my_norm, p_norm)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #5, L1-norm calculation\n";
+      }
+      l1_norm = my_norm;
+
+      double l2_norm;
+      my_norm = my_vec0->L2Norm();
+      VecNorm(pvec0, NORM_2, &p_norm);
+      if (!tbox::MathUtilities<double>::equalEps(my_norm, p_norm)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #6, L2-norm calculation\n";
+      }
+      l2_norm = my_norm;
+
+      double both_norms[2];
+      VecNorm(pvec0, NORM_1_AND_2, both_norms);
+      if (!tbox::MathUtilities<double>::equalEps(both_norms[0], l1_norm)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #7, both norms calculation, L1-norm\n";
+      }
+      if (!tbox::MathUtilities<double>::equalEps(both_norms[1], l2_norm)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #8, both norms calculation, L2-norm\n";
+      }
+      //pout << "Both norms of pvec0: " << both_norms[0] << " and "
+      //                                << both_norms[1] << "\n" << endl;
+
+      // Set fine data in my_vec0 = 3.0
+      cell_ops->resetLevels(1, 1);
+      face_ops->resetLevels(1, 1);
+      node_ops->resetLevels(1, 1);
+      cell_ops->setToScalar(cvindx[0], 3.0);
+      face_ops->setToScalar(fvindx[0], 3.0);
+      node_ops->setToScalar(nvindx[0], 3.0);
+      node_ops->setToScalar(nvindx[1], 3.0);
+
+      tbox::plog << "CHECK my_vec0" << endl;
+      my_vec0->print(tbox::plog);
+
+      double my_min_val = my_vec0->min();
+
+      int dummy1;
+      double p_min_val;
+      VecMin(pvec0, &dummy1, &p_min_val);
+      double min_val;
+      VecMin(pvec0, &dummy1, &min_val);
+      tbox::plog << "min of pvec0 is " << min_val << " = 2.0?\n" << endl;
+      if (!tbox::MathUtilities<double>::equalEps(my_min_val, p_min_val)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #9, min val calculation\n";
+      }
+
+      // my_vec1 = 1/my_vec0
+      my_vec1->reciprocal(my_vec0);
+
+      double my_max_val = my_vec1->max();
+
+      double p_max_val;
+      VecMax(pvec1, &dummy1, &p_max_val);
+      if (!tbox::MathUtilities<double>::equalEps(my_max_val, p_max_val)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #10, reciprocal max val calculation\n";
+      }
+
+      // Manipulate patch data on vector and test norms
+
+      // Set some bogus values on Level in my_vec1 that should be masked out
+      // in ensuing vector norm calculations
+
+      tbox::Pointer<hier::PatchLevel> level_zero =
+         hierarchy->getPatchLevel(0);
+      for (hier::PatchLevel::Iterator ip(level_zero); ip; ip++) {
+         patch = *ip;
+
+         cdata = patch->getPatchData(cvindx[1]);
+         hier::Index cindex0(2, 2, 2);
+         hier::Index cindex1(5, 3, 2);
+         hier::Index cindex2(4, 2, 2);
+         hier::Index cindex3(6, 3, 2);
+         if (patch->getBox().contains(cindex0)) {
+            (*cdata)(pdat::CellIndex(cindex0), 0) = 100.0;
+         }
+         if (patch->getBox().contains(cindex1)) {
+            (*cdata)(pdat::CellIndex(cindex1), 0) = -1000.0;
+         }
+         if (patch->getBox().contains(cindex2)) {
+            (*cdata)(pdat::CellIndex(cindex2), 1) = 1100.0;
+         }
+         if (patch->getBox().contains(cindex3)) {
+            (*cdata)(pdat::CellIndex(cindex3), 1) = -10.0;
+         }
+
+         fdata = patch->getPatchData(fvindx[1]);
+         hier::Index findex0(2, 2, 2);
+         hier::Index findex1(5, 3, 2);
+         if (patch->getBox().contains(findex0)) {
+            (*fdata)
+            (pdat::FaceIndex(findex0, pdat::FaceIndex::X,
+                pdat::FaceIndex::Lower)) = 200.0;
+         }
+         if (patch->getBox().contains(findex1)) {
+            (*fdata)
+            (pdat::FaceIndex(findex1, pdat::FaceIndex::Y,
+                pdat::FaceIndex::Upper)) = -2000.0;
+         }
+
+         hier::Index nindex0(2, 2, 2);
+         hier::Index nindex1(5, 3, 2);
+         if (patch->getBox().contains(nindex0)) {
+            ndata = patch->getPatchData(nvindx[2]);
+            (*ndata)(pdat::NodeIndex(nindex0, pdat::NodeIndex::LLL)) = 300.0;
+            ndata = patch->getPatchData(nvindx[3]);
+            (*ndata)(pdat::NodeIndex(nindex0, pdat::NodeIndex::LUL)) = 30.0;
+         }
+         if (patch->getBox().contains(nindex1)) {
+            ndata = patch->getPatchData(nvindx[2]);
+            (*ndata)(pdat::NodeIndex(nindex1, pdat::NodeIndex::UUL)) = -300.0;
+            ndata = patch->getPatchData(nvindx[3]);
+            (*ndata)(pdat::NodeIndex(nindex1, pdat::NodeIndex::ULL)) = -3300.0;
+         }
+      }
+
+      tbox::plog << "my_vec1 = 0.5 (& bogus values) on L0, = 0.3333 on L1?"
+                 << endl;
+      my_vec1->print(tbox::plog);
+
+      double max_val = my_vec1->max();
+      if (!tbox::MathUtilities<double>::equalEps(max_val, (double)1100.0)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #11, max bogus value\n";
+      }
+
+      min_val = my_vec1->min();
+      if (!tbox::MathUtilities<double>::equalEps(min_val, (double)-3300.0)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #12, min bogus value\n";
+      }
+
+      my_norm = my_vec1->L2Norm();
+      VecNorm(pvec1, NORM_2, &p_norm);
+      if (!tbox::MathUtilities<double>::equalEps(my_norm, p_norm)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #13, L2-norm calculation\n";
+      }
+
+      double my_dot = my_vec1->dot(my_vec1);
+
+      double p_dot;
+      VecDot(pvec1, pvec1, &p_dot);
+      if (!tbox::MathUtilities<double>::equalEps(my_dot, p_dot)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #14, dot product calculation\n";
+      }
+
+      VecTDot(pvec1, pvec1, &p_dot);
+      if (!tbox::MathUtilities<double>::equalEps(my_dot, p_dot)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #15, T-dot product calculation\n";
+      }
+
+      my_norm = my_vec1->maxNorm();
+      VecNorm(pvec1, NORM_INFINITY, &p_norm);
+      if (!tbox::MathUtilities<double>::equalEps(my_norm, p_norm)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #16, max norm calculation\n";
+      }
+
+      VecSet(pvec0, twelve);
+      norm = my_vec1->weightedL2Norm(my_vec0);
+      if (!tbox::MathUtilities<double>::equalEps(norm, (double)7.6393717)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #17, weighted L2 norm calculation\n";
+      }
+
+      norm = my_vec0->RMSNorm();
+      if (!tbox::MathUtilities<double>::equalEps(norm, (double)12.0)) {
+         fail_count++;
+         tbox::perr << "FAILED: - Test #18, RMS norm calculation\n";
+      }
+
+      // Vector test routines
+      my_vec0->setToScalar(-1.0);
+      my_vec0->compareToScalar(my_vec0, 0.4);
+      tbox::plog
+      << "my_vec0 = 1.0 on L0 (-1.0 in covered region), = 0.0 pn L1?" << endl;
+      my_vec0->print(tbox::plog);
+
+      int test = my_vec0->testReciprocal(my_vec1);
+      if (test != 1) {
+         tbox::plog << "Failed - Test #19, reciprocal\n";
+      }
+
+      tbox::plog
+      << "my_vec0 = 2.0 on L0 (-1.0 in covered region), = 3.0 pn L1?" << endl;
+      my_vec0->print(tbox::plog);
+
+      // NOTE: -1's on face and node components on level 1 are due to fact
+      //       that these entries are redundant and are ignored in the
+      //       test calculation.  Thus, they should be ignored in the
+      //       operations that follow.
+
+      // Duplicate vectors
+      tbox::Pointer<solv::SAMRAIVectorReal<double> > my_vec2 =
+         my_vec0->cloneVector("my_vec2");
+      my_vec2->allocateVectorData();
+
+      my_vec2->setRandomValues(1.0, 0.0);
+
+      Vec pvec2 = solv::PETSc_SAMRAIVectorReal<double>::createPETScVector(
+            my_vec2);
+
+      tbox::plog
+      << "\n\nPRINTING VARIABLE DATABASE before adding new vector" << endl;
+      variable_db->printClassData(tbox::plog);
+
+      Vec pvec3;
+      VecDuplicate(pvec2, &pvec3);
+
+      VecCopy(pvec2, pvec3);
+
+      tbox::Pointer<solv::SAMRAIVectorReal<double> > sam_vec3 =
+         solv::PETSc_SAMRAIVectorReal<double>::getSAMRAIVector(pvec3);
+
+      tbox::plog << "\nVariables and data components in new vector...";
+      int ncomp = sam_vec3->getNumberOfComponents();
+      for (int ic = 0; ic < ncomp; ic++) {
+         tbox::plog << "\n   Comp id, variable, data id = "
+                    << ic << ", "
+                    << sam_vec3->getComponentVariable(ic)->getName() << ", "
+                    << sam_vec3->getComponentDescriptorIndex(ic);
+      }
+
+      tbox::plog << "\n\nPRINTING VARIABLE DATABASE after adding new vector"
+                 << endl;
+      variable_db->printClassData(tbox::plog);
+
+      tbox::plog << "pvec3 = Random....?" << endl;
+      VecView(pvec3, ((PetscViewer)NULL));
+
+      VecSwap(pvec0, pvec3);
+      tbox::plog << "After swapping pvec0 and pvec3, pvec0 = Random....?"
+                 << endl;
+      VecView(pvec0, ((PetscViewer)NULL));
+      tbox::plog
+      << "pvec3 = 2.0 on L0 (-1.0 in covered region), = 3.0 pn L1?" << endl;
+      VecView(pvec3, ((PetscViewer)NULL));
+
+      VecAXPY(pvec0, four, pvec3);
+      tbox::plog
+      <<
+      "pvec0 = pvec0 + 4.0 * pvec3 = Random + 8.0 on L0 (-3.0 - Random in covered region), = 12.0 + Random on L1?"
+      << endl;
+      VecView(pvec0, ((PetscViewer)NULL));
+
+      VecScale(pvec3, half);
+      tbox::plog
+      << "pvec3 = 1.0 on L0 (-0.5 in covered region), = 1.5 pn L1?" << endl;
+      VecView(pvec3, ((PetscViewer)NULL));
+
+      VecSet(pvec0, one);
+      VecSet(pvec1, two);
+      VecSet(pvec2, three);
+
+      VecAXPBY(pvec0, three, half, pvec1);
+      tbox::plog << "pvec0 = 3 * 2 + 0.5 * 1 = 6.5?" << endl;
+      VecView(pvec0, ((PetscViewer)NULL));
+
+      VecAYPX(pvec1, twelve, pvec0);
+      tbox::plog << "pvec1 = 6.5 + 12 * 2 = 30.5?" << endl;
+      VecView(pvec1, ((PetscViewer)NULL));
+
+      VecWAXPY(pvec0, zero, pvec0, pvec0);
+      tbox::plog << "pvec0 = 0 * 6.5 + 6.5 = 6.5?" << endl;
+      VecView(pvec0, ((PetscViewer)NULL));
+
+      // No more tests....Destroy vectors and data...
+
+      VecDestroy(pvec3);
+
+      tbox::plog
+      << "\n\nPRINTING VARIABLE DATABASE after freeing new vector" << endl;
+      variable_db->printClassData(tbox::plog);
+
+      // Destroy PETSc vector wrappers
+      solv::PETSc_SAMRAIVectorReal<double>::destroyPETScVector(pvec0);
+      solv::PETSc_SAMRAIVectorReal<double>::destroyPETScVector(pvec1);
+      solv::PETSc_SAMRAIVectorReal<double>::destroyPETScVector(pvec2);
+
+      // Deallocate vector data and control volumes
+      my_vec0->freeVectorComponents();
+      my_vec1->freeVectorComponents();
+      my_vec2->freeVectorComponents();
+
+      for (ln = 0; ln < 2; ln++) {
+         hierarchy->getPatchLevel(ln)->deallocatePatchData(cwgt_id);
+         hierarchy->getPatchLevel(ln)->deallocatePatchData(fwgt_id);
+         hierarchy->getPatchLevel(ln)->deallocatePatchData(nwgt_id);
+      }
+
+      for (iv = 0; iv < NCELL_VARS; iv++) {
+         cvar[iv].setNull();
+      }
+      for (iv = 0; iv < NFACE_VARS; iv++) {
+         fvar[iv].setNull();
+      }
+      for (iv = 0; iv < NNODE_VARS; iv++) {
+         nvar[iv].setNull();
+      }
+      cwgt.setNull();
+      fwgt.setNull();
+      nwgt.setNull();
+      cell_ops.setNull();
+      face_ops.setNull();
+      node_ops.setNull();
+
+      geometry.setNull();
+      hierarchy.setNull();
+
+      PetscFinalize();
+
+#endif
+
+      if (fail_count == 0) {
+         tbox::pout << "\nPASSED:  pvtest" << endl;
+      }
+
+   }
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+   tbox::SAMRAI_MPI::finalize();
+
+   return fail_count;
+}
diff -r 000000000000 -r 5eda1a3f24e8 tools/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,25 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for the tools directory 
+##
+#########################################################################
+
+SAMRAI	      =	@top_srcdir@
+SRCDIR	      =	@srcdir@
+SUBDIR        = source
+OBJECT        = ..
+
+default: tools
+
+include $(OBJECT)/config/Makefile.config
+
+SUBDIRS = restart
+
+tools:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@) || exit 1; done
+clean:
+	for DIR in $(SUBDIRS); do (cd $$DIR && $(MAKE) $@) || exit 1; done
diff -r 000000000000 -r 5eda1a3f24e8 tools/restart/Makefile.depend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/restart/Makefile.depend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,38 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile dependencies 
+##
+#########################################################################
+
+
+## This file is automatically generated by depend.pl.
+
+
+FILE_0=RedistributedRestartUtility.o
+DEPENDS_0:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	RedistributedRestartUtility.C RedistributedRestartUtility.h
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_0 +=\
+	
+endif
+
+${FILE_0:X.o=${NDIM}.o}: ${DEPENDS_0}
+
+FILE_1=main.o
+DEPENDS_1:=\
+	$(OBJECT)/include/SAMRAI/SAMRAI_config.h			\
+	RedistributedRestartUtility.h main.C
+
+ifeq (${DEPENDS_ON_TEMPLATE_IMPLEMENTATION},yes)
+DEPENDS_1 +=\
+	
+endif
+
+${FILE_1:X.o=${NDIM}.o}: ${DEPENDS_1}
+
diff -r 000000000000 -r 5eda1a3f24e8 tools/restart/Makefile.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/restart/Makefile.in	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,40 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   makefile for SAMRAI patch hierarchy refine/coarsen tests 
+##
+#########################################################################
+
+SAMRAI        = @top_srcdir@
+SRCDIR        = @srcdir@
+SUBDIR        = tools/restart
+VPATH         = @srcdir@
+OBJECT        = ../..
+
+default: restart-redistribute	
+
+include $(OBJECT)/config/Makefile.config
+
+CXX_OBJS =	RedistributedRestartUtility.o \
+		main.o
+
+restart-redistribute:	$(CXX_OBJS) $(LIBSAMRAIDEPEND)
+			$(CXX) $(CXXFLAGS) $(LDFLAGS) $(CXX_OBJS) \
+			$(LIBSAMRAI) $(LDLIBS) -o restart-redistribute
+			$(RM) $(BIN_SAM)/restart-resdistribute
+			cp restart-redistribute $(BIN_SAM)
+
+tools: restart-redistribute
+
+
+clean-check:
+		$(RM) restart-resdistribute
+		$(SAMCLEAN)
+
+clean:		clean-check
+		$(RM) redo
+
+include $(SRCDIR)/Makefile.depend
diff -r 000000000000 -r 5eda1a3f24e8 tools/restart/RedistributedRestartUtility.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/restart/RedistributedRestartUtility.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,930 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   $Description 
+ *
+ ************************************************************************/
+
+#include "RedistributedRestartUtility.h"
+
+#ifdef HAVE_HDF5
+
+#include "SAMRAI/hier/MappedBoxLevel.h"
+#include "SAMRAI/tbox/List.h"
+#include "SAMRAI/tbox/Utilities.h"
+#include "SAMRAI/tbox/MathUtilities.h"
+
+#include <cassert>
+
+#define NAME_BUF_SIZE (32)
+
+/*
+ **************************************************************************
+ * writeRedistributedRestartFiles                                         *
+ **************************************************************************
+ */
+
+void RedistributedRestartUtility::writeRedistributedRestartFiles(
+   const string& output_dirname,
+   const string& input_dirname,
+   const int total_input_files,
+   const int total_output_files,
+   const tbox::Array<tbox::Array<int> >& file_mapping,
+   const int restore_num)
+{
+   int num_files_written = 0;
+   int num_iterations = tbox::MathUtilities<int>::Min(total_input_files,
+         total_output_files);
+
+   for (int icount = 0; icount < num_iterations; icount++) {
+
+      //We are writing to one file or reading only one file
+      int num_files_to_read = (total_input_files < total_output_files) ?
+         1 : file_mapping[icount].size();
+      int num_files_to_write = (total_input_files < total_output_files) ?
+         file_mapping[icount].size() : 1;
+
+      string restore_buf;
+      string nodes_buf;
+
+      restore_buf = "/restore." + tbox::Utilities::intToString(restore_num, 6);
+      nodes_buf = "/nodes." + tbox::Utilities::nodeToString(total_output_files);
+
+      string restart_dirname = output_dirname + restore_buf + nodes_buf;
+
+      //Make the subdirectories if this is the first iteration.
+      if (icount == 0) {
+         tbox::Utilities::recursiveMkdir(restart_dirname);
+      }
+
+      //Mount the output files on an array of output databases
+      tbox::Array<tbox::Pointer<tbox::Database> >
+      output_dbs(num_files_to_write);
+
+      string proc_buf;
+      for (int j = 0; j < num_files_to_write; j++) {
+
+         proc_buf = "/proc." + tbox::Utilities::processorToString(
+               num_files_written + j);
+
+         string output_filename = restart_dirname + proc_buf;
+
+         output_dbs[j] = new tbox::HDFDatabase(output_filename);
+
+         int open_success = output_dbs[j]->create(output_filename);
+
+         if (open_success < 0) {
+            TBOX_ERROR(
+               "Failed to open output file " << output_filename
+               << "  HDF return code:  "
+               << open_success);
+         }
+
+      }
+
+      //Mount the input files on an array of input databases.
+      tbox::Array<tbox::Pointer<tbox::Database> >
+      input_dbs(num_files_to_read);
+
+      nodes_buf = "/nodes." + tbox::Utilities::nodeToString(total_input_files);
+
+      tbox::Array<string> input_keys(0);
+      tbox::Array<string> test_keys(0);
+      int num_keys = 0;
+
+      for (int i = 0; i < num_files_to_read; i++) {
+
+         int cur_in_file_id;
+         if (total_input_files < total_output_files) {
+            //cur_in_file_id = num_files_written;
+            cur_in_file_id = icount;
+         } else {
+            cur_in_file_id = file_mapping[icount][i];
+         }
+
+         proc_buf = "/proc." + tbox::Utilities::processorToString(
+               cur_in_file_id);
+
+         string restart_filename = input_dirname + restore_buf + nodes_buf
+            + proc_buf;
+
+         input_dbs[i] = new tbox::HDFDatabase(restart_filename);
+
+         int open_success = input_dbs[i]->open(restart_filename);
+
+         if (open_success < 0) {
+            TBOX_ERROR(
+               "Failed to open input file " << restart_filename
+               << "  HDF return code:  "
+               << open_success);
+         }
+
+         //Get the array of input keys.
+         if (i == 0) {
+            input_keys = input_dbs[i]->getAllKeys();
+            num_keys = input_keys.size();
+         } else {
+            test_keys = input_dbs[i]->getAllKeys();
+            if (test_keys.size() != num_keys) {
+               TBOX_ERROR("Input files contain differing number of keys");
+            }
+         }
+      }
+
+      //For every input key, call the recursive function that reads from the
+      //input databases and writes to output databases.
+      for (int j = 0; j < num_keys; j++) {
+         readAndWriteRestartData(output_dbs,
+            input_dbs,
+            input_keys[j],
+            &file_mapping,
+            num_files_written,
+            icount,
+            total_input_files,
+            total_output_files);
+      }
+
+      //Unmount the databases.  This closes the files.
+      int k;
+      for (k = 0; k < num_files_to_read; k++) {
+         input_dbs[k]->close();
+      }
+      for (k = 0; k < num_files_to_write; k++) {
+         output_dbs[k]->close();
+      }
+
+      num_files_written += num_files_to_write;
+   }
+}
+
+/*
+ **************************************************************************
+ * readAndWriteRestartData                                                *
+ **************************************************************************
+ */
+
+void RedistributedRestartUtility::readAndWriteRestartData(
+   tbox::Array<tbox::Pointer<tbox::Database> >& output_dbs,
+   const tbox::Array<tbox::Pointer<tbox::Database> >& input_dbs,
+   const string& key,
+   const tbox::Array<tbox::Array<int> >* file_mapping,  // = NULL
+   const int num_files_written, // = -1,
+   const int input_proc_num, // = -1
+   const int total_input_files, // = -1,
+   const int total_output_files) // = -1););
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   //One of the database arrays must be of size 1, and the other must be of
+   //size >= 1.
+   assert(output_dbs.size() >= 1);
+   assert(input_dbs.size() >= 1);
+   assert(input_dbs.size() == 1 || output_dbs.size() == 1);
+#endif
+
+   //This function works under the assumption that all of the input databases
+   //contain the same keys, so we only need to check the type associated with
+   //the key with one input database.
+
+   //If the key is associated with any type other than Database, then the data
+   //can be read from input_dbs[0] and written to every element of output_dbs.
+   //The Database case is handled separately.
+
+   if (input_dbs[0]->isDatabase(key)) {
+      tbox::Pointer<tbox::Database> db = input_dbs[0]->getDatabase(key);
+
+      if (db->keyExists("d_is_patch_level") &&
+          db->getBool("d_is_patch_level")) {
+
+         //Here we are handling the input database(s) for a PatchLevel.
+
+         //Create array of level input databases.
+         tbox::Array<tbox::Pointer<tbox::Database> > level_in_dbs;
+         level_in_dbs.resizeArray(input_dbs.size());
+
+         for (int i = 0; i < input_dbs.size(); i++) {
+            level_in_dbs[i] = input_dbs[i]->getDatabase(key);
+         }
+
+         //input_proc_nums is an array that contains all of the processor
+         //numbers that created the input databases that are currently
+         //being processed.
+         tbox::Array<int> input_proc_nums;
+         if (total_input_files < total_output_files) {
+            input_proc_nums.resizeArray(1);
+            input_proc_nums[0] = input_proc_num;
+         } else {
+            input_proc_nums = (*file_mapping)[num_files_written];
+         }
+
+         //Call routine to write output according to the new processor mapping
+         readAndWritePatchLevelRestartData(output_dbs, level_in_dbs,
+            key,
+            num_files_written,
+            input_proc_nums,
+            total_output_files);
+
+      } else if (db->keyExists("d_is_mapped_box_level") &&
+                 db->getBool("d_is_mapped_box_level")) {
+
+         //Create array of level input databases.
+         tbox::Array<tbox::Pointer<tbox::Database> > level_in_dbs;
+         level_in_dbs.resizeArray(input_dbs.size());
+
+         for (int i = 0; i < input_dbs.size(); i++) {
+            level_in_dbs[i] = input_dbs[i]->getDatabase(key);
+         }
+
+         //input_proc_nums is an array that contains all of the processor
+         //numbers that created the input databases that are currently
+         //being processed.
+         tbox::Array<int> input_proc_nums;
+         if (total_input_files < total_output_files) {
+            input_proc_nums.resizeArray(1);
+            input_proc_nums[0] = input_proc_num;
+         } else {
+            input_proc_nums = (*file_mapping)[num_files_written];
+         }
+
+         readAndWriteMappedBoxLevelRestartData(output_dbs, level_in_dbs,
+            key,
+            num_files_written,
+            input_proc_nums,
+            total_output_files);
+
+      } else if (db->keyExists("d_is_edge_set") &&
+                 db->getBool("d_is_edge_set")) {
+         // don't write out edge sets.  They will be reconstructed from
+         // PatchHierarchy during restarted run initialization.
+
+         // no operation needed here.
+
+      } else {
+         //If this block is entered, then the key represents a database that
+         //is not a patch level database.  We created child database arrays
+         //for input_dbs and output_dbs, and then call readAndWriteRestartData
+         //recursively.
+
+         tbox::Array<tbox::Pointer<tbox::Database> > child_in_dbs;
+         child_in_dbs.resizeArray(input_dbs.size());
+
+         for (int i = 0; i < input_dbs.size(); i++) {
+            child_in_dbs[i] = input_dbs[i]->getDatabase(key);
+         }
+
+         tbox::Array<tbox::Pointer<tbox::Database> > child_out_dbs;
+         child_out_dbs.resizeArray(output_dbs.size());
+
+         for (int i = 0; i < output_dbs.size(); i++) {
+            child_out_dbs[i] = output_dbs[i]->putDatabase(key);
+         }
+
+         tbox::Array<string> child_keys = db->getAllKeys();
+
+         for (int j = 0; j < child_keys.size(); j++) {
+            readAndWriteRestartData(child_out_dbs,
+               child_in_dbs,
+               child_keys[j],
+               file_mapping,
+               num_files_written,
+               input_proc_num,
+               total_input_files,
+               total_output_files);
+         }
+      }
+   } else if (input_dbs[0]->isInteger(key)) {
+
+      tbox::Array<int> int_array(0);
+
+      int_array = input_dbs[0]->getIntegerArray(key);
+
+      for (int i = 0; i < output_dbs.size(); i++) {
+         output_dbs[i]->putIntegerArray(key, int_array);
+      }
+
+   } else if (input_dbs[0]->isDouble(key)) {
+
+      tbox::Array<double> double_array(0);
+
+      double_array = input_dbs[0]->getDoubleArray(key);
+
+      for (int i = 0; i < output_dbs.size(); i++) {
+         output_dbs[i]->putDoubleArray(key, double_array);
+      }
+
+   } else if (input_dbs[0]->isBool(key)) {
+
+      tbox::Array<bool> bool_array(0);
+
+      bool_array = input_dbs[0]->getBoolArray(key);
+
+      if (key == "d_write_edges_for_restart") {
+         for (int j = 0; j < bool_array.size(); j++) {
+            bool_array[j] = false;
+         }
+      }
+
+      for (int i = 0; i < output_dbs.size(); i++) {
+         output_dbs[i]->putBoolArray(key, bool_array);
+      }
+
+   } else if (input_dbs[0]->isDatabaseBox(key)) {
+
+      tbox::Array<tbox::DatabaseBox> box_array(0);
+
+      box_array = input_dbs[0]->getDatabaseBoxArray(key);
+
+      for (int i = 0; i < output_dbs.size(); i++) {
+         output_dbs[i]->putDatabaseBoxArray(key, box_array);
+      }
+
+   } else if (input_dbs[0]->isString(key)) {
+
+      tbox::Array<string> string_array(0);
+
+      string_array = input_dbs[0]->getStringArray(key);
+
+      for (int i = 0; i < output_dbs.size(); i++) {
+         output_dbs[i]->putStringArray(key, string_array);
+      }
+
+   } else if (input_dbs[0]->isComplex(key)) {
+
+      tbox::Array<dcomplex> complex_array(0);
+
+      complex_array = input_dbs[0]->getComplexArray(key);
+
+      for (int i = 0; i < output_dbs.size(); i++) {
+         output_dbs[i]->putComplexArray(key, complex_array);
+      }
+
+   } else if (input_dbs[0]->isChar(key)) {
+
+      tbox::Array<char> char_array(0);
+
+      char_array = input_dbs[0]->getCharArray(key);
+
+      for (int i = 0; i < output_dbs.size(); i++) {
+         output_dbs[i]->putCharArray(key, char_array);
+      }
+
+   } else if (input_dbs[0]->isFloat(key)) {
+
+      tbox::Array<float> float_array(0);
+
+      float_array = input_dbs[0]->getFloatArray(key);
+
+      for (int i = 0; i < output_dbs.size(); i++) {
+         output_dbs[i]->putFloatArray(key, float_array);
+      }
+
+   } else {
+
+      TBOX_ERROR(
+         "The key " << key
+         << " is invalid or not associated with a supported datatype.");
+
+   }
+}
+
+/*
+ **************************************************************************
+ * readAndWritePatchLevelRestartData                                      *
+ **************************************************************************
+ */
+
+void RedistributedRestartUtility::readAndWritePatchLevelRestartData(
+   tbox::Array<tbox::Pointer<tbox::Database> >& output_dbs,
+   const tbox::Array<tbox::Pointer<tbox::Database> >& level_in_dbs,
+   const string& key,
+   const int num_files_written,
+   const tbox::Array<int>& input_proc_nums,
+   const int total_output_files)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   assert(output_dbs.size() >= 1);
+   assert(level_in_dbs.size() >= 1);
+   assert(level_in_dbs.size() == 1 || output_dbs.size() == 1);
+#endif
+
+   //Create an array of level output databases
+   tbox::Array<tbox::Pointer<tbox::Database> > level_out_dbs;
+   level_out_dbs.resizeArray(output_dbs.size());
+
+   for (int i = 0; i < output_dbs.size(); i++) {
+      level_out_dbs[i] = output_dbs[i]->putDatabase(key);
+   }
+
+   //Read in data that is global to every processor
+   bool is_patch_level = level_in_dbs[0]->getBool("d_is_patch_level");
+   int version = level_in_dbs[0]->getInteger("HIER_PATCH_LEVEL_VERSION");
+   tbox::Array<tbox::DatabaseBox> box_array(0);
+   if (level_in_dbs[0]->keyExists("d_boxes")) {
+      level_in_dbs[0]->getDatabaseBoxArray("d_boxes");
+   }
+
+   tbox::Array<int> ratio_to_zero =
+      level_in_dbs[0]->getIntegerArray("d_ratio_to_level_zero");
+   tbox::Array<tbox::DatabaseBox> physical_domain =
+      level_in_dbs[0]->getDatabaseBoxArray("d_physical_domain");
+   int level_number = level_in_dbs[0]->getInteger("d_level_number");
+   int next_coarser_level =
+      level_in_dbs[0]->getInteger("d_next_coarser_level_number");
+   bool in_hierarchy = level_in_dbs[0]->getBool("d_in_hierarchy");
+   tbox::Array<int> ratio_to_coarser =
+      level_in_dbs[0]->getIntegerArray("d_ratio_to_coarser_level");
+
+   const int out_size = level_out_dbs.size();
+
+   //Write out global data.
+   for (int i = 0; i < out_size; i++) {
+      level_out_dbs[i]->putBool("d_is_patch_level", is_patch_level);
+      level_out_dbs[i]->putInteger("HIER_PATCH_LEVEL_VERSION", version);
+      if (box_array.size() > 0) {
+         level_out_dbs[i]->putDatabaseBoxArray("d_boxes", box_array);
+      }
+      level_out_dbs[i]->putIntegerArray("d_ratio_to_level_zero",
+         ratio_to_zero);
+      level_out_dbs[i]->putDatabaseBoxArray("d_physical_domain",
+         physical_domain);
+      level_out_dbs[i]->putInteger("d_level_number", level_number);
+      level_out_dbs[i]->putInteger("d_next_coarser_level_number",
+         next_coarser_level);
+      level_out_dbs[i]->putBool("d_in_hierarchy", in_hierarchy);
+      level_out_dbs[i]->putIntegerArray("d_ratio_to_coarser_level",
+         ratio_to_coarser);
+
+   }
+
+   tbox::Array<tbox::Pointer<tbox::Database> >
+   mapped_box_level_dbs_in(input_proc_nums.size());
+
+   tbox::List<int> local_indices_used;
+   int max_index_used = 0;
+
+   //Each iteration of this loop processes the patches from one input
+   //database.
+   for (int i = 0; i < input_proc_nums.size(); i++) {
+
+      tbox::Pointer<tbox::Database> mbl_database =
+         level_in_dbs[i]->getDatabase("mapped_box_level");
+
+      mapped_box_level_dbs_in[i] = mbl_database;
+
+      tbox::Pointer<tbox::Database> mapped_boxes_db =
+         mbl_database->getDatabase("mapped_boxes");
+
+      tbox::Array<int> local_indices(0);
+      if (mapped_boxes_db->keyExists("local_indices")) {
+         local_indices = mapped_boxes_db->getIntegerArray("local_indices");
+      }
+
+      //This list will contain all of the patch numbers that came from a
+      //single processor.
+      int mbs_size = local_indices.size();
+      tbox::List<int> input_local_patch_nums;
+      tbox::List<int> output_local_patch_nums;
+      int max_local_indices = 0;
+      int min_local_indices = tbox::MathUtilities<int>::getMax();
+
+      for (int j = 0; j < mbs_size; j++) {
+         bool new_patch_num = true;
+         for (tbox::List<int>::Iterator p(input_local_patch_nums); p; p++) {
+            if (p() == local_indices[j]) {
+               new_patch_num = false;
+               break;
+            }
+         }
+         if (new_patch_num) {
+            input_local_patch_nums.addItem(local_indices[j]);
+         }
+      }
+
+      if (out_size == 1) {
+         bool recompute_local_patch_nums = false;
+         if (local_indices_used.size() == 0) {
+            for (tbox::List<int>::Iterator ni(input_local_patch_nums); ni;
+                 ni++) {
+               local_indices_used.addItem(ni());
+               max_index_used =
+                  tbox::MathUtilities<int>::Max(max_index_used, ni());
+            }
+         } else {
+            for (tbox::List<int>::Iterator ni(input_local_patch_nums); ni;
+                 ni++) {
+               bool repeat_found = false;
+               for (tbox::List<int>::Iterator li(local_indices_used); li;
+                    li++) {
+                  if (ni() == li()) {
+                     repeat_found = true;
+                     break;
+                  }
+               }
+               if (repeat_found) {
+                  recompute_local_patch_nums = true;
+                  int new_value = max_index_used + 1;
+                  for (int a = 0; a < mbs_size; a++) {
+                     if (local_indices[a] == ni()) {
+                        local_indices[a] = new_value;
+                     }
+                  }
+                  local_indices_used.addItem(new_value);
+                  max_index_used = new_value;
+               } else {
+                  local_indices_used.addItem(ni());
+                  max_index_used =
+                     tbox::MathUtilities<int>::Max(max_index_used, ni());
+               }
+            }
+         }
+
+         if (recompute_local_patch_nums) {
+            for (int j = 0; j < mbs_size; j++) {
+               bool new_patch_num = true;
+               for (tbox::List<int>::Iterator p(output_local_patch_nums);
+                    p;
+                    p++) {
+                  if (p() == local_indices[j]) {
+                     new_patch_num = false;
+                     break;
+                  }
+               }
+               if (new_patch_num) {
+                  output_local_patch_nums.addItem(local_indices[j]);
+               }
+            }
+         } else {
+            output_local_patch_nums = input_local_patch_nums;
+         }
+      } else {
+         output_local_patch_nums = input_local_patch_nums;
+      }
+
+      for (int j = 0; j < mbs_size; j++) {
+         max_local_indices = tbox::MathUtilities<int>::Max(max_local_indices,
+               local_indices[j]);
+         min_local_indices = tbox::MathUtilities<int>::Min(min_local_indices,
+               local_indices[j]);
+      }
+
+      int indices_range;
+      if (mbs_size) {
+         indices_range = max_local_indices - min_local_indices;
+      } else {
+         indices_range = 0;
+         min_local_indices = 0;
+      }
+
+      tbox::Array<int> output_dist_cutoff(out_size);
+      for (int j = 0; j < out_size; j++) {
+         output_dist_cutoff[j] = min_local_indices + j
+            * (indices_range / out_size);
+      }
+
+      //For every patch number, get the patch database from input,
+      //create a database for output, and call routine to read and
+      //write patch database data.
+      tbox::List<int>::Iterator olp(output_local_patch_nums);
+      for (tbox::List<int>::Iterator ilp(input_local_patch_nums); ilp; ) {
+         int output_id = 0;
+         for (int a = 1; a < out_size; a++) {
+            if (olp() > output_dist_cutoff[a]) {
+               output_id = a;
+            }
+         }
+
+         string in_patch_name;
+         string out_patch_name;
+         in_patch_name = "level_" + tbox::Utilities::levelToString(level_number)
+            + "-patch_" + tbox::Utilities::patchToString(ilp());
+         out_patch_name = "level_" + tbox::Utilities::levelToString(
+               level_number)
+            + "-patch_" + tbox::Utilities::patchToString(olp());
+
+         tbox::Pointer<tbox::Database> patch_in_db =
+            level_in_dbs[i]->getDatabase(in_patch_name);
+
+         tbox::Pointer<tbox::Database> patch_out_db =
+            level_out_dbs[output_id]->putDatabase(out_patch_name);
+
+         int output_proc = num_files_written + output_id;
+         readAndWritePatchRestartData(patch_out_db, patch_in_db, output_proc);
+
+         ilp++;
+         olp++;
+      }
+   }
+
+   readAndWriteMappedBoxLevelRestartData(
+      level_out_dbs, mapped_box_level_dbs_in,
+      "mapped_box_level", num_files_written,
+      input_proc_nums, total_output_files);
+
+}
+
+/*
+ **************************************************************************
+ * readAndWritePatchRestartData                                           *
+ **************************************************************************
+ */
+
+void RedistributedRestartUtility::readAndWritePatchRestartData(
+   tbox::Pointer<tbox::Database>& patch_out_db,
+   const tbox::Pointer<tbox::Database>& patch_in_db,
+   const int output_proc)
+{
+   //Get the keys in the patch input database.
+   tbox::Array<string> keys = patch_in_db->getAllKeys();
+
+   //Place the database on arrays of length 1.
+   tbox::Array<tbox::Pointer<tbox::Database> > in_db_array(1);
+   tbox::Array<tbox::Pointer<tbox::Database> > out_db_array(1);
+
+   in_db_array[0] = patch_in_db;
+   out_db_array[0] = patch_out_db;
+
+   //Call recursive function to read and write the data associated with each
+   //key.
+   for (int i = 0; i < keys.size(); i++) {
+      if (keys[i] == "d_patch_owner") {
+         patch_out_db->putInteger(keys[i], output_proc);
+      } else {
+         readAndWriteRestartData(out_db_array, in_db_array, keys[i]);
+      }
+   }
+}
+
+/*
+ **************************************************************************
+ * readAndWriteMappedBoxLevelRestartData                                  *
+ **************************************************************************
+ */
+
+void RedistributedRestartUtility::readAndWriteMappedBoxLevelRestartData(
+   tbox::Array<tbox::Pointer<tbox::Database> >& output_dbs,
+   const tbox::Array<tbox::Pointer<tbox::Database> >& level_in_dbs,
+   const string& key,
+   const int num_files_written,
+   const tbox::Array<int>& input_proc_nums,
+   const int total_output_files)
+{
+#ifdef DEBUG_CHECK_ASSERTIONS
+   assert(output_dbs.size() >= 1);
+   assert(level_in_dbs.size() >= 1);
+   assert(level_in_dbs.size() == 1 || output_dbs.size() == 1);
+#endif
+
+   const int out_size = output_dbs.size();
+
+   //Create an array of level output databases
+   tbox::Array<tbox::Pointer<tbox::Database> > level_out_dbs;
+   level_out_dbs.resizeArray(out_size);
+
+   for (int i = 0; i < out_size; i++) {
+      level_out_dbs[i] = output_dbs[i]->putDatabase(key);
+   }
+
+   bool is_mapped_box_level = level_in_dbs[0]->getBool("d_is_mapped_box_level");
+   int version = level_in_dbs[0]->getInteger("HIER_MAPPED_BOX_LEVEL_VERSION");
+   int dim = level_in_dbs[0]->getInteger("dim");
+   tbox::Array<int> ratio = level_in_dbs[0]->getIntegerArray("d_ratio");
+
+   for (int i = 0; i < out_size; i++) {
+      level_out_dbs[i]->putBool("d_is_mapped_box_level", is_mapped_box_level);
+      level_out_dbs[i]->putInteger("HIER_MAPPED_BOX_LEVEL_VERSION", version);
+      level_out_dbs[i]->putInteger("dim", dim);
+      level_out_dbs[i]->putIntegerArray("d_ratio", ratio);
+
+      level_out_dbs[i]->putInteger("d_nproc", total_output_files);
+      level_out_dbs[i]->putInteger("d_rank", num_files_written + i);
+   }
+
+   std::vector<int>* out_local_indices = new std::vector<int>[out_size];
+   std::vector<int>* out_ranks = new std::vector<int>[out_size];
+   std::vector<int>* out_periodic_shift_numbers =
+      new std::vector<int>[out_size];
+
+   tbox::Array<tbox::DatabaseBox>* out_box_array =
+      new tbox::Array<tbox::DatabaseBox>[out_size];
+
+   int out_vec_size = 0;
+   tbox::Array<int> out_mbs_size(out_size, 0);
+
+   tbox::List<int> local_indices_used;
+   int max_index_used = 0;
+
+   //Each iteration of this loop processes the patches from one input
+   //database.
+   for (int i = 0; i < input_proc_nums.size(); i++) {
+
+      tbox::Pointer<tbox::Database> mapped_boxes_in_db =
+         level_in_dbs[i]->getDatabase("mapped_boxes");
+
+      int mbs_size = mapped_boxes_in_db->getInteger("mapped_box_set_size");
+
+      tbox::Array<int> local_indices;
+      tbox::Array<int> ranks;
+      tbox::Array<int> periodic_shift_numbers;
+      tbox::Array<tbox::DatabaseBox> boxes;
+
+      if (mapped_boxes_in_db->keyExists("local_indices")) {
+         local_indices = mapped_boxes_in_db->getIntegerArray("local_indices");
+      }
+      if (mapped_boxes_in_db->keyExists("ranks")) {
+         ranks = mapped_boxes_in_db->getIntegerArray("ranks");
+      }
+      if (mapped_boxes_in_db->keyExists("periodic_shift_numbers")) {
+         periodic_shift_numbers =
+            mapped_boxes_in_db->getIntegerArray("periodic_shift_numbers");
+      }
+      if (mapped_boxes_in_db->keyExists("boxes")) {
+         boxes = mapped_boxes_in_db->getDatabaseBoxArray("boxes");
+      }
+
+      if (out_size == 1) {
+         tbox::List<int> new_indices;
+         for (int k = 0; k < mbs_size; k++) {
+            bool is_new_index = true;
+            for (tbox::List<int>::Iterator ni(new_indices); ni; ni++) {
+               if (local_indices[k] == ni()) {
+                  is_new_index = false;
+                  break;
+               }
+            }
+            if (is_new_index) {
+               new_indices.addItem(local_indices[k]);
+            }
+         }
+         if (local_indices_used.size() == 0) {
+            for (tbox::List<int>::Iterator ni(new_indices); ni; ni++) {
+               local_indices_used.addItem(ni());
+               max_index_used =
+                  tbox::MathUtilities<int>::Max(max_index_used, ni());
+            }
+         } else {
+            for (tbox::List<int>::Iterator ni(new_indices); ni; ni++) {
+               bool repeat_found = false;
+               for (tbox::List<int>::Iterator li(local_indices_used); li;
+                    li++) {
+                  if (ni() == li()) {
+                     repeat_found = true;
+                     break;
+                  }
+               }
+               if (repeat_found) {
+                  int new_value = max_index_used + 1;
+                  for (int a = 0; a < mbs_size; a++) {
+                     if (local_indices[a] == ni()) {
+                        local_indices[a] = new_value;
+                     }
+                  }
+                  local_indices_used.addItem(new_value);
+                  max_index_used = new_value;
+               } else {
+                  local_indices_used.addItem(ni());
+                  max_index_used =
+                     tbox::MathUtilities<int>::Max(max_index_used, ni());
+               }
+            }
+         }
+      }
+
+      int max_local_indices = 0;
+      int min_local_indices = tbox::MathUtilities<int>::getMax();
+      for (int j = 0; j < mbs_size; j++) {
+         max_local_indices = tbox::MathUtilities<int>::Max(max_local_indices,
+               local_indices[j]);
+         min_local_indices = tbox::MathUtilities<int>::Min(min_local_indices,
+               local_indices[j]);
+      }
+
+      int indices_range = max_local_indices - min_local_indices;
+
+      tbox::Array<int> output_dist_cutoff(out_size);
+      for (int j = 0; j < out_size; j++) {
+         output_dist_cutoff[j] = min_local_indices + j
+            * (indices_range / out_size);
+      }
+
+      if (mbs_size > 0) {
+         out_vec_size += mbs_size;
+
+         tbox::Array<int> output_ids(mbs_size);
+
+         for (int k = 0; k < mbs_size; k++) {
+            output_ids[k] = 0;
+            for (int a = 1; a < out_size; a++) {
+               if (local_indices[k] > output_dist_cutoff[a]) {
+                  output_ids[k] = a;
+               }
+            }
+         }
+
+         for (int j = 0; j < out_size; j++) {
+            out_local_indices[j].reserve(out_vec_size);
+            out_ranks[j].reserve(out_vec_size);
+            out_periodic_shift_numbers[j].reserve(out_vec_size);
+
+            out_box_array[j].resizeArray(out_vec_size);
+            for (int k = 0; k < mbs_size; k++) {
+               if (output_ids[k] == j) {
+                  int output_rank = num_files_written + output_ids[k];
+                  out_local_indices[j].push_back(local_indices[k]);
+                  out_ranks[j].push_back(output_rank);
+                  out_periodic_shift_numbers[j].push_back(
+                     periodic_shift_numbers[k]);
+                  out_box_array[j][out_mbs_size[j]++] = boxes[k];
+               }
+            }
+         }
+      }
+   }
+
+   for (int j = 0; j < out_size; j++) {
+      tbox::Pointer<tbox::Database> mapped_boxes_out_db =
+         level_out_dbs[j]->putDatabase("mapped_boxes");
+
+      mapped_boxes_out_db->
+      putInteger("HIER_MAPPED_BOX_SET_VERSION", version);
+      mapped_boxes_out_db->
+      putInteger("mapped_box_set_size", out_mbs_size[j]);
+
+      if (out_mbs_size[j]) {
+         mapped_boxes_out_db->
+         putIntegerArray("local_indices",
+            &out_local_indices[j][0],
+            out_mbs_size[j]);
+         mapped_boxes_out_db->
+         putIntegerArray("periodic_shift_numbers",
+            &out_periodic_shift_numbers[j][0],
+            out_mbs_size[j]);
+         mapped_boxes_out_db->
+         putIntegerArray("ranks", &out_ranks[j][0], out_mbs_size[j]);
+         mapped_boxes_out_db->
+         putDatabaseBoxArray("boxes", &out_box_array[j][0], out_mbs_size[j]);
+
+      }
+   }
+
+   delete[] out_local_indices;
+   delete[] out_ranks;
+   delete[] out_periodic_shift_numbers;
+   delete[] out_box_array;
+/*
+ *    for (int j = 0; j < out_size; j++) {
+ *       std::vector<int> out_local_indices;
+ *       std::vector<int> out_ranks;
+ *       std::vector<int> out_periodic_shift_numbers;
+ *       out_local_indices.reserve(mbs_size);
+ *       out_ranks.reserve(mbs_size);
+ *       out_periodic_shift_numbers.reserve(mbs_size);
+ *
+ *       tbox::Array<tbox::DatabaseBox> out_box_array(mbs_size);
+ *
+ *       int out_mbs_size = 0;
+ *       for (int k = 0; k < mbs_size; k++) {
+ *          int output_id = 0;
+ *          for (int a = 1; a < out_size; a++) {
+ *             if (local_indices[k] > output_dist_cutoff[a]) {
+ *                output_id = a;
+ *             }
+ *          }
+ *          if (output_id == j) {
+ *             int output_rank = num_files_written + output_id;
+ *             out_local_indices.push_back(local_indices[k]);
+ *             out_ranks.push_back(output_rank);
+ *             out_periodic_shift_numbers.push_back(periodic_shift_numbers[k]);
+ *             out_box_array[out_mbs_size++] = boxes[k];
+ *          }
+ *       }
+ *
+ *       tbox::Pointer<tbox::Database> mapped_boxes_out_db =
+ *          level_out_dbs[j]->putDatabase("mapped_boxes");
+ *
+ *       mapped_boxes_out_db->
+ *          putInteger("HIER_MAPPED_BOX_SET_VERSION", version);
+ *       mapped_boxes_out_db->
+ *          putInteger("mapped_box_set_size", out_mbs_size);
+ *
+ *       if (out_mbs_size) {
+ *          mapped_boxes_out_db->
+ *             putIntegerArray("local_indices",
+ *                             &out_local_indices[0],
+ *                             out_mbs_size);
+ *          mapped_boxes_out_db->
+ *             putIntegerArray("periodic_shift_numbers",
+ *                             &out_periodic_shift_numbers[0],
+ *                             out_mbs_size);
+ *          mapped_boxes_out_db->
+ *             putIntegerArray("ranks", &out_ranks[0], out_mbs_size);
+ *          mapped_boxes_out_db->
+ *             putDatabaseBoxArray("boxes", &out_box_array[0], out_mbs_size);
+ *
+ *       }
+ *    }
+ */
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 tools/restart/RedistributedRestartUtility.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/restart/RedistributedRestartUtility.h	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,119 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   $Description 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#ifdef HAVE_HDF5
+
+#include "SAMRAI/tbox/Array.h"
+#include "SAMRAI/tbox/HDFDatabase.h"
+
+#include <string>
+
+using namespace std;
+using namespace SAMRAI;
+
+/*
+ * RedistributedRestartUtility is a utility class used to build the
+ * restart-redistribute tool.  All methods are static and the class
+ * contains no data.
+ */
+
+class RedistributedRestartUtility
+{
+
+public:
+/*
+ * Write redistributed restart files to a new restart directory.
+ *
+ * @param output_dirname      name of directory containing new restart files
+ * @param input_dirname       name of directory containing files to be read
+ * @param total_input_files   number of input files being read by the tool
+ * @param total_output_files  number of output files being created by the tool
+ * @param file_mapping        mapping between input and output files
+ * @param restore_num         number identifying the restart dump being
+ *                            processed
+ */
+   static void
+   writeRedistributedRestartFiles(
+      const string& output_dirname,
+      const string& input_dirname,
+      const int total_input_files,
+      const int total_output_files,
+      const tbox::Array<tbox::Array<int> >& file_mapping,
+      const int restore_num);
+
+private:
+/*
+ * A recursive function that does the reading and writing of data.  If the
+ * key represents any type other than Database, data is read from input and
+ * immediately written to output.  If it is a Database, this function is
+ * called recursively on every key in that Database.  If the Database
+ * represents a PatchLevel, readAndWritePatchLevelRestartData is called
+ * instead, in order to properly distribute patches among the output files.
+ *
+ * The optional arguments are not used when this function is called for
+ * reading and writing data from a patch, because the data for a patch
+ * exists in only one input file and is written to only one output file.
+ * Meaningful values should be given for all of the optional arguments in
+ * all other cases.
+ */
+   static void
+   readAndWriteRestartData(
+      tbox::Array<tbox::Pointer<tbox::Database> >& output_dbs,
+      const tbox::Array<tbox::Pointer<tbox::Database> >& input_dbs,
+      const string& key,
+      const tbox::Array<tbox::Array<int> >* file_mapping = NULL,
+      int num_files_written = -1,
+      int input_proc_num = -1,
+      int total_input_files = -1,
+      int total_output_files = -1);
+
+/*
+ * Reads and writes data in a Database that represents a PatchLevel.
+ * Global data are written to every output database, and data representing
+ * patches are written to only one output database.
+ */
+   static void
+   readAndWritePatchLevelRestartData(
+      tbox::Array<tbox::Pointer<tbox::Database> >& output_dbs,
+      const tbox::Array<tbox::Pointer<tbox::Database> >& level_in_dbs,
+      const string& key,
+      const int num_files_written,
+      const tbox::Array<int>& input_proc_nums,
+      const int total_output_files);
+
+/*
+ * Reads and writes data in a Database that represents a MappedBoxLevel.
+ * Global data are written to every output database, and data representing
+ * MappedBoxes are written to only one output database.
+ */
+   static void
+   readAndWriteMappedBoxLevelRestartData(
+      tbox::Array<tbox::Pointer<tbox::Database> >& output_dbs,
+      const tbox::Array<tbox::Pointer<tbox::Database> >& level_in_dbs,
+      const string& key,
+      const int num_files_written,
+      const tbox::Array<int>& input_proc_nums,
+      const int total_output_files);
+
+/*
+ * Reads patch restart data from input database and writes it to output
+ * database.
+ */
+   static void
+   readAndWritePatchRestartData(
+      tbox::Pointer<tbox::Database>& patch_out_db,
+      const tbox::Pointer<tbox::Database>& patch_in_db,
+      const int output_proc);
+
+};
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 tools/restart/main.C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/restart/main.C	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,301 @@
+/*************************************************************************
+ *
+ * This file is part of the SAMRAI distribution.  For full copyright 
+ * information, see COPYRIGHT and COPYING.LESSER. 
+ *
+ * Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+ * Description:   Main program restart-redistribute tool. 
+ *
+ ************************************************************************/
+
+#include "SAMRAI/SAMRAI_config.h"
+
+#include "RedistributedRestartUtility.h"
+
+#include "SAMRAI/tbox/HDFDatabase.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/HDFDatabase.h"
+#include "SAMRAI/tbox/SAMRAI_MPI.h"
+#include "SAMRAI/tbox/RestartManager.h"
+#include "SAMRAI/tbox/SAMRAIManager.h"
+#include "SAMRAI/tbox/Utilities.h"
+
+#include <cstdio>
+#include <cstdlib>
+#include <string>
+#include <cstring>
+#include <unistd.h>
+
+#ifndef _MSC_VER
+#include <dirent.h>
+#endif
+
+#ifdef HAVE_HDF5
+
+#ifndef NAME_BUFSIZE
+#define NAME_BUFSIZE (32)
+#endif
+
+using namespace std;
+using namespace SAMRAI;
+
+#ifdef _MSC_VER
+
+#include <string.h>
+#include <windows.h>
+#include <stdlib.h>
+
+struct dirent { char d_name[1];
+};
+
+int scandir(
+   const char* dirname,
+   struct dirent*** namelist,
+   int (* select)(
+      struct dirent *),
+   int (* compar)(
+      struct dirent **,
+      struct dirent **)) {
+   int len;
+   char* findIn, * d;
+   WIN32_FIND_DATA find;
+   HANDLE h;
+   int nDir = 0, NDir = 0;
+   struct dirent** dir = 0, * selectDir;
+   unsigned long ret;
+
+   len = strlen(dirname);
+   findIn = (char *)malloc(len + 5);
+   strcpy(findIn, dirname);
+   for (d = findIn; *d; d++) if (*d == '/') *d = '\\';
+   if ((len == 0)) {
+      strcpy(findIn, ".\\*");
+   }
+   if ((len == 1) && (d[-1] == '.')) {
+      strcpy(findIn, ".\\*");
+   }
+   if ((len > 0) && (d[-1] == '\\')) {
+      *d++ = '*';
+      *d = 0;
+   }
+   if ((len > 1) && (d[-1] == '.') && (d[-2] == '\\')) {
+      d[-1] = '*';
+   }
+
+   if ((h = FindFirstFile(findIn, &find)) == INVALID_HANDLE_VALUE) {
+      ret = GetLastError();
+      if (ret != ERROR_NO_MORE_FILES) {
+         // TODO: return some error code
+      }
+      *namelist = dir;
+      return nDir;
+   }
+   do {
+      selectDir =
+         (struct dirent *)malloc(sizeof(struct dirent) + strlen(find.cFileName));
+      strcpy(selectDir->d_name, find.cFileName);
+      if (!select || (*select)(selectDir)) {
+         if (nDir == NDir) {
+            struct dirent** tempDir =
+               (struct dirent **)calloc(sizeof(struct dirent *), NDir + 33);
+            if (NDir) memcpy(tempDir, dir, sizeof(struct dirent *)* NDir);
+            if (dir) free(dir);
+            dir = tempDir;
+            NDir += 32;
+         }
+         dir[nDir] = selectDir;
+         nDir++;
+         dir[nDir] = 0;
+      } else {
+         free(selectDir);
+      }
+   } while (FindNextFile(h, &find));
+   ret = GetLastError();
+   if (ret != ERROR_NO_MORE_FILES) {
+      // TODO: return some error code
+   }
+   FindClose(h);
+
+   free(findIn);
+
+   if (compar) qsort(dir, nDir, sizeof(*dir),
+         (int (*)(const void *, const void *))compar);
+
+   *namelist = dir;
+   return nDir;
+}
+
+int alphasort(
+   struct dirent** a,
+   struct dirent** b) {
+   return strcmp((*a)->d_name, (*b)->d_name);
+}
+
+#endif
+
+int main(
+   int argc,
+   char* argv[])
+{
+
+   const string slash = "/";
+
+   tbox::SAMRAI_MPI::init(&argc, &argv);
+   tbox::SAMRAIManager::initialize();
+   tbox::SAMRAIManager::startup();
+
+   string read_dirname;
+   string write_dirname;
+   int restore_num = 0;
+   int num_output_files = 1;
+
+   if ((argc != 5)) {
+      tbox::pout << "USAGE:  " << argv[0] << " input-dir "
+                                          <<
+      "output-dir restore-number num-output-files\n"
+                                          << endl;
+      exit(-1);
+      return -1;
+   } else {
+      read_dirname = argv[1];
+      write_dirname = argv[2];
+      restore_num = atoi(argv[3]);
+      num_output_files = atoi(argv[4]);
+   }
+
+   // make string "input-dir/restore.*****
+   const std::string restore_buf =
+      "/restore." + tbox::Utilities::intToString(restore_num, 6);
+
+   string restore_dirname;
+   if (read_dirname.compare(0, 1, "/") == 0) {
+      restore_dirname = read_dirname + restore_buf;
+   } else {
+      restore_dirname = "." + slash + read_dirname + restore_buf;
+   }
+
+   if (write_dirname.compare(0, 1, "/") != 0) {
+      write_dirname = "." + slash + write_dirname;
+   }
+
+   struct dirent** namelist;
+
+   //directory should have three entries:  ., .., and nodes.*****
+   int num_entries = scandir(restore_dirname.c_str(), &namelist, 0, 0);
+
+   if (num_entries < 0) {
+      TBOX_ERROR("restore directory not found.");
+   }
+
+   // Expect only a single run to be in restore directory
+   if (num_entries > 3) {
+      TBOX_ERROR(
+         "restore directory should contain restart files for a single run; this probably indicates runs with different number of nodes have been done in in the restart directory");
+   }
+
+   string nodes_dirname;
+   string prefix = "nodes.";
+   for (int i = 0; i < num_entries; i++) {
+      if (strncmp(prefix.c_str(), namelist[i]->d_name, prefix.length()) == 0) {
+         nodes_dirname = namelist[i]->d_name;
+      }
+   }
+
+   int num_input_files = 0;
+
+   // Check if nodes_dirname is valid and extract number of processors for the saved run.
+   if (nodes_dirname.size() == 13) {
+
+      string int_str = &(nodes_dirname.c_str()[6]);
+
+      num_input_files = atoi(int_str.c_str());
+
+   } else {
+      TBOX_ERROR(
+         "nodes.***** subdirectory not found in restore directory.  A directory with a name such as nodes.00016 must be present, with the number indicating the number of process for the run");
+   }
+
+   while (num_entries--) {
+      free(namelist[num_entries]);
+   }
+   free(namelist);
+
+   string full_nodes_dirname = restore_dirname + slash + nodes_dirname;
+   num_entries = scandir(full_nodes_dirname.c_str(), &namelist, 0, 0);
+   if (num_entries != num_input_files + 2) {
+      TBOX_ERROR(
+         "number of files in nodes subdirectory does not match the number indicated in the directory's name");
+   }
+
+   while (num_entries--) {
+      free(namelist[num_entries]);
+   }
+   free(namelist);
+
+   // file_mapping will have size equal to the lesser value of
+   // num_input_files and num_output_files.
+   tbox::Array<tbox::Array<int> > file_mapping;
+   int file_ratio;
+   int remainder;
+   if (num_output_files > num_input_files) {
+      file_mapping.resizeArray(num_input_files);
+      file_ratio = num_output_files / num_input_files;
+      remainder = num_output_files % num_input_files;
+   } else {
+      file_mapping.resizeArray(num_output_files);
+      file_ratio = num_input_files / num_output_files;
+      remainder = num_input_files % num_output_files;
+   }
+
+   int file_counter = 0;
+
+   // fill file_mapping.
+   int i;
+   for (i = 0; i < file_mapping.size(); i++) {
+      if (i < remainder) {
+         file_mapping[i].resizeArray(file_ratio + 1);
+         for (int j = 0; j <= file_ratio; j++) {
+            file_mapping[i][j] = file_counter + j;
+         }
+         file_counter += file_ratio + 1;
+      } else {
+         file_mapping[i].resizeArray(file_ratio);
+         for (int j = 0; j < file_ratio; j++) {
+            file_mapping[i][j] = file_counter + j;
+         }
+         file_counter += file_ratio;
+      }
+   }
+
+   //Write all of the redistributed restart files.
+   RedistributedRestartUtility::writeRedistributedRestartFiles(
+      write_dirname,
+      read_dirname,
+      num_input_files,
+      num_output_files,
+      file_mapping,
+      restore_num);
+
+   file_mapping.clear();
+
+   tbox::SAMRAIManager::shutdown();
+   tbox::SAMRAIManager::finalize();
+
+   return 0;
+
+}
+
+#else
+
+int main(
+   int argc,
+   char* argv[])
+{
+   std::cerr
+   << "This utility requires HDF to work, it was not found when compiling"
+   << std::endl;
+
+   return -1;
+}
+
+#endif
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,55 @@
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   vizamrai_cat.sh
+##
+#########################################################################
+vizamrai_cat.sh:
+
+Shell script which constructs a single vizamrai file from files 
+constructed on multiple processors 
+
+usage: sh vizamrai_cat.sh <filename>
+    
+       Where <filename> is the rootname of the .vis file collection.
+
+       example:  vizamrai_cat.sh euler.00000
+
+          will collect euler.00000.vis.00000 euler.00000.vis.00001 
+          into euler.vis for a 2 processor run."
+
+
+---------------------------------------------------------------------
+vizamrai_multistep.pl:
+
+Perl script which invokes vizamrai_cat.sh on a series of different
+timesteps 
+
+usage: %> perl vizamrai_multistep.pl
+       %> <enter basename> (e.g. euler.<step>.vis.<proc>, enter 'euler')
+       %> <enter start timestep>
+       %> <enter end timestep>
+
+       example:  perl vizamrai_multistep.pl
+                 euler
+                 0000
+                 0025
+
+          will collect euler.[0000-0025].vis.[procs] and construct
+          euler.[0000-0025].vis
+
+NOTE:  vizamrai_multistep.pl invokes vizamrai_cat.sh so it must be 
+       able to find this file.  By default, it looks in the directory 
+       you are running from. You may change the $vizamrai_cat_dir variable 
+       in the file to point to a different location.
+
+---------------------------------------------------------------------
+insure++.psrc
+
+Config file for Insure++ to unsuppress warnings/errors that should 
+be looked for and suppress specific problems caused by libraries and
+errors in SAMRAI code that are flagged incorrectly.
+
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,241 @@
+*****************************************************************************
+	           Converting from SAMRAI 1.x to 2.0
+*****************************************************************************
+
+
+*****************************************************************************
+	           Introduction to the 2.0 API changes.
+*****************************************************************************
+
+The SAMRAI API has changed dramatically in the 2.0 release.  This will
+require you to make a large number of changes to your code, but the
+changes are fairly trivial in nature so the process is relatively easy
+but time consuming.  We have provided automated scripts to ease the
+conversion process.  The script will not make all required changes,
+but should significantly reduce the time to convert codes.
+
+The change should not introduce hidden errors, since it involves class
+name changes.  If something is not correct it will not compile so any
+errors should be reasonably transparent.
+
+We made every effort to figure out a way to provide backward
+compatibility header files; however, we could not find a method to do
+this.
+
+The first significant change involves how we partition the class
+names.  In the 1.x release API we used a name prefix on the class
+names (e.g. tbox_Array) to avoid name conflicts.  The 2.0 version uses
+the C++ standardized namespace technology to partition the packages
+(e.g. SAMRAI::tbox::Array). If you are not familiar with namespaces
+you may want to look at your favorite C++ book.
+
+The second major change involves the way we handle dimensioned
+classes.  In previous releases of SAMRAI there was a different class
+for each dimension (e.g. hier_Box1, hier_Box2, and hier_Box3).  Due to
+user requests for higher dimensions we now template on the dimension
+(e.g. SAMRAI::hier::Box<int DIM>). [NOTE: Not all of SAMRAI is
+currently working for DIM>3, if you try to use a class we have not
+converted you should receive a compiler or runtime error]
+
+The third major change from In the 1.x API is a reduction in the
+number of "styles" of headers included in SAMRAI.  We had three
+distinct ways of accessing the classes in SAMRAI.  These have been
+reduced to a single include method.
+
+
+*****************************************************************************
+	           What does the new API look like?
+*****************************************************************************
+
+Here are examples of the three "styles" of headers the 1.x API
+supported and how the new 2.0 code looks:
+
+
+Style 1) Dimensioned classes with package names.
+
+----------------------------------------------------------
+#include "hier_IntVector1.h"
+#include "hier_IntVector2.h"
+#include "pdat_CellData2.h"
+
+int main()
+{
+    hier_IntVector1                 vector_a;
+    hier_IntVector2                 vector_b;
+    pdat_CellData2<double>          data;
+}
+---------------------------------------------------------- 
+
+Style 2) Dimensioned classes without package names.
+
+----------------------------------------------------------
+#include "IntVector1.h"
+#include "IntVector2.h"
+#include "CellData2.h"
+
+int main()
+{
+    IntVector1                vector_a;
+    IntVector2                vector_b
+    CellData2<double>         data;
+}
+----------------------------------------------------------
+
+Styles (1) and (2) can be written using qualified names:
+
+----------------------------------------------------------
+#include "IntVector.h"
+#include "CellData.h"
+
+
+int main()
+{
+    // Class names no longer contain the dimension, classes
+    // are templated on the dimension.
+    SAMRAI::hier::IntVector<1>              vector_a;
+    SAMRAI::hier::IntVector<2>              vector_b
+    SAMARAI::pdat::CellData<2,double>       data;
+}
+---------------------------------------------------------- 
+
+You can use the C++ "using namespace" to avoid 
+qualifying the names.
+
+----------------------------------------------------------
+#include "IntVector.h"
+#include "CellData.h"
+
+using namespace SAMRAI;
+using namespace hier;
+using namespace pdat;
+
+int main()
+{
+    // Class names no longer contain the dimension, classes
+    // are templated on the dimension.
+    IntVector<1>              vector_a;
+    IntVector<2>              vector_b
+    CellData<2,double>        data;
+}
+---------------------------------------------------------- 
+
+
+Style 3) Non-dimensioned classes without package names.
+
+Note the dimension comes from the compile time definition of NDIM in
+both cases.  To get a 2D version of the code you used -DNDIM=2 on
+the compile line.
+
+----------------------------------------------------------
+#include "IntVector.h"
+#include "CellData.h"
+
+int main()
+{
+    IntVector                vector;
+    CellData<double> data;
+}
+----------------------------------------------------------
+
+The new method is similar, but you will see the "NDIM" symbol in your
+code instead hiding it in the header files.
+
+----------------------------------------------------------
+#include "IntVector.h"
+#include "CellData.h"
+using namespace SAMRAI;
+
+int main()
+{
+    hier::IntVector<NDIM>             vector;
+    pdat::CellData<NDIM, double>      data;
+}
+----------------------------------------------------------
+
+Note here we only use a "using namespace" to bring in the SAMRAI
+namespace and retain the namespace qualifiers for each of the package
+names.
+
+*****************************************************************************
+	How do I convert my code?
+*****************************************************************************
+
+You can make the code changes manually.  This requires changing:
+
+a) Remove package prefixes (if needed) from included headers.
+   Toolbox headers are located in a subdirectory of include to 
+   help avoid name collisions (e.g. #include "tbox/Utility.h").
+
+b) Add package namespace qualifiers or "using namespace" statements 
+   to class names.
+
+c) Add templating to classes that currently end in a dimension.
+
+
+We have provided a set of scripts to help automate the conversion
+process.  The scripts are not perfect and some editing is usually
+required but they help with the drudgery.  
+
+Make sure you have a backup of your code in case the conversion
+process fails.
+
+Run the SAMRAI/tools/scripts/conversion2.0/convert2.0 at the root of
+your source directory.  This should convert #include statements and
+rename classes that are templated.
+
+If you use the non-prefix header files (and thus non-prefix class
+names) you have three options.
+
+First, you can run the "packagePrefixPrepend" script to insert the
+package namespace into each class use.  For example IntVector would be
+replace with hier::IntVector.
+
+The second option is for you to manually add "using namespace"
+statements to your code.  You can do this by determining which
+packages you use and adding a "using namespace PACKAGE" for each one.
+
+The last alternative is a variation of the second, put a using
+namespace for all packages in your code and then remove the ones that
+cause an error during compilation (you can't have a "using namespace"
+for a package you don't actually use).  This is a little crude but
+depending on how familiar you are with the packages this might be
+easier than the second option.  Here is a complete list of all
+packages in SAMRAI:
+
+using namespace SAMRAI;
+using namespace tbox;
+using namespace hier;
+using namespace xfer;
+using namespace pdat;
+using namespace math;
+using namespace mesh;
+using namespace mblk;
+using namespace geom;
+using namespace solv;
+using namespace algs;
+using namespace appu;
+
+Issues using the scripts:
+
+(0) Please backup your files!
+
+We have run the scripts on several codes without harm but you don't
+want to be the person to find a serious bug in the scripts without
+having a backup.
+
+(1) Input file naming changes.
+
+Some input parameters use class names in them, the scripts to not make
+changes in input files.  You will need to change the input files that
+have references to packages.  E.G.
+
+algs_GriddingAlgorithm becomes algs::GriddingAlgorithm
+algs_HyperbolicLevelIntegrator becomes algs::HyperbolicLevelIntegrator
+
+are the most common changes needed.
+
+
+
+
+
+
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/algs.classnames.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/algs.classnames.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,8 @@
+HyperbolicPatchStrategy
+HyperbolicLevelIntegrator
+ImplicitIntegrator
+ImplicitEquationStrategy
+TimeRefinementIntegrator
+TimeRefinementLevelStrategy
+MethodOfLinesIntegrator
+MethodOfLinesPatchStrategy
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/algs.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/algs.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,36 @@
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/tools/scripts/conversion2.0/algs.data $
+## Package:     SAMRAI build scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 3894 $
+## Modified:    $LastChangedDate: 2010-05-10 15:24:14 -0700 (Mon, 10 May 2010) $
+## Description: data file for sed substitutions to generate dim-dep. files
+##
+
+##
+## The following files/classes are dimension-dependent and must be converted
+## from the dimension-independent form ClassX to the dimension-dependent form
+## Class[123] using the updateXd.pl script in this directory.  Make sure to
+## re-run updateXd.pl after making any changes to this file in order to
+## update the compilable sources.
+##
+
+#
+# algorithm package
+#
+
+algs_HyperbolicLevelIntegrator
+algs_HyperbolicPatchStrategy
+algs_MethodOfLinesIntegrator
+algs_MethodOfLinesPatchStrategy
+algs_TimeRefinementLevelStrategy
+algs_TimeRefinementIntegrator
+algs_TimeSynchronizedLevelStrategy
+algs_ImplicitEquationStrategy
+algs_ImplicitIntegrator
+
+# algorithm package timers
+
+algs::HyperbolicLevelIntegrator
+algs::TimeRefinementIntegrator
+
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/appu.classnames.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/appu.classnames.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,7 @@
+VisDerivedDataStrategy
+VisMaterialsDataStrategy
+CartesianVizamraiDataWriter
+VisItDataWriter
+BoundaryUtilityStrategy
+CartesianBoundaryUtilities2
+CartesianBoundaryUtilities3
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/appu.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/appu.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,20 @@
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/tools/scripts/conversion2.0/appu.data $
+## Package:     SAMRAI build scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 3894 $
+## Modified:    $LastChangedDate: 2010-05-10 15:24:14 -0700 (Mon, 10 May 2010) $
+## Description: data file for sed substitutions to generate dim-dep. files
+##
+
+#
+# application utilities package
+#
+
+appu_CartesianVizamraiDataWriter
+appu_VizamraiItem
+appu_VisDerivedDataStrategy
+appu_VisItDataWriter
+appu_VisItItem
+appu_VisMaterialsDataStrategy
+
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/convert2.0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/convert2.0	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,23 @@
+#!/bin/sh
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/tools/scripts/conversion2.0/convert2.0 $
+## Package:     SAMRAI scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 3894 $
+## Modified:    $LastChangedDate: 2010-05-10 15:24:14 -0700 (Mon, 10 May 2010) $
+## Description: shell script to convert 1.x codes to 2.0
+##
+
+BIN=`dirname $0`
+
+# Rename the packages from underscore to package naming scheme 
+# and add templating on DIM.
+for PREFIX in tbox hier xfer pdat math mesh mblk geom solv algs appu
+do
+  perl $BIN/renameXd.pl ${PREFIX}
+done 
+
+# Renames includes for tbox (e.g. "tbox/Utilities.h")
+perl $BIN/rename_tbox.pl tbox_classes
+
+exit
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/geom.classnames.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/geom.classnames.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,37 @@
+SkeletonPatchGeometry
+SkeletonGridGeometry
+SkeletonRefine
+SkeletonCoarsen
+CartesianPatchGeometry
+CartesianGridGeometry
+CartesianCellComplexWeightedAverage
+CartesianCellFloatWeightedAverage
+CartesianCellFloatConservativeLinearRefine
+CartesianCellDoubleWeightedAverage
+CartesianCellComplexConservativeLinearRefine
+CartesianCellDoubleConservativeLinearRefine
+CartesianCellFloatLinearRefine
+CartesianCellComplexLinearRefine
+CartesianCellDoubleLinearRefine
+CartesianOutersideDoubleWeightedAverage
+CartesianEdgeFloatWeightedAverage
+CartesianEdgeDoubleConservativeLinearRefine
+CartesianEdgeFloatConservativeLinearRefine
+CartesianEdgeComplexWeightedAverage
+CartesianEdgeDoubleWeightedAverage
+CartesianSideFloatWeightedAverage
+CartesianSideDoubleConservativeLinearRefine
+CartesianSideFloatConservativeLinearRefine
+CartesianSideComplexWeightedAverage
+CartesianSideDoubleWeightedAverage
+CartesianNodeFloatLinearRefine
+CartesianNodeComplexLinearRefine
+CartesianNodeDoubleLinearRefine
+CartesianOuterfaceFloatWeightedAverage
+CartesianOuterfaceComplexWeightedAverage
+CartesianOuterfaceDoubleWeightedAverage
+CartesianFaceComplexWeightedAverage
+CartesianFaceFloatWeightedAverage
+CartesianFaceFloatConservativeLinearRefine
+CartesianFaceDoubleWeightedAverage
+CartesianFaceDoubleConservativeLinearRefine
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/geom.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/geom.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,76 @@
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/tools/scripts/conversion2.0/geom.data $
+## Package:     SAMRAI build scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 3894 $
+## Modified:    $LastChangedDate: 2010-05-10 15:24:14 -0700 (Mon, 10 May 2010) $
+## Description: data file for sed substitutions to generate dim-dep. files
+##
+
+
+#
+# geometry package
+#
+
+geom_CartesianCellComplexConservativeLinearRefine
+geom_CartesianCellComplexConstantRefine
+geom_CartesianCellComplexLinearRefine
+geom_CartesianCellComplexWeightedAverage
+geom_CartesianCellDoubleConservativeLinearRefine
+geom_CartesianCellDoubleConstantRefine
+geom_CartesianCellDoubleLinearRefine
+geom_CartesianCellDoubleWeightedAverage
+geom_CartesianCellFloatConservativeLinearRefine
+geom_CartesianCellFloatConstantRefine
+geom_CartesianCellFloatLinearRefine
+geom_CartesianCellFloatWeightedAverage
+geom_CartesianCellIntegerConstantRefine
+geom_CartesianEdgeComplexConstantRefine
+geom_CartesianEdgeComplexWeightedAverage
+geom_CartesianEdgeDoubleConservativeLinearRefine
+geom_CartesianEdgeDoubleConstantRefine
+geom_CartesianEdgeDoubleWeightedAverage
+geom_CartesianEdgeFloatConservativeLinearRefine
+geom_CartesianEdgeFloatConstantRefine
+geom_CartesianEdgeFloatWeightedAverage
+geom_CartesianEdgeIntegerConstantRefine
+geom_CartesianGridGeometry
+geom_CartesianFaceComplexConstantRefine
+geom_CartesianFaceComplexWeightedAverage
+geom_CartesianFaceDoubleConservativeLinearRefine
+geom_CartesianFaceDoubleConstantRefine
+geom_CartesianFaceDoubleWeightedAverage
+geom_CartesianFaceFloatConservativeLinearRefine
+geom_CartesianFaceFloatConstantRefine
+geom_CartesianFaceFloatWeightedAverage
+geom_CartesianFaceIntegerConstantRefine
+geom_CartesianNodeComplexConstantAverage
+geom_CartesianNodeComplexLinearRefine
+geom_CartesianNodeDoubleConstantAverage
+geom_CartesianNodeDoubleLinearRefine
+geom_CartesianNodeFloatConstantAverage
+geom_CartesianNodeFloatLinearRefine
+geom_CartesianNodeIntegerConstantAverage
+geom_CartesianOuterfaceComplexConstantRefine
+geom_CartesianOuterfaceComplexWeightedAverage
+geom_CartesianOuterfaceDoubleConstantRefine
+geom_CartesianOuterfaceDoubleWeightedAverage
+geom_CartesianOuterfaceFloatConstantRefine
+geom_CartesianOuterfaceFloatWeightedAverage
+geom_CartesianOuterfaceIntegerConstantRefine
+geom_CartesianOutersideDoubleWeightedAverage
+geom_CartesianSideComplexConstantRefine
+geom_CartesianSideComplexWeightedAverage
+geom_CartesianSideDoubleConservativeLinearRefine
+geom_CartesianSideDoubleConstantRefine
+geom_CartesianSideDoubleWeightedAverage
+geom_CartesianSideFloatConservativeLinearRefine
+geom_CartesianSideFloatConstantRefine
+geom_CartesianSideFloatWeightedAverage
+geom_CartesianSideIntegerConstantRefine
+geom_CartesianPatchGeometry
+geom_SkeletonCoarsen
+geom_SkeletonGridGeometry
+geom_SkeletonPatchGeometry
+geom_SkeletonRefine
+
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/hier.classnames.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/hier.classnames.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,36 @@
+BoxTree
+BoxTop
+BoxTreeNode
+BoxList
+BoxArray
+Box
+BoxIOUtility
+Index
+BoxGraph
+IntVector
+VariableDatabase
+BoundaryBox
+Patch
+Variable
+BasePatchHierarchy
+BinaryTree
+PatchGeometry
+CoarseFineBoundary
+BoundaryLookupTable
+PatchData
+PatchHierarchy
+GridGeometry
+ComponentSelector
+BoxGeometry
+BasePatchLevel
+VariableContext
+ProcessorMapping
+PatchDescriptor
+PatchLevelFactory
+PatchDataFactory
+BoxOverlap
+PatchLevel
+PatchFactory
+LayerNodeSet
+LayerEdgeSet
+LayerNode
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/hier.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/hier.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,55 @@
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/tools/scripts/conversion2.0/hier.data $
+## Package:     SAMRAI build scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 3894 $
+## Modified:    $LastChangedDate: 2010-05-10 15:24:14 -0700 (Mon, 10 May 2010) $
+## Description: data file for sed substitutions to generate dim-dep. files
+##
+
+
+#
+# hierarchy package
+#
+
+hier_BasePatchLevel
+hier_BasePatchHierarchy
+hier_BinaryTree
+hier_BoundaryBox
+hier_BoundaryLookupTable
+hier_Box
+hier_BoxArray
+hier_BoxComm
+hier_BoxGraph
+hier_BoxGraphUtilities
+hier_BoxIOUtility
+hier_BoxList
+hier_BoxGeometry
+hier_BoxIOUtility
+hier_BoxIterator
+hier_BoxOverlap
+hier_BoxTop
+hier_BoxTree
+hier_BoxTreeNode
+hier_BoxUtilities
+hier_GridGeometry
+hier_Index
+hier_IntVector
+hier_Patch
+hier_PatchData
+hier_PatchDataFactory
+hier_PatchDescriptor
+hier_PatchGeometry
+hier_PatchHierarchy
+hier_PatchLevel
+hier_PatchFactory
+hier_PatchLevelFactory
+hier_PatchLevelIterator
+hier_VariableDatabase
+hier_Variable
+hier_CoarseFineBoundary
+
+# hierarchy package timers
+
+hier::BoxGraph
+
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/math.classnames.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/math.classnames.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,59 @@
+PatchCellDataOpsInteger
+HierarchyCellDataOpsReal
+PatchCellDataNormOpsComplex
+PatchCellDataMiscellaneousOpsReal
+PatchCellDataOpsComplex
+HierarchyCellDataOpsInteger
+PatchCellDataNormOpsReal
+PatchCellDataBasicOps
+PatchCellDataOpsReal
+HierarchyCellDataOpsComplex
+HierarchyEdgeDataOpsInteger
+PatchEdgeDataNormOpsReal
+PatchEdgeDataBasicOps
+PatchEdgeDataOpsReal
+HierarchyEdgeDataOpsComplex
+PatchEdgeDataOpsInteger
+PatchEdgeDataNormOpsComplex
+HierarchyEdgeDataOpsReal
+PatchEdgeDataMiscellaneousOpsReal
+PatchEdgeDataOpsComplex
+PatchSideDataOpsInteger
+HierarchySideDataOpsReal
+PatchSideDataNormOpsComplex
+PatchSideDataMiscellaneousOpsReal
+PatchSideDataOpsComplex
+HierarchySideDataOpsInteger
+PatchSideDataNormOpsReal
+PatchSideDataBasicOps
+PatchSideDataOpsReal
+HierarchySideDataOpsComplex
+PatchNodeDataOpsInteger
+HierarchyNodeDataOpsReal
+PatchNodeDataNormOpsComplex
+PatchNodeDataMiscellaneousOpsReal
+PatchNodeDataOpsComplex
+HierarchyNodeDataOpsInteger
+PatchNodeDataNormOpsReal
+PatchNodeDataBasicOps
+PatchNodeDataOpsReal
+HierarchyNodeDataOpsComplex
+ArrayDataNormOpsReal
+ArrayDataBasicOps
+ArrayDataMiscellaneousOpsReal
+ArrayDataNormOpsComplex
+ArrayDataNormOpsInteger
+PatchFaceDataNormOpsReal
+PatchFaceDataBasicOps
+PatchFaceDataOpsReal
+HierarchyFaceDataOpsComplex
+PatchFaceDataOpsInteger
+PatchFaceDataNormOpsComplex
+HierarchyFaceDataOpsReal
+PatchFaceDataMiscellaneousOpsReal
+PatchFaceDataOpsComplex
+HierarchyFaceDataOpsInteger
+HierarchyDataOpsReal
+HierarchyDataOpsComplex
+HierarchyDataOpsManager
+HierarchyDataOpsInteger
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/math.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/math.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,82 @@
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/tools/scripts/conversion2.0/math.data $
+## Package:     SAMRAI build scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 3894 $
+## Modified:    $LastChangedDate: 2010-05-10 15:24:14 -0700 (Mon, 10 May 2010) $
+## Description: data file for sed substitutions to generate dim-dep. files
+##
+
+
+#
+# mathops package
+#
+
+math_ArrayDataBasicOps
+math_ArrayDataBasicOpsSpecialized
+math_ArrayDataMiscellaneousOpsReal
+math_ArrayDataNormOpsComplex
+math_ArrayDataNormOpsInteger
+math_ArrayDataNormOpsReal
+math_HierarchyDataOpsComplex
+math_HierarchyDataOpsInteger
+math_HierarchyDataOpsReal
+math_HierarchyDataOpsManager
+math_HierarchyCellDataOpsComplex
+math_HierarchyCellDataOpsInteger
+math_HierarchyCellDataOpsReal
+math_HierarchyCellDataOpsRealSpecialized
+math_HierarchyEdgeDataOpsComplex
+math_HierarchyEdgeDataOpsInteger
+math_HierarchyEdgeDataOpsReal
+math_HierarchyEdgeDataOpsRealSpecialized
+math_HierarchyFaceDataOpsComplex
+math_HierarchyFaceDataOpsInteger
+math_HierarchyFaceDataOpsReal
+math_HierarchyFaceDataOpsRealSpecialized
+math_HierarchyNodeDataOpsComplex
+math_HierarchyNodeDataOpsInteger
+math_HierarchyNodeDataOpsReal
+math_HierarchyNodeDataOpsRealSpecialized
+math_HierarchySideDataOpsComplex
+math_HierarchySideDataOpsInteger
+math_HierarchySideDataOpsReal
+math_HierarchySideDataOpsRealSpecialized
+math_PatchCellDataBasicOps
+math_PatchCellDataMiscellaneousOpsReal
+math_PatchCellDataNormOpsComplex
+math_PatchCellDataNormOpsReal
+math_PatchCellDataOpsComplex
+math_PatchCellDataOpsInteger
+math_PatchCellDataOpsReal
+math_PatchEdgeDataBasicOps
+math_PatchEdgeDataBasicOpsSpecialized
+math_PatchEdgeDataMiscellaneousOpsReal
+math_PatchEdgeDataNormOpsComplex
+math_PatchEdgeDataNormOpsReal
+math_PatchEdgeDataOpsComplex
+math_PatchEdgeDataOpsInteger
+math_PatchEdgeDataOpsReal
+math_PatchFaceDataBasicOps
+math_PatchFaceDataBasicOpsSpecialized
+math_PatchFaceDataMiscellaneousOpsReal
+math_PatchFaceDataNormOpsComplex
+math_PatchFaceDataNormOpsReal
+math_PatchFaceDataOpsComplex
+math_PatchFaceDataOpsInteger
+math_PatchFaceDataOpsReal
+math_PatchNodeDataBasicOps
+math_PatchNodeDataMiscellaneousOpsReal
+math_PatchNodeDataNormOpsComplex
+math_PatchNodeDataNormOpsReal
+math_PatchNodeDataOpsComplex
+math_PatchNodeDataOpsInteger
+math_PatchNodeDataOpsReal
+math_PatchSideDataBasicOps
+math_PatchSideDataBasicOpsSpecialized
+math_PatchSideDataMiscellaneousOpsReal
+math_PatchSideDataNormOpsComplex
+math_PatchSideDataNormOpsReal
+math_PatchSideDataOpsComplex
+math_PatchSideDataOpsInteger
+math_PatchSideDataOpsReal
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/mblk.classnames.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/mblk.classnames.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,11 @@
+MBUtilities
+MultiblockCoarsenSchedule
+MultiblockRefineAlgorithm
+MultiblockGriddingTagger
+MultiblockPatchStrategy
+MultiblockRefineSchedule
+MultiblockPatchLevel
+MultiblockGriddingAlgorithm
+MultiblockPatchHierarchy
+MBDataUtilities
+MultiblockCoarsenAlgorithm
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/mblk.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/mblk.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,22 @@
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/tools/scripts/conversion2.0/mblk.data $
+## Package:     SAMRAI build scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 3894 $
+## Modified:    $LastChangedDate: 2010-05-10 15:24:14 -0700 (Mon, 10 May 2010) $
+## Description: data file for sed substitutions to generate dim-dep. files
+##
+
+
+#
+# multiblock package
+#
+
+mblk_MBDataUtilities
+mblk_MBUtilities
+mblk_Multiblock
+mblk_MultiblockLevel
+mblk_MultiblockPatchStrategy
+mblk_MultiblockRefineAlgorithm
+mblk_MultiblockRefineSchedule
+
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/mesh.classnames.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/mesh.classnames.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,13 @@
+AsyncBergerRigoutsosNode
+HistogramBox
+BoxGeneratorStrategy
+AsyncBergerRigoutsos
+BergerRigoutsos
+SpatialKey
+LoadBalancer
+LoadBalanceStrategy
+BaseGriddingAlgorithm
+GriddingAlgorithm
+StandardTagAndInitialize
+TagAndInitializeStrategy
+StandardTagAndInitStrategy
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/mesh.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/mesh.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,28 @@
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/tools/scripts/conversion2.0/mesh.data $
+## Package:     SAMRAI build scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 3894 $
+## Modified:    $LastChangedDate: 2010-05-10 15:24:14 -0700 (Mon, 10 May 2010) $
+## Description: data file for sed substitutions to generate dim-dep. files
+##
+
+#
+# mesh generation package
+#
+
+mesh_BalanceUtilities
+mesh_BergerRigoutsos
+mesh_BoxGeneratorStrategy
+mesh_GriddingAlgorithm
+mesh_HistogramBox
+mesh_LoadBalancer
+mesh_LoadBalanceStrategy
+mesh_StandardTagAndInitialize
+mesh_StandardTagAndInitStrategy
+mesh_TagAndInitializeStrategy
+
+# mesh generation package timers
+
+mesh::GriddingAlgorithm
+
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/packagePrefixPrepend
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/packagePrefixPrepend	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,19 @@
+#!/bin/sh
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/tools/scripts/conversion2.0/packagePrefixPrepend $
+## Package:     SAMRAI scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 3894 $
+## Modified:    $LastChangedDate: 2010-05-10 15:24:14 -0700 (Mon, 10 May 2010) $
+## Description: shell script to convert 1.x codes to 2.0
+##
+
+BIN=`dirname $0`
+
+# Prefix each of the packages
+for PREFIX in tbox hier xfer pdat math mesh mblk geom solv algs appu
+do
+  perl $BIN/packagePrefixPrepend.pl ${PREFIX}
+done 
+
+exit
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/packagePrefixPrepend.pl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/packagePrefixPrepend.pl	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,124 @@
+#! /usr/bin/perl
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/tools/scripts/conversion2.0/packagePrefixPrepend.pl $
+## Package:     SAMRAI scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 3894 $
+## Modified:    $LastChangedDate: 2010-05-10 15:24:14 -0700 (Mon, 10 May 2010) $
+## Description: perl script to update Xd sed files to templates on DIM
+##
+
+use File::Basename;
+use File::Find;
+use Cwd;
+
+#
+# Disallow running from certain directories.
+#
+
+$prefix=@ARGV[0];
+
+my $pwd = cwd;
+#die basename($0) . " should not be run from your current directory"
+#    if $pwd =~ m:\b(examples|source/test|source/scripts)(/|$):;
+
+
+my $debug = 0;
+
+
+#
+# Read in sed.data to get the substitution patterns for X strings.
+#
+
+my $datfile = (dirname $0) . "/$prefix.classnames.data";
+print "datfile: $datfile\n" if ( $debug > 0 );
+open(DATFILE, "$datfile") || die "Cannot open input sed file $datfile";
+while (<DATFILE>) {
+    if ( m/^([^#][^ ]+)\n/o ) {
+      push @Xpattern, ${1};
+    }
+}
+close(DATFILE);
+my $allXpatterns = join '|', @Xpattern;
+
+my $allSimplepatterns = join '|', @Xpattern;
+$allSimplepatterns =~ s/($prefix)_//go;
+$allSimplepatterns =~ s/($prefix):://go;
+
+print "$allSimplepatterns\n" if $debug;
+
+#
+# Get prefix pattern to look for, or use default prefix pattern.
+#
+
+my $prepat;
+$prepat = q|(.*\.[ChI](.sed)?$)|;
+print "prepat: $prepat\n" if ( $debug > 0 );
+
+
+#
+# Find the X files to convert.
+#
+
+ at allfiles = ();
+sub selectXfile {
+    # This subroutine selects the X files in a find command.
+    # print "-$File::Find::dir- -$File::Find::name-\n";
+#    if ( $File::Find::dir =~ m!/(examples|source/test|source/scripts|CVS|[123]d)$!o ) {
+
+    if ( $File::Find::name =~ m!/(.svn|CVS|[123]d|\{arch\})$!o ) {
+	# print "pruned\n";
+	$File::Find::prune = true;
+    }
+    elsif ( -f && m/$prepat/o ) {
+	push @allfiles, $File::Find::name;
+	$allfiles[$#allfiles] =~ s|^\./||o;
+    }
+}
+print "Scanning...\n" if ( $debug > 0 );
+find( \&selectXfile, '.' );
+print "Done.\n" if ( $debug > 0 );
+
+for $xfile (@allfiles) {
+    print "Working on $xfile\n";
+    $xdir = dirname $xfile;
+    print "xdir: $xdir\n" if ( $debug > 0 );
+
+    ( $dfile = basename $xfile ) =~ s/(.*)X([-\.].*)\.sed$/\1X\2/o;
+    $dfile .= ".tmp";
+
+    open XF, "< $xfile" || die "Cannot open file $xfile";
+    open TF, "> $dfile" || die "Cannot open file $tpath";
+    while ( $str = <XF> ) {
+
+
+	# Do not prepend when inside a set of quotes.  Prepend a funky
+	# pattern and strip it off after the generic prepend.
+	$str =~ s/\"(.*)($allSimplepatterns)(.*)\"/\"\1ZZZXXXYYY_\2\3\"/g;
+
+	# Prepend package prefix
+	# SGS NOTE:  Why does this need to be repeated?  
+	$str =~ s/([^a-zA-Z_0-9\:])($allSimplepatterns)(\W)/\1$prefix\:\:\2\3/g;
+	$str =~ s/([^a-zA-Z_0-9\:])($allSimplepatterns)(\W)/\1$prefix\:\:\2\3/g;
+	$str =~ s/([^a-zA-Z_0-9\:])($allSimplepatterns)(\W)/\1$prefix\:\:\2\3/g;
+	$str =~ s/([^a-zA-Z_0-9\:])($allSimplepatterns)(\W)/\1$prefix\:\:\2\3/g;
+	$str =~ s/([^a-zA-Z_0-9\:])($allSimplepatterns)(\W)/\1$prefix\:\:\2\3/g;
+
+	$str =~ s/ZZZXXXYYY_($allSimplepatterns)/\1/g;
+
+	print TF $str;
+    }
+
+    close XF || die "Cannot close file $xfile";
+    close TF || die "Cannot close file $dfile";
+
+    printf "unlink $xfile\n"  if ( $debug > 0 );
+    unlink($xfile);
+    printf "rename $dfile $xfile\n"  if ( $debug > 0 );
+    rename( $dfile, $xfile);
+}
+
+
+
+
+
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/pdat.classnames.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/pdat.classnames.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,98 @@
+CellIterator
+CellDataFactory
+CellIndex
+CellData
+CellVariable
+SideVariable
+SideIterator
+SideDataFactory
+SideIndex
+SideData
+NodeVariable
+NodeIterator
+NodeDataFactory
+NodeIndex
+NodeData
+FaceVariable
+FaceIterator
+FaceDataFactory
+FaceIndex
+FaceData
+OutersideVariable
+OutersideData
+OutersideDataFactory
+OuternodeVariable
+OuternodeData
+OuternodeDataFactory
+EdgeIndex
+EdgeData
+EdgeVariable
+EdgeIterator
+EdgeDataFactory
+OuterfaceGeometry
+NodeGeometry
+FaceGeometry
+SideOverlap
+NodeOverlap
+OutersideGeometry
+CellGeometry
+EdgeOverlap
+SideGeometry
+CellOverlap
+OuternodeGeometry
+EdgeGeometry
+FaceOverlap
+IndexDataFactory
+IndexVariable
+IndexData
+OuterfaceDataFactory
+OuterfaceVariable
+OuterfaceData
+CellDoubleLinearTimeInterpolateOp
+CellFloatLinearTimeInterpolateOp
+CellComplexLinearTimeInterpolateOp
+OutersideComplexLinearTimeInterpolateOp
+OutersideFloatLinearTimeInterpolateOp
+OutersideDoubleLinearTimeInterpolateOp
+EdgeFloatLinearTimeInterpolateOp
+EdgeComplexLinearTimeInterpolateOp
+EdgeDoubleLinearTimeInterpolateOp
+SideFloatLinearTimeInterpolateOp
+SideComplexLinearTimeInterpolateOp
+SideDoubleLinearTimeInterpolateOp
+NodeFloatLinearTimeInterpolateOp
+NodeComplexLinearTimeInterpolateOp
+NodeDoubleLinearTimeInterpolateOp
+OuterfaceComplexLinearTimeInterpolateOp
+OuterfaceFloatLinearTimeInterpolateOp
+OuterfaceDoubleLinearTimeInterpolateOp
+FaceDoubleLinearTimeInterpolateOp
+FaceFloatLinearTimeInterpolateOp
+FaceComplexLinearTimeInterpolateOp
+CellComplexConstantRefine
+CellDoubleConstantRefine
+CellIntegerConstantRefine
+CellFloatConstantRefine
+EdgeFloatConstantRefine
+EdgeComplexConstantRefine
+EdgeDoubleConstantRefine
+EdgeIntegerConstantRefine
+OuternodeDoubleConstantCoarsen
+SideFloatConstantRefine
+SideComplexConstantRefine
+SideDoubleConstantRefine
+SideIntegerConstantRefine
+NodeFloatConstantAverage
+NodeComplexConstantAverage
+NodeDoubleConstantAverage
+NodeIntegerConstantAverage
+OuterfaceDoubleConstantRefine
+OuterfaceIntegerConstantRefine
+OuterfaceFloatConstantRefine
+OuterfaceComplexConstantRefine
+FaceComplexConstantRefine
+FaceDoubleConstantRefine
+FaceIntegerConstantRefine
+FaceFloatConstantRefine
+ArrayDataIterator
+ArrayData
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/pdat.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/pdat.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,127 @@
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/tools/scripts/conversion2.0/pdat.data $
+## Package:     SAMRAI build scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 3894 $
+## Modified:    $LastChangedDate: 2010-05-10 15:24:14 -0700 (Mon, 10 May 2010) $
+## Description: data file for sed substitutions to generate dim-dep. files
+##
+
+
+#
+# patch data package
+#
+
+pdat_ArrayData
+pdat_ArrayDataIterator
+pdat_ArrayDataSpecialized
+pdat_IndexData
+pdat_IndexDataFactory
+pdat_IndexDataNode
+pdat_IndexIterator
+pdat_IndexListIterator
+pdat_IndexVariable
+pdat_CellData
+pdat_CellDataSpecialized
+pdat_CellDataFactory
+pdat_CellGeometry
+pdat_CellIndex
+pdat_CellIterator
+pdat_CellOverlap
+pdat_CellVariable
+pdat_CellComplexConstantRefine
+pdat_CellComplexLinearTimeInterpolateOp
+pdat_CellDoubleConstantRefine
+pdat_CellDoubleLinearTimeInterpolateOp
+pdat_CellFloatConstantRefine
+pdat_CellFloatLinearTimeInterpolateOp
+pdat_CellIntegerConstantRefine
+pdat_EdgeData
+pdat_EdgeDataSpecialized
+pdat_EdgeDataFactory
+pdat_EdgeGeometry
+pdat_EdgeIndex
+pdat_EdgeIterator
+pdat_EdgeOverlap
+pdat_EdgeVariable
+pdat_EdgeComplexConstantRefine
+pdat_EdgeComplexLinearTimeInterpolateOp
+pdat_EdgeDoubleConstantRefine
+pdat_EdgeDoubleLinearTimeInterpolateOp
+pdat_EdgeFloatConstantRefine
+pdat_EdgeFloatLinearTimeInterpolateOp
+pdat_EdgeIntegerConstantRefine
+pdat_FaceData
+pdat_FaceDataSpecialized
+pdat_FaceDataFactory
+pdat_FaceIndex
+pdat_FaceIterator
+pdat_FaceGeometry
+pdat_FaceOverlap
+pdat_FaceVariable
+pdat_FaceComplexConstantRefine
+pdat_FaceComplexLinearTimeInterpolateOp
+pdat_FaceDoubleConstantRefine
+pdat_FaceDoubleLinearTimeInterpolateOp
+pdat_FaceFloatConstantRefine
+pdat_FaceFloatLinearTimeInterpolateOp
+pdat_FaceIntegerConstantRefine
+pdat_NodeData
+pdat_NodeDataSpecialized
+pdat_NodeDataFactory
+pdat_NodeGeometry
+pdat_NodeIndex
+pdat_NodeIterator
+pdat_NodeOverlap
+pdat_NodeVariable
+pdat_NodeComplexConstantAverage
+pdat_NodeComplexLinearTimeInterpolateOp
+pdat_NodeDoubleConstantAverage
+pdat_NodeDoubleLinearTimeInterpolateOp
+pdat_NodeFloatConstantAverage
+pdat_NodeFloatLinearTimeInterpolateOp
+pdat_NodeIntegerConstantAverage
+pdat_OuterfaceData
+pdat_OuterfaceDataSpecialized
+pdat_OuterfaceDataFactory
+pdat_OuterfaceGeometry
+pdat_OuterfaceVariable
+pdat_OuterfaceComplexConstantRefine
+pdat_OuterfaceComplexLinearTimeInterpolateOp
+pdat_OuterfaceDoubleConstantRefine
+pdat_OuterfaceDoubleLinearTimeInterpolateOp
+pdat_OuterfaceFloatConstantRefine
+pdat_OuterfaceFloatLinearTimeInterpolateOp
+pdat_OuterfaceIntegerConstantRefine
+pdat_OuternodeData
+pdat_OuternodeDataSpecialized
+pdat_OuternodeDataFactory
+pdat_OuternodeGeometry
+pdat_OuternodeIndex
+pdat_OuternodeIterator
+pdat_OuternodeOverlap
+pdat_OuternodeVariable
+pdat_OuternodeDoubleConstantCoarsen
+pdat_OutersideData
+pdat_OutersideDataSpecialized
+pdat_OutersideDataFactory
+pdat_OutersideGeometry
+pdat_OutersideVariable
+pdat_OutersideComplexLinearTimeInterpolateOp
+pdat_OutersideDoubleLinearTimeInterpolateOp
+pdat_OutersideFloatLinearTimeInterpolateOp
+pdat_SideData
+pdat_SideDataSpecialized
+pdat_SideDataFactory
+pdat_SideGeometry
+pdat_SideIndex
+pdat_SideIterator
+pdat_SideOverlap
+pdat_SideVariable
+pdat_SideComplexConstantRefine
+pdat_SideComplexLinearTimeInterpolateOp
+pdat_SideDoubleConstantRefine
+pdat_SideDoubleLinearTimeInterpolateOp
+pdat_SideFloatConstantRefine
+pdat_SideFloatLinearTimeInterpolateOp
+pdat_SideIntegerConstantRefine
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/renameXd.pl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/renameXd.pl	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,220 @@
+#! /usr/bin/perl
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/tools/scripts/conversion2.0/renameXd.pl $
+## Package:     SAMRAI scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 3894 $
+## Modified:    $LastChangedDate: 2010-05-10 15:24:14 -0700 (Mon, 10 May 2010) $
+## Description: perl script to update Xd sed files to templates on DIM
+##
+
+use File::Basename;
+use File::Find;
+use Cwd;
+
+#
+# Disallow running from certain directories.
+#
+
+$prefix=@ARGV[0];
+
+my $pwd = cwd;
+#die basename($0) . " should not be run from your current directory"
+#    if $pwd =~ m:\b(examples|source/test|source/scripts)(/|$):;
+
+
+my $debug = 0;
+
+
+#
+# Read in sed.data to get the substitution patterns for X strings.
+#
+
+my $datfile = (dirname $0) . "/$prefix.data";
+print "datfile: $datfile\n" if ( $debug > 0 );
+open(DATFILE, "$datfile") || die "Cannot open input sed file $datfile";
+while (<DATFILE>) {
+    if ( m/^([^#][^ ]+)\n/o ) {
+      push @Xpattern, ${1};
+    }
+}
+close(DATFILE);
+my $allXpatterns = join '|', @Xpattern;
+
+my $allSimplepatterns = join '|', @Xpattern;
+$allSimplepatterns =~ s/($prefix)_//go;
+
+#
+# Get prefix pattern to look for, or use default prefix pattern.
+#
+
+my $prepat;
+$prepat = q|(.*\.[ChI](.sed)?$)|;
+print "prepat: $prepat\n" if ( $debug > 0 );
+
+
+#
+# Find the X files to convert.
+#
+
+ at allfiles = ();
+sub selectXfile {
+    # This subroutine selects the X files in a find command.
+    # print "-$File::Find::dir- -$File::Find::name-\n";
+#    if ( $File::Find::dir =~ m!/(examples|source/test|source/scripts|CVS|[123]d)$!o ) {
+
+    if ( $File::Find::name =~ m!/(.svn|CVS|[123]d|\{arch\})$!o ) {
+	# print "pruned\n";
+	$File::Find::prune = true;
+    }
+    elsif ( -f && m/$prepat/o ) {
+	push @allfiles, $File::Find::name;
+	$allfiles[$#allfiles] =~ s|^\./||o;
+    }
+}
+print "Scanning...\n" if ( $debug > 0 );
+find( \&selectXfile, '.' );
+print "Done.\n" if ( $debug > 0 );
+
+for $xfile (@allfiles) {
+    print "Working on $xfile\n";
+    $xdir = dirname $xfile;
+    print "xdir: $xdir\n" if ( $debug > 0 );
+
+    $xfilebasename = basename $xfile;
+    print "<$xfilebasename>\n" if ( $debug > 0);
+
+    ( $dfile = basename $xfile ) =~ s/(.*)X([-\.].*)\.sed$/\1X\2/o;
+    $dfile .= ".tmp";
+
+    ( $newclassname = basename $xfile ) =~ s/(.*)X([-\.].*)\.sed$/\1/o;
+    ( $oldclassname = basename $xfile ) =~ s/(.*)X([-\.].*)\.sed$/\1X/o;
+
+    print "File Suffix " . substr($dfile, -1, 1) . "\n" if ($debug > 0);
+    print "dfile: $dfile\n" if ( $debug > 0 );
+    print "oldclassname: $oldclassname\n" if ( $debug > 0 );
+    print "newclassname: $newclassname\n" if ( $debug > 0 );
+    
+    open XF, "< $xfile" || die "Cannot open file $xfile";
+    open TF, "> $dfile" || die "Cannot open file $tpath";
+    while ( $str = <XF> ) {
+
+	# Special class name changes
+	$str =~ s/tbox_Box/tbox::DatabaseBox/go;
+
+	# Special method changes
+#	$str =~ s/getBox/getDatabaseBox/go;
+#	$str =~ s/putBox/putDatabaseBox/go;
+#	$str =~ s/getBoxArray/getDatabaseBoxArray/go;
+#	$str =~ s/putBoxArray/putDatabaseBoxArray/go;
+
+	# Included lines are the include guards which should retain underscores
+
+	$included=0;
+        if ( $str =~ s/included_($allXpatterns)[X123]/included_\1/go ) {
+	    $included = 1;
+	}
+
+        if ( $str =~ m/included_$prefix/go ) {
+	    $included = 1;
+	}
+
+	# File lines are statements that are including a file
+	$fileline=0;
+	# replace filenames for includes
+        if ( $str =~ s/($allXpatterns)[X123]\.([hI])/\1\.\2/go ) {
+	    $fileline = 1;
+	}
+
+	if ( $str =~ m/^\#include/ ) {
+	    $fileline = 1;
+	}
+
+	if ($fileline) {
+	    $str =~ s/($prefix)_//go;
+
+	    $str =~ s/($allSimplepatterns)1/\1/go;
+	    $str =~ s/($allSimplepatterns)2/\1/go;
+	    $str =~ s/($allSimplepatterns)3/\1/go;
+	}
+	
+	# replace class forward declares
+#	$str =~ s/class ($allXpatterns)X;/template<int DIM> class \1;/go;
+
+	# replace classnames
+
+	if(!$fileline && !$included) {
+
+	    # replace documentation references
+	    $str =~ s/see $prefix_($allSimplepatterns)X/see $prefix\_\1/go;
+
+	    if ($included) {
+		print "this is bogus\n";
+	    }
+	    # If the class is a template, need <DIM,TYPE>
+	    $str =~ s/($allXpatterns)X<(.*)>/\1<NDIM,\2>/go;
+	    $str =~ s/($allXpatterns)1<(.*)>/\1<1,\2>/go;
+	    $str =~ s/($allXpatterns)2<(.*)>/\1<2,\2>/go;
+	    $str =~ s/($allXpatterns)3<(.*)>/\1<3,\2>/go;
+	    
+	    # Class is not already templated, just add <DIM>
+	    $str =~ s/($allXpatterns)X/\1<NDIM>/go;
+	    $str =~ s/($allXpatterns)1/\1<1>/go;
+	    $str =~ s/($allXpatterns)2/\1<2>/go;
+	    $str =~ s/($allXpatterns)3/\1<3>/go;
+	    
+	    
+	    $replaced = 0;
+
+ 	    # If the class is a template, need <DIM,TYPE>
+ 	    if ($str =~ s/(\W)($allSimplepatterns)<(.*)>/\1$prefix::\2<NDIM,\3>/go )
+	    {
+		$replaced = 1;
+	    }
+	    $str =~ s/(\W)($allSimplepatterns)X<(.*)>/\1$prefix::\2<NDIM,\3>/go;
+	    $str =~ s/(\W)($allSimplepatterns)1<(.*)>/\1$prefix::\2<1,\3>/go;
+	    $str =~ s/(\W)($allSimplepatterns)2<(.*)>/\1$prefix::\2<2,\3>/go;
+	    $str =~ s/(\W)($allSimplepatterns)3<(.*)>/\1$prefix::\2<3,\3>/go;
+	    
+	    # Class is not already templated, just add <DIM>
+	    if (!$replaced) {
+		$str =~ s/(\W)($allSimplepatterns)(\W)/\1$prefix::\2<NDIM>\3/go;
+	    }
+	    $str =~ s/(\W)($allSimplepatterns)X/\1$prefix::\2<NDIM>/go;
+	    $str =~ s/(\W)($allSimplepatterns)1/\1$prefix::\2<1>/go;
+	    $str =~ s/(\W)($allSimplepatterns)2/\1$prefix::\2<2>/go;
+	    $str =~ s/(\W)($allSimplepatterns)3/\1$prefix::\2<3>/go;
+	    
+	    # fix up nested templates 
+	    $str =~ s/\<NDIM\>\>/\<NDIM\> \>/o;
+	    $str =~ s/\<1\>\>/\<1\> \>/o;
+	    $str =~ s/\<2\>\>/\<2\> \>/o;
+	    $str =~ s/\<3\>\>/\<3\> \>/o;
+	    
+	    # strip off package names
+
+	    $str =~ s/($prefix)_([A-Z])/\1::\2/go;
+
+	    # fix up plog with package name
+
+	    $str =~ s/(\s)pout/\1tbox::pout/go;
+	    $str =~ s/(\s)perr/\1tbox::perr/go;
+	    $str =~ s/(\s)plog/\1tbox::plog/go;
+	}
+
+	print TF $str;
+    }
+
+    close XF || die "Cannot close file $xfile";
+    close TF || die "Cannot close file $dfile";
+
+    printf "unlink $xfile\n"  if ( $debug > 0 );
+    unlink($xfile);
+    printf "rename $dfile $xfile\n"  if ( $debug > 0 );
+    rename( $dfile, $xfile);
+}
+
+
+
+
+
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/rename_tbox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/rename_tbox	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,16 @@
+#!/bin/sh
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/tools/scripts/conversion2.0/rename_tbox $
+## Package:     SAMRAI scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 3894 $
+## Modified:    $LastChangedDate: 2010-05-10 15:24:14 -0700 (Mon, 10 May 2010) $
+## Description: shell script to run rename X class names to template on <DIM>
+##
+
+BIN=`dirname $0`
+
+perl $BIN/rename_tbox.pl tbox_classes
+
+exit
+
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/rename_tbox.pl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/rename_tbox.pl	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,121 @@
+#! /usr/bin/perl
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/tools/scripts/conversion2.0/rename_tbox.pl $
+## Package:     SAMRAI scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 3894 $
+## Modified:    $LastChangedDate: 2010-05-10 15:24:14 -0700 (Mon, 10 May 2010) $
+## Description: perl script to update Xd sed files to templates on DIM
+##
+
+use File::Basename;
+use File::Find;
+use Cwd;
+
+#
+# Disallow running from certain directories.
+#
+
+$prefix=@ARGV[0];
+
+my $pwd = cwd;
+#die basename($0) . " should not be run from your current directory"
+#    if $pwd =~ m:\b(examples|source/test|source/scripts)(/|$):;
+
+
+my $debug = 0;
+
+
+#
+# Read in sed.data to get the substitution patterns for X strings.
+#
+
+my $datfile = (dirname $0) . "/$prefix.data";
+print "datfile: $datfile\n" if ( $debug > 0 );
+open(DATFILE, "$datfile") || die "Cannot open input sed file $datfile";
+while (<DATFILE>) {
+    if ( m/^([^#][^ ]+)\n/o ) {
+      push @Xpattern, ${1};
+    }
+}
+close(DATFILE);
+my $allXpatterns = join '|', @Xpattern;
+
+my $allSimplepatterns = join '|', @Xpattern;
+$allSimplepatterns =~ s/($prefix)_//go;
+
+#
+# Get prefix pattern to look for, or use default prefix pattern.
+#
+
+my $prepat;
+$prepat = q|(.*\.[ChI](.sed)?$)|;
+print "prepat: $prepat\n" if ( $debug > 0 );
+
+
+#
+# Find the X files to convert.
+#
+
+ at allfiles = ();
+sub selectXfile {
+    # This subroutine selects the X files in a find command.
+    # print "-$File::Find::dir- -$File::Find::name-\n";
+#    if ( $File::Find::dir =~ m!/(examples|source/test|source/scripts|CVS|[123]d)$!o ) {
+
+    if ( $File::Find::name =~ m!/(.svn|CVS|[123]d|\{arch\})$!o ) {
+	# print "pruned\n";
+	$File::Find::prune = true;
+    }
+    elsif ( -f && m/$prepat/o ) {
+	push @allfiles, $File::Find::name;
+	$allfiles[$#allfiles] =~ s|^\./||o;
+    }
+}
+print "Scanning...\n" if ( $debug > 0 );
+find( \&selectXfile, '.' );
+print "Done.\n" if ( $debug > 0 );
+
+for $xfile (@allfiles) {
+    print "Working on $xfile\n";
+    $xdir = dirname $xfile;
+    print "xdir: $xdir\n" if ( $debug > 0 );
+
+    $xfilebasename = basename $xfile;
+    print "<$xfilebasename>\n" if ( $debug > 0);
+
+    ( $dfile = basename $xfile ) =~ s/(.*)X([-\.].*)\.sed$/\1X\2/o;
+    $dfile .= ".tmp";
+
+    ( $newclassname = basename $xfile ) =~ s/(.*)X([-\.].*)\.sed$/\1/o;
+    ( $oldclassname = basename $xfile ) =~ s/(.*)X([-\.].*)\.sed$/\1X/o;
+
+    print "File Suffix " . substr($dfile, -1, 1) . "\n" if ($debug > 0);
+    print "dfile: $dfile\n" if ( $debug > 0 );
+    print "oldclassname: $oldclassname\n" if ( $debug > 0 );
+    print "newclassname: $newclassname\n" if ( $debug > 0 );
+    
+    open XF, "< $xfile" || die "Cannot open file $xfile";
+    open TF, "> $dfile" || die "Cannot open file $tpath";
+    while ( $str = <XF> ) {
+
+	# replace filenames for includes
+#        $str =~ s/(\#include.*)\"($allSimplepatterns)\.([hIC])\"/\1\"sgs\2\.\3/go;
+#        $str =~ s/(\#include)(\s*)\"(.*)\"/\1\2\"tbox\/\3"/go;
+        $str =~ s/\#include(\s*)\"($allSimplepatterns)\.([hIC])\"/#include\1\"tbox\/\2\.\3"/go;
+	print TF $str;
+    }
+
+    close XF || die "Cannot close file $xfile";
+    close TF || die "Cannot close file $dfile";
+
+    printf "unlink $xfile\n" if ( $debug > 0 );
+    unlink($xfile);
+    printf "rename $dfile $xfile\n" if ( $debug > 0 );
+    rename( $dfile, $xfile);
+}
+
+
+
+
+
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/solv.classnames.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/solv.classnames.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,28 @@
+NonlinearSolverStrategy
+Sundials_SAMRAIVector
+PETSc_SAMRAIVectorReal
+SAMRAIVectorReal
+OuternodeSumTransaction
+PatchBoundaryNodeSum
+OuternodeSumAlgorithm
+OuternodeSumTransactionFactory
+FACPreconditioner
+FACOperatorStrategy
+CellPoissonHypreSolver
+RobinBcCoefStrategy
+CellPoissonFACSolver
+GhostCellRobinBcCoefs
+CartesianRobinBcHelper
+SimpleCellRobinBcCoefs
+PoissonSpecifications
+LocationIndexRobinBcCoefs
+CellPoissonFACOps
+KINSOLSolver
+KINSOLAbstractFunctions
+KINSOL_SAMRAIContext
+SundialsAbstractVector
+CVODEAbstractFunctions
+CVODESolver
+PETScAbstractVectorReal
+SNES_SAMRAIContext
+SNESAbstractFunctions
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/solv.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/solv.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,39 @@
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/tools/scripts/conversion2.0/solv.data $
+## Package:     SAMRAI build scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 3894 $
+## Modified:    $LastChangedDate: 2010-05-10 15:24:14 -0700 (Mon, 10 May 2010) $
+## Description: data file for sed substitutions to generate dim-dep. files
+##
+
+#
+# solvers package
+#
+
+solv_CartesianRobinBcHelper
+solv_FACOperatorStrategy
+solv_FACPreconditioner
+solv_GhostCellRobinBcCoefs
+solv_KINSOL_SAMRAIContext
+solv_LocationIndexRobinBcCoefs
+solv_NonlinearSolverStrategy
+solv_PETSc_SAMRAIVectorReal
+solv_CellPoissonFACSolver
+solv_PoissonHierarchySolver
+solv_PoissonHYPRESolver
+solv_PoissonLevelStrategy
+solv_Sundials_SAMRAIVector
+solv_RobinBcCoefStrategy
+solv_SimpleCellRobinBcCoefs
+solv_SAMRAIVectorReal
+solv_SAMRAIVectorRealSpecialized
+solv_CellPoissonHypreSolver
+solv_CellPoissonFACOps
+solv_SNES_SAMRAIContext
+solv_OuternodeSumAlgorithm
+solv_OuternodeSumTransaction
+solv_OuternodeSumTransactionFactory
+solv_PatchBoundaryNodeSum
+
+
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/tbox.classnames.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/tbox.classnames.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,45 @@
+Statistician
+Statistic
+TimerManager
+Timer
+StatTransaction
+DatabaseBox
+Database
+Serializable
+InputManager
+Parser
+InputDatabase
+StandardArena
+DescribedClass
+PointerBase
+ConstPointer
+ReferenceCounter
+ScratchArena
+FixedArena
+Array
+Pointer
+ArenaManager
+ConstPointerBase
+Arena
+List
+Tracer
+MathUtilities
+ParallelBuffer
+NullDatabase
+RestartManager
+HDFDatabase
+FileStream
+MessageStream
+XDRStream
+AbstractStream
+Schedule
+RelaunchableJob
+AsyncCommGroup
+AsyncCommStage
+JobRelauncher
+Transaction
+SAMRAIManager
+PIO
+plog
+perr
+pout
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/tbox.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/tbox.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,10 @@
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/tools/scripts/conversion2.0/tbox.data $
+## Package:     SAMRAI build scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 3894 $
+## Modified:    $LastChangedDate: 2010-05-10 15:24:14 -0700 (Mon, 10 May 2010) $
+## Description: data file for sed substitutions to generate dim-dep. files
+##
+
+foobarfoobarfoobar
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/tbox_classes.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/tbox_classes.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,58 @@
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/tools/scripts/conversion2.0/tbox_classes.data $
+## Package:     SAMRAI build scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 3894 $
+## Modified:    $LastChangedDate: 2010-05-10 15:24:14 -0700 (Mon, 10 May 2010) $
+## Description: data file for sed substitutions to generate dim-dep. files
+##
+
+AbstractStream
+Arena
+ArenaManager
+Array
+Boolean
+Clock
+Complex
+ConstPointer
+ConstPointerBase
+Database
+DatabaseBox
+DescribedClass
+FileStream
+FixedArena
+Grammar
+HDFDatabase
+IEEE
+IOStream
+InputDatabase
+InputManager
+List
+MPI
+MathUtilities
+MemoryUtilities
+MessageStream
+NullDatabase
+PIO
+ParallelBuffer
+Parser
+Pointer
+PointerBase
+ReferenceCounter
+RestartManager
+SAMRAIManager
+Schedule
+ScratchArena
+Serializable
+ShutdownRegistry
+StandardArena
+StatTransaction
+Statistic
+Statistician
+String
+Timer
+TimerManager
+Tracer
+Transaction
+Utilities
+XDRStream
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/xfer.classnames.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/xfer.classnames.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,17 @@
+CoarsenCopyTransaction
+CoarsenPatchStrategy
+RefineTimeTransaction
+CoarsenAlgorithm
+CoarsenSchedule
+CoarsenClasses
+RefineCopyTransaction
+FillBoxSet
+RefinePatchStrategy
+TransactionFactory
+RefineAlgorithm
+RefineSchedule
+RefineClasses
+Geometry
+TimeInterpolateOperator
+RefineOperator
+CoarsenOperator
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.0/xfer.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.0/xfer.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,36 @@
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/tools/scripts/conversion2.0/xfer.data $
+## Package:     SAMRAI build scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 3894 $
+## Modified:    $LastChangedDate: 2010-05-10 15:24:14 -0700 (Mon, 10 May 2010) $
+## Description: data file for sed substitutions to generate dim-dep. files
+##
+
+
+#
+# algorithm package
+#
+
+xfer_CoarsenCopyTransaction
+xfer_CoarsenPatchStrategy
+xfer_RefineTimeTransaction
+xfer_CoarsenAlgorithm
+xfer_CoarsenSchedule
+xfer_CoarsenClasses
+xfer_RefineCopyTransaction
+xfer_FillBoxSet
+xfer_RefinePatchStrategy
+xfer_TransactionFactory
+xfer_RefineAlgorithm
+xfer_RefineSchedule
+xfer_RefineClasses
+xfer_Geometry
+xfer_TimeInterpolateOperator
+xfer_RefineOperator
+xfer_CoarsenOperator
+
+# algorithm package timers
+
+algs::HyperbolicLevelIntegrator
+algs::TimeRefinementIntegrator
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.3/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.3/README	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,23 @@
+Utilities to aid in converting code to work with SAMRAI 2.3 name
+changes.
+
+To use simply run the "convert2.3" script in the root directory of the
+source code to convert. The script will search for all .C, .I and .h
+files and perform several method renames.
+
+The methods to rename are listed in the *.data files in this
+directory; if you use these method names in non-SAMRAI related code
+this script is not recommended since it is performing a simple text
+replacement.  [If anyone can recommend a good refactoring tool for C++
+please email samrai at llnl.gov.  We would really prefer to have a
+language aware replace capability].
+
+IMPORTANT: As with all automatic source modifications, make sure you
+have a backup of the code before using the script.
+
+
+
+
+
+
+
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.3/convert2.3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.3/convert2.3	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,17 @@
+#!/bin/sh
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/tools/scripts/conversion2.0/convert2.0 $
+## Package:     SAMRAI scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 1917 $
+## Modified:    $LastChangedDate: 2008-01-25 13:28:01 -0800 (Fri, 25 Jan 2008) $
+## Description: shell script to convert 1.x codes to 2.0
+##
+
+BIN=`dirname $0`
+
+# Rename getNumber methods to be getNumberOf for consistency
+# and add templating on DIM.
+perl $BIN/renameGetNumberMethods.pl 
+
+exit
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.3/getNumberMethods.data
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.3/getNumberMethods.data	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,13 @@
+getNumberBlocks
+getNumberBoundaryNodes
+getNumberEquivalenceClasses
+getNumberItems
+getNumberItemsInEquivalenceClass
+getNumberIterations
+getNumberLevels
+getNumberNearestNeighborNodes
+getNumberNeighbors
+getNumberOutsideNeighborNodes
+getNumberRegisteredPatchDataIndices
+getNumberRegisteredVariableContexts
+getNumberRegisteredVariables
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.3/renameGetNumberMethods.pl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.3/renameGetNumberMethods.pl	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,86 @@
+#! /usr/bin/perl
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/tools/scripts/conversion2.0/renameXd.pl $
+## Package:     SAMRAI scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 1917 $
+## Modified:    $LastChangedDate: 2008-01-25 13:28:01 -0800 (Fri, 25 Jan 2008) $
+## Description: perl script to rename getNumber methods to be getNumberOf 
+##
+
+use File::Basename;
+use File::Find;
+use Cwd;
+
+#
+# Disallow running from certain directories.
+#
+
+$patternFile="getNumberMethods.data";
+
+my $pwd = cwd;
+
+#
+# Read in datafile to get the names for replacement
+#
+my $patternFile = (dirname $0) . "/$patternFile";
+open(PATTERNFILE, "$patternFile") || die "Cannot open input sed file $patternFile";
+while (<PATTERNFILE>) {
+    if ( m/^([^#][^ ]+)\n/o ) {
+      push @replacePatterns, ${1};
+    }
+}
+close(PATTERNFILE);
+
+my $fileExtensionPattern;
+$fileExtensionPattern = q/(.*\.[ChI]$)|(.*\.CPP$)|(.*\.cpp$)|(.*\.cxx$)|(.*\.CXX$)|(.*\.H$)|(.*\.hxx$)|(.*\.Hxx$)|(.*\.HXX$)/;
+
+#
+# Find the files to convert.
+#
+# Excludes files that are in internal source code control directories.
+#
+ at filesToProcess = ();
+sub selectFiles {
+    if ( $File::Find::name =~ m!/(.svn|CVS|\{arch\})$!o ) {
+	$File::Find::prune = true;
+    }
+    elsif ( -f && m/$fileExtensionPattern/o ) {
+	push @filesToProcess, $File::Find::name;
+	$filesToProcess[$#filesToProcess] =~ s|^\./||o;
+    }
+}
+find( \&selectFiles, '.' );
+
+for $file (@filesToProcess) {
+    print "Working on $file\n";
+    $directory = dirname $file;
+
+    $filebasename = basename $file;
+
+    $tempFile = $filebasename . ".samrai.tmp";
+
+    open FILE, "< $file" || die "Cannot open file $file";
+    open TEMPFILE, "> $tempFile" || die "Cannot open temporary work file $tempFile";
+    while ( $str = <FILE> ) {
+
+	for $pattern (@replacePatterns) {
+	    $new_name = ${pattern};
+	    $new_name =~ s/getNumber/getNumberOf/g;
+	    $str =~ s/${pattern}/${new_name}/g;
+	}
+
+	print TEMPFILE $str;
+    }
+
+    close FILE || die "Cannot close file $file";
+    close TEMPFILE || die "Cannot close file $tempFile";
+
+    unlink($file);
+    rename( $tempFile, $file);
+}
+
+
+
+
+
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.3/replaceIncludeGuards
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.3/replaceIncludeGuards	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,15 @@
+#!/bin/sh
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/scripts/source_manipulation/replaceIncludeGuards $
+## Package:     SAMRAI scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 1917 $
+## Modified:    $LastChangedDate: 2008-01-25 13:28:01 -0800 (Fri, 25 Jan 2008) $
+## Description: shell script to convert 1.x codes to 2.0
+##
+
+BIN=`dirname $0`
+
+perl $BIN/replaceIncludeGuards.pl 
+
+exit
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion2.3/replaceIncludeGuards.pl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion2.3/replaceIncludeGuards.pl	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,96 @@
+#! /usr/bin/perl
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/scripts/source_manipulation/replaceIncludeGuards.pl $
+## Package:     SAMRAI scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 1917 $
+## Modified:    $LastChangedDate: 2008-01-25 13:28:01 -0800 (Fri, 25 Jan 2008) $
+## Description: perl script to update Xd sed files to templates on DIM
+##
+
+use File::Basename;
+use File::Find;
+use Cwd;
+
+#
+# Disallow running from certain directories.
+#
+
+my $pwd = cwd;
+
+my $debug = 1;
+
+#
+# Get prefix pattern to look for, or use default prefix pattern.
+#
+
+my $prepat;
+$prepat = q|(.*\.[ChI]$)|;
+print "prepat: $prepat\n" if ( $debug > 0 );
+
+
+#
+# Find the X files to convert.
+#
+ at allfiles = ();
+sub selectXfile {
+    # This subroutine selects the X files in a find command.
+    # print "-$File::Find::dir- -$File::Find::name-\n";
+#    if ( $File::Find::dir =~ m!/(examples|source/test|source/scripts|CVS|[123]d)$!o ) {
+
+    if ( $File::Find::dir =~ m!/(.svn|CVS|[123]d)$!o ) {
+	# print "pruned\n";
+	$File::Find::prune = true;
+    }
+    elsif ( -f && m/$prepat/o ) {
+	push @allfiles, $File::Find::name;
+	$allfiles[$#allfiles] =~ s|^\./||o;
+    }
+}
+print "Scanning...\n" if ( $debug > 0 );
+find( \&selectXfile, '.' );
+print "Done.\n" if ( $debug > 0 );
+
+for $xfile (@allfiles) {
+    print "Working on $xfile\n" if $debug;
+
+if(1) {
+    $xdir = dirname $xfile;
+    print "xdir: $xdir\n" if ( $debug > 0 );
+
+    ( $dfile = basename $xfile ) =~ s/(.*)X([-\.].*)\.sed$/\1X\2/o;
+    $dfile .= ".tmp";
+
+    print "File Suffix " . substr($dfile, -1, 1) . "\n" if ($debug > 0);
+    print "dfile: $dfile\n" if ( $debug > 0 );
+    
+    open XF, "< $xfile" || die "Cannot open file $xfile";
+    open TF, "> $dfile" || die "Cannot open file $tpath";
+
+    # read in more whole paragraph, not just one line
+#    $/ = '';
+    undef $/;
+
+    while ( <XF> ) {
+#	s/#ifndef (.*)$//mgi;
+#	s/^#ifndef (\w*)(\s*)$#include (.*)//smgi;
+	s/^#ifndef DEBUG_NO_INLINE/#FIXUP/smgi;
+	s/^#ifndef include(\w*)(\s*)#include \"([\w\.\/]*)\"(\s*)#endif/#include \"$3\"/smgi;
+	s/^#FIXUP/#ifndef DEBUG_NO_INLINE/smgi;
+	print TF;
+    }
+
+    close XF || die "Cannot close file $xfile";
+    close TF || die "Cannot close file $dfile";
+
+    printf "unlink $xfile\n"  if ( $debug > 0 );
+    unlink($xfile);
+    printf "rename $dfile $xfile\n"  if ( $debug > 0 );
+    rename( $dfile, $xfile);
+}
+}
+
+
+
+
+
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion3.0/SAMRAI_classes_templated_on_DIM_and_other.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion3.0/SAMRAI_classes_templated_on_DIM_and_other.txt	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,72 @@
+ArrayDataBasicOps
+ArrayDataMiscellaneousOpsReal
+ArrayDataNormOpsReal
+HierarchyCellDataOpsReal
+PatchCellDataBasicOps
+PatchCellDataMiscellaneousOpsReal
+PatchCellDataNormOpsReal
+PatchCellDataOpsReal
+HierarchyEdgeDataOpsReal
+PatchEdgeDataBasicOps
+PatchEdgeDataMiscellaneousOpsReal
+PatchEdgeDataNormOpsReal
+PatchEdgeDataOpsReal
+HierarchyFaceDataOpsReal
+PatchFaceDataBasicOps
+PatchFaceDataMiscellaneousOpsReal
+PatchFaceDataNormOpsReal
+PatchFaceDataOpsReal
+HierarchyDataOpsReal
+HierarchyNodeDataOpsReal
+PatchNodeDataBasicOps
+PatchNodeDataMiscellaneousOpsReal
+PatchNodeDataNormOpsReal
+PatchNodeDataOpsReal
+HierarchySideDataOpsReal
+PatchSideDataBasicOps
+PatchSideDataMiscellaneousOpsReal
+PatchSideDataNormOpsReal
+PatchSideDataOpsReal
+ArrayData
+ArrayDataOperationUtilities
+CellData
+CellDataFactory
+CellVariable
+EdgeData
+EdgeDataFactory
+EdgeVariable
+FaceData
+FaceDataFactory
+FaceVariable
+IndexData
+IndexDataNode
+IndexIterator
+ConstIndexIterator
+IndexDataFactory
+IndexVariable
+MBDataUtilities
+MultiblockCellDataTranslator
+MultiblockEdgeDataTranslator
+MultiblockFaceDataTranslator
+MultiblockNodeDataTranslator
+MultiblockSideDataTranslator
+NodeData
+NodeDataFactory
+NodeVariable
+OuteredgeData
+OuteredgeDataFactory
+OuteredgeVariable
+OuterfaceData
+OuterfaceDataFactory
+OuterfaceVariable
+OuternodeData
+OuternodeDataFactory
+OuternodeVariable
+OutersideData
+OutersideDataFactory
+OutersideVariable
+SideData
+SideDataFactory
+SideVariable
+PETSc_SAMRAIVectorReal
+SAMRAIVectorReal
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion3.0/SAMRAI_classes_templated_on_DIM_only.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion3.0/SAMRAI_classes_templated_on_DIM_only.txt	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,294 @@
+LocallyActiveDataOuteredgeSumTransactionFactory
+LocallyActiveDataOuternodeSumTransactionFactory
+LocallyActiveDataPatchBoundaryEdgeSum
+LocallyActiveDataPatchBoundaryNodeSum
+MblkPatchBoundaryNodeSum
+OuteredgeSumTransaction
+OuteredgeSumTransactionFactory
+OuternodeSumTransaction
+OuternodeSumTransactionFactory
+PatchBoundaryEdgeSum
+PatchBoundaryNodeSum
+HyperbolicLevelIntegrator
+HyperbolicPatchStrategy
+ImplicitEquationStrategy
+ImplicitIntegrator
+MethodOfLinesIntegrator
+MethodOfLinesPatchStrategy
+TimeRefinementIntegrator
+TimeRefinementLevelStrategy
+BoundaryNode
+CubesPatchInterface
+CutCell
+ElevenPatchInterface
+EmbeddedBoundaryGeometry
+EmbeddedBoundaryShape
+EmbeddedBoundaryShapePolygon
+EmbeddedBoundaryShapeSphere
+CartesianVizamraiDataWriter
+VisDerivedDataStrategy
+VisItDataWriter
+VisMaterialsDataStrategy
+CartesianGridGeometry
+CartesianCellComplexConservativeLinearRefine
+CartesianCellComplexLinearRefine
+CartesianCellComplexWeightedAverage
+CartesianCellDoubleConservativeLinearRefine
+CartesianCellDoubleLinearRefine
+CartesianCellDoubleWeightedAverage
+CartesianCellFloatConservativeLinearRefine
+CartesianCellFloatLinearRefine
+CartesianCellFloatWeightedAverage
+CartesianEdgeComplexWeightedAverage
+CartesianEdgeDoubleConservativeLinearRefine
+CartesianEdgeDoubleWeightedAverage
+CartesianEdgeFloatConservativeLinearRefine
+CartesianEdgeFloatWeightedAverage
+CartesianFaceComplexWeightedAverage
+CartesianFaceDoubleConservativeLinearRefine
+CartesianFaceDoubleWeightedAverage
+CartesianFaceFloatConservativeLinearRefine
+CartesianFaceFloatWeightedAverage
+CartesianNodeComplexLinearRefine
+CartesianNodeDoubleLinearRefine
+CartesianNodeFloatLinearRefine
+CartesianOuterfaceComplexWeightedAverage
+CartesianOuterfaceDoubleWeightedAverage
+CartesianOuterfaceFloatWeightedAverage
+CartesianOutersideDoubleWeightedAverage
+CartesianSideComplexWeightedAverage
+CartesianSideDoubleConservativeLinearRefine
+CartesianSideDoubleWeightedAverage
+CartesianSideFloatConservativeLinearRefine
+CartesianSideFloatWeightedAverage
+CartesianPatchGeometry
+BlockGridGeometry
+BlockPatchGeometry
+SkeletonGridGeometry
+SkeletonCoarsen
+SkeletonRefine
+SkeletonPatchGeometry
+BinaryTree
+Box
+BoxIterator
+BoxArray
+BoxGraph
+BoxIOUtility
+BoxList
+BoxTop
+BoxTree
+BoxTreeNode
+Index
+IntVector
+LayerEdgeSet
+LayerHierarchy
+LayerNode
+LayerNodeSet
+MBUtilities
+MultiblockDataTranslator
+MultiblockGridGeometry
+MultiblockPatchHierarchy
+MultiblockPatchLevel
+BasePatchHierarchy
+BasePatchLevel
+BoundaryBox
+BoundaryBoxUtils
+BoundaryLookupTable
+CoarseFineBoundary
+GridGeometry
+Patch
+PatchConfigurationUtilities
+PatchFactory
+PatchGeometry
+PatchHierarchy
+PatchLevel
+PatchLevelIterator
+PatchLevelFactory
+BoxGeometry
+BoxOverlap
+LocallyActiveDataPatchLevelManager
+LocallyActiveDataPatchLevelIterator
+LocallyActiveVariableDatabase
+PatchData
+PatchDataFactory
+PatchDescriptor
+Variable
+VariableDatabase
+ArrayDataNormOpsComplex
+ArrayDataNormOpsInteger
+HierarchyCellDataOpsComplex
+HierarchyCellDataOpsInteger
+PatchCellDataNormOpsComplex
+PatchCellDataOpsComplex
+PatchCellDataOpsInteger
+HierarchyEdgeDataOpsComplex
+HierarchyEdgeDataOpsInteger
+PatchEdgeDataNormOpsComplex
+PatchEdgeDataOpsComplex
+PatchEdgeDataOpsInteger
+HierarchyFaceDataOpsComplex
+HierarchyFaceDataOpsInteger
+PatchFaceDataNormOpsComplex
+PatchFaceDataOpsComplex
+PatchFaceDataOpsInteger
+HierarchyDataOpsComplex
+HierarchyDataOpsInteger
+HierarchyDataOpsManager
+HierarchyNodeDataOpsComplex
+HierarchyNodeDataOpsInteger
+PatchNodeDataNormOpsComplex
+PatchNodeDataOpsComplex
+PatchNodeDataOpsInteger
+HierarchySideDataOpsComplex
+HierarchySideDataOpsInteger
+PatchSideDataNormOpsComplex
+PatchSideDataOpsComplex
+PatchSideDataOpsInteger
+AsyncBergerRigoutsos
+AsyncBergerRigoutsosNode
+BergerRigoutsos
+BoxGeneratorStrategy
+HistogramBox
+BaseGriddingAlgorithm
+GriddingAlgorithm
+StandardTagAndInitialize
+StandardTagAndInitStrategy
+TagAndInitializeStrategy
+LoadBalancer
+LoadBalanceStrategy
+MultiblockGriddingAlgorithm
+MultiblockGriddingTagger
+ArrayDataIterator
+CellGeometry
+CellOverlap
+EdgeGeometry
+EdgeOverlap
+FaceGeometry
+FaceOverlap
+FirstLayerCellFillPattern
+FirstLayerCellNoCornersFillPattern
+FirstLayerNodeFillPattern
+NodeGeometry
+NodeOverlap
+OuteredgeGeometry
+OuterfaceGeometry
+OuternodeGeometry
+OutersideGeometry
+SecondLayerNodeFillPattern
+SecondLayerNodeNoCornersFillPattern
+SideGeometry
+SideOverlap
+CellIndex
+CellIterator
+EdgeIndex
+EdgeIterator
+FaceIndex
+FaceIterator
+NodeIndex
+NodeIterator
+CellComplexConstantRefine
+CellDoubleConstantRefine
+CellFloatConstantRefine
+CellIntegerConstantRefine
+EdgeComplexConstantRefine
+EdgeDoubleConstantRefine
+EdgeFloatConstantRefine
+EdgeIntegerConstantRefine
+FaceComplexConstantRefine
+FaceDoubleConstantRefine
+FaceFloatConstantRefine
+FaceIntegerConstantRefine
+NodeComplexInjection
+NodeDoubleInjection
+NodeFloatInjection
+NodeIntegerInjection
+OuterfaceComplexConstantRefine
+OuterfaceDoubleConstantRefine
+OuterfaceFloatConstantRefine
+OuterfaceIntegerConstantRefine
+OuternodeDoubleConstantCoarsen
+SideComplexConstantRefine
+SideDoubleConstantRefine
+SideFloatConstantRefine
+SideIntegerConstantRefine
+CellComplexLinearTimeInterpolateOp
+CellDoubleLinearTimeInterpolateOp
+CellFloatLinearTimeInterpolateOp
+EdgeComplexLinearTimeInterpolateOp
+EdgeDoubleLinearTimeInterpolateOp
+EdgeFloatLinearTimeInterpolateOp
+FaceComplexLinearTimeInterpolateOp
+FaceDoubleLinearTimeInterpolateOp
+FaceFloatLinearTimeInterpolateOp
+NodeComplexLinearTimeInterpolateOp
+NodeDoubleLinearTimeInterpolateOp
+NodeFloatLinearTimeInterpolateOp
+OuterfaceComplexLinearTimeInterpolateOp
+OuterfaceDoubleLinearTimeInterpolateOp
+OuterfaceFloatLinearTimeInterpolateOp
+OutersideComplexLinearTimeInterpolateOp
+OutersideDoubleLinearTimeInterpolateOp
+OutersideFloatLinearTimeInterpolateOp
+SideComplexLinearTimeInterpolateOp
+SideDoubleLinearTimeInterpolateOp
+SideFloatLinearTimeInterpolateOp
+SideIndex
+SideIterator
+FACOperatorStrategy
+FACPreconditioner
+NonlinearSolverStrategy
+SNES_SAMRAIContext
+KINSOL_SAMRAIContext
+CartesianRobinBcHelper
+CellPoissonFACOps
+CellPoissonFACSolver
+CellPoissonHypreSolver
+GhostCellRobinBcCoefs
+LocationIndexRobinBcCoefs
+RobinBcCoefStrategy
+SimpleCellRobinBcCoefs
+Sundials_SAMRAIVector
+ABRTest
+SinusoidalFrontTagger
+DLBGTest
+SinusoidalFrontTagger
+LocallyActiveDataCoarsenAlgorithm
+LocallyActiveDataCoarsenPatchStrategy
+LocallyActiveDataCoarsenSchedule
+LocallyActiveDataCoarsenTransactionFactory
+LocallyActiveDataFillBox
+LocallyActiveDataFillBoxSet
+LocallyActiveDataRefineAlgorithm
+LocallyActiveDataRefinePatchStrategy
+LocallyActiveDataRefineSchedule
+LocallyActiveDataRefineTransactionFactory
+StandardLocallyActiveDataCoarsenTransactionFactory
+StandardLocallyActiveDataRefineTransactionFactory
+CoarsenAlgorithm
+CoarsenClasses
+CoarsenCopyTransaction
+CoarsenPatchStrategy
+CoarsenSchedule
+CoarsenTransactionFactory
+FillBoxSet
+RefineAlgorithm
+RefineClasses
+RefineCopyTransaction
+RefinePatchStrategy
+RefineSchedule
+RefineTimeTransaction
+RefineTransactionFactory
+StandardCoarsenTransactionFactory
+StandardRefineTransactionFactory
+MultiblockCoarsenAlgorithm
+MultiblockCoarsenPatchStrategy
+MultiblockCoarsenSchedule
+MultiblockRefineAlgorithm
+MultiblockRefinePatchStrategy
+MultiblockRefineSchedule
+BoxGeometryFillPattern
+CoarsenOperator
+Geometry
+RefineOperator
+TimeInterpolateOperator
+VariableFillPattern
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion3.0/convertIncludePaths
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion3.0/convertIncludePaths	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,15 @@
+#!/bin/sh
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/scripts/source_manipulation/replaceIncludeGuards $
+## Package:     SAMRAI scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 1917 $
+## Modified:    $LastChangedDate: 2008-01-25 13:28:01 -0800 (Fri, 25 Jan 2008) $
+## Description: shell script to insert package name in #includes
+##
+
+SARMAI_BIN=`dirname $0`
+
+perl $SARMAI_BIN/convertIncludePaths.pl $SARMAI_BIN $*
+
+exit
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion3.0/convertIncludePaths.pl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion3.0/convertIncludePaths.pl	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,123 @@
+#! /usr/bin/perl
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/scripts/source_manipulation/replaceIncludeGuards.pl $
+## Package:     SAMRAI scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 1917 $
+## Modified:    $LastChangedDate: 2008-01-25 13:28:01 -0800 (Fri, 25 Jan 2008) $
+## Description: perl script to insert the package prefix in #includes
+##
+
+use File::Basename;
+use File::Find;
+use File::Path;
+use Cwd;
+use Text::Wrap;
+
+my $SAMRAIBinDir = $ARGV[0];
+my $replaceDir   = $ARGV[1];
+
+my $SAMRAISourceDir = $SAMRAIBinDir . "/../../..";
+
+my $debug = 0;
+
+print "$SAMRAISourceDir" if $debug > 0;
+
+print "Replacing SAMRAI 2.x includes in directory \"$replaceDir\"\n\n";
+
+my $pwd = cwd;
+
+#
+# File pattern to look for
+#
+my $filePattern;
+
+my $excludePattern;
+
+ at allfiles = ();
+sub selectFile {
+    if ( $File::Find::dir =~ m!$excludePattern! ) {
+	$File::Find::prune = true;
+    }
+    elsif ( -f && m/$filePattern/ ) {
+	push @allfiles, $File::Find::name;
+	$allfiles[$#allfiles] =~ s|^\./||;
+    }
+}
+
+ at packages=qw/tbox hier xfer pdat math mesh geom solv algs appu/;
+#@packages= qw/tbox pdat/;
+
+%packageDirectories=('tbox', 'toolbox',
+		     'hier', 'hierarchy',
+		     'xfer', 'transfer',
+		     'pdat', 'patchdata',
+		     'math', 'mathops',
+		     'mesh', 'mesh',
+		     'geom', 'geometry',
+		     'solv', 'solvers',
+		     'algs', 'algorithm',
+		     'appu', 'apputils');
+
+undef %fileToPackage;
+# Create list of all source files
+foreach $package (@packages) {
+    print "Processing classs in package : $package\n" if ($debug); 
+    $dir=$SAMRAISourceDir . "/source/SAMRAI/$package/";
+
+    @allfiles = ();
+    $filePattern = q|(.*\.[ChI]$)|;
+    $excludePattern=q!/(.svn|CVS|templates)$!;
+    find( \&selectFile, $dir );
+    print "files=@allfiles" if ($debug > 1);
+    foreach $file (@allfiles) {
+	print "\tAdding file $file\n" if ($debug); 
+	($pattern = basename $file) =~ s/(.*)\.[ChI]$/$1/;
+	push @allPatterns, basename $pattern;
+	$base=basename $file;
+	$fileToPackage{$base}=$package;
+    }
+}
+
+
+
+my $allSimplepatterns = join '|', @allPatterns;
+
+print "$allSimplepatterns\n" if ($debug);
+
+ at allfiles = ();
+
+$filePattern = q/(.*\.[ChI]$)|(.*\.CPP$)|(.*\.cpp$)|(.*\.cxx$)|(.*\.CXX$)|(.*\.H$)|(.*\.hxx$)|(.*\.Hxx$)|(.*\.HXX$)|(.*\.txx$)|(.*\.ixx$)/;
+$excludePattern=q!/(.svn|CVS)$!;
+find( \&selectFile, $replaceDir );
+
+print "@allfiles\n" if ($debug);
+
+for $file (@allfiles) {
+    print "\tWorking on $file\n";
+    $tfile=$file . ".tmp";
+
+    open OLDFILE, "< $file" || die "Cannot open file $file";
+    open NEWFILE, "> $tfile" || die "Cannot open file $tfile";
+    while ( $str = <OLDFILE> ) {
+
+	# Fixup the non tbox includes
+        $str =~ s/\#include(\s*)\"($allSimplepatterns)\.([hIC])\"/#include$1\"SAMRAI\/$fileToPackage{"$2.$3"}\/$2.$3\"/go;
+
+	# Fixup the tbox includes, these were already in namespace
+        $str =~ s/\#include(\s*)\"tbox\/(.*)\"/#include$1\"SAMRAI\/tbox\/$2\"/go;
+
+	# Fixup configure header include
+        $str =~ s/\#include(\s*)\"SAMRAI_config.h\"/#include$1\"SAMRAI\/SAMRAI_config.h\"/go;
+	
+	print NEWFILE $str;
+    }
+
+    close OLDFILE || die "Cannot close file $file";
+    close NEWFILE || die "Cannot close file $tfile";
+
+    printf "unlink $file\n" if ( $debug > 1 );
+    unlink($file);
+    printf "rename $tfile $file\n" if ( $debug > 1 );
+    rename( $tfile, $file);
+}
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion3.0/createDimClassData.pl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion3.0/createDimClassData.pl	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,148 @@
+#! /usr/bin/perl
+##
+## File:        $URL$
+## Package:     SAMRAI scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 1917 $
+## Modified:    $LastChangedDate: 2008-01-25 13:28:01 -0800 (Fri, 25 Jan 2008) $
+## Description: Create list of classes templated on DIM.  Run in v2 
+##              directory to generate files.
+##
+
+use strict;
+
+use File::Basename;
+use File::Find;
+use Cwd;
+
+# Flush I/O on write to avoid buffering
+$|=1;
+
+my $debug=0;
+
+my $end_of_line = $/;
+
+#
+# Remove duplicated values
+#
+sub unique {
+    foreach my $test (@_){
+	my $i = -1;
+	my @indexes = map {$i++;$_ eq $test ? $i : ()} @_;
+	shift @indexes;
+	foreach my $index (@indexes){
+	    splice(@_,$index,1);
+	}
+    }
+    return @_;
+}
+
+my $pwd = cwd;
+
+
+#=============================================================================
+# Determine classes that are templated on dimension.
+#=============================================================================
+my $fileExtensionPattern;
+$fileExtensionPattern = q/.*\.h$/;
+
+#
+# Find the files to convert.
+my @filesToProcess = ();
+print @filesToProcess if $debug > 2;
+
+#
+# Build list of files in which to look for templates.
+#
+sub selectHFiles {
+    if ( $File::Find::name =~ m!/(.svn|CVS|include|scripts|\{arch\})$!o ) {
+	$File::Find::prune = 1;
+    }
+    elsif ( -f && m/.*\.h$/o ) {
+	push @filesToProcess, $File::Find::name;
+    }
+}
+find( \&selectHFiles, '.' );
+
+my $templatesClassNamesPattern = "";
+
+#
+# For classes with templating on DIM and other classes.
+#
+my %templatesInFile = ();
+my @templatesOnDIM = ();
+my @fileWithTemplatesOnDIM = ();
+
+#
+# For classes with templating only DIM.
+#
+my %templatesOnDimOnlyInFile = ();
+my @templatesOnDIMOnly = ();
+my @fileWithTemplatesOnDIMOnly = ();
+
+#
+# Find list of classes that are templated on dimension and build
+# list of those classes, files with those classes and
+# hash of files to classes.
+#
+for my $file (@filesToProcess) {
+    print "Looking for templates on DIM in $file\n" if $debug > 1;
+    my $directory = dirname $file;
+    my $filebasename = basename $file;
+
+    open FILE, "< $file" || die "Cannot open file $file";
+    
+    # read in whole paragraph, not just one line
+    undef $/;
+    while ( <FILE> ) {
+	# This pattern could use improvement to better find class
+        # declarations vs foward declaration.  Currently assumes a
+        # space after classname will suffice to distinquish which is
+        # not correct.
+	while ( $_ =~ m/template\s*<\s*int\s*DIM\s*>\s*class\s+(\w+)\s+/sgm ) {
+	    print "Found template on DIM only $1\n" if $debug > 1;
+	    $templatesClassNamesPattern .= "$1|";
+
+	    push @templatesOnDIMOnly, $1;
+	    push @fileWithTemplatesOnDIMOnly, $file;
+	    push @{$templatesOnDimOnlyInFile{$file}} ,$1;
+	}
+    }
+    close FILE;
+
+    open FILE, "< $file" || die "Cannot open file $file";
+    
+    while ( <FILE> ) {
+	# This pattern could use improvement to better find class
+	# declarations vs foward declaration.  Currently assumes a
+	# space after classname will suffice to distinquish which is
+	# not correct.
+	while ( $_ =~ m/template\s*<\s*int\s*DIM,\s*.*?>\s*class\s+(\w+)\s+/sgm ) {
+	    print "Found template on DIM with other $1\n" if $debug > 1;
+	    $templatesClassNamesPattern .= "$1";
+	    push @templatesOnDIM, $1;
+	    push @fileWithTemplatesOnDIM, $file;
+	    push @{$templatesInFile{$file}} ,$1;
+	}
+    }
+    close FILE;
+}
+
+my $filename="SAMRAI_classes_templated_on_DIM_only.txt";
+open FILE, '>', $filename or die "Can't open $filename : $!";
+foreach ( @templatesOnDIMOnly )
+{
+    print FILE "$_\n";
+}
+close FILE;
+
+
+my $filename="SAMRAI_classes_templated_on_DIM_and_other.txt";
+open FILE, '>', $filename or die "Can't open $filename : $!";
+foreach ( @templatesOnDIM )
+{
+    print FILE "$_\n";
+}
+close FILE;
+
+
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion3.0/removeTemplateOnDim
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion3.0/removeTemplateOnDim	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,15 @@
+#!/bin/sh
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/source/scripts/source_manipulation/replaceIncludeGuards $
+## Package:     SAMRAI scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 1917 $
+## Modified:    $LastChangedDate: 2008-01-25 13:28:01 -0800 (Fri, 25 Jan 2008) $
+## Description: shell script to insert package name in #includes
+##
+
+SARMAI_BIN=`dirname $0`
+
+perl $SARMAI_BIN/removeTemplateOnDim.pl $SARMAI_BIN
+
+exit
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/conversion3.0/removeTemplateOnDim.pl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/conversion3.0/removeTemplateOnDim.pl	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,134 @@
+#! /usr/bin/perl
+##
+## File:        $URL: file:///usr/casc/samrai/repository/SAMRAI/trunk/tools/scripts/conversion2.0/renameXd.pl $
+## Package:     SAMRAI scripts
+## Copyright:   (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Revision:    $LastChangedRevision: 1917 $
+## Modified:    $LastChangedDate: 2008-01-25 13:28:01 -0800 (Fri, 25 Jan 2008) $
+## Description: perl script to rename getNumber methods to be getNumberOf 
+##
+
+use strict;
+
+use File::Basename;
+use File::Find;
+use File::Compare;
+use Cwd;
+
+my $SAMRAIBinDir = $ARGV[0];
+my $replaceDir   = $ARGV[1];
+
+my $SAMRAISourceDir = $SAMRAIBinDir . "/../../..";
+my $SAMRAIScriptDir = $SAMRAISourceDir . "/tools/scripts/conversion3.0";
+
+# Flush I/O on write to avoid buffering
+# $|=1;
+
+my $debug=4;
+
+my $end_of_line = $/;
+
+#
+# Remove duplicated values
+#
+sub unique {
+    foreach my $test (@_){
+	my $i = -1;
+	my @indexes = map {$i++;$_ eq $test ? $i : ()} @_;
+	shift @indexes;
+	foreach my $index (@indexes){
+	    splice(@_,$index,1);
+	}
+    }
+    return @_;
+}
+
+my $pwd = cwd;
+
+my @templatesOnDIMOnly = ();
+my $filename=$SAMRAIScriptDir . "/SAMRAI_classes_templated_on_DIM_only.txt";
+open FILE, '<', $filename or die "Can't open $filename : $!";
+while (<FILE>) {
+    my $class=$_;
+    chomp($class);
+    push @templatesOnDIMOnly,$class;
+}
+close FILE;
+
+
+my @templatesOnDIM = ();
+my $filename=$SAMRAIScriptDir . "/SAMRAI_classes_templated_on_DIM_and_other.txt";
+open FILE, '<', $filename or die "Can't open $filename : $!";
+while (<FILE>) {
+    my $class=$_;
+    chomp($class);
+    push @templatesOnDIM,$class;
+}
+close FILE;
+
+#=============================================================================
+# Fixup for all source
+#=============================================================================
+
+#
+# Excludes files that are in internal source code control directories.
+#
+my $filePattern = q/(.*\.[ChI]$)|(.*\.CPP$)|(.*\.cpp$)|(.*\.cxx$)|(.*\.CXX$)|(.*\.H$)|(.*\.hxx$)|(.*\.Hxx$)|(.*\.HXX$)|(.*\.txx$)|(.*\.ixx$)/;
+my @filesToProcess = ();
+sub selectAllSourceFiles {
+    if ( $File::Find::name =~ m!/(.svn|CVS|include|scripts|\{arch\})$!o ) {
+	$File::Find::prune = 1;
+    }
+    elsif ( -f && m/$filePattern/ ) {
+	push @filesToProcess, $File::Find::name;
+	$filesToProcess[$#filesToProcess] =~ s|^\./||o;
+    }
+}
+
+find( \&selectAllSourceFiles, '.' );
+
+print "@filesToProcess\n" if ($debug);
+
+for my $file (@filesToProcess) {
+    print "Working on DIM fixes for source file $file\n";
+    my $directory = dirname $file;
+
+    my $filebasename = basename $file;
+
+    my $tempFile = $filebasename . ".samrai.tmp";
+
+    open FILE, "< $file" || die "Cannot open file $file";
+    open TEMPFILE, "> $tempFile" || die "Cannot open temporary work file $tempFile";
+    while ( my $str = <FILE> ) {
+
+	# Replace variable definitions
+	for my $classname (@templatesOnDIMOnly) {
+	    $str =~ s/$classname\<DIM\>/$classname/g;
+	    $str =~ s/$classname\<NDIM\>/$classname/g;
+	    $str =~ s/$classname\<2\>/$classname/g;
+	    $str =~ s/$classname\<3\>/$classname/g;
+	}
+	
+	for my $classname (@templatesOnDIM) {
+	    $str =~ s/$classname<DIM,\s*(.*)>/$classname<$1>/g;
+	    $str =~ s/$classname<DIM,(.*)>/$classname<$1>/g;
+	    $str =~ s/$classname<NDIM,\s*(.*)>/$classname<$1>/g;
+	    $str =~ s/$classname<2,\s*(.*)>/$classname<$1>/g;
+	    $str =~ s/$classname<3,\s*(.*)>/$classname<$1>/g;
+	}
+
+	print TEMPFILE $str;
+    }
+
+    close FILE || die "Cannot close file $file";
+    close TEMPFILE || die "Cannot close file $tempFile";
+
+    # Only replace existing file if a replacement was done.
+    if (compare($file,$tempFile) == 0) {
+	unlink($tempFile);
+    } else {
+	unlink($file);
+	rename( $tempFile, $file);
+    }
+}
+
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/insure++.psrc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/insure++.psrc	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,189 @@
+##############################################################################
+# Change cache dirs, admins have them set to be read only
+##############################################################################
+
+insure++.GusCacheDir $HOME/guscache
+insure++.lrtCacheDir $HOME/guscache
+
+
+# Record all output to a single file
+insure++.report_file $HOME/insure.out
+insure++.report_banner off
+insure++.report_overwrite false
+
+insure++.summarize leaks
+
+# Additional things to check beyond the default
+insure++.summarize bugs
+insure++.checking_uninit on
+insure++.unsuppress COPY_DANGLING
+insure++.unsuppress RETURN_FAILURE
+insure++.unsuppress FREE_DANGLING
+insure++.unsuppress ALLOC_CONFLICT
+insure++.unsuppress DELETE_MISMATCH
+insure++.unsuppress DEAD_CODE
+insure++.unsuppress READ_BAD_INDEX
+insure++.unsuppress WRITE_BAD_INDEX
+insure++.unsuppress RETURN_INCONSISTENT
+insure++.unsuppress FREE_NULL
+
+
+##############################################################################
+# Suppress OS, compiler, and external library problems
+##############################################################################
+
+# GCC internal problems 
+# SGS 5/20/04
+insure++.suppress RETURN_FAILURE { getenv * __libc_start_main }
+
+
+# Strings in g++ are very badly damaged
+# SGS 5/20/04
+insure++.leaksummaryfilter -! * std::string::_Rep::_S_create *
+
+# gfortran initialization
+# SGS 10/24/07
+insure++.suppress RETURN_FAILURE { * *_gfortrani_init_variables * }
+
+# I/O was returning 0 which insure++ was warning about 0 items
+# being written.  This is not an error, bug maybe not good 
+# programming.  Is there a way to stop the stream from doing this?
+# SGS 4/8/09
+insure++.suppress RETURN_FAILURE { * SAMRAI::tbox::ParallelBuffer::outputBuffer() * }
+
+# Did not work
+# insure++.file_ignore complex
+# insure++.suppress_output complex:632
+# insure++.suppress parserwarning in complex
+
+# MPI 1.2.4 & 1.2.5
+# SGS 5/20/04
+insure++.suppress RETURN_FAILURE { * MPI_Send *  } 
+insure++.suppress RETURN_FAILURE { * PMPI_Send *  } 
+insure++.suppress RETURN_FAILURE { * MPI_Recv *  } 
+insure++.suppress RETURN_FAILURE { * PMPI_Recv *  } 
+insure++.suppress RETURN_FAILURE { * MPI_Isend *  } 
+insure++.suppress RETURN_FAILURE { * PMPI_Isend *  } 
+insure++.suppress RETURN_FAILURE { * MPI_Irecv *  } 
+insure++.suppress RETURN_FAILURE { * PMPI_Irecv *  } 
+insure++.suppress RETURN_FAILURE { * MPI_Wait *  } 
+insure++.suppress RETURN_FAILURE { * PMPI_Wait *  } 
+insure++.suppress RETURN_FAILURE { * MPI_Test *  } 
+insure++.suppress RETURN_FAILURE { * PMPI_Test *  } 
+insure++.suppress RETURN_FAILURE { * MPI_Init *  } 
+insure++.suppress RETURN_FAILURE { * PMPI_Init *  } 
+insure++.suppress RETURN_FAILURE { * PMPI_Waitall *  } 
+insure++.suppress RETURN_FAILURE { * PMPI_Waitsome *  } 
+
+insure++.leaksummaryfilter -! * MPI_Init *
+insure++.leaksummaryfilter -! * PMPI_Init *
+insure++.leaksummaryfilter -! * MPI_Barrier *
+insure++.leaksummaryfilter -! * PMPI_Barrier *
+
+# OpenMPI 1.2.8
+# SGS 10/27/2008
+insure++.suppress RETURN_FAILURE { * _dl_init *  } 
+insure++.suppress RETURN_FAILURE { * PMPI_Finalize *  } 
+insure++.suppress FREE_NULL { * _dl_init *  } 
+insure++.suppress FREE_NULL { * PMPI_Init *  } 
+insure++.suppress FREE_NULL { * PMPI_Finalize *  } 
+insure++.suppress USER_ERROR { * PMPI_Finalize *  } 
+
+insure++.leaksummaryfilter -! * PMPI_Finalize *
+
+# SGS this rule does not work so use a more generic one....
+#insure++.leaksummaryfilter -! * SAMRAI::tbox::SAMRAIManager::initialize * PMPI_Comm_dup * 
+insure++.leaksummaryfilter -! * PMPI_Comm_dup *
+
+#
+# Added by ???? for ???
+#
+insure++.leaksummaryfilter -! * MPI_Irecv *
+insure++.leaksummaryfilter -! * PMPI_Irecv *
+
+# HDF
+# insure++.suppress RETURN_FAILURE { getenv H5_init_library * }
+# SGS 5/20/04
+insure++.suppress USER_ERROR { qsort H5AC_flush * }
+insure++.leaksummaryfilter -! * H5O_mtime_decode *
+# SGS 11/20/07
+# this is a little broad but HDF is leaking in fopen
+insure++.leaksummaryfilter -! * SAMRAI::tbox::HDFDatabase::open *
+insure++.leaksummaryfilter -! * SAMRAI::tbox::HDFDatabase::create *
+insure++.leaksummaryfilter -! * H5FCreate *
+insure++.leaksummaryfilter -! * H5FL_reg_malloc *
+
+# SGS 6/22/04
+# This does not appear in gcc 3.3.2 but is present in 3.2.2
+insure++.leaksummaryfilter -! * gmtime *
+
+# SGS 10/12/07
+# qsort has a memory leak
+insure++.leaksummaryfilter -! * qsort *
+
+
+# SGS 11/27/07
+# time method have leak
+insure++.leaksummaryfilter -! * tzset *
+
+# BTNG 10/17/08
+# This may be system dependent.  SGS could not replicate using identical configuration.
+insure++.leaksummaryfilter -! * localtime *
+
+# hypre 
+# Calling realloc with NULL pointer.  According to realloc docs this is
+# not an error.
+# SGS 5/20/04
+insure++.suppress FREE_NULL { realloc hypre_ReAlloc * }
+# Hypre is allocating boxes with malloc and then copying them.
+# SGS 4/23/09
+insure++.suppress READ_UNINIT_MEM { * hypre_BoxSetExtents * }
+
+# PETSC
+insure++.suppress RETURN_FAILURE { * PetscInitialize * }
+insure++.suppress RETURN_FAILURE { * PetscFinalize * }
+insure++.leaksummaryfilter -! * PetscDLLibraryOpen *
+insure++.leaksummaryfilter -! * PetscInitialize *
+insure++.leaksummaryfilter -! * PetscHeaderCreate_Private *
+insure++.leaksummaryfilter -! * PetscViewerASCIIGetStdout *
+insure++.leaksummaryfilter -! * VecInitializePackage *
+insure++.leaksummaryfilter -! * PETSC_VIEWER_STDOUT_ *
+
+# SILO
+insure++.leaksummaryfilter -! * _lite_PD_init_chrt *
+insure++.leaksummaryfilter -! * lite_SC_date *
+insure++.suppress RETURN_FAILURE { * _PD_get_tok * }
+insure++.suppress RETURN_FAILURE { * _lite_PD_rd_symt * }
+
+##############################################################################
+# Suppress warnings in SAMRAI
+# 	These should all include documentation on why it is valid to
+#	suppress the warning.
+##############################################################################
+
+# 
+# This error is signaling the end of file.
+# Reads that are smaller than maxsize are handled correctly by the parser code.
+# Insure incorrectly reports that anything smaller than the read size is 
+# is an error.  This is not true.
+#
+# SGS 5/20/04
+suppress RETURN_FAILURE at Parser.C
+
+# SGS 1/4/05
+suppress RETURN_FAILURE { fread * std::istream::sentry::sentry * }
+
+# Using stat return code to determine if path exists; this should be correct
+# SGS 10/24/07
+suppress RETURN_FAILURE { * stat SAMRAI::tbox::Utilities::recursiveMkdir * }
+
+# SGS 10/10/07
+# Problems with the code generated by grammer/parser.
+suppress READ_UNINIT_MEM(read) at Grammar.C
+suppress READ_UNINIT_MEM at Grammar.C
+
+# SGS 4/22/07
+# For performance reasons don't instrument these
+# file_ignore Dimension.* IntVector.* Box.* Index.*
+
+
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/vizamrai_cat.sh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/vizamrai_cat.sh	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,40 @@
+#!/bin/sh 
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:   
+##
+#########################################################################
+if [ $1 = "-h" ]
+then
+       echo "usage: $0 filename"
+       echo
+       echo "Where filename is the rootname of the .vis file collection."
+       echo "     example  $0 euler.00000"
+       echo "will collect euler.00000.vis.00000 euler.00000.vis.00001 into euler.vis"
+       echo "for a 2 processor run."
+       echo
+	
+       exit 0
+fi
+
+# First cat all the files together
+rm -f $1.vis
+FILES=`ls $1.vis.[0-9]*`
+for i in $FILES
+do
+	cat $i >> $1.vis
+done
+echo
+
+# Remove files
+for i in $FILES
+do
+	rm -f $i
+done
+
+
+
diff -r 000000000000 -r 5eda1a3f24e8 tools/scripts/vizamrai_multistep.pl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scripts/vizamrai_multistep.pl	Sat Jan 01 16:47:31 2011 -0800
@@ -0,0 +1,58 @@
+#!/usr/bin/perl
+
+#########################################################################
+##
+## This file is part of the SAMRAI distribution.  For full copyright 
+## information, see COPYRIGHT and COPYING.LESSER. 
+##
+## Copyright:     (c) 1997-2010 Lawrence Livermore National Security, LLC
+## Description:    Perl script for running the vizamrai_cat.sh script
+##                 on multiple timesteps.  
+##
+#########################################################################
+
+#
+#  Determine path to vizamrai_cat.sh script
+#
+    # below line just sets the dirname where this perl file is located
+    ($dirname = $0) =~ s:[^/]+$::; $dirname = '.' unless "$dirname";
+    # the vizamrai_cat.sh file is presumed to be located in the same directory
+    $vizamrai_cat = "$dirname/vizamrai_cat.sh";
+
+    if (!((-e $vizamrai_cat) && (-r $vizamrai_cat))) {
+       die "ERROR: cannot find $vizamrai_cat";
+    }
+#
+#  Read file basename
+#
+    print "File basename (e.g. euler.<step>.vis.<proc>, enter 'euler'):";
+    $basename = <STDIN>;
+    chop($basename);
+    print "Start Timestep (include zeros - e.g. 00000-00025, enter '00000'): ";
+    $start = <STDIN>;
+    chop($start);
+    print "End Timestep: ";
+    $end = <STDIN>;
+    chop($end);
+
+    $length = length($start);
+#
+#  Loop over files
+#
+   $inc = 1;
+   for ($tstep = $start; $tstep <= $end; $tstep = $tstep + $inc) { 
+      $newlength = length($tstep);
+      while ($newlength < $length) {
+         $tstep = "0$tstep";
+      } continue {
+         $newlength = length($tstep);
+      }
+      $firstfile = "$basename.$tstep.vis.00000";
+      if (-e $firstfile) {
+         system("/bin/sh $vizamrai_cat $basename.$tstep");
+         print "Created $basename.$tstep ...\n";
+      } else {
+         print "$basename.$tstep.vis.<nproc> - files don't exist\n";
+      }
+   }
+   print "Done. \n";



More information about the CIG-COMMITS mailing list